@bwg-ui/core 1.2.25 → 1.2.26

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 (31) hide show
  1. package/dist/chunks/{MenuReport-B7wOCWJH.js → MenuReport-CWRL14FP.js} +1 -1
  2. package/dist/chunks/{MenuReport-DWUqzoE_.cjs → MenuReport-CdDOPy5D.cjs} +1 -1
  3. package/dist/chunks/{common-components-DN-4Ydi7.js → common-components-BR1s1Oaw.js} +1269 -756
  4. package/dist/chunks/{common-components-1B6Dgw0G.cjs → common-components-DaKdhIi2.cjs} +4 -4
  5. package/dist/chunks/{layout-components-CQYHdg88.cjs → layout-components-EmNfHHRC.cjs} +2 -2
  6. package/dist/chunks/{layout-components-BO9fKUG7.js → layout-components-JbKkWhw7.js} +2 -2
  7. package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
  8. package/dist/components/common/index.cjs +1 -1
  9. package/dist/components/common/index.js +1 -1
  10. package/dist/components/guide/index.cjs +1 -1
  11. package/dist/components/guide/index.js +1 -1
  12. package/dist/components/layout/index.cjs +1 -1
  13. package/dist/components/layout/index.js +1 -1
  14. package/dist/components/pages/auth/CMRoleMstrM01.d.ts.map +1 -1
  15. package/dist/components/pages/syst/SystemCodeManage.d.ts +1 -1
  16. package/dist/components/pages/syst/SystemCodeManage.d.ts.map +1 -1
  17. package/dist/components/popup/index.cjs +1 -1
  18. package/dist/components/popup/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +134 -134
  21. package/dist/stores/index.cjs +1 -1
  22. package/dist/stores/index.js +1 -1
  23. package/dist/types/bwg-global.d.ts +1 -0
  24. package/dist/utils/apiUtils.d.ts +37 -2
  25. package/dist/utils/apiUtils.d.ts.map +1 -1
  26. package/dist/utils/gwUtils.d.ts.map +1 -1
  27. package/dist/utils/index.cjs +1 -1
  28. package/dist/utils/index.d.ts +2 -2
  29. package/dist/utils/index.d.ts.map +1 -1
  30. package/dist/utils/index.js +951 -956
  31. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { ApiError as r, DEFAULT_FMT as s, DEFAULT_SERVICE_CODES as a, THEME_COOKIE_NAME as t, add as i, apiGet as n, apiUtils as g, arrAverage as l, arrCount as d, arrMax as u, arrMin as C, arrReverse as p, arrSum as S, arrUnique as c, bwgUtils as w, callService as M, callServiceBySysCd as B, clamp as m, clearSessionStorage as f, closeAllMessages as v, closeMessage as P, closeNotification as h, commonUtils as y, configureEnvUtils as D, copyToClipboard as A, debounce as U, deleteCookie as E, destroyNotifications as L, diff as b, downloadByFileKey as I, downloadFile as k, duplicates as R, encryptSha256 as F, endOf as O, envUtils as T, fileUtils as x, format as N, generateRandomColor as V, generateRandomString as G, generateUID as H, getAllServiceCodes as W, getApiDeps as _, getClientIp as J, getCookie as K, getCrprCd as q, getDepartmentInfo as z, getDeviceType as Y, getDisplayName as j, getDprtCd as Q, getDprtNm as X, getEmplNo as Z, getEnvCode as $, getFullDprtCd as ee, getFullDprtNm as oe, getHrInfo as re, getJbdtCd as se, getJbgdCd as ae, getJbkdCd as te, getJbpsCd as ie, getPermissionService as ne, getRoleList as ge, getServiceCode as le, getSessionStorage as de, getTodateString as ue, getUserDvsn as Ce, getUserId as pe, getUserInfo as Se, getUserNm as ce, getWkplCd as we, hasAllRoles as Me, hasAnyRole as Be, hasRole as me, hasUserInfo as fe, initApiDeps as ve, isArray as Pe, isBoolean as he, isDesktop as ye, isDev as De, isEmpty as Ae, isEmptyArray as Ue, isFunction as Ee, isLocal as Le, isLoggedIn as be, isMobile as Ie, isNull as ke, isNullOrUndefined as Re, isNumber as Fe, isObject as Oe, isProd as Te, isSafeEmpty as xe, isString as Ne, isTablet as Ve, isUndefined as Ge, isValid as He, isValidDate as We, isValidEmail as _e, isValidUrl as Je, isValidYear as Ke, isValidYearMonth as qe, logServiceCodeConfig as ze, messageUtils as Ye, notiBwgError as je, notiError as Qe, notiInfo as Xe, notiSuccess as Ze, notiWarning as $e, notificationService as eo, notificationUtils as oo, now as ro, openGwDraftByAprvKey as so, padLeft as ao, padRight as to, random as io, realFormat as no, removeSessionStorage as go, round as lo, serviceUtils as uo, setClientIp as Co, setCookie as po, setServiceCodeOverrides as So, setSessionStorage as co, showApiError as wo, showDuplicateError as Mo, showError as Bo, showInfo as mo, showLoading as fo, showRequiredError as vo, showSaveError as Po, showSaveSuccess as ho, showSuccess as yo, showWarning as Do, startOf as Ao, submitGwApproval as Uo, throttle as Eo, toCamelCase as Lo, uploadFilesViaSftp as bo, userUtils as Io, verifyClientIp as ko } from "./utils/index.js";
1
+ import { ApiError as r, DEFAULT_FMT as s, DEFAULT_SERVICE_CODES as a, THEME_COOKIE_NAME as t, add as i, apiUtils as n, arrAverage as g, arrCount as l, arrMax as d, arrMin as u, arrReverse as C, arrSum as p, arrUnique as S, bwgUtils as c, callService as w, callServiceBySysCd as M, clamp as B, clearSessionStorage as m, closeAllMessages as f, closeMessage as v, closeNotification as P, commonUtils as h, configureEnvUtils as y, copyToClipboard as D, debounce as A, deleteCookie as U, destroyNotifications as E, diff as L, downloadByFileKey as b, downloadFile as I, duplicates as k, encryptSha256 as R, endOf as F, envUtils as O, fileUtils as T, format as x, generateRandomColor as N, generateRandomString as V, generateUID as G, getAllServiceCodes as H, getApiDeps as W, getClientIp as _, getCookie as J, getCrprCd as K, getDepartmentInfo as q, getDeviceType as z, getDisplayName as Y, getDprtCd as j, getDprtNm as Q, getEmplNo as X, getEnvCode as Z, getFullDprtCd as $, getFullDprtNm as ee, getHrInfo as oe, getJbdtCd as re, getJbgdCd as se, getJbkdCd as ae, getJbpsCd as te, getPermissionService as ie, getRoleList as ne, getServiceCode as ge, getSessionStorage as le, getTodateString as de, getUserDvsn as ue, getUserId as Ce, getUserInfo as pe, getUserNm as Se, getWkplCd as ce, hasAllRoles as we, hasAnyRole as Me, hasRole as Be, hasUserInfo as me, initApiDeps as fe, isArray as ve, isBoolean as Pe, isDesktop as he, isDev as ye, isEmpty as De, isEmptyArray as Ae, isFunction as Ue, isLocal as Ee, isLoggedIn as Le, isMobile as be, isNull as Ie, isNullOrUndefined as ke, isNumber as Re, isObject as Fe, isProd as Oe, isSafeEmpty as Te, isString as xe, isTablet as Ne, isUndefined as Ve, isValid as Ge, isValidDate as He, isValidEmail as We, isValidUrl as _e, isValidYear as Je, isValidYearMonth as Ke, logServiceCodeConfig as qe, messageUtils as ze, notiBwgError as Ye, notiError as je, notiInfo as Qe, notiSuccess as Xe, notiWarning as Ze, notificationService as $e, notificationUtils as eo, now as oo, openGwDraftByAprvKey as ro, padLeft as so, padRight as ao, random as to, realFormat as io, removeSessionStorage as no, round as go, serviceUtils as lo, setClientIp as uo, setCookie as Co, setServiceCodeOverrides as po, setSessionStorage as So, showApiError as co, showDuplicateError as wo, showError as Mo, showInfo as Bo, showLoading as mo, showRequiredError as fo, showSaveError as vo, showSaveSuccess as Po, showSuccess as ho, showWarning as yo, startOf as Do, submitGwApproval as Ao, throttle as Uo, toCamelCase as Eo, uploadFilesViaSftp as Lo, useService as bo, userUtils as Io, verifyClientIp as ko } from "./utils/index.js";
2
2
  import { useCapsLock as Fo, useCode as Oo, useCodeStore as To, useColorStore as xo, useFavorite as No, useFavoriteStore as Vo, useLoadingStore as Go, useLogin as Ho, useLogout as Wo, useMenuModel as _o, useMenuModelStore as Jo, useMenuView as Ko, useMenuViewStore as qo, useOptionStore as zo, usePopupLoadingStore as Yo, usePopupState as jo, usePopupStore as Qo, useSystemCode as Xo, useSystemStore as Zo, useUser as $o, useUserStore as er } from "./stores/index.js";
3
- import { f as rr, q as sr, r as ar, j as tr, I as ir, B as nr, s as gr, J as lr, t as dr, p as ur, h as Cr, u as pr, o as Sr, n as cr, K as wr, i as Mr, b as Br, v as mr, l as fr, e as vr, k as Pr, Y as hr, F as yr, Z as Dr, L as Ar, T as Ur, M as Er, N as Lr, O as br, _ as Ir, P as kr, R as Rr, E as Fr, H as Or, U as Tr, V as xr, X as Nr, d as Vr, C as Gr, G as Hr, Q as Wr, w as _r, S as Jr, x as Kr, y as qr, D as zr, z as Yr, A as jr, W as Qr, m as Xr } from "./chunks/common-components-DN-4Ydi7.js";
3
+ import { f as rr, q as sr, r as ar, j as tr, I as ir, B as nr, s as gr, J as lr, t as dr, p as ur, h as Cr, u as pr, o as Sr, n as cr, K as wr, i as Mr, b as Br, v as mr, l as fr, e as vr, k as Pr, Y as hr, F as yr, Z as Dr, L as Ar, T as Ur, M as Er, N as Lr, O as br, _ as Ir, P as kr, R as Rr, E as Fr, H as Or, U as Tr, V as xr, X as Nr, d as Vr, C as Gr, G as Hr, Q as Wr, w as _r, S as Jr, x as Kr, y as qr, D as zr, z as Yr, A as jr, W as Qr, m as Xr } from "./chunks/common-components-BR1s1Oaw.js";
4
4
  import { BwgButton as $r, BwgCheck as es, BwgCheckList as os, BwgDatePicker as rs, BwgDownload as ss, BwgForm as as, BwgFormItem as ts, BwgInput as is, BwgLargeUploader as ns, BwgMaskedInput as gs, BwgMaskedPicker as ls, BwgMultiSelect as ds, BwgNumber as us, BwgRadio as Cs, BwgRangePicker as ps, BwgSearch as Ss, BwgSelect as cs, BwgSwitch as ws, BwgTextArea as Ms, BwgUploader as Bs } from "./components/core/index.js";
5
- import { A as fs, b as vs, B as Ps, a as hs, d as ys, e as Ds, f as As, g as Us, C as Es, D as Ls, c as bs, L as Is, P as ks, h as Rs } from "./chunks/layout-components-BO9fKUG7.js";
5
+ import { A as fs, b as vs, B as Ps, a as hs, d as ys, e as Ds, f as As, g as Us, C as Es, D as Ls, c as bs, L as Is, P as ks, h as Rs } from "./chunks/layout-components-JbKkWhw7.js";
6
6
  import { AuthProvider as Os, CommonCodeProvider as Ts, ScreenProtectProvider as xs, SearchBoxProvider as Ns, ServiceCodeProvider as Vs, useAllServiceCodes as Gs, useAuth as Hs, useCodeColor as Ws, useCodeList as _s, useCodeListByOption as Js, useCodeName as Ks, useCommonCode as qs, useGridLookup as zs, useLock as Ys, useLogServiceCodeConfig as js, usePopup as Qs, useSearchBox as Xs, useServiceCode as Zs, useServiceCodeValue as $s } from "./provider/index.js";
7
7
  export {
8
8
  r as ApiError,
@@ -98,138 +98,137 @@ export {
98
98
  Qr as SystemCodeManage,
99
99
  t as THEME_COOKIE_NAME,
100
100
  i as add,
101
- n as apiGet,
102
- g as apiUtils,
103
- l as arrAverage,
104
- d as arrCount,
105
- u as arrMax,
106
- C as arrMin,
107
- p as arrReverse,
108
- S as arrSum,
109
- c as arrUnique,
110
- w as bwgUtils,
111
- M as callService,
112
- B as callServiceBySysCd,
113
- m as clamp,
114
- f as clearSessionStorage,
115
- v as closeAllMessages,
116
- P as closeMessage,
117
- h as closeNotification,
118
- y as commonUtils,
119
- D as configureEnvUtils,
120
- A as copyToClipboard,
101
+ n as apiUtils,
102
+ g as arrAverage,
103
+ l as arrCount,
104
+ d as arrMax,
105
+ u as arrMin,
106
+ C as arrReverse,
107
+ p as arrSum,
108
+ S as arrUnique,
109
+ c as bwgUtils,
110
+ w as callService,
111
+ M as callServiceBySysCd,
112
+ B as clamp,
113
+ m as clearSessionStorage,
114
+ f as closeAllMessages,
115
+ v as closeMessage,
116
+ P as closeNotification,
117
+ h as commonUtils,
118
+ y as configureEnvUtils,
119
+ D as copyToClipboard,
121
120
  Xr as createBwgGridRenderer,
122
- U as debounce,
123
- E as deleteCookie,
124
- L as destroyNotifications,
125
- b as diff,
126
- I as downloadByFileKey,
127
- k as downloadFile,
128
- R as duplicates,
129
- F as encryptSha256,
130
- O as endOf,
131
- T as envUtils,
132
- x as fileUtils,
133
- N as format,
134
- V as generateRandomColor,
135
- G as generateRandomString,
136
- H as generateUID,
137
- W as getAllServiceCodes,
138
- _ as getApiDeps,
139
- J as getClientIp,
140
- K as getCookie,
141
- q as getCrprCd,
142
- z as getDepartmentInfo,
143
- Y as getDeviceType,
144
- j as getDisplayName,
145
- Q as getDprtCd,
146
- X as getDprtNm,
147
- Z as getEmplNo,
148
- $ as getEnvCode,
149
- ee as getFullDprtCd,
150
- oe as getFullDprtNm,
151
- re as getHrInfo,
152
- se as getJbdtCd,
153
- ae as getJbgdCd,
154
- te as getJbkdCd,
155
- ie as getJbpsCd,
156
- ne as getPermissionService,
157
- ge as getRoleList,
158
- le as getServiceCode,
159
- de as getSessionStorage,
160
- ue as getTodateString,
161
- Ce as getUserDvsn,
162
- pe as getUserId,
163
- Se as getUserInfo,
164
- ce as getUserNm,
165
- we as getWkplCd,
166
- Me as hasAllRoles,
167
- Be as hasAnyRole,
168
- me as hasRole,
169
- fe as hasUserInfo,
170
- ve as initApiDeps,
171
- Pe as isArray,
172
- he as isBoolean,
173
- ye as isDesktop,
174
- De as isDev,
175
- Ae as isEmpty,
176
- Ue as isEmptyArray,
177
- Ee as isFunction,
178
- Le as isLocal,
179
- be as isLoggedIn,
180
- Ie as isMobile,
181
- ke as isNull,
182
- Re as isNullOrUndefined,
183
- Fe as isNumber,
184
- Oe as isObject,
185
- Te as isProd,
186
- xe as isSafeEmpty,
187
- Ne as isString,
188
- Ve as isTablet,
189
- Ge as isUndefined,
190
- He as isValid,
191
- We as isValidDate,
192
- _e as isValidEmail,
193
- Je as isValidUrl,
194
- Ke as isValidYear,
195
- qe as isValidYearMonth,
196
- ze as logServiceCodeConfig,
197
- Ye as messageUtils,
198
- je as notiBwgError,
199
- Qe as notiError,
200
- Xe as notiInfo,
201
- Ze as notiSuccess,
202
- $e as notiWarning,
203
- eo as notificationService,
204
- oo as notificationUtils,
205
- ro as now,
206
- so as openGwDraftByAprvKey,
207
- ao as padLeft,
208
- to as padRight,
209
- io as random,
210
- no as realFormat,
211
- go as removeSessionStorage,
212
- lo as round,
213
- uo as serviceUtils,
214
- Co as setClientIp,
215
- po as setCookie,
216
- So as setServiceCodeOverrides,
217
- co as setSessionStorage,
218
- wo as showApiError,
219
- Mo as showDuplicateError,
220
- Bo as showError,
221
- mo as showInfo,
222
- fo as showLoading,
223
- vo as showRequiredError,
224
- Po as showSaveError,
225
- ho as showSaveSuccess,
226
- yo as showSuccess,
227
- Do as showWarning,
228
- Ao as startOf,
229
- Uo as submitGwApproval,
230
- Eo as throttle,
231
- Lo as toCamelCase,
232
- bo as uploadFilesViaSftp,
121
+ A as debounce,
122
+ U as deleteCookie,
123
+ E as destroyNotifications,
124
+ L as diff,
125
+ b as downloadByFileKey,
126
+ I as downloadFile,
127
+ k as duplicates,
128
+ R as encryptSha256,
129
+ F as endOf,
130
+ O as envUtils,
131
+ T as fileUtils,
132
+ x as format,
133
+ N as generateRandomColor,
134
+ V as generateRandomString,
135
+ G as generateUID,
136
+ H as getAllServiceCodes,
137
+ W as getApiDeps,
138
+ _ as getClientIp,
139
+ J as getCookie,
140
+ K as getCrprCd,
141
+ q as getDepartmentInfo,
142
+ z as getDeviceType,
143
+ Y as getDisplayName,
144
+ j as getDprtCd,
145
+ Q as getDprtNm,
146
+ X as getEmplNo,
147
+ Z as getEnvCode,
148
+ $ as getFullDprtCd,
149
+ ee as getFullDprtNm,
150
+ oe as getHrInfo,
151
+ re as getJbdtCd,
152
+ se as getJbgdCd,
153
+ ae as getJbkdCd,
154
+ te as getJbpsCd,
155
+ ie as getPermissionService,
156
+ ne as getRoleList,
157
+ ge as getServiceCode,
158
+ le as getSessionStorage,
159
+ de as getTodateString,
160
+ ue as getUserDvsn,
161
+ Ce as getUserId,
162
+ pe as getUserInfo,
163
+ Se as getUserNm,
164
+ ce as getWkplCd,
165
+ we as hasAllRoles,
166
+ Me as hasAnyRole,
167
+ Be as hasRole,
168
+ me as hasUserInfo,
169
+ fe as initApiDeps,
170
+ ve as isArray,
171
+ Pe as isBoolean,
172
+ he as isDesktop,
173
+ ye as isDev,
174
+ De as isEmpty,
175
+ Ae as isEmptyArray,
176
+ Ue as isFunction,
177
+ Ee as isLocal,
178
+ Le as isLoggedIn,
179
+ be as isMobile,
180
+ Ie as isNull,
181
+ ke as isNullOrUndefined,
182
+ Re as isNumber,
183
+ Fe as isObject,
184
+ Oe as isProd,
185
+ Te as isSafeEmpty,
186
+ xe as isString,
187
+ Ne as isTablet,
188
+ Ve as isUndefined,
189
+ Ge as isValid,
190
+ He as isValidDate,
191
+ We as isValidEmail,
192
+ _e as isValidUrl,
193
+ Je as isValidYear,
194
+ Ke as isValidYearMonth,
195
+ qe as logServiceCodeConfig,
196
+ ze as messageUtils,
197
+ Ye as notiBwgError,
198
+ je as notiError,
199
+ Qe as notiInfo,
200
+ Xe as notiSuccess,
201
+ Ze as notiWarning,
202
+ $e as notificationService,
203
+ eo as notificationUtils,
204
+ oo as now,
205
+ ro as openGwDraftByAprvKey,
206
+ so as padLeft,
207
+ ao as padRight,
208
+ to as random,
209
+ io as realFormat,
210
+ no as removeSessionStorage,
211
+ go as round,
212
+ lo as serviceUtils,
213
+ uo as setClientIp,
214
+ Co as setCookie,
215
+ po as setServiceCodeOverrides,
216
+ So as setSessionStorage,
217
+ co as showApiError,
218
+ wo as showDuplicateError,
219
+ Mo as showError,
220
+ Bo as showInfo,
221
+ mo as showLoading,
222
+ fo as showRequiredError,
223
+ vo as showSaveError,
224
+ Po as showSaveSuccess,
225
+ ho as showSuccess,
226
+ yo as showWarning,
227
+ Do as startOf,
228
+ Ao as submitGwApproval,
229
+ Uo as throttle,
230
+ Eo as toCamelCase,
231
+ Lo as uploadFilesViaSftp,
233
232
  Gs as useAllServiceCodes,
234
233
  Hs as useAuth,
235
234
  Fo as useCapsLock,
@@ -259,6 +258,7 @@ export {
259
258
  jo as usePopupState,
260
259
  Qo as usePopupStore,
261
260
  Xs as useSearchBox,
261
+ bo as useService,
262
262
  Zs as useServiceCode,
263
263
  $s as useServiceCodeValue,
264
264
  Xo as useSystemCode,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("zustand"),y=require("../utils/index.cjs"),L=require("antd"),V=require("../chunks/layout-components-CQYHdg88.cjs"),F=require("react"),Q=require("react-router-dom");function ee(n,r){let e;try{e=n()}catch{return}return{getItem:o=>{var t;const a=d=>d===null?null:JSON.parse(d,void 0),c=(t=e.getItem(o))!=null?t:null;return c instanceof Promise?c.then(a):a(c)},setItem:(o,t)=>e.setItem(o,JSON.stringify(t,void 0)),removeItem:o=>e.removeItem(o)}}const H=n=>r=>{try{const e=n(r);return e instanceof Promise?e:{then(s){return H(s)(e)},catch(s){return this}}}catch(e){return{then(s){return this},catch(s){return H(s)(e)}}}},te=(n,r)=>(e,s,o)=>{let t={storage:ee(()=>localStorage),partialize:C=>C,version:0,merge:(C,S)=>({...S,...C}),...r},a=!1;const c=new Set,d=new Set;let i=t.storage;if(!i)return n((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`),e(...C)},s,o);const l=()=>{const C=t.partialize({...s()});return i.setItem(t.name,{state:C,version:t.version})},f=o.setState;o.setState=(C,S)=>(f(C,S),l());const m=n((...C)=>(e(...C),l()),s,o);o.getInitialState=()=>m;let u;const h=()=>{var C,S;if(!i)return;a=!1,c.forEach(g=>{var N;return g((N=s())!=null?N:m)});const k=((S=t.onRehydrateStorage)==null?void 0:S.call(t,(C=s())!=null?C:m))||void 0;return H(i.getItem.bind(i))(t.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==t.version){if(t.migrate){const N=t.migrate(g.state,g.version);return N instanceof Promise?N.then(B=>[!0,B]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var N;const[B,Z]=g;if(u=t.merge(Z,(N=s())!=null?N:m),e(u,!0),B)return l()}).then(()=>{k?.(u,void 0),u=s(),a=!0,d.forEach(g=>g(u))}).catch(g=>{k?.(void 0,g)})};return o.persist={setOptions:C=>{t={...t,...C},C.storage&&(i=C.storage)},clearStorage:()=>{i?.removeItem(t.name)},getOptions:()=>t,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:C=>(c.add(C),()=>{c.delete(C)}),onFinishHydration:C=>(d.add(C),()=>{d.delete(C)})},t.skipHydration||h(),u||m},M=te,w=b.create()(M((n,r)=>({user:null,hrInfo:null,buttonAuths:{},isLoggedIn:()=>!!r().user,setLoginUser:(e,s)=>{n({user:e,hrInfo:s??null}),console.log("사용자 로그인:",e,s)},clearLoginUser:()=>{n({user:null,hrInfo:null,buttonAuths:{}}),console.log("사용자 로그아웃")},updateUser:(e,s)=>{const o=r().user,t=r().hrInfo;o&&n({user:{...o,...e}}),t&&n({hrInfo:{...t,...s}})},getButtonAuth:(e,s)=>{const o=`${e}_${s}`;return r().buttonAuths[o]||null},setButtonAuth:(e,s,o)=>{const t=`${e}_${s}`;n(a=>({buttonAuths:{...a.buttonAuths,[t]:o}}))},clearButtonAuths:()=>{n({buttonAuths:{}})}}),{name:"user-storage",partialize:n=>({user:n.user,hrInfo:n.hrInfo,isLoggedIn:n.isLoggedIn})})),K={CACHE_SIZE_LIMIT:1e3},p={codeCache:new Map,nameCache:new Map,optionCache:new Map,colorCache:new Map,loadedGroups:new Set,cacheHits:new Map,clearCache(){this.codeCache.clear(),this.nameCache.clear(),this.optionCache.clear(),this.colorCache.clear(),this.loadedGroups.clear(),this.cacheHits.clear()},cleanupCache(){const n=Array.from(this.cacheHits.entries());n.sort((e,s)=>e[1]-s[1]),n.slice(0,Math.floor(n.length*.3)).forEach(([e])=>{this.codeCache.delete(e),this.nameCache.delete(e),this.optionCache.delete(e),this.colorCache.delete(e),this.cacheHits.delete(e)})},isGroupLoaded(n){return this.loadedGroups.has(n)},markGroupLoaded(n){this.loadedGroups.add(n)}},v=n=>{console.log("대규모 데이터 변환 시작:",n);const r={};if(n&&n.code&&Array.isArray(n.code)){const e=n.code,s=n.opt||[],o=new Map;s.forEach(t=>{t.cmmnCd&&t.enblYn==="Y"&&(o.has(t.cmmnCd)||o.set(t.cmmnCd,[]),o.get(t.cmmnCd).push(t))}),e.forEach(t=>{if(t&&t.cmmnCdGrp&&t.cmmnCd&&t.enblYn==="Y"){const a=t.cmmnCdGrp;r[a]||(r[a]={});const d=(o.get(t.cmmnCd)||[]).reduce((i,l)=>(l.optnCd&&l.optnNm&&(i[l.optnCd]=l.optnNm),i),{});r[a][t.cmmnCd]={codeValue:t.cmmnCd,codeNm:t.cmmnCdNm,groupCode:t.cmmnCdGrp,commonCode:t.cmmnCd,labelColor:t.cmmnCdClr,systemCodeYn:t.syscdYn,sortOrder:parseInt(t.sortOrd)||1,enabled:t.enblYn==="Y",options:Object.keys(d).length>0?d:null,originalData:t}}})}return console.log("대규모 데이터 변환 완료:",r),r},I=b.create()(M((n,r)=>({codeData:null,isLoading:!1,error:null,lastUpdated:null,loadedGroups:new Set,fetchSystemCodes:async()=>{n({isLoading:!0,error:null});try{console.log("시스템 공통코드 데이터 가져오기 시작: SCMSIGN00301");const e=await y.callService(y.getServiceCode("SRCH_CODE"),{crprCd:"100"});console.log("시스템 공통코드 응답:",e),console.log("시스템 공통코드목록:",e.code),console.log("시스템 공통코드옵션목록:",e.opt);const s=v(e),t={...r().codeData||{},...s};p.clearCache();const a=new Set(Object.keys(t));a.forEach(c=>{p.markGroupLoaded(c)}),n({codeData:t,isLoading:!1,error:null,lastUpdated:new Date,loadedGroups:a}),console.log("시스템 공통코드 데이터 가져오기 완료")}catch(e){console.error("시스템 공통코드 데이터 가져오기 실패:",e),n({isLoading:!1,error:e instanceof Error?e.message:"시스템 공통코드 데이터 가져오기 실패"})}},fetchBusinessCodes:async()=>{n({isLoading:!0,error:null});try{console.log("업무 공통코드 데이터 가져오기 시작: SCMSIGN00302");const e=await y.callService("SCMSIGN00302",{sysCd:__SYS_CD__});console.log("업무 공통코드 응답:",e),console.log("업무 공통코드목록:",e.code),console.log("업무 공통코드옵션목록:",e.opt);const s=v(e),t={...r().codeData||{},...s};p.clearCache();const a=new Set(Object.keys(t));a.forEach(c=>{p.markGroupLoaded(c)}),n({codeData:t,isLoading:!1,error:null,lastUpdated:new Date,loadedGroups:a}),console.log("업무 공통코드 데이터 가져오기 완료")}catch(e){console.error("업무 공통코드 데이터 가져오기 실패:",e),n({isLoading:!1,error:e instanceof Error?e.message:"업무 공통코드 데이터 가져오기 실패"})}},fetchData:async()=>{n({isLoading:!0,error:null});try{console.log("전체 공통코드 데이터 가져오기 시작 (시스템 + 업무)");const[e,s]=await Promise.all([y.callService(y.getServiceCode("SRCH_CODE"),{crprCd:"100"}),y.callService("SCMSIGN00302",{sysCd:__SYS_CD__})]);console.log("시스템 공통코드 응답:",e),console.log("업무 공통코드 응답:",s);const o=v(e),t=v(s),a={...o,...t};p.clearCache();const c=new Set(Object.keys(a));c.forEach(d=>{p.markGroupLoaded(d)}),n({codeData:a,isLoading:!1,error:null,lastUpdated:new Date,loadedGroups:c}),console.log("전체 공통코드 데이터 가져오기 완료")}catch(e){console.error("전체 공통코드 데이터 가져오기 실패:",e),n({isLoading:!1,error:e instanceof Error?e.message:"전체 공통코드 데이터 가져오기 실패"})}},loadSpecificGroup:async e=>{const{codeData:s,loadedGroups:o}=r();if(!s||o.has(e))return;const t=new Set(o).add(e);n({loadedGroups:t}),p.markGroupLoaded(e)},setData:e=>{p.clearCache();const s=new Set(Object.keys(e));s.forEach(o=>{p.markGroupLoaded(o)}),n({codeData:e,lastUpdated:new Date,loadedGroups:s})},clearData:()=>{p.clearCache(),n({codeData:null,isLoading:!1,error:null,lastUpdated:null,loadedGroups:new Set})},getLoadedGroups:()=>Array.from(r().loadedGroups)}),{name:"large-data-storage",partialize:n=>({codeData:n.codeData,lastUpdated:n.lastUpdated,loadedGroups:Array.from(n.loadedGroups)})})),_=b.create()(M((n,r)=>({get codeData(){return I.getState().codeData},get isLoading(){return I.getState().isLoading},get error(){return I.getState().error},get lastUpdated(){return I.getState().lastUpdated},fetchCommonCodes:async()=>{await I.getState().fetchData()},getCodeList:(e,s)=>{const{enabledOnly:o=!0,systemCodeOnly:t=!1,sortByOrder:a=!1,excludeParentCode:c=!1}=s||{},d=`simpleCodeList_${e}_${o}_${t}_${a}_${c}`;if(p.optionCache.has(d)){const h=p.cacheHits.get(d)||0;return p.cacheHits.set(d,h+1),p.optionCache.get(d)}const i=I.getState().codeData;if(!i)return[];if(!p.isGroupLoaded(e)&&!i[e])return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`),[];const l=[],f=i[e];f&&Object.values(f).forEach(h=>{if(!(o&&!h.enabled)&&!(t&&h.systemCodeYn!=="Y"))if(c){const C=e.length,S=h.codeValue.substring(C);S.length>0&&l.push({...h,codeValue:S})}else l.push(h)});let m;a?m=l.sort((h,C)=>h.sortOrder!==C.sortOrder?h.sortOrder-C.sortOrder:h.codeValue.localeCompare(C.codeValue)):m=l.sort((h,C)=>h.codeValue.localeCompare(C.codeValue));const u=m.map(h=>({label:h.codeNm,value:h.codeValue,tagColor:h.labelColor}));return p.optionCache.size>=K.CACHE_SIZE_LIMIT&&p.cleanupCache(),p.optionCache.set(d,u),p.cacheHits.set(d,1),u},getCodeName:e=>{if(p.nameCache.has(e)){const o=p.cacheHits.get(`name_${e}`)||0;return p.cacheHits.set(`name_${e}`,o+1),p.nameCache.get(e)}const s=I.getState().codeData;if(!s)return null;for(const o of Object.values(s))for(const t of Object.values(o))if(t.codeValue===e)return p.nameCache.set(e,t.codeNm),p.cacheHits.set(`name_${e}`,1),t.codeNm;return null},getCodeColor:e=>{if(p.colorCache.has(e)){const o=p.cacheHits.get(`color_${e}`)||0;return p.cacheHits.set(`color_${e}`,o+1),p.colorCache.get(e)}const s=I.getState().codeData;if(!s)return null;for(const o of Object.values(s))for(const t of Object.values(o))if(t.codeValue===e)return p.colorCache.set(e,t.labelColor||""),p.cacheHits.set(`color_${e}`,1),t.labelColor;return null},getGridLookup:e=>{const s=`gridLookup_${e}`;if(p.optionCache.has(s)){const i=p.cacheHits.get(s)||0;return p.cacheHits.set(s,i+1),p.optionCache.get(s)}const o=I.getState().codeData;if(!o)return{labels:[],values:[],lookupDisplay:!0};const t=o[e];if(!t)return{labels:[],values:[],lookupDisplay:!0};const a=[],c=[];Object.values(t).filter(i=>i.enabled).sort((i,l)=>i.sortOrder-l.sortOrder).forEach(i=>{a.push(i.codeNm),c.push(i.codeValue)});const d={labels:a,values:c,lookupDisplay:!0};return p.optionCache.set(s,d),p.cacheHits.set(s,1),d},getCodeByOption:(e,s,o)=>{const t=`codeByOption_${e}_${s}_${o}`;if(p.codeCache.has(t)){const l=p.cacheHits.get(t)||0;return p.cacheHits.set(t,l+1),p.codeCache.get(t)}const a=I.getState().codeData;if(!a)return[];const c=[],d=a[e];d&&Object.values(d).forEach(l=>{l.enabled&&l.options&&l.options[s]===o&&c.push({...l,codeNm:l.options[s]||l.codeNm})});const i=c.sort((l,f)=>l.codeValue.localeCompare(f.codeValue));return p.codeCache.size>=K.CACHE_SIZE_LIMIT&&p.cleanupCache(),p.codeCache.set(t,i),p.cacheHits.set(t,1),i},getCodeListByOption:(e,s,o)=>{const{enabledOnly:t=!0,systemCodeOnly:a=!1,sortByOrder:c=!1}=o||{},d=`codeListByOption_${e}_${s}_${t}_${a}_${c}`;if(p.codeCache.has(d)){const u=p.cacheHits.get(d)||0;return p.cacheHits.set(d,u+1),p.codeCache.get(d)}const i=I.getState().codeData;if(!i)return[];if(!p.isGroupLoaded(e)&&!i[e])return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`),[];const l=[],f=i[e];f&&Object.values(f).forEach(u=>{t&&!u.enabled||a&&u.systemCodeYn!=="Y"||u.options&&u.options[s]&&l.push({label:u.options[s],value:u.commonCode,tagColor:u.labelColor})});let m;return c?m=l.sort((u,h)=>u.value.localeCompare(h.value)):m=l.sort((u,h)=>u.value.localeCompare(h.value)),p.codeCache.size>=K.CACHE_SIZE_LIMIT&&p.cleanupCache(),p.codeCache.set(d,m),p.cacheHits.set(d,1),m},getAvailableGroupCodes:()=>{const e="available_group_codes";if(p.nameCache.has(e)){const t=p.cacheHits.get(e)||0;return p.cacheHits.set(e,t+1),JSON.parse(p.nameCache.get(e))}const s=I.getState().codeData;if(!s)return[];const o=Object.keys(s).sort();return p.nameCache.set(e,JSON.stringify(o)),p.cacheHits.set(e,1),o},clearCodes:()=>{I.getState().clearData()}}),{name:"code-storage",partialize:n=>({})})),oe=b.create()(M((n,r)=>({get codeData(){return I.getState().codeData},get isLoading(){return I.getState().isLoading},get error(){return I.getState().error},get lastUpdated(){return I.getState().lastUpdated},fetchCommonCodes:async()=>{await I.getState().fetchData()},getOptionValue:(e,s)=>{const o=`option_${e}_${s}`;if(p.optionCache.has(o)){const c=p.cacheHits.get(o)||0;return p.cacheHits.set(o,c+1),p.optionCache.get(o)}const t=I.getState().codeData;if(!t)return null;const a=t[e];if(a&&a[s]){const c=a[s].options;return p.optionCache.set(o,c),p.cacheHits.set(o,1),c}return null},getOptionByKey:(e,s,o)=>{const t=`option_${e}_${s}_${o}`;if(p.optionCache.has(t)){const d=p.cacheHits.get(t)||0;return p.cacheHits.set(t,d+1),p.optionCache.get(t)}const a=r().getOptionValue(e,s),c=a?a[o]:null;return p.optionCache.set(t,c),p.cacheHits.set(t,1),c},clearCodes:()=>{I.getState().clearData()}}),{name:"option-storage",partialize:n=>({})})),se=b.create()(M((n,r)=>({get codeData(){return I.getState().codeData},get isLoading(){return I.getState().isLoading},get error(){return I.getState().error},get lastUpdated(){return I.getState().lastUpdated},fetchCommonCodes:async()=>{await I.getState().fetchData()},getColorCode:e=>{if(p.colorCache.has(e)){const o=p.cacheHits.get(`color_${e}`)||0;return p.cacheHits.set(`color_${e}`,o+1),p.colorCache.get(e)}const s=I.getState().codeData;if(!s)return null;for(const o of Object.values(s))for(const t of Object.values(o))if(t.codeValue===e)return p.colorCache.set(e,t.labelColor||""),p.cacheHits.set(`color_${e}`,1),t.labelColor;return null},getColorMapping:()=>{const e="color_mapping";if(p.optionCache.has(e)){const t=p.cacheHits.get(e)||0;return p.cacheHits.set(e,t+1),p.optionCache.get(e)}const s=I.getState().codeData;if(!s)return[];const o=[];return Object.values(s).forEach(t=>{Object.values(t).forEach(a=>{a.labelColor&&o.push({code:a.codeValue,color:a.labelColor})})}),p.optionCache.set(e,o),p.cacheHits.set(e,1),o},clearCodes:()=>{I.getState().clearData()}}),{name:"color-storage",partialize:n=>({})})),ne=(n,r)=>({nodes:{},rootIds:[],loadedFor:void 0,loading:!1,error:void 0,treeNodes:[],isMenuBookmarked:e=>Object.values(r().nodes).some(s=>s.type==="M"&&s.menuId===e),getPrntBkmkIdByMenuId:e=>{const s=D(r().nodes,e);return s?r().nodes[s]?.prntBkmkId??"-":"-"},getNodeByMenuId:e=>{const s=D(r().nodes,e);if(!s)return null;const o=r().nodes[s];return o?.type==="M"?o:null},getFolderTree:e=>{const{nodes:s,rootIds:o}=r(),t=c=>e?c.toLowerCase().includes(e.toLowerCase()):!0,a=c=>{const d=s[c];if(!d||d.type!=="F")return null;const i=d,l=(i.children||[]).map(m=>s[m]).filter(m=>!!m&&m.type==="F").map(m=>a(m.bkmkId)).filter(Boolean);return t(i.bkmkNm)||l.length>0?{key:i.bkmkId,title:`📁 ${i.bkmkNm}`,children:l.length?l:void 0}:null};return o.map(c=>a(c)).filter(Boolean)},loadFavorites:async(e,s=!1)=>{console.log("loadFavorites ::::: ",e,s);const o=r();if(!(!s&&o.loadedFor===e&&Object.keys(o.nodes).length)){n({loading:!0,error:void 0});try{const t=await y.callService("SCMBKMK00101",{userId:e}),a=Array.isArray(t?.sub)?t.sub:[],c=re(a),d=P(c.nodes,c.rootIds);n({...c,treeNodes:d,loadedFor:e,loading:!1})}catch(t){throw n({loading:!1,error:t?.message||"즐겨찾기 로드 실패"}),t}}},loadFavoritesIfNeeded:async e=>{const s=r();(s.loadedFor!==e||Object.keys(s.nodes).length===0)&&await r().loadFavorites(e)},clearFavorites:()=>{n({nodes:{},rootIds:[],treeNodes:[],loadedFor:void 0,loading:!1,error:void 0}),console.log("📚 북마크 스토어 초기화 완료")},addNode:async e=>{const s=E(r()),o=ae();n(t=>{const a=e.sortOrdr??x(t,e.prntBkmkId),c={...t,nodes:{...t.nodes,[o]:e.type==="F"?{bkmkId:o,type:"F",prntBkmkId:e.prntBkmkId||"-",sortOrdr:a,bkmkNm:e.bkmkNm??"새 폴더",children:[],sysCd:e.sysCd,userId:e.userId}:{bkmkId:o,type:"M",prntBkmkId:e.prntBkmkId,sortOrdr:a,menuId:e.menuId??"",menuNm:e.menuNm,sysCd:e.sysCd,userId:e.userId}},rootIds:t.rootIds.slice(),treeNodes:t.treeNodes};return ce(c,o,e.prntBkmkId),c.treeNodes=P(c.nodes,c.rootIds),c});try{let t=o;const a=x(r(),e.prntBkmkId),c=await y.callService("SCMBKMK00102",{iudFlag:"I",type:e.type,sysCd:e.sysCd,userId:e.userId,bkmkId:o,bkmkNm:e.bkmkNm,prntBkmkId:e.prntBkmkId,menuId:e.menuId,sortOrdr:a,chngId:y.getUserId()});return t=String(c?.bkmkId??c?.itemId??o),n(d=>{const i=pe(d,o,t);return{...i,treeNodes:P(i.nodes,i.rootIds)}}),t}catch(t){throw n(s),t}},moveNode:async({bkmkId:e,newPrntBkmkId:s,sortOrdr:o,userId:t})=>{const a=r(),c=structuredClone(a.nodes),d=[...a.rootIds],i=c[e];if(!i)return;if(s!=="-"){const u=c[s];if(!u||u.type!=="F")throw new Error("부모는 폴더만 가능합니다.")}const l=i.prntBkmkId??"-",f=l==="-"?d:c[l].children||=[];{const u=f.indexOf(e);u>=0&&f.splice(u,1)}const m=s==="-"?d:c[s].children||=[];m.splice(Math.max(0,Math.min(o,m.length)),0,e),i.prntBkmkId=s,n({nodes:c,rootIds:d}),z(c,d,s),z(c,d,l);try{await y.callService("SCMBKMK00104",{bkmkId:e,prntBkmkId:s,sortOrdr:o,chngId:t})}catch(u){throw n(a),u}},removeNode:async e=>{const s=E(r());n(o=>{if(!o.nodes[e])return o;const t={...o,nodes:{...o.nodes},rootIds:o.rootIds.slice(),treeNodes:o.treeNodes};return X(t,e),t.treeNodes=P(t.nodes,t.rootIds),t});try{await y.callService("SCMBKMK00103",{bkmkId:e})}catch(o){throw n(s),o}},editNode:async({bkmkId:e,userId:s,bkmkNm:o,prntBkmkId:t,sortOrdr:a})=>{const c=E(r());n(d=>{const i={...d,nodes:{...d.nodes}},l=i.nodes[e];return l?.type==="F"&&typeof o=="string"&&(i.nodes[e]={...l,bkmkNm:o}),i});try{await y.callService("SCMBKMK00102",{iudFlag:"U",userId:s,bkmkId:e,bkmkNm:o,prntBkmkId:t,sortOrdr:a,chngId:y.getUserId()})}catch(d){throw n(c),d}},addFolder:async(e,s,o,t)=>await r().addNode({type:"F",bkmkNm:e,prntBkmkId:s,sysCd:o,userId:t}),addMenuToFolder:async(e,s)=>D(r().nodes,s.menuId)?"이미 북마크에 저장된 메뉴입니다.":await r().addNode({type:"M",prntBkmkId:e,sysCd:"KH",userId:y.getUserId(),menuId:s.menuId,menuNm:s.menuNm}),toggleMenuFavorite:async(e,s)=>{if(!e)return;const o=r(),t=Object.values(o.nodes).find(c=>c.type==="M"&&c.menuId===s.menuId);if(t){await r().removeNode(t.bkmkId);return}let a=j(o);a||(await r().loadFavorites(e,!0),a=j(r())),a&&await r().addNode({type:"M",prntBkmkId:a,sysCd:"KH",userId:y.getUserId(),menuId:s.menuId,menuNm:s.menuNm})},removeMenuByMenuId:async e=>{const s=r(),o=D(s.nodes,e);o&&await r().removeNode(o)},removeMenu:async e=>{await r().removeNode(e)},removeFolder:async e=>{await r().removeNode(e)},editFolder:async(e,s,o,t,a)=>{await r().editNode({bkmkId:e,userId:s,bkmkNm:o,prntBkmkId:t,sortOrdr:a})},convertToAntTreeData:(e,s,o,t=!1)=>{const a=d=>o?d.toLowerCase().includes(o.toLowerCase()):!0,c=d=>{const i=e[d];if(!i||t&&i.type!=="F")return null;if(i.type==="F"){const l=i,f=(l.children||[]).map(u=>c(u)).filter(Boolean);return a(l.bkmkNm)||f.length>0?{key:l.bkmkId,type:"F",title:`📁 ${l.bkmkNm}`,bkmkNm:l.bkmkNm,prntBkmkId:l.prntBkmkId,sortOrdr:l.sortOrdr,fullPath:l.fullPath,children:f.length?f:void 0}:null}else{const l=i,f=l.menuNm?`${l.menuNm} (${l.menuId})`:l.menuId;return a(f)?{key:l.bkmkId,type:"M",title:`📄 ${f}`,prntBkmkId:l.prntBkmkId,sortOrdr:l.sortOrdr,fullPath:l.fullPath,isLeaf:!0}:null}};return s.map(c).filter(Boolean)}}),G=b.create(ne);function re(n){const r={},e=[],s=o=>{o.forEach(t=>{const a={type:t.type,bkmkId:t.bkmkId??t.BKMK_ID??t.id,prntBkmkId:t.prntBkmkId??t.PRNT_BKMK_ID??"-",sortOrdr:Number(t.sortOrdr??t.SORT_ORDR??0),sysCd:t.sysCd??t.SYS_CD,userId:t.userId??t.USER_ID,fullPath:t.fullPath??t.FULL_PATH};if(t.type==="F"){r[a.bkmkId]={...a,bkmkNm:t.bkmkNm??t.BKMK_NM??t.name??a.bkmkId,children:[]};const c=Array.isArray(t.children)?t.children:[];s(c)}else r[a.bkmkId]={...a,menuId:t.menuId??t.MENU_ID??"",menuNm:t.menuNm??t.MENU_NM}})};return s(n),Object.values(r).forEach(o=>{if(o.prntBkmkId&&o.prntBkmkId!=="-"){const t=r[o.prntBkmkId];t?.type==="F"&&t.children.push(o.bkmkId)}else o.type==="F"&&e.push(o.bkmkId)}),e.sort((o,t)=>(r[o].sortOrdr??0)-(r[t].sortOrdr??0)),Object.values(r).forEach(o=>{o.type==="F"&&o.children.sort((a,c)=>(r[a].sortOrdr??0)-(r[c].sortOrdr??0))}),{nodes:r,rootIds:e}}function E(n){return{...n,nodes:JSON.parse(JSON.stringify(n.nodes)),rootIds:n.rootIds.slice()}}function ae(){return`tmp_${Math.random().toString(36).slice(2,10)}`}function x(n,r){if(!r||r==="-")return n.rootIds.length;const e=n.nodes[r];return e?e.children.length:0}function ce(n,r,e){const s=n.nodes[r];if(s)if(e&&e!=="-"){const o=n.nodes[e];if(!o||o.type!=="F")return;s.prntBkmkId=e,o.children=[...o.children,r]}else s.prntBkmkId="-",n.rootIds=[...n.rootIds,r]}function de(n,r){const e=n.nodes[r];if(!e)return;const s=e.prntBkmkId;if(s&&s!=="-"){const o=n.nodes[s];o?.type==="F"&&(o.children=o.children.filter(t=>t!==r))}else n.rootIds=n.rootIds.filter(o=>o!==r)}function X(n,r){const e=n.nodes[r];if(!e)return;e.type==="F"&&e.children.slice().forEach(a=>X(n,a)),de(n,r);const{[r]:s,...o}=n.nodes;n.nodes=o}function pe(n,r,e){if(r===e)return n;const s=n.nodes[r];if(!s)return n;const o=JSON.parse(JSON.stringify(s));o.bkmkId=e;const t={...n.nodes,[e]:o};delete t[r];let a=n.rootIds;if(o.prntBkmkId&&o.prntBkmkId!=="-"){const c=t[o.prntBkmkId];c?.type==="F"&&(t[o.prntBkmkId]={...c,children:c.children.map(d=>d===r?e:d)})}else a=n.rootIds.map(c=>c===r?e:c);return{...n,nodes:t,rootIds:a}}function j(n){return n.rootIds.find(r=>n.nodes[r]?.type==="F")??null}function P(n,r){const e={};Object.values(n).forEach(d=>{const i=d.bkmkId,l=d.prntBkmkId;!i||!l||l==="-"||l===i||(e[l]??=[]).push(i)});const s=new Set,o=d=>{if(s.has(d))return null;const i=n[d];if(!i)return null;s.add(d);try{if(i.type==="F"){const f=i,m=e[d]??[];return{type:"F",bkmkId:d,bkmkNm:f.bkmkNm,prntBkmkId:f.prntBkmkId,children:m.map(o).filter(Boolean)}}const l=i;return{type:"M",bkmkId:d,bkmkNm:l.menuNm,menuId:l.menuId,menuNm:l.menuNm,prntBkmkId:l.prntBkmkId}}finally{s.delete(d)}},t=Object.values(n).filter(d=>d.prntBkmkId==="-"&&d.type==="M").map(d=>d.bkmkId),a=Object.values(n).filter(d=>d.prntBkmkId==="-"&&d.type==="F").map(d=>d.bkmkId);return Array.from(new Set([...r,...t,...a])).map(o).filter(Boolean)}function D(n,r){for(const e of Object.values(n))if(e.type==="M"&&e.menuId===r)return e.bkmkId;return null}function z(n,r,e){(!e||e==="-"?r:n[e].children||[]).forEach((o,t)=>{const a=n[o];a&&(a.sortOrdr=t)})}const R={DEFAULT_PRNT_GBCD:1},le=n=>n&&typeof n=="object"&&typeof n.menuId=="string"&&typeof n.menuNm=="string",Y=n=>Array.isArray(n)&&n.every(le);let T=[],q=[];const ie=n=>{if(n&&typeof n=="object"){const r=n;if(r.menus&&Y(r.menus))return r.menus;if(Y(n))return n}return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."),[]},ue=(n,r)=>!!r&&n.crprCd===r.crprCd&&n.userId===r.userId&&(n.prntGbcd??R.DEFAULT_PRNT_GBCD)===(r.prntGbcd??R.DEFAULT_PRNT_GBCD),me=n=>{if(T.length===n.length&&T.every((t,a)=>t.menuId===n[a]?.menuId&&t.menuPrntId===n[a]?.menuPrntId))return q;if(!n.length)return[];const r=new Map,e=[];n.forEach(t=>t?.menuId&&r.set(t.menuId,{...t,children:[]})),n.forEach(t=>{const a=r.get(t.menuId);a&&(t.menuPrntId&&t.menuPrntId!==""&&t.menuPrntId!=="-"?r.get(t.menuPrntId)?.children?.push(a):e.push(a))});const s=t=>t.sort((a,c)=>(a?.menuNo??0)-(c?.menuNo??0)).map(a=>({...a,children:a.children&&a.children.length?s(a.children):void 0})),o=s(e);return T=[...n],q=o,o},A=b.create((n,r)=>({menuList:[],flatMenuList:[],isLoading:!1,error:null,_lastFetchParams:null,fetchMenu:async({crprCd:e,userId:s,prntGbcd:o})=>{const t={crprCd:e,userId:s,prntGbcd:o??R.DEFAULT_PRNT_GBCD};if(ue(t,r()._lastFetchParams)){console.log("✅ 중복 fetch 차단",t);return}n({isLoading:!0,error:null,_lastFetchParams:t});try{const a=await y.callService(y.getServiceCode("AUTH_MENU"),t),c=ie(a),d=me(c);n({flatMenuList:c,menuList:d,isLoading:!1,error:null})}catch(a){n({isLoading:!1,error:a?.message??"메뉴 로드 실패"})}},clearMenu:()=>{n({menuList:[],flatMenuList:[],error:null,_lastFetchParams:null})},findMenuById:e=>{const{flatMenuList:s}=r();return s.find(o=>o.menuId===e)??null}})),O={MAX_TABS:15},U=b.create((n,r)=>({activeMenuId:null,activeMenuItem:null,activeDetailItem:null,tabs:[],sidebarCollapsed:!1,maxTabs:O.MAX_TABS,tabProtectFlag:{},tabParams:{},componentLabelMap:{},clearMenuViewStore:()=>{n({activeMenuId:null,activeMenuItem:null,activeDetailItem:null,tabs:[],sidebarCollapsed:!1,maxTabs:O.MAX_TABS,tabProtectFlag:{},tabParams:{},componentLabelMap:{}})},openTabFromMenu:(e,s)=>{const{tabs:o}=r(),t=o.find(c=>c.key===e.menuId),a=o.find(c=>c.key===e.menuId);if(t)a!=null?(n({activeMenuId:e.menuId,activeMenuItem:e}),r().setTabParams(e.menuId,s||{}),e?.prsnInfoYn==="Y"&&r().setProtectFlagForKey(e.menuId)):L.message.warning("유효하지 않은 메뉴정보입니다.");else{if(o.length>O.MAX_TABS){console.warn("❌ 최대 탭 개수를 초과했습니다."),L.message.warning(`최대 ${O.MAX_TABS}개의 탭만 열 수 있습니다.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("zustand"),y=require("../utils/index.cjs"),L=require("antd"),V=require("../chunks/layout-components-EmNfHHRC.cjs"),F=require("react"),Q=require("react-router-dom");function ee(n,r){let e;try{e=n()}catch{return}return{getItem:o=>{var t;const a=d=>d===null?null:JSON.parse(d,void 0),c=(t=e.getItem(o))!=null?t:null;return c instanceof Promise?c.then(a):a(c)},setItem:(o,t)=>e.setItem(o,JSON.stringify(t,void 0)),removeItem:o=>e.removeItem(o)}}const H=n=>r=>{try{const e=n(r);return e instanceof Promise?e:{then(s){return H(s)(e)},catch(s){return this}}}catch(e){return{then(s){return this},catch(s){return H(s)(e)}}}},te=(n,r)=>(e,s,o)=>{let t={storage:ee(()=>localStorage),partialize:C=>C,version:0,merge:(C,S)=>({...S,...C}),...r},a=!1;const c=new Set,d=new Set;let i=t.storage;if(!i)return n((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`),e(...C)},s,o);const l=()=>{const C=t.partialize({...s()});return i.setItem(t.name,{state:C,version:t.version})},f=o.setState;o.setState=(C,S)=>(f(C,S),l());const m=n((...C)=>(e(...C),l()),s,o);o.getInitialState=()=>m;let u;const h=()=>{var C,S;if(!i)return;a=!1,c.forEach(g=>{var N;return g((N=s())!=null?N:m)});const k=((S=t.onRehydrateStorage)==null?void 0:S.call(t,(C=s())!=null?C:m))||void 0;return H(i.getItem.bind(i))(t.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==t.version){if(t.migrate){const N=t.migrate(g.state,g.version);return N instanceof Promise?N.then(B=>[!0,B]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var N;const[B,Z]=g;if(u=t.merge(Z,(N=s())!=null?N:m),e(u,!0),B)return l()}).then(()=>{k?.(u,void 0),u=s(),a=!0,d.forEach(g=>g(u))}).catch(g=>{k?.(void 0,g)})};return o.persist={setOptions:C=>{t={...t,...C},C.storage&&(i=C.storage)},clearStorage:()=>{i?.removeItem(t.name)},getOptions:()=>t,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:C=>(c.add(C),()=>{c.delete(C)}),onFinishHydration:C=>(d.add(C),()=>{d.delete(C)})},t.skipHydration||h(),u||m},M=te,w=b.create()(M((n,r)=>({user:null,hrInfo:null,buttonAuths:{},isLoggedIn:()=>!!r().user,setLoginUser:(e,s)=>{n({user:e,hrInfo:s??null}),console.log("사용자 로그인:",e,s)},clearLoginUser:()=>{n({user:null,hrInfo:null,buttonAuths:{}}),console.log("사용자 로그아웃")},updateUser:(e,s)=>{const o=r().user,t=r().hrInfo;o&&n({user:{...o,...e}}),t&&n({hrInfo:{...t,...s}})},getButtonAuth:(e,s)=>{const o=`${e}_${s}`;return r().buttonAuths[o]||null},setButtonAuth:(e,s,o)=>{const t=`${e}_${s}`;n(a=>({buttonAuths:{...a.buttonAuths,[t]:o}}))},clearButtonAuths:()=>{n({buttonAuths:{}})}}),{name:"user-storage",partialize:n=>({user:n.user,hrInfo:n.hrInfo,isLoggedIn:n.isLoggedIn})})),K={CACHE_SIZE_LIMIT:1e3},p={codeCache:new Map,nameCache:new Map,optionCache:new Map,colorCache:new Map,loadedGroups:new Set,cacheHits:new Map,clearCache(){this.codeCache.clear(),this.nameCache.clear(),this.optionCache.clear(),this.colorCache.clear(),this.loadedGroups.clear(),this.cacheHits.clear()},cleanupCache(){const n=Array.from(this.cacheHits.entries());n.sort((e,s)=>e[1]-s[1]),n.slice(0,Math.floor(n.length*.3)).forEach(([e])=>{this.codeCache.delete(e),this.nameCache.delete(e),this.optionCache.delete(e),this.colorCache.delete(e),this.cacheHits.delete(e)})},isGroupLoaded(n){return this.loadedGroups.has(n)},markGroupLoaded(n){this.loadedGroups.add(n)}},v=n=>{console.log("대규모 데이터 변환 시작:",n);const r={};if(n&&n.code&&Array.isArray(n.code)){const e=n.code,s=n.opt||[],o=new Map;s.forEach(t=>{t.cmmnCd&&t.enblYn==="Y"&&(o.has(t.cmmnCd)||o.set(t.cmmnCd,[]),o.get(t.cmmnCd).push(t))}),e.forEach(t=>{if(t&&t.cmmnCdGrp&&t.cmmnCd&&t.enblYn==="Y"){const a=t.cmmnCdGrp;r[a]||(r[a]={});const d=(o.get(t.cmmnCd)||[]).reduce((i,l)=>(l.optnCd&&l.optnNm&&(i[l.optnCd]=l.optnNm),i),{});r[a][t.cmmnCd]={codeValue:t.cmmnCd,codeNm:t.cmmnCdNm,groupCode:t.cmmnCdGrp,commonCode:t.cmmnCd,labelColor:t.cmmnCdClr,systemCodeYn:t.syscdYn,sortOrder:parseInt(t.sortOrd)||1,enabled:t.enblYn==="Y",options:Object.keys(d).length>0?d:null,originalData:t}}})}return console.log("대규모 데이터 변환 완료:",r),r},I=b.create()(M((n,r)=>({codeData:null,isLoading:!1,error:null,lastUpdated:null,loadedGroups:new Set,fetchSystemCodes:async()=>{n({isLoading:!0,error:null});try{console.log("시스템 공통코드 데이터 가져오기 시작: SCMSIGN00301");const e=await y.callService(y.getServiceCode("SRCH_CODE"),{crprCd:"100"});console.log("시스템 공통코드 응답:",e),console.log("시스템 공통코드목록:",e.code),console.log("시스템 공통코드옵션목록:",e.opt);const s=v(e),t={...r().codeData||{},...s};p.clearCache();const a=new Set(Object.keys(t));a.forEach(c=>{p.markGroupLoaded(c)}),n({codeData:t,isLoading:!1,error:null,lastUpdated:new Date,loadedGroups:a}),console.log("시스템 공통코드 데이터 가져오기 완료")}catch(e){console.error("시스템 공통코드 데이터 가져오기 실패:",e),n({isLoading:!1,error:e instanceof Error?e.message:"시스템 공통코드 데이터 가져오기 실패"})}},fetchBusinessCodes:async()=>{n({isLoading:!0,error:null});try{console.log("업무 공통코드 데이터 가져오기 시작: SCMSIGN00302");const e=await y.callService("SCMSIGN00302",{sysCd:__SYS_CD__});console.log("업무 공통코드 응답:",e),console.log("업무 공통코드목록:",e.code),console.log("업무 공통코드옵션목록:",e.opt);const s=v(e),t={...r().codeData||{},...s};p.clearCache();const a=new Set(Object.keys(t));a.forEach(c=>{p.markGroupLoaded(c)}),n({codeData:t,isLoading:!1,error:null,lastUpdated:new Date,loadedGroups:a}),console.log("업무 공통코드 데이터 가져오기 완료")}catch(e){console.error("업무 공통코드 데이터 가져오기 실패:",e),n({isLoading:!1,error:e instanceof Error?e.message:"업무 공통코드 데이터 가져오기 실패"})}},fetchData:async()=>{n({isLoading:!0,error:null});try{console.log("전체 공통코드 데이터 가져오기 시작 (시스템 + 업무)");const[e,s]=await Promise.all([y.callService(y.getServiceCode("SRCH_CODE"),{crprCd:"100"}),y.callService("SCMSIGN00302",{sysCd:__SYS_CD__})]);console.log("시스템 공통코드 응답:",e),console.log("업무 공통코드 응답:",s);const o=v(e),t=v(s),a={...o,...t};p.clearCache();const c=new Set(Object.keys(a));c.forEach(d=>{p.markGroupLoaded(d)}),n({codeData:a,isLoading:!1,error:null,lastUpdated:new Date,loadedGroups:c}),console.log("전체 공통코드 데이터 가져오기 완료")}catch(e){console.error("전체 공통코드 데이터 가져오기 실패:",e),n({isLoading:!1,error:e instanceof Error?e.message:"전체 공통코드 데이터 가져오기 실패"})}},loadSpecificGroup:async e=>{const{codeData:s,loadedGroups:o}=r();if(!s||o.has(e))return;const t=new Set(o).add(e);n({loadedGroups:t}),p.markGroupLoaded(e)},setData:e=>{p.clearCache();const s=new Set(Object.keys(e));s.forEach(o=>{p.markGroupLoaded(o)}),n({codeData:e,lastUpdated:new Date,loadedGroups:s})},clearData:()=>{p.clearCache(),n({codeData:null,isLoading:!1,error:null,lastUpdated:null,loadedGroups:new Set})},getLoadedGroups:()=>Array.from(r().loadedGroups)}),{name:"large-data-storage",partialize:n=>({codeData:n.codeData,lastUpdated:n.lastUpdated,loadedGroups:Array.from(n.loadedGroups)})})),_=b.create()(M((n,r)=>({get codeData(){return I.getState().codeData},get isLoading(){return I.getState().isLoading},get error(){return I.getState().error},get lastUpdated(){return I.getState().lastUpdated},fetchCommonCodes:async()=>{await I.getState().fetchData()},getCodeList:(e,s)=>{const{enabledOnly:o=!0,systemCodeOnly:t=!1,sortByOrder:a=!1,excludeParentCode:c=!1}=s||{},d=`simpleCodeList_${e}_${o}_${t}_${a}_${c}`;if(p.optionCache.has(d)){const h=p.cacheHits.get(d)||0;return p.cacheHits.set(d,h+1),p.optionCache.get(d)}const i=I.getState().codeData;if(!i)return[];if(!p.isGroupLoaded(e)&&!i[e])return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`),[];const l=[],f=i[e];f&&Object.values(f).forEach(h=>{if(!(o&&!h.enabled)&&!(t&&h.systemCodeYn!=="Y"))if(c){const C=e.length,S=h.codeValue.substring(C);S.length>0&&l.push({...h,codeValue:S})}else l.push(h)});let m;a?m=l.sort((h,C)=>h.sortOrder!==C.sortOrder?h.sortOrder-C.sortOrder:h.codeValue.localeCompare(C.codeValue)):m=l.sort((h,C)=>h.codeValue.localeCompare(C.codeValue));const u=m.map(h=>({label:h.codeNm,value:h.codeValue,tagColor:h.labelColor}));return p.optionCache.size>=K.CACHE_SIZE_LIMIT&&p.cleanupCache(),p.optionCache.set(d,u),p.cacheHits.set(d,1),u},getCodeName:e=>{if(p.nameCache.has(e)){const o=p.cacheHits.get(`name_${e}`)||0;return p.cacheHits.set(`name_${e}`,o+1),p.nameCache.get(e)}const s=I.getState().codeData;if(!s)return null;for(const o of Object.values(s))for(const t of Object.values(o))if(t.codeValue===e)return p.nameCache.set(e,t.codeNm),p.cacheHits.set(`name_${e}`,1),t.codeNm;return null},getCodeColor:e=>{if(p.colorCache.has(e)){const o=p.cacheHits.get(`color_${e}`)||0;return p.cacheHits.set(`color_${e}`,o+1),p.colorCache.get(e)}const s=I.getState().codeData;if(!s)return null;for(const o of Object.values(s))for(const t of Object.values(o))if(t.codeValue===e)return p.colorCache.set(e,t.labelColor||""),p.cacheHits.set(`color_${e}`,1),t.labelColor;return null},getGridLookup:e=>{const s=`gridLookup_${e}`;if(p.optionCache.has(s)){const i=p.cacheHits.get(s)||0;return p.cacheHits.set(s,i+1),p.optionCache.get(s)}const o=I.getState().codeData;if(!o)return{labels:[],values:[],lookupDisplay:!0};const t=o[e];if(!t)return{labels:[],values:[],lookupDisplay:!0};const a=[],c=[];Object.values(t).filter(i=>i.enabled).sort((i,l)=>i.sortOrder-l.sortOrder).forEach(i=>{a.push(i.codeNm),c.push(i.codeValue)});const d={labels:a,values:c,lookupDisplay:!0};return p.optionCache.set(s,d),p.cacheHits.set(s,1),d},getCodeByOption:(e,s,o)=>{const t=`codeByOption_${e}_${s}_${o}`;if(p.codeCache.has(t)){const l=p.cacheHits.get(t)||0;return p.cacheHits.set(t,l+1),p.codeCache.get(t)}const a=I.getState().codeData;if(!a)return[];const c=[],d=a[e];d&&Object.values(d).forEach(l=>{l.enabled&&l.options&&l.options[s]===o&&c.push({...l,codeNm:l.options[s]||l.codeNm})});const i=c.sort((l,f)=>l.codeValue.localeCompare(f.codeValue));return p.codeCache.size>=K.CACHE_SIZE_LIMIT&&p.cleanupCache(),p.codeCache.set(t,i),p.cacheHits.set(t,1),i},getCodeListByOption:(e,s,o)=>{const{enabledOnly:t=!0,systemCodeOnly:a=!1,sortByOrder:c=!1}=o||{},d=`codeListByOption_${e}_${s}_${t}_${a}_${c}`;if(p.codeCache.has(d)){const u=p.cacheHits.get(d)||0;return p.cacheHits.set(d,u+1),p.codeCache.get(d)}const i=I.getState().codeData;if(!i)return[];if(!p.isGroupLoaded(e)&&!i[e])return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`),[];const l=[],f=i[e];f&&Object.values(f).forEach(u=>{t&&!u.enabled||a&&u.systemCodeYn!=="Y"||u.options&&u.options[s]&&l.push({label:u.options[s],value:u.commonCode,tagColor:u.labelColor})});let m;return c?m=l.sort((u,h)=>u.value.localeCompare(h.value)):m=l.sort((u,h)=>u.value.localeCompare(h.value)),p.codeCache.size>=K.CACHE_SIZE_LIMIT&&p.cleanupCache(),p.codeCache.set(d,m),p.cacheHits.set(d,1),m},getAvailableGroupCodes:()=>{const e="available_group_codes";if(p.nameCache.has(e)){const t=p.cacheHits.get(e)||0;return p.cacheHits.set(e,t+1),JSON.parse(p.nameCache.get(e))}const s=I.getState().codeData;if(!s)return[];const o=Object.keys(s).sort();return p.nameCache.set(e,JSON.stringify(o)),p.cacheHits.set(e,1),o},clearCodes:()=>{I.getState().clearData()}}),{name:"code-storage",partialize:n=>({})})),oe=b.create()(M((n,r)=>({get codeData(){return I.getState().codeData},get isLoading(){return I.getState().isLoading},get error(){return I.getState().error},get lastUpdated(){return I.getState().lastUpdated},fetchCommonCodes:async()=>{await I.getState().fetchData()},getOptionValue:(e,s)=>{const o=`option_${e}_${s}`;if(p.optionCache.has(o)){const c=p.cacheHits.get(o)||0;return p.cacheHits.set(o,c+1),p.optionCache.get(o)}const t=I.getState().codeData;if(!t)return null;const a=t[e];if(a&&a[s]){const c=a[s].options;return p.optionCache.set(o,c),p.cacheHits.set(o,1),c}return null},getOptionByKey:(e,s,o)=>{const t=`option_${e}_${s}_${o}`;if(p.optionCache.has(t)){const d=p.cacheHits.get(t)||0;return p.cacheHits.set(t,d+1),p.optionCache.get(t)}const a=r().getOptionValue(e,s),c=a?a[o]:null;return p.optionCache.set(t,c),p.cacheHits.set(t,1),c},clearCodes:()=>{I.getState().clearData()}}),{name:"option-storage",partialize:n=>({})})),se=b.create()(M((n,r)=>({get codeData(){return I.getState().codeData},get isLoading(){return I.getState().isLoading},get error(){return I.getState().error},get lastUpdated(){return I.getState().lastUpdated},fetchCommonCodes:async()=>{await I.getState().fetchData()},getColorCode:e=>{if(p.colorCache.has(e)){const o=p.cacheHits.get(`color_${e}`)||0;return p.cacheHits.set(`color_${e}`,o+1),p.colorCache.get(e)}const s=I.getState().codeData;if(!s)return null;for(const o of Object.values(s))for(const t of Object.values(o))if(t.codeValue===e)return p.colorCache.set(e,t.labelColor||""),p.cacheHits.set(`color_${e}`,1),t.labelColor;return null},getColorMapping:()=>{const e="color_mapping";if(p.optionCache.has(e)){const t=p.cacheHits.get(e)||0;return p.cacheHits.set(e,t+1),p.optionCache.get(e)}const s=I.getState().codeData;if(!s)return[];const o=[];return Object.values(s).forEach(t=>{Object.values(t).forEach(a=>{a.labelColor&&o.push({code:a.codeValue,color:a.labelColor})})}),p.optionCache.set(e,o),p.cacheHits.set(e,1),o},clearCodes:()=>{I.getState().clearData()}}),{name:"color-storage",partialize:n=>({})})),ne=(n,r)=>({nodes:{},rootIds:[],loadedFor:void 0,loading:!1,error:void 0,treeNodes:[],isMenuBookmarked:e=>Object.values(r().nodes).some(s=>s.type==="M"&&s.menuId===e),getPrntBkmkIdByMenuId:e=>{const s=D(r().nodes,e);return s?r().nodes[s]?.prntBkmkId??"-":"-"},getNodeByMenuId:e=>{const s=D(r().nodes,e);if(!s)return null;const o=r().nodes[s];return o?.type==="M"?o:null},getFolderTree:e=>{const{nodes:s,rootIds:o}=r(),t=c=>e?c.toLowerCase().includes(e.toLowerCase()):!0,a=c=>{const d=s[c];if(!d||d.type!=="F")return null;const i=d,l=(i.children||[]).map(m=>s[m]).filter(m=>!!m&&m.type==="F").map(m=>a(m.bkmkId)).filter(Boolean);return t(i.bkmkNm)||l.length>0?{key:i.bkmkId,title:`📁 ${i.bkmkNm}`,children:l.length?l:void 0}:null};return o.map(c=>a(c)).filter(Boolean)},loadFavorites:async(e,s=!1)=>{console.log("loadFavorites ::::: ",e,s);const o=r();if(!(!s&&o.loadedFor===e&&Object.keys(o.nodes).length)){n({loading:!0,error:void 0});try{const t=await y.callService("SCMBKMK00101",{userId:e}),a=Array.isArray(t?.sub)?t.sub:[],c=re(a),d=P(c.nodes,c.rootIds);n({...c,treeNodes:d,loadedFor:e,loading:!1})}catch(t){throw n({loading:!1,error:t?.message||"즐겨찾기 로드 실패"}),t}}},loadFavoritesIfNeeded:async e=>{const s=r();(s.loadedFor!==e||Object.keys(s.nodes).length===0)&&await r().loadFavorites(e)},clearFavorites:()=>{n({nodes:{},rootIds:[],treeNodes:[],loadedFor:void 0,loading:!1,error:void 0}),console.log("📚 북마크 스토어 초기화 완료")},addNode:async e=>{const s=E(r()),o=ae();n(t=>{const a=e.sortOrdr??x(t,e.prntBkmkId),c={...t,nodes:{...t.nodes,[o]:e.type==="F"?{bkmkId:o,type:"F",prntBkmkId:e.prntBkmkId||"-",sortOrdr:a,bkmkNm:e.bkmkNm??"새 폴더",children:[],sysCd:e.sysCd,userId:e.userId}:{bkmkId:o,type:"M",prntBkmkId:e.prntBkmkId,sortOrdr:a,menuId:e.menuId??"",menuNm:e.menuNm,sysCd:e.sysCd,userId:e.userId}},rootIds:t.rootIds.slice(),treeNodes:t.treeNodes};return ce(c,o,e.prntBkmkId),c.treeNodes=P(c.nodes,c.rootIds),c});try{let t=o;const a=x(r(),e.prntBkmkId),c=await y.callService("SCMBKMK00102",{iudFlag:"I",type:e.type,sysCd:e.sysCd,userId:e.userId,bkmkId:o,bkmkNm:e.bkmkNm,prntBkmkId:e.prntBkmkId,menuId:e.menuId,sortOrdr:a,chngId:y.getUserId()});return t=String(c?.bkmkId??c?.itemId??o),n(d=>{const i=pe(d,o,t);return{...i,treeNodes:P(i.nodes,i.rootIds)}}),t}catch(t){throw n(s),t}},moveNode:async({bkmkId:e,newPrntBkmkId:s,sortOrdr:o,userId:t})=>{const a=r(),c=structuredClone(a.nodes),d=[...a.rootIds],i=c[e];if(!i)return;if(s!=="-"){const u=c[s];if(!u||u.type!=="F")throw new Error("부모는 폴더만 가능합니다.")}const l=i.prntBkmkId??"-",f=l==="-"?d:c[l].children||=[];{const u=f.indexOf(e);u>=0&&f.splice(u,1)}const m=s==="-"?d:c[s].children||=[];m.splice(Math.max(0,Math.min(o,m.length)),0,e),i.prntBkmkId=s,n({nodes:c,rootIds:d}),z(c,d,s),z(c,d,l);try{await y.callService("SCMBKMK00104",{bkmkId:e,prntBkmkId:s,sortOrdr:o,chngId:t})}catch(u){throw n(a),u}},removeNode:async e=>{const s=E(r());n(o=>{if(!o.nodes[e])return o;const t={...o,nodes:{...o.nodes},rootIds:o.rootIds.slice(),treeNodes:o.treeNodes};return X(t,e),t.treeNodes=P(t.nodes,t.rootIds),t});try{await y.callService("SCMBKMK00103",{bkmkId:e})}catch(o){throw n(s),o}},editNode:async({bkmkId:e,userId:s,bkmkNm:o,prntBkmkId:t,sortOrdr:a})=>{const c=E(r());n(d=>{const i={...d,nodes:{...d.nodes}},l=i.nodes[e];return l?.type==="F"&&typeof o=="string"&&(i.nodes[e]={...l,bkmkNm:o}),i});try{await y.callService("SCMBKMK00102",{iudFlag:"U",userId:s,bkmkId:e,bkmkNm:o,prntBkmkId:t,sortOrdr:a,chngId:y.getUserId()})}catch(d){throw n(c),d}},addFolder:async(e,s,o,t)=>await r().addNode({type:"F",bkmkNm:e,prntBkmkId:s,sysCd:o,userId:t}),addMenuToFolder:async(e,s)=>D(r().nodes,s.menuId)?"이미 북마크에 저장된 메뉴입니다.":await r().addNode({type:"M",prntBkmkId:e,sysCd:"KH",userId:y.getUserId(),menuId:s.menuId,menuNm:s.menuNm}),toggleMenuFavorite:async(e,s)=>{if(!e)return;const o=r(),t=Object.values(o.nodes).find(c=>c.type==="M"&&c.menuId===s.menuId);if(t){await r().removeNode(t.bkmkId);return}let a=j(o);a||(await r().loadFavorites(e,!0),a=j(r())),a&&await r().addNode({type:"M",prntBkmkId:a,sysCd:"KH",userId:y.getUserId(),menuId:s.menuId,menuNm:s.menuNm})},removeMenuByMenuId:async e=>{const s=r(),o=D(s.nodes,e);o&&await r().removeNode(o)},removeMenu:async e=>{await r().removeNode(e)},removeFolder:async e=>{await r().removeNode(e)},editFolder:async(e,s,o,t,a)=>{await r().editNode({bkmkId:e,userId:s,bkmkNm:o,prntBkmkId:t,sortOrdr:a})},convertToAntTreeData:(e,s,o,t=!1)=>{const a=d=>o?d.toLowerCase().includes(o.toLowerCase()):!0,c=d=>{const i=e[d];if(!i||t&&i.type!=="F")return null;if(i.type==="F"){const l=i,f=(l.children||[]).map(u=>c(u)).filter(Boolean);return a(l.bkmkNm)||f.length>0?{key:l.bkmkId,type:"F",title:`📁 ${l.bkmkNm}`,bkmkNm:l.bkmkNm,prntBkmkId:l.prntBkmkId,sortOrdr:l.sortOrdr,fullPath:l.fullPath,children:f.length?f:void 0}:null}else{const l=i,f=l.menuNm?`${l.menuNm} (${l.menuId})`:l.menuId;return a(f)?{key:l.bkmkId,type:"M",title:`📄 ${f}`,prntBkmkId:l.prntBkmkId,sortOrdr:l.sortOrdr,fullPath:l.fullPath,isLeaf:!0}:null}};return s.map(c).filter(Boolean)}}),G=b.create(ne);function re(n){const r={},e=[],s=o=>{o.forEach(t=>{const a={type:t.type,bkmkId:t.bkmkId??t.BKMK_ID??t.id,prntBkmkId:t.prntBkmkId??t.PRNT_BKMK_ID??"-",sortOrdr:Number(t.sortOrdr??t.SORT_ORDR??0),sysCd:t.sysCd??t.SYS_CD,userId:t.userId??t.USER_ID,fullPath:t.fullPath??t.FULL_PATH};if(t.type==="F"){r[a.bkmkId]={...a,bkmkNm:t.bkmkNm??t.BKMK_NM??t.name??a.bkmkId,children:[]};const c=Array.isArray(t.children)?t.children:[];s(c)}else r[a.bkmkId]={...a,menuId:t.menuId??t.MENU_ID??"",menuNm:t.menuNm??t.MENU_NM}})};return s(n),Object.values(r).forEach(o=>{if(o.prntBkmkId&&o.prntBkmkId!=="-"){const t=r[o.prntBkmkId];t?.type==="F"&&t.children.push(o.bkmkId)}else o.type==="F"&&e.push(o.bkmkId)}),e.sort((o,t)=>(r[o].sortOrdr??0)-(r[t].sortOrdr??0)),Object.values(r).forEach(o=>{o.type==="F"&&o.children.sort((a,c)=>(r[a].sortOrdr??0)-(r[c].sortOrdr??0))}),{nodes:r,rootIds:e}}function E(n){return{...n,nodes:JSON.parse(JSON.stringify(n.nodes)),rootIds:n.rootIds.slice()}}function ae(){return`tmp_${Math.random().toString(36).slice(2,10)}`}function x(n,r){if(!r||r==="-")return n.rootIds.length;const e=n.nodes[r];return e?e.children.length:0}function ce(n,r,e){const s=n.nodes[r];if(s)if(e&&e!=="-"){const o=n.nodes[e];if(!o||o.type!=="F")return;s.prntBkmkId=e,o.children=[...o.children,r]}else s.prntBkmkId="-",n.rootIds=[...n.rootIds,r]}function de(n,r){const e=n.nodes[r];if(!e)return;const s=e.prntBkmkId;if(s&&s!=="-"){const o=n.nodes[s];o?.type==="F"&&(o.children=o.children.filter(t=>t!==r))}else n.rootIds=n.rootIds.filter(o=>o!==r)}function X(n,r){const e=n.nodes[r];if(!e)return;e.type==="F"&&e.children.slice().forEach(a=>X(n,a)),de(n,r);const{[r]:s,...o}=n.nodes;n.nodes=o}function pe(n,r,e){if(r===e)return n;const s=n.nodes[r];if(!s)return n;const o=JSON.parse(JSON.stringify(s));o.bkmkId=e;const t={...n.nodes,[e]:o};delete t[r];let a=n.rootIds;if(o.prntBkmkId&&o.prntBkmkId!=="-"){const c=t[o.prntBkmkId];c?.type==="F"&&(t[o.prntBkmkId]={...c,children:c.children.map(d=>d===r?e:d)})}else a=n.rootIds.map(c=>c===r?e:c);return{...n,nodes:t,rootIds:a}}function j(n){return n.rootIds.find(r=>n.nodes[r]?.type==="F")??null}function P(n,r){const e={};Object.values(n).forEach(d=>{const i=d.bkmkId,l=d.prntBkmkId;!i||!l||l==="-"||l===i||(e[l]??=[]).push(i)});const s=new Set,o=d=>{if(s.has(d))return null;const i=n[d];if(!i)return null;s.add(d);try{if(i.type==="F"){const f=i,m=e[d]??[];return{type:"F",bkmkId:d,bkmkNm:f.bkmkNm,prntBkmkId:f.prntBkmkId,children:m.map(o).filter(Boolean)}}const l=i;return{type:"M",bkmkId:d,bkmkNm:l.menuNm,menuId:l.menuId,menuNm:l.menuNm,prntBkmkId:l.prntBkmkId}}finally{s.delete(d)}},t=Object.values(n).filter(d=>d.prntBkmkId==="-"&&d.type==="M").map(d=>d.bkmkId),a=Object.values(n).filter(d=>d.prntBkmkId==="-"&&d.type==="F").map(d=>d.bkmkId);return Array.from(new Set([...r,...t,...a])).map(o).filter(Boolean)}function D(n,r){for(const e of Object.values(n))if(e.type==="M"&&e.menuId===r)return e.bkmkId;return null}function z(n,r,e){(!e||e==="-"?r:n[e].children||[]).forEach((o,t)=>{const a=n[o];a&&(a.sortOrdr=t)})}const R={DEFAULT_PRNT_GBCD:1},le=n=>n&&typeof n=="object"&&typeof n.menuId=="string"&&typeof n.menuNm=="string",Y=n=>Array.isArray(n)&&n.every(le);let T=[],q=[];const ie=n=>{if(n&&typeof n=="object"){const r=n;if(r.menus&&Y(r.menus))return r.menus;if(Y(n))return n}return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."),[]},ue=(n,r)=>!!r&&n.crprCd===r.crprCd&&n.userId===r.userId&&(n.prntGbcd??R.DEFAULT_PRNT_GBCD)===(r.prntGbcd??R.DEFAULT_PRNT_GBCD),me=n=>{if(T.length===n.length&&T.every((t,a)=>t.menuId===n[a]?.menuId&&t.menuPrntId===n[a]?.menuPrntId))return q;if(!n.length)return[];const r=new Map,e=[];n.forEach(t=>t?.menuId&&r.set(t.menuId,{...t,children:[]})),n.forEach(t=>{const a=r.get(t.menuId);a&&(t.menuPrntId&&t.menuPrntId!==""&&t.menuPrntId!=="-"?r.get(t.menuPrntId)?.children?.push(a):e.push(a))});const s=t=>t.sort((a,c)=>(a?.menuNo??0)-(c?.menuNo??0)).map(a=>({...a,children:a.children&&a.children.length?s(a.children):void 0})),o=s(e);return T=[...n],q=o,o},A=b.create((n,r)=>({menuList:[],flatMenuList:[],isLoading:!1,error:null,_lastFetchParams:null,fetchMenu:async({crprCd:e,userId:s,prntGbcd:o})=>{const t={crprCd:e,userId:s,prntGbcd:o??R.DEFAULT_PRNT_GBCD};if(ue(t,r()._lastFetchParams)){console.log("✅ 중복 fetch 차단",t);return}n({isLoading:!0,error:null,_lastFetchParams:t});try{const a=await y.callService(y.getServiceCode("AUTH_MENU"),t),c=ie(a),d=me(c);n({flatMenuList:c,menuList:d,isLoading:!1,error:null})}catch(a){n({isLoading:!1,error:a?.message??"메뉴 로드 실패"})}},clearMenu:()=>{n({menuList:[],flatMenuList:[],error:null,_lastFetchParams:null})},findMenuById:e=>{const{flatMenuList:s}=r();return s.find(o=>o.menuId===e)??null}})),O={MAX_TABS:15},U=b.create((n,r)=>({activeMenuId:null,activeMenuItem:null,activeDetailItem:null,tabs:[],sidebarCollapsed:!1,maxTabs:O.MAX_TABS,tabProtectFlag:{},tabParams:{},componentLabelMap:{},clearMenuViewStore:()=>{n({activeMenuId:null,activeMenuItem:null,activeDetailItem:null,tabs:[],sidebarCollapsed:!1,maxTabs:O.MAX_TABS,tabProtectFlag:{},tabParams:{},componentLabelMap:{}})},openTabFromMenu:(e,s)=>{const{tabs:o}=r(),t=o.find(c=>c.key===e.menuId),a=o.find(c=>c.key===e.menuId);if(t)a!=null?(n({activeMenuId:e.menuId,activeMenuItem:e}),r().setTabParams(e.menuId,s||{}),e?.prsnInfoYn==="Y"&&r().setProtectFlagForKey(e.menuId)):L.message.warning("유효하지 않은 메뉴정보입니다.");else{if(o.length>O.MAX_TABS){console.warn("❌ 최대 탭 개수를 초과했습니다."),L.message.warning(`최대 ${O.MAX_TABS}개의 탭만 열 수 있습니다.
2
2
  기존 탭을 닫고 다시 시도해주세요.`);return}const c={key:e.menuId,label:e.menuNm,gubun:"M",menuItem:e,closable:!0};n({tabs:[...o,c],activeMenuId:e.menuId,activeMenuItem:e}),r().setTabParams(e.menuId,s||{}),e?.prsnInfoYn==="Y"&&r().setProtectFlagForKey(e.menuId)}},openTabByMenuId:(e,s)=>{const o=A.getState().findMenuById(e);o?r().openTabFromMenu(o,s):L.message.warning("메뉴 ID를 찾을 수 없습니다.")},openDetailView:(e,s,o)=>{const{tabs:t}=r();if(t.find(c=>c.key===e.viewId))r().focusTab(e.viewId);else{const c={key:e.viewId,label:e.viewLabel,gubun:"C",componentItem:{scrnPath:s,prsnInfoYn:o,prntInfo:e.prntInfo},closable:!0};n({tabs:[...t,c],activeMenuId:e.viewId,activeDetailItem:e}),r().setTabParams(e.viewId,e.viewParams||{})}},closeTab:e=>{const{tabs:s,activeMenuId:o}=r();s.find(c=>c.key===e);const t=s.filter(c=>c.key!==e);let a=o;if(o===e){const c=s.findIndex(d=>d.key===e);a=t.length?t[Math.min(c,t.length-1)]?.key??null:null}n({tabs:t}),a&&r().focusTab(a)},focusTab:e=>{const{tabs:s}=r(),o=s.find(t=>t.key===e);if(o){const t=o.gubun==="C"?{viewId:o.key,viewLabel:o.label,prntInfo:o.componentItem?.prntInfo}:null;o.menuItem?.prsnInfoYn==="Y"?(n({activeMenuId:e,activeMenuItem:o.menuItem,activeDetailItem:t}),console.log("✅ 탭 포커스 (개인정보) - activeMenuItem:",o.menuItem),r().setProtectFlagForKey(e)):(n({activeMenuId:e,activeMenuItem:o.menuItem,activeDetailItem:t}),r().clearProtectFlagForKey(e))}else n({activeMenuId:e,activeMenuItem:null,activeDetailItem:null}),console.warn("❌ 탭을 찾을 수 없음:",e)},closeAllTabs:()=>n({tabs:[],activeMenuId:null,activeMenuItem:null,activeDetailItem:null}),toggleSidebar:()=>n(e=>({sidebarCollapsed:!e.sidebarCollapsed})),reorderTabs:e=>n(s=>{const o=new Map(s.tabs.map(t=>[t.key,t]));return{tabs:e.map(t=>o.get(t)).filter(Boolean)}}),setProtectFlagForKey:e=>n(s=>({tabProtectFlag:{...s.tabProtectFlag,[e]:!0}})),clearProtectFlagForKey:e=>n(s=>{const o={...s.tabProtectFlag};return delete o[e],{tabProtectFlag:o}}),setTabParams:(e,s)=>n(o=>{const t=o.tabParams[e]||{},a={...s||{}};return Object.keys(t).length===Object.keys(a).length&&Object.keys(a).every(d=>t[d]===a[d])?o:{tabParams:{...o.tabParams,[e]:a}}}),setComponentLabelMap:(e,s)=>n({componentLabelMap:e})})),J=b.create((n,r)=>({popups:[],activePopupId:null,isLoading:!1,error:null,zIndexSeed:1e3,openPopup:async(e,s,o)=>{n({isLoading:!0,error:null});try{let t=null;const a=await y.callService(y.getServiceCode("SRCH_POPU"),{crprCd:y.getUserInfo()?.crprCd,popuCd:e});t=a?.mstr;const c=a?.dtls||[];if(!t||!t.popuUrl){const u=`팝업 정보를 찾을 수 없습니다: ${e}`;throw console.error(u),new Error(u)}const i=(u=>`/src/pages/views/popup/${u}`)(t.popuUrl),l=r().zIndexSeed+1,f={popupId:`popup_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,popupCode:e,popupTitle:o?.title||t.popuNm||"팝업",popupUrl:i,popupParams:s,width:t.popuWdth||800,height:t.popuHght||600,resizable:!0,draggable:!0,buttonList:c,config:o,zIndex:l},m=r().popups.find(u=>u.popupCode===e);if(m){n({activePopupId:m.popupId,popups:r().popups.map(u=>u.popupId===m.popupId?{...u,config:o}:u),isLoading:!1});return}n(u=>({popups:[...u.popups,f],activePopupId:f.popupId,isLoading:!1,zIndexSeed:l}))}catch(t){n({error:t instanceof Error?t.message:"팝업 열기 실패",isLoading:!1})}},openCorePopup:(e,s)=>{const o=`popup_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,t=r().zIndexSeed+1,c=V.localPopupRegistry[e]?.defaultConfig||{},d={...c,...s,buttons:s?.buttons!==void 0?s.buttons:c.buttons,callback:s?.callback!==void 0?s.callback:c.callback},i=s?.defaultParams||{},l=r().popups.find(m=>m.popupCode===e&&m.isLocal);if(l){const m=r().zIndexSeed+1;n({activePopupId:l.popupId,zIndexSeed:m}),n(u=>({popups:u.popups.map(h=>h.popupId===l.popupId?{...h,config:d,zIndex:m,close:()=>{r().closePopup(l.popupId)}}:h)}));return}const f={popupId:o,popupCode:e,popupTitle:d.title||e,popupUrl:"",popupParams:i,width:d.width||1e3,height:d.height||700,resizable:d.resizable!==void 0?d.resizable:!0,draggable:d.draggable!==void 0?d.draggable:!0,buttonList:[],config:d,isLocal:!0,zIndex:t,close:()=>{r().closePopup(o)}};n(m=>({popups:[...m.popups,f],activePopupId:o,zIndexSeed:t}))},closePopup:e=>{const{popups:s,activePopupId:o}=r(),t=s.filter(c=>c.popupId!==e);let a=o;o===e&&(a=t.length>0?t[t.length-1].popupId:null),n({popups:t,activePopupId:a})},closeAllPopups:()=>{n({popups:[],activePopupId:null})},setActivePopup:e=>{const s=r().zIndexSeed+1;n(o=>({activePopupId:e,zIndexSeed:s,popups:o.popups.map(t=>t.popupId===e?{...t,zIndex:s}:t)}))},updatePopupConfig:(e,s)=>{n(o=>({popups:o.popups.map(t=>t.popupId===e?{...t,config:{...t.config,...s}}:t)}))}})),$=b.create()(M((n,r)=>({systemMap:[],fetchSystemMap:async()=>{n({systemMap:[{sysCd:"KE",appItCd:"ERPS",appCd:"SAP",systemNm:"K-ERP",appNm:"SAP"},{sysCd:"KE",appItCd:"KERP",appCd:"FI",systemNm:"K-ERP",appNm:"재무회계"},{sysCd:"KE",appItCd:"KERP",appCd:"FM",systemNm:"K-ERP",appNm:"예산관리"},{sysCd:"KE",appItCd:"KERP",appCd:"MM",systemNm:"K-ERP",appNm:"구매계약"},{sysCd:"KE",appItCd:"KERP",appCd:"SD",systemNm:"K-ERP",appNm:"영업관리"},{sysCd:"CH",appItCd:"KERP",appCd:"PMN",systemNm:"K-ERP",appNm:"파트너관리"},{sysCd:"FB",appItCd:"FBK",appCd:"FBK",systemNm:"펌뱅킹",appNm:"펌뱅킹"},{sysCd:"IA",appItCd:"IAC",appCd:"IAC",systemNm:"내부회계",appNm:"내부회계"},{sysCd:"ET",appItCd:"ETAX",appCd:"ETAX",systemNm:"전자세금계산서",appNm:"전자세금계산서"},{sysCd:"HR",appItCd:"KHR",appCd:"HR",systemNm:"K-HR",appNm:"HR 솔루션"},{sysCd:"YT",appItCd:"KHYT",appCd:"YT",systemNm:"K-HR 연말정산",appNm:"연말정산"},{sysCd:"CM",appItCd:"KCM",appCd:"CM",systemNm:"K-HR 프레임워크 공통",appNm:"프레임워크 공통"},{sysCd:"PA",appItCd:"KHPE",appCd:"PE",systemNm:"K-HR 평정",appNm:"평정"},{sysCd:"OT",appItCd:"POF",appCd:"POF",systemNm:"시간외(PC-OFF)",appNm:"시간외(PC-OFF)"},{sysCd:"DC",appItCd:"CDT",appCd:"CDT",systemNm:"전자계약",appNm:"전자계약"},{sysCd:"KS",appItCd:"EAUD",appCd:"EAUD",systemNm:"K-업무지원",appNm:"e-감사"},{sysCd:"KS",appItCd:"INR",appCd:"INR",systemNm:"K-업무지원",appNm:"청렴신고"},{sysCd:"KS",appItCd:"ITSM",appCd:"ITAM",systemNm:"K-업무지원",appNm:"ITAM"},{sysCd:"KS",appItCd:"CMM",appCd:"CMM",systemNm:"K-업무지원",appNm:"차량/회의실"},{sysCd:"KS",appItCd:"OAM",appCd:"OAM",systemNm:"K-업무지원",appNm:"OA전산물품관리"},{sysCd:"KS",appItCd:"KSGA",appCd:"GAM",systemNm:"K-업무지원",appNm:"총무관리"},{sysCd:"KS",appItCd:"KSGA",appCd:"ACM",systemNm:"K-업무지원",appNm:"출입관리"},{sysCd:"KS",appItCd:"KSGA",appCd:"IVM",systemNm:"K-업무지원",appNm:"비품관리"},{sysCd:"KS",appItCd:"KSGA",appCd:"SGS",systemNm:"K-업무지원",appNm:"인장서비스"},{sysCd:"KS",appItCd:"HIS",appCd:"HIS",systemNm:"K-업무지원",appNm:"사료관리"},{sysCd:"KS",appItCd:"WFAX",appCd:"WFAX",systemNm:"K-업무지원",appNm:"웹펙스서비스"},{sysCd:"KS",appItCd:"SMS",appCd:"SMS",systemNm:"K-업무지원",appNm:"메시지서비스"},{sysCd:"KS",appItCd:"BID",appCd:"BID",systemNm:"K-업무지원",appNm:"경영공시"},{sysCd:"KS",appItCd:"PAM",appCd:"PAM",systemNm:"K-업무지원",appNm:"언론미디어"},{sysCd:"KS",appItCd:"DAC",appCd:"DAC",systemNm:"K-업무지원",appNm:"심의자문위원회"},{sysCd:"KS",appItCd:"IPR",appCd:"IPR",systemNm:"K-업무지원",appNm:"지식재산권신청"},{sysCd:"KS",appItCd:"ISB",appCd:"ISB",systemNm:"K-업무지원",appNm:"정보공유게시판"},{sysCd:"DE",appItCd:"BCOM",appCd:"BCOM",systemNm:"온통",appNm:"온통"},{sysCd:"TS",appItCd:"ITSM",appCd:"ITSM",systemNm:"ITSM",appNm:"ITSM"},{sysCd:"EP",appItCd:"EPOP",appCd:"EPOP",systemNm:"국민신문고",appNm:"국민신문고"},{sysCd:"VC",appItCd:"VOC",appCd:"VOC",systemNm:"VOC",appNm:"VOC"},{sysCd:"CC",appItCd:"CAL",appCd:"CAL",systemNm:"콜센터",appNm:"콜센터"},{sysCd:"LA",appItCd:"LEG",appCd:"LEG",systemNm:"법규포털",appNm:"법규포털"},{sysCd:"IM",appItCd:"IDXM",appCd:"IDXM",systemNm:"지수방법론",appNm:"지수방법론"},{sysCd:"PM",appItCd:"ORM",appCd:"ORM",systemNm:"운영리스크관리",appNm:"운영리스크관리"},{sysCd:"RF",appItCd:"RFID",appCd:"RFID",systemNm:"RFID(비품관리)",appNm:"RFID(비품관리)"},{sysCd:"SL",appItCd:"SGM",appCd:"SGM",systemNm:"인장관리",appNm:"인장관리"},{sysCd:"DM",appItCd:"LBS",appCd:"LBS",systemNm:"도서관리",appNm:"도서관리"},{sysCd:"HE",appItCd:"RMS",appCd:"RMS",systemNm:"원격지원",appNm:"원격지원"},{sysCd:"WF",appItCd:"WFX",appCd:"WFX",systemNm:"WebFax",appNm:"WebFax"},{sysCd:"SM",appItCd:"SMT",appCd:"SMT",systemNm:"SMS",appNm:"SMS"},{sysCd:"SO",appItCd:"SSO",appCd:"SSO",systemNm:"SSO",appNm:"SSO"},{sysCd:"SF",appItCd:"SFO",appCd:"SFO",systemNm:"생체인증(One Pass)",appNm:"생체인증 FIDO"},{sysCd:"SP",appItCd:"SPO",appCd:"SPO",systemNm:"생체인증(장정맥)",appNm:"생체인증 장정맥"},{sysCd:"AG",appItCd:"APG",appCd:"APG",systemNm:"API GW",appNm:"API Gateway"},{sysCd:"AM",appItCd:"APM",appCd:"APM",systemNm:"APM",appNm:"APM"},{sysCd:"JS",appItCd:"BXS",appCd:"BXS",systemNm:"배치스케줄러",appNm:"배치스케줄러"},{sysCd:"DT",appItCd:"PDT",appCd:"PDT",systemNm:"개인정보변환",appNm:"개인정보변환"}]})},setSystemMap:e=>{n({systemMap:e})},clearSystemMap:()=>{n({systemMap:[]})},getBySysCd:e=>r().systemMap.filter(s=>s.sysCd===e),getByAppItCd:e=>r().systemMap.filter(s=>s.appItCd===e),findByAppCd:e=>r().systemMap.find(s=>s.appCd===e),filterSystemMap:e=>{const{sysCd:s,appItCd:o,appCd:t}=e;return r().systemMap.filter(a=>(s?a.sysCd===s:!0)&&(o?a.appItCd===o:!0)&&(t?a.appCd===t:!0))}}),{name:"system-info-store"})),Ce=b.create(n=>({requestCount:0,loading:!1,showLoading:()=>n(r=>{const e=r.requestCount+1;return{requestCount:e,loading:e>0}}),hideLoading:()=>n(r=>{const e=Math.max(0,r.requestCount-1);return{requestCount:e,loading:e>0}})})),he=b.create(n=>({requestCount:0,loading:!1,showLoading:()=>n(r=>{const e=r.requestCount+1;return{requestCount:e,loading:e>0}}),hideLoading:()=>n(r=>{const e=Math.max(0,r.requestCount-1);return{requestCount:e,loading:e>0}})}));function W(){const[n,r]=F.useState(!1),e=F.useCallback(s=>{const o=s?.getModifierState?.("CapsLock");typeof o=="boolean"&&r(o)},[]);return{capsOn:n,onKeyDown:e}}function fe(n){const{loginApi:r,fetchCommonCodes:e,onAfterLogin:s,onError:o,rememberCookie:t={enabled:!0,days:30}}=n,[a,c]=F.useState(!1),{capsOn:d,onKeyDown:i}=W(),l="SCMSIGN00101",f=`${__SYS_CD__}_login_id`,m={id:t?.enabled?y.getCookie(f):void 0,pswr:void 0},u=F.useCallback(async(h,C)=>{c(!0);try{const S={crprCd:"100",id:h.id,pswr:await y.encryptSha256(h.pswr)},g=await(r??(N=>y.callService(l,N)))(S);if(g?.userInfo?.userId){if(w.getState().setLoginUser(g.userInfo,g?.hrInfo),t?.enabled){const N=t.days??30;h.remember?y.setCookie(f,h.id??"",N):y.setCookie(f,"",0)}return e?await e():await _.getState().fetchCommonCodes(),s?s(g,C):(L.message.success(`${g.userInfo.userNm}님 환영합니다.`),C("/main")),{user:g.userInfo,response:g}}else throw o?.({user:g.userInfo,response:g,navigate:C}),new Error("사용자 정보가 유효하지 않습니다.")}catch(S){throw o?.(S),S}finally{c(!1)}},[l,r,e,s,o,t?.enabled,t?.days]);return{loading:a,capsOn:d,onKeyDown:i,prefills:m,doLogin:u}}function Ie(){const n=Q.useNavigate();return()=>{w.getState().clearLoginUser(),$.getState().clearSystemMap(),_.getState().clearCodes(),A.getState().clearMenu(),U.getState().clearMenuViewStore(),G.getState().clearFavorites(),n("/login")}}const ye=()=>_.getState(),ge=()=>J.getState(),Se=()=>w.getState(),Ne=()=>G.getState(),be=()=>A.getState(),Me=()=>U.getState(),ke=()=>$.getState();exports.useCapsLock=W;exports.useCode=ye;exports.useCodeStore=_;exports.useColorStore=se;exports.useFavorite=Ne;exports.useFavoriteStore=G;exports.useLoadingStore=Ce;exports.useLogin=fe;exports.useLogout=Ie;exports.useMenuModel=be;exports.useMenuModelStore=A;exports.useMenuView=Me;exports.useMenuViewStore=U;exports.useOptionStore=oe;exports.usePopupLoadingStore=he;exports.usePopupState=ge;exports.usePopupStore=J;exports.useSystemCode=ke;exports.useSystemStore=$;exports.useUser=Se;exports.useUserStore=w;
@@ -1,7 +1,7 @@
1
1
  import { create as b } from "zustand";
2
2
  import { callService as N, getServiceCode as w, getUserId as v, getUserInfo as ee, getCookie as te, encryptSha256 as oe, setCookie as $ } from "../utils/index.js";
3
3
  import { message as L } from "antd";
4
- import { l as se } from "../chunks/layout-components-BO9fKUG7.js";
4
+ import { l as se } from "../chunks/layout-components-JbKkWhw7.js";
5
5
  import { useState as X, useCallback as q } from "react";
6
6
  import { useNavigate as ne } from "react-router-dom";
7
7
  function re(n, r) {
@@ -1,5 +1,6 @@
1
1
  //시스템 코드 타입 선언
2
2
  declare const __SYS_CD__: string;
3
3
  declare const __APP_CD__: string;
4
+ declare const __SITE_CD__: string | undefined;
4
5
  // Quill 이미지 리사이즈 모듈 선언 (BwgEditor에서 사용)
5
6
  declare module "quill-image-resize-module-react";
@@ -58,8 +58,43 @@ export declare class ApiError extends Error {
58
58
  export declare const setClientIp: (ip?: string) => Promise<void>;
59
59
  export declare const getClientIp: () => string | null;
60
60
  export declare const verifyClientIp: () => Promise<string>;
61
- export declare const apiGet: <T = any>(trxCd: string, params?: any, options?: ApiOptions) => Promise<T>;
62
- export declare const callService: <T = any>(trxCd: string, data?: any, options?: ApiOptions, appCd?: string) => Promise<T>;
61
+ /**
62
+ * useService(trxInfo, data, options) 사용 권장
63
+ * @param {string} trxCd 거래코드
64
+ * @param {any} [data] 요청전문
65
+ * @param {ApiOptions} [options] 거래옵션
66
+ * @param {string} [appCd]
67
+ * @returns {Promise<T>}
68
+ */
69
+ export declare const callService: <T = any>(trxCd: BxmTrxInfo["trxCd"], data?: any, options?: ApiOptions) => Promise<T>;
70
+ /**
71
+ * BXM 거래정보
72
+ */
73
+ export type BxmTrxInfo = {
74
+ /** 거래코드 */
75
+ trxCd: string;
76
+ };
77
+ /**
78
+ * BXM 도메인 설정에 따라 trxInfo 는 BxmTrxInfo 혹은 ExtTrxInfo
79
+ * @param {BxmTrxInfo} [trxInfo] 거래정보
80
+ * @param {string} [appItCd] 앱통합코드 (자동매핑)
81
+ * @param {string} [appCd] 앱코드
82
+ * @returns {ExtTrxInfo}
83
+ */
84
+ export type ExtTrxInfo = BxmTrxInfo & {
85
+ /** 앱통합코드 (자동매핑) */
86
+ appItCd?: string;
87
+ /** 앱코드 */
88
+ appCd: string;
89
+ };
90
+ /**
91
+ * 거래서비스 호출 함수
92
+ * @param {ExtTrxInfo} [trxInfo] 거래정보
93
+ * @param {any} [data] 요청전문
94
+ * @param {ApiOptions} [options] 거래옵션
95
+ * @returns {Promise<T>}
96
+ */
97
+ export declare const useService: <T = any>(trxInfo: ExtTrxInfo, data?: any, options?: ApiOptions) => Promise<T>;
63
98
  export declare const callServiceBySysCd: <T = any>(trxCd: string, data?: any, options?: ApiOptions, appCd?: string) => Promise<T>;
64
99
  /**
65
100
  * 권한 확인 서비스
@@ -1 +1 @@
1
- {"version":3,"file":"apiUtils.d.ts","sourceRoot":"","sources":["../../src/utils/apiUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,OAAO,CAAC;AAW/D,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CA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