@figurosity/consumer-controls 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4813 @@
1
+ import { ref as y, watch as ce, onMounted as J, openBlock as _, createElementBlock as se, toDisplayString as be, defineComponent as M, computed as u, h as r, resolveComponent as A, createElementVNode as x, createVNode as D, createBlock as L, normalizeClass as Y, withCtx as S, Transition as ie, withDirectives as R, unref as Z, vShow as O, createTextVNode as at, createCommentVNode as le, renderSlot as I, normalizeStyle as pe, inject as sn, onBeforeUnmount as Me, nextTick as we, provide as cn, onUnmounted as At, onBeforeMount as rn, toRefs as un, useSlots as dn, TransitionGroup as ot, useModel as Ue, resolveDynamicComponent as mn, withModifiers as yt, mergeModels as fn } from "vue";
2
+ import ge from "@tweenjs/tween.js";
3
+ import { addCommas as kt, slugify as Ce, DEFAULT as ke, useEventBus as lt, Rect as Pe, NOTHING as me, VIEWS as _t, TOOLBAR as $t } from "@figurosity/toolbox";
4
+ import { QIcon as qe, QBtn as he, useQuasar as Ve, TouchPan as vn, QCard as gn, QCardSection as Re, QResizeObserver as Xe, QDrawer as bn, QExpansionItem as Ke, QPageSticky as hn, QSlideTransition as st, QDialog as yn, QItem as qt, QItemSection as Le, QSlider as kn, QAvatar as pn, QItemLabel as wn, QToggle as Cn, getCssVar as Be, QLayout as Bn, QPageContainer as Vn } from "quasar";
5
+ import { chevronLeft as xn, eyeDropper as Tt, lock as Je, settings as zt, menuAlt as ct, move as Dn, refresh as et, zoomIn as it, spin as rt, saturation as ut, contrast as dt, brightness as mt, grid as It, zoomOut as Sn, mark as ft } from "@figurosity/icons";
6
+ import { matFiberManualRecord as je, matKeyboardArrowDown as Lt } from "@quasar/extras/material-icons";
7
+ import { ChromePicker as An } from "vue-color";
8
+ import { onBeforeRouteLeave as _n, useRoute as $n } from "vue-router";
9
+ import { EventManager as Mt } from "mjolnir.js";
10
+ const qn = { class: "c-animated-number" }, Nt = {
11
+ __name: "CAnimatedNumber",
12
+ props: {
13
+ total: Number,
14
+ speed: {
15
+ type: Number,
16
+ default: 800
17
+ },
18
+ delay: {
19
+ type: Number,
20
+ default: 1
21
+ },
22
+ loading: Boolean
23
+ },
24
+ setup(e) {
25
+ const a = y(0), n = y(0), t = y({}), o = e, s = y(window), c = (v) => {
26
+ n.value = s.value.requestAnimationFrame(c), ge.update(v);
27
+ }, i = (v, h, k = null) => {
28
+ l();
29
+ const f = { num: h }, w = { num: v };
30
+ t.value = new ge.Tween(f).to(w, o.speed).delay(o.delay).easing(ge.Easing.Quadratic.Out).onUpdate(m).onComplete(d).start(), c();
31
+ }, l = () => {
32
+ t.value && t.value.stop && (t.value.stop(), t.value = null);
33
+ }, d = () => {
34
+ s.value.cancelAnimationFrame(n.value);
35
+ }, m = (v) => {
36
+ a.value = kt(v.num.toFixed(0));
37
+ };
38
+ return ce(() => o.total, (v, h) => i(v, h)), J(() => a.value = kt(o.total)), (v, h) => (_(), se("span", qn, be(a.value), 1));
39
+ }
40
+ }, Tn = M({
41
+ name: "CButtonBoolean",
42
+ props: {
43
+ dark: { type: Boolean, default: !1 },
44
+ disable: { type: Boolean, default: !1 },
45
+ selected: { type: Boolean, default: !1 },
46
+ size: {
47
+ type: String,
48
+ default: "lg",
49
+ validator: (e) => ["sm", "lg"].includes(e)
50
+ },
51
+ type: {
52
+ type: String,
53
+ default: "radio",
54
+ validator: (e) => ["radio", "checkbox"].includes(e)
55
+ }
56
+ },
57
+ setup(e, { slots: a, emit: n }) {
58
+ function t() {
59
+ const s = {
60
+ class: u(() => [
61
+ "c-button-boolean",
62
+ `c-button-boolean--${e.type}`,
63
+ `c-button-boolean--${e.size}`,
64
+ { "c-button-boolean--selected": e.selected },
65
+ { "c-button-boolean--disable": e.disable },
66
+ { dark: e.dark }
67
+ ]).value
68
+ }, c = [];
69
+ if (e.type === "radio" && c.push(r("div")), e.type === "checkbox") {
70
+ const i = e.size === "sm" ? "10px" : "12px";
71
+ c.push(r(qe, { name: "f_checkmark", size: i }));
72
+ }
73
+ return r("div", s, c);
74
+ }
75
+ return () => t();
76
+ }
77
+ }), Pt = (e) => {
78
+ let a, n, t;
79
+ return e.match(/^rgb/) ? (e = e.match(
80
+ /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/
81
+ ), a = +e[1], n = +e[2], t = +e[3]) : (e = +("0x" + e.slice(1).replace(e.length < 5 && /./g, "$&$&")), a = e >> 16, n = e >> 8 & 255, t = e & 255), Math.sqrt(0.299 * (a * a) + 0.587 * (n * n) + 0.114 * (t * t)) > 186;
82
+ }, He = (e, a, n) => Math.min(n, Math.max(a, e)), zn = (e) => {
83
+ if (/^rgb/.test(e)) {
84
+ const t = e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/);
85
+ return { r: +t[1], g: +t[2], b: +t[3] };
86
+ }
87
+ let a = e.replace("#", "");
88
+ a.length === 3 && (a = a.split("").map((t) => t + t).join(""));
89
+ const n = parseInt(a, 16);
90
+ return { r: n >> 16 & 255, g: n >> 8 & 255, b: n & 255 };
91
+ }, In = ({ r: e, g: a, b: n }) => "#" + [e, a, n].map((t) => t.toString(16).padStart(2, "0")).join(""), Ln = ({ r: e, g: a, b: n }) => {
92
+ e /= 255, a /= 255, n /= 255;
93
+ const t = Math.max(e, a, n), o = Math.min(e, a, n);
94
+ let s = 0, c = 0, i = (t + o) / 2;
95
+ if (t !== o) {
96
+ const l = t - o;
97
+ switch (c = i > 0.5 ? l / (2 - t - o) : l / (t + o), t) {
98
+ case e:
99
+ s = (a - n) / l + (a < n ? 6 : 0);
100
+ break;
101
+ // <-- fixed (+0, not +1)
102
+ case a:
103
+ s = (n - e) / l + 2;
104
+ break;
105
+ case n:
106
+ s = (e - a) / l + 4;
107
+ break;
108
+ }
109
+ s *= 60;
110
+ }
111
+ return { h: s, s: c, l: i };
112
+ }, Mn = ({ h: e, s: a, l: n }) => {
113
+ const t = (1 - Math.abs(2 * n - 1)) * a, o = t * (1 - Math.abs(e / 60 % 2 - 1)), s = n - t / 2;
114
+ let c = 0, i = 0, l = 0;
115
+ return 0 <= e && e < 60 ? [c, i, l] = [t, o, 0] : 60 <= e && e < 120 ? [c, i, l] = [o, t, 0] : 120 <= e && e < 180 ? [c, i, l] = [0, t, o] : 180 <= e && e < 240 ? [c, i, l] = [0, o, t] : 240 <= e && e < 300 ? [c, i, l] = [o, 0, t] : [c, i, l] = [t, 0, o], {
116
+ r: Math.round(He((c + s) * 255, 0, 255)),
117
+ g: Math.round(He((i + s) * 255, 0, 255)),
118
+ b: Math.round(He((l + s) * 255, 0, 255))
119
+ };
120
+ }, pt = (e, a) => {
121
+ const n = zn(e), t = Ln(n);
122
+ return t.l = He(t.l + a / 100, 0, 1), In(Mn(t));
123
+ }, Nn = (e, { angle: a = 135, stop1: n = 35, stop2: t = 95, delta: o = 12 } = {}) => {
124
+ const s = Pt(e), c = s ? e : pt(e, +o), i = s ? pt(e, -o) : e;
125
+ return `linear-gradient(${a}deg, ${c} ${n}%, ${i} ${t}%)`;
126
+ }, Pn = M({
127
+ name: "CBaseButton",
128
+ props: {
129
+ access: String,
130
+ dark: Boolean,
131
+ color: { default: "#ffffff", type: String },
132
+ disable: Boolean,
133
+ hasAccess: {
134
+ type: Boolean,
135
+ default: !0
136
+ },
137
+ icon: String,
138
+ image: String,
139
+ label: String,
140
+ type: {
141
+ type: String,
142
+ default: "radio",
143
+ validator: (e) => ["radio", "checkbox", "none", "borderless"].includes(e)
144
+ },
145
+ selected: Boolean,
146
+ size: {
147
+ type: String,
148
+ default: "lg",
149
+ validator: (e) => ["sm", "lg"].includes(e)
150
+ }
151
+ },
152
+ emits: ["click", "blockAccess"],
153
+ setup(e, { slots: a, emit: n }) {
154
+ const t = () => {
155
+ if (!e.disable) {
156
+ if (e.hasAccess) {
157
+ n("click");
158
+ return;
159
+ }
160
+ n("blockAccess", e.access);
161
+ }
162
+ }, o = u(() => [
163
+ "c-base-button",
164
+ { row: e.size === "sm" },
165
+ `c-base-button--${e.size}`,
166
+ `c-base-button--${e.type}`,
167
+ { selected: e.selected },
168
+ { "c-base-button--disable": e.disable },
169
+ { dark: e.dark }
170
+ ]), s = u(() => ({
171
+ minWidth: e.size === "sm" ? "60px" : "90px",
172
+ maxWidth: e.size === "sm" ? "60px" : "90px"
173
+ }));
174
+ function c() {
175
+ const i = {
176
+ class: o.value,
177
+ onClick: t,
178
+ style: s.value,
179
+ "data-cy": "c-button-" + Ce(e.label)
180
+ }, l = [], d = u(() => ({
181
+ "c-base-button--icon": !0,
182
+ "col-shrink": e.size === "sm",
183
+ "flex justify-center items-center ": e.size === "sm",
184
+ "q-pt-xs": !0
185
+ })), m = u(() => ({
186
+ "c-base-button--image": !0,
187
+ "col-shrink": e.size === "sm",
188
+ "flex justify-center items-center ": e.size === "sm"
189
+ }));
190
+ if (e.icon && !e.image) {
191
+ const v = Pt(e.color), h = {
192
+ class: d.value
193
+ }, k = {
194
+ name: e.icon,
195
+ size: e.size === "sm" ? "38px" : "52px",
196
+ class: v ? "light" : "dark"
197
+ }, f = u(() => ({
198
+ background: Nn(e.color)
199
+ })), w = {
200
+ class: "c-base-button--background"
201
+ };
202
+ e.type !== "borderless" && (w.style = f.value), l.push(
203
+ r("div", h, [r("div", w), r(qe, k)])
204
+ );
205
+ }
206
+ if (e.image) {
207
+ const v = {
208
+ class: { ...m.value }
209
+ }, h = {
210
+ class: "c-base-button--overlay"
211
+ }, k = {
212
+ class: "unselectable",
213
+ src: e.image
214
+ };
215
+ l.push(
216
+ r("div", v, [r("div", h), r("img", k)])
217
+ );
218
+ }
219
+ if (e.label) {
220
+ const v = u(() => ({
221
+ "col flex items-center unselectable": !0,
222
+ "q-pl-md": !e.icon && !e.image
223
+ }));
224
+ l.push(
225
+ r("div", { class: v.value }, [
226
+ r("div", { class: "c-base-button--label" }, e.label)
227
+ ])
228
+ );
229
+ }
230
+ if (e.type === "radio" || e.type === "checkbox") {
231
+ const v = {
232
+ class: "col-shrink flex items-center justify center",
233
+ style: "min-width: 35px;"
234
+ };
235
+ l.push(
236
+ r("div", v, [
237
+ r(Tn, {
238
+ disable: e.disable,
239
+ selected: e.selected,
240
+ size: e.size,
241
+ type: e.type
242
+ })
243
+ ])
244
+ );
245
+ }
246
+ return r("div", i, l);
247
+ }
248
+ return () => c();
249
+ }
250
+ }), Rn = M({
251
+ name: "CBaseButtons",
252
+ setup(e, { slots: a, emit: n }) {
253
+ function t() {
254
+ return r("div", {
255
+ class: "c-base-buttons row justify-center"
256
+ }, a.default ? a.default() : []);
257
+ }
258
+ return () => t();
259
+ }
260
+ }), vt = (e, a) => {
261
+ const n = e.__vccOpts || e;
262
+ for (const [t, o] of a)
263
+ n[t] = o;
264
+ return n;
265
+ }, On = {
266
+ name: "CCounter.vue",
267
+ components: { CAnimatedNumber: Nt },
268
+ props: {
269
+ title: String,
270
+ total: Number
271
+ }
272
+ }, En = { class: "c-counter" }, Hn = { class: "c-counter-title" };
273
+ function Un(e, a, n, t, o, s) {
274
+ const c = A("c-animated-number");
275
+ return _(), se("div", En, [
276
+ x("span", Hn, be(n.title), 1),
277
+ D(c, {
278
+ class: "c-counter-count",
279
+ total: n.total
280
+ }, null, 8, ["total"])
281
+ ]);
282
+ }
283
+ const Fn = /* @__PURE__ */ vt(On, [["render", Un]]), Rt = {
284
+ __name: "CDrawerHeader",
285
+ props: {
286
+ bottom: Boolean,
287
+ countTitle: String,
288
+ count: Number,
289
+ title: String,
290
+ icon: String,
291
+ selected: Boolean,
292
+ to: String,
293
+ toText: String,
294
+ dark: Boolean
295
+ },
296
+ setup(e) {
297
+ return (a, n) => {
298
+ const t = A("q-icon"), o = A("q-toolbar-title"), s = A("q-toolbar");
299
+ return _(), L(s, {
300
+ class: Y(["c-drawer-header", { dark: e.dark }])
301
+ }, {
302
+ default: S(() => [
303
+ D(o, null, {
304
+ default: S(() => [
305
+ x("span", {
306
+ class: Y(["c-drawer-header-title unselectable", { bottom: e.bottom }])
307
+ }, [
308
+ D(ie, { name: "fade" }, {
309
+ default: S(() => [
310
+ R(D(t, {
311
+ class: "c-drawer-header-indicator",
312
+ color: "primary",
313
+ name: Z(je)
314
+ }, null, 8, ["name"]), [
315
+ [O, e.selected]
316
+ ])
317
+ ]),
318
+ _: 1
319
+ }),
320
+ at(" " + be(e.title) + "  ", 1),
321
+ e.icon ? (_(), L(t, {
322
+ key: 0,
323
+ size: "26px",
324
+ name: e.icon
325
+ }, null, 8, ["name"])) : le("", !0)
326
+ ], 2)
327
+ ]),
328
+ _: 1
329
+ }),
330
+ e.countTitle ? (_(), L(Fn, {
331
+ key: 0,
332
+ title: e.countTitle,
333
+ total: e.count
334
+ }, null, 8, ["title", "total"])) : le("", !0)
335
+ ]),
336
+ _: 1
337
+ }, 8, ["class"]);
338
+ };
339
+ }
340
+ }, jn = {
341
+ name: "CBottomDrawer.vue",
342
+ props: {
343
+ modelValue: Boolean
344
+ },
345
+ components: {
346
+ CDrawerHeader: Rt
347
+ },
348
+ computed: {
349
+ dialog: {
350
+ get() {
351
+ return this.modelValue;
352
+ },
353
+ set(e) {
354
+ this.$emit("update:modelValue", e);
355
+ }
356
+ }
357
+ },
358
+ emits: ["input"],
359
+ methods: {
360
+ addListeners() {
361
+ this.$nextTick(() => {
362
+ const e = this.$refs.dialog.$el;
363
+ e.addEventListener("DOMMouseScroll", this.mouseWheel), e.addEventListener("mousewheel", this.mouseWheel), e.addEventListener("onmousewheel", this.mouseWheel);
364
+ });
365
+ },
366
+ mouseWheel(e) {
367
+ e.preventDefault();
368
+ },
369
+ removeListeners() {
370
+ const e = this.$refs.dialog.$el;
371
+ e && (e.removeEventListener("DOMMouseScroll", this.mouseWheel), e.removeEventListener("mousewheel", this.mouseWheel), e.removeEventListener("onmousewheel", this.mouseWheel));
372
+ }
373
+ },
374
+ beforeDestroy() {
375
+ this.removeListeners();
376
+ },
377
+ watch: {
378
+ dialog(e) {
379
+ if (e)
380
+ return this.addListeners();
381
+ this.removeListeners();
382
+ }
383
+ }
384
+ };
385
+ function Wn(e, a, n, t, o, s) {
386
+ const c = A("q-dialog");
387
+ return _(), L(c, {
388
+ class: "c-bottom-drawer",
389
+ "full-width": "",
390
+ position: "bottom",
391
+ dark: "",
392
+ seamless: "",
393
+ square: "",
394
+ modelValue: s.dialog,
395
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => s.dialog = i),
396
+ ref: "dialog"
397
+ }, {
398
+ default: S(() => [
399
+ I(e.$slots, "default")
400
+ ]),
401
+ _: 3
402
+ }, 8, ["modelValue"]);
403
+ }
404
+ const Ot = /* @__PURE__ */ vt(jn, [["render", Wn]]), Qn = { class: "c-drawer-header-title unselectable" }, Gn = { class: "q-pr-lg" }, Et = {
405
+ __name: "CBottomDrawerHeader",
406
+ props: {
407
+ title: String,
408
+ icon: String,
409
+ selected: Boolean,
410
+ dark: Boolean
411
+ },
412
+ setup(e) {
413
+ return (a, n) => {
414
+ const t = A("q-icon"), o = A("q-toolbar-title"), s = A("q-toolbar");
415
+ return _(), L(s, {
416
+ class: Y(["c-drawer-header", { dark: e.dark }])
417
+ }, {
418
+ default: S(() => [
419
+ D(o, null, {
420
+ default: S(() => [
421
+ x("span", Qn, [
422
+ D(ie, { name: "fade" }, {
423
+ default: S(() => [
424
+ R(D(t, {
425
+ class: "c-drawer-header-indicator",
426
+ color: "primary",
427
+ name: Z(je)
428
+ }, null, 8, ["name"]), [
429
+ [O, e.selected]
430
+ ])
431
+ ]),
432
+ _: 1
433
+ }),
434
+ at(" " + be(e.title) + "  ", 1),
435
+ e.icon ? (_(), L(t, {
436
+ key: 0,
437
+ size: "26px",
438
+ name: e.icon
439
+ }, null, 8, ["name"])) : le("", !0)
440
+ ])
441
+ ]),
442
+ _: 1
443
+ }),
444
+ x("div", Gn, [
445
+ I(a.$slots, "default")
446
+ ])
447
+ ]),
448
+ _: 3
449
+ }, 8, ["class"]);
450
+ };
451
+ }
452
+ }, Yn = {
453
+ class: "c-bottom-drawer-container-default",
454
+ ref: "drawers"
455
+ }, Zn = {
456
+ __name: "CBottomDrawerContainer",
457
+ props: {
458
+ dark: Boolean,
459
+ height: {
460
+ type: Number,
461
+ default: 200
462
+ },
463
+ selected: Boolean,
464
+ show: Boolean,
465
+ title: String
466
+ },
467
+ setup(e) {
468
+ const a = e, n = u(() => ({
469
+ height: a.height + "px"
470
+ }));
471
+ return (t, o) => (_(), L(ie, { name: "fade" }, {
472
+ default: S(() => [
473
+ R(x("div", {
474
+ class: Y(["c-bottom-drawer-container", { dark: e.dark }]),
475
+ ref: "bottom",
476
+ style: pe(n.value)
477
+ }, [
478
+ x("div", Yn, [
479
+ D(Et, {
480
+ title: e.title,
481
+ selected: e.selected,
482
+ dark: e.dark
483
+ }, {
484
+ default: S(() => [
485
+ I(t.$slots, "bottomDrawerTop")
486
+ ]),
487
+ _: 3
488
+ }, 8, ["title", "selected", "dark"]),
489
+ I(t.$slots, "default")
490
+ ], 512)
491
+ ], 6), [
492
+ [O, e.show]
493
+ ])
494
+ ]),
495
+ _: 3
496
+ }));
497
+ }
498
+ }, We = M({
499
+ name: "CButton",
500
+ props: {
501
+ access: String,
502
+ circle: Boolean,
503
+ dark: Boolean,
504
+ disable: Boolean,
505
+ disabled: Boolean,
506
+ duration: Boolean,
507
+ hasAccess: {
508
+ type: Boolean,
509
+ default: !0
510
+ },
511
+ icon: String,
512
+ image: String,
513
+ label: String,
514
+ rectangle: Boolean,
515
+ selected: Boolean,
516
+ size: {
517
+ type: String,
518
+ default: "lg",
519
+ validator: (e) => ["sm", "lg"].includes(e)
520
+ },
521
+ unit: String,
522
+ value: Number
523
+ },
524
+ emits: ["click", "blockAccess"],
525
+ setup(e, { slots: a, emit: n }) {
526
+ const t = () => {
527
+ if (e.hasAccess) {
528
+ n("click");
529
+ return;
530
+ }
531
+ n("blockAccess", e.access);
532
+ }, o = u(() => [
533
+ "c-button",
534
+ "c-button--" + e.size,
535
+ { "c-button--rectangle": e.rectangle },
536
+ { "c-button--duration": e.duration },
537
+ {
538
+ "c-button--circle": e.circle || !e.rectangle && !e.duration
539
+ },
540
+ { selected: e.selected },
541
+ { disabled: e.disabled },
542
+ { "c-button--dark": e.dark }
543
+ ]);
544
+ function s() {
545
+ if (e.duration) {
546
+ if (!e.value || !e.unit)
547
+ throw new Error(
548
+ "A duration button must have value and unit properties."
549
+ );
550
+ return r("div", {}, [
551
+ r("span", { class: "c-button-value" }, e.value),
552
+ r("br"),
553
+ r("span", { class: "c-button-unit" }, e.unit)
554
+ ]);
555
+ }
556
+ }
557
+ function c() {
558
+ return !e.image || e.duration ? void 0 : r(
559
+ "div",
560
+ {
561
+ class: "c-button--image unselectable",
562
+ draggable: !1
563
+ },
564
+ r("img", {
565
+ src: e.image,
566
+ draggable: !1,
567
+ class: "unselectable"
568
+ })
569
+ );
570
+ }
571
+ function i() {
572
+ return !e.label || e.duration ? void 0 : r("span", {
573
+ class: "c-button--label unselectable"
574
+ }, e.label);
575
+ }
576
+ function l() {
577
+ const d = {
578
+ class: o.value,
579
+ noRipple: e.disabled,
580
+ disable: e.disable,
581
+ round: !0,
582
+ outline: !0,
583
+ flat: !0,
584
+ unelevated: !0,
585
+ noCaps: !0,
586
+ icon: e.icon,
587
+ onClick: t
588
+ }, m = [s(), c(), i()];
589
+ return r(he, d, () => m);
590
+ }
591
+ return () => l();
592
+ }
593
+ }), Xn = {
594
+ __name: "CButtonBar",
595
+ props: {
596
+ disabled: {
597
+ type: Boolean,
598
+ default: !1
599
+ },
600
+ resetText: {
601
+ type: String,
602
+ default: "Reset all"
603
+ },
604
+ doneText: {
605
+ type: String,
606
+ default: "Done"
607
+ }
608
+ },
609
+ emits: ["done", "reset"],
610
+ setup(e, { emit: a }) {
611
+ const n = a, t = () => n("done"), o = () => n("reset");
612
+ return (s, c) => {
613
+ const i = A("q-btn"), l = A("q-btn-group"), d = A("q-footer");
614
+ return _(), L(d, {
615
+ "data-cy": "c-button-bar",
616
+ class: "c-button-bar bg-black"
617
+ }, {
618
+ default: S(() => [
619
+ D(l, {
620
+ spread: "",
621
+ flat: "",
622
+ style: { "border-radius": "0" }
623
+ }, {
624
+ default: S(() => [
625
+ D(i, {
626
+ "data-cy": "c-button-bar-reset",
627
+ disabled: e.disabled,
628
+ class: "bg-dark text-white",
629
+ "no-caps": "",
630
+ onClick: o,
631
+ label: e.resetText
632
+ }, null, 8, ["disabled", "label"]),
633
+ D(i, {
634
+ "data-cy": "c-button-bar-done",
635
+ "no-caps": "",
636
+ class: "bg-dark text-white full-width",
637
+ onClick: t,
638
+ label: e.doneText
639
+ }, null, 8, ["label"])
640
+ ]),
641
+ _: 1
642
+ })
643
+ ]),
644
+ _: 1
645
+ });
646
+ };
647
+ }
648
+ }, Kn = {
649
+ name: "CButtonRow",
650
+ props: {
651
+ count: {
652
+ type: Number,
653
+ default: 0
654
+ },
655
+ noWrap: {
656
+ type: Boolean,
657
+ default: !1
658
+ }
659
+ },
660
+ computed: {
661
+ //:class="{ 'no-wrap': noWrap, 'q-gutter-md': noWrap,
662
+ // 'q-gutter-sm': !noWrap, 'q-px-xl': !noWrap, 'q-pt-sm': !noWrap }">
663
+ twoPer() {
664
+ return this.count === 4;
665
+ },
666
+ classObject: function() {
667
+ return {
668
+ "no-wrap": this.noWrap,
669
+ "q-gutter-md": this.twoPer,
670
+ "q-gutter-sm": !this.twoPer,
671
+ "q-px-xl": this.twoPer,
672
+ "q-pt-sm": !this.noWrap
673
+ };
674
+ }
675
+ }
676
+ };
677
+ function Jn(e, a, n, t, o, s) {
678
+ return _(), se("div", {
679
+ class: Y(["row justify-center q-pb-sm", s.classObject])
680
+ }, [
681
+ I(e.$slots, "default")
682
+ ], 2);
683
+ }
684
+ const ea = /* @__PURE__ */ vt(Kn, [["render", Jn]]), ta = M({
685
+ name: "CButtonToggle",
686
+ props: {
687
+ access: String,
688
+ hasAccess: {
689
+ type: Boolean,
690
+ default: !0
691
+ },
692
+ disable: Boolean,
693
+ modelValue: { type: String, default: "360" },
694
+ labelLeft: { type: String, required: !1 },
695
+ labelRight: { type: String, required: !1 },
696
+ valueLeft: { type: String, required: !1 },
697
+ valueRight: { type: String, required: !1 }
698
+ },
699
+ emits: ["update:modelValue", "blockAccess"],
700
+ setup(e, { slots: a, emit: n }) {
701
+ const t = u(() => ({
702
+ left: o.value ? "4px" : "58px"
703
+ })), o = u(() => e.valueLeft === e.modelValue), s = () => {
704
+ if (!e.disable) {
705
+ if (e.hasAccess) {
706
+ let l = e.valueLeft === e.modelValue ? e.valueRight : e.valueLeft;
707
+ n("update:modelValue", l);
708
+ return;
709
+ }
710
+ n("blockAccess", e.access);
711
+ }
712
+ };
713
+ function c() {
714
+ const i = e.disable ? " disable" : "", l = {
715
+ onClick: s,
716
+ class: "c-button-toggle position-relative row justify-center items-center" + i
717
+ }, d = {
718
+ class: "c-button-toggle-left col-6 text-center unselectable"
719
+ }, m = {
720
+ class: "c-button-toggle-right col-6 text-center unselectable"
721
+ }, v = {
722
+ class: "c-button-toggle-slide",
723
+ style: t.value
724
+ };
725
+ return r("div", l, [
726
+ r("div", d, e.labelLeft),
727
+ r("div", m, e.labelRight),
728
+ r("div", v)
729
+ ]);
730
+ }
731
+ return () => c();
732
+ }
733
+ }), na = { class: "quarters overlay" }, aa = { class: "quarters borders" }, wt = "cps", oa = {
734
+ __name: "CCameraDirection",
735
+ props: {
736
+ dark: Boolean,
737
+ disabled: Boolean,
738
+ hasAccess: {
739
+ type: Boolean,
740
+ default: !0
741
+ },
742
+ modelValue: {
743
+ type: Object,
744
+ default: () => ({
745
+ back: !1,
746
+ front: !1,
747
+ left: !1,
748
+ right: !1
749
+ })
750
+ }
751
+ },
752
+ emits: ["update:modelValue", "blockAccess"],
753
+ setup(e, { emit: a }) {
754
+ const n = e, t = a, o = u(() => n.modelValue.back), s = u(() => n.modelValue.front), c = u(() => n.modelValue.left), i = u(() => n.modelValue.right), l = (d) => {
755
+ if (n.hasAccess) {
756
+ let m = Object.assign({}, n.modelValue);
757
+ m[d] = !m[d], t("update:modelValue", m);
758
+ return;
759
+ }
760
+ t("blockAccess", wt), store.dispatch("paywall/block", wt);
761
+ };
762
+ return (d, m) => (_(), se("div", {
763
+ class: Y(["c-camera-direction", { dark: e.dark }])
764
+ }, [
765
+ x("div", na, [
766
+ x("div", {
767
+ class: "back quarter",
768
+ onClick: m[0] || (m[0] = (v) => l("back"))
769
+ }),
770
+ x("div", {
771
+ class: "left quarter",
772
+ onClick: m[1] || (m[1] = (v) => l("left"))
773
+ }),
774
+ x("div", {
775
+ class: "front quarter",
776
+ onClick: m[2] || (m[2] = (v) => l("front"))
777
+ }),
778
+ x("div", {
779
+ class: "right quarter",
780
+ onClick: m[3] || (m[3] = (v) => l("right"))
781
+ })
782
+ ]),
783
+ x("div", aa, [
784
+ x("div", {
785
+ class: Y(["back quarter", { active: o.value }]),
786
+ ref_key: "back",
787
+ ref: o
788
+ }, [...m[4] || (m[4] = [
789
+ x("span", null, "BACK", -1)
790
+ ])], 2),
791
+ x("div", {
792
+ class: Y(["left quarter", { active: c.value }]),
793
+ ref_key: "left",
794
+ ref: c
795
+ }, [...m[5] || (m[5] = [
796
+ x("span", null, "SIDE", -1)
797
+ ])], 2),
798
+ x("div", {
799
+ class: Y(["front quarter", { active: s.value }]),
800
+ ref_key: "front",
801
+ ref: s
802
+ }, [...m[6] || (m[6] = [
803
+ x("span", null, "FRONT", -1)
804
+ ])], 2),
805
+ x("div", {
806
+ class: Y(["right quarter", { active: i.value }]),
807
+ ref_key: "right",
808
+ ref: i
809
+ }, [...m[7] || (m[7] = [
810
+ x("span", null, "SIDE", -1)
811
+ ])], 2)
812
+ ]),
813
+ m[8] || (m[8] = x("div", { class: "quickpose-angle" }, [
814
+ x("img", {
815
+ src: "https://static.figurosity.com/pose-generator/position/model-male.png",
816
+ class: ""
817
+ })
818
+ ], -1))
819
+ ], 2));
820
+ }
821
+ }, la = M({
822
+ name: "ChromePicker",
823
+ props: {
824
+ modelValue: { type: String, default: 0 },
825
+ "onUpdate:modelValue": [Function, Array]
826
+ },
827
+ emits: ["update:modelValue"],
828
+ setup(e, { slots: a, emit: n }) {
829
+ const t = u({
830
+ get: () => e.modelValue,
831
+ set: (s) => n("update:modelValue", s)
832
+ });
833
+ function o() {
834
+ const s = {
835
+ class: "chrome-picker",
836
+ modelValue: t.value,
837
+ disableAlpha: !0,
838
+ disbleFields: !0,
839
+ "onUpdate:modelValue": (c) => t.value = c
840
+ };
841
+ return r(An, s);
842
+ }
843
+ return () => o();
844
+ }
845
+ }), Oe = (e) => {
846
+ e.stopPropagation();
847
+ }, sa = {
848
+ // Pointer
849
+ onPointerdown: Oe,
850
+ // onPointermove: stopBubble,
851
+ // onPointerup: stopBubble,
852
+ // onPointercancel: stopBubble,
853
+ // Mouse
854
+ onMousedown: Oe,
855
+ // onMousemove: stopBubble,
856
+ // onMouseup: stopBubble,
857
+ // Touch (mobile)
858
+ onTouchstart: Oe,
859
+ // onTouchmove: stopBubble,
860
+ // onTouchend: stopBubble,
861
+ // onTouchcancel: stopBubble,
862
+ // Synthetic follow-up events
863
+ onClick: Oe
864
+ // onDblclick: stopBubble,
865
+ // onContextmenu: stopBubble,
866
+ }, Ht = M({
867
+ name: "CColorPopup",
868
+ props: {
869
+ modelValue: { type: String, default: 0 },
870
+ "onUpdate:modelValue": [Function, Array],
871
+ label: { type: String, required: !1 },
872
+ show: { type: Boolean, required: !0 },
873
+ "onUpdate:show": [Function, Array]
874
+ },
875
+ emits: ["click", "update:modelValue", "update:show"],
876
+ setup(e, { slots: a, emit: n }) {
877
+ y(!1);
878
+ function t() {
879
+ n("update:show", !1);
880
+ }
881
+ const o = u({
882
+ get: () => e.modelValue,
883
+ set: (c) => n("update:modelValue", c)
884
+ });
885
+ function s() {
886
+ const c = {
887
+ class: "c-color-picker-popup",
888
+ ...sa
889
+ }, i = {
890
+ class: "row items-center"
891
+ }, l = {
892
+ onClick: t,
893
+ class: "c-color-picker-popup-btn q-mb-xs",
894
+ round: !0,
895
+ flat: !0,
896
+ size: "sm",
897
+ color: "primary",
898
+ icon: xn
899
+ }, d = {
900
+ class: "c-color-picker-popup-label q-ml-sm",
901
+ style: "color: var(--grey-700); font-size: 16px;font-weight: 700",
902
+ onClick: t
903
+ }, m = {
904
+ class: "c-color-picker-popup-chooser",
905
+ modelValue: o.value,
906
+ "onUpdate:modelValue": (v) => o.value = v
907
+ };
908
+ return R(
909
+ r("div", c, [
910
+ r("div", i, [
911
+ r(he, l),
912
+ r("div", d, e.label)
913
+ ]),
914
+ r(la, m)
915
+ ]),
916
+ [[O, e.show]]
917
+ );
918
+ }
919
+ return () => s();
920
+ }
921
+ }), ca = M({
922
+ name: "CColorPicker",
923
+ props: {
924
+ modelValue: { type: String, default: "rbg(255,255,255)" },
925
+ "onUpdate:modelValue": [Function, Array],
926
+ label: String
927
+ },
928
+ emits: ["click", "update:modelValue"],
929
+ setup(e, { slots: a, emit: n }) {
930
+ const t = y(!1);
931
+ function o() {
932
+ t.value = !0;
933
+ }
934
+ const s = u(() => ({ backgroundColor: c.value })), c = u({
935
+ get: () => e.modelValue,
936
+ set: (l) => n("update:modelValue", l)
937
+ });
938
+ ce(
939
+ () => t.value,
940
+ (l) => console.log("show popup changed:", l)
941
+ );
942
+ function i() {
943
+ const l = {
944
+ class: "c-color-picker"
945
+ }, d = {
946
+ class: "c-color-picker-button",
947
+ style: s.value,
948
+ onClick: o,
949
+ label: e.label,
950
+ icon: Tt
951
+ }, m = {
952
+ modelValue: c.value,
953
+ "onUpdate:modelValue": (v) => c.value = v,
954
+ show: t.value,
955
+ "onUpdate:show": (v) => t.value = v,
956
+ label: e.label,
957
+ onPointerdown: (v) => v.stopPropagation(),
958
+ onMousedown: (v) => v.stopPropagation()
959
+ };
960
+ return r("div", l, [
961
+ R(
962
+ r(he, d, () => []),
963
+ [[O, !t.value]]
964
+ ),
965
+ R(r(Ht, m), [
966
+ [O, t.value]
967
+ ])
968
+ ]);
969
+ }
970
+ return () => i();
971
+ }
972
+ }), ia = M({
973
+ name: "CColorPickerButton",
974
+ props: {
975
+ modelValue: { type: Boolean, default: 0 },
976
+ "onUpdate:modelValue": [Function, Array],
977
+ label: { type: String, required: !1 },
978
+ color: { type: String, required: !1 }
979
+ },
980
+ emits: ["update:modelValue"],
981
+ setup(e, { slots: a, emit: n }) {
982
+ function t() {
983
+ n("update:modelValue", !0);
984
+ }
985
+ const o = u(() => ({ backgroundColor: e.color })), s = u({
986
+ get: () => e.modelValue,
987
+ set: (i) => n("update:modelValue", i)
988
+ });
989
+ function c() {
990
+ const i = {
991
+ class: "c-color-picker-button",
992
+ modelValue: s.value,
993
+ "onUpdate:modelValue": (l) => s.value = l,
994
+ style: o.value,
995
+ onClick: t,
996
+ label: e.label,
997
+ icon: Tt
998
+ };
999
+ return r(he, i, () => []);
1000
+ }
1001
+ return () => c();
1002
+ }
1003
+ }), ra = {
1004
+ __name: "CDivider",
1005
+ props: {
1006
+ divider: Boolean
1007
+ },
1008
+ setup(e) {
1009
+ return (a, n) => (_(), se("div", {
1010
+ class: Y(["c-divider", { divider: e.divider }])
1011
+ }, [...n[0] || (n[0] = [
1012
+ x("div", null, null, -1),
1013
+ x("span", null, null, -1),
1014
+ x("span", null, null, -1),
1015
+ x("span", null, null, -1),
1016
+ x("div", null, null, -1)
1017
+ ])], 2));
1018
+ }
1019
+ }, Ut = "c_dd";
1020
+ function Ge() {
1021
+ }
1022
+ const ua = ["click"], Ye = "moving", da = "hidden", Ae = "default", ve = "expanded", Ee = "minimized", Ct = "up", Bt = "down", ma = "px", fa = {
1023
+ detail: {
1024
+ type: Boolean,
1025
+ default: !0
1026
+ },
1027
+ name: {
1028
+ type: Number,
1029
+ default: ke
1030
+ },
1031
+ label: String,
1032
+ noCaps: Boolean,
1033
+ tabindex: [String, Number],
1034
+ topOffset: {
1035
+ type: Number,
1036
+ default: 80
1037
+ }
1038
+ // disable: Boolean,
1039
+ };
1040
+ function va(e, a) {
1041
+ const n = sn(Ut, Ge);
1042
+ if (n === Ge)
1043
+ return console.error(
1044
+ "CDraggableDrawer component needs to be child of CDraggableDrawers"
1045
+ ), Ge;
1046
+ const t = lt(), o = Ve(), s = y(null), c = y(null), i = y(null), l = y(null), d = y(null), m = y(null), v = y(null), h = y(null), k = y(n.currentModel), f = y({}), w = y(da), p = y(!1), B = y(null), $ = u(() => {
1047
+ const C = G() + ma, q = w.value === ve ? "auto" : "hidden";
1048
+ return {
1049
+ maxHeight: C,
1050
+ overflowY: q
1051
+ };
1052
+ });
1053
+ function E() {
1054
+ return l.value ? l.value.$el.offsetHeight : 0;
1055
+ }
1056
+ function g() {
1057
+ return d.value ? d.value.$el.offsetHeight : 0;
1058
+ }
1059
+ function z() {
1060
+ if (!c.value) return 0;
1061
+ const C = c.value.$el.offsetHeight;
1062
+ return e.name === ke || !i.value ? C : C + i.value.$el.offsetHeight;
1063
+ }
1064
+ function T() {
1065
+ const C = z();
1066
+ return E() + C;
1067
+ }
1068
+ function G() {
1069
+ const C = T();
1070
+ return g() + C;
1071
+ }
1072
+ function F() {
1073
+ const C = G(), q = o.screen.height - e.topOffset;
1074
+ return Math.min(C, q);
1075
+ }
1076
+ const ee = u(() => {
1077
+ var C, q;
1078
+ return !!((q = (C = a.secondary) == null ? void 0 : C.call(a)) != null && q.length);
1079
+ });
1080
+ function K(C) {
1081
+ p.value = !1;
1082
+ const { direction: q, delta: P, duration: Q, isFinal: ae } = C;
1083
+ if (P === 0) return;
1084
+ const oe = ne() + P.y, de = F(), Se = z(), Ne = Q < 290, gt = T(), bt = De(oe, gt, de), ht = ye(oe, Se, gt, de);
1085
+ if (q === Bt && oe > -Se) {
1086
+ W(-Se, !1);
1087
+ return;
1088
+ }
1089
+ if (q === Ct && oe < -de) {
1090
+ W(-de, !1);
1091
+ return;
1092
+ }
1093
+ if (!ae) {
1094
+ W(oe, !1);
1095
+ return;
1096
+ }
1097
+ if (Ne)
1098
+ return q === Ct ? bt === ve ? re() : te() : q === Bt ? bt === Ae ? fe() : te() : void 0;
1099
+ if (ht === "minimized")
1100
+ return fe();
1101
+ if (ht === ve)
1102
+ return re();
1103
+ te();
1104
+ }
1105
+ function ye(C, q, P, Q) {
1106
+ const ae = Math.abs(C), de = [q, P, Q].reduce(
1107
+ (Se, Ne) => Math.abs(Ne - ae) < Math.abs(Se - ae) ? Ne : Se
1108
+ );
1109
+ return de === q ? Ee : de === P ? Ae : ve;
1110
+ }
1111
+ function De(C, q, P) {
1112
+ const Q = Math.abs(C);
1113
+ return Q <= q ? Ae : Q <= P ? ve : "out-of-bounds";
1114
+ }
1115
+ function fe() {
1116
+ const C = z();
1117
+ w.value = Ye, W(-C), B.value = Ee;
1118
+ }
1119
+ function te() {
1120
+ w.value = Ye;
1121
+ const C = F(), q = T(), P = e.name === ke ? 1 : 3;
1122
+ f.value = { ...f.value, zIndex: P };
1123
+ const Q = q > C ? C : q;
1124
+ W(-Q), B.value = Ae;
1125
+ }
1126
+ function re() {
1127
+ w.value = Ye;
1128
+ const C = F(), q = G(), P = e.name === ke ? 1 : 3;
1129
+ f.value = { ...f.value, zIndex: P };
1130
+ const Q = q > C ? C : q;
1131
+ W(-Q), B.value = ve;
1132
+ }
1133
+ function ze() {
1134
+ re(), setTimeout(te, 500);
1135
+ }
1136
+ function V(C = !0) {
1137
+ const q = e.name === ke ? 1 : 3;
1138
+ f.value = { ...f.value, zIndex: q }, W(0, C), p.value = !1;
1139
+ }
1140
+ function b(C) {
1141
+ C.stopPropagation();
1142
+ const q = ne(), P = F(), Q = z(), ae = T(), oe = ye(
1143
+ q,
1144
+ Q,
1145
+ ae,
1146
+ P
1147
+ ), de = B.value;
1148
+ if (!ee.value)
1149
+ return oe === Ae ? fe() : te();
1150
+ if (oe === Ee)
1151
+ return te();
1152
+ if (oe === ve)
1153
+ return de === Ee ? te() : fe();
1154
+ if (oe === Ae)
1155
+ return de === ve ? fe() : re();
1156
+ }
1157
+ function N({ height: C }) {
1158
+ console.log("appResize height", C), C !== 0 && (f.value = { ...f.value, top: C + "px !important" });
1159
+ }
1160
+ function H({ height: C }) {
1161
+ n.currentModel.value !== e.name || C === 0 || we(() => te());
1162
+ }
1163
+ function U({ height: C }) {
1164
+ const q = ne(), P = F(), Q = z(), ae = T(), oe = ye(
1165
+ q,
1166
+ Q,
1167
+ ae,
1168
+ P
1169
+ );
1170
+ n.currentModel.value !== e.name || oe !== ve || we(() => re());
1171
+ }
1172
+ function j(C) {
1173
+ C.stopPropagation(), n.updateModel({
1174
+ name: ke,
1175
+ setCurrent: !0,
1176
+ skipEmit: !1
1177
+ }), p.value = !1;
1178
+ }
1179
+ function W(C, q = !0) {
1180
+ if (C === ne()) return;
1181
+ const P = `translateY(${C}px)`;
1182
+ f.value = { ...f.value, transform: P };
1183
+ }
1184
+ function ne() {
1185
+ var Q;
1186
+ if (!((Q = s.value) != null && Q.$el)) return;
1187
+ const q = getComputedStyle(s.value.$el).transform.match(/^matrix.*\((.+)\)$/);
1188
+ if (!q) return 0;
1189
+ const P = q[1].split(", ");
1190
+ return parseFloat(P[5]) || 0;
1191
+ }
1192
+ const ue = {
1193
+ name: u(() => e.name),
1194
+ rootRef: h,
1195
+ tabIndicatorRef: m
1196
+ };
1197
+ _n(() => {
1198
+ V(!1);
1199
+ }), Me(() => {
1200
+ t.$off("resize"), V(!1), n.unregisterDrawer(ue);
1201
+ }), J(() => {
1202
+ t.$on("resize", N), n.registerDrawer(ue), we(() => {
1203
+ setTimeout(() => {
1204
+ E(), f.value = { ...f.value, top: o.screen.height + "px" }, console.log("screen height", o.screen.height), k.value === e.name && (ee.value ? ze() : te());
1205
+ }, 50);
1206
+ });
1207
+ }), ce(
1208
+ () => k.value,
1209
+ (C, q) => {
1210
+ console.log("watch currentModel", C, q), !(C === e.name && q === e.name) && (C === e.name && te(), q === e.name && V());
1211
+ }
1212
+ );
1213
+ function tn() {
1214
+ return r(
1215
+ Re,
1216
+ { class: "c-draggable-drawer__handler--horizontal row flex-center q-pt-sm q-pb-md sectional section-handle", ref: c, onClick: b },
1217
+ () => r("div", { class: "cursor-grab grab" })
1218
+ );
1219
+ }
1220
+ function nn() {
1221
+ if (e.name === ke || !e.label)
1222
+ return null;
1223
+ const C = {
1224
+ ref: i,
1225
+ class: "q-px-md q-pb-sm q-pt-none sectional section-detail",
1226
+ onClick: b
1227
+ }, q = {
1228
+ class: "row justify-between"
1229
+ }, P = {
1230
+ class: "section-title"
1231
+ }, Q = {
1232
+ class: "text-subtitle2 col-shrink"
1233
+ }, ae = {
1234
+ round: !0,
1235
+ icon: "close",
1236
+ size: "sm",
1237
+ onClick: j,
1238
+ style: "margin-top: -5px"
1239
+ };
1240
+ return r(Re, C, () => [
1241
+ r("div", q, [
1242
+ r("div", P, e.label),
1243
+ r("div", Q, [r(he, ae)])
1244
+ ])
1245
+ ]);
1246
+ }
1247
+ function an() {
1248
+ const C = {
1249
+ class: "c-draggable-drawer__content",
1250
+ ref: v,
1251
+ style: u(() => $.value),
1252
+ onClick: (P) => P.preventDefault(),
1253
+ onTouch: (P) => P.preventDefault(),
1254
+ onScroll: (P) => P.stopPropagation()
1255
+ }, q = [];
1256
+ if (a.default) {
1257
+ const P = {
1258
+ class: "q-px-md q-pb-sm q-pt-none sectional section-primary",
1259
+ ref: l
1260
+ }, Q = a.default ? a.default() : [], ae = { debounce: 0, onResize: H };
1261
+ q.push(
1262
+ r(Re, P, {
1263
+ default: () => [r(Xe, ae), ...Q]
1264
+ })
1265
+ );
1266
+ }
1267
+ if (a.secondary) {
1268
+ const P = {
1269
+ class: "sectional section-secondary display-block",
1270
+ ref: d
1271
+ }, Q = a.secondary ? a.secondary() : [], ae = {
1272
+ debounce: 0,
1273
+ onResize: U
1274
+ };
1275
+ q.push(
1276
+ r(Re, P, {
1277
+ default: () => [r(Xe, ae), ...Q]
1278
+ })
1279
+ );
1280
+ }
1281
+ return r("div", C, q);
1282
+ }
1283
+ function on() {
1284
+ const C = [];
1285
+ C.push(tn()), C.push(nn()), C.push(an());
1286
+ const P = {
1287
+ ref: s,
1288
+ class: "c-draggable-drawer column no-wrap ",
1289
+ style: f.value,
1290
+ "data-name": e.name,
1291
+ "data-cy": "c-draggable-drawer-" + e.name,
1292
+ role: "draggableDrawer"
1293
+ };
1294
+ return r(gn, P, () => C);
1295
+ }
1296
+ function ln() {
1297
+ return R(on(), [
1298
+ [vn, K, "vertical", { mouse: !0, prevent: !0 }]
1299
+ //v-touch-pan.mouse.vertical.prevent="dragDrawer"
1300
+ ]);
1301
+ }
1302
+ return { renderDrawer: ln, $drawers: n };
1303
+ }
1304
+ const ga = M({
1305
+ name: "CDraggableDrawer",
1306
+ props: fa,
1307
+ emits: ua,
1308
+ setup(e, { slots: a, emit: n }) {
1309
+ const { renderDrawer: t } = va(e, a);
1310
+ return () => t();
1311
+ }
1312
+ }), Ft = M({
1313
+ name: "CDraggableDrawers",
1314
+ props: {
1315
+ align: {
1316
+ type: String,
1317
+ default: "center",
1318
+ validator(e, a) {
1319
+ return ["center", "left", "right"].includes(e);
1320
+ }
1321
+ },
1322
+ dark: Boolean,
1323
+ modelValue: { type: Number, default: 0 },
1324
+ "onUpdate:modelValue": [Function, Array],
1325
+ maxWidth: {
1326
+ type: [Number, String],
1327
+ default: 400
1328
+ }
1329
+ },
1330
+ setup(e, { slots: a, emit: n }) {
1331
+ const t = y(null), o = y(e.modelValue), s = [], c = y(0), i = u(() => ({
1332
+ "c-draggable-drawers": !0,
1333
+ dark: e.dark
1334
+ })), l = u(
1335
+ () => typeof e.maxWidth == "string" ? e.maxWidth : e.maxWidth + "px"
1336
+ ), d = u(() => {
1337
+ const p = { maxWidth: l.value };
1338
+ return e.align === "center" && (p.left = "50%", p.transform = "translateX(-50%)"), e.align === "left" && (p.left = "10px"), e.align === "right" && (p.right = "10px"), p;
1339
+ }), m = u(() => {
1340
+ const p = c.value, B = o.value;
1341
+ for (let $ = 0; $ < p; $++)
1342
+ if (s[$].name.value === B)
1343
+ return !0;
1344
+ return !1;
1345
+ });
1346
+ function v(p) {
1347
+ s.push(p), c.value++;
1348
+ }
1349
+ function h(p) {
1350
+ s.splice(s.indexOf(p), 1), c.value--;
1351
+ }
1352
+ const k = {
1353
+ currentModel: o,
1354
+ hasActiveTab: m.value,
1355
+ registerDrawer: v,
1356
+ unregisterDrawer: h,
1357
+ updateModel: f
1358
+ };
1359
+ cn(Ut, k), ce(
1360
+ () => e.modelValue,
1361
+ (p) => {
1362
+ f({ name: p, setCurrent: !0, skipEmit: !1 });
1363
+ }
1364
+ );
1365
+ function f({ name: p, setCurrent: B = !0, skipEmit: $ = !0 }) {
1366
+ o.value !== p && ($ !== !0 && e["onUpdate:modelValue"] !== void 0 && n("update:modelValue", p), (B === !0 || e["onUpdate:modelValue"] === void 0) && (o.value = p));
1367
+ }
1368
+ Me(() => {
1369
+ }), At(() => {
1370
+ }), J(() => {
1371
+ });
1372
+ function w() {
1373
+ return r(
1374
+ "div",
1375
+ {
1376
+ ref: t,
1377
+ class: i.value,
1378
+ role: "draggableDrawers",
1379
+ style: d.value
1380
+ },
1381
+ {
1382
+ default: a.default
1383
+ }
1384
+ );
1385
+ }
1386
+ return () => w();
1387
+ }
1388
+ }), jt = M({
1389
+ name: "CResponsiveLayout",
1390
+ props: {
1391
+ modelValue: Boolean,
1392
+ side: {
1393
+ type: String,
1394
+ default: "left"
1395
+ },
1396
+ dark: Boolean,
1397
+ overlayTransparent: Boolean
1398
+ },
1399
+ emits: ["update:modelValue"],
1400
+ setup(e, { slots: a, emit: n }) {
1401
+ const t = u({
1402
+ get: () => e.modelValue,
1403
+ set: (c) => n("update:modelValue", c)
1404
+ }), o = u(() => ({
1405
+ "overlay-transparent": e.overlayTransparent,
1406
+ dark: e.dark,
1407
+ "text-white": e.dark
1408
+ }));
1409
+ function s() {
1410
+ const c = {
1411
+ class: o.value + " c-drawer",
1412
+ bordered: !0,
1413
+ dark: !0,
1414
+ noSwipeBackdrop: e.overlayTransparent,
1415
+ elevated: !0,
1416
+ showIfAbove: !1,
1417
+ side: e.side,
1418
+ noSwipeOpen: !0,
1419
+ modelValue: t.value,
1420
+ "onUpdate:modelValue": (i) => t.value = i
1421
+ };
1422
+ return r(bn, c, () => (a == null ? void 0 : a.default()) || []);
1423
+ }
1424
+ return () => s();
1425
+ }
1426
+ }), ba = { class: "c-duration-button-duration" }, ha = { class: "c-duration-button-unit" }, ya = {
1427
+ __name: "CDurationButton",
1428
+ props: {
1429
+ dark: Boolean,
1430
+ disable: Boolean,
1431
+ // standard disable
1432
+ disabled: Boolean,
1433
+ duration: Number,
1434
+ large: Boolean,
1435
+ selected: Boolean,
1436
+ unit: String
1437
+ },
1438
+ emits: ["click"],
1439
+ setup(e, { emit: a }) {
1440
+ const n = a, t = () => n("click");
1441
+ return (o, s) => {
1442
+ const c = A("q-btn");
1443
+ return _(), L(c, {
1444
+ class: Y(["c-duration-button", { selected: e.selected, disabled: e.disabled, dark: e.dark }]),
1445
+ "no-ripple": e.disabled,
1446
+ disable: e.disable,
1447
+ unelevated: "",
1448
+ "no-caps": "",
1449
+ outline: "",
1450
+ round: "",
1451
+ onClick: t
1452
+ }, {
1453
+ default: S(() => [
1454
+ x("div", null, [
1455
+ x("span", ba, be(e.duration), 1),
1456
+ s[0] || (s[0] = x("br", null, null, -1)),
1457
+ x("span", ha, be(e.unit), 1)
1458
+ ])
1459
+ ]),
1460
+ _: 1
1461
+ }, 8, ["class", "no-ripple", "disable"]);
1462
+ };
1463
+ }
1464
+ }, ka = M({
1465
+ name: "CExpansion",
1466
+ props: {
1467
+ color: {
1468
+ default: "primary",
1469
+ type: String
1470
+ },
1471
+ icon: String,
1472
+ label: String,
1473
+ locked: Boolean,
1474
+ selected: Boolean,
1475
+ group: {
1476
+ default: "category",
1477
+ type: String
1478
+ },
1479
+ modelValue: Boolean,
1480
+ defaultOpened: Boolean
1481
+ },
1482
+ emits: ["click", "update:modelValue"],
1483
+ setup(e, { slots: a, emit: n }) {
1484
+ u(() => e.locked ? Je : je);
1485
+ const t = u(() => ({
1486
+ "c-expansion": !0,
1487
+ selected: e.selected,
1488
+ primary: e.color === "primary" && !e.locked,
1489
+ negative: e.color === "negative" && !e.locked,
1490
+ positive: e.color === "positive" && !e.locked,
1491
+ locked: e.locked,
1492
+ "non-selectable": !0
1493
+ })), o = u({
1494
+ get: () => e.modelValue,
1495
+ set: (c) => n("update:modelValue", c)
1496
+ });
1497
+ function s() {
1498
+ const c = {
1499
+ modelValue: o.value,
1500
+ "onUpdate:modelValue": (i) => o.value = i,
1501
+ icon: e.icon || Je,
1502
+ class: t.value,
1503
+ caption: e.caption,
1504
+ label: e.label,
1505
+ group: e.group,
1506
+ expandIcon: Lt,
1507
+ defaultOpened: e.defaultOpened,
1508
+ "data-cy": "c-expansion-" + Ce(e.label)
1509
+ };
1510
+ return r(Ke, c, { default: () => {
1511
+ var i;
1512
+ return (i = a.default) == null ? void 0 : i.call(a);
1513
+ } });
1514
+ }
1515
+ return () => s();
1516
+ }
1517
+ }), pa = {
1518
+ __name: "CExpansionItem",
1519
+ props: {
1520
+ color: {
1521
+ default: "primary",
1522
+ type: String
1523
+ },
1524
+ label: String,
1525
+ locked: Boolean,
1526
+ selected: Boolean,
1527
+ group: {
1528
+ default: "category",
1529
+ type: String
1530
+ },
1531
+ modelValue: Boolean,
1532
+ defaultOpened: Boolean
1533
+ },
1534
+ emits: ["update:modelValue"],
1535
+ setup(e, { expose: a, emit: n }) {
1536
+ a(Ke);
1537
+ const t = e, o = n, s = u(() => t.locked ? Je : je), c = u({
1538
+ get() {
1539
+ return t.modelValue;
1540
+ },
1541
+ set(l) {
1542
+ o("update:modelValue", l);
1543
+ }
1544
+ }), i = u(() => ({
1545
+ selected: t.selected,
1546
+ primary: t.color === "primary" && !t.locked,
1547
+ negative: t.color === "negative" && !t.locked,
1548
+ positive: t.color === "positive" && !t.locked,
1549
+ locked: t.locked
1550
+ }));
1551
+ return (l, d) => (_(), L(Z(Ke), {
1552
+ class: Y(["c-expansion-item", i.value]),
1553
+ label: e.label,
1554
+ group: e.group,
1555
+ "expand-icon": Z(Lt),
1556
+ icon: s.value,
1557
+ modelValue: c.value,
1558
+ "onUpdate:modelValue": d[0] || (d[0] = (m) => c.value = m),
1559
+ "default-opened": e.defaultOpened
1560
+ }, {
1561
+ default: S(() => [
1562
+ I(l.$slots, "default")
1563
+ ]),
1564
+ _: 3
1565
+ }, 8, ["class", "label", "group", "expand-icon", "icon", "modelValue", "default-opened"]));
1566
+ }
1567
+ }, Wt = M({
1568
+ name: "CResponsiveLayout",
1569
+ props: {
1570
+ show: Boolean,
1571
+ icon: String,
1572
+ backgroundColor: {
1573
+ default: "#0087ff",
1574
+ type: String
1575
+ },
1576
+ color: {
1577
+ default: "#ffffff",
1578
+ type: String
1579
+ }
1580
+ },
1581
+ emits: ["click"],
1582
+ setup(e, { emit: a }) {
1583
+ const n = u(() => e.icon ? e.icon : zt), t = u(() => ({
1584
+ color: e.color,
1585
+ backgroundColor: e.backgroundColor
1586
+ })), o = () => a("click");
1587
+ function s() {
1588
+ return R(
1589
+ r(
1590
+ hn,
1591
+ {
1592
+ position: "bottom-right",
1593
+ offset: [18, 18],
1594
+ style: "z-index: 12; transform: translate(0, 0)"
1595
+ },
1596
+ () => r(he, {
1597
+ class: "c-fab",
1598
+ onClick: o,
1599
+ fab: !0,
1600
+ icon: n.value,
1601
+ unelevated: !0,
1602
+ round: !0,
1603
+ style: t.value
1604
+ })
1605
+ ),
1606
+ [[O, e.show]]
1607
+ );
1608
+ }
1609
+ return () => s();
1610
+ }
1611
+ }), wa = M({
1612
+ name: "CFloatingModal",
1613
+ props: {
1614
+ modelValue: Boolean,
1615
+ "onUpdate:modelValue": [Function, Array],
1616
+ label: { type: String, required: !1 },
1617
+ width: {
1618
+ type: Number,
1619
+ default: 360
1620
+ },
1621
+ topOffset: {
1622
+ type: Number,
1623
+ default: 40
1624
+ }
1625
+ },
1626
+ emits: ["update:modelValue"],
1627
+ setup(e, { slots: a, emit: n }) {
1628
+ const t = Ve(), o = lt(), s = y(!1), c = u({
1629
+ get: () => e.modelValue,
1630
+ set: (v) => n("update:modelValue", v)
1631
+ }), i = () => {
1632
+ s.value = !s.value;
1633
+ }, l = y(80), d = (v) => {
1634
+ l.value = v.height - e.topOffset;
1635
+ };
1636
+ J(() => {
1637
+ l.value = t.screen.height - e.topOffset, o.$on("resize", d);
1638
+ }), Me(() => o.$off("resize"));
1639
+ function m() {
1640
+ const v = u(() => ({
1641
+ maxHeight: `${l.value}px`,
1642
+ maxWidth: `${e.width}px`
1643
+ })), h = {
1644
+ class: "c-floating-modal",
1645
+ modelValue: c.value,
1646
+ "onUpdate:modelValue": (B) => c.value = B,
1647
+ style: v.value
1648
+ }, f = {
1649
+ class: "c-floating-modal-toggle",
1650
+ size: "sm",
1651
+ round: !0,
1652
+ icon: u(
1653
+ () => s.value ? "f_chevron_down" : "f_chevron_up"
1654
+ ).value,
1655
+ onClick: i
1656
+ }, w = {
1657
+ class: "c-floating-modal-default"
1658
+ }, p = { class: "c-floating-modal-expanded" };
1659
+ return r(
1660
+ ie,
1661
+ { name: "fade" },
1662
+ {
1663
+ default: () => R(
1664
+ r("div", h, [
1665
+ ...a.expanded ? [r(he, f)] : [],
1666
+ ...a.default ? [r("div", w, a.default())] : [],
1667
+ ...a.expanded ? [
1668
+ r(st, null, {
1669
+ default: () => R(
1670
+ r("div", p, a.expanded()),
1671
+ [[O, s.value]]
1672
+ )
1673
+ })
1674
+ ] : []
1675
+ ]),
1676
+ [[O, c.value]]
1677
+ )
1678
+ }
1679
+ );
1680
+ }
1681
+ return () => m();
1682
+ }
1683
+ }), Ca = {
1684
+ __name: "CHorizontalScroller",
1685
+ props: {
1686
+ fullHeight: Boolean,
1687
+ reset: {
1688
+ type: Boolean,
1689
+ default: !0
1690
+ },
1691
+ size: {
1692
+ type: String,
1693
+ default: "md"
1694
+ }
1695
+ },
1696
+ setup(e) {
1697
+ const { $on: a } = lt(), n = e, t = y(null), o = y(null), s = y(null), c = y(0), i = y(!1), l = y(null), d = y(null), m = y(void 0), v = y(0), h = y(0), k = y(void 0);
1698
+ let f, w;
1699
+ const p = () => {
1700
+ if (!t.value || !o.value) return;
1701
+ const V = Pe.newRectFromElement(t.value), b = Pe.newRectFromElement(o.value);
1702
+ return !t.value || b.width >= V.width ? !1 : {
1703
+ valid: !0,
1704
+ inner: t.value,
1705
+ left: V.left - b.left,
1706
+ width: V.width - b.width
1707
+ };
1708
+ }, B = ({ inner: V, left: b, width: N }, H) => {
1709
+ if (b = b - H, b < -N) {
1710
+ V.style.left = -N + "px";
1711
+ return;
1712
+ }
1713
+ if (b >= 0) {
1714
+ V.style.left = "0px";
1715
+ return;
1716
+ }
1717
+ V.style.left = b + "px";
1718
+ }, $ = () => {
1719
+ !i.value || !t.value || !o.value || (g(), E());
1720
+ }, E = () => {
1721
+ if (!t.value || !o.value) return;
1722
+ const V = Pe.newRectFromElement(t.value), b = Pe.newRectFromElement(o.value);
1723
+ if (c.value = V.left - b.left, V.width === 0 || b.width < V.width) {
1724
+ if (V.left === 0) return;
1725
+ T({
1726
+ left: 0,
1727
+ duration: 300
1728
+ });
1729
+ return;
1730
+ }
1731
+ F();
1732
+ const N = (b.width - V.width) / 2;
1733
+ T({
1734
+ left: N,
1735
+ duration: 300
1736
+ });
1737
+ }, g = () => {
1738
+ n.fullHeight || !t.value || !s.value || s.value && t.value && t.value.children.length > 0 && (s.value.style.height = t.value.children[0].scrollHeight + "px");
1739
+ }, z = (V) => {
1740
+ t.value && (t.value.style.left = V + "px");
1741
+ }, T = ({ left: V = 0, duration: b = 1e3 }) => {
1742
+ if (!t.value) return;
1743
+ F();
1744
+ let N = { left: c.value }, H = { left: V };
1745
+ l.value = new ge.Tween(N).to(H, b).delay(0).easing(ge.Easing.Quadratic.Out).onUpdate(function(U) {
1746
+ const j = parseInt(U.left);
1747
+ z(j);
1748
+ }).onComplete(function(U) {
1749
+ const j = parseInt(U.left);
1750
+ window.cancelAnimationFrame(d.value), d.value = null, z(j);
1751
+ }).start(), G();
1752
+ }, G = (V) => {
1753
+ d.value = window.requestAnimationFrame(G), ge.update(V);
1754
+ }, F = () => {
1755
+ l.value && l.value.stop && (l.value.stop(), l.value = null);
1756
+ }, ee = (V) => {
1757
+ if (V = V.srcEvent || V, !(V && (V.wheelDelta || V.deltaX))) return;
1758
+ const N = V.deltaX, H = V.deltaY, U = 2;
1759
+ if ((H > U || H < -U) && N === 0 || V.ctrlKey)
1760
+ return;
1761
+ V.preventDefault();
1762
+ const j = p();
1763
+ j && B(j, N);
1764
+ }, K = (V) => {
1765
+ const b = p();
1766
+ b && B(b, V);
1767
+ }, ye = () => {
1768
+ m.value = void 0, k.value = void 0, v.value = 0, h.value = 0;
1769
+ }, De = (V) => {
1770
+ const b = V.center.x - m.value.x;
1771
+ b !== 0 && (m.value = V.center, K(-b));
1772
+ }, fe = (V) => {
1773
+ m.value = V.center;
1774
+ }, te = (V) => {
1775
+ const b = Math.abs(V.velocityX);
1776
+ if (b <= 0.02) return;
1777
+ const N = V.distance, H = V.direction === 2 ? -1 : 1, U = p(), j = U.left;
1778
+ c.value = j;
1779
+ const W = -U.width, ne = 0;
1780
+ let ue = j + H * N * b;
1781
+ j === W && V.direction === 2 || j === ne && V.direction === 4 || (ue = ue < W ? W : ue, ue = ue > 0 ? 0 : ue, T({ left: ue }));
1782
+ }, re = (V) => F();
1783
+ ce(() => t.value, (V) => g());
1784
+ const ze = () => {
1785
+ f || (f = new Mt(s.value, {
1786
+ recognizers: [
1787
+ [Hammer.Tap],
1788
+ [Hammer.Pan, { pointers: 0 }],
1789
+ [Hammer.Swipe, { direction: Hammer.DIRECTION_HORIZONTAL }]
1790
+ ]
1791
+ }), w = f.manager, f.on({
1792
+ swipe: te,
1793
+ // swipeleft: onSwipe,
1794
+ // swiperight: onSwipe,
1795
+ panstart: fe,
1796
+ panend: ye,
1797
+ panmove: De,
1798
+ wheel: ee,
1799
+ tap: re,
1800
+ pointerdown: re
1801
+ }), E(), we(() => {
1802
+ const V = { passive: !0 };
1803
+ s.value && (s.value.addEventListener("touchstart", F, V), s.value.addEventListener("mousedown", F, V));
1804
+ try {
1805
+ const b = w.get("tap");
1806
+ b && b.set({
1807
+ enable: !0
1808
+ });
1809
+ } catch {
1810
+ }
1811
+ try {
1812
+ const b = w.get("swipe");
1813
+ b && b.recognizeWith("pan");
1814
+ } catch {
1815
+ }
1816
+ g(), E();
1817
+ }), a("resize", $));
1818
+ };
1819
+ return J(() => {
1820
+ i.value = !0;
1821
+ try {
1822
+ we(() => {
1823
+ ze();
1824
+ });
1825
+ } catch {
1826
+ }
1827
+ }), Me(() => i.value = !1), (V, b) => {
1828
+ const N = A("q-resize-observer");
1829
+ return _(), se("div", {
1830
+ class: Y(["c-horizontal-scroller", { "full-height": e.fullHeight }]),
1831
+ ref_key: "slider",
1832
+ ref: s
1833
+ }, [
1834
+ e.reset ? (_(), L(N, {
1835
+ key: 0,
1836
+ onResize: $,
1837
+ debounce: 10
1838
+ })) : le("", !0),
1839
+ x("div", {
1840
+ class: "c-horizontal-scroller-outer",
1841
+ ref_key: "outer",
1842
+ ref: o
1843
+ }, [
1844
+ x("div", {
1845
+ class: Y(["c-horizontal-scroller-inner", "q-px-" + e.size]),
1846
+ ref_key: "inner",
1847
+ ref: t
1848
+ }, [
1849
+ D(N, { onResize: $ }),
1850
+ I(V.$slots, "default")
1851
+ ], 2)
1852
+ ], 512)
1853
+ ], 2);
1854
+ };
1855
+ }
1856
+ }, Ba = (e, a, n) => {
1857
+ const t = e[a];
1858
+ return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((o, s) => {
1859
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
1860
+ s.bind(
1861
+ null,
1862
+ new Error(
1863
+ "Unknown variable dynamic import: " + a + (a.split("/").length !== n ? ". Note that variables only represent file names one level deep." : "")
1864
+ )
1865
+ )
1866
+ );
1867
+ });
1868
+ }, X = (e = "../i18n") => {
1869
+ const a = Ve(), n = y({}), t = u(() => a.lang.isoName || "en-US"), o = async () => {
1870
+ try {
1871
+ const s = (await Ba(/* @__PURE__ */ Object.assign({ "../i18n/en-US/index.js": () => import("./index-DNFPxUoa.js") }), `../i18n/${t.value}/index.js`, 4)).default;
1872
+ s && Object.assign(n.value, s);
1873
+ } catch (s) {
1874
+ console.error(`Error loading i18n for ${t.value}`, s);
1875
+ }
1876
+ };
1877
+ return ce(
1878
+ () => t.value,
1879
+ () => {
1880
+ o();
1881
+ },
1882
+ { immediate: !0 }
1883
+ // Run immediately on initialization
1884
+ ), rn(() => {
1885
+ o();
1886
+ }), { lang: n };
1887
+ }, Va = M({
1888
+ name: "CIconButton",
1889
+ props: {
1890
+ hasAccess: {
1891
+ type: Boolean,
1892
+ default: !0
1893
+ },
1894
+ selected: Boolean,
1895
+ name: { type: String, required: !0 },
1896
+ icon: String,
1897
+ size: {
1898
+ type: String,
1899
+ default: "lg",
1900
+ validator: (e) => ["sm", "lg"].includes(e)
1901
+ }
1902
+ },
1903
+ emits: ["click", "blockAccess"],
1904
+ setup(e, { slots: a, emit: n }) {
1905
+ const { lang: t } = X(), o = u(() => {
1906
+ var d;
1907
+ if (e.name && t.value.controls && t.value.controls[e.name])
1908
+ return e.name && ((d = t.value.controls[e.name]) == null ? void 0 : d.iconTitle);
1909
+ }), s = u(() => e.icon || `f_${e.name}`), c = (d) => n("blockAccess", d), i = () => n("click");
1910
+ function l() {
1911
+ const d = {
1912
+ class: `c-button c-icon-button c-${e.name}-button`,
1913
+ hasAccess: e.hasAccess || !0,
1914
+ icon: s.value,
1915
+ label: o.value,
1916
+ selected: e.selected,
1917
+ size: e.size,
1918
+ onClick: i,
1919
+ onBlockAccess: c
1920
+ };
1921
+ return r(We, d, () => []);
1922
+ }
1923
+ return () => l();
1924
+ }
1925
+ }), xa = ["innerHTML"], Da = {
1926
+ __name: "CItemHeading",
1927
+ props: {
1928
+ heading: String
1929
+ },
1930
+ setup(e) {
1931
+ return (a, n) => (_(), se("div", {
1932
+ class: "c-item-heading row full-width q-py-sm unselectable",
1933
+ innerHTML: e.heading
1934
+ }, null, 8, xa));
1935
+ }
1936
+ }, Qt = M({
1937
+ name: "CMenuButton",
1938
+ emits: ["click"],
1939
+ setup(e, { slots: a, emit: n }) {
1940
+ var i;
1941
+ const { lang: t } = X(), o = y(((i = t.value.controls) == null ? void 0 : i.menu.title) || "MENU"), c = {
1942
+ clas: "c-menu-button darkable q-pl-xs q-pr-sm",
1943
+ onClick: () => n("click"),
1944
+ dense: !0,
1945
+ flat: !0,
1946
+ icon: ct,
1947
+ label: o.value,
1948
+ rounded: !0,
1949
+ style: "background-color: #ffffff;padding-right: 15px;padding-left: 10px"
1950
+ };
1951
+ return J(() => {
1952
+ var l;
1953
+ o.value = ((l = t.value.controls) == null ? void 0 : l.menu.title) || "MENU";
1954
+ }), () => r(he, c);
1955
+ }
1956
+ }), Gt = M({
1957
+ name: "CNavigator",
1958
+ props: {
1959
+ dark: Boolean,
1960
+ debug: {
1961
+ type: Boolean,
1962
+ default: !1
1963
+ },
1964
+ height: {
1965
+ type: Number,
1966
+ default: 0
1967
+ },
1968
+ knobSize: {
1969
+ type: Number,
1970
+ default: 70
1971
+ },
1972
+ width: {
1973
+ type: Number,
1974
+ default: 0
1975
+ },
1976
+ show: {
1977
+ type: Boolean,
1978
+ default: !0
1979
+ },
1980
+ text: {
1981
+ type: String,
1982
+ default: "move"
1983
+ },
1984
+ title: {
1985
+ type: String,
1986
+ default: "Move"
1987
+ },
1988
+ value: {
1989
+ type: Object,
1990
+ default: { x: 0, y: 0 }
1991
+ }
1992
+ },
1993
+ emits: ["input"],
1994
+ setup(e, { slots: a, emit: n }) {
1995
+ let t;
1996
+ const o = y(null), s = y(null), c = y(null), i = y(null), l = y(!1), d = y(0), m = y(0), v = y(null), h = y(null), k = y(0), f = y(0), w = u(() => e.knobSize * 0.8 + "px"), p = u(() => {
1997
+ const b = e.knobSize + "px", N = -e.knobSize / 2 + "px";
1998
+ return {
1999
+ width: b,
2000
+ height: b,
2001
+ lineHeight: "62px",
2002
+ transform: "translateY(" + N + ") translateX(" + N + ")"
2003
+ };
2004
+ }), B = u(() => e.height === 0 || e.width === 0 ? {
2005
+ bottom: 0,
2006
+ right: 0,
2007
+ zIndex: 1e8
2008
+ } : {
2009
+ height: e.height + "px",
2010
+ width: e.width + "px",
2011
+ zIndex: 1e8
2012
+ });
2013
+ ce(
2014
+ () => e.show,
2015
+ (b) => {
2016
+ showKnob.value = b, $();
2017
+ }
2018
+ );
2019
+ function $() {
2020
+ m.value = e.width ? e.width : o.value.offsetWidth, d.value = e.height ? e.height : o.value.offsetHeight, T();
2021
+ }
2022
+ function E() {
2023
+ n("input", { x: k.value, y: f.value });
2024
+ }
2025
+ const g = (b, N) => (b < N ? -1 : 1) * Math.ceil(1), z = (b) => {
2026
+ const N = o.value.getBoundingClientRect();
2027
+ let H = b.x - N.left;
2028
+ const U = e.knobSize / 2 + 1, j = N.width - U + 2;
2029
+ H = H < U ? U : H, H = H > j ? j : H;
2030
+ let W = b.y - N.top;
2031
+ const ne = N.height - U + 2;
2032
+ return W = W < U ? U : W, W = W > ne ? ne : W, {
2033
+ x: H,
2034
+ y: W
2035
+ };
2036
+ };
2037
+ function T() {
2038
+ if (!s.value) return;
2039
+ const b = G();
2040
+ Object.assign(s.value.style, b);
2041
+ }
2042
+ function G() {
2043
+ return {
2044
+ top: d.value / 2 - 0 + "px",
2045
+ left: m.value / 2 - 0 + "px"
2046
+ };
2047
+ }
2048
+ function F() {
2049
+ var H, U;
2050
+ if (!s.value) return;
2051
+ l.value = !0;
2052
+ const b = {
2053
+ top: (H = s.value) == null ? void 0 : H.offsetTop,
2054
+ left: (U = s.value) == null ? void 0 : U.offsetLeft
2055
+ }, N = G();
2056
+ K(), h.value = new ge.Tween(b).to(N, 150).delay(0).easing(ge.Easing.Quadratic.Out).onUpdate(function(j) {
2057
+ Object.assign(s.value.style, {
2058
+ top: j.top + "px",
2059
+ left: j.left + "px"
2060
+ });
2061
+ }).onComplete(function() {
2062
+ l.value = !1, window.cancelAnimationFrame(i.value), k.value = 0, f.value = 0, E();
2063
+ }).start(), ee();
2064
+ }
2065
+ const ee = (b) => {
2066
+ i.value = window.requestAnimationFrame(ee), ge.update(b);
2067
+ };
2068
+ function K() {
2069
+ h.value && h.value.stop && (h.value.stop(), h.value = null);
2070
+ }
2071
+ const ye = (b) => {
2072
+ if (b.srcEvent.stopPropagation(), b.srcEvent.stopImmediatePropagation(), l.value) return;
2073
+ const N = {
2074
+ x: m.value / 2,
2075
+ y: d.value / 2
2076
+ }, H = b.center, U = o.value.getBoundingClientRect(), j = { top: H.y - U.top, left: H.x - U.left }, W = 15;
2077
+ if (j.top < W || j.top > U.height - W || j.left < W || j.left > U.width - W) {
2078
+ F(), clearInterval(v.value), v.value = null;
2079
+ return;
2080
+ }
2081
+ const ne = z(H);
2082
+ s.value.style.left = ne.x - 1 + "px", s.value.style.top = ne.y - 1 + "px", k.value = g(ne.x, N.x), f.value = g(ne.y, N.y);
2083
+ };
2084
+ function De(b) {
2085
+ b.srcEvent.stopPropagation(), b.srcEvent.stopImmediatePropagation(), F(), clearInterval(v.value), v.value = null;
2086
+ }
2087
+ function fe(b) {
2088
+ b.srcEvent.stopPropagation(), b.srcEvent.stopImmediatePropagation(), F(), clearInterval(v.value), v.value = null;
2089
+ }
2090
+ function te(b) {
2091
+ b.srcEvent.stopPropagation(), b.srcEvent.stopImmediatePropagation(), k.value = 0, f.value = 0, v.value && clearInterval(v.value), v.value = setInterval(E, 20);
2092
+ }
2093
+ function re() {
2094
+ t || (t = new Mt(o.value, {
2095
+ recognizers: [[Hammer.Pan, { pointers: 0 }]]
2096
+ }), t.manager, t.on({
2097
+ panstart: te,
2098
+ panend: fe,
2099
+ panmove: ye,
2100
+ touchend: De,
2101
+ touchleave: De
2102
+ }));
2103
+ }
2104
+ J(() => {
2105
+ $();
2106
+ try {
2107
+ we(() => {
2108
+ re(), we(() => {
2109
+ console.log("knobRef", s.value);
2110
+ });
2111
+ });
2112
+ } catch {
2113
+ }
2114
+ });
2115
+ function ze() {
2116
+ const b = [];
2117
+ return e.title && b.push(
2118
+ r("div", { class: "c-navigator-title unselectable" }, e.title)
2119
+ ), b.push(r(Xe, { onResize: $ })), e.debug && (b.push(r("div", { class: "verticalBar" })), b.push(r("div", { class: "horizontalBar" }))), b.push(
2120
+ r(
2121
+ "div",
2122
+ {
2123
+ class: "c-navigator",
2124
+ ref: c,
2125
+ style: B.value
2126
+ },
2127
+ r(
2128
+ "div",
2129
+ {
2130
+ class: "c-navigator-knob noselect",
2131
+ ref: s,
2132
+ style: p.value
2133
+ },
2134
+ r(qe, { name: Dn, size: w.value })
2135
+ )
2136
+ )
2137
+ ), b;
2138
+ }
2139
+ function V() {
2140
+ const N = {
2141
+ class: ["c-navigator-hitarea", e.dark && "dark"],
2142
+ ref: o,
2143
+ style: B.value
2144
+ };
2145
+ return r(
2146
+ ie,
2147
+ { name: "fade" },
2148
+ () => R(r("div", N, ze()), [[O, e.show]])
2149
+ );
2150
+ }
2151
+ return () => V();
2152
+ }
2153
+ }), Sa = M({
2154
+ name: "COverlayLoader",
2155
+ props: {
2156
+ progress: { type: Number, default: 0 },
2157
+ // 0–100
2158
+ size: { type: String, default: "100px" },
2159
+ overlayColor: { type: String, default: "rgba(0, 0, 0, 0.4)" },
2160
+ fade: { type: Boolean, default: !0 }
2161
+ },
2162
+ setup(e, { slots: a, emit: n }) {
2163
+ const { progress: t } = un(e), o = u(() => {
2164
+ let w = 1;
2165
+ return e.fade && (t.value <= 10 ? w = t.value / 5 : t.value >= 90 ? w = (100 - t.value) / 10 : w = 1), {
2166
+ opacity: w,
2167
+ transition: "opacity 0.4s ease"
2168
+ };
2169
+ }), s = u(() => {
2170
+ const p = Math.min(100, Math.max(0, t.value)) / 100 * 360;
2171
+ if (p === 0) return "";
2172
+ const B = 50, $ = -90, E = $ + p, g = c(B, B, B, E), z = c(B, B, B, $), T = p > 180 ? 1 : 0;
2173
+ return [
2174
+ `M ${B} ${B}`,
2175
+ // Move to center
2176
+ `L ${z.x} ${z.y}`,
2177
+ // Line to start
2178
+ `A ${B} ${B} 0 ${T} 1 ${g.x} ${g.y}`,
2179
+ // Arc to end
2180
+ "Z"
2181
+ // Close path
2182
+ ].join(" ");
2183
+ });
2184
+ function c(w, p, B, $) {
2185
+ const E = $ * Math.PI / 180;
2186
+ return {
2187
+ x: w + B * Math.cos(E),
2188
+ y: p + B * Math.sin(E)
2189
+ };
2190
+ }
2191
+ const i = u(() => ({ width: e.size, height: e.size })), l = u(() => ({
2192
+ class: "c-overlay-loader",
2193
+ style: i.value
2194
+ })), d = u(() => ({
2195
+ class: "c-overlay-loader-overlay",
2196
+ viewBox: "0 0 100 100",
2197
+ preserveAspectRatio: "xMidYMid meet",
2198
+ style: o.value
2199
+ })), m = { cx: 50, cy: 50, r: 50, fill: "white" }, v = {
2200
+ x: 0,
2201
+ y: 0,
2202
+ width: 100,
2203
+ height: 100,
2204
+ fill: "white"
2205
+ }, h = u(() => ({
2206
+ ...v,
2207
+ fill: e.overlayColor,
2208
+ mask: "url(#pie-mask)"
2209
+ })), k = u(() => ({
2210
+ d: s.value,
2211
+ fill: "black"
2212
+ }));
2213
+ function f() {
2214
+ var w;
2215
+ return r("div", l.value, [
2216
+ r(
2217
+ "div",
2218
+ { class: "c-overlay-loader-content" },
2219
+ ((w = a.default) == null ? void 0 : w.call(a)) || []
2220
+ ),
2221
+ r("svg", d.value, [
2222
+ r("defs", {}, [
2223
+ r("mask", { id: "pie-mask" }, [
2224
+ r("circle", m),
2225
+ r("path", k.value)
2226
+ ])
2227
+ ]),
2228
+ r("rect", h.value)
2229
+ ])
2230
+ ]);
2231
+ }
2232
+ return () => f();
2233
+ }
2234
+ }), Aa = {
2235
+ key: 0,
2236
+ class: "c-rect-button-image unselectable"
2237
+ }, _a = ["src"], $a = {
2238
+ key: 1,
2239
+ class: "c-rect-button-label unselectable"
2240
+ }, qa = {
2241
+ __name: "CRectButton",
2242
+ props: {
2243
+ access: String,
2244
+ dark: Boolean,
2245
+ disable: Boolean,
2246
+ // standard disable
2247
+ disabled: Boolean,
2248
+ hasAccess: {
2249
+ type: Boolean,
2250
+ default: !0
2251
+ },
2252
+ icon: String,
2253
+ image: String,
2254
+ // allow you to still process click event
2255
+ label: String,
2256
+ lock: Boolean,
2257
+ selected: Boolean
2258
+ },
2259
+ emits: ["click", "locked", "blockAccess"],
2260
+ setup(e, { emit: a }) {
2261
+ const n = e, t = a, o = () => {
2262
+ if (n.hasAccess) {
2263
+ t("click");
2264
+ return;
2265
+ }
2266
+ t("blockAccess", n.access);
2267
+ };
2268
+ return (s, c) => {
2269
+ const i = A("q-btn");
2270
+ return _(), L(i, {
2271
+ class: Y(["c-rect-button", { selected: e.selected, disabled: e.disabled, dark: e.dark, lock: e.lock }]),
2272
+ "no-ripple": e.disabled,
2273
+ disable: e.disable,
2274
+ round: "",
2275
+ outline: "",
2276
+ flat: "",
2277
+ unelevated: "",
2278
+ "no-caps": "",
2279
+ icon: e.icon,
2280
+ onClick: o
2281
+ }, {
2282
+ default: S(() => [
2283
+ e.image ? (_(), se("div", Aa, [
2284
+ x("img", {
2285
+ src: e.image,
2286
+ class: "unselectable"
2287
+ }, null, 8, _a)
2288
+ ])) : le("", !0),
2289
+ e.label ? (_(), se("span", $a, be(e.label), 1)) : le("", !0)
2290
+ ]),
2291
+ _: 1
2292
+ }, 8, ["class", "no-ripple", "disable", "icon"]);
2293
+ };
2294
+ }
2295
+ }, Yt = M({
2296
+ name: "CResponsiveLayout",
2297
+ props: {
2298
+ modelValue: Boolean
2299
+ },
2300
+ emits: ["update:modelValue"],
2301
+ setup(e, { slots: a, emit: n }) {
2302
+ y(null), y(null);
2303
+ const t = u({
2304
+ get: () => e.modelValue,
2305
+ set: (s) => n("update:modelValue", s)
2306
+ });
2307
+ function o() {
2308
+ const s = [
2309
+ r(
2310
+ "div",
2311
+ { class: "c-right-drawer-container", ref: "containerRef" },
2312
+ r(
2313
+ ie,
2314
+ { name: "fade" },
2315
+ () => {
2316
+ var c;
2317
+ return r(
2318
+ "div",
2319
+ { class: "c-right-drawer-container-default" },
2320
+ ((c = a.default) == null ? void 0 : c.call(a)) || []
2321
+ );
2322
+ }
2323
+ )
2324
+ )
2325
+ ];
2326
+ return r(
2327
+ yn,
2328
+ {
2329
+ class: "c-right-drawer",
2330
+ "full-height": !0,
2331
+ position: "right",
2332
+ dark: !0,
2333
+ seamless: !0,
2334
+ square: !0,
2335
+ modelValue: t.value,
2336
+ "onUpdate:modelValue": (c) => t.value = c,
2337
+ ref: "dialogRef"
2338
+ },
2339
+ () => s
2340
+ );
2341
+ }
2342
+ return () => o();
2343
+ }
2344
+ }), Ta = { class: "c-round-button-holder" }, za = { class: "c-round-button-image unselectable" }, Ia = ["src"], La = {
2345
+ key: 0,
2346
+ class: "c-round-button-label unselectable"
2347
+ }, Te = {
2348
+ __name: "CRoundButton",
2349
+ props: {
2350
+ access: String,
2351
+ dark: Boolean,
2352
+ disable: Boolean,
2353
+ // standard disable
2354
+ disabled: Boolean,
2355
+ // allow you to still process click event
2356
+ hasAccess: {
2357
+ type: Boolean,
2358
+ default: !0
2359
+ },
2360
+ icon: String,
2361
+ image: String,
2362
+ label: String,
2363
+ selected: Boolean,
2364
+ show: {
2365
+ default: !0,
2366
+ type: Boolean
2367
+ }
2368
+ },
2369
+ emits: ["click", "blockAccess"],
2370
+ setup(e, { emit: a }) {
2371
+ const n = e, t = a, o = () => {
2372
+ if (n.hasAccess) {
2373
+ t("click");
2374
+ return;
2375
+ }
2376
+ t("blockAccess", n.access);
2377
+ };
2378
+ return (s, c) => {
2379
+ const i = A("q-btn");
2380
+ return _(), L(ie, { name: "expando" }, {
2381
+ default: S(() => [
2382
+ R(x("div", Ta, [
2383
+ D(i, {
2384
+ class: Y(["c-round-button", { selected: e.selected, disabled: e.disabled, dark: e.dark }]),
2385
+ "no-ripple": e.disabled,
2386
+ disable: e.disable,
2387
+ round: "",
2388
+ outline: "",
2389
+ flat: "",
2390
+ unelevated: "",
2391
+ "no-caps": "",
2392
+ icon: e.icon,
2393
+ onClick: o
2394
+ }, {
2395
+ default: S(() => [
2396
+ x("div", za, [
2397
+ e.image ? (_(), se("img", {
2398
+ key: 0,
2399
+ src: e.image,
2400
+ class: "unselectable"
2401
+ }, null, 8, Ia)) : le("", !0)
2402
+ ]),
2403
+ e.label ? (_(), se("span", La, be(e.label), 1)) : le("", !0)
2404
+ ]),
2405
+ _: 1
2406
+ }, 8, ["class", "no-ripple", "disable", "icon"])
2407
+ ], 512), [
2408
+ [O, e.show]
2409
+ ])
2410
+ ]),
2411
+ _: 1
2412
+ });
2413
+ };
2414
+ }
2415
+ };
2416
+ function tt(e) {
2417
+ var a = typeof e;
2418
+ return e != null && (a == "object" || a == "function");
2419
+ }
2420
+ var Ma = typeof global == "object" && global && global.Object === Object && global, Na = typeof self == "object" && self && self.Object === Object && self, Zt = Ma || Na || Function("return this")(), Ze = function() {
2421
+ return Zt.Date.now();
2422
+ }, Pa = /\s/;
2423
+ function Ra(e) {
2424
+ for (var a = e.length; a-- && Pa.test(e.charAt(a)); )
2425
+ ;
2426
+ return a;
2427
+ }
2428
+ var Oa = /^\s+/;
2429
+ function Ea(e) {
2430
+ return e && e.slice(0, Ra(e) + 1).replace(Oa, "");
2431
+ }
2432
+ var Fe = Zt.Symbol, Xt = Object.prototype, Ha = Xt.hasOwnProperty, Ua = Xt.toString, Ie = Fe ? Fe.toStringTag : void 0;
2433
+ function Fa(e) {
2434
+ var a = Ha.call(e, Ie), n = e[Ie];
2435
+ try {
2436
+ e[Ie] = void 0;
2437
+ var t = !0;
2438
+ } catch {
2439
+ }
2440
+ var o = Ua.call(e);
2441
+ return t && (a ? e[Ie] = n : delete e[Ie]), o;
2442
+ }
2443
+ var ja = Object.prototype, Wa = ja.toString;
2444
+ function Qa(e) {
2445
+ return Wa.call(e);
2446
+ }
2447
+ var Ga = "[object Null]", Ya = "[object Undefined]", Vt = Fe ? Fe.toStringTag : void 0;
2448
+ function Za(e) {
2449
+ return e == null ? e === void 0 ? Ya : Ga : Vt && Vt in Object(e) ? Fa(e) : Qa(e);
2450
+ }
2451
+ function Xa(e) {
2452
+ return e != null && typeof e == "object";
2453
+ }
2454
+ var Ka = "[object Symbol]";
2455
+ function Ja(e) {
2456
+ return typeof e == "symbol" || Xa(e) && Za(e) == Ka;
2457
+ }
2458
+ var xt = NaN, eo = /^[-+]0x[0-9a-f]+$/i, to = /^0b[01]+$/i, no = /^0o[0-7]+$/i, ao = parseInt;
2459
+ function Dt(e) {
2460
+ if (typeof e == "number")
2461
+ return e;
2462
+ if (Ja(e))
2463
+ return xt;
2464
+ if (tt(e)) {
2465
+ var a = typeof e.valueOf == "function" ? e.valueOf() : e;
2466
+ e = tt(a) ? a + "" : a;
2467
+ }
2468
+ if (typeof e != "string")
2469
+ return e === 0 ? e : +e;
2470
+ e = Ea(e);
2471
+ var n = to.test(e);
2472
+ return n || no.test(e) ? ao(e.slice(2), n ? 2 : 8) : eo.test(e) ? xt : +e;
2473
+ }
2474
+ var oo = "Expected a function", lo = Math.max, so = Math.min;
2475
+ function Qe(e, a, n) {
2476
+ var t, o, s, c, i, l, d = 0, m = !1, v = !1, h = !0;
2477
+ if (typeof e != "function")
2478
+ throw new TypeError(oo);
2479
+ a = Dt(a) || 0, tt(n) && (m = !!n.leading, v = "maxWait" in n, s = v ? lo(Dt(n.maxWait) || 0, a) : s, h = "trailing" in n ? !!n.trailing : h);
2480
+ function k(T) {
2481
+ var G = t, F = o;
2482
+ return t = o = void 0, d = T, c = e.apply(F, G), c;
2483
+ }
2484
+ function f(T) {
2485
+ return d = T, i = setTimeout(B, a), m ? k(T) : c;
2486
+ }
2487
+ function w(T) {
2488
+ var G = T - l, F = T - d, ee = a - G;
2489
+ return v ? so(ee, s - F) : ee;
2490
+ }
2491
+ function p(T) {
2492
+ var G = T - l, F = T - d;
2493
+ return l === void 0 || G >= a || G < 0 || v && F >= s;
2494
+ }
2495
+ function B() {
2496
+ var T = Ze();
2497
+ if (p(T))
2498
+ return $(T);
2499
+ i = setTimeout(B, w(T));
2500
+ }
2501
+ function $(T) {
2502
+ return i = void 0, h && t ? k(T) : (t = o = void 0, c);
2503
+ }
2504
+ function E() {
2505
+ i !== void 0 && clearTimeout(i), d = 0, t = l = o = i = void 0;
2506
+ }
2507
+ function g() {
2508
+ return i === void 0 ? c : $(Ze());
2509
+ }
2510
+ function z() {
2511
+ var T = Ze(), G = p(T);
2512
+ if (t = arguments, o = this, l = T, G) {
2513
+ if (i === void 0)
2514
+ return f(l);
2515
+ if (v)
2516
+ return clearTimeout(i), i = setTimeout(B, a), k(l);
2517
+ }
2518
+ return i === void 0 && (i = setTimeout(B, a)), c;
2519
+ }
2520
+ return z.cancel = E, z.flush = g, z;
2521
+ }
2522
+ const co = ["innerHTML"], io = { style: { margin: "0 10px", position: "relative" } }, ro = {
2523
+ key: 0,
2524
+ class: "c-slider-indicator"
2525
+ }, xe = {
2526
+ __name: "CSlider",
2527
+ props: {
2528
+ access: String,
2529
+ dark: Boolean,
2530
+ disable: Boolean,
2531
+ initial: Number,
2532
+ hasAccess: {
2533
+ type: Boolean,
2534
+ default: !0
2535
+ },
2536
+ icon: String,
2537
+ noIcons: Boolean,
2538
+ title: String,
2539
+ max: {
2540
+ type: Number,
2541
+ default: 100
2542
+ },
2543
+ min: {
2544
+ type: Number,
2545
+ default: 0
2546
+ },
2547
+ modelValue: {
2548
+ type: Number,
2549
+ required: !0
2550
+ }
2551
+ },
2552
+ emits: ["update:modelValue", "blockAccess"],
2553
+ setup(e, { emit: a }) {
2554
+ const n = e, t = a, o = y(null), s = y(et), c = y(null), i = u({
2555
+ get() {
2556
+ return n.modelValue;
2557
+ },
2558
+ set(h) {
2559
+ t("update:modelValue", h);
2560
+ }
2561
+ }), l = u(() => ({
2562
+ left: (n.initial - n.min) / (n.max - n.min) * 100 + "%"
2563
+ })), d = u(() => typeof n.initial < "u"), m = u(() => n.dark ? {
2564
+ color: "rgba(255, 255, 255, 0.6)"
2565
+ } : {
2566
+ color: "#333333"
2567
+ }), v = Qe(
2568
+ () => {
2569
+ t("blockAccess", n.access);
2570
+ },
2571
+ 1e3,
2572
+ { leading: !0, trailing: !0 }
2573
+ );
2574
+ return ce(
2575
+ () => n.modelValue,
2576
+ (h) => {
2577
+ !n.hasAccess && h !== o.value && (setTimeout(() => {
2578
+ v();
2579
+ }, 400), setTimeout(() => {
2580
+ t("update:modelValue", o.value);
2581
+ }, 1e3));
2582
+ }
2583
+ ), J(() => {
2584
+ o.value = n.initial ? n.initial : n.modelValue;
2585
+ }), (h, k) => {
2586
+ const f = A("q-icon"), w = A("q-item-section"), p = A("q-slider"), B = A("q-avatar"), $ = A("q-btn"), E = A("q-item");
2587
+ return _(), L(E, {
2588
+ class: Y(["c-slider", { "no-icons": e.noIcons, dark: e.dark }])
2589
+ }, {
2590
+ default: S(() => [
2591
+ !e.noIcons && e.icon ? (_(), L(w, {
2592
+ key: 0,
2593
+ side: "",
2594
+ class: "c-slider-left-icon"
2595
+ }, {
2596
+ default: S(() => [
2597
+ D(f, {
2598
+ name: e.icon,
2599
+ style: pe(m.value),
2600
+ size: "20px"
2601
+ }, null, 8, ["name", "style"])
2602
+ ]),
2603
+ _: 1
2604
+ })) : le("", !0),
2605
+ D(w, { style: { position: "relative" } }, {
2606
+ default: S(() => [
2607
+ e.title ? (_(), se("div", {
2608
+ key: 0,
2609
+ class: "c-slider-title unselectable",
2610
+ innerHTML: e.title
2611
+ }, null, 8, co)) : le("", !0),
2612
+ x("div", io, [
2613
+ D(p, {
2614
+ ref_key: "slider",
2615
+ ref: c,
2616
+ class: "control-bar-slider",
2617
+ color: "primary",
2618
+ max: e.max,
2619
+ min: e.min,
2620
+ modelValue: i.value,
2621
+ "onUpdate:modelValue": k[0] || (k[0] = (g) => i.value = g),
2622
+ disable: e.disable
2623
+ }, null, 8, ["max", "min", "modelValue", "disable"]),
2624
+ d.value ? (_(), se("div", ro, [
2625
+ x("div", {
2626
+ class: "c-slider-indicator-tick",
2627
+ style: pe(l.value)
2628
+ }, null, 4)
2629
+ ])) : le("", !0)
2630
+ ])
2631
+ ]),
2632
+ _: 1
2633
+ }),
2634
+ d.value && !e.noIcons ? (_(), L(w, {
2635
+ key: 1,
2636
+ side: "",
2637
+ class: "c-slider-right-icon"
2638
+ }, {
2639
+ default: S(() => [
2640
+ D($, {
2641
+ round: "",
2642
+ size: "xs",
2643
+ onClick: k[1] || (k[1] = (g) => i.value = e.initial),
2644
+ style: pe(m.value),
2645
+ disabled: e.initial === i.value,
2646
+ flat: "",
2647
+ "data-cy": `c-slider-reset-${Z(Ce)(e.title)}`
2648
+ }, {
2649
+ default: S(() => [
2650
+ D(B, { size: "18px" }, {
2651
+ default: S(() => [
2652
+ D(f, {
2653
+ name: s.value,
2654
+ style: pe(m.value),
2655
+ size: "20px"
2656
+ }, null, 8, ["name", "style"])
2657
+ ]),
2658
+ _: 1
2659
+ })
2660
+ ]),
2661
+ _: 1
2662
+ }, 8, ["style", "disabled", "data-cy"])
2663
+ ]),
2664
+ _: 1
2665
+ })) : le("", !0)
2666
+ ]),
2667
+ _: 1
2668
+ }, 8, ["class"]);
2669
+ };
2670
+ }
2671
+ }, uo = {
2672
+ __name: "CToggle",
2673
+ props: {
2674
+ access: String,
2675
+ dark: Boolean,
2676
+ disable: Boolean,
2677
+ drawer: Boolean,
2678
+ hasAccess: {
2679
+ type: Boolean,
2680
+ default: !0
2681
+ },
2682
+ label: {
2683
+ type: String,
2684
+ required: !0
2685
+ },
2686
+ labelOff: String,
2687
+ modelValue: Boolean
2688
+ },
2689
+ emits: ["update:modelValue", "blockAccess"],
2690
+ setup(e, { emit: a }) {
2691
+ const n = e, t = a, o = y(null), s = u(() => n.labelOff ? n.modelValue ? n.label : n.labelOff : n.label), c = u({
2692
+ get() {
2693
+ return n.modelValue;
2694
+ },
2695
+ set(l) {
2696
+ t("update:modelValue", l);
2697
+ }
2698
+ }), i = Qe(
2699
+ () => {
2700
+ t("blockAccess", n.access);
2701
+ },
2702
+ 1e3,
2703
+ { leading: !0, trailing: !0 }
2704
+ );
2705
+ return ce(
2706
+ () => n.modelValue,
2707
+ (l) => {
2708
+ !n.hasAccess && l !== o.value && (setTimeout(() => {
2709
+ i();
2710
+ }, 400), setTimeout(() => {
2711
+ t("update:modelValue", o.value);
2712
+ }, 1e3));
2713
+ }
2714
+ ), J(() => {
2715
+ o.value = n.modelValue;
2716
+ }), (l, d) => {
2717
+ const m = A("q-item-label"), v = A("q-item-section"), h = A("q-toggle"), k = A("q-item");
2718
+ return _(), L(k, {
2719
+ class: Y(["c-toggle", { full: !e.drawer, dark: e.dark }]),
2720
+ tag: "label",
2721
+ ripple: "",
2722
+ "data-cy": `c-toggle-${Z(Ce)(e.label)}`
2723
+ }, {
2724
+ default: S(() => [
2725
+ D(v, null, {
2726
+ default: S(() => [
2727
+ D(m, { class: "c-toggle-title unselectable" }, {
2728
+ default: S(() => [
2729
+ at(be(s.value), 1)
2730
+ ]),
2731
+ _: 1
2732
+ })
2733
+ ]),
2734
+ _: 1
2735
+ }),
2736
+ D(v, { side: "" }, {
2737
+ default: S(() => [
2738
+ D(h, {
2739
+ color: "primary",
2740
+ modelValue: c.value,
2741
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => c.value = f),
2742
+ size: "xs",
2743
+ disable: e.disable
2744
+ }, null, 8, ["modelValue", "disable"])
2745
+ ]),
2746
+ _: 1
2747
+ })
2748
+ ]),
2749
+ _: 1
2750
+ }, 8, ["class", "data-cy"]);
2751
+ };
2752
+ }
2753
+ }, Kt = M({
2754
+ name: "CToolHeader",
2755
+ props: {
2756
+ label: { type: String, required: !1 }
2757
+ },
2758
+ setup(e, { slots: a, emit: n }) {
2759
+ function t() {
2760
+ return r("div", {
2761
+ class: "c-tool-header text-center q-pa-md"
2762
+ }, e.label);
2763
+ }
2764
+ return () => t();
2765
+ }
2766
+ }), _e = {
2767
+ brightness: {
2768
+ icon: mt,
2769
+ access: "bct",
2770
+ min: 50,
2771
+ max: 150,
2772
+ initial: 100
2773
+ },
2774
+ contrast: {
2775
+ icon: dt,
2776
+ access: "cct",
2777
+ min: 50,
2778
+ max: 150,
2779
+ initial: 100
2780
+ },
2781
+ saturate: {
2782
+ icon: ut,
2783
+ access: "sct",
2784
+ min: 50,
2785
+ max: 150,
2786
+ initial: 100
2787
+ },
2788
+ spin: {
2789
+ icon: rt,
2790
+ min: 0,
2791
+ max: 35
2792
+ },
2793
+ zoom: {
2794
+ icon: it,
2795
+ access: "zom",
2796
+ min: 0,
2797
+ max: 100
2798
+ }
2799
+ }, mo = M({
2800
+ name: "CBasicTool",
2801
+ props: {
2802
+ dark: Boolean,
2803
+ disable: Boolean,
2804
+ locked: Boolean,
2805
+ hasAccess: {
2806
+ type: Boolean,
2807
+ default: !0
2808
+ },
2809
+ initial: {
2810
+ type: Number,
2811
+ default: 100
2812
+ },
2813
+ modelValue: Number,
2814
+ noIcons: Boolean,
2815
+ type: {
2816
+ type: String,
2817
+ default: "brightness",
2818
+ validator: (e) => Object.keys(_e).includes(e)
2819
+ }
2820
+ },
2821
+ emits: ["blockAccess", "update:modelValue", "lockClicked"],
2822
+ setup(e, { slots: a, emit: n }) {
2823
+ const { lang: t } = X(), o = (k) => n("blockAccess", k), s = u({
2824
+ get: () => e.modelValue,
2825
+ set: (k) => n("update:modelValue", k)
2826
+ }), c = u(() => _e[e.type].access), i = u(() => _e[e.type].icon), l = u(() => _e[e.type].max), d = u(() => _e[e.type].min), m = u(
2827
+ () => _e[e.type].initial || e.initial
2828
+ ), v = u(
2829
+ () => {
2830
+ var k;
2831
+ return e.noIcons ? null : (k = t.value.controls) == null ? void 0 : k[e.type].title;
2832
+ }
2833
+ // {
2834
+ // if (props.noIcons) return
2835
+ // if (lang.value.controls?.[props.type]) {
2836
+ // return lang.value.controls?.[props.type].title
2837
+ // }
2838
+ // // props.noIcons ? null : lang.value.controls?.[props].title || 'No title',
2839
+ // },
2840
+ // props.noIcons ? null : lang.value.controls?.[props].title || 'No title',
2841
+ );
2842
+ function h() {
2843
+ const k = {
2844
+ class: `c-basic-tool c-${e.type}-tool non-draggable`,
2845
+ modelValue: s.value,
2846
+ "onUpdate:modelValue": (f) => s.value = f,
2847
+ access: c.value,
2848
+ color: "primary",
2849
+ icon: i.value,
2850
+ initial: m.value,
2851
+ max: l.value,
2852
+ min: d.value,
2853
+ title: v.value,
2854
+ dark: e.dark,
2855
+ disable: e.disable,
2856
+ hasAccess: e.hasAccess,
2857
+ onBlockAccess: o,
2858
+ "data-cy": "c-basic-tool-" + e.type
2859
+ };
2860
+ return r(xe, k);
2861
+ }
2862
+ return () => h();
2863
+ }
2864
+ }), fo = {
2865
+ __name: "CBrightnessButton",
2866
+ props: {
2867
+ hasAccess: {
2868
+ type: Boolean,
2869
+ default: !0
2870
+ },
2871
+ selected: Boolean
2872
+ },
2873
+ emits: ["click", "blockAccess"],
2874
+ setup(e, { emit: a }) {
2875
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u(
2876
+ () => {
2877
+ var l;
2878
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.brightness.title;
2879
+ }
2880
+ ), i = () => o("click");
2881
+ return (l, d) => (_(), L(Te, {
2882
+ icon: Z(mt),
2883
+ class: "c-brightness-button",
2884
+ label: c.value,
2885
+ selected: e.selected,
2886
+ onClick: i,
2887
+ "has-access": e.hasAccess,
2888
+ onBlockAccess: s
2889
+ }, null, 8, ["icon", "label", "selected", "has-access"]));
2890
+ }
2891
+ }, vo = {
2892
+ __name: "CBrightnessTool",
2893
+ props: {
2894
+ dark: Boolean,
2895
+ disable: Boolean,
2896
+ hasAccess: {
2897
+ type: Boolean,
2898
+ default: !0
2899
+ },
2900
+ modelValue: Number,
2901
+ noIcons: Boolean
2902
+ },
2903
+ emits: ["update:modelValue", "blockAccess"],
2904
+ setup(e, { emit: a }) {
2905
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u({
2906
+ get: () => t.modelValue,
2907
+ set: (l) => o("update:modelValue", l)
2908
+ }), i = u(
2909
+ () => {
2910
+ var l;
2911
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.brightness.title;
2912
+ }
2913
+ );
2914
+ return (l, d) => (_(), L(xe, {
2915
+ access: "bct",
2916
+ class: "brightness-tool",
2917
+ color: "primary",
2918
+ icon: Z(mt),
2919
+ initial: 100,
2920
+ max: 150,
2921
+ min: 50,
2922
+ title: i.value,
2923
+ "no-icons": e.noIcons,
2924
+ modelValue: c.value,
2925
+ "onUpdate:modelValue": d[0] || (d[0] = (m) => c.value = m),
2926
+ dark: e.dark,
2927
+ disable: e.disable,
2928
+ "has-access": e.hasAccess,
2929
+ onBlockAccess: s
2930
+ }, null, 8, ["icon", "title", "no-icons", "modelValue", "dark", "disable", "has-access"]));
2931
+ }
2932
+ }, go = {
2933
+ __name: "CContrastButton",
2934
+ props: {
2935
+ hasAccess: {
2936
+ type: Boolean,
2937
+ default: !0
2938
+ },
2939
+ selected: Boolean
2940
+ },
2941
+ emits: ["click", "blockAccess"],
2942
+ setup(e, { emit: a }) {
2943
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u(
2944
+ () => {
2945
+ var l;
2946
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.contrast.title;
2947
+ }
2948
+ ), i = () => o("click");
2949
+ return (l, d) => (_(), L(Te, {
2950
+ icon: Z(dt),
2951
+ class: "c-contrast-button",
2952
+ label: c.value,
2953
+ selected: e.selected,
2954
+ onClick: i,
2955
+ "has-access": e.hasAccess,
2956
+ onBlockAccess: s
2957
+ }, null, 8, ["icon", "label", "selected", "has-access"]));
2958
+ }
2959
+ }, bo = {
2960
+ __name: "CContrastTool",
2961
+ props: {
2962
+ dark: Boolean,
2963
+ disable: Boolean,
2964
+ hasAccess: {
2965
+ type: Boolean,
2966
+ default: !0
2967
+ },
2968
+ name: String,
2969
+ noIcons: Boolean,
2970
+ modelValue: Number
2971
+ },
2972
+ emits: ["update:modelValue", "blockAccess"],
2973
+ setup(e, { emit: a }) {
2974
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u({
2975
+ get: () => t.modelValue,
2976
+ set: (l) => o("update:modelValue", l)
2977
+ }), i = u(
2978
+ () => {
2979
+ var l;
2980
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.contrast.title;
2981
+ }
2982
+ );
2983
+ return (l, d) => (_(), L(xe, {
2984
+ access: "cct",
2985
+ class: "contrast-item",
2986
+ color: "primary",
2987
+ icon: Z(dt),
2988
+ initial: 100,
2989
+ max: 150,
2990
+ min: 50,
2991
+ title: i.value,
2992
+ "no-icons": e.noIcons,
2993
+ modelValue: c.value,
2994
+ "onUpdate:modelValue": d[0] || (d[0] = (m) => c.value = m),
2995
+ dark: e.dark,
2996
+ disable: e.disable,
2997
+ "has-access": e.hasAccess,
2998
+ onBlockAccess: s
2999
+ }, null, 8, ["icon", "title", "no-icons", "modelValue", "dark", "disable", "has-access"]));
3000
+ }
3001
+ }, ho = M({
3002
+ name: "CGridButton",
3003
+ props: {
3004
+ hasAccess: {
3005
+ type: Boolean,
3006
+ default: !0
3007
+ },
3008
+ selected: Boolean,
3009
+ size: {
3010
+ type: String,
3011
+ default: "lg",
3012
+ validator: (e) => ["sm", "lg"].includes(e)
3013
+ }
3014
+ },
3015
+ emits: ["click", "blockAccess"],
3016
+ setup(e, { slots: a, emit: n }) {
3017
+ const { lang: t } = X(), o = u(() => {
3018
+ var l;
3019
+ return (l = t.value.controls) == null ? void 0 : l.grid.title;
3020
+ }), s = (l) => n("blockAccess", l), c = () => n("click");
3021
+ function i() {
3022
+ const l = {
3023
+ class: "c-grid-button",
3024
+ hasAccess: e.hasAccess || !0,
3025
+ icon: "f_grid",
3026
+ label: o.value,
3027
+ size: e.size,
3028
+ onClick: c,
3029
+ onBlockAccess: s
3030
+ };
3031
+ return r(We, l, () => []);
3032
+ }
3033
+ return () => i();
3034
+ }
3035
+ });
3036
+ function St({
3037
+ viewportAxisLength: e,
3038
+ scaledImageAxisLength: a,
3039
+ imageAxisStartInViewport: n,
3040
+ desiredLineCount: t,
3041
+ offsetFractionOfSpacing: o = 0
3042
+ }) {
3043
+ if (!(t > 0) || !(a > 0))
3044
+ return {
3045
+ firstVisiblePosition: null,
3046
+ spacingInScreenPixels: 0,
3047
+ positionsInScreenPixels: []
3048
+ };
3049
+ const s = a / (t + 1);
3050
+ let c = n + s;
3051
+ const i = Math.max(
3052
+ -0.5,
3053
+ Math.min(0.5, o || 0)
3054
+ );
3055
+ c += i * s, c = yo(
3056
+ c,
3057
+ s
3058
+ );
3059
+ const l = [], d = Math.ceil(
3060
+ (0 - c) / s
3061
+ );
3062
+ let m = c + d * s;
3063
+ for (; m < e; )
3064
+ m >= 0 && l.push(m), m += s;
3065
+ return {
3066
+ firstVisiblePosition: l[0] ?? null,
3067
+ spacingInScreenPixels: s,
3068
+ positionsInScreenPixels: l
3069
+ };
3070
+ }
3071
+ function yo(e, a) {
3072
+ if (!(a > 0)) return e;
3073
+ const n = e % a;
3074
+ return n <= 0 ? n : n - a;
3075
+ }
3076
+ const ko = M({
3077
+ name: "CGridOverlay",
3078
+ props: {
3079
+ imagePoint: {
3080
+ type: Object,
3081
+ default: () => ({ top: 0, left: 0 })
3082
+ },
3083
+ imageSize: {
3084
+ type: Object,
3085
+ default: () => ({ width: 0, height: 0 })
3086
+ },
3087
+ viewportSize: {
3088
+ type: Object,
3089
+ default: () => ({ width: 0, height: 0 })
3090
+ },
3091
+ lines: {
3092
+ type: Number,
3093
+ default: 100
3094
+ },
3095
+ offsetX: {
3096
+ type: Number,
3097
+ default: 0
3098
+ },
3099
+ offsetY: {
3100
+ type: Number,
3101
+ default: 0
3102
+ },
3103
+ visible: {
3104
+ type: Boolean,
3105
+ default: !1
3106
+ },
3107
+ stroke: { type: String, default: "#0087ff" },
3108
+ strokeWidth: { type: Number, default: 1 },
3109
+ // optional: customize transition name
3110
+ transitionName: { type: String, default: "fade" }
3111
+ },
3112
+ setup(e, { slots: a, emit: n }) {
3113
+ const t = u(
3114
+ () => St({
3115
+ viewportAxisLength: e.viewportSize.width,
3116
+ scaledImageAxisLength: e.imageSize.width,
3117
+ imageAxisStartInViewport: e.imagePoint.left,
3118
+ desiredLineCount: e.lines,
3119
+ offsetFractionOfSpacing: e.offsetX
3120
+ }).positionsInScreenPixels
3121
+ ), o = u(
3122
+ () => St({
3123
+ viewportAxisLength: e.viewportSize.height,
3124
+ scaledImageAxisLength: e.imageSize.height,
3125
+ imageAxisStartInViewport: e.imagePoint.top,
3126
+ desiredLineCount: e.lines,
3127
+ offsetFractionOfSpacing: e.offsetY
3128
+ }).positionsInScreenPixels
3129
+ );
3130
+ function s() {
3131
+ const c = [
3132
+ ...t.value.map(
3133
+ (d, m) => r("line", {
3134
+ key: `vx-${m}-${d}`,
3135
+ x1: d,
3136
+ y1: 0,
3137
+ x2: d,
3138
+ y2: e.viewportSize.height,
3139
+ stroke: e.stroke,
3140
+ "stroke-width": e.strokeWidth,
3141
+ "shape-rendering": "crispEdges"
3142
+ })
3143
+ ),
3144
+ ...o.value.map(
3145
+ (d, m) => r("line", {
3146
+ key: `hy-${m}-${d}`,
3147
+ x1: 0,
3148
+ y1: d,
3149
+ x2: e.viewportSize.width,
3150
+ y2: d,
3151
+ stroke: e.stroke,
3152
+ "stroke-width": e.strokeWidth,
3153
+ "shape-rendering": "crispEdges"
3154
+ })
3155
+ )
3156
+ ], i = r(
3157
+ "svg",
3158
+ {
3159
+ "data-cy": "c-grid-overlay",
3160
+ width: e.viewportSize.width,
3161
+ height: e.viewportSize.height,
3162
+ style: "position:absolute; inset:0; pointer-events:none;"
3163
+ },
3164
+ c
3165
+ ), l = R(i, [[O, e.visible]]);
3166
+ return r(
3167
+ ie,
3168
+ { name: e.transitionName },
3169
+ { default: () => l }
3170
+ );
3171
+ }
3172
+ return () => s();
3173
+ }
3174
+ }), $e = M({
3175
+ name: "CSlider",
3176
+ props: {
3177
+ access: String,
3178
+ dark: Boolean,
3179
+ disable: Boolean,
3180
+ initial: Number,
3181
+ hasAccess: { type: Boolean, default: !0 },
3182
+ icon: String,
3183
+ noIcons: Boolean,
3184
+ title: String,
3185
+ max: { type: Number, default: 100 },
3186
+ min: { type: Number, default: 0 },
3187
+ modelValue: { type: Number, required: !0 }
3188
+ },
3189
+ emits: ["update:modelValue", "blockAccess"],
3190
+ setup(e, { slots: a, emit: n }) {
3191
+ const t = y(null);
3192
+ y(et);
3193
+ const o = u({
3194
+ get() {
3195
+ return e.modelValue;
3196
+ },
3197
+ set(h) {
3198
+ n("update:modelValue", h);
3199
+ }
3200
+ }), s = u(() => ({ left: (e.initial - e.min) / (e.max - e.min) * 100 + "%" }));
3201
+ u(() => typeof e.initial < "u");
3202
+ const c = u(() => ({ color: e.dark ? "rgba(255, 255, 255, 0.6)" : "#333333" })), i = Qe(
3203
+ () => {
3204
+ n("blockAccess", e.access);
3205
+ },
3206
+ 1e3,
3207
+ { leading: !0, trailing: !0 }
3208
+ );
3209
+ ce(
3210
+ () => e.modelValue,
3211
+ (h) => {
3212
+ !e.hasAccess && h !== t.value && (setTimeout(() => {
3213
+ i();
3214
+ }, 400), setTimeout(() => {
3215
+ n("update:modelValue", t.value);
3216
+ }, 1e3));
3217
+ }
3218
+ ), J(() => {
3219
+ t.value = e.initial ? e.initial : e.modelValue;
3220
+ });
3221
+ function l() {
3222
+ return e.noIcons || !e.icon ? void 0 : r(
3223
+ Le,
3224
+ {
3225
+ side: !0,
3226
+ class: "c-slider-left-icon"
3227
+ },
3228
+ () => r(qe, {
3229
+ name: e.icon,
3230
+ style: c.value,
3231
+ size: "20px"
3232
+ })
3233
+ );
3234
+ }
3235
+ function d() {
3236
+ const h = [];
3237
+ e.title && h.push(
3238
+ r("div", { class: "c-slider-title unselectable" }, e.title)
3239
+ );
3240
+ const k = {
3241
+ class: "control-bar-slider",
3242
+ color: "primary",
3243
+ max: e.max,
3244
+ min: e.min,
3245
+ modelValue: o.value,
3246
+ "onUpdate:modelValue": (p) => o.value = p,
3247
+ disable: e.disable,
3248
+ onPointerdown: (p) => p.stopPropagation(),
3249
+ onMousedown: (p) => p.stopPropagation()
3250
+ }, f = {
3251
+ class: "c-slider-indicator-tick",
3252
+ style: s.value
3253
+ }, w = r(
3254
+ kn,
3255
+ k,
3256
+ () => e.resetable ? r(
3257
+ "div",
3258
+ { class: "c-slider-indicator" },
3259
+ () => r("div", f, () => [])
3260
+ ) : []
3261
+ );
3262
+ return h.push(
3263
+ r("div", { style: "margin: 0 10px; position: relative" }, w)
3264
+ ), r(Le, { style: "position: relative" }, () => h);
3265
+ }
3266
+ function m() {
3267
+ if (!e.resetable || noIcons) return;
3268
+ const h = [], k = {
3269
+ disabled: initial === o,
3270
+ flat: !0,
3271
+ round: !0,
3272
+ style: c.value,
3273
+ onClick: () => o.value = initial,
3274
+ "data-cy": "c-slider-reset-" + Ce(e.title)
3275
+ };
3276
+ return h.push(
3277
+ r(
3278
+ he,
3279
+ k,
3280
+ () => r(
3281
+ pn,
3282
+ { size: "18px" },
3283
+ () => r(qe, { name: et, style: c.value, size: "20px" })
3284
+ )
3285
+ )
3286
+ ), r(Le, { style: "position: relative" }, () => h);
3287
+ }
3288
+ function v() {
3289
+ const h = {
3290
+ class: [
3291
+ "c-slider",
3292
+ "non-draggable",
3293
+ e.noIcons && "no-icons",
3294
+ e.dark && "dark"
3295
+ ],
3296
+ onPointerdown: (f) => f.stopPropagation(),
3297
+ onMousedown: (f) => f.stopPropagation(),
3298
+ "data-cy": "c-slider-" + Ce(e.title)
3299
+ }, k = [l(), d(), m()];
3300
+ return r(qt, h, () => k);
3301
+ }
3302
+ return () => v();
3303
+ }
3304
+ }), Jt = M({
3305
+ name: "CToggle",
3306
+ props: {
3307
+ access: String,
3308
+ dark: Boolean,
3309
+ disable: Boolean,
3310
+ drawer: Boolean,
3311
+ hasAccess: {
3312
+ type: Boolean,
3313
+ default: !0
3314
+ },
3315
+ label: {
3316
+ type: String,
3317
+ required: !0
3318
+ },
3319
+ labelOff: String,
3320
+ modelValue: Boolean
3321
+ },
3322
+ emits: ["update:modelValue", "blockAccess"],
3323
+ setup(e, { slots: a, emit: n }) {
3324
+ const t = y(null), o = u(() => e.labelOff ? e.modelValue ? e.label : e.labelOff : e.label), s = u({
3325
+ get() {
3326
+ return e.modelValue;
3327
+ },
3328
+ set(l) {
3329
+ n("update:modelValue", l);
3330
+ }
3331
+ }), c = Qe(
3332
+ () => {
3333
+ n("blockAccess", e.access);
3334
+ },
3335
+ 1e3,
3336
+ { leading: !0, trailing: !0 }
3337
+ );
3338
+ ce(
3339
+ () => e.modelValue,
3340
+ (l) => {
3341
+ !e.hasAccess && l !== t.value && (setTimeout(() => {
3342
+ c();
3343
+ }, 400), setTimeout(() => {
3344
+ n("update:modelValue", t.value);
3345
+ }, 1e3));
3346
+ }
3347
+ ), J(() => {
3348
+ t.value = e.modelValue;
3349
+ });
3350
+ function i() {
3351
+ const l = {
3352
+ ripple: !0,
3353
+ tab: "label",
3354
+ class: { "c-toggle": !0, full: !e.drawer, dark: e.dark },
3355
+ "data-cy": "c-toggle-" + Ce(e.label)
3356
+ }, d = {
3357
+ color: "primary",
3358
+ modelValue: s.value,
3359
+ "onUpdate:modelValue": (v) => s.value = v,
3360
+ size: "xs",
3361
+ disable: e.disable
3362
+ }, m = { class: "c-toggle-title unselectable" };
3363
+ return r(qt, l, () => [
3364
+ r(
3365
+ Le,
3366
+ {},
3367
+ () => r(wn, m, () => o.value)
3368
+ ),
3369
+ r(Le, { side: !0 }, () => r(Cn, d, () => []))
3370
+ ]);
3371
+ }
3372
+ return () => i();
3373
+ }
3374
+ }), po = M({
3375
+ name: "CGridTool",
3376
+ props: {
3377
+ disable: Boolean,
3378
+ dark: Boolean,
3379
+ hasAccess: {
3380
+ type: Boolean,
3381
+ default: !0
3382
+ },
3383
+ horizontal: { type: Number, default: 0 },
3384
+ noIcons: Boolean,
3385
+ show: Boolean,
3386
+ name: String,
3387
+ modelValue: Number,
3388
+ vertical: { type: Number, default: 0 }
3389
+ },
3390
+ emits: [
3391
+ "update:horizontal",
3392
+ "update:modelValue",
3393
+ "update:vertical",
3394
+ "update:show",
3395
+ "toggle",
3396
+ "blockAccess"
3397
+ ],
3398
+ setup(e, { slots: a, emit: n }) {
3399
+ const t = Ve(), { lang: o } = X(), s = y(t.platform.is.desktop), c = "M50.7574 28L34.1404 11.383C33.5546 10.7972 33.5546 9.84745 34.1404 9.26167C34.7261 8.67588 35.6759 8.67588 36.2617 9.26167L55 28L36.2617 46.7383C35.6759 47.3241 34.7261 47.3241 34.1403 46.7383C33.5546 46.1525 33.5546 45.2028 34.1403 44.617L50.7574 28zM5.24264 28L21.8596 44.617C22.4454 45.2028 22.4454 46.1525 21.8596 46.7383C21.2739 47.3241 20.3241 47.3241 19.7383 46.7383L0.999999 28L19.7383 9.26167C20.3241 8.67588 21.2739 8.67588 21.8596 9.26167C22.4454 9.84745 22.4454 10.7972 21.8596 11.383L5.24264 28Z|0 0 56 56", i = "M28 5.24264L11.383 21.8596C10.7972 22.4454 9.84746 22.4454 9.26167 21.8596C8.67588 21.2739 8.67588 20.3241 9.26167 19.7383L28 1L46.7383 19.7383C47.3241 20.3241 47.3241 21.2739 46.7383 21.8597C46.1525 22.4454 45.2028 22.4454 44.617 21.8597L28 5.24264zM28 50.7574L44.617 34.1404C45.2028 33.5546 46.1525 33.5546 46.7383 34.1404C47.3241 34.7261 47.3241 35.6759 46.7383 36.2617L28 55L9.26167 36.2617C8.67588 35.6759 8.67588 34.7261 9.26167 34.1404C9.84745 33.5546 10.7972 33.5546 11.383 34.1404L28 50.7574Z|0 0 56 56", l = (g) => n("blockAccess", g), d = u({
3400
+ get: () => e.show,
3401
+ set: (g) => n("update:show", g)
3402
+ }), m = u({
3403
+ get: () => e.horizontal,
3404
+ set: (g) => n("update:horizontal", g)
3405
+ }), v = u({
3406
+ get: () => e.modelValue,
3407
+ set: (g) => n("update:modelValue", g)
3408
+ }), h = u({
3409
+ get: () => e.vertical,
3410
+ set: (g) => n("update:vertical", g)
3411
+ }), k = u(() => {
3412
+ var g;
3413
+ return (g = o.value.controls) == null ? void 0 : g.grid.horizontal;
3414
+ }), f = u(() => {
3415
+ var g, z;
3416
+ return o.value.controls ? d.value ? (g = o.value.controls) == null ? void 0 : g.grid.off : (z = o.value.controls) == null ? void 0 : z.grid.on : "";
3417
+ }), w = u(() => {
3418
+ var g;
3419
+ return (g = o.value.controls) == null ? void 0 : g.grid.spacing;
3420
+ }), p = u(() => {
3421
+ var g;
3422
+ return (g = o.value.controls) == null ? void 0 : g.grid.vertical;
3423
+ });
3424
+ function B() {
3425
+ const g = {
3426
+ access: "grd",
3427
+ drawer: !e.noIcons,
3428
+ modelValue: d.value,
3429
+ "onUpdate:modelValue": (z) => d.value = z,
3430
+ label: f.value,
3431
+ dark: e.dark,
3432
+ disable: e.disable,
3433
+ hasAccess: e.hasAccess,
3434
+ onBlockAccess: l
3435
+ };
3436
+ return r(Jt, g);
3437
+ }
3438
+ function $() {
3439
+ const g = [], z = {
3440
+ color: "primary",
3441
+ noIcons: e.noIcons,
3442
+ dark: e.dark,
3443
+ disable: e.disable
3444
+ }, T = {
3445
+ initial: 0,
3446
+ max: 50,
3447
+ min: -50
3448
+ }, G = {
3449
+ ...z,
3450
+ icon: It,
3451
+ initial: 100,
3452
+ max: 150,
3453
+ min: 50,
3454
+ title: w.value,
3455
+ modelValue: v.value,
3456
+ "onUpdate:modelValue": (K) => v.value = K
3457
+ };
3458
+ g.push(r($e, G));
3459
+ const F = {
3460
+ ...z,
3461
+ ...T,
3462
+ icon: c,
3463
+ title: k.value,
3464
+ modelValue: m.value,
3465
+ "onUpdate:modelValue": (K) => m.value = K
3466
+ };
3467
+ g.push(r($e, F));
3468
+ const ee = {
3469
+ ...z,
3470
+ ...T,
3471
+ icon: i,
3472
+ title: p.value,
3473
+ modelValue: h.value,
3474
+ "onUpdate:modelValue": (K) => h.value = K
3475
+ };
3476
+ return g.push(r($e, ee)), s.value ? r(
3477
+ st,
3478
+ {},
3479
+ () => R(r("div", {}, g), [[O, e.show]])
3480
+ ) : R(r("div", {}, g), [[O, e.show]]);
3481
+ }
3482
+ function E() {
3483
+ return r("div", {
3484
+ class: "c-grid-tool"
3485
+ }, [B(), $()]);
3486
+ }
3487
+ return () => E();
3488
+ }
3489
+ }), wo = M({
3490
+ name: "CMoveButton",
3491
+ props: {
3492
+ hasAccess: {
3493
+ type: Boolean,
3494
+ default: !0
3495
+ },
3496
+ selected: Boolean,
3497
+ show: {
3498
+ default: !0,
3499
+ type: Boolean
3500
+ },
3501
+ size: String
3502
+ },
3503
+ emits: ["click", "blockAccess"],
3504
+ setup(e, { slots: a, emit: n }) {
3505
+ const { lang: t } = X(), o = (l) => n("blockAccess", l), s = u(
3506
+ () => {
3507
+ var l;
3508
+ return e.noIcons ? null : (l = t.value.controls) == null ? void 0 : l.move.title;
3509
+ }
3510
+ ), c = () => n("click");
3511
+ function i() {
3512
+ const l = {
3513
+ class: "c-move-button",
3514
+ hasAccess: e.hasAccess,
3515
+ icon: e.icon,
3516
+ label: s.value,
3517
+ selected: e.selected,
3518
+ show: e.show,
3519
+ size: e.size,
3520
+ onClick: c,
3521
+ onBlockAccess: o
3522
+ };
3523
+ return r(We, l, () => []);
3524
+ }
3525
+ return () => i();
3526
+ }
3527
+ }), Co = M({
3528
+ name: "CMoveTool",
3529
+ props: {
3530
+ dark: Boolean,
3531
+ height: {
3532
+ type: Number
3533
+ },
3534
+ knobSize: {
3535
+ type: Number,
3536
+ default: 70
3537
+ },
3538
+ width: {
3539
+ type: Number
3540
+ },
3541
+ name: String,
3542
+ noIcons: Boolean,
3543
+ modelValue: Object
3544
+ },
3545
+ emits: ["click", "onUpdate:modelValue"],
3546
+ setup(e, { slots: a, emit: n }) {
3547
+ const { lang: t } = X(), o = u(
3548
+ () => {
3549
+ var i;
3550
+ return e.noIcons ? null : (i = t.value.controls) == null ? void 0 : i.move.title;
3551
+ }
3552
+ ), s = u({
3553
+ get: () => e.modelValue,
3554
+ set: (i) => n("update:modelValue", i)
3555
+ });
3556
+ function c() {
3557
+ const i = {
3558
+ class: "c-move-tool",
3559
+ title: o.value,
3560
+ height: e.height,
3561
+ knobSize: e.knobSize,
3562
+ width: e.width,
3563
+ modelValue: s.value,
3564
+ dark: e.dark
3565
+ };
3566
+ return r(Gt, i);
3567
+ }
3568
+ return () => c();
3569
+ }
3570
+ }), Bo = M({
3571
+ name: "CGridTool",
3572
+ props: {
3573
+ disable: Boolean,
3574
+ dark: Boolean,
3575
+ hasAccess: {
3576
+ type: Boolean,
3577
+ default: !0
3578
+ },
3579
+ horizontal: { type: Number, default: 0 },
3580
+ noIcons: Boolean,
3581
+ visible: Boolean,
3582
+ name: String,
3583
+ lines: Number,
3584
+ vertical: { type: Number, default: 0 }
3585
+ },
3586
+ emits: [
3587
+ "update:horizontal",
3588
+ "update:vertical",
3589
+ "update:lines",
3590
+ "update:visible",
3591
+ "toggle",
3592
+ "blockAccess"
3593
+ ],
3594
+ setup(e, { slots: a, emit: n }) {
3595
+ const t = Ve(), { lang: o } = X(), s = y(t.platform.is.desktop), c = "M50.7574 28L34.1404 11.383C33.5546 10.7972 33.5546 9.84745 34.1404 9.26167C34.7261 8.67588 35.6759 8.67588 36.2617 9.26167L55 28L36.2617 46.7383C35.6759 47.3241 34.7261 47.3241 34.1403 46.7383C33.5546 46.1525 33.5546 45.2028 34.1403 44.617L50.7574 28zM5.24264 28L21.8596 44.617C22.4454 45.2028 22.4454 46.1525 21.8596 46.7383C21.2739 47.3241 20.3241 47.3241 19.7383 46.7383L0.999999 28L19.7383 9.26167C20.3241 8.67588 21.2739 8.67588 21.8596 9.26167C22.4454 9.84745 22.4454 10.7972 21.8596 11.383L5.24264 28Z|0 0 56 56", i = "M28 5.24264L11.383 21.8596C10.7972 22.4454 9.84746 22.4454 9.26167 21.8596C8.67588 21.2739 8.67588 20.3241 9.26167 19.7383L28 1L46.7383 19.7383C47.3241 20.3241 47.3241 21.2739 46.7383 21.8597C46.1525 22.4454 45.2028 22.4454 44.617 21.8597L28 5.24264zM28 50.7574L44.617 34.1404C45.2028 33.5546 46.1525 33.5546 46.7383 34.1404C47.3241 34.7261 47.3241 35.6759 46.7383 36.2617L28 55L9.26167 36.2617C8.67588 35.6759 8.67588 34.7261 9.26167 34.1404C9.84745 33.5546 10.7972 33.5546 11.383 34.1404L28 50.7574Z|0 0 56 56", l = (g) => n("blockAccess", g), d = u({
3596
+ get: () => e.visible,
3597
+ set: (g) => n("update:visible", g)
3598
+ }), m = u({
3599
+ get: () => e.horizontal,
3600
+ set: (g) => n("update:horizontal", g)
3601
+ }), v = u({
3602
+ get: () => e.lines,
3603
+ set: (g) => n("update:lines", g)
3604
+ }), h = u({
3605
+ get: () => e.vertical,
3606
+ set: (g) => n("update:vertical", g)
3607
+ }), k = u(() => {
3608
+ var g;
3609
+ return (g = o.value.controls) == null ? void 0 : g.grid.horizontal;
3610
+ }), f = u(() => {
3611
+ var g, z;
3612
+ return o.value.controls ? d.value ? (g = o.value.controls) == null ? void 0 : g.grid.off : (z = o.value.controls) == null ? void 0 : z.grid.on : "";
3613
+ }), w = u(() => {
3614
+ var g;
3615
+ return (g = o.value.controls) == null ? void 0 : g.grid.spacing;
3616
+ }), p = u(() => {
3617
+ var g;
3618
+ return (g = o.value.controls) == null ? void 0 : g.grid.vertical;
3619
+ });
3620
+ function B() {
3621
+ const g = {
3622
+ access: "grd",
3623
+ drawer: !e.noIcons,
3624
+ modelValue: d.value,
3625
+ "onUpdate:modelValue": (z) => d.value = z,
3626
+ label: f.value,
3627
+ dark: e.dark,
3628
+ disable: e.disable,
3629
+ hasAccess: e.hasAccess,
3630
+ onBlockAccess: l
3631
+ };
3632
+ return r(Jt, g);
3633
+ }
3634
+ function $() {
3635
+ const g = [], z = {
3636
+ color: "primary",
3637
+ noIcons: e.noIcons,
3638
+ dark: e.dark,
3639
+ disable: e.disable
3640
+ }, T = {
3641
+ initial: 0,
3642
+ max: 50,
3643
+ min: -50
3644
+ }, G = {
3645
+ ...z,
3646
+ icon: It,
3647
+ initial: 20,
3648
+ max: 50,
3649
+ min: 1,
3650
+ title: w.value,
3651
+ modelValue: v.value,
3652
+ "onUpdate:modelValue": (K) => v.value = K
3653
+ };
3654
+ g.push(r($e, G));
3655
+ const F = {
3656
+ ...z,
3657
+ ...T,
3658
+ icon: c,
3659
+ title: k.value,
3660
+ modelValue: m.value,
3661
+ "onUpdate:modelValue": (K) => m.value = K
3662
+ };
3663
+ g.push(r($e, F));
3664
+ const ee = {
3665
+ ...z,
3666
+ ...T,
3667
+ icon: i,
3668
+ title: p.value,
3669
+ modelValue: h.value,
3670
+ "onUpdate:modelValue": (K) => h.value = K
3671
+ };
3672
+ return g.push(r($e, ee)), s.value ? r(
3673
+ st,
3674
+ {},
3675
+ () => R(r("div", {}, g), [[O, e.visible]])
3676
+ ) : R(r("div", {}, g), [[O, e.visible]]);
3677
+ }
3678
+ function E() {
3679
+ return r("div", {
3680
+ class: "c-grid-tool"
3681
+ }, [B(), $()]);
3682
+ }
3683
+ return () => E();
3684
+ }
3685
+ }), Vo = {
3686
+ __name: "CSaturateButton",
3687
+ props: {
3688
+ hasAccess: {
3689
+ type: Boolean,
3690
+ default: !0
3691
+ },
3692
+ selected: Boolean
3693
+ },
3694
+ emits: ["click", "blockAccess"],
3695
+ setup(e, { emit: a }) {
3696
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u(
3697
+ () => {
3698
+ var l;
3699
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.saturate.title;
3700
+ }
3701
+ ), i = () => o("click");
3702
+ return (l, d) => (_(), L(Te, {
3703
+ icon: Z(ut),
3704
+ class: "c-saturate-button",
3705
+ label: c.value,
3706
+ selected: e.selected,
3707
+ onClick: i,
3708
+ "has-access": e.hasAccess,
3709
+ onBlockAccess: s
3710
+ }, null, 8, ["icon", "label", "selected", "has-access"]));
3711
+ }
3712
+ }, xo = {
3713
+ __name: "CSaturateTool",
3714
+ props: {
3715
+ hasAccess: {
3716
+ type: Boolean,
3717
+ default: !0
3718
+ },
3719
+ dark: Boolean,
3720
+ disable: Boolean,
3721
+ name: String,
3722
+ noIcons: Boolean,
3723
+ modelValue: Number
3724
+ },
3725
+ emits: ["update:modelValue", "blockAccess"],
3726
+ setup(e, { emit: a }) {
3727
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u({
3728
+ get() {
3729
+ return t.modelValue;
3730
+ },
3731
+ set(l) {
3732
+ o("update:modelValue", l);
3733
+ }
3734
+ }), i = u(
3735
+ () => {
3736
+ var l;
3737
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.saturate.title;
3738
+ }
3739
+ );
3740
+ return (l, d) => (_(), L(xe, {
3741
+ access: "sct",
3742
+ class: "saturate-item",
3743
+ color: "primary",
3744
+ icon: Z(ut),
3745
+ initial: 100,
3746
+ max: 150,
3747
+ min: 50,
3748
+ "no-icons": e.noIcons,
3749
+ title: i.value,
3750
+ modelValue: c.value,
3751
+ "onUpdate:modelValue": d[0] || (d[0] = (m) => c.value = m),
3752
+ dark: e.dark,
3753
+ disable: e.disable,
3754
+ "has-access": e.hasAccess,
3755
+ onBlockAccess: s
3756
+ }, null, 8, ["icon", "no-icons", "title", "modelValue", "dark", "disable", "has-access"]));
3757
+ }
3758
+ }, Do = {
3759
+ __name: "CSpinButton",
3760
+ props: {
3761
+ hasAccess: {
3762
+ type: Boolean,
3763
+ default: !0
3764
+ },
3765
+ selected: Boolean,
3766
+ show: {
3767
+ default: !0,
3768
+ type: Boolean
3769
+ }
3770
+ },
3771
+ emits: ["click", "blockAccess"],
3772
+ setup(e, { emit: a }) {
3773
+ const { lang: n } = X(), t = e, o = a, s = (l) => o("blockAccess", l), c = u(
3774
+ () => {
3775
+ var l;
3776
+ return t.noIcons ? null : (l = n.value.controls) == null ? void 0 : l.spin.title;
3777
+ }
3778
+ ), i = () => o("click");
3779
+ return (l, d) => (_(), L(Te, {
3780
+ icon: Z(rt),
3781
+ class: "c-spin-button",
3782
+ label: c.value,
3783
+ selected: e.selected,
3784
+ show: e.show,
3785
+ onClick: i,
3786
+ "has-access": e.hasAccess,
3787
+ onBlockAccess: s
3788
+ }, null, 8, ["icon", "label", "selected", "show", "has-access"]));
3789
+ }
3790
+ }, So = M({
3791
+ name: "CSpinTool",
3792
+ props: {
3793
+ dark: Boolean,
3794
+ disable: Boolean,
3795
+ hasAccess: {
3796
+ type: Boolean,
3797
+ default: !0
3798
+ },
3799
+ initial: {
3800
+ type: Number
3801
+ },
3802
+ max: {
3803
+ type: Number,
3804
+ value: 35
3805
+ },
3806
+ min: {
3807
+ type: Number,
3808
+ value: 0
3809
+ },
3810
+ noIcons: Boolean,
3811
+ modelValue: {
3812
+ type: Number,
3813
+ required: !0
3814
+ }
3815
+ },
3816
+ emits: ["blockAccess", "onUpdate:modelValue"],
3817
+ setup(e, { slots: a, emit: n }) {
3818
+ const { lang: t } = X(), o = (l) => n("blockAccess", l), s = u({
3819
+ get() {
3820
+ return e.modelValue;
3821
+ },
3822
+ set(l) {
3823
+ n("update:modelValue", l);
3824
+ }
3825
+ }), c = u(
3826
+ () => {
3827
+ var l;
3828
+ return e.noIcons ? null : (l = t.value.controls) == null ? void 0 : l.spin.title;
3829
+ }
3830
+ );
3831
+ function i() {
3832
+ const l = {
3833
+ class: "c-spin-tool",
3834
+ icon: rt,
3835
+ initial: e.initial,
3836
+ max: e.max,
3837
+ min: e.min,
3838
+ noIcons: e.noIcons,
3839
+ title: c.value,
3840
+ modelValue: s.value,
3841
+ "onUpdate:modelValue": (d) => s.value = d,
3842
+ dark: e.dark,
3843
+ disable: e.disable,
3844
+ hasAccess: e.hasAccess,
3845
+ onBlockAccess: o
3846
+ };
3847
+ return r(xe, l);
3848
+ }
3849
+ return () => i();
3850
+ }
3851
+ }), Ao = {
3852
+ __name: "CZoomButton",
3853
+ props: {
3854
+ hasAccess: {
3855
+ type: Boolean,
3856
+ default: !0
3857
+ },
3858
+ selected: Boolean
3859
+ },
3860
+ emits: ["click", "blockAccess"],
3861
+ setup(e, { emit: a }) {
3862
+ const { lang: n } = X(), t = e, o = a, s = (d) => o("blockAccess", d), c = u(
3863
+ () => {
3864
+ var d;
3865
+ return t.noIcons ? null : (d = n.value.controls) == null ? void 0 : d.zoom.title;
3866
+ }
3867
+ ), i = () => o("click"), l = u(() => t.selected ? Sn : it);
3868
+ return (d, m) => (_(), L(Te, {
3869
+ icon: l.value,
3870
+ class: "c-zoom-button",
3871
+ label: c.value,
3872
+ selected: e.selected,
3873
+ onClick: i,
3874
+ "has-access": e.hasAccess,
3875
+ onBlockAccess: s
3876
+ }, null, 8, ["icon", "label", "selected", "has-access"]));
3877
+ }
3878
+ }, _o = M({
3879
+ name: "CZoomTool",
3880
+ props: {
3881
+ dark: Boolean,
3882
+ disable: Boolean,
3883
+ hasAccess: {
3884
+ type: Boolean,
3885
+ default: !0
3886
+ },
3887
+ initial: {
3888
+ type: Number
3889
+ },
3890
+ max: {
3891
+ type: Number,
3892
+ value: 100
3893
+ },
3894
+ min: {
3895
+ type: Number,
3896
+ value: 0
3897
+ },
3898
+ noIcons: Boolean,
3899
+ modelValue: {
3900
+ type: Number,
3901
+ required: !0
3902
+ }
3903
+ },
3904
+ emits: ["blockAccess", "onUpdate:modelValue"],
3905
+ setup(e, { slots: a, emit: n }) {
3906
+ const { lang: t } = X(), o = (l) => n("blockAccess", l), s = u({
3907
+ get() {
3908
+ return e.modelValue;
3909
+ },
3910
+ set(l) {
3911
+ n("update:modelValue", l);
3912
+ }
3913
+ }), c = u(
3914
+ () => {
3915
+ var l;
3916
+ return e.noIcons ? null : (l = t.value.controls) == null ? void 0 : l.zoom.title;
3917
+ }
3918
+ );
3919
+ function i() {
3920
+ const l = {
3921
+ access: "zom",
3922
+ class: "c-zoom-tool non-draggable",
3923
+ icon: it,
3924
+ initial: e.initial,
3925
+ max: e.max,
3926
+ min: e.min,
3927
+ noIcons: e.noIcons,
3928
+ title: c.value,
3929
+ modelValue: s.value,
3930
+ "onUpdate:modelValue": (d) => s.value = d,
3931
+ dark: e.dark,
3932
+ disable: e.disable,
3933
+ hasAccess: e.hasAccess,
3934
+ onBlockAccess: o
3935
+ };
3936
+ return r(xe, l);
3937
+ }
3938
+ return () => i();
3939
+ }
3940
+ }), nt = {
3941
+ __name: "CDrawer",
3942
+ props: {
3943
+ modelValue: Boolean,
3944
+ side: {
3945
+ type: String,
3946
+ default: "left"
3947
+ },
3948
+ dark: Boolean,
3949
+ overlayTransparent: Boolean
3950
+ },
3951
+ emits: ["update:modelValue"],
3952
+ setup(e, { emit: a }) {
3953
+ const n = e, t = a, o = u({
3954
+ get: () => n.modelValue,
3955
+ set: (c) => t("update:modelValue", c)
3956
+ }), s = u(() => ({
3957
+ "overlay-transparent": n.overlayTransparent,
3958
+ dark: n.dark,
3959
+ "text-white": n.dark
3960
+ }));
3961
+ return (c, i) => {
3962
+ const l = A("q-drawer");
3963
+ return _(), L(l, {
3964
+ class: Y(["c-drawer", s.value]),
3965
+ bordered: "",
3966
+ dark: e.dark,
3967
+ "no-swipe-backdrop": e.overlayTransparent,
3968
+ elevated: "",
3969
+ "show-if-above": !1,
3970
+ side: e.side,
3971
+ modelValue: o.value,
3972
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => o.value = d)
3973
+ }, {
3974
+ default: S(() => [
3975
+ I(c.$slots, "default")
3976
+ ]),
3977
+ _: 3
3978
+ }, 8, ["class", "dark", "no-swipe-backdrop", "side", "modelValue"]);
3979
+ };
3980
+ }
3981
+ }, en = {
3982
+ __name: "CFab",
3983
+ props: {
3984
+ show: Boolean,
3985
+ icon: String,
3986
+ backgroundColor: {
3987
+ default: Be("primary"),
3988
+ type: String
3989
+ },
3990
+ color: {
3991
+ default: "#ffffff",
3992
+ type: String
3993
+ }
3994
+ },
3995
+ emits: ["click"],
3996
+ setup(e, { emit: a }) {
3997
+ const n = e, t = a, o = u(() => n.icon ? n.icon : zt), s = u(() => ({
3998
+ color: n.color,
3999
+ backgroundColor: n.backgroundColor
4000
+ })), c = () => t("click");
4001
+ return (i, l) => {
4002
+ const d = A("q-btn"), m = A("q-page-sticky");
4003
+ return R((_(), L(m, {
4004
+ position: "bottom-right",
4005
+ offset: [18, 18],
4006
+ style: { "z-index": "12", transform: "translate(0, 0)" }
4007
+ }, {
4008
+ default: S(() => [
4009
+ D(d, {
4010
+ class: "c-fab",
4011
+ onClick: c,
4012
+ fab: "",
4013
+ icon: o.value,
4014
+ unelevated: "",
4015
+ round: "",
4016
+ style: pe(s.value)
4017
+ }, null, 8, ["icon", "style"])
4018
+ ]),
4019
+ _: 1
4020
+ }, 512)), [
4021
+ [O, e.show]
4022
+ ]);
4023
+ };
4024
+ }
4025
+ }, $o = {
4026
+ __name: "CMenuButton",
4027
+ emits: ["click"],
4028
+ setup(e, { emit: a }) {
4029
+ const { lang: n } = X(), t = a, o = u(() => {
4030
+ var c;
4031
+ return (c = n.value.controls) == null ? void 0 : c.menu.title;
4032
+ }), s = () => t("click");
4033
+ return (c, i) => {
4034
+ const l = A("q-btn");
4035
+ return _(), L(l, {
4036
+ class: "c-menu-button darkable q-pl-xs q-pr-sm",
4037
+ onClick: s,
4038
+ dense: "",
4039
+ flat: "",
4040
+ icon: Z(ct),
4041
+ label: o.value,
4042
+ rounded: ""
4043
+ }, null, 8, ["icon", "label"]);
4044
+ };
4045
+ }
4046
+ }, qo = {
4047
+ class: "c-right-drawer-container-default",
4048
+ ref: "drawers"
4049
+ }, To = {
4050
+ __name: "CRightDrawer",
4051
+ props: {
4052
+ modelValue: Boolean
4053
+ },
4054
+ emits: ["update:modelValue"],
4055
+ setup(e, { emit: a }) {
4056
+ const n = e, t = a, o = y(null), s = y(null), c = u({
4057
+ get: () => n.modelValue,
4058
+ set: (i) => t("update:modelValue", i)
4059
+ });
4060
+ return (i, l) => {
4061
+ const d = A("q-dialog");
4062
+ return _(), L(d, {
4063
+ class: "c-right-drawer",
4064
+ "full-height": "",
4065
+ position: "right",
4066
+ dark: "",
4067
+ seamless: "",
4068
+ square: "",
4069
+ modelValue: c.value,
4070
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => c.value = m),
4071
+ ref_key: "dialogRef",
4072
+ ref: s
4073
+ }, {
4074
+ default: S(() => [
4075
+ x("div", {
4076
+ class: "c-right-drawer-container",
4077
+ ref_key: "bottom",
4078
+ ref: o
4079
+ }, [
4080
+ D(ie, { name: "fade" }, {
4081
+ default: S(() => [
4082
+ x("div", qo, [
4083
+ I(i.$slots, "default")
4084
+ ], 512)
4085
+ ]),
4086
+ _: 3
4087
+ })
4088
+ ], 512)
4089
+ ]),
4090
+ _: 3
4091
+ }, 8, ["modelValue"]);
4092
+ };
4093
+ }
4094
+ }, zo = { class: "profile-icon" }, Io = { key: "404" }, Lo = { key: "content" }, Mo = {
4095
+ __name: "CInteractiveLayout",
4096
+ props: {
4097
+ active: {
4098
+ type: Number,
4099
+ default: me
4100
+ },
4101
+ dark: Boolean,
4102
+ fabBackgroundColor: {
4103
+ default: Be("primary"),
4104
+ type: String
4105
+ },
4106
+ fabColor: {
4107
+ default: Be("white"),
4108
+ type: String
4109
+ },
4110
+ fabIcon: {
4111
+ default: null,
4112
+ type: String
4113
+ },
4114
+ hideFab: Boolean,
4115
+ leftDrawer: Boolean,
4116
+ notFound: Boolean,
4117
+ overlayTransparent: Boolean,
4118
+ overlay: Boolean,
4119
+ restricted: Boolean,
4120
+ toolRestricted: Boolean
4121
+ },
4122
+ emits: ["update:active", "update:leftDrawer", "right"],
4123
+ setup(e, { emit: a }) {
4124
+ const n = e, t = a, o = dn(), s = y(!1), c = ft, i = () => {
4125
+ k.value = !1;
4126
+ const f = s.value ? _t : $t;
4127
+ t("update:active", f);
4128
+ }, l = () => {
4129
+ t("update:active", me), k.value = !0;
4130
+ }, d = (f) => {
4131
+ if (f && f.width >= 800) {
4132
+ s.value = !0;
4133
+ return;
4134
+ }
4135
+ s.value = !1;
4136
+ }, m = u(() => !(o && o.bottom)), v = u(() => m.value ? !1 : !s.value && n.active !== me), h = u(() => k.value ? !1 : m.value ? n.active !== me : s.value && n.active !== me), k = u({
4137
+ get() {
4138
+ return n.leftDrawer;
4139
+ },
4140
+ set(f) {
4141
+ t("update:active", me), t("update:leftDrawer", f);
4142
+ }
4143
+ });
4144
+ return ce(
4145
+ () => k.value,
4146
+ (f) => {
4147
+ t("update:active", me), t("update:leftDrawer", f);
4148
+ }
4149
+ ), (f, w) => {
4150
+ const p = A("q-resize-observer"), B = A("q-page-container"), $ = A("q-icon"), E = A("q-layout");
4151
+ return _(), L(E, {
4152
+ class: "c-interactive-layout",
4153
+ view: "lhr lpr lfr"
4154
+ }, {
4155
+ default: S(() => [
4156
+ D(ie, {
4157
+ "enter-active-class": "animated fadeIn",
4158
+ "leave-active-class": "animated fadeOut"
4159
+ }, {
4160
+ default: S(() => [
4161
+ R(x("div", {
4162
+ class: "c-interactive-layout-overlay",
4163
+ onClick: w[0] || (w[0] = (g) => k.value = !1)
4164
+ }, [
4165
+ I(f.$slots, "toolRestricted"),
4166
+ I(f.$slots, "restricted"),
4167
+ I(f.$slots, "overlay")
4168
+ ], 512), [
4169
+ [O, e.overlay]
4170
+ ])
4171
+ ]),
4172
+ _: 3
4173
+ }),
4174
+ x("div", null, [
4175
+ D(p, { onResize: d }),
4176
+ D($o, {
4177
+ onClick: l,
4178
+ class: "c-menu-button"
4179
+ }),
4180
+ x("div", zo, [
4181
+ I(f.$slots, "profile")
4182
+ ]),
4183
+ D(nt, {
4184
+ side: "left",
4185
+ behavior: "mobile",
4186
+ class: "c-layout-left-drawer",
4187
+ modelValue: k.value,
4188
+ "onUpdate:modelValue": w[1] || (w[1] = (g) => k.value = g),
4189
+ dark: ""
4190
+ }, {
4191
+ default: S(() => [
4192
+ I(f.$slots, "leftDrawer")
4193
+ ]),
4194
+ _: 3
4195
+ }, 8, ["modelValue"]),
4196
+ I(f.$slots, "profile"),
4197
+ D(To, {
4198
+ "overlay-transparent": e.overlayTransparent,
4199
+ modelValue: h.value,
4200
+ "onUpdate:modelValue": w[2] || (w[2] = (g) => h.value = g),
4201
+ dark: ""
4202
+ }, {
4203
+ default: S(() => [
4204
+ I(f.$slots, "rightDrawer")
4205
+ ]),
4206
+ _: 3
4207
+ }, 8, ["overlay-transparent", "modelValue"]),
4208
+ D(Ot, {
4209
+ desktop: s.value,
4210
+ modelValue: v.value,
4211
+ "onUpdate:modelValue": w[3] || (w[3] = (g) => v.value = g)
4212
+ }, {
4213
+ default: S(() => [
4214
+ I(f.$slots, "bottom")
4215
+ ]),
4216
+ _: 3
4217
+ }, 8, ["desktop", "modelValue"]),
4218
+ D(B, null, {
4219
+ default: S(() => [
4220
+ D(ot, { name: "fade" }, {
4221
+ default: S(() => [
4222
+ R(x("div", Io, [
4223
+ I(f.$slots, "not-found")
4224
+ ], 512), [
4225
+ [O, e.notFound]
4226
+ ]),
4227
+ R(x("div", Lo, [
4228
+ I(f.$slots, "page")
4229
+ ], 512), [
4230
+ [O, !e.notFound]
4231
+ ])
4232
+ ]),
4233
+ _: 3
4234
+ })
4235
+ ]),
4236
+ _: 3
4237
+ }),
4238
+ D($, {
4239
+ class: "logo-button",
4240
+ name: Z(c)
4241
+ }, null, 8, ["name"]),
4242
+ R(D(en, { onClick: i }, null, 512), [
4243
+ [O, !e.active || !e.notFound || !e.hideFab]
4244
+ ])
4245
+ ])
4246
+ ]),
4247
+ _: 3
4248
+ });
4249
+ };
4250
+ }
4251
+ }, No = { class: "c-layout-overlay" }, Po = { class: "profile-icon" }, Ro = { class: "c-right-drawer" }, Oo = { key: "404" }, Eo = { key: "content" }, Ho = {
4252
+ __name: "CLayout",
4253
+ props: {
4254
+ active: String,
4255
+ dark: Boolean,
4256
+ fabBackgroundColor: {
4257
+ default: Be("primary"),
4258
+ type: String
4259
+ },
4260
+ fabColor: {
4261
+ default: Be("white"),
4262
+ type: String
4263
+ },
4264
+ fabIcon: {
4265
+ default: null,
4266
+ type: String
4267
+ },
4268
+ hideFab: Boolean,
4269
+ notFound: Boolean,
4270
+ overlayTransparent: Boolean,
4271
+ overlay: Boolean,
4272
+ restricted: Boolean,
4273
+ rightDrawer: Boolean,
4274
+ toolRestricted: Boolean
4275
+ },
4276
+ emits: ["rightDrawerClicked"],
4277
+ setup(e, { emit: a }) {
4278
+ const n = e, t = a, o = y(!1), s = y(!1), c = y(!1), i = () => c.value = !c.value, l = u({
4279
+ get: () => n.rightDrawer,
4280
+ set: (m) => t("rightDrawerClicked", m)
4281
+ }), d = (m) => {
4282
+ if (m && m.width >= 800) {
4283
+ o.value = !0;
4284
+ return;
4285
+ }
4286
+ o.value = !1;
4287
+ };
4288
+ return J(() => s.value = !0), (m, v) => {
4289
+ const h = A("q-resize-observer"), k = A("q-btn"), f = A("q-space"), w = A("q-toolbar"), p = A("q-header"), B = A("q-page-container"), $ = A("q-icon"), E = A("q-layout");
4290
+ return _(), L(E, {
4291
+ class: "c-layout",
4292
+ view: "lhr lpR lfr"
4293
+ }, {
4294
+ default: S(() => [
4295
+ D(ie, { name: "fade" }, {
4296
+ default: S(() => [
4297
+ R(x("div", No, [
4298
+ I(m.$slots, "toolRestricted"),
4299
+ I(m.$slots, "restricted"),
4300
+ I(m.$slots, "overlay")
4301
+ ], 512), [
4302
+ [O, e.restricted || e.toolRestricted]
4303
+ ])
4304
+ ]),
4305
+ _: 3
4306
+ }),
4307
+ x("div", Po, [
4308
+ I(m.$slots, "profile")
4309
+ ]),
4310
+ D(h, { onResize: d }),
4311
+ D(p, null, {
4312
+ default: S(() => [
4313
+ D(w, { style: { "margin-top": "auto", "margin-bottom": "auto" } }, {
4314
+ default: S(() => [
4315
+ D(k, {
4316
+ class: "q-pl-xs q-pr-sm",
4317
+ onClick: i,
4318
+ dense: "",
4319
+ flat: "",
4320
+ icon: Z(ct),
4321
+ label: "Menu",
4322
+ rounded: "",
4323
+ color: e.dark ? "white" : "black",
4324
+ style: { transition: "color 0.3s" }
4325
+ }, null, 8, ["icon", "color"]),
4326
+ D(f)
4327
+ ]),
4328
+ _: 1
4329
+ })
4330
+ ]),
4331
+ _: 1
4332
+ }),
4333
+ D(nt, {
4334
+ side: "left",
4335
+ behavior: "mobile",
4336
+ class: "c-layout-left-drawer",
4337
+ modelValue: c.value,
4338
+ "onUpdate:modelValue": v[0] || (v[0] = (g) => c.value = g),
4339
+ dark: ""
4340
+ }, {
4341
+ default: S(() => [
4342
+ I(m.$slots, "leftDrawer")
4343
+ ]),
4344
+ _: 3
4345
+ }, 8, ["modelValue"]),
4346
+ x("div", Ro, [
4347
+ D(nt, {
4348
+ "container-class": "c-right-drawer",
4349
+ behavior: "mobile",
4350
+ "overlay-transparent": e.overlayTransparent,
4351
+ side: "right",
4352
+ modelValue: l.value,
4353
+ "onUpdate:modelValue": v[1] || (v[1] = (g) => l.value = g),
4354
+ dark: ""
4355
+ }, {
4356
+ default: S(() => [
4357
+ I(m.$slots, "rightDrawer")
4358
+ ]),
4359
+ _: 3
4360
+ }, 8, ["overlay-transparent", "modelValue"])
4361
+ ]),
4362
+ D(B, null, {
4363
+ default: S(() => [
4364
+ D(ot, { name: "fade" }, {
4365
+ default: S(() => [
4366
+ R(x("div", Oo, [
4367
+ I(m.$slots, "not-found")
4368
+ ], 512), [
4369
+ [O, e.notFound]
4370
+ ]),
4371
+ R(x("div", Eo, [
4372
+ I(m.$slots, "page")
4373
+ ], 512), [
4374
+ [O, !e.notFound]
4375
+ ])
4376
+ ]),
4377
+ _: 3
4378
+ })
4379
+ ]),
4380
+ _: 3
4381
+ }),
4382
+ D($, {
4383
+ class: "logo-button",
4384
+ name: Z(ft),
4385
+ color: e.dark ? "white" : "black"
4386
+ }, null, 8, ["name", "color"]),
4387
+ R(D(en, {
4388
+ unelevated: "",
4389
+ onClick: m.rightDrawerClicked
4390
+ }, null, 8, ["onClick"]), [
4391
+ [O, !e.notFound || e.hideFab]
4392
+ ])
4393
+ ]),
4394
+ _: 3
4395
+ });
4396
+ };
4397
+ }
4398
+ }, Uo = M({
4399
+ name: "CResponsiveLayout",
4400
+ props: {
4401
+ active: {
4402
+ type: Number,
4403
+ default: me
4404
+ },
4405
+ dark: Boolean,
4406
+ fabBackgroundColor: {
4407
+ type: String,
4408
+ default: Be("primary")
4409
+ },
4410
+ fabColor: {
4411
+ type: String,
4412
+ default: Be("white")
4413
+ },
4414
+ fabIcon: {
4415
+ type: String,
4416
+ default: null
4417
+ },
4418
+ hideFab: Boolean,
4419
+ leftDrawer: Boolean,
4420
+ notFound: Boolean,
4421
+ overlayTransparent: Boolean,
4422
+ overlay: {
4423
+ type: Boolean,
4424
+ default: !1
4425
+ },
4426
+ restricted: Boolean,
4427
+ toolRestricted: Boolean
4428
+ },
4429
+ emits: ["update:active", "update:leftDrawer"],
4430
+ setup(e, { slots: a, emit: n }) {
4431
+ const t = Ve(), o = y(t.platform.is.desktop);
4432
+ u(() => a.bottom ? !o.value : !1);
4433
+ const s = u(() => e.active !== me), c = u({
4434
+ get: () => e.leftDrawer,
4435
+ set: (f) => n("update:leftDrawer", f)
4436
+ }), i = u({
4437
+ get: () => e.active,
4438
+ set: (f) => {
4439
+ console.log("active", f), n("update:active", f);
4440
+ }
4441
+ });
4442
+ function l() {
4443
+ c.value = !1, n("update:active", o.value ? _t : $t);
4444
+ }
4445
+ function d() {
4446
+ c.value = !0;
4447
+ }
4448
+ function m() {
4449
+ }
4450
+ ce(
4451
+ () => c.value,
4452
+ (f) => {
4453
+ n("update:active", me);
4454
+ }
4455
+ ), Me(m), At(() => {
4456
+ }), J(() => {
4457
+ });
4458
+ function v() {
4459
+ return r(
4460
+ ie,
4461
+ {
4462
+ "enter-active-class": "animated fadeIn",
4463
+ "leave-active-class": "animated fadeOut"
4464
+ },
4465
+ () => {
4466
+ var f, w, p;
4467
+ return R(
4468
+ r(
4469
+ "div",
4470
+ {
4471
+ class: "c-responsive-layout-overlay",
4472
+ onClick: () => c.value = !1
4473
+ },
4474
+ [
4475
+ ...((f = a.toolRestricted) == null ? void 0 : f.call(a)) || [],
4476
+ ...((w = a.restricted) == null ? void 0 : w.call(a)) || [],
4477
+ ...((p = a.overlay) == null ? void 0 : p.call(a)) || []
4478
+ ]
4479
+ ),
4480
+ [[O, e.overlay]]
4481
+ );
4482
+ }
4483
+ );
4484
+ }
4485
+ function h() {
4486
+ var p;
4487
+ const f = [];
4488
+ if (f.push(
4489
+ r(Qt, { class: "c-menu-button", onClick: d })
4490
+ ), f.push(r("div", { class: "profile-icon" }, ((p = a.profile) == null ? void 0 : p.call(a)) || [])), o.value) {
4491
+ const B = {
4492
+ modelValue: s.value,
4493
+ dark: !0
4494
+ };
4495
+ f.push(
4496
+ r(Yt, B, () => {
4497
+ var $;
4498
+ return (($ = a.rightDrawer) == null ? void 0 : $.call(a)) || [];
4499
+ })
4500
+ ), f.push(
4501
+ R(r(Wt, { onClick: l }), [
4502
+ [O, !e.active || !e.notFound || !e.hideFab]
4503
+ ])
4504
+ );
4505
+ }
4506
+ if (!o.value) {
4507
+ const B = {
4508
+ // desktop: desktop.value,
4509
+ modelValue: i.value,
4510
+ dark: !0,
4511
+ "onUpdate:modelValue": ($) => i.value = $
4512
+ };
4513
+ f.push(
4514
+ r(
4515
+ Ft,
4516
+ B,
4517
+ () => {
4518
+ var $;
4519
+ return (($ = a.bottomDrawer) == null ? void 0 : $.call(a)) || [];
4520
+ }
4521
+ )
4522
+ );
4523
+ }
4524
+ f.push(r(qe, { class: "logo-button", name: ft }));
4525
+ const w = {
4526
+ side: "left",
4527
+ behavior: "mobile",
4528
+ class: "c-layout-left-drawer",
4529
+ modelValue: c.value,
4530
+ "onUpdate:modelValue": (B) => c.value = B,
4531
+ dark: !0
4532
+ };
4533
+ return f.push(r(jt, w, () => {
4534
+ var B;
4535
+ return ((B = a.leftDrawer) == null ? void 0 : B.call(a)) || [];
4536
+ })), f.push(
4537
+ r(Vn, {}, () => [
4538
+ r(ot, { name: "fade" }, () => {
4539
+ var B, $;
4540
+ return [
4541
+ R(
4542
+ r("div", { key: "404" }, ((B = a["not-found"]) == null ? void 0 : B.call(a)) || []),
4543
+ [[O, e.notFound]]
4544
+ ),
4545
+ R(r("div", { key: "content" }, (($ = a.page) == null ? void 0 : $.call(a)) || []), [
4546
+ [O, !e.notFound]
4547
+ ])
4548
+ ];
4549
+ })
4550
+ ])
4551
+ ), f;
4552
+ }
4553
+ function k() {
4554
+ const f = [];
4555
+ return f.push(v()), f.push(h()), r(
4556
+ Bn,
4557
+ {
4558
+ class: "c-responsive-layout",
4559
+ role: "responsiveLayout",
4560
+ view: "lhr lpr lfr"
4561
+ },
4562
+ () => f
4563
+ );
4564
+ }
4565
+ return () => k();
4566
+ }
4567
+ }), Fo = { class: "c-tool-layout-left-header-icon" }, jo = { class: "c-tool-layout-center-header-icon" }, Wo = { class: "c-tool-layout-right-header-icon" }, Qo = {
4568
+ __name: "CToolLayout",
4569
+ props: {
4570
+ leftDrawerModel: {
4571
+ type: Boolean,
4572
+ default: !1
4573
+ },
4574
+ leftDrawerModelModifiers: {},
4575
+ rightDrawerModel: {
4576
+ type: Boolean,
4577
+ default: !1
4578
+ },
4579
+ rightDrawerModelModifiers: {}
4580
+ },
4581
+ emits: ["update:leftDrawerModel", "update:rightDrawerModel"],
4582
+ setup(e) {
4583
+ $n();
4584
+ const a = Ue(e, "leftDrawerModel"), n = Ue(e, "rightDrawerModel");
4585
+ return J(() => console.log("CToolLayout Mounted")), (t, o) => {
4586
+ const s = A("q-drawer"), c = A("router-view"), i = A("q-page-container"), l = A("q-layout");
4587
+ return _(), L(l, {
4588
+ class: "c-tool-layout",
4589
+ view: "hHh lpR fFf",
4590
+ "data-id": n.value
4591
+ }, {
4592
+ default: S(() => [
4593
+ x("div", Fo, [
4594
+ I(t.$slots, "leftIcon")
4595
+ ]),
4596
+ x("div", jo, [
4597
+ I(t.$slots, "centerIcon")
4598
+ ]),
4599
+ x("div", Wo, [
4600
+ I(t.$slots, "rightIcon")
4601
+ ]),
4602
+ D(s, {
4603
+ modelValue: a.value,
4604
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => a.value = d),
4605
+ side: "left",
4606
+ overlay: "",
4607
+ bordered: "",
4608
+ behavior: "mobile",
4609
+ class: "c-tool-layout-left-drawer",
4610
+ dark: ""
4611
+ }, {
4612
+ default: S(() => [
4613
+ I(t.$slots, "leftDrawer")
4614
+ ]),
4615
+ _: 3
4616
+ }, 8, ["modelValue"]),
4617
+ D(s, {
4618
+ modelValue: n.value,
4619
+ "onUpdate:modelValue": o[1] || (o[1] = (d) => n.value = d),
4620
+ side: "right",
4621
+ bordered: "",
4622
+ overlay: "",
4623
+ "no-swipe-open": "",
4624
+ width: 360,
4625
+ class: "c-tool-layout-right-drawer"
4626
+ }, {
4627
+ default: S(() => [
4628
+ I(t.$slots, "rightDrawer")
4629
+ ]),
4630
+ _: 3
4631
+ }, 8, ["modelValue"]),
4632
+ D(i, null, {
4633
+ default: S(() => [
4634
+ D(c, null, {
4635
+ default: S(({ Component: d, route: m }) => [
4636
+ (_(), L(mn(d), {
4637
+ key: m.params.id
4638
+ }))
4639
+ ]),
4640
+ _: 1
4641
+ })
4642
+ ]),
4643
+ _: 1
4644
+ })
4645
+ ]),
4646
+ _: 3
4647
+ }, 8, ["data-id"]);
4648
+ };
4649
+ }
4650
+ }, Go = M({
4651
+ name: "CToolTopGlass",
4652
+ props: {
4653
+ height: { type: Number, default: 70 },
4654
+ drawerPadding: {
4655
+ type: Boolean,
4656
+ default: !0
4657
+ }
4658
+ },
4659
+ setup(e, { slots: a, emit: n }) {
4660
+ function t() {
4661
+ const o = e.drawerPadding ? e.height + 60 : e.height, c = {
4662
+ class: "c-top-glass glass-background column justify-end",
4663
+ style: u(() => ({
4664
+ paddingTop: o + "px",
4665
+ height: 0,
4666
+ top: 0,
4667
+ left: 0,
4668
+ right: 0,
4669
+ position: "fixed",
4670
+ zIndex: 5,
4671
+ transition: "padding-top 300ms ease-out"
4672
+ })).value
4673
+ };
4674
+ return r("div", c, a.default ? a.default() : []);
4675
+ }
4676
+ return () => t();
4677
+ }
4678
+ }), Yo = {
4679
+ __name: "CToolPage",
4680
+ props: /* @__PURE__ */ fn({
4681
+ drawerPadding: {
4682
+ type: Boolean,
4683
+ default: !0
4684
+ },
4685
+ title: {
4686
+ type: String,
4687
+ default: "Tool Page Title"
4688
+ }
4689
+ }, {
4690
+ modelValue: { default: !1, type: Boolean },
4691
+ modelModifiers: {},
4692
+ miniState: { default: !0, type: Boolean },
4693
+ miniStateModifiers: {}
4694
+ }),
4695
+ emits: ["update:modelValue", "update:miniState"],
4696
+ setup(e) {
4697
+ const a = Ve(), n = e, t = Ue(e, "modelValue"), o = Ue(e, "miniState"), s = u(() => ({ paddingTop: (n.drawerPadding ? 130 : 60) + "px", transition: "padding-top 300ms ease-out" })), c = () => {
4698
+ o.value = !o.value;
4699
+ }, i = u(() => o.value ? "f_enter" : "f_exit");
4700
+ return J(() => console.log("CToolPage mounted")), (l, d) => {
4701
+ const m = A("q-btn"), v = A("q-drawer"), h = A("q-page");
4702
+ return _(), L(h, { class: "c-tool-page" }, {
4703
+ default: S(() => [
4704
+ I(l.$slots, "default"),
4705
+ Z(a).platform.is.desktop ? (_(), L(v, {
4706
+ key: 0,
4707
+ modelValue: t.value,
4708
+ "onUpdate:modelValue": d[0] || (d[0] = (k) => t.value = k),
4709
+ "show-if-above": "",
4710
+ side: "right",
4711
+ bordered: "",
4712
+ persistent: "",
4713
+ mini: o.value,
4714
+ width: 360,
4715
+ onClick: yt(c, ["stop"]),
4716
+ style: pe(s.value)
4717
+ }, {
4718
+ default: S(() => [
4719
+ R(x("div", null, [
4720
+ R(D(Z(Go), { "drawer-padding": e.drawerPadding }, {
4721
+ default: S(() => [
4722
+ D(Z(Kt), { label: e.title }, null, 8, ["label"])
4723
+ ]),
4724
+ _: 1
4725
+ }, 8, ["drawer-padding"]), [
4726
+ [O, e.title]
4727
+ ]),
4728
+ I(l.$slots, "toolDrawer")
4729
+ ], 512), [
4730
+ [O, !o.value]
4731
+ ]),
4732
+ D(m, {
4733
+ class: "c-tool-page-drawer-button",
4734
+ round: "",
4735
+ unelevated: "",
4736
+ onClick: yt(c, ["stop"]),
4737
+ icon: i.value
4738
+ }, null, 8, ["icon"])
4739
+ ]),
4740
+ _: 3
4741
+ }, 8, ["modelValue", "mini", "style"])) : le("", !0),
4742
+ I(l.$slots, "bottomDrawer")
4743
+ ]),
4744
+ _: 3
4745
+ });
4746
+ };
4747
+ }
4748
+ }, ll = {
4749
+ install(e) {
4750
+ e.component("CAnimatedNumber", Nt), e.component("CBaseButton", Pn), e.component("CBaseButtons", Rn), e.component("CBasicTool", mo), e.component("CBottomDrawer", Ot), e.component("CBottomDrawerContainer", Zn), e.component("CBottomDrawerHeader", Et), e.component("CBrightnessButton", fo), e.component("CBrightnessTool", vo), e.component("CButton", We), e.component("CButtonBar", Xn), e.component("CButtonRow", ea), e.component("CButtonToggle", ta), e.component("CCameraDirection", oa), e.component("CColorPicker", ca), e.component("CColorPickerButton", ia), e.component("CColorPickerPopup", Ht), e.component("CContrastButton", go), e.component("CContrastTool", bo), e.component("CDivider", ra), e.component("CDraggableDrawer", ga), e.component("CDraggableDrawers", Ft), e.component("CDrawer", jt), e.component("CDrawerHeader", Rt), e.component("CDurationButton", ya), e.component("CExpansion", ka), e.component("CExpansionItem", pa), e.component("CFab", Wt), e.component("CFloatingModal", wa), e.component("CGridButton", ho), e.component("CGridOverlay", ko), e.component("CGridTool", po), e.component("CHorizontalScroller", Ca), e.component("CIconButton", Va), e.component("CInteractiveLayout", Mo), e.component("CItemHeading", Da), e.component("CLayout", Ho), e.component("CMenuButton", Qt), e.component("CMoveButton", wo), e.component("CMoveTool", Co), e.component("CNavigator", Gt), e.component("CNewGridTool", Bo), e.component("COverlayLoader", Sa), e.component("CRectButton", qa), e.component("CResponsiveLayout", Uo), e.component("CRightDrawer", Yt), e.component("CRoundButton", Te), e.component("CSaturateButton", Vo), e.component("CSaturateTool", xo), e.component("CSlider", xe), e.component("CSpinButton", Do), e.component("CSpinTool", So), e.component("CToggle", uo), e.component("CToolHeader", Kt), e.component("CToolLayout", Qo), e.component("CToolPage", Yo), e.component("CZoomButton", Ao), e.component("CZoomTool", _o);
4751
+ }
4752
+ };
4753
+ export {
4754
+ Nt as CAnimatedNumber,
4755
+ Pn as CBaseButton,
4756
+ Rn as CBaseButtons,
4757
+ mo as CBasicTool,
4758
+ Ot as CBottomDrawer,
4759
+ Zn as CBottomDrawerContainer,
4760
+ Et as CBottomDrawerHeader,
4761
+ fo as CBrightnessButton,
4762
+ vo as CBrightnessTool,
4763
+ We as CButton,
4764
+ Xn as CButtonBar,
4765
+ ea as CButtonRow,
4766
+ ta as CButtonToggle,
4767
+ oa as CCameraDirection,
4768
+ ca as CColorPicker,
4769
+ ia as CColorPickerButton,
4770
+ Ht as CColorPickerPopup,
4771
+ go as CContrastButton,
4772
+ bo as CContrastTool,
4773
+ ra as CDivider,
4774
+ ga as CDraggableDrawer,
4775
+ Ft as CDraggableDrawers,
4776
+ jt as CDrawer,
4777
+ Rt as CDrawerHeader,
4778
+ ya as CDurationButton,
4779
+ ka as CExpansion,
4780
+ pa as CExpansionItem,
4781
+ Wt as CFab,
4782
+ wa as CFloatingModal,
4783
+ ho as CGridButton,
4784
+ ko as CGridOverlay,
4785
+ po as CGridTool,
4786
+ Ca as CHorizontalScroller,
4787
+ Va as CIconButton,
4788
+ Mo as CInteractiveLayout,
4789
+ Da as CItemHeading,
4790
+ Ho as CLayout,
4791
+ Qt as CMenuButton,
4792
+ wo as CMoveButton,
4793
+ Co as CMoveTool,
4794
+ Gt as CNavigator,
4795
+ Bo as CNewGridTool,
4796
+ Sa as COverlayLoader,
4797
+ qa as CRectButton,
4798
+ Uo as CResponsiveLayout,
4799
+ Yt as CRightDrawer,
4800
+ Te as CRoundButton,
4801
+ Vo as CSaturateButton,
4802
+ xo as CSaturateTool,
4803
+ xe as CSlider,
4804
+ Do as CSpinButton,
4805
+ So as CSpinTool,
4806
+ uo as CToggle,
4807
+ Kt as CToolHeader,
4808
+ Qo as CToolLayout,
4809
+ Yo as CToolPage,
4810
+ Ao as CZoomButton,
4811
+ _o as CZoomTool,
4812
+ ll as default
4813
+ };