layerpro 2.1.5 → 2.2.5

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/index.js CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  import o from "jquery";
4
4
 
5
- var t, i, n, p, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNames, u = (e, o) => function() {
5
+ var t, i, n, p, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNames, l = (e, o) => function() {
6
6
  return e && (o = (0, e[d(e)[0]])(e = 0)), o;
7
- }, l = (e, o) => {
7
+ }, u = (e, o) => {
8
8
  for (var t in o) a(e, t, {
9
9
  get: o[t],
10
10
  enumerable: !0
11
11
  });
12
- }, h = u({
12
+ }, h = l({
13
13
  "core/credits.ts"() {
14
14
  t = e => {}, Object.defineProperty(layerpro, "credits", {
15
15
  value: t,
@@ -19,24 +19,27 @@ var t, i, n, p, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNam
19
19
  }
20
20
  });
21
21
 
22
- l({}, {
22
+ u({}, {
23
23
  getMouseDirection: () => c,
24
24
  mouseCoord: () => i
25
25
  });
26
26
 
27
- var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W, D, X, Y, U, K, B, F, q, J, Q, G = u({
27
+ var m, b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, D, X, q, Y, U, K, B, F, J, Q, G, V, Z = l({
28
28
  "core/mouseCoords.ts"() {
29
29
  i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
30
30
  p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
31
31
  s = e.pageX, r = e.pageY, [ n, p ]);
32
32
  }
33
- }), V = u({
33
+ }), ee = l({
34
34
  "core/message.ts"() {
35
- m = e => {
36
- const o = document.createElement("div");
37
- return o.textContent = e, o.innerHTML;
38
- }, b = e => {
39
- const o = m(String(e)), t = window.layerpro.popup.open({
35
+ m = {
36
+ "&": "&amp;",
37
+ "<": "&lt;",
38
+ ">": "&gt;",
39
+ '"': "&quot;",
40
+ "'": "&#39;"
41
+ }, b = e => e.replace(/[&<>"']/g, e => m[e]), _ = e => {
42
+ const o = b(String(e)), t = window.layerpro.popup.open({
40
43
  id: "__alert",
41
44
  name: "Warning",
42
45
  icon: "&#9888;",
@@ -54,8 +57,8 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
54
57
  $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
55
58
  window.layerpro.popup.close(t);
56
59
  });
57
- }, _ = (e, o) => {
58
- const t = m(String(e)), i = window.layerpro.popup.open({
60
+ }, f = (e, o) => {
61
+ const t = b(String(e)), i = window.layerpro.popup.open({
59
62
  id: "__message",
60
63
  name: "Message",
61
64
  icon: "&#9965;",
@@ -73,9 +76,9 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
73
76
  $(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
74
77
  o && o(), window.layerpro.popup.close(i);
75
78
  });
76
- }, f = (e, o, t) => {
79
+ }, v = (e, o, t) => {
77
80
  if (0 === $(".confirm").length) {
78
- const i = m(String(e)), n = window.layerpro.popup.open({
81
+ const i = b(String(e)), n = window.layerpro.popup.open({
79
82
  id: "__confirm",
80
83
  name: "Confirm",
81
84
  icon: "&#9745;",
@@ -96,8 +99,8 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
96
99
  t && t(), window.layerpro.popup.close(n);
97
100
  });
98
101
  }
99
- }, v = (e, o) => {
100
- const t = o || "_prompt", i = m(String(e)), n = window.layerpro.popup.open({
102
+ }, g = (e, o) => {
103
+ const t = o || "_prompt", i = b(String(e)), n = window.layerpro.popup.open({
101
104
  id: "__prompt",
102
105
  name: "Prompt",
103
106
  icon: "&#9998;",
@@ -137,31 +140,36 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
137
140
  enumerable: !1
138
141
  }), Object.defineProperties(window.layerpro, {
139
142
  prompt: {
140
- value: v
143
+ value: g
141
144
  },
142
145
  alert: {
143
- value: b
146
+ value: _
144
147
  },
145
148
  message: {
146
- value: _
149
+ value: f
147
150
  },
148
151
  confirm: {
149
- value: f
152
+ value: v
150
153
  }
151
154
  });
152
155
  }
153
- }), Z = u({
156
+ }), oe = l({
154
157
  "core/genLayer.ts"() {
155
- V(), g = new Map, w = new Map, y = e => {
156
- const o = document.createElement("div");
157
- return o.textContent = e, o.innerHTML;
158
- }, z = o => {
158
+ ee(), w = new Map, y = new Map, z = {
159
+ "&": "&amp;",
160
+ "<": "&lt;",
161
+ ">": "&gt;",
162
+ '"': "&quot;",
163
+ "'": "&#39;"
164
+ }, k = e => e.replace(/[&<>"']/g, e => z[e]), x = o => {
159
165
  if ("function" == typeof o.body) return;
160
- const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup";
161
- $('[class^="popup_window_"]', t).removeClass("zHigh"), $('[class^="popup_bar_"]', t).removeClass("popup_bar_selected"),
162
- $('[class^="icon_"]', t).removeClass("popup_bar_selected"), !0 === o.raised && $('<div class="popup_raised_' + o.id + '">', t).appendTo("#popup").css({
166
+ const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup", i = "#popup" === t ? document.querySelector("#popup") : document.querySelector(t);
167
+ i?.querySelectorAll('[class^="popup_window_"]').forEach(e => e.classList.remove("zHigh")),
168
+ i?.querySelectorAll('[class^="popup_bar_"]').forEach(e => e.classList.remove("popup_bar_selected")),
169
+ i?.querySelectorAll('[class^="icon_"]').forEach(e => e.classList.remove("popup_bar_selected")),
170
+ !0 === o.raised && $('<div class="popup_raised_' + o.id + '">', t).appendTo("#popup").css({
163
171
  "pointer-events": "auto",
164
- "z-index": Number(layerpro.popup.zIndex($('[class^="popup_overflow_"]', t))) + 1e3
172
+ "z-index": layerpro.popup.zIndex() + 1e3
165
173
  }), $('<div class="popup_overflow_' + o.id + '">', t).appendTo(t).css({
166
174
  top: o.top,
167
175
  left: o.left,
@@ -174,68 +182,68 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
174
182
  maxWidth: o.maxWidth,
175
183
  maxHeight: o.maxHeight,
176
184
  pointerEvents: "auto",
177
- zIndex: Number(layerpro.popup.zIndex($('[class^="popup_overflow_"]', t))) + 1
185
+ zIndex: layerpro.popup.zIndex()
178
186
  }).on("mousedown", e => {
179
187
  layerpro.popup.index(o);
180
188
  }).hide().fadeIn(o.fadeIn);
181
- const i = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
189
+ const n = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
182
190
  "pointer-events": "auto"
183
191
  }).addClass("zHigh").addClass(o.class);
184
192
  0 === [ o.top, o.left, o.bottom, o.right ].reduce((e, o) => "number" == typeof o && isFinite(o) ? Number(e) + o : e, 0) && layerpro.popup.center(o),
185
193
  layerpro.popup.unmount = e => {
186
- const o = g.get(e);
187
- o && (o.unmount(), g.delete(e));
188
- }, layerpro.popup.cleanupEvents = e => {
189
194
  const o = w.get(e);
195
+ o && (o.unmount(), w.delete(e));
196
+ }, layerpro.popup.cleanupEvents = e => {
197
+ const o = y.get(e);
190
198
  o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
191
199
  o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
192
200
  o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
193
- w.delete(e));
194
- }, layerpro.popup.getReactRoot = e => g.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(i).addClass("popup_bar_selected"),
201
+ y.delete(e));
202
+ }, layerpro.popup.getReactRoot = e => w.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(n).addClass("popup_bar_selected"),
195
203
  o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</div>", t).appendTo(".popup_bar_" + o.id);
196
- const n = y(String(o.name));
197
- if ($('<div class="popup_drag_' + o.id + '">' + n + "</div>", t).appendTo(".popup_bar_" + o.id),
204
+ const p = k(String(o.name));
205
+ if ($('<div class="popup_drag_' + o.id + '">' + p + "</div>", t).appendTo(".popup_bar_" + o.id),
198
206
  $('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
199
207
  !0 === o.iconize && 0 === $("#popup_dock").length) {
200
208
  $("#root").css("margin", "0 0 var( --dock-height ) 0");
201
209
  $('\n <div id="popup_dock">\n <div id="popup_dock_icon"></div>\n <div id="popup_dock_list"></div>\n <div id="popup_dock_options"></div>\n </div>\n ').appendTo("#popup").css({
202
210
  pointerEvents: "auto",
203
- zIndex: Number(layerpro.popup.zIndex($("#popup"))) + 1e3
211
+ zIndex: layerpro.popup.zIndex() + 1e3
204
212
  });
205
213
  }
206
214
  if ($("#popup_dock").length > 0 && !0 === o.dockable) {
207
- const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${n}</span>\n `, i = function(e) {
215
+ const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${p}</span>\n `, i = function(e) {
208
216
  $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
209
217
  layerpro.popup.index(o);
210
- }, p = function(e) {
218
+ }, n = function(e) {
211
219
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
212
220
  };
213
- w.set(e, {
221
+ y.set(e, {
214
222
  iconClick: !0,
215
223
  iconClose: !0
216
224
  }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
217
- $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", p);
225
+ $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
218
226
  }
219
227
  if (!0 === o.iconize) {
220
228
  const e = String(o.id), t = function(e) {
221
229
  layerpro.popup.iconize(o);
222
- }, i = w.get(e) || {};
223
- i.buttonIconize = !0, w.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
230
+ }, i = y.get(e) || {};
231
+ i.buttonIconize = !0, y.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
224
232
  }
225
233
  if (!0 === o.maximize) {
226
234
  const e = String(o.id), t = function(e) {
227
235
  layerpro.popup.maximize(o);
228
- }, i = w.get(e) || {};
229
- i.buttonMaximize = !0, w.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
236
+ }, i = y.get(e) || {};
237
+ i.buttonMaximize = !0, y.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
230
238
  }
231
239
  if (!0 === o.close) {
232
240
  const e = String(o.id), t = function(e) {
233
241
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
234
- }, i = w.get(e) || {};
235
- i.buttonClose = !0, w.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
242
+ }, i = y.get(e) || {};
243
+ i.buttonClose = !0, y.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
236
244
  }
237
- const p = String(o.id), s = w.get(p) || {};
238
- if (s.escKey = !0, w.set(p, s), $(document).on("keydown", function(e) {
245
+ const s = String(o.id), r = y.get(s) || {};
246
+ if (r.escKey = !0, y.set(s, r), $(document).on("keydown", function(e) {
239
247
  "Escape" !== e.key && 27 !== e.keyCode || (o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(),
240
248
  layerpro.popup.close(o));
241
249
  }), o.timer > 0) {
@@ -258,14 +266,14 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
258
266
  if ((e.headers.get("content-type") || "").includes("text/html"), !e.ok) throw new Error(`HTTP error! status: ${e.status}`);
259
267
  return e.text();
260
268
  }).then(t => {
261
- const i = y(t);
269
+ const i = k(t);
262
270
  e.hide().html(i).fadeIn(o.fadeIn);
263
271
  }).catch(e => {});
264
272
  }
265
273
  o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
266
274
  o.isMaximize && layerpro.popup.maximize(o);
267
- const r = $('<div class="popup_overflow_' + o.id + '">', "#popup");
268
- $('<div class="popup_internal_' + o.id + '">', r).appendTo(i), $('<div class="popup_body_' + o.id + '">', r).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
275
+ const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
276
+ $('<div class="popup_internal_' + o.id + '">', c).appendTo(n), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
269
277
  (() => {
270
278
  if (o.body && !o.source) {
271
279
  const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
@@ -275,16 +283,16 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
275
283
  if (!t) return;
276
284
  try {
277
285
  const i = e(t);
278
- i.render(o.body), g.set(String(o.id), i);
286
+ i.render(o.body), w.set(String(o.id), i);
279
287
  } catch (e) {
280
288
  const o = e?.message || String(e);
281
289
  o.includes("Invalid hook call") || o.includes("hooks");
282
290
  }
283
291
  } else if ("string" == typeof o.body && o.body.trim().startsWith("<")) {
284
- const e = y(o.body);
292
+ const e = k(o.body);
285
293
  $(".popup_body_" + o.id).html(e).fadeIn(o.fadeIn);
286
294
  } else {
287
- const e = y(String(o.body));
295
+ const e = k(String(o.body));
288
296
  $(".popup_body_" + o.id).text(e).fadeIn(o.fadeIn);
289
297
  }
290
298
  }
@@ -304,40 +312,40 @@ var m, b, _, f, v, g, w, y, z, k, x, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W
304
312
  });
305
313
  };
306
314
  }
307
- }), ee = u({
315
+ }), te = l({
308
316
  "core/mobile.ts"() {
309
- if (k = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
310
- x = () => {
317
+ if (C = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
318
+ E = () => {
311
319
  if ("undefined" == typeof navigator) return !1;
312
320
  const e = navigator.userAgent;
313
321
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
314
- }, C = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (N = () => {
322
+ }, S = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (M = () => {
315
323
  if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
316
- const e = x() || k();
317
- return C() && e ? "touch" : "mouse";
318
- })(), M = !k(), "undefined" != typeof window) {
324
+ const e = E() || C();
325
+ return S() && e ? "touch" : "mouse";
326
+ })(), N = !C(), "undefined" != typeof window) {
319
327
  const e = window.matchMedia("(max-width: 1024px)"), o = () => {
320
- const e = N(), o = !k();
321
- M !== o && (M = o);
328
+ const e = M(), o = !C();
329
+ N !== o && (N = o);
322
330
  };
323
331
  let t;
324
332
  e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
325
333
  clearTimeout(t), t = setTimeout(o, 150);
326
334
  });
327
335
  }
328
- T = () => "pointerdown", E = () => "pointermove", I = () => "pointerup", O = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
329
- S = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
336
+ T = () => "pointerdown", O = () => "pointermove", I = () => "pointerup", A = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
337
+ L = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
330
338
  }
331
339
  });
332
340
 
333
- l({}, {
334
- popup: () => Q
341
+ u({}, {
342
+ popup: () => V
335
343
  });
336
344
 
337
- var oe, te = u({
345
+ var ie, ne = l({
338
346
  "core/properties.ts"() {
339
- Z(), ee(), L = 250, A = 150, j = 1, B = new Map, F = new Map, q = $(window), J = $("body"),
340
- Q = {
347
+ oe(), te(), P = 250, j = 150, R = 1e3, F = new Map, J = new Map, Q = $(window),
348
+ G = $("body"), V = {
341
349
  open: e => {
342
350
  if (e) return e.id = e.id || Math.round(1e3 * Math.random()), e.body = e.body || "",
343
351
  e.class = e.class || "", e.width = e.width || 300, e.height = e.height || 200, e.minWidth = e.minWidth || 340,
@@ -347,12 +355,12 @@ var oe, te = u({
347
355
  e.raised = e.raised || null, e.movable = e.movable || null, e.resizable = e.resizable || null,
348
356
  e.store = e.store || !1, e.top = e.top ? e.top : "auto", e.left = e.left ? e.left : "auto",
349
357
  e.right = e.right ? e.right : "auto", e.bottom = e.bottom ? e.bottom : "auto", e.fadeIn = e.fadeIn || 100,
350
- e.fadeOut = e.fadeOut || 100, L = e.minWidth, A = e.minHeight, e.width < e.minWidth && (e.width = e.minWidth),
358
+ e.fadeOut = e.fadeOut || 100, P = e.minWidth, j = e.minHeight, e.width < e.minWidth && (e.width = e.minWidth),
351
359
  e.height < e.minHeight && (e.height = e.minHeight), "auto" === e.width && (e.width = "100%"),
352
360
  "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
353
361
  "pointer-events": "none",
354
- "z-index": Q.zIndex($("*")) + 1
355
- }), 0 === $(".popup_window_" + e.id, "#popup").length && z(e), layerpro.purge(document),
362
+ "z-index": V.zIndex($("*")) + 1
363
+ }), 0 === $(".popup_window_" + e.id, "#popup").length && x(e), layerpro.purge(document),
356
364
  e;
357
365
  },
358
366
  dispatch: e => {
@@ -371,29 +379,29 @@ var oe, te = u({
371
379
  },
372
380
  center: e => {
373
381
  const o = $(".popup_overflow_" + e.id, "#popup");
374
- o.css("top", Math.max(0, (q.height() - o.outerHeight()) / 2 + q.scrollTop())), o.css("left", Math.max(0, (q.width() - o.outerWidth()) / 2 + q.scrollLeft()));
382
+ o.css("top", Math.max(0, (Q.height() - o.outerHeight()) / 2 + Q.scrollTop())), o.css("left", Math.max(0, (Q.width() - o.outerWidth()) / 2 + Q.scrollLeft()));
375
383
  },
376
- checkArea: e => [ O(e), S(e), q.scrollLeft(), q.scrollTop(), q.height(), q.width() ],
384
+ checkArea: e => [ A(e), L(e), Q.scrollLeft(), Q.scrollTop(), Q.height(), Q.width() ],
377
385
  close: e => {
378
386
  let o;
379
387
  if (e) {
380
388
  o = "object" == typeof e ? e.id : e, layerpro.popup.unmount && layerpro.popup.unmount(String(o)),
381
389
  layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(o));
382
- const t = B.get(String(o));
390
+ const t = F.get(String(o));
383
391
  if (t) {
384
392
  const e = {
385
393
  passive: !1
386
394
  };
387
- t.move && document.removeEventListener(E(), t.move, e), t.up && document.removeEventListener(I(), t.up, e),
388
- B.delete(String(o));
395
+ t.move && document.removeEventListener(O(), t.move, e), t.up && document.removeEventListener(I(), t.up, e),
396
+ F.delete(String(o));
389
397
  }
390
- const i = F.get(String(o));
398
+ const i = J.get(String(o));
391
399
  if (i) {
392
400
  const e = {
393
401
  passive: !1
394
402
  };
395
- i.move && document.removeEventListener(E(), i.move, e), i.up && document.removeEventListener(I(), i.up, e),
396
- F.delete(String(o));
403
+ i.move && document.removeEventListener(O(), i.move, e), i.up && document.removeEventListener(I(), i.up, e),
404
+ J.delete(String(o));
397
405
  }
398
406
  !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
399
407
  $(".popup_raised_" + o).remove();
@@ -405,7 +413,7 @@ var oe, te = u({
405
413
  } else $("#popup").fadeOut(() => {
406
414
  $(void 0).remove();
407
415
  });
408
- layerpro.purge(document), setTimeout(() => Q.removeDock(e), 300);
416
+ layerpro.purge(document), setTimeout(() => V.removeDock(e), 300);
409
417
  },
410
418
  removeDock: e => {
411
419
  $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
@@ -413,7 +421,7 @@ var oe, te = u({
413
421
  },
414
422
  iconize: e => {
415
423
  const o = $(".popup_overflow_" + e.id, "#popup");
416
- if (!1 !== o.find("[class^=popup_window_]").hasClass("zHigh")) if (Q.vfx(o, !1, !0),
424
+ if (!1 !== o.find("[class^=popup_window_]").hasClass("zHigh")) if (V.vfx(o, !1, !0),
417
425
  o.data("iconize")) {
418
426
  if (o.data("iconize")) {
419
427
  const e = o.data("iconize");
@@ -423,7 +431,7 @@ var oe, te = u({
423
431
  width: e.w,
424
432
  height: e.h,
425
433
  opacity: 1
426
- }, () => Q.vfx(o, !0)), o.removeData("iconize");
434
+ }, () => V.vfx(o, !0)), o.removeData("iconize");
427
435
  }
428
436
  } else o.animate({
429
437
  top: "100%",
@@ -431,7 +439,7 @@ var oe, te = u({
431
439
  width: 0,
432
440
  height: 0,
433
441
  opacity: 0
434
- }, 200, () => Q.vfx(o, !0)), o.data("iconize", {
442
+ }, 200, () => V.vfx(o, !0)), o.data("iconize", {
435
443
  y: o.offset().top,
436
444
  x: o.offset().left,
437
445
  w: o.width(),
@@ -440,7 +448,7 @@ var oe, te = u({
440
448
  },
441
449
  maximize: e => {
442
450
  const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
443
- if (Q.vfx(o, !1, !0), o.data("store")) {
451
+ if (V.vfx(o, !1, !0), o.data("store")) {
444
452
  if (o.data("store")) {
445
453
  const n = o.data("store");
446
454
  o.animate({
@@ -450,8 +458,8 @@ var oe, te = u({
450
458
  height: n.h
451
459
  }, () => {
452
460
  i.css("pointer-events", "auto"), t.on(T(), function(o) {
453
- Q.resizeModals(o, this, e);
454
- }), q.off("layerProResize.eventItem"), Q.vfx(o, !0);
461
+ V.resizeModals(o, this, e);
462
+ }), Q.off("layerProResize.eventItem"), V.vfx(o, !0);
455
463
  }), o.removeData("store");
456
464
  }
457
465
  } else o.data("store", {
@@ -465,15 +473,15 @@ var oe, te = u({
465
473
  left: -6,
466
474
  right: -6,
467
475
  bottom: -6,
468
- width: q.width() + 12,
469
- height: q.height() + 12 - 45
476
+ width: Q.width() + 12,
477
+ height: Q.height() + 12 - 45
470
478
  }, () => {
471
- q.on("layerProResize.eventItem", e => {
479
+ Q.on("layerProResize.eventItem", e => {
472
480
  o.css({
473
- width: q.width() + 12,
474
- height: q.height() + 12 - 40
481
+ width: Q.width() + 12,
482
+ height: Q.height() + 12 - 40
475
483
  });
476
- }), i.css("pointer-events", "none"), t.off(T()), Q.vfx(o, !0, !0);
484
+ }), i.css("pointer-events", "none"), t.off(T()), V.vfx(o, !0, !0);
477
485
  });
478
486
  },
479
487
  movable: e => {
@@ -483,33 +491,33 @@ var oe, te = u({
483
491
  let p = 0, s = 0, r = 0, c = 0;
484
492
  const a = e => {
485
493
  e.preventDefault();
486
- const o = O(e), i = S(e);
487
- p = r - o, s = c - i, r = o, c = i, Q.checkArea(e)[1] < Q.checkArea(e)[4] && 1 === Math.sign(Q.checkArea(e)[1]) && t.css("top", t.offset().top - s),
488
- Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && t.css("left", t.offset().left - p);
494
+ const o = A(e), i = L(e);
495
+ p = r - o, s = c - i, r = o, c = i, V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.css("top", t.offset().top - s),
496
+ V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.css("left", t.offset().left - p);
489
497
  }, d = e => {
490
498
  const i = {
491
499
  passive: !1
492
500
  };
493
- document.removeEventListener(E(), a, i), document.removeEventListener(I(), d, i),
494
- B.delete(o), n.css("pointer-events", "auto"), Q.vfx(t, !0);
501
+ document.removeEventListener(O(), a, i), document.removeEventListener(I(), d, i),
502
+ F.delete(o), n.css("pointer-events", "auto"), V.vfx(t, !0);
495
503
  };
496
- B.set(o, {
504
+ F.set(o, {
497
505
  move: a,
498
506
  up: d
499
507
  });
500
508
  i[0].addEventListener(T(), e => {
501
- e.preventDefault(), n.css("pointer-events", "none"), u(e), Q.vfx(t, !1);
509
+ e.preventDefault(), n.css("pointer-events", "none"), l(e), V.vfx(t, !1);
502
510
  }, {
503
511
  passive: !1
504
512
  }), e.maximize && i.on("dblclick", o => {
505
513
  layerpro.popup.maximize(e);
506
514
  });
507
- const u = e => {
508
- r = O(e), c = S(e);
515
+ const l = e => {
516
+ r = A(e), c = L(e);
509
517
  const o = {
510
518
  passive: !1
511
519
  };
512
- document.addEventListener(E(), a, o), document.addEventListener(I(), d, o);
520
+ document.addEventListener(O(), a, o), document.addEventListener(I(), d, o);
513
521
  };
514
522
  },
515
523
  resizable: e => {
@@ -517,112 +525,112 @@ var oe, te = u({
517
525
  const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup");
518
526
  for (let e = 4; e--; ) $(`<div class='resize_${e}'>`, t).appendTo(t).css("touch-action", "none"),
519
527
  $(`<div class='resize_corner_${e}'>`, t).appendTo(t).css("touch-action", "none");
520
- const i = F.get(o) || {};
528
+ const i = J.get(o) || {};
521
529
  i.down = function(o) {
522
- Q.resizeModals(o, this, e);
523
- }, F.set(o, i);
530
+ V.resizeModals(o, this, e);
531
+ }, J.set(o, i);
524
532
  const n = {
525
533
  passive: !1
526
534
  };
527
535
  $("[class^=resize_]").each((o, t) => {
528
536
  t.addEventListener(T(), o => {
529
- o.preventDefault(), Q.resizeModals(o, t, e);
537
+ o.preventDefault(), V.resizeModals(o, t, e);
530
538
  }, n);
531
539
  });
532
540
  },
533
541
  resizeModals: (e, o, t) => {
534
- const i = $(o).parent(), n = String(t.id), p = O(e), s = S(e), r = [ p - q.scrollLeft(), s - q.scrollTop() ];
535
- t.minWidth, J.css("pointer-events", "none"), i.css("pointer-events", "none"), Q.vfx(i, !1);
542
+ const i = $(o).parent(), n = String(t.id), p = A(e), s = L(e), r = [ p - Q.scrollLeft(), s - Q.scrollTop() ];
543
+ t.minWidth, G.css("pointer-events", "none"), i.css("pointer-events", "none"), V.vfx(i, !1);
536
544
  const c = e => {
537
- Q.doRes(e, o);
545
+ V.doRes(e, o);
538
546
  }, a = e => {
539
- Q.stopRes(o);
540
- }, d = F.get(n) || {};
541
- d.move = c, d.up = a, F.set(n, d);
542
- const u = {
547
+ V.stopRes(o);
548
+ }, d = J.get(n) || {};
549
+ d.move = c, d.up = a, J.set(n, d);
550
+ const l = {
543
551
  passive: !1
544
552
  };
545
- document.addEventListener(E(), c, u), document.addEventListener(I(), a, u), H = r[0],
546
- R = r[1], W = i.width(), D = i.height(), X = i.position().left, Y = i.position().top,
547
- U = Y + D + 1, K = X + W + 1, P = o;
553
+ document.addEventListener(O(), c, l), document.addEventListener(I(), a, l), W = r[0],
554
+ D = r[1], X = i.width(), q = i.height(), Y = i.position().left, U = i.position().top,
555
+ K = U + q + 1, B = Y + X + 1, H = o;
548
556
  },
549
557
  doRes: (e, o) => {
550
558
  dispatchEvent(new Event("layerProResize"));
551
- const t = $(o), i = t.parent(), n = O(e), p = S(e), s = [ n - q.scrollLeft(), p - q.scrollTop() ];
552
- if (o === P) {
553
- let o = W + s[0] - H, n = D + s[1] - R;
554
- const p = W - s[0] + H, r = D - s[1] + R;
555
- o <= 0 && (o = 0), n <= 0 && (n = 0), Q.checkArea(e)[1] < Q.checkArea(e)[4] && 1 === Math.sign(Q.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= A && r > A && i.css({
556
- height: Number(A + 1)
557
- }), i.height() > A && A <= r && i.css({
558
- top: Number(U - r),
559
+ const t = $(o), i = t.parent(), n = A(e), p = L(e), s = [ n - Q.scrollLeft(), p - Q.scrollTop() ];
560
+ if (o === H) {
561
+ let o = X + s[0] - W, n = q + s[1] - D;
562
+ const p = X - s[0] + W, r = q - s[1] + D;
563
+ o <= 0 && (o = 0), n <= 0 && (n = 0), V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= j && r > j && i.css({
564
+ height: Number(j + 1)
565
+ }), i.height() > j && j <= r && i.css({
566
+ top: Number(K - r),
559
567
  height: parseInt(r)
560
- })), Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= L && i.css({
568
+ })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= P && i.css({
561
569
  width: Number(o),
562
- right: Number(X - o)
563
- }), i.width() <= L && i.css({
564
- width: Number(L + 1)
565
- })), Q.checkArea(e)[1] < Q.checkArea(e)[4] && 1 === Math.sign(Q.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= A && i.css({
570
+ right: Number(Y - o)
571
+ }), i.width() <= P && i.css({
572
+ width: Number(P + 1)
573
+ })), V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= j && i.css({
566
574
  height: Number(n)
567
- }), i.height() <= A && n > A && i.css({
568
- height: Number(A + 1)
569
- })), Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= L && p > L && i.css({
570
- width: Number(L + 1)
571
- }), i.width() > L && L <= p && i.css({
575
+ }), i.height() <= j && n > j && i.css({
576
+ height: Number(j + 1)
577
+ })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= P && p > P && i.css({
578
+ width: Number(P + 1)
579
+ }), i.width() > P && P <= p && i.css({
572
580
  width: parseInt(p),
573
- left: Number(K - p)
574
- })), Q.checkArea(e)[1] < Q.checkArea(e)[4] && Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && 1 === Math.sign(Q.checkArea(e)[1]) && (t.hasClass("resize_corner_0") && (i.height() >= A && r > A && i.css({
575
- top: Number(U - r),
581
+ left: Number(B - p)
582
+ })), V.checkArea(e)[1] < V.checkArea(e)[4] && V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && 1 === Math.sign(V.checkArea(e)[1]) && (t.hasClass("resize_corner_0") && (i.height() >= j && r > j && i.css({
583
+ top: Number(K - r),
576
584
  height: parseInt(r)
577
- }), i.height() <= A && r > A && i.css({
578
- height: Number(A + 1)
579
- }), i.width() >= L && p > L && i.css({
585
+ }), i.height() <= j && r > j && i.css({
586
+ height: Number(j + 1)
587
+ }), i.width() >= P && p > P && i.css({
580
588
  width: parseInt(p),
581
- left: Number(K - p)
582
- }), i.width() <= L && p > L && i.css({
583
- width: Number(L + 1)
584
- })), t.hasClass("resize_corner_1") && (i.height() >= A && r > A && i.css({
585
- top: Number(U - r),
589
+ left: Number(B - p)
590
+ }), i.width() <= P && p > P && i.css({
591
+ width: Number(P + 1)
592
+ })), t.hasClass("resize_corner_1") && (i.height() >= j && r > j && i.css({
593
+ top: Number(K - r),
586
594
  height: Number(r)
587
- }), i.height() <= A && r > A && i.css({
588
- height: Number(A + 1)
589
- }), i.width() >= L && i.css({
595
+ }), i.height() <= j && r > j && i.css({
596
+ height: Number(j + 1)
597
+ }), i.width() >= P && i.css({
590
598
  width: Number(o),
591
- right: Number(X - o)
592
- }), i.width() <= L && p > L && i.css({
593
- width: Number(L + 1)
594
- })), t.hasClass("resize_corner_2") && (i.height() >= A && i.css({
599
+ right: Number(Y - o)
600
+ }), i.width() <= P && p > P && i.css({
601
+ width: Number(P + 1)
602
+ })), t.hasClass("resize_corner_2") && (i.height() >= j && i.css({
595
603
  height: Number(n)
596
- }), i.height() <= A && n > A && i.css({
597
- height: Number(A + 1)
598
- }), i.width() >= L && i.css({
604
+ }), i.height() <= j && n > j && i.css({
605
+ height: Number(j + 1)
606
+ }), i.width() >= P && i.css({
599
607
  width: Number(o),
600
- right: Number(X - o)
601
- }), i.width() <= L && i.css({
602
- width: Number(L + 1)
603
- })), t.hasClass("resize_corner_3") && (i.height() >= A && n > A && i.css({
608
+ right: Number(Y - o)
609
+ }), i.width() <= P && i.css({
610
+ width: Number(P + 1)
611
+ })), t.hasClass("resize_corner_3") && (i.height() >= j && n > j && i.css({
604
612
  height: Number(n)
605
- }), i.height() <= A && n > A && i.css({
606
- height: Number(A + 1)
607
- }), i.width() >= L && p > L && i.css({
613
+ }), i.height() <= j && n > j && i.css({
614
+ height: Number(j + 1)
615
+ }), i.width() >= P && p > P && i.css({
608
616
  width: Number(p),
609
- left: Number(K - p)
610
- }), i.width() <= L && p > L && i.css({
611
- width: Number(L + 1)
617
+ left: Number(B - p)
618
+ }), i.width() <= P && p > P && i.css({
619
+ width: Number(P + 1)
612
620
  })));
613
621
  }
614
622
  },
615
623
  stopRes: e => {
616
624
  const o = $(e).parent();
617
- J.css("pointer-events", "auto"), o.css("pointer-events", "auto"), Q.vfx(o, !0),
618
- P = !1;
619
- const t = F.get(String(e));
625
+ G.css("pointer-events", "auto"), o.css("pointer-events", "auto"), V.vfx(o, !0),
626
+ H = !1;
627
+ const t = J.get(String(e));
620
628
  if (t) {
621
629
  const o = {
622
630
  passive: !1
623
631
  };
624
- t.move && document.removeEventListener(E(), t.move, o), t.up && document.removeEventListener(I(), t.up, o),
625
- F.delete(String(e));
632
+ t.move && document.removeEventListener(O(), t.move, o), t.up && document.removeEventListener(I(), t.up, o),
633
+ J.delete(String(e));
626
634
  }
627
635
  },
628
636
  index: e => {
@@ -630,32 +638,29 @@ var oe, te = u({
630
638
  $('[class^="popup_window_"]', "#popup").removeClass("zHigh"), $('[class^="popup_bar_"]', "#popup").removeClass("popup_bar_selected"),
631
639
  $('[class^="icon_"]', "#popup").removeClass("popup_bar_selected"), o.each(function() {
632
640
  $(this, "#popup").css("zIndex", $(this, "#popup")[0].style.zIndex - 1);
633
- }), $(".icon_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_overflow_" + e.id, "#popup").css("zIndex", Q.zIndex(o)),
641
+ }), $(".icon_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_overflow_" + e.id, "#popup").css("zIndex", V.zIndex(o)),
634
642
  $(".popup_bar_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_window_" + e.id, "#popup").addClass("zHigh");
635
643
  },
636
- zIndex: e => (e.each(function() {
637
- const e = parseInt($(this, "#popup").css("zIndex"), 10);
638
- e > j && (j = e);
639
- }), j + 1)
644
+ zIndex: e => ++R
640
645
  }, Object.defineProperty(layerpro, "popup", {
641
- value: Q,
646
+ value: V,
642
647
  writable: !1,
643
648
  configurable: !1
644
649
  });
645
650
  }
646
- }), ie = u({
651
+ }), pe = l({
647
652
  "core/purge.ts"() {
648
- oe = e => {
649
- let o, t, i, n = e.attributes;
650
- if (n) for (t = n.length, o = 0; o < t; o += 1) i = n[o].name, e[i];
651
- if (n = e.childNodes, n) for (t = n.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
653
+ ie = e => {
654
+ let o, t, i = e.attributes;
655
+ if (i) for (t = i.length, o = 0; o < t; o += 1) i[o].name;
656
+ if (i = e.childNodes, i) for (t = i.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
652
657
  }, Object.defineProperty(layerpro, "purge", {
653
- value: new Proxy(oe, {}),
658
+ value: new Proxy(ie, {}),
654
659
  writable: !1,
655
660
  configurable: !1
656
661
  });
657
662
  }
658
- }), ne = u({
663
+ }), se = l({
659
664
  "core/window.ts"() {
660
665
  window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
661
666
  capture: !0,
@@ -671,7 +676,7 @@ window.layerpro || (Object.defineProperty(window, "layerpro", {
671
676
  writable: !1,
672
677
  configurable: !1,
673
678
  enumerable: !1
674
- }), h(), G(), te(), ie(), ne(), layerpro.setProps = (e, o) => {
679
+ }), h(), Z(), ne(), pe(), se(), layerpro.setProps = (e, o) => {
675
680
  Reflect.ownKeys(e).forEach(t => {
676
681
  const i = Object.getOwnPropertyDescriptor(e, t);
677
682
  i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,