layerpro 2.3.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,27 +1,23 @@
1
1
  # [LayerPro](https://npmjs.com/package/layerpro)
2
2
 
3
-
4
3
  ![layerpro](https://raw.githubusercontent.com/passariello/container/be0611e9bead336dcec32d522d103e7e3661f502/layerpro/assets/logos/logo.svg)
5
4
 
6
- Drop-in replacement for browser modals with superpowers.
7
-
8
5
  [![version](https://img.shields.io/npm/v/layerpro.svg)](https://npmjs.org/package/layerpro)
9
- [![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=layerpro&query=$.install.pretty&label=install%20size&style=flat-square)](https://packagephobia.now.sh/result?p=layerpro)
10
6
  [![downloads](https://img.shields.io/npm/dm/layerpro.svg)](https://npmjs.org/package/layerpro)
11
7
 
12
8
  ![Snyk](https://img.shields.io/badge/Snyk-gray?logo=Snyk)
13
- [![Known Vulnerabilities](https://snyk.io/test/npm/layerpro/badge.svg)](https://snyk.io/test/npm/layerpro)
14
- [![Socket Badge](https://socket.dev/api/badge/npm/package/layerpro)](https://socket.dev/npm/package/layerpro)
9
+ ![Socket](https://img.shields.io/badge/Socket-gray?logo=Socket)
15
10
 
16
11
  ![Node.js](https://img.shields.io/badge/Node.js-gray?logo=node.js)
17
- ![Jquery](https://img.shields.io/badge/jquery-gray?logo=jquery)
12
+ ![tsup](https://img.shields.io/badge/tsup-gray?logo=esbuild)
13
+
18
14
  ![React](https://img.shields.io/badge/React-gray?logo=React)
19
- ![Javascript](https://img.shields.io/badge/Javascript-gray?logo=Javascript)
20
15
  ![TypeScript](https://img.shields.io/badge/TypeScript-gray?logo=typescript)
21
- ![esbuild](https://img.shields.io/badge/esbuild-gray?logo=esbuild)
16
+ ![Javascript](https://img.shields.io/badge/Javascript-gray?logo=Javascript)
17
+ ![Jquery](https://img.shields.io/badge/jquery-gray?logo=jquery)
22
18
 
23
- ![Jest](https://img.shields.io/badge/Jest-gray?logo=jest)
24
- ![ESLint](https://img.shields.io/badge/Eslint-gray?logo=eslint)
19
+ ![Vitest](https://img.shields.io/badge/Vitest-gray?logo=vitest)
20
+ ![OXlint](https://img.shields.io/badge/Oxlint-gray?logo=oxc)
25
21
  ![Playwright](https://img.shields.io/badge/Playwright-gray?logo=playwright)
26
22
 
27
23
  ---
package/index.cjs CHANGED
@@ -8,14 +8,14 @@ function o(e) {
8
8
  };
9
9
  }
10
10
 
11
- var t, i, n, p, s, r, c, a = o(require("jquery")), d = Object.defineProperty, u = Object.getOwnPropertyNames, l = (e, o) => function() {
12
- return e && (o = (0, e[u(e)[0]])(e = 0)), o;
11
+ var t, i, p, n, s, r, c, a = o(require("jquery")), d = Object.defineProperty, l = Object.getOwnPropertyNames, u = (e, o) => function() {
12
+ return e && (o = (0, e[l(e)[0]])(e = 0)), o;
13
13
  }, h = (e, o) => {
14
14
  for (var t in o) d(e, t, {
15
15
  get: o[t],
16
16
  enumerable: !0
17
17
  });
18
- }, m = l({
18
+ }, m = u({
19
19
  "core/credits.ts"() {
20
20
  t = e => {}, Object.defineProperty(layerpro, "credits", {
21
21
  value: t,
@@ -30,13 +30,13 @@ h({}, {
30
30
  mouseCoord: () => i
31
31
  });
32
32
 
33
- 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({
33
+ var b, _, f, v, g, y, w, z, k, x, T, C, E, S, M, I, N, O, A, L, P, j, H, R, W, q, D, X, Y, U, B, K, F, J, Q, G, V, Z, ee = u({
34
34
  "core/mouseCoords.ts"() {
35
- i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
36
- p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
37
- s = e.pageX, r = e.pageY, [ n, p ]);
35
+ i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], p = 0,
36
+ n = "", s = 0, r = 0, c = e => (p = s < e.pageX ? 1 : 0, n = r < e.pageY ? "down" : "up",
37
+ s = e.pageX, r = e.pageY, [ p, n ]);
38
38
  }
39
- }), oe = l({
39
+ }), oe = u({
40
40
  "core/message.ts"() {
41
41
  b = {
42
42
  "&": "&amp;",
@@ -45,7 +45,7 @@ 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
45
45
  '"': "&quot;",
46
46
  "'": "&#39;"
47
47
  }, _ = e => e.replace(/[&<>"']/g, e => b[e]), f = e => {
48
- const o = _(String(e)), t = window.layerpro.popup.open({
48
+ const o = _(String(e)), t = layerpro.popup.open({
49
49
  id: "__alert",
50
50
  name: "Warning",
51
51
  icon: "&#9888;",
@@ -61,10 +61,10 @@ 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
61
61
  resizable: !1
62
62
  }), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + t.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
63
63
  $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
64
- window.layerpro.popup.close(t);
64
+ layerpro.popup.close(t);
65
65
  });
66
66
  }, v = (e, o) => {
67
- const t = _(String(e)), i = window.layerpro.popup.open({
67
+ const t = _(String(e)), i = layerpro.popup.open({
68
68
  id: "__message",
69
69
  name: "Message",
70
70
  icon: "&#9965;",
@@ -78,13 +78,13 @@ 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
78
78
  raised: !0,
79
79
  movable: !0,
80
80
  resizable: !1
81
- }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
82
- $(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
83
- o && o(), window.layerpro.popup.close(i);
81
+ }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
82
+ $(".popup_body_" + i.id).html(p), $("#a_" + i.id).on("click", () => {
83
+ o && o(), layerpro.popup.close(i);
84
84
  });
85
85
  }, g = (e, o, t) => {
86
86
  if (0 === $(".confirm").length) {
87
- const i = _(String(e)), n = window.layerpro.popup.open({
87
+ const i = _(String(e)), p = layerpro.popup.open({
88
88
  id: "__confirm",
89
89
  name: "Confirm",
90
90
  icon: "&#9745;",
@@ -98,15 +98,15 @@ 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
98
98
  raised: !0,
99
99
  movable: !0,
100
100
  resizable: !1
101
- }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CONFIRM</button>\n <button id="${"b_" + n.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
102
- $(".popup_body_" + n.id).html(p), $("#a_" + n.id).on("click", () => {
103
- o && o(), window.layerpro.popup.close(n);
104
- }), $("#b_" + n.id).on("click", () => {
105
- t && t(), window.layerpro.popup.close(n);
101
+ }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + p.id}" type="button">CONFIRM</button>\n <button id="${"b_" + p.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
102
+ $(".popup_body_" + p.id).html(n), $("#a_" + p.id).on("click", () => {
103
+ o && o(), layerpro.popup.close(p);
104
+ }), $("#b_" + p.id).on("click", () => {
105
+ t && t(), layerpro.popup.close(p);
106
106
  });
107
107
  }
108
- }, w = (e, o) => {
109
- const t = o || "_prompt", i = _(String(e)), n = window.layerpro.popup.open({
108
+ }, y = (e, o) => {
109
+ const t = o || "_prompt", i = _(String(e)), p = layerpro.popup.open({
110
110
  id: "__prompt",
111
111
  name: "Prompt",
112
112
  icon: "&#9998;",
@@ -120,22 +120,25 @@ 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
120
120
  raised: !0,
121
121
  movable: !0,
122
122
  resizable: !1
123
- }), p = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${n.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${n.id}" type="button">OK</button>\n <button id="b_${n.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
124
- $(".popup_body_" + n.id).html(p), $("#input_" + n.id).on("focus", function() {
123
+ }), n = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${p.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${p.id}" type="button">OK</button>\n <button id="b_${p.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
124
+ $(".popup_body_" + p.id).html(n), $("#input_" + p.id).on("focus", function() {
125
125
  $(this).attr("placeholder", "");
126
126
  }).on("blur", function() {
127
127
  $(this).attr("placeholder", "write here");
128
- }), $("#a_" + n.id).on("click", () => {
129
- if ($("#input_" + n.id).val() > "") {
130
- "function" == typeof t && t();
131
- if (String(t) === t) return JSON.stringify($("#input_" + n.id).val());
132
- window.layerpro.popup.close(n);
128
+ }), $("#a_" + p.id).on("click", () => {
129
+ if ($("#input_" + p.id).val() > "") {
130
+ if ("function" == typeof t) {
131
+ const e = String(document.getElementById("input___prompt"));
132
+ t(e);
133
+ }
134
+ if (String(t) === t) return JSON.stringify($("#input_" + p.id).val());
135
+ layerpro.popup.close(p);
133
136
  } else alert("input can't be empty!");
134
- }), $("#b_" + n.id).on("click", () => {
135
- window.layerpro.popup.close(n);
137
+ }), $("#b_" + p.id).on("click", () => {
138
+ layerpro.popup.close(p);
136
139
  });
137
- }, window.message = (e, o) => window.layerpro.message(e, o), window.alert = e => window.layerpro.alert(e),
138
- window.confirm = (e, o, t) => window.layerpro.confirm(e, o, t), window.prompt = (e, o, t) => window.layerpro.prompt(e, o, t),
140
+ }, globalThis.message = (e, o) => layerpro.message(e, o), globalThis.alert = e => layerpro.alert(e),
141
+ globalThis.confirm = (e, o, t) => layerpro.confirm(e, o, t), globalThis.prompt = (e, o, t) => layerpro.prompt(e, o, t),
139
142
  Object.defineProperty(window, "alert", {
140
143
  enumerable: !1
141
144
  }), Object.defineProperty(window, "prompt", {
@@ -144,9 +147,9 @@ 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
144
147
  enumerable: !1
145
148
  }), Object.defineProperty(window, "confirm", {
146
149
  enumerable: !1
147
- }), Object.defineProperties(window.layerpro, {
150
+ }), Object.defineProperties(layerpro, {
148
151
  prompt: {
149
- value: w
152
+ value: y
150
153
  },
151
154
  alert: {
152
155
  value: f
@@ -159,15 +162,15 @@ 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
159
162
  }
160
163
  });
161
164
  }
162
- }), te = l({
165
+ }), te = u({
163
166
  "core/genLayer.ts"() {
164
- oe(), y = new Map, z = new Map, k = {
167
+ oe(), w = new Map, z = new Map, k = {
165
168
  "&": "&amp;",
166
169
  "<": "&lt;",
167
170
  ">": "&gt;",
168
171
  '"': "&quot;",
169
172
  "'": "&#39;"
170
- }, x = e => e.replace(/[&<>"']/g, e => k[e]), C = o => {
173
+ }, x = e => e.replace(/[&<>"']/g, e => k[e]), T = o => {
171
174
  if ("function" == typeof o.body) return;
172
175
  const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup", i = "#popup" === t ? document.querySelector("#popup") : document.querySelector(t);
173
176
  i?.querySelectorAll('[class^="popup_window_"]').forEach(e => e.classList.remove("zHigh")),
@@ -192,23 +195,23 @@ 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
192
195
  }).on("mousedown", e => {
193
196
  layerpro.popup.index(o);
194
197
  }).hide().fadeIn(o.fadeIn);
195
- const n = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
198
+ const p = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
196
199
  "pointer-events": "auto"
197
200
  }).addClass("zHigh").addClass(o.class);
198
201
  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),
199
202
  layerpro.popup.unmount = e => {
200
- const o = y.get(e);
201
- o && (o.unmount(), y.delete(e));
203
+ const o = w.get(e);
204
+ o && (o.unmount(), w.delete(e));
202
205
  }, layerpro.popup.cleanupEvents = e => {
203
206
  const o = z.get(e);
204
207
  o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
205
208
  o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
206
209
  o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
207
210
  z.delete(e));
208
- }, layerpro.popup.getReactRoot = e => y.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(n).addClass("popup_bar_selected"),
211
+ }, layerpro.popup.getReactRoot = e => w.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(p).addClass("popup_bar_selected"),
209
212
  o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</div>", t).appendTo(".popup_bar_" + o.id);
210
- const p = x(String(o.name));
211
- if ($('<div class="popup_drag_' + o.id + '">' + p + "</div>", t).appendTo(".popup_bar_" + o.id),
213
+ const n = x(String(o.name));
214
+ if ($('<div class="popup_drag_' + o.id + '">' + n + "</div>", t).appendTo(".popup_bar_" + o.id),
212
215
  $('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
213
216
  !0 === o.iconize && 0 === $("#popup_dock").length) {
214
217
  $("#root").css("margin", "0 0 var( --dock-height ) 0");
@@ -218,17 +221,17 @@ 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
218
221
  });
219
222
  }
220
223
  if ($("#popup_dock").length > 0 && !0 === o.dockable) {
221
- 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) {
224
+ 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) {
222
225
  $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
223
226
  layerpro.popup.index(o);
224
- }, n = function(e) {
227
+ }, p = function(e) {
225
228
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
226
229
  };
227
230
  z.set(e, {
228
231
  iconClick: !0,
229
232
  iconClose: !0
230
233
  }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
231
- $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
234
+ $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", p);
232
235
  }
233
236
  if (!0 === o.iconize) {
234
237
  const e = String(o.id), t = function(e) {
@@ -279,7 +282,7 @@ 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
279
282
  o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
280
283
  o.isMaximize && layerpro.popup.maximize(o);
281
284
  const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
282
- $('<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() {
285
+ $('<div class="popup_internal_' + o.id + '">', c).appendTo(p), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
283
286
  (() => {
284
287
  if (o.body && !o.source) {
285
288
  const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
@@ -289,7 +292,7 @@ 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
289
292
  if (!t) return;
290
293
  try {
291
294
  const i = e.createRoot(t);
292
- i.render(o.body), y.set(String(o.id), i);
295
+ i.render(o.body), w.set(String(o.id), i);
293
296
  } catch (e) {
294
297
  const o = e?.message || String(e);
295
298
  o.includes("Invalid hook call") || o.includes("hooks");
@@ -318,28 +321,28 @@ 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
318
321
  });
319
322
  };
320
323
  }
321
- }), ie = l({
324
+ }), ie = u({
322
325
  "core/mobile.ts"() {
323
- if (E = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
324
- S = () => {
326
+ if (C = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
327
+ E = () => {
325
328
  if ("undefined" == typeof navigator) return !1;
326
329
  const e = navigator.userAgent;
327
330
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
328
- }, M = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (N = () => {
331
+ }, S = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (M = () => {
329
332
  if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
330
- const e = S() || E();
331
- return M() && e ? "touch" : "mouse";
332
- })(), T = !E(), "undefined" != typeof window) {
333
+ const e = E() || C();
334
+ return S() && e ? "touch" : "mouse";
335
+ })(), I = !C(), "undefined" != typeof window) {
333
336
  const e = window.matchMedia("(max-width: 1024px)"), o = () => {
334
- const e = N(), o = !E();
335
- T !== o && (T = o);
337
+ const e = M(), o = !C();
338
+ I !== o && (I = o);
336
339
  };
337
340
  let t;
338
341
  e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
339
342
  clearTimeout(t), t = setTimeout(o, 150);
340
343
  });
341
344
  }
342
- 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,
345
+ N = () => "pointerdown", O = () => "pointermove", A = () => "pointerup", L = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
343
346
  P = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
344
347
  }
345
348
  });
@@ -348,7 +351,7 @@ h({}, {
348
351
  popup: () => Z
349
352
  });
350
353
 
351
- var ne, pe = l({
354
+ var pe = u({
352
355
  "core/properties.ts"() {
353
356
  te(), ie(), j = 250, H = 150, W = 1e3, J = new Map, Q = new Map, G = $(window),
354
357
  V = $("body"), Z = {
@@ -366,8 +369,7 @@ var ne, pe = l({
366
369
  "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
367
370
  "pointer-events": "none",
368
371
  "z-index": Z.zIndex($("*")) + 1
369
- }), 0 === $(".popup_window_" + e.id, "#popup").length && C(e), layerpro.purge(document),
370
- e;
372
+ }), 0 === $(".popup_window_" + e.id, "#popup").length && T(e), e;
371
373
  },
372
374
  dispatch: e => {
373
375
  layerpro.popup.store(e);
@@ -398,7 +400,7 @@ var ne, pe = l({
398
400
  const e = {
399
401
  passive: !1
400
402
  };
401
- t.move && document.removeEventListener(I(), t.move, e), t.up && document.removeEventListener(A(), t.up, e),
403
+ t.move && document.removeEventListener(O(), t.move, e), t.up && document.removeEventListener(A(), t.up, e),
402
404
  J.delete(String(o));
403
405
  }
404
406
  const i = Q.get(String(o));
@@ -406,7 +408,7 @@ var ne, pe = l({
406
408
  const e = {
407
409
  passive: !1
408
410
  };
409
- i.move && document.removeEventListener(I(), i.move, e), i.up && document.removeEventListener(A(), i.up, e),
411
+ i.move && document.removeEventListener(O(), i.move, e), i.up && document.removeEventListener(A(), i.up, e),
410
412
  Q.delete(String(o));
411
413
  }
412
414
  !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
@@ -419,7 +421,7 @@ var ne, pe = l({
419
421
  } else $("#popup").fadeOut(() => {
420
422
  $(void 0).remove();
421
423
  });
422
- layerpro.purge(document), setTimeout(() => Z.removeDock(e), 300);
424
+ setTimeout(() => Z.removeDock(e), 300);
423
425
  },
424
426
  removeDock: e => {
425
427
  $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
@@ -456,14 +458,14 @@ var ne, pe = l({
456
458
  const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
457
459
  if (Z.vfx(o, !1, !0), o.data("store")) {
458
460
  if (o.data("store")) {
459
- const n = o.data("store");
461
+ const p = o.data("store");
460
462
  o.animate({
461
- top: n.y,
462
- left: n.x,
463
- width: n.w,
464
- height: n.h
463
+ top: p.y,
464
+ left: p.x,
465
+ width: p.w,
466
+ height: p.h
465
467
  }, () => {
466
- i.css("pointer-events", "auto"), t.on(O(), function(o) {
468
+ i.css("pointer-events", "auto"), t.on(N(), function(o) {
467
469
  Z.resizeModals(o, this, e);
468
470
  }), G.off("layerProResize.eventItem"), Z.vfx(o, !0);
469
471
  }), o.removeData("store");
@@ -487,43 +489,43 @@ var ne, pe = l({
487
489
  width: G.width() + 12,
488
490
  height: G.height() + 12 - 40
489
491
  });
490
- }), i.css("pointer-events", "none"), t.off(O()), Z.vfx(o, !0, !0);
492
+ }), i.css("pointer-events", "none"), t.off(N()), Z.vfx(o, !0, !0);
491
493
  });
492
494
  },
493
495
  movable: e => {
494
496
  if (!1 === e.movable) return;
495
- const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), n = $(".popup_body_" + e.id, t);
497
+ const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), p = $(".popup_body_" + e.id, t);
496
498
  t.css("touch-action", "none");
497
- let p = 0, s = 0, r = 0, c = 0;
499
+ let n = 0, s = 0, r = 0, c = 0;
498
500
  const a = e => {
499
501
  e.preventDefault();
500
502
  const o = L(e), i = P(e);
501
- 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),
502
- Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.css("left", t.offset().left - p);
503
+ n = 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),
504
+ Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.css("left", t.offset().left - n);
503
505
  }, d = e => {
504
506
  const i = {
505
507
  passive: !1
506
508
  };
507
- document.removeEventListener(I(), a, i), document.removeEventListener(A(), d, i),
508
- J.delete(o), n.css("pointer-events", "auto"), Z.vfx(t, !0);
509
+ document.removeEventListener(O(), a, i), document.removeEventListener(A(), d, i),
510
+ J.delete(o), p.css("pointer-events", "auto"), Z.vfx(t, !0);
509
511
  };
510
512
  J.set(o, {
511
513
  move: a,
512
514
  up: d
513
515
  });
514
- i[0].addEventListener(O(), e => {
515
- e.preventDefault(), n.css("pointer-events", "none"), u(e), Z.vfx(t, !1);
516
+ i[0].addEventListener(N(), e => {
517
+ e.preventDefault(), p.css("pointer-events", "none"), l(e), Z.vfx(t, !1);
516
518
  }, {
517
519
  passive: !1
518
520
  }), e.maximize && i.on("dblclick", o => {
519
521
  layerpro.popup.maximize(e);
520
522
  });
521
- const u = e => {
523
+ const l = e => {
522
524
  r = L(e), c = P(e);
523
525
  const o = {
524
526
  passive: !1
525
527
  };
526
- document.addEventListener(I(), a, o), document.addEventListener(A(), d, o);
528
+ document.addEventListener(O(), a, o), document.addEventListener(A(), d, o);
527
529
  };
528
530
  },
529
531
  resizable: e => {
@@ -535,41 +537,41 @@ var ne, pe = l({
535
537
  i.down = function(o) {
536
538
  Z.resizeModals(o, this, e);
537
539
  }, Q.set(o, i);
538
- const n = {
540
+ const p = {
539
541
  passive: !1
540
542
  };
541
543
  $("[class^=resize_]").each((o, t) => {
542
- t.addEventListener(O(), o => {
544
+ t.addEventListener(N(), o => {
543
545
  o.preventDefault(), Z.resizeModals(o, t, e);
544
- }, n);
546
+ }, p);
545
547
  });
546
548
  },
547
549
  resizeModals: (e, o, t) => {
548
- const i = $(o).parent(), n = String(t.id), p = L(e), s = P(e), r = [ p - G.scrollLeft(), s - G.scrollTop() ];
550
+ const i = $(o).parent(), p = String(t.id), n = L(e), s = P(e), r = [ n - G.scrollLeft(), s - G.scrollTop() ];
549
551
  t.minWidth, V.css("pointer-events", "none"), i.css("pointer-events", "none"), Z.vfx(i, !1);
550
552
  const c = e => {
551
553
  Z.doRes(e, o);
552
554
  }, a = e => {
553
555
  Z.stopRes(o);
554
- }, d = Q.get(n) || {};
555
- d.move = c, d.up = a, Q.set(n, d);
556
- const u = {
556
+ }, d = Q.get(p) || {};
557
+ d.move = c, d.up = a, Q.set(p, d);
558
+ const l = {
557
559
  passive: !1
558
560
  };
559
- document.addEventListener(I(), c, u), document.addEventListener(A(), a, u), q = r[0],
560
- D = r[1], X = i.width(), Y = i.height(), U = i.position().left, K = i.position().top,
561
- B = K + Y + 1, F = U + X + 1, R = o;
561
+ document.addEventListener(O(), c, l), document.addEventListener(A(), a, l), q = r[0],
562
+ D = r[1], X = i.width(), Y = i.height(), U = i.position().left, B = i.position().top,
563
+ K = B + Y + 1, F = U + X + 1, R = o;
562
564
  },
563
565
  doRes: (e, o) => {
564
566
  dispatchEvent(new Event("layerProResize"));
565
- const t = $(o), i = t.parent(), n = L(e), p = P(e), s = [ n - G.scrollLeft(), p - G.scrollTop() ];
567
+ const t = $(o), i = t.parent(), p = L(e), n = P(e), s = [ p - G.scrollLeft(), n - G.scrollTop() ];
566
568
  if (o === R) {
567
- let o = X + s[0] - q, n = Y + s[1] - D;
568
- const p = X - s[0] + q, r = Y - s[1] + D;
569
- 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({
569
+ let o = X + s[0] - q, p = Y + s[1] - D;
570
+ const n = X - s[0] + q, r = Y - s[1] + D;
571
+ o <= 0 && (o = 0), p <= 0 && (p = 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({
570
572
  height: Number(H + 1)
571
573
  }), i.height() > H && H <= r && i.css({
572
- top: Number(B - r),
574
+ top: Number(K - r),
573
575
  height: parseInt(r)
574
576
  })), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= j && i.css({
575
577
  width: Number(o),
@@ -577,51 +579,51 @@ var ne, pe = l({
577
579
  }), i.width() <= j && i.css({
578
580
  width: Number(j + 1)
579
581
  })), Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= H && i.css({
580
- height: Number(n)
581
- }), i.height() <= H && n > H && i.css({
582
+ height: Number(p)
583
+ }), i.height() <= H && p > H && i.css({
582
584
  height: Number(H + 1)
583
- })), 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({
585
+ })), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= j && n > j && i.css({
584
586
  width: Number(j + 1)
585
- }), i.width() > j && j <= p && i.css({
586
- width: parseInt(p),
587
- left: Number(F - p)
587
+ }), i.width() > j && j <= n && i.css({
588
+ width: parseInt(n),
589
+ left: Number(F - n)
588
590
  })), 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({
589
- top: Number(B - r),
591
+ top: Number(K - r),
590
592
  height: parseInt(r)
591
593
  }), i.height() <= H && r > H && i.css({
592
594
  height: Number(H + 1)
593
- }), i.width() >= j && p > j && i.css({
594
- width: parseInt(p),
595
- left: Number(F - p)
596
- }), i.width() <= j && p > j && i.css({
595
+ }), i.width() >= j && n > j && i.css({
596
+ width: parseInt(n),
597
+ left: Number(F - n)
598
+ }), i.width() <= j && n > j && i.css({
597
599
  width: Number(j + 1)
598
600
  })), t.hasClass("resize_corner_1") && (i.height() >= H && r > H && i.css({
599
- top: Number(B - r),
601
+ top: Number(K - r),
600
602
  height: Number(r)
601
603
  }), i.height() <= H && r > H && i.css({
602
604
  height: Number(H + 1)
603
605
  }), i.width() >= j && i.css({
604
606
  width: Number(o),
605
607
  right: Number(U - o)
606
- }), i.width() <= j && p > j && i.css({
608
+ }), i.width() <= j && n > j && i.css({
607
609
  width: Number(j + 1)
608
610
  })), t.hasClass("resize_corner_2") && (i.height() >= H && i.css({
609
- height: Number(n)
610
- }), i.height() <= H && n > H && i.css({
611
+ height: Number(p)
612
+ }), i.height() <= H && p > H && i.css({
611
613
  height: Number(H + 1)
612
614
  }), i.width() >= j && i.css({
613
615
  width: Number(o),
614
616
  right: Number(U - o)
615
617
  }), i.width() <= j && i.css({
616
618
  width: Number(j + 1)
617
- })), t.hasClass("resize_corner_3") && (i.height() >= H && n > H && i.css({
618
- height: Number(n)
619
- }), i.height() <= H && n > H && i.css({
619
+ })), t.hasClass("resize_corner_3") && (i.height() >= H && p > H && i.css({
620
+ height: Number(p)
621
+ }), i.height() <= H && p > H && i.css({
620
622
  height: Number(H + 1)
621
- }), i.width() >= j && p > j && i.css({
622
- width: Number(p),
623
- left: Number(F - p)
624
- }), i.width() <= j && p > j && i.css({
623
+ }), i.width() >= j && n > j && i.css({
624
+ width: Number(n),
625
+ left: Number(F - n)
626
+ }), i.width() <= j && n > j && i.css({
625
627
  width: Number(j + 1)
626
628
  })));
627
629
  }
@@ -635,7 +637,7 @@ var ne, pe = l({
635
637
  const o = {
636
638
  passive: !1
637
639
  };
638
- t.move && document.removeEventListener(I(), t.move, o), t.up && document.removeEventListener(A(), t.up, o),
640
+ t.move && document.removeEventListener(O(), t.move, o), t.up && document.removeEventListener(A(), t.up, o),
639
641
  Q.delete(String(e));
640
642
  }
641
643
  },
@@ -654,19 +656,7 @@ var ne, pe = l({
654
656
  configurable: !1
655
657
  });
656
658
  }
657
- }), se = l({
658
- "core/purge.ts"() {
659
- ne = e => {
660
- let o, t, i = e.attributes;
661
- if (i) for (t = i.length, o = 0; o < t; o += 1) i[o].name;
662
- if (i = e.childNodes, i) for (t = i.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
663
- }, Object.defineProperty(layerpro, "purge", {
664
- value: new Proxy(ne, {}),
665
- writable: !1,
666
- configurable: !1
667
- });
668
- }
669
- }), re = l({
659
+ }), ne = u({
670
660
  "core/window.ts"() {
671
661
  window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
672
662
  capture: !0,
@@ -682,7 +672,7 @@ window.layerpro || (Object.defineProperty(window, "layerpro", {
682
672
  writable: !1,
683
673
  configurable: !1,
684
674
  enumerable: !1
685
- }), m(), ee(), pe(), se(), re(), layerpro.setProps = (e, o) => {
675
+ }), m(), ee(), pe(), ne(), layerpro.setProps = (e, o) => {
686
676
  Reflect.ownKeys(e).forEach(t => {
687
677
  const i = Object.getOwnPropertyDescriptor(e, t);
688
678
  i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
package/index.js CHANGED
@@ -2,7 +2,7 @@
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, l = (e, o) => function() {
5
+ var t, i, p, n, 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
7
  }, u = (e, o) => {
8
8
  for (var t in o) a(e, t, {
@@ -24,11 +24,11 @@ u({}, {
24
24
  mouseCoord: () => i
25
25
  });
26
26
 
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({
27
+ var m, b, _, f, v, g, y, w, z, k, x, T, C, E, S, M, I, N, O, A, L, P, j, H, R, W, D, X, q, Y, U, B, K, F, J, Q, G, V, Z = l({
28
28
  "core/mouseCoords.ts"() {
29
- i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
30
- p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
31
- s = e.pageX, r = e.pageY, [ n, p ]);
29
+ i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], p = 0,
30
+ n = "", s = 0, r = 0, c = e => (p = s < e.pageX ? 1 : 0, n = r < e.pageY ? "down" : "up",
31
+ s = e.pageX, r = e.pageY, [ p, n ]);
32
32
  }
33
33
  }), ee = l({
34
34
  "core/message.ts"() {
@@ -39,7 +39,7 @@ 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
39
39
  '"': "&quot;",
40
40
  "'": "&#39;"
41
41
  }, b = e => e.replace(/[&<>"']/g, e => m[e]), _ = e => {
42
- const o = b(String(e)), t = window.layerpro.popup.open({
42
+ const o = b(String(e)), t = layerpro.popup.open({
43
43
  id: "__alert",
44
44
  name: "Warning",
45
45
  icon: "&#9888;",
@@ -55,10 +55,10 @@ 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
55
55
  resizable: !1
56
56
  }), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + t.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
57
57
  $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
58
- window.layerpro.popup.close(t);
58
+ layerpro.popup.close(t);
59
59
  });
60
60
  }, f = (e, o) => {
61
- const t = b(String(e)), i = window.layerpro.popup.open({
61
+ const t = b(String(e)), i = layerpro.popup.open({
62
62
  id: "__message",
63
63
  name: "Message",
64
64
  icon: "&#9965;",
@@ -72,13 +72,13 @@ 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
72
72
  raised: !0,
73
73
  movable: !0,
74
74
  resizable: !1
75
- }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
76
- $(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
77
- o && o(), window.layerpro.popup.close(i);
75
+ }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
76
+ $(".popup_body_" + i.id).html(p), $("#a_" + i.id).on("click", () => {
77
+ o && o(), layerpro.popup.close(i);
78
78
  });
79
79
  }, v = (e, o, t) => {
80
80
  if (0 === $(".confirm").length) {
81
- const i = b(String(e)), n = window.layerpro.popup.open({
81
+ const i = b(String(e)), p = layerpro.popup.open({
82
82
  id: "__confirm",
83
83
  name: "Confirm",
84
84
  icon: "&#9745;",
@@ -92,15 +92,15 @@ 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
92
92
  raised: !0,
93
93
  movable: !0,
94
94
  resizable: !1
95
- }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CONFIRM</button>\n <button id="${"b_" + n.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
96
- $(".popup_body_" + n.id).html(p), $("#a_" + n.id).on("click", () => {
97
- o && o(), window.layerpro.popup.close(n);
98
- }), $("#b_" + n.id).on("click", () => {
99
- t && t(), window.layerpro.popup.close(n);
95
+ }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + p.id}" type="button">CONFIRM</button>\n <button id="${"b_" + p.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
96
+ $(".popup_body_" + p.id).html(n), $("#a_" + p.id).on("click", () => {
97
+ o && o(), layerpro.popup.close(p);
98
+ }), $("#b_" + p.id).on("click", () => {
99
+ t && t(), layerpro.popup.close(p);
100
100
  });
101
101
  }
102
102
  }, g = (e, o) => {
103
- const t = o || "_prompt", i = b(String(e)), n = window.layerpro.popup.open({
103
+ const t = o || "_prompt", i = b(String(e)), p = layerpro.popup.open({
104
104
  id: "__prompt",
105
105
  name: "Prompt",
106
106
  icon: "&#9998;",
@@ -114,22 +114,25 @@ 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
114
114
  raised: !0,
115
115
  movable: !0,
116
116
  resizable: !1
117
- }), p = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${n.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${n.id}" type="button">OK</button>\n <button id="b_${n.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
118
- $(".popup_body_" + n.id).html(p), $("#input_" + n.id).on("focus", function() {
117
+ }), n = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${p.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${p.id}" type="button">OK</button>\n <button id="b_${p.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
118
+ $(".popup_body_" + p.id).html(n), $("#input_" + p.id).on("focus", function() {
119
119
  $(this).attr("placeholder", "");
120
120
  }).on("blur", function() {
121
121
  $(this).attr("placeholder", "write here");
122
- }), $("#a_" + n.id).on("click", () => {
123
- if ($("#input_" + n.id).val() > "") {
124
- "function" == typeof t && t();
125
- if (String(t) === t) return JSON.stringify($("#input_" + n.id).val());
126
- window.layerpro.popup.close(n);
122
+ }), $("#a_" + p.id).on("click", () => {
123
+ if ($("#input_" + p.id).val() > "") {
124
+ if ("function" == typeof t) {
125
+ const e = String(document.getElementById("input___prompt"));
126
+ t(e);
127
+ }
128
+ if (String(t) === t) return JSON.stringify($("#input_" + p.id).val());
129
+ layerpro.popup.close(p);
127
130
  } else alert("input can't be empty!");
128
- }), $("#b_" + n.id).on("click", () => {
129
- window.layerpro.popup.close(n);
131
+ }), $("#b_" + p.id).on("click", () => {
132
+ layerpro.popup.close(p);
130
133
  });
131
- }, window.message = (e, o) => window.layerpro.message(e, o), window.alert = e => window.layerpro.alert(e),
132
- window.confirm = (e, o, t) => window.layerpro.confirm(e, o, t), window.prompt = (e, o, t) => window.layerpro.prompt(e, o, t),
134
+ }, globalThis.message = (e, o) => layerpro.message(e, o), globalThis.alert = e => layerpro.alert(e),
135
+ globalThis.confirm = (e, o, t) => layerpro.confirm(e, o, t), globalThis.prompt = (e, o, t) => layerpro.prompt(e, o, t),
133
136
  Object.defineProperty(window, "alert", {
134
137
  enumerable: !1
135
138
  }), Object.defineProperty(window, "prompt", {
@@ -138,7 +141,7 @@ 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
138
141
  enumerable: !1
139
142
  }), Object.defineProperty(window, "confirm", {
140
143
  enumerable: !1
141
- }), Object.defineProperties(window.layerpro, {
144
+ }), Object.defineProperties(layerpro, {
142
145
  prompt: {
143
146
  value: g
144
147
  },
@@ -155,7 +158,7 @@ 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
155
158
  }
156
159
  }), oe = l({
157
160
  "core/genLayer.ts"() {
158
- ee(), w = new Map, y = new Map, z = {
161
+ ee(), y = new Map, w = new Map, z = {
159
162
  "&": "&amp;",
160
163
  "<": "&lt;",
161
164
  ">": "&gt;",
@@ -186,23 +189,23 @@ 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
186
189
  }).on("mousedown", e => {
187
190
  layerpro.popup.index(o);
188
191
  }).hide().fadeIn(o.fadeIn);
189
- const n = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
192
+ const p = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
190
193
  "pointer-events": "auto"
191
194
  }).addClass("zHigh").addClass(o.class);
192
195
  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),
193
196
  layerpro.popup.unmount = e => {
194
- const o = w.get(e);
195
- o && (o.unmount(), w.delete(e));
196
- }, layerpro.popup.cleanupEvents = e => {
197
197
  const o = y.get(e);
198
+ o && (o.unmount(), y.delete(e));
199
+ }, layerpro.popup.cleanupEvents = e => {
200
+ const o = w.get(e);
198
201
  o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
199
202
  o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
200
203
  o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
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"),
204
+ w.delete(e));
205
+ }, layerpro.popup.getReactRoot = e => y.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(p).addClass("popup_bar_selected"),
203
206
  o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</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),
207
+ const n = k(String(o.name));
208
+ if ($('<div class="popup_drag_' + o.id + '">' + n + "</div>", t).appendTo(".popup_bar_" + o.id),
206
209
  $('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
207
210
  !0 === o.iconize && 0 === $("#popup_dock").length) {
208
211
  $("#root").css("margin", "0 0 var( --dock-height ) 0");
@@ -212,38 +215,38 @@ 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
212
215
  });
213
216
  }
214
217
  if ($("#popup_dock").length > 0 && !0 === o.dockable) {
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) {
218
+ 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) {
216
219
  $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
217
220
  layerpro.popup.index(o);
218
- }, n = function(e) {
221
+ }, p = function(e) {
219
222
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
220
223
  };
221
- y.set(e, {
224
+ w.set(e, {
222
225
  iconClick: !0,
223
226
  iconClose: !0
224
227
  }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
225
- $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
228
+ $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", p);
226
229
  }
227
230
  if (!0 === o.iconize) {
228
231
  const e = String(o.id), t = function(e) {
229
232
  layerpro.popup.iconize(o);
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);
233
+ }, i = w.get(e) || {};
234
+ i.buttonIconize = !0, w.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
232
235
  }
233
236
  if (!0 === o.maximize) {
234
237
  const e = String(o.id), t = function(e) {
235
238
  layerpro.popup.maximize(o);
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);
239
+ }, i = w.get(e) || {};
240
+ i.buttonMaximize = !0, w.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
238
241
  }
239
242
  if (!0 === o.close) {
240
243
  const e = String(o.id), t = function(e) {
241
244
  o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
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);
245
+ }, i = w.get(e) || {};
246
+ i.buttonClose = !0, w.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
244
247
  }
245
- const s = String(o.id), r = y.get(s) || {};
246
- if (r.escKey = !0, y.set(s, r), $(document).on("keydown", function(e) {
248
+ const s = String(o.id), r = w.get(s) || {};
249
+ if (r.escKey = !0, w.set(s, r), $(document).on("keydown", function(e) {
247
250
  "Escape" !== e.key && 27 !== e.keyCode || (o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(),
248
251
  layerpro.popup.close(o));
249
252
  }), o.timer > 0) {
@@ -273,7 +276,7 @@ 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
273
276
  o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
274
277
  o.isMaximize && layerpro.popup.maximize(o);
275
278
  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() {
279
+ $('<div class="popup_internal_' + o.id + '">', c).appendTo(p), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
277
280
  (() => {
278
281
  if (o.body && !o.source) {
279
282
  const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
@@ -283,7 +286,7 @@ 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
283
286
  if (!t) return;
284
287
  try {
285
288
  const i = e(t);
286
- i.render(o.body), w.set(String(o.id), i);
289
+ i.render(o.body), y.set(String(o.id), i);
287
290
  } catch (e) {
288
291
  const o = e?.message || String(e);
289
292
  o.includes("Invalid hook call") || o.includes("hooks");
@@ -314,26 +317,26 @@ 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
314
317
  }
315
318
  }), te = l({
316
319
  "core/mobile.ts"() {
317
- if (C = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
318
- E = () => {
320
+ if (T = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
321
+ C = () => {
319
322
  if ("undefined" == typeof navigator) return !1;
320
323
  const e = navigator.userAgent;
321
324
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
322
- }, S = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (M = () => {
325
+ }, E = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (S = () => {
323
326
  if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
324
- const e = E() || C();
325
- return S() && e ? "touch" : "mouse";
326
- })(), N = !C(), "undefined" != typeof window) {
327
+ const e = C() || T();
328
+ return E() && e ? "touch" : "mouse";
329
+ })(), M = !T(), "undefined" != typeof window) {
327
330
  const e = window.matchMedia("(max-width: 1024px)"), o = () => {
328
- const e = M(), o = !C();
329
- N !== o && (N = o);
331
+ const e = S(), o = !T();
332
+ M !== o && (M = o);
330
333
  };
331
334
  let t;
332
335
  e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
333
336
  clearTimeout(t), t = setTimeout(o, 150);
334
337
  });
335
338
  }
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,
339
+ I = () => "pointerdown", N = () => "pointermove", O = () => "pointerup", A = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
337
340
  L = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
338
341
  }
339
342
  });
@@ -342,7 +345,7 @@ u({}, {
342
345
  popup: () => V
343
346
  });
344
347
 
345
- var ie, ne = l({
348
+ var ie = l({
346
349
  "core/properties.ts"() {
347
350
  oe(), te(), P = 250, j = 150, R = 1e3, F = new Map, J = new Map, Q = $(window),
348
351
  G = $("body"), V = {
@@ -360,8 +363,7 @@ var ie, ne = l({
360
363
  "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
361
364
  "pointer-events": "none",
362
365
  "z-index": V.zIndex($("*")) + 1
363
- }), 0 === $(".popup_window_" + e.id, "#popup").length && x(e), layerpro.purge(document),
364
- e;
366
+ }), 0 === $(".popup_window_" + e.id, "#popup").length && x(e), e;
365
367
  },
366
368
  dispatch: e => {
367
369
  layerpro.popup.store(e);
@@ -392,7 +394,7 @@ var ie, ne = l({
392
394
  const e = {
393
395
  passive: !1
394
396
  };
395
- t.move && document.removeEventListener(O(), t.move, e), t.up && document.removeEventListener(I(), t.up, e),
397
+ t.move && document.removeEventListener(N(), t.move, e), t.up && document.removeEventListener(O(), t.up, e),
396
398
  F.delete(String(o));
397
399
  }
398
400
  const i = J.get(String(o));
@@ -400,7 +402,7 @@ var ie, ne = l({
400
402
  const e = {
401
403
  passive: !1
402
404
  };
403
- i.move && document.removeEventListener(O(), i.move, e), i.up && document.removeEventListener(I(), i.up, e),
405
+ i.move && document.removeEventListener(N(), i.move, e), i.up && document.removeEventListener(O(), i.up, e),
404
406
  J.delete(String(o));
405
407
  }
406
408
  !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
@@ -413,7 +415,7 @@ var ie, ne = l({
413
415
  } else $("#popup").fadeOut(() => {
414
416
  $(void 0).remove();
415
417
  });
416
- layerpro.purge(document), setTimeout(() => V.removeDock(e), 300);
418
+ setTimeout(() => V.removeDock(e), 300);
417
419
  },
418
420
  removeDock: e => {
419
421
  $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
@@ -450,14 +452,14 @@ var ie, ne = l({
450
452
  const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
451
453
  if (V.vfx(o, !1, !0), o.data("store")) {
452
454
  if (o.data("store")) {
453
- const n = o.data("store");
455
+ const p = o.data("store");
454
456
  o.animate({
455
- top: n.y,
456
- left: n.x,
457
- width: n.w,
458
- height: n.h
457
+ top: p.y,
458
+ left: p.x,
459
+ width: p.w,
460
+ height: p.h
459
461
  }, () => {
460
- i.css("pointer-events", "auto"), t.on(T(), function(o) {
462
+ i.css("pointer-events", "auto"), t.on(I(), function(o) {
461
463
  V.resizeModals(o, this, e);
462
464
  }), Q.off("layerProResize.eventItem"), V.vfx(o, !0);
463
465
  }), o.removeData("store");
@@ -481,32 +483,32 @@ var ie, ne = l({
481
483
  width: Q.width() + 12,
482
484
  height: Q.height() + 12 - 40
483
485
  });
484
- }), i.css("pointer-events", "none"), t.off(T()), V.vfx(o, !0, !0);
486
+ }), i.css("pointer-events", "none"), t.off(I()), V.vfx(o, !0, !0);
485
487
  });
486
488
  },
487
489
  movable: e => {
488
490
  if (!1 === e.movable) return;
489
- const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), n = $(".popup_body_" + e.id, t);
491
+ const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), p = $(".popup_body_" + e.id, t);
490
492
  t.css("touch-action", "none");
491
- let p = 0, s = 0, r = 0, c = 0;
493
+ let n = 0, s = 0, r = 0, c = 0;
492
494
  const a = e => {
493
495
  e.preventDefault();
494
496
  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);
497
+ n = 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),
498
+ V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.css("left", t.offset().left - n);
497
499
  }, d = e => {
498
500
  const i = {
499
501
  passive: !1
500
502
  };
501
- document.removeEventListener(O(), a, i), document.removeEventListener(I(), d, i),
502
- F.delete(o), n.css("pointer-events", "auto"), V.vfx(t, !0);
503
+ document.removeEventListener(N(), a, i), document.removeEventListener(O(), d, i),
504
+ F.delete(o), p.css("pointer-events", "auto"), V.vfx(t, !0);
503
505
  };
504
506
  F.set(o, {
505
507
  move: a,
506
508
  up: d
507
509
  });
508
- i[0].addEventListener(T(), e => {
509
- e.preventDefault(), n.css("pointer-events", "none"), l(e), V.vfx(t, !1);
510
+ i[0].addEventListener(I(), e => {
511
+ e.preventDefault(), p.css("pointer-events", "none"), l(e), V.vfx(t, !1);
510
512
  }, {
511
513
  passive: !1
512
514
  }), e.maximize && i.on("dblclick", o => {
@@ -517,7 +519,7 @@ var ie, ne = l({
517
519
  const o = {
518
520
  passive: !1
519
521
  };
520
- document.addEventListener(O(), a, o), document.addEventListener(I(), d, o);
522
+ document.addEventListener(N(), a, o), document.addEventListener(O(), d, o);
521
523
  };
522
524
  },
523
525
  resizable: e => {
@@ -529,41 +531,41 @@ var ie, ne = l({
529
531
  i.down = function(o) {
530
532
  V.resizeModals(o, this, e);
531
533
  }, J.set(o, i);
532
- const n = {
534
+ const p = {
533
535
  passive: !1
534
536
  };
535
537
  $("[class^=resize_]").each((o, t) => {
536
- t.addEventListener(T(), o => {
538
+ t.addEventListener(I(), o => {
537
539
  o.preventDefault(), V.resizeModals(o, t, e);
538
- }, n);
540
+ }, p);
539
541
  });
540
542
  },
541
543
  resizeModals: (e, o, t) => {
542
- const i = $(o).parent(), n = String(t.id), p = A(e), s = L(e), r = [ p - Q.scrollLeft(), s - Q.scrollTop() ];
544
+ const i = $(o).parent(), p = String(t.id), n = A(e), s = L(e), r = [ n - Q.scrollLeft(), s - Q.scrollTop() ];
543
545
  t.minWidth, G.css("pointer-events", "none"), i.css("pointer-events", "none"), V.vfx(i, !1);
544
546
  const c = e => {
545
547
  V.doRes(e, o);
546
548
  }, a = e => {
547
549
  V.stopRes(o);
548
- }, d = J.get(n) || {};
549
- d.move = c, d.up = a, J.set(n, d);
550
+ }, d = J.get(p) || {};
551
+ d.move = c, d.up = a, J.set(p, d);
550
552
  const l = {
551
553
  passive: !1
552
554
  };
553
- document.addEventListener(O(), c, l), document.addEventListener(I(), a, l), W = r[0],
555
+ document.addEventListener(N(), c, l), document.addEventListener(O(), a, l), W = r[0],
554
556
  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;
557
+ B = U + q + 1, K = Y + X + 1, H = o;
556
558
  },
557
559
  doRes: (e, o) => {
558
560
  dispatchEvent(new Event("layerProResize"));
559
- const t = $(o), i = t.parent(), n = A(e), p = L(e), s = [ n - Q.scrollLeft(), p - Q.scrollTop() ];
561
+ const t = $(o), i = t.parent(), p = A(e), n = L(e), s = [ p - Q.scrollLeft(), n - Q.scrollTop() ];
560
562
  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({
563
+ let o = X + s[0] - W, p = q + s[1] - D;
564
+ const n = X - s[0] + W, r = q - s[1] + D;
565
+ o <= 0 && (o = 0), p <= 0 && (p = 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
566
  height: Number(j + 1)
565
567
  }), i.height() > j && j <= r && i.css({
566
- top: Number(K - r),
568
+ top: Number(B - r),
567
569
  height: parseInt(r)
568
570
  })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= P && i.css({
569
571
  width: Number(o),
@@ -571,51 +573,51 @@ var ie, ne = l({
571
573
  }), i.width() <= P && i.css({
572
574
  width: Number(P + 1)
573
575
  })), V.checkArea(e)[1] < V.checkArea(e)[4] && 1 === Math.sign(V.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= j && i.css({
574
- height: Number(n)
575
- }), i.height() <= j && n > j && i.css({
576
+ height: Number(p)
577
+ }), i.height() <= j && p > j && i.css({
576
578
  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({
579
+ })), V.checkArea(e)[0] < V.checkArea(e)[5] && 1 === Math.sign(V.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= P && n > P && i.css({
578
580
  width: Number(P + 1)
579
- }), i.width() > P && P <= p && i.css({
580
- width: parseInt(p),
581
- left: Number(B - p)
581
+ }), i.width() > P && P <= n && i.css({
582
+ width: parseInt(n),
583
+ left: Number(K - n)
582
584
  })), 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),
585
+ top: Number(B - r),
584
586
  height: parseInt(r)
585
587
  }), i.height() <= j && r > j && i.css({
586
588
  height: Number(j + 1)
587
- }), i.width() >= P && p > P && i.css({
588
- width: parseInt(p),
589
- left: Number(B - p)
590
- }), i.width() <= P && p > P && i.css({
589
+ }), i.width() >= P && n > P && i.css({
590
+ width: parseInt(n),
591
+ left: Number(K - n)
592
+ }), i.width() <= P && n > P && i.css({
591
593
  width: Number(P + 1)
592
594
  })), t.hasClass("resize_corner_1") && (i.height() >= j && r > j && i.css({
593
- top: Number(K - r),
595
+ top: Number(B - r),
594
596
  height: Number(r)
595
597
  }), i.height() <= j && r > j && i.css({
596
598
  height: Number(j + 1)
597
599
  }), i.width() >= P && i.css({
598
600
  width: Number(o),
599
601
  right: Number(Y - o)
600
- }), i.width() <= P && p > P && i.css({
602
+ }), i.width() <= P && n > P && i.css({
601
603
  width: Number(P + 1)
602
604
  })), t.hasClass("resize_corner_2") && (i.height() >= j && i.css({
603
- height: Number(n)
604
- }), i.height() <= j && n > j && i.css({
605
+ height: Number(p)
606
+ }), i.height() <= j && p > j && i.css({
605
607
  height: Number(j + 1)
606
608
  }), i.width() >= P && i.css({
607
609
  width: Number(o),
608
610
  right: Number(Y - o)
609
611
  }), i.width() <= P && i.css({
610
612
  width: Number(P + 1)
611
- })), t.hasClass("resize_corner_3") && (i.height() >= j && n > j && i.css({
612
- height: Number(n)
613
- }), i.height() <= j && n > j && i.css({
613
+ })), t.hasClass("resize_corner_3") && (i.height() >= j && p > j && i.css({
614
+ height: Number(p)
615
+ }), i.height() <= j && p > j && i.css({
614
616
  height: Number(j + 1)
615
- }), i.width() >= P && p > P && i.css({
616
- width: Number(p),
617
- left: Number(B - p)
618
- }), i.width() <= P && p > P && i.css({
617
+ }), i.width() >= P && n > P && i.css({
618
+ width: Number(n),
619
+ left: Number(K - n)
620
+ }), i.width() <= P && n > P && i.css({
619
621
  width: Number(P + 1)
620
622
  })));
621
623
  }
@@ -629,7 +631,7 @@ var ie, ne = l({
629
631
  const o = {
630
632
  passive: !1
631
633
  };
632
- t.move && document.removeEventListener(O(), t.move, o), t.up && document.removeEventListener(I(), t.up, o),
634
+ t.move && document.removeEventListener(N(), t.move, o), t.up && document.removeEventListener(O(), t.up, o),
633
635
  J.delete(String(e));
634
636
  }
635
637
  },
@@ -649,18 +651,6 @@ var ie, ne = l({
649
651
  });
650
652
  }
651
653
  }), pe = l({
652
- "core/purge.ts"() {
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]);
657
- }, Object.defineProperty(layerpro, "purge", {
658
- value: new Proxy(ie, {}),
659
- writable: !1,
660
- configurable: !1
661
- });
662
- }
663
- }), se = l({
664
654
  "core/window.ts"() {
665
655
  window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
666
656
  capture: !0,
@@ -676,7 +666,7 @@ window.layerpro || (Object.defineProperty(window, "layerpro", {
676
666
  writable: !1,
677
667
  configurable: !1,
678
668
  enumerable: !1
679
- }), h(), Z(), ne(), pe(), se(), layerpro.setProps = (e, o) => {
669
+ }), h(), Z(), ie(), pe(), layerpro.setProps = (e, o) => {
680
670
  Reflect.ownKeys(e).forEach(t => {
681
671
  const i = Object.getOwnPropertyDescriptor(e, t);
682
672
  i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "layerpro",
3
- "code": "layerpro",
4
- "version": "2.3.0",
3
+ "codeName": "layerpro",
4
+ "version": "2.8.0",
5
5
  "description": "The real custom modals, alert, confirm, prompt... for your browser",
6
6
  "main": "./index.cjs",
7
7
  "browser": "./index.cjs",
@@ -48,6 +48,23 @@
48
48
  "url": "https://dario.passariello.ca/",
49
49
  "email": "dariopassariello@gmail.com"
50
50
  },
51
+ "dependencies": {
52
+ "caniuse-lite": "1.0.30001803"
53
+ },
54
+ "overrides": {
55
+ "function-bind": "npm:@socketregistry/function-bind@^1",
56
+ "hasown": "npm:@socketregistry/hasown@^1",
57
+ "is-core-module": "npm:@socketregistry/is-core-module@^1",
58
+ "object-assign": "npm:@socketregistry/object-assign@^1",
59
+ "path-parse": "npm:@socketregistry/path-parse@^1"
60
+ },
61
+ "resolutions": {
62
+ "function-bind": "npm:@socketregistry/function-bind@^1",
63
+ "hasown": "npm:@socketregistry/hasown@^1",
64
+ "is-core-module": "npm:@socketregistry/is-core-module@^1",
65
+ "object-assign": "npm:@socketregistry/object-assign@^1",
66
+ "path-parse": "npm:@socketregistry/path-parse@^1"
67
+ },
51
68
  "module": "./index.js",
52
69
  "exports": {
53
70
  ".": {
@@ -80,7 +80,6 @@ interface _layerpro {
80
80
  readonly prompt: (txt: string, callback: (input: string) => void, event: Event) => void
81
81
  readonly message: (txt: string, callback: () => void) => void
82
82
  readonly confirm: (txt: string, yesCallback: () => void, noCallback: () => void) => void
83
- readonly purge: (document: Document) => void
84
83
  readonly credits: (txt: string) => void
85
84
 
86
85
  setProps: (obj, options?) => void