@oneb/ui-vue 0.1.35 → 0.1.37

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.
@@ -1,100 +1,1051 @@
1
- import { g as w, e as A, h as C } from "../OneHelpMenu-5f545b2a.js";
2
- import { d as pe, f as ue, O as me, _ as he } from "../OneHelpMenu-5f545b2a.js";
3
- import { openBlock as r, createElementBlock as l, defineComponent as O, ref as z, computed as F, createBlock as $, withCtx as _, createElementVNode as e, normalizeClass as B, createVNode as p, unref as M, normalizeStyle as D, toDisplayString as o, Fragment as S, renderList as V, createCommentVNode as f } from "vue";
4
- import { _ as N } from "../_plugin-vue_export-helper-dad06003.js";
5
- import { OneAvatar as y } from "../common/index.js";
1
+ import { g as Gt, h as Kt, e as Jt, i as Qt } from "../OneHelpMenu-135e0656.js";
2
+ import { d as vn, f as bn, O as An, _ as Rn } from "../OneHelpMenu-135e0656.js";
3
+ import { defineComponent as Bt, ref as Q, watch as Zt, onBeforeUnmount as te, provide as ee, computed as $t, openBlock as L, createElementBlock as F, createElementVNode as x, renderSlot as At, normalizeProps as Rt, guardReactiveProps as Ot, createCommentVNode as Z, withDirectives as ne, normalizeClass as Mt, toDisplayString as S, vShow as oe, createBlock as ie, withCtx as Ct, createVNode as ct, unref as se, normalizeStyle as re, Fragment as le, renderList as ce } from "vue";
4
+ import { _ as ae } from "../_plugin-vue_export-helper-dad06003.js";
5
+ import { OneAvatar as _t } from "../common/index.js";
6
6
  import "../XMarkIcon-51ef0691.js";
7
7
  import "../index-f8afb6b6.js";
8
- const E = {}, G = { class: "border-t border-secondary-stroke my-1" };
9
- function L(u, t) {
10
- return r(), l("div", G);
8
+ const ft = Math.min, V = Math.max, tt = Math.round, J = Math.floor, _ = (t) => ({
9
+ x: t,
10
+ y: t
11
+ }), fe = {
12
+ left: "right",
13
+ right: "left",
14
+ bottom: "top",
15
+ top: "bottom"
16
+ }, ue = {
17
+ start: "end",
18
+ end: "start"
19
+ };
20
+ function pt(t, e) {
21
+ return typeof t == "function" ? t(e) : t;
22
+ }
23
+ function W(t) {
24
+ return t.split("-")[0];
25
+ }
26
+ function ot(t) {
27
+ return t.split("-")[1];
28
+ }
29
+ function de(t) {
30
+ return t === "x" ? "y" : "x";
31
+ }
32
+ function Nt(t) {
33
+ return t === "y" ? "height" : "width";
34
+ }
35
+ function q(t) {
36
+ return ["top", "bottom"].includes(W(t)) ? "y" : "x";
37
+ }
38
+ function Vt(t) {
39
+ return de(q(t));
40
+ }
41
+ function pe(t, e, o) {
42
+ o === void 0 && (o = !1);
43
+ const n = ot(t), i = Vt(t), r = Nt(i);
44
+ let s = i === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
45
+ return e.reference[r] > e.floating[r] && (s = et(s)), [s, et(s)];
46
+ }
47
+ function me(t) {
48
+ const e = et(t);
49
+ return [ut(t), e, ut(e)];
50
+ }
51
+ function ut(t) {
52
+ return t.replace(/start|end/g, (e) => ue[e]);
53
+ }
54
+ function he(t, e, o) {
55
+ const n = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
56
+ switch (t) {
57
+ case "top":
58
+ case "bottom":
59
+ return o ? e ? i : n : e ? n : i;
60
+ case "left":
61
+ case "right":
62
+ return e ? r : s;
63
+ default:
64
+ return [];
65
+ }
66
+ }
67
+ function ge(t, e, o, n) {
68
+ const i = ot(t);
69
+ let r = he(W(t), o === "start", n);
70
+ return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(ut)))), r;
71
+ }
72
+ function et(t) {
73
+ return t.replace(/left|right|bottom|top/g, (e) => fe[e]);
74
+ }
75
+ function we(t) {
76
+ return {
77
+ top: 0,
78
+ right: 0,
79
+ bottom: 0,
80
+ left: 0,
81
+ ...t
82
+ };
83
+ }
84
+ function xe(t) {
85
+ return typeof t != "number" ? we(t) : {
86
+ top: t,
87
+ right: t,
88
+ bottom: t,
89
+ left: t
90
+ };
91
+ }
92
+ function nt(t) {
93
+ const {
94
+ x: e,
95
+ y: o,
96
+ width: n,
97
+ height: i
98
+ } = t;
99
+ return {
100
+ width: n,
101
+ height: i,
102
+ top: o,
103
+ left: e,
104
+ right: e + n,
105
+ bottom: o + i,
106
+ x: e,
107
+ y: o
108
+ };
109
+ }
110
+ function kt(t, e, o) {
111
+ let {
112
+ reference: n,
113
+ floating: i
114
+ } = t;
115
+ const r = q(e), s = Vt(e), l = Nt(s), c = W(e), a = r === "y", f = n.x + n.width / 2 - i.width / 2, u = n.y + n.height / 2 - i.height / 2, p = n[l] / 2 - i[l] / 2;
116
+ let d;
117
+ switch (c) {
118
+ case "top":
119
+ d = {
120
+ x: f,
121
+ y: n.y - i.height
122
+ };
123
+ break;
124
+ case "bottom":
125
+ d = {
126
+ x: f,
127
+ y: n.y + n.height
128
+ };
129
+ break;
130
+ case "right":
131
+ d = {
132
+ x: n.x + n.width,
133
+ y: u
134
+ };
135
+ break;
136
+ case "left":
137
+ d = {
138
+ x: n.x - i.width,
139
+ y: u
140
+ };
141
+ break;
142
+ default:
143
+ d = {
144
+ x: n.x,
145
+ y: n.y
146
+ };
147
+ }
148
+ switch (ot(e)) {
149
+ case "start":
150
+ d[s] -= p * (o && a ? -1 : 1);
151
+ break;
152
+ case "end":
153
+ d[s] += p * (o && a ? -1 : 1);
154
+ break;
155
+ }
156
+ return d;
157
+ }
158
+ const ye = async (t, e, o) => {
159
+ const {
160
+ placement: n = "bottom",
161
+ strategy: i = "absolute",
162
+ middleware: r = [],
163
+ platform: s
164
+ } = o, l = r.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(e));
165
+ let a = await s.getElementRects({
166
+ reference: t,
167
+ floating: e,
168
+ strategy: i
169
+ }), {
170
+ x: f,
171
+ y: u
172
+ } = kt(a, n, c), p = n, d = {}, m = 0;
173
+ for (let g = 0; g < l.length; g++) {
174
+ const {
175
+ name: w,
176
+ fn: h
177
+ } = l[g], {
178
+ x: v,
179
+ y: b,
180
+ data: A,
181
+ reset: y
182
+ } = await h({
183
+ x: f,
184
+ y: u,
185
+ initialPlacement: n,
186
+ placement: p,
187
+ strategy: i,
188
+ middlewareData: d,
189
+ rects: a,
190
+ platform: s,
191
+ elements: {
192
+ reference: t,
193
+ floating: e
194
+ }
195
+ });
196
+ f = v ?? f, u = b ?? u, d = {
197
+ ...d,
198
+ [w]: {
199
+ ...d[w],
200
+ ...A
201
+ }
202
+ }, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (p = y.placement), y.rects && (a = y.rects === !0 ? await s.getElementRects({
203
+ reference: t,
204
+ floating: e,
205
+ strategy: i
206
+ }) : y.rects), {
207
+ x: f,
208
+ y: u
209
+ } = kt(a, p, c)), g = -1);
210
+ }
211
+ return {
212
+ x: f,
213
+ y: u,
214
+ placement: p,
215
+ strategy: i,
216
+ middlewareData: d
217
+ };
218
+ };
219
+ async function ve(t, e) {
220
+ var o;
221
+ e === void 0 && (e = {});
222
+ const {
223
+ x: n,
224
+ y: i,
225
+ platform: r,
226
+ rects: s,
227
+ elements: l,
228
+ strategy: c
229
+ } = t, {
230
+ boundary: a = "clippingAncestors",
231
+ rootBoundary: f = "viewport",
232
+ elementContext: u = "floating",
233
+ altBoundary: p = !1,
234
+ padding: d = 0
235
+ } = pt(e, t), m = xe(d), w = l[p ? u === "floating" ? "reference" : "floating" : u], h = nt(await r.getClippingRect({
236
+ element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
237
+ boundary: a,
238
+ rootBoundary: f,
239
+ strategy: c
240
+ })), v = u === "floating" ? {
241
+ x: n,
242
+ y: i,
243
+ width: s.floating.width,
244
+ height: s.floating.height
245
+ } : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), A = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
246
+ x: 1,
247
+ y: 1
248
+ } : {
249
+ x: 1,
250
+ y: 1
251
+ }, y = nt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
252
+ elements: l,
253
+ rect: v,
254
+ offsetParent: b,
255
+ strategy: c
256
+ }) : v);
257
+ return {
258
+ top: (h.top - y.top + m.top) / A.y,
259
+ bottom: (y.bottom - h.bottom + m.bottom) / A.y,
260
+ left: (h.left - y.left + m.left) / A.x,
261
+ right: (y.right - h.right + m.right) / A.x
262
+ };
263
+ }
264
+ const be = function(t) {
265
+ return t === void 0 && (t = {}), {
266
+ name: "flip",
267
+ options: t,
268
+ async fn(e) {
269
+ var o, n;
270
+ const {
271
+ placement: i,
272
+ middlewareData: r,
273
+ rects: s,
274
+ initialPlacement: l,
275
+ platform: c,
276
+ elements: a
277
+ } = e, {
278
+ mainAxis: f = !0,
279
+ crossAxis: u = !0,
280
+ fallbackPlacements: p,
281
+ fallbackStrategy: d = "bestFit",
282
+ fallbackAxisSideDirection: m = "none",
283
+ flipAlignment: g = !0,
284
+ ...w
285
+ } = pt(t, e);
286
+ if ((o = r.arrow) != null && o.alignmentOffset)
287
+ return {};
288
+ const h = W(i), v = q(l), b = W(l) === l, A = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = p || (b || !g ? [et(l)] : me(l)), j = m !== "none";
289
+ !p && j && y.push(...ge(l, g, m, A));
290
+ const M = [l, ...y], lt = await ve(e, w), K = [];
291
+ let U = ((n = r.flip) == null ? void 0 : n.overflows) || [];
292
+ if (f && K.push(lt[h]), u) {
293
+ const B = pe(i, s, A);
294
+ K.push(lt[B[0]], lt[B[1]]);
295
+ }
296
+ if (U = [...U, {
297
+ placement: i,
298
+ overflows: K
299
+ }], !K.every((B) => B <= 0)) {
300
+ var xt, yt;
301
+ const B = (((xt = r.flip) == null ? void 0 : xt.index) || 0) + 1, bt = M[B];
302
+ if (bt)
303
+ return {
304
+ data: {
305
+ index: B,
306
+ overflows: U
307
+ },
308
+ reset: {
309
+ placement: bt
310
+ }
311
+ };
312
+ let Y = (yt = U.filter((N) => N.overflows[0] <= 0).sort((N, T) => N.overflows[1] - T.overflows[1])[0]) == null ? void 0 : yt.placement;
313
+ if (!Y)
314
+ switch (d) {
315
+ case "bestFit": {
316
+ var vt;
317
+ const N = (vt = U.filter((T) => {
318
+ if (j) {
319
+ const D = q(T.placement);
320
+ return D === v || // Create a bias to the `y` side axis due to horizontal
321
+ // reading directions favoring greater width.
322
+ D === "y";
323
+ }
324
+ return !0;
325
+ }).map((T) => [T.placement, T.overflows.filter((D) => D > 0).reduce((D, Xt) => D + Xt, 0)]).sort((T, D) => T[1] - D[1])[0]) == null ? void 0 : vt[0];
326
+ N && (Y = N);
327
+ break;
328
+ }
329
+ case "initialPlacement":
330
+ Y = l;
331
+ break;
332
+ }
333
+ if (i !== Y)
334
+ return {
335
+ reset: {
336
+ placement: Y
337
+ }
338
+ };
339
+ }
340
+ return {};
341
+ }
342
+ };
343
+ };
344
+ async function Ae(t, e) {
345
+ const {
346
+ placement: o,
347
+ platform: n,
348
+ elements: i
349
+ } = t, r = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), s = W(o), l = ot(o), c = q(o) === "y", a = ["left", "top"].includes(s) ? -1 : 1, f = r && c ? -1 : 1, u = pt(e, t);
350
+ let {
351
+ mainAxis: p,
352
+ crossAxis: d,
353
+ alignmentAxis: m
354
+ } = typeof u == "number" ? {
355
+ mainAxis: u,
356
+ crossAxis: 0,
357
+ alignmentAxis: null
358
+ } : {
359
+ mainAxis: u.mainAxis || 0,
360
+ crossAxis: u.crossAxis || 0,
361
+ alignmentAxis: u.alignmentAxis
362
+ };
363
+ return l && typeof m == "number" && (d = l === "end" ? m * -1 : m), c ? {
364
+ x: d * f,
365
+ y: p * a
366
+ } : {
367
+ x: p * a,
368
+ y: d * f
369
+ };
370
+ }
371
+ const Re = function(t) {
372
+ return t === void 0 && (t = 0), {
373
+ name: "offset",
374
+ options: t,
375
+ async fn(e) {
376
+ var o, n;
377
+ const {
378
+ x: i,
379
+ y: r,
380
+ placement: s,
381
+ middlewareData: l
382
+ } = e, c = await Ae(e, t);
383
+ return s === ((o = l.offset) == null ? void 0 : o.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
384
+ x: i + c.x,
385
+ y: r + c.y,
386
+ data: {
387
+ ...c,
388
+ placement: s
389
+ }
390
+ };
391
+ }
392
+ };
393
+ };
394
+ function it() {
395
+ return typeof window < "u";
396
+ }
397
+ function I(t) {
398
+ return zt(t) ? (t.nodeName || "").toLowerCase() : "#document";
399
+ }
400
+ function R(t) {
401
+ var e;
402
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
403
+ }
404
+ function E(t) {
405
+ var e;
406
+ return (e = (zt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
407
+ }
408
+ function zt(t) {
409
+ return it() ? t instanceof Node || t instanceof R(t).Node : !1;
410
+ }
411
+ function O(t) {
412
+ return it() ? t instanceof Element || t instanceof R(t).Element : !1;
413
+ }
414
+ function k(t) {
415
+ return it() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
416
+ }
417
+ function Et(t) {
418
+ return !it() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
419
+ }
420
+ function G(t) {
421
+ const {
422
+ overflow: e,
423
+ overflowX: o,
424
+ overflowY: n,
425
+ display: i
426
+ } = C(t);
427
+ return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(i);
428
+ }
429
+ function Oe(t) {
430
+ return ["table", "td", "th"].includes(I(t));
431
+ }
432
+ function st(t) {
433
+ return [":popover-open", ":modal"].some((e) => {
434
+ try {
435
+ return t.matches(e);
436
+ } catch {
437
+ return !1;
438
+ }
439
+ });
440
+ }
441
+ function mt(t) {
442
+ const e = ht(), o = O(t) ? C(t) : t;
443
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
444
+ }
445
+ function Ce(t) {
446
+ let e = P(t);
447
+ for (; k(e) && !H(e); ) {
448
+ if (mt(e))
449
+ return e;
450
+ if (st(e))
451
+ return null;
452
+ e = P(e);
453
+ }
454
+ return null;
455
+ }
456
+ function ht() {
457
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
458
+ }
459
+ function H(t) {
460
+ return ["html", "body", "#document"].includes(I(t));
461
+ }
462
+ function C(t) {
463
+ return R(t).getComputedStyle(t);
464
+ }
465
+ function rt(t) {
466
+ return O(t) ? {
467
+ scrollLeft: t.scrollLeft,
468
+ scrollTop: t.scrollTop
469
+ } : {
470
+ scrollLeft: t.scrollX,
471
+ scrollTop: t.scrollY
472
+ };
473
+ }
474
+ function P(t) {
475
+ if (I(t) === "html")
476
+ return t;
477
+ const e = (
478
+ // Step into the shadow DOM of the parent of a slotted node.
479
+ t.assignedSlot || // DOM Element detected.
480
+ t.parentNode || // ShadowRoot detected.
481
+ Et(t) && t.host || // Fallback.
482
+ E(t)
483
+ );
484
+ return Et(e) ? e.host : e;
485
+ }
486
+ function Wt(t) {
487
+ const e = P(t);
488
+ return H(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : k(e) && G(e) ? e : Wt(e);
489
+ }
490
+ function X(t, e, o) {
491
+ var n;
492
+ e === void 0 && (e = []), o === void 0 && (o = !0);
493
+ const i = Wt(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s = R(i);
494
+ if (r) {
495
+ const l = dt(s);
496
+ return e.concat(s, s.visualViewport || [], G(i) ? i : [], l && o ? X(l) : []);
497
+ }
498
+ return e.concat(i, X(i, [], o));
499
+ }
500
+ function dt(t) {
501
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
502
+ }
503
+ function Ht(t) {
504
+ const e = C(t);
505
+ let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
506
+ const i = k(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, l = tt(o) !== r || tt(n) !== s;
507
+ return l && (o = r, n = s), {
508
+ width: o,
509
+ height: n,
510
+ $: l
511
+ };
512
+ }
513
+ function gt(t) {
514
+ return O(t) ? t : t.contextElement;
515
+ }
516
+ function z(t) {
517
+ const e = gt(t);
518
+ if (!k(e))
519
+ return _(1);
520
+ const o = e.getBoundingClientRect(), {
521
+ width: n,
522
+ height: i,
523
+ $: r
524
+ } = Ht(e);
525
+ let s = (r ? tt(o.width) : o.width) / n, l = (r ? tt(o.height) : o.height) / i;
526
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
527
+ x: s,
528
+ y: l
529
+ };
530
+ }
531
+ const _e = /* @__PURE__ */ _(0);
532
+ function It(t) {
533
+ const e = R(t);
534
+ return !ht() || !e.visualViewport ? _e : {
535
+ x: e.visualViewport.offsetLeft,
536
+ y: e.visualViewport.offsetTop
537
+ };
538
+ }
539
+ function ke(t, e, o) {
540
+ return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
541
+ }
542
+ function $(t, e, o, n) {
543
+ e === void 0 && (e = !1), o === void 0 && (o = !1);
544
+ const i = t.getBoundingClientRect(), r = gt(t);
545
+ let s = _(1);
546
+ e && (n ? O(n) && (s = z(n)) : s = z(t));
547
+ const l = ke(r, o, n) ? It(r) : _(0);
548
+ let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, f = i.width / s.x, u = i.height / s.y;
549
+ if (r) {
550
+ const p = R(r), d = n && O(n) ? R(n) : n;
551
+ let m = p, g = dt(m);
552
+ for (; g && n && d !== m; ) {
553
+ const w = z(g), h = g.getBoundingClientRect(), v = C(g), b = h.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, A = h.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
554
+ c *= w.x, a *= w.y, f *= w.x, u *= w.y, c += b, a += A, m = R(g), g = dt(m);
555
+ }
556
+ }
557
+ return nt({
558
+ width: f,
559
+ height: u,
560
+ x: c,
561
+ y: a
562
+ });
563
+ }
564
+ function wt(t, e) {
565
+ const o = rt(t).scrollLeft;
566
+ return e ? e.left + o : $(E(t)).left + o;
567
+ }
568
+ function jt(t, e, o) {
569
+ o === void 0 && (o = !1);
570
+ const n = t.getBoundingClientRect(), i = n.left + e.scrollLeft - (o ? 0 : (
571
+ // RTL <body> scrollbar.
572
+ wt(t, n)
573
+ )), r = n.top + e.scrollTop;
574
+ return {
575
+ x: i,
576
+ y: r
577
+ };
578
+ }
579
+ function Ee(t) {
580
+ let {
581
+ elements: e,
582
+ rect: o,
583
+ offsetParent: n,
584
+ strategy: i
585
+ } = t;
586
+ const r = i === "fixed", s = E(n), l = e ? st(e.floating) : !1;
587
+ if (n === s || l && r)
588
+ return o;
589
+ let c = {
590
+ scrollLeft: 0,
591
+ scrollTop: 0
592
+ }, a = _(1);
593
+ const f = _(0), u = k(n);
594
+ if ((u || !u && !r) && ((I(n) !== "body" || G(s)) && (c = rt(n)), k(n))) {
595
+ const d = $(n);
596
+ a = z(n), f.x = d.x + n.clientLeft, f.y = d.y + n.clientTop;
597
+ }
598
+ const p = s && !u && !r ? jt(s, c, !0) : _(0);
599
+ return {
600
+ width: o.width * a.x,
601
+ height: o.height * a.y,
602
+ x: o.x * a.x - c.scrollLeft * a.x + f.x + p.x,
603
+ y: o.y * a.y - c.scrollTop * a.y + f.y + p.y
604
+ };
605
+ }
606
+ function Le(t) {
607
+ return Array.from(t.getClientRects());
608
+ }
609
+ function Te(t) {
610
+ const e = E(t), o = rt(t), n = t.ownerDocument.body, i = V(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = V(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
611
+ let s = -o.scrollLeft + wt(t);
612
+ const l = -o.scrollTop;
613
+ return C(n).direction === "rtl" && (s += V(e.clientWidth, n.clientWidth) - i), {
614
+ width: i,
615
+ height: r,
616
+ x: s,
617
+ y: l
618
+ };
619
+ }
620
+ function De(t, e) {
621
+ const o = R(t), n = E(t), i = o.visualViewport;
622
+ let r = n.clientWidth, s = n.clientHeight, l = 0, c = 0;
623
+ if (i) {
624
+ r = i.width, s = i.height;
625
+ const a = ht();
626
+ (!a || a && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
627
+ }
628
+ return {
629
+ width: r,
630
+ height: s,
631
+ x: l,
632
+ y: c
633
+ };
634
+ }
635
+ function Se(t, e) {
636
+ const o = $(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = k(t) ? z(t) : _(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, c = i * r.x, a = n * r.y;
637
+ return {
638
+ width: s,
639
+ height: l,
640
+ x: c,
641
+ y: a
642
+ };
643
+ }
644
+ function Lt(t, e, o) {
645
+ let n;
646
+ if (e === "viewport")
647
+ n = De(t, o);
648
+ else if (e === "document")
649
+ n = Te(E(t));
650
+ else if (O(e))
651
+ n = Se(e, o);
652
+ else {
653
+ const i = It(t);
654
+ n = {
655
+ x: e.x - i.x,
656
+ y: e.y - i.y,
657
+ width: e.width,
658
+ height: e.height
659
+ };
660
+ }
661
+ return nt(n);
662
+ }
663
+ function Ut(t, e) {
664
+ const o = P(t);
665
+ return o === e || !O(o) || H(o) ? !1 : C(o).position === "fixed" || Ut(o, e);
666
+ }
667
+ function Fe(t, e) {
668
+ const o = e.get(t);
669
+ if (o)
670
+ return o;
671
+ let n = X(t, [], !1).filter((l) => O(l) && I(l) !== "body"), i = null;
672
+ const r = C(t).position === "fixed";
673
+ let s = r ? P(t) : t;
674
+ for (; O(s) && !H(s); ) {
675
+ const l = C(s), c = mt(s);
676
+ !c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || G(s) && !c && Ut(t, s)) ? n = n.filter((f) => f !== s) : i = l, s = P(s);
677
+ }
678
+ return e.set(t, n), n;
679
+ }
680
+ function Pe(t) {
681
+ let {
682
+ element: e,
683
+ boundary: o,
684
+ rootBoundary: n,
685
+ strategy: i
686
+ } = t;
687
+ const s = [...o === "clippingAncestors" ? st(e) ? [] : Fe(e, this._c) : [].concat(o), n], l = s[0], c = s.reduce((a, f) => {
688
+ const u = Lt(e, f, i);
689
+ return a.top = V(u.top, a.top), a.right = ft(u.right, a.right), a.bottom = ft(u.bottom, a.bottom), a.left = V(u.left, a.left), a;
690
+ }, Lt(e, l, i));
691
+ return {
692
+ width: c.right - c.left,
693
+ height: c.bottom - c.top,
694
+ x: c.left,
695
+ y: c.top
696
+ };
697
+ }
698
+ function Be(t) {
699
+ const {
700
+ width: e,
701
+ height: o
702
+ } = Ht(t);
703
+ return {
704
+ width: e,
705
+ height: o
706
+ };
707
+ }
708
+ function $e(t, e, o) {
709
+ const n = k(e), i = E(e), r = o === "fixed", s = $(t, !0, r, e);
710
+ let l = {
711
+ scrollLeft: 0,
712
+ scrollTop: 0
713
+ };
714
+ const c = _(0);
715
+ if (n || !n && !r)
716
+ if ((I(e) !== "body" || G(i)) && (l = rt(e)), n) {
717
+ const p = $(e, !0, r, e);
718
+ c.x = p.x + e.clientLeft, c.y = p.y + e.clientTop;
719
+ } else
720
+ i && (c.x = wt(i));
721
+ const a = i && !n && !r ? jt(i, l) : _(0), f = s.left + l.scrollLeft - c.x - a.x, u = s.top + l.scrollTop - c.y - a.y;
722
+ return {
723
+ x: f,
724
+ y: u,
725
+ width: s.width,
726
+ height: s.height
727
+ };
728
+ }
729
+ function at(t) {
730
+ return C(t).position === "static";
731
+ }
732
+ function Tt(t, e) {
733
+ if (!k(t) || C(t).position === "fixed")
734
+ return null;
735
+ if (e)
736
+ return e(t);
737
+ let o = t.offsetParent;
738
+ return E(t) === o && (o = o.ownerDocument.body), o;
739
+ }
740
+ function Yt(t, e) {
741
+ const o = R(t);
742
+ if (st(t))
743
+ return o;
744
+ if (!k(t)) {
745
+ let i = P(t);
746
+ for (; i && !H(i); ) {
747
+ if (O(i) && !at(i))
748
+ return i;
749
+ i = P(i);
750
+ }
751
+ return o;
752
+ }
753
+ let n = Tt(t, e);
754
+ for (; n && Oe(n) && at(n); )
755
+ n = Tt(n, e);
756
+ return n && H(n) && at(n) && !mt(n) ? o : n || Ce(t) || o;
757
+ }
758
+ const Me = async function(t) {
759
+ const e = this.getOffsetParent || Yt, o = this.getDimensions, n = await o(t.floating);
760
+ return {
761
+ reference: $e(t.reference, await e(t.floating), t.strategy),
762
+ floating: {
763
+ x: 0,
764
+ y: 0,
765
+ width: n.width,
766
+ height: n.height
767
+ }
768
+ };
769
+ };
770
+ function Ne(t) {
771
+ return C(t).direction === "rtl";
772
+ }
773
+ const Ve = {
774
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ee,
775
+ getDocumentElement: E,
776
+ getClippingRect: Pe,
777
+ getOffsetParent: Yt,
778
+ getElementRects: Me,
779
+ getClientRects: Le,
780
+ getDimensions: Be,
781
+ getScale: z,
782
+ isElement: O,
783
+ isRTL: Ne
784
+ };
785
+ function qt(t, e) {
786
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
787
+ }
788
+ function ze(t, e) {
789
+ let o = null, n;
790
+ const i = E(t);
791
+ function r() {
792
+ var l;
793
+ clearTimeout(n), (l = o) == null || l.disconnect(), o = null;
794
+ }
795
+ function s(l, c) {
796
+ l === void 0 && (l = !1), c === void 0 && (c = 1), r();
797
+ const a = t.getBoundingClientRect(), {
798
+ left: f,
799
+ top: u,
800
+ width: p,
801
+ height: d
802
+ } = a;
803
+ if (l || e(), !p || !d)
804
+ return;
805
+ const m = J(u), g = J(i.clientWidth - (f + p)), w = J(i.clientHeight - (u + d)), h = J(f), b = {
806
+ rootMargin: -m + "px " + -g + "px " + -w + "px " + -h + "px",
807
+ threshold: V(0, ft(1, c)) || 1
808
+ };
809
+ let A = !0;
810
+ function y(j) {
811
+ const M = j[0].intersectionRatio;
812
+ if (M !== c) {
813
+ if (!A)
814
+ return s();
815
+ M ? s(!1, M) : n = setTimeout(() => {
816
+ s(!1, 1e-7);
817
+ }, 1e3);
818
+ }
819
+ M === 1 && !qt(a, t.getBoundingClientRect()) && s(), A = !1;
820
+ }
821
+ try {
822
+ o = new IntersectionObserver(y, {
823
+ ...b,
824
+ // Handle <iframe>s
825
+ root: i.ownerDocument
826
+ });
827
+ } catch {
828
+ o = new IntersectionObserver(y, b);
829
+ }
830
+ o.observe(t);
831
+ }
832
+ return s(!0), r;
833
+ }
834
+ function We(t, e, o, n) {
835
+ n === void 0 && (n = {});
836
+ const {
837
+ ancestorScroll: i = !0,
838
+ ancestorResize: r = !0,
839
+ elementResize: s = typeof ResizeObserver == "function",
840
+ layoutShift: l = typeof IntersectionObserver == "function",
841
+ animationFrame: c = !1
842
+ } = n, a = gt(t), f = i || r ? [...a ? X(a) : [], ...X(e)] : [];
843
+ f.forEach((h) => {
844
+ i && h.addEventListener("scroll", o, {
845
+ passive: !0
846
+ }), r && h.addEventListener("resize", o);
847
+ });
848
+ const u = a && l ? ze(a, o) : null;
849
+ let p = -1, d = null;
850
+ s && (d = new ResizeObserver((h) => {
851
+ let [v] = h;
852
+ v && v.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
853
+ var b;
854
+ (b = d) == null || b.observe(e);
855
+ })), o();
856
+ }), a && !c && d.observe(a), d.observe(e));
857
+ let m, g = c ? $(t) : null;
858
+ c && w();
859
+ function w() {
860
+ const h = $(t);
861
+ g && !qt(g, h) && o(), g = h, m = requestAnimationFrame(w);
862
+ }
863
+ return o(), () => {
864
+ var h;
865
+ f.forEach((v) => {
866
+ i && v.removeEventListener("scroll", o), r && v.removeEventListener("resize", o);
867
+ }), u == null || u(), (h = d) == null || h.disconnect(), d = null, c && cancelAnimationFrame(m);
868
+ };
869
+ }
870
+ const Dt = Re, St = be, Ft = (t, e, o) => {
871
+ const n = /* @__PURE__ */ new Map(), i = {
872
+ platform: Ve,
873
+ ...o
874
+ }, r = {
875
+ ...i.platform,
876
+ _c: n
877
+ };
878
+ return ye(t, e, {
879
+ ...i,
880
+ platform: r
881
+ });
882
+ }, He = ["data-opened"], Ie = {
883
+ key: 0,
884
+ class: "text-sm text-secondary-content px-3 py-2 text-left"
885
+ }, hn = /* @__PURE__ */ Bt({
886
+ __name: "OneDropdownAuto",
887
+ props: Gt,
888
+ emits: ["open", "close"],
889
+ setup(t, { emit: e }) {
890
+ const o = t, n = Q(!1), i = Q(null), r = Q(null);
891
+ let s = null;
892
+ Zt(n, (f) => {
893
+ f && r.value && i.value ? (Ft(r.value, i.value, {
894
+ placement: o.stick ? o.stick : "bottom-start",
895
+ // Розташування меню нижче кнопки, вирівняне зліва
896
+ middleware: [Dt(5), St()]
897
+ // Відступ у 4px від кнопки
898
+ }).then(({ x: u, y: p }) => {
899
+ Object.assign(i.value.style, {
900
+ left: `${u}px`,
901
+ top: `${p}px`
902
+ });
903
+ }), s = We(r.value, i.value, () => {
904
+ Ft(r.value, i.value, {
905
+ placement: o.stick ? o.stick : "bottom-start",
906
+ middleware: [Dt(4), St()]
907
+ }).then(({ x: u, y: p }) => {
908
+ Object.assign(i.value.style, {
909
+ left: `${u}px`,
910
+ top: `${p}px`
911
+ });
912
+ });
913
+ })) : s && (s(), s = null);
914
+ }), te(() => {
915
+ s && s();
916
+ });
917
+ const l = e, c = () => {
918
+ n.value = !n.value, n.value ? l("open") : l("close");
919
+ };
920
+ ee("OneDropdown", {
921
+ onToggle: c
922
+ });
923
+ const a = $t(() => [
924
+ "absolute z-10 w-fit rounded-md bg-white",
925
+ "py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none",
926
+ "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
927
+ ]);
928
+ return (f, u) => (L(), F("div", {
929
+ class: "relative inline-block",
930
+ "data-opened": n.value
931
+ }, [
932
+ x("div", {
933
+ ref_key: "buttonRef",
934
+ ref: r
935
+ }, [
936
+ At(f.$slots, "button", Rt(Ot({ onToggle: c, isExpanded: n.value })))
937
+ ], 512),
938
+ n.value ? (L(), F("div", {
939
+ key: 0,
940
+ class: "fixed top-0 left-0 w-screen h-screen z-10",
941
+ onClick: c
942
+ })) : Z("", !0),
943
+ ne(x("div", {
944
+ ref_key: "menuRef",
945
+ ref: i,
946
+ class: Mt(["menu", a.value]),
947
+ role: "menu",
948
+ "aria-orientation": "vertical",
949
+ tabindex: "-1",
950
+ style: { display: "none" }
951
+ }, [
952
+ f.title ? (L(), F("div", Ie, S(f.title), 1)) : Z("", !0),
953
+ At(f.$slots, "menu", Rt(Ot({ onToggle: c })))
954
+ ], 2), [
955
+ [oe, n.value]
956
+ ])
957
+ ], 8, He));
958
+ }
959
+ }), je = {}, Ue = { class: "border-t border-secondary-stroke my-1" };
960
+ function Ye(t, e) {
961
+ return L(), F("div", Ue);
11
962
  }
12
- const ie = /* @__PURE__ */ N(E, [["render", L]]), H = ["onClick"], I = { class: "grid" }, P = { class: "font-semibold px-3" }, T = { class: "rounded-lg m-3 border" }, U = {
963
+ const gn = /* @__PURE__ */ ae(je, [["render", Ye]]), qe = ["onClick"], Xe = { class: "grid" }, Ge = { class: "font-semibold px-3" }, Ke = { class: "rounded-lg m-3 border" }, Je = {
13
964
  class: "space-x-2 flex items-center px-3 py-2",
14
965
  style: { width: "300px" }
15
- }, j = { class: "flex-shrink-0" }, q = { class: "w-full text-left" }, J = { class: "flex-shrink-0" }, K = { class: "px-3 py-2" }, Q = { class: "text-secondary-content text-left pb-1 text-sm uppercase" }, R = {
966
+ }, Qe = { class: "flex-shrink-0" }, Ze = { class: "w-full text-left" }, tn = { class: "flex-shrink-0" }, en = { class: "px-3 py-2" }, nn = { class: "text-secondary-content text-left pb-1 text-sm uppercase" }, on = {
16
967
  key: 0,
17
968
  class: "space-y-2"
18
- }, W = ["onClick"], X = { class: "pl-2" }, Y = { class: "text-sm mt-1" }, Z = { class: "text-xs mt-1" }, v = 3, ce = /* @__PURE__ */ O({
969
+ }, sn = ["onClick"], rn = { class: "pl-2" }, ln = { class: "text-sm mt-1" }, cn = { class: "text-xs mt-1" }, Pt = 3, wn = /* @__PURE__ */ Bt({
19
970
  __name: "OneBrowserMenuGrid",
20
- props: w,
21
- setup(u) {
22
- const t = u, x = () => {
23
- typeof t.onChange == "function" && t.onChange();
24
- }, i = z(!1), b = F(() => t.apps ? i.value ? t.apps : t.apps.slice(0, v) : []), g = () => {
25
- i.value = !i.value;
26
- }, k = (s) => {
27
- typeof t.onApp == "function" && t.onApp(s);
971
+ props: Kt,
972
+ setup(t) {
973
+ const e = t, o = () => {
974
+ typeof e.onChange == "function" && e.onChange();
975
+ }, n = Q(!1), i = $t(() => e.apps ? n.value ? e.apps : e.apps.slice(0, Pt) : []), r = () => {
976
+ n.value = !n.value;
977
+ }, s = (l) => {
978
+ typeof e.onApp == "function" && e.onApp(l);
28
979
  };
29
- return (s, c) => (r(), $(A, { stick: "right" }, {
30
- button: _(({ onToggle: a, isExpanded: d }) => [
31
- e("button", {
980
+ return (l, c) => (L(), ie(Jt, { stick: "right" }, {
981
+ button: Ct(({ onToggle: a, isExpanded: f }) => [
982
+ x("button", {
32
983
  onClick: a,
33
- class: B(["p-1 rounded-md hover:bg-secondary-10", [d ? "bg-secondary-25" : ""]])
984
+ class: Mt(["p-1 rounded-md hover:bg-secondary-10", [f ? "bg-secondary-25" : ""]])
34
985
  }, [
35
- p(M(C), {
986
+ ct(se(Qt), {
36
987
  class: "text-secondary-base",
37
- style: D(`width: ${s.iconSize}px; height: ${s.iconSize}px`)
988
+ style: re(`width: ${l.iconSize}px; height: ${l.iconSize}px`)
38
989
  }, null, 8, ["style"])
39
- ], 10, H)
990
+ ], 10, qe)
40
991
  ]),
41
- menu: _(() => {
42
- var a, d, m, h;
992
+ menu: Ct(() => {
993
+ var a, f, u, p;
43
994
  return [
44
- e("div", I, [
45
- e("div", P, o((a = s.workspace) == null ? void 0 : a.title), 1),
46
- e("div", T, [
47
- e("div", U, [
48
- e("div", j, [
49
- p(y, {
50
- text: ((d = s.workspace) == null ? void 0 : d.name) || "",
51
- src: (m = s.workspace) == null ? void 0 : m.photo_url,
995
+ x("div", Xe, [
996
+ x("div", Ge, S((a = l.workspace) == null ? void 0 : a.title), 1),
997
+ x("div", Ke, [
998
+ x("div", Je, [
999
+ x("div", Qe, [
1000
+ ct(_t, {
1001
+ text: ((f = l.workspace) == null ? void 0 : f.name) || "",
1002
+ src: (u = l.workspace) == null ? void 0 : u.photo_url,
52
1003
  size: 44,
53
1004
  rounded: !1,
54
1005
  class: "mx-auto"
55
1006
  }, null, 8, ["text", "src"])
56
1007
  ]),
57
- e("div", q, o((h = s.workspace) == null ? void 0 : h.name), 1),
58
- e("div", J, [
59
- e("button", {
1008
+ x("div", Ze, S((p = l.workspace) == null ? void 0 : p.name), 1),
1009
+ x("div", tn, [
1010
+ x("button", {
60
1011
  class: "text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",
61
- onClick: x
62
- }, o(s.changeLabel), 1)
1012
+ onClick: o
1013
+ }, S(l.changeLabel), 1)
63
1014
  ])
64
1015
  ]),
65
- c[0] || (c[0] = e("hr", null, null, -1)),
66
- c[1] || (c[1] = e("div", {
1016
+ c[0] || (c[0] = x("hr", null, null, -1)),
1017
+ c[1] || (c[1] = x("div", {
67
1018
  class: "text-center py-2",
68
1019
  style: { "font-size": "10px" }
69
1020
  }, "Керувати робочими просторами", -1))
70
1021
  ])
71
1022
  ]),
72
- e("div", K, [
73
- e("div", Q, o(s.appsTitle), 1),
74
- e("div", null, [
75
- s.apps && s.apps.length ? (r(), l("div", R, [
76
- (r(!0), l(S, null, V(b.value, (n) => (r(), l("div", {
77
- key: n.id,
78
- onClick: (ee) => k(n),
1023
+ x("div", en, [
1024
+ x("div", nn, S(l.appsTitle), 1),
1025
+ x("div", null, [
1026
+ l.apps && l.apps.length ? (L(), F("div", on, [
1027
+ (L(!0), F(le, null, ce(i.value, (d) => (L(), F("div", {
1028
+ key: d.id,
1029
+ onClick: (m) => s(d),
79
1030
  class: "flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"
80
1031
  }, [
81
- p(y, {
82
- text: n.name,
83
- src: n.photo_url,
1032
+ ct(_t, {
1033
+ text: d.name,
1034
+ src: d.photo_url,
84
1035
  size: 44,
85
1036
  rounded: !1
86
1037
  }, null, 8, ["text", "src"]),
87
- e("div", X, [
88
- e("p", Y, o(n.name), 1),
89
- e("p", Z, o(n.short), 1)
1038
+ x("div", rn, [
1039
+ x("p", ln, S(d.name), 1),
1040
+ x("p", cn, S(d.short), 1)
90
1041
  ])
91
- ], 8, W))), 128))
92
- ])) : f("", !0),
93
- s.apps && s.apps.length > v ? (r(), l("button", {
1042
+ ], 8, sn))), 128))
1043
+ ])) : Z("", !0),
1044
+ l.apps && l.apps.length > Pt ? (L(), F("button", {
94
1045
  key: 1,
95
- onClick: g,
1046
+ onClick: r,
96
1047
  class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"
97
- }, o(i.value ? "Приховати" : "Дивитися всі"), 1)) : f("", !0)
1048
+ }, S(n.value ? "Приховати" : "Дивитися всі"), 1)) : Z("", !0)
98
1049
  ])
99
1050
  ])
100
1051
  ];
@@ -104,11 +1055,12 @@ const ie = /* @__PURE__ */ N(E, [["render", L]]), H = ["onClick"], I = { class:
104
1055
  }
105
1056
  });
106
1057
  export {
107
- pe as OneBrowserMenu,
108
- ce as OneBrowserMenuGrid,
109
- A as OneDropdown,
110
- ie as OneDropdownDivider,
111
- ue as OneDropdownItem,
112
- me as OneHelpMenu,
113
- he as OneUserMenu
1058
+ vn as OneBrowserMenu,
1059
+ wn as OneBrowserMenuGrid,
1060
+ Jt as OneDropdown,
1061
+ hn as OneDropdownAuto,
1062
+ gn as OneDropdownDivider,
1063
+ bn as OneDropdownItem,
1064
+ An as OneHelpMenu,
1065
+ Rn as OneUserMenu
114
1066
  };