"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6387],{35748:function(F,u,e){var E=e(35361),a=e(56929),M=e(50959),c=e(20734),f=e(11527),p=["fieldProps","min","proFieldProps","max"],D=function(t,C){var g=t.fieldProps,A=t.min,P=t.proFieldProps,x=t.max,i=(0,a.Z)(t,p);return(0,f.jsx)(c.Z,(0,E.Z)({valueType:"digit",fieldProps:(0,E.Z)({min:A,max:x},g),ref:C,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:P},i))},l=M.forwardRef(D);u.Z=l},53271:function(F,u,e){e.r(u);var E=e(90228),a=e.n(E),M=e(87999),c=e.n(M),f=e(48305),p=e.n(f),D=e(50959),l=e(49547),R=e(35748),t=e(19014),C=e(50925),g=e(94675),A=e(2733),P=e(17885),x=e(66001),i=e.n(x),z=e(8776),n=e(11527),U=function(d){var W=(0,D.useState)(i().createEditorState("")),j=p()(W,2),v=j[0],O=j[1],B=C.Z.useForm(),L=p()(B,1),m=L[0],T=d.values;(0,D.useEffect)(function(){O(i().createEditorState(T.protocolContent?T.protocolContent:"")),m.resetFields(),m.setFieldsValue(T)},[m,d]);var K=function(){m.submit()},y=function(){d.onCancel()},S=function(){var _=c()(a()().mark(function r(o){var s;return a()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:s=JSON.parse(JSON.stringify(o)),s.protocolContent=v.toHTML(),d.onSubmit(s);case 3:case"end":return h.stop()}},r)}));return function(o){return _.apply(this,arguments)}}(),G=["undo","redo","separator","font-size","line-height","letter-spacing","separator","text-color","bold","italic","underline","strike-through","separator","superscript","subscript","remove-styles","emoji","separator","text-indent","text-align","separator","headings","list-ul","list-ol","blockquote","code","separator","link","separator","hr","separator","clear"],Z=function(){var _=c()(a()().mark(function r(o){var s,b;return a()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:s=[".mp4",".mkv",".avi",".mov",".wmv",".flv",".webm",".m4v",".3gp",".3g2"],b=o.toLowerCase(),s.some(function($){return b.endsWith($)})?O(P.ContentUtils.insertMedias(v,[{type:"VIDEO",url:o}])):O(P.ContentUtils.insertMedias(v,[{type:"IMAGE",url:o}]));case 3:case"end":return I.stop()}},r)}));return function(o){return _.apply(this,arguments)}}(),N=["separator",{key:"FilesManagerImage",title:"\u4E0A\u4F20\u56FE\u7247/\u89C6\u9891",html:null,text:(0,n.jsx)(A.Z,{fileType:"image",mode:"",imagesShow:!1,onChange:Z,count:1}),onClick:function(){console.log("Hello World!")}}];return(0,n.jsx)(g.Z,{width:1200,title:"\u534F\u8BAE\u5185\u5BB9",open:d.open,forceRender:!0,destroyOnClose:!0,onOk:K,onCancel:y,children:(0,n.jsxs)(l.A,{form:m,submitter:!1,layout:"horizontal",onFinish:S,children:[(0,n.jsx)(R.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,n.jsx)(t.Z,{width:300,name:"protocolName",label:"\u534F\u8BAE\u540D\u79F0",placeholder:"\u534F\u8BAE\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]}),(0,n.jsx)(l.A.Group,{children:(0,n.jsx)(l.A.Item,{name:"protocolContent",children:(0,n.jsx)("div",{className:"border-solid border-2 border-indigo-600",children:(0,n.jsx)(i(),{value:v,controls:G,extendControls:N,onChange:function(r){O(r)}})})})})]})})};u.default=U}}]);
