lu-lowcode-package-form 0.10.18 → 0.10.20

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs.js CHANGED
@@ -402,7 +402,7 @@ function print() { __p += __j.call(arguments, '') }
402
402
  transform: rotate(360deg);
403
403
  }
404
404
  }
405
- `,gLt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vLt,n=J.useContext(rJe),r=n.csp;J.useEffect(function(){Cd(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},mLt=["icon","className","onClick","style","primaryColor","secondaryColor"],dT={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function yLt(e){var t=e.primaryColor,n=e.secondaryColor;dT.primaryColor=t,dT.secondaryColor=n||TJe(t),dT.calculated=!!n}function bLt(){return ve({},dT)}var dx=function(t){var n=t.icon,r=t.className,o=t.onClick,i=t.style,a=t.primaryColor,l=t.secondaryColor,s=Nn(t,mLt),u=dT;if(a&&(u={primaryColor:a,secondaryColor:l||TJe(a)}),gLt(),hLt(G$e(n),"icon should be icon definiton, but got ".concat(n)),!G$e(n))return null;var c=n;return c&&typeof c.icon=="function"&&(c=ve(ve({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),Joe(c.icon,"svg-".concat(c.name),ve({className:r,onClick:o,style:i,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};dx.displayName="IconReact";dx.getTwoToneColors=bLt;dx.setTwoToneColors=yLt;function RJe(e){var t=PJe(e),n=Ce(t,2),r=n[0],o=n[1];return dx.setTwoToneColors({primaryColor:r,secondaryColor:o})}function ELt(){var e=dx.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var SLt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];RJe("#1890ff");var tE=T.forwardRef(function(e,t){var n=e.className,r=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,l=e.onClick,s=e.twoToneColor,u=Nn(e,SLt),c=T.useContext(rJe),f=c.prefixCls,d=f===void 0?"anticon":f,p=c.rootClassName,g=Ne(p,d,ae(ae({},"".concat(d,"-").concat(r.name),!!r.name),"".concat(d,"-spin"),!!o||r.name==="loading"),n),y=a;y===void 0&&l&&(y=-1);var h=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,m=PJe(s),v=Ce(m,2),b=v[0],E=v[1];return T.createElement("span",ve(ve({role:"img","aria-label":r.name},u),{},{ref:t,tabIndex:y,onClick:l,className:g}),T.createElement(dx,{icon:r,primaryColor:b,secondaryColor:E,style:h}))});tE.displayName="AntdIcon";tE.getTwoToneColor=ELt;tE.setTwoToneColor=RJe;var wLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:zZe}))},xve=T.forwardRef(wLt);process.env.NODE_ENV!=="production"&&(xve.displayName="DeleteOutlined");var CLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:GQe}))},IJe=T.forwardRef(CLt);process.env.NODE_ENV!=="production"&&(IJe.displayName="EyeOutlined");var xLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:SNt}))},NJe=T.forwardRef(xLt);process.env.NODE_ENV!=="production"&&(NJe.displayName="PlusOutlined");var ALt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 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:"upload",theme:"outlined"},OLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:ALt}))},MJe=T.forwardRef(OLt);process.env.NODE_ENV!=="production"&&(MJe.displayName="UploadOutlined");function FJe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"id",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"children",i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return $Lt(e,t,n,r,o,i,l=>({value:l[t],title:l[n],key:l[t],disabled:l[t]===a}))}function $Lt(e,t,n,r,o,i,a){if(!Array.isArray(e)||e.length===0)return[];const l=e.map(s=>({...s,...a(s)}));return l.filter(s=>{const u=l.filter(c=>s[t]===c[r]);return s[o]=u.length>0?u:[],s[r]===i})}const BJe=e=>{let{request:t,title:n,disabledValue:r,callError:o,...i}=e;const[a,l]=J.useState(!1),[s,u]=J.useState([]);J.useEffect(()=>{c()},[]);const c=async()=>{if(t&&typeof t=="function"){var f;const d=await t();if(d.code>0){o&&typeof o=="function"&&o(d.message);return}let p=FJe(((f=d.data)===null||f===void 0?void 0:f.list)||d.data||[],"id",n||"title",i.parentId||"parentId","children",0,r);p=[{value:0,title:"根节点",children:p}],i.treeData=p,u(p)}i.treeData&&u(i.treeData),l(!0)};return ze.jsx(hi,{...i,children:a&&ze.jsx(u0,{...i,treeData:s,treeDefaultExpandAll:!0,style:{width:"100%"}})})},Ave=J.forwardRef((e,t)=>{let{addWrapper:n=!0,form:r,fieldName:o,fieldsValue:i,value:a,type:l,defaultValue:s,onChange:u,option_label:c,option_value:f,option_search:d,options:p,request:g,requestParams:y,callError:h,subRequest:m,sub_option_label:v="label",mode:b="single",sub_option_value:E="id",rightIconRender:S,rightIcon:w,rightIconClick:C,...O}=e;const[D,x]=J.useState([]),[$,P]=J.useState(!1);J.useEffect(()=>{if(console.log("SearchSelect ".concat(o," value"),a),a&&D.length>0){let H=D.find(_=>_.value==(a==null?void 0:a.value)||_.value==a);H&&!Dg.isEqual(H,a)&&(console.log("new value /////",H),typeof u=="function"&&u(H)),H||N()}},[a]),J.useEffect(()=>{M(y)},[y]);const N=async()=>{g&&f&&k({...y,[f]:a==null?void 0:a.value},null,H=>{if(console.log("loadSelectOptions selectOptions",H),H&&H.length>0){let _=H.find(R=>R.value==(a==null?void 0:a.value)||R.value==a);console.log("loadSelectOptions item",_),_&&!Dg.isEqual(_,a)&&(console.log("new value /////",_),typeof u=="function"&&u(_))}})},M=async H=>{const _={};if(Array.isArray(O==null?void 0:O.filterRules))for(let G of O==null?void 0:O.filterRules){var R,F,j,U;let W;G.value.parent===""?W=i==null?void 0:i[G.value.field_key]:W=i==null||(R=i[G.value.parent])===null||R===void 0||(F=R[o==null?void 0:o[1]])===null||F===void 0?void 0:F[G.value.field_key],W&&(j=W)!==null&&j!==void 0&&j.value&&(W=W.value),_[G.column.column_name]=(U=W)!==null&&U!==void 0?U:"##norequest##"}g&&typeof g=="function"&&k(H,_),p&&p.length>0&&x(p)},B=async H=>{const _={...y};_[d]=H,await k(_)},k=Dg.debounce((H,_,R)=>{L(H,_).then(F=>{typeof R=="function"&&R(F)})},200),L=async(H,_)=>{try{let F=[];if(!(_&&Object.values(_).some(j=>j==="##norequest##"))){var R;P(!0);const j=await g({...H,ruleParams:_});P(!1),j.code>0?h&&typeof h=="function"&&h(j.message):F=((R=j.data)===null||R===void 0?void 0:R.list)||j.data}if(Array.isArray(F)){for(let j=0;j<F.length;j++){const U=F[j];if(typeof m=="function"){let G=[];const{data:W}=await m(U);W!=null&&W.list&&Array.isArray(W.list)&&(G=W.list.map(K=>({label:"".concat(U[c],"-").concat(K[v]),value:"".concat(U[f],"-").concat(K[E])}))),F[j]={...U,label:U[c],title:U[c],options:G}}F[j]={...U,label:U[c],value:U[f]}}D.length>0&&!Dg.isEqual(D,F)&&typeof u=="function"&&u(void 0),x(F)}else x([]);return F}catch(F){console.error("fetchOptions",F),P(!1)}finally{}},z=H=>{Array.isArray(H)?u(H.map(_=>D.find(R=>R.value===_))):u(D.find(_=>_.value===H))};return n?ze.jsxs(hi,{...O,children:[ze.jsx(Bd,{ref:t,notFoundContent:$?ze.jsx(P4,{size:"small"}):null,value:a,...O,filterOption:!1,showSearch:!!(g&&d),onSearch:g&&d?B:null,onChange:z,style:{width:"100%",flex:1},options:D,mode:b}),!(O!=null&&O.disabled)&&w,!(O!=null&&O.disabled)&&typeof S=="function"&&S({value:a,onChange:u,form:r,fieldName:o})]}):ze.jsxs(ze.Fragment,{children:[ze.jsx(Bd,{ref:t,notFoundContent:$?ze.jsx(P4,{size:"small"}):null,value:a,...O,filterOption:!1,showSearch:!!(g&&d),onSearch:g&&d?B:null,onChange:z,style:{width:"100%"},options:D,mode:b}),!(O!=null&&O.disabled)&&w,!(O!=null&&O.disabled)&&typeof S=="function"&&S({value:a,onChange:u,form:r,fieldName:o})]})}),Ove=e=>{let{request:t,option_label:n="label",option_value:r="id",disabledValue:o,callError:i,options:a,addWrapper:l=!0,...s}=e;const[u,c]=J.useState([]);J.useEffect(()=>{f()},[]);const f=async()=>{if(t&&typeof t=="function"){var d;const p=await t();if(p.code>0){i&&typeof i=="function"&&i(p.message);return}let g=((d=p.data)===null||d===void 0?void 0:d.list)||p.data;Array.isArray(g)&&g.length>0&&c(g.map(y=>({label:y[n],value:y[r]})))}a&&a.length>0&&c(a)};return l?ze.jsx(hi,{...s,children:ze.jsx(Bd,{...s,options:u,style:{width:"100%"}})}):ze.jsx(Bd,{...s,options:u,style:{width:"100%"}})},DLt=e=>{let{...t}=e;return ze.jsx(Ove,{...t,mode:"single"})},TLt=e=>{let{onChange:t,value:n,...r}=e;const[o,i]=J.useState([]);return J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n)}catch{}n&&i(n)},[n]),ze.jsx(Ove,{...r,onChange:t,mode:"multiple",value:o})},kJe=e=>{var t,n;let{readItemRender:r,readonly:o,onChange:i,onCustomChange:a,value:l,form:s,fieldName:u,...c}=e;return J.useEffect(()=>{if(l&&typeof l=="string")try{l=JSON.parse(l),s==null||s.setFieldValue(u,l),console.log("WithSingleSelect useEffect onChange////// form",s),console.log("WithSingleSelect useEffect onChange////// fieldName",u),console.log("WithSingleSelect useEffect onChange////// value",l)}catch(f){console.log("WithSingleSelect useEffect error",f)}},[l]),o?ze.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:l&&l.label&&ze.jsx(ze.Fragment,{children:r&&typeof r=="function"?r(l):ze.jsx("span",{children:(t=l)===null||t===void 0?void 0:t.label},"btn_".concat((n=l)===null||n===void 0?void 0:n.value))})}):ze.jsx(Ave,{addWrapper:!1,form:s,fieldName:u,...c,onChange:i,value:l,mode:"single",className:" fflex-1 foverflow-hidden"})},LJe=e=>{let{readItemRender:t,readonly:n,onChange:r,value:o,form:i,fieldName:a,...l}=e;return J.useEffect(()=>{if(o&&typeof o=="string")try{o=JSON.parse(o),r(o)}catch{}},[o]),n?ze.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:Array.isArray(o)&&o.map((s,u)=>ze.jsxs(ze.Fragment,{children:[" ",t&&typeof t=="function"?t(s):ze.jsx("span",{children:s==null?void 0:s.label},"btn_".concat(s==null?void 0:s.value)),u<o.length-1?ze.jsx("span",{className:" ftext-gray-400",children:","}):null]}))}):ze.jsx(Ave,{addWrapper:!1,form:i,fieldName:a,...l,onChange:r,value:o,mode:"multiple",className:" fflex-1 foverflow-hidden"})},PLt=e=>{let{customComponent:t,...n}=e;return t?ze.jsx(hi,{...n,children:ze.jsx(t,{...n})}):ze.jsx(hi,{...n,children:ze.jsx(Lh,{...n})})},jJe=e=>{let{onChange:t,value:n,multiple:r,...o}=e;const[i,a]=J.useState();J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n);return}catch{}r?Array.isArray(n)&&a(n):(Array.isArray(n)&&(n=n[0]),a(n))},[n]);const l=s=>{Array.isArray(s)||(s=[s]),t&&typeof t=="function"&&t(s)};return ze.jsx(BJe,{...o,onChange:l,value:i,multiple:r})},RLt=e=>{let{FetchDeptList:t,...n}=e;return ze.jsx(jJe,{...n,title:"deptName",request:t})},ILt=e=>{let{FetchPostList:t,...n}=e;return ze.jsx(jJe,{...n,title:"postName",request:t})};kJe.displayName="WithSingleSelect";LJe.displayName="WithMultipleSelect";const NLt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),ze.jsx(hi,{...e,children:ze.jsx(kJe,{...e})}))),MLt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),ze.jsx(hi,{...e,children:ze.jsx(LJe,{...e})}))),FLt=J.forwardRef((e,t)=>{let{value:n,onChange:r,...o}=e;const i=J.useRef(0),a=()=>{i.current++,r(i.current)};return ze.jsxs(hi,{...o,children:[ze.jsxs("div",{ref:t,children:["form-set-value:",n]}),ze.jsx(du,{onClick:a,children:"test"})]})}),BLt=e=>{let t="",n="";try{n="return ".concat(e.join("")),t=new Function(n)(),t=t.toString()}catch(r){console.error("formula (".concat(n,") error"),r)}return t},kLt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let FA=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=kLt[n[e]&63];return t};var _Je={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(s,u,c){this.fn=s,this.context=u,this.once=c||!1}function i(s,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var p=new o(c,f||s,d),g=n?n+u:u;return s._events[g]?s._events[g].fn?s._events[g]=[s._events[g],p]:s._events[g].push(p):(s._events[g]=p,s._eventsCount++),s}function a(s,u){--s._eventsCount===0?s._events=new r:delete s._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},l.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,g=new Array(p);d<p;d++)g[d]=f[d].fn;return g},l.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,c,f,d,p,g){var y=n?n+u:u;if(!this._events[y])return!1;var h=this._events[y],m=arguments.length,v,b;if(h.fn){switch(h.once&&this.removeListener(u,h.fn,void 0,!0),m){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,c),!0;case 3:return h.fn.call(h.context,c,f),!0;case 4:return h.fn.call(h.context,c,f,d),!0;case 5:return h.fn.call(h.context,c,f,d,p),!0;case 6:return h.fn.call(h.context,c,f,d,p,g),!0}for(b=1,v=new Array(m-1);b<m;b++)v[b-1]=arguments[b];h.fn.apply(h.context,v)}else{var E=h.length,S;for(b=0;b<E;b++)switch(h[b].once&&this.removeListener(u,h[b].fn,void 0,!0),m){case 1:h[b].fn.call(h[b].context);break;case 2:h[b].fn.call(h[b].context,c);break;case 3:h[b].fn.call(h[b].context,c,f);break;case 4:h[b].fn.call(h[b].context,c,f,d);break;default:if(!v)for(S=1,v=new Array(m-1);S<m;S++)v[S-1]=arguments[S];h[b].fn.apply(h[b].context,v)}}return!0},l.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},l.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},l.prototype.removeListener=function(u,c,f,d){var p=n?n+u:u;if(!this._events[p])return this;if(!c)return a(this,p),this;var g=this._events[p];if(g.fn)g.fn===c&&(!d||g.once)&&(!f||g.context===f)&&a(this,p);else{for(var y=0,h=[],m=g.length;y<m;y++)(g[y].fn!==c||d&&!g[y].once||f&&g[y].context!==f)&&h.push(g[y]);h.length?this._events[p]=h.length===1?h[0]:h:a(this,p)}return this},l.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(_Je);var LLt=_Je.exports;const jLt=ql(LLt),eie=new jLt,_Lt=e=>{let{children:t,layout:n,onTableAddRow:r,onTableRemoveRow:o,form:i}=e;n=n||"1";const a=u=>{const c=u.split(",").map(Number),f=24;return c.map(d=>d/c.reduce((p,g)=>p+g)*f)},l=J.useMemo(()=>a(n),[n]),s=J.useMemo(()=>J.Children.toArray(t).map((u,c)=>{var f,d;const p=u.props,g=(p==null?void 0:p.componentId)||(p==null?void 0:p.__id);var y=((f=u.type)===null||f===void 0?void 0:f.displayName)||((d=u.props)===null||d===void 0?void 0:d._componentName);let h=null;if(y=="Field.Table"?h=J.cloneElement(u,{onTableAddRow:r,onTableRemoveRow:o,form:i,fieldName:g}):J.isValidElement(u)?h=J.cloneElement(u,{form:i,fieldName:g}):h=u,g){const m=[];if(p.isRequired&&m.push({required:!0,message:"".concat(p.label,"必须填写")}),p.rules)if(Array.isArray(p.rules)){const v=p.rules.join("|");m.push({pattern:new RegExp(v),message:p.rulesFailMessage?p.rulesFailMessage:"".concat(p.label,"格式错误")})}else m.push({pattern:new RegExp(p.rules),message:p.rulesFailMessage?p.rulesFailMessage:"".concat(p.label,"格式错误")});return(l==null?void 0:l[c])&&ze.jsx(_C,{span:l[c],children:ze.jsx(cl.Item,{style:{marginBottom:0},label:"",name:g,rules:m,children:h},"".concat(g,"-form-item"))},c)}else return(l==null?void 0:l[c])&&ze.jsx(_C,{span:l[c],children:h},c)}),[t,l]);return ze.jsx(Tj,{gutter:24,children:s})},HLt=e=>{let{title:t}=e;return t?ze.jsx("div",{className:"fh-11 fflex fitems-center ftext-lg ffont-medium ",children:ze.jsx("span",{className:"fborder-l-4 fborder-slate-300 fpl-2 ",children:t})}):null};function zLt(e,t){const n=[];let r=[];const o=(a,l)=>{const s=a-l.length;l.push(...new Array(s).fill(J.createElement("div")))};for(const a of e){var i;const{_componentName:l}=(a==null?void 0:a.props)||{},s=((i=a.type)===null||i===void 0?void 0:i.displayName)||l;s&&s.startsWith("Layout.")?(r.length>0&&(o(t,r),n.push(r),r=[]),n.push([a])):(r.push(a),r.length===t&&(n.push(r),r=[]))}return r.length>0&&(o(t,r),n.push(r)),n}const $ve=J.forwardRef((e,t)=>{let{cols:n=1,children:r,mode:o="view"}=e;const[i]=cl.useForm(),[a,l]=J.useState(null),s=J.useRef(null),u=J.useRef(0);J.useImperativeHandle(t,()=>({formRef:i,setFieldsValue:D=>{u.current=1,i.setFieldsValue(D)},initializeFieldVisibility:p}),[]),J.useEffect(()=>{d(),l(O())},[r,n]);const c=J.useRef(null),f=D=>{var x;return(x=c.current)===null||x===void 0?void 0:x[D]},d=()=>{const D=[];function x(P){var N,M;let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;var k=((N=P.type)===null||N===void 0?void 0:N.displayName)||((M=P.props)===null||M===void 0?void 0:M._componentName);const{props:L}=P;if(k&&(k.startsWith("Field.")||k.startsWith("Layout."))){let _=(L==null?void 0:L.componentId)||(L==null?void 0:L.__id),R=[];if(B&&B!==null&&B!==void 0&&B.props){var z,H;_="".concat((B==null||(z=B.props)===null||z===void 0?void 0:z.componentId)||(B==null||(H=B.props)===null||H===void 0?void 0:H.__id),".").concat(_)}L!=null&&L.withId&&R.push(L==null?void 0:L.withId),L!=null&&L.withIds&&(R=[...R,...L==null?void 0:L.withIds]),D.push({identifier:_,withIds:R,component:P,componentName:k,fillRules:L==null?void 0:L.fillRules})}L!=null&&L.children&&J.Children.toArray(L==null?void 0:L.children).forEach(R=>x(R,k&&k.startsWith("Field.")?P:null))}s.current=new Map,console.log(" fields",D);const $=J.Children.toArray(r);for(let P=0;P<$.length;P++){const N=$[P];x(N)}D.forEach(P=>{const{identifier:N}=P;s.current.set(N,{children:D.filter(M=>M.withIds.some(B=>B==N)),show:!0,...P})}),console.log(" dependencyMap.current",s.current),p()},p=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const x=i.getFieldsValue();for(let $ of s.current.keys())g($,x,!0);D&&l(O())},g=function(D,x){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,P=!1,N=[];if(Array.isArray(D)&&(N=[...D.slice(0,-1)],D=D.filter(M=>typeof M=="string").join(".")),s.current.has(D)){const M=s.current.get(D),B=M.children;!$&&M!==null&&M!==void 0&&M.fillRules&&Array.isArray(M==null?void 0:M.fillRules)&&(M==null?void 0:M.fillRules.length)>0&&y(D,N,x,M==null?void 0:M.fillRules),B.forEach(k=>{k.component.props.withFunc&&typeof k.component.props.withFunc=="function"&&(P=h(x,k)),!$&&k.component.props.withFill&&m(x,k,N,M==null?void 0:M.componentName)})}return P},y=(D,x,$,P)=>{let N=v("fieldsValue",D,$,null),M={},B=[];for(let _=0;_<P.length;_++){const R=P[_];let{source:F,target:j}=R,U=N==null?void 0:N[F],G=U;if((R==null?void 0:R.type)==1){if(s.current.has(j)){var k,L,z;let K=(k=s.current.get(j))===null||k===void 0||(L=k.component)===null||L===void 0||(z=L.props)===null||z===void 0?void 0:z.children;Array.isArray(K)&&K.length>0&&B.push(K.map(q=>{var Q,Z;return"".concat(F,".").concat((q==null||(Q=q.props)===null||Q===void 0?void 0:Q.componentId)||(q==null||(Z=q.props)===null||Z===void 0?void 0:Z.__id))}))}if(U&&typeof U=="string")try{U=JSON.parse(U)}catch(K){console.error("error end",K)}if(!Array.isArray(U))return;G=U.map((K,q)=>{let Q={};if(R!=null&&R.subRules&&Array.isArray(R==null?void 0:R.subRules)&&(R==null?void 0:R.subRules.length)>0)for(let Z=0;Z<(R==null?void 0:R.subRules.length);Z++){const{source:Y,target:ne}=R==null?void 0:R.subRules[Z];Q[ne]=K==null?void 0:K[Y];let le={name:[j,q,ne],value:K==null?void 0:K[Y]};M[le.name]=le}return Q}),eie.emit("reloadTable",j)}else{let W=0;if(x&&Array.isArray(x)&&x.length>1&&(x.filter(K=>typeof K=="string").join("."),W=x[x.length-1],j=[...x,j],Array.isArray(N)&&N.length>W)){var H;G=(H=N[W])===null||H===void 0?void 0:H[F]}M[j]={name:[j],value:G}}(R==null?void 0:R.type)==1&&i.setFieldValue(j,void 0),i.setFieldValue(j,G)}setTimeout(()=>{var _=Object.keys(M);_.length>0&&(_.forEach(R=>{b.current[R]=M[R]}),E()),B.length>0&&B.forEach(R=>{Array.isArray(R)&&R.length>0&&w(R)})},0)},h=(D,x,$)=>{var P,N;let M=!1;const B=x==null||(P=x.component)===null||P===void 0||(N=P.props)===null||N===void 0?void 0:N.withFunc(D),k=x==null?void 0:x.identifier;if(s.current.has(k)){const L=s.current.get(k);L.show!==B&&(L.show=B,s.current.set(k,L),M=!0)}return M},m=async(D,x,$,P)=>{var N,M;const B=x==null||(N=x.component)===null||N===void 0?void 0:N.props.withFill,k=x==null||(M=x.component)===null||M===void 0?void 0:M.props.withDataFetch;let L=0,z="",H=x.identifier;if($&&Array.isArray($)&&$.length>1)z=$.filter(j=>typeof j=="string").join("."),L=$[$.length-1],H.startsWith("".concat(z,"."))&&(H=[...$,H.replace("".concat(z,"."),"")]);else if(H.indexOf(".")>=0){H=H.split(".");let j=v("fieldsValue",H[0],D,[]);if(Array.isArray(j)&&j.length>0)for(let U=0;U<j.length;U++)await m(D,x,[H[0],U],P);return}let _=[];if(B!=null&&B.withData&&(B==null?void 0:B.withData.length)>0&&k&&typeof k=="function")for(let j=0;j<(B==null?void 0:B.withData.length);j++){const U=B==null?void 0:B.withData[j];let G={};G.tableName=U.withTable.table_name,G.filter={};for(let K=0;K<U.withCondition.length;K++){var R;const{value:q,column:Q}=U.withCondition[K];let Z=v(q.group_key,q.field_key,D,_);Array.isArray(Z)&&Array.isArray(H)&&Z.length>L&&(Z=Z[L]),P=="Field.WithSingleSelect"&&Z&&(R=Z)!==null&&R!==void 0&&R.value&&(Z=Z.value),G.filter[Q.column_name]=Z}const W=await k(G);W.code===0&&W.data.list&&_.push({id:U.id,data:W.data.list})}let F;if(B.value&&B.value.length>0&&(F=B.value.map(j=>{let U="";const{insert:G,attributes:W}=j;return typeof G!="string"?G!=null&&G.span&&W&&W.tagKey&&W.id&&(U=v(W.tagKey,W.id,D,_),Array.isArray(U)?Array.isArray(H)&&U.length>L?U=U[L]:U=JSON.stringify(U):U.length>0&&(U='"'.concat(U,'"'))):U=G,U})),F&&F.length>0){const j=BLt(F);i.setFieldValue(H,j),g(H,i.getFieldsValue())}},v=(D,x,$,P)=>{let N="";if(D=="fieldsValue"){var M;if(x.indexOf(".")>=0){var B;const[z,H]=x.split("."),_=($==null?void 0:$[z])||[];Array.isArray(_)?N=_.map(R=>{var F;return(F=R==null?void 0:R[H])!==null&&F!==void 0?F:""}):N=(B=_==null?void 0:_[H])!==null&&B!==void 0?B:""}else N=(M=$==null?void 0:$[x])!==null&&M!==void 0?M:""}else{let z=P.find(H=>H.id===D);if(z&&z.data&&z.data.length>0){var k,L;N=(k=(L=z.data[0])===null||L===void 0?void 0:L[x])!==null&&k!==void 0?k:""}}return N},b=J.useRef({}),E=Dg.debounce(()=>{const D=i.getFieldsValue(),x=u.current;u.current=0;let $=!1;c.current||(c.current={});for(let P in b.current){let N=b.current[P];Dg.isEqual(N.value,f(N.name))||(x!=1&&($=g(N.name,D)),c.current[N.name]=N.value)}$&&l(O()),b.current={}},100),S=D=>{D.filter(x=>{x.name&&x.name.length>0&&(b.current[x.name]=x)}),E()},w=D=>{let x=[];D.forEach(P=>{if(!s.current.has(P))return;let N=s.current.get(P);N.withIds.length<=0||x.push(...N.withIds.filter(M=>!x.includes(M)))}),x=x.filter(P=>{var N=i.getFieldValue(P);return!(typeof N!="number"&&!N)});const $=i.getFieldsValue();setTimeout(()=>{x.forEach(P=>{g(P,$)})},0)},C=D=>{const x=i.getFieldsValue();setTimeout(()=>{D.forEach($=>{g($,x)})},0)},O=()=>{const D=J.Children.toArray(r);return zLt(D.filter($=>{var P;const N=$.props.componentId||$.props.__id;return!s.current.has(N)||((P=s.current.get(N))===null||P===void 0?void 0:P.show)}),n).map(($,P)=>ze.jsx(Tj,{gutter:[24,24],children:$.map((N,M)=>{var B;const{componentId:k,__id:L,_componentName:z,...H}=N.props,_=((B=N.type)===null||B===void 0?void 0:B.displayName)||z,R=k||L,F=_&&_.startsWith("Layout."),j=_&&_=="Field.Table",U=[];if(H.isRequired&&U.push({required:!0,message:"".concat(H.label,"必须填写")}),H.rules)if(Array.isArray(H.rules)){const K=H.rules.join("|");U.push({pattern:new RegExp(K),message:H.rulesFailMessage?H.rulesFailMessage:"".concat(H.label,"格式错误")})}else U.push({pattern:new RegExp(H.rules),message:H.rulesFailMessage?H.rulesFailMessage:"".concat(H.label,"格式错误")});const G=K=>{i.setFieldValue(R,K)};let W;return j||F?W=J.cloneElement(N,{onTableAddRow:w,onTableRemoveRow:C,form:i,fieldName:R,onCustomChange:G}):_==="Field.WithSingleSelect"||_==="Field.WithMultipleSelect"?W=ze.jsx(cl.Item,{style:{margin:0},shouldUpdate:(K,q)=>{let Q=!1;if(Array.isArray(H.filterRules)&&H.filterRules.length>0)for(let Z of H.filterRules){if(Z.value.parent!="")continue;let Y,ne;if(Y=K==null?void 0:K[Z.value.field_key],ne=q==null?void 0:q[Z.value.field_key],Y!==ne){Q=!0;break}}return Q},children:K=>{let{getFieldsValue:q}=K;const Q=q();return ze.jsx(cl.Item,{style:{marginBottom:0},label:"",name:R,rules:U,children:J.cloneElement(N,{onTableAddRow:w,onTableRemoveRow:C,form:i,fieldName:R,onCustomChange:G,fieldsValue:Q})})}}):W=ze.jsx(cl.Item,{style:{marginBottom:0},label:"",name:R,rules:U,children:J.cloneElement(N,{form:i,fieldName:R,onCustomChange:G})}),ze.jsx(_C,{span:F?24:24/$.length,style:{marginBottom:0},children:W},R||"col-".concat(M))})},"row-".concat(P)))};return ze.jsx(cl,{form:i,className:"form-container fp-0 fw-full fh-full box-border fflex fflex-col fgap-y-2"+(o=="desgin"?" fp-6":""),onValuesChange:(D,x)=>{},onFieldsChange:S,children:a})});function VLt(e){return J.forwardRef((t,n)=>ze.jsx(e,{...t,ref:n,forwardedRef:n}))}class Ygr extends J.PureComponent{render(){const{forwardedRef:t,...n}=this.props;return ze.jsx($ve,{...n,ref:t})}}const ULt=VLt(e=>{let{forwardedRef:t,...n}=e;return ze.jsx($ve,{...n,ref:t})}),WLt=e=>{let{request:t,value:n,onChange:r,callError:o,disabledValue:i,addRoot:a=!0,title:l,...s}=e;const[u,c]=J.useState(!1),[f,d]=J.useState([]);J.useEffect(()=>{p()},[]),J.useEffect(()=>{if(typeof n=="string")try{n=JSON.parse(n),r(n)}catch{}Array.isArray(n)&&m(n)},[n]);const p=async()=>{if(t&&typeof t=="function"){var D;const x=await t();if(x.code>0){o&&typeof o=="function"&&o(x.message);return}let $=FJe(((D=x.data)===null||D===void 0?void 0:D.list)||x.data||[],"id",l||"title",(s==null?void 0:s.parentId)||"parentId","children",0,i);a&&($=[{value:0,title:"根节点",children:$}]),s.treeData=$,console.log("treeData",$),d($)}s.treeData&&d(s.treeData),c(!0)},[g,y]=J.useState([]),[h,m]=J.useState([]),[v,b]=J.useState([]),[E,S]=J.useState(!0),w=D=>{console.log("onExpand",D),y(D),S(!1)},C=D=>{console.log("onCheck",D),m(D),r(D)},O=(D,x)=>{console.log("onSelect",x),b(D)};return ze.jsx(hi,{...s,children:ze.jsx(bve,{checkable:!0,onExpand:w,onCheck:C,onSelect:O,expandedKeys:g,autoExpandParent:E,checkedKeys:h,selectedKeys:v,treeData:f})})},GLt=e=>ze.jsx(hi,{...e,children:ze.jsx(K3,{...e})}),KLt=e=>ze.jsx(hi,{...e,children:ze.jsx(K3.Group,{...e})}),qLt=e=>ze.jsx(hi,{...e,children:ze.jsx(Aj.Group,{...e})}),HJe=e=>{let{value:t,maxCount:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(t){if(typeof t=="string")try{t=JSON.parse(t),o(t)}catch{}console.log("value",t),Array.isArray(t)&&l(t)}},[t]),n=n||99,r=r||!0;const[a,l]=J.useState([]),s=u=>{let{fileList:c}=u;console.log("newFileList",c),c=c.map(f=>(f.status=="done"&&f.response&&(f.url=f.response),f)),o(c.map(f=>({uid:f.uid,name:f.name,status:f.status,url:f.url||f.response||"",error:f.error}))),l(c)};return ze.jsx(Bj,{...i,listType:"text",multiple:r,onChange:s,maxCount:n,fileList:a,children:!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&a.length<n&&ze.jsx(du,{type:(i==null?void 0:i.type)||"default",icon:(i==null?void 0:i.icon)||ze.jsx(MJe,{}),children:"点击上传文件"})})};HJe.displayName="UploadFile";const YLt=e=>ze.jsx(hi,{...e,children:ze.jsx(HJe,{...e})}),zJe=e=>{let{maxCount:t,value:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(n){if(console.log("value",n),typeof n=="string")try{n=JSON.parse(n),o(n)}catch{}let S=[];if(Array.isArray(n))for(let w=0;w<n.length;w++){let C=n[w];var E=g.current.find(O=>O.uid===C.uid);!E||(E.version||0)<(C.version||0)?S.push(C):S.push(E)}l(S)}},[n]),t=t||99,r=r||!0,console.log("maxCount",t);const[a,l]=J.useState([]),[s,u]=J.useState(""),[c,f]=J.useState(0),[d,p]=J.useState(!1),g=J.useRef([]),y=E=>new Promise((S,w)=>{const C=new FileReader;C.readAsDataURL(E),C.onload=()=>S(C.result),C.onerror=O=>w(O)}),h=async(E,S)=>{!E.url&&!E.preview&&(E.preview=await y(E.originFileObj)),u(E.url||E.preview),f(S),p(!0)},m=async(E,S)=>{i!=null&&i.disabled||l(a.filter((w,C)=>C!==S))},v=ze.jsx(ze.Fragment,{children:ze.jsxs("div",{className:"fw-full fh-full fflex fflex-col fitems-center fjustify-center fborder fborder-dashed fcursor-pointer frounded",children:[ze.jsx(NJe,{}),ze.jsx("div",{className:"fmt-2",children:"点击上传"})]})}),b=E=>{let{fileList:S}=E,w=[];for(let D=0;D<S.length;D++){var C=S[D];C.version=new Date().getTime();var O=g.current.find(x=>x.uid===C.uid);console.log("oldfile",JSON.parse(JSON.stringify(O||{}))),O&&O.status!="uploading"?w.push(O):(C.status=="done"&&C.response&&(C.url=C.response),w.push(C))}g.current=w,l(w),o(w.map(D=>({uid:D.uid,name:D.name,status:D.status,url:D.url||D.response||"",error:D.error,version:D.version||0})))};return ze.jsxs(ze.Fragment,{children:[ze.jsx("div",{className:"fflex fgap-3 fflex-wrap",children:ze.jsx(Bj,{...i,itemRender:(E,S,w)=>{console.log("file",S);let C=w.findIndex(O=>O.uid===S.uid);return ze.jsx(ze.Fragment,{children:ze.jsxs("div",{className:"fgroup fw-full fh-full fbg-transparent fborder frounded fflex fitems-center fjustify-center foverflow-hidden fcursor-pointer frelative"+(S.status=="error"?" fborder-red-500":""),children:[ze.jsxs("div",{className:" fhidden fabsolute fw-full fh-full fbg-gray-900 fbg-opacity-50 fitems-center fjustify-center fz-10 group-hover:fflex ftext-white ftext-lg fgap-2",children:[S.status=="done"&&ze.jsx(IJe,{onClick:()=>{h(S,C)},className:"hover:ftext-gray-200"}),!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&ze.jsx(xve,{onClick:()=>{m(S,C)},className:"hover:ftext-gray-200"})]}),S.status=="uploading"&&ze.jsx("div",{className:" fw-full fh-full fflex fitems-center fjustify-center fabsolute ftop-0 fleft-0 ",children:ze.jsx(P4,{})}),ze.jsx("img",{src:S.url||S.thumbUrl,alt:"Example Image",class:"fmax-w-full fmax-h-full fobject-contain "})]},"file-".concat(S.uid))})},listType:"picture-card",fileList:a,multiple:r,onPreview:h,onChange:b,maxCount:t,children:a.length>=t||i!=null&&i.disabled||i!=null&&i.readonly?null:v})}),s&&ze.jsx(qF.PreviewGroup,{preview:{visible:d,current:c,onVisibleChange:E=>p(E),onChange:E=>{f(E)}},children:a.map((E,S)=>ze.jsx(ze.Fragment,{children:ze.jsx(qF,{wrapperStyle:{display:"none"},src:E.url})}))})]})};zJe.displayName="UploadImage";const XLt=e=>ze.jsx(hi,{...e,children:ze.jsx(zJe,{...e})}),QLt=e=>{let{value:t,onChange:n,form:r,fieldName:o,...i}=e,a=!1;return typeof t=="boolean"?a=t:typeof t=="string"?a=t=="1"||t=="true":typeof t=="number"&&(a=t==1),t!==a&&(r==null||r.setFieldValue(o,a)),ze.jsx(hi,{...i,children:ze.jsx(pve,{...i,onChange:n,value:t})})};var ZLt={exports:{}};(function(e,t){(function(n,r){e.exports=r(RXe)})(hr,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var s=100*a+l;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return o.default.locale(i,null,!0),i})})(ZLt);var JLt={locale:"zh_CN",yearFormat:"YYYY年",cellDateFormat:"D",cellMeridiemFormat:"A",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const ejt={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},VJe={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},JLt),timePickerLocale:Object.assign({},ejt)};VJe.lang.ok="确定";var UJe={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(hr,function(){return function(n,r,o){o.updateLocale=function(i,a){var l=o.Ls[i];if(l)return(a?Object.keys(a):[]).forEach(function(s){l[s]=a[s]}),l}}})})(UJe);var tjt=UJe.exports;const njt=ql(tjt);fa.extend(njt);fa.extend(LXe);fa.updateLocale("zh-cn",{weekStart:0});const rjt=e=>{let{datetype:t,value:n,defaultNow:r,onChange:o,...i}=e;t=t||"date";const[a,l]=J.useState(i==null?void 0:i.picker),[s,u]=J.useState(i==null?void 0:i.format),[c,f]=J.useState(!1),[d,p]=J.useState(!1),g=J.useRef(!1);J.useEffect(()=>{if(r&&!n){const h=fa().format("YYYY-MM-DD HH:mm:ss");typeof o=="function"&&o(h);return}},[]);const y=(h,m)=>{g.current=!0,o(m)};return J.useEffect(()=>{switch(l("date"),f(!1),t){case"date":l("date"),u("YYYY-MM-DD"),p(!1);break;case"datetime":f(!0),l("datetime"),u("YYYY-MM-DD HH:mm:ss"),p(!0);break;case"month":l("month"),p(!1);break;case"year":l("year"),p(!1);break}},[t]),ze.jsx(hi,{...i,children:ze.jsx(fx,{locale:VJe,...i,picker:a,format:s,style:{width:"100%"},onChange:y,value:n&&fa(n).isValid()?fa(n):void 0,showTime:c,needConfirm:d})})};var WJe={},Ah={},Dve={exports:{}};Dve.exports;(function(e){const n=(i=0)=>a=>`\x1B[${38+i};5;${a}m`,r=(i=0)=>(a,l,s)=>`\x1B[${38+i};2;${a};${l};${s}m`;function o(){const i=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[l,s]of Object.entries(a)){for(const[u,c]of Object.entries(s))a[u]={open:`\x1B[${c[0]}m`,close:`\x1B[${c[1]}m`},s[u]=a[u],i.set(c[0],c[1]);Object.defineProperty(a,l,{value:s,enumerable:!1})}return Object.defineProperty(a,"codes",{value:i,enumerable:!1}),a.color.close="\x1B[39m",a.bgColor.close="\x1B[49m",a.color.ansi256=n(),a.color.ansi16m=r(),a.bgColor.ansi256=n(10),a.bgColor.ansi16m=r(10),Object.defineProperties(a,{rgbToAnsi256:{value:(l,s,u)=>l===s&&s===u?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(s/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:l=>{const s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(l.toString(16));if(!s)return[0,0,0];let{colorString:u}=s.groups;u.length===3&&(u=u.split("").map(f=>f+f).join(""));const c=Number.parseInt(u,16);return[c>>16&255,c>>8&255,c&255]},enumerable:!1},hexToAnsi256:{value:l=>a.rgbToAnsi256(...a.hexToRgb(l)),enumerable:!1}}),a}Object.defineProperty(e,"exports",{enumerable:!0,get:o})})(Dve);var GJe=Dve.exports,_h={};Object.defineProperty(_h,"__esModule",{value:!0});_h.printIteratorEntries=ijt;_h.printIteratorValues=ajt;_h.printListItems=ljt;_h.printObjectProperties=sjt;const ojt=(e,t)=>{const n=Object.keys(e).sort(t);return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r=>{Object.getOwnPropertyDescriptor(e,r).enumerable&&n.push(r)}),n};function ijt(e,t,n,r,o,i,a=": "){let l="",s=e.next();if(!s.done){l+=t.spacingOuter;const u=n+t.indent;for(;!s.done;){const c=i(s.value[0],t,u,r,o),f=i(s.value[1],t,u,r,o);l+=u+c+a+f,s=e.next(),s.done?t.min||(l+=","):l+=","+t.spacingInner}l+=t.spacingOuter+n}return l}function ajt(e,t,n,r,o,i){let a="",l=e.next();if(!l.done){a+=t.spacingOuter;const s=n+t.indent;for(;!l.done;)a+=s+i(l.value,t,s,r,o),l=e.next(),l.done?t.min||(a+=","):a+=","+t.spacingInner;a+=t.spacingOuter+n}return a}function ljt(e,t,n,r,o,i){let a="";if(e.length){a+=t.spacingOuter;const l=n+t.indent;for(let s=0;s<e.length;s++)a+=l,s in e&&(a+=i(e[s],t,l,r,o)),s<e.length-1?a+=","+t.spacingInner:t.min||(a+=",");a+=t.spacingOuter+n}return a}function sjt(e,t,n,r,o,i){let a="";const l=ojt(e,t.compareKeys);if(l.length){a+=t.spacingOuter;const s=n+t.indent;for(let u=0;u<l.length;u++){const c=l[u],f=i(c,t,s,r,o),d=i(e[c],t,s,r,o);a+=s+f+": "+d,u<l.length-1?a+=","+t.spacingInner:t.min||(a+=",")}a+=t.spacingOuter+n}return a}var _g={};Object.defineProperty(_g,"__esModule",{value:!0});_g.test=_g.serialize=_g.default=void 0;var q$e=_h,ZF=function(){return typeof globalThis<"u"?globalThis:typeof ZF<"u"?ZF:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),EK=ZF["jest-symbol-do-not-touch"]||ZF.Symbol;const ujt=typeof EK=="function"&&EK.for?EK.for("jest.asymmetricMatcher"):1267621,oN=" ",KJe=(e,t,n,r,o,i)=>{const a=e.toString();return a==="ArrayContaining"||a==="ArrayNotContaining"?++r>t.maxDepth?"["+a+"]":a+oN+"["+(0,q$e.printListItems)(e.sample,t,n,r,o,i)+"]":a==="ObjectContaining"||a==="ObjectNotContaining"?++r>t.maxDepth?"["+a+"]":a+oN+"{"+(0,q$e.printObjectProperties)(e.sample,t,n,r,o,i)+"}":a==="StringMatching"||a==="StringNotMatching"||a==="StringContaining"||a==="StringNotContaining"?a+oN+i(e.sample,t,n,r,o):e.toAsymmetricMatcher()};_g.serialize=KJe;const qJe=e=>e&&e.$$typeof===ujt;_g.test=qJe;const cjt={serialize:KJe,test:qJe};var fjt=cjt;_g.default=fjt;var Hg={},djt=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};Object.defineProperty(Hg,"__esModule",{value:!0});Hg.test=Hg.serialize=Hg.default=void 0;var YJe=XJe(djt),jo=XJe(GJe);function XJe(e){return e&&e.__esModule?e:{default:e}}const pjt=e=>e.replace((0,YJe.default)(),t=>{switch(t){case jo.default.red.close:case jo.default.green.close:case jo.default.cyan.close:case jo.default.gray.close:case jo.default.white.close:case jo.default.yellow.close:case jo.default.bgRed.close:case jo.default.bgGreen.close:case jo.default.bgYellow.close:case jo.default.inverse.close:case jo.default.dim.close:case jo.default.bold.close:case jo.default.reset.open:case jo.default.reset.close:return"</>";case jo.default.red.open:return"<red>";case jo.default.green.open:return"<green>";case jo.default.cyan.open:return"<cyan>";case jo.default.gray.open:return"<gray>";case jo.default.white.open:return"<white>";case jo.default.yellow.open:return"<yellow>";case jo.default.bgRed.open:return"<bgRed>";case jo.default.bgGreen.open:return"<bgGreen>";case jo.default.bgYellow.open:return"<bgYellow>";case jo.default.inverse.open:return"<inverse>";case jo.default.dim.open:return"<dim>";case jo.default.bold.open:return"<bold>";default:return""}}),QJe=e=>typeof e=="string"&&!!e.match((0,YJe.default)());Hg.test=QJe;const ZJe=(e,t,n,r,o,i)=>i(pjt(e),t,n,r,o);Hg.serialize=ZJe;const hjt={serialize:ZJe,test:QJe};var vjt=hjt;Hg.default=vjt;var zg={};Object.defineProperty(zg,"__esModule",{value:!0});zg.test=zg.serialize=zg.default=void 0;var Y$e=_h;const gjt=" ",JJe=["DOMStringMap","NamedNodeMap"],mjt=/^(HTML\w*Collection|NodeList)$/,yjt=e=>JJe.indexOf(e)!==-1||mjt.test(e),eet=e=>e&&e.constructor&&!!e.constructor.name&&yjt(e.constructor.name);zg.test=eet;const bjt=e=>e.constructor.name==="NamedNodeMap",tet=(e,t,n,r,o,i)=>{const a=e.constructor.name;return++r>t.maxDepth?"["+a+"]":(t.min?"":a+gjt)+(JJe.indexOf(a)!==-1?"{"+(0,Y$e.printObjectProperties)(bjt(e)?Array.from(e).reduce((l,s)=>(l[s.name]=s.value,l),{}):{...e},t,n,r,o,i)+"}":"["+(0,Y$e.printListItems)(Array.from(e),t,n,r,o,i)+"]")};zg.serialize=tet;const Ejt={serialize:tet,test:eet};var Sjt=Ejt;zg.default=Sjt;var Vg={},Rl={},Tve={};Object.defineProperty(Tve,"__esModule",{value:!0});Tve.default=wjt;function wjt(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}Object.defineProperty(Rl,"__esModule",{value:!0});Rl.printText=Rl.printProps=Rl.printElementAsLeaf=Rl.printElement=Rl.printComment=Rl.printChildren=void 0;var net=Cjt(Tve);function Cjt(e){return e&&e.__esModule?e:{default:e}}const xjt=(e,t,n,r,o,i,a)=>{const l=r+n.indent,s=n.colors;return e.map(u=>{const c=t[u];let f=a(c,n,l,o,i);return typeof c!="string"&&(f.indexOf(`
405
+ `,gLt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vLt,n=J.useContext(rJe),r=n.csp;J.useEffect(function(){Cd(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},mLt=["icon","className","onClick","style","primaryColor","secondaryColor"],dT={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function yLt(e){var t=e.primaryColor,n=e.secondaryColor;dT.primaryColor=t,dT.secondaryColor=n||TJe(t),dT.calculated=!!n}function bLt(){return ve({},dT)}var dx=function(t){var n=t.icon,r=t.className,o=t.onClick,i=t.style,a=t.primaryColor,l=t.secondaryColor,s=Nn(t,mLt),u=dT;if(a&&(u={primaryColor:a,secondaryColor:l||TJe(a)}),gLt(),hLt(G$e(n),"icon should be icon definiton, but got ".concat(n)),!G$e(n))return null;var c=n;return c&&typeof c.icon=="function"&&(c=ve(ve({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),Joe(c.icon,"svg-".concat(c.name),ve({className:r,onClick:o,style:i,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};dx.displayName="IconReact";dx.getTwoToneColors=bLt;dx.setTwoToneColors=yLt;function RJe(e){var t=PJe(e),n=Ce(t,2),r=n[0],o=n[1];return dx.setTwoToneColors({primaryColor:r,secondaryColor:o})}function ELt(){var e=dx.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var SLt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];RJe("#1890ff");var tE=T.forwardRef(function(e,t){var n=e.className,r=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,l=e.onClick,s=e.twoToneColor,u=Nn(e,SLt),c=T.useContext(rJe),f=c.prefixCls,d=f===void 0?"anticon":f,p=c.rootClassName,g=Ne(p,d,ae(ae({},"".concat(d,"-").concat(r.name),!!r.name),"".concat(d,"-spin"),!!o||r.name==="loading"),n),y=a;y===void 0&&l&&(y=-1);var h=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,m=PJe(s),v=Ce(m,2),b=v[0],E=v[1];return T.createElement("span",ve(ve({role:"img","aria-label":r.name},u),{},{ref:t,tabIndex:y,onClick:l,className:g}),T.createElement(dx,{icon:r,primaryColor:b,secondaryColor:E,style:h}))});tE.displayName="AntdIcon";tE.getTwoToneColor=ELt;tE.setTwoToneColor=RJe;var wLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:zZe}))},xve=T.forwardRef(wLt);process.env.NODE_ENV!=="production"&&(xve.displayName="DeleteOutlined");var CLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:GQe}))},IJe=T.forwardRef(CLt);process.env.NODE_ENV!=="production"&&(IJe.displayName="EyeOutlined");var xLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:SNt}))},NJe=T.forwardRef(xLt);process.env.NODE_ENV!=="production"&&(NJe.displayName="PlusOutlined");var ALt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 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:"upload",theme:"outlined"},OLt=function(t,n){return T.createElement(tE,ve(ve({},t),{},{ref:n,icon:ALt}))},MJe=T.forwardRef(OLt);process.env.NODE_ENV!=="production"&&(MJe.displayName="UploadOutlined");function FJe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"id",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"children",i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return $Lt(e,t,n,r,o,i,l=>({value:l[t],title:l[n],key:l[t],disabled:l[t]===a}))}function $Lt(e,t,n,r,o,i,a){if(!Array.isArray(e)||e.length===0)return[];const l=e.map(s=>({...s,...a(s)}));return l.filter(s=>{const u=l.filter(c=>s[t]===c[r]);return s[o]=u.length>0?u:[],s[r]===i})}const BJe=e=>{let{request:t,title:n,disabledValue:r,callError:o,...i}=e;const[a,l]=J.useState(!1),[s,u]=J.useState([]);J.useEffect(()=>{c()},[]);const c=async()=>{if(t&&typeof t=="function"){var f;const d=await t();if(d.code>0){o&&typeof o=="function"&&o(d.message);return}let p=FJe(((f=d.data)===null||f===void 0?void 0:f.list)||d.data||[],"id",n||"title",i.parentId||"parentId","children",0,r);p=[{value:0,title:"根节点",children:p}],i.treeData=p,u(p)}i.treeData&&u(i.treeData),l(!0)};return ze.jsx(hi,{...i,children:a&&ze.jsx(u0,{...i,treeData:s,treeDefaultExpandAll:!0,style:{width:"100%"}})})},Ave=J.forwardRef((e,t)=>{let{addWrapper:n=!0,form:r,fieldName:o,fieldsValue:i,value:a,type:l,defaultValue:s,onChange:u,option_label:c,option_value:f,option_search:d,options:p,request:g,requestParams:y,callError:h,subRequest:m,sub_option_label:v="label",mode:b="single",sub_option_value:E="id",rightIconRender:S,rightIcon:w,rightIconClick:C,...O}=e;const[D,x]=J.useState([]),[$,P]=J.useState(!1);J.useEffect(()=>{if(console.log("SearchSelect ".concat(o," value"),a),a&&D.length>0){let H=D.find(_=>_.value==(a==null?void 0:a.value)||_.value==a);H&&!Dg.isEqual(H,a)&&(console.log("new value /////",H),typeof u=="function"&&u(H)),H||N()}},[a]),J.useEffect(()=>{console.log("SearchSelect useEffect requestParams",y),M(y)},[y]);const N=async()=>{g&&f&&k({...y,[f]:a==null?void 0:a.value},null,H=>{if(console.log("loadSelectOptions selectOptions",H),H&&H.length>0){let _=H.find(R=>R.value==(a==null?void 0:a.value)||R.value==a);console.log("loadSelectOptions item",_),_&&!Dg.isEqual(_,a)&&(console.log("new value /////",_),typeof u=="function"&&u(_))}})},M=async H=>{const _={};if(Array.isArray(O==null?void 0:O.filterRules))for(let G of O==null?void 0:O.filterRules){var R,F,j,U;let W;G.value.parent===""?W=i==null?void 0:i[G.value.field_key]:W=i==null||(R=i[G.value.parent])===null||R===void 0||(F=R[o==null?void 0:o[1]])===null||F===void 0?void 0:F[G.value.field_key],W&&(j=W)!==null&&j!==void 0&&j.value&&(W=W.value),_[G.column.column_name]=(U=W)!==null&&U!==void 0?U:"##norequest##"}g&&typeof g=="function"&&k(H,_),p&&p.length>0&&x(p)},B=async H=>{const _={...y};_[d]=H,await k(_)},k=J.useCallback(Dg.debounce((H,_,R)=>{L(H,_).then(F=>{typeof R=="function"&&R(F)})},200),[]),L=async(H,_)=>{try{let F=[];if(!(_&&Object.values(_).some(j=>j==="##norequest##"))){var R;P(!0);const j=await g({...H,ruleParams:_});P(!1),j.code>0?h&&typeof h=="function"&&h(j.message):F=((R=j.data)===null||R===void 0?void 0:R.list)||j.data}if(Array.isArray(F)){for(let j=0;j<F.length;j++){const U=F[j];if(typeof m=="function"){let G=[];const{data:W}=await m(U);W!=null&&W.list&&Array.isArray(W.list)&&(G=W.list.map(K=>({label:"".concat(U[c],"-").concat(K[v]),value:"".concat(U[f],"-").concat(K[E])}))),F[j]={...U,label:U[c],title:U[c],options:G}}F[j]={...U,label:U[c],value:U[f]}}D.length>0&&!Dg.isEqual(D,F)&&typeof u=="function"&&u(void 0),x(F)}else x([]);return F}catch(F){console.error("fetchOptions",F),P(!1)}finally{}},z=H=>{Array.isArray(H)?u(H.map(_=>D.find(R=>R.value===_))):u(D.find(_=>_.value===H))};return n?ze.jsxs(hi,{...O,children:[ze.jsx(Bd,{ref:t,notFoundContent:$?ze.jsx(P4,{size:"small"}):null,value:a,...O,filterOption:!1,showSearch:!!(g&&d),onSearch:g&&d?B:null,onChange:z,style:{width:"100%",flex:1},options:D,mode:b}),!(O!=null&&O.disabled)&&w,!(O!=null&&O.disabled)&&typeof S=="function"&&S({value:a,onChange:u,form:r,fieldName:o})]}):ze.jsxs(ze.Fragment,{children:[ze.jsx(Bd,{ref:t,notFoundContent:$?ze.jsx(P4,{size:"small"}):null,value:a,...O,filterOption:!1,showSearch:!!(g&&d),onSearch:g&&d?B:null,onChange:z,style:{width:"100%"},options:D,mode:b}),!(O!=null&&O.disabled)&&w,!(O!=null&&O.disabled)&&typeof S=="function"&&S({value:a,onChange:u,form:r,fieldName:o})]})}),Ove=e=>{let{request:t,option_label:n="label",option_value:r="id",disabledValue:o,callError:i,options:a,addWrapper:l=!0,...s}=e;const[u,c]=J.useState([]);J.useEffect(()=>{f()},[]);const f=async()=>{if(t&&typeof t=="function"){var d;const p=await t();if(p.code>0){i&&typeof i=="function"&&i(p.message);return}let g=((d=p.data)===null||d===void 0?void 0:d.list)||p.data;Array.isArray(g)&&g.length>0&&c(g.map(y=>({label:y[n],value:y[r]})))}a&&a.length>0&&c(a)};return l?ze.jsx(hi,{...s,children:ze.jsx(Bd,{...s,options:u,style:{width:"100%"}})}):ze.jsx(Bd,{...s,options:u,style:{width:"100%"}})},DLt=e=>{let{...t}=e;return ze.jsx(Ove,{...t,mode:"single"})},TLt=e=>{let{onChange:t,value:n,...r}=e;const[o,i]=J.useState([]);return J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n)}catch{}n&&i(n)},[n]),ze.jsx(Ove,{...r,onChange:t,mode:"multiple",value:o})},kJe=e=>{var t,n;let{readItemRender:r,readonly:o,onChange:i,onCustomChange:a,value:l,form:s,fieldName:u,...c}=e;return J.useEffect(()=>{if(l&&typeof l=="string")try{l=JSON.parse(l),s==null||s.setFieldValue(u,l),console.log("WithSingleSelect useEffect onChange////// form",s),console.log("WithSingleSelect useEffect onChange////// fieldName",u),console.log("WithSingleSelect useEffect onChange////// value",l)}catch(f){console.log("WithSingleSelect useEffect error",f)}},[l]),o?ze.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:l&&l.label&&ze.jsx(ze.Fragment,{children:r&&typeof r=="function"?r(l):ze.jsx("span",{children:(t=l)===null||t===void 0?void 0:t.label},"btn_".concat((n=l)===null||n===void 0?void 0:n.value))})}):ze.jsx(Ave,{addWrapper:!1,form:s,fieldName:u,...c,onChange:i,value:l,mode:"single",className:" fflex-1 foverflow-hidden"})},LJe=e=>{let{readItemRender:t,readonly:n,onChange:r,value:o,form:i,fieldName:a,...l}=e;return J.useEffect(()=>{if(o&&typeof o=="string")try{o=JSON.parse(o),r(o)}catch{}},[o]),n?ze.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:Array.isArray(o)&&o.map((s,u)=>ze.jsxs(ze.Fragment,{children:[" ",t&&typeof t=="function"?t(s):ze.jsx("span",{children:s==null?void 0:s.label},"btn_".concat(s==null?void 0:s.value)),u<o.length-1?ze.jsx("span",{className:" ftext-gray-400",children:","}):null]}))}):ze.jsx(Ave,{addWrapper:!1,form:i,fieldName:a,...l,onChange:r,value:o,mode:"multiple",className:" fflex-1 foverflow-hidden"})},PLt=e=>{let{customComponent:t,...n}=e;return t?ze.jsx(hi,{...n,children:ze.jsx(t,{...n})}):ze.jsx(hi,{...n,children:ze.jsx(Lh,{...n})})},jJe=e=>{let{onChange:t,value:n,multiple:r,...o}=e;const[i,a]=J.useState();J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n);return}catch{}r?Array.isArray(n)&&a(n):(Array.isArray(n)&&(n=n[0]),a(n))},[n]);const l=s=>{Array.isArray(s)||(s=[s]),t&&typeof t=="function"&&t(s)};return ze.jsx(BJe,{...o,onChange:l,value:i,multiple:r})},RLt=e=>{let{FetchDeptList:t,...n}=e;return ze.jsx(jJe,{...n,title:"deptName",request:t})},ILt=e=>{let{FetchPostList:t,...n}=e;return ze.jsx(jJe,{...n,title:"postName",request:t})};kJe.displayName="WithSingleSelect";LJe.displayName="WithMultipleSelect";const NLt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),ze.jsx(hi,{...e,children:ze.jsx(kJe,{...e})}))),MLt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),ze.jsx(hi,{...e,children:ze.jsx(LJe,{...e})}))),FLt=J.forwardRef((e,t)=>{let{value:n,onChange:r,...o}=e;const i=J.useRef(0),a=()=>{i.current++,r(i.current)};return ze.jsxs(hi,{...o,children:[ze.jsxs("div",{ref:t,children:["form-set-value:",n]}),ze.jsx(du,{onClick:a,children:"test"})]})}),BLt=e=>{let t="",n="";try{n="return ".concat(e.join("")),t=new Function(n)(),t=t.toString()}catch(r){console.error("formula (".concat(n,") error"),r)}return t},kLt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let FA=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=kLt[n[e]&63];return t};var _Je={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(s,u,c){this.fn=s,this.context=u,this.once=c||!1}function i(s,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var p=new o(c,f||s,d),g=n?n+u:u;return s._events[g]?s._events[g].fn?s._events[g]=[s._events[g],p]:s._events[g].push(p):(s._events[g]=p,s._eventsCount++),s}function a(s,u){--s._eventsCount===0?s._events=new r:delete s._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},l.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,g=new Array(p);d<p;d++)g[d]=f[d].fn;return g},l.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,c,f,d,p,g){var y=n?n+u:u;if(!this._events[y])return!1;var h=this._events[y],m=arguments.length,v,b;if(h.fn){switch(h.once&&this.removeListener(u,h.fn,void 0,!0),m){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,c),!0;case 3:return h.fn.call(h.context,c,f),!0;case 4:return h.fn.call(h.context,c,f,d),!0;case 5:return h.fn.call(h.context,c,f,d,p),!0;case 6:return h.fn.call(h.context,c,f,d,p,g),!0}for(b=1,v=new Array(m-1);b<m;b++)v[b-1]=arguments[b];h.fn.apply(h.context,v)}else{var E=h.length,S;for(b=0;b<E;b++)switch(h[b].once&&this.removeListener(u,h[b].fn,void 0,!0),m){case 1:h[b].fn.call(h[b].context);break;case 2:h[b].fn.call(h[b].context,c);break;case 3:h[b].fn.call(h[b].context,c,f);break;case 4:h[b].fn.call(h[b].context,c,f,d);break;default:if(!v)for(S=1,v=new Array(m-1);S<m;S++)v[S-1]=arguments[S];h[b].fn.apply(h[b].context,v)}}return!0},l.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},l.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},l.prototype.removeListener=function(u,c,f,d){var p=n?n+u:u;if(!this._events[p])return this;if(!c)return a(this,p),this;var g=this._events[p];if(g.fn)g.fn===c&&(!d||g.once)&&(!f||g.context===f)&&a(this,p);else{for(var y=0,h=[],m=g.length;y<m;y++)(g[y].fn!==c||d&&!g[y].once||f&&g[y].context!==f)&&h.push(g[y]);h.length?this._events[p]=h.length===1?h[0]:h:a(this,p)}return this},l.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(_Je);var LLt=_Je.exports;const jLt=ql(LLt),eie=new jLt,_Lt=e=>{let{children:t,layout:n,onTableAddRow:r,onTableRemoveRow:o,form:i}=e;n=n||"1";const a=u=>{const c=u.split(",").map(Number),f=24;return c.map(d=>d/c.reduce((p,g)=>p+g)*f)},l=J.useMemo(()=>a(n),[n]),s=J.useMemo(()=>J.Children.toArray(t).map((u,c)=>{var f,d;const p=u.props,g=(p==null?void 0:p.componentId)||(p==null?void 0:p.__id);var y=((f=u.type)===null||f===void 0?void 0:f.displayName)||((d=u.props)===null||d===void 0?void 0:d._componentName);let h=null;if(y=="Field.Table"?h=J.cloneElement(u,{onTableAddRow:r,onTableRemoveRow:o,form:i,fieldName:g}):J.isValidElement(u)?h=J.cloneElement(u,{form:i,fieldName:g}):h=u,g){const m=[];if(p.isRequired&&m.push({required:!0,message:"".concat(p.label,"必须填写")}),p.rules)if(Array.isArray(p.rules)){const v=p.rules.join("|");m.push({pattern:new RegExp(v),message:p.rulesFailMessage?p.rulesFailMessage:"".concat(p.label,"格式错误")})}else m.push({pattern:new RegExp(p.rules),message:p.rulesFailMessage?p.rulesFailMessage:"".concat(p.label,"格式错误")});return(l==null?void 0:l[c])&&ze.jsx(_C,{span:l[c],children:ze.jsx(cl.Item,{style:{marginBottom:0},label:"",name:g,rules:m,children:h},"".concat(g,"-form-item"))},c)}else return(l==null?void 0:l[c])&&ze.jsx(_C,{span:l[c],children:h},c)}),[t,l]);return ze.jsx(Tj,{gutter:24,children:s})},HLt=e=>{let{title:t}=e;return t?ze.jsx("div",{className:"fh-11 fflex fitems-center ftext-lg ffont-medium ",children:ze.jsx("span",{className:"fborder-l-4 fborder-slate-300 fpl-2 ",children:t})}):null};function zLt(e,t){const n=[];let r=[];const o=(a,l)=>{const s=a-l.length;l.push(...new Array(s).fill(J.createElement("div")))};for(const a of e){var i;const{_componentName:l}=(a==null?void 0:a.props)||{},s=((i=a.type)===null||i===void 0?void 0:i.displayName)||l;s&&s.startsWith("Layout.")?(r.length>0&&(o(t,r),n.push(r),r=[]),n.push([a])):(r.push(a),r.length===t&&(n.push(r),r=[]))}return r.length>0&&(o(t,r),n.push(r)),n}const $ve=J.forwardRef((e,t)=>{let{cols:n=1,children:r,mode:o="view"}=e;const[i]=cl.useForm(),[a,l]=J.useState(null),s=J.useRef(null),u=J.useRef(0);J.useImperativeHandle(t,()=>({formRef:i,setFieldsValue:D=>{u.current=1,i.setFieldsValue(D)},initializeFieldVisibility:p}),[]),J.useEffect(()=>{d(),l(O())},[r,n]);const c=J.useRef(null),f=D=>{var x;return(x=c.current)===null||x===void 0?void 0:x[D]},d=()=>{const D=[];function x(P){var N,M;let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;var k=((N=P.type)===null||N===void 0?void 0:N.displayName)||((M=P.props)===null||M===void 0?void 0:M._componentName);const{props:L}=P;if(k&&(k.startsWith("Field.")||k.startsWith("Layout."))){let _=(L==null?void 0:L.componentId)||(L==null?void 0:L.__id),R=[];if(B&&B!==null&&B!==void 0&&B.props){var z,H;_="".concat((B==null||(z=B.props)===null||z===void 0?void 0:z.componentId)||(B==null||(H=B.props)===null||H===void 0?void 0:H.__id),".").concat(_)}L!=null&&L.withId&&R.push(L==null?void 0:L.withId),L!=null&&L.withIds&&(R=[...R,...L==null?void 0:L.withIds]),D.push({identifier:_,withIds:R,component:P,componentName:k,fillRules:L==null?void 0:L.fillRules})}L!=null&&L.children&&J.Children.toArray(L==null?void 0:L.children).forEach(R=>x(R,k&&k.startsWith("Field.")?P:null))}s.current=new Map,console.log(" fields",D);const $=J.Children.toArray(r);for(let P=0;P<$.length;P++){const N=$[P];x(N)}D.forEach(P=>{const{identifier:N}=P;s.current.set(N,{children:D.filter(M=>M.withIds.some(B=>B==N)),show:!0,...P})}),console.log(" dependencyMap.current",s.current),p()},p=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const x=i.getFieldsValue();for(let $ of s.current.keys())g($,x,!0);D&&l(O())},g=function(D,x){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,P=!1,N=[];if(Array.isArray(D)&&(N=[...D.slice(0,-1)],D=D.filter(M=>typeof M=="string").join(".")),s.current.has(D)){const M=s.current.get(D),B=M.children;!$&&M!==null&&M!==void 0&&M.fillRules&&Array.isArray(M==null?void 0:M.fillRules)&&(M==null?void 0:M.fillRules.length)>0&&y(D,N,x,M==null?void 0:M.fillRules),B.forEach(k=>{k.component.props.withFunc&&typeof k.component.props.withFunc=="function"&&(P=h(x,k)),!$&&k.component.props.withFill&&m(x,k,N,M==null?void 0:M.componentName)})}return P},y=(D,x,$,P)=>{let N=v("fieldsValue",D,$,null),M={},B=[];for(let _=0;_<P.length;_++){const R=P[_];let{source:F,target:j}=R,U=N==null?void 0:N[F],G=U;if((R==null?void 0:R.type)==1){if(s.current.has(j)){var k,L,z;let K=(k=s.current.get(j))===null||k===void 0||(L=k.component)===null||L===void 0||(z=L.props)===null||z===void 0?void 0:z.children;Array.isArray(K)&&K.length>0&&B.push(K.map(q=>{var Q,Z;return"".concat(F,".").concat((q==null||(Q=q.props)===null||Q===void 0?void 0:Q.componentId)||(q==null||(Z=q.props)===null||Z===void 0?void 0:Z.__id))}))}if(U&&typeof U=="string")try{U=JSON.parse(U)}catch(K){console.error("error end",K)}if(!Array.isArray(U))return;G=U.map((K,q)=>{let Q={};if(R!=null&&R.subRules&&Array.isArray(R==null?void 0:R.subRules)&&(R==null?void 0:R.subRules.length)>0)for(let Z=0;Z<(R==null?void 0:R.subRules.length);Z++){const{source:Y,target:ne}=R==null?void 0:R.subRules[Z];Q[ne]=K==null?void 0:K[Y];let le={name:[j,q,ne],value:K==null?void 0:K[Y]};M[le.name]=le}return Q}),eie.emit("reloadTable",j)}else{let W=0;if(x&&Array.isArray(x)&&x.length>1&&(x.filter(K=>typeof K=="string").join("."),W=x[x.length-1],j=[...x,j],Array.isArray(N)&&N.length>W)){var H;G=(H=N[W])===null||H===void 0?void 0:H[F]}M[j]={name:[j],value:G}}(R==null?void 0:R.type)==1&&i.setFieldValue(j,void 0),i.setFieldValue(j,G)}setTimeout(()=>{var _=Object.keys(M);_.length>0&&(_.forEach(R=>{b.current[R]=M[R]}),E()),B.length>0&&B.forEach(R=>{Array.isArray(R)&&R.length>0&&w(R)})},0)},h=(D,x,$)=>{var P,N;let M=!1;const B=x==null||(P=x.component)===null||P===void 0||(N=P.props)===null||N===void 0?void 0:N.withFunc(D),k=x==null?void 0:x.identifier;if(s.current.has(k)){const L=s.current.get(k);L.show!==B&&(L.show=B,s.current.set(k,L),M=!0)}return M},m=async(D,x,$,P)=>{var N,M;const B=x==null||(N=x.component)===null||N===void 0?void 0:N.props.withFill,k=x==null||(M=x.component)===null||M===void 0?void 0:M.props.withDataFetch;let L=0,z="",H=x.identifier;if($&&Array.isArray($)&&$.length>1)z=$.filter(j=>typeof j=="string").join("."),L=$[$.length-1],H.startsWith("".concat(z,"."))&&(H=[...$,H.replace("".concat(z,"."),"")]);else if(H.indexOf(".")>=0){H=H.split(".");let j=v("fieldsValue",H[0],D,[]);if(Array.isArray(j)&&j.length>0)for(let U=0;U<j.length;U++)await m(D,x,[H[0],U],P);return}let _=[];if(B!=null&&B.withData&&(B==null?void 0:B.withData.length)>0&&k&&typeof k=="function")for(let j=0;j<(B==null?void 0:B.withData.length);j++){const U=B==null?void 0:B.withData[j];let G={};G.tableName=U.withTable.table_name,G.filter={};for(let K=0;K<U.withCondition.length;K++){var R;const{value:q,column:Q}=U.withCondition[K];let Z=v(q.group_key,q.field_key,D,_);Array.isArray(Z)&&Array.isArray(H)&&Z.length>L&&(Z=Z[L]),P=="Field.WithSingleSelect"&&Z&&(R=Z)!==null&&R!==void 0&&R.value&&(Z=Z.value),G.filter[Q.column_name]=Z}const W=await k(G);W.code===0&&W.data.list&&_.push({id:U.id,data:W.data.list})}let F;if(B.value&&B.value.length>0&&(F=B.value.map(j=>{let U="";const{insert:G,attributes:W}=j;return typeof G!="string"?G!=null&&G.span&&W&&W.tagKey&&W.id&&(U=v(W.tagKey,W.id,D,_),Array.isArray(U)?Array.isArray(H)&&U.length>L?U=U[L]:U=JSON.stringify(U):U.length>0&&(U='"'.concat(U,'"'))):U=G,U})),F&&F.length>0){const j=BLt(F);i.setFieldValue(H,j),g(H,i.getFieldsValue())}},v=(D,x,$,P)=>{let N="";if(D=="fieldsValue"){var M;if(x.indexOf(".")>=0){var B;const[z,H]=x.split("."),_=($==null?void 0:$[z])||[];Array.isArray(_)?N=_.map(R=>{var F;return(F=R==null?void 0:R[H])!==null&&F!==void 0?F:""}):N=(B=_==null?void 0:_[H])!==null&&B!==void 0?B:""}else N=(M=$==null?void 0:$[x])!==null&&M!==void 0?M:""}else{let z=P.find(H=>H.id===D);if(z&&z.data&&z.data.length>0){var k,L;N=(k=(L=z.data[0])===null||L===void 0?void 0:L[x])!==null&&k!==void 0?k:""}}return N},b=J.useRef({}),E=Dg.debounce(()=>{const D=i.getFieldsValue(),x=u.current;u.current=0;let $=!1;c.current||(c.current={});for(let P in b.current){let N=b.current[P];Dg.isEqual(N.value,f(N.name))||(x!=1&&($=g(N.name,D)),c.current[N.name]=N.value)}$&&l(O()),b.current={}},100),S=D=>{D.filter(x=>{x.name&&x.name.length>0&&(b.current[x.name]=x)}),E()},w=D=>{let x=[];D.forEach(P=>{if(!s.current.has(P))return;let N=s.current.get(P);N.withIds.length<=0||x.push(...N.withIds.filter(M=>!x.includes(M)))}),x=x.filter(P=>{var N=i.getFieldValue(P);return!(typeof N!="number"&&!N)});const $=i.getFieldsValue();setTimeout(()=>{x.forEach(P=>{g(P,$)})},0)},C=D=>{const x=i.getFieldsValue();setTimeout(()=>{D.forEach($=>{g($,x)})},0)},O=()=>{const D=J.Children.toArray(r);return zLt(D.filter($=>{var P;const N=$.props.componentId||$.props.__id;return!s.current.has(N)||((P=s.current.get(N))===null||P===void 0?void 0:P.show)}),n).map(($,P)=>ze.jsx(Tj,{gutter:[24,24],children:$.map((N,M)=>{var B;const{componentId:k,__id:L,_componentName:z,...H}=N.props,_=((B=N.type)===null||B===void 0?void 0:B.displayName)||z,R=k||L,F=_&&_.startsWith("Layout."),j=_&&_=="Field.Table",U=[];if(H.isRequired&&U.push({required:!0,message:"".concat(H.label,"必须填写")}),H.rules)if(Array.isArray(H.rules)){const K=H.rules.join("|");U.push({pattern:new RegExp(K),message:H.rulesFailMessage?H.rulesFailMessage:"".concat(H.label,"格式错误")})}else U.push({pattern:new RegExp(H.rules),message:H.rulesFailMessage?H.rulesFailMessage:"".concat(H.label,"格式错误")});const G=K=>{i.setFieldValue(R,K)};let W;return j||F?W=J.cloneElement(N,{onTableAddRow:w,onTableRemoveRow:C,form:i,fieldName:R,onCustomChange:G}):_==="Field.WithSingleSelect"||_==="Field.WithMultipleSelect"?W=ze.jsx(cl.Item,{style:{margin:0},shouldUpdate:(K,q)=>{let Q=!1;if(Array.isArray(H.filterRules)&&H.filterRules.length>0)for(let Z of H.filterRules){if(Z.value.parent!="")continue;let Y,ne;if(Y=K==null?void 0:K[Z.value.field_key],ne=q==null?void 0:q[Z.value.field_key],Y!==ne){Q=!0;break}}return Q},children:K=>{let{getFieldsValue:q}=K;const Q=q();return ze.jsx(cl.Item,{style:{marginBottom:0},label:"",name:R,rules:U,children:J.cloneElement(N,{onTableAddRow:w,onTableRemoveRow:C,form:i,fieldName:R,onCustomChange:G,fieldsValue:Q})})}}):W=ze.jsx(cl.Item,{style:{marginBottom:0},label:"",name:R,rules:U,children:J.cloneElement(N,{form:i,fieldName:R,onCustomChange:G})}),ze.jsx(_C,{span:F?24:24/$.length,style:{marginBottom:0},children:W},R||"col-".concat(M))})},"row-".concat(P)))};return ze.jsx(cl,{form:i,className:"form-container fp-0 fw-full fh-full box-border fflex fflex-col fgap-y-2"+(o=="desgin"?" fp-6":""),onValuesChange:(D,x)=>{},onFieldsChange:S,children:a})});function VLt(e){return J.forwardRef((t,n)=>ze.jsx(e,{...t,ref:n,forwardedRef:n}))}class Ygr extends J.PureComponent{render(){const{forwardedRef:t,...n}=this.props;return ze.jsx($ve,{...n,ref:t})}}const ULt=VLt(e=>{let{forwardedRef:t,...n}=e;return ze.jsx($ve,{...n,ref:t})}),WLt=e=>{let{request:t,value:n,onChange:r,callError:o,disabledValue:i,addRoot:a=!0,title:l,...s}=e;const[u,c]=J.useState(!1),[f,d]=J.useState([]);J.useEffect(()=>{p()},[]),J.useEffect(()=>{if(typeof n=="string")try{n=JSON.parse(n),r(n)}catch{}Array.isArray(n)&&m(n)},[n]);const p=async()=>{if(t&&typeof t=="function"){var D;const x=await t();if(x.code>0){o&&typeof o=="function"&&o(x.message);return}let $=FJe(((D=x.data)===null||D===void 0?void 0:D.list)||x.data||[],"id",l||"title",(s==null?void 0:s.parentId)||"parentId","children",0,i);a&&($=[{value:0,title:"根节点",children:$}]),s.treeData=$,console.log("treeData",$),d($)}s.treeData&&d(s.treeData),c(!0)},[g,y]=J.useState([]),[h,m]=J.useState([]),[v,b]=J.useState([]),[E,S]=J.useState(!0),w=D=>{console.log("onExpand",D),y(D),S(!1)},C=D=>{console.log("onCheck",D),m(D),r(D)},O=(D,x)=>{console.log("onSelect",x),b(D)};return ze.jsx(hi,{...s,children:ze.jsx(bve,{checkable:!0,onExpand:w,onCheck:C,onSelect:O,expandedKeys:g,autoExpandParent:E,checkedKeys:h,selectedKeys:v,treeData:f})})},GLt=e=>ze.jsx(hi,{...e,children:ze.jsx(K3,{...e})}),KLt=e=>ze.jsx(hi,{...e,children:ze.jsx(K3.Group,{...e})}),qLt=e=>ze.jsx(hi,{...e,children:ze.jsx(Aj.Group,{...e})}),HJe=e=>{let{value:t,maxCount:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(t){if(typeof t=="string")try{t=JSON.parse(t),o(t)}catch{}console.log("value",t),Array.isArray(t)&&l(t)}},[t]),n=n||99,r=r||!0;const[a,l]=J.useState([]),s=u=>{let{fileList:c}=u;console.log("newFileList",c),c=c.map(f=>(f.status=="done"&&f.response&&(f.url=f.response),f)),o(c.map(f=>({uid:f.uid,name:f.name,status:f.status,url:f.url||f.response||"",error:f.error}))),l(c)};return ze.jsx(Bj,{...i,listType:"text",multiple:r,onChange:s,maxCount:n,fileList:a,children:!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&a.length<n&&ze.jsx(du,{type:(i==null?void 0:i.type)||"default",icon:(i==null?void 0:i.icon)||ze.jsx(MJe,{}),children:"点击上传文件"})})};HJe.displayName="UploadFile";const YLt=e=>ze.jsx(hi,{...e,children:ze.jsx(HJe,{...e})}),zJe=e=>{let{maxCount:t,value:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(n){if(console.log("value",n),typeof n=="string")try{n=JSON.parse(n),o(n)}catch{}let S=[];if(Array.isArray(n))for(let w=0;w<n.length;w++){let C=n[w];var E=g.current.find(O=>O.uid===C.uid);!E||(E.version||0)<(C.version||0)?S.push(C):S.push(E)}l(S)}},[n]),t=t||99,r=r||!0,console.log("maxCount",t);const[a,l]=J.useState([]),[s,u]=J.useState(""),[c,f]=J.useState(0),[d,p]=J.useState(!1),g=J.useRef([]),y=E=>new Promise((S,w)=>{const C=new FileReader;C.readAsDataURL(E),C.onload=()=>S(C.result),C.onerror=O=>w(O)}),h=async(E,S)=>{!E.url&&!E.preview&&(E.preview=await y(E.originFileObj)),u(E.url||E.preview),f(S),p(!0)},m=async(E,S)=>{i!=null&&i.disabled||l(a.filter((w,C)=>C!==S))},v=ze.jsx(ze.Fragment,{children:ze.jsxs("div",{className:"fw-full fh-full fflex fflex-col fitems-center fjustify-center fborder fborder-dashed fcursor-pointer frounded",children:[ze.jsx(NJe,{}),ze.jsx("div",{className:"fmt-2",children:"点击上传"})]})}),b=E=>{let{fileList:S}=E,w=[];for(let D=0;D<S.length;D++){var C=S[D];C.version=new Date().getTime();var O=g.current.find(x=>x.uid===C.uid);console.log("oldfile",JSON.parse(JSON.stringify(O||{}))),O&&O.status!="uploading"?w.push(O):(C.status=="done"&&C.response&&(C.url=C.response),w.push(C))}g.current=w,l(w),o(w.map(D=>({uid:D.uid,name:D.name,status:D.status,url:D.url||D.response||"",error:D.error,version:D.version||0})))};return ze.jsxs(ze.Fragment,{children:[ze.jsx("div",{className:"fflex fgap-3 fflex-wrap",children:ze.jsx(Bj,{...i,itemRender:(E,S,w)=>{console.log("file",S);let C=w.findIndex(O=>O.uid===S.uid);return ze.jsx(ze.Fragment,{children:ze.jsxs("div",{className:"fgroup fw-full fh-full fbg-transparent fborder frounded fflex fitems-center fjustify-center foverflow-hidden fcursor-pointer frelative"+(S.status=="error"?" fborder-red-500":""),children:[ze.jsxs("div",{className:" fhidden fabsolute fw-full fh-full fbg-gray-900 fbg-opacity-50 fitems-center fjustify-center fz-10 group-hover:fflex ftext-white ftext-lg fgap-2",children:[S.status=="done"&&ze.jsx(IJe,{onClick:()=>{h(S,C)},className:"hover:ftext-gray-200"}),!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&ze.jsx(xve,{onClick:()=>{m(S,C)},className:"hover:ftext-gray-200"})]}),S.status=="uploading"&&ze.jsx("div",{className:" fw-full fh-full fflex fitems-center fjustify-center fabsolute ftop-0 fleft-0 ",children:ze.jsx(P4,{})}),ze.jsx("img",{src:S.url||S.thumbUrl,alt:"Example Image",class:"fmax-w-full fmax-h-full fobject-contain "})]},"file-".concat(S.uid))})},listType:"picture-card",fileList:a,multiple:r,onPreview:h,onChange:b,maxCount:t,children:a.length>=t||i!=null&&i.disabled||i!=null&&i.readonly?null:v})}),s&&ze.jsx(qF.PreviewGroup,{preview:{visible:d,current:c,onVisibleChange:E=>p(E),onChange:E=>{f(E)}},children:a.map((E,S)=>ze.jsx(ze.Fragment,{children:ze.jsx(qF,{wrapperStyle:{display:"none"},src:E.url})}))})]})};zJe.displayName="UploadImage";const XLt=e=>ze.jsx(hi,{...e,children:ze.jsx(zJe,{...e})}),QLt=e=>{let{value:t,onChange:n,form:r,fieldName:o,...i}=e,a=!1;return typeof t=="boolean"?a=t:typeof t=="string"?a=t=="1"||t=="true":typeof t=="number"&&(a=t==1),t!==a&&(r==null||r.setFieldValue(o,a)),ze.jsx(hi,{...i,children:ze.jsx(pve,{...i,onChange:n,value:t})})};var ZLt={exports:{}};(function(e,t){(function(n,r){e.exports=r(RXe)})(hr,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var s=100*a+l;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return o.default.locale(i,null,!0),i})})(ZLt);var JLt={locale:"zh_CN",yearFormat:"YYYY年",cellDateFormat:"D",cellMeridiemFormat:"A",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const ejt={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},VJe={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},JLt),timePickerLocale:Object.assign({},ejt)};VJe.lang.ok="确定";var UJe={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(hr,function(){return function(n,r,o){o.updateLocale=function(i,a){var l=o.Ls[i];if(l)return(a?Object.keys(a):[]).forEach(function(s){l[s]=a[s]}),l}}})})(UJe);var tjt=UJe.exports;const njt=ql(tjt);fa.extend(njt);fa.extend(LXe);fa.updateLocale("zh-cn",{weekStart:0});const rjt=e=>{let{datetype:t,value:n,defaultNow:r,onChange:o,...i}=e;t=t||"date";const[a,l]=J.useState(i==null?void 0:i.picker),[s,u]=J.useState(i==null?void 0:i.format),[c,f]=J.useState(!1),[d,p]=J.useState(!1),g=J.useRef(!1);J.useEffect(()=>{if(r&&!n){const h=fa().format("YYYY-MM-DD HH:mm:ss");typeof o=="function"&&o(h);return}},[]);const y=(h,m)=>{g.current=!0,o(m)};return J.useEffect(()=>{switch(l("date"),f(!1),t){case"date":l("date"),u("YYYY-MM-DD"),p(!1);break;case"datetime":f(!0),l("datetime"),u("YYYY-MM-DD HH:mm:ss"),p(!0);break;case"month":l("month"),p(!1);break;case"year":l("year"),p(!1);break}},[t]),ze.jsx(hi,{...i,children:ze.jsx(fx,{locale:VJe,...i,picker:a,format:s,style:{width:"100%"},onChange:y,value:n&&fa(n).isValid()?fa(n):void 0,showTime:c,needConfirm:d})})};var WJe={},Ah={},Dve={exports:{}};Dve.exports;(function(e){const n=(i=0)=>a=>`\x1B[${38+i};5;${a}m`,r=(i=0)=>(a,l,s)=>`\x1B[${38+i};2;${a};${l};${s}m`;function o(){const i=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[l,s]of Object.entries(a)){for(const[u,c]of Object.entries(s))a[u]={open:`\x1B[${c[0]}m`,close:`\x1B[${c[1]}m`},s[u]=a[u],i.set(c[0],c[1]);Object.defineProperty(a,l,{value:s,enumerable:!1})}return Object.defineProperty(a,"codes",{value:i,enumerable:!1}),a.color.close="\x1B[39m",a.bgColor.close="\x1B[49m",a.color.ansi256=n(),a.color.ansi16m=r(),a.bgColor.ansi256=n(10),a.bgColor.ansi16m=r(10),Object.defineProperties(a,{rgbToAnsi256:{value:(l,s,u)=>l===s&&s===u?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(s/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:l=>{const s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(l.toString(16));if(!s)return[0,0,0];let{colorString:u}=s.groups;u.length===3&&(u=u.split("").map(f=>f+f).join(""));const c=Number.parseInt(u,16);return[c>>16&255,c>>8&255,c&255]},enumerable:!1},hexToAnsi256:{value:l=>a.rgbToAnsi256(...a.hexToRgb(l)),enumerable:!1}}),a}Object.defineProperty(e,"exports",{enumerable:!0,get:o})})(Dve);var GJe=Dve.exports,_h={};Object.defineProperty(_h,"__esModule",{value:!0});_h.printIteratorEntries=ijt;_h.printIteratorValues=ajt;_h.printListItems=ljt;_h.printObjectProperties=sjt;const ojt=(e,t)=>{const n=Object.keys(e).sort(t);return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r=>{Object.getOwnPropertyDescriptor(e,r).enumerable&&n.push(r)}),n};function ijt(e,t,n,r,o,i,a=": "){let l="",s=e.next();if(!s.done){l+=t.spacingOuter;const u=n+t.indent;for(;!s.done;){const c=i(s.value[0],t,u,r,o),f=i(s.value[1],t,u,r,o);l+=u+c+a+f,s=e.next(),s.done?t.min||(l+=","):l+=","+t.spacingInner}l+=t.spacingOuter+n}return l}function ajt(e,t,n,r,o,i){let a="",l=e.next();if(!l.done){a+=t.spacingOuter;const s=n+t.indent;for(;!l.done;)a+=s+i(l.value,t,s,r,o),l=e.next(),l.done?t.min||(a+=","):a+=","+t.spacingInner;a+=t.spacingOuter+n}return a}function ljt(e,t,n,r,o,i){let a="";if(e.length){a+=t.spacingOuter;const l=n+t.indent;for(let s=0;s<e.length;s++)a+=l,s in e&&(a+=i(e[s],t,l,r,o)),s<e.length-1?a+=","+t.spacingInner:t.min||(a+=",");a+=t.spacingOuter+n}return a}function sjt(e,t,n,r,o,i){let a="";const l=ojt(e,t.compareKeys);if(l.length){a+=t.spacingOuter;const s=n+t.indent;for(let u=0;u<l.length;u++){const c=l[u],f=i(c,t,s,r,o),d=i(e[c],t,s,r,o);a+=s+f+": "+d,u<l.length-1?a+=","+t.spacingInner:t.min||(a+=",")}a+=t.spacingOuter+n}return a}var _g={};Object.defineProperty(_g,"__esModule",{value:!0});_g.test=_g.serialize=_g.default=void 0;var q$e=_h,ZF=function(){return typeof globalThis<"u"?globalThis:typeof ZF<"u"?ZF:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),EK=ZF["jest-symbol-do-not-touch"]||ZF.Symbol;const ujt=typeof EK=="function"&&EK.for?EK.for("jest.asymmetricMatcher"):1267621,oN=" ",KJe=(e,t,n,r,o,i)=>{const a=e.toString();return a==="ArrayContaining"||a==="ArrayNotContaining"?++r>t.maxDepth?"["+a+"]":a+oN+"["+(0,q$e.printListItems)(e.sample,t,n,r,o,i)+"]":a==="ObjectContaining"||a==="ObjectNotContaining"?++r>t.maxDepth?"["+a+"]":a+oN+"{"+(0,q$e.printObjectProperties)(e.sample,t,n,r,o,i)+"}":a==="StringMatching"||a==="StringNotMatching"||a==="StringContaining"||a==="StringNotContaining"?a+oN+i(e.sample,t,n,r,o):e.toAsymmetricMatcher()};_g.serialize=KJe;const qJe=e=>e&&e.$$typeof===ujt;_g.test=qJe;const cjt={serialize:KJe,test:qJe};var fjt=cjt;_g.default=fjt;var Hg={},djt=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};Object.defineProperty(Hg,"__esModule",{value:!0});Hg.test=Hg.serialize=Hg.default=void 0;var YJe=XJe(djt),jo=XJe(GJe);function XJe(e){return e&&e.__esModule?e:{default:e}}const pjt=e=>e.replace((0,YJe.default)(),t=>{switch(t){case jo.default.red.close:case jo.default.green.close:case jo.default.cyan.close:case jo.default.gray.close:case jo.default.white.close:case jo.default.yellow.close:case jo.default.bgRed.close:case jo.default.bgGreen.close:case jo.default.bgYellow.close:case jo.default.inverse.close:case jo.default.dim.close:case jo.default.bold.close:case jo.default.reset.open:case jo.default.reset.close:return"</>";case jo.default.red.open:return"<red>";case jo.default.green.open:return"<green>";case jo.default.cyan.open:return"<cyan>";case jo.default.gray.open:return"<gray>";case jo.default.white.open:return"<white>";case jo.default.yellow.open:return"<yellow>";case jo.default.bgRed.open:return"<bgRed>";case jo.default.bgGreen.open:return"<bgGreen>";case jo.default.bgYellow.open:return"<bgYellow>";case jo.default.inverse.open:return"<inverse>";case jo.default.dim.open:return"<dim>";case jo.default.bold.open:return"<bold>";default:return""}}),QJe=e=>typeof e=="string"&&!!e.match((0,YJe.default)());Hg.test=QJe;const ZJe=(e,t,n,r,o,i)=>i(pjt(e),t,n,r,o);Hg.serialize=ZJe;const hjt={serialize:ZJe,test:QJe};var vjt=hjt;Hg.default=vjt;var zg={};Object.defineProperty(zg,"__esModule",{value:!0});zg.test=zg.serialize=zg.default=void 0;var Y$e=_h;const gjt=" ",JJe=["DOMStringMap","NamedNodeMap"],mjt=/^(HTML\w*Collection|NodeList)$/,yjt=e=>JJe.indexOf(e)!==-1||mjt.test(e),eet=e=>e&&e.constructor&&!!e.constructor.name&&yjt(e.constructor.name);zg.test=eet;const bjt=e=>e.constructor.name==="NamedNodeMap",tet=(e,t,n,r,o,i)=>{const a=e.constructor.name;return++r>t.maxDepth?"["+a+"]":(t.min?"":a+gjt)+(JJe.indexOf(a)!==-1?"{"+(0,Y$e.printObjectProperties)(bjt(e)?Array.from(e).reduce((l,s)=>(l[s.name]=s.value,l),{}):{...e},t,n,r,o,i)+"}":"["+(0,Y$e.printListItems)(Array.from(e),t,n,r,o,i)+"]")};zg.serialize=tet;const Ejt={serialize:tet,test:eet};var Sjt=Ejt;zg.default=Sjt;var Vg={},Rl={},Tve={};Object.defineProperty(Tve,"__esModule",{value:!0});Tve.default=wjt;function wjt(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}Object.defineProperty(Rl,"__esModule",{value:!0});Rl.printText=Rl.printProps=Rl.printElementAsLeaf=Rl.printElement=Rl.printComment=Rl.printChildren=void 0;var net=Cjt(Tve);function Cjt(e){return e&&e.__esModule?e:{default:e}}const xjt=(e,t,n,r,o,i,a)=>{const l=r+n.indent,s=n.colors;return e.map(u=>{const c=t[u];let f=a(c,n,l,o,i);return typeof c!="string"&&(f.indexOf(`
406
406
  `)!==-1&&(f=n.spacingOuter+l+f+n.spacingOuter+r),f="{"+f+"}"),n.spacingInner+r+s.prop.open+u+s.prop.close+"="+s.value.open+f+s.value.close}).join("")};Rl.printProps=xjt;const Ajt=(e,t,n,r,o,i)=>e.map(a=>t.spacingOuter+n+(typeof a=="string"?ret(a,t):i(a,t,n,r,o))).join("");Rl.printChildren=Ajt;const ret=(e,t)=>{const n=t.colors.content;return n.open+(0,net.default)(e)+n.close};Rl.printText=ret;const Ojt=(e,t)=>{const n=t.colors.comment;return n.open+"<!--"+(0,net.default)(e)+"-->"+n.close};Rl.printComment=Ojt;const $jt=(e,t,n,r,o)=>{const i=r.colors.tag;return i.open+"<"+e+(t&&i.close+t+r.spacingOuter+o+i.open)+(n?">"+i.close+n+r.spacingOuter+o+i.open+"</"+e:(t&&!r.min?"":" ")+"/")+">"+i.close};Rl.printElement=$jt;const Djt=(e,t)=>{const n=t.colors.tag;return n.open+"<"+e+n.close+" …"+n.open+" />"+n.close};Rl.printElementAsLeaf=Djt;Object.defineProperty(Vg,"__esModule",{value:!0});Vg.test=Vg.serialize=Vg.default=void 0;var tS=Rl;const Tjt=1,oet=3,iet=8,aet=11,Pjt=/^((HTML|SVG)\w*)?Element$/,Rjt=e=>{try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}},Ijt=e=>{const t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||Rjt(e);return n===Tjt&&(Pjt.test(t)||o)||n===oet&&t==="Text"||n===iet&&t==="Comment"||n===aet&&t==="DocumentFragment"},set=e=>{var t;return(e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&Ijt(e)};Vg.test=set;function Njt(e){return e.nodeType===oet}function Mjt(e){return e.nodeType===iet}function SK(e){return e.nodeType===aet}const uet=(e,t,n,r,o,i)=>{if(Njt(e))return(0,tS.printText)(e.data,t);if(Mjt(e))return(0,tS.printComment)(e.data,t);const a=SK(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?(0,tS.printElementAsLeaf)(a,t):(0,tS.printElement)(a,(0,tS.printProps)(SK(e)?[]:Array.from(e.attributes).map(l=>l.name).sort(),SK(e)?{}:Array.from(e.attributes).reduce((l,s)=>(l[s.name]=s.value,l),{}),t,n+t.indent,r,o,i),(0,tS.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,i),t,n)};Vg.serialize=uet;const Fjt={serialize:uet,test:set};var Bjt=Fjt;Vg.default=Bjt;var Ug={};Object.defineProperty(Ug,"__esModule",{value:!0});Ug.test=Ug.serialize=Ug.default=void 0;var R4=_h;const kjt="@@__IMMUTABLE_ITERABLE__@@",Ljt="@@__IMMUTABLE_LIST__@@",jjt="@@__IMMUTABLE_KEYED__@@",_jt="@@__IMMUTABLE_MAP__@@",X$e="@@__IMMUTABLE_ORDERED__@@",Hjt="@@__IMMUTABLE_RECORD__@@",zjt="@@__IMMUTABLE_SEQ__@@",Vjt="@@__IMMUTABLE_SET__@@",Ujt="@@__IMMUTABLE_STACK__@@",zC=e=>"Immutable."+e,_j=e=>"["+e+"]",I4=" ",Q$e="…",Wjt=(e,t,n,r,o,i,a)=>++r>t.maxDepth?_j(zC(a)):zC(a)+I4+"{"+(0,R4.printIteratorEntries)(e.entries(),t,n,r,o,i)+"}";function Gjt(e){let t=0;return{next(){if(t<e._keys.length){const n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}const Kjt=(e,t,n,r,o,i)=>{const a=zC(e._name||"Record");return++r>t.maxDepth?_j(a):a+I4+"{"+(0,R4.printIteratorEntries)(Gjt(e),t,n,r,o,i)+"}"},qjt=(e,t,n,r,o,i)=>{const a=zC("Seq");return++r>t.maxDepth?_j(a):e[jjt]?a+I4+"{"+(e._iter||e._object?(0,R4.printIteratorEntries)(e.entries(),t,n,r,o,i):Q$e)+"}":a+I4+"["+(e._iter||e._array||e._collection||e._iterable?(0,R4.printIteratorValues)(e.values(),t,n,r,o,i):Q$e)+"]"},wK=(e,t,n,r,o,i,a)=>++r>t.maxDepth?_j(zC(a)):zC(a)+I4+"["+(0,R4.printIteratorValues)(e.values(),t,n,r,o,i)+"]",cet=(e,t,n,r,o,i)=>e[_jt]?Wjt(e,t,n,r,o,i,e[X$e]?"OrderedMap":"Map"):e[Ljt]?wK(e,t,n,r,o,i,"List"):e[Vjt]?wK(e,t,n,r,o,i,e[X$e]?"OrderedSet":"Set"):e[Ujt]?wK(e,t,n,r,o,i,"Stack"):e[zjt]?qjt(e,t,n,r,o,i):Kjt(e,t,n,r,o,i);Ug.serialize=cet;const fet=e=>e&&(e[kjt]===!0||e[Hjt]===!0);Ug.test=fet;const Yjt={serialize:cet,test:fet};var Xjt=Yjt;Ug.default=Xjt;var Wg={},tie={exports:{}},Eo={};/** @license React v17.0.2
407
407
  * react-is.production.min.js
408
408
  *