@owp/core 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Close-DvFvpcJW.js +981 -0
- package/dist/Close-DvFvpcJW.js.map +1 -0
- package/dist/contexts.js +30 -30
- package/dist/contexts.js.map +1 -1
- package/dist/index.js +4693 -4700
- package/dist/index.js.map +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpLoading/OwpLoading.d.ts +1 -1
- package/dist/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/Close-C91nHTKM.js +0 -973
- package/dist/Close-C91nHTKM.js.map +0 -1
- package/dist/types/components/OwpSplashScreen/OwpSplashScreen.d.ts +0 -11
- package/dist/types/components/OwpSplashScreen/index.d.ts +0 -1
package/dist/Close-C91nHTKM.js
DELETED
|
@@ -1,973 +0,0 @@
|
|
|
1
|
-
var Jt = Object.defineProperty;
|
|
2
|
-
var r = (e, t) => Jt(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { a as ge, j as M, b as Yt } from "./emotion-react-jsx-runtime.browser.esm-BMvSswBW.js";
|
|
4
|
-
import { b as Fe, l as qt, t as Wt } from "./useShortcuts-BjtlXprQ.js";
|
|
5
|
-
import { DialogContent as $t, DialogActions as Ht, Dialog as Kt, DialogTitle as Xt, Box as Zt, Button as wt, Typography as kt } from "@mui/material";
|
|
6
|
-
import { forwardRef as Qt, createContext as en, useRef as v, useEffect as w, useCallback as g, useMemo as tn, Component as nn, useState as Ge } from "react";
|
|
7
|
-
import { u as rn } from "./isString-Codtu20I.js";
|
|
8
|
-
import { useNavigate as on, useLocation as un } from "react-router-dom";
|
|
9
|
-
import an from "@mui/material/Box";
|
|
10
|
-
import sn from "@mui/material/Typography";
|
|
11
|
-
import cn from "@mui/material/Backdrop";
|
|
12
|
-
import ln from "@mui/material/CircularProgress";
|
|
13
|
-
import { createSvgIcon as fn } from "@mui/material/utils";
|
|
14
|
-
function Pe(e) {
|
|
15
|
-
return typeof e == "number" || e instanceof Number;
|
|
16
|
-
}
|
|
17
|
-
r(Pe, "isNumber");
|
|
18
|
-
const Je = Qt(
|
|
19
|
-
({
|
|
20
|
-
title: e,
|
|
21
|
-
children: t,
|
|
22
|
-
canCancel: n = !0,
|
|
23
|
-
canConfirm: i = !0,
|
|
24
|
-
onConfirm: o,
|
|
25
|
-
onCancel: h,
|
|
26
|
-
onClose: s,
|
|
27
|
-
useSubmit: a,
|
|
28
|
-
actions: c,
|
|
29
|
-
contentProps: l,
|
|
30
|
-
...y
|
|
31
|
-
}, B) => {
|
|
32
|
-
const { t: G } = Fe(), I = (y == null ? void 0 : y.confirmText) ?? G("Button.저장", { defaultValue: "저장" }), T = (y == null ? void 0 : y.cancelText) ?? G(i ? "Button.취소" : "Button.닫기", {
|
|
33
|
-
defaultValue: i ? "취소" : "닫기"
|
|
34
|
-
});
|
|
35
|
-
return /* @__PURE__ */ ge(
|
|
36
|
-
Kt,
|
|
37
|
-
{
|
|
38
|
-
ref: B,
|
|
39
|
-
fullWidth: !0,
|
|
40
|
-
component: a ? "form" : void 0,
|
|
41
|
-
onClose: /* @__PURE__ */ r((m, R) => {
|
|
42
|
-
R !== "backdropClick" && (s == null || s(m, R));
|
|
43
|
-
}, "onClose"),
|
|
44
|
-
...y,
|
|
45
|
-
children: [
|
|
46
|
-
e && /* @__PURE__ */ M(Xt, { children: e }),
|
|
47
|
-
/* @__PURE__ */ M($t, { dividers: !0, ...l, children: t }),
|
|
48
|
-
/* @__PURE__ */ ge(Ht, { children: [
|
|
49
|
-
c && /* @__PURE__ */ M(Zt, { className: "flex w-full items-start", children: c }),
|
|
50
|
-
n && /* @__PURE__ */ M(
|
|
51
|
-
wt,
|
|
52
|
-
{
|
|
53
|
-
variant: "outlined",
|
|
54
|
-
onClick: /* @__PURE__ */ r(() => {
|
|
55
|
-
if (typeof h == "function") {
|
|
56
|
-
h();
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
s == null || s({}, "escapeKeyDown");
|
|
60
|
-
}, "onClick"),
|
|
61
|
-
children: T
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
i && /* @__PURE__ */ M(
|
|
65
|
-
wt,
|
|
66
|
-
{
|
|
67
|
-
variant: "contained",
|
|
68
|
-
color: "secondary",
|
|
69
|
-
type: a ? "submit" : "button",
|
|
70
|
-
onClick: /* @__PURE__ */ r(() => {
|
|
71
|
-
if (!a) {
|
|
72
|
-
if (typeof o == "function") {
|
|
73
|
-
o();
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
s == null || s({}, "escapeKeyDown");
|
|
77
|
-
}
|
|
78
|
-
}, "onClick"),
|
|
79
|
-
children: I
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
] })
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
Je.displayName = "OwpDialog";
|
|
89
|
-
const rr = Je;
|
|
90
|
-
var hn = Object.create, Lt = Object.defineProperty, dn = Object.getOwnPropertyDescriptor, vn = Object.getOwnPropertyNames, mn = Object.getPrototypeOf, pn = Object.prototype.hasOwnProperty, gn = /* @__PURE__ */ r(function(e, t) {
|
|
91
|
-
return function() {
|
|
92
|
-
return t || e((t = { exports: {} }).exports, t), t.exports;
|
|
93
|
-
};
|
|
94
|
-
}, "yr"), yn = /* @__PURE__ */ r(function(e, t, n, i) {
|
|
95
|
-
if (t && typeof t == "object" || typeof t == "function") for (var o = vn(t), h = 0, s = o.length, a; h < s; h++) a = o[h], !pn.call(e, a) && a !== n && Lt(e, a, { get: (function(c) {
|
|
96
|
-
return t[c];
|
|
97
|
-
}).bind(null, a), enumerable: !(i = dn(t, a)) || i.enumerable });
|
|
98
|
-
return e;
|
|
99
|
-
}, "gr"), En = /* @__PURE__ */ r(function(e, t, n) {
|
|
100
|
-
return n = e != null ? hn(mn(e)) : {}, yn(!e || !e.__esModule ? Lt(n, "default", { value: e, enumerable: !0 }) : n, e);
|
|
101
|
-
}, "wr"), bn = gn(function(e, t) {
|
|
102
|
-
(function(n, i) {
|
|
103
|
-
typeof e == "object" && typeof t < "u" ? i(e) : typeof define == "function" && define.amd ? define(["exports"], i) : (n = typeof globalThis < "u" ? globalThis : n || self, i(n.fastUniqueNumbers = {}));
|
|
104
|
-
})(e, function(n) {
|
|
105
|
-
var i = /* @__PURE__ */ r(function(I) {
|
|
106
|
-
return function(T) {
|
|
107
|
-
var m = I(T);
|
|
108
|
-
return T.add(m), m;
|
|
109
|
-
};
|
|
110
|
-
}, "r"), o = /* @__PURE__ */ r(function(I) {
|
|
111
|
-
return function(T, m) {
|
|
112
|
-
return I.set(T, m), m;
|
|
113
|
-
};
|
|
114
|
-
}, "t"), h = Number.MAX_SAFE_INTEGER === void 0 ? 9007199254740991 : Number.MAX_SAFE_INTEGER, s = 536870912, a = s * 2, c = /* @__PURE__ */ r(function(I, T) {
|
|
115
|
-
return function(m) {
|
|
116
|
-
var R = T.get(m), x = R === void 0 ? m.size : R < a ? R + 1 : 0;
|
|
117
|
-
if (!m.has(x)) return I(m, x);
|
|
118
|
-
if (m.size < s) {
|
|
119
|
-
for (; m.has(x); ) x = Math.floor(Math.random() * a);
|
|
120
|
-
return I(m, x);
|
|
121
|
-
}
|
|
122
|
-
if (m.size > h) throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");
|
|
123
|
-
for (; m.has(x); ) x = Math.floor(Math.random() * h);
|
|
124
|
-
return I(m, x);
|
|
125
|
-
};
|
|
126
|
-
}, "s"), l = /* @__PURE__ */ new WeakMap(), y = o(l), B = c(y, l), G = i(B);
|
|
127
|
-
n.addUniqueNumber = G, n.generateUniqueNumber = B;
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
function te(e) {
|
|
131
|
-
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
132
|
-
return e;
|
|
133
|
-
}
|
|
134
|
-
r(te, "Y");
|
|
135
|
-
function St(e, t) {
|
|
136
|
-
return t != null && typeof Symbol < "u" && t[Symbol.hasInstance] ? !!t[Symbol.hasInstance](e) : St(e, t);
|
|
137
|
-
}
|
|
138
|
-
r(St, "je");
|
|
139
|
-
function ye(e, t) {
|
|
140
|
-
if (!St(e, t)) throw new TypeError("Cannot call a class as a function");
|
|
141
|
-
}
|
|
142
|
-
r(ye, "z");
|
|
143
|
-
function Ue(e, t) {
|
|
144
|
-
return Ue = Object.setPrototypeOf || function(n, i) {
|
|
145
|
-
return n.__proto__ = i, n;
|
|
146
|
-
}, Ue(e, t);
|
|
147
|
-
}
|
|
148
|
-
r(Ue, "De");
|
|
149
|
-
function Ot(e, t) {
|
|
150
|
-
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
151
|
-
e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && Ue(e, t);
|
|
152
|
-
}
|
|
153
|
-
r(Ot, "Ke");
|
|
154
|
-
function b(e, t, n) {
|
|
155
|
-
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
156
|
-
}
|
|
157
|
-
r(b, "h");
|
|
158
|
-
function Re(e) {
|
|
159
|
-
return Re = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
|
|
160
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
161
|
-
}, Re(e);
|
|
162
|
-
}
|
|
163
|
-
r(Re, "be");
|
|
164
|
-
function wn() {
|
|
165
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
166
|
-
if (typeof Proxy == "function") return !0;
|
|
167
|
-
try {
|
|
168
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
169
|
-
})), !0;
|
|
170
|
-
} catch {
|
|
171
|
-
return !1;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
r(wn, "Pt");
|
|
175
|
-
function Mt(e) {
|
|
176
|
-
"@swc/helpers - typeof";
|
|
177
|
-
return e && typeof Symbol < "u" && e.constructor === Symbol ? "symbol" : typeof e;
|
|
178
|
-
}
|
|
179
|
-
r(Mt, "Ne");
|
|
180
|
-
function Tn(e, t) {
|
|
181
|
-
return t && (Mt(t) === "object" || typeof t == "function") ? t : te(e);
|
|
182
|
-
}
|
|
183
|
-
r(Tn, "kt");
|
|
184
|
-
function Pt(e) {
|
|
185
|
-
var t = wn();
|
|
186
|
-
return function() {
|
|
187
|
-
var n = Re(e), i;
|
|
188
|
-
if (t) {
|
|
189
|
-
var o = Re(this).constructor;
|
|
190
|
-
i = Reflect.construct(n, arguments, o);
|
|
191
|
-
} else i = n.apply(this, arguments);
|
|
192
|
-
return Tn(this, i);
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
r(Pt, "Ze");
|
|
196
|
-
var An = (function(e) {
|
|
197
|
-
Ot(n, e);
|
|
198
|
-
var t = Pt(n);
|
|
199
|
-
function n() {
|
|
200
|
-
return ye(this, n), t.apply(this, arguments);
|
|
201
|
-
}
|
|
202
|
-
return r(n, "t"), n;
|
|
203
|
-
})(nn);
|
|
204
|
-
(function(e) {
|
|
205
|
-
Ot(n, e);
|
|
206
|
-
var t = Pt(n);
|
|
207
|
-
function n(i) {
|
|
208
|
-
ye(this, n);
|
|
209
|
-
var o;
|
|
210
|
-
return o = t.call(this, i), o.onPresenceChange && i.setOnPresenceChange(o.onPresenceChange.bind(te(o))), o.onPrompt && i.setOnPrompt(o.onPrompt.bind(te(o))), o.onIdle && i.setOnIdle(o.onIdle.bind(te(o))), o.onActive && i.setOnActive(o.onActive.bind(te(o))), o.onAction && i.setOnAction(o.onAction.bind(te(o))), o.onMessage && i.setOnMessage(o.onMessage.bind(te(o))), o;
|
|
211
|
-
}
|
|
212
|
-
return r(n, "t"), n;
|
|
213
|
-
})(An);
|
|
214
|
-
function ze(e, t) {
|
|
215
|
-
(t == null || t > e.length) && (t = e.length);
|
|
216
|
-
for (var n = 0, i = new Array(t); n < t; n++) i[n] = e[n];
|
|
217
|
-
return i;
|
|
218
|
-
}
|
|
219
|
-
r(ze, "Ee");
|
|
220
|
-
function In(e) {
|
|
221
|
-
if (Array.isArray(e)) return ze(e);
|
|
222
|
-
}
|
|
223
|
-
r(In, "At");
|
|
224
|
-
function kn(e) {
|
|
225
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
226
|
-
}
|
|
227
|
-
r(kn, "Rt");
|
|
228
|
-
function Ln() {
|
|
229
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
230
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
231
|
-
}
|
|
232
|
-
r(Ln, "Mt");
|
|
233
|
-
function Sn(e, t) {
|
|
234
|
-
if (e) {
|
|
235
|
-
if (typeof e == "string") return ze(e, t);
|
|
236
|
-
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
237
|
-
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
238
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ze(e, t);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
r(Sn, "Ct");
|
|
242
|
-
function _(e) {
|
|
243
|
-
return In(e) || kn(e) || Sn(e) || Ln();
|
|
244
|
-
}
|
|
245
|
-
r(_, "O");
|
|
246
|
-
function On(e, t) {
|
|
247
|
-
for (var n = 0; n < t.length; n++) {
|
|
248
|
-
var i = t[n];
|
|
249
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
r(On, "jt");
|
|
253
|
-
function Ye(e, t, n) {
|
|
254
|
-
return t && On(e.prototype, t), e;
|
|
255
|
-
}
|
|
256
|
-
r(Ye, "ce");
|
|
257
|
-
En(bn());
|
|
258
|
-
var W = (typeof window > "u" || typeof window > "u" ? "undefined" : Mt(window)) === "object", V = { setTimeout: W ? setTimeout.bind(window) : setTimeout, clearTimeout: W ? clearTimeout.bind(window) : clearTimeout, setInterval: W ? setInterval.bind(window) : setInterval, clearInterval: W ? clearInterval.bind(window) : clearInterval };
|
|
259
|
-
function Mn(e) {
|
|
260
|
-
V.setTimeout = e.setTimeout, V.clearTimeout = e.clearTimeout, V.setInterval = e.setInterval, V.clearInterval = e.clearInterval;
|
|
261
|
-
}
|
|
262
|
-
r(Mn, "Jt");
|
|
263
|
-
var ue = {}, Pn = (function() {
|
|
264
|
-
function e(t) {
|
|
265
|
-
ye(this, e), b(this, "name", void 0), b(this, "closed", !1), b(this, "mc", new MessageChannel()), this.name = t, ue[t] = ue[t] || [], ue[t].push(this), this.mc.port1.start(), this.mc.port2.start(), this.onStorage = this.onStorage.bind(this), window.addEventListener("storage", this.onStorage);
|
|
266
|
-
}
|
|
267
|
-
return r(e, "e"), Ye(e, [{ key: "onStorage", value: /* @__PURE__ */ r(function(t) {
|
|
268
|
-
if (t.storageArea === window.localStorage && t.key.substring(0, this.name.length) === this.name && t.newValue !== null) {
|
|
269
|
-
var n = JSON.parse(t.newValue);
|
|
270
|
-
this.mc.port2.postMessage(n);
|
|
271
|
-
}
|
|
272
|
-
}, "value") }, { key: "postMessage", value: /* @__PURE__ */ r(function(t) {
|
|
273
|
-
var n = this;
|
|
274
|
-
if (this.closed) throw new Error("InvalidStateError");
|
|
275
|
-
var i = JSON.stringify(t), o = "".concat(this.name, ":").concat(String(Date.now())).concat(String(Math.random()));
|
|
276
|
-
window.localStorage.setItem(o, i), V.setTimeout(function() {
|
|
277
|
-
window.localStorage.removeItem(o);
|
|
278
|
-
}, 500), ue[this.name].forEach(function(h) {
|
|
279
|
-
h !== n && h.mc.port2.postMessage(JSON.parse(i));
|
|
280
|
-
});
|
|
281
|
-
}, "value") }, { key: "close", value: /* @__PURE__ */ r(function() {
|
|
282
|
-
if (!this.closed) {
|
|
283
|
-
this.closed = !0, this.mc.port1.close(), this.mc.port2.close(), window.removeEventListener("storage", this.onStorage);
|
|
284
|
-
var t = ue[this.name].indexOf(this);
|
|
285
|
-
ue[this.name].splice(t, 1);
|
|
286
|
-
}
|
|
287
|
-
}, "value") }, { key: "onmessage", get: /* @__PURE__ */ r(function() {
|
|
288
|
-
return this.mc.port1.onmessage;
|
|
289
|
-
}, "get"), set: /* @__PURE__ */ r(function(t) {
|
|
290
|
-
this.mc.port1.onmessage = t;
|
|
291
|
-
}, "set") }, { key: "onmessageerror", get: /* @__PURE__ */ r(function() {
|
|
292
|
-
return this.mc.port1.onmessageerror;
|
|
293
|
-
}, "get"), set: /* @__PURE__ */ r(function(t) {
|
|
294
|
-
this.mc.port1.onmessageerror = t;
|
|
295
|
-
}, "set") }, { key: "addEventListener", value: /* @__PURE__ */ r(function(t, n) {
|
|
296
|
-
return this.mc.port1.addEventListener(t, n);
|
|
297
|
-
}, "value") }, { key: "removeEventListener", value: /* @__PURE__ */ r(function(t, n) {
|
|
298
|
-
return this.mc.port1.removeEventListener(t, n);
|
|
299
|
-
}, "value") }, { key: "dispatchEvent", value: /* @__PURE__ */ r(function(t) {
|
|
300
|
-
return this.mc.port1.dispatchEvent(t);
|
|
301
|
-
}, "value") }]), e;
|
|
302
|
-
})(), Rn = typeof window > "u" ? void 0 : typeof window.BroadcastChannel == "function" ? window.BroadcastChannel : Pn;
|
|
303
|
-
function Tt(e, t, n, i, o, h, s) {
|
|
304
|
-
try {
|
|
305
|
-
var a = e[h](s), c = a.value;
|
|
306
|
-
} catch (l) {
|
|
307
|
-
n(l);
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
a.done ? t(c) : Promise.resolve(c).then(i, o);
|
|
311
|
-
}
|
|
312
|
-
r(Tt, "Xt");
|
|
313
|
-
function xn(e) {
|
|
314
|
-
return function() {
|
|
315
|
-
var t = this, n = arguments;
|
|
316
|
-
return new Promise(function(i, o) {
|
|
317
|
-
var h = e.apply(t, n);
|
|
318
|
-
function s(c) {
|
|
319
|
-
Tt(h, i, o, s, a, "next", c);
|
|
320
|
-
}
|
|
321
|
-
r(s, "s");
|
|
322
|
-
function a(c) {
|
|
323
|
-
Tt(h, i, o, s, a, "throw", c);
|
|
324
|
-
}
|
|
325
|
-
r(a, "a"), s(void 0);
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
r(xn, "$t");
|
|
330
|
-
function Cn(e, t) {
|
|
331
|
-
var n = /* @__PURE__ */ r(function(l) {
|
|
332
|
-
return function(y) {
|
|
333
|
-
return i([l, y]);
|
|
334
|
-
};
|
|
335
|
-
}, "t"), i = /* @__PURE__ */ r(function(l) {
|
|
336
|
-
if (h) throw new TypeError("Generator is already executing.");
|
|
337
|
-
for (; c && (c = 0, l[0] && (o = 0)), o; ) try {
|
|
338
|
-
if (h = 1, s && (a = l[0] & 2 ? s.return : l[0] ? s.throw || ((a = s.return) && a.call(s), 0) : s.next) && !(a = a.call(s, l[1])).done) return a;
|
|
339
|
-
switch (s = 0, a && (l = [l[0] & 2, a.value]), l[0]) {
|
|
340
|
-
case 0:
|
|
341
|
-
case 1:
|
|
342
|
-
a = l;
|
|
343
|
-
break;
|
|
344
|
-
case 4:
|
|
345
|
-
return o.label++, { value: l[1], done: !1 };
|
|
346
|
-
case 5:
|
|
347
|
-
o.label++, s = l[1], l = [0];
|
|
348
|
-
continue;
|
|
349
|
-
case 7:
|
|
350
|
-
l = o.ops.pop(), o.trys.pop();
|
|
351
|
-
continue;
|
|
352
|
-
default:
|
|
353
|
-
if (a = o.trys, !(a = a.length > 0 && a[a.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
354
|
-
o = 0;
|
|
355
|
-
continue;
|
|
356
|
-
}
|
|
357
|
-
if (l[0] === 3 && (!a || l[1] > a[0] && l[1] < a[3])) {
|
|
358
|
-
o.label = l[1];
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
if (l[0] === 6 && o.label < a[1]) {
|
|
362
|
-
o.label = a[1], a = l;
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
if (a && o.label < a[2]) {
|
|
366
|
-
o.label = a[2], o.ops.push(l);
|
|
367
|
-
break;
|
|
368
|
-
}
|
|
369
|
-
a[2] && o.ops.pop(), o.trys.pop();
|
|
370
|
-
continue;
|
|
371
|
-
}
|
|
372
|
-
l = t.call(e, o);
|
|
373
|
-
} catch (y) {
|
|
374
|
-
l = [6, y], s = 0;
|
|
375
|
-
} finally {
|
|
376
|
-
h = a = 0;
|
|
377
|
-
}
|
|
378
|
-
if (l[0] & 5) throw l[1];
|
|
379
|
-
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
380
|
-
}, "o"), o = { label: 0, sent: /* @__PURE__ */ r(function() {
|
|
381
|
-
if (a[0] & 1) throw a[1];
|
|
382
|
-
return a[1];
|
|
383
|
-
}, "sent"), trys: [], ops: [] }, h, s, a, c;
|
|
384
|
-
return c = { next: n(0), throw: n(1), return: n(2) }, typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
385
|
-
return this;
|
|
386
|
-
}), c;
|
|
387
|
-
}
|
|
388
|
-
r(Cn, "Ve");
|
|
389
|
-
function Dn() {
|
|
390
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
391
|
-
return new Promise(function(t) {
|
|
392
|
-
return V.setTimeout(t, e);
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
r(Dn, "Kt");
|
|
396
|
-
function Rt() {
|
|
397
|
-
return Math.random().toString(36).substring(2);
|
|
398
|
-
}
|
|
399
|
-
r(Rt, "Ge");
|
|
400
|
-
var d;
|
|
401
|
-
(function(e) {
|
|
402
|
-
e[e.APPLY = 0] = "APPLY", e[e.TELL = 1] = "TELL", e[e.CLOSE = 2] = "CLOSE", e[e.REGISTER = 3] = "REGISTER", e[e.DEREGISTER = 4] = "DEREGISTER", e[e.IDLE = 5] = "IDLE", e[e.ACTIVE = 6] = "ACTIVE", e[e.PROMPT = 7] = "PROMPT", e[e.START = 8] = "START", e[e.RESET = 9] = "RESET", e[e.ACTIVATE = 10] = "ACTIVATE", e[e.PAUSE = 11] = "PAUSE", e[e.RESUME = 12] = "RESUME", e[e.MESSAGE = 13] = "MESSAGE";
|
|
403
|
-
})(d || (d = {}));
|
|
404
|
-
var Nn = (function() {
|
|
405
|
-
function e(t, n) {
|
|
406
|
-
ye(this, e), b(this, "options", void 0), b(this, "channel", void 0), b(this, "token", Rt()), b(this, "isLeader", !1), b(this, "isDead", !1), b(this, "isApplying", !1), b(this, "reApply", !1), b(this, "intervals", []), b(this, "listeners", []), b(this, "deferred", void 0), this.channel = t, this.options = n, this.apply = this.apply.bind(this), this.awaitLeadership = this.awaitLeadership.bind(this), this.sendAction = this.sendAction.bind(this);
|
|
407
|
-
}
|
|
408
|
-
return r(e, "e"), Ye(e, [{ key: "apply", value: /* @__PURE__ */ r(function() {
|
|
409
|
-
var t = this;
|
|
410
|
-
return xn(function() {
|
|
411
|
-
var n, i;
|
|
412
|
-
return Cn(this, function(o) {
|
|
413
|
-
switch (o.label) {
|
|
414
|
-
case 0:
|
|
415
|
-
if (t.isLeader) return [2, !1];
|
|
416
|
-
if (t.isDead) return [2, !1];
|
|
417
|
-
if (t.isApplying) return t.reApply = !0, [2, !1];
|
|
418
|
-
t.isApplying = !0, n = !1, i = /* @__PURE__ */ r(function(h) {
|
|
419
|
-
var s = h.data, a = s.token, c = s.action;
|
|
420
|
-
a !== t.token && (c === d.APPLY && a > t.token && (n = !0), c === d.TELL && (n = !0));
|
|
421
|
-
}, "n"), t.channel.addEventListener("message", i), o.label = 1;
|
|
422
|
-
case 1:
|
|
423
|
-
return o.trys.push([1, 3, , 4]), t.sendAction(d.APPLY), [4, Dn(t.options.responseTime)];
|
|
424
|
-
case 2:
|
|
425
|
-
return o.sent(), t.channel.removeEventListener("message", i), t.isApplying = !1, n ? t.reApply ? [2, t.apply()] : [2, !1] : (t.assumeLead(), [2, !0]);
|
|
426
|
-
case 3:
|
|
427
|
-
return o.sent(), [2, !1];
|
|
428
|
-
case 4:
|
|
429
|
-
return [2];
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
})();
|
|
433
|
-
}, "value") }, { key: "awaitLeadership", value: /* @__PURE__ */ r(function() {
|
|
434
|
-
var t = this;
|
|
435
|
-
if (this.isLeader) return Promise.resolve();
|
|
436
|
-
var n = !1, i = null;
|
|
437
|
-
return new Promise(function(o) {
|
|
438
|
-
var h = /* @__PURE__ */ r(function() {
|
|
439
|
-
if (!n) {
|
|
440
|
-
n = !0;
|
|
441
|
-
try {
|
|
442
|
-
V.clearInterval(i);
|
|
443
|
-
} catch {
|
|
444
|
-
}
|
|
445
|
-
var a = t.intervals.indexOf(i);
|
|
446
|
-
a >= 0 && t.intervals.splice(a, 1), t.channel.removeEventListener("message", s), o();
|
|
447
|
-
}
|
|
448
|
-
}, "s");
|
|
449
|
-
i = V.setInterval(function() {
|
|
450
|
-
t.apply().then(function() {
|
|
451
|
-
t.isLeader && h();
|
|
452
|
-
});
|
|
453
|
-
}, t.options.fallbackInterval), t.intervals.push(i);
|
|
454
|
-
var s = /* @__PURE__ */ r(function(a) {
|
|
455
|
-
var c = a.data.action;
|
|
456
|
-
c === d.CLOSE && t.apply().then(function() {
|
|
457
|
-
t.isLeader && h();
|
|
458
|
-
});
|
|
459
|
-
}, "a");
|
|
460
|
-
t.channel.addEventListener("message", s);
|
|
461
|
-
});
|
|
462
|
-
}, "value") }, { key: "sendAction", value: /* @__PURE__ */ r(function(t) {
|
|
463
|
-
this.channel.postMessage({ action: t, token: this.token });
|
|
464
|
-
}, "value") }, { key: "assumeLead", value: /* @__PURE__ */ r(function() {
|
|
465
|
-
var t = this;
|
|
466
|
-
this.isLeader = !0;
|
|
467
|
-
var n = /* @__PURE__ */ r(function(i) {
|
|
468
|
-
var o = i.data.action;
|
|
469
|
-
o === d.APPLY && t.sendAction(d.TELL);
|
|
470
|
-
}, "o");
|
|
471
|
-
return this.channel.addEventListener("message", n), this.listeners.push(n), this.sendAction(d.TELL);
|
|
472
|
-
}, "value") }, { key: "waitForLeadership", value: /* @__PURE__ */ r(function() {
|
|
473
|
-
return this.deferred ? this.deferred : (this.deferred = this.awaitLeadership(), this.deferred);
|
|
474
|
-
}, "value") }, { key: "close", value: /* @__PURE__ */ r(function() {
|
|
475
|
-
var t = this;
|
|
476
|
-
if (!this.isDead) {
|
|
477
|
-
this.isDead = !0, this.isLeader = !1, this.sendAction(d.CLOSE);
|
|
478
|
-
try {
|
|
479
|
-
this.listeners.forEach(function(n) {
|
|
480
|
-
return t.channel.removeEventListener("message", n);
|
|
481
|
-
}), this.intervals.forEach(function(n) {
|
|
482
|
-
return V.clearInterval(n);
|
|
483
|
-
});
|
|
484
|
-
} catch {
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}, "value") }]), e;
|
|
488
|
-
})(), O;
|
|
489
|
-
(function(e) {
|
|
490
|
-
e[e.PROMPTED = 0] = "PROMPTED", e[e.ACTIVE = 1] = "ACTIVE", e[e.IDLE = 2] = "IDLE";
|
|
491
|
-
})(O || (O = {}));
|
|
492
|
-
var jn = (function() {
|
|
493
|
-
function e(t) {
|
|
494
|
-
var n = this;
|
|
495
|
-
ye(this, e), b(this, "channel", void 0), b(this, "options", void 0), b(this, "elector", void 0), b(this, "token", Rt()), b(this, "registry", /* @__PURE__ */ new Map()), b(this, "allIdle", !1), b(this, "isLastActive", !1);
|
|
496
|
-
var i = t.channelName;
|
|
497
|
-
if (this.options = t, this.channel = new Rn(i), this.registry.set(this.token, O.ACTIVE), t.leaderElection) {
|
|
498
|
-
var o = { fallbackInterval: 2e3, responseTime: 100 };
|
|
499
|
-
this.elector = new Nn(this.channel, o), this.elector.waitForLeadership();
|
|
500
|
-
}
|
|
501
|
-
this.channel.addEventListener("message", function(h) {
|
|
502
|
-
var s = h.data, a = s.action, c = s.token, l = s.data;
|
|
503
|
-
switch (a) {
|
|
504
|
-
case d.REGISTER:
|
|
505
|
-
n.registry.set(c, O.IDLE);
|
|
506
|
-
break;
|
|
507
|
-
case d.DEREGISTER:
|
|
508
|
-
n.registry.delete(c);
|
|
509
|
-
break;
|
|
510
|
-
case d.IDLE:
|
|
511
|
-
n.idle(c);
|
|
512
|
-
break;
|
|
513
|
-
case d.ACTIVE:
|
|
514
|
-
n.active(c);
|
|
515
|
-
break;
|
|
516
|
-
case d.PROMPT:
|
|
517
|
-
n.prompt(c);
|
|
518
|
-
break;
|
|
519
|
-
case d.START:
|
|
520
|
-
n.start(c);
|
|
521
|
-
break;
|
|
522
|
-
case d.RESET:
|
|
523
|
-
n.reset(c);
|
|
524
|
-
break;
|
|
525
|
-
case d.ACTIVATE:
|
|
526
|
-
n.activate(c);
|
|
527
|
-
break;
|
|
528
|
-
case d.PAUSE:
|
|
529
|
-
n.pause(c);
|
|
530
|
-
break;
|
|
531
|
-
case d.RESUME:
|
|
532
|
-
n.resume(c);
|
|
533
|
-
break;
|
|
534
|
-
case d.MESSAGE:
|
|
535
|
-
n.options.onMessage(l);
|
|
536
|
-
break;
|
|
537
|
-
}
|
|
538
|
-
}), this.send(d.REGISTER);
|
|
539
|
-
}
|
|
540
|
-
return r(e, "e"), Ye(e, [{ key: "isLeader", get: /* @__PURE__ */ r(function() {
|
|
541
|
-
if (!this.elector) throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');
|
|
542
|
-
return this.elector.isLeader;
|
|
543
|
-
}, "get") }, { key: "prompt", value: /* @__PURE__ */ r(function() {
|
|
544
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
545
|
-
this.registry.set(t, O.PROMPTED);
|
|
546
|
-
var n = _(this.registry.values()).every(function(i) {
|
|
547
|
-
return i === O.PROMPTED;
|
|
548
|
-
});
|
|
549
|
-
t === this.token && this.send(d.PROMPT), n && this.options.onPrompt();
|
|
550
|
-
}, "value") }, { key: "idle", value: /* @__PURE__ */ r(function() {
|
|
551
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
552
|
-
this.registry.set(t, O.IDLE);
|
|
553
|
-
var n = _(this.registry.values()).every(function(i) {
|
|
554
|
-
return i === O.IDLE;
|
|
555
|
-
});
|
|
556
|
-
t === this.token && this.send(d.IDLE), !this.allIdle && n && (this.allIdle = !0, this.options.onIdle());
|
|
557
|
-
}, "value") }, { key: "active", value: /* @__PURE__ */ r(function() {
|
|
558
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
559
|
-
this.allIdle = !1, this.registry.set(t, O.ACTIVE);
|
|
560
|
-
var n = _(this.registry.values()).some(function(i) {
|
|
561
|
-
return i === O.ACTIVE;
|
|
562
|
-
});
|
|
563
|
-
t === this.token && this.send(d.ACTIVE), n && this.options.onActive(), this.isLastActive = t === this.token;
|
|
564
|
-
}, "value") }, { key: "start", value: /* @__PURE__ */ r(function() {
|
|
565
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
566
|
-
this.allIdle = !1, this.registry.set(t, O.ACTIVE), t === this.token ? this.send(d.START) : this.options.start(!0), this.isLastActive = t === this.token;
|
|
567
|
-
}, "value") }, { key: "reset", value: /* @__PURE__ */ r(function() {
|
|
568
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
569
|
-
this.allIdle = !1, this.registry.set(t, O.ACTIVE), t === this.token ? this.send(d.RESET) : this.options.reset(!0), this.isLastActive = t === this.token;
|
|
570
|
-
}, "value") }, { key: "activate", value: /* @__PURE__ */ r(function() {
|
|
571
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
572
|
-
this.allIdle = !1, this.registry.set(t, O.ACTIVE), t === this.token ? this.send(d.ACTIVATE) : this.options.activate(!0), this.isLastActive = t === this.token;
|
|
573
|
-
}, "value") }, { key: "pause", value: /* @__PURE__ */ r(function() {
|
|
574
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
575
|
-
t === this.token ? this.send(d.PAUSE) : this.options.pause(!0);
|
|
576
|
-
}, "value") }, { key: "resume", value: /* @__PURE__ */ r(function() {
|
|
577
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
578
|
-
t === this.token ? this.send(d.RESUME) : this.options.resume(!0);
|
|
579
|
-
}, "value") }, { key: "message", value: /* @__PURE__ */ r(function(t) {
|
|
580
|
-
try {
|
|
581
|
-
this.channel.postMessage({ action: d.MESSAGE, token: this.token, data: t });
|
|
582
|
-
} catch {
|
|
583
|
-
}
|
|
584
|
-
}, "value") }, { key: "send", value: /* @__PURE__ */ r(function(t) {
|
|
585
|
-
try {
|
|
586
|
-
this.channel.postMessage({ action: t, token: this.token });
|
|
587
|
-
} catch {
|
|
588
|
-
}
|
|
589
|
-
}, "value") }, { key: "close", value: /* @__PURE__ */ r(function() {
|
|
590
|
-
this.options.leaderElection && this.elector.close(), this.send(d.DEREGISTER), this.channel.close();
|
|
591
|
-
}, "value") }]), e;
|
|
592
|
-
})(), _n = W ? document : null, Vn = ["mousemove", "keydown", "wheel", "DOMMouseScroll", "mousewheel", "mousedown", "touchstart", "touchmove", "MSPointerDown", "MSPointerMove", "visibilitychange", "focus"];
|
|
593
|
-
function Bn(e, t) {
|
|
594
|
-
var n = /* @__PURE__ */ r(function() {
|
|
595
|
-
for (var o = arguments.length, h = new Array(o), s = 0; s < o; s++) h[s] = arguments[s];
|
|
596
|
-
i && clearTimeout(i), i = setTimeout(function() {
|
|
597
|
-
e.apply(void 0, _(h)), i = null;
|
|
598
|
-
}, t);
|
|
599
|
-
}, "t"), i;
|
|
600
|
-
return n.cancel = function() {
|
|
601
|
-
clearTimeout(i);
|
|
602
|
-
}, n;
|
|
603
|
-
}
|
|
604
|
-
r(Bn, "tr");
|
|
605
|
-
function Be(e, t) {
|
|
606
|
-
var n = 0;
|
|
607
|
-
return function() {
|
|
608
|
-
for (var i = arguments.length, o = new Array(i), h = 0; h < i; h++) o[h] = arguments[h];
|
|
609
|
-
var s = (/* @__PURE__ */ new Date()).getTime();
|
|
610
|
-
if (!(s - n < t)) return n = s, e.apply(void 0, _(o));
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
r(Be, "Fe");
|
|
614
|
-
var E = /* @__PURE__ */ r(function() {
|
|
615
|
-
return Date.now();
|
|
616
|
-
}, "g"), ae = 2147483647;
|
|
617
|
-
function Gn() {
|
|
618
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.timeout, n = t === void 0 ? 1e3 * 60 * 20 : t, i = e.promptTimeout, o = i === void 0 ? 0 : i, h = e.promptBeforeIdle, s = h === void 0 ? 0 : h, a = e.element, c = a === void 0 ? _n : a, l = e.events, y = l === void 0 ? Vn : l, B = e.timers, G = B === void 0 ? void 0 : B, I = e.immediateEvents, T = I === void 0 ? [] : I, m = e.onPresenceChange, R = m === void 0 ? function() {
|
|
619
|
-
} : m, x = e.onPrompt, Ee = x === void 0 ? function() {
|
|
620
|
-
} : x, qe = e.onIdle, be = qe === void 0 ? function() {
|
|
621
|
-
} : qe, We = e.onActive, we = We === void 0 ? function() {
|
|
622
|
-
} : We, $e = e.onAction, Te = $e === void 0 ? function() {
|
|
623
|
-
} : $e, He = e.onMessage, se = He === void 0 ? function() {
|
|
624
|
-
} : He, Ke = e.debounce, ce = Ke === void 0 ? 0 : Ke, Xe = e.throttle, le = Xe === void 0 ? 0 : Xe, Ze = e.eventsThrottle, xe = Ze === void 0 ? 200 : Ze, Qe = e.startOnMount, fe = Qe === void 0 ? !0 : Qe, et = e.startManually, z = et === void 0 ? !1 : et, tt = e.stopOnIdle, Ae = tt === void 0 ? !1 : tt, nt = e.crossTab, ne = nt === void 0 ? !1 : nt, rt = e.name, it = rt === void 0 ? "idle-timer" : rt, ot = e.syncTimers, he = ot === void 0 ? 0 : ot, ut = e.leaderElection, at = ut === void 0 ? !1 : ut, st = e.disabled, U = st === void 0 ? !1 : st, ct = v(E()), Ie = v(E()), k = v(null), C = v(null), $ = v(0), de = v(0), F = v(0), P = v(0), p = v(!1), A = v(!1), J = v(!1), Y = v(!0), ve = v(!1), q = v(null), f = v(null), D = v(n), K = v(0);
|
|
625
|
-
w(function() {
|
|
626
|
-
if (o && console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."), s && o) throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");
|
|
627
|
-
if (n >= ae) throw new Error("❌ The value for the timeout property must fit in a 32 bit signed integer, ".concat(ae, "."));
|
|
628
|
-
if (o >= ae) throw new Error("❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ".concat(ae, "."));
|
|
629
|
-
if (s >= ae) throw new Error("❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ".concat(ae, "."));
|
|
630
|
-
if (s >= n) throw new Error("❌ The value for the promptBeforeIdle property must be less than the timeout property, ".concat(n, "."));
|
|
631
|
-
if (s ? (D.current = n - s, K.current = s) : (D.current = n, K.current = o), !Y.current) {
|
|
632
|
-
if (z || U) return;
|
|
633
|
-
p.current && (re.current(null, S), f.current && f.current.active()), ee();
|
|
634
|
-
}
|
|
635
|
-
}, [n, o, s, z, U]);
|
|
636
|
-
var lt = v(Ae);
|
|
637
|
-
w(function() {
|
|
638
|
-
lt.current = Ae;
|
|
639
|
-
}, [Ae]);
|
|
640
|
-
var ft = v(T), me = v(c), Ce = v(_(new Set(_(y).concat(_(T))).values())), N = v(U);
|
|
641
|
-
w(function() {
|
|
642
|
-
N.current = U, !Y.current && (U ? Me() : z || ee());
|
|
643
|
-
}, [U]);
|
|
644
|
-
var pe = v(R);
|
|
645
|
-
w(function() {
|
|
646
|
-
pe.current = R;
|
|
647
|
-
}, [R]);
|
|
648
|
-
var ke = v(Ee);
|
|
649
|
-
w(function() {
|
|
650
|
-
ke.current = Ee;
|
|
651
|
-
}, [Ee]);
|
|
652
|
-
var Le = v(be);
|
|
653
|
-
w(function() {
|
|
654
|
-
Le.current = be;
|
|
655
|
-
}, [be]);
|
|
656
|
-
var re = v(we);
|
|
657
|
-
w(function() {
|
|
658
|
-
re.current = we;
|
|
659
|
-
}, [we]);
|
|
660
|
-
var Se = v(Te);
|
|
661
|
-
w(function() {
|
|
662
|
-
Se.current = Te;
|
|
663
|
-
}, [Te]);
|
|
664
|
-
var ie = v(se);
|
|
665
|
-
w(function() {
|
|
666
|
-
ie.current = se;
|
|
667
|
-
}, [se]);
|
|
668
|
-
var X = tn(function() {
|
|
669
|
-
var u = /* @__PURE__ */ r(function(L, oe) {
|
|
670
|
-
return Se.current(L, oe);
|
|
671
|
-
}, "i");
|
|
672
|
-
return ce > 0 ? Bn(u, ce) : le > 0 ? Be(u, le) : u;
|
|
673
|
-
}, [le, ce]), ht = v();
|
|
674
|
-
w(function() {
|
|
675
|
-
ne && he && (ht.current = Be(function() {
|
|
676
|
-
f.current.active();
|
|
677
|
-
}, he));
|
|
678
|
-
}, [ne, he]);
|
|
679
|
-
var j = /* @__PURE__ */ r(function() {
|
|
680
|
-
q.current !== null && (V.clearTimeout(q.current), q.current = null);
|
|
681
|
-
}, "N"), Z = /* @__PURE__ */ r(function(u) {
|
|
682
|
-
var L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
683
|
-
j(), q.current = V.setTimeout(Ne, u || D.current), L && (C.current = E());
|
|
684
|
-
}, "Z"), dt = /* @__PURE__ */ r(function(u) {
|
|
685
|
-
!A.current && !p.current && (ke.current(u, S), pe.current({ type: "active", prompted: !0 }, S)), P.current = 0, F.current = E(), A.current = !0, Z(K.current, !1);
|
|
686
|
-
}, "wt"), vt = /* @__PURE__ */ r(function() {
|
|
687
|
-
j(), p.current || (Le.current(null, S), pe.current({ type: "idle" }, S)), p.current = !0, k.current = E(), lt.current ? Q() : A.current && (F.current = 0, A.current = !1);
|
|
688
|
-
}, "bt"), De = /* @__PURE__ */ r(function(u) {
|
|
689
|
-
j(), (p.current || A.current) && (re.current(u, S), pe.current({ type: "active", prompted: !1 }, S)), A.current = !1, F.current = 0, p.current = !1, $.current += E() - k.current, de.current += E() - k.current, H(), Z();
|
|
690
|
-
}, "ze"), Ne = /* @__PURE__ */ r(function(u) {
|
|
691
|
-
var L = !p.current;
|
|
692
|
-
if (L) {
|
|
693
|
-
X.cancel && X.cancel();
|
|
694
|
-
var oe = E() - C.current, Ft = D.current + K.current < oe;
|
|
695
|
-
if (!Ft && K.current > 0 && !A.current) {
|
|
696
|
-
f.current ? f.current.prompt() : dt(u);
|
|
697
|
-
return;
|
|
698
|
-
}
|
|
699
|
-
f.current ? f.current.idle() : vt();
|
|
700
|
-
return;
|
|
701
|
-
}
|
|
702
|
-
f.current ? f.current.active() : De(u);
|
|
703
|
-
}, "Je"), je = /* @__PURE__ */ r(function(u) {
|
|
704
|
-
if (!fe && !C.current && (C.current = E(), re.current(null, S)), X(u, S), !A.current) {
|
|
705
|
-
if (j(), !p.current && ft.current.includes(u.type)) {
|
|
706
|
-
Ne(u);
|
|
707
|
-
return;
|
|
708
|
-
}
|
|
709
|
-
var L = E() - C.current;
|
|
710
|
-
if (p.current && !Ae || !p.current && L >= D.current) {
|
|
711
|
-
Ne(u);
|
|
712
|
-
return;
|
|
713
|
-
}
|
|
714
|
-
J.current = !1, P.current = 0, F.current = 0, Z(), ne && he && ht.current();
|
|
715
|
-
}
|
|
716
|
-
}, "He"), Oe = v(je);
|
|
717
|
-
w(function() {
|
|
718
|
-
var u = ve.current;
|
|
719
|
-
u && Q(), xe > 0 ? Oe.current = Be(je, xe) : Oe.current = je, u && H();
|
|
720
|
-
}, [xe, le, ce, Se, ne, he]);
|
|
721
|
-
var H = /* @__PURE__ */ r(function() {
|
|
722
|
-
W && me.current && (ve.current || (Ce.current.forEach(function(u) {
|
|
723
|
-
me.current.addEventListener(u, Oe.current, { capture: !0, passive: !0 });
|
|
724
|
-
}), ve.current = !0));
|
|
725
|
-
}, "H"), Q = /* @__PURE__ */ r(function() {
|
|
726
|
-
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
727
|
-
W && me.current && (ve.current || u) && (Ce.current.forEach(function(L) {
|
|
728
|
-
me.current.removeEventListener(L, Oe.current, { capture: !0 });
|
|
729
|
-
}), ve.current = !1);
|
|
730
|
-
}, "ee"), ee = g(function(u) {
|
|
731
|
-
return N.current ? !1 : (j(), H(), p.current = !1, A.current = !1, J.current = !1, P.current = 0, F.current = 0, f.current && !u && f.current.start(), Z(), !0);
|
|
732
|
-
}, [q, p, N, D, f]), _e = g(function(u) {
|
|
733
|
-
return N.current ? !1 : (j(), H(), Ie.current = E(), $.current += E() - k.current, de.current += E() - k.current, $.current = 0, p.current = !1, A.current = !1, J.current = !1, P.current = 0, F.current = 0, f.current && !u && f.current.reset(), z || Z(), !0);
|
|
734
|
-
}, [q, p, D, z, N, f]), mt = g(function(u) {
|
|
735
|
-
return N.current ? !1 : (j(), H(), (p.current || A.current) && De(), p.current = !1, A.current = !1, J.current = !1, P.current = 0, F.current = 0, Ie.current = E(), f.current && !u && f.current.activate(), Z(), !0);
|
|
736
|
-
}, [q, p, A, N, D, f]), Me = g(function() {
|
|
737
|
-
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
738
|
-
return N.current || J.current ? !1 : (P.current = pt(), J.current = !0, Q(), j(), f.current && !u && f.current.pause(), !0);
|
|
739
|
-
}, [q, N, f]), Ve = g(function() {
|
|
740
|
-
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
741
|
-
return N.current || !J.current ? !1 : (J.current = !1, A.current || H(), p.current || Z(P.current), F.current && (F.current = E()), f.current && !u && f.current.resume(), !0);
|
|
742
|
-
}, [q, D, N, P, f]), Ct = g(function(u, L) {
|
|
743
|
-
return f.current ? (L && ie.current(u, S), f.current.message(u)) : L && ie.current(u, S), !0;
|
|
744
|
-
}, [se]), Dt = g(function() {
|
|
745
|
-
return p.current;
|
|
746
|
-
}, [p]), Nt = g(function() {
|
|
747
|
-
return A.current;
|
|
748
|
-
}, [A]), jt = g(function() {
|
|
749
|
-
return f.current ? f.current.isLeader : null;
|
|
750
|
-
}, [f]), _t = g(function() {
|
|
751
|
-
return f.current ? f.current.isLastActive : null;
|
|
752
|
-
}, [f]), Vt = g(function() {
|
|
753
|
-
return f.current ? f.current.token : null;
|
|
754
|
-
}, [f]), pt = g(function() {
|
|
755
|
-
if (J.current) return P.current;
|
|
756
|
-
var u = P.current ? P.current : K.current + D.current, L = C.current ? E() - C.current : 0, oe = Math.floor(u - L);
|
|
757
|
-
return oe < 0 ? 0 : Math.abs(oe);
|
|
758
|
-
}, [D, K, A, P, C]), gt = g(function() {
|
|
759
|
-
return Math.round(E() - Ie.current);
|
|
760
|
-
}, [Ie]), yt = g(function() {
|
|
761
|
-
return Math.round(E() - ct.current);
|
|
762
|
-
}, [ct]), Bt = g(function() {
|
|
763
|
-
return k.current ? new Date(k.current) : null;
|
|
764
|
-
}, [k]), Gt = g(function() {
|
|
765
|
-
return C.current ? new Date(C.current) : null;
|
|
766
|
-
}, [C]), Et = g(function() {
|
|
767
|
-
return p.current ? Math.round(E() - k.current + $.current) : Math.round($.current);
|
|
768
|
-
}, [k, $]), bt = g(function() {
|
|
769
|
-
return p.current ? Math.round(E() - k.current + de.current) : Math.round(de.current);
|
|
770
|
-
}, [k, de]), Ut = g(function() {
|
|
771
|
-
var u = Math.round(gt() - Et());
|
|
772
|
-
return u >= 0 ? u : 0;
|
|
773
|
-
}, [k, $]), zt = g(function() {
|
|
774
|
-
var u = Math.round(yt() - bt());
|
|
775
|
-
return u >= 0 ? u : 0;
|
|
776
|
-
}, [k, $]);
|
|
777
|
-
w(function() {
|
|
778
|
-
if (ce > 0 && le > 0) throw new Error("❌ onAction can either be throttled or debounced, not both.");
|
|
779
|
-
G && Mn(G);
|
|
780
|
-
var u = /* @__PURE__ */ r(function() {
|
|
781
|
-
f.current && f.current.close(), X.cancel && X.cancel(), j(), Q(!0);
|
|
782
|
-
}, "i");
|
|
783
|
-
return W && window.addEventListener("beforeunload", u), function() {
|
|
784
|
-
W && window.removeEventListener("beforeunload", u), f.current && f.current.close(), X.cancel && X.cancel(), j(), Q(!0);
|
|
785
|
-
};
|
|
786
|
-
}, []), w(function() {
|
|
787
|
-
f.current && f.current.close(), ne ? f.current = new jn({ channelName: it, leaderElection: at, onPrompt: /* @__PURE__ */ r(function() {
|
|
788
|
-
dt();
|
|
789
|
-
}, "onPrompt"), onIdle: /* @__PURE__ */ r(function() {
|
|
790
|
-
vt();
|
|
791
|
-
}, "onIdle"), onActive: /* @__PURE__ */ r(function() {
|
|
792
|
-
De();
|
|
793
|
-
}, "onActive"), onMessage: /* @__PURE__ */ r(function(u) {
|
|
794
|
-
ie.current(u, S);
|
|
795
|
-
}, "onMessage"), start: ee, reset: _e, activate: mt, pause: Me, resume: Ve }) : f.current = null;
|
|
796
|
-
}, [ne, it, at, ke, Le, re, ie, ee, _e, Me, Ve]), w(function() {
|
|
797
|
-
Y.current || (j(), Q(!0)), !(z || U) && (fe ? ee() : H());
|
|
798
|
-
}, [z, fe, U, Y]), w(function() {
|
|
799
|
-
if (!Y.current) {
|
|
800
|
-
var u = _(new Set(_(y).concat(_(T))).values());
|
|
801
|
-
if (Q(), Ce.current = u, me.current = c, ft.current = T, z || U) return;
|
|
802
|
-
fe ? ee() : H();
|
|
803
|
-
}
|
|
804
|
-
}, [c, JSON.stringify(y), JSON.stringify(T), Y, U, z, fe]), w(function() {
|
|
805
|
-
Y.current && (Y.current = !1);
|
|
806
|
-
}, [Y]);
|
|
807
|
-
var S = { message: Ct, start: ee, reset: _e, activate: mt, pause: Me, resume: Ve, isIdle: Dt, isPrompted: Nt, isLeader: jt, isLastActiveTab: _t, getTabId: Vt, getRemainingTime: pt, getElapsedTime: gt, getTotalElapsedTime: yt, getLastIdleTime: Bt, getLastActiveTime: Gt, getIdleTime: Et, getTotalIdleTime: bt, getActiveTime: Ut, getTotalActiveTime: zt, setOnPresenceChange: /* @__PURE__ */ r(function(u) {
|
|
808
|
-
R = u, pe.current = u;
|
|
809
|
-
}, "setOnPresenceChange"), setOnPrompt: /* @__PURE__ */ r(function(u) {
|
|
810
|
-
Ee = u, ke.current = u;
|
|
811
|
-
}, "setOnPrompt"), setOnIdle: /* @__PURE__ */ r(function(u) {
|
|
812
|
-
be = u, Le.current = u;
|
|
813
|
-
}, "setOnIdle"), setOnActive: /* @__PURE__ */ r(function(u) {
|
|
814
|
-
we = u, re.current = u;
|
|
815
|
-
}, "setOnActive"), setOnAction: /* @__PURE__ */ r(function(u) {
|
|
816
|
-
Te = u, Se.current = u;
|
|
817
|
-
}, "setOnAction"), setOnMessage: /* @__PURE__ */ r(function(u) {
|
|
818
|
-
se = u, ie.current = u;
|
|
819
|
-
}, "setOnMessage") };
|
|
820
|
-
return S;
|
|
821
|
-
}
|
|
822
|
-
r(Gn, "Te");
|
|
823
|
-
var Un = en(null);
|
|
824
|
-
Un.Consumer;
|
|
825
|
-
const At = 6e4, zn = 36e5, It = "/auth/login";
|
|
826
|
-
function Fn(e) {
|
|
827
|
-
return Pe(e) ? Math.floor(e / 1e3) : "";
|
|
828
|
-
}
|
|
829
|
-
r(Fn, "millisToSeconds");
|
|
830
|
-
function ir({ timeout: e }) {
|
|
831
|
-
const t = on(), { pathname: n } = un(), { t: i } = Fe(), { confirmInfo: o } = qt(), { resetStorage: h } = rn(), [s, a] = Ge(!1), [c, l] = Ge(null), y = v(!1), { getRemainingTime: B, reset: G } = Gn({
|
|
832
|
-
timeout: e ?? zn,
|
|
833
|
-
events: [
|
|
834
|
-
"mousemove",
|
|
835
|
-
"keydown",
|
|
836
|
-
"wheel",
|
|
837
|
-
"DOMMouseScroll",
|
|
838
|
-
"mousewheel",
|
|
839
|
-
"mousedown",
|
|
840
|
-
"touchstart",
|
|
841
|
-
"touchmove",
|
|
842
|
-
"MSPointerDown",
|
|
843
|
-
"MSPointerMove",
|
|
844
|
-
"visibilitychange"
|
|
845
|
-
],
|
|
846
|
-
throttle: 500
|
|
847
|
-
});
|
|
848
|
-
w(() => {
|
|
849
|
-
const m = setInterval(() => {
|
|
850
|
-
l(B());
|
|
851
|
-
}, 500);
|
|
852
|
-
return () => {
|
|
853
|
-
clearInterval(m);
|
|
854
|
-
};
|
|
855
|
-
}, [B]);
|
|
856
|
-
const I = g(() => {
|
|
857
|
-
a(!1), G();
|
|
858
|
-
}, [G]), T = g(async () => {
|
|
859
|
-
y.current || (y.current = !0, l(null), a(!1), await o({
|
|
860
|
-
title: i("Message.로그인 페이지로 이동합니다.", {
|
|
861
|
-
defaultValue: "로그인 페이지로 이동합니다."
|
|
862
|
-
})
|
|
863
|
-
}), h(), t(It));
|
|
864
|
-
}, [o, t, h, i]);
|
|
865
|
-
return w(() => {
|
|
866
|
-
if (n === It) {
|
|
867
|
-
a(!1);
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
if (!s && Pe(c) && c > 0 && c <= At) {
|
|
871
|
-
a(!0);
|
|
872
|
-
return;
|
|
873
|
-
}
|
|
874
|
-
if (s && Pe(c) && c > At) {
|
|
875
|
-
I();
|
|
876
|
-
return;
|
|
877
|
-
}
|
|
878
|
-
Pe(c) && c <= 0 && T();
|
|
879
|
-
}, [s, c, n, I, T]), /* @__PURE__ */ M(
|
|
880
|
-
Je,
|
|
881
|
-
{
|
|
882
|
-
title: i("Title.로그인 연장", { defaultValue: "로그인 연장" }),
|
|
883
|
-
canConfirm: !1,
|
|
884
|
-
open: s,
|
|
885
|
-
onClose: /* @__PURE__ */ r(() => I(), "onClose"),
|
|
886
|
-
maxWidth: "xs",
|
|
887
|
-
fullWidth: !0,
|
|
888
|
-
children: /* @__PURE__ */ M(kt, { variant: "h6", children: i("Message.자동 로그아웃 남은 시간 안내", {
|
|
889
|
-
defaultValue: "{{seconds}}초 후 로그인 페이지로 이동합니다.",
|
|
890
|
-
seconds: Fn(c)
|
|
891
|
-
}) })
|
|
892
|
-
}
|
|
893
|
-
);
|
|
894
|
-
}
|
|
895
|
-
r(ir, "OwpAutoLogoutDialog");
|
|
896
|
-
function xt(e) {
|
|
897
|
-
var t, n, i = "";
|
|
898
|
-
if (typeof e == "string" || typeof e == "number") i += e;
|
|
899
|
-
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
900
|
-
var o = e.length;
|
|
901
|
-
for (t = 0; t < o; t++) e[t] && (n = xt(e[t])) && (i && (i += " "), i += n);
|
|
902
|
-
} else for (n in e) e[n] && (i && (i += " "), i += n);
|
|
903
|
-
return i;
|
|
904
|
-
}
|
|
905
|
-
r(xt, "r");
|
|
906
|
-
function Jn() {
|
|
907
|
-
for (var e, t, n = 0, i = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = xt(e)) && (i && (i += " "), i += t);
|
|
908
|
-
return i;
|
|
909
|
-
}
|
|
910
|
-
r(Jn, "clsx");
|
|
911
|
-
function or(e) {
|
|
912
|
-
const { delay: t = 0, className: n } = e, [i, o] = Ge(!t);
|
|
913
|
-
return Wt(() => {
|
|
914
|
-
o(!0);
|
|
915
|
-
}, t), /* @__PURE__ */ ge(
|
|
916
|
-
"div",
|
|
917
|
-
{
|
|
918
|
-
className: Jn(
|
|
919
|
-
n,
|
|
920
|
-
"flex flex-1 h-full w-full self-center flex-col items-center justify-center p-24",
|
|
921
|
-
i ? "" : "hidden"
|
|
922
|
-
),
|
|
923
|
-
children: [
|
|
924
|
-
/* @__PURE__ */ M(sn, { className: "-mb-16 text-md font-medium sm:text-xl", color: "text.secondary" }),
|
|
925
|
-
/* @__PURE__ */ ge(
|
|
926
|
-
an,
|
|
927
|
-
{
|
|
928
|
-
id: "spinner",
|
|
929
|
-
sx: {
|
|
930
|
-
"& > div": {
|
|
931
|
-
backgroundColor: "palette.secondary.main"
|
|
932
|
-
}
|
|
933
|
-
},
|
|
934
|
-
children: [
|
|
935
|
-
/* @__PURE__ */ M("div", { className: "bounce1" }),
|
|
936
|
-
/* @__PURE__ */ M("div", { className: "bounce2" }),
|
|
937
|
-
/* @__PURE__ */ M("div", { className: "bounce3" })
|
|
938
|
-
]
|
|
939
|
-
}
|
|
940
|
-
)
|
|
941
|
-
]
|
|
942
|
-
}
|
|
943
|
-
);
|
|
944
|
-
}
|
|
945
|
-
r(or, "OwpLoading");
|
|
946
|
-
const ur = /* @__PURE__ */ r(({ loading: e, title: t }) => {
|
|
947
|
-
const { t: n } = Fe(), i = t ?? n("Common.로딩 중...");
|
|
948
|
-
return /* @__PURE__ */ ge(
|
|
949
|
-
cn,
|
|
950
|
-
{
|
|
951
|
-
className: "flex flex-1 flex-col space-y-12",
|
|
952
|
-
sx: /* @__PURE__ */ r((o) => ({ color: "#fff", zIndex: o.zIndex.tooltip + 1 }), "sx"),
|
|
953
|
-
open: !!e,
|
|
954
|
-
children: [
|
|
955
|
-
/* @__PURE__ */ M(ln, { color: "inherit" }),
|
|
956
|
-
i && /* @__PURE__ */ M(kt, { variant: "h6", children: i })
|
|
957
|
-
]
|
|
958
|
-
}
|
|
959
|
-
);
|
|
960
|
-
}, "OwpPageLockLoading"), ar = fn(/* @__PURE__ */ Yt.jsx("path", {
|
|
961
|
-
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
962
|
-
}), "Close");
|
|
963
|
-
export {
|
|
964
|
-
ar as C,
|
|
965
|
-
or as O,
|
|
966
|
-
ur as a,
|
|
967
|
-
ir as b,
|
|
968
|
-
Jn as c,
|
|
969
|
-
Je as d,
|
|
970
|
-
rr as e,
|
|
971
|
-
Pe as i
|
|
972
|
-
};
|
|
973
|
-
//# sourceMappingURL=Close-C91nHTKM.js.map
|