golden-logic-ui 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,33 +1,4519 @@
1
- import { c as t, a as e, p as s, o as G, r as o, s as r, t as D, u as i, v as n, w as b, x as T, y as d, z as u, D as p, m as c, F as x, G as S, k as m, j as g, b as f, N as w, i as F, h as M, g as y, f as v, n as A, d as B, e as C, l as I, q as L } from "./main-Hf5LCVPR.js";
1
+ import { openBlock as d, createElementBlock as u, createElementVNode as s, createCommentVNode as g, createStaticVNode as De, watch as Q, inject as de, effectScope as Pe, reactive as Ee, computed as je, resolveComponent as U, Fragment as y, createVNode as B, normalizeClass as p, toDisplayString as h, withModifiers as I, withDirectives as S, vModelText as A, renderList as w, normalizeStyle as Ie, renderSlot as j, createTextVNode as v, vShow as T, createBlock as q, resolveDynamicComponent as W, mergeProps as R, withCtx as X, ref as C, onMounted as G, provide as Ae, pushScopeId as Te, popScopeId as Ne, toHandlers as Z, resolveDirective as ue, markRaw as Me } from "vue";
2
+ const k = (e, t) => {
3
+ const r = e.__vccOpts || e;
4
+ for (const [n, a] of t)
5
+ r[n] = a;
6
+ return r;
7
+ }, Ve = {
8
+ props: ["isOpen"],
9
+ methods: {
10
+ confirmDeletion() {
11
+ this.$emit("confirm-delete");
12
+ },
13
+ cancelDeletion() {
14
+ this.$emit("cancel-delete");
15
+ }
16
+ }
17
+ }, Le = {
18
+ key: 0,
19
+ class: "fixed inset-0 z-50 overflow-y-auto",
20
+ "aria-labelledby": "modal-title",
21
+ role: "dialog",
22
+ "aria-modal": "true"
23
+ }, Be = { class: "flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0" }, Ge = /* @__PURE__ */ s("div", {
24
+ class: "fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75",
25
+ "aria-hidden": "true"
26
+ }, null, -1), Fe = /* @__PURE__ */ s("span", {
27
+ class: "hidden sm:inline-block sm:align-middle sm:h-screen",
28
+ "aria-hidden": "true"
29
+ }, "​", -1), Re = { class: "inline-block overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full" }, Ue = /* @__PURE__ */ De('<div class="px-4 pt-5 pb-4 bg-white sm:p-6 sm:pb-4"><div class="sm:flex sm:items-start"><div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"><h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title"> Confirm Deletion </h3><div class="mt-2"><p class="text-sm text-gray-500"> Are you sure you want to delete this item? This action cannot be undone. </p></div></div></div></div>', 1), qe = { class: "px-4 py-3 bg-gray-50 sm:px-6 sm:flex sm:flex-row-reverse" };
30
+ function He(e, t, r, n, a, o) {
31
+ return r.isOpen ? (d(), u("div", Le, [
32
+ s("div", Be, [
33
+ Ge,
34
+ Fe,
35
+ s("div", Re, [
36
+ Ue,
37
+ s("div", qe, [
38
+ s("button", {
39
+ onClick: t[0] || (t[0] = (...l) => o.confirmDeletion && o.confirmDeletion(...l)),
40
+ type: "button",
41
+ class: "inline-flex justify-center w-full px-4 py-2 text-base font-medium text-white bg-red-600 border border-transparent rounded-md shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
42
+ }, " Delete "),
43
+ s("button", {
44
+ onClick: t[1] || (t[1] = (...l) => o.cancelDeletion && o.cancelDeletion(...l)),
45
+ type: "button",
46
+ class: "inline-flex justify-center w-full px-4 py-2 mt-3 text-base font-medium text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
47
+ }, " Cancel ")
48
+ ])
49
+ ])
50
+ ])
51
+ ])) : g("", !0);
52
+ }
53
+ const ee = /* @__PURE__ */ k(Ve, [["render", He]]);
54
+ function ze() {
55
+ return ce().__VUE_DEVTOOLS_GLOBAL_HOOK__;
56
+ }
57
+ function ce() {
58
+ return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
59
+ }
60
+ const Ze = typeof Proxy == "function", Ke = "devtools-plugin:setup", We = "plugin:settings:set";
61
+ let V, Y;
62
+ function Xe() {
63
+ var e;
64
+ return V !== void 0 || (typeof window < "u" && window.performance ? (V = !0, Y = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (V = !0, Y = globalThis.perf_hooks.performance) : V = !1), V;
65
+ }
66
+ function Ye() {
67
+ return Xe() ? Y.now() : Date.now();
68
+ }
69
+ class Je {
70
+ constructor(t, r) {
71
+ this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
72
+ const n = {};
73
+ if (t.settings)
74
+ for (const l in t.settings) {
75
+ const i = t.settings[l];
76
+ n[l] = i.defaultValue;
77
+ }
78
+ const a = `__vue-devtools-plugin-settings__${t.id}`;
79
+ let o = Object.assign({}, n);
80
+ try {
81
+ const l = localStorage.getItem(a), i = JSON.parse(l);
82
+ Object.assign(o, i);
83
+ } catch {
84
+ }
85
+ this.fallbacks = {
86
+ getSettings() {
87
+ return o;
88
+ },
89
+ setSettings(l) {
90
+ try {
91
+ localStorage.setItem(a, JSON.stringify(l));
92
+ } catch {
93
+ }
94
+ o = l;
95
+ },
96
+ now() {
97
+ return Ye();
98
+ }
99
+ }, r && r.on(We, (l, i) => {
100
+ l === this.plugin.id && this.fallbacks.setSettings(i);
101
+ }), this.proxiedOn = new Proxy({}, {
102
+ get: (l, i) => this.target ? this.target.on[i] : (...c) => {
103
+ this.onQueue.push({
104
+ method: i,
105
+ args: c
106
+ });
107
+ }
108
+ }), this.proxiedTarget = new Proxy({}, {
109
+ get: (l, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...c) => (this.targetQueue.push({
110
+ method: i,
111
+ args: c,
112
+ resolve: () => {
113
+ }
114
+ }), this.fallbacks[i](...c)) : (...c) => new Promise((f) => {
115
+ this.targetQueue.push({
116
+ method: i,
117
+ args: c,
118
+ resolve: f
119
+ });
120
+ })
121
+ });
122
+ }
123
+ async setRealTarget(t) {
124
+ this.target = t;
125
+ for (const r of this.onQueue)
126
+ this.target.on[r.method](...r.args);
127
+ for (const r of this.targetQueue)
128
+ r.resolve(await this.target[r.method](...r.args));
129
+ }
130
+ }
131
+ function Qe(e, t) {
132
+ const r = e, n = ce(), a = ze(), o = Ze && r.enableEarlyProxy;
133
+ if (a && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !o))
134
+ a.emit(Ke, e, t);
135
+ else {
136
+ const l = o ? new Je(r, a) : null;
137
+ (n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
138
+ pluginDescriptor: r,
139
+ setupFn: t,
140
+ proxy: l
141
+ }), l && t(l.proxiedTarget);
142
+ }
143
+ }
144
+ /*!
145
+ * vuex v4.1.0
146
+ * (c) 2022 Evan You
147
+ * @license MIT
148
+ */
149
+ var fe = "store";
150
+ function he(e) {
151
+ return e === void 0 && (e = null), de(e !== null ? e : fe);
152
+ }
153
+ function N(e, t) {
154
+ Object.keys(e).forEach(function(r) {
155
+ return t(e[r], r);
156
+ });
157
+ }
158
+ function ge(e) {
159
+ return e !== null && typeof e == "object";
160
+ }
161
+ function et(e) {
162
+ return e && typeof e.then == "function";
163
+ }
164
+ function P(e, t) {
165
+ if (!e)
166
+ throw new Error("[vuex] " + t);
167
+ }
168
+ function tt(e, t) {
169
+ return function() {
170
+ return e(t);
171
+ };
172
+ }
173
+ function me(e, t, r) {
174
+ return t.indexOf(e) < 0 && (r && r.prepend ? t.unshift(e) : t.push(e)), function() {
175
+ var n = t.indexOf(e);
176
+ n > -1 && t.splice(n, 1);
177
+ };
178
+ }
179
+ function _e(e, t) {
180
+ e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
181
+ var r = e.state;
182
+ z(e, r, [], e._modules.root, !0), te(e, r, t);
183
+ }
184
+ function te(e, t, r) {
185
+ var n = e._state, a = e._scope;
186
+ e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
187
+ var o = e._wrappedGetters, l = {}, i = {}, c = Pe(!0);
188
+ c.run(function() {
189
+ N(o, function(f, m) {
190
+ l[m] = tt(f, e), i[m] = je(function() {
191
+ return l[m]();
192
+ }), Object.defineProperty(e.getters, m, {
193
+ get: function() {
194
+ return i[m].value;
195
+ },
196
+ enumerable: !0
197
+ // for local getters
198
+ });
199
+ });
200
+ }), e._state = Ee({
201
+ data: t
202
+ }), e._scope = c, e.strict && at(e), n && r && e._withCommit(function() {
203
+ n.data = null;
204
+ }), a && a.stop();
205
+ }
206
+ function z(e, t, r, n, a) {
207
+ var o = !r.length, l = e._modules.getNamespace(r);
208
+ if (n.namespaced && (e._modulesNamespaceMap[l] && process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate namespace " + l + " for the namespaced module " + r.join("/")), e._modulesNamespaceMap[l] = n), !o && !a) {
209
+ var i = re(t, r.slice(0, -1)), c = r[r.length - 1];
210
+ e._withCommit(function() {
211
+ process.env.NODE_ENV !== "production" && c in i && console.warn(
212
+ '[vuex] state field "' + c + '" was overridden by a module with the same name at "' + r.join(".") + '"'
213
+ ), i[c] = n.state;
214
+ });
215
+ }
216
+ var f = n.context = rt(e, l, r);
217
+ n.forEachMutation(function(m, b) {
218
+ var x = l + b;
219
+ st(e, x, m, f);
220
+ }), n.forEachAction(function(m, b) {
221
+ var x = m.root ? b : l + b, $ = m.handler || m;
222
+ nt(e, x, $, f);
223
+ }), n.forEachGetter(function(m, b) {
224
+ var x = l + b;
225
+ ot(e, x, m, f);
226
+ }), n.forEachChild(function(m, b) {
227
+ z(e, t, r.concat(b), m, a);
228
+ });
229
+ }
230
+ function rt(e, t, r) {
231
+ var n = t === "", a = {
232
+ dispatch: n ? e.dispatch : function(o, l, i) {
233
+ var c = H(o, l, i), f = c.payload, m = c.options, b = c.type;
234
+ if ((!m || !m.root) && (b = t + b, process.env.NODE_ENV !== "production" && !e._actions[b])) {
235
+ console.error("[vuex] unknown local action type: " + c.type + ", global type: " + b);
236
+ return;
237
+ }
238
+ return e.dispatch(b, f);
239
+ },
240
+ commit: n ? e.commit : function(o, l, i) {
241
+ var c = H(o, l, i), f = c.payload, m = c.options, b = c.type;
242
+ if ((!m || !m.root) && (b = t + b, process.env.NODE_ENV !== "production" && !e._mutations[b])) {
243
+ console.error("[vuex] unknown local mutation type: " + c.type + ", global type: " + b);
244
+ return;
245
+ }
246
+ e.commit(b, f, m);
247
+ }
248
+ };
249
+ return Object.defineProperties(a, {
250
+ getters: {
251
+ get: n ? function() {
252
+ return e.getters;
253
+ } : function() {
254
+ return pe(e, t);
255
+ }
256
+ },
257
+ state: {
258
+ get: function() {
259
+ return re(e.state, r);
260
+ }
261
+ }
262
+ }), a;
263
+ }
264
+ function pe(e, t) {
265
+ if (!e._makeLocalGettersCache[t]) {
266
+ var r = {}, n = t.length;
267
+ Object.keys(e.getters).forEach(function(a) {
268
+ if (a.slice(0, n) === t) {
269
+ var o = a.slice(n);
270
+ Object.defineProperty(r, o, {
271
+ get: function() {
272
+ return e.getters[a];
273
+ },
274
+ enumerable: !0
275
+ });
276
+ }
277
+ }), e._makeLocalGettersCache[t] = r;
278
+ }
279
+ return e._makeLocalGettersCache[t];
280
+ }
281
+ function st(e, t, r, n) {
282
+ var a = e._mutations[t] || (e._mutations[t] = []);
283
+ a.push(function(l) {
284
+ r.call(e, n.state, l);
285
+ });
286
+ }
287
+ function nt(e, t, r, n) {
288
+ var a = e._actions[t] || (e._actions[t] = []);
289
+ a.push(function(l) {
290
+ var i = r.call(e, {
291
+ dispatch: n.dispatch,
292
+ commit: n.commit,
293
+ getters: n.getters,
294
+ state: n.state,
295
+ rootGetters: e.getters,
296
+ rootState: e.state
297
+ }, l);
298
+ return et(i) || (i = Promise.resolve(i)), e._devtoolHook ? i.catch(function(c) {
299
+ throw e._devtoolHook.emit("vuex:error", c), c;
300
+ }) : i;
301
+ });
302
+ }
303
+ function ot(e, t, r, n) {
304
+ if (e._wrappedGetters[t]) {
305
+ process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate getter key: " + t);
306
+ return;
307
+ }
308
+ e._wrappedGetters[t] = function(o) {
309
+ return r(
310
+ n.state,
311
+ // local state
312
+ n.getters,
313
+ // local getters
314
+ o.state,
315
+ // root state
316
+ o.getters
317
+ // root getters
318
+ );
319
+ };
320
+ }
321
+ function at(e) {
322
+ Q(function() {
323
+ return e._state.data;
324
+ }, function() {
325
+ process.env.NODE_ENV !== "production" && P(e._committing, "do not mutate vuex store state outside mutation handlers.");
326
+ }, { deep: !0, flush: "sync" });
327
+ }
328
+ function re(e, t) {
329
+ return t.reduce(function(r, n) {
330
+ return r[n];
331
+ }, e);
332
+ }
333
+ function H(e, t, r) {
334
+ return ge(e) && e.type && (r = t, t = e, e = e.type), process.env.NODE_ENV !== "production" && P(typeof e == "string", "expects string as the type, but found " + typeof e + "."), { type: e, payload: t, options: r };
335
+ }
336
+ var it = "vuex bindings", oe = "vuex:mutations", K = "vuex:actions", L = "vuex", lt = 0;
337
+ function dt(e, t) {
338
+ Qe(
339
+ {
340
+ id: "org.vuejs.vuex",
341
+ app: e,
342
+ label: "Vuex",
343
+ homepage: "https://next.vuex.vuejs.org/",
344
+ logo: "https://vuejs.org/images/icons/favicon-96x96.png",
345
+ packageName: "vuex",
346
+ componentStateTypes: [it]
347
+ },
348
+ function(r) {
349
+ r.addTimelineLayer({
350
+ id: oe,
351
+ label: "Vuex Mutations",
352
+ color: ae
353
+ }), r.addTimelineLayer({
354
+ id: K,
355
+ label: "Vuex Actions",
356
+ color: ae
357
+ }), r.addInspector({
358
+ id: L,
359
+ label: "Vuex",
360
+ icon: "storage",
361
+ treeFilterPlaceholder: "Filter stores..."
362
+ }), r.on.getInspectorTree(function(n) {
363
+ if (n.app === e && n.inspectorId === L)
364
+ if (n.filter) {
365
+ var a = [];
366
+ xe(a, t._modules.root, n.filter, ""), n.rootNodes = a;
367
+ } else
368
+ n.rootNodes = [
369
+ ve(t._modules.root, "")
370
+ ];
371
+ }), r.on.getInspectorState(function(n) {
372
+ if (n.app === e && n.inspectorId === L) {
373
+ var a = n.nodeId;
374
+ pe(t, a), n.state = ft(
375
+ gt(t._modules, a),
376
+ a === "root" ? t.getters : t._makeLocalGettersCache,
377
+ a
378
+ );
379
+ }
380
+ }), r.on.editInspectorState(function(n) {
381
+ if (n.app === e && n.inspectorId === L) {
382
+ var a = n.nodeId, o = n.path;
383
+ a !== "root" && (o = a.split("/").filter(Boolean).concat(o)), t._withCommit(function() {
384
+ n.set(t._state.data, o, n.state.value);
385
+ });
386
+ }
387
+ }), t.subscribe(function(n, a) {
388
+ var o = {};
389
+ n.payload && (o.payload = n.payload), o.state = a, r.notifyComponentUpdate(), r.sendInspectorTree(L), r.sendInspectorState(L), r.addTimelineEvent({
390
+ layerId: oe,
391
+ event: {
392
+ time: Date.now(),
393
+ title: n.type,
394
+ data: o
395
+ }
396
+ });
397
+ }), t.subscribeAction({
398
+ before: function(n, a) {
399
+ var o = {};
400
+ n.payload && (o.payload = n.payload), n._id = lt++, n._time = Date.now(), o.state = a, r.addTimelineEvent({
401
+ layerId: K,
402
+ event: {
403
+ time: n._time,
404
+ title: n.type,
405
+ groupId: n._id,
406
+ subtitle: "start",
407
+ data: o
408
+ }
409
+ });
410
+ },
411
+ after: function(n, a) {
412
+ var o = {}, l = Date.now() - n._time;
413
+ o.duration = {
414
+ _custom: {
415
+ type: "duration",
416
+ display: l + "ms",
417
+ tooltip: "Action duration",
418
+ value: l
419
+ }
420
+ }, n.payload && (o.payload = n.payload), o.state = a, r.addTimelineEvent({
421
+ layerId: K,
422
+ event: {
423
+ time: Date.now(),
424
+ title: n.type,
425
+ groupId: n._id,
426
+ subtitle: "end",
427
+ data: o
428
+ }
429
+ });
430
+ }
431
+ });
432
+ }
433
+ );
434
+ }
435
+ var ae = 8702998, ut = 6710886, ct = 16777215, be = {
436
+ label: "namespaced",
437
+ textColor: ct,
438
+ backgroundColor: ut
439
+ };
440
+ function ye(e) {
441
+ return e && e !== "root" ? e.split("/").slice(-2, -1)[0] : "Root";
442
+ }
443
+ function ve(e, t) {
444
+ return {
445
+ id: t || "root",
446
+ // all modules end with a `/`, we want the last segment only
447
+ // cart/ -> cart
448
+ // nested/cart/ -> cart
449
+ label: ye(t),
450
+ tags: e.namespaced ? [be] : [],
451
+ children: Object.keys(e._children).map(
452
+ function(r) {
453
+ return ve(
454
+ e._children[r],
455
+ t + r + "/"
456
+ );
457
+ }
458
+ )
459
+ };
460
+ }
461
+ function xe(e, t, r, n) {
462
+ n.includes(r) && e.push({
463
+ id: n || "root",
464
+ label: n.endsWith("/") ? n.slice(0, n.length - 1) : n || "Root",
465
+ tags: t.namespaced ? [be] : []
466
+ }), Object.keys(t._children).forEach(function(a) {
467
+ xe(e, t._children[a], r, n + a + "/");
468
+ });
469
+ }
470
+ function ft(e, t, r) {
471
+ t = r === "root" ? t : t[r];
472
+ var n = Object.keys(t), a = {
473
+ state: Object.keys(e.state).map(function(l) {
474
+ return {
475
+ key: l,
476
+ editable: !0,
477
+ value: e.state[l]
478
+ };
479
+ })
480
+ };
481
+ if (n.length) {
482
+ var o = ht(t);
483
+ a.getters = Object.keys(o).map(function(l) {
484
+ return {
485
+ key: l.endsWith("/") ? ye(l) : l,
486
+ editable: !1,
487
+ value: J(function() {
488
+ return o[l];
489
+ })
490
+ };
491
+ });
492
+ }
493
+ return a;
494
+ }
495
+ function ht(e) {
496
+ var t = {};
497
+ return Object.keys(e).forEach(function(r) {
498
+ var n = r.split("/");
499
+ if (n.length > 1) {
500
+ var a = t, o = n.pop();
501
+ n.forEach(function(l) {
502
+ a[l] || (a[l] = {
503
+ _custom: {
504
+ value: {},
505
+ display: l,
506
+ tooltip: "Module",
507
+ abstract: !0
508
+ }
509
+ }), a = a[l]._custom.value;
510
+ }), a[o] = J(function() {
511
+ return e[r];
512
+ });
513
+ } else
514
+ t[r] = J(function() {
515
+ return e[r];
516
+ });
517
+ }), t;
518
+ }
519
+ function gt(e, t) {
520
+ var r = t.split("/").filter(function(n) {
521
+ return n;
522
+ });
523
+ return r.reduce(
524
+ function(n, a, o) {
525
+ var l = n[a];
526
+ if (!l)
527
+ throw new Error('Missing module "' + a + '" for path "' + t + '".');
528
+ return o === r.length - 1 ? l : l._children;
529
+ },
530
+ t === "root" ? e : e.root._children
531
+ );
532
+ }
533
+ function J(e) {
534
+ try {
535
+ return e();
536
+ } catch (t) {
537
+ return t;
538
+ }
539
+ }
540
+ var E = function(t, r) {
541
+ this.runtime = r, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = t;
542
+ var n = t.state;
543
+ this.state = (typeof n == "function" ? n() : n) || {};
544
+ }, we = { namespaced: { configurable: !0 } };
545
+ we.namespaced.get = function() {
546
+ return !!this._rawModule.namespaced;
547
+ };
548
+ E.prototype.addChild = function(t, r) {
549
+ this._children[t] = r;
550
+ };
551
+ E.prototype.removeChild = function(t) {
552
+ delete this._children[t];
553
+ };
554
+ E.prototype.getChild = function(t) {
555
+ return this._children[t];
556
+ };
557
+ E.prototype.hasChild = function(t) {
558
+ return t in this._children;
559
+ };
560
+ E.prototype.update = function(t) {
561
+ this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
562
+ };
563
+ E.prototype.forEachChild = function(t) {
564
+ N(this._children, t);
565
+ };
566
+ E.prototype.forEachGetter = function(t) {
567
+ this._rawModule.getters && N(this._rawModule.getters, t);
568
+ };
569
+ E.prototype.forEachAction = function(t) {
570
+ this._rawModule.actions && N(this._rawModule.actions, t);
571
+ };
572
+ E.prototype.forEachMutation = function(t) {
573
+ this._rawModule.mutations && N(this._rawModule.mutations, t);
574
+ };
575
+ Object.defineProperties(E.prototype, we);
576
+ var M = function(t) {
577
+ this.register([], t, !1);
578
+ };
579
+ M.prototype.get = function(t) {
580
+ return t.reduce(function(r, n) {
581
+ return r.getChild(n);
582
+ }, this.root);
583
+ };
584
+ M.prototype.getNamespace = function(t) {
585
+ var r = this.root;
586
+ return t.reduce(function(n, a) {
587
+ return r = r.getChild(a), n + (r.namespaced ? a + "/" : "");
588
+ }, "");
589
+ };
590
+ M.prototype.update = function(t) {
591
+ ke([], this.root, t);
592
+ };
593
+ M.prototype.register = function(t, r, n) {
594
+ var a = this;
595
+ n === void 0 && (n = !0), process.env.NODE_ENV !== "production" && $e(t, r);
596
+ var o = new E(r, n);
597
+ if (t.length === 0)
598
+ this.root = o;
599
+ else {
600
+ var l = this.get(t.slice(0, -1));
601
+ l.addChild(t[t.length - 1], o);
602
+ }
603
+ r.modules && N(r.modules, function(i, c) {
604
+ a.register(t.concat(c), i, n);
605
+ });
606
+ };
607
+ M.prototype.unregister = function(t) {
608
+ var r = this.get(t.slice(0, -1)), n = t[t.length - 1], a = r.getChild(n);
609
+ if (!a) {
610
+ process.env.NODE_ENV !== "production" && console.warn(
611
+ "[vuex] trying to unregister module '" + n + "', which is not registered"
612
+ );
613
+ return;
614
+ }
615
+ a.runtime && r.removeChild(n);
616
+ };
617
+ M.prototype.isRegistered = function(t) {
618
+ var r = this.get(t.slice(0, -1)), n = t[t.length - 1];
619
+ return r ? r.hasChild(n) : !1;
620
+ };
621
+ function ke(e, t, r) {
622
+ if (process.env.NODE_ENV !== "production" && $e(e, r), t.update(r), r.modules)
623
+ for (var n in r.modules) {
624
+ if (!t.getChild(n)) {
625
+ process.env.NODE_ENV !== "production" && console.warn(
626
+ "[vuex] trying to add a new module '" + n + "' on hot reloading, manual reload is needed"
627
+ );
628
+ return;
629
+ }
630
+ ke(
631
+ e.concat(n),
632
+ t.getChild(n),
633
+ r.modules[n]
634
+ );
635
+ }
636
+ }
637
+ var ie = {
638
+ assert: function(e) {
639
+ return typeof e == "function";
640
+ },
641
+ expected: "function"
642
+ }, mt = {
643
+ assert: function(e) {
644
+ return typeof e == "function" || typeof e == "object" && typeof e.handler == "function";
645
+ },
646
+ expected: 'function or object with "handler" function'
647
+ }, le = {
648
+ getters: ie,
649
+ mutations: ie,
650
+ actions: mt
651
+ };
652
+ function $e(e, t) {
653
+ Object.keys(le).forEach(function(r) {
654
+ if (t[r]) {
655
+ var n = le[r];
656
+ N(t[r], function(a, o) {
657
+ P(
658
+ n.assert(a),
659
+ _t(e, r, o, a, n.expected)
660
+ );
661
+ });
662
+ }
663
+ });
664
+ }
665
+ function _t(e, t, r, n, a) {
666
+ var o = t + " should be " + a + ' but "' + t + "." + r + '"';
667
+ return e.length > 0 && (o += ' in module "' + e.join(".") + '"'), o += " is " + JSON.stringify(n) + ".", o;
668
+ }
669
+ function pt(e) {
670
+ return new O(e);
671
+ }
672
+ var O = function e(t) {
673
+ var r = this;
674
+ t === void 0 && (t = {}), process.env.NODE_ENV !== "production" && (P(typeof Promise < "u", "vuex requires a Promise polyfill in this browser."), P(this instanceof e, "store must be called with the new operator."));
675
+ var n = t.plugins;
676
+ n === void 0 && (n = []);
677
+ var a = t.strict;
678
+ a === void 0 && (a = !1);
679
+ var o = t.devtools;
680
+ this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new M(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null), this._scope = null, this._devtools = o;
681
+ var l = this, i = this, c = i.dispatch, f = i.commit;
682
+ this.dispatch = function(x, $) {
683
+ return c.call(l, x, $);
684
+ }, this.commit = function(x, $, F) {
685
+ return f.call(l, x, $, F);
686
+ }, this.strict = a;
687
+ var m = this._modules.root.state;
688
+ z(this, m, [], this._modules.root), te(this, m), n.forEach(function(b) {
689
+ return b(r);
690
+ });
691
+ }, se = { state: { configurable: !0 } };
692
+ O.prototype.install = function(t, r) {
693
+ t.provide(r || fe, this), t.config.globalProperties.$store = this;
694
+ var n = this._devtools !== void 0 ? this._devtools : process.env.NODE_ENV !== "production" || !1;
695
+ n && dt(t, this);
696
+ };
697
+ se.state.get = function() {
698
+ return this._state.data;
699
+ };
700
+ se.state.set = function(e) {
701
+ process.env.NODE_ENV !== "production" && P(!1, "use store.replaceState() to explicit replace store state.");
702
+ };
703
+ O.prototype.commit = function(t, r, n) {
704
+ var a = this, o = H(t, r, n), l = o.type, i = o.payload, c = o.options, f = { type: l, payload: i }, m = this._mutations[l];
705
+ if (!m) {
706
+ process.env.NODE_ENV !== "production" && console.error("[vuex] unknown mutation type: " + l);
707
+ return;
708
+ }
709
+ this._withCommit(function() {
710
+ m.forEach(function(x) {
711
+ x(i);
712
+ });
713
+ }), this._subscribers.slice().forEach(function(b) {
714
+ return b(f, a.state);
715
+ }), process.env.NODE_ENV !== "production" && c && c.silent && console.warn(
716
+ "[vuex] mutation type: " + l + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
717
+ );
718
+ };
719
+ O.prototype.dispatch = function(t, r) {
720
+ var n = this, a = H(t, r), o = a.type, l = a.payload, i = { type: o, payload: l }, c = this._actions[o];
721
+ if (!c) {
722
+ process.env.NODE_ENV !== "production" && console.error("[vuex] unknown action type: " + o);
723
+ return;
724
+ }
725
+ try {
726
+ this._actionSubscribers.slice().filter(function(m) {
727
+ return m.before;
728
+ }).forEach(function(m) {
729
+ return m.before(i, n.state);
730
+ });
731
+ } catch (m) {
732
+ process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in before action subscribers: "), console.error(m));
733
+ }
734
+ var f = c.length > 1 ? Promise.all(c.map(function(m) {
735
+ return m(l);
736
+ })) : c[0](l);
737
+ return new Promise(function(m, b) {
738
+ f.then(function(x) {
739
+ try {
740
+ n._actionSubscribers.filter(function($) {
741
+ return $.after;
742
+ }).forEach(function($) {
743
+ return $.after(i, n.state);
744
+ });
745
+ } catch ($) {
746
+ process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in after action subscribers: "), console.error($));
747
+ }
748
+ m(x);
749
+ }, function(x) {
750
+ try {
751
+ n._actionSubscribers.filter(function($) {
752
+ return $.error;
753
+ }).forEach(function($) {
754
+ return $.error(i, n.state, x);
755
+ });
756
+ } catch ($) {
757
+ process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in error action subscribers: "), console.error($));
758
+ }
759
+ b(x);
760
+ });
761
+ });
762
+ };
763
+ O.prototype.subscribe = function(t, r) {
764
+ return me(t, this._subscribers, r);
765
+ };
766
+ O.prototype.subscribeAction = function(t, r) {
767
+ var n = typeof t == "function" ? { before: t } : t;
768
+ return me(n, this._actionSubscribers, r);
769
+ };
770
+ O.prototype.watch = function(t, r, n) {
771
+ var a = this;
772
+ return process.env.NODE_ENV !== "production" && P(typeof t == "function", "store.watch only accepts a function."), Q(function() {
773
+ return t(a.state, a.getters);
774
+ }, r, Object.assign({}, n));
775
+ };
776
+ O.prototype.replaceState = function(t) {
777
+ var r = this;
778
+ this._withCommit(function() {
779
+ r._state.data = t;
780
+ });
781
+ };
782
+ O.prototype.registerModule = function(t, r, n) {
783
+ n === void 0 && (n = {}), typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && (P(Array.isArray(t), "module path must be a string or an Array."), P(t.length > 0, "cannot register the root module by using registerModule.")), this._modules.register(t, r), z(this, this.state, t, this._modules.get(t), n.preserveState), te(this, this.state);
784
+ };
785
+ O.prototype.unregisterModule = function(t) {
786
+ var r = this;
787
+ typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && P(Array.isArray(t), "module path must be a string or an Array."), this._modules.unregister(t), this._withCommit(function() {
788
+ var n = re(r.state, t.slice(0, -1));
789
+ delete n[t[t.length - 1]];
790
+ }), _e(this);
791
+ };
792
+ O.prototype.hasModule = function(t) {
793
+ return typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && P(Array.isArray(t), "module path must be a string or an Array."), this._modules.isRegistered(t);
794
+ };
795
+ O.prototype.hotUpdate = function(t) {
796
+ this._modules.update(t), _e(this, !0);
797
+ };
798
+ O.prototype._withCommit = function(t) {
799
+ var r = this._committing;
800
+ this._committing = !0, t(), this._committing = r;
801
+ };
802
+ Object.defineProperties(O.prototype, se);
803
+ var bt = Ce(function(e, t) {
804
+ var r = {};
805
+ return process.env.NODE_ENV !== "production" && !ne(t) && console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"), Se(t).forEach(function(n) {
806
+ var a = n.key, o = n.val;
807
+ r[a] = function() {
808
+ var i = this.$store.state, c = this.$store.getters;
809
+ if (e) {
810
+ var f = Oe(this.$store, "mapState", e);
811
+ if (!f)
812
+ return;
813
+ i = f.context.state, c = f.context.getters;
814
+ }
815
+ return typeof o == "function" ? o.call(this, i, c) : i[o];
816
+ }, r[a].vuex = !0;
817
+ }), r;
818
+ }), yt = Ce(function(e, t) {
819
+ var r = {};
820
+ return process.env.NODE_ENV !== "production" && !ne(t) && console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"), Se(t).forEach(function(n) {
821
+ var a = n.key, o = n.val;
822
+ r[a] = function() {
823
+ for (var i = [], c = arguments.length; c--; )
824
+ i[c] = arguments[c];
825
+ var f = this.$store.commit;
826
+ if (e) {
827
+ var m = Oe(this.$store, "mapMutations", e);
828
+ if (!m)
829
+ return;
830
+ f = m.context.commit;
831
+ }
832
+ return typeof o == "function" ? o.apply(this, [f].concat(i)) : f.apply(this.$store, [o].concat(i));
833
+ };
834
+ }), r;
835
+ });
836
+ function Se(e) {
837
+ return ne(e) ? Array.isArray(e) ? e.map(function(t) {
838
+ return { key: t, val: t };
839
+ }) : Object.keys(e).map(function(t) {
840
+ return { key: t, val: e[t] };
841
+ }) : [];
842
+ }
843
+ function ne(e) {
844
+ return Array.isArray(e) || ge(e);
845
+ }
846
+ function Ce(e) {
847
+ return function(t, r) {
848
+ return typeof t != "string" ? (r = t, t = "") : t.charAt(t.length - 1) !== "/" && (t += "/"), e(t, r);
849
+ };
850
+ }
851
+ function Oe(e, t, r) {
852
+ var n = e._modulesNamespaceMap[r];
853
+ return process.env.NODE_ENV !== "production" && !n && console.error("[vuex] module namespace not found in " + t + "(): " + r), n;
854
+ }
855
+ const vt = {
856
+ components: {
857
+ DeleteConfirmationModal: ee
858
+ },
859
+ props: {
860
+ is_required: {
861
+ type: Boolean,
862
+ default: !1
863
+ },
864
+ error_message: {
865
+ type: String,
866
+ default: ""
867
+ },
868
+ description: {
869
+ type: String,
870
+ default: ""
871
+ },
872
+ show: {
873
+ type: Boolean,
874
+ default: !1
875
+ },
876
+ has_multiple_file: {
877
+ show: Boolean,
878
+ default: !1
879
+ },
880
+ field_name: {
881
+ type: String,
882
+ default: ""
883
+ },
884
+ label_name: {
885
+ type: String,
886
+ default: ""
887
+ },
888
+ route_url: {
889
+ type: String,
890
+ default: ""
891
+ },
892
+ model_value: {
893
+ type: Array,
894
+ default: []
895
+ },
896
+ file_config: {
897
+ type: Object,
898
+ default: {}
899
+ },
900
+ is_enable_delete: {
901
+ type: Boolean,
902
+ default: !0
903
+ }
904
+ },
905
+ emits: ["uploaded"],
906
+ data() {
907
+ return {
908
+ media_id: "",
909
+ error_message_data: "",
910
+ open_delete_modal: !1,
911
+ files: [],
912
+ uploadFileList: [],
913
+ isDragging: !1
914
+ };
915
+ },
916
+ methods: {
917
+ closeDeleteModal() {
918
+ this.open_delete_modal = !1;
919
+ },
920
+ deleteAction() {
921
+ axios.delete(this.route_url + "/destroyMedia/" + this.media_id).then((e) => {
922
+ let t = this.uploadFileList.findIndex((r) => r.id === this.media_id);
923
+ t !== -1 && this.uploadFileList.splice(t, 1), this.closeDeleteModal(), this.$store.commit("notification/SHOW_NOTIFICATION", {
924
+ message: "Item deleted successfully.",
925
+ type: "success",
926
+ duration: 5e3
927
+ });
928
+ }).catch((e) => {
929
+ console.error(e), this.is_loading = !1;
930
+ });
931
+ },
932
+ getFileName(e) {
933
+ return e.length > 12 ? e.substring(0, 13) + "... ." + e.split(".")[1] : e;
934
+ },
935
+ formatFileSize(e) {
936
+ if (e === 0)
937
+ return "0 Bytes";
938
+ const t = 1024, r = ["Bytes", "KB", "MB", "GB", "TB"], n = Math.floor(Math.log(e) / Math.log(t));
939
+ return parseFloat((e / Math.pow(t, n)).toFixed(2)) + " " + r[n];
940
+ },
941
+ onDragOver(e) {
942
+ e.preventDefault(), this.isDragging = !0, e.dataTransfer.dropEffect = "copy";
943
+ },
944
+ onDragLeave(e) {
945
+ e.preventDefault(), this.isDragging = !1;
946
+ },
947
+ onDrop(e) {
948
+ e.preventDefault(), this.isDragging = !1;
949
+ const t = e.dataTransfer.files;
950
+ Array.from(t).forEach((r) => {
951
+ this.uploadFile(r);
952
+ });
953
+ },
954
+ async uploadFiles(e) {
955
+ const t = e.target.files, r = Array.from(t).map((n) => this.uploadFile(n));
956
+ await Promise.all(r), this.$emit("uploaded");
957
+ },
958
+ getFirstError(e, t) {
959
+ return e.hasOwnProperty(t) ? e[t][0] : "";
960
+ },
961
+ async uploadFile(e) {
962
+ return new Promise((t, r) => {
963
+ e || t();
964
+ const n = new FormData();
965
+ n.append("file", e), Object.entries(this.file_config).forEach(([a, o]) => {
966
+ n.append(a, o);
967
+ }), this.files.push({ file_name: e.name, loading: 0 }), axios.post(this.route_url + "/media", n, {
968
+ onUploadProgress: (a) => {
969
+ this.files[this.files.length - 1].loading = Math.floor(
970
+ a.loaded / a.total * 100
971
+ );
972
+ }
973
+ }).then((a) => {
974
+ let o = this.files.findIndex(
975
+ (l) => l.file_name === e.name
976
+ );
977
+ o !== -1 && this.files.splice(o, 1), this.uploadFileList.push({
978
+ file_name: a.data.file_name,
979
+ size: a.data.size,
980
+ id: a.data.id,
981
+ url: a.data.url
982
+ }), this.error_message_data = "", t();
983
+ }).catch((a) => {
984
+ a.response.status === 422 ? this.error_message_data = this.getFirstError(
985
+ a.response.data.errors,
986
+ "file"
987
+ ) : console.error("An error occurred:", a);
988
+ let o = this.files.findIndex(
989
+ (l) => l.file_name === e.name
990
+ );
991
+ o !== -1 && this.files.splice(o, 1), console.log(a), t();
992
+ });
993
+ });
994
+ }
995
+ },
996
+ computed: {
997
+ uploadedFileIds() {
998
+ var e;
999
+ return this.has_multiple_file ? this.uploadFileList.map((t) => t.id) : ((e = this.uploadFileList[0]) == null ? void 0 : e.id) || null;
1000
+ }
1001
+ },
1002
+ mounted() {
1003
+ console.log(this.model_value), this.model_value ? Array.isArray(this.model_value) ? this.uploadFileList = this.model_value : this.uploadFileList = [this.model_value] : this.uploadFileList = [], this.error_message_data = this.error_message;
1004
+ }
1005
+ }, xt = { class: "flex flex-col items-center justify-center pt-5 pb-6" }, wt = ["multiple"], kt = ["name"], $t = /* @__PURE__ */ s("svg", {
1006
+ class: "w-8 h-8 mb-4 text-gray-500 dark:text-gray-400",
1007
+ "aria-hidden": "true",
1008
+ xmlns: "http://www.w3.org/2000/svg",
1009
+ fill: "none",
1010
+ viewBox: "0 0 20 16"
1011
+ }, [
1012
+ /* @__PURE__ */ s("path", {
1013
+ stroke: "currentColor",
1014
+ "stroke-linecap": "round",
1015
+ "stroke-linejoin": "round",
1016
+ "stroke-width": "2",
1017
+ d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
1018
+ })
1019
+ ], -1), St = /* @__PURE__ */ s("p", { class: "text-sm text-gray-500 dark:text-gray-400" }, " Drag & drop files or browse ", -1), Ct = [
1020
+ $t,
1021
+ St
1022
+ ], Ot = { key: 1 }, Dt = /* @__PURE__ */ s("p", { class: "text-sm text-gray-500 dark:text-gray-400" }, "Drop files here", -1), Pt = [
1023
+ Dt
1024
+ ], Et = { class: "mt-2 gl-span-form-error" }, jt = { class: "block mt-2 mb-3 text-sm font-normal leading-5 text-gray-500" }, It = {
1025
+ key: 0,
1026
+ class: ""
1027
+ }, At = { class: "flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white" }, Tt = /* @__PURE__ */ s("i", { class: "text-3xl fas fa-file-alt" }, null, -1), Nt = { class: "w-full ml-3" }, Mt = { class: "flex items-center justify-between mb-1" }, Vt = { class: "text-xs text-black dark:text-white" }, Lt = { class: "text-xs text-black dark:text-white" }, Bt = { class: "w-full h-1 mb-1 bg-white rounded-full dark:bg-gray-800" }, Gt = { class: "overflow-x-scroll max-h-56" }, Ft = { class: "flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white" }, Rt = { class: "flex items-center" }, Ut = /* @__PURE__ */ s("i", {
1028
+ class: "text-3xl fas fa-file-alt",
1029
+ "aria-hidden": "true"
1030
+ }, null, -1), qt = { class: "flex flex-col ml-3" }, Ht = { class: "text-xs" }, zt = { class: "text-xs" }, Zt = { class: "flex gap-2" }, Kt = ["href"], Wt = ["onClick"];
1031
+ function Xt(e, t, r, n, a, o) {
1032
+ const l = U("DeleteConfirmationModal");
1033
+ return d(), u(y, null, [
1034
+ B(l, {
1035
+ isOpen: a.open_delete_modal,
1036
+ onConfirmDelete: o.deleteAction,
1037
+ onCancelDelete: o.closeDeleteModal
1038
+ }, null, 8, ["isOpen", "onConfirmDelete", "onCancelDelete"]),
1039
+ s("div", {
1040
+ class: p([{
1041
+ "border-red-500 dark:border-red-500": a.error_message_data !== "",
1042
+ "border-gray-200 dark:border-gray-700": a.error_message_data == ""
1043
+ }, "w-full p-4 bg-white border rounded-lg shadow dark:bg-gray-800"])
1044
+ }, [
1045
+ s("label", {
1046
+ class: p({
1047
+ "gl-label-form": a.error_message_data == "",
1048
+ "gl-label-form-invalid": a.error_message_data !== "",
1049
+ required: r.is_required
1050
+ })
1051
+ }, h(r.label_name), 3),
1052
+ s("div", {
1053
+ onDragover: t[3] || (t[3] = I((...i) => o.onDragOver && o.onDragOver(...i), ["prevent"])),
1054
+ onDragleave: t[4] || (t[4] = I((...i) => o.onDragLeave && o.onDragLeave(...i), ["prevent"])),
1055
+ onDrop: t[5] || (t[5] = I((...i) => o.onDrop && o.onDrop(...i), ["prevent"])),
1056
+ class: "flex flex-col items-center justify-center w-full h-40 mt-3 mb-3 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"
1057
+ }, [
1058
+ s("div", xt, [
1059
+ s("input", {
1060
+ type: "file",
1061
+ ref: "file_input" + r.field_name,
1062
+ hidden: "",
1063
+ multiple: r.has_multiple_file,
1064
+ onChange: t[0] || (t[0] = (...i) => o.uploadFiles && o.uploadFiles(...i))
1065
+ }, null, 40, wt),
1066
+ S(s("input", {
1067
+ type: "hidden",
1068
+ name: r.field_name,
1069
+ "onUpdate:modelValue": t[1] || (t[1] = (i) => o.uploadedFileIds = i)
1070
+ }, null, 8, kt), [
1071
+ [A, o.uploadedFileIds]
1072
+ ]),
1073
+ a.isDragging ? (d(), u("div", Ot, Pt)) : (d(), u("div", {
1074
+ key: 0,
1075
+ class: "flex flex-col items-center justify-center",
1076
+ onClick: t[2] || (t[2] = (i) => e.$refs["file_input" + this.field_name].click())
1077
+ }, Ct))
1078
+ ])
1079
+ ], 32),
1080
+ s("span", Et, h(a.error_message_data), 1),
1081
+ s("small", jt, h(r.description), 1),
1082
+ a.files.length > 0 ? (d(), u("section", It, [
1083
+ (d(!0), u(y, null, w(a.files, (i, c) => (d(), u("li", At, [
1084
+ Tt,
1085
+ s("div", Nt, [
1086
+ s("div", Mt, [
1087
+ s("span", Vt, h(o.getFileName(i.file_name)), 1),
1088
+ s("span", Lt, h(i.loading), 1)
1089
+ ]),
1090
+ s("div", Bt, [
1091
+ s("div", {
1092
+ class: "h-full bg-gray-500 rounded-full dark:bg-gray-400",
1093
+ style: Ie({ width: i.loading + "%" })
1094
+ }, null, 4)
1095
+ ])
1096
+ ])
1097
+ ]))), 256))
1098
+ ])) : g("", !0),
1099
+ s("section", Gt, [
1100
+ (d(!0), u(y, null, w(a.uploadFileList, (i, c) => (d(), u("li", Ft, [
1101
+ s("div", Rt, [
1102
+ Ut,
1103
+ s("div", qt, [
1104
+ s("span", Ht, h(o.getFileName(i.file_name)), 1),
1105
+ s("span", zt, h(o.formatFileSize(i.size)), 1)
1106
+ ])
1107
+ ]),
1108
+ s("div", Zt, [
1109
+ s("a", {
1110
+ href: i.url,
1111
+ target: "_blank",
1112
+ class: "text-lg text-blue-600 cursor-pointer dark:text-blue-400 fas fa-download"
1113
+ }, null, 8, Kt),
1114
+ r.is_enable_delete ? (d(), u("i", {
1115
+ key: 0,
1116
+ onClick: (f) => {
1117
+ a.media_id = i.id, a.open_delete_modal = !0;
1118
+ },
1119
+ class: "text-lg text-red-600 cursor-pointer dark:text-red-400 fas fa-x"
1120
+ }, null, 8, Wt)) : g("", !0)
1121
+ ])
1122
+ ]))), 256))
1123
+ ])
1124
+ ], 2)
1125
+ ], 64);
1126
+ }
1127
+ const yl = /* @__PURE__ */ k(vt, [["render", Xt]]), Yt = {
1128
+ computed: {
1129
+ ...bt("notification", ["notification"]),
1130
+ alertClasses() {
1131
+ switch (this.notification.type) {
1132
+ case "info":
1133
+ return "text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400";
1134
+ case "error":
1135
+ return "text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400";
1136
+ case "success":
1137
+ return "text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400";
1138
+ case "warning":
1139
+ return "text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300";
1140
+ case "dark":
1141
+ return "text-gray-800 bg-gray-50 dark:bg-gray-800 dark:text-gray-300";
1142
+ default:
1143
+ return "";
1144
+ }
1145
+ },
1146
+ buttonClasses() {
1147
+ switch (this.notification.type) {
1148
+ case "info":
1149
+ return "bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-gray-700";
1150
+ case "error":
1151
+ return "bg-red-50 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-gray-700";
1152
+ case "success":
1153
+ return "bg-green-50 text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-gray-700";
1154
+ case "warning":
1155
+ return "bg-yellow-50 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-gray-700";
1156
+ case "dark":
1157
+ return "bg-gray-50 text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700";
1158
+ default:
1159
+ return "";
1160
+ }
1161
+ }
1162
+ },
1163
+ methods: {
1164
+ ...yt("notification", ["HIDE_NOTIFICATION"]),
1165
+ dismiss() {
1166
+ this.HIDE_NOTIFICATION();
1167
+ }
1168
+ },
1169
+ watch: {
1170
+ "notification.show": function(e) {
1171
+ e && setTimeout(() => {
1172
+ this.dismiss();
1173
+ }, this.notification.duration);
1174
+ }
1175
+ }
1176
+ }, Jt = /* @__PURE__ */ s("svg", {
1177
+ class: "flex-shrink-0 w-4 h-4",
1178
+ "aria-hidden": "true",
1179
+ xmlns: "http://www.w3.org/2000/svg",
1180
+ fill: "currentColor",
1181
+ viewBox: "0 0 20 20"
1182
+ }, [
1183
+ /* @__PURE__ */ s("path", { d: "M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z" })
1184
+ ], -1), Qt = /* @__PURE__ */ s("span", { class: "sr-only" }, "Info", -1), er = { class: "mr-3 text-sm font-medium ms-3" }, tr = /* @__PURE__ */ s("span", { class: "sr-only" }, "Close", -1), rr = /* @__PURE__ */ s("svg", {
1185
+ class: "w-3 h-3",
1186
+ "aria-hidden": "true",
1187
+ xmlns: "http://www.w3.org/2000/svg",
1188
+ fill: "none",
1189
+ viewBox: "0 0 14 14"
1190
+ }, [
1191
+ /* @__PURE__ */ s("path", {
1192
+ stroke: "currentColor",
1193
+ "stroke-linecap": "round",
1194
+ "stroke-linejoin": "round",
1195
+ "stroke-width": "2",
1196
+ d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
1197
+ })
1198
+ ], -1), sr = [
1199
+ tr,
1200
+ rr
1201
+ ];
1202
+ function nr(e, t, r, n, a, o) {
1203
+ return e.notification.show ? (d(), u("div", {
1204
+ key: 0,
1205
+ class: p(["fixed right-0 z-50 flex items-center p-4 m-5 mb-4 rounded-lg shadow-lg", o.alertClasses]),
1206
+ role: "alert"
1207
+ }, [
1208
+ Jt,
1209
+ Qt,
1210
+ s("div", er, h(e.notification.message), 1),
1211
+ s("button", {
1212
+ type: "button",
1213
+ onClick: t[0] || (t[0] = (...l) => o.dismiss && o.dismiss(...l)),
1214
+ class: p(["inline-flex items-center justify-center w-6 h-6 p-1 -mx-1 -my-1 rounded-lg ms-auto focus:ring-2 hover:bg-opacity-50", o.buttonClasses]),
1215
+ "aria-label": "Close"
1216
+ }, sr, 2)
1217
+ ], 2)) : g("", !0);
1218
+ }
1219
+ const vl = /* @__PURE__ */ k(Yt, [["render", nr]]), or = {
1220
+ components: {},
1221
+ props: {
1222
+ field_name: {
1223
+ type: String,
1224
+ default: ""
1225
+ },
1226
+ trans_selector_name: {
1227
+ type: String,
1228
+ default: "i18n_selector"
1229
+ }
1230
+ },
1231
+ data() {
1232
+ return {
1233
+ locals: [],
1234
+ default_language: ""
1235
+ };
1236
+ },
1237
+ methods: {
1238
+ getLocals() {
1239
+ const e = {
1240
+ id: this.menu_id
1241
+ };
1242
+ axios.get("/admin/get_locals", { params: e }).then((t) => {
1243
+ this.locals = t.data.locals, this.default_language = t.data.default_language, console.log("default_language", this.default_language);
1244
+ }).catch((t) => {
1245
+ console.error(t);
1246
+ });
1247
+ }
1248
+ },
1249
+ created() {
1250
+ this.getLocals();
1251
+ },
1252
+ mounted() {
1253
+ }
1254
+ }, ar = { class: "grid w-full gap-1 mt-5 mb-5 md:gap-0 md:grid-cols-10 language-selector" }, ir = ["name", "value", "id", "checked"], lr = ["for"];
1255
+ function dr(e, t, r, n, a, o) {
1256
+ return d(), u("ul", ar, [
1257
+ (d(!0), u(y, null, w(a.locals, (l, i) => (d(), u("li", null, [
1258
+ s("input", {
1259
+ type: "radio",
1260
+ name: r.trans_selector_name,
1261
+ value: l,
1262
+ class: "hidden peer",
1263
+ id: l + "_" + r.field_name,
1264
+ autocomplete: "off",
1265
+ checked: l === a.default_language
1266
+ }, null, 8, ir),
1267
+ s("label", {
1268
+ for: l + "_" + r.field_name,
1269
+ class: p([{
1270
+ "border md:!rounded-s-lg": i === 0,
1271
+ "border md:!rounded-e-lg": i === a.locals.length - 1,
1272
+ "border-t border-b": i !== 0 && i !== a.locals.length - 1
1273
+ }, "w-full p-1 font-bold text-center text-gray-500 uppercase bg-white border-gray-200 rounded-lg cursor-pointer md:rounded-none dark:hover:text-gray-300 dark:border-gray-700 dark:peer-checked:text-blue-500 peer-checked:border-blue-600 peer-checked:text-blue-600 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700"])
1274
+ }, h(l), 11, lr)
1275
+ ]))), 256))
1276
+ ]);
1277
+ }
1278
+ const xl = /* @__PURE__ */ k(or, [["render", dr]]), ur = {
1279
+ name: "Card"
1280
+ }, cr = { class: "flex flex-col gap-9" }, fr = { class: "bg-white border rounded-lg border-stroke shadow-default dark:border-strokedark dark:bg-boxdark" }, hr = { class: "px-3 py-4 border-b border-stroke dark:border-strokedark" }, gr = { class: "font-semibold text-black dark:text-white" }, mr = {
1281
+ key: 0,
1282
+ class: "p-6"
1283
+ };
1284
+ function _r(e, t, r, n, a, o) {
1285
+ return d(), u("div", cr, [
1286
+ s("div", fr, [
1287
+ s("div", hr, [
1288
+ s("h3", gr, [
1289
+ j(e.$slots, "header")
1290
+ ])
1291
+ ]),
1292
+ e.$slots.body ? (d(), u("div", mr, [
1293
+ j(e.$slots, "body")
1294
+ ])) : g("", !0)
1295
+ ])
1296
+ ]);
1297
+ }
1298
+ const wl = /* @__PURE__ */ k(ur, [["render", _r]]), pr = {
1299
+ name: "MultiSelectDropdown",
1300
+ template: "MultiSelectDropdown",
1301
+ props: {
1302
+ modelValue: {
1303
+ type: [String, Number],
1304
+ default: ""
1305
+ },
1306
+ default_value: {
1307
+ type: Array,
1308
+ default: []
1309
+ },
1310
+ field_name: {
1311
+ type: String,
1312
+ default: ""
1313
+ },
1314
+ is_required: {
1315
+ type: Boolean,
1316
+ default: !1
1317
+ },
1318
+ has_cancel: {
1319
+ type: Boolean,
1320
+ default: !0
1321
+ },
1322
+ label_name: {
1323
+ type: String,
1324
+ default: ""
1325
+ },
1326
+ options: {
1327
+ type: Array,
1328
+ required: !0,
1329
+ default: [],
1330
+ note: "Options of dropdown. An array of options with id and name"
1331
+ },
1332
+ placeholder: {
1333
+ type: String,
1334
+ required: !1,
1335
+ default: "Please select an option",
1336
+ note: "Placeholder of dropdown"
1337
+ },
1338
+ maxItem: {
1339
+ type: Number,
1340
+ required: !1,
1341
+ default: 100,
1342
+ note: "Max items showing"
1343
+ },
1344
+ show: {
1345
+ type: Boolean,
1346
+ default: !1
1347
+ },
1348
+ error_message: {
1349
+ type: String,
1350
+ default: ""
1351
+ }
1352
+ },
1353
+ data() {
1354
+ return {
1355
+ selected: [],
1356
+ count: 0,
1357
+ optionsShown: !1,
1358
+ // options_values: [],
1359
+ searchFilter: "",
1360
+ selectedIds: []
1361
+ };
1362
+ },
1363
+ created() {
1364
+ this.$emit("selected", this.selected);
1365
+ },
1366
+ mounted() {
1367
+ self = this;
1368
+ var e = this.convertedOptionsDefault();
1369
+ this.selected = this.options_values.filter(
1370
+ (t) => e.includes(t.id + "")
1371
+ ), this.show || (document.body.addEventListener("click", function(t) {
1372
+ self.clearData(t);
1373
+ }), document.getElementById(this.field_name + "search").addEventListener("keydown", function(t) {
1374
+ if (_.includes([37, 38, 39, 40, 13], t.keyCode)) {
1375
+ if ((t.keyCode === 38 || t.keyCode === 40) && t.preventDefault(), t.keyCode === 40 && self.posts == "")
1376
+ return;
1377
+ self.selectItem(t.keyCode);
1378
+ }
1379
+ }), document.addEventListener("keypress", function(t) {
1380
+ t.key === "Enter" && t.target.form && t.preventDefault();
1381
+ }));
1382
+ },
1383
+ computed: {
1384
+ options_values() {
1385
+ return this.convertedOptions();
1386
+ },
1387
+ filteredOptions() {
1388
+ const e = [], t = new RegExp(this.searchFilter, "ig");
1389
+ for (const r of this.options_values) {
1390
+ const n = String(r.name);
1391
+ (this.searchFilter.length < 1 || n.match(t)) && e.length < this.maxItem && e.push(r);
1392
+ }
1393
+ return e;
1394
+ }
1395
+ },
1396
+ emits: ["update:modelValue", "selected"],
1397
+ methods: {
1398
+ selectAll() {
1399
+ this.selected = this.convertedOptions();
1400
+ },
1401
+ deselectAll() {
1402
+ this.selected = [];
1403
+ },
1404
+ isOptionSelected(e) {
1405
+ return this.selected.findIndex((t) => t.id === e) !== -1;
1406
+ },
1407
+ clearData: function(e) {
1408
+ e.target.id != this.field_name + "search" && e.target.id != this.field_name && !e.target.classList.contains("showOptions") && (this.exit(), this.count = 0);
1409
+ },
1410
+ selectItem: function(e) {
1411
+ e == 40 && this.count < this.filteredOptions.length && (this.count++, document.getElementById(this.count).scrollIntoView()), e == 38 && this.count > 1 && (this.count--, document.getElementById(this.count).scrollIntoView()), e == 13 && document.getElementById(this.count).click();
1412
+ },
1413
+ convertedOptions() {
1414
+ return this.options.map((e, t) => typeof e == "object" ? e : { id: e, name: e });
1415
+ },
1416
+ convertedOptionsDefault() {
1417
+ return this.default_value.map((e, t) => typeof e == "object" ? e.id + "" : e + "");
1418
+ },
1419
+ clearOption(e) {
1420
+ let t = this.selected.findIndex((r) => r.id === e.id);
1421
+ t !== -1 && this.selected.splice(t, 1), this.selectedIds = this.selected.map((r) => r.id), this.$emit("update:modelValue", this.selectedIds), this.$emit("selected", this.selectedIds);
1422
+ },
1423
+ selectOption(e) {
1424
+ let t = this.selected.findIndex((r) => r.id === e.id);
1425
+ t !== -1 ? this.selected.splice(t, 1) : this.selected.push(e), this.selectedIds = this.selected.map((r) => r.id), this.$emit("update:modelValue", this.selectedIds), this.$emit("selected", this.selectedIds);
1426
+ },
1427
+ showOptions() {
1428
+ this.show || (this.searchFilter = "", this.optionsShown = !0, this.$nextTick(() => {
1429
+ this.$refs[this.field_name + "search"].focus();
1430
+ }));
1431
+ },
1432
+ ClearInput() {
1433
+ this.show || (this.selected = [], this.searchFilter = "", this.showOptions());
1434
+ },
1435
+ exit() {
1436
+ this.selected || (this.selected = [], this.searchFilter = ""), this.optionsShown = !1;
1437
+ },
1438
+ // Selecting when pressing Enter
1439
+ keyMonitor: function(e) {
1440
+ if (_.includes([37, 38, 39, 40, 13], e.keyCode)) {
1441
+ if ((e.keyCode === 38 || e.keyCode === 40) && e.preventDefault(), e.keyCode === 40 && self.posts == "")
1442
+ return;
1443
+ this.selectItem(e.keyCode);
1444
+ }
1445
+ }
1446
+ },
1447
+ watch: {
1448
+ searchFilter() {
1449
+ this.filteredOptions.length;
1450
+ },
1451
+ selected(e) {
1452
+ this.selectedIds = e.map((t) => t.id), this.$emit("update:modelValue", this.selectedIds), this.$emit("selected", this.selectedIds);
1453
+ }
1454
+ }
1455
+ }, br = { class: "font-bold ptext-lg dark:text-white" }, yr = { class: "mt-3 mb-4" }, vr = { class: "bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300" }, xr = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), wr = ["name", "value"], kr = {
1456
+ key: 0,
1457
+ class: "dropdown"
1458
+ }, $r = {
1459
+ class: "inline-flex ml-2 rounded-md shadow-sm",
1460
+ role: "group"
1461
+ }, Sr = { class: "border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, Cr = { class: "relative" }, Or = ["onClick"], Dr = { class: "text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999] showOptions" }, Pr = { class: "p-1" }, Er = /* @__PURE__ */ s("label", {
1462
+ for: "default-search",
1463
+ class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
1464
+ }, "Search", -1), jr = { class: "relative" }, Ir = /* @__PURE__ */ s("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, [
1465
+ /* @__PURE__ */ s("svg", {
1466
+ class: "w-4 h-4 text-gray-500 dark:text-gray-400",
1467
+ "aria-hidden": "true",
1468
+ xmlns: "http://www.w3.org/2000/svg",
1469
+ fill: "none",
1470
+ viewBox: "0 0 20 20"
1471
+ }, [
1472
+ /* @__PURE__ */ s("path", {
1473
+ stroke: "currentColor",
1474
+ "stroke-linecap": "round",
1475
+ "stroke-linejoin": "round",
1476
+ "stroke-width": "2",
1477
+ d: "m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
1478
+ })
1479
+ ])
1480
+ ], -1), Ar = ["id"], Tr = { class: "overflow-y-auto max-h-64" }, Nr = ["onClick", "onMousedown", "id"];
1481
+ function Mr(e, t, r, n, a, o) {
1482
+ return d(), u(y, null, [
1483
+ r.show ? (d(), u("div", {
1484
+ key: 0,
1485
+ class: p(r.field_name)
1486
+ }, [
1487
+ s("h3", br, h(r.label_name), 1),
1488
+ s("p", yr, [
1489
+ (d(!0), u(y, null, w(a.selected, (l, i) => (d(), u("span", vr, h(l.name), 1))), 256))
1490
+ ]),
1491
+ xr
1492
+ ], 2)) : g("", !0),
1493
+ r.show ? g("", !0) : (d(), u("div", {
1494
+ key: 1,
1495
+ class: p(["mb-4", r.field_name])
1496
+ }, [
1497
+ (d(!0), u(y, null, w(a.selectedIds, (l, i) => (d(), u("input", {
1498
+ type: "hidden",
1499
+ name: r.field_name + "[]",
1500
+ key: i,
1501
+ value: l
1502
+ }, null, 8, wr))), 128)),
1503
+ r.options ? (d(), u("div", kr, [
1504
+ s("label", {
1505
+ class: p({
1506
+ "gl-label-form": r.error_message == "",
1507
+ "gl-label-form-invalid": r.error_message !== "",
1508
+ required: r.is_required
1509
+ })
1510
+ }, h(r.label_name), 3),
1511
+ s("div", $r, [
1512
+ s("button", {
1513
+ onClick: t[0] || (t[0] = (...l) => o.selectAll && o.selectAll(...l)),
1514
+ type: "button",
1515
+ class: "px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 rounded-s-md hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"
1516
+ }, " Select all "),
1517
+ s("button", {
1518
+ onClick: t[1] || (t[1] = (...l) => o.deselectAll && o.deselectAll(...l)),
1519
+ type: "button",
1520
+ class: "px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 rounded-e-md hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"
1521
+ }, " Deselect all ")
1522
+ ]),
1523
+ s("div", Sr, [
1524
+ s("div", Cr, [
1525
+ s("div", {
1526
+ class: "flex flex-wrap gap-2 pl-8 pr-2 gl-multi-dropdown showOptions",
1527
+ onClick: t[2] || (t[2] = (l) => o.showOptions())
1528
+ }, [
1529
+ (d(!0), u(y, null, w(a.selected, (l, i) => (d(), u("span", {
1530
+ key: i,
1531
+ class: "px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded pointer-events-none dark:bg-blue-900 dark:text-blue-300"
1532
+ }, [
1533
+ v(h(l.name) + " ", 1),
1534
+ s("i", {
1535
+ onClick: I((c) => o.clearOption(l), ["stop"]),
1536
+ class: "cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400 fas fa-times"
1537
+ }, null, 8, Or)
1538
+ ]))), 128))
1539
+ ]),
1540
+ s("i", {
1541
+ class: p([a.optionsShown ? "fa-angle-up" : "fa-angle-down", "absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700"]),
1542
+ style: { top: "11px" }
1543
+ }, null, 2)
1544
+ ]),
1545
+ S(s("div", Dr, [
1546
+ s("div", Pr, [
1547
+ Er,
1548
+ s("div", jr, [
1549
+ Ir,
1550
+ S(s("input", {
1551
+ type: "search",
1552
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => a.searchFilter = l),
1553
+ id: r.field_name + "search",
1554
+ ref: r.field_name + "search",
1555
+ onBlur: t[4] || (t[4] = (l) => o.exit()),
1556
+ autocomplete: "off",
1557
+ class: "block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
1558
+ placeholder: "Search ..."
1559
+ }, null, 40, Ar), [
1560
+ [A, a.searchFilter]
1561
+ ])
1562
+ ])
1563
+ ]),
1564
+ s("div", Tr, [
1565
+ (d(!0), u(y, null, w(o.filteredOptions, (l, i) => (d(), u("div", {
1566
+ class: p([
1567
+ "block px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
1568
+ i + 1 == a.count || o.isOptionSelected(l.id) ? "bg-gray-100 dark:bg-gray-600" : ""
1569
+ ]),
1570
+ onClick: (c) => o.selectOption(l),
1571
+ onMousedown: (c) => o.selectOption(l),
1572
+ key: i,
1573
+ id: i + 1
1574
+ }, h(l.name || l.id || "-"), 43, Nr))), 128))
1575
+ ])
1576
+ ], 512), [
1577
+ [T, a.optionsShown]
1578
+ ])
1579
+ ])
1580
+ ])) : g("", !0)
1581
+ ], 2))
1582
+ ], 64);
1583
+ }
1584
+ const kl = /* @__PURE__ */ k(pr, [["render", Mr]]), Vr = {
1585
+ props: {
1586
+ button_type: {
1587
+ type: String,
1588
+ default: "default"
1589
+ },
1590
+ is_submit: {
1591
+ type: Boolean,
1592
+ default: !1
1593
+ },
1594
+ icon: {
1595
+ type: String,
1596
+ default: ""
1597
+ },
1598
+ is_loading: {
1599
+ type: Boolean,
1600
+ default: !1
1601
+ },
1602
+ tag: {
1603
+ type: String,
1604
+ default: "button"
1605
+ },
1606
+ href: {
1607
+ type: String,
1608
+ default: ""
1609
+ }
1610
+ },
1611
+ computed: {
1612
+ buttonTypeClass() {
1613
+ switch (this.button_type) {
1614
+ case "default":
1615
+ return "text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
1616
+ case "alternative":
1617
+ return " text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700";
1618
+ case "dark":
1619
+ return "text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700";
1620
+ case "light":
1621
+ return "text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700";
1622
+ case "green":
1623
+ return " text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";
1624
+ case "red":
1625
+ return " text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900";
1626
+ case "yellow":
1627
+ return " text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900";
1628
+ case "purple":
1629
+ return " text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-900";
1630
+ default:
1631
+ return "";
1632
+ }
1633
+ }
1634
+ },
1635
+ methods: {}
1636
+ }, Lr = /* @__PURE__ */ s("svg", {
1637
+ "aria-hidden": "true",
1638
+ role: "status",
1639
+ class: "inline w-4 h-4 me-3 animate-spin",
1640
+ viewBox: "0 0 100 101",
1641
+ fill: "none",
1642
+ xmlns: "http://www.w3.org/2000/svg"
1643
+ }, [
1644
+ /* @__PURE__ */ s("path", {
1645
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
1646
+ fill: "currentColor"
1647
+ }),
1648
+ /* @__PURE__ */ s("path", {
1649
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
1650
+ fill: "#1C64F2"
1651
+ })
1652
+ ], -1);
1653
+ function Br(e, t, r, n, a, o) {
1654
+ return r.is_loading ? (d(), q(W("button"), {
1655
+ key: 1,
1656
+ disabled: "",
1657
+ class: p(`flex items-center gap-2 focus:outline-none text-sm px-2 py-2 me-2 font-medium rounded-lg ${o.buttonTypeClass}`)
1658
+ }, {
1659
+ default: X(() => [
1660
+ Lr,
1661
+ v(" Loading... ")
1662
+ ]),
1663
+ _: 1
1664
+ }, 8, ["class"])) : (d(), q(W(r.tag), R({
1665
+ key: 0,
1666
+ type: r.is_submit
1667
+ }, { type: r.is_submit ? "submit" : void 0 }, {
1668
+ href: r.tag === "a" ? r.href : void 0,
1669
+ class: `flex items-center gap-2 focus:outline-none text-sm px-5 py-2 me-2 font-medium rounded-lg ${o.buttonTypeClass}`
1670
+ }), {
1671
+ default: X(() => [
1672
+ r.icon ? (d(), u("i", {
1673
+ key: 0,
1674
+ class: p([r.icon, "text-base"])
1675
+ }, null, 2)) : g("", !0),
1676
+ j(e.$slots, "default")
1677
+ ]),
1678
+ _: 3
1679
+ }, 16, ["type", "href", "class"]));
1680
+ }
1681
+ const $l = /* @__PURE__ */ k(Vr, [["render", Br]]), Gr = { class: "font-bold ptext-lg dark:text-white" }, Fr = ["name", "id"], Rr = ["id"], Ur = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), qr = ["for"], Hr = /* @__PURE__ */ s("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300" }, null, -1), zr = ["name", "id"], Zr = ["required", "name", "id", "type"], Kr = { class: "gl-span-form-error" }, Wr = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Sl = {
1682
+ __name: "GlTextareaTranslate",
1683
+ props: {
1684
+ is_required: {
1685
+ type: Boolean,
1686
+ default: !1
1687
+ },
1688
+ show: {
1689
+ type: Boolean,
1690
+ default: !1
1691
+ },
1692
+ error_message: {
1693
+ type: String,
1694
+ default: ""
1695
+ },
1696
+ model_value: {
1697
+ type: [String, Number],
1698
+ default: null
1699
+ },
1700
+ modelValue: {
1701
+ type: [String, Number],
1702
+ default: ""
1703
+ },
1704
+ model_value_translate: {
1705
+ type: [String, Object],
1706
+ default: null
1707
+ },
1708
+ modelValueTranslate: {
1709
+ type: [String, Object],
1710
+ default: ""
1711
+ },
1712
+ type: {
1713
+ type: String,
1714
+ default: "text"
1715
+ },
1716
+ field_name: {
1717
+ type: String,
1718
+ default: ""
1719
+ },
1720
+ label_name: {
1721
+ type: String,
1722
+ default: ""
1723
+ },
1724
+ get_field_translations: {
1725
+ type: String,
1726
+ default: ""
1727
+ },
1728
+ description: {
1729
+ type: String,
1730
+ default: ""
1731
+ },
1732
+ translatable: {
1733
+ type: Object,
1734
+ default: null
1735
+ }
1736
+ },
1737
+ emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
1738
+ setup(e, { expose: t, emit: r }) {
1739
+ const n = e, a = r, o = C(null), l = C(null);
1740
+ return G(() => {
1741
+ o.value !== null && o.value.hasAttribute("autofocus") && o.value.focus(), n.model_value && (a("update:modelValue", n.model_value), o.value.value = n.model_value), n.model_value_translate, n.translatable && axios.post("/admin/get_field_translations", {
1742
+ model: n.translatable.model,
1743
+ row_id: n.translatable.row_id,
1744
+ field: n.translatable.field
1745
+ }).then((i) => {
1746
+ l.value.value = JSON.stringify(i.data), a("update:modelValueTranslate", JSON.stringify(i.data)), console.log("input_translate", l.value.value);
1747
+ }).catch((i) => {
1748
+ console.log(i);
1749
+ });
1750
+ }), t({ focus: () => o.value.focus() }), (i, c) => (d(), u(y, null, [
1751
+ e.show ? (d(), u("div", {
1752
+ key: 0,
1753
+ class: p(e.field_name)
1754
+ }, [
1755
+ s("h3", Gr, h(e.label_name), 1),
1756
+ S(s("input", {
1757
+ type: "hidden",
1758
+ "data-i18n": "true",
1759
+ name: e.field_name + "_i18n",
1760
+ id: e.field_name + "_i18n",
1761
+ ref_key: "input_translate",
1762
+ ref: l,
1763
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => i.inputTranslateValue = f)
1764
+ }, null, 8, Fr), [
1765
+ [A, i.inputTranslateValue]
1766
+ ]),
1767
+ s("p", {
1768
+ id: e.field_name,
1769
+ class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
1770
+ }, h(e.model_value), 9, Rr),
1771
+ Ur
1772
+ ], 2)) : g("", !0),
1773
+ e.show ? g("", !0) : (d(), u("div", {
1774
+ key: 1,
1775
+ class: p(["mb-4", e.field_name])
1776
+ }, [
1777
+ s("label", {
1778
+ class: p({
1779
+ "gl-label-translation-form": e.error_message == "",
1780
+ "gl-label-translation-form-invalid": e.error_message !== "",
1781
+ required: e.is_required
1782
+ }),
1783
+ for: e.field_name
1784
+ }, h(e.label_name), 11, qr),
1785
+ Hr,
1786
+ s("input", {
1787
+ class: "mb-4",
1788
+ type: "hidden",
1789
+ "data-i18n": "true",
1790
+ name: e.field_name + "_i18n",
1791
+ id: e.field_name + "_i18n",
1792
+ onInput: c[1] || (c[1] = (f) => i.$emit("update:modelValueTranslate", f.target.value)),
1793
+ ref_key: "input_translate",
1794
+ ref: l
1795
+ }, null, 40, zr),
1796
+ s("textarea", {
1797
+ required: e.is_required,
1798
+ name: e.field_name,
1799
+ id: e.field_name,
1800
+ class: p({
1801
+ " gl-textarea-form form-input-translation mt-4 ": e.error_message == "",
1802
+ " gl-textarea-form-invalid form-input-translation mt-4 ": e.error_message !== ""
1803
+ }),
1804
+ type: e.type,
1805
+ onInput: c[2] || (c[2] = (f) => i.$emit("update:modelValue", f.target.value)),
1806
+ onKeydown: c[3] || (c[3] = (f) => i.$emit("keydown", f)),
1807
+ ref_key: "input",
1808
+ ref: o,
1809
+ rows: "4"
1810
+ }, `
1811
+ `, 42, Zr),
1812
+ s("span", Kr, h(e.error_message), 1),
1813
+ s("small", Wr, h(e.description), 1)
1814
+ ], 2))
1815
+ ], 64));
1816
+ }
1817
+ }, Xr = { class: "font-bold ptext-lg dark:text-white" }, Yr = ["name", "id"], Jr = ["id"], Qr = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), es = ["for"], ts = /* @__PURE__ */ s("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300" }, null, -1), rs = ["name", "id"], ss = ["name", "id", "type"], ns = { class: "gl-span-form-error" }, os = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Cl = {
1818
+ __name: "GlTinymceTranslate",
1819
+ props: {
1820
+ is_required: {
1821
+ type: Boolean,
1822
+ default: !1
1823
+ },
1824
+ show: {
1825
+ type: Boolean,
1826
+ default: !1
1827
+ },
1828
+ error_message: {
1829
+ type: String,
1830
+ default: ""
1831
+ },
1832
+ model_value: {
1833
+ type: [String, Number],
1834
+ default: null
1835
+ },
1836
+ modelValue: {
1837
+ type: [String, Number],
1838
+ default: ""
1839
+ },
1840
+ model_value_translate: {
1841
+ type: [String, Object],
1842
+ default: null
1843
+ },
1844
+ modelValueTranslate: {
1845
+ type: [String, Object],
1846
+ default: ""
1847
+ },
1848
+ type: {
1849
+ type: String,
1850
+ default: "text"
1851
+ },
1852
+ field_name: {
1853
+ type: String,
1854
+ default: ""
1855
+ },
1856
+ label_name: {
1857
+ type: String,
1858
+ default: ""
1859
+ },
1860
+ get_field_translations: {
1861
+ type: String,
1862
+ default: ""
1863
+ },
1864
+ description: {
1865
+ type: String,
1866
+ default: ""
1867
+ },
1868
+ translatable: {
1869
+ type: Object,
1870
+ default: null
1871
+ }
1872
+ },
1873
+ emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
1874
+ setup(e, { expose: t, emit: r }) {
1875
+ const n = e, a = r, o = C(null), l = C(null);
1876
+ return G(() => {
1877
+ tinymce.init({
1878
+ selector: "#" + n.field_name,
1879
+ width: "100%",
1880
+ height: 300
1881
+ }), console.log("tinymce ", n.model_value), o.value !== null && o.value.hasAttribute("autofocus") && o.value.focus(), n.model_value && (a("update:modelValue", n.model_value), o.value.value = n.model_value), n.model_value_translate, n.translatable && axios.post("/admin/get_field_translations", {
1882
+ model: n.translatable.model,
1883
+ row_id: n.translatable.row_id,
1884
+ field: n.translatable.field
1885
+ }).then((i) => {
1886
+ l.value.value = JSON.stringify(i.data), a("update:modelValueTranslate", JSON.stringify(i.data));
1887
+ }).catch((i) => {
1888
+ console.log(i);
1889
+ });
1890
+ }), t({ focus: () => o.value.focus() }), (i, c) => (d(), u(y, null, [
1891
+ e.show ? (d(), u("div", {
1892
+ key: 0,
1893
+ class: p(e.field_name)
1894
+ }, [
1895
+ s("h3", Xr, h(e.label_name), 1),
1896
+ S(s("input", {
1897
+ type: "hidden",
1898
+ "data-i18n": "true",
1899
+ name: e.field_name + "_i18n",
1900
+ id: e.field_name + "_i18n",
1901
+ ref_key: "input_translate",
1902
+ ref: l,
1903
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => i.inputTranslateValue = f)
1904
+ }, null, 8, Yr), [
1905
+ [A, i.inputTranslateValue]
1906
+ ]),
1907
+ s("p", {
1908
+ id: e.field_name,
1909
+ class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
1910
+ }, h(e.model_value), 9, Jr),
1911
+ Qr
1912
+ ], 2)) : g("", !0),
1913
+ e.show ? g("", !0) : (d(), u("div", {
1914
+ key: 1,
1915
+ class: p(["mb-4", e.field_name])
1916
+ }, [
1917
+ s("label", {
1918
+ class: p({
1919
+ "gl-label-translation-form": e.error_message == "",
1920
+ "gl-label-translation-form-invalid": e.error_message !== "",
1921
+ required: e.is_required
1922
+ }),
1923
+ for: e.field_name
1924
+ }, h(e.label_name), 11, es),
1925
+ ts,
1926
+ s("input", {
1927
+ class: "mb-4",
1928
+ type: "hidden",
1929
+ "data-i18n": "true",
1930
+ name: e.field_name + "_i18n",
1931
+ id: e.field_name + "_i18n",
1932
+ onInput: c[1] || (c[1] = (f) => i.$emit("update:modelValueTranslate", f.target.value)),
1933
+ ref_key: "input_translate",
1934
+ ref: l
1935
+ }, null, 40, rs),
1936
+ s("textarea", {
1937
+ name: e.field_name,
1938
+ id: e.field_name,
1939
+ class: p(["tiny", {
1940
+ " gl-textarea-form form-input-translation mt-4 ": e.error_message == "",
1941
+ " gl-textarea-form-invalid form-input-translation mt-4 ": e.error_message !== ""
1942
+ }]),
1943
+ type: e.type,
1944
+ onInput: c[2] || (c[2] = (f) => i.$emit("update:modelValue", f.target.value)),
1945
+ onKeydown: c[3] || (c[3] = (f) => i.$emit("keydown", f)),
1946
+ ref_key: "input",
1947
+ ref: o,
1948
+ rows: "4"
1949
+ }, `
1950
+ `, 42, ss),
1951
+ s("span", ns, h(e.error_message), 1),
1952
+ s("small", os, h(e.description), 1)
1953
+ ], 2))
1954
+ ], 64));
1955
+ }
1956
+ }, as = { class: "font-bold ptext-lg dark:text-white" }, is = ["name", "id"], ls = ["id"], ds = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), us = ["for"], cs = /* @__PURE__ */ s("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300" }, null, -1), fs = ["name", "id"], hs = ["required", "name", "id", "type"], gs = { class: "gl-span-form-error" }, ms = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Ol = {
1957
+ __name: "GlTextTranslate",
1958
+ props: {
1959
+ is_required: {
1960
+ type: Boolean,
1961
+ default: !1
1962
+ },
1963
+ show: {
1964
+ type: Boolean,
1965
+ default: !1
1966
+ },
1967
+ error_message: {
1968
+ type: String,
1969
+ default: ""
1970
+ },
1971
+ model_value: {
1972
+ type: [String, Number],
1973
+ default: null
1974
+ },
1975
+ modelValue: {
1976
+ type: [String, Number],
1977
+ default: ""
1978
+ },
1979
+ model_value_translate: {
1980
+ type: [String, Object],
1981
+ default: null
1982
+ },
1983
+ modelValueTranslate: {
1984
+ type: [String, Object],
1985
+ default: ""
1986
+ },
1987
+ type: {
1988
+ type: String,
1989
+ default: "text"
1990
+ },
1991
+ field_name: {
1992
+ type: String,
1993
+ default: ""
1994
+ },
1995
+ label_name: {
1996
+ type: String,
1997
+ default: ""
1998
+ },
1999
+ get_field_translations: {
2000
+ type: String,
2001
+ default: ""
2002
+ },
2003
+ description: {
2004
+ type: String,
2005
+ default: ""
2006
+ },
2007
+ translatable: {
2008
+ type: Object,
2009
+ default: null
2010
+ }
2011
+ },
2012
+ emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
2013
+ setup(e, { expose: t, emit: r }) {
2014
+ const n = e, a = r, o = C(null), l = C(null);
2015
+ return G(() => {
2016
+ o.value !== null && o.value.hasAttribute("autofocus") && o.value.focus(), n.model_value && (a("update:modelValue", n.model_value), o.value.value = n.model_value), n.model_value_translate, n.translatable && axios.post("/admin/get_field_translations", {
2017
+ model: n.translatable.model,
2018
+ row_id: n.translatable.row_id,
2019
+ field: n.translatable.field
2020
+ }).then((i) => {
2021
+ l.value.value = JSON.stringify(i.data), a("update:modelValueTranslate", JSON.stringify(i.data));
2022
+ }).catch((i) => {
2023
+ console.log(i);
2024
+ });
2025
+ }), t({ focus: () => o.value.focus() }), (i, c) => (d(), u(y, null, [
2026
+ e.show ? (d(), u("div", {
2027
+ key: 0,
2028
+ class: p(e.field_name)
2029
+ }, [
2030
+ s("h3", as, h(e.label_name), 1),
2031
+ S(s("input", {
2032
+ type: "hidden",
2033
+ "data-i18n": "true",
2034
+ name: e.field_name + "_i18n",
2035
+ id: e.field_name + "_i18n",
2036
+ ref: "input_translate_s",
2037
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => i.inputTranslateValue = f)
2038
+ }, null, 8, is), [
2039
+ [A, i.inputTranslateValue]
2040
+ ]),
2041
+ s("p", {
2042
+ id: e.field_name,
2043
+ class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
2044
+ }, h(e.model_value), 9, ls),
2045
+ ds
2046
+ ], 2)) : g("", !0),
2047
+ e.show ? g("", !0) : (d(), u("div", {
2048
+ key: 1,
2049
+ class: p(["mb-4", e.field_name])
2050
+ }, [
2051
+ s("label", {
2052
+ class: p({
2053
+ "gl-label-translation-form": e.error_message == "",
2054
+ "gl-label-translation-form-invalid": e.error_message !== "",
2055
+ required: e.is_required
2056
+ }),
2057
+ for: e.field_name
2058
+ }, h(e.label_name), 11, us),
2059
+ cs,
2060
+ s("input", {
2061
+ class: "mb-4",
2062
+ type: "hidden",
2063
+ "data-i18n": "true",
2064
+ name: e.field_name + "_i18n",
2065
+ id: e.field_name + "_i18n",
2066
+ onInput: c[1] || (c[1] = (f) => i.$emit("update:modelValueTranslate", f.target.value)),
2067
+ ref_key: "input_translate",
2068
+ ref: l
2069
+ }, null, 40, fs),
2070
+ s("input", {
2071
+ required: e.is_required,
2072
+ name: e.field_name,
2073
+ id: e.field_name,
2074
+ class: p({
2075
+ " gl-input-form form-input-translation mt-2 ": e.error_message == "",
2076
+ " gl-input-form-invalid form-input-translation mt-2 ": e.error_message !== ""
2077
+ }),
2078
+ type: e.type,
2079
+ onInput: c[2] || (c[2] = (f) => i.$emit("update:modelValue", f.target.value)),
2080
+ onKeydown: c[3] || (c[3] = (f) => i.$emit("keydown", f)),
2081
+ ref_key: "input",
2082
+ ref: o
2083
+ }, null, 42, hs),
2084
+ s("span", gs, h(e.error_message), 1),
2085
+ s("small", ms, h(e.description), 1)
2086
+ ], 2))
2087
+ ], 64));
2088
+ }
2089
+ }, _s = { class: "font-bold ptext-lg dark:text-white" }, ps = { class: "mb-4 text-base text-gray-900 dark:text-white" }, bs = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), ys = ["for"], vs = ["required", "name", "id", "type"], xs = { class: "gl-span-form-error" }, ws = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Dl = {
2090
+ __name: "GlTextInput",
2091
+ props: {
2092
+ is_required: {
2093
+ type: Boolean,
2094
+ default: !1
2095
+ },
2096
+ show: {
2097
+ type: Boolean,
2098
+ default: !1
2099
+ },
2100
+ error_message: {
2101
+ type: String,
2102
+ default: ""
2103
+ },
2104
+ model_value: {
2105
+ type: [String, Number],
2106
+ default: ""
2107
+ },
2108
+ modelValue: {
2109
+ type: [String, Number],
2110
+ default: ""
2111
+ },
2112
+ type: {
2113
+ type: String,
2114
+ default: "text"
2115
+ },
2116
+ field_name: {
2117
+ type: String,
2118
+ default: ""
2119
+ },
2120
+ label_name: {
2121
+ type: String,
2122
+ default: ""
2123
+ },
2124
+ description: {
2125
+ type: String,
2126
+ default: ""
2127
+ }
2128
+ },
2129
+ emits: ["update:modelValue", "keydown"],
2130
+ setup(e, { expose: t, emit: r }) {
2131
+ const n = e, a = r, o = C(null);
2132
+ return G(() => {
2133
+ o.value !== null && o.value.hasAttribute("autofocus") && o.value.focus(), n.model_value != "" && (a("update:modelValue", n.model_value), o.value.value = n.model_value), n.modelValue != "" && (a("update:modelValue", n.modelValue), o.value.value = n.modelValue);
2134
+ }), t({ focus: () => o.value.focus() }), (l, i) => (d(), u(y, null, [
2135
+ e.show ? (d(), u("div", {
2136
+ key: 0,
2137
+ class: p(e.field_name)
2138
+ }, [
2139
+ s("h3", _s, h(e.label_name), 1),
2140
+ s("p", ps, h(e.type == "password" ? e.model_value.replace(/./g, "*") : e.model_value), 1),
2141
+ bs
2142
+ ], 2)) : g("", !0),
2143
+ e.show ? g("", !0) : (d(), u("div", {
2144
+ key: 1,
2145
+ class: p(["mb-4", e.field_name])
2146
+ }, [
2147
+ s("label", {
2148
+ class: p({
2149
+ "gl-label-form": e.error_message == "",
2150
+ "gl-label-form-invalid": e.error_message !== "",
2151
+ required: e.is_required
2152
+ }),
2153
+ for: e.field_name
2154
+ }, h(e.label_name), 11, ys),
2155
+ s("input", {
2156
+ required: e.is_required,
2157
+ name: e.field_name,
2158
+ id: e.field_name,
2159
+ class: p({
2160
+ "gl-input-form": e.error_message == "",
2161
+ "gl-input-form-invalid": e.error_message !== ""
2162
+ }),
2163
+ type: e.type,
2164
+ onInput: i[0] || (i[0] = (c) => l.$emit("update:modelValue", c.target.value)),
2165
+ onKeydown: i[1] || (i[1] = (c) => l.$emit("keydown", c)),
2166
+ ref_key: "input",
2167
+ ref: o
2168
+ }, null, 42, vs),
2169
+ s("span", xs, h(e.error_message), 1),
2170
+ s("small", ws, h(e.description), 1)
2171
+ ], 2))
2172
+ ], 64));
2173
+ }
2174
+ }, ks = {
2175
+ setup(e, { slots: t }) {
2176
+ const r = C(t.default().map((a) => a.props)), n = C(r.value[0].title);
2177
+ return Ae("selectedTitle", n), {
2178
+ tabs: r,
2179
+ selectedTitle: n
2180
+ };
2181
+ }
2182
+ }, $s = { class: "flex flex-wrap" }, Ss = { class: "w-full" }, Cs = { class: "flex flex-row flex-wrap gap-1 pt-3 pb-4 mb-0 list-none" }, Os = ["onClick"], Ds = { class: "relative flex flex-col w-full min-w-0 mb-6 break-words bg-white rounded shadow-lg dark:border-strokedark dark:bg-boxdark" }, Ps = { class: "flex-auto px-4 py-5" }, Es = { class: "tab-content tab-space" };
2183
+ function js(e, t, r, n, a, o) {
2184
+ return d(), u(y, null, [
2185
+ s("div", $s, [
2186
+ s("div", Ss, [
2187
+ s("ul", Cs, [
2188
+ (d(!0), u(y, null, w(n.tabs, (l) => (d(), u("li", {
2189
+ key: l.title,
2190
+ onClick: (i) => n.selectedTitle = l.title,
2191
+ class: "flex-auto -mb-px text-center"
2192
+ }, [
2193
+ s("a", {
2194
+ class: p([{ "text-slate-600 bg-white dark:bg-meta-4": n.selectedTitle != l.title, "text-white bg-slate-600 dark:bg-primary": n.selectedTitle === l.title }, "block px-5 py-3 text-xs font-bold leading-normal uppercase rounded shadow-lg hover:text-white tex hover:bg-slate-600 dark:hover:bg-primary dark:text-white tabs_buttons"])
2195
+ }, [
2196
+ s("i", {
2197
+ class: p([l.icon, "mr-1 text-base"])
2198
+ }, null, 2),
2199
+ v(" " + h(l.title), 1)
2200
+ ], 2)
2201
+ ], 8, Os))), 128))
2202
+ ])
2203
+ ])
2204
+ ]),
2205
+ s("div", Ds, [
2206
+ s("div", Ps, [
2207
+ s("div", Es, [
2208
+ j(e.$slots, "default")
2209
+ ])
2210
+ ])
2211
+ ])
2212
+ ], 64);
2213
+ }
2214
+ const Pl = /* @__PURE__ */ k(ks, [["render", js]]), Is = {
2215
+ props: ["title"],
2216
+ setup() {
2217
+ return {
2218
+ selectedTitle: de("selectedTitle")
2219
+ };
2220
+ }
2221
+ }, As = { class: "block" };
2222
+ function Ts(e, t, r, n, a, o) {
2223
+ return S((d(), u("div", As, [
2224
+ j(e.$slots, "default")
2225
+ ], 512)), [
2226
+ [T, r.title == n.selectedTitle]
2227
+ ]);
2228
+ }
2229
+ const El = /* @__PURE__ */ k(Is, [["render", Ts]]), Ns = {
2230
+ props: {
2231
+ elements_to_show_prop: {
2232
+ type: Number,
2233
+ default: 3
2234
+ },
2235
+ hide_arrow: {
2236
+ type: Boolean,
2237
+ default: !1
2238
+ },
2239
+ disable_touch: {
2240
+ type: Boolean,
2241
+ default: !1
2242
+ },
2243
+ direction_property: {
2244
+ type: String,
2245
+ default: "ltr"
2246
+ // Default to left-to-right
2247
+ },
2248
+ slider_arrows_indicators_position: {
2249
+ type: String,
2250
+ default: "arrows_outside_slider"
2251
+ // arrows_outside_slide,arrows_indicators_inside_slider,arrows_indicators_below_slider
2252
+ }
2253
+ },
2254
+ data: function() {
2255
+ return {
2256
+ elementsToShow: 3,
2257
+ dotsNum: 0,
2258
+ currentDot: 1,
2259
+ dotsNavigation: [],
2260
+ touchStartX: 0,
2261
+ isMoving: !1,
2262
+ initialX: 0,
2263
+ initialY: 0,
2264
+ Random_string: this.generateRandomString(6)
2265
+ };
2266
+ },
2267
+ mounted() {
2268
+ this.elementsToShow = this.elements_to_show_prop, this.initSlider(), this.disable_touch || this.movingActions();
2269
+ },
2270
+ methods: {
2271
+ sliderIndicatorsAction() {
2272
+ var e = "";
2273
+ return this.direction_property == "rtl" ? (e += " space-x-reverse ", e += " slider_indicators ") : this.slider_arrows_indicators_position == "arrows_indicators_inside_slider" && (e += " slider_indicators "), e;
2274
+ },
2275
+ sliderContainerAction() {
2276
+ var e = "";
2277
+ return !this.hide_arrow && this.slider_arrows_indicators_position == "arrows_outside_slider" ? e += " w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12" : this.slider_arrows_indicators_position != "arrows_outside_slider" && (e += " w-12/12 "), e;
2278
+ },
2279
+ generateRandomString(e) {
2280
+ let t = "";
2281
+ const r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", n = r.length;
2282
+ for (let a = 0; a < e; a++)
2283
+ t += r.charAt(Math.floor(Math.random() * n));
2284
+ return t;
2285
+ },
2286
+ movingActions() {
2287
+ let e = this, t = document.getElementById("slider_" + this.Random_string);
2288
+ const r = (a) => {
2289
+ t.style.cursor = "grabbing";
2290
+ const o = (i) => {
2291
+ const c = i.clientX || i.touches && i.touches[0] && i.touches[0].clientX, f = i.clientY || i.touches && i.touches[0] && i.touches[0].clientY, m = c - e.initialX, b = f - e.initialY;
2292
+ Math.abs(m) > Math.abs(b) ? (i.preventDefault(), Math.abs(m) >= 70 && (m < 0 ? e.next() : e.prev(), e.initialX = c)) : t.style.cursor = "grab", Math.abs(b) > Math.abs(m) && (t.style.cursor = "grab");
2293
+ }, l = () => {
2294
+ document.removeEventListener("mousemove", o), document.removeEventListener("touchmove", o), document.removeEventListener("mouseup", l), document.removeEventListener("touchend", l), t.style.cursor = "grab";
2295
+ };
2296
+ document.addEventListener("mousemove", o), document.addEventListener("touchmove", o, { passive: !1 }), document.addEventListener("mouseup", l), document.addEventListener("touchend", l), e.initialX = a.clientX || a.touches && a.touches[0] && a.touches[0].clientX, e.initialY = a.clientY || a.touches && a.touches[0] && a.touches[0].clientY;
2297
+ }, n = (a) => {
2298
+ a.key === "ArrowLeft" ? e.prev() : a.key === "ArrowRight" && e.next();
2299
+ };
2300
+ t.addEventListener("mousedown", r), t.addEventListener("touchstart", r), document.addEventListener("keydown", n);
2301
+ },
2302
+ next() {
2303
+ this.currentDot < this.dotsNavigation.length && (this.currentDot++, this.setDot(this.currentDot));
2304
+ },
2305
+ prev() {
2306
+ this.currentDot > 1 && (this.currentDot--, this.setDot(this.currentDot));
2307
+ },
2308
+ initSlider() {
2309
+ let e = document.getElementById("sliderContainer_" + this.Random_string), t = document.getElementById("mainSliderContainer_" + this.Random_string), r = document.getElementById("slider_" + this.Random_string), n = r.querySelectorAll("li"), a = Array.from(n).filter((i) => i.parentNode === r), o = e.clientWidth, l = o / this.elementsToShow;
2310
+ if (this.elementsToShow > 1 ? document.body.clientWidth < 1e3 ? (this.elementsToShow = 1, l = this.hide_arrow ? t.clientWidth : o) : document.body.clientWidth < 1500 && (this.elementsToShow = 2) : (this.elementsToShow = 1, l = this.hide_arrow ? t.clientWidth : o), a.length > 1) {
2311
+ this.dotsNum = this.elementsToShow == 1 ? a.length : a.length - this.elementsToShow + 1;
2312
+ let i = this.elementsToShow == 1 ? l * a.length / this.dotsNum : l * (a.length - this.elementsToShow) / (this.dotsNum - 1);
2313
+ this.dotsNavigation = [];
2314
+ for (let c = 0; c < this.dotsNum; c++)
2315
+ this.dotsNavigation.push(i * c);
2316
+ }
2317
+ r.style.width = a.length * l + "px", r.style.transition = "margin", r.style.transitionDuration = "1s";
2318
+ for (let i = 0; i < a.length; i++) {
2319
+ const c = a[i];
2320
+ c.style.width = l + "px";
2321
+ }
2322
+ },
2323
+ setDot(e) {
2324
+ let t = document.getElementById("slider_" + this.Random_string);
2325
+ this.direction_property == "rtl" ? t.style.marginRight = -this.dotsNavigation[e - 1] + "px" : t.style.marginLeft = -this.dotsNavigation[e - 1] + "px", this.currentDot = e;
2326
+ }
2327
+ }
2328
+ }, D = (e) => (Te("data-v-a94f16a9"), e = e(), Ne(), e), Ms = ["id"], Vs = {
2329
+ key: 0,
2330
+ class: "items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"
2331
+ }, Ls = { class: "w-full" }, Bs = {
2332
+ key: 0,
2333
+ xmlns: "http://www.w3.org/2000/svg",
2334
+ class: "w-6 h-6",
2335
+ fill: "none",
2336
+ viewBox: "0 0 24 24",
2337
+ stroke: "currentColor",
2338
+ "stroke-width": "2"
2339
+ }, Gs = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2340
+ "stroke-linecap": "round",
2341
+ "stroke-linejoin": "round",
2342
+ d: "M11 17l-5-5m0 0l5-5m-5 5h12"
2343
+ }, null, -1)), Fs = [
2344
+ Gs
2345
+ ], Rs = {
2346
+ key: 1,
2347
+ xmlns: "http://www.w3.org/2000/svg",
2348
+ class: "w-6 h-6",
2349
+ fill: "none",
2350
+ viewBox: "0 0 24 24",
2351
+ stroke: "currentColor",
2352
+ "stroke-width": "2"
2353
+ }, Us = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2354
+ "stroke-linecap": "round",
2355
+ "stroke-linejoin": "round",
2356
+ d: "M13 7l5 5m0 0l-5 5m5-5H6"
2357
+ }, null, -1)), qs = [
2358
+ Us
2359
+ ], Hs = ["id"], zs = ["id"], Zs = { class: "w-full" }, Ks = {
2360
+ key: 0,
2361
+ xmlns: "http://www.w3.org/2000/svg",
2362
+ class: "w-6 h-6",
2363
+ fill: "none",
2364
+ viewBox: "0 0 24 24",
2365
+ stroke: "currentColor",
2366
+ "stroke-width": "2"
2367
+ }, Ws = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2368
+ "stroke-linecap": "round",
2369
+ "stroke-linejoin": "round",
2370
+ d: "M11 17l-5-5m0 0l5-5m-5 5h12"
2371
+ }, null, -1)), Xs = [
2372
+ Ws
2373
+ ], Ys = {
2374
+ key: 1,
2375
+ xmlns: "http://www.w3.org/2000/svg",
2376
+ class: "w-6 h-6",
2377
+ fill: "none",
2378
+ viewBox: "0 0 24 24",
2379
+ stroke: "currentColor",
2380
+ "stroke-width": "2"
2381
+ }, Js = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2382
+ "stroke-linecap": "round",
2383
+ "stroke-linejoin": "round",
2384
+ d: "M13 7l5 5m0 0l-5 5m5-5H6"
2385
+ }, null, -1)), Qs = [
2386
+ Js
2387
+ ], en = { class: "w-full" }, tn = {
2388
+ key: 0,
2389
+ xmlns: "http://www.w3.org/2000/svg",
2390
+ class: "w-6 h-6",
2391
+ fill: "none",
2392
+ viewBox: "0 0 24 24",
2393
+ stroke: "currentColor",
2394
+ "stroke-width": "2"
2395
+ }, rn = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2396
+ "stroke-linecap": "round",
2397
+ "stroke-linejoin": "round",
2398
+ d: "M13 7l5 5m0 0l-5 5m5-5H6"
2399
+ }, null, -1)), sn = [
2400
+ rn
2401
+ ], nn = {
2402
+ key: 1,
2403
+ xmlns: "http://www.w3.org/2000/svg",
2404
+ class: "w-6 h-6",
2405
+ fill: "none",
2406
+ viewBox: "0 0 24 24",
2407
+ stroke: "currentColor",
2408
+ "stroke-width": "2"
2409
+ }, on = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2410
+ "stroke-linecap": "round",
2411
+ "stroke-linejoin": "round",
2412
+ d: "M11 17l-5-5m0 0l5-5m-5 5h12"
2413
+ }, null, -1)), an = [
2414
+ on
2415
+ ], ln = ["onClick"], dn = /* @__PURE__ */ D(() => /* @__PURE__ */ s("span", null, null, -1)), un = [
2416
+ dn
2417
+ ], cn = {
2418
+ key: 1,
2419
+ class: "flex justify-between pl-5 pr-5"
2420
+ }, fn = ["onClick"], hn = /* @__PURE__ */ D(() => /* @__PURE__ */ s("span", null, null, -1)), gn = [
2421
+ hn
2422
+ ], mn = {
2423
+ key: 0,
2424
+ class: "flex"
2425
+ }, _n = { class: "flex items-center" }, pn = { class: "w-full" }, bn = {
2426
+ key: 0,
2427
+ xmlns: "http://www.w3.org/2000/svg",
2428
+ class: "w-6 h-6",
2429
+ fill: "none",
2430
+ viewBox: "0 0 24 24",
2431
+ stroke: "currentColor",
2432
+ "stroke-width": "2"
2433
+ }, yn = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2434
+ "stroke-linecap": "round",
2435
+ "stroke-linejoin": "round",
2436
+ d: "M11 17l-5-5m0 0l5-5m-5 5h12"
2437
+ }, null, -1)), vn = [
2438
+ yn
2439
+ ], xn = {
2440
+ key: 1,
2441
+ xmlns: "http://www.w3.org/2000/svg",
2442
+ class: "w-6 h-6",
2443
+ fill: "none",
2444
+ viewBox: "0 0 24 24",
2445
+ stroke: "currentColor",
2446
+ "stroke-width": "2"
2447
+ }, wn = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2448
+ "stroke-linecap": "round",
2449
+ "stroke-linejoin": "round",
2450
+ d: "M13 7l5 5m0 0l-5 5m5-5H6"
2451
+ }, null, -1)), kn = [
2452
+ wn
2453
+ ], $n = { class: "flex items-center" }, Sn = { class: "w-full" }, Cn = {
2454
+ key: 0,
2455
+ xmlns: "http://www.w3.org/2000/svg",
2456
+ class: "w-6 h-6",
2457
+ fill: "none",
2458
+ viewBox: "0 0 24 24",
2459
+ stroke: "currentColor",
2460
+ "stroke-width": "2"
2461
+ }, On = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2462
+ "stroke-linecap": "round",
2463
+ "stroke-linejoin": "round",
2464
+ d: "M13 7l5 5m0 0l-5 5m5-5H6"
2465
+ }, null, -1)), Dn = [
2466
+ On
2467
+ ], Pn = {
2468
+ key: 1,
2469
+ xmlns: "http://www.w3.org/2000/svg",
2470
+ class: "w-6 h-6",
2471
+ fill: "none",
2472
+ viewBox: "0 0 24 24",
2473
+ stroke: "currentColor",
2474
+ "stroke-width": "2"
2475
+ }, En = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2476
+ "stroke-linecap": "round",
2477
+ "stroke-linejoin": "round",
2478
+ d: "M11 17l-5-5m0 0l5-5m-5 5h12"
2479
+ }, null, -1)), jn = [
2480
+ En
2481
+ ], In = {
2482
+ key: 1,
2483
+ class: "items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"
2484
+ }, An = { class: "w-full" }, Tn = {
2485
+ key: 0,
2486
+ xmlns: "http://www.w3.org/2000/svg",
2487
+ class: "w-6 h-6",
2488
+ fill: "none",
2489
+ viewBox: "0 0 24 24",
2490
+ stroke: "currentColor",
2491
+ "stroke-width": "2"
2492
+ }, Nn = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2493
+ "stroke-linecap": "round",
2494
+ "stroke-linejoin": "round",
2495
+ d: "M13 7l5 5m0 0l-5 5m5-5H6"
2496
+ }, null, -1)), Mn = [
2497
+ Nn
2498
+ ], Vn = {
2499
+ key: 1,
2500
+ xmlns: "http://www.w3.org/2000/svg",
2501
+ class: "w-6 h-6",
2502
+ fill: "none",
2503
+ viewBox: "0 0 24 24",
2504
+ stroke: "currentColor",
2505
+ "stroke-width": "2"
2506
+ }, Ln = /* @__PURE__ */ D(() => /* @__PURE__ */ s("path", {
2507
+ "stroke-linecap": "round",
2508
+ "stroke-linejoin": "round",
2509
+ d: "M11 17l-5-5m0 0l5-5m-5 5h12"
2510
+ }, null, -1)), Bn = [
2511
+ Ln
2512
+ ];
2513
+ function Gn(e, t, r, n, a, o) {
2514
+ return d(), u("div", null, [
2515
+ s("div", {
2516
+ class: p(["", !r.hide_arrow && r.slider_arrows_indicators_position == "arrows_outside_slide" ? "flex" : "relative block"]),
2517
+ id: "mainSliderContainer_" + e.Random_string
2518
+ }, [
2519
+ e.dotsNum > 0 && !r.hide_arrow && r.slider_arrows_indicators_position == "arrows_outside_slider" ? (d(), u("div", Vs, [
2520
+ s("div", Ls, [
2521
+ s("button", {
2522
+ class: "p-3 mr-5 rounded-full shadow-lg arrow_button_styles",
2523
+ onClick: t[0] || (t[0] = (l) => o.prev())
2524
+ }, [
2525
+ r.direction_property == "ltr" ? (d(), u("svg", Bs, Fs)) : g("", !0),
2526
+ r.direction_property == "rtl" ? (d(), u("svg", Rs, qs)) : g("", !0)
2527
+ ])
2528
+ ])
2529
+ ])) : g("", !0),
2530
+ s("div", {
2531
+ class: p(["overflow-hidden", o.sliderContainerAction()]),
2532
+ id: "sliderContainer_" + e.Random_string
2533
+ }, [
2534
+ s("ul", {
2535
+ class: "flex",
2536
+ id: "slider_" + e.Random_string
2537
+ }, [
2538
+ e.dotsNum > 0 && !r.hide_arrow && r.slider_arrows_indicators_position == "arrows_indicators_inside_slider" ? (d(), u("div", {
2539
+ key: 0,
2540
+ class: p(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex", r.direction_property == "rtl" ? "arrow_button_next" : "arrow_button_prev"])
2541
+ }, [
2542
+ s("div", Zs, [
2543
+ s("button", {
2544
+ class: "p-3 rounded-full shadow-lg arrow_button_styles",
2545
+ onClick: t[1] || (t[1] = I((l) => o.prev(), ["stop"]))
2546
+ }, [
2547
+ r.direction_property == "ltr" ? (d(), u("svg", Ks, Xs)) : g("", !0),
2548
+ r.direction_property == "rtl" ? (d(), u("svg", Ys, Qs)) : g("", !0)
2549
+ ])
2550
+ ])
2551
+ ], 2)) : g("", !0),
2552
+ j(e.$slots, "default", {}, void 0, !0),
2553
+ e.dotsNum > 0 && !r.hide_arrow && r.slider_arrows_indicators_position == "arrows_indicators_inside_slider" ? (d(), u("div", {
2554
+ key: 1,
2555
+ class: p(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button", r.direction_property == "rtl" ? "arrow_button_prev" : "arrow_button_next"])
2556
+ }, [
2557
+ s("div", en, [
2558
+ s("button", {
2559
+ class: "p-3 rounded-full shadow-lg arrow_button_styles",
2560
+ onClick: t[2] || (t[2] = I((l) => o.next(), ["stop"]))
2561
+ }, [
2562
+ r.direction_property == "ltr" ? (d(), u("svg", tn, sn)) : g("", !0),
2563
+ r.direction_property == "rtl" ? (d(), u("svg", nn, an)) : g("", !0)
2564
+ ])
2565
+ ])
2566
+ ], 2)) : g("", !0)
2567
+ ], 8, zs),
2568
+ r.slider_arrows_indicators_position != "arrows_indicators_below_slider" ? (d(), u("div", {
2569
+ key: 0,
2570
+ class: p(["flex justify-center mb-1 space-x-1", o.sliderIndicatorsAction()])
2571
+ }, [
2572
+ (d(!0), u(y, null, w(e.dotsNum, (l) => (d(), u("button", {
2573
+ role: "button",
2574
+ class: p(["gl-dot", { active: e.currentDot == l }]),
2575
+ key: l,
2576
+ onClick: (i) => o.setDot(l)
2577
+ }, un, 10, ln))), 128))
2578
+ ], 2)) : g("", !0),
2579
+ r.slider_arrows_indicators_position == "arrows_indicators_below_slider" ? (d(), u("div", cn, [
2580
+ s("div", {
2581
+ class: p(["flex justify-center mb-1 space-x-1", o.sliderIndicatorsAction()])
2582
+ }, [
2583
+ (d(!0), u(y, null, w(e.dotsNum, (l) => (d(), u("button", {
2584
+ role: "button",
2585
+ class: p(["gl-dot", { active: e.currentDot == l }]),
2586
+ key: l,
2587
+ onClick: (i) => o.setDot(l)
2588
+ }, gn, 10, fn))), 128))
2589
+ ], 2),
2590
+ e.dotsNum > 0 ? (d(), u("div", mn, [
2591
+ s("div", _n, [
2592
+ s("div", pn, [
2593
+ s("button", {
2594
+ class: p(["p-3 rounded-full arrow_button_styles", r.direction_property == "rtl" ? "ml-3" : "mr-3"]),
2595
+ onClick: t[3] || (t[3] = (l) => o.prev())
2596
+ }, [
2597
+ r.direction_property == "ltr" ? (d(), u("svg", bn, vn)) : g("", !0),
2598
+ r.direction_property == "rtl" ? (d(), u("svg", xn, kn)) : g("", !0)
2599
+ ], 2)
2600
+ ])
2601
+ ]),
2602
+ s("div", $n, [
2603
+ s("div", Sn, [
2604
+ s("button", {
2605
+ class: "p-3 rounded-full arrow_button_styles",
2606
+ onClick: t[4] || (t[4] = (l) => o.next())
2607
+ }, [
2608
+ r.direction_property == "ltr" ? (d(), u("svg", Cn, Dn)) : g("", !0),
2609
+ r.direction_property == "rtl" ? (d(), u("svg", Pn, jn)) : g("", !0)
2610
+ ])
2611
+ ])
2612
+ ])
2613
+ ])) : g("", !0)
2614
+ ])) : g("", !0)
2615
+ ], 10, Hs),
2616
+ e.dotsNum > 0 && !r.hide_arrow && r.slider_arrows_indicators_position == "arrows_outside_slider" ? (d(), u("div", In, [
2617
+ s("div", An, [
2618
+ s("button", {
2619
+ class: "p-3 ml-5 rounded-full shadow-lg arrow_button_styles",
2620
+ onClick: t[5] || (t[5] = (l) => o.next())
2621
+ }, [
2622
+ r.direction_property == "ltr" ? (d(), u("svg", Tn, Mn)) : g("", !0),
2623
+ r.direction_property == "rtl" ? (d(), u("svg", Vn, Bn)) : g("", !0)
2624
+ ])
2625
+ ])
2626
+ ])) : g("", !0)
2627
+ ], 10, Ms)
2628
+ ]);
2629
+ }
2630
+ const jl = /* @__PURE__ */ k(Ns, [["render", Gn], ["__scopeId", "data-v-a94f16a9"]]), Fn = {
2631
+ class: "fixed left-0 top-13 z-[1055] h-full w-full overflow-y-auto overflow-x-hidden outline-none inset-0 bg-black bg-opacity-80",
2632
+ tabindex: "-1",
2633
+ "aria-hidden": "true"
2634
+ }, Rn = { class: "pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-none bg-white border rounded-lg border-stroke dark:border-strokedark dark:bg-boxdark" }, Un = { class: "flex items-center justify-between flex-shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600" }, qn = { class: "text-xl font-medium leading-normal text-surface dark:text-white" }, Hn = /* @__PURE__ */ s("span", { class: "[&>svg]:h-6 [&>svg]:w-6" }, [
2635
+ /* @__PURE__ */ s("svg", {
2636
+ xmlns: "http://www.w3.org/2000/svg",
2637
+ fill: "currentColor",
2638
+ viewBox: "0 0 24 24",
2639
+ "stroke-width": "1.5",
2640
+ stroke: "currentColor"
2641
+ }, [
2642
+ /* @__PURE__ */ s("path", {
2643
+ "stroke-linecap": "round",
2644
+ "stroke-linejoin": "round",
2645
+ d: "M6 18L18 6M6 6l12 12"
2646
+ })
2647
+ ])
2648
+ ], -1), zn = [
2649
+ Hn
2650
+ ], Zn = { class: "relative p-4 overflow-y-auto" }, Kn = { class: "flex flex-wrap items-center justify-end flex-shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600" }, Il = {
2651
+ __name: "GlModal",
2652
+ props: {
2653
+ is_open: {
2654
+ type: Boolean,
2655
+ default: !1
2656
+ },
2657
+ title: {
2658
+ type: String,
2659
+ default: ""
2660
+ },
2661
+ max_width: {
2662
+ type: String,
2663
+ default: "max-w-2xl"
2664
+ }
2665
+ },
2666
+ emits: ["closeModal"],
2667
+ setup(e, { emit: t }) {
2668
+ const r = e, n = t, a = () => {
2669
+ document.documentElement.style.overflow = "hidden", document.documentElement.style.paddingRight = "0px";
2670
+ }, o = () => {
2671
+ document.documentElement.style.overflow = "", document.documentElement.style.paddingRight = "";
2672
+ }, l = () => {
2673
+ n("closeModal"), o();
2674
+ };
2675
+ return Q(
2676
+ () => r.is_open,
2677
+ (i, c) => {
2678
+ i ? a() : o();
2679
+ },
2680
+ { immediate: !0, deep: !0 }
2681
+ ), (i, c) => S((d(), u("div", Fn, [
2682
+ s("div", {
2683
+ class: p(["pointer-events-none relative h-[calc(100%-1rem)] w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:h-[calc(100%-3.5rem)]", e.max_width])
2684
+ }, [
2685
+ s("div", Rn, [
2686
+ s("div", Un, [
2687
+ s("h5", qn, h(e.title), 1),
2688
+ s("button", {
2689
+ type: "button",
2690
+ class: "box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-none dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",
2691
+ onClick: l,
2692
+ "aria-label": "Close"
2693
+ }, zn)
2694
+ ]),
2695
+ s("div", Zn, [
2696
+ j(i.$slots, "body")
2697
+ ]),
2698
+ s("div", Kn, [
2699
+ j(i.$slots, "buttons"),
2700
+ s("button", {
2701
+ onClick: l,
2702
+ type: "button",
2703
+ class: "px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"
2704
+ }, " Close ")
2705
+ ])
2706
+ ])
2707
+ ], 2)
2708
+ ], 512)), [
2709
+ [T, e.is_open]
2710
+ ]);
2711
+ }
2712
+ }, Wn = { class: "mb-4" }, Xn = { class: "flex justify-between px-6 py-3 -mb-px border border-gray-300 no-underlin" }, Yn = { class: "relative inline-flex items-center cursor-pointer" }, Jn = ["name", "id"], Qn = /* @__PURE__ */ s("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1), eo = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), to = { class: "flex justify-between px-6 py-3 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-frontenddark" }, ro = { class: "relative inline-flex items-center cursor-pointer" }, so = ["name", "id", "value", "checked"], no = /* @__PURE__ */ s("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1), oo = { class: "gl-span-form-error" }, ao = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Al = {
2713
+ __name: "GlToggleBox",
2714
+ props: {
2715
+ is_required: {
2716
+ type: Boolean,
2717
+ default: !1
2718
+ },
2719
+ show: {
2720
+ type: Boolean,
2721
+ default: !1
2722
+ },
2723
+ error_message: {
2724
+ type: String,
2725
+ default: ""
2726
+ },
2727
+ model_value: {
2728
+ type: String,
2729
+ required: !0
2730
+ },
2731
+ modelValue: {
2732
+ type: [String, Number],
2733
+ default: ""
2734
+ },
2735
+ type: {
2736
+ type: String,
2737
+ default: "text"
2738
+ },
2739
+ field_name: {
2740
+ type: String,
2741
+ default: ""
2742
+ },
2743
+ label_name: {
2744
+ type: String,
2745
+ default: ""
2746
+ },
2747
+ description: {
2748
+ type: String,
2749
+ default: ""
2750
+ }
2751
+ },
2752
+ emits: ["update:modelValue"],
2753
+ setup(e, { emit: t }) {
2754
+ const r = e, n = t, a = C(null);
2755
+ G(() => {
2756
+ r.model_value != "" && (n("update:modelValue", r.model_value), a.value.checked = r.model_value == 1), r.modelValue != "" && (n("update:modelValue", r.modelValue), a.value.checked = r.modelValue == 1);
2757
+ });
2758
+ const o = (l) => {
2759
+ const i = l.target.checked ? 1 : 0;
2760
+ n("update:modelValue", i);
2761
+ };
2762
+ return (l, i) => (d(), u(y, null, [
2763
+ e.show ? (d(), u("div", {
2764
+ key: 0,
2765
+ class: p(e.field_name)
2766
+ }, [
2767
+ s("div", Wn, [
2768
+ s("li", Xn, [
2769
+ v(h(e.label_name) + " ", 1),
2770
+ s("label", Yn, [
2771
+ s("input", {
2772
+ type: "checkbox",
2773
+ class: "sr-only peer",
2774
+ name: e.field_name,
2775
+ id: e.field_name,
2776
+ "true-value": 1,
2777
+ "false-value": 0,
2778
+ ref_key: "input",
2779
+ ref: a,
2780
+ disabled: ""
2781
+ }, null, 8, Jn),
2782
+ Qn
2783
+ ])
2784
+ ])
2785
+ ]),
2786
+ eo
2787
+ ], 2)) : g("", !0),
2788
+ e.show ? g("", !0) : (d(), u("div", {
2789
+ key: 1,
2790
+ class: p(["mb-4", e.field_name])
2791
+ }, [
2792
+ s("li", to, [
2793
+ v(h(e.label_name) + " ", 1),
2794
+ s("label", ro, [
2795
+ s("input", {
2796
+ type: "checkbox",
2797
+ class: "sr-only peer",
2798
+ name: e.field_name,
2799
+ id: e.field_name,
2800
+ value: e.model_value,
2801
+ checked: e.model_value == 1,
2802
+ "true-value": 1,
2803
+ "false-value": 0,
2804
+ ref_key: "input",
2805
+ ref: a,
2806
+ onChange: o
2807
+ }, null, 40, so),
2808
+ no
2809
+ ])
2810
+ ]),
2811
+ s("span", oo, h(e.error_message), 1),
2812
+ s("small", ao, h(e.description), 1)
2813
+ ], 2))
2814
+ ], 64));
2815
+ }
2816
+ }, io = {
2817
+ name: "Dropdown",
2818
+ template: "Dropdown",
2819
+ props: {
2820
+ modelValue: {
2821
+ type: [String, Number],
2822
+ default: ""
2823
+ },
2824
+ default_value: {
2825
+ type: [String, Number],
2826
+ default: ""
2827
+ },
2828
+ field_name: {
2829
+ type: String,
2830
+ default: ""
2831
+ },
2832
+ is_required: {
2833
+ type: Boolean,
2834
+ default: !1
2835
+ },
2836
+ has_cancel: {
2837
+ type: Boolean,
2838
+ default: !0
2839
+ },
2840
+ label_name: {
2841
+ type: String,
2842
+ default: ""
2843
+ },
2844
+ options: {
2845
+ type: Array,
2846
+ required: !0,
2847
+ default: [],
2848
+ note: "Options of dropdown. An array of options with id and name"
2849
+ },
2850
+ placeholder: {
2851
+ type: String,
2852
+ required: !1,
2853
+ default: "Please select an option",
2854
+ note: "Placeholder of dropdown"
2855
+ },
2856
+ maxItem: {
2857
+ type: Number,
2858
+ required: !1,
2859
+ default: 1e4,
2860
+ note: "Max items showing"
2861
+ },
2862
+ show: {
2863
+ type: Boolean,
2864
+ default: !1
2865
+ },
2866
+ error_message: {
2867
+ type: String,
2868
+ default: ""
2869
+ },
2870
+ description: {
2871
+ type: String,
2872
+ default: ""
2873
+ }
2874
+ },
2875
+ emits: ["update:modelValue", "selected"],
2876
+ data() {
2877
+ return {
2878
+ selected: {},
2879
+ count: 0,
2880
+ optionsShown: !1,
2881
+ // options_values: [],
2882
+ searchFilter: "",
2883
+ uuid: ""
2884
+ };
2885
+ },
2886
+ created() {
2887
+ this.$emit("selected", this.selected);
2888
+ },
2889
+ mounted() {
2890
+ this.uuid = this.generateUUID(), self = this;
2891
+ var e = this.convertedOptionDefault();
2892
+ this.selected = this.options_values.find(
2893
+ (t) => String(t.id) === String(e)
2894
+ ) || {}, this.show || (document.body.addEventListener("click", function(t) {
2895
+ self.clearData(t);
2896
+ }), document.addEventListener("keypress", function(t) {
2897
+ t.key === "Enter" && t.target.form && t.preventDefault();
2898
+ }));
2899
+ },
2900
+ computed: {
2901
+ options_values() {
2902
+ return this.convertedOptions();
2903
+ },
2904
+ filteredOptions() {
2905
+ const e = [], t = new RegExp(this.searchFilter, "ig");
2906
+ for (const r of this.options_values) {
2907
+ const n = String(r.name);
2908
+ (this.searchFilter.length < 1 || n.match(t)) && e.length < this.maxItem && e.push(r);
2909
+ }
2910
+ return e;
2911
+ }
2912
+ },
2913
+ methods: {
2914
+ handleKeyDown(e) {
2915
+ if ([
2916
+ "ArrowLeft",
2917
+ "ArrowUp",
2918
+ "ArrowRight",
2919
+ "ArrowDown",
2920
+ "Enter"
2921
+ ].includes(e.key)) {
2922
+ if (["ArrowUp", "ArrowDown"].includes(e.key) && e.preventDefault(), e.key === "ArrowDown" && this.posts === "")
2923
+ return;
2924
+ this.selectPost(e.key);
2925
+ }
2926
+ },
2927
+ generateUUID() {
2928
+ let e = (/* @__PURE__ */ new Date()).getTime();
2929
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
2930
+ /[xy]/g,
2931
+ function(r) {
2932
+ const n = (e + Math.random() * 16) % 16 | 0;
2933
+ return e = Math.floor(e / 16), (r === "x" ? n : n & 3 | 8).toString(16);
2934
+ }
2935
+ );
2936
+ },
2937
+ isObjectNotEmpty(e) {
2938
+ return Object.keys(e).length > 0;
2939
+ },
2940
+ clearData: function(e) {
2941
+ e.target.id != this.field_name + "search" + this.uuid && e.target.id != this.field_name && !e.target.classList.contains("showOptions") && (this.exit(), this.count = 0);
2942
+ },
2943
+ scrollToElement: function(e) {
2944
+ const t = `${e}${this.uuid}`, r = document.getElementById(t);
2945
+ r && r.scrollIntoView();
2946
+ },
2947
+ clickElement: function(e) {
2948
+ const t = `${e}${this.uuid}`, r = document.getElementById(t);
2949
+ r && r.click();
2950
+ },
2951
+ selectPost: function(e) {
2952
+ e === "ArrowDown" && this.count < this.filteredOptions.length && (this.count++, this.scrollToElement(this.count)), e === "ArrowUp" && this.count > 1 && (this.count--, this.scrollToElement(this.count)), e === "Enter" && this.clickElement(this.count);
2953
+ },
2954
+ convertedOptions() {
2955
+ return this.options.map((e, t) => typeof e == "object" ? e : { id: e, name: e });
2956
+ },
2957
+ convertedOptionDefault() {
2958
+ var e = this.default_value || this.modelValue;
2959
+ return e ? typeof e == "object" ? e.id + "" : e + "" : "";
2960
+ },
2961
+ updateModelValue(e) {
2962
+ this.$emit("update:modelValue", e.target.value);
2963
+ },
2964
+ selectOption(e) {
2965
+ this.selected = e, this.optionsShown = !1, this.$emit("selected", this.selected);
2966
+ },
2967
+ showOptions() {
2968
+ this.show || (this.searchFilter = "", this.optionsShown = !0, this.$nextTick(() => {
2969
+ this.$refs[this.field_name + "search" + this.uuid].focus();
2970
+ }));
2971
+ },
2972
+ ClearInput() {
2973
+ this.show || (this.selected = {}, this.searchFilter = "", this.$emit("update:modelValue", ""), this.showOptions());
2974
+ },
2975
+ exit() {
2976
+ this.selected.id || (this.selected = {}, this.searchFilter = ""), this.$emit("selected", this.selected), this.optionsShown = !1;
2977
+ }
2978
+ // Selecting when pressing Enter
2979
+ },
2980
+ watch: {
2981
+ searchFilter() {
2982
+ this.filteredOptions.length === 0 && (this.selected = {});
2983
+ },
2984
+ selected(e) {
2985
+ this.isObjectNotEmpty(e) && this.$emit("update:modelValue", e.id);
2986
+ }
2987
+ // options(newOptions) {
2988
+ /*
2989
+ this.options_values = this.convertedOptions();
2990
+
2991
+ var default_value = this.convertedOptionDefault();
2992
+ console.log("default_value_options : ", default_value);
2993
+
2994
+ this.selected =
2995
+ this.options_values.find(
2996
+ (item) => String(item.id) === String(default_value)
2997
+ ) || {};
2998
+
2999
+ */
3000
+ // },
3001
+ }
3002
+ }, lo = { class: "font-bold ptext-lg dark:text-white" }, uo = { class: "mt-3 mb-4" }, co = { class: "bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300" }, fo = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), ho = ["name", "id", "value"], go = {
3003
+ key: 0,
3004
+ class: "dropdown"
3005
+ }, mo = { class: "border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, _o = { class: "relative showOptions" }, po = ["value", "placeholder"], bo = { class: "text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999]" }, yo = { class: "p-1" }, vo = /* @__PURE__ */ s("label", {
3006
+ for: "default-search",
3007
+ class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
3008
+ }, "Search", -1), xo = { class: "relative" }, wo = /* @__PURE__ */ s("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, [
3009
+ /* @__PURE__ */ s("svg", {
3010
+ class: "w-4 h-4 text-gray-500 dark:text-gray-400",
3011
+ "aria-hidden": "true",
3012
+ xmlns: "http://www.w3.org/2000/svg",
3013
+ fill: "none",
3014
+ viewBox: "0 0 20 20"
3015
+ }, [
3016
+ /* @__PURE__ */ s("path", {
3017
+ stroke: "currentColor",
3018
+ "stroke-linecap": "round",
3019
+ "stroke-linejoin": "round",
3020
+ "stroke-width": "2",
3021
+ d: "m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
3022
+ })
3023
+ ])
3024
+ ], -1), ko = ["id"], $o = { class: "overflow-y-auto max-h-64" }, So = ["onClick", "onMousedown", "id"], Co = { class: "flex items-center py-2 pl-10 pr-4" }, Oo = {
3025
+ key: 0,
3026
+ class: "absolute flex items-center flex-shrink-0 w-4 h-4 text-green-500 left-2 dark:text-green-400",
3027
+ "aria-hidden": "true",
3028
+ xmlns: "http://www.w3.org/2000/svg",
3029
+ fill: "none",
3030
+ viewBox: "0 0 16 12"
3031
+ }, Do = /* @__PURE__ */ s("path", {
3032
+ stroke: "currentColor",
3033
+ "stroke-linecap": "round",
3034
+ "stroke-linejoin": "round",
3035
+ "stroke-width": "2",
3036
+ d: "M1 5.917 5.724 10.5 15 1.5"
3037
+ }, null, -1), Po = [
3038
+ Do
3039
+ ], Eo = { class: "block mt-1 text-sm font-normal leading-5 text-red-500" }, jo = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" };
3040
+ function Io(e, t, r, n, a, o) {
3041
+ return d(), u(y, null, [
3042
+ r.show ? (d(), u("div", {
3043
+ key: 0,
3044
+ class: p(r.field_name)
3045
+ }, [
3046
+ s("h3", lo, h(r.label_name), 1),
3047
+ s("p", uo, [
3048
+ s("span", co, h(e.selectedValue.name), 1)
3049
+ ]),
3050
+ fo
3051
+ ], 2)) : g("", !0),
3052
+ r.show ? g("", !0) : (d(), u("div", {
3053
+ key: 1,
3054
+ class: p(["mb-4", r.field_name])
3055
+ }, [
3056
+ s("input", {
3057
+ type: "hidden",
3058
+ name: r.field_name,
3059
+ id: r.field_name,
3060
+ value: a.selected.id
3061
+ }, null, 8, ho),
3062
+ r.options ? (d(), u("div", go, [
3063
+ r.label_name ? (d(), u("label", {
3064
+ key: 0,
3065
+ class: p({
3066
+ "gl-label-form": r.error_message == "",
3067
+ "gl-label-form-invalid": r.error_message !== "",
3068
+ required: r.is_required
3069
+ })
3070
+ }, h(r.label_name), 3)) : g("", !0),
3071
+ s("div", mo, [
3072
+ s("div", _o, [
3073
+ s("input", {
3074
+ class: "!border-0 gl-input-form pl-8 pr-2 showOptions",
3075
+ ref: r.field_name,
3076
+ onClick: t[0] || (t[0] = (l) => o.showOptions()),
3077
+ value: a.selected.name,
3078
+ placeholder: r.placeholder,
3079
+ autocomplete: "off",
3080
+ readonly: ""
3081
+ }, null, 8, po),
3082
+ S(s("i", {
3083
+ onClick: t[1] || (t[1] = I((l) => o.ClearInput(), ["stop"])),
3084
+ class: "absolute text-gray-500 cursor-pointer fas fa-times right-7 hover:text-gray-700",
3085
+ style: { top: "13px" }
3086
+ }, null, 512), [
3087
+ [T, o.isObjectNotEmpty(a.selected) && r.has_cancel]
3088
+ ]),
3089
+ s("i", {
3090
+ onClick: t[2] || (t[2] = (l) => !a.optionsShown && o.showOptions()),
3091
+ class: p([a.optionsShown ? "fa-angle-up" : "fa-angle-down", "absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700 showOptions"]),
3092
+ style: { top: "11px" }
3093
+ }, null, 2)
3094
+ ]),
3095
+ S(s("div", bo, [
3096
+ s("div", yo, [
3097
+ vo,
3098
+ s("div", xo, [
3099
+ wo,
3100
+ S(s("input", {
3101
+ type: "search",
3102
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => a.searchFilter = l),
3103
+ ref: `${r.field_name}search${a.uuid}`,
3104
+ id: `${r.field_name}search${a.uuid}`,
3105
+ onKeydown: t[4] || (t[4] = (...l) => o.handleKeyDown && o.handleKeyDown(...l)),
3106
+ onBlur: t[5] || (t[5] = (l) => o.exit()),
3107
+ autocomplete: "off",
3108
+ class: "block w-full p-2 text-sm text-gray-900 border rounded-lg outline-none border-frontend ps-10 bg-gray-50 focus:border-frontend dark:bg-gray-700 dark:border-frontenddark dark:placeholder-frontenddark dark:text-white dark:focus:border-frontenddark",
3109
+ placeholder: "Search ..."
3110
+ }, null, 40, ko), [
3111
+ [A, a.searchFilter]
3112
+ ])
3113
+ ])
3114
+ ]),
3115
+ s("div", $o, [
3116
+ (d(!0), u(y, null, w(o.filteredOptions, (l, i) => (d(), u("div", {
3117
+ class: p([
3118
+ "relative px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
3119
+ i + 1 == a.count ? "bg-gray-100 dark:bg-gray-600" : ""
3120
+ ]),
3121
+ onClick: (c) => o.selectOption(l),
3122
+ onMousedown: (c) => o.selectOption(l),
3123
+ key: i,
3124
+ id: `${i + 1}${a.uuid}`
3125
+ }, [
3126
+ s("div", Co, [
3127
+ a.selected.id === l.id ? (d(), u("svg", Oo, Po)) : g("", !0),
3128
+ s("span", null, h(l.name || l.id || "-"), 1)
3129
+ ])
3130
+ ], 42, So))), 128))
3131
+ ])
3132
+ ], 512), [
3133
+ [T, a.optionsShown]
3134
+ ])
3135
+ ])
3136
+ ])) : g("", !0),
3137
+ s("span", Eo, h(r.error_message), 1),
3138
+ s("small", jo, h(r.description), 1)
3139
+ ], 2))
3140
+ ], 64);
3141
+ }
3142
+ const Tl = /* @__PURE__ */ k(io, [["render", Io]]), Ao = { class: "font-bold ptext-lg dark:text-white" }, To = ["id"], No = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), Mo = ["for"], Vo = ["required", "name", "id", "type", "placeholder"], Lo = { class: "gl-span-form-error" }, Bo = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Nl = {
3143
+ __name: "GlTextarea",
3144
+ props: {
3145
+ is_required: {
3146
+ type: Boolean,
3147
+ default: !1
3148
+ },
3149
+ show: {
3150
+ type: Boolean,
3151
+ default: !1
3152
+ },
3153
+ error_message: {
3154
+ type: String,
3155
+ default: ""
3156
+ },
3157
+ model_value: {
3158
+ type: [String, Number],
3159
+ default: ""
3160
+ },
3161
+ modelValue: {
3162
+ type: [String, Number],
3163
+ default: ""
3164
+ },
3165
+ type: {
3166
+ type: String,
3167
+ default: "text"
3168
+ },
3169
+ field_name: {
3170
+ type: String,
3171
+ default: ""
3172
+ },
3173
+ label_name: {
3174
+ type: String,
3175
+ default: ""
3176
+ },
3177
+ description: {
3178
+ type: String,
3179
+ default: ""
3180
+ },
3181
+ place_holder: {
3182
+ type: String,
3183
+ default: ""
3184
+ }
3185
+ },
3186
+ emits: ["update:modelValue", "keydown"],
3187
+ setup(e, { expose: t, emit: r }) {
3188
+ const n = e, a = r, o = C(null);
3189
+ return G(() => {
3190
+ o.value !== null && o.value.hasAttribute("autofocus") && o.value.focus(), n.model_value && (a("update:modelValue", n.model_value), o.value.value = n.model_value), n.modelValue != "" && (a("update:modelValue", n.modelValue), o.value.value = n.modelValue);
3191
+ }), t({ focus: () => o.value.focus() }), (l, i) => (d(), u(y, null, [
3192
+ e.show ? (d(), u("div", {
3193
+ key: 0,
3194
+ class: p(e.field_name)
3195
+ }, [
3196
+ s("h3", Ao, h(e.label_name), 1),
3197
+ s("p", {
3198
+ id: e.field_name,
3199
+ class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
3200
+ }, h(e.model_value), 9, To),
3201
+ No
3202
+ ], 2)) : g("", !0),
3203
+ e.show ? g("", !0) : (d(), u("div", {
3204
+ key: 1,
3205
+ class: p(["mb-4", e.field_name])
3206
+ }, [
3207
+ s("label", {
3208
+ class: p({
3209
+ "gl-label-form": e.error_message == "",
3210
+ "gl-label-form-invalid": e.error_message !== "",
3211
+ required: e.is_required
3212
+ }),
3213
+ for: e.field_name
3214
+ }, h(e.label_name), 11, Mo),
3215
+ s("textarea", {
3216
+ required: e.is_required,
3217
+ name: e.field_name,
3218
+ id: e.field_name,
3219
+ class: p({
3220
+ " gl-textarea-form mt-4 ": e.error_message == "",
3221
+ " gl-textarea-form-invalid mt-4 ": e.error_message !== ""
3222
+ }),
3223
+ type: e.type,
3224
+ onInput: i[0] || (i[0] = (c) => l.$emit("update:modelValue", c.target.value)),
3225
+ ref_key: "input",
3226
+ ref: o,
3227
+ rows: "4",
3228
+ placeholder: e.place_holder
3229
+ }, null, 42, Vo),
3230
+ s("span", Lo, h(e.error_message), 1),
3231
+ s("small", Bo, h(e.description), 1)
3232
+ ], 2))
3233
+ ], 64));
3234
+ }
3235
+ }, Go = {
3236
+ emits: ["pagination-change-page"],
3237
+ props: {
3238
+ data: {
3239
+ type: Object,
3240
+ default: () => {
3241
+ }
3242
+ },
3243
+ limit: {
3244
+ type: Number,
3245
+ default: 0
3246
+ }
3247
+ },
3248
+ computed: {
3249
+ isApiResource() {
3250
+ return !!this.data.meta;
3251
+ },
3252
+ currentPage() {
3253
+ return this.isApiResource ? this.data.meta.current_page : this.data.current_page;
3254
+ },
3255
+ firstPageUrl() {
3256
+ return this.isApiResource ? this.data.links.first : null;
3257
+ },
3258
+ from() {
3259
+ return this.isApiResource ? this.data.meta.from : this.data.from;
3260
+ },
3261
+ lastPage() {
3262
+ return this.isApiResource ? this.data.meta.last_page : this.data.last_page;
3263
+ },
3264
+ lastPageUrl() {
3265
+ return this.isApiResource ? this.data.links.last : null;
3266
+ },
3267
+ nextPageUrl() {
3268
+ return this.isApiResource ? this.data.links.next : this.data.next_page_url;
3269
+ },
3270
+ perPage() {
3271
+ return this.isApiResource ? this.data.meta.per_page : this.data.per_page;
3272
+ },
3273
+ prevPageUrl() {
3274
+ return this.isApiResource ? this.data.links.prev : this.data.prev_page_url;
3275
+ },
3276
+ to() {
3277
+ return this.isApiResource ? this.data.meta.to : this.data.to;
3278
+ },
3279
+ total() {
3280
+ return this.isApiResource ? this.data.meta.total : this.data.total;
3281
+ },
3282
+ pageRange() {
3283
+ if (this.limit === -1)
3284
+ return 0;
3285
+ if (this.limit === 0)
3286
+ return this.lastPage;
3287
+ for (var e = this.currentPage, t = this.lastPage, r = this.limit, n = e - r, a = e + r + 1, o = [], l = [], i, c = 1; c <= t; c++)
3288
+ (c === 1 || c === t || c >= n && c < a) && o.push(c);
3289
+ return o.forEach(function(f) {
3290
+ i && (f - i === 2 ? l.push(i + 1) : f - i !== 1 && l.push("...")), l.push(f), i = f;
3291
+ }), l;
3292
+ }
3293
+ },
3294
+ methods: {
3295
+ previousPage() {
3296
+ this.selectPage(this.currentPage - 1);
3297
+ },
3298
+ nextPage() {
3299
+ this.selectPage(this.currentPage + 1);
3300
+ },
3301
+ selectPage(e) {
3302
+ e !== "..." && this.$emit("pagination-change-page", e);
3303
+ }
3304
+ },
3305
+ render() {
3306
+ return this.$slots.default({
3307
+ data: this.data,
3308
+ limit: this.limit,
3309
+ computed: {
3310
+ isApiResource: this.isApiResource,
3311
+ currentPage: this.currentPage,
3312
+ firstPageUrl: this.firstPageUrl,
3313
+ from: this.from,
3314
+ lastPage: this.lastPage,
3315
+ lastPageUrl: this.lastPageUrl,
3316
+ nextPageUrl: this.nextPageUrl,
3317
+ perPage: this.perPage,
3318
+ prevPageUrl: this.prevPageUrl,
3319
+ to: this.to,
3320
+ total: this.total,
3321
+ pageRange: this.pageRange
3322
+ },
3323
+ prevButtonEvents: {
3324
+ click: (e) => {
3325
+ e.preventDefault(), this.previousPage();
3326
+ }
3327
+ },
3328
+ nextButtonEvents: {
3329
+ click: (e) => {
3330
+ e.preventDefault(), this.nextPage();
3331
+ }
3332
+ },
3333
+ pageButtonEvents: (e) => ({
3334
+ click: (t) => {
3335
+ t.preventDefault(), this.selectPage(e);
3336
+ }
3337
+ })
3338
+ });
3339
+ }
3340
+ }, Fo = {
3341
+ compatConfig: {
3342
+ MODE: 3
3343
+ },
3344
+ inheritAttrs: !1,
3345
+ emits: ["pagination-change-page"],
3346
+ components: {
3347
+ RenderlessPagination: Go
3348
+ },
3349
+ props: {
3350
+ data: {
3351
+ type: Object,
3352
+ default: () => {
3353
+ }
3354
+ },
3355
+ limit: {
3356
+ type: Number,
3357
+ default: 0
3358
+ },
3359
+ showDisabled: {
3360
+ type: Boolean,
3361
+ default: !1
3362
+ },
3363
+ size: {
3364
+ type: String,
3365
+ default: "default",
3366
+ validator: (e) => ["small", "default", "large"].indexOf(e) !== -1
3367
+ },
3368
+ align: {
3369
+ type: String,
3370
+ default: "left",
3371
+ validator: (e) => ["left", "center", "right"].indexOf(e) !== -1
3372
+ }
3373
+ },
3374
+ methods: {
3375
+ onPaginationChangePage(e) {
3376
+ this.$emit("pagination-change-page", e);
3377
+ }
3378
+ },
3379
+ mounted() {
3380
+ }
3381
+ }, Ro = { class: "flex flex-col items-center" }, Uo = {
3382
+ key: 0,
3383
+ class: "text-sm text-gray-700 dark:text-gray-400"
3384
+ }, qo = { class: "font-semibold text-gray-900 dark:text-white" }, Ho = { class: "font-semibold text-gray-900 dark:text-white" }, zo = { class: "font-semibold text-gray-900 dark:text-white" }, Zo = ["tabindex"], Ko = /* @__PURE__ */ s("span", { class: "sr-only" }, "Previous", -1), Wo = /* @__PURE__ */ s("svg", {
3385
+ class: "w-2.5 h-2.5 rtl:rotate-180",
3386
+ "aria-hidden": "true",
3387
+ xmlns: "http://www.w3.org/2000/svg",
3388
+ fill: "none",
3389
+ viewBox: "0 0 6 10"
3390
+ }, [
3391
+ /* @__PURE__ */ s("path", {
3392
+ stroke: "currentColor",
3393
+ "stroke-linecap": "round",
3394
+ "stroke-linejoin": "round",
3395
+ "stroke-width": "2",
3396
+ d: "M5 1 1 5l4 4"
3397
+ })
3398
+ ], -1), Xo = ["aria-current"], Yo = ["tabindex"], Jo = /* @__PURE__ */ s("span", { class: "sr-only" }, "Next", -1), Qo = /* @__PURE__ */ s("svg", {
3399
+ class: "w-2.5 h-2.5 rtl:rotate-180",
3400
+ "aria-hidden": "true",
3401
+ xmlns: "http://www.w3.org/2000/svg",
3402
+ fill: "none",
3403
+ viewBox: "0 0 6 10"
3404
+ }, [
3405
+ /* @__PURE__ */ s("path", {
3406
+ stroke: "currentColor",
3407
+ "stroke-linecap": "round",
3408
+ "stroke-linejoin": "round",
3409
+ "stroke-width": "2",
3410
+ d: "m1 9 4-4-4-4"
3411
+ })
3412
+ ], -1);
3413
+ function ea(e, t, r, n, a, o) {
3414
+ const l = U("RenderlessPagination");
3415
+ return d(), q(l, {
3416
+ data: r.data,
3417
+ limit: r.limit,
3418
+ onPaginationChangePage: o.onPaginationChangePage
3419
+ }, {
3420
+ default: X((i) => [
3421
+ s("div", Ro, [
3422
+ i.computed.total > i.computed.perPage ? (d(), u("span", Uo, [
3423
+ v(" Showing "),
3424
+ s("span", qo, h(i.computed.from), 1),
3425
+ v(" to "),
3426
+ s("span", Ho, h(i.computed.to), 1),
3427
+ v(" of "),
3428
+ s("span", zo, h(i.computed.total), 1),
3429
+ v(" Entries ")
3430
+ ])) : g("", !0),
3431
+ i.computed.total > i.computed.perPage ? (d(), u("ul", R({ key: 1 }, e.$attrs, {
3432
+ class: ["flex items-center h-8 -space-x-px text-sm", {
3433
+ "pagination-sm": r.size == "small",
3434
+ "pagination-lg": r.size == "large",
3435
+ "justify-content-center": r.align == "center",
3436
+ "justify-content-end": r.align == "right"
3437
+ }]
3438
+ }), [
3439
+ i.computed.prevPageUrl || r.showDisabled ? (d(), u("li", {
3440
+ key: 0,
3441
+ class: p(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white", { disabled: !i.computed.prevPageUrl }])
3442
+ }, [
3443
+ s("a", R({
3444
+ class: "page-link",
3445
+ href: "#",
3446
+ "aria-label": "Previous",
3447
+ tabindex: !i.computed.prevPageUrl && -1
3448
+ }, Z(i.prevButtonEvents, !0)), [
3449
+ j(e.$slots, "prev-nav", {}, () => [
3450
+ Ko,
3451
+ Wo
3452
+ ])
3453
+ ], 16, Zo)
3454
+ ], 2)) : g("", !0),
3455
+ (d(!0), u(y, null, w(i.computed.pageRange, (c, f) => (d(), u("li", {
3456
+ class: p(["", { active: c == i.computed.currentPage }]),
3457
+ key: f
3458
+ }, [
3459
+ s("a", R({
3460
+ class: "",
3461
+ href: "#"
3462
+ }, Z(i.pageButtonEvents(c), !0), {
3463
+ "aria-current": c == i.computed.currentPage ? "page" : null,
3464
+ class: c == i.computed.currentPage ? "z-10 flex items-center justify-center px-3 h-8 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white" : "flex items-center justify-center px-3 h-8 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
3465
+ }), h(c), 17, Xo)
3466
+ ], 2))), 128)),
3467
+ i.computed.nextPageUrl || r.showDisabled ? (d(), u("li", {
3468
+ key: 1,
3469
+ class: p(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white", { disabled: !i.computed.nextPageUrl }])
3470
+ }, [
3471
+ s("a", R({
3472
+ class: "",
3473
+ href: "#",
3474
+ "aria-label": "Next",
3475
+ tabindex: !i.computed.nextPageUrl && -1
3476
+ }, Z(i.nextButtonEvents, !0)), [
3477
+ j(e.$slots, "next-nav", {}, () => [
3478
+ Jo,
3479
+ Qo
3480
+ ])
3481
+ ], 16, Yo)
3482
+ ], 2)) : g("", !0)
3483
+ ], 16)) : g("", !0)
3484
+ ])
3485
+ ]),
3486
+ _: 3
3487
+ }, 8, ["data", "limit", "onPaginationChangePage"]);
3488
+ }
3489
+ const ta = /* @__PURE__ */ k(Fo, [["render", ea]]), ra = {
3490
+ components: { TailwindPagination: ta },
3491
+ props: {
3492
+ data: Array,
3493
+ columns: Array,
3494
+ get_item_url: String,
3495
+ xprops: Object,
3496
+ refreshData: Boolean
3497
+ },
3498
+ data() {
3499
+ return {
3500
+ isMounted: !1,
3501
+ limit: 5,
3502
+ showDisabled: !1,
3503
+ size: "default",
3504
+ align: "left",
3505
+ search: "",
3506
+ isDropdownOpen: !1,
3507
+ itemLists: [],
3508
+ tableData: [],
3509
+ sortField: this.columns[0].field_name,
3510
+ sortOrder: "asc",
3511
+ pageOptions: [5, 10, 20, 50],
3512
+ perPage: 5,
3513
+ page: 1
3514
+ };
3515
+ },
3516
+ computed: {
3517
+ filteredData() {
3518
+ const e = this.search.toLowerCase();
3519
+ return this.sortData(this.data).filter((r) => Object.values(r).some(
3520
+ (n) => n.toString().toLowerCase().includes(e)
3521
+ ));
3522
+ }
3523
+ },
3524
+ methods: {
3525
+ forDynCompIs(e) {
3526
+ return typeof e == "object" ? e : null;
3527
+ },
3528
+ GetItemLists(e = 1) {
3529
+ this.page = e;
3530
+ const t = {
3531
+ sort: this.sortField,
3532
+ order: this.sortOrder,
3533
+ s: this.search,
3534
+ limit: this.perPage,
3535
+ page: this.page
3536
+ };
3537
+ axios.get(this.xprops.route_get_data, { params: t }).then((r) => {
3538
+ this.itemLists = r.data;
3539
+ }).catch((r) => {
3540
+ console.error(r);
3541
+ });
3542
+ },
3543
+ updateSortColumn(e, t) {
3544
+ t && (e === this.sortField ? this.sortOrder = this.sortOrder === "asc" ? "desc" : "asc" : (this.sortField = e, this.sortOrder = "asc"), this.GetItemLists(this.page));
3545
+ },
3546
+ handleSearch() {
3547
+ this.sortField = this.columns[0].field_name, this.sortOrder = "asc", this.page = 1, this.GetItemLists(this.page);
3548
+ }
3549
+ },
3550
+ beforeDestroy() {
3551
+ },
3552
+ mounted() {
3553
+ this.GetItemLists(), this.isMounted = !0;
3554
+ },
3555
+ watch: {
3556
+ searchFilter() {
3557
+ this.filteredOptions.length === 0 ? this.selected = {} : this.selected = this.filteredOptions[0];
3558
+ },
3559
+ perPage(e) {
3560
+ this.page = 1, this.perPage = e, this.GetItemLists(this.page);
3561
+ },
3562
+ refreshData(e, t) {
3563
+ this.isMounted && e !== t && this.GetItemLists();
3564
+ }
3565
+ }
3566
+ }, sa = { class: "p-2" }, na = { class: "flex flex-col flex-wrap pb-4 space-y-4 xl:flex-row xl:items-center xl:justify-between flex-column sm:space-y-0" }, oa = { class: "flex items-center gap-2" }, aa = /* @__PURE__ */ s("span", { class: "font-medium" }, " Show ", -1), ia = { style: { "margin-top": "9px" } }, la = /* @__PURE__ */ s("span", { class: "font-medium" }, " Entries ", -1), da = /* @__PURE__ */ s("label", {
3567
+ for: "table-search",
3568
+ class: "sr-only"
3569
+ }, "Search", -1), ua = { class: "relative" }, ca = /* @__PURE__ */ s("div", { class: "absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3" }, [
3570
+ /* @__PURE__ */ s("svg", {
3571
+ class: "w-5 h-5 text-gray-500 dark:text-gray-400",
3572
+ "aria-hidden": "true",
3573
+ fill: "currentColor",
3574
+ viewBox: "0 0 20 20",
3575
+ xmlns: "http://www.w3.org/2000/svg"
3576
+ }, [
3577
+ /* @__PURE__ */ s("path", {
3578
+ "fill-rule": "evenodd",
3579
+ d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",
3580
+ "clip-rule": "evenodd"
3581
+ })
3582
+ ])
3583
+ ], -1), fa = { class: "overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800" }, ha = { class: "w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark" }, ga = { class: "hidden text-sm font-normal text-center text-gray-700 uppercase lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400" }, ma = ["onClick"], _a = {
3584
+ key: 0,
3585
+ class: "ml-2"
3586
+ }, pa = {
3587
+ key: 0,
3588
+ class: "fa fa-arrow-up"
3589
+ }, ba = {
3590
+ key: 1,
3591
+ class: "fa fa-arrow-down"
3592
+ }, ya = ["data-label"], va = { class: "overflow-auto max-h-40" }, xa = { class: "flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800" };
3593
+ function wa(e, t, r, n, a, o) {
3594
+ const l = U("dropdown"), i = U("TailwindPagination");
3595
+ return d(), u("div", sa, [
3596
+ s("div", na, [
3597
+ s("div", oa, [
3598
+ aa,
3599
+ s("div", ia, [
3600
+ B(l, {
3601
+ has_cancel: !1,
3602
+ options: a.pageOptions,
3603
+ modelValue: a.perPage,
3604
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => a.perPage = c),
3605
+ is_required: !1,
3606
+ field_name: "perPage",
3607
+ label_name: "",
3608
+ default_value: 5,
3609
+ show: !1,
3610
+ placeholder: "Please select an option"
3611
+ }, null, 8, ["options", "modelValue"])
3612
+ ]),
3613
+ la
3614
+ ]),
3615
+ da,
3616
+ s("div", ua, [
3617
+ ca,
3618
+ S(s("input", {
3619
+ type: "text",
3620
+ "onUpdate:modelValue": t[1] || (t[1] = (c) => a.search = c),
3621
+ onInput: t[2] || (t[2] = (c) => o.handleSearch()),
3622
+ class: "block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
3623
+ placeholder: "Search ..."
3624
+ }, null, 544), [
3625
+ [A, a.search]
3626
+ ])
3627
+ ])
3628
+ ]),
3629
+ s("div", fa, [
3630
+ s("table", ha, [
3631
+ s("thead", ga, [
3632
+ s("tr", null, [
3633
+ (d(!0), u(y, null, w(r.columns, (c, f) => (d(), u("th", {
3634
+ key: f,
3635
+ onClick: (m) => o.updateSortColumn(c.field_name, c.sortable),
3636
+ class: "w-full px-4 py-2 lg:w-2/12"
3637
+ }, [
3638
+ v(h(c.field_label) + " ", 1),
3639
+ a.sortField === c.field_name ? (d(), u("span", _a, [
3640
+ a.sortOrder === "asc" ? (d(), u("i", pa)) : (d(), u("i", ba))
3641
+ ])) : g("", !0)
3642
+ ], 8, ma))), 128))
3643
+ ])
3644
+ ]),
3645
+ s("tbody", null, [
3646
+ (d(!0), u(y, null, w(a.itemLists.data, (c, f) => (d(), u("tr", {
3647
+ key: f,
3648
+ class: "bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"
3649
+ }, [
3650
+ (d(!0), u(y, null, w(r.columns, (m, b) => (d(), u("td", {
3651
+ key: b,
3652
+ "data-label": m.field_label,
3653
+ class: "text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"
3654
+ }, [
3655
+ s("div", va, [
3656
+ m.tdComp ? (d(), q(W(o.forDynCompIs(m.tdComp)), {
3657
+ key: 0,
3658
+ row: c,
3659
+ field: m.field_name,
3660
+ xprops: r.xprops,
3661
+ tdProps: m.tdProps,
3662
+ onDeleteAction: t[3] || (t[3] = (x) => o.GetItemLists())
3663
+ }, null, 40, ["row", "field", "xprops", "tdProps"])) : (d(), u(y, { key: 1 }, [
3664
+ v(h(c[m.field_name]), 1)
3665
+ ], 64))
3666
+ ])
3667
+ ], 8, ya))), 128))
3668
+ ]))), 128))
3669
+ ])
3670
+ ])
3671
+ ]),
3672
+ s("div", xa, [
3673
+ B(i, {
3674
+ class: "mt-3 mb-0",
3675
+ data: a.itemLists,
3676
+ limit: a.limit,
3677
+ size: a.size,
3678
+ align: a.align,
3679
+ onPaginationChangePage: o.GetItemLists
3680
+ }, null, 8, ["data", "limit", "size", "align", "onPaginationChangePage"])
3681
+ ])
3682
+ ]);
3683
+ }
3684
+ const Ml = /* @__PURE__ */ k(ra, [["render", wa]]), ka = {
3685
+ components: {},
3686
+ props: {
3687
+ data: Array,
3688
+ columns: Array
3689
+ },
3690
+ data() {
3691
+ return {
3692
+ showNoOfEntries: [1, 2, 3, 10, 20, 30, 40],
3693
+ search: "",
3694
+ isDropdownOpen: !1,
3695
+ sortKey: "",
3696
+ sortOrder: 1,
3697
+ currentPage: 1,
3698
+ itemsPerPage: 10,
3699
+ jumpToPage: "",
3700
+ maxDisplayedPages: 10
3701
+ // Set the maximum number of displayed pagination buttons
3702
+ };
3703
+ },
3704
+ computed: {
3705
+ filteredData() {
3706
+ const e = this.search.toLowerCase();
3707
+ return this.sortData(this.data).filter((r) => Object.values(r).some(
3708
+ (n) => n != null && n.toString().toLowerCase().includes(e)
3709
+ ));
3710
+ },
3711
+ totalPages() {
3712
+ return Math.ceil(this.filteredData.length / this.itemsPerPage);
3713
+ },
3714
+ paginatedData() {
3715
+ const e = (this.currentPage - 1) * this.itemsPerPage, t = e + this.itemsPerPage;
3716
+ return this.filteredData.slice(e, t);
3717
+ },
3718
+ displayedPageNumbers() {
3719
+ let e = Math.max(
3720
+ this.currentPage - Math.floor(this.maxDisplayedPages / 2),
3721
+ 1
3722
+ ), t = e + this.maxDisplayedPages - 1;
3723
+ return t > this.totalPages && (t = this.totalPages, e = Math.max(t - this.maxDisplayedPages + 1, 1)), Array.from(
3724
+ { length: t - e + 1 },
3725
+ (r, n) => e + n
3726
+ );
3727
+ },
3728
+ firstItemIndex() {
3729
+ return this.itemsPerPage * (this.currentPage - 1) + 1;
3730
+ },
3731
+ lastItemIndex() {
3732
+ const e = this.itemsPerPage * this.currentPage;
3733
+ return e > this.filteredData.length ? this.filteredData.length : e;
3734
+ }
3735
+ },
3736
+ methods: {
3737
+ handleItemsPerPageChange(e) {
3738
+ this.itemsPerPage = e;
3739
+ },
3740
+ goToPage(e) {
3741
+ e >= 1 && e <= this.totalPages && (this.currentPage = e);
3742
+ },
3743
+ sort(e) {
3744
+ e === this.sortKey ? this.sortOrder *= -1 : (this.sortKey = e, this.sortOrder = 1);
3745
+ },
3746
+ sortData(e) {
3747
+ return this.sortKey ? e.slice().sort((t, r) => (t[this.sortKey] < r[this.sortKey] ? -1 : 1) * this.sortOrder) : e;
3748
+ },
3749
+ previousPage() {
3750
+ this.currentPage > 1 && this.currentPage--;
3751
+ },
3752
+ nextPage() {
3753
+ this.currentPage < this.totalPages && this.currentPage++;
3754
+ },
3755
+ firstPage() {
3756
+ this.currentPage = 1;
3757
+ },
3758
+ lastPage() {
3759
+ this.currentPage = this.totalPages;
3760
+ },
3761
+ goToPage(e) {
3762
+ e >= 1 && e <= this.totalPages && (this.currentPage = e);
3763
+ },
3764
+ onJumpToPageChange() {
3765
+ const e = parseInt(this.jumpToPage);
3766
+ e >= 1 && e <= this.totalPages && (this.jumpToPage = e);
3767
+ },
3768
+ jumpToPageButton() {
3769
+ this.jumpToPage >= 1 && this.jumpToPage <= this.totalPages && (this.currentPage = this.jumpToPage);
3770
+ },
3771
+ closeBoxOnbodyClick() {
3772
+ event.target.closest(".main_box_close") || (this.isDropdownOpen = !1);
3773
+ }
3774
+ },
3775
+ beforeDestroy() {
3776
+ document.body.removeEventListener("click", this.closeBoxOnbodyClick);
3777
+ },
3778
+ mounted() {
3779
+ document.body.addEventListener("click", this.closeBoxOnbodyClick);
3780
+ }
3781
+ }, $a = { class: "p-2" }, Sa = { class: "flex flex-wrap pb-4 space-y-4 md:items-center md:justify-between flex-column sm:flex-row sm:space-y-0" }, Ca = { class: "flex items-center gap-2" }, Oa = /* @__PURE__ */ s("span", { class: "font-medium" }, " Show ", -1), Da = { style: { "margin-top": "9px" } }, Pa = /* @__PURE__ */ s("span", { class: "font-medium" }, " Entries ", -1), Ea = /* @__PURE__ */ s("label", {
3782
+ for: "table-search",
3783
+ class: "sr-only"
3784
+ }, "Search", -1), ja = { class: "relative" }, Ia = /* @__PURE__ */ s("div", { class: "absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3" }, [
3785
+ /* @__PURE__ */ s("svg", {
3786
+ class: "w-5 h-5 text-gray-500 dark:text-gray-400",
3787
+ "aria-hidden": "true",
3788
+ fill: "currentColor",
3789
+ viewBox: "0 0 20 20",
3790
+ xmlns: "http://www.w3.org/2000/svg"
3791
+ }, [
3792
+ /* @__PURE__ */ s("path", {
3793
+ "fill-rule": "evenodd",
3794
+ d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",
3795
+ "clip-rule": "evenodd"
3796
+ })
3797
+ ])
3798
+ ], -1), Aa = { class: "overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800" }, Ta = { class: "w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark" }, Na = { class: "hidden text-sm font-normal text-center text-gray-700 uppercase lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400" }, Ma = ["onClick"], Va = {
3799
+ key: 0,
3800
+ class: "ml-2"
3801
+ }, La = ["data-label"], Ba = ["innerHTML"], Ga = { class: "flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800" }, Fa = { class: "flex justify-between flex-1 sm:hidden" }, Ra = ["disabled"], Ua = ["disabled"], qa = { class: "hidden sm:flex sm:flex-1 sm:items-center sm:justify-between" }, Ha = { class: "text-sm text-gray-700 dark:text-gray-400" }, za = { class: "font-medium" }, Za = { class: "font-medium" }, Ka = { class: "font-medium" }, Wa = { "aria-label": "Page navigation" }, Xa = { class: "flex items-center h-8 -space-x-px text-sm" }, Ya = ["disabled"], Ja = /* @__PURE__ */ s("span", { class: "sr-only" }, "Previous", -1), Qa = /* @__PURE__ */ s("svg", {
3802
+ class: "w-2.5 h-2.5 rtl:rotate-180",
3803
+ "aria-hidden": "true",
3804
+ xmlns: "http://www.w3.org/2000/svg",
3805
+ fill: "none",
3806
+ viewBox: "0 0 6 10"
3807
+ }, [
3808
+ /* @__PURE__ */ s("path", {
3809
+ stroke: "currentColor",
3810
+ "stroke-linecap": "round",
3811
+ "stroke-linejoin": "round",
3812
+ "stroke-width": "2",
3813
+ d: "M5 1 1 5l4 4"
3814
+ })
3815
+ ], -1), ei = [
3816
+ Ja,
3817
+ Qa
3818
+ ], ti = ["onClick"], ri = ["onClick"], si = ["disabled"], ni = /* @__PURE__ */ s("span", { class: "sr-only" }, "Next", -1), oi = /* @__PURE__ */ s("svg", {
3819
+ class: "w-2.5 h-2.5 rtl:rotate-180",
3820
+ "aria-hidden": "true",
3821
+ xmlns: "http://www.w3.org/2000/svg",
3822
+ fill: "none",
3823
+ viewBox: "0 0 6 10"
3824
+ }, [
3825
+ /* @__PURE__ */ s("path", {
3826
+ stroke: "currentColor",
3827
+ "stroke-linecap": "round",
3828
+ "stroke-linejoin": "round",
3829
+ "stroke-width": "2",
3830
+ d: "m1 9 4-4-4-4"
3831
+ })
3832
+ ], -1), ai = [
3833
+ ni,
3834
+ oi
3835
+ ];
3836
+ function ii(e, t, r, n, a, o) {
3837
+ const l = U("dropdown");
3838
+ return d(), u("div", $a, [
3839
+ s("div", Sa, [
3840
+ s("div", Ca, [
3841
+ Oa,
3842
+ s("div", Da, [
3843
+ B(l, {
3844
+ has_cancel: !1,
3845
+ options: a.showNoOfEntries,
3846
+ modelValue: a.itemsPerPage,
3847
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => a.itemsPerPage = i),
3848
+ is_required: !1,
3849
+ field_name: "NoOfEntries",
3850
+ label_name: "",
3851
+ default_value: "10",
3852
+ show: !1,
3853
+ placeholder: "Please select an option"
3854
+ }, null, 8, ["options", "modelValue"])
3855
+ ]),
3856
+ Pa
3857
+ ]),
3858
+ Ea,
3859
+ s("div", ja, [
3860
+ Ia,
3861
+ S(s("input", {
3862
+ type: "text",
3863
+ "onUpdate:modelValue": t[1] || (t[1] = (i) => a.search = i),
3864
+ class: "block p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
3865
+ placeholder: "Search ..."
3866
+ }, null, 512), [
3867
+ [A, a.search]
3868
+ ])
3869
+ ])
3870
+ ]),
3871
+ s("div", Aa, [
3872
+ s("table", Ta, [
3873
+ s("thead", Na, [
3874
+ s("tr", null, [
3875
+ (d(!0), u(y, null, w(r.columns, (i, c) => (d(), u("th", {
3876
+ key: c,
3877
+ onClick: (f) => o.sort(i),
3878
+ class: "w-full px-4 py-2 lg:w-2/12"
3879
+ }, [
3880
+ v(h(i) + " ", 1),
3881
+ a.sortKey === i ? (d(), u("span", Va, h(a.sortOrder === 1 ? "▲" : "▼"), 1)) : g("", !0)
3882
+ ], 8, Ma))), 128))
3883
+ ])
3884
+ ]),
3885
+ s("tbody", null, [
3886
+ (d(!0), u(y, null, w(o.paginatedData, (i, c) => (d(), u("tr", {
3887
+ key: c,
3888
+ class: "bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"
3889
+ }, [
3890
+ (d(!0), u(y, null, w(r.columns, (f, m) => (d(), u("td", {
3891
+ key: m,
3892
+ "data-label": f,
3893
+ class: "text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"
3894
+ }, [
3895
+ s("p", {
3896
+ class: "text-pretty",
3897
+ innerHTML: i[m]
3898
+ }, null, 8, Ba)
3899
+ ], 8, La))), 128))
3900
+ ]))), 128))
3901
+ ])
3902
+ ])
3903
+ ]),
3904
+ s("div", Ga, [
3905
+ s("div", Fa, [
3906
+ s("a", {
3907
+ href: "#",
3908
+ onClick: t[2] || (t[2] = (...i) => o.previousPage && o.previousPage(...i)),
3909
+ disabled: a.currentPage === 1,
3910
+ class: "relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
3911
+ }, "Previous", 8, Ra),
3912
+ s("a", {
3913
+ href: "#",
3914
+ onClick: t[3] || (t[3] = (...i) => o.nextPage && o.nextPage(...i)),
3915
+ disabled: a.currentPage === o.totalPages,
3916
+ class: "relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
3917
+ }, "Next", 8, Ua)
3918
+ ]),
3919
+ s("div", qa, [
3920
+ s("div", null, [
3921
+ s("p", Ha, [
3922
+ v(" Showing "),
3923
+ s("span", za, h(o.firstItemIndex), 1),
3924
+ v(" to "),
3925
+ s("span", Za, h(o.lastItemIndex), 1),
3926
+ v(" of "),
3927
+ s("span", Ka, h(o.filteredData.length), 1),
3928
+ v(" entries ")
3929
+ ])
3930
+ ]),
3931
+ s("div", null, [
3932
+ s("nav", Wa, [
3933
+ s("ul", Xa, [
3934
+ s("li", null, [
3935
+ s("a", {
3936
+ href: "#",
3937
+ onClick: t[4] || (t[4] = (...i) => o.previousPage && o.previousPage(...i)),
3938
+ disabled: a.currentPage === 1,
3939
+ class: "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
3940
+ }, ei, 8, Ya)
3941
+ ]),
3942
+ (d(!0), u(y, null, w(o.displayedPageNumbers, (i) => (d(), u(y, { key: i }, [
3943
+ s("li", null, [
3944
+ a.currentPage !== i ? (d(), u("a", {
3945
+ key: 0,
3946
+ href: "#",
3947
+ onClick: (c) => o.goToPage(i),
3948
+ class: "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
3949
+ }, h(i), 9, ti)) : g("", !0)
3950
+ ]),
3951
+ s("li", null, [
3952
+ a.currentPage === i ? (d(), u("a", {
3953
+ key: 0,
3954
+ href: "#",
3955
+ onClick: (c) => o.goToPage(i),
3956
+ "aria-current": "page",
3957
+ class: "z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"
3958
+ }, h(i), 9, ri)) : g("", !0)
3959
+ ])
3960
+ ], 64))), 128)),
3961
+ s("li", null, [
3962
+ s("a", {
3963
+ href: "#",
3964
+ onClick: t[5] || (t[5] = (...i) => o.nextPage && o.nextPage(...i)),
3965
+ disabled: a.currentPage === o.totalPages,
3966
+ class: "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
3967
+ }, ai, 8, si)
3968
+ ])
3969
+ ])
3970
+ ])
3971
+ ])
3972
+ ])
3973
+ ])
3974
+ ]);
3975
+ }
3976
+ const Vl = /* @__PURE__ */ k(ka, [["render", ii]]), li = {
3977
+ namespaced: !0,
3978
+ state: {
3979
+ notification: {
3980
+ show: !1,
3981
+ message: "",
3982
+ type: "info",
3983
+ duration: 3e3
3984
+ }
3985
+ },
3986
+ mutations: {
3987
+ SHOW_NOTIFICATION(e, t) {
3988
+ e.notification.show = !0, e.notification.message = t.message, e.notification.type = t.type, e.notification.duration = t.duration;
3989
+ },
3990
+ HIDE_NOTIFICATION(e) {
3991
+ e.notification.show = !1;
3992
+ }
3993
+ }
3994
+ }, Ll = pt({
3995
+ modules: {
3996
+ notification: li
3997
+ },
3998
+ state: {}
3999
+ //mutations,
4000
+ //actions,
4001
+ //getters
4002
+ }), di = {
4003
+ key: 0,
4004
+ class: "flex justify-center"
4005
+ }, ui = /* @__PURE__ */ s("svg", {
4006
+ class: "w-5 h-5",
4007
+ "aria-hidden": "true",
4008
+ xmlns: "http://www.w3.org/2000/svg",
4009
+ fill: "currentColor",
4010
+ viewBox: "0 0 4 15"
4011
+ }, [
4012
+ /* @__PURE__ */ s("path", { d: "M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" })
4013
+ ], -1), ci = [
4014
+ ui
4015
+ ], fi = { class: "absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600" }, hi = {
4016
+ class: "py-2 text-sm text-gray-700 dark:text-gray-200",
4017
+ "aria-labelledby": "dropdownDividerButton"
4018
+ }, gi = { key: 0 }, mi = ["href"], _i = /* @__PURE__ */ s("i", { class: "mr-2 fa-solid fa-list-ul opacity-80" }, null, -1), pi = { key: 1 }, bi = /* @__PURE__ */ s("i", { class: "mr-2 fa-solid fa-trash-can opacity-80" }, null, -1), Bl = {
4019
+ __name: "DatatableAction",
4020
+ props: {
4021
+ field: {
4022
+ type: String,
4023
+ default: ""
4024
+ },
4025
+ route_url: {
4026
+ type: String,
4027
+ default: ""
4028
+ },
4029
+ row: {
4030
+ type: [Array, Object],
4031
+ default: []
4032
+ },
4033
+ xprops: {
4034
+ type: Object,
4035
+ default: {}
4036
+ },
4037
+ tdProps: {
4038
+ type: Object,
4039
+ default: {}
4040
+ }
4041
+ },
4042
+ emits: ["deleteAction"],
4043
+ setup(e, { emit: t }) {
4044
+ const r = he(), n = e, a = C(!1), o = C(!1), l = () => {
4045
+ a.value = !1;
4046
+ }, i = () => {
4047
+ a.value = !0;
4048
+ }, c = () => {
4049
+ o.value = !1;
4050
+ }, f = () => {
4051
+ o.value = !0;
4052
+ }, m = t, b = () => {
4053
+ axios.delete(`${n.xprops.route}/${n.row.id}`).then(() => {
4054
+ c(), m("deleteAction"), r.commit("notification/SHOW_NOTIFICATION", {
4055
+ message: "Item deleted successfully.",
4056
+ type: "success",
4057
+ duration: 5e3
4058
+ });
4059
+ }).catch((x) => {
4060
+ console.log(x);
4061
+ });
4062
+ };
4063
+ return (x, $) => {
4064
+ const F = ue("click-outside");
4065
+ return d(), u(y, null, [
4066
+ B(ee, {
4067
+ isOpen: o.value,
4068
+ onConfirmDelete: b,
4069
+ onCancelDelete: c
4070
+ }, null, 8, ["isOpen"]),
4071
+ e.row && x.can(`edit_${e.xprops.permission} || delete_${e.xprops.permission}`) ? S((d(), u("div", di, [
4072
+ s("button", {
4073
+ onClick: i,
4074
+ class: "inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",
4075
+ type: "button"
4076
+ }, ci),
4077
+ S(s("div", fi, [
4078
+ s("ul", hi, [
4079
+ x.can(`edit_${e.xprops.permission}`) ? (d(), u("li", gi, [
4080
+ s("a", {
4081
+ href: e.xprops.route + "/" + e.row.id + "/edit",
4082
+ class: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
4083
+ }, [
4084
+ _i,
4085
+ v(" Edit")
4086
+ ], 8, mi)
4087
+ ])) : g("", !0),
4088
+ x.can(`delete_${e.xprops.permission}`) ? (d(), u("li", pi, [
4089
+ s("a", {
4090
+ href: "#",
4091
+ onClick: I(f, ["prevent"]),
4092
+ class: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
4093
+ }, [
4094
+ bi,
4095
+ v(" Remove")
4096
+ ])
4097
+ ])) : g("", !0)
4098
+ ])
4099
+ ], 512), [
4100
+ [T, a.value]
4101
+ ])
4102
+ ])), [
4103
+ [F, l]
4104
+ ]) : g("", !0)
4105
+ ], 64);
4106
+ };
4107
+ }
4108
+ }, yi = {
4109
+ key: 0,
4110
+ class: "flex justify-center"
4111
+ }, vi = /* @__PURE__ */ s("svg", {
4112
+ class: "w-5 h-5",
4113
+ "aria-hidden": "true",
4114
+ xmlns: "http://www.w3.org/2000/svg",
4115
+ fill: "currentColor",
4116
+ viewBox: "0 0 4 15"
4117
+ }, [
4118
+ /* @__PURE__ */ s("path", { d: "M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" })
4119
+ ], -1), xi = [
4120
+ vi
4121
+ ], wi = { class: "absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600" }, ki = {
4122
+ class: "py-2 text-sm text-gray-700 dark:text-gray-200",
4123
+ "aria-labelledby": "dropdownDividerButton"
4124
+ }, $i = { key: 0 }, Si = /* @__PURE__ */ s("i", { class: "mr-2 fa-solid fa-trash-can opacity-80" }, null, -1), Gl = {
4125
+ __name: "DatatableDeleteAction",
4126
+ props: {
4127
+ field: {
4128
+ type: String,
4129
+ default: ""
4130
+ },
4131
+ route_url: {
4132
+ type: String,
4133
+ default: ""
4134
+ },
4135
+ row: {
4136
+ type: [Array, Object],
4137
+ default: []
4138
+ },
4139
+ xprops: {
4140
+ type: Object,
4141
+ default: {}
4142
+ },
4143
+ tdProps: {
4144
+ type: Object,
4145
+ default: {}
4146
+ }
4147
+ },
4148
+ emits: ["deleteAction"],
4149
+ setup(e, { emit: t }) {
4150
+ const r = he(), n = e, a = C(!1), o = C(!1), l = () => {
4151
+ a.value = !1;
4152
+ }, i = () => {
4153
+ a.value = !0;
4154
+ }, c = () => {
4155
+ o.value = !1;
4156
+ }, f = () => {
4157
+ o.value = !0;
4158
+ }, m = t, b = () => {
4159
+ axios.delete(`${n.xprops.route}/${n.row.id}`).then(() => {
4160
+ c(), m("deleteAction"), r.commit("notification/SHOW_NOTIFICATION", {
4161
+ message: "Item deleted successfully.",
4162
+ type: "success",
4163
+ duration: 5e3
4164
+ });
4165
+ }).catch((x) => {
4166
+ console.log(x);
4167
+ });
4168
+ };
4169
+ return (x, $) => {
4170
+ const F = ue("click-outside");
4171
+ return d(), u(y, null, [
4172
+ B(ee, {
4173
+ isOpen: o.value,
4174
+ onConfirmDelete: b,
4175
+ onCancelDelete: c
4176
+ }, null, 8, ["isOpen"]),
4177
+ e.row && x.can(`delete_${e.xprops.permission}`) ? S((d(), u("div", yi, [
4178
+ s("button", {
4179
+ onClick: i,
4180
+ class: "inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",
4181
+ type: "button"
4182
+ }, xi),
4183
+ S(s("div", wi, [
4184
+ s("ul", ki, [
4185
+ x.can(`delete_${e.xprops.permission}`) ? (d(), u("li", $i, [
4186
+ s("a", {
4187
+ href: "#",
4188
+ onClick: I(f, ["prevent"]),
4189
+ class: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
4190
+ }, [
4191
+ Si,
4192
+ v(" Remove")
4193
+ ])
4194
+ ])) : g("", !0)
4195
+ ])
4196
+ ], 512), [
4197
+ [T, a.value]
4198
+ ])
4199
+ ])), [
4200
+ [F, l]
4201
+ ]) : g("", !0)
4202
+ ], 64);
4203
+ };
4204
+ }
4205
+ }, Ci = {
4206
+ props: ["field", "row"],
4207
+ computed: {
4208
+ isArray() {
4209
+ return Array.isArray(this.row);
4210
+ },
4211
+ isObject() {
4212
+ return typeof this.row == "object";
4213
+ },
4214
+ isString() {
4215
+ return typeof this.row == "string";
4216
+ }
4217
+ },
4218
+ mounted() {
4219
+ console.log("row : ", this.row);
4220
+ }
4221
+ }, Oi = ["href", "title"], Di = /* @__PURE__ */ s("svg", {
4222
+ class: "w-3 h-3 text-white me-2",
4223
+ "aria-hidden": "true",
4224
+ xmlns: "http://www.w3.org/2000/svg",
4225
+ fill: "currentColor",
4226
+ viewBox: "0 0 24 24"
4227
+ }, [
4228
+ /* @__PURE__ */ s("path", {
4229
+ "fill-rule": "evenodd",
4230
+ d: "M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z",
4231
+ "clip-rule": "evenodd"
4232
+ }),
4233
+ /* @__PURE__ */ s("path", {
4234
+ "fill-rule": "evenodd",
4235
+ d: "M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z",
4236
+ "clip-rule": "evenodd"
4237
+ })
4238
+ ], -1), Pi = {
4239
+ key: 1,
4240
+ class: "m-1 d-inline-block"
4241
+ }, Ei = ["href", "title"], ji = /* @__PURE__ */ s("svg", {
4242
+ class: "w-3 h-3 text-white me-2",
4243
+ "aria-hidden": "true",
4244
+ xmlns: "http://www.w3.org/2000/svg",
4245
+ fill: "currentColor",
4246
+ viewBox: "0 0 24 24"
4247
+ }, [
4248
+ /* @__PURE__ */ s("path", {
4249
+ "fill-rule": "evenodd",
4250
+ d: "M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z",
4251
+ "clip-rule": "evenodd"
4252
+ }),
4253
+ /* @__PURE__ */ s("path", {
4254
+ "fill-rule": "evenodd",
4255
+ d: "M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z",
4256
+ "clip-rule": "evenodd"
4257
+ })
4258
+ ], -1);
4259
+ function Ii(e, t, r, n, a, o) {
4260
+ return d(), u("div", null, [
4261
+ o.isArray ? (d(!0), u(y, { key: 0 }, w(r.row, (l, i) => (d(), u("div", {
4262
+ key: i,
4263
+ class: "m-1 d-inline-block"
4264
+ }, [
4265
+ s("a", {
4266
+ href: l,
4267
+ title: l,
4268
+ target: "_blank",
4269
+ class: "inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
4270
+ }, [
4271
+ Di,
4272
+ v(" Download ")
4273
+ ], 8, Oi)
4274
+ ]))), 128)) : o.isString ? (d(), u("div", Pi, [
4275
+ s("a", {
4276
+ href: r.row,
4277
+ title: r.row,
4278
+ target: "_blank",
4279
+ class: "inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
4280
+ }, [
4281
+ ji,
4282
+ v(" Download ")
4283
+ ], 8, Ei)
4284
+ ])) : g("", !0)
4285
+ ]);
4286
+ }
4287
+ const Fl = /* @__PURE__ */ k(Ci, [["render", Ii]]), Ai = {
4288
+ props: ["field", "row"],
4289
+ computed: {
4290
+ isArray() {
4291
+ return Array.isArray(this.row[this.field]);
4292
+ },
4293
+ isObject() {
4294
+ return typeof this.row[this.field] == "object";
4295
+ }
4296
+ }
4297
+ }, Ti = ["href", "title"], Ni = /* @__PURE__ */ s("svg", {
4298
+ class: "w-3 h-3 text-white me-2",
4299
+ "aria-hidden": "true",
4300
+ xmlns: "http://www.w3.org/2000/svg",
4301
+ fill: "currentColor",
4302
+ viewBox: "0 0 24 24"
4303
+ }, [
4304
+ /* @__PURE__ */ s("path", {
4305
+ "fill-rule": "evenodd",
4306
+ d: "M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z",
4307
+ "clip-rule": "evenodd"
4308
+ }),
4309
+ /* @__PURE__ */ s("path", {
4310
+ "fill-rule": "evenodd",
4311
+ d: "M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z",
4312
+ "clip-rule": "evenodd"
4313
+ })
4314
+ ], -1), Mi = {
4315
+ key: 1,
4316
+ class: "m-1 d-inline-block"
4317
+ }, Vi = ["href", "title"], Li = /* @__PURE__ */ s("svg", {
4318
+ class: "w-3 h-3 text-white me-2",
4319
+ "aria-hidden": "true",
4320
+ xmlns: "http://www.w3.org/2000/svg",
4321
+ fill: "currentColor",
4322
+ viewBox: "0 0 24 24"
4323
+ }, [
4324
+ /* @__PURE__ */ s("path", {
4325
+ "fill-rule": "evenodd",
4326
+ d: "M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z",
4327
+ "clip-rule": "evenodd"
4328
+ }),
4329
+ /* @__PURE__ */ s("path", {
4330
+ "fill-rule": "evenodd",
4331
+ d: "M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z",
4332
+ "clip-rule": "evenodd"
4333
+ })
4334
+ ], -1);
4335
+ function Bi(e, t, r, n, a, o) {
4336
+ return d(), u("div", null, [
4337
+ o.isArray ? (d(!0), u(y, { key: 0 }, w(r.row[r.field], (l) => (d(), u("div", {
4338
+ key: l.id,
4339
+ class: "m-1 d-inline-block"
4340
+ }, [
4341
+ s("a", {
4342
+ href: l.url,
4343
+ title: l.name,
4344
+ target: "_blank",
4345
+ class: "inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
4346
+ }, [
4347
+ Ni,
4348
+ v(" Download ")
4349
+ ], 8, Ti)
4350
+ ]))), 128)) : o.isObject ? (d(), u("div", Mi, [
4351
+ s("a", {
4352
+ href: r.row[r.field].url,
4353
+ title: r.row[r.field].name,
4354
+ target: "_blank",
4355
+ class: "inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
4356
+ }, [
4357
+ Li,
4358
+ v(" Download ")
4359
+ ], 8, Vi)
4360
+ ])) : g("", !0)
4361
+ ]);
4362
+ }
4363
+ const Rl = /* @__PURE__ */ k(Ai, [["render", Bi]]), Gi = {
4364
+ props: ["field", "row", "tdProps"]
4365
+ }, Fi = { key: 0 }, Ri = ["innerHTML"];
4366
+ function Ui(e, t, r, n, a, o) {
4367
+ return r.row[r.field] ? (d(), u("div", Fi, [
4368
+ s("div", {
4369
+ class: "w-full",
4370
+ innerHTML: r.row[r.field]
4371
+ }, null, 8, Ri)
4372
+ ])) : g("", !0);
4373
+ }
4374
+ const Ul = /* @__PURE__ */ k(Gi, [["render", Ui]]), qi = {
4375
+ props: ["field", "row", "tdProps"],
4376
+ computed: {
4377
+ entry() {
4378
+ const [e, t] = this.field.split(".");
4379
+ return Me({ key: e, field: t });
4380
+ },
4381
+ isArray() {
4382
+ return Array.isArray(this.row[this.entry.key]);
4383
+ },
4384
+ isObject() {
4385
+ return typeof this.row[this.entry.key] == "object";
4386
+ }
4387
+ }
4388
+ }, Hi = { class: "flex flex-wrap gap-2" }, zi = {
4389
+ key: 1,
4390
+ class: "px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"
4391
+ };
4392
+ function Zi(e, t, r, n, a, o) {
4393
+ return d(), u("div", Hi, [
4394
+ o.isArray ? (d(!0), u(y, { key: 0 }, w(r.row[o.entry.key], (l, i) => (d(), u("span", {
4395
+ key: i,
4396
+ class: "px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"
4397
+ }, h(l[o.entry.field]), 1))), 128)) : o.isObject ? (d(), u("span", zi, h(r.row[o.entry.key][o.entry.field]), 1)) : g("", !0)
4398
+ ]);
4399
+ }
4400
+ const ql = /* @__PURE__ */ k(qi, [["render", Zi]]), Ki = {
4401
+ props: ["field", "row", "tdProps"]
4402
+ }, Wi = { key: 0 }, Xi = { class: "m-1 d-inline-block" }, Yi = ["href", "title"], Ji = ["src", "alt", "title"];
4403
+ function Qi(e, t, r, n, a, o) {
4404
+ return r.row[r.field] ? (d(), u("div", Wi, [
4405
+ s("div", Xi, [
4406
+ s("a", {
4407
+ href: r.row[r.field].url,
4408
+ title: r.row[r.field].name,
4409
+ target: "_blank"
4410
+ }, [
4411
+ s("img", {
4412
+ src: r.row[r.field].thumbnail,
4413
+ alt: r.row[r.field].name,
4414
+ title: r.row[r.field].name
4415
+ }, null, 8, Ji)
4416
+ ], 8, Yi)
4417
+ ])
4418
+ ])) : g("", !0);
4419
+ }
4420
+ const Hl = /* @__PURE__ */ k(Ki, [["render", Qi], ["__scopeId", "data-v-3a28c02c"]]), el = {
4421
+ props: ["field", "row", "tdProps"],
4422
+ computed: {
4423
+ isActive() {
4424
+ return this.row[this.field] === 1;
4425
+ }
4426
+ }
4427
+ }, tl = { class: "flex flex-wrap gap-2" }, rl = {
4428
+ key: 0,
4429
+ class: "inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"
4430
+ }, sl = /* @__PURE__ */ s("span", { class: "w-2 h-2 bg-green-500 rounded-full me-1" }, null, -1), nl = {
4431
+ key: 1,
4432
+ class: "inline-flex items-center bg-red-100 text-red-800 text-xs font-medium px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300"
4433
+ }, ol = /* @__PURE__ */ s("span", { class: "w-2 h-2 bg-red-500 rounded-full me-1" }, null, -1);
4434
+ function al(e, t, r, n, a, o) {
4435
+ return d(), u("div", tl, [
4436
+ o.isActive ? (d(), u("span", rl, [
4437
+ sl,
4438
+ v(" Active ")
4439
+ ])) : o.isActive ? g("", !0) : (d(), u("span", nl, [
4440
+ ol,
4441
+ v(" Inactive ")
4442
+ ]))
4443
+ ]);
4444
+ }
4445
+ const zl = /* @__PURE__ */ k(el, [["render", al]]), il = {
4446
+ props: ["field", "row", "tdProps"],
4447
+ computed: {
4448
+ hasLabelColor(e) {
4449
+ const t = this.tdProps.status_general_labels_color.find((r) => r.label === this.row[this.field]);
4450
+ return t ? t.class : "";
4451
+ }
4452
+ }
4453
+ }, ll = { class: "flex flex-wrap gap-2" }, dl = {
4454
+ key: 0,
4455
+ class: "inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"
4456
+ }, ul = /* @__PURE__ */ s("span", { class: "w-2 h-2 bg-green-500 rounded-full me-1" }, null, -1), cl = {
4457
+ key: 1,
4458
+ class: "inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"
4459
+ }, fl = /* @__PURE__ */ s("span", { class: "w-2 h-2 bg-red-500 rounded-full me-1" }, null, -1), hl = {
4460
+ key: 2,
4461
+ class: "inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"
4462
+ }, gl = /* @__PURE__ */ s("span", { class: "w-2 h-2 bg-yellow-500 rounded-full me-1" }, null, -1), ml = {
4463
+ key: 3,
4464
+ class: "inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"
4465
+ }, _l = /* @__PURE__ */ s("span", { class: "w-2 h-2 bg-blue-500 rounded-full me-1" }, null, -1);
4466
+ function pl(e, t, r, n, a, o) {
4467
+ return d(), u("div", ll, [
4468
+ o.hasLabelColor == "green" ? (d(), u("span", dl, [
4469
+ ul,
4470
+ v(" " + h(this.row[this.field]), 1)
4471
+ ])) : g("", !0),
4472
+ o.hasLabelColor == "red" ? (d(), u("span", cl, [
4473
+ fl,
4474
+ v(" " + h(this.row[this.field]), 1)
4475
+ ])) : g("", !0),
4476
+ o.hasLabelColor == "yellow" ? (d(), u("span", hl, [
4477
+ gl,
4478
+ v(" " + h(this.row[this.field]), 1)
4479
+ ])) : g("", !0),
4480
+ o.hasLabelColor == "default" ? (d(), u("span", ml, [
4481
+ _l,
4482
+ v(" " + h(this.row[this.field]), 1)
4483
+ ])) : g("", !0)
4484
+ ]);
4485
+ }
4486
+ const Zl = /* @__PURE__ */ k(il, [["render", pl]]);
2
4487
  export {
3
- t as GlButton,
4
- e as GlCard,
5
- s as GlDataTable,
6
- G as GlDataTableServerSide,
7
- o as GlDatatableAction,
8
- r as GlDatatableDeleteAction,
9
- D as GlDatatableFileDownload,
10
- i as GlDatatableFiles,
11
- n as GlDatatableHtml,
12
- b as GlDatatableList,
13
- T as GlDatatablePicture,
14
- d as GlDatatableStatus,
15
- u as GlDatatableStatusGeneral,
16
- p as GlDeleteConfirmationModal,
17
- c as GlDropdown,
18
- x as GlFilesUpload,
19
- S as GlLanguageSelector,
20
- m as GlModal,
21
- g as GlMultiItemSlide,
22
- f as GlMultiSelectDropdown,
23
- w as GlNotify,
24
- F as GlTab,
25
- M as GlTabsWrapper,
26
- y as GlTextInput,
27
- v as GlTextTranslate,
28
- A as GlTextarea,
29
- B as GlTextareaTranslate,
30
- C as GlTinymceTranslate,
31
- I as GlToggleBox,
32
- L as store
4488
+ $l as GlButton,
4489
+ wl as GlCard,
4490
+ Vl as GlDataTable,
4491
+ Ml as GlDataTableServerSide,
4492
+ Bl as GlDatatableAction,
4493
+ Gl as GlDatatableDeleteAction,
4494
+ Fl as GlDatatableFileDownload,
4495
+ Rl as GlDatatableFiles,
4496
+ Ul as GlDatatableHtml,
4497
+ ql as GlDatatableList,
4498
+ Hl as GlDatatablePicture,
4499
+ zl as GlDatatableStatus,
4500
+ Zl as GlDatatableStatusGeneral,
4501
+ ee as GlDeleteConfirmationModal,
4502
+ Tl as GlDropdown,
4503
+ yl as GlFilesUpload,
4504
+ xl as GlLanguageSelector,
4505
+ Il as GlModal,
4506
+ jl as GlMultiItemSlide,
4507
+ kl as GlMultiSelectDropdown,
4508
+ vl as GlNotify,
4509
+ El as GlTab,
4510
+ Pl as GlTabsWrapper,
4511
+ ta as GlTailwindPagination,
4512
+ Dl as GlTextInput,
4513
+ Ol as GlTextTranslate,
4514
+ Nl as GlTextarea,
4515
+ Sl as GlTextareaTranslate,
4516
+ Cl as GlTinymceTranslate,
4517
+ Al as GlToggleBox,
4518
+ Ll as store
33
4519
  };