@boobooking/dashboard-ui-components 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -105,15 +105,15 @@ var re = {
105
105
  };
106
106
  //#endregion
107
107
  //#region src/windows.js
108
- function ie(e, t) {
108
+ function T(e, t) {
109
109
  if (e == null || e === "") return null;
110
110
  let n = new URL(String(e), t);
111
111
  return n.pathname + n.search;
112
112
  }
113
- function ae(e) {
113
+ function ie(e) {
114
114
  return e === null ? null : e.split("?")[0];
115
115
  }
116
- function oe() {
116
+ function ae() {
117
117
  return {
118
118
  windows: [],
119
119
  cards: /* @__PURE__ */ new Map(),
@@ -127,36 +127,36 @@ function oe() {
127
127
  nextId: 1
128
128
  };
129
129
  }
130
- function T(e, t) {
130
+ function E(e, t) {
131
131
  return e.windows.includes(t);
132
132
  }
133
- function se(e) {
133
+ function oe(e) {
134
134
  return e.returnAddress ?? e.fallbackAddress;
135
135
  }
136
- function ce(e) {
136
+ function se(e) {
137
137
  let t = null;
138
138
  for (let n of e.cards.values()) t = n.window;
139
139
  return t;
140
140
  }
141
- function E(e, t) {
141
+ function D(e, t) {
142
142
  let n = t;
143
- for (; n !== null && !T(e, n);) n = n.parent;
143
+ for (; n !== null && !E(e, n);) n = n.parent;
144
144
  return n;
145
145
  }
146
- function le(e, t) {
146
+ function ce(e, t) {
147
147
  return e.transition = {
148
148
  number: e.transition.number + 1,
149
149
  fromAddress: e.shown,
150
- fromWindow: ce(e),
150
+ fromWindow: se(e),
151
151
  assigned: /* @__PURE__ */ new Map()
152
152
  }, e.shown = t, e.transition.number;
153
153
  }
154
- function ue(e, t, n) {
154
+ function le(e, t, n) {
155
155
  let r = e.transition, i = r.assigned.get(t);
156
- if (i !== void 0 && T(e, i)) return i;
156
+ if (i !== void 0 && E(e, i)) return i;
157
157
  let a = r.fromWindow, o = r.fromAddress;
158
- a !== null && !T(e, a) && (a = E(e, a), o = null), a !== null && se(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : E(e, a.parent), o = null);
159
- for (let n = a; n !== null; n = n.parent) if (n.key === t && T(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
158
+ a !== null && !E(e, a) && (a = D(e, a), o = null), a !== null && oe(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : D(e, a.parent), o = null);
159
+ for (let n = a; n !== null; n = n.parent) if (n.key === t && E(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
160
160
  a === null ? e.windows = [] : e.windows.splice(e.windows.indexOf(a) + 1);
161
161
  let s = {
162
162
  id: e.nextId,
@@ -167,18 +167,18 @@ function ue(e, t, n) {
167
167
  };
168
168
  return e.nextId += 1, e.windows.push(s), s;
169
169
  }
170
- function D(e, t, n, r) {
171
- let i = ue(e, n, r);
170
+ function O(e, t, n, r) {
171
+ let i = le(e, n, r);
172
172
  return i.fallbackAddress = r, e.transition.assigned.set(n, i), e.cards.delete(t), e.cards.set(t, {
173
173
  key: n,
174
174
  window: i,
175
175
  processed: e.transition.number
176
176
  }), i;
177
177
  }
178
- function de(e, t, n, r) {
178
+ function ue(e, t, n, r) {
179
179
  let i = e.cards.get(t);
180
180
  return i === void 0 ? {
181
- window: D(e, t, n, r),
181
+ window: O(e, t, n, r),
182
182
  rejected: !1,
183
183
  key: n
184
184
  } : i.key === n ? (i.processed = e.transition.number, {
@@ -190,37 +190,37 @@ function de(e, t, n, r) {
190
190
  rejected: !0,
191
191
  key: i.key
192
192
  } : (e.cards.delete(t), {
193
- window: D(e, t, n, r),
193
+ window: O(e, t, n, r),
194
194
  rejected: !1,
195
195
  key: n
196
196
  });
197
197
  }
198
- function fe(e, t) {
198
+ function de(e, t) {
199
199
  e.cards.delete(t);
200
200
  }
201
- function pe(e, t, n) {
201
+ function fe(e, t, n) {
202
202
  let r = e.cards.get(t);
203
203
  r !== void 0 && (r.window.fallbackAddress = n);
204
204
  }
205
205
  //#endregion
206
206
  //#region src/plugin.js
207
- var O = Symbol("dashboardUi"), me = Object.freeze({
207
+ var k = Symbol("dashboardUi"), pe = Object.freeze({
208
208
  lang: "ru",
209
209
  navigate: null,
210
210
  windows: null
211
- }), k = { uiSettings: {
212
- from: O,
213
- default: () => me
211
+ }), A = { uiSettings: {
212
+ from: k,
213
+ default: () => pe
214
214
  } };
215
- function he(e, t) {
216
- let n = oe(), r = h({
215
+ function me(e, t) {
216
+ let n = ae(), r = h({
217
217
  number: 0,
218
218
  address: null
219
219
  }), i = c(!0);
220
220
  return i.run(() => {
221
221
  ee(t, (e) => {
222
- let t = ie(e, window.location.origin);
223
- t !== null && t !== r.address && (r.number = le(n, t), r.address = t);
222
+ let t = T(e, window.location.origin);
223
+ t !== null && t !== r.address && (r.number = ce(n, t), r.address = t);
224
224
  }, {
225
225
  flush: "sync",
226
226
  immediate: !0
@@ -230,119 +230,24 @@ function he(e, t) {
230
230
  page: r
231
231
  };
232
232
  }
233
- var ge = { install(e, t) {
233
+ var he = { install(e, t) {
234
234
  let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
235
235
  if (!w(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${C.join(", ")}`);
236
236
  let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
237
237
  if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
238
238
  let o = Object.hasOwn(n, "currentUrl"), s = o ? n.currentUrl : null;
239
239
  if (o && typeof s != "function") throw Error("dashboardUi: currentUrl должен быть функцией () => адрес страницы");
240
- let c = s !== null && typeof window < "u" ? he(e, s) : null;
241
- e.provide(O, Object.freeze({
240
+ let c = s !== null && typeof window < "u" ? me(e, s) : null;
241
+ e.provide(k, Object.freeze({
242
242
  lang: r,
243
243
  navigate: a,
244
244
  windows: c
245
245
  }));
246
- } }, A = (e, t) => {
246
+ } }, j = (e, t) => {
247
247
  let n = e.__vccOpts || e;
248
248
  for (let [e, r] of t) n[e] = r;
249
249
  return n;
250
- }, _e = {
251
- props: {
252
- isOpen: {
253
- type: Boolean,
254
- default: !1
255
- },
256
- isTransparent: {
257
- type: Boolean,
258
- default: !0
259
- }
260
- },
261
- emits: ["update:isOpen", "escaped"],
262
- methods: {
263
- closeOverlay() {
264
- this.$emit("update:isOpen", !1), this.$emit("escaped");
265
- },
266
- handleEscape(e) {
267
- this.isOpen && (e.key === "Esc" || e.key === "Escape") && this.closeOverlay();
268
- }
269
- },
270
- mounted() {
271
- document.addEventListener("keydown", this.handleEscape, !0);
272
- },
273
- beforeUnmount() {
274
- document.removeEventListener("keydown", this.handleEscape, !0);
275
- }
276
- };
277
- function ve(e, t, n, r, a, o) {
278
- return x((d(), i("button", {
279
- tabindex: "-1",
280
- onClick: t[0] ||= S((...e) => o.closeOverlay && o.closeOverlay(...e), ["prevent"]),
281
- class: u(["bb:fixed bb:inset-0 bb:w-full bb:h-full bb:cursor-default bb:flex bb:items-start", {
282
- "bb:z-20": n.isOpen,
283
- "bb:bg-transparent": n.isTransparent,
284
- "bb:bg-gray-900 bb:opacity-75": !n.isTransparent
285
- }])
286
- }, null, 2)), [[y, n.isOpen]]);
287
- }
288
- //#endregion
289
- //#region src/components/Popup.vue
290
- var ye = {
291
- components: { Overlay: /* @__PURE__ */ A(_e, [["render", ve]]) },
292
- inheritAttrs: !1,
293
- emits: ["update:modelValue"],
294
- props: {
295
- modelValue: {
296
- type: Boolean,
297
- default: !1
298
- },
299
- align: {
300
- type: String,
301
- default: "left",
302
- validator: (e) => ["left", "right"].indexOf(e) !== -1
303
- }
304
- },
305
- data() {
306
- return { overlayIsOpen: this.modelValue };
307
- },
308
- watch: {
309
- modelValue: function(e) {
310
- this.overlayIsOpen = e;
311
- },
312
- overlayIsOpen(e) {
313
- this.$emit("update:modelValue", e);
314
- }
315
- },
316
- computed: {
317
- alignLeft() {
318
- return this.align === "left";
319
- },
320
- alignRight() {
321
- return this.align === "right";
322
- }
323
- }
324
- }, be = { class: "bb-dashboard-ui bb:relative" };
325
- function xe(e, n, r, o, c, u) {
326
- let f = m("overlay");
327
- return d(), i("div", be, [s(f, {
328
- "is-open": c.overlayIsOpen,
329
- "onUpdate:isOpen": n[0] ||= (e) => c.overlayIsOpen = e
330
- }, null, 8, ["is-open"]), s(t, {
331
- "enter-active-class": "bb:transition bb:ease-out bb:duration-100",
332
- "enter-from-class": "bb:opacity-0 bb:scale-95",
333
- "enter-to-class": "bb:opacity-100 bb:scale-100",
334
- "leave-active-class": "bb:transition bb:ease-in bb:duration-75",
335
- "leave-from-class": "bb:opacity-100 bb:scale-100",
336
- "leave-to-class": "bb:opacity-0 bb:scale-95"
337
- }, {
338
- default: b(() => [x(a("div", l(e.$attrs, { class: ["bb:absolute bb:z-20", {
339
- "bb:left-0": u.alignLeft,
340
- "bb:right-0": u.alignRight
341
- }] }), [p(e.$slots, "default")], 16), [[y, r.modelValue]])]),
342
- _: 3
343
- })]);
344
- }
345
- var j = /*#__PURE__*/ A(ye, [["render", xe]]), Se = {
250
+ }, ge = {
346
251
  props: {
347
252
  withPulse: {
348
253
  type: Boolean,
@@ -363,7 +268,7 @@ var j = /*#__PURE__*/ A(ye, [["render", xe]]), Se = {
363
268
  }
364
269
  }
365
270
  };
366
- function Ce(e, t, n, r, o, s) {
271
+ function _e(e, t, n, r, o, s) {
367
272
  return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", {
368
273
  "bb:text-red-500": s.isRed,
369
274
  "bb:text-green-500": s.isGreen,
@@ -377,169 +282,8 @@ function Ce(e, t, n, r, o, s) {
377
282
  r: "45"
378
283
  })], -1)]], 2);
379
284
  }
380
- var M = /*#__PURE__*/ A(Se, [["render", Ce]]), we = {}, Te = {
381
- type: "button",
382
- tabindex: "-1",
383
- class: "bb:absolute bb:right-0 bb:top-0 bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-300 bb:hover:text-gray-400 bb:focus:outline-hidden"
384
- };
385
- function Ee(e, t, n, r, o, s) {
386
- return d(), i("button", Te, [...t[0] ||= [a("svg", {
387
- class: "bb:w-6 bb:h-6 bb:stroke-current",
388
- fill: "none",
389
- viewBox: "0 0 24 24"
390
- }, [a("path", {
391
- "stroke-linecap": "round",
392
- "stroke-linejoin": "round",
393
- "stroke-width": "2",
394
- d: "M6 18L18 6M6 6l12 12"
395
- })], -1)]]);
396
- }
397
- var N = /*#__PURE__*/ A(we, [["render", Ee]]);
398
- //#endregion
399
- //#region src/date.js
400
- function P(e) {
401
- return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
402
- }
403
- function F(e) {
404
- let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
405
- if (t === null) return null;
406
- let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
407
- return a.setFullYear(i, r - 1, n), a.setHours(0, 0, 0, 0), a.getDate() !== n || a.getMonth() !== r - 1 || a.getFullYear() !== i ? null : a;
408
- }
409
- //#endregion
410
- //#region src/lang.js
411
- var I = {
412
- inject: k,
413
- props: { lang: {
414
- type: String,
415
- default: null,
416
- validator: (e) => e === null || w(e)
417
- } },
418
- computed: {
419
- resolvedLang() {
420
- return w(this.lang) ? this.lang : this.uiSettings.lang;
421
- },
422
- texts() {
423
- return re[this.resolvedLang];
424
- }
425
- }
426
- }, De = {
427
- components: {
428
- Popup: j,
429
- Eraser: N
430
- },
431
- mixins: [I],
432
- emits: ["update:modelValue", "changed"],
433
- props: {
434
- modelValue: {
435
- type: String,
436
- default: ""
437
- },
438
- withEraser: {
439
- type: Boolean,
440
- default: !0
441
- },
442
- placeholderText: {
443
- type: String,
444
- default: ""
445
- }
446
- },
447
- created() {
448
- this.picker = null, this.isUnmounted = !1;
449
- },
450
- async mounted() {
451
- let { default: e } = await import("pikaday");
452
- this.isUnmounted || (this.picker = new e({
453
- field: this.$refs.field,
454
- container: this.$refs.container,
455
- keyboardInput: !1,
456
- bound: !1,
457
- firstDay: 1,
458
- parse: (e) => F(e),
459
- toString: (e) => P(e),
460
- i18n: {
461
- previousMonth: this.texts.previousMonth,
462
- nextMonth: this.texts.nextMonth,
463
- months: this.texts.months,
464
- weekdays: this.texts.weekdays,
465
- weekdaysShort: this.texts.weekdaysShort
466
- },
467
- onSelect: (e) => {
468
- this.popupIsOpen = !1, this.$emit("update:modelValue", P(e)), this.$emit("changed");
469
- }
470
- }));
471
- },
472
- beforeUnmount() {
473
- this.isUnmounted = !0, this.picker?.destroy();
474
- },
475
- data() {
476
- return {
477
- popupIsOpen: !1,
478
- dayValue: this.modelValue ?? ""
479
- };
480
- },
481
- watch: { modelValue(e) {
482
- let t = e ?? "";
483
- this.dayValue = t, this.syncPicker(t);
484
- } },
485
- methods: {
486
- syncPicker(e) {
487
- if (this.picker === null) return;
488
- let t = F(e);
489
- if (t === null) {
490
- this.picker.clear();
491
- return;
492
- }
493
- this.picker.setDate(t, !0);
494
- },
495
- clearPicker() {
496
- this.$emit("update:modelValue", ""), this.dayValue = "", this.picker?.clear(), this.$emit("changed");
497
- }
498
- },
499
- computed: {
500
- hasValue() {
501
- return (this.modelValue ?? "").length > 0;
502
- },
503
- needsEraser() {
504
- return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
505
- }
506
- }
507
- }, Oe = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, ke = { class: "bb:relative bb:flex bb:h-full bb:cursor-pointer bb:leading-none" }, Ae = { class: "bb:min-w-24 bb:w-full bb:h-full" }, je = [
508
- "disabled",
509
- "value",
510
- "placeholder"
511
- ], Me = {
512
- ref: "container",
513
- class: "bb:flex bb:mt-1 bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg"
514
- };
515
- function Ne(e, t, o, c, l, f) {
516
- let p = m("eraser"), h = m("popup");
517
- return d(), i("div", Oe, [a("div", ke, [a("button", {
518
- ref: "trigger",
519
- type: "button",
520
- class: u(["bb:flex bb:w-full bb:items-center bb:focus:outline-hidden", { "bb:z-20": l.popupIsOpen }]),
521
- onClick: t[0] ||= (e) => l.popupIsOpen = !l.popupIsOpen
522
- }, [a("label", Ae, [a("input", {
523
- disabled: l.popupIsOpen,
524
- ref: "field",
525
- type: "text",
526
- value: l.dayValue,
527
- placeholder: o.placeholderText,
528
- class: "bb:w-full bb:h-full bb:py-2 bb:pr-3 bb:leading-none bb:border bb:border-transparent bb:whitespace-nowrap bb:bg-transparent bb:placeholder:text-sm bb:placeholder-gray-300 bb:cursor-pointer bb:focus:outline-hidden"
529
- }, null, 8, je)])], 2), f.needsEraser ? (d(), n(p, {
530
- key: 0,
531
- onClick: f.clearPicker,
532
- class: "bb:z-10 bb:h-full bb:pr-2"
533
- }, null, 8, ["onClick"])) : r("", !0)]), s(h, {
534
- modelValue: l.popupIsOpen,
535
- "onUpdate:modelValue": t[1] ||= (e) => l.popupIsOpen = e
536
- }, {
537
- default: b(() => [a("div", Me, null, 512)]),
538
- _: 1
539
- }, 8, ["modelValue"])]);
540
- }
541
- var L = /*#__PURE__*/ A(De, [["render", Ne]]), Pe = {
542
- components: { Dot: M },
285
+ var ve = /*#__PURE__*/ j(ge, [["render", _e]]), ye = {
286
+ components: { Dot: ve },
543
287
  props: {
544
288
  text: {
545
289
  type: String,
@@ -554,14 +298,14 @@ var L = /*#__PURE__*/ A(De, [["render", Ne]]), Pe = {
554
298
  default: !1
555
299
  }
556
300
  }
557
- }, Fe = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, Ie = ["textContent"];
558
- function Le(e, t, n, r, o, c) {
301
+ }, be = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, xe = ["textContent"];
302
+ function Se(e, t, n, r, o, c) {
559
303
  let l = m("dot");
560
- return d(), i("div", Fe, [
304
+ return d(), i("div", be, [
561
305
  a("div", {
562
306
  class: "bb:flex bb:flex-1 bb:h-full bb:items-center bb:text-xs bb:text-gray-500 bb:whitespace-nowrap bb:truncate bb:leading-tight bb:select-none",
563
307
  textContent: g(n.text)
564
- }, null, 8, Ie),
308
+ }, null, 8, xe),
565
309
  x(s(l, {
566
310
  color: "red",
567
311
  "with-pulse": !0,
@@ -573,23 +317,40 @@ function Le(e, t, n, r, o, c) {
573
317
  }, null, 512), [[y, n.isRequired]])
574
318
  ]);
575
319
  }
576
- var R = /*#__PURE__*/ A(Pe, [["render", Le]]), Re = 10;
577
- function ze(e) {
320
+ var M = /*#__PURE__*/ j(ye, [["render", Se]]), Ce = {}, we = {
321
+ type: "button",
322
+ tabindex: "-1",
323
+ class: "bb:absolute bb:right-0 bb:top-0 bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-300 bb:hover:text-gray-400 bb:focus:outline-hidden"
324
+ };
325
+ function Te(e, t, n, r, o, s) {
326
+ return d(), i("button", we, [...t[0] ||= [a("svg", {
327
+ class: "bb:w-6 bb:h-6 bb:stroke-current",
328
+ fill: "none",
329
+ viewBox: "0 0 24 24"
330
+ }, [a("path", {
331
+ "stroke-linecap": "round",
332
+ "stroke-linejoin": "round",
333
+ "stroke-width": "2",
334
+ d: "M6 18L18 6M6 6l12 12"
335
+ })], -1)]]);
336
+ }
337
+ var N = /*#__PURE__*/ j(Ce, [["render", Te]]), Ee = 10;
338
+ function De(e) {
578
339
  let t = e.replace(/\D/g, "");
579
- return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Re);
340
+ return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Ee);
580
341
  }
581
- function z(e) {
342
+ function P(e) {
582
343
  return e === "" ? "" : `7${e}`;
583
344
  }
584
- function B(e) {
345
+ function F(e) {
585
346
  let t = e ?? "", n = t.startsWith("+") ? t.slice(1) : t;
586
347
  return n.startsWith("7") ? n.slice(1) : n;
587
348
  }
588
349
  //#endregion
589
350
  //#region src/components/RussianMobileFilter.vue
590
- var Be = 400, Ve = 3, He = {
351
+ var Oe = 400, ke = 3, Ae = {
591
352
  components: {
592
- ElementHeader: R,
353
+ ElementHeader: M,
593
354
  Eraser: N
594
355
  },
595
356
  emits: ["update:modelValue", "changed"],
@@ -612,10 +373,10 @@ var Be = 400, Ve = 3, He = {
612
373
  }
613
374
  },
614
375
  data() {
615
- return { digits: B(this.modelValue) };
376
+ return { digits: F(this.modelValue) };
616
377
  },
617
378
  created() {
618
- this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = B(this.modelValue), this.isUnmounted = !1;
379
+ this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = F(this.modelValue), this.isUnmounted = !1;
619
380
  },
620
381
  mounted() {
621
382
  this.mask = ne(this.$refs.input, {
@@ -623,21 +384,21 @@ var Be = 400, Ve = 3, He = {
623
384
  lazy: !0,
624
385
  prepare: (e, t) => t.unmaskedValue === "" && (e === "7" || e === "8") ? "" : e
625
386
  }), this.mask.on("accept", () => {
626
- this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", z(this.digits)), this.scheduleCommit());
387
+ this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", P(this.digits)), this.scheduleCommit());
627
388
  }), this.syncFromModelValue(this.modelValue);
628
389
  },
629
390
  beforeUnmount() {
630
391
  this.isUnmounted = !0, clearTimeout(this.debounceTimer), this.mask?.destroy();
631
392
  },
632
393
  watch: { modelValue(e) {
633
- e !== z(this.digits) && this.syncFromModelValue(e);
394
+ e !== P(this.digits) && this.syncFromModelValue(e);
634
395
  } },
635
396
  methods: {
636
397
  syncFromModelValue(e) {
637
- this.writeToMask(B(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
398
+ this.writeToMask(F(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
638
399
  },
639
400
  applyUserDigits(e) {
640
- this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", z(this.digits));
401
+ this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", P(this.digits));
641
402
  },
642
403
  writeToMask(e) {
643
404
  if (this.isWritingProgrammatically = !0, e === "") this.mask.value = "";
@@ -660,7 +421,7 @@ var Be = 400, Ve = 3, He = {
660
421
  this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
661
422
  },
662
423
  onPaste(e) {
663
- this.applyUserDigits(ze(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
424
+ this.applyUserDigits(De(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
664
425
  },
665
426
  clear() {
666
427
  this.applyUserDigits(""), this.commit();
@@ -670,16 +431,16 @@ var Be = 400, Ve = 3, He = {
670
431
  this.commit();
671
432
  return;
672
433
  }
673
- this.digits.length < Ve || (this.debounceTimer = setTimeout(() => this.commit(), Be));
434
+ this.digits.length < ke || (this.debounceTimer = setTimeout(() => this.commit(), Oe));
674
435
  },
675
436
  commit() {
676
437
  clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
677
438
  }
678
439
  }
679
- }, Ue = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, We = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ge = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ke = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
680
- function qe(e, t, n, r, o, c) {
440
+ }, je = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Me = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ne = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Pe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
441
+ function Fe(e, t, n, r, o, c) {
681
442
  let l = m("element-header"), u = m("eraser");
682
- return d(), i("div", Ue, [a("div", We, [s(l, {
443
+ return d(), i("div", je, [a("div", Me, [s(l, {
683
444
  text: n.header,
684
445
  "is-required": n.isRequired,
685
446
  "is-loading": n.isLoading
@@ -687,7 +448,7 @@ function qe(e, t, n, r, o, c) {
687
448
  "text",
688
449
  "is-required",
689
450
  "is-loading"
690
- ]), a("div", Ge, [a("label", Ke, [a("input", {
451
+ ]), a("div", Ne, [a("label", Pe, [a("input", {
691
452
  ref: "input",
692
453
  type: "tel",
693
454
  inputmode: "tel",
@@ -703,9 +464,9 @@ function qe(e, t, n, r, o, c) {
703
464
  class: "bb:pr-2 bb:h-full"
704
465
  }, null, 8, ["onClick"]), [[y, o.digits.length > 0]])])])])]);
705
466
  }
706
- var Je = /*#__PURE__*/ A(He, [["render", qe]]), Ye = {
467
+ var Ie = /*#__PURE__*/ j(Ae, [["render", Fe]]), Le = {
707
468
  components: {
708
- ElementHeader: R,
469
+ ElementHeader: M,
709
470
  Eraser: N
710
471
  },
711
472
  emits: ["update:modelValue", "changed"],
@@ -728,53 +489,412 @@ var Je = /*#__PURE__*/ A(He, [["render", qe]]), Ye = {
728
489
  }
729
490
  },
730
491
  data() {
731
- return { search: this.modelValue ?? "" };
492
+ return { search: this.modelValue ?? "" };
493
+ },
494
+ computed: { inputNeedsEraser() {
495
+ return this.search.length > 0;
496
+ } },
497
+ watch: { modelValue(e) {
498
+ this.search = e ?? "";
499
+ } },
500
+ methods: {
501
+ clearInput() {
502
+ this.search = "", this.startSearch();
503
+ },
504
+ startSearch() {
505
+ this.$emit("update:modelValue", this.search), this.$emit("changed");
506
+ }
507
+ }
508
+ }, Re = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, ze = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Be = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ve = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
509
+ function He(e, t, n, r, o, c) {
510
+ let l = m("element-header"), u = m("eraser");
511
+ return d(), i("div", Re, [a("div", ze, [s(l, {
512
+ text: n.header,
513
+ "is-required": n.isRequired,
514
+ "is-loading": n.isLoading
515
+ }, null, 8, [
516
+ "text",
517
+ "is-required",
518
+ "is-loading"
519
+ ]), a("div", Be, [a("label", Ve, [x(a("input", {
520
+ class: "bb:flex bb:w-full bb:h-full bb:px-3 bb:py-2 bb:cursor-pointer bb:truncate bb:focus:outline-hidden bb:border-none",
521
+ "onUpdate:modelValue": t[0] ||= (e) => o.search = e,
522
+ onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
523
+ }, null, 544), [[
524
+ v,
525
+ o.search,
526
+ void 0,
527
+ { trim: !0 }
528
+ ]]), x(s(u, {
529
+ onClick: c.clearInput,
530
+ class: "bb:pr-2 bb:h-full"
531
+ }, null, 8, ["onClick"]), [[y, c.inputNeedsEraser]])])])])]);
532
+ }
533
+ var Ue = /*#__PURE__*/ j(Le, [["render", He]]), I = 4, L = 8;
534
+ function We(e) {
535
+ return typeof e?.showPopover == "function";
536
+ }
537
+ function R(e) {
538
+ return We(e) && e.matches(":popover-open");
539
+ }
540
+ function z(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fitsRight: a = !0 } = {}) {
541
+ let o = e.getBoundingClientRect(), s = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = Math.max(L, o.left), u = Math.max(L, s - o.right), d = Math.max(0, s - l - L), f = Math.max(0, s - u - L), p = r === "start" && (a || d >= f), m = Math.max(0, c - o.bottom - I - L), h = Math.max(0, o.top - I - L), g = i || m >= h, _ = "";
542
+ if (r === "start") {
543
+ let e = p ? d : f;
544
+ _ = `${n === null ? e : Math.min(n, e)}px`;
545
+ } else n !== null && (_ = `${Math.min(n, f)}px`);
546
+ Object.assign(t.style, {
547
+ top: g ? `${o.bottom + I}px` : "auto",
548
+ bottom: g ? "auto" : `${c - o.top + I}px`,
549
+ right: p ? "auto" : `${u}px`,
550
+ left: p ? `${l}px` : "auto",
551
+ maxHeight: `${g ? m : h}px`,
552
+ maxWidth: _
553
+ });
554
+ }
555
+ function Ge(e, t, n = {}) {
556
+ let r = t.scrollHeight <= t.clientHeight + 1, i = t.scrollWidth <= t.clientWidth + 1;
557
+ r && i || z(e, t, {
558
+ ...n,
559
+ fitsBelow: r,
560
+ fitsRight: i
561
+ });
562
+ }
563
+ function Ke(e, t) {
564
+ let n = (n) => {
565
+ e.contains(n.target) || t();
566
+ };
567
+ return window.addEventListener("scroll", n, {
568
+ capture: !0,
569
+ passive: !0
570
+ }), window.addEventListener("resize", t), () => {
571
+ window.removeEventListener("scroll", n, { capture: !0 }), window.removeEventListener("resize", t);
572
+ };
573
+ }
574
+ //#endregion
575
+ //#region src/menuFocus.js
576
+ var B = "a[href], button";
577
+ function qe(e, t = () => null) {
578
+ let n = (n) => {
579
+ if (n.key !== "ArrowDown" && n.key !== "ArrowUp") return;
580
+ let r = [...e.querySelectorAll(B)];
581
+ if (r.length === 0) return;
582
+ n.preventDefault();
583
+ let i = n.key === "ArrowDown" ? 1 : -1, a = r.indexOf(document.activeElement);
584
+ a === -1 && (a = r.indexOf(t())), r[a === -1 ? i === 1 ? 0 : r.length - 1 : (a + i + r.length) % r.length].focus();
585
+ }, r = (e) => {
586
+ let t = e.target.closest(B);
587
+ t !== null && t.focus({ preventScroll: !0 });
588
+ };
589
+ return document.addEventListener("keydown", n, !0), e.addEventListener("mousemove", r), () => {
590
+ document.removeEventListener("keydown", n, !0), e.removeEventListener("mousemove", r);
591
+ };
592
+ }
593
+ //#endregion
594
+ //#region src/components/PopoverPanel.vue
595
+ var Je = {
596
+ emits: ["update:modelValue"],
597
+ props: {
598
+ modelValue: {
599
+ type: Boolean,
600
+ default: !1
601
+ },
602
+ hasContent: {
603
+ type: Boolean,
604
+ default: !0
605
+ },
606
+ align: {
607
+ type: String,
608
+ default: "end",
609
+ validator: (e) => ["start", "end"].includes(e)
610
+ },
611
+ maxWidth: {
612
+ type: Number,
613
+ default: null
614
+ },
615
+ arrows: {
616
+ type: Boolean,
617
+ default: !1
618
+ },
619
+ findSelected: {
620
+ type: Function,
621
+ default: () => null
622
+ },
623
+ closeOnClick: {
624
+ type: Boolean,
625
+ default: !1
626
+ },
627
+ panelClass: {
628
+ type: String,
629
+ default: ""
630
+ },
631
+ panelRole: {
632
+ type: String,
633
+ default: null
634
+ },
635
+ returnFocus: {
636
+ type: Boolean,
637
+ default: !1
638
+ }
639
+ },
640
+ setup() {
641
+ return {
642
+ buttonId: _(),
643
+ panelId: _()
644
+ };
645
+ },
646
+ data() {
647
+ return { panelIsOpen: this.modelValue };
648
+ },
649
+ watch: {
650
+ modelValue(e) {
651
+ this.panelIsOpen = e, this.applyPanelState();
652
+ },
653
+ hasContent: {
654
+ flush: "post",
655
+ handler(e) {
656
+ if (e) {
657
+ this.applyPanelState();
658
+ return;
659
+ }
660
+ this.stopListening(), this.panelIsOpen && (this.panelIsOpen = !1, this.$emit("update:modelValue", !1));
661
+ }
662
+ }
663
+ },
664
+ created() {
665
+ this.stopClosing = null, this.stopArrows = null, this.focusWasInside = !1;
666
+ },
667
+ mounted() {
668
+ this.applyPanelState();
669
+ },
670
+ beforeUnmount() {
671
+ this.stopListening();
672
+ },
673
+ methods: {
674
+ applyPanelState() {
675
+ let e = this.$refs.panel;
676
+ We(e) && e.isConnected && (this.panelIsOpen && !R(e) && e.showPopover(), !this.panelIsOpen && R(e) && e.hidePopover());
677
+ },
678
+ close() {
679
+ let e = this.$refs.panel;
680
+ R(e) && e.hidePopover();
681
+ },
682
+ onClick() {
683
+ this.closeOnClick && this.close();
684
+ },
685
+ onBeforeToggle(e) {
686
+ if (e.newState === "open") {
687
+ let e = document.getElementById(this.buttonId), t = {
688
+ maxWidth: this.maxWidth,
689
+ align: this.align
690
+ };
691
+ z(e, this.$refs.panel, t), requestAnimationFrame(() => {
692
+ let n = this.$refs.panel;
693
+ R(n) && Ge(e, n, t);
694
+ });
695
+ return;
696
+ }
697
+ let t = this.$refs.panel;
698
+ this.focusWasInside = t != null && t.contains(document.activeElement);
699
+ },
700
+ onToggle() {
701
+ this.stopListening();
702
+ let e = this.$refs.panel, t = R(e);
703
+ t && (this.stopClosing = Ke(e, this.close), this.arrows && (this.stopArrows = qe(e, this.findSelected))), t || this.restoreFocus(e), t !== this.panelIsOpen && (this.panelIsOpen = t, this.$emit("update:modelValue", t));
704
+ },
705
+ restoreFocus(e) {
706
+ let t = this.focusWasInside;
707
+ if (this.focusWasInside = !1, !this.returnFocus || !t) return;
708
+ let n = document.activeElement;
709
+ (n === null || n === document.body || e != null && e.contains(n)) && document.getElementById(this.buttonId)?.focus({ preventScroll: !0 });
710
+ },
711
+ stopListening() {
712
+ this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null), this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
713
+ }
714
+ }
715
+ }, Ye = {
716
+ key: 0,
717
+ class: "bb:relative"
718
+ }, Xe = [
719
+ "id",
720
+ "role",
721
+ "aria-orientation",
722
+ "aria-labelledby"
723
+ ];
724
+ function Ze(e, t, n, o, s, c) {
725
+ return n.hasContent ? (d(), i("span", Ye, [p(e.$slots, "trigger", {
726
+ id: o.buttonId,
727
+ popovertarget: o.panelId
728
+ }), a("div", {
729
+ ref: "panel",
730
+ id: o.panelId,
731
+ popover: "auto",
732
+ class: u(["bb:m-0 bb:inset-auto", n.panelClass]),
733
+ role: n.panelRole,
734
+ "aria-orientation": n.panelRole === "menu" ? "vertical" : null,
735
+ "aria-labelledby": o.buttonId,
736
+ onBeforetoggle: t[0] ||= (...e) => c.onBeforeToggle && c.onBeforeToggle(...e),
737
+ onToggle: t[1] ||= (...e) => c.onToggle && c.onToggle(...e),
738
+ onClick: t[2] ||= (...e) => c.onClick && c.onClick(...e)
739
+ }, [p(e.$slots, "default")], 42, Xe)])) : r("", !0);
740
+ }
741
+ var V = /*#__PURE__*/ j(Je, [["render", Ze]]);
742
+ //#endregion
743
+ //#region src/date.js
744
+ function H(e) {
745
+ return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
746
+ }
747
+ function U(e) {
748
+ let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
749
+ if (t === null) return null;
750
+ let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
751
+ return a.setFullYear(i, r - 1, n), a.setHours(0, 0, 0, 0), a.getDate() !== n || a.getMonth() !== r - 1 || a.getFullYear() !== i ? null : a;
752
+ }
753
+ //#endregion
754
+ //#region src/lang.js
755
+ var W = {
756
+ inject: A,
757
+ props: { lang: {
758
+ type: String,
759
+ default: null,
760
+ validator: (e) => e === null || w(e)
761
+ } },
762
+ computed: {
763
+ resolvedLang() {
764
+ return w(this.lang) ? this.lang : this.uiSettings.lang;
765
+ },
766
+ texts() {
767
+ return re[this.resolvedLang];
768
+ }
769
+ }
770
+ }, Qe = {
771
+ components: {
772
+ PopoverPanel: V,
773
+ Eraser: N
774
+ },
775
+ mixins: [W],
776
+ emits: ["update:modelValue", "changed"],
777
+ props: {
778
+ modelValue: {
779
+ type: String,
780
+ default: ""
781
+ },
782
+ withEraser: {
783
+ type: Boolean,
784
+ default: !0
785
+ },
786
+ placeholderText: {
787
+ type: String,
788
+ default: ""
789
+ }
790
+ },
791
+ created() {
792
+ this.picker = null, this.isUnmounted = !1;
793
+ },
794
+ async mounted() {
795
+ let { default: e } = await import("pikaday");
796
+ this.isUnmounted || (this.picker = new e({
797
+ field: this.$refs.field,
798
+ container: this.$refs.container,
799
+ keyboardInput: !1,
800
+ bound: !1,
801
+ firstDay: 1,
802
+ parse: (e) => U(e),
803
+ toString: (e) => H(e),
804
+ i18n: {
805
+ previousMonth: this.texts.previousMonth,
806
+ nextMonth: this.texts.nextMonth,
807
+ months: this.texts.months,
808
+ weekdays: this.texts.weekdays,
809
+ weekdaysShort: this.texts.weekdaysShort
810
+ },
811
+ onSelect: (e) => {
812
+ this.popupIsOpen = !1, this.$emit("update:modelValue", H(e)), this.$emit("changed");
813
+ }
814
+ }));
815
+ },
816
+ beforeUnmount() {
817
+ this.isUnmounted = !0, this.picker?.destroy();
818
+ },
819
+ data() {
820
+ return {
821
+ popupIsOpen: !1,
822
+ dayValue: this.modelValue ?? ""
823
+ };
732
824
  },
733
- computed: { inputNeedsEraser() {
734
- return this.search.length > 0;
735
- } },
736
825
  watch: { modelValue(e) {
737
- this.search = e ?? "";
826
+ let t = e ?? "";
827
+ this.dayValue = t, this.syncPicker(t);
738
828
  } },
739
829
  methods: {
740
- clearInput() {
741
- this.search = "", this.startSearch();
830
+ syncPicker(e) {
831
+ if (this.picker === null) return;
832
+ let t = U(e);
833
+ if (t === null) {
834
+ this.picker.clear();
835
+ return;
836
+ }
837
+ this.picker.setDate(t, !0);
742
838
  },
743
- startSearch() {
744
- this.$emit("update:modelValue", this.search), this.$emit("changed");
839
+ clearPicker() {
840
+ this.$emit("update:modelValue", ""), this.dayValue = "", this.picker?.clear(), this.$emit("changed");
841
+ }
842
+ },
843
+ computed: {
844
+ hasValue() {
845
+ return (this.modelValue ?? "").length > 0;
846
+ },
847
+ needsEraser() {
848
+ return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
745
849
  }
746
850
  }
747
- }, Xe = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ze = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Qe = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, $e = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
748
- function et(e, t, n, r, o, c) {
749
- let l = m("element-header"), u = m("eraser");
750
- return d(), i("div", Xe, [a("div", Ze, [s(l, {
751
- text: n.header,
752
- "is-required": n.isRequired,
753
- "is-loading": n.isLoading
754
- }, null, 8, [
755
- "text",
756
- "is-required",
757
- "is-loading"
758
- ]), a("div", Qe, [a("label", $e, [x(a("input", {
759
- class: "bb:flex bb:w-full bb:h-full bb:px-3 bb:py-2 bb:cursor-pointer bb:truncate bb:focus:outline-hidden bb:border-none",
760
- "onUpdate:modelValue": t[0] ||= (e) => o.search = e,
761
- onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
762
- }, null, 544), [[
763
- v,
764
- o.search,
765
- void 0,
766
- { trim: !0 }
767
- ]]), x(s(u, {
768
- onClick: c.clearInput,
769
- class: "bb:pr-2 bb:h-full"
770
- }, null, 8, ["onClick"]), [[y, c.inputNeedsEraser]])])])])]);
851
+ }, $e = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, et = { class: "bb:relative bb:flex bb:h-full" }, tt = ["id", "popovertarget"], nt = { class: "bb:min-w-24 bb:w-full bb:h-full bb:pointer-events-none" }, rt = [
852
+ "disabled",
853
+ "value",
854
+ "placeholder"
855
+ ], it = {
856
+ ref: "container",
857
+ class: "bb:flex"
858
+ };
859
+ function at(e, t, o, c, l, u) {
860
+ let f = m("popover-panel"), p = m("eraser");
861
+ return d(), i("div", $e, [a("div", et, [s(f, {
862
+ class: "bb:flex bb:w-full",
863
+ modelValue: l.popupIsOpen,
864
+ "onUpdate:modelValue": t[0] ||= (e) => l.popupIsOpen = e,
865
+ align: "start",
866
+ "panel-class": "bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg"
867
+ }, {
868
+ trigger: b((e) => [a("button", {
869
+ ref: "trigger",
870
+ type: "button",
871
+ id: e.id,
872
+ popovertarget: e.popovertarget,
873
+ class: "bb:flex bb:w-full bb:items-center bb:cursor-pointer bb:leading-none bb:focus:outline-hidden"
874
+ }, [a("label", nt, [a("input", {
875
+ disabled: l.popupIsOpen,
876
+ ref: "field",
877
+ type: "text",
878
+ value: l.dayValue,
879
+ placeholder: o.placeholderText,
880
+ class: "bb:w-full bb:h-full bb:py-2 bb:pr-3 bb:leading-none bb:border bb:border-transparent bb:whitespace-nowrap bb:bg-transparent bb:placeholder:text-sm bb:placeholder-gray-300 bb:cursor-pointer bb:focus:outline-hidden"
881
+ }, null, 8, rt)])], 8, tt)]),
882
+ default: b(() => [a("div", it, null, 512)]),
883
+ _: 1
884
+ }, 8, ["modelValue"]), u.needsEraser ? (d(), n(p, {
885
+ key: 0,
886
+ onClick: u.clearPicker,
887
+ class: "bb:z-10 bb:h-full bb:pr-2"
888
+ }, null, 8, ["onClick"])) : r("", !0)])]);
771
889
  }
772
- var tt = /*#__PURE__*/ A(Ye, [["render", et]]), nt = {
890
+ //#endregion
891
+ //#region src/components/SelectDateInterval.vue
892
+ var ot = {
773
893
  components: {
774
- ElementHeader: R,
775
- PickDay: L
894
+ ElementHeader: M,
895
+ PickDay: /* @__PURE__ */ j(Qe, [["render", at]])
776
896
  },
777
- mixins: [I],
897
+ mixins: [W],
778
898
  emits: [
779
899
  "update:dateFrom",
780
900
  "update:dateTo",
@@ -822,10 +942,10 @@ var tt = /*#__PURE__*/ A(Ye, [["render", et]]), nt = {
822
942
  this.$emit("update:dateTo", e), this.dateTo !== e && this.$emit("changed");
823
943
  }
824
944
  }
825
- }, rt = { class: "bb-dashboard-ui bb:flex" }, it = { class: "bb:flex bb:border bb:border-white" }, at = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, ot = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
826
- function st(e, t, n, r, o, c) {
945
+ }, st = { class: "bb-dashboard-ui bb:flex" }, ct = { class: "bb:flex bb:border bb:border-white" }, lt = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, ut = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
946
+ function dt(e, t, n, r, o, c) {
827
947
  let l = m("element-header"), u = m("pick-day");
828
- return d(), i("div", rt, [a("div", it, [a("div", at, [s(l, {
948
+ return d(), i("div", st, [a("div", ct, [a("div", lt, [s(l, {
829
949
  text: n.header,
830
950
  "is-required": n.isRequired,
831
951
  "is-loading": n.isLoading
@@ -833,7 +953,7 @@ function st(e, t, n, r, o, c) {
833
953
  "text",
834
954
  "is-required",
835
955
  "is-loading"
836
- ]), a("div", ot, [s(u, {
956
+ ]), a("div", ut, [s(u, {
837
957
  modelValue: o.userDateFrom,
838
958
  "onUpdate:modelValue": t[0] ||= (e) => o.userDateFrom = e,
839
959
  class: "bb:flex-1 bb:min-w-36 bb:pl-3",
@@ -855,9 +975,9 @@ function st(e, t, n, r, o, c) {
855
975
  "lang"
856
976
  ])])])])]);
857
977
  }
858
- var ct = /*#__PURE__*/ A(nt, [["render", st]]), lt = {
978
+ var ft = /*#__PURE__*/ j(ot, [["render", dt]]), pt = {
859
979
  components: {
860
- Popup: j,
980
+ PopoverPanel: V,
861
981
  Eraser: N
862
982
  },
863
983
  emits: ["update:isOpen", "erased"],
@@ -873,46 +993,46 @@ var ct = /*#__PURE__*/ A(nt, [["render", st]]), lt = {
873
993
  hasValue: {
874
994
  type: Boolean,
875
995
  default: !0
876
- }
877
- },
878
- data() {
879
- return { popupIsOpen: this.isOpen };
880
- },
881
- watch: {
882
- isOpen(e) {
883
- this.popupIsOpen = e, !e && this.$el.contains(document.activeElement) && this.$refs.trigger.focus();
884
996
  },
885
- popupIsOpen(e) {
886
- this.$emit("update:isOpen", e);
997
+ findSelected: {
998
+ type: Function,
999
+ default: () => null
887
1000
  }
888
1001
  },
889
1002
  computed: { needsEraser() {
890
1003
  return !this.isOpen && this.hasValue;
891
1004
  } }
892
- }, ut = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, dt = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, ft = ["textContent"];
893
- function pt(e, t, o, c, l, f) {
894
- let h = m("eraser"), _ = m("popup");
895
- return d(), i("div", ut, [a("div", dt, [a("button", {
896
- ref: "trigger",
897
- type: "button",
898
- class: u(["bb:flex bb:w-full bb:h-full bb:items-center bb:focus:outline-hidden bb:cursor-pointer", { "bb:z-20": o.isOpen }]),
899
- onClick: t[0] ||= S((t) => e.$emit("update:isOpen", !o.isOpen), ["prevent"])
900
- }, [a("span", {
901
- class: "bb:flex bb:w-full bb:h-full bb:pl-3 bb:pr-12 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none",
902
- textContent: g(o.title)
903
- }, null, 8, ft)], 2), f.needsEraser ? (d(), n(h, {
904
- key: 0,
905
- onClick: t[1] ||= (t) => e.$emit("erased"),
906
- class: "bb:pr-2 bb:h-full"
907
- })) : r("", !0)]), s(_, {
908
- modelValue: l.popupIsOpen,
909
- "onUpdate:modelValue": t[2] ||= (e) => l.popupIsOpen = e
1005
+ }, mt = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, ht = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, gt = ["id", "popovertarget"], _t = ["textContent"];
1006
+ function vt(e, t, o, c, l, u) {
1007
+ let f = m("popover-panel"), h = m("eraser");
1008
+ return d(), i("div", mt, [a("div", ht, [s(f, {
1009
+ class: "bb:flex bb:w-full bb:h-full",
1010
+ "model-value": o.isOpen,
1011
+ align: "start",
1012
+ arrows: "",
1013
+ "find-selected": o.findSelected,
1014
+ "return-focus": "",
1015
+ "panel-class": "bb:bg-white bb:text-inherit bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg bb:overscroll-contain",
1016
+ "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:isOpen", t)
910
1017
  }, {
1018
+ trigger: b((e) => [a("button", {
1019
+ type: "button",
1020
+ id: e.id,
1021
+ popovertarget: e.popovertarget,
1022
+ class: "bb:flex bb:w-full bb:h-full bb:items-center bb:focus:outline-hidden bb:cursor-pointer"
1023
+ }, [a("span", {
1024
+ class: "bb:flex bb:w-full bb:h-full bb:pl-3 bb:pr-12 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none",
1025
+ textContent: g(o.title)
1026
+ }, null, 8, _t)], 8, gt)]),
911
1027
  default: b(() => [p(e.$slots, "default")]),
912
1028
  _: 3
913
- }, 8, ["modelValue"])]);
1029
+ }, 8, ["model-value", "find-selected"]), u.needsEraser ? (d(), n(h, {
1030
+ key: 0,
1031
+ onClick: t[1] ||= (t) => e.$emit("erased"),
1032
+ class: "bb:pr-2 bb:h-full"
1033
+ })) : r("", !0)])]);
914
1034
  }
915
- var mt = /*#__PURE__*/ A(lt, [["render", pt]]), ht = {
1035
+ var yt = /*#__PURE__*/ j(pt, [["render", vt]]), bt = {
916
1036
  props: {
917
1037
  isChecked: {
918
1038
  type: Boolean,
@@ -924,48 +1044,31 @@ var mt = /*#__PURE__*/ A(lt, [["render", pt]]), ht = {
924
1044
  methods: { toggle() {
925
1045
  this.$emit("clicked");
926
1046
  } }
927
- }, gt = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, _t = {
1047
+ }, xt = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, St = {
928
1048
  class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
929
1049
  viewBox: "0 0 20 20"
930
- }, vt = ["textContent"];
931
- function yt(e, t, n, r, o, s) {
1050
+ }, Ct = ["textContent"];
1051
+ function wt(e, t, n, r, o, s) {
932
1052
  return d(), i("button", {
933
1053
  type: "button",
934
1054
  onClick: t[0] ||= S((...e) => s.toggle && s.toggle(...e), ["prevent"]),
935
1055
  class: "bb:flex bb:w-full bb:bg-white bb:cursor-pointer bb:focus:outline-hidden bb:focus:bg-indigo-100"
936
- }, [a("span", gt, [x((d(), i("svg", _t, [...t[1] ||= [a("path", {
1056
+ }, [a("span", xt, [x((d(), i("svg", St, [...t[1] ||= [a("path", {
937
1057
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
938
1058
  "clip-rule": "evenodd",
939
1059
  "fill-rule": "evenodd"
940
1060
  }, null, -1)]], 512)), [[y, n.isChecked]])]), a("span", {
941
1061
  class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none",
942
1062
  textContent: g(n.name)
943
- }, null, 8, vt)]);
944
- }
945
- var bt = /*#__PURE__*/ A(ht, [["render", yt]]), V = "a[href], button";
946
- function H(e, t = () => null) {
947
- let n = (n) => {
948
- if (n.key !== "ArrowDown" && n.key !== "ArrowUp") return;
949
- let r = [...e.querySelectorAll(V)];
950
- if (r.length === 0) return;
951
- n.preventDefault();
952
- let i = n.key === "ArrowDown" ? 1 : -1, a = r.indexOf(document.activeElement);
953
- a === -1 && (a = r.indexOf(t())), r[a === -1 ? i === 1 ? 0 : r.length - 1 : (a + i + r.length) % r.length].focus();
954
- }, r = (e) => {
955
- let t = e.target.closest(V);
956
- t !== null && t.focus({ preventScroll: !0 });
957
- };
958
- return document.addEventListener("keydown", n, !0), e.addEventListener("mousemove", r), () => {
959
- document.removeEventListener("keydown", n, !0), e.removeEventListener("mousemove", r);
960
- };
1063
+ }, null, 8, Ct)]);
961
1064
  }
962
1065
  //#endregion
963
1066
  //#region src/components/SelectSingle.vue
964
- var xt = {
1067
+ var Tt = {
965
1068
  components: {
966
- ElementHeader: R,
967
- DropdownButton: mt,
968
- ListElement: bt
1069
+ ElementHeader: M,
1070
+ DropdownButton: yt,
1071
+ ListElement: /* @__PURE__ */ j(bt, [["render", wt]])
969
1072
  },
970
1073
  emits: ["update:modelValue", "changed"],
971
1074
  props: {
@@ -993,20 +1096,9 @@ var xt = {
993
1096
  data() {
994
1097
  return { isOpen: !1 };
995
1098
  },
996
- watch: {
997
- isOpen(e) {
998
- this.stopMovingFocus(), e && (this.stopArrows = H(this.$refs.list, this.activeItemElement));
999
- },
1000
- hasItems(e) {
1001
- e || (this.isOpen = !1);
1002
- }
1003
- },
1004
- created() {
1005
- this.stopArrows = null;
1006
- },
1007
- beforeUnmount() {
1008
- this.stopMovingFocus();
1009
- },
1099
+ watch: { hasItems(e) {
1100
+ e || (this.isOpen = !1);
1101
+ } },
1010
1102
  computed: {
1011
1103
  itemList() {
1012
1104
  return this.items ?? [];
@@ -1034,18 +1126,15 @@ var xt = {
1034
1126
  activeItemElement() {
1035
1127
  let e = this.itemList.indexOf(this.activeItem);
1036
1128
  return e === -1 ? null : this.$refs.list.querySelectorAll("button")[e];
1037
- },
1038
- stopMovingFocus() {
1039
- this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
1040
1129
  }
1041
1130
  }
1042
- }, St = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ct = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, wt = {
1131
+ }, Et = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Dt = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ot = {
1043
1132
  ref: "list",
1044
- class: "bb:flex bb:flex-col bb:py-1 bb:mt-1 bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg bb:divide-y bb:divide-gray-200 bb:divide-dashed"
1133
+ class: "bb:flex bb:flex-col bb:py-1 bb:divide-y bb:divide-gray-200 bb:divide-dashed"
1045
1134
  };
1046
- function Tt(t, o, c, l, u, p) {
1135
+ function kt(t, o, c, l, u, p) {
1047
1136
  let h = m("element-header"), g = m("list-element"), _ = m("dropdown-button");
1048
- return d(), i("div", St, [a("div", Ct, [s(h, {
1137
+ return d(), i("div", Et, [a("div", Dt, [s(h, {
1049
1138
  text: c.header,
1050
1139
  "is-required": c.isRequired,
1051
1140
  "is-loading": c.isLoading
@@ -1059,9 +1148,10 @@ function Tt(t, o, c, l, u, p) {
1059
1148
  "is-open": u.isOpen,
1060
1149
  "onUpdate:isOpen": o[0] ||= (e) => u.isOpen = e,
1061
1150
  "has-value": p.hasValue,
1151
+ "find-selected": p.activeItemElement,
1062
1152
  onErased: p.clear
1063
1153
  }, {
1064
- default: b(() => [a("div", wt, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
1154
+ default: b(() => [a("div", Ot, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
1065
1155
  name: e.name,
1066
1156
  key: e.id,
1067
1157
  "is-checked": e.id === c.modelValue,
@@ -1076,10 +1166,11 @@ function Tt(t, o, c, l, u, p) {
1076
1166
  "title",
1077
1167
  "is-open",
1078
1168
  "has-value",
1169
+ "find-selected",
1079
1170
  "onErased"
1080
1171
  ])) : r("", !0)])]);
1081
1172
  }
1082
- var Et = /*#__PURE__*/ A(xt, [["render", Tt]]), Dt = {
1173
+ var At = /*#__PURE__*/ j(Tt, [["render", kt]]), jt = {
1083
1174
  props: {
1084
1175
  text: {
1085
1176
  type: String,
@@ -1118,8 +1209,8 @@ var Et = /*#__PURE__*/ A(xt, [["render", Tt]]), Dt = {
1118
1209
  return this.color === "yellow";
1119
1210
  }
1120
1211
  }
1121
- }, Ot = ["textContent"];
1122
- function kt(e, t, n, r, a, o) {
1212
+ }, Mt = ["textContent"];
1213
+ function Nt(e, t, n, r, a, o) {
1123
1214
  return d(), i("span", {
1124
1215
  class: u(["bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-2 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:whitespace-nowrap", {
1125
1216
  "bb:bg-green-50 bb:text-gray-700": o.isGreen,
@@ -1130,9 +1221,9 @@ function kt(e, t, n, r, a, o) {
1130
1221
  "bb:bg-yellow-100 bb:text-yellow-800": o.isYellow
1131
1222
  }]),
1132
1223
  textContent: g(n.text)
1133
- }, null, 10, Ot);
1224
+ }, null, 10, Mt);
1134
1225
  }
1135
- var U = /*#__PURE__*/ A(Dt, [["render", kt]]), At = {
1226
+ var G = /*#__PURE__*/ j(jt, [["render", Nt]]), Pt = {
1136
1227
  props: {
1137
1228
  messages: {
1138
1229
  type: [Object, Array],
@@ -1152,12 +1243,12 @@ var U = /*#__PURE__*/ A(Dt, [["render", kt]]), At = {
1152
1243
  return this.type === "dangerous";
1153
1244
  }
1154
1245
  }
1155
- }, jt = { class: "bb:flex" }, Mt = { class: "bb:shrink-0" }, Nt = { class: "bb:ml-3" }, Pt = ["textContent"];
1156
- function Ft(t, n, o, s, c, l) {
1246
+ }, Ft = { class: "bb:flex" }, It = { class: "bb:shrink-0" }, Lt = { class: "bb:ml-3" }, Rt = ["textContent"];
1247
+ function zt(t, n, o, s, c, l) {
1157
1248
  return l.hasErrors ? (d(), i("div", {
1158
1249
  key: 0,
1159
1250
  class: u(["bb-dashboard-ui bb:border-l-4 bb:p-4", l.isDangerous ? "bb:bg-red-50 bb:border-red-400" : "bb:bg-yellow-50 bb:border-yellow-400"])
1160
- }, [a("div", jt, [a("div", Mt, [(d(), i("svg", {
1251
+ }, [a("div", Ft, [a("div", It, [(d(), i("svg", {
1161
1252
  class: u(["bb:h-5 bb:w-5", l.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
1162
1253
  viewBox: "0 0 20 20",
1163
1254
  fill: "currentColor"
@@ -1165,39 +1256,21 @@ function Ft(t, n, o, s, c, l) {
1165
1256
  "fill-rule": "evenodd",
1166
1257
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
1167
1258
  "clip-rule": "evenodd"
1168
- }, null, -1)]], 2))]), a("div", Nt, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
1259
+ }, null, -1)]], 2))]), a("div", Lt, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
1169
1260
  class: u(["bb:text-sm bb:leading-5", l.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
1170
1261
  key: t,
1171
1262
  textContent: g(e)
1172
- }, null, 10, Pt))), 128))])])], 2)) : r("", !0);
1173
- }
1174
- var It = /*#__PURE__*/ A(At, [["render", Ft]]), Lt = { emits: ["clicked"] };
1175
- function Rt(e, t, n, r, o, s) {
1176
- return d(), i("button", {
1177
- type: "button",
1178
- tabindex: "-1",
1179
- class: "bb-dashboard-ui bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-400 bb:focus:outline-hidden bb:hover:text-gray-600",
1180
- onClick: t[0] ||= S((t) => e.$emit("clicked"), ["prevent"])
1181
- }, [...t[1] ||= [a("svg", {
1182
- class: "bb:w-full bb:h-full bb:stroke-current",
1183
- fill: "none",
1184
- viewBox: "0 0 24 24"
1185
- }, [a("path", {
1186
- "stroke-linecap": "round",
1187
- "stroke-linejoin": "round",
1188
- "stroke-width": "2",
1189
- d: "M6 18L18 6M6 6l12 12"
1190
- })], -1)]]);
1263
+ }, null, 10, Rt))), 128))])])], 2)) : r("", !0);
1191
1264
  }
1192
- var W = /*#__PURE__*/ A(Lt, [["render", Rt]]), zt = {}, Bt = {
1265
+ var Bt = /*#__PURE__*/ j(Pt, [["render", zt]]), Vt = {}, Ht = {
1193
1266
  class: "bb:w-4 bb:h-4",
1194
1267
  fill: "none",
1195
1268
  stroke: "currentColor",
1196
1269
  viewBox: "0 0 24 24",
1197
1270
  xmlns: "http://www.w3.org/2000/svg"
1198
1271
  };
1199
- function Vt(e, t, n, r, o, s) {
1200
- return d(), i("svg", Bt, [...t[0] ||= [a("path", {
1272
+ function Ut(e, t, n, r, o, s) {
1273
+ return d(), i("svg", Ht, [...t[0] ||= [a("path", {
1201
1274
  "stroke-linecap": "round",
1202
1275
  "stroke-linejoin": "round",
1203
1276
  "stroke-width": "2",
@@ -1206,9 +1279,9 @@ function Vt(e, t, n, r, o, s) {
1206
1279
  }
1207
1280
  //#endregion
1208
1281
  //#region src/components/DownloadLink.vue
1209
- var Ht = {
1210
- components: { "download-icon": /* @__PURE__ */ A(zt, [["render", Vt]]) },
1211
- mixins: [I],
1282
+ var Wt = {
1283
+ components: { "download-icon": /* @__PURE__ */ j(Vt, [["render", Ut]]) },
1284
+ mixins: [W],
1212
1285
  props: {
1213
1286
  url: {
1214
1287
  type: String,
@@ -1222,16 +1295,16 @@ var Ht = {
1222
1295
  computed: { label() {
1223
1296
  return this.title ?? this.texts.download;
1224
1297
  } }
1225
- }, Ut = ["href", "title"], Wt = { class: "bb:ml-1" };
1226
- function Gt(e, t, n, r, o, c) {
1298
+ }, Gt = ["href", "title"], Kt = { class: "bb:ml-1" };
1299
+ function qt(e, t, n, r, o, c) {
1227
1300
  let l = m("download-icon");
1228
1301
  return d(), i("a", {
1229
1302
  href: n.url,
1230
1303
  title: c.label,
1231
1304
  class: "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-1.5 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:bg-purple-100 bb:text-purple-800 bb:hover:text-purple-600"
1232
- }, [s(l), a("span", Wt, g(c.label), 1)], 8, Ut);
1305
+ }, [s(l), a("span", Kt, g(c.label), 1)], 8, Gt);
1233
1306
  }
1234
- var Kt = /*#__PURE__*/ A(Ht, [["render", Gt]]), qt = { props: {
1307
+ var Jt = /*#__PURE__*/ j(Wt, [["render", qt]]), Yt = { props: {
1235
1308
  isOpen: {
1236
1309
  type: Boolean,
1237
1310
  default: !1
@@ -1240,9 +1313,9 @@ var Kt = /*#__PURE__*/ A(Ht, [["render", Gt]]), qt = { props: {
1240
1313
  type: String,
1241
1314
  required: !0
1242
1315
  }
1243
- } }, Jt = { class: "bb:flex bb:items-end bb:justify-center bb:min-h-screen bb:pt-4 bb:px-4 bb:pb-20 bb:text-center bb:sm:block bb:sm:p-0" }, Yt = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Xt = ["aria-labelledby"];
1244
- function Zt(e, n, r, o, c, l) {
1245
- return d(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", Jt, [
1316
+ } }, Xt = { class: "bb:flex bb:items-end bb:justify-center bb:min-h-screen bb:pt-4 bb:px-4 bb:pb-20 bb:text-center bb:sm:block bb:sm:p-0" }, Zt = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Qt = ["aria-labelledby"];
1317
+ function $t(e, n, r, o, c, l) {
1318
+ return d(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", Xt, [
1246
1319
  s(t, {
1247
1320
  "enter-active-class": "bb:ease-out bb:duration-300",
1248
1321
  "enter-from-class": "bb:opacity-0",
@@ -1251,7 +1324,7 @@ function Zt(e, n, r, o, c, l) {
1251
1324
  "leave-from-class": "bb:opacity-100",
1252
1325
  "leave-to-class": "bb:opacity-0"
1253
1326
  }, {
1254
- default: b(() => [x(a("div", Yt, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
1327
+ default: b(() => [x(a("div", Zt, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
1255
1328
  _: 1
1256
1329
  }),
1257
1330
  n[1] ||= a("span", { class: "bb:hidden bb:sm:inline-block bb:sm:align-middle bb:sm:h-screen" }, null, -1),
@@ -1268,12 +1341,12 @@ function Zt(e, n, r, o, c, l) {
1268
1341
  role: "dialog",
1269
1342
  "aria-modal": "true",
1270
1343
  "aria-labelledby": r.headingId
1271
- }, [p(e.$slots, "default")], 8, Xt), [[y, r.isOpen]])]),
1344
+ }, [p(e.$slots, "default")], 8, Qt), [[y, r.isOpen]])]),
1272
1345
  _: 3
1273
1346
  })
1274
1347
  ])], 2);
1275
1348
  }
1276
- var Qt = /*#__PURE__*/ A(qt, [["render", Zt]]), $t = {}, en = {
1349
+ var en = /*#__PURE__*/ j(Yt, [["render", $t]]), tn = {}, nn = {
1277
1350
  class: "bb:h-7 bb:w-7 bb:text-red-600",
1278
1351
  xmlns: "http://www.w3.org/2000/svg",
1279
1352
  fill: "none",
@@ -1281,35 +1354,35 @@ var Qt = /*#__PURE__*/ A(qt, [["render", Zt]]), $t = {}, en = {
1281
1354
  stroke: "currentColor",
1282
1355
  "aria-hidden": "true"
1283
1356
  };
1284
- function tn(e, t, n, r, o, s) {
1285
- return d(), i("svg", en, [...t[0] ||= [a("path", {
1357
+ function rn(e, t, n, r, o, s) {
1358
+ return d(), i("svg", nn, [...t[0] ||= [a("path", {
1286
1359
  "stroke-linecap": "round",
1287
1360
  "stroke-linejoin": "round",
1288
1361
  "stroke-width": "2",
1289
1362
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
1290
1363
  }, null, -1)]]);
1291
1364
  }
1292
- var G = /*#__PURE__*/ A($t, [["render", tn]]), nn = {}, rn = {
1365
+ var K = /*#__PURE__*/ j(tn, [["render", rn]]), an = {}, on = {
1293
1366
  class: "bb:h-7 bb:w-7 bb:text-yellow-400",
1294
1367
  xmlns: "http://www.w3.org/2000/svg",
1295
1368
  viewBox: "0 0 20 20",
1296
1369
  fill: "currentColor",
1297
1370
  "aria-hidden": "true"
1298
1371
  };
1299
- function an(e, t, n, r, o, s) {
1300
- return d(), i("svg", rn, [...t[0] ||= [a("path", {
1372
+ function sn(e, t, n, r, o, s) {
1373
+ return d(), i("svg", on, [...t[0] ||= [a("path", {
1301
1374
  "fill-rule": "evenodd",
1302
1375
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
1303
1376
  "clip-rule": "evenodd"
1304
1377
  }, null, -1)]]);
1305
1378
  }
1306
- var K = /*#__PURE__*/ A(nn, [["render", an]]), on = {
1379
+ var q = /*#__PURE__*/ j(an, [["render", sn]]), cn = {
1307
1380
  components: {
1308
- Modal: Qt,
1309
- Dangerous: G,
1310
- Warning: K
1381
+ Modal: en,
1382
+ Dangerous: K,
1383
+ Warning: q
1311
1384
  },
1312
- mixins: [I],
1385
+ mixins: [W],
1313
1386
  emits: ["actionConfirmed", "actionCanceled"],
1314
1387
  props: {
1315
1388
  isOpen: {
@@ -1349,20 +1422,20 @@ var K = /*#__PURE__*/ A(nn, [["render", an]]), on = {
1349
1422
  return this.type === "warning";
1350
1423
  }
1351
1424
  }
1352
- }, sn = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:px-4 bb:pt-5 bb:pb-4 bb:sm:p-6 bb:sm:pb-4" }, cn = { class: "bb:sm:flex bb:sm:items-start" }, ln = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, un = ["id"], dn = { class: "bb:mt-2" }, fn = { class: "bb:text-sm bb:text-gray-500" }, pn = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-4 bb:py-3 bb:sm:px-6 bb:sm:flex bb:sm:flex-row-reverse" };
1353
- function mn(e, t, i, o, s, c) {
1425
+ }, ln = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:px-4 bb:pt-5 bb:pb-4 bb:sm:p-6 bb:sm:pb-4" }, un = { class: "bb:sm:flex bb:sm:items-start" }, dn = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, fn = ["id"], pn = { class: "bb:mt-2" }, mn = { class: "bb:text-sm bb:text-gray-500" }, hn = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-4 bb:py-3 bb:sm:px-6 bb:sm:flex bb:sm:flex-row-reverse" };
1426
+ function gn(e, t, i, o, s, c) {
1354
1427
  let l = m("warning"), f = m("dangerous"), p = m("modal");
1355
1428
  return d(), n(p, {
1356
1429
  "is-open": i.isOpen,
1357
1430
  "heading-id": o.headingId
1358
1431
  }, {
1359
- default: b(() => [a("div", sn, [a("div", cn, [a("div", { class: u(["bb:mx-auto bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-12 bb:w-12 bb:rounded-full bb:sm:mx-0 bb:sm:h-10 bb:sm:w-10", {
1432
+ default: b(() => [a("div", ln, [a("div", un, [a("div", { class: u(["bb:mx-auto bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-12 bb:w-12 bb:rounded-full bb:sm:mx-0 bb:sm:h-10 bb:sm:w-10", {
1360
1433
  "bb:bg-red-100": c.isDangerous,
1361
1434
  "bb:bg-yellow-100": c.isWarning
1362
- }]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", ln, [a("h3", {
1435
+ }]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", dn, [a("h3", {
1363
1436
  class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
1364
1437
  id: o.headingId
1365
- }, g(i.confirmationHeading), 9, un), a("div", dn, [a("p", fn, g(i.confirmationText), 1)])])])]), a("div", pn, [a("button", {
1438
+ }, g(i.confirmationHeading), 9, fn), a("div", pn, [a("p", mn, g(i.confirmationText), 1)])])])]), a("div", hn, [a("button", {
1366
1439
  type: "button",
1367
1440
  class: u(["bb:w-full bb:inline-flex bb:justify-center bb:rounded-md bb:border bb:border-transparent bb:shadow-xs bb:px-4 bb:py-2 bb:text-base bb:font-medium bb:text-white bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:sm:ml-3 bb:sm:w-auto bb:sm:text-sm", {
1368
1441
  "bb:bg-red-600 bb:hover:bg-red-700 bb:focus:ring-red-500": c.isDangerous,
@@ -1377,230 +1450,328 @@ function mn(e, t, i, o, s, c) {
1377
1450
  _: 1
1378
1451
  }, 8, ["is-open", "heading-id"]);
1379
1452
  }
1380
- var hn = /*#__PURE__*/ A(on, [["render", mn]]);
1381
- //#endregion
1382
- //#region src/navigation.js
1383
- function gn(e) {
1384
- let t = e.currentTarget?.target ?? "";
1385
- return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
1453
+ var _n = /*#__PURE__*/ j(cn, [["render", gn]]), J = ["yellow", "red"];
1454
+ function Y(e) {
1455
+ if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.color !== void 0 && !J.includes(e.color) || e.danger !== void 0) return !1;
1456
+ let t = typeof e.href == "string" && e.href !== "" && e.onSelect === void 0, n = typeof e.onSelect == "function" && e.href === void 0;
1457
+ return t || n;
1386
1458
  }
1387
- var q = {
1388
- inject: k,
1389
- methods: { followLink(e, t) {
1390
- let n = this.uiSettings.navigate;
1391
- n !== null && gn(e) && (e.preventDefault(), n(t));
1392
- } }
1393
- }, J = 4, Y = 8;
1394
1459
  function X(e) {
1395
- return typeof e?.showPopover == "function";
1460
+ return Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e) : [];
1396
1461
  }
1397
1462
  function Z(e) {
1398
- return X(e) && e.matches(":popover-open");
1463
+ return typeof e.href == "string" && e.href !== "";
1399
1464
  }
1400
- function _n(e, t, { maxWidth: n = null } = {}) {
1401
- let r = e.getBoundingClientRect(), i = document.documentElement.clientWidth, a = document.documentElement.clientHeight, o = Math.max(Y, i - r.right), s = Math.max(0, i - o - Y), c = Math.max(0, a - r.bottom - J - Y), l = Math.max(0, r.top - J - Y), u = c >= l;
1402
- Object.assign(t.style, {
1403
- top: u ? `${r.bottom + J}px` : "auto",
1404
- bottom: u ? "auto" : `${a - r.top + J}px`,
1405
- right: `${o}px`,
1406
- left: "auto",
1407
- maxHeight: `${u ? c : l}px`
1408
- }), n !== null && (t.style.maxWidth = `${Math.min(n, s)}px`);
1409
- }
1410
- function vn(e, t) {
1411
- let n = (n) => {
1412
- e.contains(n.target) || t();
1413
- };
1414
- return window.addEventListener("scroll", n, {
1415
- capture: !0,
1416
- passive: !0
1417
- }), window.addEventListener("resize", t), () => {
1418
- window.removeEventListener("scroll", n, { capture: !0 }), window.removeEventListener("resize", t);
1465
+ function Q(e) {
1466
+ return e.danger === void 0 && J.includes(e.color) ? e.color : null;
1467
+ }
1468
+ function vn(e) {
1469
+ return {
1470
+ data() {
1471
+ return { dangerWarned: !1 };
1472
+ },
1473
+ watch: { actions: {
1474
+ immediate: !0,
1475
+ deep: !0,
1476
+ handler(t) {
1477
+ process.env.NODE_ENV === "production" || this.dangerWarned || X(t).some((e) => e.danger !== void 0) && (this.dangerWarned = !0, console.warn(`[dashboard-ui-components] ${e}: поле danger убрано, красный пункт — color: 'red'`));
1478
+ }
1479
+ } }
1419
1480
  };
1420
1481
  }
1421
1482
  //#endregion
1422
- //#region src/components/DropdownButtonWithAction.vue
1423
- var yn = 224;
1424
- function bn(e) {
1425
- if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.danger !== void 0 && typeof e.danger != "boolean") return !1;
1426
- let t = typeof e.href == "string" && e.href !== "" && e.onSelect === void 0, n = typeof e.onSelect == "function" && e.href === void 0;
1427
- return t || n;
1483
+ //#region src/navigation.js
1484
+ function yn(e) {
1485
+ let t = e.currentTarget?.target ?? "";
1486
+ return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
1487
+ }
1488
+ var $ = {
1489
+ inject: A,
1490
+ methods: { followLink(e, t) {
1491
+ let n = this.uiSettings.navigate;
1492
+ n !== null && yn(e) && (e.preventDefault(), n(t));
1493
+ } }
1494
+ }, bn = {
1495
+ components: { PopoverPanel: V },
1496
+ mixins: [$],
1497
+ emits: ["update:modelValue"],
1498
+ props: {
1499
+ actions: { default: () => [] },
1500
+ modelValue: {
1501
+ type: Boolean,
1502
+ default: !1
1503
+ }
1504
+ },
1505
+ computed: {
1506
+ actionItems() {
1507
+ return X(this.actions);
1508
+ },
1509
+ hasActions() {
1510
+ return this.actionItems.length > 0;
1511
+ }
1512
+ },
1513
+ methods: {
1514
+ color(e) {
1515
+ return Q(e);
1516
+ },
1517
+ isLink(e) {
1518
+ return Z(e);
1519
+ },
1520
+ select(e) {
1521
+ if (typeof e.onSelect == "function") return e.onSelect();
1522
+ }
1523
+ }
1524
+ }, xn = [
1525
+ "href",
1526
+ "onClick",
1527
+ "textContent"
1528
+ ], Sn = ["onClick", "textContent"];
1529
+ function Cn(t, r, a, o, s, c) {
1530
+ let l = m("popover-panel");
1531
+ return d(), n(l, {
1532
+ "model-value": a.modelValue,
1533
+ "has-content": c.hasActions,
1534
+ align: "end",
1535
+ "max-width": 224,
1536
+ arrows: "",
1537
+ "close-on-click": "",
1538
+ "panel-class": "bb:w-56 bb:rounded-md bb:shadow-lg bb:bg-white bb:ring-1 bb:ring-black/5",
1539
+ "panel-role": "menu",
1540
+ "onUpdate:modelValue": r[0] ||= (e) => t.$emit("update:modelValue", e)
1541
+ }, {
1542
+ trigger: b((e) => [p(t.$slots, "trigger", {
1543
+ id: e.id,
1544
+ popovertarget: e.popovertarget
1545
+ })]),
1546
+ default: b(() => [(d(!0), i(e, null, f(c.actionItems, (n, r) => (d(), i(e, { key: r }, [c.isLink(n) ? (d(), i("a", {
1547
+ key: 0,
1548
+ href: n.href,
1549
+ role: "menuitem",
1550
+ class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", {
1551
+ "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900": c.color(n) === null,
1552
+ "bb:text-yellow-800 bb:focus:bg-yellow-100": c.color(n) === "yellow",
1553
+ "bb:text-red-700 bb:focus:bg-red-50": c.color(n) === "red"
1554
+ }]),
1555
+ onClick: (e) => t.followLink(e, n.href),
1556
+ textContent: g(n.label)
1557
+ }, null, 10, xn)) : (d(), i("button", {
1558
+ key: 1,
1559
+ type: "button",
1560
+ role: "menuitem",
1561
+ class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", {
1562
+ "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900": c.color(n) === null,
1563
+ "bb:text-yellow-800 bb:focus:bg-yellow-100": c.color(n) === "yellow",
1564
+ "bb:text-red-700 bb:focus:bg-red-50": c.color(n) === "red"
1565
+ }]),
1566
+ onClick: (e) => c.select(n),
1567
+ textContent: g(n.label)
1568
+ }, null, 10, Sn))], 64))), 128))]),
1569
+ _: 3
1570
+ }, 8, ["model-value", "has-content"]);
1428
1571
  }
1429
- var xn = {
1430
- mixins: [I, q],
1572
+ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
1573
+ components: { PopoverMenu: wn },
1574
+ mixins: [
1575
+ W,
1576
+ $,
1577
+ vn("DropdownButtonWithAction")
1578
+ ],
1431
1579
  emits: ["update:modelValue"],
1432
1580
  props: {
1433
1581
  actions: {
1434
1582
  type: Array,
1435
1583
  default: () => [],
1436
- validator: (e) => e.every(bn)
1584
+ validator: (e) => e.every(Y)
1437
1585
  },
1438
1586
  modelValue: {
1439
1587
  type: Boolean,
1440
1588
  default: !1
1441
1589
  }
1442
1590
  },
1443
- setup() {
1444
- return {
1445
- menuButtonId: _(),
1446
- menuId: _()
1447
- };
1448
- },
1449
1591
  data() {
1450
1592
  return { menuIsOpen: this.modelValue };
1451
1593
  },
1452
1594
  computed: {
1453
- actionItems() {
1454
- return Array.isArray(this.actions) ? this.actions.filter((e) => typeof e == "object" && !!e) : [];
1595
+ items() {
1596
+ return X(this.actions);
1455
1597
  },
1456
1598
  hasActions() {
1457
- return this.actionItems.length > 0;
1599
+ return this.items.length > 0;
1600
+ },
1601
+ mainAction() {
1602
+ return this.items[0];
1603
+ },
1604
+ mainColor() {
1605
+ return this.hasActions ? Q(this.mainAction) : null;
1606
+ },
1607
+ menuActions() {
1608
+ return this.items.slice(1);
1609
+ },
1610
+ hasMenu() {
1611
+ return this.menuActions.length > 0;
1458
1612
  }
1459
1613
  },
1460
1614
  watch: {
1461
1615
  modelValue(e) {
1462
- this.menuIsOpen = e, this.applyMenuState();
1616
+ this.menuIsOpen = e;
1463
1617
  },
1464
- hasActions: {
1618
+ hasMenu: {
1465
1619
  flush: "post",
1466
1620
  handler(e) {
1467
- if (e) {
1468
- this.applyMenuState();
1469
- return;
1470
- }
1471
- this.stopListening(), this.menuIsOpen && (this.menuIsOpen = !1, this.$emit("update:modelValue", !1));
1621
+ !e && !this.hasActions && this.menuIsOpen && (this.menuIsOpen = !1, this.$emit("update:modelValue", !1));
1472
1622
  }
1473
1623
  }
1474
1624
  },
1475
1625
  created() {
1476
- this.stopClosing = null, this.stopArrows = null, process.env.NODE_ENV !== "production" && this.$slots.actions && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот actions убран, пункты меню передаются пропом actions");
1477
- },
1478
- mounted() {
1479
- this.applyMenuState();
1480
- },
1481
- beforeUnmount() {
1482
- this.stopListening();
1626
+ process.env.NODE_ENV !== "production" && this.$slots.actions && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот actions убран, пункты меню передаются пропом actions"), process.env.NODE_ENV !== "production" && this.$slots.button && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот button убран, основная кнопка — первый пункт actions");
1483
1627
  },
1484
1628
  methods: {
1485
1629
  isLink(e) {
1486
- return typeof e.href == "string" && e.href !== "";
1630
+ return Z(e);
1487
1631
  },
1488
1632
  select(e) {
1489
1633
  if (typeof e.onSelect == "function") return e.onSelect();
1490
1634
  },
1491
- applyMenuState() {
1492
- let e = this.$refs.menu;
1493
- X(e) && e.isConnected && (this.menuIsOpen && !Z(e) && e.showPopover(), !this.menuIsOpen && Z(e) && e.hidePopover());
1494
- },
1495
- close() {
1496
- let e = this.$refs.menu;
1497
- Z(e) && e.hidePopover();
1498
- },
1499
- onBeforeToggle(e) {
1500
- e.newState === "open" && _n(this.$refs.arrow, this.$refs.menu, { maxWidth: yn });
1501
- },
1502
- onToggle() {
1503
- this.stopListening();
1504
- let e = this.$refs.menu, t = Z(e);
1505
- t && (this.stopClosing = vn(e, this.close), this.stopArrows = H(e)), t !== this.menuIsOpen && (this.menuIsOpen = t, this.$emit("update:modelValue", t));
1506
- },
1507
- stopListening() {
1508
- this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null), this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
1635
+ onMenuToggle(e) {
1636
+ this.menuIsOpen = e, this.$emit("update:modelValue", e);
1509
1637
  }
1510
1638
  }
1511
- }, Sn = { class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md" }, Cn = {
1639
+ }, En = {
1512
1640
  key: 0,
1513
- class: "bb:-ml-px bb:relative bb:block"
1514
- }, wn = ["id", "popovertarget"], Tn = { class: "bb:sr-only" }, En = ["id", "aria-labelledby"], Dn = [
1515
- "href",
1516
- "onClick",
1517
- "textContent"
1518
- ], On = ["onClick", "textContent"];
1519
- function kn(t, n, o, s, c, l) {
1520
- return d(), i("span", Sn, [a("button", {
1521
- type: "button",
1522
- class: u(["bb:relative bb:inline-flex bb:items-center bb:rounded-l-md bb:border bb:border-gray-300 bb:bg-white bb:hover:bg-gray-50 bb:focus:outline-hidden", { "bb:rounded-r-md": !l.hasActions }])
1523
- }, [p(t.$slots, "button")], 2), l.hasActions ? (d(), i("span", Cn, [a("button", {
1524
- ref: "arrow",
1525
- id: s.menuButtonId,
1526
- type: "button",
1527
- popovertarget: s.menuId,
1528
- class: "bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:bg-gray-50 bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500"
1529
- }, [a("span", Tn, g(t.texts.openMenu), 1), n[3] ||= a("svg", {
1530
- class: "bb:h-5 bb:w-5",
1531
- xmlns: "http://www.w3.org/2000/svg",
1532
- viewBox: "0 0 20 20",
1533
- fill: "currentColor",
1534
- "aria-hidden": "true"
1535
- }, [a("path", {
1536
- "fill-rule": "evenodd",
1537
- d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
1538
- "clip-rule": "evenodd"
1539
- })], -1)], 8, wn), a("div", {
1540
- ref: "menu",
1541
- id: s.menuId,
1542
- popover: "auto",
1543
- class: "bb:m-0 bb:inset-auto bb:w-56 bb:rounded-md bb:shadow-lg bb:bg-white bb:ring-1 bb:ring-black/5",
1544
- role: "menu",
1545
- "aria-orientation": "vertical",
1546
- "aria-labelledby": s.menuButtonId,
1547
- onBeforetoggle: n[0] ||= (...e) => l.onBeforeToggle && l.onBeforeToggle(...e),
1548
- onToggle: n[1] ||= (...e) => l.onToggle && l.onToggle(...e),
1549
- onClick: n[2] ||= (...e) => l.close && l.close(...e)
1550
- }, [(d(!0), i(e, null, f(l.actionItems, (n, r) => (d(), i(e, { key: r }, [l.isLink(n) ? (d(), i("a", {
1641
+ class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md"
1642
+ }, Dn = ["href", "textContent"], On = ["textContent"], kn = ["id", "popovertarget"], An = { class: "bb:sr-only" };
1643
+ function jn(e, t, n, o, c, l) {
1644
+ let f = m("popover-menu");
1645
+ return l.hasActions ? (d(), i("span", En, [l.isLink(l.mainAction) ? (d(), i("a", {
1551
1646
  key: 0,
1552
- href: n.href,
1553
- role: "menuitem",
1554
- class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", n.danger === !0 ? "bb:bg-red-400 bb:text-white bb:focus:bg-red-500" : "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900"]),
1555
- onClick: (e) => t.followLink(e, n.href),
1556
- textContent: g(n.label)
1647
+ href: l.mainAction.href,
1648
+ class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
1649
+ "bb:rounded-l-md": l.hasMenu,
1650
+ "bb:rounded-md": !l.hasMenu,
1651
+ "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50": l.mainColor === null,
1652
+ "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
1653
+ "bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
1654
+ }]),
1655
+ onClick: t[0] ||= (t) => e.followLink(t, l.mainAction.href),
1656
+ textContent: g(l.mainAction.label)
1557
1657
  }, null, 10, Dn)) : (d(), i("button", {
1558
1658
  key: 1,
1559
1659
  type: "button",
1560
- role: "menuitem",
1561
- class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", n.danger === !0 ? "bb:bg-red-400 bb:text-white bb:focus:bg-red-500" : "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900"]),
1562
- onClick: (e) => l.select(n),
1563
- textContent: g(n.label)
1564
- }, null, 10, On))], 64))), 128))], 40, En)])) : r("", !0)]);
1660
+ class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
1661
+ "bb:rounded-l-md": l.hasMenu,
1662
+ "bb:rounded-md": !l.hasMenu,
1663
+ "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50": l.mainColor === null,
1664
+ "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
1665
+ "bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
1666
+ }]),
1667
+ onClick: t[1] ||= (e) => l.select(l.mainAction),
1668
+ textContent: g(l.mainAction.label)
1669
+ }, null, 10, On)), s(f, {
1670
+ class: "bb:-ml-px bb:flex",
1671
+ actions: l.menuActions,
1672
+ "model-value": n.modelValue,
1673
+ "onUpdate:modelValue": l.onMenuToggle
1674
+ }, {
1675
+ trigger: b((n) => [a("button", {
1676
+ type: "button",
1677
+ id: n.id,
1678
+ popovertarget: n.popovertarget,
1679
+ class: u(["bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:text-sm bb:font-medium bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
1680
+ "bb:bg-white bb:border-gray-300 bb:text-gray-500 bb:hover:bg-gray-50": l.mainColor === null,
1681
+ "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
1682
+ "bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
1683
+ }])
1684
+ }, [a("span", An, g(e.texts.openMenu), 1), t[2] ||= a("svg", {
1685
+ class: "bb:h-5 bb:w-5",
1686
+ xmlns: "http://www.w3.org/2000/svg",
1687
+ viewBox: "0 0 20 20",
1688
+ fill: "currentColor",
1689
+ "aria-hidden": "true"
1690
+ }, [a("path", {
1691
+ "fill-rule": "evenodd",
1692
+ d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
1693
+ "clip-rule": "evenodd"
1694
+ })], -1)], 10, kn)]),
1695
+ _: 1
1696
+ }, 8, [
1697
+ "actions",
1698
+ "model-value",
1699
+ "onUpdate:modelValue"
1700
+ ])])) : r("", !0);
1565
1701
  }
1566
- var An = /*#__PURE__*/ A(xn, [["render", kn]]), jn = {}, Mn = {
1702
+ var Mn = /*#__PURE__*/ j(Tn, [["render", jn]]), Nn = {
1703
+ components: { PopoverMenu: wn },
1704
+ mixins: [W, vn("HamburgerMenu")],
1705
+ props: { actions: {
1706
+ type: Array,
1707
+ default: () => [],
1708
+ validator: (e) => e.every(Y)
1709
+ } }
1710
+ }, Pn = ["id", "popovertarget"], Fn = { class: "bb:sr-only" };
1711
+ function In(e, t, r, i, o, s) {
1712
+ let c = m("popover-menu");
1713
+ return d(), n(c, {
1714
+ class: "bb-dashboard-ui bb:inline-flex",
1715
+ actions: r.actions
1716
+ }, {
1717
+ trigger: b((n) => [a("button", {
1718
+ type: "button",
1719
+ id: n.id,
1720
+ popovertarget: n.popovertarget,
1721
+ class: "bb:relative bb:inline-flex bb:items-center bb:justify-center bb:p-2 bb:rounded-md bb:text-gray-400 bb:hover:text-gray-500 bb:hover:bg-gray-100 bb:focus:outline-hidden bb:focus:bg-gray-100 bb:focus:text-gray-500 bb:transition bb:duration-150 bb:ease-in-out"
1722
+ }, [a("span", Fn, g(e.texts.openMenu), 1), t[0] ||= a("svg", {
1723
+ class: "bb:h-6 bb:w-6",
1724
+ fill: "none",
1725
+ viewBox: "0 0 24 24",
1726
+ stroke: "currentColor",
1727
+ "aria-hidden": "true"
1728
+ }, [a("path", {
1729
+ "stroke-linecap": "round",
1730
+ "stroke-linejoin": "round",
1731
+ "stroke-width": "2",
1732
+ d: "M4 6h16M4 12h16M4 18h16"
1733
+ })], -1)], 8, Pn)]),
1734
+ _: 1
1735
+ }, 8, ["actions"]);
1736
+ }
1737
+ var Ln = /*#__PURE__*/ j(Nn, [["render", In]]), Rn = {}, zn = {
1567
1738
  xmlns: "http://www.w3.org/2000/svg",
1568
1739
  viewBox: "0 0 20 20",
1569
1740
  fill: "currentColor",
1570
1741
  "aria-hidden": "true"
1571
1742
  };
1572
- function Nn(e, t, n, r, o, s) {
1573
- return d(), i("svg", Mn, [...t[0] ||= [a("path", {
1743
+ function Bn(e, t, n, r, o, s) {
1744
+ return d(), i("svg", zn, [...t[0] ||= [a("path", {
1574
1745
  "fill-rule": "evenodd",
1575
1746
  "clip-rule": "evenodd",
1576
1747
  d: "M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z"
1577
1748
  }, null, -1)]]);
1578
1749
  }
1579
- var Pn = /*#__PURE__*/ A(jn, [["render", Nn]]), Fn = {}, In = {
1750
+ var Vn = /*#__PURE__*/ j(Rn, [["render", Bn]]), Hn = {}, Un = {
1580
1751
  xmlns: "http://www.w3.org/2000/svg",
1581
1752
  viewBox: "0 0 20 20",
1582
1753
  fill: "currentColor",
1583
1754
  "aria-hidden": "true"
1584
1755
  };
1585
- function Ln(e, t, n, r, o, s) {
1586
- return d(), i("svg", In, [...t[0] ||= [a("path", {
1756
+ function Wn(e, t, n, r, o, s) {
1757
+ return d(), i("svg", Un, [...t[0] ||= [a("path", {
1587
1758
  "fill-rule": "evenodd",
1588
1759
  "clip-rule": "evenodd",
1589
1760
  d: "M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
1590
1761
  }, null, -1)]]);
1591
1762
  }
1592
- var Rn = /*#__PURE__*/ A(Fn, [["render", Ln]]);
1763
+ var Gn = /*#__PURE__*/ j(Hn, [["render", Wn]]);
1593
1764
  //#endregion
1594
1765
  //#region src/components/Pagination.vue
1595
- function Q(e) {
1766
+ function Kn(e) {
1596
1767
  return typeof e == "string" && e !== "" ? e : null;
1597
1768
  }
1598
- var zn = {
1769
+ var qn = {
1599
1770
  components: {
1600
- ArrowNarrowLeft: Pn,
1601
- ArrowNarrowRight: Rn
1771
+ ArrowNarrowLeft: Vn,
1772
+ ArrowNarrowRight: Gn
1602
1773
  },
1603
- mixins: [I, q],
1774
+ mixins: [W, $],
1604
1775
  props: {
1605
1776
  links: {
1606
1777
  type: Object,
@@ -1628,49 +1799,49 @@ var zn = {
1628
1799
  return typeof this.from == "number" && typeof this.to == "number";
1629
1800
  },
1630
1801
  previousPageUrl() {
1631
- return Q(this.links?.prev);
1802
+ return Kn(this.links?.prev);
1632
1803
  },
1633
1804
  nextPageUrl() {
1634
- return Q(this.links?.next);
1805
+ return Kn(this.links?.next);
1635
1806
  }
1636
1807
  }
1637
- }, Bn = {
1808
+ }, Jn = {
1638
1809
  key: 0,
1639
1810
  class: "bb-dashboard-ui bb:px-4 bb:flex bb:items-center bb:justify-between bb:sm:px-0"
1640
- }, Vn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Hn = ["href"], Un = {
1811
+ }, Yn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Xn = ["href"], Zn = {
1641
1812
  key: 0,
1642
1813
  class: "bb:hidden bb:md:-mt-px bb:md:flex bb:text-gray-400 bb:text-sm bb:leading-5"
1643
- }, Wn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Gn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Kn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, qn = ["href"];
1644
- function Jn(e, t, n, c, l, u) {
1814
+ }, Qn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, $n = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, er = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, tr = ["href"];
1815
+ function nr(e, t, n, c, l, u) {
1645
1816
  let f = m("arrow-narrow-left"), p = m("arrow-narrow-right");
1646
- return u.hasResults ? (d(), i("nav", Bn, [
1647
- a("div", Vn, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
1817
+ return u.hasResults ? (d(), i("nav", Jn, [
1818
+ a("div", Yn, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
1648
1819
  key: 0,
1649
1820
  href: u.previousPageUrl,
1650
1821
  class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pr-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700",
1651
1822
  onClick: t[0] ||= (t) => e.followLink(t, u.previousPageUrl)
1652
- }, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8, Hn))]),
1653
- u.hasRange ? (d(), i("div", Un, [
1823
+ }, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8, Xn))]),
1824
+ u.hasRange ? (d(), i("div", Zn, [
1654
1825
  o(g(e.texts.resultsBefore) + " ", 1),
1655
- a("span", Wn, g(u.from) + " - " + g(u.to), 1),
1826
+ a("span", Qn, g(u.from) + " - " + g(u.to), 1),
1656
1827
  o(" " + g(e.texts.resultsOf) + " ", 1),
1657
- a("span", Gn, g(u.total), 1),
1828
+ a("span", $n, g(u.total), 1),
1658
1829
  o(" " + g(e.texts.resultsAfter), 1)
1659
1830
  ])) : r("", !0),
1660
- a("div", Kn, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
1831
+ a("div", er, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
1661
1832
  key: 0,
1662
1833
  href: u.nextPageUrl,
1663
1834
  class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pl-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700",
1664
1835
  onClick: t[1] ||= (t) => e.followLink(t, u.nextPageUrl)
1665
- }, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8, qn))])
1836
+ }, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8, tr))])
1666
1837
  ])) : r("", !0);
1667
1838
  }
1668
- var Yn = /*#__PURE__*/ A(zn, [["render", Jn]]), Xn = [
1839
+ var rr = /*#__PURE__*/ j(qn, [["render", nr]]), ir = [
1669
1840
  "left",
1670
1841
  "center",
1671
1842
  "right"
1672
- ], Zn = ["red", "green"];
1673
- function Qn(e) {
1843
+ ], ar = ["red", "green"];
1844
+ function or(e) {
1674
1845
  if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
1675
1846
  let t = e.key;
1676
1847
  return {
@@ -1679,21 +1850,21 @@ function Qn(e) {
1679
1850
  value: typeof e.value == "function" ? e.value : (e) => e?.[t],
1680
1851
  secondary: typeof e.secondary == "function" ? e.secondary : null,
1681
1852
  muted: e.muted === !0,
1682
- align: Xn.includes(e.align) ? e.align : "left",
1853
+ align: ir.includes(e.align) ? e.align : "left",
1683
1854
  wrap: e.wrap === !0,
1684
1855
  narrow: e.narrow === !0,
1685
1856
  visible: e.visible !== !1
1686
1857
  };
1687
1858
  }
1688
- function $(e) {
1859
+ function sr(e) {
1689
1860
  return typeof e == "string" && e !== "" ? e : null;
1690
1861
  }
1691
- var $n = {
1862
+ var cr = {
1692
1863
  components: {
1693
- Pagination: Yn,
1694
- SmallBadge: U
1864
+ Pagination: rr,
1865
+ SmallBadge: G
1695
1866
  },
1696
- mixins: [I],
1867
+ mixins: [W],
1697
1868
  props: {
1698
1869
  rows: {
1699
1870
  type: Array,
@@ -1738,7 +1909,7 @@ var $n = {
1738
1909
  return Array.isArray(this.rows) ? this.rows : [];
1739
1910
  },
1740
1911
  visibleColumns() {
1741
- return (Array.isArray(this.columns) ? this.columns : []).map(Qn).filter((e) => e !== null && e.visible);
1912
+ return (Array.isArray(this.columns) ? this.columns : []).map(or).filter((e) => e !== null && e.visible);
1742
1913
  },
1743
1914
  isCard() {
1744
1915
  return this.variant === "card";
@@ -1754,10 +1925,10 @@ var $n = {
1754
1925
  },
1755
1926
  badgeText() {
1756
1927
  if (this.hasRecords) {
1757
- let e = $(this.foundText);
1928
+ let e = sr(this.foundText);
1758
1929
  return e === null ? null : `${e}: ${this.recordCount}`;
1759
1930
  }
1760
- return $(this.emptyText);
1931
+ return sr(this.emptyText);
1761
1932
  }
1762
1933
  },
1763
1934
  methods: {
@@ -1777,15 +1948,15 @@ var $n = {
1777
1948
  colorOf(e) {
1778
1949
  if (typeof this.rowColor != "function") return null;
1779
1950
  let t = this.rowColor(e);
1780
- return Zn.includes(t) ? t : null;
1951
+ return ar.includes(t) ? t : null;
1781
1952
  },
1782
1953
  textOf(e, t) {
1783
1954
  let n = e(t);
1784
1955
  return n == null ? "" : String(n);
1785
1956
  }
1786
1957
  }
1787
- }, er = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, tr = { class: "bb:bg-gray-50" }, nr = ["textContent"], rr = { class: "bb:divide-y bb:divide-gray-200" }, ir = ["textContent"], ar = ["textContent"];
1788
- function or(t, o, s, c, l, h) {
1958
+ }, lr = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, ur = { class: "bb:bg-gray-50" }, dr = ["textContent"], fr = { class: "bb:divide-y bb:divide-gray-200" }, pr = ["textContent"], mr = ["textContent"];
1959
+ function hr(t, o, s, c, l, h) {
1789
1960
  let _ = m("small-badge"), v = m("pagination");
1790
1961
  return d(), i("div", null, [
1791
1962
  h.hasBadgeRow() ? (d(), i("div", {
@@ -1799,7 +1970,7 @@ function or(t, o, s, c, l, h) {
1799
1970
  h.normalizedRows.length > 0 ? (d(), i("div", {
1800
1971
  key: 1,
1801
1972
  class: u(h.isCard && h.hasBadgeRow() ? "bb:mt-4" : "")
1802
- }, [a("div", { class: u(["bb:overflow-x-auto", h.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table", er, [a("thead", null, [a("tr", tr, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
1973
+ }, [a("div", { class: u(["bb:overflow-x-auto", h.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table", lr, [a("thead", null, [a("tr", ur, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
1803
1974
  key: e.key,
1804
1975
  scope: "col",
1805
1976
  class: u(["bb:px-6 bb:py-3 bb:text-xs bb:leading-4 bb:font-medium bb:text-gray-500 bb:uppercase bb:tracking-wider bb:whitespace-nowrap", [{
@@ -1808,7 +1979,7 @@ function or(t, o, s, c, l, h) {
1808
1979
  "bb:text-right": e.align === "right"
1809
1980
  }, { "bb:w-px": e.narrow }]]),
1810
1981
  textContent: g(e.label)
1811
- }, null, 10, nr))), 128))])]), a("tbody", rr, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
1982
+ }, null, 10, dr))), 128))])]), a("tbody", fr, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
1812
1983
  key: h.keyOf(n, o),
1813
1984
  class: u({
1814
1985
  "bb:bg-white bb:even:bg-gray-50": h.colorOf(n) === null,
@@ -1832,11 +2003,11 @@ function or(t, o, s, c, l, h) {
1832
2003
  }, () => [a("div", {
1833
2004
  class: u(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
1834
2005
  textContent: g(h.textOf(e.value, n))
1835
- }, null, 10, ir), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
2006
+ }, null, 10, pr), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
1836
2007
  key: 0,
1837
2008
  class: "bb:text-gray-400",
1838
2009
  textContent: g(h.textOf(e.secondary, n))
1839
- }, null, 8, ar)) : r("", !0)])], 2))), 128))], 2))), 128))])])], 2)], 2)) : r("", !0),
2010
+ }, null, 8, mr)) : r("", !0)])], 2))), 128))], 2))), 128))])])], 2)], 2)) : r("", !0),
1840
2011
  h.hasMeta ? (d(), n(v, {
1841
2012
  key: 2,
1842
2013
  meta: s.meta,
@@ -1851,8 +2022,8 @@ function or(t, o, s, c, l, h) {
1851
2022
  ])) : r("", !0)
1852
2023
  ]);
1853
2024
  }
1854
- var sr = /*#__PURE__*/ A($n, [["render", or]]), cr = {
1855
- mixins: [q],
2025
+ var gr = /*#__PURE__*/ j(cr, [["render", hr]]), _r = {
2026
+ mixins: [$],
1856
2027
  props: {
1857
2028
  url: {
1858
2029
  type: String,
@@ -1867,28 +2038,46 @@ var sr = /*#__PURE__*/ A($n, [["render", or]]), cr = {
1867
2038
  default: !1
1868
2039
  }
1869
2040
  }
1870
- }, lr = ["href", "textContent"];
1871
- function ur(e, t, n, r, a, o) {
2041
+ }, vr = ["href", "textContent"];
2042
+ function yr(e, t, n, r, a, o) {
1872
2043
  return d(), i("a", {
1873
2044
  href: n.url,
1874
2045
  class: u([n.isActive ? "bb:border-indigo-400 bb:text-gray-600 bb:focus:border-indigo-700" : "bb:border-transparent bb:text-gray-500 bb:hover:text-gray-600 bb:hover:border-gray-300 bb:focus:text-gray-700 bb:focus:border-gray-300", "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-1 bb:pt-1 bb:border-b-2 bb:text-sm bb:font-medium bb:leading-5 bb:focus:outline-hidden bb:transition bb:duration-150 bb:ease-in-out"]),
1875
2046
  onClick: t[0] ||= (t) => e.followLink(t, n.url),
1876
2047
  textContent: g(n.name)
1877
- }, null, 10, lr);
2048
+ }, null, 10, vr);
2049
+ }
2050
+ var br = /*#__PURE__*/ j(_r, [["render", yr]]), xr = { emits: ["clicked"] };
2051
+ function Sr(e, t, n, r, o, s) {
2052
+ return d(), i("button", {
2053
+ type: "button",
2054
+ tabindex: "-1",
2055
+ class: "bb-dashboard-ui bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-400 bb:focus:outline-hidden bb:hover:text-gray-600",
2056
+ onClick: t[0] ||= S((t) => e.$emit("clicked"), ["prevent"])
2057
+ }, [...t[1] ||= [a("svg", {
2058
+ class: "bb:w-full bb:h-full bb:stroke-current",
2059
+ fill: "none",
2060
+ viewBox: "0 0 24 24"
2061
+ }, [a("path", {
2062
+ "stroke-linecap": "round",
2063
+ "stroke-linejoin": "round",
2064
+ "stroke-width": "2",
2065
+ d: "M6 18L18 6M6 6l12 12"
2066
+ })], -1)]]);
1878
2067
  }
1879
- var dr = /*#__PURE__*/ A(cr, [["render", ur]]), fr = [
2068
+ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
1880
2069
  "xl",
1881
2070
  "4xl",
1882
2071
  "7xl"
1883
- ], pr = {
1884
- components: { Closer: W },
1885
- mixins: [I],
2072
+ ], Tr = {
2073
+ components: { Closer: Cr },
2074
+ mixins: [W],
1886
2075
  inheritAttrs: !1,
1887
2076
  props: {
1888
2077
  width: {
1889
2078
  type: String,
1890
2079
  default: "xl",
1891
- validator: (e) => fr.includes(e)
2080
+ validator: (e) => wr.includes(e)
1892
2081
  },
1893
2082
  fallbackUrl: {
1894
2083
  type: String,
@@ -1904,13 +2093,13 @@ var dr = /*#__PURE__*/ A(cr, [["render", ur]]), fr = [
1904
2093
  },
1905
2094
  computed: {
1906
2095
  resolvedWidth() {
1907
- return fr.includes(this.width) ? this.width : "xl";
2096
+ return wr.includes(this.width) ? this.width : "xl";
1908
2097
  },
1909
2098
  windows() {
1910
2099
  return this.uiSettings.windows;
1911
2100
  },
1912
2101
  resolvedKey() {
1913
- return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ae(this.windows.page.address);
2102
+ return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ie(this.windows.page.address);
1914
2103
  },
1915
2104
  target() {
1916
2105
  return this.returnAddress === null ? this.fallbackUrl === null || this.fallbackUrl === "" ? null : this.fallbackUrl : this.returnAddress;
@@ -1920,23 +2109,23 @@ var dr = /*#__PURE__*/ A(cr, [["render", ur]]), fr = [
1920
2109
  }
1921
2110
  },
1922
2111
  watch: { fallbackUrl() {
1923
- this.windows !== null && pe(this.windows.state, this, this.fallbackAddress());
2112
+ this.windows !== null && fe(this.windows.state, this, this.fallbackAddress());
1924
2113
  } },
1925
2114
  mounted() {
1926
- this.windows !== null && (this.returnAddress = D(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
2115
+ this.windows !== null && (this.returnAddress = O(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
1927
2116
  },
1928
2117
  beforeUnmount() {
1929
- this.windows !== null && fe(this.windows.state, this);
2118
+ this.windows !== null && de(this.windows.state, this);
1930
2119
  },
1931
2120
  methods: {
1932
2121
  fallbackAddress() {
1933
- return ie(this.fallbackUrl, window.location.origin);
2122
+ return T(this.fallbackUrl, window.location.origin);
1934
2123
  },
1935
2124
  forwardedAttrs() {
1936
2125
  return Object.fromEntries(Object.entries(this.$attrs).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")));
1937
2126
  },
1938
2127
  syncWindow() {
1939
- let e = de(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
2128
+ let e = ue(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
1940
2129
  e.rejected && console.warn(`PageCard: ключ окна сменился на «${this.resolvedKey}» без смены страницы — карточка остаётся в окне «${e.key}»`), this.returnAddress = e.window.returnAddress;
1941
2130
  },
1942
2131
  close() {
@@ -1951,7 +2140,7 @@ var dr = /*#__PURE__*/ A(cr, [["render", ur]]), fr = [
1951
2140
  }
1952
2141
  }
1953
2142
  };
1954
- function mr(e, t, a, o, s, c) {
2143
+ function Er(e, t, a, o, s, c) {
1955
2144
  let f = m("closer");
1956
2145
  return d(), i("div", l({
1957
2146
  class: ["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:sm:rounded-lg", [
@@ -1984,7 +2173,7 @@ function mr(e, t, a, o, s, c) {
1984
2173
  "onClicked"
1985
2174
  ])) : r("", !0)], 16);
1986
2175
  }
1987
- var hr = /*#__PURE__*/ A(pr, [["render", mr]]), gr = {}, _r = {
2176
+ var Dr = /*#__PURE__*/ j(Tr, [["render", Er]]), Or = {}, kr = {
1988
2177
  class: "bb:h-7 bb:w-7 bb:text-green-600",
1989
2178
  xmlns: "http://www.w3.org/2000/svg",
1990
2179
  fill: "none",
@@ -1993,22 +2182,22 @@ var hr = /*#__PURE__*/ A(pr, [["render", mr]]), gr = {}, _r = {
1993
2182
  stroke: "currentColor",
1994
2183
  "aria-hidden": "true"
1995
2184
  };
1996
- function vr(e, t, n, r, o, s) {
1997
- return d(), i("svg", _r, [...t[0] ||= [a("path", {
2185
+ function Ar(e, t, n, r, o, s) {
2186
+ return d(), i("svg", kr, [...t[0] ||= [a("path", {
1998
2187
  "stroke-linecap": "round",
1999
2188
  "stroke-linejoin": "round",
2000
2189
  d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
2001
2190
  }, null, -1)]]);
2002
2191
  }
2003
- var yr = /*#__PURE__*/ A(gr, [["render", vr]]), br = {}, xr = {
2192
+ var jr = /*#__PURE__*/ j(Or, [["render", Ar]]), Mr = {}, Nr = {
2004
2193
  class: "bb:h-5 bb:w-5",
2005
2194
  xmlns: "http://www.w3.org/2000/svg",
2006
2195
  viewBox: "0 0 20 20",
2007
2196
  fill: "currentColor",
2008
2197
  "aria-hidden": "true"
2009
2198
  };
2010
- function Sr(e, t, n, r, o, s) {
2011
- return d(), i("svg", xr, [...t[0] ||= [a("path", {
2199
+ function Pr(e, t, n, r, o, s) {
2200
+ return d(), i("svg", Nr, [...t[0] ||= [a("path", {
2012
2201
  "fill-rule": "evenodd",
2013
2202
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
2014
2203
  "clip-rule": "evenodd"
@@ -2016,14 +2205,14 @@ function Sr(e, t, n, r, o, s) {
2016
2205
  }
2017
2206
  //#endregion
2018
2207
  //#region src/components/NotificationMessage.vue
2019
- var Cr = {
2208
+ var Fr = {
2020
2209
  components: {
2021
- Check: yr,
2022
- Close: /* @__PURE__ */ A(br, [["render", Sr]]),
2023
- Dangerous: G,
2024
- Warning: K
2210
+ Check: jr,
2211
+ Close: /* @__PURE__ */ j(Mr, [["render", Pr]]),
2212
+ Dangerous: K,
2213
+ Warning: q
2025
2214
  },
2026
- mixins: [I],
2215
+ mixins: [W],
2027
2216
  emits: ["update:modelValue"],
2028
2217
  props: {
2029
2218
  modelValue: {
@@ -2061,8 +2250,8 @@ var Cr = {
2061
2250
  return this.type === "confirmation";
2062
2251
  }
2063
2252
  }
2064
- }, wr = ["role"], Tr = { class: "bb:p-4" }, Er = { class: "bb:flex bb:items-start" }, Dr = { class: "bb:shrink-0" }, Or = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, kr = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, Ar = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, jr = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Mr = { class: "bb:sr-only" };
2065
- function Nr(e, t, o, c, l, f) {
2253
+ }, Ir = ["role"], Lr = { class: "bb:p-4" }, Rr = { class: "bb:flex bb:items-start" }, zr = { class: "bb:shrink-0" }, Br = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, Vr = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, Hr = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, Ur = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Wr = { class: "bb:sr-only" };
2254
+ function Gr(e, t, o, c, l, f) {
2066
2255
  let p = m("warning"), h = m("dangerous"), _ = m("check"), v = m("close");
2067
2256
  return d(), i("div", {
2068
2257
  class: "bb-dashboard-ui bb:fixed bb:inset-0 bb:flex bb:items-end bb:justify-center bb:px-4 bb:py-6 bb:pointer-events-none bb:sm:p-6 bb:sm:items-start bb:sm:justify-end",
@@ -2074,14 +2263,14 @@ function Nr(e, t, o, c, l, f) {
2074
2263
  "bb:bg-yellow-50": f.isWarning,
2075
2264
  "bb:bg-gray-50": f.isConfirmation
2076
2265
  }])
2077
- }, [a("div", Tr, [a("div", Er, [
2078
- a("div", Dr, [
2266
+ }, [a("div", Lr, [a("div", Rr, [
2267
+ a("div", zr, [
2079
2268
  f.isWarning ? (d(), n(p, { key: 0 })) : r("", !0),
2080
2269
  f.isDangerous ? (d(), n(h, { key: 1 })) : r("", !0),
2081
2270
  f.isConfirmation ? (d(), n(_, { key: 2 })) : r("", !0)
2082
2271
  ]),
2083
- a("div", Or, [a("p", kr, g(o.notificationHeading), 1), a("p", Ar, g(f.text), 1)]),
2084
- a("div", jr, [a("button", {
2272
+ a("div", Br, [a("p", Vr, g(o.notificationHeading), 1), a("p", Hr, g(f.text), 1)]),
2273
+ a("div", Ur, [a("button", {
2085
2274
  type: "button",
2086
2275
  class: u(["bb:rounded-md bb:inline-flex bb:text-gray-400 bb:hover:text-gray-500 bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:focus:ring-indigo-500", {
2087
2276
  "bb:bg-red-50": f.isDangerous,
@@ -2089,9 +2278,9 @@ function Nr(e, t, o, c, l, f) {
2089
2278
  "bb:bg-gray-50": f.isConfirmation
2090
2279
  }]),
2091
2280
  onClick: t[0] ||= S((t) => e.$emit("update:modelValue", ""), ["prevent"])
2092
- }, [a("span", Mr, g(e.texts.close), 1), s(v)], 2)])
2093
- ])])], 2)) : r("", !0)], 8, wr);
2281
+ }, [a("span", Wr, g(e.texts.close), 1), s(v)], 2)])
2282
+ ])])], 2)) : r("", !0)], 8, Ir);
2094
2283
  }
2095
- var Pr = /*#__PURE__*/ A(Cr, [["render", Nr]]);
2284
+ var Kr = /*#__PURE__*/ j(Fr, [["render", Gr]]);
2096
2285
  //#endregion
2097
- export { W as Closer, hn as ConfirmationModal, sr as DataTable, M as Dot, Kt as DownloadLink, An as DropdownButtonWithAction, It as ErrorMessages, dr as NavigationMenuElement, Pr as NotificationMessage, hr as PageCard, L as PickDay, j as Popup, Je as RussianMobileFilter, tt as Search, ct as SelectDateInterval, Et as SelectSingle, U as SmallBadge, ge as dashboardUi };
2286
+ export { _n as ConfirmationModal, gr as DataTable, ve as Dot, Jt as DownloadLink, Mn as DropdownButtonWithAction, Bt as ErrorMessages, Ln as HamburgerMenu, br as NavigationMenuElement, Kr as NotificationMessage, Dr as PageCard, Ie as RussianMobileFilter, Ue as Search, ft as SelectDateInterval, At as SelectSingle, G as SmallBadge, he as dashboardUi };