doph-js 0.0.54 → 0.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dophJs.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useSlots as Dn, computed as P, h as Un, openBlock as A, createBlock as st, unref as et, createElementBlock as lt, Fragment as Tn, normalizeClass as Wt, renderSlot as ot, createCommentVNode as pt, resolveDynamicComponent as Vt, createElementVNode as oe, toDisplayString as gn, withDirectives as Qo, normalizeStyle as Ut, vModelText as ts, Transition as es, withCtx as wt, ref as Nt, withModifiers as Gt, resolveComponent as ns, createTextVNode as os, createVNode as wo, renderList as So, reactive as Cn, getCurrentInstance as ss, watch as Se, onUnmounted as xo, mergeProps as be, shallowRef as hn, defineComponent as rs, toRefs as is, onMounted as cs, watchPostEffect as as } from "vue";
2
- const we = {
1
+ import { useSlots as ne, computed as f, h as le, openBlock as m, createBlock as b, unref as S, createElementBlock as D, Fragment as oe, normalizeClass as W, renderSlot as v, createCommentVNode as L, resolveDynamicComponent as P, createElementVNode as Z, toDisplayString as te, withDirectives as ue, normalizeStyle as A, vModelText as fe, Transition as me, withCtx as I, ref as O, withModifiers as V, resolveComponent as pe, createTextVNode as ge, createVNode as ae, renderList as de, reactive as ie, getCurrentInstance as ce, watch as he, onUnmounted as ve, mergeProps as G, onMounted as ye } from "vue";
2
+ const K = {
3
3
  __name: "DIcon",
4
4
  props: {
5
5
  component: [Object, String],
@@ -7,91 +7,91 @@ const we = {
7
7
  color: String,
8
8
  className: String
9
9
  },
10
- setup(t) {
11
- const n = t, e = Dn(), o = P(() => {
12
- const { className: l } = n;
13
- return l === void 0 ? "icon" : ["icon", l].join(" ");
14
- }), s = P(() => {
15
- const { color: l } = n;
16
- return l === void 0 ? null : l;
17
- }), r = P(() => {
18
- const l = n.size ?? null;
19
- if (l !== void 0)
20
- return typeof l == "number" || /^\d+$/.test(l) ? `${l}px` : l;
21
- }), c = P(() => Un(
10
+ setup(n) {
11
+ const t = n, e = ne(), o = f(() => {
12
+ const { className: a } = t;
13
+ return a === void 0 ? "icon" : ["icon", a].join(" ");
14
+ }), s = f(() => {
15
+ const { color: a } = t;
16
+ return a === void 0 ? null : a;
17
+ }), i = f(() => {
18
+ const a = t.size ?? null;
19
+ if (a !== void 0)
20
+ return typeof a == "number" || /^\d+$/.test(a) ? `${a}px` : a;
21
+ }), l = f(() => le(
22
22
  "i",
23
23
  {
24
24
  class: o.value,
25
25
  style: {
26
26
  color: s.value,
27
- fontSize: r.value
27
+ fontSize: i.value
28
28
  }
29
29
  },
30
- n.component ? Un(n.component) : e
30
+ t.component ? le(t.component) : e
31
31
  ));
32
- return (l, i) => (A(), st(et(c)));
32
+ return (a, r) => (m(), b(S(l)));
33
33
  }
34
- }, Rt = {
34
+ }, z = {
35
35
  state: {},
36
36
  getters: {
37
- getIcon(t) {
38
- return Rt.state[t];
37
+ getIcon(n) {
38
+ return z.state[n];
39
39
  },
40
40
  getIcons() {
41
- return Rt.state;
41
+ return z.state;
42
42
  }
43
43
  },
44
44
  mutations: {
45
- addIcon(t, n) {
46
- Rt.state.name = n;
45
+ addIcon(n, t) {
46
+ z.state.name = t;
47
47
  },
48
- addIcons(t) {
49
- for (const n in t)
50
- t.hasOwnProperty(n) && (Rt.state[n] = t[n]);
48
+ addIcons(n) {
49
+ for (const t in n)
50
+ n.hasOwnProperty(t) && (z.state[t] = n[t]);
51
51
  }
52
52
  }
53
- }, ls = { key: 1 }, si = {
53
+ }, be = { key: 1 }, Ke = {
54
54
  __name: "DButton",
55
55
  props: {
56
56
  class: String,
57
57
  icon: String
58
58
  },
59
59
  emits: ["click"],
60
- setup(t, { emit: n }) {
61
- const e = t, o = Dn(), s = P(() => e.icon ? Rt.getters.getIcon(e.icon) : null), r = (c) => {
62
- n("click", c);
60
+ setup(n, { emit: t }) {
61
+ const e = n, o = ne(), s = f(() => e.icon ? z.getters.getIcon(e.icon) : null), i = (l) => {
62
+ t("click", l);
63
63
  };
64
- return (c, l) => (A(), lt(Tn, null, [
65
- s.value ? pt("", !0) : (A(), lt("div", {
64
+ return (l, a) => (m(), D(oe, null, [
65
+ s.value ? L("", !0) : (m(), D("div", {
66
66
  key: 0,
67
- onClick: r,
68
- class: Wt(["button", e.class])
67
+ onClick: i,
68
+ class: W(["button", e.class])
69
69
  }, [
70
- ot(c.$slots, "default")
70
+ v(l.$slots, "default")
71
71
  ], 2)),
72
- s.value ? (A(), lt("div", {
72
+ s.value ? (m(), D("div", {
73
73
  key: 1,
74
- onClick: r,
75
- class: Wt(["button button-ext", e.class])
74
+ onClick: i,
75
+ class: W(["button button-ext", e.class])
76
76
  }, [
77
- e.icon ? (A(), st(Vt(we), {
77
+ e.icon ? (m(), b(P(K), {
78
78
  key: 0,
79
79
  component: s.value,
80
80
  color: "inherit"
81
- }, null, 8, ["component"])) : pt("", !0),
82
- et(o).default ? (A(), lt("div", ls, [
83
- ot(c.$slots, "default")
84
- ])) : pt("", !0)
85
- ], 2)) : pt("", !0)
81
+ }, null, 8, ["component"])) : L("", !0),
82
+ S(o).default ? (m(), D("div", be, [
83
+ v(l.$slots, "default")
84
+ ])) : L("", !0)
85
+ ], 2)) : L("", !0)
86
86
  ], 64));
87
87
  }
88
88
  };
89
- const In = (t, n) => {
90
- const e = t.__vccOpts || t;
91
- for (const [o, s] of n)
89
+ const se = (n, t) => {
90
+ const e = n.__vccOpts || n;
91
+ for (const [o, s] of t)
92
92
  e[o] = s;
93
93
  return e;
94
- }, ds = { class: "d-input" }, us = { class: "label" }, fs = ["placeholder"], ps = {
94
+ }, Te = { class: "d-input" }, _e = { class: "label" }, Se = ["placeholder"], De = {
95
95
  __name: "DInput",
96
96
  props: {
97
97
  label: String,
@@ -102,40 +102,40 @@ const In = (t, n) => {
102
102
  modelValue: String
103
103
  },
104
104
  emits: ["update:modelValue"],
105
- setup(t, { emit: n }) {
106
- const e = t, o = P(() => e.font === "small" ? "d-input-small" : e.font === "big" ? "d-input-big" : ""), s = P({
105
+ setup(n, { emit: t }) {
106
+ const e = n, o = f(() => e.font === "small" ? "d-input-small" : e.font === "big" ? "d-input-big" : ""), s = f({
107
107
  get: () => e.modelValue,
108
- set: (r) => {
109
- n("update:modelValue", r);
108
+ set: (i) => {
109
+ t("update:modelValue", i);
110
110
  }
111
111
  });
112
- return (r, c) => (A(), lt("div", ds, [
113
- oe("div", us, gn(e.label), 1),
114
- Qo(oe("input", {
115
- "onUpdate:modelValue": c[0] || (c[0] = (l) => s.value = l),
112
+ return (i, l) => (m(), D("div", Te, [
113
+ Z("div", _e, te(e.label), 1),
114
+ ue(Z("input", {
115
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => s.value = a),
116
116
  type: "text",
117
- class: Wt(o.value),
117
+ class: W(o.value),
118
118
  placeholder: e.placeholder,
119
- style: Ut(e.size === "wide" ? "width:100%" : "")
120
- }, null, 14, fs), [
121
- [ts, s.value]
119
+ style: A(e.size === "wide" ? "width:100%" : "")
120
+ }, null, 14, Se), [
121
+ [fe, s.value]
122
122
  ])
123
123
  ]));
124
124
  }
125
- }, ri = /* @__PURE__ */ In(ps, [["__scopeId", "data-v-11679fd8"]]), ms = {
125
+ }, qe = /* @__PURE__ */ se(De, [["__scopeId", "data-v-11679fd8"]]), xe = {
126
126
  __name: "DBadge",
127
127
  props: {
128
128
  class: String
129
129
  },
130
- setup(t) {
131
- const n = t;
132
- return (e, o) => (A(), lt("div", {
133
- class: Wt(["badge", n.class])
130
+ setup(n) {
131
+ const t = n;
132
+ return (e, o) => (m(), D("div", {
133
+ class: W(["badge", t.class])
134
134
  }, [
135
- ot(e.$slots, "default")
135
+ v(e.$slots, "default")
136
136
  ], 2));
137
137
  }
138
- }, Ft = "0px", gs = {
138
+ }, M = "0px", $e = {
139
139
  __name: "DCollapse",
140
140
  props: {
141
141
  duration: {
@@ -159,73 +159,73 @@ const In = (t, n) => {
159
159
  default: 1
160
160
  }
161
161
  },
162
- setup(t) {
163
- const n = t, e = (i) => ({
164
- height: i.style.height,
165
- width: i.style.width,
166
- position: i.style.position,
167
- visibility: i.style.visibility,
168
- overflow: i.style.overflow,
169
- paddingTop: i.style.paddingTop,
170
- paddingBottom: i.style.paddingBottom,
171
- borderTopWidth: i.style.borderTopWidth,
172
- borderBottomWidth: i.style.borderBottomWidth,
173
- marginTop: i.style.marginTop,
174
- marginBottom: i.style.marginBottom
175
- }), o = (i, a) => {
176
- const { width: d } = getComputedStyle(i);
177
- i.style.width = d, i.style.position = "absolute", i.style.visibility = "hidden", i.style.height = "";
178
- let { height: f } = getComputedStyle(i);
179
- return i.style.width = a.width, i.style.position = a.position, i.style.visibility = a.visibility, i.style.height = Ft, i.style.overflow = "hidden", a.height && a.height !== Ft ? a.height : f;
180
- }, s = (i, a, d, f, p) => {
181
- const m = i.animate(f, p);
182
- i.style.height = a.height, m.onfinish = () => {
183
- i.style.overflow = a.overflow, d();
162
+ setup(n) {
163
+ const t = n, e = (r) => ({
164
+ height: r.style.height,
165
+ width: r.style.width,
166
+ position: r.style.position,
167
+ visibility: r.style.visibility,
168
+ overflow: r.style.overflow,
169
+ paddingTop: r.style.paddingTop,
170
+ paddingBottom: r.style.paddingBottom,
171
+ borderTopWidth: r.style.borderTopWidth,
172
+ borderBottomWidth: r.style.borderBottomWidth,
173
+ marginTop: r.style.marginTop,
174
+ marginBottom: r.style.marginBottom
175
+ }), o = (r, d) => {
176
+ const { width: c } = getComputedStyle(r);
177
+ r.style.width = c, r.style.position = "absolute", r.style.visibility = "hidden", r.style.height = "";
178
+ let { height: p } = getComputedStyle(r);
179
+ return r.style.width = d.width, r.style.position = d.position, r.style.visibility = d.visibility, r.style.height = M, r.style.overflow = "hidden", d.height && d.height !== M ? d.height : p;
180
+ }, s = (r, d, c, p, y) => {
181
+ const B = r.animate(p, y);
182
+ r.style.height = d.height, B.onfinish = () => {
183
+ r.style.overflow = d.overflow, c();
184
184
  };
185
- }, r = (i, a) => [
185
+ }, i = (r, d) => [
186
186
  {
187
- height: Ft,
188
- opacity: n.opacityClosed,
189
- paddingTop: Ft,
190
- paddingBottom: Ft,
191
- borderTopWidth: Ft,
192
- borderBottomWidth: Ft,
193
- marginTop: Ft,
194
- marginBottom: Ft
187
+ height: M,
188
+ opacity: t.opacityClosed,
189
+ paddingTop: M,
190
+ paddingBottom: M,
191
+ borderTopWidth: M,
192
+ borderBottomWidth: M,
193
+ marginTop: M,
194
+ marginBottom: M
195
195
  },
196
196
  {
197
- height: i,
198
- opacity: n.opacityOpened,
199
- paddingTop: a.paddingTop,
200
- paddingBottom: a.paddingBottom,
201
- borderTopWidth: a.borderTopWidth,
202
- borderBottomWidth: a.borderBottomWidth,
203
- marginTop: a.marginTop,
204
- marginBottom: a.marginBottom
197
+ height: r,
198
+ opacity: t.opacityOpened,
199
+ paddingTop: d.paddingTop,
200
+ paddingBottom: d.paddingBottom,
201
+ borderTopWidth: d.borderTopWidth,
202
+ borderBottomWidth: d.borderBottomWidth,
203
+ marginTop: d.marginTop,
204
+ marginBottom: d.marginBottom
205
205
  }
206
- ], c = (i, a) => {
207
- const d = i, f = e(d), p = o(d, f), m = r(p, f), _ = { duration: n.duration, easing: n.easingEnter };
208
- s(d, f, a, m, _);
209
- }, l = (i, a) => {
210
- const d = i, f = e(d), { height: p } = getComputedStyle(d);
211
- d.style.height = p, d.style.overflow = "hidden";
212
- const m = r(p, f).reverse(), _ = { duration: n.duration, easing: n.easingLeave };
213
- s(d, f, a, m, _);
206
+ ], l = (r, d) => {
207
+ const c = r, p = e(c), y = o(c, p), B = i(y, p), x = { duration: t.duration, easing: t.easingEnter };
208
+ s(c, p, d, B, x);
209
+ }, a = (r, d) => {
210
+ const c = r, p = e(c), { height: y } = getComputedStyle(c);
211
+ c.style.height = y, c.style.overflow = "hidden";
212
+ const B = i(y, p).reverse(), x = { duration: t.duration, easing: t.easingLeave };
213
+ s(c, p, d, B, x);
214
214
  };
215
- return (i, a) => (A(), st(es, {
215
+ return (r, d) => (m(), b(me, {
216
216
  css: !1,
217
- onEnter: c,
218
- onLeave: l
217
+ onEnter: l,
218
+ onLeave: a
219
219
  }, {
220
- default: wt(() => [
221
- ot(i.$slots, "default")
220
+ default: I(() => [
221
+ v(r.$slots, "default")
222
222
  ]),
223
223
  _: 3
224
224
  }));
225
225
  }
226
- }, Ae = {
226
+ }, q = {
227
227
  data: void 0
228
- }, kn = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), dt = kn([
228
+ }, re = (n) => n.reduce((t, e) => (t[e] = e) && t, {}), $ = re([
229
229
  "drag",
230
230
  "dragend",
231
231
  "dragenter",
@@ -233,7 +233,7 @@ const In = (t, n) => {
233
233
  "dragstart",
234
234
  "dragover",
235
235
  "drop"
236
- ]), hs = kn(["copy", "move", "link", "none"]), vs = kn([
236
+ ]), we = re(["copy", "move", "link", "none"]), Le = re([
237
237
  "none",
238
238
  "copy",
239
239
  "copyLink",
@@ -243,46 +243,46 @@ const In = (t, n) => {
243
243
  "move",
244
244
  "all",
245
245
  "uninitialized"
246
- ]), ys = {
246
+ ]), ke = {
247
247
  __name: "DDrag",
248
248
  props: {
249
249
  draggable: { type: Boolean, default: !0 },
250
250
  transferData: {},
251
- dropEffect: { validator: (t) => t in hs },
252
- effectAllowed: { validator: (t) => t in vs },
251
+ dropEffect: { validator: (n) => n in we },
252
+ effectAllowed: { validator: (n) => n in Le },
253
253
  image: String,
254
254
  imageXOffset: { type: Number, default: 0 },
255
255
  imageYOffset: { type: Number, default: 0 },
256
256
  hideImageHtml: { type: Boolean, default: !1 },
257
257
  tag: { type: String, default: "div" }
258
258
  },
259
- setup(t) {
260
- const n = t, e = Dn(), o = Nt(!1), s = P(() => o && n.transferData), r = P(() => ({ position: "fixed", top: "-1000px" })), c = (l, i) => {
261
- const a = i.dataTransfer;
262
- if ([dt.dragenter, dt.dragover].includes(l) && n.dropEffect && (a.dropEffect = n.dropEffect), l === dt.dragstart) {
263
- if (n.effectAllowed && (a.effectAllowed = n.effectAllowed), n.image || e.image) {
264
- let d;
265
- n.image ? (d = new Image(), d.src = n.image) : e.image && (d = e.image[0].elm), a.setDragImage && a.setDragImage(d, n.imageXOffset, n.imageYOffset);
259
+ setup(n) {
260
+ const t = n, e = ne(), o = O(!1), s = f(() => o && t.transferData), i = f(() => ({ position: "fixed", top: "-1000px" })), l = (a, r) => {
261
+ const d = r.dataTransfer;
262
+ if ([$.dragenter, $.dragover].includes(a) && t.dropEffect && (d.dropEffect = t.dropEffect), a === $.dragstart) {
263
+ if (t.effectAllowed && (d.effectAllowed = t.effectAllowed), t.image || e.image) {
264
+ let c;
265
+ t.image ? (c = new Image(), c.src = t.image) : e.image && (c = e.image[0].elm), d.setDragImage && d.setDragImage(c, t.imageXOffset, t.imageYOffset);
266
266
  }
267
- n.transferData !== void 0 && (Ae.data = n.transferData, i.dataTransfer.setData("text", "")), o.value = !0;
267
+ t.transferData !== void 0 && (q.data = t.transferData, r.dataTransfer.setData("text", "")), o.value = !0;
268
268
  }
269
269
  };
270
- return (l, i) => (A(), st(Vt(t.tag), {
271
- draggable: n.draggable,
272
- onDrag: i[0] || (i[0] = (a) => c(et(dt).drag, a)),
273
- onDragstart: i[1] || (i[1] = Gt((a) => c(et(dt).dragstart, a), ["stop"])),
274
- onDragenter: i[2] || (i[2] = (a) => c(et(dt).dragenter, a)),
275
- onDragleave: i[3] || (i[3] = (a) => c(et(dt).dragleave, a)),
276
- onDragend: i[4] || (i[4] = (a) => c(et(dt).dragend, a))
270
+ return (a, r) => (m(), b(P(n.tag), {
271
+ draggable: t.draggable,
272
+ onDrag: r[0] || (r[0] = (d) => l(S($).drag, d)),
273
+ onDragstart: r[1] || (r[1] = V((d) => l(S($).dragstart, d), ["stop"])),
274
+ onDragenter: r[2] || (r[2] = (d) => l(S($).dragenter, d)),
275
+ onDragleave: r[3] || (r[3] = (d) => l(S($).dragleave, d)),
276
+ onDragend: r[4] || (r[4] = (d) => l(S($).dragend, d))
277
277
  }, {
278
- default: wt(() => [
279
- ot(l.$slots, "default", { transferData: s.value }),
280
- t.hideImageHtml ? (A(), lt("div", {
278
+ default: I(() => [
279
+ v(a.$slots, "default", { transferData: s.value }),
280
+ n.hideImageHtml ? (m(), D("div", {
281
281
  key: 0,
282
- style: Ut(r.value)
282
+ style: A(i.value)
283
283
  }, [
284
- ot(l.$slots, "image", { transferData: s.value })
285
- ], 4)) : ot(l.$slots, "image", {
284
+ v(a.$slots, "image", { transferData: s.value })
285
+ ], 4)) : v(a.$slots, "image", {
286
286
  key: 1,
287
287
  transferData: s.value
288
288
  })
@@ -291,10 +291,10 @@ const In = (t, n) => {
291
291
  }, 40, ["draggable"]));
292
292
  }
293
293
  };
294
- const bs = { class: "item-title" }, ws = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, Ss = {
294
+ const Ee = { class: "item-title" }, Be = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, Ie = {
295
295
  key: 0,
296
296
  class: "sub-menu"
297
- }, xs = {
297
+ }, Ne = {
298
298
  __name: "DTreeItem",
299
299
  props: {
300
300
  model: Object,
@@ -303,108 +303,108 @@ const bs = { class: "item-title" }, ws = { style: { display: "flex", "flex-direc
303
303
  search: String
304
304
  },
305
305
  emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick"],
306
- setup(t, { emit: n }) {
307
- const e = t, o = Nt(null), s = Nt(!1), r = Nt(!1), c = Nt(!1), l = P(() => e.model.children && e.model.children.length), i = P(() => (L.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), a = (b) => {
308
- n("nodeclick", { event: b, model: e.model });
309
- }, d = (b) => {
310
- n("nodeclick", b);
311
- }, f = P(() => (L.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (s.value ? "node-over " : "") + (r.value ? "node-top " : "") + (c.value ? "node-bottom " : "")), p = P(() => e.search ? !1 : e.model.draggable === !0), m = (b) => {
312
- let x = Ae.data;
313
- if (x.model.id === e.model.id || L.actions.isChildOfParent(e.treeId, e.items, e.model.id, x.model.id) || L.actions.isParentOfChild(e.treeId, e.items, x.model.id, e.model.id))
314
- return s.value = !1, r.value = !1, c.value = !1, !1;
315
- if (!L.state.trees[e.treeId].transfer && x.id !== e.treeId)
306
+ setup(n, { emit: t }) {
307
+ const e = n, o = O(null), s = O(!1), i = O(!1), l = O(!1), a = f(() => e.model.children && e.model.children.length), r = f(() => (u.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), d = (k) => {
308
+ t("nodeclick", { event: k, model: e.model });
309
+ }, c = (k) => {
310
+ t("nodeclick", k);
311
+ }, p = f(() => (u.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (s.value ? "node-over " : "") + (i.value ? "node-top " : "") + (l.value ? "node-bottom " : "")), y = f(() => e.search ? !1 : e.model.draggable === !0), B = (k) => {
312
+ let T = q.data;
313
+ if (T.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, T.model.id) || u.actions.isParentOfChild(e.treeId, e.items, T.model.id, e.model.id))
314
+ return s.value = !1, i.value = !1, l.value = !1, !1;
315
+ if (!u.state.trees[e.treeId].transfer && T.id !== e.treeId)
316
316
  return !1;
317
- let u = "";
318
- r.value ? u = "before" : c.value ? u = "after" : u = "inside", L.actions.moveTreeNode(x.id, e.treeId, e.items, x.model.id, e.model.id, u), s.value = !1, r.value = !1, c.value = !1;
319
- }, _ = (b) => {
320
- let x = Ae.data;
321
- if (x.model.id === e.model.id || L.actions.isChildOfParent(e.treeId, e.items, e.model.id, x.model.id) || L.actions.isParentOfChild(e.treeId, e.items, x.model.id, e.model.id))
317
+ let w = "";
318
+ i.value ? w = "before" : l.value ? w = "after" : w = "inside", u.actions.moveTreeNode(T.id, e.treeId, e.items, T.model.id, e.model.id, w), s.value = !1, i.value = !1, l.value = !1;
319
+ }, x = (k) => {
320
+ let T = q.data;
321
+ if (T.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, T.model.id) || u.actions.isParentOfChild(e.treeId, e.items, T.model.id, e.model.id))
322
322
  return !1;
323
- const u = b.y, g = o.value.getBoundingClientRect().top, D = o.value.getBoundingClientRect().height, w = D / 3;
324
- u > g && u <= g + w ? (s.value = !1, r.value = !0, c.value = !1) : u < g + D && u >= g + D - w ? (s.value = !1, r.value = !1, c.value = !0) : (s.value = !0, r.value = !1, c.value = !1);
325
- }, h = () => {
326
- s.value = !1, r.value = !1, c.value = !1;
323
+ const w = k.y, N = o.value.getBoundingClientRect().top, H = o.value.getBoundingClientRect().height, h = H / 3;
324
+ w > N && w <= N + h ? (s.value = !1, i.value = !0, l.value = !1) : w < N + H && w >= N + H - h ? (s.value = !1, i.value = !1, l.value = !0) : (s.value = !0, i.value = !1, l.value = !1);
325
+ }, U = () => {
326
+ s.value = !1, i.value = !1, l.value = !1;
327
327
  };
328
- return (b, x) => {
329
- const u = ns("d-tree-item", !0);
330
- return A(), st(ys, {
328
+ return (k, T) => {
329
+ const w = pe("d-tree-item", !0);
330
+ return m(), b(ke, {
331
331
  tag: "li",
332
332
  class: "tree-item",
333
333
  "transfer-data": { id: e.treeId, model: e.model },
334
- draggable: p.value,
335
- onDrop: Gt(m, ["stop"]),
336
- onDragenter: x[0] || (x[0] = Gt(() => {
334
+ draggable: y.value,
335
+ onDrop: V(B, ["stop"]),
336
+ onDragenter: T[0] || (T[0] = V(() => {
337
337
  }, ["prevent"])),
338
- onDragover: Gt(_, ["prevent", "stop"]),
339
- onDragleave: Gt(h, ["prevent"])
338
+ onDragover: V(x, ["prevent", "stop"]),
339
+ onDragleave: V(U, ["prevent"])
340
340
  }, {
341
- default: wt(() => {
342
- var g, D;
341
+ default: I(() => {
342
+ var N, H;
343
343
  return [
344
- oe("div", {
344
+ Z("div", {
345
345
  ref_key: "node",
346
346
  ref: o,
347
- class: Wt(f.value),
348
- onClick: a
347
+ class: W(p.value),
348
+ onClick: d
349
349
  }, [
350
- oe("div", null, [
351
- e.model.icons && e.model.icons.pre && l.value && !e.search ? (A(), st(Vt(we), {
350
+ Z("div", null, [
351
+ e.model.icons && e.model.icons.pre && a.value && !e.search ? (m(), b(P(K), {
352
352
  key: 0,
353
- component: et(Rt).getters.getIcon(e.model.icons.pre.component),
353
+ component: S(z).getters.getIcon(e.model.icons.pre.component),
354
354
  size: 18,
355
355
  color: e.model.icons.pre.color ? e.model.icons.pre.color : "inherit",
356
- class: Wt(i.value ? "tree-open-pre" : "")
357
- }, null, 8, ["component", "color", "class"])) : pt("", !0),
358
- e.model.icons && e.model.icons.pre && !l.value && !e.search ? (A(), st(Vt(we), {
356
+ class: W(r.value ? "tree-open-pre" : "")
357
+ }, null, 8, ["component", "color", "class"])) : L("", !0),
358
+ e.model.icons && e.model.icons.pre && !a.value && !e.search ? (m(), b(P(K), {
359
359
  key: 1,
360
- component: et(Rt).getters.getIcon(e.model.icons.pre.component),
360
+ component: S(z).getters.getIcon(e.model.icons.pre.component),
361
361
  size: 18,
362
362
  color: "rgba(0,0,0,0)",
363
- class: Wt(i.value ? "tree-open-pre" : "")
364
- }, null, 8, ["component", "class"])) : pt("", !0),
365
- e.model.icons && e.model.icons.icon ? (A(), st(Vt(we), {
363
+ class: W(r.value ? "tree-open-pre" : "")
364
+ }, null, 8, ["component", "class"])) : L("", !0),
365
+ e.model.icons && e.model.icons.icon ? (m(), b(P(K), {
366
366
  key: 2,
367
- component: et(Rt).getters.getIcon(e.model.icons.icon.component),
367
+ component: S(z).getters.getIcon(e.model.icons.icon.component),
368
368
  color: e.model.icons.icon.color ? e.model.icons.icon.color : "inherit",
369
369
  size: e.model.icons.icon.size ? e.model.icons.icon.size : null,
370
370
  className: e.model.icons.icon.class ? e.model.icons.icon.class : null
371
- }, null, 8, ["component", "color", "size", "className"])) : pt("", !0),
372
- oe("div", bs, [
373
- oe("div", null, gn(et(L).actions.renderTitle(e.treeId, e.model.title)), 1)
371
+ }, null, 8, ["component", "color", "size", "className"])) : L("", !0),
372
+ Z("div", Ee, [
373
+ Z("div", null, te(S(u).actions.renderTitle(e.treeId, e.model.title)), 1)
374
374
  ])
375
375
  ]),
376
- oe("div", ws, [
377
- ((g = e.model.badge) == null ? void 0 : g.value) !== void 0 ? (A(), st(Vt(ms), {
376
+ Z("div", Be, [
377
+ ((N = e.model.badge) == null ? void 0 : N.value) !== void 0 ? (m(), b(P(xe), {
378
378
  key: 0,
379
- class: Wt([(D = e.model.badge) == null ? void 0 : D.class, "badge-sm"])
379
+ class: W([(H = e.model.badge) == null ? void 0 : H.class, "badge-sm"])
380
380
  }, {
381
- default: wt(() => [
382
- os(gn(e.model.badge.value), 1)
381
+ default: I(() => [
382
+ ge(te(e.model.badge.value), 1)
383
383
  ]),
384
384
  _: 1
385
- }, 8, ["class"])) : pt("", !0),
386
- e.model.icons && e.model.icons.post && l.value && !e.search ? (A(), st(Vt(we), {
385
+ }, 8, ["class"])) : L("", !0),
386
+ e.model.icons && e.model.icons.post && a.value && !e.search ? (m(), b(P(K), {
387
387
  key: 1,
388
- component: et(Rt).getters.getIcon(e.model.icons.post.component),
388
+ component: S(z).getters.getIcon(e.model.icons.post.component),
389
389
  size: 20,
390
390
  color: e.model.icons.post.color ? e.model.icons.post.color : "inherit",
391
- class: Wt(i.value ? "tree-open-post" : "")
392
- }, null, 8, ["component", "color", "class"])) : pt("", !0)
391
+ class: W(r.value ? "tree-open-post" : "")
392
+ }, null, 8, ["component", "color", "class"])) : L("", !0)
393
393
  ])
394
394
  ], 2),
395
- wo(gs, null, {
396
- default: wt(() => [
397
- l.value && i.value && !e.search ? (A(), lt("ul", Ss, [
398
- (A(!0), lt(Tn, null, So(t.model.children, (w) => (A(), st(u, {
395
+ ae($e, null, {
396
+ default: I(() => [
397
+ a.value && r.value && !e.search ? (m(), D("ul", Ie, [
398
+ (m(!0), D(oe, null, de(n.model.children, (h) => (m(), b(w, {
399
399
  class: "tree-item",
400
- key: w.id,
401
- model: w,
400
+ key: h.id,
401
+ model: h,
402
402
  treeId: e.treeId,
403
403
  items: e.items,
404
404
  search: e.search,
405
- onNodeclick: d
405
+ onNodeclick: c
406
406
  }, null, 8, ["model", "treeId", "items", "search"]))), 128))
407
- ])) : pt("", !0)
407
+ ])) : L("", !0)
408
408
  ]),
409
409
  _: 1
410
410
  })
@@ -414,22 +414,22 @@ const bs = { class: "item-title" }, ws = { style: { display: "flex", "flex-direc
414
414
  }, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"]);
415
415
  };
416
416
  }
417
- }, $s = /* @__PURE__ */ In(xs, [["__scopeId", "data-v-00a53150"]]);
418
- function _s(t) {
419
- return t = t || /* @__PURE__ */ new Map(), {
417
+ }, He = /* @__PURE__ */ se(Ne, [["__scopeId", "data-v-00a53150"]]);
418
+ function Ce(n) {
419
+ return n = n || /* @__PURE__ */ new Map(), {
420
420
  /**
421
421
  * A Map of event names to registered handler functions.
422
422
  */
423
- all: t,
423
+ all: n,
424
424
  /**
425
425
  * Register an event handler for the given type.
426
426
  * @param {string|symbol} type Type of event to listen for, or `'*'` for all events
427
427
  * @param {Function} handler Function to call in response to given event
428
428
  * @memberOf eventsBus
429
429
  */
430
- on(n, e) {
431
- const o = t.get(n);
432
- o ? o.push(e) : t.set(n, [e]);
430
+ on(t, e) {
431
+ const o = n.get(t);
432
+ o ? o.push(e) : n.set(t, [e]);
433
433
  },
434
434
  /**
435
435
  * Remove an event handler for the given type.
@@ -438,9 +438,9 @@ function _s(t) {
438
438
  * @param {Function} [handler] Handler function to remove
439
439
  * @memberOf eventsBus
440
440
  */
441
- off(n, e) {
442
- const o = t.get(n);
443
- o && (e ? o.splice(o.indexOf(e) >>> 0, 1) : t.set(n, []));
441
+ off(t, e) {
442
+ const o = n.get(t);
443
+ o && (e ? o.splice(o.indexOf(e) >>> 0, 1) : n.set(t, []));
444
444
  },
445
445
  /**
446
446
  * Invoke all handlers for the given type.
@@ -452,142 +452,142 @@ function _s(t) {
452
452
  * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
453
453
  * @memberOf eventsBus
454
454
  */
455
- emit(n, e) {
456
- let o = t.get(n);
455
+ emit(t, e) {
456
+ let o = n.get(t);
457
457
  o && o.slice().map((s) => {
458
458
  s(e);
459
- }), o = t.get("*"), o && o.slice().map((s) => {
460
- s(n, e);
459
+ }), o = n.get("*"), o && o.slice().map((s) => {
460
+ s(t, e);
461
461
  });
462
462
  }
463
463
  };
464
464
  }
465
- const se = _s(), L = {
466
- state: Cn({
465
+ const X = Ce(), u = {
466
+ state: ie({
467
467
  trees: {}
468
468
  }),
469
469
  getters: {
470
- getItems(t) {
471
- return L.state.trees[t].items;
470
+ getItems(n) {
471
+ return u.state.trees[n].items;
472
472
  },
473
- getItemsSelect(t) {
474
- return L.state.trees[t].selected;
473
+ getItemsSelect(n) {
474
+ return u.state.trees[n].selected;
475
475
  },
476
476
  // data - ноды, dataId - ID ноды родителя data
477
- getParentId(t, n, e, o = "id", s = "children", r = {}) {
478
- return e && t && (t.find((c) => c[o] === e ? (r.found = n, c) : L.getters.getParentId(c[s], c.id, e, o, s, r)), r.found) ? r.found : !1;
477
+ getParentId(n, t, e, o = "id", s = "children", i = {}) {
478
+ return e && n && (n.find((l) => l[o] === e ? (i.found = t, l) : u.getters.getParentId(l[s], l.id, e, o, s, i)), i.found) ? i.found : !1;
479
479
  }
480
480
  },
481
481
  mutations: {
482
- setTreeItems(t, n) {
483
- L.state.trees[t].items = n;
482
+ setTreeItems(n, t) {
483
+ u.state.trees[n].items = t;
484
484
  },
485
- setItemSelect(t, n) {
486
- L.state.trees[t].noSelect || (L.state.trees[t].multiSelect ? L.state.trees[t].selected.includes(n.id) ? L.state.trees[t].selected = L.state.trees[t].selected.filter(function(e) {
487
- return e !== n.id;
488
- }) : L.state.trees[t].selected = [...L.state.trees[t].selected, n.id] : L.state.trees[t].selected = [n.id]);
485
+ setItemSelect(n, t) {
486
+ u.state.trees[n].noSelect || (u.state.trees[n].multiSelect ? u.state.trees[n].selected.includes(t.id) ? u.state.trees[n].selected = u.state.trees[n].selected.filter(function(e) {
487
+ return e !== t.id;
488
+ }) : u.state.trees[n].selected = [...u.state.trees[n].selected, t.id] : u.state.trees[n].selected = [t.id]);
489
489
  }
490
490
  },
491
491
  actions: {
492
- initTreeStore(t, n, e, o, s, r) {
493
- L.state.trees[t] = [], L.state.trees[t].selected = [], L.state.trees[t].noSelect = n, L.state.trees[t].multiSelect = e, L.state.trees[t].expanded = o, L.state.trees[t].transfer = s, L.state.trees[t].renderTitle = r;
492
+ initTreeStore(n, t, e, o, s, i) {
493
+ u.state.trees[n] = [], u.state.trees[n].selected = [], u.state.trees[n].noSelect = t, u.state.trees[n].multiSelect = e, u.state.trees[n].expanded = o, u.state.trees[n].transfer = s, u.state.trees[n].renderTitle = i;
494
494
  },
495
- renderTitle(t, n) {
496
- return L.state.trees[t].renderTitle ? L.state.trees[t].renderTitle(n) : n;
495
+ renderTitle(n, t) {
496
+ return u.state.trees[n].renderTitle ? u.state.trees[n].renderTitle(t) : t;
497
497
  },
498
- isItemSelected(t, n) {
499
- return L.state.trees[t].selected.includes(n);
498
+ isItemSelected(n, t) {
499
+ return u.state.trees[n].selected.includes(t);
500
500
  },
501
- toggleItem(t, n, e) {
502
- const o = L.actions.deepSearch(n, e);
503
- o.expanded = o.expanded === void 0 || !o.expanded, o.children && o.children.length && (o.expanded ? se.emit(`expand-${t}`, { id: t, model: o }) : se.emit(`collapse-${t}`, { id: t, model: o }));
501
+ toggleItem(n, t, e) {
502
+ const o = u.actions.deepSearch(t, e);
503
+ o.expanded = o.expanded === void 0 || !o.expanded, o.children && o.children.length && (o.expanded ? X.emit(`expand-${n}`, { id: n, model: o }) : X.emit(`collapse-${n}`, { id: n, model: o }));
504
504
  },
505
- isTreeExpanded(t) {
506
- return L.state.trees[t].expanded;
505
+ isTreeExpanded(n) {
506
+ return u.state.trees[n].expanded;
507
507
  },
508
- isChildOfParent(t, n, e, o) {
509
- const s = L.actions.deepSearch(n, e);
508
+ isChildOfParent(n, t, e, o) {
509
+ const s = u.actions.deepSearch(t, e);
510
510
  if (s && s.children) {
511
- for (let r = 0; r < s.children.length; r++)
512
- if (s.children[r].id === o)
511
+ for (let i = 0; i < s.children.length; i++)
512
+ if (s.children[i].id === o)
513
513
  return !0;
514
514
  }
515
515
  return !1;
516
516
  },
517
517
  // Является ли нода родителем указанного потомка
518
- isParentOfChild(t, n, e, o) {
519
- const s = L.actions.deepSearch(n, e);
520
- return !!(s && s.children && L.actions.deepSearch(s.children, o));
518
+ isParentOfChild(n, t, e, o) {
519
+ const s = u.actions.deepSearch(t, e);
520
+ return !!(s && s.children && u.actions.deepSearch(s.children, o));
521
521
  },
522
- deepSearch(t, n, e = "id", o = "children", s = {}) {
523
- return n && t && (t.find((r) => r[e] === n ? (s.found = r, r) : L.actions.deepSearch(r[o], n, e, o, s)), s.found) ? s.found : !1;
522
+ deepSearch(n, t, e = "id", o = "children", s = {}) {
523
+ return t && n && (n.find((i) => i[e] === t ? (s.found = i, i) : u.actions.deepSearch(i[o], t, e, o, s)), s.found) ? s.found : !1;
524
524
  },
525
- deepSearchByTitle(t, n, e = "title", o = "children", s = []) {
526
- if (n && t && (t.find((r) => {
527
- const c = new RegExp(n, "gi");
528
- r[e].toString().toLowerCase().match(c) !== null && s.push(r), L.actions.deepSearchByTitle(r[o], n, e, o, s);
525
+ deepSearchByTitle(n, t, e = "title", o = "children", s = []) {
526
+ if (t && n && (n.find((i) => {
527
+ const l = new RegExp(t, "gi");
528
+ i[e].toString().toLowerCase().match(l) !== null && s.push(i), u.actions.deepSearchByTitle(i[o], t, e, o, s);
529
529
  }), s)) {
530
- for (let r = 0; r < s.length; r++)
530
+ for (let i = 0; i < s.length; i++)
531
531
  ;
532
532
  return s;
533
533
  }
534
534
  return s;
535
535
  },
536
- moveTreeNode(t, n, e, o, s, r) {
537
- const c = L.actions.deleteTreeNode(e, o);
538
- L.actions.insertTreeNode(e, s, c, r), se.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: c.id, target: s, position: r });
536
+ moveTreeNode(n, t, e, o, s, i) {
537
+ const l = u.actions.deleteTreeNode(e, o);
538
+ u.actions.insertTreeNode(e, s, l, i), X.emit(`move-${t}`, { fromTreeId: n, toTreeId: t, moved: l.id, target: s, position: i });
539
539
  },
540
- insertTreeNode(t, n, e, o) {
541
- if (t)
542
- for (let s = 0; s < t.length; s++) {
543
- if (t[s].id === n) {
544
- let c = s;
545
- return o === "after" ? (c++, t.splice(c, 0, e)) : o === "before" ? t.splice(c, 0, e) : o === "inside" && (Object.hasOwn(t[s], "children") || (t[s].children = [], t[s].opened = !0), t[s].children.splice(0, 0, e)), t[s];
540
+ insertTreeNode(n, t, e, o) {
541
+ if (n)
542
+ for (let s = 0; s < n.length; s++) {
543
+ if (n[s].id === t) {
544
+ let l = s;
545
+ return o === "after" ? (l++, n.splice(l, 0, e)) : o === "before" ? n.splice(l, 0, e) : o === "inside" && (Object.hasOwn(n[s], "children") || (n[s].children = [], n[s].opened = !0), n[s].children.splice(0, 0, e)), n[s];
546
546
  }
547
- const r = this.insertTreeNode(t[s].children, n, e, o);
548
- if (r)
549
- return r;
547
+ const i = this.insertTreeNode(n[s].children, t, e, o);
548
+ if (i)
549
+ return i;
550
550
  }
551
551
  },
552
- deleteTreeNode(t, n) {
553
- if (t)
554
- for (let e = 0; e < t.length; e++) {
555
- if (t[e].id === n) {
556
- const s = t[e];
557
- return t.splice(e, 1), s;
552
+ deleteTreeNode(n, t) {
553
+ if (n)
554
+ for (let e = 0; e < n.length; e++) {
555
+ if (n[e].id === t) {
556
+ const s = n[e];
557
+ return n.splice(e, 1), s;
558
558
  }
559
- const o = L.actions.deleteTreeNode(t[e].children, n);
559
+ const o = u.actions.deleteTreeNode(n[e].children, t);
560
560
  if (o)
561
561
  return o;
562
562
  }
563
563
  }
564
564
  }
565
- }, Ds = {
565
+ }, Me = {
566
566
  __name: "DDrop",
567
567
  props: {
568
568
  tag: { type: String, default: "div" }
569
569
  },
570
- emits: Object.keys(dt),
571
- setup(t, { emit: n }) {
572
- let e = Cn({});
573
- const o = Nt("false"), s = Nt(null), r = /* @__PURE__ */ new Set(), c = P(() => o.value && e), l = (i, a) => {
574
- e = Ae.data, n(i, a, e), i === dt.dragenter && (r.size || a.target === s.value) && r.add(a.target), i === dt.dragleave && r.delete(a.target), i === dt.drop && r.clear(), o.value = !!r.size;
570
+ emits: Object.keys($),
571
+ setup(n, { emit: t }) {
572
+ let e = ie({});
573
+ const o = O("false"), s = O(null), i = /* @__PURE__ */ new Set(), l = f(() => o.value && e), a = (r, d) => {
574
+ e = q.data, t(r, d, e), r === $.dragenter && (i.size || d.target === s.value) && i.add(d.target), r === $.dragleave && i.delete(d.target), r === $.drop && i.clear(), o.value = !!i.size;
575
575
  };
576
- return (i, a) => (A(), st(Vt(t.tag), {
576
+ return (r, d) => (m(), b(P(n.tag), {
577
577
  ref_key: "el",
578
578
  ref: s,
579
- onDragenter: a[0] || (a[0] = (d) => l(et(dt).dragenter, d)),
580
- onDragleave: a[1] || (a[1] = (d) => l(et(dt).dragleave, d)),
581
- onDragover: a[2] || (a[2] = Gt((d) => l(et(dt).dragover, d), ["prevent"])),
582
- onDrop: a[3] || (a[3] = Gt((d) => l(et(dt).drop, d), ["prevent"]))
579
+ onDragenter: d[0] || (d[0] = (c) => a(S($).dragenter, c)),
580
+ onDragleave: d[1] || (d[1] = (c) => a(S($).dragleave, c)),
581
+ onDragover: d[2] || (d[2] = V((c) => a(S($).dragover, c), ["prevent"])),
582
+ onDrop: d[3] || (d[3] = V((c) => a(S($).drop, c), ["prevent"]))
583
583
  }, {
584
- default: wt(() => [
585
- ot(i.$slots, "default", { transferData: c.value })
584
+ default: I(() => [
585
+ v(r.$slots, "default", { transferData: l.value })
586
586
  ]),
587
587
  _: 3
588
588
  }, 544));
589
589
  }
590
- }, Ts = {
590
+ }, We = {
591
591
  __name: "DTree",
592
592
  props: {
593
593
  items: Array,
@@ -606,57 +606,57 @@ const se = _s(), L = {
606
606
  // строка поиска
607
607
  },
608
608
  emits: ["select", "collapse", "expand", "move"],
609
- setup(t, { emit: n }) {
610
- const e = t, o = ss().uid;
611
- L.actions.initTreeStore(o, e.noSelect, e.multiSelect, e.expanded, e.transfer, e.renderTitle);
612
- const s = (l, i) => {
613
- console.log(l, i);
609
+ setup(n, { emit: t }) {
610
+ const e = n, o = ce().uid;
611
+ u.actions.initTreeStore(o, e.noSelect, e.multiSelect, e.expanded, e.transfer, e.renderTitle);
612
+ const s = (a, r) => {
613
+ console.log(a, r);
614
614
  };
615
- se.on(`select-${o}`, (l) => {
616
- n("select", l);
617
- }), se.on(`expand-${o}`, (l) => {
618
- n("expand", l);
619
- }), se.on(`collapse-${o}`, (l) => {
620
- n("collapse", l);
621
- }), se.on(`move-${o}`, (l) => {
622
- n("move", l);
615
+ X.on(`select-${o}`, (a) => {
616
+ t("select", a);
617
+ }), X.on(`expand-${o}`, (a) => {
618
+ t("expand", a);
619
+ }), X.on(`collapse-${o}`, (a) => {
620
+ t("collapse", a);
621
+ }), X.on(`move-${o}`, (a) => {
622
+ t("move", a);
623
623
  });
624
- const r = P(() => e.search ? L.actions.deepSearchByTitle(e.items, e.search) : e.items), c = (l = null) => {
625
- L.mutations.setItemSelect(o, l.model), L.actions.toggleItem(o, e.items, l.model.id);
624
+ const i = f(() => e.search ? u.actions.deepSearchByTitle(e.items, e.search) : e.items), l = (a = null) => {
625
+ u.mutations.setItemSelect(o, a.model), u.actions.toggleItem(o, e.items, a.model.id);
626
626
  };
627
- return (l, i) => (A(), st(Ds, {
627
+ return (a, r) => (m(), b(Me, {
628
628
  class: "tree",
629
629
  tag: "ul",
630
- onDrop: Gt(s, ["stop"])
630
+ onDrop: V(s, ["stop"])
631
631
  }, {
632
- default: wt(() => [
633
- (A(!0), lt(Tn, null, So(r.value, (a) => (A(), st($s, {
634
- key: a.id,
635
- model: a,
636
- treeId: et(o),
632
+ default: I(() => [
633
+ (m(!0), D(oe, null, de(i.value, (d) => (m(), b(He, {
634
+ key: d.id,
635
+ model: d,
636
+ treeId: S(o),
637
637
  items: e.items,
638
638
  search: e.search,
639
- onNodeclick: c
639
+ onNodeclick: l
640
640
  }, null, 8, ["model", "treeId", "items", "search"]))), 128))
641
641
  ]),
642
642
  _: 1
643
643
  }, 8, ["onDrop"]));
644
644
  }
645
645
  };
646
- const Cs = {
646
+ const ze = {
647
647
  __name: "DAccordion",
648
648
  props: {
649
649
  items: Array
650
650
  },
651
- setup(t) {
652
- const n = t;
653
- return (e, o) => (A(), st(Ts, {
651
+ setup(n) {
652
+ const t = n;
653
+ return (e, o) => (m(), b(We, {
654
654
  class: "accordion",
655
- items: n.items,
655
+ items: t.items,
656
656
  "no-select": !0
657
657
  }, null, 8, ["items"]));
658
658
  }
659
- }, ii = /* @__PURE__ */ In(Cs, [["__scopeId", "data-v-4c920528"]]), Is = {
659
+ }, Je = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-4c920528"]]), Ae = {
660
660
  __name: "DLayoutHeader",
661
661
  props: {
662
662
  fixed: {
@@ -689,19 +689,19 @@ const Cs = {
689
689
  },
690
690
  useMinWidthLayout: Boolean
691
691
  },
692
- setup(t) {
693
- const n = t, e = P(() => {
694
- const { fixed: o, zIndex: s, minWidth: r, height: c, paddingLeft: l, transitionDuration: i, transitionTimingFunction: a } = n, d = o ? "fixed" : "static", f = n.useMinWidthLayout ? `min-width:${r}px;` : "";
695
- return `position:${d};z-index:${s};${f}height:${c}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${a};`;
692
+ setup(n) {
693
+ const t = n, e = f(() => {
694
+ const { fixed: o, zIndex: s, minWidth: i, height: l, paddingLeft: a, transitionDuration: r, transitionTimingFunction: d } = t, c = o ? "fixed" : "static", p = t.useMinWidthLayout ? `min-width:${i}px;` : "";
695
+ return `position:${c};z-index:${s};${p}height:${l}px;padding-left:${a}px;transition-duration:${r}ms;transition-timing-function:${d};`;
696
696
  });
697
- return (o, s) => (A(), lt("header", {
697
+ return (o, s) => (m(), D("header", {
698
698
  class: "d-layout-header",
699
- style: Ut(e.value)
699
+ style: A(e.value)
700
700
  }, [
701
- ot(o.$slots, "default")
701
+ v(o.$slots, "default")
702
702
  ], 4));
703
703
  }
704
- }, ks = {
704
+ }, Fe = {
705
705
  __name: "DLayoutTab",
706
706
  props: {
707
707
  fixed: {
@@ -738,19 +738,19 @@ const Cs = {
738
738
  },
739
739
  useMinWidthLayout: Boolean
740
740
  },
741
- setup(t) {
742
- const n = t, e = P(() => {
743
- const { fixed: o, top: s, zIndex: r, minWidth: c, height: l, paddingLeft: i, transitionDuration: a, transitionTimingFunction: d } = n, f = o ? "fixed" : "static", p = n.useMinWidthLayout ? `min-width: ${c}px;` : "";
744
- return `position:${f};top:${s}px;z-index:${r};${p}height:${l}px;padding-left:${i}px;transition-duration:${a}ms;transition-timing-function:${d};`;
741
+ setup(n) {
742
+ const t = n, e = f(() => {
743
+ const { fixed: o, top: s, zIndex: i, minWidth: l, height: a, paddingLeft: r, transitionDuration: d, transitionTimingFunction: c } = t, p = o ? "fixed" : "static", y = t.useMinWidthLayout ? `min-width: ${l}px;` : "";
744
+ return `position:${p};top:${s}px;z-index:${i};${y}height:${a}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${c};`;
745
745
  });
746
- return (o, s) => (A(), lt("div", {
746
+ return (o, s) => (m(), D("div", {
747
747
  class: "d-layout-tab",
748
- style: Ut(e.value)
748
+ style: A(e.value)
749
749
  }, [
750
- ot(o.$slots, "default")
750
+ v(o.$slots, "default")
751
751
  ], 4));
752
752
  }
753
- }, Ls = {
753
+ }, Pe = {
754
754
  __name: "DLayoutFooter",
755
755
  props: {
756
756
  fixed: {
@@ -783,19 +783,19 @@ const Cs = {
783
783
  },
784
784
  useMinWidthLayout: Boolean
785
785
  },
786
- setup(t) {
787
- const n = t, e = P(() => {
788
- const { fixed: o, zIndex: s, minWidth: r, height: c, paddingLeft: l, transitionDuration: i, transitionTimingFunction: a } = n, d = o ? "fixed" : "static", f = n.useMinWidthLayout ? `min-width:${r}px;` : "";
789
- return `position:${d};z-index:${s};${f}height:${c}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${a};`;
786
+ setup(n) {
787
+ const t = n, e = f(() => {
788
+ const { fixed: o, zIndex: s, minWidth: i, height: l, paddingLeft: a, transitionDuration: r, transitionTimingFunction: d } = t, c = o ? "fixed" : "static", p = t.useMinWidthLayout ? `min-width:${i}px;` : "";
789
+ return `position:${c};z-index:${s};${p}height:${l}px;padding-left:${a}px;transition-duration:${r}ms;transition-timing-function:${d};`;
790
790
  });
791
- return (o, s) => (A(), lt("footer", {
791
+ return (o, s) => (m(), D("footer", {
792
792
  class: "d-layout-footer",
793
- style: Ut(e.value)
793
+ style: A(e.value)
794
794
  }, [
795
- ot(o.$slots, "default")
795
+ v(o.$slots, "default")
796
796
  ], 4));
797
797
  }
798
- }, Bs = {
798
+ }, Oe = {
799
799
  __name: "DLayoutSidebar",
800
800
  props: {
801
801
  zIndex: {
@@ -823,19 +823,19 @@ const Cs = {
823
823
  default: !1
824
824
  }
825
825
  },
826
- setup(t) {
827
- const n = t, e = P(() => {
828
- const { zIndex: o, width: s, paddingTop: r, transitionDuration: c, transitionTimingFunction: l } = n;
829
- return `z-index:${o};width:${s}px;padding-top:${r}px;transition-duration:${c}ms;transition-timing-function:${l};`;
826
+ setup(n) {
827
+ const t = n, e = f(() => {
828
+ const { zIndex: o, width: s, paddingTop: i, transitionDuration: l, transitionTimingFunction: a } = t;
829
+ return `z-index:${o};width:${s}px;padding-top:${i}px;transition-duration:${l}ms;transition-timing-function:${a};`;
830
830
  });
831
- return (o, s) => (A(), lt("aside", {
831
+ return (o, s) => (m(), D("aside", {
832
832
  class: "d-layout-sidebar",
833
- style: Ut(e.value)
833
+ style: A(e.value)
834
834
  }, [
835
- ot(o.$slots, "default")
835
+ v(o.$slots, "default")
836
836
  ], 4));
837
837
  }
838
- }, Es = {
838
+ }, Ve = {
839
839
  __name: "DLayoutContent",
840
840
  props: {
841
841
  paddingTop: {
@@ -860,49 +860,49 @@ const Cs = {
860
860
  default: "ease-in-out"
861
861
  }
862
862
  },
863
- setup(t) {
864
- const n = t, e = P(() => {
865
- const { paddingTop: o, paddingBottom: s, paddingLeft: r, transitionDuration: c, transitionTimingFunction: l } = n, i = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
866
- return `padding-top:${o}px;padding-bottom:${s}px;padding-left:${r}px;${i}transition-duration:${c}ms;transition-timing-function:${l};`;
863
+ setup(n) {
864
+ const t = n, e = f(() => {
865
+ const { paddingTop: o, paddingBottom: s, paddingLeft: i, transitionDuration: l, transitionTimingFunction: a } = t, r = `overflow:${t.overflowHidden ? "hidden" : "visible"};`;
866
+ return `padding-top:${o}px;padding-bottom:${s}px;padding-left:${i}px;${r}transition-duration:${l}ms;transition-timing-function:${a};`;
867
867
  });
868
- return (o, s) => (A(), lt("main", {
869
- style: Ut(e.value),
868
+ return (o, s) => (m(), D("main", {
869
+ style: A(e.value),
870
870
  class: "d-layout-content"
871
871
  }, [
872
- ot(o.$slots, "default")
872
+ v(o.$slots, "default")
873
873
  ], 4));
874
874
  }
875
875
  };
876
- function Ns(t) {
877
- const n = Nt(0), e = P(() => `transform: translateX(${-n.value}px);`);
876
+ function Re(n) {
877
+ const t = O(0), e = f(() => `transform: translateX(${-t.value}px);`);
878
878
  let o = !1;
879
- function s(d) {
880
- n.value = d;
879
+ function s(c) {
880
+ t.value = c;
881
881
  }
882
- function r() {
883
- var d;
884
- const f = ((d = document.scrollingElement) === null || d === void 0 ? void 0 : d.scrollLeft) || 0;
885
- s(f);
886
- }
887
- function c() {
888
- r();
882
+ function i() {
883
+ var c;
884
+ const p = ((c = document.scrollingElement) === null || c === void 0 ? void 0 : c.scrollLeft) || 0;
885
+ s(p);
889
886
  }
890
887
  function l() {
891
- document.addEventListener("scroll", r);
892
- }
893
- function i() {
894
- o && document.removeEventListener("scroll", r);
888
+ i();
895
889
  }
896
890
  function a() {
897
- c(), l(), o = !0;
891
+ document.addEventListener("scroll", i);
898
892
  }
899
- return Se(t, (d) => {
900
- d ? a() : i();
901
- }, { immediate: !0 }), xo(() => {
902
- i();
893
+ function r() {
894
+ o && document.removeEventListener("scroll", i);
895
+ }
896
+ function d() {
897
+ l(), a(), o = !0;
898
+ }
899
+ return he(n, (c) => {
900
+ c ? d() : r();
901
+ }, { immediate: !0 }), ve(() => {
902
+ r();
903
903
  }), e;
904
904
  }
905
- const Os = 1001, zs = 999, Hs = 998, ci = {
905
+ const Ye = 1001, Ze = 999, Xe = 998, Qe = {
906
906
  __name: "DLayoutAdmin",
907
907
  props: {
908
908
  mode: {
@@ -992,129 +992,129 @@ const Os = 1001, zs = 999, Hs = 998, ci = {
992
992
  }
993
993
  },
994
994
  emits: ["update:sidebar-collapse"],
995
- setup(t, { emit: n }) {
996
- const e = t, o = P(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), s = P(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), r = Ns(s), c = P(() => e.fixedHeaderAndTab ? r.value : ""), l = P(() => e.fixedFooter ? r.value : ""), i = P(() => {
997
- const { transitionDuration: w, transitionTimingFunction: E } = e;
995
+ setup(n, { emit: t }) {
996
+ const e = n, o = f(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), s = f(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), i = Re(s), l = f(() => e.fixedHeaderAndTab ? i.value : ""), a = f(() => e.fixedFooter ? i.value : ""), r = f(() => {
997
+ const { transitionDuration: h, transitionTimingFunction: F } = e;
998
998
  return {
999
- transitionDuration: w,
1000
- transitionTimingFunction: E
999
+ transitionDuration: h,
1000
+ transitionTimingFunction: F
1001
1001
  };
1002
- }), a = P(() => e.mode === "vertical"), d = P(() => e.isMobile || a.value ? 1003 : 1e3), f = P({
1002
+ }), d = f(() => e.mode === "vertical"), c = f(() => e.isMobile || d.value ? 1003 : 1e3), p = f({
1003
1003
  get() {
1004
1004
  return e.sidebarCollapse;
1005
1005
  },
1006
- set(w) {
1007
- n("update:sidebar-collapse", w);
1006
+ set(h) {
1007
+ t("update:sidebar-collapse", h);
1008
1008
  }
1009
1009
  });
1010
- function p() {
1011
- f.value = !0;
1010
+ function y() {
1011
+ p.value = !0;
1012
1012
  }
1013
- const m = P(() => e.isMobile && !f.value), _ = P(() => {
1014
- const { transitionDuration: w, transitionTimingFunction: E } = e;
1015
- return `background-color:${e.maskBg};transition-duration:${w}ms;transition-timing-function:${E};`;
1016
- }), h = P(() => {
1017
- const { sidebarWidth: w, sidebarCollapsedWidth: E } = e, N = e.isMobile ? 0 : E, z = f.value ? N : w;
1018
- return e.sidebarVisible ? z : 0;
1019
- }), b = P(() => e.isMobile ? 0 : h.value), x = P(() => a.value ? b.value : 0), u = P(
1020
- () => !e.isMobile && !a.value && e.headerVisible ? e.headerHeight : 0
1021
- ), g = P(() => {
1022
- let w = 0;
1023
- return e.fixedHeaderAndTab && (e.headerVisible && (w += e.headerHeight), e.tabVisible && (w += e.tabHeight)), w;
1024
- }), D = P(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
1025
- return (w, E) => (A(), lt("div", {
1013
+ const B = f(() => e.isMobile && !p.value), x = f(() => {
1014
+ const { transitionDuration: h, transitionTimingFunction: F } = e;
1015
+ return `background-color:${e.maskBg};transition-duration:${h}ms;transition-timing-function:${F};`;
1016
+ }), U = f(() => {
1017
+ const { sidebarWidth: h, sidebarCollapsedWidth: F } = e, J = e.isMobile ? 0 : F, Q = p.value ? J : h;
1018
+ return e.sidebarVisible ? Q : 0;
1019
+ }), k = f(() => e.isMobile ? 0 : U.value), T = f(() => d.value ? k.value : 0), w = f(
1020
+ () => !e.isMobile && !d.value && e.headerVisible ? e.headerHeight : 0
1021
+ ), N = f(() => {
1022
+ let h = 0;
1023
+ return e.fixedHeaderAndTab && (e.headerVisible && (h += e.headerHeight), e.tabVisible && (h += e.tabHeight)), h;
1024
+ }), H = f(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
1025
+ return (h, F) => (m(), D("div", {
1026
1026
  class: "d-layout",
1027
- style: Ut(o.value)
1027
+ style: A(o.value)
1028
1028
  }, [
1029
- t.headerVisible ? (A(), st(Is, be({ key: 0 }, i.value, {
1030
- fixed: t.fixedHeaderAndTab,
1031
- "z-index": Os,
1032
- "min-width": t.minWidth,
1033
- height: t.headerHeight,
1034
- "padding-left": x.value,
1035
- style: c.value
1029
+ n.headerVisible ? (m(), b(Ae, G({ key: 0 }, r.value, {
1030
+ fixed: n.fixedHeaderAndTab,
1031
+ "z-index": Ye,
1032
+ "min-width": n.minWidth,
1033
+ height: n.headerHeight,
1034
+ "padding-left": T.value,
1035
+ style: l.value
1036
1036
  }), {
1037
- default: wt(() => [
1038
- ot(w.$slots, "header")
1037
+ default: I(() => [
1038
+ v(h.$slots, "header")
1039
1039
  ]),
1040
1040
  _: 3
1041
- }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : pt("", !0),
1042
- t.tabVisible ? (A(), st(ks, be({ key: 1 }, i.value, {
1043
- fixed: t.fixedHeaderAndTab,
1044
- "z-index": zs,
1045
- "min-width": t.minWidth,
1046
- top: t.headerHeight,
1047
- height: t.tabHeight,
1048
- "padding-left": b.value,
1049
- style: c.value
1041
+ }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : L("", !0),
1042
+ n.tabVisible ? (m(), b(Fe, G({ key: 1 }, r.value, {
1043
+ fixed: n.fixedHeaderAndTab,
1044
+ "z-index": Ze,
1045
+ "min-width": n.minWidth,
1046
+ top: n.headerHeight,
1047
+ height: n.tabHeight,
1048
+ "padding-left": k.value,
1049
+ style: l.value
1050
1050
  }), {
1051
- default: wt(() => [
1052
- ot(w.$slots, "tab")
1051
+ default: I(() => [
1052
+ v(h.$slots, "tab")
1053
1053
  ]),
1054
1054
  _: 3
1055
- }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : pt("", !0),
1056
- t.sidebarVisible ? (A(), st(Bs, be({ key: 2 }, i.value, {
1057
- "z-index": d.value,
1058
- width: h.value,
1059
- "padding-top": u.value
1055
+ }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : L("", !0),
1056
+ n.sidebarVisible ? (m(), b(Oe, G({ key: 2 }, r.value, {
1057
+ "z-index": c.value,
1058
+ width: U.value,
1059
+ "padding-top": w.value
1060
1060
  }), {
1061
- default: wt(() => [
1062
- ot(w.$slots, "sidebar")
1061
+ default: I(() => [
1062
+ v(h.$slots, "sidebar")
1063
1063
  ]),
1064
1064
  _: 3
1065
- }, 16, ["z-index", "width", "padding-top"])) : pt("", !0),
1066
- m.value ? (A(), lt("div", {
1065
+ }, 16, ["z-index", "width", "padding-top"])) : L("", !0),
1066
+ B.value ? (m(), D("div", {
1067
1067
  key: 3,
1068
1068
  class: "d-layout-sidebar-mask",
1069
- style: Ut(_.value),
1070
- onClick: p
1071
- }, null, 4)) : pt("", !0),
1072
- wo(Es, be(i.value, {
1073
- "padding-top": g.value,
1074
- "padding-bottom": D.value,
1075
- "padding-left": b.value,
1076
- "overflow-hidden": t.addMainOverflowHidden
1069
+ style: A(x.value),
1070
+ onClick: y
1071
+ }, null, 4)) : L("", !0),
1072
+ ae(Ve, G(r.value, {
1073
+ "padding-top": N.value,
1074
+ "padding-bottom": H.value,
1075
+ "padding-left": k.value,
1076
+ "overflow-hidden": n.addMainOverflowHidden
1077
1077
  }), {
1078
- default: wt(() => [
1079
- ot(w.$slots, "default")
1078
+ default: I(() => [
1079
+ v(h.$slots, "default")
1080
1080
  ]),
1081
1081
  _: 3
1082
1082
  }, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
1083
- t.footerVisible ? (A(), st(Ls, be({ key: 4 }, i.value, {
1084
- fixed: t.fixedFooter,
1085
- "z-index": Hs,
1086
- "min-width": t.minWidth,
1087
- height: t.footerHeight,
1088
- "padding-left": b.value,
1089
- style: l.value
1083
+ n.footerVisible ? (m(), b(Pe, G({ key: 4 }, r.value, {
1084
+ fixed: n.fixedFooter,
1085
+ "z-index": Xe,
1086
+ "min-width": n.minWidth,
1087
+ height: n.footerHeight,
1088
+ "padding-left": k.value,
1089
+ style: a.value
1090
1090
  }), {
1091
- default: wt(() => [
1092
- ot(w.$slots, "footer")
1091
+ default: I(() => [
1092
+ v(h.$slots, "footer")
1093
1093
  ]),
1094
1094
  _: 3
1095
- }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : pt("", !0)
1095
+ }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : L("", !0)
1096
1096
  ], 4));
1097
1097
  }
1098
- }, ue = {
1099
- state: Cn({
1098
+ }, j = {
1099
+ state: ie({
1100
1100
  theme: "dark"
1101
1101
  }),
1102
1102
  getters: {
1103
1103
  theme() {
1104
- return ue.state.theme;
1104
+ return j.state.theme;
1105
1105
  }
1106
1106
  },
1107
1107
  mutations: {
1108
- setTheme(t) {
1109
- ue.state.theme = t, document.documentElement.setAttribute("class", t);
1108
+ setTheme(n) {
1109
+ j.state.theme = n, document.documentElement.setAttribute("class", n);
1110
1110
  }
1111
1111
  },
1112
1112
  actions: {
1113
1113
  toggleTheme() {
1114
- ue.state.theme = ue.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", ue.state.theme);
1114
+ j.state.theme = j.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", j.state.theme);
1115
1115
  }
1116
1116
  }
1117
- }, ai = {
1117
+ }, et = {
1118
1118
  __name: "DConfigProvider",
1119
1119
  props: {
1120
1120
  theme: {
@@ -1122,1447 +1122,216 @@ const Os = 1001, zs = 999, Hs = 998, ci = {
1122
1122
  default: "dark"
1123
1123
  }
1124
1124
  },
1125
- setup(t) {
1126
- const n = t;
1127
- return ue.mutations.setTheme(n.theme), (e, o) => ot(e.$slots, "default");
1125
+ setup(n) {
1126
+ const t = n;
1127
+ return j.mutations.setTheme(t.theme), (e, o) => v(e.$slots, "default");
1128
1128
  }
1129
1129
  };
1130
- /*!
1131
- * OverlayScrollbars
1132
- * Version: 2.2.1
1133
- *
1134
- * Copyright (c) Rene Haas | KingSora.
1135
- * https://github.com/KingSora
1136
- *
1137
- * Released under the MIT license.
1138
- */
1139
- function X(t, n) {
1140
- if (qe(t))
1141
- for (let e = 0; e < t.length && n(t[e], e, t) !== !1; e++)
1142
- ;
1143
- else
1144
- t && X(Object.keys(t), (e) => n(t[e], e, t));
1145
- return t;
1146
- }
1147
- function ft(t, n) {
1148
- const e = ee(n);
1149
- if (Lt(n) || e) {
1150
- let s = e ? "" : {};
1151
- if (t) {
1152
- const r = window.getComputedStyle(t, null);
1153
- s = e ? Kn(t, r, n) : n.reduce((c, l) => (c[l] = Kn(t, r, l), c), s);
1154
- }
1155
- return s;
1156
- }
1157
- t && X(St(n), (s) => Gs(t, s, n[s]));
1158
- }
1159
- const Tt = (t, n) => {
1160
- const { o: e, u: o, _: s } = t;
1161
- let r = e, c;
1162
- const l = (d, f) => {
1163
- const p = r, m = d, _ = f || (o ? !o(p, m) : p !== m);
1164
- return (_ || s) && (r = m, c = p), [r, _, c];
1165
- };
1166
- return [n ? (d) => l(n(r, c), d) : l, (d) => [r, !!d, c]];
1167
- }, De = () => typeof window < "u", $o = De() && Node.ELEMENT_NODE, { toString: As, hasOwnProperty: sn } = Object.prototype, Zt = (t) => t === void 0, Xe = (t) => t === null, Ps = (t) => Zt(t) || Xe(t) ? `${t}` : As.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase(), te = (t) => typeof t == "number", ee = (t) => typeof t == "string", Ln = (t) => typeof t == "boolean", kt = (t) => typeof t == "function", Lt = (t) => Array.isArray(t), xe = (t) => typeof t == "object" && !Lt(t) && !Xe(t), qe = (t) => {
1168
- const n = !!t && t.length, e = te(n) && n > -1 && n % 1 == 0;
1169
- return Lt(t) || !kt(t) && e ? n > 0 && xe(t) ? n - 1 in t : !0 : !1;
1170
- }, vn = (t) => {
1171
- if (!t || !xe(t) || Ps(t) !== "object")
1172
- return !1;
1173
- let n;
1174
- const e = "constructor", o = t[e], s = o && o.prototype, r = sn.call(t, e), c = s && sn.call(s, "isPrototypeOf");
1175
- if (o && !r && !c)
1176
- return !1;
1177
- for (n in t)
1178
- ;
1179
- return Zt(n) || sn.call(t, n);
1180
- }, Pe = (t) => {
1181
- const n = HTMLElement;
1182
- return t ? n ? t instanceof n : t.nodeType === $o : !1;
1183
- }, Ue = (t) => {
1184
- const n = Element;
1185
- return t ? n ? t instanceof n : t.nodeType === $o : !1;
1186
- }, Bn = (t, n, e) => t.indexOf(n, e), Z = (t, n, e) => (!e && !ee(n) && qe(n) ? Array.prototype.push.apply(t, n) : t.push(n), t), ce = (t) => {
1187
- const n = Array.from, e = [];
1188
- return n && t ? n(t) : (t instanceof Set ? t.forEach((o) => {
1189
- Z(e, o);
1190
- }) : X(t, (o) => {
1191
- Z(e, o);
1192
- }), e);
1193
- }, En = (t) => !!t && t.length === 0, Ht = (t, n, e) => {
1194
- X(t, (s) => s && s.apply(void 0, n || [])), !e && (t.length = 0);
1195
- }, Ye = (t, n) => Object.prototype.hasOwnProperty.call(t, n), St = (t) => t ? Object.keys(t) : [], G = (t, n, e, o, s, r, c) => {
1196
- const l = [n, e, o, s, r, c];
1197
- return (typeof t != "object" || Xe(t)) && !kt(t) && (t = {}), X(l, (i) => {
1198
- X(St(i), (a) => {
1199
- const d = i[a];
1200
- if (t === d)
1201
- return !0;
1202
- const f = Lt(d);
1203
- if (d && (vn(d) || f)) {
1204
- const p = t[a];
1205
- let m = p;
1206
- f && !Lt(p) ? m = [] : !f && !vn(p) && (m = {}), t[a] = G(m, d);
1207
- } else
1208
- t[a] = d;
1209
- });
1210
- }), t;
1211
- }, Nn = (t) => {
1212
- for (const n in t)
1213
- return !1;
1214
- return !0;
1215
- }, _o = (t, n, e, o) => {
1216
- if (Zt(o))
1217
- return e ? e[t] : n;
1218
- e && (ee(o) || te(o)) && (e[t] = o);
1219
- }, ut = (t, n, e) => {
1220
- if (Zt(e))
1221
- return t ? t.getAttribute(n) : null;
1222
- t && t.setAttribute(n, e);
1223
- }, gt = (t, n) => {
1224
- t && t.removeAttribute(n);
1225
- }, re = (t, n, e, o) => {
1226
- if (e) {
1227
- const s = ut(t, n) || "", r = new Set(s.split(" "));
1228
- r[o ? "add" : "delete"](e);
1229
- const c = ce(r).join(" ").trim();
1230
- ut(t, n, c);
1231
- }
1232
- }, Ms = (t, n, e) => {
1233
- const o = ut(t, n) || "";
1234
- return new Set(o.split(" ")).has(e);
1235
- }, It = (t, n) => _o("scrollLeft", 0, t, n), Xt = (t, n) => _o("scrollTop", 0, t, n), yn = De() && Element.prototype, Do = (t, n) => {
1236
- const e = [], o = n ? Ue(n) ? n : null : document;
1237
- return o ? Z(e, o.querySelectorAll(t)) : e;
1238
- }, Fs = (t, n) => {
1239
- const e = n ? Ue(n) ? n : null : document;
1240
- return e ? e.querySelector(t) : null;
1241
- }, Me = (t, n) => Ue(t) ? (yn.matches || yn.msMatchesSelector).call(t, n) : !1, On = (t) => t ? ce(t.childNodes) : [], Yt = (t) => t ? t.parentElement : null, pe = (t, n) => {
1242
- if (Ue(t)) {
1243
- const e = yn.closest;
1244
- if (e)
1245
- return e.call(t, n);
1246
- do {
1247
- if (Me(t, n))
1248
- return t;
1249
- t = Yt(t);
1250
- } while (t);
1251
- }
1252
- return null;
1253
- }, Ws = (t, n, e) => {
1254
- const o = t && pe(t, n), s = t && Fs(e, o), r = pe(s, n) === o;
1255
- return o && s ? o === t || s === t || r && pe(pe(t, e), n) !== o : !1;
1256
- }, zn = (t, n, e) => {
1257
- if (e && t) {
1258
- let o = n, s;
1259
- qe(e) ? (s = document.createDocumentFragment(), X(e, (r) => {
1260
- r === o && (o = r.previousSibling), s.appendChild(r);
1261
- })) : s = e, n && (o ? o !== n && (o = o.nextSibling) : o = t.firstChild), t.insertBefore(s, o || null);
1262
- }
1263
- }, Dt = (t, n) => {
1264
- zn(t, null, n);
1265
- }, Vs = (t, n) => {
1266
- zn(Yt(t), t, n);
1267
- }, Yn = (t, n) => {
1268
- zn(Yt(t), t && t.nextSibling, n);
1269
- }, zt = (t) => {
1270
- if (qe(t))
1271
- X(ce(t), (n) => zt(n));
1272
- else if (t) {
1273
- const n = Yt(t);
1274
- n && n.removeChild(t);
1275
- }
1276
- }, ie = (t) => {
1277
- const n = document.createElement("div");
1278
- return t && ut(n, "class", t), n;
1279
- }, To = (t) => {
1280
- const n = ie();
1281
- return n.innerHTML = t.trim(), X(On(n), (e) => zt(e));
1282
- }, bn = (t) => t.charAt(0).toUpperCase() + t.slice(1), Rs = () => ie().style, Xs = ["-webkit-", "-moz-", "-o-", "-ms-"], qs = ["WebKit", "Moz", "O", "MS", "webkit", "moz", "o", "ms"], rn = {}, cn = {}, Us = (t) => {
1283
- let n = cn[t];
1284
- if (Ye(cn, t))
1285
- return n;
1286
- const e = bn(t), o = Rs();
1287
- return X(Xs, (s) => {
1288
- const r = s.replace(/-/g, "");
1289
- return !(n = [t, s + t, r + e, bn(r) + e].find((l) => o[l] !== void 0));
1290
- }), cn[t] = n || "";
1291
- }, Te = (t) => {
1292
- if (De()) {
1293
- let n = rn[t] || window[t];
1294
- return Ye(rn, t) || (X(qs, (e) => (n = n || window[e + bn(t)], !n)), rn[t] = n), n;
1295
- }
1296
- }, Ys = Te("MutationObserver"), Zn = Te("IntersectionObserver"), me = Te("ResizeObserver"), Co = Te("cancelAnimationFrame"), Io = Te("requestAnimationFrame"), Fe = De() && window.setTimeout, wn = De() && window.clearTimeout, Zs = /[^\x20\t\r\n\f]+/g, ko = (t, n, e) => {
1297
- const o = t && t.classList;
1298
- let s, r = 0, c = !1;
1299
- if (o && n && ee(n)) {
1300
- const l = n.match(Zs) || [];
1301
- for (c = l.length > 0; s = l[r++]; )
1302
- c = !!e(o, s) && c;
1303
- }
1304
- return c;
1305
- }, Hn = (t, n) => {
1306
- ko(t, n, (e, o) => e.remove(o));
1307
- }, qt = (t, n) => (ko(t, n, (e, o) => e.add(o)), Hn.bind(0, t, n)), Ze = (t, n, e, o) => {
1308
- if (t && n) {
1309
- let s = !0;
1310
- return X(e, (r) => {
1311
- const c = o ? o(t[r]) : t[r], l = o ? o(n[r]) : n[r];
1312
- c !== l && (s = !1);
1313
- }), s;
1314
- }
1315
- return !1;
1316
- }, Lo = (t, n) => Ze(t, n, ["w", "h"]), Bo = (t, n) => Ze(t, n, ["x", "y"]), js = (t, n) => Ze(t, n, ["t", "r", "b", "l"]), jn = (t, n, e) => Ze(t, n, ["width", "height"], e && ((o) => Math.round(o))), _t = () => {
1317
- }, fe = (t) => {
1318
- let n;
1319
- const e = t ? Fe : Io, o = t ? wn : Co;
1320
- return [(s) => {
1321
- o(n), n = e(s, kt(t) ? t() : t);
1322
- }, () => o(n)];
1323
- }, An = (t, n) => {
1324
- let e, o, s, r = _t;
1325
- const { v: c, g: l, p: i } = n || {}, a = function(_) {
1326
- r(), wn(e), e = o = void 0, r = _t, t.apply(this, _);
1327
- }, d = (m) => i && o ? i(o, m) : m, f = () => {
1328
- r !== _t && a(d(s) || s);
1329
- }, p = function() {
1330
- const _ = ce(arguments), h = kt(c) ? c() : c;
1331
- if (te(h) && h >= 0) {
1332
- const x = kt(l) ? l() : l, u = te(x) && x >= 0, g = h > 0 ? Fe : Io, D = h > 0 ? wn : Co, E = d(_) || _, N = a.bind(0, E);
1333
- r();
1334
- const z = g(N, h);
1335
- r = () => D(z), u && !e && (e = Fe(f, x)), o = s = E;
1336
- } else
1337
- a(_);
1338
- };
1339
- return p.m = f, p;
1340
- }, Ks = {
1341
- opacity: 1,
1342
- zindex: 1
1343
- }, Ie = (t, n) => {
1344
- const e = n ? parseFloat(t) : parseInt(t, 10);
1345
- return e === e ? e : 0;
1346
- }, Js = (t, n) => !Ks[t.toLowerCase()] && te(n) ? `${n}px` : n, Kn = (t, n, e) => n != null ? n[e] || n.getPropertyValue(e) : t.style[e], Gs = (t, n, e) => {
1347
- try {
1348
- const { style: o } = t;
1349
- Zt(o[n]) ? o.setProperty(n, e) : o[n] = Js(n, e);
1350
- } catch {
1351
- }
1352
- }, $e = (t) => ft(t, "direction") === "rtl", Jn = (t, n, e) => {
1353
- const o = n ? `${n}-` : "", s = e ? `-${e}` : "", r = `${o}top${s}`, c = `${o}right${s}`, l = `${o}bottom${s}`, i = `${o}left${s}`, a = ft(t, [r, c, l, i]);
1354
- return {
1355
- t: Ie(a[r], !0),
1356
- r: Ie(a[c], !0),
1357
- b: Ie(a[l], !0),
1358
- l: Ie(a[i], !0)
1359
- };
1360
- }, { round: Gn } = Math, Pn = {
1361
- w: 0,
1362
- h: 0
1363
- }, _e = (t) => t ? {
1364
- w: t.offsetWidth,
1365
- h: t.offsetHeight
1366
- } : Pn, He = (t) => t ? {
1367
- w: t.clientWidth,
1368
- h: t.clientHeight
1369
- } : Pn, We = (t) => t ? {
1370
- w: t.scrollWidth,
1371
- h: t.scrollHeight
1372
- } : Pn, Ve = (t) => {
1373
- const n = parseFloat(ft(t, "height")) || 0, e = parseFloat(ft(t, "width")) || 0;
1374
- return {
1375
- w: e - Gn(e),
1376
- h: n - Gn(n)
1377
- };
1378
- }, Ot = (t) => t.getBoundingClientRect();
1379
- let ke;
1380
- const Qs = () => {
1381
- if (Zt(ke)) {
1382
- ke = !1;
1383
- try {
1384
- window.addEventListener("test", null, Object.defineProperty({}, "passive", {
1385
- get() {
1386
- ke = !0;
1387
- }
1388
- }));
1389
- } catch {
1390
- }
1391
- }
1392
- return ke;
1393
- }, Eo = (t) => t.split(" "), tr = (t, n, e, o) => {
1394
- X(Eo(n), (s) => {
1395
- t.removeEventListener(s, e, o);
1396
- });
1397
- }, it = (t, n, e, o) => {
1398
- var s;
1399
- const r = Qs(), c = (s = r && o && o.S) != null ? s : r, l = o && o.$ || !1, i = o && o.C || !1, a = [], d = r ? {
1400
- passive: c,
1401
- capture: l
1402
- } : l;
1403
- return X(Eo(n), (f) => {
1404
- const p = i ? (m) => {
1405
- t.removeEventListener(f, p, l), e && e(m);
1406
- } : e;
1407
- Z(a, tr.bind(null, t, f, p, l)), t.addEventListener(f, p, d);
1408
- }), Ht.bind(0, a);
1409
- }, No = (t) => t.stopPropagation(), Oo = (t) => t.preventDefault(), er = {
1410
- x: 0,
1411
- y: 0
1412
- }, an = (t) => {
1413
- const n = t ? Ot(t) : 0;
1414
- return n ? {
1415
- x: n.left + window.pageYOffset,
1416
- y: n.top + window.pageXOffset
1417
- } : er;
1418
- }, Qn = (t, n) => {
1419
- X(Lt(n) ? n : [n], t);
1420
- }, Mn = (t) => {
1421
- const n = /* @__PURE__ */ new Map(), e = (r, c) => {
1422
- if (r) {
1423
- const l = n.get(r);
1424
- Qn((i) => {
1425
- l && l[i ? "delete" : "clear"](i);
1426
- }, c);
1427
- } else
1428
- n.forEach((l) => {
1429
- l.clear();
1430
- }), n.clear();
1431
- }, o = (r, c) => {
1432
- if (ee(r)) {
1433
- const a = n.get(r) || /* @__PURE__ */ new Set();
1434
- return n.set(r, a), Qn((d) => {
1435
- kt(d) && a.add(d);
1436
- }, c), e.bind(0, r, c);
1437
- }
1438
- Ln(c) && c && e();
1439
- const l = St(r), i = [];
1440
- return X(l, (a) => {
1441
- const d = r[a];
1442
- d && Z(i, o(a, d));
1443
- }), Ht.bind(0, i);
1444
- }, s = (r, c) => {
1445
- const l = n.get(r);
1446
- X(ce(l), (i) => {
1447
- c && !En(c) ? i.apply(0, c) : i();
1448
- });
1449
- };
1450
- return o(t || {}), [o, e, s];
1451
- }, to = (t) => JSON.stringify(t, (n, e) => {
1452
- if (kt(e))
1453
- throw new Error();
1454
- return e;
1455
- }), nr = {
1456
- paddingAbsolute: !1,
1457
- showNativeOverlaidScrollbars: !1,
1458
- update: {
1459
- elementEvents: [["img", "load"]],
1460
- debounce: [0, 33],
1461
- attributes: null,
1462
- ignoreMutation: null
1463
- },
1464
- overflow: {
1465
- x: "scroll",
1466
- y: "scroll"
1467
- },
1468
- scrollbars: {
1469
- theme: "os-theme-dark",
1470
- visibility: "auto",
1471
- autoHide: "never",
1472
- autoHideDelay: 1300,
1473
- dragScroll: !0,
1474
- clickScroll: !1,
1475
- pointers: ["mouse", "touch", "pen"]
1476
- }
1477
- }, zo = (t, n) => {
1478
- const e = {}, o = St(n).concat(St(t));
1479
- return X(o, (s) => {
1480
- const r = t[s], c = n[s];
1481
- if (xe(r) && xe(c))
1482
- G(e[s] = {}, zo(r, c)), Nn(e[s]) && delete e[s];
1483
- else if (Ye(n, s) && c !== r) {
1484
- let l = !0;
1485
- if (Lt(r) || Lt(c))
1486
- try {
1487
- to(r) === to(c) && (l = !1);
1488
- } catch {
1130
+ class Ue {
1131
+ constructor(t) {
1132
+ const e = {
1133
+ selector: "defaultId",
1134
+ config: {
1135
+ dimensions: {
1136
+ width: "100%",
1137
+ height: "500px"
1138
+ },
1139
+ scroll: {
1140
+ bottomOffset: 0,
1141
+ autoHide: !1
1489
1142
  }
1490
- l && (e[s] = c);
1491
- }
1492
- }), e;
1493
- }, Ho = "os-environment", Ao = `${Ho}-flexbox-glue`, or = `${Ao}-max`, Po = "os-scrollbar-hidden", ln = "data-overlayscrollbars-initialize", Ct = "data-overlayscrollbars", Mo = `${Ct}-overflow-x`, Fo = `${Ct}-overflow-y`, ge = "overflowVisible", sr = "scrollbarHidden", eo = "scrollbarPressed", Re = "updating", Kt = "data-overlayscrollbars-viewport", dn = "arrange", Wo = "scrollbarHidden", he = ge, Sn = "data-overlayscrollbars-padding", rr = he, no = "data-overlayscrollbars-content", Fn = "os-size-observer", ir = `${Fn}-appear`, cr = `${Fn}-listener`, ar = "os-trinsic-observer", lr = "os-no-css-vars", dr = "os-theme-none", ht = "os-scrollbar", ur = `${ht}-rtl`, fr = `${ht}-horizontal`, pr = `${ht}-vertical`, Vo = `${ht}-track`, Wn = `${ht}-handle`, mr = `${ht}-visible`, gr = `${ht}-cornerless`, oo = `${ht}-transitionless`, so = `${ht}-interaction`, ro = `${ht}-unusable`, io = `${ht}-auto-hidden`, co = `${ht}-wheel`, hr = `${Vo}-interactive`, vr = `${Wn}-interactive`, Ro = {}, ae = () => Ro, yr = (t) => {
1494
- const n = [];
1495
- return X(Lt(t) ? t : [t], (e) => {
1496
- const o = St(e);
1497
- X(o, (s) => {
1498
- Z(n, Ro[s] = e[s]);
1499
- });
1500
- }), n;
1501
- }, br = "__osOptionsValidationPlugin", wr = "__osSizeObserverPlugin", Vn = "__osScrollbarsHidingPlugin", Sr = "__osClickScrollPlugin";
1502
- let un;
1503
- const ao = (t, n, e, o) => {
1504
- Dt(t, n);
1505
- const s = He(n), r = _e(n), c = Ve(e);
1506
- return o && zt(n), {
1507
- x: r.h - s.h + c.h,
1508
- y: r.w - s.w + c.w
1509
- };
1510
- }, xr = (t) => {
1511
- let n = !1;
1512
- const e = qt(t, Po);
1513
- try {
1514
- n = ft(t, Us("scrollbar-width")) === "none" || window.getComputedStyle(t, "::-webkit-scrollbar").getPropertyValue("display") === "none";
1515
- } catch {
1516
- }
1517
- return e(), n;
1518
- }, $r = (t, n) => {
1519
- const e = "hidden";
1520
- ft(t, {
1521
- overflowX: e,
1522
- overflowY: e,
1523
- direction: "rtl"
1524
- }), It(t, 0);
1525
- const o = an(t), s = an(n);
1526
- It(t, -999);
1527
- const r = an(n);
1528
- return {
1529
- i: o.x === s.x,
1530
- n: s.x !== r.x
1531
- };
1532
- }, _r = (t, n) => {
1533
- const e = qt(t, Ao), o = Ot(t), s = Ot(n), r = jn(s, o, !0), c = qt(t, or), l = Ot(t), i = Ot(n), a = jn(i, l, !0);
1534
- return e(), c(), r && a;
1535
- }, Dr = () => {
1536
- const { body: t } = document, e = To(`<div class="${Ho}"><div></div></div>`)[0], o = e.firstChild, [s, , r] = Mn(), [c, l] = Tt({
1537
- o: ao(t, e, o),
1538
- u: Bo
1539
- }, ao.bind(0, t, e, o, !0)), [i] = l(), a = xr(e), d = {
1540
- x: i.x === 0,
1541
- y: i.y === 0
1542
- }, f = {
1543
- elements: {
1544
- host: null,
1545
- padding: !a,
1546
- viewport: (u) => a && u === u.ownerDocument.body && u,
1547
- content: !1
1548
- },
1549
- scrollbars: {
1550
- slot: !0
1551
- },
1552
- cancel: {
1553
- nativeScrollbarsOverlaid: !1,
1554
- body: null
1555
- }
1556
- }, p = G({}, nr), m = G.bind(0, {}, p), _ = G.bind(0, {}, f), h = {
1557
- k: i,
1558
- A: d,
1559
- I: a,
1560
- L: ft(e, "zIndex") === "-1",
1561
- B: $r(e, o),
1562
- V: _r(e, o),
1563
- Y: s.bind(0, "z"),
1564
- j: s.bind(0, "r"),
1565
- N: _,
1566
- q: (u) => G(f, u) && _(),
1567
- F: m,
1568
- G: (u) => G(p, u) && m(),
1569
- X: G({}, f),
1570
- U: G({}, p)
1571
- }, b = window.addEventListener, x = An((u) => r(u ? "z" : "r"), {
1572
- v: 33,
1573
- g: 99
1574
- });
1575
- if (gt(e, "style"), zt(e), b("resize", x.bind(0, !1)), !a && (!d.x || !d.y)) {
1576
- let u;
1577
- b("resize", () => {
1578
- const g = ae()[Vn];
1579
- u = u || g && g.R(), u && u(h, c, x.bind(0, !0));
1580
- });
1581
- }
1582
- return h;
1583
- }, vt = () => (un || (un = Dr()), un), Rn = (t, n) => kt(n) ? n.apply(0, t) : n, Tr = (t, n, e, o) => {
1584
- const s = Zt(o) ? e : o;
1585
- return Rn(t, s) || n.apply(0, t);
1586
- }, Xo = (t, n, e, o) => {
1587
- const s = Zt(o) ? e : o, r = Rn(t, s);
1588
- return !!r && (Pe(r) ? r : n.apply(0, t));
1589
- }, Cr = (t, n, e) => {
1590
- const { nativeScrollbarsOverlaid: o, body: s } = e || {}, { A: r, I: c } = vt(), { nativeScrollbarsOverlaid: l, body: i } = n, a = o ?? l, d = Zt(s) ? i : s, f = (r.x || r.y) && a, p = t && (Xe(d) ? !c : d);
1591
- return !!f || !!p;
1592
- }, Xn = /* @__PURE__ */ new WeakMap(), Ir = (t, n) => {
1593
- Xn.set(t, n);
1594
- }, kr = (t) => {
1595
- Xn.delete(t);
1596
- }, qo = (t) => Xn.get(t), lo = (t, n) => t ? n.split(".").reduce((e, o) => e && Ye(e, o) ? e[o] : void 0, t) : void 0, xn = (t, n, e) => (o) => [lo(t, o), e || lo(n, o) !== void 0], Uo = (t) => {
1597
- let n = t;
1598
- return [() => n, (e) => {
1599
- n = G({}, n, e);
1600
- }];
1601
- }, Le = "tabindex", Be = ie.bind(0, ""), fn = (t) => {
1602
- Dt(Yt(t), On(t)), zt(t);
1603
- }, Lr = (t) => {
1604
- const n = vt(), { N: e, I: o } = n, s = ae()[Vn], r = s && s.T, { elements: c } = e(), { host: l, padding: i, viewport: a, content: d } = c, f = Pe(t), p = f ? {} : t, { elements: m } = p, { host: _, padding: h, viewport: b, content: x } = m || {}, u = f ? t : p.target, g = Me(u, "textarea"), D = u.ownerDocument, w = D.documentElement, E = u === D.body, N = D.defaultView, z = Tr.bind(0, [u]), O = Xo.bind(0, [u]), K = Rn.bind(0, [u]), U = z.bind(0, Be, a), H = O.bind(0, Be, d), S = U(b), v = S === u, C = v && E, y = !v && H(x), $ = !v && Pe(S) && S === y, I = $ && !!K(d), T = I ? U() : S, k = I ? y : H(), M = C ? w : $ ? T : S, F = g ? z(Be, l, _) : u, W = C ? M : F, j = $ ? k : y, R = D.activeElement, q = !v && N.top === N && R === u, V = {
1605
- W: u,
1606
- Z: W,
1607
- J: M,
1608
- K: !v && O(Be, i, h),
1609
- tt: j,
1610
- nt: !v && !o && r && r(n),
1611
- ot: C ? w : M,
1612
- st: C ? D : M,
1613
- et: N,
1614
- ct: D,
1615
- rt: g,
1616
- it: E,
1617
- lt: f,
1618
- ut: v,
1619
- dt: $,
1620
- ft: (rt, bt) => Ms(M, v ? Ct : Kt, v ? bt : rt),
1621
- _t: (rt, bt, mt) => re(M, v ? Ct : Kt, v ? bt : rt, mt)
1622
- }, J = St(V).reduce((rt, bt) => {
1623
- const mt = V[bt];
1624
- return Z(rt, mt && !Yt(mt) ? mt : !1);
1625
- }, []), Q = (rt) => rt ? Bn(J, rt) > -1 : null, { W: ct, Z: at, K: nt, J: Y, tt, nt: xt } = V, yt = [() => {
1626
- gt(at, Ct), gt(at, ln), gt(ct, ln), E && (gt(w, Ct), gt(w, ln));
1627
- }], jt = g && Q(at);
1628
- let ne = g ? ct : On([tt, Y, nt, at, ct].find((rt) => Q(rt) === !1));
1629
- const le = C ? ct : tt || Y;
1630
- return [V, () => {
1631
- ut(at, Ct, v ? "viewport" : "host"), ut(nt, Sn, ""), ut(tt, no, ""), v || ut(Y, Kt, "");
1632
- const rt = E && !v ? qt(Yt(u), Po) : _t;
1633
- if (jt && (Yn(ct, at), Z(yt, () => {
1634
- Yn(at, ct), zt(at);
1635
- })), Dt(le, ne), Dt(at, nt), Dt(nt || at, !v && Y), Dt(Y, tt), Z(yt, () => {
1636
- rt(), gt(nt, Sn), gt(tt, no), gt(Y, Mo), gt(Y, Fo), gt(Y, Kt), Q(tt) && fn(tt), Q(Y) && fn(Y), Q(nt) && fn(nt);
1637
- }), o && !v && (re(Y, Kt, Wo, !0), Z(yt, gt.bind(0, Y, Kt))), xt && (Vs(Y, xt), Z(yt, zt.bind(0, xt))), q) {
1638
- const bt = ut(Y, Le);
1639
- ut(Y, Le, "-1"), Y.focus();
1640
- const mt = () => bt ? ut(Y, Le, bt) : gt(Y, Le), At = it(D, "pointerdown keydown", () => {
1641
- mt(), At();
1642
- });
1643
- Z(yt, [mt, At]);
1644
- } else
1645
- R && R.focus && R.focus();
1646
- ne = 0;
1647
- }, Ht.bind(0, yt)];
1648
- }, Br = (t, n) => {
1649
- const { tt: e } = t, [o] = n;
1650
- return (s) => {
1651
- const { V: r } = vt(), { ht: c } = o(), { vt: l } = s, i = (e || !r) && l;
1652
- return i && ft(e, {
1653
- height: c ? "" : "100%"
1654
- }), {
1655
- gt: i,
1656
- wt: i
1657
- };
1658
- };
1659
- }, Er = (t, n) => {
1660
- const [e, o] = n, { Z: s, K: r, J: c, ut: l } = t, [i, a] = Tt({
1661
- u: js,
1662
- o: Jn()
1663
- }, Jn.bind(0, s, "padding", ""));
1664
- return (d, f, p) => {
1665
- let [m, _] = a(p);
1666
- const { I: h, V: b } = vt(), { bt: x } = e(), { gt: u, wt: g, yt: D } = d, [w, E] = f("paddingAbsolute");
1667
- (u || _ || !b && g) && ([m, _] = i(p));
1668
- const z = !l && (E || D || _);
1669
- if (z) {
1670
- const O = !w || !r && !h, K = m.r + m.l, U = m.t + m.b, H = {
1671
- marginRight: O && !x ? -K : 0,
1672
- marginBottom: O ? -U : 0,
1673
- marginLeft: O && x ? -K : 0,
1674
- top: O ? -m.t : 0,
1675
- right: O ? x ? -m.r : "auto" : 0,
1676
- left: O ? x ? "auto" : -m.l : 0,
1677
- width: O ? `calc(100% + ${K}px)` : ""
1678
- }, S = {
1679
- paddingTop: O ? m.t : 0,
1680
- paddingRight: O ? m.r : 0,
1681
- paddingBottom: O ? m.b : 0,
1682
- paddingLeft: O ? m.l : 0
1683
- };
1684
- ft(r || c, H), ft(c, S), o({
1685
- K: m,
1686
- St: !O,
1687
- P: r ? S : G({}, H, S)
1688
- });
1689
- }
1690
- return {
1691
- xt: z
1692
- };
1693
- };
1694
- }, { max: $n } = Math, Jt = $n.bind(0, 0), Yo = "visible", uo = "hidden", Nr = 42, Ee = {
1695
- u: Lo,
1696
- o: {
1697
- w: 0,
1698
- h: 0
1699
- }
1700
- }, Or = {
1701
- u: Bo,
1702
- o: {
1703
- x: uo,
1704
- y: uo
1705
- }
1706
- }, zr = (t, n) => {
1707
- const e = window.devicePixelRatio % 1 !== 0 ? 1 : 0, o = {
1708
- w: Jt(t.w - n.w),
1709
- h: Jt(t.h - n.h)
1710
- };
1711
- return {
1712
- w: o.w > e ? o.w : 0,
1713
- h: o.h > e ? o.h : 0
1714
- };
1715
- }, Ne = (t) => t.indexOf(Yo) === 0, Hr = (t, n) => {
1716
- const [e, o] = n, { Z: s, K: r, J: c, nt: l, ut: i, _t: a, it: d, et: f } = t, { k: p, V: m, I: _, A: h } = vt(), b = ae()[Vn], x = !i && !_ && (h.x || h.y), u = d && i, [g, D] = Tt(Ee, Ve.bind(0, c)), [w, E] = Tt(Ee, We.bind(0, c)), [N, z] = Tt(Ee), [O, K] = Tt(Ee), [U] = Tt(Or), H = (I, T) => {
1717
- if (ft(c, {
1718
- height: ""
1719
- }), T) {
1720
- const { St: k, K: B } = e(), { $t: M, D: F } = I, W = Ve(s), j = He(s), R = ft(c, "boxSizing") === "content-box", q = k || R ? B.b + B.t : 0, V = !(h.x && R);
1721
- ft(c, {
1722
- height: j.h + W.h + (M.x && V ? F.x : 0) - q
1723
- });
1724
- }
1725
- }, S = (I, T) => {
1726
- const k = !_ && !I ? Nr : 0, B = (Q, ct, at) => {
1727
- const nt = ft(c, Q), tt = (T ? T[Q] : nt) === "scroll";
1728
- return [nt, tt, tt && !_ ? ct ? k : at : 0, ct && !!k];
1729
- }, [M, F, W, j] = B("overflowX", h.x, p.x), [R, q, V, J] = B("overflowY", h.y, p.y);
1730
- return {
1731
- Ct: {
1732
- x: M,
1733
- y: R
1734
1143
  },
1735
- $t: {
1736
- x: F,
1737
- y: q
1144
+ onComplete: function() {
1738
1145
  },
1739
- D: {
1740
- x: W,
1741
- y: V
1146
+ onEnd: function() {
1742
1147
  },
1743
- M: {
1744
- x: j,
1745
- y: J
1746
- }
1747
- };
1748
- }, v = (I, T, k, B) => {
1749
- const M = (q, V) => {
1750
- const J = Ne(q), Q = V && J && q.replace(`${Yo}-`, "") || "";
1751
- return [V && !J ? q : "", Ne(Q) ? "hidden" : Q];
1752
- }, [F, W] = M(k.x, T.x), [j, R] = M(k.y, T.y);
1753
- return B.overflowX = W && j ? W : F, B.overflowY = R && F ? R : j, S(I, B);
1754
- }, C = (I, T, k, B) => {
1755
- const { D: M, M: F } = I, { x: W, y: j } = F, { x: R, y: q } = M, { P: V } = e(), J = T ? "marginLeft" : "marginRight", Q = T ? "paddingLeft" : "paddingRight", ct = V[J], at = V.marginBottom, nt = V[Q], Y = V.paddingBottom;
1756
- B.width = `calc(100% + ${q + -1 * ct}px)`, B[J] = -q + ct, B.marginBottom = -R + at, k && (B[Q] = nt + (j ? q : 0), B.paddingBottom = Y + (W ? R : 0));
1757
- }, [y, $] = b ? b.H(x, m, c, l, e, S, C) : [() => x, () => [_t]];
1758
- return (I, T, k) => {
1759
- const { gt: B, Ot: M, wt: F, xt: W, vt: j, yt: R } = I, { ht: q, bt: V } = e(), [J, Q] = T("showNativeOverlaidScrollbars"), [ct, at] = T("overflow"), nt = J && h.x && h.y, Y = !i && !m && (B || F || M || Q || j), tt = Ne(ct.x), xt = Ne(ct.y), yt = tt || xt;
1760
- let jt = D(k), ne = E(k), le = z(k), ve = K(k), rt;
1761
- if (Q && _ && a(Wo, sr, !nt), Y && (rt = S(nt), H(rt, q)), B || W || F || R || Q) {
1762
- yt && a(he, ge, !1);
1763
- const [Pt, Mt] = $(nt, V, rt), [$t, ye] = jt = g(k), [Et, Jo] = ne = w(k), en = He(c);
1764
- let nn = Et, on = en;
1765
- Pt(), (Jo || ye || Q) && Mt && !nt && y(Mt, Et, $t, V) && (on = He(c), nn = We(c));
1766
- const Go = {
1767
- w: Jt($n(Et.w, nn.w) + $t.w),
1768
- h: Jt($n(Et.h, nn.h) + $t.h)
1769
- }, qn = {
1770
- w: Jt((u ? f.innerWidth : on.w + Jt(en.w - Et.w)) + $t.w),
1771
- h: Jt((u ? f.innerHeight + $t.h : on.h + Jt(en.h - Et.h)) + $t.h)
1772
- };
1773
- ve = O(qn), le = N(zr(Go, qn), k);
1774
- }
1775
- const [bt, mt] = ve, [At, de] = le, [je, Ke] = ne, [Je, Ge] = jt, Bt = {
1776
- x: At.w > 0,
1777
- y: At.h > 0
1778
- }, Ce = tt && xt && (Bt.x || Bt.y) || tt && Bt.x && !Bt.y || xt && Bt.y && !Bt.x;
1779
- if (W || R || Ge || Ke || mt || de || at || Q || Y) {
1780
- const Pt = {
1781
- marginRight: 0,
1782
- marginBottom: 0,
1783
- marginLeft: 0,
1784
- width: "",
1785
- overflowY: "",
1786
- overflowX: ""
1787
- }, Mt = v(nt, Bt, ct, Pt), $t = y(Mt, je, Je, V);
1788
- i || C(Mt, V, $t, Pt), Y && H(Mt, q), i ? (ut(s, Mo, Pt.overflowX), ut(s, Fo, Pt.overflowY)) : ft(c, Pt);
1789
- }
1790
- re(s, Ct, ge, Ce), re(r, Sn, rr, Ce), i || re(c, Kt, he, yt);
1791
- const [Qe, tn] = U(S(nt).Ct);
1792
- return o({
1793
- Ct: Qe,
1794
- zt: {
1795
- x: bt.w,
1796
- y: bt.h
1148
+ onTop: function() {
1797
1149
  },
1798
- Tt: {
1799
- x: At.w,
1800
- y: At.h
1150
+ onMove: function() {
1801
1151
  },
1802
- Et: Bt
1803
- }), {
1804
- It: tn,
1805
- At: mt,
1806
- Lt: de
1807
- };
1808
- };
1809
- }, fo = (t, n, e) => {
1810
- const o = {}, s = n || {}, r = St(t).concat(St(s));
1811
- return X(r, (c) => {
1812
- const l = t[c], i = s[c];
1813
- o[c] = !!(e || l || i);
1814
- }), o;
1815
- }, Ar = (t, n) => {
1816
- const { W: e, J: o, _t: s, ut: r } = t, { I: c, A: l, V: i } = vt(), a = !c && (l.x || l.y), d = [Br(t, n), Er(t, n), Hr(t, n)];
1817
- return (f, p, m) => {
1818
- const _ = fo(G({
1819
- gt: !1,
1820
- xt: !1,
1821
- yt: !1,
1822
- vt: !1,
1823
- At: !1,
1824
- Lt: !1,
1825
- It: !1,
1826
- Ot: !1,
1827
- wt: !1
1828
- }, p), {}, m), h = a || !i, b = h && It(o), x = h && Xt(o);
1829
- s("", Re, !0);
1830
- let u = _;
1831
- return X(d, (g) => {
1832
- u = fo(u, g(u, f, !!m) || {}, m);
1833
- }), It(o, b), Xt(o, x), s("", Re), r || (It(e, 0), Xt(e, 0)), u;
1834
- };
1835
- }, Pr = (t, n, e) => {
1836
- let o, s = !1;
1837
- const r = () => {
1838
- s = !0;
1839
- }, c = (l) => {
1840
- if (e) {
1841
- const i = e.reduce((a, d) => {
1842
- if (d) {
1843
- const [f, p] = d, m = p && f && (l ? l(f) : Do(f, t));
1844
- m && m.length && p && ee(p) && Z(a, [m, p.trim()], !0);
1845
- }
1846
- return a;
1847
- }, []);
1848
- X(i, (a) => X(a[0], (d) => {
1849
- const f = a[1], p = o.get(d) || [];
1850
- if (t.contains(d)) {
1851
- const _ = it(d, f, (h) => {
1852
- s ? (_(), o.delete(d)) : n(h);
1853
- });
1854
- o.set(d, Z(p, _));
1855
- } else
1856
- Ht(p), o.delete(d);
1857
- }));
1858
- }
1859
- };
1860
- return e && (o = /* @__PURE__ */ new WeakMap(), c()), [r, c];
1861
- }, po = (t, n, e, o) => {
1862
- let s = !1;
1863
- const { Ht: r, Pt: c, Dt: l, Mt: i, Rt: a, kt: d } = o || {}, f = An(() => {
1864
- s && e(!0);
1865
- }, {
1866
- v: 33,
1867
- g: 99
1868
- }), [p, m] = Pr(t, f, l), _ = r || [], h = c || [], b = _.concat(h), x = (g, D) => {
1869
- const w = a || _t, E = d || _t, N = /* @__PURE__ */ new Set(), z = /* @__PURE__ */ new Set();
1870
- let O = !1, K = !1;
1871
- if (X(g, (U) => {
1872
- const { attributeName: H, target: S, type: v, oldValue: C, addedNodes: y, removedNodes: $ } = U, I = v === "attributes", T = v === "childList", k = t === S, B = I && ee(H) ? ut(S, H) : 0, M = B !== 0 && C !== B, F = Bn(h, H) > -1 && M;
1873
- if (n && (T || !k)) {
1874
- const W = !I, j = I && M, R = j && i && Me(S, i), V = (R ? !w(S, H, C, B) : W || j) && !E(U, !!R, t, o);
1875
- X(y, (J) => N.add(J)), X($, (J) => N.add(J)), K = K || V;
1152
+ onDragStart: function() {
1153
+ },
1154
+ onDragStop: function() {
1155
+ },
1156
+ onTouchStart: function() {
1157
+ },
1158
+ onTouchStop: function() {
1876
1159
  }
1877
- !n && k && M && !w(S, H, C, B) && (z.add(H), O = O || F);
1878
- }), N.size > 0 && m((U) => ce(N).reduce((H, S) => (Z(H, Do(U, S)), Me(S, U) ? Z(H, S) : H), [])), n)
1879
- return !D && K && e(!1), [!1];
1880
- if (z.size > 0 || O) {
1881
- const U = [ce(z), O];
1882
- return !D && e.apply(0, U), U;
1883
- }
1884
- }, u = new Ys((g) => x(g));
1885
- return u.observe(t, {
1886
- attributes: !0,
1887
- attributeOldValue: !0,
1888
- attributeFilter: b,
1889
- subtree: n,
1890
- childList: n,
1891
- characterData: n
1892
- }), s = !0, [() => {
1893
- s && (p(), u.disconnect(), s = !1);
1894
- }, () => {
1895
- if (s) {
1896
- f.m();
1897
- const g = u.takeRecords();
1898
- return !En(g) && x(g, !0);
1899
- }
1900
- }];
1901
- }, Oe = 3333333, ze = (t) => t && (t.height || t.width), Zo = (t, n, e) => {
1902
- const { Bt: o = !1, Vt: s = !1 } = e || {}, r = ae()[wr], { B: c } = vt(), i = To(`<div class="${Fn}"><div class="${cr}"></div></div>`)[0], a = i.firstChild, d = $e.bind(0, t), [f] = Tt({
1903
- o: void 0,
1904
- _: !0,
1905
- u: (h, b) => !(!h || !ze(h) && ze(b))
1906
- }), p = (h) => {
1907
- const b = Lt(h) && h.length > 0 && xe(h[0]), x = !b && Ln(h[0]);
1908
- let u = !1, g = !1, D = !0;
1909
- if (b) {
1910
- const [w, , E] = f(h.pop().contentRect), N = ze(w), z = ze(E);
1911
- u = !E || !N, g = !z && N, D = !u;
1912
- } else
1913
- x ? [, D] = h : g = h === !0;
1914
- if (o && D) {
1915
- const w = x ? h[0] : $e(i);
1916
- It(i, w ? c.n ? -Oe : c.i ? 0 : Oe : Oe), Xt(i, Oe);
1917
- }
1918
- u || n({
1919
- gt: !x,
1920
- Yt: x ? h : void 0,
1921
- Vt: !!g
1922
- });
1923
- }, m = [];
1924
- let _ = s ? p : !1;
1925
- return [() => {
1926
- Ht(m), zt(i);
1927
- }, () => {
1928
- if (me) {
1929
- const h = new me(p);
1930
- h.observe(a), Z(m, () => {
1931
- h.disconnect();
1932
- });
1933
- } else if (r) {
1934
- const [h, b] = r.O(a, p, s);
1935
- _ = h, Z(m, b);
1936
- }
1937
- if (o) {
1938
- const [h] = Tt({
1939
- o: void 0
1940
- }, d);
1941
- Z(m, it(i, "scroll", (b) => {
1942
- const x = h(), [u, g, D] = x;
1943
- g && (Hn(a, "ltr rtl"), u ? qt(a, "rtl") : qt(a, "ltr"), p([!!u, g, D])), No(b);
1944
- }));
1945
- }
1946
- _ && (qt(i, ir), Z(m, it(i, "animationstart", _, {
1947
- C: !!me
1948
- }))), (me || r) && Dt(t, i);
1949
- }];
1950
- }, Mr = (t) => t.h === 0 || t.isIntersecting || t.intersectionRatio > 0, Fr = (t, n) => {
1951
- let e;
1952
- const o = ie(ar), s = [], [r] = Tt({
1953
- o: !1
1954
- }), c = (i, a) => {
1955
- if (i) {
1956
- const d = r(Mr(i)), [, f] = d;
1957
- if (f)
1958
- return !a && n(d), [d];
1959
- }
1960
- }, l = (i, a) => {
1961
- if (i && i.length > 0)
1962
- return c(i.pop(), a);
1963
- };
1964
- return [() => {
1965
- Ht(s), zt(o);
1966
- }, () => {
1967
- if (Zn)
1968
- e = new Zn((i) => l(i), {
1969
- root: t
1970
- }), e.observe(o), Z(s, () => {
1971
- e.disconnect();
1972
- });
1973
- else {
1974
- const i = () => {
1975
- const f = _e(o);
1976
- c(f);
1977
- }, [a, d] = Zo(o, i);
1978
- Z(s, a), d(), i();
1979
- }
1980
- Dt(t, o);
1981
- }, () => {
1982
- if (e)
1983
- return l(e.takeRecords(), !0);
1984
- }];
1985
- }, mo = `[${Ct}]`, Wr = `[${Kt}]`, pn = ["tabindex"], go = ["wrap", "cols", "rows"], mn = ["id", "class", "style", "open"], Vr = (t, n, e) => {
1986
- let o, s, r;
1987
- const { Z: c, J: l, tt: i, rt: a, ut: d, ft: f, _t: p } = t, { V: m } = vt(), [_] = Tt({
1988
- u: Lo,
1989
- o: {
1990
- w: 0,
1991
- h: 0
1992
- }
1993
- }, () => {
1994
- const v = f(he, ge), C = f(dn, ""), y = C && It(l), $ = C && Xt(l);
1995
- p(he, ge), p(dn, ""), p("", Re, !0);
1996
- const I = We(i), T = We(l), k = Ve(l);
1997
- return p(he, ge, v), p(dn, "", C), p("", Re), It(l, y), Xt(l, $), {
1998
- w: T.w + I.w + k.w,
1999
- h: T.h + I.h + k.h
2000
1160
  };
2001
- }), h = a ? go : mn.concat(go), b = An(e, {
2002
- v: () => o,
2003
- g: () => s,
2004
- p(v, C) {
2005
- const [y] = v, [$] = C;
2006
- return [St(y).concat(St($)).reduce((I, T) => (I[T] = y[T] || $[T], I), {})];
1161
+ var o = Math.floor(Math.random() * (9999 - 0 + 1)) + 0;
1162
+ this.randomID = o, this.selector = t.selector.substring(1) || e.selector.substring(1), this.onComplete = t.onComplete || e.onComplete, this.onEnd = t.onEnd || e.onEnd, this.onTop = t.onTop || e.onTop, this.onMove = t.onMove || e.onMove, this.onDragStart = t.onDragStart || e.onDragStart, this.onDragStop = t.onDragStop || e.onDragStop, this.onTouchStart = t.onTouchStart || e.onTouchStart, this.onTouchStop = t.onTouchStop || e.onTouchStop, t.config || (t.config = e.config), t.config.dimensions == null ? t.config.dimensions = e.config.dimensions : t.config.dimensions;
1163
+ for (var s in e.config.dimensions)
1164
+ t.config.dimensions[s] == null ? t.config.dimensions[s] = e.config.dimensions[s] : t.config.dimensions[s] = t.config.dimensions[s];
1165
+ t.config.scroll == null ? t.config.scroll = e.config.scroll : t.config.scroll;
1166
+ for (var s in e.config.scroll)
1167
+ t.config.scroll[s] == null ? t.config.scroll[s] = e.config.scroll[s] : t.config.scroll[s] = t.config.scroll[s];
1168
+ let i = this, l = 0, a = 0, r = 0, d = !1, c = 0, p, y, B = 1, x = !1;
1169
+ function U() {
1170
+ const E = navigator.userAgent;
1171
+ if (/android/i.test(E))
1172
+ return "android";
1173
+ if (/iPad|iPhone|iPod/i.test(E))
1174
+ return "ios";
2007
1175
  }
2008
- }), x = (v) => {
2009
- X(v || pn, (C) => {
2010
- if (Bn(pn, C) > -1) {
2011
- const y = ut(c, C);
2012
- ee(y) ? ut(l, C, y) : gt(l, C);
2013
- }
2014
- });
2015
- }, u = (v, C) => {
2016
- const [y, $] = v, I = {
2017
- vt: $
1176
+ var k = this.checkTrackClick = function(g) {
1177
+ g.target.classList[0] != "lms_scroller" && (g.layerY < c.offsetTop && (i.scroller.style.top = i.scroller.style.top - 20, i.scrollElement.scrollTop = i.scrollElement.scrollTop - 40), g.layerY > c.offsetTop && (i.scroller.style.top = i.scroller.style.top + 20, i.scrollElement.scrollTop = i.scrollElement.scrollTop + 40));
2018
1178
  };
2019
- return n({
2020
- ht: y
2021
- }), !C && e(I), I;
2022
- }, g = ({ gt: v, Yt: C, Vt: y }) => {
2023
- const $ = !v || y ? e : b;
2024
- let I = !1;
2025
- if (C) {
2026
- const [T, k] = C;
2027
- I = k, n({
2028
- bt: T
2029
- });
2030
- }
2031
- $({
2032
- gt: v,
2033
- yt: I
2034
- });
2035
- }, D = (v, C) => {
2036
- const [, y] = _(), $ = {
2037
- wt: y
2038
- };
2039
- return y && !C && (v ? e : b)($), $;
2040
- }, w = (v, C, y) => {
2041
- const $ = {
2042
- Ot: C
1179
+ this.hideElement = function(g, _) {
1180
+ g.style.opacity = _;
2043
1181
  };
2044
- return C ? !y && b($) : d || x(v), $;
2045
- }, [E, N, z] = i || !m ? Fr(c, u) : [_t, _t, _t], [O, K] = d ? [_t, _t] : Zo(c, g, {
2046
- Vt: !0,
2047
- Bt: !0
2048
- }), [U, H] = po(c, !1, w, {
2049
- Pt: mn,
2050
- Ht: mn.concat(pn)
2051
- }), S = d && me && new me(g.bind(0, {
2052
- gt: !0
2053
- }));
2054
- return S && S.observe(c), x(), [() => {
2055
- E(), O(), r && r[0](), S && S.disconnect(), U();
2056
- }, () => {
2057
- K(), N();
2058
- }, () => {
2059
- const v = {}, C = H(), y = z(), $ = r && r[1]();
2060
- return C && G(v, w.apply(0, Z(C, !0))), y && G(v, u.apply(0, Z(y, !0))), $ && G(v, D.apply(0, Z($, !0))), v;
2061
- }, (v) => {
2062
- const [C] = v("update.ignoreMutation"), [y, $] = v("update.attributes"), [I, T] = v("update.elementEvents"), [k, B] = v("update.debounce"), M = T || $, F = (W) => kt(C) && C(W);
2063
- if (M && (r && (r[1](), r[0]()), r = po(i || l, !0, D, {
2064
- Ht: h.concat(y || []),
2065
- Dt: I,
2066
- Mt: mo,
2067
- kt: (W, j) => {
2068
- const { target: R, attributeName: q } = W;
2069
- return (!j && q && !d ? Ws(R, mo, Wr) : !1) || !!pe(R, `.${ht}`) || !!F(W);
1182
+ var T = this.calculateScrollerHeight = function(g) {
1183
+ var _ = l.offsetHeight / a.scrollHeight;
1184
+ return _ * l.offsetHeight;
1185
+ }, w = this.moveScroller = function(g) {
1186
+ var _, C, R = g.target.scrollTop / a.scrollHeight;
1187
+ if (p = R * l.offsetHeight, c.style.top = p + "px", typeof i.onMove == "function" && i.onMove(), a.scrollTopMax != null)
1188
+ C = Number(a.scrollTopMax), t.config.scroll.bottomOffset > 0 ? _ = Number(a.scrollTopMax) - Number(t.config.scroll.bottomOffset) : _ = a.scrollTopMax, g.target.scrollTop >= _ ? x == !1 && (typeof i.onEnd == "function" && i.onEnd(), x = !0, x = !0) : x = !1;
1189
+ else {
1190
+ C = Number(a.scrollTop);
1191
+ var Y = a.scrollHeight - a.clientHeight;
1192
+ t.config.scroll.bottomOffset > 0 ? _ = Y - Number(t.config.scroll.bottomOffset) : _ = Y, Math.ceil(C) >= _ ? x == !1 && (typeof i.onEnd == "function" && i.onEnd(), x = !0, x = !0) : x = !1;
2070
1193
  }
2071
- })), B)
2072
- if (b.m(), Lt(k)) {
2073
- const W = k[0], j = k[1];
2074
- o = te(W) && W, s = te(j) && j;
2075
- } else
2076
- te(k) ? (o = k, s = !1) : (o = !1, s = !1);
2077
- }];
2078
- }, ho = {
2079
- x: 0,
2080
- y: 0
2081
- }, Rr = (t) => ({
2082
- K: {
2083
- t: 0,
2084
- r: 0,
2085
- b: 0,
2086
- l: 0
2087
- },
2088
- St: !1,
2089
- P: {
2090
- marginRight: 0,
2091
- marginBottom: 0,
2092
- marginLeft: 0,
2093
- paddingTop: 0,
2094
- paddingRight: 0,
2095
- paddingBottom: 0,
2096
- paddingLeft: 0
2097
- },
2098
- zt: ho,
2099
- Tt: ho,
2100
- Ct: {
2101
- x: "hidden",
2102
- y: "hidden"
2103
- },
2104
- Et: {
2105
- x: !1,
2106
- y: !1
2107
- },
2108
- ht: !1,
2109
- bt: $e(t.Z)
2110
- }), Xr = (t, n) => {
2111
- const e = xn(n, {}), [o, s, r] = Mn(), [c, l, i] = Lr(t), a = Uo(Rr(c)), [d, f] = a, p = Ar(c, a), m = (g, D, w) => {
2112
- const N = St(g).some((z) => g[z]) || !Nn(D) || w;
2113
- return N && r("u", [g, D, w]), N;
2114
- }, [_, h, b, x] = Vr(c, f, (g) => m(p(e, g), {}, !1)), u = d.bind(0);
2115
- return u.jt = (g) => o("u", g), u.Nt = () => {
2116
- const { W: g, J: D } = c, w = It(g), E = Xt(g);
2117
- h(), l(), It(D, w), Xt(D, E);
2118
- }, u.qt = c, [(g, D) => {
2119
- const w = xn(n, g, D);
2120
- return x(w), m(p(w, b(), D), g, !!D);
2121
- }, u, () => {
2122
- s(), _(), i();
2123
- }];
2124
- }, { round: vo } = Math, qr = (t) => {
2125
- const { width: n, height: e } = Ot(t), { w: o, h: s } = _e(t);
2126
- return {
2127
- x: vo(n) / o || 1,
2128
- y: vo(e) / s || 1
2129
- };
2130
- }, Ur = (t, n, e) => {
2131
- const o = n.scrollbars, { button: s, isPrimary: r, pointerType: c } = t, { pointers: l } = o;
2132
- return s === 0 && r && o[e ? "dragScroll" : "clickScroll"] && (l || []).includes(c);
2133
- }, Yr = (t, n) => it(t, "mousedown", it.bind(0, n, "click", No, {
2134
- C: !0,
2135
- $: !0
2136
- }), {
2137
- $: !0
2138
- }), yo = "pointerup pointerleave pointercancel lostpointercapture", Zr = (t, n, e, o, s, r, c) => {
2139
- const { B: l } = vt(), { Ft: i, Gt: a, Xt: d } = o, f = `scroll${c ? "Left" : "Top"}`, p = `client${c ? "X" : "Y"}`, m = c ? "width" : "height", _ = c ? "left" : "top", h = c ? "w" : "h", b = c ? "x" : "y", x = (u, g) => (D) => {
2140
- const { Tt: w } = r(), E = _e(a)[h] - _e(i)[h], z = g * D / E * w[b], K = $e(d) && c ? l.n || l.i ? 1 : -1 : 1;
2141
- s[f] = u + z * K;
2142
- };
2143
- return it(a, "pointerdown", (u) => {
2144
- const g = pe(u.target, `.${Wn}`) === i, D = g ? i : a;
2145
- if (re(n, Ct, eo, !0), Ur(u, t, g)) {
2146
- const w = !g && u.shiftKey, E = () => Ot(i), N = () => Ot(a), z = (T, k) => (T || E())[_] - (k || N())[_], O = x(s[f] || 0, 1 / qr(s)[b]), K = u[p], U = E(), H = N(), S = U[m], v = z(U, H) + S / 2, C = K - H[_], y = g ? 0 : C - v, $ = (T) => {
2147
- Ht(I), D.releasePointerCapture(T.pointerId);
2148
- }, I = [re.bind(0, n, Ct, eo), it(e, yo, $), it(e, "selectstart", (T) => Oo(T), {
2149
- S: !1
2150
- }), it(a, yo, $), it(a, "pointermove", (T) => {
2151
- const k = T[p] - K;
2152
- (g || w) && O(y + k);
2153
- })];
2154
- if (w)
2155
- O(y);
2156
- else if (!g) {
2157
- const T = ae()[Sr];
2158
- T && Z(I, T.O(O, z, y, S, C));
1194
+ g.target.scrollTop <= 0 && typeof i.onTop == "function" && i.onTop();
1195
+ }, N = this.startDrag = function(g) {
1196
+ B = g.pageY, r = a.scrollTop, d = !0, typeof i.onDragStart == "function" && i.onDragStart();
1197
+ }, H = this.stopDrag = function(g) {
1198
+ d == !0 && (d = !1, typeof i.onDragStop == "function" && i.onDragStop());
1199
+ }, h = this.scrollBarScroll = function(g) {
1200
+ if (d === !0) {
1201
+ var _ = g.pageY - B, C = _ * (a.scrollHeight / l.offsetHeight);
1202
+ a.scrollTop = r + C;
2159
1203
  }
2160
- D.setPointerCapture(u.pointerId);
2161
- }
2162
- });
2163
- }, jr = (t, n) => (e, o, s, r, c, l) => {
2164
- const { Xt: i } = e, [a, d] = fe(333), f = !!c.scrollBy;
2165
- let p = !0;
2166
- return Ht.bind(0, [it(i, "pointerenter", () => {
2167
- o(so, !0);
2168
- }), it(i, "pointerleave pointercancel", () => {
2169
- o(so);
2170
- }), it(i, "wheel", (m) => {
2171
- const { deltaX: _, deltaY: h, deltaMode: b } = m;
2172
- f && p && b === 0 && Yt(i) === r && c.scrollBy({
2173
- left: _,
2174
- top: h,
2175
- behavior: "smooth"
2176
- }), p = !1, o(co, !0), a(() => {
2177
- p = !0, o(co);
2178
- }), Oo(m);
2179
- }, {
2180
- S: !1,
2181
- $: !0
2182
- }), Yr(i, s), Zr(t, r, s, e, c, n, l), d]);
2183
- }, { min: _n, max: bo, abs: Kr, round: Jr } = Math, jo = (t, n, e, o) => {
2184
- if (o) {
2185
- const l = e ? "x" : "y", { Tt: i, zt: a } = o, d = a[l], f = i[l];
2186
- return bo(0, _n(1, d / (d + f)));
2187
- }
2188
- const s = e ? "width" : "height", r = Ot(t)[s], c = Ot(n)[s];
2189
- return bo(0, _n(1, r / c));
2190
- }, Gr = (t, n, e, o, s, r) => {
2191
- const { B: c } = vt(), l = r ? "x" : "y", i = r ? "Left" : "Top", { Tt: a } = o, d = Jr(a[l]), f = Kr(e[`scroll${i}`]), p = r && s, m = c.i ? f : d - f, h = _n(1, (p ? m : f) / d), b = jo(t, n, r);
2192
- return 1 / b * (1 - b) * h;
2193
- }, Qr = (t, n, e) => {
2194
- const { N: o, L: s } = vt(), { scrollbars: r } = o(), { slot: c } = r, { ct: l, W: i, Z: a, J: d, lt: f, ot: p, it: m, ut: _ } = n, { scrollbars: h } = f ? {} : t, { slot: b } = h || {}, x = Xo([i, a, d], () => _ && m ? i : a, c, b), u = (y, $, I) => {
2195
- const T = I ? qt : Hn;
2196
- X(y, (k) => {
2197
- T(k.Xt, $);
2198
- });
2199
- }, g = (y, $) => {
2200
- X(y, (I) => {
2201
- const [T, k] = $(I);
2202
- ft(T, k);
2203
- });
2204
- }, D = (y, $, I) => {
2205
- g(y, (T) => {
2206
- const { Ft: k, Gt: B } = T;
2207
- return [k, {
2208
- [I ? "width" : "height"]: `${(100 * jo(k, B, I, $)).toFixed(3)}%`
2209
- }];
2210
- });
2211
- }, w = (y, $, I) => {
2212
- const T = I ? "X" : "Y";
2213
- g(y, (k) => {
2214
- const { Ft: B, Gt: M, Xt: F } = k, W = Gr(B, M, p, $, $e(F), I);
2215
- return [B, {
2216
- transform: W === W ? `translate${T}(${(100 * W).toFixed(3)}%)` : ""
2217
- }];
2218
- });
2219
- }, E = [], N = [], z = [], O = (y, $, I) => {
2220
- const T = Ln(I), k = T ? I : !0, B = T ? !I : !0;
2221
- k && u(N, y, $), B && u(z, y, $);
2222
- }, K = (y) => {
2223
- D(N, y, !0), D(z, y);
2224
- }, U = (y) => {
2225
- w(N, y, !0), w(z, y);
2226
- }, H = (y) => {
2227
- const $ = y ? fr : pr, I = y ? N : z, T = En(I) ? oo : "", k = ie(`${ht} ${$} ${T}`), B = ie(Vo), M = ie(Wn), F = {
2228
- Xt: k,
2229
- Gt: B,
2230
- Ft: M
1204
+ }, F = this.refreshScroll = function(g) {
1205
+ y = T(), y / l.offsetHeight < 1 ? (i.scrollTrack.style.display = "block", c.style.height = y + "px") : (i.scrollTrack.style.display = "none", c.style.height = "0px");
2231
1206
  };
2232
- return s || qt(k, lr), Dt(k, B), Dt(B, M), Z(I, F), Z(E, [zt.bind(0, k), e(F, O, l, a, p, y)]), F;
2233
- }, S = H.bind(0, !0), v = H.bind(0, !1), C = () => {
2234
- Dt(x, N[0].Xt), Dt(x, z[0].Xt), Fe(() => {
2235
- O(oo);
2236
- }, 300);
2237
- };
2238
- return S(), v(), [{
2239
- Ut: K,
2240
- Wt: U,
2241
- Zt: O,
2242
- Jt: {
2243
- Kt: N,
2244
- Qt: S,
2245
- tn: g.bind(0, N)
2246
- },
2247
- nn: {
2248
- Kt: z,
2249
- Qt: v,
2250
- tn: g.bind(0, z)
2251
- }
2252
- }, C, Ht.bind(0, E)];
2253
- }, ti = (t, n, e, o) => {
2254
- let s, r, c, l, i, a = 0;
2255
- const d = Uo({}), [f] = d, [p, m] = fe(), [_, h] = fe(), [b, x] = fe(100), [u, g] = fe(100), [D, w] = fe(() => a), [E, N, z] = Qr(t, e.qt, jr(n, e)), { Z: O, J: K, ot: U, st: H, ut: S, it: v } = e.qt, { Jt: C, nn: y, Zt: $, Ut: I, Wt: T } = E, { tn: k } = C, { tn: B } = y, M = (q) => {
2256
- const { Xt: V } = q, J = S && !v && Yt(V) === K && V;
2257
- return [J, {
2258
- transform: J ? `translate(${It(U)}px, ${Xt(U)}px)` : ""
2259
- }];
2260
- }, F = (q, V) => {
2261
- if (w(), q)
2262
- $(io);
2263
- else {
2264
- const J = () => $(io, !0);
2265
- a > 0 && !V ? D(J) : J();
1207
+ function J(E, g) {
1208
+ var _;
1209
+ return function() {
1210
+ var C = this, R = arguments, Y = function() {
1211
+ _ = !1;
1212
+ };
1213
+ _ || (E.apply(C, R), _ = !0, setTimeout(Y, g));
1214
+ };
2266
1215
  }
2267
- }, W = () => {
2268
- l = r, l && F(!0);
2269
- }, j = [x, w, g, h, m, z, it(O, "pointerover", W, {
2270
- C: !0
2271
- }), it(O, "pointerenter", W), it(O, "pointerleave", () => {
2272
- l = !1, r && F(!1);
2273
- }), it(O, "pointermove", () => {
2274
- s && p(() => {
2275
- x(), F(!0), u(() => {
2276
- s && F(!1);
2277
- });
2278
- });
2279
- }), it(H, "scroll", (q) => {
2280
- _(() => {
2281
- T(e()), c && F(!0), b(() => {
2282
- c && !l && F(!1);
2283
- });
2284
- }), o(q), S && k(M), S && B(M);
2285
- })], R = f.bind(0);
2286
- return R.qt = E, R.Nt = N, [(q, V, J) => {
2287
- const { At: Q, Lt: ct, It: at, yt: nt } = J, { A: Y } = vt(), tt = xn(n, q, V), xt = e(), { Tt: yt, Ct: jt, bt: ne } = xt, [le, ve] = tt("showNativeOverlaidScrollbars"), [rt, bt] = tt("scrollbars.theme"), [mt, At] = tt("scrollbars.visibility"), [de, je] = tt("scrollbars.autoHide"), [Ke] = tt("scrollbars.autoHideDelay"), [Je, Ge] = tt("scrollbars.dragScroll"), [Bt, Ce] = tt("scrollbars.clickScroll"), Qe = Q || ct || nt, tn = at || At, Pt = le && Y.x && Y.y, Mt = ($t, ye) => {
2288
- const Et = mt === "visible" || mt === "auto" && $t === "scroll";
2289
- return $(mr, Et, ye), Et;
2290
- };
2291
- if (a = Ke, ve && $(dr, Pt), bt && ($(i), $(rt, !0), i = rt), je && (s = de === "move", r = de === "leave", c = de !== "never", F(!c, !0)), Ge && $(vr, Je), Ce && $(hr, Bt), tn) {
2292
- const $t = Mt(jt.x, !0), ye = Mt(jt.y, !1);
2293
- $(gr, !($t && ye));
1216
+ this.SetupScroll = function() {
1217
+ let g = document.getElementById(this.selector), _ = g.style.cssText;
1218
+ g.classList.add("lms_scrollable"), g.style.cssText = _ + " width:" + t.config.dimensions.width + ";height:" + t.config.dimensions.height;
1219
+ let C = g.innerHTML;
1220
+ g.innerHTML = "", g.insertAdjacentHTML("afterbegin", "<div id='scroll_inner_" + o + "' class='lms_content_wrapper'></div>");
1221
+ let R = document.getElementById("scroll_inner_" + o);
1222
+ R.insertAdjacentHTML("afterbegin", "<div id='scroll_content_" + o + "' class='lms_content'></div> <div style='display:none;' id='lms_track_" + o + "' class='lms_scroll_track'></div>");
1223
+ let Y = document.getElementById("scroll_content_" + o), ee = document.getElementById("lms_track_" + o);
1224
+ Y.innerHTML = C, this.scrollTrack = ee, this.scrollElement = R, this.scrollContent = Y, this.mainElement = g, l = g, a = R, y = T(), ee.insertAdjacentHTML("beforeend", "<div id='lms_scroller_" + o + "' class='lms_scroller'></div>"), c = document.getElementById("lms_scroller_" + o), this.scroller = c, c.addEventListener("mousedown", N), window.addEventListener("mouseup", H), window.addEventListener("mousemove", h), y / l.offsetHeight < 1 && (c.style.height = y + "px", this.scrollTrack.style.display = "block", l.className += " lms_showScroll"), a.addEventListener("scroll", w), U() ? (t.config.scroll.autoHide == !0 && i.hideElement(c, 0), l.addEventListener("touchstart", function() {
1225
+ typeof i.onTouchStart == "function" && i.onTouchStart(), t.config.scroll.autoHide == !0 && i.hideElement(c, 1);
1226
+ }), l.addEventListener("touchend", function() {
1227
+ typeof i.onTouchStop == "function" && i.onTouchStop(), t.config.scroll.autoHide == !0 && i.hideElement(c, 0);
1228
+ })) : (ee.addEventListener("click", k), t.config.scroll.autoHide == !0 && (this.hideElement(c, 0), l.addEventListener("mouseover", function() {
1229
+ i.hideElement(c, 1);
1230
+ }), l.addEventListener("mouseout", function() {
1231
+ i.hideElement(c, 0);
1232
+ }))), typeof this.onComplete == "function" && this.onComplete();
1233
+ }, this.SetupScroll();
1234
+ var Q = J(function() {
1235
+ F();
1236
+ }, 10);
1237
+ window.addEventListener("resize", Q);
1238
+ }
1239
+ /*
1240
+ ** Methods
1241
+ */
1242
+ // Scroll to specific value
1243
+ scrollTo(t) {
1244
+ this.scroller.style.top = "0px", this.scrollElement.scrollTop = 0, this.scroller.style.top = t + "px", this.scrollElement.scrollTop = t;
1245
+ }
1246
+ // Destroy scrollbar and unbind all its events
1247
+ destroy() {
1248
+ let t = this.scrollContent.innerHTML;
1249
+ this.scrollContent.remove(), this.scrollElement.remove(), this.mainElement.innerHTML = t, this.mainElement.classList.remove("lms_scrollable"), this.mainElement.classList.remove("lms_showScroll");
1250
+ }
1251
+ // Refresh scroll
1252
+ refresh() {
1253
+ this.refreshScroll(), this.scrollTo(this.scrollElement.scrollTop);
1254
+ }
1255
+ // rebuild scroll
1256
+ build() {
1257
+ this.SetupScroll();
1258
+ }
1259
+ // Append items to scroll container
1260
+ async appendTo(t) {
1261
+ function e(l) {
1262
+ typeof l == "function" && l();
2294
1263
  }
2295
- Qe && (I(xt), T(xt), $(ro, !yt.x, !0), $(ro, !yt.y, !1), $(ur, ne && !v));
2296
- }, R, Ht.bind(0, j)];
2297
- }, Ko = (t, n, e) => {
2298
- kt(t) && t(n || void 0, e || void 0);
2299
- }, Qt = (t, n, e) => {
2300
- const { F: o, N: s, Y: r, j: c } = vt(), l = ae(), i = Pe(t), a = i ? t : t.target, d = qo(a);
2301
- if (n && !d) {
2302
- let f = !1;
2303
- const p = (S) => {
2304
- const v = ae()[br], C = v && v.O;
2305
- return C ? C(S, !0) : S;
2306
- }, m = G({}, o(), p(n)), [_, h, b] = Mn(e), [x, u, g] = Xr(t, m), [D, w, E] = ti(t, m, u, (S) => b("scroll", [H, S])), N = (S, v) => x(S, !!v), z = N.bind(0, {}, !0), O = r(z), K = c(z), U = (S) => {
2307
- kr(a), O(), K(), E(), g(), f = !0, b("destroyed", [H, !!S]), h();
2308
- }, H = {
2309
- options(S, v) {
2310
- if (S) {
2311
- const C = v ? o() : {}, y = zo(m, G(C, p(S)));
2312
- Nn(y) || (G(m, y), N(y));
2313
- }
2314
- return G({}, m);
2315
- },
2316
- on: _,
2317
- off: (S, v) => {
2318
- S && v && h(S, v);
2319
- },
2320
- state() {
2321
- const { zt: S, Tt: v, Ct: C, Et: y, K: $, St: I, bt: T } = u();
2322
- return G({}, {
2323
- overflowEdge: S,
2324
- overflowAmount: v,
2325
- overflowStyle: C,
2326
- hasOverflow: y,
2327
- padding: $,
2328
- paddingAbsolute: I,
2329
- directionRTL: T,
2330
- destroyed: f
2331
- });
2332
- },
2333
- elements() {
2334
- const { W: S, Z: v, K: C, J: y, tt: $, ot: I, st: T } = u.qt, { Jt: k, nn: B } = w.qt, M = (W) => {
2335
- const { Ft: j, Gt: R, Xt: q } = W;
2336
- return {
2337
- scrollbar: q,
2338
- track: R,
2339
- handle: j
2340
- };
2341
- }, F = (W) => {
2342
- const { Kt: j, Qt: R } = W, q = M(j[0]);
2343
- return G({}, q, {
2344
- clone: () => {
2345
- const V = M(R());
2346
- return D({}, !0, {}), V;
2347
- }
2348
- });
2349
- };
2350
- return G({}, {
2351
- target: S,
2352
- host: v,
2353
- padding: C || y,
2354
- viewport: y,
2355
- content: $ || y,
2356
- scrollOffsetElement: I,
2357
- scrollEventElement: T,
2358
- scrollbarHorizontal: F(k),
2359
- scrollbarVertical: F(B)
2360
- });
2361
- },
2362
- update: (S) => N({}, S),
2363
- destroy: U.bind(0)
2364
- };
2365
- return u.jt((S, v, C) => {
2366
- D(v, C, S);
2367
- }), Ir(a, H), X(St(l), (S) => Ko(l[S], 0, H)), Cr(u.qt.it, s().cancel, !i && t.cancel) ? (U(!0), H) : (u.Nt(), w.Nt(), b("initialized", [H]), u.jt((S, v, C) => {
2368
- const { gt: y, yt: $, vt: I, At: T, Lt: k, It: B, wt: M, Ot: F } = S;
2369
- b("updated", [H, {
2370
- updateHints: {
2371
- sizeChanged: y,
2372
- directionChanged: $,
2373
- heightIntrinsicChanged: I,
2374
- overflowEdgeChanged: T,
2375
- overflowAmountChanged: k,
2376
- overflowStyleChanged: B,
2377
- contentMutation: M,
2378
- hostMutation: F
2379
- },
2380
- changedOptions: v,
2381
- force: C
2382
- }]);
2383
- }), H.update(!0), H);
1264
+ var o = t.position;
1265
+ if (o == null)
1266
+ var o = "beforeend";
1267
+ if (t.items && typeof t.items == "object")
1268
+ for (var s = Object.keys(t.items).length, i = 0; i < s; i++)
1269
+ this.scrollContent.insertAdjacentHTML(o, t.items[i].content);
1270
+ this.refresh(), typeof t.onComplete == "function" && e(t.onComplete);
2384
1271
  }
2385
- return d;
2386
- };
2387
- Qt.plugin = (t) => {
2388
- X(yr(t), (n) => Ko(n, Qt));
2389
- };
2390
- Qt.valid = (t) => {
2391
- const n = t && t.elements, e = kt(n) && n();
2392
- return vn(e) && !!qo(e.target);
2393
- };
2394
- Qt.env = () => {
2395
- const { k: t, A: n, I: e, B: o, V: s, L: r, X: c, U: l, N: i, q: a, F: d, G: f } = vt();
2396
- return G({}, {
2397
- scrollbarsSize: t,
2398
- scrollbarsOverlaid: n,
2399
- scrollbarsHiding: e,
2400
- rtlScrollBehavior: o,
2401
- flexboxGlue: s,
2402
- cssCustomProperties: r,
2403
- staticDefaultInitialization: c,
2404
- staticDefaultOptions: l,
2405
- getDefaultInitialization: i,
2406
- setDefaultInitialization: a,
2407
- getDefaultOptions: d,
2408
- setDefaultOptions: f
2409
- });
2410
- };
2411
- const ei = () => {
2412
- if (typeof window > "u") {
2413
- const a = () => {
2414
- };
2415
- return [a, a];
1272
+ /*
1273
+ ** API > Gets
1274
+ */
1275
+ // Get main element Id
1276
+ get mainElementId() {
1277
+ return "scroll_content_" + this.randomID;
2416
1278
  }
2417
- let t, n;
2418
- const e = window, o = typeof e.requestIdleCallback == "function", s = e.requestAnimationFrame, r = e.cancelAnimationFrame, c = o ? e.requestIdleCallback : s, l = o ? e.cancelIdleCallback : r, i = () => {
2419
- l(t), r(n);
2420
- };
2421
- return [
2422
- (a, d) => {
2423
- i(), t = c(
2424
- o ? () => {
2425
- i(), n = s(a);
2426
- } : a,
2427
- typeof d == "object" ? d : { timeout: 2233 }
2428
- );
2429
- },
2430
- i
2431
- ];
2432
- }, ni = (t) => {
2433
- let n = null, e, o, s;
2434
- const r = hn(t || {}), [c, l] = ei();
2435
- return Se(
2436
- () => {
2437
- var i;
2438
- return et((i = r.value) == null ? void 0 : i.defer);
2439
- },
2440
- (i) => {
2441
- s = i;
2442
- },
2443
- { deep: !0, immediate: !0 }
2444
- ), Se(
2445
- () => {
2446
- var i;
2447
- return et((i = r.value) == null ? void 0 : i.options);
2448
- },
2449
- (i) => {
2450
- e = i, Qt.valid(n) && n.options(e || {}, !0);
2451
- },
2452
- { deep: !0, immediate: !0 }
2453
- ), Se(
2454
- () => {
2455
- var i;
2456
- return et((i = r.value) == null ? void 0 : i.events);
2457
- },
2458
- (i) => {
2459
- o = i, Qt.valid(n) && n.on(
2460
- /* c8 ignore next */
2461
- o || {},
2462
- !0
2463
- );
2464
- },
2465
- { deep: !0, immediate: !0 }
2466
- ), xo(() => {
2467
- l(), n == null || n.destroy();
2468
- }), [
2469
- (i) => {
2470
- if (Qt.valid(n))
2471
- return n;
2472
- const a = () => n = Qt(i, e || {}, o || {});
2473
- s ? c(a, s) : a();
2474
- },
2475
- () => n
2476
- ];
2477
- }, li = /* @__PURE__ */ rs({
1279
+ // Get scrollbar id
1280
+ get scrollbarId() {
1281
+ return "lms_scroller_" + this.randomID;
1282
+ }
1283
+ // Get trackbar id
1284
+ get trackbarId() {
1285
+ return "lms_track_" + this.randomID;
1286
+ }
1287
+ }
1288
+ const je = ["id"], tt = {
2478
1289
  __name: "DScrollbars",
2479
- props: {
2480
- element: {},
2481
- options: {},
2482
- events: {},
2483
- defer: {}
2484
- },
2485
- emits: ["osInitialized", "osUpdated", "osDestroyed", "osScroll"],
2486
- setup(t, { expose: n, emit: e }) {
2487
- const o = t, s = {
2488
- initialized: "osInitialized",
2489
- updated: "osUpdated",
2490
- destroyed: "osDestroyed",
2491
- scroll: "osScroll"
2492
- }, { element: r, options: c, events: l, defer: i } = is(o), a = hn(null), d = hn(null), f = Nt(), p = Nt(!1), [m, _] = ni({ options: c, events: f, defer: i });
2493
- return n({
2494
- osInstance: _,
2495
- getElement: () => a.value
2496
- }), cs(() => {
2497
- p.value = !0;
2498
- }), as((b) => {
2499
- const { value: x } = a, { value: u } = d;
2500
- p.value && x && u && (m({
2501
- target: x,
2502
- elements: {
2503
- viewport: u,
2504
- content: u
1290
+ setup(n) {
1291
+ const e = ce().uid;
1292
+ return ye(() => {
1293
+ new Ue({
1294
+ selector: `#scr${e}`,
1295
+ config: {
1296
+ dimensions: {
1297
+ width: "auto",
1298
+ height: "200px"
1299
+ },
1300
+ scroll: {
1301
+ bottomOffset: 0,
1302
+ autoHide: !0
1303
+ }
2505
1304
  }
2506
- }), b(() => {
2507
- var g;
2508
- return (g = _()) == null ? void 0 : g.destroy();
2509
- }));
2510
- }), Se(
2511
- () => et(l),
2512
- (b) => {
2513
- const x = b || {};
2514
- f.value = Object.keys(s).reduce((u, g) => {
2515
- const D = x[g];
2516
- return u[g] = [
2517
- (...w) => e(
2518
- s[g],
2519
- ...w
2520
- ),
2521
- ...(Array.isArray(D) ? D : [D]).filter(Boolean)
2522
- ], u;
2523
- }, {});
2524
- },
2525
- { deep: !0, immediate: !0 }
2526
- ), (b, x) => (A(), st(Vt(et(r) || "div"), {
2527
- "data-overlayscrollbars-initialize": "",
2528
- ref_key: "elementRef",
2529
- ref: a
2530
- }, {
2531
- default: wt(() => [
2532
- p.value ? (A(), lt("div", {
2533
- key: 0,
2534
- ref_key: "slotRef",
2535
- ref: d,
2536
- "data-overlayscrollbars-contents": ""
2537
- }, [
2538
- ot(b.$slots, "default")
2539
- ], 512)) : ot(b.$slots, "default", { key: 1 })
2540
- ]),
2541
- _: 3
2542
- }, 512));
1305
+ });
1306
+ }), (o, s) => (m(), D("div", {
1307
+ id: `scr${S(e)}`,
1308
+ style: { overflow: "auto" }
1309
+ }, [
1310
+ v(o.$slots, "default")
1311
+ ], 8, je));
2543
1312
  }
2544
- });
1313
+ };
2545
1314
  export {
2546
- ii as DAccordion,
2547
- ms as DBadge,
2548
- si as DButton,
2549
- gs as DCollapse,
2550
- ai as DConfigProvider,
2551
- ue as DGlobalStore,
2552
- we as DIcon,
2553
- Rt as DIconStore,
2554
- ri as DInput,
2555
- ci as DLayoutAdmin,
2556
- Es as DLayoutContent,
2557
- Ls as DLayoutFooter,
2558
- Is as DLayoutHeader,
2559
- Bs as DLayoutSidebar,
2560
- ks as DLayoutTab,
2561
- li as DScrollbar,
2562
- Ae as DTransferStore,
2563
- Ts as DTree,
2564
- $s as DTreeItem,
2565
- L as DTreeStore,
2566
- se as emitter,
2567
- _s as eventsBus
1315
+ Je as DAccordion,
1316
+ xe as DBadge,
1317
+ Ke as DButton,
1318
+ $e as DCollapse,
1319
+ et as DConfigProvider,
1320
+ j as DGlobalStore,
1321
+ K as DIcon,
1322
+ z as DIconStore,
1323
+ qe as DInput,
1324
+ Qe as DLayoutAdmin,
1325
+ Ve as DLayoutContent,
1326
+ Pe as DLayoutFooter,
1327
+ Ae as DLayoutHeader,
1328
+ Oe as DLayoutSidebar,
1329
+ Fe as DLayoutTab,
1330
+ tt as DScrollbars,
1331
+ q as DTransferStore,
1332
+ We as DTree,
1333
+ He as DTreeItem,
1334
+ u as DTreeStore,
1335
+ X as emitter,
1336
+ Ce as eventsBus
2568
1337
  };