@gientech/modual 2.1.38 → 2.2.0

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 (39) hide show
  1. package/assets/{GientechStreamReader-C8rYtUxB.js → GientechStreamReader-C5jijqVw.js} +57 -57
  2. package/assets/LeftOutlined-9XTSYGbi.js +1 -0
  3. package/assets/{index-Bg1CcQn9.js → index-B64Nj5uU.js} +1 -1
  4. package/assets/{index-B-AFa3n1.js → index-B872BsjL.js} +1 -1
  5. package/assets/{index-w1SriKuR.js → index-BIrUv1JE.js} +1 -1
  6. package/assets/index-Bk-pRt65.js +27 -0
  7. package/assets/{index-8h59dJlj.js → index-BvpN2hYX.js} +1 -1
  8. package/assets/{index-BdNcL3V6.js → index-BxR_BLxA.js} +1 -1
  9. package/assets/index-CkVpaVb6.js +1 -0
  10. package/assets/{index-DoUk2Ei_.js → index-D3Z0MZbL.js} +4 -4
  11. package/assets/{index-C6WKbL3A.js → index-DaM9Fbys.js} +3 -3
  12. package/assets/{index-CVis9Agw.js → index-SbYeytsI.js} +1 -1
  13. package/assets/index-hDlFWjNU.js +1969 -0
  14. package/assets/{index-CtPe9ln8.js → index-sWqCalkt.js} +152 -181
  15. package/assets/{plus-CnVxGdOo.js → plus-DDbDO7lA.js} +1 -1
  16. package/assets/search-BoBdGjgo.js +6 -0
  17. package/assets/style-DwfpZJI9.js +196 -0
  18. package/assets/style4.css +1 -1
  19. package/assets/{triangle-alert-BycMPaz2.js → triangle-alert-DF53kXdm.js} +1 -1
  20. package/assets/{x-CmbLQ9dc.js → x-DfdS1_QC.js} +1 -1
  21. package/assistantConfig.js +152 -1
  22. package/chat.d.ts +11 -1
  23. package/chat.js +1 -196
  24. package/chatCompare.js +1 -1
  25. package/database.js +1 -1
  26. package/databaseId.d.ts +1 -0
  27. package/databaseId.js +1 -1
  28. package/databaseTable.js +2 -2
  29. package/index.d.ts +301 -0
  30. package/index.js +1 -1
  31. package/modelManage.d.ts +124 -0
  32. package/modelManage.js +1 -1
  33. package/package.json +1 -1
  34. package/sensitive.d.ts +134 -2
  35. package/sensitive.js +205 -1
  36. package/streamFilesReader.js +1 -1
  37. package/assets/index-BN3yu4iN.js +0 -1
  38. package/assets/index-C9ax6WsW.js +0 -1995
  39. package/assets/index-pbEQPM5Z.js +0 -157
package/sensitive.d.ts CHANGED
@@ -1,20 +1,152 @@
1
1
  import { CustomComponents } from '@mxmweb/xviewer';
2
2
  import { default as default_2 } from 'react';
3
+ import { Styles } from '@mxmweb/zui';
4
+
5
+ export declare function getSensitiveMessages(locale: SensitiveLocale): SensitiveMessages;
6
+
7
+ /** 简单插值:将 messages.xxx 中的 {{key}} 替换为 values[key] */
8
+ export declare function interpolate(template: string, values: Record<string, string | number>): string;
9
+
10
+ export declare const SensitiveI18nContext: default_2.Context<SensitiveI18nValue>;
11
+
12
+ export declare function SensitiveI18nProvider({ locale, messages: messagesOverride, children, }: {
13
+ locale: SensitiveLocale;
14
+ messages?: Partial<SensitiveMessages>;
15
+ children: default_2.ReactNode;
16
+ }): default_2.FunctionComponentElement<default_2.ProviderProps<SensitiveI18nValue>>;
17
+
18
+ declare interface SensitiveI18nValue {
19
+ locale: SensitiveLocale;
20
+ messages: SensitiveMessages;
21
+ /** 供 server 等非组件处使用:getMessage('server.requestError') 或 getMessage('requestError') 返回对应文案 */
22
+ getMessage: (key: string) => string;
23
+ }
24
+
25
+ /**
26
+ * 敏感词模块 i18n 文案(列表、编辑、弹窗、server 兜底等)
27
+ * 与 chat 一致:zh / en / ja
28
+ */
29
+ export declare type SensitiveLocale = 'zh' | 'en' | 'ja';
30
+
31
+ export declare interface SensitiveMessages {
32
+ toolbar: {
33
+ searchPlaceholder: string;
34
+ };
35
+ tagCell: {
36
+ viewAllTitle: string;
37
+ viewAllLink: string;
38
+ };
39
+ table: {
40
+ label: string;
41
+ viewLabel: string;
42
+ columns: {
43
+ name: string;
44
+ sensitiveWords: string;
45
+ createDate: string;
46
+ count: string;
47
+ actions: string;
48
+ };
49
+ toolbar: {
50
+ create: string;
51
+ searchPlaceholder: string;
52
+ };
53
+ actionEdit: string;
54
+ actionDelete: string;
55
+ };
56
+ dashboard: {
57
+ title: string;
58
+ };
59
+ deleteConfirm: {
60
+ title: string;
61
+ content: string;
62
+ okText: string;
63
+ cancelText: string;
64
+ };
65
+ createModal: {
66
+ title: string;
67
+ cancel: string;
68
+ confirm: string;
69
+ nameRequired: string;
70
+ namePlaceholder: string;
71
+ };
72
+ message: {
73
+ saveSuccess: string;
74
+ createSuccess: string;
75
+ deleteSuccess: string;
76
+ downloadTemplateFail: string;
77
+ importSuccess: string;
78
+ importFail: string;
79
+ };
80
+ downloadTemplateFilename: string;
81
+ editor: {
82
+ maxLengthHint: string;
83
+ maxLengthWarning: string;
84
+ duplicateWarning: string;
85
+ configTemplateHint: string;
86
+ selectFileWarning: string;
87
+ importFailRetry: string;
88
+ importCountSuccess: string;
89
+ parseFail: string;
90
+ readFileFail: string;
91
+ searchPlaceholder: string;
92
+ inputPlaceholder: string;
93
+ add: string;
94
+ import: string;
95
+ cancel: string;
96
+ save: string;
97
+ confirm: string;
98
+ downloadTemplate: string;
99
+ uploadModalTitle: string;
100
+ uploadModalHint: string;
101
+ uploadDragText: string;
102
+ uploadDragHint: string;
103
+ formatCsv: string;
104
+ formatTxt: string;
105
+ };
106
+ server: {
107
+ requestError: string;
108
+ noPermission: string;
109
+ };
110
+ }
111
+
112
+ /** 敏感词模块业务 Server 约定接口(推荐由外部注入以便复用、mock) */
113
+ declare interface SensitiveServer {
114
+ getLibraryList: (params: any) => Promise<any>;
115
+ createLibrary: (params: any) => Promise<any>;
116
+ deleteLibrary: (id: any) => Promise<any>;
117
+ /** 更新敏感词库(如 name、words) */
118
+ updateLibrary: (id: string, params: {
119
+ name?: string;
120
+ words?: string[];
121
+ }) => Promise<any>;
122
+ /** 下载导入模板(GET,带 token),返回 Blob 用于前端触发下载 */
123
+ downloadTemplate: (fileType: 'csv' | 'txt') => Promise<Blob | false>;
124
+ /** 导入敏感词文件:PUT FormData(file),路径 /sensitive/word/:id/import */
125
+ importWords: (libraryId: string, file: File) => Promise<any>;
126
+ }
3
127
 
4
128
  /**
5
129
  * 敏感词配置业务层组件
6
- * 使用 DynamicDashDataCore table 功能实现敏感词库管理
7
- * @param props 组件属性
130
+ * 使用 Xviwer(DynamicTable) 实现敏感词库列表与工具栏,通过 eventEmit 向外抛事件(事件名:sensitive_ 前缀 + 行为)。
131
+ * - 网络层:推荐通过 server 注入,兼容 url/token/role 直传。
132
+ * - 样式:支持 styles 全局主题,与默认主题合并后下发给 DashboardContainer、Xviwer。
133
+ * - i18n:通过 locale / messages 支持中英日,默认 zh。
8
134
  */
9
135
  declare const SensitiveView: default_2.FC<{
136
+ server?: SensitiveServer;
10
137
  url?: string;
11
138
  token?: string;
12
139
  role?: string;
140
+ styles?: Styles;
13
141
  CustomComponents?: CustomComponents;
14
142
  eventsEmit?: (eventName: string, data: any) => void;
143
+ locale?: SensitiveLocale;
144
+ messages?: Partial<SensitiveMessages>;
15
145
  }>;
16
146
  export default SensitiveView;
17
147
 
148
+ export declare function useSensitiveI18n(): SensitiveI18nValue;
149
+
18
150
  export { }
19
151
 
20
152
 
package/sensitive.js CHANGED
@@ -1 +1,205 @@
1
- import{jsx as c,jsxs as A}from"react/jsx-runtime";import{useState as E,useRef as z,useEffect as N,useMemo as _}from"react";import{O as P}from"./assets/index-w1SriKuR.js";import{N as T,J as L}from"./assets/index-CtPe9ln8.js";import{a as O,b as h,I as W}from"./assets/index-8h59dJlj.js";import{s as F,M as I}from"./assets/index-DoUk2Ei_.js";/* empty css */import{P as j}from"./assets/plus-CnVxGdOo.js";import"react-dom";const q=["10014"],U=({url:D,token:B,role:m})=>{const i=O.create({baseURL:D,timeout:1e6});return i.interceptors.request.use(e=>{let t=B;if(!t&&!["user/login","user/kaptcha","user/regist"].some(a=>e.url.includes(a))){window.location.pathname="/login";return}return e.headers.Authorization=t||"",e.headers.userName=m==="\u672A\u767B\u5F55\u7528\u6237"?"":m,e}),i.interceptors.response.use(e=>{const t=["user/kaptcha"],u=e.data;if(t.some(d=>e.config.url&&e.config.url.includes(d))||u.size&&u.type)return u;const{success:a,errorMsg:r,errorCode:o}=u;return q.includes(o)||a?u:(F.error(r||"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),!1)},e=>{var t,u,a,r,o,d,y,f,g,C;e.message!=="canceled"&&((((u=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:u.errorCode)==="30013"||((r=(a=e==null?void 0:e.response)==null?void 0:a.data)==null?void 0:r.errorCode)==="30023")&&F.error((((o=e==null?void 0:e.response)==null?void 0:o.data)||{}).errorMsg||"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),((d=e==null?void 0:e.response)==null?void 0:d.status)===401&&(console.log("Error url:",(y=e==null?void 0:e.request)==null?void 0:y.responseURL),F.error((((f=e==null?void 0:e.response)==null?void 0:f.data)||{}).errorMsg||"\u6CA1\u6709\u8DB3\u591F\u6743\u9650")),console.log("Error occurs",e),(((g=e==null?void 0:e.response)==null?void 0:g.data)||{}).errorMsg!="\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF01"&&F.error((((C=e==null?void 0:e.response)==null?void 0:C.data)||{}).errorMsg||"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"))}),{getLibraryList:async e=>{try{const t=await i.get(`/library?${new URLSearchParams(e).toString()}`),{success:u,data:a}=t;return u?a:!1}catch(t){return console.log("e",t),!1}},createLibrary:async e=>{try{const t=await i.post("/library",e),{success:u,data:a}=t;return u?a:!1}catch(t){return console.log("e",t),!1}},deleteLibrary:async e=>{try{const t=await i.delete(`/library/${e}`),{success:u,data:a}=t;return u?a:!1}catch(t){return console.log("e",t),!1}}}},{confirm:$}=I,V={pageNo:1,pageSize:999},ee=({url:D,token:B,role:m,eventsEmit:i,CustomComponents:v})=>{const[w,b]=E({container:"ready",content:"ready"}),e=z(null),[t,u]=E(),[a]=h.useForm(),[r,o]=E(!1),{getLibraryList:d,deleteLibrary:y,createLibrary:f}=U({url:D,token:B,role:m});N(()=>{b(s=>({...s,content:"loading"})),g()},[]);const g=async()=>{try{const s=await d({...V});if(s){const n=C(s.records);u(n||[]),b(l=>({...l,content:"ready"}))}}catch(s){console.log("[DatabaseApiError] getSensitiveList:",s)}},C=s=>(s||[]).map(n=>({id:n.id,data:[{columnId:"name",value:n.name,type:"label"},{columnId:"sensitiveWords",value:n.words,type:"tag"},{columnId:"createDate",value:n.gmtCreate,type:"date"},{columnId:"count",value:n.count,type:"text"},{columnId:"actions",value:"edit",label:"\u7F16\u8F91",type:"action"},{columnId:"actions",value:"delete",label:"\u5220\u9664",type:"action"}]})),x=_(()=>({label:"\u654F\u611F\u8BCD\u914D\u7F6E",model:null,defaultActiveId:"sensitive-table",views:[{id:"sensitive-table",label:"\u654F\u611F\u8BCD\u5E93\u5217\u8868",type:"table",viewBehavior:"pagination",allowMultiSelect:!1,viewPageSize:10,columns:[{title:"\u540D\u79F0",id:"name",type:"label"},{title:"\u654F\u611F\u8BCD",id:"sensitiveWords",type:"tag"},{title:"\u521B\u5EFA\u65E5\u671F",id:"createDate",type:"date"},{title:"\u6570\u91CF",id:"count",type:"text"},{title:"\u64CD\u4F5C",id:"actions",type:"action"}],toolbar:[{type:"button",key:"create",label:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",btnType:"primary",icon:c(j,{size:16})},{type:"fuzzy_search",key:"search",label:"\u8BF7\u8F93\u5165\u5185\u5BB9",searchKeys:["name","sensitiveWords"],position:"right"}]}]}),[t]),S=async()=>{var s,n;try{const l=await a.validateFields();if(l){console.log("===val",l);const p=await f({...l,words:[]});if(p&&(e!=null&&e.current)){const M={id:p,data:[{columnId:"name",value:l.name,type:"label"},{columnId:"sensitiveWords",value:[],type:"tag"},{columnId:"createDate",value:new Date().toLocaleString("zh-CN",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"),type:"date"},{columnId:"count",value:0,type:"text"},{columnId:"actions",value:"edit",label:"\u7F16\u8F91",type:"action"},{columnId:"actions",value:"delete",label:"\u5220\u9664",type:"action"}]};(n=(s=e==null?void 0:e.current)==null?void 0:s.appFn)==null||n.addItem(M,{animate:!0,position:"start"}),F.success("\u65B0\u589E\u654F\u611F\u8BCD\u6210\u529F!")}}}catch{console.error("\u65B0\u589E\u654F\u611F\u8BCD\u5931\u8D25!")}finally{o(!1),a.resetFields()}};async function k(s,n,l){switch(console.log("[SensitiveView] \u4E8B\u4EF6\u89E6\u53D1:",s,n),s){case"toolbar_create":o(!0);break;case"table_action_delete":{try{$({title:"\u786E\u8BA4\u5220\u9664\u654F\u611F\u8BCD\u5E93\uFF1F",content:"\u5220\u9664\u540E\uFF0C\u8BE5\u654F\u611F\u8BCD\u5E93\u5C06\u65E0\u6CD5\u6062\u590D",okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",async onOk(){await y(n.id)&&(e!=null&&e.current)&&(console.log("=====",e==null?void 0:e.current.appFn),e==null||e.current.appFn.removeItem(n.id),F.success("\u5220\u9664\u6210\u529F"))},onCancel(){console.log("Cancel")}})}catch(p){console.error("\u5220\u9664\u654F\u611F\u8BCD\u5E93\u5931\u8D25",p)}break}default:typeof i=="function"&&i(s,n);break}}return A(T,{title:"\u654F\u611F\u8BCD\u5E93\u7BA1\u7406",children:[c(P,{dataSource:t,ref:e,eventsEmit:k,status:w,CustomComponents:{...v},...x}),c(I,{title:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",open:r,width:520,destroyOnHidden:!0,onCancel:()=>{o(!1),a.resetFields()},footer:A("div",{className:"w-full flex flex-row",style:{justifyContent:"end",gap:"10px"},children:[c(L,{mode:"default",label:"\u53D6\u6D88",onClick:()=>{o(!1),a.resetFields()}}),c(L,{mode:"primary",label:"\u786E\u8BA4",onClick:S})]}),children:c(h,{form:a,children:c(h.Item,{label:null,name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u5E93\u540D\u79F0!"}],children:c(W,{placeholder:"\u8BF7\u8F93\u5165"})})})})]})};export{ee as default};
1
+ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c from"react";import we,{useRef as je,useEffect as ot,Component as At,useState as me,useCallback as pe,useMemo as _e}from"react";import{c as Bt,W as ir,aB as sr,a9 as Ee,X as tt,O as It,_ as ge,e as Q,aQ as rt,T as kt,g as Pt,m as Lt,r as Ot,x as de,w as nt,aR as lr,n as We,aC as Tt,av as cr,ay as ur,aw as dr,aS as pr,I as Le,V as mr,aT as be,aU as oe,G as fe,aV as Nt,aW as Mt,aX as _t,Y as J,aY as ae,aZ as jt,U as fr,aJ as Rt,a_ as zt,a$ as gr,b0 as gt,b1 as hr,b2 as vr,z as Ut,b3 as br,b4 as Fr,ap as Cr,s as ht,N as vt,at as bt,u as yr,b5 as wr,p as $r,aj as xr,aN as Sr,A as Er,d as le,i as it,M as st,F as Ke,h as Dr}from"./assets/index-BvpN2hYX.js";import{O as Ar}from"./assets/index-BIrUv1JE.js";import{J as ve,U as Br,$ as Ir}from"./assets/index-sWqCalkt.js";import{s as te,M as lt}from"./assets/index-D3Z0MZbL.js";import{flushSync as Ft}from"react-dom";import{S as Wt}from"./assets/search-BoBdGjgo.js";import{P as Ht}from"./assets/plus-DDbDO7lA.js";import{X as kr}from"./assets/x-DfdS1_QC.js";import{D as Pr}from"./assets/index-Bk-pRt65.js";/* empty css */import"./assets/LeftOutlined-9XTSYGbi.js";import"./assets/index-SbYeytsI.js";/**
2
+ * @license lucide-react v0.456.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Lr=Bt("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/**
7
+ * @license lucide-react v0.456.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Ct=Bt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Or={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Tr=function(){var t=je([]),n=je(null);return ot(function(){var a=Date.now(),o=!1;t.current.forEach(function(r){if(r){o=!0;var s=r.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&a-n.current<100&&(s.transitionDuration="0s, 0s")}}),o&&(n.current=Date.now())}),t.current},yt=0,Nr=sr();function Mr(){var e;return Nr?(e=yt,yt+=1):e="TEST_OR_SSR",e}const _r=(function(e){var t=c.useState(),n=ir(t,2),a=n[0],o=n[1];return c.useEffect(function(){o("rc_progress_".concat(Mr()))},[]),e||a});var wt=function(t){var n=t.bg,a=t.children;return c.createElement("div",{style:{width:"100%",height:"100%",background:n}},a)};function $t(e,t){return Object.keys(e).map(function(n){var a=parseFloat(n),o="".concat(Math.floor(a*t),"%");return"".concat(e[n]," ").concat(o)})}var jr=c.forwardRef(function(e,t){var n=e.prefixCls,a=e.color,o=e.gradientId,r=e.radius,s=e.style,i=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,m=e.size,f=e.gapDegree,l=a&&Ee(a)==="object",p=l?"#FFF":void 0,h=m/2,b=c.createElement("circle",{className:"".concat(n,"-circle-path"),r,cx:h,cy:h,stroke:p,strokeLinecap:u,strokeWidth:d,opacity:i===0?0:1,style:s,ref:t});if(!l)return b;var C="".concat(o,"-conic"),y=f?"".concat(180+f/2,"deg"):"0deg",w=$t(a,(360-f)/360),S=$t(a,1),$="conic-gradient(from ".concat(y,", ").concat(w.join(", "),")"),g="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(S.join(", "),")");return c.createElement(c.Fragment,null,c.createElement("mask",{id:C},b),c.createElement("foreignObject",{x:0,y:0,width:m,height:m,mask:"url(#".concat(C,")")},c.createElement(wt,{bg:g},c.createElement(wt,{bg:$}))))}),Ie=100,Je=function(t,n,a,o,r,s,i,u,d,m){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,l=a/100*360*((360-s)/360),p=s===0?0:{bottom:0,top:180,left:90,right:-90}[i],h=(100-o)/100*n;d==="round"&&o!==100&&(h+=m/2,h>=n&&(h=n-.01));var b=Ie/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:h+f,transform:"rotate(".concat(r+l+p,"deg)"),transformOrigin:"".concat(b,"px ").concat(b,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Rr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function xt(e){var t=e??[];return Array.isArray(t)?t:[t]}var zr=function(t){var n=tt(tt({},Or),t),a=n.id,o=n.prefixCls,r=n.steps,s=n.strokeWidth,i=n.trailWidth,u=n.gapDegree,d=u===void 0?0:u,m=n.gapPosition,f=n.trailColor,l=n.strokeLinecap,p=n.style,h=n.className,b=n.strokeColor,C=n.percent,y=It(n,Rr),w=Ie/2,S=_r(a),$="".concat(S,"-gradient"),g=w-s/2,A=Math.PI*2*g,B=d>0?90+d/2:-90,O=A*((360-d)/360),R=Ee(r)==="object"?r:{count:r,gap:2},D=R.count,re=R.gap,ne=xt(C),G=xt(b),H=G.find(function(z){return z&&Ee(z)==="object"}),U=H&&Ee(H)==="object",ee=U?"butt":l,M=Je(A,O,0,100,B,d,m,f,ee,s),K=Tr(),F=function(){var q=0;return ne.map(function(x,P){var E=G[P]||G[G.length-1],v=Je(A,O,q,x,B,d,m,E,ee,s);return q+=x,c.createElement(jr,{key:P,color:E,ptg:x,radius:g,prefixCls:o,gradientId:$,style:v,strokeLinecap:ee,strokeWidth:s,gapDegree:d,ref:function(L){K[P]=L},size:Ie})}).reverse()},N=function(){var q=Math.round(D*(ne[0]/100)),x=100/D,P=0;return new Array(D).fill(null).map(function(E,v){var _=v<=q-1?G[0]:f,L=_&&Ee(_)==="object"?"url(#".concat($,")"):void 0,X=Je(A,O,P,x,B,d,m,_,"butt",s,re);return P+=(O-X.strokeDashoffset+re)*100/O,c.createElement("circle",{key:v,className:"".concat(o,"-circle-path"),r:g,cx:w,cy:w,stroke:L,strokeWidth:s,opacity:1,style:X,ref:function(ue){K[v]=ue}})})};return c.createElement("svg",ge({className:Q("".concat(o,"-circle"),h),viewBox:"0 0 ".concat(Ie," ").concat(Ie),style:p,id:a,role:"presentation"},y),!D&&c.createElement("circle",{className:"".concat(o,"-circle-trail"),r:g,cx:w,cy:w,stroke:f,strokeLinecap:ee,strokeWidth:i||s,style:M}),D?N():F())};function Fe(e){return!e||e<0?0:e>100?100:e}function Re({success:e,successPercent:t}){let n=t;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}const Ur=({percent:e,success:t,successPercent:n})=>{const a=Fe(Re({success:t,successPercent:n}));return[a,Fe(Fe(e)-a)]},Wr=({success:e={},strokeColor:t})=>{const{strokeColor:n}=e;return[n||rt.green,t||null]},He=(e,t,n)=>{var a,o,r,s;let i=-1,u=-1;if(t==="step"){const d=n.steps,m=n.strokeWidth;typeof e=="string"||typeof e>"u"?(i=e==="small"?2:14,u=m??8):typeof e=="number"?[i,u]=[e,e]:[i=14,u=8]=Array.isArray(e)?e:[e.width,e.height],i*=d}else if(t==="line"){const d=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[i,u]=[e,e]:[i=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[i,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[i,u]=[e,e]:Array.isArray(e)&&(i=(o=(a=e[0])!==null&&a!==void 0?a:e[1])!==null&&o!==void 0?o:120,u=(s=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&s!==void 0?s:120));return[i,u]},Hr=3,qr=e=>Hr/e*100,Xr=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:a="round",gapPosition:o,gapDegree:r,width:s=120,type:i,children:u,success:d,size:m=s,steps:f}=e,[l,p]=He(m,"circle");let{strokeWidth:h}=e;h===void 0&&(h=Math.max(qr(l),6));const b={width:l,height:p,fontSize:l*.15+6},C=c.useMemo(()=>{if(r||r===0)return r;if(i==="dashboard")return 75},[r,i]),y=Ur(e),w=o||i==="dashboard"&&"bottom"||void 0,S=Object.prototype.toString.call(e.strokeColor)==="[object Object]",$=Wr({success:d,strokeColor:e.strokeColor}),g=Q(`${t}-inner`,{[`${t}-circle-gradient`]:S}),A=c.createElement(zr,{steps:f,percent:f?y[1]:y,strokeWidth:h,trailWidth:h,strokeColor:f?$[1]:$,strokeLinecap:a,trailColor:n,prefixCls:t,gapDegree:C,gapPosition:w}),B=l<=20,O=c.createElement("div",{className:g,style:b},A,!B&&u);return B?c.createElement(kt,{title:u},O):O},ze="--progress-line-stroke-color",qt="--progress-percent",St=e=>{const t=e?"100%":"-100%";return new nt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Vr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},Ot(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${ze})`]},height:"100%",width:`calc(1 / var(${qt}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${de(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:St(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:St(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Gr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Kr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Jr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Yr=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),Zr=Pt("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=Lt(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Vr(n),Gr(n),Kr(n),Jr(n)]},Yr);var Qr=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const en=e=>{let t=[];return Object.keys(e).forEach(n=>{const a=Number.parseFloat(n.replace(/%/g,""));Number.isNaN(a)||t.push({key:a,value:e[n]})}),t=t.sort((n,a)=>n.key-a.key),t.map(({key:n,value:a})=>`${a} ${n}%`).join(", ")},tn=(e,t)=>{const{from:n=rt.blue,to:a=rt.blue,direction:o=t==="rtl"?"to left":"to right"}=e,r=Qr(e,["from","to","direction"]);if(Object.keys(r).length!==0){const i=en(r),u=`linear-gradient(${o}, ${i})`;return{background:u,[ze]:u}}const s=`linear-gradient(${o}, ${n}, ${a})`;return{background:s,[ze]:s}},rn=e=>{const{prefixCls:t,direction:n,percent:a,size:o,strokeWidth:r,strokeColor:s,strokeLinecap:i="round",children:u,trailColor:d=null,percentPosition:m,success:f}=e,{align:l,type:p}=m,h=s&&typeof s!="string"?tn(s,n):{[ze]:s,background:s},b=i==="square"||i==="butt"?0:void 0,C=o??[-1,r||(o==="small"?6:8)],[y,w]=He(C,"line",{strokeWidth:r}),S={backgroundColor:d||void 0,borderRadius:b},$=Object.assign(Object.assign({width:`${Fe(a)}%`,height:w,borderRadius:b},h),{[qt]:Fe(a)/100}),g=Re(e),A={width:`${Fe(g)}%`,height:w,borderRadius:b,backgroundColor:f==null?void 0:f.strokeColor},B={width:y<0?"100%":y},O=c.createElement("div",{className:`${t}-inner`,style:S},c.createElement("div",{className:Q(`${t}-bg`,`${t}-bg-${p}`),style:$},p==="inner"&&u),g!==void 0&&c.createElement("div",{className:`${t}-success-bg`,style:A})),R=p==="outer"&&l==="start",D=p==="outer"&&l==="end";return p==="outer"&&l==="center"?c.createElement("div",{className:`${t}-layout-bottom`},O,u):c.createElement("div",{className:`${t}-outer`,style:B},R&&u,O,D&&u)},nn=e=>{const{size:t,steps:n,rounding:a=Math.round,percent:o=0,strokeWidth:r=8,strokeColor:s,trailColor:i=null,prefixCls:u,children:d}=e,m=a(n*(o/100)),l=t??[t==="small"?2:14,r],[p,h]=He(l,"step",{steps:n,strokeWidth:r}),b=p/n,C=Array.from({length:n});for(let y=0;y<n;y++){const w=Array.isArray(s)?s[y]:s;C[y]=c.createElement("div",{key:y,className:Q(`${u}-steps-item`,{[`${u}-steps-item-active`]:y<=m-1}),style:{backgroundColor:y<=m-1?w:i,width:b,height:h}})}return c.createElement("div",{className:`${u}-steps-outer`},C,d)};var an=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const on=["normal","exception","active","success"],sn=c.forwardRef((e,t)=>{const{prefixCls:n,className:a,rootClassName:o,steps:r,strokeColor:s,percent:i=0,size:u="default",showInfo:d=!0,type:m="line",status:f,format:l,style:p,percentPosition:h={}}=e,b=an(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:C="end",type:y="outer"}=h,w=Array.isArray(s)?s[0]:s,S=typeof s=="string"||Array.isArray(s)?s:void 0,$=c.useMemo(()=>{if(w){const F=typeof w=="string"?w:Object.values(w)[0];return new lr(F).isLight()}return!1},[s]),g=c.useMemo(()=>{var F,N;const z=Re(e);return Number.parseInt(z!==void 0?(F=z??0)===null||F===void 0?void 0:F.toString():(N=i??0)===null||N===void 0?void 0:N.toString(),10)},[i,e.success,e.successPercent]),A=c.useMemo(()=>!on.includes(f)&&g>=100?"success":f||"normal",[f,g]),{getPrefixCls:B,direction:O,progress:R}=c.useContext(We),D=B("progress",n),[re,ne,G]=Zr(D),H=m==="line",U=H&&!r,ee=c.useMemo(()=>{if(!d)return null;const F=Re(e);let N;const z=l||(x=>`${x}%`),q=H&&$&&y==="inner";return y==="inner"||l||A!=="exception"&&A!=="success"?N=z(Fe(i),Fe(F)):A==="exception"?N=H?c.createElement(cr,null):c.createElement(ur,null):A==="success"&&(N=H?c.createElement(dr,null):c.createElement(pr,null)),c.createElement("span",{className:Q(`${D}-text`,{[`${D}-text-bright`]:q,[`${D}-text-${C}`]:U,[`${D}-text-${y}`]:U}),title:typeof N=="string"?N:void 0},N)},[d,i,g,A,m,D,l]);let M;m==="line"?M=r?c.createElement(nn,Object.assign({},e,{strokeColor:S,prefixCls:D,steps:typeof r=="object"?r.count:r}),ee):c.createElement(rn,Object.assign({},e,{strokeColor:w,prefixCls:D,direction:O,percentPosition:{align:C,type:y}}),ee):(m==="circle"||m==="dashboard")&&(M=c.createElement(Xr,Object.assign({},e,{strokeColor:w,prefixCls:D,progressStatus:A}),ee));const K=Q(D,`${D}-status-${A}`,{[`${D}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${D}-inline-circle`]:m==="circle"&&He(u,"circle")[0]<=20,[`${D}-line`]:U,[`${D}-line-align-${C}`]:U,[`${D}-line-position-${y}`]:U,[`${D}-steps`]:r,[`${D}-show-info`]:d,[`${D}-${u}`]:typeof u=="string",[`${D}-rtl`]:O==="rtl"},R==null?void 0:R.className,a,o,ne,G);return re(c.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},R==null?void 0:R.style),p),className:K,role:"progressbar","aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100},Tt(b,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),M))});var ln={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},cn=function(t,n){return c.createElement(Le,ge({},t,{ref:n,icon:ln}))},un=c.forwardRef(cn);const Ye=(function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),a=e.name||"",o=e.type||"",r=o.replace(/\/.*$/,"");return n.some(function(s){var i=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(i.charAt(0)==="."){var u=a.toLowerCase(),d=i.toLowerCase(),m=[d];return(d===".jpg"||d===".jpeg")&&(m=[".jpg",".jpeg"]),m.some(function(f){return u.endsWith(f)})}return/\/\*$/.test(i)?r===i.replace(/\/.*$/,""):o===i?!0:/^\w+$/.test(i)?(mr(!1,"Upload takes an invalidate 'accept' type '".concat(i,"'.Skip for check.")),!0):!1})}return!0});function dn(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),a=new Error(n);return a.status=t.status,a.method=e.method,a.url=e.action,a}function Et(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Dt(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(r){r.total>0&&(r.percent=r.loaded/r.total*100),e.onProgress(r)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(o){var r=e.data[o];if(Array.isArray(r)){r.forEach(function(s){n.append("".concat(o,"[]"),s)});return}n.append(o,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(r){e.onError(r)},t.onload=function(){return t.status<200||t.status>=300?e.onError(dn(e,t),Et(t)):e.onSuccess(Et(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var a=e.headers||{};return a["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(a).forEach(function(o){a[o]!==null&&t.setRequestHeader(o,a[o])}),t.send(n),{abort:function(){t.abort()}}}var pn=(function(){var e=be(oe().mark(function t(n,a){var o,r,s,i,u,d,m,f;return oe().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:d=function(){return d=be(oe().mark(function b(C){return oe().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.abrupt("return",new Promise(function(S){C.file(function($){a($)?(C.fullPath&&!$.webkitRelativePath&&(Object.defineProperties($,{webkitRelativePath:{writable:!0}}),$.webkitRelativePath=C.fullPath.replace(/^\//,""),Object.defineProperties($,{webkitRelativePath:{writable:!1}})),S($)):S(null)})}));case 1:case"end":return w.stop()}},b)})),d.apply(this,arguments)},u=function(b){return d.apply(this,arguments)},i=function(){return i=be(oe().mark(function b(C){var y,w,S,$,g;return oe().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:y=C.createReader(),w=[];case 2:return B.next=5,new Promise(function(O){y.readEntries(O,function(){return O([])})});case 5:if(S=B.sent,$=S.length,$){B.next=9;break}return B.abrupt("break",12);case 9:for(g=0;g<$;g++)w.push(S[g]);B.next=2;break;case 12:return B.abrupt("return",w);case 13:case"end":return B.stop()}},b)})),i.apply(this,arguments)},s=function(b){return i.apply(this,arguments)},o=[],r=[],n.forEach(function(h){return r.push(h.webkitGetAsEntry())}),m=(function(){var h=be(oe().mark(function b(C,y){var w,S;return oe().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(C){g.next=2;break}return g.abrupt("return");case 2:if(C.path=y||"",!C.isFile){g.next=10;break}return g.next=6,u(C);case 6:w=g.sent,w&&o.push(w),g.next=15;break;case 10:if(!C.isDirectory){g.next=15;break}return g.next=13,s(C);case 13:S=g.sent,r.push.apply(r,fe(S));case 15:case"end":return g.stop()}},b)}));return function(C,y){return h.apply(this,arguments)}})(),f=0;case 9:if(!(f<r.length)){p.next=15;break}return p.next=12,m(r[f]);case 12:f++,p.next=9;break;case 15:return p.abrupt("return",o);case 16:case"end":return p.stop()}},t)}));return function(n,a){return e.apply(this,arguments)}})(),mn=+new Date,fn=0;function Ze(){return"rc-upload-".concat(mn,"-").concat(++fn)}var gn=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","folder","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],hn=(function(e){Nt(n,e);var t=Mt(n);function n(){var a;_t(this,n);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return a=t.call.apply(t,[this].concat(r)),J(ae(a),"state",{uid:Ze()}),J(ae(a),"reqs",{}),J(ae(a),"fileInput",void 0),J(ae(a),"_isMounted",void 0),J(ae(a),"onChange",function(i){var u=a.props,d=u.accept,m=u.directory,f=i.target.files,l=fe(f).filter(function(p){return!m||Ye(p,d)});a.uploadFiles(l),a.reset()}),J(ae(a),"onClick",function(i){var u=a.fileInput;if(u){var d=i.target,m=a.props.onClick;if(d&&d.tagName==="BUTTON"){var f=u.parentNode;f.focus(),d.blur()}u.click(),m&&m(i)}}),J(ae(a),"onKeyDown",function(i){i.key==="Enter"&&a.onClick(i)}),J(ae(a),"onDataTransferFiles",(function(){var i=be(oe().mark(function u(d,m){var f,l,p,h,b,C,y;return oe().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(f=a.props,l=f.multiple,p=f.accept,h=f.directory,b=fe(d.items||[]),C=fe(d.files||[]),(C.length>0||b.some(function($){return $.kind==="file"}))&&(m==null||m()),!h){S.next=11;break}return S.next=7,pn(Array.prototype.slice.call(b),function($){return Ye($,a.props.accept)});case 7:C=S.sent,a.uploadFiles(C),S.next=14;break;case 11:y=fe(C).filter(function($){return Ye($,p)}),l===!1&&(y=C.slice(0,1)),a.uploadFiles(y);case 14:case"end":return S.stop()}},u)}));return function(u,d){return i.apply(this,arguments)}})()),J(ae(a),"onFilePaste",(function(){var i=be(oe().mark(function u(d){var m,f;return oe().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(m=a.props.pastable,m){p.next=3;break}return p.abrupt("return");case 3:if(d.type!=="paste"){p.next=6;break}return f=d.clipboardData,p.abrupt("return",a.onDataTransferFiles(f,function(){d.preventDefault()}));case 6:case"end":return p.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),J(ae(a),"onFileDragOver",function(i){i.preventDefault()}),J(ae(a),"onFileDrop",(function(){var i=be(oe().mark(function u(d){var m;return oe().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(d.preventDefault(),d.type!=="drop"){l.next=4;break}return m=d.dataTransfer,l.abrupt("return",a.onDataTransferFiles(m));case 4:case"end":return l.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),J(ae(a),"uploadFiles",function(i){var u=fe(i),d=u.map(function(m){return m.uid=Ze(),a.processFile(m,u)});Promise.all(d).then(function(m){var f=a.props.onBatchStart;f==null||f(m.map(function(l){var p=l.origin,h=l.parsedFile;return{file:p,parsedFile:h}})),m.filter(function(l){return l.parsedFile!==null}).forEach(function(l){a.post(l)})})}),J(ae(a),"processFile",(function(){var i=be(oe().mark(function u(d,m){var f,l,p,h,b,C,y,w,S;return oe().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(f=a.props.beforeUpload,l=d,!f){g.next=14;break}return g.prev=3,g.next=6,f(d,m);case 6:l=g.sent,g.next=12;break;case 9:g.prev=9,g.t0=g.catch(3),l=!1;case 12:if(l!==!1){g.next=14;break}return g.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(p=a.props.action,typeof p!="function"){g.next=21;break}return g.next=18,p(d);case 18:h=g.sent,g.next=22;break;case 21:h=p;case 22:if(b=a.props.data,typeof b!="function"){g.next=29;break}return g.next=26,b(d);case 26:C=g.sent,g.next=30;break;case 29:C=b;case 30:return y=(Ee(l)==="object"||typeof l=="string")&&l?l:d,y instanceof File?w=y:w=new File([y],d.name,{type:d.type}),S=w,S.uid=d.uid,g.abrupt("return",{origin:d,data:C,parsedFile:S,action:h});case 35:case"end":return g.stop()}},u,null,[[3,9]])}));return function(u,d){return i.apply(this,arguments)}})()),J(ae(a),"saveFileInput",function(i){a.fileInput=i}),a}return jt(n,[{key:"componentDidMount",value:function(){this._isMounted=!0;var o=this.props.pastable;o&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(o){var r=this.props.pastable;r&&!o.pastable?document.addEventListener("paste",this.onFilePaste):!r&&o.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(o){var r=this,s=o.data,i=o.origin,u=o.action,d=o.parsedFile;if(this._isMounted){var m=this.props,f=m.onStart,l=m.customRequest,p=m.name,h=m.headers,b=m.withCredentials,C=m.method,y=i.uid,w=l||Dt,S={action:u,filename:p,data:s,file:d,headers:h,withCredentials:b,method:C||"post",onProgress:function(g){var A=r.props.onProgress;A==null||A(g,d)},onSuccess:function(g,A){var B=r.props.onSuccess;B==null||B(g,d,A),delete r.reqs[y]},onError:function(g,A){var B=r.props.onError;B==null||B(g,A,d),delete r.reqs[y]}};f(i),this.reqs[y]=w(S,{defaultRequest:Dt})}}},{key:"reset",value:function(){this.setState({uid:Ze()})}},{key:"abort",value:function(o){var r=this.reqs;if(o){var s=o.uid?o.uid:o;r[s]&&r[s].abort&&r[s].abort(),delete r[s]}else Object.keys(r).forEach(function(i){r[i]&&r[i].abort&&r[i].abort(),delete r[i]})}},{key:"render",value:function(){var o=this.props,r=o.component,s=o.prefixCls,i=o.className,u=o.classNames,d=u===void 0?{}:u,m=o.disabled,f=o.id,l=o.name,p=o.style,h=o.styles,b=h===void 0?{}:h,C=o.multiple,y=o.accept,w=o.capture,S=o.children,$=o.directory,g=o.folder,A=o.openFileDialogOnClick,B=o.onMouseEnter,O=o.onMouseLeave,R=o.hasControlInside,D=It(o,gn),re=Q(J(J(J({},s,!0),"".concat(s,"-disabled"),m),i,i)),ne=$||g?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},G=m?{}:{onClick:A?this.onClick:function(){},onKeyDown:A?this.onKeyDown:function(){},onMouseEnter:B,onMouseLeave:O,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:R?void 0:"0"};return we.createElement(r,ge({},G,{className:re,role:R?void 0:"button",style:p}),we.createElement("input",ge({},fr(D,{aria:!0,data:!0}),{id:f,name:l,disabled:m,type:"file",ref:this.saveFileInput,onClick:function(U){return U.stopPropagation()},key:this.state.uid,style:tt({display:"none"},b.input),className:d.input,accept:y},ne,{multiple:C,onChange:this.onChange},w!=null?{capture:w}:{})),S)}}]),n})(At);function Qe(){}var at=(function(e){Nt(n,e);var t=Mt(n);function n(){var a;_t(this,n);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return a=t.call.apply(t,[this].concat(r)),J(ae(a),"uploader",void 0),J(ae(a),"saveUploader",function(i){a.uploader=i}),a}return jt(n,[{key:"abort",value:function(o){this.uploader.abort(o)}},{key:"render",value:function(){return we.createElement(hn,ge({},this.props,{ref:this.saveUploader}))}}]),n})(At);J(at,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Qe,onError:Qe,onSuccess:Qe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const vn=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${de(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${de(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
12
+ &:not(${t}-disabled):hover,
13
+ &-hover:not(${t}-disabled)
14
+ `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${de(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n},
15
+ p${t}-text,
16
+ p${t}-hint
17
+ `]:{color:e.colorTextDisabled}}}}}},bn=e=>{const{componentCls:t,iconCls:n,fontSize:a,lineHeight:o,calc:r}=e,s=`${t}-list-item`,i=`${s}-actions`,u=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},Rt()),{lineHeight:e.lineHeight,[s]:{position:"relative",height:r(e.lineHeight).mul(a).equal(),marginTop:e.marginXS,fontSize:a,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:Object.assign(Object.assign({},zt),{padding:`0 ${de(e.paddingXS)}`,lineHeight:o,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[i]:{whiteSpace:"nowrap",[u]:{opacity:0},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`
18
+ ${u}:focus-visible,
19
+ &.picture ${u}
20
+ `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:a},[`${s}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:r(a).add(e.paddingXS).equal(),fontSize:a,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${s}:hover ${u}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[i]:{[`${n}, ${n}:hover`]:{color:e.colorError},[u]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Fn=e=>{const{componentCls:t}=e,n=new nt("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),a=new nt("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),o=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${o}-appear, ${o}-enter, ${o}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${o}-appear, ${o}-enter`]:{animationName:n},[`${o}-leave`]:{animationName:a}}},{[`${t}-wrapper`]:gr(e)},n,a]},Cn=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:a,uploadProgressOffset:o,calc:r}=e,s=`${t}-list`,i=`${s}-item`;return{[`${t}-wrapper`]:{[`
21
+ ${s}${s}-picture,
22
+ ${s}${s}-picture-card,
23
+ ${s}${s}-picture-circle
24
+ `]:{[i]:{position:"relative",height:r(a).add(r(e.lineWidth).mul(2)).add(r(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${de(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${i}-thumbnail`]:Object.assign(Object.assign({},zt),{width:a,height:a,lineHeight:de(r(a).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${i}-progress`]:{bottom:o,width:`calc(100% - ${de(r(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:r(a).add(e.paddingXS).equal()}},[`${i}-error`]:{borderColor:e.colorError,[`${i}-thumbnail ${n}`]:{[`svg path[fill='${gt[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${gt.primary}']`]:{fill:e.colorError}}},[`${i}-uploading`]:{borderStyle:"dashed",[`${i}-name`]:{marginBottom:o}}},[`${s}${s}-picture-circle ${i}`]:{[`&, &::before, ${i}-thumbnail`]:{borderRadius:"50%"}}}}},yn=e=>{const{componentCls:t,iconCls:n,fontSizeLG:a,colorTextLightSolid:o,calc:r}=e,s=`${t}-list`,i=`${s}-item`,u=e.uploadPicCardSize;return{[`
25
+ ${t}-wrapper${t}-picture-card-wrapper,
26
+ ${t}-wrapper${t}-picture-circle-wrapper
27
+ `]:Object.assign(Object.assign({},Rt()),{display:"block",[`${t}${t}-select`]:{width:u,height:u,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${de(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${s}${s}-picture-card, ${s}${s}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${s}-item-container`]:{display:"inline-block",width:u,height:u,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[i]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${i}:hover`]:{[`&::before, ${i}-actions`]:{opacity:1}},[`${i}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`
28
+ ${n}-eye,
29
+ ${n}-download,
30
+ ${n}-delete
31
+ `]:{zIndex:10,width:a,margin:`0 ${de(e.marginXXS)}`,fontSize:a,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},[`${i}-thumbnail, ${i}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${i}-name`]:{display:"none",textAlign:"center"},[`${i}-file + ${i}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`},[`${i}-uploading`]:{[`&${i}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${i}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},wn=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},$n=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},Ot(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},xn=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),Sn=Pt("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:a,pictureCardSize:o,calc:r}=e,s=Lt(e,{uploadThumbnailSize:r(t).mul(2).equal(),uploadProgressOffset:r(r(n).div(2)).add(a).equal(),uploadPicCardSize:o});return[$n(s),vn(s),Cn(s),yn(s),bn(s),Fn(s),wn(s),hr(s)]},xn);var En={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},Dn=function(t,n){return c.createElement(Le,ge({},t,{ref:n,icon:En}))},An=c.forwardRef(Dn),Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},In=function(t,n){return c.createElement(Le,ge({},t,{ref:n,icon:Bn}))},kn=c.forwardRef(In),Pn={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},Ln=function(t,n){return c.createElement(Le,ge({},t,{ref:n,icon:Pn}))},On=c.forwardRef(Ln);function Te(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Ne(e,t){const n=fe(t),a=n.findIndex(({uid:o})=>o===e.uid);return a===-1?n.push(e):n[a]=e,n}function et(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(a=>a[n]===e[n])[0]}function Tn(e,t){const n=e.uid!==void 0?"uid":"name",a=t.filter(o=>o[n]!==e[n]);return a.length===t.length?null:a}const Nn=(e="")=>{const t=e.split("/"),a=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(a)||[""])[0]},Xt=e=>e.indexOf("image/")===0,Mn=e=>{if(e.type&&!e.thumbUrl)return Xt(e.type);const t=e.thumbUrl||e.url||"",n=Nn(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},he=200;function _n(e){return new Promise(t=>{if(!e.type||!Xt(e.type)){t("");return}const n=document.createElement("canvas");n.width=he,n.height=he,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${he}px; height: ${he}px; z-index: 9999; display: none;`,document.body.appendChild(n);const a=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:r,height:s}=o;let i=he,u=he,d=0,m=0;r>s?(u=s*(he/r),m=-(u-i)/2):(i=r*(he/s),d=-(i-u)/2),a.drawImage(o,d,m,i,u);const f=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(f)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const r=new FileReader;r.onload=()=>{r.result&&typeof r.result=="string"&&(o.src=r.result)},r.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const r=new FileReader;r.onload=()=>{r.result&&t(r.result)},r.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var jn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Rn=function(t,n){return c.createElement(Le,ge({},t,{ref:n,icon:jn}))},zn=c.forwardRef(Rn);const Un=c.forwardRef(({prefixCls:e,className:t,style:n,locale:a,listType:o,file:r,items:s,progress:i,iconRender:u,actionIconRender:d,itemRender:m,isImgUrl:f,showPreviewIcon:l,showRemoveIcon:p,showDownloadIcon:h,previewIcon:b,removeIcon:C,downloadIcon:y,extra:w,onPreview:S,onDownload:$,onClose:g},A)=>{var B,O;const{status:R}=r,[D,re]=c.useState(R);c.useEffect(()=>{R!=="removed"&&re(R)},[R]);const[ne,G]=c.useState(!1);c.useEffect(()=>{const Y=setTimeout(()=>{G(!0)},300);return()=>{clearTimeout(Y)}},[]);const H=u(r);let U=c.createElement("div",{className:`${e}-icon`},H);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(D==="uploading"||!r.thumbUrl&&!r.url){const Y=Q(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!=="uploading"});U=c.createElement("div",{className:Y},H)}else{const Y=f!=null&&f(r)?c.createElement("img",{src:r.thumbUrl||r.url,alt:r.name,className:`${e}-list-item-image`,crossOrigin:r.crossOrigin}):H,Ae=Q(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:f&&!f(r)});U=c.createElement("a",{className:Ae,onClick:Oe=>S(r,Oe),href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Y)}const ee=Q(`${e}-list-item`,`${e}-list-item-${D}`),M=typeof r.linkProps=="string"?JSON.parse(r.linkProps):r.linkProps,K=(typeof p=="function"?p(r):p)?d((typeof C=="function"?C(r):C)||c.createElement(un,null),()=>g(r),e,a.removeFile,!0):null,F=(typeof h=="function"?h(r):h)&&D==="done"?d((typeof y=="function"?y(r):y)||c.createElement(zn,null),()=>$(r),e,a.downloadFile):null,N=o!=="picture-card"&&o!=="picture-circle"&&c.createElement("span",{key:"download-delete",className:Q(`${e}-list-item-actions`,{picture:o==="picture"})},F,K),z=typeof w=="function"?w(r):w,q=z&&c.createElement("span",{className:`${e}-list-item-extra`},z),x=Q(`${e}-list-item-name`),P=r.url?c.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:x,title:r.name},M,{href:r.url,onClick:Y=>S(r,Y)}),r.name,q):c.createElement("span",{key:"view",className:x,onClick:Y=>S(r,Y),title:r.name},r.name,q),E=(typeof l=="function"?l(r):l)&&(r.url||r.thumbUrl)?c.createElement("a",{href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Y=>S(r,Y),title:a.previewFile},typeof b=="function"?b(r):b||c.createElement(vr,null)):null,v=(o==="picture-card"||o==="picture-circle")&&D!=="uploading"&&c.createElement("span",{className:`${e}-list-item-actions`},E,D==="done"&&F,K),{getPrefixCls:_}=c.useContext(We),L=_(),X=c.createElement("div",{className:ee},U,P,N,v,ne&&c.createElement(Ut,{motionName:`${L}-fade`,visible:D==="uploading",motionDeadline:2e3},({className:Y})=>{const Ae="percent"in r?c.createElement(sn,Object.assign({type:"line",percent:r.percent,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"]},i)):null;return c.createElement("div",{className:Q(`${e}-list-item-progress`,Y)},Ae)})),ce=r.response&&typeof r.response=="string"?r.response:((B=r.error)===null||B===void 0?void 0:B.statusText)||((O=r.error)===null||O===void 0?void 0:O.message)||a.uploadError,ue=D==="error"?c.createElement(kt,{title:ce,getPopupContainer:Y=>Y.parentNode},X):X;return c.createElement("div",{className:Q(`${e}-list-item-container`,t),style:n,ref:A},m?m(ue,r,s,{download:$.bind(null,r),preview:S.bind(null,r),remove:g.bind(null,r)}):ue)}),Wn=(e,t)=>{const{listType:n="text",previewFile:a=_n,onPreview:o,onDownload:r,onRemove:s,locale:i,iconRender:u,isImageUrl:d=Mn,prefixCls:m,items:f=[],showPreviewIcon:l=!0,showRemoveIcon:p=!0,showDownloadIcon:h=!1,removeIcon:b,previewIcon:C,downloadIcon:y,extra:w,progress:S={size:[-1,2],showInfo:!1},appendAction:$,appendActionVisible:g=!0,itemRender:A,disabled:B}=e,[,O]=br(),[R,D]=c.useState(!1),re=["picture-card","picture-circle"].includes(n);c.useEffect(()=>{n.startsWith("picture")&&(f||[]).forEach(x=>{!(x.originFileObj instanceof File||x.originFileObj instanceof Blob)||x.thumbUrl!==void 0||(x.thumbUrl="",a==null||a(x.originFileObj).then(P=>{x.thumbUrl=P||"",O()}))})},[n,f,a]),c.useEffect(()=>{D(!0)},[]);const ne=(x,P)=>{if(o)return P==null||P.preventDefault(),o(x)},G=x=>{typeof r=="function"?r(x):x.url&&window.open(x.url)},H=x=>{s==null||s(x)},U=x=>{if(u)return u(x,n);const P=x.status==="uploading";if(n.startsWith("picture")){const E=n==="picture"?c.createElement(bt,null):i.uploading,v=d!=null&&d(x)?c.createElement(On,null):c.createElement(An,null);return P?E:v}return P?c.createElement(bt,null):c.createElement(kn,null)},ee=(x,P,E,v,_)=>{const L={type:"text",size:"small",title:v,onClick:X=>{var ce,ue;P(),c.isValidElement(x)&&((ue=(ce=x.props).onClick)===null||ue===void 0||ue.call(ce,X))},className:`${E}-list-item-action`,disabled:_?B:!1};return c.isValidElement(x)?c.createElement(vt,Object.assign({},L,{icon:ht(x,Object.assign(Object.assign({},x.props),{onClick:()=>{}}))})):c.createElement(vt,Object.assign({},L),c.createElement("span",null,x))};c.useImperativeHandle(t,()=>({handlePreview:ne,handleDownload:G}));const{getPrefixCls:M}=c.useContext(We),K=M("upload",m),F=M(),N=Q(`${K}-list`,`${K}-list-${n}`),z=c.useMemo(()=>Tt(Fr(F),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[F]),q=Object.assign(Object.assign({},re?{}:z),{motionDeadline:2e3,motionName:`${K}-${re?"animate-inline":"animate"}`,keys:fe(f.map(x=>({key:x.uid,file:x}))),motionAppear:R});return c.createElement("div",{className:N},c.createElement(Cr,Object.assign({},q,{component:!1}),({key:x,file:P,className:E,style:v})=>c.createElement(Un,{key:x,locale:i,prefixCls:K,className:E,style:v,file:P,items:f,progress:S,listType:n,isImgUrl:d,showPreviewIcon:l,showRemoveIcon:p,showDownloadIcon:h,removeIcon:b,previewIcon:C,downloadIcon:y,extra:w,iconRender:U,actionIconRender:ee,itemRender:A,onPreview:ne,onDownload:G,onClose:H})),$&&c.createElement(Ut,Object.assign({},q,{visible:g,forceRender:!0}),({className:x,style:P})=>ht($,E=>({className:Q(E.className,x),style:Object.assign(Object.assign(Object.assign({},P),{pointerEvents:x?"none":void 0}),E.style)}))))},Hn=c.forwardRef(Wn);var qn=function(e,t,n,a){function o(r){return r instanceof n?r:new n(function(s){s(r)})}return new(n||(n=Promise))(function(r,s){function i(m){try{d(a.next(m))}catch(f){s(f)}}function u(m){try{d(a.throw(m))}catch(f){s(f)}}function d(m){m.done?r(m.value):o(m.value).then(i,u)}d((a=a.apply(e,[])).next())})};const ke=`__LIST_IGNORE_${Date.now()}__`,Xn=(e,t)=>{const n=yr("upload"),{fileList:a,defaultFileList:o,onRemove:r,showUploadList:s=!0,listType:i="text",onPreview:u,onDownload:d,onChange:m,onDrop:f,previewFile:l,disabled:p,locale:h,iconRender:b,isImageUrl:C,progress:y,prefixCls:w,className:S,type:$="select",children:g,style:A,itemRender:B,maxCount:O,data:R={},multiple:D=!1,hasControlInside:re=!0,action:ne="",accept:G="",supportServerRender:H=!0,rootClassName:U}=e,ee=c.useContext(wr),M=p??ee,K=e.customRequest||n.customRequest,[F,N]=$r(o||[],{value:a,postState:k=>k??[]}),[z,q]=c.useState("drop"),x=c.useRef(null),P=c.useRef(null);c.useMemo(()=>{const k=Date.now();(a||[]).forEach((j,V)=>{!j.uid&&!Object.isFrozen(j)&&(j.uid=`__AUTO__${k}_${V}__`)})},[a]);const E=(k,j,V)=>{let T=fe(j),W=!1;O===1?T=T.slice(-1):O&&(W=T.length>O,T=T.slice(0,O)),Ft(()=>{N(T)});const ie={file:k,fileList:T};V&&(ie.event=V),(!W||k.status==="removed"||T.some(Ce=>Ce.uid===k.uid))&&Ft(()=>{m==null||m(ie)})},v=(k,j)=>qn(void 0,void 0,void 0,function*(){const{beforeUpload:V,transformFile:T}=e;let W=k;if(V){const ie=yield V(k,j);if(ie===!1)return!1;if(delete k[ke],ie===ke)return Object.defineProperty(k,ke,{value:!0,configurable:!0}),!1;typeof ie=="object"&&ie&&(W=ie)}return T&&(W=yield T(W)),W}),_=k=>{const j=k.filter(W=>!W.file[ke]);if(!j.length)return;const V=j.map(W=>Te(W.file));let T=fe(F);V.forEach(W=>{T=Ne(W,T)}),V.forEach((W,ie)=>{let Ce=W;if(j[ie].parsedFile)W.status="uploading";else{const{originFileObj:xe}=W;let ye;try{ye=new File([xe],xe.name,{type:xe.type})}catch{ye=new Blob([xe],{type:xe.type}),ye.name=xe.name,ye.lastModifiedDate=new Date,ye.lastModified=new Date().getTime()}ye.uid=W.uid,Ce=ye}E(Ce,T)})},L=(k,j,V)=>{try{typeof k=="string"&&(k=JSON.parse(k))}catch{}if(!et(j,F))return;const T=Te(j);T.status="done",T.percent=100,T.response=k,T.xhr=V;const W=Ne(T,F);E(T,W)},X=(k,j)=>{if(!et(j,F))return;const V=Te(j);V.status="uploading",V.percent=k.percent;const T=Ne(V,F);E(V,T,k)},ce=(k,j,V)=>{if(!et(V,F))return;const T=Te(V);T.error=k,T.response=j,T.status="error";const W=Ne(T,F);E(T,W)},ue=k=>{let j;Promise.resolve(typeof r=="function"?r(k):r).then(V=>{var T;if(V===!1)return;const W=Tn(k,F);W&&(j=Object.assign(Object.assign({},k),{status:"removed"}),F==null||F.forEach(ie=>{const Ce=j.uid!==void 0?"uid":"name";ie[Ce]===j[Ce]&&!Object.isFrozen(ie)&&(ie.status="removed")}),(T=x.current)===null||T===void 0||T.abort(j),E(j,W))})},Y=k=>{q(k.type),k.type==="drop"&&(f==null||f(k))};c.useImperativeHandle(t,()=>({onBatchStart:_,onSuccess:L,onProgress:X,onError:ce,fileList:F,upload:x.current,nativeElement:P.current}));const{getPrefixCls:Ae,direction:Oe,upload:$e}=c.useContext(We),Z=Ae("upload",w),Be=Object.assign(Object.assign({onBatchStart:_,onError:ce,onProgress:X,onSuccess:L},e),{customRequest:K,data:R,multiple:D,action:ne,accept:G,supportServerRender:H,prefixCls:Z,disabled:M,beforeUpload:v,onChange:void 0,hasControlInside:re});delete Be.className,delete Be.style,(!g||M)&&delete Be.id;const ut=`${Z}-wrapper`,[Xe,dt,Kt]=Sn(Z,ut),[Jt]=xr("Upload",Sr.Upload),{showRemoveIcon:pt,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,extra:rr}=typeof s=="boolean"?{}:s,nr=typeof pt>"u"?!M:pt,Ve=(k,j)=>s?c.createElement(Hn,{prefixCls:Z,listType:i,items:F,previewFile:l,onPreview:u,onDownload:d,onRemove:ue,showRemoveIcon:nr,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,iconRender:b,extra:rr,locale:Object.assign(Object.assign({},Jt),h),isImageUrl:C,progress:y,appendAction:k,appendActionVisible:j,itemRender:B,disabled:M}):k,Ge=Q(ut,S,U,dt,Kt,$e==null?void 0:$e.className,{[`${Z}-rtl`]:Oe==="rtl",[`${Z}-picture-card-wrapper`]:i==="picture-card",[`${Z}-picture-circle-wrapper`]:i==="picture-circle"}),mt=Object.assign(Object.assign({},$e==null?void 0:$e.style),A);if($==="drag"){const k=Q(dt,Z,`${Z}-drag`,{[`${Z}-drag-uploading`]:F.some(j=>j.status==="uploading"),[`${Z}-drag-hover`]:z==="dragover",[`${Z}-disabled`]:M,[`${Z}-rtl`]:Oe==="rtl"});return Xe(c.createElement("span",{className:Ge,ref:P},c.createElement("div",{className:k,style:mt,onDrop:Y,onDragOver:Y,onDragLeave:Y},c.createElement(at,Object.assign({},Be,{ref:x,className:`${Z}-btn`}),c.createElement("div",{className:`${Z}-drag-container`},g))),Ve()))}const ar=Q(Z,`${Z}-select`,{[`${Z}-disabled`]:M,[`${Z}-hidden`]:!g}),ft=c.createElement("div",{className:ar,style:mt},c.createElement(at,Object.assign({},Be,{ref:x})));return Xe(i==="picture-card"||i==="picture-circle"?c.createElement("span",{className:Ge,ref:P},Ve(ft,!!g)):c.createElement("span",{className:Ge,ref:P},ft,Ve()))},Vt=c.forwardRef(Xn);var Vn=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Gn=c.forwardRef((e,t)=>{const{style:n,height:a,hasControlInside:o=!1,children:r}=e,s=Vn(e,["style","height","hasControlInside","children"]),i=Object.assign(Object.assign({},n),{height:a});return c.createElement(Vt,Object.assign({ref:t,hasControlInside:o},s,{style:i,type:"drag"}),r)}),ct=Vt;ct.Dragger=Gn;ct.LIST_IGNORE=ke;const Kn=["10014"],Jn=({url:e,token:t,role:n,getMessage:a})=>{const o=(l,p)=>a?a(l):p,r=Er.create({baseURL:e,timeout:1e6});return r.interceptors.request.use(l=>{let p=t;if(!p&&!["user/login","user/kaptcha","user/regist"].some(b=>l.url.includes(b))){window.location.pathname="/login";return}return l.headers.Authorization=p||"",l.headers.userName=n==="\u672A\u767B\u5F55\u7528\u6237"?"":n,l}),r.interceptors.response.use(l=>{const p=["user/kaptcha"],h=l.data;if(p.some(w=>l.config.url&&l.config.url.includes(w))||h.size&&h.type)return h;const{success:b,errorMsg:C,errorCode:y}=h;return Kn.includes(y)||b?h:(te.error(C||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),!1)},l=>{var p,h,b,C,y,w,S,$,g,A;l.message!=="canceled"&&((((h=(p=l==null?void 0:l.response)==null?void 0:p.data)==null?void 0:h.errorCode)==="30013"||((C=(b=l==null?void 0:l.response)==null?void 0:b.data)==null?void 0:C.errorCode)==="30023")&&te.error((((y=l==null?void 0:l.response)==null?void 0:y.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),((w=l==null?void 0:l.response)==null?void 0:w.status)===401&&(console.log("Error url:",(S=l==null?void 0:l.request)==null?void 0:S.responseURL),te.error(((($=l==null?void 0:l.response)==null?void 0:$.data)||{}).errorMsg||o("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"))),console.log("Error occurs",l),(((g=l==null?void 0:l.response)==null?void 0:g.data)||{}).errorMsg!="\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF01"&&te.error((((A=l==null?void 0:l.response)==null?void 0:A.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")))}),{getLibraryList:async l=>{try{const p=await r.get(`/sensitive/library?${new URLSearchParams(l).toString()}`),{success:h,data:b}=p;return h?b:!1}catch(p){return console.log("e",p),!1}},createLibrary:async l=>{try{const p=await r.post("/sensitive/library",l),{success:h,data:b}=p;return h?b:!1}catch(p){return console.log("e",p),!1}},deleteLibrary:async l=>{try{const p=await r.delete(`/sensitive/library/${l}`),{success:h,data:b}=p;return h?b:!1}catch(p){return console.log("e",p),!1}},updateLibrary:async(l,p)=>{try{const h=await r.put(`/sensitive/library/${l}`,p),{success:b,data:C}=h;return b?C:!1}catch(h){return console.log("e",h),!1}},downloadTemplate:async l=>{try{const p=await r.get("/sensitive/word/downloadTemplate",{params:{fileType:l},responseType:"blob"});return p&&typeof p.size=="number"?p:!1}catch(p){return console.log("e",p),!1}},importWords:async(l,p)=>{try{const h=new FormData;h.append("file",p);const b=await r.put(`/sensitive/word/${l}/import`,h);return b&&b.success!==!1?b:!1}catch(h){return console.log("e",h),!1}}}},Ue={toolbar:{searchPlaceholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},tagCell:{viewAllTitle:"\u5171 {{total}} \u4E2A\uFF0C\u5F53\u524D\u4EC5\u5C55\u793A\u524D {{max}} \u4E2A",viewAllLink:"\u2026\u67E5\u770B\u5168\u90E8\uFF08+{{count}}\uFF09"},table:{label:"\u654F\u611F\u8BCD\u914D\u7F6E",viewLabel:"\u654F\u611F\u8BCD\u5E93\u5217\u8868",columns:{name:"\u540D\u79F0",sensitiveWords:"\u654F\u611F\u8BCD",createDate:"\u521B\u5EFA\u65E5\u671F",count:"\u6570\u91CF",actions:"\u64CD\u4F5C"},toolbar:{create:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",searchPlaceholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},actionEdit:"\u7F16\u8F91",actionDelete:"\u5220\u9664"},dashboard:{title:"\u654F\u611F\u8BCD\u5E93\u7BA1\u7406"},deleteConfirm:{title:"\u786E\u8BA4\u5220\u9664\u654F\u611F\u8BCD\u5E93\uFF1F",content:"\u5220\u9664\u540E\uFF0C\u8BE5\u654F\u611F\u8BCD\u5E93\u5C06\u65E0\u6CD5\u6062\u590D",okText:"\u5220\u9664",cancelText:"\u53D6\u6D88"},createModal:{title:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",nameRequired:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u5E93\u540D\u79F0!",namePlaceholder:"\u8BF7\u8F93\u5165"},message:{saveSuccess:"\u4FDD\u5B58\u6210\u529F",createSuccess:"\u65B0\u589E\u654F\u611F\u8BCD\u6210\u529F!",deleteSuccess:"\u5220\u9664\u6210\u529F",downloadTemplateFail:"\u6A21\u677F\u4E0B\u8F7D\u5931\u8D25",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25"},downloadTemplateFilename:"\u654F\u611F\u8BCD\u6A21\u677F",editor:{maxLengthHint:"\u654F\u611F\u8BCD\u6700\u591A\u53EF\u8F93\u5165{{max}}\u4E2A\u5B57\u7B26",maxLengthWarning:"\u654F\u611F\u8BCD\u6700\u591A\u53EF\u8F93\u5165{{max}}\u4E2A\u5B57\u7B26",duplicateWarning:"\u5DF2\u5B58\u5728\u76F8\u540C\u654F\u611F\u8BCD",configTemplateHint:"\u8BF7\u914D\u7F6E\u6A21\u677F\u4E0B\u8F7D\u5730\u5740",selectFileWarning:"\u8BF7\u5148\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6",importFailRetry:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",importCountSuccess:"\u5DF2\u5BFC\u5165 {{count}} \u4E2A\u654F\u611F\u8BCD",parseFail:"\u6587\u4EF6\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u786E\u4FDD\u4E3A csv \u6216 txt \u683C\u5F0F",readFileFail:"\u6587\u4EF6\u8BFB\u53D6\u5931\u8D25",searchPlaceholder:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u641C\u7D22",inputPlaceholder:"\u8BF7\u8F93\u5165",add:"\u6DFB\u52A0",import:"\u5BFC\u5165",cancel:"\u53D6\u6D88",save:"\u4FDD\u5B58",confirm:"\u786E\u8BA4",downloadTemplate:"\u4E0B\u8F7D\u6A21\u677F",uploadModalTitle:"\u4E0A\u4F20\u6587\u4EF6",uploadModalHint:"\u5148\u4E0B\u8F7D\u6A21\u677F\u540E\u4E0A\u4F20",uploadDragText:"\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20",uploadDragHint:"\u652F\u6301\u5355\u6B21\u4E0A\u4F20\uFF0C\u652F\u6301 csv\u3001txt \u683C\u5F0F\u3002",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",noPermission:"\u6CA1\u6709\u8DB3\u591F\u6743\u9650"}},Yn={toolbar:{searchPlaceholder:"Enter keyword"},tagCell:{viewAllTitle:"{{total}} total, showing first {{max}}",viewAllLink:"\u2026View all (+{{count}})"},table:{label:"Sensitive words",viewLabel:"Sensitive word libraries",columns:{name:"Name",sensitiveWords:"Sensitive words",createDate:"Created",count:"Count",actions:"Actions"},toolbar:{create:"New library",searchPlaceholder:"Enter keyword"},actionEdit:"Edit",actionDelete:"Delete"},dashboard:{title:"Sensitive word libraries"},deleteConfirm:{title:"Delete this library?",content:"This library cannot be recovered after deletion.",okText:"Delete",cancelText:"Cancel"},createModal:{title:"New sensitive word library",cancel:"Cancel",confirm:"Confirm",nameRequired:"Please enter the library name.",namePlaceholder:"Enter name"},message:{saveSuccess:"Saved",createSuccess:"Library created.",deleteSuccess:"Deleted",downloadTemplateFail:"Template download failed",importSuccess:"Import succeeded",importFail:"Import failed"},downloadTemplateFilename:"sensitive-words-template",editor:{maxLengthHint:"Max {{max}} characters per word",maxLengthWarning:"Max {{max}} characters per word",duplicateWarning:"Duplicate word",configTemplateHint:"Please configure template download URL",selectFileWarning:"Please select a file first",importFailRetry:"Import failed, please retry",importCountSuccess:"Imported {{count}} words",parseFail:"Parse failed. Use csv or txt format.",readFileFail:"File read failed",searchPlaceholder:"Search sensitive words",inputPlaceholder:"Enter",add:"Add",import:"Import",cancel:"Cancel",save:"Save",confirm:"Confirm",downloadTemplate:"Download template",uploadModalTitle:"Upload file",uploadModalHint:"Download template first, then upload",uploadDragText:"Click or drag file here to upload",uploadDragHint:"Single file. csv or txt.",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"Request failed, please try again.",noPermission:"Insufficient permission"}},Zn={toolbar:{searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u5165\u529B"},tagCell:{viewAllTitle:"\u5168{{total}}\u4EF6\u3001\u5148\u982D{{max}}\u4EF6\u3092\u8868\u793A",viewAllLink:"\u2026\u3059\u3079\u3066\u8868\u793A\uFF08+{{count}}\uFF09"},table:{label:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9",viewLabel:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30E9\u30A4\u30D6\u30E9\u30EA",columns:{name:"\u540D\u524D",sensitiveWords:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9",createDate:"\u4F5C\u6210\u65E5",count:"\u4EF6\u6570",actions:"\u64CD\u4F5C"},toolbar:{create:"\u65B0\u898F\u30E9\u30A4\u30D6\u30E9\u30EA",searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u5165\u529B"},actionEdit:"\u7DE8\u96C6",actionDelete:"\u524A\u9664"},dashboard:{title:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u7BA1\u7406"},deleteConfirm:{title:"\u3053\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",content:"\u524A\u9664\u3059\u308B\u3068\u5FA9\u5143\u3067\u304D\u307E\u305B\u3093\u3002",okText:"\u524A\u9664",cancelText:"\u30AD\u30E3\u30F3\u30BB\u30EB"},createModal:{title:"\u65B0\u898F\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30E9\u30A4\u30D6\u30E9\u30EA",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",confirm:"\u78BA\u8A8D",nameRequired:"\u30E9\u30A4\u30D6\u30E9\u30EA\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",namePlaceholder:"\u5165\u529B"},message:{saveSuccess:"\u4FDD\u5B58\u3057\u307E\u3057\u305F",createSuccess:"\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F\u3002",deleteSuccess:"\u524A\u9664\u3057\u307E\u3057\u305F",downloadTemplateFail:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",importSuccess:"\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3057\u305F",importFail:"\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F"},downloadTemplateFilename:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8",editor:{maxLengthHint:"1\u8A9E\u3042\u305F\u308A{{max}}\u6587\u5B57\u307E\u3067",maxLengthWarning:"1\u8A9E\u3042\u305F\u308A{{max}}\u6587\u5B57\u307E\u3067",duplicateWarning:"\u540C\u3058\u8A9E\u304C\u65E2\u306B\u3042\u308A\u307E\u3059",configTemplateHint:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9URL\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044",selectFileWarning:"\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",importFailRetry:"\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",importCountSuccess:"{{count}}\u8A9E\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3057\u305F",parseFail:"\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002csv \u307E\u305F\u306F txt \u5F62\u5F0F\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",readFileFail:"\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",searchPlaceholder:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u3092\u691C\u7D22",inputPlaceholder:"\u5165\u529B",add:"\u8FFD\u52A0",import:"\u30A4\u30F3\u30DD\u30FC\u30C8",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",save:"\u4FDD\u5B58",confirm:"\u78BA\u8A8D",downloadTemplate:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",uploadModalTitle:"\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadModalHint:"\u5148\u306B\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u304B\u3089\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadDragText:"\u30AF\u30EA\u30C3\u30AF\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadDragHint:"1\u30D5\u30A1\u30A4\u30EB\u3002csv \u307E\u305F\u306F txt\u3002",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",noPermission:"\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093"}},Qn={zh:Ue,en:Yn,ja:Zn};function ea(e){return Qn[e]??Ue}function Pe(e,t){return e.replace(/\{\{(\w+)\}\}/g,(n,a)=>String(t[a]??""))}const Gt=we.createContext({locale:"zh",messages:Ue,getMessage:e=>{const t=e.split(".");let n=Ue;for(const a of t)n=n==null?void 0:n[a];return typeof n=="string"?n:e}});function qe(){return we.useContext(Gt)}function ta({locale:e,messages:t,children:n}){const a=we.useMemo(()=>{const o=ea(e),r=t?{...o,...t}:o;return{locale:e,messages:r,getMessage:i=>{const u=i.split(".");let d=r;for(const m of u)d=d==null?void 0:d[m];return typeof d=="string"?d:i}}},[e,t]);return we.createElement(Gt.Provider,{value:a},n)}const{Dragger:ra}=ct,Se=16,na=le.div.attrs({className:"sensitive-edit-page"})`
32
+ display: flex;
33
+ flex-direction: column;
34
+ width: 100%;
35
+ height: 100%;
36
+ background: ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)??"#FFFFFF"}};
37
+ `,aa=le.div.attrs({className:"sensitive-edit-toolbar"})`
38
+ flex-shrink: 0;
39
+ display: flex;
40
+ align-items: center;
41
+ gap: 12px;
42
+ flex-wrap: wrap;
43
+ padding: 12px 20px;
44
+
45
+ `,oa=le.div.attrs({className:"sensitive-edit-content-box"})`
46
+ flex: 1;
47
+ min-height: 0;
48
+ overflow: auto;
49
+ border: 1px solid ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.border)??"#E5E7EB"}};
50
+ background: ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.listBackground)??"#f5f5f5"}};
51
+ border-radius: 8px;
52
+ padding: 16px;
53
+ margin: 0 20px;
54
+ `,ia=le.div.attrs({className:"sensitive-edit-tag-list"})`
55
+ display: flex;
56
+ flex-wrap: wrap;
57
+ gap: 12px;
58
+ min-height: 30px;
59
+ `,De=28,sa=le.span.attrs({className:"sensitive-edit-tag"})`
60
+ box-sizing: border-box;
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 6px;
64
+ height: ${De}px;
65
+ min-height: ${De}px;
66
+ color: ${e=>e.$color};
67
+ background: ${e=>e.$bg};
68
+ border: ${e=>e.$border==="none"?"none":`1px solid ${e.$border}`};
69
+ border-radius: 4px;
70
+ padding: 0 8px 0 12px;
71
+ font-size: 12px;
72
+ line-height: 20px;
73
+ white-space: nowrap;
74
+ flex-shrink: 0;
75
+ font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
76
+ .sensitive-edit-tag-remove {
77
+ cursor: pointer;
78
+ opacity: 0.7;
79
+ display: flex;
80
+ align-items: center;
81
+ &:hover {
82
+ opacity: 1;
83
+ }
84
+ }
85
+ `,la=le.span.attrs({className:"sensitive-edit-add-trigger"})`
86
+ box-sizing: border-box;
87
+ display: inline-flex;
88
+ align-items: center;
89
+ gap: 6px;
90
+ height: ${De}px;
91
+ min-height: ${De}px;
92
+ padding: 0 12px;
93
+ border: 1px dashed ${e=>e.$color};
94
+ border-radius: 4px;
95
+ background: #FFFFFF;
96
+ color: ${e=>e.$color};
97
+ font-size: 12px;
98
+ line-height: 20px;
99
+ white-space: nowrap;
100
+ flex-shrink: 0;
101
+ cursor: pointer;
102
+ font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
103
+ &:hover {
104
+ border-style: solid;
105
+ opacity: 0.9;
106
+ }
107
+ `,ca=le.span.attrs({className:"sensitive-edit-add-input-wrap"})`
108
+ box-sizing: border-box;
109
+ display: inline-flex;
110
+ align-items: center;
111
+
112
+ height: ${De}px;
113
+ min-height: ${De}px;
114
+ padding: 0 8px 0 12px;
115
+ border: 1px solid ${e=>e.$focused?e.$color:"#E5E7EB"};
116
+ border-radius: 4px;
117
+ background: #FFFFFF;
118
+ flex-shrink: 0;
119
+ min-width: 80px;
120
+ .sensitive-edit-add-input {
121
+ border: none;
122
+ outline: none;
123
+ background: transparent;
124
+ font-size: 12px;
125
+ line-height: 20px;
126
+ color: #1f2937;
127
+ font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
128
+ width: 100%;
129
+ min-width: 60px;
130
+ }
131
+ .sensitive-edit-add-input::placeholder {
132
+ color: #9ca3af;
133
+ }
134
+ `,ua=le.div.attrs({className:"sensitive-edit-footer"})`
135
+ flex-shrink: 0;
136
+ display: flex;
137
+ justify-content: flex-end;
138
+ gap: 10px;
139
+ padding: 16px 20px;
140
+
141
+ `,da=le.div.attrs({className:"sensitive-upload-modal-alert"})`
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: space-between;
145
+ gap: 12px;
146
+ padding: 4px 14px;
147
+ margin-bottom: 16px;
148
+ background: ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.tagBackground)??"#eff6ff"}};
149
+ border-radius: 6px;
150
+ font-size: 14px;
151
+ color: ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.text)??"#1f2937"}};
152
+ `,pa=le.div.attrs({className:"sensitive-upload-modal-dragger-wrap"})`
153
+ .ant-upload-drag {
154
+ border-radius: 8px;
155
+ border: 1px dashed #d1d5db;
156
+ background: #fafafa;
157
+ }
158
+ .ant-upload-drag:hover {
159
+ border-color: #1d70f5;
160
+ background: #f0f7ff;
161
+ }
162
+ `,ma=({words:e,onWordsChange:t,onSave:n,onCancel:a,styles:o,onDownloadTemplate:r,onImportFile:s})=>{var K;const{messages:i}=qe(),[u,d]=me(""),[m,f]=me(!1),[l,p]=me(""),h=je(null),[b,C]=me(!1),[y,w]=me([]),[S,$]=me(!1),g=((K=o==null?void 0:o.theme)==null?void 0:K.colors)||it.colors||{},A=g.tagColor??"#1d70f5",B=g.tagBackground??"#ebf6ff",O="none";ot(()=>{m&&(p(""),setTimeout(()=>{var F;return(F=h.current)==null?void 0:F.focus()},0))},[m]);const R=pe(()=>{const F=l.trim();if(F){if(F.length>Se){te.warning(Pe(i.editor.maxLengthWarning,{max:String(Se)}));return}if(e.includes(F)){te.warning(i.editor.duplicateWarning);return}t([F,...e])}p(""),f(!1)},[l,e,t,i]),D=pe(F=>{t(e.filter(N=>N!==F))},[e,t]),re=_e(()=>{const F=u.trim().toLowerCase();return F?e.filter(N=>N.toLowerCase().includes(F)):e},[e,u]),ne=pe(()=>{w([]),C(!0)},[]),G=pe(F=>{r?r(F):te.info(i.editor.configTemplateHint)},[r,i]),H={items:[{key:"csv",label:i.editor.formatCsv},{key:"txt",label:i.editor.formatTxt}],onClick:({key:F})=>G(F)},U=pe(F=>{const N=F.replace(/\r\n/g,`
163
+ `).replace(/\r/g,`
164
+ `).split(/[\n,\t]/).map(x=>x.trim()).filter(Boolean),z=new Set,q=[];for(const x of N){const P=x.length>Se?x.slice(0,Se):x;z.has(P)||(z.add(P),q.push(P))}return q},[]),ee=pe(async()=>{var z;const F=(z=y[0])==null?void 0:z.originFileObj;if(!F){te.warning(i.editor.selectFileWarning);return}if(s){$(!0);try{await s(F),C(!1),w([])}catch{te.error(i.editor.importFailRetry)}finally{$(!1)}return}const N=new FileReader;N.onload=()=>{try{const q=N.result||"",x=U(q),P=Array.from(new Set([...e,...x]));t(P),te.success(Pe(i.editor.importCountSuccess,{count:String(x.length)})),C(!1),w([])}catch{te.error(i.editor.parseFail)}},N.onerror=()=>te.error(i.editor.readFileFail),N.readAsText(F,"UTF-8")},[y,e,t,U,s,i]),M=pe(()=>{C(!1),w([])},[]);return se(na,{theme:o==null?void 0:o.theme,children:[se(aa,{theme:o==null?void 0:o.theme,children:[I(ve,{mode:"primary",label:i.editor.import,icon:I(Br,{size:16}),onClick:ne,styles:o}),se("span",{style:{display:"flex",alignItems:"center",gap:6,color:g.textSecondary??"#6b7280",fontSize:12},children:[I(Ct,{size:14}),Pe(i.editor.maxLengthHint,{max:String(Se)})]}),I("div",{style:{flex:1,marginLeft:"auto",minWidth:200,maxWidth:320,display:"flex",alignItems:"center",gap:8},children:I(st,{placeholder:i.editor.searchPlaceholder,value:u,allowClear:!0,onChange:F=>d(F.target.value),suffix:I(Wt,{size:16,style:{color:"#9ca3af"}}),style:{flex:1}})})]}),I(oa,{theme:o==null?void 0:o.theme,children:se(ia,{children:[m?I(ca,{$focused:!0,$color:A,children:I("input",{ref:h,type:"text",className:"sensitive-edit-add-input",placeholder:i.editor.inputPlaceholder,value:l,onChange:F=>p(F.target.value),onBlur:R,onKeyDown:F=>{F.key==="Enter"&&R(),F.key==="Escape"&&(p(""),f(!1))},maxLength:Se})}):se(la,{$color:A,onClick:()=>f(!0),role:"button",tabIndex:0,onKeyDown:F=>F.key==="Enter"&&f(!0),children:[I(Ht,{size:14}),i.editor.add]}),re.map(F=>se(sa,{$color:A,$bg:B,$border:O,children:[F,I("span",{className:"sensitive-edit-tag-remove",onClick:()=>D(F),role:"button",tabIndex:0,onKeyDown:N=>N.key==="Enter"&&D(F),children:I(kr,{size:14})})]},F))]})}),se(ua,{theme:o==null?void 0:o.theme,children:[I(ve,{mode:"default",label:i.editor.cancel,onClick:a,styles:o,style:{width:76}}),I(ve,{mode:"primary",label:i.editor.save,onClick:n,styles:o,style:{width:76}})]}),se(lt,{title:i.editor.uploadModalTitle,open:b,onCancel:M,footer:se("div",{style:{display:"flex",justifyContent:"flex-end",gap:20},children:[I(ve,{mode:"default",label:i.editor.cancel,onClick:M,styles:o,disabled:S,style:{width:76}}),I(ve,{mode:"primary",label:i.editor.confirm,onClick:ee,styles:o,disabled:S,style:{width:76}})]}),destroyOnClose:!0,width:650,children:[se(da,{theme:o==null?void 0:o.theme,children:[se("span",{style:{display:"flex",alignItems:"center",gap:8},children:[I(Ct,{size:18,style:{color:"#1d70f5",flexShrink:0}}),i.editor.uploadModalHint]}),I(Pr,{menu:H,trigger:["click"],children:I("div",{style:{display:"inline-block"},children:I(ve,{mode:"default",label:i.editor.downloadTemplate,styles:o})})})]}),I(pa,{children:se(ra,{accept:".csv,.txt",maxCount:1,fileList:y,beforeUpload:()=>!1,onChange:({fileList:F})=>w(F.slice(-1)),showUploadList:{showPreviewIcon:!1},children:[I("p",{className:"ant-upload-drag-icon",style:{marginBottom:8},children:I(Lr,{size:48,style:{color:"#1d70f5"}})}),I("p",{className:"ant-upload-text",children:i.editor.uploadDragText}),I("p",{className:"ant-upload-hint",children:i.editor.uploadDragHint})]})})]})]})},{confirm:fa}=lt,ga={pageNo:1,pageSize:999},ha=le.div.attrs({className:"sensitive-modal-footer"})`
165
+ width: 100%;
166
+ display: flex;
167
+ flex-direction: row;
168
+ justify-content: flex-end;
169
+ gap: 10px;
170
+ `,va=le.div.attrs({className:"sensitive-toolbar-search-wrap"})`
171
+ display: flex;
172
+ align-items: center;
173
+ min-width: 220px;
174
+ `,ba=({onAction:e})=>{const[t,n]=me(""),{messages:a}=qe(),o=pe(()=>{const r=t.trim();e("search",{keyword:r})},[t,e]);return I(va,{children:I(st,{placeholder:a.toolbar.searchPlaceholder,allowClear:!0,value:t,onChange:r=>n(r.target.value),onPressEnter:o,suffix:I(Wt,{size:16,style:{color:"#9ca3af"}})})})},Fa=le.div.attrs({className:"sensitive-tag-cell-wrap"})`
175
+ display: flex;
176
+ flex-wrap: wrap;
177
+ gap: 12px;
178
+ min-width: 200px;
179
+ max-width: 100%;
180
+ `,Ca=le.span.attrs({className:"sensitive-tag-item"})`
181
+ box-sizing: border-box;
182
+ display: inline-block;
183
+ color: ${e=>e.$color};
184
+ background: ${e=>e.$bg};
185
+ border: 1px solid ${e=>e.$border};
186
+ border-radius: 4px;
187
+ padding: 4px 12px;
188
+ font-size: 12px;
189
+ line-height: 20px;
190
+ white-space: nowrap;
191
+ flex-shrink: 0;
192
+ font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
193
+ `,Me=8,ya=le.span.attrs({className:"sensitive-tag-more"})`
194
+ display: inline-block;
195
+ color: ${e=>e.$color};
196
+ font-size: 12px;
197
+ line-height: 31px;
198
+ white-space: nowrap;
199
+ flex-shrink: 0;
200
+ cursor: pointer;
201
+ font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
202
+ &:hover {
203
+ text-decoration: underline;
204
+ }
205
+ `;function wa({value:e,theme:t,onViewAll:n}){const{messages:a}=qe(),o=(t==null?void 0:t.colors)||it.colors||{},r=o.tagColor??"#1d70f5",s=o.tagBackground??"#ebf6ff",i=Array.isArray(e)?e:[];if(i.length===0)return null;const u=i.slice(0,Me),d=i.length>Me,m=d?i.length-Me:0,f=Pe(a.tagCell.viewAllTitle,{total:String(i.length),max:String(Me)}),l=Pe(a.tagCell.viewAllLink,{count:String(m)});return se(Fa,{children:[u.map((p,h)=>I(Ca,{$color:r,$bg:s,$border:"none",children:p},h)),d&&I(ya,{$color:r,title:f,onClick:()=>n==null?void 0:n(),children:l})]})}const $a=({url:e,token:t,role:n,server:a,styles:o,eventsEmit:r,CustomComponents:s})=>{const{messages:i,locale:u,getMessage:d}=qe(),[m,f]=me({container:"ready",content:"ready"}),l=je(null),[p,h]=me(),[b]=Ke.useForm(),[C,y]=me(!1),[w,S]=me(""),[$,g]=me({active:!1,libraryId:null,libraryName:"",words:[]}),A=_e(()=>a||Jn({url:e,token:t,role:n,getMessage:d}),[a,e,t,n,d]),{getLibraryList:B,deleteLibrary:O,createLibrary:R,updateLibrary:D,downloadTemplate:re,importWords:ne}=A,G=pe(E=>{const v=(E==null?void 0:E.data)??[],_=v.find(ue=>ue.columnId==="name"),L=v.find(ue=>ue.columnId==="sensitiveWords"),X=(_==null?void 0:_.value)??"",ce=Array.isArray(L==null?void 0:L.value)?[...L.value]:[];return{name:X,words:ce}},[]),H=pe(E=>{const{name:v,words:_}=G(E);g({active:!0,libraryId:E.id,libraryName:v,words:_})},[G]),U=pe(()=>{g({active:!1,libraryId:null,libraryName:"",words:[]}),r==null||r("sensitive_edit_closed",{})},[r]),ee=pe(async()=>{if($.libraryId)try{await D($.libraryId,{name:$.libraryName,words:$.words})&&(te.success(i.message.saveSuccess),U(),f(v=>({...v,content:"loading"})),K())}catch(E){console.error("[SensitiveView] \u4FDD\u5B58\u654F\u611F\u8BCD\u5931\u8D25:",E)}},[$.libraryId,$.words,D,U]),M=_e(()=>Dr({theme:it,mode:"light"},o||{}),[o]);ot(()=>{f(E=>({...E,content:"loading"})),K()},[]);const K=async E=>{try{const v={...ga},_=E??w;_&&(v.name=_);const L=await B(v);if(L){const X=F(L.records);h(X||[]),f(ce=>({...ce,content:"ready"}))}}catch(v){console.log("[SensitiveView] getSensitiveList error:",v)}};function F(E){return(E||[]).map(v=>({id:v.id,data:[{columnId:"name",value:v.name,type:"label"},{columnId:"sensitiveWords",value:v.words,type:"customized"},{columnId:"createDate",value:v.gmtCreate,type:"date"},{columnId:"count",value:v.count,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]}))}const N=u==="zh"?"zh-CN":u==="ja"?"ja-JP":"en-US",z=_e(()=>({label:i.table.label,model:null,defaultActiveId:"sensitive-table",views:[{id:"sensitive-table",label:i.table.viewLabel,type:"table",viewBehavior:"pagination",allowMultiSelect:!1,viewPageSize:10,paginationLocale:u,columns:[{title:i.table.columns.name,id:"name",type:"label"},{title:i.table.columns.sensitiveWords,id:"sensitiveWords",type:"customized",component:wa,componentProps:({value:E,row:v})=>({value:E,theme:M==null?void 0:M.theme,onViewAll:v?()=>H(v):void 0}),fallback:null},{title:i.table.columns.createDate,id:"createDate",type:"date"},{title:i.table.columns.count,id:"count",type:"text"},{title:i.table.columns.actions,id:"actions",type:"action"}],toolbar:[{type:"button",key:"create",label:i.table.toolbar.create,btnType:"primary",icon:I(Ht,{size:16})},{type:"customized",key:"search",label:i.table.toolbar.searchPlaceholder,position:"right",component:ba}]}]}),[M,H,i]),q=async()=>{var E;try{const v=await b.validateFields();if(!v)return;const _=await R({...v,words:[]});if(_&&(l!=null&&l.current)){const L={id:_,data:[{columnId:"name",value:v.name,type:"label"},{columnId:"sensitiveWords",value:[],type:"customized"},{columnId:"createDate",value:new Date().toLocaleString(N,{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"),type:"date"},{columnId:"count",value:0,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]};(E=l.current.appFn)==null||E.addItem(L,{animate:!0,position:"start"}),te.success(i.message.createSuccess),r==null||r("sensitive_library_created",{id:_,name:v.name})}}catch(v){console.error("[SensitiveView] \u65B0\u589E\u654F\u611F\u8BCD\u5931\u8D25:",v)}finally{y(!1),b.resetFields()}};function x(E,v,_){switch(E){case"toolbar_create":y(!0),r==null||r("sensitive_toolbar_create",v);break;case"table_action_edit":{const L=v==null?void 0:v.id,X=L&&Array.isArray(p)?p.find(ce=>ce.id===L):v!=null&&v.data?v:null;X&&X.data?H(X):v!=null&&v.id&&(v!=null&&v.data)&&H(v),r==null||r("sensitive_table_action_edit",v);break}case"table_action_delete":{fa({title:i.deleteConfirm.title,content:i.deleteConfirm.content,okText:i.deleteConfirm.okText,cancelText:i.deleteConfirm.cancelText,async onOk(){var L;try{await O(v.id)&&(l!=null&&l.current)&&((L=l.current.appFn)==null||L.removeItem(v.id),te.success(i.message.deleteSuccess),r==null||r("sensitive_table_action_delete",v))}catch(X){console.error("[SensitiveView] \u5220\u9664\u654F\u611F\u8BCD\u5E93\u5931\u8D25",X)}}});break}case"toolbar_search_search":{const L=(v==null?void 0:v.keyword)||"";S(L),f(X=>({...X,content:"loading"})),K(L),r==null||r("sensitive_toolbar_search",v);break}default:r==null||r("sensitive_"+E,v);break}}const P=()=>{y(!1),b.resetFields()};return I(Ir,{goBack:$.active?U:()=>r==null?void 0:r("goBack",{}),title:$.active?$.libraryName:i.dashboard.title,styles:M,children:$.active?I(ma,{libraryName:$.libraryName,words:$.words,onWordsChange:E=>g(v=>({...v,words:E})),onSave:ee,onCancel:U,styles:M,onDownloadTemplate:async E=>{const v=await re(E);if(!v){te.error(i.message.downloadTemplateFail);return}const _=URL.createObjectURL(v),L=document.createElement("a");L.href=_,L.download=`${i.downloadTemplateFilename}.${E}`,L.click(),URL.revokeObjectURL(_)},onImportFile:async E=>{var _;if(!$.libraryId)return;const v=await ne($.libraryId,E);if(v&&v.success!==!1)te.success(i.message.importSuccess),((_=v.data)==null?void 0:_.words)!=null&&g(L=>({...L,words:v.data.words}));else throw te.error((v==null?void 0:v.errorMsg)||i.message.importFail),new Error("import failed")}}):se(or,{children:[I(Ar,{dataSource:p,ref:l,eventsEmit:x,status:m,styles:M,CustomComponents:{...s},...z}),I(lt,{title:i.createModal.title,open:C,width:650,destroyOnClose:!0,onCancel:P,footer:se(ha,{theme:M==null?void 0:M.theme,children:[I(ve,{mode:"default",label:i.createModal.cancel,onClick:P}),I(ve,{mode:"primary",label:i.createModal.confirm,onClick:q})]}),children:I(Ke,{form:b,children:I(Ke.Item,{label:null,name:"name",rules:[{required:!0,message:i.createModal.nameRequired}],children:I(st,{placeholder:i.createModal.namePlaceholder})})})})]})})},ja=e=>{const{locale:t="zh",messages:n,...a}=e;return I(ta,{locale:t,messages:n,children:I($a,{...a})})};export{Gt as SensitiveI18nContext,ta as SensitiveI18nProvider,ja as default,ea as getSensitiveMessages,Pe as interpolate,qe as useSensitiveI18n};
@@ -1 +1 @@
1
- import{G as d,B as f}from"./assets/GientechStreamReader-C8rYtUxB.js";import"react/jsx-runtime";import"react";import"./assets/index-8h59dJlj.js";import"react-dom";import"./assets/index-C9ax6WsW.js";import"./assets/index-CtPe9ln8.js";import"./assets/index-C6WKbL3A.js";import"./assets/index-CVis9Agw.js";import"./assets/x-CmbLQ9dc.js";export{d as GientechStreamReader,f as registerPDFWorker};
1
+ import{G as g,B as h}from"./assets/GientechStreamReader-C5jijqVw.js";import"react/jsx-runtime";import"react";import"./assets/index-BvpN2hYX.js";import"react-dom";import"./assets/index-hDlFWjNU.js";import"./assets/index-sWqCalkt.js";import"./assets/index-DaM9Fbys.js";import"./assets/LeftOutlined-9XTSYGbi.js";import"./assets/index-Bk-pRt65.js";import"./assets/index-SbYeytsI.js";import"./assets/x-DfdS1_QC.js";export{g as GientechStreamReader,h as registerPDFWorker};
@@ -1 +0,0 @@
1
- import*as n from"react";import{M as je,N as Ie,O as re,f as x,Q as ce,U as Me,V as de,A as me,W as j,X as fe,K as ie,Y as ve,Z as _e,u as Ce,$ as ze,a0 as ge,h as He,m as Ke,y as Z,a1 as Le,a2 as We,a3 as Te,a4 as Ae,a5 as Be,q as he,n as Fe}from"./index-8h59dJlj.js";import{S as Ve,u as Ue}from"./index-DoUk2Ei_.js";var be=n.createContext(null),we=n.createContext({}),Xe=["prefixCls","className","containerRef"],Ye=function(t){var a=t.prefixCls,o=t.className,r=t.containerRef,l=je(t,Xe),i=n.useContext(we),s=i.panel,b=Ie(s,r);return n.createElement("div",re({className:x("".concat(a,"-content"),o),role:"dialog",ref:b},ce(t,{aria:!0}),{"aria-modal":"true"},l))};function ye(e){return typeof e=="string"&&String(Number(e))===e?(Me(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var pe={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ge(e,t){var a,o,r,l=e.prefixCls,i=e.open,s=e.placement,b=e.inline,C=e.push,O=e.forceRender,y=e.autoFocus,E=e.keyboard,f=e.classNames,d=e.rootClassName,u=e.rootStyle,v=e.zIndex,p=e.className,I=e.id,P=e.style,S=e.motion,D=e.width,N=e.height,g=e.children,w=e.mask,M=e.maskClosable,R=e.maskMotion,Q=e.maskClassName,K=e.maskStyle,z=e.afterOpenChange,$=e.onClose,W=e.onMouseEnter,J=e.onMouseOver,ee=e.onMouseLeave,X=e.onClick,te=e.onKeyDown,ne=e.onKeyUp,h=e.styles,T=e.drawerRender,_=n.useRef(),A=n.useRef(),B=n.useRef();n.useImperativeHandle(t,function(){return _.current});var ae=function(k){var Y=k.keyCode,G=k.shiftKey;switch(Y){case ie.TAB:{if(Y===ie.TAB){if(!G&&document.activeElement===B.current){var q;(q=A.current)===null||q===void 0||q.focus({preventScroll:!0})}else if(G&&document.activeElement===A.current){var le;(le=B.current)===null||le===void 0||le.focus({preventScroll:!0})}}break}case ie.ESC:{$&&E&&(k.stopPropagation(),$(k));break}}};n.useEffect(function(){if(i&&y){var c;(c=_.current)===null||c===void 0||c.focus({preventScroll:!0})}},[i]);var oe=n.useState(!1),F=de(oe,2),H=F[0],L=F[1],m=n.useContext(be),se;typeof C=="boolean"?se=C?{}:{distance:0}:se=C||{};var V=(a=(o=(r=se)===null||r===void 0?void 0:r.distance)!==null&&o!==void 0?o:m==null?void 0:m.pushDistance)!==null&&a!==void 0?a:180,Ne=n.useMemo(function(){return{pushDistance:V,push:function(){L(!0)},pull:function(){L(!1)}}},[V]);n.useEffect(function(){if(i){var c;m==null||(c=m.push)===null||c===void 0||c.call(m)}else{var k;m==null||(k=m.pull)===null||k===void 0||k.call(m)}},[i]),n.useEffect(function(){return function(){var c;m==null||(c=m.pull)===null||c===void 0||c.call(m)}},[]);var Ee=n.createElement(me,re({key:"mask"},R,{visible:w&&i}),function(c,k){var Y=c.className,G=c.style;return n.createElement("div",{className:x("".concat(l,"-mask"),Y,f==null?void 0:f.mask,Q),style:j(j(j({},G),K),h==null?void 0:h.mask),onClick:M&&i?$:void 0,ref:k})}),Pe=typeof S=="function"?S(s):S,U={};if(H&&V)switch(s){case"top":U.transform="translateY(".concat(V,"px)");break;case"bottom":U.transform="translateY(".concat(-V,"px)");break;case"left":U.transform="translateX(".concat(V,"px)");break;default:U.transform="translateX(".concat(-V,"px)");break}s==="left"||s==="right"?U.width=ye(D):U.height=ye(N);var De={onMouseEnter:W,onMouseOver:J,onMouseLeave:ee,onClick:X,onKeyDown:te,onKeyUp:ne},Re=n.createElement(me,re({key:"panel"},Pe,{visible:i,forceRender:O,onVisibleChanged:function(k){z==null||z(k)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(c,k){var Y=c.className,G=c.style,q=n.createElement(Ye,re({id:I,containerRef:k,prefixCls:l,className:x(p,f==null?void 0:f.content),style:j(j({},P),h==null?void 0:h.content)},ce(e,{aria:!0}),De),g);return n.createElement("div",re({className:x("".concat(l,"-content-wrapper"),f==null?void 0:f.wrapper,Y),style:j(j(j({},U),G),h==null?void 0:h.wrapper)},ce(e,{data:!0})),T?T(q):q)}),ue=j({},u);return v&&(ue.zIndex=v),n.createElement(be.Provider,{value:Ne},n.createElement("div",{className:x(l,"".concat(l,"-").concat(s),d,fe(fe({},"".concat(l,"-open"),i),"".concat(l,"-inline"),b)),style:ue,tabIndex:-1,ref:_,onKeyDown:ae},Ee,n.createElement("div",{tabIndex:0,ref:A,style:pe,"aria-hidden":"true","data-sentinel":"start"}),Re,n.createElement("div",{tabIndex:0,ref:B,style:pe,"aria-hidden":"true","data-sentinel":"end"})))}var qe=n.forwardRef(Ge),Ze=function(t){var a=t.open,o=a===void 0?!1:a,r=t.prefixCls,l=r===void 0?"rc-drawer":r,i=t.placement,s=i===void 0?"right":i,b=t.autoFocus,C=b===void 0?!0:b,O=t.keyboard,y=O===void 0?!0:O,E=t.width,f=E===void 0?378:E,d=t.mask,u=d===void 0?!0:d,v=t.maskClosable,p=v===void 0?!0:v,I=t.getContainer,P=t.forceRender,S=t.afterOpenChange,D=t.destroyOnClose,N=t.onMouseEnter,g=t.onMouseOver,w=t.onMouseLeave,M=t.onClick,R=t.onKeyDown,Q=t.onKeyUp,K=t.panelRef,z=n.useState(!1),$=de(z,2),W=$[0],J=$[1],ee=n.useState(!1),X=de(ee,2),te=X[0],ne=X[1];ve(function(){ne(!0)},[]);var h=te?o:!1,T=n.useRef(),_=n.useRef();ve(function(){h&&(_.current=document.activeElement)},[h]);var A=function(H){var L;if(J(H),S==null||S(H),!H&&_.current&&!((L=T.current)!==null&&L!==void 0&&L.contains(_.current))){var m;(m=_.current)===null||m===void 0||m.focus({preventScroll:!0})}},B=n.useMemo(function(){return{panel:K}},[K]);if(!P&&!W&&!h&&D)return null;var ae={onMouseEnter:N,onMouseOver:g,onMouseLeave:w,onClick:M,onKeyDown:R,onKeyUp:Q},oe=j(j({},t),{},{open:h,prefixCls:l,placement:s,autoFocus:C,keyboard:y,width:f,mask:u,maskClosable:p,inline:I===!1,afterOpenChange:A,ref:T},ae);return n.createElement(we.Provider,{value:B},n.createElement(_e,{open:h||P||W,autoDestroy:!1,getContainer:I,autoLock:u&&(h||W)},n.createElement(qe,oe)))};const xe=e=>{var t,a;const{prefixCls:o,title:r,footer:l,extra:i,closable:s,loading:b,onClose:C,headerStyle:O,bodyStyle:y,footerStyle:E,children:f,classNames:d,styles:u}=e,v=Ce("drawer");let p;s===!1?p=void 0:s===void 0||s===!0?p="start":p=(s==null?void 0:s.placement)==="end"?"end":"start";const I=n.useCallback(g=>n.createElement("button",{type:"button",onClick:C,className:x(`${o}-close`,{[`${o}-close-${p}`]:p==="end"})},g),[C,o,p]),[P,S]=ze(ge(e),ge(v),{closable:!0,closeIconRender:I}),D=()=>{var g,w;return!r&&!P?null:n.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(g=v.styles)===null||g===void 0?void 0:g.header),O),u==null?void 0:u.header),className:x(`${o}-header`,{[`${o}-header-close-only`]:P&&!r&&!i},(w=v.classNames)===null||w===void 0?void 0:w.header,d==null?void 0:d.header)},n.createElement("div",{className:`${o}-header-title`},p==="start"&&S,r&&n.createElement("div",{className:`${o}-title`},r)),i&&n.createElement("div",{className:`${o}-extra`},i),p==="end"&&S)},N=()=>{var g,w;if(!l)return null;const M=`${o}-footer`;return n.createElement("div",{className:x(M,(g=v.classNames)===null||g===void 0?void 0:g.footer,d==null?void 0:d.footer),style:Object.assign(Object.assign(Object.assign({},(w=v.styles)===null||w===void 0?void 0:w.footer),E),u==null?void 0:u.footer)},l)};return n.createElement(n.Fragment,null,D(),n.createElement("div",{className:x(`${o}-body`,d==null?void 0:d.body,(t=v.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(a=v.styles)===null||a===void 0?void 0:a.body),y),u==null?void 0:u.body)},b?n.createElement(Ve,{active:!0,title:!1,paragraph:{rows:5},className:`${o}-body-skeleton`}):f),N())},Qe=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Se=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),ke=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Se({opacity:e},{opacity:1})),Je=(e,t)=>[ke(.7,t),Se({transform:Qe(e)},{transform:"none"})],et=e=>{const{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:ke(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((o,r)=>Object.assign(Object.assign({},o),{[`&-${r}`]:Je(r,a)}),{})}}},tt=e=>{const{borderRadiusSM:t,componentCls:a,zIndexPopup:o,colorBgMask:r,colorBgElevated:l,motionDurationSlow:i,motionDurationMid:s,paddingXS:b,padding:C,paddingLG:O,fontSizeLG:y,lineHeightLG:E,lineWidth:f,lineType:d,colorSplit:u,marginXS:v,colorIcon:p,colorIconHover:I,colorBgTextHover:P,colorBgTextActive:S,colorText:D,fontWeightStrong:N,footerPaddingBlock:g,footerPaddingInline:w,calc:M}=e,R=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:D,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:o,background:r,pointerEvents:"auto"},[R]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${R}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${R}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${R}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${R}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Z(C)} ${Z(O)}`,fontSize:y,lineHeight:E,borderBottom:`${Z(f)} ${d} ${u}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:M(y).add(b).equal(),height:M(y).add(b).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:p,fontWeight:N,fontSize:y,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${s}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:v},[`&:not(${a}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:I,backgroundColor:P,textDecoration:"none"},"&:active":{backgroundColor:S}},Le(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:y,lineHeight:E},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:O,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${Z(g)} ${Z(w)}`,borderTop:`${Z(f)} ${d} ${u}`},"&-rtl":{direction:"rtl"}}}},nt=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),Oe=He("Drawer",e=>{const t=Ke(e,{});return[tt(t),et(t)]},nt);var $e=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a};const at={distance:180},ot=e=>{const{rootClassName:t,width:a,height:o,size:r="default",mask:l=!0,push:i=at,open:s,afterOpenChange:b,onClose:C,prefixCls:O,getContainer:y,panelRef:E=null,style:f,className:d,visible:u,afterVisibleChange:v,maskStyle:p,drawerStyle:I,contentWrapperStyle:P,destroyOnClose:S,destroyOnHidden:D}=e,N=$e(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),{getPopupContainer:g,getPrefixCls:w,direction:M,className:R,style:Q,classNames:K,styles:z}=Ce("drawer"),$=w("drawer",O),[W,J,ee]=Oe($),X=y===void 0&&g?()=>g(document.body):y,te=x({"no-mask":!l,[`${$}-rtl`]:M==="rtl"},t,J,ee),ne=n.useMemo(()=>a??(r==="large"?736:378),[a,r]),h=n.useMemo(()=>o??(r==="large"?736:378),[o,r]),T={motionName:he($,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_=L=>({motionName:he($,`panel-motion-${L}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),A=Ue(),B=We(E,A),[ae,oe]=Te("Drawer",N.zIndex),{classNames:F={},styles:H={}}=N;return W(n.createElement(Ae,{form:!0,space:!0},n.createElement(Be.Provider,{value:oe},n.createElement(Ze,Object.assign({prefixCls:$,onClose:C,maskMotion:T,motion:_},N,{classNames:{mask:x(F.mask,K.mask),content:x(F.content,K.content),wrapper:x(F.wrapper,K.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},H.mask),p),z.mask),content:Object.assign(Object.assign(Object.assign({},H.content),I),z.content),wrapper:Object.assign(Object.assign(Object.assign({},H.wrapper),P),z.wrapper)},open:s??u,mask:l,push:i,width:ne,height:h,style:Object.assign(Object.assign({},Q),f),className:x(R,d),rootClassName:te,getContainer:X,afterOpenChange:b??v,panelRef:B,zIndex:ae,destroyOnClose:D??S}),n.createElement(xe,Object.assign({prefixCls:$},N,{onClose:C}))))))},rt=e=>{const{prefixCls:t,style:a,className:o,placement:r="right"}=e,l=$e(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=n.useContext(Fe),s=i("drawer",t),[b,C,O]=Oe(s),y=x(s,`${s}-pure`,`${s}-${r}`,C,O,o);return b(n.createElement("div",{className:y,style:a},n.createElement(xe,Object.assign({prefixCls:s},l))))};ot._InternalPanelDoNotUseOrYouWillBeFired=rt;export{ot as D};