@viur/shop-components 0.0.1-dev.5 → 0.0.1-dev.50

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.
@@ -0,0 +1,3211 @@
1
+ var tt = Object.defineProperty;
2
+ var nt = (e, n, t) => n in e ? tt(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var Ce = (e, n, t) => nt(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { defineComponent as D, inject as O, reactive as w, openBlock as m, createElementBlock as h, normalizeClass as ye, createElementVNode as i, renderSlot as Ge, pushScopeId as M, popScopeId as z, Fragment as E, createCommentVNode as k, toDisplayString as B, onMounted as R, ref as F, readonly as at, getCurrentScope as st, onScopeDispose as lt, unref as q, computed as S, watchEffect as ce, renderList as U, watch as ae, withDirectives as J, vModelText as le, getCurrentInstance as rt, resolveComponent as se, createBlock as T, vShow as ve, withModifiers as de, createTextVNode as C, shallowRef as G, provide as ie, onBeforeMount as ee, useCssVars as ot, Transition as it, withCtx as ut, createVNode as dt, Teleport as Ze, resolveDynamicComponent as ct, mergeProps as mt } from "vue";
5
+ import { defineStore as $e } from "pinia";
6
+ import { Request as ft } from "@viur/vue-utils";
7
+ import { ViURShopClient as gt } from "@viur/viur-shop-client";
8
+ import { useRoute as ht, createRouter as bt, createWebHashHistory as vt } from "vue-router";
9
+ const pt = D({
10
+ props: {
11
+ isDragging: Boolean,
12
+ draggingLineBottom: Boolean,
13
+ draggingLineTop: Boolean
14
+ },
15
+ components: {},
16
+ emits: ["change", "delete", "handleDragStart", "handleDragEnd", "handleDragOver", "handleDrop"],
17
+ setup(e, n) {
18
+ const t = O("boneState");
19
+ return {
20
+ state: w({
21
+ isDraggable: !1
22
+ }),
23
+ boneState: t
24
+ };
25
+ }
26
+ }), I = (e, n) => {
27
+ const t = e.__vccOpts || e;
28
+ for (const [l, s] of n)
29
+ t[l] = s;
30
+ return t;
31
+ }, Je = (e) => (M("data-v-141aaf9b"), e = e(), z(), e), yt = ["draggable"], $t = ["disabled"], St = /* @__PURE__ */ Je(() => /* @__PURE__ */ i("sl-icon", {
32
+ slot: "prefix",
33
+ name: "grip-vertical"
34
+ }, null, -1)), _t = [
35
+ St
36
+ ], kt = { class: "value" }, wt = ["disabled", "title"], Et = /* @__PURE__ */ Je(() => /* @__PURE__ */ i("sl-icon", {
37
+ slot: "prefix",
38
+ name: "x-lg"
39
+ }, null, -1)), At = [
40
+ Et
41
+ ];
42
+ function It(e, n, t, l, s, o) {
43
+ return m(), h("div", {
44
+ class: ye(["value-line", {
45
+ "is-dragging": e.isDragging,
46
+ "dragging-line-bottom": e.draggingLineBottom,
47
+ "dragging-line-top": e.draggingLineTop
48
+ }]),
49
+ draggable: e.state.isDraggable,
50
+ onDragover: n[2] || (n[2] = (a) => e.$emit("handleDragOver", a)),
51
+ onDrop: n[3] || (n[3] = (a) => e.$emit("handleDrop", a)),
52
+ onDragstart: n[4] || (n[4] = (a) => e.$emit("handleDragStart", a)),
53
+ onDragend: n[5] || (n[5] = (a) => e.$emit("handleDragEnd"))
54
+ }, [
55
+ i("sl-button", {
56
+ disabled: e.boneState.readonly,
57
+ class: "drag-button",
58
+ onMousedown: n[0] || (n[0] = (a) => e.state.isDraggable = !0)
59
+ }, _t, 40, $t),
60
+ i("div", kt, [
61
+ Ge(e.$slots, "default", {}, void 0, !0)
62
+ ]),
63
+ i("sl-button", {
64
+ variant: "danger",
65
+ disabled: e.boneState.readonly,
66
+ outline: "",
67
+ title: e.$t("bone.del"),
68
+ class: "delete-btn",
69
+ onClick: n[1] || (n[1] = (a) => e.$emit("delete"))
70
+ }, At, 8, wt)
71
+ ], 42, yt);
72
+ }
73
+ const Ct = /* @__PURE__ */ I(pt, [["render", It], ["__scopeId", "data-v-141aaf9b"]]), Ot = D({
74
+ props: {
75
+ name: String,
76
+ value: Object,
77
+ index: Number,
78
+ lang: String,
79
+ readonly: Boolean,
80
+ params: Object
81
+ },
82
+ components: {},
83
+ emits: ["change", "handleClick"],
84
+ setup(e, n) {
85
+ const t = O("boneState");
86
+ return {
87
+ state: w({
88
+ debug: !1
89
+ }),
90
+ boneState: t
91
+ };
92
+ }
93
+ }), jt = { class: "bone-name" }, Bt = { key: 0 }, Dt = { class: "bone" };
94
+ function Vt(e, n, t, l, s, o) {
95
+ return m(), h(E, null, [
96
+ i("label", jt, [
97
+ Ge(e.$slots, "default", {}, void 0, !0),
98
+ k("", !0)
99
+ ]),
100
+ e.state.debug ? (m(), h("div", Bt, [
101
+ i("div", Dt, B(e.name), 1),
102
+ i("pre", null, " " + B(e.boneState) + `
103
+ `, 1)
104
+ ])) : k("", !0)
105
+ ], 64);
106
+ }
107
+ const Nt = /* @__PURE__ */ I(Ot, [["render", Vt], ["__scopeId", "data-v-b7149172"]]), Rt = D({
108
+ inheritAttrs: !1,
109
+ props: {
110
+ name: String,
111
+ value: [Object, String, Number, Boolean, Array],
112
+ index: Number,
113
+ lang: String
114
+ },
115
+ components: {},
116
+ emits: ["change"],
117
+ setup(e, n) {
118
+ const t = O("boneState"), l = w({});
119
+ function s(o) {
120
+ n.emit("change", e.name, o.target.value, e.lang, e.index);
121
+ }
122
+ return R(() => {
123
+ n.emit("change", e.name, e.value, e.lang, e.index);
124
+ }), {
125
+ state: l,
126
+ boneState: t,
127
+ changeEvent: s
128
+ };
129
+ }
130
+ }), Lt = ["disabled", "value"], Ut = ["disabled", "value"];
131
+ function Tt(e, n, t, l, s, o) {
132
+ var a, u;
133
+ return e.boneState.bonestructure.type === "raw.json" ? (m(), h("sl-textarea", {
134
+ key: 0,
135
+ disabled: (a = e.boneState) == null ? void 0 : a.readonly,
136
+ value: JSON.stringify(e.value),
137
+ onInput: n[0] || (n[0] = (...r) => e.changeEvent && e.changeEvent(...r))
138
+ }, null, 40, Lt)) : (m(), h("sl-textarea", {
139
+ key: 1,
140
+ disabled: (u = e.boneState) == null ? void 0 : u.readonly,
141
+ value: e.value,
142
+ onInput: n[1] || (n[1] = (...r) => e.changeEvent && e.changeEvent(...r))
143
+ }, null, 40, Ut));
144
+ }
145
+ const pe = /* @__PURE__ */ I(Rt, [["render", Tt], ["__scopeId", "data-v-0ebe5f0b"]]), Pt = D({
146
+ inheritAttrs: !1,
147
+ props: {
148
+ name: String,
149
+ value: [Object, String, Number, Boolean, Array],
150
+ index: Number,
151
+ lang: String,
152
+ readonly: Boolean,
153
+ params: Object
154
+ },
155
+ components: {},
156
+ emits: ["change"],
157
+ setup(e, n) {
158
+ const t = w({});
159
+ function l(s) {
160
+ n.emit("change", e.name, s.target.value, e.lang, e.index);
161
+ }
162
+ return R(() => {
163
+ n.emit("change", e.name, e.value, e.lang, e.index);
164
+ }), {
165
+ state: t,
166
+ changeEvent: l
167
+ };
168
+ }
169
+ }), Mt = ["value"];
170
+ function zt(e, n, t, l, s, o) {
171
+ return m(), h("sl-input", {
172
+ disabled: "",
173
+ value: e.value,
174
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a))
175
+ }, null, 40, Mt);
176
+ }
177
+ const Oe = /* @__PURE__ */ I(Pt, [["render", zt], ["__scopeId", "data-v-b45a1311"]]);
178
+ function Wt(e) {
179
+ return st() ? (lt(e), !0) : !1;
180
+ }
181
+ function qt(e) {
182
+ return typeof e == "function" ? e() : q(e);
183
+ }
184
+ const Ft = typeof window < "u" && typeof document < "u";
185
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
186
+ function me(e, n, t = {}) {
187
+ const {
188
+ immediate: l = !0
189
+ } = t, s = F(!1);
190
+ let o = null;
191
+ function a() {
192
+ o && (clearTimeout(o), o = null);
193
+ }
194
+ function u() {
195
+ s.value = !1, a();
196
+ }
197
+ function r(...c) {
198
+ a(), s.value = !0, o = setTimeout(() => {
199
+ s.value = !1, o = null, e(...c);
200
+ }, qt(n));
201
+ }
202
+ return l && (s.value = !0, Ft && r()), Wt(u), {
203
+ isPending: at(s),
204
+ start: r,
205
+ stop: u
206
+ };
207
+ }
208
+ class Kt {
209
+ static objectEmpty(n) {
210
+ return Object.keys(n).length === 0 && n.constructor === Object;
211
+ }
212
+ static getDescr(n, t) {
213
+ try {
214
+ return n.values.filter((l) => l[0] === t)[0][1];
215
+ } catch {
216
+ return "-";
217
+ }
218
+ }
219
+ static unescape(n) {
220
+ return n || (n = ""), String(n).replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&#40;/g, "(").replace(/&#41;/g, ")").replace(/&#61;/g, "=").replace(/&#039;/g, "'").replace(/&#040;/g, "(").replace(/&#041;/g, ")").replace(/&#061;/g, "=");
221
+ }
222
+ static formatString(n, t) {
223
+ function l(a) {
224
+ let u = [], r = [], c = /\$\((.*?)\)/g;
225
+ for (; r; ) {
226
+ if (r = c.exec(a), !r) {
227
+ r = !1;
228
+ continue;
229
+ }
230
+ u.push(r[1]);
231
+ }
232
+ return u;
233
+ }
234
+ let s = l(n), o = [];
235
+ Array.isArray(t) || (t = [t]);
236
+ for (let a of t) {
237
+ let u = n;
238
+ for (let r of s) {
239
+ let c = r.split("."), d = a;
240
+ for (let f of c)
241
+ d && d !== "-" && f in d && d[f] ? d = d[f] : d = "-";
242
+ d = this.unescape(d), u = u.replace("$(" + r + ")", d);
243
+ }
244
+ o.push(u);
245
+ }
246
+ return o.join(", ");
247
+ }
248
+ }
249
+ const Ht = D({
250
+ inheritAttrs: !1,
251
+ props: {
252
+ name: String,
253
+ value: [Object, String, Number, Boolean, Array],
254
+ index: Number,
255
+ lang: String,
256
+ autofocus: Boolean
257
+ },
258
+ components: {},
259
+ emits: ["change"],
260
+ setup(e, n) {
261
+ const t = O("boneState"), l = w({
262
+ value: S(() => e.value)
263
+ }), s = F(null);
264
+ function o(a) {
265
+ n.emit("change", e.name, a.target.value, e.lang, e.index);
266
+ }
267
+ return ce(() => {
268
+ if (e.autofocus && s.value && s.value !== null && s !== null) {
269
+ const { start: a } = me(() => {
270
+ s.value.focus();
271
+ }, 600);
272
+ a();
273
+ }
274
+ }), R(() => {
275
+ n.emit("change", e.name, e.value, e.lang, e.index);
276
+ }), {
277
+ state: l,
278
+ Utils: Kt,
279
+ boneState: t,
280
+ changeEvent: o,
281
+ stringBone: s
282
+ };
283
+ }
284
+ }), Gt = ["disabled", "value", "required"];
285
+ function Zt(e, n, t, l, s, o) {
286
+ return m(), h("sl-input", {
287
+ ref: "stringBone",
288
+ disabled: e.boneState.readonly,
289
+ value: e.Utils.unescape(e.value),
290
+ required: e.boneState.bonestructure.required,
291
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a)),
292
+ onKeyup: n[1] || (n[1] = (...a) => e.changeEvent && e.changeEvent(...a))
293
+ }, null, 40, Gt);
294
+ }
295
+ const je = /* @__PURE__ */ I(Ht, [["render", Zt], ["__scopeId", "data-v-1ccbacc0"]]), Jt = D({
296
+ inheritAttrs: !1,
297
+ props: {
298
+ name: String,
299
+ value: [Object, String, Number, Boolean, Array],
300
+ index: Number,
301
+ lang: String,
302
+ autofocus: Boolean
303
+ },
304
+ components: {},
305
+ emits: ["change"],
306
+ setup(e, n) {
307
+ const t = O("boneState"), l = w({}), s = F(null);
308
+ function o(a) {
309
+ n.emit("change", e.name, a.target.value, e.lang, e.index);
310
+ }
311
+ return ce(() => {
312
+ if (e.autofocus && s.value && s.value !== null && s !== null) {
313
+ const { start: a } = me(() => {
314
+ s.value.focus();
315
+ }, 600);
316
+ a();
317
+ }
318
+ }), R(() => {
319
+ n.emit("change", e.name, e.value, e.lang, e.index);
320
+ }), {
321
+ state: l,
322
+ boneState: t,
323
+ changeEvent: o,
324
+ emailBone: s
325
+ };
326
+ }
327
+ }), Qt = ["disabled", "value"];
328
+ function Yt(e, n, t, l, s, o) {
329
+ return m(), h("sl-input", {
330
+ ref: "emailBone",
331
+ disabled: e.boneState.readonly,
332
+ type: "email",
333
+ value: e.value,
334
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a))
335
+ }, null, 40, Qt);
336
+ }
337
+ const Be = /* @__PURE__ */ I(Jt, [["render", Yt], ["__scopeId", "data-v-4328e024"]]), Xt = D({
338
+ inheritAttrs: !1,
339
+ props: {
340
+ name: String,
341
+ value: [Object, String, Number, Boolean, Array],
342
+ index: Number,
343
+ lang: String
344
+ },
345
+ components: {},
346
+ emits: ["change"],
347
+ setup(e, n) {
348
+ const t = O("boneState"), l = w({
349
+ value: S(() => {
350
+ var a;
351
+ let o = e.value;
352
+ return t.bonestructure.time ? o = (a = e.value) == null ? void 0 : a.split("+")[0] : e.value && (o = new Date(e.value).toISOString().substr(0, 10)), o;
353
+ }),
354
+ typeString: S(() => {
355
+ let o = "datetime-local";
356
+ return t.bonestructure.time || (o = "date"), o;
357
+ })
358
+ });
359
+ function s(o) {
360
+ n.emit("change", e.name, o.target.value, e.lang, e.index);
361
+ }
362
+ return R(() => {
363
+ n.emit("change", e.name, e.value, e.lang, e.index);
364
+ }), {
365
+ state: l,
366
+ boneState: t,
367
+ changeEvent: s
368
+ };
369
+ }
370
+ }), xt = ["disabled", "type", "value"];
371
+ function en(e, n, t, l, s, o) {
372
+ return m(), h("sl-input", {
373
+ disabled: e.boneState.readonly,
374
+ type: e.state.typeString,
375
+ value: e.state.value,
376
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a))
377
+ }, null, 40, xt);
378
+ }
379
+ const De = /* @__PURE__ */ I(Xt, [["render", en], ["__scopeId", "data-v-f1b8af8c"]]), tn = D({
380
+ inheritAttrs: !1,
381
+ props: {
382
+ name: String,
383
+ value: null,
384
+ index: Number,
385
+ lang: String
386
+ },
387
+ components: {},
388
+ emits: ["change"],
389
+ setup(e, n) {
390
+ const t = O("boneState"), l = w({
391
+ value: S(() => {
392
+ let a = e.value;
393
+ return Array.isArray(e.value) ? (t.bonestructure.values instanceof Array ? a = a.filter((u) => t.bonestructure.values.map((r) => r[0].toString()).includes(u)) : a = a.filter(
394
+ (u) => Object.keys(t.bonestructure.values).map((r) => r.toString()).includes(u)
395
+ ), a.map((u) => u.toString())) : e.value ? e.value.toString() : "";
396
+ })
397
+ });
398
+ function s() {
399
+ if (Array.isArray(t.bonestructure.values))
400
+ return t.bonestructure.values;
401
+ {
402
+ let a = [];
403
+ for (const [u, r] of Object.entries(t.bonestructure.values))
404
+ a.push([u, r]);
405
+ return a;
406
+ }
407
+ }
408
+ function o(a) {
409
+ n.emit("change", e.name, a.target.value, e.lang, e.index), W;
410
+ }
411
+ return R(() => {
412
+ n.emit("change", e.name, l.value, e.lang, e.index);
413
+ }), {
414
+ state: l,
415
+ boneState: t,
416
+ changeEvent: o,
417
+ convertObjToList: s
418
+ };
419
+ }
420
+ }), nn = ["disabled", "value", "multiple"], an = ["value"];
421
+ function sn(e, n, t, l, s, o) {
422
+ return m(), h("sl-select", {
423
+ disabled: e.boneState.readonly,
424
+ value: e.state.value,
425
+ hoist: "",
426
+ multiple: e.boneState.bonestructure.multiple,
427
+ "max-options-visible": "0",
428
+ clearable: "",
429
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a))
430
+ }, [
431
+ (m(!0), h(E, null, U(e.convertObjToList(), (a) => (m(), h("sl-option", {
432
+ key: a[0],
433
+ value: a[0]
434
+ }, B(a[1]), 9, an))), 128))
435
+ ], 40, nn);
436
+ }
437
+ const Ve = /* @__PURE__ */ I(tn, [["render", sn], ["__scopeId", "data-v-5a38b97f"]]), ln = D({
438
+ inheritAttrs: !1,
439
+ props: {
440
+ name: String,
441
+ value: [Object, String, Number, Boolean, Array],
442
+ index: Number,
443
+ lang: String
444
+ },
445
+ components: {},
446
+ emits: ["change"],
447
+ setup(e, n) {
448
+ const t = O("boneState"), l = w({
449
+ value: S(() => ![!1, null, void 0, ""].includes(e.value))
450
+ });
451
+ function s(o) {
452
+ n.emit("change", e.name, o.target.checked, e.lang, e.index);
453
+ }
454
+ return R(() => {
455
+ let o = e.value;
456
+ o || (o = !1), n.emit("change", e.name, o, e.lang, e.index);
457
+ }), {
458
+ state: l,
459
+ boneState: t,
460
+ changeEvent: s
461
+ };
462
+ }
463
+ }), rn = ["disabled", "checked"];
464
+ function on(e, n, t, l, s, o) {
465
+ return m(), h("sl-switch", {
466
+ disabled: e.boneState.readonly,
467
+ checked: e.state.value,
468
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a))
469
+ }, null, 40, rn);
470
+ }
471
+ const Ne = /* @__PURE__ */ I(ln, [["render", on], ["__scopeId", "data-v-363598c8"]]), un = D({
472
+ inheritAttrs: !1,
473
+ props: {
474
+ name: String,
475
+ value: [Object, String, Number, Boolean, Array],
476
+ index: Number,
477
+ lang: String,
478
+ autofocus: Boolean
479
+ },
480
+ components: {},
481
+ emits: ["change"],
482
+ setup(e, n) {
483
+ const t = O("boneState"), l = w({
484
+ value1: "",
485
+ value2: null,
486
+ equal: !1,
487
+ passwordInfo: [],
488
+ requiredPasswordInfo: []
489
+ }), s = F(null);
490
+ function o(u) {
491
+ l.value1 === l.value2 ? l.equal = !0 : l.equal = !1, a(l.value1), l.requiredPasswordInfo.length === 0 && l.passwordInfo.length - l.requiredPasswordInfo.length <= t.bonestructure.test_threshold ? n.emit("change", e.name, l.value1, e.lang, e.index, !0) : n.emit("change", e.name, l.value1, e.lang, e.index, !1);
492
+ }
493
+ R(() => {
494
+ n.emit("change", e.name, e.value, e.lang, e.index);
495
+ });
496
+ function a(u) {
497
+ l.passwordInfo = [], l.requiredPasswordInfo = [];
498
+ for (const r of t.bonestructure.tests)
499
+ new RegExp(r[0]).test(u) || (r[2] ? l.requiredPasswordInfo.push(r[1]) : l.passwordInfo.push(r[1]));
500
+ l.equal || l.requiredPasswordInfo.push("Die eingegebenen Passwörter stimmen nicht überein."), l.value1 || l.requiredPasswordInfo.push("Das eingegebene Passwort ist leer.");
501
+ }
502
+ return ce(() => {
503
+ if (e.autofocus && s.value && s.value !== null && s !== null) {
504
+ const { start: u } = me(() => {
505
+ s.value.focus();
506
+ }, 600);
507
+ u();
508
+ }
509
+ }), ae(
510
+ () => e.value,
511
+ (u, r) => {
512
+ l.value1 = u;
513
+ }
514
+ ), {
515
+ state: l,
516
+ boneState: t,
517
+ changeEvent: o,
518
+ passwordBone: s
519
+ };
520
+ }
521
+ }), dn = ["disabled"], cn = ["name"], mn = ["name"], fn = { class: "errors" };
522
+ function gn(e, n, t, l, s, o) {
523
+ return m(), h(E, null, [
524
+ J(i("sl-input", {
525
+ ref: "passwordBone",
526
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => e.state.value1 = a),
527
+ disabled: e.boneState.readonly,
528
+ class: ye({ "has-check": !e.boneState.readonly }),
529
+ type: "password",
530
+ clearable: "",
531
+ "password-toggle": "true",
532
+ onSlChange: n[1] || (n[1] = (...a) => e.changeEvent && e.changeEvent(...a)),
533
+ onSlClear: n[2] || (n[2] = (a) => e.state.value1 = ""),
534
+ onKeyup: n[3] || (n[3] = (...a) => e.changeEvent && e.changeEvent(...a))
535
+ }, [
536
+ i("sl-icon", {
537
+ slot: "suffix",
538
+ name: e.state.equal && e.state.value1.length ? "check" : "x"
539
+ }, null, 8, cn)
540
+ ], 42, dn), [
541
+ [le, e.state.value1]
542
+ ]),
543
+ e.boneState.readonly ? k("", !0) : J((m(), h("sl-input", {
544
+ key: 0,
545
+ "onUpdate:modelValue": n[4] || (n[4] = (a) => e.state.value2 = a),
546
+ class: "password-check",
547
+ type: "password",
548
+ clearable: "",
549
+ "password-toggle": "true",
550
+ onSlChange: n[5] || (n[5] = (...a) => e.changeEvent && e.changeEvent(...a)),
551
+ onSlClear: n[6] || (n[6] = (a) => e.state.value2 = ""),
552
+ onKeyup: n[7] || (n[7] = (...a) => e.changeEvent && e.changeEvent(...a))
553
+ }, [
554
+ i("sl-icon", {
555
+ slot: "suffix",
556
+ name: e.state.equal && e.state.value1.length ? "check" : "x"
557
+ }, null, 8, mn)
558
+ ], 544)), [
559
+ [le, e.state.value2]
560
+ ]),
561
+ i("ul", fn, [
562
+ (m(!0), h(E, null, U(e.state.passwordInfo, (a, u) => (m(), h("li", { key: u }, B(a), 1))), 128)),
563
+ (m(!0), h(E, null, U(e.state.requiredPasswordInfo, (a, u) => (m(), h("li", {
564
+ key: u,
565
+ class: "requiredInfo"
566
+ }, B(a), 1))), 128))
567
+ ])
568
+ ], 64);
569
+ }
570
+ const Re = /* @__PURE__ */ I(un, [["render", gn], ["__scopeId", "data-v-0ccf18c0"]]), hn = D({
571
+ props: {
572
+ name: String,
573
+ value: null,
574
+ index: Number,
575
+ lang: String,
576
+ readonly: Boolean,
577
+ params: Object
578
+ },
579
+ emits: ["change"],
580
+ setup(e, n) {
581
+ const t = O("boneState"), l = w({
582
+ value: S(() => e.value),
583
+ structure: S(() => a(t.bonestructure.using)),
584
+ globalRegistration: !1,
585
+ formGroups: S(() => {
586
+ var c, d;
587
+ let u = { default: { name: "Allgemein", bones: [], groupVisible: !1, groupOpen: !0 } };
588
+ for (const [f, p] of Object.entries(l.structure)) {
589
+ let v = "default", _ = l.structure[f], g = (c = l.value) == null ? void 0 : c[f];
590
+ (d = p == null ? void 0 : p.params) != null && d.category && (v = p.params.category.toLowerCase()), Object.keys(u).includes(v) ? u[v].bones.push({
591
+ boneName: f,
592
+ boneStructure: _,
593
+ boneValue: g
594
+ }) : u[v] = {
595
+ name: p.params.category,
596
+ bones: [
597
+ {
598
+ boneName: f,
599
+ boneStructure: _,
600
+ boneValue: g
601
+ }
602
+ ]
603
+ }, _.visible === !0 && (u[v].groupVisible = !0);
604
+ }
605
+ let r = {};
606
+ return Object.keys(u).sort().forEach(function(f) {
607
+ r[f] = u[f];
608
+ }), r;
609
+ })
610
+ });
611
+ function s(u) {
612
+ n.emit("change", u);
613
+ }
614
+ R(() => {
615
+ rt().appContext.components.Bone ? l.globalRegistration = !0 : l.globalRegistration = !1, n.emit("change", e.name, e.value, e.lang, e.index);
616
+ });
617
+ function o(u) {
618
+ console.log(u);
619
+ }
620
+ function a(u) {
621
+ if (Array.isArray(u)) {
622
+ let r = {};
623
+ for (const c in u)
624
+ r[u[c][0]] = u[c][1];
625
+ return r;
626
+ } else
627
+ return u;
628
+ }
629
+ return {
630
+ state: l,
631
+ boneState: t,
632
+ getBoneWidget: x,
633
+ structureToDict: a,
634
+ changeEvent: s,
635
+ updateValue: o
636
+ };
637
+ }
638
+ }), bn = {
639
+ key: 0,
640
+ open: "",
641
+ variant: "danger"
642
+ }, vn = {
643
+ key: 1,
644
+ class: "form"
645
+ }, pn = ["summary", "open"];
646
+ function yn(e, n, t, l, s, o) {
647
+ const a = se("bone");
648
+ return e.state.globalRegistration ? (m(), h("div", vn, [
649
+ (m(!0), h(E, null, U(e.state.formGroups, (u, r) => J((m(), h("sl-details", {
650
+ key: r,
651
+ summary: u.name,
652
+ open: u.groupOpen
653
+ }, [
654
+ (m(!0), h(E, null, U(u.bones, (c) => J((m(), T(a, {
655
+ key: c.name,
656
+ is: e.getBoneWidget(e.state.structure[c.boneName].type),
657
+ name: c.boneName,
658
+ structure: e.state.structure,
659
+ skel: e.state.value,
660
+ errors: e.boneState.errors,
661
+ readonly: e.boneState.bonestructure.readonly ? !0 : void 0,
662
+ onChangeInternal: e.changeEvent
663
+ }, null, 8, ["is", "name", "structure", "skel", "errors", "readonly", "onChangeInternal"])), [
664
+ [ve, e.state.structure[c.boneName].visible]
665
+ ])), 128))
666
+ ], 8, pn)), [
667
+ [ve, u.groupVisible]
668
+ ])), 128))
669
+ ])) : (m(), h("sl-alert", bn, " In Order to use this Bone register the bone component globally in your main file "));
670
+ }
671
+ const Qe = /* @__PURE__ */ I(hn, [["render", yn], ["__scopeId", "data-v-e6fcfbca"]]), $n = D({
672
+ inheritAttrs: !1,
673
+ props: {
674
+ name: String,
675
+ value: null,
676
+ index: Number,
677
+ lang: String
678
+ },
679
+ components: { Wrapper_nested: Qe },
680
+ emits: ["change"],
681
+ setup(e, n) {
682
+ const t = O("boneState"), l = w({
683
+ value: {},
684
+ index: S(() => e.index),
685
+ lang: S(() => e.lang)
686
+ });
687
+ function s(o) {
688
+ var u;
689
+ (u = l.value) != null && u[o.name] || (l.value ? l.value[o.name] = null : l.value = { [o.name]: null });
690
+ let a = l.value[o.name];
691
+ o.lang ? (a === null && (a = {}), Object.keys(a).includes(o.lang) && o.index !== null ? a[o.lang][o.index] = o.value : a[o.lang] = o.value) : o.index !== null ? (a === null && (a = []), a[o.index] = o.value) : a = o.value, l.value[o.name] = a, n.emit("change", e.name, l.value, e.lang, e.index, !0);
692
+ }
693
+ return R(() => {
694
+ n.emit("change", e.name, e.value, e.lang, e.index);
695
+ }), {
696
+ state: l,
697
+ boneState: t,
698
+ changeEvent: s
699
+ };
700
+ }
701
+ });
702
+ function Sn(e, n, t, l, s, o) {
703
+ const a = se("Wrapper_nested");
704
+ return m(), T(a, {
705
+ value: e.value,
706
+ name: e.name,
707
+ index: e.state.index,
708
+ disabled: e.boneState.bonestructure.readonly,
709
+ onChange: e.changeEvent
710
+ }, null, 8, ["value", "name", "index", "disabled", "onChange"]);
711
+ }
712
+ const Le = /* @__PURE__ */ I($n, [["render", Sn], ["__scopeId", "data-v-84a761ce"]]), _n = D({
713
+ inheritAttrs: !1,
714
+ props: {
715
+ name: String,
716
+ value: [Object, String, Number, Boolean, Array],
717
+ index: Number,
718
+ lang: String
719
+ },
720
+ components: {},
721
+ emits: ["change"],
722
+ setup(e, n) {
723
+ const t = O("boneState"), l = w({});
724
+ function s(o) {
725
+ n.emit("change", e.name, o.target.value, e.lang, e.index);
726
+ }
727
+ return R(() => {
728
+ n.emit("change", e.name, e.value, e.lang, e.index);
729
+ }), {
730
+ state: l,
731
+ boneState: t,
732
+ changeEvent: s
733
+ };
734
+ }
735
+ }), kn = ["disabled", "value"];
736
+ function wn(e, n, t, l, s, o) {
737
+ return m(), h("sl-color-picker", {
738
+ disabled: e.boneState.readonly,
739
+ value: e.value,
740
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a))
741
+ }, null, 40, kn);
742
+ }
743
+ const Ue = /* @__PURE__ */ I(_n, [["render", wn], ["__scopeId", "data-v-534b9149"]]), En = D({
744
+ inheritAttrs: !1,
745
+ emits: { change: null },
746
+ props: {
747
+ name: String,
748
+ value: [Object, String, Number, Boolean, Array],
749
+ index: Number,
750
+ lang: String,
751
+ autofocus: Boolean
752
+ },
753
+ components: {},
754
+ setup(e, n) {
755
+ const t = O("boneState"), l = w({
756
+ minAmount: S(() => t.bonestructure.minAmount),
757
+ maxAmount: S(() => t.bonestructure.maxAmount),
758
+ precision: S(() => {
759
+ if (t.bonestructure.precision > 1)
760
+ return parseFloat(`0.${"0".repeat(t.bonestructure.precision - 1)}1`);
761
+ })
762
+ }), s = F(null);
763
+ function o(a) {
764
+ n.emit("change", e.name, a.target.value, e.lang, e.index);
765
+ }
766
+ return ce(() => {
767
+ if (e.autofocus && s.value && s.value !== null && s !== null) {
768
+ const { start: a } = me(() => {
769
+ s.value.focus();
770
+ }, 600);
771
+ a();
772
+ }
773
+ }), R(() => {
774
+ n.emit("change", e.name, e.value, e.lang, e.index);
775
+ }), {
776
+ state: l,
777
+ boneState: t,
778
+ changeEvent: o,
779
+ numericBone: s
780
+ };
781
+ }
782
+ }), An = ["disabled", "value", "min", "max", "step"], In = { class: "info" }, Cn = { key: 0 }, On = { key: 1 }, jn = { key: 2 };
783
+ function Bn(e, n, t, l, s, o) {
784
+ return m(), h(E, null, [
785
+ i("sl-input", {
786
+ ref: "numericBone",
787
+ type: "number",
788
+ disabled: e.boneState.readonly,
789
+ value: e.value,
790
+ min: e.state.minAmount,
791
+ max: e.state.maxAmount,
792
+ step: e.state.precision,
793
+ onSlChange: n[0] || (n[0] = (...a) => e.changeEvent && e.changeEvent(...a)),
794
+ onKeyup: n[1] || (n[1] = (...a) => e.changeEvent && e.changeEvent(...a))
795
+ }, null, 40, An),
796
+ i("ul", In, [
797
+ e.state.minAmount !== -9223372036854776e3 && e.state.minAmount ? (m(), h("li", Cn, B(e.$t("bones.numeric.min", { val: e.state.minAmount })), 1)) : k("", !0),
798
+ e.state.maxAmount !== 9223372036854776e3 && e.state.maxAmount ? (m(), h("li", On, B(e.$t("bones.numeric.max", { val: e.state.maxAmount })), 1)) : k("", !0),
799
+ e.state.precision ? (m(), h("li", jn, B(e.$t("bones.numeric.precision", { val: e.boneState.bonestructure.precision })), 1)) : k("", !0)
800
+ ])
801
+ ], 64);
802
+ }
803
+ const Te = /* @__PURE__ */ I(En, [["render", Bn], ["__scopeId", "data-v-03d5b399"]]);
804
+ var N = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
805
+ class ue extends Error {
806
+ constructor(n, t, l, s) {
807
+ super(l || t), arguments.length >= 4 && s && Object.assign(this, s), this.statusText = t, this.statusCode = n, this.response = s;
808
+ }
809
+ }
810
+ let be = null;
811
+ function X() {
812
+ return be || (be = $e("requestStore", () => {
813
+ const e = w({ sKeys: /* @__PURE__ */ new Set() });
814
+ function n() {
815
+ e.sKeys = /* @__PURE__ */ new Set();
816
+ }
817
+ return {
818
+ state: e,
819
+ $reset: n
820
+ };
821
+ })), be();
822
+ }
823
+ class j {
824
+ static resetState() {
825
+ X().$reset(), X().$dispose();
826
+ }
827
+ static buildUrl(n) {
828
+ return n && !(n.startsWith("http://") || n.startsWith("https://") || n.startsWith("//")) && (n = (N.VITE_API_URL ? N.VITE_API_URL : window.location.origin) + n), n;
829
+ }
830
+ static post(n, { dataObj: t = null, callback: l = null, failedCallback: s = null, abortController: o = null, headers: a = null, mode: u = null } = {}) {
831
+ function r() {
832
+ if (t instanceof FormData)
833
+ return t;
834
+ const d = new FormData();
835
+ for (const f in t)
836
+ if (Array.isArray(t[f]))
837
+ for (let p of t[f])
838
+ d.append(f, p);
839
+ else
840
+ d.append(f, t[f]);
841
+ return d;
842
+ }
843
+ let c = re.post(j.buildUrl(n), r(), null, a, o, u);
844
+ return c.then(function(d) {
845
+ l && l(d.data);
846
+ }).catch(function(d) {
847
+ s && s(d);
848
+ }), c;
849
+ }
850
+ static async getBatchSkeys(n = 30, t = N.VITE_DEFAULT_RENDERER || "json") {
851
+ await j.get(`/${t}/skey`, {
852
+ dataObj: { amount: n }
853
+ }).then(async (l) => {
854
+ let s = await l.json();
855
+ Array.isArray(s) || (s = [s]), X().state.sKeys = new Set(s);
856
+ });
857
+ }
858
+ static async securePost(n, {
859
+ dataObj: t = null,
860
+ callback: l = null,
861
+ failedCallback: s = null,
862
+ abortController: o = null,
863
+ renderer: a = N.VITE_DEFAULT_RENDERER || "json",
864
+ headers: u = null,
865
+ mode: r = null,
866
+ amount: c = 30
867
+ } = {}) {
868
+ let d = null;
869
+ X().state.sKeys.size === 0 && await j.getBatchSkeys(c);
870
+ const f = [...X().state.sKeys][0];
871
+ return t instanceof FormData ? (t.append("skey", f), X().state.sKeys.delete(f)) : (t || (t = {}), t.skey = f, X().state.sKeys.delete(f)), d = j.post(n, {
872
+ dataObj: t,
873
+ callback: l,
874
+ abortController: o,
875
+ headers: u,
876
+ mode: r
877
+ }), d;
878
+ }
879
+ static get(n, {
880
+ dataObj: t = null,
881
+ callback: l = null,
882
+ failedCallback: s = null,
883
+ cached: o = !1,
884
+ clearCache: a = !1,
885
+ abortController: u = null,
886
+ headers: r = null,
887
+ mode: c = null,
888
+ // milli sec min Std Tage
889
+ cacheTime: d = 1e3 * 60 * 60 * 24 * 1
890
+ } = {}) {
891
+ let f = re.get(j.buildUrl(n), t, a, r, u, c);
892
+ return f.then(function(p) {
893
+ l && l(p.data);
894
+ }).catch(function(p) {
895
+ s && s(p);
896
+ }), f;
897
+ }
898
+ static list(n, {
899
+ dataObj: t = null,
900
+ callback: l = null,
901
+ failedCallback: s = null,
902
+ group: o = null,
903
+ abortController: a = null,
904
+ renderer: u = (N == null ? void 0 : N.VITE_DEFAULT_RENDERER) || "json"
905
+ } = {}) {
906
+ let r = `/${u}/${n}/list`;
907
+ return o && (r += `/${o}`), j.get(r, {
908
+ dataObj: t,
909
+ callback: l,
910
+ failedCallback: s,
911
+ abortController: a
912
+ });
913
+ }
914
+ static getStructure(n, {
915
+ dataObj: t = null,
916
+ callback: l = null,
917
+ failedCallback: s = null,
918
+ group: o = null,
919
+ abortController: a = null,
920
+ renderer: u = (N == null ? void 0 : N.VITE_DEFAULT_RENDERER) || "json"
921
+ } = {}) {
922
+ n = n.replace(/\//g, ".");
923
+ let r = `/${u}/getStructure/${n}`;
924
+ return o && (r += `/${o}`), j.get(r, {
925
+ dataObj: t,
926
+ callback: l,
927
+ failedCallback: s,
928
+ abortController: a
929
+ });
930
+ }
931
+ static view(n, t, {
932
+ dataObj: l = null,
933
+ callback: s = null,
934
+ failedCallback: o = null,
935
+ group: a = null,
936
+ abortController: u = null,
937
+ renderer: r = (N == null ? void 0 : N.VITE_DEFAULT_RENDERER) || "json"
938
+ } = {}) {
939
+ let c = `/${r}/${n}/view/${t}`;
940
+ return a && (c = `/${r}/${n}/view/${a}/${t}`), j.get(c, {
941
+ dataObj: l,
942
+ callback: s,
943
+ failedCallback: o,
944
+ abortController: u
945
+ });
946
+ }
947
+ static add(n, {
948
+ dataObj: t = null,
949
+ callback: l = null,
950
+ failedCallback: s = null,
951
+ group: o = null,
952
+ abortController: a = null,
953
+ renderer: u = (N == null ? void 0 : N.VITE_DEFAULT_RENDERER) || "json"
954
+ } = {}) {
955
+ let r = `/${u}/${n}/add`;
956
+ return o && (r = `/${u}/${n}/add/${o}`), j.securePost(r, {
957
+ dataObj: t,
958
+ callback: l,
959
+ failedCallback: s,
960
+ abortController: a
961
+ });
962
+ }
963
+ static edit(n, t, {
964
+ dataObj: l = null,
965
+ callback: s = null,
966
+ failedCallback: o = null,
967
+ group: a = null,
968
+ abortController: u = null,
969
+ renderer: r = (N == null ? void 0 : N.VITE_DEFAULT_RENDERER) || "json"
970
+ } = {}) {
971
+ let c = `/${r}/${n}/edit/${t}`;
972
+ return a && (c = `/${r}/${n}/edit/${a}/${t}`), j.securePost(c, {
973
+ dataObj: l,
974
+ callback: s,
975
+ failedCallback: o,
976
+ abortController: u
977
+ });
978
+ }
979
+ static delete(n, t, {
980
+ dataObj: l = null,
981
+ callback: s = null,
982
+ failedCallback: o = null,
983
+ group: a = null,
984
+ abortController: u = null,
985
+ renderer: r = (N == null ? void 0 : N.VITE_DEFAULT_RENDERER) || "json"
986
+ } = {}) {
987
+ let c = `/${r}/${n}/delete/${t}`;
988
+ return a && (c = `/${r}/${n}/delete/${a}/${t}`), j.securePost(c, {
989
+ dataObj: l,
990
+ callback: s,
991
+ failedCallback: o,
992
+ abortController: u,
993
+ amount: 1
994
+ });
995
+ }
996
+ static downloadUrlFor(n, t = !1) {
997
+ return n && "dest" in n ? t && "thumbnail" in n.dest ? j.buildUrl(n.dest.thumbnail) : "downloadUrl" in n.dest ? j.buildUrl(n.dest.downloadUrl) : j.buildUrl(null) : j.buildUrl(n);
998
+ }
999
+ static uploadFile(n, t = void 0) {
1000
+ const l = {
1001
+ fileName: n.name,
1002
+ mimeType: n.type || "application/octet-stream",
1003
+ size: n.size.toString(),
1004
+ node: t
1005
+ };
1006
+ return new Promise((s, o) => {
1007
+ j.securePost("/vi/file/getUploadURL", { dataObj: l }).then(async (a) => {
1008
+ let u = await a.json();
1009
+ fetch(u.values.uploadUrl, {
1010
+ body: n,
1011
+ method: "POST",
1012
+ mode: "no-cors"
1013
+ }).then(async (r) => {
1014
+ const c = {
1015
+ key: u.values.uploadKey,
1016
+ skelType: "leaf"
1017
+ };
1018
+ j.securePost("/vi/file/add", { dataObj: c }).then(async (d) => {
1019
+ let f = await d.json();
1020
+ f.action === "addSuccess" ? s(f.values) : o(f);
1021
+ }).catch((d) => {
1022
+ o(d);
1023
+ });
1024
+ }).catch((r) => {
1025
+ o(r);
1026
+ });
1027
+ }).catch((a) => {
1028
+ o(a);
1029
+ });
1030
+ });
1031
+ }
1032
+ }
1033
+ class re {
1034
+ constructor() {
1035
+ Ce(this, "withCredentials", !0);
1036
+ }
1037
+ static buildOptions(n, t = null, l = null, s = null, o = null) {
1038
+ let a = { method: n };
1039
+ return a.credentials = "include", a.headers = {
1040
+ Accept: "application/json, text/plain, */*"
1041
+ }, l && (a.headers = { ...a.headers, ...l }), t && (a.body = t), s && (a.signal = s.signal), o && (a.mode = o), a;
1042
+ }
1043
+ static get(n, t = null, l = null, s = null, o = null, a = null) {
1044
+ function u(r, c) {
1045
+ let d = new URL(r);
1046
+ if (c && Object.keys(c).length > 0) {
1047
+ const f = new URLSearchParams();
1048
+ for (const [p, v] of Object.entries(c))
1049
+ if (Array.isArray(v))
1050
+ for (const _ of v)
1051
+ f.append(p, _);
1052
+ else
1053
+ f.append(p, v);
1054
+ d.search = f.toString();
1055
+ }
1056
+ return d.toString();
1057
+ }
1058
+ return fetch(u(n, t), re.buildOptions("GET", null, s, o, a)).then(async (r) => {
1059
+ if (r.ok)
1060
+ return r;
1061
+ {
1062
+ const c = `${r.status} ${r.statusText}: ${r.headers ? r.headers.get("x-error-descr") : ""}`;
1063
+ return Promise.reject(new ue(r.status, r.statusText, c, r));
1064
+ }
1065
+ }).catch((r) => {
1066
+ if (r instanceof TypeError) {
1067
+ const d = `503 ${r.message}: ${r.headers ? r.headers.get("x-error-descr") : ""}`;
1068
+ return Promise.reject(new ue(503, r.message, d, r));
1069
+ }
1070
+ if (r instanceof DOMException && r.name == "AbortError") {
1071
+ const d = `${r.code} ${r.name}: ${r.headers ? r.headers.get("x-error-descr") : ""}`;
1072
+ return Promise.reject(new ue(r.code, r.name, d, { url: n }));
1073
+ }
1074
+ const c = `${r.statusCode} ${r.statusText}: ${r.headers ? r.headers.get("x-error-descr") : ""}`;
1075
+ return Promise.reject(new ue(r.statusCode, r.statusText, c, r.response));
1076
+ });
1077
+ }
1078
+ static post(n, t = null, l = null, s = null, o = null, a = null) {
1079
+ return fetch(n, re.buildOptions("POST", t, s, o, a));
1080
+ }
1081
+ }
1082
+ var Dn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1083
+ const Vn = D({
1084
+ inheritAttrs: !1,
1085
+ props: {
1086
+ name: String,
1087
+ value: [Object, String, Number, Boolean, Array],
1088
+ index: Number,
1089
+ lang: String
1090
+ },
1091
+ components: { Wrapper_nested: Qe },
1092
+ emits: ["change"],
1093
+ setup(e, n) {
1094
+ const t = O("boneState"), l = O("formatString"), s = w({
1095
+ format: S(() => t == null ? void 0 : t.bonestructure.format),
1096
+ skellistdata: null,
1097
+ selection: null
1098
+ });
1099
+ function o(r) {
1100
+ let c = "";
1101
+ return t.bonestructure.type === "relational.tree.leaf.file" ? c = "skelType=leaf&" : t.bonestructure.type === "relational.tree.node.file" && (c = "skelType=node&"), j.get(
1102
+ `/${Dn.VITE_DEFAULT_RENDERER || "vi"}/${t.bonestructure.module}/list?${c}limit=99`
1103
+ ).then(async (d) => {
1104
+ var p;
1105
+ const f = await d.json();
1106
+ s.skellistdata = {};
1107
+ for (let v of f.skellist)
1108
+ s.skellistdata[v.key] = v;
1109
+ return (p = f.skellist) == null ? void 0 : p.map((v) => ({ text: l(t.bonestructure.format, { dest: v }), value: v.key, data: v }));
1110
+ });
1111
+ }
1112
+ function a(r) {
1113
+ s.selection = { dest: s.skellistdata[r.detail.item.value] }, n.emit("change", e.name, s.selection, e.lang, e.index);
1114
+ }
1115
+ function u(r) {
1116
+ var d;
1117
+ s.selection || (s.selection = {}), (d = s.selection.rel) != null && d[r.name] || (s.selection.rel ? s.selection.rel[r.name] = null : s.selection.rel = { [r.name]: null });
1118
+ let c = s.selection.rel[r.name];
1119
+ r.lang ? (c === null && (c = {}), Object.keys(c).includes(r.lang) && r.index !== null ? c[r.lang][r.index] = r.value : c[r.lang] = r.value) : r.index !== null ? (c === null && (c = []), c[r.index] = r.value) : c = r.value, Object.keys(s.selection).includes("rel") && s.selection.rel ? s.selection.rel[r.name] = c : s.selection.rel = { [r.name]: c }, Object.keys(s.selection).includes("dest") && n.emit("change", e.name, s.selection, e.lang, e.index);
1120
+ }
1121
+ return R(() => {
1122
+ s.selection = e.value, n.emit("change", e.name, e.value, e.lang, e.index);
1123
+ }), {
1124
+ state: s,
1125
+ boneState: t,
1126
+ formatString: l,
1127
+ changeEvent: a,
1128
+ changeEventNested: u,
1129
+ getList: o
1130
+ };
1131
+ }
1132
+ }), Nn = (e) => (M("data-v-61dd72e0"), e = e(), z(), e), Rn = { class: "record" }, Ln = { class: "single-entry" }, Un = ["value"], Tn = ["disabled", "source"], Pn = ["title"], Mn = /* @__PURE__ */ Nn(() => /* @__PURE__ */ i("sl-icon", {
1133
+ slot: "prefix",
1134
+ name: "x-lg"
1135
+ }, null, -1)), zn = [
1136
+ Mn
1137
+ ];
1138
+ function Wn(e, n, t, l, s, o) {
1139
+ var u, r;
1140
+ const a = se("Wrapper_nested");
1141
+ return m(), h("div", Rn, [
1142
+ i("div", Ln, [
1143
+ e.state.selection ? (m(), h("sl-input", {
1144
+ key: 0,
1145
+ disabled: !0,
1146
+ value: e.value ? e.formatString(e.state.format, e.state.selection) : ""
1147
+ }, null, 8, Un)) : (m(), h("sl-combobox", {
1148
+ key: 1,
1149
+ disabled: e.boneState.readonly,
1150
+ source: e.getList,
1151
+ hoist: "",
1152
+ onSlItemSelect: n[0] || (n[0] = (...c) => e.changeEvent && e.changeEvent(...c))
1153
+ }, null, 40, Tn)),
1154
+ !e.boneState.multiple && !e.boneState.isEmpty ? (m(), h("sl-button", {
1155
+ key: 2,
1156
+ variant: "danger",
1157
+ outline: "",
1158
+ title: e.$t("bone.del"),
1159
+ class: "delete-btn square-btn",
1160
+ onClick: n[1] || (n[1] = () => {
1161
+ e.$emit("change", e.name, "", e.lang, e.index), e.state.selection = null;
1162
+ })
1163
+ }, zn, 8, Pn)) : k("", !0)
1164
+ ]),
1165
+ (u = e.boneState) != null && u.bonestructure.using ? (m(), T(a, {
1166
+ key: 0,
1167
+ value: (r = e.value) == null ? void 0 : r.rel,
1168
+ name: e.name,
1169
+ index: e.index,
1170
+ disabled: e.boneState.bonestructure.readonly,
1171
+ onChange: e.changeEventNested
1172
+ }, null, 8, ["value", "name", "index", "disabled", "onChange"])) : k("", !0)
1173
+ ]);
1174
+ }
1175
+ const Pe = /* @__PURE__ */ I(Vn, [["render", Wn], ["__scopeId", "data-v-61dd72e0"]]), qn = D({
1176
+ inheritAttrs: !1,
1177
+ props: {
1178
+ name: String,
1179
+ value: [Object, String, Number, Boolean, Array],
1180
+ index: Number,
1181
+ lang: String,
1182
+ readonly: Boolean,
1183
+ params: Object
1184
+ },
1185
+ components: {},
1186
+ emits: ["change"],
1187
+ setup(e, n) {
1188
+ const t = O("boneState"), l = w({});
1189
+ function s(o, a) {
1190
+ n.emit("change", e.name, o, e.lang, e.index);
1191
+ }
1192
+ return R(() => {
1193
+ n.emit("change", e.name, e.value, e.lang, e.index);
1194
+ }), {
1195
+ state: l,
1196
+ boneState: t,
1197
+ changeEvent: s
1198
+ };
1199
+ }
1200
+ }), Fn = { class: "box" };
1201
+ function Kn(e, n, t, l, s, o) {
1202
+ return m(), h("div", Fn, B(e.value), 1);
1203
+ }
1204
+ const Hn = /* @__PURE__ */ I(qn, [["render", Kn], ["__scopeId", "data-v-343aca69"]]);
1205
+ var Me = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1206
+ const Gn = D({
1207
+ inheritAttrs: !1,
1208
+ props: {
1209
+ name: String,
1210
+ value: [Object, String, Number, Boolean, Array],
1211
+ index: Number,
1212
+ lang: String
1213
+ },
1214
+ components: {},
1215
+ emits: ["change"],
1216
+ setup(e, n) {
1217
+ const t = O("boneState"), l = F(), s = w({
1218
+ loading: !1,
1219
+ droparea: !1,
1220
+ previewopen: !1
1221
+ });
1222
+ R(() => {
1223
+ n.emit("change", e.name, e.value, e.lang, e.index);
1224
+ });
1225
+ function o() {
1226
+ console.log(j.downloadUrlFor(e.value)), window.open(j.downloadUrlFor(e.value));
1227
+ }
1228
+ function a() {
1229
+ return j.downloadUrlFor(e.value, !1);
1230
+ }
1231
+ function u(d) {
1232
+ const f = {
1233
+ fileName: d.name,
1234
+ mimeType: d.type || "application/octet-stream",
1235
+ size: d.size.toString()
1236
+ };
1237
+ return new Promise((p, v) => {
1238
+ j.securePost(`/${Me.VITE_DEFAULT_RENDERER || "vi"}/file/getUploadURL`, { dataObj: f }).then(async (_) => {
1239
+ let g = await _.json();
1240
+ fetch(g.values.uploadUrl, {
1241
+ body: d,
1242
+ method: "POST",
1243
+ mode: "no-cors"
1244
+ }).then(async (b) => {
1245
+ const y = {
1246
+ key: g.values.uploadKey,
1247
+ node: void 0,
1248
+ skelType: "leaf"
1249
+ };
1250
+ j.securePost(`/${Me.VITE_DEFAULT_RENDERER || "vi"}/file/add`, { dataObj: y }).then(async ($) => {
1251
+ let A = await $.json();
1252
+ A.action === "addSuccess" ? p(A.values) : v(A);
1253
+ }).catch(($) => {
1254
+ v($);
1255
+ });
1256
+ }).catch((b) => {
1257
+ v(b);
1258
+ });
1259
+ }).catch((_) => {
1260
+ v(_);
1261
+ });
1262
+ });
1263
+ }
1264
+ async function r(d) {
1265
+ s.loading = !0;
1266
+ for (let f of d.target.files) {
1267
+ let p = await u(f);
1268
+ l.value.value = null, n.emit("change", e.name, { dest: p, rel: null }, e.lang, e.index);
1269
+ }
1270
+ s.loading = !1;
1271
+ }
1272
+ async function c(d) {
1273
+ s.loading = !0, s.droparea = !1;
1274
+ for (let f of d.dataTransfer.files) {
1275
+ let p = await u(f);
1276
+ l.value.value = null, n.emit("change", e.name, { dest: p, rel: null }, e.lang, e.index);
1277
+ break;
1278
+ }
1279
+ s.loading = !1;
1280
+ }
1281
+ return {
1282
+ state: s,
1283
+ boneState: t,
1284
+ downloadFile: o,
1285
+ createBackgroundImage: a,
1286
+ handleUpload: r,
1287
+ uploadinput: l,
1288
+ handleDrop: c
1289
+ };
1290
+ }
1291
+ }), fe = (e) => (M("data-v-91086308"), e = e(), z(), e), Zn = {
1292
+ key: 0,
1293
+ class: "loader"
1294
+ }, Jn = /* @__PURE__ */ fe(() => /* @__PURE__ */ i("sl-spinner", { slot: "suffix" }, null, -1)), Qn = [
1295
+ Jn
1296
+ ], Yn = {
1297
+ key: 1,
1298
+ class: "droparea"
1299
+ }, Xn = ["title"], xn = /* @__PURE__ */ fe(() => /* @__PURE__ */ i("sl-icon", { name: "upload" }, null, -1)), ea = [
1300
+ xn
1301
+ ], ta = ["multiple"], na = ["title"], aa = /* @__PURE__ */ fe(() => /* @__PURE__ */ i("sl-icon", {
1302
+ slot: "prefix",
1303
+ name: "download"
1304
+ }, null, -1)), sa = [
1305
+ aa
1306
+ ], la = { class: "box" }, ra = ["src"], oa = ["label", "open"], ia = ["src"], ua = {
1307
+ key: 1,
1308
+ class: "preview"
1309
+ }, da = {
1310
+ key: 0,
1311
+ name: "file-earmark"
1312
+ }, ca = { key: 2 }, ma = ["title"], fa = /* @__PURE__ */ fe(() => /* @__PURE__ */ i("sl-icon", { name: "x-lg" }, null, -1)), ga = [
1313
+ fa
1314
+ ];
1315
+ function ha(e, n, t, l, s, o) {
1316
+ var a, u, r, c, d, f, p, v, _, g;
1317
+ return m(), h("div", {
1318
+ class: "file-wrapper",
1319
+ onDragover: n[5] || (n[5] = de((b) => e.state.droparea = !0, ["prevent"])),
1320
+ onDragleave: n[6] || (n[6] = (b) => e.state.droparea = !1),
1321
+ onDrop: n[7] || (n[7] = de((...b) => e.handleDrop && e.handleDrop(...b), ["prevent"]))
1322
+ }, [
1323
+ e.state.loading ? (m(), h("div", Zn, Qn)) : k("", !0),
1324
+ e.state.droparea ? (m(), h("div", Yn, " Dateien hier hinziehen ")) : k("", !0),
1325
+ !e.boneState.readonly && (!e.value || e.state.loading) ? (m(), h("sl-button", {
1326
+ key: 2,
1327
+ title: e.$t("bone.upload"),
1328
+ outline: "",
1329
+ class: "upload-btn",
1330
+ onClick: n[0] || (n[0] = (b) => e.uploadinput.click())
1331
+ }, ea, 8, Xn)) : k("", !0),
1332
+ i("input", {
1333
+ ref: "uploadinput",
1334
+ hidden: "",
1335
+ type: "file",
1336
+ multiple: e.boneState.multiple,
1337
+ onChange: n[1] || (n[1] = (...b) => e.handleUpload && e.handleUpload(...b))
1338
+ }, null, 40, ta),
1339
+ e.value ? (m(), h("sl-button", {
1340
+ key: 3,
1341
+ title: e.$t("bone.download"),
1342
+ onClick: n[2] || (n[2] = (...b) => e.downloadFile && e.downloadFile(...b))
1343
+ }, sa, 8, na)) : k("", !0),
1344
+ i("div", la, [
1345
+ (u = (a = e.value) == null ? void 0 : a.dest) != null && u.mimetype.includes("image") ? (m(), h("div", {
1346
+ key: 0,
1347
+ class: "preview has-preview",
1348
+ onClick: n[3] || (n[3] = (b) => e.state.previewopen = !e.state.previewopen)
1349
+ }, [
1350
+ i("img", {
1351
+ class: "preview-img",
1352
+ src: e.createBackgroundImage(),
1353
+ alt: ""
1354
+ }, null, 8, ra),
1355
+ i("sl-dialog", {
1356
+ label: decodeURIComponent((c = (r = e.value) == null ? void 0 : r.dest) == null ? void 0 : c.name),
1357
+ class: "preview-overlay",
1358
+ open: e.state.previewopen
1359
+ }, [
1360
+ i("img", {
1361
+ src: e.createBackgroundImage(),
1362
+ alt: ""
1363
+ }, null, 8, ia)
1364
+ ], 8, oa)
1365
+ ])) : (m(), h("div", ua, [
1366
+ (f = (d = e.value) == null ? void 0 : d.dest) != null && f.name ? (m(), h("sl-icon", da)) : k("", !0)
1367
+ ])),
1368
+ (v = (p = e.value) == null ? void 0 : p.dest) != null && v.name ? (m(), h("div", ca, B(decodeURIComponent((g = (_ = e.value) == null ? void 0 : _.dest) == null ? void 0 : g.name)), 1)) : k("", !0)
1369
+ ]),
1370
+ e.boneState.multiple ? k("", !0) : (m(), h("sl-button", {
1371
+ key: 4,
1372
+ variant: "danger",
1373
+ outline: "",
1374
+ title: e.$t("bone.del"),
1375
+ class: "delete-btn",
1376
+ onClick: n[4] || (n[4] = (b) => e.$emit("change", e.name, "", e.lang, e.index))
1377
+ }, ga, 8, ma))
1378
+ ], 32);
1379
+ }
1380
+ const ze = /* @__PURE__ */ I(Gn, [["render", ha], ["__scopeId", "data-v-91086308"]]), ba = D({
1381
+ inheritAttrs: !1,
1382
+ props: {
1383
+ name: String,
1384
+ value: [Object, String, Number, Boolean, Array],
1385
+ index: Number,
1386
+ lang: String
1387
+ },
1388
+ components: {},
1389
+ emits: ["change"],
1390
+ setup(e, n) {
1391
+ const t = O("boneState"), l = w({
1392
+ value: "",
1393
+ editorConfig: {},
1394
+ editor: S(() => ClassicEditor)
1395
+ });
1396
+ function s(u) {
1397
+ n.emit("change", e.name, l.value, e.lang, e.index);
1398
+ }
1399
+ function o(u) {
1400
+ l.value = u.target.value, n.emit("change", e.name, l.value, e.lang, e.index);
1401
+ }
1402
+ R(() => {
1403
+ e.value !== null && (l.value = e.value), n.emit("change", e.name, e.value, e.lang, e.index);
1404
+ });
1405
+ function a(u) {
1406
+ u.editing.view.change((r) => {
1407
+ r.setStyle("min-height", "250px", u.editing.view.document.getRoot());
1408
+ });
1409
+ }
1410
+ return ae(
1411
+ () => e.value,
1412
+ (u, r) => {
1413
+ l.value = u;
1414
+ }
1415
+ ), {
1416
+ state: l,
1417
+ ClassicEditor,
1418
+ boneState: t,
1419
+ changeEvent: s,
1420
+ onReady: a,
1421
+ changeEventTextarea: o
1422
+ };
1423
+ }
1424
+ }), va = ["disabled", "value"];
1425
+ function pa(e, n, t, l, s, o) {
1426
+ var u, r, c, d;
1427
+ const a = se("ckeditor");
1428
+ return e.state.editor ? (m(), h(E, { key: 0 }, [
1429
+ (u = e.boneState.bonestructure) != null && u.valid_html || (r = e.boneState.bonestructure) != null && r.validHtml ? (m(), T(a, {
1430
+ key: 0,
1431
+ modelValue: e.state.value,
1432
+ "onUpdate:modelValue": n[0] || (n[0] = (f) => e.state.value = f),
1433
+ editor: e.state.editor,
1434
+ config: e.state.editorConfig,
1435
+ disabled: (c = e.boneState) == null ? void 0 : c.readonly,
1436
+ onReady: e.onReady,
1437
+ onInput: e.changeEvent
1438
+ }, null, 8, ["modelValue", "editor", "config", "disabled", "onReady", "onInput"])) : (m(), h("sl-textarea", {
1439
+ key: 1,
1440
+ disabled: (d = e.boneState) == null ? void 0 : d.readonly,
1441
+ value: e.value,
1442
+ onInput: n[1] || (n[1] = (...f) => e.changeEventTextarea && e.changeEventTextarea(...f))
1443
+ }, null, 40, va))
1444
+ ], 64)) : k("", !0);
1445
+ }
1446
+ const We = /* @__PURE__ */ I(ba, [["render", pa]]), ya = D({
1447
+ inheritAttrs: !1,
1448
+ props: {
1449
+ name: String,
1450
+ value: [Object, String, Number, Boolean, Array],
1451
+ index: Number,
1452
+ lang: String
1453
+ },
1454
+ components: {},
1455
+ emits: ["change"],
1456
+ setup(e, n) {
1457
+ const t = O("boneState"), l = w({
1458
+ valueLat: null,
1459
+ valueLng: null
1460
+ });
1461
+ function s() {
1462
+ n.emit("change", e.name, [l.valueLat, l.valueLng], e.lang, e.index);
1463
+ }
1464
+ return R(() => {
1465
+ try {
1466
+ l.valueLat = e.value[0], l.valueLng = e.value[1];
1467
+ } catch {
1468
+ }
1469
+ n.emit("change", e.name, [l.valueLat, l.valueLng], e.lang, e.index);
1470
+ }), {
1471
+ state: l,
1472
+ boneState: t,
1473
+ changeEvent: s
1474
+ };
1475
+ }
1476
+ }), $a = ["name", "min", "max", "disabled"], Sa = ["name", "min", "max", "disabled"];
1477
+ function _a(e, n, t, l, s, o) {
1478
+ return m(), h(E, null, [
1479
+ J(i("sl-input", {
1480
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => e.state.valueLat = a),
1481
+ index: "lat",
1482
+ type: "number",
1483
+ name: e.name,
1484
+ min: e.boneState.bonestructure.boundslat[0],
1485
+ max: e.boneState.bonestructure.boundslat[1],
1486
+ disabled: e.boneState.readonly,
1487
+ "value-as-number": "",
1488
+ step: "0.000001",
1489
+ onSlChange: n[1] || (n[1] = (...a) => e.changeEvent && e.changeEvent(...a)),
1490
+ placeholder: "Lat"
1491
+ }, null, 40, $a), [
1492
+ [le, e.state.valueLat]
1493
+ ]),
1494
+ J(i("sl-input", {
1495
+ "onUpdate:modelValue": n[2] || (n[2] = (a) => e.state.valueLng = a),
1496
+ index: "lng",
1497
+ type: "number",
1498
+ name: e.name,
1499
+ min: e.boneState.bonestructure.boundslat[0],
1500
+ max: e.boneState.bonestructure.boundslat[1],
1501
+ disabled: e.boneState.readonly,
1502
+ "value-as-number": "",
1503
+ step: "0.000001",
1504
+ onSlChange: n[3] || (n[3] = (...a) => e.changeEvent && e.changeEvent(...a)),
1505
+ placeholder: "Long"
1506
+ }, null, 40, Sa), [
1507
+ [le, e.state.valueLng]
1508
+ ])
1509
+ ], 64);
1510
+ }
1511
+ const qe = /* @__PURE__ */ I(ya, [["render", _a], ["__scopeId", "data-v-7bc31020"]]), ka = D({
1512
+ props: {
1513
+ name: String,
1514
+ value: Object,
1515
+ index: Number,
1516
+ lang: String,
1517
+ readonly: Boolean,
1518
+ params: Object
1519
+ },
1520
+ components: {},
1521
+ emits: ["change"],
1522
+ setup(e, n) {
1523
+ const t = O("boneState"), l = w({
1524
+ counter: 0,
1525
+ debounce: null
1526
+ }), s = O("addMultipleEntry"), o = O("removeMultipleEntries");
1527
+ function a() {
1528
+ l.counter += 1;
1529
+ let r = 200;
1530
+ l.counter > 1 && (r = 500), l.debounce && clearTimeout(l.debounce), l.debounce = setTimeout(() => {
1531
+ for (let c = l.counter; c--; )
1532
+ s(e.lang);
1533
+ l.counter = 0;
1534
+ }, r);
1535
+ }
1536
+ function u() {
1537
+ let r = 200;
1538
+ l.debounce && clearTimeout(l.debounce), l.debounce = setTimeout(() => {
1539
+ o(e.lang);
1540
+ }, r);
1541
+ }
1542
+ return R(() => {
1543
+ (!e.value || e.value.length === 0) && n.emit("change", e.name, [], e.lang);
1544
+ }), {
1545
+ state: l,
1546
+ boneState: t,
1547
+ handleAdd: a,
1548
+ handleRemove: u,
1549
+ removeMultipleEntries: o
1550
+ };
1551
+ }
1552
+ }), Ye = (e) => (M("data-v-63e75dee"), e = e(), z(), e), wa = { class: "actionbar" }, Ea = ["title"], Aa = /* @__PURE__ */ Ye(() => /* @__PURE__ */ i("sl-icon", {
1553
+ slot: "prefix",
1554
+ name: "x-lg"
1555
+ }, null, -1)), Ia = [
1556
+ Aa
1557
+ ], Ca = ["title"], Oa = /* @__PURE__ */ Ye(() => /* @__PURE__ */ i("sl-icon", {
1558
+ slot: "prefix",
1559
+ name: "plus-lg"
1560
+ }, null, -1));
1561
+ function ja(e, n, t, l, s, o) {
1562
+ return m(), h("div", wa, [
1563
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1564
+ key: 0,
1565
+ variant: "danger",
1566
+ title: e.$t("bone.del"),
1567
+ outline: "",
1568
+ class: "delete-btn",
1569
+ onClick: n[0] || (n[0] = (a) => e.handleRemove(e.lang))
1570
+ }, Ia, 8, Ea)) : k("", !0),
1571
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1572
+ key: 1,
1573
+ variant: "success",
1574
+ title: e.$t("bone.add"),
1575
+ outline: "",
1576
+ class: "add-btn",
1577
+ onClick: n[1] || (n[1] = (a) => e.handleAdd(e.lang))
1578
+ }, [
1579
+ Oa,
1580
+ C(" " + B(e.$t("bone.add")) + " ", 1),
1581
+ e.state.counter > 1 ? (m(), h(E, { key: 0 }, [
1582
+ C("(" + B(e.state.counter) + ")", 1)
1583
+ ], 64)) : k("", !0)
1584
+ ], 8, Ca)) : k("", !0)
1585
+ ]);
1586
+ }
1587
+ const Ba = /* @__PURE__ */ I(ka, [["render", ja], ["__scopeId", "data-v-63e75dee"]]);
1588
+ var Da = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1589
+ const Va = D({
1590
+ props: {
1591
+ name: String,
1592
+ value: Object,
1593
+ index: Number,
1594
+ lang: String,
1595
+ readonly: Boolean,
1596
+ params: Object
1597
+ },
1598
+ components: {},
1599
+ emits: ["change"],
1600
+ setup(e, n) {
1601
+ const t = O("boneState"), l = O("addMultipleEntry"), s = O("formatString"), o = null, a = w({
1602
+ skels: {},
1603
+ hasUsing: S(() => t == null ? void 0 : t.bonestructure.using)
1604
+ });
1605
+ function u(r) {
1606
+ let c = "";
1607
+ return t.bonestructure.type === "relational.tree.leaf.file" ? c = "skelType=leaf&" : t.bonestructure.type === "relational.tree.node.file" && (c = "skelType=node&"), j.get(
1608
+ `/${Da.VITE_DEFAULT_RENDERER || "vi"}/${t.bonestructure.module}/list?${c}limit=99`
1609
+ ).then(async (d) => {
1610
+ var p;
1611
+ const f = await d.json();
1612
+ return a.skels = f.skellist.reduce((v, _) => (v[_.key] = _, v), {}), (p = f.skellist) == null ? void 0 : p.map((v) => ({ text: s(t.bonestructure.format, { dest: v }), value: v.key, data: v }));
1613
+ });
1614
+ }
1615
+ return R(() => {
1616
+ (!e.value || e.value.length === 0) && n.emit("change", e.name, [], e.lang);
1617
+ }), {
1618
+ state: a,
1619
+ boneState: t,
1620
+ addMultipleEntry: l,
1621
+ removeMultipleEntries: o,
1622
+ getList: u
1623
+ };
1624
+ }
1625
+ }), Xe = (e) => (M("data-v-eeea51c6"), e = e(), z(), e), Na = { class: "actionbar" }, Ra = ["title"], La = /* @__PURE__ */ Xe(() => /* @__PURE__ */ i("sl-icon", {
1626
+ slot: "prefix",
1627
+ name: "x-lg"
1628
+ }, null, -1)), Ua = [
1629
+ La
1630
+ ], Ta = ["source"], Pa = ["title"], Ma = /* @__PURE__ */ Xe(() => /* @__PURE__ */ i("sl-icon", {
1631
+ slot: "prefix",
1632
+ name: "plus-lg"
1633
+ }, null, -1));
1634
+ function za(e, n, t, l, s, o) {
1635
+ return m(), h("div", Na, [
1636
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1637
+ key: 0,
1638
+ variant: "danger",
1639
+ title: e.$t("bone.del"),
1640
+ outline: "",
1641
+ class: "delete-btn",
1642
+ onClick: n[0] || (n[0] = (a) => e.openSelector())
1643
+ }, Ua, 8, Ra)) : k("", !0),
1644
+ i("sl-combobox", {
1645
+ source: e.getList,
1646
+ hoist: "",
1647
+ onSlItemSelect: n[1] || (n[1] = (a) => {
1648
+ var u;
1649
+ return e.addMultipleEntry(e.lang, {
1650
+ dest: (u = e.state.skels) == null ? void 0 : u[a.detail.item.value],
1651
+ rel: e.state.hasUsing ? void 0 : null
1652
+ });
1653
+ })
1654
+ }, null, 40, Ta),
1655
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1656
+ key: 1,
1657
+ variant: "success",
1658
+ title: e.$t("bone.add"),
1659
+ outline: "",
1660
+ class: "add-btn",
1661
+ onClick: n[2] || (n[2] = (a) => e.addMultipleEntry(e.lang))
1662
+ }, [
1663
+ Ma,
1664
+ C(" " + B(e.$t("bone.list")), 1)
1665
+ ], 8, Pa)) : k("", !0)
1666
+ ]);
1667
+ }
1668
+ const Wa = /* @__PURE__ */ I(Va, [["render", za], ["__scopeId", "data-v-eeea51c6"]]);
1669
+ var Fe = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1670
+ const qa = D({
1671
+ props: {
1672
+ name: String,
1673
+ value: Object,
1674
+ index: Number,
1675
+ lang: String,
1676
+ readonly: Boolean,
1677
+ params: Object
1678
+ },
1679
+ components: {},
1680
+ emits: ["change"],
1681
+ setup(e, n) {
1682
+ const t = O("boneState"), l = O("addMultipleEntry");
1683
+ O("formatString");
1684
+ const s = null, o = F(), a = w({
1685
+ skels: {},
1686
+ uploadinput: null,
1687
+ loading: !1,
1688
+ droparea: !1,
1689
+ hasUsing: S(() => t == null ? void 0 : t.bonestructure.using)
1690
+ });
1691
+ function u(d) {
1692
+ const f = {
1693
+ fileName: d.name,
1694
+ mimeType: d.type || "application/octet-stream",
1695
+ size: d.size.toString()
1696
+ };
1697
+ return new Promise((p, v) => {
1698
+ j.securePost(`/${Fe.VITE_DEFAULT_RENDERER || "vi"}/file/getUploadURL`, { dataObj: f }).then(async (_) => {
1699
+ let g = await _.json();
1700
+ fetch(g.values.uploadUrl, {
1701
+ body: d,
1702
+ method: "POST",
1703
+ mode: "no-cors"
1704
+ }).then(async (b) => {
1705
+ const y = {
1706
+ key: g.values.uploadKey,
1707
+ node: void 0,
1708
+ skelType: "leaf"
1709
+ };
1710
+ j.securePost(`/${Fe.VITE_DEFAULT_RENDERER || "vi"}/file/add`, { dataObj: y }).then(async ($) => {
1711
+ let A = await $.json();
1712
+ A.action === "addSuccess" ? p(A.values) : v(A);
1713
+ }).catch(($) => {
1714
+ v($);
1715
+ });
1716
+ }).catch((b) => {
1717
+ v(b);
1718
+ });
1719
+ }).catch((_) => {
1720
+ v(_);
1721
+ });
1722
+ });
1723
+ }
1724
+ async function r(d) {
1725
+ a.loading = !0;
1726
+ for (let f of d.target.files) {
1727
+ let p = await u(f);
1728
+ o.value.value = null;
1729
+ let v = null;
1730
+ a.hasUsing && (v = void 0), l(e.lang, { dest: p, rel: v });
1731
+ }
1732
+ a.loading = !1;
1733
+ }
1734
+ async function c(d) {
1735
+ a.loading = !0, a.droparea = !1;
1736
+ for (let f of d.dataTransfer.files) {
1737
+ let p = await u(f);
1738
+ o.value.value = null;
1739
+ let v = null;
1740
+ a.hasUsing && (v = void 0), l(e.lang, { dest: p, rel: v });
1741
+ }
1742
+ a.loading = !1;
1743
+ }
1744
+ return R(() => {
1745
+ (!e.value || e.value.length === 0) && n.emit("change", e.name, [], e.lang);
1746
+ }), {
1747
+ state: a,
1748
+ boneState: t,
1749
+ addMultipleEntry: l,
1750
+ removeMultipleEntries: s,
1751
+ uploadFile: u,
1752
+ uploadinput: o,
1753
+ handleUpload: r,
1754
+ handleDrop: c
1755
+ };
1756
+ }
1757
+ }), Se = (e) => (M("data-v-9bac9f8a"), e = e(), z(), e), Fa = ["title"], Ka = /* @__PURE__ */ Se(() => /* @__PURE__ */ i("sl-icon", {
1758
+ slot: "prefix",
1759
+ name: "x-lg"
1760
+ }, null, -1)), Ha = [
1761
+ Ka
1762
+ ], Ga = {
1763
+ key: 1,
1764
+ class: "droparea"
1765
+ }, Za = ["multiple"], Ja = ["title"], Qa = /* @__PURE__ */ Se(() => /* @__PURE__ */ i("sl-icon", {
1766
+ slot: "prefix",
1767
+ name: "plus-lg"
1768
+ }, null, -1)), Ya = [
1769
+ Qa
1770
+ ], Xa = ["title"], xa = /* @__PURE__ */ Se(() => /* @__PURE__ */ i("sl-icon", { name: "upload" }, null, -1)), es = {
1771
+ key: 0,
1772
+ slot: "suffix"
1773
+ };
1774
+ function ts(e, n, t, l, s, o) {
1775
+ return m(), h("div", {
1776
+ class: "actionbar",
1777
+ onDragover: n[4] || (n[4] = de((a) => e.state.droparea = !0, ["prevent"])),
1778
+ onDragleave: n[5] || (n[5] = (a) => e.state.droparea = !1),
1779
+ onDrop: n[6] || (n[6] = de((...a) => e.handleDrop && e.handleDrop(...a), ["prevent"]))
1780
+ }, [
1781
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1782
+ key: 0,
1783
+ variant: "danger",
1784
+ title: e.$t("bone.del"),
1785
+ outline: "",
1786
+ class: "delete-btn",
1787
+ onClick: n[0] || (n[0] = (a) => e.openSelector())
1788
+ }, Ha, 8, Fa)) : k("", !0),
1789
+ e.state.droparea ? (m(), h("div", Ga, " Dateien hier hinziehen ")) : k("", !0),
1790
+ i("input", {
1791
+ ref: "uploadinput",
1792
+ hidden: "",
1793
+ type: "file",
1794
+ multiple: e.boneState.multiple,
1795
+ onChange: n[1] || (n[1] = (...a) => e.handleUpload && e.handleUpload(...a))
1796
+ }, null, 40, Za),
1797
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1798
+ key: 2,
1799
+ outline: "",
1800
+ title: e.$t("bone.list"),
1801
+ class: "add-btn",
1802
+ onClick: n[2] || (n[2] = (a) => e.addMultipleEntry(e.lang))
1803
+ }, Ya, 8, Ja)) : k("", !0),
1804
+ e.boneState.multiple && !e.readonly ? (m(), h("sl-button", {
1805
+ key: 3,
1806
+ variant: "success",
1807
+ outline: "",
1808
+ title: e.$t("bone.upload"),
1809
+ class: "upload-btn",
1810
+ onClick: n[3] || (n[3] = (a) => e.uploadinput.click())
1811
+ }, [
1812
+ xa,
1813
+ C(" " + B(e.$t("bone.upload")) + " ", 1),
1814
+ e.state.loading ? (m(), h("sl-spinner", es)) : k("", !0)
1815
+ ], 8, Xa)) : k("", !0)
1816
+ ], 32);
1817
+ }
1818
+ const ns = /* @__PURE__ */ I(qa, [["render", ts], ["__scopeId", "data-v-9bac9f8a"]]), _e = $e("boneStore", () => {
1819
+ const e = w({
1820
+ additionalBones: G({}),
1821
+ defaultBones: G({
1822
+ rawBone: pe,
1823
+ keyBone: Oe,
1824
+ stringBone: je,
1825
+ emailBone: Be,
1826
+ dateBone: De,
1827
+ booleanBone: Ne,
1828
+ selectBone: Ve,
1829
+ passwordBone: Re,
1830
+ recordBone: Le,
1831
+ numericBone: Te,
1832
+ colorBone: Ue,
1833
+ relationalBone: Pe,
1834
+ jsonBone: Hn,
1835
+ fileBone: ze,
1836
+ textBone: We,
1837
+ spatialBone: qe
1838
+ }),
1839
+ actionbars: G({
1840
+ "relational.tree.leaf.file.file": ns,
1841
+ "relational.": Wa
1842
+ }),
1843
+ multibones: G(["select", "select."])
1844
+ });
1845
+ function n(a, u) {
1846
+ e.additionalBones[a] = u;
1847
+ }
1848
+ function t() {
1849
+ let a = e.defaultBones;
1850
+ for (const [u, r] of Object.entries(e.additionalBones))
1851
+ a.add(r);
1852
+ return a;
1853
+ }
1854
+ function l(a) {
1855
+ if (Object.keys(e.additionalBones).includes(a))
1856
+ return e.additionalBones[a];
1857
+ {
1858
+ let u = a.split("."), r = Object.entries(e.additionalBones).filter(
1859
+ (c) => c[0].startsWith(u[0] + ".")
1860
+ );
1861
+ if (r.length > 0) {
1862
+ r.sort((c, d) => d.length - c.length);
1863
+ for (let c of r)
1864
+ if (a.startsWith(c[0]))
1865
+ return e.additionalBones[c[0]];
1866
+ }
1867
+ }
1868
+ return a === "date" ? De : a === "key" ? Oe : a === "str.email" ? Be : a === "str" || a.startsWith("str.") ? je : a === "select" || a.startsWith("select.") ? Ve : a === "bool" ? Ne : a === "password" ? Re : a === "record" ? Le : a === "numeric" || a.startsWith("numeric.") ? Te : a === "relational.tree.leaf.file.file" ? ze : a === "relational" || a.startsWith("relational.") ? Pe : a === "color" ? Ue : a === "text" ? We : a === "spatial" ? qe : pe;
1869
+ }
1870
+ function s(a, u) {
1871
+ e.actionbars[a] = u;
1872
+ }
1873
+ function o(a) {
1874
+ if (Object.keys(e.actionbars).includes(a))
1875
+ return e.actionbars[a];
1876
+ {
1877
+ let u = a.split("."), r = Object.entries(e.actionbars).filter(
1878
+ (c) => c[0].startsWith(u[0] + ".")
1879
+ );
1880
+ if (r.length > 0) {
1881
+ r.sort((c, d) => d.length - c.length);
1882
+ for (let c of r)
1883
+ if (a.startsWith(c[0]))
1884
+ return e.actionbars[c[0]];
1885
+ }
1886
+ }
1887
+ return Ba;
1888
+ }
1889
+ return {
1890
+ state: e,
1891
+ addBoneWidget: n,
1892
+ getBoneWidget: l,
1893
+ importWidgets: t,
1894
+ addBoneActionbar: s,
1895
+ getBoneActionbar: o
1896
+ };
1897
+ });
1898
+ function as(e) {
1899
+ return _e().getBoneActionbar(e);
1900
+ }
1901
+ function x(e) {
1902
+ return _e().getBoneWidget(e);
1903
+ }
1904
+ function ss(e) {
1905
+ const n = _e();
1906
+ if (n.state.multibones.includes(e))
1907
+ return !0;
1908
+ {
1909
+ let t = e.split("."), l = Object.entries(n.state.multibones).filter(
1910
+ (s) => s[1].startsWith(t[0] + ".")
1911
+ );
1912
+ if (l.length > 0) {
1913
+ l.sort((s, o) => o.length - s.length);
1914
+ for (let s of l)
1915
+ if (e.startsWith(s[1]))
1916
+ return !0;
1917
+ }
1918
+ }
1919
+ return !1;
1920
+ }
1921
+ D({
1922
+ inheritAttrs: !1,
1923
+ emits: ["change", "change-internal", "handleClick"],
1924
+ components: {
1925
+ wrapperMultiple: Ct,
1926
+ BoneLabel: Nt
1927
+ },
1928
+ props: {
1929
+ is: {
1930
+ type: Object,
1931
+ default: pe
1932
+ },
1933
+ name: {
1934
+ type: String,
1935
+ required: !0
1936
+ },
1937
+ languages: Array,
1938
+ multiple: Boolean,
1939
+ readonly: Boolean,
1940
+ required: Boolean,
1941
+ params: Object,
1942
+ value: [Object, String, Number, Boolean, Array],
1943
+ structure: {
1944
+ type: Object,
1945
+ required: !0
1946
+ },
1947
+ skel: {
1948
+ type: null,
1949
+ required: !0
1950
+ },
1951
+ errors: Object,
1952
+ showLabelInfo: { type: Boolean, required: !1, default: !1 },
1953
+ autofocus: { type: Boolean, required: !1, default: !1 }
1954
+ },
1955
+ setup(e, n) {
1956
+ const t = w({
1957
+ bonestructure: S(() => {
1958
+ var g;
1959
+ return (g = e.structure) == null ? void 0 : g[e.name];
1960
+ }),
1961
+ bonevalue: null,
1962
+ dragStartIndex: {
1963
+ lang: null,
1964
+ index: Number
1965
+ },
1966
+ dropIndex: {
1967
+ lang: null,
1968
+ index: Number
1969
+ },
1970
+ draggingLineBottom: {
1971
+ lang: String,
1972
+ index: Number
1973
+ },
1974
+ draggingLineTop: {
1975
+ lang: String,
1976
+ index: Number
1977
+ },
1978
+ isDragging: {
1979
+ lang: String,
1980
+ index: Number
1981
+ },
1982
+ multilanguage: S(() => {
1983
+ var g;
1984
+ return ((g = t.languages) == null ? void 0 : g.length) && t.languages.length > 0;
1985
+ }),
1986
+ languages: S(() => e.languages ? e.languages : t.bonestructure && Object.keys(t.bonestructure).includes("languages") ? t.bonestructure.languages : []),
1987
+ readonly: S(() => e.readonly ? e.readonly : t.bonestructure && Object.keys(t.bonestructure).includes("readonly") ? t.bonestructure.readonly : !1),
1988
+ required: S(() => e.required ? e.required : t.bonestructure && Object.keys(t.bonestructure).includes("required") ? t.bonestructure.required : !1),
1989
+ hasTooltip: S(() => !!(t.bonestructure && Object.keys(t.bonestructure.params).includes("tooltip"))),
1990
+ multiple: S(() => e.multiple ? e.multiple : t.bonestructure && Object.keys(t.bonestructure).includes("multiple") ? t.bonestructure.multiple : !1),
1991
+ params: S(() => e.params ? e.params : t.bonestructure && Object.keys(t.bonestructure).includes("params") ? t.bonestructure.params : {}),
1992
+ actionbar: S(() => {
1993
+ var g;
1994
+ return as((g = t.bonestructure) == null ? void 0 : g.type);
1995
+ }),
1996
+ isEmpty: S(() => {
1997
+ function g(b) {
1998
+ for (const [y, $] of Object.entries(b))
1999
+ if ($ !== null) {
2000
+ if (Array.isArray($) && $.length > 0)
2001
+ return !1;
2002
+ if (!Array.isArray($))
2003
+ return !1;
2004
+ }
2005
+ return !0;
2006
+ }
2007
+ return t.readonly ? !1 : !t.bonevalue || Array.isArray(t.bonevalue) && t.bonevalue.length === 0 ? !0 : t.bonevalue === Object(t.bonevalue) && !Array.isArray(t.bonevalue) ? g(t.bonevalue) : !1;
2008
+ }),
2009
+ errors: [],
2010
+ errorMessages: S(() => {
2011
+ let g = [];
2012
+ for (let b of e.errors)
2013
+ b.fieldPath[0] === e.name && (b.severity > 2 || t.required && (b.severity === 2 || b.severity === 0)) && g.push(b.errorMessage);
2014
+ return g;
2015
+ })
2016
+ });
2017
+ ie("boneState", t);
2018
+ function l(g, b, y) {
2019
+ a(b, g, "isDragging"), a(b, g, "dragStartIndex");
2020
+ }
2021
+ function s(g, b, y) {
2022
+ y.preventDefault();
2023
+ const $ = y.clientY - y.target.getBoundingClientRect().top, A = y.target.closest(".value-line");
2024
+ $ < A.offsetHeight / 2 ? (a(b, g, "draggingLineTop"), u("draggingLineBottom"), t.dropIndex.index = g) : (a(b, g, "draggingLineBottom"), u("draggingLineTop"), t.dropIndex.index = g + 1);
2025
+ let L = b ? t.bonevalue[b] : t.bonevalue;
2026
+ t.dropIndex.index > L.length - 1 && (t.dropIndex.index -= 1);
2027
+ }
2028
+ function o(g, b, y) {
2029
+ let $ = null;
2030
+ t.dragStartIndex.index !== t.dropIndex.index && (b ? ($ = t.bonevalue[b].splice(t.dragStartIndex.index, 1)[0], t.bonevalue[b].splice(t.dropIndex.index, 0, $)) : ($ = t.bonevalue.splice(t.dragStartIndex.index, 1)[0], t.bonevalue.splice(t.dropIndex.index, 0, $)), console.dir(t.bonevalue[0]), n.emit("change", {
2031
+ name: e.name,
2032
+ value: c(),
2033
+ lang: b,
2034
+ index: g
2035
+ })), u("draggingLineBottom", "draggingLineTop", "isDragging", "dragStartIndex", "dropIndex");
2036
+ }
2037
+ function a(g, b, y) {
2038
+ t[y].lang = g || null, t[y].index = b;
2039
+ }
2040
+ function u(...g) {
2041
+ g.forEach((b) => {
2042
+ t[b] = {
2043
+ lang: null,
2044
+ index: Number
2045
+ };
2046
+ });
2047
+ }
2048
+ function r(g, b, y = null, $ = null, A) {
2049
+ if (b === void 0 || (y ? (t.bonevalue || (t.bonevalue = {}), Object.keys(t.bonevalue).includes(y) && $ !== null ? t.bonevalue[y][$] = b : t.bonevalue[y] = b) : $ !== null ? t.bonevalue[$] = b : A === !1 || (t.bonevalue = b), t.readonly)) return !1;
2050
+ let L = {
2051
+ name: g,
2052
+ value: c(),
2053
+ lang: y,
2054
+ index: $
2055
+ }, V = {
2056
+ name: g,
2057
+ value: b,
2058
+ lang: y,
2059
+ index: $
2060
+ };
2061
+ A != null && (L.pwMatch = A, V.pwMatch = A), n.emit("change", L), n.emit("change-internal", V);
2062
+ }
2063
+ function c() {
2064
+ function g(y, $ = null) {
2065
+ let A = [];
2066
+ if (Array.isArray(y))
2067
+ if (t.bonestructure.type == "spatial" && y.length === 2 && !Array.isArray(y[0]))
2068
+ A.push({ [$ + ".lat"]: y[0] }), A.push({ [$ + ".lng"]: y[1] });
2069
+ else if (Object.values(y).filter((L) => L === Object(L)).length > 0)
2070
+ for (const [L, V] of y.entries())
2071
+ V.rel !== null ? A.push(g(V, $ + "." + L)) : A.push(g(V, $));
2072
+ else
2073
+ for (const [L, V] of y.entries())
2074
+ A.push(g(V, $));
2075
+ else if (y === Object(y))
2076
+ for (const [L, V] of Object.entries(y))
2077
+ $ ? $.endsWith(".dest") || $.endsWith(".rel") ? $.endsWith(".dest") && L === "key" ? (/\.[0-9]*\.dest$/.test($) ? A.push(g(V, $.replace(/\.[0-9]*\.dest/, ""))) : A.push(g(V, $.replace(/\.dest/, ""))), A.push(g(V, $.replace(/\.dest/, "") + "." + L))) : $.endsWith(".rel") && A.push(g(V, $.replace(/\.rel/, "") + "." + L)) : A.push(g(V, $ + "." + L)) : A.push(g(V, L));
2078
+ else
2079
+ y == null && (y = ""), $ !== null && A.push({ [$]: y });
2080
+ return A;
2081
+ }
2082
+ let b = g(t.bonevalue, e.name);
2083
+ return b = b.flat(10), b;
2084
+ }
2085
+ function d(g = null, b = "") {
2086
+ g ? Object.keys(t.bonevalue).includes(g) ? t.bonevalue[g].push(b) : t.bonevalue[g] = [b] : t.bonevalue ? t.bonevalue.push(b) : t.bonevalue = [b];
2087
+ }
2088
+ ie("addMultipleEntry", d);
2089
+ function f(g, b = null) {
2090
+ var y;
2091
+ b ? (y = t.bonevalue) == null || y[b].splice(g, 1) : t.bonevalue.splice(g, 1), n.emit("change", {
2092
+ name: e.name,
2093
+ value: c(),
2094
+ lang: b,
2095
+ index: g
2096
+ }), n.emit("change-internal", {
2097
+ name: e.name,
2098
+ value: c(),
2099
+ lang: b,
2100
+ index: g
2101
+ });
2102
+ }
2103
+ function p(g = null) {
2104
+ var b;
2105
+ g ? (b = t.bonevalue) == null || b[g].splice(0) : t.bonevalue.splice(0), n.emit("change", {
2106
+ name: e.name,
2107
+ value: c(),
2108
+ lang: g
2109
+ }), n.emit("change-internal", {
2110
+ name: e.name,
2111
+ value: c(),
2112
+ lang: g
2113
+ });
2114
+ }
2115
+ ie("removeMultipleEntries", p);
2116
+ function v(g = null, b = "") {
2117
+ d(g, b);
2118
+ }
2119
+ function _(g, b) {
2120
+ function y(V) {
2121
+ let Z = [], H = [], ne = /\$\((.*?)\)/g;
2122
+ for (; H; ) {
2123
+ if (H = ne.exec(V), !H) {
2124
+ H = !1;
2125
+ continue;
2126
+ }
2127
+ Z.push(H[1]);
2128
+ }
2129
+ return Z;
2130
+ }
2131
+ function $(V, Z) {
2132
+ let H = V.split("."), ne = V.split("."), P = Z;
2133
+ for (let Y of H)
2134
+ if (ne.shift(), P && P !== "-" && Object.keys(P).includes(Y) && P[Y])
2135
+ if (Array.isArray(P[Y])) {
2136
+ let Ie = [];
2137
+ for (let et of P[Y])
2138
+ Ie.push($(ne.join("."), et));
2139
+ P = Ie.join(", ");
2140
+ } else
2141
+ P = P[Y];
2142
+ else (!P || typeof P[Y] == "object" && !P[Y]) && (P = "-");
2143
+ return P;
2144
+ }
2145
+ let A = y(g), L = [];
2146
+ Array.isArray(b) || (b = [b]);
2147
+ for (let V of b) {
2148
+ let Z = g;
2149
+ for (let H of A) {
2150
+ let ne = $(H, V);
2151
+ Z = Z.replace("$(" + H + ")", ne);
2152
+ }
2153
+ L.push(Z);
2154
+ }
2155
+ return L.join(", ");
2156
+ }
2157
+ return ie("formatString", _), ee(() => {
2158
+ var g;
2159
+ e.value ? t.bonevalue = e.value : t.bonevalue = (g = e.skel) == null ? void 0 : g[e.name];
2160
+ }), ae(
2161
+ () => e.skel,
2162
+ (g, b) => {
2163
+ var y;
2164
+ t.bonevalue = (y = e.skel) == null ? void 0 : y[e.name];
2165
+ }
2166
+ ), ae(
2167
+ () => {
2168
+ var g;
2169
+ return (g = e.errors) == null ? void 0 : g[e.name];
2170
+ },
2171
+ (g, b) => {
2172
+ t.errors = e.errors;
2173
+ }
2174
+ ), {
2175
+ state: t,
2176
+ updateValue: r,
2177
+ addMultipleEntry: d,
2178
+ removeMultipleEntry: f,
2179
+ removeMultipleEntries: p,
2180
+ BoneHasMultipleHandling: ss,
2181
+ multipleBonePressEnter: v,
2182
+ handleDragStart: l,
2183
+ handleDragOver: s,
2184
+ handleDrop: o,
2185
+ setStateProperties: a,
2186
+ resetStateProperties: u
2187
+ };
2188
+ }
2189
+ });
2190
+ const ke = {
2191
+ props: {
2192
+ size: {
2193
+ type: String,
2194
+ default: "2"
2195
+ },
2196
+ active: {
2197
+ type: Boolean,
2198
+ default: !0
2199
+ },
2200
+ logo: {
2201
+ default: "logo-cube.svg",
2202
+ type: String
2203
+ },
2204
+ color: {
2205
+ default: "var(--sl-color-primary-500)",
2206
+ type: String
2207
+ }
2208
+ },
2209
+ setup(e, n) {
2210
+ const t = w({
2211
+ trackWidth: S(() => `${e.size / 30}rem`),
2212
+ outerSize: S(() => `calc(${e.size}rem + ${t.trackWidth})`),
2213
+ spinnerSize: S(() => `${e.size}rem`),
2214
+ logoSize: S(() => `calc(${e.size}rem - ${t.trackWidth} * 10)`),
2215
+ shadow: S(() => `0px 0px ${e.size / 6}rem 0 color-mix(in hsl, var(--sl-color-neutral-1000), 80% transparent)`)
2216
+ });
2217
+ return { state: t };
2218
+ }
2219
+ }, Ke = () => {
2220
+ ot((e) => ({
2221
+ "93747d92": e.state.outerSize,
2222
+ "284424e5": e.state.shadow,
2223
+ "6485ca5e": e.state.logoSize,
2224
+ "5d833915": e.state.spinnerSize,
2225
+ d5b3feca: e.color,
2226
+ "2050b700": e.state.trackWidth
2227
+ }));
2228
+ }, He = ke.setup;
2229
+ ke.setup = He ? (e, n) => (Ke(), He(e, n)) : Ke;
2230
+ const ls = (e) => (M("data-v-46c45785"), e = e(), z(), e), rs = {
2231
+ key: 0,
2232
+ class: "loading"
2233
+ }, os = /* @__PURE__ */ ls(() => /* @__PURE__ */ i("sl-spinner", { class: "loader" }, null, -1)), is = { class: "logo" }, us = ["src"];
2234
+ function ds(e, n, t, l, s, o) {
2235
+ return m(), T(it, null, {
2236
+ default: ut(() => [
2237
+ t.active ? (m(), h("div", rs, [
2238
+ os,
2239
+ i("div", is, [
2240
+ i("sl-icon", { src: t.logo }, null, 8, us)
2241
+ ])
2242
+ ])) : k("", !0)
2243
+ ]),
2244
+ _: 1
2245
+ });
2246
+ }
2247
+ const cs = /* @__PURE__ */ I(ke, [["render", ds], ["__scopeId", "data-v-46c45785"]]), oe = $e("cartstore", () => {
2248
+ const e = new gt({
2249
+ host_url: window.location.origin === "http://localhost:8081" ? "http://localhost:8080" : window.location.origin
2250
+ }), n = w({
2251
+ basketRootNode: {},
2252
+ whishlistRootNodes: [],
2253
+ children: {},
2254
+ structure: { address: {}, cart: {} }
2255
+ });
2256
+ async function t() {
2257
+ await s();
2258
+ }
2259
+ async function l(d) {
2260
+ return await e.cart_list({ cart_key: d });
2261
+ }
2262
+ async function s() {
2263
+ (await e.cart_list()).forEach((f) => {
2264
+ f.is_root_node && (f.cart_type === "basket" ? n.basketRootNode = f : n.whishlistRootNodes.push(f));
2265
+ });
2266
+ }
2267
+ async function o(d, f) {
2268
+ let p = await e.article_add({
2269
+ article_key: d,
2270
+ parent_cart_key: f
2271
+ });
2272
+ console.log("addToCart", p);
2273
+ }
2274
+ async function a(d, f) {
2275
+ let p = await e.article_view({
2276
+ article_key: d,
2277
+ parent_cart_key: f
2278
+ });
2279
+ console.log("getArticleView", p);
2280
+ }
2281
+ async function u(d, f) {
2282
+ let p = await e.article_remove({
2283
+ article_key: d,
2284
+ parent_cart_key: f
2285
+ });
2286
+ console.log("remove Resp", p);
2287
+ }
2288
+ async function r(d, f, p) {
2289
+ let v = await e.article_update({
2290
+ article_key: d,
2291
+ parent_cart_key: f,
2292
+ quantity: p,
2293
+ quantity_mode: "replace"
2294
+ });
2295
+ console.log("update Resp", v);
2296
+ }
2297
+ async function c() {
2298
+ let d = await e.address_structure();
2299
+ n.structure.address = d.addSkel, console.log("adress add", n.structure.address);
2300
+ }
2301
+ return {
2302
+ state: n,
2303
+ addToCart: o,
2304
+ getArticleView: a,
2305
+ removeItem: u,
2306
+ updateItem: r,
2307
+ init: t,
2308
+ getAdressStructure: c,
2309
+ getChildren: l
2310
+ };
2311
+ }), ms = {
2312
+ __name: "CartNode",
2313
+ props: {
2314
+ node: { type: Object, required: !0 }
2315
+ },
2316
+ setup(e) {
2317
+ return w({}), (n, t) => (m(), h("pre", null, B(e.node.name), 1));
2318
+ }
2319
+ }, ge = (e) => (M("data-v-4b285730"), e = e(), z(), e), fs = {
2320
+ horizontal: "",
2321
+ class: "viur-shop-cart-leaf"
2322
+ }, gs = ["src"], hs = { class: "viur-shop-cart-leaf-headline headline" }, bs = { class: "viur-shop-cart-leaf-artno" }, vs = ["innerHTML"], ps = { class: "viur-shop-cart-leaf-actions" }, ys = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("sl-button", {
2323
+ size: "small",
2324
+ outline: "",
2325
+ class: "viur-shop-cart-leaf-add-to-favourites-btn",
2326
+ variant: "primary",
2327
+ title: "Add to favourites"
2328
+ }, [
2329
+ /* @__PURE__ */ i("sl-icon", {
2330
+ name: "heart",
2331
+ slot: "prefix"
2332
+ })
2333
+ ], -1)), $s = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("sl-icon", {
2334
+ name: "trash",
2335
+ slot: "prefix"
2336
+ }, null, -1)), Ss = [
2337
+ $s
2338
+ ], _s = { class: "viur-shop-cart-leaf-quantity" }, ks = { class: "viur-shop-cart-leaf-unitprice" }, ws = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-leaf-label" }, "Stückpreis", -1)), Es = ["value"], As = { class: "viur-shop-cart-leaf-price" }, Is = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-leaf-label" }, "Gesamtpreis", -1)), Cs = ["value"], Os = {
2339
+ __name: "CartLeaf",
2340
+ props: {
2341
+ leaf: { type: Object, required: !0 },
2342
+ node: { type: Object, required: !0 }
2343
+ },
2344
+ emits: ["updateItem", "removeItem"],
2345
+ setup(e, { emit: n }) {
2346
+ const t = e, l = n, s = w({
2347
+ leaf: {}
2348
+ });
2349
+ function o(r) {
2350
+ return r !== void 0 ? ft.downloadUrlFor(r) : "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
2351
+ }
2352
+ function a(r, c, d, f) {
2353
+ l("updateItem", {
2354
+ item: r,
2355
+ articleKey: c,
2356
+ node: d,
2357
+ quantity: f
2358
+ });
2359
+ }
2360
+ function u(r, c, d) {
2361
+ l("removeItem", { item: r, articleKey: c, node: d });
2362
+ }
2363
+ return ee(() => {
2364
+ s.leaf = t.leaf;
2365
+ }), (r, c) => (m(), h("sl-card", fs, [
2366
+ i("img", {
2367
+ class: "viur-shop-cart-leaf-image",
2368
+ slot: "image",
2369
+ src: o(s.leaf.shop_image ? s.leaf.shop_image : void 0)
2370
+ }, null, 8, gs),
2371
+ i("h4", hs, B(s.leaf.shop_name), 1),
2372
+ i("h5", bs, B(s.leaf.shop_art_no_or_gtin), 1),
2373
+ i("div", {
2374
+ class: "viur-shop-cart-leaf-description",
2375
+ innerHTML: s.leaf.shop_description
2376
+ }, null, 8, vs),
2377
+ i("div", ps, [
2378
+ ys,
2379
+ i("sl-button", {
2380
+ size: "small",
2381
+ outline: "",
2382
+ class: "viur-shop-cart-leaf-delete-btn",
2383
+ variant: "primary",
2384
+ title: "Remove from cart",
2385
+ onClick: c[0] || (c[0] = (d) => u(s.leaf, s.leaf.article.dest.key, e.node))
2386
+ }, Ss)
2387
+ ]),
2388
+ i("div", _s, [
2389
+ J(i("sl-input", {
2390
+ class: "viur-shop-cart-leaf-value viur-shop-cart-leaf-value--quantity",
2391
+ type: "number",
2392
+ label: "Anzahl",
2393
+ placeholder: "Number",
2394
+ min: "0",
2395
+ "onUpdate:modelValue": c[1] || (c[1] = (d) => s.leaf.quantity = d),
2396
+ onInput: c[2] || (c[2] = (d) => a(
2397
+ s.leaf,
2398
+ s.leaf.article.dest.key,
2399
+ e.node,
2400
+ s.leaf.quantity
2401
+ ))
2402
+ }, null, 544), [
2403
+ [le, s.leaf.quantity]
2404
+ ])
2405
+ ]),
2406
+ i("div", ks, [
2407
+ ws,
2408
+ i("sl-format-number", {
2409
+ class: "viur-shop-cart-leaf-value viur-shop-cart-leaf-value--unitprice",
2410
+ lang: "de",
2411
+ type: "currency",
2412
+ currency: "EUR",
2413
+ value: s.leaf.price.retail
2414
+ }, null, 8, Es)
2415
+ ]),
2416
+ i("div", As, [
2417
+ Is,
2418
+ i("sl-format-number", {
2419
+ class: "viur-shop-cart-leaf-value viur-shop-cart-leaf-value--price",
2420
+ lang: "de",
2421
+ type: "currency",
2422
+ currency: "EUR",
2423
+ value: s.leaf.price.retail * s.leaf.quantity
2424
+ }, null, 8, Cs)
2425
+ ])
2426
+ ]));
2427
+ }
2428
+ }, js = /* @__PURE__ */ I(Os, [["__scopeId", "data-v-4b285730"]]), K = (e) => (M("data-v-2ad9f71a"), e = e(), z(), e), Bs = { key: 0 }, Ds = /* @__PURE__ */ K(() => /* @__PURE__ */ i("p", null, "Möchten Sie den Artikel wirklich aus dem Warenkorb entfernen?", -1)), Vs = {
2429
+ class: "footer-wrap",
2430
+ slot: "footer"
2431
+ }, Ns = { class: "viur-shop-cart-node" }, Rs = /* @__PURE__ */ K(() => /* @__PURE__ */ i("h2", { class: "viur-shop-cart-sidebar-headline headline" }, "Zusammenfassung", -1)), Ls = /* @__PURE__ */ K(() => /* @__PURE__ */ i("br", null, null, -1)), Us = /* @__PURE__ */ K(() => /* @__PURE__ */ i("sl-input", {
2432
+ label: "Rabattcode eingeben",
2433
+ class: "viur-shop-cart-sidebar-coupon-input"
2434
+ }, null, -1)), Ts = /* @__PURE__ */ K(() => /* @__PURE__ */ i("br", null, null, -1)), Ps = { class: "viur-shop-cart-sidebar-info-line" }, Ms = /* @__PURE__ */ K(() => /* @__PURE__ */ i("span", null, "Zwischensumme", -1)), zs = /* @__PURE__ */ K(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-sidebar-info-line" }, [
2435
+ /* @__PURE__ */ i("span", null, "Rabatt"),
2436
+ /* @__PURE__ */ C(" 0 € ")
2437
+ ], -1)), Ws = /* @__PURE__ */ K(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-sidebar-info-line" }, [
2438
+ /* @__PURE__ */ i("span", null, "Versandkosten"),
2439
+ /* @__PURE__ */ C(" 0 € ")
2440
+ ], -1)), qs = { class: "viur-shop-cart-sidebar-info-line total" }, Fs = /* @__PURE__ */ K(() => /* @__PURE__ */ i("span", null, "Gesamt:", -1)), Ks = /* @__PURE__ */ K(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-sidebar-btn-wrap" }, [
2441
+ /* @__PURE__ */ i("sl-button", {
2442
+ variant: "primary",
2443
+ size: "medium"
2444
+ }, " Jetzt Bestellen "),
2445
+ /* @__PURE__ */ i("sl-button", {
2446
+ size: "medium",
2447
+ variant: "info"
2448
+ }, [
2449
+ /* @__PURE__ */ i("sl-icon", {
2450
+ name: "paypal",
2451
+ slot: "prefix"
2452
+ }),
2453
+ /* @__PURE__ */ C(" Paypal ")
2454
+ ])
2455
+ ], -1)), Hs = /* @__PURE__ */ K(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-mobile-footer" }, [
2456
+ /* @__PURE__ */ i("sl-button", {
2457
+ variant: "primary",
2458
+ size: "medium"
2459
+ }, " Jetzt Bestellen ")
2460
+ ], -1)), Gs = {
2461
+ __name: "CartView",
2462
+ props: {
2463
+ mode: { type: String, default: "basket" },
2464
+ cartKey: { type: String, required: !0 },
2465
+ sidebar: { type: Boolean, default: !0 }
2466
+ },
2467
+ setup(e) {
2468
+ const n = e, t = oe(), l = F(null), s = w({
2469
+ itemsIsInit: S(() => !0),
2470
+ images: {},
2471
+ currentItem: {},
2472
+ currentNode: {},
2473
+ nodes: [],
2474
+ leaves: {}
2475
+ });
2476
+ S(() => n.mode === "basket" ? t.state.basket : n.cartKey);
2477
+ async function o() {
2478
+ await t.updateItem(
2479
+ s.currentItem.article.dest.key,
2480
+ s.currentNode.key,
2481
+ 0
2482
+ ), await c(), l.value.hide();
2483
+ }
2484
+ async function a(f) {
2485
+ console.log("updateItem :", f), f.quantity === 0 ? (l.value.show(), s.currentItem = f.item, s.currentNode = f.node) : (await t.updateItem(f.articleKey, f.node.key, f.quantity), await t.init());
2486
+ }
2487
+ function u(f) {
2488
+ console.log("removeItem :", f), l.value.show(), s.currentItem = f.item, s.currentNode = f.node;
2489
+ }
2490
+ async function r() {
2491
+ s.leaves[s.currentNode.key].forEach((f) => {
2492
+ f.key === s.currentItem.key && (f.quantity = 1);
2493
+ }), s.currentItem = {}, s.currentNode = {};
2494
+ }
2495
+ async function c() {
2496
+ s.nodes = [], s.leaves = {}, await t.init(), await d();
2497
+ }
2498
+ async function d(f = n.cartKey) {
2499
+ console.log("debug getChildren parentKey from comp: ", f);
2500
+ const p = await t.getChildren(f);
2501
+ console.log("getChildren children: ", p), p.forEach(async (v) => {
2502
+ v.skel_type === "node" ? (s.nodes.push(v), await d(v.key)) : (Object.keys(s.leaves).includes(f) || (s.leaves[f] = []), s.leaves[f].push(v));
2503
+ });
2504
+ }
2505
+ return ee(async () => {
2506
+ await t.init(), await d(), n.mode === "basket" && s.nodes.push(t.state.basketRootNode), console.log("state.nodes test", s.nodes), console.log("state.leaves", s.leaves);
2507
+ }), (f, p) => e.cartKey.length ? (m(), h(E, { key: 1 }, [
2508
+ i("sl-dialog", {
2509
+ ref_key: "confirm",
2510
+ ref: l,
2511
+ onSlHide: r
2512
+ }, [
2513
+ Ds,
2514
+ i("div", Vs, [
2515
+ i("sl-button", {
2516
+ variant: "danger",
2517
+ onClick: p[0] || (p[0] = (v) => l.value.hide()),
2518
+ size: "medium"
2519
+ }, " Abbrechen "),
2520
+ i("sl-button", {
2521
+ variant: "success",
2522
+ onClick: o,
2523
+ size: "medium"
2524
+ }, " Aus Warenkorb entfernen ")
2525
+ ])
2526
+ ], 544),
2527
+ (m(!0), h(E, null, U(s.nodes, (v) => (m(), h("div", Ns, [
2528
+ Object.keys(s.leaves).includes(v.key) ? (m(), h(E, { key: 0 }, [
2529
+ dt(ms, { node: v }, null, 8, ["node"]),
2530
+ (m(!0), h(E, null, U(s.leaves[v.key], (_) => (m(), T(js, {
2531
+ key: _.key,
2532
+ leaf: _,
2533
+ node: v,
2534
+ onRemoveItem: u,
2535
+ onUpdateItem: a
2536
+ }, null, 8, ["leaf", "node"]))), 128))
2537
+ ], 64)) : k("", !0)
2538
+ ]))), 256)),
2539
+ e.sidebar ? (m(), T(Ze, {
2540
+ key: 0,
2541
+ to: "#order_sidebar"
2542
+ }, [
2543
+ Rs,
2544
+ Ls,
2545
+ Us,
2546
+ Ts,
2547
+ i("div", Ps, [
2548
+ Ms,
2549
+ C(" " + B(e.mode === "basket" ? q(t).state.basketRootNode.total : q(t).state.whishlistRootNodes[e.cartKey].total) + " € ", 1)
2550
+ ]),
2551
+ zs,
2552
+ Ws,
2553
+ i("div", qs, [
2554
+ Fs,
2555
+ C(" " + B(e.mode === "basket" ? q(t).state.basketRootNode.total : q(t).state.whishlistRootNodes[e.cartKey].total) + " € ", 1)
2556
+ ]),
2557
+ Ks
2558
+ ])) : k("", !0),
2559
+ Hs
2560
+ ], 64)) : (m(), h("sl-spinner", Bs));
2561
+ }
2562
+ }, we = /* @__PURE__ */ I(Gs, [["__scopeId", "data-v-2ad9f71a"]]), Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2563
+ __proto__: null,
2564
+ default: we
2565
+ }, Symbol.toStringTag, { value: "Module" })), Q = (e) => (M("data-v-b7b745be"), e = e(), z(), e), Js = {
2566
+ key: 1,
2567
+ class: "list"
2568
+ }, Qs = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("h2", { class: "viur-shop-cart-headline headline" }, "Bestellung prüfen", -1)), Ys = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("br", null, null, -1)), Xs = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-address-wrap" }, [
2569
+ /* @__PURE__ */ i("div", { class: "viur-shop-cart-address" }, [
2570
+ /* @__PURE__ */ i("div", { class: "viur-shop-cart-address-headline" }, [
2571
+ /* @__PURE__ */ C(" Versandadresse "),
2572
+ /* @__PURE__ */ i("sl-button", {
2573
+ outline: "",
2574
+ size: "small"
2575
+ }, [
2576
+ /* @__PURE__ */ i("sl-icon", {
2577
+ name: "pencil",
2578
+ slot: "prefix"
2579
+ })
2580
+ ])
2581
+ ]),
2582
+ /* @__PURE__ */ C(" Roland Brose"),
2583
+ /* @__PURE__ */ i("br"),
2584
+ /* @__PURE__ */ C(" Speicherstraße 33"),
2585
+ /* @__PURE__ */ i("br"),
2586
+ /* @__PURE__ */ C(" 44147 Dortmund, DE"),
2587
+ /* @__PURE__ */ i("br"),
2588
+ /* @__PURE__ */ i("br"),
2589
+ /* @__PURE__ */ C(" rb@mausbrand.de"),
2590
+ /* @__PURE__ */ i("br"),
2591
+ /* @__PURE__ */ C(" 0231 21 34 68 90 ")
2592
+ ]),
2593
+ /* @__PURE__ */ i("div", { class: "viur-shop-cart-address" }, [
2594
+ /* @__PURE__ */ i("div", { class: "viur-shop-cart-address-headline" }, [
2595
+ /* @__PURE__ */ C(" Rechnungsadresse "),
2596
+ /* @__PURE__ */ i("sl-button", {
2597
+ outline: "",
2598
+ size: "small"
2599
+ }, [
2600
+ /* @__PURE__ */ i("sl-icon", {
2601
+ name: "pencil",
2602
+ slot: "prefix"
2603
+ })
2604
+ ])
2605
+ ]),
2606
+ /* @__PURE__ */ C(" Roland Brose"),
2607
+ /* @__PURE__ */ i("br"),
2608
+ /* @__PURE__ */ C(" Speicherstraße 33"),
2609
+ /* @__PURE__ */ i("br"),
2610
+ /* @__PURE__ */ C(" 44147 Dortmund, DE"),
2611
+ /* @__PURE__ */ i("br"),
2612
+ /* @__PURE__ */ i("br"),
2613
+ /* @__PURE__ */ C(" rb@mausbrand.de"),
2614
+ /* @__PURE__ */ i("br"),
2615
+ /* @__PURE__ */ C(" 0231 21 34 68 90 ")
2616
+ ])
2617
+ ], -1)), xs = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("div", { class: "viur-shop-cart-payment" }, [
2618
+ /* @__PURE__ */ i("div", { class: "viur-shop-cart-payment-method" }, [
2619
+ /* @__PURE__ */ i("span", null, "Zahlungsmethode:"),
2620
+ /* @__PURE__ */ C(" Paypal ")
2621
+ ]),
2622
+ /* @__PURE__ */ i("sl-button", {
2623
+ outline: "",
2624
+ size: "small"
2625
+ }, [
2626
+ /* @__PURE__ */ i("sl-icon", {
2627
+ name: "pencil",
2628
+ slot: "prefix"
2629
+ })
2630
+ ])
2631
+ ], -1)), el = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("h2", { class: "viur-shop-cart-headline headline" }, "Warenkorb", -1)), tl = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("br", null, null, -1)), nl = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("h2", { class: "viur-shop-cart-sidebar-headline headline" }, "Jetzt Bestellen", -1)), al = /* @__PURE__ */ Q(() => /* @__PURE__ */ i("br", null, null, -1)), sl = { class: "viur-shop-cart-sidebar-btn-wrap" }, ll = ["variant", "disabled"], rl = {
2632
+ __name: "ConfirmView",
2633
+ setup(e) {
2634
+ const n = oe(), t = w({
2635
+ cartIsInit: S(() => !0),
2636
+ itemsIsInit: S(() => {
2637
+ var s;
2638
+ return !!((s = n.state) != null && s.carts[n.state.basket].items);
2639
+ }),
2640
+ images: {},
2641
+ showOrderButton: !1
2642
+ });
2643
+ function l(s) {
2644
+ s.target.checked && (t.showOrderButton = !0), s.target.checked || (t.showOrderButton = !1);
2645
+ }
2646
+ return ee(async () => {
2647
+ await n.init();
2648
+ }), (s, o) => t.cartIsInit ? (m(), h("div", Js, [
2649
+ Qs,
2650
+ Ys,
2651
+ Xs,
2652
+ xs,
2653
+ el,
2654
+ tl,
2655
+ (m(), T(Ze, { to: "#order_sidebar" }, [
2656
+ nl,
2657
+ al,
2658
+ i("sl-checkbox", { onSlChange: l }, " Ich akzeptiere die geltenden AGBs und Datenschutzbestimmungen ", 32),
2659
+ i("div", sl, [
2660
+ i("sl-button", {
2661
+ variant: t.showOrderButton ? "info" : "disabled",
2662
+ size: "small",
2663
+ disabled: !t.showOrderButton
2664
+ }, " Zahlungspflichtig bestellen ", 8, ll)
2665
+ ])
2666
+ ]))
2667
+ ])) : (m(), T(cs, { key: 0 }));
2668
+ }
2669
+ }, Ee = /* @__PURE__ */ I(rl, [["__scopeId", "data-v-b7b745be"]]), ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2670
+ __proto__: null,
2671
+ default: Ee
2672
+ }, Symbol.toStringTag, { value: "Module" })), il = (e) => (M("data-v-0e63188d"), e = e(), z(), e), ul = { class: "bind viur-shop-wrap" }, dl = ["panel", "disabled"], cl = { class: "viur-shop-order-step" }, ml = ["name", "library"], fl = { class: "viur-shop-order-status-text" }, gl = {
2673
+ key: 0,
2674
+ name: "chevron-right",
2675
+ class: "viur-shop-order-tab-check"
2676
+ }, hl = ["name"], bl = ["onClick"], vl = ["onClick"], pl = /* @__PURE__ */ il(() => /* @__PURE__ */ i("div", { class: "viur-shop-sidebar-wrap" }, [
2677
+ /* @__PURE__ */ i("div", {
2678
+ class: "viur-shop-sidebar",
2679
+ id: "order_sidebar"
2680
+ })
2681
+ ], -1)), yl = {
2682
+ __name: "OrderView",
2683
+ props: {
2684
+ tabs: {
2685
+ type: Object,
2686
+ required: !0
2687
+ }
2688
+ },
2689
+ emits: ["tabChange"],
2690
+ setup(e, { emit: n }) {
2691
+ const t = e, l = n, s = w({
2692
+ tabNames: S(() => a(t.tabs)),
2693
+ isFirstTab: (d) => d === 0
2694
+ }), o = F(null);
2695
+ function a(d) {
2696
+ let f = [], p = [];
2697
+ for (const v in d)
2698
+ d[v].position ? f.push([v, d[v].position]) : f.push([v, 0]);
2699
+ return f.sort((v, _) => v[1] - _[1]), f.forEach((v) => {
2700
+ p.push(v[0]);
2701
+ }), p;
2702
+ }
2703
+ function u(d) {
2704
+ l("tabChange", d);
2705
+ }
2706
+ function r(d) {
2707
+ o.value.show(d);
2708
+ }
2709
+ function c(d) {
2710
+ o.value.show(d);
2711
+ }
2712
+ return (d, f) => (m(), h("div", ul, [
2713
+ i("sl-tab-group", {
2714
+ class: "viur-shop-order-tabgroup",
2715
+ noScrollControls: "",
2716
+ onSlTabShow: u,
2717
+ ref_key: "tabGroup",
2718
+ ref: o
2719
+ }, [
2720
+ (m(!0), h(E, null, U(s.tabNames, (p, v) => (m(), h("sl-tab", {
2721
+ class: "viur-shop-order-tab",
2722
+ slot: "nav",
2723
+ panel: p,
2724
+ key: p,
2725
+ disabled: e.tabs[p].disabled
2726
+ }, [
2727
+ i("div", cl, [
2728
+ i("sl-icon", {
2729
+ class: "viur-shop-order-step-icon",
2730
+ name: e.tabs[p].icon.name,
2731
+ library: e.tabs[p].icon.library
2732
+ }, null, 8, ml),
2733
+ i("div", fl, B(v + 1) + ". " + B(e.tabs[p].displayName), 1)
2734
+ ]),
2735
+ v < s.tabNames.length - 1 ? (m(), h("sl-icon", gl)) : k("", !0)
2736
+ ], 8, dl))), 128)),
2737
+ (m(!0), h(E, null, U(s.tabNames, (p, v) => (m(), h("sl-tab-panel", {
2738
+ class: "viur-shop-order-tab-panel",
2739
+ name: p,
2740
+ key: p
2741
+ }, [
2742
+ (m(), T(ct(e.tabs[p].component), mt({ ref_for: !0 }, e.tabs[p].props ? e.tabs[p].props : ""), null, 16)),
2743
+ v !== s.tabNames.length - 1 ? (m(), h("div", {
2744
+ key: 0,
2745
+ class: ye(["viur-shop-form-footer", { "flex-end": s.isFirstTab(v) }])
2746
+ }, [
2747
+ J(i("sl-button", {
2748
+ type: "submit",
2749
+ onClick: (_) => r(s.tabNames[v - 1])
2750
+ }, " Zurück ", 8, bl), [
2751
+ [ve, v !== 0]
2752
+ ]),
2753
+ i("sl-button", {
2754
+ type: "submit",
2755
+ variant: "primary",
2756
+ onClick: (_) => c(s.tabNames[v + 1])
2757
+ }, " Weiter ", 8, vl)
2758
+ ], 2)) : k("", !0)
2759
+ ], 8, hl))), 128))
2760
+ ], 544),
2761
+ pl
2762
+ ]));
2763
+ }
2764
+ }, $l = /* @__PURE__ */ I(yl, [["__scopeId", "data-v-0e63188d"]]), Sl = {}, he = (e) => (M("data-v-36ccc280"), e = e(), z(), e), _l = { class: "bind" }, kl = /* @__PURE__ */ he(() => /* @__PURE__ */ i("h1", { class: "headline" }, "Vielen Dank für Ihre Bestellung", -1)), wl = /* @__PURE__ */ he(() => /* @__PURE__ */ i("br", null, null, -1)), El = /* @__PURE__ */ he(() => /* @__PURE__ */ i("p", { class: "paragraph" }, [
2765
+ /* @__PURE__ */ i("strong", null, "Ihre Bestellnummer:"),
2766
+ /* @__PURE__ */ C(" 123345670 ")
2767
+ ], -1)), Al = /* @__PURE__ */ he(() => /* @__PURE__ */ i("p", { class: "paragraph" }, [
2768
+ /* @__PURE__ */ C(" Wir haben Ihre Bestellung erhalten und werden diese schenllstmöglich bearbeiten."),
2769
+ /* @__PURE__ */ i("br"),
2770
+ /* @__PURE__ */ C(" Sie erhalten in wenigen Minuten eine Bestätigung per E-Mail. "),
2771
+ /* @__PURE__ */ i("div", { class: "btn-wrap" }, [
2772
+ /* @__PURE__ */ i("sl-button", { size: "medium" }, " Zur Startseite "),
2773
+ /* @__PURE__ */ i("sl-button", {
2774
+ variant: "primary",
2775
+ size: "medium"
2776
+ }, " Weiter Einkaufen ")
2777
+ ])
2778
+ ], -1)), Il = [
2779
+ kl,
2780
+ wl,
2781
+ El,
2782
+ Al
2783
+ ];
2784
+ function Cl(e, n) {
2785
+ return m(), h("div", _l, Il);
2786
+ }
2787
+ const Ol = /* @__PURE__ */ I(Sl, [["render", Cl], ["__scopeId", "data-v-36ccc280"]]), Ae = (e) => (M("data-v-b68a2bfa"), e = e(), z(), e), jl = /* @__PURE__ */ Ae(() => /* @__PURE__ */ i("h2", { class: "viur-shop-form-headline headline" }, "Nutzterdaten", -1)), Bl = /* @__PURE__ */ Ae(() => /* @__PURE__ */ i("h2", { class: "viur-shop-form-headline headline" }, "Lieferadresse", -1)), Dl = { key: 0 }, Vl = /* @__PURE__ */ Ae(() => /* @__PURE__ */ i("h2", { class: "viur-shop-form-headline headline" }, "Rechnungsadresse", -1)), Nl = {
2788
+ __name: "UserInformation",
2789
+ props: {
2790
+ mode: { type: String, default: "form" },
2791
+ conditions: { type: Function }
2792
+ },
2793
+ setup(e) {
2794
+ const n = oe(), t = w({
2795
+ formValues: {},
2796
+ requiredFieldsFilled: S(() => {
2797
+ if (t.isCustomAdress)
2798
+ return Object.keys(t.formValues).includes("city") && Object.keys(t.formValues).includes("street") && Object.keys(t.formValues).includes("billing.city") && Object.keys(t.formValues).includes("billing.street") && Object.keys(t.formValues).includes("email") && Object.keys(t.formValues).includes("firstname") && Object.keys(t.formValues).includes("lastname");
2799
+ if (!t.isCustomAdress)
2800
+ return Object.keys(t.formValues).includes("city") && Object.keys(t.formValues).includes("street") && Object.keys(t.formValues).includes("email") && Object.keys(t.formValues).includes("firstname") && Object.keys(t.formValues).includes("lastname");
2801
+ }),
2802
+ isCustomAdress: !1,
2803
+ addSkel: null,
2804
+ errors: {}
2805
+ });
2806
+ function l(a) {
2807
+ a.target.checked && (t.isCustomAdress = !1), a.target.checked || (t.isCustomAdress = !0);
2808
+ }
2809
+ function s(a, u) {
2810
+ for (const [r, c] of Object.entries(u.value[0]))
2811
+ t.formValues[r] = c;
2812
+ }
2813
+ function o(a) {
2814
+ let u = {};
2815
+ return Array.isArray(a) ? (a.forEach((r) => {
2816
+ let c = r[0], d = r[1];
2817
+ u[c] = d;
2818
+ }), console.log("output", u), u) : a;
2819
+ }
2820
+ return ae(t.formValues, (a) => {
2821
+ Object.entries(a).forEach(([u, r]) => {
2822
+ r === "" && delete t.formValues[u];
2823
+ });
2824
+ }), ee(async () => {
2825
+ await n.getAdressStructure(), t.addSkel = o(n.state.structure.address);
2826
+ }), (a, u) => {
2827
+ const r = se("bone");
2828
+ return m(), h(E, null, [
2829
+ i("div", null, [
2830
+ C(" test "),
2831
+ jl,
2832
+ (m(!0), h(E, null, U(t.addSkel, (c, d) => (m(), h(E, { key: d }, [
2833
+ C(B(d) + " ", 1),
2834
+ c.visible && c.params.group === "Customer Info" ? (m(), T(r, {
2835
+ key: 0,
2836
+ is: q(x)(c.type),
2837
+ name: d,
2838
+ structure: o(t.addSkel),
2839
+ errors: t.errors[d] ? t.errors[d] : [],
2840
+ skel: t.formValues,
2841
+ onChange: (f) => s(d, f),
2842
+ class: "viur-shop-form-grid-w-2"
2843
+ }, null, 8, ["is", "name", "structure", "errors", "skel", "onChange"])) : k("", !0)
2844
+ ], 64))), 128))
2845
+ ]),
2846
+ i("div", null, [
2847
+ Bl,
2848
+ (m(!0), h(E, null, U(t.addSkel, (c, d) => (m(), h(E, { key: d }, [
2849
+ c.visible && c.params.group === "Customer Address" ? (m(), T(r, {
2850
+ key: 0,
2851
+ is: q(x)(c.type),
2852
+ name: d,
2853
+ structure: o(t.addSkel),
2854
+ errors: t.errors[d] ? t.errors[d] : [],
2855
+ skel: t.formValues,
2856
+ onChange: (f) => s(d, f)
2857
+ }, null, 8, ["is", "name", "structure", "errors", "skel", "onChange"])) : k("", !0)
2858
+ ], 64))), 128))
2859
+ ]),
2860
+ t.isCustomAdress ? (m(), h("div", Dl, [
2861
+ Vl,
2862
+ (m(!0), h(E, null, U(t.addSkel, (c, d) => (m(), h(E, { key: d }, [
2863
+ c.visible && c.params.group === "Customer Address" ? (m(), T(r, {
2864
+ key: 0,
2865
+ is: q(x)(c.type),
2866
+ name: d,
2867
+ structure: o(t.addSkel),
2868
+ errors: t.errors[d] ? t.errors[d] : [],
2869
+ skel: t.formValues,
2870
+ onChange: (f) => s(d, f)
2871
+ }, null, 8, ["is", "name", "structure", "errors", "skel", "onChange"])) : k("", !0)
2872
+ ], 64))), 128))
2873
+ ])) : k("", !0),
2874
+ i("sl-checkbox", {
2875
+ onSlChange: l,
2876
+ checked: ""
2877
+ }, " Rechnungsadresse wie Lieferadresse ", 32)
2878
+ ], 64);
2879
+ };
2880
+ }
2881
+ }, Rl = /* @__PURE__ */ I(Nl, [["__scopeId", "data-v-b68a2bfa"]]), te = (e) => (M("data-v-a4accf28"), e = e(), z(), e), Ll = /* @__PURE__ */ te(() => /* @__PURE__ */ i("h2", { class: "viur-shop-form-headline headline" }, "Nutzterdaten", -1)), Ul = /* @__PURE__ */ te(() => /* @__PURE__ */ i("h2", { class: "viur-shop-form-headline headline" }, "Lieferadresse", -1)), Tl = ["onSlChange", "onSlClear", "label"], Pl = ["value"], Ml = { key: 0 }, zl = /* @__PURE__ */ te(() => /* @__PURE__ */ i("h2", { class: "viur-shop-form-headline headline" }, "Rechnungsadresse", -1)), Wl = /* @__PURE__ */ te(() => /* @__PURE__ */ i("sl-icon", {
2882
+ name: "x-lg",
2883
+ slot: "prefix"
2884
+ }, null, -1)), ql = [
2885
+ Wl
2886
+ ], Fl = /* @__PURE__ */ te(() => /* @__PURE__ */ i("sl-icon", {
2887
+ name: "plus-lg",
2888
+ slot: "prefix"
2889
+ }, null, -1)), Kl = /* @__PURE__ */ te(() => /* @__PURE__ */ i("sl-icon", {
2890
+ slot: "icon",
2891
+ name: "exclamation-triangle"
2892
+ }, null, -1)), Hl = /* @__PURE__ */ te(() => /* @__PURE__ */ i("br", null, null, -1)), Gl = {
2893
+ __name: "UserInfoMulti",
2894
+ props: {
2895
+ mode: { type: String, default: "form" }
2896
+ },
2897
+ setup(e) {
2898
+ const n = oe(), t = w({
2899
+ formValues: {},
2900
+ requiredFieldsFilled: S(() => {
2901
+ if (t.isCustomAdress)
2902
+ return Object.keys(t.formValues).includes("city") && Object.keys(t.formValues).includes("street") && Object.keys(t.formValues).includes("billing.city") && Object.keys(t.formValues).includes("billing.street") && Object.keys(t.formValues).includes("email") && Object.keys(t.formValues).includes("firstname") && Object.keys(t.formValues).includes("lastname");
2903
+ if (!t.isCustomAdress)
2904
+ return Object.keys(t.formValues).includes("city") && Object.keys(t.formValues).includes("street") && Object.keys(t.formValues).includes("email") && Object.keys(t.formValues).includes("firstname") && Object.keys(t.formValues).includes("lastname");
2905
+ }),
2906
+ isCustomAdress: !1,
2907
+ shippingAdressAmount: 1,
2908
+ maxShippingAdress: S(
2909
+ () => Object.keys(n.state.carts).length + 2
2910
+ ),
2911
+ amountAlert: { title: "", msg: "" },
2912
+ items: null,
2913
+ addSkel: null,
2914
+ errors: {},
2915
+ selectedItem: {},
2916
+ isInit: S(() => !!n.state.carts[n.state.basket])
2917
+ }), l = F(null), s = F(null);
2918
+ function o(p) {
2919
+ p.target.checked && (t.isCustomAdress = !1), p.target.checked || (t.isCustomAdress = !0);
2920
+ }
2921
+ function a() {
2922
+ if (t.shippingAdressAmount === t.maxShippingAdress) {
2923
+ t.amountAlert.title = "Zu viele Lieferadressen", t.amountAlert.msg = `Sie können nur maximal: "${t.maxShippingAdress}" Lieferadressen verwenden.`, s.value.show();
2924
+ return;
2925
+ }
2926
+ t.shippingAdressAmount += 1;
2927
+ }
2928
+ function u(p, v) {
2929
+ for (const [_, g] of Object.entries(v.value[0]))
2930
+ t.formValues[_] = g;
2931
+ }
2932
+ function r() {
2933
+ if (t.shippingAdressAmount === 1) {
2934
+ t.amountAlert.title = "Zu wenig Lieferadressen", t.amountAlert.msg = "Mindestens eine Lieferadresse muss angegeben werden.", s.value.show();
2935
+ return;
2936
+ }
2937
+ t.shippingAdressAmount -= 1;
2938
+ }
2939
+ function c(p, v) {
2940
+ if (console.log(p.target.value), !p.target.value.length) {
2941
+ d();
2942
+ return;
2943
+ }
2944
+ t.selectedItem[v] = p.target.value, t.isItemSelected = !0;
2945
+ }
2946
+ function d(p, v) {
2947
+ console.log("clearing..."), delete t.selectedItem[v], t.isItemSelected = !1;
2948
+ }
2949
+ function f(p) {
2950
+ let v = {};
2951
+ return Array.isArray(p) ? (p.forEach((_) => {
2952
+ let g = _[0], b = _[1];
2953
+ v[g] = b;
2954
+ }), v) : p;
2955
+ }
2956
+ return ae(t.formValues, (p) => {
2957
+ Object.entries(p).forEach(([v, _]) => {
2958
+ _ === "" && delete t.formValues[v];
2959
+ });
2960
+ }), ee(async () => {
2961
+ await n.getAdressStructure(), t.addSkel = f(n.state.structure.address);
2962
+ }), (p, v) => {
2963
+ const _ = se("bone");
2964
+ return m(), h(E, null, [
2965
+ i("div", null, [
2966
+ Ll,
2967
+ (m(!0), h(E, null, U(t.addSkel, (g, b) => (m(), h(E, { key: b }, [
2968
+ g.visible && g.params.group === "Customer Info" ? (m(), T(_, {
2969
+ key: 0,
2970
+ is: q(x)(g.type),
2971
+ name: b,
2972
+ structure: f(t.addSkel),
2973
+ errors: t.errors[b] ? t.errors[b] : [],
2974
+ skel: t.formValues,
2975
+ onChange: (y) => u(b, y),
2976
+ class: "viur-shop-form-grid-w-2"
2977
+ }, null, 8, ["is", "name", "structure", "errors", "skel", "onChange"])) : k("", !0)
2978
+ ], 64))), 128))
2979
+ ]),
2980
+ Ul,
2981
+ (m(!0), h(E, null, U(t.shippingAdressAmount, (g) => (m(), h("div", { key: g }, [
2982
+ i("sl-select", {
2983
+ clearable: "",
2984
+ ref_for: !0,
2985
+ ref_key: "itemSelection",
2986
+ ref: l,
2987
+ onSlChange: (b) => c(b, g),
2988
+ onSlClear: (b) => d(b, g),
2989
+ label: t.selectedItem[g] ? q(n).state.carts[t.selectedItem[g]].info.name : "Warenkorb für Adresse wählen.",
2990
+ class: "grid-w-4"
2991
+ }, [
2992
+ (m(!0), h(E, null, U(q(n).state.carts, (b, y) => (m(), h("sl-option", { value: y }, B(b.info.name), 9, Pl))), 256))
2993
+ ], 40, Tl),
2994
+ (m(!0), h(E, null, U(t.addSkel, (b, y) => (m(), h(E, { key: y }, [
2995
+ b.visible && b.params.group === "Customer Address" ? (m(), T(_, {
2996
+ key: 0,
2997
+ is: q(x)(b.type),
2998
+ name: y,
2999
+ structure: f(t.addSkel),
3000
+ errors: t.errors[y] ? t.errors[y] : [],
3001
+ skel: t.formValues,
3002
+ onChange: ($) => u(y, $)
3003
+ }, null, 8, ["is", "name", "structure", "errors", "skel", "onChange"])) : k("", !0)
3004
+ ], 64))), 128))
3005
+ ]))), 128)),
3006
+ t.isCustomAdress ? (m(), h("div", Ml, [
3007
+ zl,
3008
+ (m(!0), h(E, null, U(t.addSkel, (g, b) => (m(), h(E, { key: b }, [
3009
+ g.visible && g.params.group === "Customer Address" ? (m(), T(_, {
3010
+ key: 0,
3011
+ is: q(x)(g.type),
3012
+ name: b,
3013
+ structure: f(t.addSkel),
3014
+ errors: t.errors[b] ? t.errors[b] : [],
3015
+ skel: t.formValues,
3016
+ onChange: (y) => u(b, y)
3017
+ }, null, 8, ["is", "name", "structure", "errors", "skel", "onChange"])) : k("", !0)
3018
+ ], 64))), 128))
3019
+ ])) : k("", !0),
3020
+ i("div", { class: "viur-shop-form-btn-wrap" }, [
3021
+ i("sl-button", {
3022
+ size: "medium",
3023
+ onClick: r,
3024
+ title: "Lieferadresse entfernen"
3025
+ }, ql),
3026
+ i("sl-button", {
3027
+ size: "medium",
3028
+ variant: "primary",
3029
+ onClick: a
3030
+ }, [
3031
+ Fl,
3032
+ C(" Lieferadresse hinzufügen ")
3033
+ ])
3034
+ ]),
3035
+ i("sl-alert", {
3036
+ variant: "warning",
3037
+ duration: "2000",
3038
+ ref_key: "shippingWarning",
3039
+ ref: s,
3040
+ closable: ""
3041
+ }, [
3042
+ Kl,
3043
+ i("strong", null, B(t.amountAlert.title), 1),
3044
+ Hl,
3045
+ C(" " + B(t.amountAlert.msg), 1)
3046
+ ], 512),
3047
+ i("sl-checkbox", {
3048
+ onSlChange: o,
3049
+ checked: ""
3050
+ }, " Rechnungsadresse wie Lieferadresse ", 32)
3051
+ ], 64);
3052
+ };
3053
+ }
3054
+ }, Zl = /* @__PURE__ */ I(Gl, [["__scopeId", "data-v-a4accf28"]]), xe = {
3055
+ __name: "ExampleUsage",
3056
+ setup(e) {
3057
+ const n = oe(), t = S(
3058
+ () => n.state.basketRootNode.key ? n.state.basketRootNode.key : ""
3059
+ ), l = w({
3060
+ rootNode: {},
3061
+ tabs: {
3062
+ cart: {
3063
+ component: G(we),
3064
+ props: {
3065
+ sidebar: !0,
3066
+ mode: "basket",
3067
+ cartKey: t
3068
+ },
3069
+ // cartKey (on initial call has to be a root node) is a required prop, make sure that cartStore.init() is called before cart is mounted
3070
+ displayName: "Warenkorb",
3071
+ icon: { name: "cart", library: "hsk" },
3072
+ position: 2,
3073
+ disabled: !1,
3074
+ atShow: null,
3075
+ atHide: null
3076
+ },
3077
+ confirm: {
3078
+ component: G(Ee),
3079
+ props: {},
3080
+ displayName: "Bestellung prüfen",
3081
+ icon: { name: "order-check", library: "hsk" },
3082
+ position: 5,
3083
+ disabled: !1,
3084
+ atShow: null,
3085
+ atHide: null
3086
+ },
3087
+ // order: {
3088
+ // component: shallowRef(CategoryView),
3089
+ // props: {
3090
+ // listHandler: ListRequest("categorystore", {
3091
+ // module: "variante",
3092
+ // params: { type: "dk", limit: 99 },
3093
+ // }),
3094
+ // },
3095
+ // displayName: "Artikel Bestellen",
3096
+ // icon: { name: "cart-add", library: "hsk" },
3097
+ // position: 1,
3098
+ // disabled: false,
3099
+ // atShow: null,
3100
+ // atHide: null,
3101
+ // },
3102
+ orderComplete: {
3103
+ component: G(Ol),
3104
+ props: {},
3105
+ displayName: "Bestellung Abgeschlossen",
3106
+ icon: { name: "order-confirmed", library: "hsk" },
3107
+ position: 6,
3108
+ disabled: !0,
3109
+ atShow: null,
3110
+ atHide: null
3111
+ },
3112
+ userInfo: {
3113
+ component: G(Rl),
3114
+ props: {},
3115
+ displayName: "Daten Eingeben",
3116
+ icon: { name: "user", library: "hsk" },
3117
+ position: 3,
3118
+ disabled: !1,
3119
+ atShow: null,
3120
+ atHide: null
3121
+ },
3122
+ userInfoMulti: {
3123
+ component: G(Zl),
3124
+ props: {},
3125
+ displayName: "Daten Eingeben (Multi)",
3126
+ icon: { name: "user", library: "hsk" },
3127
+ position: 4,
3128
+ disabled: !1,
3129
+ atShow: null,
3130
+ atHide: null
3131
+ }
3132
+ }
3133
+ });
3134
+ function s(o) {
3135
+ (o == null ? void 0 : o.detail.name) === "confirm" && (l.tabs.orderComplete.disabled = !1);
3136
+ }
3137
+ return ee(async () => {
3138
+ await n.init(), await n.getAdressStructure(), console.log("debug init exampleusage :", n.state.basketRootNode);
3139
+ }), (o, a) => (m(), T($l, {
3140
+ tabs: l.tabs,
3141
+ onTabChange: s
3142
+ }, null, 8, ["tabs"]));
3143
+ }
3144
+ }, Jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3145
+ __proto__: null,
3146
+ default: xe
3147
+ }, Symbol.toStringTag, { value: "Module" })), Ql = D({
3148
+ props: {},
3149
+ components: {},
3150
+ setup(e, n) {
3151
+ const t = ht();
3152
+ return { state: w({}), route: t };
3153
+ }
3154
+ }), Yl = { class: "home" };
3155
+ function Xl(e, n, t, l, s, o) {
3156
+ return m(), h("div", Yl, "View " + B(e.route.path) + " is missing.", 1);
3157
+ }
3158
+ const xl = /* @__PURE__ */ I(Ql, [["render", Xl]]), er = [
3159
+ {
3160
+ path: "/:pathMatch(.*)*",
3161
+ name: "view_missing",
3162
+ component: xl
3163
+ },
3164
+ {
3165
+ path: "/shop/category/:identifier",
3166
+ name: "CategoryView",
3167
+ component: () => import("./CategoryView-DpxefLik.mjs")
3168
+ },
3169
+ {
3170
+ path: "/shop/item/:item",
3171
+ name: "itemView",
3172
+ component: () => import("./ItemView-BsVTaCcL.mjs")
3173
+ },
3174
+ {
3175
+ path: "/shop/cart/view",
3176
+ name: "CartView",
3177
+ component: () => Promise.resolve().then(() => Zs)
3178
+ },
3179
+ {
3180
+ path: "/shop/order/",
3181
+ name: "OrderView",
3182
+ component: () => Promise.resolve().then(() => Jl)
3183
+ },
3184
+ {
3185
+ path: "/shop/order/confirm",
3186
+ name: "ConfirmView",
3187
+ component: () => Promise.resolve().then(() => ol)
3188
+ }
3189
+ ];
3190
+ function or(e, n = !1) {
3191
+ let t = [];
3192
+ return n ? t = e : t = e.concat(er), bt({
3193
+ // @ts-ignore
3194
+ history: vt("/"),
3195
+ routes: t
3196
+ });
3197
+ }
3198
+ const ir = {
3199
+ install(e) {
3200
+ e.component("CartView", we), e.component("ExampleUsage", xe), e.component("ConfirmView", Ee);
3201
+ }
3202
+ };
3203
+ export {
3204
+ we as C,
3205
+ ir as V,
3206
+ I as _,
3207
+ xe as a,
3208
+ Ee as b,
3209
+ or as c,
3210
+ oe as u
3211
+ };