antd-form-document 5.0.10 → 5.0.11
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.
- package/README.md +64 -61
- package/dist/index.tsx +1 -1
- package/dist/index.tsx.map +1 -1
- package/dist/src/components/Audio/index.d.ts.map +1 -1
- package/dist/src/components/Checkbox/index.d.ts.map +1 -1
- package/dist/src/components/Editor/index.d.ts +1 -0
- package/dist/src/components/Editor/index.d.ts.map +1 -1
- package/dist/src/components/Photo/index.d.ts.map +1 -1
- package/dist/src/components/Radio/index.d.ts.map +1 -1
- package/dist/src/components/Rate/index.d.ts.map +1 -1
- package/dist/src/components/Select/index.d.ts.map +1 -1
- package/dist/src/components/SuperUpload/index.d.ts.map +1 -1
- package/dist/src/components/Upload/index.d.ts.map +1 -1
- package/dist/src/components/Video/index.d.ts.map +1 -1
- package/dist/src/config.d.ts +0 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/preview/index.d.ts.map +1 -1
- package/dist/src/service/UIComponent.d.ts +2 -8
- package/dist/src/service/UIComponent.d.ts.map +1 -1
- package/dist/src/service/UIListComponent.d.ts +8 -1
- package/dist/src/service/UIListComponent.d.ts.map +1 -1
- package/dist/src/service/WidgetComponent.d.ts +10 -1
- package/dist/src/service/WidgetComponent.d.ts.map +1 -1
- package/dist/src/utils/style.d.ts +1 -1
- package/dist/src/utils/style.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/index.tsx
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/classCallCheck";import r from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/defineProperty";import{jsx as a,Fragment as s,jsxs as u}from"react/jsx-runtime";import c,{PureComponent as p,useEffect as f,useRef as d,useMemo as h,memo as v,useState as y}from"react";import{Form as m,Space as g,Image as b,Input as O,InputNumber as w,Select as j,Checkbox as P,Radio as S,Switch as k,DatePicker as C,TimePicker as x,Upload as D,Button as L,Modal as I,Progress as V,message as R,Rate as E,Card as B,Table as T,Row as F,Col as N,Steps as A,Layout as M,Divider as U,Skeleton as q}from"antd";import{parseInt as z,uniqueId as _,cloneDeep as W,camelCase as H,find as G,every as $,some as Y,concat as K,mapValues as J,isBoolean as Q,isArray as X,isObject as Z,isUndefined as ee}from"lodash";import te from"@babel/runtime/helpers/objectWithoutProperties";import re from"@babel/runtime/helpers/asyncToGenerator";import ne from"@babel/runtime/regenerator";import ie from"moment";import{extend as oe}from"umi-request";import{parse as le,compile as ae}from"path-to-regexp";import se from"wangeditor-for-react";import ue from"number-format.js";import ce from"dayjs";import pe from"dayjs/plugin/weekday";import fe from"dayjs/plugin/localeData";import de from"dayjs/plugin/customParseFormat";import he from"@babel/runtime/helpers/toConsumableArray";import{UploadOutlined as ve,PlusOutlined as ye,StarFilled as me,QuestionCircleOutlined as ge,UpOutlined as be,DownOutlined as Oe}from"@ant-design/icons";import we from"bytes";import je from"antd-img-crop";import Pe from"file-block-upload";import Se from"@babel/runtime/helpers/objectDestructuringEmpty";import ke from"@babel/runtime/helpers/extends";function Ce(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return xe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xe(e,t):void 0}}(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==r.return||r.return()}finally{if(a)throw o}}}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var De=function(){return r((function e(r){t(this,e),l(this,"attributes",{}),this.id=_();var n,i=Ce(r.attributes);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.value.trim();this.isBoolean(a)&&(a=this.toBoolean(a)),this.attributes[o.name]=a}}catch(e){i.e(e)}finally{i.f()}this.children=new Array;var s,u=Ce(r.childNodes);try{for(u.s();!(s=u.n()).done;){var c,p,f=s.value;if(f instanceof Element)null===(c=this.children)||void 0===c||c.push(new e(f));if(3===f.nodeType&&f.textContent&&(this.text=f.textContent),4===f.nodeType)this.cdata=null===(p=f.nodeValue)||void 0===p?void 0:p.replace(/\ +/g," ").replace(/[\t\r\n]/g,"")}}catch(e){u.e(e)}finally{u.f()}this.tag=r.nodeName}),[{key:"isBoolean",value:function(e){return"true"===e||"false"===e}},{key:"toBoolean",value:function(e){return"true"===e}},{key:"isNumber",value:function(e){return/^\d+$/.test(e)}},{key:"toNumber",value:function(e){return z(e,10)}}])}(),Le=function(){function e(){t(this,e)}return r(e,null,[{key:"parser",value:function(e){var t=e.childNodes[0];return new De(t)}},{key:"toDocument",value:function(e){return(new DOMParser).parseFromString(e,"text/xml")}},{key:"getRoot",value:function(t){var r=e.toDocument(t);return e.parser(r)}},{key:"selector",value:function(e,t){return e.querySelector(t)}},{key:"selectors",value:function(e,t){return e.querySelectorAll(t)}}])}();function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Re=function(e){var t=e.type,r=void 0===t?"string":t,n=e.required,i=e.minlength,o=e.maxlength,l=e.min,a=e.max,s=e.pattern,u=e.message;return n?{type:r,required:n,message:u}:i&&o?{type:r,min:Number(i),max:Number(o),message:u}:l&&a?{type:"number",min:Number(l),max:Number(a),message:u}:"phone"===r?{type:"string",pattern:new RegExp("^[1][3,5,6,7,8][0-9]\\d{8}$"),message:u}:"regexp"===r&&"string"==typeof s?{type:"string",pattern:new RegExp(s),message:u}:{type:r,message:u}},Ee=c.createContext({});function Be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fe=function(){function e(r){if(t(this,e),l(this,"request",{prefix:"api",headers:{},params:{},route:"/design"}),l(this,"file",{listUrl:"/file/list",downloadUrl:"/file/download",uploadUrl:"/file/upload",previewUrl:"/file/preview",extraData:function(e,t){}}),l(this,"style",{labelStyle:{color:"#055ab5"}}),l(this,"form",{documentUrl:"/form/:formId"}),l(this,"chunk",{chunkSize:10*Math.pow(1024,2),checkFile:"/chunk/checkFile",checkChunk:"/chunk/checkChunk",chunkUpload:"/chunk/chunkUpload",doMerge:"/chunk/doMerge",mergeProgress:"/chunk/mergeProgress",onComplete:"/chunk/onComplete",completeProgress:"/chunk/completeProgress"}),l(this,"mimeType",{}),r){var n=r.request,i=r.file,o=r.form,a=r.chunk,s=r.mimeType,u=r.components,c=r.previewComponents;this.request=Te(Te({},this.request),n),this.file=Te(Te({},this.file),i),this.form=Te(Te({},this.form),o),this.chunk=Te(Te({},this.chunk),a),this.mimeType=s,this.components=u,this.previewComponents=c}}return r(e,null,[{key:"init",value:function(t){return new e(t)}}])}(),Ne=Fe.init(),Ae=function(e){Ne=Fe.init(e)},Me=0,Ue=[],qe=function(e){return new Promise((function(t){setTimeout((function(){t(e)}),e)}))},ze=function(){var e=re(ne.mark((function e(t){var r,n;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===Me)for(r=0,n=Ue;r<n.length;r++)(0,n[r])(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_e=function(){var e=re(ne.mark((function e(){return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0==Me++&&ze(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),We=function(){var e=re(ne.mark((function e(){return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0==--Me&&ze(!1);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),He=function(){var e=re(ne.mark((function e(){return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qe(1e3);case 2:0===Me?ze(!1):He();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ge=function(){var e=re(ne.mark((function e(){return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Me=0,ze(!1);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$e=["status"];function Ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ke=oe({prefix:Ne.request.prefix,headers:Ne.request.headers,timeout:1e4});Ke.use(function(){var e=re(ne.mark((function e(t,r){return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,_e(),e.next=4,r();case 4:We(),e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),Ge(),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}(),{global:!0});var Je=function(t,r){var n=W(r.data),i=t;try{var o,a="",s=i.match(/[a-zA-z]+:\/\/[^/]*/);if(s)a=e(s,1)[0],i=i.slice(a.length);var u=null===(o=le(i))||void 0===o?void 0:o.tokens;i=ae(i)(r.data),u.forEach((function(e){e instanceof Object&&e.name in n&&delete n[e.name]})),i=a+i}catch(e){console.error(e.message)}return"GET"===r.method.toLocaleUpperCase()?r.params=n:r.type&&(r.requestType=r.type),r.prefix=Ne.request.prefix,Ke(i,r).then((function(e){var t=e.status,r=te(e,$e),n=200===t;return Promise.resolve(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({success:n},r))})).catch((function(e){var t,r=e.response,n=e.data,o=null!==(t=null==n?void 0:n.message)&&void 0!==t?t:"访问超时";return console.error(i,r,n),Promise.resolve({success:!1,message:o})}))},Qe=function(t){var r="GET",n="json",i=t,o=t.split(" ");if(2===o.length){var l=e(o,2);r=l[0],i=l[1]}else if(3===o.length){var a=e(o,3);r=a[0],n=a[1],i=a[2]}return function(e){return Je(i,{method:r,type:n,data:e})}},Xe=function(t){var r={};t&&t.replace(/\ +/g,"").split(";").forEach((function(t){if(t){var n=t.split(":"),i=e(n,2),o=i[0],a=i[1];Object.assign(r,l({},H(o),a))}}));return r};function Ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tt=function(){return!!e})()}var rt=function(s){function u(){var r,o,a,s;t(this,u);for(var c=arguments.length,p=new Array(c),f=0;f<c;f++)p[f]=arguments[f];return o=this,a=u,s=[].concat(p),a=i(a),r=n(o,tt()?Reflect.construct(a,s||[],i(o).constructor):a.apply(o,s)),l(r,"styleWrapper",{style:{borderBottom:"1px solid #d9d9d9"}}),l(r,"request",function(){var t=re(ne.mark((function t(n,i){var o;return ne.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=null!=i?i:r.context.params,t.abrupt("return",Qe(n)(et({},o)).then((function(t){var r=t.success,n=t.data;if(r){if(Array.isArray(n)){var i=n.map((function(t){var r,n=null===(r=Object.entries(t))||void 0===r?void 0:r[0],i=e(n,2);return{key:i[0],label:i[1]}}));return Promise.resolve(i)}return Promise.resolve(n)}return Promise.reject(void 0)})).catch((function(e){return console.error("remote",n,e),Promise.reject(e)})));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),r}return o(u,s),r(u,[{key:"setDefaultValue",value:function(e){var t=this.context.form;if(t){var r,n,i=this.props.code;if(!(null===(r=t.current)||void 0===r?void 0:r.getFieldValue(i)))null===(n=t.current)||void 0===n||n.setFieldValue(i,e)}}},{key:"setFieldValue",value:function(e){var t=this.context.form;if(t){var r,n=this.props.code;null===(r=t.current)||void 0===r||r.setFieldValue(n,e)}}},{key:"cleanFieldValue",value:function(){var e=this;setTimeout((function(){e.setFieldValue(void 0)}),1)}},{key:"getFieldValue",value:function(){var e=this.context.form;if(e){var t,r=this.props.code;return null===(t=e.current)||void 0===t?void 0:t.getFieldValue(r)}}},{key:"getFieldsValue",value:function(){var e,t=this.context.form;if(t)return null===(e=t.current)||void 0===e?void 0:e.getFieldsValue()}},{key:"getLabel",value:function(){if(this.context.showTitle){var e=this.props,t=e.title,r=e.labelStyle,n=Xe(r);return a("span",{style:et(et({},Ne.style.labelStyle),n),children:t})}}},{key:"getItem",value:function(){var e,t,r=this.props,n=r.preview,i=r.labelCol,o=r.wrapperCol,l=r.tips,a=i&&o?{labelCol:{span:i},wrapperCol:{span:o}}:{};n?(e={required:!1},Object.assign(null!==(t=a.wrapperCol)&&void 0!==t?t:{},this.styleWrapper)):e={tooltip:l};return{itemProps:e,itemLayouts:a}}},{key:"getStyles",value:function(){var e=this.props,t=e.style,r=e.itemStyle;return{styles:Xe(t),itemStyles:Xe(r)}}},{key:"display",value:function(){var e=this.getFieldsValue(),t=this.props,r=t.defaultHide,n=void 0!==r&&r,i=t.children,o=t.preview,l=!n,a=G(i,{tag:"Conditions"});if(a){var s,u=a.type,c=a.action,p=null===(s=a.children)||void 0===s?void 0:s.map(function(e,t){return function(r){var n=r.test;try{if(e){e=Ve(Ve({},e),{},{preview:t});var i=Object.keys(e).join(",");return new Function("{".concat(i,"}"),"return ".concat(n))(e)}}catch(e){}}}(e,o));if((null==p?void 0:p.length)>0&&void 0!==(null==p?void 0:p[0])){var f=!1;if((f="and"===u?$(p):Y(p))&&"hide"===c||!f&&"show"===c)return!1;if(!f&&"hide"===c||f&&"show"===c)return!0}}return l}},{key:"rules",value:function(){var e=this.props,t=e.preview,r=e.children;if(!t){var n,i,o=G(r,{tag:"Validates"});return null!==(n=null==o||null===(i=o.children)||void 0===i?void 0:i.map(Re))&&void 0!==n?n:[]}return[]}},{key:"collectionList",value:function(){var e=G(this.props.children,{tag:"Collection"});if(e)return function(e,t){var r=t.cdata;try{if(e){var n=Object.keys(e).join(",");return new Function("{".concat(n,"}"),"".concat(r))(e)}return new Function("".concat(r))()}catch(e){}return[]}(this.getFieldsValue(),e)}},{key:"onComputeValue",value:function(){var e=this,t=G(this.props.children,{tag:"Compute"});if(t){var r=function(e,t){var r=t.cdata;try{if(e){var n=Object.keys(e).join(",");return new Function("{".concat(n,"}"),"moment","".concat(r))(e,ie)}return new Function("moment","".concat(r))(ie)}catch(e){}}(this.getFieldsValue(),t);r&&setTimeout((function(){e.setFieldValue(r)}),1)}}},{key:"initValue",value:function(e){var t=this.props.defaultValue,r=void 0===t?e:t;r&&this.setDefaultValue(r)}}])}(c.PureComponent);rt.contextType=Ee;var nt=["Component","defaultValue","style"];function it(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?it(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lt=function(){return!!e})()}var at=function(){function e(){var r,o,a,s;t(this,e);for(var u=arguments.length,c=new Array(u),p=0;p<u;p++)c[p]=arguments[p];return o=this,a=e,s=[].concat(c),a=i(a),r=n(o,lt()?Reflect.construct(a,s||[],i(o).constructor):a.apply(o,s)),l(r,"initValue",(function(){var e=r.props.defaultValue;e&&r.forceUpdate((function(){r.setDefaultValue(e)}))})),l(r,"onChange",(function(e){r.setFieldValue(e)})),r}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.hidden,u=this.props,c=u.Component;u.defaultValue,u.style;var p=te(u,nt),f=this.getStyles(),d=f.styles,h=f.itemStyles;return a(m.Item,ot(ot(ot({name:o,label:this.getLabel(),style:h,hidden:l,rules:e},r),n),{},{children:a(c,ot(ot({},p),{},{style:d,onChange:this.onChange}))}))}return a(s,{})}}])}();function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ut(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ct=function(){return!!e})()}var pt=function(){function e(){var r,o,a,s;t(this,e);for(var u=arguments.length,c=new Array(u),p=0;p<u;p++)c[p]=arguments[p];return o=this,a=e,s=[].concat(c),a=i(a),r=n(o,ct()?Reflect.construct(a,s||[],i(o).constructor):a.apply(o,s)),l(r,"getList",(function(e,t,r){if(t){var n=e.filter((function(e){var r=e.key;return t.includes(r)}));return r(n),n}return e})),r}return o(e,rt),r(e,[{key:"optionList",value:function(){var e=G(this.props.children,{tag:"Options"});return null==e?void 0:e.children}},{key:"plusRules",value:function(){var e=this.rules();return null==e?void 0:e.map((function(e){if(e.required){return ut(ut({},e),{},{validator:function(e,t){return(null==t?void 0:t.length)>0?Promise.resolve():Promise.reject()}})}if(e.min&&e.max){return ut(ut({},e),{},{validator:function(t,r){return r.length>=e.min&&r.length<=e.max?Promise.resolve():Promise.reject()}})}return ut({},e)}))}}])}();function ft(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ft=function(){return!!e})()}var dt=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,ft()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,p),r(e)}();function ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ht=function(){return!!e})()}var vt=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,ht()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,rt),r(e,[{key:"render",value:function(){if(this.display()){var e=this.rules(),t=this.props,r=t.title,n=t.hidden,i=this.getStyles(),o=i.styles,l=i.itemStyles;return a(m.Item,{style:l,hidden:n,rules:n?[]:e,wrapperCol:{span:24},children:a("div",{style:o,children:r})})}return a(s,{})}}])}();function yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(yt=function(){return!!e})()}var mt=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,yt()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,rt),r(e,[{key:"render",value:function(){var e,t=this.display(),r=null===(e=this.context.tooltip)||void 0===e||e;if(t&&r){var n=this.props,i=n.title,o=n.hidden,l=n.children,u=this.getStyles(),c=u.styles,p=u.itemStyles;return a(m.Item,{style:p,hidden:o,wrapperCol:{span:24},children:a("div",{style:c,children:null!=i?i:l})})}return a(s,{})}}])}(),gt=function(e){var t=e.value,r=e.type,n=e.style,i=e.onChange;return f((function(){null==i||i(t)}),[]),t&&"url"===r?t.split(/[,;\s]/).map((function(e){return a("div",{style:n,children:a("a",{href:e,target:"_blank",rel:"noreferrer",children:e})})})):a("div",{style:n,children:t})},bt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewText)&&void 0!==t?t:gt)(e)},Ot=function(e){var t=e.value;e.type,e.style;var r=e.onChange;return f((function(){null==r||r(t)}),[]),a("div",{dangerouslySetInnerHTML:{__html:t}})},wt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewEditor)&&void 0!==t?t:Ot)(e)},jt=function(e){var t=e.value,r=e.format,n=e.style,i=e.onChange;f((function(){i(t)}),[]);var o=r.trim().split(/\[.*?\]|[HMS]/),l=r.trim().split(new RegExp("[".concat(o.join(""),"]"))).filter((function(e){return e})),s=-1,u=null==t?void 0:t.split(":"),c=[];return o.forEach((function(e,t){e&&c.push(e),t<=l.length-1&&c.push(l[t])})),a("div",{style:n,children:c.map((function(e){return e.includes("H")?(s++,t?u[s]:"000"):e.includes("M")||e.includes("S")?(s++,t?u[s]:"00"):e})).join("")})},Pt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewDuration)&&void 0!==t?t:jt)(e)},St=function(e){var t=e.checked,r=e.style,n=e.onChange;return f((function(){n(t)}),[]),a("div",{style:r,children:t?"开启":"关闭"})},kt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewSwitch)&&void 0!==t?t:St)(e)},Ct=function(e){var t=e.value,r=e.list,n=e.style,i=e.onChange;if(f((function(){i(t)}),[]),Array.isArray(t)){var o=r.filter((function(e){var r=e.key;return t.includes(r)})).map((function(e){return e.label}));return a("div",{style:n,children:null==o?void 0:o.join()})}var l=null==r?void 0:r.find((function(e){return e.key===t}));return a("div",{style:n,children:null==l?void 0:l.label})},xt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewList)&&void 0!==t?t:Ct)(e)},Dt=function(e){var t=e.fileList,r=Ne.request.prefix+Ne.file.downloadUrl,n=Ne.request.prefix+Ne.file.previewUrl;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,i=e.name,o=e.url,l=e.contentType,s=r+"/"+t;return null!=l&&l.endsWith("pdf")?a("div",{children:u(g,{style:{paddingBottom:10},children:[a("a",{href:o,target:"_blank",rel:"noreferrer",children:i}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=l&&l.startsWith("image")?a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a(b,{width:200,src:o,alt:i}),a("div",{children:i})]}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=l&&l.startsWith("video")?a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a("video",{src:o,controls:!0,style:{width:260},children:"当前浏览器不支持视频播放,请使用最新版谷歌浏览器!"}),a("div",{children:i})]}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=l&&l.startsWith("audio")?a("div",{children:u("div",{style:{paddingBottom:10,display:"flex",alignItems:"center"},children:[u("div",{children:[a("audio",{src:o,controls:!0,style:{width:"calc(100% - 40px)",height:30},children:"当前浏览器不支持音频播放,请使用最新版谷歌浏览器!"}),a("div",{children:i})]}),a("a",{style:{paddingLeft:10},href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=i&&i.endsWith(".doc")||null!=i&&i.endsWith(".docx")||null!=i&&i.endsWith(".xls")||null!=i&&i.endsWith(".xlsx")||null!=i&&i.endsWith(".ppt")||null!=i&&i.endsWith(".pptx")?a("div",{children:u(g,{style:{paddingBottom:10},children:[a("a",{href:n+"/"+t,target:"_blank",rel:"noreferrer",children:i}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):a("div",{children:u(g,{style:{paddingBottom:10},children:[a("a",{href:o,target:"_blank",rel:"noreferrer",children:i}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},Lt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewFile)&&void 0!==t?t:Dt)(e)},It=function(e){var t=e.fileList,r=e.autoplay,n=e.muted,i=e.loop,o=e.preload,l=Ne.request.prefix+Ne.file.downloadUrl;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,s=e.name,c=e.url,p=l+"/"+t;return a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a("audio",{src:c,controls:!0,autoPlay:r,muted:n,loop:i,preload:o,style:{width:"calc(100% - 40px)",height:30},children:"当前浏览器不支持音频播放,请使用最新版谷歌浏览器!"}),a("div",{children:s})]}),a("a",{href:p,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},Vt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewAudio)&&void 0!==t?t:It)(e)},Rt=function(e){var t=e.fileList,r=e.controls,n=e.autoplay,i=e.muted;e.pip;var o=e.loop,l=e.preload,c=Ne.request.prefix+Ne.file.downloadUrl;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,s=e.name,p=e.url,f=c+"/"+t;return a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a("video",{src:p,controls:r,autoPlay:n,muted:i,loop:o,preload:l,style:{width:260},children:"当前浏览器不支持视频播放,请使用最新版谷歌浏览器!"}),a("div",{children:s})]}),a("a",{href:f,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},Et=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewVideo)&&void 0!==t?t:Rt)(e)},Bt=function(e){var t=e.fileList,r=e.width,n=e.height,i=e.style;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,o=e.name,l=e.url;return a("div",{style:i,children:u(g,{style:{paddingBottom:10},children:[a(b,{width:r,height:n,src:l,alt:o}),a("a",{href:Ne.request.prefix+Ne.file.downloadUrl+"/"+t,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},Tt=function(e){var t,r;return(null!==(t=null===(r=Ne.previewComponents)||void 0===r?void 0:r.PreviewImage)&&void 0!==t?t:Bt)(e)};function Ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function At(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(At=function(){return!!e})()}var Mt=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,At()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.type,u=i.preview,c=i.placeholder,p=i.maxLength,f=i.allowClear,d=i.showCount,h=i.readonly,v=i.hidden,y=this.getStyles(),g=y.styles,b=y.itemStyles;return a(m.Item,Nt(Nt(Nt({name:o,label:this.getLabel(),style:b,hidden:v,rules:e},r),n),{},{children:u?a(bt,{type:l,style:g}):a(O,{maxLength:p,placeholder:c,allowClear:f,showCount:d,disabled:h,style:g})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(zt=function(){return!!e})()}var _t=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,zt()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.props,r=t.code,n=t.preview,i=t.placeholder,o=t.maxLength,l=t.allowClear,u=t.showCount,c=t.minRow,p=void 0===c?"0":c,f=t.maxRow,d=void 0===f?"0":f,h=t.readonly,v=t.hidden,y=this.getItem(),g=y.itemProps,b=y.itemLayouts,w=this.getStyles(),j=w.styles,P=w.itemStyles,S=Number(p),k=Number(d);return a(m.Item,qt(qt(qt({name:r,label:this.getLabel(),style:P,hidden:v,rules:v?[]:e},g),b),{},{children:n?a(bt,{style:j}):a(O.TextArea,{maxLength:o,placeholder:i,allowClear:l,showCount:u,autoSize:!(S+k<1)&&{minRows:S,maxRows:k},disabled:h,style:j})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gt=function(){return!!e})()}var $t=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,Gt()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){var e=this.props,t=e.type,r=void 0===t?"number":t,n=e.precision,i={};"digits"===r?i=n?{precision:Number(n)}:{precision:2}:"money"===r?i={formatter:function(e){return"¥ ".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(e){return e.replace(/\$\s?|(,*)/g,"")}}:"percentage"===r&&(i={formatter:function(e){return"".concat(e,"%")},parser:function(e){return e.replace("%","")}}),this.onComputeValue();var o=this.rules().map((function(e){return e.required?Ht(Ht({},e),{},{type:"number"}):e})),l=this.getItem(),u=l.itemProps,c=l.itemLayouts,p=this.props,f=p.code,d=p.preview,h=p.min,v=p.max,y=p.readonly,g=p.hidden,b=this.getStyles(),O=b.styles,j=b.itemStyles;return a(m.Item,Ht(Ht(Ht({name:f,label:this.getLabel(),style:j,hidden:g,rules:g?[]:o},u),c),{},{children:d?a(bt,{style:O}):a(w,Ht(Ht({min:h,max:v,disabled:y},i),{},{style:O}))}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jt(e,t,r){return t=i(t),n(e,Qt()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qt=function(){return!!e})()}var Xt=function(){function e(){return t(this,e),Jt(this,e,arguments)}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.title,u=i.preview,c=i.placeholder,p=i.hidden,f=i.readonly,d=this.getStyles(),h=d.styles,v=d.itemStyles;return a(m.Item,Kt(Kt(Kt({name:o,label:this.getLabel(),style:v,hidden:p,colon:!!l,rules:p?[]:e},r),n),{},{children:u||f?a(wt,{style:h}):a(Zt,{placeholder:c,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Zt=function(e){function n(){var e;t(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=Jt(this,n,[].concat(i)),l(e,"isReactWEditor",!1),l(e,"editorRef",c.createRef()),e}return o(n,e),r(n,[{key:"shouldComponentUpdate",value:function(){return!this.isReactWEditor}},{key:"render",value:function(){var e=this,t=this.props,r=t.value,n=t.placeholder,i=t.style,o=t.onChange;return a(se,{placeholder:n,value:r,style:i,onBlur:function(){e.isReactWEditor=!1},onFocus:function(){e.isReactWEditor=!0},onChange:function(e){null==o||o(e)}})}}])}(c.Component);function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?er(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rr(e,t,r){return t=i(t),n(e,nr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function nr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nr=function(){return!!e})()}var ir=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=rr(this,e,[].concat(i)),l(r,"state",{list:[]}),r}return o(e,pt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.remote,r=this.optionList();if(r)this.setState({list:r},this.initValue);else if(t&&t.trim().length>0){var n=Ne.request.route+t;this.request(n).then((function(t){e.setState({list:t},e.initValue)}))}}},{key:"initValue",value:function(){var e=this.props,t=e.defaultValue,r=e.multiple;t&&(r?this.setDefaultValue([t]):this.setDefaultValue(t))}},{key:"render",value:function(){var e=this;if(this.display()){this.onComputeValue();var t=this.props,r=t.code,n=t.preview,i=t.multiple,o=t.placeholder,l=t.allowClear,u=void 0===l||l,c=t.readonly,p=t.hidden,f=i?this.plusRules():this.rules(),d=this.collectionList(),h=this.getList(this.state.list,d,(function(t){if(t.length>0){var r=e.getFieldValue();r&&(!i&&!t.some((function(e){return e.key===r}))||i&&!t.some((function(e){return r.includes(e.key)})))&&e.cleanFieldValue()}})),v=this.getItem(),y=v.itemProps,g=v.itemLayouts,b=this.getStyles(),O=b.styles,w=b.itemStyles;return a(m.Item,tr(tr(tr({name:r,label:this.getLabel(),style:w,hidden:p,rules:p?[]:f},y),g),{},{children:n?a(xt,{list:this.state.list,style:O}):a(lr,{list:h,multiple:i,placeholder:o,allowClear:u,readonly:c,style:O})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),or=j.Option,lr=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=rr(this,e,[].concat(i)),l(r,"handleItemValue",(function(e){var t,n;null===(t=(n=r.props).onChange)||void 0===t||t.call(n,e)})),r}return o(e,dt),r(e,[{key:"render",value:function(){var e=this.props,t=e.list,r=e.value,n=e.multiple,i=e.placeholder,o=e.allowClear,l=e.readonly,s=e.style;return a(j,{showSearch:!0,placeholder:i,mode:n?"multiple":void 0,disabled:l,value:r,allowClear:o,style:s,onChange:this.handleItemValue,filterOption:function(e,t){return t.children.toLowerCase().includes(e.toLowerCase())},children:t&&t.map((function(e){var t=e.key,r=e.label;return a(or,{value:t,children:r},t)}))})}}])}();function ar(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ar(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ur(e,t,r){return t=i(t),n(e,cr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cr=function(){return!!e})()}var pr=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=ur(this,e,[].concat(i)),l(r,"state",{list:[]}),r}return o(e,pt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.remote,r=this.optionList();if(r)this.setState({list:r},this.initValue);else if(t&&t.trim().length>0){var n=Ne.request.route+t;this.request(n).then((function(t){e.setState({list:t},e.initValue)}))}}},{key:"render",value:function(){var e=this;if(this.display()){this.onComputeValue();var t=this.plusRules(),r=this.collectionList(),n=this.getList(this.state.list,r,(function(t){if(t.length>0){var r=e.getFieldValue();r&&!t.some((function(e){return r.includes(e.key)}))&&e.cleanFieldValue()}})),i=this.props,o=i.code,l=i.preview,s=i.readonly,u=i.hidden,c=this.getItem(),p=c.itemProps,f=c.itemLayouts,d=this.getStyles(),h=d.styles,v=d.itemStyles;return a(m.Item,sr(sr(sr({name:o,label:this.getLabel(),style:v,hidden:u,rules:u?[]:t},p),f),{},{children:l?a(xt,{list:this.state.list,style:h}):a(fr,{list:n,readonly:s,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),null}}])}(),fr=function(){function e(){return t(this,e),ur(this,e,arguments)}return o(e,dt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.list,n=e.readonly,i=e.style,o=e.onChange;return a(P.Group,{style:i,value:t,onChange:function(e){null==o||o(e)},children:r&&r.map((function(e){var t=e.key,r=e.label;return a(P,{value:t,disabled:n,children:r},t)}))})}}])}();function dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vr(e,t,r){return t=i(t),n(e,yr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function yr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(yr=function(){return!!e})()}var mr=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=vr(this,e,[].concat(i)),l(r,"state",{list:[]}),r}return o(e,pt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.remote,r=this.optionList();if(r)this.setState({list:r},this.initValue);else if(t&&t.trim().length>0){var n=Ne.request.route+t;this.request(n).then((function(t){e.setState({list:t},e.initValue)}))}}},{key:"render",value:function(){var e=this;if(this.display()){this.onComputeValue();var t=this.rules(),r=this.collectionList(),n=this.getList(this.state.list,r,(function(t){if(t.length>0){var r=e.getFieldValue();r&&!t.some((function(e){return r.includes(e.key)}))&&e.cleanFieldValue()}})),i=this.props,o=i.code,l=i.preview,u=i.optionType,c=i.readonly,p=i.hidden,f=this.getItem(),d=f.itemProps,h=f.itemLayouts,v=this.getStyles(),y=v.styles,g=v.itemStyles;return a(m.Item,hr(hr(hr({name:o,label:this.getLabel(),style:g,hidden:p,rules:p?[]:t},d),h),{},{children:l?a(xt,{list:n,style:y}):a(gr,{list:this.state.list,optionType:u,readonly:c,style:y})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),gr=function(){function e(){return t(this,e),vr(this,e,arguments)}return o(e,dt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.list,n=e.optionType,i=e.readonly,o=e.style,l=e.onChange;return a(S.Group,{value:t,optionType:n,style:o,onChange:function(e){null==l||l(e.target.value)},children:r&&r.map((function(e){var t=e.key,r=e.label;return a(S,{value:t,disabled:i,children:r},t)}))})}}])}();function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?br(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wr=function(){return!!e})()}var jr=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,wr()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.props,r=t.code,n=t.preview,i=t.readonly,o=t.hidden,l=this.getItem(),u=l.itemProps,c=l.itemLayouts,p=this.getStyles(),f=p.styles,d=p.itemStyles;return a(m.Item,Or(Or(Or({label:this.getLabel(),name:r,style:d,hidden:o,rules:o?[]:e,valuePropName:"checked"},u),c),{},{children:n?a(kt,{style:f}):a(k,{disabled:i,style:f})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kr(e,t,r){return t=i(t),n(e,Cr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cr=function(){return!!e})()}!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".duration > .ant-form-item {\r\n display: inline-block;\r\n vertical-align: middle;\r\n margin-bottom: 0;\r\n width: 20%;\r\n}\r\n\r\n.duration > .ant-form-item:first-child {\r\n width: 30%;\r\n}\r\n\r\n.duration > span {\r\n padding: 5px; \r\n vertical-align: middle;\r\n}");var xr=function(){function e(){return t(this,e),kr(this,e,arguments)}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue("000:00:00")}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.preview,u=i.format,c=void 0===u?"H小时M分S秒":u,p=i.readonly,f=i.hidden,d=this.getStyles(),h=d.styles,v=d.itemStyles;return a(m.Item,Sr(Sr(Sr({name:o,label:this.getLabel(),style:v,hidden:f,rules:f?[]:e},r),n),{},{children:l?a(Pt,{format:c,style:h}):a(Dr,{format:c,readonly:p,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Dr=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=kr(this,e,[].concat(i)),l(r,"duration",[0,0,0]),l(r,"pattern",["H","M","S"]),l(r,"changeValue",(function(e){return function(t){if("number"==typeof t){var n,i;r.duration[e]=t;var o=r.duration.map((function(e,t){return r.pattern[t].includes("H")?ue("000",e):ue("00",e)}));null===(n=(i=r.props).onChange)||void 0===n||n.call(i,o.join(":"))}}})),r}return o(e,dt),r(e,[{key:"render",value:function(){var e=this,t=this.props,r=t.value,n=t.format,i=t.readonly,o=t.style,l=n.trim().split(/\[.*?\]|[HMS]/);this.pattern=n.trim().split(new RegExp("[".concat(l.join(""),"]"))).filter((function(e){return e})),this.duration=this.pattern.map((function(){return 0})),"string"==typeof r&&(this.duration=r.split(":").map(Number));var s=-1,u=[];return l.forEach((function(t,r){t&&u.push(t),r<=e.pattern.length-1&&u.push(e.pattern[r])})),a("div",{className:"duration",children:u.map((function(t,r){return t.includes("H")?(s++,a(m.Item,{children:a(w,{style:Sr({width:"100%"},o),min:0,max:999,precision:0,value:e.duration[s],formatter:function(e){return e<100?e<10?"00"+e:"0"+e:e.toString()},onChange:e.changeValue(s),controls:!1,disabled:!!/\[|\]/.test(t)||i})},r)):t.includes("M")||t.includes("S")?(s++,a(m.Item,{children:a(w,{style:Sr({width:"100%"},o),min:0,max:59,precision:0,value:e.duration[s],formatter:function(e){return e<10?"0"+e:e.toString()},onChange:e.changeValue(s),controls:!1,disabled:!!/\[|\]/.test(t)||i})},r)):a("span",{children:t},r)}))})}}])}();function Lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vr(e,t,r){return t=i(t),n(e,Rr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Rr=function(){return!!e})()}ce.extend(pe),ce.extend(fe);var Er=function(){function e(){return t(this,e),Vr(this,e,arguments)}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.type,u=void 0===l?"date":l,c=i.format,p=void 0===c?"YYYY-MM-DD":c,f=i.showTime,d=void 0!==f&&f,h=i.preview,v=i.placeholder,y=i.allowClear,g=void 0===y||y,b=i.readonly,O=i.hidden,w=this.getStyles(),j=w.styles,P=w.itemStyles;return a(m.Item,Ir(Ir(Ir({name:o,label:this.getLabel(),style:P,hidden:O,rules:O?[]:e},r),n),{},{children:h?a(bt,{style:j}):a(Br,{type:u,format:p,showTime:d,placeholder:v,allowClear:g,readonly:b,style:j})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Br=function(){function e(){return t(this,e),Vr(this,e,arguments)}return o(e,dt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.type,n=e.format,i=e.showTime,o=e.placeholder,l=e.allowClear,s=e.readonly,u=e.style,c=e.onChange;return a(C,{value:t?ce(t,n):void 0,picker:r,format:n,showTime:i?{format:"HH:mm"}:void 0,placeholder:o,allowClear:l,disabled:s,style:u,onChange:function(e){null==c||c(null==e?void 0:e.format(n))}})}}])}();function Tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Nr(e,t,r){return t=i(t),n(e,Ar()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Ar(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ar=function(){return!!e})()}ce.extend(de);var Mr=function(){function e(){return t(this,e),Nr(this,e,arguments)}return o(e,rt),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.format,u=void 0===l?"HH:mm:ss":l,c=i.preview,p=i.placeholder,f=i.allowClear,d=void 0===f||f,h=i.readonly,v=i.hidden,y=this.getStyles(),g=y.styles,b=y.itemStyles;return a(m.Item,Fr(Fr(Fr({name:o,label:this.getLabel(),style:b,hidden:v,rules:v?[]:e},r),n),{},{children:c?a(bt,{style:g}):a(Ur,{format:u,placeholder:p,allowClear:d,readonly:h,style:g})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Ur=function(){function e(){return t(this,e),Nr(this,e,arguments)}return o(e,dt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.format,n=e.placeholder,i=e.allowClear,o=e.readonly,l=e.style,s=e.onChange;return a(x,{value:t?ce(t,r):void 0,format:r,placeholder:n,allowClear:i,disabled:o,style:l,onChange:function(e){null==s||s(null==e?void 0:e.format(r))}})}}])}();function qr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _r(e,t,r){return t=i(t),n(e,Wr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wr=function(){return!!e})()}var Hr=function(e){return Array.isArray(e)?e:e&&e.list},Gr=function(){function e(){return t(this,e),_r(this,e,arguments)}return o(e,pt),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,i=t.maxCount,o=t.fileType,l=t.fileTypeMessage,u=t.fileSize,c=t.readonly,p=t.hidden,f=this.getItem(),d=f.itemProps,h=f.itemLayouts,v=this.getStyles(),y=v.styles,g=v.itemStyles;return a(m.Item,zr(zr(zr({name:r,label:this.getLabel(),style:g,hidden:p,rules:p?[]:e,valuePropName:"list",getValueFromEvent:Hr},d),h),{},{children:a($r,{maxCount:i,fileType:o,fileTypeMessage:l,fileSize:u,readonly:c,preview:n,style:y})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),$r=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=_r(this,e,[].concat(i)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){var t=r.props,n=t.fileSize,i=t.fileType,o=t.fileTypeMessage,l=null==i?void 0:i.replace(/\ +/g,"").split(","),a=null==l?void 0:l.map((function(e){return e.startsWith(".")?Ne.mimeType[e]:e}));if(!(a&&a.length>0))return R.error("文件类型不匹配!"),D.LIST_IGNORE;if(!a.includes(e.type))return R.error(o),D.LIST_IGNORE;if(n&&we.parse(n)<e.size)return R.error("上传的文件大小,不能超过 ".concat(n,"!")),D.LIST_IGNORE;return!0})),l(r,"onStart",(function(){clearInterval(r.timer),r.setState({modal:{open:!0,progress:0}}),r.uploading=!0})),l(r,"onProgress",(function(e){if(r.uploading){clearInterval(r.timer);var t=Math.round(e.percent/2);if(r.setState({modal:{open:!0,progress:t}}),50===t){var n=t;r.timer=setInterval((function(){r.uploading?r.setState({modal:{open:!0,progress:++n}}):(clearInterval(r.timer),r.setState({modal:{open:!1,progress:0}})),99===n&&clearInterval(r.timer)}),1e3)}}})),l(r,"onSuccess",(function(e,t){clearInterval(r.timer);var n=e.data,i=n.id,o=n.url;t.status="done",t.response=e,t.id=i,t.url=o;var l=[].concat(he(r.state.fileList),[t]);r.setState({fileList:l,modal:{open:!0,progress:100}},(function(){r.onChange(l),setTimeout((function(){r.setState({modal:{open:!1,progress:0}})}),500)})),r.uploading=!1})),l(r,"onError",(function(e,t,n){var i;clearInterval(r.timer);var o=[].concat(he(r.state.fileList),[n]);n.status="error",n.response=null!==(i=null==t?void 0:t.message)&&void 0!==i?i:"上传失败",r.setState({fileList:o,modal:{open:!1,progress:100}},(function(){r.onChange(o)})),r.uploading=!1})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ne.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&Qe(r)({ids:t}).then((function(t){var r=t.data.map((function(e){return zr(zr({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,i=n.preview,o=n.maxCount,l=n.readonly,c=n.style,p=o?Number(o):0;if(i)return a(Lt,{fileList:t});var f={onStart:this.onStart,onSuccess:this.onSuccess,onProgress:this.onProgress,onError:this.onError};return u(s,{children:[a(D,zr(zr({action:Ne.request.prefix+Ne.file.uploadUrl,fileList:t,maxCount:p,disabled:l,beforeUpload:this.onBeforeUpload,onRemove:this.onRemove},f),{},{children:a(L,{disabled:l||p<=t.length,icon:a(ve,{}),style:c,children:"上传"})})),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}();function Yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jr(e,t,r){return t=i(t),n(e,Qr()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Qr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qr=function(){return!!e})()}var Xr=function(e){return Array.isArray(e)?e:e&&e.list},Zr=["image/jpeg","image/png"],en=function(){function e(){return t(this,e),Jr(this,e,arguments)}return o(e,pt),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,i=t.maxCount,o=t.fileSize,l=t.fileWidth,u=void 0===l?"100":l,c=t.fileHeight,p=void 0===c?"100":c,f=t.readonly,d=t.hidden,h=this.getItem(),v=h.itemProps,y=h.itemLayouts,g=this.getStyles(),b=g.styles,O=g.itemStyles;return a(m.Item,Kr(Kr(Kr({name:r,label:this.getLabel(),style:O,hidden:d,rules:d?[]:e,valuePropName:"list",getValueFromEvent:Xr},v),y),{},{children:a(tn,{maxCount:i,fileSize:o,fileWidth:Number(u),fileHeight:Number(p),readonly:f,preview:n,style:b})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),tn=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=Jr(this,e,[].concat(i)),l(r,"uploading",!1),l(r,"state",{fileList:[],fileView:void 0}),l(r,"onChangeValue",(function(e){var t=e.fileList.map((function(e){var t,r;if(200===(null===(t=e.response)||void 0===t?void 0:t.status)){var n=e.response.data,i=n.id;n.name;var o=n.url;e.id=i,e.url=o,e.status="done"}else 500===(null===(r=e.response)||void 0===r?void 0:r.status)&&(e.status="error",e.response=e.response.message);return e}));r.setState({fileList:t},(function(){r.onChange(t)}))})),l(r,"onBeforeUpload",(function(e){if(!Zr.includes(e.type))return R.error("上传文件类型,仅支持图片类型!"),D.LIST_IGNORE;var t=r.props.fileSize;if(t&&we.parse(t)<e.size)return R.error("上传的文件大小,不能超过 ".concat(t,"!")),D.LIST_IGNORE;return!0})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ne.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&Qe(r)({ids:t}).then((function(t){var r=t.data.map((function(e){return Kr(Kr({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this,t=this.state,r=t.fileList,n=t.fileView,i=this.props,o=i.preview,l=i.maxCount,c=i.readonly,p=i.fileWidth,f=void 0===p?100:p,d=i.fileHeight,h=void 0===d?100:d,v=i.style,y=l?Number(l):0;return o?a(Tt,{fileList:r,width:f,height:h,style:v}):u(s,{children:[a(je,{rotationSlider:!0,modalTitle:"图片编辑",modalOk:"确认",modalCancel:"取消",aspect:f/h,children:a(D,{listType:"picture-card",accept:Zr.join(","),action:Ne.request.prefix+Ne.file.uploadUrl,fileList:r,maxCount:y,disabled:c,beforeUpload:this.onBeforeUpload,onChange:this.onChangeValue,onRemove:this.onRemove,onPreview:function(t){return e.setState({fileView:t})},children:!c&&Number(y)>r.length&&a(L,{type:"link",icon:a(ye,{}),style:v})})}),(null==n?void 0:n.id)&&a(I,{title:n.name,open:!0,footer:null,onCancel:function(){return e.setState({fileView:void 0})},children:a("img",{alt:n.name,style:{width:"100%"},src:n.url})})]})}}])}();function rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(on=function(){return!!e})()}var ln=function(){function e(){return t(this,e),r=this,l=arguments,o=i(o=e),n(r,on()?Reflect.construct(o,l||[],i(r).constructor):o.apply(r,l));var r,o,l}return o(e,pt),r(e,[{key:"plusRules",value:function(){var e=this.rules();return null==e?void 0:e.map((function(e){if(e.required){return nn(nn({},e),{},{validator:function(e,t){return 0===t?Promise.reject():Promise.resolve()}})}return nn({},e)}))}},{key:"render",value:function(){if(this.display()){var e;this.onComputeValue();var t=this.plusRules(),r=this.props,n=r.code,i=r.preview,o=r.allowHalf,l=void 0!==o&&o,u=r.count,c=void 0===u?5:u,p=r.items,f=r.readonly,d=r.hidden,h=this.getItem(),v=h.itemProps,y=h.itemLayouts,g=this.getStyles(),b=g.styles,O=g.itemStyles,w=null!==(e=null==p?void 0:p.split(","))&&void 0!==e?e:[];return a(m.Item,nn(nn(nn({name:n,label:this.getLabel(),style:O,hidden:d,rules:d?[]:t},v),y),{},{children:a(E,{allowHalf:l,count:c,character:function(e){var t=e.index,r=void 0===t?0:t;return w.length>0?w[r]:a(me,{})},disabled:i||f,style:b})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function an(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?an(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function un(e,t,r){return t=i(t),n(e,cn()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function cn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cn=function(){return!!e})()}var pn=function(e){return Array.isArray(e)?e:e&&e.list},fn=["audio/mpeg","audio/wav"],dn=function(){function e(){return t(this,e),un(this,e,arguments)}return o(e,pt),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,i=t.maxCount,o=t.fileSize,l=t.readonly,u=t.hidden,c=this.props,p=c.autoplay,f=void 0!==p&&p,d=c.muted,h=void 0!==d&&d,v=c.loop,y=void 0!==v&&v,g=c.preload,b=void 0===g?"auto":g,O=this.getItem(),w=O.itemProps,j=O.itemLayouts,P=this.getStyles(),S=P.styles,k=P.itemStyles;return a(m.Item,sn(sn(sn({name:r,label:this.getLabel(),style:k,hidden:u,rules:u?[]:e,valuePropName:"list",getValueFromEvent:pn},w),j),{},{children:a(hn,{code:r,maxCount:i,fileSize:o,readonly:l,preview:n,autoplay:f,muted:h,loop:y,preload:b,style:S})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),hn=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=un(this,e,[].concat(i)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){if(!fn.includes(e.type))return R.error("上传文件类型,仅支持音频类型!"),D.LIST_IGNORE;var t=r.props.fileSize;if(t&&we.parse(t)<e.size)return R.error("上传的文件大小,不能超过 ".concat(t,"!")),D.LIST_IGNORE;return!0})),l(r,"onStart",(function(){clearInterval(r.timer),r.setState({modal:{open:!0,progress:0}}),r.uploading=!0})),l(r,"onProgress",(function(e){if(r.uploading){clearInterval(r.timer);var t=Math.round(e.percent/2);if(r.setState({modal:{open:!0,progress:t}}),50===t){var n=t;r.timer=setInterval((function(){r.uploading?r.setState({modal:{open:!0,progress:++n}}):(clearInterval(r.timer),r.setState({modal:{open:!1,progress:0}})),99===n&&clearInterval(r.timer)}),1e3)}}})),l(r,"onSuccess",(function(e,t){clearInterval(r.timer);var n=e.data,i=n.id,o=n.url;t.status="done",t.response=e,t.id=i,t.url=o;var l=[].concat(he(r.state.fileList),[t]);r.setState({fileList:l,modal:{open:!0,progress:100}},(function(){r.onChange(l),setTimeout((function(){r.setState({modal:{open:!1,progress:0}})}),500)})),r.uploading=!1})),l(r,"onError",(function(e,t,n){var i;clearInterval(r.timer);var o=[].concat(he(r.state.fileList),[n]);n.status="error",n.response=null!==(i=null==t?void 0:t.message)&&void 0!==i?i:"上传失败",r.setState({fileList:o,modal:{open:!1,progress:100}},(function(){r.onChange(o)})),r.uploading=!1})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ne.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&Qe(r)({ids:t}).then((function(t){var r=t.data.map((function(e){return sn(sn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,i=n.code,o=n.preview,l=n.maxCount,c=n.readonly,p=n.style,f=n.autoplay,d=n.muted,h=n.loop,v=n.preload,y=l?Number(l):0;if(o)return a(Vt,{code:i,fileList:t,autoplay:f,muted:d,loop:h,preload:v});var m={onStart:this.onStart,onSuccess:this.onSuccess,onProgress:this.onProgress,onError:this.onError};return u(s,{children:[a(D,sn(sn({listType:"picture-card",accept:fn.join(","),action:Ne.request.prefix+Ne.file.uploadUrl,fileList:t,maxCount:y,disabled:c,beforeUpload:this.onBeforeUpload,onRemove:this.onRemove},m),{},{children:!c&&Number(y)>t.length&&a(L,{type:"link",icon:a(ye,{}),style:p})})),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}();function vn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mn(e,t,r){return t=i(t),n(e,gn()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(gn=function(){return!!e})()}var bn=function(e){return Array.isArray(e)?e:e&&e.list},On=["video/mp4"],wn=function(){function e(){return t(this,e),mn(this,e,arguments)}return o(e,pt),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,i=t.maxCount,o=t.fileSize,l=t.readonly,u=t.hidden,c=this.props,p=c.controls,f=void 0===p||p,d=c.autoplay,h=void 0!==d&&d,v=c.muted,y=void 0!==v&&v,g=c.pip,b=void 0!==g&&g,O=c.loop,w=void 0!==O&&O,j=c.preload,P=void 0===j?"auto":j,S=this.getItem(),k=S.itemProps,C=S.itemLayouts,x=this.getStyles(),D=x.styles,L=x.itemStyles;return a(m.Item,yn(yn(yn({name:r,label:this.getLabel(),style:L,hidden:u,rules:u?[]:e,valuePropName:"list",getValueFromEvent:bn},k),C),{},{children:a(jn,{code:r,maxCount:i,fileSize:o,readonly:l,preview:n,controls:f,autoplay:h,muted:y,pip:b,loop:w,preload:P,style:D})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),jn=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=mn(this,e,[].concat(i)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){if(!On.includes(e.type))return R.error("上传文件类型,仅支持视频类型!"),D.LIST_IGNORE;var t=r.props.fileSize;if(t&&we.parse(t)<e.size)return R.error("上传的文件大小,不能超过 ".concat(t,"!")),D.LIST_IGNORE;return!0})),l(r,"onStart",(function(){clearInterval(r.timer),r.setState({modal:{open:!0,progress:0}}),r.uploading=!0})),l(r,"onProgress",(function(e){if(r.uploading){clearInterval(r.timer);var t=Math.round(e.percent/2);if(r.setState({modal:{open:!0,progress:t}}),50===t){var n=t;r.timer=setInterval((function(){r.uploading?r.setState({modal:{open:!0,progress:++n}}):(clearInterval(r.timer),r.setState({modal:{open:!1,progress:0}})),99===n&&clearInterval(r.timer)}),1e3)}}})),l(r,"onSuccess",(function(e,t){clearInterval(r.timer);var n=e.data,i=n.id,o=n.url;t.status="done",t.response=e,t.id=i,t.url=o;var l=[].concat(he(r.state.fileList),[t]);r.setState({fileList:l,modal:{open:!0,progress:100}},(function(){r.onChange(l),setTimeout((function(){r.setState({modal:{open:!1,progress:0}})}),500)})),r.uploading=!1})),l(r,"onError",(function(e,t,n){var i;clearInterval(r.timer);var o=[].concat(he(r.state.fileList),[n]);n.status="error",n.response=null!==(i=null==t?void 0:t.message)&&void 0!==i?i:"上传失败",r.setState({fileList:o,modal:{open:!1,progress:100}},(function(){r.onChange(o)})),r.uploading=!1})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ne.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&Qe(r)({ids:t}).then((function(t){var r=t.data.map((function(e){return yn(yn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,i=n.code,o=n.preview,l=n.maxCount,c=n.readonly,p=n.style,f=n.controls,d=n.autoplay,h=n.muted,v=n.pip,y=n.loop,m=n.preload,g=l?Number(l):0;if(o)return a(Et,{code:i,fileList:t,controls:f,autoplay:d,muted:h,pip:v,loop:y,preload:m});var b={onStart:this.onStart,onSuccess:this.onSuccess,onProgress:this.onProgress,onError:this.onError};return u(s,{children:[a(D,yn(yn({listType:"picture-card",accept:On.join(","),action:Ne.request.prefix+Ne.file.uploadUrl,fileList:t,maxCount:g,disabled:c,beforeUpload:this.onBeforeUpload,onRemove:this.onRemove},b),{},{children:!c&&Number(g)>t.length&&a(L,{type:"link",icon:a(ye,{}),style:p})})),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}();function Pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kn(e,t,r){return t=i(t),n(e,Cn()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Cn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cn=function(){return!!e})()}var xn=function(e){return Array.isArray(e)?e:e&&e.list},Dn=function(){function e(){return t(this,e),kn(this,e,arguments)}return o(e,pt),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,i=t.maxCount,o=t.fileType,l=t.fileTypeMessage,u=t.fileSize,c=t.readonly,p=t.hidden,f=this.getItem(),d=f.itemProps,h=f.itemLayouts,v=this.getStyles(),y=v.styles,g=v.itemStyles;return a(m.Item,Sn(Sn(Sn({name:r,label:this.getLabel(),style:g,hidden:p,rules:p?[]:e,valuePropName:"list",getValueFromEvent:xn},d),h),{},{children:a(Ln,{maxCount:i,fileType:o,fileTypeMessage:l,fileSize:u,readonly:c,preview:n,style:y})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Ln=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=kn(this,e,[].concat(i)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){var t=r.props,n=t.fileSize,i=t.fileType,o=t.fileTypeMessage,l=null==i?void 0:i.replace(/\ +/g,"").split(",");if(!(l&&l.length>0))return R.error("文件类型不匹配!"),D.LIST_IGNORE;if(!l.includes(e.type))return R.error(o),D.LIST_IGNORE;if(n&&we.parse(n)<e.size)return R.error("上传的文件大小,不能超过 ".concat(n,"!")),D.LIST_IGNORE;return!0})),l(r,"customRequest",(function(e){var t,n,i,o,l,a,s,u={blockSize:Ne.chunk.chunkSize,checkFile:(s=re(ne.mark((function e(t){var r,n,i;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.fileName,n=t.fileMd5,i=t.fileSize,e.next=3,Qe("post form "+Ne.chunk.checkFile)({fileName:r,fileMd5:n,fileSize:i});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)}),checkBlock:(a=re(ne.mark((function e(t){var r,n,i,o;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.fileName,n=t.fileMd5,i=t.blockMd5,o=t.blockIndex,e.next=3,Qe("post form "+Ne.chunk.checkChunk)({fileName:r,fileMd5:n,blockMd5:i,blockIndex:o});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)}),uploadBlock:(l=re(ne.mark((function e(t){var r,n,i,o,l,a;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.fileName,n=t.fileMd5,i=t.blockMd5,o=t.blockIndex,l=t.file,(a=new FormData).append("blockIndex",String(o)),a.append("blockMd5",i),a.append("fileName",r),a.append("fileMd5",n),a.append("file",l),e.next=9,Qe("post form "+Ne.chunk.chunkUpload)(a);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)}),mergeBlock:(o=re(ne.mark((function e(t){var r,n,i;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.fileName,n=t.fileMd5,i=t.fileSize,e.next=3,Qe("post form "+Ne.chunk.doMerge)({fileName:r,fileMd5:n,fileSize:i});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)}),mergeProgress:(i=re(ne.mark((function e(){var t;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe(Ne.chunk.mergeProgress)();case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)}),verifyFile:(n=re(ne.mark((function e(t){var r,n,i;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.fileName,n=t.fileMd5,i=t.fileSize,e.next=3,Qe("post form "+Ne.chunk.onComplete)({fileName:r,fileMd5:n,fileSize:i});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)}),verifyProgress:(t=re(ne.mark((function e(){var t;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe(Ne.chunk.completeProgress)();case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},c=Pe.create(u);c.progress((function(e,t){e.status="uploading",r.setState({modal:{open:!0,progress:t}})})),c.complete((function(e){var t=e.response,n=t.id,i=t.url;e.id=n,e.url=i,e.status="done";var o=[].concat(he(r.state.fileList),[e]);r.setState({fileList:o,modal:{open:!1,progress:0}},(function(){r.onChange(o)}))})),c.error((function(e,t){e.status="error",e.response=t;var n=r.state.fileList,i=n.findIndex((function(t){return t.uid===e.uid}));-1===i?n.push(e):n[i]=e,r.setState({fileList:n,modal:{open:!1,progress:0}})})),c.start(e.file)})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ne.file.listUrl;t&&t.length>0&&Qe(r)({ids:t}).then((function(t){var r=t.data.map((function(e){return Sn(Sn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){return"done"===e.status})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,i=n.preview,o=n.maxCount,l=n.readonly,c=n.style,p=o?Number(o):0;return i?a(Lt,{fileList:t}):u(s,{children:[a(D,{action:Ne.request.prefix+Ne.file.uploadUrl,fileList:t,maxCount:p,disabled:l,beforeUpload:this.onBeforeUpload,customRequest:this.customRequest,onRemove:this.onRemove,children:a(L,{disabled:l||p<=t.length,icon:a(ve,{}),style:c,children:"上传"})}),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}(),In=["worksId","worksExtraId"];function Vn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Rn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function En(e,t,r){return t=i(t),n(e,Bn()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Bn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bn=function(){return!!e})()}var Tn=function(){function e(){return t(this,e),En(this,e,arguments)}return o(e,pt),r(e,[{key:"getColumns",value:function(){var e,t=G(this.props.children,{tag:"Columns"});return t?null===(e=t.children)||void 0===e?void 0:e.map((function(e){var t;return Rn(Rn({},e),{},{rules:null===(t=e.rules)||void 0===t?void 0:t.map(Re)})})):[]}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.plusRules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.title,u=i.preview,c=i.readonly,p=i.hidden,f=this.getStyles(),d=f.styles,h=f.itemStyles;return a(m.Item,Rn(Rn(Rn({name:o,style:h,hidden:p,rules:p?[]:e,valuePropName:"list"},r),n),{},{children:a(Fn,{preview:u||c,title:l,columns:this.getColumns(),style:d})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Fn=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=En(this,e,[].concat(i)),l(r,"state",{dataSource:[],modal:{title:"",entity:void 0,show:!1}}),l(r,"onFinish",(function(e){var t=r.state.dataSource,n=[];e.id||e.uid?n=t.map((function(t){return e.id&&t.id===e.id||e.uid&&t.uid===e.uid?Rn(Rn({},t),e):t})):(e.index=t.length+1,e.uid=_(),n=[].concat(he(t),[e])),r.setState({dataSource:n,modal:{title:"",entity:void 0,show:!1}},(function(){var e,t;null===(e=(t=r.props).onChange)||void 0===e||e.call(t,n)}))})),l(r,"onCancel",(function(){r.setState({modal:{title:"",entity:void 0,show:!1}})})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this.props,t=e.list,r=e.onChange;if(Array.isArray(t)){var n=t.map((function(e,t){return e.worksId,Rn({id:e.worksExtraId,index:t+1},te(e,In))}));this.setState({dataSource:n},(function(){null==r||r(n)}))}}},{key:"getColumns",value:function(){var e=this,t=this.props,r=t.title,n=t.preview,i=t.columns,o=t.onChange,l=this.state.dataSource;return n?i:K(i,{title:"操作",dataIndex:"option",valueType:"option",render:function(t,n){return[u(g,{children:[a("a",{onClick:function(){e.setState({modal:{title:"修改".concat(r),entity:n,show:!0}})},children:"修改"},"modifly"),a("a",{onClick:function(){I.confirm({title:"警告",icon:a(ge,{}),content:"请确认是否删除该项数据?",okText:"确认",cancelText:"取消",onOk:function(){var t=l.filter((function(e){var t=e.id,r=e.uid;return!(t&&n.id===t||r&&n.uid===r)}));e.setState({dataSource:t},(function(){null==o||o(t)}))}})},children:"删除"},"delete")]},"option")]}})}},{key:"render",value:function(){var e=this,t=this.props,r=t.title,n=t.preview,i=t.style,o=this.state,l=o.dataSource,s=o.modal,c=this.getColumns();return u(B,{title:r,bodyStyle:{padding:"0px 12px"},extra:n?null:a("a",{onClick:function(){e.setState({modal:{title:"新建".concat(r),entity:void 0,show:!0}})},children:"添加"},"new"),children:[a(T,{rowKey:"index",size:"small",style:i,columns:c,dataSource:l}),s.show&&a(Nn,{title:s.title,entity:s.entity,columns:c,onFinish:this.onFinish,onCancel:this.onCancel})]})}}])}(),Nn=function(t){var r,n=t.title,i=t.entity,o=t.columns,l=t.onFinish,s=t.onCancel,u=m.useForm(),c=e(u,1)[0];return a(I,{title:n,width:740,open:!0,destroyOnClose:!0,onCancel:s,onOk:(r=re(ne.mark((function e(){return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.validateFields().then((function(e){l(Rn(Rn({},i),e))})).catch((function(e){console.warn(e)}));case 2:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),children:a(m,{form:c,name:"modalTable",initialValues:i,wrapperCol:{span:22},autoComplete:"off",layout:"vertical",children:a(F,{children:o.length>0&&o.map((function(e){var t=e.title,r=e.dataIndex,n=e.placeholder,i=e.rules;if("index"!==r&&"option"!==r)return a(N,{span:12,children:a(m.Item,{label:t,name:r,rules:i,children:a(O,{placeholder:n})})},r)}))})})})},An=["id","index"];function Mn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Un(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zn(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zn(e,t):void 0}}(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==r.return||r.return()}finally{if(a)throw o}}}}function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _n(e,t,r){return t=i(t),n(e,Wn()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function Wn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wn=function(){return!!e})()}var Hn=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=_n(this,e,[].concat(i)),l(r,"itemList",[]),l(r,"columnList",[]),l(r,"state",{doc:void 0,loading:!0}),l(r,"initItems",function(){var e=re(ne.mark((function e(t){var n,i,o,l,a,s,u,c,p,f,d,h,v,y,m,g,b,O,w,j;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.columnList=G(r.props.children,{tag:"Columns"}).children,n=r.columnList.map((function(e){return e.dataIndex})),i=Le.selectors(t,"[code]"),o=qn(i),e.prev=4,o.s();case 6:if((l=o.n()).done){e.next=29;break}if(a=l.value,s=a.getAttribute("code"),u=a.getAttribute("title"),c=a.tagName.toLowerCase(),!s||!n.includes(s)){e.next=27;break}if(p={},f=a.getAttribute("remote"),!((d=Le.selectors(a,"Option")).length>0)){e.next=20;break}h=qn(d);try{for(h.s();!(v=h.n()).done;)y=v.value,m=y.getAttribute("value"),g=y.textContent,m&&g&&(p[m]=g)}catch(e){h.e(e)}finally{h.f()}e.next=26;break;case 20:if(!f){e.next=26;break}return e.next=23,r.request(Ne.request.route+f);case 23:b=e.sent,O=qn(b);try{for(O.s();!(w=O.n()).done;)j=w.value,p[j.key]=j.label}catch(e){O.e(e)}finally{O.f()}case 26:r.itemList.push({code:s,title:u,type:c,data:p});case 27:e.next=6;break;case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(4),o.e(e.t0);case 34:return e.prev=34,o.f(),e.finish(34);case 37:r.setState({loading:!1});case 38:case"end":return e.stop()}}),e,null,[[4,31,34,37]])})));return function(t){return e.apply(this,arguments)}}()),r}return o(e,pt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.formId;this.setState({loading:!0}),this.request(Ne.form.documentUrl,{formId:t}).then((function(t){var r=Le.toDocument(t);e.setState({doc:r}),e.initItems(r)}))}},{key:"render",value:function(){if(this.display()&&!this.state.loading){this.onComputeValue();var e=this.plusRules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,i=this.props,o=i.code,l=i.title,u=i.witdh,c=i.preview,p=i.readonly,f=i.hidden,d=this.getStyles(),h=d.styles,v=d.itemStyles,y=this.state.doc;return a(m.Item,Un(Un(Un({name:o,style:v,hidden:f,rules:f?[]:e,valuePropName:"list"},r),n),{},{children:a(Gn,{preview:c||p,title:l,witdh:u,columns:this.columnList,items:this.itemList,document:y,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Gn=function(){function e(){var r;t(this,e);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=_n(this,e,[].concat(i)),l(r,"state",{dataSource:[],modal:{title:"",entity:void 0,show:!1}}),l(r,"onFinish",(function(e){var t=r.state.dataSource,n=[];e.id?n=t.map((function(t){return t.id===e.id?Un(Un({},t),e):t})):(e.id=_(),e.index=t.length+1,n=[].concat(he(t),[e])),r.onChange(n)})),l(r,"onCancel",(function(){r.setState({modal:{title:"",entity:void 0,show:!1}})})),r}return o(e,dt),r(e,[{key:"componentDidMount",value:function(){var e=this.props.list;if(Array.isArray(e)){var t=e.map((function(e,t){var r=ke({},(Se(e),e));return Un({id:_(),index:t+1},r)}));this.onChange(t)}}},{key:"onChange",value:function(e){var t=this;this.setState({dataSource:e,modal:{title:"",entity:void 0,show:!1}},(function(){var r,n;null===(r=(n=t.props).onChange)||void 0===r||r.call(n,e.map((function(e){return e.id,e.index,te(e,An)})))}))}},{key:"getColumns",value:function(){var e=this,t=this.props,r=t.preview,n=t.title,i=t.columns,o=t.items,l=this.state.dataSource,s=i.map((function(e){var t=e.dataIndex,r=o.find((function(e){return e.code===t}));return r&&(e.title||(e.title=r.title),e.render=function(t){var n=t;return e.text?n=e.text:0!==Object.keys(r.data).length&&(n=r.data[t]),"url"===e.type?a("a",{href:t,target:"_blank",rel:"noreferrer",children:n}):n}),e}));return r?s:K(s,{title:"操作",dataIndex:"option",valueType:"option",render:function(t,r){return[u(g,{children:[a("a",{onClick:function(){e.setState({modal:{title:"修改".concat(n),entity:r,show:!0}})},children:"修改"},"modifly"),a("a",{onClick:function(){I.confirm({title:"警告",icon:a(ge,{}),content:"请确认是否删除该项数据?",okText:"确认",cancelText:"取消",onOk:function(){var t=l.filter((function(e){var t=e.id;return!(t&&r.id===t)}));e.onChange(t)}})},children:"删除"},"delete")]},"option")]}})}},{key:"render",value:function(){var e=this,t=this.props,r=t.preview,n=t.title,i=t.witdh,o=t.document,l=t.style,s=this.state,c=s.dataSource,p=s.modal,f=this.getColumns();return u(B,{title:n,style:{padding:"0px 12px"},extra:r?null:a("a",{onClick:function(){e.setState({modal:{title:"新建".concat(n),entity:void 0,show:!0}})},children:"添加"},"new"),children:[a(T,{rowKey:"id",size:"small",style:l,columns:f,dataSource:c}),p.show&&a($n,{title:p.title,witdh:i,entity:p.entity,document:o,onFinish:this.onFinish,onCancel:this.onCancel})]})}}])}(),$n=function(e){var t,r=e.title,n=e.witdh,i=void 0===n?"740":n,o=e.entity,l=e.document,s=e.onFinish,u=e.onCancel,c=d();return a(I,{title:r,width:Number(i),open:!0,destroyOnClose:!0,onCancel:u,onOk:(t=re(ne.mark((function e(){var t,r,n;return ne.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,null===(t=c.current)||void 0===t?void 0:t.validateFields();case 3:n=null===(r=c.current)||void 0===r?void 0:r.getFieldsValue(),s(Un(Un({},o),n)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),function(){return t.apply(this,arguments)}),children:l&&a(ci,{form:c,document:l,initialValues:o})})},Yn=Object.freeze({__proto__:null,Audio:dn,Checkbox:pr,DatePicker:Er,Duration:xr,Editor:Xt,FormList:Hn,Label:vt,Number:$t,Photo:en,Radio:mr,Rate:ln,Select:ir,SuperUpload:Dn,Switch:jr,Table:Tn,Text:Mt,TextArea:_t,TimePicker:Mr,Tooltip:mt,Upload:Gr,Video:wn}),Kn=function(e){var t=e.children,r=e.gutter;return a(F,{gutter:Number(r),style:{margin:0},children:t})},Jn=function(e){var t=e.span,r=e.children;return a(N,{span:t,children:r})},Qn=function(e){var t=e.direction,r=e.stepIndex,n=e.onChangeSetp,i=e.children,o=h((function(){return null==i?void 0:i.map((function(e){var t=e.id,r=e.attributes;return{key:t,title:r.title,description:r.description}}))}),[i]);return a(A,{current:r,direction:t,onChange:n,items:o,style:{padding:16,backgroundColor:"white"}})},Xn=M.Content,Zn=v((function(e){var t=e.currentStepIndex,r=e.stepIndex,n=e.style,i=e.children,o=h((function(){var e=n?Xe(n):{padding:16,backgroundColor:"white"};return t!==Number(r)&&Object.assign(e,{display:"none"}),e}),[t]);return a(Xn,{style:o,children:i})})),ei=function(e){var t=e.dashed,r=void 0!==t&&t,n=e.orientation,i=void 0===n?"center":n,o=e.children;return a(U,{dashed:r,orientation:i,style:{color:"#055ab5",fontWeight:"bold"},children:o})},ti={display:"none"},ri={display:"block"},ni=v((function(t){var r=t.defaultExpanded,n=void 0===r||r,i=t.on,o=t.off,l=t.style,c=t.collapse,p=t.children,f=y(n),d=e(f,2),h=d[0],v=d[1],m=Xe(l);return c?u(s,{children:[a("div",{style:m,children:u(L,{type:"link",onClick:function(){v(!h)},children:[h?o:i,a(h?be:Oe,{})," "]})}),a("div",{style:h?ri:ti,children:p})]}):a(s,{children:p})}));function ii(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ii(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ii(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function li(e,t,r){return t=i(t),n(e,ai()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ai=function(){return!!e})()}var si=Yn,ui={Row:Kn,Col:Jn,Collapse:ni,Content:Zn,Divider:ei,Steps:Qn},ci=function(){function n(e){var r,i,o;return t(this,n),o=li(this,n,[e]),l(o,"state",{stepIndex:0,root:void 0,loading:!0}),l(o,"hideClear",!1),l(o,"onValuesChange",(function(e){o.setState({values:e})})),l(o,"onStepIndex",(function(e){o.setState({stepIndex:e})})),l(o,"children",(function(e){var t,r,n=null!==(t=null===(r=o.customComponents)||void 0===r?void 0:r[e.tag])&&void 0!==t?t:si[e.tag];return n?o.component(e,n):ui[e.tag]?o.container(e):o.applet(e)})),o.styles=null!==(r=e.style)&&void 0!==r?r:{},o.form=null!==(i=e.form)&&void 0!==i?i:c.createRef(),o}return o(n,p),r(n,[{key:"componentDidMount",value:function(){var t,r,n=this,i=this.props.document,o=(t="string"==typeof i?Le.getRoot(i):Le.parser(i)).attributes,s=o.style,u=o.labelCol,c=o.wrapperCol,p=o.showTitle,f=o.hideClear;if(this.showTitle=!!p,this.hideClear=!!f,"string"==typeof s){var d=null==s?void 0:s.replace(/\ +/g,"").split(";");null==d||d.forEach((function(t){if(t){var r=t.split(":"),i=e(r,2),o=i[0],a=i[1];Object.assign(n.styles,l({},H(o),a))}}))}u&&c&&(this.layouts={labelCol:{span:u},wrapperCol:{span:c}}),Ne.components&&(this.customComponents=J(Ne.components,(function(e){return function(t){return a(at,oi({Component:e},t))}}))),this.setState({root:t,loading:!0}),"function"==typeof(r=function(e){n.setState({loading:e})})&&Ue.push(r),He()}},{key:"componentWillUnmount",value:function(){var e;null===(e=this.form.current)||void 0===e||e.resetFields(),this.setState({root:void 0,loading:!0})}},{key:"setComponentStatus",value:function(e){var t=this.props,r=t.preview,n=t.hidden,i=t.readonly;if(e.preview=null!=r&&r,Q(n))e.hidden=n;else if(X(n))e.hidden=n.includes(e.code);else if(Z(n))e.hidden=!!n[e.code];else{var o;e.hidden=null!==(o=e.hidden)&&void 0!==o&&o}if(Q(i))e.readonly=i;else if(X(i))e.readonly=i.includes(e.code);else if(Z(i))e.readonly=!!i[e.code];else{var l;e.readonly=null!==(l=e.readonly)&&void 0!==l&&l}ee(e.hideClear)&&(e.hideClear=this.hideClear)}},{key:"component",value:function(e,t){var r=e.id,n=e.attributes,i=e.children;return this.setComponentStatus(n),a(t,oi(oi({},n),{},{children:null==i?void 0:i.map(this.children)}),r)}},{key:"container",value:function(e){var t=e.id,r=e.tag,n=e.attributes,i=e.text,o=e.children;return"Row"===r?a(Kn,oi(oi({},n),{},{children:null==o?void 0:o.map(this.children)}),t):"Col"===r?a(Jn,{span:Number(n.span),children:null==o?void 0:o.map(this.children)},t):"Collapse"===r?a(ni,oi(oi({collapse:this.props.collapse},n),{},{children:null==o?void 0:o.map(this.children)}),t):"Content"===r?a(Zn,oi(oi({currentStepIndex:this.state.stepIndex},n),{},{children:null==o?void 0:o.map(this.children)}),t):"Steps"===r?a(Qn,oi(oi({stepIndex:this.state.stepIndex,onChangeSetp:this.onStepIndex},n),{},{children:o}),t):"Divider"===r?a(ei,oi(oi({},n),{},{children:i}),t):void 0}},{key:"applet",value:function(e){var t=this,r=e.tag,n=e.attributes,i=e.cdata,o=e.children;if("Columns"===r){var l=null==o?void 0:o.map((function(e){var r=e.attributes,n=e.children;if(n){var i,o=G(n.map(t.children),{tag:"Validates"});return oi(oi({},r),{},{rules:null!==(i=null==o?void 0:o.children)&&void 0!==i?i:[]})}return r}));return{tag:r,children:l}}return"Options"===r?{tag:r,children:null==o?void 0:o.map((function(e){return{key:e.attributes.value,label:e.text}}))}:"Validates"===r?{tag:r,children:null==o?void 0:o.map((function(e){return e.attributes}))}:"Conditions"===r?{tag:r,type:n.type,action:n.action,children:null==o?void 0:o.map((function(e){return e.attributes}))}:"Collection"===r||"Compute"===r?{tag:r,cdata:i}:void 0}},{key:"render",value:function(){var e,t=this.state,r=t.root,n=t.loading,i=this.props.initialValues;return u(s,{children:[r&&a(Ee.Provider,{value:oi(oi({},this.props),{},{form:this.form,showTitle:this.showTitle}),children:a(pi,oi(oi({form:this.form,style:n?oi(oi({},this.styles),{},{display:"none"}):this.styles,initialValues:i,onValuesChange:this.onValuesChange},this.layouts),{},{children:null===(e=r.children)||void 0===e?void 0:e.map(this.children)}))}),n&&a(q,{active:!0})]})}}])}(),pi=function(e){function n(){var e;t(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=li(this,n,[].concat(i)),l(e,"onFinish",(function(e){console.log("Success:",e)})),e}return o(n,e),r(n,[{key:"render",value:function(){var e=this.props,t=e.form,r=e.style,n=e.labelCol,i=e.wrapperCol,o=e.initialValues,l=e.children,s=e.onValuesChange;return a(m,{ref:t,style:r,labelCol:n,wrapperCol:i,initialValues:o,onFinish:this.onFinish,autoComplete:"off",onValuesChange:function(e){s(e)},children:l})}}])}(c.PureComponent);export{Ee as DesignContext,rt as UIComponent,pt as UIListComponent,ci as default,Ae as defineConfig};
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/classCallCheck";import r from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/defineProperty";import{jsx as a,Fragment as s,jsxs as u}from"react/jsx-runtime";import c,{PureComponent as p,useEffect as f,useRef as d,useMemo as h,memo as v,useState as y}from"react";import{Form as m,Space as g,Image as b,Input as O,InputNumber as w,Select as j,Checkbox as P,Radio as S,Switch as k,DatePicker as C,TimePicker as x,Upload as D,Button as L,Modal as I,Progress as V,message as R,Rate as E,Card as B,Table as T,Row as F,Col as N,Steps as A,Layout as M,Divider as q,Skeleton as U}from"antd";import{parseInt as z,uniqueId as _,isObject as W,isString as H,camelCase as G,cloneDeep as Y,find as $,every as K,some as J,debounce as Q,concat as X,mapValues as Z,isBoolean as ee,isArray as te,isUndefined as re}from"lodash";import ne from"@babel/runtime/helpers/objectWithoutProperties";import oe from"moment";import ie from"@babel/runtime/helpers/asyncToGenerator";import le from"@babel/runtime/regenerator";import{extend as ae}from"umi-request";import{parse as se,compile as ue}from"path-to-regexp";import ce from"@babel/runtime/helpers/get";import{Toolbar as pe,Editor as fe}from"@wangeditor/editor-for-react";import"@wangeditor/editor/dist/css/style.css";import de from"number-format.js";import he from"dayjs";import ve from"dayjs/plugin/weekday";import ye from"dayjs/plugin/localeData";import me from"dayjs/plugin/customParseFormat";import ge from"@babel/runtime/helpers/toConsumableArray";import{UploadOutlined as be,PlusOutlined as Oe,StarFilled as we,QuestionCircleOutlined as je,UpOutlined as Pe,DownOutlined as Se}from"@ant-design/icons";import ke from"bytes";import Ce from"antd-img-crop";import xe from"file-block-upload";import De from"@babel/runtime/helpers/objectDestructuringEmpty";import Le from"@babel/runtime/helpers/extends";function Ie(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ve(e,t):void 0}}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(a)throw i}}}}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Re=function(){return r((function e(r){t(this,e),l(this,"attributes",{}),this.id=_();var n,o=Ie(r.attributes);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=i.value.trim();this.isBoolean(a)&&(a=this.toBoolean(a)),this.attributes[i.name]=a}}catch(e){o.e(e)}finally{o.f()}this.children=new Array;var s,u=Ie(r.childNodes);try{for(u.s();!(s=u.n()).done;){var c,p,f=s.value;if(f instanceof Element)null===(c=this.children)||void 0===c||c.push(new e(f));if(3===f.nodeType&&f.textContent&&(this.text=f.textContent),4===f.nodeType)this.cdata=null===(p=f.nodeValue)||void 0===p?void 0:p.replace(/\ +/g," ").replace(/[\t\r\n]/g,"")}}catch(e){u.e(e)}finally{u.f()}this.tag=r.nodeName}),[{key:"isBoolean",value:function(e){return"true"===e||"false"===e}},{key:"toBoolean",value:function(e){return"true"===e}},{key:"isNumber",value:function(e){return/^\d+$/.test(e)}},{key:"toNumber",value:function(e){return z(e,10)}}])}(),Ee=function(){function e(){t(this,e)}return r(e,null,[{key:"parser",value:function(e){var t=e.childNodes[0];return new Re(t)}},{key:"toDocument",value:function(e){return(new DOMParser).parseFromString(e,"text/xml")}},{key:"getRoot",value:function(t){var r=e.toDocument(t);return e.parser(r)}},{key:"selector",value:function(e,t){return e.querySelector(t)}},{key:"selectors",value:function(e,t){return e.querySelectorAll(t)}}])}();function Be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fe=function(e){var t=e.type,r=void 0===t?"string":t,n=e.required,o=e.minlength,i=e.maxlength,l=e.min,a=e.max,s=e.pattern,u=e.message;return n?{type:r,required:n,message:u}:o&&i?{type:r,min:Number(o),max:Number(i),message:u}:l&&a?{type:"number",min:Number(l),max:Number(a),message:u}:"phone"===r?{type:"string",pattern:new RegExp("^[1][3,5,6,7,8][0-9]\\d{8}$"),message:u}:"regexp"===r&&"string"==typeof s?{type:"string",pattern:new RegExp(s),message:u}:{type:r,message:u}},Ne=c.createContext({});function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qe=function(){function e(r){if(t(this,e),l(this,"request",{prefix:"api",headers:{},route:"/design"}),l(this,"file",{listUrl:"/file/list",downloadUrl:"/file/download",uploadUrl:"/file/upload",previewUrl:"/file/preview",extraData:function(e,t){}}),l(this,"style",{labelStyle:{color:"#055ab5"}}),l(this,"form",{documentUrl:"/form/:formId"}),l(this,"chunk",{chunkSize:10*Math.pow(1024,2),checkFile:"/chunk/checkFile",checkChunk:"/chunk/checkChunk",chunkUpload:"/chunk/chunkUpload",doMerge:"/chunk/doMerge",mergeProgress:"/chunk/mergeProgress",onComplete:"/chunk/onComplete",completeProgress:"/chunk/completeProgress"}),l(this,"mimeType",{}),r){var n=r.request,o=r.file,i=r.form,a=r.chunk,s=r.mimeType,u=r.components,c=r.previewComponents;this.request=Me(Me({},this.request),n),this.file=Me(Me({},this.file),o),this.form=Me(Me({},this.form),i),this.chunk=Me(Me({},this.chunk),a),this.mimeType=s,this.components=u,this.previewComponents=c}}return r(e,null,[{key:"init",value:function(t){return new e(t)}}])}(),Ue=qe.init(),ze=function(e){Ue=qe.init(e)},_e=function(t){var r={};return W(t)?t:(H(t)&&t.replace(/\ +/g,"").split(";").forEach((function(t){if(t){var n=t.split(":"),o=e(n,2),i=o[0],a=o[1];Object.assign(r,l({},G(i),a))}})),r)},We=0,He=[],Ge=function(e){return new Promise((function(t){setTimeout((function(){t(e)}),e)}))},Ye=function(){var e=ie(le.mark((function e(t){var r,n;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===We)for(r=0,n=He;r<n.length;r++)(0,n[r])(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$e=function(){var e=ie(le.mark((function e(){return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0==We++&&Ye(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ke=function(){var e=ie(le.mark((function e(){return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0==--We&&Ye(!1);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Je=function(){var e=ie(le.mark((function e(){return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ge(1e3);case 2:0===We?Ye(!1):Je();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Qe=function(){var e=ie(le.mark((function e(){return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:We=0,Ye(!1);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xe=["status"];function Ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var et=ae({prefix:Ue.request.prefix,headers:Ue.request.headers,timeout:1e4});et.use(function(){var e=ie(le.mark((function e(t,r){return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,$e(),e.next=4,r();case 4:Ke(),e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),Qe(),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}(),{global:!0});var tt=function(t,r){var n=Y(r.data),o=t;try{var i,a="",s=o.match(/[a-zA-z]+:\/\/[^/]*/);if(s)a=e(s,1)[0],o=o.slice(a.length);var u=null===(i=se(o))||void 0===i?void 0:i.tokens;o=ue(o)(r.data),u.forEach((function(e){e instanceof Object&&e.name in n&&delete n[e.name]})),o=a+o}catch(e){console.error(e.message)}return"GET"===r.method.toLocaleUpperCase()?r.params=n:r.type&&(r.requestType=r.type),r.prefix=Ue.request.prefix,et(o,r).then((function(e){var t=e.status,r=ne(e,Xe),n=200===t;return Promise.resolve(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({success:n},r))})).catch((function(e){var t,r=e.response,n=e.data,i=null!==(t=null==n?void 0:n.message)&&void 0!==t?t:"访问超时";return console.error(o,r,n),Promise.resolve({success:!1,message:i})}))},rt=function(t){var r="GET",n="json",o=t,i=t.split(" ");if(2===i.length){var l=e(i,2);r=l[0],o=l[1]}else if(3===i.length){var a=e(i,3);r=a[0],n=a[1],o=a[2]}return function(e){return tt(o,{method:r,type:n,data:e})}};function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function it(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(it=function(){return!!e})()}var lt=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,it()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,p),r(e,[{key:"request",value:(l=ie(le.mark((function e(t,r){var n;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!=r?r:this.context.params,e.abrupt("return",rt(t)(ot({},n)).then((function(e){var t=e.success,r=e.data;return t?Promise.resolve(r):Promise.reject(void 0)})).catch((function(e){return console.error("remote",t,e),Promise.reject(e)})));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})}]);var l}();function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ut=function(){return!!e})()}lt.contextType=Ne;var ct=function(){function e(){var r,i,a,s;t(this,e);for(var u=arguments.length,c=new Array(u),p=0;p<u;p++)c[p]=arguments[p];return i=this,a=e,s=[].concat(c),a=o(a),r=n(i,ut()?Reflect.construct(a,s,o(i).constructor):a.apply(i,s)),l(r,"styleWrapper",{style:{borderBottom:"1px solid #d9d9d9"}}),r}return i(e,lt),r(e,[{key:"setDefaultValue",value:function(e){var t=this.context.form;if(t){var r,n,o=this.props.code;if(!(null===(r=t.current)||void 0===r?void 0:r.getFieldValue(o)))null===(n=t.current)||void 0===n||n.setFieldValue(o,e)}}},{key:"setFieldValue",value:function(e){var t=this.context.form;if(t){var r,n=this.props.code;null===(r=t.current)||void 0===r||r.setFieldValue(n,e)}}},{key:"cleanFieldValue",value:function(){var e=this;setTimeout((function(){e.setFieldValue(void 0)}),1)}},{key:"getFieldValue",value:function(){var e=this.context.form;if(e){var t,r=this.props.code;return null===(t=e.current)||void 0===t?void 0:t.getFieldValue(r)}}},{key:"getFieldsValue",value:function(){var e,t=this.context.form;if(t)return null===(e=t.current)||void 0===e?void 0:e.getFieldsValue()}},{key:"getLabel",value:function(){if(this.context.showTitle){var e=this.props,t=e.title,r=e.labelStyle,n=_e(r);return a("span",{style:st(st({},Ue.style.labelStyle),n),children:t})}}},{key:"getItem",value:function(){var e,t,r=this.props,n=r.preview,o=r.labelCol,i=r.wrapperCol,l=r.tips,a=o&&i?{labelCol:{span:o},wrapperCol:{span:i}}:{};n?(e={required:!1},Object.assign(null!==(t=a.wrapperCol)&&void 0!==t?t:{},this.styleWrapper)):e={tooltip:l};return{itemProps:e,itemLayouts:a}}},{key:"getStyles",value:function(){var e=this.props,t=e.style,r=e.itemStyle;return{styles:_e(t),itemStyles:_e(r)}}},{key:"display",value:function(){var e=this.getFieldsValue(),t=this.props,r=t.defaultHide,n=void 0!==r&&r,o=t.children,i=t.preview,l=!n,a=$(o,{tag:"Conditions"});if(a){var s,u=a.type,c=a.action,p=null===(s=a.children)||void 0===s?void 0:s.map(function(e,t){return function(r){var n=r.test;try{if(e){e=Te(Te({},e),{},{preview:t});var o=Object.keys(e).join(",");return new Function("{".concat(o,"}"),"return ".concat(n))(e)}}catch(e){}}}(e,i));if((null==p?void 0:p.length)>0&&void 0!==(null==p?void 0:p[0])){var f=!1;if((f="and"===u?K(p):J(p))&&"hide"===c||!f&&"show"===c)return!1;if(!f&&"hide"===c||f&&"show"===c)return!0}}return l}},{key:"rules",value:function(){var e=this.props,t=e.preview,r=e.children;if(!t){var n,o,i=$(r,{tag:"Validates"});return null!==(n=null==i||null===(o=i.children)||void 0===o?void 0:o.map(Fe))&&void 0!==n?n:[]}return[]}},{key:"collectionList",value:function(){var e=$(this.props.children,{tag:"Collection"});if(e)return function(e,t){var r=t.cdata;try{if(e){var n=Object.keys(e).join(",");return new Function("{".concat(n,"}"),"".concat(r))(e)}return new Function("".concat(r))()}catch(e){}return[]}(this.getFieldsValue(),e)}},{key:"onComputeValue",value:function(){var e=this,t=$(this.props.children,{tag:"Compute"});if(t){var r=function(e,t){var r=t.cdata;try{if(e){var n=Object.keys(e).join(",");return new Function("{".concat(n,"}"),"moment","".concat(r))(e,oe)}return new Function("moment","".concat(r))(oe)}catch(e){}}(this.getFieldsValue(),t);r&&setTimeout((function(){e.setFieldValue(r)}),1)}}},{key:"initValue",value:function(e){var t=this,r=this.props.defaultValue,n=void 0===r?e:r;n&&this.forceUpdate((function(){t.setDefaultValue(n)}))}}])}();ct.contextType=Ne;var pt=["Component","defaultValue","style"];function ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ft(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ht=function(){return!!e})()}var vt=function(){function e(){var r,i,a,s;t(this,e);for(var u=arguments.length,c=new Array(u),p=0;p<u;p++)c[p]=arguments[p];return i=this,a=e,s=[].concat(c),a=o(a),r=n(i,ht()?Reflect.construct(a,s,o(i).constructor):a.apply(i,s)),l(r,"initValue",(function(){var e=r.props.defaultValue;e&&r.forceUpdate((function(){r.setDefaultValue(e)}))})),l(r,"onChange",(function(e){r.setFieldValue(e)})),r}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.hidden,u=this.props,c=u.Component;u.defaultValue,u.style;var p=ne(u,pt),f=this.getStyles(),d=f.styles,h=f.itemStyles;return a(m.Item,dt(dt(dt({name:i,label:this.getLabel(),style:h,hidden:l,rules:e},r),n),{},{children:a(c,dt(dt({},p),{},{style:d,onChange:this.onChange}))}))}return a(s,{})}}])}();function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(gt=function(){return!!e})()}function bt(e,t,r,n){var i=ce(o(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}var Ot=function(){function l(){return t(this,l),e=this,i=arguments,r=o(r=l),n(e,gt()?Reflect.construct(r,i||[],o(e).constructor):r.apply(e,i));var e,r,i}return i(l,ct),r(l,[{key:"optionList",value:function(){var e=$(this.props.children,{tag:"Options"});return null==e?void 0:e.children}},{key:"plusRules",value:function(){var e=this.rules();return null==e?void 0:e.map((function(e){if(e.required){return mt(mt({},e),{},{validator:function(e,t){return(null==t?void 0:t.length)>0?Promise.resolve():Promise.reject()}})}if(e.min&&e.max){return mt(mt({},e),{},{validator:function(t,r){return r.length>=e.min&&r.length<=e.max?Promise.resolve():Promise.reject()}})}return mt({},e)}))}},{key:"getList",value:function(e,t,r){if(t){var n=e.filter((function(e){var r=e.key;return t.includes(r)}));return r(n),n}return e}},{key:"request",value:function(){var t=ie(le.mark((function t(r,n){var o;return le.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=Ue.request.route+r,t.abrupt("return",bt(l,"request",this,3)([o,n]).then((function(t){if(Array.isArray(t)){var r=t.map((function(t){var r,n=null===(r=Object.entries(t))||void 0===r?void 0:r[0],o=e(n,2);return{key:o[0],label:o[1]}}));return Promise.resolve(r)}return Promise.resolve(t)})));case 2:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()}])}();function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wt=function(){return!!e})()}var jt=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,wt()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,ct),r(e,[{key:"render",value:function(){if(this.display()){var e=this.rules(),t=this.props,r=t.title,n=t.hidden,o=this.getStyles(),i=o.styles,l=o.itemStyles;return a(m.Item,{style:l,hidden:n,rules:n?[]:e,wrapperCol:{span:24},children:a("div",{style:i,children:r})})}return a(s,{})}}])}();function Pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pt=function(){return!!e})()}var St=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,Pt()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,ct),r(e,[{key:"render",value:function(){var e,t=this.display(),r=null===(e=this.context.tooltip)||void 0===e||e;if(t&&r){var n=this.props,o=n.title,i=n.hidden,l=n.children,u=this.getStyles(),c=u.styles,p=u.itemStyles;return a(m.Item,{style:p,hidden:i,wrapperCol:{span:24},children:a("div",{style:c,children:null!=o?o:l})})}return a(s,{})}}])}(),kt=function(e){var t=e.value,r=e.type,n=e.style,o=e.onChange;return f((function(){null==o||o(t)}),[]),t&&"url"===r?t.split(/[,;\s]/).map((function(e){return a("div",{style:n,children:a("a",{href:e,target:"_blank",rel:"noreferrer",children:e})})})):a("div",{style:n,children:t})},Ct=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewText)&&void 0!==t?t:kt)(e)},xt=function(e){var t=e.value;e.type,e.style;var r=e.onChange;return f((function(){null==r||r(t)}),[]),a("div",{dangerouslySetInnerHTML:{__html:t}})},Dt=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewEditor)&&void 0!==t?t:xt)(e)},Lt=function(e){var t=e.value,r=e.format,n=e.style,o=e.onChange;f((function(){o(t)}),[]);for(var i=r,l=["H","M","S"],s=t?t.split(":"):["000","00","00"],u=0;u<l.length;u++)i=i.replace(new RegExp("\\[".concat(l[u],"\\]|").concat(l[u]),"g"),s[u]);return a("div",{style:n,children:i})},It=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewDuration)&&void 0!==t?t:Lt)(e)},Vt=function(e){var t=e.checked,r=e.style,n=e.onChange;return f((function(){n(t)}),[]),a("div",{style:r,children:t?"开启":"关闭"})},Rt=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewSwitch)&&void 0!==t?t:Vt)(e)},Et=function(e){var t=e.value,r=e.list,n=e.style,o=e.onChange;if(f((function(){o(t)}),[]),Array.isArray(t)){var i=r.filter((function(e){var r=e.key;return t.includes(r)})).map((function(e){return e.label}));return a("div",{style:n,children:null==i?void 0:i.join()})}var l=null==r?void 0:r.find((function(e){return e.key===t}));return a("div",{style:n,children:null==l?void 0:l.label})},Bt=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewList)&&void 0!==t?t:Et)(e)},Tt=function(e){var t=e.fileList,r=Ue.request.prefix+Ue.file.downloadUrl,n=Ue.request.prefix+Ue.file.previewUrl;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,o=e.name,i=e.url,l=e.contentType,s=r+"/"+t;return null!=l&&l.endsWith("pdf")?a("div",{children:u(g,{style:{paddingBottom:10},children:[a("a",{href:i,target:"_blank",rel:"noreferrer",children:o}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=l&&l.startsWith("image")?a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a(b,{width:200,src:i,alt:o}),a("div",{children:o})]}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=l&&l.startsWith("video")?a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a("video",{src:i,controls:!0,style:{width:260},children:"当前浏览器不支持视频播放,请使用最新版谷歌浏览器!"}),a("div",{children:o})]}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=l&&l.startsWith("audio")?a("div",{children:u("div",{style:{paddingBottom:10,display:"flex",alignItems:"center"},children:[u("div",{children:[a("audio",{src:i,controls:!0,style:{width:"calc(100% - 40px)",height:30},children:"当前浏览器不支持音频播放,请使用最新版谷歌浏览器!"}),a("div",{children:o})]}),a("a",{style:{paddingLeft:10},href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):null!=o&&o.endsWith(".doc")||null!=o&&o.endsWith(".docx")||null!=o&&o.endsWith(".xls")||null!=o&&o.endsWith(".xlsx")||null!=o&&o.endsWith(".ppt")||null!=o&&o.endsWith(".pptx")?a("div",{children:u(g,{style:{paddingBottom:10},children:[a("a",{href:n+"/"+t,target:"_blank",rel:"noreferrer",children:o}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t):a("div",{children:u(g,{style:{paddingBottom:10},children:[a("a",{href:i,target:"_blank",rel:"noreferrer",children:o}),a("a",{href:s,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},Ft=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewFile)&&void 0!==t?t:Tt)(e)},Nt=function(e){var t=e.fileList,r=e.autoplay,n=e.muted,o=e.loop,i=e.preload,l=Ue.request.prefix+Ue.file.downloadUrl;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,s=e.name,c=e.url,p=l+"/"+t;return a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a("audio",{src:c,controls:!0,autoPlay:r,muted:n,loop:o,preload:i,style:{width:"calc(100% - 40px)",height:30},children:"当前浏览器不支持音频播放,请使用最新版谷歌浏览器!"}),a("div",{children:s})]}),a("a",{href:p,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},At=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewAudio)&&void 0!==t?t:Nt)(e)},Mt=function(e){var t=e.fileList,r=e.controls,n=e.autoplay,o=e.muted;e.pip;var i=e.loop,l=e.preload,c=Ue.request.prefix+Ue.file.downloadUrl;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,s=e.name,p=e.url,f=c+"/"+t;return a("div",{children:u(g,{style:{paddingBottom:10},children:[u("div",{children:[a("video",{src:p,controls:r,autoPlay:n,muted:o,loop:i,preload:l,style:{width:260},children:"当前浏览器不支持视频播放,请使用最新版谷歌浏览器!"}),a("div",{children:s})]}),a("a",{href:f,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},qt=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewVideo)&&void 0!==t?t:Mt)(e)},Ut=function(e){var t=e.fileList,r=e.width,n=e.height,o=e.style;return a(s,{children:null==t?void 0:t.map((function(e){var t=e.id,i=e.name,l=e.url;return a("div",{style:o,children:u(g,{style:{paddingBottom:10},children:[a(b,{width:r,height:n,src:l,alt:i}),a("a",{href:Ue.request.prefix+Ue.file.downloadUrl+"/"+t,target:"_blank",rel:"noreferrer",children:"下载"})]})},t)}))})},zt=function(e){var t,r;return(null!==(t=null===(r=Ue.previewComponents)||void 0===r?void 0:r.PreviewImage)&&void 0!==t?t:Ut)(e)};function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ht=function(){return!!e})()}var Gt=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,Ht()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.type,u=o.preview,c=o.placeholder,p=o.maxLength,f=o.allowClear,d=o.showCount,h=o.readonly,v=o.hidden,y=this.getStyles(),g=y.styles,b=y.itemStyles;return a(m.Item,Wt(Wt(Wt({name:i,label:this.getLabel(),style:b,hidden:v,rules:e},r),n),{},{children:u?a(Ct,{type:l,style:g}):a(O,{maxLength:p,placeholder:c,allowClear:f,showCount:d,disabled:h,style:g})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Kt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Kt=function(){return!!e})()}var Jt=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,Kt()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.props,r=t.code,n=t.preview,o=t.placeholder,i=t.maxLength,l=t.allowClear,u=t.showCount,c=t.minRow,p=void 0===c?"0":c,f=t.maxRow,d=void 0===f?"0":f,h=t.readonly,v=t.hidden,y=this.getItem(),g=y.itemProps,b=y.itemLayouts,w=this.getStyles(),j=w.styles,P=w.itemStyles,S=Number(p),k=Number(d);return a(m.Item,$t($t($t({name:r,label:this.getLabel(),style:P,hidden:v,rules:v?[]:e},g),b),{},{children:n?a(Ct,{style:j}):a(O.TextArea,{maxLength:i,placeholder:o,allowClear:l,showCount:u,autoSize:!(S+k<1)&&{minRows:S,maxRows:k},disabled:h,style:j})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Qt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zt=function(){return!!e})()}var er=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,Zt()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){var e=this.props,t=e.type,r=void 0===t?"number":t,n=e.precision,o={};"digits"===r?o=n?{precision:Number(n)}:{precision:2}:"money"===r?o={formatter:function(e){return"¥ ".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(e){return e.replace(/\$\s?|(,*)/g,"")}}:"percentage"===r&&(o={formatter:function(e){return"".concat(e,"%")},parser:function(e){return e.replace("%","")}}),this.onComputeValue();var i=this.rules().map((function(e){return e.required?Xt(Xt({},e),{},{type:"number"}):e})),l=this.getItem(),u=l.itemProps,c=l.itemLayouts,p=this.props,f=p.code,d=p.preview,h=p.min,v=p.max,y=p.readonly,g=p.hidden,b=this.getStyles(),O=b.styles,j=b.itemStyles;return a(m.Item,Xt(Xt(Xt({name:f,label:this.getLabel(),style:j,hidden:g,rules:g?[]:i},u),c),{},{children:d?a(Ct,{style:O}):a(w,Xt(Xt({min:h,max:v,disabled:y},o),{},{style:O}))}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nr(e,t,r){return t=o(t),n(e,or()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(or=function(){return!!e})()}var ir=function(){function e(){return t(this,e),nr(this,e,arguments)}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.title,u=o.preview,c=o.placeholder,p=o.hidden,f=o.readonly,d=this.getStyles(),h=d.styles,v=d.itemStyles;return a(m.Item,rr(rr(rr({name:i,label:this.getLabel(),style:v,hidden:p,colon:!!l,rules:p?[]:e},r),n),{},{children:u||f?a(Dt,{style:h}):a(lr,{placeholder:c,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),lr=function(e){function n(){var e;t(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=nr(this,n,[].concat(o)),l(e,"state",{editor:null,html:""}),l(e,"handleChange",Q((function(t){var r,n;null===(r=(n=e.props).onChange)||void 0===r||r.call(n,t)}),500)),e}return i(n,e),r(n,[{key:"componentDidMount",value:function(){var e=this;setTimeout((function(){e.setState({html:e.props.value})}),1)}},{key:"render",value:function(){var e=this,t=this.props,r=t.placeholder,n=t.style,o=this.state,i=o.editor,l=o.html,s=rr({height:"200px",overflowY:"hidden"},n);return u("div",{style:{border:"1px solid #ccc",zIndex:100},children:[a(pe,{editor:i,mode:"default",defaultConfig:{excludeKeys:["group-image","group-video"]},style:{borderBottom:"1px solid #ccc"}}),a(fe,{defaultConfig:{placeholder:r},value:l,onCreated:function(t){e.setState({editor:t})},onChange:function(t){var r=t.getHtml();e.setState({html:r},(function(){e.handleChange(r)}))},mode:"default",style:s})]})}}])}(c.Component);function ar(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ar(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ur(e,t,r){return t=o(t),n(e,cr()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cr=function(){return!!e})()}var pr=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=ur(this,e,[].concat(o)),l(r,"state",{list:[]}),r}return i(e,Ot),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.remote,r=this.optionList();r?this.setState({list:r},this.initValue):t&&t.trim().length>0&&this.request(t).then((function(t){e.setState({list:t},e.initValue)}))}},{key:"initValue",value:function(){var e=this.props,t=e.defaultValue,r=e.multiple;t&&(r?this.setDefaultValue([t]):this.setDefaultValue(t))}},{key:"render",value:function(){var e=this;if(this.display()){this.onComputeValue();var t=this.props,r=t.code,n=t.preview,o=t.multiple,i=t.placeholder,l=t.allowClear,u=void 0===l||l,c=t.readonly,p=t.hidden,f=o?this.plusRules():this.rules(),d=this.collectionList(),h=this.getList(this.state.list,d,(function(t){if(t.length>0){var r=e.getFieldValue();r&&(!o&&!t.some((function(e){return e.key===r}))||o&&!t.some((function(e){return r.includes(e.key)})))&&e.cleanFieldValue()}})),v=this.getItem(),y=v.itemProps,g=v.itemLayouts,b=this.getStyles(),O=b.styles,w=b.itemStyles;return a(m.Item,sr(sr(sr({name:r,label:this.getLabel(),style:w,hidden:p,rules:p?[]:f},y),g),{},{children:n?a(Bt,{list:this.state.list,style:O}):a(dr,{list:h,multiple:o,placeholder:i,allowClear:u,readonly:c,style:O})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),fr=j.Option,dr=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=ur(this,e,[].concat(o)),l(r,"handleItemValue",(function(e){var t,n;null===(t=(n=r.props).onChange)||void 0===t||t.call(n,e)})),r}return i(e,lt),r(e,[{key:"render",value:function(){var e=this.props,t=e.list,r=e.value,n=e.multiple,o=e.placeholder,i=e.allowClear,l=e.readonly,s=e.style;return a(j,{showSearch:!0,placeholder:o,mode:n?"multiple":void 0,disabled:l,value:r,allowClear:i,style:s,onChange:this.handleItemValue,filterOption:function(e,t){return t.children.toLowerCase().includes(e.toLowerCase())},children:t&&t.map((function(e){var t=e.key,r=e.label;return a(fr,{value:t,children:r},t)}))})}}])}();function hr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yr(e,t,r){return t=o(t),n(e,mr()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function mr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mr=function(){return!!e})()}var gr=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=yr(this,e,[].concat(o)),l(r,"state",{list:[]}),r}return i(e,Ot),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.remote,r=this.optionList();r?this.setState({list:r},this.initValue):t&&t.trim().length>0&&this.request(t).then((function(t){e.setState({list:t},e.initValue)}))}},{key:"render",value:function(){var e=this;if(this.display()){this.onComputeValue();var t=this.plusRules(),r=this.collectionList(),n=this.getList(this.state.list,r,(function(t){if(t.length>0){var r=e.getFieldValue();r&&!t.some((function(e){return r.includes(e.key)}))&&e.cleanFieldValue()}})),o=this.props,i=o.code,l=o.preview,s=o.readonly,u=o.hidden,c=this.getItem(),p=c.itemProps,f=c.itemLayouts,d=this.getStyles(),h=d.styles,v=d.itemStyles;return a(m.Item,vr(vr(vr({name:i,label:this.getLabel(),style:v,hidden:u,rules:u?[]:t},p),f),{},{children:l?a(Bt,{list:this.state.list,style:h}):a(br,{list:n,readonly:s,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),null}}])}(),br=function(){function e(){return t(this,e),yr(this,e,arguments)}return i(e,lt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.list,n=e.readonly,o=e.style,i=e.onChange;return a(P.Group,{style:o,value:t,onChange:function(e){null==i||i(e)},children:r&&r.map((function(e){var t=e.key,r=e.label;return a(P,{value:t,disabled:n,children:r},t)}))})}}])}();function Or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Or(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Or(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jr(e,t,r){return t=o(t),n(e,Pr()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Pr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pr=function(){return!!e})()}var Sr=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=jr(this,e,[].concat(o)),l(r,"state",{list:[]}),r}return i(e,Ot),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.remote,r=this.optionList();r?this.setState({list:r},this.initValue):t&&t.trim().length>0&&this.request(t).then((function(t){e.setState({list:t},e.initValue)}))}},{key:"render",value:function(){var e=this;if(this.display()){this.onComputeValue();var t=this.rules(),r=this.collectionList(),n=this.getList(this.state.list,r,(function(t){if(t.length>0){var r=e.getFieldValue();r&&!t.some((function(e){return r.includes(e.key)}))&&e.cleanFieldValue()}})),o=this.props,i=o.code,l=o.preview,u=o.optionType,c=o.readonly,p=o.hidden,f=this.getItem(),d=f.itemProps,h=f.itemLayouts,v=this.getStyles(),y=v.styles,g=v.itemStyles;return a(m.Item,wr(wr(wr({name:i,label:this.getLabel(),style:g,hidden:p,rules:p?[]:t},d),h),{},{children:l?a(Bt,{list:n,style:y}):a(kr,{list:this.state.list,optionType:u,readonly:c,style:y})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),kr=function(){function e(){return t(this,e),jr(this,e,arguments)}return i(e,lt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.list,n=e.optionType,o=e.readonly,i=e.style,l=e.onChange;return a(S.Group,{value:t,optionType:n,style:i,onChange:function(e){null==l||l(e.target.value)},children:r&&r.map((function(e){var t=e.key,r=e.label;return a(S,{value:t,disabled:o,children:r},t)}))})}}])}();function Cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dr=function(){return!!e})()}var Lr=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,Dr()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.props,r=t.code,n=t.preview,o=t.readonly,i=t.hidden,l=this.getItem(),u=l.itemProps,c=l.itemLayouts,p=this.getStyles(),f=p.styles,d=p.itemStyles;return a(m.Item,xr(xr(xr({label:this.getLabel(),name:r,style:d,hidden:i,rules:i?[]:e,valuePropName:"checked"},u),c),{},{children:n?a(Rt,{style:f}):a(k,{disabled:o,style:f})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function Ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rr(e,t,r){return t=o(t),n(e,Er()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Er(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Er=function(){return!!e})()}!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".duration > .ant-form-item {\r\n display: inline-block;\r\n vertical-align: middle;\r\n margin-bottom: 0;\r\n width: 20%;\r\n}\r\n\r\n.duration > .ant-form-item:first-child {\r\n width: 30%;\r\n}\r\n\r\n.duration > span {\r\n padding: 5px; \r\n vertical-align: middle;\r\n}");var Br=function(){function e(){return t(this,e),Rr(this,e,arguments)}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue("000:00:00")}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.preview,u=o.format,c=void 0===u?"H小时M分S秒":u,p=o.readonly,f=o.hidden,d=this.getStyles(),h=d.styles,v=d.itemStyles;return a(m.Item,Vr(Vr(Vr({name:i,label:this.getLabel(),style:v,hidden:f,rules:f?[]:e},r),n),{},{children:l?a(It,{format:c,style:h}):a(Tr,{format:c,readonly:p,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Tr=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=Rr(this,e,[].concat(o)),l(r,"duration",[0,0,0]),l(r,"pattern",["H","M","S"]),l(r,"changeValue",(function(e){return function(t){if("number"==typeof t){var n,o;r.duration[e]=t;var i=r.duration.map((function(e,t){return de(0===t?"000":"00",e)}));null===(n=(o=r.props).onChange)||void 0===n||n.call(o,i.join(":"))}}})),r}return i(e,lt),r(e,[{key:"render",value:function(){var e=this,t=this.props,r=t.value,n=t.format,o=t.readonly,i=t.style,l=n.trim().split(/\[.*?\]|[HMS]/);this.pattern=n.trim().split(new RegExp("[".concat(l.join(""),"]"))).filter((function(e){return e})),"string"==typeof r&&(this.duration=r.split(":").map(Number));var s=[];return l.forEach((function(t,r){t&&s.push(t),r<=e.pattern.length-1&&s.push(e.pattern[r])})),a("div",{className:"duration",children:s.map((function(t,r){return t.includes("H")?a(m.Item,{children:a(w,{style:Vr({width:"100%"},i),min:0,max:999,precision:0,value:e.duration[0],formatter:function(e){return e<100?e<10?"00"+e:"0"+e:e.toString()},onChange:e.changeValue(0),controls:!1,disabled:!!/\[|\]/.test(t)||o})},"H"):t.includes("M")?a(m.Item,{children:a(w,{style:Vr({width:"100%"},i),min:0,max:59,precision:0,value:e.duration[1],formatter:function(e){return e<10?"0"+e:e.toString()},onChange:e.changeValue(1),controls:!1,disabled:!!/\[|\]/.test(t)||o})},"M"):t.includes("S")?a(m.Item,{children:a(w,{style:Vr({width:"100%"},i),min:0,max:59,precision:0,value:e.duration[2],formatter:function(e){return e<10?"0"+e:e.toString()},onChange:e.changeValue(2),controls:!1,disabled:!!/\[|\]/.test(t)||o})},"S"):a("span",{children:t},r)}))})}}])}();function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ar(e,t,r){return t=o(t),n(e,Mr()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Mr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mr=function(){return!!e})()}he.extend(ve),he.extend(ye);var qr=function(){function e(){return t(this,e),Ar(this,e,arguments)}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.type,u=void 0===l?"date":l,c=o.format,p=void 0===c?"YYYY-MM-DD":c,f=o.showTime,d=void 0!==f&&f,h=o.preview,v=o.placeholder,y=o.allowClear,g=void 0===y||y,b=o.readonly,O=o.hidden,w=this.getStyles(),j=w.styles,P=w.itemStyles;return a(m.Item,Nr(Nr(Nr({name:i,label:this.getLabel(),style:P,hidden:O,rules:O?[]:e},r),n),{},{children:h?a(Ct,{style:j}):a(Ur,{type:u,format:p,showTime:d,placeholder:v,allowClear:g,readonly:b,style:j})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Ur=function(){function e(){return t(this,e),Ar(this,e,arguments)}return i(e,lt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.type,n=e.format,o=e.showTime,i=e.placeholder,l=e.allowClear,s=e.readonly,u=e.style,c=e.onChange;return a(C,{value:t?he(t,n):void 0,picker:r,format:n,showTime:o?{format:"HH:mm"}:void 0,placeholder:i,allowClear:l,disabled:s,style:u,onChange:function(e){null==c||c(null==e?void 0:e.format(n))}})}}])}();function zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wr(e,t,r){return t=o(t),n(e,Hr()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hr=function(){return!!e})()}he.extend(me);var Gr=function(){function e(){return t(this,e),Wr(this,e,arguments)}return i(e,ct),r(e,[{key:"componentDidMount",value:function(){this.initValue()}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.rules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.format,u=void 0===l?"HH:mm:ss":l,c=o.preview,p=o.placeholder,f=o.allowClear,d=void 0===f||f,h=o.readonly,v=o.hidden,y=this.getStyles(),g=y.styles,b=y.itemStyles;return a(m.Item,_r(_r(_r({name:i,label:this.getLabel(),style:b,hidden:v,rules:v?[]:e},r),n),{},{children:c?a(Ct,{style:g}):a(Yr,{format:u,placeholder:p,allowClear:d,readonly:h,style:g})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Yr=function(){function e(){return t(this,e),Wr(this,e,arguments)}return i(e,lt),r(e,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.format,n=e.placeholder,o=e.allowClear,i=e.readonly,l=e.style,s=e.onChange;return a(x,{value:t?he(t,r):void 0,format:r,placeholder:n,allowClear:o,disabled:i,style:l,onChange:function(e){null==s||s(null==e?void 0:e.format(r))}})}}])}();function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jr(e,t,r){return t=o(t),n(e,Qr()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Qr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qr=function(){return!!e})()}var Xr=function(e){return Array.isArray(e)?e:e&&e.list},Zr=function(){function e(){return t(this,e),Jr(this,e,arguments)}return i(e,Ot),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,o=t.maxCount,i=t.fileType,l=t.fileTypeMessage,u=t.fileSize,c=t.readonly,p=t.hidden,f=this.getItem(),d=f.itemProps,h=f.itemLayouts,v=this.getStyles(),y=v.styles,g=v.itemStyles;return a(m.Item,Kr(Kr(Kr({name:r,label:this.getLabel(),style:g,hidden:p,rules:p?[]:e,valuePropName:"list",getValueFromEvent:Xr},d),h),{},{children:a(en,{maxCount:o,fileType:i,fileTypeMessage:l,fileSize:u,readonly:c,preview:n,style:y})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),en=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=Jr(this,e,[].concat(o)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){var t=r.props,n=t.fileSize,o=t.fileType,i=t.fileTypeMessage,l=null==o?void 0:o.replace(/\ +/g,"").split(","),a=null==l?void 0:l.map((function(e){return e.startsWith(".")?Ue.mimeType[e]:e}));if(!(a&&a.length>0))return R.error("文件类型不匹配!"),D.LIST_IGNORE;if(!a.includes(e.type))return R.error(i),D.LIST_IGNORE;if(n&&ke.parse(n)<e.size)return R.error("上传的文件大小,不能超过 ".concat(n,"!")),D.LIST_IGNORE;return!0})),l(r,"onStart",(function(){clearInterval(r.timer),r.setState({modal:{open:!0,progress:0}}),r.uploading=!0})),l(r,"onProgress",(function(e){if(r.uploading){clearInterval(r.timer);var t=Math.round(e.percent/2);if(r.setState({modal:{open:!0,progress:t}}),50===t){var n=t;r.timer=setInterval((function(){r.uploading?r.setState({modal:{open:!0,progress:++n}}):(clearInterval(r.timer),r.setState({modal:{open:!1,progress:0}})),99===n&&clearInterval(r.timer)}),1e3)}}})),l(r,"onSuccess",(function(e,t){clearInterval(r.timer);var n=e.data,o=n.id,i=n.url;t.status="done",t.response=e,t.id=o,t.url=i;var l=[].concat(ge(r.state.fileList),[t]);r.setState({fileList:l,modal:{open:!0,progress:100}},(function(){r.onChange(l),setTimeout((function(){r.setState({modal:{open:!1,progress:0}})}),500)})),r.uploading=!1})),l(r,"onError",(function(e,t,n){var o;clearInterval(r.timer);var i=[].concat(ge(r.state.fileList),[n]);n.status="error",n.response=null!==(o=null==t?void 0:t.message)&&void 0!==o?o:"上传失败",r.setState({fileList:i,modal:{open:!1,progress:100}},(function(){r.onChange(i)})),r.uploading=!1})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ue.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&this.request(r,{ids:t}).then((function(t){var r=t.data.map((function(e){return Kr(Kr({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,o=n.preview,i=n.maxCount,l=n.readonly,c=n.style,p=i?Number(i):0;if(o)return a(Ft,{fileList:t});var f={onStart:this.onStart,onSuccess:this.onSuccess,onProgress:this.onProgress,onError:this.onError};return u(s,{children:[a(D,Kr(Kr({action:Ue.request.prefix+Ue.file.uploadUrl,fileList:t,maxCount:p,disabled:l,beforeUpload:this.onBeforeUpload,onRemove:this.onRemove},f),{},{children:a(L,{disabled:l||p<=t.length,icon:a(be,{}),style:c,children:"上传"})})),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}();function tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nn(e,t,r){return t=o(t),n(e,on()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(on=function(){return!!e})()}var ln=function(e){return Array.isArray(e)?e:e&&e.list},an=["image/jpeg","image/png"],sn=function(){function e(){return t(this,e),nn(this,e,arguments)}return i(e,Ot),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,o=t.maxCount,i=t.fileSize,l=t.fileWidth,u=void 0===l?"100":l,c=t.fileHeight,p=void 0===c?"100":c,f=t.readonly,d=t.hidden,h=this.getItem(),v=h.itemProps,y=h.itemLayouts,g=this.getStyles(),b=g.styles,O=g.itemStyles;return a(m.Item,rn(rn(rn({name:r,label:this.getLabel(),style:O,hidden:d,rules:d?[]:e,valuePropName:"list",getValueFromEvent:ln},v),y),{},{children:a(un,{maxCount:o,fileSize:i,fileWidth:Number(u),fileHeight:Number(p),readonly:f,preview:n,style:b})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),un=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=nn(this,e,[].concat(o)),l(r,"uploading",!1),l(r,"state",{fileList:[],fileView:void 0}),l(r,"onChangeValue",(function(e){var t=e.fileList.map((function(e){var t,r;if(200===(null===(t=e.response)||void 0===t?void 0:t.status)){var n=e.response.data,o=n.id;n.name;var i=n.url;e.id=o,e.url=i,e.status="done"}else 500===(null===(r=e.response)||void 0===r?void 0:r.status)&&(e.status="error",e.response=e.response.message);return e}));r.setState({fileList:t},(function(){r.onChange(t)}))})),l(r,"onBeforeUpload",(function(e){if(!an.includes(e.type))return R.error("上传文件类型,仅支持图片类型!"),D.LIST_IGNORE;var t=r.props.fileSize;if(t&&ke.parse(t)<e.size)return R.error("上传的文件大小,不能超过 ".concat(t,"!")),D.LIST_IGNORE;return!0})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ue.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&this.request(r,{ids:t}).then((function(t){var r=t.data.map((function(e){return rn(rn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this,t=this.state,r=t.fileList,n=t.fileView,o=this.props,i=o.preview,l=o.maxCount,c=o.readonly,p=o.fileWidth,f=void 0===p?100:p,d=o.fileHeight,h=void 0===d?100:d,v=o.style,y=l?Number(l):0;return i?a(zt,{fileList:r,width:f,height:h,style:v}):u(s,{children:[a(Ce,{rotationSlider:!0,modalTitle:"图片编辑",modalOk:"确认",modalCancel:"取消",aspect:f/h,children:a(D,{listType:"picture-card",accept:an.join(","),action:Ue.request.prefix+Ue.file.uploadUrl,fileList:r,maxCount:y,disabled:c,beforeUpload:this.onBeforeUpload,onChange:this.onChangeValue,onRemove:this.onRemove,onPreview:function(t){return e.setState({fileView:t})},children:!c&&Number(y)>r.length&&a(L,{type:"link",icon:a(Oe,{}),style:v})})}),(null==n?void 0:n.id)&&a(I,{title:n.name,open:!0,footer:null,onCancel:function(){return e.setState({fileView:void 0})},children:a("img",{alt:n.name,style:{width:"100%"},src:n.url})})]})}}])}();function cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fn=function(){return!!e})()}var dn=function(){function e(){return t(this,e),r=this,l=arguments,i=o(i=e),n(r,fn()?Reflect.construct(i,l||[],o(r).constructor):i.apply(r,l));var r,i,l}return i(e,Ot),r(e,[{key:"plusRules",value:function(){var e=this.rules();return null==e?void 0:e.map((function(e){if(e.required){return pn(pn({},e),{},{validator:function(e,t){return 0===t?Promise.reject():Promise.resolve()}})}return pn({},e)}))}},{key:"render",value:function(){if(this.display()){var e;this.onComputeValue();var t=this.plusRules(),r=this.props,n=r.code,o=r.preview,i=r.allowHalf,l=void 0!==i&&i,u=r.count,c=void 0===u?5:u,p=r.items,f=r.readonly,d=r.hidden,h=this.getItem(),v=h.itemProps,y=h.itemLayouts,g=this.getStyles(),b=g.styles,O=g.itemStyles,w=null!==(e=null==p?void 0:p.split(","))&&void 0!==e?e:[];return a(m.Item,pn(pn(pn({name:n,label:this.getLabel(),style:O,hidden:d,rules:d?[]:t},v),y),{},{children:a(E,{allowHalf:l,count:c,character:function(e){var t=e.index,r=void 0===t?0:t;return w.length>0?w[r]:a(we,{})},disabled:o||f,style:b})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}();function hn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yn(e,t,r){return t=o(t),n(e,mn()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function mn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mn=function(){return!!e})()}var gn=function(e){return Array.isArray(e)?e:e&&e.list},bn=["audio/mpeg","audio/wav"],On=function(){function e(){return t(this,e),yn(this,e,arguments)}return i(e,Ot),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,o=t.maxCount,i=t.fileSize,l=t.readonly,u=t.hidden,c=this.props,p=c.autoplay,f=void 0!==p&&p,d=c.muted,h=void 0!==d&&d,v=c.loop,y=void 0!==v&&v,g=c.preload,b=void 0===g?"auto":g,O=this.getItem(),w=O.itemProps,j=O.itemLayouts,P=this.getStyles(),S=P.styles,k=P.itemStyles;return a(m.Item,vn(vn(vn({name:r,label:this.getLabel(),style:k,hidden:u,rules:u?[]:e,valuePropName:"list",getValueFromEvent:gn},w),j),{},{children:a(wn,{code:r,maxCount:o,fileSize:i,readonly:l,preview:n,autoplay:f,muted:h,loop:y,preload:b,style:S})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),wn=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=yn(this,e,[].concat(o)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){if(!bn.includes(e.type))return R.error("上传文件类型,仅支持音频类型!"),D.LIST_IGNORE;var t=r.props.fileSize;if(t&&ke.parse(t)<e.size)return R.error("上传的文件大小,不能超过 ".concat(t,"!")),D.LIST_IGNORE;return!0})),l(r,"onStart",(function(){clearInterval(r.timer),r.setState({modal:{open:!0,progress:0}}),r.uploading=!0})),l(r,"onProgress",(function(e){if(r.uploading){clearInterval(r.timer);var t=Math.round(e.percent/2);if(r.setState({modal:{open:!0,progress:t}}),50===t){var n=t;r.timer=setInterval((function(){r.uploading?r.setState({modal:{open:!0,progress:++n}}):(clearInterval(r.timer),r.setState({modal:{open:!1,progress:0}})),99===n&&clearInterval(r.timer)}),1e3)}}})),l(r,"onSuccess",(function(e,t){clearInterval(r.timer);var n=e.data,o=n.id,i=n.url;t.status="done",t.response=e,t.id=o,t.url=i;var l=[].concat(ge(r.state.fileList),[t]);r.setState({fileList:l,modal:{open:!0,progress:100}},(function(){r.onChange(l),setTimeout((function(){r.setState({modal:{open:!1,progress:0}})}),500)})),r.uploading=!1})),l(r,"onError",(function(e,t,n){var o;clearInterval(r.timer);var i=[].concat(ge(r.state.fileList),[n]);n.status="error",n.response=null!==(o=null==t?void 0:t.message)&&void 0!==o?o:"上传失败",r.setState({fileList:i,modal:{open:!1,progress:100}},(function(){r.onChange(i)})),r.uploading=!1})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ue.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&this.request(r,{ids:t}).then((function(t){var r=t.data.map((function(e){return vn(vn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,o=n.code,i=n.preview,l=n.maxCount,c=n.readonly,p=n.style,f=n.autoplay,d=n.muted,h=n.loop,v=n.preload,y=l?Number(l):0;if(i)return a(At,{code:o,fileList:t,autoplay:f,muted:d,loop:h,preload:v});var m={onStart:this.onStart,onSuccess:this.onSuccess,onProgress:this.onProgress,onError:this.onError};return u(s,{children:[a(D,vn(vn({listType:"picture-card",accept:bn.join(","),action:Ue.request.prefix+Ue.file.uploadUrl,fileList:t,maxCount:y,disabled:c,beforeUpload:this.onBeforeUpload,onRemove:this.onRemove},m),{},{children:!c&&Number(y)>t.length&&a(L,{type:"link",icon:a(Oe,{}),style:p})})),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}();function jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sn(e,t,r){return t=o(t),n(e,kn()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kn=function(){return!!e})()}var Cn=function(e){return Array.isArray(e)?e:e&&e.list},xn=["video/mp4"],Dn=function(){function e(){return t(this,e),Sn(this,e,arguments)}return i(e,Ot),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,o=t.maxCount,i=t.fileSize,l=t.readonly,u=t.hidden,c=this.props,p=c.controls,f=void 0===p||p,d=c.autoplay,h=void 0!==d&&d,v=c.muted,y=void 0!==v&&v,g=c.pip,b=void 0!==g&&g,O=c.loop,w=void 0!==O&&O,j=c.preload,P=void 0===j?"auto":j,S=this.getItem(),k=S.itemProps,C=S.itemLayouts,x=this.getStyles(),D=x.styles,L=x.itemStyles;return a(m.Item,Pn(Pn(Pn({name:r,label:this.getLabel(),style:L,hidden:u,rules:u?[]:e,valuePropName:"list",getValueFromEvent:Cn},k),C),{},{children:a(Ln,{code:r,maxCount:o,fileSize:i,readonly:l,preview:n,controls:f,autoplay:h,muted:y,pip:b,loop:w,preload:P,style:D})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Ln=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=Sn(this,e,[].concat(o)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){if(!xn.includes(e.type))return R.error("上传文件类型,仅支持视频类型!"),D.LIST_IGNORE;var t=r.props.fileSize;if(t&&ke.parse(t)<e.size)return R.error("上传的文件大小,不能超过 ".concat(t,"!")),D.LIST_IGNORE;return!0})),l(r,"onStart",(function(){clearInterval(r.timer),r.setState({modal:{open:!0,progress:0}}),r.uploading=!0})),l(r,"onProgress",(function(e){if(r.uploading){clearInterval(r.timer);var t=Math.round(e.percent/2);if(r.setState({modal:{open:!0,progress:t}}),50===t){var n=t;r.timer=setInterval((function(){r.uploading?r.setState({modal:{open:!0,progress:++n}}):(clearInterval(r.timer),r.setState({modal:{open:!1,progress:0}})),99===n&&clearInterval(r.timer)}),1e3)}}})),l(r,"onSuccess",(function(e,t){clearInterval(r.timer);var n=e.data,o=n.id,i=n.url;t.status="done",t.response=e,t.id=o,t.url=i;var l=[].concat(ge(r.state.fileList),[t]);r.setState({fileList:l,modal:{open:!0,progress:100}},(function(){r.onChange(l),setTimeout((function(){r.setState({modal:{open:!1,progress:0}})}),500)})),r.uploading=!1})),l(r,"onError",(function(e,t,n){var o;clearInterval(r.timer);var i=[].concat(ge(r.state.fileList),[n]);n.status="error",n.response=null!==(o=null==t?void 0:t.message)&&void 0!==o?o:"上传失败",r.setState({fileList:i,modal:{open:!1,progress:100}},(function(){r.onChange(i)})),r.uploading=!1})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ue.file.listUrl;t&&(null==t?void 0:t.length)>0&&t[0]&&this.request(r,{ids:t}).then((function(t){var r=t.data.map((function(e){return Pn(Pn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){var t=e.id,r=e.status;return t&&"done"===r})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,o=n.code,i=n.preview,l=n.maxCount,c=n.readonly,p=n.style,f=n.controls,d=n.autoplay,h=n.muted,v=n.pip,y=n.loop,m=n.preload,g=l?Number(l):0;if(i)return a(qt,{code:o,fileList:t,controls:f,autoplay:d,muted:h,pip:v,loop:y,preload:m});var b={onStart:this.onStart,onSuccess:this.onSuccess,onProgress:this.onProgress,onError:this.onError};return u(s,{children:[a(D,Pn(Pn({listType:"picture-card",accept:xn.join(","),action:Ue.request.prefix+Ue.file.uploadUrl,fileList:t,maxCount:g,disabled:c,beforeUpload:this.onBeforeUpload,onRemove:this.onRemove},b),{},{children:!c&&Number(g)>t.length&&a(L,{type:"link",icon:a(Oe,{}),style:p})})),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}();function In(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?In(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):In(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rn(e,t,r){return t=o(t),n(e,En()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function En(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(En=function(){return!!e})()}var Bn=function(e){return Array.isArray(e)?e:e&&e.list},Tn=function(){function e(){return t(this,e),Rn(this,e,arguments)}return i(e,Ot),r(e,[{key:"render",value:function(){if(this.display()){var e=this.plusRules(),t=this.props,r=t.code,n=t.preview,o=t.maxCount,i=t.fileType,l=t.fileTypeMessage,u=t.fileSize,c=t.readonly,p=t.hidden,f=this.getItem(),d=f.itemProps,h=f.itemLayouts,v=this.getStyles(),y=v.styles,g=v.itemStyles;return a(m.Item,Vn(Vn(Vn({name:r,label:this.getLabel(),style:g,hidden:p,rules:p?[]:e,valuePropName:"list",getValueFromEvent:Bn},d),h),{},{children:a(Fn,{maxCount:o,fileType:i,fileTypeMessage:l,fileSize:u,readonly:c,preview:n,style:y})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Fn=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=Rn(this,e,[].concat(o)),l(r,"uploading",!1),l(r,"state",{fileList:[],modal:{open:!1,progress:0}}),l(r,"onBeforeUpload",(function(e){var t=r.props,n=t.fileSize,o=t.fileType,i=t.fileTypeMessage,l=null==o?void 0:o.replace(/\ +/g,"").split(",");if(!(l&&l.length>0))return R.error("文件类型不匹配!"),D.LIST_IGNORE;if(!l.includes(e.type))return R.error(i),D.LIST_IGNORE;if(n&&ke.parse(n)<e.size)return R.error("上传的文件大小,不能超过 ".concat(n,"!")),D.LIST_IGNORE;return!0})),l(r,"customRequest",(function(e){var t,n,o,i,l,a,s,u={blockSize:Ue.chunk.chunkSize,checkFile:(s=ie(le.mark((function e(t){var n,o,i;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileName,o=t.fileMd5,i=t.fileSize,e.next=3,r.request("post form "+Ue.chunk.checkFile,{fileName:n,fileMd5:o,fileSize:i});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)}),checkBlock:(a=ie(le.mark((function e(t){var n,o,i,l;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileName,o=t.fileMd5,i=t.blockMd5,l=t.blockIndex,e.next=3,r.request("post form "+Ue.chunk.checkChunk,{fileName:n,fileMd5:o,blockMd5:i,blockIndex:l});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)}),uploadBlock:(l=ie(le.mark((function e(t){var n,o,i,l,a,s;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileName,o=t.fileMd5,i=t.blockMd5,l=t.blockIndex,a=t.file,(s=new FormData).append("blockIndex",String(l)),s.append("blockMd5",i),s.append("fileName",n),s.append("fileMd5",o),s.append("file",a),e.next=9,r.request("post form "+Ue.chunk.chunkUpload,s);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)}),mergeBlock:(i=ie(le.mark((function e(t){var n,o,i;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileName,o=t.fileMd5,i=t.fileSize,e.next=3,r.request("post form "+Ue.chunk.doMerge,{fileName:n,fileMd5:o,fileSize:i});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),mergeProgress:(o=ie(le.mark((function e(){var t;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.request(Ue.chunk.mergeProgress);case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)}),verifyFile:(n=ie(le.mark((function e(t){var n,o,i;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileName,o=t.fileMd5,i=t.fileSize,e.next=3,r.request("post form "+Ue.chunk.onComplete,{fileName:n,fileMd5:o,fileSize:i});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)}),verifyProgress:(t=ie(le.mark((function e(){var t;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.request(Ue.chunk.completeProgress);case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},c=xe.create(u);c.progress((function(e,t){e.status="uploading",r.setState({modal:{open:!0,progress:t}})})),c.complete((function(e){var t=e.response,n=t.id,o=t.url;e.id=n,e.url=o,e.status="done";var i=[].concat(ge(r.state.fileList),[e]);r.setState({fileList:i,modal:{open:!1,progress:0}},(function(){r.onChange(i)}))})),c.error((function(e,t){e.status="error",e.response=t;var n=r.state.fileList,o=n.findIndex((function(t){return t.uid===e.uid}));-1===o?n.push(e):n[o]=e,r.setState({fileList:n,modal:{open:!1,progress:0}})})),c.start(e.file)})),l(r,"onRemove",(function(e){var t=r.state.fileList.filter((function(t){return t.id!==e.id}));r.setState({fileList:t},(function(){r.onChange(t)}))})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.list,r=Ue.file.listUrl;t&&t.length>0&&this.request(r,{ids:t}).then((function(t){var r=t.data.map((function(e){return Vn(Vn({},e),{},{status:"done"})}));e.setState({fileList:r},(function(){e.onChange(r)}))})).catch((function(e){console.warn("url",r,e)}))}},{key:"onChange",value:function(e){var t,r;null===(t=(r=this.props).onChange)||void 0===t||t.call(r,e.filter((function(e){return"done"===e.status})).map((function(e){return e.id})))}},{key:"render",value:function(){var e=this.state,t=e.fileList,r=e.modal,n=this.props,o=n.preview,i=n.maxCount,l=n.readonly,c=n.style,p=i?Number(i):0;return o?a(Ft,{fileList:t}):u(s,{children:[a(D,{action:Ue.request.prefix+Ue.file.uploadUrl,fileList:t,maxCount:p,disabled:l,beforeUpload:this.onBeforeUpload,customRequest:this.customRequest,onRemove:this.onRemove,children:a(L,{disabled:l||p<=t.length,icon:a(be,{}),style:c,children:"上传"})}),u(I,{open:r.open,closable:!1,footer:null,children:[a("div",{children:"上传文件进度"}),a(V,{percent:r.progress})]})]})}}])}(),Nn=["worksId","worksExtraId"];function An(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?An(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):An(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qn(e,t,r){return t=o(t),n(e,Un()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Un=function(){return!!e})()}var zn=function(){function e(){return t(this,e),qn(this,e,arguments)}return i(e,Ot),r(e,[{key:"getColumns",value:function(){var e,t=$(this.props.children,{tag:"Columns"});return t?null===(e=t.children)||void 0===e?void 0:e.map((function(e){var t;return Mn(Mn({},e),{},{rules:null===(t=e.rules)||void 0===t?void 0:t.map(Fe)})})):[]}},{key:"render",value:function(){if(this.display()){this.onComputeValue();var e=this.plusRules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.title,u=o.preview,c=o.readonly,p=o.hidden,f=this.getStyles(),d=f.styles,h=f.itemStyles;return a(m.Item,Mn(Mn(Mn({name:i,style:h,hidden:p,rules:p?[]:e,valuePropName:"list"},r),n),{},{children:a(_n,{preview:u||c,title:l,columns:this.getColumns(),style:d})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),_n=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=qn(this,e,[].concat(o)),l(r,"state",{dataSource:[],modal:{title:"",entity:void 0,show:!1}}),l(r,"onFinish",(function(e){var t=r.state.dataSource,n=[];e.id||e.uid?n=t.map((function(t){return e.id&&t.id===e.id||e.uid&&t.uid===e.uid?Mn(Mn({},t),e):t})):(e.index=t.length+1,e.uid=_(),n=[].concat(ge(t),[e])),r.setState({dataSource:n,modal:{title:"",entity:void 0,show:!1}},(function(){var e,t;null===(e=(t=r.props).onChange)||void 0===e||e.call(t,n)}))})),l(r,"onCancel",(function(){r.setState({modal:{title:"",entity:void 0,show:!1}})})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this.props,t=e.list,r=e.onChange;if(Array.isArray(t)){var n=t.map((function(e,t){return e.worksId,Mn({id:e.worksExtraId,index:t+1},ne(e,Nn))}));this.setState({dataSource:n},(function(){null==r||r(n)}))}}},{key:"getColumns",value:function(){var e=this,t=this.props,r=t.title,n=t.preview,o=t.columns,i=t.onChange,l=this.state.dataSource;return n?o:X(o,{title:"操作",dataIndex:"option",valueType:"option",render:function(t,n){return[u(g,{children:[a("a",{onClick:function(){e.setState({modal:{title:"修改".concat(r),entity:n,show:!0}})},children:"修改"},"modifly"),a("a",{onClick:function(){I.confirm({title:"警告",icon:a(je,{}),content:"请确认是否删除该项数据?",okText:"确认",cancelText:"取消",onOk:function(){var t=l.filter((function(e){var t=e.id,r=e.uid;return!(t&&n.id===t||r&&n.uid===r)}));e.setState({dataSource:t},(function(){null==i||i(t)}))}})},children:"删除"},"delete")]},"option")]}})}},{key:"render",value:function(){var e=this,t=this.props,r=t.title,n=t.preview,o=t.style,i=this.state,l=i.dataSource,s=i.modal,c=this.getColumns();return u(B,{title:r,bodyStyle:{padding:"0px 12px"},extra:n?null:a("a",{onClick:function(){e.setState({modal:{title:"新建".concat(r),entity:void 0,show:!0}})},children:"添加"},"new"),children:[a(T,{rowKey:"index",size:"small",style:o,columns:c,dataSource:l}),s.show&&a(Wn,{title:s.title,entity:s.entity,columns:c,onFinish:this.onFinish,onCancel:this.onCancel})]})}}])}(),Wn=function(t){var r,n=t.title,o=t.entity,i=t.columns,l=t.onFinish,s=t.onCancel,u=m.useForm(),c=e(u,1)[0];return a(I,{title:n,width:740,open:!0,destroyOnClose:!0,onCancel:s,onOk:(r=ie(le.mark((function e(){return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.validateFields().then((function(e){l(Mn(Mn({},o),e))})).catch((function(e){console.warn(e)}));case 2:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),children:a(m,{form:c,name:"modalTable",initialValues:o,wrapperCol:{span:22},autoComplete:"off",layout:"vertical",children:a(F,{children:i.length>0&&i.map((function(e){var t=e.title,r=e.dataIndex,n=e.placeholder,o=e.rules;if("index"!==r&&"option"!==r)return a(N,{span:12,children:a(m.Item,{label:t,name:r,rules:o,children:a(O,{placeholder:n})})},r)}))})})})},Hn=["id","index"];function Gn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Kn(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kn(e,t):void 0}}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(a)throw i}}}}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Jn(e,t,r){return t=o(t),n(e,Qn()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function Qn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qn=function(){return!!e})()}var Xn=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=Jn(this,e,[].concat(o)),l(r,"itemList",[]),l(r,"columnList",[]),l(r,"state",{doc:void 0,loading:!0}),l(r,"initItems",function(){var e=ie(le.mark((function e(t){var n,o,i,l,a,s,u,c,p,f,d,h,v,y,m,g,b,O,w,j;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.columnList=$(r.props.children,{tag:"Columns"}).children,n=r.columnList.map((function(e){return e.dataIndex})),o=Ee.selectors(t,"[code]"),i=$n(o),e.prev=4,i.s();case 6:if((l=i.n()).done){e.next=29;break}if(a=l.value,s=a.getAttribute("code"),u=a.getAttribute("title"),c=a.tagName.toLowerCase(),!s||!n.includes(s)){e.next=27;break}if(p={},f=a.getAttribute("remote"),!((d=Ee.selectors(a,"Option")).length>0)){e.next=20;break}h=$n(d);try{for(h.s();!(v=h.n()).done;)y=v.value,m=y.getAttribute("value"),g=y.textContent,m&&g&&(p[m]=g)}catch(e){h.e(e)}finally{h.f()}e.next=26;break;case 20:if(!f){e.next=26;break}return e.next=23,r.request(Ue.request.route+f);case 23:b=e.sent,O=$n(b);try{for(O.s();!(w=O.n()).done;)j=w.value,p[j.key]=j.label}catch(e){O.e(e)}finally{O.f()}case 26:r.itemList.push({code:s,title:u,type:c,data:p});case 27:e.next=6;break;case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(4),i.e(e.t0);case 34:return e.prev=34,i.f(),e.finish(34);case 37:r.setState({loading:!1});case 38:case"end":return e.stop()}}),e,null,[[4,31,34,37]])})));return function(t){return e.apply(this,arguments)}}()),r}return i(e,Ot),r(e,[{key:"componentDidMount",value:function(){var e=this,t=this.props.formId;this.setState({loading:!0}),this.request(Ue.form.documentUrl,{formId:t}).then((function(t){var r=Ee.toDocument(t);e.setState({doc:r}),e.initItems(r)}))}},{key:"render",value:function(){if(this.display()&&!this.state.loading){this.onComputeValue();var e=this.plusRules(),t=this.getItem(),r=t.itemProps,n=t.itemLayouts,o=this.props,i=o.code,l=o.title,u=o.witdh,c=o.preview,p=o.readonly,f=o.hidden,d=this.getStyles(),h=d.styles,v=d.itemStyles,y=this.state.doc;return a(m.Item,Yn(Yn(Yn({name:i,style:v,hidden:f,rules:f?[]:e,valuePropName:"list"},r),n),{},{children:a(Zn,{preview:c||p,title:l,witdh:u,columns:this.columnList,items:this.itemList,document:y,style:h})}))}return this.props.hideClear&&this.cleanFieldValue(),a(s,{})}}])}(),Zn=function(){function e(){var r;t(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=Jn(this,e,[].concat(o)),l(r,"state",{dataSource:[],modal:{title:"",entity:void 0,show:!1}}),l(r,"onFinish",(function(e){var t=r.state.dataSource,n=[];e.id?n=t.map((function(t){return t.id===e.id?Yn(Yn({},t),e):t})):(e.id=_(),e.index=t.length+1,n=[].concat(ge(t),[e])),r.onChange(n)})),l(r,"onCancel",(function(){r.setState({modal:{title:"",entity:void 0,show:!1}})})),r}return i(e,lt),r(e,[{key:"componentDidMount",value:function(){var e=this.props.list;if(Array.isArray(e)){var t=e.map((function(e,t){var r=Le({},(De(e),e));return Yn({id:_(),index:t+1},r)}));this.onChange(t)}}},{key:"onChange",value:function(e){var t=this;this.setState({dataSource:e,modal:{title:"",entity:void 0,show:!1}},(function(){var r,n;null===(r=(n=t.props).onChange)||void 0===r||r.call(n,e.map((function(e){return e.id,e.index,ne(e,Hn)})))}))}},{key:"getColumns",value:function(){var e=this,t=this.props,r=t.preview,n=t.title,o=t.columns,i=t.items,l=this.state.dataSource,s=o.map((function(e){var t=e.dataIndex,r=i.find((function(e){return e.code===t}));return r&&(e.title||(e.title=r.title),e.render=function(t){var n=t;return e.text?n=e.text:0!==Object.keys(r.data).length&&(n=r.data[t]),"url"===e.type?a("a",{href:t,target:"_blank",rel:"noreferrer",children:n}):n}),e}));return r?s:X(s,{title:"操作",dataIndex:"option",valueType:"option",render:function(t,r){return[u(g,{children:[a("a",{onClick:function(){e.setState({modal:{title:"修改".concat(n),entity:r,show:!0}})},children:"修改"},"modifly"),a("a",{onClick:function(){I.confirm({title:"警告",icon:a(je,{}),content:"请确认是否删除该项数据?",okText:"确认",cancelText:"取消",onOk:function(){var t=l.filter((function(e){var t=e.id;return!(t&&r.id===t)}));e.onChange(t)}})},children:"删除"},"delete")]},"option")]}})}},{key:"render",value:function(){var e=this,t=this.props,r=t.preview,n=t.title,o=t.witdh,i=t.document,l=t.style,s=this.state,c=s.dataSource,p=s.modal,f=this.getColumns();return u(B,{title:n,style:{padding:"0px 12px"},extra:r?null:a("a",{onClick:function(){e.setState({modal:{title:"新建".concat(n),entity:void 0,show:!0}})},children:"添加"},"new"),children:[a(T,{rowKey:"id",size:"small",style:l,columns:f,dataSource:c}),p.show&&a(eo,{title:p.title,witdh:o,entity:p.entity,document:i,onFinish:this.onFinish,onCancel:this.onCancel})]})}}])}(),eo=function(e){var t,r=e.title,n=e.witdh,o=void 0===n?"740":n,i=e.entity,l=e.document,s=e.onFinish,u=e.onCancel,c=d();return a(I,{title:r,width:Number(o),open:!0,destroyOnClose:!0,onCancel:u,onOk:(t=ie(le.mark((function e(){var t,r,n;return le.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,null===(t=c.current)||void 0===t?void 0:t.validateFields();case 3:n=null===(r=c.current)||void 0===r?void 0:r.getFieldsValue(),s(Yn(Yn({},i),n)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),function(){return t.apply(this,arguments)}),children:l&&a(go,{form:c,document:l,initialValues:i})})},to=Object.freeze({__proto__:null,Audio:On,Checkbox:gr,DatePicker:qr,Duration:Br,Editor:ir,FormList:Xn,Label:jt,Number:er,Photo:sn,Radio:Sr,Rate:dn,Select:pr,SuperUpload:Tn,Switch:Lr,Table:zn,Text:Gt,TextArea:Jt,TimePicker:Gr,Tooltip:St,Upload:Zr,Video:Dn}),ro=function(e){var t=e.children,r=e.gutter;return a(F,{gutter:Number(r),style:{margin:0},children:t})},no=function(e){var t=e.span,r=e.children;return a(N,{span:t,children:r})},oo=function(e){var t=e.direction,r=e.stepIndex,n=e.onChangeSetp,o=e.children,i=h((function(){return null==o?void 0:o.map((function(e){var t=e.id,r=e.attributes;return{key:t,title:r.title,description:r.description}}))}),[o]);return a(A,{current:r,direction:t,onChange:n,items:i,style:{padding:16,backgroundColor:"white"}})},io=M.Content,lo=v((function(e){var t=e.currentStepIndex,r=e.stepIndex,n=e.style,o=e.children,i=h((function(){var e=n?_e(n):{padding:16,backgroundColor:"white"};return t!==Number(r)&&Object.assign(e,{display:"none"}),e}),[t]);return a(io,{style:i,children:o})})),ao=function(e){var t=e.dashed,r=void 0!==t&&t,n=e.orientation,o=void 0===n?"center":n,i=e.children;return a(q,{dashed:r,orientation:o,style:{color:"#055ab5",fontWeight:"bold"},children:i})},so={display:"none"},uo={display:"block"},co=v((function(t){var r=t.defaultExpanded,n=void 0===r||r,o=t.on,i=t.off,l=t.style,c=t.collapse,p=t.children,f=y(n),d=e(f,2),h=d[0],v=d[1],m=_e(l);return c?u(s,{children:[a("div",{style:m,children:u(L,{type:"link",onClick:function(){v(!h)},children:[h?i:o,a(h?Pe:Se,{})," "]})}),a("div",{style:h?uo:so,children:p})]}):a(s,{children:p})}));function po(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?po(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):po(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ho(e,t,r){return t=o(t),n(e,vo()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function vo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vo=function(){return!!e})()}var yo=to,mo={Row:ro,Col:no,Collapse:co,Content:lo,Divider:ao,Steps:oo},go=function(){function n(e){var r,o,i;return t(this,n),i=ho(this,n,[e]),l(i,"state",{stepIndex:0,root:void 0,loading:!0}),l(i,"hideClear",!1),l(i,"onValuesChange",(function(e){i.setState({values:e})})),l(i,"onStepIndex",(function(e){i.setState({stepIndex:e})})),l(i,"children",(function(e){var t,r,n=null!==(t=null===(r=i.customComponents)||void 0===r?void 0:r[e.tag])&&void 0!==t?t:yo[e.tag];return n?i.component(e,n):mo[e.tag]?i.container(e):i.applet(e)})),i.styles=null!==(r=e.style)&&void 0!==r?r:{},i.form=null!==(o=e.form)&&void 0!==o?o:c.createRef(),i}return i(n,p),r(n,[{key:"componentDidMount",value:function(){var t,r,n=this,o=this.props.document,i=(t="string"==typeof o?Ee.getRoot(o):Ee.parser(o)).attributes,s=i.style,u=i.labelCol,c=i.wrapperCol,p=i.showTitle,f=i.hideClear;if(this.showTitle=!!p,this.hideClear=!!f,"string"==typeof s){var d=null==s?void 0:s.replace(/\ +/g,"").split(";");null==d||d.forEach((function(t){if(t){var r=t.split(":"),o=e(r,2),i=o[0],a=o[1];Object.assign(n.styles,l({},G(i),a))}}))}u&&c&&(this.layouts={labelCol:{span:u},wrapperCol:{span:c}}),Ue.components&&(this.customComponents=Z(Ue.components,(function(e){return function(t){return a(vt,fo({Component:e},t))}}))),this.setState({root:t,loading:!0}),"function"==typeof(r=function(e){n.setState({loading:e})})&&He.push(r),Je()}},{key:"componentWillUnmount",value:function(){var e;null===(e=this.form.current)||void 0===e||e.resetFields(),this.setState({root:void 0,loading:!0})}},{key:"setComponentStatus",value:function(e){var t=this.props,r=t.preview,n=t.hidden,o=t.readonly;if(e.preview=null!=r&&r,ee(n))e.hidden=n;else if(te(n))e.hidden=n.includes(e.code);else if(W(n))e.hidden=!!n[e.code];else{var i;e.hidden=null!==(i=e.hidden)&&void 0!==i&&i}if(ee(o))e.readonly=o;else if(te(o))e.readonly=o.includes(e.code);else if(W(o))e.readonly=!!o[e.code];else{var l;e.readonly=null!==(l=e.readonly)&&void 0!==l&&l}re(e.hideClear)&&(e.hideClear=this.hideClear)}},{key:"component",value:function(e,t){var r=e.id,n=e.attributes,o=e.children;return this.setComponentStatus(n),a(t,fo(fo({},n),{},{children:null==o?void 0:o.map(this.children)}),r)}},{key:"container",value:function(e){var t=e.id,r=e.tag,n=e.attributes,o=e.text,i=e.children;return"Row"===r?a(ro,fo(fo({},n),{},{children:null==i?void 0:i.map(this.children)}),t):"Col"===r?a(no,{span:Number(n.span),children:null==i?void 0:i.map(this.children)},t):"Collapse"===r?a(co,fo(fo({collapse:this.props.collapse},n),{},{children:null==i?void 0:i.map(this.children)}),t):"Content"===r?a(lo,fo(fo({currentStepIndex:this.state.stepIndex},n),{},{children:null==i?void 0:i.map(this.children)}),t):"Steps"===r?a(oo,fo(fo({stepIndex:this.state.stepIndex,onChangeSetp:this.onStepIndex},n),{},{children:i}),t):"Divider"===r?a(ao,fo(fo({},n),{},{children:o}),t):void 0}},{key:"applet",value:function(e){var t=this,r=e.tag,n=e.attributes,o=e.cdata,i=e.children;if("Columns"===r){var l=null==i?void 0:i.map((function(e){var r=e.attributes,n=e.children;if(n){var o,i=$(n.map(t.children),{tag:"Validates"});return fo(fo({},r),{},{rules:null!==(o=null==i?void 0:i.children)&&void 0!==o?o:[]})}return r}));return{tag:r,children:l}}return"Options"===r?{tag:r,children:null==i?void 0:i.map((function(e){return{key:e.attributes.value,label:e.text}}))}:"Validates"===r?{tag:r,children:null==i?void 0:i.map((function(e){return e.attributes}))}:"Conditions"===r?{tag:r,type:n.type,action:n.action,children:null==i?void 0:i.map((function(e){return e.attributes}))}:"Collection"===r||"Compute"===r?{tag:r,cdata:o}:void 0}},{key:"render",value:function(){var e,t=this.state,r=t.root,n=t.loading,o=this.props.initialValues;return u(s,{children:[r&&a(Ne.Provider,{value:fo(fo({},this.props),{},{form:this.form,showTitle:this.showTitle}),children:a(bo,fo(fo({form:this.form,style:n?fo(fo({},this.styles),{},{display:"none"}):this.styles,initialValues:o,onValuesChange:this.onValuesChange},this.layouts),{},{children:null===(e=r.children)||void 0===e?void 0:e.map(this.children)}))}),n&&a(U,{active:!0})]})}}])}(),bo=function(e){function n(){var e;t(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=ho(this,n,[].concat(o)),l(e,"onFinish",(function(e){console.log("Success:",e)})),e}return i(n,e),r(n,[{key:"render",value:function(){var e=this.props,t=e.form,r=e.style,n=e.labelCol,o=e.wrapperCol,i=e.initialValues,l=e.children,s=e.onValuesChange;return a(m,{ref:t,style:r,labelCol:n,wrapperCol:o,initialValues:i,onFinish:this.onFinish,autoComplete:"off",onValuesChange:function(e){s(e)},children:l})}}])}(c.PureComponent);export{Ne as DesignContext,ct as UIComponent,Ot as UIListComponent,go as default,ze as defineConfig};
|
|
2
2
|
//# sourceMappingURL=index.tsx.map
|