(this["webpackJsonpocpp-cs"]=this["webpackJsonpocpp-cs"]||[]).push([[17],{1345:function(e,t,n){"use strict";n.r(t);var a=n(9),r=n(27),o=n(22),c=n(21),i=n(29),s=n(30),l=n(0),u=n.n(l),p=n(210),d=n(53),f=n(769),b=n(800),h=n(868),v=n(1310),m=n(111),j=n(756),O=n(784),g=n(780),y=n(3),x=n(144),S=n(783),w=n(319),E=n(770),k=n(771),C=n(773),P=n(787),N=n(924),M=n(2),T=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(o.a)(this,n),(a=t.call(this,e)).m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"admin.reference.";return a.props.intl.formatMessage({id:t+e})},a.onMethodFinish=function(){a.setState({tableUuid:Object(f.a)()}),a.props.onMethodFinish&&a.props.onMethodFinish()},a.editModalToggle=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.setState((function(t){return{editModalVisible:!t.editModalVisible,editModalId:e}}))},a.editModalFinish=function(){a.editModalToggle(),a.onMethodFinish()},a.setColumns=function(){a.setState({columns:[{text:!0,title:Object(M.jsxs)(M.Fragment,{children:[Object(M.jsx)(x.a,{className:"gx-mr-4",onClick:function(e){e.stopPropagation(),a.editModalToggle()},icon:Object(M.jsx)(S.a,{})}),a.m("name")]}),dataIndex:"name",sorter:!0,render:function(e,t){return Object(M.jsxs)(M.Fragment,{children:[Object(M.jsx)("div",{children:Object(M.jsx)("div",{className:"gx-pointer gx-text-primary",onClick:function(){return a.editModalToggle(t.id)},children:Object(M.jsx)(M.Fragment,{children:e})})}),t.description&&Object(M.jsx)("div",{className:"gx-font-weight-light gx-text-muted",children:t.description})]})},filterDropdown:function(e){return Object(M.jsx)(k.a,Object(y.a)({},e))},filterIcon:function(e){return Object(M.jsx)(w.a,{style:{color:e?"#1890ff":void 0}})}},{title:a.m("typename"),dataIndex:"typename",sorter:!0,width:"25%",render:function(e,t){return Object(M.jsx)(M.Fragment,{children:Object(M.jsx)("div",{children:e})})}},{title:a.m("statename"),dataIndex:"statename",sorter:!0,width:"10%",render:function(e,t){return Object(M.jsx)("div",{className:"gx-text-right",children:Object(M.jsx)(C.a,Object(y.a)({onFinish:a.onMethodFinish},t))})}}]})},a.state={tableUuid:Object(f.a)(),columns:[],editModalVisible:!1,editModalId:null},a}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.setColumns()}},{key:"componentDidUpdate",value:function(e){e.intl.locale!==this.props.intl.locale&&this.setColumns()}},{key:"render",value:function(){var e=this.props.reference;if(!e.code)return null;var t="/"+e.code+"/list";return Object(M.jsxs)(M.Fragment,{children:[Object(M.jsx)(P.a,{essence:e.code,onClose:this.editModalToggle,form:N.a.call(this,{essence:e.code}),onFinish:this.editModalFinish,visible:this.state.editModalVisible,id:this.state.editModalId}),Object(M.jsx)(E.a,{uuid:this.state.tableUuid,columns:this.state.columns,path:t})]})}}]),n}(u.a.Component);T.contextType=m.a;var D=Object(p.c)(T),I=h.a.Text,R=window.appConfig||{},F=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){var c;return Object(o.a)(this,n),(c=t.call(this,e)).pendingStart=function(){c.setState({pending:!0})},c.pendingEnd=function(){c.setState({pending:!1})},c.setParams=function(){var e=c.props.match.params.param1;c.setState({refId:e,treeKey:Object(f.a)()})},c.load=Object(r.a)(Object(a.a)().mark((function e(){var t,n;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.pendingStart(),t=[{field:"code",valarr:Object.keys(R.adminReferences)||[]}],c.state.treeSearch&&t.push({field:"label",compare:"IKE",value:"%".concat(c.state.treeSearch,"%")}),e.next=5,c.context.api.q("/workflow/class/list",{search:t},{toTree:!0});case 5:n=e.sent,c.setState({tree:n||[],treeKey:Object(f.a)()}),c.pendingEnd();case 8:case"end":return e.stop()}}),e)}))),c.getItem=function(){var e=c.state,t=e.refId;return e.tree.find((function(e){return e.id===t}))||{}},c.onTreeSelect=function(e){Array.isArray(e)&&e[0]&&c.props.history.push("/admin/reference/".concat(e[0]))},c.onTreeSearch=function(e){c.setState({treeSearch:e},(function(){return c.load()}))},c.m=function(e){return c.props.intl.formatMessage({id:"admin.reference."+e})},c.state={treeSearch:"",treeKey:Object(f.a)(),tree:[]},c}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.setParams(),this.load()}},{key:"componentDidUpdate",value:function(e){Object(O.a)(e,this.props)&&this.setParams(),e.intl.locale!==this.props.intl.locale&&this.load()}},{key:"render",value:function(){var e=this.state,t=e.pending,n=e.treeKey,a=e.refId,r=(this.props.intl,this.getItem());return Object(M.jsxs)(M.Fragment,{children:[Object(M.jsx)(g.a,{title:this.m("reference"),url:"/admin/reference",icon:Object(M.jsx)(j.a,{})}),Object(M.jsxs)(b.a,{pending:t,onSearch:this.onTreeSearch,children:[Object(M.jsx)("div",{children:r.id&&Object(M.jsx)(M.Fragment,{children:Object(M.jsx)(I,{type:"secondary",children:r.label})})}),Object(M.jsx)("div",{className:"isoNoteBtns"}),Object(M.jsx)(v.a,{defaultExpandAll:!0,defaultExpandParent:!0,defaultSelectedKeys:[a],defaultExpandedKeys:[a],treeData:this.state.tree,onSelect:this.onTreeSelect},n),Object(M.jsx)("div",{children:a&&Object(M.jsx)(D,{reference:r},null===r||void 0===r?void 0:r.id)})]})]})}}]),n}(u.a.Component);F.contextType=m.a;t.default=Object(d.i)(Object(p.c)(F))},769:function(e,t,n){"use strict";function a(){return"f".concat((+new Date).toString(16)).concat((e=1e3,t=9999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e));var e,t}n.d(t,"a",(function(){return a}))},770:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(9),r=n(27),o=n(22),c=n(21),i=n(29),s=n(30),l=n(0),u=n.n(l),p=n(111),d=n(1331),f=n(2),b=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){var c;return Object(o.a)(this,n),(c=t.call(this,e)).makeBasicDefaultOrderParams=function(){var e=[];return c.props.columns&&c.props.columns.forEach((function(t){t.defaultSortOrder&&e.push("".concat(t.dataIndex," ").concat("ascend"===t.defaultSortOrder?"ASC":"DESC"))})),e},c.makeQueryParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=c.state,a=n.pagination,r=n.filters,o=n.sorter;return t.search=[],Object.keys(r).forEach((function(e){if(r[e]){var n=c.columnGet(e);if(n.date)return r[e][0]&&t.search.push({field:e,compare:"GEQ",value:r[e][0].startOf("day")}),void(r[e][1]&&t.search.push({field:e,compare:"LEQ",value:r[e][1].endOf("day")}));if(n.text)return void(r[e][0]&&t.search.push({field:e,compare:"IKE",value:"%".concat(r[e][0],"%")}));t.search.push({field:e,valarr:r[e]})}})),c.props.forceSearch&&(t.search=t.search.concat(c.props.forceSearch)),c.props.forceFilter&&(t.filter=c.props.forceFilter),o.column?t.orderby=["".concat(o.field," ").concat("ascend"===o.order?"ASC":"DESC")]:o.field||(t.orderby=c.makeBasicDefaultOrderParams()),a.total&&!e.skipPagination&&(t.reclimit=a.pageSize,t.recoffset=(a.current-1)*a.pageSize),t},c.columnGet=function(e){var t={};return c.state.columns.forEach((function(n){n.dataIndex===e&&(t=n)})),t},c.count=Object(r.a)(Object(a.a)().mark((function e(){var t;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==c.state.columns.length){e.next=2;break}return e.abrupt("return",0);case 2:return e.next=4,c.context.api.q(c.props.path.replace("/list","/count"),c.makeQueryParams({skipPagination:!0}),{},c.props.forceToken||!1,c.props.skipToken||!1);case 4:return t=e.sent,e.abrupt("return",t.count);case 6:case"end":return e.stop()}}),e)}))),c.load=Object(r.a)(Object(a.a)().mark((function e(){var t,n,r;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.state,n=t.pagination,0!==t.columns.length){e.next=3;break}return e.abrupt("return");case 3:return r=[],c.loadStart(),e.next=7,c.count();case 7:if(n.total=e.sent,!n.total){e.next=12;break}return e.next=11,c.context.api.q(c.props.path,c.makeQueryParams(),{toArray:!0},c.props.forceToken||!1,c.props.skipToken||!1);case 11:r=e.sent;case 12:c.setState({data:r,pagination:n}),c.loadEnd();case 14:case"end":return e.stop()}}),e)}))),c.loadStart=function(){c.setState({loading:!0}),c.props.onLoadStart&&c.props.onLoadStart()},c.loadEnd=function(){c.setState({loading:!1}),c.props.onLoadEnd&&c.props.onLoadEnd()},c.handleTableChange=function(e,t,n){c.setState({pagination:e,filters:t,sorter:n},(function(){return c.load()}))},c.state={columns:e.columns,data:[],loading:!1,pagination:{current:1,pageSize:e.pageSize||10,total:!1},filters:{},sorter:{}},c}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.load()}},{key:"componentDidUpdate",value:function(e){var t=this;this.props.columns!==this.state.columns&&this.setState({columns:this.props.columns},(function(){return t.load()})),this.props.uuid!==e.uuid&&this.load(),this.props.forceSearch!==e.forceSearch&&this.load()}},{key:"render",value:function(){var e=this.state,t=e.columns,n=e.data,a=e.pagination,r=e.loading;return Object(f.jsx)("div",{children:Object(f.jsx)(d.a,{scroll:{x:400},showSorterTooltip:!1,columns:t,rowKey:function(e){return e.id},dataSource:n,pagination:a,loading:r||this.props.loading,onChange:this.handleTableChange})})}}]),n}(u.a.Component);b.contextType=p.a},771:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(0);var a=n(871),r=n(739),o=n(144),c=n(420),i=n(143),s=n(2);function l(e){var t=e.setSelectedKeys,n=e.selectedKeys,l=e.confirm,u=e.clearFilters;var p=Object(c.a)();return Object(s.jsx)("div",{style:{padding:8},children:Object(s.jsxs)(a.b,{children:[Object(s.jsx)(r.a,{placeholder:p.formatMessage({id:"DataTableSearch.placeholder"}),value:n[0]||"",onChange:function(e){t([e.target.value])},onKeyPress:function(e){"Enter"===e.key&&l()}}),Object(s.jsx)("div",{style:{paddingTop:12},children:Object(s.jsx)(o.a,{type:"primary",onClick:function(){return l()},children:Object(s.jsx)(i.a,{id:"DataTableSearch.search"})})}),Object(s.jsx)("div",{style:{paddingTop:12},children:Object(s.jsx)(o.a,{onClick:function(){return u()},children:Object(s.jsx)(i.a,{id:"DataTableSearch.reset"})})})]})})}},773:function(e,t,n){"use strict";var a=n(9),r=n(27),o=n(22),c=n(21),i=n(29),s=n(30),l=n(744),u=n(447),p=n(776),d=n(310),f=n(834),b=n(210),h=n(0),v=n.n(h),m=n(111),j=n(158),O=n(775),g=n(2),y=l.a.confirm,x=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){var c;return Object(o.a)(this,n),(c=t.call(this,e)).popoverToggle=function(){c.setState((function(e){return{popoverOpen:!e.popoverOpen,methods:e.popoverOpen?e.methods:[]}}),(function(){return c.load()}))},c.pendingStart=function(){c.props.onPendingStart?c.props.onPendingStart():c.setState({pending:!0})},c.pendingEnd=function(){c.props.onPendingEnd?c.props.onPendingEnd():c.setState({pending:!1})},c.load=Object(r.a)(Object(a.a)().mark((function e(){var t;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c.state.popoverOpen){e.next=6;break}return c.pendingStart(),e.next=4,c.context.api.q("/".concat(c.props.classcode,"/method"),{id:c.props.id},{toArray:!0});case 4:t=e.sent,c.setState({methods:t},(function(){return c.pendingEnd()}));case 6:case"end":return e.stop()}}),e)}))),c.run=function(){var e=Object(r.a)(Object(a.a)().mark((function e(t){var n;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.pendingStart(),e.next=3,c.context.api.q("/method/run",{id:c.props.id,method:t.id});case 3:n=e.sent,c.pendingEnd(),c.popoverToggle(),n?(u.b.success(c.m("method.success")),c.props.onFinish&&c.props.onFinish(t)):(u.b.error(c.m("method.fail")),c.setState({pending:!1}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c.ask=function(){var e=Object(r.a)(Object(a.a)().mark((function e(t){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"drop"===t.actioncode?y({title:c.m("method.confirm.title"),content:c.m("method.confirm.text"),icon:Object(g.jsx)(j.a,{}),onOk:function(){c.run(t)}}):c.run(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c.m=function(e){return c.props.intl.formatMessage({id:e})},c.state={popoverOpen:!1,methods:[]},c}return Object(c.a)(n,[{key:"render",value:function(){var e,t=this;if(null===(e=this.props)||void 0===e||!e.statelabel)return null;var n=this.state,a=n.pending,r=n.methods,o=void 0===r?[]:r,c=Object(g.jsx)(p.a,{className:"gx-m-0",color:{created:"processing",enabled:"success",disabled:"default",deleted:"error"}[this.props.statetypecode],children:this.props.statelabel});return this.props.readOnly?c:Object(g.jsx)(d.a,{content:Object(g.jsx)("div",{className:"".concat(0===o.length&&"gx-p-3"),children:Object(g.jsx)(f.a,{spinning:a,children:o.map((function(e){return e.visible?Object(g.jsx)("div",{onClick:function(){return t.ask(e)},className:"gx-my-2 gx-pointer gx-link",children:e.label},e.id):null}))})}),trigger:"click",visible:this.state.popoverOpen,onVisibleChange:this.popoverToggle,children:Object(g.jsx)("div",{className:"gx-pointer",children:c})})}}]),n}(v.a.Component);x.contextType=m.a;t.a=Object(O.b)(Object(b.c)(x),{statelabel:function(e){return e.statenewlabel},statetypecode:function(e){return e.statenewtypecode}})},775:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return v}));var a=n(3),r=n(22),o=n(21),c=n(29),i=n(30),s=n(9),l=n(27),u=n(0),p=n.n(u),d=n(46),f=n(163),b=n(2),h={is:!1,tick:function(){h.fetch()},goOffline:function(){h.is&&(h.is=!1,h.dispatch("onlineGoOffline"),h.log("Went offline"))},goOnline:function(){h.is||(h.is=!0,h.dispatch("onlineGoOnline"),h.log("Back On Line"))},dispatch:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.dispatchEvent(new CustomEvent(e,{detail:t}))},fetch:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(Object(l.a)(Object(s.a)().mark((function e(){var t,n,a,r,o,c,i,l,u,p,b,v;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=f.a.get())){e.next=30;break}return(n=new Date).setMilliseconds(n.getMilliseconds()-(d.a.apiCheckInterval+5e3)),a=JSON.stringify({search:[{field:"datetime",value:n,compare:"GEQ"}],reclimit:500,orderby:["datetime DESC"]}),r=null,o=null,(c=new Headers).append("Content-Type","application/json"),c.append("Authorization","Bearer ".concat(t)),i="".concat(d.a.apiDomain).concat(d.a.apiPath,"/notification/list"),e.prev=11,e.next=14,fetch(i,{method:"POST",headers:c,body:a,mode:"cors",cache:"no-store"});case 14:if(!(o=e.sent)){e.next=21;break}return e.next=18,o.json();case 18:if(r=e.sent,null===(l=r)||void 0===l||!l.error){e.next=21;break}return e.abrupt("return",h.error(null===(u=r)||void 0===u||null===(p=u.error)||void 0===p?void 0:p.message));case 21:h.goOnline(),e.next=28;break;case 24:return e.prev=24,e.t0=e.catch(11),h.goOffline(),e.abrupt("return",h.error(e.t0.message));case 28:return r&&(b={},(Array.isArray(r)?r:[r]).forEach((function(e){b[e.object]||(b[e.object]=e)})),(v=Object.keys(b).length)>0&&(h.dispatch("onlineChanged",{items:b}),h.log("messages count "+v))),e.abrupt("return",!1);case 30:case"end":return e.stop()}}),e,null,[[11,24]])})))),error:function(e){return d.a.debug&&console.log('%c OnLine: ERROR "'.concat(e,'"'),"color: orange"),!1},log:function(e){d.a.debug&&console.log("%c OnLine: ".concat(e),"color: cyan")}};function v(e,t){var n=Object.keys(t);return function(s){Object(c.a)(u,s);var l=Object(i.a)(u);function u(e){var a;return Object(r.a)(this,u),(a=l.call(this,e)).onOnlineChanged=function(e){var r,o=null===e||void 0===e||null===(r=e.detail)||void 0===r?void 0:r.items[a.props.id];o&&(a.setState((function(e){var a=e.passProps;return n.forEach((function(e){a[e]=t[e](o)})),{passProps:a}})),a.setState({data:o}))},a.state={data:{},passProps:{}},a}return Object(o.a)(u,[{key:"componentDidMount",value:function(){window.addEventListener("onlineChanged",this.onOnlineChanged)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("onlineChanged",this.onOnlineChanged)}},{key:"componentDidUpdate",value:function(e){var t=this,a=this.state.passProps,r=!1;n.forEach((function(n){e[n]!==t.props[n]&&(a[n]=t.props[n],r=!0)})),r&&this.setState({passProps:a})}},{key:"render",value:function(){var t=this.state.passProps;return Object(b.jsx)(e,Object(a.a)(Object(a.a)({},this.props),t))}}]),u}(p.a.Component)}!window.onlineInterval&&d.a.apiCheckInterval&&window.setInterval((function(){return h.tick()}),d.a.apiCheckInterval)},776:function(e,t,n){"use strict";var a=n(6),r=n(5),o=n(7),c=n(127),i=n(8),s=n.n(i),l=n(55),u=n(0),p=n(101),d=n(304),f=n(306),b=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},h=function(e){var t,n=e.prefixCls,o=e.className,c=e.checked,i=e.onChange,l=e.onClick,d=b(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,u.useContext(p.b).getPrefixCls)("tag",n),h=s()(f,(t={},Object(a.a)(t,"".concat(f,"-checkable"),!0),Object(a.a)(t,"".concat(f,"-checkable-checked"),c),t),o);return u.createElement("span",Object(r.a)({},d,{className:h,onClick:function(e){null===i||void 0===i||i(!c),null===l||void 0===l||l(e)}}))},v=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},m=new RegExp("^(".concat(d.a.join("|"),")(-inverse)?$")),j=new RegExp("^(".concat(d.b.join("|"),")$")),O=function(e,t){var n,i=e.prefixCls,d=e.className,b=e.style,h=e.children,O=e.icon,g=e.color,y=e.onClose,x=e.closeIcon,S=e.closable,w=void 0!==S&&S,E=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),k=u.useContext(p.b),C=k.getPrefixCls,P=k.direction,N=u.useState(!0),M=Object(o.a)(N,2),T=M[0],D=M[1];u.useEffect((function(){"visible"in E&&D(E.visible)}),[E.visible]);var I=function(){return!!g&&(m.test(g)||j.test(g))},R=Object(r.a)({backgroundColor:g&&!I()?g:void 0},b),F=I(),K=C("tag",i),L=s()(K,(n={},Object(a.a)(n,"".concat(K,"-").concat(g),F),Object(a.a)(n,"".concat(K,"-has-color"),g&&!F),Object(a.a)(n,"".concat(K,"-hidden"),!T),Object(a.a)(n,"".concat(K,"-rtl"),"rtl"===P),n),d),H=function(e){e.stopPropagation(),null===y||void 0===y||y(e),e.defaultPrevented||"visible"in E||D(!1)},z="onClick"in E||h&&"a"===h.type,q=Object(l.a)(E,["visible"]),A=O||null,V=A?u.createElement(u.Fragment,null,A,u.createElement("span",null,h)):h,U=u.createElement("span",Object(r.a)({},q,{ref:t,className:L,style:R}),V,w?x?u.createElement("span",{className:"".concat(K,"-close-icon"),onClick:H},x):u.createElement(c.a,{className:"".concat(K,"-close-icon"),onClick:H}):null);return z?u.createElement(f.a,null,U):U},g=u.forwardRef(O);g.CheckableTag=h;t.a=g},778:function(e,t,n){"use strict";var a=n(9),r=n(27),o=n(22),c=n(21),i=n(29),s=n(30),l=n(0),u=n.n(l),p=n(210),d=n(873),f=n(111),b=n(2),h=d.a.Option,v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){var c;return Object(o.a)(this,n),(c=t.call(this,e)).createSearch=function(){var e=c.props.search||[];return c.state.searchText&&c.props.async&&e.push({field:c.props.labelKey||"label",compare:"IKE",value:"%".concat(c.state.searchText,"%")}),c.props.enabledOnly&&e.push({field:"statetypecode",compare:"EQL",value:"enabled"}),e},c.getLabelKey=function(){return c.props.labelKey||"label"},c.getIdKey=function(){return c.props.valueKey||"id"},c.shureHaveValue=Object(r.a)(Object(a.a)().mark((function e(){var t;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c.props.async){e.next=8;break}if(c.state.items.find((function(e){return e[c.getIdKey()]===c.props.value}))){e.next=8;break}return c.setState({pending:!0}),e.next=5,c.context.api.q("/object/get",{id:c.props.value,fields:[c.getIdKey(),c.getLabelKey()]});case 5:t=e.sent,c.setState({pending:!1}),null!==t&&void 0!==t&&t[c.getLabelKey()]&&c.setState((function(e){var n=e.items;return n.push(t),{items:n}}));case 8:case"end":return e.stop()}}),e)}))),c.load=Object(r.a)(Object(a.a)().mark((function e(){var t,n,r,o,i;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c.props.items){e.next=3;break}return c.setState({items:c.props.items}),e.abrupt("return");case 3:if(t=[],n=c.props.async?1:0,!c.props.query){e.next=14;break}return c.setState({pending:!0}),r=c.createSearch(),o=[c.getIdKey(),c.getLabelKey()].concat(c.props.extraFields||[]),i=c.props.cache?c.context.api.cache:c.context.api.q,e.next=12,i(c.props.query,{search:r,reclimit:n,fields:o},{toArray:!0});case 12:t=e.sent,c.setState({pending:!1,items:t});case 14:case"end":return e.stop()}}),e)}))),c.onSearch=function(){var e=Object(r.a)(Object(a.a)().mark((function e(t){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.props.async&&c.setState({searchText:t},(function(){return c.load()}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c.onChange=function(e){var t=c.state.items.find((function(t){return t[c.getIdKey()]===e}));c.props.onChange(e,t)},c.state={searchText:"",pending:!1,items:[]},c}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.load().then(this.shureHaveValue())}},{key:"componentDidUpdate",value:function(e){e.value!==this.props.value&&this.shureHaveValue()}},{key:"render",value:function(){var e=this,t=this.state.items.map((function(t,n){var a=t||{},r=a[e.getIdKey()],o=e.props.formatLabel?e.props.formatLabel(t):a[e.getLabelKey()];return r===e.props.value&&!0,Object(b.jsx)(h,{value:r,children:o},n)}));return Object(b.jsx)(d.a,{defaultActiveFirstOption:!1,allowClear:this.props.allowClear,loading:!!this.state.pending,value:this.state.pending?null:this.props.value,showSearch:!0,placeholder:this.props.placeholder,optionFilterProp:"children",onChange:this.onChange,onSearch:this.onSearch,filterOption:function(e,t){return t.children.toLowerCase().indexOf(e.toLowerCase())>=0},children:t})}}]),n}(u.a.Component);v.contextType=f.a,t.a=Object(p.c)(v)},780:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(871),r=(n(0),n(112)),o=n(32),c=n(2);function i(e){return Object(c.jsxs)(c.Fragment,{children:[Object(c.jsx)(r.a,{children:Object(c.jsx)("title",{children:e.title})}),Object(c.jsx)("h2",{className:"title gx-mb-4",children:Object(c.jsx)(o.a,{to:e.url,className:"gx-text-dark",children:Object(c.jsxs)(a.b,{children:[e.icon,e.title]})})})]})}},783:function(e,t,n){"use strict";var a=n(3),r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},c=n(13),i=function(e,t){return r.createElement(c.a,Object(a.a)(Object(a.a)({},e),{},{ref:t,icon:o}))};i.displayName="PlusOutlined";t.a=r.forwardRef(i)},784:function(e,t,n){"use strict";function a(e,t){var n=e.match.params||{},a=t.match.params||{};return n.param1!==a.param1||n.param2!==a.param2||n.param3!==a.param3}n.d(t,"a",(function(){return a}))},787:function(e,t,n){"use strict";var a=n(9),r=n(27),o=n(22),c=n(21),i=n(29),s=n(30),l=n(0),u=n.n(l),p=n(447),d=n(744),f=n(834),b=n(870),h=n(742),v=n(144),m=n(111),j=n(210),O=n(2),g=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){var c;return Object(o.a)(this,n),(c=t.call(this,e)).pendingStart=function(){c.props.onPendingStart?c.props.onPendingStart():c.setState({loadPending:!0})},c.pendingEnd=function(){c.props.onPendingEnd?c.props.onPendingEnd():c.setState({loadPending:!1})},c.load=Object(r.a)(Object(a.a)().mark((function e(){var t,n,r;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c.props.id){e.next=10;break}return c.pendingStart(),t=c.props.queryParams||{id:c.props.id},n=c.props.loadPath||"/".concat(c.props.essence,"/get"),e.next=6,c.context.api.q(n,t,{exact:!0});case 6:r=e.sent,c.setState({initialValues:r||{}},(function(){return c.pendingEnd()})),e.next=11;break;case 10:c.setState({initialValues:{}});case 11:case"end":return e.stop()}}),e)}))),c.save=function(){var e=Object(r.a)(Object(a.a)().mark((function e(t){var n,r,o;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.state.initialValues,r=c.props.prepareData?c.props.prepareData({data:t,item:n}):t,o=c.props.savePath||"/".concat(c.props.essence,"/set"),r.id=n.id||null,c.setState({savePending:!0}),console.log("@@@",o,r),e.next=8,c.context.api.q(o,r);case 8:e.sent?(p.b.success(c.m("save.success","")),c.props.onFinish&&c.props.onFinish()):(p.b.error(c.m("save.fail","")),c.setState({pending:!1})),c.setState({savePending:!1});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c.onClose=function(){c.props.onClose&&c.props.onClose()},c.m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editmodal.";return c.props.intl.formatMessage({id:t+e})},c.state={loadPending:!1,savePending:!1,initialValues:{}},c}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.load()}},{key:"componentDidUpdate",value:function(e){e.id!==this.props.id&&this.load()}},{key:"render",value:function(){var e=this.props,t=e.visible,n=e.essence,a=e.id,r=this.state,o=r.loadPending,c=r.savePending,i=r.initialValues;return Object(O.jsx)(d.a,{visible:t,footer:null,onCancel:this.onClose,children:Object(O.jsx)(f.a,{spinning:o,children:o||!a||i.id?Object(O.jsx)("div",{className:"gx-p-3",children:Object(O.jsxs)(h.a,{name:n,layout:"vertical",initialValues:i,onFinish:this.save,scrollToFirstError:!0,children:[this.props.form,Object(O.jsx)(v.a,{loading:c,type:"primary",htmlType:"submit",className:"gx-mb-0",children:this.m("save","")})]},i.id)}):Object(O.jsx)(b.a,{})})})}}]),n}(u.a.Component);g.contextType=m.a,t.a=Object(j.c)(g)},792:function(e,t,n){"use strict";var a=n(22),r=n(21),o=n(29),c=n(30),i=n(0),s=n.n(i),l=n(739),u=n(210),p=n(2),d=null,f=function(e){Object(o.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).searchHandle=function(e){r.setState({searchValue:e}),r.state.searchDelay||!r.props.onSearch?(r.setState({searchPending:!0}),window.clearTimeout(d),d=window.setTimeout((function(){r.setState({searchPending:!1}),r.props.onSearch&&r.props.onSearch(e)}),r.state.searchDelay)):r.props.onSearch(e)},r.searchOnChange=function(e){r.searchHandle(e.target.value)},r.state={searchValue:e.defaultValue||"",searchPending:!1,searchDelay:e.hasOwnProperty("searchDelay")?e.searchDelay:1e3},r}return Object(r.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.intl,a=t.className,r=this.state,o=r.searchValue,c=r.searchPending,i=this.props.placeholder||n.formatMessage({id:"search.placeholder"});return Object(p.jsx)(l.a.Search,{placeholder:i,className:a,value:o,onChange:this.searchOnChange,onSearch:function(){return e.searchHandle(o)},loading:c})}}]),n}(s.a.Component);t.a=Object(u.c)(f)},795:function(e,t,n){"use strict";var a=n(3),r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},c=n(13),i=function(e,t){return r.createElement(c.a,Object(a.a)(Object(a.a)({},e),{},{ref:t,icon:o}))};i.displayName="CopyOutlined";t.a=r.forwardRef(i)},800:function(e,t,n){"use strict";var a=n(7),r=n(22),o=n(21),c=n(29),i=n(30),s=n(0),l=n.n(s),u=n(143),p=n(309),d=n(2),f=function(e){var t=e.id,n=e.style,a=e.children,r=e.className;return Object(d.jsx)(p.Scrollbars,{id:t,className:r,style:n,autoHide:!0,autoHideTimeout:1e3,autoHideDuration:200,autoHeightMin:0,autoHeightMax:200,thumbMinSize:30,universal:!0,children:a})},b=n(792),h=n(740),v=n(834),m=n(210),j=h.a.Header,O=h.a.Content,g=function(e){Object(c.a)(n,e);var t=Object(i.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=Object(a.a)(this.props.children,4),t=e[0],n=e[1],r=e[2],o=e[3];return Object(d.jsx)(d.Fragment,{children:Object(d.jsx)(v.a,{spinning:!!this.props.pending,children:Object(d.jsxs)("div",{className:"isomorphicNoteComponent",children:[Object(d.jsx)("div",{style:{width:"340px"},className:"isoNoteListSidebar",children:Object(d.jsxs)("div",{className:"isoNoteListWrapper",children:[this.props.onSearch&&Object(d.jsx)(b.a,{placeholder:this.props.searchPlaceholder,className:"isoSearchNotes",onSearch:this.props.onSearch,searchDelay:this.props.searchDelay}),Object(d.jsx)("div",{className:"isoNoteList",children:r?Object(d.jsx)(f,{children:Object(d.jsx)("div",{className:"isoNoteListHolder",children:r})}):Object(d.jsx)("span",{className:"isoNoResultMsg",children:Object(d.jsx)(u.a,{id:"nothing.found"})})})]})}),Object(d.jsxs)(h.a,{className:"isoNotepadWrapper",children:[Object(d.jsxs)(j,{className:"isoHeader",children:[t,n]}),Object(d.jsx)(O,{className:"isoNoteEditingArea",children:o&&Object(d.jsx)(f,{children:Object(d.jsx)("div",{className:"isoNoteContentHolder",children:o})})})]})]})})})}}]),n}(l.a.Component);t.a=Object(m.c)(g)},812:function(e,t,n){"use strict";var a=n(813),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,c,i,s,l,u=!1;t||(t={}),n=t.debug||!1;try{if(c=a(),i=document.createRange(),s=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(a){if(a.stopPropagation(),t.format)if(a.preventDefault(),"undefined"===typeof a.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=r[t.format]||r.default;window.clipboardData.setData(o,e)}else a.clipboardData.clearData(),a.clipboardData.setData(t.format,e);t.onCopy&&(a.preventDefault(),t.onCopy(a.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),s.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(i):s.removeAllRanges()),l&&document.body.removeChild(l),c()}return u}},813:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],a=0;a<e.rangeCount;a++)n.push(e.getRangeAt(a));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},814:function(e,t,n){"use strict";var a=n(3),r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},c=n(13),i=function(e,t){return r.createElement(c.a,Object(a.a)(Object(a.a)({},e),{},{ref:t,icon:o}))};i.displayName="EditOutlined";t.a=r.forwardRef(i)},868:function(e,t,n){"use strict";var a=n(5),r=n(14),o=n(0),c=n(6),i=n(7),s=n(736),l=n(795),u=n(814),p=n(8),d=n.n(p),f=n(812),b=n.n(f),h=n(128),v=n(95),m=n(59),j=n(75),O=n(55),g=n(43),y=n(101),x=n(126),S=n(66),w=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},E={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},k=o.forwardRef((function(e,t){var n=e.style,r=e.noStyle,c=e.disabled,i=w(e,["style","noStyle","disabled"]),s={};return r||(s=Object(a.a)({},E)),c&&(s.pointerEvents="none"),s=Object(a.a)(Object(a.a)({},s),n),o.createElement("div",Object(a.a)({role:"button",tabIndex:0,ref:t},i,{onKeyDown:function(e){e.keyCode===S.a.ENTER&&e.preventDefault()},onKeyUp:function(t){var n=t.keyCode,a=e.onClick;n===S.a.ENTER&&a&&a()},style:s}))})),C=n(318),P=n(164),N=n(3),M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},T=n(13),D=function(e,t){return o.createElement(T.a,Object(N.a)(Object(N.a)({},e),{},{ref:t,icon:M}))};D.displayName="EnterOutlined";var I=o.forwardRef(D),R=n(312),F=n(38),K=function(e){var t=e.prefixCls,n=e["aria-label"],a=e.className,r=e.style,s=e.direction,l=e.maxLength,u=e.autoSize,p=void 0===u||u,f=e.value,b=e.onSave,h=e.onCancel,v=e.onEnd,m=e.component,j=e.enterIcon,O=void 0===j?o.createElement(I,null):j,g=o.useRef(null),y=o.useRef(!1),x=o.useRef(),w=o.useState(f),E=Object(i.a)(w,2),k=E[0],C=E[1];o.useEffect((function(){C(f)}),[f]),o.useEffect((function(){if(g.current&&g.current.resizableTextArea){var e=g.current.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}}),[]);var P=function(){b(k.trim())},N=m?"".concat(t,"-").concat(m):"",M=d()(t,"".concat(t,"-edit-content"),Object(c.a)({},"".concat(t,"-rtl"),"rtl"===s),a,N);return o.createElement("div",{className:M,style:r},o.createElement(R.a,{ref:g,maxLength:l,value:k,onChange:function(e){var t=e.target;C(t.value.replace(/[\n\r]/g,""))},onKeyDown:function(e){var t=e.keyCode;y.current||(x.current=t)},onKeyUp:function(e){var t=e.keyCode,n=e.ctrlKey,a=e.altKey,r=e.metaKey,o=e.shiftKey;x.current!==t||y.current||n||a||r||o||(t===S.a.ENTER?(P(),null===v||void 0===v||v()):t===S.a.ESC&&h())},onCompositionStart:function(){y.current=!0},onCompositionEnd:function(){y.current=!1},onBlur:function(){P()},"aria-label":n,rows:1,autoSize:p}),null!==O?Object(F.a)(O,{className:"".concat(t,"-edit-content-confirm")}):null)};function L(e,t){return o.useMemo((function(){var n=!!e;return[n,Object(a.a)(Object(a.a)({},t),n&&"object"===Object(r.a)(e)?e:null)]}),[e])}var H=function(e,t){var n=o.useRef(!1);o.useEffect((function(){n.current?e():n.current=!0}),t)},z=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};var q=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.component,i=void 0===r?"article":r,s=e.className,l=e.setContentRef,u=e.children,p=e.direction,f=z(e,["prefixCls","component","className","setContentRef","children","direction"]),b=o.useContext(y.b),h=b.getPrefixCls,v=b.direction,m=null!==p&&void 0!==p?p:v,j=t;l&&(j=Object(g.a)(t,l));var O=h("typography",n),x=d()(O,Object(c.a)({},"".concat(O,"-rtl"),"rtl"===m),s);return o.createElement(i,Object(a.a)({className:x,ref:j},f),u)}));function A(e){var t=Object(r.a)(e);return"string"===t||"number"===t}function V(e,t){for(var n=0,a=[],r=0;r<e.length;r+=1){if(n===t)return a;var o=e[r],c=n+(A(o)?String(o).length:1);if(c>t){var i=t-n;return a.push(String(o).slice(0,i)),a}a.push(o),n=c}return e}var U=function(e){var t=e.enabledMeasure,n=e.children,r=e.text,c=e.width,s=e.fontSize,l=e.rows,u=e.onEllipsis,p=o.useState([0,0,0]),d=Object(i.a)(p,2),f=Object(i.a)(d[0],3),b=f[0],h=f[1],j=f[2],O=d[1],g=o.useState(0),y=Object(i.a)(g,2),x=y[0],S=y[1],w=o.useState(0),E=Object(i.a)(w,2),k=E[0],C=E[1],P=o.useRef(null),N=o.useRef(null),M=o.useMemo((function(){return Object(v.a)(r)}),[r]),T=o.useMemo((function(){return function(e){var t=0;return e.forEach((function(e){A(e)?t+=String(e).length:t+=1})),t}(M)}),[M]),D=o.useMemo((function(){return t&&3===x?n(V(M,h),h<T):n(M,!1)}),[t,x,n,M,h,T]);Object(m.a)((function(){t&&c&&s&&T&&(S(1),O([0,Math.ceil(T/2),T]))}),[t,c,s,r,T,l]),Object(m.a)((function(){var e;1===x&&C((null===(e=P.current)||void 0===e?void 0:e.offsetHeight)||0)}),[x]),Object(m.a)((function(){var e,t;if(k)if(1===x)((null===(e=N.current)||void 0===e?void 0:e.offsetHeight)||0)<=l*k?(S(4),u(!1)):S(2);else if(2===x)if(b!==j){var n=(null===(t=N.current)||void 0===t?void 0:t.offsetHeight)||0,a=b,r=j;b===j-1?r=b:n<=l*k?a=h:r=h;var o=Math.ceil((a+r)/2);O([a,o,r])}else S(3),u(!0)}),[x,b,j,l,k]);var I={width:c,whiteSpace:"normal",margin:0,padding:0},R=function(e,t,n){return o.createElement("span",{"aria-hidden":!0,ref:t,style:Object(a.a)({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:2*Math.floor(s/2)},n)},e)};return o.createElement(o.Fragment,null,D,t&&3!==x&&4!==x&&o.createElement(o.Fragment,null,R("lg",P,{wordBreak:"keep-all",whiteSpace:"nowrap"}),1===x?R(n(M,!1),N,I):function(e,t){var a=V(M,e);return R(n(a,!0),t,I)}(h,N)))};var B=function(e){var t=e.enabledEllipsis,n=e.isEllipsis,r=e.children,c=e.tooltipProps;return(null===c||void 0===c?void 0:c.title)&&t?o.createElement(P.a,Object(a.a)({open:!!n&&void 0},c),r):r},W=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};function Q(e,t,n){return!0===e||void 0===e?t:e||n&&t}function G(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}var J=o.forwardRef((function(e,t){var n,p,f,S=e.prefixCls,w=e.className,E=e.style,N=e.type,M=e.disabled,T=e.children,D=e.ellipsis,I=e.editable,R=e.copyable,F=e.component,z=e.title,A=W(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),V=o.useContext(y.b),J=V.getPrefixCls,$=V.direction,X=Object(x.b)("Text")[0],_=o.useRef(null),Y=o.useRef(null),Z=J("typography",S),ee=Object(O.a)(A,["mark","code","delete","underline","strong","keyboard","italic"]),te=L(I),ne=Object(i.a)(te,2),ae=ne[0],re=ne[1],oe=Object(j.a)(!1,{value:re.editing}),ce=Object(i.a)(oe,2),ie=ce[0],se=ce[1],le=re.triggerType,ue=void 0===le?["icon"]:le,pe=function(e){var t;e&&(null===(t=re.onStart)||void 0===t||t.call(re)),se(e)};H((function(){var e;ie||null===(e=Y.current)||void 0===e||e.focus()}),[ie]);var de=function(e){null===e||void 0===e||e.preventDefault(),pe(!0)},fe=L(R),be=Object(i.a)(fe,2),he=be[0],ve=be[1],me=o.useState(!1),je=Object(i.a)(me,2),Oe=je[0],ge=je[1],ye=o.useRef(),xe={};ve.format&&(xe.format=ve.format);var Se=function(){window.clearTimeout(ye.current)},we=function(e){var t;null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),b()(ve.text||String(T)||"",xe),ge(!0),Se(),ye.current=window.setTimeout((function(){ge(!1)}),3e3),null===(t=ve.onCopy)||void 0===t||t.call(ve,e)};o.useEffect((function(){return Se}),[]);var Ee=o.useState(!1),ke=Object(i.a)(Ee,2),Ce=ke[0],Pe=ke[1],Ne=o.useState(!1),Me=Object(i.a)(Ne,2),Te=Me[0],De=Me[1],Ie=o.useState(!1),Re=Object(i.a)(Ie,2),Fe=Re[0],Ke=Re[1],Le=o.useState(!1),He=Object(i.a)(Le,2),ze=He[0],qe=He[1],Ae=o.useState(!1),Ve=Object(i.a)(Ae,2),Ue=Ve[0],Be=Ve[1],We=o.useState(!0),Qe=Object(i.a)(We,2),Ge=Qe[0],Je=Qe[1],$e=L(D,{expandable:!1}),Xe=Object(i.a)($e,2),_e=Xe[0],Ye=Xe[1],Ze=_e&&!Fe,et=Ye.rows,tt=void 0===et?1:et,nt=o.useMemo((function(){return!Ze||void 0!==Ye.suffix||Ye.onEllipsis||Ye.expandable||ae||he}),[Ze,Ye,ae,he]);Object(m.a)((function(){_e&&!nt&&(Pe(Object(C.a)("webkitLineClamp")),De(Object(C.a)("textOverflow")))}),[nt,_e]);var at=o.useMemo((function(){return!nt&&(1===tt?Te:Ce)}),[nt,Te,Ce]),rt=Ze&&(at?Ue:ze),ot=Ze&&1===tt&&at,ct=Ze&&tt>1&&at,it=function(e){var t;Ke(!0),null===(t=Ye.onExpand)||void 0===t||t.call(Ye,e)},st=o.useState(0),lt=Object(i.a)(st,2),ut=lt[0],pt=lt[1],dt=o.useState(0),ft=Object(i.a)(dt,2),bt=ft[0],ht=ft[1],vt=function(e){var t;qe(e),ze!==e&&(null===(t=Ye.onEllipsis)||void 0===t||t.call(Ye,e))};o.useEffect((function(){var e=_.current;if(_e&&at&&e){var t=ct?e.offsetHeight<e.scrollHeight:e.offsetWidth<e.scrollWidth;Ue!==t&&Be(t)}}),[_e,at,T,ct,Ge]),o.useEffect((function(){var e=_.current;if("undefined"!==typeof IntersectionObserver&&e&&at&&Ze){var t=new IntersectionObserver((function(){Je(!!e.offsetParent)}));return t.observe(e),function(){t.disconnect()}}}),[at,Ze]);var mt={};mt=!0===Ye.tooltip?{title:null!==(n=re.text)&&void 0!==n?n:T}:o.isValidElement(Ye.tooltip)?{title:Ye.tooltip}:"object"===Object(r.a)(Ye.tooltip)?Object(a.a)({title:null!==(p=re.text)&&void 0!==p?p:T},Ye.tooltip):{title:Ye.tooltip};var jt=o.useMemo((function(){var e=function(e){return["string","number"].includes(Object(r.a)(e))};if(_e&&!at)return e(re.text)?re.text:e(T)?T:e(z)?z:e(mt.title)?mt.title:void 0}),[_e,at,z,mt.title,rt]);if(ie)return o.createElement(K,{value:null!==(f=re.text)&&void 0!==f?f:"string"===typeof T?T:"",onSave:function(e){var t;null===(t=re.onChange)||void 0===t||t.call(re,e),pe(!1)},onCancel:function(){var e;null===(e=re.onCancel)||void 0===e||e.call(re),pe(!1)},onEnd:re.onEnd,prefixCls:Z,className:w,style:E,direction:$,component:F,maxLength:re.maxLength,autoSize:re.autoSize,enterIcon:re.enterIcon});var Ot=function(){var e,t=Ye.expandable,n=Ye.symbol;return t?(e=n||X.expand,o.createElement("a",{key:"expand",className:"".concat(Z,"-expand"),onClick:it,"aria-label":X.expand},e)):null},gt=function(){if(ae){var e=re.icon,t=re.tooltip,n=Object(v.a)(t)[0]||X.edit,a="string"===typeof n?n:"";return ue.includes("icon")?o.createElement(P.a,{key:"edit",title:!1===t?"":n},o.createElement(k,{ref:Y,className:"".concat(Z,"-edit"),onClick:de,"aria-label":a},e||o.createElement(u.a,{role:"button"}))):null}},yt=function(){if(he){var e=ve.tooltips,t=ve.icon,n=G(e),a=G(t),r=Oe?Q(n[1],X.copied):Q(n[0],X.copy),c=Oe?X.copied:X.copy,i="string"===typeof r?r:c;return o.createElement(P.a,{key:"copy",title:r},o.createElement(k,{className:d()("".concat(Z,"-copy"),Oe&&"".concat(Z,"-copy-success")),onClick:we,"aria-label":i},Oe?Q(a[1],o.createElement(s.a,null),!0):Q(a[0],o.createElement(l.a,null),!0)))}};return o.createElement(h.a,{onResize:function(e,t){var n,a=e.offsetWidth;pt(a),ht(parseInt(null===(n=window.getComputedStyle)||void 0===n?void 0:n.call(window,t).fontSize,10)||0)},disabled:!Ze||at},(function(n){var r;return o.createElement(B,{tooltipProps:mt,enabledEllipsis:Ze,isEllipsis:rt},o.createElement(q,Object(a.a)({className:d()((r={},Object(c.a)(r,"".concat(Z,"-").concat(N),N),Object(c.a)(r,"".concat(Z,"-disabled"),M),Object(c.a)(r,"".concat(Z,"-ellipsis"),_e),Object(c.a)(r,"".concat(Z,"-single-line"),Ze&&1===tt),Object(c.a)(r,"".concat(Z,"-ellipsis-single-line"),ot),Object(c.a)(r,"".concat(Z,"-ellipsis-multiple-line"),ct),r),w),prefixCls:S,style:Object(a.a)(Object(a.a)({},E),{WebkitLineClamp:ct?tt:void 0}),component:F,ref:Object(g.a)(n,_,t),direction:$,onClick:ue.includes("text")?de:void 0,"aria-label":null===jt||void 0===jt?void 0:jt.toString(),title:z},ee),o.createElement(U,{enabledMeasure:Ze&&!at,text:T,rows:tt,width:ut,fontSize:bt,onEllipsis:vt},(function(t,n){var a=t;t.length&&n&&jt&&(a=o.createElement("span",{key:"show-content","aria-hidden":!0},a));var r=function(e,t){var n=e.mark,a=e.code,r=e.underline,c=e.delete,i=e.strong,s=e.keyboard,l=e.italic,u=t;function p(e,t){e&&(u=o.createElement(t,{},u))}return p(i,"strong"),p(r,"u"),p(c,"del"),p(a,"code"),p(n,"mark"),p(s,"kbd"),p(l,"i"),u}(e,o.createElement(o.Fragment,null,a,function(e){return[e&&o.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),Ye.suffix,(t=e,[t&&Ot(),gt(),yt()])];var t}(n)));return r}))))}))})),$=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},X=o.forwardRef((function(e,t){var n=e.ellipsis,r=e.rel,c=$(e,["ellipsis","rel"]),i=Object(a.a)(Object(a.a)({},c),{rel:void 0===r&&"_blank"===c.target?"noopener noreferrer":r});return delete i.navigate,o.createElement(J,Object(a.a)({},i,{ref:t,ellipsis:!!n,component:"a"}))})),_=o.forwardRef((function(e,t){return o.createElement(J,Object(a.a)({ref:t},e,{component:"div"}))})),Y=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},Z=function(e,t){var n=e.ellipsis,c=Y(e,["ellipsis"]),i=o.useMemo((function(){return n&&"object"===Object(r.a)(n)?Object(O.a)(n,["expandable","rows"]):n}),[n]);return o.createElement(J,Object(a.a)({ref:t},c,{ellipsis:i,component:"span"}))},ee=o.forwardRef(Z),te=n(63),ne=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},ae=Object(te.b)(1,2,3,4,5),re=o.forwardRef((function(e,t){var n,r=e.level,c=void 0===r?1:r,i=ne(e,["level"]);return n=ae.includes(c)?"h".concat(c):"h1",o.createElement(J,Object(a.a)({ref:t},i,{component:n}))})),oe=q;oe.Text=ee,oe.Link=X,oe.Title=re,oe.Paragraph=_;t.a=oe},924:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(7),r=(n(0),n(778)),o=n(739),c=n(742),i=n(2),s=o.a.TextArea;function l(e){var t,n=this,l=e.essence,u=(null===(t=window.appConfig)||void 0===t?void 0:t.adminReferences[l])||{},p={name:{rules:[{required:!0}]},type:{rules:[{required:!0}],label:this.m("typename"),component:Object(i.jsx)(r.a,{labelKey:"name",cache:!0,query:"/".concat(l,"/type")})},description:{component:Object(i.jsx)(s,{})}};return u.extraFields&&Object.entries(u.extraFields).forEach((function(e){var t=Object(a.a)(e,2),o=t[0],c=t[1];p[o]={label:n.m(o)},"reference"===c.type&&(p[o].component=Object(i.jsx)(r.a,{labelKey:"name",cache:!0,query:c.path})),c.required&&(p[o].rules=[{required:!0}])})),Object(i.jsx)(i.Fragment,{children:Object.entries(p).map((function(e){var t=Object(a.a)(e,2),r=t[0],s=t[1],l=s.label||n.m(r),u=s.component||Object(i.jsx)(o.a,{});return Object(i.jsx)(c.a.Item,{rules:s.rules,label:l,name:r,children:u},r)}))})}}}]);
//# sourceMappingURL=17.54769ca7.chunk.js.map