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