layerpro 2.8.0 → 3.0.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/index.js CHANGED
@@ -1,45 +1,788 @@
1
1
  ;(()=>{const s=document.createElement("style");s.textContent="@layer layerpro {:root{--input-background-color:#444;--input-color:white;--button-background-color:#444;--button-color:white;--inputButton-fontSize:.8em;--resize-background-color:rgba(30,150,255,.5);--resize-shadow:0 0 10px rgba(30,150,255,.5);--dock-background-color:black;--dock-height:35px;--dock-sideLeft:10px;--dock-sideCenter:auto;--dock-sideRight:10px;--dock-icon-width:140px;--transition-time:.5s;--border-radius:25px;--corner-size:14px;--corner-border-radius:50%;--hover-opacity:1;--hover-filter:blur(3px);}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup{position:static;}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup,#popup_dock{will-change:transform,opacity,top,left,height,width;}#popup{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;}#popup .buttons{display:flex;position:absolute;left:0;right:0;bottom:0;height:40px;justify-content:space-evenly;align-items:center;}#popup .buttons button{all:unset;width:100%;height:100%;border-right:2px solid #636363;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);overflow:hidden;position:relative;color:var(--button-color);}#popup .buttons button:last-child{border-right:none;}#popup .buttons button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup .buttons button:hover{transition:all 0.3s ease;box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup .popup_bar_selected{background:linear-gradient( 45deg,#162858 60%,rgba(34,78,145,0.5411764706) 100%) !important;}#popup .zHigh{border-top-color:#278ed0 !important;box-shadow:0 -15px 20px -10px rgba(30,150,255,0.5),0 0 15px rgba(0,0,0,0.7) !important;border:1px solid rgba(0,0,0,0.05);}#popup [class^=popup_raised_]{position:absolute;inset:0;width:100%;height:100%;background-color:rgba(0,0,0,0.3);z-index:1;}#popup [class^=popup_window_]{position:absolute;inset:0;width:100%;height:100%;z-index:2;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,0.3);overflow:hidden;}#popup [class^=popup_overflow_]{position:absolute;inset:auto;z-index:3;border-radius:10px;background:gray;}#popup [class^=popup_bar_]{display:flex;width:100%;height:36px;background:linear-gradient( 45deg,#4a4a4f 60%,#AAA 100%);border-bottom:2px solid #555;box-shadow:0 1px 1px #888;z-index:2;}#popup [class^=popup_drag_]{width:100%;padding:10px 0 0 10px;color:#eee;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup [class^=popup_icon_]{padding:8px 0 0 10px;color:#eee;font-size:1.1em;}#popup [class^=popup_option_]{display:flex;margin-right:15px;}#popup [class^=popup_option_] button{position:relative;display:inline-block;width:36px;height:28px;color:white;border-radius:5px;margin:4px;transition:all 0.3s ease;background:transparent;}#popup [class^=popup_option_] button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup [class^=popup_option_] button:after{content:\"\";inset:0;display:block;position:absolute;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);border-radius:5px;z-index:-1;}#popup [class^=popup_option_] button:after{opacity:0;transition:opacity 0.3s ease-in-out;}#popup [class^=popup_option_] button:hover{background:rgba(255,255,255,0.1);box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup [class^=popup_option_] button:hover::after{opacity:1;}#popup [class^=popup_option_] button [class^=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class^=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class^=popup_internal_]{position:absolute;inset:37px 0 0 0;z-index:1;background:linear-gradient( 0deg,rgb(60,60,60) 0%,#4a4a4f 100%);}#popup [class^=popup_body_]{position:absolute;inset:0;color:#eee;text-align:center;}.popupMaxSize{position:absolute !important;width:100% !important;height:100% !important;inset:0 !important;margin:0 !important;padding:0 !important;border-radius:0 !important;}#popup_dock{position:absolute;bottom:0;left:0;right:0;height:var(--dock-height);background-color:var(--dock-background-color);border-top:1px solid rgba(255,255,255,0.521);}#popup_dock #popup_dock_icon{position:absolute;top:3px;left:3px;width:70px;height:var(--dock-height);}#popup_dock #popup_dock_list{position:absolute;top:3px;left:var(--dock-sideLeft);right:var(--dock-sideLeft);height:calc(var(--dock-height) - 5px);overflow-y:auto;text-align:right;display:flex;flex-direction:row;justify-content:flex-end;}#popup_dock #popup_dock_list [class^=icon_]{width:var(--dock-icon-width);float:left;padding:4px;color:white;margin:2px 3px 0 0;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;filter:saturate(400%);}#popup_dock #popup_dock_list [class^=icon_]:hover{background-color:rgb(77,77,77);}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(1){width:20%;text-align:center;color:#F60;}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(2){width:80%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup_dock #popup_dock_list [class^=icon_] button{width:20px;height:20px;color:white;padding:4px;margin:0;display:flex;align-content:center;justify-content:center;font-size:0.7em;border:none;background:none;}#popup_dock #popup_dock_options{position:absolute;top:3px;right:10px;width:var(--dock-sideRight);height:var(--dock-height);}#popup .iconize:before,#popup .maximize:before,#popup .close:before{content:\"\";position:absolute;inset:0;background-repeat:no-repeat !important;background-position:center !important;background-size:50% !important;filter:invert(1);opacity:0.5;margin:0;padding:0;}#popup .iconize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+C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5MTc0MjMiCiAgICAgICB5PSIyOTMuNjkyNzgiCiAgICAgICB4PSIwLjI3NDg0NjczIgogICAgICAgaGVpZ2h0PSIxLjM5ODM0ODUiCiAgICAgICB3aWR0aD0iNC43NjI0OTk4IgogICAgICAgaWQ9InJlY3QzNzM2LTciCiAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDowLjEzMjk5MTg1IiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup .maximize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3g9IjAgMCA1LjI5MTY2NjUgNS4yOTE2NjY4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmczNzY4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMSAoM2JmNWFlMGQyNSwgMjAyMS0wOS0yMCkiCiAgIHNvZGlwb2RpOmRvY25hbWU9Im1heGltaXplLnN2ZyIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG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AuMjY1MzcgMC42OTI2MDk5NSwwLjI2NTM3IDAuOTU3OTg5OTUsMCBsIDEuMjI0MjEsLTEuMjI0MTcgMS4yMjQyMDgsMS4yMjQxNyBjIDAuMTMyNjkyLDAuMTMyNjggMC4zMDU4MywwLjE5OTI3IDAuNDc4OTkxLDAuMTk5MjcgMC4wNDMzLDAgMC4wODY3LC0wLjAwNCAwLjEyOTM3OSwtMC4wMTI1IDAuMTI3OTcxLC0wLjAyNDkgMC4yNTAxLC0wLjA4NzIgMC4zNDk2MiwtMC4xODY3NiAwLjAzMzIsLTAuMDMzMiAwLjA2MjMsLTAuMDY4NiAwLjA4NzEsLTAuMTA2MTQgMC4xNzQxNiwtMC4yNjMxOSAwLjE0NTA2OSwtMC42MTk0NiAtMC4wODcxLC0wLjg1MTY2IGwgLTEuMjI0MjA4LC0xLjIyNDE3IDEuMjI0MjA4LC0xLjIyNDE3IGMgMC4yNjUzNywtMC4yNjUzNyAwLjI2NTM3LC0wLjY5MjQ0IDAsLTAuOTU3ODEgLTAuMjY1Mzc5LC0wLjI2NTM3IC0wLjY5MjYxLC0wLjI2NTM3IC0wLjk1Nzk5LDAgbCAtMS4yMjQyMDgsMS4yMjQxNyAtMS4yMjQyMSwtMS4yMjQxNyBjIC0wLjEzMjY5LC0wLjEzMjY5IC0wLjMwNTgzLC0wLjE5OTI3IC0wLjQ3ODk4OTk1LC0wLjE5OTI3IHoiCiAgICAgICBpZD0icmVjdDM3MTUiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup > input,#popup > button,#popup > textarea,#popup > select{all:unset;}.popup_alert,.popup_message,.popup_prompt,.popup_confirm{height:calc(100% - 41px);box-shadow:0 1px 1px #888;overflow:auto;padding:20px;word-break:break-all;}.popup_alert input[type=text],.popup_message input[type=text],.popup_prompt input[type=text],.popup_confirm input[type=text]{position:relative;width:90%;height:35px;padding:5px;font-size:1.05em;border:2px solid rgba(0,0,0,0.3);border-radius:6px;color:#ddd;background-color:#4a4a4f;}.popup_window___alert #a___alert,.popup_window___alert #a___message,.popup_window___message #a___alert,.popup_window___message #a___message{width:100% !important;}.popup_window___prompt #a___alert,.popup_window___prompt #b___alert,.popup_window___prompt #a___message,.popup_window___prompt #b___message,.popup_window___confirm #a___alert,.popup_window___confirm #b___alert,.popup_window___confirm #a___message,.popup_window___confirm #b___message{width:50% !important;}.resize_0,.resize_1,.resize_2,.resize_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);}.resize_0{top:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_1{top:0;right:-4px;width:10px;height:100%;cursor:e-resize;}.resize_2{bottom:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_3{top:0;left:-4px;width:10px;height:100%;cursor:e-resize;}.resize_corner_0,.resize_corner_1,.resize_corner_2,.resize_corner_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);width:var(--corner-size);height:var(--corner-size);border-radius:var(--corner-border-radius);}.resize_corner_0{top:-4px;left:-4px;cursor:nw-resize;}.resize_corner_1{top:-4px;right:-4px;cursor:ne-resize;}.resize_corner_2{bottom:-4px;right:-4px;cursor:nw-resize;}.resize_corner_3{bottom:-4px;left:-4px;cursor:ne-resize;}.resize_0:hover,.resize_1:hover,.resize_2:hover,.resize_3:hover,.resize_corner_0:hover,.resize_corner_1:hover,.resize_corner_2:hover,.resize_corner_3:hover{opacity:var(--hover-opacity);filter:var(--hover-filter);box-shadow:var(--resize-shadow);transition:var(--transition-time);}#popup{}#popup::-webkit-scrollbar{width:10px;scroll-behavior:smooth;}#popup{}#popup::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px;margin:5px;}#popup{}#popup::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgb(30,150,255) !important;}}";document.head.appendChild(s)})();import { createRoot as e } from "react-dom/client";
2
2
 
3
- import o from "jquery";
3
+ var t = globalThis;
4
4
 
5
- var t, i, p, n, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNames, l = (e, o) => function() {
6
- return e && (o = (0, e[d(e)[0]])(e = 0)), o;
7
- }, u = (e, o) => {
8
- for (var t in o) a(e, t, {
9
- get: o[t],
10
- enumerable: !0
5
+ t.layerpro || Object.defineProperty(t, "layerpro", {
6
+ value: {},
7
+ writable: !1,
8
+ configurable: !1,
9
+ enumerable: !1
10
+ });
11
+
12
+ var o = t.layerpro;
13
+
14
+ if (!o.setProps) {
15
+ const e = (t, o) => {
16
+ Reflect.ownKeys(t).forEach(i => {
17
+ const n = Object.getOwnPropertyDescriptor(t, i);
18
+ n && (n.enumerable = o?.enumerable || !1, n.configurable = o?.enumerable || !1,
19
+ n.writable = o?.writable || !1, Object.defineProperty(t, i, n));
20
+ const s = t[i];
21
+ "object" == typeof s && null !== s && e(s, o);
22
+ });
23
+ };
24
+ Object.defineProperty(o, "setProps", {
25
+ value: e,
26
+ writable: !1,
27
+ configurable: !1
11
28
  });
12
- }, h = l({
13
- "core/credits.ts"() {
14
- t = e => {}, Object.defineProperty(layerpro, "credits", {
15
- value: t,
16
- writable: !1,
17
- configurable: !1
29
+ }
30
+
31
+ var i = globalThis.layerpro;
32
+
33
+ Object.defineProperty(i, "credits", {
34
+ value: e => {},
35
+ writable: !1,
36
+ configurable: !1
37
+ });
38
+
39
+ var n = new WeakMap, s = new WeakMap, p = e => "string" == typeof e ? document.querySelector(e) ?? document : e instanceof HTMLElement ? e : document, r = e => e ? e.split(/\s+/).filter(e => e.length > 0) : [], a = new Set([ "opacity", "zindex", "z-index", "fontweight", "font-weight", "lineheight", "line-height", "zoom", "flex", "flexgrow", "flex-grow", "flexshrink", "flex-shrink", "order", "gridcolumn", "grid-column", "gridrow", "grid-row", "columncount", "column-count", "fontsizeadjust", "font-size-adjust", "appearance" ]), c = (e, t) => "number" != typeof t || a.has(e.toLowerCase()) ? String(t) : `${t}px`, l = (e, t, o, i) => {
40
+ const s = e => o(e), p = i?.ns ? `${t}.${i.ns}` : t;
41
+ e.addEventListener(t, s, i);
42
+ let r = n.get(e);
43
+ r || (r = new Map, n.set(e, r)), r.set(p, {
44
+ handler: s,
45
+ opts: i ?? {}
46
+ });
47
+ }, d = (e, t, o) => {
48
+ const i = n.get(e);
49
+ if (i) {
50
+ if (o?.ns) {
51
+ const n = `${t}.${o.ns}`, s = i.get(n);
52
+ return void (s && (e.removeEventListener(t, s.handler, s.opts), i.delete(n)));
53
+ }
54
+ for (const [o, n] of [ ...i ]) (o === t || o.startsWith(`${t}.`)) && (e.removeEventListener(t, n.handler, n.opts),
55
+ i.delete(o));
56
+ }
57
+ }, u = class e {
58
+ el;
59
+ constructor(e) {
60
+ this.el = e;
61
+ }
62
+ append(t) {
63
+ return t instanceof e ? this.el.appendChild(t.el) : "string" == typeof t ? this.el.appendChild(document.createTextNode(t)) : this.el.appendChild(t),
64
+ this;
65
+ }
66
+ appendTo(t) {
67
+ let o;
68
+ if (t instanceof e) o = t.el; else {
69
+ const e = p(t);
70
+ o = e === document ? document.body : e;
71
+ }
72
+ return o.appendChild(this.el), this;
73
+ }
74
+ html(e) {
75
+ return this.el.innerHTML = e, this;
76
+ }
77
+ text(e) {
78
+ return this.el.textContent = e, this;
79
+ }
80
+ css(e, t) {
81
+ if ("object" == typeof e && null !== e) for (const [t, o] of Object.entries(e)) this.el.style.setProperty(t.replace(/[A-Z]/g, e => `-${e.toLowerCase()}`), c(t, o)); else this.el.style.setProperty(e.replace(/[A-Z]/g, e => `-${e.toLowerCase()}`), c(e, t));
82
+ return this;
83
+ }
84
+ addClass(e) {
85
+ for (const t of r(e)) this.el.classList.add(t);
86
+ return this;
87
+ }
88
+ removeClass(e) {
89
+ for (const t of r(e)) this.el.classList.remove(t);
90
+ return this;
91
+ }
92
+ toggleClass(e, t) {
93
+ for (const o of r(e)) this.el.classList.toggle(o, t);
94
+ return this;
95
+ }
96
+ hasClass(e) {
97
+ return this.el.classList.contains(e);
98
+ }
99
+ isHidden() {
100
+ const e = this.el;
101
+ return "none" === e.style.display || ("none" === getComputedStyle(e).display || 0 === e.offsetWidth && 0 === e.offsetHeight);
102
+ }
103
+ attr(e, t) {
104
+ return void 0 === t ? this.el.getAttribute(e) : (this.el.setAttribute(e, t), this);
105
+ }
106
+ remove() {
107
+ return this.el.remove(), this;
108
+ }
109
+ find(t) {
110
+ const o = this.el.querySelector(t);
111
+ return o ? new e(o) : null;
112
+ }
113
+ closest(t) {
114
+ const o = this.el.closest(t);
115
+ return o ? new e(o) : null;
116
+ }
117
+ parent() {
118
+ return this.el.parentElement ? new e(this.el.parentElement) : null;
119
+ }
120
+ hide() {
121
+ return this.el.style.display = "none", this;
122
+ }
123
+ show() {
124
+ return this.el.style.display = "", this;
125
+ }
126
+ toggle() {
127
+ return this.el.style.display = "none" === this.el.style.display ? "" : "none", this;
128
+ }
129
+ on(e, t, o) {
130
+ return l(this.el, e, t, o), this;
131
+ }
132
+ off(e, t) {
133
+ return d(this.el, e, t), this;
134
+ }
135
+ data(e, t) {
136
+ let o = s.get(this.el);
137
+ return o || (o = new Map, s.set(this.el, o)), void 0 === t ? o.get(e) : (o.set(e, t),
138
+ this);
139
+ }
140
+ removeData(e) {
141
+ return s.get(this.el)?.delete(e), this;
142
+ }
143
+ offset() {
144
+ const e = this.el.getBoundingClientRect();
145
+ return {
146
+ top: e.top + (window.scrollY || 0),
147
+ left: e.left + (window.scrollX || 0)
148
+ };
149
+ }
150
+ position() {
151
+ return {
152
+ top: this.el.offsetTop,
153
+ left: this.el.offsetLeft
154
+ };
155
+ }
156
+ width() {
157
+ return Math.round(this.el.getBoundingClientRect().width);
158
+ }
159
+ height() {
160
+ return Math.round(this.el.getBoundingClientRect().height);
161
+ }
162
+ outerWidth() {
163
+ return this.width();
164
+ }
165
+ outerHeight() {
166
+ return this.height();
167
+ }
168
+ val(e) {
169
+ const t = this.el;
170
+ return void 0 === e ? t.value : (t.value = e, this);
171
+ }
172
+ fadeIn(e, t) {
173
+ const o = this.el;
174
+ let i = 100, n = t;
175
+ return "function" == typeof e ? n = e : i = e, o.style.display = "", o.style.transition = "none",
176
+ o.style.opacity = "0", o.offsetWidth, o.style.transition = `opacity ${i}ms ease`,
177
+ o.style.opacity = "1", this.finishTransition(i, () => {
178
+ o.style.transition = "", o.style.opacity = "", n?.();
179
+ }), this;
180
+ }
181
+ fadeOut(e, t) {
182
+ const o = this.el;
183
+ let i = 100, n = t;
184
+ return "function" == typeof e ? n = e : i = e, o.style.transition = `opacity ${i}ms ease`,
185
+ o.style.opacity = "0", this.finishTransition(i, () => {
186
+ o.style.display = "none", o.style.transition = "", o.style.opacity = "", n?.();
187
+ }), this;
188
+ }
189
+ animate(e, t, o) {
190
+ const i = this.el;
191
+ let n = 200, s = o;
192
+ "function" == typeof t ? s = t : n = t;
193
+ const p = Object.keys(e), r = {};
194
+ for (const t of p) r[t] = c(t, e[t]);
195
+ return i.style.transition = "none", i.offsetWidth, i.style.transition = `${p.join(", ")} ${n}ms ease`,
196
+ Object.assign(i.style, r), this.finishTransition(n, () => {
197
+ i.style.transition = "", s?.();
198
+ }), this;
199
+ }
200
+ finishTransition(e, t) {
201
+ const o = this.el;
202
+ let i = !1;
203
+ const n = () => {
204
+ i || (i = !0, o.removeEventListener("transitionend", s), t());
205
+ }, s = e => {
206
+ e.target === o && n();
207
+ };
208
+ o.addEventListener("transitionend", s), window.setTimeout(n, e + 60);
209
+ }
210
+ };
211
+
212
+ function h(e, t) {
213
+ const o = p(t).querySelector(e);
214
+ return o ? new u(o) : null;
215
+ }
216
+
217
+ function f(e, t) {
218
+ return [ ...p(t).querySelectorAll(e) ].map(e => new u(e));
219
+ }
220
+
221
+ var m = e => {
222
+ const t = document.createElement("div");
223
+ t.innerHTML = e.trim();
224
+ const o = t.firstElementChild;
225
+ return new u(o);
226
+ }, b = {
227
+ on(e, t, o) {
228
+ l(document, e, t, o);
229
+ },
230
+ off(e, t) {
231
+ d(document, e, t);
232
+ }
233
+ }, _ = {
234
+ on(e, t, o) {
235
+ l(window, e, t, o);
236
+ },
237
+ off(e, t) {
238
+ d(window, e, t);
239
+ },
240
+ height: () => window.innerHeight,
241
+ width: () => window.innerWidth,
242
+ scrollTop: () => window.scrollY || document.documentElement.scrollTop || 0,
243
+ scrollLeft: () => window.scrollX || document.documentElement.scrollLeft || 0
244
+ }, g = new Map, v = new Map, y = {
245
+ "&": "&",
246
+ "<": "&lt;",
247
+ ">": "&gt;",
248
+ '"': "&quot;",
249
+ "'": "&#39;"
250
+ }, w = e => e.replace(/[&<>"']/g, e => y[e]), z = t => {
251
+ if ("function" == typeof t.body) return;
252
+ const o = !0 === t.raised ? ".popup_raised_" + t.id : "#popup";
253
+ f('[class^="popup_window_"]', o).forEach(e => e.removeClass("zHigh")), f('[class^="popup_bar_"]', o).forEach(e => e.removeClass("popup_bar_selected")),
254
+ f('[class^="icon_"]', o).forEach(e => e.removeClass("popup_bar_selected")), !0 === t.raised && m(`<div class="popup_raised_${t.id}">`).appendTo("#popup").css({
255
+ "pointer-events": "auto",
256
+ "z-index": layerpro.popup.zIndex() + 1e3
257
+ }), m(`<div class="popup_overflow_${t.id}">`).appendTo(o).css({
258
+ top: t.top,
259
+ left: t.left,
260
+ right: t.right,
261
+ bottom: t.bottom,
262
+ width: t.width,
263
+ height: t.height,
264
+ minWidth: t.minWidth,
265
+ minHeight: t.minHeight,
266
+ maxWidth: t.maxWidth,
267
+ maxHeight: t.maxHeight,
268
+ pointerEvents: "auto",
269
+ zIndex: layerpro.popup.zIndex()
270
+ }).on("pointerdown", () => {
271
+ layerpro.popup.index(t);
272
+ }).hide().fadeIn(t.fadeIn);
273
+ const i = m(`<div class="popup_window_${t.id}">`).appendTo(`.popup_overflow_${t.id}`).css({
274
+ "pointer-events": "auto"
275
+ }).addClass("zHigh").addClass(t.class);
276
+ 0 === [ t.top, t.left, t.bottom, t.right ].reduce((e, t) => "number" == typeof t && isFinite(t) ? Number(e) + t : e, 0) && layerpro.popup.center(t),
277
+ layerpro.popup.unmount = e => {
278
+ const t = g.get(e);
279
+ t && (t.unmount(), g.delete(e));
280
+ }, layerpro.popup.cleanupEvents = e => {
281
+ const t = v.get(e);
282
+ t && (t.iconClick && h(`.icon_${e}`, "#popup_dock")?.off("click"), t.iconClose && h(`.icon_close_${e}`, "#popup_dock")?.off("click"),
283
+ t.buttonIconize && h(`.button_iconize_${e}`)?.off("click"), t.buttonMaximize && h(`.button_maximize_${e}`)?.off("click"),
284
+ t.buttonClose && h(`.button_close_${e}`)?.off("click"), t.escKey && b.off("keydown", {
285
+ ns: `esc-${e}`
286
+ }), v.delete(e));
287
+ }, layerpro.popup.getReactRoot = e => g.get(e), m(`<div class="popup_bar_${t.id}">`).appendTo(i).addClass("popup_bar_selected"),
288
+ t.icon && m(`<div class="popup_icon_${t.id}">${t.icon}</div>`).appendTo(`.popup_bar_${t.id}`);
289
+ const n = w(String(t.name));
290
+ if (m(`<div class="popup_drag_${t.id}">${n}</div>`).appendTo(`.popup_bar_${t.id}`),
291
+ m(`<div class="popup_option_${t.id}">`).appendTo(`.popup_bar_${t.id}`), !0 === t.iconize && !h("#popup_dock")) {
292
+ h("#root")?.css("margin", "0 0 var( --dock-height ) 0");
293
+ m('\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({
294
+ pointerEvents: "auto",
295
+ zIndex: layerpro.popup.zIndex() + 1e3
18
296
  });
19
297
  }
20
- });
298
+ if (h("#popup_dock") && !0 === t.dockable) {
299
+ const e = String(t.id), o = `\n <div class="icon_${t.id}">\n <span>${t.icon ? t.icon : ""}</span>\n <span>${n}</span>\n </div>\n `, i = () => {
300
+ const e = h(".popup_overflow_" + t.id, "#popup");
301
+ e && e.data("iconize") ? (layerpro.popup.index(t), layerpro.popup.iconize(t)) : layerpro.popup.iconize(t),
302
+ layerpro.popup.index(t);
303
+ }, s = e => {
304
+ e?.stopPropagation(), t?.buttons?.cancel?.cb && t?.buttons?.cancel?.cb(), layerpro.popup.close(t);
305
+ };
306
+ v.set(e, {
307
+ iconClick: !0,
308
+ iconClose: !0
309
+ }), m(o).appendTo("#popup_dock_list").addClass("popup_bar_selected").on("click", i),
310
+ m(`<button class="icon_close_${t.id}">X</button>`).appendTo(`.icon_${t.id}`).on("click", s);
311
+ }
312
+ if (!0 === t.iconize) {
313
+ const e = String(t.id), o = () => {
314
+ layerpro.popup.iconize(t);
315
+ }, i = v.get(e) || {};
316
+ i.buttonIconize = !0, v.set(e, i), m(`<button class="button_iconize_${t.id} iconize">`).appendTo(`.popup_option_${t.id}`).on("click", o);
317
+ }
318
+ if (!0 === t.maximize) {
319
+ const e = String(t.id), o = () => {
320
+ layerpro.popup.maximize(t);
321
+ }, i = v.get(e) || {};
322
+ i.buttonMaximize = !0, v.set(e, i), m(`<button class="button_maximize_${t.id} maximize">`).appendTo(`.popup_option_${t.id}`).on("click", o);
323
+ }
324
+ if (!0 === t.close) {
325
+ const e = String(t.id), o = () => {
326
+ t?.buttons?.cancel?.cb && t?.buttons?.cancel?.cb(), layerpro.popup.close(t);
327
+ }, i = v.get(e) || {};
328
+ i.buttonClose = !0, v.set(e, i), m(`<button class="button_close_${t.id} close">`).appendTo(`.popup_option_${t.id}`).on("click", o);
329
+ }
330
+ const s = String(t.id), p = v.get(s) || {};
331
+ if (p.escKey = !0, v.set(s, p), b.on("keydown", e => {
332
+ const o = e;
333
+ "Escape" !== o.key && 27 !== o.keyCode || (t?.buttons?.cancel?.cb && t?.buttons?.cancel?.cb(),
334
+ layerpro.popup.close(t));
335
+ }, {
336
+ ns: `esc-${s}`
337
+ }), t.timer > 0) {
338
+ const e = {};
339
+ e[String(`st_${t.id}`)] = setTimeout(() => {
340
+ layerpro.popup.close(t), clearTimeout(e[String(`st_${t.id}`)]);
341
+ }, t.timer);
342
+ }
343
+ if (t.source) {
344
+ const e = h(`.popup_body_${t.id}`), o = String(t.source);
345
+ try {
346
+ const e = new URL(o, window.location.origin);
347
+ if ("https:" !== e.protocol && "http:" !== e.protocol && "" !== e.protocol) return;
348
+ } catch {
349
+ return;
350
+ }
351
+ fetch(o, {
352
+ mode: "same-origin"
353
+ }).then(e => {
354
+ if ((e.headers.get("content-type") || "").includes("text/html"), !e.ok) throw new Error(`HTTP error! status: ${e.status}`);
355
+ return e.text();
356
+ }).then(o => {
357
+ const i = w(o);
358
+ e?.hide().html(i).fadeIn(t.fadeIn);
359
+ }).catch(e => {});
360
+ }
361
+ t.movable && layerpro.popup.movable(t), t.resizable && layerpro.popup.resizable(t),
362
+ t.isMaximize && layerpro.popup.maximize(t);
363
+ m(`<div class="popup_internal_${t.id}">`).appendTo(i), m(`<div class="popup_body_${t.id}">`).appendTo(`.popup_internal_${t.id}`).hide().fadeIn(t.fadeIn, () => {
364
+ (() => {
365
+ if (t.body && !t.source) {
366
+ const o = t.body;
367
+ if ("object" == typeof o && null !== o && void 0 !== o.type && "object" == typeof o.props && null !== o.props) {
368
+ const o = document.querySelector(".popup_body_" + t.id);
369
+ if (!o) return;
370
+ try {
371
+ const i = e(o);
372
+ i.render(t.body), g.set(String(t.id), i);
373
+ } catch (e) {
374
+ const t = e?.message || String(e);
375
+ t.includes("Invalid hook call") || t.includes("hooks");
376
+ }
377
+ } else if ("string" == typeof t.body && t.body.trim().startsWith("<")) {
378
+ const e = w(t.body);
379
+ h(`.popup_body_${t.id}`)?.html(e).fadeIn(t.fadeIn);
380
+ } else {
381
+ const e = w(String(t.body));
382
+ h(`.popup_body_${t.id}`)?.text(e).fadeIn(t.fadeIn);
383
+ }
384
+ }
385
+ })(), (() => {
386
+ if (t.buttons) {
387
+ if (m('<div class="buttons"></div>').appendTo(`.popup_body_${t.id}`), t.buttons.confirm) {
388
+ const e = m(`<button id="lp_confirm" type="button">\n ${t.buttons.confirm.text.toUpperCase()}\n </button>`).appendTo(".buttons");
389
+ t.buttons.confirm.cb && e.on("click", () => {
390
+ t.buttons?.confirm?.cb?.(), layerpro.popup.close(t);
391
+ });
392
+ }
393
+ t.buttons.cancel && m(`<button id="lp_cancel" type="button">\n ${t.buttons.cancel.text.toUpperCase()}\n </button>`).appendTo(".buttons").on("click", () => {
394
+ t.buttons?.cancel?.cb?.(), layerpro.popup.close(t);
395
+ });
396
+ }
397
+ })();
398
+ });
399
+ }, x = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches, k = () => {
400
+ if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
401
+ const e = (() => {
402
+ if ("undefined" == typeof navigator) return !1;
403
+ const e = navigator.userAgent;
404
+ return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
405
+ })() || x();
406
+ return ("ontouchstart" in window || navigator.maxTouchPoints > 0) && e ? "touch" : "mouse";
407
+ }, $ = k(), E = !x(), T = null;
408
+
409
+ if ("undefined" != typeof window) {
410
+ const e = window.matchMedia("(max-width: 1024px)"), t = () => {
411
+ const e = k(), t = $, o = !x();
412
+ $ = e, E !== o && (E = o, T && T(e, t));
413
+ };
414
+ let o;
415
+ e.addListener ? e.addListener(t) : e.addEventListener("change", t), window.addEventListener("resize", () => {
416
+ clearTimeout(o), o = setTimeout(t, 150);
417
+ });
418
+ }
419
+
420
+ var C = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX, L = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY, M = 250, S = 150, O = !1, N = 1e3, I = 0, A = 0, H = 0, P = 0, j = 0, W = 0, R = 0, D = 0, q = new Map, B = new Map, X = () => h("body"), Y = {
421
+ open: e => e ? (e.id = e.id || Math.round(1e3 * Math.random()), e.body = e.body || "",
422
+ e.class = e.class || "", e.width = e.width || 300, e.height = e.height || 200, e.minWidth = e.minWidth || 340,
423
+ e.minHeight = e.minHeight || 220, e.name = e.name || "popUp_" + e.id, e.source = e.source || null,
424
+ e.icon = e.icon || null, e.iconize = e.iconize || null, e.maximize = e.maximize || null,
425
+ e.isMaximize = e.isMaximize || null, e.dockable = e.dockable || null, e.close = e.close || null,
426
+ e.raised = e.raised || null, e.movable = e.movable || null, e.resizable = e.resizable || null,
427
+ e.store = e.store || !1, e.top = e.top ? e.top : "auto", e.left = e.left ? e.left : "auto",
428
+ e.right = e.right ? e.right : "auto", e.bottom = e.bottom ? e.bottom : "auto", e.fadeIn = e.fadeIn || 100,
429
+ e.fadeOut = e.fadeOut || 100, M = e.minWidth, S = e.minHeight, e.width < e.minWidth && (e.width = e.minWidth),
430
+ e.height < e.minHeight && (e.height = e.minHeight), "auto" === e.width && (e.width = "100%"),
431
+ "auto" === e.height && (e.height = "100%"), h("#popup") || m('<div id="popup">').appendTo("body").css({
432
+ "pointer-events": "none",
433
+ "z-index": Y.zIndex() + 1
434
+ }), h(".popup_window_" + e.id, "#popup") || z(e), e) : e,
435
+ dispatch: e => {
436
+ Y.store(e);
437
+ },
438
+ store: e => {},
439
+ show: e => {
440
+ const t = e instanceof u ? e : "string" == typeof e ? h(e) : null;
441
+ t?.toggle();
442
+ },
443
+ vfx: (e, t, o = !1) => {
444
+ setTimeout(() => {
445
+ f('[class^="popup_overflow_"]', "#popup").forEach(e => {
446
+ e.css("opacity", !0 === t ? 1 : .5), e.find('[class^="popup_body_"]')?.css({
447
+ "content-visibility": !0 === t ? "auto" : "hidden"
448
+ });
449
+ });
450
+ const i = e instanceof u ? e : "string" == typeof e ? h(e) : null;
451
+ i?.css("opacity", 1), !o && i && f('[class^="popup_body_"]', i.el).forEach(e => e.css("content-visibility", "visible"));
452
+ }, 1), dispatchEvent(new Event("layerProResize"));
453
+ },
454
+ center: e => {
455
+ const t = h(".popup_overflow_" + e.id, "#popup");
456
+ t && (t.css("top", Math.max(0, (_.height() - t.outerHeight()) / 2 + _.scrollTop())),
457
+ t.css("left", Math.max(0, (_.width() - t.outerWidth()) / 2 + _.scrollLeft())));
458
+ },
459
+ checkArea: e => [ C(e), L(e), _.scrollLeft(), _.scrollTop(), _.height(), _.width() ],
460
+ close: e => {
461
+ let t;
462
+ if (e) {
463
+ t = "object" == typeof e ? e.id : e, layerpro.popup.unmount && layerpro.popup.unmount(String(t)),
464
+ layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(t));
465
+ const o = q.get(String(t));
466
+ if (o) {
467
+ const e = {
468
+ passive: !1
469
+ };
470
+ o.move && document.removeEventListener("pointermove", o.move, e), o.up && document.removeEventListener("pointerup", o.up, e),
471
+ q.delete(String(t));
472
+ }
473
+ const i = B.get(String(t));
474
+ if (i) {
475
+ const e = {
476
+ passive: !1
477
+ };
478
+ i.move && document.removeEventListener("pointermove", i.move, e), i.up && document.removeEventListener("pointerup", i.up, e),
479
+ B.delete(String(t));
480
+ }
481
+ !0 === e.raised ? h(".popup_raised_" + t)?.fadeOut(e.fadeOut || 500, () => h(".popup_raised_" + t)?.remove()) : h(".popup_overflow_" + t)?.fadeOut(e.fadeOut || 500, () => {
482
+ h(".popup_overflow_" + t)?.remove(), h(".popup_raised_" + t)?.fadeOut(e.fadeOut || 500, () => h(".popup_raised_" + t)?.remove());
483
+ });
484
+ } else h("#popup")?.fadeOut(() => h("#popup")?.remove());
485
+ setTimeout(() => Y.removeDock(e), 300);
486
+ },
487
+ removeDock: e => {
488
+ h(".icon_" + e.id)?.remove(), f('[class^="popup_overflow_"]', "#popup").length < 1 && (h("#root")?.css("margin", "0"),
489
+ h("#popup_dock")?.remove());
490
+ },
491
+ iconize: e => {
492
+ const t = h(".popup_overflow_" + e.id, "#popup");
493
+ if (t && !1 !== t.find("[class^=popup_window_]")?.hasClass("zHigh")) if (Y.vfx(t, !1, !0),
494
+ t.data("iconize")) {
495
+ if (t.data("iconize")) {
496
+ const e = t.data("iconize");
497
+ t.css({
498
+ top: e.y,
499
+ left: e.x,
500
+ width: e.w,
501
+ height: e.h,
502
+ opacity: 1
503
+ }), Y.vfx(t, !0), t.removeData("iconize");
504
+ }
505
+ } else {
506
+ const o = h(".icon_" + e.id, "#popup_dock")?.el.offsetLeft ?? 0;
507
+ t.data("iconize", {
508
+ y: t.el.offsetTop,
509
+ x: t.el.offsetLeft,
510
+ w: t.el.offsetWidth,
511
+ h: t.el.offsetHeight
512
+ }), t.css({
513
+ top: "100%",
514
+ left: o + 15,
515
+ width: 0,
516
+ height: 0,
517
+ opacity: 0
518
+ }), Y.vfx(t, !0);
519
+ }
520
+ },
521
+ maximize: e => {
522
+ const t = h(".popup_overflow_" + e.id, "#popup"), o = t ? h('[class^="resize_"]', t.el) : null;
523
+ if (Y.vfx(t, !1, !0), t?.data("store")) {
524
+ if (t?.data("store")) {
525
+ const i = t.data("store");
526
+ t.css({
527
+ position: "absolute",
528
+ top: i.y,
529
+ left: i.x,
530
+ right: "auto",
531
+ bottom: "auto",
532
+ width: i.w,
533
+ height: i.h
534
+ }), o?.on("pointerdown", function(t) {
535
+ Y.resizeModals(t, this, e);
536
+ }), Y.vfx(t, !0), t.removeData("store");
537
+ }
538
+ } else t.data("store", {
539
+ y: t.el.offsetTop,
540
+ x: t.el.offsetLeft,
541
+ w: t.el.offsetWidth,
542
+ h: t.el.offsetHeight
543
+ }), t.css({
544
+ position: "fixed",
545
+ top: -6,
546
+ left: -6,
547
+ right: -6,
548
+ bottom: 39,
549
+ width: "auto",
550
+ height: "auto"
551
+ }), o?.off("pointerdown"), Y.vfx(t, !0, !0);
552
+ },
553
+ movable: e => {
554
+ if (!1 === e.movable) return;
555
+ const t = String(e.id), o = h(".popup_overflow_" + e.id, "#popup"), i = o ? h(".popup_drag_" + e.id, o.el) : null, n = o ? h(".popup_body_" + e.id, o.el) : null;
556
+ o?.css("touch-action", "none");
557
+ let s = 0, p = 0, r = 0, a = 0;
558
+ const c = e => {
559
+ e.preventDefault();
560
+ const t = C(e), i = L(e);
561
+ s = r - t, p = a - i, r = t, a = i, Y.checkArea(e)[1] < Y.checkArea(e)[4] && 1 === Math.sign(Y.checkArea(e)[1]) && o?.css("top", o.el.offsetTop - p),
562
+ Y.checkArea(e)[0] < Y.checkArea(e)[5] && 1 === Math.sign(Y.checkArea(e)[0]) && o?.css("left", o.el.offsetLeft - s);
563
+ }, l = () => {
564
+ const e = {
565
+ passive: !1
566
+ };
567
+ document.removeEventListener("pointermove", c, e), document.removeEventListener("pointerup", l, e),
568
+ q.delete(t), n?.css("pointer-events", "auto"), Y.vfx(o, !0);
569
+ };
570
+ q.set(t, {
571
+ move: c,
572
+ up: l
573
+ });
574
+ i?.el.addEventListener("pointerdown", e => {
575
+ "fixed" !== o?.el.style.position && (e.preventDefault(), n?.css("pointer-events", "none"),
576
+ d(e), Y.vfx(o, !1));
577
+ }, {
578
+ passive: !1
579
+ }), e.maximize && i?.on("dblclick", () => {
580
+ layerpro.popup.maximize(e);
581
+ });
582
+ const d = e => {
583
+ r = C(e), a = L(e);
584
+ const t = {
585
+ passive: !1
586
+ };
587
+ document.addEventListener("pointermove", c, t), document.addEventListener("pointerup", l, t);
588
+ };
589
+ },
590
+ resizable: e => {
591
+ if (!e.resizable) return;
592
+ const t = String(e.id), o = h(".popup_overflow_" + e.id, "#popup");
593
+ for (let e = 4; e--; ) m(`<div class='resize_${e}'>`).appendTo(o?.el).css("touch-action", "none"),
594
+ m(`<div class='resize_corner_${e}'>`).appendTo(o?.el).css("touch-action", "none");
595
+ const i = B.get(t) || {};
596
+ i.down = function(t) {
597
+ Y.resizeModals(t, this, e);
598
+ }, B.set(t, i);
599
+ const n = {
600
+ passive: !1
601
+ };
602
+ f("[class^=resize_]").forEach(t => {
603
+ t.el.addEventListener("pointerdown", o => {
604
+ o.preventDefault(), Y.resizeModals(o, t.el, e);
605
+ }, n);
606
+ });
607
+ },
608
+ resizeModals: (e, t, o) => {
609
+ const i = t instanceof HTMLElement ? new u(t) : h(t), n = i?.parent(), s = String(o.id);
610
+ n?.el.style.setProperty("transition", "none");
611
+ const p = C(e), r = L(e), a = [ p - _.scrollLeft(), r - _.scrollTop() ];
612
+ o.minWidth, X()?.css("pointer-events", "none"), n?.css("pointer-events", "none"),
613
+ Y.vfx(n, !1);
614
+ const c = e => {
615
+ Y.doRes(e, t);
616
+ }, l = () => {
617
+ Y.stopRes(t, s);
618
+ }, d = B.get(s) || {};
619
+ d.move = c, d.up = l, B.set(s, d);
620
+ const f = {
621
+ passive: !1
622
+ };
623
+ document.addEventListener("pointermove", c, f), document.addEventListener("pointerup", l, f),
624
+ I = a[0], A = a[1], H = n?.width() ?? 0, P = n?.height() ?? 0, j = n?.position().left ?? 0,
625
+ W = n?.position().top ?? 0, R = W + P + 1, D = j + H + 1, O = t;
626
+ },
627
+ doRes: (e, t) => {
628
+ dispatchEvent(new Event("layerProResize"));
629
+ const o = t instanceof HTMLElement ? new u(t) : h(t), i = o?.parent(), n = C(e), s = L(e), p = [ n - _.scrollLeft(), s - _.scrollTop() ];
630
+ if (t === O) {
631
+ let t = H + p[0] - I, n = P + p[1] - A;
632
+ const s = H - p[0] + I, r = P - p[1] + A;
633
+ t <= 0 && (t = 0), n <= 0 && (n = 0), Y.checkArea(e)[1] < Y.checkArea(e)[4] && 1 === Math.sign(Y.checkArea(e)[1]) && o?.hasClass("resize_0") && (i && i.height() <= S && r > S && i.css({
634
+ height: Number(S + 1)
635
+ }), i && i.height() > S && S <= r && i.css({
636
+ top: Number(R - r),
637
+ height: parseInt(String(r))
638
+ })), Y.checkArea(e)[0] < Y.checkArea(e)[5] && 1 === Math.sign(Y.checkArea(e)[0]) && o?.hasClass("resize_1") && (i && i.width() >= M && i.css({
639
+ width: Number(t),
640
+ right: Number(j - t)
641
+ }), i && i.width() <= M && i.css({
642
+ width: Number(M + 1)
643
+ })), Y.checkArea(e)[1] < Y.checkArea(e)[4] && 1 === Math.sign(Y.checkArea(e)[1]) && o?.hasClass("resize_2") && (i && i.height() >= S && i.css({
644
+ height: Number(n)
645
+ }), i && i.height() <= S && n > S && i.css({
646
+ height: Number(S + 1)
647
+ })), Y.checkArea(e)[0] < Y.checkArea(e)[5] && 1 === Math.sign(Y.checkArea(e)[0]) && o?.hasClass("resize_3") && (i && i.width() <= M && s > M && i.css({
648
+ width: Number(M + 1)
649
+ }), i && i.width() > M && M <= s && i.css({
650
+ width: parseInt(String(s)),
651
+ left: Number(D - s)
652
+ })), Y.checkArea(e)[1] < Y.checkArea(e)[4] && Y.checkArea(e)[0] < Y.checkArea(e)[5] && 1 === Math.sign(Y.checkArea(e)[0]) && 1 === Math.sign(Y.checkArea(e)[1]) && (o?.hasClass("resize_corner_0") && (i && i.height() >= S && r > S && i.css({
653
+ top: Number(R - r),
654
+ height: parseInt(String(r))
655
+ }), i && i.height() <= S && r > S && i.css({
656
+ height: Number(S + 1)
657
+ }), i && i.width() >= M && s > M && i.css({
658
+ width: parseInt(String(s)),
659
+ left: Number(D - s)
660
+ }), i && i.width() <= M && s > M && i.css({
661
+ width: Number(M + 1)
662
+ })), o?.hasClass("resize_corner_1") && (i && i.height() >= S && r > S && i.css({
663
+ top: Number(R - r),
664
+ height: Number(r)
665
+ }), i && i.height() <= S && r > S && i.css({
666
+ height: Number(S + 1)
667
+ }), i && i.width() >= M && i.css({
668
+ width: Number(t),
669
+ right: Number(j - t)
670
+ }), i && i.width() <= M && s > M && i.css({
671
+ width: Number(M + 1)
672
+ })), o?.hasClass("resize_corner_2") && (i && i.height() >= S && i.css({
673
+ height: Number(n)
674
+ }), i && i.height() <= S && n > S && i.css({
675
+ height: Number(S + 1)
676
+ }), i && i.width() >= M && i.css({
677
+ width: Number(t),
678
+ right: Number(j - t)
679
+ }), i && i.width() <= M && i.css({
680
+ width: Number(M + 1)
681
+ })), o?.hasClass("resize_corner_3") && (i && i.height() >= S && n > S && i.css({
682
+ height: Number(n)
683
+ }), i && i.height() <= S && n > S && i.css({
684
+ height: Number(S + 1)
685
+ }), i && i.width() >= M && s > M && i.css({
686
+ width: Number(s),
687
+ left: Number(D - s)
688
+ }), i && i.width() <= M && s > M && i.css({
689
+ width: Number(M + 1)
690
+ })));
691
+ }
692
+ },
693
+ stopRes: (e, t) => {
694
+ const o = e instanceof HTMLElement ? new u(e) : h(e), i = o?.parent();
695
+ i?.el.style.setProperty("transition", ""), o?.el.style.setProperty("transition", ""),
696
+ X()?.css("pointer-events", "auto"), i?.css("pointer-events", "auto"), Y.vfx(i, !0),
697
+ O = !1;
698
+ const n = B.get(t);
699
+ if (n) {
700
+ const e = {
701
+ passive: !1
702
+ };
703
+ n.move && document.removeEventListener("pointermove", n.move, e), n.up && document.removeEventListener("pointerup", n.up, e),
704
+ B.delete(t);
705
+ }
706
+ },
707
+ index: e => {
708
+ const t = f('[class^="popup_overflow_"]', "#popup");
709
+ f('[class^="popup_window_"]', "#popup").forEach(e => e.removeClass("zHigh")), f('[class^="popup_bar_"]', "#popup").forEach(e => e.removeClass("popup_bar_selected")),
710
+ f('[class^="icon_"]', "#popup").forEach(e => e.removeClass("popup_bar_selected")),
711
+ t.forEach(e => {
712
+ const t = parseInt(e.el.style.zIndex || "0", 10);
713
+ e.css("zIndex", t - 1);
714
+ }), h(".icon_" + e.id, "#popup")?.addClass("popup_bar_selected"), h(".popup_overflow_" + e.id, "#popup")?.css("zIndex", Y.zIndex()),
715
+ h(".popup_bar_" + e.id, "#popup")?.addClass("popup_bar_selected"), h(".popup_window_" + e.id, "#popup")?.addClass("zHigh");
716
+ },
717
+ zIndex: () => ++N
718
+ };
21
719
 
22
- u({}, {
23
- getMouseDirection: () => c,
24
- mouseCoord: () => i
720
+ Object.defineProperty(layerpro, "popup", {
721
+ value: Y,
722
+ writable: !1,
723
+ configurable: !1
25
724
  });
26
725
 
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
- "core/mouseCoords.ts"() {
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
- }
33
- }), ee = l({
34
- "core/message.ts"() {
35
- m = {
36
- "&": "&amp;",
37
- "<": "&lt;",
38
- ">": "&gt;",
39
- '"': "&quot;",
40
- "'": "&#39;"
41
- }, b = e => e.replace(/[&<>"']/g, e => m[e]), _ = e => {
42
- const o = b(String(e)), t = layerpro.popup.open({
726
+ var U = {
727
+ "&": "&amp;",
728
+ "<": "&lt;",
729
+ ">": "&gt;",
730
+ '"': "&quot;",
731
+ "'": "&#39;"
732
+ }, K = e => e.replace(/[&<>"']/g, e => U[e]);
733
+
734
+ globalThis.message = (e, t) => layerpro.message(e, t), globalThis.alert = e => layerpro.alert(e),
735
+ globalThis.confirm = (e, t, o) => layerpro.confirm(e, t, o), globalThis.prompt = (e, t, o) => layerpro.prompt(e, t, o),
736
+ Object.defineProperty(window, "alert", {
737
+ enumerable: !1
738
+ }), Object.defineProperty(window, "prompt", {
739
+ enumerable: !1
740
+ }), Object.defineProperty(window, "message", {
741
+ enumerable: !1
742
+ }), Object.defineProperty(window, "confirm", {
743
+ enumerable: !1
744
+ }), Object.defineProperties(layerpro, {
745
+ prompt: {
746
+ value: (e, t) => {
747
+ const o = t || "_prompt", i = K(String(e)), n = layerpro.popup.open({
748
+ id: "__prompt",
749
+ name: "Prompt",
750
+ icon: "&#9998;",
751
+ width: 380,
752
+ height: 220,
753
+ iconize: !1,
754
+ maximize: !1,
755
+ close: !0,
756
+ isMaximize: !1,
757
+ dockable: !1,
758
+ raised: !0,
759
+ movable: !0,
760
+ resizable: !1
761
+ }), s = `\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 `;
762
+ h(".popup_body_" + n.id)?.html(s);
763
+ const p = h("#input_" + n.id);
764
+ p?.on("focus", () => {
765
+ p.attr("placeholder", "");
766
+ })?.on("blur", () => {
767
+ p.attr("placeholder", "write here");
768
+ }), h("#a_" + n.id)?.on("click", () => {
769
+ const e = p?.val() ?? "";
770
+ if (e > "") {
771
+ if ("function" == typeof o) {
772
+ const e = document.getElementById("input___prompt");
773
+ o(String(e));
774
+ }
775
+ if (String(o) === o) return JSON.stringify(e);
776
+ layerpro.popup.close(n);
777
+ } else alert("input can't be empty!");
778
+ }), h("#b_" + n.id)?.on("click", () => {
779
+ layerpro.popup.close(n);
780
+ });
781
+ }
782
+ },
783
+ alert: {
784
+ value: e => {
785
+ const t = K(String(e)), o = layerpro.popup.open({
43
786
  id: "__alert",
44
787
  name: "Warning",
45
788
  icon: "&#9888;",
@@ -53,12 +796,15 @@ 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
53
796
  raised: !0,
54
797
  movable: !0,
55
798
  resizable: !1
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
- $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
58
- layerpro.popup.close(t);
799
+ }), i = `\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_" + o.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
800
+ h(".popup_body_" + o.id)?.html(i), h("#a_" + o.id)?.on("click", () => {
801
+ layerpro.popup.close(o);
59
802
  });
60
- }, f = (e, o) => {
61
- const t = b(String(e)), i = layerpro.popup.open({
803
+ }
804
+ },
805
+ message: {
806
+ value: (e, t) => {
807
+ const o = K(String(e)), i = layerpro.popup.open({
62
808
  id: "__message",
63
809
  name: "Message",
64
810
  icon: "&#9965;",
@@ -72,13 +818,16 @@ 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
72
818
  raised: !0,
73
819
  movable: !0,
74
820
  resizable: !1
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);
821
+ }), n = `\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_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
822
+ h(".popup_body_" + i.id)?.html(n), h("#a_" + i.id)?.on("click", () => {
823
+ t && t(), layerpro.popup.close(i);
78
824
  });
79
- }, v = (e, o, t) => {
80
- if (0 === $(".confirm").length) {
81
- const i = b(String(e)), p = layerpro.popup.open({
825
+ }
826
+ },
827
+ confirm: {
828
+ value: (e, t, o) => {
829
+ if (!h(".confirm")) {
830
+ const i = K(String(e)), n = layerpro.popup.open({
82
831
  id: "__confirm",
83
832
  name: "Confirm",
84
833
  icon: "&#9745;",
@@ -92,588 +841,34 @@ 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
92
841
  raised: !0,
93
842
  movable: !0,
94
843
  resizable: !1
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
- });
101
- }
102
- }, g = (e, o) => {
103
- const t = o || "_prompt", i = b(String(e)), p = layerpro.popup.open({
104
- id: "__prompt",
105
- name: "Prompt",
106
- icon: "&#9998;",
107
- width: 380,
108
- height: 220,
109
- iconize: !1,
110
- maximize: !1,
111
- close: !0,
112
- isMaximize: !1,
113
- dockable: !1,
114
- raised: !0,
115
- movable: !0,
116
- resizable: !1
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
- $(this).attr("placeholder", "");
120
- }).on("blur", function() {
121
- $(this).attr("placeholder", "write here");
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);
130
- } else alert("input can't be empty!");
131
- }), $("#b_" + p.id).on("click", () => {
132
- layerpro.popup.close(p);
133
- });
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),
136
- Object.defineProperty(window, "alert", {
137
- enumerable: !1
138
- }), Object.defineProperty(window, "prompt", {
139
- enumerable: !1
140
- }), Object.defineProperty(window, "message", {
141
- enumerable: !1
142
- }), Object.defineProperty(window, "confirm", {
143
- enumerable: !1
144
- }), Object.defineProperties(layerpro, {
145
- prompt: {
146
- value: g
147
- },
148
- alert: {
149
- value: _
150
- },
151
- message: {
152
- value: f
153
- },
154
- confirm: {
155
- value: v
156
- }
157
- });
158
- }
159
- }), oe = l({
160
- "core/genLayer.ts"() {
161
- ee(), y = new Map, w = new Map, z = {
162
- "&": "&amp;",
163
- "<": "&lt;",
164
- ">": "&gt;",
165
- '"': "&quot;",
166
- "'": "&#39;"
167
- }, k = e => e.replace(/[&<>"']/g, e => z[e]), x = o => {
168
- if ("function" == typeof o.body) return;
169
- const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup", i = "#popup" === t ? document.querySelector("#popup") : document.querySelector(t);
170
- i?.querySelectorAll('[class^="popup_window_"]').forEach(e => e.classList.remove("zHigh")),
171
- i?.querySelectorAll('[class^="popup_bar_"]').forEach(e => e.classList.remove("popup_bar_selected")),
172
- i?.querySelectorAll('[class^="icon_"]').forEach(e => e.classList.remove("popup_bar_selected")),
173
- !0 === o.raised && $('<div class="popup_raised_' + o.id + '">', t).appendTo("#popup").css({
174
- "pointer-events": "auto",
175
- "z-index": layerpro.popup.zIndex() + 1e3
176
- }), $('<div class="popup_overflow_' + o.id + '">', t).appendTo(t).css({
177
- top: o.top,
178
- left: o.left,
179
- right: o.right,
180
- bottom: o.bottom,
181
- width: o.width,
182
- height: o.height,
183
- minWidth: o.minWidth,
184
- minHeight: o.minHeight,
185
- maxWidth: o.maxWidth,
186
- maxHeight: o.maxHeight,
187
- pointerEvents: "auto",
188
- zIndex: layerpro.popup.zIndex()
189
- }).on("mousedown", e => {
190
- layerpro.popup.index(o);
191
- }).hide().fadeIn(o.fadeIn);
192
- const p = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
193
- "pointer-events": "auto"
194
- }).addClass("zHigh").addClass(o.class);
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),
196
- layerpro.popup.unmount = e => {
197
- const o = y.get(e);
198
- o && (o.unmount(), y.delete(e));
199
- }, layerpro.popup.cleanupEvents = e => {
200
- const o = w.get(e);
201
- o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
202
- o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
203
- o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
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"),
206
- o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</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),
209
- $('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
210
- !0 === o.iconize && 0 === $("#popup_dock").length) {
211
- $("#root").css("margin", "0 0 var( --dock-height ) 0");
212
- $('\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({
213
- pointerEvents: "auto",
214
- zIndex: layerpro.popup.zIndex() + 1e3
844
+ }), s = `\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 `;
845
+ h(".popup_body_" + n.id)?.html(s), h("#a_" + n.id)?.on("click", () => {
846
+ t && t(), layerpro.popup.close(n);
847
+ }), h("#b_" + n.id)?.on("click", () => {
848
+ o && o(), layerpro.popup.close(n);
215
849
  });
216
850
  }
217
- if ($("#popup_dock").length > 0 && !0 === o.dockable) {
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) {
219
- $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
220
- layerpro.popup.index(o);
221
- }, p = function(e) {
222
- o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
223
- };
224
- w.set(e, {
225
- iconClick: !0,
226
- iconClose: !0
227
- }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
228
- $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", p);
229
- }
230
- if (!0 === o.iconize) {
231
- const e = String(o.id), t = function(e) {
232
- layerpro.popup.iconize(o);
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);
235
- }
236
- if (!0 === o.maximize) {
237
- const e = String(o.id), t = function(e) {
238
- layerpro.popup.maximize(o);
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);
241
- }
242
- if (!0 === o.close) {
243
- const e = String(o.id), t = function(e) {
244
- o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
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);
247
- }
248
- const s = String(o.id), r = w.get(s) || {};
249
- if (r.escKey = !0, w.set(s, r), $(document).on("keydown", function(e) {
250
- "Escape" !== e.key && 27 !== e.keyCode || (o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(),
251
- layerpro.popup.close(o));
252
- }), o.timer > 0) {
253
- const e = {};
254
- e[String(`st_${o.id}`)] = setTimeout(() => {
255
- layerpro.popup.close(o), clearTimeout(e[String(`st_${o.id}`)]);
256
- }, o.timer);
257
- }
258
- if (o.source) {
259
- const e = $(".popup_body_" + o.id), t = String(o.source);
260
- try {
261
- const e = new URL(t, window.location.origin);
262
- if ("https:" !== e.protocol && "http:" !== e.protocol && "" !== e.protocol) return;
263
- } catch {
264
- return;
265
- }
266
- fetch(t, {
267
- mode: "same-origin"
268
- }).then(e => {
269
- if ((e.headers.get("content-type") || "").includes("text/html"), !e.ok) throw new Error(`HTTP error! status: ${e.status}`);
270
- return e.text();
271
- }).then(t => {
272
- const i = k(t);
273
- e.hide().html(i).fadeIn(o.fadeIn);
274
- }).catch(e => {});
275
- }
276
- o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
277
- o.isMaximize && layerpro.popup.maximize(o);
278
- const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
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() {
280
- (() => {
281
- if (o.body && !o.source) {
282
- const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
283
- if (i) ; else if ("function" == typeof o.body) return;
284
- if (i) {
285
- const t = document.querySelector(".popup_body_" + o.id);
286
- if (!t) return;
287
- try {
288
- const i = e(t);
289
- i.render(o.body), y.set(String(o.id), i);
290
- } catch (e) {
291
- const o = e?.message || String(e);
292
- o.includes("Invalid hook call") || o.includes("hooks");
293
- }
294
- } else if ("string" == typeof o.body && o.body.trim().startsWith("<")) {
295
- const e = k(o.body);
296
- $(".popup_body_" + o.id).html(e).fadeIn(o.fadeIn);
297
- } else {
298
- const e = k(String(o.body));
299
- $(".popup_body_" + o.id).text(e).fadeIn(o.fadeIn);
300
- }
301
- }
302
- })(), (() => {
303
- if (o.buttons) {
304
- if ($('<div class="buttons"></div>').appendTo(".popup_body_" + o.id), o.buttons.confirm) {
305
- const e = $(`<button id="lp_confirm" type="button">\n ${o.buttons.confirm.text.toUpperCase()}\n </button>`).appendTo(".buttons");
306
- o.buttons.confirm.cb && e.click(() => {
307
- o.buttons?.confirm?.cb?.(), layerpro.popup.close(o);
308
- });
309
- }
310
- o.buttons.cancel && $(`<button id="lp_cancel" type="button">\n ${o.buttons.cancel.text.toUpperCase()}\n </button>`).appendTo(".buttons").click(() => {
311
- o.buttons?.cancel?.cb?.(), layerpro.popup.close(o);
312
- });
313
- }
314
- })();
315
- });
316
- };
317
- }
318
- }), te = l({
319
- "core/mobile.ts"() {
320
- if (T = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
321
- C = () => {
322
- if ("undefined" == typeof navigator) return !1;
323
- const e = navigator.userAgent;
324
- return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
325
- }, E = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (S = () => {
326
- if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
327
- const e = C() || T();
328
- return E() && e ? "touch" : "mouse";
329
- })(), M = !T(), "undefined" != typeof window) {
330
- const e = window.matchMedia("(max-width: 1024px)"), o = () => {
331
- const e = S(), o = !T();
332
- M !== o && (M = o);
333
- };
334
- let t;
335
- e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
336
- clearTimeout(t), t = setTimeout(o, 150);
337
- });
338
851
  }
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,
340
- L = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
341
852
  }
853
+ }), globalThis.layerpro.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
854
+ capture: !0,
855
+ passive: !0
342
856
  });
343
857
 
344
- u({}, {
345
- popup: () => V
346
- });
347
-
348
- var ie = l({
349
- "core/properties.ts"() {
350
- oe(), te(), P = 250, j = 150, R = 1e3, F = new Map, J = new Map, Q = $(window),
351
- G = $("body"), V = {
352
- open: e => {
353
- if (e) return e.id = e.id || Math.round(1e3 * Math.random()), e.body = e.body || "",
354
- e.class = e.class || "", e.width = e.width || 300, e.height = e.height || 200, e.minWidth = e.minWidth || 340,
355
- e.minHeight = e.minHeight || 220, e.name = e.name || "popUp_" + e.id, e.source = e.source || null,
356
- e.icon = e.icon || null, e.iconize = e.iconize || null, e.maximize = e.maximize || null,
357
- e.isMaximize = e.isMaximize || null, e.dockable = e.dockable || null, e.close = e.close || null,
358
- e.raised = e.raised || null, e.movable = e.movable || null, e.resizable = e.resizable || null,
359
- e.store = e.store || !1, e.top = e.top ? e.top : "auto", e.left = e.left ? e.left : "auto",
360
- e.right = e.right ? e.right : "auto", e.bottom = e.bottom ? e.bottom : "auto", e.fadeIn = e.fadeIn || 100,
361
- e.fadeOut = e.fadeOut || 100, P = e.minWidth, j = e.minHeight, e.width < e.minWidth && (e.width = e.minWidth),
362
- e.height < e.minHeight && (e.height = e.minHeight), "auto" === e.width && (e.width = "100%"),
363
- "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
364
- "pointer-events": "none",
365
- "z-index": V.zIndex($("*")) + 1
366
- }), 0 === $(".popup_window_" + e.id, "#popup").length && x(e), e;
367
- },
368
- dispatch: e => {
369
- layerpro.popup.store(e);
370
- },
371
- store: e => {},
372
- show: e => {
373
- e.toggle();
374
- },
375
- vfx: (e, o, t = !1) => {
376
- setTimeout(() => {
377
- $('[class^="popup_overflow_"]', "#popup").css("opacity", 1 == o ? 1 : .5).find('[class^="popup_body_"]').css({
378
- "content-visibility": 1 == o ? "auto" : "hidden"
379
- }), e.css("opacity", 1), t || $('[class^="popup_body_"]', e).css("content-visibility", "visible");
380
- }, 1), dispatchEvent(new Event("layerProResize"));
381
- },
382
- center: e => {
383
- const o = $(".popup_overflow_" + e.id, "#popup");
384
- o.css("top", Math.max(0, (Q.height() - o.outerHeight()) / 2 + Q.scrollTop())), o.css("left", Math.max(0, (Q.width() - o.outerWidth()) / 2 + Q.scrollLeft()));
385
- },
386
- checkArea: e => [ A(e), L(e), Q.scrollLeft(), Q.scrollTop(), Q.height(), Q.width() ],
387
- close: e => {
388
- let o;
389
- if (e) {
390
- o = "object" == typeof e ? e.id : e, layerpro.popup.unmount && layerpro.popup.unmount(String(o)),
391
- layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(o));
392
- const t = F.get(String(o));
393
- if (t) {
394
- const e = {
395
- passive: !1
396
- };
397
- t.move && document.removeEventListener(N(), t.move, e), t.up && document.removeEventListener(O(), t.up, e),
398
- F.delete(String(o));
399
- }
400
- const i = J.get(String(o));
401
- if (i) {
402
- const e = {
403
- passive: !1
404
- };
405
- i.move && document.removeEventListener(N(), i.move, e), i.up && document.removeEventListener(O(), i.up, e),
406
- J.delete(String(o));
407
- }
408
- !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
409
- $(".popup_raised_" + o).remove();
410
- }) : $(".popup_overflow_" + o).fadeOut(e.fadeOut || 500, function(t) {
411
- $(this).remove(), $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, function(e) {
412
- $(this).remove();
413
- });
414
- });
415
- } else $("#popup").fadeOut(() => {
416
- $(void 0).remove();
417
- });
418
- setTimeout(() => V.removeDock(e), 300);
419
- },
420
- removeDock: e => {
421
- $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
422
- $("#popup_dock").remove());
423
- },
424
- iconize: e => {
425
- const o = $(".popup_overflow_" + e.id, "#popup");
426
- if (!1 !== o.find("[class^=popup_window_]").hasClass("zHigh")) if (V.vfx(o, !1, !0),
427
- o.data("iconize")) {
428
- if (o.data("iconize")) {
429
- const e = o.data("iconize");
430
- o.animate({
431
- top: e.y,
432
- left: e.x,
433
- width: e.w,
434
- height: e.h,
435
- opacity: 1
436
- }, () => V.vfx(o, !0)), o.removeData("iconize");
437
- }
438
- } else o.animate({
439
- top: "100%",
440
- left: $(".icon_" + e.id, "#popup_dock").offset().left + 15,
441
- width: 0,
442
- height: 0,
443
- opacity: 0
444
- }, 200, () => V.vfx(o, !0)), o.data("iconize", {
445
- y: o.offset().top,
446
- x: o.offset().left,
447
- w: o.width(),
448
- h: o.height()
449
- }, 200);
450
- },
451
- maximize: e => {
452
- const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
453
- if (V.vfx(o, !1, !0), o.data("store")) {
454
- if (o.data("store")) {
455
- const p = o.data("store");
456
- o.animate({
457
- top: p.y,
458
- left: p.x,
459
- width: p.w,
460
- height: p.h
461
- }, () => {
462
- i.css("pointer-events", "auto"), t.on(I(), function(o) {
463
- V.resizeModals(o, this, e);
464
- }), Q.off("layerProResize.eventItem"), V.vfx(o, !0);
465
- }), o.removeData("store");
466
- }
467
- } else o.data("store", {
468
- y: o.offset().top,
469
- x: o.offset().left,
470
- w: o.width(),
471
- h: o.height()
472
- }), o.animate({
473
- position: "absolute",
474
- top: -6,
475
- left: -6,
476
- right: -6,
477
- bottom: -6,
478
- width: Q.width() + 12,
479
- height: Q.height() + 12 - 45
480
- }, () => {
481
- Q.on("layerProResize.eventItem", e => {
482
- o.css({
483
- width: Q.width() + 12,
484
- height: Q.height() + 12 - 40
485
- });
486
- }), i.css("pointer-events", "none"), t.off(I()), V.vfx(o, !0, !0);
487
- });
488
- },
489
- movable: e => {
490
- if (!1 === e.movable) return;
491
- const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), p = $(".popup_body_" + e.id, t);
492
- t.css("touch-action", "none");
493
- let n = 0, s = 0, r = 0, c = 0;
494
- const a = e => {
495
- e.preventDefault();
496
- const o = A(e), i = L(e);
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);
499
- }, d = e => {
500
- const i = {
501
- passive: !1
502
- };
503
- document.removeEventListener(N(), a, i), document.removeEventListener(O(), d, i),
504
- F.delete(o), p.css("pointer-events", "auto"), V.vfx(t, !0);
505
- };
506
- F.set(o, {
507
- move: a,
508
- up: d
509
- });
510
- i[0].addEventListener(I(), e => {
511
- e.preventDefault(), p.css("pointer-events", "none"), l(e), V.vfx(t, !1);
512
- }, {
513
- passive: !1
514
- }), e.maximize && i.on("dblclick", o => {
515
- layerpro.popup.maximize(e);
516
- });
517
- const l = e => {
518
- r = A(e), c = L(e);
519
- const o = {
520
- passive: !1
521
- };
522
- document.addEventListener(N(), a, o), document.addEventListener(O(), d, o);
523
- };
524
- },
525
- resizable: e => {
526
- if (!e.resizable) return;
527
- const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup");
528
- for (let e = 4; e--; ) $(`<div class='resize_${e}'>`, t).appendTo(t).css("touch-action", "none"),
529
- $(`<div class='resize_corner_${e}'>`, t).appendTo(t).css("touch-action", "none");
530
- const i = J.get(o) || {};
531
- i.down = function(o) {
532
- V.resizeModals(o, this, e);
533
- }, J.set(o, i);
534
- const p = {
535
- passive: !1
536
- };
537
- $("[class^=resize_]").each((o, t) => {
538
- t.addEventListener(I(), o => {
539
- o.preventDefault(), V.resizeModals(o, t, e);
540
- }, p);
541
- });
542
- },
543
- resizeModals: (e, o, t) => {
544
- const i = $(o).parent(), p = String(t.id), n = A(e), s = L(e), r = [ n - Q.scrollLeft(), s - Q.scrollTop() ];
545
- t.minWidth, G.css("pointer-events", "none"), i.css("pointer-events", "none"), V.vfx(i, !1);
546
- const c = e => {
547
- V.doRes(e, o);
548
- }, a = e => {
549
- V.stopRes(o);
550
- }, d = J.get(p) || {};
551
- d.move = c, d.up = a, J.set(p, d);
552
- const l = {
553
- passive: !1
554
- };
555
- document.addEventListener(N(), c, l), document.addEventListener(O(), a, l), W = r[0],
556
- D = r[1], X = i.width(), q = i.height(), Y = i.position().left, U = i.position().top,
557
- B = U + q + 1, K = Y + X + 1, H = o;
558
- },
559
- doRes: (e, o) => {
560
- dispatchEvent(new Event("layerProResize"));
561
- const t = $(o), i = t.parent(), p = A(e), n = L(e), s = [ p - Q.scrollLeft(), n - Q.scrollTop() ];
562
- if (o === H) {
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({
566
- height: Number(j + 1)
567
- }), i.height() > j && j <= r && i.css({
568
- top: Number(B - r),
569
- height: parseInt(r)
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({
571
- width: Number(o),
572
- right: Number(Y - o)
573
- }), i.width() <= P && i.css({
574
- width: Number(P + 1)
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({
576
- height: Number(p)
577
- }), i.height() <= j && p > j && i.css({
578
- height: Number(j + 1)
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({
580
- width: Number(P + 1)
581
- }), i.width() > P && P <= n && i.css({
582
- width: parseInt(n),
583
- left: Number(K - n)
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({
585
- top: Number(B - r),
586
- height: parseInt(r)
587
- }), i.height() <= j && r > j && i.css({
588
- height: Number(j + 1)
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({
593
- width: Number(P + 1)
594
- })), t.hasClass("resize_corner_1") && (i.height() >= j && r > j && i.css({
595
- top: Number(B - r),
596
- height: Number(r)
597
- }), i.height() <= j && r > j && i.css({
598
- height: Number(j + 1)
599
- }), i.width() >= P && i.css({
600
- width: Number(o),
601
- right: Number(Y - o)
602
- }), i.width() <= P && n > P && i.css({
603
- width: Number(P + 1)
604
- })), t.hasClass("resize_corner_2") && (i.height() >= j && i.css({
605
- height: Number(p)
606
- }), i.height() <= j && p > j && i.css({
607
- height: Number(j + 1)
608
- }), i.width() >= P && i.css({
609
- width: Number(o),
610
- right: Number(Y - o)
611
- }), i.width() <= P && i.css({
612
- width: Number(P + 1)
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({
616
- height: Number(j + 1)
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({
621
- width: Number(P + 1)
622
- })));
623
- }
624
- },
625
- stopRes: e => {
626
- const o = $(e).parent();
627
- G.css("pointer-events", "auto"), o.css("pointer-events", "auto"), V.vfx(o, !0),
628
- H = !1;
629
- const t = J.get(String(e));
630
- if (t) {
631
- const o = {
632
- passive: !1
633
- };
634
- t.move && document.removeEventListener(N(), t.move, o), t.up && document.removeEventListener(O(), t.up, o),
635
- J.delete(String(e));
636
- }
637
- },
638
- index: e => {
639
- const o = $('[class^="popup_overflow_"]', "#popup");
640
- $('[class^="popup_window_"]', "#popup").removeClass("zHigh"), $('[class^="popup_bar_"]', "#popup").removeClass("popup_bar_selected"),
641
- $('[class^="icon_"]', "#popup").removeClass("popup_bar_selected"), o.each(function() {
642
- $(this, "#popup").css("zIndex", $(this, "#popup")[0].style.zIndex - 1);
643
- }), $(".icon_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_overflow_" + e.id, "#popup").css("zIndex", V.zIndex(o)),
644
- $(".popup_bar_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_window_" + e.id, "#popup").addClass("zHigh");
645
- },
646
- zIndex: e => ++R
647
- }, Object.defineProperty(layerpro, "popup", {
648
- value: V,
649
- writable: !1,
650
- configurable: !1
651
- });
652
- }
653
- }), pe = l({
654
- "core/window.ts"() {
655
- window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
656
- capture: !0,
657
- passive: !0
858
+ T = (e, t) => {
859
+ f('[class^="popup_overflow_"]').forEach(e => {
860
+ const t = e.el.className.match(/popup_overflow_(\d+)/);
861
+ t && t[1] && layerpro.popup.close({
862
+ id: t[1],
863
+ fadeOut: 0
658
864
  });
659
- }
660
- });
865
+ });
866
+ };
661
867
 
662
- globalThis.$ = o, globalThis.jQuery = o;
868
+ var F = globalThis.layerpro;
663
869
 
664
- window.layerpro || (Object.defineProperty(window, "layerpro", {
665
- value: {},
666
- writable: !1,
667
- configurable: !1,
668
- enumerable: !1
669
- }), h(), Z(), ie(), pe(), layerpro.setProps = (e, o) => {
670
- Reflect.ownKeys(e).forEach(t => {
671
- const i = Object.getOwnPropertyDescriptor(e, t);
672
- i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
673
- i.writable = o?.writable || !1, Object.defineProperty(e, t, i)), "object" == typeof e[t] && null !== e[t] && layerpro.setProps(e[t], o);
674
- });
675
- }, layerpro.setProps(layerpro, {
870
+ F.setProps(F, {
676
871
  configurable: !1,
677
872
  enumerable: !1,
678
873
  writable: !1
679
- }), Object.freeze(layerpro));
874
+ }), Object.freeze(F);