@bwg-ui/core 1.2.9 → 1.2.12

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.
Files changed (122) hide show
  1. package/dist/chunks/{MenuReport-CuAfCZbc.cjs → MenuReport-Bqeps5fC.cjs} +1 -1
  2. package/dist/chunks/{MenuReport-iuRC_snf.js → MenuReport-CozV1tpR.js} +28 -28
  3. package/dist/chunks/common-components-B-zgrX-L.cjs +1028 -0
  4. package/dist/chunks/common-components-XA2KG7Pl.js +30179 -0
  5. package/dist/chunks/{layout-components-C-9ATcL9.js → layout-components-MrnKV5g7.js} +548 -478
  6. package/dist/chunks/layout-components-bb0cWC3I.cjs +35 -0
  7. package/dist/components/common/BwgGrid.d.ts +1 -1
  8. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  9. package/dist/components/common/BwgView.d.ts +9 -3
  10. package/dist/components/common/BwgView.d.ts.map +1 -1
  11. package/dist/components/common/index.cjs +1 -1
  12. package/dist/components/common/index.d.ts +1 -1
  13. package/dist/components/common/index.d.ts.map +1 -1
  14. package/dist/components/common/index.js +5 -5
  15. package/dist/components/core/index.cjs +1 -1
  16. package/dist/components/core/index.js +200 -200
  17. package/dist/components/guide/BwgPracticeGuide.d.ts +6 -0
  18. package/dist/components/guide/BwgPracticeGuide.d.ts.map +1 -0
  19. package/dist/components/guide/BwgPracticeGuideS00.d.ts +6 -0
  20. package/dist/components/guide/BwgPracticeGuideS00.d.ts.map +1 -0
  21. package/dist/components/guide/BwgPracticeGuideS01.d.ts +6 -0
  22. package/dist/components/guide/BwgPracticeGuideS01.d.ts.map +1 -0
  23. package/dist/components/guide/CMHldyCfg.d.ts +3 -0
  24. package/dist/components/guide/CMHldyCfg.d.ts.map +1 -0
  25. package/dist/components/guide/index.cjs +1 -1
  26. package/dist/components/guide/index.d.ts +2 -0
  27. package/dist/components/guide/index.d.ts.map +1 -1
  28. package/dist/components/guide/index.js +645 -5
  29. package/dist/components/layout/BwgCoreLogin.d.ts +38 -0
  30. package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -0
  31. package/dist/components/layout/custom/ConfigurableHeader.d.ts.map +1 -1
  32. package/dist/components/layout/index.cjs +1 -1
  33. package/dist/components/layout/index.d.ts +1 -0
  34. package/dist/components/layout/index.d.ts.map +1 -1
  35. package/dist/components/layout/index.js +13 -11
  36. package/dist/components/pages/auth/CMAuthMstrM01.d.ts +6 -0
  37. package/dist/components/pages/auth/CMAuthMstrM01.d.ts.map +1 -0
  38. package/dist/components/pages/auth/CMRoleMstrM01.d.ts +4 -0
  39. package/dist/components/pages/auth/CMRoleMstrM01.d.ts.map +1 -0
  40. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +3 -0
  41. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +1 -0
  42. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +3 -0
  43. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +1 -0
  44. package/dist/components/pages/guide/BwgReactGuideM01.d.ts +3 -0
  45. package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +1 -0
  46. package/dist/components/pages/index.d.ts +20 -0
  47. package/dist/components/pages/index.d.ts.map +1 -0
  48. package/dist/components/pages/rsrc/CMFileMstrM01.d.ts +4 -0
  49. package/dist/components/pages/rsrc/CMFileMstrM01.d.ts.map +1 -0
  50. package/dist/components/pages/rsrc/CMMenuMstrM01.d.ts +4 -0
  51. package/dist/components/pages/rsrc/CMMenuMstrM01.d.ts.map +1 -0
  52. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts +16 -0
  53. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +1 -0
  54. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts +16 -0
  55. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +1 -0
  56. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts +4 -0
  57. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -0
  58. package/dist/components/pages/rsrc/CMPrgrMstrM01.d.ts +4 -0
  59. package/dist/components/pages/rsrc/CMPrgrMstrM01.d.ts.map +1 -0
  60. package/dist/components/pages/syst/CMSystCfgM01.d.ts +4 -0
  61. package/dist/components/pages/syst/CMSystCfgM01.d.ts.map +1 -0
  62. package/dist/components/pages/syst/CMSystCodeM01.d.ts +4 -0
  63. package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +1 -0
  64. package/dist/components/pages/types.d.ts +5 -0
  65. package/dist/components/pages/types.d.ts.map +1 -0
  66. package/dist/components/pages/user/CMUserMstrM01.d.ts +4 -0
  67. package/dist/components/pages/user/CMUserMstrM01.d.ts.map +1 -0
  68. package/dist/components/popup/SearchAddressModalM01.d.ts +7 -0
  69. package/dist/components/popup/SearchAddressModalM01.d.ts.map +1 -0
  70. package/dist/components/popup/SearchHolidayP01.d.ts +4 -0
  71. package/dist/components/popup/SearchHolidayP01.d.ts.map +1 -0
  72. package/dist/components/popup/index.cjs +1 -1
  73. package/dist/components/popup/index.d.ts +2 -1
  74. package/dist/components/popup/index.d.ts.map +1 -1
  75. package/dist/components/popup/index.js +4 -3
  76. package/dist/index.cjs +1 -1
  77. package/dist/index.d.ts +1 -0
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +256 -238
  80. package/dist/stores/favoriteStore.d.ts +10 -9
  81. package/dist/stores/favoriteStore.d.ts.map +1 -1
  82. package/dist/stores/index.cjs +2 -2
  83. package/dist/stores/index.d.ts +4 -0
  84. package/dist/stores/index.d.ts.map +1 -1
  85. package/dist/stores/index.js +1129 -631
  86. package/dist/stores/loginStore.d.ts +64 -0
  87. package/dist/stores/loginStore.d.ts.map +1 -0
  88. package/dist/stores/menuModelStore.d.ts +1 -1
  89. package/dist/stores/menuViewStore.d.ts +1 -0
  90. package/dist/stores/menuViewStore.d.ts.map +1 -1
  91. package/dist/stores/systemStore.d.ts +32 -0
  92. package/dist/stores/systemStore.d.ts.map +1 -0
  93. package/dist/stores/userStore.d.ts +5 -5
  94. package/dist/stores/userStore.d.ts.map +1 -1
  95. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  96. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  97. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  98. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  99. package/dist/types/bwg-global.d.ts +2 -1
  100. package/dist/utils/apiUtils.d.ts +27 -60
  101. package/dist/utils/apiUtils.d.ts.map +1 -1
  102. package/dist/utils/commonUtils.d.ts +0 -6
  103. package/dist/utils/commonUtils.d.ts.map +1 -1
  104. package/dist/utils/gwUtils.d.ts +3 -2
  105. package/dist/utils/gwUtils.d.ts.map +1 -1
  106. package/dist/utils/index.cjs +1 -1
  107. package/dist/utils/index.d.ts +3 -7
  108. package/dist/utils/index.d.ts.map +1 -1
  109. package/dist/utils/index.js +1628 -1017
  110. package/dist/utils/serviceConfig.d.ts +1 -0
  111. package/dist/utils/serviceConfig.d.ts.map +1 -1
  112. package/dist/utils/userUtils.d.ts.map +1 -1
  113. package/package.json +1 -1
  114. package/dist/chunks/common-components-CFIJNFN0.js +0 -16236
  115. package/dist/chunks/common-components-CioS_8Bi.cjs +0 -183
  116. package/dist/chunks/core-CA7iRgyb.cjs +0 -1
  117. package/dist/chunks/core-D18HD1It.js +0 -513
  118. package/dist/chunks/enc-base64-CdWu8KMI.js +0 -101
  119. package/dist/chunks/enc-base64-DSIiAsI5.cjs +0 -1
  120. package/dist/chunks/layout-components-DMR4tl9_.cjs +0 -35
  121. package/dist/chunks/sha256-D5iKSlK6.cjs +0 -1
  122. package/dist/chunks/sha256-DQcqzuys.js +0 -78
@@ -1,9 +1,35 @@
1
- import ee from "axios";
2
- import C from "dayjs";
3
- import { g as te } from "../chunks/common-components-CFIJNFN0.js";
4
- import { notification as U, message as E } from "antd";
5
- import { useUserStore as T, useMenuViewStore as le, useLoadingStore as X, usePopupLoadingStore as Q } from "../stores/index.js";
6
- const de = {
1
+ import { message as B, notification as U } from "antd";
2
+ import { useUserStore as k, useSystemCode as Xt, useMenuViewStore as Qt, useLoadingStore as nt, usePopupLoadingStore as ot } from "../stores/index.js";
3
+ import at from "axios";
4
+ import { g as te, c as rt, a as L } from "../chunks/common-components-XA2KG7Pl.js";
5
+ import M from "dayjs";
6
+ const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
+ __proto__: null,
8
+ get ApiError() {
9
+ return O;
10
+ },
11
+ get apiGet() {
12
+ return Sn;
13
+ },
14
+ get callService() {
15
+ return P;
16
+ },
17
+ get callServiceBySysCd() {
18
+ return xn;
19
+ },
20
+ get getClientIp() {
21
+ return Wt;
22
+ },
23
+ get getPermissionService() {
24
+ return Cn;
25
+ },
26
+ get setClientIp() {
27
+ return Vt;
28
+ },
29
+ get verifyClientIp() {
30
+ return wn;
31
+ }
32
+ }, Symbol.toStringTag, { value: "Module" })), yt = {
7
33
  // 권한 관련
8
34
  AUTH_BTNS: "SCMSIGN00202",
9
35
  // 버튼 권한 조회
@@ -15,441 +41,1081 @@ const de = {
15
41
  SRCH_POPU: "SCMPOPU00101",
16
42
  // 팝업 조회
17
43
  // 즐겨찾기 관련
18
- AUTH_BMRK: "SCMBMRK00101"
44
+ AUTH_BMRK: "SCMBMRK00101",
19
45
  // 즐겨찾기 관리
46
+ SYST_CODE: "SCMSYST00101"
47
+ // 시스템 코드 조회
20
48
  };
21
- let H = {};
22
- function Le(e) {
23
- H = e, console.log("🔧 Provider 서비스코드 오버라이드 설정:", e);
49
+ let F = {};
50
+ function ee(t) {
51
+ F = t, console.log("🔧 Provider 서비스코드 오버라이드 설정:", t);
24
52
  }
25
- function me(e) {
26
- return H[e] && H[e].trim() !== "" ? H[e] : de[e];
53
+ function vt(t) {
54
+ return F[t] && F[t].trim() !== "" ? F[t] : yt[t];
27
55
  }
28
- function fe() {
29
- const e = {};
30
- for (const t of Object.keys(de))
31
- e[t] = me(t);
32
- return e;
56
+ function wt() {
57
+ const t = {};
58
+ for (const e of Object.keys(yt))
59
+ t[e] = vt(e);
60
+ return t;
33
61
  }
34
- function Fe() {
62
+ function re() {
35
63
  console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
36
- const e = fe();
37
- for (const [t, r] of Object.entries(e)) {
38
- const o = H[t] ? "Provider 설정" : "기본값";
39
- console.log(` ${t}: ${r} (${o})`);
64
+ const t = wt();
65
+ for (const [e, r] of Object.entries(t)) {
66
+ const n = F[e] ? "Provider 설정" : "기본값";
67
+ console.log(` ${e}: ${r} (${n})`);
40
68
  }
41
69
  }
42
- const he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70
+ const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43
71
  __proto__: null,
44
- getAllServiceCodes: fe,
45
- getServiceCode: me,
46
- logServiceCodeConfig: Fe,
47
- setServiceCodeOverrides: Le
48
- }, Symbol.toStringTag, { value: "Module" })), ge = () => T.getState().user?.crprCd || null, pe = () => {
49
- const e = T.getState().user;
50
- return T.getState().hrInfo?.empNo || e?.userId || null;
51
- }, ye = () => T.getState().user?.userNm || null, He = () => T.getState().user?.userDvsn || null, Re = () => T.getState().user?.emplNo || null, we = () => {
52
- const e = T.getState().hrInfo, t = T.getState().user;
53
- return e?.deptCd || t?.dprtCd || null;
54
- }, Se = () => T.getState().user?.dprtNm || null, K = () => T.getState().user?.roleList || null, je = (e) => {
55
- const t = K();
56
- return t ? t.includes(e) : !1;
57
- }, Ve = (e) => {
58
- const t = K();
59
- return t ? e.some((r) => t.includes(r)) : !1;
60
- }, ze = (e) => {
61
- const t = K();
62
- return t ? e.every((r) => t.includes(r)) : !1;
63
- }, Be = () => T.getState().isLoggedIn, L = () => T.getState().user, We = () => L() !== null, qe = () => {
64
- const e = ye(), t = pe();
65
- return e || t || null;
66
- }, Ke = () => {
67
- const e = Se(), t = we();
68
- return e || (t ? String(t) : null);
69
- }, F = () => T.getState().hrInfo, Ge = () => F()?.jbpsCd || null, Je = () => F()?.jbgdCd || null, Ze = () => F()?.jbdtCd || null, Xe = () => F()?.jbkdCd || null, Qe = () => F()?.wkplCd || null, Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
72
+ getAllServiceCodes: wt,
73
+ getServiceCode: vt,
74
+ logServiceCodeConfig: re,
75
+ setServiceCodeOverrides: ee
76
+ }, Symbol.toStringTag, { value: "Module" })), V = () => k.getState().user?.crprCd || null, xt = () => {
77
+ const t = k.getState().user;
78
+ return k.getState().hrInfo?.empNo || t?.userId || null;
79
+ }, Ct = () => k.getState().user?.userNm || null, ne = () => k.getState().user?.userDvsn || null, oe = () => k.getState().user?.emplNo || null, bt = () => {
80
+ const t = k.getState().hrInfo, e = k.getState().user;
81
+ return t?.deptCd || e?.dprtCd || null;
82
+ }, $t = () => k.getState().user?.dprtNm || null, Q = () => k.getState().user?.roleList || null, se = (t) => {
83
+ const e = Q();
84
+ return e ? e.includes(t) : !1;
85
+ }, ae = (t) => {
86
+ const e = Q();
87
+ return e ? t.some((r) => e.includes(r)) : !1;
88
+ }, ie = (t) => {
89
+ const e = Q();
90
+ return e ? t.every((r) => e.includes(r)) : !1;
91
+ }, ce = () => k.getState().isLoggedIn(), z = () => k.getState().user, ue = () => z() !== null, le = () => {
92
+ const t = Ct(), e = xt();
93
+ return t || e || null;
94
+ }, de = () => {
95
+ const t = $t(), e = bt();
96
+ return t || (e ? String(e) : null);
97
+ }, R = () => k.getState().hrInfo, fe = () => R()?.jbpsCd || null, he = () => R()?.jbgdCd || null, me = () => R()?.jbdtCd || null, pe = () => R()?.jbkdCd || null, ge = () => R()?.wkplCd || null, _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70
98
  __proto__: null,
71
- getCrprCd: ge,
72
- getDepartmentInfo: Ke,
73
- getDisplayName: qe,
74
- getDprtCd: we,
75
- getDprtNm: Se,
76
- getEmplNo: Re,
77
- getHrInfo: F,
78
- getJbdtCd: Ze,
79
- getJbgdCd: Je,
80
- getJbkdCd: Xe,
81
- getJbpsCd: Ge,
82
- getRoleList: K,
83
- getUserDvsn: He,
84
- getUserId: pe,
85
- getUserInfo: L,
86
- getUserNm: ye,
87
- getWkplCd: Qe,
88
- hasAllRoles: ze,
89
- hasAnyRole: Ve,
90
- hasRole: je,
91
- hasUserInfo: We,
92
- isLoggedIn: Be
99
+ getCrprCd: V,
100
+ getDepartmentInfo: de,
101
+ getDisplayName: le,
102
+ getDprtCd: bt,
103
+ getDprtNm: $t,
104
+ getEmplNo: oe,
105
+ getHrInfo: R,
106
+ getJbdtCd: me,
107
+ getJbgdCd: he,
108
+ getJbkdCd: pe,
109
+ getJbpsCd: fe,
110
+ getRoleList: Q,
111
+ getUserDvsn: ne,
112
+ getUserId: xt,
113
+ getUserInfo: z,
114
+ getUserNm: Ct,
115
+ getWkplCd: ge,
116
+ hasAllRoles: ie,
117
+ hasAnyRole: ae,
118
+ hasRole: se,
119
+ hasUserInfo: ue,
120
+ isLoggedIn: ce
93
121
  }, Symbol.toStringTag, { value: "Module" }));
94
- var z = { exports: {} }, et = z.exports, ie;
95
- function tt() {
96
- return ie || (ie = 1, (function(e, t) {
97
- (function(r, o) {
98
- e.exports = o();
99
- })(et, (function() {
100
- return function(r, o, n) {
122
+ var W = { exports: {} };
123
+ function ye(t) {
124
+ throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
125
+ }
126
+ var q = { exports: {} };
127
+ const ve = {}, we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
128
+ __proto__: null,
129
+ default: ve
130
+ }, Symbol.toStringTag, { value: "Module" })), Se = /* @__PURE__ */ te(we);
131
+ var xe = q.exports, lt;
132
+ function Mt() {
133
+ return lt || (lt = 1, (function(t, e) {
134
+ (function(r, n) {
135
+ t.exports = n();
136
+ })(xe, function() {
137
+ var r = r || (function(n, u) {
138
+ var l;
139
+ if (typeof window < "u" && window.crypto && (l = window.crypto), typeof self < "u" && self.crypto && (l = self.crypto), typeof globalThis < "u" && globalThis.crypto && (l = globalThis.crypto), !l && typeof window < "u" && window.msCrypto && (l = window.msCrypto), !l && typeof rt < "u" && rt.crypto && (l = rt.crypto), !l && typeof ye == "function")
140
+ try {
141
+ l = Se;
142
+ } catch {
143
+ }
144
+ var g = function() {
145
+ if (l) {
146
+ if (typeof l.getRandomValues == "function")
147
+ try {
148
+ return l.getRandomValues(new Uint32Array(1))[0];
149
+ } catch {
150
+ }
151
+ if (typeof l.randomBytes == "function")
152
+ try {
153
+ return l.randomBytes(4).readInt32LE();
154
+ } catch {
155
+ }
156
+ }
157
+ throw new Error("Native crypto module could not be used to get secure random number.");
158
+ }, b = Object.create || /* @__PURE__ */ (function() {
159
+ function o() {
160
+ }
161
+ return function(a) {
162
+ var i;
163
+ return o.prototype = a, i = new o(), o.prototype = null, i;
164
+ };
165
+ })(), p = {}, y = p.lib = {}, w = y.Base = /* @__PURE__ */ (function() {
166
+ return {
167
+ /**
168
+ * Creates a new object that inherits from this object.
169
+ *
170
+ * @param {Object} overrides Properties to copy into the new object.
171
+ *
172
+ * @return {Object} The new object.
173
+ *
174
+ * @static
175
+ *
176
+ * @example
177
+ *
178
+ * var MyType = CryptoJS.lib.Base.extend({
179
+ * field: 'value',
180
+ *
181
+ * method: function () {
182
+ * }
183
+ * });
184
+ */
185
+ extend: function(o) {
186
+ var a = b(this);
187
+ return o && a.mixIn(o), (!a.hasOwnProperty("init") || this.init === a.init) && (a.init = function() {
188
+ a.$super.init.apply(this, arguments);
189
+ }), a.init.prototype = a, a.$super = this, a;
190
+ },
191
+ /**
192
+ * Extends this object and runs the init method.
193
+ * Arguments to create() will be passed to init().
194
+ *
195
+ * @return {Object} The new object.
196
+ *
197
+ * @static
198
+ *
199
+ * @example
200
+ *
201
+ * var instance = MyType.create();
202
+ */
203
+ create: function() {
204
+ var o = this.extend();
205
+ return o.init.apply(o, arguments), o;
206
+ },
207
+ /**
208
+ * Initializes a newly created object.
209
+ * Override this method to add some logic when your objects are created.
210
+ *
211
+ * @example
212
+ *
213
+ * var MyType = CryptoJS.lib.Base.extend({
214
+ * init: function () {
215
+ * // ...
216
+ * }
217
+ * });
218
+ */
219
+ init: function() {
220
+ },
221
+ /**
222
+ * Copies properties into this object.
223
+ *
224
+ * @param {Object} properties The properties to mix in.
225
+ *
226
+ * @example
227
+ *
228
+ * MyType.mixIn({
229
+ * field: 'value'
230
+ * });
231
+ */
232
+ mixIn: function(o) {
233
+ for (var a in o)
234
+ o.hasOwnProperty(a) && (this[a] = o[a]);
235
+ o.hasOwnProperty("toString") && (this.toString = o.toString);
236
+ },
237
+ /**
238
+ * Creates a copy of this object.
239
+ *
240
+ * @return {Object} The clone.
241
+ *
242
+ * @example
243
+ *
244
+ * var clone = instance.clone();
245
+ */
246
+ clone: function() {
247
+ return this.init.prototype.extend(this);
248
+ }
249
+ };
250
+ })(), v = y.WordArray = w.extend({
251
+ /**
252
+ * Initializes a newly created word array.
253
+ *
254
+ * @param {Array} words (Optional) An array of 32-bit words.
255
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
256
+ *
257
+ * @example
258
+ *
259
+ * var wordArray = CryptoJS.lib.WordArray.create();
260
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
261
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
262
+ */
263
+ init: function(o, a) {
264
+ o = this.words = o || [], a != u ? this.sigBytes = a : this.sigBytes = o.length * 4;
265
+ },
266
+ /**
267
+ * Converts this word array to a string.
268
+ *
269
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
270
+ *
271
+ * @return {string} The stringified word array.
272
+ *
273
+ * @example
274
+ *
275
+ * var string = wordArray + '';
276
+ * var string = wordArray.toString();
277
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
278
+ */
279
+ toString: function(o) {
280
+ return (o || f).stringify(this);
281
+ },
282
+ /**
283
+ * Concatenates a word array to this word array.
284
+ *
285
+ * @param {WordArray} wordArray The word array to append.
286
+ *
287
+ * @return {WordArray} This word array.
288
+ *
289
+ * @example
290
+ *
291
+ * wordArray1.concat(wordArray2);
292
+ */
293
+ concat: function(o) {
294
+ var a = this.words, i = o.words, d = this.sigBytes, x = o.sigBytes;
295
+ if (this.clamp(), d % 4)
296
+ for (var C = 0; C < x; C++) {
297
+ var $ = i[C >>> 2] >>> 24 - C % 4 * 8 & 255;
298
+ a[d + C >>> 2] |= $ << 24 - (d + C) % 4 * 8;
299
+ }
300
+ else
301
+ for (var _ = 0; _ < x; _ += 4)
302
+ a[d + _ >>> 2] = i[_ >>> 2];
303
+ return this.sigBytes += x, this;
304
+ },
305
+ /**
306
+ * Removes insignificant bits.
307
+ *
308
+ * @example
309
+ *
310
+ * wordArray.clamp();
311
+ */
312
+ clamp: function() {
313
+ var o = this.words, a = this.sigBytes;
314
+ o[a >>> 2] &= 4294967295 << 32 - a % 4 * 8, o.length = n.ceil(a / 4);
315
+ },
316
+ /**
317
+ * Creates a copy of this word array.
318
+ *
319
+ * @return {WordArray} The clone.
320
+ *
321
+ * @example
322
+ *
323
+ * var clone = wordArray.clone();
324
+ */
325
+ clone: function() {
326
+ var o = w.clone.call(this);
327
+ return o.words = this.words.slice(0), o;
328
+ },
329
+ /**
330
+ * Creates a word array filled with random bytes.
331
+ *
332
+ * @param {number} nBytes The number of random bytes to generate.
333
+ *
334
+ * @return {WordArray} The random word array.
335
+ *
336
+ * @static
337
+ *
338
+ * @example
339
+ *
340
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
341
+ */
342
+ random: function(o) {
343
+ for (var a = [], i = 0; i < o; i += 4)
344
+ a.push(g());
345
+ return new v.init(a, o);
346
+ }
347
+ }), h = p.enc = {}, f = h.Hex = {
348
+ /**
349
+ * Converts a word array to a hex string.
350
+ *
351
+ * @param {WordArray} wordArray The word array.
352
+ *
353
+ * @return {string} The hex string.
354
+ *
355
+ * @static
356
+ *
357
+ * @example
358
+ *
359
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
360
+ */
361
+ stringify: function(o) {
362
+ for (var a = o.words, i = o.sigBytes, d = [], x = 0; x < i; x++) {
363
+ var C = a[x >>> 2] >>> 24 - x % 4 * 8 & 255;
364
+ d.push((C >>> 4).toString(16)), d.push((C & 15).toString(16));
365
+ }
366
+ return d.join("");
367
+ },
368
+ /**
369
+ * Converts a hex string to a word array.
370
+ *
371
+ * @param {string} hexStr The hex string.
372
+ *
373
+ * @return {WordArray} The word array.
374
+ *
375
+ * @static
376
+ *
377
+ * @example
378
+ *
379
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
380
+ */
381
+ parse: function(o) {
382
+ for (var a = o.length, i = [], d = 0; d < a; d += 2)
383
+ i[d >>> 3] |= parseInt(o.substr(d, 2), 16) << 24 - d % 8 * 4;
384
+ return new v.init(i, a / 2);
385
+ }
386
+ }, m = h.Latin1 = {
387
+ /**
388
+ * Converts a word array to a Latin1 string.
389
+ *
390
+ * @param {WordArray} wordArray The word array.
391
+ *
392
+ * @return {string} The Latin1 string.
393
+ *
394
+ * @static
395
+ *
396
+ * @example
397
+ *
398
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
399
+ */
400
+ stringify: function(o) {
401
+ for (var a = o.words, i = o.sigBytes, d = [], x = 0; x < i; x++) {
402
+ var C = a[x >>> 2] >>> 24 - x % 4 * 8 & 255;
403
+ d.push(String.fromCharCode(C));
404
+ }
405
+ return d.join("");
406
+ },
407
+ /**
408
+ * Converts a Latin1 string to a word array.
409
+ *
410
+ * @param {string} latin1Str The Latin1 string.
411
+ *
412
+ * @return {WordArray} The word array.
413
+ *
414
+ * @static
415
+ *
416
+ * @example
417
+ *
418
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
419
+ */
420
+ parse: function(o) {
421
+ for (var a = o.length, i = [], d = 0; d < a; d++)
422
+ i[d >>> 2] |= (o.charCodeAt(d) & 255) << 24 - d % 4 * 8;
423
+ return new v.init(i, a);
424
+ }
425
+ }, s = h.Utf8 = {
426
+ /**
427
+ * Converts a word array to a UTF-8 string.
428
+ *
429
+ * @param {WordArray} wordArray The word array.
430
+ *
431
+ * @return {string} The UTF-8 string.
432
+ *
433
+ * @static
434
+ *
435
+ * @example
436
+ *
437
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
438
+ */
439
+ stringify: function(o) {
440
+ try {
441
+ return decodeURIComponent(escape(m.stringify(o)));
442
+ } catch {
443
+ throw new Error("Malformed UTF-8 data");
444
+ }
445
+ },
446
+ /**
447
+ * Converts a UTF-8 string to a word array.
448
+ *
449
+ * @param {string} utf8Str The UTF-8 string.
450
+ *
451
+ * @return {WordArray} The word array.
452
+ *
453
+ * @static
454
+ *
455
+ * @example
456
+ *
457
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
458
+ */
459
+ parse: function(o) {
460
+ return m.parse(unescape(encodeURIComponent(o)));
461
+ }
462
+ }, c = y.BufferedBlockAlgorithm = w.extend({
463
+ /**
464
+ * Resets this block algorithm's data buffer to its initial state.
465
+ *
466
+ * @example
467
+ *
468
+ * bufferedBlockAlgorithm.reset();
469
+ */
470
+ reset: function() {
471
+ this._data = new v.init(), this._nDataBytes = 0;
472
+ },
473
+ /**
474
+ * Adds new data to this block algorithm's buffer.
475
+ *
476
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
477
+ *
478
+ * @example
479
+ *
480
+ * bufferedBlockAlgorithm._append('data');
481
+ * bufferedBlockAlgorithm._append(wordArray);
482
+ */
483
+ _append: function(o) {
484
+ typeof o == "string" && (o = s.parse(o)), this._data.concat(o), this._nDataBytes += o.sigBytes;
485
+ },
486
+ /**
487
+ * Processes available data blocks.
488
+ *
489
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
490
+ *
491
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
492
+ *
493
+ * @return {WordArray} The processed data.
494
+ *
495
+ * @example
496
+ *
497
+ * var processedData = bufferedBlockAlgorithm._process();
498
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
499
+ */
500
+ _process: function(o) {
501
+ var a, i = this._data, d = i.words, x = i.sigBytes, C = this.blockSize, $ = C * 4, _ = x / $;
502
+ o ? _ = n.ceil(_) : _ = n.max((_ | 0) - this._minBufferSize, 0);
503
+ var T = _ * C, D = n.min(T * 4, x);
504
+ if (T) {
505
+ for (var H = 0; H < T; H += C)
506
+ this._doProcessBlock(d, H);
507
+ a = d.splice(0, T), i.sigBytes -= D;
508
+ }
509
+ return new v.init(a, D);
510
+ },
511
+ /**
512
+ * Creates a copy of this object.
513
+ *
514
+ * @return {Object} The clone.
515
+ *
516
+ * @example
517
+ *
518
+ * var clone = bufferedBlockAlgorithm.clone();
519
+ */
520
+ clone: function() {
521
+ var o = w.clone.call(this);
522
+ return o._data = this._data.clone(), o;
523
+ },
524
+ _minBufferSize: 0
525
+ });
526
+ y.Hasher = c.extend({
527
+ /**
528
+ * Configuration options.
529
+ */
530
+ cfg: w.extend(),
531
+ /**
532
+ * Initializes a newly created hasher.
533
+ *
534
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
535
+ *
536
+ * @example
537
+ *
538
+ * var hasher = CryptoJS.algo.SHA256.create();
539
+ */
540
+ init: function(o) {
541
+ this.cfg = this.cfg.extend(o), this.reset();
542
+ },
543
+ /**
544
+ * Resets this hasher to its initial state.
545
+ *
546
+ * @example
547
+ *
548
+ * hasher.reset();
549
+ */
550
+ reset: function() {
551
+ c.reset.call(this), this._doReset();
552
+ },
553
+ /**
554
+ * Updates this hasher with a message.
555
+ *
556
+ * @param {WordArray|string} messageUpdate The message to append.
557
+ *
558
+ * @return {Hasher} This hasher.
559
+ *
560
+ * @example
561
+ *
562
+ * hasher.update('message');
563
+ * hasher.update(wordArray);
564
+ */
565
+ update: function(o) {
566
+ return this._append(o), this._process(), this;
567
+ },
568
+ /**
569
+ * Finalizes the hash computation.
570
+ * Note that the finalize operation is effectively a destructive, read-once operation.
571
+ *
572
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
573
+ *
574
+ * @return {WordArray} The hash.
575
+ *
576
+ * @example
577
+ *
578
+ * var hash = hasher.finalize();
579
+ * var hash = hasher.finalize('message');
580
+ * var hash = hasher.finalize(wordArray);
581
+ */
582
+ finalize: function(o) {
583
+ o && this._append(o);
584
+ var a = this._doFinalize();
585
+ return a;
586
+ },
587
+ blockSize: 16,
588
+ /**
589
+ * Creates a shortcut function to a hasher's object interface.
590
+ *
591
+ * @param {Hasher} hasher The hasher to create a helper for.
592
+ *
593
+ * @return {Function} The shortcut function.
594
+ *
595
+ * @static
596
+ *
597
+ * @example
598
+ *
599
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
600
+ */
601
+ _createHelper: function(o) {
602
+ return function(a, i) {
603
+ return new o.init(i).finalize(a);
604
+ };
605
+ },
606
+ /**
607
+ * Creates a shortcut function to the HMAC's object interface.
608
+ *
609
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
610
+ *
611
+ * @return {Function} The shortcut function.
612
+ *
613
+ * @static
614
+ *
615
+ * @example
616
+ *
617
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
618
+ */
619
+ _createHmacHelper: function(o) {
620
+ return function(a, i) {
621
+ return new S.HMAC.init(o, i).finalize(a);
622
+ };
623
+ }
624
+ });
625
+ var S = p.algo = {};
626
+ return p;
627
+ })(Math);
628
+ return r;
629
+ });
630
+ })(q)), q.exports;
631
+ }
632
+ var Ce = W.exports, dt;
633
+ function be() {
634
+ return dt || (dt = 1, (function(t, e) {
635
+ (function(r, n) {
636
+ t.exports = n(/* @__PURE__ */ Mt());
637
+ })(Ce, function(r) {
638
+ return (function(n) {
639
+ var u = r, l = u.lib, g = l.WordArray, b = l.Hasher, p = u.algo, y = [], w = [];
640
+ (function() {
641
+ function f(S) {
642
+ for (var o = n.sqrt(S), a = 2; a <= o; a++)
643
+ if (!(S % a))
644
+ return !1;
645
+ return !0;
646
+ }
647
+ function m(S) {
648
+ return (S - (S | 0)) * 4294967296 | 0;
649
+ }
650
+ for (var s = 2, c = 0; c < 64; )
651
+ f(s) && (c < 8 && (y[c] = m(n.pow(s, 1 / 2))), w[c] = m(n.pow(s, 1 / 3)), c++), s++;
652
+ })();
653
+ var v = [], h = p.SHA256 = b.extend({
654
+ _doReset: function() {
655
+ this._hash = new g.init(y.slice(0));
656
+ },
657
+ _doProcessBlock: function(f, m) {
658
+ for (var s = this._hash.words, c = s[0], S = s[1], o = s[2], a = s[3], i = s[4], d = s[5], x = s[6], C = s[7], $ = 0; $ < 64; $++) {
659
+ if ($ < 16)
660
+ v[$] = f[m + $] | 0;
661
+ else {
662
+ var _ = v[$ - 15], T = (_ << 25 | _ >>> 7) ^ (_ << 14 | _ >>> 18) ^ _ >>> 3, D = v[$ - 2], H = (D << 15 | D >>> 17) ^ (D << 13 | D >>> 19) ^ D >>> 10;
663
+ v[$] = T + v[$ - 7] + H + v[$ - 16];
664
+ }
665
+ var qt = i & d ^ ~i & x, Kt = c & S ^ c & o ^ S & o, Gt = (c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22), Jt = (i << 26 | i >>> 6) ^ (i << 21 | i >>> 11) ^ (i << 7 | i >>> 25), ut = C + Jt + qt + w[$] + v[$], Zt = Gt + Kt;
666
+ C = x, x = d, d = i, i = a + ut | 0, a = o, o = S, S = c, c = ut + Zt | 0;
667
+ }
668
+ s[0] = s[0] + c | 0, s[1] = s[1] + S | 0, s[2] = s[2] + o | 0, s[3] = s[3] + a | 0, s[4] = s[4] + i | 0, s[5] = s[5] + d | 0, s[6] = s[6] + x | 0, s[7] = s[7] + C | 0;
669
+ },
670
+ _doFinalize: function() {
671
+ var f = this._data, m = f.words, s = this._nDataBytes * 8, c = f.sigBytes * 8;
672
+ return m[c >>> 5] |= 128 << 24 - c % 32, m[(c + 64 >>> 9 << 4) + 14] = n.floor(s / 4294967296), m[(c + 64 >>> 9 << 4) + 15] = s, f.sigBytes = m.length * 4, this._process(), this._hash;
673
+ },
674
+ clone: function() {
675
+ var f = b.clone.call(this);
676
+ return f._hash = this._hash.clone(), f;
677
+ }
678
+ });
679
+ u.SHA256 = b._createHelper(h), u.HmacSHA256 = b._createHmacHelper(h);
680
+ })(Math), r.SHA256;
681
+ });
682
+ })(W)), W.exports;
683
+ }
684
+ var $e = /* @__PURE__ */ be();
685
+ const _e = /* @__PURE__ */ L($e);
686
+ var K = { exports: {} }, Me = K.exports, ft;
687
+ function Te() {
688
+ return ft || (ft = 1, (function(t, e) {
689
+ (function(r, n) {
690
+ t.exports = n(/* @__PURE__ */ Mt());
691
+ })(Me, function(r) {
692
+ return (function() {
693
+ var n = r, u = n.lib, l = u.WordArray, g = n.enc;
694
+ g.Base64 = {
695
+ /**
696
+ * Converts a word array to a Base64 string.
697
+ *
698
+ * @param {WordArray} wordArray The word array.
699
+ *
700
+ * @return {string} The Base64 string.
701
+ *
702
+ * @static
703
+ *
704
+ * @example
705
+ *
706
+ * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
707
+ */
708
+ stringify: function(p) {
709
+ var y = p.words, w = p.sigBytes, v = this._map;
710
+ p.clamp();
711
+ for (var h = [], f = 0; f < w; f += 3)
712
+ for (var m = y[f >>> 2] >>> 24 - f % 4 * 8 & 255, s = y[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, c = y[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, S = m << 16 | s << 8 | c, o = 0; o < 4 && f + o * 0.75 < w; o++)
713
+ h.push(v.charAt(S >>> 6 * (3 - o) & 63));
714
+ var a = v.charAt(64);
715
+ if (a)
716
+ for (; h.length % 4; )
717
+ h.push(a);
718
+ return h.join("");
719
+ },
720
+ /**
721
+ * Converts a Base64 string to a word array.
722
+ *
723
+ * @param {string} base64Str The Base64 string.
724
+ *
725
+ * @return {WordArray} The word array.
726
+ *
727
+ * @static
728
+ *
729
+ * @example
730
+ *
731
+ * var wordArray = CryptoJS.enc.Base64.parse(base64String);
732
+ */
733
+ parse: function(p) {
734
+ var y = p.length, w = this._map, v = this._reverseMap;
735
+ if (!v) {
736
+ v = this._reverseMap = [];
737
+ for (var h = 0; h < w.length; h++)
738
+ v[w.charCodeAt(h)] = h;
739
+ }
740
+ var f = w.charAt(64);
741
+ if (f) {
742
+ var m = p.indexOf(f);
743
+ m !== -1 && (y = m);
744
+ }
745
+ return b(p, y, v);
746
+ },
747
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
748
+ };
749
+ function b(p, y, w) {
750
+ for (var v = [], h = 0, f = 0; f < y; f++)
751
+ if (f % 4) {
752
+ var m = w[p.charCodeAt(f - 1)] << f % 4 * 2, s = w[p.charCodeAt(f)] >>> 6 - f % 4 * 2, c = m | s;
753
+ v[h >>> 2] |= c << 24 - h % 4 * 8, h++;
754
+ }
755
+ return l.create(v, h);
756
+ }
757
+ })(), r.enc.Base64;
758
+ });
759
+ })(K)), K.exports;
760
+ }
761
+ var ke = /* @__PURE__ */ Te();
762
+ const De = /* @__PURE__ */ L(ke);
763
+ var G = { exports: {} }, Ie = G.exports, ht;
764
+ function Ye() {
765
+ return ht || (ht = 1, (function(t, e) {
766
+ (function(r, n) {
767
+ t.exports = n();
768
+ })(Ie, (function() {
769
+ return function(r, n, u) {
101
770
  r = r || {};
102
- var f = o.prototype, h = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
103
- function M(g, m, l, a) {
104
- return f.fromToBase(g, m, l, a);
771
+ var l = n.prototype, g = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
772
+ function b(y, w, v, h) {
773
+ return l.fromToBase(y, w, v, h);
105
774
  }
106
- n.en.relativeTime = h, f.fromToBase = function(g, m, l, a, c) {
107
- for (var i, s, u, p = l.$locale().relativeTime || h, y = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], w = y.length, v = 0; v < w; v += 1) {
108
- var S = y[v];
109
- S.d && (i = a ? n(g).diff(l, S.d, !0) : l.diff(g, S.d, !0));
110
- var $ = (r.rounding || Math.round)(Math.abs(i));
111
- if (u = i > 0, $ <= S.r || !S.r) {
112
- $ <= 1 && v > 0 && (S = y[v - 1]);
113
- var b = p[S.l];
114
- c && ($ = c("" + $)), s = typeof b == "string" ? b.replace("%d", $) : b($, m, S.l, u);
775
+ u.en.relativeTime = g, l.fromToBase = function(y, w, v, h, f) {
776
+ for (var m, s, c, S = v.$locale().relativeTime || g, o = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], a = o.length, i = 0; i < a; i += 1) {
777
+ var d = o[i];
778
+ d.d && (m = h ? u(y).diff(v, d.d, !0) : v.diff(y, d.d, !0));
779
+ var x = (r.rounding || Math.round)(Math.abs(m));
780
+ if (c = m > 0, x <= d.r || !d.r) {
781
+ x <= 1 && i > 0 && (d = o[i - 1]);
782
+ var C = S[d.l];
783
+ f && (x = f("" + x)), s = typeof C == "string" ? C.replace("%d", x) : C(x, w, d.l, c);
115
784
  break;
116
785
  }
117
786
  }
118
- if (m) return s;
119
- var D = u ? p.future : p.past;
120
- return typeof D == "function" ? D(s) : D.replace("%s", s);
121
- }, f.to = function(g, m) {
122
- return M(g, m, this, !0);
123
- }, f.from = function(g, m) {
124
- return M(g, m, this);
787
+ if (w) return s;
788
+ var $ = c ? S.future : S.past;
789
+ return typeof $ == "function" ? $(s) : $.replace("%s", s);
790
+ }, l.to = function(y, w) {
791
+ return b(y, w, this, !0);
792
+ }, l.from = function(y, w) {
793
+ return b(y, w, this);
125
794
  };
126
- var d = function(g) {
127
- return g.$u ? n.utc() : n();
795
+ var p = function(y) {
796
+ return y.$u ? u.utc() : u();
128
797
  };
129
- f.toNow = function(g) {
130
- return this.to(d(this), g);
131
- }, f.fromNow = function(g) {
132
- return this.from(d(this), g);
798
+ l.toNow = function(y) {
799
+ return this.to(p(this), y);
800
+ }, l.fromNow = function(y) {
801
+ return this.from(p(this), y);
133
802
  };
134
803
  };
135
804
  }));
136
- })(z)), z.exports;
805
+ })(G)), G.exports;
137
806
  }
138
- var rt = /* @__PURE__ */ tt();
139
- const ot = /* @__PURE__ */ te(rt);
140
- var B = { exports: {} }, st = B.exports, ce;
141
- function nt() {
142
- return ce || (ce = 1, (function(e, t) {
143
- (function(r, o) {
144
- e.exports = o();
145
- })(st, (function() {
146
- var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
147
- return function(n, f, h) {
148
- var M, d = function(a, c, i) {
149
- i === void 0 && (i = {});
150
- var s = new Date(a), u = (function(p, y) {
151
- y === void 0 && (y = {});
152
- var w = y.timeZoneName || "short", v = p + "|" + w, S = o[v];
153
- return S || (S = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: p, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: w }), o[v] = S), S;
154
- })(c, i);
155
- return u.formatToParts(s);
156
- }, g = function(a, c) {
157
- for (var i = d(a, c), s = [], u = 0; u < i.length; u += 1) {
158
- var p = i[u], y = p.type, w = p.value, v = r[y];
159
- v >= 0 && (s[v] = parseInt(w, 10));
807
+ var Ne = /* @__PURE__ */ Ye();
808
+ const Ue = /* @__PURE__ */ L(Ne);
809
+ var J = { exports: {} }, Ee = J.exports, mt;
810
+ function Oe() {
811
+ return mt || (mt = 1, (function(t, e) {
812
+ (function(r, n) {
813
+ t.exports = n();
814
+ })(Ee, (function() {
815
+ var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
816
+ return function(u, l, g) {
817
+ var b, p = function(h, f, m) {
818
+ m === void 0 && (m = {});
819
+ var s = new Date(h), c = (function(S, o) {
820
+ o === void 0 && (o = {});
821
+ var a = o.timeZoneName || "short", i = S + "|" + a, d = n[i];
822
+ return d || (d = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: S, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: a }), n[i] = d), d;
823
+ })(f, m);
824
+ return c.formatToParts(s);
825
+ }, y = function(h, f) {
826
+ for (var m = p(h, f), s = [], c = 0; c < m.length; c += 1) {
827
+ var S = m[c], o = S.type, a = S.value, i = r[o];
828
+ i >= 0 && (s[i] = parseInt(a, 10));
160
829
  }
161
- var S = s[3], $ = S === 24 ? 0 : S, b = s[0] + "-" + s[1] + "-" + s[2] + " " + $ + ":" + s[4] + ":" + s[5] + ":000", D = +a;
162
- return (h.utc(b).valueOf() - (D -= D % 1e3)) / 6e4;
163
- }, m = f.prototype;
164
- m.tz = function(a, c) {
165
- a === void 0 && (a = M);
166
- var i, s = this.utcOffset(), u = this.toDate(), p = u.toLocaleString("en-US", { timeZone: a }), y = Math.round((u - new Date(p)) / 1e3 / 60), w = 15 * -Math.round(u.getTimezoneOffset() / 15) - y;
167
- if (!Number(w)) i = this.utcOffset(0, c);
168
- else if (i = h(p, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(w, !0), c) {
169
- var v = i.utcOffset();
170
- i = i.add(s - v, "minute");
830
+ var d = s[3], x = d === 24 ? 0 : d, C = s[0] + "-" + s[1] + "-" + s[2] + " " + x + ":" + s[4] + ":" + s[5] + ":000", $ = +h;
831
+ return (g.utc(C).valueOf() - ($ -= $ % 1e3)) / 6e4;
832
+ }, w = l.prototype;
833
+ w.tz = function(h, f) {
834
+ h === void 0 && (h = b);
835
+ var m, s = this.utcOffset(), c = this.toDate(), S = c.toLocaleString("en-US", { timeZone: h }), o = Math.round((c - new Date(S)) / 1e3 / 60), a = 15 * -Math.round(c.getTimezoneOffset() / 15) - o;
836
+ if (!Number(a)) m = this.utcOffset(0, f);
837
+ else if (m = g(S, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(a, !0), f) {
838
+ var i = m.utcOffset();
839
+ m = m.add(s - i, "minute");
171
840
  }
172
- return i.$x.$timezone = a, i;
173
- }, m.offsetName = function(a) {
174
- var c = this.$x.$timezone || h.tz.guess(), i = d(this.valueOf(), c, { timeZoneName: a }).find((function(s) {
841
+ return m.$x.$timezone = h, m;
842
+ }, w.offsetName = function(h) {
843
+ var f = this.$x.$timezone || g.tz.guess(), m = p(this.valueOf(), f, { timeZoneName: h }).find((function(s) {
175
844
  return s.type.toLowerCase() === "timezonename";
176
845
  }));
177
- return i && i.value;
846
+ return m && m.value;
178
847
  };
179
- var l = m.startOf;
180
- m.startOf = function(a, c) {
181
- if (!this.$x || !this.$x.$timezone) return l.call(this, a, c);
182
- var i = h(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
183
- return l.call(i, a, c).tz(this.$x.$timezone, !0);
184
- }, h.tz = function(a, c, i) {
185
- var s = i && c, u = i || c || M, p = g(+h(), u);
186
- if (typeof a != "string") return h(a).tz(u);
187
- var y = (function($, b, D) {
188
- var Y = $ - 60 * b * 1e3, P = g(Y, D);
189
- if (b === P) return [Y, b];
190
- var Z = g(Y -= 60 * (P - b) * 1e3, D);
191
- return P === Z ? [Y, P] : [$ - 60 * Math.min(P, Z) * 1e3, Math.max(P, Z)];
192
- })(h.utc(a, s).valueOf(), p, u), w = y[0], v = y[1], S = h(w).utcOffset(v);
193
- return S.$x.$timezone = u, S;
194
- }, h.tz.guess = function() {
848
+ var v = w.startOf;
849
+ w.startOf = function(h, f) {
850
+ if (!this.$x || !this.$x.$timezone) return v.call(this, h, f);
851
+ var m = g(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
852
+ return v.call(m, h, f).tz(this.$x.$timezone, !0);
853
+ }, g.tz = function(h, f, m) {
854
+ var s = m && f, c = m || f || b, S = y(+g(), c);
855
+ if (typeof h != "string") return g(h).tz(c);
856
+ var o = (function(x, C, $) {
857
+ var _ = x - 60 * C * 1e3, T = y(_, $);
858
+ if (C === T) return [_, C];
859
+ var D = y(_ -= 60 * (T - C) * 1e3, $);
860
+ return T === D ? [_, T] : [x - 60 * Math.min(T, D) * 1e3, Math.max(T, D)];
861
+ })(g.utc(h, s).valueOf(), S, c), a = o[0], i = o[1], d = g(a).utcOffset(i);
862
+ return d.$x.$timezone = c, d;
863
+ }, g.tz.guess = function() {
195
864
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
196
- }, h.tz.setDefault = function(a) {
197
- M = a;
865
+ }, g.tz.setDefault = function(h) {
866
+ b = h;
198
867
  };
199
868
  };
200
869
  }));
201
- })(B)), B.exports;
870
+ })(J)), J.exports;
202
871
  }
203
- var at = /* @__PURE__ */ nt();
204
- const it = /* @__PURE__ */ te(at);
205
- var W = { exports: {} }, ct = W.exports, ue;
206
- function ut() {
207
- return ue || (ue = 1, (function(e, t) {
208
- (function(r, o) {
209
- e.exports = o();
210
- })(ct, (function() {
211
- var r = "minute", o = /[+-]\d\d(?::?\d\d)?/g, n = /([+-]|\d\d)/g;
212
- return function(f, h, M) {
213
- var d = h.prototype;
214
- M.utc = function(s) {
215
- var u = { date: s, utc: !0, args: arguments };
216
- return new h(u);
217
- }, d.utc = function(s) {
218
- var u = M(this.toDate(), { locale: this.$L, utc: !0 });
219
- return s ? u.add(this.utcOffset(), r) : u;
220
- }, d.local = function() {
221
- return M(this.toDate(), { locale: this.$L, utc: !1 });
872
+ var Be = /* @__PURE__ */ Oe();
873
+ const Ae = /* @__PURE__ */ L(Be);
874
+ var Z = { exports: {} }, Pe = Z.exports, pt;
875
+ function Re() {
876
+ return pt || (pt = 1, (function(t, e) {
877
+ (function(r, n) {
878
+ t.exports = n();
879
+ })(Pe, (function() {
880
+ var r = "minute", n = /[+-]\d\d(?::?\d\d)?/g, u = /([+-]|\d\d)/g;
881
+ return function(l, g, b) {
882
+ var p = g.prototype;
883
+ b.utc = function(s) {
884
+ var c = { date: s, utc: !0, args: arguments };
885
+ return new g(c);
886
+ }, p.utc = function(s) {
887
+ var c = b(this.toDate(), { locale: this.$L, utc: !0 });
888
+ return s ? c.add(this.utcOffset(), r) : c;
889
+ }, p.local = function() {
890
+ return b(this.toDate(), { locale: this.$L, utc: !1 });
222
891
  };
223
- var g = d.parse;
224
- d.parse = function(s) {
225
- s.utc && (this.$u = !0), this.$utils().u(s.$offset) || (this.$offset = s.$offset), g.call(this, s);
892
+ var y = p.parse;
893
+ p.parse = function(s) {
894
+ s.utc && (this.$u = !0), this.$utils().u(s.$offset) || (this.$offset = s.$offset), y.call(this, s);
226
895
  };
227
- var m = d.init;
228
- d.init = function() {
896
+ var w = p.init;
897
+ p.init = function() {
229
898
  if (this.$u) {
230
899
  var s = this.$d;
231
900
  this.$y = s.getUTCFullYear(), this.$M = s.getUTCMonth(), this.$D = s.getUTCDate(), this.$W = s.getUTCDay(), this.$H = s.getUTCHours(), this.$m = s.getUTCMinutes(), this.$s = s.getUTCSeconds(), this.$ms = s.getUTCMilliseconds();
232
- } else m.call(this);
901
+ } else w.call(this);
233
902
  };
234
- var l = d.utcOffset;
235
- d.utcOffset = function(s, u) {
236
- var p = this.$utils().u;
237
- if (p(s)) return this.$u ? 0 : p(this.$offset) ? l.call(this) : this.$offset;
238
- if (typeof s == "string" && (s = (function(S) {
239
- S === void 0 && (S = "");
240
- var $ = S.match(o);
241
- if (!$) return null;
242
- var b = ("" + $[0]).match(n) || ["-", 0, 0], D = b[0], Y = 60 * +b[1] + +b[2];
243
- return Y === 0 ? 0 : D === "+" ? Y : -Y;
903
+ var v = p.utcOffset;
904
+ p.utcOffset = function(s, c) {
905
+ var S = this.$utils().u;
906
+ if (S(s)) return this.$u ? 0 : S(this.$offset) ? v.call(this) : this.$offset;
907
+ if (typeof s == "string" && (s = (function(d) {
908
+ d === void 0 && (d = "");
909
+ var x = d.match(n);
910
+ if (!x) return null;
911
+ var C = ("" + x[0]).match(u) || ["-", 0, 0], $ = C[0], _ = 60 * +C[1] + +C[2];
912
+ return _ === 0 ? 0 : $ === "+" ? _ : -_;
244
913
  })(s), s === null)) return this;
245
- var y = Math.abs(s) <= 16 ? 60 * s : s;
246
- if (y === 0) return this.utc(u);
247
- var w = this.clone();
248
- if (u) return w.$offset = y, w.$u = !1, w;
249
- var v = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
250
- return (w = this.local().add(y + v, r)).$offset = y, w.$x.$localOffset = v, w;
914
+ var o = Math.abs(s) <= 16 ? 60 * s : s, a = this;
915
+ if (c) return a.$offset = o, a.$u = s === 0, a;
916
+ if (s !== 0) {
917
+ var i = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
918
+ (a = this.local().add(o + i, r)).$offset = o, a.$x.$localOffset = i;
919
+ } else a = this.utc();
920
+ return a;
251
921
  };
252
- var a = d.format;
253
- d.format = function(s) {
254
- var u = s || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
255
- return a.call(this, u);
256
- }, d.valueOf = function() {
922
+ var h = p.format;
923
+ p.format = function(s) {
924
+ var c = s || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
925
+ return h.call(this, c);
926
+ }, p.valueOf = function() {
257
927
  var s = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
258
928
  return this.$d.valueOf() - 6e4 * s;
259
- }, d.isUTC = function() {
929
+ }, p.isUTC = function() {
260
930
  return !!this.$u;
261
- }, d.toISOString = function() {
931
+ }, p.toISOString = function() {
262
932
  return this.toDate().toISOString();
263
- }, d.toString = function() {
933
+ }, p.toString = function() {
264
934
  return this.toDate().toUTCString();
265
935
  };
266
- var c = d.toDate;
267
- d.toDate = function(s) {
268
- return s === "s" && this.$offset ? M(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : c.call(this);
936
+ var f = p.toDate;
937
+ p.toDate = function(s) {
938
+ return s === "s" && this.$offset ? b(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : f.call(this);
269
939
  };
270
- var i = d.diff;
271
- d.diff = function(s, u, p) {
272
- if (s && this.$u === s.$u) return i.call(this, s, u, p);
273
- var y = this.local(), w = M(s).local();
274
- return i.call(y, w, u, p);
940
+ var m = p.diff;
941
+ p.diff = function(s, c, S) {
942
+ if (s && this.$u === s.$u) return m.call(this, s, c, S);
943
+ var o = this.local(), a = b(s).local();
944
+ return m.call(o, a, c, S);
275
945
  };
276
946
  };
277
947
  }));
278
- })(W)), W.exports;
948
+ })(Z)), Z.exports;
279
949
  }
280
- var lt = /* @__PURE__ */ ut();
281
- const dt = /* @__PURE__ */ te(lt), mt = "ui_theme", ft = (e) => typeof e == "string", ht = (e) => typeof e == "number" && !isNaN(e), gt = (e) => typeof e == "boolean", pt = (e) => typeof e == "function", yt = (e) => e !== null && typeof e == "object", wt = (e) => Array.isArray(e), St = (e) => e === null, Mt = (e) => e === void 0, vt = (e) => e == null, Ct = (e, t) => {
950
+ var He = /* @__PURE__ */ Re();
951
+ const Fe = /* @__PURE__ */ L(He), Le = "ui_theme", ze = (t) => typeof t == "string", je = (t) => typeof t == "number" && !isNaN(t), Ve = (t) => typeof t == "boolean", We = (t) => typeof t == "function", qe = (t) => t !== null && typeof t == "object", Ke = (t) => Array.isArray(t), Ge = (t) => t === null, Je = (t) => t === void 0, Ze = (t) => t == null, Xe = (t, e) => {
282
952
  let r = 0;
283
- return (...o) => {
284
- const n = Date.now();
285
- n - r >= t && (r = n, e(...o));
953
+ return (...n) => {
954
+ const u = Date.now();
955
+ u - r >= e && (r = u, t(...n));
286
956
  };
287
- }, xt = (e, t) => {
957
+ }, Qe = (t, e) => {
288
958
  let r;
289
- return (...o) => {
290
- clearTimeout(r), r = setTimeout(() => e(...o), t);
959
+ return (...n) => {
960
+ clearTimeout(r), r = setTimeout(() => t(...n), e);
291
961
  };
292
- }, $t = async (e) => {
962
+ }, tr = async (t) => {
293
963
  try {
294
- return await navigator.clipboard.writeText(e), !0;
295
- } catch (t) {
296
- return console.error("Error copying to clipboard:", t), !1;
964
+ return await navigator.clipboard.writeText(t), !0;
965
+ } catch (e) {
966
+ return console.error("Error copying to clipboard:", e), !1;
297
967
  }
298
- }, G = () => {
299
- const e = window.innerWidth;
300
- return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
301
- }, bt = () => G() === "mobile", Tt = () => G() === "tablet", Dt = () => G() === "desktop", kt = () => "#" + Math.floor(Math.random() * 16777215).toString(16), J = (e) => !e || e.length === 0, Ot = (e) => [...new Set(e)], Yt = (e) => {
302
- if (!J(e))
303
- return Math.max(...e);
304
- }, It = (e) => {
305
- if (!J(e))
306
- return Math.min(...e);
307
- }, Nt = (e) => {
308
- if (!J(e))
309
- return e.reduce((t, r) => t + r, 0) / e.length;
310
- }, _t = (e) => e.reduce((t, r) => t + r, 0), Ut = (e, t) => e.filter(t).length, Et = (e) => [...e].reverse(), Pt = (e) => {
311
- const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
312
- return e.forEach((o) => {
313
- t.has(o) ? r.add(o) : t.add(o);
968
+ }, tt = () => {
969
+ const t = window.innerWidth;
970
+ return t < 768 ? "mobile" : t < 1024 ? "tablet" : "desktop";
971
+ }, er = () => tt() === "mobile", rr = () => tt() === "tablet", nr = () => tt() === "desktop", or = () => "#" + Math.floor(Math.random() * 16777215).toString(16), et = (t) => !t || t.length === 0, sr = (t) => [...new Set(t)], ar = (t) => {
972
+ if (!et(t))
973
+ return Math.max(...t);
974
+ }, ir = (t) => {
975
+ if (!et(t))
976
+ return Math.min(...t);
977
+ }, cr = (t) => {
978
+ if (!et(t))
979
+ return t.reduce((e, r) => e + r, 0) / t.length;
980
+ }, ur = (t) => t.reduce((e, r) => e + r, 0), lr = (t, e) => t.filter(e).length, dr = (t) => [...t].reverse(), fr = (t) => {
981
+ const e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
982
+ return t.forEach((n) => {
983
+ e.has(n) ? r.add(n) : e.add(n);
314
984
  }), Array.from(r);
315
- }, At = (e, t) => Math.random() * (t - e) + e, Lt = (e, t, r) => Math.min(Math.max(e, t), r), Ft = (e, t = 0) => Math.round(e * Math.pow(10, t)) / Math.pow(10, t), Ht = (e, t) => {
985
+ }, hr = (t, e) => Math.random() * (e - t) + t, mr = (t, e, r) => Math.min(Math.max(t, e), r), pr = (t, e = 0) => Math.round(t * Math.pow(10, e)) / Math.pow(10, e), gr = (t, e) => {
316
986
  try {
317
- sessionStorage.setItem(e, JSON.stringify(t));
987
+ sessionStorage.setItem(t, JSON.stringify(e));
318
988
  } catch (r) {
319
989
  console.error("Error saving to sessionStorage:", r);
320
990
  }
321
- }, Rt = (e, t) => {
991
+ }, yr = (t, e) => {
322
992
  try {
323
- const r = sessionStorage.getItem(e);
324
- return r ? JSON.parse(r) : t || null;
993
+ const r = sessionStorage.getItem(t);
994
+ return r ? JSON.parse(r) : e || null;
325
995
  } catch (r) {
326
- return console.error("Error reading from sessionStorage:", r), t || null;
996
+ return console.error("Error reading from sessionStorage:", r), e || null;
327
997
  }
328
- }, jt = (e) => {
998
+ }, vr = (t) => {
329
999
  try {
330
- sessionStorage.removeItem(e);
331
- } catch (t) {
332
- console.error("Error removing from sessionStorage:", t);
1000
+ sessionStorage.removeItem(t);
1001
+ } catch (e) {
1002
+ console.error("Error removing from sessionStorage:", e);
333
1003
  }
334
- }, Vt = () => {
1004
+ }, wr = () => {
335
1005
  try {
336
1006
  sessionStorage.clear();
337
- } catch (e) {
338
- console.error("Error clearing sessionStorage:", e);
1007
+ } catch (t) {
1008
+ console.error("Error clearing sessionStorage:", t);
339
1009
  }
340
- }, zt = (e, t, r = 30) => {
341
- const o = /* @__PURE__ */ new Date();
342
- o.setTime(o.getTime() + r * 24 * 60 * 60 * 1e3), document.cookie = `${e}=${t};expires=${o.toUTCString()};path=/`;
343
- }, Bt = (e) => {
344
- const t = e + "=", r = document.cookie.split(";");
345
- for (let o = 0; o < r.length; o++) {
346
- let n = r[o];
347
- for (; n.charAt(0) === " "; ) n = n.substring(1, n.length);
348
- if (n.indexOf(t) === 0) return n.substring(t.length, n.length);
1010
+ }, Sr = (t, e, r = 30) => {
1011
+ const n = /* @__PURE__ */ new Date();
1012
+ n.setTime(n.getTime() + r * 24 * 60 * 60 * 1e3), document.cookie = `${t}=${e};expires=${n.toUTCString()};path=/`;
1013
+ }, xr = (t) => {
1014
+ const e = t + "=", r = document.cookie.split(";");
1015
+ for (let n = 0; n < r.length; n++) {
1016
+ let u = r[n];
1017
+ for (; u.charAt(0) === " "; ) u = u.substring(1, u.length);
1018
+ if (u.indexOf(e) === 0) return u.substring(e.length, u.length);
349
1019
  }
350
1020
  return null;
351
- }, Wt = (e) => {
352
- document.cookie = `${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
353
- }, ve = (e) => typeof e != "string" ? !e : e.trim().length === 0, qt = (e, t) => ve(e) ? t : e || "", Kt = (e) => e.replace(/-([a-z])/g, (t) => t[1].toUpperCase()), Gt = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), Jt = (e) => {
1021
+ }, Cr = (t) => {
1022
+ document.cookie = `${t}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
1023
+ }, Tt = (t) => typeof t != "string" ? !t : t.trim().length === 0, br = (t, e) => Tt(t) ? e : t || "", $r = (t) => t.replace(/-([a-z])/g, (e) => e[1].toUpperCase()), _r = (t) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t), Mr = (t) => {
354
1024
  try {
355
- return new URL(e), !0;
1025
+ return new URL(t), !0;
356
1026
  } catch {
357
1027
  return !1;
358
1028
  }
359
- }, Zt = (e, t, r = " ") => e.padStart(t, r), Xt = (e, t, r = " ") => e.padEnd(t, r), Ce = (e, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
1029
+ }, Tr = (t, e, r = " ") => t.padStart(e, r), kr = (t, e, r = " ") => t.padEnd(e, r), kt = (t, e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
360
1030
  let r = "";
361
- for (let o = 0; o < e; o++)
362
- r += t.charAt(Math.floor(Math.random() * t.length));
1031
+ for (let n = 0; n < t; n++)
1032
+ r += e.charAt(Math.floor(Math.random() * e.length));
363
1033
  return r;
364
- }, Qt = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
365
- const t = Math.random() * 16 | 0;
366
- return (e === "x" ? t : t & 3 | 8).toString(16);
367
- }), re = (e = 32) => {
368
- const r = Qt().replace(/-/g, "");
369
- return e >= 32 ? r + Ce(e - 32, "0123456789abcdef") : r.substring(0, e);
1034
+ }, Dr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
1035
+ const e = Math.random() * 16 | 0;
1036
+ return (t === "x" ? e : e & 3 | 8).toString(16);
1037
+ }), it = (t = 32) => {
1038
+ const r = Dr().replace(/-/g, "");
1039
+ return t >= 32 ? r + kt(t - 32, "0123456789abcdef") : r.substring(0, t);
370
1040
  };
371
- async function er(e) {
372
- const [{ default: t }, { default: r }] = await Promise.all([
373
- import("../chunks/sha256-DQcqzuys.js").then((o) => o.s),
374
- import("../chunks/enc-base64-CdWu8KMI.js").then((o) => o.e)
375
- ]);
376
- return t(e).toString(r);
1041
+ async function Ir(t) {
1042
+ return _e(t).toString(De);
377
1043
  }
378
- C.extend(ot);
379
- C.extend(dt);
380
- C.extend(it);
381
- C.locale("ko");
382
- const I = "YYYYMMDD", tr = () => C(), xe = (e = I) => C().format(e), rr = (e) => C(e, I, !0).isValid(), or = (e) => C(e, "YYYY", !0).isValid(), sr = (e) => C(e, "YYYYMM", !0).isValid(), nr = (e) => C(e, "YYYYMMDDHHmmss", !0).isValid(), ar = (e, t = "CM") => {
1044
+ M.extend(Ue);
1045
+ M.extend(Fe);
1046
+ M.extend(Ae);
1047
+ M.locale("ko");
1048
+ const Y = "YYYYMMDD", Yr = () => M(), Dt = (t = Y) => M().format(t), Nr = (t) => M(t, Y, !0).isValid(), Ur = (t) => M(t, "YYYY", !0).isValid(), Er = (t) => M(t, "YYYYMM", !0).isValid(), Or = (t) => M(t, "YYYYMMDDHHmmss", !0).isValid(), Br = (t, e = "CM") => {
383
1049
  let r = "";
384
- return t == "CM" ? r = "YYYYMMDD" : t == "C" ? r = "YYYY.MM.DD" : t == "H" ? r = "YYYY년 MM월 DD일" : t == "D" ? r = "YYYY-MM-DD" : t == "S" ? r = "YYYY/MM/DD" : t == "M" ? r = "YYYY-MM" : t == "YM" ? r = "YYYY년 MM월" : t == "DT" ? r = "YYYY-MM-DD HH:mm:ss" : t == "T" ? r = "HH:mm:ss" : t == "HM" && (r = "HH:mm"), C(e).format(r);
385
- }, ir = (e, t = "month") => C(e).endOf(t).format(I), cr = (e, t = "month") => C(e).startOf(t).format(I), ur = (e, t) => C(e).add(t, "month").format(I), lr = (e, t) => C(e).add(t, "day").format(I), dr = (e, t) => C(e).diff(t, "day"), mr = (e = I) => {
386
- const t = C(e), r = C();
387
- let o = r.year() - t.year();
388
- return (r.month() < t.month() || r.month() === t.month() && r.date() < t.date()) && o--, o;
389
- }, $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1050
+ return e == "CM" ? r = "YYYYMMDD" : e == "C" ? r = "YYYY.MM.DD" : e == "H" ? r = "YYYY년 MM월 DD일" : e == "D" ? r = "YYYY-MM-DD" : e == "S" ? r = "YYYY/MM/DD" : e == "M" ? r = "YYYY-MM" : e == "YM" ? r = "YYYY년 MM월" : e == "DT" ? r = "YYYY-MM-DD HH:mm:ss" : e == "T" ? r = "HH:mm:ss" : e == "HM" && (r = "HH:mm"), M(t).format(r);
1051
+ }, Ar = (t, e = "month") => M(t).endOf(e).format(Y), Pr = (t, e = "month") => M(t).startOf(e).format(Y), Rr = (t, e) => M(t).add(e, "month").format(Y), Hr = (t, e) => M(t).add(e, "day").format(Y), Fr = (t, e) => M(t).diff(e, "day"), Lr = (t = Y) => {
1052
+ const e = M(t), r = M();
1053
+ let n = r.year() - e.year();
1054
+ return (r.month() < e.month() || r.month() === e.month() && r.date() < e.date()) && n--, n;
1055
+ }, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
390
1056
  __proto__: null,
391
- COMMON_DATE_FORMAT: I,
392
- THEME_COOKIE_NAME: mt,
393
- addDays: lr,
394
- addMonths: ur,
395
- arrAverage: Nt,
396
- arrCount: Ut,
397
- arrMax: Yt,
398
- arrMin: It,
399
- arrReverse: Et,
400
- arrSum: _t,
401
- arrUnique: Ot,
402
- clamp: Lt,
403
- clearSessionStorage: Vt,
404
- copyToClipboard: $t,
405
- datetimeFormat: ar,
406
- debounce: xt,
407
- deleteCookie: Wt,
408
- diffDays: dr,
409
- duplicates: Pt,
410
- encryptSha256: er,
411
- generateRandomColor: kt,
412
- generateRandomString: Ce,
413
- generateUID: re,
414
- getAge: mr,
415
- getCookie: Bt,
416
- getCurrentDate: tr,
417
- getCurrentDateString: xe,
418
- getDeviceType: G,
419
- getLastDateByDiv: ir,
420
- getSessionStorage: Rt,
421
- getStartDateByDiv: cr,
422
- isArray: wt,
423
- isBoolean: gt,
424
- isDesktop: Dt,
425
- isEmpty: ve,
426
- isEmptyArray: J,
427
- isFunction: pt,
428
- isMobile: bt,
429
- isNull: St,
430
- isNullOrUndefined: vt,
431
- isNumber: ht,
432
- isObject: yt,
433
- isSafeEmpty: qt,
434
- isString: ft,
435
- isTablet: Tt,
436
- isUndefined: Mt,
437
- isValidDate: rr,
438
- isValidDateTime: nr,
439
- isValidEmail: Gt,
440
- isValidUrl: Jt,
441
- isValidYear: or,
442
- isValidYearMonth: sr,
443
- padLeft: Zt,
444
- padRight: Xt,
445
- random: At,
446
- removeSessionStorage: jt,
447
- round: Ft,
448
- setCookie: zt,
449
- setSessionStorage: Ht,
450
- throttle: Ct,
451
- toCamelCase: Kt
452
- }, Symbol.toStringTag, { value: "Module" })), R = (() => {
1057
+ COMMON_DATE_FORMAT: Y,
1058
+ THEME_COOKIE_NAME: Le,
1059
+ addDays: Hr,
1060
+ addMonths: Rr,
1061
+ arrAverage: cr,
1062
+ arrCount: lr,
1063
+ arrMax: ar,
1064
+ arrMin: ir,
1065
+ arrReverse: dr,
1066
+ arrSum: ur,
1067
+ arrUnique: sr,
1068
+ clamp: mr,
1069
+ clearSessionStorage: wr,
1070
+ copyToClipboard: tr,
1071
+ datetimeFormat: Br,
1072
+ debounce: Qe,
1073
+ deleteCookie: Cr,
1074
+ diffDays: Fr,
1075
+ duplicates: fr,
1076
+ encryptSha256: Ir,
1077
+ generateRandomColor: or,
1078
+ generateRandomString: kt,
1079
+ generateUID: it,
1080
+ getAge: Lr,
1081
+ getCookie: xr,
1082
+ getCurrentDate: Yr,
1083
+ getCurrentDateString: Dt,
1084
+ getDeviceType: tt,
1085
+ getLastDateByDiv: Ar,
1086
+ getSessionStorage: yr,
1087
+ getStartDateByDiv: Pr,
1088
+ isArray: Ke,
1089
+ isBoolean: Ve,
1090
+ isDesktop: nr,
1091
+ isEmpty: Tt,
1092
+ isEmptyArray: et,
1093
+ isFunction: We,
1094
+ isMobile: er,
1095
+ isNull: Ge,
1096
+ isNullOrUndefined: Ze,
1097
+ isNumber: je,
1098
+ isObject: qe,
1099
+ isSafeEmpty: br,
1100
+ isString: ze,
1101
+ isTablet: rr,
1102
+ isUndefined: Je,
1103
+ isValidDate: Nr,
1104
+ isValidDateTime: Or,
1105
+ isValidEmail: _r,
1106
+ isValidUrl: Mr,
1107
+ isValidYear: Ur,
1108
+ isValidYearMonth: Er,
1109
+ padLeft: Tr,
1110
+ padRight: kr,
1111
+ random: hr,
1112
+ removeSessionStorage: vr,
1113
+ round: pr,
1114
+ setCookie: Sr,
1115
+ setSessionStorage: gr,
1116
+ throttle: Xe,
1117
+ toCamelCase: $r
1118
+ }, Symbol.toStringTag, { value: "Module" })), ct = (() => {
453
1119
  try {
454
1120
  if (import.meta.env.DEV)
455
1121
  return !0;
@@ -457,32 +1123,114 @@ const I = "YYYYMMDD", tr = () => C(), xe = (e = I) => C().format(e), rr = (e) =>
457
1123
  }
458
1124
  return !1;
459
1125
  })();
460
- let be = [], Te = [];
461
- function fr(e) {
462
- e.devHosts && (be = e.devHosts), e.prodHosts && (Te = e.prodHosts);
1126
+ let Yt = [], Nt = [];
1127
+ function zr(t) {
1128
+ t.devHosts && (Yt = t.devHosts), t.prodHosts && (Nt = t.prodHosts);
463
1129
  }
464
- function De() {
1130
+ function Ut() {
465
1131
  if (typeof window < "u" && window.location)
466
1132
  return window.location.hostname;
467
1133
  }
468
- const ke = (() => {
469
- const e = De();
470
- return !!(e && be.includes(e));
471
- })(), Oe = (() => {
472
- const e = De();
473
- return !!(e && Te.includes(e));
1134
+ const Et = (() => {
1135
+ const t = Ut();
1136
+ return !!(t && Yt.includes(t));
1137
+ })(), Ot = (() => {
1138
+ const t = Ut();
1139
+ return !!(t && Nt.includes(t));
474
1140
  })();
475
- function hr() {
476
- return R ? "X" : ke ? "D" : Oe ? "P" : "X";
1141
+ function jr() {
1142
+ return ct ? "X" : Et ? "D" : Ot ? "P" : "X";
477
1143
  }
478
- const Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1144
+ const Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
479
1145
  __proto__: null,
480
- configureEnvUtils: fr,
481
- getEnvCode: hr,
482
- isDev: ke,
483
- isLocal: R,
484
- isProd: Oe
485
- }, Symbol.toStringTag, { value: "Module" })), k = {
1146
+ configureEnvUtils: zr,
1147
+ getEnvCode: jr,
1148
+ isDev: Et,
1149
+ isLocal: ct,
1150
+ isProd: Ot
1151
+ }, Symbol.toStringTag, { value: "Module" })), Vr = (t, e, r = "text/plain") => {
1152
+ const n = new Blob([t], { type: r }), u = URL.createObjectURL(n), l = document.createElement("a");
1153
+ l.href = u, l.download = e, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(u);
1154
+ };
1155
+ async function Wr(t) {
1156
+ try {
1157
+ return await P("SCMFILE00101", {
1158
+ crprCd: z()?.crprCd,
1159
+ sysCd: __SYS_CD__,
1160
+ fileKey: t
1161
+ }).then((r) => {
1162
+ let n;
1163
+ if (r.sub && (n = r.sub[0]), console.log(r), console.log(n), !n.lgclFileNm)
1164
+ throw console.error("논리파일명이 없습니다."), new Error("논리 파일명 누락");
1165
+ if (!n.filePath)
1166
+ throw console.error("파일 경로가 없습니다."), new Error("파일 경로 누락");
1167
+ const u = `api/download?filePath=${encodeURIComponent(
1168
+ n.filePath
1169
+ )}&logicalName=${encodeURIComponent(n.lgclFileNm)}`;
1170
+ return window.open(u, "_blank"), { success: !0, message: "파일 다운로드 요청 성공" };
1171
+ });
1172
+ } catch (e) {
1173
+ throw console.error("downloadByFileKey 함수 실행 중 오류 발생:", e), e;
1174
+ }
1175
+ }
1176
+ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1177
+ __proto__: null,
1178
+ downloadByFileKey: Wr,
1179
+ downloadFile: Vr
1180
+ }, Symbol.toStringTag, { value: "Module" })), Pt = (t, e = 3) => {
1181
+ B.success({
1182
+ content: t,
1183
+ duration: e
1184
+ });
1185
+ }, j = (t, e = 5) => {
1186
+ B.error({
1187
+ content: t,
1188
+ duration: e
1189
+ });
1190
+ }, qr = (t, e = 4) => {
1191
+ B.warning({
1192
+ content: t,
1193
+ duration: e
1194
+ });
1195
+ }, Kr = (t, e = 3) => {
1196
+ B.info({
1197
+ content: t,
1198
+ duration: e
1199
+ });
1200
+ }, Gr = (t = "처리중...") => B.loading({
1201
+ content: t,
1202
+ duration: 0
1203
+ // 수동으로 닫을 때까지 유지
1204
+ }), Jr = (t) => {
1205
+ B.destroy(t);
1206
+ }, Zr = () => {
1207
+ B.destroy();
1208
+ }, Xr = (t, e = "처리 중 오류가 발생했습니다.") => {
1209
+ const r = t?.response?.data?.message || t?.message || e;
1210
+ j(r);
1211
+ }, Qr = (t = "저장") => {
1212
+ Pt(`${t}이 완료되었습니다.`);
1213
+ }, tn = (t = "저장") => {
1214
+ j(`${t} 중 오류가 발생했습니다.`);
1215
+ }, en = (t) => {
1216
+ j(`이미 사용중인 ${t}입니다.`);
1217
+ }, rn = (t) => {
1218
+ j(`${t}을(를) 입력해주세요.`);
1219
+ }, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1220
+ __proto__: null,
1221
+ closeAllMessages: Zr,
1222
+ closeMessage: Jr,
1223
+ showApiError: Xr,
1224
+ showDuplicateError: en,
1225
+ showError: j,
1226
+ showInfo: Kr,
1227
+ showLoading: Gr,
1228
+ showRequiredError: rn,
1229
+ showSaveError: tn,
1230
+ showSaveSuccess: Qr,
1231
+ showSuccess: Pt,
1232
+ showWarning: qr
1233
+ }, Symbol.toStringTag, { value: "Module" })), I = {
486
1234
  duration: 4.5,
487
1235
  // 4.5초
488
1236
  placement: "topRight"
@@ -497,18 +1245,18 @@ class A {
497
1245
  * BwgError 전용 에러 알림
498
1246
  * @param props - 에러 메시지 설정
499
1247
  */
500
- showBwgError(t) {
1248
+ showBwgError(e) {
501
1249
  const {
502
1250
  message: r,
503
- description: o,
504
- duration: n = k.duration,
505
- placement: f = k.placement
506
- } = t;
1251
+ description: n,
1252
+ duration: u = I.duration,
1253
+ placement: l = I.placement
1254
+ } = e;
507
1255
  U.error({
508
1256
  message: `${r}`,
509
- description: o || "오류가 발생했습니다. 다시 시도해주세요.",
510
- duration: n,
511
- placement: f,
1257
+ description: n || "오류가 발생했습니다. 다시 시도해주세요.",
1258
+ duration: u,
1259
+ placement: l,
512
1260
  style: {
513
1261
  borderLeft: "4px solid #ff4d4f",
514
1262
  backgroundColor: "#fff2f0"
@@ -518,45 +1266,45 @@ class A {
518
1266
  /**
519
1267
  * 성공 알림
520
1268
  */
521
- showSuccess(t, r, o) {
1269
+ showSuccess(e, r, n) {
522
1270
  U.success({
523
- message: `${t}`,
1271
+ message: `${e}`,
524
1272
  description: r,
525
- duration: o || k.duration,
526
- placement: k.placement
1273
+ duration: n || I.duration,
1274
+ placement: I.placement
527
1275
  });
528
1276
  }
529
1277
  /**
530
1278
  * 정보 알림
531
1279
  */
532
- showInfo(t, r, o) {
1280
+ showInfo(e, r, n) {
533
1281
  U.info({
534
- message: `${t}`,
1282
+ message: `${e}`,
535
1283
  description: r,
536
- duration: o || k.duration,
537
- placement: k.placement
1284
+ duration: n || I.duration,
1285
+ placement: I.placement
538
1286
  });
539
1287
  }
540
1288
  /**
541
1289
  * 경고 알림
542
1290
  */
543
- showWarning(t, r, o) {
1291
+ showWarning(e, r, n) {
544
1292
  U.warning({
545
- message: `${t}`,
1293
+ message: `${e}`,
546
1294
  description: r,
547
- duration: o || k.duration,
548
- placement: k.placement
1295
+ duration: n || I.duration,
1296
+ placement: I.placement
549
1297
  });
550
1298
  }
551
1299
  /**
552
1300
  * 일반 에러 알림
553
1301
  */
554
- showError(t, r, o) {
1302
+ showError(e, r, n) {
555
1303
  U.error({
556
- message: `${t}`,
1304
+ message: `${e}`,
557
1305
  description: r,
558
- duration: o || k.duration,
559
- placement: k.placement
1306
+ duration: n || I.duration,
1307
+ placement: I.placement
560
1308
  });
561
1309
  }
562
1310
  /**
@@ -568,424 +1316,35 @@ class A {
568
1316
  /**
569
1317
  * 특정 키의 알림 닫기
570
1318
  */
571
- close(t) {
1319
+ close(e) {
572
1320
  U.destroy();
573
1321
  }
574
1322
  }
575
- const N = A.getInstance(), oe = (e) => {
576
- N.showBwgError(e);
577
- }, gr = (e, t, r) => {
578
- N.showSuccess(e, t, r);
579
- }, se = (e, t, r) => {
580
- N.showInfo(e, t, r);
581
- }, ne = (e, t, r) => {
582
- N.showWarning(e, t, r);
583
- }, pr = (e, t, r) => {
584
- N.showError(e, t, r);
585
- }, yr = () => {
1323
+ const N = A.getInstance(), Ht = (t) => {
1324
+ N.showBwgError(t);
1325
+ }, nn = (t, e, r) => {
1326
+ N.showSuccess(t, e, r);
1327
+ }, Ft = (t, e, r) => {
1328
+ N.showInfo(t, e, r);
1329
+ }, Lt = (t, e, r) => {
1330
+ N.showWarning(t, e, r);
1331
+ }, on = (t, e, r) => {
1332
+ N.showError(t, e, r);
1333
+ }, sn = () => {
586
1334
  N.destroy();
587
- }, wr = (e) => {
588
- N.close(e);
589
- }, Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1335
+ }, an = (t) => {
1336
+ N.close(t);
1337
+ }, zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
590
1338
  __proto__: null,
591
- closeNotification: wr,
592
- destroyNotifications: yr,
593
- notiBwgError: oe,
594
- notiError: pr,
595
- notiInfo: se,
596
- notiSuccess: gr,
597
- notiWarning: ne,
1339
+ closeNotification: an,
1340
+ destroyNotifications: sn,
1341
+ notiBwgError: Ht,
1342
+ notiError: on,
1343
+ notiInfo: Ft,
1344
+ notiSuccess: nn,
1345
+ notiWarning: Lt,
598
1346
  notificationService: N
599
- }, Symbol.toStringTag, { value: "Module" }));
600
- let O = null;
601
- const ae = async (e) => {
602
- if (O === null)
603
- if (e === void 0)
604
- try {
605
- let r = (await ee.get("/api/ip")).data.trim();
606
- r = r.replace(/\s+/g, ""), O = r;
607
- } catch (t) {
608
- console.warn("IP 가져오기 실패:", t), O = "unknown";
609
- }
610
- else
611
- O = e;
612
- }, Sr = () => O, Mr = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), O || "unknown");
613
- class x extends Error {
614
- constructor(t, r, o, n, f) {
615
- super(t), this.name = "ApiError", this.detailMsg = r, this.response = o, this.msgCd = n, this.errorType = f, Error.captureStackTrace && Error.captureStackTrace(this, x);
616
- }
617
- }
618
- const q = {
619
- method: "POST",
620
- timeout: 3e4,
621
- // 30초
622
- withCredentials: !0,
623
- // 쿠키 포함
624
- showLoading: !0,
625
- isPopup: !1,
626
- showError: !0,
627
- retryCount: 0,
628
- retryDelay: 1e3
629
- }, j = ee.create({
630
- timeout: q.timeout,
631
- withCredentials: q.withCredentials,
632
- headers: {
633
- "Content-Type": "application/json; charset=utf-8",
634
- Accept: "application/json; charset=utf-8",
635
- "Apm-Guid": re()
636
- }
637
- });
638
- j.interceptors.request.use(
639
- (e) => {
640
- e.showLoading && !e.isPopup && X.getState().showLoading(), e.showLoading && e.isPopup && Q.getState().showLoading();
641
- let t = "UNKNOWN";
642
- (/* @__PURE__ */ new Date()).getTime();
643
- try {
644
- e.data && e.data.header ? t = e.data.header.trxCd || "UNKNOWN" : e.params && e.params.header && (t = e.params.header.trxCd || "UNKNOWN");
645
- } catch (o) {
646
- console.warn("trxCd/guid 추출 실패:", o);
647
- }
648
- e.trxCd = t, e.requestStartTime = Date.now(), console.log(
649
- `🚀 API 요청 시작 [거래코드: ${t} / 서비스요청자: ${L()?.userId}]`
650
- );
651
- const r = localStorage.getItem("accessToken");
652
- return r && (e.headers.Authorization = `Bearer ${r}`), e.headers["Content-Type"] = "application/json; charset=UTF-8", e.headers.Accept = "application/json; charset=UTF-8", e;
653
- },
654
- (e) => (console.error("❌ 요청 인터셉터 에러:", e), Promise.reject(e))
655
- );
656
- j.interceptors.response.use(
657
- (e) => {
658
- e.config.showLoading && !e.config.isPopup && X.getState().hideLoading(), e.config.isPopup && Q.getState().hideLoading();
659
- let t = "UNKNOWN", r = "UNKNOWN";
660
- const o = (/* @__PURE__ */ new Date()).getTime();
661
- try {
662
- e.config.trxCd && (t = e.config.trxCd), e.config.guid ? r = e.config.guid : e.data && e.data.header && e.data.header.trxCd ? (t = e.data.header.trxCd, r = e.data.header.guid || "UNKNOWN") : e.config.data && e.config.data.header ? (t = e.config.data.header.trxCd || "UNKNOWN", r = e.config.data.header.guid || "UNKNOWN") : e.config.params && e.config.params.header && (t = e.config.params.header.trxCd || "UNKNOWN", r = e.config.params.header.guid || "UNKNOWN");
663
- } catch (f) {
664
- console.warn("trxCd/guid 추출 실패:", f);
665
- }
666
- let n = 0;
667
- return e.config.requestStartTime && (n = o - e.config.requestStartTime), console.log(
668
- `✅ API 응답 성공 [거래코드: ${t} / GUID : ${r}] - (소요시간: ${n}ms)`
669
- ), e;
670
- },
671
- async (e) => {
672
- if (e.config && e.config.showLoading && !e.config.isPopup && X.getState().hideLoading(), e.config && e.config.isPopup && Q.getState().hideLoading(), console.error("❌ API 응답 에러:", e), R && console.error("🚨 Error Details:", {
673
- message: e.message,
674
- status: e.response?.status,
675
- statusText: e.response?.statusText,
676
- data: e.response?.data,
677
- config: {
678
- url: e.config?.url,
679
- method: e.config?.method,
680
- baseURL: e.config?.baseURL
681
- }
682
- }), e.response?.status === 401) {
683
- const t = localStorage.getItem("refreshToken");
684
- if (t)
685
- try {
686
- const r = await ee.post("/auth/refresh", {
687
- refreshToken: t
688
- });
689
- if (r.data.accessToken) {
690
- localStorage.setItem(
691
- "accessToken",
692
- r.data.accessToken
693
- );
694
- const o = e.config;
695
- if (o)
696
- return o.headers.Authorization = `Bearer ${r.data.accessToken}`, j(o);
697
- }
698
- } catch {
699
- localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
700
- }
701
- }
702
- return Promise.reject(e);
703
- }
704
- );
705
- const _ = async (e, t, r) => {
706
- try {
707
- const o = {
708
- ...q,
709
- ...r
710
- }, { activeMenuId: n } = le.getState();
711
- if (O === null) {
712
- const l = Date.now();
713
- await ae();
714
- const a = Date.now();
715
- console.log(`[INFO] IP 조회 소요시간: ${a - l}ms`);
716
- }
717
- const f = {
718
- method: o.method,
719
- url: "/api/service",
720
- timeout: o.timeout,
721
- withCredentials: o.withCredentials,
722
- showLoading: o.showLoading,
723
- isPopup: o.isPopup
724
- };
725
- o.headers && (f.headers = o.headers);
726
- const h = O || "unknown", M = __APP_CD__, d = __SYS_CD__, g = {
727
- header: {
728
- trxCd: e,
729
- userInfo: L(),
730
- clientIp: h,
731
- // 클라이언트 IP 추가 (서버에서 재확인 권장)
732
- domainId: "DEFAULT",
733
- appCd: M,
734
- sysCd: d,
735
- screenId: n
736
- },
737
- // data: bxmEncrypt(JSON.stringify(data)),
738
- data: t
739
- };
740
- o.method === "GET" ? f.params = g || o.params : (f.data = g || o.data, o.params && (f.params = o.params));
741
- let m;
742
- for (let l = 0; l <= (o.retryCount || 0); l++)
743
- try {
744
- const a = await j(f);
745
- if (a.data.header?.resCd == 0) {
746
- for (const c in a.data)
747
- if (c !== "header")
748
- return a.data[c];
749
- return {};
750
- } else {
751
- const c = a.data.header, i = c?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", s = c?.msgs?.detailMsgs || i, u = c?.msgCd, p = c?.msgs?.type;
752
- throw new x(i, s, a, u, p);
753
- }
754
- } catch (a) {
755
- if (a.isAxiosError && a.response) {
756
- const c = a, i = c.response, s = i.data, u = s?.header?.msgs?.basicMsg || c.message || // 실패 시 Axios 에러 메시지 사용
757
- "서버에서 오류가 발생했습니다.", p = s?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
758
- (typeof i.data == "string" ? i.data : JSON.stringify(i.data)) || u, y = s?.header?.msgCd, w = s?.header?.msgs?.type;
759
- m = new x(
760
- u,
761
- p,
762
- i,
763
- y,
764
- w
765
- );
766
- } else
767
- m = a;
768
- if (a.isAxiosError && Ne(a) && l < (o.retryCount || 0)) {
769
- await _e(o.retryDelay || 1e3);
770
- continue;
771
- }
772
- break;
773
- }
774
- if (m) {
775
- if (o.showError) {
776
- const l = m instanceof x ? m.message : "요청 처리 중 오류가 발생했습니다.", a = m instanceof x ? m.msgCd : "요청 처리 중 오류가 발생했습니다.", c = m instanceof x ? m.detailMsg : m.message, i = m instanceof x ? m.errorType : "";
777
- a?.startsWith("BXM") ? oe({
778
- message: l,
779
- description: c,
780
- duration: 5
781
- }) : i == "I" ? se(l, c, 5) : ne(l, c, 5);
782
- }
783
- throw m;
784
- }
785
- throw new Error("알 수 없는 API 오류가 발생했습니다.");
786
- } catch (o) {
787
- throw console.error("callService 최종 에러:", o), o;
788
- }
789
- }, vr = async (e, t, r, o) => {
790
- try {
791
- const n = {
792
- ...q,
793
- ...o
794
- }, { activeMenuId: f } = le.getState();
795
- if (O === null) {
796
- const a = Date.now();
797
- await ae();
798
- const c = Date.now();
799
- console.log(`[INFO] IP 조회 소요시간: ${c - a}ms`);
800
- }
801
- const h = {
802
- method: n.method,
803
- url: "/api/" + e + "/service",
804
- timeout: n.timeout,
805
- withCredentials: n.withCredentials,
806
- showLoading: n.showLoading,
807
- isPopup: n.isPopup
808
- };
809
- n.headers && (h.headers = n.headers);
810
- const M = O || "unknown", d = __APP_CD__, g = __SYS_CD__, m = {
811
- header: {
812
- trxCd: t,
813
- userInfo: L(),
814
- clientIp: M,
815
- // 클라이언트 IP 추가 (서버에서 재확인 권장)
816
- domainId: "DEFAULT",
817
- appCd: d,
818
- sysCd: g,
819
- screenId: f
820
- },
821
- // data: bxmEncrypt(JSON.stringify(data)),
822
- data: r
823
- };
824
- R && console.log("__BWG_LOCAL__ 테스트 입니다. ", R), n.method === "GET" ? h.params = m || n.params : (h.data = m || n.data, n.params && (h.params = n.params));
825
- let l;
826
- for (let a = 0; a <= (n.retryCount || 0); a++)
827
- try {
828
- const c = await j(h);
829
- if (c.data.header?.resCd == 0) {
830
- for (const i in c.data)
831
- if (i !== "header")
832
- return c.data[i];
833
- return {};
834
- } else {
835
- const i = c.data.header, s = i?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", u = i?.msgs?.detailMsgs || s, p = i?.msgCd, y = i?.msgs?.type;
836
- throw new x(s, u, c, p, y);
837
- }
838
- } catch (c) {
839
- if (c.isAxiosError && c.response) {
840
- const i = c, s = i.response, u = s.data, p = u?.header?.msgs?.basicMsg || i.message || // 실패 시 Axios 에러 메시지 사용
841
- "서버에서 오류가 발생했습니다.", y = u?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
842
- (typeof s.data == "string" ? s.data : JSON.stringify(s.data)) || p, w = u?.header?.msgCd, v = u?.header?.msgs?.type;
843
- l = new x(
844
- p,
845
- y,
846
- s,
847
- w,
848
- v
849
- );
850
- } else
851
- l = c;
852
- if (c.isAxiosError && Ne(c) && a < (n.retryCount || 0)) {
853
- await _e(n.retryDelay || 1e3);
854
- continue;
855
- }
856
- break;
857
- }
858
- if (l) {
859
- if (n.showError) {
860
- const a = l instanceof x ? l.message : "요청 처리 중 오류가 발생했습니다.", c = l instanceof x ? l.msgCd : "요청 처리 중 오류가 발생했습니다.", i = l instanceof x ? l.detailMsg : l.message, s = l instanceof x ? l.errorType : "";
861
- c?.startsWith("BXM") ? oe({
862
- message: a,
863
- description: i,
864
- duration: 5
865
- }) : s == "I" ? se(a, i, 5) : ne(a, i, 5);
866
- }
867
- throw l;
868
- }
869
- throw new Error("알 수 없는 API 오류가 발생했습니다.");
870
- } catch (n) {
871
- throw console.error("callService 최종 에러:", n), n;
872
- }
873
- }, Ne = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, _e = (e) => new Promise((t) => setTimeout(t, e)), Cr = (e, t, r) => _(e, t, { ...r, method: "GET" }), xr = (e, t, r) => _(e, t, { ...r, method: "POST" }), $r = (e, t, r) => _(e, t, { ...r, method: "PUT" }), br = (e, t, r) => _(e, t, { ...r, method: "DELETE" }), Tr = (e, t, r) => _(e, t, { ...r, method: "PATCH" }), Dr = async (e, t, r) => {
874
- try {
875
- const o = await fetch("/api/permissions", {
876
- method: "POST",
877
- headers: {
878
- "Content-Type": "application/json"
879
- },
880
- body: JSON.stringify({
881
- userId: e,
882
- menuId: t,
883
- popupId: r
884
- })
885
- });
886
- if (!o.ok)
887
- throw new Error(`권한 확인 실패: ${o.status}`);
888
- return await o.json();
889
- } catch (o) {
890
- throw console.error("권한 확인 서비스 오류:", o), o;
891
- }
892
- }, Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
893
- __proto__: null,
894
- ApiError: x,
895
- apiDelete: br,
896
- apiGet: Cr,
897
- apiPatch: Tr,
898
- apiPost: xr,
899
- apiPut: $r,
900
- callService: _,
901
- callService_SYSCD: vr,
902
- getClientIp: Sr,
903
- getPermissionService: Dr,
904
- setClientIp: ae,
905
- verifyClientIp: Mr
906
- }, Symbol.toStringTag, { value: "Module" })), kr = (e, t, r = "text/plain") => {
907
- const o = new Blob([e], { type: r }), n = URL.createObjectURL(o), f = document.createElement("a");
908
- f.href = n, f.download = t, document.body.appendChild(f), f.click(), document.body.removeChild(f), URL.revokeObjectURL(n);
909
- };
910
- async function Or(e) {
911
- try {
912
- return await _("SCMFILE00101", {
913
- crprCd: L()?.crprCd,
914
- sysCd: __SYS_CD__,
915
- fileKey: e
916
- }).then((r) => {
917
- let o;
918
- if (r.sub && (o = r.sub[0]), console.log(r), console.log(o), !o.lgclFileNm)
919
- throw console.error("논리파일명이 없습니다."), new Error("논리 파일명 누락");
920
- if (!o.filePath)
921
- throw console.error("파일 경로가 없습니다."), new Error("파일 경로 누락");
922
- const n = `api/download?filePath=${encodeURIComponent(
923
- o.filePath
924
- )}&logicalName=${encodeURIComponent(o.lgclFileNm)}`;
925
- return window.open(n, "_blank"), { success: !0, message: "파일 다운로드 요청 성공" };
926
- });
927
- } catch (t) {
928
- throw console.error("downloadByFileKey 함수 실행 중 오류 발생:", t), t;
929
- }
930
- }
931
- const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
932
- __proto__: null,
933
- downloadByFileKey: Or,
934
- downloadFile: kr
935
- }, Symbol.toStringTag, { value: "Module" })), Pe = (e, t = 3) => {
936
- E.success({
937
- content: e,
938
- duration: t
939
- });
940
- }, V = (e, t = 5) => {
941
- E.error({
942
- content: e,
943
- duration: t
944
- });
945
- }, Yr = (e, t = 4) => {
946
- E.warning({
947
- content: e,
948
- duration: t
949
- });
950
- }, Ir = (e, t = 3) => {
951
- E.info({
952
- content: e,
953
- duration: t
954
- });
955
- }, Nr = (e = "처리중...") => E.loading({
956
- content: e,
957
- duration: 0
958
- // 수동으로 닫을 때까지 유지
959
- }), _r = (e) => {
960
- E.destroy(e);
961
- }, Ur = () => {
962
- E.destroy();
963
- }, Er = (e, t = "처리 중 오류가 발생했습니다.") => {
964
- const r = e?.response?.data?.message || e?.message || t;
965
- V(r);
966
- }, Pr = (e = "저장") => {
967
- Pe(`${e}이 완료되었습니다.`);
968
- }, Ar = (e = "저장") => {
969
- V(`${e} 중 오류가 발생했습니다.`);
970
- }, Lr = (e) => {
971
- V(`이미 사용중인 ${e}입니다.`);
972
- }, Fr = (e) => {
973
- V(`${e}을(를) 입력해주세요.`);
974
- }, Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
975
- __proto__: null,
976
- closeAllMessages: Ur,
977
- closeMessage: _r,
978
- showApiError: Er,
979
- showDuplicateError: Lr,
980
- showError: V,
981
- showInfo: Ir,
982
- showLoading: Nr,
983
- showRequiredError: Fr,
984
- showSaveError: Ar,
985
- showSaveSuccess: Pr,
986
- showSuccess: Pe,
987
- showWarning: Yr
988
- }, Symbol.toStringTag, { value: "Module" })), Hr = {
1347
+ }, Symbol.toStringTag, { value: "Module" })), cn = {
989
1348
  /*************************************************************************************************************************************************
990
1349
  * RealGrid2 use
991
1350
  *************************************************************************************************************************************************/
@@ -1285,15 +1644,15 @@ const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1285
1644
  bg_gray01: {
1286
1645
  background: "#cdcdcd"
1287
1646
  }
1288
- }, Rr = async (e) => {
1289
- if (e.map((t) => {
1290
- t.status = "uploading", t.percent = 10, console.log(t);
1291
- }), !e || !Array.isArray(e) || e.length === 0) {
1647
+ }, un = async (t) => {
1648
+ if (t.map((e) => {
1649
+ e.status = "uploading", e.percent = 10, console.log(e);
1650
+ }), !t || !Array.isArray(t) || t.length === 0) {
1292
1651
  alert("업로드할 파일을 선택해주세요.");
1293
1652
  return;
1294
1653
  }
1295
1654
  try {
1296
- const t = {
1655
+ const e = {
1297
1656
  //로컬 VM 설정-----------------------------------------
1298
1657
  // sftpHost: "localhost",
1299
1658
  // sftpPort: "2222",
@@ -1304,46 +1663,46 @@ const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1304
1663
  //-------------------------------------------
1305
1664
  remoteDir: "/home/krxuser/bkrx/files/testForGW",
1306
1665
  useOriginalName: "true"
1307
- }, r = e.map(async (h, M) => {
1308
- const d = new FormData();
1309
- Object.entries(t).forEach(([l, a]) => {
1310
- d.append(l, a);
1666
+ }, r = t.map(async (g, b) => {
1667
+ const p = new FormData();
1668
+ Object.entries(e).forEach(([v, h]) => {
1669
+ p.append(v, h);
1311
1670
  });
1312
- const g = h.originFileObj;
1313
- d.append("file", g);
1314
- const m = await fetch("/api/gw-sftp", {
1671
+ const y = g.originFileObj;
1672
+ p.append("file", y);
1673
+ const w = await fetch("/api/gw-sftp", {
1315
1674
  method: "POST",
1316
- body: d
1675
+ body: p
1317
1676
  });
1318
- return m.ok ? (console.log(e), e.map(
1319
- (l) => l === h ? {
1320
- ...l,
1677
+ return w.ok ? (console.log(t), t.map(
1678
+ (v) => v === g ? {
1679
+ ...v,
1321
1680
  status: "success",
1322
1681
  percent: 100
1323
- } : l
1324
- )) : h.status = "done", { index: M, response: m, fileName: g.name };
1325
- }), o = await Promise.all(r), n = o.filter((h) => h.response.ok).length, f = o.length - n;
1326
- if (n === o.length)
1327
- return alert(`${n}개 파일 업로드가 완료되었습니다.`), {
1682
+ } : v
1683
+ )) : g.status = "done", { index: b, response: w, fileName: y.name };
1684
+ }), n = await Promise.all(r), u = n.filter((g) => g.response.ok).length, l = n.length - u;
1685
+ if (u === n.length)
1686
+ return alert(`${u}개 파일 업로드가 완료되었습니다.`), {
1328
1687
  result: "success",
1329
- message: `${n}개 파일 업로드가 완료되었습니다.`,
1330
- successCount: n,
1331
- failCount: f
1688
+ message: `${u}개 파일 업로드가 완료되었습니다.`,
1689
+ successCount: u,
1690
+ failCount: l
1332
1691
  };
1333
- if (n > 0) {
1334
- const h = `${n}개 성공, ${f}개 실패`;
1335
- return alert(h), {
1692
+ if (u > 0) {
1693
+ const g = `${u}개 성공, ${l}개 실패`;
1694
+ return alert(g), {
1336
1695
  result: "partial",
1337
- message: h,
1338
- successCount: n,
1339
- failCount: f
1696
+ message: g,
1697
+ successCount: u,
1698
+ failCount: l
1340
1699
  };
1341
1700
  }
1342
1701
  return alert("모든 파일 업로드에 실패했습니다."), {
1343
1702
  result: "error",
1344
1703
  message: "모든 파일 업로드에 실패했습니다.",
1345
- successCount: n,
1346
- failCount: f
1704
+ successCount: u,
1705
+ failCount: l
1347
1706
  };
1348
1707
  } catch {
1349
1708
  return alert("파일 업로드 중 오류가 발생했습니다."), {
@@ -1351,189 +1710,441 @@ const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1351
1710
  message: "파일 업로드 중 오류가 발생했습니다."
1352
1711
  };
1353
1712
  }
1354
- }, qr = async (e, t, r) => {
1713
+ }, kn = async (t, e, r) => {
1355
1714
  const {
1356
- trxCd: o = "SCMINTF00102",
1357
- connInfo: n = {},
1358
- openDraft: f = !0,
1359
- draftUrlBase: h = "https://dev.bwg.co.kr:5510",
1360
- windowFeatures: M = "width=1000,height=600"
1361
- } = r || {}, d = e ?? {}, g = Array.isArray(t) ? t : void 0;
1362
- if (g && Array.isArray(g) && g.length > 0) {
1363
- const a = await Rr(g);
1364
- if (!a || a.result !== "success")
1365
- throw new Error(a?.message || "파일 업로드 실패");
1715
+ trxCd: n = "SCMINTF00102",
1716
+ connInfo: u = {},
1717
+ openDraft: l = !0,
1718
+ draftUrlBase: g = "https://dev.bwg.co.kr:5510",
1719
+ windowFeatures: b = "width=1000,height=600",
1720
+ fetchFilesTrxCd: p = "SCMFILE00101"
1721
+ } = r || {}, y = t ?? {}, w = y.aprvKey || it(), v = y.docTitle || "제목없음", h = await P("SCMINTF00101", {
1722
+ crprCd: V(),
1723
+ sysCd: __SYS_CD__,
1724
+ aprvKey: w
1725
+ });
1726
+ if (Array.isArray(h?.sub) && h.sub.length >= 1) {
1727
+ if (console.log("이미 승인된 기안입니다."), l) {
1728
+ const c = `${g}?key=${w}&docTitle=${v}`;
1729
+ window.open(c, "_blank", b);
1730
+ }
1731
+ return { skipped: !0, alreadyDrafted: !0, draftedRes: h };
1732
+ }
1733
+ let f;
1734
+ if (e) {
1735
+ const c = await P(p, {
1736
+ crprCd: V(),
1737
+ sysCd: __SYS_CD__,
1738
+ fileGrpKey: e
1739
+ }), S = Array.isArray(c?.sub) ? c.sub.filter((i) => i?.filePath && i?.lgclFileNm).map((i) => ({
1740
+ filePath: i.filePath,
1741
+ lgclFileNm: i.lgclFileNm
1742
+ })) : [];
1743
+ console.log("@@ files", S);
1744
+ const o = S.map(async ({ filePath: i, lgclFileNm: d }) => {
1745
+ const x = `/api/download?filePath=${encodeURIComponent(
1746
+ i
1747
+ )}&logicalName=${encodeURIComponent(d)}`, C = await fetch(x, { method: "GET" });
1748
+ if (!C.ok)
1749
+ throw new Error(`다운로드 실패: ${d}`);
1750
+ const $ = await C.blob();
1751
+ return { originFileObj: new File([$], d, {
1752
+ type: $.type || "application/octet-stream"
1753
+ }), name: d, status: "ready" };
1754
+ }), a = await Promise.all(o);
1755
+ if (S.length) {
1756
+ const i = await un(a);
1757
+ if (!i || i.result !== "success")
1758
+ throw new Error(i?.message || "파일 업로드 실패");
1759
+ f = a;
1760
+ }
1366
1761
  }
1367
1762
  const m = {
1368
- crprCd: ge(),
1369
- aprvKey: d.aprvKey || re(),
1763
+ ...y,
1764
+ crprCd: V(),
1765
+ aprvKey: w,
1370
1766
  sysCd: __SYS_CD__,
1371
- draftDt: xe("YYYYMMDD"),
1767
+ draftDt: Dt("YYYYMMDD"),
1768
+ docTitle: v,
1372
1769
  /**
1373
1770
  * 해당 그룹웨어 연계데이터는 추후 추가수정 필요
1374
1771
  * +) 기안연계가 DB로 넣는것 외에 soap를 통한 파라미터 전달 & SAP방식 등등 여러개로 나눠진다고함..
1375
1772
  * 해당 내용들은 공통화하기 힘들어 json & rest 방식으로 연계만 공통화 할듯함.
1376
1773
  */
1377
- fileInfoList: g,
1378
- // 그룹웨어 파일연계
1379
- connInfo: n,
1774
+ fileInfoList: f,
1775
+ // 그룹웨어 파일연계 (fileGrpKey 기반 다운로드 파일)
1776
+ connInfo: u
1380
1777
  // 그룹웨어 기안연계
1381
- ...d
1382
- }, l = await _(o, m);
1383
- if (f && d?.aprvKey) {
1384
- const a = `${h}?key=${d.aprvKey}&docTitle=${d.docTitle}`;
1385
- window.open(a, "_blank", M);
1778
+ }, s = await P(n, m);
1779
+ if (l && m?.aprvKey) {
1780
+ const c = `${g}?key=${m.aprvKey}&docTitle=${m.docTitle}`;
1781
+ window.open(c, "_blank", b);
1782
+ }
1783
+ return s;
1784
+ }, Dn = gt, In = It, Yn = Bt, Nn = At, Un = Rt, En = zt, On = St, Bn = _t, An = {
1785
+ ...gt,
1786
+ ...It,
1787
+ ...Bt,
1788
+ ...At,
1789
+ ...Rt,
1790
+ ...zt,
1791
+ ...St,
1792
+ ..._t,
1793
+ realFormat: cn
1794
+ };
1795
+ class O extends Error {
1796
+ constructor(e, r, n, u, l) {
1797
+ super(e), this.name = "ApiError", this.detailMsg = r, this.response = n, this.msgCd = u, this.errorType = l, Error.captureStackTrace && Error.captureStackTrace(this, O);
1798
+ }
1799
+ }
1800
+ let E = null;
1801
+ const st = {
1802
+ method: "POST",
1803
+ timeout: 3e4,
1804
+ // 30초
1805
+ withCredentials: !0,
1806
+ // 쿠키 포함
1807
+ showLoading: !0,
1808
+ isPopup: !1,
1809
+ showError: !0,
1810
+ retryCount: 0,
1811
+ retryDelay: 1e3
1812
+ }, X = at.create({
1813
+ timeout: st.timeout,
1814
+ withCredentials: st.withCredentials,
1815
+ headers: {
1816
+ "Content-Type": "application/json; charset=utf-8",
1817
+ Accept: "application/json; charset=utf-8",
1818
+ "Apm-Guid": it()
1819
+ }
1820
+ });
1821
+ X.interceptors.request.use(
1822
+ (t) => {
1823
+ t.showLoading && !t.isPopup && nt.getState().showLoading(), t.showLoading && t.isPopup && ot.getState().showLoading();
1824
+ let e = "UNKNOWN";
1825
+ (/* @__PURE__ */ new Date()).getTime();
1826
+ try {
1827
+ t.data && t.data.header ? e = t.data.header.trxCd || "UNKNOWN" : t.params && t.params.header && (e = t.params.header.trxCd || "UNKNOWN");
1828
+ } catch (n) {
1829
+ console.warn("trxCd/guid 추출 실패:", n);
1830
+ }
1831
+ t.trxCd = e, t.requestStartTime = Date.now(), console.log(
1832
+ `🚀 API 요청 시작 [거래코드: ${e} / 서비스요청자: ${z()?.userId}]`
1833
+ );
1834
+ const r = localStorage.getItem("accessToken");
1835
+ return r && (t.headers.Authorization = `Bearer ${r}`), t.headers["Content-Type"] = "application/json; charset=UTF-8", t.headers.Accept = "application/json; charset=UTF-8", t;
1836
+ },
1837
+ (t) => (console.error("❌ 요청 인터셉터 에러:", t), Promise.reject(t))
1838
+ );
1839
+ X.interceptors.response.use(
1840
+ (t) => {
1841
+ t.config.showLoading && !t.config.isPopup && nt.getState().hideLoading(), t.config.isPopup && ot.getState().hideLoading();
1842
+ let e = "UNKNOWN", r = "UNKNOWN";
1843
+ const n = (/* @__PURE__ */ new Date()).getTime();
1844
+ try {
1845
+ t.config.trxCd && (e = t.config.trxCd), t.config.guid ? r = t.config.guid : t.data && t.data.header && t.data.header.trxCd ? (e = t.data.header.trxCd, r = t.data.header.guid || "UNKNOWN") : t.config.data && t.config.data.header ? (e = t.config.data.header.trxCd || "UNKNOWN", r = t.config.data.header.guid || "UNKNOWN") : t.config.params && t.config.params.header && (e = t.config.params.header.trxCd || "UNKNOWN", r = t.config.params.header.guid || "UNKNOWN");
1846
+ } catch (l) {
1847
+ console.warn("trxCd/guid 추출 실패:", l);
1848
+ }
1849
+ let u = 0;
1850
+ return t.config.requestStartTime && (u = n - t.config.requestStartTime), console.log(
1851
+ `✅ API 응답 성공 [거래코드: ${e} / GUID : ${r}] - (소요시간: ${u}ms)`
1852
+ ), t;
1853
+ },
1854
+ async (t) => {
1855
+ if (t.config && t.config.showLoading && !t.config.isPopup && nt.getState().hideLoading(), t.config && t.config.isPopup && ot.getState().hideLoading(), console.error("❌ API 응답 에러:", t), ct && console.error("🚨 Error Details:", {
1856
+ message: t.message,
1857
+ status: t.response?.status,
1858
+ statusText: t.response?.statusText,
1859
+ data: t.response?.data,
1860
+ config: {
1861
+ url: t.config?.url,
1862
+ method: t.config?.method,
1863
+ baseURL: t.config?.baseURL
1864
+ }
1865
+ }), t.response?.status === 401) {
1866
+ const e = localStorage.getItem("refreshToken");
1867
+ if (e)
1868
+ try {
1869
+ const r = await at.post("/auth/refresh", {
1870
+ refreshToken: e
1871
+ });
1872
+ if (r.data.accessToken) {
1873
+ localStorage.setItem(
1874
+ "accessToken",
1875
+ r.data.accessToken
1876
+ );
1877
+ const n = t.config;
1878
+ if (n)
1879
+ return n.headers.Authorization = `Bearer ${r.data.accessToken}`, X(n);
1880
+ }
1881
+ } catch {
1882
+ localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
1883
+ }
1884
+ }
1885
+ return Promise.reject(t);
1886
+ }
1887
+ );
1888
+ const ln = async () => {
1889
+ if (E === null) {
1890
+ const t = Date.now();
1891
+ await Vt();
1892
+ const e = Date.now();
1893
+ console.log(`[INFO] IP 조회 소요시간: ${e - t}ms`);
1894
+ }
1895
+ }, dn = (t, e, r, n) => {
1896
+ const { activeMenuId: u } = Qt.getState();
1897
+ return {
1898
+ header: {
1899
+ trxCd: t,
1900
+ userInfo: z(),
1901
+ clientIp: r,
1902
+ domainId: "DEFAULT",
1903
+ sysCd: n.sysCd,
1904
+ appItDd: n.appItCd,
1905
+ appCd: n.appCd,
1906
+ screenId: u
1907
+ },
1908
+ // 추후 암호화(bxmEncrypt) 가능 지점
1909
+ data: e
1910
+ };
1911
+ }, fn = (t, e, r) => {
1912
+ const n = {
1913
+ method: e.method,
1914
+ url: t,
1915
+ timeout: e.timeout,
1916
+ withCredentials: e.withCredentials,
1917
+ showLoading: e.showLoading,
1918
+ isPopup: e.isPopup,
1919
+ headers: {
1920
+ ...e.headers || {}
1921
+ }
1922
+ };
1923
+ return e.method === "GET" ? (n.params = r || e.params, e.params && (n.params = e.params)) : (n.data = r || e.data, e.params && (n.params = e.params)), n;
1924
+ }, hn = async (t, e) => {
1925
+ let r;
1926
+ const n = e.retryCount || 0, u = e.retryDelay || 1e3;
1927
+ for (let l = 0; l <= n; l++)
1928
+ try {
1929
+ const g = await X(t);
1930
+ if (g.data?.header?.resCd == 0)
1931
+ return pn(g.data);
1932
+ const b = g.data?.header || {}, p = b?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", y = b?.msgs?.detailMsgs || p, w = b?.msgCd, v = b?.msgs?.type;
1933
+ throw new O(p, y, g, w, v);
1934
+ } catch (g) {
1935
+ if (r = mn(g), g?.isAxiosError && yn(g) && l < n) {
1936
+ await vn(u);
1937
+ continue;
1938
+ }
1939
+ break;
1940
+ }
1941
+ throw r ? (gn(r, e), r) : new Error("알 수 없는 API 오류가 발생했습니다.");
1942
+ }, mn = (t) => {
1943
+ if (t?.isAxiosError && t.response) {
1944
+ const e = t, r = e.response, n = r.data, u = n?.header?.msgs?.basicMsg || e.message || "서버에서 오류가 발생했습니다.", l = n?.header?.msgs?.detailMsgs || (typeof r.data == "string" ? r.data : JSON.stringify(r.data)) || u, g = n?.header?.msgCd, b = n?.header?.msgs?.type;
1945
+ return new O(u, l, r, g, b);
1946
+ }
1947
+ return t instanceof O, t;
1948
+ }, pn = (t) => {
1949
+ if (!t || typeof t != "object")
1950
+ return {};
1951
+ for (const e in t)
1952
+ if (Object.prototype.hasOwnProperty.call(t, e) && e !== "header")
1953
+ return t[e];
1954
+ return {};
1955
+ }, gn = (t, e) => {
1956
+ if (!e.showError) return;
1957
+ const r = t instanceof O, n = r ? t.message : "요청 처리 중 오류가 발생했습니다.", u = r ? t.msgCd : "요청 처리 중 오류가 발생했습니다.", l = r ? t.detailMsg : t.message, g = r ? t.errorType : "";
1958
+ u && u.startsWith?.("BXM") ? Ht({
1959
+ message: n,
1960
+ description: l,
1961
+ duration: 5
1962
+ }) : g === "I" ? Ft(n, l, 5) : Lt(n, l, 5);
1963
+ }, jt = async (t, e, r, n, u) => {
1964
+ console.log("## callService 호출"), console.log(`## 전역 :: ${__SYS_CD__} | ${__APP_CD__} | ${u} | ${e}`);
1965
+ const l = Xt().findByAppCd(u ?? __APP_CD__);
1966
+ if (!l || !l.sysCd)
1967
+ return console.error("해당 앱코드는 존재하지 않습니다.", u), Promise.reject(new Error("해당 앱코드는 존재하지 않습니다."));
1968
+ await ln();
1969
+ const g = {
1970
+ ...st,
1971
+ ...n
1972
+ }, b = dn(
1973
+ e,
1974
+ r,
1975
+ Wt() || "unknown",
1976
+ l
1977
+ ), p = fn(t, g, b);
1978
+ try {
1979
+ return await hn(p, g);
1980
+ } catch (y) {
1981
+ throw console.error("callService 최종 에러:", y), y;
1982
+ }
1983
+ }, yn = (t) => !t.response || t.response.status >= 500 && t.response.status < 600, vn = (t) => new Promise((e) => setTimeout(e, t)), Vt = async (t) => {
1984
+ if (E === null)
1985
+ if (t === void 0)
1986
+ try {
1987
+ let r = (await at.get("/api/ip")).data.trim();
1988
+ r = r.replace(/\s+/g, ""), E = r;
1989
+ } catch (e) {
1990
+ console.warn("IP 가져오기 실패:", e), E = "unknown";
1991
+ }
1992
+ else
1993
+ E = t;
1994
+ }, Wt = () => E, wn = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), E || "unknown"), Sn = (t, e, r) => P(t, e, { ...r, method: "GET" }), P = async (t, e, r, n) => jt("/api/service", t, e, r, n), xn = async (t, e, r, n) => jt(`/api/${__SYS_CD__}/service`, t, e, r, n), Cn = async (t, e, r) => {
1995
+ try {
1996
+ const n = await fetch("/api/permissions", {
1997
+ method: "POST",
1998
+ headers: {
1999
+ "Content-Type": "application/json"
2000
+ },
2001
+ body: JSON.stringify({
2002
+ userId: t,
2003
+ menuId: e,
2004
+ popupId: r
2005
+ })
2006
+ });
2007
+ if (!n.ok)
2008
+ throw new Error(`권한 확인 실패: ${n.status}`);
2009
+ return await n.json();
2010
+ } catch (n) {
2011
+ throw console.error("권한 확인 서비스 오류:", n), n;
1386
2012
  }
1387
- return l;
1388
- }, Kr = Ue, Gr = $e, Jr = Ye, Zr = Ee, Xr = Ae, Qr = Ie, eo = he, to = Me, ro = {
1389
- ...Ue,
1390
- ...$e,
1391
- ...Ye,
1392
- ...Ee,
1393
- ...Ae,
1394
- ...Ie,
1395
- ...he,
1396
- ...Me,
1397
- realFormat: Hr
1398
2013
  };
1399
2014
  export {
1400
- x as ApiError,
1401
- I as COMMON_DATE_FORMAT,
1402
- mt as THEME_COOKIE_NAME,
1403
- lr as addDays,
1404
- ur as addMonths,
1405
- br as apiDelete,
1406
- Cr as apiGet,
1407
- Tr as apiPatch,
1408
- xr as apiPost,
1409
- $r as apiPut,
1410
- Kr as apiUtils,
1411
- Nt as arrAverage,
1412
- Ut as arrCount,
1413
- Yt as arrMax,
1414
- It as arrMin,
1415
- Et as arrReverse,
1416
- _t as arrSum,
1417
- Ot as arrUnique,
1418
- ro as bwgUtils,
1419
- _ as callService,
1420
- vr as callService_SYSCD,
1421
- Lt as clamp,
1422
- Vt as clearSessionStorage,
1423
- Ur as closeAllMessages,
1424
- _r as closeMessage,
1425
- wr as closeNotification,
1426
- Gr as commonUtils,
1427
- fr as configureEnvUtils,
1428
- $t as copyToClipboard,
1429
- ar as datetimeFormat,
1430
- xt as debounce,
1431
- ro as default,
1432
- Wt as deleteCookie,
1433
- yr as destroyNotifications,
1434
- dr as diffDays,
1435
- Or as downloadByFileKey,
1436
- kr as downloadFile,
1437
- Pt as duplicates,
1438
- er as encryptSha256,
1439
- Jr as envUtils,
1440
- Zr as fileUtils,
1441
- kt as generateRandomColor,
1442
- Ce as generateRandomString,
1443
- re as generateUID,
1444
- mr as getAge,
1445
- fe as getAllServiceCodes,
1446
- Sr as getClientIp,
1447
- Bt as getCookie,
1448
- ge as getCrprCd,
1449
- tr as getCurrentDate,
1450
- xe as getCurrentDateString,
1451
- Ke as getDepartmentInfo,
1452
- G as getDeviceType,
1453
- qe as getDisplayName,
1454
- we as getDprtCd,
1455
- Se as getDprtNm,
1456
- Re as getEmplNo,
1457
- hr as getEnvCode,
1458
- F as getHrInfo,
1459
- Ze as getJbdtCd,
1460
- Je as getJbgdCd,
1461
- Xe as getJbkdCd,
1462
- Ge as getJbpsCd,
1463
- ir as getLastDateByDiv,
1464
- Dr as getPermissionService,
1465
- K as getRoleList,
1466
- me as getServiceCode,
1467
- Rt as getSessionStorage,
1468
- cr as getStartDateByDiv,
1469
- He as getUserDvsn,
1470
- pe as getUserId,
1471
- L as getUserInfo,
1472
- ye as getUserNm,
1473
- Qe as getWkplCd,
1474
- ze as hasAllRoles,
1475
- Ve as hasAnyRole,
1476
- je as hasRole,
1477
- We as hasUserInfo,
1478
- wt as isArray,
1479
- gt as isBoolean,
1480
- Dt as isDesktop,
1481
- ke as isDev,
1482
- ve as isEmpty,
1483
- J as isEmptyArray,
1484
- pt as isFunction,
1485
- R as isLocal,
1486
- Be as isLoggedIn,
1487
- bt as isMobile,
1488
- St as isNull,
1489
- vt as isNullOrUndefined,
1490
- ht as isNumber,
1491
- yt as isObject,
1492
- Oe as isProd,
1493
- qt as isSafeEmpty,
1494
- ft as isString,
1495
- Tt as isTablet,
1496
- Mt as isUndefined,
1497
- rr as isValidDate,
1498
- nr as isValidDateTime,
1499
- Gt as isValidEmail,
1500
- Jt as isValidUrl,
1501
- or as isValidYear,
1502
- sr as isValidYearMonth,
1503
- Fe as logServiceCodeConfig,
1504
- Xr as messageUtils,
1505
- oe as notiBwgError,
1506
- pr as notiError,
1507
- se as notiInfo,
1508
- gr as notiSuccess,
1509
- ne as notiWarning,
2015
+ O as ApiError,
2016
+ Y as COMMON_DATE_FORMAT,
2017
+ Le as THEME_COOKIE_NAME,
2018
+ Hr as addDays,
2019
+ Rr as addMonths,
2020
+ Sn as apiGet,
2021
+ Dn as apiUtils,
2022
+ cr as arrAverage,
2023
+ lr as arrCount,
2024
+ ar as arrMax,
2025
+ ir as arrMin,
2026
+ dr as arrReverse,
2027
+ ur as arrSum,
2028
+ sr as arrUnique,
2029
+ An as bwgUtils,
2030
+ P as callService,
2031
+ xn as callServiceBySysCd,
2032
+ mr as clamp,
2033
+ wr as clearSessionStorage,
2034
+ Zr as closeAllMessages,
2035
+ Jr as closeMessage,
2036
+ an as closeNotification,
2037
+ In as commonUtils,
2038
+ zr as configureEnvUtils,
2039
+ tr as copyToClipboard,
2040
+ Br as datetimeFormat,
2041
+ Qe as debounce,
2042
+ An as default,
2043
+ Cr as deleteCookie,
2044
+ sn as destroyNotifications,
2045
+ Fr as diffDays,
2046
+ Wr as downloadByFileKey,
2047
+ Vr as downloadFile,
2048
+ fr as duplicates,
2049
+ Ir as encryptSha256,
2050
+ Yn as envUtils,
2051
+ Nn as fileUtils,
2052
+ or as generateRandomColor,
2053
+ kt as generateRandomString,
2054
+ it as generateUID,
2055
+ Lr as getAge,
2056
+ wt as getAllServiceCodes,
2057
+ Wt as getClientIp,
2058
+ xr as getCookie,
2059
+ V as getCrprCd,
2060
+ Yr as getCurrentDate,
2061
+ Dt as getCurrentDateString,
2062
+ de as getDepartmentInfo,
2063
+ tt as getDeviceType,
2064
+ le as getDisplayName,
2065
+ bt as getDprtCd,
2066
+ $t as getDprtNm,
2067
+ oe as getEmplNo,
2068
+ jr as getEnvCode,
2069
+ R as getHrInfo,
2070
+ me as getJbdtCd,
2071
+ he as getJbgdCd,
2072
+ pe as getJbkdCd,
2073
+ fe as getJbpsCd,
2074
+ Ar as getLastDateByDiv,
2075
+ Cn as getPermissionService,
2076
+ Q as getRoleList,
2077
+ vt as getServiceCode,
2078
+ yr as getSessionStorage,
2079
+ Pr as getStartDateByDiv,
2080
+ ne as getUserDvsn,
2081
+ xt as getUserId,
2082
+ z as getUserInfo,
2083
+ Ct as getUserNm,
2084
+ ge as getWkplCd,
2085
+ ie as hasAllRoles,
2086
+ ae as hasAnyRole,
2087
+ se as hasRole,
2088
+ ue as hasUserInfo,
2089
+ Ke as isArray,
2090
+ Ve as isBoolean,
2091
+ nr as isDesktop,
2092
+ Et as isDev,
2093
+ Tt as isEmpty,
2094
+ et as isEmptyArray,
2095
+ We as isFunction,
2096
+ ct as isLocal,
2097
+ ce as isLoggedIn,
2098
+ er as isMobile,
2099
+ Ge as isNull,
2100
+ Ze as isNullOrUndefined,
2101
+ je as isNumber,
2102
+ qe as isObject,
2103
+ Ot as isProd,
2104
+ br as isSafeEmpty,
2105
+ ze as isString,
2106
+ rr as isTablet,
2107
+ Je as isUndefined,
2108
+ Nr as isValidDate,
2109
+ Or as isValidDateTime,
2110
+ _r as isValidEmail,
2111
+ Mr as isValidUrl,
2112
+ Ur as isValidYear,
2113
+ Er as isValidYearMonth,
2114
+ re as logServiceCodeConfig,
2115
+ Un as messageUtils,
2116
+ Ht as notiBwgError,
2117
+ on as notiError,
2118
+ Ft as notiInfo,
2119
+ nn as notiSuccess,
2120
+ Lt as notiWarning,
1510
2121
  N as notificationService,
1511
- Qr as notificationUtils,
1512
- Zt as padLeft,
1513
- Xt as padRight,
1514
- At as random,
1515
- Hr as realFormat,
1516
- jt as removeSessionStorage,
1517
- Ft as round,
1518
- eo as serviceUtils,
1519
- ae as setClientIp,
1520
- zt as setCookie,
1521
- Le as setServiceCodeOverrides,
1522
- Ht as setSessionStorage,
1523
- Er as showApiError,
1524
- Lr as showDuplicateError,
1525
- V as showError,
1526
- Ir as showInfo,
1527
- Nr as showLoading,
1528
- Fr as showRequiredError,
1529
- Ar as showSaveError,
1530
- Pr as showSaveSuccess,
1531
- Pe as showSuccess,
1532
- Yr as showWarning,
1533
- qr as submitGwApproval,
1534
- Ct as throttle,
1535
- Kt as toCamelCase,
1536
- Rr as uploadFilesViaSftp,
1537
- to as userUtils,
1538
- Mr as verifyClientIp
2122
+ En as notificationUtils,
2123
+ Tr as padLeft,
2124
+ kr as padRight,
2125
+ hr as random,
2126
+ cn as realFormat,
2127
+ vr as removeSessionStorage,
2128
+ pr as round,
2129
+ On as serviceUtils,
2130
+ Vt as setClientIp,
2131
+ Sr as setCookie,
2132
+ ee as setServiceCodeOverrides,
2133
+ gr as setSessionStorage,
2134
+ Xr as showApiError,
2135
+ en as showDuplicateError,
2136
+ j as showError,
2137
+ Kr as showInfo,
2138
+ Gr as showLoading,
2139
+ rn as showRequiredError,
2140
+ tn as showSaveError,
2141
+ Qr as showSaveSuccess,
2142
+ Pt as showSuccess,
2143
+ qr as showWarning,
2144
+ kn as submitGwApproval,
2145
+ Xe as throttle,
2146
+ $r as toCamelCase,
2147
+ un as uploadFilesViaSftp,
2148
+ Bn as userUtils,
2149
+ wn as verifyClientIp
1539
2150
  };