@bwg-ui/core 1.1.11 → 1.1.13

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 (137) hide show
  1. package/dist/chunks/BwgLargeUploader-CgrJUwFW.cjs +3 -0
  2. package/dist/chunks/BwgLargeUploader-CgrJUwFW.cjs.map +1 -0
  3. package/dist/chunks/{BwgLargeUploader-B5EtYKUz.js → BwgLargeUploader-Nx2-wiD8.js} +802 -776
  4. package/dist/chunks/BwgLargeUploader-Nx2-wiD8.js.map +1 -0
  5. package/dist/chunks/{FileUtils-CaU9Bzu2.js → FileUtils-Bbz3AvQn.js} +2 -2
  6. package/dist/chunks/{FileUtils-CaU9Bzu2.js.map → FileUtils-Bbz3AvQn.js.map} +1 -1
  7. package/dist/chunks/FileUtils-D73GVmB8.cjs +2 -0
  8. package/dist/chunks/{FileUtils-BweAWoJt.cjs.map → FileUtils-D73GVmB8.cjs.map} +1 -1
  9. package/dist/chunks/SSOHandler-CZHPiuEh.js +25397 -0
  10. package/dist/chunks/SSOHandler-CZHPiuEh.js.map +1 -0
  11. package/dist/chunks/SSOHandler-rq0OGrpX.cjs +236 -0
  12. package/dist/chunks/SSOHandler-rq0OGrpX.cjs.map +1 -0
  13. package/dist/chunks/{SearchBoxContext-CY4tAQcg.js → SearchBoxContext-BxtHF9BO.js} +2 -2
  14. package/dist/chunks/{SearchBoxContext-CY4tAQcg.js.map → SearchBoxContext-BxtHF9BO.js.map} +1 -1
  15. package/dist/chunks/SearchBoxContext-Cpr9xa1S.cjs +2 -0
  16. package/dist/chunks/{SearchBoxContext-DDBY44Wr.cjs.map → SearchBoxContext-Cpr9xa1S.cjs.map} +1 -1
  17. package/dist/chunks/TabContainer-B7-6AQXV.js +254 -0
  18. package/dist/chunks/TabContainer-B7-6AQXV.js.map +1 -0
  19. package/dist/chunks/TabContainer-Dx2PVShz.cjs +36 -0
  20. package/dist/chunks/TabContainer-Dx2PVShz.cjs.map +1 -0
  21. package/dist/chunks/_commonjsHelpers-DKOUU3wS.cjs +2 -0
  22. package/dist/chunks/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
  23. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +9 -0
  24. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  25. package/dist/chunks/apiUtils-C45AWfu-.js +957 -0
  26. package/dist/chunks/apiUtils-C45AWfu-.js.map +1 -0
  27. package/dist/chunks/apiUtils-Cbg6NQLv.cjs +4 -0
  28. package/dist/chunks/apiUtils-Cbg6NQLv.cjs.map +1 -0
  29. package/dist/chunks/codeStore-BGLhSpAM.cjs +2 -0
  30. package/dist/chunks/{codeStore-KPL92rcv.cjs.map → codeStore-BGLhSpAM.cjs.map} +1 -1
  31. package/dist/chunks/{codeStore-IIp25egq.js → codeStore-BzT5wSd9.js} +2 -2
  32. package/dist/chunks/{codeStore-IIp25egq.js.map → codeStore-BzT5wSd9.js.map} +1 -1
  33. package/dist/chunks/commonUtils-BH6QwGUb.cjs +2 -0
  34. package/dist/chunks/commonUtils-BH6QwGUb.cjs.map +1 -0
  35. package/dist/chunks/{commonUtils-Cvx6_eK2.js → commonUtils-Bb16Yqjk.js} +24 -25
  36. package/dist/chunks/commonUtils-Bb16Yqjk.js.map +1 -0
  37. package/dist/chunks/envUtils-C9Gf5aek.js.map +1 -1
  38. package/dist/chunks/envUtils-CduTHoHu.cjs.map +1 -1
  39. package/dist/chunks/favoriteStore-3YceyayF.cjs +2 -0
  40. package/dist/chunks/favoriteStore-3YceyayF.cjs.map +1 -0
  41. package/dist/chunks/favoriteStore-C9utQ6sm.js +112 -0
  42. package/dist/chunks/favoriteStore-C9utQ6sm.js.map +1 -0
  43. package/dist/chunks/{popupStore-D8RI04bU.js → popupStore-DmFbkkjd.js} +19 -18
  44. package/dist/chunks/popupStore-DmFbkkjd.js.map +1 -0
  45. package/dist/chunks/popupStore-DnWLaQ70.cjs +2 -0
  46. package/dist/chunks/popupStore-DnWLaQ70.cjs.map +1 -0
  47. package/dist/chunks/usePopup-C8FrbrDD.cjs +2 -0
  48. package/dist/chunks/{UtilsContext-JSHHfnWl.js.map → usePopup-C8FrbrDD.cjs.map} +1 -1
  49. package/dist/chunks/{UtilsContext-JSHHfnWl.js → usePopup-pfh-ajfP.js} +82 -82
  50. package/dist/chunks/usePopup-pfh-ajfP.js.map +1 -0
  51. package/dist/components/common/BwgDetail.d.ts +5 -0
  52. package/dist/components/common/BwgDetail.d.ts.map +1 -0
  53. package/dist/components/common/BwgDrawer.d.ts.map +1 -1
  54. package/dist/components/common/BwgEditor.d.ts +7 -0
  55. package/dist/components/common/BwgEditor.d.ts.map +1 -0
  56. package/dist/components/common/BwgView.d.ts.map +1 -1
  57. package/dist/components/common/index.cjs +1 -1
  58. package/dist/components/common/index.d.ts +2 -0
  59. package/dist/components/common/index.d.ts.map +1 -1
  60. package/dist/components/common/index.js +23 -21
  61. package/dist/components/core/BwgDatePicker.d.ts +1 -1
  62. package/dist/components/core/BwgDatePicker.d.ts.map +1 -1
  63. package/dist/components/core/BwgRangePicker.d.ts +1 -1
  64. package/dist/components/core/BwgRangePicker.d.ts.map +1 -1
  65. package/dist/components/core/BwgUploader.d.ts.map +1 -1
  66. package/dist/components/core/index.cjs +1 -1
  67. package/dist/components/core/index.js +1 -1
  68. package/dist/components/layout/ErrorBound.d.ts +29 -0
  69. package/dist/components/layout/ErrorBound.d.ts.map +1 -0
  70. package/dist/components/layout/TabContainer.d.ts +9 -0
  71. package/dist/components/layout/TabContainer.d.ts.map +1 -0
  72. package/dist/components/layout/index.cjs +1 -1
  73. package/dist/components/layout/index.d.ts +3 -1
  74. package/dist/components/layout/index.d.ts.map +1 -1
  75. package/dist/components/layout/index.js +6 -4
  76. package/dist/index.cjs +1 -1
  77. package/dist/index.js +301 -296
  78. package/dist/provider/index.cjs +1 -1
  79. package/dist/provider/index.js +2 -2
  80. package/dist/stores/favoriteStore.d.ts.map +1 -1
  81. package/dist/stores/index.cjs +1 -1
  82. package/dist/stores/index.cjs.map +1 -1
  83. package/dist/stores/index.d.ts +3 -1
  84. package/dist/stores/index.d.ts.map +1 -1
  85. package/dist/stores/index.js +18 -16
  86. package/dist/stores/index.js.map +1 -1
  87. package/dist/stores/loadingStore.d.ts +9 -0
  88. package/dist/stores/loadingStore.d.ts.map +1 -0
  89. package/dist/stores/menuViewStore.d.ts +28 -3
  90. package/dist/stores/menuViewStore.d.ts.map +1 -1
  91. package/dist/stores/popupStore.d.ts.map +1 -1
  92. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  93. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  94. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  95. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  96. package/dist/utils/apiUtils.d.ts +3 -2
  97. package/dist/utils/apiUtils.d.ts.map +1 -1
  98. package/dist/utils/index.cjs +1 -1
  99. package/dist/utils/index.js +3 -3
  100. package/dist/utils/notificationUtils.d.ts +0 -1
  101. package/dist/utils/notificationUtils.d.ts.map +1 -1
  102. package/package.json +6 -7
  103. package/dist/chunks/BwgLargeUploader-B5EtYKUz.js.map +0 -1
  104. package/dist/chunks/BwgLargeUploader-BPJcShgF.cjs +0 -3
  105. package/dist/chunks/BwgLargeUploader-BPJcShgF.cjs.map +0 -1
  106. package/dist/chunks/FileUtils-BweAWoJt.cjs +0 -2
  107. package/dist/chunks/PublicLayout-3v46YZdi.cjs +0 -36
  108. package/dist/chunks/PublicLayout-3v46YZdi.cjs.map +0 -1
  109. package/dist/chunks/PublicLayout-B4wGo0ut.js +0 -139
  110. package/dist/chunks/PublicLayout-B4wGo0ut.js.map +0 -1
  111. package/dist/chunks/SSOHandler-C72Do3RD.js +0 -15717
  112. package/dist/chunks/SSOHandler-C72Do3RD.js.map +0 -1
  113. package/dist/chunks/SSOHandler-ColywAGZ.cjs +0 -184
  114. package/dist/chunks/SSOHandler-ColywAGZ.cjs.map +0 -1
  115. package/dist/chunks/SearchBoxContext-DDBY44Wr.cjs +0 -2
  116. package/dist/chunks/UtilsContext-C4tlOndT.cjs +0 -2
  117. package/dist/chunks/UtilsContext-C4tlOndT.cjs.map +0 -1
  118. package/dist/chunks/_commonjsHelpers-C6fGbg64.js +0 -7
  119. package/dist/chunks/_commonjsHelpers-C6fGbg64.js.map +0 -1
  120. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs +0 -2
  121. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs.map +0 -1
  122. package/dist/chunks/codeStore-KPL92rcv.cjs +0 -2
  123. package/dist/chunks/commonUtils-Cvx6_eK2.js.map +0 -1
  124. package/dist/chunks/commonUtils-DaFg0y7C.cjs +0 -2
  125. package/dist/chunks/commonUtils-DaFg0y7C.cjs.map +0 -1
  126. package/dist/chunks/menuViewStore-DuS0VmkB.cjs +0 -3
  127. package/dist/chunks/menuViewStore-DuS0VmkB.cjs.map +0 -1
  128. package/dist/chunks/menuViewStore-OKcSQq-s.js +0 -343
  129. package/dist/chunks/menuViewStore-OKcSQq-s.js.map +0 -1
  130. package/dist/chunks/popupStore-BEoWGajT.cjs +0 -2
  131. package/dist/chunks/popupStore-BEoWGajT.cjs.map +0 -1
  132. package/dist/chunks/popupStore-D8RI04bU.js.map +0 -1
  133. package/dist/chunks/serviceConfig-9dHegQIK.cjs +0 -3
  134. package/dist/chunks/serviceConfig-9dHegQIK.cjs.map +0 -1
  135. package/dist/chunks/serviceConfig-Dhe7neaj.js +0 -709
  136. package/dist/chunks/serviceConfig-Dhe7neaj.js.map +0 -1
  137. package/scripts/gen-component-registry.js +0 -138
@@ -1,3 +0,0 @@
1
- "use strict";const c=require("./jsx-runtime-CeSfJrVB.cjs"),u=require("antd"),h=require("react"),tt=require("./popupStore-BEoWGajT.cjs"),Y=require("@ant-design/icons"),_e=require("imask"),L=require("dayjs"),F=require("./serviceConfig-9dHegQIK.cjs"),$=require("lodash"),rt=require("./_commonjsHelpers-DwGv2jUC.cjs"),nt=require("jszip"),P=h.memo(({children:t,label:e,name:r,rules:n,initialValue:s,style:o,...i})=>{const a={fontWeight:"bold"},l=Array.isArray(n)&&n.some(d=>d.required===!0),f=()=>typeof e=="string"?c.jsxRuntimeExports.jsxs("span",{style:a,children:[e,l&&c.jsxRuntimeExports.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}):c.jsxRuntimeExports.jsx("span",{style:a,children:e});return c.jsxRuntimeExports.jsx(u.Form.Item,{className:"bwg-form-item",label:e?f():void 0,labelAlign:"left",name:r,rules:n,colon:!1,initialValue:s,style:o,...i,children:t})}),Fe=h.forwardRef(({children:t,labelCol:e,style:r,className:n,...s},o)=>c.jsxRuntimeExports.jsx(u.ConfigProvider,{form:{validateMessages:{required:"'${label}을(를) 입력해주세요.'"}},children:c.jsxRuntimeExports.jsx(u.Form,{ref:o,...s,requiredMark:!1,labelCol:e||{flex:"100px"},style:{padding:"10px",...r},className:`bwg-form ${n??""}`,children:t})}));Fe.displayName="BwgForm";const st=({itemProps:t,selectProps:e={options:[],allowClear:!0}})=>{const r=u.Form.useFormInstance(),n=!!r,s=h.useMemo(()=>e?.addField==="ALL"?[{label:"전체",value:""},...e?.options||[]]:e?.addField==="NULL"?[{label:"",value:""},...e?.options||[]]:e?.options||[],[e.options,e.addField]),o=l=>{e.onChange?.(l)},i={...e,allowClear:e.allowClear??!0,options:s,onChange:o,variant:e.variant},a=c.jsxRuntimeExports.jsx(u.Select,{...i,disabled:e.disabled});return e.copyable&&!n&&console.warn("BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."),e.copyable?c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsxs(u.Space.Compact,{block:!0,children:[c.jsxRuntimeExports.jsx(u.Form.Item,{name:t?.name,rules:t?.rules,style:{width:"100%",marginBottom:0},validateStatus:"",help:"",children:a}),c.jsxRuntimeExports.jsx(u.Typography.Paragraph,{copyable:{text:n&&r?.getFieldValue(t?.name)?.toString()||"",tooltips:["코드복사","코드복사됨"]},style:{margin:0,backgroundColor:"#f5f5f5",borderRadius:"4px",border:"1px solid #d9d9d9",fontSize:"12px",color:"#666",display:"flex",alignItems:"center",height:"30px",padding:"0 8px"}})]})}):c.jsxRuntimeExports.jsx(P,{...t,children:a})},ye=u.Input.Search,ot=t=>{const e=u.Form.useFormInstance(),{openPopup:r}=tt.usePopupStore(),n=t.itemProps?.name||[],s=t.popupConfig||{callback(i){console.log("callback data :: ",i),n.length>1?(e.setFieldValue(n[0],i.code),e.setFieldValue(n[1],i.name)):e.setFieldValue(n,i.code)}},o={...t,placeholder:typeof t.placeholder=="string"?t.placeholder:t.placeholder?.[0]||"",onChange:i=>{n.length>1&&e.setFieldValue(n[0],""),t.onChange?.(i)},onSearch:i=>{t.popuCd?r(t.popuCd,t.popupParams,s):t.onSearch?.(i)}};return n.length>1?c.jsxRuntimeExports.jsx(P,{...t.itemProps,name:void 0,children:c.jsxRuntimeExports.jsxs(u.Space.Compact,{block:!0,children:[c.jsxRuntimeExports.jsx(u.Form.Item,{name:n[0],rules:t.itemProps?.rules,style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:c.jsxRuntimeExports.jsx(u.Input,{style:{color:"#999",backgroundColor:"#f5f5f5"},placeholder:t.placeholder?.[0]||"",readOnly:!0})}),c.jsxRuntimeExports.jsx(u.Form.Item,{name:n[1],style:{width:"60%",marginBottom:0},children:c.jsxRuntimeExports.jsx(ye,{readOnly:t.readOnly,enterButton:c.jsxRuntimeExports.jsx(u.Button,{icon:c.jsxRuntimeExports.jsx(Y.SearchOutlined,{}),disabled:t.readOnly}),...o})})]})}):c.jsxRuntimeExports.jsx(P,{...t.itemProps,children:c.jsxRuntimeExports.jsx(ye,{...o})})},it=t=>{if(typeof t=="string")return t.replace(/0/g,"_");if(Array.isArray(t))return t[0].replace(/0/g,"_");if(typeof t=="object"&&"mask"in t&&"blocks"in t){const{mask:e,blocks:r}=t;return e.split(".").map(n=>{const o=r?.[n]?.maxLength??3;return"_".repeat(o)}).join(".")}return""},at=({itemProps:t,inputProps:e,mask:r})=>{const n=h.useRef(null),s=u.Form.useFormInstance(),o=h.useMemo(()=>it(r),[r]);return h.useEffect(()=>{if(!n.current?.input)return;const i=typeof r=="string"||Array.isArray(r)?{mask:r}:r,a=_e(n.current.input,i);return a.on("accept",()=>{s&&t?.name&&s.setFieldValue(t.name,a.value)}),()=>{a.destroy()}},[r,s,t?.name]),c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsx(u.Input,{...e,ref:n,placeholder:o})})},ct=t=>{switch(t){case"year":return{format:"YYYY",mask:"0000",outputFormat:"YYYY"};case"month":return{format:"YYYY-MM",mask:"0000-00",outputFormat:"YYYYMM"};case"date":default:return{format:"YYYY-MM-DD",mask:"0000-00-00",outputFormat:"YYYYMMDD"}}},ut=({type:t="date",itemProps:e={name:"calendar"},inputProps:r})=>{const{format:n,mask:s,outputFormat:o}=ct(t),i=h.useRef(null),a=h.useRef(null),l=u.Form.useFormInstance(),[f,d]=h.useState(!1),[y,v]=h.useState(!1),g=e?.name,[b,x]=h.useState(null);h.useEffect(()=>{if(!i.current?.input)return;const D=_e(i.current.input,{mask:s,lazy:!1});return a.current=D,D.on("accept",()=>{console.log("input :: ",D.value);const m=D.value,T=L(m,n,!0);console.log("input :: ",T),m.length===n.length&&T.isValid()&&(console.log("parsed :: ",T.format(o)),l.setFieldValue(g,T.format(o)),a.current.updateValue(),d(!1))}),()=>{D.destroy()}},[n,s]),h.useEffect(()=>{x(L(l.getFieldValue(g)))},[l.getFieldValue(g)]);const C=D=>{if(!D){a.current?.updateValue();return}const m=D.format(o);console.log("formatted :: ",m),a.current&&(a.current.value=m,a.current.updateValue()),v(!1)};return c.jsxRuntimeExports.jsx(P,{...e,name:void 0,validateStatus:y?"warning":void 0,help:y?"유효하지 않은 날짜입니다":void 0,children:c.jsxRuntimeExports.jsxs("div",{style:{position:"relative"},children:[c.jsxRuntimeExports.jsx(u.Form.Item,{name:g,getValueProps:D=>({value:D?L(D).format(n):void 0}),normalize:D=>D?L(D).format(o):void 0,noStyle:!0,children:c.jsxRuntimeExports.jsx(u.Input,{...r,ref:i,onFocus:()=>{d(!f),a.current?.updateValue()},onKeyDown:D=>{D.key==="Backspace"&&d(!0),D.key==="Tab"&&d(!1)},allowClear:!0,placeholder:s.replace(/0/g,"_"),autoComplete:"off"})}),c.jsxRuntimeExports.jsx(u.DatePicker,{open:f,picker:t,format:n,value:b,onChange:C,getPopupContainer:D=>D.parentElement,style:{position:"absolute",top:0,left:0,pointerEvents:"none",opacity:0,width:"100%"}})]})})},lt=({itemProps:t,inputProps:e})=>c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsx(u.Input,{...e})}),dt=({itemProps:t,inputProps:e,type:r="date",useMask:n=!1})=>{const s={year:{displayFormat:"YYYY",outputFormat:"YYYY"},month:{displayFormat:"YYYY-MM",outputFormat:"YYYYMM"},date:{displayFormat:"YYYY-MM-DD",outputFormat:"YYYYMMDD"}},{displayFormat:o,outputFormat:i}=s[r],a=(l,f)=>{if(e?.onChange&&typeof e.onChange=="function"){let d;l instanceof L?d=l.format(i):(d=[],l&&l.map(y=>{d.push(y.format(i))})),e.onChange(d,f)}};return c.jsxRuntimeExports.jsx(P,{...t,getValueProps:l=>({value:l&&L(l)}),normalize:l=>l&&`${L(l).format(i)}`,children:c.jsxRuntimeExports.jsx(u.DatePicker,{...e,format:n?{format:o,type:"mask"}:void 0,onChange:a})})},{RangePicker:gt}=u.DatePicker,ft=({itemProps:t,inputProps:e,type:r="date",minDate:n,maxDate:s,useMask:o=!1})=>{const i={year:{displayFormat:"YYYY",outputFormat:"YYYY"},month:{displayFormat:"YYYY-MM",outputFormat:"YYYYMM"},date:{displayFormat:"YYYY-MM-DD",outputFormat:"YYYYMMDD"}},{displayFormat:a,outputFormat:l}=i[r],f=(d,y)=>{if(e.onChange&&typeof e.onChange=="function"){let v;d instanceof L?v=d.format(l):(v=[],d&&d.map(g=>{v.push(g.format(l))})),e.onChange(v,y)}};return c.jsxRuntimeExports.jsx(P,{...t,getValueProps:d=>({value:d&&[d[0]?L(d[0]):null,d[1]?L(d[1]):null]}),normalize:d=>[d?.[0]?L(d[0]).format(l):void 0,d?.[1]?L(d[1]).format(l):void 0],children:c.jsxRuntimeExports.jsx(gt,{...e,format:o?{format:a,type:"mask"}:void 0,picker:r,order:!0,minDate:n?L(n,l):void 0,maxDate:s?L(s,l):void 0,onChange:f})})},ht=({itemProps:t,inputProps:e})=>c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsx(u.Radio.Group,{...e})}),pt=({itemProps:t,inputProps:e={format:"YN"}})=>{const r=u.Form.useFormInstance(),n=s=>{e.format==="boolean"?r.setFieldValue(t?.name,s.target.checked):r.setFieldValue(t?.name,s.target.checked?"Y":"N"),e.onChange&&e.onChange(s)};return c.jsxRuntimeExports.jsx(P,{...t,getValueProps:s=>(console.log("getValueProps :: ",s),{checked:e.format==="boolean"?!!s:s==="Y"}),normalize:s=>(console.log("normalize :: ",s),typeof s=="boolean"?e.format==="boolean"?s:s?"Y":"N":e.format==="boolean"?!!s:s?"Y":"N"),children:c.jsxRuntimeExports.jsx(u.Checkbox,{...e,onChange:n,children:e?.title})})},mt=({itemProps:t,inputProps:e})=>{const r=u.Form.useFormInstance(),[n,s]=h.useState(t?.initialValue??[]),[o,i]=h.useState([]),a=o.length>0&&o.length==n?.length,l=n?.length>0&&n.length<o.length;h.useEffect(()=>{i(f(e?.options))},[e?.options]),h.useEffect(()=>{s(n)},[n]);const f=v=>{const g=[];return(v||[]).map((b,x)=>{g.push(b.value)}),g},d=v=>{s(v.target.checked?o:[]),r.setFieldValue(t?.name,v.target.checked?o:[])},y=v=>{s(v),r.setFieldValue(t?.name,v),e?.onChange&&typeof e?.onChange=="function"&&e?.onChange(v)};return c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsxs(u.ConfigProvider,{theme:{components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)"}}},children:[e?.allCheck&&c.jsxRuntimeExports.jsx(u.Checkbox,{indeterminate:l,checked:a,onChange:d,children:"전체선택"}),c.jsxRuntimeExports.jsx(u.Checkbox.Group,{options:e?.options,value:n,onChange:y})]})})},{TextArea:vt}=u.Input,yt=({itemProps:t,inputProps:e})=>c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsx(vt,{...e})}),Dt=({itemProps:t,inputProps:e})=>{const r=s=>{let o=s.toString().split(".");return e?.decimalPoint!=null&&o[1]!=null&&e?.decimalPoint>0?o[1].length>e?.decimalPoint?o[1]="."+o[1].substring(0,e?.decimalPoint):o[1]="."+o[1]:o[1]="",o[0].replace(/\B(?=(\d{3})+(?!\d))/g,",")+o[1]},n=s=>{let o=s.toString().split(".");return e?.decimalPoint!=null&&o[1]!=null&&e?.decimalPoint>0?o[1].length>e?.decimalPoint?o[1]="."+o[1].substring(0,e?.decimalPoint):o[1]="."+o[1]:o[1]="",o[0].replace(/\$\s?|(,*)/g,"")+o[1]};return c.jsxRuntimeExports.jsx(P,{...t,children:c.jsxRuntimeExports.jsx(u.InputNumber,{...e,formatter:s=>r(s),parser:s=>n(s)})})},{Option:De}=u.Select,xt=({itemProps:t,inputProps:e})=>{const[r,n]=h.useState([]);return h.useEffect(()=>{e?.addField==="ALL"?n([{label:"전체",value:""},...e?.list||[]]):e?.addField==="NULL"?n([{label:"",value:""},...e?.list||[]]):n(e?.list||[])},[e?.list]),c.jsxRuntimeExports.jsx(P,{...t,getValueProps:s=>s?{value:s&&s.indexOf(",")>0?s.split(","):[s]}:{value:[]},normalize:s=>s!=null&&s!=null&&s.length>0?s.toString():"",children:c.jsxRuntimeExports.jsx(u.Select,{...e,mode:"multiple",children:r.map(s=>{const{value:o,label:i}=s;return e?.printCode?c.jsxRuntimeExports.jsx(De,{value:o,label:i,children:c.jsxRuntimeExports.jsx(u.Space,{children:`[${o}] ${i}`})},o):c.jsxRuntimeExports.jsx(De,{value:o,label:i,children:c.jsxRuntimeExports.jsx(u.Space,{children:`${i}`})},o)})})})},St=t=>c.jsxRuntimeExports.jsx(u.Button,{...t,className:"bwg-btn"}),ke=h.createContext({dragDropManager:void 0});function _(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var xe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Se=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ee={INIT:"@@redux/INIT"+Se(),REPLACE:"@@redux/REPLACE"+Se()};function Et(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ot(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Tt(t))return"date";if(bt(t))return"error";var r=It(t);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function It(t){return typeof t.constructor=="function"?t.constructor.name:null}function bt(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Tt(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function H(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=Ot(t)),e}function Ye(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?_(1):"Expected the enhancer to be a function. Instead, received: '"+H(r)+"'");return r(Ye)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_(2):"Expected the root reducer to be a function. Instead, received: '"+H(t)+"'");var s=t,o=e,i=[],a=i,l=!1;function f(){a===i&&(a=i.slice())}function d(){if(l)throw new Error(process.env.NODE_ENV==="production"?_(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function y(x){if(typeof x!="function")throw new Error(process.env.NODE_ENV==="production"?_(4):"Expected the listener to be a function. Instead, received: '"+H(x)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var C=!0;return f(),a.push(x),function(){if(C){if(l)throw new Error(process.env.NODE_ENV==="production"?_(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");C=!1,f();var m=a.indexOf(x);a.splice(m,1),i=null}}}function v(x){if(!Et(x))throw new Error(process.env.NODE_ENV==="production"?_(7):"Actions must be plain objects. Instead, the actual type was: '"+H(x)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof x.type>"u")throw new Error(process.env.NODE_ENV==="production"?_(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_(9):"Reducers may not dispatch actions.");try{l=!0,o=s(o,x)}finally{l=!1}for(var C=i=a,D=0;D<C.length;D++){var m=C[D];m()}return x}function g(x){if(typeof x!="function")throw new Error(process.env.NODE_ENV==="production"?_(10):"Expected the nextReducer to be a function. Instead, received: '"+H(x));s=x,v({type:Ee.REPLACE})}function b(){var x,C=y;return x={subscribe:function(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?_(11):"Expected the observer to be an object. Instead, received: '"+H(m)+"'");function T(){m.next&&m.next(d())}T();var p=C(T);return{unsubscribe:p}}},x[xe]=function(){return this},x}return v({type:Ee.INIT}),n={dispatch:v,subscribe:y,getState:d,replaceReducer:g},n[xe]=b,n}function S(t,e,...r){if(Ct()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let n;if(e===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;n=new Error(e.replace(/%s/g,function(){return r[s++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function Ct(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function wt(t,e,r){return e.split(".").reduce((n,s)=>n&&n[s]?n[s]:r||null,t)}function Rt(t,e){return t.filter(r=>r!==e)}function Ae(t){return typeof t=="object"}function jt(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const s=[];return r.forEach((o,i)=>{o===1&&s.push(i)}),s}function Nt(t,e){return t.filter(r=>e.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",K="dnd-core/BEGIN_DRAG",fe="dnd-core/PUBLISH_DRAG_SOURCE",Z="dnd-core/HOVER",J="dnd-core/DROP",Q="dnd-core/END_DRAG";function Oe(t,e){return{type:ge,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Mt={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function Pt(t){return function(r=[],n={publishSource:!0}){const{publishSource:s=!0,clientOffset:o,getSourceClientOffset:i}=n,a=t.getMonitor(),l=t.getRegistry();t.dispatch(Oe(o)),Lt(r,a,l);const f=kt(r,a);if(f==null){t.dispatch(Mt);return}let d=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");_t(i),d=i(f)}t.dispatch(Oe(o,d));const v=l.getSource(f).beginDrag(a,f);if(v==null)return;Ft(v),l.pinSource(f);const g=l.getSourceType(f);return{type:K,payload:{itemType:g,item:v,sourceId:f,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!s}}}}function Lt(t,e,r){S(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){S(r.getSource(n),"Expected sourceIds to be registered.")})}function _t(t){S(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ft(t){S(Ae(t),"Item must be an object.")}function kt(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function Yt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function At(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Yt(t,s,r[s])})}return t}function Bt(t){return function(r={}){const n=t.getMonitor(),s=t.getRegistry();Ut(n),$t(n).forEach((i,a)=>{const l=Ht(i,a,s,n),f={type:J,payload:{dropResult:At({},r,l)}};t.dispatch(f)})}}function Ut(t){S(t.isDragging(),"Cannot call drop while not dragging."),S(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Ht(t,e,r,n){const s=r.getTarget(t);let o=s?s.drop(n,t):void 0;return Vt(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Vt(t){S(typeof t>"u"||Ae(t),"Drop result must either be an object or undefined.")}function $t(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function qt(t){return function(){const r=t.getMonitor(),n=t.getRegistry();zt(r);const s=r.getSourceId();return s!=null&&(n.getSource(s,!0).endDrag(r,s),n.unpinSource()),{type:Q}}}function zt(t){S(t.isDragging(),"Cannot call endDrag while not dragging.")}function ae(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function Gt(t){return function(r,{clientOffset:n}={}){Xt(r);const s=r.slice(0),o=t.getMonitor(),i=t.getRegistry(),a=o.getItemType();return Kt(s,i,a),Wt(s,o,i),Zt(s,o,i),{type:Z,payload:{targetIds:s,clientOffset:n||null}}}}function Xt(t){S(Array.isArray(t),"Expected targetIds to be an array.")}function Wt(t,e,r){S(e.isDragging(),"Cannot call hover while not dragging."),S(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const s=t[n];S(t.lastIndexOf(s)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(s);S(o,"Expected targetIds to be registered.")}}function Kt(t,e,r){for(let n=t.length-1;n>=0;n--){const s=t[n],o=e.getTargetType(s);ae(o,r)||t.splice(n,1)}}function Zt(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function Jt(t){return function(){if(t.getMonitor().isDragging())return{type:fe}}}function Qt(t){return{beginDrag:Pt(t),publishDragSource:Jt(t),hover:Gt(t),drop:Bt(t),endDrag:qt(t)}}class er{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...i)=>{const a=o.apply(e,i);typeof a<"u"&&r(a)}}const s=Qt(this);return Object.keys(s).reduce((o,i)=>{const a=s[i];return o[i]=n(a),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function tr(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Be(t,e){return{x:t.x-e.x,y:t.y-e.y}}function rr(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:Be(tr(e,n),r)}function nr(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:Be(e,r)}const z=[],he=[];z.__IS_NONE__=!0;he.__IS_ALL__=!0;function sr(t,e){return t===z?!1:t===he||typeof e>"u"?!0:Nt(e,t).length>0}class or{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;S(typeof e=="function","listener must be a function."),S(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const o=()=>{const i=this.store.getState(),a=i.stateId;try{a===s||a===s+1&&!sr(i.dirtyHandlerIds,n)||e()}finally{s=a}};return this.store.subscribe(o)}subscribeToOffsetChange(e){S(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const s=this.store.getState().dragOffset;s!==r&&(r=s,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return S(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(S(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),s=this.getItemType();return ae(n,s)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(S(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),s=this.getItemType();return n!==s?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),o=this.getItemType();if(o&&!ae(s,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rr(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return nr(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const Ie=typeof global<"u"?global:self,Ue=Ie.MutationObserver||Ie.WebKitMutationObserver;function He(t){return function(){const r=setTimeout(s,0),n=setInterval(s,50);function s(){clearTimeout(r),clearInterval(n),t()}}}function ir(t){let e=1;const r=new Ue(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}const ar=typeof Ue=="function"?ir:He;class cr{enqueueTask(e){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const r=this.index;if(this.index++,e[r].call(),this.index>this.capacity){for(let n=0,s=e.length-this.index;n<s;n++)e[n]=e[n+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ar(this.flush),this.requestErrorThrow=He(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class ur{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,r){this.onError=e,this.release=r,this.task=null}}class lr{create(e){const r=this.freeTasks,n=r.length?r.pop():new ur(this.onError,s=>r[r.length]=s);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}const Ve=new cr,dr=new lr(Ve.registerPendingError);function gr(t){Ve.enqueueTask(dr.create(t))}const pe="dnd-core/ADD_SOURCE",me="dnd-core/ADD_TARGET",ve="dnd-core/REMOVE_SOURCE",ee="dnd-core/REMOVE_TARGET";function fr(t){return{type:pe,payload:{sourceId:t}}}function hr(t){return{type:me,payload:{targetId:t}}}function pr(t){return{type:ve,payload:{sourceId:t}}}function mr(t){return{type:ee,payload:{targetId:t}}}function vr(t){S(typeof t.canDrag=="function","Expected canDrag to be a function."),S(typeof t.beginDrag=="function","Expected beginDrag to be a function."),S(typeof t.endDrag=="function","Expected endDrag to be a function.")}function yr(t){S(typeof t.canDrop=="function","Expected canDrop to be a function."),S(typeof t.hover=="function","Expected hover to be a function."),S(typeof t.drop=="function","Expected beginDrag to be a function.")}function ce(t,e){if(e&&Array.isArray(t)){t.forEach(r=>ce(r,!1));return}S(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var k;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(k||(k={}));let Dr=0;function xr(){return Dr++}function Sr(t){const e=xr().toString();switch(t){case k.SOURCE:return`S${e}`;case k.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function be(t){switch(t[0]){case"S":return k.SOURCE;case"T":return k.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Te(t,e){const r=t.entries();let n=!1;do{const{done:s,value:[,o]}=r.next();if(o===e)return!0;n=!!s}while(!n);return!1}class Er{addSource(e,r){ce(e),vr(r);const n=this.addHandler(k.SOURCE,e,r);return this.store.dispatch(fr(n)),n}addTarget(e,r){ce(e,!0),yr(r);const n=this.addHandler(k.TARGET,e,r);return this.store.dispatch(hr(n)),n}containsHandler(e){return Te(this.dragSources,e)||Te(this.dropTargets,e)}getSource(e,r=!1){return S(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return S(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return S(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return S(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return be(e)===k.SOURCE}isTargetId(e){return be(e)===k.TARGET}removeSource(e){S(this.getSource(e),"Expected an existing source."),this.store.dispatch(pr(e)),gr(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){S(this.getTarget(e),"Expected an existing target."),this.store.dispatch(mr(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);S(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){S(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const s=Sr(e);return this.types.set(s,r),e===k.SOURCE?this.dragSources.set(s,n):e===k.TARGET&&this.dropTargets.set(s,n),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Or=(t,e)=>t===e;function Ir(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function br(t,e,r=Or){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function Tr(t=z,e){switch(e.type){case Z:break;case pe:case me:case ee:case ve:return z;case K:case fe:case Q:case J:default:return he}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,s=jt(r,n);if(!(s.length>0||!br(r,n)))return z;const i=n[n.length-1],a=r[r.length-1];return i!==a&&(i&&s.push(i),a&&s.push(a)),s}function Cr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Cr(t,s,r[s])})}return t}const Ce={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Rr(t=Ce,e){const{payload:r}=e;switch(e.type){case ge:case K:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Z:return Ir(t.clientOffset,r.clientOffset)?t:wr({},t,{clientOffset:r.clientOffset});case Q:case J:return Ce;default:return t}}function jr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function V(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){jr(t,s,r[s])})}return t}const Nr={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Mr(t=Nr,e){const{payload:r}=e;switch(e.type){case K:return V({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case fe:return V({},t,{isSourcePublic:!0});case Z:return V({},t,{targetIds:r.targetIds});case ee:return t.targetIds.indexOf(r.targetId)===-1?t:V({},t,{targetIds:Rt(t.targetIds,r.targetId)});case J:return V({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Q:return V({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Pr(t=0,e){switch(e.type){case pe:case me:return t+1;case ve:case ee:return t-1;default:return t}}function Lr(t=0){return t+1}function _r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){_r(t,s,r[s])})}return t}function kr(t={},e){return{dirtyHandlerIds:Tr(t.dirtyHandlerIds,{type:e.type,payload:Fr({},e.payload,{prevTargetIds:wt(t,"dragOperation.targetIds",[])})}),dragOffset:Rr(t.dragOffset,e),refCount:Pr(t.refCount,e),dragOperation:Mr(t.dragOperation,e),stateId:Lr(t.stateId)}}function Yr(t,e=void 0,r={},n=!1){const s=Ar(n),o=new or(s,new Er(s)),i=new er(s,o),a=t(i,e,r);return i.receiveBackend(a),i}function Ar(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Ye(kr,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Br(t,e){if(t==null)return{};var r=Ur(t,e),n,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)n=o[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ur(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}let we=0;const W=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Hr=h.memo(function(e){var{children:r}=e,n=Br(e,["children"]);const[s,o]=Vr(n);return h.useEffect(()=>{if(o){const i=$e();return++we,()=>{--we===0&&(i[W]=null)}}},[]),c.jsxRuntimeExports.jsx(ke.Provider,{value:s,children:r})});function Vr(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=$r(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}function $r(t,e=$e(),r,n){const s=e;return s[W]||(s[W]={dragDropManager:Yr(t,e,r,n)}),s[W]}function $e(){return typeof global<"u"?global:window}var te,Re;function qr(){return Re||(Re=1,te=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}),te}var zr=qr();const Gr=rt.getDefaultExportFromCjs(zr),A=typeof window<"u"?h.useLayoutEffect:h.useEffect;function Xr(t,e,r){const[n,s]=h.useState(()=>e(t)),o=h.useCallback(()=>{const i=e(t);Gr(n,i)||(s(i),r&&r())},[n,t,r]);return A(o),[n,o]}function Wr(t,e,r){const[n,s]=Xr(t,e,r);return A(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(s,{handlerIds:[i]})},[t,s]),n}function qe(t,e,r){return Wr(e,t||(()=>({})),()=>r.reconnect())}function ze(t,e){const r=[];return typeof t!="function"&&r.push(t),h.useMemo(()=>typeof t=="function"?t():t,r)}function Kr(t){return h.useMemo(()=>t.hooks.dragSource(),[t])}function Zr(t){return h.useMemo(()=>t.hooks.dragPreview(),[t])}let re=!1,ne=!1;class Jr{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){S(!re,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return re=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{re=!1}}isDragging(){if(!this.sourceId)return!1;S(!ne,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ne=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ne=!1}}subscribeToStateChange(e,r){return this.internalMonitor.subscribeToStateChange(e,r)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,r){return this.internalMonitor.isOverTarget(e,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let se=!1;class Qr{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,r){return this.internalMonitor.subscribeToStateChange(e,r)}canDrop(){if(!this.targetId)return!1;S(!se,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return se=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{se=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function en(t,e,r){const n=r.getRegistry(),s=n.addTarget(t,e);return[s,()=>n.removeTarget(s)]}function tn(t,e,r){const n=r.getRegistry(),s=n.addSource(t,e);return[s,()=>n.removeSource(s)]}function ue(t,e,r,n){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;const a=Object.prototype.hasOwnProperty.bind(e);for(let l=0;l<o.length;l++){const f=o[l];if(!a(f))return!1;const d=t[f],y=e[f];if(s=void 0,s===!1||s===void 0&&d!==y)return!1}return!0}function le(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function rn(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function nn(t){return(e=null,r=null)=>{if(!h.isValidElement(e)){const o=e;return t(o,r),o}const n=e;return rn(n),sn(n,r?o=>t(o,r):t)}}function Ge(t){const e={};return Object.keys(t).forEach(r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const s=nn(n);e[r]=()=>s}}),e}function je(t,e){typeof t=="function"?t(e):t.current=e}function sn(t,e){const r=t.ref;return S(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?h.cloneElement(t,{ref:n=>{je(r,n),je(e,n)}}):h.cloneElement(t,{ref:e})}class on{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?e?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),r):(this.lastConnectedDragSource=e,r):r}reconnectDragPreview(e=!1){const r=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ue(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ue(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ge({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,le(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,le(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class an{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ue(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ge({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,le(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function q(){const{dragDropManager:t}=h.useContext(ke);return S(t!=null,"Expected drag drop context"),t}function cn(t,e){const r=q(),n=h.useMemo(()=>new on(r.getBackend()),[r]);return A(()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource()),[n,t]),A(()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,e]),n}function un(){const t=q();return h.useMemo(()=>new Jr(t),[t])}class ln{beginDrag(){const e=this.spec,r=this.monitor;let n=null;return typeof e.item=="object"?n=e.item:typeof e.item=="function"?n=e.item(r):n={},n??null}canDrag(){const e=this.spec,r=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(r):!0}isDragging(e,r){const n=this.spec,s=this.monitor,{isDragging:o}=n;return o?o(s):r===e.getSourceId()}endDrag(){const e=this.spec,r=this.monitor,n=this.connector,{end:s}=e;s&&s(r.getItem(),r),n.reconnect()}constructor(e,r,n){this.spec=e,this.monitor=r,this.connector=n}}function dn(t,e,r){const n=h.useMemo(()=>new ln(t,e,r),[e,r]);return h.useEffect(()=>{n.spec=t},[t]),n}function gn(t){return h.useMemo(()=>{const e=t.type;return S(e!=null,"spec.type must be defined"),e},[t])}function fn(t,e,r){const n=q(),s=dn(t,e,r),o=gn(t);A(function(){if(o!=null){const[a,l]=tn(o,s,n);return e.receiveHandlerId(a),r.receiveHandlerId(a),l}},[n,e,r,s,o])}function hn(t,e){const r=ze(t);S(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=un(),s=cn(r.options,r.previewOptions);return fn(r,n,s),[qe(r.collect,n,s),Kr(s),Zr(s)]}function pn(t){return h.useMemo(()=>t.hooks.dropTarget(),[t])}function mn(t){const e=q(),r=h.useMemo(()=>new an(e.getBackend()),[e]);return A(()=>(r.dropTargetOptions=t||null,r.reconnect(),()=>r.disconnectDropTarget()),[t]),r}function vn(){const t=q();return h.useMemo(()=>new Qr(t),[t])}function yn(t){const{accept:e}=t;return h.useMemo(()=>(S(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Dn{canDrop(){const e=this.spec,r=this.monitor;return e.canDrop?e.canDrop(r.getItem(),r):!0}hover(){const e=this.spec,r=this.monitor;e.hover&&e.hover(r.getItem(),r)}drop(){const e=this.spec,r=this.monitor;if(e.drop)return e.drop(r.getItem(),r)}constructor(e,r){this.spec=e,this.monitor=r}}function xn(t,e){const r=h.useMemo(()=>new Dn(t,e),[e]);return h.useEffect(()=>{r.spec=t},[t]),r}function Sn(t,e,r){const n=q(),s=xn(t,e),o=yn(t);A(function(){const[a,l]=en(o,s,n);return e.receiveHandlerId(a),r.receiveHandlerId(a),l},[n,e,s,r,o.map(i=>i.toString()).join("|")])}function En(t,e){const r=ze(t),n=vn(),s=mn(r.options);return Sn(r,n,s),[qe(r.collect,n,s),pn(s)]}function Xe(t){let e=null;return()=>(e==null&&(e=t()),e)}function On(t,e){return t.filter(r=>r!==e)}function In(t,e){const r=new Set,n=o=>r.add(o);t.forEach(n),e.forEach(n);const s=[];return r.forEach(o=>s.push(o)),s}class bn{enter(e){const r=this.entered.length,n=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=In(this.entered.filter(n),[e]),r===0&&this.entered.length>0}leave(e){const r=this.entered.length;return this.entered=On(this.entered.filter(this.isNodeInDocument),e),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class Tn{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const s=this.config.exposeProperties[n];s!=null&&(r[n]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,r){return r===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const We="__NATIVE_FILE__",Ke="__NATIVE_URL__",Ze="__NATIVE_TEXT__",Je="__NATIVE_HTML__",Ne=Object.freeze(Object.defineProperty({__proto__:null,FILE:We,HTML:Je,TEXT:Ze,URL:Ke},Symbol.toStringTag,{value:"Module"}));function oe(t,e,r){const n=e.reduce((s,o)=>s||t.getData(o),"");return n??r}const de={[We]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Je]:{exposeProperties:{html:(t,e)=>oe(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Ke]:{exposeProperties:{urls:(t,e)=>oe(t,e,"").split(`
2
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Ze]:{exposeProperties:{text:(t,e)=>oe(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Cn(t,e){const r=de[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new Tn(r);return n.loadDataTransfer(e),n}function ie(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(de).filter(r=>{const n=de[r];return n?.matchesTypes?n.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const wn=Xe(()=>/firefox/i.test(navigator.userAgent)),Qe=Xe(()=>!!window.safari);class Me{interpolate(e){const{xs:r,ys:n,c1s:s,c2s:o,c3s:i}=this;let a=r.length-1;if(e===r[a])return n[a];let l=0,f=i.length-1,d;for(;l<=f;){d=Math.floor(.5*(l+f));const g=r[d];if(g<e)l=d+1;else if(g>e)f=d-1;else return n[d]}a=Math.max(0,f);const y=e-r[a],v=y*y;return n[a]+s[a]*y+o[a]*v+i[a]*y*v}constructor(e,r){const{length:n}=e,s=[];for(let g=0;g<n;g++)s.push(g);s.sort((g,b)=>e[g]<e[b]?-1:1);const o=[],i=[];let a,l;for(let g=0;g<n-1;g++)a=e[g+1]-e[g],l=r[g+1]-r[g],o.push(a),i.push(l/a);const f=[i[0]];for(let g=0;g<o.length-1;g++){const b=i[g],x=i[g+1];if(b*x<=0)f.push(0);else{a=o[g];const C=o[g+1],D=a+C;f.push(3*D/((D+C)/b+(D+a)/x))}}f.push(i[i.length-1]);const d=[],y=[];let v;for(let g=0;g<f.length-1;g++){v=i[g];const b=f[g],x=1/o[g],C=b+f[g+1]-v-v;d.push((v-b-C)*x),y.push(C*x*x)}this.xs=e,this.ys=r,this.c1s=f,this.c2s=d,this.c3s=y}}const Rn=1;function et(t){const e=t.nodeType===Rn?t:t.parentElement;if(!e)return null;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}function G(t){return{x:t.clientX,y:t.clientY}}function jn(t){var e;return t.nodeName==="IMG"&&(wn()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function Nn(t,e,r,n){let s=t?e.width:r,o=t?e.height:n;return Qe()&&t&&(o/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:o}}function Mn(t,e,r,n,s){const o=jn(e),a=et(o?t:e),l={x:r.x-a.x,y:r.y-a.y},{offsetWidth:f,offsetHeight:d}=t,{anchorX:y,anchorY:v}=n,{dragPreviewWidth:g,dragPreviewHeight:b}=Nn(o,e,f,d),x=()=>{let E=new Me([0,.5,1],[l.y,l.y/d*b,l.y+b-d]).interpolate(v);return Qe()&&o&&(E+=(window.devicePixelRatio-1)*b),E},C=()=>new Me([0,.5,1],[l.x,l.x/f*g,l.x+g-f]).interpolate(y),{offsetX:D,offsetY:m}=s,T=D===0||D,p=m===0||m;return{x:T?D:C(),y:p?m:x()}}class Pn{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,r){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=r}}function Ln(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Ln(t,s,r[s])})}return t}class _n{profile(){var e,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,r,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,r),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,r,n){this.sourceNodes.set(e,r),this.sourceNodeOptions.set(e,n);const s=i=>this.handleDragStart(i,e),o=i=>this.handleSelectStart(i);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",o),r.setAttribute("draggable","false")}}connectDropTarget(e,r){const n=i=>this.handleDragEnter(i,e),s=i=>this.handleDragOver(i,e),o=i=>this.handleDrop(i,e);return r.addEventListener("dragenter",n),r.addEventListener("dragover",s),r.addEventListener("drop",o),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",s),r.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(e);return Pe({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(e);return Pe({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Ne).some(r=>Ne[r]===e)}beginDragNativeItem(e,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=Cn(e,r),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,r){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(e,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(e,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(e,r){this.dropTargetIds.unshift(r)}constructor(e,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const o=this.sourceNodes.get(s);return o&&et(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const i=G(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});const{dataTransfer:a}=s,l=ie(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),y=this.sourceNodes.get(d),v=this.sourcePreviewNodes.get(d)||y;if(v){const{anchorX:g,anchorY:b,offsetX:x,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),T=Mn(y,v,i,{anchorX:g,anchorY:b},{offsetX:x,offsetY:C});a.setDragImage(v,T.x,T.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:f}=this.getCurrentSourcePreviewNodeOptions();f?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:a}=s,l=ie(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,o.length>0&&this.actions.hover(o,{clientOffset:G(s)}),o.some(a=>this.monitor.canDropOnTarget(a))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=G(s),this.scheduleHover(o),(o||[]).some(a=>this.monitor.canDropOnTarget(a))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;s.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}else ie(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:G(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const o=s.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(s.preventDefault(),o.dragDrop()))},this.options=new Pn(r,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new bn(this.isNodeInDocument)}}const Fn=function(e,r,n){return new _n(e,r,n)},kn=[".pdf",".xlsx",".xls",".docx",".doc",".pptx",".ppt",".hwp",".txt",".csv",".jpg",".jpeg",".png",".gif",".zip"],Le={FILE:"file"},Yn=({originNode:t,file:e,fileList:r,moveFile:n,onDrop:s})=>{const o=h.useRef(null),[{handlerId:i},a]=En({accept:Le.FILE,collect:y=>({handlerId:y.getHandlerId()}),hover(y,v){if(!o.current)return;const g=y.uid,b=e.uid;if(g===b)return;const x=$.findIndex(r,{uid:b}),C=$.findIndex(r,{uid:g});if(C===-1||x===-1)return;const D=o.current.getBoundingClientRect(),m=v.getClientOffset();if(!m)return;const T=(D.bottom-D.top)/2,p=m.y-D.top;C<x&&p<T||C>x&&p>T||n(g,b)},drop(){s()}}),[{isDragging:l},f]=hn({type:Le.FILE,item:()=>({uid:e.uid,index:$.findIndex(r,{uid:e.uid})}),collect:y=>({isDragging:y.isDragging()})}),d=l?0:1;return f(a(o)),c.jsxRuntimeExports.jsx("div",{ref:o,style:{opacity:d},"data-handler-id":i,children:t})},An=({fileGrpKey:t,onUploadComplete:e,onFetchFilesTrxCd:r="SCMFILE00101",onSuccessTrxCd:n="SCMFILE00102",onDeleteFileTrxCd:s="SCMFILE00103",onReorderFilesTrxCd:o="SCMFILE00104",allowedExtensions:i=kn,maxFileSize:a=200,showButton:l=!0,multiple:f=!1})=>{const[d,y]=h.useState([]),v=h.useRef(t),g=h.useRef([]),b=()=>{if(g.current.length===0)return;const p=[...g.current];if(g.current=[],n){const I=p.map(E=>({crprCd:F.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:v.current,physFileNm:E.fileNameP,lgclFileNm:E.fileNameL,filePath:E.filePath,fileExtn:E.fileExt,fileSize:E.fileSize,mltpYn:"N"}));F.callService(n,{crprCd:F.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:v.current,sub:I}).then(E=>{if(E?.sub&&E.sub.length>0){const O=E.sub[0].fileGrpKey;v.current||(v.current=O);const j=new Map;E.sub.forEach(w=>{const N=p.find(M=>M.fileNameL===w.lgclFileNm);N&&j.set(N.tempId,w)}),y(w=>w.map(M=>{const R=j.get(M.uid);if(R){const B=p.find(U=>U.tempId===M.uid);return e&&B&&e({...B,fileGrpKey:O,fileKey:R.fileKey}),{...M,name:R.lgclFileNm,fileGrpKey:O,fileKey:R.fileKey,uid:R.fileKey,status:"done",url:`/api/download?filePath=${R.filePath}&logicalName=${R.lgclFileNm}`}}return M}))}}).catch(E=>{console.error("업로드 후처리 서비스 호출 실패:",E),u.message.error("파일 후처리 중 오류가 발생했습니다.");const O=new Set(p.map(j=>j.tempId));y(j=>j.map(w=>O.has(w.uid)?{...w,status:"error",error:"후처리 실패"}:w))})}},x=h.useRef($.debounce(b,500)).current;h.useEffect(()=>()=>{x.cancel()},[x]),h.useEffect(()=>{v.current=t},[t]),h.useEffect(()=>{t&&r&&F.callService(r,{crprCd:F.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:t}).then(p=>{if(p?.sub){const I=p.sub.map(E=>({uid:E.fileKey,name:E.lgclFileNm,status:"done",url:`/api/download?filePath=${E.filePath}&logicalName=${E.lgclFileNm}`}));y(I)}}).catch(p=>{console.error("파일 목록 조회 서비스 호출에 실패했습니다.",p),u.message.error("파일 목록을 불러오는 중 오류가 발생했습니다.")})},[t,r]);const C=(p,I)=>{const E=$.findIndex(d,{uid:p}),O=$.findIndex(d,{uid:I});if(E<0||O<0)return;const j=[...d],[w]=j.splice(E,1);j.splice(O,0,w),y(j)},D=()=>{if(t&&o){const p=d.map(I=>I.uid);F.callService(o,{crprCd:F.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:t,reorderedFileKeys:p}).then(()=>{u.message.success("파일 순서가 성공적으로 저장되었습니다.")}).catch(I=>{console.error("파일 순서 저장 서비스 호출 실패:",I),u.message.error("파일 순서 저장 중 오류가 발생했습니다.")})}},T={name:"file",multiple:f,action:"/api/upload",fileList:d,beforeUpload:p=>{if(!f&&d.length>0)return u.message.error("하나의 파일만 업로드할 수 있습니다."),u.Upload.LIST_IGNORE;if(i&&i.length>0){const I=`.${p.name.split(".").pop()?.toLowerCase()}`;if(!i.includes(I))return u.message.error(`${p.name} 파일은 허용되지 않는 확장자입니다. (${i.join(", ")})`),u.Upload.LIST_IGNORE}return a&&!(p.size/1024/1024<a)?(u.message.error(`일반업로드의 최대용량은 ${a}MB입니다.`),u.Upload.LIST_IGNORE):!0},onChange(p){const{status:I,uid:E}=p.file;if(I==="removed"){s?F.callService(s,{crprCd:F.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:v.current,fileKey:E}).then(()=>{u.message.success("파일이 성공적으로 삭제되었습니다."),y(p.fileList)}).catch(O=>{console.error("파일 삭제 서비스 호출에 실패했습니다.",O),u.message.error("파일 삭제 중 오류가 발생했습니다.")}):y(p.fileList);return}if(y(p.fileList),I==="done")if(p.file.response?.success){const{uploadedFiles:O}=p.file.response;O&&Array.isArray(O)&&O.length>0&&(O.forEach(j=>{j.tempId=p.file.uid,g.current.push(j)}),x()),u.message.success(p.file.response.message||`${p.file.name} 파일이 성공적으로 업로드되었습니다.`)}else u.message.error(p.file.response?.message||`${p.file.name} 파일 업로드에 실패했습니다.`);else I==="error"&&u.message.error(p.file.response?.message||`${p.file.name} 파일 업로드 중 오류가 발생했습니다.`)},itemRender(p,I,E){const O=h.cloneElement(p,{href:I.url||void 0,title:void 0});return c.jsxRuntimeExports.jsx(Yn,{originNode:O,file:I,fileList:E,moveFile:C,onDrop:D},I.uid)}};return c.jsxRuntimeExports.jsx(Hr,{backend:Fn,children:c.jsxRuntimeExports.jsx(u.Upload,{...T,listType:"picture",children:l&&(f||d.length===0)&&c.jsxRuntimeExports.jsx(u.Button,{icon:c.jsxRuntimeExports.jsx(Y.UploadOutlined,{}),children:"파일 선택"})})})},{Text:X,Link:$n}=u.Typography,{Dragger:Bn}=u.Upload,Un=[".pdf",".xlsx",".xls",".docx",".doc",".pptx",".ppt",".hwp",".txt",".csv",".jpg",".jpeg",".png",".gif",".zip"],Hn=(t,e=2)=>{if(t===0)return"0 Bytes";const r=1024,n=e<0?0:e,s=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,o)).toFixed(n))+" "+s[o]},Vn=({title:t="첨부파일",fileGrpKey:e,onUploadComplete:r,onSuccessTrxCd:n="SCMFILE00102",anotherServiceTrxCd:s="SCMFILE00105",allowedExtensions:o=Un,maxFileSize:i=2048})=>{const[a,l]=h.useState([]),[f,d]=h.useState(!1),[y,v]=h.useState(!1),[g,b]=h.useState(0),x=m=>{if(o&&o.length>0){const p=(I=>{const E=I.lastIndexOf(".");return E===-1?"":I.substring(E).toLowerCase()})(m.name);if(!o.includes(p))return u.message.error(`${m.name} 파일은 허용되지 않는 확장자입니다. (${o.join(", ")}만 가능)`),!1}return!0},C=async()=>{const m=a.filter(O=>O.status!=="done"),T=m.reduce((O,j)=>O+(j.size||0),0),p=2*1024*1024*1024;if(T>p){u.notification.error({message:"업로드 용량 초과",description:"한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."});return}if(m.length===0){u.message.warning("업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다.");return}v(!0);let I;try{const O=new nt;m.forEach(j=>{j.originFileObj&&O.file(j.name,j.originFileObj)}),I=await O.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}})}catch(O){v(!1),u.message.error("파일을 압축하는 중 오류가 발생했습니다."),console.error("Zipping error:",O);return}v(!1);const E=new FormData;E.append("file",I,"upload.zip"),d(!0),b(0);try{const O=await new Promise((w,N)=>{const M=new XMLHttpRequest;M.open("POST","/api/upload-large",!0),M.upload.onprogress=R=>{if(R.lengthComputable){const B=Math.round(R.loaded/R.total*100);b(B)}},M.onload=()=>{if(M.status>=200&&M.status<300)try{const R=JSON.parse(M.responseText);R.success?w(R):N(new Error(R.message||"파일 업로드에 실패했습니다."))}catch{N(new Error("잘못된 서버 응답입니다."))}else try{const R=JSON.parse(M.responseText);N(new Error(R.message||`서버 오류: ${M.status}`))}catch{N(new Error(`서버 오류: ${M.status}`))}},M.onerror=()=>{N(new Error("네트워크 오류가 발생했습니다."))},M.send(E)});u.message.success(O.message||"압축 파일이 성공적으로 업로드되었습니다.");const j=a.map(w=>m.find(N=>N.uid===w.uid)?{...w,status:"done"}:w);if(l(j),n&&O.uploadedFiles&&Array.isArray(O.uploadedFiles)){const w=F.getUserInfo();O.uploadedFiles.forEach(N=>{const M={crprCd:w.crprCd,sysCd:__SYS_CD__,fileGrpKey:e,sub:[{crprCd:w.crprCd,sysCd:__SYS_CD__,fileGrpKey:e,physFileNm:N.fileNameP,lgclFileNm:N.fileNameL,filePath:N.filePath,fileExtn:N.fileExt,fileSize:N.fileSize,mltpYn:"Y"}]};F.callService(n,M).then(R=>{const B=a.map(U=>({crprCd:w.crprCd,sysCd:__SYS_CD__,fileGrpKey:R.sub[0].fileGrpKey,fileKey:R.sub[0].fileKey,lgclFileNm:U.name,fileSize:U.size,fileExtn:U.name.split(".").pop(),fileType:U.type}));F.callService(s,{sub:B})}).catch(R=>{console.error("후처리 서비스 호출 실패:",R),u.message.error(`${N.fileNameL} 파일의 후처리 작업에 실패했습니다.`)}),r&&r({fileNameP:N.fileNameP,fileNameL:N.fileNameL})})}}catch(O){u.message.error(O.message||"파일 업로드 중 오류가 발생했습니다.");const j=a.map(w=>m.find(N=>N.uid===w.uid)?{...w,status:"error",response:O.message||"파일 업로드 중 오류가 발생했습니다."}:w);l(j)}finally{d(!1)}},D={multiple:!0,fileList:a,beforeUpload:m=>x(m)?i&&m.size>=i*1024*1024?(u.message.error(`대용량 첨부 파일 최대 크기는 ${(i/1024).toFixed(1)}GB입니다.`),u.Upload.LIST_IGNORE):!1:u.Upload.LIST_IGNORE,onChange:({fileList:m})=>{const T=new Map(a.map(p=>[p.uid,p]));m.forEach(p=>{T.set(p.uid,p)}),l(Array.from(T.values()))},onRemove:m=>{const T=a.filter(p=>p.uid!==m.uid);l(T)},showUploadList:!1};return c.jsxRuntimeExports.jsx(u.Spin,{spinning:f||y,tip:y?"파일 압축 중...":`파일 업로드 중... ${g}%`,children:c.jsxRuntimeExports.jsxs("div",{className:"bwg-large-uploader-container",children:[c.jsxRuntimeExports.jsx(u.Card,{title:c.jsxRuntimeExports.jsx(X,{strong:!0,children:t}),extra:c.jsxRuntimeExports.jsx(u.Upload,{...D,children:c.jsxRuntimeExports.jsx(u.Button,{icon:c.jsxRuntimeExports.jsx(Y.UploadOutlined,{}),children:"파일 선택"})}),bodyStyle:{padding:0},children:c.jsxRuntimeExports.jsx(Bn,{...D,style:{border:"none",background:"transparent",padding:0},children:c.jsxRuntimeExports.jsx("div",{className:"upload-list-container",children:a.length>0?c.jsxRuntimeExports.jsx(u.List,{style:{textAlign:"left"},dataSource:a,renderItem:m=>{const T=m.status==="done",p=m.status==="error";let I;return T?I=c.jsxRuntimeExports.jsx(Y.CheckCircleOutlined,{style:{color:"#52c41a",fontSize:14}}):p?I=c.jsxRuntimeExports.jsx(u.Tooltip,{title:typeof m.response=="string"?m.response:"업로드 실패",children:c.jsxRuntimeExports.jsx(Y.CloseCircleOutlined,{style:{color:"#ff4d4f",fontSize:14}})}):I=c.jsxRuntimeExports.jsx(Y.FileTextOutlined,{style:{fontSize:14}}),c.jsxRuntimeExports.jsx(u.List.Item,{actions:[c.jsxRuntimeExports.jsx(X,{type:"secondary",children:Hn(m.size||0)},"size"),c.jsxRuntimeExports.jsx(u.Button,{type:"text",icon:c.jsxRuntimeExports.jsx(Y.DeleteOutlined,{}),onClick:E=>{E.stopPropagation(),D.onRemove?.(m)},disabled:f||y},"delete")],children:c.jsxRuntimeExports.jsx(u.List.Item.Meta,{avatar:I,title:c.jsxRuntimeExports.jsx(X,{type:p?"danger":void 0,children:m.name})})},m.uid)}}):c.jsxRuntimeExports.jsxs(u.Flex,{gap:"middle",align:"center",justify:"center",vertical:!0,style:{padding:"20px 0",minHeight:"120px"},children:[c.jsxRuntimeExports.jsx(Y.InboxOutlined,{style:{fontSize:"32px",color:"#999"}}),c.jsxRuntimeExports.jsx(X,{type:"secondary",children:"업로드할 파일을 선택하거나 이 영역으로 드래그하세요."})]})})})}),a.length>0&&c.jsxRuntimeExports.jsxs(u.Flex,{justify:"flex-end",align:"center",gap:"large",style:{marginTop:16},children:[f&&c.jsxRuntimeExports.jsx("div",{style:{width:"250px"},children:c.jsxRuntimeExports.jsx(u.Progress,{percent:g,size:"small"})}),c.jsxRuntimeExports.jsx(u.Button,{type:"primary",onClick:C,disabled:f||y||a.filter(m=>m.status!=="done").length===0,icon:c.jsxRuntimeExports.jsx(Y.CloudUploadOutlined,{}),children:"일괄 업로드"})]})]})})};exports.BwgButton=St;exports.BwgCheck=pt;exports.BwgCheckList=mt;exports.BwgDatePicker=dt;exports.BwgForm=Fe;exports.BwgFormItem=P;exports.BwgInput=lt;exports.BwgLargeUploader=Vn;exports.BwgMaskedInput=at;exports.BwgMaskedPicker=ut;exports.BwgMultiSelect=xt;exports.BwgNumber=Dt;exports.BwgRadio=ht;exports.BwgRangePicker=ft;exports.BwgSearch=ot;exports.BwgSelect=st;exports.BwgTextArea=yt;exports.BwgUploader=An;
3
- //# sourceMappingURL=BwgLargeUploader-BPJcShgF.cjs.map