@bwg-ui/core 1.3.6 → 1.3.8

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 (194) hide show
  1. package/dist/chunks/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
  2. package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
  3. package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
  4. package/dist/chunks/{CMSearchIntfGwP01-BBdPmalj.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
  5. package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
  6. package/dist/chunks/{MenuReport-CYK_Eaqa.js → MenuReport-DgMjx5Hs.js} +5 -5
  7. package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
  8. package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
  9. package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
  10. package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
  11. package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
  12. package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
  13. package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
  14. package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
  15. package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
  16. package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
  17. package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
  18. package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
  19. package/dist/chunks/UploadMultiFileP01-Bf1qonGN.cjs +1 -0
  20. package/dist/chunks/UploadMultiFileP01-BgyIhfac.js +38 -0
  21. package/dist/chunks/{layout-components-gqu1pmfr.js → layout-components-Lyp9SZ7V.js} +1134 -1008
  22. package/dist/chunks/layout-components-NtKR0O6Y.cjs +38 -0
  23. package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
  24. package/dist/chunks/provider-ff4RVDYo.js +711 -0
  25. package/dist/components/common/ButtonAccessController.d.ts +2 -3
  26. package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
  27. package/dist/components/common/BwgButtonGroup.d.ts +1 -1
  28. package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
  29. package/dist/components/common/BwgCol.d.ts +1 -1
  30. package/dist/components/common/BwgCol.d.ts.map +1 -1
  31. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  32. package/dist/components/common/BwgModal.d.ts +10 -0
  33. package/dist/components/common/BwgModal.d.ts.map +1 -0
  34. package/dist/components/common/BwgView.d.ts.map +1 -1
  35. package/dist/components/common/index.cjs +1 -1
  36. package/dist/components/common/index.d.ts +1 -0
  37. package/dist/components/common/index.d.ts.map +1 -1
  38. package/dist/components/common/index.js +4887 -28
  39. package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
  40. package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
  41. package/dist/components/core/BwgDeptSearch.d.ts +38 -0
  42. package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
  43. package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
  44. package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
  45. package/dist/components/core/BwgEmpSearch.d.ts +12 -4
  46. package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
  47. package/dist/components/core/BwgUploader.d.ts +6 -92
  48. package/dist/components/core/BwgUploader.d.ts.map +1 -1
  49. package/dist/components/core/BwgUploader_bak.d.ts +98 -0
  50. package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
  51. package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
  52. package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
  53. package/dist/components/core/index.cjs +1 -1
  54. package/dist/components/core/index.d.ts +11 -2
  55. package/dist/components/core/index.d.ts.map +1 -1
  56. package/dist/components/core/index.js +1318 -1164
  57. package/dist/components/guide/index.cjs +1 -1
  58. package/dist/components/guide/index.js +17 -17
  59. package/dist/components/layout/AppWrapper.d.ts +5 -1
  60. package/dist/components/layout/AppWrapper.d.ts.map +1 -1
  61. package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
  62. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  63. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  64. package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
  65. package/dist/components/layout/index.cjs +1 -1
  66. package/dist/components/layout/index.js +1 -1
  67. package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
  68. package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
  69. package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
  70. package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
  71. package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
  72. package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
  73. package/dist/components/pages/auth/RoleView.d.ts +17 -0
  74. package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
  75. package/dist/components/pages/board/AdminBoard.d.ts +6 -0
  76. package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
  77. package/dist/components/pages/board/BoardComment.d.ts +8 -0
  78. package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
  79. package/dist/components/pages/board/MyBoard.d.ts +6 -0
  80. package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
  81. package/dist/components/pages/index.d.ts +9 -10
  82. package/dist/components/pages/index.d.ts.map +1 -1
  83. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
  84. package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
  85. package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
  86. package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
  87. package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
  88. package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
  89. package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
  90. package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
  91. package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
  92. package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
  93. package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
  94. package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
  95. package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
  96. package/dist/components/pages/types.d.ts +5 -1
  97. package/dist/components/pages/types.d.ts.map +1 -1
  98. package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
  99. package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
  100. package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
  101. package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
  102. package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
  103. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
  104. package/dist/components/popup/index.cjs +1 -1
  105. package/dist/components/popup/index.d.ts +1 -0
  106. package/dist/components/popup/index.d.ts.map +1 -1
  107. package/dist/components/popup/index.js +16 -8
  108. package/dist/index.cjs +185 -1
  109. package/dist/index.js +31237 -288
  110. package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
  111. package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
  112. package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
  113. package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
  114. package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
  115. package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
  116. package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
  117. package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
  118. package/dist/provider/contexts/PageContentContext.d.ts +23 -0
  119. package/dist/provider/contexts/PageContentContext.d.ts.map +1 -0
  120. package/dist/provider/contexts/index.d.ts +1 -0
  121. package/dist/provider/contexts/index.d.ts.map +1 -1
  122. package/dist/provider/hooks/index.d.ts +1 -0
  123. package/dist/provider/hooks/index.d.ts.map +1 -1
  124. package/dist/provider/hooks/useFileUploader.d.ts +74 -0
  125. package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
  126. package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
  127. package/dist/provider/index.cjs +1 -1
  128. package/dist/provider/index.d.ts +1 -0
  129. package/dist/provider/index.d.ts.map +1 -1
  130. package/dist/provider/index.js +22 -19
  131. package/dist/stores/codeStore.d.ts +65 -128
  132. package/dist/stores/codeStore.d.ts.map +1 -1
  133. package/dist/stores/index.cjs +2 -2
  134. package/dist/stores/index.d.ts +3 -3
  135. package/dist/stores/index.d.ts.map +1 -1
  136. package/dist/stores/index.js +815 -1625
  137. package/dist/stores/menuModelStore.d.ts +22 -7
  138. package/dist/stores/menuModelStore.d.ts.map +1 -1
  139. package/dist/stores/menuViewStore.d.ts +3 -3
  140. package/dist/stores/menuViewStore.d.ts.map +1 -1
  141. package/dist/stores/systemStore.d.ts +50 -17
  142. package/dist/stores/systemStore.d.ts.map +1 -1
  143. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  144. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  145. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  146. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  147. package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
  148. package/dist/styles/assets/images/menus/ico1-design.png +0 -0
  149. package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
  150. package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
  151. package/dist/styles/assets/images/menus/ico2-design.png +0 -0
  152. package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
  153. package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
  154. package/dist/styles/assets/images/menus/ico3-design.png +0 -0
  155. package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
  156. package/dist/utils/apiUtils.d.ts.map +1 -1
  157. package/dist/utils/commonUtils.d.ts +1 -2
  158. package/dist/utils/commonUtils.d.ts.map +1 -1
  159. package/dist/utils/index.cjs +1 -1
  160. package/dist/utils/index.d.ts +25 -25
  161. package/dist/utils/index.d.ts.map +1 -1
  162. package/dist/utils/index.js +980 -1967
  163. package/dist/utils/messageUtils.d.ts +36 -48
  164. package/dist/utils/messageUtils.d.ts.map +1 -1
  165. package/dist/utils/modalUtils.d.ts +68 -0
  166. package/dist/utils/modalUtils.d.ts.map +1 -0
  167. package/dist/utils/notificationUtils.d.ts +50 -41
  168. package/dist/utils/notificationUtils.d.ts.map +1 -1
  169. package/dist/utils/serviceConfig.d.ts +9 -3
  170. package/dist/utils/serviceConfig.d.ts.map +1 -1
  171. package/package.json +5 -5
  172. package/dist/chunks/CMSearchIntfGwP01-Cs78BtE7.cjs +0 -1
  173. package/dist/chunks/MenuReport-BCO-gXwk.cjs +0 -1
  174. package/dist/chunks/common-components-C61ER0qC.js +0 -52599
  175. package/dist/chunks/common-components-mXgJEMpT.cjs +0 -1109
  176. package/dist/chunks/layout-components-D7I6VhXN.cjs +0 -38
  177. package/dist/chunks/provider-Kxea5IoZ.js +0 -449
  178. package/dist/chunks/provider-r4mkv5Zs.cjs +0 -1
  179. package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
  180. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
  181. package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
  182. package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
  183. package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
  184. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
  185. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
  186. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
  187. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
  188. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
  189. package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
  190. package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
  191. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
  192. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
  193. package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
  194. package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
@@ -0,0 +1,38 @@
1
+ "use strict";const e=require("react/jsx-runtime"),F=require("./provider-DrmM0H4o.cjs"),l=require("react"),D=require("react-router-dom"),te=require("../components/common/index.cjs"),W=require("../utils/index.cjs"),i=require("antd"),A=require("../stores/index.cjs"),L=require("@ant-design/icons"),q=require("@dnd-kit/core"),xe=require("@dnd-kit/modifiers"),J=require("@dnd-kit/sortable");var X=typeof document<"u"?document.currentScript:null;function fe(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const Z=fe(L),be=l.lazy(()=>Promise.resolve().then(()=>require("./MenuReport-BtP1uAmq.cjs"))),je=l.lazy(()=>Promise.resolve().then(()=>require("./SearchDepartmentP01-D5ihO3l8.cjs"))),Ce=l.lazy(()=>Promise.resolve().then(()=>require("./SearchDepartmentP02-CWs8sLuu.cjs"))),ye=l.lazy(()=>Promise.resolve().then(()=>require("./SearchOrganizationP01-3nDwrB08.cjs"))),we=l.lazy(()=>Promise.resolve().then(()=>require("./SearchOrganizationP02-0Suj4DLH.cjs"))),ve=l.lazy(()=>Promise.resolve().then(()=>require("./CMPrgrMstrP02-CIPnCdt3.cjs"))),ke=l.lazy(()=>Promise.resolve().then(()=>require("./CMSearchIntfGwP01-D4qj6J2N.cjs"))),Se=l.lazy(()=>Promise.resolve().then(()=>require("./SearchAddressP01-B25Exa9E.cjs"))),Ae=l.lazy(()=>Promise.resolve().then(()=>require("./SearchHolidayP01-cJ8Wlkwr.cjs"))),Ie=l.lazy(()=>Promise.resolve().then(()=>require("./UploadMultiFileP01-Bf1qonGN.cjs"))),ie={CORE_REPORT:{component:be,defaultConfig:{title:"게시판/문의",width:1200,height:800}},CORE_DEPARTMENT_01:{component:je,defaultConfig:{title:"부서 검색",width:620,height:700}},CORE_DEPARTMENT_02:{component:Ce,defaultConfig:{title:"부서 검색",width:620,height:700}},CORE_ORGANIZATION_01:{component:ye,defaultConfig:{title:"조직 검색",width:620,height:700}},CORE_ORGANIZATION_02:{component:we,defaultConfig:{title:"조직 검색",width:1e3,height:700}},CORE_PRGR_02:{component:ve,defaultConfig:{title:"프로그램 검색",width:700,height:800}},CORE_GW_DRAFTS:{component:ke,defaultConfig:{title:"기안 목록",width:1e3,height:700}},CORE_ADDRESS_01:{component:Se,defaultConfig:{title:"주소 검색",width:750,height:800}},CORE_HOLIDAY_01:{component:Ae,defaultConfig:{title:"휴일 검색",width:750,height:800}},CORE_FILEUPLOAD_01:{component:Ie,defaultConfig:{title:"파일 업로드",width:700,height:500}}},se="bwg-dot-line-wave-v4";function Ne(){if(typeof document>"u"||document.getElementById(se))return;const r=document.createElement("style");r.id=se,r.textContent=`
2
+ .bwg-dotline {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ gap: var(--bwg-gap, 12px);
6
+ height: calc(var(--bwg-size, 12px) + 2 * var(--bwg-amp, 12px));
7
+ line-height: 0;
8
+ }
9
+ .bwg-dotline .dot {
10
+ width: var(--bwg-size, 12px);
11
+ height: var(--bwg-size, 12px);
12
+ border-radius: 50%;
13
+ background: currentColor;
14
+ will-change: transform, opacity;
15
+ filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
16
+ animation: bwg-dotline-sine var(--bwg-speed, 780ms) linear infinite;
17
+ }
18
+
19
+ /* sin(θ) 근사: 0, 45, 90, 135, 180, 225, 270, 315, 360deg */
20
+ @keyframes bwg-dotline-sine {
21
+ 0% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
22
+ 12.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
23
+ 25% { transform: translate3d(0, calc(-1 * var(--bwg-amp, 12px)), 0) scale(1.06); opacity: 1; }
24
+ 37.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
25
+ 50% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
26
+ 62.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
27
+ 75% { transform: translate3d(0, calc( 1 * var(--bwg-amp, 12px)), 0) scale(.96); opacity: .76; }
28
+ 87.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
29
+ 100% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
30
+ }
31
+
32
+ @media (prefers-reduced-motion: reduce) {
33
+ .bwg-dotline .dot { animation: none; }
34
+ }
35
+ `,document.head.appendChild(r)}const Pe=({colors:r=["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],count:t,size:n=12,gap:o=10,amp:a=16,speedMs:c=900,direction:x="ltr",phase:d=.7})=>{l.useEffect(()=>{Ne()},[]);const m=t??r.length,b=Array.from({length:m}),f={"--bwg-size":`${n}px`,"--bwg-gap":`${o}px`,"--bwg-amp":`${a}px`,"--bwg-speed":`${c}ms`},I=c/m*d;return e.jsx("span",{className:"bwg-dotline",role:"img","aria-label":"loading",style:f,children:b.map((p,h)=>e.jsx("span",{className:"dot",style:{backgroundColor:r[h%r.length],animationDelay:x==="ltr"?`${h*I}ms`:`${(m-1-h)*I}ms`}},h))})},Me=({spin:r=null,text:t="인증중...",dimStyle:n="dark"})=>{if(!(r??!0))return null;const c=n==="dark";return e.jsxs("div",{className:"loading-overlay",style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:8,padding:"8px 12px",background:c?"rgba(0, 0, 0, 0.6)":"rgba(255, 255, 255, 0.85)",color:c?"#fff":"#333",backdropFilter:"blur(4px)",zIndex:1e4},"aria-live":"polite","aria-busy":"true",role:"status",children:[e.jsx(i.Spin,{indicator:e.jsx(Pe,{colors:["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],size:12,gap:10,amp:16,speedMs:900,phase:.75,direction:"ltr"})}),e.jsx("span",{className:"bwg-spin-txt",style:{marginTop:"15px"},children:t})]})},Le=({routes:r,useCommonProvider:t=!0,useServiceProvider:n=!0,modalStyle:o,notificationStyle:a,messageStyle:c})=>{l.useEffect(()=>{o&&W.setGlobalModalStyle(o)},[o]),l.useEffect(()=>{a&&W.setGlobalNotificationStyle(a)},[a]),l.useEffect(()=>{c&&W.setGlobalMessageStyle(c)},[c]);let d=e.jsxs(D.Routes,{children:[e.jsx(D.Route,{path:"/",element:e.jsx(D.Navigate,{to:"/login"})}),e.jsx(D.Route,{path:"/ssoLogin",element:r.ssoLogin}),e.jsx(D.Route,{path:"/login",element:r.login}),e.jsx(D.Route,{path:"/main/*",element:r.main}),e.jsx(D.Route,{path:"/sessionNotice",element:r.sessionNotice})]});return n&&(d=e.jsx(F.ServiceCodeProvider,{children:d})),t&&(d=e.jsx(F.CommonCodeProvider,{children:d})),e.jsx(te.GlobalConfigProvider,{children:d})},{Content:Be}=i.Layout,ne=({config:r={},children:t})=>{const n={wrapper:{className:"content-wrapper",...r.wrapper},body:{className:"content-body",...r.body},...r};return e.jsx(Be,{className:n.wrapper.className,style:n.wrapper.style,children:e.jsx(te.BwgConfigProvider,{children:e.jsx("div",{className:n.body.className,style:n.body.style,children:t})})})},Te="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.9998%2019.9993V20.9993C11.9998%2021.3932%2012.0774%2021.7833%2012.2282%2022.1473C12.3789%2022.5112%2012.5999%2022.8419%2012.8785%2023.1205C13.157%2023.399%2013.4877%2023.62%2013.8517%2023.7708C14.2156%2023.9215%2014.6057%2023.9991%2014.9997%2023.9991C15.3936%2023.9991%2015.7837%2023.9215%2016.1477%2023.7708C16.5116%2023.62%2016.8423%2023.399%2017.1209%2023.1205C17.3994%2022.8419%2017.6204%2022.5112%2017.7712%2022.1473C17.9219%2021.7833%2017.9995%2021.3932%2017.9995%2020.9993V19.9993M20.9994%2011.9997C20.9994%2014.9996%2022.9993%2019.9993%2022.9993%2019.9993H7.00006C7.00006%2019.9993%208.99996%2015.9995%208.99996%2011.9997C8.99996%208.73187%2011.7318%206%2014.9997%206C18.2675%206%2020.9994%208.73187%2020.9994%2011.9997Z'%20stroke='%23485299'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ee="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_93_4488)'%3e%3cpath%20d='M18%207H21C22.1046%207%2023%207.89543%2023%209V21C23%2022.1046%2022.1046%2023%2021%2023H18M11%2011L7%2015M7%2015L11%2019M7%2015L19%2015'%20stroke='%23485299'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_93_4488'%3e%3crect%20width='30'%20height='30'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Re="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%206H16C16.5523%206%2017%206.44772%2017%207V7.56879C17%207.99659%2017.2871%208.36825%2017.6822%208.53228C18.0775%208.69638%2018.5377%208.63384%2018.8403%208.33123L19.2426%207.92891C19.6331%207.53838%2020.2663%207.53838%2020.6568%207.92891L22.071%209.34312C22.4616%209.73365%2022.4615%2010.3668%2022.071%2010.7573L21.6688%2011.1596C21.3661%2011.4622%2021.3036%2011.9225%2021.4677%2012.3177C21.6317%2012.7129%2022.0034%2013%2022.4313%2013L23%2013C23.5523%2013%2024%2013.4477%2024%2014V16C24%2016.5523%2023.5523%2017%2023%2017H22.4312C22.0034%2017%2021.6318%2017.2871%2021.4677%2017.6822C21.3036%2018.0775%2021.3661%2018.5377%2021.6688%2018.8403L22.071%2019.2426C22.4616%2019.6331%2022.4616%2020.2663%2022.071%2020.6568L20.6568%2022.071C20.2663%2022.4616%2019.6331%2022.4616%2019.2426%2022.071L18.8403%2021.6688C18.5377%2021.3661%2018.0775%2021.3036%2017.6822%2021.4677C17.2871%2021.6318%2017%2022.0034%2017%2022.4312V23C17%2023.5523%2016.5523%2024%2016%2024H14C13.4477%2024%2013%2023.5523%2013%2023V22.4313C13%2022.0034%2012.7129%2021.6317%2012.3177%2021.4677C11.9225%2021.3036%2011.4622%2021.3661%2011.1596%2021.6688L10.7573%2022.071C10.3668%2022.4616%209.73363%2022.4616%209.34311%2022.071L7.92889%2020.6568C7.53837%2020.2663%207.53837%2019.6331%207.92889%2019.2426L8.33123%2018.8403C8.63384%2018.5377%208.69638%2018.0775%208.53228%2017.6822C8.36825%2017.2871%207.99659%2017%207.56879%2017H7C6.44772%2017%206%2016.5523%206%2016V14C6%2013.4477%206.44772%2013%207%2013L7.56877%2013C7.99658%2013%208.36825%2012.7129%208.53229%2012.3178C8.6964%2011.9225%208.63386%2011.4623%208.33123%2011.1597L7.92891%2010.7573C7.53838%2010.3668%207.53838%209.73365%207.92891%209.34313L9.34312%207.92891C9.73365%207.53839%2010.3668%207.53839%2010.7573%207.92891L11.1597%208.33123C11.4623%208.63386%2011.9225%208.6964%2012.3178%208.53229C12.7129%208.36825%2013%207.99658%2013%207.56876V7C13%206.44772%2013.4477%206%2014%206Z'%20stroke='%23485299'%20stroke-width='1.5'/%3e%3cpath%20d='M17%2015C17%2016.1046%2016.1046%2017%2015%2017C13.8954%2017%2013%2016.1046%2013%2015C13%2013.8954%2013.8954%2013%2015%2013C16.1046%2013%2017%2013.8954%2017%2015Z'%20stroke='%23485299'%20stroke-width='1.5'/%3e%3c/svg%3e",{Header:De}=i.Layout,{confirm:Oe}=i.Modal,K={light:{headerBg:"#ffffff",headerText:"#000000",sidebarBg:"#ffffff",sidebarText:"#000000",buttonPrimary:"#1890ff",buttonPrimaryHover:"#40a9ff",buttonPrimaryActive:"#096dd9",buttonDefault:"#ffffff",buttonDefaultHover:"#f5f5f5",buttonDefaultBorder:"#d9d9d9",buttonPermissionBorder:"#bdb1ff"},dark:{headerBg:"#4a4a4a",headerText:"#ffffff",sidebarBg:"#4a4a4a",sidebarText:"#ffffff",buttonPrimary:"#177ddc",buttonPrimaryHover:"#1890ff",buttonPrimaryActive:"#0958b5",buttonDefault:"#434343",buttonDefaultHover:"#303030",buttonDefaultBorder:"#434343",buttonPermissionBorder:"#bdb1ff"},blue:{headerBg:"#4a90e2",headerText:"#ffffff",sidebarBg:"#4a90e2",sidebarText:"#ffffff",buttonPrimary:"#1890ff",buttonPrimaryHover:"#40a9ff",buttonPrimaryActive:"#096dd9",buttonDefault:"#ffffff",buttonDefaultHover:"#f0f8ff",buttonDefaultBorder:"#4a90e2",buttonPermissionBorder:"#bdb1ff"},modern:{headerBg:"#f3f4ff",headerText:"#333333",sidebarBg:"#ffffff",sidebarText:"#555555",buttonPrimary:"#6449FC",buttonPrimaryHover:"#6449FC",buttonPrimaryActive:"#6449FC",buttonDefault:"#ffffff",buttonDefaultHover:"#f5f5f5",buttonDefaultBorder:"#dddddd",buttonPermissionBorder:"#bdb1ff"}},$={0:"작게",1:"보통",2:"크게"},re=({config:r={},children:t})=>{const n={gap:14,minWidth:200,items:r.right?.items,alarm:{visible:!0,...r.right?.alarm||{}},theme:{visible:!0,...r.right?.theme||{}},logout:{visible:!0,...r.right?.logout||{}},avatar:{visible:!0,width:30,height:30,...r.right?.avatar||{}}},o={wrapper:{className:"header-wrapper",...r.wrapper},logo:{gap:10,...r.logo},right:n},a=D.useNavigate(),c=l.useRef(null),x=A.useLogout(()=>a("/login",{replace:!0})),{componentSize:d,setComponentSize:m,gridSize:b,setGridSize:f,spacingSize:I,setSpacingSize:p,enableProtectWrapper:h,setEnableProtectWrapper:P,theme:C,setTheme:u,clearAllGridLayouts:g}=A.useUserStore(),N=1,T=2,E=2,v=(y,M)=>{try{if(!/^[a-zA-Z0-9-]+$/.test(y)||!/^[#a-zA-Z0-9()\s,.-]+$/.test(M))return;document.documentElement.style.setProperty(y,M)}catch(H){console.error("CSS variable setting failed:",H)}},O=y=>{if(!K[y])return;u(y);const M={...K[y]};v("--header-bg",M.headerBg),v("--header-text",M.headerText),v("--sidebar-bg",M.sidebarBg),v("--sidebar-text",M.sidebarText),v("--button-primary",M.buttonPrimary),v("--button-primary-hover",M.buttonPrimaryHover),v("--button-primary-active",M.buttonPrimaryActive),v("--button-default",M.buttonDefault),v("--button-default-hover",M.buttonDefaultHover),v("--button-default-border",M.buttonDefaultBorder),v("--button-permission-border",M.buttonPermissionBorder),c.current&&c.current.setAttribute("data-theme",y),document.documentElement.setAttribute("data-theme",y)};l.useEffect(()=>{if(C&&K[C]){const y={...K[C]};v("--header-bg",y.headerBg),v("--header-text",y.headerText),v("--sidebar-bg",y.sidebarBg),v("--sidebar-text",y.sidebarText),v("--button-primary",y.buttonPrimary),v("--button-primary-hover",y.buttonPrimaryHover),v("--button-primary-active",y.buttonPrimaryActive),v("--button-default",y.buttonDefault),v("--button-default-hover",y.buttonDefaultHover),v("--button-default-border",y.buttonDefaultBorder),v("--button-permission-border",y.buttonPermissionBorder),c.current&&c.current.setAttribute("data-theme",C),document.documentElement.setAttribute("data-theme",C)}else O("modern")},[C]);const G=()=>{x()},z=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("g",{clipPath:"url(#clip0_1424_1089)",children:e.jsx("path",{d:"M15.1801 12.13C14.7801 13.25 14.0401 14.22 13.0401 14.87C12.0501 15.53 10.8701 15.85 9.68009 15.78C8.49009 15.71 7.36009 15.26 6.45009 14.49C5.54009 13.72 4.91009 12.68 4.64009 11.52C4.38009 10.36 4.50009 9.14996 4.98009 8.05996C5.47009 6.96996 6.29009 6.07996 7.33009 5.49996C8.37009 4.91996 9.57009 4.69996 10.7501 4.86996C12.7401 5.14996 14.0501 6.58996 15.4701 7.85996M15.4901 4.20996V7.86996H11.8301",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1424_1089",children:e.jsx("rect",{width:"20",height:"20",fill:"white"})})})]});W.getTodateString?W.getTodateString("HH:mm:ss"):new Date().toLocaleTimeString("ko-KR");const _=e.jsxs("div",{className:"theme-setting-popover",style:{minWidth:"320px"},children:[e.jsxs("div",{style:{padding:"10px",backgroundColor:"#f5f6fb",borderRadius:"6px",marginBottom:"20px"},children:[e.jsx("div",{className:"sub-title",style:{marginBottom:10},children:"테마 선택"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"right",gap:"10px"},children:[e.jsx(i.Button,{className:`theme-swatch-btn theme-swatch-modern ${C==="modern"?"active":""}`,type:"text",size:"small",onClick:()=>O("modern")},"modern"),Object.entries(K).filter(([y])=>y!=="modern").map(([y,M])=>e.jsx(i.Button,{className:`theme-swatch-btn theme-swatch-${y} ${C===y?"active":""}`,type:"text",size:"small",onClick:()=>O(y)},y))]})]}),e.jsxs(i.ConfigProvider,{theme:{components:{Slider:{dotActiveBorderColor:"var(--primary-color)",dotBorderColor:"#d9d9d9",dotSize:8,handleActiveColor:"var(--primary-color)",handleActiveOutlineColor:"rgba(var(--primary-color-rgb),0.2)",handleLineWidth:0,handleSize:12,railBg:"#e0e2e5",trackBg:"var(--primary-color)",trackHoverBg:"var(--button-solid-hover)"},Switch:{colorPrimary:"var(--switch-primary)",colorPrimaryHover:"var(--switch-primary)"}}},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,padding:"0 10px"},children:[e.jsxs("div",{children:[e.jsxs(i.Flex,{justify:"space-between",align:"center",children:[e.jsx("span",{className:"sub-title",children:"컴포넌트 크기"}),e.jsx(i.Button,{className:"bwg-btn",type:"text",size:"small",icon:e.jsx(z,{}),onClick:()=>m(N),disabled:d===N,style:{padding:"0",gap:"3px",height:"20px",lineHeight:"20px"},children:"초기화"})]}),e.jsx(i.Slider,{className:"theme-ctrl-slider",marks:$,value:d,min:0,max:2,step:1,onChange:y=>m(y)})]}),e.jsxs("div",{children:[e.jsxs(i.Flex,{justify:"space-between",align:"center",children:[e.jsx("span",{className:"sub-title",children:"그리드 크기"}),e.jsx(i.Button,{className:"bwg-btn",type:"text",size:"small",icon:e.jsx(z,{}),onClick:()=>f(T),disabled:b===T,style:{padding:"0",gap:"3px",height:"20px",lineHeight:"20px"},children:"초기화"})]}),e.jsx(i.Slider,{className:"theme-ctrl-slider",marks:$,value:b,min:0,max:2,step:1,onChange:y=>f(y)})]}),e.jsxs("div",{children:[e.jsxs(i.Flex,{justify:"space-between",align:"center",children:[e.jsx("span",{className:"sub-title",children:"여백 조정"}),e.jsx(i.Button,{className:"bwg-btn",type:"text",size:"small",icon:e.jsx(z,{}),onClick:()=>p(E),disabled:I===E,style:{padding:"0",gap:"3px",height:"20px",lineHeight:"20px"},children:"초기화"})]}),e.jsx(i.Slider,{className:"theme-ctrl-slider",marks:$,value:I,min:0,max:2,step:1,onChange:y=>p(y)})]})]}),e.jsx(i.Divider,{style:{margin:"20px 0 15px",borderBlockStart:"1px solid #dddddd"}}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0 10px"},children:[e.jsx("span",{className:"sub-title",children:"화면 보호 활성화"}),e.jsx(i.Switch,{checked:h,onChange:P})]})]}),e.jsx(i.Divider,{style:{margin:"15px 0 20px",borderBlockStart:"1px solid #dddddd"}}),e.jsx("div",{style:{textAlign:"right"},children:e.jsx(i.Button,{className:"bwg-btn",type:"default",size:"small",icon:e.jsx(z,{}),onClick:()=>{Oe({title:"전체 그리드 레이아웃 초기화",content:"임의 변경한 그리드 레이아웃 변경사항을 초기화하시겠습니까? 기존 열려있는 화면들은 다시 열어야 적용됩니다.",onOk(){g()}})},children:"전체 그리드 레이아웃 초기화"})})]});return e.jsxs(De,{className:o.wrapper.className,style:{...o.wrapper.style},children:[o.logo&&e.jsx("div",{className:"header-left",children:e.jsx("div",{className:"logo-container",style:{gap:o.logo?.gap},children:o.logo?.items})}),t&&e.jsx("div",{className:"header-center top-menu-wrap",style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center"},children:t}),e.jsxs("div",{className:"header-right",style:{gap:o.right?.gap,minWidth:o.right?.minWidth},children:[o.right?.items?.map((y,M)=>e.jsx("div",{children:y},M)),o.right?.alarm?.visible&&e.jsx(i.Button,{type:"text",icon:e.jsx("img",{src:Te,alt:"알림"}),className:"alarm-btn",onClick:o.right?.alarm?.onClick}),o.right?.theme?.visible&&e.jsx(i.Popover,{content:_,title:e.jsx("span",{style:{display:"inline-block",fontSize:16,color:"var(--text-primary)",lineHeight:"30px",marginBottom:"2px"},children:"개인 설정"}),trigger:"click",placement:"bottomRight",onOpenChange:y=>o.right?.theme?.onOpenChange?.(y),children:e.jsx(i.Button,{type:"text",icon:e.jsx("img",{src:Re,alt:"개인설정"}),className:"theme-btn",onClick:o.right?.theme?.onClick})}),o.right?.logout?.visible&&e.jsx(i.Button,{type:"text",icon:e.jsx("img",{src:Ee,alt:"로그아웃"}),onClick:o.right?.logout?.onClick||G,className:"logout-btn"}),o.right?.avatar?.visible&&e.jsx(i.Avatar,{icon:e.jsx(L.UserOutlined,{}),className:"avatar",style:{width:o.right?.avatar?.width,height:o.right?.avatar?.height},onClick:o.right?.avatar?.onClick})]})]})},ee=Object.freeze({Translate:{toString(r){if(!r)return;const{x:t,y:n}=r;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(r){if(!r)return;const{scaleX:t,scaleY:n}=r;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(r){if(r)return[ee.Translate.toString(r),ee.Scale.toString(r)].join(" ")}},Transition:{toString(r){let{property:t,duration:n,easing:o}=r;return t+" "+n+"ms "+o}}}),Fe=l.memo(({className:r,...t})=>{const n=l.useRef(null),{attributes:o,listeners:a,transform:c,transition:x,isDragging:d,setNodeRef:m}=J.useSortable({id:t["data-node-key"]}),[b,f]=l.useState();l.useEffect(()=>{const g=n.current;if(g)if(d){const N=Math.round(g.getBoundingClientRect().width);f(N)}else f(void 0)},[d]);const I={...t.style,transform:c?ee.Transform.toString(c):void 0,transition:x??"transform 0.16s ease",cursor:"grab",userSelect:"none",willChange:"transform",width:b??void 0,minWidth:b??void 0,maxWidth:b??void 0,flex:b!==void 0?"0 0 auto":void 0},p=t.children,h=p.props?.className||"",u=t["data-gubun"]==="C"?h?`${h} tab-special`:"tab-special":h;return l.cloneElement(p,{ref:g=>{n.current!==g&&(n.current=g),m(g)},className:u,style:I,...o,...a})}),ze=l.memo(function({config:t,isFirst:n,isLast:o,canCloseAll:a,onFirst:c,onPrev:x,onNext:d,onLast:m,onCloseAll:b}){return e.jsxs("div",{className:t.wrapper?.className,style:t.wrapper?.style,children:[e.jsx(i.Tooltip,{title:"첫 번째 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(i.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(L.StepBackwardOutlined,{}),onClick:c,disabled:n})}),e.jsx(i.Tooltip,{title:"이전 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(i.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(L.LeftOutlined,{}),onClick:x,disabled:n})}),e.jsx(i.Tooltip,{title:"다음 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(i.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(L.RightOutlined,{}),onClick:d,disabled:o})}),e.jsx(i.Tooltip,{title:"마지막 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(i.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(L.StepForwardOutlined,{}),onClick:m,disabled:o})}),e.jsx(i.Tooltip,{title:"모든 탭 닫기",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(i.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(L.CloseOutlined,{}),onClick:b,disabled:!a})})]})}),le=({config:r={}})=>{const t={wrapper:{className:"menu-tab-wrapper",...r?.wrapper},tabs:{className:"menu-tabs",...r?.tabs},nav:{wrapper:{className:"menu-nav-wrapper",...r?.nav?.wrapper},buttons:{className:"menu-nav-buttons",...r?.nav?.buttons},tooltip:{className:"menu-nav-tooltip",...r?.nav?.tooltip},...r?.nav},...r},n=A.useMenuViewStore(s=>s.tabs),o=A.useMenuViewStore(s=>s.activeMenuId),a=A.useMenuViewStore(s=>s.pinnedTabs),c=A.useMenuViewStore(s=>s.focusTab),x=A.useMenuViewStore(s=>s.closeTab),d=A.useMenuViewStore(s=>s.reorderTabs),m=A.useMenuViewStore(s=>s.togglePinTab),b=A.useMenuViewStore(s=>s.refreshTab),f=A.useMenuViewStore(s=>s.closeOtherTabs),I=A.useMenuViewStore(s=>s.closeRightTabs);A.useMenuViewStore(s=>s.closeAllTabs);const p=q.useSensors(q.useSensor(q.PointerSensor,{activationConstraint:{distance:6}})),h=s=>{c(s)},P=(s,j)=>{j==="remove"&&typeof s=="string"&&x(s)},C=()=>{n.length>0&&c(n[0].key)},u=()=>{if(!o||n.length<=1)return;const s=n.findIndex(j=>j.key===o);s>0&&c(n[s-1].key)},g=()=>{if(!o||n.length<=1)return;const s=n.findIndex(j=>j.key===o);s<n.length-1&&c(n[s+1].key)},N=()=>{n.length>0&&c(n[n.length-1].key)},T=()=>{n.forEach(s=>{a.has(s.key)||x(s.key)})},E=l.useCallback(s=>j=>{j.preventDefault(),j.stopPropagation()},[]),v=l.useCallback(s=>{const j=a.has(s),S=n.findIndex(Y=>Y.key===s),B=S>=0&&S<n.length-1,R=n.length>1;return[{key:"close",label:"닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsx("g",{"clip-path":"url(#clip0_1409_1182)",children:e.jsx("path",{d:"M16.2 5.80005L5.79004 16.21M5.80004 5.80005L16.21 16.21",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1182",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{j||x(s)},disabled:j},{key:"pin",label:j?"고정 해제":"고정",icon:j?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1222)",children:[e.jsx("path",{d:"M8.19998 8.28992C7.38998 8.41992 6.60998 8.78992 5.97998 9.41992L12.58 16.0199C13.2 15.3999 13.57 14.6299 13.7 13.8199",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M13.7601 10.9099L16.2101 8.45993L13.5501 5.79993L11.1001 8.24993",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.4502 4.70996L17.2902 9.54996",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M9.27996 12.72L4.70996 17.29",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M5.27979 5.27991L16.7198 16.7199",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1222",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1186)",children:[e.jsx("path",{d:"M13.32 11.3399L16.2 8.45993L13.54 5.79993L10.66 8.67993C9.13998 7.91993 7.24998 8.15993 5.97998 9.41993L12.58 16.0199C13.85 14.7499 14.08 12.8599 13.32 11.3399Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.4502 4.70996L17.2902 9.54996",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M9.27996 12.72L4.70996 17.29",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1186",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{m(s)}},{key:"refresh",label:"새로고침",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsx("g",{"clip-path":"url(#clip0_1409_1193)",children:e.jsx("path",{d:"M16.1801 13.13C15.7801 14.25 15.0401 15.22 14.0401 15.87C13.0501 16.53 11.8701 16.85 10.6801 16.78C9.49009 16.71 8.36009 16.26 7.45009 15.49C6.54009 14.72 5.91009 13.68 5.64009 12.52C5.38009 11.36 5.50009 10.15 5.98009 9.05996C6.47009 7.96996 7.29009 7.07996 8.33009 6.49996C9.37009 5.91996 10.5701 5.69996 11.7501 5.86996C13.7401 6.14996 15.0501 7.58996 16.4701 8.85996M16.4901 5.20996V8.86996H12.8301",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1193",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{b(s)}},{type:"divider"},{key:"closeOthers",label:"다른 탭 닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1197)",children:[e.jsx("path",{d:"M4.52979 5.74005V16.2601C4.52979 16.7101 4.88979 17.0701 5.33979 17.0701H16.6698C17.1198 17.0701 17.4798 16.7101 17.4798 16.2601V8.17005C17.4798 7.72005 17.1198 7.36005 16.6698 7.36005H12.6898C12.3898 7.36005 12.1098 7.23005 11.9198 7.00005L10.4398 5.22005C10.2898 5.04005 10.0598 4.93005 9.81978 4.93005H5.33979C4.88979 4.93005 4.52979 5.29005 4.52979 5.74005Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M13.3598 7.36011H4.52979",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.7897 10.4301L9.19971 14.0201M9.20971 10.4301L12.7997 14.0201",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1197",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{f(s)},disabled:!R},{key:"closeRight",label:"우측 탭 닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1204)",children:[e.jsx("path",{d:"M16.3402 10.53V16.51C16.3402 17.05 15.9302 17.49 15.4302 17.49H5.40023C4.90023 17.49 4.49023 17.05 4.49023 16.51V7.73C4.49023 7.19 4.90023 6.75 5.40023 6.75H10.1702",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.33 11.4301L8.5 15.2601M8.5 11.4301L12.33 15.2601",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.1699 6.76001H17.4199",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M17.4201 6.75996L15.3701 4.70996",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M17.4201 6.76001L15.3701 8.81001",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M4.49023 8.90002H13.3402",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1204",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{I(s)},disabled:!B},{key:"closeAll",label:"전체 닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1215)",children:[e.jsx("path",{d:"M14.8405 10.15L10.2305 14.76M10.2305 10.15L14.8405 14.76",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M16.5101 7.47998H8.56006C8.00777 7.47998 7.56006 7.9277 7.56006 8.47998V16.43C7.56006 16.9823 8.00777 17.43 8.56006 17.43H16.5101C17.0623 17.43 17.5101 16.9823 17.5101 16.43V8.47998C17.5101 7.9277 17.0623 7.47998 16.5101 7.47998Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M5.53023 14.81C4.95023 14.81 4.49023 14.34 4.49023 13.77V5.89999C4.49023 5.31999 4.96023 4.85999 5.53023 4.85999H13.4002C13.9802 4.85999 14.4402 5.32999 14.4402 5.89999",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1215",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{T()},disabled:n.length===0}]},[n,a,x,m,b,f,I]),O=o?n.findIndex(s=>s.key===o):-1,G=O===0,z=O===n.length-1,_=l.useMemo(()=>n.map(s=>{const j=a.has(s.key);return{key:s.key,label:e.jsxs("span",{className:"menu-tabs-text",style:{position:"relative"},children:[j&&e.jsxs("svg",{className:"tabs-pin-icon",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1413_1595)",children:[e.jsx("path",{d:"M13.32 11.3399L16.2 8.45993L13.54 5.79993L10.66 8.67993C9.13998 7.91993 7.24998 8.15993 5.97998 9.41993L12.58 16.0199C13.85 14.7499 14.08 12.8599 13.32 11.3399Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.4502 4.70996L17.2902 9.54996",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M9.27996 12.72L4.70996 17.29",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1413_1595",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),s.label]}),closable:!j,children:null}}),[n,a]),[y,M]=l.useState(null),H=l.useCallback(({active:s})=>{M(null)},[]),w=l.useCallback(({active:s,over:j})=>{if(!j||s.id===j.id)return;const S=n.findIndex(V=>V.key===s.id),B=n.findIndex(V=>V.key===j.id);if(S<0||B<0||S===B)return;const R=n.map(V=>V.key),Y=J.arrayMove(R,S,B);d?.(Y)},[n,d]),k=l.useCallback((s,j)=>e.jsx(q.DndContext,{sensors:p,onDragStart:H,onDragEnd:w,collisionDetection:q.closestCenter,modifiers:[xe.restrictToHorizontalAxis],children:e.jsx(J.SortableContext,{items:n.map(S=>S.key),strategy:J.horizontalListSortingStrategy,children:e.jsx(j,{...s,children:S=>{const B=S.key,R=y===B,V=n.find(Q=>Q.key===B)?.gubun;return e.jsx(i.Dropdown,{rootClassName:"menu-tabs-dropdown",menu:{items:v(B)},trigger:["contextMenu"],open:R,onOpenChange:Q=>{M(Q?B:null)},children:e.jsx("span",{onContextMenu:E(B),style:{display:"inline-block",width:"100%",height:"100%"},children:l.createElement(Fe,{...S.props,key:S.key,"data-gubun":V},S)})})}})})}),[p,H,w,n,y,v,E]);return e.jsx("div",{className:t.wrapper.className,style:{...t.wrapper.style,display:n.length===0?"none":"block"},children:e.jsx(i.Tabs,{type:"editable-card",activeKey:o||void 0,onChange:h,onEdit:P,className:t.tabs.className,style:t.tabs.style,hideAdd:!0,items:_,tabBarExtraContent:e.jsx(ze,{config:t?.nav,isFirst:!!G,isLast:!!z,canCloseAll:n.length>0,onFirst:C,onPrev:u,onNext:g,onLast:N,onCloseAll:T}),renderTabBar:k})})},He="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAeCAYAAADD0FVVAAAACXBIWXMAAAsSAAALEgHS3X78AAAERklEQVRIiY2VTWxUVRiGn/MzlFZ+hlJ/CNSWhJZIojORQgKJFiQsEA24gZCYWMQqJAbaICTGmmBg5UKGpkZgoaCJCdBFF8Qt0xUxUdLbEsDSYItF2SAdHDrt/Znj4t47d/5s/ZKb3HPOPe95v/d7v3OFMYZq0TnW1gHsBpJAkz8rwahBYfQA6IHzrdfGq+0V5aCdY227gVQEFIRRCDQYDUYBCmH0GYw6ce6lq1P/Cdo51pYCjgCsrF3Dg9wYIMBohNGA8gGNRqDCAyxQW86t6y8Ay3LAxbF69jQeY8eKAz47swBhYhA8pWMN6IQwOn3w5rvxEtAg5SMNNSvZ23gMgEv3T5eA+YAFoIB9OBdLgL5QzjRVI2vZseIAT5y/uXz/DFk7C2ZBBIiufoAJD9C7Dg1/tAVABlVueiXezmK9jGsP+xEhGL6WxekWsQOKD4iB0V0A4oO76wcwalci3o7t2dzJWEFBSopBcvEmcl6O0ae/BcVSwbqKCohCGLlMYnRSEGP48c/cyQwDsVI2QeXffnYPdXJJmRwl6SN8ZySlMLGmSKuoso01LXSs6CK19gfq1FJWLWxie8NOjq7+lM3x1yN9Ce2mwyLGReedrcZf8FNorUuw9/lOVi1sxvrnF4ae3CDnzfDWc+9w8Y/v2NawncSSJABWZoTv718qkkACslv6QkeVbaxpYdXCZkaf3mboyQ2sjEVr3TpGs6NM5v5iKDOClRmhVtXSuqilyGK+xsLoIfHhrZ1pUO1RYRTLYy+wbfkOkkvWUx9bzuTMJFcf/sS2hjdoWbSG4cxNrj/6FStzO2Apg70SkKs1JjYAql0UVfHR7GOu/HmJKw/62RjfxP4X9zOavYcwMc7+fpGca/sWNxrhXzLBWE583fbZuBTEBio6h8iHs3mXydwDZlwHa+oWOdeJKh5aLrLUBQB5dt3lcYw+E7VeqVXWPrOWu9l7pe2JCu1T8CyoCYxKFW6pgyPvxwUqjZGJUiOHOoXpqfJ0g06XCCO39m34JF3o/bMvfzuF0R0YnQndIAr3ZlDZyNwlHeSvqS9CwIr79JDV1SWMPB15ThWxC8cl7ABh9W04mqQoZPHgm0QqhdETpe1X2d8+OxlK0EVZyPIJ0CfCX4copK8LaQsjfeY+a6tvY3e6AqF84s3p1xoUaoJAFdt2sB0XJ3hs28WxXRzHwZlxs1+m++LHj388NSdo7UzNq9PTM00A+Xwex3FxHRfPdfEcj7zjkHdcjOshvHy95+XjwNyg169b54F9lbJUja96errHyycrftGDg4M/Sin3ARhj/PRth9lZJ3i3i8e3bdvZPG/6Uko7m53GdT08L4/r+lq6rq9nNPbwvLzteV4F/QqmAKdOnb4AvDdP6pmenu54tYUqlgKgC7AAPC9fkMC2nQJg8E3VqMq0OA4f/jwJpIGlwMXe3pMdc274P6ABcDPQ3Nt7Mj3vx8C/JdZIJ6CGKOUAAAAASUVORK5CYII=",Ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAeCAYAAADD0FVVAAAACXBIWXMAAAsSAAALEgHS3X78AAAD0UlEQVRIiY2Vz4tbVRTHP+cmmWkaYboSBUvC2IWLolFUFCkzYisFFxUUdGdwK9SZxbiaQsHuXDR2JS6sBf+AzkZcScZB1IJOWtRWW0pbFSuWOr+Tee/dc1y8H3kvk3Z64ZB7H5zPPd9zzj0RM2PU6v98dBqRFiJN4ClMQQ1MF019F/Xt6jOLN0b5yjC0f+lIE1dq49wU4kAEzBJTUA/qMVVQv4D6VvW5b1fyDFcAXnylhcgyIlOuVkfKVcSVEFcCl1yQGSAcA270fnihORLaW365BXJWSlXGHnuDsf1vI+U94EoggiCpuMSSvcgEIp2t75/PwGJm9H481MCVuq5SmxibfAdKewj/Oo+Fd0AcmGE56bH8ZO+z803UN/e+9NNKGunnwESl/hZS2Udw/TO0fxtTxTKA5nJrYMQ2WHVgBsD1LrzYwGzK1Rq4Wp3wzwUs2oohaTSmYAOwpUWzlJzZDEAZs9cxQ9wY0b/fEa1eRsSBM9zeJmOTH2Wh6OYl/N2viO58OeiG7BIDY2Lrmyeny2Y6LSb4/37Br14GV8IwRF3sBOA30d41pHqAyv4PkPFJwlvtAji3n3aY7YsPmpOc5jKGau8a21ffJ/j9OADlh99E3F4wLaYiKajDNHbeAfaDSM1APbr5G7q+HLdN9UDSETnfBF5GFVKlAiI2aHD1STYtuSRXcc0Bk980aodpNx+d5Xswi5QsJTL+SPwpWisoGqi1rkO1U2ib5OasNxOqVB9nbPIEMv4otv03uv5rJtmKEXfEzNhaPHgDkXo2QOI8UJp4lvGDnxY63KINti+9i25cKRYqBp6rHb7aKgOY+pOIO5vlM4Fq7w/CW58M+nT9Crp6AQvXcr05KBCqJ7O3D7D59RPnETmWh0o+wrQL4iiGnqyC6Wzt1evt+EVlYfgWIl1E6ukksjy1AE1gZPCFFAi50Vc7fHUF1VZ+EhXMD50teySrpr6Vv7swpGtHrnVQPTcSasVzbnq1Hzp6896TPyla23JOmXk/NAo9qF9FfXuYUR7+sFz7ojmut2+m0z2KIoIgJAgjwjAkCCLCIN73A+vf3aw25l6je18owD9rtXpcDyUMPWFYIQwjoigiDKNsH0V+Q7OnPFg7/k0BTp06Pfp/e+danJ+fnd4VurS01ALOpucgCDPb3k73QXreCILw0Nzce7vL7/e36fcDzJQg8InskCjyBfneq3r/4PJngNMPIP/p+fnZ7vDHkdAE3AGmvFfy0VQqZUQE4OP5+dmZUb73hKbr+PETTaADTAAXgekzZz5cuZ/PrtAE3AAaQHc3IMD/3g8pLLYaAAEAAAAASUVORK5CYII=",Ue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAeCAYAAAAo5+5WAAAACXBIWXMAAAsSAAALEgHS3X78AAAEZklEQVRIiY2WT2xUVRSHv3NnOi2UtlMDRlFsRTegAhHFuGhsogkLIpCQaHTDoCsINgVcmFgjgaaJGzEY48bEqUtiTA2JIa5aGqrixCAhEERswRiJVGZK6bx3/7z3XLw305l2WjnJzbw7efe7v/u755wZiaKIRjE9NJEFdidjC1HUJYFDrPkVq6fE6JHOj/fkGy4GpBF4emiiHzgKdFRfdA6cQaxBjEaMj2j/hjJef1v+wMiy4ERlHtglmRSp1mZcsQyBQ5ytgWrEeIj2UdpD/PJw6zfv52rBasFGI8CudOdKOnc8xcpNayEMkArYWcQZxOqaDXzE+Hu9V97NNwRPD00cBV5qeWI12R0bcXfKzJ67nkArijViErCtQDWifUR7e83z+/rrrJgemugGJlOrmsnu2Ii9Ncvd0WtIYBFrIVGoYl8R7cXDL6P8cvzplRF/bkZ5c92pa6dLFcX9AK1b1wEw+8MfSODAOUi8bTvQQ2vfywstSDbyE8+9DtFeDiCdgHdXjjA7MQmeoWldG+37nl2UMW3DB6rP5vBnRD9eTNR7yUV6OeCTdJIJXQB3x36fv6zAxYvPTxHdngHnYmucQ1pSpHe+iBgDOgEmcLF6c0XxlqqEMKxeVHh7Fv/MZTLbulDbuutUB98XcF9+Bzf/mvc7GQB0Ptedrr4dRYlSC9aiOlYgYYA9dzUpjopiG/vuLKxpR67El6n8cu3e3WmgVIESJJflDKn2DKkn16Ba0qjHVsd2RBHS2kz4259IEBBdvwGJBdRWcLEwKlEU8e/xsxHVyqrLTTLPPELLkZ3o974gtWEdatPjBG8dQ3U/iPxyCfHuIdbUqp2hWMjG6Ra4b6sla+cLoGnzozTv30405xP+fCW24qEHkIxCDR1EvfPGQijE1RtXnjg7Mg81iDG0vP4CKw69Cvc8zJHPUcaH0l3k4dWkf/oK2bAeJm8uSkfiXjPfhIqHv76gtN4s2kOMj0oFpNdmCQuXEa+M8ucQb47UpvWxTbf/gYtXF0LHKBZ6K+kGgFiTw+pRsbpDtA/aI/z7VpxGpiadzp5HvLn4outjBshVJtUmlP30zQtidH9duSYlGxeAXy2EBlCAHMXC1CIwQHt+f16MHqvNimov0OV4vviyAIYpFuqa/cJ+jBgvJ8ZH1TVyD+XH8wYxQ9LElgWvPH1sSrQ3XNceE7VLRJ5iobTwy3SjNy/1bV8VKblBFBIFIVZrrHUYYzHWYa3DGosxFh0Ea95uwFgEHh8fz3rtLRu1tl2gcC7ASQabUrh0KoZai8uksbYJ54JyA+5icE9PT2lw8MQp4MOlzr4gTt0XeHx8PNvTs/U1pQSAMAzjI+v46PEw1bnW5un7AgMoJaZUmgWIrXCJr9ZVn50LsDYgDKN7jRgN/7AADA6emCL5ZVkmxgYGDvU2FLfMon7iHF0qGuZvJZZUXInBwRO9d+7MHHQu2AOQyTR9lM22nRkYODS63Lr/BVeir++DXqB08uTxC/fz/n/BR9oECTo+3AAAAABJRU5ErkJggg==",{Sider:We}=i.Layout,ae=({config:r={}})=>{const t={collapsed:!1,width:230,menuGubunCode:{mainMenu:"MAIN",subMenu:"SUB",program:"PRGM",...r?.menuGubunCode},className:{wrapper:"side-wrapper",search:"sider-search-ipt",segmented:{wrapper:"sider-segmented",item:"sider-segment-item",...r?.className?.segmented},sider:{content:"sider-content",loading:"sider-loading",loadingText:"sider-loading-text",error:"sider-error",errorIcon:"sider-error-icon",errorText:"sider-error-text",menu:"sider-menu",menuContainer:"sider-menu-container",...r?.className?.sider},...r?.className},style:{search:{placeholder:"메뉴명, 메뉴번호 검색...",height:30,...r?.style?.search},...r?.style},...r},[n,o]=l.useState(""),[a,c]=l.useState("category"),[x,d]=l.useState([]),{activeMenuId:m,sidebarCollapsed:b,openTabFromMenu:f,toggleSidebar:I}=A.useMenuViewStore(),{menuList:p,isLoading:h,error:P,findMenuById:C,flatMenuList:u}=A.useMenuModelStore(),{nodes:g,treeNodes:N,loadFavoritesIfNeeded:T}=A.useFavoriteStore(),E=l.useMemo(()=>{const w=[],k=(s,j=0)=>{if(s.menuGbCd===t.menuGubunCode.program&&s.prgrUrl){const S=" ".repeat(j),B=s.menuNo||"";w.push({value:s.menuId,label:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("span",{children:[S,s.menuNm]}),e.jsx("span",{style:{fontSize:"11px",color:"#999",backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"3px",marginLeft:"8px"},children:B})]}),menuItem:s})}s.children&&s.children.length>0&&s.children.forEach(S=>k(S,j+1))};return p.forEach(s=>k(s)),w},[p]),v=l.useMemo(()=>n.trim()?E.filter(w=>{const k=w.menuItem.menuNm.toLowerCase(),s=String(w.menuItem.menuNo||"미지정").toLowerCase(),j=n.toLowerCase();return k.includes(j)||s.includes(j)}):[],[E,n]),O=w=>{if(!w||typeof w!="string"){console.warn("Invalid menu selection value:",w);return}if(!/^[a-zA-Z0-9_-]+$/.test(w)){console.warn("Invalid menu ID format:",w);return}const k=E.find(s=>s.value===w);if(k){const{menuItem:s}=k;if(!s||!s.menuId||!s.menuNm){console.warn("Invalid menu item:",s);return}s.menuGbCd===t.menuGubunCode.program&&s.prgrUrl?(console.log("✅ 검색으로 프로그램 메뉴 선택 - 탭 추가 및 setCurrentProgram 호출"),console.log("메뉴명:",s.menuNm,"경로:",s.prgrUrl,"prgrId:",s.prgrId),f(s)):(s.menuGbCd===t.menuGubunCode.mainMenu||s.menuGbCd===t.menuGubunCode.subMenu)&&(console.log("❌ 검색으로 메인/서브 메뉴 선택 - 이벤트 무시"),console.log("메뉴명:",s.menuNm,"menuGbCd:",s.menuGbCd)),o("")}},G=l.useCallback(w=>{const k=C(w);k?.menuGbCd===t.menuGubunCode.program&&(console.log("메뉴명:",k.menuNm,"경로:",k.prgrUrl,"prgrId:",k.prgrId),f(k))},[C,f,t.menuGubunCode.program]),z=w=>{if(!w)return null;switch(w){case"01":return e.jsx(L.ToolTwoTone,{});case"02":return e.jsx("img",{src:He,alt:"개발완료",style:{width:"16px",height:"16px",display:"inline-block"}});case"03":return e.jsx("img",{src:Ve,alt:"디자인검수완료",style:{width:"16px",height:"16px",display:"inline-block"}});case"04":return e.jsx("img",{src:Ue,alt:"최종완료",style:{width:"16px",height:"16px",display:"inline-block"}});default:return null}},_=l.useCallback(w=>w.map(k=>{const j=k.menuGbCd===t.menuGubunCode.program?z(k.prgrStts):null;return{key:k.menuId,label:e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[j,k.menuNm]})}),icon:y(k.iconCd,k.menuGbCd),children:k.children&&k.children.length>0?_(k.children):void 0}}),[t.menuGubunCode.program]),y=(w,k)=>{if(w){const s=Z[w];if(s)return e.jsx(s,{})}if(k)switch(k){case t.menuGubunCode.mainMenu:return e.jsx(Z.HomeOutlined,{});case t.menuGubunCode.subMenu:return null;case t.menuGubunCode.program:return null;default:return null}return null},M=l.useCallback(w=>{if(p.length===0)return[];const k=j=>{if(j)return typeof j=="string"?g[j]:j},s=j=>{if(j.type==="M"){const S=j,B=C(S.menuId)||void 0,R=!!B,Y=R?`${B?.menuNm??S.menuNm??S.menuId}`:`${S.menuNm??S.menuId} (삭제됨)`;return{key:S.menuId,label:Y,icon:R?void 0:e.jsx(L.WarningOutlined,{style:{color:"#faad14"}})}}else{const S=j,B=(S.children??[]).map(k).filter(Boolean).map(s);return{key:S.bkmkId,label:S.bkmkNm??S.bkmkId,icon:S.prntBkmkId==="-"?e.jsx(L.StarOutlined,{}):e.jsx(L.FolderOpenOutlined,{}),children:B}}};return w.map(s)},[C,g,p]),H=l.useMemo(()=>M(N),[M,N,g]);return l.useEffect(()=>{W.getUserId()&&T(W.getUserId())},[T]),l.useEffect(()=>{a==="category"&&o("")},[a]),l.useEffect(()=>{if(!m||a!=="category")return;const k=(s=>{const j=[],S=new Map(u.map(R=>[R.menuId,R]));let B=s;for(;B;){const R=S.get(B);if(!R)break;if(R.menuPrntId&&R.menuPrntId!=="-"&&R.menuPrntId!=="")j.push(R.menuPrntId),B=R.menuPrntId;else break}return j})(m);k.length>0&&d(s=>{const j=new Set([...s,...k]);return Array.from(j)})},[m,a,u]),e.jsxs(We,{className:t.className.wrapper,collapsed:t.collapsed||b,trigger:null,width:t.width||230,children:[e.jsx("div",{style:{position:"absolute",top:"9px",right:"-25px",zIndex:"1000",width:"25px",height:"41px",backgroundColor:"#ffffff",border:"1px solid #dddddd",borderRadius:"0 10px 10px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"2px 2px 2px rgba(0, 0, 0, 0.05)",transition:"all 0.3s ease"},children:e.jsx(i.Button,{type:"text",icon:t.collapsed||b?e.jsx(L.MenuUnfoldOutlined,{}):e.jsx(L.MenuFoldOutlined,{}),style:{fontSize:"12px",color:"#787878",padding:0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0 10px 10px 0"},onClick:I})}),!(t.collapsed||b)&&e.jsx("div",{style:{padding:10},children:e.jsx(i.AutoComplete,{value:n,options:v,onSelect:O,onSearch:o,style:{width:"100%"},allowClear:!0,children:e.jsx(i.Input,{className:t.className.search,placeholder:t.style.search.placeholder,prefix:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M16.4972 16.6667L13.0355 13.1694M14.8475 8.75C14.8475 5.29822 12.0777 2.5 8.66105 2.5C5.24437 2.5 2.47461 5.29822 2.47461 8.75C2.47461 12.2018 5.24437 15 8.66105 15C12.0777 15 14.8475 12.2018 14.8475 8.75Z",stroke:"#5F5F5F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),size:"middle",style:{height:t.style.search.height||30}})})}),!(t.collapsed||b)&&e.jsx("div",{style:{width:"100%",padding:"0px 10px",marginBottom:"10px"},children:e.jsx(i.Segmented,{className:t.className.segmented.wrapper,options:[{label:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.className.segmented.item,style:{display:"flex",alignItems:"center"},children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e.jsx("path",{d:"M2.46979 6.90625H13.0298C13.7298 6.90625 14.2965 7.47292 14.2965 8.17292V13.5396H1.20312V8.17292C1.20312 7.47292 1.76979 6.90625 2.46979 6.90625Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M2.76318 4.70626C2.76318 4.00626 3.18318 3.75293 3.69652 3.75293H11.8032C12.3165 3.75293 12.7365 4.00626 12.7365 4.70626",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M4.71631 1.45996H10.783",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),"카테고리"]}),value:"category"},{label:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.className.segmented.item,style:{display:"flex",alignItems:"center"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M7.11329 1.33356C7.32084 0.888813 7.66676 0.888813 7.88296 1.33356L9.258 4.25619C9.46556 4.70094 10.0277 5.12753 10.4947 5.20014L13.5647 5.67212C14.0317 5.74473 14.1441 6.08964 13.7982 6.43455L11.5757 8.70367C11.2384 9.04858 11.0222 9.73839 11.1 10.2285L11.6276 13.4325C11.7054 13.9227 11.4287 14.1405 11.0049 13.9045L8.26348 12.3887C7.83972 12.1527 7.15653 12.1527 6.73277 12.3887L3.99134 13.9045C3.56759 14.1405 3.29085 13.9227 3.36868 13.4325L3.89621 10.2285C3.97405 9.73839 3.76649 9.04858 3.42057 8.70367L1.19802 6.43455C0.86075 6.08964 0.964526 5.74473 1.43152 5.67212L4.50158 5.20014C4.96857 5.12753 5.5307 4.70094 5.73825 4.25619L7.11329 1.33356Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"4"})})}),"즐겨찾기"]}),value:"favorite"}],value:a,onChange:w=>{c(w)},style:{width:"100%"},block:!0})}),e.jsxs("div",{className:t.className.sider.content,children:[h&&e.jsxs("div",{className:t.className.sider.loading,style:{padding:10,margin:"0 auto",textAlign:"center",color:"var(--text-primary)"},children:[e.jsx(i.ConfigProvider,{theme:{components:{Spin:{colorPrimary:"var(--primary-color)"}}},children:e.jsx(i.Spin,{size:"default"})}),e.jsx("div",{className:t.className.sider.loadingText,style:{marginTop:10},children:"메뉴 로딩 중..."})]}),P&&e.jsxs("div",{className:t.className.sider.error,children:[e.jsx(L.ExclamationCircleOutlined,{className:t.className.sider.errorIcon}),e.jsx("div",{className:t.className.sider.errorText,children:"메뉴 로드 실패"})]}),!h&&!P&&a==="category"&&p.length===0&&e.jsx("div",{style:{padding:"16px",textAlign:"center",color:"#666",fontSize:"12px"},children:"메뉴가 없습니다"}),!h&&!P&&a==="favorite"&&H.length===0&&e.jsx("div",{style:{padding:"16px",textAlign:"center",color:"#666",fontSize:"12px"},children:"즐겨찾기된 메뉴가 없습니다"}),!h&&!P&&a==="category"&&p.length>0&&e.jsx("div",{className:t.className.sider.menuContainer,children:e.jsx(i.Menu,{theme:"light",mode:"inline",items:_(p),className:t.className.sider.menu,selectedKeys:[m||""],openKeys:x,onOpenChange:d,onClick:w=>G(w.key),onDoubleClick:w=>{w.preventDefault(),w.stopPropagation()}})}),!h&&!P&&a==="favorite"&&H.length>0&&e.jsx("div",{className:t.className.sider.menuContainer,children:e.jsx(i.Menu,{theme:"light",mode:"inline",items:H,className:t.className.sider.menu,selectedKeys:[m||""],onClick:w=>G(w.key),onDoubleClick:w=>{w.preventDefault(),w.stopPropagation()}})})]})]})};class Ge extends l.Component{constructor(t){super(t),this.resetError=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})},this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBound caught an error:",t,n),this.setState({error:t,errorInfo:n})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{style:{padding:"40px 20px",textAlign:"center",backgroundColor:"#fafafa",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[e.jsx(i.Result,{status:"error",title:"컴포넌트 로딩 중 오류가 발생했습니다",subTitle:this.state.error?`오류 내용: ${this.state.error.message}`:"알 수 없는 오류가 발생했습니다",extra:[e.jsx(i.Button,{type:"primary",icon:e.jsx(L.ReloadOutlined,{}),onClick:this.resetError,style:{marginRight:8},children:"다시 시도"},"retry")]}),this.state.error&&e.jsxs("details",{style:{marginTop:"20px",textAlign:"left",maxWidth:"600px",backgroundColor:"#fff",padding:"16px",borderRadius:"6px",border:"1px solid #d9d9d9"},children:[e.jsx("summary",{style:{cursor:"pointer",fontWeight:"bold"},children:"오류 상세 정보"}),e.jsx("pre",{style:{marginTop:"8px",fontSize:"12px",color:"#666",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:this.state.error.stack})]})]}):this.props.children}}const _e=({isActive:r,instance:t,params:n})=>{const{activeMenuId:o,closeTab:a}=A.useMenuViewStore(),c=()=>{o&&a(o)};return t?e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:r?"auto":"none"},children:e.jsx(Ge,{children:e.jsx(l.Suspense,{fallback:null,children:t&&l.createElement(t,{params:n})})})}):e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:r?"auto":"none"},children:e.jsx("div",{style:{width:500,maxWidth:"90%",background:"#fff",borderRadius:16,boxShadow:"0 8px 30px rgba(0,0,0,0.05)",padding:24},children:e.jsx(i.Result,{icon:e.jsx(L.ExclamationCircleTwoTone,{twoToneColor:"#69b1ff"}),status:"warning",title:"등록된 메뉴 정보가 없거나 유효한 메뉴가 아닙니다.",subTitle:e.jsx(i.Typography.Text,{type:"secondary",children:"자세한 내용은 관리자에게 문의바랍니다."}),extra:e.jsx(i.Space,{children:e.jsx(i.Button,{icon:e.jsx(L.CloseOutlined,{}),onClick:c,children:"탭 닫기"})})})})})},ce=l.memo(_e),de=({menuGubunCode:r={mainMenu:"MAIN",subMenu:"SUB",program:"PRGM"},mode:t="horizontal",style:n,routeMap:o})=>{const{menuList:a,findMenuById:c,flatMenuList:x}=A.useMenuModelStore(),{activeMenuId:d}=A.useMenuViewStore(),m=D.useNavigate(),[b,f]=l.useState([]),I=l.useCallback((C,u)=>{if(C){const g=Z[C];if(g)return e.jsx(g,{})}if(u)switch(u){case r.mainMenu:return e.jsx(Z.HomeOutlined,{});default:return null}return null},[r]),p=l.useCallback(C=>C.map(u=>{const g=u.children&&u.children.length===1&&u.children[0].menuGbCd===r.program;return{key:u.menuId,label:u.menuNm,icon:I(u.iconCd,u.menuGbCd),children:u.children&&u.children.length>0&&!g?p(u.children):void 0}}),[I,r]),h=l.useMemo(()=>p(a),[a,p]),P=l.useCallback(C=>{const u=c(C.key);if(u){if(u.children&&u.children.length===1&&u.children[0].menuGbCd===r.program){const g=u.children[0];let N=o?.[g.menuId]||g.prgrUrl||"/";N==="/"?N="/main":N.startsWith("/main")||(N=N.startsWith("/")?`/main${N}`:`/main/${N}`),m(N);return}if(u.menuGbCd===r.program&&u.prgrUrl){let g=o?.[u.menuId]||u.prgrUrl||"/";g==="/"?g="/main":g.startsWith("/main")||(g=g.startsWith("/")?`/main${g}`:`/main/${g}`),m(g);return}}},[c,r,m,o]);return l.useEffect(()=>{if(!d||t!=="vertical")return;const u=(g=>{const N=[],T=new Map(x.map(v=>[v.menuId,v]));let E=g;for(;E;){const v=T.get(E);if(!v)break;if(v.menuPrntId&&v.menuPrntId!=="-"&&v.menuPrntId!=="")N.push(v.menuPrntId),E=v.menuPrntId;else break}return N})(d);u.length>0&&f(g=>{const N=new Set([...g,...u]);return Array.from(N)})},[d,t,x]),e.jsx(i.Menu,{mode:t,theme:"light",items:h,selectedKeys:[d||""],openKeys:t==="vertical"?b:void 0,onOpenChange:t==="vertical"?f:void 0,onClick:P,style:n})},ue=()=>e.jsxs(e.Fragment,{children:[e.jsx("link",{rel:"preload",as:"image",href:"/src/styles/assets/images/backgrounds/LandingContainer_bg.png"}),e.jsx("div",{className:"LandingContainer-wrap",children:e.jsx("div",{className:"inner",children:e.jsx("div",{className:"content"})})})]}),Ye=(r,t)=>{console.log("createPopupViewLoader 호출 - popupUrl:",r);const o=(a=>{if(a.startsWith("/src/pages/views/popup/")){const d=a+".tsx";return console.log(`팝업 URL 변환: ${a} -> ${d}`),d}const x=`/src/pages/views/popup/${a.startsWith("/")?a.substring(1):a}.tsx`;return console.log(`팝업 URL 변환: ${a} -> ${x}`),x})(r);return!o||!t?.glob||!t.glob[o]?(console.warn(`팝업 뷰를 찾을 수 없습니다: ${r} (${o})`),console.warn("사용 가능한 팝업 뷰들:",Object.keys(t?.glob||{})),null):t.glob[o]},qe=({popup:r,modules:t})=>{const[n,o]=l.useState(null),[a,c]=l.useState(!1),[x,d]=l.useState(null),m=()=>{console.log("PopupArea - handleClose:",r.popupId),A.usePopupStore.getState().closePopup(r.popupId)};return l.useEffect(()=>{(async()=>{console.log("팝업 뷰 로드 시작:",r.popupUrl),c(!0),d(null);try{const f=Ye(r.popupUrl,t);if(!f){const h=`팝업 뷰를 찾을 수 없습니다: ${r.popupUrl}`;console.error(h),d(h),c(!1);return}console.log("팝업 뷰 모듈 로드 중...");const I=await f();console.log("팝업 뷰 모듈 로드 완료:",I);const p=I.default;if(console.log("팝업 뷰 컴포넌트:",p),!p)throw new Error("팝업 뷰 컴포넌트를 찾을 수 없습니다");o(()=>p),console.log("팝업 뷰 설정 완료")}catch(f){console.error("팝업 뷰 로드 실패:",f),d(f instanceof Error?f.message:"팝업 뷰 로드 실패")}finally{c(!1)}})()},[r.popupUrl]),a?e.jsxs("div",{className:"popup-loading",children:[e.jsx(i.Spin,{size:"large"}),e.jsx("p",{children:"팝업을 로드하는 중..."})]}):x?e.jsxs("div",{className:"popup-error",children:[e.jsx(i.Empty,{description:x,image:i.Empty.PRESENTED_IMAGE_SIMPLE}),e.jsx(i.Button,{icon:e.jsx(L.ReloadOutlined,{}),onClick:()=>window.location.reload(),children:"다시 시도"})]}):n?e.jsx(l.Suspense,{fallback:e.jsxs("div",{className:"popup-loading",children:[e.jsx(i.Spin,{size:"large"}),e.jsx("p",{children:"컴포넌트를 로드하는 중..."})]}),children:e.jsx(n,{popup:{...r,close:m},onClose:m})}):e.jsx("div",{className:"popup-empty",children:e.jsx(i.Empty,{description:"팝업 내용을 불러올 수 없습니다."})})},pe=({modules:r})=>{const{popups:t}=A.usePopupStore();return t.length===0?null:e.jsx(e.Fragment,{children:t.map(n=>{if(n.isLocal||n.popupCode.startsWith("CORE_"))return null;const o=n.config||{},a=o.width||n.width||800,c=o.height||n.height||600,x=o.title||n.popupTitle,d=n.buttonList?.map((m,b)=>({key:m.btnId||`btn_${b}`,text:m.btnNm,type:m.btnId==="CLOSE"?"default":"primary",disabled:m.enblYn!=="Y",danger:!1}))||[];return console.log("팝업 렌더링:",{popupId:n.popupId,popupCode:n.popupCode,title:x,width:a,height:c,buttons:d}),e.jsx(F.SearchBoxProvider,{children:e.jsx("div",{children:e.jsx(qe,{popup:n,modules:r})},n.popupId)},`sbp-${n.popupId}`)})})},he=()=>{const{popups:r,closePopup:t}=A.usePopupStore();return e.jsx(e.Fragment,{children:r.map(n=>{if(!(n.isLocal||n.popupCode.startsWith("CORE_")))return null;const o=ie[n.popupCode];if(!o)return null;const a=o.component;return e.jsx(F.SearchBoxProvider,{children:e.jsx(l.Suspense,{fallback:null,children:e.jsx(a,{popup:n,onClose:()=>t(n.popupId)})},n.popupId)},`sbp-${n.popupId}`)})})},Ke=r=>({position:"absolute",inset:0,visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:r?"auto":"none"}),Je=({once:r=!0})=>{const{lock:t}=F.useLock(),n=l.useRef(!1);return l.useEffect(()=>{r&&n.current||(n.current=!0,t())},[r,t]),null},me=({isActive:r,flagged:t,tabKey:n,onUnlock:o,children:a})=>{const c=l.useRef(null),[x,d]=l.useState(!1),m=l.useCallback(f=>{c.current=f,d(!!f)},[]),b=Ke(r);return e.jsx("div",{ref:m,style:b,children:x?e.jsxs(F.ScreenProtectProvider,{idleMs:Number.POSITIVE_INFINITY,persistLocked:!1,overlayScope:"scoped",overlayPosition:"absolute",eventTarget:c.current,overlayId:`tab-overlay-${n}`,onUnlock:async()=>(o(),!0),children:[r&&t?e.jsx(Je,{once:!0}):null,a]}):a})},Ze=({config:r={},modules:t={view:{path:"/src/pages/views/content"},popup:{path:"/src/pages/views/popups"}}})=>{const n=l.useRef(new Map),{tabs:o,tabParams:a,activeMenuId:c,tabProtectFlag:x,refreshTabKey:d,clearProtectFlagForKey:m}=A.useMenuViewStore(),{enableProtectWrapper:b}=A.useUserStore(),f=l.useCallback(p=>{const h=n.current.get(p.key);if(h)return h;const P=p.gubun==="M"?`${t.view.path}${p.menuItem?.prgrUrl}.tsx`:`${t.view.path}${p.componentItem?.prgrUrl}.tsx`;let C=t.view?.glob?.[P];if(!C&&typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:X&&X.tagName.toUpperCase()==="SCRIPT"&&X.src||new URL("chunks/layout-components-NtKR0O6Y.cjs",document.baseURI).href}<"u",C){const u=l.lazy(C);return n.current.set(p.key,u),u}return null},[t.view?.glob]),I=l.useRef({});return l.useEffect(()=>{const p=I.current,h=d;Object.keys(h).forEach(P=>{const C=p[P],u=h[P];C!==u&&n.current.delete(P)}),I.current={...h}},[d]),l.useEffect(()=>{const p=h=>{if(h.key==="F5"||h.ctrlKey&&h.key==="r"||h.ctrlKey&&h.shiftKey&&h.key==="R"||h.ctrlKey&&h.key==="s")return h.preventDefault(),!1};return window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}},[]),e.jsxs(i.Layout,{className:"main-layout",children:[e.jsx(re,{config:r?.header}),e.jsxs(i.Layout,{children:[e.jsx(ae,{config:r?.sidebar}),e.jsxs("div",{className:"content-container",children:[e.jsx(le,{config:r?.menuTab}),e.jsxs(ne,{config:r?.content,children:[e.jsx("div",{className:"view-container",children:e.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[o.map(p=>{const h=f(p),P=c===p.key,C=!!x?.[p.key],u=a[p.key]||{},g=d[p.key],N=g!==void 0?`${p.key}-${g}`:p.key,T=p.gubun==="M"?p.menuItem?.menuId:p.key,E=p.gubun==="M"?p.menuItem:null,v=p.gubun==="M"?p.menuItem?.appCd:void 0,O=e.jsx(ce,{isActive:P,instance:h||void 0,params:u},N);return e.jsx(F.BwgViewProvider,{menuId:T,menuItem:E||null,appCd:v,children:e.jsx(F.SearchBoxProvider,{children:b?e.jsx(me,{isActive:P,flagged:C,tabKey:p.key,onUnlock:()=>m(p.key),children:O},p.key):O},`sbp-${p.key}`)},`bwg-${p.key}`)}),(!c||o.length===0)&&e.jsx(ue,{})]})}),e.jsx(he,{}),e.jsx(pe,{modules:t?.popup})]})]})]}),(r?.quickService?.visible??!0)&&e.jsx(te.QuickServiceToggle,{})]})},Qe=({children:r,menuGubunCode:t={mainMenu:"CMPRGRM",subMenu:"CMPRGRS",program:"CMPRGRP"},routeMap:n,routes:o})=>{const a=D.useLocation(),c=D.useNavigate(),{flatMenuList:x,findMenuById:d}=A.useMenuModelStore(),{title:m,extra:b}=F.usePageContent(),f=l.useMemo(()=>{const h=a.pathname,P=h.replace(/^\/main/,"")||"/";if(n){const C=Object.keys(n).find(g=>n[g]===h);if(C)return d(C);const u=Object.keys(n).find(g=>(n[g].replace(/^\/main/,"")||"/")===P);if(u)return d(u)}return x.find(C=>C.menuGbCd===t.program&&C.prgrUrl&&(C.prgrUrl===P||C.prgrUrl===h||h.endsWith(C.prgrUrl)||P===C.prgrUrl))},[a.pathname,x,t.program,n,d]),I=l.useMemo(()=>{if(!f)return[];const h=[],P=u=>{if(!u||!u.menuPrntId||u.menuPrntId==="-")return[];const g=d(u.menuPrntId);return g?[...P(g),g]:[]};return P(f).forEach(u=>{if(u.menuGbCd===t.mainMenu||u.menuGbCd===t.subMenu){let g;if(n&&u.menuId&&(g=n[u.menuId]),!g&&o&&u.prgrUrl){const N=u.prgrUrl.startsWith("/")?u.prgrUrl:`/${u.prgrUrl}`,T=Object.keys(o).find(E=>E===N||E===`/main${N}`);T&&(g=T.startsWith("/main")?T:`/main${T.startsWith("/")?T:`/${T}`}`)}h.push({title:u.menuNm,onClick:g?()=>c(g):void 0})}}),h.push({title:f.menuNm}),h},[f,t,c,d]),p=m!==void 0?m:f?.menuNm||"타이틀";return e.jsxs("div",{className:"admin-page-inner",children:[e.jsxs("div",{className:"page-header",children:[e.jsx(i.Breadcrumb,{className:"admin-breadcrumb",separator:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M6.66675 11.3333L10.0001 7.99996L6.66675 4.66663",stroke:"#9A9A9A","stroke-linecap":"round","stroke-linejoin":"round"})}),items:I,style:{marginBottom:"15px"}}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"16px"},children:[e.jsx("h2",{className:"page-title",style:{margin:0,flex:1},children:p}),b&&e.jsx("div",{style:{flexShrink:0},children:b})]})]}),e.jsx("div",{className:"page-main-content",children:r})]})},ge=r=>e.jsx(F.PageContentProvider,{children:e.jsx(Qe,{...r})}),Xe=({config:r={}})=>{const t=r?.header?.menu,n=t?.visible!==!1,o=t?.routes,a=l.useMemo(()=>{if(!o)return;const c={},{flatMenuList:x}=A.useMenuModelStore.getState();return x.forEach(d=>{if(d.menuGbCd===t?.menuGubunCode?.program&&d.prgrUrl){const m=d.prgrUrl.startsWith("/")?d.prgrUrl:`/${d.prgrUrl}`,b=Object.keys(o).find(f=>{const I=f==="/"?"/":f.startsWith("/")?f:`/${f}`;return I===m||I===`/main${m}`||m===I.replace(/^\/main/,"")});if(b){const f=b==="/"?"/main":b.startsWith("/main")?b:`/main${b.startsWith("/")?b:`/${b}`}`;c[d.menuId]=f}}}),c},[o,t?.menuGubunCode?.program]);return e.jsxs(i.Layout,{className:"admin-layout",children:[e.jsx(re,{config:r?.header,children:n&&e.jsx(de,{menuGubunCode:t?.menuGubunCode,mode:t?.style?.mode||"horizontal",routeMap:a,style:{border:"none",backgroundColor:"transparent",minWidth:0,flex:1,...t?.style}})}),e.jsx("div",{className:"admin-content-container",children:e.jsxs(ne,{config:r?.content,children:[e.jsx("div",{className:"admin-view-container",children:e.jsx("div",{style:{position:"relative",width:"100%",height:"100%"},children:e.jsx(l.Suspense,{fallback:e.jsx("div",{children:"Loading..."}),children:e.jsx(D.Routes,{children:Object.entries(o||{}).map(([c,x])=>{const d=c==="/"?"":c.replace(/^\/main/,"").replace(/^\//,"")||"";return e.jsx(D.Route,{path:d,element:e.jsx(ge,{menuGubunCode:t?.menuGubunCode,routeMap:a,routes:o,children:e.jsx(x,{})})},c)})})})})}),e.jsx(he,{})]})})]})};function $e({config:r,ui:t}){const{loading:n,capsOn:o,prefills:a,onKeyDown:c,doLogin:x}=A.useLogin(r),d=m=>x(m);return l.useEffect(()=>{A.useSystemStore.getState().sysInfo||A.useSystemStore.getState().fetchCurrentSystemInfo()},[]),e.jsx(e.Fragment,{children:t({onSubmit:d,loading:n,capsOn:o,onKeyDown:c,prefills:a})})}function et({onSubmit:r,loading:t,capsOn:n,onKeyDown:o,prefills:a,labels:c={id:"ID 혹은 사번",pw:"비밀번호",remember:"Remember me",login:"로그인"},header:x,footer:d}){const[m]=i.Form.useForm();return l.useEffect(()=>{a&&(a.id||a.pswr)&&m.setFieldsValue({id:a.id,pswr:a.pswr})},[a,m]),e.jsx("div",{className:"login-main",children:e.jsxs("div",{className:"login_wrap",children:[x||e.jsx("div",{className:"logo_box"}),e.jsx("div",{className:"login_title"}),e.jsx(i.ConfigProvider,{theme:{components:{Card:{bodyPadding:40},Button:{controlHeight:40,colorPrimary:"#6449fc",colorPrimaryActive:"#7163c3",colorPrimaryHover:"#7163c3",borderRadius:50,fontWeight:600},Input:{colorBorder:"var(--border-color)",hoverBorderColor:"#bdbd1ff",borderRadiusLG:6,fontSize:14},Checkbox:{colorPrimary:"#6377d1",colorPrimaryBorder:"#6377d1",colorPrimaryHover:"#6449fc",colorText:"var(--text-primary)",fontSize:13}}},children:e.jsx(i.Form,{form:m,onFinish:r,className:"login-form",children:e.jsxs(i.Flex,{vertical:!0,gap:50,children:[e.jsxs("div",{className:"login-form-item-group",children:[e.jsx(i.Form.Item,{name:"id",rules:[{required:!0,message:"아이디를 입력해주세요."},{whitespace:!0,message:"아이디는 공백이 들어갈 수 없습니다."}],children:e.jsx(i.Input,{allowClear:!0,placeholder:c.id,onKeyDown:o})}),e.jsx(i.Form.Item,{name:"pswr",rules:[{required:!0,message:"비밀번호를 입력하세요."}],children:e.jsx(i.Input.Password,{allowClear:!0,placeholder:c.pw,onKeyDown:o})}),e.jsx(i.Form.Item,{name:"remember",valuePropName:"checked",style:{marginBottom:0},children:e.jsx(i.Checkbox,{children:c.remember})}),e.jsx("div",{className:n?"caps-lock caps-lock-on":"caps-lock",children:n?"Caps Lock On":"Caps Lock Off"})]}),e.jsx(i.Form.Item,{style:{marginBottom:0},children:e.jsx(i.Button,{type:"primary",htmlType:"submit",loading:t,block:!0,style:{borderRadius:"50px"},children:c.login})})]})})}),d]})})}const{Text:U,Title:tt}=i.Typography;function nt({loginConfig:r,loginParams:t,mainLogo:n,systemLogo:o,onGoLogin:a,onGoMain:c}){const{loginStatus:x,doSsoLogin:d}=A.useSsoLogin(r);l.useEffect(()=>{m()},[t.userId]);const m=()=>d(t),b=({children:I})=>e.jsxs(tt,{level:4,style:{marginBottom:8,display:"flex",alignItems:"center",justifyContent:"center"},children:[o&&o," ",I]}),f=()=>x==="LOADING"?e.jsxs(e.Fragment,{children:[e.jsx(i.Spin,{size:"large",style:{margin:"10px 0"}}),e.jsxs("div",{children:[e.jsx(b,{children:"로그인 중입니다."}),e.jsxs(U,{children:["인증 정보를 확인하는 중입니다.",e.jsx("br",{}),"브라우저 창을 닫지 말아 주세요."]})]}),e.jsx(U,{type:"secondary",style:{fontSize:12},children:"인증이 완료되면 자동으로 다음 화면으로 이동합니다."}),e.jsx(i.Button,{style:{marginTop:8},onClick:a,children:"로그인 화면"})]}):x==="SUCCESS"?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:48},children:e.jsx(L.CheckCircleTwoTone,{twoToneColor:"#52c41a"})}),e.jsxs("div",{children:[e.jsx(b,{children:"로그인에 성공했습니다."}),e.jsx(U,{children:"잠시만 기다려 주세요."})]}),e.jsx(U,{type:"secondary",style:{fontSize:12},children:"잠시 후 자동으로 다음 화면으로 이동합니다."}),e.jsx(i.Space,{style:{marginTop:8,justifyContent:"center"},children:e.jsx(i.Button,{type:"primary",onClick:c,children:"바로 이동하기"})})]}):x==="FAIL"?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:48},children:e.jsx(L.ExclamationCircleTwoTone,{twoToneColor:"#ff4d4f"})}),e.jsxs("div",{children:[e.jsx(b,{children:"로그인에 실패했습니다."}),e.jsxs(U,{children:["인증 과정에서 오류가 발생했습니다.",e.jsx("br",{}),"다시 시도해 주세요."]})]}),e.jsx(U,{type:"secondary",style:{fontSize:12},children:"문제가 지속되면 관리자에게 문의해 주세요."}),e.jsxs(i.Space,{style:{marginTop:8,justifyContent:"center"},children:[e.jsx(i.Button,{type:"primary",onClick:m,icon:e.jsx(L.ReloadOutlined,{}),children:"다시 시도"}),e.jsx(i.Button,{onClick:a,icon:e.jsx(L.LoginOutlined,{}),children:"로그인 화면"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(i.Spin,{size:"large",style:{margin:"10px 0"}}),e.jsx(U,{children:"로그인 상태를 확인하는 중입니다."})]});return l.useEffect(()=>{A.useSystemStore.getState().sysInfo||A.useSystemStore.getState().fetchCurrentSystemInfo()},[]),e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f5f5f5"},children:e.jsx(i.Card,{style:{width:420,padding:"32px 32px 28px",textAlign:"center",borderRadius:16,boxShadow:"0 8px 24px rgba(0,0,0,0.06)"},children:e.jsxs(i.Space,{direction:"vertical",size:16,style:{width:"100%"},children:[e.jsx("div",{children:n&&n}),f()]})})})}const{Text:oe,Title:rt}=i.Typography;function st({mode:r,mainLogo:t,systemLogo:n,newUserId:o,onContinue:a,onGoLogin:c}){const x=({children:f})=>e.jsxs(rt,{level:4,style:{marginBottom:8,display:"flex",alignItems:"center",justifyContent:"center",gap:6},children:[n&&n," ",f]}),{title:d,desc:m,subDesc:b}=r==="SESSION_CHANGED"?{title:"세션이 변경되었습니다.",desc:`이 브라우저에서 다른 계정으로 다시 로그인되었습니다.
36
+ 현재 창에서는 이전 계정을 더 이상 사용할 수 없습니다.`,subDesc:o?`새로 로그인된 계정: ${o}`:"새로 로그인된 계정으로 계속 진행하거나, 로그인 화면으로 이동해 주세요."}:{title:"세션이 만료되었습니다.",desc:`일정 시간 동안 사용하지 않아 로그인이 해제되었습니다.
37
+ 보안을 위해 다시 로그인해 주세요.`,subDesc:"계속 이용하시려면 로그인 화면으로 이동해 주세요."};return e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f5f5f5"},children:e.jsx(i.Card,{style:{width:450,padding:"32px 32px 28px",textAlign:"center",borderRadius:16,boxShadow:"0 8px 24px rgba(0,0,0,0.06)"},children:e.jsxs(i.Space,{direction:"vertical",size:16,style:{width:"100%"},children:[e.jsx("div",{children:t&&t}),e.jsx("div",{style:{fontSize:48},children:e.jsx(L.ExclamationCircleTwoTone,{twoToneColor:"#faad14"})}),e.jsxs("div",{children:[e.jsx(x,{children:d}),e.jsx(oe,{children:m.split(`
38
+ `).map((f,I)=>e.jsxs("span",{children:[f,e.jsx("br",{})]},I))})]}),e.jsx(oe,{type:"secondary",style:{fontSize:12},children:b}),e.jsx(i.Space,{style:{marginTop:8,justifyContent:"center"},children:a&&o&&e.jsxs(i.Button,{type:"primary",icon:e.jsx(L.CheckCircleTwoTone,{}),onClick:a,children:[o," 계정으로 계속 사용"]})})]})})})}exports.AppWrapper=Le;exports.BwgCoreLogin=$e;exports.BwgPortal01=Ze;exports.BwgPortal02=Xe;exports.BwgSessionNotice=st;exports.BwgSsoLogin=nt;exports.ConfigurableContent=ne;exports.ConfigurableHeader=re;exports.ConfigurableMenuTab=le;exports.ConfigurableSidebar=ae;exports.ContentContainer=ce;exports.ContentWrapper=ge;exports.DefaultLoginView=et;exports.HeaderContainer=de;exports.LandingContainer=ue;exports.LoadingContainer=Me;exports.PopupContainer=pe;exports.ProtectWrapper=me;exports.localPopupRegistry=ie;
@@ -0,0 +1 @@
1
+ "use strict";const S=require("react/jsx-runtime"),s=require("react"),D=require("../stores/index.cjs"),v=require("antd"),T=require("lodash"),P=require("../utils/index.cjs"),_=s.createContext(null),Y=({children:e,menuId:t,menuItem:r,appCd:u})=>{const n={menuId:t,menuItem:r,appCd:u};return S.jsx(_.Provider,{value:n,children:e})},J=()=>s.useContext(_),U=s.createContext(null),H=({children:e,buttonPermissions:t={},isLoadingPermissions:r=!1,permissionsError:u=null,refreshPermissions:n,getButtonPermissions:l})=>{const C={buttonPermissions:t,isLoadingPermissions:r,permissionsError:u,refreshPermissions:n,getButtonPermissions:l};return S.jsx(U.Provider,{value:C,children:e})},Q=()=>s.useContext(U),X=()=>{const{componentSize:e}=D.useUserStore();return s.useMemo(()=>{const r={0:12,1:14,2:16},u={0:"small",1:"middle",2:"large"};return{fontSize:r[e],componentSize:u[e]}},[e])},Z=()=>{const{gridSize:e}=D.useUserStore();return s.useMemo(()=>{const r={0:12,1:13,2:14},u={0:"small",1:"middle",2:"large"},n={0:24,1:30,2:35},l={0:200,1:220,2:250};return{fontSize:r[e],componentSize:u[e],buttonSize:n[e],width:l[e]}},[e])},ee=()=>{const{popups:e,activePopupId:t,setActivePopup:r,closePopup:u,openPopup:n,openCorePopup:l}=D.usePopupStore(),C=s.useCallback(async(p,g,i)=>{try{await n(p,g,i)}catch(d){throw console.error("팝업 열기 실패:",d),d}},[n]),h=s.useCallback((p,g)=>{try{l(p,g)}catch(i){throw console.error("로컬 팝업 열기 실패:",i),i}},[l]);return{popups:e,activePopupId:t,setActivePopup:r,closePopup:u,showPopup:C,openCorePopup:h,isPopup:e.length>0}},te=({fileGrpKey:e,multiple:t=!1,allowedExtensions:r,maxFileSize:u=200,fileTrxCdList:n={onFetchFilesTrxCd:"SCMFILE00101",onSuccessTrxCd:"SCMFILE00102",onDeleteFileTrxCd:"SCMFILE00103",onReorderFilesTrxCd:"SCMFILE00104"},newFileGrpKeyonModify:l=!1,onFilesChange:C,onUploadComplete:h})=>{const[p,g]=s.useState([]),i=s.useRef(e),d=s.useRef([]),m=()=>({crprCd:P.getUserInfo()?.crprCd,sysCd:__SYS_CD__});s.useEffect(()=>{!e||n.onFetchFilesTrxCd},[e,n.onFetchFilesTrxCd]);const j=()=>{if(!n.onSuccessTrxCd||d.current.length===0)return;const o=[...d.current];d.current=[];const a=o.map(c=>({crprCd:P.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:i.current,physFileNm:c.fileNameP,lgclFileNm:c.fileNameL,filePath:c.filePath,fileExtn:c.fileExt,fileSize:c.fileSize,mltpYn:"N"}));P.callService(n.onSuccessTrxCd,{...m(),fileGrpKey:l?0:i.current,oldFileGrpKey:i.current,newFileGrpKeyonModify:l,sub:a}).then(c=>{if(!c?.sub||c.sub.length===0)return;const f=c.sub[0].fileGrpKey;(!i.current||l)&&(i.current=f);const x=new Map;c.sub.forEach(w=>{const y=o.find(F=>F.fileNameL===w.lgclFileNm);y&&x.set(y.tempId,w)}),g(w=>w.map(y=>{const F=x.get(y.uid);if(!F)return y;const M=o.find(W=>W.tempId===y.uid);return h&&M&&h({...M,fileGrpKey:f,fileKey:F.fileKey}),{...y,name:F.lgclFileNm,fileGrpKey:f,fileKey:F.fileKey,uid:F.fileKey,status:"done",url:`/api/download?filePath=${F.filePath}&logicalName=${F.lgclFileNm}`}}))}).catch(c=>{console.error("업로드 후처리 실패:",c),v.message.error("파일 후처리 중 오류가 발생했습니다.");const f=new Set(d.current.map(x=>x.tempId));g(x=>x.map(w=>f.has(w.uid)?{...w,status:"error",error:"후처리 실패"}:w))})},L=s.useRef(T.debounce(j,500)).current;s.useEffect(()=>()=>{L.cancel()},[L]);const k=()=>{n.onFetchFilesTrxCd&&P.callService(n.onFetchFilesTrxCd,{...m(),fileGrpKey:e}).then(o=>{if(o?.sub){const a=o.sub.map(c=>({uid:c.fileKey,name:c.lgclFileNm,status:"done",url:`/api/download?filePath=${c.filePath}&logicalName=${c.lgclFileNm}`}));g(a),C?.(a)}else g([]),C?.([])}).catch(o=>{console.error("파일 목록 조회 실패:",o),v.message.error("파일 목록을 불러오는 중 오류가 발생했습니다.")})};function R(o,a){g(c=>{const f=T.findIndex(c,{uid:o}),x=T.findIndex(c,{uid:a});if(f<0||x<0)return c;const w=[...c],[y]=w.splice(f,1);return w.splice(x,0,y),w})}const B=()=>{if(!n.onReorderFilesTrxCd||!i.current)return;const o=p.map(a=>a.uid);P.callService(n.onReorderFilesTrxCd,{...m(),fileGrpKey:i.current,reorderedFileKeys:o}).then(()=>{v.message.success("파일 순서가 성공적으로 저장되었습니다.")}).catch(a=>{console.error("파일 순서 저장 실패:",a),v.message.error("파일 순서 저장 중 오류가 발생했습니다.")})},O=o=>{if(!t&&p.length>0)return v.message.error("하나의 파일만 업로드할 수 있습니다."),v.Upload.LIST_IGNORE;if(r&&r.length>0){const a=`.${o.name.split(".").pop()?.toLowerCase()}`;if(!r.includes(a))return v.message.error(`${o.name} 파일은 허용되지 않는 확장자입니다. (${r.join(", ")})`),v.Upload.LIST_IGNORE}return u&&!(o.size/1024/1024<u)?(v.message.error(`일반업로드의 최대용량은 ${u}MB입니다.`),v.Upload.LIST_IGNORE):!0},I=o=>{v.Modal.confirm({title:"파일 삭제",content:`총 ${o.length}건의 파일을 삭제하시겠습니까?`,onOk:async()=>{N(o)}})},N=async o=>{if(!n.onDeleteFileTrxCd||o.length===0||p.filter(a=>o.includes(a.uid)).length===0)return!0;try{const a=await P.callService(n.onDeleteFileTrxCd,{...m(),fileGrpKey:l?0:i.current,fileKeys:o,oldFileGrpKey:i.current,newFileGrpKeyonModify:l});if(a?.resultCnt&&a.resultCnt>0){v.message.success(`${a.resultCnt}개의 파일이 성공적으로 삭제되었습니다.`);const c=p.filter(f=>!o.includes(f.uid));g(c),C?.(c)}else v.message.error("파일 삭제 중 오류가 발생했습니다.");return l&&a?.fileGrpKey&&(i.current=a.fileGrpKey),!0}catch(a){return console.error("파일 삭제 실패:",a),v.message.error("파일 삭제 중 오류가 발생했습니다."),!1}};return{defaultUploadProps:{name:"file",multiple:t,action:"/api/upload",fileList:p,showUploadList:{showRemoveIcon:!0,showPreviewIcon:!1,showDownloadIcon:!1},beforeUpload:O,onRemove(o){return I([o.uid]),!1},onChange(o){g(o.fileList),C?.(o.fileList);const{status:a}=o.file;if(a==="done")if(o.file.response?.success){const{uploadedFiles:c}=o.file.response;c&&Array.isArray(c)&&c.length>0&&(c.forEach(f=>{f.tempId=o.file.uid,d.current.push(f)}),L()),v.message.success(o.file.response.message||`${o.file.name} 파일이 성공적으로 업로드되었습니다.`)}else v.message.error(o.file.response?.message||`${o.file.name} 파일 업로드에 실패했습니다.`);else a==="error"&&v.message.error(o.file.response?.message||`${o.file.name} 파일 업로드 중 오류가 발생했습니다.`)}},fileList:p,fetchFileList:k,setFileList:g,saveFileOrder:B,reorderFiles:R,confirmAndDeleteFiles:I,deleteFiles:N}},V=s.createContext(null),oe=()=>{const e=s.useContext(V);if(!e)throw new Error("useAuth must be used within AuthProvider");return e},re=({children:e})=>{const[t,r]=s.useState(!1),[u,n]=s.useState(!1),l=async i=>{const d=(await i.text()).trim().toLowerCase();try{const m=JSON.parse(d);if(typeof m=="object"&&m&&(m.ok===!0||m.success===!0))return!0}catch{}return!!["true","ok","1","y"].includes(d)},C=async i=>{n(!0);try{const d=await fetch("/serviceEndpoint/sso_check.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"token="+encodeURIComponent(i)}),m=d.ok&&await l(d);return r(m),m}catch{return!1}finally{n(!1)}},h=async i=>{n(!0);try{const d=await fetch("/serviceEndpoint/sso_reauth.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"pin="+encodeURIComponent(i)});return d.ok&&await l(d)?(r(!0),!0):!1}catch{return!1}finally{n(!1)}},p=()=>{r(!1)},g=s.useMemo(()=>({authed:t,busy:u,verifyWithToken:C,reauthWithPin:h,logout:p}),[t,u]);return S.jsx(V.Provider,{value:g,children:e})},A=s.createContext(void 0),ne=({children:e})=>{const{codeData:t,isLoading:r,error:u,lastUpdated:n,getCodeList:l,getCodeListByOption:C,getCodeName:h,getCodeColor:p,getCodeByOption:g,getAvailableGroupCodes:i,getGridLookup:d,fetchCommonCodes:m}=D.useCodeStore(),j={codeData:t,isLoading:r,error:u,lastUpdated:n,getCodeList:l,getCodeListByOption:C,getCodeName:h,getCodeColor:p,getCodeByOption:g,getAvailableGroupCodes:i,getGridLookup:d,refreshCodes:m};return S.jsx(A.Provider,{value:j,children:e})},b=()=>{const e=s.useContext(A);if(e===void 0)throw new Error("useCommonCode must be used within a CommonCodeProvider");return e},se=()=>{const{getCodeList:e,isLoading:t,error:r}=b();return{getCodeList:e,isLoading:t,error:r}},ce=()=>{const{getCodeName:e,isLoading:t,error:r}=b();return{getCodeName:e,isLoading:t,error:r}},ie=()=>{const{getCodeColor:e,isLoading:t,error:r}=b();return{getCodeColor:e,isLoading:t,error:r}},ue=()=>{const{getCodeListByOption:e,isLoading:t,error:r}=b();return{getCodeListByOption:e,isLoading:t,error:r}},ae=()=>{const{getGridLookup:e,isLoading:t,error:r}=b();return{getGridLookup:e,isLoading:t,error:r}},G=s.createContext(void 0),le=({children:e})=>{const[t,r]=s.useState(void 0),[u,n]=s.useState(void 0);return S.jsx(G.Provider,{value:{title:t,setTitle:r,extra:u,setExtra:n},children:e})},de=()=>{const e=s.useContext(G);if(!e)throw new Error("usePageContent must be used within a PageContentProvider");return e},$=s.createContext(null),fe=()=>{const e=s.useContext($);if(!e)throw new Error("useLock must be used within ScreenProtectProvider");return e},pe=({children:e,idleMs:t=1e4,onUnlock:r,persistLocked:u=!0,storageKey:n="inactivityLocked",eventTarget:l,overlayScope:C="global",overlayId:h="lock-overlay-root",overlayPosition:p="fixed"})=>{const g=u&&typeof window<"u"&&window.localStorage.getItem(n)==="1",[i,d]=s.useState(g),[m,j]=s.useState(t),L=Number.isFinite(m)&&m>0,k=s.useRef(null),R=()=>{try{u&&window.localStorage.setItem(n,"1")}catch{}d(!0)},B=async E=>{if(!(r&&!await r(E))){try{u&&window.localStorage.removeItem(n)}catch{}d(!1),L&&I()}},O=()=>{try{u&&window.localStorage.setItem(n,"1")}catch{}d(!0)},I=()=>{L&&(k.current&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>{O()},m))};s.useEffect(()=>{if(!L)return;const E=()=>{i||I()},o={passive:!0},a=["pointermove","pointerdown","keydown","wheel","touchstart"],c=l??window;return a.forEach(f=>c.addEventListener(f,E,o)),I(),()=>{k.current&&window.clearTimeout(k.current),a.forEach(f=>c.removeEventListener(f,E))}},[m,i,l,L]),s.useEffect(()=>{if(!i)return;const E=f=>{const x=document.getElementById(h);x&&x.contains(f.target)||(f.stopPropagation(),f.preventDefault())},o={capture:!0},a=["pointerdown","pointerup","pointermove","click","wheel","keydown","keyup","touchstart","touchmove"],c=C==="scoped"?l??window:window;return a.forEach(f=>c.addEventListener(f,E,o)),()=>a.forEach(f=>c.removeEventListener(f,E,o))},[i,C,h,l]);const N=s.useMemo(()=>({locked:i,lock:R,unlock:B,setIdleMs:j}),[i]);return S.jsxs($.Provider,{value:N,children:[S.jsx("div",{style:{width:"100%",height:"100%"},...i?{inert:""}:{},...i?{"aria-hidden":!0}:{},children:e}),i&&S.jsx(me,{onUnlock:B,overlayId:h,overlayPosition:p})]})},me=({onUnlock:e,overlayId:t="lock-overlay-root",overlayPosition:r="fixed"})=>{const[u]=s.useState(4),[n,l]=s.useState("");return S.jsx("div",{id:t,"aria-modal":"true",role:"dialog","aria-label":"Locked screen",style:{position:r,inset:0,background:"rgba(12, 14, 18, 0.85)",backdropFilter:"blur(4px)",display:"grid",placeItems:"center",zIndex:9999},children:S.jsxs("div",{className:"lockscreen-form",style:{width:420,maxWidth:"92vw"},children:[S.jsx("div",{className:"lock-icon-wrap",children:S.jsx("span",{className:"lock-icon-box"})}),S.jsx("h2",{children:"잠금됨"}),S.jsx("p",{children:"PIN 번호를 입력하세요"}),S.jsx("div",{className:"lock-ipt-wrap",style:{display:"flex",justifyContent:"center"},children:S.jsx(v.Input.OTP,{mask:"*",autoFocus:!0,length:u,value:n,onChange:C=>{const h=(C??"").replace(/\D/g,"").slice(0,u);l(h),h.length===u&&e(h)}})})]})})},K=s.createContext(null),Ce=({children:e})=>{const t=s.useRef(null),h={searchBoxRef:t,getFormData:()=>t.current?.getFormData()||{},setFormData:p=>{t.current?.setFormData(p)},setDefaultValue:p=>{t.current?.setDefaultValue(p)},resetForm:()=>{t.current?.resetForm()},validateForm:async()=>await t.current?.validateForm()||{success:!1,error:null}};return S.jsx(K.Provider,{value:h,children:e})},he=()=>{const e=s.useContext(K);if(!e)throw new Error("useSearchBox must be used within a SearchBoxProvider");return e},q=s.createContext(null),ge=({children:e,serviceCodes:t={}})=>{P.setServiceCodeOverrides(t),s.useLayoutEffect(()=>{P.setServiceCodeOverrides(t)},[t]);const u={serviceCodes:t,getServiceCode:n=>t[n]&&t[n].trim()!==""?t[n]:P.DEFAULT_SERVICE_CODES[n]};return S.jsx(q.Provider,{value:u,children:e})},z=()=>{const e=s.useContext(q);if(!e)throw new Error("useServiceCode must be used within a ServiceCodeProvider");return e},ve=e=>{const{getServiceCode:t}=z();return t(e)},Se=()=>{const{getServiceCode:e}=z(),t={};for(const r of Object.keys(P.DEFAULT_SERVICE_CODES))t[r]=e(r);return t},xe=()=>{const{getServiceCode:e}=z();console.log("🔧 bwg-core 서비스코드 설정:"),console.log("📋 Provider 설정 > 기본값 순서로 확인");for(const t of Object.keys(P.DEFAULT_SERVICE_CODES)){const r=e(t);console.log(` ${t}: ${r}`)}};exports.AuthProvider=re;exports.BwgViewProvider=Y;exports.CommonCodeProvider=ne;exports.MenuButtonProvider=H;exports.PageContentProvider=le;exports.ScreenProtectProvider=pe;exports.SearchBoxProvider=Ce;exports.ServiceCodeProvider=ge;exports.useAllServiceCodes=Se;exports.useAuth=oe;exports.useBwgView=J;exports.useCodeColor=ie;exports.useCodeList=se;exports.useCodeListByOption=ue;exports.useCodeName=ce;exports.useCommonCode=b;exports.useFileUploader=te;exports.useGridLookup=ae;exports.useGridSizeConfig=Z;exports.useLock=fe;exports.useLogServiceCodeConfig=xe;exports.useMenuButton=Q;exports.usePageContent=de;exports.usePopup=ee;exports.useSearchBox=he;exports.useServiceCode=z;exports.useServiceCodeValue=ve;exports.useSizeConfig=X;