mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
324 lines
991 KiB
JavaScript
324 lines
991 KiB
JavaScript
;/*!examples/polyfills/cloest.js*/
|
||
amis.define("4a4bb21",(function(e,t,n,o){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null})}));
|
||
;/*!examples/polyfills/classList.js*/
|
||
amis.define("56ace5b",(function(t,e,n,i){
|
||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
||
"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(t){"use strict";if("Element"in t){var e="classList",n=t.Element.prototype,i=Object,s=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},r=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},o=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new o("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new o("INVALID_CHARACTER_ERR","The token must not contain space characters.");return r.call(t,e)},a=function(t){for(var e=s.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,r=n.length;i<r;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=a.prototype=[],u=function(){return new a(this)};if(o.prototype=Error.prototype,l.item=function(t){return this[t]||null},l.contains=function(t){return~c(this,t+"")},l.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do{t=e[n]+"",~c(this,t)||(this.push(t),s=!0)}while(++n<i);s&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do{for(t=n[i]+"",e=c(this,t);~e;)this.splice(e,1),r=!0,e=c(this,t)}while(++i<s);r&&this._updateClassName()},l.toggle=function(t,e){var n=this.contains(t),i=n?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?e:!n},l.replace=function(t,e){var n=c(t+"");~n&&(this.splice(n,1,e),this._updateClassName())},l.toString=function(){return this.join(" ")},i.defineProperty){var h={get:u,enumerable:!0,configurable:!0};try{i.defineProperty(n,e,h)}catch(t){void 0!==t.number&&-2146823252!==t.number||(h.enumerable=!1,i.defineProperty(n,e,h))}}else i.prototype.__defineGetter__&&n.__defineGetter__(e,u)}}(self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),i=n.indexOf(t+"");~i&&(n=n.slice(i),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}())}));
|
||
;/*!examples/polyfills/index.ts*/
|
||
amis.define("835699d",(function(e,s,o,d){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),e("node_modules/core-js/es/array/find"),e("node_modules/core-js/es/array/from"),e("node_modules/core-js/es/array/includes"),e("node_modules/core-js/es/array/find-index"),e("node_modules/core-js/es/string/starts-with"),e("node_modules/core-js/es/string/ends-with"),e("node_modules/core-js/es/string/includes"),e("node_modules/core-js/es/string/replace-all"),e("node_modules/core-js/es/number/is-nan"),e("node_modules/core-js/es/promise/index"),e("node_modules/core-js/es/object/assign"),e("node_modules/core-js/es/object/keys"),e("node_modules/core-js/es/object/has-own"),e("node_modules/core-js/es/map/index"),e("node_modules/core-js/es/set/index"),e("node_modules/core-js/es/symbol/index"),e("4a4bb21"),e("56ace5b")}));
|
||
;/*!examples/index.jsx*/
|
||
amis.define("ca626e1",(function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bootstrap=void 0;var a=e("node_modules/tslib/tslib");e("835699d");var l=a.__importStar(e("node_modules/react/index")),r=e("node_modules/react-dom/client"),c=a.__importDefault(e("5f106aa"));function i(){return(0,l.useEffect)((function(){setTimeout((function(){if(location.hash){var e=location.hash.split("#")[1],t=document.querySelector('a[name="'.concat(e,'"]'));t&&t.scrollIntoView()}}),2e3)})),l.default.createElement(c.default,null)}t.bootstrap=function(e,t){(0,r.createRoot)(e).render(l.default.createElement(i,null))}}));
|
||
;/*!examples/app/app.tsx*/
|
||
amis.define("5387bc0",(function(e,a,l,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={type:"app",brandName:"APP 模式",api:"https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample",header:{type:"tpl",inline:!1,className:"w-full",tpl:'<div class="flex justify-between"><div>顶部区域左侧</div><div>顶部区域右侧</div></div>'},pages:[{label:"Home",url:"/",redirect:"/pageA"},{label:"示例",children:[{label:"页面A",url:"pageA",schema:{type:"page",title:"页面A",body:"页面A"},children:[{label:"页面A-1",url:"1",schema:{type:"page",title:"页面A-1",body:"页面A-1"}},{label:"页面A-2",url:"2",schema:{type:"page",title:"页面A-2",body:"页面A-2"}},{label:"页面A-3",url:"3",schema:{type:"page",title:"页面A-3",body:"页面A-3"}}]},{label:"页面B",schema:{type:"page",title:"页面B",body:"页面B"}},{label:"页面C",schema:{type:"page",title:"页面C",body:"页面C"}},{label:"表单",url:"/form",icon:"fa fa-plus",schemaApi:"https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/service/schema?type=form"},{label:"列表",url:"/crud/list",icon:"fa fa-list",badge:"${count}",badgeClassName:"bg-info",schemaApi:"https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/service/schema?type=crud"}]},{label:"分组2",children:[{label:"用户管理",schema:{type:"page",title:"用户管理",body:"页面C"}},{label:"外部链接",link:"http://baidu.gitee.io/amis"},{label:"部门管理",schemaApi:"https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/service/form?tpl=tpl3"}]}]}}));
|
||
;/*!examples/embed.tsx*/
|
||
amis.define("2ab197b",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.embed=void 0;var r=e("node_modules/tslib/tslib");e("835699d");var a=r.__importDefault(e("node_modules/react/index")),i=e("node_modules/react-dom/client"),s=r.__importDefault(e("node_modules/axios/index")),l=e("node_modules/path-to-regexp/dist/index"),d=r.__importDefault(e("node_modules/copy-to-clipboard/index")),u=e("node_modules/amis-core/lib/index"),c=r.__importDefault(e("node_modules/qs/lib/index")),m=e("node_modules/amis-ui/lib/components/Alert"),f=r.__importStar(e("node_modules/amis-ui/lib/components/Toast")),p=r.__importDefault(e("node_modules/amis-ui/lib/components/Alert")),_=e("node_modules/amis-core/lib/index");e("node_modules/amis/lib/minimal"),e("node_modules/amis-ui/lib/locale/en-US"),e("node_modules/amis-ui/lib/locale/zh-CN"),e("node_modules/amis-ui/lib/locale/en-US"),e("node_modules/amis-ui/lib/locale/de-DE"),e("node_modules/amis-ui/lib/themes/cxd"),e("node_modules/amis-ui/lib/themes/ang"),e("node_modules/amis-ui/lib/themes/antd"),e("node_modules/amis-ui/lib/themes/dark"),e("node_modules/history/index");var h=e("node_modules/amis-core/lib/index"),v=e("2f0e30e");(0,h.setGlobalOptions)({pdfjsWorkerSrc:(0,u.supportsMjs)()?(0,v.pdfUrlLoad)():""}),t.embed=function(e,t,n,o,v){var b=this;void 0===n&&(n={});var g=(0,_.makeTranslator)((null==o?void 0:o.locale)||(null==n?void 0:n.locale));if("string"==typeof e&&(e=document.querySelector(e)),e){if("BODY"===e.tagName){var w=document.createElement("div");e.appendChild(w),e=w}e.classList.add("amis-scope");var y={},x=function(e){return r.__awaiter(b,void 0,void 0,(function(){var t,n=this;return r.__generator(this,(function(a){switch(a.label){case 0:return t=o&&"function"==typeof o.requestAdaptor?o.requestAdaptor.bind():function(e){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,e]}))}))},[4,t(e)];case 1:return[2,a.sent()||e]}}))}))},k=r.__assign({getModalContainer:function(){var e;return(null===(e=null==o?void 0:o.getModalContainer)||void 0===e?void 0:e.call(o))||document.querySelector(".amis-scope")},notify:function(e,t,n){return f.toast[e]?f.toast[e](t,n):console.warn("[Notify]",e,t)},alert:m.alert,confirm:m.confirm,updateLocation:function(e,t){if("goBack"===e)return window.history.back();t&&window.history.replaceState?window.history.replaceState("",document.title,e):location.href=(0,u.normalizeLink)(e)},isCurrentUrl:function(e,t){var n,o=(0,u.normalizeLink)(e),r=window.location,a=o,i="",s=o.indexOf("?");if(~s&&(a=o.substring(0,s),i=o.substring(s)),i){if(a!==r.pathname||!r.search)return!1;var d=c.default.parse(i.substring(1)),m=c.default.parse(r.search.substring(1));return Object.keys(d).every((function(e){return d[e]===m[e]}))}return a===r.pathname||!(~a.indexOf("http")||!~a.indexOf(":"))&&(0,l.match)(o,{decode:decodeURIComponent,strict:null===(n=null==t?void 0:t.strict)||void 0===n||n})(r.pathname)},jumpTo:function(e,t){if("goBack"===e)return window.history.back();e=(0,u.normalizeLink)(e),t&&"url"===t.actionType?!1===t.blank?window.location.href=e:window.open(e):t&&e&&t.target?window.open(e,t.target):/^https?:\/\//.test(e)?window.location.replace(e):location.href=e},fetcher:function(e){return r.__awaiter(b,void 0,void 0,(function(){var t,n,a,i,l,d,u,m;return r.__generator(this,(function(f){switch(f.label){case 0:return t=e.url,n=e.method,a=e.data,i=e.responseType,l=e.config,d=e.headers,(l=l||{}).url=t,l.withCredentials=!0,i&&(l.responseType=i),l.cancelExecutor&&(l.cancelToken=new s.default.CancelToken(l.cancelExecutor)),l.headers=d||{},l.method=n,l.data=a,[4,x(l)];case 1:return l=f.sent(),"get"===n&&a?l.params=a:a&&a instanceof FormData||!a||"string"==typeof a||a instanceof Blob||a instanceof ArrayBuffer||(a=JSON.stringify(a),l.headers["Content-Type"]="application/json"),l.validateStatus=function(){return!0},l.mockResponse?(m=l.mockResponse,[3,4]):[3,2];case 2:return[4,(0,s.default)(l)];case 3:m=f.sent(),f.label=4;case 4:return u=m,[4,(0,h.attachmentAdpator)(u,g,e)];case 5:if(u=f.sent(),u=function(e){return function(t){var n=t.data||{};if(o&&o.responseAdpater&&(o.responseAdaptor=o.responseAdpater),o&&o.responseAdaptor){var a=e.url,i=a.indexOf("?"),s=~i?c.default.parse(a.substring(i)):{},l=r.__assign(r.__assign({},e),{query:s,body:e.data});n=o.responseAdaptor(e,n,s,l,t)}else n.hasOwnProperty("errno")?(n.status=n.errno,n.msg=n.errmsg):n.hasOwnProperty("no")&&(n.status=n.no,n.msg=n.error);return r.__assign(r.__assign({},t),{data:n})}}(e)(u),u.status>=400){if(u.data){if(401===u.status&&u.data.location&&u.data.location.startsWith("http"))return location.href=u.data.location.replace("{{redirect}}",encodeURIComponent(location.href)),[2,new Promise((function(){}))];throw u.data.msg?new Error(u.data.msg):new Error(g("System.requestError")+JSON.stringify(u.data,null,2))}throw new Error("".concat(g("System.requestErrorStatus")," ").concat(u.status))}return[2,u]}}))}))},isCancel:function(e){return s.default.isCancel(e)},copy:function(e,t){void 0===t&&(t={});var n=(0,d.default)(e);return n&&!0!==t.silent&&f.toast.info(g("System.copy")),n},richTextToken:"",affixOffsetBottom:0,customStyleClassPrefix:".amis-scope"},o),S={},O=(0,i.createRoot)(e);return O.render(C(n)),Object.assign(y,{updateProps:function(e,t){O.render(C(e))},updateSchema:function(e,n){void 0===n&&(n={}),t=e,O.render(C(n))},unmount:function(){O.unmount()}})}function C(n){return S=r.__assign(r.__assign(r.__assign({},S),n),{scopeRef:function(e){e&&(Object.keys(e).forEach((function(t){var n=e[t];"function"==typeof n&&(n=n.bind(e)),y[t]=n})),null==v||v())}}),a.default.createElement("div",{className:"amis-routes-wrapper"},a.default.createElement(f.default,{position:o&&o.toastPosition||"top-center",closeButton:!1,timeout:5e3,locale:null==n?void 0:n.locale,theme:null==o?void 0:o.theme}),a.default.createElement(p.default,{locale:null==n?void 0:n.locale,theme:null==o?void 0:o.theme,container:function(){var t;return(null===(t=null==o?void 0:o.getModalContainer)||void 0===t?void 0:t.call(o))||e}}),(0,_.render)(t,S,k))}console.error(g("Embed.invalidRoot"))}}));
|
||
;/*!examples/app/index.jsx*/
|
||
amis.define("7d8eb4e",(function(t,o,e,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.bootstrap=void 0;var a=t("node_modules/tslib/tslib"),i=a.__importDefault(t("5387bc0")),s=t("node_modules/history/index"),r=t("2ab197b"),c=t("node_modules/path-to-regexp/dist/index"),d=(0,s.createHashHistory)({});function p(t,o){void 0===o&&(o=d.location),(t=t||"")&&"#"===t[0]?t=o.pathname+o.search+t:t&&"?"===t[0]&&(t=o.pathname+t);var e=t.indexOf("?"),n=t.indexOf("#"),a=~e?t.substring(0,e):~n?t.substring(0,n):t,i=~e?t.substring(e,~n?n:void 0):"",s=~n?t.substring(n):o.hash;if(a){if("/"!=a[0]&&!/^https?\:\/\//.test(a)){var r=o.pathname.split("/");r.pop();for(var c=void 0;c=/^\.\.?\//.exec(a);)"../"===c[0]&&r.pop(),a=a.substring(c[0].length);a=r.concat(a).join("/")}}else a=o.pathname;return a+i+s}function l(t,o){if(!t)return!1;var e=d.location.pathname,n=p(t,a.__assign(a.__assign({},location),{pathname:e,hash:""}));if(!~n.indexOf("http")&&~n.indexOf(":")){var i=o&&o.strict;return(0,c.match)(n,{decode:decodeURIComponent,strict:void 0===i||i})(e)}return decodeURI(e)===n}var h={updateLocation:function(t,o){return"goBack"===(t=p(t))?d.goBack():!/^https?\:\/\//.test(t)&&t===d.location.pathname+d.location.search||t===d.location.href?void 0:/^https?\:\/\//.test(t)||!d?window.location.href=t:void d[o?"replace":"push"](t)},jumpTo:function(t,o){if("goBack"===t)return d.goBack();l(t=p(t))||(o&&"url"===o.actionType?!1===o.blank?window.location.href=t:window.open(t,"_blank"):o&&o.blank?window.open(t,"_blank"):/^https?:\/\//.test(t)?window.location.href=t:!/^https?\:\/\//.test(t)&&t===d.pathname+d.location.search||t===d.location.href||d.push(t))},isCurrentUrl:l};o.bootstrap=function(t){var o=(0,r.embed)(t,i.default,{location:d.location,context:{amisUser:{id:1,name:"AMIS User"}}},h);d.listen((function(t){o.updateProps({location:t.location||t})}))}}));
|
||
;/*!node_modules/amis/lib/renderers/Alert.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Alert",(function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Alert2"),l=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(o),u=s(i),c=e("node_modules/react/index"),p=(c.default||c).createElement;(c.default||c).Fragment;var b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(r,e),r.prototype.render=function(){var e=this.props,r=e.render,t=e.body,n=e.level,o=e.icon,i=e.showIcon,s=e.actions,c=l.__rest(e,["render","body","level","icon","showIcon","actions"]);a.isPureVariable(n)&&(n=a.resolveVariableAndFilter(n,this.props.data)),a.isPureVariable(o)&&(o=a.resolveVariableAndFilter(o,this.props.data)),a.isPureVariable(i)&&(i=a.resolveVariableAndFilter(i,this.props.data));var b=s?u.default.isValidElement(s)?s:r("alert-actions",s):null;return p(d.default,l.__assign({},c,{level:n,icon:o,showIcon:i,actions:b}),r("body",t))},r=l.__decorate([a.Renderer({type:"alert"})],r)}(u.default.Component);r.AlertRenderer=b}));
|
||
;/*!node_modules/amis/lib/renderers/App.js*/
|
||
amis.define("node_modules/amis/lib/renderers/App",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/404"),r=e("node_modules/amis-ui/lib/components/Layout"),s=e("node_modules/amis-ui/lib/components/Icon"),l=e("node_modules/amis-ui/lib/components/AsideNav"),d=e("node_modules/amis-ui/lib/components/Html"),u=e("node_modules/tslib/tslib"),c=e("node_modules/react/index"),p=e("node_modules/amis-core/lib/index");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(o),v=h(i),f=h(r),g=h(s),b=h(l),_=h(d),y=h(c),N=e("node_modules/react/index"),w=(N.default||N).createElement;(N.default||N).Fragment;var A=function(e){function t(t){var a,n,o,i=this;i=e.call(this,t)||this;var r=t.store;return r.syncProps(t,void 0,["pages"]),r.updateActivePage(Object.assign({},null!==(a=t.env)&&void 0!==a?a:{},{showFullBreadcrumbPath:null!==(n=t.showFullBreadcrumbPath)&&void 0!==n&&n,showBreadcrumbHomePath:null===(o=t.showBreadcrumbHomePath)||void 0===o||o})),t.env.watchRouteChange&&(i.unWatchRouteChange=t.env.watchRouteChange((function(){var e,a,n;return r.updateActivePage(Object.assign({},null!==(e=t.env)&&void 0!==e?e:{},{showFullBreadcrumbPath:null!==(a=t.showFullBreadcrumbPath)&&void 0!==a&&a,showBreadcrumbHomePath:null===(n=t.showBreadcrumbHomePath)||void 0===n||n}))}))),i}return u.__extends(t,e),t.prototype.componentDidMount=function(){return u.__awaiter(this,void 0,void 0,(function(){var e,t,a;return u.__generator(this,(function(n){switch(n.label){case 0:return e=this.props,t=e.data,[4,(0,e.dispatchEvent)("init",t,this)];case 1:return(null==(a=n.sent())?void 0:a.prevented)||this.reload(),[2]}}))}))},t.prototype.componentDidUpdate=function(e){var t,a,n;return u.__awaiter(this,void 0,void 0,(function(){var o,i;return u.__generator(this,(function(r){return o=this.props,(i=o.store).syncProps(o,e,["pages"]),p.isApiOutdated(e.api,o.api,e.data,o.data)?this.reload():o.location&&o.location!==e.location&&i.updateActivePage(Object.assign({},null!==(t=o.env)&&void 0!==t?t:{},{showFullBreadcrumbPath:null!==(a=o.showFullBreadcrumbPath)&&void 0!==a&&a,showBreadcrumbHomePath:null===(n=o.showBreadcrumbHomePath)||void 0===n||n})),[2]}))}))},t.prototype.componentWillUnmount=function(){var e;null===(e=this.unWatchRouteChange)||void 0===e||e.call(this)},t.prototype.reload=function(e,t,a,n,o){return u.__awaiter(this,void 0,void 0,(function(){var e,a,n,i,r,s,l,d,c,h;return u.__generator(this,(function(u){switch(u.label){case 0:return t?[2,this.receive(t,void 0,o)]:(e=this.props,a=e.api,n=e.store,i=e.env,r=e.showFullBreadcrumbPath,s=void 0!==r&&r,l=e.showBreadcrumbHomePath,d=void 0===l||l,c=e.locale,p.isEffectiveApi(a,n.data)?[4,n.fetchInitData(a,n.data,{})]:[3,2]);case 1:h=u.sent(),i.replaceText&&(h.data=p.replaceText(h.data,i.replaceText,i.replaceTextIgnoreKeys)),(null==h?void 0:h.data.pages)&&(h.data=p.envOverwrite(h.data,c),n.setPages(h.data.pages),n.updateActivePage(Object.assign({},null!=i?i:{},{showFullBreadcrumbPath:s,showBreadcrumbHomePath:d}))),u.label=2;case 2:return[2,n.data]}}))}))},t.prototype.receive=function(e,t,a){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(t){return this.props.store.updateData(e,void 0,a),[2,this.reload()]}))}))},t.prototype.resolveDefinitions=function(e){var t,a=this.props,n=a.resolveDefinitions,o=null===(t=a.store.schema)||void 0===t?void 0:t.definitions;return(null==o?void 0:o[e])||n(e)},t.prototype.handleNavClick=function(e){e.preventDefault();var t=this.props.env,a=e.currentTarget.getAttribute("href");t.jumpTo(a,void 0,this.props.data)},t.prototype.renderHeader=function(){var e=this.props,t=e.classnames,a=e.brandName,n=e.header,o=e.render,i=e.store,r=e.logo,s=e.env;return n||r||a?w(y.default.Fragment,null,w("div",{className:t("Layout-brandBar")},w("div",{onClick:i.toggleOffScreen,className:t("Layout-offScreenBtn")},w("i",{className:"bui-icon iconfont icon-collapse"})),w("div",{className:t("Layout-brand")},r&&~r.indexOf("<svg")?w(_.default,{className:t("AppLogo-html"),html:r,filterHtml:s.filterHtml}):r?w("img",{className:t("AppLogo"),src:r}):w("span",{className:"visible-folded "},null==a?void 0:a.substring(0,1)),w("span",{className:"hidden-folded m-l-sm"},a))),w("div",{className:t("Layout-headerBar")},w("a",{onClick:i.toggleFolded,type:"button",className:t("AppFoldBtn")},w("i",{className:"fa fa-".concat(i.folded?"indent":"dedent"," fa-fw")})),n?o("header",n):null)):null},t.prototype.renderAside=function(){var e=this,t=this.props,a=t.store,n=t.env,o=t.asideBefore,i=t.asideAfter,r=t.render,s=t.data;return w(y.default.Fragment,null,o?r("aside-before",o):null,w(b.default,{navigations:a.navigations,renderLink:function(t,n){var o=t.link;t.active;var i=t.toggleExpand,r=t.classnames,l=t.depth,d=t.subHeader,u=[];if(!1===o.visible)return null;!d&&o.children&&o.children.some((function(e){return null==e?void 0:e.visible}))&&u.push(w("span",{key:"expand-toggle",className:r("AsideNav-itemArrow"),onClick:function(e){return i(o,e)}}));var c="string"==typeof o.badge?p.filter(o.badge,s):o.badge;return null!=c&&u.push(w("b",{key:"badge",className:r("AsideNav-itemBadge",o.badgeClassName||"bg-info")},c)),!d&&o.icon?u.push(w(g.default,{key:"icon",cx:r,icon:o.icon,className:"AsideNav-itemIcon"})):a.folded&&1===l&&!d&&u.push(w("i",{key:"icon",className:r("AsideNav-itemIcon",o.children?"fa fa-folder":"fa fa-info")})),u.push(w("span",{className:r("AsideNav-itemLabel"),key:"label"},"string"==typeof o.label?p.filter(o.label,s):o.label)),o.path?/^https?\:/.test(o.path)?w("a",{target:"_blank",key:"link",href:o.path,rel:"noopener"},u):w("a",{key:"link",onClick:e.handleNavClick,href:o.path||o.children&&o.children[0].path},u):w("a",{key:"link",onClick:o.children?function(){return i(o)}:void 0},u)},isActive:function(e){return!!n.isCurrentUrl(null==e?void 0:e.path,e)}}),i?r("aside-before",i):null)},t.prototype.renderFooter=function(){var e=this.props,t=e.render,a=e.footer;return a?t("footer",a):null},t.prototype.render=function(){var e,t=this,a=this.props,n=a.classnames,o=a.store,i=a.render,r=a.showBreadcrumb,s=void 0===r||r,l=a.loadingConfig;return w(f.default,{header:this.renderHeader(),aside:this.renderAside(),footer:this.renderFooter(),folded:o.folded,offScreen:o.offScreen,contentClassName:n("AppContent")},o.activePage&&o.schema?w(y.default.Fragment,null,s&&o.bcn.length?w("ul",{className:n("AppBcn")},o.bcn.map((function(e,a){return w("li",{key:a,className:n("AppBcn-item")},e.path?w("a",{href:e.path,onClick:t.handleNavClick},e.label):a!==o.bcn.length-1?w("a",null,e.label):e.label)}))):null,w("div",{className:n("AppBody")},i("page",o.schema,{key:"".concat(null===(e=o.activePage)||void 0===e?void 0:e.id,"-").concat(o.schemaKey),data:o.pageData,resolveDefinitions:this.resolveDefinitions}))):o.pages&&!o.activePage?w(v.default,null,w("div",{className:"text-center"},"页面不存在")):null,w(m.default,{loadingConfig:l,overlay:!0,show:o.loading||!o.pages,size:"lg"}))},t.propsList=["brandName","logo","header","asideBefore","asideAfter","pages","footer"],t.defaultProps={},u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[String]),u.__metadata("design:returntype",void 0)],t.prototype,"resolveDefinitions",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",void 0)],t.prototype,"handleNavClick",null),t}(y.default.Component),P=function(e){function t(t,a){var n=e.call(this,t)||this;return a.registerComponent(n),n}return u.__extends(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},t.prototype.setData=function(e,t){return this.props.store.updateData(e,void 0,t)},t.prototype.getData=function(){return this.props.store.data},t.contextType=p.ScopedContext,t=u.__decorate([p.Renderer({type:"app",storeType:p.AppStore.name}),u.__metadata("design:paramtypes",[Object,Object])],t)}(A);t.App=A,t.default=P}));
|
||
;/*!node_modules/amis/lib/renderers/Avatar.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Avatar",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/withBadge"),i=e("node_modules/amis-ui/lib/components/Avatar"),o=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),d=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(r),p=l(i),c=l(s),_=e("node_modules/react/index"),m=(_.default||_).createElement;(_.default||_).Fragment;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseEnter=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseLeave=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.render=function(){var e=this.props,t=e.style,a=void 0===t?{}:t,n=e.className,r=e.classnames,i=e.src,o=e.defaultAvatar,s=e.icon,l=void 0===s?"fa fa-user":s,u=e.fit,c=e.shape,_=e.size,v=e.text,f=e.gap,h=e.alt,y=e.draggable,b=e.crossOrigin,g=e.onError,E=e.data,F=function(){return!1};if("string"==typeof g)try{F=new Function("event",g)}catch(e){console.warn(g,e)}return d.isPureVariable(i)&&(i=d.resolveVariableAndFilter(i,E,"| raw")),d.isPureVariable(v)&&(v=d.resolveVariableAndFilter(v,E)),d.isPureVariable(l)&&(l=d.resolveVariableAndFilter(l,E)),m(p.default,{style:a,className:n,classnames:r,src:i||o,icon:l,fit:u,shape:c,size:_,text:v,gap:f,alt:h,draggable:y,crossOrigin:b,onError:F,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave})},o.__decorate([d.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),o.__decorate([d.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),o.__decorate([d.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(c.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([d.Renderer({type:"avatar"}),u.default],t)}(v);t.AvatarField=v,t.AvatarFieldRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/ButtonGroup.js*/
|
||
amis.define("node_modules/amis/lib/renderers/ButtonGroup",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),u=e("node_modules/amis/lib/renderers/Form/ButtonGroupSelect"),d=e("node_modules/amis-core/lib/index"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([d.Renderer({type:"button-group"})],t)}(u.default);t.default=u.default,t.ButtonGroupRenderer=i}));
|
||
;/*!node_modules/amis/lib/renderers/Form/ButtonToolbar.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/ButtonToolbar",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),u=e("node_modules/amis-core/lib/index");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(s),i=e("node_modules/react/index"),d=(i.default||i).createElement;(i.default||i).Fragment;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.renderButtons=function(){var e=this.props,t=e.render;e.classPrefix;var n=e.buttons;return Array.isArray(n)?n.map((function(e,n){return t("button/".concat(n),e,{key:n})})):null},t.prototype.render=function(){var e=this.props;e.buttons;var t=e.className,n=e.classnames;return e.render,e.style,d("div",{className:n("ButtonToolbar",t)},this.renderButtons())},t.propsList=["buttons","className"],t}(l.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([u.FormItem({type:"button-toolbar",strictMode:!1})],t)}(c);t.ButtonToolbarRenderer=f,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Breadcrumb.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Breadcrumb",(function(e,r,n,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=e("node_modules/amis-ui/lib/components/Breadcrumb"),a=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=i(l),s=i(d),f=e("node_modules/react/index"),c=(f.default||f).createElement;(f.default||f).Fragment;var m=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(r,e),r.prototype.render=function(){var e=this.props,r=e.items,n=e.source,t=e.data,l=e.env,d=a.__rest(e,["items","source","data","env"]),i=r||o.resolveVariableAndFilter(n,t,"| raw");return i&&(i=i.map((function(e){return e.label&&(e.label=o.filter(e.label,t)),e.href&&(e.href=o.resolveVariableAndFilter(e.href,t,"| raw")),e.dropdown&&(e.dropdown=e.dropdown.map((function(e){return e.label&&(e.label=o.filter(e.label,t)),e.href&&(e.href=o.resolveVariableAndFilter(e.href,t,"| raw")),e}))),e}))),c(u.default,a.__assign({items:i,tooltipContainer:null==l?void 0:l.getModalContainer},d))},r}(s.default.Component),b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(r,e),r=a.__decorate([o.Renderer({type:"breadcrumb"})],r)}(m);r.BreadcrumbField=m,r.BreadcrumbFieldRenderer=b}));
|
||
;/*!node_modules/amis/lib/renderers/DropDownButton.js*/
|
||
amis.define("node_modules/amis/lib/renderers/DropDownButton",(function(e,t,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/TooltipWrapper"),i=e("node_modules/amis-ui/lib/components/Icon"),a=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(n),c=d(i),u=d(r),m=e("node_modules/react/index"),f=(m.default||m).createElement;(m.default||m).Fragment;var h=function(e){function t(t){var o=e.call(this,t)||this;return o.state={isOpened:!1},o.open=o.open.bind(o),o.close=o.close.bind(o),o.toogle=o.toogle.bind(o),o.keepOpen=o.keepOpen.bind(o),o.domRef=o.domRef.bind(o),o}return a.__extends(t,e),t.prototype.componentDidMount=function(){this.props.defaultIsOpened&&this.setState({isOpened:!0})},t.prototype.domRef=function(e){this.target=e},t.prototype.toogle=function(e){e.preventDefault(),this.setState({isOpened:!this.state.isOpened})},t.prototype.open=function(){return a.__awaiter(this,void 0,void 0,(function(){var e,t,o,s,n,i,r;return a.__generator(this,(function(a){switch(a.label){case 0:return e=this.props,t=e.dispatchEvent,o=e.data,s=e.buttons,n=e.disabled,i=e.btnDisabled,n||i?[2]:(r="string"==typeof s?l.resolveVariableAndFilter(s,o,"| raw"):s,[4,t("mouseenter",l.createObject(o,{items:r}))]);case 1:return a.sent(),this.setState({isOpened:!0}),[2]}}))}))},t.prototype.close=function(e){var t,o,s=this,n=this.props,i=n.buttons,a=n.data,r="string"==typeof i?l.resolveVariableAndFilter(i,a,"| raw"):i;this.timer=setTimeout((function(){s.props.dispatchEvent("mouseleave",l.createObject(s.props.data,{items:r})),s.setState({isOpened:!1})}),200),(null===(o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.getAttribute)||void 0===o?void 0:o.call(t,"download"))||e&&e.preventDefault()},t.prototype.keepOpen=function(){this.timer&&clearTimeout(this.timer)},t.prototype.renderButton=function(e,t){var o,s=this,n=this.props,i=n.render,r=n.classnames,d=n.data,p=n.ignoreConfirm,u=n.testIdBuilder;return t="number"==typeof t?t.toString():t,"string"!=typeof e&&Array.isArray(null==e?void 0:e.children)?f("div",{key:t,className:r("DropDown-menu",{"is-mobile":l.isMobile()})},f("li",{key:"".concat(t,"/0"),className:r("DropDown-groupTitle")},e.icon?f(c.default,{cx:r,icon:e.icon,className:"m-r-xs"}):null,f("span",null,e.label)),e.children.map((function(e,o){return s.renderButton(e,"".concat(t,"/").concat(o+1))}))):"string"==typeof e||l.isVisible(e,d)?"divider"===e||"divider"===e.type?f("li",{key:t,className:r("DropDown-divider")}):f("li",{key:t,className:r("DropDown-button",(o={},o["is-disabled"]=l.isDisabled(e,d),o),void 0===e.level?"":e.level?"Button--".concat(e.level):"",l.filterClassNameObject(e.className,d))},i("button/".concat(t),a.__assign(a.__assign({type:"button"},e),{className:"",testIdBuilder:null==u?void 0:u.getChild(e.label||t,d)}),{isMenuItem:!0,ignoreConfirm:p})):null},t.prototype.renderOuter=function(){var e,t=this,o=this.props,s=o.render,n=o.buttons,i=o.data,a=o.popOverContainer,r=o.classnames,d=o.classPrefix,p=o.children,c=o.body;o.align;var u=o.closeOnClick,m=o.closeOnOutside,h=o.menuClassName,b=o.overlayPlacement,v=o.trigger,g="string"==typeof n?l.resolveVariableAndFilter(n,i,"| raw"):n,y=f(l.RootClose,{disabled:!this.state.isOpened,onRootClose:!1!==m?this.close:l.noop},(function(e){return f("ul",{className:r("DropDown-menu-root","DropDown-menu",{"is-mobile":l.isMobile()},h),onClick:u?t.close:l.noop,onMouseEnter:t.keepOpen,ref:e},p||(c?s("body",c):Array.isArray(g)?g.map((function(e,o){return t.renderButton(e,o)})):null))}));return a?f(l.Overlay,{container:a,target:function(){return t.target},placement:b,show:!0},f(l.PopOver,{overlay:"hover"!==v,onHide:this.close,classPrefix:d,className:r("DropDown-popover",h),style:{minWidth:null===(e=this.target)||void 0===e?void 0:e.offsetWidth}},y)):y},t.prototype.render=function(){var e=this.props,t=e.tooltip,o=e.placement,s=e.tooltipContainer,n=e.tooltipTrigger,i=e.tooltipRootClose,r=e.disabledTip,d=e.block,u=e.disabled,m=e.btnDisabled,h=e.btnClassName,b=e.size,v=void 0===b?"default":b,g=e.label,y=e.level,_=e.primary,C=e.className,D=e.style,N=e.classnames,O=e.align,w=e.iconOnly,k=e.icon,B=e.rightIcon,x=e.isActived,T=e.trigger,R=e.data,M=e.hideCaret,A=e.env,S=e.testIdBuilder,I=e.id,P=e.wrapperCustomStyle,j=e.themeCss;return f("div",{className:N("DropDown ",{"DropDown--block":d,"DropDown--alignRight":"right"===O,"is-opened":this.state.isOpened,"is-actived":x,"is-mobile":l.isMobile()},C),style:D,onMouseEnter:"hover"===T?this.open:function(){},onMouseLeave:"hover"===T?this.close:function(){},ref:this.domRef},f(p.default,{placement:o,tooltip:u?r:t,container:s||(null==A?void 0:A.getModalContainer),trigger:n,rootClose:i},f("button",a.__assign({onClick:this.toogle,disabled:u||m},null==S?void 0:S.getTestId(R),{className:N("Button",h,void 0===y?"Button--default":y?"Button--".concat(y):"",{"Button--block":d,"Button--primary":_,"Button--iconOnly":w},"Button--size-".concat(v),l.setThemeClassName(a.__assign(a.__assign({},this.props),{name:"wrapperCustomStyle",id:I,themeCss:P})),l.setThemeClassName(a.__assign(a.__assign({},this.props),{name:"className",id:I,themeCss:j})))}),f(c.default,{c:N,icon:k,className:N("icon m-r-xs",l.setThemeClassName(a.__assign(a.__assign({},this.props),{name:"iconClassName",id:I,themeCss:j})))}),"string"==typeof g?l.filter(g,R):g,B&&f(c.default,{cx:N,icon:B,className:N("icon m-l-xs",l.setThemeClassName(a.__assign(a.__assign({},this.props),{name:"iconClassName",id:I,themeCss:j})))}),M?null:f("span",{className:N("DropDown-caret")},f(c.default,{icon:"right-arrow-bold",className:"icon"})))),this.state.isOpened?this.renderOuter():null,f(l.CustomStyle,a.__assign({},this.props,{config:{themeCss:j,classNames:[{key:"className",weights:{hover:{suf:":not(:disabled):not(.is-disabled)"},active:{suf:":not(:disabled):not(.is-disabled)"}}},{key:"iconClassName",weights:{default:{important:!0},hover:{important:!0,suf:":not(:disabled):not(.is-disabled)"},active:{important:!0,suf:":not(:disabled):not(.is-disabled)"}}}],wrapperCustomStyle:P,id:I},env:A})))},t.defaultProps={placement:"top",tooltipTrigger:["hover","focus"],tooltipRootClose:!1,overlayPlacement:"auto"},t}(u.default.Component),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([l.Renderer({type:"dropdown-button"})],t)}(h);t.DropDownButtonRenderer=b,t.default=h}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputDate.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputDate",(function(e,t,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/DatePicker"),o=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),l=e("node_modules/moment/moment"),d=e("node_modules/amis/lib/renderers/Form/StaticHoc");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(n),c=u(i),m=u(l),_=e("node_modules/react/index"),h=(_.default||_).createElement;(_.default||_).Fragment;var f=function(e){function t(t){var a=e.call(this,t)||this;a.placeholder="";var r=t.minDate,n=t.maxDate,o=t.value,i=t.defaultValue,l=t.setPrinstineValue,d=t.data,u=t.format,p=t.valueFormat,c=t.utc,_=t.changeMotivation;if(i&&o===i){var h=s.filterDate(i,d,p||u);l((c?m.default.utc(h):h).format(p||u))}else if("formulaChanged"===_&&i&&o){(h=s.normalizeDate(o,p||u))&&h.format(p||u)!==o&&l(h.format(p||u))}var f=t.schedules;if("string"==typeof f){var v=s.resolveVariableAndFilter(f,d,"| raw");Array.isArray(v)&&(f=v)}return a.state={minDate:r?s.filterDate(r,d,p||u):void 0,maxDate:n?s.filterDate(n,d,p||u):void 0,schedules:f},a}return o.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;if(e.defaultValue!==t.defaultValue){var a=s.filterDate(t.defaultValue,t.data,t.valueFormat||t.format);t.setPrinstineValue((t.utc?m.default.utc(a):a).format(t.valueFormat||t.format))}if(e.minDate===t.minDate&&e.maxDate===t.maxDate&&e.data===t.data||this.setState({minDate:t.minDate?s.filterDate(t.minDate,t.data,this.props.valueFormat||this.props.format):void 0,maxDate:t.maxDate?s.filterDate(t.maxDate,t.data,this.props.valueFormat||this.props.format):void 0}),s.anyChanged(["schedules","data"],e,t)&&"string"==typeof t.schedules&&s.isPureVariable(t.schedules)){var r=s.resolveVariableAndFilter(t.schedules,t.data,"| raw"),n=s.resolveVariableAndFilter(e.schedules,e.data,"| raw");Array.isArray(r)&&n!==r&&this.setState({schedules:r})}},t.prototype.onScheduleClick=function(e){var t=this.props,a=t.scheduleAction,r=t.onAction,n=t.data,o=t.translate,i={actionType:"dialog",dialog:{title:o("Schedule"),actions:[],closeOnEsc:!0,body:{type:"table",columns:[{name:"time",label:o("Time")},{name:"content",label:o("Content")}],data:"${scheduleData}"}}};r&&r(null,a||i,s.createObject(n,e))},t.prototype.getRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.dateRef=e},t.prototype.dispatchEvent=function(e){var t=this.props,a=t.dispatchEvent,r=t.value;a(e,s.resolveEventData(this.props,{value:r}))},t.prototype.doAction=function(e,t,a){var r,n,o,i,l=this.props,d=l.resetValue,u=l.formStore,p=l.store,c=l.name;if("clear"!==e.actionType){if("reset"===e.actionType){var m=null!==(o=s.getVariable(null!==(n=null==u?void 0:u.pristine)&&void 0!==n?n:null==p?void 0:p.pristine,c))&&void 0!==o?o:d;null===(i=this.dateRef)||void 0===i||i.reset(m)}}else null===(r=this.dateRef)||void 0===r||r.clear()},t.prototype.setData=function(e){var t=this.props,a=t.data,r=t.valueFormat,n=t.format,o=t.utc,i=t.onChange;if("string"==typeof e||"number"==typeof e||e instanceof Date){var l=s.filterDate(e,a,r||n);e=(o?m.default.utc(l):l).format(r||n)}i(e)},t.prototype.handleChange=function(e){return o.__awaiter(this,void 0,void 0,(function(){return o.__generator(this,(function(t){return(0,this.props.dispatchEvent)("change",s.resolveEventData(this.props,{value:e})),this.props.onChange(e),[2]}))}))},t.prototype.handleClick=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t,a,r,n,i;return o.__generator(this,(function(o){return t=this.props,a=t.dispatchEvent,r=t.utc,n=t.valueFormat,i=t.format,a("click",s.resolveEventData(this.props,{value:(r?m.default.utc(e):e).format(n||i)})),[2]}))}))},t.prototype.handleMouseEnter=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t,a,r,n,i;return o.__generator(this,(function(o){return t=this.props,a=t.dispatchEvent,r=t.utc,n=t.valueFormat,i=t.format,a("mouseenter",s.resolveEventData(this.props,{value:(r?m.default.utc(e):e).format(n||i)})),[2]}))}))},t.prototype.handleMouseLeave=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t,a,r,n,i;return o.__generator(this,(function(o){return t=this.props,a=t.dispatchEvent,r=t.utc,n=t.valueFormat,i=t.format,a("mouseleave",s.resolveEventData(this.props,{value:(r?m.default.utc(e):e).format(n||i)})),[2]}))}))},t.prototype.isDisabledDate=function(e){var t=this.props.disabledDate,a="string"==typeof t?s.str2function(t,"currentDate","props"):t;return"function"==typeof a&&a(e,this.props)},t.prototype.render=function(){var e=this.props,t=e.className;e.style,e.defaultValue,e.defaultData;var a=e.classnames;e.minDate,e.maxDate;var r=e.type,n=e.format,i=e.timeFormat,s=e.valueFormat,l=e.env,d=e.largeMode;e.render;var u=e.mobileUI,c=e.placeholder,m=o.__rest(e,["className","style","defaultValue","defaultData","classnames","minDate","maxDate","type","format","timeFormat","valueFormat","env","largeMode","render","mobileUI","placeholder"]);return"time"===r&&i&&(s=n=i),h("div",{className:a("DateControl",{"is-date":/date$/.test(r),"is-datetime":/datetime$/.test(r)},t)},h(p.default,o.__assign({},m,{env:l,placeholder:null!=c?c:this.placeholder,mobileUI:u,popOverContainer:u?null==l?void 0:l.getModalContainer:m.popOverContainer||l.getModalContainer,popOverContainerSelector:m.popOverContainerSelector},this.state,{valueFormat:s||n,minDateRaw:this.props.minDate,maxDateRaw:this.props.maxDate,classnames:a,onRef:this.getRef,schedules:this.state.schedules,largeMode:d,onScheduleClick:this.onScheduleClick.bind(this),onChange:this.handleChange,onFocus:this.dispatchEvent,onBlur:this.dispatchEvent,disabledDate:this.isDisabledDate,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave})))},t.defaultProps={format:"X",viewMode:"days",inputFormat:"YYYY-MM-DD",timeConstraints:{minutes:{step:1}},clearable:!0},o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"getRef",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"dispatchEvent",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",Promise)],t.prototype,"handleClick",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",Promise)],t.prototype,"handleMouseEnter",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",Promise)],t.prototype,"handleMouseLeave",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"isDisabledDate",null),o.__decorate([d.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(c.default.PureComponent),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=t.props.translate("Date.placeholder"),t}return o.__extends(t,e),t.defaultProps=o.__assign(o.__assign({},f.defaultProps),{strictMode:!1}),t=o.__decorate([s.FormItem({type:"input-date",weight:-150})],t)}(f),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=t.props.translate("DateTime.placeholder"),t}return o.__extends(t,e),t.defaultProps=o.__assign(o.__assign({},f.defaultProps),{inputFormat:"YYYY-MM-DD HH:mm:ss",closeOnSelect:!0,strictMode:!1}),t=o.__decorate([s.FormItem({type:"input-datetime"})],t)}(f),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=t.props.translate("Time.placeholder"),t}return o.__extends(t,e),t.defaultProps=o.__assign(o.__assign({},f.defaultProps),{inputFormat:"HH:mm",viewMode:"time",closeOnSelect:!0}),t=o.__decorate([s.FormItem({type:"input-time"})],t)}(f),D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=t.props.translate("Month.placeholder"),t}return o.__extends(t,e),t.defaultProps=o.__assign(o.__assign({},f.defaultProps),{inputFormat:"YYYY-MM",viewMode:"months",closeOnSelect:!0,strictMode:!1}),t=o.__decorate([s.FormItem({type:"input-month"})],t)}(f),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=t.props.translate("Quarter.placeholder"),t}return o.__extends(t,e),t.defaultProps=o.__assign(o.__assign({},f.defaultProps),{inputFormat:"YYYY [Q]Q",viewMode:"quarters",closeOnSelect:!0,strictMode:!1}),t=o.__decorate([s.FormItem({type:"input-quarter"})],t)}(f),F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=t.props.translate("Year.placeholder"),t}return o.__extends(t,e),t.defaultProps=o.__assign(o.__assign({},f.defaultProps),{inputFormat:"YYYY",viewMode:"years",closeOnSelect:!0,strictMode:!1}),t=o.__decorate([s.FormItem({type:"input-year"})],t)}(f);t.DateControlRenderer=v,t.DatetimeControlRenderer=y,t.MonthControlRenderer=D,t.QuarterControlRenderer=b,t.TimeControlRenderer=g,t.YearControlRenderer=F,t.default=f}));
|
||
;/*!node_modules/amis/lib/renderers/Calendar.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Calendar",(function(e,r,n,d){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=e("node_modules/tslib/tslib"),t=e("node_modules/amis-core/lib/index"),o=e("node_modules/amis/lib/renderers/Form/InputDate"),a=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(r,e),r.defaultProps=s.__assign(s.__assign({},o.DateControlRenderer.defaultProps),{embed:!0}),r=s.__decorate([t.Renderer({type:"calendar"})],r)}(o.DateControlRenderer);r.CalendarRenderer=a}));
|
||
;/*!node_modules/amis/lib/renderers/CollapseGroup.js*/
|
||
amis.define("node_modules/amis/lib/renderers/CollapseGroup",(function(e,t,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/CollapseGroup"),o=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),r=e("node_modules/amis-core/lib/index"),i=e("node_modules/classnames/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(n),u=d(l),c=d(i),m=e("node_modules/react/index"),_=(m.default||m).createElement;(m.default||m).Fragment;var h=function(e){function t(t){return e.call(this,t)||this}return o.__extends(t,e),t.prototype.handleCollapseChange=function(e,t,a){return o.__awaiter(this,void 0,void 0,(function(){var s;return o.__generator(this,(function(n){switch(n.label){case 0:return[4,(0,this.props.dispatchEvent)("change",r.resolveEventData(this.props,{activeKeys:e,collapseId:t,collapsed:a}))];case 1:return null==(s=n.sent())||s.prevented,[2]}}))}))},t.prototype.render=function(){var e=this.props,t=e.defaultActiveKey,a=e.accordion,s=e.expandIcon,n=e.expandIconPosition,l=e.body,i=e.className,d=e.style,m=e.render,h=e.mobileUI,y=e.data,f=e.id,C=e.themeCss,b=e.wrapperCustomStyle,g=e.env,v=this.props.enableFieldSetStyle;return r.isPureVariable(v)&&(v=r.resolveVariableAndFilter(v,y,"| raw")),_(u.default.Fragment,null,_(p.default,{defaultActiveKey:t,accordion:a,expandIcon:s,expandIconPosition:n,className:c.default(i,r.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"className",id:f,themeCss:C})),r.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"wrapperCustomStyle",id:f,themeCss:b}))),style:d,mobileUI:h,onCollapseChange:this.handleCollapseChange},m("body",l||"",{enableFieldSetStyle:v})),_(r.CustomStyle,o.__assign({},this.props,{config:{wrapperCustomStyle:b,id:f,themeCss:C,classNames:[{key:"className"}]},env:g})))},t.defaultProps={enableFieldSetStyle:!0},o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Array,Object,Boolean]),o.__metadata("design:returntype",Promise)],t.prototype,"handleCollapseChange",null),t}(u.default.Component),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([r.Renderer({type:"collapse-group"})],t)}(h);t.CollapseGroupRender=h,t.CollapseGroupRenderer=y}));
|
||
;/*!node_modules/amis/lib/renderers/Color.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Color",(function(e,l,o,r){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=e("node_modules/tslib/tslib"),n=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=a(n),u=e("node_modules/react/index"),i=(u.default||u).createElement;(u.default||u).Fragment;var c=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(l,e),l.prototype.render=function(){var e=this.props,l=e.className,o=e.style,r=e.classnames,t=e.defaultColor,n=e.showValue,a=s.getPropValue(this.props)||t;return i("div",{className:r("ColorField",l),style:o},i("i",{className:r("ColorField-previewIcon"),style:{backgroundColor:a}}),n&&a?i("span",{className:r("ColorField-value")},a):null)},l.defaultProps={className:"",defaultColor:"",showValue:!0},l}(d.default.Component),f=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(l,e),l=t.__decorate([s.Renderer({type:"color"})],l)}(c);l.ColorField=c,l.ColorFieldRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/CRUD.js*/
|
||
amis.define("node_modules/amis/lib/renderers/CRUD",(function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/TooltipWrapper"),n=e("node_modules/amis-ui/lib/components/Html"),o=e("node_modules/amis-ui/lib/components/Icon"),s=e("node_modules/amis-ui/lib/components/Button"),l=e("node_modules/amis-ui/lib/components/Select"),d=e("node_modules/tslib/tslib"),c=e("node_modules/react/index"),u=e("node_modules/lodash/isEqual"),p=e("node_modules/lodash/pickBy"),h=e("node_modules/lodash/omitBy"),v=e("node_modules/amis-core/lib/index"),f=e("node_modules/lodash/pick"),g=e("node_modules/react-dom/index"),m=e("node_modules/lodash/omit"),b=e("node_modules/lodash/find"),y=e("node_modules/lodash/findIndex"),_=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),C=e("node_modules/lodash/isPlainObject"),O=e("node_modules/lodash/memoize");function P(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var S=P(a),T=P(n),F=P(o),A=P(s),I=P(l),x=P(c),D=P(u),k=P(p),w=P(h),M=P(f),R=P(m),Q=P(b),j=P(y),B=P(C),N=P(O),L=e("node_modules/react/index"),E=(L.default||L).createElement;(L.default||L).Fragment;var q=["selectedChange","columnSort","columnFilter","columnSearch","columnToggled","orderChange","rowClick","rowDbClick","rowMouseEnter","rowMouseLeave","selected"],V=function(e){function t(t){var r=e.call(this,t)||this;r.filterOnEvent=N.default((function(e){return w.default(e,(function(e,t){return!q.includes(t)}))})),r.controlRef=r.controlRef.bind(r),r.handleFilterReset=r.handleFilterReset.bind(r),r.handleFilterSubmit=r.handleFilterSubmit.bind(r),r.handleFilterInit=r.handleFilterInit.bind(r),r.handleAction=r.handleAction.bind(r),r.handleBulkAction=r.handleBulkAction.bind(r),r.handleChangePage=r.handleChangePage.bind(r),r.handleBulkGo=r.handleBulkGo.bind(r),r.handleDialogConfirm=r.handleDialogConfirm.bind(r),r.handleDialogClose=r.handleDialogClose.bind(r),r.handleSave=r.handleSave.bind(r),r.handleSaveOrder=r.handleSaveOrder.bind(r),r.handleSelect=r.handleSelect.bind(r),r.handleChildPopOverOpen=r.handleChildPopOverOpen.bind(r),r.handleChildPopOverClose=r.handleChildPopOverClose.bind(r),r.search=r.search.bind(r),r.silentSearch=r.silentSearch.bind(r),r.handleQuery=r.handleQuery.bind(r),r.renderHeaderToolbar=r.renderHeaderToolbar.bind(r),r.renderFooterToolbar=r.renderFooterToolbar.bind(r),r.clearSelection=r.clearSelection.bind(r);var i=t.location,a=t.store,n=t.pageField,o=t.perPageField,s=t.syncLocation;t.loadDataOnce;var l,d=r.getParseQueryOptions(t);return r.mounted=!0,s&&i&&(i.query||i.search)?a.updateQuery(v.parseQuery(i,d),void 0,n,o):s&&!i&&window.location.search&&a.updateQuery(v.parseQuery(window.location,d),void 0,n,o),r.props.store.setFilterTogglable(!!r.props.filterTogglable,r.props.filterDefaultVisible),r.props.api&&r.props.store.updateData({items:[]}),r.props.pickerMode&&(l=v.getPropValue(r.props))&&a.setSelectedItems(l),r}return d.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.store,r=e.autoGenerateFilter,i=e.perPageField;e.columns,this.props.perPage&&!t.query[i||"perPage"]&&t.changePage(t.page,this.props.perPage),(!this.props.filter&&!r||t.filterTogggable&&!t.filterVisible)&&this.handleFilterInit({}),this.parentContainer=this.getClosestParentContainer()},t.prototype.componentDidUpdate=function(e){var t,r,i=this.props,a=e.store;v.anyChanged(["toolbar","headerToolbar","footerToolbar","bulkActions"],e,i)&&(this.renderHeaderToolbar=this.renderHeaderToolbar.bind(this),this.renderFooterToolbar=this.renderFooterToolbar.bind(this)),!this.props.pickerMode||D.default(r=v.getPropValue(this.props),v.getPropValue(e))||D.default(r,a.selectedItems.concat())||a.setSelectedItems(r),!!this.props.filterTogglable!=!!e.filterTogglable&&a.setFilterTogglable(!!i.filterTogglable,i.filterDefaultVisible);var n=!1;if(e.syncLocation&&e.location&&e.location.search!==i.location.search&&(a.updateQuery(v.parseQuery(i.location,this.getParseQueryOptions(i)),void 0,i.pageField,i.perPageField),n=!(!i.api||!v.isObjectShallowModified(a.query,this.lastQuery,!1))),n);else if(e.api&&i.api&&v.isApiOutdated(e.api,i.api,a.fetchCtxOf(e.data,{pageField:e.pageField,perPageField:e.perPageField}),a.fetchCtxOf(i.data,{pageField:i.pageField,perPageField:i.perPageField})))n=!0;else if(!i.api&&v.isPureVariable(i.source)&&i.data!==e.data){var o=v.resolveVariableAndFilter(i.source,i.data,"| raw");this.lastData&&this.lastData===o||(a.initFromScope(i.data,i.source,{columns:null!==(t=a.columns)&&void 0!==t?t:i.columns}),this.lastData=o)}n&&this.search()},t.prototype.componentWillUnmount=function(){var e,t;this.mounted=!1,clearTimeout(this.timer),null===(t=(e=this.filterOnEvent.cache).clear)||void 0===t||t.call(e)},t.prototype.getParseQueryOptions=function(e){var t,r=e.parsePrimitiveQuery;return{parsePrimitive:!!(v.isObject(r)?null==r?void 0:r.enable:r),primitiveTypes:null!==(t=null==r?void 0:r.types)&&void 0!==t?t:["boolean"]}},t.prototype.getClosestParentContainer=function(){var e=g.findDOMNode(this);return null==e?void 0:e.closest("[role=dialog]")},t.prototype.controlRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.control=e},t.prototype.handleAction=function(e,t,r,i,a){var n=this;void 0===i&&(i=!1);var o=this.props,s=o.onAction,l=o.store,c=o.messages,u=o.pickerMode,p=o.env;o.pageField;var h=o.stopAutoRefreshWhenModalIsOpen;if(!l.loading){if("dialog"===t.actionType){l.setCurrentAction(t,this.props.resolveDefinitions);var f=r.index,g=l.items.length;return h&&clearTimeout(this.timer),new Promise((function(e){l.openDialog(r,{hasNext:f<g-1,nextIndex:f+1,hasPrev:f>0,prevIndex:f-1,index:f},(function(r,i){var a;null===(a=t.callback)||void 0===a||a.call(t,r,i),e({confirmed:r,value:i})}),a||n.context)}))}if("ajax"===t.actionType){l.setCurrentAction(t,this.props.resolveDefinitions);var m=r,b=t.redirect&&v.filter(t.redirect,m);return b&&t.blank&&p.jumpTo(b,t,m),l.saveRemote(t.api,m,{successMessage:t.messages&&t.messages.success||c&&c.saveSuccess,errorMessage:t.messages&&t.messages.failed||c&&c.saveFailed}).then((function(e){return d.__awaiter(n,void 0,void 0,(function(){var i,a;return d.__generator(this,(function(n){switch(n.label){case 0:return i=v.createObject(r,e),t.feedback&&v.isVisible(t.feedback,i)?[4,this.openFeedback(t.feedback,i)]:[3,2];case 1:n.sent(),h&&clearTimeout(this.timer),n.label=2;case 2:return(a=t.redirect&&v.filter(t.redirect,i))&&!t.blank&&p.jumpTo(a,t,i),t.reload?this.reloadTarget(v.filterTarget(t.reload,i),i):!a&&this.search(void 0,void 0,!0,!0),t.close&&this.closeTarget(t.close),[2]}}))}))})).catch((function(e){if(i||t.countDown)throw e}))}if("reload"!==t.actionType||t.target){if(u&&("confirm"===t.actionType||"submit"===t.actionType))return l.setCurrentAction(t,this.props.resolveDefinitions),Promise.resolve({items:l.selectedItems.concat()});if(t.onClick){l.setCurrentAction(t,this.props.resolveDefinitions);var y=t.onClick;"string"==typeof y&&(y=v.str2function(y,"event","props","data")),y&&y(e,this.props,r)}else s(e,t,r,i,a||this.context)}else this.reload()}},t.prototype.handleBulkAction=function(e,t,r,i){var a,n=this,o=this.props,s=o.store,l=o.primaryField,c=o.onAction,u=o.messages,p=o.pageField,h=o.stopAutoRefreshWhenModalIsOpen,f=o.env;if(e.length||!1===i.requireSelected){var g=e.map((function(e){return e.hasOwnProperty(l)?e[l]:null})).filter((function(e){return e})).join(","),m=v.createObjectFromChain([s.mergedData,{event:r},d.__assign(d.__assign({},e[0]),{currentPageData:((null===(a=s.mergedData)||void 0===a?void 0:a.items)||[]).concat(),rows:e,items:e,selectedItems:e,unSelectedItems:t,ids:g})]),b=function(){if("dialog"===i.actionType)return n.handleAction(r,d.__assign(d.__assign({},i),{__from:"bulkAction"}),m);"ajax"===i.actionType?v.isEffectiveApi(i.api,m)&&s.saveRemote(i.api,m,{successMessage:i.messages&&i.messages.success||u&&u.saveSuccess,errorMessage:i.messages&&i.messages.failed||u&&u.saveFailed}).then((function(e){return d.__awaiter(n,void 0,void 0,(function(){var t,r,a;return d.__generator(this,(function(n){switch(n.label){case 0:return t=v.createObject(m,e),i.feedback&&v.isVisible(i.feedback,t)?[4,this.openFeedback(i.feedback,t)]:[3,2];case 1:n.sent(),h&&clearTimeout(this.timer),n.label=2;case 2:return i.reload?this.reloadTarget(v.filterTarget(i.reload,t),t):this.search(((a={})[p||"page"]=1,a),void 0,!0,!0),i.close&&this.closeTarget(i.close),(r=i.redirect&&v.filter(i.redirect,t))&&f.jumpTo(r,i,t),[2]}}))}))})).catch((function(){return null})):c&&c(r,i,m,!1,n.context)},y="";!i.ignoreConfirm&&i.confirmText&&f.confirm&&(y=v.filter(i.confirmText,m))?f.confirm(y,v.filter(i.confirmTitle,m)||void 0).then((function(e){return e&&b()})):b()}},t.prototype.handleItemAction=function(e,t){this.doAction(e,t)},t.prototype.handleFilterInit=function(e){var t=this.props,r=t.defaultParams;t.data;var i=t.store,a=t.orderBy,n=t.orderDir;t.dispatchEvent;var o=d.__assign({},r);a&&(o.orderBy=a,o.orderDir=n||"asc"),this.handleFilterSubmit(d.__assign(d.__assign(d.__assign({},o),e),i.query),!1,!0,!1!==this.props.initFetch,!0),i.setPristineQuery();var s=this.props,l=s.pickerMode,c=s.options;l&&i.updateData({items:c||[]})},t.prototype.handleFilterReset=function(e,t){var r=this.props,i=r.store,a=r.syncLocation,n=r.env,o=r.pageField,s=r.perPageField,l={};Object.keys(e).forEach((function(e){return l[e]=""})),i.updateQuery(d.__assign(d.__assign({},l),i.pristineQuery),a&&n&&n.updateLocation?function(e){return n.updateLocation(e)}:void 0,o,s,!0),this.lastQuery=i.query,(null==t?void 0:t.actionType)&&["reset-and-submit","clear-and-submit","submit"].includes(t.actionType)||this.search()},t.prototype.handleFilterSubmit=function(e,t,r,i,a){var n,o,s;void 0===t&&(t=!0),void 0===r&&(r=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var l=this.props,c=l.store,u=l.syncLocation,p=l.env,h=l.pageField,f=l.perPageField,g=l.loadDataOnceFetchOnFilter,m=l.parsePrimitiveQuery,b=this.getParseQueryOptions(this.props);e=d.__assign(d.__assign({},e),k.default(null!==(s=null===(o=null==e?void 0:e.__super)||void 0===o?void 0:o.diff)&&void 0!==s?s:{},(function(e){return void 0===e}))),e=u?v.qsparse(v.qsstringify(e,void 0,!0)):e,m&&(e=v.parsePrimitiveQueryString(e,b)),c.updateQuery(d.__assign(d.__assign({},e),((n={})[h||"page"]=t?1:c.page,n)),u&&p&&p.updateLocation?function(e){return p.updateLocation(e,r)}:void 0,h,f),this.lastQuery=c.query,i&&this.search(void 0,void 0,void 0,!1!==g,a)},t.prototype.handleBulkGo=function(e,t,r){var i=this,a=this.props.store.selectedAction,n=this.props.env,o="";return a.confirmText&&(o=v.filter(a.confirmText,this.props.store.mergedData))?n.confirm(o).then((function(n){return n&&i.handleBulkAction(e,t,r,a)})):this.handleBulkAction(e,t,r,a)},t.prototype.handleDialogConfirm=function(e,t,r,i){var a,n,o,s,l=this.props,c=l.store,u=l.pageField,p=l.stopAutoRefreshWhenModalIsOpen,h=l.interval,f=l.silentPolling,g=l.env;c.closeDialog(!0,e);var m=c.action;if(p&&h&&(this.timer=setTimeout(f?this.silentSearch:this.search,Math.max(h,1e3))),"next"===t.actionType&&"number"==typeof r.nextIndex&&c.data.items[r.nextIndex])return this.handleAction(void 0,d.__assign({},m),v.createObject(v.createObject(c.data,{index:r.nextIndex}),c.data.items[r.nextIndex]));if("prev"===t.actionType&&"number"==typeof r.prevIndex&&c.data.items[r.prevIndex])return this.handleAction(void 0,d.__assign({},m),v.createObject(v.createObject(c.data,{index:r.prevIndex}),c.data.items[r.prevIndex]));if(e.length){var b=e[0];r=v.createObject(r,b);var y=i[0];if(y&&"form"===y.props.type)if(b&&b.__saved)(null!==(n=t.reload)&&void 0!==n?n:m.reload)||this.search(m.__from?((a={})[u||"page"]=1,a):void 0,void 0,!0,!0);else b&&(b.hasOwnProperty("items")&&b.items||b.hasOwnProperty("ids"))&&this.control.bulkUpdate&&this.control.bulkUpdate(b,b.items)}var _=null!==(o=t.reload)&&void 0!==o?o:m.reload;_&&this.reloadTarget(v.filterTarget(_,r),r);var C=null!==(s=t.redirect)&&void 0!==s?s:m.redirect;(C=C&&v.filter(C,r))&&g.jumpTo(C,m,r)},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1);var t=this.props,r=t.store,i=t.stopAutoRefreshWhenModalIsOpen,a=t.silentPolling,n=t.interval;r.closeDialog(e),i&&n&&(this.timer=setTimeout(a?this.silentSearch:this.search,Math.max(n,1e3)))},t.prototype.openFeedback=function(e,t){var r=this;return new Promise((function(i){var a=r.props.store;a.setCurrentAction({type:"button",actionType:"dialog",dialog:e},r.props.resolveDefinitions),a.openDialog(t,void 0,(function(e){i(e)}),r.context)}))},t.prototype.search=function(e,t,r,i,a){var n,o,s,l;return void 0===i&&(i=!1),void 0===a&&(a=!1),d.__awaiter(this,void 0,void 0,(function(){var c,u,p,h,f,g,m,b,y,C,O,P,S,T,F,A,I,x,D,k,w,M,R,Q,j,B,N,L,E;return d.__generator(this,(function(q){switch(q.label){case 0:return c=this.props,u=c.store,p=c.api,h=c.messages,f=c.pageField,g=c.perPageField,m=c.interval,b=c.stopAutoRefreshWhen,y=c.stopAutoRefreshWhenModalIsOpen,C=c.silentPolling,O=c.syncLocation,P=c.syncResponse2Query,S=c.pickerMode,T=c.env,F=c.loadDataOnce,A=c.loadDataOnceFetchOnFilter,I=c.source,x=c.columns,D=c.dispatchEvent,r&&!S&&u.resetSelection(),k="",e&&"string"==typeof e.loadDataMode&&(k="load-more",delete e.loadDataMode),clearTimeout(this.timer),e&&u.updateQuery(e,!k&&O&&T&&T.updateLocation?T.updateLocation:void 0,f,g),this.lastQuery=u.query,w=v.createObject(u.data,u.query),M=(null===(n=this.props)||void 0===n?void 0:n.matchFunc)&&"string"==typeof this.props.matchFunc?v.str2function(this.props.matchFunc,"items","itemsRaw","options"):void 0,v.isEffectiveApi(p,w)?[4,u.fetchInitData(p,w,{successMessage:h&&h.fetchSuccess,errorMessage:h&&h.fetchFailed,autoAppend:!0,forceReload:i,loadDataOnce:F,source:I,silent:t,pageField:f,perPageField:g,loadDataMode:k,syncResponse2Query:P,columns:null!==(o=u.columns)&&void 0!==o?o:x,matchFunc:M,filterOnAllColumns:!1===A})]:[3,4];case 1:return R=q.sent(),_.isAlive(u)?(Q=u.page,j=u.lastPage,B=u.msg,N=u.error,a?[4,null==D?void 0:D("fetchInited",v.createObject(this.props.data,{responseData:(null==R?void 0:R.ok)?null!==(s=u.data)&&void 0!==s?s:{}:R,responseStatus:void 0===(null==R?void 0:R.status)?N?1:0:null==R?void 0:R.status,responseMsg:B}))]:[3,3]):[2,R];case 2:if(null==(L=q.sent())?void 0:L.prevented)return[2,u.data];q.label=3;case 3:return!F&&!u.data.items.length&&!m&&Q>1&&j<Q&&this.search(d.__assign(d.__assign({},u.query),((E={})[f||"page"]=j,E)),!1,void 0),(null==R?void 0:R.ok)&&m&&this.mounted&&(!b||!(y&&u.hasModalOpened||v.evalExpression(b,v.createObject(u.data,u.query))))&&(this.timer=setTimeout(C?this.silentSearch.bind(this,void 0,void 0,!0):this.search.bind(this,void 0,void 0,void 0,!0),Math.max(m,1e3))),[3,5];case 4:I&&u.initFromScope(w,I,{columns:null!==(l=u.columns)&&void 0!==l?l:x,matchFunc:M}),q.label=5;case 5:return[2,u.data]}}))}))},t.prototype.silentSearch=function(e,t,r){return void 0===r&&(r=!1),this.search(e,!0,t,r)},t.prototype.handleChangePage=function(e,t,r){var i,a=this.props,n=a.store,o=a.syncLocation,s=a.env,l=a.pageField,d=a.perPageField,c=a.pageDirectionField,u=a.autoJumpToTopOnPagerChange,p=((i={})[l||"page"]=e,i);if(r&&(p[c||"pageDir"]=r),t&&(p[d||"perPage"]=t),n.updateQuery(p,o&&(null==s?void 0:s.updateLocation)?s.updateLocation:void 0,l,d),this.search(void 0,void 0,void 0),u&&this.control)if(this.control.scrollToTop)this.control.scrollToTop();else{g.findDOMNode(this.control).scrollIntoView();var h=window.scrollY;h&&window.scroll(0,h)}},t.prototype.handleSave=function(e,t,r,i,a,n){var o=this,s=this.props,l=s.store,c=s.quickSaveApi,u=s.quickSaveItemApi,p=s.primaryField,h=s.env,f=s.messages,g=s.reload,m=s.dispatchEvent;if(Array.isArray(e)){if(!v.isEffectiveApi(c))return void(h&&h.alert("CRUD quickSaveApi is required"));var b=v.createObject(l.data,{rows:e,rowsDiff:t,indexes:r,rowsOrigin:a});return e.length&&e[0].hasOwnProperty(p||"id")&&(b.ids=e.map((function(e){return e[p||"id"]})).join(",")),i&&(b.unModifiedItems=i),l.saveRemote(c,b,{successMessage:f&&f.saveFailed,errorMessage:f&&f.saveSuccess}).then((function(e){return d.__awaiter(o,void 0,void 0,(function(){var t,r,i;return d.__generator(this,(function(a){switch(a.label){case 0:return e?[4,null==m?void 0:m("quickSaveSucc",v.extendObject(b,{result:e}))]:[2];case 1:return(null==(t=a.sent())?void 0:t.prevented)?[2]:[2,(r=null!==(i=null==n?void 0:n.reload)&&void 0!==i?i:g)?this.reloadTarget(v.filterTarget(r,b),b):this.search(void 0,void 0,!0,!0)]}}))}))})).catch((function(e){return d.__awaiter(o,void 0,void 0,(function(){return d.__generator(this,(function(t){switch(t.label){case 0:return[4,null==m?void 0:m("quickSaveFail",v.createObject(this.props.data,{error:e}))];case 1:return t.sent(),[2]}}))}))}))}if(v.isEffectiveApi(u)){var y=v.createObject(l.data,{item:e,modified:t,origin:a}),_=v.createObject(y,e);return l.saveRemote(u,_).then((function(e){return d.__awaiter(o,void 0,void 0,(function(){var t,r,i;return d.__generator(this,(function(a){switch(a.label){case 0:return e?[4,null==m?void 0:m("quickSaveItemSucc",v.extendObject(y,{result:e}))]:[2];case 1:return(null==(t=a.sent())?void 0:t.prevented)?[2]:[2,(r=null!==(i=null==n?void 0:n.reload)&&void 0!==i?i:g)?this.reloadTarget(v.filterTarget(r,y),y):this.search(void 0,void 0,!0,!0)]}}))}))})).catch((function(e){return d.__awaiter(o,void 0,void 0,(function(){return d.__generator(this,(function(t){switch(t.label){case 0:return(null==n?void 0:n.resetOnFailed)&&this.control.reset(),[4,null==m?void 0:m("quickSaveItemFail",v.createObject(this.props.data,{error:e}))];case 1:return t.sent(),[2]}}))}))}))}h&&h.alert("CRUD quickSaveItemApi is required!")},t.prototype.handleSaveOrder=function(e,t){var r=this,i=this.props,a=i.store,n=i.saveOrderApi,o=i.orderField,s=i.primaryField,l=i.env,c=i.reload,u=i.dispatchEvent;if(n){var p,h,f=v.createObject(a.data),g=[],m=s&&t[0]&&t[0].hasOwnProperty(s);if(m||(f.idMap={}),f.insertAfter={},t.forEach((function(r){if(~e.indexOf(r))if(p){var i=m?p[s]:t.indexOf(p);f.insertAfter[i]=f.insertAfter[i]||[],m||(f.idMap[i]=p),f.insertAfter[i].push(m?r[s]:r)}else g.push(r);else p=r,h=h||r})),h&&g.length){var b=m?h[s]:t.indexOf(h);m||(f.idMap[b]=h),f.insertBefore={},f.insertBefore[b]=g.map((function(e){return m?e[s]:e}))}else if(g.length){var y=g[0],_=m?y[s]:t.indexOf(y);m||(f.idMap[_]=y),f.insertAfter[_]=g.slice(1).map((function(e){return m?e[s]:e}))}if(o){var C=(a.page-1)*a.perPage||0;t=v.mapTree(t,(function(e,t,r){var i;return v.extendObject(e,((i={})[o]=(1===r?C:0)+t+1,i))}))}if(f.rows=t.concat(),m){var O=function(e){return e.map((function(e){return"".concat(e[s]).concat(Array.isArray(e.children)&&e.children.length?"[".concat(O(e.children),"]"):"")})).join(",")};f.ids=O(t),o&&(f.order=v.mapTree(t,(function(e){return M.default(e,[s,o,"children"])})))}return v.isEffectiveApi(n,f)&&a.saveRemote(n,f).then((function(e){return d.__awaiter(r,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:return e?[4,null==u?void 0:u("saveOrderSucc",v.extendObject(f,{result:e}))]:[2];case 1:return(null==(t=r.sent())?void 0:t.prevented)||(c&&this.reloadTarget(v.filterTarget(c,f),f),this.search(void 0,void 0,!0,!0)),[2]}}))}))})).catch((function(e){return d.__awaiter(r,void 0,void 0,(function(){return d.__generator(this,(function(t){switch(t.label){case 0:return[4,null==u?void 0:u("saveOrderFail",v.createObject(this.props.data,{error:e}))];case 1:return t.sent(),[2]}}))}))}))}l&&l.alert("CRUD saveOrderApi is required!")},t.prototype.handleSelect=function(e,t){var r=this.props,i=r.store,a=r.keepItemSelectionOnPageChange,n=r.primaryField,o=r.multiple,s=r.pickerMode,l=r.strictMode,d=r.onSelect,c=e,u=t;if(a&&i.selectedItems.length){var p=i.selectedItems.concat(),h=i.unSelectedItems.concat(),v=function(e,t){var r=e[n||"id"],i=t[n||"id"];return e===t||r&&(l?r===i:r==i)};e.forEach((function(e){var t=j.default(p,(function(t){return v(t,e)}));~t?p[t]=e:p.push(e);var r=j.default(h,(function(t){return v(t,e)}));~r&&h.splice(r,1)})),t.forEach((function(e){var t=j.default(h,(function(t){return v(t,e)})),r=j.default(p,(function(t){return v(t,e)}));~t?h[t]=e:h.push(e),!~t&&~r&&p.splice(r,1)})),c=p,u=h}s&&!1===o&&c.length>1&&u.push.apply(u,c.splice(0,c.length-1)),i.setSelectedItems(c),i.setUnSelectedItems(u),d&&d(c,u)},t.prototype.handleChildPopOverOpen=function(e){this.props.interval&&e&&~["dialog","drawer"].indexOf(e.mode)&&(this.props.stopAutoRefreshWhenModalIsOpen&&clearTimeout(this.timer),this.props.store.setInnerModalOpened(!0))},t.prototype.handleChildPopOverClose=function(e){var t=this.props,r=t.stopAutoRefreshWhenModalIsOpen,i=t.silentPolling,a=t.interval;e&&~["dialog","drawer"].indexOf(e.mode)&&(this.props.store.setInnerModalOpened(!1),r&&a&&(this.timer=setTimeout(i?this.silentSearch:this.search,Math.max(a,1e3))))},t.prototype.handleQuery=function(e,t,r,i,a){var n,o=this.props,s=o.store,l=o.syncLocation,c=o.env,u=o.pageField,p=o.perPageField,h=o.loadDataOnceFetchOnFilter;return s.updateQuery(i?d.__assign(((n={})[u||"page"]=1,n),e):e,l&&c&&c.updateLocation?c.updateLocation:void 0,u,p,r),this.search(void 0,void 0,null!=a?a:r,null!=t?t:!0===h)},t.prototype.reload=function(e,t,r,i,a,n){return t?this.receive(t,void 0,a,null==n?void 0:n.resetPage,!0):this.search(void 0,void 0,!0,!0)},t.prototype.receive=function(e,t,r,i,a){return this.handleQuery(e,!0,r,i,a)},t.prototype.reloadTarget=function(e,t){},t.prototype.closeTarget=function(e){},t.prototype.doAction=function(e,t,r,i){var a;return void 0===r&&(r=!1),d.__awaiter(this,void 0,void 0,(function(){var n,o,s;return d.__generator(this,(function(l){switch(l.label){case 0:return n=this.props.store,e.actionType&&["submitQuickEdit","toggleExpanded","setExpanded","initDrag","cancelDrag"].includes(e.actionType)?[2,null===(a=this.control)||void 0===a?void 0:a.doAction(e,t,r,i)]:[3,1];case 1:return"selectAll"!==e.actionType?[3,2]:[2,this.handleSelect(n.items.concat(),[])];case 2:return"clearAll"!==e.actionType?[3,3]:[2,this.handleSelect([],n.items.concat())];case 3:return"select"!==e.actionType?[3,5]:[4,v.getMatchedEventTargets(n.items,t,null==i?void 0:i.index,null==i?void 0:i.condition)];case 4:return o=l.sent(),s=n.items.filter((function(e){return!o.includes(e)})),[2,this.handleSelect(o,s)];case 5:return[2,this.handleAction(void 0,e,t,r)]}}))}))},t.prototype.unSelectItem=function(e,t){var r=this.props.store,i=r.selectedItems.concat(),a=r.unSelectedItems.concat(),n=i.indexOf(e);~n&&a.push.apply(a,i.splice(n,1)),r.setSelectedItems(i),r.setUnSelectedItems(a)},t.prototype.clearSelection=function(){var e=this.props.store,t=e.selectedItems.concat(),r=e.unSelectedItems.concat(t);e.setSelectedItems([]),e.setUnSelectedItems(r)},t.prototype.hasBulkActionsToolbar=function(){var e=this.props,t=e.headerToolbar,r=e.footerToolbar,i=function(e){return~["bulkActions","bulk-actions"].indexOf(e.type||e)};return Array.isArray(t)&&Q.default(t,i)||Array.isArray(r)&&Q.default(r,i)},t.prototype.hasBulkActions=function(){var e=this.props,t=e.bulkActions;e.itemActions;var r=e.store;if(!t||!t.length)return!1;var i=[],a=r.mergedData;return t&&t.length&&(i=t.map((function(e){return d.__assign(d.__assign({},e),v.getExprProperties(e,a))})).filter((function(e){return!e.hidden&&!1!==e.visible}))),i.length},t.prototype.renderBulkActions=function(e){var t,r=this,i=this.props,a=i.bulkActions,n=i.itemActions,o=i.store,s=i.render,l=i.classnames,c=i.primaryField;if(!a||!a.length)return null;var u=o.selectedItems,p=o.unSelectedItems,h=[],f=[],g=v.createObject(o.mergedData,{currentPageData:((null===(t=o.mergedData)||void 0===t?void 0:t.items)||[]).concat(),rows:u.concat(),items:u.concat(),selectedItems:u.concat(),unSelectedItems:p.concat(),ids:u.map((function(e){return e.hasOwnProperty(c)?e[c]:null})).filter((function(e){return e})).join(",")});a&&a.length&&(!n||!n.length||u.length>1)&&(h=a.map((function(e){return d.__assign(d.__assign({},e),v.getExprProperties(e,g))})).filter((function(e){return!e.hidden&&!1!==e.visible})));var m=v.createObject(o.data,u.length?u[0]:{});return n&&u.length<=1&&(f=n.map((function(e){return d.__assign(d.__assign({},e),v.getExprProperties(e,m))})).filter((function(e){return!e.hidden&&!1!==e.visible}))),h.length||f.length?E("div",{className:l("Crud-actions")},h.map((function(e,t){return s("bulk-action/".concat(t),d.__assign(d.__assign({},R.default(e,["visibleOn","hiddenOn","disabledOn"])),{type:e.type||"button",ignoreConfirm:!0}),{key:"bulk-".concat(t),data:g,disabled:e.disabled||!1!==e.requireSelected&&!u.length,onAction:r.handleBulkAction.bind(r,u.concat(),p.concat())})})),f.map((function(e,t){return s("bulk-action/".concat(t),d.__assign(d.__assign({},R.default(e,["visibleOn","hiddenOn","disabledOn"])),{type:"button"}),{key:"item-".concat(t),data:m,disabled:e.disabled||1!==u.length,onAction:r.handleItemAction.bind(r,e,m)})}))):null},t.prototype.renderPagination=function(e){var t=this.props,r=t.store,i=t.render,a=t.classnames,n=t.alwaysShowPagination,o=t.perPageAvailable,s=t.testIdBuilder,l=r.page,c=r.lastPage;if("simple"!==r.mode&&r.lastPage<2&&!n)return null;var u={};if(Array.isArray(o)&&(u.perPageAvailable=o),"string"!=typeof e){Object.assign(u,e);var p=e.showPageInput;u.showPageInput=!0===p||c>9&&null==p,u.total=v.resolveVariableAndFilter(e.total,r.data)}else u.showPageInput=c>9;return E("div",{className:a("Crud-pager")},i("pagination",{type:"pagination",testIdBuilder:null==s?void 0:s.getChild("pagination")},d.__assign(d.__assign({},u),{activePage:l,lastPage:c,hasNext:r.hasNext,mode:r.mode,perPage:r.perPage,popOverContainer:this.parentContainer,onPageChange:this.handleChangePage})))},t.prototype.renderStatistics=function(){var e=this.props,t=e.store,r=e.classnames,i=e.translate,a=e.alwaysShowPagination;return t.lastPage<=1&&!a?null:E("div",{className:r("Crud-statistics")},i("CRUD.stat",{page:t.page,lastPage:t.lastPage,total:t.total}))},t.prototype.renderSwitchPerPage=function(e){var t=this,r=this.props,i=r.mobileUI,a=r.store,n=r.perPageAvailable,o=r.classnames,s=r.classPrefix,l=r.translate,d=r.testIdBuilder;if(!e.items.length)return null;var c=i?(n||[5,10,20,50,100]).map((function(e){return{label:e+" 条/页",value:e+""}})):(n||[5,10,20,50,100]).map((function(e){return{label:e,value:e+""}}));return E("div",{className:o("Crud-pageSwitch")},i?null:E("span",null,l("CRUD.perPage")),E(I.default,{classPrefix:s,searchable:!1,placeholder:l("Select.placeholder"),options:c,value:a.perPage+"",onChange:function(e){return t.handleChangePage(1,e.value)},clearable:!1,popOverContainer:this.parentContainer,testIdBuilder:null==d?void 0:d.getChild("perPage")}))},t.prototype.renderLoadMore=function(){var e=this,t=this.props,r=t.store,i=t.classPrefix,a=t.classnames,n=t.translate,o=t.testIdBuilder,s=r.page,l=r.lastPage;return E("div",{className:a("Crud-loadMore")},E(A.default,d.__assign({disabled:s>=l,disabledTip:n("CRUD.loadMoreDisableTip"),classPrefix:i,onClick:function(){return e.search({page:s+1,loadDataMode:"load-more"})},size:"sm"},null==o?void 0:o.getChild("loadMore").getTestId()),n("CRUD.loadMore")))},t.prototype.renderFilterToggler=function(){var e,t,r,i=this.props,a=i.store,n=i.classnames,o=i.translate,s=i.filterTogglable;if(!a.filterTogggable)return null;var l=B.default(s)?d.__assign({},s):{};return a.filterVisible&&(l.icon=null!==(e=l.activeIcon)&&void 0!==e?e:l.icon,l.label=null!==(t=l.activeLabel)&&void 0!==t?t:l.label),E("button",{onClick:function(){return a.setFilterVisible(!a.filterVisible)},className:n("Button Button--size-default Button--default",{"is-active":a.filterVisible})},l.icon?E(F.default,{icon:l.icon,className:"icon m-r-xs"}):!1!==(null==l?void 0:l.icon)?E(F.default,{icon:"filter",className:"icon m-r-xs"}):null,null!==(r=null==l?void 0:l.label)&&void 0!==r?r:o("CRUD.filter"))},t.prototype.renderExportCSV=function(e){var t=this.props,r=t.store,i=t.classPrefix,a=t.translate,n=t.loadDataOnce,o=e.api,s=e.filename;return E(A.default,{classPrefix:i,onClick:function(){return r.exportAsCSV({loadDataOnce:n,api:o,filename:s,data:r.filterData})}},e.label||a("CRUD.exportCSV"))},t.prototype.renderToolbar=function(e,t,r,i){var a=this;if(void 0===t&&(t=0),void 0===r&&(r={}),!e)return null;var n=this.props,o=n.render,s=n.store,l=n.mobileUI,c=n.translate,u=n.testIdBuilder,p=e.type||e;if("bulkActions"===p||"bulk-actions"===p)return this.renderBulkActions(r);if("pagination"===p)return this.renderPagination(e);if("statistics"===p)return this.renderStatistics();if("switch-per-page"===p)return this.renderSwitchPerPage(r);if("load-more"===p)return this.renderLoadMore();if("filter-toggler"===p)return this.renderFilterToggler();if("export-csv"===p)return this.renderExportCSV(e);if("reload"===p){var h={label:"",icon:"fa fa-sync",tooltip:c("reload"),tooltipPlacement:"top",type:"button"};return"object"==typeof e&&(h=d.__assign(d.__assign({},h),R.default(e,["type","align"]))),o("toolbar/".concat(t),h,{onAction:function(){a.reload()}})}if(Array.isArray(e)){var f=e.filter((function(e){return v.isVisible(e,s.filterData)})).map((function(e,t){return{dom:a.renderToolbar(e,t,r,i),toolbar:e}})).filter((function(e){return e.dom})),g=f.length,m=this.props.classnames;return g?E("div",d.__assign({className:m("Crud-toolbar"),key:t},null==u?void 0:u.getChild("toolbar").getTestId()),f.map((function(e,t){var r=e.toolbar,i=e.dom,a=r.type||r,n=r.align||("pagination"===a?"right":"left");return E("div",{key:r.id||t,className:m("Crud-toolbar-item",n?"Crud-toolbar-item--".concat(n):"",{"is-mobile":l})},i)}))):null}var b=i?i(e,t):void 0;if(void 0!==b)return b;var y=r.$$editable;return o("toolbar/".concat(t),e,{data:s.toolbarData,page:s.page,lastPage:s.lastPage,perPage:s.perPage,total:s.total,onQuery:this.handleQuery,onAction:this.handleAction,onChangePage:this.handleChangePage,onBulkAction:this.handleBulkAction,$$editable:y})},t.prototype.renderHeaderToolbar=function(e,t){var r=this.props,i=r.toolbar,a=r.toolbarInline,n=r.headerToolbar;return i&&(n=Array.isArray(n)?a?n.concat(i):[n,i]:n?[n,i]:i),this.renderToolbar(n||[],0,e,t)},t.prototype.renderFooterToolbar=function(e,t){var r=this.props,i=r.toolbar,a=r.toolbarInline,n=r.footerToolbar;return i&&(n=Array.isArray(n)?a?n.concat(i):[n,i]:n?[n,i]:i),this.renderToolbar(n,0,e,t)},t.prototype.renderTag=function(e,t){var r=this.props,i=r.classnames,a=r.labelField,n=r.labelTpl,o=r.primaryField,s=r.valueField;r.translate;var l=r.env;return E("div",{key:t,className:i("Crud-value")},E("span",{className:i("Crud-valueIcon"),onClick:this.unSelectItem.bind(this,e,t)},"×"),E("span",{className:i("Crud-valueLabel")},n?E(T.default,{html:v.filter(n,e),filterHtml:l.filterHtml}):v.getVariable(e,a||"label")||v.getVariable(e,s||o||"id")))},t.prototype.renderSelection=function(){var e=this,t=this.props,r=t.store,i=t.classPrefix,a=t.classnames;t.labelField,t.labelTpl,t.primaryField,t.valueField;var n=t.translate;t.env;var o=t.popOverContainer,s=t.multiple,l=t.maxTagCount,c=t.overflowTagPopover;if(!r.selectedItems.length)return null;var u=r.selectedItems.length,p=r.selectedItems,h=!1!==s&&v.isIntegerInRange(l,{start:0,end:u,left:"inclusive",right:"exclusive"});return h&&(p=d.__spreadArray(d.__spreadArray([],d.__read(r.selectedItems.slice(0,l)),!1),[{label:"+ ".concat(u-l," ..."),value:"__overflow_tag__"}],!1)),E("div",{className:a("Crud-selection")},E("div",{className:a("Crud-selectionLabel")},n("CRUD.selected",{total:r.selectedItems.length})),p.map((function(t,s){return h&&s===l?E(S.default,{key:s,container:o,tooltip:d.__assign(d.__assign({placement:"top",trigger:"hover",showArrow:!1,offset:[0,-10],tooltipClassName:a("Crud-selection-overflow",null==c?void 0:c.tooltipClassName),title:n("已选项")},R.default(c,["children","content","tooltipClassName"])),{children:function(){return E("div",{className:a("".concat(i,"Crud-selection-overflow-wrapper"))},r.selectedItems.slice(l,u).map((function(t,r){var i=r+l;return e.renderTag(t,i)})))}})},E("div",{key:s,className:a("Crud-value")},E("span",{className:a("Crud-valueLabel")},t.label))):e.renderTag(t,s)})),E("a",{onClick:this.clearSelection,className:a("Crud-selectionClear")},n("clear")))},t.prototype.render=function(){var e,t=this.props,r=t.className,i=t.style,a=t.bodyClassName,n=t.filter,o=t.render,s=t.store,l=t.mode;t.syncLocation,t.children;var c=t.bulkActions,u=t.pickerMode,p=t.multiple,h=t.strictMode,f=t.valueField,g=t.primaryField;t.value;var m=t.hideQuickSaveBtn,b=t.itemActions,y=t.classnames,_=t.keepItemSelectionOnPageChange,C=t.maxKeepItemSelectionLength,O=t.maxItemSelectionLength;t.onAction;var P=t.popOverContainer,S=t.translate;t.onQuery;var T=t.autoGenerateFilter;t.onSelect;var F=t.autoFillHeight,A=t.onEvent;t.onSave,t.onSaveOrder,t.onPopOverOpened,t.onPopOverClosed,t.onSearchableFromReset,t.onSearchableFromSubmit,t.onSearchableFromInit,t.headerToolbarRender,t.footerToolbarRender;var I=t.testIdBuilder,x=t.id,D=t.filterCanAccessSuperData,k=void 0===D||D,w=d.__rest(t,["className","style","bodyClassName","filter","render","store","mode","syncLocation","children","bulkActions","pickerMode","multiple","strictMode","valueField","primaryField","value","hideQuickSaveBtn","itemActions","classnames","keepItemSelectionOnPageChange","maxKeepItemSelectionLength","maxItemSelectionLength","onAction","popOverContainer","translate","onQuery","autoGenerateFilter","onSelect","autoFillHeight","onEvent","onSave","onSaveOrder","onPopOverOpened","onPopOverClosed","onSearchableFromReset","onSearchableFromSubmit","onSearchableFromInit","headerToolbarRender","footerToolbarRender","testIdBuilder","id","filterCanAccessSuperData"]);return E("div",d.__assign({className:y("Crud",r,{"is-loading":s.loading,"is-mobile":v.isMobile()}),style:i,"data-id":x},null==I?void 0:I.getChild("wrapper").getTestId()),!n||s.filterTogggable&&!s.filterVisible?null:o("filter",d.__assign(d.__assign({title:S("CRUD.filter"),mode:"inline",submitText:S("search")},n),{type:"form",api:null,testIdBuilder:null==I?void 0:I.getChild("filter")}),{key:"filter",panelClassName:y("Crud-filter",n.panelClassName||"Panel--default"),data:s.filterData,onReset:this.handleFilterReset,onSubmit:this.handleFilterSubmit,onInit:this.handleFilterInit,formStore:void 0,canAccessSuperData:k}),_&&!1!==p?this.renderSelection():null,o("body",d.__assign(d.__assign({},w),{id:x,onEvent:this.filterOnEvent(A),columns:null!==(e=s.columns)&&void 0!==e?e:w.columns,type:l||"table"}),{key:"body",className:y("Crud-body",a),ref:this.controlRef,autoGenerateFilter:!n&&T,filterCanAccessSuperData:k,autoFillHeight:F,selectable:!!(this.hasBulkActionsToolbar()&&this.hasBulkActions()||u),itemActions:b,multiple:void 0===p?!!(c&&c.length>0):p,selected:s.selectedItemsAsArray,strictMode:h,keepItemSelectionOnPageChange:_,maxKeepItemSelectionLength:C,maxItemSelectionLength:O,valueField:f||g,primaryField:g,hideQuickSaveBtn:m,items:s.data.items,query:s.query,orderBy:s.query.orderBy,orderDir:s.query.orderDir,popOverContainer:P,onAction:this.handleAction,onSave:this.handleSave,onSaveOrder:this.handleSaveOrder,onQuery:this.handleQuery,onSelect:this.handleSelect,onPopOverOpened:this.handleChildPopOverOpen,onPopOverClosed:this.handleChildPopOverClose,onSearchableFromReset:this.handleFilterReset,onSearchableFromSubmit:this.handleFilterSubmit,onSearchableFromInit:this.handleFilterInit,headerToolbarRender:this.renderHeaderToolbar,footerToolbarRender:this.renderFooterToolbar,data:s.mergedData,loading:s.loading,host:this,testIdBuilder:null==I?void 0:I.getChild("body")}),o("dialog",d.__assign(d.__assign({},s.action&&s.action.dialog),{type:"dialog"}),{key:"dialog",data:s.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:s.dialogOpen}))},t.propsList=["bulkActions","itemActions","mode","orderField","syncLocation","toolbar","toolbarInline","messages","value","options","multiple","valueField","defaultParams","bodyClassName","perPageAvailable","pageField","perPageField","pageDirectionField","hideQuickSaveBtn","autoJumpToTopOnPagerChange","interval","silentPolling","stopAutoRefreshWhen","stopAutoRefreshWhenModalIsOpen","api","affixHeader","columnsTogglable","placeholder","tableClassName","headerClassName","footerClassName","headerToolbar","footerToolbar","filterTogglable","filterDefaultVisible","autoGenerateFilter","syncResponse2Query","keepItemSelectionOnPageChange","labelTpl","labelField","loadDataOnce","loadDataOnceFetchOnFilter","source","header","columns","size","onChange","onInit","onSaved","onSave","onQuery","formStore","autoFillHeight","maxTagCount","overflowTagPopover","parsePrimitiveQuery","matchFunc"],t.defaultProps={toolbarInline:!0,headerToolbar:["bulkActions"],footerToolbar:["statistics","pagination"],primaryField:"id",syncLocation:!0,pageField:"page",perPageField:"perPage",pageDirectionField:"pageDir",hideQuickSaveBtn:!1,autoJumpToTopOnPagerChange:!0,silentPolling:!1,filterTogglable:!1,filterDefaultVisible:!0,loadDataOnce:!1,autoFillHeight:!1,parsePrimitiveQuery:!0},t}(x.default.Component),U=function(e){function t(t,r){var i=e.call(this,t)||this;return r.registerComponent(i),i}return d.__extends(t,e),t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},t.prototype.reload=function(t,r,i,a,n,o){var s,l=this.context;return(null==o?void 0:o.index)||(null==o?void 0:o.condition)?null===(s=this.control)||void 0===s?void 0:s.reload("",r,i,void 0,void 0,o):t?l.reload(r?"".concat(t,"?").concat(v.qsstringify(r)):t,i):e.prototype.reload.call(this,t,r,i,a,n,o)},t.prototype.receive=function(t,r,i,a,n){return d.__awaiter(this,void 0,void 0,(function(){var o;return d.__generator(this,(function(s){return o=this.context,r?[2,o.send(r,t)]:[2,e.prototype.receive.call(this,t,void 0,i,a,n)]}))}))},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.closeTarget=function(e){this.context.close(e)},t.prototype.setData=function(e,t,r,i){var a,n,o;return d.__awaiter(this,void 0,void 0,(function(){var s,l,c;return d.__generator(this,(function(u){return s=this.props.store,void 0!==r||void 0!==i?[2,null===(n=null===(a=this.control)||void 0===a?void 0:a.setData)||void 0===n?void 0:n.call(a,e,t,r,i)]:(l=(null==e?void 0:e.total)||(null==e?void 0:e.count),c=null!==(o=e.rows)&&void 0!==o?o:e.items,void 0!==l&&s.updateTotal(parseInt(l,10)),[2,s.updateData(d.__assign(d.__assign({},e),c?{items:c}:{}),void 0,t)])}))}))},t.prototype.getData=function(){var e=this.props,t=e.store,r=e.data;return t.getData(r)},t.contextType=v.ScopedContext,t=d.__decorate([v.Renderer({type:"crud",storeType:v.CRUDStore.name,isolateScope:!0}),d.__metadata("design:paramtypes",[Object,Object])],t)}(V);t.CRUDRenderer=U,t.default=V}));
|
||
;/*!node_modules/amis/lib/renderers/CRUD2.js*/
|
||
amis.define("node_modules/amis/lib/renderers/CRUD2",(function(e,t,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/PullRefresh"),i=e("node_modules/amis-ui/lib/components/Html"),n=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),l=e("node_modules/react-dom/index"),d=e("node_modules/lodash/omitBy"),c=e("node_modules/lodash/pick"),u=e("node_modules/lodash/findIndex"),p=e("node_modules/lodash/upperFirst"),m=e("node_modules/amis-core/lib/index"),h=e("node_modules/lodash/pickBy"),g=e("node_modules/lodash/isPlainObject"),y=e("node_modules/lodash/isEmpty");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=f(r),_=f(i),b=f(s),P=f(d),S=f(c),C=f(u),T=f(p),F=f(h),A=f(g),O=f(y),I=e("node_modules/react/index"),Q=(I.default||I).createElement;(I.default||I).Fragment;var R=["selectedChange","columnSort","columnFilter","columnSearch","columnToggled","orderChange","rowClick","rowDbClick","rowMouseEnter","rowMouseLeave","selected"],D=function(e){function t(t){var a=e.call(this,t)||this;a.stopingAutoRefresh=!1;var o=t.location,r=t.store,i=t.syncLocation,n=t.pageField,s=t.perPageField;t.parsePrimitiveQuery;var l=a.getParseQueryOptions(t);a.mounted=!0,i&&o&&(o.query||o.search)?r.updateQuery(m.parseQuery(o,l),void 0,n,s):i&&!o&&window.location.search&&r.updateQuery(m.parseQuery(window.location,l),void 0,n,s),a.props.api&&a.props.store.updateData({items:[]});var d=t.mode,c=t.columns;return"table2"===d&&c&&r.updateColumns(c),a}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.store,a=e.pickerMode,o=e.loadType,r=e.loadDataOnce,i=e.maxLoadNum;if(o&&!r){var n="more"===o?this.props.perPage||10:this.getPaginationPerPage();t.changePage(t.page,n)}else o||t.changePage(1,i||500);if(this.initQuery({}),a){var s=m.getPropValue(this.props);s&&t.setSelectedItems(s)}},t.prototype.componentDidUpdate=function(e){var t,a,o=this.props,r=e.store;o.parsePrimitiveQuery,e.columns!==o.columns&&r.updateColumns(o.columns),this.props.pickerMode&&m.isArrayChildrenModified(a=m.getPropValue(this.props),m.getPropValue(e))&&r.setSelectedItems(a);var i=!1;if(e.syncLocation&&e.location&&e.location.search!==o.location.search&&(r.updateQuery(m.parseQuery(o.location,this.getParseQueryOptions(o)),void 0,o.pageField,o.perPageField),i=!(!o.api||!m.isObjectShallowModified(r.query,this.lastQuery,!1))),i);else if(e.api&&o.api&&m.isApiOutdated(e.api,o.api,r.fetchCtxOf(e.data,{pageField:e.pageField,perPageField:e.perPageField}),r.fetchCtxOf(o.data,{pageField:o.pageField,perPageField:o.perPageField})))i=!0;else if(!o.api&&m.isPureVariable(o.source)){var n=m.resolveVariableAndFilter(o.source,o.data,"| raw");this.lastData&&this.lastData===n||(r.initFromScope(o.data,o.source,{columns:null!==(t=r.columns)&&void 0!==t?t:o.columns}),this.lastData=n)}i&&this.getData()},t.prototype.componentWillUnmount=function(){this.mounted=!1,clearTimeout(this.timer)},t.prototype.getPaginationPerPage=function(){var e=10,t=this.props,a=t.headerToolbar,o=t.footerToolbar;return m.JSONTraverse({headerToolbar:a,footerToolbar:o},(function(t,a,o){"type"!==a||"pagination"!==t||isNaN(null==o?void 0:o.perPage)||(e=+o.perPage)})),e},t.prototype.getParseQueryOptions=function(e){var t,a=e.parsePrimitiveQuery;return{parsePrimitive:!!(m.isObject(a)?null==a?void 0:a.enable:a),primitiveTypes:null!==(t=null==a?void 0:a.types)&&void 0!==t?t:["boolean"]}},t.prototype.controlRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.control=e},t.prototype.initQuery=function(e){var t=this.props,a=t.store,o=t.orderBy,r=t.orderDir,i=t.loadType,s={};o&&(s.orderBy=o,s.orderDir=r||"asc"),this.handleSearch({query:n.__assign(n.__assign(n.__assign({},s),e),a.query),replaceQuery:!1!==this.props.initFetch,loadMore:"more"===i,resetPage:!1}),a.setPristineQuery()},t.prototype.handleLoadMore=function(){var e=this.props,t=e.store,a=e.perPage,o=void 0===a?10:a;t.changePage(t.page+1,o),this.getData(void 0,void 0,void 0,!0)},t.prototype.handleSearch=function(e){var t,a,o=this.props,r=o.store,i=o.syncLocation,s=o.env,l=o.pageField,d=o.perPageField,c=o.parsePrimitiveQuery,u=this.getParseQueryOptions(this.props),p=e||{},h=p.query,g=p.resetQuery,y=p.replaceQuery,f=p.loadMore,v=p.resetPage;h=n.__assign(n.__assign({},h),F.default(null!==(a=null===(t=null==h?void 0:h.__super)||void 0===t?void 0:t.diff)&&void 0!==a?a:{},(function(e){return void 0===e}))),h=i?m.qsparse(m.qsstringify(h,void 0,!0)):h,c&&(h=m.parsePrimitiveQueryString(h,u)),r.updateQuery(g?n.__assign(n.__assign({},h),this.props.store.pristineQuery):h,i&&s&&s.updateLocation?function(e){return s.updateLocation(e,!0)}:void 0,l,d,y),v&&r.changePage(1),this.lastQuery=r.query,this.getData(void 0,void 0,void 0,null!=f&&f)},t.prototype.handleStopAutoRefresh=function(){this.timer&&clearTimeout(this.timer),this.stopingAutoRefresh=!0},t.prototype.handleStartAutoRefresh=function(){this.stopingAutoRefresh=!1,this.reload()},t.prototype.reloadTarget=function(e,t){},t.prototype.closeTarget=function(e){},t.prototype.updateQuery=function(e){this.props.store},t.prototype.getData=function(e,t,a,o){var r,i,s;return void 0===a&&(a=!1),n.__awaiter(this,void 0,void 0,(function(){var l,d,c,u,p,h,g,y,f,v,_,b,P,S,C,T,F,A,O,I,Q;return n.__generator(this,(function(n){switch(n.label){case 0:return l=this.props,d=l.store,c=l.api,u=l.messages,p=l.pageField,h=l.perPageField,g=l.interval,y=l.stopAutoRefreshWhen,f=l.silentPolling,l.syncLocation,v=l.syncResponse2Query,_=l.keepItemSelectionOnPageChange,b=l.stopAutoRefreshWhenModalIsOpen,P=l.pickerMode,l.env,S=l.loadType,C=l.loadDataOnce,T=l.source,F=l.columns,A=l.perPage,!o&&_&&t&&!P&&(d.setSelectedItems([]),d.setUnSelectedItems([])),clearTimeout(this.timer),this.lastQuery=d.query,O=null!=o?o:"more"===S,I=m.createObject(d.data,d.query),O&&A&&d.changePerPage(A),m.isEffectiveApi(c,I)?[4,d.fetchInitData(c,I,{successMessage:u&&u.fetchSuccess,errorMessage:u&&u.fetchFailed,autoAppend:!0,forceReload:a,loadDataOnce:C,source:T,silent:e,pageField:p,perPageField:h,loadDataMode:O,syncResponse2Query:v,columns:null!==(r=d.columns)&&void 0!==r?r:F,isTable2:!0})]:[3,2];case 1:return(null==(Q=n.sent())?void 0:Q.ok)&&g&&!this.stopingAutoRefresh&&this.mounted&&(!y||!y||!m.evalExpression(y,m.createObject(d.data,d.query)))&&(!b||!d.dialogOpen&&!(null===(i=null==d?void 0:d.parentStore)||void 0===i?void 0:i.dialogOpen))&&(this.timer=setTimeout(this.getData.bind(this,f,void 0,!0),Math.max(g,1e3))),[3,3];case 2:T&&d.initFromScope(I,T,{columns:null!==(s=d.columns)&&void 0!==s?s:F}),n.label=3;case 3:return[2,d.data]}}))}))},t.prototype.handleChangePage=function(e,t){var a,o=this.props,r=o.store,i=o.syncLocation,n=o.env,s=o.pageField,d=o.perPageField,c=o.autoJumpToTopOnPagerChange,u=((a={})[s||"page"]=e,a);if(t&&(u[d||"perPage"]=t),r.updateQuery(u,i&&(null==n?void 0:n.updateLocation)?n.updateLocation:void 0,s,d),r.changePage(e,t),this.getData(),c&&this.control){l.findDOMNode(this.control).scrollIntoView();var p=window.scrollY;p&&window.scroll(0,p)}},t.prototype.handleSave=function(e,t,a,o,r,i){var n=this,s=this.props,l=s.store,d=s.quickSaveApi,c=s.quickSaveItemApi,u=s.primaryField,p=s.env,h=s.messages,g=s.reload;if(Array.isArray(e)){if(!m.isEffectiveApi(d))return void(p&&p.alert("CRUD quickSaveApi is required"));var y=m.createObject(l.data,{rows:e,rowsDiff:t,indexes:a,rowsOrigin:r});e.length&&e[0].hasOwnProperty(u||"id")&&(y.ids=e.map((function(e){return e[u||"id"]})).join(",")),o&&(y.unModifiedItems=o),l.saveRemote(d,y,{successMessage:h&&h.saveFailed,errorMessage:h&&h.saveSuccess}).then((function(){g&&n.reloadTarget(m.filterTarget(g,y),y),n.getData(void 0,void 0,!0)})).catch((function(){}))}else{if(!m.isEffectiveApi(c))return void(p&&p.alert("CRUD quickSaveItemApi is required!"));var f=m.createObject(l.data,{item:e,modified:t,origin:r}),v=m.createObject(f,e);l.saveRemote(c,v).then((function(){g&&n.reloadTarget(m.filterTarget(g,f),f),n.getData(void 0,void 0,!0)})).catch((function(){(null==i?void 0:i.resetOnFailed)&&n.control.reset()}))}},t.prototype.handleSaveOrder=function(e,t){var a=this,o=this.props,r=o.store,i=o.saveOrderApi,n=o.orderField,s=o.primaryField,l=o.env,d=o.reload;if(i){var c,u,p=m.createObject(r.data),h=[],g=s&&t[0]&&t[0].hasOwnProperty(s);if(g||(p.idMap={}),p.insertAfter={},t.forEach((function(a){if(~e.indexOf(a))if(c){var o=g?c[s]:t.indexOf(c);p.insertAfter[o]=p.insertAfter[o]||[],g||(p.idMap[o]=c),p.insertAfter[o].push(g?a[s]:a)}else h.push(a);else c=a,u=u||a})),u&&h.length){var y=g?u[s]:t.indexOf(u);g||(p.idMap[y]=u),p.insertBefore={},p.insertBefore[y]=h.map((function(e){return g?e[s]:e}))}else if(h.length){var f=h[0],v=g?f[s]:t.indexOf(f);g||(p.idMap[v]=f),p.insertAfter[v]=h.slice(1).map((function(e){return g?e[s]:e}))}if(n){var _=(r.page-1)*r.perPage||0;t=t.map((function(e,t){var a;return m.extendObject(e,((a={})[n]=_+t+1,a))}))}p.rows=t.concat(),g&&(p.ids=t.map((function(e){return e[s]})).join(",")),g&&n&&(p.order=t.map((function(e){return S.default(e,[s,n])}))),m.isEffectiveApi(i,p)&&r.saveRemote(i,p).then((function(){d&&a.reloadTarget(m.filterTarget(d,p),p),a.getData(void 0,void 0,!0)})).catch((function(){}))}else l&&l.alert("CRUD saveOrderApi is required!")},t.prototype.handleSelect=function(e,t){var a=this.props,o=a.store,r=a.keepItemSelectionOnPageChange,i=a.primaryField,n=a.multiple,s=a.pickerMode,l=a.onSelect,d=e,c=t;if(m.isArrayChildrenModified(o.selectedItemsAsArray,d)){if(r&&o.selectedItems.length){var u=o.selectedItems.concat(),p=o.unSelectedItems.concat();e.forEach((function(e){var t=C.default(u,(function(t){return t===e||t[i||"id"]&&t[i||"id"]==e[i||"id"]}));~t?u[t]=e:u.push(e);var a=C.default(p,(function(t){return t===e||t[i||"id"]&&t[i||"id"]==e[i||"id"]}));~a&&p.splice(a,1)})),t.forEach((function(e){var t=C.default(p,(function(t){return t===e||t[i||"id"]&&t[i||"id"]==e[i||"id"]})),a=C.default(u,(function(t){return t===e||t[i||"id"]&&t[i||"id"]==e[i||"id"]}));~t?p[t]=e:p.push(e),!~t&&~a&&u.splice(a,1)})),d=u,c=p}s&&!1===n&&d.length>1&&c.push.apply(c,d.splice(0,d.length-1)),o.setSelectedItems(d),o.setUnSelectedItems(c),l&&l(d)}},t.prototype.handleQuerySearch=function(e,t){var a;void 0===t&&(t=!1);var o=this.props,r=o.store,i=o.syncLocation,s=o.env,l=o.pageField,d=o.perPageField;return r.updateQuery(n.__assign(n.__assign({},e),((a={})[l||"page"]=1,a)),i&&s&&s.updateLocation?s.updateLocation:void 0,l,d),this.getData(void 0,void 0,t)},t.prototype.reload=function(e,t){return t?this.receive(t):this.getData(void 0,void 0,!0)},t.prototype.receive=function(e){return this.handleQuerySearch(e,!0)},t.prototype.doAction=function(e,t,a){if(e.actionType&&["stopAutoRefresh","reload","search","startAutoRefresh","loadMore"].includes(e.actionType))return this["handle".concat(T.default(e.actionType))](t)},t.prototype.handleAction=function(e,t,a,o,r){return void 0===o&&(o=!1),["stopAutoRefresh","reload","search","startAutoRefresh","loadMore"].includes(t.actionType)?this.doAction(t,a,o):this.props.onAction(e,t,a,o,r||this.context)},t.prototype.unSelectItem=function(e,t){var a=this.props.store,o=a.selectedItems.concat(),r=a.unSelectedItems.concat(),i=o.indexOf(e);~i&&r.push.apply(r,o.splice(i,1)),a.setSelectedItems(o),a.setUnSelectedItems(r)},t.prototype.clearSelection=function(){var e=this.props.store,t=e.selectedItems.concat(),a=e.unSelectedItems.concat();e.setSelectedItems([]),e.setUnSelectedItems(a.concat(t))},t.prototype.toggleAllColumns=function(e){var t=this.props.store;t.updateColumns(t.columns.map((function(t){return n.__assign(n.__assign({},t),{toggled:e})})))},t.prototype.toggleToggle=function(e){var t=this.props.store,a=t.columns[e].toggled;t.updateColumns(t.columns.map((function(t,o){return n.__assign(n.__assign({},t),{toggled:e===o?!a:!1!==t.toggled})})))},t.prototype.handlePullRefresh=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,a,o;return n.__generator(this,(function(r){switch(r.label){case 0:return e=this.props,t=e.dispatchEvent,a=e.data,[4,t("pullRefresh",a)];case 1:return(null==(o=r.sent())?void 0:o.prevented)||this.handleLoadMore(),[2]}}))}))},t.prototype.renderChild=function(e,t,a){void 0===a&&(a={});var o,r=this.props,i=r.render,s=r.store,l=r.primaryField,d=void 0===l?"id":l,c=s.selectedItems,u=s.unSelectedItems,p=s.items;o=/^filter/.test(e)?m.createObject(m.createObject(s.filterData,s.getData(this.props.data)),{}):m.createObject(s.mergedData,{items:p.concat(),selectedItems:c.concat(),unSelectedItems:u.concat(),ids:c.map((function(e){return e.hasOwnProperty(d)?e[d]:null})).filter((function(e){return e})).join(",")});var h={activePage:s.page,lastPage:s.lastPage,perPage:s.perPage,total:s.total,onPageChange:this.handleChangePage,cols:s.columns,toggleAllColumns:this.toggleAllColumns,toggleToggle:this.toggleToggle,onQuery:this.handleQuerySearch};return t.type,i(e,t,n.__assign(n.__assign({data:o},a),h))},t.prototype.renderToolbar=function(e,t){var a=this;return t?(t=[].concat(t)).map((function(t,o){return a.renderChild("".concat(e,"/").concat(o),t,{key:o+""})})):null},t.prototype.renderFilter=function(e){var t=this;if(!e||Array.isArray(e)&&0===e.length)return null;var a=Array.isArray(e)?e:m.isObject(e)&&null!=e.type?[e]:[];return a.length<1?null:a.map((function(e,a){return t.renderChild("filter/".concat(a),e,n.__assign({key:a+"filter",data:t.props.store.filterData,onSubmit:function(e){return t.handleSearch({query:e,resetPage:!0})},onReset:function(e){var a={};Object.keys(e).forEach((function(e){return a[e]=""})),t.handleSearch({query:a,resetQuery:!0,replaceQuery:!0,resetPage:!0})}},t.props.mobileUI?{columnCount:1,mode:"normal",collapsible:!0,title:{type:"container",body:[{type:"icon",icon:"column-filter",className:"icon mr-2"},e.title||""]}}:{}))}))},t.prototype.renderSelection=function(){var e=this,t=this.props,a=t.store,o=t.classnames,r=t.labelField,i=t.labelTpl,n=t.primaryField,s=t.translate,l=t.env;return a.selectedItems.length?Q("div",{className:o("Crud-selection")},Q("div",{className:o("Crud-selectionLabel")},s("CRUD.selected",{total:a.selectedItems.length})),a.selectedItems.map((function(t,a){return Q("div",{key:a,className:o("Crud-value")},Q("span",{"data-tooltip":s("delete"),"data-position":"bottom",className:o("Crud-valueIcon"),onClick:e.unSelectItem.bind(e,t,a)},"×"),Q("span",{className:o("Crud-valueLabel")},i?Q(_.default,{html:m.filter(i,t),filterHtml:l.filterHtml}):m.getVariable(t,r||"label")||m.getVariable(t,n||"id")))})),Q("a",{onClick:this.clearSelection.bind(this),className:o("Crud-selectionClear")},s("clear"))):null},t.prototype.transformTable2cards=function(){for(var e,t=this.props,a=t.store,o=t.columns,r=t.card,i=[],s=t.mobileMode.fieldCount||4,l=[],d="",c=(null!==(e=a.columns)&&void 0!==e?e:o)||[],u=0;u<c.length;u++){var p=c[u];if(A.default(p))if("operation"===p.type)l.push.apply(l,n.__spreadArray([],n.__read((null==p?void 0:p.buttons)||[]),!1));else if("button"===p.type&&"operation"===p.name)l.push(p);else{if(!p.label&&p.title&&(p.label=p.title),"static-image"===p.type&&!d){d="${".concat(p.name,"}");continue}i.length<s&&("static-image"===p.type&&p.title&&delete p.title,i.push(p))}}return i.length?{columnsCount:1,type:"cards",card:n.__assign(n.__assign(n.__assign({},r),{body:i,actions:l}),d?{media:{type:"image",url:d,position:"right",className:""},mediaActionPosition:"outside"}:{})}:null},t.prototype.transMobileHeaderToolbar=function(e,t){var a=0,o={},r={},i=null;function n(e,t){Array.isArray(e)?e.forEach((function(e){return n(e,t)})):e&&"object"==typeof e&&("button"===e.type?(a++,"新增"===e.label&&(o=e,r=t)):"search-box"===e.type&&(i=e),(e.items||e.body)&&n(e.items||e.body,e))}e.forEach((function(e){n(e)})),1===a&&o&&(o.label="",o.icon="plus",o.className||(o.className=""),o.className+=" is-fixed-right-bottom",r&&(r.className||(r.className=""),r.className+=" is-fixed-right-bottom-wrapper")),i&&(0===a||1===a&&o)&&O.default(this.props.filterSchema)&&t()},t.prototype.render=function(){var e=this.props,t=e.columns,a=e.className,o=e.style,r=e.bodyClassName,i=e.filter,s=e.render,l=e.store,d=e.mode,c=void 0===d?"table2":d;e.syncLocation,e.children,e.bulkActions;var u=e.pickerMode,p=e.selectable,m=e.multiple;e.valueField;var h=e.primaryField;e.value,e.hideQuickSaveBtn;var g=e.itemActions,y=e.classnames,f=e.keepItemSelectionOnPageChange,_=e.maxKeepItemSelectionLength,S=e.onEvent;e.onAction;var C=e.popOverContainer,T=e.translate;e.onQuery;var F=e.autoGenerateFilter;e.onSelect;var A=e.autoFillHeight,O=e.showSelection,I=e.headerToolbar,D=e.footerToolbar;e.columnsTogglable;var x,M=e.headerToolbarClassName,N=e.footerToolbarClassName,k=e.id,j=e.testIdBuilder,w=e.mobileMode,L=e.mobileUI,q=e.pullRefresh,B=n.__rest(e,["columns","className","style","bodyClassName","filter","render","store","mode","syncLocation","children","bulkActions","pickerMode","selectable","multiple","valueField","primaryField","value","hideQuickSaveBtn","itemActions","classnames","keepItemSelectionOnPageChange","maxKeepItemSelectionLength","onEvent","onAction","popOverContainer","translate","onQuery","autoGenerateFilter","onSelect","autoFillHeight","showSelection","headerToolbar","footerToolbar","columnsTogglable","headerToolbarClassName","footerToolbarClassName","id","testIdBuilder","mobileMode","mobileUI","pullRefresh"]),E=!1,U=null;if(w&&L&&c.includes("table")){var H=this.transformTable2cards();"string"==typeof w&&"cards"===w?H&&(U=H):"object"==typeof w&&(U=n.__assign(n.__assign(n.__assign({},H),w),{card:n.__assign(n.__assign({},null==H?void 0:H.card),w.card)})),U&&this.transMobileHeaderToolbar(I,(function(){E=!0})),U&&!(null==q?void 0:q.disabled)&&(x=n.__assign(n.__assign({normalText:T("pullRefresh.crud2NormalText"),pullingText:T("pullRefresh.crud2PullingText"),loosingText:T("pullRefresh.crud2LoosingText")},q),{disabled:!1}))}else x=q;var W=s("body",n.__assign(n.__assign(n.__assign({},B),{onEvent:P.default(S,(function(e,t){return!R.includes(t)})),type:c,columns:c.startsWith("table")?l.columns||t:void 0,id:k}),U),{key:"body",className:y("Crud2-body",r),ref:this.controlRef,autoGenerateFilter:!i&&F,autoFillHeight:A,checkAll:!1,selectable:!!(null!=p?p:u),itemActions:g,multiple:m,columnsTogglable:!1,selected:u||f?l.selectedItemsAsArray:void 0,keepItemSelectionOnPageChange:f,maxKeepItemSelectionLength:_,primaryField:h,testIdBuilder:j,items:l.data.items,query:l.query,orderBy:l.query.orderBy,orderDir:l.query.orderDir,popOverContainer:C,onSave:this.handleSave.bind(this),onSaveOrder:this.handleSaveOrder,onSearch:this.handleQuerySearch,onSort:this.handleQuerySearch,onSelect:this.handleSelect,onAction:this.handleAction,data:l.mergedData,loading:l.loading,host:this});return Q("div",n.__assign({className:y("Crud2",a,{"is-loading":l.loading,"is-mobile":L,"is-mobile-cards":"cards"===w||"cards"===(null==U?void 0:U.type)}),style:o,"data-id":k},null==j?void 0:j.getTestId()),Q("div",n.__assign({className:y("Crud2-filter")},null==j?void 0:j.getChild("filter").getTestId()),this.renderFilter(i)),Q("div",{className:y("Crud2-toolbar","Crud2-header-toolbar",M,{"is-sticky":E})},this.renderToolbar("headerToolbar",I)),O&&f&&!1!==m?this.renderSelection():null,L&&x&&!x.disabled?Q(v.default,n.__assign({},x,{translate:T,onRefresh:this.handlePullRefresh,direction:"up",loading:l.loading,completed:!l.loading&&l.lastPage>0&&l.page>=l.lastPage,completedText:l.total>0?void 0:""}),W):Q(b.default.Fragment,null,W,Q("div",{className:y("Crud2-toolbar","Crud2-footer-toolbar",N)},this.renderToolbar("footerToolbar",D))))},t.propsList=["mode","syncLocation","value","multiple","valueField","pageField","perPageField","hideQuickSaveBtn","autoJumpToTopOnPagerChange","interval","silentPolling","stopAutoRefreshWhen","stopAutoRefreshWhenModalIsOpen","api","headerToolbar","footerToolbar","autoGenerateFilter","syncResponse2Query","keepItemSelectionOnPageChange","source","onChange","onInit","onSaved","onQuery","autoFillHeight","showSelection","headerToolbarClassName","footerToolbarClassName","primaryField","parsePrimitiveQuery"],t.defaultProps={toolbarInline:!0,syncLocation:!0,hideQuickSaveBtn:!1,autoJumpToTopOnPagerChange:!0,silentPolling:!1,autoFillHeight:!1,showSelection:!0,primaryField:"id",parsePrimitiveQuery:!0},n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"getPaginationPerPage",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],t.prototype,"controlRef",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Number,Number]),n.__metadata("design:returntype",void 0)],t.prototype,"handleChangePage",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array,Array]),n.__metadata("design:returntype",void 0)],t.prototype,"handleSaveOrder",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array,Array]),n.__metadata("design:returntype",void 0)],t.prototype,"handleSelect",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,Boolean]),n.__metadata("design:returntype",void 0)],t.prototype,"handleQuerySearch",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,Object,Boolean]),n.__metadata("design:returntype",void 0)],t.prototype,"doAction",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,Object,Object,Boolean,Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleAction",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Boolean]),n.__metadata("design:returntype",void 0)],t.prototype,"toggleAllColumns",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Number]),n.__metadata("design:returntype",void 0)],t.prototype,"toggleToggle",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],t.prototype,"handlePullRefresh",null),n.__decorate([m.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String,Object,Object]),n.__metadata("design:returntype",void 0)],t.prototype,"renderChild",null),t}(b.default.Component),x=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},t.prototype.reload=function(t,a,o){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(i){return r=this.context,t?[2,r.reload(a?"".concat(t,"?").concat(m.qsstringify(a)):t,o)]:[2,e.prototype.reload.call(this,t,a)]}))}))},t.prototype.receive=function(t,a){return n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(r){return o=this.context,a?[2,o.send(a,t)]:[2,e.prototype.receive.call(this,t)]}))}))},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.closeTarget=function(e){this.context.close(e)},t.contextType=m.ScopedContext,t=n.__decorate([m.Renderer({type:"crud2",storeType:m.CRUDStore.name,isolateScope:!0}),n.__metadata("design:paramtypes",[Object,Object])],t)}(D);t.CRUD2Renderer=x,t.default=D}));
|
||
;/*!node_modules/amis/lib/renderers/Pagination.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Pagination",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Pagination"),i=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),u=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(r),l=s(o),p=e("node_modules/react/index"),m=(p.default||p).createElement;(p.default||p).Fragment;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.formatNumber=function(e,t){var n=void 0;return"string"==typeof e?n="string"==typeof(e=u.isPureVariable(e)?u.resolveVariableAndFilter(e,this.props.data):e)?parseInt(e,10):e:"number"==typeof e&&(n=e),"number"!=typeof n||isNaN(n)?t:n},t.prototype.onPageChange=function(e,t,n){return i.__awaiter(this,void 0,void 0,(function(){var a,r,o,s,d;return i.__generator(this,(function(i){switch(i.label){case 0:return a=this.props,r=a.onPageChange,o=a.dispatchEvent,s=a.data,[4,null==o?void 0:o("change",u.createObject(s,{page:e,perPage:t}))];case 1:return(null==(d=i.sent())?void 0:d.prevented)||(null==r||r(e,t,n)),[2]}}))}))},t.prototype.render=function(){var e=this.props,t=e.maxButtons,n=e.activePage,a=e.total,r=e.perPage;return m(d.default,i.__assign({},this.props,{onPageChange:this.onPageChange,maxButtons:this.formatNumber(t),activePage:this.formatNumber(n),total:this.formatNumber(a),perPage:this.formatNumber(r)}))},i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number,Number,String]),i.__metadata("design:returntype",Promise)],t.prototype,"onPageChange",null),t}(l.default.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([u.Renderer({type:"pagination",alias:["pager"],name:"pagination"})],t)}(g);t.PaginationRenderer=c,t.default=g}));
|
||
;/*!node_modules/amis/lib/renderers/Cards.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Cards",(function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Spinner"),o=e("node_modules/amis-ui/lib/components/Button"),s=e("node_modules/amis-ui/lib/components/Icon"),i=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),d=e("node_modules/react-dom/index"),c=e("node_modules/amis-core/lib/index"),u=e("node_modules/sortablejs/Sortable.min"),p=e("node_modules/lodash/find");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(a),g=h(o),f=h(s),v=h(l),y=h(u),b=h(p),C=e("node_modules/react/index"),k=(C.default||C).createElement;(C.default||C).Fragment;var _=function(e){function t(r){var n=e.call(this,r)||this;n.handleAction=n.handleAction.bind(n),n.handleCheck=n.handleCheck.bind(n),n.handleCheckAll=n.handleCheckAll.bind(n),n.handleQuickChange=n.handleQuickChange.bind(n),n.handleSave=n.handleSave.bind(n),n.handleSaveOrder=n.handleSaveOrder.bind(n),n.reset=n.reset.bind(n),n.dragTipRef=n.dragTipRef.bind(n),n.bodyRef=n.bodyRef.bind(n),n.renderToolbar=n.renderToolbar.bind(n);var a=r.store,o=r.selectable,s=r.draggable,i=r.orderBy,l=r.orderDir,d=r.multiple,c=r.hideCheckToggler,u=r.itemCheckableOn,p=r.itemDraggableOn;return a.update({selectable:o,draggable:s,orderBy:i,orderDir:l,multiple:d,hideCheckToggler:c,itemCheckableOn:u,itemDraggableOn:p}),t.syncItems(a,n.props)&&n.syncSelected(),n}return i.__extends(t,e),t.syncItems=function(e,t,r){var n=t.source,a=c.getPropValue(t,(function(e){return e.items})),o=[],s=!1;if(!Array.isArray(a)||r&&c.getPropValue(r,(function(e){return e.items}))===a){if("string"==typeof n){var i=c.resolveVariableAndFilter(n,t.data,"| raw");(r?c.resolveVariableAndFilter(n,r.data,"| raw"):null)===i?s=!1:(o=Array.isArray(i)?i:[],s=!0)}}else o=a,s=!0;return s&&e.initItems(o),Array.isArray(t.selected)&&e.updateSelected(t.selected,t.valueField),s},t.prototype.componentDidUpdate=function(e){var r=this.props,n=r.store;c.anyChanged(["selectable","draggable","orderBy","orderDir","multiple","hideCheckToggler","itemCheckableOn","itemDraggableOn"],e,r)&&n.update({selectable:r.selectable,draggable:r.draggable,orderBy:r.orderBy,orderDir:r.orderDir,multiple:r.multiple,hideCheckToggler:r.hideCheckToggler,itemCheckableOn:r.itemCheckableOn,itemDraggableOn:r.itemDraggableOn}),c.anyChanged(["source","value","items"],e,r)||!r.value&&!r.items&&(r.data!==e.data||"string"==typeof r.source&&c.isPureVariable(r.source))?t.syncItems(n,r,e)&&this.syncSelected():e.selected!==r.selected&&n.updateSelected(r.selected||[],r.valueField)},t.prototype.bodyRef=function(e){this.body=e},t.prototype.handleAction=function(e,t,r){(0,this.props.onAction)(e,t,r)},t.prototype.handleCheck=function(e){e.toggle(),this.syncSelected()},t.prototype.handleCheckAll=function(){this.props.store.toggleAll(),this.syncSelected()},t.prototype.handleSelectAll=function(){this.props.store.selectAll(),this.syncSelected()},t.prototype.handleClearAll=function(){this.props.store.clearAll(),this.syncSelected()},t.prototype.syncSelected=function(){var e=this.props,t=e.store,r=e.onSelect,n=e.dispatchEvent,a=t.selectedItems.map((function(e){return e.data})),o=t.unSelectedItems.map((function(e){return e.data}));n("selected",c.createObject(t.data,{selectItems:a,unSelectItems:o})),r&&r(a,o)},t.prototype.handleQuickChange=function(e,t,r,n,a){if(e.change(t,n),r&&!n)if(r&&r.api)this.props.onAction(null,{actionType:"ajax",api:r.api,reload:null==a?void 0:a.reload},e.locals);else{var o=this.props,s=o.onSave,i=o.primaryField;s&&s(e.data,c.difference(e.data,e.pristine,["id",i]),e.index,void 0,e.pristine,a)}},t.prototype.handleSave=function(){var e=this.props,t=e.store,r=e.onSave,n=e.primaryField;if(r&&t.modifiedItems.length){var a=t.modifiedItems.map((function(e){return e.data})),o=t.modifiedItems.map((function(e){return e.index}));r(a,t.modifiedItems.map((function(e){return c.difference(e.data,e.pristine,["id",n])})),o,t.items.filter((function(e){return!e.modified})).map((function(e){return e.data})),t.modifiedItems.map((function(e){return e.pristine})))}},t.prototype.handleSaveOrder=function(){var e=this.props,t=e.store,r=e.onSaveOrder;r&&t.movedItems.length&&r(t.movedItems.map((function(e){return e.data})),t.items.map((function(e){return e.data})))},t.prototype.reset=function(){this.props.store.reset()},t.prototype.bulkUpdate=function(e,t){var r=this.props,n=r.store,a=r.primaryField;if(a&&e.ids){var o=e.ids.split(","),s=n.items.filter((function(e){return b.default(o,(function(t){return t&&t==e.data[a]}))})),l=i.__assign(i.__assign({},e),{ids:void 0});s.forEach((function(e){return e.change(l)}))}else if(Array.isArray(t)){(s=n.items.filter((function(e){return~t.indexOf(e.pristine)}))).forEach((function(t){return t.change(e)}))}},t.prototype.getSelected=function(){return this.props.store.selectedItems.map((function(e){return e.data}))},t.prototype.dragTipRef=function(e){!this.dragTip&&e?this.initDragging():this.dragTip&&!e&&this.destroyDragging(),this.dragTip=e},t.prototype.initDragging=function(){if(!this.sortable){var e=this.props.store,t=d.findDOMNode(this),r=this.props.classPrefix;this.sortable=new y.default(t.querySelector(".".concat(r,"Cards-body")),{group:"table",animation:150,handle:".".concat(r,"Card-dragBtn"),ghostClass:"is-dragging",onEnd:function(t){if(t.newIndex!==t.oldIndex){var r=t.to;t.oldIndex<r.childNodes.length-1?r.insertBefore(t.item,r.childNodes[t.oldIndex>t.newIndex?t.oldIndex+1:t.oldIndex]):r.appendChild(t.item),e.exchange(t.oldIndex,t.newIndex)}}})}},t.prototype.destroyDragging=function(){this.sortable&&this.sortable.destroy(),this.sortable=void 0},t.prototype.renderActions=function(e){var t,r=this,n=this.props,a=n.actions,o=n.render,s=n.store,l=n.classnames;return a=Array.isArray(a)?a.concat():[],!~this.renderedToolbars.indexOf("check-all")&&(t=this.renderCheckAll())&&a.unshift({type:"button",children:t}),"header"===e&&!~this.renderedToolbars.indexOf("drag-toggler")&&(t=this.renderDragToggler())&&a.unshift({type:"button",children:t}),Array.isArray(a)&&a.length?k("div",{className:l("Cards-actions")},a.map((function(e,t){return o("action/".concat(t),i.__assign({type:"button"},e),{onAction:r.handleAction,key:t,btnDisabled:s.dragging})}))):null},t.prototype.renderHeading=function(){var e=this.props,t=e.title,r=e.store,n=e.hideQuickSaveBtn,a=e.classnames,o=e.data;return t||r.modified&&!n||r.moved?k("div",{className:a("Cards-heading")},r.modified&&!n?k("span",null,"当前有 ".concat(r.modified," 条记录修改了内容, 但并没有提交。请选择:"),k("button",{type:"button",className:a("Button Button--xs Button--success m-l-sm"),onClick:this.handleSave},k(f.default,{icon:"check",className:"icon m-r-xs"}),"提交"),k("button",{type:"button",className:a("Button Button--xs Button--danger m-l-sm"),onClick:this.reset},k(f.default,{icon:"close",className:"icon m-r-xs"}),"放弃")):r.moved?k("span",null,"当前有 ".concat(r.moved," 条记录修改了顺序, 但并没有提交。请选择:"),k("button",{type:"button",className:a("Button Button--xs Button--success m-l-sm"),onClick:this.handleSaveOrder},k(f.default,{icon:"check",className:"icon m-r-xs"}),"提交"),k("button",{type:"button",className:a("Button Button--xs Button--danger m-l-sm"),onClick:this.reset},k(f.default,{icon:"close",className:"icon m-r-xs"}),"放弃")):t?c.filter(t,o):""):null},t.prototype.renderHeader=function(){var e=this.props,t=e.header,r=e.headerClassName;e.headerToolbar;var n=e.headerToolbarRender,a=e.showHeader,o=e.render,s=e.store,l=e.classnames,d=e.translate;if(!1===a)return null;var c=n?n(i.__assign(i.__assign({},this.props),{selectedItems:s.selectedItems.map((function(e){return e.data})),items:s.items.map((function(e){return e.data})),unSelectedItems:s.unSelectedItems.map((function(e){return e.data}))}),this.renderToolbar):null,u=this.renderActions("header"),p=u||c||s.dragging?k("div",{className:l("Cards-toolbar"),key:"header-toolbar"},u,c,s.dragging?k("div",{className:l("Cards-dragTip"),ref:this.dragTipRef},d("Card.dragTip")):null):null,h=t?k("div",{className:l("Cards-header",r),key:"header"},o("header",t)):null;return h&&p?[h,p]:h||p||null},t.prototype.renderFooter=function(){var e=this.props,t=e.footer,r=e.footerClassName;e.footerToolbar;var n=e.footerToolbarRender,a=e.render,o=e.showFooter,s=e.store,l=e.classnames,d=e.affixFooter;if(!1===o)return null;var c=n?n(i.__assign(i.__assign({},this.props),{selectedItems:s.selectedItems.map((function(e){return e.data})),items:s.items.map((function(e){return e.data})),unSelectedItems:s.unSelectedItems.map((function(e){return e.data}))}),this.renderToolbar):null,u=this.renderActions("footer"),p=t?k("div",{className:l("Cards-footer",r,d?"Cards-footer--affix":""),key:"footer"},a("footer",t)):null,h=u||c?k("div",{className:l("Cards-toolbar",!p&&d?"Cards-footToolbar--affix":""),key:"footer-toolbar"},u,c):null;return p&&h?[h,p]:p||h||null},t.prototype.renderCheckAll=function(){var e=this.props,t=e.store,r=e.multiple,n=e.selectable,a=e.checkAll;return t.selectable&&r&&n&&!t.dragging&&t.items.length&&a?k(g.default,{key:"checkall",tooltip:"切换全选",onClick:this.handleCheckAll,size:"sm",level:t.allChecked?"info":"default"},"全选"):null},t.prototype.renderDragToggler=function(){var e=this,t=this.props,r=t.store;t.multiple,t.selectable;var n=t.popOverContainer,a=t.env,o=t.translate,s=t.dragIcon;return!r.draggable||r.items.length<2?null:k(g.default,{iconOnly:!0,key:"dragging-toggle",tooltip:o("Card.toggleDrag"),tooltipContainer:n||(null==a?void 0:a.getModalContainer),size:"sm",active:r.dragging,onClick:function(t){t.preventDefault(),r.toggleDragging(),r.dragging&&r.clear(),r.dragging&&e.initDragging()}},v.default.isValidElement(s)?s:k(f.default,{icon:"exchange",className:"icon r90"}))},t.prototype.renderToolbar=function(e,t){var r=e.type||e;return"drag-toggler"===r?(this.renderedToolbars.push(r),this.renderDragToggler()):"check-all"===r?(this.renderedToolbars.push(r),this.renderCheckAll()):void 0},t.prototype.renderCard=function(e,t,r,n,a){var o=this,s=this.props,l=s.render,d=s.classnames,u=s.store,p=s.multiple,h=s.checkOnItemClick,m=s.hideCheckToggler,g={className:d(c.filterClassNameObject(t&&t.className||"",r.locals),{"is-checked":r.checked,"is-modified":r.modified,"is-moved":r.moved,"is-dragging":u.dragging}),item:r,key:e,itemIndex:r.index,multiple:p,selectable:u.selectable,checkable:r.checkable,draggable:r.draggable,selected:r.checked,dragging:u.dragging,data:r.locals,onAction:this.handleAction,onCheck:this.handleCheck,onQuickChange:u.dragging?null:this.handleQuickChange};return"card2"===(null==t?void 0:t.type)&&(g=i.__assign(i.__assign({},g),{item:r.locals,onCheck:function(){o.handleCheck(r)}})),k("div",{key:r.index,className:d(n),style:a},l("card/".concat(e),i.__assign({type:t.type||"card",hideCheckToggler:m,checkOnItemClick:h},t),g))},t.prototype.render=function(){var e=this,t=this.props,r=t.className,n=t.style,a=t.store,o=t.columnsCount,s=t.itemClassName,l=t.placeholder,d=t.card,u=t.data,p=t.render,h=t.affixHeader,g=t.masonryLayout,f=t.itemsClassName,y=t.classnames,b=t.translate,C=t.loading,_=void 0!==C&&C,x=t.loadingConfig,T=t.env,A=t.id,N=t.wrapperCustomStyle,S=t.themeCss,I=t.mobileUI;this.renderedToolbars=[];var D=o?"Grid-col--sm".concat(Math.round(12/o)):s||"",O=this.renderHeader(),B=this.renderHeading(),w=this.renderFooter(),R="";g&&(R="Cards--masonry "+D.split(/\s/).map((function(e){return/^Grid-col--(xs|sm|md|lg)(\d+)/.test(e)?"Cards--masonry".concat(c.ucFirst(RegExp.$1)).concat(RegExp.$2):e})).join(" "));var F={},E={};return(null==n?void 0:n.gutterX)>=0&&(F.marginLeft=F.marginRight=-(null==n?void 0:n.gutterX)/2+"px",E.paddingLeft=E.paddingRight=(null==n?void 0:n.gutterX)/2+"px"),(null==n?void 0:n.gutterY)>=0&&(E.marginBottom=(null==n?void 0:n.gutterY)+"px"),!o||g||I||(E.flex="0 0 ".concat(100/o,"%"),E.maxWidth="".concat(100/o,"%")),k("div",{ref:this.bodyRef,className:y("Cards",r,{"Cards--unsaved":!!a.modified||!!a.moved},c.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"baseControlClassName",id:A,themeCss:S})),c.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"wrapperCustomStyle",id:A,themeCss:N}))),style:c.buildStyle(n,u)},h?k("div",{className:y("Cards-fixedTop")},O,B):k(v.default.Fragment,null,O,B),a.items.length?k("div",{className:y("Cards-body Grid",f,R),style:F},a.items.map((function(t,r){return e.renderCard(r,d,t,D,E)}))):k("div",{className:y("Cards-placeholder")},p("placeholder",b(l))),w,k(m.default,{loadingConfig:x,overlay:!0,show:_}),k(c.CustomStyle,i.__assign({},this.props,{config:{wrapperCustomStyle:N,id:A,themeCss:S,classNames:[{key:"baseControlClassName"}]},env:T})))},t.propsList=["header","headerToolbarRender","footer","footerToolbarRender","placeholder","source","selectable","headerClassName","footerClassName","hideQuickSaveBtn","hideCheckToggler","itemCheckableOn","itemDraggableOn","masonryLayout","items","valueField"],t.defaultProps={className:"",placeholder:"placeholder.noData",source:"$items",selectable:!1,headerClassName:"",footerClassName:"",itemClassName:"Grid-col--sm6 Grid-col--md4 Grid-col--lg3",hideCheckToggler:!1,masonryLayout:!1,affixHeader:!0,itemsClassName:"",checkAll:!0},t}(v.default.Component),x=function(e){function t(t,r){var n=e.call(this,t)||this;return r.registerComponent(n),n}return i.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.prototype.receive=function(e,t){var r,n,a,o,s=this.context;return null===(r=null==s?void 0:s.parent)||void 0===r||r.getComponents(),(null===(n=this.props)||void 0===n?void 0:n.host)?null===(o=(a=this.props.host).receive)||void 0===o?void 0:o.call(a,e,t):t?s.send(t,e):void 0},t.prototype.reload=function(e,t,r,n,a,o){var s,l,d;return i.__awaiter(this,void 0,void 0,(function(){var n;return i.__generator(this,(function(a){return this.props.store,(null==o?void 0:o.index)||(null==o?void 0:o.condition)?[2]:(n=this.context,(null===(s=this.props)||void 0===s?void 0:s.host)?[2,null===(d=(l=this.props.host).reload)||void 0===d?void 0:d.call(l,e,t,r)]:e?[2,n.reload(e,r)]:[2])}))}))},t.prototype.setData=function(e,t,r,n){return i.__awaiter(this,void 0,void 0,(function(){var a;return i.__generator(this,(function(o){switch(o.label){case 0:return a=this.props.store,void 0===r&&void 0===n?[3,2]:[4,c.getMatchedEventTargets(a.items,this.props.data,r,n)];case 1:return o.sent().forEach((function(t){t.updateData(e)})),[3,3];case 2:return[2,a.updateData(e,void 0,t)];case 3:return[2]}}))}))},t.prototype.getData=function(){var e=this.props,t=e.store,r=e.data;return t.getData(r)},t.prototype.doAction=function(e,t,r,n){return i.__awaiter(this,void 0,void 0,(function(){var r,a,o,s,l,d;return i.__generator(this,(function(i){switch(i.label){case 0:switch(r=this.props,a=r.store,o=r.valueField,s=r.data,l=null==e?void 0:e.actionType,l){case"selectAll":return[3,1];case"clearAll":return[3,2];case"select":return[3,3];case"initDrag":return[3,5];case"cancelDrag":return[3,6];case"submitQuickEdit":return[3,7]}return[3,9];case 1:return a.clear(),a.toggleAll(),[3,10];case 2:return a.clear(),[3,10];case 3:return[4,c.getMatchedEventTargets(a.items,t||this.props.data,n.index,n.condition,n.selected)];case 4:return d=i.sent(),a.updateSelected(d.map((function(e){return e.data})),o),[3,10];case 5:return a.startDragging(),[3,10];case 6:return a.stopDragging(),[3,10];case 7:return[4,this.handleSave()];case 8:return i.sent(),[3,10];case 9:return[2,this.handleAction(void 0,e,s)];case 10:return[2]}}))}))},t.contextType=c.ScopedContext,t=i.__decorate([c.Renderer({name:"cards",type:"cards",storeType:c.ListStore.name,weight:-100}),i.__metadata("design:paramtypes",[Object,Object])],t)}(_);t.CardsRenderer=x,t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Card2.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Card2",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=e("node_modules/amis-ui/lib/components/Checkbox"),s=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(d),i=l(r),u=e("node_modules/react/index"),p=(u.default||u).createElement;(u.default||u).Fragment;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.checkOnItemClick,a=t.selectable;n&&a&&this.handleCheck()},t.prototype.handleCheck=function(){var e,t;null===(t=(e=this.props).onCheck)||void 0===t||t.call(e)},t.prototype.renderCheckbox=function(){var e=this.props,t=e.selectable,n=e.classnames,a=e.multiple,d=e.disabled,s=e.selected,r=e.hideCheckToggler,o=e.checkOnItemClick,l=e.checkboxClassname;return!t||o&&r?null:p(c.default,{className:n("Card2-checkbox",l),type:a?"checkbox":"radio",disabled:d,checked:s,onChange:this.handleCheck})},t.prototype.renderBody=function(){var e=this.props,t=e.body,n=e.render,a=e.classnames,d=e.bodyClassName,r=s.__rest(e,["body","render","classnames","bodyClassName"]);return p("div",{className:a("Card2-body",d),onClick:this.handleClick},t?n("body",t,r):null)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.wrapperComponent,a=e.classnames,d=e.style,s=e.item,r=e.selected,l=e.checkOnItemClick;return p(n||"div",{className:a("Card2",t,{checkOnItem:l,"is-checked":r}),style:o.buildStyle(d,s)},this.renderBody(),this.renderCheckbox())},t.propsList=["body","className"],t.defaultProps={className:""},s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"handleCheck",null),t}(i.default.Component),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([o.Renderer({type:"card2"})],t)}(m);t.Card2Renderer=h,t.default=m}));
|
||
;/*!node_modules/amis/lib/renderers/Custom.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Custom",(function(n,t,o,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("node_modules/tslib/tslib"),r=n("node_modules/react/index"),d=n("node_modules/react-dom/index"),u=n("node_modules/lodash/memoize"),s=n("node_modules/lodash/isString"),l=n("node_modules/amis-core/lib/index"),p=n("node_modules/lodash/isEqual");function a(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var m=a(r),h=a(d),c=a(u),f=a(s),U=a(p),y=n("node_modules/react/index"),_=(y.default||y).createElement;(y.default||y).Fragment;var C=c.default((function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return new(Function.bind.apply(Function,i.__spreadArray([void 0],i.__read(n),!1)))}),(function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return JSON.stringify(n)})),v=function(n){function t(t){var o=n.call(this,t)||this;return o.onUpdate=function(){},o.onMount=function(){},o.onUnmount=function(){},o.childElemArr=[],o.dom=m.default.createRef(),o.initOnMount(t),o.initOnUpdate(t),o.initOnUnmount(t),o.renderChild=o.renderChild.bind(o),o.recordChildElem=o.recordChildElem.bind(o),o.unmountChildElem=o.unmountChildElem.bind(o),o}return i.__extends(t,n),t.prototype.initOnMount=function(n){n.onMount&&("string"==typeof n.onMount?this.onMount=C("dom","value","onChange","props",n.onMount):this.onMount=n.onMount)},t.prototype.initOnUpdate=function(n){n.onUpdate&&("string"==typeof n.onUpdate?this.onUpdate=C("dom","data","prevData","props",n.onUpdate):this.onUpdate=n.onUpdate)},t.prototype.initOnUnmount=function(n){n.onUnmount&&("string"==typeof n.onUnmount?this.onUnmount=C("props",n.onUnmount):this.onUnmount=n.onUnmount)},t.prototype.componentDidUpdate=function(n){U.default(this.props.onUpdate,n.onUpdate)||this.initOnUpdate(this.props),U.default(this.props.onUpdate,n.onUpdate)&&U.default(this.props.data,n.data)||this.onUpdate(this.dom,this.props.data,n.data,this.props),U.default(this.props.onMount,n.onMount)||this.initOnMount(this.props),U.default(this.props.onUnmount,n.onUnmount)||this.initOnUnmount(this.props)},t.prototype.componentDidMount=function(){var n=this.props,t=n.value,o=n.onChange;this.onMount(this.dom.current,t,o,this.props)},t.prototype.componentWillUnmount=function(){this.onUnmount(this.props),this.unmountChildElem()},t.prototype.recordChildElem=function(n){n&&!this.childElemArr.some((function(t){return t===n}))&&this.childElemArr.push(n)},t.prototype.unmountChildElem=function(){this.childElemArr&&this.childElemArr.length>0&&this.childElemArr.forEach((function(n){return h.default.unmountComponentAtNode(n)}))},t.prototype.renderChild=function(n,t,o){var e=this,i=this.props.render,r=null,d=null;if(f.default(o)){var u=document.getElementById(o);u&&(d=u)}else d=o;if(t&&d){var s=i(n,t);r=h.default.render(s,d,(function(){e.recordChildElem(d)}))}return r},t.prototype.render=function(){var n=this.props,t=n.className,o=n.style,e=n.html,i=n.id,r=n.wrapperComponent,d=n.inline;n.translate;var u=n.classnames;return _(r||d?"span":"div",{ref:this.dom,className:u(t),style:o,id:i,dangerouslySetInnerHTML:{__html:e||""}})},t.defaultProps={inline:!1},t}(m.default.Component),E=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(t,n),t=i.__decorate([l.Renderer({type:"custom"})],t)}(v);t.Custom=v,t.CustomRenderer=E}));
|
||
;/*!node_modules/amis/lib/renderers/Date.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Date",(function(e,t,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}e("node_modules/moment-timezone/index");var i=l(r),d=e("node_modules/react/index"),u=(d.default||d).createElement;(d.default||d).Fragment;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={random:0},t}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,a=t.fromNow,s=t.updateFrequency;a&&s&&(this.refreshInterval=setInterval((function(){e.setState({random:Math.random()})}),s))},t.prototype.componentWillUnmount=function(){clearInterval(this.refreshInterval)},t.prototype.render=function(){var e=this.props,t=e.valueFormat,a=e.format,s=e.displayFormat,r=e.placeholder,l=e.fromNow,d=e.className,m=e.style,p=e.classnames,_=e.locale,f=e.translate,c=e.displayTimeZone;e.data;var h=e.id,y=e.wrapperCustomStyle,v=e.env,g=e.themeCss;e.baseControlClassName;var C=u("span",{className:"text-muted"},r),Y=o.getPropValue(this.props),D=null;if(Y&&(D=o.normalizeDate(Y,t))){var N=D;c&&(N=N.clone().tz(c)),(C=N.format(s||a))&&(D=C),l&&(C=N.locale(_).fromNow())}return C=C||u("span",{className:"text-danger"},f("Date.invalid")),u(i.default.Fragment,null,u("span",{style:m,title:l&&D?D:void 0,className:p("DateField",d,o.setThemeClassName(n.__assign(n.__assign({},this.props),{name:"baseControlClassName",id:h,themeCss:g})),o.setThemeClassName(n.__assign(n.__assign({},this.props),{name:"wrapperCustomStyle",id:h,themeCss:y})))},C),u(o.CustomStyle,n.__assign({},this.props,{config:{wrapperCustomStyle:y,id:h,themeCss:g,classNames:[{key:"baseControlClassName"}]},env:v})))},t.defaultProps={placeholder:"-",format:"YYYY-MM-DD",valueFormat:"X",fromNow:!1,updateFrequency:6e4},t}(i.default.Component),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},m.defaultProps),{format:"YYYY-MM-DD"}),t=n.__decorate([o.Renderer({type:"date"})],t)}(m),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},m.defaultProps),{format:"YYYY-MM-DD HH:mm:ss"}),t=n.__decorate([o.Renderer({type:"datetime"})],t)}(m),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},m.defaultProps),{format:"HH:mm"}),t=n.__decorate([o.Renderer({type:"time"})],t)}(m),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},m.defaultProps),{format:"YYYY-MM"}),t=n.__decorate([o.Renderer({type:"month"})],t)}(m);t.DateField=m,t.DateFieldRenderer=p,t.DateTimeFieldRenderer=_,t.MonthFieldRenderer=c,t.TimeFieldRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/Dialog.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Dialog",(function(e,o,t,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Icon"),s=e("node_modules/amis-ui/lib/components/Modal"),i=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),d=e("node_modules/amis-core/lib/index"),c=e("node_modules/mobx/lib/index"),p=e("node_modules/react-dom/index"),h=e("node_modules/mobx-state-tree/dist/mobx-state-tree");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(a),g=u(s),f=u(i),y=u(l),C=e("node_modules/react/index"),v=(C.default||C).createElement;(C.default||C).Fragment;var _=function(e){function o(o){var t=e.call(this,o)||this;t.isDead=!1,t.$$id=d.guid(),o.store.setEntered(!!o.show),t.handleSelfClose=t.handleSelfClose.bind(t),t.handleAction=t.handleAction.bind(t),t.handleActionSensor=t.handleActionSensor.bind(t),t.handleDialogConfirm=t.handleDialogConfirm.bind(t),t.handleDialogClose=t.handleDialogClose.bind(t),t.handleDrawerConfirm=t.handleDrawerConfirm.bind(t),t.handleDrawerClose=t.handleDrawerClose.bind(t),t.handleEntered=t.handleEntered.bind(t),t.handleExited=t.handleExited.bind(t),t.handleFormInit=t.handleFormInit.bind(t),t.handleFormSaved=t.handleFormSaved.bind(t),t.handleFormChange=t.handleFormChange.bind(t),t.handleChildFinished=t.handleChildFinished.bind(t);var n=o.store;return t.reaction=c.reaction((function(){return"".concat(n.loading).concat(n.error)}),(function(){return t.forceUpdate()})),t}return r.__extends(o,e),o.prototype.componentWillUnmount=function(){this.reaction&&this.reaction(),this.isDead=!0},o.prototype.buildActions=function(){var e=this.props,o=e.actions,t=e.confirm,n=e.translate,a=e.testIdBuilder;if(void 0!==o)return o;var s=[];return s.push({type:"button",testIdBuilder:null==a?void 0:a.getChild("cancel"),actionType:"cancel",label:n("cancel")}),t&&s.push({type:"button",testIdBuilder:null==a?void 0:a.getChild("confirm"),actionType:"confirm",label:n("confirm"),primary:!0}),s},o.prototype.handleSelfClose=function(e,o){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n,a;return r.__generator(this,(function(s){switch(s.label){case 0:return e=this.props,t=e.onClose,n=e.store,[4,(0,e.dispatchEvent)("cancel",this.props.data)];case 1:return(null==(a=s.sent())?void 0:a.prevented)?[2]:(null==a?void 0:a.pendingPromise.length)?[4,a.allDone()]:[3,3];case 2:s.sent(),s.label=3;case 3:return n.updateMessage(),t(o),[2]}}))}))},o.prototype.handleActionSensor=function(e){var o=this,t=this.props.store,n=t.busying;t.markBusying(!0),t.updateMessage(),e.then((function(){t.markBusying(n)})).catch((function(e){o.isDead||(t.updateMessage(e.message,!0),t.markBusying(n))}))},o.prototype.handleAction=function(e,o,t){var n=this.props,a=n.store,s=n.onAction;"reset"===o.type?a.reset():"cancel"===o.actionType?this.handleSelfClose():s&&s(e,o,t)},o.prototype.handleDialogConfirm=function(e,o){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var a=this.props.store;o.mergeData&&1===e.length&&e[0]&&a.updateData(e[0]);var s=a.action.dialog;s&&s.onConfirm&&!1===s.onConfirm.apply(s,r.__spreadArray([e,o],r.__read(t),!1))||a.closeDialog(!0,e)},o.prototype.handleDialogClose=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var t=this.props.store,n=t.action,a=n.dialog;a.onClose&&!1===a.onClose.apply(a,r.__spreadArray([],r.__read(e),!1))||t.closeDialog(e[1])},o.prototype.handleDrawerConfirm=function(e,o){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var a=this.props.store;o.mergeData&&1===e.length&&e[0]&&a.updateData(e[0]);var s=a.action.drawer;s&&s.onConfirm&&!1===s.onConfirm.apply(s,r.__spreadArray([e,o],r.__read(t),!1))||a.closeDrawer(!0,e)},o.prototype.handleDrawerClose=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var t=this.props.store,n=t.action,a=n.drawer;a.onClose&&!1===a.onClose.apply(a,r.__spreadArray([],r.__read(e),!1))||t.closeDrawer.apply(t,r.__spreadArray([],r.__read(e),!1))},o.prototype.handleEntered=function(){var e=this.props,o=e.lazySchema,t=e.store;t.setEntered(!0),t.markBusying(!1),"function"==typeof o&&t.setSchema(o(this.props));var n=document.activeElement;if(n){var a=p.findDOMNode(this);a&&!a.contains(n)&&n.blur()}},o.prototype.handleExited=function(){var e=this.props,o=e.lazySchema,t=e.store,n=e.statusStore;n&&h.isAlive(n)&&n.resetAll(),h.isAlive(t)&&(t.reset(),t.clearMessage(),t.markBusying(!1),t.setEntered(!1),"function"==typeof o&&t.setSchema(""))},o.prototype.handleFormInit=function(e){this.props.store.setFormData(e)},o.prototype.handleFormChange=function(e,o){var t=this.props.store;"string"!=typeof o?t.setFormData(e):t.changeValue(o,e)},o.prototype.handleFormSaved=function(e,o){this.props.store.setFormData(r.__assign(r.__assign({},e),o))},o.prototype.handleChildFinished=function(e,o){},o.prototype.openFeedback=function(e,o){var t=this;return new Promise((function(n){var a=t.props.store;a.setCurrentAction({type:"button",actionType:"dialog",dialog:e},t.props.resolveDefinitions),a.openDialog(o,void 0,(function(e){n(e)}),t.context)}))},o.prototype.getPopOverContainer=function(){return p.findDOMNode(this).querySelector(".".concat(this.props.classPrefix,"Modal-content"))},o.prototype.renderBody=function(e,o){var t=this,n=this.props,a=n.render,s=n.store;if(Array.isArray(e))return e.map((function(e,o){return t.renderBody(e,o)}));var i={key:o,disabled:e&&e.disabled||s.loading,onAction:this.handleAction,onFinished:this.handleChildFinished,popOverContainer:this.getPopOverContainer,onChange:this.handleFormChange,onInit:this.handleFormInit,onSaved:this.handleFormSaved,onActionSensor:this.handleActionSensor,btnDisabled:s.loading,syncLocation:!1};if(!e.type)return a("body".concat(o?"/".concat(o):""),e,i);var l=e;return"form"===l.type&&(l=r.__assign({mode:"horizontal",wrapWithPanel:!1,submitText:null},l)),a("body".concat(o?"/".concat(o):""),l,i)},o.prototype.renderFooter=function(){var e=this,o=this.buildActions(),t=this.props.hideActions;if(!o||!o.length||t)return null;var n=this.props,a=n.store,s=n.render,i=n.env,r=n.classnames,l=n.showErrorMsg,d=n.showLoading,c=n.show,p=n.dialogFooterClassName;return v("div",{className:r("Modal-footer",p)},!1!==d&&a.loading||!1!==l&&a.error?v("div",{className:r("Dialog-info"),key:"info"},!1!==d?v(f.default,{size:"sm",key:"info",show:a.loading}):null,!i.forceSilenceInsideError&&a.error&&!1!==l?v("span",{className:r("Dialog-error")},a.msg):null):null,o.map((function(o,t){return s("action/".concat(t),o,{data:a.formData,onAction:e.handleAction,onActionSensor:void 0,btnDisabled:a.loading,key:t,disabled:o.disabled||a.loading||!c})})))},o.prototype.render=function(){var e=this.props.store,o=r.__assign(r.__assign({},this.props),e.schema),t=o.className,n=o.style,a=o.size,s=o.height,i=o.width,l=o.closeOnEsc,c=o.closeOnOutside,p=o.title,h=o.render,u=o.header,y=o.body,C=o.bodyClassName,_=o.headerClassName,b=o.show,D=o.lazyRender,w=o.lazySchema,T=o.wrapperComponent,A=o.showCloseButton,x=o.env,N=o.classnames,S=o.classPrefix,O=o.translate,k=o.loadingConfig,M=o.overlay,E=o.dialogType,F=o.cancelText,B=o.confirmText,P=o.confirmBtnLevel,z=o.cancelBtnLevel;o.popOverContainer,o.inDesign;var I=o.themeCss,j=o.id,L=r.__rest(o,["className","style","size","height","width","closeOnEsc","closeOnOutside","title","render","header","body","bodyClassName","headerClassName","show","lazyRender","lazySchema","wrapperComponent","showCloseButton","env","classnames","classPrefix","translate","loadingConfig","overlay","dialogType","cancelText","confirmText","confirmBtnLevel","cancelBtnLevel","popOverContainer","inDesign","themeCss","id"]),H=T||g.default;return v(H,r.__assign({},L,{classPrefix:S,className:N(t),style:n,size:a,height:s,width:i,modalClassName:d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogClassName",id:j,themeCss:I})),modalMaskClassName:d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogMaskClassName",id:j,themeCss:I})),backdrop:"static",onHide:this.handleSelfClose,keyboard:l&&!e.loading,closeOnEsc:l,closeOnOutside:!e.dialogOpen&&c,show:b,onEntered:this.handleEntered,onExited:this.handleExited,container:null==x?void 0:x.getModalContainer,enforceFocus:!1,disabled:e.loading,overlay:M,dialogType:E,cancelText:F,confirmText:B,confirmBtnLevel:P,cancelBtnLevel:z}),p&&"string"==typeof p?v("div",{className:N("Modal-header",_,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogHeaderClassName",id:j,themeCss:I})))},!1===A||e.loading?null:v("a",{"data-tooltip":O("Dialog.close"),"data-position":"left",onClick:this.handleSelfClose,className:N("Modal-close")},v(m.default,{icon:"close",className:"icon",iconContent:"Dialog-close"})),v("div",{className:N("Modal-title",d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogTitleClassName",id:j,themeCss:I})))},d.filter(O(p),e.formData))):p?v("div",{className:N("Modal-header",_,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogHeaderClassName",id:j,themeCss:I})))},!1===A||e.loading?null:v("a",{"data-tooltip":O("Dialog.close"),onClick:this.handleSelfClose,className:N("Modal-close")},v(m.default,{icon:"close",className:"icon",iconContent:"Dialog-close"})),h("title",p,{data:e.formData,onAction:this.handleAction,onActionSensor:void 0,btnDisabled:e.loading})):!1===A||e.loading?null:v("a",{"data-tooltip":O("Dialog.close"),onClick:this.handleSelfClose,className:N("Modal-close")},v(m.default,{icon:"close",className:"icon",iconContent:"Dialog-close"})),u?h("header",u,{data:e.formData,onAction:this.handleAction,onActionSensor:void 0,btnDisabled:e.loading}):null,!e.entered&&D||w&&!y?v("div",{className:N("Modal-body",C,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogBodyClassName",id:j,themeCss:I}))),role:"dialog-body"},v(f.default,{overlay:!0,show:!0,size:"lg",loadingConfig:k})):y?v("div",{className:N("Modal-body",C,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"dialogBodyClassName",id:j,themeCss:I}))),role:"dialog-body"},this.renderBody(y,"body"),v(d.CustomStyle,r.__assign({},this.props,{config:{themeCss:I,classNames:[{key:"dialogClassName"},{key:"dialogMaskClassName"},{key:"dialogHeaderClassName"},{key:"dialogTitleClassName"},{key:"dialogBodyClassName"},{key:"dialogFooterClassName"}],id:j},env:x}))):null,y?this.renderFooter():null,y?h("drawer",r.__assign(r.__assign({},e.action&&e.action.drawer),{type:"drawer"}),{key:"drawer",data:e.drawerData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,show:e.drawerOpen,onAction:this.handleAction}):null,y?h("dialog",r.__assign(r.__assign({},e.action&&e.action.dialog),{type:"dialog"}),{key:"dialog",data:e.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:e.dialogOpen,onAction:this.handleAction}):null)},o.propsList=["title","size","closeOnEsc","closeOnOutside","children","bodyClassName","headerClassName","confirm","onClose","onConfirm","show","body","showCloseButton","showErrorMsg","actions","popOverContainer","overlay","draggable"],o.defaultProps={title:"Dialog.title",bodyClassName:"",confirm:!0,show:!1,lazyRender:!1,showCloseButton:!0,wrapperComponent:g.default,closeOnEsc:!1,closeOnOutside:!1,showErrorMsg:!0},r.__decorate([d.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],o.prototype,"getPopOverContainer",null),o}(y.default.Component),b=function(e){function o(o,t){var n=e.call(this,o)||this;return t.registerComponent(n),n}return r.__extends(o,e),o.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this),clearTimeout(this.clearErrorTimer)},o.prototype.tryChildrenToHandle=function(e,o,t){var n=this,a=this.context,s=[],i=this.props,l=i.onConfirm,d=i.store;if(e.target&&s.push.apply(s,r.__spreadArray([],r.__read(e.target.split(",").map((function(e){return a.getComponentByName(e)})).filter((function(e){return e&&e.doAction}))),!1)),!0!==(null==e?void 0:e.isolateScope)&&!s.length)for(var c=a.getComponents().filter((function(e){return!~["drawer","dialog"].indexOf(e.props.type)})),p=c.concat();p.length;){var h=p.pop();if(~["crud","form","wizard"].indexOf(h.props.type)){s.push(h);break}~["drawer","dialog"].indexOf(h.props.type)||~["page","service"].indexOf(h.props.type)&&p.unshift.apply(p,h.context.getComponents())}return!!s.length&&(d.markBusying(!0),d.updateMessage(),Promise.all(s.map((function(t){return t.doAction(r.__assign(r.__assign({},e),{from:n.$$id}),o,!0)}))).then((function(a){"submit"!==e.type&&"submit"!==e.actionType&&"confirm"!==e.actionType||!1===e.close||s.some((function(e){return!1===e.props.closeDialogOnSubmit}))?e.close&&(!0===e.close?n.handleSelfClose():n.closeTarget(e.close)):l&&l(a,t||e,o,s),d.markBusying(!1)})).catch((function(e){n.isDead||(d.updateMessage(e.message,!0),d.markBusying(!1),clearTimeout(n.clearErrorTimer),n.clearErrorTimer=setTimeout((function(){n.isDead||d.updateMessage("")}),3e3))})),!0)},o.prototype.doAction=function(e,o,t){this.handleAction(void 0,e,o)},o.prototype.handleAction=function(e,o,t,n,a,s){return void 0===n&&(n=!1),r.__awaiter(this,void 0,void 0,(function(){var i,l,c,p,h,u,m,g,f,y,C,v=this;return r.__generator(this,(function(_){switch(_.label){case 0:return i=this.props,l=i.onAction,c=i.store,p=i.onConfirm,h=i.env,u=i.dispatchEvent,m=i.onClose,g=i.show,o.from!==this.$$id&&g?(null==s?void 0:s.pendingPromise.length)?[4,s.allDone()]:[3,2]:[2,!!l&&l(e,o,t,n,a||this.context)];case 1:_.sent(),_.label=2;case 2:return f=this.context,"reset"!==o.type?[3,3]:(c.setCurrentAction(o,this.props.resolveDefinitions),c.reset(),[3,19]);case 3:return"close"!==o.actionType&&"cancel"!==o.actionType?[3,7]:[4,u("cancel",d.createObject(this.props.data,t))];case 4:return(null==(y=_.sent())?void 0:y.prevented)?[2]:(null==y?void 0:y.pendingPromise.length)?[4,y.allDone()]:[3,6];case 5:_.sent(),_.label=6;case 6:return c.setCurrentAction(o,this.props.resolveDefinitions),c.updateMessage(),m(),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),[3,19];case 7:return"confirm"!==o.actionType?[3,11]:[4,u("confirm",d.createObject(this.props.data,t))];case 8:return(null==(C=_.sent())?void 0:C.prevented)?[2]:(null==C?void 0:C.pendingPromise.length)?[4,C.allDone()]:[3,10];case 9:_.sent(),_.label=10;case 10:return c.setCurrentAction(o,this.props.resolveDefinitions),this.tryChildrenToHandle(r.__assign(r.__assign({},o),{actionType:"submit"}),t,o)||(c.updateMessage(),!1!==o.close&&m(!0)),[3,19];case 11:return"next"!==o.actionType&&"prev"!==o.actionType?[3,12]:(c.setCurrentAction(o,this.props.resolveDefinitions),"submit"===o.type?this.tryChildrenToHandle(r.__assign(r.__assign({},o),{actionType:"submit",close:!0}),t,o)||this.handleSelfClose(void 0,!0):p([t],o,t,[]),[3,19]);case 12:return"dialog"!==o.actionType?[3,13]:(c.setCurrentAction(o,this.props.resolveDefinitions),[2,new Promise((function(e){c.openDialog(t,void 0,(function(t,n){var a;null===(a=o.callback)||void 0===a||a.call(o,t,n),e({confirmed:t,value:n})}),a||v.context)}))]);case 13:return"drawer"!==o.actionType?[3,14]:(c.setCurrentAction(o,this.props.resolveDefinitions),[2,new Promise((function(e){c.openDrawer(t,void 0,(function(t,n){var a;null===(a=o.callback)||void 0===a||a.call(o,t,n),e({confirmed:t,value:n})}))}))]);case 14:return"reload"!==o.actionType?[3,15]:(c.setCurrentAction(o,this.props.resolveDefinitions),o.target&&f.reload(o.target,t),(o.close||"submit"===o.type)&&(this.handleSelfClose(void 0,"submit"===o.type),o.close&&"string"==typeof o.close&&this.closeTarget(o.close)),[3,19]);case 15:return o.from||!this.tryChildrenToHandle(o,t)?[3,16]:[3,19];case 16:return"ajax"!==o.actionType?[3,17]:(c.setCurrentAction(o,this.props.resolveDefinitions),[2,c.saveRemote(o.api,t,{successMessage:o.messages&&o.messages.success,errorMessage:o.messages&&o.messages.failed}).then((function(){return r.__awaiter(v,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return o.feedback&&d.isVisible(o.feedback,c.data)?[4,this.openFeedback(o.feedback,c.data)]:[3,2];case 1:t.sent(),t.label=2;case 2:return(e=o.redirect&&d.filter(o.redirect,c.data))&&h.jumpTo(e,o,c.data),o.reload&&this.reloadTarget(d.filterTarget(o.reload,c.data),c.data),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),[2]}}))}))})).catch((function(e){if(n||o.countDown)throw e}))]);case 17:return l?[4,l(e,r.__assign(r.__assign({},o),{close:!1}),t,n,a||this.context)]:[3,19];case 18:_.sent(),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),_.label=19;case 19:return[2]}}))}))},o.prototype.handleChildFinished=function(e,o){if(!(o&&o.from===this.$$id||!1===o.close)){var t=this.context.getComponents().filter((function(e){return!~["drawer","dialog","action","button","submit","reset"].indexOf(e.props.type)})),n=this.props.onConfirm,a=this.props.onClose;1!==t.length||"form"!==t[0].props.type&&"wizard"!==t[0].props.type||!0!==o.close&&!1===t[0].props.closeDialogOnSubmit?!0===o.close&&a():n&&n([e],o,{},t)}},o.prototype.handleDialogConfirm=function(o,t){for(var n,a,s=[],i=2;i<arguments.length;i++)s[i-2]=arguments[i];e.prototype.handleDialogConfirm.apply(this,r.__spreadArray([o,t],r.__read(s),!1));var l=this.props.store,d=l.getDialogScoped()||this.context,c=l.action,p=null!==(n=t.reload)&&void 0!==n?n:c.reload;p?d.reload(p,l.data):d.component!==this&&(null===(a=d.component)||void 0===a?void 0:a.reload)?d.component.reload():this.context.getComponents().filter((function(e){return"crud"===e.props.type})).forEach((function(e){return e.reload&&e.reload()}))},o.prototype.handleDrawerConfirm=function(o,t){var n,a=this;e.prototype.handleDrawerConfirm.call(this,o,t);var s=this.props.store,i=s.getDialogScoped()||this.context,r=s.action,l=null!==(n=t.reload)&&void 0!==n?n:r.reload;setTimeout((function(){var e;l?i.reload(l,s.data):i.component!==a&&(null===(e=i.component)||void 0===e?void 0:e.reload)?i.component.reload():a.context.getComponents().filter((function(e){return"crud"===e.props.type})).forEach((function(e){return e.reload&&e.reload()}))}),300)},o.prototype.reloadTarget=function(e,o){this.context.reload(e,o)},o.prototype.closeTarget=function(e){this.context.close(e)},o.prototype.setData=function(e,o){return this.props.store.updateData(e,void 0,o)},o.prototype.getData=function(){return this.props.store.data},o.contextType=d.ScopedContext,o=r.__decorate([d.Renderer({type:"dialog",storeType:d.ModalStore.name,storeExtendsData:!1,isolateScope:!0,shouldSyncSuperStore:function(e,o,t){return!(!e.dialogOpen&&!o.show||o.show===t.show&&!d.isObjectShallowModified(t.data,o.data))}}),r.__metadata("design:paramtypes",[Object,Object])],o)}(_);o.DialogRenderer=b,o.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Divider.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Divider",(function(e,t,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),n=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(r),d=e("node_modules/react/index"),c=(d.default||d).createElement;(d.default||d).Fragment;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.render,i=e.classnames,s=e.className,r=e.style,l=void 0===r?{}:r,o=e.lineStyle,d=e.direction,m=e.color,u=e.rotate,v=e.title,p=e.titleClassName,_=e.titlePosition,f=e.id,C=e.themeCss,h=e.env,g=e.data,y={};m&&(~(null==m?void 0:m.indexOf("linear-gradient"))?y.borderImage=m+" 10":y.borderColor=m);var N=(null==l?void 0:l.transform)||"";u&&(N+=" rotate(".concat(u,"deg)")),n.isPureVariable(v)&&(v=n.resolveVariableAndFilter(v,g));var b=i("Divider",o?"Divider--".concat(o):"","vertical"===d?"Divider--vertical":"Divider--horizontal",v&&"vertical"!==d?"Divider--with-text":"",v&&"vertical"!==d&&_?"Divider--with-text-".concat(_):"",v&&"vertical"!==d?n.setThemeClassName(a.__assign(a.__assign({},this.props),{name:"titleWrapperControlClassName",id:f,themeCss:C})):"",s);return c("div",{className:b,style:a.__assign(a.__assign(a.__assign({},l),y),{transform:N})},v&&"vertical"!==d?c("span",{className:i("Divider-text Divider-text-".concat(_," ").concat(p),n.setThemeClassName(a.__assign(a.__assign({},this.props),{name:"titleControlClassName",id:f,themeCss:C})))},t("title",v)):null,c(n.CustomStyle,a.__assign({},this.props,{config:{themeCss:C,classNames:[{key:"titleWrapperControlClassName",weights:{default:{suf:"::before",important:!0}}},{key:"titleWrapperControlClassName",weights:{default:{suf:"::after",important:!0}}},{key:"titleControlClassName",weights:{default:{important:!0}}}],id:f},env:h})))},t.defaultProps={className:"",lineStyle:"solid",titleClassName:"",titlePosition:"center"},t}(o.default.Component),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([n.Renderer({type:"divider"})],t)}(m);t.DividerRenderer=u,t.default=m}));
|
||
;/*!node_modules/amis/lib/renderers/Each.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Each",(function(e,a,t,s){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),n=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(n),d=e("node_modules/react/index"),m=(d.default||d).createElement;function u(e){var a=e.render,t=e.data,s=e.items,n=e.item,l=e.name,d=e.index,m=e.itemKeyName,u=e.indexKeyName,c=o.default.useMemo((function(){var e,a;return i.createObject(t,r.__assign(r.__assign({},i.isObject(n)?r.__assign({index:d},n):((e={})[l]=n,e)),((a={})[m||"item"]=n,a[u||"index"]=d,a)))}),[n,t,l,d,m,u]);return a("item/".concat(d),s,{data:c})}(d.default||d).Fragment;var c=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(a,e),a.prototype.render=function(){var e=this,a=this.props,t=a.data,s=a.name,n=a.className,l=a.style,o=a.render,d=a.items,c=a.itemKeyName,p=a.indexKeyName,h=a.placeholder,y=a.classnames,_=a.translate,f=a.env,b=a.id,v=a.wrapperCustomStyle,g=a.themeCss,x=i.getPropValue(this.props,(function(e){return e.source?i.resolveVariableAndFilter(e.source,e.data,"| raw"):void 0})),N=i.isObject(x)?Object.keys(x).map((function(e){return{key:e,value:x[e]}})):Array.isArray(x)?x:[],C=i.isPureVariable(this.props.maxLength)?i.resolveVariableAndFilter(this.props.maxLength,this.props.data)||0:this.props.maxLength;return Array.isArray(N)&&C>=1&&N.length>C&&(N=N.slice(0,C)),m("div",{className:y("Each",n,i.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"baseControlClassName",id:b,themeCss:g}))),style:i.buildStyle(l,t)},Array.isArray(N)&&N.length&&d?N.map((function(a,n){return m(u,r.__assign({},e.props,{items:d,key:n,index:n,data:t,item:a,name:s,itemKeyName:c,indexKeyName:p}))})):m("div",{className:y("Each-placeholder")},o("placeholder",_(h))),m(i.CustomStyle,r.__assign({},this.props,{config:{wrapperCustomStyle:v,id:b,themeCss:g,classNames:[{key:"baseControlClassName"}]},env:f})))},a.propsList=["name","items","value"],a.defaultProps={className:"",placeholder:"placeholder.noData"},a}(o.default.Component),p=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(a,e),a=r.__decorate([i.Renderer({type:"each"})],a)}(c);a.EachRenderer=p,a.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Flex.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Flex",(function(e,t,s,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(i),d=e("node_modules/react/index"),u=(d.default||d).createElement;(d.default||d).Fragment;var c=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.items,s=e.direction,n=e.justify,i=e.alignItems,l=e.alignContent,o=e.style,d=e.className,c=e.render,m=e.disabled,p=e.data,f=e.id,y=e.wrapperCustomStyle,_=e.env,h=e.themeCss,x=e.classnames,C=a.buildStyle(o,p),b=r.__assign({display:"flex",flexDirection:s,justifyContent:n,alignItems:i,alignContent:l},C);if(void 0!==b.flexBasis&&b.flex){var v=b.flex.split(" ");b.flex="".concat(v[0]," ").concat(v[1]||v[0]," ").concat(b.flexBasis)}return u("div",{style:b,className:x("Flex",d,a.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"baseControlClassName",id:f,themeCss:h})),a.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"wrapperCustomStyle",id:f,themeCss:y}))),"data-id":f},(Array.isArray(t)?t:t?[t]:[]).map((function(e,t){var s;return c("flexItem/".concat(t),e,{key:"flexItem/".concat(t),disabled:null!==(s=null==e?void 0:e.disabled)&&void 0!==s?s:m})})),u(a.CustomStyle,r.__assign({},this.props,{config:{wrapperCustomStyle:y,id:f,themeCss:h,classNames:[{key:"baseControlClassName"}]},env:_})))},t.defaultProps={direction:"row",justify:"center",alignItems:"stretch",alignContent:"center"},t}(o.default.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.renderBody=function(){var e=this.props,t=e.children,s=e.body,n=e.render,r=e.disabled;return t?"function"==typeof t?t(this.props):t:s?n("body",s,{disabled:r}):null},t.prototype.render=function(){var e=this.props,t=e.className;e.size,e.classnames;var s=e.style;return u("div",{className:t,style:s},this.renderBody())},t.propsList=["body","className","children"],t}(o.default.Component),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([a.Renderer({type:"flex"})],t)}(c),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([a.Renderer({type:"flex-item"})],t)}(m);t.FlexItem=m,t.FlexItemRenderer=f,t.FlexRenderer=p,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Control.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Control",(function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=l(d),u=e("node_modules/react/index"),s=(u.default||u).createElement;(u.default||u).Fragment;var p=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(r,e),r.prototype.renderInput=function(){var e=this.props,r=e.render,t=e.body,n=e.name,o=e.data;return r("inner",t,{value:"string"==typeof n?a.resolveVariable(n,o):void 0})},r.prototype.render=function(){var e,r=this.props,t=r.render,n=r.label;r.control;var d=o.__rest(r,["render","label","control"]);return s(a.FormItemWrap,o.__assign({},d,{formMode:null!==(e=d.mode)&&void 0!==e?e:d.formMode,render:t,sizeMutable:!1,label:n,renderControl:this.renderInput}))},o.__decorate([a.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],r.prototype,"renderInput",null),r=o.__decorate([a.Renderer({type:"control"})],r)}(i.default.Component);r.ControlRenderer=p}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Hidden.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Hidden",(function(e,n,t,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var d=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(n,e),n.prototype.render=function(){return null},n}(u(o).default.Component),s=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(n,e),n=d.__decorate([i.FormItem({type:"hidden",wrap:!1,sizeMutable:!1})],n)}(l);n.HiddenControlRenderer=s,n.default=l}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputText.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputText",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/Input"),o=e("node_modules/amis-ui/lib/components/Icon"),l=e("node_modules/amis-ui/lib/components/OverflowTpl"),r=e("node_modules/tslib/tslib"),u=e("node_modules/react/index"),d=e("node_modules/downshift/dist/downshift.cjs"),p=e("node_modules/match-sorter/dist/match-sorter.cjs"),c=e("node_modules/lodash/debounce"),h=e("node_modules/lodash/find"),m=e("node_modules/amis-core/lib/index"),v=e("node_modules/amis/lib/renderers/Form/StaticHoc");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(s),C=f(i),_=f(o),y=f(l),b=f(u),x=f(d),T=f(c),O=f(h),N=e("node_modules/react/index"),w=(N.default||N).createElement;(N.default||N).Fragment;var V=function(e){function t(t){var n=e.call(this,t)||this,a=t.value;return n.state={isOpen:!1,inputValue:t.multiple||!1===t.creatable?"":n.valueToString(a),isFocused:!1,revealPassword:!1},n.focus=n.focus.bind(n),n.clearValue=n.clearValue.bind(n),n.toggleRevealPassword=n.toggleRevealPassword.bind(n),n.inputRef=n.inputRef.bind(n),n.handleClick=n.handleClick.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleChange=n.handleChange.bind(n),n.handleStateChange=n.handleStateChange.bind(n),n.loadAutoComplete=T.default(n.loadAutoComplete.bind(n),250,{trailing:!0,leading:!1}),n}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.formItem,a=t.autoComplete,s=t.addHook,i=t.formInited,o=t.data,l=t.name;m.isEffectiveApi(a,o)&&n&&(i?n.loadOptions(a,m.createObject(o,{term:""})):s&&(this.unHook=s((function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return[4,n.loadOptions(a,m.createObject(t,{term:""}))];case 1:return e.sent(),n.value&&m.setVariable(t,l,n.value),[2]}}))}))}),"init")))},t.prototype.componentDidUpdate=function(e){var t=this.props;e.value!==t.value&&this.setState({inputValue:t.multiple||!1===t.creatable?"":this.valueToString(t.value)}),e.revealPassword!==t.revealPassword&&!t.revealPassword&&this.setState({revealPassword:!1})},t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook()},t.prototype.inputRef=function(e){this.input=e},t.prototype.doAction=function(e,t,n,a){var s=null==e?void 0:e.actionType;"reset"===s?this.resetValue():"clear"===s?this.clearValue():"focus"===s&&this.focus()},t.prototype.focus=function(){if(this.input){this.input.focus();var e=this.input.value.length;e&&("email"===this.input.type?(this.input.type="text",this.input.setSelectionRange(e,e),this.input.type="email"):this.input.setSelectionRange(e,e))}},t.prototype.resetValue=function(){var e,t;return r.__awaiter(this,void 0,void 0,(function(){var n,a,s,i,o,l,u,d,p,c=this;return r.__generator(this,(function(r){switch(r.label){case 0:return n=this.props,a=n.onChange,s=n.dispatchEvent,i=n.resetValue,o=n.formStore,l=n.store,u=n.name,d=null!==(t=m.getVariable(null!==(e=null==o?void 0:o.pristine)&&void 0!==e?e:null==l?void 0:l.pristine,u))&&void 0!==t?t:i,[4,s("change",m.resolveEventData(this.props,{value:d}))];case 1:return(null==(p=r.sent())?void 0:p.prevented)||(a(d),this.setState({inputValue:d},(function(){c.loadAutoComplete()}))),[2]}}))}))},t.prototype.clearValue=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n,a,s,i,o,l=this;return r.__generator(this,(function(r){switch(r.label){case 0:return e=this.props,t=e.onChange,n=e.dispatchEvent,a=e.clearValueOnEmpty,s=this.props.resetValue,a&&""===s&&(s=void 0),[4,n("clear",m.resolveEventData(this.props,{value:s}))];case 1:return(null==(i=r.sent())?void 0:i.prevented)?[2]:[4,n("change",m.resolveEventData(this.props,{value:s}))];case 2:return(null==(o=r.sent())?void 0:o.prevented)||(t(s),this.setState({inputValue:s},(function(){l.loadAutoComplete()}))),[2]}}))}))},t.prototype.removeItem=function(e){var t=this.props,n=t.selectedOptions,a=t.onChange,s=n.concat();s.splice(e,1),a(this.normalizeValue(s))},t.prototype.handleClick=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n,a;return r.__generator(this,(function(s){switch(s.label){case 0:return e=this.props,t=e.dispatchEvent,n=e.value,[4,t("click",m.resolveEventData(this.props,{value:n}))];case 1:return(null==(a=s.sent())?void 0:a.prevented)||(this.state.isFocused||this.focus(),this.setState({isOpen:!0})),[2]}}))}))},t.prototype.handleFocus=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,a,s,i;return r.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,n=t.dispatchEvent,a=t.onFocus,s=t.value,this.setState({isOpen:!0,isFocused:!0}),[4,n("focus",m.resolveEventData(this.props,{value:s}))];case 1:return(null==(i=o.sent())?void 0:i.prevented)||(null==a||a(e)),[2]}}))}))},t.prototype.handleBlur=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,a,s,i,o,l,u=this;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,n=t.onBlur,a=t.trimContents,s=t.value,i=t.onChange,o=t.dispatchEvent,this.setState({isFocused:!1},(function(){if(a&&s&&"string"==typeof s){var e=s.trim();u.input&&(u.input.value=e),i(e)}})),[4,o("blur",m.resolveEventData(this.props,{value:s}))];case 1:return(null==(l=r.sent())?void 0:l.prevented)||n&&n(e),[2]}}))}))},t.prototype.close=function(){this.setState({isFocused:!1})},t.prototype.handleInputChange=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,a,s,i,o,l=this;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.transformValue(e.currentTarget.value),n=this.props,a=n.creatable,s=n.multiple,i=n.onChange,[4,(0,n.dispatchEvent)("change",m.resolveEventData(this.props,{value:t}))];case 1:return(null==(o=r.sent())?void 0:o.prevented)||this.setState({inputValue:t},(function(){!1===a||s||null==i||i(t),l.loadAutoComplete()})),[2]}}))}))},t.prototype.handleKeyDown=function(e){var t;return r.__awaiter(this,void 0,void 0,(function(){var n,a,s,i,o,l,u,d,p,c;return r.__generator(this,(function(r){switch(r.label){case 0:return n=this.props,a=n.selectedOptions,s=n.onChange,i=n.multiple,o=n.creatable,l=n.dispatchEvent,u=(null===(t=this.props)||void 0===t?void 0:t.valueField)||"value",!a.length||this.state.inputValue||8!==e.keyCode?[3,1]:(e.preventDefault(),(p=a.concat()).pop(),s(this.normalizeValue(p)),this.setState({inputValue:""},this.loadAutoComplete),[3,4]);case 1:return"Enter"===e.key&&this.state.inputValue&&"number"!=typeof this.highlightedIndex&&!1!==o?(e.preventDefault(),d=this.state.inputValue,i&&d&&(O.default(a,(function(e){return e[u]==d}))?d=this.normalizeValue(a).concat():((p=a.concat()).push({label:d,value:d}),d=this.normalizeValue(p).concat())),[4,l("enter",m.resolveEventData(this.props,{value:d}))]):[3,3];case 2:return(null==(c=r.sent())?void 0:c.prevented)?[2]:(s(d),this.setState({inputValue:i?"":d,isOpen:!1},this.loadAutoComplete),[3,4]);case 3:"Enter"===e.key&&this.state.isOpen&&"number"!=typeof this.highlightedIndex&&this.setState({isOpen:!1}),r.label=4;case 4:return[2]}}))}))},t.prototype.handleChange=function(e){var t=this.props,n=t.onChange,a=t.multiple,s=t.options,i=t.selectedOptions,o=t.creatable,l=t.valueField,r=s.find((function(t){return t[l||"value"]===e}));if(a){var u=i.concat();r&&u.push(r),n(this.normalizeValue(u))}else n(r?this.normalizeValue(r):e);(a||!1===o)&&this.setState({inputValue:""},this.loadAutoComplete)},t.prototype.handleStateChange=function(e){var t=this.props.creatable,n=this.props.multiple||this.props.multi;switch(e.type){case x.default.stateChangeTypes.itemMouseEnter:case x.default.stateChangeTypes.changeInput:this.setState({isOpen:!0});break;default:var a={};void 0!==e.isOpen&&(a.isOpen=e.isOpen),void 0!==e.highlightedIndex&&(this.highlightedIndex=e.highlightedIndex),!n&&!1===t&&this.state.isOpen&&!1===e.isOpen&&(a.inputValue=""),this.setState(a)}},t.prototype.handleNormalInputChange=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,a,s,i,o,l;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,n=t.onChange,a=t.dispatchEvent,s=t.trimContents,i=t.clearValueOnEmpty,"string"==typeof(o=this.transformValue(e.currentTarget.value))&&(s&&(o=o.trim()),i&&""===o&&(o=void 0)),[4,a("change",m.resolveEventData(this.props,{value:o}))];case 1:return(null==(l=r.sent())?void 0:l.prevented)||n(o),[2]}}))}))},t.prototype.normalizeValue=function(e){var t=this.props,n=t.multiple,a=t.delimiter,s=t.joinValues,i=t.extractValue,o=t.valueField,l=Array.isArray(e)?e:e?[e]:[];if(s)return l.map((function(e){return e[o||"value"]})).join(a||",");if(i){var r=l.map((function(e){return e[o||"value"]}));return n?r:r[0]}return n?l:l[0]},t.prototype.transformValue=function(e){var t=this.props.transform;return t?(Object.keys(t).forEach((function(n){var a=t[n];switch(n){case"lowerCase":a&&(e=e.toLowerCase());break;case"upperCase":a&&(e=e.toUpperCase())}})),e):e},t.prototype.loadAutoComplete=function(){var e=this.props,t=e.formItem,n=e.autoComplete,a=e.data;m.isEffectiveApi(n,a)&&t&&t.loadOptions(n,m.createObject(a,{term:this.state.inputValue||""}),{extendsOptions:!0})},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.valueToString=function(e){return null==e?"":"string"==typeof e?e:e instanceof Date?e.toISOString():JSON.stringify(e)},t.prototype.getTarget=function(){var e;return null===(e=this.input)||void 0===e?void 0:e.parentElement},t.prototype.renderSugestMode=function(){var e,t=this,n=this.props,a=n.className;n.style;var s=n.inputControlClassName,i=n.nativeInputClassName,o=n.inputOnly,l=n.value,u=n.placeholder,d=n.classnames,c=n.disabled,h=n.readOnly,v=n.name,f=n.loading,T=n.clearable,O=n.options,N=n.selectedOptions,V=n.autoComplete,S=n.labelField,F=n.valueField,E=n.multiple,k=n.creatable,P=n.borderMode,A=n.showCounter,D=n.data,R=n.maxLength,j=n.minLength,B=n.translate,z=n.loadingConfig,L=n.popOverContainer,M=n.themeCss,H=n.css,K=n.id,U=n.nativeAutoComplete,W=n.testIdBuilder,J=null===(e=this.props.type)||void 0===e?void 0:e.replace(/^(?:native|input)\-/,"");return w(x.default,{isOpen:this.state.isOpen&&!c&&!h,inputValue:this.state.inputValue,onChange:this.handleChange,onStateChange:this.handleStateChange,selectedItem:N.map((function(e){return e[F||"value"]}))},(function(e){var n,x,q,G=e.getInputProps,Q=e.getItemProps,X=e.isOpen,Y=e.inputValue,Z=e.selectedItem,$=e.highlightedIndex,ee=Y&&X&&!V?p.matchSorter(O,Y,{keys:[S||"label",F||"value"],threshold:p.matchSorter.rankings.CONTAINS}):O,te=X?I(ee,Z):{};ee=ee.filter((function(e){return!~Z.indexOf(e.value)})),t.state.inputValue&&!1!==k&&E&&!ee.some((function(e){return e.value===t.state.inputValue}))&&!~Z.indexOf(t.state.inputValue)&&ee.push(((n={})[S||"label"]=t.state.inputValue,n[F||"value"]=t.state.inputValue,n.isNew=!0,n));var ne=m.filter(u,D);return w("div",r.__assign({className:d("TextControl-input TextControl-input--withAC",s,m.setThemeClassName(r.__assign(r.__assign({},t.props),{name:"inputControlClassName",id:K,themeCss:M||H})),m.setThemeClassName(r.__assign(r.__assign({},t.props),{name:"inputControlClassName",id:K,themeCss:M||H,extra:"inner"})),o?a:"",(x={"is-opened":X,"TextControl-input--multiple":E},x["TextControl-input--border".concat(m.ucFirst(P))]=P,x)),onClick:t.handleClick},null==W?void 0:W.getTestId()),w(b.default.Fragment,null,!ne||N.length||t.state.inputValue||t.state.isFocused?null:w("div",{className:d("TextControl-placeholder")},ne),N.map((function(e,n){return E?w("div",{className:d("TextControl-value"),key:n},w(y.default,{className:d("TextControl-valueLabel"),tooltip:"".concat(e[S||"label"])},"".concat(e[S||"label"])),w(_.default,{icon:"close",className:d("TextControl-valueIcon","icon"),onClick:t.removeItem.bind(t,n)})):Y&&X||!1!==k?null:w("div",{className:d("TextControl-value"),key:n},e.label)})),w(C.default,r.__assign({},G({name:v,ref:t.inputRef,disabled:c,readOnly:h,type:J,onFocus:t.handleFocus,onBlur:t.handleBlur,onChange:t.handleInputChange,onKeyDown:t.handleKeyDown,maxLength:R,minLength:j}),{autoComplete:U,size:10,className:d(i)}))),T&&!c&&!h&&l?w("a",{onClick:t.clearValue,className:d("TextControl-clear")},w(_.default,{icon:"input-clear",className:"icon",iconContent:"InputText-clear"})):null,A?w("span",{className:d("TextControl-counter")},"".concat(null===(q=t.valueToString(l))||void 0===q?void 0:q.length).concat("number"==typeof R&&R?"/".concat(R):"")):null,f?w(g.default,{show:!0,icon:"reload",size:"sm",spinnerClassName:d("TextControl-spinner"),loadingConfig:z}):null,w(m.Overlay,{container:L||t.getTarget,target:t.getTarget,show:!(!X||!ee.length)},w(m.PopOver,{className:d("TextControl-popover"),style:{width:t.input?t.input.parentElement.offsetWidth:"auto"}},w("div",{className:d("TextControl-sugs")},ee.map((function(e){var t=e[S||"label"],n=e[F||"value"];return w("div",r.__assign({},Q({item:n,disabled:e.disabled,className:d("TextControl-sugItem",{"is-highlight":$===te[n],"is-disabled":e.disabled||e.readOnly})}),{key:n}),e.isNew?w("span",null,B("Text.add",{label:t}),w(_.default,{icon:"enter",className:"icon"})):w("span",null,e.disabled?t:m.highlight(t,Y),e.tip))}))))))}))},t.prototype.toggleRevealPassword=function(){this.setState({revealPassword:!this.state.revealPassword})},t.prototype.renderNormal=function(){var e,t,n,a=this.props;a.classPrefix;var s=a.classnames,i=a.className;a.style;var o=a.inputControlClassName,l=a.nativeInputClassName,u=a.inputOnly,d=a.value,p=a.placeholder;a.onChange;var c=a.disabled,h=a.readOnly,v=a.max,f=a.min,g=a.step,y=a.clearable,b=a.revealPassword,x=void 0===b||b,T=a.name,O=a.borderMode,N=a.prefix,V=a.suffix,I=a.data,S=a.showCounter,F=a.maxLength,E=a.minLength,k=a.themeCss,P=a.css,A=a.id,D=a.nativeAutoComplete,R=a.testIdBuilder,j=null===(t=this.props.type)||void 0===t?void 0:t.replace(/^(?:native|input)\-/,"");return w("div",r.__assign({className:s("TextControl-input",(e={},e["TextControl-input--border".concat(m.ucFirst(O))]=O,e),m.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"inputControlClassName",id:A,themeCss:k||P})),m.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"inputControlClassName",id:A,themeCss:k||P,extra:"inner"})),o,u?i:"")},null==R?void 0:R.getTestId()),N?w("span",{className:s("TextControl-inputPrefix")},m.filter(N,I)):null,w(C.default,r.__assign({name:T,placeholder:m.filter(p,I),ref:this.inputRef,disabled:c,readOnly:h,type:this.state.revealPassword?"text":j,onFocus:this.handleFocus,onBlur:this.handleBlur,max:v,min:f,maxLength:F,minLength:E,autoComplete:D,size:10,step:g,onChange:this.handleNormalInputChange,value:this.valueToString(d),className:s(l,{"TextControl-input-password":"password"===j&&x})},null==R?void 0:R.getChild("input").getTestId())),y&&!c&&!h&&d?w("a",{onClick:this.clearValue,className:s("TextControl-clear")},w(_.default,{icon:"input-clear",className:"icon",iconContent:"InputText-clear"})):null,"password"===j&&x&&!c?w("a",{onClick:this.toggleRevealPassword,className:s("TextControl-revealPassword")},this.state.revealPassword?w(_.default,{icon:"view",className:s("TextControl-icon-view"),classNameProp:s("TextControl-icon-view"),iconContent:"InputText-view"}):w(_.default,{icon:"invisible",className:s("TextControl-icon-invisible"),classNameProp:s("TextControl-icon-invisible"),iconContent:"InputText-invisible"})):null,S?w("span",{className:s("TextControl-counter")},"".concat(null===(n=this.valueToString(d))||void 0===n?void 0:n.length).concat("number"==typeof F&&F?"/".concat(F):"")):null,V?w("span",{className:s("TextControl-inputSuffix")},m.filter(V,I)):null)},t.prototype.renderBody=function(e){var t,n,a=this.props,s=a.classnames,i=a.className,o=a.style,l=a.classPrefix,u=a.addOn,d=a.render,p=a.data,c=a.disabled,h=a.readOnly,v=a.inputOnly,f=a.static,g=a.addOnClassName,C=a.themeCss,y=a.css,b=a.id,x="string"==typeof u?{label:u,type:"plain"}:u,T=w(_.default,{cx:s,icon:null==x?void 0:x.icon,className:"Icon"}),O=x&&!f?x.actionType||~["button","submit","reset","action"].indexOf(x.type)?w("div",{className:s("".concat(l,"TextControl-button"),g,m.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"addOnClassName",id:b,themeCss:C||y,extra:"addOn"})))},d("addOn",x,{disabled:c})):w("div",{className:s("".concat(l,"TextControl-addOn"),g,m.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"addOnClassName",id:b,themeCss:C||y,extra:"addOn"})))},T,x.label?m.filter(x.label,p):null):null;if(v)return e;var N=f?s("".concat(l,"TextControl"),((n={})["".concat(l,"TextControl--withAddOn")]=!!O,n)):s(i,"".concat(l,"TextControl"),((t={})["".concat(l,"TextControl--withAddOn")]=!!O,t["is-focused"]=this.state.isFocused,t["is-disabled"]=c||h,t));return w("div",{className:N,style:o},x&&"left"===x.position?O:null,e,x&&"left"!==x.position?O:null)},t.prototype.render=function(){var e=this.props,t=e.options,n=e.source,a=e.autoComplete,s=e.themeCss,i=e.css,o=e.id,l=e.env,u=e.classPrefix,d=!1!==a&&(n||(null==t?void 0:t.length)||a)?this.renderSugestMode():this.renderNormal();return w(b.default.Fragment,null,this.renderBody(d),w(m.CustomStyle,r.__assign({},this.props,{config:{themeCss:s||i,classNames:[{key:"inputControlClassName",weights:{focused:{parent:".".concat(u,"TextControl.is-focused")},disabled:{parent:".".concat(u,"TextControl.is-disabled")}}}],id:o},env:l})),w(m.CustomStyle,r.__assign({},this.props,{config:{themeCss:m.formatInputThemeCss(s||i),classNames:[{key:"inputControlClassName",weights:{default:{inner:"input"},hover:{inner:"input"},focused:{parent:".".concat(u,"TextControl.is-focused"),inner:"input"},disabled:{parent:".".concat(u,"TextControl.is-disabled"),inner:"input"}}}],id:o&&o+"-inner"},env:l})),w(m.CustomStyle,r.__assign({},this.props,{config:{themeCss:s||i,classNames:[{key:"addOnClassName"}],id:o&&o+"-addOn"},env:l})))},t.defaultProps={resetValue:"",labelField:"label",valueField:"value",placeholder:"",allowInputText:!0,trimContents:!0,nativeAutoComplete:"off"},r.__decorate([m.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"close",null),r.__decorate([m.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",Promise)],t.prototype,"handleNormalInputChange",null),r.__decorate([m.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"getTarget",null),r.__decorate([m.autobind,v.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",Object)],t.prototype,"render",null),t}(b.default.PureComponent);function I(e,t,n){return void 0===n&&(n="value"),e.filter((function(e){return-1===t.indexOf(e[n||"value"])})).reduce((function(e,t,a){return e[t[n||"value"]]=a,e}),{})}var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([m.OptionsControl({type:"input-text",alias:["input-password","native-date","native-time","native-number"]})],t)}(V),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([m.OptionsControl({type:"input-email",validations:"isEmail"})],t)}(V),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([m.OptionsControl({type:"input-url",validations:"isUrl"})],t)}(V);t.EmailControlRenderer=F,t.TextControlRenderer=S,t.UrlControlRenderer=E,t.default=V,t.mapItemIndex=I}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputTag.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputTag",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/ListMenu"),o=e("node_modules/amis-ui/lib/components/PopUp"),s=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/amis-ui/lib/components/ResultBox"),l=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),u=e("node_modules/amis-core/lib/index"),p=e("node_modules/downshift/dist/downshift.cjs"),c=e("node_modules/lodash/find"),h=e("node_modules/lodash/isInteger"),m=e("node_modules/lodash/unionWith"),_=e("node_modules/lodash/compact"),g=e("node_modules/lodash/uniq"),v=e("node_modules/react-dom/index"),f=e("node_modules/amis/lib/renderers/Form/StaticHoc"),y=e("node_modules/match-sorter/dist/match-sorter.cjs");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var O=b(i),F=b(o),I=b(s),C=b(r),x=b(d),V=b(p),S=b(c),w=b(h),T=b(m),M=b(_),P=b(g),j=e("node_modules/react/index"),R=(j.default||j).createElement;(j.default||j).Fragment;var E=function(e){function t(t){var a=e.call(this,t)||this;return a.input=x.default.createRef(),a.state={isOpened:!1,inputValue:"",isFocused:!1,selectedOptions:t.selectedOptions,cacheOptions:[]},a}return l.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;e.value!==t.value&&this.setState({inputValue:""})},t.prototype.doAction=function(e,t,a){var n,i,o=this.props,s=o.resetValue,r=o.onChange,l=o.formStore,d=o.store,p=o.name,c=null==e?void 0:e.actionType;if("clear"===c)null==r||r("");else if("reset"===c){var h=null!==(i=u.getVariable(null!==(n=null==l?void 0:l.pristine)&&void 0!==n?n:null==d?void 0:d.pristine,p))&&void 0!==i?i:s;null==r||r(null!=h?h:"")}},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),l.__awaiter(this,void 0,void 0,(function(){var a,n,i,o;return l.__generator(this,(function(s){switch(s.label){case 0:return a=this.props,n=a.dispatchEvent,i=a.options,[4,n(e,u.resolveEventData(this.props,l.__assign({options:i,items:i},t)))];case 1:return[2,!!(null==(o=s.sent())?void 0:o.prevented)]}}))}))},t.prototype.normalizeInputValue=function(e){var t=this.props,a=t.enableBatchAdd,n=t.separator,i=t.valueField,o=t.labelField,s=t.delimiter,r=[];if(a&&n&&"string"==typeof n)r=e.split(n);else{var d=P.default(M.default(e.split(s||",")));r.push.apply(r,l.__spreadArray([],l.__read(d),!1))}return r.filter(Boolean).map((function(e){var t;return(t={})["".concat(i||"value")]=e,t["".concat(o||"label")]=e,t}))},t.prototype.normalizeOptions=function(e){var t=this.props,a=t.joinValues,n=t.extractValue,i=t.delimiter,o=t.valueField;return a?e.map((function(e){return e[o||"value"]})).join(i||","):n?e.map((function(e){return e[o||"value"]})):e},t.prototype.normalizeMergedValue=function(e,t){void 0===t&&(t=!0);var a=this.props,n=a.selectedOptions,i=a.valueField,o=T.default(n.concat(),this.normalizeInputValue(e),(function(e,t){return e[i||"value"]===t[i||"value"]}));return t?this.normalizeOptions(o):o},t.prototype.validateInputValue=function(e){var t=this.props,a=t.max,n=t.maxTagLength;t.enableBatchAdd,t.separator;var i=t.onInputValidateFailed,o=t.valueField,s=this.normalizeMergedValue(e,!1);if(null!=a&&w.default(a)&&s.length>a)return null==i||i(s.map((function(e){return e[o||"value"]})),"max"),!1;var r=this.normalizeInputValue(e);return null==n||!w.default(n)||!r.some((function(e){return e[o||"value"].length>n}))||(null==i||i(r.map((function(e){return e[o||"value"]})),"maxLength"),!1)},t.prototype.getValue=function(e,t,a){void 0===e&&(e="normal"),void 0===t&&(t={});var n=this.props,i=n.joinValues,o=n.extractValue,s=n.delimiter,r=n.valueField,l=(a=a||this.props.selectedOptions).concat();return"push"===e?l.push(t):"pop"===e&&l.pop(),i?l.map((function(e){return e[r||"value"]})).join(s||","):o?l.map((function(e){return e[r||"value"]})):l},t.prototype.addItem=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,o,s;return l.__generator(this,(function(r){switch(r.label){case 0:return this.isReachMax()?[2]:(t=this.props,a=t.selectedOptions,n=t.onChange,i=t.valueField,o=a.concat(),S.default(o,(function(t){return t[i||"value"]==e[i||"value"]}))?[2]:(s=this.getValue("push",e),[4,this.dispatchEvent("change",{value:s,selectedItems:a.concat(e)})]));case 1:return r.sent()||n(s),[2]}}))}))},t.prototype.addItem2=function(e){var t=this.props,a=t.mobileUI,n=t.valueField,i=void 0===n?"value":n;if(a){var o=this.state.selectedOptions.concat(),s=o.findIndex((function(t){return t[i]===e[i]}));~s?o.splice(s,1):this.isReachMaxFromState()||o.push(e),this.setState({selectedOptions:o})}},t.prototype.isExist=function(e){var t=this.props,a=t.options,n=t.valueField,i=void 0===n?"value":n,o=this.state.cacheOptions;return a.some((function(t){return t[i]===e}))||o.some((function(t){return t[i]===e}))},t.prototype.addSelection=function(){var e=this.state.inputValue,t=this.props.maxTagLength,a=this.state.selectedOptions.slice(),n=this.state.cacheOptions.slice();if(void 0!==t&&(e=(e=e.trim()).slice(0,t)),!this.isExist(e)&&e&&!this.isReachMaxFromState()){var i=this.normalizeInputValue(e);a.push(i[0]),n.push(i[0]),this.setState({inputValue:"",selectedOptions:a,cacheOptions:n})}},t.prototype.onConfirm=function(){return l.__awaiter(this,void 0,void 0,(function(){var e,t,a;return l.__generator(this,(function(n){switch(n.label){case 0:return e=this.state.selectedOptions,t=this.props.onChange,a=this.getValue("normal",{},e),[4,this.dispatchEvent("change",{value:a,selectedItems:e})];case 1:return n.sent()||t(a),this.close(),[2]}}))}))},t.prototype.handleFocus=function(e){var t,a;return l.__awaiter(this,void 0,void 0,(function(){var n;return l.__generator(this,(function(i){switch(i.label){case 0:return this.setState({isFocused:!0,isOpened:!0,selectedOptions:this.props.selectedOptions}),n=this.getValue("normal"),[4,this.dispatchEvent("focus",{value:n,selectedItems:this.props.selectedOptions})];case 1:return i.sent()||null===(a=(t=this.props).onFocus)||void 0===a||a.call(t,e),[2]}}))}))},t.prototype.handleBlur=function(e){var t,a;return l.__awaiter(this,void 0,void 0,(function(){var n,i,o,s,r,d,u;return l.__generator(this,(function(l){switch(l.label){case 0:return n=this.props,i=n.selectedOptions,o=n.onChange,s=n.mobileUI,r=n.options,s&&r.length?[2]:(d=this.state.inputValue.trim(),this.validateInputValue(d)?(u=this.normalizeMergedValue(d),[4,this.dispatchEvent("blur",{value:u,selectedItems:i})]):(this.setState({isFocused:!1,isOpened:!1}),[2]));case 1:return l.sent()||null===(a=(t=this.props).onBlur)||void 0===a||a.call(t,e),this.setState({isFocused:!1,isOpened:!1,inputValue:""},d?function(){i.length!==u.length&&(null==o||o(u))}:void 0),[2]}}))}))},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleInputChange=function(e){this.setState({inputValue:e})},t.prototype.handleChange=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,o,s,r;return l.__generator(this,(function(l){switch(l.label){case 0:return t=this.props,a=t.joinValues,n=t.extractValue,i=t.delimiter,o=t.valueField,s=t.onChange,r=Array.isArray(e)?e.concat():[],(a||n)&&(r=e.map((function(e){return e[o||"value"]}))),a&&(r=r.join(i||",")),[4,this.dispatchEvent("change",{value:r,selectedItems:e})];case 1:return l.sent()||s(r),[2]}}))}))},t.prototype.renderItem=function(e){var t=this.props.labelField;return"".concat(e[t||"label"])},t.prototype.handleKeyDown=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,o,s,r,d;return l.__generator(this,(function(l){switch(l.label){case 0:return t=this.props,a=t.selectedOptions,n=t.onChange,i=t.delimiter,t.labelField,t.valueField,o=this.state.inputValue.trim(),s=a.concat(this.normalizeMergedValue(o,!1)),!a.length||o||"Backspace"!=e.key?[3,2]:(r=this.getValue("pop"),[4,this.dispatchEvent("change",{value:r,selectedItems:s})]);case 1:return(d=l.sent())||n(r),[3,5];case 2:return!o||"Enter"!==e.key&&e.key!==i?[3,4]:(e.preventDefault(),e.stopPropagation(),r=this.normalizeMergedValue(o),[4,this.dispatchEvent("change",{value:r,selectedItems:s})]);case 3:return d=l.sent(),this.validateInputValue(o)?(d||a.length===r.length||n(r),this.setState({inputValue:""}),[3,5]):(this.setState({isFocused:!1,isOpened:!1}),[2]);case 4:o||"Enter"!==e.key||this.handleBlur(e),l.label=5;case 5:return[2]}}))}))},t.prototype.handleOptionChange=function(e){this.props.mobileUI?this.addItem2(e):!this.isReachMax()&&e&&this.addItem(e)},t.prototype.getTarget=function(){return this.input.current},t.prototype.getParent=function(){return this.input.current&&v.findDOMNode(this.input.current).parentElement},t.prototype.reload=function(){var e=this.props.reloadOptions;null==e||e()},t.prototype.isReachMax=function(){var e=this.props,t=e.max,a=e.selectedOptions;return null!=t&&w.default(t)&&a.length>=t},t.prototype.isReachMaxFromState=function(){var e=this.state.selectedOptions,t=this.props.max;return null!=t&&w.default(t)&&e.length>=t},t.prototype.render=function(){var e=this,t=this.props,a=t.className;t.style;var n=t.classnames,i=t.disabled,o=t.placeholder,s=t.name,r=t.clearable,d=t.selectedOptions,p=t.loading,c=t.popOverContainer,h=t.dropdown,m=t.options,_=t.optionsTip,g=t.maxTagCount,v=t.overflowTagPopover,f=t.translate,b=t.loadingConfig,x=t.valueField,S=t.env,w=t.mobileUI,T=t.labelField,M=t.testIdBuilder,P=this.state.inputValue,j=Array.isArray(m)?u.filterTree(m,(function(e,t,a,n){return void 0!==e[x||"value"]&&(w||!~d.indexOf(e))&&(y.matchSorter([e].concat(n),P,{keys:[T||"label",x||"value"],threshold:y.matchSorter.rankings.CONTAINS}).length||Array.isArray(e.children)&&!!e.children.length)}),0,!0):[],E=this.isReachMax();return R(V.default,{selectedItem:d,isOpen:w?this.state.isOpened:this.state.isFocused,inputValue:this.state.inputValue,onChange:this.handleOptionChange,itemToString:this.renderItem},(function(t){var y=t.isOpen,V=t.highlightedIndex,T=t.getItemProps,P=t.getInputProps;return R("div",{className:n(a,"TagControl")},R(C.default,l.__assign({},P({name:s,ref:e.input,placeholder:f(null!=o?o:"Tag.placeholder"),value:e.state.inputValue,onKeyDown:e.handleKeyDown,onFocus:w?void 0:e.handleFocus,onBlur:e.handleBlur,disabled:i}),{onResultClick:w?e.handleFocus:void 0,inputPlaceholder:"",onChange:e.handleInputChange,className:n("TagControl-input"),result:d,onResultChange:e.handleChange,itemRender:e.renderItem,clearable:r,maxTagCount:g,overflowTagPopover:v,popOverContainer:c||S.getModalContainer,allowInput:!w||w&&!(null==m?void 0:m.length),mobileUI:w,testIdBuilder:null==M?void 0:M.getChild("resule-box")}),p?R(I.default,{loadingConfig:b,size:"sm"}):void 0),!1!==h?w?R(F.default,{className:n("Tag-popup"),container:w?null==S?void 0:S.getModalContainer:c||S.getModalContainer,isShow:y&&!!j.length,showConfirm:!0,onConfirm:e.onConfirm,onHide:e.close},R("div",null,R(O.default,{selectedOptions:d,mobileUI:w,options:j.concat(e.state.cacheOptions),itemRender:e.renderItem,highlightIndex:V,getItemProps:function(t){var a=t.item,i=t.index;return l.__assign({},T({index:i,item:a,className:n("ListMenu-item",{"is-active":~(e.state.selectedOptions.map((function(e){return e[x]}))||[]).indexOf(a[x])})}))}}),w&&!e.isReachMaxFromState()?R("div",{className:n("ListMenu-add-wrap")},R(C.default,{placeholder:f("placeholder.enter")+"...",allowInput:!0,value:e.state.inputValue,mobileUI:w,clearable:!0,maxTagCount:g,onChange:function(t){e.setState({inputValue:t})},onBlur:e.addSelection})):null)):R(u.Overlay,{container:c||e.getParent,target:e.getTarget,placement:"auto",show:y&&!!j.length},R(u.PopOver,{overlay:!0,className:n("TagControl-popover"),onHide:e.close},R(O.default,{options:j,itemRender:e.renderItem,highlightIndex:V,testIdBuilder:null==M?void 0:M.getChild("options"),getItemProps:function(e){var t=e.item,a=e.index;return l.__assign({},T({index:a,item:t,disabled:E||t.disabled,className:n("ListMenu-item",{"is-disabled":E})}))}}))):R("div",{className:n("TagControl-sug")},_?R("div",{className:n("TagControl-sugTip")},f(_)):null,m.map((function(t,a){return R("div",{className:n("TagControl-sugItem",{"is-disabled":t.disabled||i||E}),key:a,onClick:e.addItem.bind(e,t)},t.label)}))))}))},t.defaultProps={resetValue:"",labelField:"label",valueField:"value",multiple:!0,placeholder:"Tag.placeholder",optionsTip:"Tag.tip",separator:"-"},l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[String,Object]),l.__metadata("design:returntype",Promise)],t.prototype,"dispatchEvent",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[String,Object,Array]),l.__metadata("design:returntype",void 0)],t.prototype,"getValue",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"addSelection",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",Promise)],t.prototype,"onConfirm",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"handleFocus",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"handleBlur",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"close",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[String]),l.__metadata("design:returntype",void 0)],t.prototype,"handleInputChange",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Array]),l.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Object)],t.prototype,"renderItem",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"handleKeyDown",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",void 0)],t.prototype,"handleOptionChange",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"getTarget",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"getParent",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"isReachMax",null),l.__decorate([u.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"isReachMaxFromState",null),l.__decorate([f.supportStatic(),l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(x.default.PureComponent),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t=l.__decorate([u.OptionsControl({type:"input-tag"})],t)}(E);t.TagControlRenderer=B,t.default=E}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputNumber.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputNumber",(function(t,e,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=t("node_modules/amis-ui/lib/components/Select"),r=t("node_modules/amis-ui/lib/components/NumberInput"),o=t("node_modules/tslib/tslib"),s=t("node_modules/react/index"),u=t("node_modules/@rc-component/mini-decimal/lib/index"),l=t("node_modules/amis-core/lib/index"),p=t("node_modules/classnames/index"),d=t("node_modules/amis/lib/renderers/Form/StaticHoc");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var m=c(a),h=c(r),f=c(s),v=c(p),g=t("node_modules/react/index"),_=(g.default||g).createElement;(g.default||g).Fragment;var y=function(t){function e(e){var n=t.call(this,e)||this;n.handleChange=n.handleChange.bind(n),n.handleChangeUnit=n.handleChangeUnit.bind(n);var i=n.getUnit(),a=l.normalizeOptions(e.unitOptions),r=e.formItem,o=e.value;return r&&n.formatNumber(o,!0),n.state={unit:i,unitOptions:a},n}return o.__extends(e,t),e.prototype.doAction=function(t,e,n,i){var a,r,o=null==t?void 0:t.actionType,s=this.props,u=s.min,p=s.max,d=s.precision,c=s.step,m=s.resetValue,f=s.big,v=s.onChange,g=s.clearValueOnEmpty,_=s.formStore,y=s.store,b=s.name;if("clear"===o)null==v||v(g?void 0:"");else if("reset"===o){var C=h.default.normalizePrecision(this.filterNum(d),this.filterNum(c)),N=null!==(r=l.getVariable(null!==(a=null==_?void 0:_.pristine)&&void 0!==a?a:null==y?void 0:y.pristine,b))&&void 0!==r?r:m,O=h.default.normalizeValue(null!=N?N:"",this.filterNum(u,f),this.filterNum(p,f),C,null!=N?N:"",g,f);null==v||v(g&&""===O?void 0:O)}},e.prototype.formatNumber=function(t,e){void 0===e&&(e=!1);var n=this.props,i=n.showAsPercent,a=n.suffix,r=n.step,o=n.big,s=n.setPrinstineValue,p=this.props.precision;i&&"%"===a&&(p=(p||0)+2);var d=this.getUnit(),c=l.normalizeOptions(this.props.unitOptions),m=h.default.normalizePrecision(this.filterNum(p),this.filterNum(r));if(null!=t&&null!=m&&(!d||0===c.length)&&!0!==o){var f=parseFloat(u.toFixed(t.toString(),".",m));isNaN(f)||f===t||(t=f,e&&s(f))}return t},e.prototype.getUnit=function(){var t,e,n=this.props;if(n.unitOptions&&n.unitOptions.length){var i=l.normalizeOptions(n.unitOptions).map((function(t){return t.value}));if(n.value&&"string"==typeof n.value){var a=i[0];i.sort((function(t,e){return e.length-t.length}));try{for(var r=o.__values(i),s=r.next();!s.done;s=r.next()){var u=s.value;if(n.value.endsWith(u)){a=u;break}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return a}return i[0]}},e.prototype.getValue=function(t){var e=this.props,n=e.resetValue,i=e.unitOptions;if(!t||"number"==typeof t||"string"==typeof t)return null!==t&&i&&this.state.unit&&(t+=String(this.state.unit)),null===t?null!=n?n:null:t},e.prototype.dispatchEvent=function(t){return o.__awaiter(this,void 0,void 0,(function(){var e,n,i;return o.__generator(this,(function(a){return e=this.props,n=e.dispatchEvent,i=e.value,n(t,l.resolveEventData(this.props,{value:i})),[2]}))}))},e.prototype.handleChange=function(t){return o.__awaiter(this,void 0,void 0,(function(){var e,n,i,a,r,s,u;return o.__generator(this,(function(o){switch(o.label){case 0:return e=this.props,n=e.onChange,i=e.dispatchEvent,a=e.clearValueOnEmpty,r=this.getValue(t),s=a&&""===r?void 0:r,s=this.formatNumber(s),[4,i("change",l.resolveEventData(this.props,{value:s}))];case 1:return(null==(u=o.sent())?void 0:u.prevented)||n(s),[2]}}))}))},e.prototype.changeCursorPos=function(t){var e,n;if(!isNaN(t)){var i=this.props,a=i.kilobitSeparator,r=i.prefix,o=t>0?Math.floor(t):Math.ceil(t),s="".concat(t).length;if(r&&(s+=r.length),a){var u=Math.floor(("".concat(Math.abs(o)).length-1)/3);u>0&&(s+=u)}this.input&&(a||r)&&(null===(n=(e=this.input).setSelectionRange)||void 0===n||n.call(e,s,s))}},e.prototype.filterNum=function(t,e){if(void 0===e&&(e=!1),void 0!==t)return"number"!=typeof t&&(t=l.filter(t,this.props.data),t=/^[-]?\d+/.test(t)?e?t:+t:void 0),t},e.prototype.handleChangeUnit=function(t){var e=this,n=this.props.value,i=this.state.unit;this.setState({unit:t.value},(function(){n&&(n=n.toString().replace(i,""),e.props.onChange(n+e.state.unit))}))},e.prototype.componentDidUpdate=function(t){var e=this.getUnit(),n=this.props,i=n.value,a=n.formInited,r=n.onChange,o=n.setPrinstineValue;if(null!=i&&("string"==typeof i||"number"==typeof i)&&e&&!String(i).endsWith(e)){var s=this.getValue(i);!1===a?null==o||o(s):null==r||r(s)}this.props.value!==t.value&&/^([-+]?(([1-9]\d*\.?\d*)|(0\.\d*[1-9]))[^\d\.]*)$/.test(this.props.value)&&this.setState({unit:e}),this.props.unitOptions!==t.unitOptions&&this.setState({unitOptions:l.normalizeOptions(this.props.unitOptions)})},e.prototype.inputRef=function(t){this.input=t},e.prototype.focus=function(){this.input&&this.input.focus()},e.prototype.render=function(){var t,e=this,n=this.props,i=n.className,a=n.style,r=n.classPrefix,s=n.value,u=n.step,p=n.precision,d=n.max,c=n.min,f=n.disabled,g=n.placeholder,y=n.showSteps,b=n.borderMode,C=n.suffix,N=n.prefix,O=n.kilobitSeparator,S=n.unitOptions,x=n.readOnly,V=n.keyboard,P=n.displayMode,E=n.big,w=n.resetValue,F=n.clearValueOnEmpty,U=n.css,M=n.themeCss,I=n.inputControlClassName,k=n.id,z=n.env,A=n.name,R=n.showAsPercent,T=n.testIdBuilder,j=n.popOverContainer,B=this.state.unit,D=this.filterNum(p),W=O||N||C?function(t,n){var i,a=n.userTyping,r=n.input;if(O&&t)if(a){var o=t.toString().split(".");o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=o.join(".")}else t=l.numberFormatter(t,D);return C&&a&&(null===(i=e.input)||void 0===i?void 0:i.selectionStart)===r.length?"".concat(N||"").concat(t):"".concat(N||"").concat(t).concat(C||"")}:void 0,H=B&&s&&"string"==typeof s?s.replace(B,""):isNaN(s)?void 0:s;return _("div",{className:v.default("".concat(r,"NumberControl"),(t={},t["".concat(r,"NumberControl--withUnit")]=S,t),i),style:a},_(h.default,{name:A,inputControlClassName:v.default(I,l.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"inputControlClassName",id:k,themeCss:M||U})),l.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"inputControlClassName",id:k,themeCss:M||U,extra:"inner"}))),inputRef:this.inputRef,value:H,resetValue:w,step:u,max:this.filterNum(d,E),min:this.filterNum(c,E),formatter:W,parser:function(t){return t&&(N&&(t=t.replace(N,"")),C&&(t=t.replace(C,"")),O&&(t=t.replace(/,/g,""))),t},onChange:this.handleChange,disabled:f,placeholder:g,precision:D,showSteps:y,borderMode:b,readOnly:x,suffix:C,showAsPercent:R,onFocus:function(){return e.dispatchEvent("focus")},onBlur:function(){return e.dispatchEvent("blur")},keyboard:V,displayMode:P,big:E,clearValueOnEmpty:F,testIdBuilder:T}),Array.isArray(S)&&0!==S.length?S.length>1?_(m.default,{value:B,clearable:!1,options:this.state.unitOptions||[],onChange:this.handleChangeUnit,className:"".concat(r,"NumberControl-unit"),disabled:f,popOverContainer:j}):_("div",{className:v.default("".concat(r,"NumberControl-unit"),"".concat(r,"NumberControl-single-unit"),"".concat(r,"Select"),"".concat(x?"".concat(r,"NumberControl-readonly"):""))},"string"==typeof S[0]?S[0]:S[0].label):null,_(l.CustomStyle,o.__assign({},this.props,{config:{themeCss:M||U,classNames:[{key:"inputControlClassName",weights:{focused:{pre:"".concat(r,"Number-").concat(P?P+"-":"","focused.")},disabled:{pre:"".concat(r,"Number-").concat(P?P+"-":"","disabled.")}}}],id:k},env:z})),_(l.CustomStyle,o.__assign({},this.props,{config:{themeCss:l.formatInputThemeCss(M||U),classNames:[{key:"inputControlClassName",weights:{default:{inner:"input"},hover:{inner:"input"},focused:{pre:"".concat(r,"Number-").concat(P?P+"-":"","focused."),inner:"input"},disabled:{pre:"".concat(r,"Number-").concat(P?P+"-":"","disabled."),inner:"input"}}}],id:k&&k+"-inner"},env:z})))},e.defaultProps={step:1,resetValue:"",clearValueOnEmpty:!1},o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String]),o.__metadata("design:returntype",Promise)],e.prototype,"dispatchEvent",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Number]),o.__metadata("design:returntype",void 0)],e.prototype,"changeCursorPos",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"inputRef",null),o.__decorate([d.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"render",null),e}(f.default.Component),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e.defaultProps=o.__assign({validations:"isNumeric"},y.defaultProps),e=o.__decorate([l.FormItem({type:"input-number",detectProps:["unitOptions","precision","suffix"]})],e)}(y);e.NumberControlRenderer=b,e.default=y}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Textarea.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Textarea",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Textarea"),s=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc"),l=e("node_modules/classnames/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(o),c=d(r),_=d(l),m=e("node_modules/react/index"),f=(m.default||m).createElement;(m.default||m).Fragment;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputRef=c.default.createRef(),t}return s.__extends(t,e),t.prototype.doAction=function(e,t,n,a){var o,s,r=null==e?void 0:e.actionType,u=this.props,l=u.onChange,d=u.formStore,p=u.store,c=u.name,_=u.resetValue;if("clear"===r)null==l||l(""),this.focus();else if("reset"===r){var m=null!==(s=i.getVariable(null!==(o=null==d?void 0:d.pristine)&&void 0!==o?o:null==p?void 0:p.pristine,c))&&void 0!==s?s:_;null==l||l(m),this.focus()}else"focus"===r&&this.focus()},t.prototype.focus=function(){var e;null===(e=this.inputRef.current)||void 0===e||e.focus()},t.prototype.handleChange=function(e){var t=this.props,n=t.onChange;(0,t.dispatchEvent)("change",i.resolveEventData(this.props,{value:e})),n&&n(e)},t.prototype.handleFocus=function(e){var t=this,n=this.props,a=n.onFocus,o=n.dispatchEvent,r=n.value;this.setState({focused:!0},(function(){return s.__awaiter(t,void 0,void 0,(function(){var t;return s.__generator(this,(function(n){switch(n.label){case 0:return[4,o("focus",i.resolveEventData(this.props,{value:r}))];case 1:return(null==(t=n.sent())?void 0:t.prevented)||a&&a(e),[2]}}))}))}))},t.prototype.handleBlur=function(e){var t=this,n=this.props,a=n.onBlur,o=n.trimContents,r=n.value,u=n.onChange,l=n.dispatchEvent;this.setState({focused:!1},(function(){return s.__awaiter(t,void 0,void 0,(function(){var t;return s.__generator(this,(function(n){switch(n.label){case 0:return o&&r&&"string"==typeof r&&u(r.trim()),[4,l("blur",i.resolveEventData(this.props,{value:r}))];case 1:return(null==(t=n.sent())?void 0:t.prevented)||a&&a(e),[2]}}))}))}))},t.prototype.renderStatic=function(e){void 0===e&&(e="-");var t=this.props,n=t.render,a=t.staticSchema,o=void 0===a?{}:a;return n("static-textarea",s.__assign({type:"multiline-text",maxRows:o.limit||5},o),{value:e})},t.prototype.render=function(){var e=s.__rest(this.props,[]),t=this.props,n=t.id,a=t.themeCss,o=t.env,r=t.className,u=t.classPrefix;return f(c.default.Fragment,null,f(p.default,s.__assign({},e,{forwardRef:this.inputRef,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,className:_.default(r,i.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"inputControlClassName",id:n,themeCss:a})))})),f(i.CustomStyle,s.__assign({},this.props,{config:{themeCss:a,classNames:[{key:"inputControlClassName",weights:{default:{inner:".".concat(u,"TextareaControl-input")},hover:{inner:".".concat(u,"TextareaControl-input")},focused:{suf:".is-focused",inner:".".concat(u,"TextareaControl-input")},disabled:{suf:".is-disabled",inner:".".concat(u,"TextareaControl-input")}}}],id:n},env:o})))},t.defaultProps={minRows:3,maxRows:20,trimContents:!0,resetValue:"",clearable:!1},s.__decorate([i.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),s.__decorate([i.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),s.__decorate([i.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),s.__decorate([u.supportStatic(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(c.default.Component),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([i.FormItem({type:"textarea"})],t)}(h);t.TextAreaControlRenderer=v,t.default=h}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Checkboxes.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Checkboxes",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Spinner"),l=e("node_modules/amis-ui/lib/components/Icon"),s=e("node_modules/amis-ui/lib/components/Checkbox"),i=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),c=e("node_modules/lodash/inRange"),r=e("node_modules/amis-core/lib/index"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc"),h=e("node_modules/lodash/debounce");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=p(a),b=p(l),f=p(s),C=p(d),k=p(c),_=p(h),y=e("node_modules/react/index"),g=(y.default||y).createElement;(y.default||y).Fragment;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.checkboxRef=C.default.createRef(),t.childRefs=[],t}return i.__extends(t,e),t.prototype.doAction=function(e,t,n){var o,a,l=this.props,s=l.resetValue,i=l.onChange,d=l.formStore,c=l.store,u=l.name,h=null==e?void 0:e.actionType;if("clear"===h)i("");else if("reset"===h){var p=null!==(a=r.getVariable(null!==(o=null==d?void 0:d.pristine)&&void 0!==o?o:null==c?void 0:c.pristine,u))&&void 0!==a?a:s;i(null!=p?p:"")}},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.handleAddClick=function(){var e=this.props.onAdd;e&&e()},t.prototype.handleEditClick=function(e,t){var n=this.props.onEdit;e.preventDefault(),e.stopPropagation(),n&&n(t)},t.prototype.handleDeleteClick=function(e,t){var n=this.props.onDelete;e.preventDefault(),e.stopPropagation(),n&&n(t)},t.prototype.componentDidMount=function(){this.updateBorderStyle();var e=_.default(this.updateBorderStyle,100);this.checkboxRef.current&&(this.checkboxRefObserver=new ResizeObserver(e),this.checkboxRefObserver.observe(this.checkboxRef.current))},t.prototype.componentWillUnmount=function(){var e;null===(e=this.checkboxRefObserver)||void 0===e||e.disconnect()},t.prototype.updateBorderStyle=function(){if("button"===this.props.optionType&&this.childRefs.length){var e=this.childRefs.map((function(e){return null==e?void 0:e.ref})),t=e[0].labelRef.current.offsetTop,n=[],o=e.length;n[0]="first";for(var a=0,l=1;l<o;l++){var s=e[l].labelRef.current.offsetTop;n[l]="",s!==t&&(n[l]="first",n[l-1]+=" last",a=l,t=s)}n[o-1]+=" last",n.forEach((function(t,n){n>=a&&(t+=" last-line"),e[n].setClassName(t)}))}},t.prototype.renderGroup=function(e,t){var n,o=this,a=this.props,l=a.classnames,s=a.labelField;if(!(null===(n=e.children)||void 0===n?void 0:n.length))return null;var i=e.children.map((function(e,t){return o.renderItem(e,t)})),d=this.columnsSplit(i);return g("div",{key:"group-"+t,className:l("CheckboxesControl-group",e.className)},g("label",{className:l("CheckboxesControl-groupLabel",e.labelClassName)},e[s||"label"]),d)},t.prototype.addChildRefs=function(e){e&&this.childRefs.push(e)},t.prototype.renderItem=function(e,t){var n,o=this;if(null===(n=e.children)||void 0===n?void 0:n.length)return this.renderGroup(e,t);var a=this.props,l=a.render,s=a.itemClassName,i=a.onToggle,d=a.selectedOptions,c=a.disabled,u=a.inline,h=a.labelClassName,p=a.labelField,m=a.removable,C=a.editable,k=a.translate,_=a.optionType,y=a.menuTpl,v=a.data,x=a.testIdBuilder,N=String(e[p||"label"]),R=e.labelClassName,S=null==x?void 0:x.getChild("item-"+N||t);return g(f.default,{className:s,key:t,onChange:function(){return i(e)},checked:!!~d.indexOf(e),disabled:c||e.disabled,inline:u,labelClassName:R||h,description:e.description,optionType:_,testIdBuilder:S,ref:this.addChildRefs},y?l("checkboxes/".concat(t),y,{data:r.createObject(v,e)}):N,m&&r.hasAbility(e,"removable")?g("a",{"data-tooltip":k("Select.clear"),"data-position":"left"},g(b.default,{icon:"minus",className:"icon",onClick:function(t){return o.handleDeleteClick(t,e)}})):null,C&&r.hasAbility(e,"editable")?g("a",{"data-tooltip":"编辑","data-position":"left"},g(b.default,{icon:"pencil",className:"icon",onClick:function(t){return o.handleEditClick(t,e)}})):null)},t.prototype.columnsSplit=function(e){var t=this.props,n=t.columnsCount,o=t.classnames,a=[],l=[];return e.forEach((function(e){e&&e.key&&String(e.key).startsWith("group")?(l.length&&(a.push(r.columnsSplit(l,o,n)),l=[]),a.push(e)):l.push(e)})),l.length&&a.push(r.columnsSplit(l,o,n)),a},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var o=t.disabled,a=t.placeholder,l=t.options,s=t.inline;t.columnsCount;var d=t.selectedOptions;t.onToggle;var c=t.onToggleAll,u=t.checkAll,h=t.checkAllText,p=t.classnames,C=t.itemClassName,_=t.labelClassName,y=t.creatable,v=t.addApi,x=t.createBtnLabel,N=t.translate,R=t.optionType,S=t.loading,T=t.loadingConfig,O=t.themeCss,A=t.id,F=t.env,w=t.classPrefix,B=[];l&&l.length&&(B=l.map((function(t,n){return e.renderItem(t,n)}))),u&&B.length&&"default"===R&&B.unshift(g(f.default,{key:"checkall",className:C,onChange:c,checked:!!d.length,partial:k.default(d.length,0,r.flattenTreeWithLeafNodes(l).length),disabled:o,inline:s,labelClassName:_},null!=h?h:N("Checkboxes.selectAll"))),B=this.columnsSplit(B);var E=r.formateCheckThemeCss(O,"checkboxes");return g("div",{className:p("CheckboxesControl",n,r.setThemeClassName(i.__assign(i.__assign({},this.props),{name:["checkboxesControlClassName","checkboxesControlCheckedClassName","checkboxesClassName","checkboxesCheckedClassName","checkboxesInnerClassName","checkboxesShowClassName"],id:A,themeCss:E}))),ref:this.checkboxRef},B&&B.length?B:S?null:g("span",{className:"Form-placeholder"},N(a)),S?g(m.default,{show:!0,icon:"reload",size:"sm",spinnerClassName:p("Checkboxes-spinner"),loadingConfig:T}):null,!y&&!v||o?null:g("a",{className:p("Checkboxes-addBtn"),onClick:this.handleAddClick},g(b.default,{icon:"plus",className:"icon"}),N(x)),g(r.CustomStyle,i.__assign({},this.props,{config:{themeCss:E,classNames:[{key:"checkboxesControlClassName",weights:{default:{inner:".".concat(w,"Checkbox:not(.checked):not(.disabled)")},hover:{suf:" .".concat(w,"Checkbox:not(.disabled):not(.checked)")},disabled:{inner:".".concat(w,"Checkbox.disabled:not(.checked)")}}},{key:"checkboxesControlCheckedClassName",weights:{default:{inner:".".concat(w,"Checkbox.checked:not(.disabled)")},hover:{suf:" .".concat(w,"Checkbox.checked:not(.disabled)")},disabled:{inner:".".concat(w,"Checkbox.checked.disabled")}}},{key:"checkboxesClassName",weights:{default:{inner:".".concat(w,"Checkbox:not(.checked):not(.disabled) > i")},hover:{suf:" .".concat(w,"Checkbox:not(.disabled):not(.checked)"),inner:"> i"},disabled:{inner:".".concat(w,"Checkbox.disabled:not(.checked) > i")}}},{key:"checkboxesCheckedClassName",weights:{default:{inner:".".concat(w,"Checkbox:not(.disabled) > i")},hover:{suf:" .".concat(w,"Checkbox:not(.disabled)"),inner:"> i"},disabled:{inner:".".concat(w,"Checkbox.disabled > i")}}},{key:"checkboxesInnerClassName",weights:{default:{inner:".".concat(w,"Checkbox:not(.disabled) > i .icon")},hover:{suf:" .".concat(w,"Checkbox:not(.disabled)"),inner:"> i .icon"},disabled:{inner:".".concat(w,"Checkbox.disabled > i .icon")}}},{key:"checkboxesShowClassName",weights:{default:{inner:".".concat(w,"Checkbox > i")}}}],id:A},env:F})))},t.defaultProps={columnsCount:1,multiple:!0,placeholder:"placeholder.noOption",creatable:!1,inline:!0,createBtnLabel:"Select.createLabel",optionType:"default"},i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleAddClick",null),i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Event,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleEditClick",null),i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Event,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleDeleteClick",null),i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"updateBorderStyle",null),i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"addChildRefs",null),i.__decorate([u.supportStatic(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(C.default.Component),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([r.OptionsControl({type:"checkboxes",sizeMutable:!1,thin:!0})],t)}(v);t.CheckboxesControlRenderer=x,t.default=v}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputCity.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputCity",(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/CityArea"),o=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/amis-ui/lib/components/Select"),d=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),c=e("node_modules/amis/lib/renderers/Form/StaticHoc");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(a),v=u(o),y=u(r),_=u(s),h=e("node_modules/react/index"),m=(h.default||h).createElement;(h.default||h).Fragment;var C=function(e){var t,i=e.value,n=e.db,a=e.delimiter,o=void 0===a?",":a,r={code:0,province:"",provinceCode:0,city:"",cityCode:0,district:"",districtCode:0,street:""};if(!n||!i)return r;var d=i&&i.code||"number"==typeof i&&i||"string"==typeof i&&/(\d{6})/.test(i)&&RegExp.$1;if(d&&n[d]){d=parseInt(d,10),r.code=d;var s=d-d%1e4;n[s]&&(r.provinceCode=s,r.province=n[s]);var l=d-d%100;l!==s&&n[l]?(r.cityCode=l,r.city=n[l]):~(null===(t=n.city[s])||void 0===t?void 0:t.indexOf(d))&&(r.cityCode=d,r.city=n[d]),d%100&&(r.district=n[d],r.districtCode=d)}return i&&i.street?r.street=i.street:"string"==typeof i&&~i.indexOf(o)&&(r.street=i.slice(i.indexOf(o)+o.length)),r},g=function(t){Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/amis-ui/lib/components/CityDB","node_modules/tslib/tslib"],(function(e,i){t(i.__importStar(e))}))}))})).then(t)},f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={code:0,province:"",provinceCode:0,city:"",cityCode:0,district:"",districtCode:0,street:""},t}return d.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.loadDb((function(){return e.syncIn()}))},t.prototype.componentDidUpdate=function(e){var t=this,i=this.props;i.value!==e.value&&this.loadDb((function(){return t.syncIn(i)}))},t.prototype.loadDb=function(e){var t=this;this.state.db?null==e||e():g((function(i){t.setState({db:d.__assign(d.__assign({},i.default),{province:i.province,city:i.city,district:i.district})},e)}))},t.prototype.handleProvinceChange=function(e){this.setState(e?{province:e.label,provinceCode:e.value,city:"",cityCode:0,district:"",districtCode:0,street:"",code:e?e.value:0}:{code:0,province:"",provinceCode:0,city:"",cityCode:0,district:"",districtCode:0,street:""},this.syncOut)},t.prototype.handleCityChange=function(e){if(e.value%100)return this.handleDistrictChange(e,{cityCode:e.value});this.setState(e?{city:e.label,cityCode:e.value,district:"",districtCode:0,street:"",code:e.value}:{city:"",cityCode:0,district:"",districtCode:0,street:"",code:this.state.provinceCode},this.syncOut)},t.prototype.handleDistrictChange=function(e,t){void 0===t&&(t={}),this.setState(e?d.__assign(d.__assign({},t),{district:e.label,districtCode:e.value,street:"",code:e.value}):d.__assign(d.__assign({},t),{district:"",districtCode:0,street:"",code:this.state.cityCode}),this.syncOut)},t.prototype.handleStreetChange=function(e){this.setState({street:e.currentTarget.value})},t.prototype.handleStreetEnd=function(){this.syncOut()},t.prototype.syncIn=function(e){void 0===e&&(e=this.props);var t=this.state.db,i=e.value,n=e.delimiter;t&&this.setState(C({value:i,delimiter:n,db:t}))},t.prototype.syncOut=function(){var e=this.props,t=e.onChange,i=e.allowStreet,n=e.joinValues,a=e.extractValue,o=e.delimiter,r=this.state,d=r.code,s=r.province,l=r.city,c=r.district,u=r.street,p=r.provinceCode,v=r.cityCode,y=r.districtCode;t((void 0===a?n:a)?d?i&&u?[d,u].join(o):String(d):"":{code:d,provinceCode:p,province:s,cityCode:v,city:l,districtCode:y,district:c,street:u})},t.prototype.render=function(){var e,t,i=this.props,n=i.classnames,a=i.className;i.style;var o=i.disabled,r=i.allowCity,s=i.allowDistrict,l=i.allowStreet,c=i.searchable,u=i.translate,p=i.loadingConfig,_=i.popOverContainer,h=i.itemClassName,C=i.testIdBuilder,g=this.state,f=g.provinceCode,b=g.cityCode,S=g.districtCode,O=g.street,w=g.db;return w?m("div",{className:n("CityPicker",a)},m(y.default,{className:n(h),searchable:c,disabled:o,options:w.province.map((function(e){return{label:w[e],value:e}})),value:f||"",onChange:this.handleProvinceChange,popOverContainer:_,testIdBuilder:null==C?void 0:C.getChild("province")}),r&&w.city[f]&&w.city[f].length?m(y.default,{className:n(h),searchable:c,disabled:o,options:w.city[f].map((function(e){return{label:w[e],value:e}})),value:b||"",onChange:this.handleCityChange,popOverContainer:_,testIdBuilder:null==C?void 0:C.getChild("city")}):null,b&&s&&(null===(t=null===(e=w.district[f])||void 0===e?void 0:e[b])||void 0===t?void 0:t.length)?m(y.default,{className:n(h),searchable:c,disabled:o,options:w.district[f][b].map((function(e){return{label:w[e],value:e}})),value:S||"",onChange:this.handleDistrictChange,popOverContainer:_,testIdBuilder:null==C?void 0:C.getChild("district")}):null,l&&f?m("input",d.__assign({className:n("CityPicker-input"),value:O||"",onChange:this.handleStreetChange,onBlur:this.handleStreetEnd,placeholder:u("City.street"),disabled:o},null==C?void 0:C.getChild("street").getTestId())):null):m(v.default,{show:!0,size:"sm",loadingConfig:p})},t.defaultProps={joinValues:!0,extractValue:!0,delimiter:",",allowCity:!0,allowDistrict:!0,allowStreet:!1},d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object]),d.__metadata("design:returntype",void 0)],t.prototype,"handleProvinceChange",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object]),d.__metadata("design:returntype",void 0)],t.prototype,"handleCityChange",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object,Object]),d.__metadata("design:returntype",void 0)],t.prototype,"handleDistrictChange",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object]),d.__metadata("design:returntype",void 0)],t.prototype,"handleStreetChange",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"handleStreetEnd",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object]),d.__metadata("design:returntype",void 0)],t.prototype,"syncIn",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"syncOut",null),t}(_.default.Component),b=l.themeable(l.localeable(f)),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={db:null},t}return d.__extends(t,e),t.prototype.doAction=function(e,t,i){var n,a,o=this.props,r=o.resetValue,d=o.onChange,s=o.formStore,c=o.store,u=o.name,p=null==e?void 0:e.actionType;if("clear"===p)d("");else if("reset"===p){var v=null!==(a=l.getVariable(null!==(n=null==s?void 0:s.pristine)&&void 0!==n?n:null==c?void 0:c.pristine,u))&&void 0!==a?a:r;d(null!=v?v:"")}},t.prototype.handleChange=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,i,n,a;return d.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,i=t.dispatchEvent,n=t.onChange,[4,i("change",l.resolveEventData(this.props,{value:e},"value"))];case 1:return(null==(a=o.sent())?void 0:a.prevented)||n(e),[2]}}))}))},t.prototype.renderStatic=function(e){var t=this;void 0===e&&(e="");var i=this.props,n=i.value,a=i.delimiter,o=i.loadingConfig;if(!this.state.db)return g((function(e){t.setState({db:d.__assign(d.__assign({},e.default),{province:e.province,city:e.city,district:e.district})})})),m(v.default,{size:"sm",show:!0,loadingConfig:o});if(!n)return m(_.default.Fragment,null,e);var r=C({value:n,delimiter:a,db:this.state.db}),s=r.province,l=r.city,c=r.district,u=r.street;return m(_.default.Fragment,null,[s,l,c,u].filter((function(e){return!!e})).join(a))},t.prototype.render=function(){var e=this.props,t=e.value,i=e.allowCity,n=e.allowDistrict,a=e.extractValue,o=e.joinValues,r=e.allowStreet,d=e.disabled,s=e.searchable,l=e.env,c=e.mobileUI,u=e.popOverContainer,v=e.itemClassName,y=e.testIdBuilder;return c?m(p.default,{value:t,popOverContainer:null==l?void 0:l.getModalContainer,onChange:this.handleChange,allowCity:i,allowDistrict:n,extractValue:a,joinValues:o,allowStreet:r,disabled:d,mobileUI:c}):m(b,{itemClassName:v,popOverContainer:u||(null==l?void 0:l.getModalContainer),searchable:s,value:t,onChange:this.handleChange,allowCity:i,allowDistrict:n,extractValue:a,joinValues:o,allowStreet:r,disabled:d,testIdBuilder:y})},d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object,Object,Boolean]),d.__metadata("design:returntype",void 0)],t.prototype,"doAction",null),d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object]),d.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),d.__decorate([c.supportStatic(),d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(_.default.Component),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(t,e),t=d.__decorate([l.FormItem({type:"input-city",sizeMutable:!1})],t)}(S);t.CheckboxControlRenderer=O,t.CityPicker=f,t.LocationControl=S,t.default=b}));
|
||
;/*!node_modules/amis/lib/renderers/Form/ChartRadios.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/ChartRadios",(function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("node_modules/tslib/tslib"),r=t("node_modules/react/index"),s=t("node_modules/amis-core/lib/index"),a=t("node_modules/amis/lib/renderers/Form/StaticHoc");function d(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=d(r),l=t("node_modules/react/index"),h=(l.default||l).createElement;(l.default||l).Fragment;var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.highlightIndex=-1,e.prevIndex=-1,e}return o.__extends(e,t),e.prototype.chartRef=function(t){var e,i=this;this.chart=t,null===(e=this.chart)||void 0===e||e.on("click","series",(function(t){i.props.onToggle(i.props.options[t.dataIndex])})),setTimeout((function(){return i.highlight()}))},e.prototype.highlight=function(t){void 0===t&&(t=this.highlightIndex),this.props.static||(this.highlightIndex=t,this.chart&&this.prevIndex!==t&&(~this.prevIndex&&this.chart.dispatchAction({type:"downplay",seriesIndex:0,dataIndex:this.prevIndex}),~t&&(this.chart.dispatchAction({type:"highlight",seriesIndex:0,dataIndex:t}),this.props.showTooltipOnHighlight&&this.chart.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:t})),this.prevIndex=t))},e.prototype.componentDidMount=function(){this.props.selectedOptions.length&&this.highlight(this.props.options.indexOf(this.props.selectedOptions[0]))},e.prototype.componentDidUpdate=function(){this.props.selectedOptions.length&&this.highlight(this.props.options.indexOf(this.props.selectedOptions[0]))},e.prototype.renderStatic=function(t){void 0===t&&(t="-"),this.prevIndex=-1,this.highlightIndex=-1;var e=this.props,i=e.options,n=void 0===i?[]:i,o=e.selectedOptions,r=e.labelField,s=void 0===r?"label":r,a=e.valueField,d=void 0===a?"value":a,l=e.chartValueField;if(n.length&&o.length){var c=n.reduce((function(t,e){return t+e[l||d]}),0);if(c>0){var u=(+o[0][l||d]/c*100).toFixed(2);t="".concat(o[0][s],":").concat(u,"%")}}return h(p.default.Fragment,null,t)},e.prototype.render=function(){var t=this.props,e=t.options,i=t.labelField,n=t.chartValueField,r=t.valueField;return(0,t.render)("chart",{type:"chart"},{config:o.__assign(o.__assign({legend:{top:10},tooltip:{formatter:function(t){return"".concat(t.name,":").concat(t.value[n||r||"value"],"(").concat(t.percent,"%)")}},series:[{type:"pie",top:30,bottom:0}]},this.props.config),{dataset:{dimensions:[i||"label",n||r||"value"],source:e}}),chartRef:this.chartRef})},o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"chartRef",null),o.__decorate([a.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"render",null),e}(p.default.Component),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e.defaultProps={multiple:!1},e=o.__decorate([s.OptionsControl({type:"chart-radios",sizeMutable:!1})],e)}(c);e.RadiosControlRenderer=u,e.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputRating.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputRating",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Rating"),r=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),i=e("node_modules/amis/lib/renderers/Form/StaticHoc");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(o),c=u(l),p=e("node_modules/react/index"),m=(p.default||p).createElement;(p.default||p).Fragment;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.doAction=function(e,t,a){var n,o,r=null==e?void 0:e.actionType,l=this.props,i=l.onChange,u=l.resetValue,d=l.formStore,c=l.store,p=l.name;if("clear"===r)null==i||i("");else if("reset"===r){var m=null!==(o=s.getVariable(null!==(n=null==d?void 0:d.pristine)&&void 0!==n?n:null==c?void 0:c.pristine,p))&&void 0!==o?o:u;null==i||i(null!=m?m:"")}},t.prototype.handleChange=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,a,n;return r.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,a=t.onChange,[4,(0,t.dispatchEvent)("change",s.resolveEventData(this.props,{value:e}))];case 1:return(null==(n=o.sent())?void 0:n.prevented)||(null==a||a(e)),[2]}}))}))},t.prototype.renderStatic=function(){var e=this.props,t=e.className;e.style;var a=e.value,n=e.count,o=e.half,r=e.char,l=e.inactiveColor,s=e.colors,i=e.texts,u=e.charClassName,c=e.textClassName,p=e.textPosition,h=e.classnames;return m("div",{className:h("RatingControl",t)},m(d.default,{classnames:h,value:a,disabled:!0,count:n,half:o,char:r,inactiveColor:l,colors:s,texts:i,charClassName:u,textClassName:c,textPosition:p}))},t.prototype.render=function(){var e=this.props,t=e.className,a=e.value,n=e.count,o=e.half,r=e.readOnly,l=e.disabled,s=e.onHoverChange,i=e.allowClear,u=e.char,c=e.inactiveColor,p=e.colors,h=e.texts,f=e.charClassName,_=e.textClassName,C=e.textPosition,g=e.classnames,y=v(n,this.props.data);return y>100&&(y=100),m("div",{className:g("RatingControl",t)},m(d.default,{classnames:g,value:a,disabled:l,count:y,half:o,allowClear:i,readOnly:r,char:u,inactiveColor:c,colors:p,texts:h,charClassName:f,textClassName:_,textPosition:C,onChange:this.handleChange,onHoverChange:function(e){s&&s(e)}}))},t.defaultProps={value:0,count:5,half:!1,readOnly:!1},r.__decorate([s.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),r.__decorate([i.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(c.default.Component);function v(e,t){return"number"==typeof e?e:s.toNumber(s.filter(e,t))}var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([s.FormItem({type:"input-rating",sizeMutable:!1,shouldComponentUpdate:function(e,t){return v(e.count,e.data)!==v(t.count,t.data)},detectProps:["half","allowClear","colors","inactiveColor","texts","textPosition","char"]})],t)}(h);t.RatingControlRenderer=f,t.default=h}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Switch.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Switch",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Switch"),i=e("node_modules/amis-ui/lib/components/Icon"),r=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(a),p=d(i),f=d(s),m=e("node_modules/react/index"),h=(m.default||m).createElement;(m.default||m).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.handleChange=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,o,a;return r.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,n=t.dispatchEvent,o=t.onChange,[4,n("change",l.resolveEventData(this.props,{value:e}))];case 1:return(null==(a=i.sent())?void 0:a.prevented)||o&&o(e),[2]}}))}))},t.prototype.getResult=function(){var e=this.props,t=e.classnames,n=e.render,o=e.onText,a=e.offText,i=o,r=a;return l.isObject(o)&&o.icon&&!o.type?i=h(p.default,{cx:t,icon:o.icon,className:"Switch-icon"}):null!=o&&"string"!=typeof o&&(i=n("switch-on-text",o)),l.isObject(a)&&a.icon&&!a.type?r=h(p.default,{cx:t,icon:a.icon,className:"Switch-icon"}):null!=a&&"string"!=typeof a&&(r=n("switch-off-text",a)),{on:i,off:r}},t.prototype.renderBody=function(e){var t=this.props,n=t.classnames,o=t.option,a=t.optionAtLeft,i=h("span",{className:n("Switch-option")},o);return h(f.default.Fragment,null,a?i:null,e,a?null:i)},t.prototype.renderStatic=function(){var e=this.props,t=e.value,n=e.trueValue,o=this.getResult(),a=o.on,i=void 0===a?"开":a,r=o.off,s=h("span",null,t===n?i:void 0===r?"关":r);return this.renderBody(s)},t.prototype.doAction=function(e,t,n,o){var a,i,r=null==e?void 0:e.actionType,s=this.props,u=s.onChange,d=s.formStore,c=s.store,p=s.name,f=s.resetValue;if("clear"===r)null==u||u("");else if("reset"===r){var m=null!==(i=l.getVariable(null!==(a=null==d?void 0:d.pristine)&&void 0!==a?a:null==c?void 0:c.pristine,p))&&void 0!==i?i:f;null==u||u(m)}},t.prototype.render=function(){var e=this.props,t=e.size,n=e.className;e.style;var o=e.classPrefix,a=e.classnames,i=e.value,r=e.trueValue,s=e.falseValue;e.onChange;var l=e.disabled,u=e.loading,d=e.loadingConfig,p=e.testIdBuilder,f=this.getResult(),m=f.on,_=f.off;return h("div",{className:a("SwitchControl",n)},this.renderBody(h(c.default,{classPrefix:o,value:i,trueValue:r,falseValue:s,onText:m,offText:_,disabled:l,onChange:this.handleChange,size:t,loading:u,loadingConfig:d,testIdBuilder:p})))},t.defaultProps={trueValue:!0,falseValue:!1,optionAtLeft:!1},r.__decorate([l.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),r.__decorate([u.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(f.default.Component),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([l.FormItem({type:"switch",sizeMutable:!1,thin:!0})],t)}(_);t.SwitchControlRenderer=v,t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Radios.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Radios",(function(e,a,t,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Radios"),s=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),l=e("node_modules/classnames/index"),d=e("node_modules/amis-core/lib/index"),r=e("node_modules/amis/lib/renderers/Form/StaticHoc");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(o),h=c(i),p=c(l),m=e("node_modules/react/index"),b=(m.default||m).createElement;(m.default||m).Fragment;var C=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(a,e),a.prototype.doAction=function(e,a,t){var n,o,s=this.props,i=s.resetValue,l=s.onChange,r=s.formStore,c=s.store,u=s.name,h=null==e?void 0:e.actionType;if("clear"===h)null==l||l("");else if("reset"===h){var p=null!==(o=d.getVariable(null!==(n=null==r?void 0:r.pristine)&&void 0!==n?n:null==c?void 0:c.pristine,u))&&void 0!==o?o:i;null==l||l(null!=p?p:"")}},a.prototype.handleChange=function(e){return s.__awaiter(this,void 0,void 0,(function(){var a,t,n,o,i,l,r,c,u;return s.__generator(this,(function(s){switch(s.label){case 0:return a=this.props,t=a.joinValues,n=a.extractValue,o=a.valueField,i=a.onChange,l=a.dispatchEvent,r=a.options,a.selectedOptions,c=e,e&&(t||n)&&(c=e[o||"value"]),[4,l("change",d.resolveEventData(this.props,{value:c,options:r,items:r,selectedItems:e}))];case 1:return(null==(u=s.sent())?void 0:u.prevented)||i&&i(c),[2]}}))}))},a.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},a.prototype.renderLabel=function(e,a){var t=a.labelField,n=this.props.data,o=e[t||"label"];return b(h.default.Fragment,null,"string"==typeof o?d.filter(o,n):"".concat(o))},a.prototype.render=function(){var e=this.props,a=e.className;e.style;var t=e.classPrefix,n=e.value;e.onChange;var o=e.disabled,i=e.joinValues,l=e.extractValue,r=e.delimiter,c=e.placeholder,m=e.options,C=e.inline,f=void 0===C||C,_=e.formMode,v=e.columnsCount,k=e.classPrefix,y=e.itemClassName,g=e.labelClassName,x=e.optionClassName,N=e.labelField,F=e.valueField;e.data;var w=e.translate,j=e.optionType,V=e.level,O=e.testIdBuilder,P=e.themeCss,S=e.id,I=e.env,R=d.formateCheckThemeCss(P,"radios");return b(h.default.Fragment,null,b(u.default,{inline:f||"inline"===_,className:p.default("".concat(t,"RadiosControl"),a,d.setThemeClassName(s.__assign(s.__assign({},this.props),{name:["radiosControlClassName","radiosControlCheckedClassName","radiosClassName","radiosCheckedClassName","radiosCheckedInnerClassName","radiosShowClassName"],id:S,themeCss:R}))),value:null==n?"":n,disabled:o,onChange:this.handleChange,joinValues:i,extractValue:l,delimiter:r,labelClassName:null!=x?x:g,labelField:N,valueField:F,placeholder:w(c),options:m,renderLabel:this.renderLabel,columnsCount:v,classPrefix:k,itemClassName:y,optionType:j,level:V,testIdBuilder:O}),b(d.CustomStyle,s.__assign({},this.props,{config:{themeCss:R,classNames:[{key:"radiosControlClassName",weights:{default:{inner:".".concat(t,"Checkbox:not(.checked):not(.disabled)")},hover:{suf:" .".concat(t,"Checkbox:not(.disabled):not(.checked)")},disabled:{inner:".".concat(t,"Checkbox.disabled:not(.checked)")}}},{key:"radiosControlCheckedClassName",weights:{default:{inner:".".concat(t,"Checkbox.checked:not(.disabled)")},hover:{suf:" .".concat(t,"Checkbox.checked:not(.disabled)")},disabled:{inner:".".concat(t,"Checkbox.checked.disabled")}}},{key:"radiosClassName",weights:{default:{inner:".".concat(t,"Checkbox:not(.checked):not(.disabled) > i")},hover:{suf:" .".concat(t,"Checkbox:not(.disabled):not(.checked)"),inner:"> i"},disabled:{inner:".".concat(t,"Checkbox.disabled:not(.checked) > i")}}},{key:"radiosCheckedClassName",weights:{default:{inner:".".concat(t,"Checkbox:not(.disabled) > i")},hover:{suf:" .".concat(t,"Checkbox:not(.disabled)"),inner:"> i"},disabled:{inner:".".concat(t,"Checkbox.disabled > i")}}},{key:"radiosCheckedInnerClassName",weights:{default:{inner:".".concat(t,"Checkbox:not(.disabled) > i .icon")},hover:{suf:" .".concat(t,"Checkbox:not(.disabled)"),inner:"> i .icon"},disabled:{inner:".".concat(t,"Checkbox.disabled > i:before")}}},{key:"radiosShowClassName",weights:{default:{inner:".".concat(t,"Checkbox > i")}}}],id:S},env:I})))},a.defaultProps={columnsCount:1},s.__decorate([d.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],a.prototype,"handleChange",null),s.__decorate([d.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],a.prototype,"renderLabel",null),s.__decorate([r.supportStatic(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],a.prototype,"render",null),a}(h.default.Component),f=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(a,e),a.defaultProps={multiple:!1,inline:!0},a=s.__decorate([d.OptionsControl({type:"radios",sizeMutable:!1,thin:!0})],a)}(C);a.RadiosControlRenderer=f,a.default=C}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Radio.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Radio",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/withBadge"),i=e("node_modules/amis-ui/lib/components/Checkbox"),l=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),d=e("node_modules/classnames/index"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=p(o),m=p(i),_=p(r),f=p(d),h=e("node_modules/react/index"),v=(h.default||h).createElement;(h.default||h).Fragment;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.doAction=function(e,t,a){var n,o,i=this.props,l=i.resetValue,r=i.onChange,d=i.formStore,u=i.store,p=i.name,c=null==e?void 0:e.actionType;if("clear"===c)r("");else if("reset"===c){var m=null!==(o=s.getVariable(null!==(n=null==d?void 0:d.pristine)&&void 0!==n?n:null==u?void 0:u.pristine,p))&&void 0!==o?o:l;r(null!=m?m:"")}},t.prototype.dispatchChangeEvent=function(e){return void 0===e&&(e={}),l.__awaiter(this,void 0,void 0,(function(){var t,a,n,o,i,r,d;return l.__generator(this,(function(l){switch(l.label){case 0:return t=this.props,a=t.dispatchEvent,n=t.onChange,o=t.submitOnChange,i=t.onRadioChange,r=s.resolveEventData(this.props,{value:e}),!1===(null==i?void 0:i(r,this.props))?[2]:[4,a("change",r)];case 1:return(null==(d=l.sent())?void 0:d.prevented)||n&&n(e,o,!0),[2]}}))}))},t.prototype.renderStatic=function(){var e=this.props,t=e.value,a=e.trueValue,n=e.falseValue,o=e.option,i=e.render,l=e.partial,r=e.optionType,s=e.checked,d=e.labelClassName;return v(m.default,{type:"radio",inline:!0,value:t||"",trueValue:a,falseValue:n,disabled:!0,partial:l,optionType:r,checked:s,labelClassName:d},o?i("option",o):null)},t.prototype.render=function(){var e=this,t=this.props,a=t.className;t.style;var n=t.value,o=t.trueValue,i=t.falseValue,l=t.option;t.onChange;var r=t.disabled,s=t.render,d=t.partial,u=t.optionType,p=t.checked,c=t.labelClassName,_=t.classPrefix;return v("div",{className:f.default("".concat(_,"CheckboxControl"),a)},v(m.default,{type:"radio",inline:!0,value:n||"",trueValue:o,falseValue:i,disabled:r,onChange:function(t){return e.dispatchChangeEvent(t)},partial:d,optionType:u,checked:p,labelClassName:c},l?s("option",l):null))},t.defaultProps={trueValue:!0,falseValue:!1},l.__decorate([s.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"dispatchChangeEvent",null),l.__decorate([u.supportStatic(),l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(_.default.Component),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t=l.__decorate([c.default,s.FormItem({type:"radio",sizeMutable:!1,thin:!0})],t)}(y);t.RadioControlRenderer=b,t.default=y}));
|
||
;/*!node_modules/amis-ui/lib/withRemoteConfig.js*/
|
||
amis.define("node_modules/amis-ui/lib/withRemoteConfig",(function(e,i,o,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/WithRemoteConfig");i.default=n.withRemoteConfig}));
|
||
;/*!node_modules/amis-ui/lib/components/InputJSONSchema.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/InputJSONSchema",(function(e,n,i,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s=e("node_modules/amis-ui/lib/components/json-schema/index");n.default=s.default}));
|
||
;/*!node_modules/amis/lib/renderers/Form/JSONSchema.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/JSONSchema",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/withRemoteConfig"),i=e("node_modules/amis-ui/lib/components/InputJSONSchema"),a=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),u=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(r),c=l(i),m=l(d),p=e("node_modules/react/index"),f=(p.default||p).createElement;(p.default||p).Fragment;var _=s.default({sourceField:"schema",injectedPropsFilter:function(e,t){return{schema:e.config,loading:e.loading}}})(c.default),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.controlRef=function(e){for(;null==e?void 0:e.getWrappedInstance;)e=e.getWrappedInstance();this.control=e},t.prototype.validate=function(){var e;return null===(e=this.control)||void 0===e?void 0:e.validate()},t.prototype.render=function(){var e=a.__rest(this.props,[]);return f(_,a.__assign({},e,{ref:this.controlRef}))},a.__decorate([u.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"controlRef",null),t}(m.default.PureComponent),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([u.FormItem({type:"json-schema",strictMode:!1})],t)}(h);t.JSONSchemaRenderer=v,t.default=h}));
|
||
;/*!node_modules/amis-ui/lib/components/JSONSchemaEditor.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/JSONSchemaEditor",(function(e,i,o,d){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/schema-editor/index");i.default=n.default}));
|
||
;/*!node_modules/amis/lib/renderers/Form/JSONSchemaEditor.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/JSONSchemaEditor",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/JSONSchemaEditor"),d=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),i=e("node_modules/lodash/pick"),l=e("node_modules/amis-core/lib/index"),s=e("node_modules/amis-ui/lib/components/schema-editor/Common");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(r),m=u(a),p=u(i),_=e("node_modules/react/index"),h=(_.default||_).createElement;(_.default||_).Fragment;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(t,e),t.prototype.normalizePlaceholder=function(){var e=this.props.placeholder;return l.isObject(e)?d.__assign(d.__assign({},s.schemaEditorItemPlaceholder),p.default(e,["key","title","description","default","empty"])):s.schemaEditorItemPlaceholder},t.prototype.renderModalProps=function(e,t){var n=this.props,o=n.render,r=n.advancedSettings;return o("modal",{type:"form",wrapWithPanel:!1,body:(null==r?void 0:r[null==e?void 0:e.type])||[],submitOnChange:!0},{data:e,onSubmit:function(e){return t(e)}})},t.prototype.render=function(){var e=this.props,t=e.enableAdvancedSetting,n=e.mobileUI,o=e.env,r=d.__rest(e,["enableAdvancedSetting","mobileUI","env"]);return h(c.default,d.__assign({},r,{mobileUI:n,placeholder:this.normalizePlaceholder(),enableAdvancedSetting:t,renderModalProps:this.renderModalProps,popOverContainer:n?null==o?void 0:o.getModalContainer:r.popOverContainer||o.getModalContainer}))},t.defaultProps={enableAdvancedSetting:!1,placeholder:s.schemaEditorItemPlaceholder},d.__decorate([l.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object,Function]),d.__metadata("design:returntype",void 0)],t.prototype,"renderModalProps",null),t}(m.default.PureComponent),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(t,e),t=d.__decorate([l.FormItem({type:"json-schema-editor"})],t)}(f);t.JSONSchemaEditorRenderer=b,t.default=f}));
|
||
;/*!node_modules/amis/lib/renderers/Form/ListSelect.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/ListSelect",(function(e,t,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),n=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),o=e("node_modules/amis/lib/renderers/Form/StaticHoc");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=r(n),c=e("node_modules/react/index"),m=(c.default||c).createElement;(c.default||c).Fragment;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.doAction=function(e,t,a){var l,i,n=this.props,o=n.resetValue,r=n.onChange,d=n.formStore,c=n.store,m=n.name,u=null==e?void 0:e.actionType;if("clear"===u)null==r||r("");else if("reset"===u){var p=null!==(i=s.getVariable(null!==(l=null==d?void 0:d.pristine)&&void 0!==l?l:null==c?void 0:c.pristine,m))&&void 0!==i?i:o;null==r||r(null!=p?p:"")}},t.prototype.handleDBClick=function(e,t){this.props.onToggle(e,!1,!0),this.props.onAction(null,{type:"submit"})},t.prototype.handleClick=function(e,t){t.target&&t.target.closest("a,button")||(0,this.props.onToggle)(e)},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.renderStatic=function(e){void 0===e&&(e="-");var t=this.props,a=t.itemSchema,l=t.labelField;t.valueField;var i=t.imageClassName,n=t.itemClassName,o=t.selectedOptions,r=t.classnames,d=t.render,c=t.data;if(!o.length)return e;return m("div",{className:r("StaticList")},o.map((function(e,t){var o=e[l||"label"];return o=o||"选项".concat(t+1),a||e.body||e.image?m("div",{key:t,className:r("ListControl-static-item",n)},a?d("".concat(t,"/body"),a,{data:s.createObject(c,e)}):e.body?d("".concat(t,"/body"),e.body):[e.image?m("div",{key:"image",className:r("ListControl-itemImage",i)},m("img",{src:e.image,alt:o})):null,m("div",{key:"label",className:r("ListControl-itemLabel")},o)]):m("div",{key:t,className:r("ListControl-static-item")},o)})))},t.prototype.render=function(){var e=this,t=this.props,a=t.render,l=t.itemClassName,n=t.classnames,o=t.className;t.style;var r=t.disabled,d=t.options,c=t.placeholder,u=t.selectedOptions,p=t.imageClassName,b=t.submitOnDBClick,v=t.itemSchema,y=t.activeItemSchema,g=t.data,f=t.labelField,C=t.listClassName,h=t.translate,_=t.testIdBuilder,N=null;return d&&d.length&&(N=m("div",{className:n("ListControl-items",C)},d.map((function(t,o){return m("div",i.__assign({key:o,className:n("ListControl-item",l,{"is-active":~u.indexOf(t),"is-disabled":t.disabled||r,"is-custom":!!v}),onClick:e.handleClick.bind(e,t),onDoubleClick:b?e.handleDBClick.bind(e,t):void 0},null==_?void 0:_.getChild("options-".concat(t.value||o)).getTestId()),v?a("".concat(o,"/body"),~u.indexOf(t)&&null!=y?y:v,{data:s.createObject(g,t)}):t.body?a("".concat(o,"/body"),t.body):[t.image?m("div",{key:"image",className:n("ListControl-itemImage",p)},m("img",{src:t.image,alt:t[f||"label"]})):null,t[f||"label"]?m("div",{key:"label",className:n("ListControl-itemLabel")},s.filter(String(t[f||"label"]),g)):null])})))),m("div",{className:n("ListControl",o)},N||m("span",{className:n("ListControl-placeholder")},h(c)))},t.propsList=["itemSchema","value","renderFormItems"],t.defaultProps={clearable:!1,imageClassName:"",submitOnDBClick:!1},i.__decorate([o.supportStatic(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(d.default.Component),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([s.OptionsControl({type:"list-select",sizeMutable:!1})],t)}(u);t.ListControlRenderer=p,t.default=u}));
|
||
;/*!node_modules/amis/lib/renderers/Form/LocationPicker.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/LocationPicker",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/LocationPicker"),i=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),d=e("node_modules/amis/lib/renderers/Form/StaticHoc");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=p(o),u=p(r),c=e("node_modules/react/index"),_=(c.default||c).createElement;(c.default||c).Fragment;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.domRef=u.default.createRef(),t.state={isOpened:!1},t}return i.__extends(t,e),t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.handleClick=function(){this.state.isOpened?this.close():this.open()},t.prototype.handleChange=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,a,n,o;return i.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,a=t.dispatchEvent,n=t.onChange,[4,a("change",s.resolveEventData(this.props,{value:e}))];case 1:return(null==(o=i.sent())?void 0:o.prevented)||n(e),[2]}}))}))},t.prototype.getParent=function(){var e;return null===(e=this.domRef.current)||void 0===e?void 0:e.parentElement},t.prototype.getTarget=function(){return this.domRef.current},t.prototype.doAction=function(e,t,a){var n,o,i,r=this.props,d=r.resetValue,p=r.onChange,l=r.formStore,u=r.store,c=r.name;switch(null==e?void 0:e.actionType){case"clear":p("");break;case"reset":null==p||p(null!==(i=null!==(o=s.getVariable(null!==(n=null==l?void 0:l.pristine)&&void 0!==n?n:null==u?void 0:u.pristine,c))&&void 0!==o?o:d)&&void 0!==i?i:"")}},t.prototype.renderStatic=function(e){void 0===e&&(e="-");var t=this.props;t.classnames;var a=t.value;return this.props.translate,a?_("div",{className:this.props.classnames("LocationControl",{"is-mobile":s.isMobile()}),ref:this.domRef},_("span",null,a.address)):_(u.default.Fragment,null,e)},t.prototype.render=function(){var e=this.props;e.style;var t=e.env;return s.filter(this.props.ak,this.props.data)||t.locationPickerAK,_("div",{className:this.props.classnames("LocationControl",{"is-mobile":s.isMobile()})},_(l.default,i.__assign({},this.props,{ak:s.filter(this.props.ak,this.props.data),onChange:this.handleChange})))},t.defaultProps={vendor:"baidu",coordinatesType:"bd09"},i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"close",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"open",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"getParent",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"getTarget",null),i.__decorate([d.supportStatic(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(u.default.Component),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([s.FormItem({type:"location-picker"})],t)}(m);t.LocationControl=m,t.LocationRenderer=y}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Transfer.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Transfer",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Spinner"),o=e("node_modules/amis-ui/lib/components/Transfer"),i=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),s=e("node_modules/lodash/find"),d=e("node_modules/lodash/pick"),u=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),c=e("node_modules/match-sorter/dist/match-sorter.cjs"),p=e("node_modules/amis-core/lib/index"),_=e("node_modules/amis/lib/renderers/Form/StaticHoc");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(r),g=m(o),v=m(l),f=m(s),y=m(d),b=e("node_modules/react/index"),O=(b.default||b).createElement;(b.default||b).Fragment;var C=function(e){switch(typeof e){case"string":return p.str2function(e,"options","inputValue","option");case"function":return e;default:return null}},S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.reload=function(){var e=this.props.reloadOptions;null==e||e()},t.prototype.handleChange=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var a,n,r,o,l,s,d,u,c,_,m,h,g,v,f,y,b,O;return i.__generator(this,(function(C){switch(C.label){case 0:return a=this.props,n=a.onChange,r=a.joinValues,o=a.delimiter,l=a.valueField,s=a.extractValue,d=a.options,u=a.dispatchEvent,c=a.setOptions,_=a.selectMode,m=a.deferApi,h=a.deferField,g=void 0===h?"defer":h,v=e,f=d.concat(),Array.isArray(e)?(v=e.map((function(e){var a=p.findTreeIndex(d,p.optionValueCompare(e[l||"value"],l||"value"),{resolve:p.getOptionValueBindField(l),value:e[l]||"value"});if(a){if(t){var n=p.getTree(f,a);f=p.spliceTree(f,a,1,i.__assign(i.__assign({},n),e))}}else f.push(i.__assign(i.__assign({},e),{visible:!1}));return r||s?e[l||"value"]:e})),r&&(v=v.join(o||","))):e&&(v=r||s?e[l||"value"]:e,(y=p.findTreeIndex(d,p.optionValueCompare(e[l||"value"],l||"value")))?t&&(b=p.getTree(f,y),f=p.spliceTree(f,y,1,i.__assign(i.__assign({},b),e))):f.push(i.__assign(i.__assign({},e),{visible:!1}))),(!0===!("tree"!==_||!m&&!p.findTree(d,(function(e){return e.deferApi||e[g]})))||f.length>d.length||t)&&c(f,!0),[4,u("change",p.resolveEventData(this.props,{value:v,options:d,items:d}))];case 1:return(null==(O=C.sent())?void 0:O.prevented)||n(v),[2]}}))}))},t.prototype.option2value=function(e){return e},t.prototype.getResult=function(e){return e.data.options||e.data.items||e.data},t.prototype.handleSearch=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,l,s,d,u,_,m,h,g,v,y,b,O;return i.__generator(this,(function(S){switch(S.label){case 0:if(n=this.props,r=n.searchApi,o=n.options,l=n.labelField,s=n.valueField,d=n.env,u=n.data,_=n.translate,m=n.filterOption,!r)return[3,5];S.label=1;case 1:return S.trys.push([1,3,,4]),[4,d.fetcher(r,p.createObject(u,i.__assign({term:e},a||{})),{cancelExecutor:t})];case 2:if(!(h=S.sent()).ok)throw new Error(_(h.msg||"networkError"));if(g=this.getResult(h),!Array.isArray(g))throw new Error(_("CRUD.invalidArray"));return v={},a&&(v={page:h.data.page,perPage:a.perPage,total:h.data.count}),[2,i.__assign({items:p.mapTree(g,(function(e){var t=null,a=e[s||"value"];return Array.isArray(o)&&null!=a&&(t=f.default(o,p.optionValueCompare(a,s)),(null==e?void 0:e.children)&&(t=i.__assign(i.__assign({},t),{children:e.children}))),t||e}))},v)];case 3:return y=S.sent(),d.isCancel(y)||r.silent||d.notify("error",y.message),[2,{items:[]}];case 4:return[3,6];case 5:return e?(b={keys:[l||"label",s||"value"]},m?(O=C(m))?[2,{items:O(o,e,b)}]:(d.notify("error","自定义检索函数不符合要求"),[2,{items:[]}]):[2,{items:p.filterTree(o,(function(t,a,n,r){return!!(Array.isArray(t.children)&&t.children.length||c.matchSorter([t].concat(r),e,{keys:[l||"label",s||"value"],threshold:c.matchSorter.rankings.CONTAINS}).length)}),0,!0)}]):[2,{items:o}];case 6:return[2]}}))}))},t.prototype.handleResultSearch=function(e,t){var a=this.props,n=a.valueField,r=a.labelField,o=p.string2regExp(e),i=t[r||"label"],l=t[n||"value"];return o.test(i)||o.test(l)},t.prototype.handlePageChange=function(e,t,a){var n=this.props,r=n.source,o=n.data,l=n.formItem,s=n.onChange,d=p.createObject(o,i.__assign({page:null!=e?e:1,perPage:null!=t?t:10},a?{pageDir:a}:{}));l&&u.isAlive(l)&&(p.isPureVariable(r)?l.loadOptionsFromDataScope(r,d,s):p.isEffectiveApi(r,d)&&l.loadOptions(r,d,void 0,!1,s,!1))},t.prototype.optionItemRender=function(e,t){var a=this.props,n=a.menuTpl,r=a.render,o=a.data;return r("item/".concat(t.index),n,{data:p.createObject(p.createObject(o,t),e)})},t.prototype.resultItemRender=function(e,t){var a=this.props,n=a.valueTpl,r=a.render,o=a.data;return r("value/".concat(t.index),n,{onChange:t.onChange,data:p.createObject(p.createObject(o,t),e)})},t.prototype.renderCell=function(e,t,a,n){var r=this.props,o=r.render,l=r.data,s=r.classnames,d=r.showInvalidMatch;return o("cell/".concat(a,"/").concat(n),i.__assign({type:"text",className:s({"is-invalid":!!d&&(null==t?void 0:t.__unmatched)})},e),{value:p.resolveVariable(e.name,t),data:p.createObject(l,t)})},t.prototype.getRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.tranferRef=e},t.prototype.onSelectAll=function(e){var t=this.props,a=t.dispatchEvent,n=t.data;a("selectAll",p.createObject(n,{items:e}))},t.prototype.doAction=function(e,t,a){var n,r,o,i,l,s=this.props,d=s.resetValue,u=s.onChange,c=s.formStore,_=s.store,m=s.name;switch(e.actionType){case"clear":null==u||u("");break;case"reset":null==u||u(null!==(o=null!==(r=p.getVariable(null!==(n=null==c?void 0:c.pristine)&&void 0!==n?n:null==_?void 0:_.pristine,m))&&void 0!==r?r:d)&&void 0!==o?o:"");break;case"selectAll":null===(i=this.tranferRef)||void 0===i||i.selectAll();break;case"clearSearch":null===(l=this.tranferRef)||void 0===l||l.clearSearch(t)}},t.prototype.render=function(){var e,t,a=this.props,n=a.className;a.style;var r=a.classnames,o=a.selectedOptions,l=a.showArrow,s=a.sortable,d=a.selectMode,u=a.columns,c=a.loading,_=a.searchable,m=a.searchResultMode,v=a.searchResultColumns,f=a.deferLoad,b=a.leftMode,C=a.rightMode,S=a.disabled,R=a.selectTitle,F=a.resultTitle,A=a.menuTpl,T=a.valueTpl,j=a.searchPlaceholder,I=a.resultListModeFollowSelect,P=void 0!==I&&I,w=a.resultSearchPlaceholder,x=a.resultSearchable,M=void 0!==x&&x,N=a.statistics,V=a.labelField,k=a.valueField,E=a.virtualThreshold,B=a.itemHeight,D=a.loadingConfig,L=a.showInvalidMatch,H=a.onlyChildren,U=a.mobileUI,W=a.noResultsText,q=a.pagination,z=a.formItem,G=a.env,J=a.popOverContainer,K=a.data,Q=a.autoCheckChildren,X=void 0===Q||Q,Y=a.initiallyOpen,Z=void 0===Y||Y,$=a.testIdBuilder,ee=this.props,te=ee.options,ae=ee.leftOptions,ne=ee.leftDefaultValue;return"associated"===d&&te&&te.length&&te[0].leftOptions&&Array.isArray(te[0].children)&&(ae=te[0].leftOptions,ne=null!==(e=te[0].leftDefaultValue)&&void 0!==e?e:ne,te=te[0].children),O("div",{className:r("TransferControl",n)},O(g.default,{onlyChildren:H,value:o,options:te,accumulatedOptions:null!==(t=null==z?void 0:z.accumulatedOptions)&&void 0!==t?t:[],disabled:S,onChange:this.handleChange,option2value:this.option2value,sortable:s,showArrow:l,selectMode:d,searchResultMode:m,searchResultColumns:v,columns:u,onSearch:_?this.handleSearch:void 0,onDeferLoad:f,leftOptions:ae,leftMode:b,rightMode:C,cellRender:this.renderCell,selectTitle:R,resultTitle:F,resultListModeFollowSelect:P,onResultSearch:this.handleResultSearch,searchPlaceholder:j,resultSearchable:M,resultSearchPlaceholder:w,statistics:N,labelField:V,valueField:k,optionItemRender:A?this.optionItemRender:void 0,resultItemRender:T?this.resultItemRender:void 0,onSelectAll:this.onSelectAll,onRef:this.getRef,virtualThreshold:E,itemHeight:p.toNumber(B)>0?p.toNumber(B):void 0,loadingConfig:D,showInvalidMatch:L,mobileUI:U,noResultsText:W,pagination:i.__assign(i.__assign({},y.default(q,["className","layout","perPageAvailable","popOverContainerSelector"])),{enable:(q&&void 0!==q.enable?!!("string"==typeof q.enable?p.evalExpression(q.enable,K):q.enable):!!(null==z?void 0:z.enableSourcePagination))&&(!d||"list"===d||"table"===d)&&te.length>0,maxButtons:Number.isInteger(null==q?void 0:q.maxButtons)?q.maxButtons:5,page:null==z?void 0:z.sourcePageNum,perPage:null==z?void 0:z.sourcePerPageNum,total:null==z?void 0:z.sourceTotalNum,popOverContainer:null!=J?J:null==G?void 0:G.getModalContainer}),onPageChange:this.handlePageChange,initiallyOpen:Z,autoCheckChildren:X,testIdBuilder:$}),O(h.default,{overlay:!0,key:"info",loadingConfig:D,show:c}))},t.defaultProps={multiple:!0},i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Boolean]),i.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"option2value",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"getResult",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String,Function,Object]),i.__metadata("design:returntype",Promise)],t.prototype,"handleSearch",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleResultSearch",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number,Number,String]),i.__metadata("design:returntype",void 0)],t.prototype,"handlePageChange",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"optionItemRender",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"resultItemRender",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Number,Number]),i.__metadata("design:returntype",void 0)],t.prototype,"renderCell",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"getRef",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Array]),i.__metadata("design:returntype",void 0)],t.prototype,"onSelectAll",null),i.__decorate([_.supportStatic(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(v.default.Component),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(S),F=p.OptionsControl({type:"transfer"})(R);t.BaseTransferRenderer=S,t.TransferRender=R,t.default=F,t.getCustomFilterOption=C}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Select.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Select",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/TransferDropDown"),l=e("node_modules/amis-ui/lib/components/Select"),r=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),d=e("node_modules/classnames/index"),u=e("node_modules/lodash/find"),c=e("node_modules/lodash/debounce"),p=e("node_modules/amis-core/lib/index"),h=e("node_modules/amis/lib/renderers/Form/Transfer"),m=e("node_modules/amis/lib/renderers/Form/StaticHoc");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=f(a),_=f(i),g=f(l),y=f(s),b=f(d),C=f(u),O=f(c),M=e("node_modules/react/index"),w=(M.default||M).createElement;(M.default||M).Fragment;var T=function(e){function t(t){var n=e.call(this,t)||this;return n.lastTerm="",n.fetchCancel=null,n.changeValue=n.changeValue.bind(n),n.lazyloadRemote=O.default(n.loadRemote.bind(n),250,{trailing:!0,leading:!1}),n.inputRef=n.inputRef.bind(n),n}return r.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;p.isEffectiveApi(t.autoComplete,t.data)&&p.isApiOutdated(e.autoComplete,t.autoComplete,e.data,t.data)&&this.lazyloadRemote(this.lastTerm)},t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook(),this.fetchCancel=null},t.prototype.inputRef=function(e){this.input=e},t.prototype.focus=function(){var e,t;this.input&&(null===(t=null===(e=this.input)||void 0===e?void 0:e.focus)||void 0===t||t.call(e))},t.prototype.getValue=function(e,t){void 0===t&&(t=[]);var n=this.props,o=n.joinValues,a=n.extractValue,i=n.delimiter,l=n.multiple,r=n.valueField,s=n.options,d=e;return(Array.isArray(e)?e:e?[e]:[]).forEach((function(e){C.default(s,(function(t){return t[r||"value"]==e[r||"value"]}))||t.push(e)})),o?d=l?Array.isArray(e)?e.map((function(e){return e[r||"value"]})).join(i):e?e[r||"value"]:"":d?d[r||"value"]:"":a&&(d=l?Array.isArray(e)?e.map((function(e){return e[r||"value"]})):e?[e[r||"value"]]:[]:d?d[r||"value"]:""),d},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){var n,o,a,i,l,s,d,u;return r.__generator(this,(function(r){switch(r.label){case 0:return n="on"+e.charAt(0).toUpperCase()+e.slice(1),o=this.props,a=o.dispatchEvent,i=o.options,l=o.value,s=o.multiple,d=o.selectedOptions,[4,a(e,p.resolveEventData(this.props,{options:i,items:i,value:l,selectedItems:s?d:d[0]}))];case 1:return(null==(u=r.sent())?void 0:u.prevented)||this.props[n](t),[2]}}))}))},t.prototype.changeValue=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,o,a,i,l,s,d;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,n=t.onChange,o=t.setOptions,a=t.options,t.data,i=t.dispatchEvent,l=[],s=this.getValue(e,l),l.length&&o(a.concat(l)),[4,i("change",p.resolveEventData(this.props,{value:s,options:a,items:a,selectedItems:e}))];case 1:return(null==(d=r.sent())?void 0:d.prevented)||(null==n||n(s)),[2]}}))}))},t.prototype.loadRemote=function(e){var t;return r.__awaiter(this,void 0,void 0,(function(){var n,o,a,i,l,s,d,u,c,h,m,f,v=this;return r.__generator(this,(function(r){switch(r.label){case 0:if(n=this.props,o=n.autoComplete,a=n.env,i=n.data,l=n.setOptions,s=n.setLoading,d=n.formInited,u=n.addHook,!a||!a.fetcher)throw new Error("fetcher is required");if(!1===d&&u)return this.unHook&&this.unHook(),[2,this.unHook=u(this.loadRemote.bind(this,e),"init")];if(this.lastTerm=e,c=p.createObject(i,{term:e,value:e}),!p.isEffectiveApi(o,c))return[2,Promise.resolve({options:[]})];this.fetchCancel&&(null===(t=this.fetchCancel)||void 0===t||t.call(this,"autoComplete request cancelled."),this.fetchCancel=null,s(!1)),s(!0),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,a.fetcher(o,c,{cancelExecutor:function(e){return v.fetchCancel=e}})];case 2:return h=r.sent(),this.fetchCancel=null,m=h.data&&h.data.options||h.data||[],f=this.mergeOptions(m),l(f),[2,{options:f}];case 3:return s(!1),[7];case 4:return[2]}}))}))},t.prototype.mergeOptions=function(e){var t=this.props,n=t.selectedOptions,o=t.valueField,a=void 0===o?"value":o,i=p.normalizeOptions(e,void 0,a).concat();return Array.isArray(n)&&n.length&&n.forEach((function(e){C.default(i,(function(t){return t[a]===e[a]}))||i.push(r.__assign(r.__assign({},e),{hidden:!0}))})),i},t.prototype.renderMenu=function(e,t){var n=this.props,o=n.menuTpl,a=n.render,i=n.data,l=n.optionClassName,r=n.testIdBuilder;return a("menu/".concat(t.index),o,{showNativeTitle:!0,className:b.default("Select-option-content",l),data:p.createObject(p.createObject(i,t),e),testIdBuilder:null==r?void 0:r.getChild("option-"+e.value||t.index)})},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.option2value=function(){},t.prototype.renderOtherMode=function(){var e=this.props,t=e.selectMode,n=r.__rest(e,["selectMode"]);return w(A,r.__assign({},n,{selectMode:"group"===t?"list":t}))},t.prototype.doAction=function(e,t,n){var o,a,i,l=this.props,r=l.resetValue,s=l.onChange,d=l.formStore,u=l.store,c=l.name,h=l.valueField,m=null==e?void 0:e.actionType;if("clear"===m)null==s||s("");else if("reset"===m){var f=null!==(i=p.getVariable(null!==(a=null==d?void 0:d.pristine)&&void 0!==a?a:null==u?void 0:u.pristine,c))&&void 0!==i?i:r,v=this.getValue(((o={})[h]=null!=f?f:"",o));null==s||s(v)}},t.prototype.handleOptionAdd=function(e,t,n,o){var a=this;void 0===e&&(e=-1),void 0===n&&(n=!1);var i=this.props,l=i.onAdd,s=i.autoComplete;null==l||l(e,t,n,(function(){return r.__awaiter(a,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return null==o||o(t),s?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return e.sent(),[2,!1];case 2:return[2]}}))}))}))},t.prototype.handleOptionEdit=function(e,t,n,o){var a=this,i=this.props,l=i.onEdit,s=i.autoComplete;null==l||l(e,t,n,(function(){return r.__awaiter(a,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return null==o||o(e),s?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return t.sent(),[2,!1];case 2:return[2]}}))}))}))},t.prototype.handleOptionDelete=function(e,t){var n=this,o=this.props,a=o.onDelete,i=o.autoComplete;null==a||a(e,(function(){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return null==t||t(e),i?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return n.sent(),[2,!1];case 2:return[2]}}))}))}))},t.prototype.render=function(){var e=this,t=this.props,n=t.autoComplete,o=t.searchable,a=t.showInvalidMatch,i=t.options,l=t.className,s=t.popoverClassName,d=t.style,u=t.loading;t.value;var c=t.selectedOptions,h=t.multi,m=t.multiple,f=t.placeholder,v=t.id,_=t.classPrefix;t.classnames;var y=t.creatable;t.inline;var C=t.noResultsText,O=t.render,M=t.menuTpl,T=t.borderMode,A=t.selectMode,R=t.env,x=t.mobileUI,F=t.overlay,I=t.filterOption,E=r.__rest(t,["autoComplete","searchable","showInvalidMatch","options","className","popoverClassName","style","loading","value","selectedOptions","multi","multiple","placeholder","id","classPrefix","classnames","creatable","inline","noResultsText","render","menuTpl","borderMode","selectMode","env","mobileUI","overlay","filterOption"]),N=this.props,j=N.classPrefix,S=N.themeCss;return C&&(C=O("noResultText",C)),w("div",{className:b.default("".concat(_,"SelectControl"),l),style:d},["table","list","group","tree","chained","associated"].includes(A)?this.renderOtherMode():w(g.default,r.__assign({},E,{onAdd:this.handleOptionAdd,onEdit:this.handleOptionEdit,onDelete:this.handleOptionDelete,className:b.default(p.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"selectControlClassName",id:v,themeCss:S}))),popoverClassName:b.default(s,p.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"selectPopoverClassName",id:v,themeCss:S}))),mobileUI:x,popOverContainer:x?null==R?void 0:R.getModalContainer:E.popOverContainer||R.getModalContainer,borderMode:T,placeholder:f,multiple:m||h,ref:this.inputRef,value:c,options:i,filterOption:"string"==typeof I?p.str2function(I,"options","inputValue","option"):I,loadOptions:p.isEffectiveApi(n)?this.lazyloadRemote:void 0,showInvalidMatch:a,creatable:y,searchable:o||!!n,onChange:this.changeValue,onBlur:function(t){return e.dispatchEvent("blur",t)},onFocus:function(t){return e.dispatchEvent("focus",t)},loading:u,noResultsText:C,renderMenu:M?this.renderMenu:void 0,overlay:F})),w(p.CustomStyle,r.__assign({},this.props,{config:{themeCss:S,classNames:[{key:"selectControlClassName",weights:{focused:{suf:".is-opened:not(.is-mobile)"},disabled:{suf:".is-disabled"}}},{key:"selectPopoverClassName",weights:{default:{suf:" .".concat(j,"Select-option")},hover:{suf:" .".concat(j,"Select-option.is-highlight")},focused:{inner:".".concat(j,"Select-option.is-active")}}}],id:v},env:R})))},t.defaultProps={clearable:!1,searchable:!1,multiple:!1,showInvalidMatch:!1},r.__decorate([p.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object,Object]),r.__metadata("design:returntype",void 0)],t.prototype,"renderMenu",null),r.__decorate([p.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object,Object,Boolean,Function]),r.__metadata("design:returntype",void 0)],t.prototype,"handleOptionAdd",null),r.__decorate([p.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object,Object,Boolean,Function]),r.__metadata("design:returntype",void 0)],t.prototype,"handleOptionEdit",null),r.__decorate([p.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object,Function]),r.__metadata("design:returntype",void 0)],t.prototype,"handleOptionDelete",null),r.__decorate([m.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(y.default.Component),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.renderItem=function(e){var t=this.props,n=t.labelField,o=t.menuTpl,a=t.data,i=t.render;return o?i("option/".concat(e.value),o,{data:p.createObject(a,e)}):"".concat(e.scopeLabel||"").concat(e[n||"label"])},t.prototype.render=function(){var e,t=this.props,n=t.className;t.classnames;var o=t.selectedOptions,a=t.sortable,i=t.loading,l=t.searchable,r=t.searchResultMode,s=t.showArrow,d=t.deferLoad,u=t.disabled,c=t.clearable,p=t.selectTitle,h=t.selectMode,m=t.multiple,f=t.columns,g=t.leftMode,b=t.borderMode,C=t.mobileUI,O=t.env,M=t.popOverContainer,T=t.maxTagCount,A=t.overflowTagPopover,R=t.placeholder,x=t.itemHeight,F=t.virtualThreshold,I=t.rightMode,E=t.loadingConfig,N=t.labelField,j=t.showInvalidMatch,S=t.checkAll,V=t.checkAllLabel,k=t.overlay,D=this.props,P=D.options,H=D.leftOptions,U=D.leftDefaultValue;return"associated"===h&&P&&P.length&&P[0].leftOptions&&Array.isArray(P[0].children)&&(H=P[0].leftOptions,U=null!==(e=P[0].leftDefaultValue)&&void 0!==e?e:U,P=P[0].children),w(y.default.Fragment,null,w(_.default,{selectMode:h,className:n,value:o,disabled:u,clearable:c,options:P,onChange:this.handleChange,option2value:this.option2value,optionItemRender:this.renderItem,itemRender:this.renderItem,sortable:a,searchResultMode:r,onSearch:l?this.handleSearch:void 0,showArrow:s,onDeferLoad:d,selectTitle:p,multiple:m,columns:f,leftMode:g,rightMode:I,leftOptions:H,borderMode:b,mobileUI:C,popOverContainer:M||O.getModalContainer,maxTagCount:T,overflowTagPopover:A,placeholder:R,itemHeight:x,virtualThreshold:F,virtualListHeight:266,labelField:N,showInvalidMatch:j,checkAllLabel:V,checkAll:S,overlay:k}),w(v.default,{overlay:!0,key:"info",show:i,loadingConfig:E}))},r.__decorate([p.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",Object)],t.prototype,"renderItem",null),t}(h.BaseTransferRenderer),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([p.OptionsControl({type:"select"})],t)}(T),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.defaultProps={multiple:!0},t=r.__decorate([p.OptionsControl({type:"multi-select"})],t)}(T);t.MultiSelectControlRenderer=x,t.SelectControlRenderer=R,t.default=T}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputDateRange.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputDateRange",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/DateRangePicker"),i=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),d=e("node_modules/classnames/index"),l=e("node_modules/amis/lib/renderers/Form/StaticHoc");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(r),m=u(o),f=u(d),c=e("node_modules/react/index"),_=(c.default||c).createElement;(c.default||c).Fragment;var v=function(e){function t(t){var a=e.call(this,t)||this,n=t.defaultValue,r=t.setPrinstineValue,i=t.delimiter,o=t.format,d=t.valueFormat,l=t.data,u=t.value,m=t.joinValues,f=t.utc;if(n&&u===n){var c="string"==typeof n?n.split(i):n;r(p.default.formatValue({startDate:s.filterDate(c[0],l,d||o),endDate:s.filterDate(c[1],l,d||o)},d||o,m,i,f))}return a}return i.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.defaultValue,n=t.delimiter,r=t.joinValues,i=t.setPrinstineValue,o=t.data,d=t.utc,l=t.format,u=t.valueFormat;if(e.defaultValue!==a){var m="string"==typeof a?a.split(n):a;i(m?p.default.formatValue({startDate:s.filterDate(m[0],o,u||l),endDate:s.filterDate(m[1],o,u||l)},u||l,r,n,d):void 0)}},t.prototype.getRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.dateRef=e},t.prototype.dispatchEvent=function(e){var t=this.props,a=t.dispatchEvent;t.data;var n=t.value;a(e,s.resolveEventData(this.props,{value:n}))},t.prototype.doAction=function(e,t,a){var n,r,i,o,d=this.props,l=d.resetValue,u=d.formStore,p=d.store,m=d.name;if("clear"!==e.actionType){if("reset"===e.actionType){var f=null!==(i=s.getVariable(null!==(r=null==u?void 0:u.pristine)&&void 0!==r?r:null==p?void 0:p.pristine,m))&&void 0!==i?i:l;null===(o=this.dateRef)||void 0===o||o.reset(f)}}else null===(n=this.dateRef)||void 0===n||n.clear()},t.prototype.setData=function(e){var t=this.props,a=t.data,n=t.delimiter,r=t.valueFormat,i=t.format,o=t.joinValues,d=t.utc,l=t.onChange;if("string"==typeof e){var u="string"==typeof e?e.split(n):e;e=p.default.formatValue({startDate:s.filterDate(u[0],a,r||i),endDate:s.filterDate(u[1],a,r||i)},r||i,o,n,d)}l(e)},t.prototype.handleChange=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,a;return i.__generator(this,(function(n){return t=this.props,a=t.dispatchEvent,t.data,a("change",s.resolveEventData(this.props,{value:e})),this.props.onChange(e),[2]}))}))},t.prototype.render=function(){var e,t=this,a=this.props,n=a.className;a.style;var r=a.classPrefix;a.defaultValue,a.defaultData;var o=a.minDate,d=a.maxDate,l=a.minDuration,u=a.maxDuration,m=a.data,c=a.format,v=a.valueFormat,g=a.inputFormat,h=a.displayFormat,y=a.env,D=a.mobileUI,F=i.__rest(a,["className","style","classPrefix","defaultValue","defaultData","minDate","maxDate","minDuration","maxDuration","data","format","valueFormat","inputFormat","displayFormat","env","mobileUI"]),b=null===(e=this.props)||void 0===e?void 0:e.type;return _("div",{className:f.default("".concat(r,"DateRangeControl"),{"is-date":/date-/.test(b),"is-datetime":/datetime-/.test(b)},n)},_(p.default,i.__assign({},F,{mobileUI:D,classPrefix:r,popOverContainer:D?null==y?void 0:y.getModalContainer:F.popOverContainer||y.getModalContainer,popOverContainerSelector:F.popOverContainerSelector,onRef:this.getRef,data:m,valueFormat:v||c,displayFormat:h||g,minDate:o?s.filterDate(o,m,v||c):void 0,maxDate:d?s.filterDate(d,m,v||c):void 0,minDateRaw:o,maxDateRaw:d,minDuration:l?s.parseDuration(l):void 0,maxDuration:u?s.parseDuration(u):void 0,onChange:this.handleChange,onFocus:function(){return t.dispatchEvent("focus")},onBlur:function(){return t.dispatchEvent("blur")}})))},t.defaultProps={format:"X",joinValues:!0,delimiter:",",animation:!0},i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"getRef",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String]),i.__metadata("design:returntype",void 0)],t.prototype,"dispatchEvent",null),i.__decorate([s.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),i.__decorate([l.supportStatic(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(m.default.Component),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.defaultProps=i.__assign({},v.defaultProps),t=i.__decorate([s.FormItem({type:"input-date-range"})],t)}(v),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.defaultProps=i.__assign(i.__assign({},v.defaultProps),{inputFormat:"YYYY-MM-DD HH:mm"}),t=i.__decorate([s.FormItem({type:"input-datetime-range",sizeMutable:!1})],t)}(v),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.defaultProps=i.__assign(i.__assign({},v.defaultProps),{format:"HH:mm",inputFormat:"HH:mm",viewMode:"time",ranges:"",shortcuts:""}),t=i.__decorate([s.FormItem({type:"input-time-range",sizeMutable:!1})],t)}(v);t.DateRangeControlRenderer=g,t.DateTimeRangeControlRenderer=h,t.TimeRangeControlRenderer=y,t.default=v}));
|
||
;/*!node_modules/amis-ui/lib/components/FormulaPicker.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/FormulaPicker",(function(e,i,o,u){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var l=e("node_modules/amis-ui/lib/components/formula/Picker");i.default=l.default}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputFormula.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputFormula",(function(e,a,t,r){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=e("node_modules/amis-ui/lib/components/FormulaPicker"),o=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),n=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=d(l),u=d(i),p=e("node_modules/react/index"),m=(p.default||p).createElement;(p.default||p).Fragment;var f=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(a,e),a.prototype.formulaRef=function(e){if(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.ref=e}else this.ref=void 0},a.prototype.validate=function(){var e,a=this.props,t=a.translate,r=a.value;if((null===(e=this.ref)||void 0===e?void 0:e.validate)&&r){var l=this.ref.validate(r);if(!0!==l)return t("FormulaEditor.invalidData",{err:l})}},a.prototype.render=function(){var e=this.props;e.selectedOptions;var a=e.disabled,t=e.onChange,r=e.evalMode,l=e.mixedMode,o=e.variableMode,i=e.header,d=e.label,u=e.value,p=e.clearable,f=e.className;e.style,e.classPrefix,e.classnames,e.allowInput;var c=e.borderMode,b=e.placeholder,v=e.inputMode,_=e.btnLabel,h=e.level,M=e.btnSize,y=e.icon,g=e.title,C=e.variableClassName,F=e.functionClassName,I=e.data,N=e.onPickerOpen,P=e.selfVariableName;e.popOverContainer;var x=e.env,O=e.inputSettings,V=e.mobileUI,R=this.props,S=R.variables,j=R.functions;return n.isPureVariable(S)&&(S=n.resolveVariableAndFilter(S,this.props.data,"| raw")),n.isPureVariable(j)&&(j=n.resolveVariableAndFilter(j,this.props.data,"| raw")),m(s.default,{popOverContainer:x.getModalContainer,ref:this.formulaRef,className:f,value:u,disabled:a,onChange:t,evalMode:r,variables:S,variableMode:o,functions:j,header:i||d||"",borderMode:c,placeholder:b,mode:v,inputSettings:O,btnLabel:_,level:h,btnSize:M,icon:y,title:g,clearable:p,variableClassName:C,functionClassName:F,data:I,onPickerOpen:N,selfVariableName:P,mixedMode:l,mobileUI:V})},a.defaultProps={inputMode:"input-button",borderMode:"full",evalMode:!0},o.__decorate([n.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],a.prototype,"formulaRef",null),a=o.__decorate([n.FormItem({type:"input-formula"})],a)}(u.default.Component);a.InputFormulaRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputRepeat.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputRepeat",(function(e,n,a,l){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=e("node_modules/amis-ui/lib/components/Select"),s=e("node_modules/amis-ui/lib/components/Range"),i=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),r=e("node_modules/classnames/index"),d=e("node_modules/amis-core/lib/index");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(t),c=u(s),h=u(o),m=u(r),f=e("node_modules/react/index"),y=(f.default||f).createElement;(f.default||f).Fragment;var v={secondly:"秒",minutely:"分",hourly:"时",daily:"天",weekdays:"周中",weekly:"周",monthly:"月",yearly:"年"},b=function(e){function n(n){var a=e.call(this,n)||this;return a.handleOptionChange=a.handleOptionChange.bind(a),a.handleChange=a.handleChange.bind(a),a}return i.__extends(n,e),n.prototype.handleOptionChange=function(e){this.props.onChange(e.value)},n.prototype.handleChange=function(e){var n=this.props.value,a=n?n.split(":"):[];this.props.onChange("".concat(a[0],":").concat(e))},n.prototype.renderInput=function(){var e,n=this,a=this.props.value,l=a?a.split(":"):[],t=this.props,s=t.options,i=t.placeholder,o=t.disabled,r=t.classPrefix,d=t.mobileUI,u=t.popOverContainer,h=t.env,m=t.translate,f=[];switch((f=s.split(",").map((function(e){return{label:v[e]||"不支持",value:e}}))).unshift({label:m(i),value:""}),l[1]=parseInt(l[1],10)||1,l[0]){case"secondly":case"minutely":e=y(c.default,{key:"input",classPrefix:r,value:l[1],min:1,step:5,max:60,disabled:o,onChange:function(e){return n.handleChange(e)}});break;case"hourly":e=y(c.default,{key:"input",classPrefix:r,value:l[1],min:1,step:1,max:24,disabled:o,onChange:function(e){return n.handleChange(e)}});break;case"daily":e=y(c.default,{key:"input",classPrefix:r,value:l[1],min:1,step:1,max:30,disabled:o,onChange:function(e){return n.handleChange(e)}});break;case"weekly":case"monthly":e=y(c.default,{key:"input",classPrefix:r,value:l[1],min:1,step:1,max:12,disabled:o,onChange:function(e){return n.handleChange(e)}});break;case"yearly":e=y(c.default,{classPrefix:r,key:"input",className:"v-middle",value:l[1],min:1,step:1,max:20,disabled:o,onChange:function(e){return n.handleChange(e)}})}return y("div",{className:"repeat-control hbox"},e?y("div",{className:"col v-middle",style:{width:30}},y("span",null,m("Repeat.pre"))):null,e?y("div",{className:"col v-middle"},e):null,y("div",{className:"col v-middle repeat-btn"},y(p.default,{classPrefix:r,className:e?"pull-right":"",options:f,placeholder:m(i),onChange:this.handleOptionChange,value:l[0],clearable:!1,searchable:!1,disabled:o,joinValues:!1,mobileUI:d,popOverContainer:d?null==h?void 0:h.getModalContainer:u||h.getModalContainer})))},n.prototype.render=function(){var e=this.props,n=e.className;e.style;var a=e.classPrefix;return y("div",{className:m.default("".concat(a,"RepeatControl"),n)},this.renderInput())},n.defaultProps={options:"hourly,daily,weekly,monthly",placeholder:"不重复"},n}(h.default.Component),C=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(n,e),n=i.__decorate([d.FormItem({type:"input-repeat",sizeMutable:!1})],n)}(b);n.RepeatControlRenderer=C,n.default=b}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputTree.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputTree",(function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/Spinner"),a=e("node_modules/amis-ui/lib/components/Tree"),r=e("node_modules/amis-ui/lib/components/SearchBox"),l=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),d=e("node_modules/lodash/omit"),u=e("node_modules/lodash/debounce"),c=e("node_modules/classnames/index"),p=e("node_modules/match-sorter/dist/match-sorter.cjs"),h=e("node_modules/amis-ui/lib/components/Select"),m=e("node_modules/amis-core/lib/index"),v=e("node_modules/amis/lib/renderers/Form/StaticHoc");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=f(n),g=f(a),y=f(r),b=f(s),C=f(d),O=f(u),F=f(c),S=e("node_modules/react/index"),A=(S.default||S).createElement;(S.default||S).Fragment;var T=function(e){function t(t){var i,o=this;return(o=e.call(this,t)||this).rootRef=b.default.createRef(),o.state={keyword:"",filteredOptions:null!==(i=o.props.options)&&void 0!==i?i:[],allowSearch:!1,virtualListHeight:0,othersHeight:0},o.handleSearch=O.default(o.handleSearch.bind(o),250,{trailing:!0,leading:!1}),o}return l.__extends(t,e),t.prototype.componentDidMount=function(){var e,t=this;this.props.heightAuto&&(this.initOthersHeight(),this.handleVirtualListHeight(),this.unSensor=m.resizeSensor(null===(e=this.rootRef.current)||void 0===e?void 0:e.parentElement,(function(){t.handleVirtualListHeight()}),!1,"height"))},t.prototype.componentDidUpdate=function(e,t){var i=this.props,o=this.state,n=this.state.keyword;if(e.options!==i.options||e.searchable!==i.searchable){var a=i.options,r=i.searchable;this.setState({filteredOptions:r&&n?this.filterOptions(a,n):a})}m.anyChanged(["label","searchable","creatable","hideRoot","themeCss","wrapperCustomStyle","heightAuto"],e,i)&&i.heightAuto&&this.initOthersHeight(),t.othersHeight!==o.othersHeight&&i.heightAuto&&this.handleVirtualListHeight()},t.prototype.componentWillUnmount=function(){this.unSensor&&(this.unSensor(),delete this.unSensor)},t.prototype.initOthersHeight=function(){var e,t,i=this,o=this.rootRef.current,n=null===(e=this.rootRef.current)||void 0===e?void 0:e.parentElement,a=this.treeRef.virtualListRef.current,r=null===(t=this.treeRef.virtualListRef.current)||void 0===t?void 0:t.parentElement;if(n&&r&&a&&o){var l=function(e,t){return Array.from(e.children).filter((function(e){return e!==t})).reduce((function(e,t){return e+t.offsetHeight+i.getElementVerticalMargin(t)}),0)},s=l(n,o)+this.getElementVerticalMargin(o)+l(r,a)+o.offsetHeight-r.offsetHeight;this.setState({othersHeight:s})}},t.prototype.handleVirtualListHeight=function(){var e,t=this.state.othersHeight,i=null===(e=this.rootRef.current)||void 0===e?void 0:e.parentElement;if(i){var o=i.offsetHeight-t;this.setState({virtualListHeight:o>0?o:0})}},t.prototype.getElementVerticalMargin=function(e){var t=window.getComputedStyle(e,null);return parseInt(t.marginTop||"0")+parseInt(t.marginBottom||"0")},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.doAction=function(e,t,i){var o,n,a,r,l,s,d,u,c,p,h,v=null==e?void 0:e.actionType,f=this.props,_=f.resetValue,g=f.onChange,y=f.formStore,b=f.store,C=f.name;if("clear"===v)null==g||g("");else if("reset"===v){var O=null!==(n=m.getVariable(null!==(o=null==y?void 0:y.pristine)&&void 0!==o?o:null==b?void 0:b.pristine,C))&&void 0!==n?n:_;null==g||g(null!=O?O:"")}else"expand"===e.actionType?this.treeRef.syncUnFolded(this.props,null===(a=e.args)||void 0===a?void 0:a.openLevel):"collapse"===e.actionType?this.treeRef.syncUnFolded(this.props,(null===(r=e.args)||void 0===r?void 0:r.closeLevel)||0):"add"===e.actionType?this.addItemFromAction(null===(l=e.args)||void 0===l?void 0:l.item,null===(s=e.args)||void 0===s?void 0:s.parentValue):"edit"===e.actionType?this.editItemFromAction(null===(d=e.args)||void 0===d?void 0:d.item,null===(u=e.args)||void 0===u?void 0:u.originValue):"delete"===e.actionType?this.deleteItemFromAction(null===(c=e.args)||void 0===c?void 0:c.value):"reload"===e.actionType?this.reload():"search"===v&&(this.setState({allowSearch:!!(null===(p=e.args)||void 0===p?void 0:p.keyword)}),this.handleSearch(null===(h=e.args)||void 0===h?void 0:h.keyword))},t.prototype.resolveOption=function(e,t){var i=this;return m.findTree(e,(function(e){var o=i.props.valueField||"value";return(m.hasAbility(e,o)?e[o]:"")===t}))},t.prototype.addItemFromAction=function(e,t){var i=this.props,o=i.onAdd,n=i.options,a=i.valueField,r=m.findTreeIndex(n,(function(e){var i=a||"value";return(m.hasAbility(e,i)?e[i]:"")===t}))||[];o&&o(r.concat(0),e,!0)},t.prototype.editItemFromAction=function(e,t){var i=this.props,o=i.onEdit,n=i.options,a=this.resolveOption(n,t);o&&a&&o(l.__assign(l.__assign({},e),{originValue:t}),a,!0)},t.prototype.deleteItemFromAction=function(e){var t=this.props,i=t.onDelete,o=t.options,n=this.resolveOption(o,e);i&&n&&i(n)},t.prototype.filterOptions=function(e,t){var i=this,o=this.props,n=o.labelField,a=o.valueField;return e.map((function(e){if((e=l.__assign({},e)).visible=!!p.matchSorter([e],t,{keys:[n||"label",a||"value"],threshold:p.matchSorter.rankings.CONTAINS}).length,!e.visible&&e.children){e.children=i.filterOptions(e.children,t);var o=e.children.filter((function(e){return e.visible})).length;e.visible=!!o}return e.visible&&(e.collapsed=!1),e}))},t.prototype.handleChange=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t,i,o,n,a,r,s,d,u,c,p,v,f,_,g,y,b,C;return l.__generator(this,(function(l){switch(l.label){case 0:return t=this.props,i=t.onChange,o=t.searchable,n=t.options,a=t.dispatchEvent,r=t.multiple,s=t.delimiter,d=t.valueField,u=t.selectedOptions,c=t.joinValues,p=t.extractValue,v=this.state,f=v.filteredOptions,_=v.allowSearch,g=o||_?f:n,y=h.value2array(e,{multiple:r,delimiter:s,valueField:d,options:f}),b=r?null:y[0],r&&(o||_)&&u.length&&(u.forEach((function(e){var t=m.findTree(f,(function(t){return t[d||"value"]===e[d||"value"]}));t||y.push(e)})),e=y.map((function(e){return p||c?e[d||"value"]:e})),c&&(e=e.join(s||","))),[4,a("change",m.resolveEventData(this.props,{value:e,item:b,items:g,selectedItems:y}))];case 1:return(null==(C=l.sent())?void 0:C.prevented)||i&&i(e),[2]}}))}))},t.prototype.handleNodeClick=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t,i,o,n;return l.__generator(this,(function(a){switch(a.label){case 0:return t=this.props,i=t.dispatchEvent,o=t.data,[4,i("itemClick",m.createObject(o,{item:e}))];case 1:return null==(n=a.sent())||n.prevented,[2]}}))}))},t.prototype.handleSearch=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t,i,o,n,a,r,s,d,u,c;return l.__generator(this,(function(l){switch(l.label){case 0:if(t=this.props,i=t.searchApi,o=t.options,n=t.env,a=t.data,r=t.translate,s=[],!m.isEffectiveApi(i))return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,n.fetcher(i,m.createObject(a,{term:e}))];case 2:if(!(d=l.sent()).ok)throw new Error(r(d.msg||"networkError"));if(u=d.data.options||d.data.items||d.data,!Array.isArray(u))throw new Error(r("Tree.invalidArray"));return s=u,[3,4];case 3:return c=l.sent(),n.isCancel(c)||!i.silent&&n.notify("error",c.message),[3,4];case 4:return[3,6];case 5:e&&(s=this.filterOptions(o,e)),l.label=6;case 6:return this.setState({keyword:e,filteredOptions:e?s:o}),[2]}}))}))},t.prototype.domRef=function(e){this.treeRef=e},t.prototype.validate=function(){var e=this.props,t=e.value,i=e.minLength,o=e.maxLength,n=e.delimiter,a=Array.isArray(t)?t:(t?String(t):"").split(n||",");return i&&a.length<i?"已选择数量低于设定的最小个数".concat(i,",请选择更多的选项。"):o&&a.length>o?"已选择数量超出设定的最大个数".concat(o,",请取消选择超出的选项。"):void 0},t.prototype.renderOptionItem=function(e,t){var i=this.props,o=i.menuTpl,n=i.render,a=i.data;return n("option/".concat(t.index),o,{data:m.createObject(m.createObject(a,l.__assign({},t)),e)})},t.prototype.renderItemActions=function(e,t){var i=this.props,o=i.itemActions,n=i.data;return(0,i.render)("action/".concat(t.index),o||"",{data:m.createObject(m.createObject(n,l.__assign({},t)),e)})},t.prototype.renderSearch=function(){var e=this.props,t=e.classPrefix,i=e.searchConfig,o=e.mobileUI,n=e.testIdBuilder;return A(y.default,l.__assign({className:F.default("".concat(t,"TreeControl-searchbox"),null==i?void 0:i.className,{"is-sticky":null==i?void 0:i.sticky}),mini:!1,clearable:!0},C.default(i,"className","sticky"),{onSearch:this.handleSearch,mobileUI:o,testIdBuilder:null==n?void 0:n.getChild("search")}))},t.prototype.render=function(){var e=this.props,t=e.className,i=e.treeContainerClassName,o=e.classPrefix,n=e.value,a=e.enableNodePath,r=e.pathSeparator,s=void 0===r?"/":r,d=e.disabled,u=e.joinValues,c=e.extractValue,p=e.delimiter,h=e.placeholder,v=e.options,f=e.multiple,y=e.valueField,C=e.initiallyOpen,O=e.unfoldedLevel,S=e.withChildren,T=e.onlyChildren,w=e.onlyLeaf,I=e.loading,R=e.hideRoot,j=e.rootLabel,k=e.autoCheckChildren,H=e.autoCancelParent,N=e.cascade,x=e.rootValue,V=e.showIcon,L=e.showRadio,E=e.showOutline,P=e.onAdd,D=e.creatable,U=e.createTip,B=e.addControls,M=e.onEdit,z=e.editable,W=e.editTip,q=e.editControls,G=e.removable,J=e.removeTip,K=e.onDelete,Q=e.rootCreatable,X=e.rootCreateTip,Y=e.labelField,Z=e.iconField,$=e.deferField,ee=e.nodePath,te=e.deferLoad,ie=e.expandTreeOptions,oe=e.translate,ne=e.data,ae=e.virtualThreshold,re=e.itemHeight,le=e.loadingConfig,se=e.menuTpl,de=e.enableDefaultIcon,ue=e.searchable,ce=e.searchConfig,pe=void 0===ce?{}:ce,he=e.heightAuto,me=e.mobileUI,ve=e.testIdBuilder,fe=e.nodeBehavior,_e=e.itemActions,ge=e.id,ye=e.wrapperCustomStyle,be=e.themeCss,Ce=e.env,Oe=this.props.highlightTxt,Fe=this.state,Se=Fe.filteredOptions,Ae=Fe.keyword,Te=Fe.allowSearch,we=Fe.virtualListHeight;m.isPureVariable(Oe)&&(Oe=m.resolveVariableAndFilter(Oe,ne));var Ie=A(g.default,{classPrefix:o,onRef:this.domRef,labelField:Y,valueField:y,iconField:Z,deferField:$,disabled:d,onChange:this.handleChange,onHandleNodeClick:this.handleNodeClick,joinValues:u,extractValue:c,delimiter:p,placeholder:oe(h),options:ue||Te?Se:v,highlightTxt:ue||Te?Ae:Oe,multiple:f,initiallyOpen:C,unfoldedLevel:O,withChildren:S,onlyChildren:T,onlyLeaf:w,hideRoot:R,rootLabel:oe(j),rootValue:x,showIcon:V,showRadio:L,showOutline:E,autoCheckChildren:k,autoCancelParent:H,cascade:N,foldedField:"collapsed",value:n||"",nodePath:ee,enableNodePath:a,pathSeparator:s,selfDisabledAffectChildren:!1,onAdd:P,creatable:D,createTip:U,rootCreatable:Q,rootCreateTip:X,onEdit:M,editable:z,editTip:W,removable:G,removeTip:J,onDelete:K,bultinCUD:!B&&!q,onDeferLoad:te,onExpandTree:ie,virtualThreshold:ae,virtualHeight:m.toNumber(we)>=0?m.toNumber(we):void 0,itemHeight:m.toNumber(re)>0?m.toNumber(re):void 0,itemRender:se?this.renderOptionItem:void 0,enableDefaultIcon:de,mobileUI:me,nodeBehavior:fe,itemActionsRender:_e?this.renderItemActions:void 0,actionClassName:F.default(m.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"actionControlClassName",id:ge,themeCss:be}))),testIdBuilder:null==ve?void 0:ve.getChild("tree")});return A(b.default.Fragment,null,A("div",l.__assign({ref:this.rootRef,className:F.default("".concat(o,"TreeControl"),t,i,{"is-sticky":ue&&(null==pe?void 0:pe.sticky),"h-auto":he})},null==ve?void 0:ve.getChild("control").getTestId()),A(_.default,{size:"sm",key:"info",show:I,loadingConfig:le}),I?null:ue?A(b.default.Fragment,null,this.renderSearch(),Ie):Ie),A(m.CustomStyle,l.__assign({},this.props,{config:{wrapperCustomStyle:ye,id:ge,themeCss:be,classNames:[{key:"actionControlClassName"}]},env:Ce})))},t.defaultProps={placeholder:"placeholder.noData",multiple:!1,rootLabel:"Tree.root",rootValue:"",showIcon:!0,enableNodePath:!1,pathSeparator:"/"},l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object,Object]),l.__metadata("design:returntype",void 0)],t.prototype,"addItemFromAction",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object,Object]),l.__metadata("design:returntype",void 0)],t.prototype,"editItemFromAction",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",void 0)],t.prototype,"deleteItemFromAction",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"handleNodeClick",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",void 0)],t.prototype,"domRef",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object,Object]),l.__metadata("design:returntype",void 0)],t.prototype,"renderOptionItem",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object,Object]),l.__metadata("design:returntype",void 0)],t.prototype,"renderItemActions",null),l.__decorate([m.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"renderSearch",null),l.__decorate([v.supportStatic(),l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(b.default.Component),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t=l.__decorate([m.OptionsControl({type:"input-tree"})],t)}(T);t.TreeControlRenderer=w,t.default=T}));
|
||
;/*!node_modules/amis/lib/renderers/Form/TreeSelect.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/TreeSelect",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/PopUp"),i=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/amis-ui/lib/components/ResultBox"),l=e("node_modules/amis-ui/lib/components/Tree"),s=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),p=e("node_modules/amis-core/lib/index"),u=e("node_modules/match-sorter/dist/match-sorter.cjs"),c=e("node_modules/lodash/debounce"),h=e("node_modules/react-dom/index"),m=e("node_modules/amis/lib/renderers/Form/StaticHoc");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=v(o),_=v(i),g=v(r),y=v(l),b=v(d),C=v(c),O=e("node_modules/react/index"),T=(O.default||O).createElement;(O.default||O).Fragment;var I=function(e){function t(t){var n=e.call(this,t)||this;return n.container=b.default.createRef(),n.input=b.default.createRef(),n.cache={},n.targetRef=function(e){return n.target=e?h.findDOMNode(e):null},n.sourceLoaded=!1,n.state={inputValue:"",tempValue:"",isOpened:!1},n.open=n.open.bind(n),n.close=n.close.bind(n),n.handleChange=n.handleChange.bind(n),n.handleTempChange=n.handleTempChange.bind(n),n.handleConfirm=n.handleConfirm.bind(n),n.clearValue=n.clearValue.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleInputChange=C.default(n.handleInputChange.bind(n),150,{trailing:!0,leading:!1}),n.handleInputKeyDown=n.handleInputKeyDown.bind(n),n.loadRemote=C.default(n.loadRemote.bind(n),250,{trailing:!0,leading:!1}),n}return s.__extends(t,e),t.prototype.componentDidMount=function(){this.loadRemote("")},t.prototype.componentWillUnmount=function(){this.sourceLoaded=!1},t.prototype.open=function(e){this.props.disabled||this.setState({isOpened:!0},e)},t.prototype.close=function(){var e=this;this.setState({isOpened:!1,inputValue:this.props.multiple?this.state.inputValue:""},(function(){return e.loadRemote(e.state.inputValue)}))},t.prototype.resolveOptions=function(){var e=this.props,t=e.options,n=e.searchable,a=e.autoComplete;return!p.isEffectiveApi(a)&&n&&this.state.inputValue?this.filterOptions(t,this.state.inputValue):t},t.prototype.resolveOption=function(e,t){var n=this;return p.findTree(e,(function(e){var a=n.props.valueField||"value";return(p.hasAbility(e,a)?e[a]:"")===t}))},t.prototype.handleFocus=function(e){var t=this.props,n=t.dispatchEvent,a=t.value,o=this.resolveOptions(),i=this.resolveOption(o,a);n("focus",p.resolveEventData(this.props,{value:a,item:i,items:o}))},t.prototype.handleBlur=function(e){var t=this.props,n=t.dispatchEvent,a=t.value,o=this.resolveOptions(),i=this.resolveOption(o,a);n("blur",p.resolveEventData(this.props,{value:a,item:i,items:o}))},t.prototype.handleKeyPress=function(e){" "===e.key&&e.shiftKey&&(this.handleOutClick(e),e.preventDefault())},t.prototype.validate=function(){var e=this.props,t=e.value,n=e.minLength,a=e.maxLength,o=e.delimiter,i=Array.isArray(t)?t:(t?String(t):"").split(o||",");return n&&i.length<n?"已选择数量低于设定的最小个数".concat(n,",请选择更多的选项。"):a&&i.length>a?"已选择数量超出设定的最大个数".concat(a,",请取消选择超出的选项。"):void 0},t.prototype.removeItem=function(e,t){var n=this.props,a=n.selectedOptions,o=n.joinValues,i=n.extractValue,r=n.delimiter,l=n.valueField,s=n.onChange,d=n.disabled;if(t&&t.stopPropagation(),!d){var p=a.concat();p.splice(e,1);var u=p;o?u=p.map((function(e){return e[l||"value"]})).join(r||","):i&&(u=p.map((function(e){return e[l||"value"]}))),s(u)}},t.prototype.handleChange=function(e){var t=this;this.props.multiple||this.close(),this.setState({inputValue:""},(function(){return t.resultChangeEvent(e)}))},t.prototype.handleTempChange=function(e){this.setState({tempValue:e})},t.prototype.handleConfirm=function(){var e=this;this.close(),this.setState({inputValue:""},(function(){return e.resultChangeEvent(e.state.tempValue)}))},t.prototype.handleInputChange=function(e){var t=this,n=this.props,a=n.autoComplete,o=n.data;this.setState({inputValue:e},p.isEffectiveApi(a,o)?function(){return t.loadRemote(t.state.inputValue)}:void 0)},t.prototype.handleInputKeyDown=function(e){var t=this.state.inputValue,n=this.props,a=n.multiple,o=n.selectedOptions;"Backspace"===e.key&&!t&&o.length&&a&&this.removeItem(o.length-1)},t.prototype.resetValue=function(){var e,t,n=this.props,a=n.onChange,o=n.resetValue,i=n.formStore,r=n.store,l=n.name;a(null!==(t=p.getVariable(null!==(e=null==i?void 0:i.pristine)&&void 0!==e?e:null==r?void 0:r.pristine,l))&&void 0!==t?t:o)},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,n=e.resetValue;t(void 0===n?"":n)},t.prototype.filterOptions=function(e,t){var n=this,a=this.props,o=a.labelField,i=a.valueField;return e.map((function(e){if((e=s.__assign({},e)).visible=!!u.matchSorter([e],t,{keys:[o||"label",i||"value"],threshold:u.matchSorter.rankings.CONTAINS}).length,!e.visible&&e.children){e.children=n.filterOptions(e.children,t);var a=e.children.filter((function(e){return e.visible})).length;e.visible=!!a}return e.visible&&(e.collapsed=!1),e}))},t.prototype.loadRemote=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,n,a,o,i,r,l,d,u,c;return s.__generator(this,(function(h){switch(h.label){case 0:if(t=this.props,n=t.autoComplete,a=t.env,o=t.data,i=t.setOptions,r=t.setLoading,l=t.source,!p.isEffectiveApi(n,o)||!e&&p.isEffectiveApi(l)&&!this.sourceLoaded)return this.sourceLoaded=!0,[2];if(!a||!a.fetcher)throw new Error("fetcher is required");if(this.cache[e]||~e.indexOf("'"))return u=this.cache[e]||[],c=this.mergeOptions(u),i(c),[2,Promise.resolve({options:c})];r(!0),h.label=1;case 1:return h.trys.push([1,,3,4]),[4,a.fetcher(n,s.__assign(s.__assign({},o),{term:e,value:e}))];case 2:return d=h.sent(),u=d.data&&d.data.options||d.data||[],this.cache[e]=u,c=this.mergeOptions(u),i(c),[2,{options:c}];case 3:return r(!1),[7];case 4:return[2]}}))}))},t.prototype.mergeOptions=function(e){var t=this.props.selectedOptions,n=p.normalizeOptions(e).concat();return Array.isArray(t)&&t.length&&t.forEach((function(e){p.findTree(n,(function(t){return t.value==e.value}))||n.push(s.__assign({},e))})),n},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.handleOutClick=function(e){e.defaultPrevented||this.setState({isOpened:!0})},t.prototype.handleResultChange=function(e){var t=this.props,n=t.joinValues,a=t.extractValue,o=t.delimiter,i=t.valueField,r=t.multiple,l=Array.isArray(e)?e.concat():[];r||l.length?((n||a)&&(l=e.map((function(e){return e[i||"value"]}))),n&&(l=l.join(o||",")),this.resultChangeEvent(l)):this.resultChangeEvent("")},t.prototype.doAction=function(e,t,n){var a,o,i,r,l;"clear"===e.actionType?this.clearValue():"reset"===e.actionType?this.resetValue():"add"===e.actionType?this.addItemFromAction(null===(a=e.args)||void 0===a?void 0:a.item,null===(o=e.args)||void 0===o?void 0:o.parentValue):"edit"===e.actionType?this.editItemFromAction(null===(i=e.args)||void 0===i?void 0:i.item,null===(r=e.args)||void 0===r?void 0:r.originValue):"delete"===e.actionType?this.deleteItemFromAction(null===(l=e.args)||void 0===l?void 0:l.value):"reload"===e.actionType&&this.reload()},t.prototype.addItemFromAction=function(e,t){var n=this.props,a=n.onAdd,o=n.options,i=n.valueField,r=p.findTreeIndex(o,(function(e){var n=i||"value";return(p.hasAbility(e,n)?e[n]:"")===t}))||[];a&&a(r.concat(0),e,!0)},t.prototype.editItemFromAction=function(e,t){var n=this.props,a=n.onEdit,o=n.options,i=this.resolveOption(o,t);a&&i&&a(s.__assign(s.__assign({},e),{originValue:t}),i,!0)},t.prototype.deleteItemFromAction=function(e){var t=this.props,n=t.onDelete,a=t.options,o=this.resolveOption(a,e);n&&o&&n(o)},t.prototype.resultChangeEvent=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,n,a,o,i,r;return s.__generator(this,(function(l){switch(l.label){case 0:return t=this.props,n=t.onChange,a=t.dispatchEvent,o=this.resolveOptions(),i=this.resolveOption(o,e),[4,a("change",p.resolveEventData(this.props,{value:e,item:i,items:this.resolveOptions()}))];case 1:return(null==(r=l.sent())?void 0:r.prevented)||n&&n(e),[2]}}))}))},t.prototype.handleNodeClick=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,n,a,o;return s.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,n=t.dispatchEvent,a=t.data,[4,n("itemClick",p.createObject(a,{item:e}))];case 1:return null==(o=i.sent())||o.prevented,[2]}}))}))},t.prototype.renderOptionItem=function(e,t){var n=this.props,a=n.menuTpl,o=n.render,i=n.data;return o("option/".concat(t.index),a,{data:p.createObject(p.createObject(i,s.__assign({},t)),e)})},t.prototype.renderItem=function(e){var t=this.props,n=t.labelField,a=t.options;if(t.hideNodePathLabel)return e[n||"label"];var o=p.getTreeAncestors(a,e,!0);return"".concat(o?o.map((function(e){return"".concat(e[n||"label"])})).join(" / "):e[n||"label"])},t.prototype.domRef=function(e){this.treeRef=e},t.prototype.renderOuter=function(){var e=this.props,t=e.value,n=e.enableNodePath,a=e.pathSeparator,o=void 0===a?"/":a,i=e.disabled,r=e.joinValues,l=e.extractValue,d=e.delimiter;e.placeholder;var u=e.options,c=e.multiple,h=e.valueField,m=e.initiallyOpen,v=e.unfoldedLevel,f=e.withChildren,_=e.rootLabel,g=e.cascade,b=e.rootValue,C=e.showIcon,O=e.showRadio;e.popOverContainer;var I=e.onlyChildren,F=e.onlyLeaf,V=e.classPrefix,A=e.optionsPlaceholder,S=e.searchable,w=e.autoComplete,P=e.maxLength,j=e.minLength,R=e.labelField,x=e.deferField,E=e.nodePath,D=e.onAdd,N=e.creatable,L=e.createTip,k=e.addControls,B=e.onEdit,K=e.editable,U=e.editTip,H=e.editControls,M=e.removable,W=e.removeTip,z=e.onDelete,q=e.rootCreatable,G=e.rootCreateTip,J=e.translate,Q=e.deferLoad,X=e.expandTreeOptions,Y=e.selfDisabledAffectChildren,Z=e.showOutline,$=e.autoCheckChildren,ee=e.autoCancelParent,te=e.hideRoot,ne=e.virtualThreshold,ae=e.itemHeight,oe=e.menuTpl,ie=e.enableDefaultIcon,re=e.mobileUI,le=e.testIdBuilder,se=e.nodeBehavior,de=e.itemActions,pe=e.classnames,ue=e.id,ce=e.themeCss,he=!p.isEffectiveApi(w)&&S&&this.state.inputValue?this.filterOptions(u,this.state.inputValue):u;return T(y.default,{classPrefix:V,onRef:this.domRef,onlyChildren:I,onHandleNodeClick:this.handleNodeClick,onlyLeaf:F,labelField:R,valueField:h,deferField:x,disabled:i,onChange:re?this.handleTempChange:this.handleChange,joinValues:r,extractValue:l,delimiter:d,placeholder:J(A),options:he,highlightTxt:this.state.inputValue,multiple:c,initiallyOpen:m,unfoldedLevel:v,withChildren:f,autoCheckChildren:$,autoCancelParent:ee,rootLabel:J(_),rootValue:b,showIcon:C,showRadio:O,showOutline:Z,cascade:g,foldedField:"collapsed",hideRoot:te,value:t||"",nodePath:E,enableNodePath:n,pathSeparator:o,maxLength:P,minLength:j,onAdd:D,creatable:N,createTip:L,rootCreatable:q,rootCreateTip:G,onEdit:B,editable:K,editTip:U,removable:M,removeTip:W,onDelete:z,bultinCUD:!k&&!H,onDeferLoad:Q,onExpandTree:X,selfDisabledAffectChildren:Y,virtualThreshold:ne,itemHeight:p.toNumber(ae)>0?p.toNumber(ae):void 0,itemRender:oe?this.renderOptionItem:void 0,enableDefaultIcon:ie,mobileUI:re,nodeBehavior:se,itemActionsRender:de?this.renderItemActions:void 0,actionClassName:pe(p.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"actionControlClassName",id:ue,themeCss:ce}))),testIdBuilder:le})},t.prototype.renderItemActions=function(e,t){var n=this.props,a=n.itemActions,o=n.data;return(0,n.render)("action/".concat(t.index),a||"",{data:p.createObject(p.createObject(o,s.__assign({},t)),e)})},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var a=t.disabled,o=t.inline,i=t.loading,r=t.multiple;t.value;var l=t.clearable,d=t.classPrefix,u=t.classnames,c=t.searchable,h=t.autoComplete,m=t.selectedOptions,v=t.placeholder,y=t.popOverContainer,C=t.mobileUI,O=t.maxTagCount,I=t.overflowTagPopover,F=t.translate,V=t.env,A=t.loadingConfig,S=t.testIdBuilder,w=t.wrapperCustomStyle,P=t.id,j=t.themeCss,R=this.state.isOpened,x=r?m:m.length?this.renderItem(m[0]):"";return T(b.default.Fragment,null,T("div",s.__assign({ref:this.container,className:u("TreeSelectControl",n)},null==S?void 0:S.getTestId()),T(g.default,{popOverContainer:y||V.getModalContainer,maxTagCount:O,overflowTagPopover:I,disabled:a,ref:this.targetRef,placeholder:F(null!=v?v:"placeholder.empty"),inputPlaceholder:"",className:u("TreeSelect",{"TreeSelect--inline":o,"TreeSelect--single":!r,"TreeSelect--multi":r,"TreeSelect--searchable":c||p.isEffectiveApi(h),"is-opened":this.state.isOpened,"is-disabled":a}),result:x,onResultClick:this.handleOutClick,value:this.state.inputValue,onChange:this.handleInputChange,onResultChange:this.handleResultChange,itemRender:this.renderItem,onKeyPress:this.handleKeyPress,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleInputKeyDown,clearable:l,allowInput:!C&&(c||p.isEffectiveApi(h))&&(r||!x),hasDropDownArrow:!0,readOnly:C,mobileUI:C,testIdBuilder:null==S?void 0:S.getChild("result-box")},i?T(_.default,{loadingConfig:A,size:"sm"}):void 0),!C&&R?T(p.Overlay,{container:y||function(){return e.container.current},target:function(){return e.target},show:!0},T(p.PopOver,{classPrefix:d,className:"".concat(d,"TreeSelect-popover"),style:{minWidth:this.target?this.target.offsetWidth:void 0},onHide:this.close,overlay:!0},this.renderOuter())):null,C?T(f.default,{container:V.getModalContainer,className:u("".concat(d,"TreeSelect-popup")),isShow:R,onHide:this.close,showConfirm:!0,onConfirm:this.handleConfirm},this.renderOuter()):null),T(p.CustomStyle,s.__assign({},this.props,{config:{wrapperCustomStyle:w,id:P,themeCss:j,classNames:[{key:"actionControlClassName"}]},env:V})))},t.defaultProps={hideRoot:!0,placeholder:"Select.placeholder",optionsPlaceholder:"placeholder.noData",multiple:!1,clearable:!0,rootLabel:"Tree.root",rootValue:"",showIcon:!0,joinValues:!0,extractValue:!1,delimiter:",",resetValue:"",hideNodePathLabel:!1,enableNodePath:!1,pathSeparator:"/",selfDisabledAffectChildren:!0},s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleOutClick",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Array]),s.__metadata("design:returntype",void 0)],t.prototype,"handleResultChange",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],t.prototype,"addItemFromAction",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],t.prototype,"editItemFromAction",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"deleteItemFromAction",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],t.prototype,"resultChangeEvent",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],t.prototype,"handleNodeClick",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],t.prototype,"renderOptionItem",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"renderItem",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"domRef",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],t.prototype,"renderItemActions",null),s.__decorate([m.supportStatic(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(b.default.Component),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([p.OptionsControl({type:"tree-select"})],t)}(I);t.TreeSelectControlRenderer=F,t.default=I}));
|
||
;/*!node_modules/amis/lib/renderers/Form/UUID.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/UUID",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),u=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=function(e){function t(t){var n=e.call(this,t)||this;return t.value||n.setValue(),n}return r.__extends(t,e),t.prototype.componentDidUpdate=function(e){e.value||!1===e.formInited||this.setValue()},t.prototype.setValue=function(){var e=this.props,t=i.uuidv4();e.length&&(t=t.substring(0,e.length)),e.onChange(t)},t.prototype.render=function(){return null},t}(l(u).default.Component),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([i.FormItem({type:"uuid",wrap:!1,sizeMutable:!1})],t)}(d);t.UUIDControlRenderer=s,t.default=d}));
|
||
;/*!node_modules/amis/lib/renderers/Form/MatrixCheckboxes.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/MatrixCheckboxes",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/Checkbox"),s=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(o),p=c(i),h=c(a),f=e("node_modules/react/index"),m=(f.default||f).createElement;(f.default||f).Fragment;var g=function(e){function t(t){var n=e.call(this,t)||this;return n.mounted=!1,n.toDispose=[],n.state={columns:t.columns||[],rows:t.rows||[],loading:!1},n.toggleItem=n.toggleItem.bind(n),n.reload=n.reload.bind(n),n.initOptions=n.initOptions.bind(n),n.mounted=!0,n}return s.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.formInited,n=e.addHook,r=e.formItem;r&&this.toDispose.push(t||!n?r.addInitHook(this.initOptions):n(this.initOptions,"init"))},t.prototype.componentDidUpdate=function(e){var t=this.props;if(e.columns!==t.columns||e.rows!==t.rows)this.setState({columns:t.columns||[],rows:t.rows||[]});else if(t.formInited&&(t.source!==e.source||e.data!==t.data)){var n=l.buildApi(e.source,e.data,{ignoreData:!0}),r=l.buildApi(t.source,t.data,{ignoreData:!0});n.url!==r.url&&l.isValidApi(r.url)&&this.reload()}},t.prototype.componentWillUnmount=function(){this.mounted=!1,this.toDispose.forEach((function(e){return e()})),this.toDispose=[]},t.prototype.doAction=function(e,t,n){var r,o,i=this.props,s=i.resetValue,a=i.onChange,u=i.formStore,c=i.store,d=i.name,p=null==e?void 0:e.actionType;if("clear"===p)null==a||a("");else if("reset"===p){var h=null!==(o=l.getVariable(null!==(r=null==u?void 0:u.pristine)&&void 0!==r?r:null==c?void 0:c.pristine,d))&&void 0!==o?o:s;null==a||a(null!=h?h:"")}},t.prototype.initOptions=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,n,r;return s.__generator(this,(function(o){switch(o.label){case 0:return[4,this.reload()];case 1:return o.sent(),t=this.props,n=t.formItem,r=t.name,n?(n.value&&l.setVariable(e,r,n.value),[2]):[2]}}))}))},t.prototype.reload=function(){return s.__awaiter(this,void 0,void 0,(function(){var e,t,n,r,o,i,a=this;return s.__generator(this,(function(u){switch(u.label){case 0:if(e=this.props,t=e.source,n=e.data,r=e.env,o=e.onChange,i=e.translate,!l.isEffectiveApi(t,n)||this.state.loading)return[2];if(!r||!r.fetcher)throw new Error("fetcher is required");return[4,new Promise((function(e,l){if(!a.mounted)return e();a.setState({loading:!0},(function(){if(!a.mounted)return e();r.fetcher(t,n).then((function(n){if(!n.ok)throw new Error(n.msg||i("fetchFailed"));if(!a.mounted)return e();a.setState({loading:!1,rows:n.data.rows||[],columns:n.data.columns||[]},(function(){t&&t.replaceData;var r=n.data.value;r&&(r=t.replaceData?r:function(e,t,n){return e.map((function(e,r){return e.map((function(e,o){return s.__assign(s.__assign(s.__assign({},t[r]),n[o]),e)}))}))}(r,a.state.columns,a.state.rows),o(r)),e()}))})).catch((function(t){return a.setState({error:t,loading:!1},(function(){return e()}))}))}))}))];case 1:return[2,u.sent()]}}))}))},t.prototype.toggleItem=function(e,t,n){return s.__awaiter(this,void 0,void 0,(function(){var r,o,i,a,u,c,d,p,h,f,m,g,v;return s.__generator(this,(function(b){switch(b.label){case 0:if(r=this.state,o=r.columns,i=r.rows,a=this.props,u=a.multiple,c=a.singleSelectMode,d=a.dispatchEvent,a.data,p=this.props.value||_(o,i),u)p[t][n]=s.__assign(s.__assign({},p[t][n]),{checked:e});else if("row"===c)for(m=0,f=o.length;m<f;m++)p[m][n]=s.__assign(s.__assign({},p[m][n]),{checked:t===m?e:!e});else if("column"===c)for(h=0,f=i.length;h<f;h++)p[t][h]=s.__assign(s.__assign({},p[t][h]),{checked:n===h?e:!e});else for(h=0,f=i.length;h<f;h++)for(m=0,g=o.length;m<g;m++)p[m][h]=s.__assign(s.__assign({},p[m][h]),{checked:t===m&&n===h?e:!e});return[4,d("change",l.resolveEventData(this.props,{value:p.concat()}))];case 1:return(null==(v=b.sent())?void 0:v.prevented)||this.props.onChange(p.concat()),[2]}}))}))},t.prototype.isColumChecked=function(e,t){var n=e[t];return!!n&&n.some((function(e){return e&&e.checked}))},t.prototype.isColumnPartialChecked=function(e,t){var n=e[t];if(!n||1==n.length)return!1;var r=n[0].checked;return n.some((function(e){return e.checked!==r}))&&!n.every((function(e){return e.checked===r}))},t.prototype.toggleColumnCheckAll=function(e,t,n){return s.__awaiter(this,void 0,void 0,(function(){var r,o;return s.__generator(this,(function(i){switch(i.label){case 0:r=t[n],o=0,i.label=1;case 1:return o<r.length?[4,this.toggleItem(e,n,o)]:[3,4];case 2:i.sent(),i.label=3;case 3:return o++,[3,1];case 4:return[2]}}))}))},t.prototype.isRowChecked=function(e,t){return e&&e.some((function(e){return e[t]&&e[t].checked}))},t.prototype.isRowPartialChecked=function(e,t){if(!e||1==e.length)return!1;var n=e[0][t].checked;return e.some((function(e){return n!==e[t].checked}))&&!e.every((function(e){return e.checked}))},t.prototype.toggleRowCheckAll=function(e,t,n){return s.__awaiter(this,void 0,void 0,(function(){var r;return s.__generator(this,(function(o){switch(o.label){case 0:r=0,o.label=1;case 1:return r<t.length?[4,this.toggleItem(e,r,n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},t.prototype.renderInput=function(e){var t=this;void 0===e&&(e=!1);var n=this.state,r=n.columns,o=n.rows,i=this.props,s=i.rowLabel,a=i.disabled,u=i.classnames,c=i.multiple,d=i.textAlign,h=i.xCheckAll,f=i.yCheckAll,g=i.testIdBuilder,v=this.props.value||_(r,o);return m("div",{className:u("Table m-b-none",{"is-mobile":l.isMobile()})},m("div",{className:u("Table-content")},m("table",{className:u("Table-table")},m("thead",null,m("tr",null,m("th",null,s),r.map((function(n,r){return m("th",{key:r,className:"text-"+(d||c?"left":"center")},c&&f?m(p.default,{type:"checkbox",disabled:e||a,checked:t.isColumChecked(v,r),partial:t.isColumnPartialChecked(v,r),onChange:function(e){return t.toggleColumnCheckAll(e,v,r)}}):null,n.label)})))),m("tbody",null,o.map((function(n,o){return m("tr",{key:o},m("td",null,c&&h?m(p.default,{type:"checkbox",disabled:e||a,checked:t.isRowChecked(v,o),partial:t.isRowPartialChecked(v,o),onChange:function(e){return t.toggleRowCheckAll(e,v,o)},testIdBuilder:null==g?void 0:g.getChild(o)}):null,n.label,n.description||n.desc?m("span",{className:"m-l-xs text-muted text-xs"},n.description||n.desc):null),r.map((function(n,r){return m("td",{key:r,className:"text-"+(d||c?"left":"center")},m(p.default,{type:c?"checkbox":"radio",disabled:e||a,checked:!!(v[r]&&v[r][o]&&v[r][o].checked),onChange:function(e){return t.toggleItem(e,r,o)},testIdBuilder:null==g?void 0:g.getChild("".concat(r,"-").concat(o))}))})))}))))))},t.prototype.renderStatic=function(e){void 0===e&&(e="-");var t=this.props,n=t.className;t.render;var r=t.classnames,o=this.state.error;return m("div",{key:"input",className:r("MatrixControl",n||"")},o?e:this.renderInput(!0))},t.prototype.render=function(){var e=this.props,t=e.className;e.render;var n=e.classnames,r=e.loadingConfig,o=this.state,i=o.error,s=o.loading;return m("div",{key:"input",className:n("MatrixControl",t||"")},i?m("div",{className:n("MatrixControl-error Alert Alert--danger")},String(i)):this.renderInput(),m(d.default,{size:"lg",overlay:!0,key:"info",show:s,loadingConfig:r}))},t.defaultProps={columns:[],rows:[],multiple:!0,singleSelectMode:"column"},s.__decorate([u.supportStatic(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(h.default.Component);function _(e,t){return Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.map((function(e){return t.map((function(t){return s.__assign(s.__assign(s.__assign({},t),e),{checked:!1})}))}))}var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([l.FormItem({type:"matrix-checkboxes",strictMode:!1,sizeMutable:!1})],t)}(g);t.MatrixRenderer=v,t.default=g}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputMonthRange.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputMonthRange",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/DateRangePicker"),r=e("node_modules/tslib/tslib");e("node_modules/react/index");var i=e("node_modules/amis-core/lib/index"),s=e("node_modules/classnames/index"),d=e("node_modules/amis/lib/renderers/Form/InputDateRange"),l=e("node_modules/amis/lib/renderers/Form/StaticHoc");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=m(o),p=m(s),c=e("node_modules/react/index"),f=(c.default||c).createElement;(c.default||c).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className;e.style;var a=e.classPrefix,n=e.minDate,o=e.maxDate,s=e.minDuration,d=e.maxDuration,l=e.data,m=e.format,c=e.mobileUI,_=e.valueFormat,v=e.inputFormat,h=e.displayFormat,D=e.env,g=r.__rest(e,["className","style","classPrefix","minDate","maxDate","minDuration","maxDuration","data","format","mobileUI","valueFormat","inputFormat","displayFormat","env"]);return f("div",{className:p.default("".concat(a,"DateRangeControl"),t)},f(u.default,r.__assign({viewMode:"months",mobileUI:c,valueFormat:_||m,displayFormat:h||v,classPrefix:a,popOverContainer:c?null==D?void 0:D.getModalContainer:g.popOverContainer||D.getModalContainer,popOverContainerSelector:g.popOverContainerSelector,onRef:this.getRef,data:l},g,{minDate:n?i.filterDate(n,l,_||m):void 0,maxDate:o?i.filterDate(o,l,_||m):void 0,minDuration:s?i.parseDuration(s):void 0,maxDuration:d?i.parseDuration(d):void 0,onChange:this.handleChange,onFocus:this.dispatchEvent,onBlur:this.dispatchEvent})))},r.__decorate([l.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(d.default),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.defaultProps={format:"X",inputFormat:"YYYY-MM",joinValues:!0,delimiter:",",ranges:"",shortcuts:"thismonth,prevmonth",animation:!0},t=r.__decorate([i.FormItem({type:"input-month-range"})],t)}(_);t.MonthRangeControlRenderer=v,t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputQuarterRange.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputQuarterRange",(function(e,t,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/DateRangePicker"),o=e("node_modules/tslib/tslib");e("node_modules/react/index");var i=e("node_modules/amis-core/lib/index"),s=e("node_modules/classnames/index"),u=e("node_modules/amis/lib/renderers/Form/InputDateRange"),d=e("node_modules/amis/lib/renderers/Form/StaticHoc");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=l(n),p=l(s),c=e("node_modules/react/index"),f=(c.default||c).createElement;(c.default||c).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className;e.style;var a=e.classPrefix,r=e.minDate,n=e.maxDate,s=e.minDuration,u=e.maxDuration,d=e.data,l=e.format,c=e.valueFormat,_=e.inputFormat,v=e.displayFormat,D=e.env,g=e.mobileUI,h=o.__rest(e,["className","style","classPrefix","minDate","maxDate","minDuration","maxDuration","data","format","valueFormat","inputFormat","displayFormat","env","mobileUI"]);return f("div",{className:p.default("".concat(a,"DateRangeControl"),t)},f(m.default,o.__assign({viewMode:"quarters",mobileUI:g,valueFormat:c||l,displayFormat:v||_,classPrefix:a,popOverContainer:g?null==D?void 0:D.getModalContainer:h.popOverContainer||D.getModalContainer,popOverContainerSelector:h.popOverContainerSelector,onRef:this.getRef,data:d},h,{minDate:r?i.filterDate(r,d,c||l):void 0,maxDate:n?i.filterDate(n,d,c||l):void 0,minDuration:s?i.parseDuration(s):void 0,maxDuration:u?i.parseDuration(u):void 0,onChange:this.handleChange,onFocus:this.dispatchEvent,onBlur:this.dispatchEvent})))},o.__decorate([d.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(u.default),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.defaultProps={format:"X",inputFormat:"YYYY-[Q]Q",joinValues:!0,delimiter:",",ranges:"thisquarter,prevquarter",shortcuts:"thisquarter,prevquarter",animation:!0},t=o.__decorate([i.FormItem({type:"input-quarter-range"})],t)}(_);t.QuarterRangeControlRenderer=v,t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputYearRange.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputYearRange",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/DateRangePicker"),o=e("node_modules/tslib/tslib");e("node_modules/react/index");var i=e("node_modules/amis-core/lib/index"),s=e("node_modules/classnames/index"),d=e("node_modules/amis/lib/renderers/Form/InputDateRange"),l=e("node_modules/amis/lib/renderers/Form/StaticHoc");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(r),p=u(s),c=e("node_modules/react/index"),f=(c.default||c).createElement;(c.default||c).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className;e.style;var a=e.classPrefix,n=e.minDate,r=e.maxDate,s=e.minDuration,d=e.maxDuration,l=e.data,u=e.format,c=e.mobileUI,_=e.valueFormat,v=e.inputFormat,y=e.displayFormat,D=e.env,g=o.__rest(e,["className","style","classPrefix","minDate","maxDate","minDuration","maxDuration","data","format","mobileUI","valueFormat","inputFormat","displayFormat","env"]);return f("div",{className:p.default("".concat(a,"DateRangeControl"),t)},f(m.default,o.__assign({viewMode:"years",mobileUI:c,valueFormat:_||u,displayFormat:y||v,classPrefix:a,popOverContainer:c?null==D?void 0:D.getModalContainer:g.popOverContainer||D.getModalContainer,popOverContainerSelector:g.popOverContainerSelector,onRef:this.getRef,data:l},g,{minDate:n?i.filterDate(n,l,_||u):void 0,maxDate:r?i.filterDate(r,l,_||u):void 0,minDuration:s?i.parseDuration(s):void 0,maxDuration:d?i.parseDuration(d):void 0,onChange:this.handleChange,onFocus:this.dispatchEvent,onBlur:this.dispatchEvent})))},o.__decorate([l.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(d.default),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.defaultProps={format:"X",inputFormat:"YYYY",joinValues:!0,delimiter:",",ranges:"thisyear,prevyear",shortcuts:"thisyear,prevyear",animation:!0},t=o.__decorate([i.FormItem({type:"input-year-range"})],t)}(_);t.YearRangeControlRenderer=v,t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputRange.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputRange",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/Icon"),r=e("node_modules/amis-ui/lib/components/Range"),o=e("node_modules/amis-ui/lib/components/NumberInput"),s=e("node_modules/tslib/tslib"),u=e("node_modules/react/index"),l=e("node_modules/lodash/isNumber"),p=e("node_modules/lodash/isObject"),d=e("node_modules/lodash/isEqual"),m=e("node_modules/lodash/forEach"),c=e("node_modules/amis-core/lib/index"),_=e("node_modules/amis/lib/renderers/Form/StaticHoc");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=h(i),v=h(r),f=h(o),y=h(u),b=h(l),x=h(p),F=h(d),V=h(m),C=e("node_modules/react/index"),N=(C.default||C).createElement;(C.default||C).Fragment;var I=function(e,t,a){if(void 0===t&&(t={}),"string"==typeof e){if("string"==typeof(e=c.isPureVariable(e)?c.resolveVariableAndFilter(e,t):e)){var n=parseFloat(e);return isNaN(n)?a:n}if("number"==typeof e)return e}else if("number"==typeof e)return e;return null!=e?e:a};function S(e,t){var a,n;if(t.multiple){var i=t.min,r=t.max;return"string"==typeof e?(i=(a=s.__read(e.split(t.delimiter||",").map((function(e){return Number(e)})),2))[0],r=a[1]):Array.isArray(e)?(i=(n=s.__read(e,2))[0],r=n[1]):"object"==typeof e&&(i=e.min,r=e.max),{min:void 0===i||i<t.min?t.min:i,max:void 0===r||r>t.max?t.max:r}}return+e<t.min?t.min:Math.min(+e,t.max)}var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.handleInputNumberChange=function(e){var t,a=this.props,n=a.multiple,i=a.value,r=a.type,o=a.min,u=a.max,l=a.onChange,p=this.getValue(e,r);null==l||l(n?s.__assign(s.__assign({},i),((t={})[r]=p,t)):Math.max(Math.min(e,u),o))},t.prototype.onUpdateValue=function(e){var t,a=this.props,n=a.multiple,i=a.value,r=a.type,o=this.getValue(e,r);this.props.onChange(n?s.__assign(s.__assign({},i),((t={})[r]=o,t)):e)},t.prototype.checkNum=function(e){return"number"!=typeof e&&(e=c.filter(e,this.props.data),e=/^[-]?\d+/.test(e)?+e:void 0),e},t.prototype.getStepPrecision=function(){var e,t=this.props,a=t.step,n=t.data,i=I(a,n,1);return!/^\d+\.\d+$/.test(i.toString())||i<0?0:null===(e=i.toString().split(".")[1])||void 0===e?void 0:e.length},t.prototype.getValue=function(e,t){var a=this.props,n=a.min,i=a.max,r=a.step,o=a.value;e=null!=e?e:"min"===t?n:i;var s=Math.round(parseFloat(e+"")/r)*r;switch(s=parseFloat(s.toFixed(this.getStepPrecision())),t){case"min":return x.default(o)&&b.default(o.max)?s>=o.max?o.max-r:s:n;case"max":return x.default(o)&&b.default(o.min)?s<=o.min?o.min+r:s:i;default:return s<n&&n||s>i&&i||s}},t.prototype.onBlur=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,r;return s.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,a=t.dispatchEvent,n=t.value,i=t.onBlur,[4,a("blur",c.resolveEventData(this.props,{value:n}))];case 1:return(null==(r=o.sent())?void 0:r.prevented)||(null==i||i(e)),[2]}}))}))},t.prototype.onFocus=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,r;return s.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,a=t.dispatchEvent,n=t.value,i=t.onFocus,[4,a("focus",c.resolveEventData(this.props,{value:n}))];case 1:return(null==(r=o.sent())?void 0:r.prevented)||(null==i||i(e)),[2]}}))}))},t.prototype.render=function(){var e,t=this.props,a=t.classnames;t.style;var n=t.value,i=t.multiple,r=t.type,o=t.step,s=t.classPrefix,u=t.disabled,l=t.max,p=t.min,d=t.mobileUI,m=t.unit,c=t.showInputUnit,_=i?"min"===r?Math.min(n.min,n.max):Math.max(n.min,n.max):n;return N("div",{className:a("".concat(s,"InputRange-input"),(e={},e["".concat(s,"InputRange-input-with-unit")]=m&&c,e))},N(f.default,{value:+_,step:o,max:this.checkNum(l),min:this.checkNum(p),onChange:this.handleInputNumberChange,disabled:u,onBlur:this.onBlur,onFocus:this.onFocus,mobileUI:d}),m&&c&&N("div",{className:a("".concat(s,"InputRange-unit"),"".concat(s,"Select"))},m))},s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number]),s.__metadata("design:returntype",void 0)],t.prototype,"handleInputNumberChange",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number]),s.__metadata("design:returntype",void 0)],t.prototype,"onUpdateValue",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],t.prototype,"onBlur",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],t.prototype,"onFocus",null),t}(y.default.Component),j=function(e){function t(t){var a=e.call(this,t)||this,n=a.props,i=n.value,r=n.multiple,o=n.delimiter,s=n.min,u=n.max,l=n.data,p=S(i,{multiple:r,delimiter:o,min:I(s,l,0),max:I(u,l,0)});return a.state={value:a.getValue(p)},a}return s.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=e.value,a=e.min,n=e.max,i=e.data,r=this.props,o=r.value,s=r.multiple,u=r.delimiter,l=r.min,p=r.max,d=r.data;r.onChange;var m=I(a,i,0),c=I(n,i,100),_=I(l,d,0),h=I(p,d,100);if(t!==o||m!==_||c!==h){var g=S(o,{multiple:s,delimiter:u,min:_,max:h});this.setState({value:this.getValue(g)})}},t.prototype.doAction=function(e,t,a){var n=null==e?void 0:e.actionType;"reset"===n?this.resetValue():"clear"===n&&this.clearValue()},t.prototype.resetValue=function(){var e,t,a=this.props,n=a.multiple,i=a.min,r=a.max,o=a.data,s=a.onChange,u=a.formStore,l=a.store,p=a.name,d=a.resetValue,m=I(i,o,0),_=I(r,o,100),h=null!==(t=c.getVariable(null!==(e=null==u?void 0:u.pristine)&&void 0!==e?e:null==l?void 0:l.pristine,p))&&void 0!==t?t:d,g=this.getFormatValue(null!=h?h:n?{min:m,max:_}:m);null==s||s(g)},t.prototype.clearValue=function(e){var t=this.props,a=t.multiple,n=t.min,i=t.max,r=t.data,o=t.onChange,s=I(n,r,0),u=I(i,r,100),l=this.getFormatValue(a?{min:s,max:u}:s);null==o||o(l)},t.prototype.getStepPrecision=function(){var e,t=this.props,a=t.step,n=t.data,i=I(a,n,1);return!/^\d+\.\d+$/.test(i.toString())||i<0?0:null===(e=i.toString().split(".")[1])||void 0===e?void 0:e.length},t.prototype.getValue=function(e){var t=this.props.multiple,a=this.getStepPrecision();return t?{max:c.stripNumber(e.max,a),min:c.stripNumber(e.min,a)}:c.stripNumber(e,a)},t.prototype.handleChange=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,r,o;return s.__generator(this,(function(s){switch(s.label){case 0:return t=this.getValue(e),this.setState({value:t}),a=this.props,n=a.onChange,i=a.dispatchEvent,r=this.getFormatValue(t),[4,i("change",c.resolveEventData(this.props,{value:r}))];case 1:return(null==(o=s.sent())?void 0:o.prevented)||(null==n||n(r)),[2]}}))}))},t.prototype.onAfterChange=function(){var e=this.state.value,t=this.props.onAfterChange,a=this.getFormatValue(this.getValue(e));t&&t(a)},t.prototype.getFormatValue=function(e){var t=this.props,a=t.multiple,n=t.joinValues,i=t.delimiter,r=t.extraName;return a?r?[e.min,e.max]:n?[e.min,e.max].join(i||","):{min:e.min,max:e.max}:e},t.prototype.render=function(){var e=this,t=this.state.value,a=s.__assign(s.__assign({},this.props),{min:I(this.props.min,this.props.data,0),max:I(this.props.max,this.props.data,0),step:I(this.props.step,this.props.data,1),value:t,onChange:this.handleChange,onAfterChange:this.onAfterChange}),n=a.classPrefix,i=a.multiple;a.parts;var r=a.showInput,o=a.classnames,u=a.className,l=a.disabled,p=a.clearable,d=a.min,m=a.max,_=a.render,h=a.marks,f=a.region,y=a.mobileUI,b=h?s.__assign({},h):h;return h&&V.default(h,(function(e,t){x.default(e)&&e.type&&b&&(b[t]=_(f,e)),b&&!c.isNumeric(t.replace(/%$/,""))&&delete b[t]})),N("div",{className:o("RangeControl","".concat(n,"InputRange"),{"is-disabled":l},{"is-mobile":y},u)},r&&i&&N(P,s.__assign({},a,{type:"min"})),N(v.default,s.__assign({},a,{marks:b})),r&&N(P,s.__assign({},a,{type:"max"})),p&&!l&&r?N("a",{onClick:function(){return e.clearValue()},className:o("InputRange-clear",{"is-active":i?F.default(this.state.value,{min:d,max:m}):this.state.value!==d})},N(g.default,{icon:"close",className:"icon"})):null)},t.defaultProps={value:0,max:100,min:0,step:1,unit:"",clearable:!0,disabled:!1,showInput:!1,showInputUnit:!1,multiple:!1,joinValues:!0,delimiter:",",showSteps:!1,parts:1,tooltipPlacement:"auto"},s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"resetValue",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[String]),s.__metadata("design:returntype",void 0)],t.prototype,"clearValue",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"getValue",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"onAfterChange",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Object)],t.prototype,"getFormatValue",null),s.__decorate([_.supportStatic(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(y.default.PureComponent),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([c.FormItem({type:"input-range"})],t)}(j);t.Input=P,t.RangeControlRenderer=w,t.default=j,t.formatValue=S}));
|
||
;/*!node_modules/amis-ui/lib/components/Tab.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/Tab",(function(e,i,o,s){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/Tabs");i.default=n.Tab}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Combo.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Combo",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/Button"),r=e("node_modules/amis-ui/lib/components/Alert2"),s=e("node_modules/amis-ui/lib/components/Select"),o=e("node_modules/amis-ui/lib/components/Tab"),l=e("node_modules/amis-ui/lib/components/Icon"),d=e("node_modules/amis-ui/lib/components/Tabs"),u=e("node_modules/tslib/tslib"),m=e("node_modules/react/index"),p=e("node_modules/react-dom/index"),c=e("node_modules/lodash/cloneDeep"),h=e("node_modules/amis-core/lib/index"),f=e("node_modules/sortablejs/Sortable.min"),b=e("node_modules/lodash/find"),g=e("node_modules/lodash/memoize"),v=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),y=e("node_modules/lodash/isPlainObject"),C=e("node_modules/lodash/isEqual");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=_(i),A=_(r),V=_(s),x=_(o),N=_(l),F=_(d),k=_(m),S=_(c),D=_(f),L=_(b),T=_(g),B=_(y),O=_(C),w=e("node_modules/react/index"),P=(w.default||w).createElement;function j(e,t){return t.reduce((function(t,a){return t[a]=h.resolveVariable(a,e),t}),{})}(w.default||w).Fragment;var M=function(e){function t(t){var a=e.call(this,t)||this;a.subFormDefaultValues=[],a.keys=[],a.toDispose=[],a.id=h.guid(),a.refsMap={},a.makeFormRef=T.default((function(e){return function(t){return a.formRef(t,e)}})),a.memoizedFormatValue=T.default((function(e,t,a,n,i){return h.createObject(h.extendObject(i,u.__assign({index:n,__index:n},i)),u.__assign(u.__assign({},a),Array.isArray(t)?j(i,t):null))}),(function(e,t,a,n,i){return Array.isArray(t)?JSON.stringify([a,n,i,j(i,t)]):e?JSON.stringify([a,n]):JSON.stringify([a,n,i])})),a.handleChange=a.handleChange.bind(a),a.handleRadioChange=a.handleRadioChange.bind(a),a.handleSingleFormChange=a.handleSingleFormChange.bind(a),a.handleSingleFormInit=a.handleSingleFormInit.bind(a),a.handleFormInit=a.handleFormInit.bind(a),a.handleAction=a.handleAction.bind(a),a.addItem=a.addItem.bind(a),a.deleteItem=a.deleteItem.bind(a),a.dragTipRef=a.dragTipRef.bind(a),a.flush=a.flush.bind(a),a.handleComboTypeChange=a.handleComboTypeChange.bind(a),a.handleSubFormValid=a.handleSubFormValid.bind(a),a.defaultValue=u.__assign({},t.scaffold);var n=t.store;t.value;var i=t.multiple,r=t.formItem,s=t.addHook;return n.config({multiple:i,minLength:a.resolveVariableProps(t,"minLength"),maxLength:a.resolveVariableProps(t,"maxLength"),length:a.getValueAsArray(t).length}),r&&v.isAlive(r)&&r.setSubStore(n),s&&a.toDispose.push(s(a.flush,"flush")),a}return u.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;if(h.anyChanged(["minLength","maxLength","value"],e,t)||this.resolveVariableProps(e,"minLength")!==this.resolveVariableProps(t,"minLength")||this.resolveVariableProps(e,"maxLength")!==this.resolveVariableProps(t,"maxLength")){var a=t.store,n=t.multiple,i=this.getValueAsArray(t);a.config({multiple:n,minLength:this.resolveVariableProps(t,"minLength"),maxLength:this.resolveVariableProps(t,"maxLength"),length:i.length}),a.activeKey>=i.length&&a.setActiveKey(Math.max(0,i.length-1)),t.value!==e.value&&!e.formInited&&this.subFormDefaultValues.length&&(this.subFormDefaultValues=this.subFormDefaultValues.map((function(e,t){return u.__assign(u.__assign({},e),{values:i[t]})})))}},t.prototype.componentWillUnmount=function(){var e,t,a,n,i=this.props.formItem;i&&v.isAlive(i)&&i.setSubStore(null),this.toDispose.forEach((function(e){return e()})),this.toDispose=[],null===(t=(e=this.memoizedFormatValue.cache).clear)||void 0===t||t.call(e),null===(n=(a=this.makeFormRef.cache).clear)||void 0===n||n.call(a)},t.prototype.resolveVariableProps=function(e,t){var a={minLength:0,maxLength:1/0},n=e[t];if(!n)return a[t];if("string"==typeof n)if(h.isPureVariable(n)){var i=h.resolveVariableAndFilter(n,e.data,"| raw");n="number"==typeof i&&i>=0?i:a[t]}else{var r=parseInt(n,10);n=isNaN(r)?a[t]:r}return n},t.prototype.doAction=function(e,t,a,n){var i,r,s,o,l=null==e?void 0:e.actionType,d=this.props,u=d.onChange,m=d.resetValue,p=d.formStore,c=d.store,f=d.name;if("addItem"===l)this.addItemValue(null!==(i=null==n?void 0:n.item)&&void 0!==i?i:{});else if("clear"===l)u("");else if("reset"===l){var b=null!==(o=h.getVariable(null!==(r=null==p?void 0:p.pristine)&&void 0!==r?r:null===(s=null==c?void 0:c.parentStore)||void 0===s?void 0:s.pristine,f))&&void 0!==o?o:m;u(null!=b?b:"")}},t.prototype.addItemValue=function(e){var t=this.props,a=t.flat,n=t.joinValues,i=t.addattop,r=t.delimiter,s=t.disabled,o=t.submitOnChange;if(!s){var l=this.getValueAsArray();!0===i?(this.keys.unshift(h.guid()),l.unshift(e)):(l.push(e),this.keys.push(h.guid())),a&&n&&(l=l.join(r||",")),this.props.onChange(l,o,!0)}},t.prototype.getValueAsArray=function(e){void 0===e&&(e=this.props);var t=e.flat,a=e.joinValues,n=e.delimiter;e.type,e.formItem;var i=e.getValue();return i=a&&t&&"string"==typeof i?i.split(n||","):Array.isArray(i)?i.concat():[]},t.prototype.addItemWith=function(e){var t,a,n=this.props,i=n.flat,r=n.joinValues,s=n.addattop,o=n.delimiter,l=n.scaffold,d=n.disabled,m=n.submitOnChange;if(!d){var p=this.getValueAsArray();p.push(i?null!==(a=null!==(t=e.scaffold)&&void 0!==t?t:l)&&void 0!==a?a:"":u.__assign({},e.scaffold||l)),this.keys.push(h.guid()),i&&r&&(p=p.join(o||",")),!0===s&&(this.keys.unshift(this.keys.pop()),p.unshift(p.pop())),this.props.onChange(p,m,!0)}},t.prototype.addItem=function(){return u.__awaiter(this,void 0,void 0,(function(){var e,t,a,n,i,r,s,o,l,d,m,p,c;return u.__generator(this,(function(f){switch(f.label){case 0:return e=this.props,t=e.flat,a=e.joinValues,n=e.addattop,i=e.delimiter,r=e.scaffold,s=e.disabled,o=e.submitOnChange,l=e.dispatchEvent,d=e.store,s?[2]:(m=this.getValueAsArray(),[4,l("add",h.resolveEventData(this.props,{value:t&&a?m.join(i||","):S.default(m)}))]);case 1:return(null==(p=f.sent())?void 0:p.prevented)||(m.push(t?null!=r?r:"":u.__assign({},r)),this.keys.push(h.guid()),t&&a&&(m=m.join(i||",")),c=this.keys.length-1,!0===n&&(this.keys.unshift(this.keys.pop()),m.unshift(m.pop()),c=0),d.setActiveKey(c),this.props.onChange(m,o,!0)),[2]}}))}))},t.prototype.deleteItem=function(e){var t,a;return u.__awaiter(this,void 0,void 0,(function(){var n,i,r,s,o,l,d,m,p,c,f,b,g,v,y;return u.__generator(this,(function(u){switch(u.label){case 0:return n=this.props,i=n.flat,r=n.joinValues,s=n.delimiter,o=n.disabled,l=n.deleteApi,d=n.deleteConfirmText,m=n.data,p=n.env,c=n.translate,f=n.dispatchEvent,b=n.submitOnChange,o?[2]:(g=this.getValueAsArray(),v=h.createObject(m,g[e]),[4,f("delete",h.resolveEventData(this.props,{key:e,value:i&&r?g.join(s||","):S.default(g),item:g[e]}))]);case 1:return(null==(y=u.sent())?void 0:y.prevented)?[2]:h.isEffectiveApi(l,v)?[4,p.confirm(d?h.filter(d,v):c("deleteConfirm"))]:[3,4];case 2:return u.sent()?[4,p.fetcher(l,v)]:[2];case 3:if(!u.sent().ok)return!(null==l?void 0:l.silent)&&p.notify("error",null!==(a=null===(t=null==l?void 0:l.messages)||void 0===t?void 0:t.failed)&&void 0!==a?a:c("deleteFailed")),[2];u.label=4;case 4:return this.keys.splice(e,1),g.splice(e,1),i&&r&&(g=g.join(s||",")),this.props.onChange(g,b,!0),[2]}}))}))},t.prototype.handleChange=function(e,t,a){var n,i,r,s,o=a.index,l=this.props,d=l.flat,m=l.store,p=l.joinValues,c=l.delimiter,f=l.disabled,b=l.submitOnChange,g=l.type,y=l.syncFields,C=l.name;if(!f){Array.isArray(y)&&y.forEach((function(t){(null==C?void 0:C.startsWith(t))&&(e=u.__assign({},e),h.deleteVariable(e,C))}));var _=this.getValueAsArray();if(_[o]=d?e.flat:u.__assign({},e),d&&p&&(_=_.join(c||",")),"input-kv"===g){var I=!1,A={};try{for(var V=u.__values(_),x=V.next();!x.done;x=V.next()){A[(k=x.value).key]?I=!0:A[k.key]=!0}}catch(e){n={error:e}}finally{try{x&&!x.done&&(i=V.return)&&i.call(V)}finally{if(n)throw n.error}}I||this.props.onChange(_,b,!0)}else if("input-kvs"===g){I=!1,A={};try{for(var N=u.__values(_),F=N.next();!F.done;F=N.next()){var k;"_key"in(k=F.value)&&(A[k._key]?I=!0:A[k._key]=!0)}}catch(e){r={error:e}}finally{try{F&&!F.done&&(s=N.return)&&s.call(N)}finally{if(r)throw r.error}}I||this.props.onChange(_,b,!0)}else this.props.onChange(_,b,!0);m.forms.forEach((function(e){return v.isAlive(e)&&e.items.forEach((function(t){return t.unique&&t.syncOptions(void 0,e.data)}))}))}},t.prototype.handleRadioChange=function(e,t){var a=t.index,n=t.name,i=t.trueValue,r=void 0===i||i,s=t.falseValue,o=void 0!==s&&s,l=this.props,d=l.onChange,m=l.submitOnChange,p=l.multiple,c=l.disabled;if(p&&!c&&n){var h=this.getValueAsArray();if(Array.isArray(h)&&!(h.length<2)&&B.default(h[0]))return h=h.map((function(e,t){var i;return u.__assign(u.__assign({},e),((i={})[n]=t===a?r:o,i))})),d(h,m,!0),!1}},t.prototype.handleSingleFormChange=function(e){null===this.props.value&&O.default(this.defaultValue,e)||this.props.onChange(u.__assign({},e),this.props.submitOnChange,!0)},t.prototype.handleSubFormValid=function(e,t){var a=t.index;this.props.store.setMemberValid(e,a)},t.prototype.handleFormInit=function(e,t){var a,n=t.index,i=this.props,r=i.syncDefaultValue,s=i.flat,o=i.joinValues,l=i.delimiter,d=i.formInited,m=i.onChange,p=i.submitOnChange,c=i.setPrinstineValue,f=i.formItem,b=i.name,g=i.syncFields;if(Array.isArray(g)&&g.forEach((function(t){(null==b?void 0:b.startsWith(t))&&(e=u.__assign({},e),h.deleteVariable(e,b))})),(null==f?void 0:f.validated)&&(null===(a=this.subForms[n])||void 0===a||a.validate(!0,!1,!1)),this.subFormDefaultValues.push({index:n,values:e,setted:!1}),!1!==r&&this.subFormDefaultValues.length===this.subForms.filter((function(e){return void 0!==e})).length){var v=this.getValueAsArray(),y=!1;this.subFormDefaultValues=this.subFormDefaultValues.map((function(e){var t=e.index,a=e.values,n=e.setted,i=s?a.flat:u.__assign({},a);return!n&&h.isObjectShallowModified(v[t],i)&&(v[t]=s?a.flat:u.__assign({},a),y=!0),{index:t,values:a,setted:!0}})),y&&(s&&o&&(v=v.join(l||",")),d?m(v,p,!0):c(v))}},t.prototype.handleSingleFormInit=function(e){var t=this.props,a=t.syncDefaultValue,n=t.setPrinstineValue,i=t.value,r=t.nullable;!1!==a&&!r&&h.isObjectShallowModified(i,e)&&n(u.__assign({},e))},t.prototype.handleAction=function(e,t){var a=this.props.onAction;"delete"!==t.actionType?a&&a.apply(null,arguments):void 0!==t.index&&this.deleteItem(t.index)},t.prototype.validate=function(){var e=this,t=this.props,a=t.messages,n=t.nullable,i=t.value,r=t.translate,s=t.store,o=t.flat,l=this.getValueAsArray(),d=this.resolveVariableProps(this.props,"minLength"),m=this.resolveVariableProps(this.props,"maxLength");if(d&&(!Array.isArray(l)||l.length<d))return r(a&&a.minLengthValidateFailed||"Combo.minLength",{minLength:d});if(m&&Array.isArray(l)&&l.length>m)return r(a&&a.maxLengthValidateFailed||"Combo.maxLength",{maxLength:m});if(!n||i){if(l.length){var p=this.subForms;return Promise.all(l.map((function(t,a){return u.__awaiter(e,void 0,void 0,(function(){var e,n,i,r,l,d,m,c,f,b,g,y;return u.__generator(this,(function(C){switch(C.label){case 0:return(e=p[a])?[2,e.validate(!0,!1,!1)]:[3,1];case 1:if(!(n=p[Object.keys(p)[0]]))return[3,10];i=n.props.store,r=!1,C.label=2;case 2:C.trys.push([2,7,8,9]),l=u.__values(i.items),d=l.next(),C.label=3;case 3:return d.done?[3,6]:(m=d.value,c=v.clone(m),f=o?t:h.getVariable(t,m.name,!1),m.extraName&&!o&&(f=[h.getVariable(t,m.name,!1),h.getVariable(t,m.extraName,!1)]),c.changeTmpValue(f,"dataChanged"),[4,c.validate(t)]);case 4:if(r=C.sent(),v.destroy(c),!1===r)return[3,6];C.label=5;case 5:return d=l.next(),[3,3];case 6:return[3,9];case 7:return b=C.sent(),g={error:b},[3,9];case 8:try{d&&!d.done&&(y=l.return)&&y.call(l)}finally{if(g)throw g.error}return[7];case 9:return s.setMemberValid(r,a),[2,r];case 10:return[2]}}))}))}))).then((function(e){if(~e.indexOf(!1))return r(a&&a.validateFailed||"validateFailed")}))}return this.subForms.length?Promise.all(this.subForms.map((function(e){return e.validate(!0,!1,!1)}))).then((function(e){if(~e.indexOf(!1))return r(a&&a.validateFailed||"validateFailed")})):void 0}},t.prototype.flush=function(){return u.__awaiter(this,void 0,void 0,(function(){return u.__generator(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.subForms.map((function(e){return e.flush()})))];case 1:return e.sent(),[2]}}))}))},t.prototype.dragTipRef=function(e){!this.dragTip&&e?this.initDragging():this.dragTip&&!e&&this.destroyDragging(),this.dragTip=e},t.prototype.initDragging=function(){var e=this,t=this.props.classPrefix,a=this.props.submitOnChange,n=p.findDOMNode(this);this.sortable=new D.default(n.querySelector(".".concat(t,"Combo-items")),{group:"combo-".concat(this.id),animation:150,handle:".".concat(t,"Combo-itemDrager"),ghostClass:"".concat(t,"Combo-item--dragging"),onEnd:function(t){if(t.newIndex!==t.oldIndex){var n=t.to;t.oldIndex<n.childNodes.length-1?n.insertBefore(t.item,n.childNodes[t.oldIndex>t.newIndex?t.oldIndex+1:t.oldIndex]):n.appendChild(t.item);var i=e.props.value;if(Array.isArray(i)){var r=i.concat();r.splice(t.newIndex,0,r.splice(t.oldIndex,1)[0]),e.keys.splice(t.newIndex,0,e.keys.splice(t.oldIndex,1)[0]),e.props.onChange(r,a,!0),e.props.dispatchEvent("dragEnd",h.resolveEventData(e.props,{item:r[t.newIndex],value:r,index:t.newIndex,oldValue:i,oldIndex:t.oldIndex}))}}}})},t.prototype.destroyDragging=function(){this.sortable&&this.sortable.destroy()},Object.defineProperty(t.prototype,"subForms",{get:function(){var e=this;return Object.keys(this.refsMap).map((function(e){return parseInt(e,10)})).sort().map((function(t){return e.refsMap[t]}))},enumerable:!1,configurable:!0}),t.prototype.formRef=function(e,t){if(void 0===t&&(t=0),e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.refsMap[t]=e}else this.refsMap[t],this.subFormDefaultValues=this.subFormDefaultValues.filter((function(e){return e.index!==t})),delete this.refsMap[t]},t.prototype.formatValue=function(e,t){void 0===t&&(t=-1);var a=this.props,n=a.flat,i=a.data,r=a.strictMode,s=a.syncFields;return n&&(e={flat:e}),e=e||this.defaultValue,this.memoizedFormatValue(!1!==r,s,e,t,i)},t.prototype.pickCondition=function(e){var t=this.props.conditions;return L.default(t,(function(t){return t.test&&h.evalExpression(t.test,e)}))},t.prototype.handleComboTypeChange=function(e,t){var a=this.props,n=a.multiple,i=a.onChange,r=a.value;a.flat;var s=a.submitOnChange,o=this.props.conditions,l=L.default(o,(function(e){return e.label===t.label}));if(l)if(n){var d=this.getValueAsArray();d.splice(e,1,u.__assign({},h.dataMapping(l.scaffold||{},d[e]))),i(d,s,!0)}else i(u.__assign({},h.dataMapping(l.scaffold||{},r)),s,!0)},t.prototype.handleTabSelect=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,a,n,i,r,s,o,l,d;return u.__generator(this,(function(m){switch(m.label){case 0:return t=this.props,a=t.store,n=t.data,i=t.name,r=t.value,s=t.dispatchEvent,o={key:e,item:r[e]},[4,s("tabsChange",h.createObject(n,i?u.__assign(u.__assign({},o),(d={},d[i]=r,d)):o))];case 1:return(null==(l=m.sent())?void 0:l.prevented)||a.setActiveKey(e),[2]}}))}))},t.prototype.setNull=function(e){e.preventDefault(),(0,this.props.onChange)(null),this.subForms.forEach((function(e){e.clearErrors()}))},t.prototype.renderPlaceholder=function(){var e=this.props,t=e.placeholder,a=e.translate;return P("span",{className:"text-muted"},a(t||"placeholder.noData"))},t.prototype.renderTabsMode=function(){var e=this,t=this.props;t.classPrefix;var a=t.classnames,n=t.tabsStyle;t.formClassName,t.render;var i=t.disabled,r=t.store,s=t.flat;t.subFormMode,t.addButtonText;var o=t.addable,l=t.removable,d=t.typeSwitchable,m=t.itemRemovableOn,p=t.delimiter;t.canAccessSuperData,t.addIcon;var c=t.deleteIcon,f=t.tabsLabelTpl,b=t.conditions;t.changeImmediately;var g=t.addBtnText;t.static;var v=t.translate,y=t.testIdBuilder,C=this.props.items,_=this.props.value;s&&"string"==typeof _&&(_=_.split(p||","));var I=!1!==r.removable&&!i&&!1!==l;return Array.isArray(_)||(_=[]),P(F.default,{addBtnText:v(g||"add"),className:"ComboTabs",mode:n,activeKey:r.activeKey,onSelect:this.handleTabSelect,testIdBuilder:y,additionBtns:!i&&!1!==o&&r.addable?P("li",{className:a("Tabs-link ComboTabs-addLink")},this.renderAddBtn()):null},_.map((function(t,n){var i=e.formatValue(t,n),o=null==y?void 0:y.getChild("tab-".concat(n)),l=null,p=void 0;!I||m&&!1===h.evalExpression(m,t)||(p=P("div",u.__assign({onClick:e.deleteItem.bind(e,n),key:"delete",className:a("Combo-tab-delBtn ".concat(r.removable?"":"is-disabled")),"data-tooltip":v("delete"),"data-position":"bottom"},null==o?void 0:o.getChild("delBtn").getTestId()),c?P("i",{className:c}):P(N.default,{icon:"status-close",className:"icon"}))),Array.isArray(b)&&b.length&&(l=e.pickCondition(i),C=l?l.items:void 0);var g=s&&C?[u.__assign(u.__assign({},C&&C[0]),{name:"flat"})]:C,_=Array.isArray(g)&&g.some((function(e){return e.unique}));return e.keys[n]||e.keys.splice(n,0,h.guid()),P(x.default,{title:h.filter(f||v("{{index}}",{index:i.index+1}),i),key:e.keys[n],toolbar:p,eventKey:n,mountOnEnter:!_,unmountOnExit:!1,className:!1===r.memberValidMap[n]?"has-error":"",tabClassName:!1===r.memberValidMap[n]?"has-error":"",testIdBuilder:o},l&&!1!==d?P("div",{className:a("Combo-itemTag")},P("label",null,v("Combo.type")),P(V.default,{onChange:e.handleComboTypeChange.bind(e,n),options:b.map((function(e){return{label:e.label,value:e.label}})),value:l.label,clearable:!1})):null,P("div",{className:a("Combo-itemInner")},g?e.renderItems(g,i,n,t):P(A.default,{level:"warning",className:"m-b-none"},v("Combo.invalidData"))))})))},t.prototype.renderDelBtn=function(e,t){var a=this;if(this.props.static)return null;var n=this.props;n.classPrefix;var i=n.classnames,r=n.render,s=n.store,o=n.deleteIcon,l=n.translate,d=n.itemRemovableOn,m=n.disabled,p=n.removable,c=n.deleteBtn,f=n.mobileUI,b=n.data,g=n.testIdBuilder,v=null==g?void 0:g.getChild("delete-btn-".concat(t));return!(!1!==s.removable&&!m&&!1!==p)||d&&!1===h.evalExpression(d,e)?null:h.isObject(c)?r("delete-btn",u.__assign(u.__assign({},c),{type:"button",className:i("Combo-delController",c?c.className:""),testIdBuilder:v,onClick:function(e){if(c.onClick){var n=c.onClick;"string"==typeof n&&(n=h.str2AsyncFunction(c.onClick,"e","index","props"));var i=n(e,t,a.props);i&&i.then?i.then((function(){a.deleteItem(t)})):a.deleteItem(t)}else a.deleteItem(t)}}),{data:h.extendObject(b,{index:t})}):"string"==typeof c?r("delete-btn",{type:"button",className:i("Combo-delController"),label:c,onClick:this.deleteItem.bind(this,t),testIdBuilder:v}):P("a",u.__assign({onClick:this.deleteItem.bind(this,t),key:"delete",className:i("Combo-delBtn ".concat(s.removable?"":"is-disabled")),"data-tooltip":f?null:l("delete"),"data-position":"bottom"},null==v?void 0:v.getTestId()),o?P("i",{className:o}):P(N.default,{icon:"status-close",className:"icon"}))},t.prototype.renderAddBtn=function(){var e=this;if(this.props.static)return null;var t=this.props;t.classPrefix;var a=t.classnames,n=t.render,i=t.addButtonClassName,r=t.store,s=t.addButtonText,o=t.addBtn,l=t.addable,d=t.addIcon,m=t.conditions,p=t.translate,c=t.tabsMode,f=t.testIdBuilder,b=Array.isArray(m)&&m.length,g=null==f?void 0:f.getChild("add-button");return P(k.default.Fragment,null,r.addable&&!1!==l&&(b?n("add-button",{type:"dropdown-button",icon:d?P(N.default,{icon:"plus-fine",className:"icon"}):"",label:p(s||"add"),level:"info",size:"sm",closeOnClick:!0,btnClassName:i,testIdBuilder:g},{buttons:null==m?void 0:m.map((function(t){return{label:t.label,onClick:function(a){return e.addItemWith(t),!1}}}))}):c?P("a",{onClick:this.addItem},d?P(N.default,{icon:"plus-fine",className:"icon"}):null,P("span",null,p(s||"add"))):h.isObject(o)?n("add-button",u.__assign(u.__assign({},o),{type:"button",testIdBuilder:g,onClick:function(){return e.addItem()}})):P(I.default,{className:a("Combo-addBtn",i),onClick:this.addItem,testIdBuilder:g},d?P(N.default,{icon:"plus-fine",className:"icon"}):null,P("span",null,p(s||"add")))))},t.prototype.renderMultipe=function(){var e=this;if(this.props.tabsMode)return this.renderTabsMode();var t=this.props;t.classPrefix;var a=t.classnames,n=t.multiLine,i=t.disabled,r=t.flat,s=t.draggable,o=t.draggableTip,l=t.typeSwitchable,d=t.delimiter,m=t.dragIcon,p=t.noBorder,c=t.conditions,f=t.placeholder,b=t.translate,g=t.itemClassName,v=t.itemsWrapperClassName,y=t.static,C=t.mobileUI,_=t.store,I=this.props.items,x=this.props.value;return r&&"string"==typeof x&&(x=x.split(d||",")),P("div",{className:a("Combo Combo--multi",{"is-mobile":C},n?"Combo--ver":"Combo--hor",p?"Combo--noBorder":"",i?"is-disabled":"",!y&&!i&&s&&Array.isArray(x)&&x.length>1?"is-draggable":"")},P("div",{className:a("Combo-items",v)},Array.isArray(x)&&x.length?x.map((function(t,n,o){var d=e.renderDelBtn(t,n),p=e.formatValue(t,n),f=null;Array.isArray(c)&&c.length&&(f=e.pickCondition(p),I=f?f.items:void 0);var v=r&&I?[u.__assign(u.__assign({},I&&I[0]),{name:"flat"})]:I;return e.keys[n]||e.keys.splice(n,1,h.guid()),P("div",{className:a("Combo-item",g,!1===_.memberValidMap[n]?"has-error":""),key:e.keys[n]},!y&&!i&&s&&o.length>1?P("div",{className:a("Combo-itemDrager")},P("a",{key:"drag","data-tooltip":b("Combo.dragDropSort"),"data-position":"bottom"},m?P("i",{className:m}):P(N.default,{icon:"drag-bar",className:"icon"}))):null,f&&!1!==l?P("div",{className:a("Combo-itemTag")},P("label",null,b("Combo.type")),P(V.default,{onChange:e.handleComboTypeChange.bind(e,n),options:c.map((function(e){return{label:e.label,value:e.label}})),value:f.label,clearable:!1})):null,P("div",{className:a("Combo-itemInner")},v?e.renderItems(v,p,n,t):P(A.default,{level:"warning",className:"m-b-none"},b("Combo.invalidData"))),d)})):f?P("div",{className:a("Combo-placeholder")},b(f)):null),y||i?null:P("div",{className:a("Combo-toolbar")},this.renderAddBtn(),s?P("span",{className:a("Combo-dragableTip"),ref:this.dragTipRef},Array.isArray(x)&&x.length>1?b(o):""):null))},t.prototype.renderSingle=function(){var e=this.props,t=e.conditions,a=e.classnames,n=e.value,i=e.multiLine,r=e.noBorder,s=e.disabled,o=e.typeSwitchable,l=e.nullable,d=e.translate,u=e.itemClassName,m=e.mobileUI,p=e.store,c=this.props.items,f=h.isObject(n)?this.formatValue(n):this.formatValue(this.defaultValue),b=null;return Array.isArray(t)&&t.length&&(c=(b=this.pickCondition(f))?b.items:void 0),P("div",{className:a("Combo Combo--single",{"is-mobile":m},i?"Combo--ver":"Combo--hor",r?"Combo--noBorder":"",s?"is-disabled":"")},P("div",{className:a("Combo-item",u,!1===p.memberValidMap[0]?"has-error":"")},b&&!1!==o?P("div",{className:a("Combo-itemTag")},P("label",null,d("Combo.type")),P(V.default,{onChange:this.handleComboTypeChange.bind(this,0),options:t.map((function(e){return{label:e.label,value:e.label}})),value:b.label,clearable:!1})):null,P("div",{className:a("Combo-itemInner")},c?this.renderItems(c,f):P(A.default,{level:"warning",className:"m-b-none"},d("Combo.invalidData")))),n&&l?P("a",{className:a("Combo-setNullBtn"),href:"#",onClick:this.setNull},d("clear")):null)},t.prototype.renderItems=function(e,t,a,n){var i=this.props,r=i.classnames,s=i.formClassName,o=i.render,l=i.multiLine,d=i.disabled,m=i.canAccessSuperData,p=i.multiple,c=i.tabsMode,h=i.subFormMode,f=i.subFormHorizontal,b=i.changeImmediately,g=i.lazyLoad;i.translate;var v=i.static,y=i.testIdBuilder,C=i.updatePristineAfterStoreDataReInit,_=Array.isArray(e)?e.map((function(e,t){var n=void 0!==a&&a>=0?"-".concat(a):"",i="item-".concat(e.testid||e.id||t)+n;return u.__assign(u.__assign({},e),{testIdBuilder:null==y?void 0:y.getChild(i)})})):e;return p?p&&void 0!==a&&a>=0?o("multiple/".concat(a),{type:"form",body:_,wrapperComponent:"div",wrapWithPanel:!1,mode:c||l?h:"row",horizontal:f,className:r("Combo-form",s)},u.__assign(u.__assign({index:a,disabled:d,static:v,data:t,originData:n,onChange:this.handleChange,onInit:this.handleFormInit,onAction:this.handleAction,onRadioChange:this.handleRadioChange,ref:this.makeFormRef(a),onValidChange:this.handleSubFormValid,canAccessSuperData:m,lazyChange:!b,formLazyChange:!1,value:void 0,formItemValue:void 0,formStore:void 0},c?{}:{lazyLoad:g}),{updatePristineAfterStoreDataReInit:null!=C&&C})):P(k.default.Fragment,null):o("single",{type:"form",body:_,wrapperComponent:"div",wrapWithPanel:!1,mode:l?h||"normal":"row",horizontal:f,className:r("Combo-form",s)},{index:0,disabled:d,static:v,data:t,originData:n,onChange:this.handleSingleFormChange,ref:this.makeFormRef(0),onValidChange:this.handleSubFormValid,onInit:this.handleSingleFormInit,canAccessSuperData:m,lazyChange:!b,formLazyChange:!1,value:void 0,formItemValue:void 0,formStore:void 0,updatePristineAfterStoreDataReInit:null!=C&&C})},t.prototype.renderStatic=function(e){return this.props.render("static-input-kv",{type:"json"},this.props)},t.prototype.render=function(){var e=this.props,t=e.type,a=e.formInited,n=e.multiple,i=e.className;e.style,e.classPrefix;var r=e.classnames,s=e.static,o=e.staticSchema;return s&&(o||["input-kv","input-kvs"].includes(t))?this.renderStatic():a||void 0===a?P("div",{className:r("ComboControl",i)},n?this.renderMultipe():this.renderSingle()):null},t.defaultProps={minLength:0,maxLength:1/0,multiple:!1,multiLine:!1,addButtonClassName:"",formClassName:"",subFormMode:"normal",draggableTip:"",addButtonText:"add",canAccessSuperData:!1,addIcon:!0,dragIcon:"",deleteIcon:"",tabsMode:!1,tabsStyle:"",placeholder:"placeholder.empty",itemClassName:"",itemsWrapperClassName:""},t.propsList=["minLength","maxLength","multiple","multiLine","addButtonClassName","subFormMode","draggableTip","addButtonText","draggable","scaffold","canAccessSuperData","addIcon","dragIcon","deleteIcon","noBorder","conditions","tabsMode","tabsStyle","lazyLoad","changeImmediately","strictMode","items","conditions","messages","formStore","itemClassName","itemsWrapperClassName"],u.__decorate([h.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Number]),u.__metadata("design:returntype",Promise)],t.prototype,"handleTabSelect",null),u.__decorate([h.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",void 0)],t.prototype,"setNull",null),t}(k.default.Component),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t.prototype.setData=function(e,t,a,n){return u.__awaiter(this,void 0,void 0,(function(){var t,i,r,s,o,l,d,m;return u.__generator(this,(function(p){switch(p.label){case 0:return t=this.props,i=t.multiple,r=t.onChange,s=t.submitOnChange,i?(o=u.__spreadArray([],u.__read(this.getValueAsArray()),!1),l=o.length,void 0===a?[3,1]:(String(a).split(",").forEach((function(t){var a=Number(t);o.splice(a,1,u.__assign(u.__assign({},o[a]),e))})),null==r||r(o,s,!0),[3,7])):[3,8];case 1:if(void 0===n)return[3,6];d=0,p.label=2;case 2:return d<l?(m=o[d],[4,h.evalExpressionWithConditionBuilderAsync(n,m)]):[3,5];case 3:p.sent()&&o.splice(d,1,u.__assign(u.__assign({},o[d]),e)),p.label=4;case 4:return d++,[3,2];case 5:return null==r||r(o,s,!0),[3,7];case 6:null==r||r(e,s,!0),p.label=7;case 7:return[3,9];case 8:null==r||r(e,s,!0),p.label=9;case 9:return[2]}}))}))},t=u.__decorate([h.FormItem({type:"combo",storeType:h.ComboStore.name,extendsData:!1,shouldComponentUpdate:function(e,t){return h.isPureVariable(e.maxLength)&&h.resolveVariableAndFilter(t.maxLength,t.data)!==h.resolveVariableAndFilter(e.maxLength,e.data)||h.isPureVariable(e.minLength)&&h.resolveVariableAndFilter(t.minLength,t.data)!==h.resolveVariableAndFilter(e.minLength,e.data)}})],t)}(M),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t=u.__decorate([h.FormItem({type:"input-kv",storeType:h.ComboStore.name,extendsData:!1})],t)}(M),z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t=u.__decorate([h.FormItem({type:"input-kvs",storeType:h.ComboStore.name,extendsData:!1})],t)}(M);t.ComboControlRenderer=E,t.KVControlRenderer=R,t.KVSControlRenderer=z,t.default=M}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputArray.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputArray",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),a=e("node_modules/amis/lib/renderers/Form/Combo");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(i),d=e("node_modules/react/index"),c=(d.default||d).createElement;(d.default||d).Fragment;var m=function(e){function t(t){var n=e.call(this,t)||this;return n.comboRef=n.comboRef.bind(n),n}return r.__extends(t,e),t.prototype.comboRef=function(e){this.comboInstance=e},t.prototype.validate=function(e){return this.comboInstance?this.comboInstance.validate():null},t.prototype.render=function(){var e=this.props,t=e.items,n=e.scaffold,o=r.__rest(e,["items","scaffold"]),i=Array.isArray(t)?t.length>1?t.slice(0,1):t:null!=t?[t]:[];return c(a.default,r.__assign({},o,{scaffold:n,items:i,flat:!0,multiple:!0,multiLine:!1,ref:this.comboRef}))},t}(u.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([s.FormItem({type:"input-array",storeType:s.ComboStore.name})],t)}(m);t.ArrayControlRenderer=f,t.default=m}));
|
||
;/*!node_modules/amis-ui/lib/components/ConditionBuilder.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/ConditionBuilder",(function(e,i,n,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var d=e("node_modules/amis-ui/lib/components/condition-builder/index");i.default=d.default}));
|
||
;/*!node_modules/amis/lib/renderers/Form/ConditionBuilder.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/ConditionBuilder",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/ConditionBuilder"),o=e("node_modules/amis-ui/lib/withRemoteConfig"),a=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(i),p=l(o),c=l(d),_=e("node_modules/react/index"),f=(_.default||_).createElement;(_.default||_).Fragment;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.renderEtrValue=function(e,t){return this.props.render("inline",Object.assign({},e,{label:!1,inputOnly:!0,changeImmediately:!0}),t)},t.prototype.renderPickerIcon=function(){var e=this.props,t=e.render,n=e.pickerIcon;return n?t("picker-icon",n):void 0},t.prototype.getAddBtnVisible=function(e){var t=this.props,n=t.data,r=t.addBtnVisibleOn;return"string"!=typeof r||!r||s.evalExpression(r,s.createObject(n,e))},t.prototype.getAddGroupBtnVisible=function(e){var t=this.props,n=t.data,r=t.addGroupBtnVisibleOn;return"string"!=typeof r||!r||s.evalExpression(r,s.createObject(n,e))},t.prototype.validate=function(){var e,t=this.props,n=t.value,r=t.required,i=t.translate;if(r){if(!n||!n.children)return i("Condition.isRequired");var o=!0,a=["is_empty","is_not_empty"];return null===(e=null==n?void 0:n.children)||void 0===e||e.forEach((function(e){e.op&&(e.right||~a.indexOf(e.op))&&(o=!1)})),o?i("Condition.isRequired"):null}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classnames;e.style,e.pickerIcon;var r=e.env,i=e.popOverContainer,o=a.__rest(e,["className","classnames","style","pickerIcon","env","popOverContainer"]),d=this.props.formula?a.__assign({},this.props.formula):void 0;return d&&d.variables&&s.isPureVariable(d.variables)&&(d.variables=s.resolveVariableAndFilter(d.variables,this.props.data,"| raw")),f("div",{className:n("ConditionBuilderControl",{"is-mobile":s.isMobile()},t)},f(b,a.__assign({renderEtrValue:this.renderEtrValue,pickerIcon:this.renderPickerIcon(),isAddBtnVisibleOn:this.getAddBtnVisible,isAddGroupBtnVisibleOn:this.getAddGroupBtnVisible,popOverContainer:i||r.getModalContainer},o,{formula:d})))},a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object,Object]),a.__metadata("design:returntype",void 0)],t.prototype,"renderEtrValue",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"getAddBtnVisible",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"getAddGroupBtnVisible",null),t}(c.default.PureComponent),b=p.default({adaptor:function(e){return e.fields||e}})(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.loading,n=e.config;e.deferLoad;var r=e.disabled,i=e.renderEtrValue,o=a.__rest(e,["loading","config","deferLoad","disabled","renderEtrValue"]);return f(u.default,a.__assign({},o,{fields:n||o.fields||[],disabled:r||t,renderEtrValue:i}))},t}(c.default.Component)),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([s.FormItem({type:"condition-builder",strictMode:!1})],t)}(m);t.ConditionBuilderRenderer=v,t.default=m}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputSubForm.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputSubForm",(function(e,t,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/PopUp"),s=e("node_modules/amis-ui/lib/components/Icon"),n=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),r=e("node_modules/amis-core/lib/index"),d=e("node_modules/classnames/index"),u=e("node_modules/lodash/omit"),p=e("node_modules/lodash/pick"),m=e("node_modules/sortablejs/Sortable.min"),c=e("node_modules/react-dom/index");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h,b=g(i),f=g(s),v=g(l),_=g(d),y=g(u),C=g(p),S=g(m),x=e("node_modules/react/index"),N=(x.default||x).createElement;(x.default||x).Fragment;var F=function(e){return e?((h=h||document.createElement("div")).innerHTML=e,h.innerText):e},I=function(e){function t(t){var a=e.call(this,t)||this;return a.state={},a.id=r.guid(),a.addItem=a.addItem.bind(a),a.removeItem=a.removeItem.bind(a),a.editSingle=a.editSingle.bind(a),a.open=a.open.bind(a),a.close=a.close.bind(a),a.dragTipRef=a.dragTipRef.bind(a),a.handleDialogConfirm=a.handleDialogConfirm.bind(a),a}return n.__extends(t,e),t.prototype.addItem=function(){this.setState({dialogData:r.createObject(this.props.data,this.props.scaffold||{}),dialogCtx:{mode:"add"}})},t.prototype.removeItem=function(e){e.stopPropagation(),e.preventDefault();var t=parseInt(e.currentTarget.getAttribute("data-index"),10),a=this.props.value;Array.isArray(a)&&((a=a.concat()).splice(t,1),this.props.onChange(a))},t.prototype.editSingle=function(){this.props.value?this.setState({dialogData:r.createObject(this.props.data,this.props.value),dialogCtx:{mode:"edit"}}):this.addItem()},t.prototype.open=function(e){var t=parseInt(e.currentTarget.getAttribute("data-index"),10),a=this.props.value;Array.isArray(a)&&a[t]&&(this.tempValue=a[t],this.setState({dialogData:r.createObject(this.props.data,a[t]),dialogCtx:{mode:"edit",index:t}}))},t.prototype.close=function(){this.setState({dialogData:void 0,dialogCtx:void 0})},t.prototype.handleDialogConfirm=function(e){var t=this.props,a=t.multiple,o=t.onChange,i=t.value,s=this.state.dialogCtx;if(a){var l=Array.isArray(i)?i.concat():[];"add"===(null==s?void 0:s.mode)?l.push(n.__assign({},e[0])):l[s.index]=n.__assign(n.__assign({},l[s.index]),e[0]),o(l)}else o(n.__assign(n.__assign({},i),e[0]));this.close()},t.prototype.handlePopupConfirm=function(){var e=this.tempValue,t=this.props,a=t.multiple,o=t.onChange,i=t.value,s=this.state.dialogCtx;if(a){var l=Array.isArray(i)?i.concat():[];"add"===(null==s?void 0:s.mode)?l.push(n.__assign({},e)):l[s.index]=n.__assign(n.__assign({},l[s.index]),e),o(l)}else o(n.__assign(n.__assign({},i),e));this.close()},t.prototype.dragTipRef=function(e){!this.dragTip&&e?this.initDragging():this.dragTip&&!e&&this.destroyDragging(),this.dragTip=e},t.prototype.initDragging=function(){var e=this,t=this.props.classPrefix,a=this.props.submitOnChange,o=c.findDOMNode(this);this.sortable=new S.default(o.querySelector(".".concat(t,"SubForm-values")),{group:"SubForm-".concat(this.id),animation:150,handle:".".concat(t,"SubForm-valueDragBar"),ghostClass:"".concat(t,"SubForm-value--dragging"),onEnd:function(t){if(t.newIndex!==t.oldIndex){var o=t.to;t.oldIndex<o.childNodes.length-1?o.insertBefore(t.item,o.childNodes[t.oldIndex>t.newIndex?t.oldIndex+1:t.oldIndex]):o.appendChild(t.item);var i=e.props.value;if(Array.isArray(i)){var s=i.concat();s.splice(t.newIndex,0,s.splice(t.oldIndex,1)[0]),e.props.onChange(s,a,!0)}}}})},t.prototype.destroyDragging=function(){this.sortable&&this.sortable.destroy()},t.prototype.buildDialogSchema=function(){var e=this.props.form,t=["title","actions","name","size","closeOnEsc","closeOnOutside","showErrorMsg","showCloseButton","bodyClassName","type"];return n.__assign(n.__assign({},C.default(e,t)),{type:"dialog",body:n.__assign(n.__assign({type:"form",canAccessSuperData:!1},y.default(e,t)),{inheritData:!1})})},t.prototype.buildFormSchema=function(){var e=this.props.form;return n.__assign(n.__assign({type:"form",canAccessSuperData:!1},y.default(e,["title","actions","name","size","closeOnEsc","closeOnOutside","showErrorMsg","showCloseButton","bodyClassName","type"])),{inheritData:!1})},t.prototype.renderMultipe=function(){var e=this,t=this.props,a=t.addButtonClassName,o=t.itemClassName,i=t.itemsClassName,s=t.disabled,l=t.maxLength,d=t.labelField,u=t.defaultLabel,p=t.value,m=t.btnLabel,c=t.render,g=t.data,h=t.translate,b=t.classnames,_=t.placeholder,y=t.draggable,C=t.draggableTip,S=t.addable,x=t.removable,I=t.minLength,D=t.addButtonText,A=t.testIdBuilder;return N(v.default.Fragment,null,Array.isArray(p)&&p.length?N("div",{className:b("SubForm-values",i),key:"values"},p.map((function(t,a){return N("div",n.__assign({className:b("SubForm-value",{"is-disabled":s},o),key:a},null==A?void 0:A.getChild("item-".concat(a)).getTestId()),y&&p.length>1?N("a",{className:b("SubForm-valueDragBar")},N(f.default,{icon:"drag-bar",className:b("icon")})):null,N("span",{className:b("SubForm-valueLabel")},m&&c("label",{type:"tpl",tpl:h(m)},{data:r.createObject(g,t)}),!m&&(t&&d&&t[d]&&F(t[d])||h(u))),N("a",{"data-index":a,onClick:e.open,className:b("SubForm-valueEdit")},N(f.default,{icon:"pencil",className:"icon"})),s||!1===x||I&&!(p.length>I)?null:N("a",{"data-index":a,className:b("SubForm-valueDel"),onClick:e.removeItem},N(f.default,{icon:"close",className:"icon"})))}))):N("div",{className:b("SubForm-placeholder"),key:"placeholder"},h(_||"placeholder.empty")),N("div",{key:"toolbar",className:b("SubForm-toolbar")},!1!==S?N("button",n.__assign({type:"button",onClick:this.addItem,className:b("Button SubForm-addBtn",a),disabled:s||!!(l&&Array.isArray(p)&&p.length>=l)},null==A?void 0:A.getChild("add-button").getTestId()),N(f.default,{icon:"plus",className:"icon"}),N("span",null,h(D||"SubForm.add"))):null,y&&Array.isArray(p)&&p.length>1?N("span",{className:b("Combo-dragableTip"),ref:this.dragTipRef},Array.isArray(p)&&p.length>1?h(C):""):null))},t.prototype.renderSingle=function(){var e=this.props,t=e.classnames,a=e.itemsClassName,o=e.itemClassName,i=e.disabled,s=e.value,l=e.labelField,d=e.defaultLabel,u=e.btnLabel,p=e.render,m=e.data,c=e.translate,g=e.testIdBuilder,h=null==g?void 0:g.getChild("edit-single");return N("div",{className:t("SubForm-values",a),key:"values"},N("div",n.__assign({className:t("SubForm-value",{"is-disabled":i},o),onClick:this.editSingle,"data-tooltip":c("SubForm.editDetail"),"data-position":"bottom"},null==h?void 0:h.getTestId()),N("span",{className:t("SubForm-valueLabel")},u&&p("label",{type:"tpl",tpl:c(u)},{data:r.createObject(m,s)}),!u&&(s&&l&&s[l]&&F(s[l])||c(d))),N("a",n.__assign({className:t("SubForm-valueEdit")},null==h?void 0:h.getChild("icon").getTestId()),N(f.default,{icon:"pencil",className:"icon"}))))},t.prototype.render=function(){var e=this,t=this.props,a=t.multiple,o=t.classPrefix,i=t.className;t.style;var s=t.render,n=t.mobileUI,l=t.env,r=t.popOverContainer,d=this.state.dialogData,u=this.state.dialogCtx;return N("div",{className:_.default("".concat(o,"SubFormControl"),i)},a?this.renderMultipe():this.renderSingle(),n?N(b.default,{isShow:!!u,showConfirm:!0,onConfirm:this.handlePopupConfirm,onHide:this.close,container:n?null==l?void 0:l.getModalContainer:r||l.getModalContainer},N("div",{className:"flex-1 pl-10 pr-10"},s("form",this.buildFormSchema(),{data:d,formStore:void 0,wrapWithPanel:!1,onChange:function(t){e.tempValue=t}}))):s("modal",this.buildDialogSchema(),{show:!!u,onClose:this.close,onConfirm:this.handleDialogConfirm,data:d,formStore:void 0}))},t.defaultProps={minLength:0,maxLength:0,multiple:!1,btnClassName:"",addButtonClassName:"",itemClassName:"",labelField:"label",defaultLabel:"SubForm.button",placeholder:"placeholder.empty"},t.propsList=["form","formStore"],n.__decorate([r.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"handlePopupConfirm",null),t}(v.default.PureComponent),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([r.FormItem({type:"input-sub-form",sizeMutable:!1,strictMode:!1})],t)}(I);t.SubFormControlRenderer=D,t.default=I}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputExcel.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputExcel",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),o=e("node_modules/react-dropzone/dist/index"),s=e("node_modules/lodash/omit"),l=e("node_modules/lodash/merge"),u=e("node_modules/lodash/isEmpty"),d=e("node_modules/lodash/isPlainObject"),c=e("node_modules/amis-core/lib/index");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=p(a),f=p(o),m=p(s),v=p(l),y=p(u),_=p(d),g=e("node_modules/react/index"),x=(g.default||g).createElement;(g.default||g).Fragment;var b=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={filename:""},e}return i.__extends(n,t),n.prototype.componentDidUpdate=function(e){e.value===this.props.value||this.props.value||this.setState({filename:""})},n.prototype.syncAutoFill=function(e){var t=this.props,n=t.autoFill,r=t.onBulkChange,i=t.data,a=t.name;if(!(null==n?void 0:n.hasOwnProperty("api"))&&c.isObject(n)){var o=a?m.default(n,a):n;if(!y.default(o)&&r){var s=c.dataMapping(o,{filename:e});Object.keys(s).forEach((function(e){_.default(s[e])&&_.default(i[e])&&(s[e]=v.default({},i[e],s[e]))})),r(s)}}},n.prototype.handleDrop=function(t){var n=this,r=t[0],a=r.name,o=new FileReader;o.readAsArrayBuffer(r),o.onload=function(){return i.__awaiter(n,void 0,void 0,(function(){var t=this;return i.__generator(this,(function(n){return o.result&&(a.toLowerCase().endsWith(".xls")?Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/xlsx/xlsx","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))})).then((function(e){var n=e.read(new Uint8Array(o.result),{cellDates:!0}),r=e.writeXLSX(n,{type:"array"});t.processExcelFile(r,a)})):this.processExcelFile(o.result,a)),[2]}))}))}},n.prototype.processExcelFile=function(t,n){var r=this,a=this.props,o=a.allSheets,s=a.onChange,l=a.parseImage,u=a.autoFill;Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/exceljs/dist/exceljs.min","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))})).then((function(e){return i.__awaiter(r,void 0,void 0,(function(){var r,a,d,c,p,h,f=this;return i.__generator(this,(function(i){switch(i.label){case 0:return r=e.default||e,this.ExcelJS=r,[4,(a=new r.Workbook).xlsx.load(t)];case 1:return i.sent(),d=[],o?a.eachSheet((function(e){"hidden"!==(e.state||"visible")&&(l?d.push({sheetName:e.name,data:f.readWorksheet(e),images:f.readImages(e,a)}):d.push({sheetName:e.name,data:f.readWorksheet(e)}))})):(c=a.worksheets.find((function(e){return"hidden"!==e.state})),l?(p=this.readImages(c,a),d={data:this.readWorksheet(c),images:p}):d=this.readWorksheet(c)),[4,this.dispatchEvent("change",d)];case 2:return(null==(h=i.sent())?void 0:h.prevented)||(s(d),u&&this.syncAutoFill(n),this.setState({filename:n})),[2]}}))}))}))},n.prototype.readImages=function(e,t){var n,r,a=this.props.imageDataURI,o=e.getImages(),s=[];try{for(var l=i.__values(o),u=l.next();!u.done;u=l.next()){var d=u.value,c=t.getImage(+d.imageId),p=this.encodeBase64Bytes(c.buffer);if(a){var h=c.extension||"png";s.push("data:image/".concat(h,";base64,")+p)}else s.push(p)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return s},n.prototype.encodeBase64Bytes=function(e){return btoa(e.reduce((function(e,t){return e+String.fromCharCode(t)}),""))},n.prototype.dispatchEvent=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var n,r;return i.__generator(this,(function(i){switch(i.label){case 0:return n=this.props,r=n.dispatchEvent,n.data,[4,r(e,c.resolveEventData(this.props,{value:t}))];case 1:return[2,i.sent()]}}))}))},n.prototype.isRichTextValue=function(e){return!!(e&&c.isObject(e)&&e.hasOwnProperty("richText")&&Array.isArray(null==e?void 0:e.richText))},n.prototype.richText2PlainString=function(e,t){return void 0===t&&(t=!1),e.richText.map((function(e){var n=e.text,r=e.font,i=void 0===r?{}:r,a=n;if(t){var o="",s=(null==i?void 0:i.bold)?"strong":(null==i?void 0:i.italic)?"em":"superscript"===(null==i?void 0:i.vertAlign)?"sup":"subscript"===(null==i?void 0:i.vertAlign)?"sub":"span";(null==i?void 0:i.strike)?o+="text-decoration: line-through;":(null==i?void 0:i.underline)&&(o+="text-decoration: underline;"),(null==i?void 0:i.outline)&&(o+="outline: solid;"),(null==i?void 0:i.size)&&(o+="font-size: ".concat(i.size,"px;")),a="<".concat(s," ").concat(o?"style=".concat(o):"",">").concat(n,"</").concat(s,">")}return a})).join("")},n.prototype.readWorksheet=function(e){var t=this,n=[],r=this.props,i=r.parseMode,a=r.plainText,o=r.includeEmpty;if("array"===i)return e.eachRow((function(e,r){var i=e.values;i.shift(),a&&(i=i.map((function(e){if(e instanceof Object){if(e.hyperlink)return e.hyperlink.startsWith("mailto:")?e.hyperlink.substring(7):e.hyperlink;if(e.result)return e.result;if(e.richText)return t.richText2PlainString(e)}return e}))),n.push(i)})),n;var s=[];return e.eachRow((function(e,r){var i;if(1==r)s=(null!==(i=e.values)&&void 0!==i?i:[]).map((function(e){return t.isRichTextValue(e)?t.richText2PlainString(e):e}));else{var l={};o&&s.forEach((function(e){l[e]=""})),e.eachCell((function(e,n){if(s[n]){var r=e.value;if(a){var i=t.ExcelJS.ValueType;e.type===i.Hyperlink?(r=e.value.hyperlink).startsWith("mailto:")&&(r=r.substring(7)):e.type===i.Formula?r=e.value.result:e.type===i.RichText?r=t.richText2PlainString(e.value):e.type===i.Error&&(r="")}l[s[n]]=r}})),n.push(l)}})),n},n.prototype.doAction=function(e,t,n){var r,i,a=null==e?void 0:e.actionType,o=this.props,s=o.onChange,l=o.resetValue,u=o.formStore,d=o.store,p=o.name;if("clear"===a)s("");else if("reset"===a){var h=null!==(i=c.getVariable(null!==(r=null==u?void 0:u.pristine)&&void 0!==r?r:null==d?void 0:d.pristine,p))&&void 0!==i?i:l;s(null!=h?h:"")}},n.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.classnames;t.classPrefix;var a=t.disabled,o=t.translate,s=t.placeholder,l=t.testIdBuilder;return x("div",{className:r("ExcelControl",n)},x(f.default,{key:"drop-zone",onDrop:this.handleDrop,accept:".xlsx,.xls",multiple:!1,disabled:a},(function(t){var a=t.getRootProps,u=t.getInputProps;return x("section",{className:r("ExcelControl-container",n)},x("div",i.__assign({},a({className:r("ExcelControl-dropzone")}),null==l?void 0:l.getTestId()),x("input",i.__assign({},u(),null==l?void 0:l.getChild("input").getTestId())),e.state.filename?o("Excel.parsed",{filename:e.state.filename}):x("p",null,null!=s?s:o("Excel.placeholder"))))})))},n.defaultProps={allSheets:!1,parseMode:"object",includeEmpty:!0,plainText:!0,parseImage:!1,imageDataURI:!0},i.__decorate([c.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String]),i.__metadata("design:returntype",void 0)],n.prototype,"syncAutoFill",null),i.__decorate([c.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Array]),i.__metadata("design:returntype",void 0)],n.prototype,"handleDrop",null),n}(h.default.PureComponent),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([c.FormItem({type:"input-excel"})],t)}(b);t.ExcelControlRenderer=E,t.default=b}));
|
||
;/*!node_modules/amis/lib/renderers/Form/DiffEditor.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/DiffEditor",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/DiffEditor"),r=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(i),d=l(s),c=e("node_modules/react/index"),f=(c.default||c).createElement;function h(e,t){if(e&&"string"!=typeof e&&(e=JSON.stringify(e,null,2)),t&&"json"===t)try{e=JSON.stringify("string"==typeof e?JSON.parse(e):e,null,2)}catch(e){}return e||""}(c.default||c).Fragment;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleEditorMounted=n.handleEditorMounted.bind(n),n.handleChange=n.handleChange.bind(n),n}return r.__extends(t,e),t.prototype.doAction=function(e,t,n,o){var i,r,s=null==e?void 0:e.actionType,l=this.props,u=l.onChange,d=l.resetValue,c=l.formStore,f=l.store,h=l.name;if("clear"===s)u("");else if("reset"===s){var p=null!==(r=a.getVariable(null!==(i=null==c?void 0:c.pristine)&&void 0!==i?i:null==f?void 0:f.pristine,h))&&void 0!==r?r:d;u(null!=p?p:"")}else"focus"===s&&this.focus()},t.prototype.focus=function(){var e,t,n;null===(e=this.editor)||void 0===e||e.focus(),this.setState({focused:!0});var o=null===(t=this.editor)||void 0===t?void 0:t.getPosition();null===(n=this.editor)||void 0===n||n.setPosition(o)},t.prototype.handleFocus=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,o,i,s;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,n=t.dispatchEvent,o=t.value,i=t.onFocus,this.setState({focused:!0}),[4,n("focus",a.resolveEventData(this.props,{value:o}))];case 1:return(null==(s=r.sent())?void 0:s.prevented)||(null==i||i(e)),[2]}}))}))},t.prototype.handleBlur=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,o,i,s;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,n=t.dispatchEvent,o=t.value,i=t.onBlur,this.setState({focused:!1}),[4,n("blur",a.resolveEventData(this.props,{value:o}))];case 1:return(null==(s=r.sent())?void 0:s.prevented)||(null==i||i(e)),[2]}}))}))},t.prototype.handleChange=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,o;return r.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,n=t.onChange,[4,(0,t.dispatchEvent)("change",a.resolveEventData(this.props,{value:e}))];case 1:return(null==(o=i.sent())?void 0:o.prevented)||n&&n(e),[2]}}))}))},t.prototype.handleEditorMounted=function(e){this.editor=e},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.value;e.onChange;var o=e.disabled,i=e.size,r=e.options,s=e.language,l=e.editorTheme,d=e.diffValue,c=e.classnames,p=e.data,v=a.isPureVariable(d)?h(a.resolveVariableAndFilter(d||"",p,"| raw"),s):h(d,s),m=h(n,s);return f("div",{className:c("EditorControl",i?"EditorControl--".concat(i):"",t,{"is-focused":this.state.focused})},f(u.default,{value:m,originValue:v,onChange:this.handleChange,disabled:o,language:s,editorTheme:l,options:r,onFocus:this.handleFocus,onBlur:this.handleBlur,editorDidMount:this.handleEditorMounted}))},t.defaultProps={language:"javascript",editorTheme:"vs",options:{automaticLayout:!1,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,minimap:{enabled:!1}},diffValue:""},t}(d.default.Component),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.defaultProps=r.__assign({},p.defaultProps),t=r.__decorate([a.FormItem({type:"diff-editor",sizeMutable:!1})],t)}(p);t.DiffEditorControlRenderer=v,t.DiffEditorRenderer=p}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputColor.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputColor",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),l=e("node_modules/classnames/index"),i=e("node_modules/amis-core/lib/index"),s=e("node_modules/amis/lib/renderers/Form/StaticHoc");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(a),c=u(l),m=e("node_modules/react/index"),p=(m.default||m).createElement;(m.default||m).Fragment;var _=d.default.lazy((function(){return Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/amis-ui/lib/components/ColorPicker","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))}))})),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={open:!1},t}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.classPrefix,o=e.value,l=e.env;e.static;var i=e.mobileUI,s=r.__rest(e,["className","style","classPrefix","value","env","static","mobileUI"]);return p("div",{className:c.default("".concat(n,"ColorControl"),t)},p(a.Suspense,{fallback:p("div",null,"...")},p(_,r.__assign({classPrefix:n},s,{mobileUI:i,popOverContainer:i?null==l?void 0:l.getModalContainer:s.popOverContainer||l.getModalContainer,value:o||""}))))},t.defaultProps={format:"hex",clearable:!0},r.__decorate([s.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(d.default.PureComponent),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([i.FormItem({type:"input-color"})],t)}(f);t.ColorControlRenderer=v,t.ColorPicker=_,t.default=f}));
|
||
;/*!node_modules/amis/lib/renderers/Form/ChainedSelect.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/ChainedSelect",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/Spinner"),s=e("node_modules/amis-ui/lib/components/Select"),o=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),r=e("node_modules/classnames/index"),d=e("node_modules/amis-core/lib/index"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc"),c=e("node_modules/lodash/find"),p=e("node_modules/lodash/isEmpty");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=v(i),m=v(s),f=v(l),_=v(r),g=v(c),C=v(p),y=e("node_modules/react/index"),b=(y.default||y).createElement;(y.default||y).Fragment;var S=function(e){function t(t){var a=e.call(this,t)||this;return a.state={stack:[]},a.handleChange=a.handleChange.bind(a),a.loadMore=a.loadMore.bind(a),a}return o.__extends(t,e),t.prototype.componentDidMount=function(){var e,t;this.props.formInited||!this.props.addHook?this.loadMore():null===(t=(e=this.props).addHook)||void 0===t||t.call(e,this.loadMore,"init")},t.prototype.componentDidUpdate=function(e){var t=this.props;e.options!==t.options?this.setState({stack:[]}):t.formInited&&t.value!==e.value&&this.loadMore()},t.prototype.doAction=function(e,t,a){var n,i,s=this.props,o=s.resetValue,l=s.onChange,r=s.formStore,u=s.store,c=s.name,p=null==e?void 0:e.actionType;if("clear"===p)l("");else if("reset"===p){var v=null!==(i=d.getVariable(null!==(n=null==r?void 0:r.pristine)&&void 0!==n?n:null==u?void 0:u.pristine,c))&&void 0!==i?i:o;l(null!=v?v:"")}},t.prototype.array2value=function(e,t){void 0===t&&(t=!1);var a=this.props,n=a.delimiter,i=a.joinValues,s=a.extractValue;return t?i?e.join(n||","):e:i?e.join(n||","):s?e.map((function(e){return e.value||e})):e},t.prototype.loadMore=function(){for(var e=this,t=this.props,a=t.value,n=t.delimiter,i=t.onChange,s=t.joinValues,l=t.extractValue,r=t.source,u=t.data,c=t.env,p=t.dispatchEvent,v=Array.isArray(a)?a.concat():a&&"string"==typeof a?a.split(n||","):[],h=0,m=this.state.stack.length;h<m&&v[h]&&this.state.stack[h].parentId==(s||l?v[h]:v[h].value);)h++;if(v[h]&&c&&d.isEffectiveApi(r,u)){var f=s||l?v[h]:v[h].value,_=this.state.stack.concat();_.splice(h,_.length-h),_.push({parentId:f,loading:!0,options:[]}),this.setState({stack:_},(function(){c.fetcher(r,o.__assign(o.__assign({},u),{value:v,level:h+1,parentId:f,parent:v[h]})).then((function(t){return o.__awaiter(e,void 0,void 0,(function(){var e,n,s,l,r,u,c,m;return o.__generator(this,(function(o){switch(o.label){case 0:return e=this.state.stack.concat(),n=t.data?t.data.value:void 0,s=(null===(u=null==t?void 0:t.data)||void 0===u?void 0:u.options)||(null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.items)||(null===(m=null==t?void 0:t.data)||void 0===m?void 0:m.rows)||t.data||[],e.splice(h,e.length-h),void 0===n?[3,2]:(v.splice(h+1,a.length-h-1),v.push(n),l=this.array2value(v,!0),[4,p("change",d.resolveEventData(this.props,{value:l}))]);case 1:if(null==(r=o.sent())?void 0:r.prevented)return[2];i(l),o.label=2;case 2:return e.push({options:s,parentId:f,loading:!1,visible:Array.isArray(s)&&!C.default(s)}),this.setState({stack:e},this.loadMore),[2]}}))}))})).catch((function(e){!(null==r?void 0:r.silent)&&c.notify("error",e.message)}))}))}},t.prototype.handleChange=function(e,t){return o.__awaiter(this,void 0,void 0,(function(){var a,n,i,s,l,r,u,c,p,v;return o.__generator(this,(function(o){switch(o.label){case 0:return a=this.props,n=a.value,i=a.delimiter,s=a.onChange,l=a.joinValues,a.extractValue,r=a.dispatchEvent,a.data,(u=Array.isArray(n)?n.concat():n&&"string"==typeof n?n.split(i||","):[]).splice(e,u.length-e),void 0!==(c=l?t.value:t)&&u.push(c),p=this.array2value(u),[4,r("change",d.resolveEventData(this.props,{value:p}))];case 1:return(null==(v=o.sent())?void 0:v.prevented)||s(p),[2]}}))}))},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.renderStatic=function(e){void 0===e&&(e="-");var t=this.props,a=t.options,n=void 0===a?[]:a,i=t.labelField,s=void 0===i?"label":i,l=t.valueField,r=void 0===l?"value":l,d=t.classPrefix,u=t.classnames,c=t.className,p=t.value,v=t.delimiter,h=o.__spreadArray([{options:n,visible:!0}],o.__read(this.state.stack||[]),!1),m=Array.isArray(p)?p.concat():p&&"string"==typeof p?p.split(v||","):[];return(null==m?void 0:m.length)>0&&(e=m.map((function(e,t){var a,n=h[t]||{},i=n.options;return!1===n.visible?null:i&&i.length&&null!==(a=(g.default(i,(function(t){return e===t[r]}))||{})[s])&&void 0!==a?a:e})).filter((function(e){return null!=e})).join(" > ")),b("div",{className:u("".concat(d,"SelectStaticControl"),c)},e)},t.prototype.render=function(){var e=this,t=this.props,a=t.options,n=t.classPrefix,i=t.className,s=t.style;t.inline;var l=t.loading,r=t.value,u=t.delimiter;t.joinValues,t.extractValue,t.multiple;var c=t.mobileUI,p=t.env,v=t.testIdBuilder,f=t.popoverClassName,g=o.__rest(t,["options","classPrefix","className","style","inline","loading","value","delimiter","joinValues","extractValue","multiple","mobileUI","env","testIdBuilder","popoverClassName"]),C=Array.isArray(r)?r.concat():r&&"string"==typeof r?r.split(u||","):[],y=this.props,S=y.themeCss,N=y.id,x=this.state.stack.find((function(e){return e.loading}));return b("div",{className:_.default("".concat(n,"ChainedSelectControl"),i)},b(m.default,o.__assign({},g,{mobileUI:c,popOverContainer:c?null==p?void 0:p.getModalContainer:g.popOverContainer||(null==p?void 0:p.getModalContainer),className:_.default(d.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"chainedSelectControlClassName",id:N,themeCss:S}))),popoverClassName:_.default(f,d.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"chainedSelectPopoverClassName",id:N,themeCss:S}))),controlStyle:s,classPrefix:n,key:"base",testIdBuilder:null==v?void 0:v.getChild("base"),options:Array.isArray(a)?a:[],value:C[0],onChange:this.handleChange.bind(this,0),loading:l,inline:!0})),this.state.stack.map((function(t,a){var i=t.options,l=t.loading;return!1===t.visible||l?null:b(m.default,o.__assign({},g,{mobileUI:c,popOverContainer:c?p.getModalContainer:g.popOverContainer||(null==p?void 0:p.getModalContainer),classPrefix:n,key:"x-".concat(a+1),testIdBuilder:null==v?void 0:v.getChild("x-".concat(a+1)),options:Array.isArray(i)?i:[],value:C[a+1],onChange:e.handleChange.bind(e,a+1),inline:!0,controlStyle:s,className:_.default(d.setThemeClassName(o.__assign(o.__assign({},e.props),{name:"chainedSelectControlClassName",id:N,themeCss:S}))),popoverClassName:_.default(f,d.setThemeClassName(o.__assign(o.__assign({},e.props),{name:"chainedSelectPopoverClassName",id:N,themeCss:S})))}))})),x&&b(h.default,{size:"sm",className:_.default("".concat(n,"ChainedSelectControl-spinner"))}),b(d.CustomStyle,o.__assign({},this.props,{config:{themeCss:S,classNames:[{key:"chainedSelectControlClassName",weights:{focused:{suf:".is-opened:not(.is-mobile)"},disabled:{suf:".is-disabled"}}},{key:"chainedSelectPopoverClassName",weights:{default:{suf:" .".concat(n,"Select-option")},hover:{suf:" .".concat(n,"Select-option.is-highlight")},focused:{inner:".".concat(n,"Select-option.is-active")}}}],id:N},env:p})))},t.defaultProps={clearable:!1,searchable:!1,multiple:!0},o.__decorate([u.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(f.default.Component),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([d.OptionsControl({type:"chained-select",sizeMutable:!1})],t)}(S);t.ChainedSelectControlRenderer=N,t.default=S}));
|
||
;/*!node_modules/amis/lib/renderers/Form/NestedSelect.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/NestedSelect",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/Cascader"),s=e("node_modules/amis-ui/lib/components/PopUp"),o=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/amis-ui/lib/components/ResultBox"),l=e("node_modules/amis-ui/lib/components/Icon"),d=e("node_modules/amis-ui/lib/components/Checkbox"),u=e("node_modules/tslib/tslib"),c=e("node_modules/react/index"),p=e("node_modules/amis-core/lib/index"),h=e("node_modules/react-dom/index"),m=e("node_modules/lodash/xor"),_=e("node_modules/lodash/union"),g=e("node_modules/lodash/compact"),v=e("node_modules/amis/lib/renderers/Form/StaticHoc"),f=e("node_modules/match-sorter/dist/match-sorter.cjs");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=y(i),C=y(s),S=y(o),N=y(r),O=y(l),k=y(d),F=y(c),T=y(m),x=y(_),w=y(g),P=e("node_modules/react/index"),R=(P.default||P).createElement;(P.default||P).Fragment;var V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.outTarget=F.default.createRef(),t.state={isOpened:!1,isFocused:!1,inputValue:"",stack:[t.props.options]},t}return u.__extends(t,e),t.prototype.domRef=function(e){this.target=e},t.prototype.componentDidUpdate=function(e){e.options!==this.props.options&&this.setState({stack:[this.props.options]})},t.prototype.doAction=function(e,t,n){var a,i,s=this.props,o=s.resetValue,r=s.onChange,l=s.formStore,d=s.store,u=s.name,c=null==e?void 0:e.actionType;if("clear"===c)null==r||r("");else if("reset"===c){var h=null!==(i=p.getVariable(null!==(a=null==l?void 0:l.pristine)&&void 0!==a?a:null==d?void 0:d.pristine,u))&&void 0!==i?i:o;null==r||r(null!=h?h:"")}},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),u.__awaiter(this,void 0,void 0,(function(){var n;return u.__generator(this,(function(a){switch(a.label){case 0:return[4,(0,this.props.dispatchEvent)(e,p.resolveEventData(this.props,t))];case 1:return[2,!!(null==(n=a.sent())?void 0:n.prevented)]}}))}))},t.prototype.isParentNode=function(e){return Array.isArray(e.children)&&e.children.length>0},t.prototype.handleOutClick=function(e){var t;this.props.options,this.outTargetWidth=null===(t=this.outTarget.current)||void 0===t?void 0:t.clientWidth,e.defaultPrevented||this.setState({isOpened:!0})},t.prototype.handleResultClear=function(){this.setState({inputValue:void 0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.removeItem=function(e,t){return u.__awaiter(this,void 0,void 0,(function(){var n,a,i,s,o,r,l,d;return u.__generator(this,(function(u){switch(u.label){case 0:return n=this.props,a=n.onChange,i=n.selectedOptions,s=n.joinValues,o=n.valueField,r=n.extractValue,l=n.delimiter,d=n.value,t&&t.stopPropagation(),i.splice(e,1),s?d=i.map((function(e){return e[o||"value"]})).join(l||","):r&&(d=i.map((function(e){return e[o||"value"]}))),[4,this.dispatchEvent("change",{value:d})];case 1:return u.sent()||a(d),[2]}}))}))},t.prototype.renderValue=function(e,t){var n=this.props,a=n.classnames,i=n.labelField,s=n.valueField,o=n.options,r=n.hideNodePathLabel,l=this.state.inputValue||"",d=p.string2regExp(l);if(r)return p.labelToString(e[i||"label"]);var u=p.getTreeAncestors(o,e,!0),c=p.labelToString(e[i||"label"]),h=u?u.map((function(e){return p.labelToString(e[i||"label"])})).join(" / "):c;return R("span",{className:a("Select-valueLabel"),key:t||e[s||"value"],title:h},u?u.map((function(e,t){var n=p.labelToString(e[i||"label"]),a=e[s||"value"],o=t===u.length-1;return R("span",{key:t},d.test(a)||d.test(n)?p.renderTextByKeyword(n,l):n,!o&&" / ")})):c)},t.prototype.handleOptionClick=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,a,i,s,o,r,l,d;return u.__generator(this,(function(u){switch(u.label){case 0:return t=this.props,n=t.multiple,a=t.onChange,i=t.joinValues,s=t.extractValue,o=t.valueField,r=t.onlyLeaf,n?[2]:void 0===(l=i||s?e[o||"value"]:e)||r&&this.isParentNode(e)?[2]:[4,this.dispatchEvent("change",{value:l})];case 1:return(d=u.sent())||a(l),d||this.handleResultClear(),this.setState({stack:[this.props.options]}),this.close(),[2]}}))}))},t.prototype.handleCheck=function(e,t,n){return u.__awaiter(this,void 0,void 0,(function(){var a,i,s,o,r,l,d,c,h,m,_,g,v,f,y,b,C,S,N,O,k;return u.__generator(this,(function(u){switch(u.label){case 0:if(a=this.props,i=a.onChange,s=a.selectedOptions,o=a.joinValues,r=a.delimiter,l=a.extractValue,d=a.withChildren,c=a.onlyChildren,h=a.cascade,m=a.options,_=a.onlyLeaf,g=this.state.stack,v=this.props.valueField||"value",_&&!Array.isArray(e)&&this.isParentNode(e))return[2];if(!Array.isArray(e)&&e.children&&e.children.length&&"number"==typeof t&&(g[t]?g.splice(t+1,1,e.children):g.push(e.children)),f=s,b=function(e){return w.default(p.flattenTree(Array.isArray(e)?e:[e],(function(e){return e.children&&e.children.length?null:e})))},Array.isArray(e)?(d?e=p.flattenTree(e):c&&(e=b(e)),y=f.length===e.length?[]:e):Array.isArray(e.children)?h?y=T.default(f,[e]):d?(e=p.flattenTree([e]),C=e.every((function(e){return!!~f.indexOf(e)})),y=(C?T.default:x.default)(f,e)):c?(e=b(e),C=e.every((function(e){return!!~f.indexOf(e)})),y=(C?T.default:x.default)(f,e)):(y=f.filter((function(t){return!~p.flattenTree([e]).indexOf(t)})),!~f.indexOf(e)&&y.push(e)):y=T.default(f,[e]),!h)for(S=e;(null==(N=p.getTreeParent(m,S))?void 0:N.value)&&N.children.every((function(e){return~y.indexOf(e)}));)N.children.forEach((function(e){var t=y.indexOf(e);!~t||d||c||y.splice(t,1)})),c||y.push(N),S=N;return O=o?y.map((function(e){return e[v]})).join(r):l?y.map((function(e){return e[v]})):y,[4,this.dispatchEvent("change",{value:O})];case 1:return(k=u.sent())||i(O),k||this.handleResultClear(),n&&this.setState({stack:[this.props.options]}),[2]}}))}))},t.prototype.allChecked=function(e){var t=this,n=this.props,a=n.selectedOptions,i=n.withChildren,s=n.onlyChildren;return e.every((function(e){return(i||s)&&e.children?t.allChecked(e.children):a.some((function(t){return t===e}))}))},t.prototype.partialChecked=function(e){var t=this;return e.some((function(e){return e.children&&t.partialChecked(e.children)||t.props.selectedOptions.some((function(t){return t===e}))}))},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.getValue=function(){var e=this.props,t=e.selectedOptions,n=e.joinValues,a=e.valueField,i=e.extractValue,s=e.delimiter,o=e.value;return n?o=t.map((function(e){return e[a||"value"]})).join(s||","):i&&(o=t.map((function(e){return e[a||"value"]}))),o},t.prototype.onFocus=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,a,i;return u.__generator(this,(function(s){switch(s.label){case 0:return t=this.props,n=t.onFocus,a=t.disabled,i=this.getValue(),a||this.state.isOpened?[3,2]:(this.setState({isFocused:!0}),[4,this.dispatchEvent("focus",{value:i})]);case 1:s.sent()||n&&n(e),s.label=2;case 2:return[2]}}))}))},t.prototype.onBlur=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n;return u.__generator(this,(function(a){switch(a.label){case 0:return t=this.props.onBlur,n=this.getValue(),this.setState({isFocused:!1}),[4,this.dispatchEvent("blur",{value:n})];case 1:return a.sent()||t&&t(e),[2]}}))}))},t.prototype.getTarget=function(){return this.target||(this.target=h.findDOMNode(this)),this.target},t.prototype.handleKeyPress=function(e){" "===e.key&&(this.handleOutClick(e),e.preventDefault())},t.prototype.handleInputKeyDown=function(e){var t=this.state.inputValue,n=this.props,a=n.multiple,i=n.selectedOptions;"Backspace"===e.key&&!t&&i.length&&a&&this.removeItem(i.length-1)},t.prototype.handleInputChange=function(e){var t=this.props,n=t.options,a=t.labelField,i=t.valueField,s=e&&this.state.isOpened?p.filterTree(n,(function(t,n,s,o){return!!f.matchSorter([t].concat(o),e,{keys:[a||"label",i||"value"],threshold:f.matchSorter.rankings.CONTAINS}).length||!(!t.children||!t.children.length)}),1,!0):n.concat();this.setState({inputValue:e,stack:[s]})},t.prototype.handleResultChange=function(e){return u.__awaiter(this,void 0,void 0,(function(){var t,n,a,i,s,o,r,l;return u.__generator(this,(function(d){switch(d.label){case 0:return t=this.props,n=t.joinValues,a=t.extractValue,i=t.delimiter,s=t.valueField,o=t.onChange,r=t.multiple,l=Array.isArray(e)?e.concat():[],r||l.length?[3,2]:[4,this.dispatchEvent("change",{value:""})];case 1:return d.sent()||o(""),[2];case 2:return(n||a)&&(l=e.map((function(e){return e[s||"value"]}))),n&&(l=l.join(i||",")),[4,this.dispatchEvent("change",{value:l})];case 3:return d.sent()||o(l),[2]}}))}))},t.prototype.getMenuSelectMenuStyle=function(){var e=this.props.options,t=this.outTargetWidth,n=p.getTreeDepth(e),a={};return t&&(a={width:t/n}),a},t.prototype.renderOptions=function(){var e=this,t=this.props,n=t.multiple,a=t.selectedOptions,i=t.classnames,s=t.options,o=t.disabled,r=t.checkAll,l=t.checkAllLabel,d=t.translate,c=t.labelField,h=t.menuClassName,m=t.cascade,_=t.onlyChildren,g=t.testIdBuilder,v=this.props.valueField||"value",f=this.state.stack,y=this.partialChecked(s),b=this.allChecked(s);return R(F.default.Fragment,null,f.map((function(t,f){return R("div",{key:f,className:i("NestedSelect-menu",h),style:e.getMenuSelectMenuStyle()},n&&r&&0===f?R("div",{className:i("NestedSelect-option","checkall")},R(k.default,{size:"sm",onChange:e.handleCheck.bind(e,t),checked:y,partial:y&&!b}),R("span",{onClick:e.handleCheck.bind(e,t)},d(l))):null,t.map((function(t,r){var l=null==g?void 0:g.getChild("menu-".concat(f)).getChild(t.value||r),d=p.getTreeAncestors(s,t),h=null==d?void 0:d.some((function(e){return!!~a.indexOf(e)})),y=!m&&(n&&h),b=null==d?void 0:d.some((function(e){return!!e.disabled})),C=y||t.disabled||b||!!o,S=!(!t.children||!e.partialChecked(t.children)),N=y||!!~a.indexOf(t);!N&&_&&n&&e.isParentNode(t)&&e.allChecked(t.children)&&(N=!0);var F=p.labelToString(t[c||"label"]);return R("div",{key:r,className:i("NestedSelect-option",{"is-active":!C&&(N||!m&&S)}),onMouseEnter:e.onMouseEnter.bind(e,t,f)},n?R(k.default,{size:"sm",onChange:e.handleCheck.bind(e,t,f,!1),trueValue:t[v],checked:N||!m&&S,partial:!N,disabled:C,testIdBuilder:null==l?void 0:l.getChild("checkbox")}):null,R("div",u.__assign({className:i("NestedSelect-optionLabel",{"is-disabled":C}),onClick:function(){return!C&&(n?e.handleCheck(t,f):e.handleOptionClick(t))},title:F},null==l?void 0:l.getTestId()),F),t.children&&t.children.length?R("div",u.__assign({className:i("NestedSelect-optionArrowRight",{"is-disabled":C})},null==l?void 0:l.getChild("arrow-right").getTestId()),R(O.default,{icon:"right-arrow-bold",className:"icon"})):null)})))})))},t.prototype.renderSearchResult=function(){var e=this,t=this.state,n=t.stack,a=t.inputValue,i=this.props,s=i.classnames,o=i.translate,r=i.options,l=i.labelField,d=i.valueField,u=i.cascade,c=i.selectedOptions,h=i.multiple,m=i.disabled,_=i.onlyChildren,g=i.render,v=this.props.noResultsText;v&&(v=g("noResultText",o(v)));var f=p.string2regExp(a||""),y=p.flattenTree(n[0]).filter((function(e){return!(!f.test(e[d||"value"])&&!f.test(e[l||"label"]))}));return R("div",{className:s("NestedSelect-menu"),style:this.getMenuSelectMenuStyle()},y.length?y.map((function(t,n){var a=p.getTreeAncestors(r,t),i=!u&&(h&&(null==a?void 0:a.some((function(e){return!!~c.indexOf(e)})))),o=i||t.disabled||!!m||(null==a?void 0:a.some((function(e){return!!e.disabled}))),l=!(!t.children||!e.partialChecked(t.children)),d=i||!!~c.indexOf(t);return!d&&_&&e.isParentNode(t)&&e.allChecked(t.children)&&(d=!0),R("div",{className:s("NestedSelect-option",{"is-active":!o&&(d||!u&&l)}),key:n},R("div",{className:s("NestedSelect-optionLabel",{"is-disabled":o}),onClick:function(){!o&&(h?e.handleCheck(t,t.value,!0):e.handleOptionClick(t))}},e.renderValue(t,t.value)))})):R("div",{className:s("NestedSelect-option",{"no-result":!0})},v))},t.prototype.onMouseEnter=function(e,t,n){var a=this.state.stack;t+=1;var i=e.children;i&&i.length?a[t]?a.splice(t,1,i):a.push(i):a[t]&&a.splice(t,1),this.setState({stack:a.slice(0,t+1)})},t.prototype.renderOuter=function(){var e=this,t=this.props,n=t.popOverContainer,a=t.translate,i=t.classnames,s=t.options,o=t.render,r=t.id,l=t.themeCss,d=!!this.state.inputValue,c=this.props.noResultsText;c&&(c=o("noResultText",a(c)));var m=R(p.RootClose,{disabled:!this.state.isOpened,onRootClose:this.close},(function(t){return R("div",{className:i("NestedSelect-menuOuter"),ref:t},d?e.renderSearchResult():s.length?e.renderOptions():R("div",{className:i("NestedSelect-noResult")},c))}));return R(p.Overlay,{target:this.getTarget,container:n||function(){return h.findDOMNode(e)},placement:"auto",show:!0},R(p.PopOver,{className:i("NestedSelect-popover",p.setThemeClassName(u.__assign(u.__assign({},this.props),{name:"nestedSelectPopoverClassName",id:r,themeCss:l})))},m))},t.prototype.render=function(){var e,t=this.props,n=t.className,a=t.style,i=t.disabled,s=t.classnames,o=t.multiple,r=t.placeholder,l=t.translate,d=t.inline,c=t.searchable,h=t.selectedOptions,m=t.clearable,_=t.loading,g=t.borderMode,v=t.mobileUI;t.popOverContainer;var f=t.env,y=t.testIdBuilder,O=t.loadingConfig,k=t.maxTagCount,F=t.overflowTagPopover,T=this.props,x=T.classPrefix,w=T.themeCss,P=T.id;return R("div",{className:s("NestedSelectControl",n),ref:this.outTarget,style:a},R(N.default,{mobileUI:v,maxTagCount:k,overflowTagPopover:F,disabled:i,ref:this.domRef,placeholder:l(null!=r?r:"placeholder.empty"),inputPlaceholder:"",className:s("NestedSelect",(e={"NestedSelect--inline":d,"NestedSelect--single":!o,"NestedSelect--multi":o,"NestedSelect--searchable":c,"is-opened":this.state.isOpened,"is-focused":this.state.isFocused},e["NestedSelect--border".concat(p.ucFirst(g))]=g,e),p.setThemeClassName(u.__assign(u.__assign({},this.props),{name:"nestedSelectControlClassName",id:P,themeCss:w}))),result:o?h:h.length?h[0]:"",onResultClick:this.handleOutClick,value:this.state.inputValue,onChange:this.handleInputChange,onResultChange:this.handleResultChange,onClear:this.handleResultClear,itemRender:this.renderValue,onKeyPress:this.handleKeyPress,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.handleInputKeyDown,clearable:m,hasDropDownArrow:!0,allowInput:c&&!v,testIdBuilder:y},_?R(S.default,{loadingConfig:O,size:"sm"}):void 0),v?R(C.default,{className:s("NestedSelect-popup"),container:f.getModalContainer,isShow:this.state.isOpened,onHide:this.close,showConfirm:!1,showClose:!1},R(b.default,u.__assign({onClose:this.close},this.props,{onChange:this.handleResultChange,options:this.props.options.slice(),value:h}))):this.state.isOpened?this.renderOuter():null,R(p.CustomStyle,u.__assign({},this.props,{config:{themeCss:w,classNames:[{key:"nestedSelectControlClassName",weights:{hover:{suf:".is-clickable:not(.is-disabled)"},focused:{suf:".is-opened:not(.is-mobile)"},disabled:{suf:".is-disabled"}}},{key:"nestedSelectPopoverClassName",weights:{default:{suf:" .".concat(x,"NestedSelect-option")},hover:{suf:" .".concat(x,"NestedSelect-option.is-highlight")},focused:{inner:".".concat(x,"NestedSelect-option.is-active")}}}],id:P},env:f})))},t.defaultProps={cascade:!1,withChildren:!1,onlyChildren:!1,onlyLeaf:!1,searchPromptText:"Select.searchPromptText",noResultsText:"noResult",checkAll:!0,checkAllLabel:"Select.checkAll",hideNodePathLabel:!1},u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",void 0)],t.prototype,"domRef",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[String,Object]),u.__metadata("design:returntype",Promise)],t.prototype,"dispatchEvent",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",void 0)],t.prototype,"handleOutClick",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],t.prototype,"handleResultClear",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],t.prototype,"close",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object,Object]),u.__metadata("design:returntype",void 0)],t.prototype,"renderValue",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",Promise)],t.prototype,"handleOptionClick",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object,Number,Boolean]),u.__metadata("design:returntype",Promise)],t.prototype,"handleCheck",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],t.prototype,"getValue",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",Promise)],t.prototype,"onFocus",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",Promise)],t.prototype,"onBlur",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],t.prototype,"getTarget",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",void 0)],t.prototype,"handleKeyPress",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Object]),u.__metadata("design:returntype",void 0)],t.prototype,"handleInputKeyDown",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[String]),u.__metadata("design:returntype",void 0)],t.prototype,"handleInputChange",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[Array]),u.__metadata("design:returntype",Promise)],t.prototype,"handleResultChange",null),u.__decorate([p.autobind,u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],t.prototype,"getMenuSelectMenuStyle",null),u.__decorate([v.supportStatic(),u.__metadata("design:type",Function),u.__metadata("design:paramtypes",[]),u.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(F.default.Component),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t=u.__decorate([p.OptionsControl({type:"nested-select"})],t)}(V),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u.__extends(t,e),t=u.__decorate([p.OptionsControl({type:"cascader-select"})],t)}(V);t.CascaderSelectControlRenderer=j,t.NestedSelectControlRenderer=A,t.default=V}));
|
||
;/*!node_modules/amis/lib/renderers/Form/TransferPicker.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/TransferPicker",(function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/TransferPicker"),l=e("node_modules/tslib/tslib"),r=e("node_modules/amis-core/lib/index");e("node_modules/react/index");var s=e("node_modules/amis/lib/renderers/Form/Transfer"),d=e("node_modules/amis/lib/renderers/Form/StaticHoc"),u=e("node_modules/lodash/pick");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=p(a),m=p(i),v=p(u),h=e("node_modules/react/index"),f=(h.default||h).createElement;(h.default||h).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.dispatchEvent=function(e){var t=this.props,o=t.dispatchEvent,n=t.value;o(e,r.resolveEventData(this.props,{value:n}))},t.prototype.onItemClick=function(e){return l.__awaiter(this,void 0,void 0,(function(){var t;return l.__generator(this,(function(o){switch(o.label){case 0:return[4,(0,this.props.dispatchEvent)("itemClick",r.resolveEventData(this.props,{item:e}))];case 1:return null==(t=o.sent())||t.prevented,[2]}}))}))},t.prototype.doAction=function(e){var t,o,n,a=this.props,i=a.resetValue,l=a.onChange,s=a.formStore,d=a.store,u=a.name;switch(e.actionType){case"clear":null==l||l("");break;case"reset":null==l||l(null!==(n=null!==(o=r.getVariable(null!==(t=null==s?void 0:s.pristine)&&void 0!==t?t:null==d?void 0:d.pristine,u))&&void 0!==o?o:i)&&void 0!==n?n:"")}},t.prototype.render=function(){var e,t=this,o=this.props,n=o.className;o.style;var a=o.classnames,i=o.selectedOptions,s=o.sortable,d=o.loading,u=o.searchable,p=o.searchResultMode,h=o.showArrow,_=o.deferLoad,g=o.disabled,b=o.selectTitle,y=o.resultTitle,C=o.pickerSize,T=o.columns,k=o.leftMode,P=o.selectMode,F=o.borderMode,O=o.itemHeight,I=o.virtualThreshold,M=o.loadingConfig,w=o.labelField,x=void 0===w?"label":w,E=o.valueField,N=void 0===E?"value":E,S=o.deferField,R=void 0===S?"defer":S,A=o.menuTpl,B=o.valueTpl,D=o.mobileUI,V=o.env,j=o.maxTagCount,H=o.overflowTagPopover,z=o.pagination,L=o.formItem,U=o.data,q=o.popOverContainer,G=o.placeholder,J=o.onlyChildren,K=o.autoCheckChildren,Q=void 0===K||K,W=o.initiallyOpen,X=void 0===W||W,Y=this.props,Z=Y.options,$=Y.leftOptions,ee=Y.leftDefaultValue;return"associated"===P&&Z&&Z.length&&Z[0].leftOptions&&Array.isArray(Z[0].children)&&($=Z[0].leftOptions,ee=null!==(e=Z[0].leftDefaultValue)&&void 0!==e?e:ee,Z=Z[0].children),f("div",{className:a("TransferControl",n)},f(m.default,{placeholder:G,borderMode:F,selectMode:P,onlyChildren:J,value:i,disabled:g,options:Z,onItemClick:this.onItemClick,onChange:this.handleChange,option2value:this.option2value,sortable:s,searchResultMode:p,onSearch:u?this.handleSearch:void 0,showArrow:h,onDeferLoad:_,selectTitle:b,resultTitle:y,size:C,columns:T,leftMode:k,leftOptions:$,optionItemRender:A?this.optionItemRender:void 0,resultItemRender:B?this.resultItemRender:void 0,onFocus:function(){return t.dispatchEvent("focus")},onBlur:function(){return t.dispatchEvent("blur")},labelField:x,valueField:N,deferField:R,itemHeight:r.toNumber(O)>0?r.toNumber(O):void 0,virtualThreshold:I,mobileUI:D,popOverContainer:null==V?void 0:V.getModalContainer,maxTagCount:j,overflowTagPopover:H,pagination:l.__assign(l.__assign({},v.default(z,["layout","perPageAvailable","popOverContainerSelector"])),{className:null==z?void 0:z.className,enable:(z&&void 0!==z.enable?!!("string"==typeof z.enable?r.evalExpression(z.enable,U):z.enable):!!(null==L?void 0:L.enableSourcePagination))&&(!P||"list"===P||"table"===P)&&Z.length>0,maxButtons:Number.isInteger(null==z?void 0:z.maxButtons)?null==z?void 0:z.maxButtons:5,page:null==L?void 0:L.sourcePageNum,perPage:null==L?void 0:L.sourcePerPageNum,total:null==L?void 0:L.sourceTotalNum,popOverContainer:null!=q?q:null==V?void 0:V.getModalContainer}),onPageChange:this.handlePageChange,autoCheckChildren:Q,initiallyOpen:X}),f(c.default,{loadingConfig:M,overlay:!0,key:"info",show:d}))},l.__decorate([r.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[String]),l.__metadata("design:returntype",void 0)],t.prototype,"dispatchEvent",null),l.__decorate([r.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[Object]),l.__metadata("design:returntype",Promise)],t.prototype,"onItemClick",null),l.__decorate([d.supportStatic(),l.__metadata("design:type",Function),l.__metadata("design:paramtypes",[]),l.__metadata("design:returntype",void 0)],t.prototype,"render",null),t=l.__decorate([r.OptionsControl({type:"transfer-picker"})],t)}(s.BaseTransferRenderer);t.TransferPickerRenderer=_}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputTable.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputTable",(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Icon"),s=e("node_modules/amis-ui/lib/components/Button"),r=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),d=e("node_modules/lodash/omit"),u=e("node_modules/lodash/find"),c=e("node_modules/lodash/debounce"),p=e("node_modules/moment/moment");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(a),f=h(s),v=h(o),_=h(d),b=h(u),g=h(c),y=h(p),I=e("node_modules/react/index"),w=(I.default||I).createElement;(I.default||I).Fragment;var x="__isPlaceholder",C=function(e){function t(t){var n=e.call(this,t)||this;n.entityId=1,n.subForms={},n.subFormItems={},n.rowPrinstine=[],n.editting={},n.toDispose=[],n.lazyEmitValue=g.default(n.emitValue.bind(n),50,{trailing:!0,leading:!1}),n.emittedValue=null;var i=t.addHook,a=Array.isArray(t.value)?t.value.concat():[];return n.state=r.__assign({columns:n.buildColumns(t),editIndex:"",items:a},n.transformState(a)),n.entries=new l.SimpleMap,n.buildItemProps=n.buildItemProps.bind(n),n.confirmEdit=n.confirmEdit.bind(n),n.cancelEdit=n.cancelEdit.bind(n),n.handleSaveTableOrder=n.handleSaveTableOrder.bind(n),n.handleTableSave=n.handleTableSave.bind(n),n.handleRadioChange=n.handleRadioChange.bind(n),n.getEntryId=n.getEntryId.bind(n),n.subFormRef=n.subFormRef.bind(n),n.subFormItemRef=n.subFormItemRef.bind(n),n.handlePageChange=n.handlePageChange.bind(n),n.handleTableQuery=n.handleTableQuery.bind(n),n.emitValue=n.emitValue.bind(n),n.tableRef=n.tableRef.bind(n),n.flush=n.flush.bind(n),i&&n.toDispose.push(i(n.flush,"flush")),n}return r.__extends(t,e),t.prototype.componentDidUpdate=function(e,t){var n=this.props,i=null;if(e.disabled!==n.disabled||e.static!==n.static||n.$schema.disabled!==e.$schema.disabled||n.$schema.static!==e.$schema.static){var a=this.state.items.filter((function(e){return!e.hasOwnProperty(x)}));i=r.__assign(r.__assign({},i),{items:a,filteredItems:this.transformState(a),editIndex:"",columns:this.buildColumns(n)})}if(n.columns!==e.columns&&(i=r.__assign(r.__assign({},i),{columns:this.buildColumns(n)})),n.value!==e.value&&n.value!==this.emittedValue){a=Array.isArray(n.value)?n.value.concat():[];i=r.__assign(r.__assign(r.__assign(r.__assign({},i),{items:a}),this.transformState(a)),{editIndex:""})}i&&this.setState(i)},t.prototype.componentWillUnmount=function(){this.entries.dispose(),this.lazyEmitValue.cancel(),this.toDispose.forEach((function(e){return e()})),this.toDispose=[]},t.prototype.transformState=function(e,t,n){var i=this.props,a=i.perPage,s=i.matchFunc,o=r.__assign(r.__assign({},this.state),t),d=o.query,u=o.page,c=null!=d?d:{},p=c.orderBy,h=c.orderDir,m=r.__rest(c,["orderBy","orderDir"]);Object.keys(m).length&&(e=l.applyFilters(e,{query:m,columns:this.state.columns,matchFunc:"string"==typeof s&&s?l.str2function(s,"items","itemsRaw","options"):"function"==typeof s?s:void 0})),p&&(e=l.sortArray(e.concat(),p,"string"==typeof h&&/desc/i.test(h)?-1:1));var f=e.length;if(u=Math.min(null!=u?u:1,"number"==typeof a?Math.max(1,Math.ceil(f/a)):1),n){var v=e.indexOf(n);~v&&(u=Math.ceil((v+1)/a))}return"number"==typeof a&&a&&e.length>a&&(e=e.slice((u-1)*a,u*a)),{filteredItems:e,page:u,total:f}},t.prototype.flush=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:return e=[],Object.keys(this.subForms).forEach((function(t){return n.subForms[t]&&e.push(n.subForms[t])})),[4,Promise.all(e.map((function(e){return e.flush()})))];case 1:return i.sent(),t=[],Object.keys(this.subFormItems).forEach((function(e){return n.subFormItems[e]&&t.push(n.subFormItems[e])})),[4,Promise.all(t.map((function(e){var t,n;return null===(n=(t=e.props).onFlushChange)||void 0===n?void 0:n.call(t)})))];case 2:return i.sent(),[4,this.lazyEmitValue.flush()];case 3:return i.sent(),[2]}}))}))},t.prototype.resolveVariableProps=function(e,t){var n={minLength:0,maxLength:1/0},i=e[t];if(!i)return n[t];if("string"==typeof i)if(l.isPureVariable(i)){var a=l.resolveVariableAndFilter(i,e.data,"| raw");i="number"==typeof a&&a>=0?a:n[t]}else{var s=parseInt(i,10);i=isNaN(s)?n[t]:s}return i},t.prototype.subFormRef=function(e,t,n){this.subForms["".concat(t,"-").concat(n)]=e},t.prototype.subFormItemRef=function(e,t,n){this.subFormItems["".concat(t,"-").concat(n)]=e},t.prototype.validate=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n,i,a,s,o,d,u,c,p,h,m=this;return r.__generator(this,(function(r){switch(r.label){case 0:return e=this.props,t=e.value,n=e.translate,i=e.columns,a=this.resolveVariableProps(this.props,"minLength"),s=this.resolveVariableProps(this.props,"maxLength"),this.state.editIndex?[2,n("Table.editing")]:a&&(!Array.isArray(t)||t.length<a)?[2,n("Combo.minLength",{minLength:a})]:[3,1];case 1:return s&&Array.isArray(t)&&t.length>s?[2,n("Combo.maxLength",{maxLength:s})]:[3,2];case 2:return o=[],Object.keys(this.subForms).forEach((function(e){return m.subForms[e]&&o.push(m.subForms[e])})),o.length?[4,Promise.all(o.map((function(e){return e.validate()})))]:[3,4];case 3:if(d=r.sent(),u=~d.indexOf(!1)?n("Form.validateFailed"):"",c="",!u&&Array.isArray(i)&&Array.isArray(t)&&i.some((function(e){if(e.unique&&e.name){var n=[];return t.some((function(t){var i=l.getVariable(t,e.name);return~n.indexOf(i)?(c="".concat(e.label||e.name),!0):(n.push(i),!1)}))}return!1}))&&(u=n("InputTable.uniqueError",{label:c})),u)return[2,u];r.label=4;case 4:return p=[],Object.keys(this.subFormItems).forEach((function(e){return m.subFormItems[e]&&p.push(m.subFormItems[e])})),[4,Promise.all(p.map((function(e){return e.props.onValidate()})))];case 5:return h=r.sent(),[2,~h.indexOf(!1)?n("Form.validateFailed"):""]}}))}))},t.prototype.emitValue=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i;return r.__generator(this,(function(a){switch(a.label){case 0:return t=null!=e?e:this.state.items.filter((function(e){return!e.hasOwnProperty(x)})),n=this.props.onChange,[4,this.dispatchEvent("change")];case 1:return(i=a.sent())||(this.emittedValue=t,null==n||n(t)),[2,i]}}))}))},t.prototype.doAction=function(e,t){for(var n,i,a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];return r.__awaiter(this,void 0,void 0,(function(){var s,o,d,u,c,p,h,m,f,v,_,g,y,I,w,C,T,A=this;return r.__generator(this,(function(P){switch(P.label){case 0:return s=this.props,o=s.onAction,d=s.valueField,u=s.env,c=s.needConfirm,p=s.addable,h=s.addApi,m=s.translate,f=s.onChange,"add"!==(v=e.actionType)?[3,6]:!1===p?[2]:(_=this.state.items.concat(),h||e.payload?(g=null,l.isEffectiveApi(h,t)?[4,u.fetcher(h,t)]:[3,2]):[3,4]);case 1:return(y=P.sent())&&!y.ok?(!(null==h?void 0:h.silent)&&u.notify("error",null!==(i=null===(n=null==h?void 0:h.messages)||void 0===n?void 0:n.failed)&&void 0!==i?i:y.msg||m("fetchFailed")),[2]):(y&&y.ok&&(g=y.data),[3,3]);case 2:g=l.dataMapping(e.payload,t),P.label=3;case 3:return(g=Array.isArray(g)?g:[g]).forEach((function(e){d&&b.default(_,(function(t){return t[d]==e[d]}))||(_.push(e),!1!==c&&Reflect.set(e,x,!0))})),this.setState(r.__assign({items:_},this.transformState(_)),(function(){1===g.length&&!1!==c?A.startEdit("".concat(_.length-1),!0):null==f||f(_)})),[2];case 4:return[2,this.addItem("".concat(_.length-1),!1)];case 5:return[3,7];case 6:if("remove"===v||"delete"===v)return d?e.payload?(I=this.state.items.concat(),w=l.dataMapping(e.payload,t),(w=Array.isArray(w)?w:[w]).forEach((function(e){var t=l.findTreeIndex(I,(function(t){return t[d]==e[d]}));(null==t?void 0:t.length)&&(I=l.spliceTree(I,t,1))})),this.setState(r.__assign({items:I},this.transformState(I)),(function(){null==f||f(I)})),[2]):[2,u.alert(m("Table.playload"))]:[2,u.alert(m("Table.valueField"))];"initDrag"===v?(C=this.table).doAction.apply(C,r.__spreadArray([e,t],r.__read(a),!1)):"cancelDrag"===v&&(T=this.table).doAction.apply(T,r.__spreadArray([e,t],r.__read(a),!1)),P.label=7;case 7:return[2,o&&o.apply(void 0,r.__spreadArray([e,t],r.__read(a),!1))]}}))}))},t.prototype.copyItem=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i,a,s,o,d,u,c,p,h,m,f,v,_,b,g=this;return r.__generator(this,(function(y){return t=this.props,n=t.needConfirm,i=t.data,a=t.copyData,s=void 0===a?{"&":"$$"}:a,o=this.state.items.concat(),d=e.split(".").map((function(e){return parseInt(e,10)})),(u=d.concat())[u.length-1]+=1,c=o,p=l.getTree(o,d),h=l.dataMapping(s,l.createObject(i,p)),o=!1===n?l.spliceTree(o,u,0,h):l.spliceTree(o,u,0,r.__assign(r.__assign({},h),((b={})[x]=!0,b))),this.reUseRowId(o,c,u),m=o[u[0]],(f=r.__assign(r.__assign({},this.transformState(o)),{items:o})).filteredItems.includes(m)||(v=o[d[0]],_=f.filteredItems.findIndex((function(e){return e===v})),f.filteredItems.splice(_+1,0,m)),this.setState(f,(function(){return r.__awaiter(g,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return[4,this.dispatchEvent("add",{index:u[u.length-1],indexPath:u.join("."),item:h})];case 1:return e.sent()||(!1===n?this.emitValue():this.startEdit(u.join("."),!0)),[2]}}))}))})),[2]}))}))},t.prototype.addItem=function(e,t,n){return void 0===t&&(t=!0),r.__awaiter(this,void 0,void 0,(function(){var i,a,s,o,d,u,c,p,h,m,f,v,_,b,g,I=this;return r.__generator(this,(function(w){return e=e||"".concat(this.state.items.length-1),i=this.props,a=i.needConfirm,s=i.scaffold,o=i.columns,d=i.data,i.perPage,u=this.state.items.concat(),(g={})[x]=!0,c=g,Array.isArray(o)&&o.forEach((function(e){if(void 0!==e.value&&"string"==typeof e.name)if(!("type"in e)||"input-date"!==e.type&&"input-datetime"!==e.type&&"input-time"!==e.type&&"input-month"!==e.type&&"input-quarter"!==e.type&&"input-year"!==e.type)l.isExpression(e.value)||l.setVariable(c,e.name,e.value);else if("string"!=typeof e.value||""!==e.value.trim()){var t=l.filterDate(e.value,d,e.format||"X");l.setVariable(c,e.name,(e.utc?y.default.utc(t):t).format(e.format||"X"))}})),c=r.__assign(r.__assign({},c),s),!1===a&&Reflect.deleteProperty(c,x),p=e.split(".").map((function(e){return parseInt(e,10)})),(h=p.concat())[h.length-1]+=1,m=u,u=l.spliceTree(u,h,0,c),this.reUseRowId(u,m,h),f=u[h[0]],(v=r.__assign(r.__assign({items:u},this.transformState(u,void 0,f)),!1===a?{}:{editIndex:h.join("."),isCreateMode:!0,columns:this.buildColumns(this.props,!0,"".concat(e))})).filteredItems.includes(f)||(_=u[p[0]],b=v.filteredItems.findIndex((function(e){return e===_})),v.filteredItems.splice(b+1,0,f)),this.setState(v,(function(){return r.__awaiter(I,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return t?[4,this.dispatchEvent("add",{index:h[h.length-1],indexPath:h.join("."),item:c})]:[3,2];case 1:e.sent(),e.label=2;case 2:return!1===a&&this.emitValue(),null==n||n(),[2]}}))}))})),[2,!1]}))}))},t.prototype.subAddItem=function(e,t,n){return void 0===t&&(t=!0),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(i){return[2,this.addItem(e+".-1",t,(function(){null==n||n.setExpanded(!0)}))]}))}))},t.prototype.editItem=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i;return r.__generator(this,(function(a){switch(a.label){case 0:return t=this.state.items,n=e.split(".").map((function(e){return parseInt(e,10)})),i=l.getTree(t,n),[4,this.dispatchEvent("edit",{index:n[n.length-1],indexPath:n.join("."),item:i})];case 1:return!a.sent()&&this.startEdit(e,!0),[2]}}))}))},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){var n,i,a;return r.__generator(this,(function(s){switch(s.label){case 0:return n=this.props.dispatchEvent,i=this.state.items,[4,n(e,l.resolveEventData(this.props,r.__assign({value:r.__spreadArray([],r.__read(i),!1)},t)))];case 1:return[2,!!(null==(a=s.sent())?void 0:a.prevented)]}}))}))},t.prototype.startEdit=function(e,t){void 0===t&&(t=!1),this.setState({editIndex:e,isCreateMode:t,columns:this.buildColumns(this.props,t,e)})},t.prototype.confirmEdit=function(){var e,t,n;return r.__awaiter(this,void 0,void 0,(function(){var i,a,s,o,d,u,c,p,h,m,f,v,_,b,g,y,I,w,C=this;return r.__generator(this,(function(T){switch(T.label){case 0:return i=this.props,a=i.addApi,s=i.updateApi,o=i.data,d=i.env,u=i.translate,c=[],Object.keys(this.subForms).forEach((function(e){return C.subForms[e]&&c.push(C.subForms[e])})),c.forEach((function(e){return e.flush()})),p=[],Object.keys(this.subFormItems).forEach((function(e){return C.subFormItems[e]&&p.push(C.subFormItems[e])})),p.forEach((function(e){var t,n;return null===(n=(t=e.props).onFlushChange)||void 0===n?void 0:n.call(t)})),h=c,[4,Promise.all(h.map((function(e){return e.validate()})).concat(p.map((function(e){return e.props.onValidate()}))))];case 1:return~T.sent().indexOf(!1)?[2]:(m=this.state.items.concat(),f=this.state.editIndex.split(".").map((function(e){return parseInt(e,10)})),v=r.__assign({},l.getTree(m,f)),_=v.hasOwnProperty(x),b=_?"addConfirm":"editConfirm",[4,this.dispatchEvent(b,{index:f[f.length-1],indexPath:f.join("."),item:v})]);case 2:return T.sent()?[2]:(g=null,y=void 0,_&&l.isEffectiveApi(a,l.createObject(o,v))?[4,d.fetcher(a,l.createObject(o,v))]:[3,4]);case 3:return g=T.sent(),y=null===(e=null==a?void 0:a.messages)||void 0===e?void 0:e.failed,[3,6];case 4:return l.isEffectiveApi(s,l.createObject(o,v))?[4,d.fetcher(s,l.createObject(o,v))]:[3,6];case 5:g=T.sent(),y=null===(t=null==s?void 0:s.messages)||void 0===t?void 0:t.failed,T.label=6;case 6:return g&&!g.ok?(!(null===(n=_?a:s)||void 0===n?void 0:n.silent)&&d.notify("error",null!=y?y:g.msg||u("saveFailed")),I=_?"addFail":"editFail",this.dispatchEvent(I,{index:f[f.length-1],indexPath:f.join("."),item:v,error:g}),[2]):(g&&g.ok&&(v=r.__assign(r.__assign({},(_?a:s).replaceData?{}:v),g.data)),Reflect.deleteProperty(v,x),w=m,m=l.spliceTree(m,f,1,v),this.reUseRowId(m,w,f),this.setState(r.__assign(r.__assign({editIndex:"",items:m},this.transformState(m)),{columns:this.buildColumns(this.props)}),(function(){return r.__awaiter(C,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return[4,this.emitValue()];case 1:return t.sent()||(e=_?"addSuccess":"editSuccess",this.dispatchEvent(e,{index:f[f.length-1],indexPath:f.join("."),item:v})),[2]}}))}))})),[2])}}))}))},t.prototype.cancelEdit=function(){var e=this.state.items.concat(),t=this.state.lastModifiedRow,n=this.state.editIndex.split(".").map((function(e){return parseInt(e,10)})),i=r.__assign({},l.getTree(e,n)),a=e;i.hasOwnProperty(x)?e=l.spliceTree(e,n,1):t&&~(null==t?void 0:t.index)&&l.isObject(null==t?void 0:t.data)&&(e=l.spliceTree(e,n,1,r.__assign(r.__assign({},i),t.data))),this.reUseRowId(e,a,n),this.setState(r.__assign(r.__assign({editIndex:"",items:e},this.transformState(e)),{columns:this.buildColumns(this.props),lastModifiedRow:void 0}),this.emitValue)},t.prototype.removeItem=function(e){var t,n;return r.__awaiter(this,void 0,void 0,(function(){var i,a,s,o,d,u,c,p,h,m,f,v,_,b=this;return r.__generator(this,(function(g){switch(g.label){case 0:return i=this.props,a=i.value,i.onChange,s=i.deleteApi,o=i.deleteConfirmText,d=i.env,u=i.data,c=i.translate,p=Array.isArray(a)?a.concat():[],h=e.split(".").map((function(e){return parseInt(e,10)})),(m=l.getTree(p,h))?[4,this.dispatchEvent("delete",{index:h[h.length-1],indexPath:h.join("."),item:m})]:[2];case 1:return g.sent()?[2]:(f=l.createObject(u,m),l.isEffectiveApi(s,f)?[4,d.confirm(o?l.filter(o,f):c("deleteConfirm"))]:[3,4]);case 2:return g.sent()?[4,d.fetcher(s,f)]:[2];case 3:if(!(v=g.sent()).ok)return!(null==s?void 0:s.silent)&&d.notify("error",null!==(n=null===(t=null==s?void 0:s.messages)||void 0===t?void 0:t.failed)&&void 0!==n?n:c("deleteFailed")),this.dispatchEvent("deleteFail",{index:h[h.length-1],indexPath:h.join("."),item:m,error:v}),[2];g.label=4;case 4:return this.removeEntry(m),_=p,p=l.spliceTree(p,h,1),this.reUseRowId(p,_,h),this.setState(r.__assign({items:p},this.transformState(p)),(function(){return r.__awaiter(b,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return[4,this.emitValue(p)];case 1:return e.sent()||this.dispatchEvent("deleteSuccess",{value:p,index:h[h.length-1],indexPath:h.join("."),item:m}),[2]}}))}))})),[2]}}))}))},t.prototype.convertToRawPath=function(e,t){var n=r.__assign(r.__assign({},this.state),t),i=n.filteredItems,a=n.items,s=e.split(".").map((function(e){return parseInt(e,10)})),o=i[s[0]];if(s[0]=a.findIndex((function(e){return e===o})),-1===s[0])throw new Error("row not found");return s.join(".")},t.prototype.reUseRowId=function(e,t,n){for(var i=t,a=e,s=0,r=n.length;s<r;s++){var o=n[s];if(!(null==i?void 0:i[o])||!(null==a?void 0:a[o]))break;this.entries.set(a[o],this.entries.get(i[o])||this.entityId++),this.entries.delete(i[o]),a=a[o].children,i=i[o].children}},t.prototype.buildItemProps=function(e,t){var n={},i=this.resolveVariableProps(this.props,"minLength"),a=this.resolveVariableProps(this.props,"maxLength");return n.inputTableCanAddItem=!a||a>this.state.items.length,n.inputTableCanRemoveItem=!i||i<this.state.items.length,!1===this.props.needConfirm?(n.quickEditEnabled=!0,n):this.props.editable||this.props.addable||this.state.isCreateMode?(n.quickEditEnabled=this.state.editIndex===this.convertToRawPath(e.path),n):n},t.prototype.buildColumns=function(e,t,n){var i=this;void 0===t&&(t=!1);var a=this.props,s=a.env,o=a.enableStaticTransform,d=a.mobileUI,u=a.testIdBuilder,c=Array.isArray(e.columns)?e.columns.concat():[],p=this.props.classPrefix,h=this.props.translate,v=this.props.needConfirm,b=this.props.showIndex,g=this.props.static,y=this.props.disabled,I=[];if(!g&&e.addable&&!1!==e.showTableAddBtn&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath,r=t.inputTableCanAddItem;return i.state.editIndex&&!1!==v||!r?null:w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("Table.addRow"),tooltipContainer:e.popOverContainer||s.getModalContainer,disabled:y,onClick:i.addItem.bind(i,i.convertToRawPath(a),void 0,void 0),testIdBuilder:null==u?void 0:u.getChild("addRow-".concat(i.convertToRawPath(a)))},e.addBtnIcon?w(m.default,{cx:e.classnames,icon:e.addBtnIcon,className:"icon"}):null,e.addBtnLabel?w("span",null,e.addBtnLabel):null)}}),!g&&e.childrenAddable&&!1!==e.showTableAddBtn&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath,r=t.row;return i.state.editIndex&&!1!==v?null:w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("Table.subAddRow"),tooltipContainer:e.popOverContainer||s.getModalContainer,disabled:y,onClick:i.subAddItem.bind(i,i.convertToRawPath(a),void 0,r),testIdBuilder:null==u?void 0:u.getChild("subAddRow-".concat(i.convertToRawPath(a)))},e.subAddBtnIcon?w(m.default,{cx:e.classnames,icon:e.subAddBtnIcon,className:"icon"}):null,e.subAddBtnLabel?w("span",null,e.subAddBtnLabel):null)}}),!g&&e.copyable&&!1!==e.showCopyBtn&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath;return i.state.editIndex&&!1!==v?null:w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("Table.copyRow"),tooltipContainer:e.popOverContainer||s.getModalContainer,disabled:y,onClick:i.copyItem.bind(i,i.convertToRawPath(a),void 0),testIdBuilder:null==u?void 0:u.getChild("copyRow-".concat(i.convertToRawPath(a)))},e.copyBtnIcon?w(m.default,{cx:e.classnames,icon:e.copyBtnIcon,className:"icon"}):null,e.copyBtnLabel?w("span",null,e.copyBtnLabel):null)}}),!1===e.needConfirm?c=c.map((function(e){var t=e.quickEdit;return!1===t?_.default(e,["quickEdit"]):r.__assign(r.__assign({},e),"operation"===e.type?{}:{quickEdit:r.__assign(r.__assign(r.__assign({},i.columnToQuickEdit(e)),t),{visibleOn:"",hiddenOn:"",visible:!0,hidden:!1,saveImmediately:!0,mode:"inline",disabled:y,static:g||e.static})})})):!0!==g&&(e.addable||e.editable||t)?(c=c.map((function(a,s){var d=!t&&a.hasOwnProperty("quickEditOnUpdate")?a.quickEditOnUpdate:a.quickEdit,u=l.getRendererByName(null==a?void 0:a.type);return r.__assign(r.__assign({},!1===d?_.default(a,["quickEdit"]):r.__assign(r.__assign({},a),{quickEdit:r.__assign(r.__assign(r.__assign({},i.columnToQuickEdit(a)),d),{visibleOn:"",hiddenOn:"",visible:!0,hidden:!1,isQuickEditFormMode:!!(null==u?void 0:u.isFormItem),saveImmediately:!0,mode:"inline",disabled:y})})),o&&!1!==e.needConfirm?{staticOn:"".concat(!t," || data.index !== '").concat(n,"'")}:{})})),!g&&e.editable&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath,r=t.data;return i.state.editIndex||r&&r.hasOwnProperty(x)?null:w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("Table.editRow"),tooltipContainer:e.popOverContainer||s.getModalContainer,disabled:y,onClick:function(){return i.editItem(i.convertToRawPath(a))},testIdBuilder:null==u?void 0:u.getChild("editRow-".concat(i.convertToRawPath(a)))},void 0!==e.updateBtnIcon?e.updateBtnIcon?w(m.default,{cx:e.classnames,icon:e.updateBtnIcon,className:"icon"}):null:e.editBtnIcon?w(m.default,{cx:e.classnames,icon:e.editBtnIcon,className:"icon"}):null,e.updateBtnLabel||e.editBtnLabel?w("span",null,e.updateBtnLabel||e.editBtnLabel):null)}}),!g&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath;return i.state.editIndex===i.convertToRawPath(a)?w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("save"),tooltipContainer:e.popOverContainer||s.getModalContainer,onClick:i.confirmEdit,testIdBuilder:null==u?void 0:u.getChild("confirmRow-".concat(i.convertToRawPath(a)))},e.confirmBtnIcon?w(m.default,{cx:e.classnames,icon:e.confirmBtnIcon,className:"icon"}):null,e.confirmBtnLabel?w("span",null,e.confirmBtnLabel):null):null}}),!g&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath;return i.state.editIndex===i.convertToRawPath(a)?w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("cancel"),tooltipContainer:e.popOverContainer||s.getModalContainer,onClick:i.cancelEdit,testIdBuilder:null==u?void 0:u.getChild("cancelRow-".concat(i.convertToRawPath(a)))},e.cancelBtnIcon?w(m.default,{cx:e.classnames,icon:e.cancelBtnIcon,className:"icon"}):null,e.cancelBtnLabel?w("span",null,e.cancelBtnLabel):null):null}})):c=c.map((function(e){var t=l.getRendererByName(null==e?void 0:e.type);return(null==t?void 0:t.isFormItem)?r.__assign(r.__assign({},e),{quickEdit:r.__assign(r.__assign({},e),{visibleOn:"",hiddenOn:"",visible:!0,hidden:!1,isFormMode:!0})}):e})),!g&&e.removable&&I.push({children:function(t){var n=t.key,a=t.rowIndexPath,r=t.data,o=t.inputTableCanRemoveItem;return(i.state.editIndex||r&&r.hasOwnProperty(x))&&!1!==v||!o?null:w(f.default,{classPrefix:p,size:"sm",key:n,level:"link",tooltip:h("Table.deleteRow"),tooltipContainer:e.popOverContainer||s.getModalContainer,disabled:y,onClick:i.removeItem.bind(i,i.convertToRawPath(a)),testIdBuilder:null==u?void 0:u.getChild("delRow-".concat(i.convertToRawPath(a)))},e.deleteBtnIcon?w(m.default,{cx:e.classnames,icon:e.deleteBtnIcon,className:"icon"}):null,e.deleteBtnLabel?w("span",null,e.deleteBtnLabel):null)}}),I.length){var C=c.find((function(e){return"operation"===e.type}));C||(C={type:"operation",buttons:[],label:h("Table.operation"),className:"v-middle nowrap",fixed:d?"":"right",width:150,innerClassName:"m-n"},c.push(C)),C.buttons=Array.isArray(C.buttons)?C.buttons.concat():[],C.buttons.unshift.apply(C.buttons,I),C.hasOwnProperty("quickEdit")&&delete C.quickEdit}return b&&c.unshift({label:h("Table.index"),width:50,children:function(e){var t=i.convertToRawPath(e.rowIndexPath).split(".").map((function(e){return parseInt(e,10)+1}));return w("td",{className:e.className},e.cellPrefix,w("span",null,t.join(".")),e.cellAffix)}}),c},t.prototype.columnToQuickEdit=function(e){var t;return(null===(t=l.getRendererByName(null==e?void 0:e.type))||void 0===t?void 0:t.isFormItem)||~["group"].indexOf(e.type)?r.__assign(r.__assign({},e),{label:""}):{type:"input-text"}},t.prototype.handleTableSave=function(e,t,n){var i,a=this;this.setState((function(t,s){var o={},d=t.editIndex,u=t.lastModifiedRow;if(d){var c=d.split(".").map((function(e){return parseInt(e,10)})),p=t.items.concat(),h=l.getTree(p,c);if(!h)return o;var m=r.__assign({},e),f=p;return p=l.spliceTree(p,c,1,m),a.reUseRowId(p,f,c),Object.assign(o,r.__assign({items:p,filteredItems:t.filteredItems.map((function(e){return e===h?m:e}))},(null==u?void 0:u.index)===d?{}:{lastModifiedRow:h.hasOwnProperty(x)?void 0:{index:d,data:r.__assign({},h)}})),o}var v=t.items.concat();if(Array.isArray(e))n.forEach((function(n,i){var s=(n=a.convertToRawPath(n,t)).split(".").map((function(e){return parseInt(e,10)})),o=r.__assign({},l.getTree(e,s));v=l.spliceTree(v,s,1,o)}));else{c=(n=a.convertToRawPath(n,t)).split(".").map((function(e){return parseInt(e,10)}));var _=r.__assign({},e);f=v;v=l.spliceTree(v,c,1,_),a.reUseRowId(v,f,c)}return Object.assign(o,r.__assign({items:v},a.transformState(v,t))),i=a.lazyEmitValue,o}),(function(){i&&i()}))},t.prototype.handleRadioChange=function(e,t){var n,i=this,a=t.name,s=t.row,o=t.trueValue,d=void 0===o||o,u=t.falseValue,c=void 0!==u&&u;return this.setState((function(e,t){var o=s.path,u=l.mapTree(e.items,(function(e,t,n,i,s){var l;return r.__assign(r.__assign({},e),((l={})[a]=o===s.join(".")?d:c,l))}));return n=e.editIndex==s.path?void 0:i.lazyEmitValue,r.__assign({items:u},i.transformState(u))}),(function(){null==n||n()})),!1},t.prototype.handleSaveTableOrder=function(e,t){(0,this.props.onChange)(t.map((function(e){return r.__assign({},e)})))},t.prototype.handlePageChange=function(e){this.setState(r.__assign({},this.transformState(this.state.items,{page:e})))},t.prototype.handleTableQuery=function(e){e=r.__assign(r.__assign({},this.state.query),e),this.setState(r.__assign({query:e},this.transformState(this.state.items,{query:e})))},t.prototype.handlePristineChange=function(e,t){var n=this,i=this.props.needConfirm,a=t.split(".").map((function(e){return parseInt(e,10)}));this.setState((function(t){var i=t.items.concat(),s=l.getTree(i,a),o=r.__assign(r.__assign({},s),e),d=i;return i=l.spliceTree(i,a,1,o),n.reUseRowId(i,d,a),r.__assign({items:i},n.transformState(i))}),(function(){!1===i&&n.emitValue()}))},t.prototype.removeEntry=function(e){this.entries.has(e)&&this.entries.delete(e)},t.prototype.getEntryId=function(e){return this.entries.has(e)||this.entries.set(e,this.entityId++),String(this.entries.get(e))},t.prototype.tableRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.table=e},t.prototype.computedAddBtnDisabled=function(){return this.props.disabled||!!this.state.editIndex},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style,t.value;var i=t.disabled,a=t.render,s=t.placeholder,o=t.draggable,l=t.addable,d=t.columnsTogglable,u=t.combineNum,c=t.combineFromIndex,p=t.translate,h=t.canAccessSuperData,m=t.expandConfig,f=t.affixRow,v=t.prefixRow,_=t.formInited,b=t.perPage,g=t.classnames,y=t.rowClassName,I=t.rowClassNameExpr,x=t.affixHeader,C=void 0!==x&&x,T=t.autoFillHeight,A=void 0!==T&&T,P=t.tableContentClassName,E=t.static,R=t.showFooterAddBtn,B=t.footerAddBtn,F=t.toolbarClassName,S=t.onEvent,k=t.testIdBuilder,O=this.resolveVariableProps(this.props,"maxLength");if(!1===_)return null;var V=this.state.query,j=this.state.filteredItems,N="number"==typeof b,L=this.state.page||1,q=!E&&l&&!1!==R&&(!O||O>this.state.items.length);return w("div",{className:g("InputTable",n)},a("body",{type:"table",placeholder:p(s),columns:this.state.columns,affixHeader:C,prefixRow:v,affixRow:f,autoFillHeight:A,tableContentClassName:P,onEvent:S},{ref:this.tableRef,value:void 0,saveImmediately:!0,disabled:i,draggable:o&&!this.state.editIndex,items:j,getEntryId:this.getEntryId,reUseRow:"match",onSave:this.handleTableSave,onRadioChange:this.handleRadioChange,onSaveOrder:this.handleSaveTableOrder,buildItemProps:this.buildItemProps,quickEditFormRef:this.subFormRef,quickEditFormItemRef:this.subFormItemRef,columnsTogglable:d,combineNum:u,combineFromIndex:c,expandConfig:m,canAccessSuperData:h,rowClassName:y,rowClassNameExpr:I,onPristineChange:this.handlePristineChange,testIdBuilder:null==k?void 0:k.getChild("table"),onQuery:this.handleTableQuery,query:V,orderBy:null==V?void 0:V.orderBy,orderDir:null==V?void 0:V.orderDir}),q||N?w("div",{className:g("InputTable-toolbar",F)},q?a("button",r.__assign({type:"button",level:"primary",size:"sm",label:p("Table.add"),icon:"fa fa-plus",disabledTip:p("Table.addButtonDisabledTip")},B||{}),{disabled:this.computedAddBtnDisabled(),onClick:function(){return e.addItem()},testIdBuilder:null==k?void 0:k.getChild("add")}):null,N?a("pager",{type:"pagination"},{activePage:L,perPage:b,total:this.state.total,onPageChange:this.handlePageChange,className:"InputTable-pager",testIdBuilder:null==k?void 0:k.getChild("page"),disabled:!!this.state.editIndex}):null):null)},t.defaultProps={placeholder:"placeholder.empty",scaffold:{},addBtnIcon:"plus",subAddBtnIcon:"sub-plus",copyBtnIcon:"copy",editBtnIcon:"pencil",deleteBtnIcon:"minus",confirmBtnIcon:"check",cancelBtnIcon:"close",valueField:"",minLength:0,maxLength:1/0,showFooterAddBtn:!0,showTableAddBtn:!0},t.propsList=["onChange","name","columns","label","scaffold","showTableAddBtn","addable","removable","copyable","editable","addApi","updateApi","deleteApi","needConfirm","canAccessSuperData","formStore","footerActions","toolbarClassName"],r.__decorate([l.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object,String]),r.__metadata("design:returntype",void 0)],t.prototype,"handlePristineChange",null),t}(v.default.Component),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.setData=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function(){var t,a,s,o,d=this;return r.__generator(this,(function(u){switch(u.label){case 0:return this.state.items.length,void 0===n?[3,1]:(t=r.__spreadArray([],r.__read(this.state.items),!1),String(n).split(",").forEach((function(n){var i=n.split(".").map((function(e){return parseInt(e,10)}));t=l.spliceTree(t,i,1,e)})),this.setState(r.__assign({items:t},this.transformState(t)),(function(){d.emitValue()})),[3,4]);case 1:return void 0===i?[3,3]:(a=r.__spreadArray([],r.__read(this.state.items),!1),s=[],l.everyTree(a,(function(t,n,o,u,c){return s.unshift((function(){return r.__awaiter(d,void 0,void 0,(function(){return r.__generator(this,(function(s){switch(s.label){case 0:return[4,l.evalExpressionWithConditionBuilderAsync(i,t)];case 1:return s.sent()&&(a=l.spliceTree(a,r.__spreadArray(r.__spreadArray([],r.__read(c),!1),[n],!1),1,e)),[2]}}))}))})),!0})),[4,Promise.all(s.map((function(e){return e()})))]);case 2:return u.sent(),this.setState(r.__assign({items:a},this.transformState(a)),(function(){d.emitValue()})),[3,4];case 3:o=r.__spreadArray([],r.__read(e),!1),this.setState(r.__assign({items:o},this.transformState(o)),(function(){d.emitValue()})),u.label=4;case 4:return[2]}}))}))},t.prototype.doAction=function(t,n,i,a){var s,o,d,u,c,p,h;return void 0===i&&(i=!1),r.__awaiter(this,void 0,void 0,(function(){var m,f,v,_,g,y,I,w,x,C,T,A,P,E,R,B,F,S,k,O,V,j,N,L=this;return r.__generator(this,(function(q){switch(q.label){case 0:return m=this.props,f=m.valueField,v=m.env,_=m.needConfirm,m.addable,g=m.addApi,y=m.deleteApi,I=m.resetValue,w=m.translate,x=m.onChange,C=m.formStore,T=m.store,A=m.name,P=t.actionType,E=(null===(s=this.props.store)||void 0===s?void 0:s.data)||{},"addItem"!==P?[3,6]:(R=this.state.items.concat(),g||a?(B=null,l.isEffectiveApi(g,E)?[4,v.fetcher(g,E)]:[3,2]):[3,4]);case 1:return(V=q.sent())&&!V.ok?(!(null==g?void 0:g.silent)&&v.notify("error",null!==(d=null===(o=null==g?void 0:g.messages)||void 0===o?void 0:o.failed)&&void 0!==d?d:V.msg||w("fetchFailed")),[2]):(V&&V.ok&&(B=V.data),[3,3]);case 2:B=a.item,q.label=3;case 3:return B=(Array.isArray(B)?B:[B]).filter((function(e){return!f||!b.default(R,(function(t){return t[f]==e[f]}))})),F=[],"string"==typeof a.index&&/^\d+(\.\d+)*$/.test(a.index)?F=a.index.split(".").map((function(e){return parseInt(e,10)})):"number"==typeof a.index&&(F=[a.index]),F.length?R=l.spliceTree.apply(void 0,r.__spreadArray([R,F,0],r.__read(B),!1)):R.push.apply(R,r.__spreadArray([],r.__read(B),!1)),this.setState(r.__assign({items:R},this.transformState(R)),(function(){if(1===B.length&&!1!==_){var e=F.concat();e[e.length-1]+=1,L.startEdit(e.join("."),!0)}else null==x||x(R)})),[2];case 4:return[2,this.addItem("".concat(R.length-1),!1)];case 5:return[3,13];case 6:return"deleteItem"!==P?[3,12]:(S=r.__spreadArray([],r.__read(this.state.items),!1),k=[],void 0===(null==a?void 0:a.index)?[3,7]:(String(a.index).split(",").forEach((function(e){var t=e.split(".").map((function(e){return parseInt(e,10)}));k.push(l.getTree(S,t)),S=l.spliceTree(S,t,1)})),[3,9]));case 7:return void 0===(null==a?void 0:a.condition)?[3,9]:(O=[],l.everyTree(S,(function(e,t,n,i,s){return O.unshift((function(){return r.__awaiter(L,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return[4,l.evalExpressionWithConditionBuilderAsync(null==a?void 0:a.condition,e)];case 1:return n.sent()&&(k.push(e),S=l.spliceTree(S,r.__spreadArray(r.__spreadArray([],r.__read(s),!1),[t],!1),1)),[2]}}))}))})),!0})),[4,O.reduce((function(e,t){return e.then(t)}),Promise.resolve())]);case 8:q.sent(),q.label=9;case 9:return l.isEffectiveApi(y,l.createObject(E,{deletedItems:k}))?[4,v.fetcher(y,l.createObject(E,{deletedItems:k}))]:[3,11];case 10:if((V=q.sent())&&!V.ok)return!(null==y?void 0:y.silent)&&v.notify("error",null!==(c=null===(u=null==y?void 0:y.messages)||void 0===u?void 0:u.failed)&&void 0!==c?c:V.msg||w("fetchFailed")),[2];q.label=11;case 11:return this.setState(r.__assign({items:S},this.transformState(S)),(function(){null==x||x(S)})),[2];case 12:if("clear"===P)return this.setState({items:[]},(function(){null==x||x([])})),[2];if("reset"===P)return j=null!==(h=l.getVariable(null!==(p=null==C?void 0:C.pristine)&&void 0!==p?p:null==T?void 0:T.pristine,A))&&void 0!==h?h:I,N=Array.isArray(j)?j:[],this.setState(r.__assign({items:N},this.transformState(N)),(function(){null==x||x(N)})),[2];q.label=13;case 13:return[2,e.prototype.doAction.call(this,t,n,i,E)]}}))}))},t=r.__decorate([l.FormItem({type:"input-table"})],t)}(C);t.TableControlRenderer=T,t.default=C}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Picker.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Picker",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Icon"),i=e("node_modules/amis-ui/lib/components/TooltipWrapper"),s=e("node_modules/amis-ui/lib/components/Html"),r=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),d=e("node_modules/classnames/index"),c=e("node_modules/lodash/omit"),u=e("node_modules/lodash/find"),p=e("node_modules/lodash/isEqual"),m=e("node_modules/lodash/findIndex"),_=e("node_modules/lodash/merge"),h=e("node_modules/amis-core/lib/index"),v=e("node_modules/lodash/intersectionWith"),f=e("node_modules/amis/lib/renderers/Form/StaticHoc"),g=e("node_modules/mobx/lib/index");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=y(o),C=y(i),k=y(s),F=y(l),O=y(d),P=y(c),w=y(u),N=y(p),I=y(m),S=y(_),T=y(v),A=e("node_modules/react/index"),V=(A.default||A).createElement;(A.default||A).Fragment;var x=function(e){function t(t){var a=e.call(this,t)||this;a.state={isOpened:!1,schema:a.buildSchema(a.props),isFocused:!1},a.input=F.default.createRef(),a.toDispose=[],a.mounted=!1;var n=t.formInited,o=t.addHook,i=t.formItem,s=function(){return r.__awaiter(a,void 0,void 0,(function(){var e=this;return r.__generator(this,(function(t){switch(t.label){case 0:return[4,this.fetchOptions()];case 1:return t.sent(),this.mounted&&this.toDispose.push(g.reaction((function(){return JSON.stringify(null==i?void 0:i.tmpValue)}),(function(){return e.fetchOptions()}))),[2]}}))}))};return i&&a.toDispose.push(n||!o?i.addInitHook(s):o(s,"init")),a}return r.__extends(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentDidUpdate=function(e){var t,a=this.props;["multiple","source","pickerSchema"].some((function(t){return!N.default(e[t],a[t])}))?this.setState({schema:this.buildSchema(a)}):h.isApiOutdated(e.source,a.source,e.data,a.data)&&(null===(t=a.formItem)||void 0===t?void 0:t.inited)&&this.fetchOptions()},t.prototype.componentWillUnmount=function(){this.toDispose.forEach((function(e){return e()})),this.toDispose=[],this.mounted=!1},t.prototype.fetchOptions=function(){var e,t,a=this.props,n=a.value,o=a.formItem,i=a.valueField,s=a.labelField,r=a.source,l=a.data;if(r&&o&&(i||"value")!==(s||"label")&&(!(t=o.getSelectedOptions(n))||t.length&&t[0][i||"value"]===t[0][s||"label"])){var d=h.createObject(l,((e={value:n})[i||"value"]=n,e.op="loadOptions",e));if(h.isPureVariable(r))o.setOptions(h.resolveVariableAndFilter(r,l,"| raw"));else if(h.isEffectiveApi(r,d))return o.loadOptions(r,d,{autoAppend:!0})}},t.prototype.buildSchema=function(e){var t,a,n=h.isPureVariable(e.source);return r.__assign(r.__assign({checkOnItemClick:!0,listItem:{title:"${".concat(e.labelField||"label","|raw}")}},e.pickerSchema),{labelTpl:null!==(a=null===(t=e.pickerSchema)||void 0===t?void 0:t.labelTpl)&&void 0!==a?a:e.labelTpl,type:"crud",pickerMode:!0,syncLocation:!1,filterCanAccessSuperData:!1,api:n?null:e.source,source:n?e.source:null,keepItemSelectionOnPageChange:!0,valueField:e.valueField,labelField:e.labelField,bulkActions:e.multiple?e.pickerSchema.bulkActions:[]})},t.prototype.crudRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.crud=e},t.prototype.reload=function(){if(this.crud)this.crud.search();else{var e=this.props.reloadOptions;e&&e()}},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleModalConfirm=function(e,t,a,n){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(a){switch(a.label){case 0:return t=I.default(n,(function(e){return"crud"===e.props.type})),[4,this.handleChange(e[t].items)];case 1:return a.sent(),this.close(),[2]}}))}))},t.prototype.handleChange=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,a,n,o,i,s,l,d,c,u,p,m,_,v;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,a=t.joinValues,n=t.valueField,o=t.delimiter,i=t.extractValue,s=t.multiple,l=t.options,t.data,d=t.dispatchEvent,t.selectedOptions,c=t.setOptions,u=t.onChange,p=e,p=a?e.map((function(e){return e[n||"value"]})).join(o||","):i?s?e.map((function(e){return e[n||"value"]})):e[0]&&e[0][n||"value"]||"":s?e:e[0],m=[],e.forEach((function(e){w.default(l,(function(t){return e[n||"value"]==t[n||"value"]}))||m.push(e)})),m.length&&c(l.concat(m)),_=s?e:e[0],[4,d("change",h.resolveEventData(this.props,{value:p,option:_,selectedItems:_}))];case 1:return(null==(v=r.sent())?void 0:v.prevented)||u(p),[2]}}))}))},t.prototype.handleItemClick=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,a,n;return r.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,a=t.data,[4,(0,t.dispatchEvent)("itemClick",h.createObject(a,{item:e}))];case 1:return null==(n=o.sent())||n.prevented,[2]}}))}))},t.prototype.removeItem=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,a,n,o,i,s,l,d,c,u,p,m,_,v;return r.__generator(this,(function(f){switch(f.label){case 0:return t=this.props,a=t.selectedOptions,n=t.joinValues,o=t.extractValue,i=t.delimiter,s=t.valueField,l=t.onChange,d=t.multiple,c=t.dispatchEvent,u=a.concat(),p=r.__read(u.splice(e,1),1),m=p[0],_=u,_=n?u.map((function(e){return e[s||"value"]})).join(i||","):o?d?u.map((function(e){return e[s||"value"]})):u[0]&&u[0][s||"value"]||"":d?u:u[0],[4,c("change",h.resolveEventData(this.props,{value:_,option:m,selectedItems:m}))];case 1:return(null==(v=f.sent())?void 0:v.prevented)||l(_),[2]}}))}))},t.prototype.handleKeyDown=function(e){var t=this.props.selectedOptions;" "===e.key?(this.open(),e.preventDefault()):t.length&&"Backspace"==e.key&&this.removeItem(t.length-1)},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleClick=function(){this.input.current&&this.input.current.focus(),this.open()},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,a=e.resetValue;t(void 0!==a?a:"")},t.prototype.getOverflowConfig=function(){var e=this.props.overflowConfig;return S.default(t.defaultProps.overflowConfig,e)},t.prototype.handleSelect=function(e,t){var a=this.props,n=a.selectedOptions,o=a.valueField;if(Array.isArray(e)&&Array.isArray(t)&&(e.length||t.length)){var i=T.default(e,n,(function(e,t){var a=e[o||"value"],n=t[o||"value"];return a||n?a===n:N.default(P.default(e,"value"),P.default(t,"value"))}));i.length===e.length&&i.length===n.length||this.handleChange(e)}},t.prototype.renderTag=function(e,t){var a=this,n=this.props,o=n.classPrefix,i=n.classnames,s=n.labelField,l=n.labelTpl;n.translate;var d=n.disabled,c=n.env,u=n.id,p=n.themeCss,m=n.css;return V("div",{key:t,className:i("".concat(o,"Picker-value"),h.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"pickValueWrapClassName",id:u,themeCss:p||m})),{"is-disabled":d})},V("span",{className:i("".concat(o,"Picker-valueIcon"),h.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"pickValueIconClassName",id:u,themeCss:p||m}))),onClick:function(e){e.stopPropagation(),a.removeItem(t)}},"×"),V("span",{className:i("".concat(o,"Picker-valueLabel"),h.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"pickFontClassName",id:u,themeCss:p||m}))),onClick:function(t){t.stopPropagation(),a.handleItemClick(e)}},l?V(k.default,{html:h.filter(l,e),filterHtml:c.filterHtml}):"".concat(h.getVariable(e,s||"label")||h.getVariable(e,"id"))))},t.prototype.renderValues=function(){var e=this,t=this.props,a=t.classPrefix,n=t.selectedOptions,o=t.translate,i=t.disabled,s=t.multiple,l=t.popOverContainer,d=t.id,c=t.themeCss,u=t.css,p=this.getOverflowConfig(),m=p.maxTagCount,_=p.overflowTagPopover,v=n.length,f=n,g=!1!==s&&h.isIntegerInRange(m,{start:0,end:v,left:"inclusive",right:"exclusive"});return g&&(f=r.__spreadArray(r.__spreadArray([],r.__read(n.slice(0,m)),!1),[{label:"+ ".concat(v-m," ..."),value:"__overflow_tag__"}],!1)),V("div",{className:"".concat(a,"Picker-values")},f.map((function(t,s){return g&&s===m?V(C.default,{key:s,container:l,tooltip:r.__assign(r.__assign({tooltipClassName:O.default("Picker-overflow",null==_?void 0:_.tooltipClassName),title:o("已选项")},P.default(_,["children","content","tooltipClassName"])),{children:function(){return V("div",{className:O.default("".concat(a,"Picker-overflow-wrapper"))},n.slice(m,v).map((function(t,a){var n=a+m;return e.renderTag(t,n)})))}})},V("div",{key:s,className:O.default("".concat(a,"Picker-value"),{"is-disabled":i})},V("span",{className:"".concat(a,"Picker-valueLabel ").concat(h.setThemeClassName(r.__assign(r.__assign({},e.props),{name:"pickFontClassName",id:d,themeCss:c||u})))},t.label))):e.renderTag(t,s)})))},t.prototype.renderBody=function(e){var t=(void 0===e?{}:e).popOverContainer,a=this.props,n=a.render,o=a.selectedOptions,i=a.options,s=a.multiple,l=a.valueField,d=a.embed,c=a.source,u=a.strictMode,p=a.testIdBuilder,m=this.getOverflowConfig(),_=m.maxTagCount,h=m.overflowTagPopoverInCRUD,v=m.displayPosition;return n("modal-body",this.state.schema,r.__assign({value:o,valueField:l,primaryField:l,options:c?[]:i,multiple:s,strictMode:u,onSelect:d?this.handleSelect:void 0,testIdBuilder:null==p?void 0:p.getChild("body-schema"),ref:this.crudRef,popOverContainer:t},d||Array.isArray(v)&&v.includes("crud")?{maxTagCount:_,overflowTagPopover:h}:{}))},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var a=e.modalClassName,n=e.classnames,o=e.disabled,i=e.render,s=e.modalMode,l=e.source,d=e.size,c=e.clearable,u=e.multiple,p=e.placeholder,m=e.embed,_=e.selectedOptions,v=e.translate,f=e.popOverContainer,g=e.modalTitle,y=e.data,C=e.mobileUI,k=e.env,F=e.themeCss,O=e.css,P=e.id,w=e.classPrefix,N=e.testIdBuilder;return V("div",{className:n("PickerControl",{"is-mobile":C},t)},m?V("div",{className:n("Picker")},this.renderBody({popOverContainer:f})):V("div",{className:n("Picker",{"Picker--single":!u,"Picker--multi":u,"is-focused":this.state.isFocused,"is-disabled":o})},V("div",{onClick:this.handleClick,className:n("Picker-input",o&&"is-disabled",this.state.isFocused&&"is-focused",h.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"pickControlClassName",id:P,themeCss:F||O})))},!_.length&&p?V("div",{className:n("Picker-placeholder")},v(p)):null,V("div",r.__assign({className:n("Picker-valueWrap")},null==N?void 0:N.getTestId()),this.renderValues(),V("input",{onChange:h.noop,value:"",ref:this.input,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,readOnly:C})),c&&!o&&_.length?V("a",{onClick:this.clearValue,className:n("Picker-clear")},V(b.default,{icon:"input-clear",className:"icon"})):null,V("span",r.__assign({onClick:this.open,className:n("Picker-btn")},null==N?void 0:N.getChild("picker-open-btn").getTestId()),V(b.default,{icon:"window-restore",className:n("icon",h.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"pickIconClassName",id:P,themeCss:F||O}))),iconContent:"Picker-icon"}))),i("modal",{title:g&&"string"==typeof g?h.filter(g,y):v("Select.placeholder"),size:d,type:s,className:a,body:{children:this.renderBody},testIdBuilder:null==N?void 0:N.getChild("modal")},{key:"modal",lazyRender:!!l,onConfirm:this.handleModalConfirm,onClose:this.close,show:this.state.isOpened})),V(h.CustomStyle,r.__assign({},this.props,{config:{themeCss:F||O,classNames:[{key:"pickControlClassName",weights:{default:{important:!0},hover:{important:!0},focused:{important:!0,parent:".".concat(w,"Picker.is-focused >")},disabled:{important:!0,parent:".".concat(w,"Picker.is-disabled >")}}},{key:"pickFontClassName"},{key:"pickValueWrapClassName",weights:{default:{important:!0}}},{key:"pickValueIconClassName",weights:{default:{important:!0},hover:{important:!0}}},{key:"pickIconClassName",weights:{default:{suf:" svg"}}}],id:P},env:k})))},t.propsList=["modalTitle","modalMode","pickerSchema","labelField","onChange","options","value","inline","multiple","embed","resetValue","placeholder","onQuery"],t.defaultProps={modalMode:"dialog",multiple:!1,placeholder:"Picker.placeholder",labelField:"label",valueField:"value",pickerSchema:{mode:"list"},embed:!1,overflowConfig:{maxTagCount:-1,displayPosition:["select","crud"],overflowTagPopover:{placement:"top",trigger:"hover",showArrow:!1,offset:[0,-10]},overflowTagPopoverInCRUD:{placement:"bottom",trigger:"hover",showArrow:!1,offset:[0,10]}}},r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",Object)],t.prototype,"fetchOptions",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",void 0)],t.prototype,"crudRef",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"open",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"close",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Array,Object,Object,Array]),r.__metadata("design:returntype",Promise)],t.prototype,"handleModalConfirm",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Array]),r.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",Promise)],t.prototype,"handleItemClick",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",void 0)],t.prototype,"handleKeyDown",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"clearValue",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Array,Array]),r.__metadata("design:returntype",void 0)],t.prototype,"handleSelect",null),r.__decorate([h.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",void 0)],t.prototype,"renderBody",null),r.__decorate([f.supportStatic(),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(F.default.PureComponent),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([h.OptionsControl({type:"picker",autoLoadOptionsFromSource:!1,sizeMutable:!1})],t)}(x);t.PickerControlRenderer=D,t.default=x}));
|
||
;/*!node_modules/amis/lib/renderers/Form/IconPicker.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/IconPicker",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Icon"),i=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),r=e("node_modules/classnames/index"),d=e("node_modules/match-sorter/dist/match-sorter.cjs"),u=e("node_modules/keycode/index"),l=e("node_modules/downshift/dist/downshift.cjs"),p=e("node_modules/amis-core/lib/index"),c=e("node_modules/amis/lib/renderers/Form/IconPickerIcons");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=_(o),h=_(s),y=_(r),g=_(u),f=_(l),v=e("node_modules/react/index"),C=(v.default||v).createElement;(v.default||v).Fragment;var b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isOpen:!1,inputValue:"",isFocused:!1,vendorIndex:0},t}return i.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;e.value!==t.value&&this.setState({inputValue:""})},t.prototype.changeVendor=function(e){this.setState({vendorIndex:e},this.formatOptions)},t.prototype.formatOptions=function(){var e=this.state.vendorIndex||0,t=c.ICONS[e],n=t.prefix;return t.icons.map((function(e){return{label:n+e,value:n+e}}))},t.prototype.getVendors=function(){return c.ICONS.map((function(e){return e.name}))},t.prototype.inputRef=function(e){this.input=e},t.prototype.focus=function(){if(this.input){this.input.focus();var e=this.input.value.length;e&&this.input.setSelectionRange(e,e)}},t.prototype.handleClick=function(){this.props.disabled||(this.focus(),this.setState({isOpen:!0}))},t.prototype.handleFocus=function(e){this.setState({isOpen:!0,isFocused:!0}),this.props.onFocus&&this.props.onFocus(e)},t.prototype.handleBlur=function(e){var t=this.props,n=t.onBlur,a=t.trimContents,o=t.value,i=t.onChange;this.setState({isFocused:!1},(function(){a&&o&&"string"==typeof o&&i(o.trim())})),n&&n(e)},t.prototype.handleInputChange=function(e){var t=e.currentTarget.value;this.setState({inputValue:t})},t.prototype.handleKeyDown=function(e){if("backspace"===g.default(e.keyCode)){var t=this.props.onChange;this.state.inputValue||(t(""),this.setState({inputValue:""}))}},t.prototype.handleChange=function(e){var t=this.props,n=t.onChange;t.disabled||(n(e),this.setState({isFocused:!1,inputValue:""}))},t.prototype.handleStateChange=function(e){switch(e.type){case f.default.stateChangeTypes.itemMouseEnter:case f.default.stateChangeTypes.changeInput:this.setState({isOpen:!0});break;default:var t={};void 0!==e.isOpen&&(t.isOpen=e.isOpen),this.state.isOpen&&!1===e.isOpen&&(t.inputValue=""),this.setState(t)}},t.prototype.handleClear=function(){var e=this,t=this.props,n=t.onChange,a=t.resetValue;null==n||n(a),this.setState({inputValue:a,isFocused:!0},(function(){e.focus()}))},t.prototype.renderFontIcons=function(){var e=this,t=this.props,n=t.className,a=t.inputOnly,o=t.placeholder,s=t.classnames,r=t.name,u=t.value,l=t.noDataTip,p=t.disabled,c=t.clearable,_=t.translate,h=this.formatOptions(),y=this.getVendors();return C(f.default,{isOpen:this.state.isOpen,inputValue:this.state.inputValue,onChange:this.handleChange,onOuterClick:this.handleBlur,onStateChange:this.handleStateChange,selectedItem:[u]},(function(t){var g=t.getInputProps,f=t.getItemProps,v=t.isOpen,b=t.inputValue,I=b&&v?d.matchSorter(h,b,{keys:["label","value"],threshold:d.matchSorter.rankings.CONTAINS}):h;return C("div",{className:s("IconPickerControl-input IconPickerControl-input--withAC",a?n:"",{"is-opened":v}),onClick:e.handleClick},C("div",{className:s("IconPickerControl-valueWrap")},!o||u||e.state.inputValue?null:C("div",{className:s("IconPickerControl-placeholder")},o),!u||b&&v?null:C("div",{className:s("IconPickerControl-value")},C("i",{className:s(u)}),"string"==typeof u?u:""),C("input",i.__assign({},g({name:r,ref:e.inputRef,onFocus:e.handleFocus,onChange:e.handleInputChange,onKeyDown:e.handleKeyDown,value:e.state.inputValue}),{autoComplete:"off",disabled:p,size:10})),c&&!p&&u?C("a",{onClick:e.handleClear,className:s("IconPickerControl-clear")},C(m.default,{icon:"input-clear",className:"icon"})):null),v?C("div",{className:s("IconPickerControl-sugsPanel")},y.length>1?C("div",{className:s("IconPickerControl-tabs")},y.map((function(t,n){return C("div",{className:s("IconPickerControl-tab",{active:e.state.vendorIndex===n}),onClick:function(){return e.changeVendor(n)},key:n},t)}))):null,I.length?C("div",{className:s("IconPickerControl-sugs",y.length>1?"IconPickerControl-multiVendor":"IconPickerControl-singleVendor")},I.map((function(e,t){return C("div",i.__assign({},f({item:e.value,className:s("IconPickerControl-sugItem",{"is-active":u===e.value})}),{key:t}),C("i",{className:s("".concat(e.value)),title:"".concat(e.value)}))}))):C("div",{className:s(y.length>1?"IconPickerControl-multiVendor":"IconPickerControl-singleVendor")},_(l))):null)}))},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.classPrefix,a=e.inputOnly,o=e.disabled,i=this.renderFontIcons();return a?i:C("div",{className:y.default(t,"".concat(n,"IconPickerControl"),{"is-focused":this.state.isFocused,"is-disabled":o})},i)},t.defaultProps={resetValue:"",placeholder:"",noDataTip:"placeholder.noData"},i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number]),i.__metadata("design:returntype",void 0)],t.prototype,"changeVendor",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"formatOptions",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"getVendors",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"inputRef",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"focus",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleInputChange",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeyDown",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleStateChange",null),i.__decorate([p.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleClear",null),t}(h.default.PureComponent),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([p.FormItem({type:"icon-picker"})],t)}(b);t.IconPickerControlRenderer=I,t.default=b}));
|
||
;/*!node_modules/amis/lib/renderers/Form/IconSelect.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/IconSelect",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Button"),l=e("node_modules/amis-ui/lib/components/Modal"),i=e("node_modules/amis-ui/lib/components/Spinner"),s=e("node_modules/amis-ui/lib/components/SearchBox"),r=e("node_modules/amis-ui/lib/components/Icon"),d=e("node_modules/tslib/tslib"),c=e("node_modules/react/index"),u=e("node_modules/classnames/index"),p=e("node_modules/match-sorter/dist/match-sorter.cjs"),h=e("node_modules/amis-core/lib/index"),m=e("node_modules/lodash/debounce"),_=e("node_modules/amis/lib/renderers/Form/IconSelectStore");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=g(o),y=g(l),v=g(i),I=g(s),C=g(r),S=g(c),b=g(u),N=g(m),k=e("node_modules/react/index"),M=(k.default||k).createElement;(k.default||k).Fragment;var x=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activeTypeIndex:0,showModal:!1,tmpCheckIconId:null,searchValue:"",isRefreshLoading:!1},n.handleSearchValueChange=N.default(n.handleSearchValueChange.bind(n),300),n}return d.__extends(t,e),t.prototype.getSvgName=function(e){var t;return"string"==typeof e?(null===(t=/data-name="(.*?)"/.exec(e))||void 0===t?void 0:t[1])||"":(null==e?void 0:e.name)||(null==e?void 0:e.id)||""},t.prototype.getSvgId=function(e){var t;return"string"==typeof e?(null===(t=/data-id="(.*?)"/.exec(e))||void 0===t?void 0:t[1])||"":(null==e?void 0:e.id)||""},t.prototype.getValueBySvg=function(e){var t;return e?"string"!=typeof e?d.__assign(d.__assign({},e),{svg:null===(t=e.svg)||void 0===t?void 0:t.replace(/'/g,"")}):{name:this.getSvgName(e),id:this.getSvgId(e),svg:e.replace(/'/g,"")}:null},t.prototype.handleClick=function(){this.props.disabled||this.toggleModel(!0)},t.prototype.handleClear=function(e){e.preventDefault(),e.stopPropagation(),this.props.onChange&&this.props.onChange("")},t.prototype.renderInputArea=function(){var e=this.props,t=e.classPrefix,n=e.disabled,a=e.value,o=e.placeholder,l=e.clearable,i=this.getValueBySvg(a);return M("div",{className:b.default("".concat(t,"IconSelectControl-input-area"))},M("div",{className:b.default("".concat(t,"IconSelectControl-input-icon-show"))},M(C.default,{icon:null==i?void 0:i.svg,className:"icon"})),M("span",{className:b.default("".concat(t,"IconSelectControl-input-icon-id"))},null==i?void 0:i.name),l&&!n&&i?M("a",{onClick:this.handleClear,className:b.default("".concat(t,"IconSelectControl-clear"))},M(C.default,{icon:"input-clear",className:"icon"})):null,!i&&o&&M("span",{className:b.default("".concat(t,"IconSelectControl-input-icon-placeholder"))},o)||null)},t.prototype.handleIconTypeClick=function(e,t){this.setState({activeTypeIndex:t})},t.prototype.renderIconTypes=function(){var e=this,t=this.props.classPrefix,n=_.svgIcons.map((function(e){return{id:e.groupId,label:e.name}}));return M("ul",{className:b.default("".concat(t,"IconSelectControl-type-list"))},n.map((function(t,n){return M("li",{key:t.id,onClick:function(){return e.handleIconTypeClick(t,n)},className:b.default({active:n===e.state.activeTypeIndex})},t.label)})))},t.prototype.handleConfirm=function(){var e=this.state.tmpCheckIconId;if(this.props.returnSvg){var t=e&&e.svg||"";t=t.replace(/<svg/,'<svg data-name="'.concat(null==e?void 0:e.name,'" data-id="').concat(null==e?void 0:e.id,'"')),this.props.noSize&&(t=t.replace(/width=".*?"/,"").replace(/height=".*?"/,"")),this.props.onChange&&this.props.onChange(t)}else this.props.onChange&&this.props.onChange(e&&e.id?d.__assign(d.__assign({},e),{id:"svg-"+e.id}):"");this.toggleModel(!1)},t.prototype.handleLocalUpload=function(e){return d.__awaiter(this,void 0,void 0,(function(){return d.__generator(this,(function(t){return this.props.onChange&&this.props.onChange(e),this.toggleModel(!1),[2]}))}))},t.prototype.handleClickIconInModal=function(e){var t;this.setState({tmpCheckIconId:(null==e?void 0:e.id)===(null===(t=this.state.tmpCheckIconId)||void 0===t?void 0:t.id)?null:e})},t.prototype.renderIconList=function(e){var t=this,n=this.props,a=n.classPrefix,o=n.noDataTip,l=n.translate;return e&&e.length?M("ul",{className:b.default("".concat(a,"IconSelectControl-icon-list"))},e.map((function(e,n){var o;return M("li",{key:e.id},M("div",{className:b.default("".concat(a,"IconSelectControl-icon-list-item"),{active:(null===(o=t.state.tmpCheckIconId)||void 0===o?void 0:o.id)===e.id}),onClick:function(){return t.handleClickIconInModal(e)}},M("svg",null,M("use",{xlinkHref:"#".concat(e.id)})),M("div",{className:b.default("".concat(a,"IconSelectControl-icon-list-item-info"))},M("p",{className:b.default("".concat(a,"IconSelectControl-icon-list-item-info-name"))},e.name))))}))):M("p",{className:b.default("".concat(a,"IconSelectControl-icon-list-empty"))},l(o))},t.prototype.handleSearchValueChange=function(e){this.setState({searchValue:e})},t.prototype.handleRefreshIconList=function(){return d.__awaiter(this,void 0,void 0,(function(){var e,t;return d.__generator(this,(function(n){switch(n.label){case 0:if(!(e=_.refreshIconList)||"function"!=typeof e)return[3,5];n.label=1;case 1:return n.trys.push([1,3,4,5]),this.setState({isRefreshLoading:!0}),[4,Promise.resolve(e())];case 2:return n.sent(),[3,5];case 3:return t=n.sent(),console.error(t),[3,5];case 4:return this.setState({isRefreshLoading:!1}),[7];case 5:return[2]}}))}))},t.prototype.renderModalContent=function(){var e=this.props,t=e.render,n=e.classPrefix,a=e.loadingConfig;e.funcSchema;var o=e.funcCom,l=this.getIconsByType(),i=this.state.searchValue,s=i?p.matchSorter(l,i,{keys:["name"],threshold:p.matchSorter.rankings.CONTAINS}):l;return M(S.default.Fragment,null,M(I.default,{className:b.default("".concat(n,"IconSelectControl-Modal-search")),mini:!1,clearable:!0,onChange:this.handleSearchValueChange}),_.refreshIconList&&t("refresh-btn",{type:"button",icon:"fa fa-refresh"},{className:b.default("".concat(n,"IconSelectControl-Modal-refresh")),onClick:this.handleRefreshIconList})||null,o?M("div",{className:b.default("".concat(n,"IconSelectControl-Modal-func"))},M(o,{onUpload:this.handleLocalUpload})):null,M("div",{className:b.default("".concat(n,"IconSelectControl-Modal-content"))},M(v.default,{size:"lg",loadingConfig:a,overlay:!0,key:"info",show:this.state.isRefreshLoading}),M("div",{className:b.default("".concat(n,"IconSelectControl-Modal-content-aside"))},this.renderIconTypes()),M("div",{className:b.default("".concat(n,"IconSelectControl-Modal-content-main"))},this.renderIconList(s))))},t.prototype.getIconsByType=function(){return(null==_?void 0:_.svgIcons.length)&&_.svgIcons[this.state.activeTypeIndex].children||[]},t.prototype.toggleModel=function(e){var t=this.props.value,n="string"==typeof t?this.getValueBySvg(t):t;void 0!==e?this.setState({showModal:e,tmpCheckIconId:e&&(null==n?void 0:n.id)?d.__assign(d.__assign({},n),{id:String(n.id).replace(/^svg-/,"")}):null,searchValue:""}):this.setState({showModal:!this.state.showModal,searchValue:""})},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var a=t.classPrefix,o=t.disabled,l=t.translate;return M("div",{className:b.default(n,"".concat(a,"IconSelectControl"),{"is-focused":this.state.showModal,"is-disabled":o})},M("div",{className:b.default("".concat(a,"IconSelectControl-input")),onClick:this.handleClick},this.renderInputArea()),M(y.default,{show:this.state.showModal,closeOnOutside:!0,closeOnEsc:!0,size:"lg",overlay:!0,onHide:function(){return e.toggleModel(!1)}},M(y.default.Header,{onClose:function(){return e.toggleModel(!1)}},l("IconSelect.choice")),M(y.default.Body,null,this.renderModalContent()),M(y.default.Footer,null,M(f.default,{type:"button",className:"m-l",onClick:function(){return e.toggleModel(!1)}},l("cancel")),M(f.default,{type:"button",level:"primary",onClick:this.handleConfirm},l("confirm")))))},t.defaultProps={noDataTip:"placeholder.noData",clearable:!0},d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object]),d.__metadata("design:returntype",void 0)],t.prototype,"handleClear",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"renderInputArea",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Object,Number]),d.__metadata("design:returntype",void 0)],t.prototype,"handleIconTypeClick",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"renderIconTypes",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"handleConfirm",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[String]),d.__metadata("design:returntype",Promise)],t.prototype,"handleLocalUpload",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Array]),d.__metadata("design:returntype",void 0)],t.prototype,"renderIconList",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",Promise)],t.prototype,"handleRefreshIconList",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[]),d.__metadata("design:returntype",void 0)],t.prototype,"renderModalContent",null),d.__decorate([h.autobind,d.__metadata("design:type",Function),d.__metadata("design:paramtypes",[Boolean]),d.__metadata("design:returntype",void 0)],t.prototype,"toggleModel",null),t}(S.default.PureComponent),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(t,e),t=d.__decorate([h.FormItem({type:"icon-select"})],t)}(x);t.IconSelectControlRenderer=F,t.default=x}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Formula.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Formula",(function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("node_modules/tslib/tslib"),a=t("node_modules/react/index"),r=t("node_modules/amis-core/lib/index");function d(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inited=!1,e}return o.__extends(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.formInited,i=t.initSet,n=t.addHook;this.unHook=n?n(this.handleFormInit,"init"):void 0,!1!==e&&(this.inited=!0,!1===i||this.initSet())},e.prototype.componentDidUpdate=function(t){var e=this.props,i=e.formInited,n=e.initSet,o=e.autoSet;this.inited?!1===o||this.autoSet(t):void 0===i&&(this.inited=!0,!1===n||this.initSet())},e.prototype.componentWillUnmount=function(){var t;null===(t=this.unHook)||void 0===t||t.call(this)},e.prototype.handleFormInit=function(t){this.inited=!0;var e=this.props,i=e.name;if(!1!==e.initSet){var n=this.initSet();"string"==typeof i&&void 0!==n&&r.setVariable(t,i,n)}},e.prototype.initSet=function(){var t=this.props,e=t.formula,i=t.data,n=t.setPrinstineValue;t.initSet;var o=t.condition;if(e&&(!o||~o.indexOf("$")||~o.indexOf("<%")||r.evalJS(o,i))){var a=r.evalJS(e,i);return null!==a&&(null==n||n(a)),a}},e.prototype.autoSet=function(t){var e=this.props,i=t.formula,n=t.data,o=t.onChange,a=t.value,d=t.condition;if(i&&e.formula&&r.isObjectShallowModified(n,e.data,!1)&&a===e.value){var l=r.evalJS(e.formula,e.data);if(d&&e.condition)~d.indexOf("$")||~d.indexOf("<%")?r.filter(d,n)!==r.filter(e.condition,e.data)&&o(l):r.evalJS(e.condition,e.data)&&o(l);else{var u=r.evalJS(i,n);JSON.stringify(u)!==JSON.stringify(l)&&o(null!=l?l:"")}}},e.prototype.doAction=function(){var t=this.props,e=t.formula,i=t.data,n=t.onChange;t.autoSet,t.value,n(r.evalJS(e,i))},e.prototype.render=function(){return null},o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleFormInit",null),e}(d(a).default.Component),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([r.FormItem({type:"formula",wrap:!1,strictMode:!1,sizeMutable:!1})],e)}(l);e.FormulaControlRenderer=u,e.default=l}));
|
||
;/*!node_modules/amis/lib/renderers/Form/TabsTransfer.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/TabsTransfer",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/TabsTransfer"),o=e("node_modules/tslib/tslib"),s=e("node_modules/amis-core/lib/index");e("node_modules/react/index");var l=e("node_modules/lodash/find"),d=e("node_modules/amis/lib/renderers/Form/Transfer"),u=e("node_modules/amis-ui/lib/components/Selection"),c=e("node_modules/amis/lib/renderers/Form/StaticHoc"),p=e("node_modules/match-sorter/dist/match-sorter.cjs");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(r),_=h(i),v=h(l),f=e("node_modules/react/index"),b=(f.default||f).createElement;(f.default||f).Fragment;var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={activeKey:0},t}return o.__extends(t,e),t.prototype.onTabChange=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t;return o.__generator(this,(function(a){switch(a.label){case 0:return[4,(0,this.props.dispatchEvent)("tab-change",{key:e})];case 1:return(null==(t=a.sent())?void 0:t.prevented)||this.setState({activeKey:e}),[2]}}))}))},t.prototype.handleTabSearch=function(e,t,a){return o.__awaiter(this,void 0,void 0,(function(){var n,r,i,l,d,u,c,h,m,_,f;return o.__generator(this,(function(o){switch(o.label){case 0:if(n=this.props,r=n.options,i=n.labelField,l=n.valueField,d=n.env,u=n.data,c=n.searchApi,h=n.translate,!c)return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.fetcher(c,s.createObject(u,{term:e}),{cancelExecutor:a})];case 2:if(!(m=o.sent()).ok)throw new Error(h(m.msg||"networkError"));if(_=m.data.options||m.data.items||m.data,!Array.isArray(_))throw new Error(h("CRUD.invalidArray"));return[2,_.map((function(e){var t=null,a=e[l||"value"];return Array.isArray(r)&&null!=a&&(t=v.default(r,s.optionValueCompare(a,l))),t||e}))];case 3:return f=o.sent(),d.isCancel(f)||!c.silent&&d.notify("error",f.message),[2,[]];case 4:return[3,6];case 5:return e?[2,s.filterTree(t.children||r,(function(t,a,n,r){return!!(Array.isArray(t.children)&&t.children.length||p.matchSorter([t].concat(r),e,{keys:[i||"label",l||"value"],threshold:p.matchSorter.rankings.CONTAINS}).length)}),0,!0)]:[2,r];case 6:return[2]}}))}))},t.prototype.handleChange=function(e,t){return o.__awaiter(this,void 0,void 0,(function(){var a,n,r,i,l,d,u,c,p,h,m,_,v,f;return o.__generator(this,(function(b){switch(b.label){case 0:return a=this.props,n=a.onChange,r=a.joinValues,i=a.delimiter,l=a.valueField,d=a.extractValue,u=a.options,c=a.dispatchEvent,p=a.setOptions,h=a.translate,m=e,_=u.concat(),v="UN_MATCH_RESULT",Array.isArray(e)?(m=e.map((function(e){var a=s.findTreeIndex(u,s.optionValueCompare(e[l||"value"],l||"value"));if(a){if(t){var n=s.getTree(_,a);_=s.spliceTree(_,a,1,o.__assign(o.__assign({},n),e))}}else{var i=s.findTreeIndex(_,(function(e){return e.value===v}));if(i){var c=s.getTree(_,i);(null==c?void 0:c.children)&&(c.children.push(e),_=s.spliceTree(_,i,1,o.__assign(o.__assign({},c),e)))}else _.push({label:h("searchResult"),value:v,visible:!1,children:[e]})}return r||d?e[l||"value"]:e})),r&&(m=m.join(i||","))):e&&(m=r||d?e[l||"value"]:e),(_.length>u.length||t)&&p(_,!0),[4,c("change",s.resolveEventData(this.props,{value:m,options:u,items:u}))];case 1:return(null==(f=b.sent())?void 0:f.prevented)||n(m),[2]}}))}))},o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Number]),o.__metadata("design:returntype",Promise)],t.prototype,"onTabChange",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String,Object,Function]),o.__metadata("design:returntype",Promise)],t.prototype,"handleTabSearch",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object,Boolean]),o.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),t}(d.BaseTransferRenderer),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.optionItemRender=function(e,t){var a=this.props,n=a.menuTpl,r=a.render,i=a.data,l=a.classnames,d=arguments[2]||{};return n?r("item/".concat(t.index),n,{data:s.createObject(s.createObject(i,o.__assign(o.__assign({},t),d)),e)}):u.BaseSelection.itemRender(e,o.__assign(o.__assign({},t),{classnames:l}))},t.prototype.doAction=function(e,t,a,n){var r,i,o,l=this.props,d=l.resetValue,u=l.onChange,c=l.formStore,p=l.store,h=l.name,m=null==n?void 0:n.activeKey;switch(e.actionType){case"clear":null==u||u("");break;case"reset":null==u||u(null!==(o=null!==(i=s.getVariable(null!==(r=null==c?void 0:c.pristine)&&void 0!==r?r:null==p?void 0:p.pristine,h))&&void 0!==i?i:d)&&void 0!==o?o:"");break;case"changeTabKey":this.setState({activeKey:m})}},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var a=e.classnames,n=e.options,r=e.selectedOptions,i=e.sortable,o=e.loading,l=e.searchResultMode,d=e.selectMode,u=e.searchable,c=e.showArrow,p=e.deferLoad,h=e.leftDeferLoad,v=e.disabled,f=e.selectTitle,y=e.resultTitle,g=e.itemHeight,T=e.virtualThreshold,C=e.onlyChildren,w=e.loadingConfig,F=e.valueField,S=void 0===F?"value":F,A=e.labelField,R=void 0===A?"label":A,O=e.valueTpl,I=e.menuTpl,j=e.data,x=e.mobileUI,E=e.initiallyOpen,k=void 0===E||E,N=e.testIdBuilder;return b("div",{className:a("TabsTransferControl",t)},b(_.default,{onlyChildren:C,activeKey:this.state.activeKey,value:r,disabled:v,options:n,onChange:this.handleChange,option2value:this.option2value,sortable:i,searchResultMode:l,onSearch:this.handleTabSearch,showArrow:c,onDeferLoad:p,onLeftDeferLoad:h,selectTitle:f,resultTitle:y,selectMode:d,searchable:u,optionItemRender:I?this.optionItemRender:void 0,resultItemRender:O?this.resultItemRender:void 0,onTabChange:this.onTabChange,itemHeight:s.toNumber(g)>0?s.toNumber(g):void 0,virtualThreshold:T,labelField:R,valueField:S,ctx:j,mobileUI:x,initiallyOpen:k,testIdBuilder:N}),b(m.default,{overlay:!0,key:"info",show:o,loadingConfig:w}))},t.defaultProps={multiple:!0},o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object,Object]),o.__metadata("design:returntype",void 0)],t.prototype,"optionItemRender",null),o.__decorate([c.supportStatic(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"render",null),t=o.__decorate([s.OptionsControl({type:"tabs-transfer"})],t)}(y);t.BaseTabsTransferRenderer=y,t.TabsTransferRenderer=g}));
|
||
;/*!node_modules/amis/lib/renderers/Form/TabsTransferPicker.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/TabsTransferPicker",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Spinner"),i=e("node_modules/amis-ui/lib/components/TabsTransferPicker"),r=e("node_modules/amis-ui/lib/components/Selection"),s=e("node_modules/tslib/tslib"),l=e("node_modules/amis-core/lib/index");e("node_modules/react/index");var d=e("node_modules/amis/lib/renderers/Form/TabsTransfer"),u=e("node_modules/amis/lib/renderers/Form/StaticHoc");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=p(o),m=p(i),v=p(r),_=e("node_modules/react/index"),f=(_.default||_).createElement;(_.default||_).Fragment;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={activeKey:0},t}return s.__extends(t,e),t.prototype.dispatchEvent=function(e){var t=this.props,a=t.dispatchEvent,n=t.value;a(e,l.resolveEventData(this.props,{value:n}))},t.prototype.optionItemRender=function(e,t){var a=this.props,n=a.menuTpl,o=a.render,i=a.data,r=a.classnames,d=arguments[2]||{};return n?o("item/".concat(t.index),n,{data:l.createObject(l.createObject(i,s.__assign(s.__assign({},t),d)),e)}):v.default.itemRender(e,s.__assign(s.__assign({},t),{classnames:r}))},t.prototype.doAction=function(e){var t,a,n,o=this.props,i=o.resetValue,r=o.onChange,s=o.formStore,d=o.store,u=o.name;switch(e.actionType){case"clear":null==r||r("");break;case"reset":null==r||r(null!==(n=null!==(a=l.getVariable(null!==(t=null==s?void 0:s.pristine)&&void 0!==t?t:null==d?void 0:d.pristine,u))&&void 0!==a?a:i)&&void 0!==n?n:"")}},t.prototype.render=function(){var e=this,t=this.props,a=t.className;t.style;var n=t.classnames,o=t.options,i=t.selectedOptions,r=t.sortable,s=t.loading,d=t.searchResultMode,u=t.showArrow,p=t.deferLoad,v=t.disabled,_=t.selectTitle,h=t.resultTitle,b=t.pickerSize,g=t.leftMode,y=t.leftOptions,T=t.itemHeight,F=t.virtualThreshold,C=t.loadingConfig,O=t.labelField,R=void 0===O?"label":O,S=t.valueField,w=void 0===S?"value":S,I=t.deferField,k=void 0===I?"defer":I,x=t.mobileUI,E=t.env,j=t.maxTagCount,M=t.overflowTagPopover,P=t.placeholder,N=t.initiallyOpen,A=void 0===N||N;return f("div",{className:n("TabsTransferControl",a)},f(m.default,{activeKey:this.state.activeKey,onTabChange:this.onTabChange,placeholder:P,value:i,disabled:v,options:o,onChange:this.handleChange,option2value:this.option2value,sortable:r,searchResultMode:d,onSearch:this.handleTabSearch,showArrow:u,onDeferLoad:p,selectTitle:_,resultTitle:h,size:b,leftMode:g,leftOptions:y,optionItemRender:this.optionItemRender,resultItemRender:this.resultItemRender,onFocus:function(){return e.dispatchEvent("focus")},onBlur:function(){return e.dispatchEvent("blur")},itemHeight:l.toNumber(T)>0?l.toNumber(T):void 0,virtualThreshold:F,labelField:R,valueField:w,deferField:k,mobileUI:x,popOverContainer:null==E?void 0:E.getModalContainer,maxTagCount:j,overflowTagPopover:M,initiallyOpen:A}),f(c.default,{loadingConfig:C,overlay:!0,key:"info",show:s}))},s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[String]),s.__metadata("design:returntype",void 0)],t.prototype,"dispatchEvent",null),s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],t.prototype,"optionItemRender",null),s.__decorate([u.supportStatic(),s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"render",null),t=s.__decorate([l.OptionsControl({type:"tabs-transfer-picker"})],t)}(d.BaseTabsTransferRenderer);t.TabsTransferPickerRenderer=h}));
|
||
;/*!node_modules/amis/lib/renderers/Form/Group.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/Group",(function(r,e,o,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("node_modules/tslib/tslib"),a=r("node_modules/react/index"),i=r("node_modules/amis-core/lib/index"),l=r("node_modules/mobx/lib/index");function s(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var d=s(a),u=r("node_modules/react/index"),c=(u.default||u).createElement;(u.default||u).Fragment;var m=function(r){function e(e){var o=r.call(this,e)||this;o.renderInput=o.renderInput.bind(o);var t=e.body;return Array.isArray(t)&&(o.reaction=l.reaction((function(){return t.map((function(r){var o,t=i.filter(r.id,e.data),n=i.filter(r.name,e.data);return"".concat(null!==(o=e.statusStore.visibleState[t])&&void 0!==o?o:e.statusStore.visibleState[n])})).join("-")}),(function(){return o.forceUpdate()}))),o}return n.__extends(e,r),e.prototype.componentWillUnmount=function(){var r;null===(r=this.reaction)||void 0===r||r.call(this)},e.prototype.renderControl=function(r,e,o){var t=this.props,a=t.render,i=t.disabled;t.data;var l=t.mode,s=t.horizontal,d=t.formMode,u=t.formHorizontal,c=t.subFormMode,m=t.subFormHorizontal;if(!r)return null;var p=r;return a("".concat(e),p,n.__assign({disabled:r.disabled||i,formMode:c||l||d,formHorizontal:m||s||u},o))},e.prototype.renderVertical=function(r){var e=this;void 0===r&&(r=this.props);var o=r.body,t=r.className;r.style;var n=r.classnames,a=r.mode,l=r.formMode,s=r.data,d=r.statusStore;return l=a||l,Array.isArray(o)?c("div",{className:n("Form-group Form-group--ver Form-group--".concat(l),t)},o.map((function(r,o){var t;return i.isVisible(r,s,d)?e.renderControl(r,o,{key:"".concat(null!==(t=r.name)&&void 0!==t?t:"","-").concat(o)}):null}))):null},e.prototype.renderHorizontal=function(r){var e=this;void 0===r&&(r=this.props);var o=r.body,t=r.className;r.style;var n=r.classPrefix,a=r.classnames,l=r.mode,s=r.horizontal,d=r.formMode,u=r.formHorizontal,m=r.subFormMode,p=r.subFormHorizontal,f=r.data,v=r.gap,b=r.statusStore;if(!Array.isArray(o))return null;d=m||l||d;var y=p||s||(u?i.makeHorizontalDeeper(u,o.filter((function(r){return"inline"!==(null==r?void 0:r.mode)&&i.isVisible(r,f,b)})).length):void 0);return c("div",{className:a("Form-group Form-group--hor Form-group--".concat(d),v?"Form-group--".concat(v):"",t)},o.map((function(r,o){var t,l;if(!i.isVisible(r,f,b))return null;var s=(null==r?void 0:r.mode)||d;if("inline"===s||(null==r?void 0:r.type)&&["formula","hidden"].includes(r.type))return e.renderControl(r,o,{key:"".concat(null!==(t=r.name)&&void 0!==t?t:"","-").concat(o),className:a(r.className,r.columnClassName)});var u=r.columnRatio||i.getWidthRate(r&&r.columnClassName,!0);return c("div",{key:o,className:a("".concat(n,"Form-groupColumn"),u?"".concat(n,"Form-groupColumn--").concat(u):"",r&&r.columnClassName)},e.renderControl(r,o,{key:"".concat(null!==(l=r.name)&&void 0!==l?l:"","-").concat(o),formHorizontal:y,formMode:s}))})))},e.prototype.renderInput=function(r){return void 0===r&&(r=this.props),"vertical"===r.direction?this.renderVertical(r):this.renderHorizontal(r)},e.prototype.render=function(){var r=this.props,e=r.label,o=n.__rest(r,["label"]);return void 0!==e?c(i.FormItemWrap,n.__assign({},o,{sizeMutable:!1,label:e,renderControl:this.renderInput})):this.renderInput()},e=n.__decorate([i.Renderer({type:"group"}),n.__metadata("design:paramtypes",[Object])],e)}(d.default.Component);e.ControlGroupRenderer=m}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputGroup.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputGroup",(function(t,e,o,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("node_modules/tslib/tslib"),i=t("node_modules/react/index"),a=t("node_modules/amis-core/lib/index");function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=s(i),d=t("node_modules/react/index"),u=(d.default||d).createElement;(d.default||d).Fragment;var p=function(t){function e(e){var o=t.call(this,e)||this;return o.toDispose=[],o.handleFocus=o.handleFocus.bind(o),o.handleBlur=o.handleBlur.bind(o),o.validateHook=o.validateHook.bind(o),o.state={isFocused:!1},o}return n.__extends(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.addHook;t.name&&e&&this.toDispose.push(e(this.validateHook,"validate"))},e.prototype.componentDidUpdate=function(t){var e;a.anyChanged(["errorCode","delimiter"],null==t?void 0:t.validationConfig,null===(e=this.props)||void 0===e?void 0:e.validationConfig)&&this.validateHook()},e.prototype.componentWillUnmount=function(){this.toDispose.forEach((function(t){return t()})),this.toDispose=[]},e.prototype.getValidationConfig=function(){var t=this.props.validationConfig;return{errorMode:"partial"!==(null==t?void 0:t.errorMode)?"full":"partial",delimiter:(null==t?void 0:t.delimiter)&&"string"==typeof t.delimiter?t.delimiter:"; "}},e.prototype.validateHook=function(){var t,e=this.props,o=e.formStore,r=e.formItem,n=e.name,i=this.getValidationConfig().delimiter;if(n){var a=null===(t=null==o?void 0:o.inputGroupItems)||void 0===t?void 0:t[n];if(Array.isArray(a)){var s=a.map((function(t,e){if(t.errors.length<=0)return"";var o=t.label?"(".concat(e+1,")").concat(t.label):"(".concat(e+1,")");return"".concat(o,": ").concat(t.errors.join(i))})).filter(Boolean);r&&r.setError(s)}}},e.prototype.handleFocus=function(){this.setState({isFocused:!0})},e.prototype.handleBlur=function(){this.setState({isFocused:!1})},e.prototype.renderControl=function(t,e,o){var r=this.props,i=r.render,a=r.onChange;if(!t)return null;var s=t;return i("".concat(e),s,n.__assign({onChange:a},o))},e.prototype.validate=function(){var t=this.props.formItem,e=[];return null==t||t.subFormItems.forEach((function(t){t.errors.length&&e.push.apply(e,n.__spreadArray([],n.__read(t.errors),!1))})),e.length?e:""},e.prototype.render=function(){var t=this,e=this.props,o=e.body,r=e.controls,n=e.className;e.style,e.mode;var i=e.horizontal;e.formMode;var s=e.formHorizontal,l=e.data,d=e.classnames,p=e.static,c=e.disabled,f=e.mobileUI,m=this.getValidationConfig().errorMode,h=Array.isArray(r)?r:o;Array.isArray(h)||(h=[]),h=h.filter((function(t){if(t&&(t.hidden||!1===t.visible))return!1;var e=a.getExprProperties(t||{},l);return!e.hidden&&!1!==e.visible}));var v=i||(s?a.makeHorizontalDeeper(s,h.length):void 0);return u("div",{className:d("InputGroup","InputGroup-validation--".concat(m),n,{"is-focused":this.state.isFocused},{"is-mobile":f})},h.map((function(e,o){var r=~["icon","plain","tpl","button","submit","reset"].indexOf(e&&e.type),n=t.renderControl(e,o,{formHorizontal:v,formMode:"normal",inputOnly:!0,inputGroupControl:{name:t.props.name,path:t.props.$path,schema:t.props.$schema},key:o,static:p,disabled:c,onFocus:t.handleFocus,onBlur:t.handleBlur});return r?u("span",{key:o,className:d(e.addOnclassName,~["button","submit","reset"].indexOf(e&&e.type)?"InputGroup-btn":"InputGroup-addOn")},n):n})))},e.defaultProps={validationConfig:{errorMode:"full",delimiter:"; "}},e}(l.default.Component),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e=n.__decorate([a.FormItem({type:"input-group",strictMode:!1})],e)}(p);e.InputGroup=p,e.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Form/UserSelect.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/UserSelect",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/UserSelect"),o=e("node_modules/amis-ui/lib/components/UserTabSelect"),i=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),l=e("node_modules/classnames/index"),d=e("node_modules/amis-core/lib/index"),u=e("node_modules/lodash/find"),c=e("node_modules/amis/lib/renderers/Form/StaticHoc");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=p(r),f=p(o),m=p(s),_=p(l),v=p(u),y=e("node_modules/react/index"),g=(y.default||y).createElement;(y.default||y).Fragment;var b=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook()},t.prototype.onSearch=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,s,l,u,c,p,h;return i.__generator(this,(function(f){switch(f.label){case 0:if(n=this.props,r=n.searchApi,o=n.setLoading,s=n.env,r=(null==a?void 0:a.searchApi)||r,l=(null==a?void 0:a.searchTerm)||this.props.searchTerm||"term",u=(null==a?void 0:a.searchParam)||this.props.searchParam||{},c=i.__assign(((h={})[l]=e,h),u),!d.isEffectiveApi(r,c))return[2,Promise.resolve([])];o(!0),f.label=1;case 1:return f.trys.push([1,,3,4]),[4,s.fetcher(r,c,{cancelExecutor:t,autoAppend:!0})];case 2:return p=f.sent(),[2,p.data&&p.data.options||p.data||[]];case 3:return o(!1),[7];case 4:return[2]}}))}))},t.prototype.deferLoad=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,s,l,u,c;return i.__generator(this,(function(i){switch(i.label){case 0:if(n=this.props,r=n.env,o=n.deferApi,s=n.setLoading,n.formInited,n.addHook,o=(null==a?void 0:a.deferApi)||o,!r||!r.fetcher)throw new Error("fetcher is required");if(l=d.createObject(e,{}),!d.isEffectiveApi(o,l))return[2,Promise.resolve([])];i.label=1;case 1:return i.trys.push([1,,3,4]),[4,r.fetcher(o,l)];case 2:return u=i.sent(),c=u.data&&u.data.options||u.data||[],t&&c.forEach((function(e){e.isRef=!0})),[2,c];case 3:return s(!1),[7];case 4:return[2]}}))}))},t.prototype.changeValue=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,a,n,r,o,s,l,u,c,p,h,f;return i.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,a=t.joinValues,n=t.extractValue,r=t.delimiter,o=t.multiple,s=t.valueField,l=t.onChange,u=t.options,t.setOptions,t.data,c=t.dispatchEvent,p=e,h=[],(Array.isArray(e)?e:e?[e]:[]).forEach((function(e){v.default(u,(function(t){return t[s||"value"]==e[s||"value"]}))||h.push(e)})),a?p=o?Array.isArray(e)?e.map((function(e){return e[s||"value"]})).join(r):e?e[s||"value"]:"":p?p[s||"value"]:"":n&&(p=o?Array.isArray(e)?e.map((function(e){return e[s||"value"]})):e?[e[s||"value"]]:[]:p?p[s||"value"]:""),[4,c("change",d.resolveEventData(this.props,{value:p,options:u,items:u}))];case 1:return(null==(f=i.sent())?void 0:f.prevented)||l(p),[2]}}))}))},t.prototype.renderStatic=function(){var e=this.props,t=e.selectedOptions,a=e.labelField,n=void 0===a?"label":a,r=e.classnames;return"avatar"===n?t.map((function(e,t){return g("img",{key:t,className:r("UserSelect-avatar-img"),src:e[n],alt:""})})):t.map((function(e){return e[n]})).join(",")},t.prototype.render=function(){var e=this,t=this.props,a=t.showNav,n=t.navTitle,r=t.searchable,o=t.options,i=t.className;t.style;var s=t.selectedOptions,l=t.tabOptions,d=t.multi,u=t.multiple,c=t.isDep,p=t.isRef,m=t.placeholder,v=t.searchPlaceholder,y=t.tabMode,b=t.data,S=t.displayFields,F=t.labelField,A=t.loadingConfig;return null==l||l.forEach((function(t){t.deferLoad=e.deferLoad,t.onChange=e.changeValue,t.onSearch=e.onSearch})),g("div",{className:_.default("UserSelectControl",i)},y?g(f.default,{selection:s,tabOptions:l,multiple:u,displayFields:S,onChange:this.changeValue,onSearch:this.onSearch,deferLoad:this.deferLoad,data:b}):g(h.default,{loadingConfig:A,showNav:a,navTitle:n,selection:s,options:o,multi:d,multiple:u,searchable:r,placeholder:m,searchPlaceholder:v,deferLoad:this.deferLoad,onChange:this.changeValue,onSearch:this.onSearch,displayFields:S,labelField:F,isDep:c,isRef:p}))},t.defaultProps={showNav:!0},i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String,Function,Object]),i.__metadata("design:returntype",Promise)],t.prototype,"onSearch",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Boolean,Object]),i.__metadata("design:returntype",Promise)],t.prototype,"deferLoad",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Promise)],t.prototype,"changeValue",null),i.__decorate([c.supportStatic(),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"render",null),t}(m.default.Component),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([d.OptionsControl({type:"users-select"})],t)}(b);t.UserSelectControlRenderer=S,t.default=b}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputSignature.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputSignature",(function(e,n,t,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Signature"),r=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index"),s=e("node_modules/lodash/pick");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(a),c=d(l),m=d(s),p=e("node_modules/react/index"),b=(p.default||p).createElement;(p.default||p).Fragment;var f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.classnames,t=e.className,o=e.onChange,a=m.default(this.props,["value","width","height","mobileUI","embed","color","bgColor","clearBtnLabel","clearBtnIcon","undoBtnLabel","undoBtnIcon","confirmBtnLabel","confirmBtnIcon","embedConfirmLabel","embedConfirmIcon","ebmedCancelLabel","ebmedCancelIcon","embedBtnIcon","embedBtnLabel"]);return b(u.default,r.__assign({classnames:n,className:t,onChange:o},a))},n}(c.default.Component),_=function(e){function n(n,t){var o=e.call(this,n)||this;return t.registerComponent(o),o}return r.__extends(n,e),n.prototype.componentWillUnmount=function(){var n;null===(n=e.prototype.componentWillUnmount)||void 0===n||n.call(this),this.context.unRegisterComponent(this)},n.contextType=i.ScopedContext,n=r.__decorate([i.FormItem({type:"input-signature",sizeMutable:!1}),r.__metadata("design:paramtypes",[Object,Object])],n)}(f);n.InputSignatureRenderer=_,n.default=f}));
|
||
;/*!node_modules/amis/lib/renderers/Form/InputVerificationCode.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Form/InputVerificationCode",(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/VerificationCode"),a=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(r),_=u(o),l=e("node_modules/react/index"),p=(l.default||l).createElement;(l.default||l).Fragment;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.onFinish=function(e){return a.__awaiter(this,void 0,void 0,(function(){var t,n,i,r;return a.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,n=t.dispatchEvent,i=t.data,[4,n("finish",a.__assign(a.__assign({},i),{value:e}),this)];case 1:return null==(r=o.sent())||r.prevented,[2]}}))}))},t.prototype.onChange=function(e){return a.__awaiter(this,void 0,void 0,(function(){var t,n,i,r;return a.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,n=t.onChange,i=t.data,[4,(0,t.dispatchEvent)("change",a.__assign(a.__assign({},i),{value:e}))];case 1:return(null==(r=o.sent())?void 0:r.prevented)||(null==n||n(e)),[2]}}))}))},t.prototype.render=function(){var e=this.props.separator;return p(d.default,a.__assign({},this.props,{separator:"string"==typeof e?function(t){return s.resolveVariableAndFilter(e,t)}:function(){},onFinish:this.onFinish,onChange:this.onChange}))},a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[String]),a.__metadata("design:returntype",Promise)],t.prototype,"onFinish",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[String]),a.__metadata("design:returntype",Promise)],t.prototype,"onChange",null),t}(_.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([s.FormItem({type:"input-verification-code"})],t)}(c);t.VerificationCodeControlRenderer=f,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Grid2D.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Grid2D",(function(e,r,t,i){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(d),l=e("node_modules/react/index"),u=(l.default||l).createElement;(l.default||l).Fragment;var h={left:"start",right:"end",center:"center",auto:"stretch"},p={top:"start",bottom:"end",middle:"center",auto:"stretch"},c=function(e){function r(r){return e.call(this,r)||this}return n.__extends(r,e),r.prototype.renderChild=function(e,r){var t=this.props;return(0,t.render)(e,r,{disabled:t.disabled})},r.prototype.renderGrid=function(e,r,t){var i=this.props,n=i.itemRender,d=i.data;if(!o.isVisible(e,d))return null;var s={gridColumnStart:e.x,gridColumnEnd:e.x+e.w,gridRowStart:e.y,gridRowEnd:e.y+e.h,justifySelf:e.align?h[e.align]:"stretch",alignSelf:e.valign?p[e.valign]:"stretch"};return u("div",{key:r,style:s,className:e.gridClassName},n?n(e,r,t,this.props):this.renderChild("grid2d/".concat(r),e))},r.prototype.renderGrids=function(){var e=this,r=this.props.grids;return r.map((function(t,i){return e.renderGrid(t,i,r.length)}))},r.prototype.render=function(){var e=this.props,r=e.grids,t=e.cols,i=e.gap,d=e.gapRow,o=e.width,s=e.rowHeight,a=e.style,l=e.id,h=new Array(t);h.fill("1fr");var p=0;r.forEach((function(e,r){var t=e.y+e.h-1;t>p&&(p=t)}));var c=new Array(p);c.fill(s),r.forEach((function(e){e.width&&(h[e.x-1]=Number.isInteger(e.width)?e.width+"px":e.width),e.height&&(c[e.y-1]=Number.isInteger(e.height)?e.height+"px":e.height)}));var g=n.__assign(n.__assign({},a),{display:"grid",columnGap:i,rowGap:void 0===d?i:d,width:o,gridTemplateColumns:h.join(" "),gridTemplateRows:c.join(" ")});return u("div",{style:g,"data-id":l},this.renderGrids())},r.propsList=["grids"],r.defaultProps={cols:12,width:"auto",gap:0,rowHeight:"3.125rem"},r}(a.default.Component),g=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(r,e),r=n.__decorate([o.Renderer({type:"grid-2d"})],r)}(c);r.Grid2DRenderer=g,r.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/VBox.js*/
|
||
amis.define("node_modules/amis/lib/renderers/VBox",(function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),a=e("node_modules/classnames/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=d(o),u=d(a),c=e("node_modules/react/index"),f=(c.default||c).createElement;(c.default||c).Fragment;var p=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(r,e),r.prototype.renderChild=function(e,r){return(0,this.props.render)(e,r)},r.prototype.renderCell=function(e,r){var t=this.props.classPrefix;return f("div",{className:u.default("".concat(t,"Vbox-cell"),e.cellClassName)},this.renderChild("row/".concat(r),e))},r.prototype.render=function(){var e=this,r=this.props,t=r.className,n=r.style,s=r.rows,o=r.classPrefix;return f("div",{className:u.default("".concat(o,"Vbox"),t),style:n},Array.isArray(s)?s.map((function(r,t){return f("div",{className:u.default("row-row",r.rowClassName),key:t},e.renderCell(r,t))})):null)},r.propsList=["rows"],r.defaultProps={},r}(i.default.Component),m=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(r,e),r=s.__decorate([l.Renderer({type:"vbox"})],r)}(p);r.VBoxRenderer=m,r.default=p}));
|
||
;/*!node_modules/amis/lib/renderers/Images.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Images",(function(e,a,s,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),n=e("node_modules/amis/lib/renderers/Image");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=o(i),d=e("node_modules/react/index"),c=(d.default||d).createElement;(d.default||d).Fragment;var g=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.list=[],a}return r.__extends(a,e),a.prototype.handleEnlarge=function(e){var a=this.props,s=a.onImageEnlarge,t=a.src,i=a.originalSrc;s&&s(r.__assign(r.__assign({},e),{originalSrc:e.originalSrc||e.src,list:this.list.map((function(e){return{src:t?l.filter(t,e,"| raw"):e&&e.image||e,originalSrc:i?l.filter(i,e,"| raw"):(null==e?void 0:e.src)||l.filter(t,e,"| raw")||(null==e?void 0:e.image)||e,title:e&&(e.enlargeTitle||e.title),caption:e&&(e.enlargeCaption||e.description||e.caption)}}))}),this.props)},a.prototype.render=function(){var e=this,a=this.props,s=a.className,t=a.style,i=a.defaultImage,o=a.thumbMode,m=a.thumbRatio,d=a.data;a.name;var g=a.placeholder,p=a.classnames,u=a.source,_=a.delimiter,h=a.enlargeAble,y=a.enlargeWithGallary,f=a.src,C=a.originalSrc,b=a.listClassName,N=a.options,v=a.showToolbar,A=a.toolbarActions,I=a.imageGallaryClassName;a.galleryControlClassName;var w,S,T=a.id,x=a.wrapperCustomStyle,E=a.env,F=a.themeCss;return a.imagesControlClassName,"string"==typeof u&&l.isPureVariable(u)?S=l.resolveVariableAndFilter(u,d,"| raw")||void 0:Array.isArray(w=l.getPropValue(this.props))||"string"==typeof w?S=w:Array.isArray(N)&&(S=N),"string"==typeof S?S=S.split(_):S&&!Array.isArray(S)&&(S=[S]),this.list=S,c("div",{className:p("ImagesField",s,l.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"imagesControlClassName",id:T,themeCss:F})),l.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"wrapperCustomStyle",id:T,themeCss:x}))),style:t},Array.isArray(S)?c("div",{className:p("Images",b)},S.map((function(a,s){return c(n.default,{index:s,className:p("Images-item"),key:s,src:(f?l.filter(f,a,"| raw"):a&&a.image)||a,originalSrc:(C?l.filter(C,a,"| raw"):a&&a.src)||a,title:a&&a.title,caption:a&&(a.description||a.caption),thumbMode:o,thumbRatio:m,enlargeAble:h,enlargeWithGallary:y,onEnlarge:e.handleEnlarge,showToolbar:v,imageGallaryClassName:"".concat(I," ").concat(l.setThemeClassName(r.__assign(r.__assign({},e.props),{name:"imageGallaryClassName",id:T,themeCss:F}))," ").concat(l.setThemeClassName(r.__assign(r.__assign({},e.props),{name:"galleryControlClassName",id:T,themeCss:F}))),toolbarActions:A})}))):i?c("div",{className:p("Images",b)},c(n.default,{className:p("Images-item"),src:i,thumbMode:o,thumbRatio:m})):g,c(l.CustomStyle,r.__assign({},this.props,{config:{wrapperCustomStyle:x,id:T,themeCss:F,classNames:[{key:"imagesControlClassName"},{key:"galleryControlClassName"}]},env:E})))},a.defaultProps={className:"",delimiter:",",defaultImage:n.imagePlaceholder,placehoder:"-",thumbMode:"contain",thumbRatio:"1:1"},r.__decorate([l.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",void 0)],a.prototype,"handleEnlarge",null),a}(m.default.Component),p=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(a,e),a=r.__decorate([l.Renderer({type:"images"})],a)}(g);a.ImagesField=g,a.ImagesFieldRenderer=p}));
|
||
;/*!node_modules/amis-ui/lib/components/VirtualList.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/VirtualList",(function(e,i,t,s){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var u=e("node_modules/amis-ui/lib/components/virtual-list/index");i.default=u.default}));
|
||
;/*!node_modules/amis/lib/renderers/Log.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Log",(function(e,t,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/SearchBox"),o=e("node_modules/amis-ui/lib/components/Icon"),n=e("node_modules/amis-ui/lib/components/VirtualList"),l=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),u=e("node_modules/amis-core/lib/index");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(i),h=c(o),f=c(n),p=c(a),g=e("node_modules/react/index"),m=(g.default||g).createElement;(g.default||g).Fragment;var v={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",90:"grey"},L={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white"},y=function(e){function t(t){var r=e.call(this,t)||this;return r.isDone=!1,r.autoScroll=!1,r.state={lastLine:"",logs:[],originLastLine:"",originLogs:[],refresh:!0,showLineNumber:!1,filterWord:""},r.refresh=function(e){var t=r.state.refresh;r.setState({refresh:!t}),t||(r.clear(e),r.loadLogs()),e.preventDefault()},r.clear=function(e){r.setState({logs:r.logs=[],lastLine:r.lastLine="",originLogs:[],originLastLine:""}),null==e||e.preventDefault()},r.filterWord=function(e,t,s){var i=e,o=t;""!==s&&null!=s&&s.length>0&&(e=e.filter((function(e){return e.includes(s)})),t.includes(s)||(t="")),r.setState({filterWord:s,lastLine:r.lastLine=t,logs:r.logs=e,originLogs:i,originLastLine:o})},r.addLines=function(e){e=e.concat();var t=r.props.maxLength,s=r.lastLine||"",i=(r.logs||[]).concat();1===e.length?(s+=e[0],r.setState({lastLine:r.lastLine=s})):(e[0]=s+(e[0]||""),s=e.pop()||"",t&&i.length+e.length>t&&i.splice(0,i.length+e.length-t),i=i.concat(e),r.filterWord(i,s,r.state.filterWord))},r.logRef=p.default.createRef(),r.autoScroll=t.autoScroll||!1,r.pauseOrResumeScrolling=r.pauseOrResumeScrolling.bind(r),r}return l.__extends(t,e),t.prototype.componentWillUnmount=function(){this.logRef&&this.logRef.current&&this.logRef.current.removeEventListener("scroll",this.pauseOrResumeScrolling)},t.prototype.componentDidMount=function(){if(this.autoScroll&&this.logRef&&this.logRef.current&&this.logRef.current.addEventListener("scroll",this.pauseOrResumeScrolling),this.props.source){var e="string"==typeof this.props.source?u.resolveVariableAndFilter(this.props.source,this.props.data,"| raw"):this.props.source;e&&u.isEffectiveApi(e)?this.loadLogs():("string"==typeof e||Array.isArray(e)&&e.every((function(e){return"string"==typeof e})))&&(this.clear(),this.addLines(Array.isArray(e)?e:[e]))}},t.prototype.componentDidUpdate=function(e){if(this.autoScroll&&this.logRef&&this.logRef.current&&(this.logRef.current.scrollTop=this.logRef.current.scrollHeight),this.props.source){var t="string"==typeof this.props.source?u.resolveVariableAndFilter(this.props.source,this.props.data,"| raw"):this.props.source;if(t&&u.isEffectiveApi(t))u.isApiOutdated(e.source,this.props.source,e.data,this.props.data)&&this.loadLogs();else if("string"==typeof t||Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))){u.resolveVariableAndFilter(e.source,e.data,"| raw")!==t&&t&&(this.clear(),this.addLines(Array.isArray(t)?t:[t]))}}},t.prototype.pauseOrResumeScrolling=function(){if(this.logRef&&this.logRef.current){var e=this.logRef.current,t=e.scrollHeight,r=e.scrollTop,s=e.offsetHeight;this.autoScroll=t-(r+s)<50}},t.prototype.loadLogs=function(){var e,t,r;return l.__awaiter(this,void 0,void 0,(function(){var s,i,o,n,a,c,d,h,f,p,g,m,v,L,y,b,R,_=this;return l.__generator(this,(function(l){switch(l.label){case 0:return s=this.props,i=s.source,o=s.data,n=s.env,a=s.translate,c=s.encoding,s.maxLength,d=s.credentials,h=void 0===d?"include":d,(f=u.buildApi(i,o)).url?[4,fetch(f.url,{method:(null===(e=f.method)||void 0===e?void 0:e.toLocaleUpperCase())||"GET",headers:f.headers||void 0,body:f.data?JSON.stringify(f.data):void 0,credentials:h})]:[2];case 1:if(200!==(p=l.sent()).status)return[3,8];if(!(g=p.body))return[2];m=g.getReader(),l.label=2;case 2:return this.state.refresh?[3,4]:[4,m.cancel("click cancel button").then((function(){_.props.env.notify("success","日志已经停止刷新")}))];case 3:l.sent(),l.label=4;case 4:return[4,m.read()];case 5:if(v=l.sent(),L=v.done,(y=v.value)&&(b=new TextDecoder(c).decode(y,{stream:!0}),R=b.split("\n"),this.addLines(R)),L)return this.isDone=!0,[2];l.label=6;case 6:return[3,2];case 7:return[3,9];case 8:!f.silent&&n.notify("error",null!==(r=null===(t=null==f?void 0:f.messages)||void 0===t?void 0:t.failed)&&void 0!==r?r:a("fetchFailed")),l.label=9;case 9:return[2]}}))}))},t.prototype.ansiColrToHtml=function(e){if(!0===this.props.disableColor)return e;var t=e.match(/\u001b\[([^m]+)m/);if(t){var r=t[1];if(r){if(e=e.replace(/\u001b[^m]*?m/g,""),r in v)return m("span",{style:{color:v[r]}},e);if(r in L)return m("span",{style:{backgroundColor:L[r]}},e.replace(/\u001b[^m]*?m/g,""))}}return e},t.prototype.renderHighlightWord=function(e){var t=this,r=this.props.classnames,s=this.state.filterWord;if(""===s)return this.ansiColrToHtml(e);var i=e.split(s);return i.map((function(e,o){return o<i.length-1?m("span",null,t.ansiColrToHtml(e),m("span",{className:r("Log-line-highlight")},s)):e}))},t.prototype.renderLine=function(e,t,r){var s=this.props,i=s.classnames;return s.disableColor,m("div",{className:i("Log-line"),key:e},r&&m("span",{className:i("Log-line-number")},e+1," "),this.renderHighlightWord(t))},t.prototype.render=function(){var e=this,t=this.props,r=t.source,s=t.className,i=t.style,o=t.classnames,n=t.placeholder,a=t.height,u=t.rowHeight;t.disableColor;var c,g=t.translate,v=t.operation,L=this.state,y=L.refresh,b=L.showLineNumber,R=g(n);r||(R=g("Log.mustHaveSource"));var _=this.state.lastLine?this.state.logs.concat([this.state.lastLine]):this.state.logs,S=u;return c=S?m(f.default,{height:a,itemCount:_.length,itemSize:u,renderItem:function(t){var r=t.index,s=t.style;return m("div",{className:o("Log-line"),key:r,style:l.__assign(l.__assign({},s),{whiteSpace:"nowrap"})},b&&m("span",{className:o("Log-line-number")},r+1," "),e.renderHighlightWord(_[r]))}}):_.map((function(t,r){return e.renderLine(r,t,b)})),m("div",{className:o("Log",s),style:i},m("div",{className:o("Log-operation")},v&&(null==v?void 0:v.length)>0&&m(p.default.Fragment,null,v.includes("stop")&&m("a",{title:g("stop"),className:y?"":"is-disabled",onClick:this.refresh},m(h.default,{icon:"pause"})),v.includes("restart")&&m("a",{title:g("reload"),className:y?"is-disabled":"",onClick:this.refresh},m(h.default,{icon:"refresh"})),v.includes("showLineNumber")&&m("a",{title:g(b?"Log.notShowLineNumber":"Log.showLineNumber"),onClick:function(t){e.setState({showLineNumber:!b}),t.preventDefault()}},m(h.default,{icon:b?"invisible":"view"})),v.includes("clear")&&m("a",{onClick:this.clear,title:g("clear")},m(h.default,{icon:"remove"})),v&&v.includes("filter")&&m(d.default,{className:o("Log-filter-box"),placeholder:"过滤词",onChange:function(t){return e.filterWord(e.state.originLogs,e.state.lastLine,t)},value:this.state.filterWord}))),m("div",{ref:this.logRef,className:o("Log-body"),style:{height:S?"auto":a}},S||c.length?c:R))},t.defaultProps={height:500,autoScroll:!0,placeholder:"loading",encoding:"utf-8"},t}(p.default.Component),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t=l.__decorate([u.Renderer({type:"log"})],t)}(y);t.Log=y,t.LogRenderer=b}));
|
||
;/*!node_modules/amis/lib/renderers/Operation.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Operation",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(l),a=e("node_modules/react/index"),u=(a.default||a).createElement;(a.default||a).Fragment;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,r=e.buttons,l=e.render,o=e.classnames,s=e.testIdBuilder;return u("div",{className:o("OperationField",t),style:n},Array.isArray(r)?r.map((function(e,t){return l("".concat(t),i.__assign({type:"button",size:e.size||"sm",level:e.level||(e.icon&&!e.label?"link":"")},e),{key:t,testIdBuilder:null==s?void 0:s.getChild("button-".concat(e.testid||e.id||t))})})):null)},t.propsList=["buttons","label"],t.defaultProps={},t}(d.default.Component),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([o.Renderer({type:"operation"})],t)}(c);t.OperationField=c,t.OperationFieldRenderer=p}));
|
||
;/*!node_modules/amis/lib/renderers/Page.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Page",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/PullRefresh"),i=e("node_modules/amis-ui/lib/components/Alert2"),s=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),d=e("node_modules/amis-core/lib/index"),p=e("node_modules/mobx-state-tree/dist/mobx-state-tree");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=c(o),u=c(i),m=c(s),v=c(l),g=e("node_modules/react/index"),f=(g.default||g).createElement;(g.default||g).Fragment;var y=function(e){function t(t){var a=e.call(this,t)||this;return d.bulkBindFunctions(a,["handleAction","handleChange","handleBulkChange","handleQuery","handleDialogConfirm","handleDialogClose","handleDrawerConfirm","handleDrawerClose","handleClick","reload","silentReload","initInterval"]),a.style=document.createElement("style"),a.style.setAttribute("data-page",""),document.getElementsByTagName("head")[0].appendChild(a.style),a.updateStyle(),a.varStyle=document.createElement("style"),a.varStyle.setAttribute("data-vars",""),document.getElementsByTagName("head")[0].appendChild(a.varStyle),a.updateVarStyle(),a}return r.__extends(t,e),t.prototype.updateStyle=function(){this.props.css||this.props.mobileCSS?this.style.innerHTML="\n ".concat(this.buildCSS(this.props.css),"\n\n @media (max-width: 768px) {\n ").concat(this.buildCSS(this.props.mobileCSS),"\n }\n "):this.style.innerHTML=""},t.prototype.buildCSS=function(e){if(!e)return"";var t="";for(var a in e){var n=e[a],o="";for(var i in n){var s="",r=n[i];if("string"==typeof r)o+=" ".concat(i,": ").concat(r,";\n");else{for(var l in r)s+=" ".concat(l,":").concat(r[l],";");o+=" ".concat(i," {").concat(s,"}\n")}}t+="\n ".concat(a," {\n ").concat(o,"\n }\n ")}return t},t.prototype.updateVarStyle=function(){var e=this.props.cssVars,t="";if(e){for(var a in e)if(a.startsWith("--")){if(-1!==a.indexOf(":"))continue;var n=e[a];if("string"==typeof n&&(-1!==n.indexOf("expression(")||-1!==n.indexOf(";")))continue;t+="".concat(a,": ").concat(n,"; \n")}this.varStyle.innerHTML="\n :root {\n ".concat(t,"\n }\n ")}},t.prototype.componentDidMount=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,a,n,o,i,s,l,c,h;return r.__generator(this,(function(r){switch(r.label){case 0:return e=this.props,t=e.initApi,a=e.initFetch,n=e.initFetchOn,o=e.store,i=e.messages,s=e.data,l=e.dispatchEvent,c=e.env,this.mounted=!0,[4,l("init",s,this)];case 1:return h=r.sent(),(null==c?void 0:c.tracker)&&c.tracker({eventType:"pageLoaded"},this.props),(null==h?void 0:h.prevented)||!p.isAlive(o)?[2]:(d.isEffectiveApi(t,o.data,a,n)&&o.fetchInitData(t,o.data,{successMessage:i&&i.fetchSuccess,errorMessage:i&&i.fetchFailed}).then(this.initInterval),[2])}}))}))},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.store,n=t.initApi;if(t.initFetchOn&&t.initFetch&&!e.initFetch||!1!==t.initFetch&&d.isApiOutdated(e.initApi,n,e.data,t.data)){var o=t.messages;d.isEffectiveApi(n,a.data)&&a.fetchData(n,a.data,{successMessage:o&&o.fetchSuccess,errorMessage:o&&o.fetchFailed}).then(this.initInterval)}JSON.stringify(t.css)===JSON.stringify(e.css)&&JSON.stringify(t.mobileCSS)===JSON.stringify(e.mobileCSS)||this.updateStyle(),JSON.stringify(t.cssVars)!==JSON.stringify(e.cssVars)&&this.updateVarStyle(),d.isObjectShallowModified(e.defaultData,t.defaultData)&&a.reInitData(t.defaultData)},t.prototype.componentWillUnmount=function(){var e,t;this.mounted=!1,clearTimeout(this.timer),this.style&&(null===(e=this.style.parentNode)||void 0===e||e.removeChild(this.style)),this.varStyle&&(null===(t=this.varStyle.parentNode)||void 0===t||t.removeChild(this.varStyle))},t.prototype.reloadTarget=function(e,t){},t.prototype.handleAction=function(e,t,a,n,o){var i=this;void 0===n&&(n=!1);var s=this.props,l=s.env,p=s.store,c=s.messages,h=s.onAction;if("dialog"===t.actionType)return p.setCurrentAction(t,this.props.resolveDefinitions),new Promise((function(e){p.openDialog(a,void 0,(function(a,n){var o;null===(o=t.callback)||void 0===o||o.call(t,a,n),e({confirmed:a,value:n})}),o||i.context)}));if("drawer"===t.actionType)return p.setCurrentAction(t,this.props.resolveDefinitions),new Promise((function(e){p.openDrawer(a,void 0,(function(a,n){var o;null===(o=t.callback)||void 0===o||o.call(t,a,n),e({confirmed:a,value:n})}),o)}));if("ajax"===t.actionType){if(p.setCurrentAction(t,this.props.resolveDefinitions),!d.isEffectiveApi(t.api,a))return;return p.saveRemote(t.api,a,{successMessage:t.messages&&t.messages.success||c&&c.saveSuccess,errorMessage:t.messages&&t.messages.failed||c&&c.saveSuccess}).then((function(){return r.__awaiter(i,void 0,void 0,(function(){var e;return r.__generator(this,(function(a){switch(a.label){case 0:return t.feedback&&d.isVisible(t.feedback,p.data)?[4,this.openFeedback(t.feedback,p.data)]:[3,2];case 1:a.sent(),a.label=2;case 2:return(e=t.redirect&&d.filter(t.redirect,p.data))&&l.jumpTo(e,t,p.data),t.reload&&this.reloadTarget(d.filterTarget(t.reload,p.data),p.data),[2]}}))}))})).catch((function(e){if(n||t.countDown)throw e}))}return h(e,t,a,n,o||this.context)},t.prototype.handleQuery=function(e){return this.props.initApi?!((null==e?void 0:e.hasOwnProperty("orderBy"))&&!d.isApiOutdated(this.props.initApi,this.props.initApi,this.props.store.data,d.createObject(this.props.store.data,e)))&&void this.receive(e):!!this.props.onQuery&&this.props.onQuery(e)},t.prototype.handleDialogConfirm=function(e,t){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];var o=this.props.store;t.mergeData&&1===e.length&&e[0]&&o.updateData(e[0]);var i=o.action.dialog;i&&i.onConfirm&&!1===i.onConfirm.apply(i,r.__spreadArray([e,t],r.__read(a),!1))||o.closeDialog(!0,e)},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1),this.props.store.closeDialog(e)},t.prototype.handleDrawerConfirm=function(e,t){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];var o=this.props.store;t.mergeData&&1===e.length&&e[0]&&o.updateData(e[0]);var i=o.action.dialog;i&&i.onConfirm&&!1===i.onConfirm.apply(i,r.__spreadArray([e,t],r.__read(a),!1))||o.closeDrawer(!0,e)},t.prototype.handleDrawerClose=function(){this.props.store.closeDrawer(!1)},t.prototype.handleClick=function(e){var t,a=e.target,n=this.props.env,o="A"===a.tagName&&a.hasAttribute("data-link")?a.getAttribute("data-link"):null===(t=a.closest("a[data-link]"))||void 0===t?void 0:t.getAttribute("data-link");n&&o&&(n.jumpTo(o,void 0,this.props.data),e.preventDefault())},t.prototype.handleResizeMouseDown=function(e){3==e.nativeEvent.which||(this.codeWrap=e.currentTarget.parentElement,document.addEventListener("mousemove",this.handleResizeMouseMove),document.addEventListener("mouseup",this.handleResizeMouseUp),this.startX=e.clientX,this.startWidth=this.codeWrap.offsetWidth)},t.prototype.handleResizeMouseMove=function(e){var t=this.props,a=t.asideMinWidth,n=void 0===a?160:a,o=t.asideMaxWidth,i=void 0===o?350:o,s=t.asidePosition,r=e.clientX-this.startX,l="right"===s?this.startWidth-r:this.startWidth+r,d=Math.min(Math.max(l,n),i);this.codeWrap.style.cssText+="width: ".concat(d,"px")},t.prototype.handleResizeMouseUp=function(){document.removeEventListener("mousemove",this.handleResizeMouseMove),document.removeEventListener("mouseup",this.handleResizeMouseUp)},t.prototype.openFeedback=function(e,t){var a=this;return new Promise((function(n){var o=a.props.store;o.setCurrentAction({type:"button",actionType:"dialog",dialog:e},a.props.resolveDefinitions),o.openDialog(t,void 0,(function(e){n(e)}),a.context)}))},t.prototype.reload=function(e,t,a,n,o){return r.__awaiter(this,void 0,void 0,(function(){var e,a,i,s;return r.__generator(this,(function(r){switch(r.label){case 0:return t?[2,this.receive(t,void 0,o)]:(e=this.props,a=e.store,i=e.initApi,clearTimeout(this.timer),d.isEffectiveApi(i,a.data)?[4,a.fetchData(i,a.data,{silent:n})]:[3,2]);case 1:s=r.sent(),this.initInterval(s),r.label=2;case 2:return[2,a.data]}}))}))},t.prototype.receive=function(e,t,a){this.props.store.updateData(e,void 0,a),this.reload()},t.prototype.silentReload=function(e,t){this.reload(t,void 0,void 0,!0)},t.prototype.initInterval=function(e){var t,a=this.props,n=a.interval,o=a.silentPolling,i=a.stopAutoRefreshWhen,s=a.data,l=a.dispatchEvent,p=a.store;return l("inited",d.createObject(s,r.__assign(r.__assign({},null==e?void 0:e.data),{responseData:(null==e?void 0:e.ok)?null!==(t=null==e?void 0:e.data)&&void 0!==t?t:{}:e,responseStatus:void 0===(null==e?void 0:e.status)?(null==p?void 0:p.error)?1:0:null==e?void 0:e.status,responseMsg:(null==e?void 0:e.msg)||(null==p?void 0:p.msg)}))),(null==e?void 0:e.ok)&&n&&this.mounted&&(!i||!d.evalExpression(i,s))&&(this.timer=setTimeout(o?this.silentReload:this.reload,Math.max(n,1e3))),e},t.prototype.handleRefresh=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,a,n;return r.__generator(this,(function(o){switch(o.label){case 0:return e=this.props,t=e.dispatchEvent,a=e.data,[4,t("pullRefresh",a)];case 1:return(null==(n=o.sent())?void 0:n.prevented)||this.reload(),[2]}}))}))},t.prototype.handleChange=function(e,t,a,n){var o=this.props,i=o.store,s=o.onChange;"string"==typeof t&&t&&i.changeValue(t,e,n),null==s||s.apply(null,arguments)},t.prototype.handleBulkChange=function(e){var t,a;null===(a=null===(t=this.props.store)||void 0===t?void 0:t.updateData)||void 0===a||a.call(t,e)},t.prototype.renderHeader=function(){var e=this.props,t=e.title,a=e.subTitle,n=e.remark,o=e.remarkPlacement,i=e.headerClassName,s=e.toolbarClassName,l=e.toolbar,p=e.render,c=e.store,h=e.initApi,u=e.popOverContainer,m=e.env,v=e.classnames,g=e.regions;e.translate;var y,C,_=e.id,b=e.themeCss,A={onAction:this.handleAction,onQuery:h?this.handleQuery:void 0,onChange:this.handleChange,onBulkChange:this.handleBulkChange,pageLoading:c.loading};return(Array.isArray(g)?~g.indexOf("header"):t||a)&&(y=f("div",{className:v("Page-header",i,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"headerControlClassName",id:_,themeCss:b})))},t?f("h2",{className:v("Page-title",d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"titleControlClassName",id:_,themeCss:b})))},p("title",t,A),n?p("remark",{type:"remark",tooltip:n,placement:o||"bottom",container:u||m.getModalContainer}):null):null,a&&f("small",{className:v("Page-subTitle")},p("subTitle",a,A)))),(Array.isArray(g)?~g.indexOf("toolbar"):l)&&(C=f("div",{className:v("Page-toolbar",s,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"toolbarControlClassName",id:_,themeCss:b})))},p("toolbar",l||"",A))),y&&C?f("div",{className:v("Page-headerRow")},y,C):y||C},t.prototype.renderContent=function(e){var t=this.props,a=t.store,n=t.body,o=t.bodyClassName,i=t.render,s=t.classnames,l=t.showErrorMsg,p=t.regions;t.translate;var c=t.loadingConfig;t.initApi;var h=t.id,v=t.env,g=t.themeCss;return f("div",{className:s("Page-content")},f("div",{className:s("Page-main")},this.renderHeader(),f("div",{className:s("Page-body",o,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"bodyControlClassName",id:h,themeCss:g}))),role:"page-body"},f(m.default,{size:"lg",overlay:!0,key:"info",show:a.loading,loadingConfig:c}),!v.forceSilenceInsideError&&a.error&&!1!==l?f(u.default,{level:"danger",showCloseButton:!0,onClose:a.clearMessage},a.msg):null,(Array.isArray(p)?~p.indexOf("body"):n)?i("body",n||"",e):null)))},t.prototype.render=function(){var e=this.props,t=e.className,a=e.store;e.body,e.bodyClassName;var n=e.render,o=e.aside,i=e.asideClassName,s=e.classnames;e.showErrorMsg;var l=e.initApi,p=e.regions,c=e.style,u=e.data,m=e.asideResizor,v=e.asideSticky,g=e.pullRefresh,y=e.mobileUI,C=e.translate;e.loadingConfig;var _=e.id,b=e.wrapperCustomStyle,A=e.env,N=e.themeCss,w=e.asidePosition,D={onAction:this.handleAction,onQuery:l?this.handleQuery:void 0,onChange:this.handleChange,onBulkChange:this.handleBulkChange,pageLoading:a.loading},S=Array.isArray(p)?~p.indexOf("aside"):o&&(!Array.isArray(o)||o.length),k=d.buildStyle(c,u),M=this.renderContent(D);return f("div",{className:s("Page",S?"Page--withSidebar":"",S&&v?"Page--asideSticky":"",S&&w?"Page--".concat(w,"Aside"):"",t,d.setThemeClassName(r.__assign({name:"baseControlClassName",id:_,themeCss:N},this.props)),d.setThemeClassName(r.__assign({name:"wrapperCustomStyle",id:_,themeCss:b},this.props))),onClick:this.handleClick,style:k},S?f("div",{className:s("Page-aside",m?"relative":"Page-aside--withWidth",i,d.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"asideControlClassName",id:_,themeCss:N})))},n("aside",o||"",r.__assign(r.__assign({},D),"string"==typeof o?{inline:!1,className:"Page-asideTplWrapper"}:null)),m?f("div",{onMouseDown:this.handleResizeMouseDown,className:s("Page-asideResizor")}):null):null,y&&g&&!g.disabled?f(h.default,r.__assign({},g,{translate:C,onRefresh:this.handleRefresh}),M):M,n("dialog",r.__assign(r.__assign({},a.action&&a.action.dialog),{type:"dialog"}),{key:"dialog",data:a.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:a.dialogOpen,onAction:this.handleAction,onQuery:l?this.handleQuery:void 0}),n("drawer",r.__assign(r.__assign({},a.action&&a.action.drawer),{type:"drawer"}),{key:"drawer",data:a.drawerData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,show:a.drawerOpen,onAction:this.handleAction,onQuery:l?this.handleQuery:void 0}),f(d.CustomStyle,r.__assign({},this.props,{config:{wrapperCustomStyle:b,id:_,themeCss:N,classNames:[{key:"baseControlClassName",weights:{default:{important:!0},hover:{important:!0},active:{important:!0}}},{key:"bodyControlClassName"},{key:"headerControlClassName"},{key:"titleControlClassName"},{key:"toolbarControlClassName"},{key:"asideControlClassName"}]},env:A})))},t.defaultProps={asideClassName:"",bodyClassName:"",headerClassName:"",initFetch:!0,toolbarClassName:"",messages:{},asideSticky:!0,asidePosition:"left",pullRefresh:{disabled:!0}},t.propsList=["title","subTitle","initApi","initFetchOn","initFetch","headerClassName","bodyClassName","asideClassName","toolbarClassName","toolbar","body","aside","messages","style","showErrorMsg"],r.__decorate([d.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",void 0)],t.prototype,"handleResizeMouseDown",null),r.__decorate([d.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[MouseEvent]),r.__metadata("design:returntype",void 0)],t.prototype,"handleResizeMouseMove",null),r.__decorate([d.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"handleResizeMouseUp",null),r.__decorate([d.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",Promise)],t.prototype,"handleRefresh",null),t}(v.default.Component),C=function(e){function t(t,a){var n=e.call(this,t)||this;return a.registerComponent(n),n}return r.__extends(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.handleAction=function(t,a,n,o,i){return void 0===o&&(o=!1),r.__awaiter(this,void 0,void 0,(function(){var s,l;return r.__generator(this,(function(d){switch(d.label){case 0:return s=i||this.context,"reload"!==a.actionType?[3,1]:(a.target&&s.reload(a.target,n),[3,4]);case 1:return a.target?(a.target.split(",").forEach((function(e){var t=s.getComponentByName(e);t&&t.doAction&&t.doAction(r.__assign(r.__assign({},a),{target:void 0}),n)})),[3,4]):[3,2];case 2:return[4,e.prototype.handleAction.call(this,t,a,n,o,i)];case 3:return l=d.sent(),a.reload&&~["url","link","jump"].indexOf(a.actionType)&&s.reload(a.reload,n),[2,l];case 4:return[2]}}))}))},t.prototype.handleDialogConfirm=function(t,a){for(var n,o,i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var l=this.props.store,d=l.action,p=null!==(n=a.reload)&&void 0!==n?n:d.reload,c=l.getDialogScoped()||this.context;e.prototype.handleDialogConfirm.apply(this,r.__spreadArray([t,a],r.__read(i),!1)),p?c.reload(p,l.data):(null==c?void 0:c.component)!==this&&(null===(o=c.component)||void 0===o?void 0:o.reload)?c.component.reload():this.context.getComponents().filter((function(e){return"crud"===e.props.type})).forEach((function(e){return e.reload&&e.reload()}))},t.prototype.handleDrawerConfirm=function(t,a){var n,o=this,i=this.props.store,s=i.action,r=null!==(n=a.reload)&&void 0!==n?n:s.reload,l=i.getDrawerScoped()||this.context;e.prototype.handleDrawerConfirm.call(this,t,a),setTimeout((function(){var e;r?l.reload(r,i.data):l.component!==o&&(null===(e=null==l?void 0:l.component)||void 0===e?void 0:e.reload)?l.component.reload():o.context.getComponents().filter((function(e){return"crud"===e.props.type})).forEach((function(e){return e.reload&&e.reload()}))}),300)},t.prototype.setData=function(e,t){return this.props.store.updateData(e,void 0,t)},t.prototype.getData=function(){return this.props.store.data},t.contextType=d.ScopedContext,t}(y),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([d.Renderer({type:"page",storeType:d.ServiceStore.name,isolateScope:!0})],t)}(C);t.PageRenderer=_,t.PageRendererBase=C,t.default=y}));
|
||
;/*!node_modules/amis/lib/renderers/PaginationWrapper.js*/
|
||
amis.define("node_modules/amis/lib/renderers/PaginationWrapper",(function(e,a,t,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=p(r),l=e("node_modules/react/index"),d=(l.default||l).createElement;(l.default||l).Fragment;var u=function(e){function a(a){var t=e.call(this,a)||this;return a.store.syncProps(a,void 0,["perPage","mode","ellipsisPageGap","inputName","outputName"]),t}return o.__extends(a,e),a.prototype.componentDidUpdate=function(e){this.props.store.syncProps(this.props,e,["perPage","mode","ellipsisPageGap","inputName","outputName"])},a.prototype.render=function(){var e=this.props,a=e.position,t=e.render,n=e.store,o=e.classnames,r=e.style,i=e.body,p=e.translate,s="none"!==a?t("pager",{type:"pagination"},{activePage:n.page,lastPage:n.lastPage,mode:n.mode,ellipsisPageGap:n.ellipsisPageGap,onPageChange:n.switchTo,perPage:n.perPage,className:"PaginationWrapper-pager"}):null;return d("div",{className:o("PaginationWrapper"),style:r},"top"===a?s:null,i?t("body",i,{data:n.locals}):d("span",null,p("PaginationWrapper.placeholder")),"bottom"===a?s:null)},a.defaultProps={inputName:"items",outputName:"items",perPage:10,position:"top"},a}(s.default.Component),m=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(a,e),a=o.__decorate([i.Renderer({type:"pagination-wrapper",storeType:i.PaginationStore.name})],a)}(u);a.PaginationWrapper=u,a.PaginationWrapperRenderer=m}));
|
||
;/*!node_modules/amis/lib/renderers/Panel.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Panel",(function(e,s,a,o){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var t=e("node_modules/amis-ui/lib/components/Icon"),l=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),n=e("node_modules/amis-core/lib/index"),i=e("node_modules/lodash/omit");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(t),C=d(r),p=d(i),c=e("node_modules/react/index"),h=(c.default||c).createElement;(c.default||c).Fragment;var N=function(e){function s(s){var a=e.call(this,s)||this;return a.state={collapsed:!1},s.mobileUI&&s.collapsible&&(a.state.collapsed=!0),a}return l.__extends(s,e),s.prototype.renderBody=function(){var e=this.props;e.type,e.className,e.style;var s=e.data;e.header;var a=e.body,o=e.render;e.bodyClassName,e.headerClassName,e.actionsClassName,e.footerClassName;var t=e.children;e.title,e.actions,e.footer,e.classPrefix;var r=e.formMode,i=e.formHorizontal,d=e.subFormMode,m=e.subFormHorizontal;e.id,e.themeCss,e.wrapperCustomStyle;var C=l.__rest(e,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","children","title","actions","footer","classPrefix","formMode","formHorizontal","subFormMode","subFormHorizontal","id","themeCss","wrapperCustomStyle"]),c=l.__assign(l.__assign({data:s},p.default(C,n.RENDERER_TRANSMISSION_OMIT_PROPS)),{formMode:d||r,formHorizontal:m||i});return t?"function"==typeof t?t(this.props):t:a?o("body",a,c):null},s.prototype.renderActions=function(){var e=this.props,s=e.actions,a=e.render;return Array.isArray(s)&&s.length?s.map((function(e,s){return a("action",e,{type:e.type||"button",key:s})})):null},s.prototype.render=function(){var e=this,s=this.props;s.type;var a=s.className,o=s.style,t=s.data,r=s.header;s.body;var i=s.render,d=s.bodyClassName,C=s.headerClassName,p=s.actionsClassName,c=s.footerClassName,N=s.footerWrapClassName,u=s.headerControlClassName,f=s.headerTitleControlClassName,_=s.bodyControlClassName,y=s.actionsControlClassName;s.children;var b=s.title,v=s.footer,g=s.affixFooter,P=s.classPrefix,w=s.classnames,x=s.id,S=s.collapsible,T=s.themeCss,k=s.wrapperCustomStyle,M=l.__rest(s,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","footerWrapClassName","headerControlClassName","headerTitleControlClassName","bodyControlClassName","actionsControlClassName","children","title","footer","affixFooter","classPrefix","classnames","id","collapsible","themeCss","wrapperCustomStyle"]),F=l.__assign({data:t},M),R=[],z=this.state.collapsed;if(!z){var A=this.renderActions();A&&R.push(h("div",{key:"actions",className:w("Panel-btnToolbar",p||"Panel-footer",y)},A)),v&&R.push(h("div",{key:"footer",className:w(c||"Panel-footer",y)},i("footer",v,F)))}var H=R.length?h("div",{className:w("Panel-footerWrap",N,g?"Panel-fixedBottom":"",n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"footerControlClassName",id:x,themeCss:T})))},R):null;return h("div",{"data-id":x,className:w("Panel",a||"Panel--default",n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"baseControlClassName",id:x,themeCss:T})),n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"wrapperCustomStyle",id:x,themeCss:k}))),style:o},r?h("div",{className:w(C||"Panel-heading",u,n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"headerControlClassName",id:x,themeCss:T})))},i("header",r,F)):b?h("div",{className:w(C||"Panel-heading",u,{"is-collapsible":S},n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"headerControlClassName",id:x,themeCss:T})))},h("h3",{className:w("Panel-title",f,n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"titleControlClassName",id:x,themeCss:T})))},i("title",b,F)),S?h("span",{className:w("Panel-arrow-wrap"),onClick:function(){e.setState({collapsed:!z})}},h(m.default,{icon:"down-arrow-bold",className:w("Panel-arrow","icon",{"is-collapsed":z})})):null):null,z?null:h("div",{className:w(d||"Panel-body",_,n.setThemeClassName(l.__assign(l.__assign({},this.props),{name:"bodyControlClassName",id:x,themeCss:T})))},this.renderBody()),H,h(n.CustomStyle,l.__assign({},this.props,{config:{wrapperCustomStyle:k,id:x,themeCss:T,classNames:[{key:"baseControlClassName"},{key:"bodyControlClassName"},{key:"headerControlClassName",weights:{default:{suf:".".concat(P,"Panel-heading")}}},{key:"titleControlClassName"},{key:"footerControlClassName"}]},env:this.props.env})))},s.propsList=["header","actions","children","headerClassName","footerClassName","footerWrapClassName","actionsClassName","bodyClassName"],s.defaultProps={},s}(C.default.Component),u=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(s,e),s=l.__decorate([n.Renderer({type:"panel"})],s)}(N);s.PanelRenderer=u,s.default=N}));
|
||
;/*!node_modules/amis/lib/renderers/Plain.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Plain",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),d=e("node_modules/amis-core/lib/index");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(o),l=e("node_modules/react/index"),p=(l.default||l).createElement;(l.default||l).Fragment;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n("click",d.createObject(a,{nativeEvent:e}))},t.prototype.handleMouseEnter=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,d.createObject(a,{nativeEvent:e}))},t.prototype.handleMouseLeave=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,d.createObject(a,{nativeEvent:e}))},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.wrapperComponent,i=e.text,o=e.data,r=e.tpl,s=e.inline,l=e.placeholder,u=e.classnames,c=d.getPropValue(this.props);return p(a||(s?"span":"div"),{className:u("PlainField",t),style:n,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},r||i?d.filter(r||i,o):void 0===c||""===c||null===c?p("span",{className:"text-muted"},l):String(c))},t.defaultProps={wrapperComponent:"",inline:!0,placeholder:"-"},i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(s.default.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([d.Renderer({type:"plain",alias:["text"],name:"plain"})],t)}(u);t.Plain=u,t.PlainRenderer=c}));
|
||
;/*!node_modules/amis/lib/renderers/Property.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Property",(function(e,t,n,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(a),u=e("node_modules/react/index"),d=(u.default||u).createElement;(u.default||u).Fragment;var c=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.prepareRows=function(){var e,t,n=this.props,l=n.column,a=void 0===l?3:l,i=n.items,s=n.source,u=n.data,d=i||(s||[]),c=[],p=[],y=a,b=0,f=o.visibilityFilter(d,u);try{for(var m=r.__values(f),v=m.next();!v.done;v=m.next()){var h=v.value;b+=1;var _=Math.min(h.span||1,a);y-=_;var S={label:h.label,content:h.content,span:_};y>=0?p.push(S):(c.push(p),y=a-_,p=[S]),b===f.length&&c.push(p)}}catch(t){e={error:t}}finally{try{v&&!v.done&&(t=m.return)&&t.call(m)}finally{if(e)throw e.error}}return c},t.prototype.renderRow=function(e){var t=this.props,n=t.render,l=t.contentStyle,r=t.labelStyle,a=t.separator,i=void 0===a?": ":a,u=t.mode,c=void 0===u?"table":u,p=t.data;return e.map((function(e,t){return d("tr",{key:t},e.map((function(e,t){return"table"===c?d(s.default.Fragment,{key:"item-".concat(t)},d("th",{style:o.buildStyle(r,p)},n("label",e.label)),d("td",{colSpan:e.span+e.span-1,style:o.buildStyle(l,p)},n("content",e.content))):d("td",{colSpan:e.span,style:o.buildStyle(l,p),key:"item-".concat(t)},d("span",{style:o.buildStyle(r,p)},n("label",e.label)),i,n("content",e.content))})))}))},t.prototype.render=function(){var e=this.props,t=e.style,n=e.title,l=e.column,r=void 0===l?3:l,a=e.classnames,i=e.className,s=e.titleStyle,u=e.data,c=e.mode,p=void 0===c?"table":c,y=this.prepareRows();return d("div",{className:a("Property","Property--".concat(p),i),style:o.buildStyle(t,u)},d("table",null,n?d("thead",null,d("tr",null,d("th",{colSpan:"table"===p?r+r:r,style:o.buildStyle(s,u)},n))):null,d("tbody",null,this.renderRow(y))))},t}(s.default.Component),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([o.Renderer({type:"property",autoVar:!0})],t)}(c);t.PropertyRenderer=p,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Portlet.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Portlet",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Tabs"),o=e("node_modules/amis-ui/lib/components/Tab"),s=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),i=e("node_modules/lodash/mapValues"),d=e("node_modules/amis-core/lib/index");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(r),p=c(o),m=c(l),b=c(i),f=e("node_modules/react/index"),y=(f.default||f).createElement;(f.default||f).Fragment;var v=function(e){function t(t){var a=e.call(this,t)||this,n=t.activeKey||0;return a.state={activeKey:n},a}return s.__extends(t,e),t.prototype.handleSelect=function(e){var t=this.props,a=t.onSelect,n=t.tabs;if("number"==typeof e&&e<n.length&&this.setState({activeKey:e}),"string"==typeof a){var r=d.str2AsyncFunction(a,"key","props");r&&r(e,this.props)}else"function"==typeof a&&a(e,this.props)},t.prototype.renderToolbarItem=function(e){var t=this.props.render,a=[];return Array.isArray(e)&&e.forEach((function(e,n){return a.push(t("toolbar/".concat(n),s.__assign({type:"button",level:"link",size:"sm"},e),{key:n}))})),a},t.prototype.renderToolbar=function(){var e=this.props,t=e.toolbar,a=e.classnames,n=e.classPrefix,r=e.tabs,o=this.state.activeKey,s=null,l=null,i=t?y("div",{className:a("".concat(n,"toolbar"))},this.renderToolbarItem(t)):null;return void 0!==o&&(l=(s=r[o].toolbar)?y("div",{className:a("".concat(n,"tab-toolbar"))},this.renderToolbarItem(s)):null),i||l?y("div",{className:a("".concat(n,"Portlet-toolbar"))},i,l):null},t.prototype.renderDesc=function(){var e=this.props,t=e.description;e.render;var a=e.classnames,n=e.classPrefix,r=e.data,o=d.filter(t,r);return o?y("span",{className:a("".concat(n,"Portlet-header-desc"))},o):null},t.prototype.renderTabs=function(){var e,t=this,a=this.props,n=a.classnames,r=a.classPrefix,o=a.tabsClassName,l=a.contentClassName,i=a.linksClassName,c=a.tabRender,m=a.render,b=a.data,f=a.mode,v=a.tabsMode,h=a.unmountOnExit,_=a.source,x=a.mountOnEnter,N=a.scrollable,P=a.translate,E=a.addBtnText,O=a.divider,T=v||f,g=d.resolveVariable(_,b),A=this.props.tabs;if(!A)return null;A=Array.isArray(A)?A:[A];var K=[],k=n("".concat(r,"Portlet-tab"),o,((e={})["unactive-select"]=A.length<=1,e["no-divider"]=!O,e));return Array.isArray(g)?g.forEach((function(e,t){var a=d.createObject(b,d.isObject(e)?s.__assign({index:t},e):{item:e,index:t});K.push.apply(K,s.__spreadArray([],s.__read(A.map((function(e,n){return d.isVisible(e,a)?y(p.default,s.__assign({},e,{title:d.filter(e.title,a),disabled:d.isDisabled(e,a),key:"".concat(1e3*t+n),eventKey:1e3*t+n,mountOnEnter:x,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:h}),m("item/".concat(t,"/").concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{data:a})):null}))),!1))})):K=A.map((function(e,a){return d.isVisible(e,b)?y(p.default,s.__assign({},e,{title:d.filter(e.title,b),disabled:d.isDisabled(e,b),key:a,eventKey:a,mountOnEnter:x,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:h}),t.renderTab?t.renderTab(e,t.props,a):c?c(e,t.props,a):m("tab/".concat(a),(null==e?void 0:e.type)?e:e.tab||e.body)):null})),y(u.default,{addBtnText:P(E||"add"),classPrefix:r,classnames:n,mode:T,className:k,contentClassName:l,linksClassName:i,activeKey:this.state.activeKey,onSelect:this.handleSelect,toolbar:this.renderToolbar(),additionBtns:this.renderDesc(),scrollable:N},K)},t.prototype.render=function(){var e,t=this.props,a=t.className,n=t.data,r=t.classnames,o=t.classPrefix,s=t.style,l=t.hideHeader,i=r("".concat(o,"Portlet"),a,((e={})["no-header"]=l,e)),c="string"==typeof s?d.resolveVariable(s,n)||{}:b.default(s,(function(e){return d.resolveVariable(e,n)||e}));return y("div",{className:i,style:c},this.renderTabs())},t.defaultProps={className:"",mode:"line",divider:!0},s.__decorate([d.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number]),s.__metadata("design:returntype",void 0)],t.prototype,"handleSelect",null),t}(m.default.Component),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([d.Renderer({type:"portlet"})],t)}(v);t.Portlet=v,t.PortletRenderer=h}));
|
||
;/*!node_modules/amis/lib/renderers/Spinner.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Spinner",(function(e,n,r,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s=e("node_modules/amis-ui/lib/components/Spinner"),d=e("node_modules/tslib/tslib"),o=e("node_modules/amis-core/lib/index"),a=e("node_modules/react/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(s),u=i(a),p=e("node_modules/react/index"),m=(p.default||p).createElement;(p.default||p).Fragment;var c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(n,e),n.prototype.renderBody=function(){var e=this.props,n=e.body,r=e.render;return n?r("body",n):null},n.prototype.render=function(){var e=this.props,n=e.classnames,r=e.spinnerWrapClassName,t=e.body,s=d.__rest(e,["classnames","spinnerWrapClassName","body"]);return t?m("div",{className:n("Spinner-wrap",r)},m(l.default,d.__assign({},s)),this.renderBody()):m(l.default,d.__assign({},s))},n=d.__decorate([o.Renderer({type:"spinner"})],n)}(u.default.Component);n.SpinnerRenderer=c}));
|
||
;/*!node_modules/amis/lib/renderers/Tabs.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Tabs",(function(e,t,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/Tabs"),n=e("node_modules/amis-ui/lib/components/Tab"),o=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),d=e("node_modules/lodash/find"),u=e("node_modules/lodash/findIndex"),c=e("node_modules/lodash/isNaN");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=h(i),y=h(n),m=h(r),v=h(d),b=h(u),f=h(c),_=e("node_modules/react/index"),g=(_.default||_).createElement;(_.default||_).Fragment;var C=function(e){function t(t){var a=e.call(this,t)||this;a.newTabDefaultId=3;var s=t.location||window.location,i=t.tabs,n=t.source,r=t.data,d=0;if(void 0!==t.activeKey)d=t.activeKey;else if(s&&Array.isArray(i)){var u=s.hash.substring(1),c=v.default(i,(function(e){return e.hash===u}));c?d=c.hash:void 0!==t.defaultKey?d="string"==typeof t.defaultKey?l.resolveVariableAndFilter(t.defaultKey,t.data):t.defaultKey:t.defaultActiveKey&&(d="string"==typeof t.defaultActiveKey?l.resolveVariableAndFilter(t.defaultActiveKey,t.data):t.defaultActiveKey),d=d||i[0]&&i[0].hash||0}var h=o.__read(a.initTabArray(i,n,r),2),p=h[0],y=h[1];return a.state={prevKey:void 0,activeKey:a.activeKey=d,localTabs:p,isFromSource:y},a}return o.__extends(t,e),t.prototype.initTabArray=function(e,t,a){if(!e)return[[],!1];var s=l.resolveVariableAndFilter(t,a,"| raw");if(!Array.isArray(s))return[e,!1];e=Array.isArray(e)?e:[e];var i=[];return s.forEach((function(t){i.push.apply(i,o.__spreadArray([],o.__read(e.map((function(e){return o.__assign(o.__assign({},e),{data:t})}))),!1))})),[i,!0]},t.prototype.componentDidMount=function(){var e,t;this.autoJumpToNeighbour(this.activeKey);var a=this.props,s=a.name,i=a.value,n=a.onChange,o=a.source;a.tabs;var r=a.data,d=this.state.localTabs;if(s&&"function"==typeof n&&!o)if((i=null!=i?i:l.getVariable(r,s))&&Array.isArray(d)){var u=this.resolveKeyByValue(i);void 0!==u&&this.handleSelect(u)}else{var c=this.resolveTabByKey(this.activeKey);c&&i!==(null!==(e=c.value)&&void 0!==e?e:c.title)&&n(null!==(t=c.value)&&void 0!==t?t:c.title,s)}},t.prototype.componentDidUpdate=function(e,t){var a,s,i,n=this.props,r=this.state.localTabs,d=l.resolveVariableAndFilter(e.defaultActiveKey,e.data),u=l.resolveVariableAndFilter(n.defaultActiveKey,n.data);if(l.isObjectShallowModified({tabs:n.tabs,source:l.resolveVariableAndFilter(n.source,n.data,"| raw")},{tabs:e.tabs,source:l.resolveVariableAndFilter(e.source,e.data,"| raw")},!1)){var c=o.__read(this.initTabArray(n.tabs,n.source,n.data),2),h=c[0],p=c[1];this.setState({localTabs:h,isFromSource:p}),r=h}if(n.location&&e.location&&n.location.hash!==e.location.hash){var y=n.location.hash.substring(1);if(!y)return;(f=v.default(r,(function(e){return e.hash===y})))&&f.hash&&f.hash!==this.state.activeKey&&this.setState({activeKey:this.activeKey=f.hash,prevKey:this.state.activeKey})}else if(Array.isArray(r)&&Array.isArray(t.localTabs)&&JSON.stringify(r.map((function(e){return e.hash})))!==JSON.stringify(t.localTabs.map((function(e){return e.hash})))){var m=this.state.activeKey,b=n.location,f=null;if(b&&Array.isArray(r)){var _=b.hash.substring(1);f=v.default(r,(function(e){return e.hash===_}))}f?m=f.hash:r&&r.some((function(e,t){return e.hash?e.hash===m:t===m}))||(m=r&&r[0]&&r[0].hash||0),this.setState({prevKey:void 0,activeKey:this.activeKey=m})}else if(d!==u){if(null==u)return;var g=null;(f=v.default(r,(function(e){return e.hash===u})))?g=f.hash:"number"==typeof u&&r[u]&&(g=u),null!==g&&this.setState({prevKey:d,activeKey:this.activeKey=g})}this.autoJumpToNeighbour(this.activeKey);var C,T=this.props,K=T.name,A=T.value,N=T.onChange,S=T.source,x=T.data;if(K&&"function"==typeof N&&!S)if((A=null!=A?A:l.getVariable(x,K))!==(null!==(a=e.value)&&void 0!==a?a:l.getVariable(e.data,e.name))&&void 0!==(C=this.resolveKeyByValue(A))&&C!==this.activeKey)this.handleSelect(C);else if(this.activeKey!==t.activeKey){(f=this.resolveTabByKey(this.activeKey))&&A!==(null!==(s=f.value)&&void 0!==s?s:f.title)&&N(null!==(i=f.value)&&void 0!==i?i:f.title,K)}},t.prototype.resolveTabByKey=function(e){var t=this.state.localTabs;if(Array.isArray(t))return v.default(t,(function(t,a){return t.hash?t.hash===e:a===e}))},t.prototype.resolveKeyByValue=function(e){var t=this.state.localTabs;if(Array.isArray(t)){var a=v.default(t,(function(t){var a;return(null!==(a=t.value)&&void 0!==a?a:t.title)===e}));return a&&a.hash?a.hash:t.indexOf(a)}},t.prototype.autoJumpToNeighbour=function(e){var t=this.props;t.tabs;var a=t.data,s=this.state.localTabs;if(Array.isArray(s)){var i=b.default(s,(function(t,a){return t.hash?t.hash===e:a===e}));if(s[i]&&!l.isVisible(s[i],this.props.data))for(var n=s.length,o=i,r=i;o-- >=0||r++<n;){var d=null;if(o>=0&&l.isVisible(s[o],a)?d=s[o].hash||o:r<n&&l.isVisible(s[r],a)&&(d=s[r].hash||r),null!==d){this.setState({activeKey:this.activeKey=d});break}}}},t.prototype.handleAdd=function(){var e=this,t=this.state.localTabs.concat();t.push({title:"tab".concat(this.newTabDefaultId++),body:"tab"}),this.setState({localTabs:t},(function(){e.switchTo(e.state.localTabs.length-1)}))},t.prototype.handleClose=function(e,t){return o.__awaiter(this,void 0,void 0,(function(){var a,s,i;return o.__generator(this,(function(n){switch(n.label){case 0:return a=this.state.localTabs.concat(),s=null==a?void 0:a.findIndex((function(a,s){var i;return e===(t?a.hash:null!==(i=a.hash)&&void 0!==i?i:s)})),-1===s?[2]:(a.splice(s,1),[4,(0,this.props.dispatchEvent)("delete",l.resolveEventData(this.props,{value:e}))]);case 1:return(null==(i=n.sent())?void 0:i.prevented)||this.setState({localTabs:a}),[2]}}))}))},t.prototype.handleEdit=function(e,t){var a=this.state.localTabs.concat();a[e].title=t,this.setState({localTabs:a})},t.prototype.handleDragChange=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t,a,s=this;return o.__generator(this,(function(i){return t=this.resolveTabByKey(this.activeKey),(a=this.state.localTabs.concat()).splice(e.newIndex,0,a.splice(e.oldIndex,1)[0]),this.setState({localTabs:a},(function(){if(t){var e=a.indexOf(t);s.switchTo(e)}})),[2]}))}))},t.prototype.handleSelect=function(e){var t;return o.__awaiter(this,void 0,void 0,(function(){var a,s,i,n,r,d,u,c,h;return o.__generator(this,(function(o){switch(o.label){case 0:return a=this.props,s=a.dispatchEvent,a.data,i=a.env,n=a.onSelect,r=a.id,d=this.state.localTabs,(u=null==d?void 0:d.find((function(t,a){return e===(t.hash?t.hash:a)})))?(null===(t=i.tracker)||void 0===t||t.call(i,{eventType:"tabChange",eventData:{id:r,key:e}}),[4,s("change",l.resolveEventData(this.props,{value:(null==u?void 0:u.hash)?null==u?void 0:u.hash:e+1}))]):[2];case 1:return(null==(c=o.sent())?void 0:c.prevented)||("string"==typeof e&&i?i.updateLocation("#".concat(e)):"string"==typeof this.state.activeKey&&i&&i.updateLocation("#"),this.setState({activeKey:this.activeKey=e,prevKey:this.state.activeKey}),"string"==typeof n?(h=l.str2AsyncFunction(n,"key","props"))&&h(e,this.props):"function"==typeof n&&n(e,this.props)),[2]}}))}))},t.prototype.doAction=function(e,t,a,s){var i=null==e?void 0:e.actionType,n=Number(null==s?void 0:s.activeKey),o=f.default(n)?null==s?void 0:s.activeKey:n,r=null==s?void 0:s.deleteHash;"changeActiveKey"===i?this.handleSelect("number"==typeof o?o-1:o):"deleteTab"===i&&this.handleClose(r,!0)},t.prototype.switchTo=function(e){var t=this.state.localTabs;Array.isArray(t)&&t[e]&&this.setState({activeKey:this.activeKey=t[e].hash||e})},t.prototype.currentIndex=function(){var e=this,t=this.state.localTabs;return Array.isArray(t)?b.default(t,(function(t,a){return t.hash?t.hash===e.state.activeKey:a===e.state.activeKey})):-1},t.prototype.renderTabTitle=function(e,t,a){var s=this.props.render;return"string"!=typeof e&&e?s("tab-title/".concat(t),e,{data:o.__assign({index:t,__index:t},a)}):l.filter(e,a)},t.prototype.renderToolbar=function(){var e=this.props,t=e.toolbar,a=e.render,s=e.classnames,i=e.toolbarClassName,n=e.id,r=e.themeCss;return t?g("div",{className:s("Tabs-toolbar",i,l.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"toolbarControlClassName",id:n,themeCss:r})))},a("toolbar",t)):null},t.prototype.renderTabs=function(){var e=this,t=this.props,a=t.classnames,s=t.classPrefix,i=t.contentClassName,n=t.linksClassName,r=t.tabRender,d=t.className,u=t.style,c=t.render,h=t.data,v=t.mode,b=t.tabsMode,f=t.unmountOnExit;t.source;var _=t.formStore,C=t.formMode,T=t.formHorizontal,K=t.subFormMode,A=t.subFormHorizontal,N=t.addable,S=t.closable,x=t.draggable,w=t.showTip,O=t.showTipClassName,E=t.editable,F=t.sidePosition,V=t.translate,B=t.addBtnText,I=t.collapseOnExceed,D=t.collapseBtnLabel,j=t.disabled,k=t.mobileUI,P=t.swipeable,M=t.testIdBuilder,U=t.id,z=t.wrapperCustomStyle,J=t.themeCss,H=t.env,L=b||v,R=this.props.mountOnEnter;_&&(R=!1);var W=this.state,q=W.localTabs,G=[],Q=[];return W.isFromSource?(G=q.map((function(t,s){var i,n,r=l.createObject(h,l.isObject(t.data)?o.__assign({index:s},t.data):{item:t.data,index:s});return l.isVisible(t,r)?g(y.default,o.__assign({},t,{title:e.renderTabTitle(t.title,s,r),disabled:j||l.isDisabled(t,r),key:s,eventKey:l.filter(t.hash,r)||s,prevKey:s>0?(null===(i=q[s-1])||void 0===i?void 0:i.hash)||s-1:0,nextKey:s<q.length-1?(null===(n=q[s+1])||void 0===n?void 0:n.hash)||s+1:q.length-1,swipeable:P,mobileUI:k,mountOnEnter:R,unmountOnExit:"boolean"==typeof t.reload?t.reload:"boolean"==typeof t.unmountOnExit?t.unmountOnExit:f,onSelect:e.handleSelect,testIdBuilder:null==M?void 0:M.getChild("tab-".concat("string"==typeof t.title?t.title:s)),className:a(t.className,l.setThemeClassName(o.__assign(o.__assign({},t),{name:"panelControlClassName",id:t.id,themeCss:t.themeCss})))}),c("item/".concat(s),(null==t?void 0:t.type)?t:t.tab||t.body,{disabled:j||l.isDisabled(t,r)||void 0,data:r,formMode:t.mode||K||C,formHorizontal:t.horizontal||A||T})):null})),Q=q.map((function(t,a){var s=l.createObject(h,l.isObject(t.data)?o.__assign({index:a},t.data):{item:t.data,index:a});return l.isVisible(t,s)?g(l.CustomStyle,o.__assign({},t,{config:{id:t.id,themeCss:t.themeCss,classNames:[{key:"panelControlClassName"}]},env:e.props.env})):null}))):(G=q.map((function(t,s){var i,n;return l.isVisible(t,h)?g(y.default,o.__assign({},t,{title:e.renderTabTitle(t.title,s,h),disabled:j||l.isDisabled(t,h),key:s,eventKey:t.hash||s,prevKey:s>0?(null===(i=q[s-1])||void 0===i?void 0:i.hash)||s-1:0,nextKey:s<q.length-1?(null===(n=q[s+1])||void 0===n?void 0:n.hash)||s+1:q.length-1,swipeable:P,mobileUI:k,mountOnEnter:R,unmountOnExit:"boolean"==typeof t.reload?t.reload:"boolean"==typeof t.unmountOnExit?t.unmountOnExit:f,onSelect:e.handleSelect,testIdBuilder:null==M?void 0:M.getChild("tab-".concat("string"==typeof t.title?t.title:s)),className:a(t.className,l.setThemeClassName(o.__assign(o.__assign({},t),{name:"panelControlClassName",id:t.id,themeCss:t.themeCss})))}),e.renderTab?e.renderTab(t,e.props,s):r?r(t,e.props,s):c("tab/".concat(s),(null==t?void 0:t.type)?t:t.tab||t.body,{disabled:j||l.isDisabled(t,h)||void 0,formMode:t.mode||K||C,formHorizontal:t.horizontal||A||T})):null})),Q=q.map((function(t){return l.isVisible(t,h)?g(l.CustomStyle,{config:{id:t.id,themeCss:t.themeCss,classNames:[{key:"panelControlClassName"}]},env:e.props.env}):null}))),g(m.default.Fragment,null,g(p.default,{addBtnText:V(B||"add"),classPrefix:s,classnames:a,mode:L,closable:S,className:a(d,l.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"wrapperCustomStyle",id:U,themeCss:z}))),style:u,contentClassName:a(i,l.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"contentControlClassName",id:U,themeCss:J}))),linksClassName:n,titleClassName:a(l.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"titleControlClassName",id:U,themeCss:J}))),onSelect:this.handleSelect,activeKey:this.state.activeKey,toolbar:this.renderToolbar(),addable:N,onAdd:this.handleAdd,onClose:this.handleClose,draggable:x,onDragChange:this.handleDragChange,showTip:w,showTipClassName:O,editable:E,onEdit:this.handleEdit,sidePosition:F,collapseOnExceed:I,collapseBtnLabel:D,mobileUI:k,testIdBuilder:M},G),Q,g(l.CustomStyle,o.__assign({},this.props,{config:{wrapperCustomStyle:z,id:U,themeCss:J,classNames:[{key:"titleControlClassName",weights:{default:{important:!0,inner:"> a"},focused:{important:!0,suf:".is-active",inner:"> a"},hover:{important:!0,inner:"> a"},disabled:{important:!0,suf:".is-disabled",inner:"> a"}}},{key:"toolbarControlClassName",weights:{default:{important:!0}}},{key:"contentControlClassName",weights:{default:{important:!0}}}]},env:H})))},t.prototype.render=function(){return this.renderTabs()},t.defaultProps={className:"",mode:"",mountOnEnter:!0,unmountOnExit:!1},o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Array,String,Object]),o.__metadata("design:returntype",Array)],t.prototype,"initTabArray",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"autoJumpToNeighbour",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"handleAdd",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object,Boolean]),o.__metadata("design:returntype",Promise)],t.prototype,"handleClose",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Number,String]),o.__metadata("design:returntype",void 0)],t.prototype,"handleEdit",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",Promise)],t.prototype,"handleDragChange",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",Promise)],t.prototype,"handleSelect",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Number]),o.__metadata("design:returntype",void 0)],t.prototype,"switchTo",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",Number)],t.prototype,"currentIndex",null),t}(m.default.Component),T=function(e){function t(t,a){var s=e.call(this,t)||this;return a.registerComponent(s),s}return o.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=l.ScopedContext,t=o.__decorate([l.Renderer({type:"tabs"}),o.__metadata("design:paramtypes",[Object,Object])],t)}(C);t.TabsRenderer=T,t.default=C}));
|
||
;/*!node_modules/amis/lib/renderers/Tpl.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Tpl",(function(t,e,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=t("node_modules/amis-ui/lib/components/withBadge"),o=t("node_modules/tslib/tslib"),i=t("node_modules/react/index"),r=t("node_modules/amis-core/lib/index"),d=t("node_modules/lodash/isEmpty");function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=p(s),u=p(i),c=p(d),_=t("node_modules/react/index"),m=(_.default||_).createElement;(_.default||_).Fragment;var h=function(t){function e(e){var n=t.call(this,e)||this;return n.sn=0,n.state={content:n.getContent()},n.mounted=!0,n}return o.__extends(e,t),e.prototype.componentDidUpdate=function(t){var e=this;!["tpl","html","text","raw","data","placeholder"].some((function(n){return!Object.is(t[n],e.props[n])}))&&Object.is(r.getPropValue(t),r.getPropValue(this.props))||this.updateContent()},e.prototype.componentDidMount=function(){this.updateContent()},e.prototype.componentWillUnmount=function(){this.mounted=!1},e.prototype.updateContent=function(){return o.__awaiter(this,void 0,void 0,(function(){var t,e;return o.__generator(this,(function(n){switch(n.label){case 0:return t=++this.sn,[4,this.getAsyncContent()];case 1:return e=n.sent(),t!==this.sn?[2]:(this.mounted&&this.setState({content:e}),[2])}}))}))},e.prototype.getContent=function(){var t=this.props,e=t.tpl,n=t.html,a=t.text,s=t.raw,o=t.data,i=t.placeholder,d=r.getPropValue(this.props);return s||(n?r.filter(n,o):e?r.filter(e,o):a?r.escapeHtml(r.filter(a,o)):null==d||""===d?'<span class="text-muted">'.concat(i,"</span>"):"string"==typeof d?d:JSON.stringify(d))},e.prototype.getAsyncContent=function(){return o.__awaiter(this,void 0,void 0,(function(){var t,e,n,a,s,i,d,p,l;return o.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,e=t.tpl,n=t.html,a=t.text,s=t.data,i=t.raw,d=t.placeholder,p=r.getPropValue(this.props),i?[2,i]:[3,1];case 1:return n?[2,r.asyncFilter(n,s)]:[3,2];case 2:return e?[2,r.asyncFilter(e,s)]:[3,3];case 3:return a?(l=r.escapeHtml,[4,r.asyncFilter(a,s)]):[3,5];case 4:return[2,l.apply(void 0,[o.sent()])];case 5:return[2,null==p||""===p?'<span class="text-muted">'.concat(d,"</span>"):"string"==typeof p?p:JSON.stringify(p)]}}))}))},e.prototype.getTitle=function(t){var e;if(!this.props.showNativeTitle)return"";var n="string"==typeof t?t:"",a=(new DOMParser).parseFromString(t,"text/html");return(null===(e=null==a?void 0:a.body)||void 0===e?void 0:e.textContent)&&(n=a.body.textContent),n},e.prototype.handleClick=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseEnter=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseLeave=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.render=function(){var t,e=this.props,n=e.className,a=e.wrapperComponent,s=e.inline,i=e.classnames,d=e.style,p=e.maxLine,l=e.showNativeTitle,u=e.data,_=e.id,h=e.wrapperCustomStyle,y=e.env,g=e.themeCss,v=e.testIdBuilder,f=a||(s?"span":"div"),C=this.state.content,b={},w="";return p>0&&(w="max-line",b.WebkitLineClamp=+p),m(f,o.__assign({className:i("TplField",n,r.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"baseControlClassName",id:_,themeCss:g})),r.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"wrapperCustomStyle",id:_,themeCss:h}))),style:r.buildStyle(d,u)},l?{title:this.getTitle(C)}:{},{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},null===(t=null==v?void 0:v.getChild("tpl"))||void 0===t?void 0:t.getTestId()),m("span",{className:w?i(w):void 0,style:c.default(b)?void 0:b,dangerouslySetInnerHTML:{__html:y.filterHtml(C)}}),m(r.CustomStyle,o.__assign({},this.props,{config:{wrapperCustomStyle:h,id:_,themeCss:g,classNames:[{key:"baseControlClassName"}]},env:y})))},e.defaultProps={inline:!0,placeholder:""},o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",Promise)],e.prototype,"updateContent",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"getContent",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",Promise)],e.prototype,"getAsyncContent",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String]),o.__metadata("design:returntype",void 0)],e.prototype,"getTitle",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleMouseEnter",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleMouseLeave",null),e}(u.default.Component),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([r.Renderer({type:"tpl",alias:["html"],name:"tpl"}),l.default],e)}(h);e.Tpl=h,e.TplRenderer=y}));
|
||
;/*!node_modules/amis-ui/lib/withStore.js*/
|
||
amis.define("node_modules/amis-ui/lib/withStore",(function(e,i,t,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=e("node_modules/amis-ui/lib/components/WithStore");i.default=s.withStore}));
|
||
;/*!node_modules/amis/lib/renderers/Mapping.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Mapping",(function(e,r,t,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/withStore"),i=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index"),l=e("node_modules/mobx-state-tree/dist/mobx-state-tree");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p,d=u(n),c=u(s),m=e("node_modules/react/index"),f=(m.default||m).createElement;(m.default||m).Fragment;var v=o.StoreNode.named("MappingStore").props({fetching:!1,errorMsg:"",valueField:"value",map:l.types.frozen({})}).actions((function(e){var r=l.flow((function(r,t,a){var n,s,l;return i.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),e.fetching=!0,[4,r.fetcher(t,a)];case 1:if(!(n=i.sent()).ok)throw new Error(n.msg||"fetch error");return s=o.normalizeApiResponseData(n.data),e.setMap(Array.isArray(s.options)?s.options:Array.isArray(s.items)?s.items:Array.isArray(s.records)?s.records:s),[3,4];case 2:return l=i.sent(),e.errorMsg=l.message,[3,4];case 3:return e.fetching=!1,[7];case 4:return[2]}}))}));return{load:r,setMap:function(r){Array.isArray(r)&&(r=r.reduce((function(r,t){if(null==t)return r;if(o.isObject(t)){var a=Object.keys(t);1===a.length||2==a.length&&a.includes("$$id")?r[(a=a.filter((function(e){return"$$id"!==e})))[0]]=t[a[0]]:a.length>1&&(r[t[e.valueField]]=t)}return r}),{})),o.isObject(r)&&(e.map=i.__assign({},r))}}})),h=d.default((function(e){return v.create({id:o.guid(),storeType:v.name},e.env)}))(((p=function(e){function r(r){var t=e.call(this,r)||this;return r.store.syncProps(r,void 0,["valueField","map"]),t}return i.__extends(r,e),r.prototype.componentDidMount=function(){this.reload()},r.prototype.componentDidUpdate=function(e){var r=this.props,t=this.props,a=t.store,n=t.source,i=t.data;if(a.syncProps(r,e,n?["valueField"]:["valueField","map"]),o.isPureVariable(n)){var s=o.resolveVariableAndFilter(e.source,e.data,"| raw"),l=o.resolveVariableAndFilter(n,i,"| raw");s!==l&&a.setMap(l)}else o.isApiOutdated(e.source,r.source,e.data,r.data)&&this.reload()},r.prototype.reload=function(){var e,r=this.props,t=r.source,a=r.data,n=r.env,i=this.props.store;if(o.isPureVariable(t))i.setMap(o.resolveVariableAndFilter(t,a,"| raw"));else if(o.isEffectiveApi(t,a)){var s=o.normalizeApi(t,"get");s.cache=null!==(e=s.cache)&&void 0!==e?e:3e4,i.load(n,s,a)}},r.prototype.renderSingleValue=function(e,r,t){var a,n=this.props,i=n.className,s=n.style,o=n.placeholder,l=n.classnames,u=n.store,p=f("span",{className:"text-muted"},o),d=u.map,c=void 0,m=t?s:void 0;return void 0!==(e="string"==typeof e?e.trim():e)&&d&&void 0!==(c=null!==(a=this.renderValue(d,e))&&void 0!==a?a:!0===e&&d[1]?d[1]:!1===e&&d[0]?d[0]:d["*"])&&(p=this.renderViewValue(c,e)),f("span",{key:"map-".concat(r),className:l("MappingField",i),style:m},p)},r.prototype.renderViewValue=function(e,r){var t=this.props,a=t.render,n=t.itemSchema,s=t.renderViewValue,l=t.data,u=t.labelField,p=t.name;if(s)return s(e,r);if(!n){var d=e;return o.isObject(e)&&(d=void 0===u||""===u?e.hasOwnProperty("type")?i.__assign({name:p},d):e.label:e[u||"label"]),o.isObject(d)&&"tag"===d.type&&!o.isObject(d.label)&&null!=d.label?a("mapping-tag",d,{value:null}):a("tpl",d)}return a("mappingItemSchema",n,i.__assign({data:o.createObject(l,o.isObject(e)?e:{item:e})},"tag"===(null==n?void 0:n.type)?{value:null}:{}))},r.prototype.renderValue=function(e,r){var t=this.props.renderValue;return t?t(e,r):e[r]},r.prototype.render=function(){var e=this,r=this.props,t=r.style,a=r.defaultValue,n=r.data,i=o.getPropValue(this.props);return a&&o.isPureVariable(a)&&a===i&&(i=o.resolveVariableAndFilter(a,n,"| raw")),Array.isArray(i)?f("span",{style:t},i.map((function(r,t){return e.renderSingleValue(r,t)}))):this.renderSingleValue(i,0,!0)},r}(c.default.Component)).defaultProps={placeholder:"-",map:{"*":"通配值"}},p)),y=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(r,e),r.prototype.render=function(){return f(h,i.__assign({},this.props))},r=i.__decorate([o.Renderer({type:"mapping",alias:["map"],name:"mapping"})],r)}(c.default.Component);r.MappingField=h,r.MappingFieldRenderer=y,r.Store=v}));
|
||
;/*!node_modules/amis/lib/renderers/Progress.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Progress",(function(e,t,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Progress"),s=e("node_modules/tslib/tslib"),n=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),i=e("node_modules/lodash/isEqual"),u=e("node_modules/lodash/pick");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(r),c=d(n),m=d(i),f=d(u),h=e("node_modules/react/index"),g=(h.default||h).createElement;(h.default||h).Fragment;var v=["name","value","data","defaultValue"],y=function(e){function t(t){var a=e.call(this,t)||this;return a.state={value:a.getValue()},a}return s.__extends(t,e),t.prototype.componentDidUpdate=function(e){m.default(f.default(e,v),f.default(this.props,v))||this.setState({value:this.getValue()})},t.prototype.getValue=function(){var e=l.getPropValue(this.props);return e="number"==typeof e?e:l.filter(e,this.props.data),/^\d*\.?\d+$/.test(e)&&(e=parseFloat(e)),e},t.prototype.format=function(e){var t=this.props,a=t.valueTpl,o=t.render,r=t.data;return o("progress-value",a||"${value}%",{data:l.createObject(r,{value:e})})},t.prototype.render=function(){var e=this.props,t=e.data,a=e.mode,o=e.className,r=e.style,s=e.placeholder,n=e.progressClassName,i=e.map,u=e.stripe,d=e.animate,c=e.showLabel,m=e.strokeWidth,f=e.gapDegree,h=e.gapPosition;e.classnames;var v=e.threshold,y=e.showThresholdText,_=this.state.value;return v&&(Array.isArray(v)?v.forEach((function(e){e.value="string"==typeof e.value?l.filter(e.value,t):e.value,e.color&&(e.color=l.filter(e.color,t))})):(v.value=l.filter(v.value,t),v.color&&(v.color=l.filter(v.color,t)))),g(p.default,{value:_,type:a,map:i,stripe:u,animate:d,showLabel:c,placeholder:s,format:this.format,strokeWidth:m,gapDegree:f,gapPosition:h,className:o,style:r,progressClassName:n,threshold:v,showThresholdText:y})},t.defaultProps={placeholder:"-",progressClassName:"",progressBarClassName:"",map:["bg-danger","bg-warning","bg-info","bg-success","bg-success"],valueTpl:"${value}%",showLabel:!0,stripe:!1,animate:!1},s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number]),s.__metadata("design:returntype",void 0)],t.prototype,"format",null),t}(c.default.Component),_=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return s.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,a,o){"reset"===(null==e?void 0:e.actionType)&&this.setState({value:0})},t.prototype.setData=function(e){"number"!=typeof e&&"number"!=typeof+e||this.setState({value:+e})},t.contextType=l.ScopedContext,t=s.__decorate([l.Renderer({type:"progress"}),s.__metadata("design:paramtypes",[Object,Object])],t)}(y);t.ProgressField=y,t.ProgressFieldRenderer=_}));
|
||
;/*!node_modules/amis/lib/renderers/Status.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Status",(function(e,a,s,l){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var t=e("node_modules/amis-ui/lib/components/Icon"),n=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),i=e("node_modules/lodash/merge"),o=e("node_modules/lodash/assign"),u=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(t),p=d(r),f=d(i),_=d(o),m=e("node_modules/react/index"),b=(m.default||m).createElement;(m.default||m).Fragment;var v=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(a,e),a.prototype.render=function(){var e,s,l=this.props,t=l.defaultValue,r=l.className,i=l.style,o=l.placeholder,d=l.classnames,p=l.data,m=f.default(a.defaultProps.map,null===(e=this.props)||void 0===e?void 0:e.map),v=f.default(a.defaultProps.labelMap,null===(s=this.props)||void 0===s?void 0:s.labelMap),g={};m&&Object.entries(m).forEach((function(e){var a=n.__read(e,2),s=a[0],l=a[1];g[s]?g[s]=n.__assign(n.__assign({},g[s]),{icon:l}):g[s]={icon:l}})),v&&Object.entries(v).forEach((function(e){var a=n.__read(e,2),s=a[0],l=a[1];g[s]?g[s]=n.__assign(n.__assign({},g[s]),{label:l}):g[s]={label:l}}));var h=this.props.source||{};u.isPureVariable(h)&&(h=u.resolveVariableAndFilter(h,p,"| raw")),h=_.default(g,h);var y=u.getPropValue(this.props);t&&u.isPureVariable(t)&&(y=u.resolveVariableAndFilter(t,p,"| raw")),null!=y&&""!==y&&("boolean"==typeof y?y=y?1:0:/^\d+$/.test(y)&&(y=parseInt(y,10)||0));var F=h[y]||{};if(!F.icon&&!F.label)return b("span",{className:d("StatusField",r),style:i},b("span",{className:"text-muted",key:"status-value"},o));var N="",P=null;if(F.icon){N="StatusField--".concat(y);var S=F.icon,x="",V="";"string"==typeof S&&(V=(S=u.filter(S,p)||"").replace(/\bsvg-([^\s|$]+)\b/g,(function(e,a){return x=a,"icon"}))),P=b(c.default,{cx:d,icon:x||S,className:"Status-icon icon",classNameProp:V,key:"icon"})}var j=null;return""!==F.label&&null!=F.label&&(j=b("span",{className:d("StatusField-label"),key:"label"},u.filter(""+F.label,p))),b("span",{className:d("StatusField",N,r,F.className),style:n.__assign(n.__assign({},i),F.color?{color:u.filter(F.color,p)}:{})},P,j)},a.defaultProps={placeholder:"-",map:{0:"svg-fail",1:"svg-success",success:"svg-success",pending:"rolling",fail:"svg-fail",queue:"svg-warning",schedule:"svg-schedule"},labelMap:{success:"成功",pending:"运行中",fail:"失败",queue:"排队中",schedule:"调度中"}},a}(p.default.Component),g=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(a,e),a=n.__decorate([u.Renderer({type:"status"})],a)}(v);a.StatusField=v,a.StatusFieldRenderer=g}));
|
||
;/*!node_modules/amis/lib/renderers/Json.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Json",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),r=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(s),d=e("node_modules/react/index"),u=(d.default||d).createElement;(d.default||d).Fragment;var p=l.default.lazy((function(){return Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/react-json-view/dist/main","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))})).then(r.importLazyComponent)})),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.emitChange=function(e){var t=this.props,n=t.onChange,a=t.name;return!(!a||!n)&&(n(e.updated_src,a),!0)},t.prototype.shouldExpandNode=function(e){var t=e.namespace,n=this.props.levelExpand;return"number"==typeof n&&t.length>n},t.prototype.render=function(){var e,t,n=this.props,a=n.className,o=n.style,s=n.jsonTheme,i=n.classnames,d=n.placeholder,c=n.source;n.levelExpand;var m=n.mutable,y=n.displayDataTypes,h=n.enableClipboard,f=n.iconStyle,_=n.quotesOnKeys,b=n.sortKeys,v=n.name,g=n.ellipsisThreshold,x=r.getPropValue(this.props),C=x;if(void 0!==c&&r.isPureVariable(c))C=r.resolveVariableAndFilter(c,this.props.data,"| raw");else if("string"==typeof x)try{C=JSON.parse(x)}catch(e){}var O=s;return r.isPureVariable(s)&&(O=r.resolveVariableAndFilter(s,this.props.data,"| raw")),~["string","number","boolean"].indexOf(typeof C)&&((e={})[typeof C]=C,C=e),u("div",{className:i("JsonField",a),style:o},null==C?d:u(l.default.Suspense,{fallback:u("div",null,"...")},u(p,{name:!1,src:C,theme:null!==(t=O)&&void 0!==t?t:"rjv-default",shouldCollapse:this.shouldExpandNode,enableClipboard:h,displayDataTypes:y,collapseStringsAfterLength:g,iconStyle:f,quotesOnKeys:_,sortKeys:b,onEdit:!(!v||!m)&&this.emitChange,onDelete:!(!v||!m)&&this.emitChange,onAdd:!(!v||!m)&&this.emitChange})))},t.defaultProps={placeholder:"-",levelExpand:1,source:"",displayDataTypes:!1,enableClipboard:!1,iconStyle:"square",quotesOnKeys:!0,sortKeys:!1,ellipsisThreshold:!1},o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"emitChange",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"shouldExpandNode",null),t}(l.default.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([r.Renderer({type:"json"})],t)}(c);t.JSONField=c,t.JSONFieldRenderer=m,t.JsonView=p}));
|
||
;/*!node_modules/amis/lib/renderers/Link.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Link",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=e("node_modules/amis-ui/lib/components/withBadge"),r=e("node_modules/amis-ui/lib/components/Link"),i=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),d=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=s(l),p=s(r),c=s(o),m=e("node_modules/react/index"),f=(m.default||m).createElement;(m.default||m).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.env,a=t.href,l=t.blank,r=t.body;null==n||n.tracker({eventType:"url",eventData:{url:a,blank:l,label:r}},this.props)},t.prototype.getHref=function(){},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.body,l=e.href;e.classnames;var r=e.blank,i=e.disabled,o=e.htmlTarget,s=e.data,u=e.render,c=e.translate,m=e.title,_=e.icon,b=e.rightIcon,h=("string"==typeof l&&l?d.filter(l,s,"| raw"):void 0)||d.getPropValue(this.props);return f(p.default,{className:t,style:n,href:h,disabled:i,title:m,htmlTarget:o||(r?"_blank":"_self"),icon:_,rightIcon:b,onClick:this.handleClick},a?u("body",a):h||c("link"))},t.defaultProps={blank:!0,disabled:!1,htmlTarget:""},i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),t}(c.default.Component),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([d.Renderer({type:"link"}),u.default],t)}(_);t.LinkCmpt=_,t.LinkFieldRenderer=b}));
|
||
;/*!node_modules/amis/lib/renderers/Wizard.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Wizard",(function(t,e,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=t("node_modules/amis-ui/lib/components/Spinner"),r=t("node_modules/amis-ui/lib/components/Steps"),s=t("node_modules/tslib/tslib"),o=t("node_modules/react/index"),p=t("node_modules/amis-core/lib/index"),d=t("node_modules/lodash/isEqual");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=c(i),l=c(r),h=c(o),f=c(d),m=t("node_modules/react/index"),_=(m.default||m).createElement;(m.default||m).Fragment;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.initalValues={},e.state={currentStep:-1,completeStep:-1,rawSteps:[]},e}return s.__extends(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props,a=e.initApi,n=e.initFetch,i=e.initAsyncApi,r=e.initFinishedField,s=e.store,o=e.messages,d=o.fetchSuccess,c=o.fetchFailed;e.onInit,p.isEffectiveApi(a,s.data,n)?s.fetchInitData(a,s.data,{successMessage:d,errorMessage:c,onSuccess:function(){if(p.isEffectiveApi(i,s.data)&&!s.data[r||"finished"])return p.until((function(){return s.checkRemote(i,s.data)}),(function(t){return t&&t[r||"finished"]}),(function(e){return t.asyncCancel=e}))}}).then((function(e){t.handleFetchInitEvent(e);var a={currentStep:"string"==typeof t.props.startStep?p.toNumber(p.tokenize(t.props.startStep,p.createObject(t.props.data,(null==e?void 0:e.data)||{})),1):1};return e&&e.data&&("number"==typeof e.data.step||"string"==typeof e.data.step&&/^\d+$/.test(e.data.step))&&(a.currentStep=p.toNumber(e.data.step,1)),t.setState(a,(function(){e&&e.data&&(e.data.submiting||e.data.submited)&&t.checkSubmit()})),e})):this.setState({currentStep:"string"==typeof this.props.startStep?p.toNumber(p.tokenize(this.props.startStep,this.props.data),1):1}),this.normalizeSteps(s.data)},e.prototype.componentDidUpdate=function(t){var e=this.props,a=e.store,n=e.fetchSuccess,i=e.fetchFailed;f.default(t.steps,e.steps)&&f.default(t.data,e.data)||this.normalizeSteps(e.data),p.isApiOutdated(t.initApi,e.initApi,t.data,e.data)&&a.fetchData(e.initApi,a.data,{successMessage:n,errorMessage:i})},e.prototype.componentWillUnmount=function(){this.asyncCancel&&this.asyncCancel()},e.prototype.dispatchEvent=function(t,e){var a;return s.__awaiter(this,void 0,void 0,(function(){var n,i,r,o;return s.__generator(this,(function(s){switch(s.label){case 0:return n=this.props,i=n.dispatchEvent,r=n.data,[4,i(t,e?p.createObject(r,e):r)];case 1:return o=s.sent(),[2,null!==(a=null==o?void 0:o.prevented)&&void 0!==a&&a]}}))}))},e.prototype.handleFetchInitEvent=function(t){var e;return s.__awaiter(this,void 0,void 0,(function(){var a,n,i;return s.__generator(this,(function(r){switch(r.label){case 0:return a=this.props,n=a.onInit,i=a.store,[4,this.dispatchEvent("inited",s.__assign(s.__assign({},i.data),{responseData:t.ok?null!==(e=i.data)&&void 0!==e?e:{}:t,responseStatus:void 0===(null==t?void 0:t.status)?i.error?1:0:null==t?void 0:t.status,responseMsg:i.msg}))];case 1:return r.sent()&&n&&n(i.data),[2]}}))}))},e.prototype.normalizeSteps=function(t){return s.__awaiter(this,void 0,void 0,(function(){var e,a,n,i,r,o;return s.__generator(this,(function(d){switch(d.label){case 0:e=this.props,a=e.steps,n=e.translate,i=[],r=a.length,o=0,d.label=1;case 1:return o<r?[4,p.evalExpressionWithConditionBuilderAsync(a[o].hiddenOn,t)]:[3,4];case 2:!d.sent()&&i.push(a[o]),d.label=3;case 3:return o++,[3,1];case 4:return this.setState({rawSteps:i.map((function(t,e){return s.__assign(s.__assign({},t),{hiddenOn:"",title:t.title||t.label||n("Steps.step",{index:e+1})})}))}),[2]}}))}))},e.prototype.gotoStep=function(t){return s.__awaiter(this,void 0,void 0,(function(){var e;return s.__generator(this,(function(a){switch(a.label){case 0:return e=this.state.rawSteps,(t=Math.max(Math.min(e.length,t),1))==this.state.currentStep?[3,2]:[4,this.dispatchEvent("stepChange",{step:t})];case 1:if(a.sent())return[2];this.setState({currentStep:t,completeStep:Math.max(this.state.completeStep,t-1)}),a.label=2;case 2:return[2]}}))}))},e.prototype.formRef=function(t){if(t){for(;t&&t.getWrappedInstance;)t=t.getWrappedInstance();this.form=t}else this.form=void 0},e.prototype.submitToTarget=function(t,e){throw new Error("Please implements this!")},e.prototype.reloadTarget=function(t,e){throw new Error("Please implements this!")},e.prototype.reload=function(t,e,a,n,i){return s.__awaiter(this,void 0,void 0,(function(){var t,a,n,r,o,d,c,u,l,h,f=this;return s.__generator(this,(function(s){switch(s.label){case 0:return e?[2,this.receive(e,void 0,i)]:(t=this.props,a=t.initApi,n=t.initAsyncApi,r=t.initFinishedField,o=t.store,d=t.messages,c=d.fetchSuccess,u=d.fetchFailed,p.isEffectiveApi(a,o.data)&&1===this.state.currentStep?[4,o.fetchInitData(a,o.data,{successMessage:c,errorMessage:u,onSuccess:function(){if(p.isEffectiveApi(n,o.data)&&!o.data[r||"finished"])return p.until((function(){return o.checkRemote(n,o.data)}),(function(t){return t&&t[r||"finished"]}),(function(t){return f.asyncCancel=t}))}})]:[3,2]);case 1:l=s.sent(),h={currentStep:1},l&&l.data&&("number"==typeof l.data.step||"string"==typeof l.data.step&&/^\d+$/.test(l.data.step))&&(h.currentStep=p.toNumber(l.data.step,1)),this.setState(h,(function(){l&&l.data&&(l.data.submiting||l.data.submited)&&f.checkSubmit()})),s.label=2;case 2:return[2,o.data]}}))}))},e.prototype.receive=function(t,e,a){return this.props.store.updateData(t,void 0,a),this.reload()},e.prototype.domRef=function(t){this.dom=t},e.prototype.getPopOverContainer=function(){return this.dom},e.prototype.checkSubmit=function(){var t,e=this,a=this.props,n=a.store,i=a.asyncApi,r=a.finishedField,s=a.env,o=this.state.rawSteps,d=o[this.state.currentStep-1],c=d&&d.asyncApi||this.state.currentStep===o.length&&i;d&&p.isEffectiveApi(c,n.data)&&(n.markSaving(!0),n.updateData(((t={})[r||"finished"]=!1,t)),p.until((function(){return n.checkRemote(c,n.data)}),(function(t){return t&&t[r||"finished"]}),(function(t){return e.asyncCancel=t})).then((function(){n.markSaving(!1),e.gotoStep(e.state.currentStep+1)})).catch((function(t){!c.silent&&s.notify("error",t.message),n.markSaving(!1)})))},e.prototype.handleAction=function(t,e,a,n,i){var r=this;void 0===n&&(n=!1);var o=this.props,d=o.onAction,c=o.store,u=o.env,l=this.state.rawSteps;if("next"===e.actionType||"submit"===e.type||"step-submit"===e.actionType)this.form.doAction(s.__assign(s.__assign({},e),{actionType:"submit"}),a);else if("prev"===e.actionType)this.gotoStep(this.state.currentStep-1);else if("reset"===e.type)this.form.reset();else{if("dialog"===e.actionType)return c.setCurrentAction(e,this.props.resolveDefinitions),new Promise((function(t){c.openDialog(a,void 0,(function(a,n){var i;null===(i=e.callback)||void 0===i||i.call(e,a,n),t({confirmed:a,value:n})}),i||r.context)}));if("ajax"===e.actionType)return e.api?c.saveRemote(e.api,a,{successMessage:e.messages&&e.messages.success,errorMessage:e.messages&&e.messages.failed}).then((function(){return s.__awaiter(r,void 0,void 0,(function(){var t,a,n;return s.__generator(this,(function(i){switch(i.label){case 0:return this.form&&this.form.isValidated()&&this.form.validate(!0),(t=e.feedback)&&p.isVisible(t,c.data)?[4,this.openFeedback(t,c.data)]:[3,2];case 1:if(a=i.sent(),t.skipRestOnCancel&&!a)throw new p.SkipOperation;if(t.skipRestOnConfirm&&a)throw new p.SkipOperation;i.label=2;case 2:return(n=e.redirect&&p.filter(e.redirect,c.data))&&u.jumpTo(n,e,c.data),e.reload&&this.reloadTarget(p.filterTarget(e.reload,c.data),c.data),[2]}}))}))})).catch((function(t){})):u.alert("当 actionType 为 ajax 时,请设置 api 属性");if("reload"===e.actionType)e.target&&this.reloadTarget(p.filterTarget(e.target,a),a);else if("goto-step"===e.actionType){var h=a.step;void 0!==h&&h<=l.length&&h>=0&&this.gotoStep(a.step)}else"submit"===e.actionType?this.finalSubmit():d&&d(t,e,a,n,i||this.context)}},e.prototype.handleQuery=function(t){return this.props.initApi?!((null==t?void 0:t.hasOwnProperty("orderBy"))&&!p.isApiOutdated(this.props.initApi,this.props.initApi,this.props.store.data,p.createObject(this.props.store.data,t)))&&void this.receive(t):!!this.props.onQuery&&this.props.onQuery(t)},e.prototype.openFeedback=function(t,e){var a=this;return new Promise((function(n){var i=a.props.store;i.setCurrentAction({type:"button",actionType:"dialog",dialog:t},a.props.resolveDefinitions),i.openDialog(e,void 0,(function(t){n(t)}),a.context)}))},e.prototype.handleChange=function(t){return s.__awaiter(this,void 0,void 0,(function(){var e,a,n;return s.__generator(this,(function(i){switch(i.label){case 0:return e=this.props.store,a=e.data,n=s.__assign(s.__assign({},a),t),[4,this.dispatchEvent("change",n)];case 1:return i.sent()||e.updateData(t),[2]}}))}))},e.prototype.handleInit=function(t){var e=this.state.currentStep;this.initalValues[e]=this.initalValues[e]||t,this.props.store.updateData(t)},e.prototype.handleReset=function(t){var e=this.props.store,a=this.initalValues[this.state.currentStep],n={};Object.keys(t).forEach((function(t){n[t]=a.hasOwnProperty(t)?a[t]:void 0})),e.updateData(n)},e.prototype.finalSubmit=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={type:"submit"}),s.__awaiter(this,void 0,void 0,(function(){var a,n,i,r,o,d,c,u,l,h,f,m,_,y,g,v,b=this;return s.__generator(this,(function(S){switch(S.label){case 0:return a=this.props,n=a.store,i=a.api,r=a.asyncApi,o=a.finishedField,d=a.target,c=a.redirect,u=a.reload,l=a.env,h=a.onFinished,f=this.state.rawSteps,[4,this.dispatchEvent("finished",n.data)];case 1:if(S.sent())return[2];if(m=f[this.state.currentStep-1],n.updateData(t),d)this.submitToTarget(p.filterTarget(d,n.data),n.data),this.setState({completeStep:f.length});else if(e.api||m.api||i)_=e.asyncApi||m.asyncApi||r,p.isEffectiveApi(_,n.data)&&n.updateData(((v={})[o||"finished"]=!1,v)),y=this.form?this.form.props.store:n,n.markSaving(!0),y.saveRemote(e.api||m.api||i,n.data,{onSuccess:function(t){return s.__awaiter(b,void 0,void 0,(function(){var e,a=this;return s.__generator(this,(function(i){switch(i.label){case 0:return[4,this.dispatchEvent("submitSucc",p.createObject(this.props.data,{result:t}))];case 1:return e=i.sent(),!p.isEffectiveApi(_,n.data)||n.data[o||"finished"]?[2,{cbResult:null,dispatcher:e}]:[2,{cbResult:p.until((function(){return n.checkRemote(_,n.data)}),(function(t){return t&&t[o||"finished"]}),(function(t){return a.asyncCancel=t})),dispatcher:e}]}}))}))},onFailed:function(t){return s.__awaiter(b,void 0,void 0,(function(){return s.__generator(this,(function(e){switch(e.label){case 0:return n.markSaving(!1),[4,this.dispatchEvent("submitFail",p.createObject(this.props.data,{error:t}))];case 1:return[2,{dispatcher:e.sent()}]}}))}))}}).then((function(t){return s.__awaiter(b,void 0,void 0,(function(){var a,i,r;return s.__generator(this,(function(o){switch(o.label){case 0:return(a=e.feedback)&&p.isVisible(a,t)?[4,this.openFeedback(a,t)]:[3,2];case 1:if(i=o.sent(),a.skipRestOnCancel&&!i)throw new p.SkipOperation;if(a.skipRestOnConfirm&&i)throw new p.SkipOperation;o.label=2;case 2:if(this.setState({completeStep:f.length}),n.updateData(s.__assign(s.__assign({},n.data),t)),n.markSaving(!1),t&&"number"==typeof t.step)this.gotoStep(t.step);else if(h&&!1===h(t,e))return[2,t];return(r=(e.redirect||m.redirect||c)&&p.filter(e.redirect||m.redirect||c,n.data))?l.jumpTo(r,e,n.data):(e.reload||m.reload||u)&&this.reloadTarget(p.filterTarget(e.reload||m.reload||u,n.data),n.data),[2,t]}}))}))})).catch((function(t){}));else{if(this.setState({completeStep:f.length}),h&&!1===h(n.data,e))return[2];(g=(e.redirect||m.redirect||c)&&p.filter(e.redirect||m.redirect||c,n.data))?l.jumpTo(g,e,n.data):(e.reload||m.reload||u)&&this.reloadTarget(p.filterTarget(e.reload||m.reload||u,n.data),n.data)}return[2]}}))}))},e.prototype.handleSubmit=function(t,e){var a,n=this,i=this.props,r=i.store,o=i.finishedField,d=this.state.rawSteps;if(this.state.currentStep<d.length){var c=d[this.state.currentStep-1];r.updateData(t);var u=e.asyncApi||c.asyncApi;p.isEffectiveApi(u,r.data)&&r.updateData(((a={})[o||"finished"]=!1,a)),p.isEffectiveApi(e.api||c.api,r.data)?r.saveRemote(e.api||c.api,r.data,{onSuccess:function(){if(n.dispatchEvent("stepSubmitSucc"),p.isEffectiveApi(u,r.data)&&!r.data[o||"finished"])return p.until((function(){return r.checkRemote(u,r.data)}),(function(t){return t&&t[o||"finished"]}),(function(t){return n.asyncCancel=t}))},onFailed:function(t){n.dispatchEvent("stepSubmitFail",{error:t}),422===t.status&&t.errors&&n.form&&n.form.props.store.setFormItemErrors(t.errors)}}).then((function(t){return s.__awaiter(n,void 0,void 0,(function(){var a,n;return s.__generator(this,(function(i){switch(i.label){case 0:return(a=e.feedback)&&p.isVisible(a,t)?[4,this.openFeedback(a,t)]:[3,2];case 1:if(n=i.sent(),a.skipRestOnCancel&&!n)throw new p.SkipOperation;if(a.skipRestOnConfirm&&n)throw new p.SkipOperation;i.label=2;case 2:return this.gotoStep(t&&"number"==typeof t.step?t.step:this.state.currentStep+1),[2]}}))}))})).catch((function(t){n.dispatchEvent("stepSubmitFail",{error:t})})):this.gotoStep(this.state.currentStep+1)}else this.finalSubmit(t,e);return!1},e.prototype.handleDialogConfirm=function(t,e,a){var n=this.props.store;e.mergeData&&1===t.length&&t[0]&&"form"===a[0].props.type&&n.updateData(t[0]),n.closeDialog(!0,t)},e.prototype.handleDialogClose=function(t){void 0===t&&(t=!1),this.props.store.closeDialog(t)},e.prototype.handleJumpStep=function(t,e){var a=this.props.store;g(e,t,this.state.currentStep,a.data)&&this.gotoStep(t+1)},e.prototype.renderSteps=function(){var t=this.props,e=t.mode,a=t.classPrefix,n=t.classnames,i=t.stepsClassName,r=this.state,s=r.currentStep,o=r.rawSteps;return _("div",{className:n("".concat(a,"-Wizard-steps"),i),id:"form-wizard"},Array.isArray(o)&&o.length?_(l.default,{steps:o,mode:e,current:s-1,onClickStep:this.handleJumpStep}):null)},e.prototype.renderActions=function(){var t=this,e=this.props,a=e.store,n=e.readOnly,i=e.disabled,r=e.actionClassName,s=e.actionPrevLabel,o=e.actionNextLabel,d=e.actionNextSaveLabel,c=e.actionFinishLabel,u=e.render,l=e.translate;e.classnames;var f=e.testIdBuilder,m=this.state.rawSteps;if(!Array.isArray(m))return null;var y=this.state.currentStep,v=m[y],b=m[y-2],S=a.loading,A=m[y-1];if(!A)return null;var w=!!b&&g(b,y-2,y,a.data);return A.actions&&Array.isArray(A.actions)?A.actions.length?_(h.default.Fragment,null,A.actions.map((function(e,a){return u("action/".concat(a),e,{key:a,data:p.createObject(t.props.data,{currentStep:y}),onAction:t.handleAction,disabled:e.disabled||S||i||"prev"===e.actionType&&!w||"next"===e.actionType&&n&&(!!A.api||!v)})}))):null:_(h.default.Fragment,null,u("prev-btn",{type:"button",label:l(s),actionType:"prev",className:r,hiddenOn:"${currentStep === 1}",id:null==f?void 0:f.getChild("button-prev").getTestIdValue()},{disabled:S||!w||i,onAction:this.handleAction,data:p.createObject(this.props.data,{currentStep:y})}),u("next-btn",{type:"button",label:v?A.api?l(d):l(o):l(c),actionType:"next",primary:!v||!!A.api,className:r,level:"primary",id:null==f?void 0:f.getChild("button-next").getTestIdValue()},{disabled:S||i||n&&(!!A.api||!v),onAction:this.handleAction}))},e.prototype.renderFooter=function(){var t=this.renderActions();if(!t)return t;var e=this.props,a=e.classnames,n=e.affixFooter,i=e.footerClassName,r=e.wrapWithPanel;return _("div",{role:"wizard-footer",className:a("Wizard-footer",r?"Panel-footer":"",n&&r?"Panel-fixedBottom":"",i)},t)},e.prototype.renderWizard=function(){var t=this.props,e=t.className,a=t.steps,n=t.style,i=t.render,r=t.store,o=t.classPrefix,p=t.classnames,d=t.popOverContainer,c=t.mode,l=t.translate,h=t.loadingConfig,f=t.stepClassName,m=t.bodyClassName,y=t.wrapWithPanel,g=this.state,v=g.rawSteps,b=g.currentStep,S=Array.isArray(v)&&v.length>0?v:Array.isArray(a)?s.__spreadArray([],s.__read(a),!1).map((function(t){return delete t.hiddenOn,t})):null,A=Array.isArray(S)?S[b-1]:null;return _("div",{ref:this.domRef,className:p(y?"".concat(o,"Panel ").concat(o,"Panel--default"):"","".concat(o,"Wizard ").concat(o,"Wizard--").concat(c),e),style:n},_("div",{className:p("".concat(o,"Wizard-step"),f)},this.renderSteps(),_("div",{role:"wizard-body",className:p("".concat(o,"Wizard-stepContent clearfix"),m)},A?i("body",s.__assign(s.__assign({},A),{type:"form",wrapWithPanel:!1,api:null}),{key:this.state.currentStep,ref:this.formRef,onInit:this.handleInit,onReset:this.handleReset,onSubmit:this.handleSubmit,onAction:this.handleAction,onQuery:this.handleQuery,disabled:r.loading,popOverContainer:d||this.getPopOverContainer,onChange:this.handleChange,formStore:void 0}):-1===b?l("loading"):_("p",{className:"text-danger"},l("Wizard.configError"))),this.renderFooter()),i("dialog",s.__assign(s.__assign({},r.action&&r.action.dialog),{type:"dialog"}),{key:"dialog",data:r.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:r.dialogOpen}),_(u.default,{loadingConfig:h,size:"lg",overlay:!0,key:"info",show:r.loading}))},e.prototype.render=function(){return this.renderWizard()},e.defaultProps={mode:"horizontal",readOnly:!1,messages:{},actionClassName:"",actionPrevLabel:"Wizard.prev",actionNextLabel:"Wizard.next",actionNextSaveLabel:"Wizard.saveAndNext",actionFinishLabel:"Wizard.finish",startStep:"1",wrapWithPanel:!0},e.propsList=["steps","mode","messages","actionClassName","actionPrevLabel","actionNextLabel","actionNextSaveLabel","actionFinishLabel","onFinished","affixFooter","startStep"],s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],e.prototype,"formRef",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],e.prototype,"domRef",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],e.prototype,"getPopOverContainer",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object,Object,Boolean,Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleAction",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleQuery",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Promise)],e.prototype,"handleChange",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleInit",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleReset",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleSubmit",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Array,Object,Array]),s.__metadata("design:returntype",void 0)],e.prototype,"handleDialogConfirm",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleDialogClose",null),s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number,Object]),s.__metadata("design:returntype",void 0)],e.prototype,"handleJumpStep",null),e}(h.default.Component);function g(t,e,a,n){return t&&t.hasOwnProperty("jumpable")?t.jumpable:t&&t.jumpableOn?p.evalExpression(t.jumpableOn,p.createObject(n,{currentStep:a})):e+1<a}var v=function(t){function e(e,a){var n=t.call(this,e)||this;return a.registerComponent(n),n}return s.__extends(e,t),e.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),t.prototype.componentWillUnmount.call(this)},e.prototype.doAction=function(t,e,a){return this.handleAction(void 0,t,e)},e.prototype.submitToTarget=function(t,e){this.context.send(t,e)},e.prototype.reloadTarget=function(t,e){this.context.reload(t,e)},e.prototype.handleDialogConfirm=function(e,a,n){t.prototype.handleDialogConfirm.call(this,e,a,n);var i=this.props.store,r=this.context;a.reload?r.reload(a.reload,i.data):i.action&&i.action.reload&&r.reload(i.action.reload,i.data)},e.prototype.setData=function(t,e){return this.props.store.updateData(t,void 0,e)},e.prototype.getData=function(){return this.props.store.data},e.contextType=p.ScopedContext,s.__decorate([p.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Array,Object,Array]),s.__metadata("design:returntype",void 0)],e.prototype,"handleDialogConfirm",null),e=s.__decorate([p.Renderer({type:"wizard",storeType:p.ServiceStore.name,isolateScope:!0}),s.__metadata("design:paramtypes",[Object,Object])],e)}(y);e.WizardRenderer=v,e.default=y}));
|
||
;/*!node_modules/amis/lib/renderers/Chart.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Chart",(function(require,exports,module,define){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("node_modules/tslib/tslib"),React=require("node_modules/react/index"),amisCore=require("node_modules/amis-core/lib/index"),cx=require("node_modules/classnames/index"),mobxStateTree=require("node_modules/mobx-state-tree/dist/mobx-state-tree"),debounce=require("node_modules/lodash/debounce"),pick=require("node_modules/lodash/pick"),isString=require("node_modules/lodash/isString");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),cx__default=_interopDefaultLegacy(cx),debounce__default=_interopDefaultLegacy(debounce),pick__default=_interopDefaultLegacy(pick),isString__default=_interopDefaultLegacy(isString),__react_jsx__=require("node_modules/react/index"),_J$X_=(__react_jsx__.default||__react_jsx__).createElement;(__react_jsx__.default||__react_jsx__).Fragment;var DEFAULT_EVENT_PARAMS=["componentType","seriesType","seriesIndex","seriesName","name","dataIndex","data","dataType","value","color"],EVAL_CACHE={};function recoverFunctionType(config){["interval","formatter","color","min","max","labelFormatter","valueFormatter","pageFormatter","optionToContent","contentToOption","animationDelay","animationDurationUpdate","animationDelayUpdate","animationDuration","position","sort","renderItem"].forEach((function(key){var e_1,_a,objects=amisCore.findObjectsWithKey(config,key);try{for(var objects_1=tslib.__values(objects),objects_1_1=objects_1.next();!objects_1_1.done;objects_1_1=objects_1.next()){var object=objects_1_1.value,code=object[key];if("string"==typeof code&&code.trim().startsWith("function"))try{code in EVAL_CACHE||(EVAL_CACHE[code]=eval("("+code+")")),object[key]=EVAL_CACHE[code]}catch(e){console.warn(code,e)}}}catch(e){e_1={error:e}}finally{try{objects_1_1&&!objects_1_1.done&&(_a=objects_1.return)&&_a.call(objects_1)}finally{if(e_1)throw e_1.error}}}))}var Chart=function(e){function t(t){var r=e.call(this,t)||this;return r.refFn=r.refFn.bind(r),r.reload=r.reload.bind(r),r.reloadEcharts=debounce__default.default(r.reloadEcharts.bind(r),300),r.handleClick=r.handleClick.bind(r),r.dispatchEvent=r.dispatchEvent.bind(r),r.loadChartMapData=r.loadChartMapData.bind(r),r.mounted=!0,t.config&&r.renderChart(t.config),r}return tslib.__extends(t,e),t.prototype.componentDidMount=function(){return tslib.__awaiter(this,void 0,void 0,(function(){var e,t,r,i,a,o,s;return tslib.__generator(this,(function(n){switch(n.label){case 0:return e=this.props,t=e.api,r=e.data,i=e.initFetch,a=e.source,[4,(0,e.dispatchEvent)("init",r,this)];case 1:return(null==(o=n.sent())?void 0:o.prevented)||(a&&amisCore.isPureVariable(a)?(s=amisCore.resolveVariableAndFilter(a,r,"| raw"))&&this.renderChart(s):t&&!1!==i&&this.reload()),[2]}}))}))},t.prototype.componentDidUpdate=function(e){var t=this,r=this.props;if(amisCore.isApiOutdated(e.api,r.api,e.data,r.data))this.reload();else if(r.source&&amisCore.isPureVariable(r.source)){var i=e.source?amisCore.resolveVariableAndFilter(e.source,e.data,"| raw"):null,a=amisCore.resolveVariableAndFilter(r.source,r.data,"| raw");i!==a&&this.renderChart(a||{})}else if(r.config!==e.config)this.renderChart(r.config||{});else if(r.config&&r.trackExpression&&amisCore.filter(r.trackExpression,r.data)!==amisCore.filter(e.trackExpression,e.data))this.renderChart(r.config||{});else if(amisCore.isApiOutdated(e.mapURL,r.mapURL,e.data,r.data)){var o=r.source,s=r.data,n=r.api,c=r.config;this.loadChartMapData((function(){if(o&&amisCore.isPureVariable(o)){var e=amisCore.resolveVariableAndFilter(o,s,"| raw");e&&t.renderChart(e)}else n?t.reload():c&&t.renderChart(c||{})}))}},t.prototype.componentWillUnmount=function(){this.mounted=!1,this.reloadEcharts.cancel(),clearTimeout(this.timer)},t.prototype.loadChartMapData=function(e){return tslib.__awaiter(this,void 0,void 0,(function(){var t,r,i,a,o,s,n;return tslib.__generator(this,(function(c){switch(c.label){case 0:return t=this.props,r=t.env,i=t.data,a=this.props,o=a.mapName,(s=a.mapURL)&&o&&window.echarts?(amisCore.isPureVariable(o)&&(o=amisCore.resolveVariableAndFilter(o,i)),[4,r.fetcher(s,i)]):[3,2];case 1:(n=c.sent()).ok||console.warn("fetch map geo error "+s),window.echarts.registerMap(o,n.data),c.label=2;case 2:return e&&e(),[2]}}))}))},t.prototype.handleClick=function(e){return tslib.__awaiter(this,void 0,void 0,(function(){var t,r,i,a,o;return tslib.__generator(this,(function(s){switch(s.label){case 0:return t=this.props,r=t.onAction,i=t.clickAction,a=t.data,[4,(0,t.dispatchEvent)(e.event,amisCore.createObject(a,tslib.__assign({},pick__default.default(e,DEFAULT_EVENT_PARAMS))))];case 1:return(null==(o=s.sent())?void 0:o.prevented)||i&&r&&r(null,i,amisCore.createObject(a,e)),[2]}}))}))},t.prototype.dispatchEvent=function(e){var t=this.props,r=t.data;(0,t.dispatchEvent)(e.event||e.type,amisCore.createObject(r,tslib.__assign({},pick__default.default(e,"legendselectchanged"===e.type?["name","selected"]:DEFAULT_EVENT_PARAMS))))},t.prototype.refFn=function(e){var t=this,r=this.props.chartRef,i=this.props,a=i.chartTheme,o=i.onChartWillMount,s=i.onChartUnMount,n=i.env,c=i.loadBaiduMap;i.data;var l=this.props,d=l.mapURL,u=l.mapName,h=this.props.onChartMount||this.onChartMount;e?Promise.all([Promise.resolve().then((function(){return new Promise((function(e){require(["node_modules/amis/node_modules/echarts/dist/echarts","node_modules/tslib/tslib"],(function(t,r){e(r.__importStar(t))}))}))})),Promise.resolve().then((function(){return new Promise((function(e){require(["node_modules/echarts-stat/index","node_modules/tslib/tslib"],(function(t,r){e(r.__importStar(t))}))}))})),Promise.resolve().then((function(){return new Promise((function(e){require(["node_modules/amis/node_modules/echarts/extension/dataTool/index","node_modules/tslib/tslib"],(function(t,r){e(r.__importStar(t))}))}))})),Promise.resolve().then((function(){return new Promise((function(e){require(["node_modules/amis/node_modules/echarts/extension/bmap/bmap","node_modules/tslib/tslib"],(function(t,r){e(r.__importStar(t))}))}))})),Promise.resolve().then((function(){return new Promise((function(e){require(["node_modules/echarts-wordcloud/dist/echarts-wordcloud","node_modules/tslib/tslib"],(function(t,r){e(r.__importStar(t))}))}))}))]).then((function(i){var s=tslib.__read(i,2),l=s[0],p=s[1];return tslib.__awaiter(t,void 0,void 0,(function(){var t,i=this;return tslib.__generator(this,(function(s){switch(s.label){case 0:return window.echarts=l,window.ecStat=(null==p?void 0:p.default)||p,d&&u?[4,this.loadChartMapData()]:[3,2];case 1:s.sent(),s.label=2;case 2:return c?[4,amisCore.loadScript("//api.map.baidu.com/api?v=3.0&ak=".concat(this.props.ak,"&callback={{callback}}"))]:[3,4];case 3:s.sent(),s.label=4;case 4:return t="default",a&&(l.registerTheme("custom",a),t="custom"),o?[4,o(l)]:[3,6];case 5:s.sent(),s.label=6;case 6:return p.transform&&(l.registerTransform(p.transform.regression),l.registerTransform(p.transform.histogram),l.registerTransform(p.transform.clustering)),n.loadChartExtends?[4,n.loadChartExtends()]:[3,8];case 7:s.sent(),s.label=8;case 8:return this.echarts=l.init(e,t),"string"==typeof h&&(h=amisCore.str2function(h,"chart","echarts")),null==h||h(this.echarts,l),this.echarts.on("click",this.handleClick),this.echarts.on("mouseover",this.dispatchEvent),this.echarts.on("legendselectchanged",this.dispatchEvent),this.unSensor=amisCore.resizeSensor(e,(function(){var t,r=e.offsetWidth,a=e.offsetHeight;null===(t=i.echarts)||void 0===t||t.resize({width:r,height:a})})),r&&r(this.echarts),this.renderChart(),[2]}}))}))})):(r&&r(null),this.unSensor&&this.unSensor(),this.echarts&&(null==s||s(this.echarts,window.echarts),this.echarts.dispose(),delete this.echarts)),this.ref=e},t.prototype.doAction=function(e,t,r){var i,a;return null===(a=null===(i=this.echarts)||void 0===i?void 0:i.dispatchAction)||void 0===a?void 0:a.call(i,tslib.__assign({type:e.actionType},t))},t.prototype.reload=function(e,t,r,i,a){var o,s,n,c,l,d;return tslib.__awaiter(this,void 0,void 0,(function(){var e,r,i,u,h,p,m,_,f,v,b=this;return tslib.__generator(this,(function(C){switch(C.label){case 0:if(e=this.props,r=e.api,i=e.env,u=e.store,h=e.translate,t)return[2,this.receive(t,void 0,a)];if(!i||!i.fetcher||!amisCore.isEffectiveApi(r,u.data))return[2];clearTimeout(this.timer),this.reloadCancel&&(this.reloadCancel(),delete this.reloadCancel,null===(o=this.echarts)||void 0===o||o.hideLoading()),null===(s=this.echarts)||void 0===s||s.showLoading(),u.markFetching(!0),C.label=1;case 1:return C.trys.push([1,3,,4]),[4,i.fetcher(r,u.data,{cancelExecutor:function(e){return b.reloadCancel=e}})];case 2:return p=C.sent(),mobxStateTree.isAlive(u)&&u.markFetching(!1),p.ok?(delete this.reloadCancel,!(m=amisCore.normalizeApiResponseData(p.data)).series&&this.props.config?(_=amisCore.createObject(this.props.data,m),this.renderChart(this.props.config,_)):this.renderChart(p.data||{}),null===(l=this.echarts)||void 0===l||l.hideLoading(),(f=this.props.interval)&&isString__default.default(f)&&(f=Number.parseInt(f)),f&&this.mounted&&(this.timer=setTimeout(this.reload,Math.max(f,1e3))),[2,u.data]):(!(null==r?void 0:r.silent)&&i.notify("error",null!==(c=null===(n=null==r?void 0:r.messages)||void 0===n?void 0:n.failed)&&void 0!==c?c:p.msg||h("fetchFailed"),void 0!==p.msgTimeout?{closeButton:!0,timeout:p.msgTimeout}:void 0),[2]);case 3:return v=C.sent(),i.isCancel(v)?[2]:(mobxStateTree.isAlive(u)&&u.markFetching(!1),!(null==r?void 0:r.silent)&&i.notify("error",v),null===(d=this.echarts)||void 0===d||d.hideLoading(),[3,4]);case 4:return[2]}}))}))},t.prototype.receive=function(e,t,r){this.props.store.updateData(e,void 0,r),this.reload()},t.prototype.renderChart=function(e,t){var r,i;if(e&&(this.pending=e),t&&(this.pendingCtx=t),this.echarts){var a=this.props.store,o=this.props.onDataFilter,s=this.props.dataFilter;o||"string"!=typeof s||(o=new Function("config","echarts","data",s)),e=e||this.pending,t=t||this.pendingCtx||this.props.data,"string"==typeof e&&(e=new Function("return "+e)());try{o&&(e=o(e,window.echarts,t)||e)}catch(e){console.warn(e)}if(e)try{this.props.disableDataMapping||(e=amisCore.dataMapping(e,t,(function(e,t){return"function"==typeof t||"string"==typeof t&&t.startsWith("function")}))),recoverFunctionType(e),mobxStateTree.isAlive(a)&&a.loading?null===(r=this.echarts)||void 0===r||r.showLoading():null===(i=this.echarts)||void 0===i||i.hideLoading(),this.reloadEcharts(e)}catch(e){console.warn(e)}}},t.prototype.reloadEcharts=function(e){var t;null===(t=this.echarts)||void 0===t||t.setOption(e,this.props.replaceChartOption)},t.prototype.render=function(){var e=this,t=this.props,r=t.className,i=t.width,a=t.height,o=t.classPrefix,s=t.unMountOnHidden,n=t.data,c=t.id,l=t.wrapperCustomStyle,d=t.env,u=t.themeCss;t.baseControlClassName;var h=this.props.style||{};h.width=h.width||i||"100%",h.height=h.height||a||"300px";var p=amisCore.buildStyle(h,n);return _J$X_("div",{className:cx__default.default("".concat(o,"Chart"),r,amisCore.setThemeClassName(tslib.__assign(tslib.__assign({},this.props),{name:"baseControlClassName",id:c,themeCss:u})),amisCore.setThemeClassName(tslib.__assign(tslib.__assign({},this.props),{name:"wrapperCustomStyle",id:c,themeCss:l}))),style:p},_J$X_(amisCore.LazyComponent,{unMountOnHidden:s,placeholder:"...",component:function(){return _J$X_("div",{className:"".concat(o,"Chart-content"),ref:e.refFn})}}),_J$X_(amisCore.CustomStyle,tslib.__assign({},this.props,{config:{wrapperCustomStyle:l,id:c,themeCss:u,classNames:[{key:"baseControlClassName"}]},env:d})))},t.defaultProps={replaceChartOption:!1,unMountOnHidden:!1},t.propsList=[],t}(React__default.default.Component),ChartRenderer=function(e){function t(t,r){var i=e.call(this,t)||this;return r.registerComponent(i),i}return tslib.__extends(t,e),t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},t.prototype.setData=function(e,t){var r=this.props.store;r.updateData(e,void 0,t),this.renderChart(this.props.config,r.data)},t.prototype.getData=function(){return this.props.store.data},t.contextType=amisCore.ScopedContext,t=tslib.__decorate([amisCore.Renderer({type:"chart",storeType:amisCore.ServiceStore.name}),tslib.__metadata("design:paramtypes",[Object,Object])],t)}(Chart);exports.Chart=Chart,exports.ChartRenderer=ChartRenderer}));
|
||
;/*!node_modules/amis/lib/renderers/Container.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Container",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("node_modules/amis-ui/lib/components/DndContainer"),o=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),d=e("node_modules/lodash/merge"),i=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=l(s),u=l(r),m=l(d),_=e("node_modules/react/index"),c=(_.default||_).createElement;(_.default||_).Fragment;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseEnter=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseLeave=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.renderBody=function(){var e=this.props,t=e.children,a=e.body,n=e.render,s=e.classnames,r=e.bodyClassName,d=e.disabled,i=e.wrapperBody,l=e.testIdBuilder,p=null==i||i,u=t?"function"==typeof t?t(this.props):t:a?n("body",a,{disabled:d}):null;return p?c("div",o.__assign({className:s("Container-body",r)},null==l?void 0:l.getTestId()),u):u},t.prototype.render=function(){var e=this.props,a=e.className,n=e.wrapperComponent,s=e.size,r=e.classnames,d=e.style,l=e.data,u=e.draggable,_=e.draggableConfig,y=e.id,h=e.wrapperCustomStyle,b=e.env,g=e.themeCss;e.baseControlClassName;var C=i.isPureVariable(u)?i.resolveVariableAndFilter(u,l,"| raw"):u,f=m.default(t.defaultProps.draggableConfig,i.isPureVariable(_)?i.resolveVariableAndFilter(_,l,"| raw"):_),v=c(n||"div",{className:r("Container",s&&"none"!==s?"Container--".concat(s):"",a,i.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"baseControlClassName",id:y,themeCss:g})),i.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"wrapperCustomStyle",id:y,themeCss:h}))),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,style:i.buildStyle(d,l),"data-id":y},this.renderBody(),c(i.CustomStyle,o.__assign({},this.props,{config:{wrapperCustomStyle:h,id:y,themeCss:g,classNames:[{key:"baseControlClassName"}]},env:b})));return C?c(p.default,o.__assign({},f,{draggable:!0}),v):v},t.propsList=["body","className"],t.defaultProps={className:"",draggableConfig:{axis:"both",scale:1,enableUserSelect:!1}},o.__decorate([i.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),o.__decorate([i.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),o.__decorate([i.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(u.default.Component),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([i.Renderer({type:"container"})],t)}(y);t.ContainerRenderer=h,t.default=y}));
|
||
;/*!node_modules/amis/lib/renderers/SwitchContainer.js*/
|
||
amis.define("node_modules/amis/lib/renderers/SwitchContainer",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=d(i),p=e("node_modules/react/index"),l=(p.default||p).createElement;(p.default||p).Fragment;var u=function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeIndex:-1},a}return s.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props.items||[];this.state.activeIndex>0&&!t[this.state.activeIndex]&&this.setState({activeIndex:0})},t.prototype.handleClick=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseEnter=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseLeave=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.renderBody=function(e){var t=this.props,a=t.children,n=t.render,s=t.disabled,i=null==e?void 0:e.body,o=a?"function"==typeof a?a(this.props):a:i?n("body",i,{disabled:s}):null;return l("div",{style:{display:"inline"}},o)},t.prototype.switchTo=function(e){var t=this.props.items||[];e>=0&&e<t.length&&this.setState({activeIndex:e})},t.prototype.render=function(){var e,t=this.props,a=t.className,n=t.items,i=void 0===n?[]:n,d=t.classnames,r=t.style,p=t.data,u=t.id,c=t.wrapperCustomStyle,_=t.env,m=t.themeCss,h=null!==(e=i[this.state.activeIndex])&&void 0!==e?e:i.find((function(e){return o.isVisible(e,p)}));return l("div",{className:d("SwitchContainer",a,o.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"baseControlClassName",id:u,themeCss:m})),o.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"wrapperCustomStyle",id:u,themeCss:c}))),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,style:o.buildStyle(r,p)},h&&this.renderBody(h),l(o.CustomStyle,{config:{wrapperCustomStyle:c,id:u,themeCss:m,classNames:[{key:"baseControlClassName"}]},env:_}))},t.propsList=["body","className"],t.defaultProps={className:""},s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",Object)],t.prototype,"renderBody",null),s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number]),s.__metadata("design:returntype",void 0)],t.prototype,"switchTo",null),t}(r.default.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([o.Renderer({type:"switch-container"})],t)}(u);t.SwitchContainerRenderer=c,t.default=u}));
|
||
;/*!node_modules/amis/lib/renderers/SearchBox.js*/
|
||
amis.define("node_modules/amis/lib/renderers/SearchBox",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/SearchBox"),o=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(r),u=d(i),c=e("node_modules/react/index"),p=(c.default||c).createElement;(c.default||c).Fragment;var h=function(e){function t(t,a){var n=e.call(this,t)||this;return n.state={value:s.getPropValue(t)||""},a.registerComponent(n),n}return o.__extends(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this)},t.prototype.handleChange=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t,a,n,r;return o.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,a=t.onChange,n=t.dispatchEvent,this.setState({value:e}),[4,n("change",s.resolveEventData(this.props,{value:e}))];case 1:return(null==(r=o.sent())?void 0:r.prevented)||(null==a||a(e)),[2]}}))}))},t.prototype.handleCancel=function(){var e=this.props.name,t=this.props.onQuery;if(""!==s.getPropValue(this.props)){var a={};s.setVariable(a,e,""),null==t||t(a)}},t.prototype.handleSearch=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t,a,n,r,i,d;return o.__generator(this,(function(o){switch(o.label){case 0:return t=this.props,a=t.name,n=t.onQuery,r=t.dispatchEvent,i={},s.setVariable(i,a,e),[4,r("search",s.createObject(this.props.data,i))];case 1:return(null==(d=o.sent())?void 0:d.prevented)||(null==n||n(i)),[2]}}))}))},t.prototype.dispatchEvent=function(e){(0,this.props.dispatchEvent)(e,s.resolveEventData(this.props,{value:this.state.value}))},t.prototype.doAction=function(e,t,a,n){"clear"===(null==e?void 0:e.actionType)&&this.setState({value:""})},t.prototype.setData=function(e){"string"==typeof e&&this.handleChange(e)},t.prototype.render=function(){var e=this,t=this.props;t.data;var a=t.name,n=t.disabled,r=t.onQuery,o=t.mini,i=t.enhance,s=t.clearable,d=t.searchImediately,u=t.clearAndSubmit,c=t.placeholder,h=t.onChange,m=t.className,_=t.style,v=t.mobileUI,y=t.loading,g=t.loadingConfig,f=t.onEvent,b=t.testIdBuilder,C=this.state.value,S=!r&&!(null==f?void 0:f.search)||n;return p(l.default,{className:m,style:_,name:a,disabled:S,loading:y,loadingConfig:g,defaultActive:!!C,defaultValue:h?void 0:C,value:C,mini:o,enhance:i,clearable:s,searchImediately:d,clearAndSubmit:u,onSearch:this.handleSearch,onCancel:this.handleCancel,placeholder:c,onChange:this.handleChange,onFocus:function(){return e.dispatchEvent("focus")},onBlur:function(){return e.dispatchEvent("blur")},mobileUI:v,testIdBuilder:b})},t.defaultProps={name:"keywords",mini:!1,enhance:!1,clearable:!1,searchImediately:!1,clearAndSubmit:!1},t.contextType=s.ScopedContext,t.propsList=["mini","searchImediately"],o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String]),o.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],t.prototype,"handleCancel",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String]),o.__metadata("design:returntype",Promise)],t.prototype,"handleSearch",null),o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String]),o.__metadata("design:returntype",void 0)],t.prototype,"dispatchEvent",null),t=o.__decorate([s.Renderer({type:"search-box"}),o.__metadata("design:paramtypes",[Object,Object])],t)}(u.default.Component);t.SearchBoxRenderer=h}));
|
||
;/*!node_modules/amis/lib/renderers/Service.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Service",(function(e,t,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Spinner"),o=e("node_modules/amis-ui/lib/components/Alert2"),n=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),d=e("node_modules/lodash/extend"),c=e("node_modules/lodash/cloneDeep"),u=e("node_modules/amis-core/lib/index"),l=e("node_modules/lodash/isPlainObject"),p=e("node_modules/mobx-state-tree/dist/mobx-state-tree");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(r),v=h(o),m=h(s),g=h(d),y=h(c),_=h(l),b=e("node_modules/react/index"),D=(b.default||b).createElement;(b.default||b).Fragment;var P=["inited","onApiFetched","onSchemaApiFetched","onWsFetched"],F=function(e){function t(t){var a=e.call(this,t)||this;return a.dataProviders=a.initDataProviders(t.dataProvider),a.handleQuery=a.handleQuery.bind(a),a.handleAction=a.handleAction.bind(a),a.handleChange=a.handleChange.bind(a),a.reload=a.reload.bind(a),a.silentReload=a.silentReload.bind(a),a.initInterval=a.initInterval.bind(a),a.afterDataFetch=a.afterDataFetch.bind(a),a.afterSchemaFetch=a.afterSchemaFetch.bind(a),a.runDataProvider=a.runDataProvider.bind(a),a.dataProviderSetData=a.dataProviderSetData.bind(a),a}return n.__extends(t,e),t.prototype.componentDidMount=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,a,i;return n.__generator(this,(function(r){switch(r.label){case 0:return e=this.props,t=e.data,a=e.dispatchEvent,this.mounted=!0,[4,a("init",t,this)];case 1:return(null==(i=r.sent())?void 0:i.prevented)||this.initFetch(),[2]}}))}))},t.prototype.componentDidUpdate=function(e){var t,a=this,i=this.props,r=i.store,o=i.messages,n=o.fetchSuccess,s=o.fetchFailed;i.dataProvider!==e.dataProvider&&(this.dataProviders=this.initDataProviders(i.dataProvider),this.dataProviders&&(null===(t=this.dataProviders)||void 0===t?void 0:t.inited)&&this.runDataProvider("inited")),u.isApiOutdated(e.api,i.api,e.data,i.data)&&u.isEffectiveApi(i.api,r.data)&&r.fetchData(i.api,r.data,{successMessage:n,errorMessage:s}).then((function(e){a.runDataProvider("onApiFetched"),a.afterDataFetch(e)})),u.isApiOutdated(e.schemaApi,i.schemaApi,e.data,i.data)&&u.isEffectiveApi(i.schemaApi,r.data)&&r.fetchSchema(i.schemaApi,r.data,{successMessage:n,errorMessage:s}).then((function(e){a.runDataProvider("onSchemaApiFetched"),a.afterSchemaFetch(e)})),i.ws&&e.ws!==i.ws&&(this.socket&&this.socket.close(),this.socket=this.fetchWSData(i.ws,r.data)),u.isObjectShallowModified(e.defaultData,i.defaultData)&&r.reInitData(i.defaultData)},t.prototype.componentWillUnmount=function(){this.mounted=!1,this.runDataProviderUnsubscribe(),clearTimeout(this.timer),this.socket&&this.socket.close&&this.socket.close()},t.prototype.doAction=function(e,t,a,i){if("rebuild"===(null==e?void 0:e.actionType)){var r=this.props,o=r.schemaApi,n=r.store,s=r.dataProvider,d=r.messages,c=d.fetchSuccess,l=d.fetchFailed;n.updateData(i),clearTimeout(this.timer),u.isEffectiveApi(o,n.data)&&n.fetchSchema(o,n.data,{successMessage:c,errorMessage:l}).then(this.afterSchemaFetch),s&&this.runDataProvider("inited")}},t.prototype.initFetch=function(){var e=this,t=this.props,a=t.schemaApi,i=t.initFetchSchema,r=t.api,o=t.ws,n=t.initFetch,s=t.initFetchOn,d=t.dataProvider,c=t.store,l=t.messages,p=l.fetchSuccess,h=l.fetchFailed;u.isEffectiveApi(a,c.data,i)&&c.fetchSchema(a,c.data,{successMessage:p,errorMessage:h}).then((function(t){e.runDataProvider("onSchemaApiFetched"),e.afterSchemaFetch(t)})),u.isEffectiveApi(r,c.data,n,s)&&c.fetchInitData(r,c.data,{successMessage:p,errorMessage:h}).then((function(t){e.runDataProvider("onApiFetched"),e.afterDataFetch(t)})),o&&(this.socket=this.fetchWSData(o,c.data)),d&&this.runDataProvider("inited")},t.prototype.initDataProviders=function(e){var t=this,a=_.default(e)?y.default(e):e,i={};if(a)if(_.default(a))Object.keys(a).forEach((function(e){var r=t.normalizeProvider(a[e],e);i=g.default(i,r||{})}));else{var r=this.normalizeProvider(a,"inited");i=g.default(i,r||{})}return i},t.prototype.normalizeProvider=function(e,t){var a,i;if(void 0===t&&(t="inited"),!~P.indexOf(t))return null;if("function"==typeof e)return(a={})[t]=e,a;if("string"==typeof e){var r=u.str2AsyncFunction(e,"data","setData","env");return r?((i={})[t]=r,i):null}return null},t.prototype.runDataProvider=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,a,i,r;return n.__generator(this,(function(o){switch(o.label){case 0:return this.runDataProviderUnsubscribe(e),t=this.props.store,(a=this.dataProviders)&&~P.indexOf(e)?(i=a[e])&&"function"==typeof i?[4,i(t.data,this.dataProviderSetData,this.props.env)]:[3,2]:[3,2];case 1:"function"==typeof(r=o.sent())&&(this.dataProviderUnsubscribe||(this.dataProviderUnsubscribe={}),this.dataProviderUnsubscribe[e]=r),o.label=2;case 2:return[2]}}))}))},t.prototype.runDataProviderUnsubscribe=function(e){var t,a=this.dataProviderUnsubscribe;if(a)if(e){var i=a[e];try{i&&"function"==typeof i&&i()}catch(e){console.error(e)}}else null===(t=Object.keys(a))||void 0===t||t.forEach((function(e){var t=a[e];try{t&&"function"==typeof t&&t()}catch(e){console.error(e)}}))},t.prototype.dataProviderSetData=function(e){if(this.mounted){var t=this.props.store;t.updateData(e,void 0,!1),t.setHasRemoteData()}},t.prototype.fetchWSData=function(e,t){var a=this,i=this.props,r=i.env,o=i.store,n=u.buildApi(e,t);r.wsFetcher(n,(function(e){var t,i,s,d,c=e;if("status"in e&&"data"in e&&(c=e.data,0!==e.status))return o.updateMessage(null!==(i=null===(t=null==n?void 0:n.messages)||void 0===t?void 0:t.failed)&&void 0!==i?i:e.msg,!0),void r.notify("error",null!==(d=null===(s=null==n?void 0:n.messages)||void 0===s?void 0:s.failed)&&void 0!==d?d:e.msg);o.updateData(c,void 0,!1,n.concatDataFields),o.setHasRemoteData(),a.runDataProvider("onWsFetched"),a.afterDataFetch({ok:!0,data:c})}),(function(e){o.updateMessage(e,!0),r.notify("error",e)}))},t.prototype.afterDataFetch=function(e){var t,a=(null==e?void 0:e.hasOwnProperty("ok"))?null!==(t=e.data)&&void 0!==t?t:{}:e,i=this.props,r=i.onBulkChange,o=i.dispatchEvent,s=i.store,d=i.formStore;p.isAlive(s)&&(null==o||o("fetchInited",u.createObject(this.props.data,n.__assign(n.__assign({},a),{__response:{msg:s.msg,error:s.error},responseData:a,responseStatus:void 0===(null==e?void 0:e.status)?s.error?1:0:null==e?void 0:e.status,responseMsg:s.msg}))),!u.isEmpty(a)&&r&&d&&r(a,!1,{type:"api"}),(null==e?void 0:e.ok)&&this.initInterval(a))},t.prototype.afterSchemaFetch=function(e){var t=this.props,a=t.onBulkChange,i=t.formStore,r=t.dispatchEvent,o=t.store;null==r||r("fetchSchemaInited",n.__assign(n.__assign({},e),{__response:{msg:o.msg,error:o.error},responseData:e,responseStatus:void 0===(null==e?void 0:e.status)?o.error?1:0:null==e?void 0:e.status,responseMsg:o.msg})),i&&(null==e?void 0:e.data)&&a&&a&&a(e.data),this.initInterval(e)},t.prototype.initInterval=function(e){var t=this.props,a=t.interval,i=t.silentPolling,r=t.stopAutoRefreshWhen,o=t.data;return clearTimeout(this.timer),a&&this.mounted&&(!r||!u.evalExpression(r,u.createObject(o,e)))&&(this.timer=setTimeout(i?this.silentReload:this.reload,Math.max(a,1e3))),e},t.prototype.reload=function(e,t,a,i,r){return n.__awaiter(this,void 0,void 0,(function(){var e,a,o,s,d,c,l,p,h;return n.__generator(this,(function(n){switch(n.label){case 0:return t?[2,this.receive(t,void 0,r)]:(e=this.props,a=e.schemaApi,e.initFetchSchema,o=e.api,e.initFetch,e.initFetchOn,s=e.store,d=e.dataProvider,c=e.messages,l=c.fetchSuccess,p=c.fetchFailed,clearTimeout(this.timer),u.isEffectiveApi(a,s.data)?[4,s.fetchSchema(a,s.data,{successMessage:l,errorMessage:p})]:[3,3]);case 1:return h=n.sent(),[4,this.runDataProvider("onApiFetched")];case 2:n.sent(),this.afterSchemaFetch(h),n.label=3;case 3:return u.isEffectiveApi(o,s.data)?[4,s.fetchData(o,s.data,{silent:i,successMessage:l,errorMessage:p})]:[3,6];case 4:return h=n.sent(),[4,this.runDataProvider("onSchemaApiFetched")];case 5:n.sent(),this.afterDataFetch(h),n.label=6;case 6:return d?[4,this.runDataProvider("inited")]:[3,8];case 7:n.sent(),n.label=8;case 8:return[2,s.data]}}))}))},t.prototype.silentReload=function(e,t){this.reload(e,t,void 0,!0)},t.prototype.receive=function(e,t,a){return n.__awaiter(this,void 0,void 0,(function(){return n.__generator(this,(function(t){return this.props.store.updateData(e,void 0,a),[2,this.reload()]}))}))},t.prototype.handleQuery=function(e){var t=this;return this.props.api||this.props.schemaApi?(!(null==e?void 0:e.hasOwnProperty("orderBy"))||![this.props.api,this.props.schemaApi].every((function(a){return!a||!u.isApiOutdated(a,a,t.props.store.data,u.createObject(t.props.store.data,e))})))&&void this.receive(e):!!this.props.onQuery&&this.props.onQuery(e)},t.prototype.reloadTarget=function(e,t){},t.prototype.handleDialogConfirm=function(e,t,a,i){this.props.store.closeDialog(!0,e)},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1),this.props.store.closeDialog(e)},t.prototype.openFeedback=function(e,t){var a=this;return new Promise((function(i){var r=a.props.store;r.setCurrentAction({type:"button",actionType:"dialog",dialog:e},a.props.resolveDefinitions),r.openDialog(t,void 0,(function(e){i(e)}),a.context)}))},t.prototype.handleAction=function(e,t,a,i,r){var o=this;void 0===i&&(i=!1);var s=this.props,d=s.onAction,c=s.store,l=s.env,p=s.api,h=s.translate;p&&"ajax"===t.actionType?(c.setCurrentAction(t,this.props.resolveDefinitions),c.saveRemote(t.api,a,{successMessage:h(t.messages&&t.messages.success),errorMessage:h(t.messages&&t.messages.failed)}).then((function(e){return n.__awaiter(o,void 0,void 0,(function(){var a;return n.__generator(this,(function(i){switch(i.label){case 0:return this.afterDataFetch(e),t.feedback&&u.isVisible(t.feedback,c.data)?[4,this.openFeedback(t.feedback,c.data)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(a=t.redirect&&u.filter(t.redirect,c.data))&&l.jumpTo(a,t,c.data),t.reload&&this.reloadTarget(u.filterTarget(t.reload,c.data),c.data),[2]}}))}))})).catch((function(e){if(i||t.countDown)throw e}))):d(e,t,a,i,r||this.context)},t.prototype.handleChange=function(e,t,a,i){var r,o,n=this.props,s=n.store,d=n.formStore,c=n.onChange;"string"==typeof t&&(null===(o=(r=s).changeValue)||void 0===o||o.call(r,t,e),d&&(null==c||c(e,t,a,i)))},t.prototype.renderBody=function(){var e=this.props,t=e.render,a=e.store,i=e.body;return e.classnames,t("body",a.schema||i,{key:a.schemaKey||"body",loading:a.loading,onQuery:this.handleQuery,onAction:this.handleAction,onChange:this.handleChange})},t.prototype.render=function(){var e=this.props,t=e.className,a=e.style,i=e.store,r=e.render,o=e.env,s=e.classPrefix,d=e.classnames,c=e.loadingConfig,u=e.showErrorMsg,l=e.testIdBuilder;return D("div",n.__assign({className:d("".concat(s,"Service"),t),style:a},null==l?void 0:l.getTestId()),!o.forceSilenceInsideError&&i.error&&!1!==u?D(v.default,{level:"danger",showCloseButton:!0,onClose:function(){return i.updateMessage("")}},i.msg):null,this.renderBody(),D(f.default,{size:"lg",overlay:!0,key:"info",show:i.loading,loadingConfig:c}),r("modal",n.__assign(n.__assign({},i.action&&i.action.dialog),{type:"dialog"}),{key:"dialog",data:i.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:i.dialogOpen}))},t.defaultProps={messages:{fetchFailed:"fetchFailed"},showErrorMsg:!0},t.propsList=[],n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"initFetch",null),n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],t.prototype,"initDataProviders",null),n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,String]),n.__metadata("design:returntype",Object)],t.prototype,"normalizeProvider",null),n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array,Object,Object,Array]),n.__metadata("design:returntype",void 0)],t.prototype,"handleDialogConfirm",null),n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleDialogClose",null),t}(m.default.Component),S=function(e){function t(t,a){var i=e.call(this,t)||this;return a.registerComponent(i),i}return n.__extends(t,e),t.prototype.reload=function(t,a,i,r,o){return n.__awaiter(this,void 0,void 0,(function(){var s;return n.__generator(this,(function(n){return s=this.context,t?[2,s.reload(a?"".concat(t,"?").concat(u.qsstringify(a)):t,i)]:[2,e.prototype.reload.call(this,t,a,i,r,o)]}))}))},t.prototype.receive=function(t,a,i){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(o){return r=this.context,a?[2,r.send(a,t)]:[2,e.prototype.receive.call(this,t,a,i)]}))}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.setData=function(e,t){return this.props.store.updateData(e,void 0,t)},t.prototype.getData=function(){return this.props.store.data},t.contextType=u.ScopedContext,t=n.__decorate([u.Renderer({type:"service",storeType:u.ServiceStore.name,isolateScope:!0,storeExtendsData:function(e){return!e.formStore}}),n.__metadata("design:paramtypes",[Object,Object])],t)}(F);t.ServiceRenderer=S,t.default=F,t.eventTypes=P}));
|
||
;/*!node_modules/amis/lib/renderers/SparkLine.js*/
|
||
amis.define("node_modules/amis/lib/renderers/SparkLine",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/SparkLine"),r=e("node_modules/tslib/tslib"),o=e("node_modules/amis-core/lib/index"),s=e("node_modules/react/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(i),u=l(s),p=e("node_modules/react/index"),c=(p.default||p).createElement;(p.default||p).Fragment;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.handleClick=function(e,t){var n=this.props,a=n.disabled,i=n.onAction,r=n.clickAction,s=n.data;e.defaultPrevented||!r||a||null==i||i(null,r,t?o.createObject(s,t):s)},t.prototype.render=function(){var e=this.props;e.value,e.name;var t=e.clickAction,n=e.id,a=e.wrapperCustomStyle,i=e.env,s=e.themeCss,l=o.getPropValue(this.props)||[1,1];return c(u.default.Fragment,null,c(d.default,r.__assign({onClick:t?this.handleClick:void 0},this.props,{value:l})),c(o.CustomStyle,r.__assign({},this.props,{config:{wrapperCustomStyle:a,id:n,themeCss:s,classNames:[{key:"baseControlClassName"}]},env:i})))},r.__decorate([o.autobind,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object,Object]),r.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),t=r.__decorate([o.Renderer({type:"sparkline"})],t)}(u.default.Component);t.SparkLineRenderer=m}));
|
||
;/*!node_modules/amis/lib/renderers/Video.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Video",(function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),i=e("node_modules/video-react/lib/index"),n=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(a),p=e("node_modules/react/index"),c=(p.default||p).createElement;(p.default||p).Fragment;var d=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.loaded=!1,e}return s.__extends(r,t),r.prototype.componentDidMount=function(){var e=this.props,t=e.src,r=e.video,o=e.config,s=e.manager,a=e.isLive,i=e.autoPlay,n=e.actions,l=e.setError;this.initFlv({video:r,manager:s,src:t,isLive:a,config:o,actions:n,setError:l,autoPlay:i})},r.prototype.componentDidUpdate=function(e){var t,r,o=this.props,s=o.autoPlay,a=o.actions,i=o.src,n=o.setError,l=o.isLive,u=o.config,p=o.video,c=o.manager;i!==e.src&&(n(""),null===(t=this.mpegtsPlayer)||void 0===t||t.destroy(),null===(r=this.unsubscribe)||void 0===r||r.call(this),this.loaded=!1,this.initFlv({video:p,manager:c,src:i,isLive:l,config:u,actions:a,setError:n,autoPlay:s}))},r.prototype.componentWillUnmount=function(){var e,t;this.mpegtsPlayer&&(this.mpegtsPlayer.destroy(),null===(t=(e=this.props).setError)||void 0===t||t.call(e,""))},r.prototype.initFlv=function(t){var r=this,o=t.video,s=t.manager,a=t.src,i=t.isLive,n=t.config,l=t.actions,u=t.setError,p=t.autoPlay;Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/mpegts.js/dist/mpegts","node_modules/tslib/tslib"],(function(e,r){t(r.__importStar(e))}))}))})).then((function(e){o=o||s.video&&s.video.video;var t=e.createPlayer({type:"flv",url:a,isLive:i},n);t.attachMediaElement(o),r.mpegtsPlayer=t,r.unsubscribe=s.subscribeToOperationStateChange((function(e){var o=e.operation.action;"play"===o?(clearTimeout(r.timer),r.loaded||(r.loaded=!0,t.load()),t.play()):"pause"===o&&(t.pause(),i&&(r.timer=setTimeout((function(){l.seek(0),t.unload(),r.loaded=!1}),3e4)))})),t.on(e.Events.RECOVERED_EARLY_EOF,(function(){u("直播已经结束")})),t.on(e.Events.ERROR,(function(){u("视频加载失败"),t.unload()})),p&&setTimeout((function(){return l.play()}),200)}))},r.prototype.render=function(){return c("source",{src:this.props.src,type:this.props.type||"video/x-flv"})},r}(u.default.Component),m=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.loaded=!1,e}return s.__extends(r,t),r.prototype.componentDidMount=function(){var e=this.props,t=e.src,r=e.video;e.config;var o=e.manager;e.isLive;var s=e.autoPlay,a=e.actions;this.initHls({video:r,manager:o,src:t,autoPlay:s,actions:a})},r.prototype.componentWillUnmount=function(){this.hls&&(this.hls.stopLoad(),this.hls.detachMedia())},r.prototype.componentDidUpdate=function(e){var t,r,o,s=this.props,a=s.autoPlay,i=s.actions,n=s.src;s.isLive,s.config;var l=s.video,u=s.manager;n!==e.src&&(null===(t=this.hls)||void 0===t||t.stopLoad(),null===(r=this.hls)||void 0===r||r.detachMedia(),null===(o=this.unsubscribe)||void 0===o||o.call(this),this.loaded=!1,this.initHls({video:l,manager:u,src:n,autoPlay:a,actions:i}))},r.prototype.initHls=function(t){var r=this,o=t.video,s=t.manager,a=t.src,i=t.autoPlay,n=t.actions;Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/hls.js/dist/hls","node_modules/tslib/tslib"],(function(e,r){t(r.__importStar(e))}))}))})).then((function(e){var t=e.default;if(t.isSupported()){o=o||s.video&&s.video.video;var l=r.hls=new t({autoStartLoad:!1});l.attachMedia(o),l.loadSource(a),r.unsubscribe=s.subscribeToOperationStateChange((function(e){var t=e.operation.action;"play"===t?(r.loaded||(r.loaded=!0,l.startLoad()),o.play()):"pause"===t&&(o.pause(),l.stopLoad(),r.loaded=!1)})),i&&setTimeout(n.play,200)}}))},r.prototype.render=function(){return c("source",{src:this.props.src,type:this.props.type||"application/x-mpegURL"})},r}(u.default.Component),f=function(e){function t(t){var r=e.call(this,t)||this;return r.manualJump=!1,r.state={posterInfo:null,videoState:{}},r.frameRef=r.frameRef.bind(r),r.cursorRef=r.cursorRef.bind(r),r.playerRef=r.playerRef.bind(r),r.onImageLoaded=r.onImageLoaded.bind(r),r.onClick=r.onClick.bind(r),r.setError=r.setError.bind(r),r}return s.__extends(t,e),t.prototype.onImageLoaded=function(e){var t=this,r=new Image;r.onload=function(){t.setState({posterInfo:{width:r.width,height:r.height}}),r=r.onload=null},r.src=e.target.getAttribute("src")},t.prototype.frameRef=function(e){this.frameDom=e},t.prototype.cursorRef=function(e){this.cursorDom=e},t.prototype.playerRef=function(e){var t=this;this.player=e,e&&e.subscribeToStateChange((function(r){if(t.setState({videoState:r}),t.frameDom&&t.times){for(var o=t.props.jumpBufferDuration||0,s=0,a=t.times,i=a.length,n=t.props.stopOnNextFrame;s<i-1&&!(a[s+1]&&r.currentTime<a[s+1]-o);)s++;t.currentIndex!==s&&(t.moveCursorToIndex(s),n&&!t.manualJump&&e.pause(),t.manualJump&&(t.manualJump=!1))}}))},t.prototype.moveCursorToIndex=function(e){var t=this.props.classPrefix;if(this.frameDom&&this.cursorDom){var r=this.frameDom.querySelectorAll(".".concat(t,"Video-frame"));if(r&&r.length&&r[e]){this.currentIndex=e;var o=r[e],s=this.frameDom.getBoundingClientRect(),a=o.getBoundingClientRect();this.cursorDom.setAttribute("style","width: ".concat(a.width-4,"px; height: ").concat(a.height-4,"px; left: ").concat(a.left+2-s.left,"px; top: ").concat(a.top+2-s.top,"px;"))}}},t.prototype.jumpToIndex=function(e){if(this.times&&this.player&&this.props.jumpFrame){var t=this.props.jumpBufferDuration||0,r=this.times,o=this.player;this.manualJump=!0,o.seek(r[e]-t),o.play()}},t.prototype.onClick=function(e){e.preventDefault()},t.prototype.setError=function(e){var t=this.player;this.setState({error:e}),null==t||t.pause()},t.prototype.renderFrames=function(){var e=this,t=this.props,r=t.frames,o=t.framesClassName,s=t.columnsCount,a=t.data,i=t.jumpFrame;t.classPrefix;var l=t.classnames;if("string"==typeof r&&"$"===r[0]&&(r=n.resolveVariable(r,a)),!r)return null;var u=[],p=this.times=[];return Object.keys(r).forEach((function(e){var t;p.push((t=e).indexOf(":")?t.split(":").reverse().reduce((function(e,t,r){return e+(parseInt(t,10)||0)*Math.pow(60,r)}),0):parseInt(t,10)),u.push({time:e,src:r[e]})})),u.length?c("div",{className:l("pos-rlt Video-frameList",o),ref:this.frameRef},n.padArr(u,s).map((function(t,r){for(var o=s-t.length,a=[];o--;)a.push("");return c("div",{className:"pull-in-xs",key:r},c("div",{className:l("Hbox Video-frameItem")},t.map((function(t,o){return c("div",{className:l("Hbox-col Wrapper--xs Video-frame"),key:o,onClick:function(){return e.jumpToIndex(r*s+o)}},t.src?c("img",{className:"w-full",alt:"poster",src:t.src}):null,c("div",{className:l("Video-frameLabel")},t.time))})),o?a.map((function(e,t){return c("div",{className:l("Hbox-col Wrapper--xs"),key:"blank_".concat(t)})})):null))})),i?c("span",{ref:this.cursorRef,className:l("Video-cursor")}):null):null},t.prototype.renderPlayer=function(){var e=this.props,t=e.poster,r=e.autoPlay,o=e.muted;e.name;var s,a=e.data,l=e.loop,u=e.isLive,p=e.minVideoDuration,f=e.videoType,h=e.playerClassName,v=e.classPrefix,y=e.aspectRatio,g=e.rates,x=e.classnames,b=n.filter(this.props.src,a,"| raw")||n.getPropValue(this.props),P=this.state.videoState,_=P.duration&&p&&P.duration<p,R=n.filter(b,a,"| raw"),L=this.state.error;return s=R&&/\.flv(?:$|\?)/.test(R)&&u||"video/x-flv"===f?c(d,{autoPlay:r,order:999,isLive:u,src:R,setError:this.setError}):R&&/\.m3u8(?:$|\?)/.test(R)||"application/x-mpegURL"===f?c(m,{autoPlay:r,order:999,src:R}):c("source",{src:R}),c("div",{className:x("Video-player",h)},c(i.Player,{ref:this.playerRef,poster:n.filter(t,a,"| raw"),src:R,autoPlay:r,muted:o,aspectRatio:y,loop:l},g&&g.length?c(i.ControlBar,null,c(i.PlaybackRateMenuButton,{rates:g,order:7.1})):null,c(i.BigPlayButton,{position:"center"}),s,c(i.Shortcut,{disabled:!0})),L?c("div",{className:x("Video-error")},L):null,_?c("p",{className:"m-t-xs ".concat(v,"Text--danger")},"视频时长小于 ",p," 秒"):null)},t.prototype.renderPosterAndPlayer=function(){var e=this.props,t=e.poster,r=e.data;e.locals;var o=e.minPosterDimension,s=e.classnames,a=this.state.posterInfo||{},i="";return a&&o&&(o.width||o.height)&&(o.width>a.width||o.height>a.height)&&(i="Text--danger"),c("div",{className:"pull-in-xs"},c("div",{className:s("Hbox")},c("div",{className:s("Hbox-col")},c("div",{className:s("Wrapper Wrapper--xs")},c("img",{onLoad:this.onImageLoaded,className:"w-full",alt:"poster",src:n.filter(t,r,"| raw")}),c("p",{className:"m-t-xs"},"封面"," ",c("span",{className:i},a.width||"-"," x ",a.height||"-"),i?c("span",null," ","封面尺寸小于"," ",c("span",{className:s("Text--danger")},o.width||"-"," x"," ",o.height||"-")):null))),c("div",{className:s("Hbox-col")},c("div",{className:s("Wrapper Wrapper--xs")},this.renderPlayer()))))},t.prototype.render=function(){var e=this.props,t=e.splitPoster,r=e.className,o=e.style;e.classPrefix;var s=e.classnames;return c("div",{className:s("Video",r),onClick:this.onClick,style:o},this.renderFrames(),t?this.renderPosterAndPlayer():this.renderPlayer())},t.defaultProps={columnsCount:8,isLive:!1,jumpFrame:!0,aspectRatio:"auto"},t}(u.default.Component),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([n.Renderer({type:"video"})],t)}(f);t.FlvSource=d,t.HlsSource=m,t.VideoRenderer=h,t.default=f}));
|
||
;/*!node_modules/amis/lib/renderers/Audio.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Audio",(function(t,e,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("node_modules/amis-ui/lib/components/Icon"),i=t("node_modules/tslib/tslib"),s=t("node_modules/react/index"),r=t("node_modules/lodash/upperFirst"),d=t("node_modules/amis-core/lib/index");function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=u(n),l=u(s),c=u(r),m=t("node_modules/react/index"),y=(m.default||m).createElement;(m.default||m).Fragment;var _=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={src:d.getPropValue(e.props,(function(t){return t.src?d.filter(t.src,t.data,"| raw"):void 0}))||"",isReady:!1,muted:!1,playing:!1,played:0,seeking:!1,volume:.8,prevVolume:.8,loaded:0,playbackRate:1,showHandlePlaybackRate:!1,showHandleVolume:!1},e}return i.__extends(e,t),e.prototype.componentWillUnmount=function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationTimeout)},e.prototype.componentDidMount=function(){var t=!!this.props.autoPlay;this.setState({playing:t},this.progress)},e.prototype.componentDidUpdate=function(t){var e=this,a=this.props;d.detectPropValueChanged(a,t,(function(t){return e.setState({src:t,playing:!1},(function(){e.audio.load(),e.progress()}))}),(function(t){return t.src?d.filter(t.src,t.data,"| raw"):void 0}))},e.prototype.progress=function(){if(clearTimeout(this.progressTimeout),this.state.src&&this.audio){var t=(this.audio.currentTime||0)/this.audio.duration,e=this.state.playing;e=!(1==t||!e),this.setState({played:t,playing:e}),this.progressTimeout=setTimeout(this.progress,this.props.progressInterval/this.state.playbackRate)}},e.prototype.audioRef=function(t){this.audio=t},e.prototype.load=function(){this.setState({isReady:!0})},e.prototype.handlePlaybackRate=function(t){this.audio.playbackRate=t,this.setState({playbackRate:t,showHandlePlaybackRate:!1})},e.prototype.handleMute=function(){if(this.state.src){var t=this.state,e=t.muted,a=t.prevVolume,o=e?a:0;this.audio.muted=!e,this.setState({muted:!e,volume:o})}},e.prototype.handlePlaying=function(){if(this.state.src){var t=this.state.playing;t?this.audio.pause():this.audio.play(),this.setState({playing:!t})}},e.prototype.getCurrentTime=function(){if(!this.audio||!this.state.src||!this.state.isReady)return"0:00";var t=this.audio.duration,e=this.state.played;return this.formatTime(t*(e||0))},e.prototype.getDuration=function(){if(!this.audio||!this.state.src)return"0:00";if(!this.state.isReady)return this.onDurationCheck(),"0:00";var t=this.audio,e=t.duration,a=t.seekable;return e===1/0&&a.length>0?a.end(a.length-1):this.formatTime(e)},e.prototype.onDurationCheck=function(){clearTimeout(this.durationTimeout),this.audio&&this.audio.duration||(this.durationTimeout=setTimeout(this.onDurationCheck,500))},e.prototype.onSeekChange=function(t){if(this.state.src){var e=t.target.value;this.setState({played:e})}},e.prototype.onSeekMouseDown=function(){this.setState({seeking:!0})},e.prototype.onSeekMouseUp=function(t){if(this.state.src&&this.state.seeking){var e=t.target.value,a=this.audio.duration;this.audio.currentTime=a*e;var o=this.props.loop,n=this.state.playing;n=!!(e<1||o)&&n,this.setState({playing:n,seeking:!1})}},e.prototype.setVolume=function(t){if(this.state.src){var e=t.target.value;this.audio.volume=e,this.setState({volume:e,prevVolume:e})}},e.prototype.formatTime=function(t){var e=new Date(1e3*t),a=e.getUTCHours(),o=isNaN(e.getUTCMinutes())?0:e.getUTCMinutes(),n=isNaN(e.getUTCSeconds())?"00":this.pad(e.getUTCSeconds());return a?"".concat(a,":").concat(this.pad(o),":").concat(n):"".concat(o,":").concat(n)},e.prototype.pad=function(t){return("0"+t).slice(-2)},e.prototype.toggleHandlePlaybackRate=function(){this.state.src&&this.setState({showHandlePlaybackRate:!this.state.showHandlePlaybackRate})},e.prototype.toggleHandleVolume=function(t){this.state.src&&this.setState({showHandleVolume:t})},e.prototype.renderRates=function(){var t=this,e=this.props,a=e.rates,o=e.classnames,n=this.state,i=n.showHandlePlaybackRate,s=n.playbackRate;return a&&a.length?i?y("div",{className:o("Audio-rateControl")},a.map((function(e,a){return y("div",{key:a,className:o("Audio-rateControlItem"),onClick:function(){return t.handlePlaybackRate(e)}},"x",e.toFixed(1))}))):y("div",{className:o("Audio-rates"),onClick:this.toggleHandlePlaybackRate},"x",s.toFixed(1)):null},e.prototype.renderPlay=function(){var t=this.props.classnames,e=this.state.playing;return y("div",{className:t("Audio-play"),onClick:this.handlePlaying},y(p.default,e?{icon:"pause",className:"icon"}:{icon:"play",className:"icon"}))},e.prototype.renderTime=function(){var t=this.props.classnames;return y("div",{className:t("Audio-times")},this.getCurrentTime()," / ",this.getDuration())},e.prototype.renderProcess=function(){var t=this.props.classnames,e=this.state.played;return y("div",{className:t("Audio-process")},y("input",{type:"range",min:0,max:1,step:"any",value:e||0,onMouseDown:this.onSeekMouseDown,onChange:this.onSeekChange,onMouseUp:this.onSeekMouseUp}))},e.prototype.renderVolume=function(){var t=this,e=this.props.classnames,a=this.state,o=a.volume;return a.showHandleVolume?y("div",{className:e("Audio-volumeControl"),onMouseLeave:function(){return t.toggleHandleVolume(!1)}},y("div",{className:e("Audio-volumeControlIcon"),onClick:this.handleMute},y(p.default,o>0?{icon:"volume",className:"icon"}:{icon:"mute",className:"icon"})),y("input",{type:"range",min:0,max:1,step:"any",value:o,onChange:this.setVolume})):y("div",{className:e("Audio-volume"),onMouseEnter:function(){return t.toggleHandleVolume(!0)}},y(p.default,o>0?{icon:"volume",className:"icon"}:{icon:"mute",className:"icon"}))},e.prototype.render=function(){var t=this,e=this.props,a=e.className,o=e.style,n=e.inline,i=e.autoPlay,s=e.loop,r=e.controls,d=e.classnames,u=this.state,p=u.muted,m=u.src;return y("div",{className:d("Audio",a,n?"Audio--inline":""),style:o},y("audio",{className:d("Audio-original"),ref:this.audioRef,onCanPlay:this.load,autoPlay:i,controls:!0,muted:p,loop:s},y("source",{src:m})),y("div",{className:d("Audio-controls")},r&&r.map((function(e,a){var o=e="render"+c.default(e);return y(l.default.Fragment,{key:a},t[o]())}))))},e.defaultProps={inline:!0,autoPlay:!1,playbackRate:1,loop:!1,rates:[],progressInterval:1e3,controls:["rates","play","time","process","volume"]},i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"progress",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[HTMLMediaElement]),i.__metadata("design:returntype",void 0)],e.prototype,"audioRef",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"load",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number]),i.__metadata("design:returntype",void 0)],e.prototype,"handlePlaybackRate",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"handleMute",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"handlePlaying",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"getCurrentTime",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"getDuration",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"onDurationCheck",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"onSeekChange",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"onSeekMouseDown",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"onSeekMouseUp",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],e.prototype,"setVolume",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number]),i.__metadata("design:returntype",void 0)],e.prototype,"formatTime",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number]),i.__metadata("design:returntype",void 0)],e.prototype,"pad",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],e.prototype,"toggleHandlePlaybackRate",null),i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Boolean]),i.__metadata("design:returntype",void 0)],e.prototype,"toggleHandleVolume",null),e}(l.default.Component),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e=i.__decorate([d.Renderer({type:"audio"})],e)}(_);e.Audio=_,e.AudioRenderer=h}));
|
||
;/*!node_modules/amis-ui/lib/components/Menu.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/Menu",(function(e,n,i,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/menu/index");n.default=o.default}));
|
||
;/*!node_modules/amis/lib/renderers/Nav.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Nav",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/withRemoteConfig"),i=e("node_modules/amis-ui/lib/components/Spinner"),r=e("node_modules/amis-ui/lib/components/Menu"),d=e("node_modules/amis-ui/lib/components/SearchBox"),l=e("node_modules/amis-ui/lib/components/Icon"),s=e("node_modules/tslib/tslib"),u=e("node_modules/react/index"),c=e("node_modules/react-dom/index"),p=e("node_modules/match-sorter/dist/match-sorter.cjs"),f=e("node_modules/lodash/isEqual"),v=e("node_modules/lodash/isString"),h=e("node_modules/lodash/cloneDeep"),g=e("node_modules/amis-core/lib/index");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=_(o),y=_(i),b=_(r),C=_(d),w=_(l),k=_(u),S=_(f),O=_(v),I=_(h),N=e("node_modules/react/index"),x=(N.default||N).createElement;(N.default||N).Fragment;var A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startPoint={y:0,x:0},t.state={keyword:"",filteredLinks:[]},t}return s.__extends(t,e),t.prototype.handleClick=function(e,t){return s.__awaiter(this,void 0,void 0,(function(){var n,a,o;return s.__generator(this,(function(i){switch(i.label){case 0:return n=this.props,a=n.env,o=n.onSelect,e&&e.to&&(null==a||a.tracker({eventType:"link",eventData:{label:e.label,link:e.to}})),[4,null==o?void 0:o(e,t)];case 1:return i.sent(),[2,!1]}}))}))},t.prototype.handleChange=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t;return s.__generator(this,(function(n){return(t=this.props.onChange)&&t(e),[2]}))}))},t.prototype.toggleLink=function(e,t,n){var a,o;null===(o=(a=this.props).onToggle)||void 0===o||o.call(a,e,t,n)},t.prototype.getDropInfo=function(e,t,n){var a,o,i,r=this.props,d=r.dragOnSameLevel,l=r.indentSize,s=e.target.getBoundingClientRect(),u=null===(a=this.dragNode)||void 0===a?void 0:a.link,c=s.top,p=s.height,f=s.width,v=e.clientY,h=e.clientX,g=n*(null!==(o=parseInt(l,10))&&void 0!==o?o:16),_=g+.2*f;return i=v>=c+p/2?"bottom":"top",!d&&"bottom"===i&&h>=this.startPoint.x+_&&(i="self"),{nodeId:t,dragLink:u,position:i,rect:s,height:p,left:g}},t.prototype.updateDropIndicator=function(e){var t,n=this.props,a=n.dragOnSameLevel,o=n.overflow,i=e.target.querySelector("a"),r=null==i?void 0:i.getAttribute("data-id"),d=Number(null==i?void 0:i.getAttribute("data-depth")),l=o&&o.enable&&o.wrapperComponent||"ul";if(a&&(null===(t=this.dragNode)||void 0===t?void 0:t.node.closest("".concat(l,'[role="menu"]')))!==(null==i?void 0:i.closest("".concat(l,'[role="menu"]'))))return this.setState({dropIndicator:void 0}),void(this.dropInfo=null);this.dropInfo=this.getDropInfo(e,r,d);var s=this.dropInfo,u=s.position,p=s.rect,f=s.dragLink,v=s.height,h=s.left;if(r===(null==f?void 0:f.__id))return this.setState({dropIndicator:void 0}),void(this.dropInfo=null);var g=c.findDOMNode(this).firstChild;if("self"===u){var _={top:p.top-g.getBoundingClientRect().top,left:h,width:g.getBoundingClientRect().width-h,height:v,opacity:.2};(!this.state.dropIndicator||this.state.dropIndicator&&!S.default(this.state.dropIndicator,_))&&this.setState({dropIndicator:_})}else{_={top:("bottom"===u?p.top+p.height:p.top)-g.getBoundingClientRect().top,left:h,width:g.getBoundingClientRect().width-h};(!this.state.dropIndicator||this.state.dropIndicator&&!S.default(this.state.dropIndicator,_))&&this.setState({dropIndicator:_})}},t.prototype.handleDragStart=function(e){var t=this;return function(n){n.stopPropagation();var a=n.currentTarget;n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage(a,0,0),t.dragNode={node:a,link:e},t.dropInfo=null,t.startPoint={x:n.clientX,y:n.clientY},a.addEventListener("dragend",t.handleDragEnd),document.body.addEventListener("dragover",t.handleDragOver)}},t.prototype.handleDragOver=function(e){if(e.preventDefault(),e.stopPropagation(),this.dragNode){var t=e.target.querySelector("a");(null==t?void 0:t.getAttribute("data-id"))&&this.updateDropIndicator(e)}},t.prototype.handleDragEnd=function(e){var t,n,a;e.preventDefault(),e.stopPropagation(),this.setState({dropIndicator:void 0});var o=e.currentTarget,i=o.getAttribute("data-id");if(!i){var r=o.querySelector("a");r&&(i=r.getAttribute("data-id"))}var d=null===(t=this.dropInfo)||void 0===t?void 0:t.nodeId;this.dropInfo&&d&&i!==d&&(o.removeEventListener("dragend",this.handleDragEnd),document.body.removeEventListener("dragover",this.handleDragOver),null===(a=(n=this.props).onDragUpdate)||void 0===a||a.call(n,this.dropInfo),this.dragNode=null,this.dropInfo=null)},t.prototype.normalizeNavigations=function(e,t){var n=this,a=this.props,o=a.level,i=a.stacked,r=a.mode,d=a.itemActions,l=a.render,u=a.popOverContainer,c=a.env,p=a.classnames,f=a.data,v=a.collapsed;if(!e)return[];if(o&&t>o)return[];var h=v&&1===t;return e.filter((function(e){return!(!0===e.hidden||!1===e.visible)})).map((function(e){var a=[],o=[];e.icon&&(Array.isArray(e.icon)?e.icon:[e.icon]).forEach((function(e,t){if(k.default.isValidElement(e))a.push(e);else if(O.default(e))a.push(x(w.default,{key:"icon-".concat(t),cx:p,icon:e,className:h?"":"mr-2"}));else if(e&&g.isObject(e)){var n="after"===e.position,i=x(w.default,{key:"icon-".concat(t),cx:p,icon:e.icon||e,className:h?"":n?"ml-2":"mr-2"});n?o.push(i):a.push(i)}}));var v="string"==typeof e.label?g.filter(e.label,f):k.default.isValidElement(e.label)?k.default.cloneElement(e.label):l("inline",e.label),_=i&&"float"!==r&&!e.expanded&&e.overflow&&g.isObject(e.overflow)&&e.overflow.enable,m=e.children;if(_){var y=e.overflow,b=y.maxVisibleCount,C=y.overflowIndicator,S=void 0===C?"fa fa-ellipsis-h":C,I=y.overflowLabel,N=y.overflowClassName,A=b||2;A<((null==m?void 0:m.length)||0)&&(m=null==m?void 0:m.map((function(t,n){return s.__assign(s.__assign({},t),{label:n===A?x("span",{className:p(N)},x(w.default,{icon:S,className:"icon Nav-item-icon"}),I&&g.isObject(I)?l("nav-overflow-label",I):I):t.label,hidden:n>A||e.hidden,expandMore:n===A})})))}return{link:e,label:v,labelExtra:o.length?x("i",{className:p("Nav-Menu-item-icon-after")},o):null,icon:a.length?x("i",null,a):null,children:m?n.normalizeNavigations(m,"group"===e.mode?t:t+1):[],path:e.to,open:e.unfolded,extra:d?l("inline",d,{data:g.createObject(f,e),popOverContainer:u||(c&&c.getModalContainer?c.getModalContainer:function(){return document.body}),closeOnClick:!0}):null,disabled:!!e.disabled,disabledTip:e.disabledTip,hidden:e.hidden,className:e.className,mode:e.mode}}))},t.prototype.handleSearch=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,n,a,o,i,r,d;return s.__generator(this,(function(l){return t=this.props,n=t.links,a=t.searchConfig,o=void 0===a?{}:a,i=I.default(null!=n?n:[]),r=null==o?void 0:o.matchFunc,e?(r&&"string"==typeof r?r=g.str2function(r,"link","keyword"):"function"==typeof r||(r=function(e,t){var n,a;return(null===(n=p.matchSorter([e],t,{keys:["label","title","key"],threshold:p.matchSorter.rankings.CONTAINS}))||void 0===n?void 0:n.length)||(null==e?void 0:e.children)&&(null===(a=e.children)||void 0===a?void 0:a.length)>0}),d=function(e,t){var n=function(e,a){if(r(a,t))return e.push(s.__assign(s.__assign({},a),{unfolded:!0})),e;if(Array.isArray(a.children)){var o=a.children.reduce(n,[]);o.length&&e.push(s.__assign(s.__assign({},a),{unfolded:!0,children:o}))}return e};return e.reduce(n,[])},this.setState({keyword:e,filteredLinks:d(i,e)}),[2]):(this.setState({keyword:"",filteredLinks:[]}),[2])}))}))},t.prototype.renderSearchBox=function(){var e,t,n,a=this.props,o=a.classnames,i=a.searchable,r=a.searchConfig,d=void 0===r?{}:r,l=this.state.keyword;return x(k.default.Fragment,null,i?x(C.default,{className:o("Nav-SearchBox",null==d?void 0:d.className),mini:null!==(e=d.mini)&&void 0!==e&&e,enhance:null!==(t=d.enhance)&&void 0!==t&&t,clearable:null===(n=d.clearable)||void 0===n||n,searchImediately:d.searchImediately,placeholder:d.placeholder,defaultValue:"",value:null!=l?l:"",onSearch:this.handleSearch,onChange:g.noop}):null)},t.prototype.render=function(){var e,t=this.props,n=t.className,a=t.style,o=t.stacked,i=t.mode,r=t.classnames,d=t.links,l=t.loading,s=t.overflow,u=t.loadingConfig,c=t.itemBadge,p=t.badge,f=t.data,v=t.location,h=t.collapsed,_=t.expandIcon,m=t.indentSize,C=t.accordion,S=t.draggable,O=t.themeColor,I=t.expandPosition,N=t.popupClassName,A=t.disabled,L=t.id,T=t.render,D=t.popOverContainer,R=t.env,j=t.searchable,E=t.testIdBuilder,F=this.state,P=F.dropIndicator,B=F.filteredLinks,M=null;if(s&&g.isObject(s)&&s.enable){var U=s.overflowIndicator,K=void 0===U?"fa fa-ellipsis-h":U,z=s.overflowLabel,V=s.overflowClassName;M=x("span",{className:r(V)},x(k.default.Fragment,null,x(w.default,{icon:K,className:"icon Nav-item-icon"}),z&&g.isObject(z)?T("nav-overflow-label",z):z))}var q=null,W="";if(a)try{q=g.buildStyle(a,f);var X=JSON.stringify(q).replace(/\,/g,";").replace(/\"/g,"").replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));W=r("Nav-PopupClassName-".concat(L)),document.getElementById(W)||g.insertStyle({style:".".concat(W," ").concat(X),classId:W})}catch(e){}var Y=Array.isArray(B)&&B.length>0?B:d,J=x(k.default.Fragment,null,Array.isArray(Y)?x(b.default,{navigations:this.normalizeNavigations(Y,1),isActive:function(e,t){if(e.link&&void 0!==e.link.active)return e.link.active;var n=e.path;return!!(v.pathname===n)},isOpen:function(e){return!!e.open},stacked:!!o,mode:i,testIdBuilder:E,themeColor:O,onSelect:this.handleClick,onToggle:this.toggleLink,onChange:this.handleChange,renderLink:function(e){return e.link},badge:c||p,collapsed:h,overflowedIndicator:M,overflowMaxCount:null==s?void 0:s.maxVisibleCount,overflowedIndicatorPopupClassName:r(null==s?void 0:s.overflowPopoverClassName),overflowSuffix:(null==s?void 0:s.overflowSuffix)?T("nav-overflow-suffix",null==s?void 0:s.overflowSuffix):null,overflowItemWidth:null==s?void 0:s.itemWidth,overflowComponent:null==s?void 0:s.wrapperComponent,overflowStyle:null==s?void 0:s.style,popupClassName:"".concat(N||"").concat(W?" ".concat(W):""),expandIcon:_?"string"==typeof _?_:T("expand-icon",_):null,expandBefore:"after"!==I,inlineIndent:m,accordion:C,draggable:S,data:f,disabled:A,onDragStart:this.handleDragStart,popOverContainer:D||(R&&R.getModalContainer?R.getModalContainer:function(){return document.body})}):null,x(y.default,{show:!!l,overlay:!0,loadingConfig:u}));return x("div",{className:r("Nav",n,(e={},e["Nav-horizontal"]=!o,e["Nav--searchable"]=!!j,e)),style:q},j?x(k.default.Fragment,null,this.renderSearchBox(),J):J,P?x("div",{className:r("Nav-dropIndicator"),style:P}):null)},t.defaultProps={indentSize:16},s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Number]),s.__metadata("design:returntype",Promise)],t.prototype,"handleClick",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Array]),s.__metadata("design:returntype",Promise)],t.prototype,"handleChange",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object,Number,Boolean]),s.__metadata("design:returntype",void 0)],t.prototype,"toggleLink",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[DragEvent,String,Number]),s.__metadata("design:returntype",Object)],t.prototype,"getDropInfo",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[DragEvent]),s.__metadata("design:returntype",void 0)],t.prototype,"updateDropIndicator",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleDragStart",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[DragEvent]),s.__metadata("design:returntype",void 0)],t.prototype,"handleDragOver",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[DragEvent]),s.__metadata("design:returntype",void 0)],t.prototype,"handleDragEnd",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[String]),s.__metadata("design:returntype",Promise)],t.prototype,"handleSearch",null),t}(k.default.Component),L=g.themeable(A),T=m.default({adaptor:function(e,t){var n=Array.isArray(e)?e:e.links||e.options||e.items||e.rows;if(!Array.isArray(n))throw new Error("payload.data.options is not array.");return n},afterLoad:function(e,t,n){return s.__awaiter(void 0,void 0,void 0,(function(){var a,o,i;return s.__generator(this,(function(r){switch(r.label){case 0:return a=n.dispatchEvent,o=n.data,[4,a("loaded",g.createObject(o,{data:e.value,items:e.links}))];case 1:return(null==(i=r.sent())?void 0:i.prevented)||e.value&&!g.someTree(t,(function(e){return e.active}))&&n.env.jumpTo(g.filter(e.value,n.data),void 0,n.data),[2]}}))}))},normalizeConfig:function(e,t,n,a){if(Array.isArray(e)&&"toggle"!==a){var o=n.data,i=n.env,r=n.unfoldedField,d=n.foldedField,l=n.location,u=n.level,c=n.defaultOpenLevel,p=n.disabled,f=n.valueField,v=function(e,t){return!p&&(!e.disabled&&(a&&!["location-change","data-change"].includes(a)&&void 0!==e.active?e.active:t===u&&!!g.findTree(e.children||[],(function(t){return!!(t.hasOwnProperty("to")&&i&&i.isCurrentUrl(g.filter(t.to,o),e))}))||(e.activeOn?g.evalExpression(e.activeOn,o)||g.evalExpression(e.activeOn,l):!!(e.hasOwnProperty("to")&&null!==e.to&&i&&i.isCurrentUrl(g.filter(e.to,o),e)))))};e=g.mapTree(e,(function(e,n,a){var i,l=s.__assign(s.__assign(s.__assign({},e),g.getExprProperties(e,o)),{active:v(e,a),__id:null!==(i=e.__id)&&void 0!==i?i:g.guid()}),u=null;return!e.defer&&f&&e[f]&&(u=g.findTree(t||[],(function(t){return t[f]===e[f]}))),l.unfolded=u?g.isUnfolded(u,{unfoldedField:r,foldedField:d}):void 0!==e.unfolded?g.isUnfolded(l,{unfoldedField:r,foldedField:d}):!!(c&&a<=c)||e.children&&!!g.findTree(e.children,(function(e,t,n){return v(e,a+n)})),l}),1,!0)}return e},beforeDeferLoad:function(e,t,n){return g.spliceTree(n,t,1,s.__assign(s.__assign({},e),{loading:!0}))},afterDeferLoad:function(e,t,n,a,o){var i,r,d,l;return s.__awaiter(this,void 0,void 0,(function(){var u,c,p,f,v;return s.__generator(this,(function(h){switch(h.label){case 0:return u=o.dispatchEvent,c=o.data,[4,u("loaded",g.createObject(c,{data:n.data,item:s.__assign({},e)}))];case 1:return(null==(p=h.sent())?void 0:p.prevented)?[2]:(f=s.__assign(s.__assign({},e),{loading:!1,loaded:!0,error:n.ok?void 0:n.msg}),v=Array.isArray(n.data)?n.data:(null===(i=n.data)||void 0===i?void 0:i.links)||(null===(r=n.data)||void 0===r?void 0:r.options)||(null===(d=n.data)||void 0===d?void 0:d.items)||(null===(l=n.data)||void 0===l?void 0:l.rows),Array.isArray(v)&&(f.children=v.concat(),f.unfolded=!0),[2,g.spliceTree(a,t,1,f)])}}))}))}})(function(e){function t(t){var n=e.call(this,t)||this;return n.state={currentKey:t.showKey||"",collapsed:t.collapsed||!1},n.toggleLink=n.toggleLink.bind(n),n.handleSelect=n.handleSelect.bind(n),n.dragUpdate=n.dragUpdate.bind(n),n.handleChange=n.handleChange.bind(n),null==t||t.onRef(n),n}return s.__extends(t,e),t.prototype.componentDidMount=function(){Array.isArray(this.props.links)&&this.props.updateConfig(this.props.links,"mount")},t.prototype.componentDidUpdate=function(e,t){S.default(this.props.location,e.location)?S.default(this.props.links,e.links)?g.isObjectShallowModified(this.props.data,e.data,!1,void 0,void 0,10)&&this.props.updateConfig(this.props.config,"data-change"):this.props.updateConfig(this.props.links,"update"):this.props.updateConfig(this.props.config,"location-change"),e.defaultOpenLevel!==this.props.defaultOpenLevel&&this.props.updateConfig(this.props.config,"update"),e.collapsed!==this.props.collapsed&&this.setState({collapsed:this.props.collapsed}),t.collapsed!==this.state.collapsed&&this.props.dispatchEvent("collapsed",g.createObject(this.props.data,{collapsed:this.state.collapsed}))},t.prototype.getCurrentLink=function(e){var t=null,n=this.props,a=n.config,o=n.data,i=n.valueField,r=g.resolveVariableAndFilter(e,o,"| raw");return e&&(t=g.findTree(a,(function(e){return i?e[i]===r:e.label==r||e.key==r}))),t},t.prototype.toggleLink=function(e,t,n){return s.__awaiter(this,void 0,void 0,(function(){var t,a,o,i,r,d,l,u,c,p,f;return s.__generator(this,(function(v){switch(v.label){case 0:return t=this.props,a=t.config,o=t.updateConfig,i=t.deferLoad,r=t.dispatchEvent,d=t.stacked,l=t.mode,u=t.accordion,c=t.data,p=d&&"float"!==l&&u,[4,r("toggled",g.createObject(c,{item:s.__assign({},e),open:void 0!==n?!n:!e.unfolded}))];case 1:return(null==(f=v.sent())?void 0:f.prevented)||(e.defer&&!e.loaded?i(e):o(g.mapTree(a,(function(t){return e.__id===t.__id?s.__assign(s.__assign({},t),{unfolded:void 0!==n?!n:!t.unfolded}):s.__assign(s.__assign({},t),{unfolded:p?!!g.findTree(t.children||[],(function(t){return t===e})):t.unfolded})})),"toggle")),[2]}}))}))},t.prototype.dragUpdate=function(e){var t,n;return s.__awaiter(this,void 0,void 0,(function(){var a,o,i,r,d,l;return s.__generator(this,(function(s){switch(s.label){case 0:return a=this.props.config,o=e.nodeId,i=e.dragLink,r=e.position,i&&(d=g.findTreeIndex(a,(function(e){return e.__id===i.__id})),a=g.spliceTree(a,d,1),"self"===r?g.mapTree(a,(function(e){return e.__id===o&&(e.children||(e.children=[]),e.children.push(i)),e})):(l=g.findTreeIndex(a,(function(e){return e.__id===o})),"bottom"===r&&l&&l.push(l.pop()+1),a=g.spliceTree(a,l,0,i))),this.props.updateConfig(a,"update"),null===(n=(t=this.props).onOrderChange)||void 0===n||n.call(t,a),[4,this.saveOrder(g.mapTree(a,(function(e){for(var t in e)/^__.*$/.test(t)&&delete e[t];return e})))];case 1:return s.sent(),[2]}}))}))},t.prototype.saveOrder=function(e){return s.__awaiter(this,void 0,void 0,(function(){var t,n,a,o,i;return s.__generator(this,(function(r){switch(r.label){case 0:return t=this.props,n=t.saveOrderApi,a=t.env,o=t.data,i=t.reload,n&&g.isEffectiveApi(n)?[4,null==a?void 0:a.fetcher(n,g.createObject(o,{data:e}),{method:"post"})]:[3,2];case 1:return r.sent(),i(),[3,3];case 2:this.props.onOrderChange||null==a||a.alert("NAV saveOrderApi is required!"),r.label=3;case 3:return[2]}}))}))},t.prototype.expandLink=function(e){var t=this.props,n=t.config;(0,t.updateConfig)(g.mapTree(n,(function(t){return g.findTree((null==t?void 0:t.children)||[],(function(t){return t.__id===e.__id}))?s.__assign(s.__assign({},t),{expanded:!0}):s.__assign({},t)})),"expand")},t.prototype.handleChange=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;setTimeout((function(){n("change",g.createObject(a,{value:e}))}))},t.prototype.handleSelect=function(e,t){return s.__awaiter(this,void 0,void 0,(function(){var n,a,o,i,r,d,l,u,c;return s.__generator(this,(function(p){switch(p.label){case 0:return n=this.props,a=n.onSelect,o=n.env,i=n.data,r=n.level,d=n.dispatchEvent,l=n.updateConfig,u=n.config,[4,d("click",g.createObject(i,{item:s.__assign({},e)}))];case 1:return(null==(c=p.sent())?void 0:c.prevented)||a&&!1===a(e)?[2]:t===r?(l(g.mapTree(u,(function(t){return s.__assign(s.__assign({},t),{active:t.__id===e.__id})})),"select"),[2]):e.expandMore?(this.expandLink(e),[2]):e.to?(null==o||o.jumpTo(g.filter(e.to,i),e,i),[2]):[2]}}))}))},t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.loading,a=e.config;e.deferLoad,e.updateConfig;var o=s.__rest(e,["disabled","loading","config","deferLoad","updateConfig"]),i=this.getCurrentLink(this.state.currentKey);return x(L,s.__assign({},o,{loading:n,links:(null==i?void 0:i.children)||a,collapsed:this.state.collapsed,disabled:t||n,onSelect:this.handleSelect,onToggle:this.toggleLink,onChange:this.handleChange,onDragUpdate:this.dragUpdate}))},t}(k.default.Component)),D=function(e){function t(t,n){var a=e.call(this,t)||this;return a.remoteRef=void 0,n.registerComponent(a),a}return s.__extends(t,e),t.prototype.remoteConfigRef=function(e){this.remoteRef=e},t.prototype.getRef=function(e){this.navRef=e},t.prototype.componentDidUpdate=function(e){this.remoteRef&&this.props.source!==e.source&&this.remoteRef.syncConfig()},t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,n,a){var o,i=null==e?void 0:e.actionType,r=(null==a?void 0:a.value)||(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.value);if("updateItems"===i){var d=this.props.valueField,l=[];if(r)if(Array.isArray(r)){if(r.length>0){var s=r.find((function(e){return e.children&&e.children.length}));if(s){var u=d?s[d]:(null==s?void 0:s.key)||(null==s?void 0:s.label);this.navRef.state.currentKey!==u&&(this.navRef.setState({currentKey:u}),l=s.children)}else this.navRef.setState({currentKey:""})}}else if("string"==typeof r&&this.navRef.state.currentKey!==r){this.navRef.setState({currentKey:r});var c=this.navRef.getCurrentLink(r);l=null==c?void 0:c.children}if(l.length>0){var p=this.props,f=p.env,v=p.data,h=g.findTree(l,(function(e){return f&&f.isCurrentUrl(g.filter(e.to,v),e)}));null==f||f.jumpTo(g.filter(h?h.to:l[0].to,v),void 0,v)}}else if("collapse"===i){var _=void 0!==r?r:!this.navRef.state.collapsed;this.navRef.setState({collapsed:_})}else"reset"===i&&this.navRef.setState({currentKey:""})},t.prototype.reload=function(e,t,n){var a;if(t)return this.receive(t);var o=this.props,i=o.data;o.translate;var r=n?g.createObject(i,n):i;null===(a=this.remoteRef)||void 0===a||a.loadConfig(r)},t.prototype.receive=function(e){this.reload(void 0,void 0,e)},t.prototype.render=function(){var e=this.props,t=e.id,n=s.__rest(e,["id"]);return x(T,s.__assign({},n,{id:t||g.guid(),onRef:this.getRef,reload:this.reload,remoteConfigRef:this.remoteConfigRef}))},t.contextType=g.ScopedContext,s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"remoteConfigRef",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"getRef",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[String,Object,Object]),s.__metadata("design:returntype",void 0)],t.prototype,"reload",null),s.__decorate([g.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"receive",null),t=s.__decorate([g.Renderer({type:"nav",alias:["navigation"],name:"nav"}),s.__metadata("design:paramtypes",[Object,Object])],t)}(k.default.Component);t.Navigation=A,t.NavigationRenderer=D,t.default=L}));
|
||
;/*!node_modules/amis/lib/renderers/Number.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Number",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),o=e("node_modules/@rc-component/mini-decimal/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=s(i),d=e("node_modules/react/index"),p=(d.default||d).createElement;(d.default||d).Fragment;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.placeholder,n=e.kilobitSeparator,r=e.precision,a=e.prefix,i=e.affix,s=e.suffix,d=e.percent,m=e.unitOptions,f=e.className,c=e.style,b=e.classnames,y=e.translate,_=p("span",{className:"text-muted"},t),x=l.getPropValue(this.props),h="";"string"==typeof x&&m&&m.length&&((h=l.normalizeOptions(m).map((function(e){return e.value})).find((function(e){return x.endsWith(e)}))||"")&&(x=x.replace(h,"")));if("number"==typeof x||"string"==typeof x)if("string"==typeof x&&r&&(x=l.stripNumber(parseFloat(x))),isNaN(x))_=!1;else if(d){var N="number"==typeof d?d:0,F=100*(x=parseFloat(x)||0),g=Math.pow(10,N);x=(Math.round(F*g)/g).toFixed(N)+"%",_=p("span",null,x)}else"number"==typeof x&&r&&(x=o.toFixed(o.num2str(x),".",r)),n&&(x=l.numberFormatter(x,r)),_=p("span",null,x);return _=_?p(u.default.Fragment,null,a,_,h,null!=i?i:s):p("span",{className:"text-danger"},y("Number.invalid")),p("span",{className:b("NumberField",f),style:c},_)},t.defaultProps={placeholder:"-",kilobitSeparator:!0},t}(u.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([l.Renderer({type:"number"})],t)}(m);t.NumberField=m,t.NumberFieldRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/Tasks.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Tasks",(function(t,e,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("node_modules/amis-ui/lib/components/Spinner"),i=t("node_modules/tslib/tslib"),r=t("node_modules/react/index"),o=t("node_modules/amis-core/lib/index"),l=t("node_modules/immutability-helper/index");function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=u(n),c=u(r),m=u(l),p=t("node_modules/react/index"),f=(p.default||p).createElement;(p.default||p).Fragment;var h=function(t){function e(e){var a=t.call(this,e)||this;return a.state={items:e.items?e.items.concat():[]},a.handleLoaded=a.handleLoaded.bind(a),a.tick=a.tick.bind(a),a}return i.__extends(e,t),e.prototype.componentDidMount=function(){this.tick(!!this.props.checkApi)},e.prototype.componentDidUpdate=function(t){var e=this.props;t.items!==e.items?this.setState({items:e.items?e.items.concat():[]}):o.isApiOutdated(t.checkApi,e.checkApi,t.data,e.data)&&this.tick(!0)},e.prototype.componentWillUnmount=function(){clearTimeout(this.timer)},e.prototype.reload=function(){this.tick(!0)},e.prototype.tick=function(t){var e=this;void 0===t&&(t=!1);var a=this.props,s=a.loadingStatusCode,n=a.data,i=a.interval,r=a.checkApi,l=a.env,u=this.state.items;if(clearTimeout(this.timer),t||u.some((function(t){return t.status===s})))return i&&!o.isEffectiveApi(r)?l.alert("checkApi 没有设置, 不能及时获取任务状态"):void(o.isEffectiveApi(r,n)&&l&&l.fetcher(r,n).then(this.handleLoaded).catch((function(t){return e.setState({error:t})})))},e.prototype.handleLoaded=function(t){if(!Array.isArray(t.data))return this.props.env.alert("返回格式不正确, 期望 response.data 为数组, 包含每个 task 的状态信息");this.setState({items:t.data});var e=this.props.interval;clearTimeout(this.timer),this.timer=setTimeout(this.tick,e)},e.prototype.submitTask=function(t,e,a){var s=this;void 0===a&&(a=!1);var n=this.props,r=n.submitApi,l=n.reSubmitApi,u=n.loadingStatusCode,d=n.errorStatusCode,c=n.data,p=n.env;if(!a&&!o.isEffectiveApi(r))return p.alert("submitApi 没有配置");if(a&&!o.isEffectiveApi(l))return p.alert("reSubmitApi 没有配置");this.setState(m.default(this.state,{items:{$splice:[[e,1,i.__assign(i.__assign({},t),{status:u})]]}}));var f=a?l:r;o.isEffectiveApi(f,c)&&p&&p.fetcher(f,o.createObject(c,t)).then((function(t){if(t&&t.data)if(Array.isArray(t.data))s.handleLoaded(t);else{f&&f.replaceData;var e=s.state.items.map((function(e){return e.key===t.data.key?i.__assign(i.__assign({},f.replaceData?{}:e),t.data):e}));s.handleLoaded(i.__assign(i.__assign({},t),{data:e}))}else clearTimeout(s.timer),s.timer=setTimeout(s.tick,4)})).catch((function(a){return s.setState(m.default(s.state,{items:{$splice:[[e,1,i.__assign(i.__assign({},t),{status:d,remark:a.message||a})]]}}))}))},e.prototype.render=function(){var t=this,e=this.props,a=e.classnames,s=e.className,n=e.style,i=e.tableClassName,r=e.taskNameLabel,o=e.operationLabel,l=e.statusLabel,u=e.remarkLabel,c=e.btnText,m=e.retryBtnText,p=e.btnClassName,h=e.retryBtnClassName,b=e.statusLabelMap,k=e.statusTextMap,y=e.readyStatusCode,_=e.loadingStatusCode,v=e.canRetryStatusCode,C=e.translate,g=e.render,S=e.loadingConfig,T=this.state.items,A=this.state.error;return f("div",{className:a("Table-content",s),style:n},f("table",{className:a("Table-table",i)},f("thead",null,f("tr",null,f("th",null,r),f("th",null,C(o)),f("th",null,l),f("th",null,u))),f("tbody",null,A?f("tr",null,f("td",{colSpan:4},f("div",{className:"text-danger"},A))):T.map((function(e,s){return f("tr",{key:s},f("td",null,f("span",{className:a("word-break")},e.label)),f("td",null,e.status==_?f(d.default,{loadingConfig:S,show:!0,icon:"reload",spinnerClassName:a("Task-spinner")}):e.status==v?f("a",{onClick:function(){return t.submitTask(e,s,!0)},className:a("Button","Button--danger","Button--size-md",h||p)},m||c):f("a",{onClick:function(){return t.submitTask(e,s)},className:a("Button","Button--default","Button--size-md",p,{disabled:e.status!==y})},c)),f("td",null,f("span",{className:a("label",b&&b[e.status||0])},k&&k[e.status||0])),f("td",null,e.remark?g("".concat(s,"/remark"),e.remark):null))})))))},e.defaultProps={className:"",tableClassName:"",taskNameLabel:"任务名称",operationLabel:"Table.operation",statusLabel:"状态",remarkLabel:"备注说明",btnText:"上线",retryBtnText:"重试",btnClassName:"",retryBtnClassName:"",statusLabelMap:["label-warning","label-info","label-info","label-danger","label-success","label-danger"],statusTextMap:["未开始","就绪","进行中","出错","已完成","出错"],initialStatusCode:0,readyStatusCode:1,loadingStatusCode:2,errorStatusCode:3,finishStatusCode:4,canRetryStatusCode:5,interval:3e3},e}(c.default.Component),b=function(t){function e(e,a){var s=t.call(this,e)||this;return a.registerComponent(s),s}return i.__extends(e,t),e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},e.contextType=o.ScopedContext,e=i.__decorate([o.Renderer({type:"tasks"}),i.__metadata("design:paramtypes",[Object,Object])],e)}(h);e.TaskRenderer=b,e.default=h}));
|
||
;/*!node_modules/amis/lib/renderers/Drawer.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Drawer",(function(e,o,t,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Drawer"),a=e("node_modules/amis-ui/lib/components/Spinner"),s=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),d=e("node_modules/mobx/lib/index"),c=e("node_modules/react-dom/index"),p=e("node_modules/mobx-state-tree/dist/mobx-state-tree");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=h(r),m=h(a),f=h(i),g=e("node_modules/react/index"),C=(g.default||g).createElement;(g.default||g).Fragment;var y=function(e){function o(o){var t=e.call(this,o)||this;t.$$id=l.guid(),o.store.setEntered(!!o.show),t.handleSelfClose=t.handleSelfClose.bind(t),t.handleAction=t.handleAction.bind(t),t.handleActionSensor=t.handleActionSensor.bind(t),t.handleDrawerConfirm=t.handleDrawerConfirm.bind(t),t.handleDrawerClose=t.handleDrawerClose.bind(t),t.handleDialogConfirm=t.handleDialogConfirm.bind(t),t.handleDialogClose=t.handleDialogClose.bind(t),t.handleChildFinished=t.handleChildFinished.bind(t),t.handleEntered=t.handleEntered.bind(t),t.handleExited=t.handleExited.bind(t),t.handleFormInit=t.handleFormInit.bind(t),t.handleFormChange=t.handleFormChange.bind(t),t.handleFormSaved=t.handleFormSaved.bind(t);var n=o.store;return t.reaction=d.reaction((function(){return"".concat(n.loading).concat(n.error)}),(function(){return t.forceUpdate()})),t}return s.__extends(o,e),o.prototype.componentWillUnmount=function(){this.reaction&&this.reaction(),clearTimeout(this.clearErrorTimer)},o.prototype.buildActions=function(){var e=this.props,o=e.actions,t=e.confirm,n=e.translate,r=e.testIdBuilder;if(void 0!==o)return o;var a=[];return a.push({type:"button",testIdBuilder:null==r?void 0:r.getChild("cancel"),actionType:"close",label:n("cancel")}),t&&a.push({type:"button",actionType:"confirm",testIdBuilder:null==r?void 0:r.getChild("confirm"),label:n("confirm"),primary:!0}),a},o.prototype.handleSelfClose=function(){return s.__awaiter(this,void 0,void 0,(function(){var e,o,t,n,r;return s.__generator(this,(function(a){switch(a.label){case 0:return e=this.props,o=e.onClose,t=e.store,n=e.dispatchEvent,!1!==t.dialogOpen||!1!==t.drawerOpen?[2]:[4,n("cancel",this.props.data)];case 1:return(null==(r=a.sent())?void 0:r.prevented)?[2]:(null==r?void 0:r.pendingPromise.length)?[4,r.allDone()]:[3,3];case 2:a.sent(),a.label=3;case 3:return t.updateMessage(),o(),[2]}}))}))},o.prototype.handleActionSensor=function(e){var o=this.props.store,t=o.busying;o.markBusying(!0),o.updateMessage(),e.then((function(){o.markBusying(t)})).catch((function(e){o.updateMessage(e.message,!0),o.markBusying(t)}))},o.prototype.handleAction=function(e,o,t){var n=this.props,r=n.onClose,a=n.onAction;"close"===o.actionType||"cancel"===o.actionType?r():a&&a(e,o,t)},o.prototype.handleDrawerConfirm=function(e,o){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var r=this.props.store;o.mergeData&&1===e.length&&e[0]&&r.updateData(e[0]);var a=r.action,i=a.drawer;i.onConfirm&&!1===i.onConfirm.apply(i,s.__spreadArray([e,o],s.__read(t),!1))||r.closeDrawer(!0,e)},o.prototype.handleDrawerClose=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var t=this.props.store,n=t.action,r=n.drawer;r.onClose&&!1===r.onClose.apply(r,s.__spreadArray([],s.__read(e),!1))||t.closeDrawer.apply(t,s.__spreadArray([],s.__read(e),!1))},o.prototype.handleDialogConfirm=function(e,o){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var r=this.props.store;o.mergeData&&1===e.length&&e[0]&&r.updateData(e[0]);var a=r.action,i=a.dialog;i.onConfirm&&!1===i.onConfirm.apply(i,s.__spreadArray([e,o],s.__read(t),!1))||r.closeDialog(!0,e)},o.prototype.handleDialogClose=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var t=this.props.store,n=t.action,r=n.dialog;r.onClose&&!1===r.onClose.apply(r,s.__spreadArray([],s.__read(e),!1))||t.closeDialog(e[1])},o.prototype.handleChildFinished=function(e,o){},o.prototype.handleFormInit=function(e){this.props.store.setFormData(e)},o.prototype.handleFormChange=function(e,o){var t=this.props.store;"string"!=typeof o?t.setFormData(e):t.changeValue(o,e)},o.prototype.handleFormSaved=function(e,o){this.props.store.setFormData(s.__assign(s.__assign({},e),o))},o.prototype.handleEntered=function(){var e=this.props,o=e.lazySchema,t=e.store;t.setEntered(!0),t.markBusying(!1),"function"==typeof o&&t.setSchema(o(this.props))},o.prototype.handleExited=function(){var e=this.props,o=e.lazySchema,t=e.store,n=e.statusStore;n&&p.isAlive(n)&&n.resetAll(),p.isAlive(t)&&(t.reset(),t.clearMessage(),t.markBusying(!1),t.setEntered(!1),"function"==typeof o&&t.setSchema(""))},o.prototype.getPopOverContainer=function(){return c.findDOMNode(this).querySelector(".".concat(this.props.classPrefix,"Drawer-content"))},o.prototype.renderBody=function(e,o){var t=this,n=this.props,r=n.render,a=n.store;if(Array.isArray(e))return e.map((function(e,o){return t.renderBody(e,o)}));var i=e,l={key:o,disabled:a.loading,onAction:this.handleAction,onFinished:this.handleChildFinished,popOverContainer:this.getPopOverContainer,onChange:this.handleFormChange,onInit:this.handleFormInit,onSaved:this.handleFormSaved,onActionSensor:this.handleActionSensor,btnDisabled:a.loading,syncLocation:!1};return"form"===i.type&&(i=s.__assign({mode:"horizontal",wrapWithPanel:!1,submitText:null},i)),r("body".concat(o?"/".concat(o):""),i,l)},o.prototype.renderFooter=function(){var e=this,o=this.buildActions(),t=this.props.hideActions;if(!o||!o.length||t)return null;var n=this.props,r=n.store,a=n.render,i=n.env,d=n.classnames,c=n.showErrorMsg,p=n.footerClassName,h=n.id,u=n.themeCss;return C("div",{className:d("Drawer-footer",p,l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerFooterClassName",id:h,themeCss:u})))},r.loading||r.error?C("div",{className:d("Drawer-info")},C(m.default,{size:"sm",key:"info",show:r.loading}),!i.forceSilenceInsideError&&c&&r.error?C("span",{className:d("Drawer-error")},r.msg):null):null,o.map((function(o,t){return a("action/".concat(t),o,{onAction:e.handleAction,onActionSensor:void 0,btnDisabled:r.loading,data:r.formData,key:t,disabled:o.disabled||r.loading})})))},o.prototype.openFeedback=function(e,o){var t=this;return new Promise((function(n){var r=t.props.store;r.setCurrentAction({type:"button",actionType:"dialog",dialog:e},t.props.resolveDefinitions),r.openDialog(o,void 0,(function(e){n(e)}),t.context)}))},o.prototype.render=function(){var e=this.props.store,o=s.__assign(s.__assign({},this.props),e.schema),t=o.className,n=o.style,r=o.size,a=o.closeOnEsc,i=o.position,d=o.title,c=o.render,p=o.header,h=o.body,f=o.bodyClassName,g=o.headerClassName,y=o.show,v=o.showCloseButton,_=o.width,w=o.height,b=o.wrapperComponent,D=o.env,A=o.resizable,N=o.overlay,T=o.closeOnOutside,x=o.classPrefix,O=o.classnames,S=o.drawerContainer,E=o.loadingConfig;o.popOverContainer;var k=o.themeCss,F=o.id,B=s.__rest(o,["className","style","size","closeOnEsc","position","title","render","header","body","bodyClassName","headerClassName","show","showCloseButton","width","height","wrapperComponent","env","resizable","overlay","closeOnOutside","classPrefix","classnames","drawerContainer","loadingConfig","popOverContainer","themeCss","id"]),M=b||u.default;return C(M,s.__assign({},B,{resizable:A,classPrefix:x,className:t,style:n,drawerClassName:l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerClassName",id:F,themeCss:k})),drawerMaskClassName:l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerMaskClassName",id:F,themeCss:k})),size:r,onHide:this.handleSelfClose,disabled:e.loading,show:y,showCloseButton:v,width:_,height:w,position:i,overlay:N,onEntered:this.handleEntered,onExited:this.handleExited,closeOnEsc:a,closeOnOutside:!e.drawerOpen&&!e.dialogOpen&&T,container:S||(null==D?void 0:D.getModalContainer)}),d||p?C("div",{className:O("Drawer-header",g,l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerHeaderClassName",id:F,themeCss:k})))},d?C("div",{className:O("Drawer-title",l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerTitleClassName",id:F,themeCss:k})))},c("title",d,{data:e.formData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,onAction:this.handleAction,onActionSensor:void 0,btnDisabled:e.loading})):null,p?c("header",p,{data:e.formData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,onAction:this.handleAction,onActionSensor:void 0,btnDisabled:e.loading}):null):null,e.entered?h?C("div",{className:O("Drawer-body",f,l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerBodyClassName",id:F,themeCss:k}))),role:"dialog-body"},this.renderBody(h,"body"),C(l.CustomStyle,s.__assign({},this.props,{config:{themeCss:k,classNames:[{key:"drawerClassName"},{key:"drawerMaskClassName"},{key:"drawerHeaderClassName"},{key:"drawerTitleClassName"},{key:"drawerBodyClassName"},{key:"drawerFooterClassName"}],id:F},env:D}))):null:C("div",{className:O("Drawer-body",f,l.setThemeClassName(s.__assign(s.__assign({},this.props),{name:"drawerBodyClassName",id:F,themeCss:k})))},C(m.default,{overlay:!0,show:!0,size:"lg",loadingConfig:E})),this.renderFooter(),h?c("dialog",s.__assign(s.__assign({},e.action&&e.action.dialog),{type:"dialog"}),{key:"dialog",data:e.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,onAction:this.handleAction,show:e.dialogOpen}):null,h?c("drawer",s.__assign(s.__assign({},e.action&&e.action.drawer),{type:"drawer"}),{key:"drawer",data:e.drawerData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,onAction:this.handleAction,show:e.drawerOpen}):null)},o.propsList=["title","size","closeOnEsc","closeOnOutside","children","className","bodyClassName","headerClassName","footerClassName","confirm","position","onClose","onConfirm","show","showCloseButton","width","height","resizable","overlay","body","popOverContainer","showErrorMsg"],o.defaultProps={title:"",className:"",bodyClassName:"",headerClassName:"",footerClassName:"",confirm:!0,position:"right",resizable:!1,showCloseButton:!0,overlay:!0,closeOnEsc:!1,closeOnOutside:!1,showErrorMsg:!0},s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],o.prototype,"getPopOverContainer",null),o}(f.default.Component),v=function(e){function o(o,t){var n=e.call(this,o)||this;return t.registerComponent(n),n}return s.__extends(o,e),o.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},o.prototype.tryChildrenToHandle=function(e,o,t){var n=this,r=this.context,a=[],i=this.props,l=i.onConfirm,d=i.store;if(e.target&&a.push.apply(a,s.__spreadArray([],s.__read(e.target.split(",").map((function(e){return r.getComponentByName(e)})).filter((function(e){return e&&e.doAction}))),!1)),!0!==(null==e?void 0:e.isolateScope)&&!a.length)for(var c=r.getComponents().filter((function(e){return!~["drawer","dialog"].indexOf(e.props.type)})),p=c.concat();p.length;){var h=p.pop();if(~["crud","form","wizard"].indexOf(h.props.type)){a.push(h);break}~["drawer","dialog"].indexOf(h.props.type)||~["page","service"].indexOf(h.props.type)&&p.unshift.apply(p,h.context.getComponents())}return!!a.length&&(d.markBusying(!0),d.updateMessage(),Promise.all(a.map((function(t){return t.doAction(s.__assign(s.__assign({},e),{from:n.$$id}),o,!0)}))).then((function(r){"submit"!==e.type&&"submit"!==e.actionType&&"confirm"!==e.actionType||!1===e.close?e.close&&(!0===e.close?n.handleSelfClose():n.closeTarget(e.close)):l&&l(r,t||e,o,a),d.markBusying(!1)})).catch((function(e){d.updateMessage(e.message,!0),d.markBusying(!1),clearTimeout(n.clearErrorTimer),n.clearErrorTimer=setTimeout((function(){d.updateMessage("")}),3e3)})),!0)},o.prototype.doAction=function(e,o,t){this.handleAction(void 0,e,o)},o.prototype.handleAction=function(e,o,t,n,r,a){return void 0===n&&(n=!1),s.__awaiter(this,void 0,void 0,(function(){var i,d,c,p,h,u,m,f,g,C,y=this;return s.__generator(this,(function(v){switch(v.label){case 0:return i=this.props,d=i.onClose,c=i.onAction,p=i.store,h=i.env,u=i.dispatchEvent,m=i.show,o.from!==this.$$id&&m?(null==a?void 0:a.pendingPromise.length)?[4,a.allDone()]:[3,2]:[2,!!c&&c(e,o,t,n,r||this.context)];case 1:v.sent(),v.label=2;case 2:return f=this.context,"close"!==o.actionType&&"cancel"!==o.actionType?[3,6]:[4,u("cancel",l.createObject(this.props.data,t))];case 3:return(null==(g=v.sent())?void 0:g.prevented)?[2]:(null==g?void 0:g.pendingPromise.length)?[4,g.allDone()]:[3,5];case 4:v.sent(),v.label=5;case 5:return p.setCurrentAction(o,this.props.resolveDefinitions),d(),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),[3,17];case 6:return"confirm"!==o.actionType?[3,10]:[4,u("confirm",l.createObject(this.props.data,t))];case 7:return(null==(C=v.sent())?void 0:C.prevented)?[2]:(null==C?void 0:C.pendingPromise.length)?[4,C.allDone()]:[3,9];case 8:v.sent(),v.label=9;case 9:return p.setCurrentAction(o,this.props.resolveDefinitions),this.tryChildrenToHandle(o,t)||d(),[3,17];case 10:return"drawer"!==o.actionType?[3,11]:(p.setCurrentAction(o,this.props.resolveDefinitions),[2,new Promise((function(e){p.openDrawer(t,void 0,(function(t,n){var r;null===(r=o.callback)||void 0===r||r.call(o,t,n),e({confirmed:t,value:n})}))}))]);case 11:return"dialog"!==o.actionType?[3,12]:(p.setCurrentAction(o,this.props.resolveDefinitions),[2,new Promise((function(e){p.openDialog(t,void 0,(function(t,n){var r;null===(r=o.callback)||void 0===r||r.call(o,t,n),e({confirmed:t,value:n})}),r||y.context)}))]);case 12:return"reload"!==o.actionType?[3,13]:(p.setCurrentAction(o,this.props.resolveDefinitions),o.target&&f.reload(o.target,t),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),[3,17]);case 13:return o.from||!this.tryChildrenToHandle(o,t)?[3,14]:[3,17];case 14:return"ajax"!==o.actionType?[3,15]:(p.setCurrentAction(o,this.props.resolveDefinitions),p.saveRemote(o.api,t,{successMessage:o.messages&&o.messages.success,errorMessage:o.messages&&o.messages.failed}).then((function(){return s.__awaiter(y,void 0,void 0,(function(){var e;return s.__generator(this,(function(t){switch(t.label){case 0:return o.feedback&&l.isVisible(o.feedback,p.data)?[4,this.openFeedback(o.feedback,p.data)]:[3,2];case 1:t.sent(),t.label=2;case 2:return(e=o.redirect&&l.filter(o.redirect,p.data))&&h.jumpTo(e,o,p.data),o.reload&&this.reloadTarget(l.filterTarget(o.reload,p.data),p.data),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),[2]}}))}))})).catch((function(e){if(n||o.countDown)throw e})),[3,17]);case 15:return c?[4,c(e,o,t,n,r||this.context)]:[3,17];case 16:v.sent(),o.close&&(!0===o.close?this.handleSelfClose():this.closeTarget(o.close)),v.label=17;case 17:return[2]}}))}))},o.prototype.handleChildFinished=function(e,o){if(!(o&&o.from===this.$$id||!1===o.close)){var t=this.context.getComponents().filter((function(e){return!~["drawer","dialog","action","button","submit","reset"].indexOf(e.props.type)})),n=this.props.onConfirm;1!==t.length||"form"!==t[0].props.type&&"wizard"!==t[0].props.type||n([e],o,{},t)}},o.prototype.handleDialogConfirm=function(o,t){for(var n,r,a=[],i=2;i<arguments.length;i++)a[i-2]=arguments[i];e.prototype.handleDialogConfirm.apply(this,s.__spreadArray([o,t],s.__read(a),!1));var l=this.props.store,d=l.getDialogScoped()||this.context,c=l.action,p=null!==(n=t.reload)&&void 0!==n?n:c.reload;p?d.reload(p,l.data):d.component!==this&&(null===(r=d.component)||void 0===r?void 0:r.reload)?d.component.reload():this.context.getComponents().filter((function(e){return"crud"===e.props.type})).forEach((function(e){return e.reload&&e.reload()}))},o.prototype.handleDrawerConfirm=function(o,t){var n,r=this;e.prototype.handleDrawerConfirm.call(this,o,t);var a=this.props.store,s=a.getDialogScoped()||this.context,i=a.action,l=null!==(n=t.reload)&&void 0!==n?n:i.reload;setTimeout((function(){var e;l?s.reload(l,a.data):s.component!==r&&(null===(e=s.component)||void 0===e?void 0:e.reload)?s.component.reload():r.context.getComponents().filter((function(e){return"crud"===e.props.type})).forEach((function(e){return e.reload&&e.reload()}))}),300)},o.prototype.reloadTarget=function(e,o){this.context.reload(e,o)},o.prototype.closeTarget=function(e){this.context.close(e)},o.prototype.setData=function(e,o){return this.props.store.updateData(e,void 0,o)},o.prototype.getData=function(){return this.props.store.data},o.contextType=l.ScopedContext,o=s.__decorate([l.Renderer({type:"drawer",storeType:l.ModalStore.name,storeExtendsData:!1,isolateScope:!0,shouldSyncSuperStore:function(e,o,t){return!(!e.drawerOpen&&!o.show||o.show===t.show&&!l.isObjectShallowModified(t.data,o.data))}}),s.__metadata("design:paramtypes",[Object,Object])],o)}(y);o.DrawerRenderer=v,o.default=y}));
|
||
;/*!node_modules/amis/lib/renderers/Wrapper.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Wrapper",(function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var d=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(s),l=e("node_modules/react/index"),u=(l.default||l).createElement;(l.default||l).Fragment;var p=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(r,e),r.prototype.renderBody=function(){var e=this.props,r=e.children,t=e.body,n=e.render,d=e.disabled;return r?"function"==typeof r?r(this.props):r:t?n("body",t,{disabled:d}):null},r.prototype.render=function(){var e=this.props,r=e.className,t=e.size,n=e.classnames,d=e.style,s=e.data,o=e.wrap,i=e.id;return!1===o?this.renderBody():u("div",{className:n("Wrapper",t&&"none"!==t?"Wrapper--".concat(t):"",r),style:a.buildStyle(d,s),"data-id":i},this.renderBody())},r.propsList=["body","className","children","size"],r.defaultProps={className:"",size:"md"},r}(i.default.Component),c=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return d.__extends(r,e),r=d.__decorate([a.Renderer({type:"wrapper"})],r)}(p);r.WrapperRenderer=c,r.default=p}));
|
||
;/*!node_modules/amis/lib/renderers/IFrame.js*/
|
||
amis.define("node_modules/amis/lib/renderers/IFrame",(function(e,t,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=i(r),p=e("node_modules/react/index"),l=(p.default||p).createElement;(p.default||p).Fragment;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.IFrameRef=d.default.createRef(),t.state={width:t.props.width||"100%",height:t.props.height||"100%"},t}return n.__extends(t,e),t.prototype.componentDidMount=function(){window.addEventListener("message",this.onMessage)},t.prototype.componentDidUpdate=function(e){var t=this.props.data;t!==e.data?this.postMessage("update",t):this.props.width===e.width&&this.props.height===e.height||this.setState({width:this.props.width||"100%",height:this.props.height||"100%"})},t.prototype.componentWillUnmount=function(){window.removeEventListener("message",this.onMessage)},t.prototype.validateURL=function(e){return!(!e||"string"!=typeof e||!/^data:([a-zA-Z0-9]+\/[a-zA-Z0-9]+);base64,.*/.test(e))||!(e&&"string"==typeof e&&!/^(\.\/|\.\.\/|\/|(blob\:)?https?\:\/\/|\/\/)/.test(e))},t.prototype.onMessage=function(e){var t,a,s;return n.__awaiter(this,void 0,void 0,(function(){var r,i,d,p,l,c,u,m,h,_,v;return n.__generator(this,(function(g){switch(g.label){case 0:return r=this.props,i=r.events,d=r.onEvent,p=r.onAction,l=r.data,"string"!=typeof(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.type)?[2]:(c=n.__read(e.data.type.split(":"),2),u=c[0],m=c[1],"amis"===u&&m?"resize"===m&&e.data.data?(this.setState({width:e.data.data.width||"100%",height:e.data.data.height||"100%"}),[3,4]):[3,1]:[2]);case 1:return(h=null==d?void 0:d[m])&&(null===(a=h.actions)||void 0===a?void 0:a.length)?(_=o.createRendererEvent(m,{env:null===(s=this.props)||void 0===s?void 0:s.env,nativeEvent:e,data:o.createObject(l,e.data.data),scoped:this.context}),[4,o.runActions(h.actions,this,_)]):[3,3];case 2:if(g.sent(),_.prevented)return[2];g.label=3;case 3:i&&(v=i[m])&&p(e,v,o.createObject(l,e.data.data)),g.label=4;case 4:return[2]}}))}))},t.prototype.onLoad=function(){var e=this.props,t=e.src,a=e.data;t&&this.postMessage("init",a)},t.prototype.reload=function(e,t){if(t)return this.receive(t);var a=this.props,s=a.src,n=a.data;s&&(this.IFrameRef.current.src=o.resolveVariableAndFilter(s,n,"| raw"))},t.prototype.receive=function(e){var t=this.props,a=t.src,s=t.data,n=o.createObject(s,e);this.postMessage("receive",n),o.isApiOutdated(a,a,s,n)&&(this.IFrameRef.current.src=o.resolveVariableAndFilter(a,n,"| raw"))},t.prototype.postMessage=function(e,t){var a,s;null===(s=null===(a=this.IFrameRef.current)||void 0===a?void 0:a.contentWindow)||void 0===s||s.postMessage({type:"amis:".concat(e),data:JSON.parse(JSON.stringify(t))},"*")},t.prototype.render=function(){var e=this.state,t=e.width,a=e.height,s=this.props,r=s.className,i=s.src,p=s.name,c=s.frameBorder,u=s.data,m=s.style,h=s.allow,_=s.sandbox,v=s.referrerpolicy,g=s.translate,f=s.id,y=s.wrapperCustomStyle,b=s.env,w=s.themeCss;s.baseControlClassName;var C=s.classnames,F={};void 0!==t&&(F.width=t),void 0!==a&&(F.height=a),m=n.__assign(n.__assign({},F),m);var M=i?o.resolveVariableAndFilter(i,u,"| raw"):void 0;return this.validateURL(M)?("https:"===location.protocol&&M&&M.startsWith("http://")&&b.notify("error",g("Iframe.invalidProtocol")),l(d.default.Fragment,null,l("iframe",{name:p,className:C("IFrame",r,o.setThemeClassName(n.__assign(n.__assign({},this.props),{name:"baseControlClassName",id:f,themeCss:w})),o.setThemeClassName(n.__assign(n.__assign({},this.props),{name:"wrapperCustomStyle",id:f,themeCss:y}))),frameBorder:c,style:m,ref:this.IFrameRef,onLoad:this.onLoad,src:M,allow:h,referrerPolicy:v,sandbox:_}),l(o.CustomStyle,n.__assign({},this.props,{config:{wrapperCustomStyle:y,id:f,themeCss:w,classNames:[{key:"baseControlClassName"}]},env:b})))):l("p",null,g("Iframe.invalid"))},t.propsList=["src","className"],t.defaultProps={className:"",frameBorder:0},n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[MessageEvent]),n.__metadata("design:returntype",Promise)],t.prototype,"onMessage",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"onLoad",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,Object]),n.__metadata("design:returntype",void 0)],t.prototype,"reload",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],t.prototype,"receive",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String,Object]),n.__metadata("design:returntype",void 0)],t.prototype,"postMessage",null),t}(d.default.Component),u=function(e){function t(t,a){var s=e.call(this,t)||this;return a.registerComponent(s),s}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},t.contextType=o.ScopedContext,t=n.__decorate([o.Renderer({type:"iframe"}),n.__metadata("design:paramtypes",[Object,Object])],t)}(c);t.IFrameRenderer=u,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/BarCode.js*/
|
||
amis.define("node_modules/amis/lib/renderers/BarCode",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),d=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(i),l=e("node_modules/react/index"),u=(l.default||l).createElement;(l.default||l).Fragment;var c=a.default.lazy((function(){return Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/amis-ui/lib/components/BarCode","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))}))})),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.style;e.width,e.height;var o=e.classnames,r=e.options,s=d.getPropValue(this.props);return u(i.Suspense,{fallback:u("div",null,"...")},u("div",{"data-testid":"barcode",className:o("BarCode",t),style:n},u(c,{value:s,options:r})))},t}(a.default.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([d.Renderer({type:"barcode"})],t)}(f);t.BarCodeField=f,t.BarCodeFieldRenderer=m}));
|
||
;/*!node_modules/amis/lib/renderers/QRCode.js*/
|
||
amis.define("node_modules/amis/lib/renderers/QRCode",(function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),l=e("node_modules/classnames/index"),i=e("node_modules/amis-core/lib/index"),s=e("node_modules/qrcode.react/lib/index"),d=e("node_modules/lodash/mapValues");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(a),m=c(l),f=c(s),p=c(d),g=e("node_modules/react/index"),v=(g.default||g).createElement;function h(e,t){var o=URL.createObjectURL(e),n=document.createElement("a");n.href=o,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((function(){return URL.revokeObjectURL(o)}),500)}(g.default||g).Fragment;var b=function(e){function t(t){var o=e.call(this,t)||this;return o.ref=u.default.createRef(),o}return r.__extends(t,e),t.prototype.getImageSettings=function(){var e=this.props,t=e.imageSettings,o=e.data;if(t&&i.isObject(t)&&t.src&&"string"==typeof t.src)return i.isPureVariable(t.src)&&(t.src=i.resolveVariableAndFilter(t.src,o,"| raw")),p.default(t,(function(e,t){return~["width","height","x","y"].indexOf(t)?i.isNumeric(e)?Number(e):null:e}))},t.prototype.doAction=function(e,t,o,n){var r,a=this.props.codeSize;if("saveAs"===(null==e?void 0:e.actionType)&&(null===(r=this.ref)||void 0===r?void 0:r.current))if("svg"===this.props.mode){var l=this.ref.current.querySelector("svg");if(l){var i='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" height="'.concat(a,'" width="').concat(a,'" viewBox="').concat(l.getAttribute("viewBox")||"0 0 37 37",'">\n ').concat(l.innerHTML,"\n </svg>");h(new Blob([i],{type:"image/svg+xml"}),(null==n?void 0:n.name)||"qr-code.svg")}}else{var s=this.ref.current.querySelector("canvas");s&&s.toBlob((function(e){e&&h(e,(null==n?void 0:n.name)?n.name.replace(/\.svg$/,".png"):"qr-code.png")}),"image/png")}},t.prototype.render=function(){var e=this.props,t=e.className,o=e.style,n=e.qrcodeClassName,r=e.codeSize,a=e.backgroundColor,l=e.foregroundColor,s=e.placeholder,d=e.level,c=e.defaultValue,u=e.data,p=e.mode,g=e.translate,h=e.classPrefix,b=i.getPropValue(this.props,(function(){return i.filter(c,u,"| raw")||void 0}));return v("div",{className:m.default("".concat(h,"QrCode"),t),style:o,ref:this.ref},b?b.length>2953?v("span",{className:"text-danger"},g("QRCode.tooLong",{max:2953})):v(f.default,{className:n,value:b,size:r,bgColor:a,fgColor:l,level:d||"L",imageSettings:this.getImageSettings(),renderAs:p}):v("span",{className:"".concat(h,"QrCode--placeholder")},s))},t.defaultProps={codeSize:128,qrcodeClassName:"",backgroundColor:"#fff",foregroundColor:"#000",level:"L",placeholder:"-",mode:"canvas"},t}(u.default.Component),x=function(e){function t(t,o){var n=e.call(this,t)||this;return o.registerComponent(n),n}return r.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=i.ScopedContext,t=r.__decorate([i.Renderer({type:"qrcode",alias:["qr-code"],name:"qrcode"}),r.__metadata("design:paramtypes",[Object,Object])],t)}(b);t.QRCodeRenderer=x,t.default=b}));
|
||
;/*!node_modules/amis/lib/renderers/Icon.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Icon",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("node_modules/amis-ui/lib/components/withBadge"),o=e("node_modules/amis-ui/lib/components/Icon"),i=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),r=e("node_modules/amis-core/lib/index");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=p(s),u=p(o),c=p(d),_=e("node_modules/react/index"),m=(_.default||_).createElement;(_.default||_).Fragment;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseEnter=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.handleMouseLeave=function(e){var t=this.props;(0,t.dispatchEvent)(e,t.data)},t.prototype.render=function(){var e=this.props,t=e.classnames,n=e.className,a=e.data,s=e.id,o=e.themeCss,d=e.env,p=e.wrapperCustomStyle,l=this.props.icon;return"string"==typeof l&&(l=r.filter(this.props.icon,a)),m(c.default.Fragment,null,m(u.default,i.__assign({},this.props,{icon:l,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:t(n,r.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"className",id:s,themeCss:o})),r.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"wrapperCustomStyle",id:s,themeCss:p})))})),m(r.CustomStyle,i.__assign({},this.props,{config:{themeCss:o,classNames:[{key:"className"}],id:s},env:d})))},t.defaultProps={icon:"",vendor:"fa"},i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),i.__decorate([r.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(c.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t=i.__decorate([r.Renderer({type:"icon"}),l.default],t)}(h);t.Icon=h,t.IconRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/Carousel.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Carousel",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Icon"),r=e("node_modules/amis-ui/lib/components/Html"),i=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),l=e("node_modules/react-transition-group/cjs/Transition"),u=e("node_modules/amis-core/lib/index"),d=e("node_modules/amis/lib/renderers/Image");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m,c=p(o),h=p(r),_=p(s),g=p(l),y=e("node_modules/react/index"),v=(y.default||y).createElement;(y.default||y).Fragment;var f=((m={})[l.ENTERING]="in",m[l.ENTERED]="in",m[l.EXITING]="out",m),C={component:function(e){var t,a,n=e.data||{},o=e.thumbMode,r=e.classnames;return v(_.default.Fragment,null,n.hasOwnProperty("image")?v(d.default,{src:n.image,title:n.title,href:n.href,blank:n.blank,htmlTarget:n.htmlTarget,caption:n.description,thumbMode:null!==(a=null!==(t=n.thumbMode)&&void 0!==t?t:o)&&void 0!==a?a:"contain",imageMode:"original",className:r("Carousel-image")}):n.hasOwnProperty("html")?v(h.default,{html:n.html,filterHtml:e.env.filterHtml}):n.hasOwnProperty("item")?v("span",null,n.item):v("p",null))}},w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrapperRef=_.default.createRef(),t.state={current:0,options:t.props.options||u.getPropValue(t.props)||[],nextAnimation:""},t.loading=!1,t}return i.__extends(t,e),t.prototype.componentDidMount=function(){this.prepareAutoSlide()},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.options||u.getPropValue(t)||[],n=e.options||u.getPropValue(e)||[];u.isArrayChildrenModified(n,a)&&this.setState({options:a})},t.prototype.componentWillUnmount=function(){this.clearAutoTimeout()},t.prototype.doAction=function(e,t,a,n){var o=null==e?void 0:e.actionType;~["next","prev"].indexOf(o)?this.autoSlide(o):"goto-image"===o&&this.changeSlide((null==n?void 0:n.activeIndex)-1)},t.prototype.prepareAutoSlide=function(){if(!(this.state.options.length<2)&&(this.clearAutoTimeout(),this.props.auto)){var e=this.props.interval;this.intervalTimeout=setTimeout(this.autoSlide,"string"==typeof e?u.resolveVariableAndFilter(e,this.props.data)||5e3:e)}},t.prototype.autoSlide=function(e){this.clearAutoTimeout();var t=this.props.animation,a=this.state.nextAnimation;if("prev"===e)a="slide"===t?"slideRight":"",this.transitFramesTowards("right",a);else a="",this.transitFramesTowards("left",a);this.durationTimeout=setTimeout(this.prepareAutoSlide,this.props.duration)},t.prototype.transitFramesTowards=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var a,n,o,r,s,l;return i.__generator(this,(function(i){switch(i.label){case 0:switch(a=this.state.current,n=a,e){case"left":a=this.getFrameId("next");break;case"right":a=this.getFrameId("prev")}return o=this.props,r=o.dispatchEvent,s=o.data,[4,r("change",u.createObject(s,{activeIndex:a+1,prevIndex:n}))];case 1:return(null==(l=i.sent())?void 0:l.prevented)||this.setState({current:a,nextAnimation:t}),[2]}}))}))},t.prototype.getFrameId=function(e){var t=this.state,a=t.options,n=t.current,o=a.length;switch(e){case"prev":return(n-1+o)%o;case"next":return(n+1)%o;default:return n}},t.prototype.next=function(){var e=this.props.multiple;this.loading&&e&&e.count>1||this.autoSlide("next")},t.prototype.prev=function(){var e=this.props.multiple;this.loading&&e&&e.count>1||this.autoSlide("prev")},t.prototype.clearAutoTimeout=function(){clearTimeout(this.intervalTimeout),clearTimeout(this.durationTimeout)},t.prototype.changeSlide=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,a,n,o,r,s;return i.__generator(this,(function(i){switch(i.label){case 0:return t=this.state.current,a=this.props,n=a.dispatchEvent,o=a.data,r=a.multiple,this.loading&&r&&r.count>1?[2]:[4,n("change",u.createObject(o,{activeIndex:e,prevIndex:t}))];case 1:return(null==(s=i.sent())?void 0:s.prevented)||this.setState({current:e}),[2]}}))}))},t.prototype.renderDots=function(){var e=this,t=this.props.classnames,a=this.state,n=a.current,o=a.options;return v("div",{className:t("Carousel-dotsControl"),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},Array.from({length:o.length}).map((function(a,o){return v("span",{key:o,onClick:function(){return e.changeSlide(o)},className:t("Carousel-dot",n===o?"is-active":"")})})))},t.prototype.renderArrows=function(){var e=this.props.classnames;return v("div",{className:e("Carousel-arrowsControl"),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},v("div",{className:e("Carousel-leftArrow"),onClick:this.prev},v(c.default,{icon:"left-arrow",className:"icon"})),v("div",{className:e("Carousel-rightArrow"),onClick:this.next},v(c.default,{icon:"right-arrow",className:"icon"})))},t.prototype.handleMouseEnter=function(){var e=this.props.multiple;e&&e.count>1||this.clearAutoTimeout()},t.prototype.handleMouseLeave=function(){var e=this.props.multiple;e&&e.count>1||this.prepareAutoSlide()},t.prototype.getNewOptions=function(e,t){void 0===t&&(t=1);var a=e;if(Array.isArray(e)&&e.length){a=new Array(e.length);for(var n=0;n<e.length;n++){a[n]=new Array(t);for(var o=0;o<t;o++)a[n][o]=e[(n+o)%e.length]}}return a},t.prototype.render=function(){var e,t=this,a=this.props,n=a.render,o=a.className,r=a.style,s=a.classnames,d=a.itemSchema,p=a.animation,m=a.width,h=a.height,y=a.controls,w=a.controlsTheme,N=a.placeholder,b=a.data,T=a.name,E=a.duration,x=a.multiple,A=a.alwaysShowArrow,S=a.icons,M=a.id,I=a.wrapperCustomStyle,F=a.env,R=a.themeCss,O=this.state,k=O.options,D=O.current,P=O.nextAnimation,j=null,G=r||{};m&&(G.width=m+"px"),h&&(G.height=h+"px");var L=i.__read([y.indexOf("dots")>-1,y.indexOf("arrows")>-1],2),V=L[0],X=L[1],H=P||p;if(Array.isArray(k)&&k.length){var U=1;x&&"number"==typeof x.count&&x.count>=2&&(U=Math.floor(x.count)<k.length?Math.floor(x.count):k.length);var W=this.getNewOptions(k,U),B=U>1&&"number"==typeof E?"".concat(E,"ms"):E||"500ms",q=U>1&&"number"==typeof E?E:500;j=v("div",{ref:this.wrapperRef,className:s("Carousel-container"),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},k.map((function(e,a){return v(g.default,{mountOnEnter:!0,unmountOnExit:!0,in:a===D,timeout:q,key:a},(function(o){var r;o===l.ENTERING&&t.wrapperRef.current&&t.wrapperRef.current.childNodes.forEach((function(e){return e.offsetHeight})),U>1&&(o!==l.ENTERING&&o!==l.EXITING||t.loading?o!==l.ENTERED&&o!==l.EXITED||!t.loading||(t.loading=!1):t.loading=!0);var m=((r={})[l.ENTERING]=0,r[l.ENTERED]=0,r[l.EXITING]="slideRight"===H?100/U:-100/U,r[l.EXITED]="slideRight"===H?-100/U:100/U,r),c=U>1?i.__assign({transitionTimingFunction:"linear",transitionDuration:B},"slide"===p?{transform:"translateX(".concat(m[o],"%)")}:{}):{},h=function(e){var a;return n("".concat(D,"/body"),d||C,{thumbMode:t.props.thumbMode,data:u.createObject(b,u.isObject(e)?e:(a={item:e},a[T]=e,a))})};return v("div",{className:s("Carousel-item",H,f[o]),style:c},1===U?h(e):null,U>1?W[a].map((function(e,t){return v("div",{key:t,style:{width:100/U+"%",height:"100%",float:"left"}},h(e))})):null)}))})))}return v("div",{className:s("Carousel Carousel--".concat(w),(e={},e["Carousel-arrow--always"]=!!A,e),o,u.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"baseControlClassName",id:M,themeCss:R})),u.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"wrapperCustomStyle",id:M,themeCss:I}))),style:G},j||N,V?this.renderDots():null,X?v("div",{className:s("Carousel-leftArrow",u.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"galleryControlClassName",id:M,themeCss:R}))),onClick:this.prev},S&&S.prev?_.default.isValidElement(S.prev)?S.prev:n("arrow-prev",S.prev):v(c.default,{icon:"left-arrow",className:"icon",iconContent:"ImageGallery-prevBtn"})):null,X?v("div",{className:s("Carousel-rightArrow",u.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"galleryControlClassName",id:M,themeCss:R}))),onClick:this.next},S&&S.next?_.default.isValidElement(S.next)?S.next:n("arrow-next",S.next):v(c.default,{icon:"right-arrow",className:"icon",iconContent:"ImageGallery-nextBtn"})):null,v(u.CustomStyle,i.__assign({},this.props,{config:{wrapperCustomStyle:I,id:M,themeCss:R,classNames:[{key:"baseControlClassName"},{key:"galleryControlClassName",weights:{default:{suf:" svg",important:!0}}}]},env:F})))},t.defaultProps={auto:!0,interval:5e3,duration:500,controlsTheme:"light",animation:"fade",controls:["dots","arrows"],placeholder:"-",multiple:{count:1},alwaysShowArrow:!1},i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"prepareAutoSlide",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String]),i.__metadata("design:returntype",void 0)],t.prototype,"autoSlide",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String,String]),i.__metadata("design:returntype",Promise)],t.prototype,"transitFramesTowards",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String]),i.__metadata("design:returntype",void 0)],t.prototype,"getFrameId",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"next",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"prev",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"clearAutoTimeout",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number]),i.__metadata("design:returntype",Promise)],t.prototype,"changeSlide",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),i.__decorate([u.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(_.default.Component),N=function(e){function t(t,a){var n=e.call(this,t)||this;return a.registerComponent(n),n}return i.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=u.ScopedContext,t=i.__decorate([u.Renderer({type:"carousel"}),i.__metadata("design:paramtypes",[Object,Object])],t)}(w);t.Carousel=w,t.CarouselRenderer=N}));
|
||
;/*!node_modules/amis-ui/lib/components/AnchorNavSection.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/AnchorNavSection",(function(e,o,n,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var c=e("node_modules/amis-ui/lib/components/AnchorNav");o.default=c.AnchorNavSection}));
|
||
;/*!node_modules/amis/lib/renderers/AnchorNav.js*/
|
||
amis.define("node_modules/amis/lib/renderers/AnchorNav",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/AnchorNav"),i=e("node_modules/amis-ui/lib/components/AnchorNavSection"),s=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),c=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(r),u=l(i),p=l(o),f=e("node_modules/react/index"),m=(f.default||f).createElement;(f.default||f).Fragment;var h=function(e){function t(t){var n=e.call(this,t)||this,a=t.links,r=0;if(void 0!==t.active)r=t.active;else{var i=n.getActiveSection(a,t.active,null);r=i&&i.href?i.href:a[0]&&a[0].href||0}return n.state={active:r},n}return s.__extends(t,e),t.prototype.getActiveSection=function(e,t,n){var a=this;return n||(e.forEach((function(e){e.href===t?n=e:e.children&&a.getActiveSection(e.children,t,n)})),n)},t.prototype.handleSelect=function(e){this.setState({active:e})},t.prototype.locateTo=function(e){var t=this.props.links;Array.isArray(t)&&t[e]&&this.setState({active:t[e].href||e})},t.prototype.renderSections=function(e,t){var n=this,a=this.props;a.classnames,a.classPrefix;var r=a.sectionRender,i=a.render,o=a.data;e=Array.isArray(e)?e:[e];var l=[];return e.forEach((function(e,a){if(c.isVisible(e,o)){var d=(t?t+"-":"")+a;l.push(m(u.default,s.__assign({},e,{title:c.filter(e.title,o),key:d,name:e.href||d}),n.renderSection?n.renderSection(e,n.props,d):r?r(e,n.props,d):i("section/".concat(d),e.body||""))),e.children&&l.push.apply(l,s.__spreadArray([],s.__read(n.renderSections(e.children,d)),!1))}})),l.filter((function(e){return!!e}))},t.prototype.render=function(){var e=this.props,t=e.classnames,n=e.classPrefix,a=e.className,r=e.style,i=e.linkClassName,s=e.sectionClassName,o=e.direction;e.sectionRender,e.render,e.data;var c=this.props.links;if(!c)return null;var l=this.renderSections(c);return m(d.default,{classPrefix:n,classnames:t,className:a,style:r,linkClassName:i,sectionClassName:s,onSelect:this.handleSelect,active:this.state.active,direction:o},l)},t.defaultProps={className:"",linkClassName:"",sectionClassName:""},s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleSelect",null),s.__decorate([c.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Number]),s.__metadata("design:returntype",void 0)],t.prototype,"locateTo",null),t}(p.default.Component),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([c.Renderer({type:"anchor-nav"})],t)}(h);t.AnchorNavRenderer=_,t.default=h}));
|
||
;/*!node_modules/amis/lib/renderers/Steps.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Steps",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/withRemoteConfig"),o=e("node_modules/amis-ui/lib/components/Steps"),s=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index"),u=e("node_modules/lodash/isPlainObject");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(i),p=d(o),c=d(a),m=d(u),_=e("node_modules/react/index"),b=(_.default||_).createElement;function g(e){var t,n=e.className,r=e.style,i=e.steps,a=e.status,u=e.mode,d=e.iconPosition,f=e.labelPlacement,c=e.progressDot,m=e.data,_=e.source,g=e.render,v=e.mobileUI,y=l.resolveVariableAndFilter(_,m,"| raw"),h=(Array.isArray(y)?y:void 0)||i||[],P=l.isPureVariable(a)?l.resolveVariableAndFilter(a,m,"| raw"):a,x=function(e){return"string"==typeof e?l.filter(e,m):e&&g("inner",e)},C=null!==(t=l.getPropValue(e))&&void 0!==t?t:0,S="string"==typeof C&&isNaN(+C)?l.resolveVariable(C,m)||C:+C,V=h.findIndex((function(e){return e.value&&e.value===S})),j=-1!==V?V:S,A=h.map((function(e,t){var n=function(e,t){var n;if("string"==typeof P)t===j&&(n=P||a||o.StepStatus.process);else if("object"==typeof P){var r=e.value;r&&P[r]&&(n=P[r])}return n}(e,t);return s.__assign(s.__assign({},e),{status:n,title:x(e.title),subTitle:x(e.subTitle),description:x(e.description)})}));return b(p.default,{current:j,steps:A,className:n,style:r,status:P,mode:u,iconPosition:d,progressDot:c,labelPlacement:f,mobileUI:v})}(_.default||_).Fragment;var v=f.default()(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.config;e.deferLoad,e.loading,e.updateConfig;var n=s.__rest(e,["config","deferLoad","loading","updateConfig"]),r=m.default(t)?t:null;return b(g,s.__assign({},n,r))},t}(c.default.Component)),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.render=function(){return b(v,s.__assign({},this.props))},t=s.__decorate([l.Renderer({type:"steps"})],t)}(c.default.Component);t.StepsCmpt=g,t.StepsRenderer=y}));
|
||
;/*!node_modules/amis/lib/renderers/Timeline.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Timeline",(function(e,t,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/withRemoteConfig"),o=e("node_modules/amis-ui/lib/components/Timeline"),s=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(n),u=d(o),f=d(r),c=e("node_modules/react/index"),p=(c.default||c).createElement;function _(e){var t=e.items,i=e.mode,a=e.style,n=e.direction,o=e.reverse,r=e.data,d=e.itemTitleSchema,m=e.className,f=e.timeClassName,c=e.titleClassName,_=e.detailClassName,C=e.render,g=(t||[]).map((function(e,t){var i,a,n=e.icon,o=e.iconClassName,m=e.title,u=e.timeClassName,f=e.titleClassName,c=e.detailClassName;return s.__assign(s.__assign({},e),{iconClassName:o,timeClassName:u,titleClassName:f,detailClassName:c,icon:l.isPureVariable(n)?l.resolveVariableAndFilter(n,r,"| raw"):n,title:d?C("".concat(t,"/body"),d,{data:l.createObject(r,e)}):(i="title",a=m,"string"==typeof a?l.filter(a,r):a&&C(i,a))})}));return p(u.default,{items:g,direction:n,reverse:o,mode:i,style:a,className:m,timeClassName:f,titleClassName:c,detailClassName:_})}(c.default||c).Fragment;var C=m.default({adaptor:function(e){return e.items||e}})(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.config,i=e.items;e.deferLoad,e.loading,e.updateConfig;var a=s.__rest(e,["config","items","deferLoad","loading","updateConfig"]),n=t?Array.isArray(t)?t:Object.keys(t).map((function(e){return{time:e,title:t[e]}})):i||[];return p(_,s.__assign({items:n},a))},t}(f.default.Component)),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remoteRef=void 0,t}return s.__extends(t,e),t.prototype.remoteConfigRef=function(e){this.remoteRef=e},t.prototype.componentDidUpdate=function(e){var t=this.props,i=t.source,a=t.data;this.remoteRef&&i!==e.source&&(l.isPureVariable(i)&&this.remoteRef.syncConfig()||(l.isEffectiveApi(i,a)?!1!==i.autoRefresh&&this.remoteRef.loadConfig():this.remoteRef.setConfig(void 0)))},t.prototype.render=function(){return p(C,s.__assign({},this.props,{remoteConfigRef:this.remoteConfigRef}))},s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"remoteConfigRef",null),t=s.__decorate([l.Renderer({type:"timeline"})],t)}(f.default.Component);t.TimelineCmpt=_,t.TimelineRenderer=g}));
|
||
;/*!node_modules/amis/lib/renderers/Markdown.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Markdown",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=i(a),u=e("node_modules/react/index"),l=(u.default||u).createElement;function c(){return Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/amis-ui/lib/components/Markdown","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))})).then((function(e){return e.default}))}(u.default||u).Fragment;var p=function(e){function t(t){var n=e.call(this,t)||this,r=n.props,o=r.name,a=r.data;if(r.src)n.state={content:""},n.updateContent();else{var i=s.getPropValue(n.props)||(o&&s.isPureVariable(o)?s.resolveVariableAndFilter(o,a,"| raw"):null);n.state={content:i}}return n}return o.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;t.src?s.isApiOutdated(e.src,t.src,e.data,t.data)&&this.updateContent():this.updateContent()},t.prototype.updateContent=function(){return o.__awaiter(this,void 0,void 0,(function(){var e,t,n,r,a,i,d;return o.__generator(this,(function(o){switch(o.label){case 0:return e=this.props,t=e.name,n=e.data,r=e.src,a=e.env,r&&s.isEffectiveApi(r,n)?[4,a.fetcher(r,n)]:[3,2];case 1:return"string"==typeof(i=o.sent())?this.setState({content:i}):"object"==typeof i&&i.data?this.setState({content:i.data}):console.error("markdown response error",i),[3,3];case 2:(d=s.getPropValue(this.props)||(t&&s.isPureVariable(t)?s.resolveVariableAndFilter(t,n,"| raw"):null))!==this.state.content&&this.setState({content:d}),o.label=3;case 3:return[2]}}))}))},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,r=e.classnames,o=e.options;return l("div",{className:r("Markdown",t),style:n},l(s.LazyComponent,{getComponent:c,content:this.state.content||"",options:o}))},t}(d.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([s.Renderer({type:"markdown"})],t)}(p);t.Markdown=p,t.MarkdownRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/TableView.js*/
|
||
amis.define("node_modules/amis/lib/renderers/TableView",(function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(s),d=e("node_modules/react/index"),p=(d.default||d).createElement;(d.default||d).Fragment;var u=function(e){function t(t){return e.call(this,t)||this}return o.__extends(t,e),t.prototype.renderTd=function(e,t,r){var n=this.props,s=n.border,i=n.borderColor;n.render;var l,d=n.data,u=n.padding,c="td-".concat(t);return s&&(l="1px solid ".concat(i)),a.isVisible(e,d)?p("td",{style:o.__assign({border:l,color:e.color,fontWeight:e.bold?"bold":"normal",background:e.background,padding:e.padding||u,width:e.width||"auto",textAlign:e.align||"left",verticalAlign:e.valign||"center"},e.style),align:e.align,valign:e.valign,rowSpan:e.rowspan,colSpan:e.colspan,key:c},this.renderTdBody(e.body)):null},t.prototype.renderTdBody=function(e){return(0,this.props.render)("td",e||"")},t.prototype.renderTds=function(e,t){var r=this,n=this.props.data;return e.map((function(e,o){return r.renderTd(a.resolveMappingObject(e,n),o,t)}))},t.prototype.renderTr=function(e,t){var r="tr-".concat(t),n=this.props.data;return a.isVisible(e,n)?p("tr",{style:o.__assign({height:e.height,background:e.background},e.style),key:r},this.renderTds(e.tds||[],t)):null},t.prototype.renderTrs=function(e){var t=this,r=this.props.data;return e.map((function(e,n){return t.renderTr(a.resolveMappingObject(e,r),n)}))},t.prototype.renderCols=function(){var e=this.props,t=e.cols,r=e.data;if(t){var n=t.map((function(e){return e=a.resolveMappingObject(e,r),p("col",{span:e.span,style:e.style})}));return p("colgroup",null,n)}return null},t.prototype.renderCaption=function(){return this.props.caption?p("caption",{style:{captionSide:"bottom"===this.props.captionSide?"bottom":"top"}},this.props.caption):null},t.prototype.render=function(){var e=this.props,t=e.width,r=e.trs,n=void 0===r?[]:r,s=e.classnames,i=e.className,l=e.id,d=e.wrapperCustomStyle,u=e.env,c=e.themeCss,h=e.style,b=p("table",{className:s("TableView",i,a.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"baseControlClassName",id:l,themeCss:c})),a.setThemeClassName(o.__assign(o.__assign({},this.props),{name:"wrapperCustomStyle",id:l,themeCss:d}))),style:{width:t,borderCollapse:"collapse"},"data-id":l},this.renderCaption(),this.renderCols(),p("tbody",null,this.renderTrs(n)),p(a.CustomStyle,o.__assign({},this.props,{config:{wrapperCustomStyle:d,id:l,themeCss:c,classNames:[{key:"baseControlClassName"}]},env:u})));return h&&Object.keys(h).length?p("div",{className:"ae-TableViewEditor",style:h},b):b},t.defaultProps={padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",width:"100%",border:!0,borderColor:"var(--borderColor)"},t}(l.default.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([a.Renderer({type:"table-view",autoVar:!0})],t)}(u);t.TableViewRenderer=c,t.default=u}));
|
||
;/*!node_modules/amis/lib/renderers/Code.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Code",(function(e,t,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),i=e("node_modules/lodash/isPlainObject"),s=e("node_modules/amis-core/lib/index");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(a),d=u(i),c=e("node_modules/react/index"),h=(c.default||c).createElement;(c.default||c).Fragment;var p=function(t){function o(e){var o=t.call(this,e)||this;return o.toDispose=[],o.codeRef=l.default.createRef(),o}return n.__extends(o,t),o.prototype.shouldComponentUpdate=function(e){return s.anyChanged(o.propsList,this.props,e)||this.resolveLanguage(this.props)!==this.resolveLanguage(e)||s.getPropValue(this.props)!==s.getPropValue(e)},o.prototype.componentDidMount=function(){var t=this;Promise.resolve().then((function(){return new Promise((function(t){e(["b961301","node_modules/tslib/tslib"],(function(e,o){t(o.__importStar(e))}))}))})).then((function(e){return t.handleMonaco(e)}))},o.prototype.componentDidUpdate=function(e){var t,o;return n.__awaiter(this,void 0,void 0,(function(){var e,r,a,i,u,l,d;return n.__generator(this,(function(n){switch(n.label){case 0:return e=this.props,r=this.codeRef.current,(null===(t=null==this?void 0:this.monaco)||void 0===t?void 0:t.editor)&&r?(a=e.tabSize,i=null!==(o=s.getPropValue(this.props))&&void 0!==o?o:"",u=this.resolveLanguage(),l=this.registerAndGetTheme(),this.monaco.editor.setTheme(l),[4,this.monaco.editor.colorize(i,u,{tabSize:a})]):[3,2];case 1:d=n.sent(),r.innerHTML=d,n.label=2;case 2:return[2]}}))}))},o.prototype.handleMonaco=function(e){var t,o;return n.__awaiter(this,void 0,void 0,(function(){var r,a,i,u,l,d;return n.__generator(this,(function(n){switch(n.label){case 0:return e?(this.monaco=e,r=this.props.tabSize,a=null!==(t=s.getPropValue(this.props))&&void 0!==t?t:"",i=this.resolveLanguage(),(u=this.codeRef.current)&&(null===(o=this.monaco)||void 0===o?void 0:o.editor)?(l=this.registerAndGetTheme(),this.monaco.editor.setTheme(l),[4,this.monaco.editor.colorize(a,i,{tabSize:r})]):[3,2]):[2];case 1:d=n.sent(),u.innerHTML=d,n.label=2;case 2:return[2]}}))}))},o.prototype.resolveLanguage=function(e){var t=null!=e?e:this.props,o=t.customLang,r=t.data,n=t.language,a=void 0===n?"plaintext":n;return s.isPureVariable(a)&&(a=s.resolveVariableAndFilter(a,r)),o&&o.name&&(a=o.name),a},o.prototype.registerAndGetTheme=function(){var e,t,o,r,a=this.monaco,i=this.props,s=i.theme,u=i.editorTheme;if(u=u||("dark"===s?"vs-dark":"vs"),!a)return u;if(this.customLang&&this.customLang.name&&Array.isArray(this.customLang.tokens)&&this.customLang.tokens.length){var l=this.customLang.name,c=(null===(o=this.customLang)||void 0===o?void 0:o.colors)&&d.default(null===(r=this.customLang)||void 0===r?void 0:r.colors)?this.customLang.colors:{};a.languages.register({id:l});var h=[],p=[];try{for(var m=n.__values(this.customLang.tokens),g=m.next();!g.done;g=m.next()){var f=g.value,v=new RegExp(f.regex,f.regexFlags||void 0);h.push([v,f.name]),p.push({token:f.name,foreground:f.color,background:f.background,fontStyle:f.fontStyle})}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=m.return)&&t.call(m)}finally{if(e)throw e.error}}return a.languages.setMonarchTokensProvider(l,{tokenizer:{root:h}}),a.editor.defineTheme(l,{base:"vs",inherit:!1,rules:p,colors:c}),l}return u},o.prototype.render=function(){var e=s.getPropValue(this.props),t=this.props,o=t.className,r=t.maxHeight,n=t.style,a=void 0===n?{}:n,i=t.classnames,u=t.editorTheme,l=t.customLang,d=t.wordWrap,c=t.wrapperComponent,p=this.resolveLanguage(),m="string"==typeof e&&e.split(/\r?\n/).length>1,g=c||(m?"pre":"code");return l&&(this.customLang=l),r&&(a.maxHeight=a.maxHeight||r,a.overflow="auto"),h(g,{ref:this.codeRef,className:i("Code",{"Code--dark":u&&["vs-dark","hc-black"].includes(u),"Code-pre-wrap":"pre"===g,"word-break":d},o),style:a,"data-lang":p},e)},o.propsList=["language","editorTheme","tabSize","wordWrap","customLang","style"],o.defaultProps={language:"plaintext",tabSize:4,wordWrap:!0},o}(l.default.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([s.Renderer({type:"code"})],t)}(p);t.CodeRenderer=m,t.default=p}));
|
||
;/*!node_modules/amis/lib/renderers/WebComponent.js*/
|
||
amis.define("node_modules/amis/lib/renderers/WebComponent",(function(e,n,t,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),u=e("node_modules/amis-core/lib/index"),i=e("node_modules/lodash/mapValues");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(d),a=l(i),p=e("node_modules/react/index"),f=(p.default||p).createElement;(p.default||p).Fragment;var c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(n,e),n.prototype.renderBody=function(){var e=this.props,n=e.body,t=e.render;return n?t("body",n):null},n.prototype.render=function(){var e=this.props,n=e.tag,t=e.props,r=e.data,d=e.style,i=a.default(t,(function(e){return"string"==typeof e&&u.resolveVariableAndFilter(e,r,"| raw")||e}));return f(n||"div",o.__assign({},i,{style:d}),this.renderBody())},n}(s.default.Component),m=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(n,e),n=o.__decorate([u.Renderer({type:"web-component"})],n)}(c);n.WebComponentRenderer=m,n.default=c}));
|
||
;/*!node_modules/amis-ui/lib/components/GridNavItem.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/GridNavItem",(function(e,i,d,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/GridNav");i.default=n.GridNavItem}));
|
||
;/*!node_modules/amis/lib/renderers/GridNav.js*/
|
||
amis.define("node_modules/amis/lib/renderers/GridNav",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/GridNavItem"),r=e("node_modules/amis-ui/lib/components/GridNav"),o=e("node_modules/tslib/tslib"),l=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(i),c=d(r),p=d(l),m=e("node_modules/react/index"),y=(m.default||m).createElement;(m.default||m).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.handleClick=function(e){var t=this;return function(n){var a;a=e.link?s.validations.isUrl({},e.link)?{type:"button",actionType:"url",url:e.link,blank:e.blank}:{type:"button",actionType:"link",link:e.link}:e.clickAction,s.handleAction(n,a,t.props,e)}},t.prototype.render=function(){var e=this,t=this.props,n=t.itemClassName;t.style;var a=t.contentClassName,i=t.source,r=t.data,l=t.options,d=t.classnames,p=s.getPropValue(this.props),m=[];return"string"==typeof i&&s.isPureVariable(i)?m=s.resolveVariableAndFilter(i,r,"| raw")||void 0:Array.isArray(p)?m=p:Array.isArray(l)&&(m=l),m&&!Array.isArray(m)&&(m=[m]),(null==m?void 0:m.length)?y(c.default,o.__assign({},this.props),m.map((function(t,i){return y(u.default,{key:i,onClick:t.clickAction||t.link?e.handleClick(t):void 0,className:n,contentClassName:a,text:t.text,icon:t.icon,classnames:d,badge:t.badge?{badge:t.badge,data:r,classnames:d}:void 0})}))):null},o.__decorate([s.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),t=o.__decorate([s.Renderer({type:"grid-nav"})],t)}(p.default.Component);t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/TooltipWrapper.js*/
|
||
amis.define("node_modules/amis/lib/renderers/TooltipWrapper",(function(e,t,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=e("node_modules/amis-ui/lib/components/TooltipWrapper"),r=e("node_modules/tslib/tslib"),a=e("node_modules/react/index"),n=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=i(l),m=i(a),d=e("node_modules/react/index"),u=(d.default||d).createElement;(d.default||d).Fragment;var c=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.renderBody=function(){var e=this.props,t=e.render,s=e.classnames,o=e.body,l=e.className,a=e.wrapperComponent,i=e.inline,p=e.style,m=e.data,d=e.themeCss,c=e.wrapperCustomStyle,f=e.id;return u(a||(i?"span":"div"),{className:s("TooltipWrapper",l,{"TooltipWrapper--inline":i},n.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"baseControlClassName",id:f,themeCss:d})),n.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"wrapperCustomStyle",id:f,themeCss:c}))),style:n.buildStyle(p,m)},t("body",o))},t.prototype.render=function(){var e=this.props,t=e.classPrefix,s=e.classnames,o=e.tooltipClassName,l=e.tooltipTheme,a=e.container,i=e.placement,d=e.rootClose,c=e.tooltipStyle,f=e.title,C=e.content,y=e.tooltip,_=e.mouseEnterDelay,h=e.mouseLeaveDelay,g=e.trigger,b=e.offset,v=e.showArrow,N=e.disabled,w=e.enterable,T=e.data,S=e.env,x=e.popOverContainer,D=e.wrapperCustomStyle,W=e.id,E=e.themeCss,P={title:n.filter(f,T),content:n.filter(C||y,T),style:n.buildStyle(c,T),placement:i,trigger:g,rootClose:d,container:void 0!==a?a:x||(null==S?void 0:S.getModalContainer),tooltipTheme:l,tooltipClassName:s(o,n.setThemeClassName(r.__assign(r.__assign({},this.props),{name:"tooltipControlClassName",id:W,themeCss:E}))),mouseEnterDelay:_,mouseLeaveDelay:h,offset:b,showArrow:v,disabled:N,enterable:w,filterHtml:S.filterHtml};return u(m.default.Fragment,null,u(p.default,{classPrefix:t,classnames:s,tooltip:P},this.renderBody()),u(n.CustomStyle,r.__assign({},this.props,{config:{wrapperCustomStyle:D,id:W,themeCss:E,classNames:[{key:"baseControlClassName"},{key:"tooltipControlClassName"}]},env:S})))},t.defaultProps={placement:"top",trigger:"hover",rootClose:!0,mouseEnterDelay:0,mouseLeaveDelay:200,inline:!1,wrap:!1,tooltipTheme:"light"},t}(m.default.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([n.Renderer({type:"tooltip-wrapper"})],t)}(c);t.TooltipWrapperRenderer=f,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/Tag.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Tag",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Tag"),s=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=i(o),p=i(r),u=e("node_modules/react/index"),c=(u.default||u).createElement;(u.default||u).Fragment;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.handleClick=function(e){var t=this.props,a=t.dispatchEvent,n=t.onClick,o=this.getResolvedEventParams();a(e,o),null==n||n(o)},t.prototype.handleMouseEnter=function(e){(0,this.props.dispatchEvent)(e,this.getResolvedEventParams())},t.prototype.handleMouseLeave=function(e){(0,this.props.dispatchEvent)(e,this.getResolvedEventParams())},t.prototype.handleClose=function(e){var t=this.props,a=t.dispatchEvent,n=t.onClose,o=this.getResolvedEventParams();a(s.__assign(s.__assign({},e),{type:"close"}),o),null==n||n(o)},t.prototype.render=function(){var e=this.props,t=e.icon,a=e.displayMode,n=e.color,o=e.className,s=e.closable,r=e.data,i=e.style,p=void 0===i?{}:i,u=this.resolveLabel();return l.isPureVariable(t)&&(t=l.resolveVariableAndFilter(t,r)),l.isPureVariable(a)&&(a=l.resolveVariableAndFilter(a,r)),l.isPureVariable(n)&&(n=l.resolveVariableAndFilter(n,r)),c(d.default,{className:o,displayMode:a,color:n,icon:t,closable:s,style:p,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClose:this.handleClose},u)},t.prototype.resolveLabel=function(){var e=this.props,t=e.label,a=e.data;return l.getPropValue(this.props)||(t?l.resolveVariableAndFilter(t,a,"| raw"):null)},t.prototype.getResolvedEventParams=function(){var e=this.props.data;return l.createObject(e,{label:this.resolveLabel()})},t.defaultProps={displayMode:"normal"},s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),s.__decorate([l.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[Object]),s.__metadata("design:returntype",void 0)],t.prototype,"handleClose",null),t}(p.default.Component),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([l.Renderer({type:"tag"})],t)}(_);t.TagField=_,t.TagFieldRenderer=v}));
|
||
;/*!node_modules/amis-ui/lib/components/Table.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/Table",(function(e,i,n,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var d=e("node_modules/amis-ui/lib/components/table/index");i.default=d.default}));
|
||
;/*!node_modules/amis-ui/lib/components/HeadCellDropDown.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/HeadCellDropDown",(function(e,o,l,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var d=e("node_modules/amis-ui/lib/components/table/HeadCellDropDown");o.default=d.default}));
|
||
;/*!node_modules/amis/lib/renderers/Table2/HeadCellSearchDropdown.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Table2/HeadCellSearchDropdown",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Icon"),a=e("node_modules/amis-ui/lib/components/HeadCellDropDown"),i=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),l=e("node_modules/react-dom/index"),d=e("node_modules/mobx-react/dist/index"),c=e("node_modules/amis-core/lib/index");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(o),h=u(a),p=u(s),v=e("node_modules/react/index"),f=(v.default||v).createElement;(v.default||v).Fragment;var b=function(e){function t(t){var n=e.call(this,t)||this;return n.formItems=[],n.handleSubmit=n.handleSubmit.bind(n),n.handleAction=n.handleAction.bind(n),n}return i.__extends(t,e),t.prototype.buildSchema=function(){var e,t,n,r,o,a,s,l=this.props,d=l.searchable,c=l.sortable,u=l.name,m=l.label,h=l.translate,p=l.testIdBuilder;if(!0===d?s={title:"",controls:[{type:"text",name:u,placeholder:m,clearable:!0,testid:null===(e=null==p?void 0:p.getChild(u))||void 0===e?void 0:e.getTestIdValue()}]}:d&&(s=d.controls||d.tabs||d.fieldSet?i.__assign(i.__assign({title:""},d),{controls:Array.isArray(d.controls)?d.controls.concat():void 0}):"form"===(null==d?void 0:d.type)?d:{title:"",className:d.formClassName,controls:[i.__assign({type:d.type||"text",name:d.name||u,testid:null===(t=null==p?void 0:p.getChild(d.name||u))||void 0===t?void 0:t.getTestIdValue(),placeholder:m},d)]}),s&&s.controls&&c&&s.controls.unshift({type:"hidden",name:"orderBy",value:u},{type:"button-group",name:"order",label:h("sort"),options:[{label:h("asc"),value:"asc"},{label:h("desc"),value:"desc"}]}),s){var v=[];(s.controls||s.body||[]).forEach((function(e){return e.name&&"orderBy"!==e.name&&"order"!==e.name&&v.push(e.name)})),this.formItems=v,s=i.__assign(i.__assign({},s),{type:"form",wrapperComponent:"div",wrapWithPanel:!0,title:!1,testid:null===(n=null==p?void 0:p.getChild("form"))||void 0===n?void 0:n.getTestIdValue(),actions:[{type:"button",label:h("reset"),actionType:"clear-and-submit",testid:null===(r=null==p?void 0:p.getChild("btn-reset"))||void 0===r?void 0:r.getTestIdValue()},{type:"button",label:h("cancel"),actionType:"cancel",testid:null===(o=null==p?void 0:p.getChild("btn-cancel"))||void 0===o?void 0:o.getTestIdValue()},{label:h("search"),type:"submit",primary:!0,testid:null===(a=null==p?void 0:p.getChild("btn-search"))||void 0===a?void 0:a.getTestIdValue()}]})}return s||"error"},t.prototype.handleAction=function(e,t,n,r){return i.__awaiter(this,void 0,void 0,(function(){var o,a,s,l,d,u,m;return i.__generator(this,(function(h){switch(h.label){case 0:return o=this.props,a=o.onAction,s=o.data,l=o.dispatchEvent,d=o.name,"cancel"===t.actionType||"close"===t.actionType?(r(),[2]):"reset"===t.actionType?(r(),this.handleReset(),[2]):(u=i.__assign({},s),this.formItems.forEach((function(e){return c.setVariable(u,e,void 0)})),[4,l("columnSearch",c.createObject(s,{searchName:d,searchValue:u}))]);case 1:return(null==(m=h.sent())?void 0:m.prevented)||a&&a(e,t,n),[2]}}))}))},t.prototype.handleReset=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,n,r,o;return i.__generator(this,(function(a){switch(a.label){case 0:return e=this.props,t=e.onSearch,n=e.data,r=e.name,o=i.__assign({},n),this.formItems.forEach((function(e){return c.setVariable(o,e,void 0)})),o.orderBy===r&&(o.orderBy="",o.order="asc"),t?[4,t(r,o)]:[3,2];case 1:a.sent(),a.label=2;case 2:return t&&t(o),[2]}}))}))},t.prototype.handleSubmit=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o;return i.__generator(this,(function(a){switch(a.label){case 0:return n=this.props,r=n.onSearch,o=n.name,e.order&&(e=i.__assign(i.__assign({},e),{orderBy:o})),r?[4,r(o,e)]:[3,2];case 1:a.sent(),a.label=2;case 2:return t(),[2]}}))}))},t.prototype.isActive=function(){var e=this.props,t=e.data,n=e.name,r=e.orderBy;return r&&r===n||this.formItems.some((function(e){return null==t?void 0:t[e]}))},t.prototype.render=function(){var e=this,t=this.props,n=t.render,r=t.name,o=t.data,a=t.searchable,s=t.order,d=t.orderBy,c=t.popOverContainer,u=t.classPrefix,p=t.classnames,v=t.testIdBuilder,b=this.buildSchema(),_=this.isActive();return f(h.default,{className:"".concat(u,"TableCell-searchBtn"),layerClassName:p("".concat(u,"TableCell-searchPopOver"),a.className),active:_,filterIcon:f(m.default,{icon:"search",className:"icon",iconContent:"table-search-icon",testIdBuilder:null==v?void 0:v.getChild("search-icon")}),popOverContainer:c||function(){return l.findDOMNode(e)},filterDropdown:function(t){t.setSelectedKeys,t.selectedKeys;var a=t.confirm;return t.clearFilters,n("quick-search-form",b,{data:i.__assign(i.__assign({},o),{orderBy:d,order:d&&d===r?s:""}),onSubmit:function(t){return e.handleSubmit(t,a)},onAction:function(t,n,r){e.handleAction(t,n,r,a)}})},testIdBuilder:v})},t}(p.default.Component),_=d.observer((function(e){var t=e.store;return f(b,i.__assign({},e,{data:t.query,orderBy:t.orderBy,order:t.order}))}));t.HeadCellSearchDropDown=b,t.default=_}));
|
||
;/*!node_modules/amis/lib/renderers/Table2/TableCell.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Table2/TableCell",(function(e,l,d,i){"use strict";var s=e("node_modules/tslib/tslib"),r=e("node_modules/amis-core/lib/index");e("node_modules/amis/lib/renderers/Table/index");var o=e("node_modules/amis/lib/renderers/QuickEdit"),n=e("node_modules/amis/lib/renderers/Copyable"),a=e("node_modules/amis/lib/renderers/PopOver"),t=e("node_modules/amis/lib/renderers/Table/TableCell");!function(e){function l(){var l=null!==e&&e.apply(this,arguments)||this;return l.propsNeedRemove=["title"],l}s.__extends(l,e),l.defaultProps=s.__assign(s.__assign({},t.TableCell.defaultProps),{wrapperComponent:"div"}),l=s.__decorate([r.Renderer({type:"cell-field",name:"cell-field"}),a.HocPopOver(),n.HocCopyable(),o.HocQuickEdit()],l)}(t.TableCell)}));
|
||
;/*!node_modules/amis/lib/renderers/Table2/ColumnToggler.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Table2/ColumnToggler",(function(e,l,n,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var o=e("node_modules/amis-ui/lib/components/Checkbox"),i=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),s=e("node_modules/amis-core/lib/index"),a=e("node_modules/amis/lib/renderers/Table/ColumnToggler");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(o),c=u(r),g=e("node_modules/react/index"),m=(g.default||g).createElement;(g.default||g).Fragment;var f=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(l,e),l.prototype.render=function(){var e=this.props;e.className,e.store;var l=e.render,n=e.classPrefix,t=e.classnames,o=e.tooltip,r=e.align,u=e.cols,c=e.toggleAllColumns,g=e.toggleToggle,f=e.data,p=e.size,v=e.popOverContainer,b=i.__rest(e,["className","store","render","classPrefix","classnames","tooltip","align","cols","toggleAllColumns","toggleToggle","data","size","popOverContainer"]),_=b.translate,C=b.env;if(!u)return null;var h=u.filter((function(e){return s.isVisible(e.pristine||e,f)&&!1!==e.toggable})),x=h.filter((function(e){return!1!==e.toggled}));return m(a.default,i.__assign({},b,{render:l,tooltip:o||_("Table.columnsVisibility"),tooltipContainer:v||C.getModalContainer,isActived:-1!==u.findIndex((function(e){return!e.toggled})),align:null!=r?r:"right",size:p||"sm",classnames:t,classPrefix:n,key:"columns-toggable",columns:u,activeToggaleColumns:x,data:f}),(null==h?void 0:h.length)?m("li",{className:t("ColumnToggler-menuItem"),key:"selectAll",onClick:function(){c&&c((null==x?void 0:x.length)<=0)}},m(d.default,{size:"sm",classPrefix:n,key:"checkall",checked:!!(null==x?void 0:x.length),partial:!(!(null==x?void 0:x.length)||(null==x?void 0:x.length)===(null==h?void 0:h.length))},_("Select.checkAll"))):null,null==h?void 0:h.map((function(e,o){return m("li",{className:t("ColumnToggler-menuItem"),key:"item"+(e.index||o),onClick:function(){g&&g(o)}},m(d.default,{size:"sm",classPrefix:n,checked:!1!==e.toggled},e.title?l("tpl",e.title):e.label||null))})))},l=i.__decorate([s.Renderer({type:"column-toggler",name:"column-toggler"})],l)}(c.default.Component);l.ColumnTogglerRenderer=f}));
|
||
;/*!node_modules/amis/lib/renderers/Table2/index.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Table2/index",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/Icon"),o=e("node_modules/amis-ui/lib/components/Table"),i=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),d=e("node_modules/react-dom/index"),l=e("node_modules/mobx/lib/index"),c=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),u=e("node_modules/lodash/cloneDeep"),p=e("node_modules/lodash/isEqual"),m=e("node_modules/lodash/intersection"),h=e("node_modules/amis-core/lib/index"),_=e("node_modules/amis/lib/renderers/Table2/HeadCellSearchDropdown");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}e("node_modules/amis/lib/renderers/Table2/TableCell"),e("node_modules/amis/lib/renderers/Table2/ColumnToggler");var f=y(r),v=y(o),b=y(s),g=y(u),w=y(p),x=y(m),S=e("node_modules/react/index"),R=(S.default||S).createElement;(S.default||S).Fragment;var C=function(e){function t(a,n){var r=e.call(this,a)||this;r.renderedToolbars=[],r.subForms={},r.columns=[],r.reactions=[],n.registerComponent(r);var o=a.store,i=a.columnsTogglable,s=a.columns,d=a.rowSelection,c=a.keyField,u=a.primaryField,p=a.canAccessSuperData;return o.update({columnsTogglable:i,columns:s,canAccessSuperData:p,rowSelectionKeyField:u||(null==d?void 0:d.keyField)||c}),t.syncRows(o,a,void 0)&&r.syncSelected(),r.columns=r.buildColumns(o.filteredColumns,[],[]),r.rowSelection=r.buildRowSelection(),r.expandable=r.buildExpandable(),r.reactions.push(l.reaction((function(){return o.currentSelectedRowKeys.join(",")}),(function(){r.rowSelection=r.buildRowSelection(),r.forceUpdate()}))),r.reactions.push(l.reaction((function(){return o.currentExpandedKeys.join(",")}),(function(){r.expandable=r.buildExpandable(),r.forceUpdate()}))),r.reactions.push(l.reaction((function(){return o.filteredColumns}),(function(){r.columns=r.buildColumns(o.filteredColumns,[],[]),r.forceUpdate()}))),r}return i.__extends(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),this.reactions&&this.reactions.forEach((function(e){return e()}))},t.prototype.syncSelected=function(){var e=this.props,t=e.store,a=e.onSelect;a&&a(t.selectedRows.map((function(e){return e.data})),t.unSelectedRows.map((function(e){return e.data})))},t.syncRows=function(e,t,a){var n,r=t.source,o=h.getPropValue(t,(function(e){return e.items})),s=[],d=!1;if(!Array.isArray(o)||a&&h.getPropValue(a,(function(e){return e.items}))===o){if("string"==typeof r){var l=h.resolveVariableAndFilter(r,t.data,"| raw"),c=a?h.resolveVariableAndFilter(r,a.data,"| raw"):null;c&&c===l?d=!1:Array.isArray(l)&&(d=!0,s=l)}}else d=!0,s=o;d&&e.initRows(s,t.getEntryId,t.reUseRow,t.childrenColumnName);var u=[],p=e.keyField;Array.isArray(t.selected)?u=t.selected.map((function(e){return e[p]}))||[]:t.rowSelection&&t.rowSelection.selectedRowKeysExpr?s.forEach((function(e,a){var n;h.evalExpression((null===(n=t.rowSelection)||void 0===n?void 0:n.selectedRowKeysExpr)||"",{record:e,rowIndex:a})&&u.push(e[p])})):t.rowSelection&&t.rowSelection.selectedRowKeys&&(u=i.__spreadArray([],i.__read(t.rowSelection.selectedRowKeys),!1)),d&&u.length>0&&e.updateSelected(u);var m=[],_=t.primaryField||(null===(n=t.expandable)||void 0===n?void 0:n.keyField)||t.keyField;return t.expandable&&t.expandable.expandedRowKeysExpr?s.forEach((function(e,a){var n;h.evalExpression((null===(n=t.expandable)||void 0===n?void 0:n.expandedRowKeysExpr)||"",{record:e,rowIndex:a})&&m.push(e[_])})):t.expandable&&t.expandable.expandedRowKeys&&(m=i.__spreadArray([],i.__read(t.expandable.expandedRowKeys),!1)),d&&m.length>0&&e.updateExpanded(m,_),d},t.prototype.componentDidUpdate=function(e){var a,n,r,o=this.props,i=o.store;if(h.changedEffect(["orderBy","columnsTogglable","canAccessSuperData"],e,o,(function(e){e.orderBy&&!o.onQuery&&delete e.orderBy,i.update(e,{resolveDefinitions:o.resolveDefinitions})})),h.anyChanged(["source","value","items"],e,o)||!o.value&&!o.items&&(o.data!==e.data||"string"==typeof o.source&&h.isPureVariable(o.source)))t.syncRows(i,o,e)&&this.syncSelected();else if(h.isArrayChildrenModified(e.selected,o.selected)){var s=i.keyField,d=i.selectedRows.map((function(e){return e[s]})).join(",");i.updateSelected(o.selected.map((function(e){return e[s]}))||[]),d!==i.selectedRows.map((function(e){return e[s]})).join(",")&&this.syncSelected()}h.anyChanged(["columns"],e,o)&&i.update({columns:o.columns}),h.anyChanged(["rowSelection","selectable","multiple","maxKeepItemSelectionLength"],e,o)&&(this.rowSelection=this.buildRowSelection()),h.anyChanged(["query","pageField","perPageField"],e,o)&&i.updateQuery(o.query,void 0,o.pageField,o.perPageField,!0),w.default(null===(a=null==e?void 0:e.rowSelection)||void 0===a?void 0:a.keyField,null===(n=o.rowSelection)||void 0===n?void 0:n.keyField)&&w.default(e.keyField,o.keyField)||i.update({rowSelectionKeyField:o.primaryField||(null===(r=o.rowSelection)||void 0===r?void 0:r.keyField)||o.keyField})},t.prototype.getPopOverContainer=function(){return d.findDOMNode(this)},t.prototype.subFormRef=function(e,t,a){var n=this.props.quickEditFormRef;n&&n(e,t,a),this.subForms["".concat(t,"-").concat(a)]=e,e&&this.props.store.addForm(e.props.store,a)},t.prototype.reset=function(){var e=this;this.props.store.reset();var t=[];Object.keys(this.subForms).forEach((function(a){return e.subForms[a]&&t.push(e.subForms[a])})),t.forEach((function(e){return e.clearErrors()}))},t.prototype.renderCellSchema=function(e,t){var a=this.props,n=a.render;if(a.store,e&&h.isObject(e)){e.width,e.children;var r=e.title,o=i.__rest(e,["width","children","title"]);return n("cell-field",i.__assign(i.__assign({},o),{title:r||o.label,type:"cell-field",column:o,data:t.data,name:e.name}),t)}return e},t.prototype.renderSchema=function(e,t,a){var n=this.props.render;if(t&&h.isObject(t))return n(e||"field",i.__assign(i.__assign({},t),{data:null==a?void 0:a.data}),a);if(Array.isArray(t)){var r=[];return t.forEach((function(t,o){return r.push(n(e||"field",i.__assign(i.__assign({},t),{data:null==a?void 0:a.data}),i.__assign(i.__assign({},a),{key:o})))})),r}return"string"==typeof t?h.filter(t,null==a?void 0:a.data):t},t.prototype.buildColumns=function(e,t,a){var n=this,r=this.props,o=r.render,s=r.store,d=r.popOverContainer,l=(r.canAccessSuperData,r.showBadge),c=r.itemBadge,u=r.data,p=r.classnames,m=r.env,y=r.testIdBuilder,f=[];return t=t,a=a,Array.isArray(e)&&e.forEach((function(e,r){return i.__awaiter(n,void 0,void 0,(function(){var n,v,b,w,x,S,C,k,F,O,E,A=this;return i.__generator(this,(function(N){switch(N.label){case 0:return n=i.__assign({},e),v=null,b={popOverContainer:d||this.getPopOverContainer,value:e.title||e.label},h.isObject(e.title)?v=g.default(e.title):"string"!=typeof e.title&&"string"!=typeof e.label||(v={type:"plain"}),e.align&&(v.align=e.align,v.className="flex-1"),w=function(t){var a,n=A.renderCellSchema(v,b),i=null;return e.remark&&(i=o("remark",{type:"remark",tooltip:e.remark,container:A.getPopOverContainer})),R("div",{key:r,className:p("Table-head-cell-wrapper",(a={},a["".concat(e.className)]=!!e.className,a["".concat(e.titleClassName)]=!!e.titleClassName,a)),style:{justifyContent:{right:"flex-end",center:"center"}[e.align]||"flex-start"}},n,i,t)},Object.assign(n,{title:w}),x=!!(null===(E=e.children)||void 0===E?void 0:E.length),e.canAccessSuperData,e.type&&Object.assign(n,{render:function(n,o,u,p,m){var _=s.getRowByIndex(u,i.__spreadArray([],i.__read(m||[]),!1))||{},f=null==y?void 0:y.getChild("row-".concat(u,"-cell-").concat(p)),v={children:A.renderCellSchema(e,{data:_.locals,btnDisabled:s.dragging,popOverContainer:d||A.getPopOverContainer,quickEditFormRef:A.subFormRef,onQuickChange:function(e,t,a,n){A.handleQuickChange(_,e,t,a,n)},row:_,showBadge:l&&0===r,itemBadge:c,testIdBuilder:f}),props:{}};if(!x&&e.rowSpanExpr){var b=+h.filter(e.rowSpanExpr,{record:o,rowIndex:u,colIndex:p});b&&(v.props.rowSpan=b,t.push({colIndex:p,rowIndex:u,rowSpan:b}))}if(!x&&e.colSpanExpr){var g=+h.filter(e.colSpanExpr,{record:o,rowIndex:u,colIndex:p});g&&(v.props.colSpan=g,a.push({colIndex:p,rowIndex:u,colSpan:g}))}return t.forEach((function(e){p===e.colIndex&&u>e.rowIndex&&u<e.rowIndex+(e.rowSpan||0)&&(v.props.rowSpan=0)})),a.forEach((function(e){u===e.rowIndex&&p>e.colIndex&&p<e.colIndex+(e.colSpan||0)&&(v.props.colSpan=0)})),v}}),e.searchable&&(n.filterDropdown=R(_.default,i.__assign({},this.props,{popOverContainer:this.getPopOverContainer,name:e.name,searchable:e.searchable,onSearch:this.handleSearch,key:"th-search-"+r,testIdBuilder:null==y?void 0:y.getChild("head-search-".concat(r))}))),e.sortable&&(n.sorter=!0),e.filterable?e.filterable.options?(n.filters=e.filterable.options.map((function(e){return"string"==typeof e?{text:e,value:e}:{text:e.label,value:e.value}})),[3,4]):[3,1]:[3,4];case 1:return e.filterable.source?(S=e.filterable.source,h.isPureVariable(S)?(C=h.resolveVariableAndFilter(S,u,"| raw"),n.filters=C,[3,4]):[3,2]):[3,4];case 2:return h.isEffectiveApi(S,u)?((k=h.normalizeApi(S)).cache=3e3,[4,m.fetcher(k,u)]):[3,4];case 3:F=N.sent(),O=F.data&&F.data.options||[],n.filters=O,N.label=4;case 4:return x&&(n.children=this.buildColumns(e.children,t,a)),f.push(n),[2]}}))}))})),f},t.prototype.buildSummary=function(e,t){var a=this,n=[];return Array.isArray(t)&&t.forEach((function(t,r){h.isObject(t)?n.push({colSpan:t.colSpan,fixed:t.fixed,cellClassName:t.cellClassName,render:function(n){return a.renderSchema(e,t,{data:n})}}):Array.isArray(t)&&(n[r]||n.push([]),t.forEach((function(t){n[r].push({colSpan:t.colSpan,fixed:t.fixed,cellClassName:t.cellClassName,render:function(n){return a.renderSchema(e,t,{data:n})}})})))})),n.length?n:null},t.prototype.rowClassName=function(e,t){var a=this.props,n=a.rowClassNameExpr,r=a.store,o=a.themeCss,s=a.id,d=a.rowClassName,l=[];d&&l.push(d),n&&l.push(h.filter(n,{record:e,rowIndex:t}));var c=r.getRowByIndex(t);return(null==c?void 0:c.modified)&&l.push("is-modified"),(null==c?void 0:c.moved)&&l.push("is-moved"),l.push(h.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"tableRowClassname",id:s,themeCss:o}))),l.join(" ")},t.prototype.buildRowSelection=function(){var e=this,t=this.props,a=t.selectable,n=t.multiple,r=t.maxKeepItemSelectionLength,o=t.rowSelection,s=t.store,d=null;if(a)d={type:!1===n?"radio":"",selectedRowKeys:s.currentSelectedRowKeys,maxSelectedLength:r};else if(o){o.selectedRowKeys;var l=o.selections,c=i.__rest(o,["selectedRowKeys","selections"]);(d=i.__assign({selectedRowKeys:s.currentSelectedRowKeys,maxSelectedLength:r},c)).getCheckboxProps=function(t,a){var n=e.props,r=n.rowSelection,o=n.maxKeepItemSelectionLength,i=n.store,s=null==r?void 0:r.disableOn;return{disabled:!!s&&h.evalExpression(s,{record:t,rowIndex:a})||o&&i.currentSelectedRowKeys.length>=o&&!i.currentSelectedRowKeys.includes(t[i.keyField])}},o.disableOn&&delete d.disableOn,l&&Array.isArray(l)&&(d.selections=[],l.forEach((function(e){d.selections.push({key:e.key,text:e.text,onSelect:function(t){var a;a=t.filter((function(t,a){return"all"===e.key||"none"!==e.key&&("invert"===e.key?!s.currentSelectedRowKeys.includes(t):"odd"===e.key?a%2==0:"even"!==e.key||a%2!=0)})),s.updateSelected(a)}})})))}return d},t.prototype.expandedRowClassName=function(e,t){var a=this.props.expandable;return h.filter(null==a?void 0:a.expandedRowClassNameExpr,{record:e,rowIndex:t})},t.prototype.expandedRowRender=function(e,t){var a=this.props.expandable;return this.renderSchema("expandableBody",i.__assign({},a),{data:i.__assign(i.__assign(i.__assign({},this.props.data),e),{rowIndex:t})})},t.prototype.rowExpandable=function(e,t,a){var n=this.props.expandable;return!!(null==n?void 0:n.expandableOn)&&h.evalExpression(n.expandableOn,{record:e,rowIndex:t})},t.prototype.buildExpandable=function(){var e=this.props,t=e.expandable,a=e.store,n=null;if(t){t.expandedRowKeys;var r=i.__rest(t,["expandedRowKeys"]);n=i.__assign({expandedRowKeys:a.currentExpandedKeys},r),t.expandableOn&&(n.rowExpandable=this.rowExpandable,delete n.expandableOn),t&&t.type&&(n.expandedRowRender=this.expandedRowRender),t.expandedRowClassNameExpr&&(n.expandedRowClassName=this.expandedRowClassName,delete n.expandedRowClassNameExpr)}return n},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.handleSave=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,a,n,r,o,s,d,l,c,u=this;return i.__generator(this,(function(i){switch(i.label){case 0:return e=this.props,t=e.store,a=e.onSave,n=e.primaryField,r=e.keyField,t.modifiedRows.length?(o=[],Object.keys(this.subForms).forEach((function(e){return u.subForms[e]&&o.push(u.subForms[e])})),o.length?[4,Promise.all(o.map((function(e){return e.validate()})))]:[3,2]):[2];case 1:if(~i.sent().indexOf(!1))return[2];i.label=2;case 2:return s=t.modifiedRows.map((function(e){return e.data})),d=t.modifiedRows.map((function(e){return e.path})),l=t.modifiedRows.map((function(e){return h.difference(e.data,e.pristine,[r,n])})),c=t.rows.filter((function(e){return!e.modified})).map((function(e){return e.data})),a?(a(s,l,d,c,t.modifiedRows.map((function(e){return e.pristine}))),[2]):(this.handleQuickSave(s,l,d,c,t.modifiedRows.map((function(e){return e.pristine}))),[2])}}))}))},t.prototype.handleQuickSave=function(e,t,a,n,r,o){var i=this,s=this.props,d=s.store,l=s.quickSaveApi,c=s.quickSaveItemApi,u=s.primaryField,p=s.keyField,m=s.env,_=s.messages,y=s.reload,f=s.dispatchEvent;if(Array.isArray(e)){if(!h.isEffectiveApi(l))return void(m&&m.alert("Table2 quickSaveApi is required"));var v=u||p,b=h.createObject(d.data,{rows:e,rowsDiff:t,indexes:a,rowsOrigin:r});e.length&&e[0].hasOwnProperty(v)&&(b.ids=e.map((function(e){return e[v]})).join(",")),n&&(b.unModifiedItems=n),d.saveRemote(l,b,{successMessage:_&&_.saveFailed,errorMessage:_&&_.saveSuccess}).then((function(){f("quickSaveSubmitted",b),y&&i.reloadTarget(h.filterTarget(y,b),b)})).catch((function(){}))}else{if(!h.isEffectiveApi(c))return void(m&&m.alert("Table2 quickSaveItemApi is required!"));var g=h.createObject(d.data,{item:e,modified:t,origin:r}),w=h.createObject(g,e);d.saveRemote(c,w).then((function(){f("quickSaveSubmitted",w),y&&i.reloadTarget(h.filterTarget(y,g),g)})).catch((function(){(null==o?void 0:o.resetOnFailed)&&i.reset()}))}},t.prototype.handleQuickChange=function(e,t,a,n,r){if(c.isAlive(e)){var o=this.props,i=o.onSave,s=o.onPristineChange,d=o.saveImmediately,l=o.primaryField,u=o.keyField,p=o.quickSaveItemApi;e.change(t,n),e.modified&&this.syncSelected(),n?null==s||s(e.data,e.path):(a||d)&&(a&&a.api?this.props.onAction&&this.props.onAction(null,{actionType:"ajax",api:a.api,reload:null==r?void 0:r.reload},e.locals):i?i(e.data,h.difference(e.data,e.pristine,[u,l]),e.path,void 0,e.pristine,r):this.handleQuickSave(p?e.data:[e.data],h.difference(e.data,e.pristine,[u,l]),[e.path],void 0,e.pristine,r))}},t.prototype.handleAction=function(e,t,a){var n=this.props.onAction;n&&n(e,t,a)},t.prototype.renderActions=function(e){var t=this,a=this.props,n=a.actions,r=a.render,o=a.store,s=a.classnames,d=a.data,l=a.columnsTogglable,c=a.dispatchEvent;n=Array.isArray(n)?n.concat():[];var u=h.isObject(l)?l:{align:"left"};return o.toggable&&"header"===e&&!~this.renderedToolbars.indexOf("columns-toggler")&&n.push({type:"button",children:r("column-toggler",i.__assign(i.__assign({},u),{type:"column-toggler"}),{cols:o.columnsData,toggleAllColumns:function(){o.toggleAllColumns(),c("columnToggled",h.createObject(d,{columns:o.columnsData.filter((function(e){return e.toggled}))}))},toggleToggle:function(e){o.columnsData[e].toggleToggle(),c("columnToggled",h.createObject(d,{columns:o.columnsData.filter((function(e){return e.toggled}))}))}})}),Array.isArray(n)&&n.length?R("div",{className:s("Table-toolbar")},n.map((function(e,a){return r("action/".concat(a),i.__assign({type:"button"},e),{onAction:t.handleAction,key:a,btnDisabled:o.dragging,data:o.getData(d)})}))):null},t.prototype.handleSelected=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,s,d;return i.__generator(this,(function(i){switch(i.label){case 0:return n=this.props,r=n.dispatchEvent,o=n.data,s=n.store,[4,r("selectedChange",h.createObject(o,{selectedItems:e,unSelectedItems:a}))];case 1:return(null==(d=i.sent())?void 0:d.prevented)?[2,null==d?void 0:d.prevented]:(s.updateSelected(t),this.syncSelected(),[2])}}))}))},t.prototype.handleSort=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,a,n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,a=t.dispatchEvent,n=t.data,r=t.onSort,[4,a("columnSort",h.createObject(n,{orderBy:e.orderBy,orderDir:e.orderDir}))];case 1:return(null==(o=i.sent())?void 0:o.prevented)?[2,null==o?void 0:o.prevented]:(r&&r(e),[2])}}))}))},t.prototype.handleFilter=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,a,n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:return t=this.props,a=t.dispatchEvent,n=t.data,r=t.onSearch,[4,a("columnFilter",h.createObject(n,e))];case 1:return(null==(o=i.sent())?void 0:o.prevented)?[2,null==o?void 0:o.prevented]:(r&&r(e),[2])}}))}))},t.prototype.handleSearch=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var a,n,r,o,s,d,l;return i.__generator(this,(function(i){switch(i.label){case 0:return a=this.props,n=a.data,r=a.dispatchEvent,o=a.store,s=a.onSearch,[4,r("columnSearch",h.createObject(n,{searchName:e,searchValue:t}))];case 1:return(null==(d=i.sent())?void 0:d.prevented)||(o.updateQuery(t),s&&s(((l={})[e]=t[e],l))),[2]}}))}))},t.prototype.handleRowClick=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,s,d;return i.__generator(this,(function(i){switch(i.label){case 0:return n=this.props,r=n.dispatchEvent,o=n.data,s=n.onRow,[4,r("rowClick",h.createObject(o,{item:t,index:a}))];case 1:return(null==(d=i.sent())?void 0:d.prevented)||t&&s&&s.onRowClick&&s.onRowClick(e,t,a),[2]}}))}))},t.prototype.handleRowDbClick=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,s,d;return i.__generator(this,(function(i){switch(i.label){case 0:return n=this.props,r=n.dispatchEvent,o=n.data,s=n.onRow,[4,r("rowDbClick",h.createObject(o,{item:t,index:a}))];case 1:return(null==(d=i.sent())?void 0:d.prevented)?[2,!1]:(t&&s&&s.onRowDbClick&&s.onRowDbClick(e,t,a),[2,!0])}}))}))},t.prototype.handleRowMouseEnter=function(e,t,a){var n;return i.__awaiter(this,void 0,void 0,(function(){var r,o,s,d,l;return i.__generator(this,(function(i){switch(i.label){case 0:return null===(n=null==e?void 0:e.persist)||void 0===n||n.call(e),r=this.props,o=r.dispatchEvent,s=r.data,d=r.onRow,[4,o("rowMouseEnter",h.createObject(s,{item:t,index:a}))];case 1:return(null==(l=i.sent())?void 0:l.prevented)||t&&d&&d.onRowMouseEnter&&d.onRowMouseEnter(e,t,a),[2]}}))}))},t.prototype.handleRowMouseLeave=function(e,t,a){var n;return i.__awaiter(this,void 0,void 0,(function(){var r,o,s,d,l;return i.__generator(this,(function(i){switch(i.label){case 0:return null===(n=null==e?void 0:e.persist)||void 0===n||n.call(e),r=this.props,o=r.dispatchEvent,s=r.data,d=r.onRow,[4,o("rowMouseLeave",h.createObject(s,{item:t,index:a}))];case 1:return(null==(l=i.sent())?void 0:l.prevented)||t&&d&&d.onRowMouseLeave&&d.onRowMouseLeave(e,t,a),[2]}}))}))},t.prototype.handleOrderChange=function(e,t,a){return i.__awaiter(this,void 0,void 0,(function(){var n,r;return i.__generator(this,(function(o){return n=this.props.store,r=n.getRowByIndex(e,a),n.exchange(e,t,r),[2]}))}))},t.prototype.handleSaveOrder=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,a,n,r,o,s,d;return i.__generator(this,(function(i){switch(i.label){case 0:return e=this.props,t=e.store,a=e.onSaveOrder,n=e.data,r=e.dispatchEvent,o=t.movedRows.map((function(e){return e.data})),s=t.rows.map((function(e){return e.getDataWithModifiedChilden()})),[4,r("orderChange",h.createObject(n,{movedItems:o}))];case 1:return(null==(d=i.sent())?void 0:d.prevented)?[2]:a&&t.movedRows.length?(a(o,s),[2]):[2]}}))}))},t.prototype.doAction=function(e,t,a,n){var r=this,o=this.props,i=o.store,s=o.data,d=o.keyField,l=o.expandable,c=o.primaryField,u=null==e?void 0:e.actionType,p=i.keyField,m=i.getData(s).items||[];switch(u){case"selectAll":i.updateSelectedAll();break;case"clearAll":i.updateSelected([]);break;case"select":var _=[];m.forEach((function(e,t){h.evalExpression((null==n?void 0:n.selected)||(null==n?void 0:n.selectedRowKeysExpr),{record:e,rowIndex:t})&&_.push(e[p])})),i.updateSelected(_);break;case"expand":var y=c||(null==l?void 0:l.keyField)||d,f=[],v=[];if(null==n?void 0:n.value){var b=m.findIndex((function(e){return e[y]===n.value})),g=m[b];this.tableRef&&this.tableRef.isExpandableRow(g,b)&&(this.tableRef.isExpanded(g)?v.push(g):f.push(g))}else(null==n?void 0:n.expandedRowsExpr)&&m.forEach((function(e,t){h.evalExpression(null==n?void 0:n.expandedRowsExpr,{record:e,rowIndex:t})&&r.tableRef&&r.tableRef.isExpandableRow(e,t)&&(r.tableRef.isExpanded(e)?v.push(e):f.push(e))}));f.length>0&&this.tableRef&&this.tableRef.onExpandRows(f),v.length>0&&this.tableRef&&this.tableRef.onCollapseRows(v);break;default:this.handleAction(void 0,e,s)}},t.prototype.getRef=function(e){this.tableRef=e},t.prototype.renderTable=function(){var e=this.props,t=e.render,a=e.title,n=e.footer;e.rowSelection,e.selectable,e.multiple,e.columns,e.expandable;var r=e.footSummary,o=e.headSummary,s=e.loading,d=e.classnames,l=e.placeholder;e.rowClassNameExpr;var c=e.itemActions,u=e.keyField,p=e.primaryField;e.maxKeepItemSelectionLength;var m=e.onRow,_=e.store,y=e.id,f=e.themeCss,b=i.__rest(e,["render","title","footer","rowSelection","selectable","multiple","columns","expandable","footSummary","headSummary","loading","classnames","placeholder","rowClassNameExpr","itemActions","keyField","primaryField","maxKeepItemSelectionLength","onRow","store","id","themeCss"]),g=void 0;if(c){var w=Array.isArray(c)?c.filter((function(e){return!e.hiddenOnHover})):[];if(!w.length)return null;g=function(e,a){return R("div",{className:d("Table-itemActions")},w.map((function(n,r){return t("itemAction/".concat(r),i.__assign(i.__assign({},n),{isMenuItem:!0}),{key:r,item:e,data:e,rowIndex:a})})))}}var x={data:this.props.data};return R(v.default,i.__assign({},b,{headerClassName:h.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"tableHeadClassname",id:y,themeCss:f})),bodyClassname:h.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"tableBodyClassname",id:y,themeCss:f})),onRef:this.getRef,title:this.renderSchema("title",a,x),footer:this.renderSchema("footer",n,x),columns:this.columns,dataSource:_.dataSource,rowSelection:this.rowSelection,rowClassName:this.rowClassName,expandable:this.expandable,footSummary:this.buildSummary("footSummary",r),headSummary:this.buildSummary("headSummary",o),loading:this.renderSchema("loading",s,x),placeholder:this.renderSchema("placeholder",l,x),onSelect:this.handleSelected,onSelectAll:this.handleSelected,onSort:this.handleSort,onFilter:this.handleFilter,onDrag:this.handleOrderChange,itemActions:g,keyField:p||u,onRow:i.__assign(i.__assign({},m),{onRowClick:this.handleRowClick,onRowDbClick:this.handleRowDbClick,onRowMouseEnter:this.handleRowMouseEnter,onRowMouseLeave:this.handleRowMouseLeave})}))},t.prototype.renderHeading=function(){var e=this.props,t=e.store,a=e.hideQuickSaveBtn,n=e.classnames,r=e.headingClassName,o=e.saveImmediately,i=e.quickSaveApi,s=e.translate,d=e.columns,l=!1;if(1===t.modifiedRows.length){var c=(null==d?void 0:d.map((function(e){var t;return(null===(t=null==e?void 0:e.quickEdit)||void 0===t?void 0:t.saveImmediately)?null==e?void 0:e.name:""})).filter((function(e){return e})))||[],u=t.modifiedRows[0],p=h.difference(u.data,u.pristine);x.default(c,Object.keys(p)).length&&(l=!0)}return i&&!o&&!l&&t.modified&&!a||t.moved?R("div",{className:n("Table-heading",r),key:"heading"},o||!t.modified||a||l?t.moved?R("span",null,s("Table.moved",{moved:t.moved}),R("button",{type:"button",className:n("Button Button--size-xs Button--success m-l-sm"),onClick:this.handleSaveOrder},R(f.default,{icon:"check",className:"icon m-r-xs"}),s("Form.submit")),R("button",{type:"button",className:n("Button Button--size-xs Button--danger m-l-sm"),onClick:this.reset},R(f.default,{icon:"close",className:"icon m-r-xs"}),s("Table.discard"))):"":R("span",null,s("Table.modified",{modified:t.modified}),R("button",{type:"button",className:n("Button Button--size-xs Button--success m-l-sm"),onClick:this.handleSave},R(f.default,{icon:"check",className:"icon m-r-xs"}),s("Form.submit")),R("button",{type:"button",className:n("Button Button--size-xs Button--danger m-l-sm"),onClick:this.reset},R(f.default,{icon:"close",className:"icon m-r-xs"}),s("Table.discard")))):null},t.prototype.render=function(){var e=this.props,t=e.classnames,a=e.style,n=e.store,r=e.themeCss,o=e.wrapperCustomStyle,s=e.id,d=e.env;this.renderedToolbars=[];var l=this.renderHeading();return R("div",{className:t("Table-render-wrapper",h.setThemeClassName(i.__assign(i.__assign({},this.props),{name:"wrapperCustomStyle",id:s,themeCss:o})),{"Table--unsaved":!!n.modified||!!n.moved}),style:a},this.renderActions("header"),l,this.renderTable(),R(h.CustomStyle,i.__assign({},this.props,{config:{themeCss:r,classNames:[{key:"tableHeadClassname",weights:{default:{inner:".".concat(t("Table-table")," > thead > tr > th"),important:!0}}},{key:"tableHeadClassname",weights:{default:{inner:"> tr > th",important:!0}}},{key:"tableBodyClassname",weights:{default:{inner:"> tbody.".concat(t("Table-tbody")," > tr td")},hover:{suf:"> tbody > tr",inner:"td",important:!0}}},{key:"tableRowClassname",weights:{default:{parent:".".concat(t("Table-table")," > tbody.").concat(t("Table-tbody")),inner:"td.".concat(t("Table-cell"))},hover:{parent:".".concat(t("Table-table")," > tbody.").concat(t("Table-tbody")),inner:"td.".concat(t("Table-cell"))}}}],wrapperCustomStyle:o,id:s},env:d})))},t.contextType=h.ScopedContext,t.propsList=["source","columnsTogglable","columns","items","rowSelection","expandable","sticky","itemBadge","popOverContainer","keyField","childrenColumnName","rowClassNameExpr","lineHeight","bordered","footer","maxKeepItemSelectionLength","keepItemSelectionOnPageChange","itemActions","headingClassName","footSummary","headSummary","saveImmediately","selectable","multiple","primaryField","hideQuickSaveBtn","selected","placeholder","autoFillHeight"],t.defaultProps={keyField:"id",canAccessSuperData:!1,lazyRenderAfter:100},i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"getPopOverContainer",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Number,Number]),i.__metadata("design:returntype",void 0)],t.prototype,"subFormRef",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"reset",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Number]),i.__metadata("design:returntype",void 0)],t.prototype,"rowClassName",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Number]),i.__metadata("design:returntype",void 0)],t.prototype,"expandedRowClassName",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Number]),i.__metadata("design:returntype",void 0)],t.prototype,"expandedRowRender",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Number,Array]),i.__metadata("design:returntype",void 0)],t.prototype,"rowExpandable",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],t.prototype,"handleSave",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Array,Array,Object,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleQuickSave",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Object,Boolean,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleQuickChange",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleAction",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Array,Array,Array]),i.__metadata("design:returntype",Promise)],t.prototype,"handleSelected",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Promise)],t.prototype,"handleSort",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Promise)],t.prototype,"handleFilter",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String,Object]),i.__metadata("design:returntype",Promise)],t.prototype,"handleSearch",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Number]),i.__metadata("design:returntype",Promise)],t.prototype,"handleRowClick",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Number]),i.__metadata("design:returntype",Promise)],t.prototype,"handleRowDbClick",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Number]),i.__metadata("design:returntype",Promise)],t.prototype,"handleRowMouseEnter",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object,Object,Number]),i.__metadata("design:returntype",Promise)],t.prototype,"handleRowMouseLeave",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Number,Number,Array]),i.__metadata("design:returntype",Promise)],t.prototype,"handleOrderChange",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],t.prototype,"handleSaveOrder",null),i.__decorate([h.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"getRef",null),t}(b.default.Component),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.receive=function(e,t){var a,n,r,o=this.context;return(null===(a=this.props)||void 0===a?void 0:a.host)?null===(r=(n=this.props.host).receive)||void 0===r?void 0:r.call(n,e,t):t?o.send(t,e):void 0},t.prototype.reload=function(e,t,a){var n,r,o,i,s=this.context;return null===(n=null==s?void 0:s.parent)||void 0===n||n.getComponents(),(null===(r=this.props)||void 0===r?void 0:r.host)?null===(i=(o=this.props.host).reload)||void 0===i?void 0:i.call(o,e,t,a):e?s.reload(e,a):void 0},t.prototype.setData=function(e,t,a,n){var r;return i.__awaiter(this,void 0,void 0,(function(){var o,s,d,l,c,u,p;return i.__generator(this,(function(m){switch(m.label){case 0:return o=this.props.store,s=o.data.rows.length,void 0===a?[3,1]:(d=i.__spreadArray([],i.__read(o.data.rows),!1),String(a).split(",").forEach((function(t){var a=Number(t);d.splice(a,1,e)})),[2,o.updateData({rows:d},void 0,t)]);case 1:if(void 0===n)return[3,6];l=i.__spreadArray([],i.__read(o.data.rows),!1),c=0,m.label=2;case 2:return c<s?(u=l[c],[4,h.evalExpressionWithConditionBuilderAsync(n,u)]):[3,5];case 3:m.sent()&&l.splice(c,1,e),m.label=4;case 4:return c++,[3,2];case 5:return[2,o.updateData({rows:l},void 0,t)];case 6:return p=i.__assign(i.__assign({},e),{rows:null!==(r=e.rows)&&void 0!==r?r:e.items}),[2,o.updateData(p,void 0,t)]}}))}))},t.prototype.getData=function(){var e=this.props,t=e.store,a=e.data;return t.getData(a)},t=i.__decorate([h.Renderer({type:"table2",storeType:h.TableStore2.name,name:"table2",isolateScope:!0})],t)}(C);t.TableRenderer=k,t.default=C}));
|
||
;/*!node_modules/amis/lib/renderers/Words.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Words",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/amis-ui/lib/components/Tag"),s=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(a),u=l(i),p=e("node_modules/react/index"),c=(p.default||p).createElement;(p.default||p).Fragment;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpend:!1},t}return s.__extends(t,e),t.prototype.toggleExpend=function(){this.setState({isExpend:!this.state.isExpend})},t.prototype.getLimit=function(e){var t=this.props.limit;return null!=t?t:Array.isArray(e)?10:200},t.prototype.renderContent=function(e){var t=this.props,n=t.delimiter,r=t.inTag,a=t.classnames;if(!Array.isArray(e))return e;if(!r){var l=e.length-1;return e.map((function(e,t){return c(i.Fragment,{key:t},o.labelToString(e),t===l?"":n||", ")}))}return e.map((function(e,t){return c(d.default,s.__assign({key:t,label:e,className:"mb-1"},"object"==typeof r?s.__assign(s.__assign({},r),{className:a(r.className)}):void 0))}))},t.prototype.renderAll=function(e,t){void 0===t&&(t=!1);var n=this.props,r=n.collapseButtonText,a=void 0===r?"收起":r,i=n.collapseButton,o=n.render;return c(u.default.Fragment,null,this.renderContent(e),t?o("collapseBtn",{type:"button",level:"link",className:"ml-1 v-baseline"},s.__assign(s.__assign({onClick:this.toggleExpend},i),{label:a})):null)},t.prototype.renderPart=function(e){var t=this.props,n=t.expendButtonText,r=void 0===n?"展开":n,a=t.expendButton,i=t.render,o=this.getLimit(e),l=Array.isArray(e)?e.slice(0,o):e.toString().slice(0,o);return c(u.default.Fragment,null,this.renderContent(l)," ...",i("collapseBtn",{type:"button",level:"link",className:"ml-1 v-baseline"},s.__assign(s.__assign({onClick:this.toggleExpend},a),{label:r})))},t.prototype.getWords=function(){var e,t=this,n=this.props,r=n.selectedOptions,a=void 0===r?[]:r,s=n.words,i=n.data;return"string"==typeof s&&(e=o.resolveVariableAndFilter(s,i,"| raw")),e||((null==a?void 0:a.length)>0?a.map((function(e,n){return function(e,t,n){var r=n.type,a=n.labelField,s=void 0===a?"label":a,i=n.options,l=void 0===i?[]:i,d=n.enableNodePath,u=n.hideNodePathLabel,p=n.pathSeparator,c=void 0===p?"/":p;if(d||"nested-select"===r&&!u){var g=o.getTreeAncestors(l,e,!0);return"".concat(g?g.map((function(e){return"".concat(e[s||"label"])})).join(" ".concat(c," ")):e[s||"label"])}return o.labelToString(e[s])||"选项".concat(t)}(e,n,t.props)})):null)},t.prototype.render=function(){var e=this.props,t=e.classnames,n=e.className,r=e.style,a=this.getWords();if(!a)return null;var s,i=this.getLimit(a);return s=!i||Array.isArray(a)&&a.length<=i||!Array.isArray(a)&&a.toString().length<=i?this.renderAll(a):this.state.isExpend?this.renderAll(a,!0):this.renderPart(a),c("div",{className:t("Words-field",n),style:r},s)},t.defaultProps={inTag:!1},s.__decorate([o.autobind,s.__metadata("design:type",Function),s.__metadata("design:paramtypes",[]),s.__metadata("design:returntype",void 0)],t.prototype,"toggleExpend",null),t}(u.default.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t=s.__decorate([o.Renderer({type:"words"})],t)}(g),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.defaultProps={inTag:!0},t=s.__decorate([o.Renderer({type:"tags"})],t)}(g);t.TagsRenderer=f,t.WordsField=g,t.WordsRenderer=m}));
|
||
;/*!node_modules/amis/lib/renderers/Password.js*/
|
||
amis.define("node_modules/amis/lib/renderers/Password",(function(e,t,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/amis-ui/lib/components/Icon"),a=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),l=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=d(n),u=d(o),c=e("node_modules/react/index"),m=(c.default||c).createElement;(c.default||c).Fragment;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={visible:!1},t}return a.__extends(t,e),t.prototype.toggleVisible=function(){this.setState({visible:!this.state.visible})},t.prototype.render=function(){var e=this.props,t=e.classnames,i=e.className,s=e.style,n=e.mosaicText,a=void 0===n?"********":n,o=e.value;return m("span",{className:t("Password-field",i),style:s},this.state.visible?o:a,this.state.visible?m(r.default,{icon:"view",className:"icon",onClick:this.toggleVisible}):m(r.default,{icon:"invisible",className:"icon",onClick:this.toggleVisible}))},a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"toggleVisible",null),t}(u.default.Component),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([l.Renderer({type:"password"})],t)}(p);t.PasswordField=p,t.PasswordFieldRenderer=_}));
|
||
;/*!node_modules/amis/lib/renderers/DateRange.js*/
|
||
amis.define("node_modules/amis/lib/renderers/DateRange",(function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),o=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(o),s=e("node_modules/react/index"),u=(s.default||s).createElement;(s.default||s).Fragment;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.delimiter,n=void 0===t?",":t,a=e.connector,o=void 0===a?"~":a,l=e.value,d=e.valueFormat,s=e.format,m=void 0===s?"YYYY-MM-DD":s,c=e.displayFormat,f=e.classnames,p=e.className,v=e.style;if(!l)return null;"string"==typeof l&&(l=l.split(n));var _=r.__read(l,2),D=_[0],y=void 0===D?"":D,Y=_[1],g=void 0===Y?"":Y;return d?(y=i.normalizeDate(y,d),g=i.normalizeDate(g,d)):(y=i.normalizeDate(1e3*y),g=i.normalizeDate(1e3*g)),y=(null==y?void 0:y.isValid())?y.format(c||m):"",g=(null==g?void 0:g.isValid())?g.format(c||m):"",u("span",{className:f("DateRangeField",p),style:v},[y,g].join(" ".concat(o," ")))},t.defaultProps={format:"YYYY-MM-DD",valueFormat:"X",connector:"~"},t}(d.default.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([i.Renderer({type:"date-range"})],t)}(m);t.DateRangeField=m,t.DateRangeFieldRenderer=c}));
|
||
;/*!node_modules/amis/lib/renderers/MultilineText.js*/
|
||
amis.define("node_modules/amis/lib/renderers/MultilineText",(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/amis-ui/lib/components/MultilineText"),l=e("node_modules/tslib/tslib"),u=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=d(r),a=d(u),f=e("node_modules/react/index"),c=(f.default||f).createElement;(f.default||f).Fragment;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.render=function(){var e=o.getPropValue(this.props,(function(e){return e.text?o.filter(e.text,e.data,"| raw"):void 0}));return c(s.default,l.__assign({},this.props,{text:e}))},t}(a.default.Component),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t=l.__decorate([o.Renderer({type:"multiline-text"})],t)}(p);t.MultilineTextField=p,t.MultilineTextFieldRenderer=_}));
|
||
;/*!node_modules/amis/lib/renderers/OfficeViewer.js*/
|
||
amis.define("node_modules/amis/lib/renderers/OfficeViewer",(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/amis-ui/lib/components/Spinner"),o=e("node_modules/tslib/tslib"),s=e("node_modules/react/index"),a=e("node_modules/amis-core/lib/index");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(i),c=l(s),u=e("node_modules/react/index"),f=(u.default||u).createElement;(u.default||u).Fragment;var p=function(t){function n(e){var n=t.call(this,e)||this;return n.rootElement=c.default.createRef(),n.state={loading:!1},n}return o.__extends(n,t),n.prototype.componentDidMount=function(){var e;(null===(e=this.rootElement)||void 0===e?void 0:e.current)&&this.renderWord()},n.prototype.componentDidUpdate=function(e){var t,n,r=this;if(!this.state.loading){var i=this.props;a.isApiOutdated(e.src,i.src,e.data,i.data)&&this.fetchWord().then((function(){r.renderWord()})),i.name&&e.data[i.name]!==i.data[i.name]&&this.renderWord(),JSON.stringify(e.wordOptions)===JSON.stringify(i.wordOptions)&&e.display===i.display||this.renderWord(),(null===(t=i.wordOptions)||void 0===t?void 0:t.enableVar)&&(i.trackExpression&&a.filter(i.trackExpression,i.data)!==a.filter(e.trackExpression,e.data)?this.renderWord():null===(n=this.office)||void 0===n||n.updateVariable())}},n.prototype.doAction=function(e,t,n,r){var i,o,s=null==e?void 0:e.actionType;"saveAs"===s&&(null===(i=this.office)||void 0===i||i.download((null==r?void 0:r.name)||this.fileName)),"print"===s&&(null===(o=this.office)||void 0===o||o.print())},n.prototype.evalVar=function(e,t){var n=this.props.data;return a.resolveVariableAndFilter("${"+e+"}",a.createObject(t,n),"| raw")},n.prototype.renderWord=function(){return o.__awaiter(this,void 0,void 0,(function(){var e,t,n;return o.__generator(this,(function(r){switch(r.label){case 0:return e=this.props,t=e.src,n=e.name,t?this.document?[3,2]:[4,this.fetchWord()]:[3,4];case 1:r.sent(),r.label=2;case 2:return[4,this.renderRemoteWord()];case 3:return r.sent(),[3,5];case 4:n&&this.renderFormFile(),r.label=5;case 5:return[2]}}))}))},n.prototype.fetchWord=function(){var e;return o.__awaiter(this,void 0,void 0,(function(){var t,n,r,i,s,l,d,c;return o.__generator(this,(function(o){switch(o.label){case 0:if(t=this.props,n=t.env,r=t.src,i=t.data,s=t.translate,"string"==typeof(d=r?a.resolveVariableAndFilter(r,i,"| raw"):void 0)?(l=d,this.fileName=l.split("/").pop()):"object"==typeof d&&"string"==typeof d.value&&(l=d.value,this.fileName=d.name||l.split("/").pop()),!l)return console.warn("file src is empty"),[2];this.finalSrc=l,this.setState({loading:!0}),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,n.fetcher(l,i,{responseType:"arraybuffer"})];case 2:return c=o.sent(),this.document=c.data,[3,5];case 3:return o.sent(),(null===(e=this.rootElement)||void 0===e?void 0:e.current)&&(this.rootElement.current.innerHTML=s("loadingFailed")+" url:"+l),[3,5];case 4:return this.setState({loading:!1}),[7];case 5:return[2]}}))}))},n.prototype.initOffice=function(e,t){return o.__awaiter(this,void 0,void 0,(function(){var n,r,i,s,a;return o.__generator(this,(function(l){switch(l.label){case 0:return n=this.props,r=n.wordOptions,i=n.excelOptions,n.env,n.src,s=n.data,n.translate,[4,(0,e.createOfficeViewer)(t||this.document,{},this.finalSrc)];case 1:return(a=l.sent())instanceof e.Word?(a.updateOptions(o.__assign(o.__assign({},r),{data:s,evalVar:this.evalVar.bind(this)})),[3,4]):[3,2];case 2:return a instanceof e.Excel?(a.updateOptions(o.__assign(o.__assign({},i),{data:s,evalVar:this.evalVar.bind(this)})),[4,a.loadExcel()]):[3,4];case 3:l.sent(),l.label=4;case 4:return[2,a]}}))}))},n.prototype.renderRemoteWord=function(){return o.__awaiter(this,void 0,void 0,(function(){var t,n,r=this;return o.__generator(this,(function(i){return(t=this.props).wordOptions,t.excelOptions,t.env,t.src,t.data,n=t.display,t.translate,this.document?(Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/office-viewer/lib/index","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))})).then((function(e){return o.__awaiter(r,void 0,void 0,(function(){var t,r,i;return o.__generator(this,(function(o){switch(o.label){case 0:return[4,this.initOffice(e)];case 1:return t=o.sent(),!1!==n?t.render(null===(r=this.rootElement)||void 0===r?void 0:r.current):!1===n&&(null===(i=this.rootElement)||void 0===i?void 0:i.current)&&(this.rootElement.current.innerHTML=""),this.office=t,this.setState({loading:!1}),[2]}}))}))})),[2]):[2]}))}))},n.prototype.renderFormFile=function(){var t=this;this.setState({loading:!0});var n=this.props;n.wordOptions;var r=n.name,i=n.data,s=n.display,a=i[r];if(a instanceof File){var l=new FileReader;l.onload=function(n){var r=l.result;Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/office-viewer/lib/index","node_modules/tslib/tslib"],(function(e,n){t(n.__importStar(e))}))}))})).then((function(e){return o.__awaiter(t,void 0,void 0,(function(){var t,n,i;return o.__generator(this,(function(o){switch(o.label){case 0:return[4,this.initOffice(e,r)];case 1:return t=o.sent(),!1!==s?t.render(null===(n=this.rootElement)||void 0===n?void 0:n.current):!1===s&&(null===(i=this.rootElement)||void 0===i?void 0:i.current)&&(this.rootElement.current.innerHTML=""),this.office=t,this.setState({loading:!1}),[2]}}))}))}))},l.readAsArrayBuffer(a)}else this.setState({loading:!1})},n.prototype.render=function(){var e=this.props,t=e.classnames;e.translate;var n=e.className,r=e.loading,i=void 0!==r&&r,o=e.src,s=e.name,a=e.display,l=e.loadingConfig;return f("div",null,!1!==a&&!o&&!s&&f("svg",{width:"100%",height:"100",xmlns:"http://www.w3.org/2000/svg"},f("rect",{x:"0",y:"0",width:"100%",height:"100",style:{fill:"#F7F7F9"}}),f("text",{x:"50%",y:"50%",fontSize:"18",textAnchor:"middle",alignmentBaseline:"middle",fontFamily:"monospace, sans-serif",fill:"#555555"},"office viewer")),f("div",{ref:this.rootElement,className:t("office-viewer",n)}),f(d.default,{overlay:!0,key:"info",show:i&&this.state.loading,loadingConfig:l}))},n}(c.default.Component),h=function(e){function t(t,n){var r=e.call(this,t)||this;return n.registerComponent(r),r}return o.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=a.ScopedContext,t=o.__decorate([a.Renderer({type:"office-viewer"}),o.__metadata("design:paramtypes",[Object,Object])],t)}(p);t.OfficeViewerRenderer=h,t.default=p}));
|
||
;/*!node_modules/amis/lib/renderers/PdfViewer.js*/
|
||
amis.define("node_modules/amis/lib/renderers/PdfViewer",(function(e,t,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),o=e("node_modules/amis-core/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(i),l=e("node_modules/react/index"),u=(l.default||l).createElement;(l.default||l).Fragment;var p=d.default.lazy((function(){return Promise.resolve().then((function(){return new Promise((function(t){e(["node_modules/amis-ui/lib/components/PdfViewer","node_modules/tslib/tslib"],(function(e,r){t(r.__importStar(e))}))}))}))})),c=function(e){function t(t){var r=e.call(this,t)||this;return r.wrapper=d.default.createRef(),r.state={inited:!1,loading:!1,error:!1},r}return n.__extends(t,e),t.prototype.componentDidMount=function(){this.wrapper.current&&this.setState({width:this.wrapper.current.clientWidth-100}),this.renderPdf()},t.prototype.componentDidUpdate=function(e){var t=this,r=this.props;(o.isApiOutdated(e.src,r.src,e.data,r.data)||o.resolveVariableAndFilter(r.src,r.data,"| raw")!==o.resolveVariableAndFilter(e.src,e.data,"| raw"))&&(this.abortLoad(),setTimeout((function(){t.fetchPdf()}),0)),o.getVariable(r.data,r.name)&&o.getVariable(e.data,e.name)!==o.getVariable(r.data,r.name)&&(this.abortLoad(),this.renderPdf())},t.prototype.componentWillUnmount=function(){this.abortLoad()},t.prototype.abortLoad=function(){this.fetchCancel&&(this.fetchCancel("load canceled"),this.fetchCancel=void 0),this.reader&&(this.reader.abort(),this.reader=void 0)},t.prototype.renderPdf=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,r,a;return n.__generator(this,(function(n){switch(n.label){case 0:return e=this.props,t=e.src,r=e.name,a=e.data,this.setState({error:!1}),t?this.file?[3,2]:[4,this.fetchPdf()]:[3,3];case 1:n.sent(),n.label=2;case 2:return[3,5];case 3:return o.getVariable(a,r)?[4,this.renderFormFile()]:[3,5];case 4:n.sent(),n.label=5;case 5:return[2]}}))}))},t.prototype.fetchPdf=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,r,a,i,s,d,l,u=this;return n.__generator(this,(function(n){switch(n.label){case 0:if(e=this.props,t=e.env,r=e.src,a=e.data,e.translate,r&&("string"==typeof(s=o.resolveVariableAndFilter(r,a,"| raw"))?i=s:"object"==typeof s&&"string"==typeof s.value&&(i=s.value)),!i)return console.warn("file src is empty"),[2];this.setState({inited:!0,loading:!0,error:!1}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,t.fetcher(i,a,{responseType:"arraybuffer",cancelExecutor:function(e){return u.fetchCancel=e}})];case 2:return d=n.sent(),this.file=d.data,this.forceUpdate(),[3,5];case 3:return l=n.sent(),this.setState({error:!0}),console.error(l),[3,5];case 4:return this.setState({loading:!1}),[7];case 5:return[2]}}))}))},t.prototype.renderFormFile=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,r,a,i,s=this;return n.__generator(this,(function(n){return e=this.props,t=e.name,r=e.data,a=o.getVariable(r,t),this.setState({inited:!0,loading:!0}),a instanceof File&&((i=new FileReader).onload=function(e){var t=i.result;s.file=t,s.setState({loading:!1}),s.forceUpdate()},i.onerror=function(e){s.setState({error:!0})},i.readAsArrayBuffer(a),this.reader=i),[2]}))}))},t.prototype.renderEmpty=function(){var e=this.props,t=e.src,r=e.name;return t||r?null:u("svg",{width:"100%",height:"100",xmlns:"http://www.w3.org/2000/svg"},u("rect",{x:"0",y:"0",width:"100%",height:"100",style:{fill:"#F7F7F9"}}),u("text",{x:"50%",y:"50%",fontSize:"18",textAnchor:"middle",alignmentBaseline:"middle",fontFamily:"monospace, sans-serif",fill:"#555555"},"PDF viewer"))},t.prototype.renderError=function(){var e=this.props,t=e.src,r=e.translate;return this.state.error&&t?u("div",null,r("loadingFailed")+" url:"+t):null},t.prototype.renderTip=function(){return u("div",null,u("p",null,"[PdfViewer]: pdfjsWorkerSrc is required, Please set the `pdfjsWorkerSrc` in setGlobalOptions function."))},t.prototype.render=function(){var e=this.props,t=e.className,r=e.classnames;e.translate;var a=e.height,n=e.background,s=o.getGlobalOptions().pdfjsWorkerSrc,d=this.state,l=d.loading,c=d.inited,f=d.error,h=Math.max(this.props.width||this.state.width,300);return u("div",{ref:this.wrapper},this.renderEmpty(),s?u(i.Suspense,{fallback:u("div",null,"...")},c&&!f?u(p,{file:this.file,loading:l,className:t,classnames:r,width:h,height:a,background:n}):null):this.renderTip(),this.renderError())},n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"abortLoad",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],t.prototype,"renderPdf",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],t.prototype,"fetchPdf",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],t.prototype,"renderFormFile",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"renderEmpty",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"renderError",null),n.__decorate([o.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"renderTip",null),t}(d.default.Component),f=function(e){function t(t,r){var a=e.call(this,t)||this;return r.registerComponent(a),a}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=o.ScopedContext,t=n.__decorate([o.Renderer({type:"pdf-viewer"}),n.__metadata("design:paramtypes",[Object,Object])],t)}(c);t.PdfView=p,t.PdfViewerRenderer=f,t.default=c}));
|
||
;/*!node_modules/amis/lib/renderers/AMIS.js*/
|
||
amis.define("node_modules/amis/lib/renderers/AMIS",(function(e,n,r,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),s=e("node_modules/amis-core/lib/index");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.render,r=e.props,t=e.schema,o=s.getPropValue(this.props)||t;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){console.warn("amis value must be json string",e),o=null}return n("amis",o,r)},n=o.__decorate([s.Renderer({type:"amis"})],n)}(i(e("node_modules/react/index")).default.Component);n.AMISRenderer=u}));
|
||
;/*!node_modules/amis-formula/lib/doc.js*/
|
||
amis.define("node_modules/amis-formula/lib/doc",(function(e,n,t,a){"use strict";e("node_modules/amis-formula/lib/function").bulkRegisterFunctionDoc([{name:"IF",description:"如果满足条件condition,则返回consequent,否则返回alternate,支持多层嵌套IF函数。\n\n等价于直接用JS表达式如:condition ? consequent : alternate。",example:"IF(condition, consequent, alternate)",params:[{type:"expression",name:"condition",description:"条件表达式。例如:语文成绩>80"},{type:"any",name:"consequent",description:"条件判断通过的返回结果"},{type:"any",name:"alternate",description:"条件判断不通过的返回结果"}],returns:{type:"any",description:"根据条件返回不同的结果"},namespace:"逻辑函数"},{name:"AND",description:"条件全部符合,返回 true,否则返回 false。\n\n示例:AND(语文成绩>80, 数学成绩>80),\n\n语文成绩和数学成绩都大于 80,则返回 true,否则返回 false,\n\n等价于直接用JS表达式如:语文成绩>80 && 数学成绩>80。",example:"AND(expression1, expression2, ...expressionN)",params:[{type:"...expression",name:"conditions",description:"条件表达式,多个用逗号隔开。例如:语文成绩>80, 数学成绩>80"}],returns:{type:"boolean",description:null},namespace:"逻辑函数"},{name:"OR",description:"条件任意一个满足条件,返回 true,否则返回 false。\n\n示例:OR(语文成绩>80, 数学成绩>80),\n\n语文成绩和数学成绩任意一个大于 80,则返回 true,否则返回 false,\n\n等价于直接用JS表达式如:语文成绩>80 || 数学成绩>80。",example:"OR(expression1, expression2, ...expressionN)",params:[{type:"...expression",name:"conditions",description:"条件表达式,多个用逗号隔开。例如:语文成绩>80, 数学成绩>80"}],returns:{type:"boolean",description:null},namespace:"逻辑函数"},{name:"XOR",description:"异或处理,多个表达式组中存在奇数个真时认为真。\n\n示例:XOR(语文成绩 > 80, 数学成绩 > 80, 英语成绩 > 80)\n\n三门成绩中有一门或者三门大于 80,则返回 true,否则返回 false。",example:"XOR(condition1, condition2, ...expressionN)",params:[{type:"...expression",name:"condition",description:"条件表达式,多个用逗号隔开。例如:语文成绩>80, 数学成绩>80"}],returns:{type:"boolean",description:null},namespace:"逻辑函数"},{name:"IFS",description:'判断函数集合,相当于多个 else if 合并成一个。\n\n示例:IFS(语文成绩 > 80, "优秀", 语文成绩 > 60, "良", "继续努力"),\n\n如果语文成绩大于 80,则返回优秀,否则判断大于 60 分,则返回良,否则返回继续努力。',example:"IFS(condition1, result1, condition2, result2,...conditionN, resultN)",params:[{type:"...expression",name:"condition",description:"条件表达式"},{type:"...any",name:"result",description:"返回值"}],returns:{type:"any",description:"第一个满足条件的结果,没有命中的返回 false。"},namespace:"逻辑函数"},{name:"ABS",description:"返回传入数字的绝对值。",example:"ABS(num)",params:[{type:"number",name:"num",description:"数值"}],returns:{type:"number",description:"传入数值的绝对值"},namespace:"数学函数"},{name:"MAX",description:"获取最大值,如果只有一个参数且是数组,则计算这个数组内的值。",example:"MAX(num1, num2, ...numN) or MAX([num1, num2, ...numN])",params:[{type:"...number",name:"num",description:"数值"}],returns:{type:"number",description:"所有传入值中最大的那个"},namespace:"数学函数"},{name:"MIN",description:"获取最小值,如果只有一个参数且是数组,则计算这个数组内的值。",example:"MIN(num1, num2, ...numN) or MIN([num1, num2, ...numN])",params:[{type:"...number",name:"num",description:"数值"}],returns:{type:"number",description:"所有传入值中最小的那个"},namespace:"数学函数"},{name:"SUM",description:"求和,如果只有一个参数且是数组,则计算这个数组内的值。",example:"SUM(num1, num2, ...numN) or SUM([num1, num2, ...numN])",params:[{type:"...number",name:"num",description:"数值"}],returns:{type:"number",description:"所有传入数值的总和"},namespace:"数学函数"},{name:"INT",description:"将数值向下取整为最接近的整数。",example:"INT(num)",params:[{type:"number",name:"num",description:"数值"}],returns:{type:"number",description:"数值对应的整形"},namespace:"数学函数"},{name:"MOD",description:"返回两数相除的余数,参数 number 是被除数,divisor 是除数。",example:"MOD(num, divisor)",params:[{type:"number",name:"num",description:"被除数"},{type:"number",name:"divisor",description:"除数"}],returns:{type:"number",description:"两数相除的余数"},namespace:"数学函数"},{name:"PI",description:"圆周率 3.1415...。",example:"PI()",params:[],returns:{type:"number",description:"圆周率数值"},namespace:"数学函数"},{name:"ROUND",description:"将数字四舍五入到指定的位数,可以设置小数位。",example:"ROUND(num[, numDigits = 2])",params:[{type:"number",name:"num",description:"要处理的数字"},{type:"number",name:"numDigits",description:"小数位数,默认为2"}],returns:{type:"number",description:"传入数值四舍五入后的结果"},namespace:"数学函数"},{name:"FLOOR",description:"将数字向下取整到指定的位数,可以设置小数位。",example:"FLOOR(num[, numDigits=2])",params:[{type:"number",name:"num",description:"要处理的数字"},{type:"number",name:"numDigits",description:"小数位数,默认为2"}],returns:{type:"number",description:"传入数值向下取整后的结果"},namespace:"数学函数"},{name:"CEIL",description:"将数字向上取整到指定的位数,可以设置小数位。",example:"CEIL(num[, numDigits=2])",params:[{type:"number",name:"num",description:"要处理的数字"},{type:"number",name:"numDigits",description:"小数位数,默认为2"}],returns:{type:"number",description:"传入数值向上取整后的结果"},namespace:"数学函数"},{name:"SQRT",description:"开平方,参数 number 为非负数",example:"SQRT(num)",params:[{type:"number",name:"num",description:"要处理的数字"}],returns:{type:"number",description:"开平方的结果"},namespace:"数学函数"},{name:"AVG",description:"返回所有参数的平均值,如果只有一个参数且是数组,则计算这个数组内的值。",example:"AVG(num1, num2, ...numN) or AVG([num1, num2, ...numN])",params:[{type:"...number",name:"num",description:"要处理的数字"}],returns:{type:"number",description:"所有数值的平均值"},namespace:"数学函数"},{name:"DEVSQ",description:"返回数据点与数据均值点之差(数据偏差)的平方和,如果只有一个参数且是数组,则计算这个数组内的值。",example:"DEVSQ(num1, num2, ...numN)",params:[{type:"...number",name:"num",description:"要处理的数字"}],returns:{type:"number",description:"所有数值的平均值"},namespace:"数学函数"},{name:"AVEDEV",description:"数据点到其算术平均值的绝对偏差的平均值。",example:"AVEDEV(num1, num2, ...numN)",params:[{type:"...number",name:"num",description:"要处理的数字"}],returns:{type:"number",description:"所有数值的平均值"},namespace:"数学函数"},{name:"HARMEAN",description:"数据点的调和平均值,如果只有一个参数且是数组,则计算这个数组内的值。",example:"HARMEAN(num1, num2, ...numN)",params:[{type:"...number",name:"num",description:"要处理的数字"}],returns:{type:"number",description:"所有数值的平均值"},namespace:"数学函数"},{name:"LARGE",description:"数据集中第 k 个最大值。",example:"LARGE(array, k)",params:[{type:"array",name:"nums",description:"要处理的数字"},{type:"number",name:"k",description:"第几大"}],returns:{type:"number",description:"所有数值的平均值"},namespace:"数学函数"},{name:"UPPERMONEY",description:"将数值转为中文大写金额。",example:"UPPERMONEY(num)",params:[{type:"number",name:"num",description:"要处理的数字"}],returns:{type:"string",description:"数值中文大写字符"},namespace:"数学函数"},{name:"RAND",description:"返回大于等于 0 且小于 1 的均匀分布随机实数。每一次触发计算都会变化。\n\n示例:`RAND()*100`,\n\n返回 0-100 之间的随机数。",example:"RAND()",params:[],returns:{type:"number",description:"随机数"},namespace:"数学函数"},{name:"LAST",description:"取数据最后一个。",example:"LAST(array)",params:[{type:"...number",name:"arr",description:"要处理的数组"}],returns:{type:"any",description:"最后一个值"},namespace:"数学函数"},{name:"POW",description:"返回基数的指数次幂,参数base为基数,exponent为指数,如果参数值不合法则返回基数本身,计算结果不合法,则返回NaN。",example:"POW(base, exponent)",params:[{type:"number",name:"base",description:"基数"},{type:"number",name:"exponent",description:"指数"}],returns:{type:"number",description:"基数的指数次幂"},namespace:"数学函数"},{name:"LEFT",description:"返回传入文本左侧的指定长度字符串。",example:"LEFT(text, len)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"number",name:"len",description:"要处理的长度"}],returns:{type:"string",description:"对应字符串"},namespace:"文本函数"},{name:"RIGHT",description:"返回传入文本右侧的指定长度字符串。",example:"RIGHT(text, len)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"number",name:"len",description:"要处理的长度"}],returns:{type:"string",description:"对应字符串"},namespace:"文本函数"},{name:"LEN",description:"计算文本的长度。",example:"LEN(text)",params:[{type:"string",name:"text",description:"要处理的文本"}],returns:{type:"number",description:"长度"},namespace:"文本函数"},{name:"LENGTH",description:"计算文本集合中所有文本的长度。",example:"LENGTH(textArr)",params:[{type:"Array<string>",name:"textArr",description:"要处理的文本集合"}],returns:{type:"Array<number>",description:"长度集合"},namespace:"文本函数"},{name:"ISEMPTY",description:"判断文本是否为空。",example:"ISEMPTY(text)",params:[{type:"string",name:"text",description:"要处理的文本"}],returns:{type:"boolean",description:"判断结果"},namespace:"文本函数"},{name:"CONCATENATE",description:"将多个传入值连接成文本。",example:"CONCATENATE(text1, text2, ...textN)",params:[{type:"...string",name:"text",description:"文本集合"}],returns:{type:"string",description:"连接后的文本"},namespace:"文本函数"},{name:"CHAR",description:'返回计算机字符集的数字代码所对应的字符。\n\n示例:`CHAR(97)` 等价于 "a"。',example:"CHAR(code)",params:[{type:"number",name:"code",description:"编码值"}],returns:{type:"string",description:"指定位置的字符"},namespace:"文本函数"},{name:"LOWER",description:"将传入文本转成小写。",example:"LOWER(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"UPPER",description:"将传入文本转成大写。",example:"UPPER(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"UPPERFIRST",description:"将传入文本首字母转成大写。",example:"UPPERFIRST(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"PADSTART",description:'向前补齐文本长度。\n\n示例 `PADSTART("6", 2, "0")`,\n\n返回 `06`。',example:"PADSTART(text)",params:[{type:"string",name:"text",description:"文本"},{type:"number",name:"num",description:"目标长度"},{type:"string",name:"pad",description:"用于补齐的文本"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"CAPITALIZE",description:'将文本转成标题。\n\n示例 `CAPITALIZE("star")`,\n\n返回 `Star`。',example:"CAPITALIZE(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"ESCAPE",description:'对文本进行 HTML 转义。\n\n示例 `ESCAPE("<star>&")`,\n\n返回 `<start>&`。',example:"ESCAPE(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"TRUNCATE",description:'对文本长度进行截断。\n\n示例 `TRUNCATE("amis.baidu.com", 6)`,\n\n返回 `amis...`。',example:"TRUNCATE(text, 6)",params:[{type:"string",name:"text",description:"文本"},{type:"number",name:"text",description:"最长长度"}],returns:{type:"string",description:"结果文本"},namespace:"文本函数"},{name:"BEFORELAST",description:"取在某个分隔符之前的所有字符串。",example:"BEFORELAST(text, '.')",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"delimiter",description:"结束文本"}],returns:{type:"string",description:"判断结果"},namespace:"文本函数"},{name:"SPLIT",description:'将文本根据指定片段分割成数组。\n\n示例:`SPLIT("a,b,c", ",")`,\n\n返回 `["a", "b", "c"]`。',example:"SPLIT(text, ',')",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"delimiter",description:"文本片段"}],returns:{type:"Array<string>",description:"文本集"},namespace:"文本函数"},{name:"TRIM",description:"将文本去除前后空格。",example:"TRIM(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"处理后的文本"},namespace:"文本函数"},{name:"STRIPTAG",description:'去除文本中的 HTML 标签。\n\n示例:`STRIPTAG("<b>amis</b>")`,\n\n返回:`amis`。',example:"STRIPTAG(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"处理后的文本"},namespace:"文本函数"},{name:"LINEBREAK",description:'将字符串中的换行转成 HTML `<br>`,用于简单换行的场景。\n\n示例:`LINEBREAK("\\n")`,\n\n返回:`<br/>`。',example:"LINEBREAK(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"处理后的文本"},namespace:"文本函数"},{name:"STARTSWITH",description:"判断字符串(text)是否以特定字符串(startString)开始,是则返回 true,否则返回 false。",example:"STARTSWITH(text, '片段')",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"startString",description:"起始文本"}],returns:{type:"boolean",description:"判断结果"},namespace:"文本函数"},{name:"ENDSWITH",description:"判断字符串(text)是否以特定字符串(endString)结束,是则返回 true,否则返回 false。",example:"ENDSWITH(text, '片段')",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"endString",description:"结束文本"}],returns:{type:"boolean",description:"判断结果"},namespace:"文本函数"},{name:"CONTAINS",description:"判断参数 1 中的文本是否包含参数 2 中的文本,是则返回 true,否则返回 false。",example:"CONTAINS(text, searchText)",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"searchText",description:"搜索文本"}],returns:{type:"boolean",description:"判断结果"},namespace:"文本函数"},{name:"REPLACE",description:"对文本进行全量替换。",example:"REPLACE(text, search, replace)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"string",name:"search",description:"要被替换的文本"},{type:"string",name:"replace",description:"要替换的文本"}],returns:{type:"string",description:"处理结果"},namespace:"文本函数"},{name:"SEARCH",description:"对文本进行搜索,返回命中的位置。",example:"SEARCH(text, search, 0)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"string",name:"search",description:"用来搜索的文本"},{type:"number",name:"start",description:"起始位置"}],returns:{type:"number",description:"命中的位置"},namespace:"文本函数"},{name:"MID",description:'返回文本字符串中从指定位置开始的特定数目的字符。\n\n示例:`MID("amis.baidu.com", 6, 3)`,\n\n返回 `aid`。',example:"MID(text, from, len)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"number",name:"from",description:"起始位置"},{type:"number",name:"len",description:"处理长度"}],returns:{type:"string",description:"命中的位置"},namespace:"文本函数"},{name:"BASENAME",description:"返回路径中的文件名。\n\n示例:`/home/amis/a.json`,\n\n返回:`a.json`。",example:"BASENAME(text)",params:[{type:"string",name:"text",description:"要处理的文本"}],returns:{type:"string",description:"文件名"},namespace:"文本函数"},{name:"UUID",description:"生成UUID字符串",example:"UUID(8)",params:[{type:"number",name:"length",description:"生成的UUID字符串长度,默认为32位"}],returns:{type:"string",description:"生成的UUID字符串"},namespace:"文本函数"},{name:"DATE",description:"创建日期对象,可以通过特定格式的字符串,或者数值。\n\n需要注意的是,其中月份的数值是从0开始的,\n即如果是12月份,你应该传入数值11。",example:"DATE('2021-12-06 08:20:00')",params:[],returns:{type:"Date",description:"日期对象"},namespace:"日期函数"},{name:"TIMESTAMP",description:"返回时间的时间戳。",example:'TIMESTAMP(date[, format = "X"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"format",description:"时间戳格式,带毫秒传入 'x'。默认为 'X' 不带毫秒的。"}],returns:{type:"number",description:"时间戳"},namespace:"日期函数"},{name:"TODAY",description:"返回今天的日期。",example:"TODAY()",params:[],returns:{type:"number",description:"日期"},namespace:"日期函数"},{name:"NOW",description:"返回现在的日期",example:"NOW()",params:[],returns:{type:"number",description:"日期"},namespace:"日期函数"},{name:"WEEKDAY",description:"获取日期的星期几。\n\n示例\n\nWEEKDAY('2023-02-27') 得到 0。\nWEEKDAY('2023-02-27', 2) 得到 1。",example:"WEEKDAY(date)",params:[{type:"any",name:"date",description:"日期"},{type:"number",name:"type",description:"星期定义类型,默认为1,1表示0至6代表星期一到星期日,2表示1至7代表星期一到星期日"}],returns:{type:"number",description:"星期几的数字标识"},namespace:"日期函数"},{name:"WEEK",description:"获取年份的星期,即第几周。\n\n示例\n\nWEEK('2023-03-05') 得到 9。",example:"WEEK(date)",params:[{type:"any",name:"date",description:"日期"},{type:"boolean",name:"isISO",description:"是否ISO星期"}],returns:{type:"number",description:"星期几的数字标识"},namespace:"日期函数"},{name:"DATETOSTR",description:"对日期、日期字符串、时间戳进行格式化。\n\n示例\n\nDATETOSTR('12/25/2022', 'YYYY-MM-DD') 得到 '2022.12.25',\nDATETOSTR(1676563200, 'YYYY.MM.DD') 得到 '2023.02.17',\nDATETOSTR(1676563200000, 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.17 12:00:00',\nDATETOSTR(DATE('2021-12-21'), 'YYYY.MM.DD hh:mm:ss') 得到 '2021.12.21 08:00:00'。",example:"DATETOSTR(date, 'YYYY-MM-DD')",params:[{type:"any",name:"date",description:"日期对象、日期字符串、时间戳"},{type:"string",name:"format",description:'日期格式,默认为 "YYYY-MM-DD HH:mm:ss"'}],returns:{type:"string",description:"日期字符串"},namespace:"日期函数"},{name:"DATERANGESPLIT",description:"获取日期范围字符串中的开始时间、结束时间。\n\n示例:\n\nDATERANGESPLIT('1676563200, 1676735999') 得到 [1676563200, 1676735999],\nDATERANGESPLIT('1676563200, 1676735999', undefined , 'YYYY.MM.DD hh:mm:ss') 得到 [2023.02.17 12:00:00, 2023.02.18 11:59:59],\nDATERANGESPLIT('1676563200, 1676735999', 0 , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.17 12:00:00',\nDATERANGESPLIT('1676563200, 1676735999', 'start' , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.17 12:00:00',\nDATERANGESPLIT('1676563200, 1676735999', 1 , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.18 11:59:59',\nDATERANGESPLIT('1676563200, 1676735999', 'end' , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.18 11:59:59'。",example:"DATERANGESPLIT(date, 'YYYY-MM-DD')",params:[{type:"string",name:"date",description:"日期范围字符串"},{type:"string",name:"key",description:"取值标识,0或'start'表示获取开始时间,1或'end'表示获取结束时间"},{type:"string",name:"format",description:"日期格式,可选"},{type:"string",name:"delimiter",description:"分隔符,可选,默认为','"}],returns:{type:"string",description:"日期字符串"},namespace:"日期函数"},{name:"STARTOF",description:"返回日期的指定范围的开端。",example:'STARTOF(date[unit = "day"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"unit",description:"比如可以传入 'day'、'month'、'year' 或者 `week` 等等"},{type:"string",name:"format",description:"日期格式,可选"}],returns:{type:"any",description:"新的日期对象, 如果传入 format 则返回格式化后的日期字符串"},namespace:"日期函数"},{name:"ENDOF",description:"返回日期的指定范围的末尾。",example:'ENDOF(date[unit = "day"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"unit",description:"比如可以传入 'day'、'month'、'year' 或者 `week` 等等"},{type:"string",name:"format",description:"日期格式,可选"}],returns:{type:"any",description:"新的日期对象, 如果传入 format 则返回格式化后的日期字符串"},namespace:"日期函数"},{name:"YEAR",description:"返回日期的年份。",example:"YEAR(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"MONTH",description:"返回日期的月份,这里就是自然月份。",example:"MONTH(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"DAY",description:"返回日期的天。",example:"DAY(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"HOUR",description:"返回日期的小时。",example:"HOUR(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"MINUTE",description:"返回日期的分。",example:"MINUTE(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"SECOND",description:"返回日期的秒。",example:"SECOND(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"YEARS",description:"返回两个日期相差多少年。",example:"YEARS(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"MINUTES",description:"返回两个日期相差多少分钟。",example:"MINUTES(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"DAYS",description:"返回两个日期相差多少天。",example:"DAYS(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"HOURS",description:"返回两个日期相差多少小时。",example:"HOURS(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"DATEMODIFY",description:"修改日期,对日期进行加减天、月份、年等操作。\n\n示例:\n\nDATEMODIFY(A, -2, 'month'),\n\n对日期 A 进行往前减2月的操作。",example:"DATEMODIFY(date, 2, 'days')",params:[{type:"date",name:"date",description:"日期对象"},{type:"number",name:"num",description:"数值"},{type:"string",name:"unit",description:"单位:支持年、月、天等等"}],returns:{type:"date",description:"日期对象"},namespace:"日期函数"},{name:"STRTODATE",description:"将字符日期转成日期对象,可以指定日期格式。\n\n示例:STRTODATE('2021/12/6', 'YYYY/MM/DD')",example:'STRTODATE(value[, format=""])',params:[{type:"string",name:"value",description:"日期字符"},{type:"string",name:"format",description:"日期格式"}],returns:{type:"date",description:"日期对象"},namespace:"日期函数"},{name:"ISBEFORE",description:"判断两个日期,是否第一个日期在第二个日期的前面,是则返回 true,否则返回 false。",example:"ISBEFORE(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"ISAFTER",description:"判断两个日期,是否第一个日期在第二个日期的后面,是则返回 true,否则返回 false。",example:"ISAFTER(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"BETWEENRANGE",description:"判断日期是否在指定范围内,是则返回 true,否则返回 false。\n\n示例:BETWEENRANGE('2021/12/6', ['2021/12/5','2021/12/7'])。",example:"BETWEENRANGE(date, [start, end])",params:[{type:"any",name:"date",description:"第一个日期"},{type:"Array<any>",name:"daterange",description:"日期范围"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"},{type:"string",name:"inclusivity",description:"包容性规则,默认为'[]'。[ 表示包含、( 表示排除,如果使用包容性参数,则必须传入两个指示符,如'()'表示左右范围都排除"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"ISSAMEORBEFORE",description:"判断两个日期,是否第一个日期在第二个日期的前面或者相等,是则返回 true,否则返回 false。",example:"ISSAMEORBEFORE(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"ISSAMEORAFTER",description:"判断两个日期,是否第一个日期在第二个日期的后面或者相等,是则返回 true,否则返回 false。",example:"ISSAMEORAFTER(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"COUNT",description:"返回数组的长度。",example:"COUNT(arr)",params:[{type:"Array<any>",name:"arr",description:"数组"}],returns:{type:"number",description:"结果"},namespace:"数组"},{name:"ARRAYMAP",description:"数组做数据转换,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n\n将数组中的每个元素转换成箭头函数返回的值。\n\n示例:\n\nARRAYMAP([1, 2, 3], item => item + 1) 得到 [2, 3, 4]。",example:"ARRAYMAP(arr, item => item)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"Array<any>",name:"iterator",description:"箭头函数"}],returns:{type:"Array<any>",description:"返回转换后的数组"},namespace:"数组"},{name:"ARRAYFILTER",description:"数据做数据过滤,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n将第二个箭头函数返回为 false 的成员过滤掉。\n\n示例:\n\nARRAYFILTER([1, 2, 3], item => item > 1) 得到 [2, 3]。",example:"ARRAYFILTER(arr, item => item)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"Array<any>",name:"iterator",description:"箭头函数"}],returns:{type:"Array<any>",description:"返回过滤后的数组"},namespace:"数组"},{name:"ARRAYFINDINDEX",description:"数据做数据查找,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n找出第二个箭头函数返回为 true 的成员的索引。\n\n示例:\n\nARRAYFINDINDEX([0, 2, false], item => item === 2) 得到 1。",example:"ARRAYFINDINDEX(arr, item => item === 2)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"Array<any>",name:"iterator",description:"箭头函数"}],returns:{type:"number",description:"结果"},namespace:"数组"},{name:"ARRAYFIND",description:"数据做数据查找,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n找出第二个箭头函数返回为 true 的成员。\n\n示例:\n\nARRAYFIND([0, 2, false], item => item === 2) 得到 2。",example:"ARRAYFIND(arr, item => item === 2)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"Array<any>",name:"iterator",description:"箭头函数"}],returns:{type:"any",description:"结果"},namespace:"数组"},{name:"ARRAYSOME",description:"数据做数据遍历判断,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n判断第二个箭头函数是否存在返回为 true 的成员,是则返回 true,否则返回 false。\n\n示例:\n\nARRAYSOME([0, 2, false], item => item === 2) 得到 true。",example:"ARRAYSOME(arr, item => item === 2)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"Array<any>",name:"iterator",description:"箭头函数"}],returns:{type:"boolean",description:"结果"},namespace:"数组"},{name:"ARRAYEVERY",description:"数据做数据遍历判断,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n判断第二个箭头函数返回是否都为 true,是则返回 true,否则返回 false。\n\n示例:\n\nARRAYEVERY([0, 2, false], item => item === 2) 得到 false",example:"ARRAYEVERY(arr, item => item === 2)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"Array<any>",name:"iterator",description:"箭头函数"}],returns:{type:"boolean",description:"结果"},namespace:"数组"},{name:"ARRAYINCLUDES",description:"判断数据中是否存在指定元素。\n\n示例:\n\nARRAYINCLUDES([0, 2, false], 2) 得到 true。",example:"ARRAYINCLUDES(arr, 2)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"any",name:"item",description:"元素"}],returns:{type:"any",description:"结果"},namespace:"数组"},{name:"COMPACT",description:"数组过滤掉 false、null、0 和 \"\"。\n\n示例:\n\nCOMPACT([0, 1, false, 2, '', 3]) 得到 [1, 2, 3]。",example:"COMPACT(arr)",params:[{type:"Array<any>",name:"arr",description:"数组"}],returns:{type:"Array<any>",description:"结果"},namespace:"数组"},{name:"JOIN",description:"数组转成字符串。\n\n示例:\n\nJOIN(['a', 'b', 'c'], '=') 得到 'a=b=c'。",example:"JOIN(arr, string)",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"String",name:"separator",description:"分隔符"}],returns:{type:"string",description:"结果"},namespace:"数组"},{name:"CONCAT",description:"数组合并。\n\n示例:\n\nCONCAT(['a', 'b', 'c'], ['1'], ['3']) 得到 ['a', 'b', 'c', '1', '3']。",example:"CONCAT(['a', 'b', 'c'], ['1'], ['3'])",params:[{type:"Array<any>",name:"arr",description:"数组"}],returns:{type:"Array<any>",description:"结果"},namespace:"数组"},{name:"UNIQ",description:"数组去重,第二个参数「field」,可指定根据该字段去重。\n\n示例:\n\nUNIQ([{a: '1'}, {b: '2'}, {a: '1'}]) 得到 [{a: '1'}, {b: '2'}]。",example:"UNIQ([{a: '1'}, {b: '2'}, {a: '1'}], 'x')",params:[{type:"Array<any>",name:"arr",description:"数组"},{type:"string",name:"field",description:"字段"}],returns:{type:"Array<any>",description:"结果"},namespace:"数组"},{name:"ENCODEJSON",description:"将JS对象转换成JSON字符串。\n\n示例:\n\nENCODEJSON({name: 'amis'}) 得到 '{\"name\":\"amis\"}'。",example:"ENCODEJSON({name: 'amis'})",params:[{type:"object",name:"obj",description:"JS对象"}],returns:{type:"string",description:"结果"},namespace:"编码"},{name:"DECODEJSON",description:"解析JSON编码数据,返回JS对象。\n\n示例:\n\nDECODEJSON('{\\\"name\\\": \"amis\"}') 得到 {name: 'amis'}。",example:'DECODEJSON(\'{\\"name\\": "amis"}\')',params:[{type:"string",name:"str",description:"字符串"}],returns:{type:"object",description:"结果"},namespace:"编码"},{name:"GET",description:"根据对象或者数组的path路径获取值。 如果解析 value 是 undefined 会以 defaultValue 取代。\n\n示例:\n\nGET([0, 2, {name: 'amis', age: 18}], 1) 得到 2,\nGET([0, 2, {name: 'amis', age: 18}], '2.name') 得到 'amis',\nGET({arr: [{name: 'amis', age: 18}]}, 'arr[0].name') 得到 'amis',\nGET({arr: [{name: 'amis', age: 18}]}, 'arr.0.name') 得到 'amis',\nGET({arr: [{name: 'amis', age: 18}]}, 'arr.1.name', 'not-found') 得到 'not-found'。",example:"GET(arr, 2)",params:[{type:"any",name:"obj",description:"对象或数组"},{type:"string",name:"path",description:"路径"},{type:"any",name:"defaultValue",description:"如果解析不到则返回该值"}],returns:{type:"any",description:"结果"},namespace:"其他"},{name:"ISTYPE",description:"判断是否为类型支持:string, number, array, date, plain-object。",example:"ISTYPE([{a: '1'}, {b: '2'}, {a: '1'}], 'array')",params:[{type:"string",name:"判断对象",description:null}],returns:{type:"boolean",description:"结果"},namespace:"其他"}])}));
|
||
;/*!node_modules/amis-ui/lib/components/CityDB.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/CityDB",(function(e,r,s,i){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={11e4:"北京市",110101:"东城区",110102:"西城区",110105:"朝阳区",110106:"丰台区",110107:"石景山区",110108:"海淀区",110109:"门头沟区",110111:"房山区",110112:"通州区",110113:"顺义区",110114:"昌平区",110115:"大兴区",110116:"怀柔区",110117:"平谷区",110118:"密云区",110119:"延庆区",12e4:"天津市",120101:"和平区",120102:"河东区",120103:"河西区",120104:"南开区",120105:"河北区",120106:"红桥区",120110:"东丽区",120111:"西青区",120112:"津南区",120113:"北辰区",120114:"武清区",120115:"宝坻区",120116:"滨海新区",120117:"宁河区",120118:"静海区",120119:"蓟州区",13e4:"河北省",130100:"石家庄市",130102:"长安区",130104:"桥西区",130105:"新华区",130107:"井陉矿区",130108:"裕华区",130109:"藁城区",130110:"鹿泉区",130111:"栾城区",130121:"井陉县",130123:"正定县",130125:"行唐县",130126:"灵寿县",130127:"高邑县",130128:"深泽县",130129:"赞皇县",130130:"无极县",130131:"平山县",130132:"元氏县",130133:"赵县",130181:"辛集市",130183:"晋州市",130184:"新乐市",130200:"唐山市",130202:"路南区",130203:"路北区",130204:"古冶区",130205:"开平区",130207:"丰南区",130208:"丰润区",130209:"曹妃甸区",130224:"滦南县",130225:"乐亭县",130227:"迁西县",130229:"玉田县",130281:"遵化市",130283:"迁安市",130284:"滦州市",130300:"秦皇岛市",130302:"海港区",130303:"山海关区",130304:"北戴河区",130306:"抚宁区",130321:"青龙满族自治县",130322:"昌黎县",130324:"卢龙县",130400:"邯郸市",130402:"邯山区",130403:"丛台区",130404:"复兴区",130406:"峰峰矿区",130407:"肥乡区",130408:"永年区",130423:"临漳县",130424:"成安县",130425:"大名县",130426:"涉县",130427:"磁县",130430:"邱县",130431:"鸡泽县",130432:"广平县",130433:"馆陶县",130434:"魏县",130435:"曲周县",130481:"武安市",130500:"邢台市",130502:"襄都区",130503:"信都区",130505:"任泽区",130506:"南和区",130522:"临城县",130523:"内丘县",130524:"柏乡县",130525:"隆尧县",130528:"宁晋县",130529:"巨鹿县",130530:"新河县",130531:"广宗县",130532:"平乡县",130533:"威县",130534:"清河县",130535:"临西县",130581:"南宫市",130582:"沙河市",130600:"保定市",130602:"竞秀区",130606:"莲池区",130607:"满城区",130608:"清苑区",130609:"徐水区",130623:"涞水县",130624:"阜平县",130626:"定兴县",130627:"唐县",130628:"高阳县",130629:"容城县",130630:"涞源县",130631:"望都县",130632:"安新县",130633:"易县",130634:"曲阳县",130635:"蠡县",130636:"顺平县",130637:"博野县",130638:"雄县",130681:"涿州市",130682:"定州市",130683:"安国市",130684:"高碑店市",130700:"张家口市",130702:"桥东区",130703:"桥西区",130705:"宣化区",130706:"下花园区",130708:"万全区",130709:"崇礼区",130722:"张北县",130723:"康保县",130724:"沽源县",130725:"尚义县",130726:"蔚县",130727:"阳原县",130728:"怀安县",130730:"怀来县",130731:"涿鹿县",130732:"赤城县",130800:"承德市",130802:"双桥区",130803:"双滦区",130804:"鹰手营子矿区",130821:"承德县",130822:"兴隆县",130824:"滦平县",130825:"隆化县",130826:"丰宁满族自治县",130827:"宽城满族自治县",130828:"围场满族蒙古族自治县",130881:"平泉市",130900:"沧州市",130902:"新华区",130903:"运河区",130921:"沧县",130922:"青县",130923:"东光县",130924:"海兴县",130925:"盐山县",130926:"肃宁县",130927:"南皮县",130928:"吴桥县",130929:"献县",130930:"孟村回族自治县",130981:"泊头市",130982:"任丘市",130983:"黄骅市",130984:"河间市",131e3:"廊坊市",131002:"安次区",131003:"广阳区",131022:"固安县",131023:"永清县",131024:"香河县",131025:"大城县",131026:"文安县",131028:"大厂回族自治县",131081:"霸州市",131082:"三河市",131100:"衡水市",131102:"桃城区",131103:"冀州区",131121:"枣强县",131122:"武邑县",131123:"武强县",131124:"饶阳县",131125:"安平县",131126:"故城县",131127:"景县",131128:"阜城县",131182:"深州市",14e4:"山西省",140100:"太原市",140105:"小店区",140106:"迎泽区",140107:"杏花岭区",140108:"尖草坪区",140109:"万柏林区",140110:"晋源区",140121:"清徐县",140122:"阳曲县",140123:"娄烦县",140181:"古交市",140200:"大同市",140212:"新荣区",140213:"平城区",140214:"云冈区",140215:"云州区",140221:"阳高县",140222:"天镇县",140223:"广灵县",140224:"灵丘县",140225:"浑源县",140226:"左云县",140300:"阳泉市",140302:"城区",140303:"矿区",140311:"郊区",140321:"平定县",140322:"盂县",140400:"长治市",140403:"潞州区",140404:"上党区",140405:"屯留区",140406:"潞城区",140423:"襄垣县",140425:"平顺县",140426:"黎城县",140427:"壶关县",140428:"长子县",140429:"武乡县",140430:"沁县",140431:"沁源县",140500:"晋城市",140502:"城区",140521:"沁水县",140522:"阳城县",140524:"陵川县",140525:"泽州县",140581:"高平市",140600:"朔州市",140602:"朔城区",140603:"平鲁区",140621:"山阴县",140622:"应县",140623:"右玉县",140681:"怀仁市",140700:"晋中市",140702:"榆次区",140703:"太谷区",140721:"榆社县",140722:"左权县",140723:"和顺县",140724:"昔阳县",140725:"寿阳县",140727:"祁县",140728:"平遥县",140729:"灵石县",140781:"介休市",140800:"运城市",140802:"盐湖区",140821:"临猗县",140822:"万荣县",140823:"闻喜县",140824:"稷山县",140825:"新绛县",140826:"绛县",140827:"垣曲县",140828:"夏县",140829:"平陆县",140830:"芮城县",140881:"永济市",140882:"河津市",140900:"忻州市",140902:"忻府区",140921:"定襄县",140922:"五台县",140923:"代县",140924:"繁峙县",140925:"宁武县",140926:"静乐县",140927:"神池县",140928:"五寨县",140929:"岢岚县",140930:"河曲县",140931:"保德县",140932:"偏关县",140981:"原平市",141e3:"临汾市",141002:"尧都区",141021:"曲沃县",141022:"翼城县",141023:"襄汾县",141024:"洪洞县",141025:"古县",141026:"安泽县",141027:"浮山县",141028:"吉县",141029:"乡宁县",141030:"大宁县",141031:"隰县",141032:"永和县",141033:"蒲县",141034:"汾西县",141081:"侯马市",141082:"霍州市",141100:"吕梁市",141102:"离石区",141121:"文水县",141122:"交城县",141123:"兴县",141124:"临县",141125:"柳林县",141126:"石楼县",141127:"岚县",141128:"方山县",141129:"中阳县",141130:"交口县",141181:"孝义市",141182:"汾阳市",15e4:"内蒙古自治区",150100:"呼和浩特市",150102:"新城区",150103:"回民区",150104:"玉泉区",150105:"赛罕区",150121:"土默特左旗",150122:"托克托县",150123:"和林格尔县",150124:"清水河县",150125:"武川县",150200:"包头市",150202:"东河区",150203:"昆都仑区",150204:"青山区",150205:"石拐区",150206:"白云鄂博矿区",150207:"九原区",150221:"土默特右旗",150222:"固阳县",150223:"达尔罕茂明安联合旗",150300:"乌海市",150302:"海勃湾区",150303:"海南区",150304:"乌达区",150400:"赤峰市",150402:"红山区",150403:"元宝山区",150404:"松山区",150421:"阿鲁科尔沁旗",150422:"巴林左旗",150423:"巴林右旗",150424:"林西县",150425:"克什克腾旗",150426:"翁牛特旗",150428:"喀喇沁旗",150429:"宁城县",150430:"敖汉旗",150500:"通辽市",150502:"科尔沁区",150521:"科尔沁左翼中旗",150522:"科尔沁左翼后旗",150523:"开鲁县",150524:"库伦旗",150525:"奈曼旗",150526:"扎鲁特旗",150581:"霍林郭勒市",150600:"鄂尔多斯市",150602:"东胜区",150603:"康巴什区",150621:"达拉特旗",150622:"准格尔旗",150623:"鄂托克前旗",150624:"鄂托克旗",150625:"杭锦旗",150626:"乌审旗",150627:"伊金霍洛旗",150700:"呼伦贝尔市",150702:"海拉尔区",150703:"扎赉诺尔区",150721:"阿荣旗",150722:"莫力达瓦达斡尔族自治旗",150723:"鄂伦春自治旗",150724:"鄂温克族自治旗",150725:"陈巴尔虎旗",150726:"新巴尔虎左旗",150727:"新巴尔虎右旗",150781:"满洲里市",150782:"牙克石市",150783:"扎兰屯市",150784:"额尔古纳市",150785:"根河市",150800:"巴彦淖尔市",150802:"临河区",150821:"五原县",150822:"磴口县",150823:"乌拉特前旗",150824:"乌拉特中旗",150825:"乌拉特后旗",150826:"杭锦后旗",150900:"乌兰察布市",150902:"集宁区",150921:"卓资县",150922:"化德县",150923:"商都县",150924:"兴和县",150925:"凉城县",150926:"察哈尔右翼前旗",150927:"察哈尔右翼中旗",150928:"察哈尔右翼后旗",150929:"四子王旗",150981:"丰镇市",152200:"兴安盟",152201:"乌兰浩特市",152202:"阿尔山市",152221:"科尔沁右翼前旗",152222:"科尔沁右翼中旗",152223:"扎赉特旗",152224:"突泉县",152500:"锡林郭勒盟",152501:"二连浩特市",152502:"锡林浩特市",152522:"阿巴嘎旗",152523:"苏尼特左旗",152524:"苏尼特右旗",152525:"东乌珠穆沁旗",152526:"西乌珠穆沁旗",152527:"太仆寺旗",152528:"镶黄旗",152529:"正镶白旗",152530:"正蓝旗",152531:"多伦县",152900:"阿拉善盟",152921:"阿拉善左旗",152922:"阿拉善右旗",152923:"额济纳旗",21e4:"辽宁省",210100:"沈阳市",210102:"和平区",210103:"沈河区",210104:"大东区",210105:"皇姑区",210106:"铁西区",210111:"苏家屯区",210112:"浑南区",210113:"沈北新区",210114:"于洪区",210115:"辽中区",210123:"康平县",210124:"法库县",210181:"新民市",210200:"大连市",210202:"中山区",210203:"西岗区",210204:"沙河口区",210211:"甘井子区",210212:"旅顺口区",210213:"金州区",210214:"普兰店区",210224:"长海县",210281:"瓦房店市",210283:"庄河市",210300:"鞍山市",210302:"铁东区",210303:"铁西区",210304:"立山区",210311:"千山区",210321:"台安县",210323:"岫岩满族自治县",210381:"海城市",210400:"抚顺市",210402:"新抚区",210403:"东洲区",210404:"望花区",210411:"顺城区",210421:"抚顺县",210422:"新宾满族自治县",210423:"清原满族自治县",210500:"本溪市",210502:"平山区",210503:"溪湖区",210504:"明山区",210505:"南芬区",210521:"本溪满族自治县",210522:"桓仁满族自治县",210600:"丹东市",210602:"元宝区",210603:"振兴区",210604:"振安区",210624:"宽甸满族自治县",210681:"东港市",210682:"凤城市",210700:"锦州市",210702:"古塔区",210703:"凌河区",210711:"太和区",210726:"黑山县",210727:"义县",210781:"凌海市",210782:"北镇市",210800:"营口市",210802:"站前区",210803:"西市区",210804:"鲅鱼圈区",210811:"老边区",210881:"盖州市",210882:"大石桥市",210900:"阜新市",210902:"海州区",210903:"新邱区",210904:"太平区",210905:"清河门区",210911:"细河区",210921:"阜新蒙古族自治县",210922:"彰武县",211e3:"辽阳市",211002:"白塔区",211003:"文圣区",211004:"宏伟区",211005:"弓长岭区",211011:"太子河区",211021:"辽阳县",211081:"灯塔市",211100:"盘锦市",211102:"双台子区",211103:"兴隆台区",211104:"大洼区",211122:"盘山县",211200:"铁岭市",211202:"银州区",211204:"清河区",211221:"铁岭县",211223:"西丰县",211224:"昌图县",211281:"调兵山市",211282:"开原市",211300:"朝阳市",211302:"双塔区",211303:"龙城区",211321:"朝阳县",211322:"建平县",211324:"喀喇沁左翼蒙古族自治县",211381:"北票市",211382:"凌源市",211400:"葫芦岛市",211402:"连山区",211403:"龙港区",211404:"南票区",211421:"绥中县",211422:"建昌县",211481:"兴城市",22e4:"吉林省",220100:"长春市",220102:"南关区",220103:"宽城区",220104:"朝阳区",220105:"二道区",220106:"绿园区",220112:"双阳区",220113:"九台区",220122:"农安县",220182:"榆树市",220183:"德惠市",220184:"公主岭市",220200:"吉林市",220202:"昌邑区",220203:"龙潭区",220204:"船营区",220211:"丰满区",220221:"永吉县",220281:"蛟河市",220282:"桦甸市",220283:"舒兰市",220284:"磐石市",220300:"四平市",220302:"铁西区",220303:"铁东区",220322:"梨树县",220323:"伊通满族自治县",220382:"双辽市",220400:"辽源市",220402:"龙山区",220403:"西安区",220421:"东丰县",220422:"东辽县",220500:"通化市",220502:"东昌区",220503:"二道江区",220521:"通化县",220523:"辉南县",220524:"柳河县",220581:"梅河口市",220582:"集安市",220600:"白山市",220602:"浑江区",220605:"江源区",220621:"抚松县",220622:"靖宇县",220623:"长白朝鲜族自治县",220681:"临江市",220700:"松原市",220702:"宁江区",220721:"前郭尔罗斯蒙古族自治县",220722:"长岭县",220723:"乾安县",220781:"扶余市",220800:"白城市",220802:"洮北区",220821:"镇赉县",220822:"通榆县",220881:"洮南市",220882:"大安市",222400:"延边朝鲜族自治州",222401:"延吉市",222402:"图们市",222403:"敦化市",222404:"珲春市",222405:"龙井市",222406:"和龙市",222424:"汪清县",222426:"安图县",23e4:"黑龙江省",230100:"哈尔滨市",230102:"道里区",230103:"南岗区",230104:"道外区",230108:"平房区",230109:"松北区",230110:"香坊区",230111:"呼兰区",230112:"阿城区",230113:"双城区",230123:"依兰县",230124:"方正县",230125:"宾县",230126:"巴彦县",230127:"木兰县",230128:"通河县",230129:"延寿县",230183:"尚志市",230184:"五常市",230200:"齐齐哈尔市",230202:"龙沙区",230203:"建华区",230204:"铁锋区",230205:"昂昂溪区",230206:"富拉尔基区",230207:"碾子山区",230208:"梅里斯达斡尔族区",230221:"龙江县",230223:"依安县",230224:"泰来县",230225:"甘南县",230227:"富裕县",230229:"克山县",230230:"克东县",230231:"拜泉县",230281:"讷河市",230300:"鸡西市",230302:"鸡冠区",230303:"恒山区",230304:"滴道区",230305:"梨树区",230306:"城子河区",230307:"麻山区",230321:"鸡东县",230381:"虎林市",230382:"密山市",230400:"鹤岗市",230402:"向阳区",230403:"工农区",230404:"南山区",230405:"兴安区",230406:"东山区",230407:"兴山区",230421:"萝北县",230422:"绥滨县",230500:"双鸭山市",230502:"尖山区",230503:"岭东区",230505:"四方台区",230506:"宝山区",230521:"集贤县",230522:"友谊县",230523:"宝清县",230524:"饶河县",230600:"大庆市",230602:"萨尔图区",230603:"龙凤区",230604:"让胡路区",230605:"红岗区",230606:"大同区",230621:"肇州县",230622:"肇源县",230623:"林甸县",230624:"杜尔伯特蒙古族自治县",230700:"伊春市",230717:"伊美区",230718:"乌翠区",230719:"友好区",230722:"嘉荫县",230723:"汤旺县",230724:"丰林县",230725:"大箐山县",230726:"南岔县",230751:"金林区",230781:"铁力市",230800:"佳木斯市",230803:"向阳区",230804:"前进区",230805:"东风区",230811:"郊区",230822:"桦南县",230826:"桦川县",230828:"汤原县",230881:"同江市",230882:"富锦市",230883:"抚远市",230900:"七台河市",230902:"新兴区",230903:"桃山区",230904:"茄子河区",230921:"勃利县",231e3:"牡丹江市",231002:"东安区",231003:"阳明区",231004:"爱民区",231005:"西安区",231025:"林口县",231081:"绥芬河市",231083:"海林市",231084:"宁安市",231085:"穆棱市",231086:"东宁市",231100:"黑河市",231102:"爱辉区",231123:"逊克县",231124:"孙吴县",231181:"北安市",231182:"五大连池市",231183:"嫩江市",231200:"绥化市",231202:"北林区",231221:"望奎县",231222:"兰西县",231223:"青冈县",231224:"庆安县",231225:"明水县",231226:"绥棱县",231281:"安达市",231282:"肇东市",231283:"海伦市",232700:"大兴安岭地区",232701:"漠河市",232718:"加格达奇区",232721:"呼玛县",232722:"塔河县",31e4:"上海市",310101:"黄浦区",310104:"徐汇区",310105:"长宁区",310106:"静安区",310107:"普陀区",310109:"虹口区",310110:"杨浦区",310112:"闵行区",310113:"宝山区",310114:"嘉定区",310115:"浦东新区",310116:"金山区",310117:"松江区",310118:"青浦区",310120:"奉贤区",310151:"崇明区",32e4:"江苏省",320100:"南京市",320102:"玄武区",320104:"秦淮区",320105:"建邺区",320106:"鼓楼区",320111:"浦口区",320113:"栖霞区",320114:"雨花台区",320115:"江宁区",320116:"六合区",320117:"溧水区",320118:"高淳区",320200:"无锡市",320205:"锡山区",320206:"惠山区",320211:"滨湖区",320213:"梁溪区",320214:"新吴区",320281:"江阴市",320282:"宜兴市",320300:"徐州市",320302:"鼓楼区",320303:"云龙区",320305:"贾汪区",320311:"泉山区",320312:"铜山区",320321:"丰县",320322:"沛县",320324:"睢宁县",320381:"新沂市",320382:"邳州市",320400:"常州市",320402:"天宁区",320404:"钟楼区",320411:"新北区",320412:"武进区",320413:"金坛区",320481:"溧阳市",320500:"苏州市",320505:"虎丘区",320506:"吴中区",320507:"相城区",320508:"姑苏区",320509:"吴江区",320581:"常熟市",320582:"张家港市",320583:"昆山市",320585:"太仓市",320600:"南通市",320612:"通州区",320613:"崇川区",320614:"海门区",320623:"如东县",320681:"启东市",320682:"如皋市",320685:"海安市",320700:"连云港市",320703:"连云区",320706:"海州区",320707:"赣榆区",320722:"东海县",320723:"灌云县",320724:"灌南县",320800:"淮安市",320803:"淮安区",320804:"淮阴区",320812:"清江浦区",320813:"洪泽区",320826:"涟水县",320830:"盱眙县",320831:"金湖县",320900:"盐城市",320902:"亭湖区",320903:"盐都区",320904:"大丰区",320921:"响水县",320922:"滨海县",320923:"阜宁县",320924:"射阳县",320925:"建湖县",320981:"东台市",321e3:"扬州市",321002:"广陵区",321003:"邗江区",321012:"江都区",321023:"宝应县",321081:"仪征市",321084:"高邮市",321100:"镇江市",321102:"京口区",321111:"润州区",321112:"丹徒区",321181:"丹阳市",321182:"扬中市",321183:"句容市",321200:"泰州市",321202:"海陵区",321203:"高港区",321204:"姜堰区",321281:"兴化市",321282:"靖江市",321283:"泰兴市",321300:"宿迁市",321302:"宿城区",321311:"宿豫区",321322:"沭阳县",321323:"泗阳县",321324:"泗洪县",33e4:"浙江省",330100:"杭州市",330102:"上城区",330105:"拱墅区",330106:"西湖区",330108:"滨江区",330109:"萧山区",330110:"余杭区",330111:"富阳区",330112:"临安区",330113:"临平区",330114:"钱塘区",330122:"桐庐县",330127:"淳安县",330182:"建德市",330200:"宁波市",330203:"海曙区",330205:"江北区",330206:"北仑区",330211:"镇海区",330212:"鄞州区",330213:"奉化区",330225:"象山县",330226:"宁海县",330281:"余姚市",330282:"慈溪市",330300:"温州市",330302:"鹿城区",330303:"龙湾区",330304:"瓯海区",330305:"洞头区",330324:"永嘉县",330326:"平阳县",330327:"苍南县",330328:"文成县",330329:"泰顺县",330381:"瑞安市",330382:"乐清市",330383:"龙港市",330400:"嘉兴市",330402:"南湖区",330411:"秀洲区",330421:"嘉善县",330424:"海盐县",330481:"海宁市",330482:"平湖市",330483:"桐乡市",330500:"湖州市",330502:"吴兴区",330503:"南浔区",330521:"德清县",330522:"长兴县",330523:"安吉县",330600:"绍兴市",330602:"越城区",330603:"柯桥区",330604:"上虞区",330624:"新昌县",330681:"诸暨市",330683:"嵊州市",330700:"金华市",330702:"婺城区",330703:"金东区",330723:"武义县",330726:"浦江县",330727:"磐安县",330781:"兰溪市",330782:"义乌市",330783:"东阳市",330784:"永康市",330800:"衢州市",330802:"柯城区",330803:"衢江区",330822:"常山县",330824:"开化县",330825:"龙游县",330881:"江山市",330900:"舟山市",330902:"定海区",330903:"普陀区",330921:"岱山县",330922:"嵊泗县",331e3:"台州市",331002:"椒江区",331003:"黄岩区",331004:"路桥区",331022:"三门县",331023:"天台县",331024:"仙居县",331081:"温岭市",331082:"临海市",331083:"玉环市",331100:"丽水市",331102:"莲都区",331121:"青田县",331122:"缙云县",331123:"遂昌县",331124:"松阳县",331125:"云和县",331126:"庆元县",331127:"景宁畲族自治县",331181:"龙泉市",34e4:"安徽省",340100:"合肥市",340102:"瑶海区",340103:"庐阳区",340104:"蜀山区",340111:"包河区",340121:"长丰县",340122:"肥东县",340123:"肥西县",340124:"庐江县",340181:"巢湖市",340200:"芜湖市",340202:"镜湖区",340207:"鸠江区",340209:"弋江区",340210:"湾沚区",340212:"繁昌区",340223:"南陵县",340281:"无为市",340300:"蚌埠市",340302:"龙子湖区",340303:"蚌山区",340304:"禹会区",340311:"淮上区",340321:"怀远县",340322:"五河县",340323:"固镇县",340400:"淮南市",340402:"大通区",340403:"田家庵区",340404:"谢家集区",340405:"八公山区",340406:"潘集区",340421:"凤台县",340422:"寿县",340500:"马鞍山市",340503:"花山区",340504:"雨山区",340506:"博望区",340521:"当涂县",340522:"含山县",340523:"和县",340600:"淮北市",340602:"杜集区",340603:"相山区",340604:"烈山区",340621:"濉溪县",340700:"铜陵市",340705:"铜官区",340706:"义安区",340711:"郊区",340722:"枞阳县",340800:"安庆市",340802:"迎江区",340803:"大观区",340811:"宜秀区",340822:"怀宁县",340825:"太湖县",340826:"宿松县",340827:"望江县",340828:"岳西县",340881:"桐城市",340882:"潜山市",341e3:"黄山市",341002:"屯溪区",341003:"黄山区",341004:"徽州区",341021:"歙县",341022:"休宁县",341023:"黟县",341024:"祁门县",341100:"滁州市",341102:"琅琊区",341103:"南谯区",341122:"来安县",341124:"全椒县",341125:"定远县",341126:"凤阳县",341181:"天长市",341182:"明光市",341200:"阜阳市",341202:"颍州区",341203:"颍东区",341204:"颍泉区",341221:"临泉县",341222:"太和县",341225:"阜南县",341226:"颍上县",341282:"界首市",341300:"宿州市",341302:"埇桥区",341321:"砀山县",341322:"萧县",341323:"灵璧县",341324:"泗县",341500:"六安市",341502:"金安区",341503:"裕安区",341504:"叶集区",341522:"霍邱县",341523:"舒城县",341524:"金寨县",341525:"霍山县",341600:"亳州市",341602:"谯城区",341621:"涡阳县",341622:"蒙城县",341623:"利辛县",341700:"池州市",341702:"贵池区",341721:"东至县",341722:"石台县",341723:"青阳县",341800:"宣城市",341802:"宣州区",341821:"郎溪县",341823:"泾县",341824:"绩溪县",341825:"旌德县",341881:"宁国市",341882:"广德市",35e4:"福建省",350100:"福州市",350102:"鼓楼区",350103:"台江区",350104:"仓山区",350105:"马尾区",350111:"晋安区",350112:"长乐区",350121:"闽侯县",350122:"连江县",350123:"罗源县",350124:"闽清县",350125:"永泰县",350128:"平潭县",350181:"福清市",350200:"厦门市",350203:"思明区",350205:"海沧区",350206:"湖里区",350211:"集美区",350212:"同安区",350213:"翔安区",350300:"莆田市",350302:"城厢区",350303:"涵江区",350304:"荔城区",350305:"秀屿区",350322:"仙游县",350400:"三明市",350404:"三元区",350405:"沙县区",350421:"明溪县",350423:"清流县",350424:"宁化县",350425:"大田县",350426:"尤溪县",350428:"将乐县",350429:"泰宁县",350430:"建宁县",350481:"永安市",350500:"泉州市",350502:"鲤城区",350503:"丰泽区",350504:"洛江区",350505:"泉港区",350521:"惠安县",350524:"安溪县",350525:"永春县",350526:"德化县",350527:"金门县",350581:"石狮市",350582:"晋江市",350583:"南安市",350600:"漳州市",350602:"芗城区",350603:"龙文区",350604:"龙海区",350605:"长泰区",350622:"云霄县",350623:"漳浦县",350624:"诏安县",350626:"东山县",350627:"南靖县",350628:"平和县",350629:"华安县",350700:"南平市",350702:"延平区",350703:"建阳区",350721:"顺昌县",350722:"浦城县",350723:"光泽县",350724:"松溪县",350725:"政和县",350781:"邵武市",350782:"武夷山市",350783:"建瓯市",350800:"龙岩市",350802:"新罗区",350803:"永定区",350821:"长汀县",350823:"上杭县",350824:"武平县",350825:"连城县",350881:"漳平市",350900:"宁德市",350902:"蕉城区",350921:"霞浦县",350922:"古田县",350923:"屏南县",350924:"寿宁县",350925:"周宁县",350926:"柘荣县",350981:"福安市",350982:"福鼎市",36e4:"江西省",360100:"南昌市",360102:"东湖区",360103:"西湖区",360104:"青云谱区",360111:"青山湖区",360112:"新建区",360113:"红谷滩区",360121:"南昌县",360123:"安义县",360124:"进贤县",360200:"景德镇市",360202:"昌江区",360203:"珠山区",360222:"浮梁县",360281:"乐平市",360300:"萍乡市",360302:"安源区",360313:"湘东区",360321:"莲花县",360322:"上栗县",360323:"芦溪县",360400:"九江市",360402:"濂溪区",360403:"浔阳区",360404:"柴桑区",360423:"武宁县",360424:"修水县",360425:"永修县",360426:"德安县",360428:"都昌县",360429:"湖口县",360430:"彭泽县",360481:"瑞昌市",360482:"共青城市",360483:"庐山市",360500:"新余市",360502:"渝水区",360521:"分宜县",360600:"鹰潭市",360602:"月湖区",360603:"余江区",360681:"贵溪市",360700:"赣州市",360702:"章贡区",360703:"南康区",360704:"赣县区",360722:"信丰县",360723:"大余县",360724:"上犹县",360725:"崇义县",360726:"安远县",360728:"定南<E5AE9A>县",360729:"全南县",360730:"宁都县",360731:"于都县",360732:"兴国县",360733:"会昌县",360734:"寻乌县",360735:"石城县",360781:"瑞金市",360783:"龙南市",360800:"吉安市",360802:"吉州区",360803:"青原区",360821:"吉安县",360822:"吉水县",360823:"峡江县",360824:"新干县",360825:"永丰县",360826:"泰和县",360827:"遂川县",360828:"万安县",360829:"安福县",360830:"永新县",360881:"井冈山市",360900:"宜春市",360902:"袁州区",360921:"奉新县",360922:"万载县",360923:"上高县",360924:"宜丰县",360925:"靖安县",360926:"铜鼓县",360981:"丰城市",360982:"樟树市",360983:"高安市",361e3:"抚州市",361002:"临川区",361003:"东乡区",361021:"南城县",361022:"黎川县",361023:"南丰县",361024:"崇仁县",361025:"乐安县",361026:"宜黄县",361027:"金溪县",361028:"资溪县",361030:"广昌县",361100:"上饶市",361102:"信州区",361103:"广丰区",361104:"广信区",361123:"玉山县",361124:"铅山县",361125:"横峰县",361126:"弋阳县",361127:"余干县",361128:"鄱阳县",361129:"万年县",361130:"婺源县",361181:"德兴市",37e4:"山东省",370100:"济南市",370102:"历下区",370103:"市中区",370104:"槐荫区",370105:"天桥区",370112:"历城区",370113:"长清区",370114:"章丘区",370115:"济阳区",370116:"莱芜区",370117:"钢城区",370124:"平阴县",370126:"商河县",370200:"青岛市",370202:"市南区",370203:"市北区",370211:"黄岛区",370212:"崂山区",370213:"李沧区",370214:"城阳区",370215:"即墨区",370281:"胶州市",370283:"平度市",370285:"莱西市",370300:"淄博市",370302:"淄川区",370303:"张店区",370304:"博山区",370305:"临淄区",370306:"周村区",370321:"桓台县",370322:"高青县",370323:"沂源县",370400:"枣庄市",370402:"市中区",370403:"薛城区",370404:"峄城区",370405:"台儿庄区",370406:"山亭区",370481:"滕州市",370500:"东营市",370502:"东营区",370503:"河口区",370505:"垦利区",370522:"利津县",370523:"广饶县",370600:"烟台市",370602:"芝罘区",370611:"福山区",370612:"牟平区",370613:"莱山区",370614:"蓬莱区",370681:"龙口市",370682:"莱阳市",370683:"莱州市",370685:"招远市",370686:"栖霞市",370687:"海阳市",370700:"潍坊市",370702:"潍城区",370703:"寒亭区",370704:"坊子区",370705:"奎文区",370724:"临朐县",370725:"昌乐县",370781:"青州市",370782:"诸城市",370783:"寿光市",370784:"安丘市",370785:"高密市",370786:"昌邑市",370800:"济宁市",370811:"任城区",370812:"兖州区",370826:"微山县",370827:"鱼台县",370828:"金乡县",370829:"嘉祥县",370830:"汶上县",370831:"泗水县",370832:"梁山县",370881:"曲阜市",370883:"邹城市",370900:"泰安市",370902:"泰山区",370911:"岱岳区",370921:"宁阳县",370923:"东平县",370982:"新泰市",370983:"肥城市",371e3:"威海市",371002:"环翠区",371003:"文登区",371082:"荣成市",371083:"乳山市",371100:"日照市",371102:"东港区",371103:"岚山区",371121:"五莲县",371122:"莒县",371300:"临沂市",371302:"兰山区",371311:"罗庄区",371312:"河东区",371321:"沂南县",371322:"郯城县",371323:"沂水县",371324:"兰陵县",371325:"费县",371326:"平邑县",371327:"莒南县",371328:"蒙阴县",371329:"临沭县",371400:"德州市",371402:"德城区",371403:"陵城区",371422:"宁津县",371423:"庆云县",371424:"临邑县",371425:"齐河县",371426:"平原县",371427:"夏津县",371428:"武城县",371481:"乐陵市",371482:"禹城市",371500:"聊城市",371502:"东昌府区",371503:"茌平区",371521:"阳谷县",371522:"莘县",371524:"东阿县",371525:"冠县",371526:"高唐县",371581:"临清市",371600:"滨州市",371602:"滨城区",371603:"沾化区",371621:"惠民县",371622:"阳信县",371623:"无棣县",371625:"博兴县",371681:"邹平市",371700:"菏泽市",371702:"牡丹区",371703:"定陶区",371721:"曹县",371722:"单县",371723:"成武县",371724:"巨野县",371725:"郓城县",371726:"鄄城县",371728:"东明县",41e4:"河南省",410100:"郑州市",410102:"中原区",410103:"二七区",410104:"管城回族区",410105:"金水区",410106:"上街区",410108:"惠济区",410122:"中牟县",410181:"巩义市",410182:"荥阳市",410183:"新密市",410184:"新郑市",410185:"登封市",410200:"开封市",410202:"龙亭区",410203:"顺河回族区",410204:"鼓楼区",410205:"禹王台区",410212:"祥符区",410221:"杞县",410222:"通许县",410223:"尉氏县",410225:"兰考县",410300:"洛阳市",410302:"老城区",410303:"西工区",410304:"瀍河回族区",410305:"涧西区",410307:"偃师区",410308:"孟津区",410311:"洛龙区",410323:"新安县",410324:"栾川县",410325:"嵩县",410326:"汝阳县",410327:"宜阳县",410328:"洛宁县",410329:"伊川县",410400:"平顶山市",410402:"新华区",410403:"卫东区",410404:"石龙区",410411:"湛河区",410421:"宝丰县",410422:"叶县",410423:"鲁山县",410425:"郏县",410481:"舞钢市",410482:"汝州市",410500:"安阳市",410502:"文峰区",410503:"北关区",410505:"殷都区",410506:"龙安区",410522:"安阳县",410523:"汤阴县",410526:"滑县",410527:"内黄县",410581:"林州市",410600:"鹤壁市",410602:"鹤山区",410603:"山城区",410611:"淇滨区",410621:"浚县",410622:"淇县",410700:"新乡市",410702:"红旗区",410703:"卫滨区",410704:"凤泉区",410711:"牧野区",410721:"新乡县",410724:"获嘉县",410725:"原阳县",410726:"延津县",410727:"封丘县",410781:"卫辉市",410782:"辉县市",410783:"长垣市",410800:"焦作市",410802:"解放区",410803:"中站区",410804:"马村区",410811:"山阳区",410821:"修武县",410822:"博爱县",410823:"武陟县",410825:"温县",410882:"沁阳市",410883:"孟州市",410900:"濮阳市",410902:"华龙区",410922:"清丰县",410923:"南乐县",410926:"范县",410927:"台前县",410928:"濮阳县",411e3:"许昌市",411002:"魏都区",411003:"建安区",411024:"鄢陵县",411025:"襄城县",411081:"禹州市",411082:"长葛市",411100:"漯河市",411102:"源汇区",411103:"郾城区",411104:"召陵区",411121:"舞阳县",411122:"临颍县",411200:"三门峡市",411202:"湖滨区",411203:"陕州区",411221:"渑池县",411224:"卢氏县",411281:"义马市",411282:"灵宝市",411300:"南阳市",411302:"宛城区",411303:"卧龙区",411321:"南召县",411322:"方城县",411323:"西峡县",411324:"镇平县",411325:"内乡县",411326:"淅川县",411327:"社旗县",411328:"唐河县",411329:"新野县",411330:"桐柏县",411381:"邓州市",411400:"商丘市",411402:"梁园区",411403:"睢阳区",411421:"民权县",411422:"睢县",411423:"宁陵县",411424:"柘城县",411425:"虞城县",411426:"夏邑县",411481:"永城市",411500:"信阳市",411502:"浉河区",411503:"平桥区",411521:"罗山县",411522:"光山县",411523:"新县",411524:"商城县",411525:"固始县",411526:"潢川县",411527:"淮滨县",411528:"息县",411600:"周口市",411602:"川汇区",411603:"淮阳区",411621:"扶沟县",411622:"西华县",411623:"商水县",411624:"沈丘县",411625:"郸城县",411627:"太康县",411628:"鹿邑县",411681:"项城市",411700:"驻马店市",411702:"驿城区",411721:"西平县",411722:"上蔡县",411723:"平舆县",411724:"正阳县",411725:"确山县",411726:"泌阳县",411727:"汝南县",411728:"遂平县",411729:"新蔡县",419001:"济源市",42e4:"湖北省",420100:"武汉市",420102:"江岸区",420103:"江汉区",420104:"硚口区",420105:"汉阳区",420106:"武昌区",420107:"青山区",420111:"洪山区",420112:"东西湖区",420113:"汉南区",420114:"蔡甸区",420115:"江夏区",420116:"黄陂区",420117:"新洲区",420200:"黄石市",420202:"黄石港区",420203:"西塞山区",420204:"下陆区",420205:"铁山区",420222:"阳新县",420281:"大冶市",420300:"十堰市",420302:"茅箭区",420303:"张湾区",420304:"郧阳区",420322:"郧西县",420323:"竹山县",420324:"竹溪县",420325:"房县",420381:"丹江口市",420500:"宜昌市",420502:"西陵区",420503:"伍家岗区",420504:"点军区",420505:"猇亭区",420506:"夷陵区",420525:"远安县",420526:"兴山县",420527:"秭归县",420528:"长阳土家族自治县",420529:"五峰土家族自治县",420581:"宜都市",420582:"当阳市",420583:"枝江市",420600:"襄阳市",420602:"襄城区",420606:"樊城区",420607:"襄州区",420624:"南漳县",420625:"谷城县",420626:"保康县",420682:"老河口市",420683:"枣阳市",420684:"宜城市",420700:"鄂州市",420702:"梁子湖区",420703:"华容区",420704:"鄂城区",420800:"荆门市",420802:"东宝区",420804:"掇刀区",420822:"沙洋县",420881:"钟祥市",420882:"京山市",420900:"孝感市",420902:"孝南区",420921:"孝昌县",420922:"大悟县",420923:"云梦县",420981:"应城市",420982:"安陆市",420984:"汉川市",421e3:"荆州市",421002:"沙市区",421003:"荆州区",421022:"公安县",421024:"江陵县",421081:"石首市",421083:"洪湖市",421087:"松滋市",421088:"监利市",421100:"黄冈市",421102:"黄州区",421121:"团风县",421122:"红安县",421123:"罗田县",421124:"英山县",421125:"浠水县",421126:"蕲春县",421127:"黄梅县",421181:"麻城市",421182:"武穴市",421200:"咸宁市",421202:"咸安区",421221:"嘉鱼县",421222:"通城县",421223:"崇阳县",421224:"通山县",421281:"赤壁市",421300:"随州市",421303:"曾都区",421321:"随县",421381:"广水市",422800:"恩施土家族苗族自治州",422801:"恩施市",422802:"利川市",422822:"建始县",422823:"巴东县",422825:"宣恩县",422826:"咸丰县",422827:"来凤县",422828:"鹤峰县",429004:"仙桃市",429005:"潜江市",429006:"天门市",429021:"神农架林区",43e4:"湖南省",430100:"长沙市",430102:"芙蓉区",430103:"天心区",430104:"岳麓区",430105:"开福区",430111:"雨花区",430112:"望城区",430121:"长沙县",430181:"浏阳市",430182:"宁乡市",430200:"株洲市",430202:"荷塘区",430203:"芦淞区",430204:"石峰区",430211:"天元区",430212:"渌口区",430223:"攸县",430224:"茶陵县",430225:"炎陵县",430281:"醴陵市",430300:"湘潭市",430302:"雨湖区",430304:"岳塘区",430321:"湘潭县",430381:"湘乡市",430382:"韶山市",430400:"衡阳市",430405:"珠晖区",430406:"雁峰区",430407:"石鼓区",430408:"蒸湘区",430412:"南岳区",430421:"衡阳县",430422:"衡南县",430423:"衡山县",430424:"衡东县",430426:"祁东县",430481:"耒阳市",430482:"常宁市",430500:"邵阳市",430502:"双清区",430503:"大祥区",430511:"北塔区",430522:"新邵县",430523:"邵阳县",430524:"隆回县",430525:"洞口县",430527:"绥宁县",430528:"新宁县",430529:"城步苗族自治县",430581:"武冈市",430582:"邵东市",430600:"岳阳市",430602:"岳阳楼区",430603:"云溪区",430611:"君山区",430621:"岳阳县",430623:"华容县",430624:"湘阴县",430626:"平江县",430681:"汨罗市",430682:"临湘市",430700:"常德市",430702:"武陵区",430703:"鼎城区",430721:"安乡县",430722:"汉寿县",430723:"澧县",430724:"临澧县",430725:"桃源县",430726:"石门县",430781:"津市市",430800:"张家界市",430802:"永定区",430811:"武陵源区",430821:"慈利县",430822:"桑植县",430900:"益阳市",430902:"资阳区",430903:"赫山区",430921:"南县",430922:"桃江县",430923:"安化县",430981:"沅江市",431e3:"郴州市",431002:"北湖区",431003:"苏仙区",431021:"桂阳县",431022:"宜章县",431023:"永兴县",431024:"嘉禾县",431025:"临武县",431026:"汝城县",431027:"桂东县",431028:"安仁县",431081:"资兴市",431100:"永州市",431102:"零陵区",431103:"冷水滩区",431122:"东安县",431123:"双牌县",431124:"道县",431125:"江永县",431126:"宁远县",431127:"蓝山县",431128:"新田县",431129:"江华瑶族自治县",431181:"祁阳市",431200:"怀化市",431202:"鹤城区",431221:"中方县",431222:"沅陵县",431223:"辰溪县",431224:"溆浦县",431225:"会同县",431226:"麻阳苗族自治县",431227:"新晃侗族自治县",431228:"芷江侗族自治县",431229:"靖州苗族侗族自治县",431230:"通道侗族自治县",431281:"洪江市",431300:"娄底市",431302:"娄星区",431321:"双峰县",431322:"新化县",431381:"冷水江市",431382:"涟源市",433100:"湘西土家族苗族自治州",433101:"吉首市",433122:"泸溪县",433123:"凤凰县",433124:"花垣县",433125:"保靖县",433126:"古丈县",433127:"永顺县",433130:"龙山县",44e4:"广东省",440100:"广州市",440103:"荔湾区",440104:"越秀区",440105:"海珠区",440106:"天河区",440111:"白云区",440112:"黄埔区",440113:"番禺区",440114:"花都区",440115:"南沙区",440117:"从化区",440118:"增城区",440200:"韶关市",440203:"武江区",440204:"浈江区",440205:"曲江区",440222:"始兴县",440224:"仁化县",440229:"翁源县",440232:"乳源瑶族自治县",440233:"新丰县",440281:"乐昌市",440282:"南雄市",440300:"深圳市",440303:"罗湖区",440304:"福田区",440305:"南山区",440306:"宝安区",440307:"龙岗区",440308:"盐田区",440309:"龙华区",440310:"坪山区",440311:"光明区",440400:"珠海市",440402:"香洲区",440403:"斗门区",440404:"金湾区",440500:"汕头市",440507:"龙湖区",440511:"金平区",440512:"濠江区",440513:"潮阳区",440514:"潮南区",440515:"澄海区",440523:"南澳县",440600:"佛山市",440604:"禅城区",440605:"南海区",440606:"顺德区",440607:"三水区",440608:"高明区",440700:"江门市",440703:"蓬江区",440704:"江海区",440705:"新会区",440781:"台山市",440783:"开平市",440784:"鹤山市",440785:"恩平市",440800:"湛江市",440802:"赤坎区",440803:"霞山区",440804:"坡头区",440811:"麻章区",440823:"遂溪县",440825:"徐闻县",440881:"廉江市",440882:"雷州市",440883:"吴川市",440900:"茂名市",440902:"茂南区",440904:"电白区",440981:"高州市",440982:"化州市",440983:"信宜市",441200:"肇庆市",441202:"端州区",441203:"鼎湖区",441204:"高要区",441223:"广宁县",441224:"怀集县",441225:"封开县",441226:"德庆县",441284:"四会市",441300:"惠州市",441302:"惠城区",441303:"惠阳区",441322:"博罗县",441323:"惠东县",441324:"龙门县",441400:"梅州市",441402:"梅江区",441403:"梅县区",441422:"大埔县",441423:"丰顺县",441424:"五华县",441426:"平远县",441427:"蕉岭县",441481:"兴宁市",441500:"汕尾市",441502:"城区",441521:"海丰县",441523:"陆河县",441581:"陆丰市",441600:"河源市",441602:"源城区",441621:"紫金县",441622:"龙川县",441623:"连平县",441624:"和平县",441625:"东源县",441700:"阳江市",441702:"江城区",441704:"阳东区",441721:"阳西县",441781:"阳春市",441800:"清远市",441802:"清城区",441803:"清新区",441821:"佛冈县",441823:"阳山县",441825:"连山壮族瑶族自治县",441826:"连南瑶族自治县",441881:"英德市",441882:"连州市",441900:"东莞市",442e3:"中山市",445100:"潮州市",445102:"湘桥区",445103:"潮安区",445122:"饶平县",445200:"揭阳市",445202:"榕城区",445203:"揭东区",445222:"揭西县",445224:"惠来县",445281:"普宁市",445300:"云浮市",445302:"云城区",445303:"云安区",445321:"新兴县",445322:"郁南县",445381:"罗定市",45e4:"广西壮族自治区",450100:"南宁市",450102:"兴宁区",450103:"青秀区",450105:"江南区",450107:"西乡塘区",450108:"良庆区",450109:"邕宁区",450110:"武鸣区",450123:"隆安县",450124:"马山县",450125:"上林县",450126:"宾阳县",450181:"横州市",450200:"柳州市",450202:"城中区",450203:"鱼峰区",450204:"柳南区",450205:"柳北区",450206:"柳江区",450222:"柳城县",450223:"鹿寨县",450224:"融安县",450225:"融水苗族自治县",450226:"三江侗族自治县",450300:"桂林市",450302:"秀峰区",450303:"叠彩区",450304:"象山区",450305:"七星区",450311:"雁山区",450312:"临桂区",450321:"阳朔县",450323:"灵川县",450324:"全州县",450325:"兴安县",450326:"永福县",450327:"灌阳县",450328:"龙胜各族自治县",450329:"资源县",450330:"平乐县",450332:"恭城瑶族自治县",450381:"荔浦市",450400:"梧州市",450403:"万秀区",450405:"长洲区",450406:"龙圩区",450421:"苍梧县",450422:"藤县",450423:"蒙山县",450481:"岑溪市",450500:"北海市",450502:"海城区",450503:"银海区",450512:"铁山港区",450521:"合浦县",450600:"防城港市",450602:"港口区",450603:"防城区",450621:"上思县",450681:"东兴市",450700:"钦州市",450702:"钦南区",450703:"钦北区",450721:"灵山县",450722:"浦北县",450800:"贵港市",450802:"港北区",450803:"港南区",450804:"覃塘区",450821:"平南县",450881:"桂平市",450900:"玉林市",450902:"玉州区",450903:"福绵区",450921:"容县",450922:"陆川县",450923:"博白县",450924:"兴业县",450981:"北流市",451e3:"百色市",451002:"右江区",451003:"田阳区",451022:"田东县",451024:"德保县",451026:"那坡县",451027:"凌云县",451028:"乐业县",451029:"田林县",451030:"西林县",451031:"隆林各族自治县",451081:"靖西市",451082:"平果市",451100:"贺州市",451102:"八步区",451103:"平桂区",451121:"昭平县",451122:"钟山县",451123:"富川瑶族自治县",451200:"河池市",451202:"金城江区",451203:"宜州区",451221:"南丹县",451222:"天峨县",451223:"凤山县",451224:"东兰县",451225:"罗城仫佬族自治县",451226:"环江毛南族自治县",451227:"巴马瑶族自治县",451228:"都安瑶族自治县",451229:"大化瑶族自治县",451300:"来宾市",451302:"兴宾区",451321:"忻城县",451322:"象州县",451323:"武宣县",451324:"金秀瑶族自治县",451381:"合山市",451400:"崇左市",451402:"江州区",451421:"扶绥县",451422:"宁明县",451423:"龙州县",451424:"大新县",451425:"天等县",451481:"凭祥市",46e4:"海南省",460100:"海口市",460105:"秀英区",460106:"龙华区",460107:"琼山区",460108:"美兰区",460200:"三亚市",460202:"海棠区",460203:"吉阳区",460204:"天涯区",460205:"崖州区",460300:"三沙市",460301:"西沙区",460302:"南沙区",460400:"儋州市",469001:"五指山市",469002:"琼海市",469005:"文昌市",469006:"万宁市",469007:"东方市",469021:"定安县",469022:"屯昌县",469023:"澄迈县",469024:"临高县",469025:"白沙黎族自治县",469026:"昌江黎族自治县",469027:"乐东黎族自治县",469028:"陵水黎族自治县",469029:"保亭黎族苗族自治县",469030:"琼中黎族苗族自治县",5e5:"重庆市",500101:"万州区",500102:"涪陵区",500103:"渝中区",500104:"大渡口区",500105:"江北区",500106:"沙坪坝区",500107:"九龙坡区",500108:"南岸区",500109:"北碚区",500110:"綦江区",500111:"大足区",500112:"渝北区",500113:"巴南区",500114:"黔江区",500115:"长寿区",500116:"江津区",500117:"合川区",500118:"永川区",500119:"南川区",500120:"璧山区",500151:"铜梁区",500152:"潼南区",500153:"荣昌区",500154:"开州区",500155:"梁平区",500156:"武隆区",500229:"城口县",500230:"丰都县",500231:"垫江县",500233:"忠县",500235:"云阳县",500236:"奉节县",500237:"巫山县",500238:"巫溪县",500240:"石柱土家族自治县",500241:"秀山土家族苗族自治县",500242:"酉阳土家族苗族自治县",500243:"彭水苗族土家族自治县",51e4:"四川省",510100:"成都市",510104:"锦江区",510105:"青羊区",510106:"金牛区",510107:"武侯区",510108:"成华区",510112:"龙泉驿区",510113:"青白江区",510114:"新都区",510115:"温江区",510116:"双流区",510117:"郫都区",510118:"新津区",510121:"金堂县",510129:"大邑县",510131:"蒲江县",510181:"都江堰市",510182:"彭州市",510183:"邛崃市",510184:"崇州市",510185:"简阳市",510300:"自贡市",510302:"自流井区",510303:"贡井区",510304:"大安区",510311:"沿滩区",510321:"荣县",510322:"富顺县",510400:"攀枝花市",510402:"东区",510403:"西区",510411:"仁和区",510421:"米易县",510422:"盐边县",510500:"泸州市",510502:"江阳区",510503:"纳溪区",510504:"龙马潭区",510521:"泸县",510522:"合江县",510524:"叙永县",510525:"古蔺县",510600:"德阳市",510603:"旌阳区",510604:"罗江区",510623:"中江县",510681:"广汉市",510682:"什邡市",510683:"绵竹市",510700:"绵阳市",510703:"涪城区",510704:"游仙区",510705:"安州区",510722:"三台县",510723:"盐亭县",510725:"梓潼县",510726:"北川羌族自治县",510727:"平武县",510781:"江油市",510800:"广元市",510802:"利州区",510811:"昭化区",510812:"朝天区",510821:"旺苍县",510822:"青川县",510823:"剑阁县",510824:"苍溪县",510900:"遂宁市",510903:"船山区",510904:"安居区",510921:"蓬溪县",510923:"大英县",510981:"射洪市",511e3:"内江市",511002:"市中区",511011:"东兴区",511024:"威远县",511025:"资中县",511083:"隆昌市",511100:"乐山市",511102:"市中区",511111:"沙湾区",511112:"五通桥区",511113:"金口河区",511123:"犍为县",511124:"井研县",511126:"夹江县",511129:"沐川县",511132:"峨边彝族自治县",511133:"马边彝族自治县",511181:"峨眉山市",511300:"南充市",511302:"顺庆区",511303:"高坪区",511304:"嘉陵区",511321:"南部县",511322:"营山县",511323:"蓬安县",511324:"仪陇县",511325:"西充县",511381:"阆中市",511400:"眉山市",511402:"东坡区",511403:"彭山区",511421:"仁寿县",511423:"洪雅县",511424:"丹棱县",511425:"青神县",511500:"宜宾市",511502:"翠屏区",511503:"南溪区",511504:"叙州区",511523:"江安县",511524:"长宁县",511525:"高县",511526:"珙县",511527:"筠连县",511528:"兴文县",511529:"屏山县",511600:"广安市",511602:"广安区",511603:"前锋区",511621:"岳池县",511622:"武胜县",511623:"邻水县",511681:"华蓥市",511700:"达州市",511702:"通川区",511703:"达川区",511722:"宣汉县",511723:"开江县",511724:"大竹县",511725:"渠县",511781:"万源市",511800:"雅安市",511802:"雨城区",511803:"名山区",511822:"荥经县",511823:"汉源县",511824:"石棉县",511825:"天全县",511826:"芦山县",511827:"宝兴县",511900:"巴中市",511902:"巴州区",511903:"恩阳区",511921:"通江县",511922:"南江县",511923:"平昌县",512e3:"资阳市",512002:"雁江区",512021:"安岳县",512022:"乐至县",513200:"阿坝藏族羌族自治州",513201:"马尔康市",513221:"汶川县",513222:"理县",513223:"茂县",513224:"松潘县",513225:"九寨沟县",513226:"金川县",513227:"小金县",513228:"黑水县",513230:"壤塘县",513231:"阿坝县",513232:"若尔盖县",513233:"红原县",513300:"甘孜藏族自治州",513301:"康定市",513322:"泸定县",513323:"丹巴县",513324:"九龙县",513325:"雅江县",513326:"道孚县",513327:"炉霍县",513328:"甘孜县",513329:"新龙县",513330:"德格县",513331:"白玉县",513332:"石渠县",513333:"色达县",513334:"理塘县",513335:"巴塘县",513336:"乡城县",513337:"稻城县",513338:"得荣县",513400:"凉山彝族自治州",513401:"西昌市",513402:"会理市",513422:"木里藏族自治县",513423:"盐源县",513424:"德昌县",513426:"会东县",513427:"宁南县",513428:"普格县",513429:"布拖县",513430:"金阳县",513431:"昭觉县",513432:"喜德县",513433:"冕宁县",513434:"越西县",513435:"甘洛县",513436:"美姑县",513437:"雷波县",52e4:"贵州省",520100:"贵阳市",520102:"南明区",520103:"云岩区",520111:"花溪区",520112:"乌当区",520113:"白云区",520115:"观山湖区",520121:"开阳县",520122:"息烽县",520123:"修文县",520181:"清镇市",520200:"六盘水市",520201:"钟山区",520203:"六枝特区",520204:"水城区",520281:"盘州市",520300:"遵义市",520302:"红花岗区",520303:"汇川区",520304:"播州区",520322:"桐梓县",520323:"绥阳县",520324:"正安县",520325:"道真仡佬族苗族自治县",520326:"务川仡佬族苗族自治县",520327:"凤冈县",520328:"湄潭县",520329:"余庆县",520330:"习水县",520381:"赤水市",520382:"仁怀市",520400:"安顺市",520402:"西秀区",520403:"平坝区",520422:"普定县",520423:"镇宁布依族苗族自治县",520424:"关岭布依族苗族自治县",520425:"紫云苗族布依族自治县",520500:"毕节市",520502:"七星关区",520521:"大方县",520523:"金沙县",520524:"织金县",520525:"纳雍县",520526:"威宁彝族回族苗族自治县",520527:"赫章县",520581:"黔西市",520600:"铜仁市",520602:"碧江区",520603:"万山区",520621:"江口县",520622:"玉屏侗族自治县",520623:"石阡县",520624:"思南县",520625:"印江土家族苗族自治县",520626:"德江县",520627:"沿河土家族自治县",520628:"松桃苗族自治县",522300:"黔西南布依族苗族自治州",522301:"兴义市",522302:"兴仁市",522323:"普安县",522324:"晴隆县",522325:"贞丰县",522326:"望谟县",522327:"册亨县",522328:"安龙县",522600:"黔东南苗族侗族自治州",522601:"凯里市",522622:"黄平县",522623:"施秉县",522624:"三穗县",522625:"镇远县",522626:"岑巩县",522627:"天柱县",522628:"锦屏县",522629:"剑河县",522630:"台江县",522631:"黎平县",522632:"榕江县",522633:"从江县",522634:"雷山县",522635:"麻江县",522636:"丹寨县",522700:"黔南布依族苗族自治州",522701:"都匀市",522702:"福泉市",522722:"荔波县",522723:"贵定县",522725:"瓮安县",522726:"独山县",522727:"平塘县",522728:"罗甸县",522729:"长顺县",522730:"龙里县",522731:"惠水县",522732:"三都水族自治县",53e4:"云南省",530100:"昆明市",530102:"五华区",530103:"盘龙区",530111:"官渡区",530112:"西山区",530113:"东川区",530114:"呈贡区",530115:"晋宁区",530124:"富民县",530125:"宜良县",530126:"石林彝族自治县",530127:"嵩明县",530128:"禄劝彝族苗族自治县",530129:"寻甸回族彝族自治县",530181:"安宁市",530300:"曲靖市",530302:"麒麟区",530303:"沾益区",530304:"马龙区",530322:"陆良县",530323:"师宗县",530324:"罗平县",530325:"富源县",530326:"会泽县",530381:"宣威市",530400:"玉溪市",530402:"红塔区",530403:"江川区",530423:"通海县",530424:"华宁县",530425:"易门县",530426:"峨山彝族自治县",530427:"新平彝族傣族自治县",530428:"元江哈尼族彝族傣族自治县",530481:"澄江市",530500:"保山市",530502:"隆阳区",530521:"施甸县",530523:"龙陵县",530524:"昌宁县",530581:"腾冲市",530600:"昭通市",530602:"昭阳区",530621:"鲁甸县",530622:"巧家县",530623:"盐津县",530624:"大关县",530625:"永善县",530626:"绥江县",530627:"镇雄县",530628:"彝良县",530629:"威信县",530681:"水富市",530700:"丽江市",530702:"古城区",530721:"玉龙纳西族自治县",530722:"永胜县",530723:"华坪县",530724:"宁蒗彝族自治县",530800:"普洱市",530802:"思茅区",530821:"宁洱哈尼族彝族自治县",530822:"墨江哈尼族自治县",530823:"景东彝族自治县",530824:"景谷傣族彝族自治县",530825:"镇沅彝族哈尼族拉祜族自治县",530826:"江城哈尼族彝族自治县",530827:"孟连傣族拉祜族佤族自治县",530828:"澜沧拉祜族自治县",530829:"西盟佤族自治县",530900:"临沧市",530902:"临翔区",530921:"凤庆县",530922:"云县",530923:"永德县",530924:"镇康县",530925:"双江拉祜族佤族布朗族傣族自治县",530926:"耿马傣族佤族自治县",530927:"沧源佤族自治县",532300:"楚雄彝族自治州",532301:"楚雄市",532302:"禄丰市",532322:"双柏县",532323:"牟定县",532324:"南华县",532325:"姚安县",532326:"大姚县",532327:"永仁县",532328:"元谋县",532329:"武定县",532500:"红河哈尼族彝族自治州",532501:"个旧市",532502:"开远市",532503:"蒙自市",532504:"弥勒市",532523:"屏边苗族自治县",532524:"建水县",532525:"石屏县",532527:"泸西县",532528:"元阳县",532529:"红河县",532530:"金平苗族瑶族傣族自治县",532531:"绿春县",532532:"河口瑶族自治县",532600:"文山壮族苗族自治州",532601:"文山市",532622:"砚山县",532623:"西畴县",532624:"麻栗坡县",532625:"马关县",532626:"丘北县",532627:"广南县",532628:"富宁县",532800:"西双版纳傣族自治州",532801:"景洪市",532822:"勐海县",532823:"勐腊县",532900:"大理白族自治州",532901:"大理市",532922:"漾濞彝族自治县",532923:"祥云县",532924:"宾川县",532925:"弥渡县",532926:"南涧彝族自治县",532927:"巍山彝族回族自治县",532928:"永平县",532929:"云龙县",532930:"洱源县",532931:"剑川县",532932:"鹤庆县",533100:"德宏傣族景颇族自治州",533102:"瑞丽市",533103:"芒市",533122:"梁河县",533123:"盈江县",533124:"陇川县",533300:"怒江傈僳族自治州",533301:"泸水市",533323:"福贡县",533324:"贡山独龙族怒族自治县",533325:"兰坪白族普米族自治县",533400:"迪庆藏族自治州",533401:"香格里拉市",533422:"德钦县",533423:"维西傈僳族自治县",54e4:"西藏自治区",540100:"拉萨市",540102:"城关区",540103:"堆龙德庆区",540104:"达孜区",540121:"林周县",540122:"当雄县",540123:"尼木县",540124:"曲水县",540127:"墨竹工卡县",540200:"日喀则市",540202:"桑珠孜区",540221:"南木林县",540222:"江孜县",540223:"定日县",540224:"萨迦县",540225:"拉孜县",540226:"昂仁县",540227:"谢通门县",540228:"白朗县",540229:"仁布县",540230:"康马县",540231:"定结县",540232:"仲巴县",540233:"亚东县",540234:"吉隆县",540235:"聂拉木县",540236:"萨嘎县",540237:"岗巴县",540300:"昌都市",540302:"卡若区",540321:"江达县",540322:"贡觉县",540323:"类乌齐县",540324:"丁青县",540325:"察雅县",540326:"八宿县",540327:"左贡县",540328:"芒康县",540329:"洛隆县",540330:"边坝县",540400:"林芝市",540402:"巴宜区",540421:"工布江达县",540422:"米林市",540423:"墨脱县",540424:"波密县",540425:"察隅县",540426:"朗县",540500:"山南市",540502:"乃东区",540521:"扎囊县",540522:"贡嘎县",540523:"桑日县",540524:"琼结县",540525:"曲松县",540526:"措美县",540527:"洛扎县",540528:"加查县",540529:"隆子县",540530:"错那市",540531:"浪卡子县",540600:"那曲市",540602:"色尼区",540621:"嘉黎县",540622:"比如县",540623:"聂荣县",540624:"安多县",540625:"申扎县",540626:"索县",540627:"班戈县",540628:"巴青县",540629:"尼玛县",540630:"双湖县",542500:"阿里地区",542521:"普兰县",542522:"札达县",542523:"噶尔县",542524:"日土县",542525:"革吉县",542526:"改则县",542527:"措勤县",61e4:"陕西省",610100:"西安市",610102:"新城区",610103:"碑林区",610104:"莲湖区",610111:"灞桥区",610112:"未央区",610113:"雁塔区",610114:"阎良区",610115:"临潼区",610116:"长安区",610117:"高陵区",610118:"鄠邑区",610122:"蓝田县",610124:"周至县",610200:"铜川市",610202:"王益区",610203:"印台区",610204:"耀州区",610222:"宜君县",610300:"宝鸡市",610302:"渭滨区",610303:"金台区",610304:"陈仓区",610305:"凤翔区",610323:"岐山县",610324:"扶风县",610326:"眉县",610327:"陇县",610328:"千阳县",610329:"麟游县",610330:"凤县",610331:"太白县",610400:"咸阳市",610402:"秦都区",610403:"杨陵区",610404:"渭城区",610422:"三原县",610423:"泾阳县",610424:"乾县",610425:"礼泉县",610426:"永寿县",610428:"长武县",610429:"旬邑县",610430:"淳化县",610431:"武功县",610481:"兴平市",610482:"彬州市",610500:"渭南市",610502:"临渭区",610503:"华州区",610522:"潼关县",610523:"大荔县",610524:"合阳县",610525:"澄城县",610526:"蒲城县",610527:"白水县",610528:"富平县",610581:"韩城市",610582:"华阴市",610600:"延安市",610602:"宝塔区",610603:"安塞区",610621:"延长县",610622:"延川县",610625:"志丹县",610626:"吴起县",610627:"甘泉县",610628:"富县",610629:"洛川县",610630:"宜川县",610631:"黄龙县",610632:"黄陵县",610681:"子长市",610700:"汉中市",610702:"汉台区",610703:"南郑区",610722:"城固县",610723:"洋县",610724:"西乡县",610725:"勉县",610726:"宁强县",610727:"略阳县",610728:"镇巴县",610729:"留坝县",610730:"佛坪县",610800:"榆林市",610802:"榆阳区",610803:"横山区",610822:"府谷县",610824:"靖边县",610825:"定边县",610826:"绥德县",610827:"米脂县",610828:"佳县",610829:"吴堡县",610830:"清涧县",610831:"子洲县",610881:"神木市",610900:"安康市",610902:"汉滨区",610921:"汉阴县",610922:"石泉县",610923:"宁陕县",610924:"紫阳县",610925:"岚皋县",610926:"平利县",610927:"镇坪县",610929:"白河县",610981:"旬阳市",611e3:"商洛市",611002:"商州区",611021:"洛南县",611022:"丹凤县",611023:"商南县",611024:"山阳县",611025:"镇安县",611026:"柞水县",62e4:"甘肃省",620100:"兰州市",620102:"城关区",620103:"七里河区",620104:"西固区",620105:"安宁区",620111:"红古区",620121:"永登县",620122:"皋兰县",620123:"榆中县",620200:"嘉峪关市",620300:"金昌市",620302:"金川区",620321:"永昌县",620400:"白银市",620402:"白银区",620403:"平川区",620421:"靖远县",620422:"会宁县",620423:"景泰县",620500:"天水市",620502:"秦州区",620503:"麦积区",620521:"清水县",620522:"秦安县",620523:"甘谷县",620524:"武山县",620525:"张家川回族自治县",620600:"武威市",620602:"凉州区",620621:"民勤县",620622:"古浪县",620623:"天祝藏族自治县",620700:"张掖市",620702:"甘州区",620721:"肃南裕固族自治县",620722:"民乐县",620723:"临泽县",620724:"高台县",620725:"山丹县",620800:"平凉市",620802:"崆峒区",620821:"泾川县",620822:"灵台县",620823:"崇信县",620825:"庄浪县",620826:"静宁县",620881:"华亭市",620900:"酒泉市",620902:"肃州区",620921:"金塔县",620922:"瓜州县",620923:"肃北蒙古族自治县",620924:"阿克塞哈萨克族自治县",620981:"玉门市",620982:"敦煌市",621e3:"庆阳市",621002:"西峰区",621021:"庆城县",621022:"环县",621023:"华池县",621024:"合水县",621025:"正宁县",621026:"宁县",621027:"镇原县",621100:"定西市",621102:"安定区",621121:"通渭县",621122:"陇西县",621123:"渭源县",621124:"临洮县",621125:"漳县",621126:"岷县",621200:"陇南市",621202:"武都区",621221:"成县",621222:"文县",621223:"宕昌县",621224:"康县",621225:"西和县",621226:"礼县",621227:"徽县",621228:"两当县",622900:"临夏回族自治州",622901:"临夏市",622921:"临夏县",622922:"康乐县",622923:"永靖县",622924:"广河县",622925:"和政县",622926:"东乡族自治县",622927:"积石山保安族东乡族撒拉族自治县",623e3:"甘南藏族自治州",623001:"合作市",623021:"临潭县",623022:"卓尼县",623023:"舟曲县",623024:"迭部县",623025:"玛曲县",623026:"碌曲县",623027:"夏河县",63e4:"青海省",630100:"西宁市",630102:"城东区",630103:"城中区",630104:"城西区",630105:"城北区",630106:"湟中区",630121:"大通回族土族自治县",630123:"湟源县",630200:"海东市",630202:"乐都区",630203:"平安区",630222:"民和回族土族自治县",630223:"互助土族自治县",630224:"化隆回族自治县",630225:"循化撒拉族自治县",632200:"海北藏族自治州",632221:"门源回族自治县",632222:"祁连县",632223:"海晏县",632224:"刚察县",632300:"黄南藏族自治州",632301:"同仁市",632322:"尖扎县",632323:"泽库县",632324:"河南蒙古族自治县",632500:"海南藏族自治州",632521:"共和县",632522:"同德县",632523:"贵德县",632524:"兴海县",632525:"贵南县",632600:"果洛藏族自治州",632621:"玛沁县",632622:"班玛县",632623:"甘德县",632624:"达日县",632625:"久治县",632626:"玛多县",632700:"玉树藏族自治州",632701:"玉树市",632722:"杂多县",632723:"称多县",632724:"治多县",632725:"囊谦县",632726:"曲麻莱县",632800:"海西蒙古族藏族自治州",632801:"格尔木市",632802:"德令哈市",632803:"茫崖市",632821:"乌兰县",632822:"都兰县",632823:"天峻县",632825:"海西蒙古族藏族自治州直辖",64e4:"宁夏回族自治区",640100:"银川市",640104:"兴庆区",640105:"西夏区",640106:"金凤区",640121:"永宁县",640122:"贺兰县",640181:"灵武市",640200:"石嘴山市",640202:"大武口区",640205:"惠农区",640221:"平罗县",640300:"吴忠市",640302:"利通区",640303:"红寺堡区",640323:"盐池县",640324:"同心县",640381:"青铜峡市",640400:"固原市",640402:"原州区",640422:"西吉县",640423:"隆德县",640424:"泾源县",640425:"彭阳县",640500:"中卫市",640502:"沙坡头区",640521:"中宁县",640522:"海原县",65e4:"新疆维吾尔自治区",650100:"乌鲁木齐市",650102:"天山区",650103:"沙依巴克区",650104:"新市区",650105:"水磨沟区",650106:"头屯河区",650107:"达坂城区",650109:"米东区",650121:"乌鲁木齐县",650200:"克拉玛依市",650202:"独山子区",650203:"克拉玛依区",650204:"白碱滩区",650205:"乌尔禾区",650400:"吐鲁番市",650402:"高昌区",650421:"鄯善县",650422:"托克逊县",650500:"哈密市",650502:"伊州区",650521:"巴里坤哈萨克自治县",650522:"伊吾县",652300:"昌吉回族自治州",652301:"昌吉市",652302:"阜康市",652323:"呼图壁县",652324:"玛纳斯县",652325:"奇台县",652327:"吉木萨尔县",652328:"木垒哈萨克自治县",652700:"博尔塔拉蒙古自治州",652701:"博乐市",652702:"阿拉山口市",652722:"精河县",652723:"温泉县",652800:"巴音郭楞蒙古自治州",652801:"库尔勒市",652822:"轮台县",652823:"尉犁县",652824:"若羌县",652825:"且末县",652826:"焉耆回族自治县",652827:"和静县",652828:"和硕县",652829:"博湖县",652900:"阿克苏地区",652901:"阿克苏市",652902:"库车市",652922:"温宿县",652924:"沙雅县",652925:"新和县",652926:"拜城县",652927:"乌什县",652928:"阿瓦提县",652929:"柯坪县",653e3:"克孜勒苏柯尔克孜自治州",653001:"阿图什市",653022:"阿克陶县",653023:"阿合奇县",653024:"乌恰县",653100:"喀什地区",653101:"喀什市",653121:"疏附县",653122:"疏勒县",653123:"英吉沙县",653124:"泽普县",653125:"莎车县",653126:"叶城县",653127:"麦盖提县",653128:"岳普湖县",653129:"伽师县",653130:"巴楚县",653131:"塔什库尔干塔吉克自治县",653200:"和田地区",653201:"和田市",653221:"和田县",653222:"墨玉县",653223:"皮山县",653224:"洛浦县",653225:"策勒县",653226:"于田县",653227:"民丰县",654e3:"伊犁哈萨克自治州",654002:"伊宁市",654003:"奎屯市",654004:"霍尔果斯市",654021:"伊宁县",654022:"察布查尔锡伯自治县",654023:"霍城县",654024:"巩留县",654025:"新源县",654026:"昭苏县",654027:"特克斯县",654028:"尼勒克县",654200:"塔城地区",654201:"塔城市",654202:"乌苏市",654203:"沙湾市",654221:"额敏县",654224:"托里县",654225:"裕民县",654226:"和布克赛尔蒙古自治县",654300:"阿勒泰地区",654301:"阿勒泰市",654321:"布尔津县",654322:"富蕴县",654323:"福海县",654324:"哈巴河县",654325:"青河县",654326:"吉木乃县",659001:"石河子市",659002:"阿拉尔市",659003:"图木舒克市",659004:"五家渠市",659005:"北屯市",659006:"铁门关市",659007:"双河市",659008:"可克达拉市",659009:"昆玉市",659010:"胡杨河市",659011:"新星市",71e4:"台湾省",81e4:"香港特别行政区",810001:"中西区",810002:"湾仔区",810003:"东区",810004:"南区",810005:"油尖旺区",810006:"深水埗区",810007:"九龙城区",810008:"黄大仙区",810009:"观塘区",810010:"荃湾区",810011:"屯门区",810012:"元朗区",810013:"北区",810014:"大埔区",810015:"西贡区",810016:"沙田区",810017:"葵青区",810018:"离岛区",82e4:"澳门特别行政区",820001:"花地玛堂区",820002:"花王堂区",820003:"望德堂区",820004:"大堂区",820005:"风顺堂区",820006:"嘉模堂区",820007:"路凼填海区",820008:"圣方济各堂区",110100:"北京市市辖区",120100:"天津市市辖区",130101:"石家庄市市辖区",130201:"唐山市市辖区",130301:"秦皇岛市市辖区",130401:"邯郸市市辖区",130501:"邢台市市辖区",130601:"保定市市辖区",130701:"张家口市市辖区",130801:"承德市市辖区",130901:"沧州市市辖区",131001:"廊坊市市辖区",131101:"衡水市市辖区",140101:"太原市市辖区",140201:"大同市市辖区",140301:"阳泉市市辖区",140401:"长治市市辖区",140501:"晋城市市辖区",140601:"朔州市市辖区",140701:"晋中市市辖区",140801:"运城市市辖区",140901:"忻州市市辖区",141001:"临汾市市辖区",141101:"吕梁市市辖区",150101:"呼和浩特市市辖区",150201:"包头市市辖区",150301:"乌海市市辖区",150401:"赤峰市市辖区",150501:"通辽市市辖区",150601:"鄂尔多斯市市辖区",150701:"呼伦贝尔市市辖区",150801:"巴彦淖尔市市辖区",150901:"乌兰察布市市辖区",210101:"沈阳市市辖区",210201:"大连市市辖区",210301:"鞍山市市辖区",210401:"抚顺市市辖区",210501:"本溪市市辖区",210601:"丹东市市辖区",210701:"锦州市市辖区",210801:"营口市市辖区",210901:"阜新市市辖区",211001:"辽阳市市辖区",211101:"盘锦市市辖区",211201:"铁岭市市辖区",211301:"朝阳市市辖区",211401:"葫芦岛市市辖区",220101:"长春市市辖区",220201:"吉林市市辖区",220301:"四平市市辖区",220401:"辽源市市辖区",220501:"通化市市辖区",220601:"白山市市辖区",220701:"松原市市辖区",220801:"白城市市辖区",230101:"哈尔滨市市辖区",230201:"齐齐哈尔市市辖区",230301:"鸡西市市辖区",230401:"鹤岗市市辖区",230501:"双鸭山市市辖区",230601:"大庆市市辖区",230701:"伊春市市辖区",230801:"佳木斯市市辖区",230901:"七台河市市辖区",231001:"牡丹江市市辖区",231101:"黑河市市辖区",231201:"绥化市市辖区",310100:"上海市市辖区",320101:"南京市市辖区",320201:"无锡市市辖区",320301:"徐州市市辖区",320401:"常州市市辖区",320501:"苏州市市辖区",320601:"南通市市辖区",320701:"连云港市市辖区",320801:"淮安市市辖区",320901:"盐城市市辖区",321001:"扬州市市辖区",321101:"镇江市市辖区",321201:"泰州市市辖区",321301:"宿迁市市辖区",330101:"杭州市市辖区",330201:"宁波市市辖区",330301:"温州市市辖区",330401:"嘉兴市市辖区",330501:"湖州市市辖区",330601:"绍兴市市辖区",330701:"金华市市辖区",330801:"衢州市市辖区",330901:"舟山市市辖区",331001:"台州市市辖区",331101:"丽水市市辖区",340101:"合肥市市辖区",340201:"芜湖市市辖区",340301:"蚌埠市市辖区",340401:"淮南市市辖区",340501:"马鞍山市市辖区",340601:"淮北市市辖区",340701:"铜陵市市辖区",340801:"安庆市市辖区",341001:"黄山市市辖区",341101:"滁州市市辖区",341201:"阜阳市市辖区",341301:"宿州市市辖区",341501:"六安市市辖区",341601:"亳州市市辖区",341701:"池州市市辖区",341801:"宣城市市辖区",350101:"福州市市辖区",350201:"厦门市市辖区",350301:"莆田市市辖区",350401:"三明市市辖区",350501:"泉州市市辖区",350601:"漳州市市辖区",350701:"南平市市辖区",350801:"龙岩市市辖区",350901:"宁德市市辖区",360101:"南昌市市辖区",360201:"景德镇市市辖区",360301:"萍乡市市辖区",360401:"九江市市辖区",360501:"新余市市辖区",360601:"鹰潭市市辖区",360701:"赣州市市辖区",360801:"吉安市市辖区",360901:"宜春市市辖区",361001:"抚州市市辖区",361101:"上饶市市辖区",370101:"济南市市辖区",370201:"青岛市市辖区",370301:"淄博市市辖区",370401:"枣庄市市辖区",370501:"东营市市辖区",370601:"烟台市市辖区",370701:"潍坊市市辖区",370801:"济宁市市辖区",370901:"泰安市市辖区",371001:"威海市市辖区",371101:"日照市市辖区",371301:"临沂市市辖区",371401:"德州市市辖区",371501:"聊城市市辖区",371601:"滨州市市辖区",371701:"菏泽市市辖区",410101:"郑州市市辖区",410201:"开封市市辖区",410301:"洛阳市市辖区",410401:"平顶山市市辖区",410501:"安阳市市辖区",410601:"鹤壁市市辖区",410701:"新乡市市辖区",410801:"焦作市市辖区",410901:"濮阳市市辖区",411001:"许昌市市辖区",411101:"漯河市市辖区",411201:"三门峡市市辖区",411301:"南阳市市辖区",411401:"商丘市市辖区",411501:"信阳市市辖区",411601:"周口市市辖区",411701:"驻马店市市辖区",420101:"武汉市市辖区",420201:"黄石市市辖区",420301:"十堰市市辖区",420501:"宜昌市市辖区",420601:"襄阳市市辖区",420701:"鄂州市市辖区",420801:"荆门市市辖区",420901:"孝感市市辖区",421001:"荆州市市辖区",421101:"黄冈市市辖区",421201:"咸宁市市辖区",421301:"随州市市辖区",430101:"长沙市市辖区",430201:"株洲市市辖区",430301:"湘潭市市辖区",430401:"衡阳市市辖区",430501:"邵阳市市辖区",430601:"岳阳市市辖区",430701:"常德市市辖区",430801:"张家界市市辖区",430901:"益阳市市辖区",431001:"郴州市市辖区",431101:"永州市市辖区",431201:"怀化市市辖区",431301:"娄底市市辖区",440101:"广州市市辖区",440201:"韶关市市辖区",440301:"深圳市市辖区",440401:"珠海市市辖区",440501:"汕头市市辖区",440601:"佛山市市辖区",440701:"江门市市辖区",440801:"湛江市市辖区",440901:"茂名市市辖区",441201:"肇庆市市辖区",441301:"惠州市市辖区",441401:"梅州市市辖区",441501:"汕尾市市辖区",441601:"河源市市辖区",441701:"阳江市市辖区",441801:"清远市市辖区",445101:"潮州市市辖区",445201:"揭阳市市辖区",445301:"云浮市市辖区",450101:"南宁市市辖区",450201:"柳州市市辖区",450301:"桂林市市辖区",450401:"梧州市市辖区",450501:"北海市市辖区",450601:"防城港市市辖区",450701:"钦州市市辖区",450801:"贵港市市辖区",450901:"玉林市市辖区",451001:"百色市市辖区",451101:"贺州市市辖区",451201:"河池市市辖区",451301:"来宾市市辖区",451401:"崇左市市辖区",460101:"海口市市辖区",460201:"三亚市市辖区",500100:"重庆市市辖区",510101:"成都市市辖区",510301:"自贡市市辖区",510401:"攀枝花市市辖区",510501:"泸州市市辖区",510601:"德阳市市辖区",510701:"绵阳市市辖区",510801:"广元市市辖区",510901:"遂宁市市辖区",511001:"内江市市辖区",511101:"乐山市市辖区",511301:"南充市市辖区",511401:"眉山市市辖区",511501:"宜宾市市辖区",511601:"广安市市辖区",511701:"达州市市辖区",511801:"雅安市市辖区",511901:"巴中市市辖区",512001:"资阳市市辖区",520101:"贵阳市市辖区",520301:"遵义市市辖区",520401:"安顺市市辖区",530101:"昆明市市辖区",530301:"曲靖市市辖区",530401:"玉溪市市辖区",530501:"保山市市辖区",530601:"昭通市市辖区",530701:"丽江市市辖区",530801:"普洱市市辖区",530901:"临沧市市辖区",540101:"拉萨市市辖区",610101:"西安市市辖区",610201:"铜川市市辖区",610301:"宝鸡市市辖区",610401:"咸阳市市辖区",610501:"渭南市市辖区",610601:"延安市市辖区",610701:"汉中市市辖区",610801:"榆林市市辖区",610901:"安康市市辖区",611001:"商洛市市辖区",620101:"兰州市市辖区",620201:"嘉峪关市市辖区",620301:"金昌市市辖区",620401:"白银市市辖区",620501:"天水市市辖区",620601:"武威市市辖区",620701:"张掖市市辖区",620801:"平凉市市辖区",620901:"酒泉市市辖区",621001:"庆阳市市辖区",621101:"定西市市辖区",621201:"陇南市市辖区",630101:"西宁市市辖区",640101:"银川市市辖区",640201:"石嘴山市市辖区",640301:"吴忠市市辖区",640401:"固原市市辖区",640501:"中卫市市辖区",650101:"乌鲁木齐市市辖区",650201:"克拉玛依市市辖区"},t=[],u={},n={};Object.keys(a).forEach((function(e){var r=parseInt(e,10);if(r%1e4)if(r%100){var s=r-r%100;n[i=r-r%1e4]&&Array.isArray(n[i][s])?n[i][s].push(r):!n[i]||Array.isArray(n[i])?(n[i]=n[i]||[],n[i].push(r)):u[i].push(r)}else{var i;u[i=r-r%1e4].push(r),n[i]=n[i]||{},n[i][r]=[]}else t.push(r),u[r]=[]})),r.city=u,r.default=a,r.district=n,r.province=t}));
|
||
;/*!node_modules/amis-ui/lib/components/Tinymce.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/Tinymce",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),a=e("node_modules/tinymce/tinymce");e("node_modules/tinymce/icons/default/index"),e("node_modules/tinymce/themes/silver/index"),e("node_modules/tinymce/models/dom/model"),e("node_modules/tinymce/plugins/advlist/index"),e("node_modules/tinymce/plugins/autolink/index"),e("node_modules/tinymce/plugins/autoresize/index"),e("node_modules/tinymce/plugins/lists/index"),e("node_modules/tinymce/plugins/link/index"),e("node_modules/tinymce/plugins/image/index"),e("node_modules/tinymce/plugins/charmap/index"),e("node_modules/tinymce/plugins/preview/index"),e("node_modules/tinymce/plugins/anchor/index"),e("node_modules/tinymce/plugins/searchreplace/index"),e("node_modules/tinymce/plugins/visualblocks/index"),e("node_modules/tinymce/plugins/code/index"),e("node_modules/tinymce/plugins/fullscreen/index"),e("node_modules/tinymce/plugins/insertdatetime/index"),e("node_modules/tinymce/plugins/media/index"),e("node_modules/tinymce/plugins/table/index"),e("node_modules/tinymce/plugins/help/index"),e("node_modules/tinymce/plugins/wordcount/index"),e("node_modules/tinymce/plugins/pagebreak/index"),e("node_modules/tinymce/plugins/visualchars/index"),e("node_modules/tinymce/plugins/template/index"),e("node_modules/tinymce/plugins/nonbreaking/index"),e("node_modules/tinymce/plugins/emoticons/index"),e("node_modules/tinymce/plugins/emoticons/js/emojis"),e("node_modules/tinymce/plugins/quickbars/plugin"),e("node_modules/tinymce/plugins/help/js/i18n/keynav/zh_CN"),e("node_modules/tinymce/plugins/help/js/i18n/keynav/en"),e("node_modules/tinymce/plugins/help/js/i18n/keynav/de");var l=e("node_modules/amis-core/lib/index"),s=e("node_modules/lodash/isEqual");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(r),c=d(a),m=d(s),p=e("node_modules/react/index"),g=(p.default||p).createElement;(p.default||p).Fragment;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.unmounted=!1,t.editorInitialized=!1,t.elementRef=u.default.createRef(),t}return i.__extends(t,e),t.prototype.componentDidMount=function(){this.initTiny()},t.prototype.componentDidUpdate=function(e){var t,n=this.props;n.model!==e.model&&n.model!==this.currentContent&&this.editorInitialized&&(null===(t=this.editor)||void 0===t||t.setContent(this.currentContent=n.model||"")),this.editor&&!m.default(this.props.config,e.config)&&(this.editor.contentWindow.removeEventListener("unload",this.handleIframeUnload),c.default.remove(this.editor),this.initTiny())},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.contentWindow.removeEventListener("unload",this.handleIframeUnload),c.default.remove(this.editor)),this.unmounted=!0},t.prototype.initTiny=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,n,o,r=this;return i.__generator(this,(function(a){switch(a.label){case 0:return e=this.props.locale,t=this.props.config||{},n=t.onLoaded,o=i.__rest(t,["onLoaded"]),this.config=i.__assign(i.__assign({inline:!1,skin:!1,content_css:!1,height:400,language:e&&"zh-CN"!==e?"en":"zh_CN",branding:!1,plugins:["advlist","autolink","autoresize","link","image","lists","charmap","preview","anchor","pagebreak","searchreplace","wordcount","visualblocks","visualchars","code","fullscreen","insertdatetime","media","nonbreaking","table","emoticons","template","help","quickbars"],toolbar:"undo redo | blocks | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media | fontfamily fontsize forecolor backcolor emoticons | print help",quickbars_selection_toolbar:"bold italic | link h2 h3 blockquote",quickbars_insert_toolbar:"quickimage quicktable",menu:{file:{title:"File",items:"newdocument restoredraft | preview | print "},edit:{title:"Edit",items:"undo redo | cut copy paste | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontsize align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"code wordcount"},table:{title:"Table",items:"inserttable | cell row column | tableprops deletetable"},help:{title:"Help",items:"help"}},paste_data_images:!0,content_style:[".mce-content-body div.mce-resizehandle { background-color: #4099ff; border-color: #4099ff; border-style: solid; border-width: 1px; box-sizing: border-box; height: 10px; position: absolute; width: 10px; z-index: 1298 } .mce-content-body .mce-clonedresizable { cursor: default; opacity: .5; outline: 1px dashed #000; position: absolute; z-index: 10001 }","[data-mce-bogus] video {display:none;}"].join("\n")},o),{target:this.elementRef.current,readOnly:this.props.disabled,promotion:!1,setup:function(e){r.editor=e,e.on("init",(function(t){r.editorInitialized=!0,r.initEditor(t,e)}))}}),[4,null==n?void 0:n(c.default)];case 1:return a.sent(),this.unmounted||c.default.init(this.config),[2]}}))}))},t.prototype.handleIframeUnload=function(){var e=this;this.editor.contentWindow.removeEventListener("unload",this.handleIframeUnload),requestAnimationFrame((function(){c.default.remove(e.editor),e.initTiny()}))},t.prototype.initEditor=function(e,t){var n=this,o=this.props,i=o.model,r=o.onModelChange,a=o.outputFormat,l=o.onFocus,s=o.onBlur,d=i||"";t.setContent(this.currentContent=d),r&&t.on("change keyup setcontent",(function(e){var o=t.getContent({format:a});o!==n.currentContent&&(n.currentContent=o,r(o))})),l&&t.on("focus",l),s&&t.on("blur",s),t.contentWindow.addEventListener("unload",this.handleIframeUnload)},t.prototype.render=function(){return g("textarea",{ref:this.elementRef})},t.defaultProps={outputFormat:"html"},i.__decorate([l.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],t.prototype,"initTiny",null),i.__decorate([l.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"handleIframeUnload",null),t}(u.default.Component);c.default.addI18n("zh_CN",{Redo:"重做",Undo:"撤销",Cut:"剪切",Copy:"复制",Paste:"粘贴","Select all":"全选","New document":"新文件",Ok:"确定",Cancel:"取消","Visual aids":"网格线",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Superscript:"上标",Subscript:"下标","Clear formatting":"清除格式","Align left":"左边对齐","Align center":"中间对齐","Align right":"右边对齐",Justify:"两端对齐","Bullet list":"项目符号","Numbered list":"编号列表","Decrease indent":"减少缩进","Increase indent":"增加缩进",Close:"关闭",Formats:"格式","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板,请使用Ctrl+X/C/V等快捷键。",Headers:"标题","Header 1":"标题1","Header 2":"标题2","Header 3":"标题3","Header 4":"标题4","Header 5":"标题5","Header 6":"标题6",Headings:"标题","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3","Heading 4":"标题4","Heading 5":"标题5","Heading 6":"标题6",Preformatted:"预先格式化的",Div:"Div",Pre:"Pre",Code:"代码",Paragraph:"段落",Blockquote:"引文区块",Inline:"文本",Blocks:"基块","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。",Fonts:"字体","Font Sizes":"字号",Class:"类型","Browse for an image":"浏览图像",OR:"或","Drop an image here":"拖放一张图像至此",Upload:"上传",Block:"块",Align:"对齐",Default:"默认",Circle:"空心圆",Disc:"实心圆",Square:"方块","Lower Alpha":"小写英文字母","Lower Greek":"小写希腊字母","Lower Roman":"小写罗马字母","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马字母","Anchor...":"锚点...",Name:"名称",Id:"标识符","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"标识符应该以字母开头,后跟字母、数字、破折号、点、冒号或下划线。","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Restore last draft":"恢复上次的草稿","Special character...":"特殊字符...","Source code":"源代码","Insert/Edit code sample":"插入/编辑代码示例",Language:"语言","Code sample...":"示例代码...","Color Picker":"选色器",R:"R",G:"G",B:"B","Left to right":"从左到右","Right to left":"从右到左","Emoticons...":"表情符号...","Metadata and Document Properties":"元数据和文档属性",Title:"标题",Keywords:"关键词",Description:"描述",Robots:"机器人",Author:"作者",Encoding:"编码",Fullscreen:"全屏",Action:"操作",Shortcut:"快捷键",Help:"帮助",Address:"地址","Focus to menubar":"移动焦点到菜单栏","Focus to toolbar":"移动焦点到工具栏","Focus to element path":"移动焦点到元素路径","Focus to contextual toolbar":"移动焦点到上下文菜单","Insert link (if link plugin activated)":"插入链接 (如果链接插件已激活)","Save (if save plugin activated)":"保存(如果保存插件已激活)","Find (if searchreplace plugin activated)":"查找(如果查找替换插件已激活)","Plugins installed ({0}):":"已安装插件 ({0}):","Premium plugins:":"优秀插件:","Learn more...":"了解更多...","You are using {0}":"你正在使用 {0}",Plugins:"插件","Handy Shortcuts":"快捷键","Horizontal line":"水平分割线","Insert/edit image":"插入/编辑图片","Image description":"图片描述",Source:"地址",Dimensions:"大小","Constrain proportions":"保持纵横比",General:"普通",Advanced:"高级",Style:"样式","Vertical space":"垂直边距","Horizontal space":"水平边距",Border:"边框","Insert image":"插入图片","Image...":"图片...","Image list":"图片列表","Rotate counterclockwise":"逆时针旋转","Rotate clockwise":"顺时针旋转","Flip vertically":"垂直翻转","Flip horizontally":"水平翻转","Edit image":"编辑图片","Image options":"图片选项","Zoom in":"放大","Zoom out":"缩小",Crop:"裁剪",Resize:"调整大小",Orientation:"方向",Brightness:"亮度",Sharpen:"锐化",Contrast:"对比度","Color levels":"颜色层次",Gamma:"伽马值",Invert:"反转",Apply:"应用",Back:"后退","Insert date/time":"插入日期/时间","Date/time":"日期/时间","Insert/Edit Link":"插入/编辑链接","Insert/edit link":"插入/编辑链接","Text to display":"显示文字",Url:"地址","Open link in...":"链接打开位置...","Current window":"当前窗口",None:"无","New window":"在新窗口打开","Remove link":"删除链接",Anchors:"锚点","Link...":"链接...","Paste or type a link":"粘贴或输入链接","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址,需要加上mailto:前缀吗?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接,需要加上http://:前缀吗?","Link list":"链接列表","Insert video":"插入视频","Insert/edit video":"插入/编辑视频","Insert/edit media":"插入/编辑媒体","Alternative source":"镜像","Alternative source URL":"替代来源网址","Media poster (Image URL)":"封面(图片地址)","Paste your embed code below:":"将内嵌代码粘贴在下面:",Embed:"内嵌","Media...":"多媒体...","Nonbreaking space":"不间断空格","Page break":"分页符","Paste as text":"粘贴为文本",Preview:"预览","Print...":"打印...",Save:"保存",Find:"查找","Replace with":"替换为",Replace:"替换","Replace all":"全部替换",Previous:"上一个",Next:"下一个","Find and replace...":"查找并替换...","Could not find the specified string.":"未找到搜索内容.","Match case":"区分大小写","Find whole words only":"全字匹配","Spell check":"拼写检查",Ignore:"忽略","Ignore all":"全部忽略",Finish:"完成","Add to Dictionary":"添加到字典","Insert table":"插入表格","Table properties":"表格属性","Delete table":"删除表格",Cell:"单元格",Row:"行",Column:"列","Cell properties":"单元格属性","Merge cells":"合并单元格","Split cell":"拆分单元格","Insert row before":"在上方插入","Insert row after":"在下方插入","Delete row":"删除行","Row properties":"行属性","Cut row":"剪切行","Copy row":"复制行","Paste row before":"粘贴到上方","Paste row after":"粘贴到下方","Insert column before":"在左侧插入","Insert column after":"在右侧插入","Delete column":"删除列",Cols:"列",Rows:"行",Width:"宽",Height:"高","Cell spacing":"单元格外间距","Cell padding":"单元格内边距","Show caption":"显示标题",Left:"左对齐",Center:"居中",Right:"右对齐","Cell type":"单元格类型",Scope:"范围",Alignment:"对齐方式","H Align":"水平对齐","V Align":"垂直对齐",Top:"顶部对齐",Middle:"垂直居中",Bottom:"底部对齐","Header cell":"表头单元格","Row group":"行组","Column group":"列组","Row type":"行类型",Header:"表头",Body:"表体",Footer:"表尾","Border color":"边框颜色","Insert template...":"插入模板...",Templates:"模板",Template:"模板","Text color":"文字颜色","Background color":"背景色","Custom...":"自定义...","Custom color":"自定义颜色","No color":"无","Remove color":"移除颜色","Table of Contents":"内容列表","Show blocks":"显示区块边框","Show invisible characters":"显示不可见字符","Word count":"字数",Count:"计数",Document:"文档",Selection:"选择",Words:"单词","Words: {0}":"字数:{0}","{0} words":"{0} 字",File:"文件",Edit:"编辑",Insert:"插入",View:"视图",Format:"格式",Table:"表格",Tools:"工具","Powered by {0}":"由{0}驱动","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"在编辑区按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助","Image title":"图片标题","Border width":"边框宽度","Border style":"边框样式",Error:"错误",Warn:"警告",Valid:"有效","To open the popup, press Shift+Enter":"按Shitf+Enter键打开对话框","Rich Text Area. Press ALT-0 for help.":"编辑区。按Alt+0键打开帮助。","System Font":"系统字体","Failed to upload image: {0}":"图片上传失败: {0}","Failed to load plugin: {0} from url {1}":"插件加载失败: {0} 来自链接 {1}","Failed to load plugin url: {0}":"插件加载失败 链接: {0}","Failed to initialize plugin: {0}":"插件初始化失败: {0}",example:"示例",Search:"搜索",All:"全部",Currency:"货币",Text:"文字",Quotations:"引用",Mathematical:"数学","Extended Latin":"拉丁语扩充",Symbols:"符号",Arrows:"箭头","User Defined":"自定义","dollar sign":"美元符号","currency sign":"货币符号","euro-currency sign":"欧元符号","colon sign":"冒号","cruzeiro sign":"克鲁赛罗币符号","french franc sign":"法郎符号","lira sign":"里拉符号","mill sign":"密尔符号","naira sign":"奈拉符号","peseta sign":"比塞塔符号","rupee sign":"卢比符号","won sign":"韩元符号","new sheqel sign":"新谢克尔符号","dong sign":"越南盾符号","kip sign":"老挝基普符号","tugrik sign":"图格里克符号","drachma sign":"德拉克马符号","german penny symbol":"德国便士符号","peso sign":"比索符号","guarani sign":"瓜拉尼符号","austral sign":"澳元符号","hryvnia sign":"格里夫尼亚符号","cedi sign":"塞地符号","livre tournois sign":"里弗弗尔符号","spesmilo sign":"spesmilo符号","tenge sign":"坚戈符号","indian rupee sign":"印度卢比","turkish lira sign":"土耳其里拉","nordic mark sign":"北欧马克","manat sign":"马纳特符号","ruble sign":"卢布符号","yen character":"日元字样","yuan character":"人民币元字样","yuan character, in hong kong and taiwan":"元字样(港台地区)","yen/yuan character variant one":"元字样(大写)","Loading emoticons...":"加载表情符号...","Could not load emoticons":"不能加载表情符号",People:"人类","Animals and Nature":"动物和自然","Food and Drink":"食物和饮品",Activity:"活动","Travel and Places":"旅游和地点",Objects:"物件",Flags:"旗帜",Characters:"字符","Characters (no spaces)":"字符(无空格)","{0} characters":"{0} 个字符","Error: Form submit field collision.":"错误: 表单提交字段冲突。","Error: No form element found.":"错误: 没有表单控件。",Update:"更新","Color swatch":"颜色样本",Turquoise:"青绿色",Green:"绿色",Blue:"蓝色",Purple:"紫色","Navy Blue":"海军蓝","Dark Turquoise":"深蓝绿色","Dark Green":"深绿色","Medium Blue":"中蓝色","Medium Purple":"中紫色","Midnight Blue":"深蓝色",Yellow:"黄色",Orange:"橙色",Red:"红色","Light Gray":"浅灰色",Gray:"灰色","Dark Yellow":"暗黄色","Dark Orange":"深橙色","Dark Red":"深红色","Medium Gray":"中灰色","Dark Gray":"深灰色","Light Green":"浅绿色","Light Yellow":"浅黄色","Light Red":"浅红色","Light Purple":"浅紫色","Light Blue":"浅蓝色","Dark Purple":"深紫色","Dark Blue":"深蓝色",Black:"黑色",White:"白色","Switch to or from fullscreen mode":"切换全屏模式","Open help dialog":"打开帮助对话框",history:"历史",styles:"样式",formatting:"格式化",alignment:"对齐",indentation:"缩进","permanent pen":"记号笔",comments:"备注","Format Painter":"格式刷","Insert/edit iframe":"插入/编辑框架",Capitalization:"大写",lowercase:"小写",UPPERCASE:"大写","Title Case":"首字母大写","Permanent Pen Properties":"永久笔属性","Permanent pen properties...":"永久笔属性...",Font:"字体",Size:"字号","More...":"更多...","Spellcheck Language":"拼写检查语言","Select...":"选择...",Preferences:"首选项",Yes:"是",No:"否","Keyboard Navigation":"键盘指引",Version:"版本",Anchor:"锚点","Special character":"特殊符号","Code sample":"代码示例",Color:"颜色",Emoticons:"表情","Document properties":"文档属性",Image:"图片","Insert link":"插入链接",Target:"打开方式",Link:"链接",Poster:"封面",Media:"媒体",Print:"打印",Prev:"上一个","Find and replace":"查找和替换","Whole words":"全字匹配",Spellcheck:"拼写检查",Caption:"标题","Insert template":"插入模板"}),t.default=h}));
|
||
;/*!node_modules/amis-ui/lib/components/ColorPicker.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/ColorPicker",(function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),r=e("node_modules/react/index"),l=e("node_modules/react-dom/index"),i=e("node_modules/react-color/lib/index"),s=e("node_modules/amis-ui/lib/components/icons"),c=e("node_modules/amis-core/lib/index"),u=e("node_modules/amis-ui/lib/components/PopUp");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=p(r),d=e("node_modules/react/index"),b=(d.default||d).createElement;(d.default||d).Fragment;var g=function(e){function t(t){var o=e.call(this,t)||this;return o.state={isOpened:!1,isFocused:!1,inputValue:o.props.value||"",tempValue:o.props.value||""},o.open=o.open.bind(o),o.close=o.close.bind(o),o.focus=o.focus.bind(o),o.blur=o.blur.bind(o),o.handleChange=o.handleChange.bind(o),o.handleTempChange=o.handleTempChange.bind(o),o.handleConfirm=o.handleConfirm.bind(o),o.handleFocus=o.handleFocus.bind(o),o.handleBlur=o.handleBlur.bind(o),o.clearValue=o.clearValue.bind(o),o.handleInputChange=o.handleInputChange.bind(o),o.handleClick=o.handleClick.bind(o),o.preview=h.default.createRef(),o.input=h.default.createRef(),o}return a.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;e.value!==t.value&&this.setState({inputValue:t.value||""})},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1,inputValue:this.props.value})},t.prototype.focus=function(){this.input.current&&this.input.current.focus()},t.prototype.blur=function(){this.input.current&&this.input.current.blur()},t.prototype.open=function(e){this.props.disabled||this.setState({isOpened:!0},e)},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.clearValue=function(){var e=this.props;(0,e.onChange)(e.resetValue||"")},t.prototype.handleClick=function(){this.state.isOpened?this.close():this.open(this.focus)},t.prototype.handleInputChange=function(e){var t=this;if(this.props.allowCustomColor){var o=this.props.onChange;this.setState({inputValue:e.currentTarget.value},(function(){t.validateColor(t.state.inputValue)&&o(t.state.inputValue)}))}},t.prototype.validateColor=function(e){if(""===e)return!1;if("inherit"===e)return!1;if("transparent"===e)return!1;var t=document.createElement("img");return t.style.color="rgb(0, 0, 0)",t.style.color=e,"rgb(0, 0, 0)"!==t.style.color||(t.style.color="rgb(255, 255, 255)",t.style.color=e,"rgb(255, 255, 255)"!==t.style.color)},t.prototype.handleChange=function(e){var t=this.props,o=t.onChange,n=t.format;o("rgba"===n?"rgba(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,", ").concat(e.rgb.a,")"):"rgb"===n?"rgb(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,")"):"hexa"===n?this.rgbaToHex(e.rgb.r,e.rgb.g,e.rgb.b,e.rgb.a):"hsl"===n?"hsl(".concat(Math.round(e.hsl.h),", ").concat(Math.round(100*e.hsl.s),"%, ").concat(Math.round(100*e.hsl.l),"%)"):e.hex)},t.prototype.handleTempChange=function(e){var t=this.state.tempValue,o=this.props.format;t="rgba"===o?"rgba(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,", ").concat(e.rgb.a,")"):"rgb"===o?"rgb(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,")"):"hexa"===o?this.rgbaToHex(e.rgb.r,e.rgb.g,e.rgb.b,e.rgb.a):"hsl"===o?"hsl(".concat(Math.round(e.hsl.h),", ").concat(Math.round(100*e.hsl.s),"%, ").concat(Math.round(100*e.hsl.l),"%)"):e.hex,this.setState({tempValue:t})},t.prototype.handleConfirm=function(){(0,this.props.onChange)(this.state.tempValue),this.close()},t.prototype.rgbaToHex=function(e,t,o,n){if(e<0||e>255||t<0||t>255||o<0||o>255)return"#00000000";(void 0===n||n>1)&&(n=1),n<.01&&(n=0);var a=function(e){return e.toString(16).padStart(2,"0").toUpperCase()},r=a(Math.round(255*n)),l=a(e),i=a(t),s=a(o);return"#".concat(l).concat(i).concat(s).concat(r)},t.prototype.render=function(){var e=this,t=this.props,o=t.classPrefix,n=t.className,a=t.popoverClassName,r=t.value,p=t.placeholder,h=t.disabled,d=t.popOverContainer,g=t.popOverContainerSelector,f=t.format,m=t.clearable,C=t.placement,v=t.classnames,y=t.presetColors,k=t.allowCustomColor,x=t.mobileUI,P=this.props.translate,_=this.state.isOpened,O=this.state.isFocused,V=this.state.tempValue;return b("div",{className:v("ColorPicker",{"is-disabled":h,"is-focused":O,"is-opened":_},n)},b("span",{onClick:this.handleClick,className:v("ColorPicker-preview")},b("i",{ref:this.preview,className:"".concat(o,"ColorPicker-previewIcon"),style:{background:this.state.inputValue||"#ccc"}})),b("input",{ref:this.input,type:"text",autoComplete:"off",size:10,className:v("ColorPicker-input"),value:this.state.inputValue||"",placeholder:P(p),disabled:h,onChange:this.handleInputChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,readOnly:x}),m&&!h&&r?b("a",{onClick:this.clearValue,className:v("ColorPicker-clear")},b(s.Icon,{icon:"input-clear",className:"icon"})):null,b("span",{className:v("ColorPicker-arrow")},b(s.Icon,{icon:"right-arrow-bold",className:"icon",onClick:this.handleClick})),!x&&_?b(c.Overlay,{placement:C||"auto",target:function(){return l.findDOMNode(e)},onHide:this.close,container:d||function(){return l.findDOMNode(e)},containerSelector:g,rootClose:!1,show:!0},b(c.PopOver,{classPrefix:o,className:v("ColorPicker-popover",a),onHide:this.close,overlay:!0},k?b(i.SketchPicker,{styles:{},disableAlpha:!!~["rgb","hex"].indexOf(f),color:r,presetColors:y,onChangeComplete:this.handleChange}):b(i.GithubPicker,{color:r,colors:Array.isArray(y)?y.filter((function(e){return"string"==typeof e||c.isObject(e)})).map((function(e){return"string"==typeof e?e:c.isObject(e)?null==e?void 0:e.color:e})):void 0,onChangeComplete:this.handleChange}))):null,x&&b(u.default,{className:v("".concat(o,"ColorPicker-popup")),container:d,isShow:_,onHide:this.handleClick,showConfirm:!0,onConfirm:this.handleConfirm},k?b(i.SketchPicker,{styles:{},disableAlpha:!!~["rgb","hex"].indexOf(f),color:V,presetColors:y,onChangeComplete:this.handleTempChange}):b(i.GithubPicker,{color:V,colors:Array.isArray(y)?y.filter((function(e){return"string"==typeof e||c.isObject(e)})).map((function(e){return"string"==typeof e?e:c.isObject(e)?null==e?void 0:e.color:e})):void 0,onChangeComplete:this.handleTempChange})))},t.defaultProps={format:"hex",clearable:!0,placeholder:"ColorPicker.placeholder",allowCustomColor:!0},a.__decorate([c.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[String]),a.__metadata("design:returntype",void 0)],t.prototype,"validateColor",null),t}(h.default.PureComponent),f=c.themeable(c.localeable(c.uncontrollable(g,{value:"onChange"})));t.ColorControl=g,t.default=f}));
|
||
;/*!node_modules/amis-ui/lib/components/BarCode.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/BarCode",(function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),d=e("node_modules/react/index"),i=e("node_modules/amis-core/lib/index"),s=e("node_modules/jsbarcode/bin/JsBarcode");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(d),l=u(s),p=e("node_modules/react/index"),c=(p.default||p).createElement;(p.default||p).Fragment;var f=function(e){function t(t){var o=e.call(this,t)||this;return o.dom=a.default.createRef(),o}return r.__extends(t,e),t.prototype.componentDidUpdate=function(e){this.props.value===e.value&&JSON.stringify(this.props.options)===JSON.stringify(e.options)||this.renderBarCode()},t.prototype.renderBarCode=function(){this.dom.current&&l.default(this.dom.current,this.props.value,this.props.options)},t.prototype.componentDidMount=function(){this.renderBarCode()},t.prototype.render=function(){return c("img",{ref:this.dom})},t}(a.default.Component),m=i.themeable(f);t.BarCode=f,t.default=m}));
|
||
;/*!node_modules/amis-ui/lib/components/Markdown.js*/
|
||
amis.define("node_modules/amis-ui/lib/components/Markdown",(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("node_modules/tslib/tslib"),i=e("node_modules/react/index"),d=e("node_modules/markdown-it/index"),a=e("node_modules/markdown-it-html5-media/lib/index");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=s(i),l=s(d),f=e("node_modules/react/index"),m=(f.default||f).createElement;(f.default||f).Fragment;var c=l.default();function p(e,t){return t&&c.set(t),c.render(e)}c.use(a.html5Media);var h=function(e){function t(t){var n=e.call(this,t)||this;return n.htmlRef=n.htmlRef.bind(n),n}return r.__extends(t,e),t.prototype.htmlRef=function(e){this.dom=e,e&&this._render()},t.prototype.componentDidUpdate=function(e){this.props.content!==e.content&&this._render()},t.prototype._render=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n;return r.__generator(this,(function(o){return e=this.props,t=e.content,n=e.options,this.dom.innerHTML=p(t,n),"function"==typeof renderMathInElement&&renderMathInElement(this.dom,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}]}),[2]}))}))},t.prototype.render=function(){return m("div",{"data-testid":"markdown-body",className:"markdown-body",ref:this.htmlRef})},t.defaultProps={content:"",options:{linkify:!0}},t}(u.default.Component);t.default=h,t.markdown=p}));
|
||
;/*!examples/loadMonacoEditor.ts*/
|
||
amis.define("b961301",(function(a,s,n,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.__mod__async__load=void 0,s.__mod__async__load=function(a){var s=function(){try{return"/amis/n/monaco-editor/min/vs/loader_dfce686.js"}catch(a){return"monaco-editor/min/vs/loader.js"}}();amis.require.loadJs(s).onload=function(){return function(a,s){var n={"vs/nls":{availableLanguages:{"*":window.__amis_monaco_editor_locale&&{"zh-CN":"zh-cn","en-US":"","de-DE":"de"}[window.__amis_monaco_editor_locale]||""}},paths:{vs:function(){try{return"/amis/n/monaco-editor/min/vs/editor/editor.main_9bfa329.js"}catch(a){return"monaco-editor/min/vs/editor/editor.main.js"}}().replace(/\/vs\/.*$/,""),"vs/base/worker/workerMain":function(){try{return"/amis/n/monaco-editor/min/vs/base/worker/workerMain_785a914.js"}catch(a){return"monaco-editor/min/vs/base/worker/workerMain.js"}}(),"vs/basic-languages/apex/apex":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/apex/apex_7ed571a.js"}catch(a){return"monaco-editor/min/vs/basic-languages/apex/apex"}}(),"vs/basic-languages/azcli/azcli":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/azcli/azcli_2c95f10.js"}catch(a){return"monaco-editor/min/vs/basic-languages/azcli/azcli"}}(),"vs/basic-languages/clojure/clojure":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/clojure/clojure_bc3dfd6.js"}catch(a){return"monaco-editor/min/vs/basic-languages/clojure/clojure"}}(),"vs/basic-languages/bat/bat":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/bat/bat_3a19616.js"}catch(a){return"monaco-editor/min/vs/basic-languages/bat/bat"}}(),"vs/basic-languages/coffee/coffee":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/coffee/coffee_72268e9.js"}catch(a){return"monaco-editor/min/vs/basic-languages/coffee/coffee"}}(),"vs/basic-languages/cpp/cpp":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/cpp/cpp_400136e.js"}catch(a){return"monaco-editor/min/vs/basic-languages/cpp/cpp"}}(),"vs/basic-languages/csharp/csharp":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/csharp/csharp_60763af.js"}catch(a){return"monaco-editor/min/vs/basic-languages/csharp/csharp"}}(),"vs/basic-languages/css/css":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/css/css_6ee9d8b.js"}catch(a){return"monaco-editor/min/vs/basic-languages/css/css"}}(),"vs/basic-languages/dockerfile/dockerfile":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile_886100c.js"}catch(a){return"monaco-editor/min/vs/basic-languages/dockerfile/dockerfile"}}(),"vs/basic-languages/fsharp/fsharp":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/fsharp/fsharp_4a05994.js"}catch(a){return"monaco-editor/min/vs/basic-languages/fsharp/fsharp"}}(),"vs/basic-languages/go/go":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/go/go_1e78e6e.js"}catch(a){return"monaco-editor/min/vs/basic-languages/go/go"}}(),"vs/basic-languages/handlebars/handlebars":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/handlebars/handlebars_9a05aa5.js"}catch(a){return"monaco-editor/min/vs/basic-languages/handlebars/handlebars"}}(),"vs/basic-languages/html/html":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/html/html_2b130bc.js"}catch(a){return"monaco-editor/min/vs/basic-languages/html/html"}}(),"vs/basic-languages/ini/ini":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/ini/ini_2c52fcc.js"}catch(a){return"monaco-editor/min/vs/basic-languages/ini/ini"}}(),"vs/basic-languages/java/java":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/java/java_b6bd764.js"}catch(a){return"monaco-editor/min/vs/basic-languages/java/java"}}(),"vs/basic-languages/javascript/javascript":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/javascript/javascript_a2e9534.js"}catch(a){return"monaco-editor/min/vs/basic-languages/javascript/javascript"}}(),"vs/basic-languages/less/less":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/less/less_141d7e2.js"}catch(a){return"monaco-editor/min/vs/basic-languages/less/less"}}(),"vs/basic-languages/lua/lua":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/lua/lua_00eb2f7.js"}catch(a){return"monaco-editor/min/vs/basic-languages/lua/lua"}}(),"vs/basic-languages/markdown/markdown":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/markdown/markdown_a17bd15.js"}catch(a){return"monaco-editor/min/vs/basic-languages/markdown/markdown"}}(),"vs/basic-languages/msdax/msdax":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/msdax/msdax_cbb4a2d.js"}catch(a){return"monaco-editor/min/vs/basic-languages/msdax/msdax"}}(),"vs/basic-languages/objective-c/objective-c":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/objective-c/objective-c_6598c5e.js"}catch(a){return"monaco-editor/min/vs/basic-languages/objective-c/objective-c"}}(),"vs/basic-languages/php/php":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/php/php_5193d1c.js"}catch(a){return"monaco-editor/min/vs/basic-languages/php/php"}}(),"vs/basic-languages/postiats/postiats":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/postiats/postiats_0bebc84.js"}catch(a){return"monaco-editor/min/vs/basic-languages/postiats/postiats"}}(),"vs/basic-languages/powershell/powershell":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/powershell/powershell_6fa0bf9.js"}catch(a){return"monaco-editor/min/vs/basic-languages/powershell/powershell"}}(),"vs/basic-languages/pug/pug":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/pug/pug_03e4750.js"}catch(a){return"monaco-editor/min/vs/basic-languages/pug/pug"}}(),"vs/basic-languages/python/python":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/python/python_020e23b.js"}catch(a){return"monaco-editor/min/vs/basic-languages/python/python"}}(),"vs/basic-languages/r/r":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/r/r_4b58540.js"}catch(a){return"monaco-editor/min/vs/basic-languages/r/r"}}(),"vs/basic-languages/razor/razor":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/razor/razor_4106dc9.js"}catch(a){return"monaco-editor/min/vs/basic-languages/razor/razor"}}(),"vs/basic-languages/redis/redis":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/redis/redis_0dd6e47.js"}catch(a){return"monaco-editor/min/vs/basic-languages/redis/redis"}}(),"vs/basic-languages/redshift/redshift":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/redshift/redshift_85edaf0.js"}catch(a){return"monaco-editor/min/vs/basic-languages/redshift/redshift"}}(),"vs/basic-languages/ruby/ruby":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/ruby/ruby_9301210.js"}catch(a){return"monaco-editor/min/vs/basic-languages/ruby/ruby"}}(),"vs/basic-languages/rust/rust":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/rust/rust_e79c2ea.js"}catch(a){return"monaco-editor/min/vs/basic-languages/rust/rust"}}(),"vs/basic-languages/sb/sb":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/sb/sb_a5b5f47.js"}catch(a){return"monaco-editor/min/vs/basic-languages/sb/sb"}}(),"vs/basic-languages/scheme/scheme":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/scheme/scheme_642c56a.js"}catch(a){return"monaco-editor/min/vs/basic-languages/scheme/scheme"}}(),"vs/basic-languages/scss/scss":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/scss/scss_bb6b3db.js"}catch(a){return"monaco-editor/min/vs/basic-languages/scss/scss"}}(),"vs/basic-languages/shell/shell":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/shell/shell_c58d441.js"}catch(a){return"monaco-editor/min/vs/basic-languages/shell/shell"}}(),"vs/basic-languages/solidity/solidity":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/solidity/solidity_ab530c3.js"}catch(a){return"monaco-editor/min/vs/basic-languages/solidity/solidity"}}(),"vs/basic-languages/sql/sql":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/sql/sql_e902f67.js"}catch(a){return"monaco-editor/min/vs/basic-languages/sql/sql"}}(),"vs/basic-languages/st/st":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/st/st_184cf06.js"}catch(a){return"monaco-editor/min/vs/basic-languages/st/st"}}(),"vs/basic-languages/swift/swift":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/swift/swift_257edb0.js"}catch(a){return"monaco-editor/min/vs/basic-languages/swift/swift"}}(),"vs/basic-languages/typescript/typescript":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/typescript/typescript_9550dfb.js"}catch(a){return"monaco-editor/min/vs/basic-languages/typescript/typescript"}}(),"vs/basic-languages/vb/vb":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/vb/vb_98ea1d7.js"}catch(a){return"monaco-editor/min/vs/basic-languages/vb/vb"}}(),"vs/basic-languages/xml/xml":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/xml/xml_843ca49.js"}catch(a){return"monaco-editor/min/vs/basic-languages/xml/xml"}}(),"vs/basic-languages/yaml/yaml":function(){try{return"/amis/n/monaco-editor/min/vs/basic-languages/yaml/yaml_e65d368.js"}catch(a){return"monaco-editor/min/vs/basic-languages/yaml/yaml"}}(),"vs/editor/editor.main":function(){try{return"/amis/n/monaco-editor/min/vs/editor/editor.main_9bfa329.js"}catch(a){return"monaco-editor/min/vs/editor/editor.main.js"}}(),"vs/editor/editor.main.css":function(){try{return"/amis/n/monaco-editor/min/vs/editor/editor.main_1134ca7.css"}catch(a){return"monaco-editor/min/vs/editor/editor.main.css"}}(),"vs/editor/editor.main.nls":function(){try{return"/amis/n/monaco-editor/min/vs/editor/editor.main.nls_2972280.js"}catch(a){return"monaco-editor/min/vs/editor/editor.main.nls.js"}}(),"vs/editor/editor.main.nls.zh-cn":function(){try{return"/amis/n/monaco-editor/min/vs/editor/editor.main.nls.zh-cn_17822a4.js"}catch(a){return"monaco-editor/min/vs/editor/editor.main.nls.zh-cn.js"}}(),"vs/base/browser/ui/codicons/codicon/codicon.ttf":function(){try{return"/amis/n/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon_805fb6a.ttf"}catch(a){return"monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf"}}(),"vs/language/typescript/tsMode":function(){try{return"/amis/n/monaco-editor/min/vs/language/typescript/tsMode_3735e7b.js"}catch(a){return"monaco-editor/min/vs/language/typescript/tsMode.js"}}(),"vs/language/typescript/tsWorker":function(){try{return"/amis/n/monaco-editor/min/vs/language/typescript/tsWorker_f8582cd.js"}catch(a){return"monaco-editor/min/vs/language/typescript/tsWorker.js"}}(),"vs/language/json/jsonMode":function(){try{return"/amis/n/monaco-editor/min/vs/language/json/jsonMode_4a8b21f.js"}catch(a){return"monaco-editor/min/vs/language/json/jsonMode.js"}}(),"vs/language/json/jsonWorker":function(){try{return"/amis/n/monaco-editor/min/vs/language/json/jsonWorker_994d228.js"}catch(a){return"monaco-editor/min/vs/language/json/jsonWorker.js"}}(),"vs/language/html/htmlMode":function(){try{return"/amis/n/monaco-editor/min/vs/language/html/htmlMode_dad776d.js"}catch(a){return"monaco-editor/min/vs/language/html/htmlMode.js"}}(),"vs/language/html/htmlWorker":function(){try{return"/amis/n/monaco-editor/min/vs/language/html/htmlWorker_8f26bf6.js"}catch(a){return"monaco-editor/min/vs/language/html/htmlWorker.js"}}(),"vs/language/css/cssMode":function(){try{return"/amis/n/monaco-editor/min/vs/language/css/cssMode_09d7edb.js"}catch(a){return"monaco-editor/min/vs/language/css/cssMode.js"}}(),"vs/language/css/cssWorker":function(){try{return"/amis/n/monaco-editor/min/vs/language/css/cssWorker_19c30b9.js"}catch(a){return"monaco-editor/min/vs/language/css/cssWorker.js"}}()}};Object.keys(n.paths).forEach((function(a){n.paths[a]=n.paths[a].replace(/\.js$/,"")})),a.config(n),/^(https?:)?\/\//.test(n.paths.vs)?window.MonacoEnvironment={getWorkerUrl:function(){return"data:text/javascript;charset=utf-8,".concat(encodeURIComponent("\n self.MonacoEnvironment = {\n baseUrl: '".concat(n.paths.vs,"',\n paths: ").concat(JSON.stringify(n.paths),"\n };\n importScripts('").concat(function(){try{return"/amis/n/monaco-editor/min/vs/base/worker/workerMain_785a914.js"}catch(a){return"monaco-editor/min/vs/base/worker/workerMain.js"}}(),"');")))}}:delete window.MonacoEnvironment;a(["vs/editor/editor.main"],(function(a){s(a)}))}(window.require,a)}}}));
|
||
;/*!examples/mobile.jsx*/
|
||
amis.define("5cd8f64",(function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bootstrap=void 0;var s=e("node_modules/tslib/tslib");e("835699d");var r=s.__importDefault(e("node_modules/react/index")),o=e("node_modules/react-dom/client"),d=s.__importDefault(e("node_modules/axios/index")),i=s.__importDefault(e("node_modules/copy-to-clipboard/index")),u=e("node_modules/amis/lib/index");e("node_modules/amis-ui/lib/locale/en-US");var l=e("node_modules/amis/lib/index"),c=function(e){function t(t){var a=e.call(this,t)||this;return a.state={schema:null,props:{}},window.addEventListener("message",(function(e){var t=e.data;t&&t.schema&&a.setState({schema:t.schema,props:t.props})})),window.parent.postMessage("amisReady","*"),a}return s.__extends(t,e),t.prototype.render=function(){var e=this;return this.state.schema?r.default.createElement("div",null,(0,l.render)(this.state.schema,this.state.props,{fetcher:function(t){var a=t.url,n=t.method,r=t.data,o=t.responseType,i=t.config,u=t.headers;return s.__awaiter(e,void 0,void 0,(function(){var e;return s.__generator(this,(function(t){switch(t.label){case 0:return"json"===(i=s.__assign({url:a,dataType:"json",method:n,data:r,headers:u,responseType:o},i)).dataType&&i.data&&(i.data=JSON.stringify(i.data),i.headers=i.headers||{},i.headers["Content-Type"]="application/json"),i.validateStatus=function(){return!0},[4,(0,d.default)(i)];case 1:if((e=t.sent()).status>=400)throw e.data?e.data.msg?new Error(e.data.msg):new Error("接口报错:"+JSON.stringify(e.data,null,2)):new Error("接口出错,状态码是 ".concat(e.status));return[2,e]}}))}))},isCancel:function(e){return d.default.isCancel(e)},copy:function(e,t){(0,i.default)(e,t),u.toast.success("内容已复制到粘贴板")},tracker:function(e){console.debug("eventTrack",e)}})):null},t}(r.default.Component);t.bootstrap=function(e){(0,o.createRoot)(e).render(r.default.createElement(c,null))}})); |