@hzab/form-render 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ant-design/icons"),require("@formily/antd"),require("@formily/core"),require("@formily/react"),require("@hzab/data-model"),require("antd"),require("lodash"),require("nanoid"),require("react")):"function"==typeof define&&define.amd?define(["@ant-design/icons","@formily/antd","@formily/core","@formily/react","@hzab/data-model","antd","lodash","nanoid","react"],t):"object"==typeof exports?exports.form_render=t(require("@ant-design/icons"),require("@formily/antd"),require("@formily/core"),require("@formily/react"),require("@hzab/data-model"),require("antd"),require("lodash"),require("nanoid"),require("react")):e.form_render=t(e["@ant-design/icons"],e["@formily/antd"],e["@formily/core"],e["@formily/react"],e["@hzab/data-model"],e.antd,e.lodash,e.nanoid,e.react)}(self,((e,t,n,r,o,a,i,c,l)=>(()=>{var u={288:function(e){"use strict";e.exports=function(){function e(e){var r=[];return e.AMapUI&&r.push(t(e.AMapUI)),e.Loca&&r.push(n(e.Loca)),Promise.all(r)}function t(e){return new Promise((function(t,n){var o=[];if(e.plugins)for(var l=0;l<e.plugins.length;l+=1)-1==a.AMapUI.plugins.indexOf(e.plugins[l])&&o.push(e.plugins[l]);if(i.AMapUI===r.failed)n("前次请求 AMapUI 失败");else if(i.AMapUI===r.notload){i.AMapUI=r.loading,a.AMapUI.version=e.version||a.AMapUI.version,l=a.AMapUI.version;var u=document.body||document.head,s=document.createElement("script");s.type="text/javascript",s.src="https://webapi.amap.com/ui/"+l+"/main.js",s.onerror=function(e){i.AMapUI=r.failed,n("请求 AMapUI 失败")},s.onload=function(){if(i.AMapUI=r.loaded,o.length)window.AMapUI.loadUI(o,(function(){for(var e=0,n=o.length;e<n;e++){var r=o[e].split("/").slice(-1)[0];window.AMapUI[r]=arguments[e]}for(t();c.AMapUI.length;)c.AMapUI.splice(0,1)[0]()}));else for(t();c.AMapUI.length;)c.AMapUI.splice(0,1)[0]()},u.appendChild(s)}else i.AMapUI===r.loaded?e.version&&e.version!==a.AMapUI.version?n("不允许多个版本 AMapUI 混用"):o.length?window.AMapUI.loadUI(o,(function(){for(var e=0,n=o.length;e<n;e++){var r=o[e].split("/").slice(-1)[0];window.AMapUI[r]=arguments[e]}t()})):t():e.version&&e.version!==a.AMapUI.version?n("不允许多个版本 AMapUI 混用"):c.AMapUI.push((function(e){e?n(e):o.length?window.AMapUI.loadUI(o,(function(){for(var e=0,n=o.length;e<n;e++){var r=o[e].split("/").slice(-1)[0];window.AMapUI[r]=arguments[e]}t()})):t()}))}))}function n(e){return new Promise((function(t,n){if(i.Loca===r.failed)n("前次请求 Loca 失败");else if(i.Loca===r.notload){i.Loca=r.loading,a.Loca.version=e.version||a.Loca.version;var o=a.Loca.version,l=a.AMap.version.startsWith("2"),u=o.startsWith("2");if(l&&!u||!l&&u)n("JSAPI 与 Loca 版本不对应!!");else{l=a.key,u=document.body||document.head;var s=document.createElement("script");s.type="text/javascript",s.src="https://webapi.amap.com/loca?v="+o+"&key="+l,s.onerror=function(e){i.Loca=r.failed,n("请求 AMapUI 失败")},s.onload=function(){for(i.Loca=r.loaded,t();c.Loca.length;)c.Loca.splice(0,1)[0]()},u.appendChild(s)}}else i.Loca===r.loaded?e.version&&e.version!==a.Loca.version?n("不允许多个版本 Loca 混用"):t():e.version&&e.version!==a.Loca.version?n("不允许多个版本 Loca 混用"):c.Loca.push((function(e){e?n(e):n()}))}))}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var r,o;(o=r||(r={})).notload="notload",o.loading="loading",o.loaded="loaded",o.failed="failed";var a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},i={AMap:r.notload,AMapUI:r.notload,Loca:r.notload},c={AMap:[],AMapUI:[],Loca:[]},l=[],u=function(e){"function"==typeof e&&(i.AMap===r.loaded?e(window.AMap):l.push(e))};return{load:function(t){return new Promise((function(n,o){if(i.AMap==r.failed)o("");else if(i.AMap==r.notload){var c=t.key,s=t.version,f=t.plugins;c?(window.AMap&&"lbs.amap.com"!==location.host&&o("禁止多种API加载方式混用"),a.key=c,a.AMap.version=s||a.AMap.version,a.AMap.plugins=f||a.AMap.plugins,i.AMap=r.loading,s=document.body||document.head,window.___onAPILoaded=function(a){if(delete window.___onAPILoaded,a)i.AMap=r.failed,o(a);else for(i.AMap=r.loaded,e(t).then((function(){n(window.AMap)})).catch(o);l.length;)l.splice(0,1)[0]()},(f=document.createElement("script")).type="text/javascript",f.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+a.AMap.version+"&key="+c+"&plugin="+a.AMap.plugins.join(","),f.onerror=function(e){i.AMap=r.failed,o(e)},s.appendChild(f)):o("请填写key")}else if(i.AMap==r.loaded)if(t.key&&t.key!==a.key)o("多个不一致的 key");else if(t.version&&t.version!==a.AMap.version)o("不允许多个版本 JSAPI 混用");else{if(c=[],t.plugins)for(s=0;s<t.plugins.length;s+=1)-1==a.AMap.plugins.indexOf(t.plugins[s])&&c.push(t.plugins[s]);c.length?window.AMap.plugin(c,(function(){e(t).then((function(){n(window.AMap)})).catch(o)})):e(t).then((function(){n(window.AMap)})).catch(o)}else if(t.key&&t.key!==a.key)o("多个不一致的 key");else if(t.version&&t.version!==a.AMap.version)o("不允许多个版本 JSAPI 混用");else{var p=[];if(t.plugins)for(s=0;s<t.plugins.length;s+=1)-1==a.AMap.plugins.indexOf(t.plugins[s])&&p.push(t.plugins[s]);u((function(){p.length?window.AMap.plugin(p,(function(){e(t).then((function(){n(window.AMap)})).catch(o)})):e(t).then((function(){n(window.AMap)})).catch(o)}))}}))},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},i={AMap:r.notload,AMapUI:r.notload,Loca:r.notload},c={AMap:[],AMapUI:[],Loca:[]}}}}()},694:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".user-select-option_Rzq0j .ant-select-item-option-content {\n display: flex;\n}\n.user-select-option__avatar_Ly1IV {\n margin-right: 10px;\n}\n.user-select-option_Rzq0j .option-info_PtQb2 {\n display: flex;\n flex-direction: column;\n}\n.user-select-option_Rzq0j .option-info-name_q3YOz {\n margin-bottom: 4px;\n color: #000000d9;\n font-size: 14px;\n display: flex;\n align-items: center;\n}\n.user-select-option_Rzq0j .option-info__idCard_QG1nc {\n color: #00000073;\n font-size: 14px;\n}\n",""]),i.locals={"user-select-option":"user-select-option_Rzq0j","user-select-option__avatar":"user-select-option__avatar_Ly1IV","option-info":"option-info_PtQb2","option-info-name":"option-info-name_q3YOz","option-info__idCard":"option-info__idCard_QG1nc"};const c=i},460:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".a-map-container {\n width: 100%;\n height: 100%;\n}\n",""]);const c=i},380:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-map-search {\n width: 300px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n}\n.location-map-search .ant-input {\n width: 100%;\n}\n",""]);const c=i},164:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-picker-modal-content {\n display: flex;\n flex-direction: column;\n position: relative;\n /* 水平样式 */\n}\n.location-picker-modal-content .location-picker-map-wrap {\n flex: 1;\n}\n.location-picker-modal-content .location-picker-map {\n position: relative;\n width: 100%;\n flex: 1;\n}\n.location-picker-modal-content .location-picker-map .a-map-container {\n height: inherit;\n}\n.location-picker-modal-content .location-picker-map .a-map-container .amap-logo,\n.location-picker-modal-content .location-picker-map .a-map-container .amap-copyright {\n z-index: 0;\n}\n.location-picker-modal-content .location-picker-map .location-picker-center-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -100%);\n width: 34px;\n color: #1677ff;\n}\n.location-picker-modal-content .location-picker-map .set-map-actions {\n position: absolute;\n right: 20px;\n bottom: 20px;\n}\n.location-picker-modal-content .location-picker-map .set-map-actions > img {\n display: block;\n width: 32px;\n margin-bottom: 8px;\n padding: 4px;\n background-color: #fff;\n border-radius: 8px;\n cursor: pointer;\n}\n.location-picker-modal-content .location-picker-map .set-map-actions > img:last-child {\n margin-bottom: unset;\n}\n.location-picker-modal-content .spin-loading-wrap {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(0, 0, 0, 0.5);\n}\n.location-picker-modal-content.location-modal-content-layout-hor,\n.location-picker-modal-content.location-modal-content-layout-hor-reverse {\n margin-right: 20px;\n}\n.location-picker-modal-content.location-modal-content-layout-hor.location-mode-dialog .location-picker-info,\n.location-picker-modal-content.location-modal-content-layout-hor-reverse.location-mode-dialog .location-picker-info {\n width: 400px;\n}\n.location-picker-modal-content.location-modal-content-layout-hor .location-picker-info,\n.location-picker-modal-content.location-modal-content-layout-hor-reverse .location-picker-info {\n margin-right: 20px;\n}\n.location-picker-modal-content.location-modal-content-layout-hor-reverse {\n flex-direction: row-reverse;\n}\n.location-picker-modal-content.location-modal-content-layout-ver-reverse {\n flex-direction: column-reverse;\n}\n",""]);const c=i},736:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-picker-info {\n padding: 12px;\n}\n.location-picker-info .picker-info-lon,\n.location-picker-info .picker-info-lat,\n.location-picker-info .picker-info-addr {\n display: flex;\n margin-bottom: 8px;\n}\n.location-picker-info .picker-info-lon .picker-info-label,\n.location-picker-info .picker-info-lat .picker-info-label,\n.location-picker-info .picker-info-addr .picker-info-label {\n white-space: nowrap;\n}\n.location-picker-info .picker-info-input {\n min-width: 300px;\n}\n",""]);const c=i},544:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-value-box .location-value-head-box {\n display: flex;\n}\n.location-value-box .location-value-head-box .location-lon-lat {\n flex: 1;\n}\n.location-value-box .location-btn {\n padding: 4px 0;\n padding-left: 5px;\n line-height: 1;\n}\n.location-value-box .location-btn:focus {\n background: transparent;\n}\n.location-value-box .location-btn .location-picker-icon {\n width: 16px;\n margin-right: 4px;\n}\n.location-value-box .location-btn .location-picker-text {\n display: inline-block;\n vertical-align: middle;\n}\n",""]);const c=i},724:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-picker .location-value-box .location-value-head-box {\n display: flex;\n}\n.location-picker .location-value-box .location-value-head-box .location-lon-lat {\n flex: 1;\n}\n.location-picker-modal .ant-modal-body {\n display: flex;\n flex-direction: column;\n}\n",""]);const c=i},258:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".tree-checkbox .tree-checkbox-table {\n table-layout: fixed;\n}\n.tree-checkbox .tree-checkbox-table .tree-checkbox-row .tree-checkbox-col {\n padding: 4px 12px;\n border: 1px solid #333;\n}\n",""]);const c=i},144:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".upload-preview-modal {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.upload-preview-modal .ant-modal-content .ant-modal-header {\n padding-right: 60px;\n}\n.upload-preview-modal .ant-modal-content .ant-modal-body {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.upload-preview-video {\n max-width: 100%;\n}\n.upload-preview-img {\n max-width: 100%;\n}\n.upload-preview-audio {\n max-width: 100%;\n}\n",""]);const c=i},48:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".uploader-template-download-btn {\n color: #1890ff;\n}\n",""]);const c=i},468:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".form-render.ant-form-inline,\n.form-render.ant-form-inline > form,\n.form-render.ant-form-inline > form > .ant-formily-layout {\n display: inline-flex;\n flex-wrap: wrap;\n}\n.form-render.ant-form-inline .ant-formily-item-control,\n.form-render.ant-form-inline > form .ant-formily-item-control,\n.form-render.ant-form-inline > form > .ant-formily-layout .ant-formily-item-control {\n min-width: 120px;\n}\n.form-render.ant-form-inline .ant-picker-range,\n.form-render.ant-form-inline > form .ant-picker-range,\n.form-render.ant-form-inline > form > .ant-formily-layout .ant-picker-range {\n min-width: 340px;\n}\n.form-render.ant-form-inline .ant-formily-item-layout-inline,\n.form-render.ant-form-inline > form .ant-formily-item-layout-inline,\n.form-render.ant-form-inline > form > .ant-formily-layout .ant-formily-item-layout-inline {\n margin-right: 12px;\n margin-bottom: 12px;\n}\n",""]);const c=i},312:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},500:e=>{"use strict";e.exports=function(e){return e[1]}},792:(e,t,n)=>{"use strict";var r=n(819),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var u=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,v=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(v){var o=d(n);o&&o!==v&&e(t,o,r)}var i=s(n);f&&(i=i.concat(f(n)));for(var c=l(t),m=l(n),y=0;y<i.length;++y){var h=i[y];if(!(a[h]||r&&r[h]||m&&m[h]||c&&c[h])){var g=p(n,h);try{u(t,h,g)}catch(e){}}}}return t}},560:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case s:case f:case a:case c:case i:case d:return e;default:switch(e=e&&e.$$typeof){case u:case p:case y:case m:case l:return e;default:return t}}case o:return t}}}function k(e){return O(e)===f}t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=o,t.Profiler=c,t.StrictMode=i,t.Suspense=d,t.isAsyncMode=function(e){return k(e)||O(e)===s},t.isConcurrentMode=k,t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===y},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===o},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===i},t.isSuspense=function(e){return O(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===c||e===i||e===d||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b||e.$$typeof===w||e.$$typeof===h)},t.typeOf=O},819:(e,t,n)=>{"use strict";e.exports=n(560)},596:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],c=0;c<e.length;c++){var l=e[c],u=r.base?l[0]+r.base:l[0],s=a[u]||0,f="".concat(u," ").concat(s);a[u]=s+1;var p=n(f),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var v=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:v,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=n(a[i]);t[c].references--}for(var l=r(e,o),u=0;u<a.length;u++){var s=n(a[u]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=l}}},176:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},808:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},120:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},520:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},936:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},880:t=>{"use strict";t.exports=e},632:e=>{"use strict";e.exports=t},624:e=>{"use strict";e.exports=n},976:e=>{"use strict";e.exports=r},984:e=>{"use strict";e.exports=o},840:e=>{"use strict";e.exports=a},816:e=>{"use strict";e.exports=i},734:e=>{"use strict";e.exports=c},496:e=>{"use strict";e.exports=l},636:(e,t,n)=>{var r=n(848).default;function o(){"use strict";e.exports=o=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,i=a.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",f=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),i=new I(r||[]);return c(a,"_invoke",{value:_(e,n,i)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var m="suspendedStart",y="suspendedYield",h="executing",g="completed",b={};function w(){}function O(){}function k(){}var x={};p(x,u,(function(){return this}));var P=Object.getPrototypeOf,A=P&&P(P(L([])));A&&A!==a&&i.call(A,u)&&(x=A);var j=k.prototype=w.prototype=Object.create(x);function E(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,c,l){var u=v(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,l)}),(function(e){n("throw",e,c,l)})):t.resolve(f).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,l)}))}l(u.arg)}var o;c(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}})}function _(e,n,r){var o=m;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=M(c,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var u=v(e,n,r);if("normal"===u.type){if(o=r.done?g:y,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=g,r.method="throw",r.arg=u.arg)}}}function M(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=v(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return O.prototype=k,c(j,"constructor",{value:k,configurable:!0}),c(k,"constructor",{value:O,configurable:!0}),O.displayName=p(k,f,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,p(e,f,"GeneratorFunction")),e.prototype=Object.create(j),e},n.awrap=function(e){return{__await:e}},E(S.prototype),p(S.prototype,s,(function(){return this})),n.AsyncIterator=S,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new S(d(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(j),p(j,f,"Generator"),p(j,u,(function(){return this})),p(j,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=L,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},848:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},248:(e,t,n)=>{var r=n(636)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,exports:{}};return u[e].call(n.exports,n,n.exports,f),n.exports}f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e})(),f.nc=void 0;var p={};return(()=>{"use strict";f.r(p),f.d(p,{antdComponents:()=>Vr,customComponents:()=>e,default:()=>Gr});var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:String(n)}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f.r(e),f.d(e,{DatePicker:()=>Vn,LocationPicker:()=>Fr,Text:()=>y,TreeCheckbox:()=>Kn,Upload:()=>Pe,UserSelect:()=>Cn,getParentValue:()=>zn});var o=f(496),a=f.n(o),i=f(624),c=f(976),l=f(632),u=f(840);function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=["value","mode","content","className"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const y=(0,c.connect)((function(e){var t=e.value,n=e.mode,r=e.content,o=e.className,i=s(e,d),c="normal"!==n&&n?n:"div";return console.log("props",i.readOnly),a().createElement(c,m({className:"formily-text ".concat(o)},i),t||r)}),(0,c.mapProps)((function(e,t){return m(m({},e),{},{form:t.form,field:t})})));function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function g(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){g(a,r,o,i,c,"next",e)}function c(e){g(a,r,o,i,c,"throw",e)}i(void 0)}))}}var w=f(248),O=f.n(w);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function P(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var j=f(880),E=f(734);function S(e){return T(e,["apng","avif","bmp","gif","ico","cur","jpg","jpeg","jfif","pjpeg","pjp","png","svg","tif","tiff","webp"])}function M(e){return T(e,["3gp","mpg","mpeg","mp4","m4v","m4p","ogv","ogg","mov","webm"])}function C(e){return T(e,["3gp","adts","mpeg","mp3","mp4","ogg","mov","webm","rtp","amr","wav"])}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;if(!e)return!1;var r=null==e?void 0:e.replace(/\?.+/,"");return!!new RegExp(".(".concat(t.join("|"),")$"),n?void 0:"i").test(r)||void 0}function I(e){var t=null==e?void 0:e.match(/[^\/]+?\.[^\/]+$/);return t&&t.length>0?t[0]:e}function L(e){if("object"===t(e)&&null!=e&&e.type)return null==e?void 0:e.type;if("string"==typeof e){var n=null;return M(e)?n="video/mp4":S(e)?n="image/jpeg":C(e)?n="audio/3gpp":T(e,["pdf"])||T(e,["pdf"])?n="application/pdf":T(e,["xlsx","xls","csv","xlsm","xlsb"])?n="application/vnd.ms-excel":T(e,["doc","docx"])?n="application/msword":T(e,["ppt","pptx"])&&(n="application/vnd.ms-powerpoint"),n}}function R(e){return Array.isArray(e)?e:e&&[e]||[]}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=function(e,t){var n=R(e);return t>0&&n.length>t&&(n=n.slice(0,t)),n}(R(e),t);if(0===n.length)return n;var r=n;return Array.isArray(r)||(r=[r]),r=n.map((function(e,t){if("string"==typeof e){var n=(0,E.nanoid)();return{name:n,uid:n,ossUrl:e,url:e}}return e&&!e.uid&&(e.uid=(0,E.nanoid)()),e&&!e.name&&(e.name=e.uid),e}))}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}function F(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var K=f(984);function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e),this.axios=t.axios||K.axios,this.axiosConf=t.axiosConf||{},this.serverUrl=t.serverUrl||"/api/v1/user/oss/getWebOssConfig",this.signatureParams=t.signatureParams||{}}return F(e,[{key:"getSignature",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.serverUrl,t=arguments.length>1?arguments[1]:void 0;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.serverUrl,n=void 0===t?"/api/v1/user/oss/getWebOssConfig":t;if(window.__ossSignatureRes&&n===window.__ossSignatureRes.serverUrl&&Date.now()-window.__ossSignatureRes.__saveTime<window.__ossSignatureRes.expireTimeMillis-1e4)return Promise.resolve(window.__ossSignatureRes);var r=e.axios,o=void 0===r?K.axios:r,a=e.params,i=void 0===a?{}:a,c=e.axiosConf;return o.get(n,$($({},c),{},{params:$({isPublic:1},i)})).then((function(e){var t;return window.__ossSignatureRes=null==e||null===(t=e.data)||void 0===t?void 0:t.data,window.__ossSignatureRes&&(window.__ossSignatureRes.__saveTime=Date.now(),window.__ossSignatureRes.serverUrl=n),window.__ossSignatureRes}))}($($({},t),{},{serverUrl:e,axios:(null==t?void 0:t.axios)||this.axios,axiosConf:$($({},this.axiosConf),null==t?void 0:t.axiosConf)}))}},{key:"upload",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(){var r=b(O().mark((function r(o,a){var i,c,l,u,s,f,p,d,v;return O().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.getSignature(n.serverUrl||t.serverUrl,$($({},n),{},{params:$($({},t.signatureParams),n.signatureParams)}));case 2:if(i=r.sent,c=(n||{}).ossParams,l=new FormData,u=null==e?void 0:e.name,null!=e&&e.name&&(s=null==e?void 0:e.name.match(/^(.+)\.(.+)$/))&&s.length>2&&(u="".concat(s[1],"_").concat(Date.now(),"_").concat((0,E.nanoid)(),".").concat(s[2])),u||(u="".concat(Date.now(),"_").concat((0,E.nanoid)(),".").concat(null===(f=e.type)||void 0===f?void 0:f.replace(/\w+\/, ''/))),p="".concat(null==i?void 0:i.dir).concat(u),l.set("key",p),l.set("OSSAccessKeyId",i.accessid),l.set("policy",i.policy),l.set("Signature",i.signature),i.callback&&l.set("callback",i.callback),l.set("success_action_status",200),l.set("file",e),c)for(d in c)Object.hasOwnProperty.call(c,d)&&l.set(d,c[d]);return v=(null==n?void 0:n.axios)||t.axios,r.abrupt("return",v.post(i.host,l,$($({},t.axiosConf),null==n?void 0:n.axiosConf)).then((function(e){return o(e),e})).catch((function(e){return console.error("oss upload err",e),a(e),Promise.reject(e)})));case 19:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}())}}]),e}();const V=z;var G="video",W="img",J="audio";function B(e){var t=e||{},n=t.type,r=t.url,o=void 0===r?null==e?void 0:e.ossUrl:r,a="";return o?o.startsWith("data:image/")||S(o)?a=W:M(o)?a=G:C(o)&&(a=J):n&&(null!=n&&n.startsWith("image/")&&(a=W),null!=n&&n.startsWith("video/")&&(a=G),null!=n&&n.startsWith("audio/")&&(a=J)),a||n}var Y=f(496),Q=r(r(r({},G,(function(e){return Y.createElement("video",{className:"upload-preview-video",src:e,controls:!0},"抱歉,您的浏览器不支持内嵌视频,不过不用担心,你可以",Y.createElement("a",{href:e},"下载"),"并用你喜欢的播放器观看!")})),W,(function(e){return Y.createElement("img",{className:"upload-preview-img",src:e})})),J,(function(e){return Y.createElement("audio",{className:"upload-preview-img",src:e,controls:!0})}));function H(e){var t=function(e){var t=Q[B(e)];return t||(t=function(){return(null==e?void 0:e.name)||e}),t}(e);return t||(t=function(){return(null==e?void 0:e.name)||e}),t((null==e?void 0:e.url)||e)}var X=f(596),Z=f.n(X),ee=f(520),te=f.n(ee),ne=f(176),re=f.n(ne),oe=f(120),ae=f.n(oe),ie=f(808),ce=f.n(ie),le=f(936),ue=f.n(le),se=f(144),fe={};fe.styleTagTransform=ue(),fe.setAttributes=ae(),fe.insert=re().bind(null,"head"),fe.domAPI=te(),fe.insertStyleElement=ce();Z()(se.c,fe);se.c&&se.c.locals&&se.c.locals;var pe=f(496);const de=function(e){var n,r=e.previewFile,a=e.setPreviewFile,i=e.title,c=A((0,o.useState)(!1),2),l=c[0],s=c[1];function f(){s(!1),a&&a(null)}return(0,o.useEffect)((function(){s(!!r||!1)}),[r]),pe.createElement(u.Modal,h({wrapClassName:"upload-preview-modal-wrap",className:"upload-preview-modal",title:i||(n=r,n&&"object"===t(n)&&n.name?n.name:"预览"),visible:l,width:"auto",onCancel:f,footer:[pe.createElement(u.Button,{key:"back",onClick:f},"关闭")]},e.modalConf),H(r))};var ve=f(48),me={};me.styleTagTransform=ue(),me.setAttributes=ae(),me.insert=re().bind(null,"head"),me.domAPI=te(),me.insertStyleElement=ce();Z()(ve.c,me);ve.c&&ve.c.locals&&ve.c.locals;var ye=["onChange"];function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const be=function(e){var t=e.onChange,n=s(e,ye),r=n.name,i=void 0===r?"file":r,c=n.multiple,l=void 0!==c&&c,f=n.accept,p=n.value,d=n.btnText,v=void 0===d?"上传":d,m=n.maxCount,y=void 0===m?1/0:m,g=n.maxSize,w=n.listType,k=void 0===w?"text":w,x=n.disabled,S=void 0!==x&&x,_=n.readOnly,M=void 0!==_&&_,C=n.ossUrl,T=void 0===C?"/api/v1/user/oss/getWebOssConfig":C,R=n.isOssUpload,D=void 0===R||R,U=n.isStrRes,F=n.isResRemoveArr,K=void 0===F||F,q=n.ossOpt,$=n.onCountExceed,z=n.templateUrl,G=n.beforeUploadCheck,W=n.templateDownloadText,J=void 0===W?"模板下载":W,Y=A((0,o.useState)([]),2),H=Y[0],X=Y[1],Z=A((0,o.useState)(),2),ee=Z[0],te=Z[1],ne=A((0,o.useState)(!1),2),re=ne[0],oe=ne[1],ae=function(){var e=b(O().mark((function e(n){var r,o,a,i,c,l,u;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.fileList,X(r),o=P(r),!D||!U){e.next=24;break}a=0;case 5:if(!(a<o.length)){e.next=24;break}return c=o[a],null!==(i=c)&&void 0!==i&&i.originFileObj&&(c=null===(l=c)||void 0===l?void 0:l.originFileObj),e.next=10,c.ossPromise;case 10:if(e.t2=e.sent,e.t2){e.next=13;break}e.t2=c.url;case 13:if(e.t1=e.t2,e.t1){e.next=16;break}e.t1=c.ossUrl;case 16:if(e.t0=e.t1,e.t0){e.next=19;break}e.t0=c;case 19:u=e.t0,o[a]=u;case 21:a++,e.next=5;break;case 24:!o||o.length<=0?o=void 0:K&&1===y&&(o=o[0]),t&&(null==t||t(o));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){if(p){var e=p;"string"==typeof e&&(e=p.split(",")),Array.isArray(e)&&(e=e.map((function(e){return"string"==typeof e?{name:I(e),status:"done",uid:"rc-upload-".concat(Date.now(),"-").concat((0,E.nanoid)()),url:e,type:L(e)}:e}))),X(N(e,y))}}),[p]);var ie=ge({iconRender:function(e){var t;return"application/pdf"==(null==e?void 0:e.type)?a().createElement(j.FilePdfTwoTone,{twoToneColor:"#DD4B43"}):null!=e&&null!==(t=e.type)&&void 0!==t&&t.startsWith("video/")?a().createElement(j.VideoCameraTwoTone,{twoToneColor:"#3C87F7"}):"application/vnd.ms-excel"==(null==e?void 0:e.type)||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"==(null==e?void 0:e.type)?a().createElement(j.FileExcelTwoTone,{twoToneColor:"#68B27C"}):"application/vnd.openxmlformats-officedocument.wordprocessingml.document"==(null==e?void 0:e.type)||"application/msword"==(null==e?void 0:e.type)?a().createElement(j.FileWordTwoTone,{twoToneColor:"#88CCF5"}):a().createElement(j.PaperClipOutlined,null)},name:i,accept:f,multiple:l,listType:k,maxCount:y,fileList:H,onChange:ae,disabled:S,readOnly:M,onRemove:function(e){var n=(H||[]).filter((function(t){return t.url!==e.url}));t&&t(n)},beforeUpload:function(e,t){return b(O().mark((function e(){var n;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(oe(!0),n=!1,t.forEach((function(e){g&&e.size>g&&(u.message.error("".concat(e.name," 文件大小超出限制,文件大小:").concat(e.size,"; ")),n=!0)})),!n){e.next=6;break}return oe(!1),e.abrupt("return",u.Upload.LIST_IGNORE);case 6:if(!(y>0&&H.length>=y)){e.next=12;break}return $&&$(H.length-y),H.length=y,u.message.error("文件个数超出限制"),oe(!1),e.abrupt("return",u.Upload.LIST_IGNORE);case 12:if(!G){e.next=23;break}return e.prev=13,e.next=16,G(t);case 16:e.next=23;break;case 18:return e.prev=18,e.t0=e.catch(13),console.error(e.t0),oe(!1),e.abrupt("return",u.Upload.LIST_IGNORE);case 23:oe(!1);case 24:case"end":return e.stop()}}),e,null,[[13,18]])})))()},customRequest:D?function(e){e.action,e.data;var t=e.file,r=(e.filename,e.headers,e.method,e.onSuccess),o=(e.onProgress,e.onError),a=new V(ge({serverUrl:T},q));t.ossPromise=a.upload(t,{params:ge({isPublic:1},n.params||{})}).then((function(e){var n;return t.url=null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.fileUrl,t.ossUrl=t.url,r(t),t.ossUrl})).catch(o)}:null,onPreview:function(e){var t=function(e){return!!Q[B(e)]}(e);t?te(e):window.open(e.url)}},n||{});return a().createElement(a().Fragment,null,a().createElement(u.Upload,h({className:"oss-uploader"},ie),y&&y>H.length?"picture-card"===k?re?"检测中":v:a().createElement(u.Button,{loading:re,icon:a().createElement(j.UploadOutlined,null)},v):null),z?a().createElement("a",{className:"uploader-template-download-btn",href:z},J):null,a().createElement(de,{previewFile:ee,setPreviewFile:te,modalConf:n.modalConf}))};var we=(0,o.createContext)(null),Oe=f(496);function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe=function(e){var t=(0,o.useContext)(we)||{},n=e.field,r=void 0===n?{}:n,a=e.onChange,i=e.value,c=r.name,l=r.mode,u=r.componentProps,s=void 0===u?{}:u,f=s.multiple;function p(){return(p=b(O().mark((function t(n){var o,i,l;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n,null==r||!r.autoUpload||null===(o=e.fieldsConf[c])||void 0===o||!o.onUpload){t.next=7;break}return t.next=4,null===(l=e.fieldsConf[c])||void 0===l?void 0:l.onUpload(n);case 4:if(i=t.sent){t.next=7;break}return t.abrupt("return");case 7:!f&&i&&1===i.length&&(i=i[0]),a&&a(i);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var d=xe(xe({mode:l},e),{},{value:"string"==typeof i?[i]:i,axios:null==t?void 0:t.axios,axiosConf:null==t?void 0:t.axiosConf},s);return Oe.createElement(be,h({},d,{onChange:function(e){return p.apply(this,arguments)}}))};var Ae,je=f(792),Ee=f.n(je),Se=Object.prototype.toString,_e=function(e){return e&&e instanceof Map},Me=function(e){return e&&e instanceof Set},Ce=function(e){return e&&e instanceof WeakMap},Te=function(e){return e&&e instanceof WeakSet},Ie=function(e){return"function"==typeof e},Le=Array.isArray,Re=function(e){return"[object Object]"===Se.call(e)},Ne=function(e){return _e(e)||Ce(e)||Me(e)||Te(e)},De=function(e){return Re(e)||Le(e)},Ue=function(e){return Array.isArray(e)?e:null!=e?[e]:[]},Fe=function(){function e(e){void 0===e&&(e=[]),this.forEachIndex=0,this.value=e}return e.prototype.add=function(e){this.has(e)||this.value.push(e)},e.prototype.has=function(e){return this.value.indexOf(e)>-1},e.prototype.delete=function(e){var t=this.value.length;if(0!==t)if(1!==t||this.value[0]!==e){var n=this.value.indexOf(e);n>-1&&(this.value.splice(n,1),n<=this.forEachIndex&&(this.forEachIndex-=1))}else this.value=[]},e.prototype.forEach=function(e){if(0!==this.value.length)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++)e(this.value[this.forEachIndex])},e.prototype.batchDelete=function(e){if(0!==this.value.length)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++){var t=this.value[this.forEachIndex];this.value.splice(this.forEachIndex,1),this.forEachIndex--,e(t)}},e.prototype.clear=function(){this.value.length=0},e}(),Ke=new WeakMap,qe=new WeakMap,$e=new WeakMap,ze=new WeakMap,Ve=new WeakMap,Ge=[],We={value:0},Je={value:0},Be={value:!1},Ye={value:!1},Qe=new Fe,He=new Fe,Xe=new Fe,Ze=new Fe,et=Symbol("MakeObModelSymbol"),tt=Symbol("ObModelSymbol"),nt=Symbol("ObModelNodeSymbol"),rt=Symbol("iteration key"),ot=function(e,t){var n=Ve.get(e),r=[];if(n){var o=n.get(t);o&&o.forEach((function(e){-1===r.indexOf(e)&&r.push(e)}))}return r},at=function(e,t){var n=ot(e,t),r=Je.value;Je.value=0;for(var o=0,a=n.length;o<a;o++){var i=n[o];i._isComputed?i._scheduler(i):ht()?He.add(i):yt()?Qe.add(i):Ie(i._scheduler)?i._scheduler(i):i()}Je.value=r},it=function(e){var t=e.key,n=e.type,r=e.target;"iterate"===n&&(t=rt);var o=Ge.length;if(0!==o){var a=Ge[o-1];gt()||a&&(Ye.value=!0,function(e,t){var n=e._reactionsSet;n?n.add(t):e._reactionsSet=new Fe([t])}(a,function(e,t,n){var r=Ve.get(e);if(r){var o=r.get(t);return o?o.add(n):r.set(t,new Fe([n])),r}var a=new Map([[t,new Fe([n])]]);return Ve.set(e,a),a}(r,t,a)))}},ct=function(e){var t=e.key,n=e.type,r=e.target,o=e.oldTarget;if(st(),function(e){Ze.forEach((function(t){return t(e)}))}(e),"clear"===n?o.forEach((function(e,t){at(r,t)})):at(r,t),"add"===n||"delete"===n||"clear"===n){var a=Array.isArray(r)?"length":rt;at(r,a)}ft()},lt=function(e){var t;null===(t=e._reactionsSet)||void 0===t||t.forEach((function(t){t.forEach((function(t){t.delete(e)}))})),Qe.delete(e),He.delete(e),delete e._reactionsSet},ut=function(e){e._disposed=!0,lt(e),function(e){var t;null===(t=e._computesSet)||void 0===t||t.forEach((function(e){0===ot(e._context,e._property).length&&(ut(e),e._dirty=!0)}))}(e)},st=function(){We.value++},ft=function(){if(We.value--,0===We.value){var e=Je.value;Je.value=0,bt(),wt(),Je.value=e}},pt=function(){Be.value=!0},dt=function(){var e=Je.value;Be.value=!1,Je.value=0,He.batchDelete((function(e){Ie(e._scheduler)?e._scheduler(e):e()})),Je.value=e},vt=function(){Je.value++},mt=function(){Je.value--},yt=function(){return We.value>0},ht=function(){return Be.value},gt=function(){return Je.value>0},bt=function(){Qe.batchDelete((function(e){Ie(e._scheduler)?e._scheduler(e):e()}))},wt=function(){Xe.batchDelete((function(e){e()}))},Ot=function(e,t){return e!==t&&(e.length!==t.length||!!e.some((function(e,n){return e!==t[n]})))},kt=(function(){function e(e,t){this.node=t,this.key=e.key,this.type=e.type,this.object=e.target,this.value=e.value,this.oldValue=e.oldValue}Object.defineProperty(e.prototype,"path",{get:function(){return this.node.path.concat(this.key)},enumerable:!1,configurable:!0})}(),function(){function e(e,t,n){this.target=e,this.key=t,this.value=n}return Object.defineProperty(e.prototype,"path",{get:function(){return this.parent?this.parent.path.concat(this.key):this.key?[this.key]:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetRaw",{get:function(){return _t(this.target)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){if(this.target)return xt(this.targetRaw)},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.key?e.targetRaw===this.targetRaw&&e.key===this.key:e.value===this.value},e.prototype.contains=function(e){if(e===this)return!0;for(var t=e.parent;t;){if(this.isEqual(t))return!0;t=t.parent}return!1},e}()),xt=function(e){return(null==e?void 0:e[nt])?e[nt]:ze.get(e)},Pt=function(e,t,n){var r=_t(n),o=xt(r);if(o)return o;!function(e,t){(null==e?void 0:e[tt])?e[nt]=t:ze.set(e,t)}(r,new kt(e,t,n))},At=Symbol("RAW_TYPE"),jt=Symbol("OBSERVABLE_TYPE"),Et=(Object.prototype.hasOwnProperty,function(e){return Ke.has(e)||!!(null==e?void 0:e[tt])}),St=function(e){return null!=e&&(!!Le(e)||(Re(e)?!e[At]&&(!!e[jt]||(!("$$typeof"in e)||!("_owner"in e))&&(!e._isAMomentObject&&(!e._isJSONSchemaObject&&(!Ie(e.toJS)&&!Ie(e.toJSON))))):!!(_e(e)||Ce(e)||Me(e)||Te(e))))},_t=function(e){return(null==e?void 0:e[tt])?e[tt]:Ke.get(e)||e},Mt=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},Ct=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Tt=new Set(Object.getOwnPropertyNames(Symbol).reduce((function(e,t){if("arguments"===t||"caller"===t)return e;var n=Symbol[t];return"symbol"==typeof n?e.concat(n):e}),[])),It=Object.prototype.hasOwnProperty;function Lt(e,t,n){var r=qe.get(n);return r||(!Et(n)&&St(n)?qt(e,t,n):n)}function Rt(e,t,n,r){var o=n.next;return n.next=function(){var a=o.call(n),i=a.done,c=a.value;return i||(r?c[1]=Lt(e,t,c[1]):c=Lt(e,t,c)),{done:i,value:c}},n}var Nt=((Ae={has:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this);return it({target:t,key:e,type:"has"}),n.has.apply(t,arguments)},get:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this);return it({target:t,key:e,type:"get"}),Lt(t,e,n.get.apply(t,arguments))},add:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),o=n.add.apply(t,arguments);return r||ct({target:t,key:e,value:e,type:"add"}),o},set:function(e,t){var n=Ke.get(this),r=Reflect.getPrototypeOf(this),o=r.has.call(n,e),a=r.get.call(n,e),i=r.set.apply(n,arguments);return o?t!==a&&ct({target:n,key:e,value:t,oldValue:a,type:"set"}):ct({target:n,key:e,value:t,type:"add"}),i},delete:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),o=n.get?n.get.call(t,e):void 0,a=n.delete.apply(t,arguments);return r&&ct({target:t,key:e,oldValue:o,type:"delete"}),a},clear:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this),n=0!==e.size,r=e instanceof Map?new Map(e):new Set(e),o=t.clear.apply(e,arguments);return n&&ct({target:e,oldTarget:r,type:"clear"}),o},forEach:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Ke.get(this),a=Reflect.getPrototypeOf(this);it({target:o,type:"iterate"});return(t=a.forEach).call.apply(t,Ct([o,function(t,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return e.apply(void 0,Ct([Lt(o,n,t),n],Mt(r),!1))}],Mt(n),!1))},keys:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),t.keys.apply(e,arguments)},values:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Rt(e,"",t.values.apply(e,arguments),!1)},entries:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Rt(e,"",t.entries.apply(e,arguments),!0)}})[Symbol.iterator]=function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Rt(e,"",t[Symbol.iterator].apply(e,arguments),e instanceof Map)},Object.defineProperty(Ae,"size",{get:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Reflect.get(t,"size",e)},enumerable:!1,configurable:!0}),Ae),Dt={get:function(e,t,n){return e=It.call(Nt,t)?Nt:e,Reflect.get(e,t,n)}},Ut={get:function(e,t,n){if(t){var r=e[t];if("symbol"==typeof t&&Tt.has(t))return r;it({target:e,key:t,receiver:n,type:"get"});var o=qe.get(r);if(o)return o;if(!Et(r)&&St(r)){var a=Reflect.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.writable||!1!==a.configurable)return qt(e,t,r)}return r}},has:function(e,t){var n=Reflect.has(e,t);return it({target:e,key:t,type:"has"}),n},ownKeys:function(e){var t=Reflect.ownKeys(e);return it({target:e,type:"iterate"}),t},set:function(e,t,n,r){var o=It.call(e,t),a=qt(e,t,n),i=e[t];return e[t]=a,o?n!==i&&ct({target:e,key:t,value:a,oldValue:i,receiver:r,type:"set"}):ct({target:e,key:t,value:a,oldValue:i,receiver:r,type:"add"}),!0},deleteProperty:function(e,t){var n=e[t];return delete e[t],ct({target:e,key:t,oldValue:n,type:"delete"}),!0}},Ft=function(e,t){var n=new Proxy(e,Ut);return Ke.set(n,e),t?$e.set(e,n):qe.set(e,n),n},Kt=function(e,t){var n=new Proxy(e,Dt);return Ke.set(n,e),t?$e.set(e,n):qe.set(e,n),n},qt=function(e,t,n,r){if("object"!=typeof n)return n;var o=Ke.get(n);if(o){var a=xt(o);return a.target||(a.target=e),a.key=t,n}if(!St(n))return n;if(e){var i=Ke.get(e)||e;if($e.get(i))return n}return Pt(e,t,n),r?function(e){return De(e)?Ft(e,!0):Ne(e)?Kt(e,!0):e}(n):De(n)?Ft(n):Ne(n)?Kt(n):n},$t=function(e){var t=function(t){return e({value:t})};return Ie(e)&&(t[et]=e),t},zt=function(e,t){function n(n){var r;try{e(),Ie(n)&&(r=n())}finally{t()}return r}return n.bound=Vt(n),n},Vt=function(e){return function(t,n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e((function(){return t.apply(n,r)}))}}},Gt=function(e,t){var n=zt(e,t),r=$t((function(e){var t=e.target,r=e.key;return t[r]=n.bound(t[r],t),t}));return n[et]=r,n.bound[et]=r,n},Wt=Gt(st,ft);Wt.scope=Gt(pt,dt),Wt.endpoint=function(e){Ie(e)&&(0===We.value?e():Xe.add(e))},Gt((function(){st(),vt()}),(function(){mt(),ft()})).scope=Gt((function(){pt(),vt()}),(function(){mt(),dt()}));zt(vt,mt);var Jt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:qt(t,n,t?t[n]:r)};return t?(Object.defineProperty(t,n,{set:function(e){var r=o.value;e=qt(t,n,e),o.value=e,r!==e&&ct({target:t,key:n,type:"set",oldValue:r,value:e})},get:function(){return it({target:t,key:n,type:"get"}),o.value},enumerable:!0,configurable:!1}),t):o.value})),Bt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:t?t[n]:r},a={set:function(e){var t=o.value;o.value=e,t!==e&&ct({target:o,key:n,type:"set",oldValue:t,value:e})},get:function(){return it({target:o,key:n,type:"get"}),o.value}};return Ke.set(a,o),qe.set(o,a),Pt(t,n,o),t?(Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!1,writable:!1}),t):a})),Yt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:t?t[n]:r},a={},i=t||o,c=t?n:"value";function l(){return it({target:i,key:c,type:"get"}),o.value}function u(e){var t=o.value;o.value=e,t!==e&&ct({target:i,key:c,type:"set",oldValue:t,value:e})}return t?(Object.defineProperty(t,n,{get:l,set:u,enumerable:!0}),t):(Object.defineProperty(a,"value",{set:u,get:l}),Pt(t,n,o),a[tt]=o,a)})),Qt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:qt(t,n,t?t[n]:r,!0)};return t?(Object.defineProperty(t,n,{set:function(e){var r=o.value;e=qt(t,n,e,!0),o.value=e,r!==e&&ct({target:t,key:n,type:"set",oldValue:r,value:e})},get:function(){return it({target:t,key:n,type:"get"}),o.value},enumerable:!0,configurable:!1}),t):o.value})),Ht=Object.getOwnPropertyDescriptor,Xt=Object.getPrototypeOf,Zt=Symbol("ClassDescriptorSymbol");function en(e,t){if(e)return Ht(e,t)||en(Xt(e),t)}function tn(e,t,n){if(!e)return n?Ie(n)?{get:n}:n:{};var r=function(e,t){var n=e.constructor;if(n===Object||n===Array)return en(e,t);var r=n[Zt]||{},o=r[t];if(o)return o;var a=en(e,t);return n[Zt]=r,r[t]=a,a}(e,t);return r||{}}var nn=$t((function(e){var t=e.target,n=e.key,r=e.value,o={},a={},i=t||o,c=t?n:"value",l=tn(t,c,r);function u(){var e;o.value=null===(e=l.get)||void 0===e?void 0:e.call(i)}function s(){if(-1===Ge.indexOf(s)){lt(s);try{Ge.push(s),u()}finally{Ge.pop()}}}function f(){return Ge.length>0&&function(e){if(Ie(e)){var t=Ge[Ge.length-1];if(t){var n=t._computesSet;n?n.add(e):t._computesSet=new Fe([e])}}}(s),gt()?u():s._dirty&&(s(),s._dirty=!1),it({target:i,key:c,type:"get"}),o.value}function p(e){var t;try{st(),null===(t=l.set)||void 0===t||t.call(i,e)}finally{ft()}}return s._name="ComputedReaction",s._scheduler=function(){s._dirty=!0,ct({target:i,key:c,value:o.value,type:"set"})},s._isComputed=!0,s._dirty=!0,s._context=i,s._property=c,t?(Object.defineProperty(t,n,{get:f,set:p,enumerable:!0}),t):(Object.defineProperty(a,"value",{set:p,get:f}),Pt(t,n,o),a[tt]=o,a)}));function rn(e){return qt(null,null,e)}rn.box=Bt,rn.ref=Yt,rn.deep=Jt,rn.shallow=Qt,rn.computed=nn,rn[et]=Jt;var on=function(e,t){void 0===t&&(t="AutoRun");var n=function(){if(Ie(e)&&!(n._boundary>0)&&-1===Ge.indexOf(n)){lt(n);try{st(),Ge.push(n),e()}finally{Ge.pop(),n._boundary++,ft(),n._boundary=0,n._memos.cursor=0,n._effects.cursor=0}}},r=function(){n._memos={queue:[],cursor:0},n._effects={queue:[],cursor:0}};return n._boundary=0,n._name=t,r(),n(),function(){ut(n),function(e){if(e._effects)try{st(),e._effects.queue.forEach((function(e){e&&e.dispose&&e.dispose()}))}finally{ft()}}(n),r()}};on.memo=function(e,t){if(Ie(e)){var n=Ge[Ge.length-1];if(!n||!n._memos)throw new Error("autorun.memo must used in autorun function body.");var r=Ue(t||[]),o=n._memos.cursor++,a=n._memos.queue[o];if(!a||Ot(r,a.deps)){var i=e();return n._memos.queue[o]={value:i,deps:r},i}return a.value}},on.effect=function(e,t){if(Ie(e)){var n=Ge[Ge.length-1];if(!n||!n._effects)throw new Error("autorun.effect must used in autorun function body.");var r=n._effects,o=Ue(t||[{}]),a=r.cursor++,i=r.queue[a];i&&!Ot(o,i.deps)||(Promise.resolve(0).then((function(){if(!n._disposed){var t=e();Ie(t)&&(r.queue[a].dispose=t)}})),r.queue[a]={deps:o})}};var an=function(e,t){void 0===t&&(t="TrackerReaction");var n=this;this.track=function(e){if(!Ie(e))return n.results;if(!(n.track._boundary>0)){if(-1===Ge.indexOf(n.track)){lt(n.track);try{st(),Ge.push(n.track),n.results=e()}finally{Ge.pop(),n.track._boundary++,ft(),n.track._boundary=0}}return n.results}},this.dispose=function(){ut(n.track)},this.track._scheduler=function(t){0===n.track._boundary&&n.dispose(),Ie(t)&&e(t)},this.track._name=t,this.track._boundary=0},cn="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;var ln=function(){try{if("undefined"!=typeof self)return self}catch(e){}try{if("undefined"!=typeof window)return window}catch(e){}try{if(void 0!==f.g)return f.g}catch(e){}return Function("return this")()}(),un=ln.FinalizationRegistry&&new ln.FinalizationRegistry((function(e){var t;return null===(t=null==e?void 0:e.clean)||void 0===t?void 0:t.call(e)})),sn=function(){function e(e,t){void 0===t&&(t=1e4),this.token={clean:e},this.expireTime=t}return e.prototype.open=function(e){var t=this;un?un.register(e,this.token,this.token):this.request=setTimeout((function(){var e,n;null===(n=null===(e=t.token)||void 0===e?void 0:e.clean)||void 0===n||n.call(e)}),this.expireTime)},e.prototype.close=function(){un?un.unregister(this.token):clearTimeout(this.request)},e}(),fn=function(e){var t=!1;return Promise.resolve(0).then((function(){t?t=!1:e()})),function(){t=!0}},pn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},dn=[],vn={value:0},mn=new Set;function yn(){var e=pn((0,o.useState)([]),2)[1],t=(0,o.useRef)(!1),n=(0,o.useRef)(!1);cn((function(){return t.current=!0,n.current&&(e([]),n.current=!1),function(){t.current=!1}}),dn);var r,a,i=(0,o.useCallback)((function(){e([])}),dn),c=(0,o.useCallback)((function(){t.current?0===vn.value?i():mn.add(i):n.current=!0}),dn);return vn.value++,r=function(){vn.value>0&&vn.value--,0===vn.value&&mn.forEach((function(e){mn.delete(e),e()}))},(a=(0,o.useRef)(null)).current=fn(r),cn((function(){a.current(),r()})),c}var hn=Array.isArray,gn=function(e,t){var n=(0,o.useRef)(null),r=(0,o.useRef)(!1);(0,o.useEffect)((function(){r.current=!0;var o=e();return function(){var e,a,i;(r.current=!1,e=n.current,a=t,(i=hn(e))===hn(a)&&(i?e.length===a.length&&e.every((function(e,t){return e===a[t]})):e===a))?fn((function(){r.current||o&&o()})):o&&o()}}),t),n.current=t},bn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},wn=function(){};function On(){return new wn}var kn=function(e,t){var n,r,o,i,c=yn();return(n=function(){return new an((function(){"function"==typeof(null==t?void 0:t.scheduler)?t.scheduler(c):c()}),null==t?void 0:t.displayName)},r=a().useRef(null),o=a().useRef(),i=bn(a().useState(On),1)[0],r.current||(r.current=n()),o.current||(o.current=new sn((function(){r.current&&r.current.dispose()})),o.current.open(i)),gn((function(){return o.current.close(),function(){r.current&&(r.current.dispose(),r.current=null)}}),[]),r.current).track(e)},xn=function(){return xn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xn.apply(this,arguments)};function Pn(e,t){var n=xn({forwardRef:!1},t),r=n.forwardRef?(0,o.forwardRef)((function(t,r){return kn((function(){return e(xn(xn({},t),{ref:r}))}),n)})):function(t){return kn((function(){return e(t)}),n)},a=(0,o.memo)(r);return Ee()(a,e),n.displayName&&(a.displayName=n.displayName),a}Pn((function(e){var t="function"==typeof e.children?e.children():e.children;return a().createElement(o.Fragment,{},t)}));var An=f(694),jn={};jn.styleTagTransform=ue(),jn.setAttributes=ae(),jn.insert=re().bind(null,"head"),jn.domAPI=te(),jn.insertStyleElement=ce();Z()(An.c,jn);const En=An.c&&An.c.locals?An.c.locals:void 0;var Sn=["options","isAvatar","configKey","infoRender","avatarSize"];function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cn=Pn((function(e){var t,n=(0,c.useField)(),r=(null===(t=(0,c.useFieldSchema)()["x-component-props"])||void 0===t?void 0:t.options)||[],i=(e.options,e.isAvatar),l=e.configKey,f=e.infoRender,p=e.avatarSize,d=void 0===p?"default":p,v=s(e,Sn),m=(0,o.useMemo)((function(){return r.map((function(e){return Mn(Mn({},e),{},{avatarColor:(t=360*Math.random(),n=20*Math.random()+70,r=20*Math.random()+70,"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"))});var t,n,r}))}),[r]),y=(0,o.useCallback)((function(e,t,n){return t?e[t]:e[n]}),[]);return a().createElement(u.Select,h({className:En["user-select"]},v,{value:n.value,onChange:n.setValue,optionLabelProp:"label"}),m.map((function(e,t){return a().createElement(u.Select.Option,{label:e.label,key:t,value:e.value,className:En["user-select-option"]},a().createElement(a().Fragment,null,i&&a().createElement("span",{className:En["user-select-option__avatar"]},e.avatar?a().createElement(u.Avatar,{src:e.avatar,size:d}):a().createElement(u.Avatar,{style:{verticalAlign:"middle",backgroundColor:e.avatarColor},size:d},e.label)),a().createElement("div",{className:En["option-info"]},f||a().createElement(a().Fragment,null,a().createElement("div",{className:En["option-info-name"],key:"tagLabel"},a().createElement("span",{className:En["option-info-name__label"]},e.label," ")),a().createElement("span",{className:En["option-info__idCard"]},"手机号:",y(e,null==l?void 0:l.phoneKey,"phone")),a().createElement("span",{className:En["option-info__idCard"]},"身份证号:",y(e,null==l?void 0:l.idCardKey,"idCard"))))))})))}));function Tn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ln(){var e=Rn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),t=e.resList,n=e.maxCol;return t.forEach((function(e){Nn(n,e)})),t}function Rn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t||{},r=n.resList,o=void 0===r?[]:r,a=n.preCol,i=void 0===a?0:a,c=n.mergeLast,l=n.level,u=void 0===l?0:l,s=n.childrenKey,f=void 0===s?"children":s,p=i+1,d=0,v=!1;e.forEach((function(e){e&&Array.isArray(e[f])&&e[f].length>0&&(v=!0)}));var m=o.length>0?o.length-1:0;return!0===c&&!v&&u>0?(o[m].push(P(e)),{resList:o,maxCol:p,maxRow:1}):(e.forEach((function(e,n){var r=In({},e),a=r[f]||[],c=null==a?void 0:a.length;if(n>0&&o.push(Nn(i,[],{content:!1})),m=o.length>0?o.length-1:0,o[m]||(o[m]=[]),o[m].push(r),c>0){var l=Rn(a,In(In({},t),{},{resList:o,preCol:i+1,level:u+1}));p<l.maxCol&&(p=l.maxCol),d+=l.maxRow,r._maxRow=l.maxRow}else r._maxRow=1,d+=1})),{resList:o,maxCol:p,maxRow:d})}function Nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})||{}).content;if(t.length<e)for(var r=t.length;r<e;r++)t.push(n);return t}var Dn=f(258),Un={};Un.styleTagTransform=ue(),Un.setAttributes=ae(),Un.insert=re().bind(null,"head"),Un.domAPI=te(),Un.insertStyleElement=ce();Z()(Dn.c,Un);Dn.c&&Dn.c.locals&&Dn.c.locals;var Fn=f(496),Kn=function(e){var t=(0,c.useField)(),n=e.dataSource,r=void 0===n?t.dataSource||[]:n,a=e.disabled,i=e.readOnly,l=e.value,s=e.onChange,f=e.mergeLast,p=void 0===f||f,d=e.labelKey,v=void 0===d?"label":d,m=e.valueKey,y=void 0===m?"value":m,h=e.childrenKey,g=void 0===h?"children":h,b=(0,o.useMemo)((function(){return Ln(r,{mergeLast:p,childrenKey:g})}),[r]);return Fn.createElement(u.Checkbox.Group,{className:"tree-checkbox",disabled:a||i,value:l,onChange:s},Fn.createElement("table",{className:"tree-checkbox-table"},Fn.createElement("tbody",null,null==b?void 0:b.map((function(e,t){return Fn.createElement("tr",{className:"tree-checkbox-row tree-checkbox-row-".concat(t),key:t},null==e?void 0:e.map((function(e,t){return!1===e?null:Fn.createElement("td",{className:"tree-checkbox-col tree-checkbox-col-".concat(t),key:t,rowSpan:(null==e?void 0:e._maxRow)>1?null==e?void 0:e._maxRow:null},Array.isArray(e)?Fn.createElement(Fn.Fragment,null,e.map((function(e){return e&&Fn.createElement(u.Checkbox,{value:e[y],key:e[y]},e[v])}))):e&&Fn.createElement(u.Checkbox,{value:e[y],key:e[y]},e[v]))})))})))))};var qn=f(496),$n=u.DatePicker.RangePicker;function zn(e){var t,n=(null==e||null===(t=e.parent)||void 0===t?void 0:t.value)||(null==e?void 0:e.value);return Array.isArray(n)&&(n=n[e.index]),n}var Vn=(0,c.observer)((function(e){return qn.createElement(u.DatePicker,e)}));Vn.RangePicker=(0,c.observer)((function(e){var t=(0,c.useField)(),n=(0,c.useFieldSchema)(),o=e.isSplitTimes,a=void 0!==o&&o,i=e.startKey,l=void 0===i?"startTime":i,u=e.endKey,s=void 0===u?"endTime":u,f=function(e,o){var a=r(r({},l,e),s,o);if(t.parent){if(t.parent&&n.parent){var i=zn(t);Object.keys(a).forEach((function(e){i[e]=a[e]}))}}else t.form.setValues(a)};return qn.createElement($n,h({},e,{onChange:function(t,n){return r=t,i=(o=n)[0],c=o[1],e.onChange&&e.onChange(r),void(a&&("date"!==e.pick&&e.pick||e.showTime?f(i,c):f(i+" 00:00:00",c+" 23:59:59")));var r,o,i,c}}))}));const Gn=f.p+"static/imgs/picker-icon_24d725ef02.svg";function Wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=(arguments.length>2?arguments[2]:void 0)||{},r=n.isObjectRes,o=void 0===r||r,a=n.lonKey,i=void 0===a?"longitude":a,c=n.latKey,l=void 0===c?"latitude":c,u=n.addrKey,s=void 0===u?"address":u,f=e[i],p=e[l],d=e[s],v=Jn(t);return v&&!1===o&&(f=v[i],p=v[l],d=v[s]),{lon:f,lat:p,addr:d}}function Jn(e){var t,n=(null==e||null===(t=e.parent)||void 0===t?void 0:t.value)||(null==e?void 0:e.value);return Array.isArray(n)&&(n=n[e.index]),n}var Bn=f(544),Yn={};Yn.styleTagTransform=ue(),Yn.setAttributes=ae(),Yn.insert=re().bind(null,"head"),Yn.domAPI=te(),Yn.insertStyleElement=ce();Z()(Bn.c,Yn);Bn.c&&Bn.c.locals&&Bn.c.locals;var Qn=f(496);const Hn=function(e){var t=e||{},n=t.onShow,r=t.isObjectRes,a=t.lonKey,i=t.latKey,l=t.addrKey,s=t.value,f=t.pickerText,p=void 0===f?"选点":f,d=t.pickerIcon,v=t.pickerIconUrl,m=(0,c.useField)(),y=(0,o.useMemo)((function(){return Wn(s,m,{isObjectRes:r,lonKey:a,latKey:i,addrKey:l})}),[r,a,i,l,s,m.data]);return Qn.createElement("div",{className:"location-value-box"},Qn.createElement("div",{className:"location-value-head-box"},Qn.createElement("div",{className:"location-lon-lat"},Qn.createElement("div",null,"经度:",y.lon," "),Qn.createElement("div",null,"纬度:",y.lat)),Qn.createElement(u.Button,{className:"location-btn",color:"primary",type:"text",onClick:n},d||Qn.createElement("img",{className:"location-picker-icon",src:v||Gn}),Qn.createElement("span",{className:"location-picker-text"},p))),Qn.createElement("div",null,"地址:",y.addr))};var Xn=f(816),Zn=f(736),er={};er.styleTagTransform=ue(),er.setAttributes=ae(),er.insert=re().bind(null,"head"),er.domAPI=te(),er.insertStyleElement=ce();Z()(Zn.c,er);Zn.c&&Zn.c.locals&&Zn.c.locals;var tr=f(496);function nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const or=function(e){var t=e.pickInfo,n=e.setPickInfo,r=e.setPoint,o=e.addrLoading,a=e.defaultLocation,i=e.disabled,c=e.readOnly;function l(e){var t,r,o=null!==(t=null==e||null===(r=e.target)||void 0===r?void 0:r.value)&&void 0!==t?t:e,a=null;return n((function(e){return a=rr(rr({},e),{},{lon:o})})),a}function s(e){var t,r,o=null!==(t=null==e||null===(r=e.target)||void 0===r?void 0:r.value)&&void 0!==t?t:e,a=null;return n((function(e){return a=rr(rr({},e),{},{lat:o})})),a}function f(e){var t=l(e);r&&r(t.lon||a.lon,t.lat||a.lat,{changeCenter:!0})}function p(e){var t=s(e);r&&r(t.lon||a.lon,t.lat||a.lat,{changeCenter:!0})}return tr.createElement("div",{className:"location-picker-info"},tr.createElement("div",{className:"picker-info-position"},tr.createElement("div",{className:"picker-info-lon"},tr.createElement("div",{className:"picker-info-label"},"经度:"),c?t.lon:tr.createElement(u.InputNumber,{className:"picker-info-input",disabled:i||o,max:180,min:-180,controls:!1,value:t.lon,onChange:l,onBlur:f,onPressEnter:f})),tr.createElement("div",{className:"picker-info-lat"},tr.createElement("div",{className:"picker-info-label"},"纬度:"),c?t.lat:tr.createElement(u.InputNumber,{className:"picker-info-input",disabled:i||o,max:90,min:-90,controls:!1,value:t.lat,onChange:s,onBlur:p,onPressEnter:p}))),tr.createElement("div",{className:"picker-info-addr"},tr.createElement("div",{className:"picker-info-label"},"地址:"),o?tr.createElement(u.Spin,{size:"small"}):t.addr))};var ar=["AMap.Geocoder","AMap.Autocomplete"];window._AMapLoaderTemp||(window._AMapLoaderTemp={}),window._AMapLoaderTemp.loading=!1,window._AMapLoaderTemp.promise=null;const ir=function(e){window.AMap||(window._AMapSecurityConfig={securityJsCode:e.securityJsCode||window._AMapLoaderTemp.securityJsCode});var t=e||{},n=t.key,r=t.version,o=t.plugins;return new Promise((function(e,t){if(window._AMapLoaderTemp.loading&&window._AMapLoaderTemp.promise)window._AMapLoaderTemp.promise.then((function(t){e(window.AMap)}));else if(window.AMap&&!o||window.AMap&&o&&JSON.stringify(window._AMapLoaderTemp.plugins)===JSON.stringify(o))e(window.AMap);else{window._AMapLoaderTemp.plugins=o?[].concat(ar,P(o||[])):ar;var a=f(288);window._AMapLoaderTemp.loading=!0,window._AMapLoaderTemp.promise=a.load({key:n||window._AMapLoaderTemp.key,version:r||"1.4.15",plugins:window._AMapLoaderTemp.plugins}).then((function(t){return window.AMap=t,e(window.AMap),window._AMapLoaderTemp.loading=!1,t})).catch((function(e){t(e),console.error("AMap loader: ",e)}))}}))},cr=f.p+"static/imgs/marker-icon_ab8bbcc8cb.svg";function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}window._AMapLoaderTemp||(window._AMapLoaderTemp={});var sr=function(){function e(t){var n=t.map,o=t.AMap;if(D(this,e),r(this,"map",void 0),r(this,"AMap",void 0),r(this,"markers",{}),r(this,"pickerMarker",void 0),!n)throw new Error("请传入地图实例");this.map=n,this.AMap=o}return F(e,[{key:"getCenter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.map;if(!e)throw new Error("请传入地图实例和 AMap");return e&&e.getCenter&&e.getCenter()}},{key:"setCenter",value:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{map:this.map,AMap:this.AMap||window.AMap})||{},r=n.map,o=void 0===r?this.map:r,a=n.AMap;if(!(void 0===a?this.AMap||window.AMap:a)||!o)throw new Error("请传入地图实例和 AMap");var i=new window.AMap.LngLat(e,t);o.setCenter(i)}},{key:"setMarker",value:function(e,t,n){var r=n||{},o=r.id,a=void 0===o?Date.now():o,i=r.marker,c=r.map,l=void 0===c?this.map:c,u=r.AMap,s=void 0===u?this.AMap:u;if(!s||!l)throw new Error("请传入地图实例和 AMap");var f=new s.LngLat(e,t),p=i||this.markers[a];if(p)return p.setPosition(f),p;var d=new s.Icon({size:new s.Size(34,34),image:cr,imageSize:new s.Size(34,34)}),v=new s.Marker({offset:new s.Pixel(-17,-34),icon:d,position:f});return this.markers[a]=v,null==l||l.add(v),v}},{key:"setPickerMarker",value:function(e,t,n){var r=(n||{}).marker,o=void 0===r?this.pickerMarker:r;this.pickerMarker=this.setMarker(e,t,ur(ur({},n),{},{marker:o}))}},{key:"on",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.map)||void 0===e?void 0:e.on.apply(e,n)}},{key:"off",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.map)||void 0===e?void 0:e.off.apply(e,n)}}]),e}(),fr=f(460),pr={};pr.styleTagTransform=ue(),pr.setAttributes=ae(),pr.insert=re().bind(null,"head"),pr.domAPI=te(),pr.insertStyleElement=ce();Z()(fr.c,pr);fr.c&&fr.c.locals&&fr.c.locals;var dr=f(496);window._AMapLoaderTemp&&window._AMapLoaderTemp.key&&ir({key:window._AMapLoaderTemp.key,securityJsCode:window._AMapLoaderTemp.securityJsCode});const vr=function(e){var t=(0,o.useRef)(),n=(0,o.useRef)();return(0,o.useEffect)((function(){var r=e.key,o=e.securityJsCode,a=e.plugins;ir({key:r,securityJsCode:o,plugins:a}).then((function(r){var o=e.zoom,a=e.center,i=e.init;t.current=new r.Map(n.current,{zoom:o||11,center:a||[120.160217,30.243861]}),i&&i({map:t.current,mapUtils:new sr({map:t.current,AMap:r}),AMap:r})}))}),[]),(0,o.useEffect)((function(){var n;Array.isArray(e.center)&&e.center.length>1&&(null===(n=t.current)||void 0===n||n.setCenter(e.center))}),[e.center]),dr.createElement("div",{ref:n,className:"a-map-container",style:e.style})};var mr=f(496);const yr=function(e){return mr.createElement(u.Alert,{className:"location-picker-notice-bar",message:"click"===e.changeMode?"点击地图上的位置,选择目标地址":"拖拽移动地图,中心标点为目标地址",type:"info",showIcon:!0})};function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var br=f(380),wr={};wr.styleTagTransform=ue(),wr.setAttributes=ae(),wr.insert=re().bind(null,"head"),wr.domAPI=te(),wr.insertStyleElement=ce();Z()(br.c,wr);br.c&&br.c.locals&&br.c.locals;var Or=f(496);function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Pr=function(e){var t=A((0,o.useState)(!1),2),n=t[0],r=t[1],a=A((0,o.useState)([]),2),i=a[0],c=a[1];return Or.createElement(u.AutoComplete,{className:"location-map-search",allowClear:!0,options:i,onSelect:function(t,n){var r=n||{},o=r.lng,a=r.lat;e.setPoint&&e.setPoint(o,a,{changeCenter:!0})},onSearch:_.debounce((function(t){var n;null!==(n=window.AMap)&&void 0!==n&&n.Autocomplete&&(t?(r(!0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0571";return new Promise((function(n,r){window.AMap?new window.AMap.Autocomplete({city:t}).search(e,(function(o,a){var i;if("complete"===o&&"OK"===a.info)n(null===(i=a.tips)||void 0===i?void 0:i.map((function(e){var t=(null==e?void 0:e.location)||{},n=t.lng,r=t.lat;return gr(gr({},e),{},{label:e.name,value:e.id,lon:+n,lng:+n,lat:+r})})));else if("USER_DAILY_QUERY_OVER_LIMIT"===a){if(!window._AMapLoaderTemp.serverKey)return void r(new Error("超出使用限制,请联系管理员"));fetch("https://restapi.amap.com/v3/assistant/inputtips?key=".concat(window._AMapLoaderTemp.serverKey,"&keywords=").concat(e,"&city=").concat(t),{mode:"cors"}).then((function(e){return e.json()})).then((function(e){var t;"1"===e.status?n(null===(t=e.tips)||void 0===t?void 0:t.map((function(e){var t,n=A(null===(t=e.location)||void 0===t?void 0:t.split(","),2),r=n[0],o=n[1];return gr(gr({},e),{},{label:e.name,value:e.id,lng:+r,lon:+r,lat:+o})}))):(console.warn("Warn getSearchTips fetch: ",e),r(new Error(e.info)))})).catch(r)}else r(a)})):r(Error("Error getAddress window.AMap is not defined."))}))}(t,e.cityCode||"0571").then((function(e){c(null==e?void 0:e.map((function(e){return xr(xr({},e),{},{label:e.name,value:e.name})}))),r(!1)})).catch((function(e){r(!1)}))):c([]))}),500),onClear:function(){c([])}},Or.createElement(u.Input.Search,{loading:n,placeholder:"请输入"}))};function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jr(e){return new Promise((function(t,n){var o;null===(o=navigator)||void 0===o||null===(o=o.geolocation)||void 0===o||o.getCurrentPosition((function(e){t(e)}),n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ar(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({enableHighAccuracy:!0,timeout:5e3},e))}))}const Er=f.p+"static/imgs/position-icon_5bcb8a742e.svg",Sr=f.p+"static/imgs/reset-icon_9edad62306.svg";var _r=f(164),Mr={};Mr.styleTagTransform=ue(),Mr.setAttributes=ae(),Mr.insert=re().bind(null,"head"),Mr.domAPI=te(),Mr.insertStyleElement=ce();Z()(_r.c,Mr);_r.c&&_r.c.locals&&_r.c.locals;var Cr=f(496);function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Lr=function(e){var t=e.mode,n=e.layout,r=void 0===n?"ver":n,a=e.hasSearch,i=void 0===a||a,l=e.isObjectRes,s=void 0===l||l,f=e.isAutoFixAddr,p=void 0!==f&&f,d=e.changeMode,v=void 0===d?"click":d,m=e.lonKey,y=void 0===m?"longitude":m,h=e.latKey,g=void 0===h?"latitude":h,w=e.addrKey,k=void 0===w?"address":w,x=e.value,P=e.isAutoSearch,j=void 0===P||P,E=e.visible,S=e.defaultLocation,_=e.disabled,M=e.readOnly,C=(0,c.useField)(),T=(0,o.useRef)(),I=(0,o.useMemo)((function(){return Wn(x,C,{isObjectRes:s,lonKey:y,latKey:g,addrKey:k})}),[s,y,g,k,x,C.data]),L=A((0,o.useState)(!1),2),R=L[0],N=L[1],D=A((0,o.useState)(!1),2),U=D[0],F=D[1],K=A((0,o.useState)(I),2),q=K[0],$=K[1];function z(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q.lon,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q.lat;null===(e=T.current)||void 0===e||e.setCenter(t,n)}function V(e,t,n){return G.apply(this,arguments)}function G(){return(G=b(O().mark((function t(n,r,o){var a,i,c,l,u,s,f,d,m;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=(a=o||{}).isAutoFixAddr,c=void 0===i?p||!0:i,l=a.changeCenter,u=n||q.lon,s=r||q.lat,("click"===v||_||M)&&(null===(f=T.current)||void 0===f||f.setPickerMarker(n,r)),l&&z(n,r),!c&&q.addr){t.next=11;break}return t.next=8,W(u,s);case 8:t.t0=t.sent,t.next=12;break;case 11:t.t0=q.addr;case 12:d=t.t0,m=Ir(Ir({},q),{},{lon:u,lat:s,addr:d}),$(m),e.setPickInfo&&e.setPickInfo(m);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(e,t){return new Promise((function(n,r){if(!window.AMap)return r(),new Error("window.AMap is not defined");var o,a;F(!0),(o=e,a=t,new Promise((function(e,t){window.AMap?new window.AMap.Geocoder({}).getAddress([o,a],(function(n,r){if("complete"===n&&"OK"===r.info){var i,c=null==r||null===(i=r.regeocode)||void 0===i?void 0:i.formattedAddress;return e(c),c}if("USER_DAILY_QUERY_OVER_LIMIT"===r){if(!window._AMapLoaderTemp.serverKey)return void t(new Error("超出使用限制,请联系管理员"));fetch("https://restapi.amap.com/v3/geocode/regeo?location=".concat(null==o?void 0:o.toFixed(6),",").concat(null==a?void 0:a.toFixed(6),"&key=").concat(window._AMapLoaderTemp.serverKey),{mode:"cors"}).then((function(e){return e.json()})).then((function(n){var r;"1"===n.status?e(null===(r=n.regeocode)||void 0===r?void 0:r.formatted_address):(console.warn("Warn getAddress fetch: ",n),t(new Error(n.info)))})).catch(t)}else t(r)})):t(Error("Error getAddress window.AMap is not defined."))}))).then((function(e){F(!1),$((function(t){return Ir(Ir({},t),{},{addr:e})})),n(e)})).catch((function(e){r(e),u.message.error(e),F(!1)}))}))}(0,o.useEffect)((function(){if(E){var e=S.lon,t=S.lat;I.lon&&I.lat&&(e=I.lon,t=I.lat),window.AMap&&window.AMap.LngLat&&z(e,t),V(e,t,{isAutoFixAddr:!1})}}),[E,I,v]);var J="move"!==v||_||M,B=!1!==e.showGetPositionBtn&&!(_||M);return Cr.createElement("div",{className:"location-picker-modal-content location-mode-".concat(t," location-modal-content-layout-").concat(r)},Cr.createElement(or,{pickInfo:q,setPickInfo:$,setPoint:V,addrLoading:U,defaultLocation:S,disabled:_,readOnly:M}),Cr.createElement("div",{className:"location-picker-map-wrap"},Cr.createElement("div",{className:"location-picker-map"},i&&E?Cr.createElement(Pr,{setPoint:V,isAutoSearch:j}):null,Cr.createElement(vr,{init:function(e){e.map;var t=e.mapUtils;T.current=t;var n,r,o=S.lon,a=S.lat;q.lon&&q.lat&&(o=q.lon,a=q.lat),V(o,a,{isAutoFixAddr:p}),z(o,a),N(!1),_||M?null===(n=T.current)||void 0===n||n.setPickerMarker(o,a):"click"===v?(null===(r=T.current)||void 0===r||r.setPickerMarker(o,a),T.current.on("click",(function(e){var t=e.lnglat||{};V(t.lng,t.lat,{changeCenter:!0})}))):T.current.on("mouseup",(0,Xn.debounce)((function(e){var t,n=(null===(t=T.current)||void 0===t?void 0:t.getCenter())||{};V(n.lng,n.lat)}),1e3))},loading:R,style:{height:"500px"}}),Cr.createElement("div",{className:"set-map-actions"},J?Cr.createElement("img",{className:"reset-icon",src:Sr,onClick:function(){z()}}):null,B?Cr.createElement("img",{className:"center-icon",src:Er,onClick:function(){N(!0),jr().then((function(e){var t=e.coords,n=void 0===t?{}:t;V(n.longitude,n.latitude,{changeCenter:!0}),N(!1)})).catch((function(e){N(!1),u.message.error("定位获取失败"),console.warn("Error getCurrentPosition e: ",e)}))}}):null),"click"!==v&&!(_||M)&&Cr.createElement("img",{className:"location-picker-center-icon",src:cr})),Cr.createElement(yr,{changeMode:v})),R&&Cr.createElement("div",{className:"spin-loading-wrap"},Cr.createElement(u.Spin,{className:"spin-loading"})))};var Rr=f(724),Nr={};Nr.styleTagTransform=ue(),Nr.setAttributes=ae(),Nr.insert=re().bind(null,"head"),Nr.domAPI=te(),Nr.insertStyleElement=ce();Z()(Rr.c,Nr);Rr.c&&Rr.c.locals&&Rr.c.locals;var Dr=f(496),Ur={lon:120.168893,lat:30.225404,addr:"浙江省杭州市上城区南星街道杭州西湖风景名胜区"};function Fr(e){var t=e.mode,n=void 0===t?"dialog":t,a=e.layout,i=void 0===a?"ver":a,l=e.hasSearch,s=void 0===l||l,f=e.isObjectRes,p=void 0===f||f,d=e.isAutoFixAddr,v=void 0!==d&&d,m=e.changeMode,y=void 0===m?"click":m,g=e.lonKey,b=void 0===g?"longitude":g,w=e.latKey,O=void 0===w?"latitude":w,k=e.addrKey,x=void 0===k?"address":k,P=e.value,j=e.isAutoSearch,E=void 0===j||j,S=e.modalConf,_=void 0===S?{}:S,M=(0,c.useField)(),C=(0,c.useFieldSchema)(),T=(0,o.useRef)(),I=(0,o.useRef)(Ur),L=A((0,o.useState)(!1),2),R=L[0],N=L[1];function D(){N(!1)}function U(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:I.current)||I.current,n=r(r(r({},b,t.lon),O,t.lat),x,t.addr);if(e.onChange&&e.onChange(n),!1===p)if(M.parent){if(M.parent&&C.parent){var o=Jn(M);Object.keys(n).forEach((function(e){o[e]=n[e]}))}}else M.form.setValues(n)}function F(e){I.current=e}var K="hor"===i||"hor-reverse"===i,q={disabled:e.disabled,readOnly:e.readOnly,mode:null!=n?n:"dialog",layout:null!=i?i:"ver",isHor:K,hasSearch:null==s||s,isObjectRes:null==p||p,isAutoFixAddr:null!=v&&v,changeMode:null!=y?y:"click",lonKey:null!=b?b:"longitude",latKey:null!=O?O:"latitude",addrKey:null!=x?x:"address",value:P,isAutoSearch:null==E||E,defaultLocation:Ur,pickerIcon:e.pickerIcon,pickerIconUrl:e.pickerIconUrl};return Dr.createElement("div",{className:"location-picker"},"show"===n?Dr.createElement(Lr,h({},q,{visible:R,setPickInfo:function(e){F(e),U(e)},layout:i})):Dr.createElement(Dr.Fragment,null,Dr.createElement(Hn,h({},q,{onShow:function(){!T.current&&N(!0),N(!0)}})),Dr.createElement(u.Modal,{className:"location-picker-modal",title:"地图选点",onCancel:D,onOk:function(){U(),D()},visible:R,width:null!=_&&_.width||K?"1024px":"720px"},Dr.createElement(Lr,h({},q,{visible:R,setPickInfo:F,layout:i})))))}jr().then((function(e){var t=e.coords,n=void 0===t?{}:t;Ur.lon=n.longitude,Ur.lat=n.latitude})).catch((function(e){console.warn("Error getCurrentPosition e: ",e)}));var Kr=f(468),qr={};qr.styleTagTransform=ue(),qr.setAttributes=ae(),qr.insert=re().bind(null,"head"),qr.domAPI=te(),qr.insertStyleElement=ce();Z()(Kr.c,qr);Kr.c&&Kr.c.locals&&Kr.c.locals;function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vr={Form:l.Form,FormItem:l.FormItem,DatePicker:l.DatePicker,Checkbox:l.Checkbox,Cascader:l.Cascader,Editable:l.Editable,Input:l.Input,NumberPicker:l.NumberPicker,Switch:l.Switch,Password:l.Password,PreviewText:l.PreviewText,Radio:l.Radio,Reset:l.Reset,Select:l.Select,Space:l.Space,Submit:l.Submit,TimePicker:l.TimePicker,Transfer:l.Transfer,TreeSelect:l.TreeSelect,FormGrid:l.FormGrid,FormLayout:l.FormLayout,FormTab:l.FormTab,FormCollapse:l.FormCollapse,ArrayTable:l.ArrayTable,ArrayCards:l.ArrayCards};const Gr=(0,o.forwardRef)((function(t,n){var r,s=(0,o.useCallback)((0,c.createSchemaField)({components:zr(zr({Space:l.Space,FormGrid:l.FormGrid,FormLayout:l.FormLayout,FormTab:l.FormTab,FormCollapse:l.FormCollapse,ArrayTable:l.ArrayTable,ArrayCards:l.ArrayCards,FormItem:l.FormItem,DatePicker:l.DatePicker,Checkbox:l.Checkbox,Cascader:l.Cascader,Editable:l.Editable,Input:l.Input,NumberPicker:l.NumberPicker,Switch:l.Switch,Password:l.Password,PreviewText:l.PreviewText,Radio:l.Radio,Reset:l.Reset,Select:l.Select,Submit:l.Submit,TimePicker:l.TimePicker,Transfer:l.Transfer,TreeSelect:l.TreeSelect,Card:u.Card,Slider:u.Slider,Rate:u.Rate},e),t.components),scope:zr({},t.schemaScope)}),[]),f=(0,o.useMemo)((function(){return(0,i.createForm)(zr({initialValues:t.initialValues,readOnly:t.readOnly,disabled:t.disabled},t.formOptions||{}))}),[]);(0,o.useImperativeHandle)(n,(function(){return{formRender:f}})),(0,o.useEffect)((function(){t.init&&t.init(f)}),[]);var p=(0,o.useMemo)((function(){var e=t.Slots;return"function"==typeof e?a().createElement(e,null):"function"==typeof(null==e?void 0:e.footer)?a().createElement(e.footer,null):void 0}),[t.Slots]),d=zr({},null===(r=t.schema)||void 0===r?void 0:r.form);return a().createElement(we.Provider,{value:t},a().createElement(l.Form,{className:"form-render ".concat(t.className),layout:t.layout,form:f,labelCol:t.schema.form.labelCol,wrapperCol:t.schema.form.wrapperCol,onAutoSubmit:function(e){t.onSubmit(e)},onAutoSubmitFailed:function(e){t.onSubmitFailed(e)}},a().createElement(l.FormLayout,d,a().createElement(s,{schema:t.schema.schema}),a().createElement("div",{className:"form-render-footer xxm"},p))))}))})(),p})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ant-design/icons"),require("@formily/antd"),require("@formily/core"),require("@formily/react"),require("@hzab/data-model"),require("antd"),require("lodash"),require("nanoid"),require("react")):"function"==typeof define&&define.amd?define(["@ant-design/icons","@formily/antd","@formily/core","@formily/react","@hzab/data-model","antd","lodash","nanoid","react"],t):"object"==typeof exports?exports.form_render=t(require("@ant-design/icons"),require("@formily/antd"),require("@formily/core"),require("@formily/react"),require("@hzab/data-model"),require("antd"),require("lodash"),require("nanoid"),require("react")):e.form_render=t(e["@ant-design/icons"],e["@formily/antd"],e["@formily/core"],e["@formily/react"],e["@hzab/data-model"],e.antd,e.lodash,e.nanoid,e.react)}(self,((e,t,n,r,o,a,i,c,l)=>(()=>{var u={288:function(e){"use strict";e.exports=function(){function e(e){var r=[];return e.AMapUI&&r.push(t(e.AMapUI)),e.Loca&&r.push(n(e.Loca)),Promise.all(r)}function t(e){return new Promise((function(t,n){var o=[];if(e.plugins)for(var l=0;l<e.plugins.length;l+=1)-1==a.AMapUI.plugins.indexOf(e.plugins[l])&&o.push(e.plugins[l]);if(i.AMapUI===r.failed)n("前次请求 AMapUI 失败");else if(i.AMapUI===r.notload){i.AMapUI=r.loading,a.AMapUI.version=e.version||a.AMapUI.version,l=a.AMapUI.version;var u=document.body||document.head,s=document.createElement("script");s.type="text/javascript",s.src="https://webapi.amap.com/ui/"+l+"/main.js",s.onerror=function(e){i.AMapUI=r.failed,n("请求 AMapUI 失败")},s.onload=function(){if(i.AMapUI=r.loaded,o.length)window.AMapUI.loadUI(o,(function(){for(var e=0,n=o.length;e<n;e++){var r=o[e].split("/").slice(-1)[0];window.AMapUI[r]=arguments[e]}for(t();c.AMapUI.length;)c.AMapUI.splice(0,1)[0]()}));else for(t();c.AMapUI.length;)c.AMapUI.splice(0,1)[0]()},u.appendChild(s)}else i.AMapUI===r.loaded?e.version&&e.version!==a.AMapUI.version?n("不允许多个版本 AMapUI 混用"):o.length?window.AMapUI.loadUI(o,(function(){for(var e=0,n=o.length;e<n;e++){var r=o[e].split("/").slice(-1)[0];window.AMapUI[r]=arguments[e]}t()})):t():e.version&&e.version!==a.AMapUI.version?n("不允许多个版本 AMapUI 混用"):c.AMapUI.push((function(e){e?n(e):o.length?window.AMapUI.loadUI(o,(function(){for(var e=0,n=o.length;e<n;e++){var r=o[e].split("/").slice(-1)[0];window.AMapUI[r]=arguments[e]}t()})):t()}))}))}function n(e){return new Promise((function(t,n){if(i.Loca===r.failed)n("前次请求 Loca 失败");else if(i.Loca===r.notload){i.Loca=r.loading,a.Loca.version=e.version||a.Loca.version;var o=a.Loca.version,l=a.AMap.version.startsWith("2"),u=o.startsWith("2");if(l&&!u||!l&&u)n("JSAPI 与 Loca 版本不对应!!");else{l=a.key,u=document.body||document.head;var s=document.createElement("script");s.type="text/javascript",s.src="https://webapi.amap.com/loca?v="+o+"&key="+l,s.onerror=function(e){i.Loca=r.failed,n("请求 AMapUI 失败")},s.onload=function(){for(i.Loca=r.loaded,t();c.Loca.length;)c.Loca.splice(0,1)[0]()},u.appendChild(s)}}else i.Loca===r.loaded?e.version&&e.version!==a.Loca.version?n("不允许多个版本 Loca 混用"):t():e.version&&e.version!==a.Loca.version?n("不允许多个版本 Loca 混用"):c.Loca.push((function(e){e?n(e):n()}))}))}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var r,o;(o=r||(r={})).notload="notload",o.loading="loading",o.loaded="loaded",o.failed="failed";var a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},i={AMap:r.notload,AMapUI:r.notload,Loca:r.notload},c={AMap:[],AMapUI:[],Loca:[]},l=[],u=function(e){"function"==typeof e&&(i.AMap===r.loaded?e(window.AMap):l.push(e))};return{load:function(t){return new Promise((function(n,o){if(i.AMap==r.failed)o("");else if(i.AMap==r.notload){var c=t.key,s=t.version,f=t.plugins;c?(window.AMap&&"lbs.amap.com"!==location.host&&o("禁止多种API加载方式混用"),a.key=c,a.AMap.version=s||a.AMap.version,a.AMap.plugins=f||a.AMap.plugins,i.AMap=r.loading,s=document.body||document.head,window.___onAPILoaded=function(a){if(delete window.___onAPILoaded,a)i.AMap=r.failed,o(a);else for(i.AMap=r.loaded,e(t).then((function(){n(window.AMap)})).catch(o);l.length;)l.splice(0,1)[0]()},(f=document.createElement("script")).type="text/javascript",f.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+a.AMap.version+"&key="+c+"&plugin="+a.AMap.plugins.join(","),f.onerror=function(e){i.AMap=r.failed,o(e)},s.appendChild(f)):o("请填写key")}else if(i.AMap==r.loaded)if(t.key&&t.key!==a.key)o("多个不一致的 key");else if(t.version&&t.version!==a.AMap.version)o("不允许多个版本 JSAPI 混用");else{if(c=[],t.plugins)for(s=0;s<t.plugins.length;s+=1)-1==a.AMap.plugins.indexOf(t.plugins[s])&&c.push(t.plugins[s]);c.length?window.AMap.plugin(c,(function(){e(t).then((function(){n(window.AMap)})).catch(o)})):e(t).then((function(){n(window.AMap)})).catch(o)}else if(t.key&&t.key!==a.key)o("多个不一致的 key");else if(t.version&&t.version!==a.AMap.version)o("不允许多个版本 JSAPI 混用");else{var p=[];if(t.plugins)for(s=0;s<t.plugins.length;s+=1)-1==a.AMap.plugins.indexOf(t.plugins[s])&&p.push(t.plugins[s]);u((function(){p.length?window.AMap.plugin(p,(function(){e(t).then((function(){n(window.AMap)})).catch(o)})):e(t).then((function(){n(window.AMap)})).catch(o)}))}}))},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},i={AMap:r.notload,AMapUI:r.notload,Loca:r.notload},c={AMap:[],AMapUI:[],Loca:[]}}}}()},694:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".user-select-option_Rzq0j .ant-select-item-option-content {\n display: flex;\n}\n.user-select-option__avatar_Ly1IV {\n margin-right: 10px;\n}\n.user-select-option_Rzq0j .option-info_PtQb2 {\n display: flex;\n flex-direction: column;\n}\n.user-select-option_Rzq0j .option-info-name_q3YOz {\n margin-bottom: 4px;\n color: #000000d9;\n font-size: 14px;\n display: flex;\n align-items: center;\n}\n.user-select-option_Rzq0j .option-info__idCard_QG1nc {\n color: #00000073;\n font-size: 14px;\n}\n",""]),i.locals={"user-select-option":"user-select-option_Rzq0j","user-select-option__avatar":"user-select-option__avatar_Ly1IV","option-info":"option-info_PtQb2","option-info-name":"option-info-name_q3YOz","option-info__idCard":"option-info__idCard_QG1nc"};const c=i},460:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".a-map-container {\n width: 100%;\n height: 100%;\n}\n",""]);const c=i},380:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-map-search {\n width: 300px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n}\n.location-map-search .ant-input {\n width: 100%;\n}\n",""]);const c=i},164:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-picker-modal-content {\n display: flex;\n flex-direction: column;\n position: relative;\n /* 水平样式 */\n}\n.location-picker-modal-content .location-picker-map-wrap {\n flex: 1;\n}\n.location-picker-modal-content .location-picker-map {\n position: relative;\n width: 100%;\n flex: 1;\n}\n.location-picker-modal-content .location-picker-map .a-map-container {\n height: inherit;\n}\n.location-picker-modal-content .location-picker-map .a-map-container .amap-logo,\n.location-picker-modal-content .location-picker-map .a-map-container .amap-copyright {\n z-index: 0;\n}\n.location-picker-modal-content .location-picker-map .location-picker-center-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -100%);\n width: 34px;\n color: #1677ff;\n}\n.location-picker-modal-content .location-picker-map .set-map-actions {\n position: absolute;\n right: 20px;\n bottom: 20px;\n}\n.location-picker-modal-content .location-picker-map .set-map-actions > img {\n display: block;\n width: 32px;\n margin-bottom: 8px;\n padding: 4px;\n background-color: #fff;\n border-radius: 8px;\n cursor: pointer;\n}\n.location-picker-modal-content .location-picker-map .set-map-actions > img:last-child {\n margin-bottom: unset;\n}\n.location-picker-modal-content .spin-loading-wrap {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(0, 0, 0, 0.5);\n}\n.location-picker-modal-content.location-modal-content-layout-hor,\n.location-picker-modal-content.location-modal-content-layout-hor-reverse {\n margin-right: 20px;\n}\n.location-picker-modal-content.location-modal-content-layout-hor.location-mode-dialog .location-picker-info,\n.location-picker-modal-content.location-modal-content-layout-hor-reverse.location-mode-dialog .location-picker-info {\n width: 400px;\n}\n.location-picker-modal-content.location-modal-content-layout-hor .location-picker-info,\n.location-picker-modal-content.location-modal-content-layout-hor-reverse .location-picker-info {\n margin-right: 20px;\n}\n.location-picker-modal-content.location-modal-content-layout-hor-reverse {\n flex-direction: row-reverse;\n}\n.location-picker-modal-content.location-modal-content-layout-ver-reverse {\n flex-direction: column-reverse;\n}\n",""]);const c=i},736:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-picker-info {\n padding: 12px;\n}\n.location-picker-info .picker-info-lon,\n.location-picker-info .picker-info-lat,\n.location-picker-info .picker-info-addr {\n display: flex;\n margin-bottom: 8px;\n}\n.location-picker-info .picker-info-lon .picker-info-label,\n.location-picker-info .picker-info-lat .picker-info-label,\n.location-picker-info .picker-info-addr .picker-info-label {\n white-space: nowrap;\n}\n.location-picker-info .picker-info-input {\n min-width: 300px;\n}\n",""]);const c=i},544:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-value-box .location-value-head-box {\n display: flex;\n}\n.location-value-box .location-value-head-box .location-lon-lat {\n flex: 1;\n}\n.location-value-box .location-btn {\n padding: 4px 0;\n padding-left: 5px;\n line-height: 1;\n}\n.location-value-box .location-btn:focus {\n background: transparent;\n}\n.location-value-box .location-btn .location-picker-icon {\n width: 16px;\n margin-right: 4px;\n}\n.location-value-box .location-btn .location-picker-text {\n display: inline-block;\n vertical-align: middle;\n}\n",""]);const c=i},724:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".location-picker .location-value-box .location-value-head-box {\n display: flex;\n}\n.location-picker .location-value-box .location-value-head-box .location-lon-lat {\n flex: 1;\n}\n.location-picker-modal .ant-modal-body {\n display: flex;\n flex-direction: column;\n}\n",""]);const c=i},258:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".tree-checkbox .tree-checkbox-table {\n table-layout: fixed;\n}\n.tree-checkbox .tree-checkbox-table .tree-checkbox-row .tree-checkbox-col {\n padding: 4px 12px;\n border: 1px solid #333;\n}\n",""]);const c=i},144:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".upload-preview-modal {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.upload-preview-modal .ant-modal-content .ant-modal-header {\n padding-right: 60px;\n}\n.upload-preview-modal .ant-modal-content .ant-modal-body {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.upload-preview-video {\n max-width: 100%;\n}\n.upload-preview-img {\n max-width: 100%;\n}\n.upload-preview-audio {\n max-width: 100%;\n}\n",""]);const c=i},48:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".uploader-template-download-btn {\n color: #1890ff;\n}\n",""]);const c=i},468:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(500),o=n.n(r),a=n(312),i=n.n(a)()(o());i.push([e.id,".form-render.ant-form-inline,\n.form-render.ant-form-inline > form,\n.form-render.ant-form-inline > form > .ant-formily-layout {\n display: inline-flex;\n flex-wrap: wrap;\n}\n.form-render.ant-form-inline .ant-formily-item-control,\n.form-render.ant-form-inline > form .ant-formily-item-control,\n.form-render.ant-form-inline > form > .ant-formily-layout .ant-formily-item-control {\n min-width: 120px;\n}\n.form-render.ant-form-inline .ant-picker-range,\n.form-render.ant-form-inline > form .ant-picker-range,\n.form-render.ant-form-inline > form > .ant-formily-layout .ant-picker-range {\n min-width: 340px;\n}\n.form-render.ant-form-inline .ant-formily-item-layout-inline,\n.form-render.ant-form-inline > form .ant-formily-item-layout-inline,\n.form-render.ant-form-inline > form > .ant-formily-layout .ant-formily-item-layout-inline {\n margin-right: 12px;\n margin-bottom: 12px;\n}\n",""]);const c=i},312:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},500:e=>{"use strict";e.exports=function(e){return e[1]}},792:(e,t,n)=>{"use strict";var r=n(819),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var u=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,v=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(v){var o=d(n);o&&o!==v&&e(t,o,r)}var i=s(n);f&&(i=i.concat(f(n)));for(var c=l(t),m=l(n),y=0;y<i.length;++y){var h=i[y];if(!(a[h]||r&&r[h]||m&&m[h]||c&&c[h])){var g=p(n,h);try{u(t,h,g)}catch(e){}}}}return t}},560:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case s:case f:case a:case c:case i:case d:return e;default:switch(e=e&&e.$$typeof){case u:case p:case y:case m:case l:return e;default:return t}}case o:return t}}}function k(e){return O(e)===f}t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=o,t.Profiler=c,t.StrictMode=i,t.Suspense=d,t.isAsyncMode=function(e){return k(e)||O(e)===s},t.isConcurrentMode=k,t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===y},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===o},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===i},t.isSuspense=function(e){return O(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===c||e===i||e===d||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b||e.$$typeof===w||e.$$typeof===h)},t.typeOf=O},819:(e,t,n)=>{"use strict";e.exports=n(560)},596:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],c=0;c<e.length;c++){var l=e[c],u=r.base?l[0]+r.base:l[0],s=a[u]||0,f="".concat(u," ").concat(s);a[u]=s+1;var p=n(f),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var v=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:v,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=n(a[i]);t[c].references--}for(var l=r(e,o),u=0;u<a.length;u++){var s=n(a[u]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=l}}},176:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},808:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},120:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},520:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},936:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},880:t=>{"use strict";t.exports=e},632:e=>{"use strict";e.exports=t},624:e=>{"use strict";e.exports=n},976:e=>{"use strict";e.exports=r},984:e=>{"use strict";e.exports=o},840:e=>{"use strict";e.exports=a},816:e=>{"use strict";e.exports=i},734:e=>{"use strict";e.exports=c},496:e=>{"use strict";e.exports=l},636:(e,t,n)=>{var r=n(848).default;function o(){"use strict";e.exports=o=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,i=a.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",f=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),i=new I(r||[]);return c(a,"_invoke",{value:_(e,n,i)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var m="suspendedStart",y="suspendedYield",h="executing",g="completed",b={};function w(){}function O(){}function k(){}var x={};p(x,u,(function(){return this}));var P=Object.getPrototypeOf,A=P&&P(P(L([])));A&&A!==a&&i.call(A,u)&&(x=A);var j=k.prototype=w.prototype=Object.create(x);function E(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,c,l){var u=v(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,l)}),(function(e){n("throw",e,c,l)})):t.resolve(f).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,l)}))}l(u.arg)}var o;c(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}})}function _(e,n,r){var o=m;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=M(c,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var u=v(e,n,r);if("normal"===u.type){if(o=r.done?g:y,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=g,r.method="throw",r.arg=u.arg)}}}function M(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=v(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return O.prototype=k,c(j,"constructor",{value:k,configurable:!0}),c(k,"constructor",{value:O,configurable:!0}),O.displayName=p(k,f,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,p(e,f,"GeneratorFunction")),e.prototype=Object.create(j),e},n.awrap=function(e){return{__await:e}},E(S.prototype),p(S.prototype,s,(function(){return this})),n.AsyncIterator=S,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new S(d(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(j),p(j,f,"Generator"),p(j,u,(function(){return this})),p(j,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=L,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},848:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},248:(e,t,n)=>{var r=n(636)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,exports:{}};return u[e].call(n.exports,n,n.exports,f),n.exports}f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e})(),f.nc=void 0;var p={};return(()=>{"use strict";f.r(p),f.d(p,{antdComponents:()=>Vr,customComponents:()=>e,default:()=>Gr});var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:String(n)}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f.r(e),f.d(e,{DatePicker:()=>Vn,LocationPicker:()=>Fr,Text:()=>y,TreeCheckbox:()=>Kn,Upload:()=>Pe,UserSelect:()=>Cn,getParentValue:()=>zn});var o=f(496),a=f.n(o),i=f(624),c=f(976),l=f(632),u=f(840);function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=["value","mode","content","className"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const y=(0,c.connect)((function(e){var t=e.value,n=e.mode,r=e.content,o=e.className,i=s(e,d),c="normal"!==n&&n?n:"div";return console.log("props",i.readOnly),a().createElement(c,m({className:"formily-text ".concat(o)},i),t||r)}),(0,c.mapProps)((function(e,t){return m(m({},e),{},{form:t.form,field:t})})));function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function g(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){g(a,r,o,i,c,"next",e)}function c(e){g(a,r,o,i,c,"throw",e)}i(void 0)}))}}var w=f(248),O=f.n(w);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function P(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var j=f(880),E=f(734);function S(e){return T(e,["apng","avif","bmp","gif","ico","cur","jpg","jpeg","jfif","pjpeg","pjp","png","svg","tif","tiff","webp"])}function M(e){return T(e,["3gp","mpg","mpeg","mp4","m4v","m4p","ogv","ogg","mov","webm"])}function C(e){return T(e,["3gp","adts","mpeg","mp3","mp4","ogg","mov","webm","rtp","amr","wav"])}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;if(!e)return!1;var r=null==e?void 0:e.replace(/\?.+/,"");return!!new RegExp(".(".concat(t.join("|"),")$"),n?void 0:"i").test(r)||void 0}function I(e){var t=null==e?void 0:e.match(/[^\/]+?\.[^\/]+$/);return t&&t.length>0?t[0]:e}function L(e){if("object"===t(e)&&null!=e&&e.type)return null==e?void 0:e.type;if("string"==typeof e){var n=null;return M(e)?n="video/mp4":S(e)?n="image/jpeg":C(e)?n="audio/3gpp":T(e,["pdf"])||T(e,["pdf"])?n="application/pdf":T(e,["xlsx","xls","csv","xlsm","xlsb"])?n="application/vnd.ms-excel":T(e,["doc","docx"])?n="application/msword":T(e,["ppt","pptx"])&&(n="application/vnd.ms-powerpoint"),n}}function R(e){return Array.isArray(e)?e:e&&[e]||[]}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=function(e,t){var n=R(e);return t>0&&n.length>t&&(n=n.slice(0,t)),n}(R(e),t);if(0===n.length)return n;var r=n;return Array.isArray(r)||(r=[r]),r=n.map((function(e,t){if("string"==typeof e){var n=(0,E.nanoid)();return{name:n,uid:n,ossUrl:e,url:e}}return e&&!e.uid&&(e.uid=(0,E.nanoid)()),e&&!e.name&&(e.name=e.uid),e}))}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}function F(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var K=f(984);function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e),this.axios=t.axios||K.axios,this.axiosConf=t.axiosConf||{},this.serverUrl=t.serverUrl||"/api/v1/user/oss/getWebOssConfig",this.signatureParams=t.signatureParams||{}}return F(e,[{key:"getSignature",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.serverUrl,t=arguments.length>1?arguments[1]:void 0;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.serverUrl,n=void 0===t?"/api/v1/user/oss/getWebOssConfig":t;if(window.__ossSignatureRes&&n===window.__ossSignatureRes.serverUrl&&Date.now()-window.__ossSignatureRes.__saveTime<window.__ossSignatureRes.expireTimeMillis-1e4)return Promise.resolve(window.__ossSignatureRes);var r=e.axios,o=void 0===r?K.axios:r,a=e.params,i=void 0===a?{}:a,c=e.axiosConf;return o.get(n,$($({},c),{},{params:$({isPublic:1},i)})).then((function(e){var t;return window.__ossSignatureRes=null==e||null===(t=e.data)||void 0===t?void 0:t.data,window.__ossSignatureRes&&(window.__ossSignatureRes.__saveTime=Date.now(),window.__ossSignatureRes.serverUrl=n),window.__ossSignatureRes}))}($($({},t),{},{serverUrl:e,axios:(null==t?void 0:t.axios)||this.axios,axiosConf:$($({},this.axiosConf),null==t?void 0:t.axiosConf)}))}},{key:"upload",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(){var r=b(O().mark((function r(o,a){var i,c,l,u,s,f,p,d,v;return O().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.getSignature(n.serverUrl||t.serverUrl,$($({},n),{},{params:$($({},t.signatureParams),n.signatureParams)}));case 2:if(i=r.sent,c=(n||{}).ossParams,l=new FormData,u=null==e?void 0:e.name,null!=e&&e.name&&(s=null==e?void 0:e.name.match(/^(.+)\.(.+)$/))&&s.length>2&&(u="".concat(s[1],"_").concat(Date.now(),"_").concat((0,E.nanoid)(),".").concat(s[2])),u||(u="".concat(Date.now(),"_").concat((0,E.nanoid)(),".").concat(null===(f=e.type)||void 0===f?void 0:f.replace(/\w+\/, ''/))),p="".concat(null==i?void 0:i.dir).concat(u),l.set("key",p),l.set("OSSAccessKeyId",i.accessid),l.set("policy",i.policy),l.set("Signature",i.signature),i.callback&&l.set("callback",i.callback),l.set("success_action_status",200),l.set("file",e),c)for(d in c)Object.hasOwnProperty.call(c,d)&&l.set(d,c[d]);return v=(null==n?void 0:n.axios)||t.axios,r.abrupt("return",v.post(i.host,l,$($({},t.axiosConf),null==n?void 0:n.axiosConf)).then((function(e){return o(e),e})).catch((function(e){return console.error("oss upload err",e),a(e),Promise.reject(e)})));case 19:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}())}}]),e}();const V=z;var G="video",W="img",J="audio";function B(e){var t=e||{},n=t.type,r=t.url,o=void 0===r?null==e?void 0:e.ossUrl:r,a="";return o?o.startsWith("data:image/")||S(o)?a=W:M(o)?a=G:C(o)&&(a=J):n&&(null!=n&&n.startsWith("image/")&&(a=W),null!=n&&n.startsWith("video/")&&(a=G),null!=n&&n.startsWith("audio/")&&(a=J)),a||n}var Y=f(496),Q=r(r(r({},G,(function(e){return Y.createElement("video",{className:"upload-preview-video",src:e,controls:!0},"抱歉,您的浏览器不支持内嵌视频,不过不用担心,你可以",Y.createElement("a",{href:e},"下载"),"并用你喜欢的播放器观看!")})),W,(function(e){return Y.createElement("img",{className:"upload-preview-img",src:e})})),J,(function(e){return Y.createElement("audio",{className:"upload-preview-img",src:e,controls:!0})}));function H(e){var t=function(e){var t=Q[B(e)];return t||(t=function(){return(null==e?void 0:e.name)||e}),t}(e);return t||(t=function(){return(null==e?void 0:e.name)||e}),t((null==e?void 0:e.url)||e)}var X=f(596),Z=f.n(X),ee=f(520),te=f.n(ee),ne=f(176),re=f.n(ne),oe=f(120),ae=f.n(oe),ie=f(808),ce=f.n(ie),le=f(936),ue=f.n(le),se=f(144),fe={};fe.styleTagTransform=ue(),fe.setAttributes=ae(),fe.insert=re().bind(null,"head"),fe.domAPI=te(),fe.insertStyleElement=ce();Z()(se.c,fe);se.c&&se.c.locals&&se.c.locals;var pe=f(496);const de=function(e){var n,r=e.previewFile,a=e.setPreviewFile,i=e.title,c=A((0,o.useState)(!1),2),l=c[0],s=c[1];function f(){s(!1),a&&a(null)}return(0,o.useEffect)((function(){s(!!r||!1)}),[r]),pe.createElement(u.Modal,h({wrapClassName:"upload-preview-modal-wrap",className:"upload-preview-modal",title:i||(n=r,n&&"object"===t(n)&&n.name?n.name:"预览"),visible:l,width:"auto",onCancel:f,footer:[pe.createElement(u.Button,{key:"back",onClick:f},"关闭")]},e.modalConf),H(r))};var ve=f(48),me={};me.styleTagTransform=ue(),me.setAttributes=ae(),me.insert=re().bind(null,"head"),me.domAPI=te(),me.insertStyleElement=ce();Z()(ve.c,me);ve.c&&ve.c.locals&&ve.c.locals;var ye=["onChange"];function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const be=function(e){var t=e.onChange,n=s(e,ye),r=n.name,i=void 0===r?"file":r,c=n.multiple,l=void 0!==c&&c,f=n.accept,p=n.value,d=n.btnText,v=void 0===d?"上传":d,m=n.maxCount,y=void 0===m?1/0:m,g=n.maxSize,w=n.listType,k=void 0===w?"text":w,x=n.disabled,S=void 0!==x&&x,_=n.readOnly,M=void 0!==_&&_,C=n.ossUrl,T=void 0===C?"/api/v1/user/oss/getWebOssConfig":C,R=n.isOssUpload,D=void 0===R||R,U=n.isStrRes,F=n.isResRemoveArr,K=void 0===F||F,q=n.ossOpt,$=n.onCountExceed,z=n.templateUrl,G=n.beforeUploadCheck,W=n.templateDownloadText,J=void 0===W?"模板下载":W,Y=A((0,o.useState)([]),2),H=Y[0],X=Y[1],Z=A((0,o.useState)(),2),ee=Z[0],te=Z[1],ne=A((0,o.useState)(!1),2),re=ne[0],oe=ne[1],ae=function(){var e=b(O().mark((function e(n){var r,o,a,i,c,l,u;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.fileList,X(r),o=P(r),!D||!U){e.next=24;break}a=0;case 5:if(!(a<o.length)){e.next=24;break}return c=o[a],null!==(i=c)&&void 0!==i&&i.originFileObj&&(c=null===(l=c)||void 0===l?void 0:l.originFileObj),e.next=10,c.ossPromise;case 10:if(e.t2=e.sent,e.t2){e.next=13;break}e.t2=c.url;case 13:if(e.t1=e.t2,e.t1){e.next=16;break}e.t1=c.ossUrl;case 16:if(e.t0=e.t1,e.t0){e.next=19;break}e.t0=c;case 19:u=e.t0,o[a]=u;case 21:a++,e.next=5;break;case 24:!o||o.length<=0?o=void 0:K&&1===y&&(o=o[0]),t&&(null==t||t(o));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){if(p){var e=p;"string"==typeof e&&(e=p.split(",")),Array.isArray(e)&&(e=e.map((function(e){return"string"==typeof e?{name:I(e),status:"done",uid:"rc-upload-".concat(Date.now(),"-").concat((0,E.nanoid)()),url:e,type:L(e)}:e}))),X(N(e,y))}}),[p]);var ie=ge({iconRender:function(e){var t;return"application/pdf"==(null==e?void 0:e.type)?a().createElement(j.FilePdfTwoTone,{twoToneColor:"#DD4B43"}):null!=e&&null!==(t=e.type)&&void 0!==t&&t.startsWith("video/")?a().createElement(j.VideoCameraTwoTone,{twoToneColor:"#3C87F7"}):"application/vnd.ms-excel"==(null==e?void 0:e.type)||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"==(null==e?void 0:e.type)?a().createElement(j.FileExcelTwoTone,{twoToneColor:"#68B27C"}):"application/vnd.openxmlformats-officedocument.wordprocessingml.document"==(null==e?void 0:e.type)||"application/msword"==(null==e?void 0:e.type)?a().createElement(j.FileWordTwoTone,{twoToneColor:"#88CCF5"}):a().createElement(j.PaperClipOutlined,null)},name:i,accept:f,multiple:l,listType:k,maxCount:y,fileList:H,onChange:ae,disabled:S,readOnly:M,onRemove:function(e){var n=(H||[]).filter((function(t){return t.url!==e.url}));t&&t(n)},beforeUpload:function(e,t){return b(O().mark((function e(){var n;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(oe(!0),n=!1,t.forEach((function(e){g&&e.size>g&&(u.message.error("".concat(e.name," 文件大小超出限制,文件大小:").concat(e.size,"; ")),n=!0)})),!n){e.next=6;break}return oe(!1),e.abrupt("return",u.Upload.LIST_IGNORE);case 6:if(!(y>0&&H.length>=y)){e.next=12;break}return $&&$(H.length-y),H.length=y,u.message.error("文件个数超出限制"),oe(!1),e.abrupt("return",u.Upload.LIST_IGNORE);case 12:if(!G){e.next=23;break}return e.prev=13,e.next=16,G(t);case 16:e.next=23;break;case 18:return e.prev=18,e.t0=e.catch(13),console.error(e.t0),oe(!1),e.abrupt("return",u.Upload.LIST_IGNORE);case 23:oe(!1);case 24:case"end":return e.stop()}}),e,null,[[13,18]])})))()},customRequest:D?function(e){e.action,e.data;var t=e.file,r=(e.filename,e.headers,e.method,e.onSuccess),o=(e.onProgress,e.onError),a=new V(ge({serverUrl:T},q));t.ossPromise=a.upload(t,{params:ge({isPublic:1},n.params||{})}).then((function(e){var n;return t.url=null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.fileUrl,t.ossUrl=t.url,r(t),t.ossUrl})).catch(o)}:null,onPreview:function(e){var t=function(e){return!!Q[B(e)]}(e);t?te(e):window.open(e.url)}},n||{});return a().createElement(a().Fragment,null,a().createElement(u.Upload,h({className:"oss-uploader"},ie),y&&y>H.length?"picture-card"===k?re?"检测中":v:a().createElement(u.Button,{loading:re,icon:a().createElement(j.UploadOutlined,null)},v):null),z?a().createElement("a",{className:"uploader-template-download-btn",href:z},J):null,a().createElement(de,{previewFile:ee,setPreviewFile:te,modalConf:n.modalConf}))};var we=(0,o.createContext)(null),Oe=f(496);function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe=function(e){var t=(0,o.useContext)(we)||{},n=e.field,r=void 0===n?{}:n,a=e.onChange,i=e.value,c=r.name,l=r.mode,u=r.componentProps,s=void 0===u?{}:u,f=s.multiple;function p(){return(p=b(O().mark((function t(n){var o,i,l;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n,null==r||!r.autoUpload||null===(o=e.fieldsConf[c])||void 0===o||!o.onUpload){t.next=7;break}return t.next=4,null===(l=e.fieldsConf[c])||void 0===l?void 0:l.onUpload(n);case 4:if(i=t.sent){t.next=7;break}return t.abrupt("return");case 7:!f&&i&&1===i.length&&(i=i[0]),a&&a(i);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var d=xe(xe({mode:l},e),{},{value:"string"==typeof i?[i]:i,axios:null==t?void 0:t.axios,axiosConf:null==t?void 0:t.axiosConf},s);return Oe.createElement(be,h({},d,{onChange:function(e){return p.apply(this,arguments)}}))};var Ae,je=f(792),Ee=f.n(je),Se=Object.prototype.toString,_e=function(e){return e&&e instanceof Map},Me=function(e){return e&&e instanceof Set},Ce=function(e){return e&&e instanceof WeakMap},Te=function(e){return e&&e instanceof WeakSet},Ie=function(e){return"function"==typeof e},Le=Array.isArray,Re=function(e){return"[object Object]"===Se.call(e)},Ne=function(e){return _e(e)||Ce(e)||Me(e)||Te(e)},De=function(e){return Re(e)||Le(e)},Ue=function(e){return Array.isArray(e)?e:null!=e?[e]:[]},Fe=function(){function e(e){void 0===e&&(e=[]),this.forEachIndex=0,this.value=e}return e.prototype.add=function(e){this.has(e)||this.value.push(e)},e.prototype.has=function(e){return this.value.indexOf(e)>-1},e.prototype.delete=function(e){var t=this.value.length;if(0!==t)if(1!==t||this.value[0]!==e){var n=this.value.indexOf(e);n>-1&&(this.value.splice(n,1),n<=this.forEachIndex&&(this.forEachIndex-=1))}else this.value=[]},e.prototype.forEach=function(e){if(0!==this.value.length)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++)e(this.value[this.forEachIndex])},e.prototype.batchDelete=function(e){if(0!==this.value.length)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++){var t=this.value[this.forEachIndex];this.value.splice(this.forEachIndex,1),this.forEachIndex--,e(t)}},e.prototype.clear=function(){this.value.length=0},e}(),Ke=new WeakMap,qe=new WeakMap,$e=new WeakMap,ze=new WeakMap,Ve=new WeakMap,Ge=[],We={value:0},Je={value:0},Be={value:!1},Ye={value:!1},Qe=new Fe,He=new Fe,Xe=new Fe,Ze=new Fe,et=Symbol("MakeObModelSymbol"),tt=Symbol("ObModelSymbol"),nt=Symbol("ObModelNodeSymbol"),rt=Symbol("iteration key"),ot=function(e,t){var n=Ve.get(e),r=[];if(n){var o=n.get(t);o&&o.forEach((function(e){-1===r.indexOf(e)&&r.push(e)}))}return r},at=function(e,t){var n=ot(e,t),r=Je.value;Je.value=0;for(var o=0,a=n.length;o<a;o++){var i=n[o];i._isComputed?i._scheduler(i):ht()?He.add(i):yt()?Qe.add(i):Ie(i._scheduler)?i._scheduler(i):i()}Je.value=r},it=function(e){var t=e.key,n=e.type,r=e.target;"iterate"===n&&(t=rt);var o=Ge.length;if(0!==o){var a=Ge[o-1];gt()||a&&(Ye.value=!0,function(e,t){var n=e._reactionsSet;n?n.add(t):e._reactionsSet=new Fe([t])}(a,function(e,t,n){var r=Ve.get(e);if(r){var o=r.get(t);return o?o.add(n):r.set(t,new Fe([n])),r}var a=new Map([[t,new Fe([n])]]);return Ve.set(e,a),a}(r,t,a)))}},ct=function(e){var t=e.key,n=e.type,r=e.target,o=e.oldTarget;if(st(),function(e){Ze.forEach((function(t){return t(e)}))}(e),"clear"===n?o.forEach((function(e,t){at(r,t)})):at(r,t),"add"===n||"delete"===n||"clear"===n){var a=Array.isArray(r)?"length":rt;at(r,a)}ft()},lt=function(e){var t;null===(t=e._reactionsSet)||void 0===t||t.forEach((function(t){t.forEach((function(t){t.delete(e)}))})),Qe.delete(e),He.delete(e),delete e._reactionsSet},ut=function(e){e._disposed=!0,lt(e),function(e){var t;null===(t=e._computesSet)||void 0===t||t.forEach((function(e){0===ot(e._context,e._property).length&&(ut(e),e._dirty=!0)}))}(e)},st=function(){We.value++},ft=function(){if(We.value--,0===We.value){var e=Je.value;Je.value=0,bt(),wt(),Je.value=e}},pt=function(){Be.value=!0},dt=function(){var e=Je.value;Be.value=!1,Je.value=0,He.batchDelete((function(e){Ie(e._scheduler)?e._scheduler(e):e()})),Je.value=e},vt=function(){Je.value++},mt=function(){Je.value--},yt=function(){return We.value>0},ht=function(){return Be.value},gt=function(){return Je.value>0},bt=function(){Qe.batchDelete((function(e){Ie(e._scheduler)?e._scheduler(e):e()}))},wt=function(){Xe.batchDelete((function(e){e()}))},Ot=function(e,t){return e!==t&&(e.length!==t.length||!!e.some((function(e,n){return e!==t[n]})))},kt=(function(){function e(e,t){this.node=t,this.key=e.key,this.type=e.type,this.object=e.target,this.value=e.value,this.oldValue=e.oldValue}Object.defineProperty(e.prototype,"path",{get:function(){return this.node.path.concat(this.key)},enumerable:!1,configurable:!0})}(),function(){function e(e,t,n){this.target=e,this.key=t,this.value=n}return Object.defineProperty(e.prototype,"path",{get:function(){return this.parent?this.parent.path.concat(this.key):this.key?[this.key]:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetRaw",{get:function(){return _t(this.target)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){if(this.target)return xt(this.targetRaw)},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.key?e.targetRaw===this.targetRaw&&e.key===this.key:e.value===this.value},e.prototype.contains=function(e){if(e===this)return!0;for(var t=e.parent;t;){if(this.isEqual(t))return!0;t=t.parent}return!1},e}()),xt=function(e){return(null==e?void 0:e[nt])?e[nt]:ze.get(e)},Pt=function(e,t,n){var r=_t(n),o=xt(r);if(o)return o;!function(e,t){(null==e?void 0:e[tt])?e[nt]=t:ze.set(e,t)}(r,new kt(e,t,n))},At=Symbol("RAW_TYPE"),jt=Symbol("OBSERVABLE_TYPE"),Et=(Object.prototype.hasOwnProperty,function(e){return Ke.has(e)||!!(null==e?void 0:e[tt])}),St=function(e){return null!=e&&(!!Le(e)||(Re(e)?!e[At]&&(!!e[jt]||(!("$$typeof"in e)||!("_owner"in e))&&(!e._isAMomentObject&&(!e._isJSONSchemaObject&&(!Ie(e.toJS)&&!Ie(e.toJSON))))):!!(_e(e)||Ce(e)||Me(e)||Te(e))))},_t=function(e){return(null==e?void 0:e[tt])?e[tt]:Ke.get(e)||e},Mt=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},Ct=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Tt=new Set(Object.getOwnPropertyNames(Symbol).reduce((function(e,t){if("arguments"===t||"caller"===t)return e;var n=Symbol[t];return"symbol"==typeof n?e.concat(n):e}),[])),It=Object.prototype.hasOwnProperty;function Lt(e,t,n){var r=qe.get(n);return r||(!Et(n)&&St(n)?qt(e,t,n):n)}function Rt(e,t,n,r){var o=n.next;return n.next=function(){var a=o.call(n),i=a.done,c=a.value;return i||(r?c[1]=Lt(e,t,c[1]):c=Lt(e,t,c)),{done:i,value:c}},n}var Nt=((Ae={has:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this);return it({target:t,key:e,type:"has"}),n.has.apply(t,arguments)},get:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this);return it({target:t,key:e,type:"get"}),Lt(t,e,n.get.apply(t,arguments))},add:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),o=n.add.apply(t,arguments);return r||ct({target:t,key:e,value:e,type:"add"}),o},set:function(e,t){var n=Ke.get(this),r=Reflect.getPrototypeOf(this),o=r.has.call(n,e),a=r.get.call(n,e),i=r.set.apply(n,arguments);return o?t!==a&&ct({target:n,key:e,value:t,oldValue:a,type:"set"}):ct({target:n,key:e,value:t,type:"add"}),i},delete:function(e){var t=Ke.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),o=n.get?n.get.call(t,e):void 0,a=n.delete.apply(t,arguments);return r&&ct({target:t,key:e,oldValue:o,type:"delete"}),a},clear:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this),n=0!==e.size,r=e instanceof Map?new Map(e):new Set(e),o=t.clear.apply(e,arguments);return n&&ct({target:e,oldTarget:r,type:"clear"}),o},forEach:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Ke.get(this),a=Reflect.getPrototypeOf(this);it({target:o,type:"iterate"});return(t=a.forEach).call.apply(t,Ct([o,function(t,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return e.apply(void 0,Ct([Lt(o,n,t),n],Mt(r),!1))}],Mt(n),!1))},keys:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),t.keys.apply(e,arguments)},values:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Rt(e,"",t.values.apply(e,arguments),!1)},entries:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Rt(e,"",t.entries.apply(e,arguments),!0)}})[Symbol.iterator]=function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Rt(e,"",t[Symbol.iterator].apply(e,arguments),e instanceof Map)},Object.defineProperty(Ae,"size",{get:function(){var e=Ke.get(this),t=Reflect.getPrototypeOf(this);return it({target:e,type:"iterate"}),Reflect.get(t,"size",e)},enumerable:!1,configurable:!0}),Ae),Dt={get:function(e,t,n){return e=It.call(Nt,t)?Nt:e,Reflect.get(e,t,n)}},Ut={get:function(e,t,n){if(t){var r=e[t];if("symbol"==typeof t&&Tt.has(t))return r;it({target:e,key:t,receiver:n,type:"get"});var o=qe.get(r);if(o)return o;if(!Et(r)&&St(r)){var a=Reflect.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.writable||!1!==a.configurable)return qt(e,t,r)}return r}},has:function(e,t){var n=Reflect.has(e,t);return it({target:e,key:t,type:"has"}),n},ownKeys:function(e){var t=Reflect.ownKeys(e);return it({target:e,type:"iterate"}),t},set:function(e,t,n,r){var o=It.call(e,t),a=qt(e,t,n),i=e[t];return e[t]=a,o?n!==i&&ct({target:e,key:t,value:a,oldValue:i,receiver:r,type:"set"}):ct({target:e,key:t,value:a,oldValue:i,receiver:r,type:"add"}),!0},deleteProperty:function(e,t){var n=e[t];return delete e[t],ct({target:e,key:t,oldValue:n,type:"delete"}),!0}},Ft=function(e,t){var n=new Proxy(e,Ut);return Ke.set(n,e),t?$e.set(e,n):qe.set(e,n),n},Kt=function(e,t){var n=new Proxy(e,Dt);return Ke.set(n,e),t?$e.set(e,n):qe.set(e,n),n},qt=function(e,t,n,r){if("object"!=typeof n)return n;var o=Ke.get(n);if(o){var a=xt(o);return a.target||(a.target=e),a.key=t,n}if(!St(n))return n;if(e){var i=Ke.get(e)||e;if($e.get(i))return n}return Pt(e,t,n),r?function(e){return De(e)?Ft(e,!0):Ne(e)?Kt(e,!0):e}(n):De(n)?Ft(n):Ne(n)?Kt(n):n},$t=function(e){var t=function(t){return e({value:t})};return Ie(e)&&(t[et]=e),t},zt=function(e,t){function n(n){var r;try{e(),Ie(n)&&(r=n())}finally{t()}return r}return n.bound=Vt(n),n},Vt=function(e){return function(t,n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e((function(){return t.apply(n,r)}))}}},Gt=function(e,t){var n=zt(e,t),r=$t((function(e){var t=e.target,r=e.key;return t[r]=n.bound(t[r],t),t}));return n[et]=r,n.bound[et]=r,n},Wt=Gt(st,ft);Wt.scope=Gt(pt,dt),Wt.endpoint=function(e){Ie(e)&&(0===We.value?e():Xe.add(e))},Gt((function(){st(),vt()}),(function(){mt(),ft()})).scope=Gt((function(){pt(),vt()}),(function(){mt(),dt()}));zt(vt,mt);var Jt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:qt(t,n,t?t[n]:r)};return t?(Object.defineProperty(t,n,{set:function(e){var r=o.value;e=qt(t,n,e),o.value=e,r!==e&&ct({target:t,key:n,type:"set",oldValue:r,value:e})},get:function(){return it({target:t,key:n,type:"get"}),o.value},enumerable:!0,configurable:!1}),t):o.value})),Bt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:t?t[n]:r},a={set:function(e){var t=o.value;o.value=e,t!==e&&ct({target:o,key:n,type:"set",oldValue:t,value:e})},get:function(){return it({target:o,key:n,type:"get"}),o.value}};return Ke.set(a,o),qe.set(o,a),Pt(t,n,o),t?(Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!1,writable:!1}),t):a})),Yt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:t?t[n]:r},a={},i=t||o,c=t?n:"value";function l(){return it({target:i,key:c,type:"get"}),o.value}function u(e){var t=o.value;o.value=e,t!==e&&ct({target:i,key:c,type:"set",oldValue:t,value:e})}return t?(Object.defineProperty(t,n,{get:l,set:u,enumerable:!0}),t):(Object.defineProperty(a,"value",{set:u,get:l}),Pt(t,n,o),a[tt]=o,a)})),Qt=$t((function(e){var t=e.target,n=e.key,r=e.value,o={value:qt(t,n,t?t[n]:r,!0)};return t?(Object.defineProperty(t,n,{set:function(e){var r=o.value;e=qt(t,n,e,!0),o.value=e,r!==e&&ct({target:t,key:n,type:"set",oldValue:r,value:e})},get:function(){return it({target:t,key:n,type:"get"}),o.value},enumerable:!0,configurable:!1}),t):o.value})),Ht=Object.getOwnPropertyDescriptor,Xt=Object.getPrototypeOf,Zt=Symbol("ClassDescriptorSymbol");function en(e,t){if(e)return Ht(e,t)||en(Xt(e),t)}function tn(e,t,n){if(!e)return n?Ie(n)?{get:n}:n:{};var r=function(e,t){var n=e.constructor;if(n===Object||n===Array)return en(e,t);var r=n[Zt]||{},o=r[t];if(o)return o;var a=en(e,t);return n[Zt]=r,r[t]=a,a}(e,t);return r||{}}var nn=$t((function(e){var t=e.target,n=e.key,r=e.value,o={},a={},i=t||o,c=t?n:"value",l=tn(t,c,r);function u(){var e;o.value=null===(e=l.get)||void 0===e?void 0:e.call(i)}function s(){if(-1===Ge.indexOf(s)){lt(s);try{Ge.push(s),u()}finally{Ge.pop()}}}function f(){return Ge.length>0&&function(e){if(Ie(e)){var t=Ge[Ge.length-1];if(t){var n=t._computesSet;n?n.add(e):t._computesSet=new Fe([e])}}}(s),gt()?u():s._dirty&&(s(),s._dirty=!1),it({target:i,key:c,type:"get"}),o.value}function p(e){var t;try{st(),null===(t=l.set)||void 0===t||t.call(i,e)}finally{ft()}}return s._name="ComputedReaction",s._scheduler=function(){s._dirty=!0,ct({target:i,key:c,value:o.value,type:"set"})},s._isComputed=!0,s._dirty=!0,s._context=i,s._property=c,t?(Object.defineProperty(t,n,{get:f,set:p,enumerable:!0}),t):(Object.defineProperty(a,"value",{set:p,get:f}),Pt(t,n,o),a[tt]=o,a)}));function rn(e){return qt(null,null,e)}rn.box=Bt,rn.ref=Yt,rn.deep=Jt,rn.shallow=Qt,rn.computed=nn,rn[et]=Jt;var on=function(e,t){void 0===t&&(t="AutoRun");var n=function(){if(Ie(e)&&!(n._boundary>0)&&-1===Ge.indexOf(n)){lt(n);try{st(),Ge.push(n),e()}finally{Ge.pop(),n._boundary++,ft(),n._boundary=0,n._memos.cursor=0,n._effects.cursor=0}}},r=function(){n._memos={queue:[],cursor:0},n._effects={queue:[],cursor:0}};return n._boundary=0,n._name=t,r(),n(),function(){ut(n),function(e){if(e._effects)try{st(),e._effects.queue.forEach((function(e){e&&e.dispose&&e.dispose()}))}finally{ft()}}(n),r()}};on.memo=function(e,t){if(Ie(e)){var n=Ge[Ge.length-1];if(!n||!n._memos)throw new Error("autorun.memo must used in autorun function body.");var r=Ue(t||[]),o=n._memos.cursor++,a=n._memos.queue[o];if(!a||Ot(r,a.deps)){var i=e();return n._memos.queue[o]={value:i,deps:r},i}return a.value}},on.effect=function(e,t){if(Ie(e)){var n=Ge[Ge.length-1];if(!n||!n._effects)throw new Error("autorun.effect must used in autorun function body.");var r=n._effects,o=Ue(t||[{}]),a=r.cursor++,i=r.queue[a];i&&!Ot(o,i.deps)||(Promise.resolve(0).then((function(){if(!n._disposed){var t=e();Ie(t)&&(r.queue[a].dispose=t)}})),r.queue[a]={deps:o})}};var an=function(e,t){void 0===t&&(t="TrackerReaction");var n=this;this.track=function(e){if(!Ie(e))return n.results;if(!(n.track._boundary>0)){if(-1===Ge.indexOf(n.track)){lt(n.track);try{st(),Ge.push(n.track),n.results=e()}finally{Ge.pop(),n.track._boundary++,ft(),n.track._boundary=0}}return n.results}},this.dispose=function(){ut(n.track)},this.track._scheduler=function(t){0===n.track._boundary&&n.dispose(),Ie(t)&&e(t)},this.track._name=t,this.track._boundary=0},cn="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;var ln=function(){try{if("undefined"!=typeof self)return self}catch(e){}try{if("undefined"!=typeof window)return window}catch(e){}try{if(void 0!==f.g)return f.g}catch(e){}return Function("return this")()}(),un=ln.FinalizationRegistry&&new ln.FinalizationRegistry((function(e){var t;return null===(t=null==e?void 0:e.clean)||void 0===t?void 0:t.call(e)})),sn=function(){function e(e,t){void 0===t&&(t=1e4),this.token={clean:e},this.expireTime=t}return e.prototype.open=function(e){var t=this;un?un.register(e,this.token,this.token):this.request=setTimeout((function(){var e,n;null===(n=null===(e=t.token)||void 0===e?void 0:e.clean)||void 0===n||n.call(e)}),this.expireTime)},e.prototype.close=function(){un?un.unregister(this.token):clearTimeout(this.request)},e}(),fn=function(e){var t=!1;return Promise.resolve(0).then((function(){t?t=!1:e()})),function(){t=!0}},pn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},dn=[],vn={value:0},mn=new Set;function yn(){var e=pn((0,o.useState)([]),2)[1],t=(0,o.useRef)(!1),n=(0,o.useRef)(!1);cn((function(){return t.current=!0,n.current&&(e([]),n.current=!1),function(){t.current=!1}}),dn);var r,a,i=(0,o.useCallback)((function(){e([])}),dn),c=(0,o.useCallback)((function(){t.current?0===vn.value?i():mn.add(i):n.current=!0}),dn);return vn.value++,r=function(){vn.value>0&&vn.value--,0===vn.value&&mn.forEach((function(e){mn.delete(e),e()}))},(a=(0,o.useRef)(null)).current=fn(r),cn((function(){a.current(),r()})),c}var hn=Array.isArray,gn=function(e,t){var n=(0,o.useRef)(null),r=(0,o.useRef)(!1);(0,o.useEffect)((function(){r.current=!0;var o=e();return function(){var e,a,i;(r.current=!1,e=n.current,a=t,(i=hn(e))===hn(a)&&(i?e.length===a.length&&e.every((function(e,t){return e===a[t]})):e===a))?fn((function(){r.current||o&&o()})):o&&o()}}),t),n.current=t},bn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},wn=function(){};function On(){return new wn}var kn=function(e,t){var n,r,o,i,c=yn();return(n=function(){return new an((function(){"function"==typeof(null==t?void 0:t.scheduler)?t.scheduler(c):c()}),null==t?void 0:t.displayName)},r=a().useRef(null),o=a().useRef(),i=bn(a().useState(On),1)[0],r.current||(r.current=n()),o.current||(o.current=new sn((function(){r.current&&r.current.dispose()})),o.current.open(i)),gn((function(){return o.current.close(),function(){r.current&&(r.current.dispose(),r.current=null)}}),[]),r.current).track(e)},xn=function(){return xn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xn.apply(this,arguments)};function Pn(e,t){var n=xn({forwardRef:!1},t),r=n.forwardRef?(0,o.forwardRef)((function(t,r){return kn((function(){return e(xn(xn({},t),{ref:r}))}),n)})):function(t){return kn((function(){return e(t)}),n)},a=(0,o.memo)(r);return Ee()(a,e),n.displayName&&(a.displayName=n.displayName),a}Pn((function(e){var t="function"==typeof e.children?e.children():e.children;return a().createElement(o.Fragment,{},t)}));var An=f(694),jn={};jn.styleTagTransform=ue(),jn.setAttributes=ae(),jn.insert=re().bind(null,"head"),jn.domAPI=te(),jn.insertStyleElement=ce();Z()(An.c,jn);const En=An.c&&An.c.locals?An.c.locals:void 0;var Sn=["options","isAvatar","configKey","infoRender","avatarSize"];function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cn=Pn((function(e){var t,n=(0,c.useField)(),r=(null===(t=(0,c.useFieldSchema)()["x-component-props"])||void 0===t?void 0:t.options)||[],i=(e.options,e.isAvatar),l=e.configKey,f=e.infoRender,p=e.avatarSize,d=void 0===p?"default":p,v=s(e,Sn),m=(0,o.useMemo)((function(){return r.map((function(e){return Mn(Mn({},e),{},{avatarColor:(t=360*Math.random(),n=20*Math.random()+70,r=20*Math.random()+70,"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"))});var t,n,r}))}),[r]),y=(0,o.useCallback)((function(e,t,n){return t?e[t]:e[n]}),[]);return a().createElement(u.Select,h({className:En["user-select"]},v,{value:n.value,onChange:n.setValue,optionLabelProp:"label"}),m.map((function(e,t){return a().createElement(u.Select.Option,{label:e.label,key:t,value:e.value,className:En["user-select-option"]},a().createElement(a().Fragment,null,i&&a().createElement("span",{className:En["user-select-option__avatar"]},e.avatar?a().createElement(u.Avatar,{src:e.avatar,size:d}):a().createElement(u.Avatar,{style:{verticalAlign:"middle",backgroundColor:e.avatarColor},size:d},e.label)),a().createElement("div",{className:En["option-info"]},f||a().createElement(a().Fragment,null,a().createElement("div",{className:En["option-info-name"],key:"tagLabel"},a().createElement("span",{className:En["option-info-name__label"]},e.label," ")),a().createElement("span",{className:En["option-info__idCard"]},"手机号:",y(e,null==l?void 0:l.phoneKey,"phone")),a().createElement("span",{className:En["option-info__idCard"]},"身份证号:",y(e,null==l?void 0:l.idCardKey,"idCard"))))))})))}));function Tn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ln(){var e=Rn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),t=e.resList,n=e.maxCol;return t.forEach((function(e){Nn(n,e)})),t}function Rn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t||{},r=n.resList,o=void 0===r?[]:r,a=n.preCol,i=void 0===a?0:a,c=n.mergeLast,l=n.level,u=void 0===l?0:l,s=n.childrenKey,f=void 0===s?"children":s,p=i+1,d=0,v=!1;e.forEach((function(e){e&&Array.isArray(e[f])&&e[f].length>0&&(v=!0)}));var m=o.length>0?o.length-1:0;return!0===c&&!v&&u>0?(o[m].push(P(e)),{resList:o,maxCol:p,maxRow:1}):(e.forEach((function(e,n){var r=In({},e),a=r[f]||[],c=null==a?void 0:a.length;if(n>0&&o.push(Nn(i,[],{content:!1})),m=o.length>0?o.length-1:0,o[m]||(o[m]=[]),o[m].push(r),c>0){var l=Rn(a,In(In({},t),{},{resList:o,preCol:i+1,level:u+1}));p<l.maxCol&&(p=l.maxCol),d+=l.maxRow,r._maxRow=l.maxRow}else r._maxRow=1,d+=1})),{resList:o,maxCol:p,maxRow:d})}function Nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})||{}).content;if(t.length<e)for(var r=t.length;r<e;r++)t.push(n);return t}var Dn=f(258),Un={};Un.styleTagTransform=ue(),Un.setAttributes=ae(),Un.insert=re().bind(null,"head"),Un.domAPI=te(),Un.insertStyleElement=ce();Z()(Dn.c,Un);Dn.c&&Dn.c.locals&&Dn.c.locals;var Fn=f(496),Kn=function(e){var t=(0,c.useField)(),n=e.dataSource,r=void 0===n?t.dataSource||[]:n,a=e.disabled,i=e.readOnly,l=e.value,s=e.onChange,f=e.mergeLast,p=void 0===f||f,d=e.labelKey,v=void 0===d?"label":d,m=e.valueKey,y=void 0===m?"value":m,h=e.childrenKey,g=void 0===h?"children":h,b=(0,o.useMemo)((function(){return Ln(r,{mergeLast:p,childrenKey:g})}),[r]);return Fn.createElement(u.Checkbox.Group,{className:"tree-checkbox",disabled:a||i,value:l,onChange:s},Fn.createElement("table",{className:"tree-checkbox-table"},Fn.createElement("tbody",null,null==b?void 0:b.map((function(e,t){return Fn.createElement("tr",{className:"tree-checkbox-row tree-checkbox-row-".concat(t),key:t},null==e?void 0:e.map((function(e,t){return!1===e?null:Fn.createElement("td",{className:"tree-checkbox-col tree-checkbox-col-".concat(t),key:t,rowSpan:(null==e?void 0:e._maxRow)>1?null==e?void 0:e._maxRow:null},Array.isArray(e)?Fn.createElement(Fn.Fragment,null,e.map((function(e){return e&&Fn.createElement(u.Checkbox,{value:e[y],key:e[y]},e[v])}))):e&&Fn.createElement(u.Checkbox,{value:e[y],key:e[y]},e[v]))})))})))))};var qn=f(496),$n=u.DatePicker.RangePicker;function zn(e){var t,n=(null==e||null===(t=e.parent)||void 0===t?void 0:t.value)||(null==e?void 0:e.value);return Array.isArray(n)&&(n=n[e.index]),n}var Vn=(0,c.observer)((function(e){return qn.createElement(u.DatePicker,e)}));Vn.RangePicker=(0,c.observer)((function(e){var t=(0,c.useField)(),n=(0,c.useFieldSchema)(),o=e.isSplitTimes,a=void 0!==o&&o,i=e.startKey,l=void 0===i?"startTime":i,u=e.endKey,s=void 0===u?"endTime":u,f=function(e,o){var a=r(r({},l,e),s,o);if(t.parent){if(t.parent&&n.parent){var i=zn(t);Object.keys(a).forEach((function(e){i[e]=a[e]}))}}else t.form.setValues(a)};return qn.createElement($n,h({},e,{onChange:function(t,n){return r=t,i=(o=n)[0],c=o[1],e.onChange&&e.onChange(r),void(a&&("date"!==e.pick&&e.pick||e.showTime?f(i,c):f(i+" 00:00:00",c+" 23:59:59")));var r,o,i,c}}))}));const Gn=f.p+"static/imgs/picker-icon_24d725ef02.svg";function Wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=(arguments.length>2?arguments[2]:void 0)||{},r=n.isObjectRes,o=void 0===r||r,a=n.lonKey,i=void 0===a?"longitude":a,c=n.latKey,l=void 0===c?"latitude":c,u=n.addrKey,s=void 0===u?"address":u,f=e[i],p=e[l],d=e[s],v=Jn(t);return v&&!1===o&&(f=v[i],p=v[l],d=v[s]),{lon:f,lat:p,addr:d}}function Jn(e){var t,n=(null==e||null===(t=e.parent)||void 0===t?void 0:t.value)||(null==e?void 0:e.value);return Array.isArray(n)&&(n=n[e.index]),n}var Bn=f(544),Yn={};Yn.styleTagTransform=ue(),Yn.setAttributes=ae(),Yn.insert=re().bind(null,"head"),Yn.domAPI=te(),Yn.insertStyleElement=ce();Z()(Bn.c,Yn);Bn.c&&Bn.c.locals&&Bn.c.locals;var Qn=f(496);const Hn=function(e){var t=e||{},n=t.onShow,r=t.isObjectRes,a=t.lonKey,i=t.latKey,l=t.addrKey,s=t.value,f=t.pickerText,p=void 0===f?"选点":f,d=t.pickerIcon,v=t.pickerIconUrl,m=(0,c.useField)()||{},y=(0,o.useMemo)((function(){return Wn(s,m,{isObjectRes:r,lonKey:a,latKey:i,addrKey:l})}),[r,a,i,l,s,m.data]);return Qn.createElement("div",{className:"location-value-box"},Qn.createElement("div",{className:"location-value-head-box"},Qn.createElement("div",{className:"location-lon-lat"},Qn.createElement("div",null,"经度:",y.lon," "),Qn.createElement("div",null,"纬度:",y.lat)),Qn.createElement(u.Button,{className:"location-btn",color:"primary",type:"text",onClick:n},d||Qn.createElement("img",{className:"location-picker-icon",src:v||Gn}),Qn.createElement("span",{className:"location-picker-text"},p))),Qn.createElement("div",null,"地址:",y.addr))};var Xn=f(816),Zn=f(736),er={};er.styleTagTransform=ue(),er.setAttributes=ae(),er.insert=re().bind(null,"head"),er.domAPI=te(),er.insertStyleElement=ce();Z()(Zn.c,er);Zn.c&&Zn.c.locals&&Zn.c.locals;var tr=f(496);function nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const or=function(e){var t=e.pickInfo,n=e.setPickInfo,r=e.setPoint,o=e.addrLoading,a=e.defaultLocation,i=e.disabled,c=e.readOnly;function l(e){var t,r,o=null!==(t=null==e||null===(r=e.target)||void 0===r?void 0:r.value)&&void 0!==t?t:e,a=null;return n((function(e){return a=rr(rr({},e),{},{lon:o})})),a}function s(e){var t,r,o=null!==(t=null==e||null===(r=e.target)||void 0===r?void 0:r.value)&&void 0!==t?t:e,a=null;return n((function(e){return a=rr(rr({},e),{},{lat:o})})),a}function f(e){var t=l(e);r&&r(t.lon||a.lon,t.lat||a.lat,{changeCenter:!0})}function p(e){var t=s(e);r&&r(t.lon||a.lon,t.lat||a.lat,{changeCenter:!0})}return tr.createElement("div",{className:"location-picker-info"},tr.createElement("div",{className:"picker-info-position"},tr.createElement("div",{className:"picker-info-lon"},tr.createElement("div",{className:"picker-info-label"},"经度:"),c?t.lon:tr.createElement(u.InputNumber,{className:"picker-info-input",disabled:i||o,max:180,min:-180,controls:!1,value:t.lon,onChange:l,onBlur:f,onPressEnter:f})),tr.createElement("div",{className:"picker-info-lat"},tr.createElement("div",{className:"picker-info-label"},"纬度:"),c?t.lat:tr.createElement(u.InputNumber,{className:"picker-info-input",disabled:i||o,max:90,min:-90,controls:!1,value:t.lat,onChange:s,onBlur:p,onPressEnter:p}))),tr.createElement("div",{className:"picker-info-addr"},tr.createElement("div",{className:"picker-info-label"},"地址:"),o?tr.createElement(u.Spin,{size:"small"}):t.addr))};var ar=["AMap.Geocoder","AMap.Autocomplete"];window._AMapLoaderTemp||(window._AMapLoaderTemp={}),window._AMapLoaderTemp.loading=!1,window._AMapLoaderTemp.promise=null;const ir=function(e){window.AMap||(window._AMapSecurityConfig={securityJsCode:e.securityJsCode||window._AMapLoaderTemp.securityJsCode});var t=e||{},n=t.key,r=t.version,o=t.plugins;return new Promise((function(e,t){if(window._AMapLoaderTemp.loading&&window._AMapLoaderTemp.promise)window._AMapLoaderTemp.promise.then((function(t){e(window.AMap)}));else if(window.AMap&&!o||window.AMap&&o&&JSON.stringify(window._AMapLoaderTemp.plugins)===JSON.stringify(o))e(window.AMap);else{window._AMapLoaderTemp.plugins=o?[].concat(ar,P(o||[])):ar;var a=f(288);window._AMapLoaderTemp.loading=!0,window._AMapLoaderTemp.promise=a.load({key:n||window._AMapLoaderTemp.key,version:r||"1.4.15",plugins:window._AMapLoaderTemp.plugins}).then((function(t){return window.AMap=t,e(window.AMap),window._AMapLoaderTemp.loading=!1,t})).catch((function(e){t(e),console.error("AMap loader: ",e)}))}}))},cr=f.p+"static/imgs/marker-icon_ab8bbcc8cb.svg";function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}window._AMapLoaderTemp||(window._AMapLoaderTemp={});var sr=function(){function e(t){var n=t.map,o=t.AMap;if(D(this,e),r(this,"map",void 0),r(this,"AMap",void 0),r(this,"markers",{}),r(this,"pickerMarker",void 0),!n)throw new Error("请传入地图实例");this.map=n,this.AMap=o}return F(e,[{key:"getCenter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.map;if(!e)throw new Error("请传入地图实例和 AMap");return e&&e.getCenter&&e.getCenter()}},{key:"setCenter",value:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{map:this.map,AMap:this.AMap||window.AMap})||{},r=n.map,o=void 0===r?this.map:r,a=n.AMap;if(!(void 0===a?this.AMap||window.AMap:a)||!o)throw new Error("请传入地图实例和 AMap");var i=new window.AMap.LngLat(e,t);o.setCenter(i)}},{key:"setMarker",value:function(e,t,n){var r=n||{},o=r.id,a=void 0===o?Date.now():o,i=r.marker,c=r.map,l=void 0===c?this.map:c,u=r.AMap,s=void 0===u?this.AMap:u;if(!s||!l)throw new Error("请传入地图实例和 AMap");var f=new s.LngLat(e,t),p=i||this.markers[a];if(p)return p.setPosition(f),p;var d=new s.Icon({size:new s.Size(34,34),image:cr,imageSize:new s.Size(34,34)}),v=new s.Marker({offset:new s.Pixel(-17,-34),icon:d,position:f});return this.markers[a]=v,null==l||l.add(v),v}},{key:"setPickerMarker",value:function(e,t,n){var r=(n||{}).marker,o=void 0===r?this.pickerMarker:r;this.pickerMarker=this.setMarker(e,t,ur(ur({},n),{},{marker:o}))}},{key:"on",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.map)||void 0===e?void 0:e.on.apply(e,n)}},{key:"off",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.map)||void 0===e?void 0:e.off.apply(e,n)}}]),e}(),fr=f(460),pr={};pr.styleTagTransform=ue(),pr.setAttributes=ae(),pr.insert=re().bind(null,"head"),pr.domAPI=te(),pr.insertStyleElement=ce();Z()(fr.c,pr);fr.c&&fr.c.locals&&fr.c.locals;var dr=f(496);window._AMapLoaderTemp&&window._AMapLoaderTemp.key&&ir({key:window._AMapLoaderTemp.key,securityJsCode:window._AMapLoaderTemp.securityJsCode});const vr=function(e){var t=(0,o.useRef)(),n=(0,o.useRef)();return(0,o.useEffect)((function(){var r=e.key,o=e.securityJsCode,a=e.plugins;ir({key:r,securityJsCode:o,plugins:a}).then((function(r){var o=e.zoom,a=e.center,i=e.init;t.current=new r.Map(n.current,{zoom:o||11,center:a||[120.160217,30.243861]}),i&&i({map:t.current,mapUtils:new sr({map:t.current,AMap:r}),AMap:r})}))}),[]),(0,o.useEffect)((function(){var n;Array.isArray(e.center)&&e.center.length>1&&(null===(n=t.current)||void 0===n||n.setCenter(e.center))}),[e.center]),dr.createElement("div",{ref:n,className:"a-map-container",style:e.style})};var mr=f(496);const yr=function(e){return mr.createElement(u.Alert,{className:"location-picker-notice-bar",message:"click"===e.changeMode?"点击地图上的位置,选择目标地址":"拖拽移动地图,中心标点为目标地址",type:"info",showIcon:!0})};function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var br=f(380),wr={};wr.styleTagTransform=ue(),wr.setAttributes=ae(),wr.insert=re().bind(null,"head"),wr.domAPI=te(),wr.insertStyleElement=ce();Z()(br.c,wr);br.c&&br.c.locals&&br.c.locals;var Or=f(496);function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Pr=function(e){var t=A((0,o.useState)(!1),2),n=t[0],r=t[1],a=A((0,o.useState)([]),2),i=a[0],c=a[1];return Or.createElement(u.AutoComplete,{className:"location-map-search",allowClear:!0,options:i,onSelect:function(t,n){var r=n||{},o=r.lng,a=r.lat;e.setPoint&&e.setPoint(o,a,{changeCenter:!0})},onSearch:_.debounce((function(t){var n;null!==(n=window.AMap)&&void 0!==n&&n.Autocomplete&&(t?(r(!0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0571";return new Promise((function(n,r){window.AMap?new window.AMap.Autocomplete({city:t}).search(e,(function(o,a){var i;if("complete"===o&&"OK"===a.info)n(null===(i=a.tips)||void 0===i?void 0:i.map((function(e){var t=(null==e?void 0:e.location)||{},n=t.lng,r=t.lat;return gr(gr({},e),{},{label:e.name,value:e.id,lon:+n,lng:+n,lat:+r})})));else if("USER_DAILY_QUERY_OVER_LIMIT"===a){if(!window._AMapLoaderTemp.serverKey)return void r(new Error("超出使用限制,请联系管理员"));fetch("https://restapi.amap.com/v3/assistant/inputtips?key=".concat(window._AMapLoaderTemp.serverKey,"&keywords=").concat(e,"&city=").concat(t),{mode:"cors"}).then((function(e){return e.json()})).then((function(e){var t;"1"===e.status?n(null===(t=e.tips)||void 0===t?void 0:t.map((function(e){var t,n=A(null===(t=e.location)||void 0===t?void 0:t.split(","),2),r=n[0],o=n[1];return gr(gr({},e),{},{label:e.name,value:e.id,lng:+r,lon:+r,lat:+o})}))):(console.warn("Warn getSearchTips fetch: ",e),r(new Error(e.info)))})).catch(r)}else r(a)})):r(Error("Error getAddress window.AMap is not defined."))}))}(t,e.cityCode||"0571").then((function(e){c(null==e?void 0:e.map((function(e){return xr(xr({},e),{},{label:e.name,value:e.name})}))),r(!1)})).catch((function(e){r(!1)}))):c([]))}),500),onClear:function(){c([])}},Or.createElement(u.Input.Search,{loading:n,placeholder:"请输入"}))};function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jr(e){return new Promise((function(t,n){var o;null===(o=navigator)||void 0===o||null===(o=o.geolocation)||void 0===o||o.getCurrentPosition((function(e){t(e)}),n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ar(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({enableHighAccuracy:!0,timeout:5e3},e))}))}const Er=f.p+"static/imgs/position-icon_5bcb8a742e.svg",Sr=f.p+"static/imgs/reset-icon_9edad62306.svg";var _r=f(164),Mr={};Mr.styleTagTransform=ue(),Mr.setAttributes=ae(),Mr.insert=re().bind(null,"head"),Mr.domAPI=te(),Mr.insertStyleElement=ce();Z()(_r.c,Mr);_r.c&&_r.c.locals&&_r.c.locals;var Cr=f(496);function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Lr=function(e){var t=e.mode,n=e.layout,r=void 0===n?"ver":n,a=e.hasSearch,i=void 0===a||a,l=e.isObjectRes,s=void 0===l||l,f=e.isAutoFixAddr,p=void 0!==f&&f,d=e.changeMode,v=void 0===d?"click":d,m=e.lonKey,y=void 0===m?"longitude":m,h=e.latKey,g=void 0===h?"latitude":h,w=e.addrKey,k=void 0===w?"address":w,x=e.value,P=e.isAutoSearch,j=void 0===P||P,E=e.visible,S=e.defaultLocation,_=e.disabled,M=e.readOnly,C=(0,c.useField)()||{},T=(0,o.useRef)(),I=(0,o.useMemo)((function(){return Wn(x,C,{isObjectRes:s,lonKey:y,latKey:g,addrKey:k})}),[s,y,g,k,x,C.data]),L=A((0,o.useState)(!1),2),R=L[0],N=L[1],D=A((0,o.useState)(!1),2),U=D[0],F=D[1],K=A((0,o.useState)(I),2),q=K[0],$=K[1];function z(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q.lon,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q.lat;null===(e=T.current)||void 0===e||e.setCenter(t,n)}function V(e,t,n){return G.apply(this,arguments)}function G(){return(G=b(O().mark((function t(n,r,o){var a,i,c,l,u,s,f,d,m;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=(a=o||{}).isAutoFixAddr,c=void 0===i?p||!0:i,l=a.changeCenter,u=n||q.lon,s=r||q.lat,("click"===v||_||M)&&(null===(f=T.current)||void 0===f||f.setPickerMarker(n,r)),l&&z(n,r),!c&&q.addr){t.next=11;break}return t.next=8,W(u,s);case 8:t.t0=t.sent,t.next=12;break;case 11:t.t0=q.addr;case 12:d=t.t0,m=Ir(Ir({},q),{},{lon:u,lat:s,addr:d}),$(m),e.setPickInfo&&e.setPickInfo(m);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(e,t){return new Promise((function(n,r){if(!window.AMap)return r(),new Error("window.AMap is not defined");var o,a;F(!0),(o=e,a=t,new Promise((function(e,t){window.AMap?new window.AMap.Geocoder({}).getAddress([o,a],(function(n,r){if("complete"===n&&"OK"===r.info){var i,c=null==r||null===(i=r.regeocode)||void 0===i?void 0:i.formattedAddress;return e(c),c}if("USER_DAILY_QUERY_OVER_LIMIT"===r){if(!window._AMapLoaderTemp.serverKey)return void t(new Error("超出使用限制,请联系管理员"));fetch("https://restapi.amap.com/v3/geocode/regeo?location=".concat(null==o?void 0:o.toFixed(6),",").concat(null==a?void 0:a.toFixed(6),"&key=").concat(window._AMapLoaderTemp.serverKey),{mode:"cors"}).then((function(e){return e.json()})).then((function(n){var r;"1"===n.status?e(null===(r=n.regeocode)||void 0===r?void 0:r.formatted_address):(console.warn("Warn getAddress fetch: ",n),t(new Error(n.info)))})).catch(t)}else t(r)})):t(Error("Error getAddress window.AMap is not defined."))}))).then((function(e){F(!1),$((function(t){return Ir(Ir({},t),{},{addr:e})})),n(e)})).catch((function(e){r(e),u.message.error(e),F(!1)}))}))}(0,o.useEffect)((function(){if(E){var e=S.lon,t=S.lat;I.lon&&I.lat&&(e=I.lon,t=I.lat),window.AMap&&window.AMap.LngLat&&z(e,t),V(e,t,{isAutoFixAddr:!1})}}),[E,I,v]);var J="move"!==v||_||M,B=!1!==e.showGetPositionBtn&&!(_||M);return Cr.createElement("div",{className:"location-picker-modal-content location-mode-".concat(t," location-modal-content-layout-").concat(r)},Cr.createElement(or,{pickInfo:q,setPickInfo:$,setPoint:V,addrLoading:U,defaultLocation:S,disabled:_,readOnly:M}),Cr.createElement("div",{className:"location-picker-map-wrap"},Cr.createElement("div",{className:"location-picker-map"},i&&E?Cr.createElement(Pr,{setPoint:V,isAutoSearch:j}):null,Cr.createElement(vr,{init:function(e){e.map;var t=e.mapUtils;T.current=t;var n,r,o=S.lon,a=S.lat;q.lon&&q.lat&&(o=q.lon,a=q.lat),V(o,a,{isAutoFixAddr:p}),z(o,a),N(!1),_||M?null===(n=T.current)||void 0===n||n.setPickerMarker(o,a):"click"===v?(null===(r=T.current)||void 0===r||r.setPickerMarker(o,a),T.current.on("click",(function(e){var t=e.lnglat||{};V(t.lng,t.lat,{changeCenter:!0})}))):T.current.on("mouseup",(0,Xn.debounce)((function(e){var t,n=(null===(t=T.current)||void 0===t?void 0:t.getCenter())||{};V(n.lng,n.lat)}),1e3))},loading:R,style:{height:"500px"}}),Cr.createElement("div",{className:"set-map-actions"},J?Cr.createElement("img",{className:"reset-icon",src:Sr,onClick:function(){z()}}):null,B?Cr.createElement("img",{className:"center-icon",src:Er,onClick:function(){N(!0),jr().then((function(e){var t=e.coords,n=void 0===t?{}:t;V(n.longitude,n.latitude,{changeCenter:!0}),N(!1)})).catch((function(e){N(!1),u.message.error("定位获取失败"),console.warn("Error getCurrentPosition e: ",e)}))}}):null),"click"!==v&&!(_||M)&&Cr.createElement("img",{className:"location-picker-center-icon",src:cr})),Cr.createElement(yr,{changeMode:v})),R&&Cr.createElement("div",{className:"spin-loading-wrap"},Cr.createElement(u.Spin,{className:"spin-loading"})))};var Rr=f(724),Nr={};Nr.styleTagTransform=ue(),Nr.setAttributes=ae(),Nr.insert=re().bind(null,"head"),Nr.domAPI=te(),Nr.insertStyleElement=ce();Z()(Rr.c,Nr);Rr.c&&Rr.c.locals&&Rr.c.locals;var Dr=f(496),Ur={lon:120.168893,lat:30.225404,addr:"浙江省杭州市上城区南星街道杭州西湖风景名胜区"};function Fr(e){var t=e.mode,n=void 0===t?"dialog":t,a=e.layout,i=void 0===a?"ver":a,l=e.hasSearch,s=void 0===l||l,f=e.isObjectRes,p=void 0===f||f,d=e.isAutoFixAddr,v=void 0!==d&&d,m=e.changeMode,y=void 0===m?"click":m,g=e.lonKey,b=void 0===g?"longitude":g,w=e.latKey,O=void 0===w?"latitude":w,k=e.addrKey,x=void 0===k?"address":k,P=e.value,j=e.isAutoSearch,E=void 0===j||j,S=e.modalConf,_=void 0===S?{}:S,M=(0,c.useField)()||{},C=(0,c.useFieldSchema)()||{},T=(0,o.useRef)(),I=(0,o.useRef)(Ur),L=A((0,o.useState)(!1),2),R=L[0],N=L[1];function D(){N(!1)}function U(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:I.current)||I.current,n=r(r(r({},b,t.lon),O,t.lat),x,t.addr);if(e.onChange&&e.onChange(n),!1===p)if(M.parent){if(M.parent&&C.parent){var o=Jn(M);Object.keys(n).forEach((function(e){o[e]=n[e]}))}}else M.form.setValues(n)}function F(e){I.current=e}var K="hor"===i||"hor-reverse"===i,q={disabled:e.disabled,readOnly:e.readOnly,mode:null!=n?n:"dialog",layout:null!=i?i:"ver",isHor:K,hasSearch:null==s||s,isObjectRes:null==p||p,isAutoFixAddr:null!=v&&v,changeMode:null!=y?y:"click",lonKey:null!=b?b:"longitude",latKey:null!=O?O:"latitude",addrKey:null!=x?x:"address",value:P,isAutoSearch:null==E||E,defaultLocation:Ur,pickerIcon:e.pickerIcon,pickerIconUrl:e.pickerIconUrl};return Dr.createElement("div",{className:"location-picker"},"show"===n?Dr.createElement(Lr,h({},q,{visible:R,setPickInfo:function(e){F(e),U(e)},layout:i})):Dr.createElement(Dr.Fragment,null,Dr.createElement(Hn,h({},q,{onShow:function(){!T.current&&N(!0),N(!0)}})),Dr.createElement(u.Modal,{className:"location-picker-modal",title:"地图选点",onCancel:D,onOk:function(){U(),D()},visible:R,width:null!=_&&_.width||K?"1024px":"720px"},Dr.createElement(Lr,h({},q,{visible:R,setPickInfo:F,layout:i})))))}jr().then((function(e){var t=e.coords,n=void 0===t?{}:t;Ur.lon=n.longitude,Ur.lat=n.latitude})).catch((function(e){console.warn("Error getCurrentPosition e: ",e)}));var Kr=f(468),qr={};qr.styleTagTransform=ue(),qr.setAttributes=ae(),qr.insert=re().bind(null,"head"),qr.domAPI=te(),qr.insertStyleElement=ce();Z()(Kr.c,qr);Kr.c&&Kr.c.locals&&Kr.c.locals;function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vr={Form:l.Form,FormItem:l.FormItem,DatePicker:l.DatePicker,Checkbox:l.Checkbox,Cascader:l.Cascader,Editable:l.Editable,Input:l.Input,NumberPicker:l.NumberPicker,Switch:l.Switch,Password:l.Password,PreviewText:l.PreviewText,Radio:l.Radio,Reset:l.Reset,Select:l.Select,Space:l.Space,Submit:l.Submit,TimePicker:l.TimePicker,Transfer:l.Transfer,TreeSelect:l.TreeSelect,FormGrid:l.FormGrid,FormLayout:l.FormLayout,FormTab:l.FormTab,FormCollapse:l.FormCollapse,ArrayTable:l.ArrayTable,ArrayCards:l.ArrayCards};const Gr=(0,o.forwardRef)((function(t,n){var r,s=(0,o.useCallback)((0,c.createSchemaField)({components:zr(zr({Space:l.Space,FormGrid:l.FormGrid,FormLayout:l.FormLayout,FormTab:l.FormTab,FormCollapse:l.FormCollapse,ArrayTable:l.ArrayTable,ArrayCards:l.ArrayCards,FormItem:l.FormItem,DatePicker:l.DatePicker,Checkbox:l.Checkbox,Cascader:l.Cascader,Editable:l.Editable,Input:l.Input,NumberPicker:l.NumberPicker,Switch:l.Switch,Password:l.Password,PreviewText:l.PreviewText,Radio:l.Radio,Reset:l.Reset,Select:l.Select,Submit:l.Submit,TimePicker:l.TimePicker,Transfer:l.Transfer,TreeSelect:l.TreeSelect,Card:u.Card,Slider:u.Slider,Rate:u.Rate},e),t.components),scope:zr({},t.schemaScope)}),[]),f=(0,o.useMemo)((function(){return(0,i.createForm)(zr({initialValues:t.initialValues,readOnly:t.readOnly,disabled:t.disabled},t.formOptions||{}))}),[]);(0,o.useImperativeHandle)(n,(function(){return{formRender:f}})),(0,o.useEffect)((function(){t.init&&t.init(f)}),[]);var p=(0,o.useMemo)((function(){var e=t.Slots;return"function"==typeof e?a().createElement(e,null):"function"==typeof(null==e?void 0:e.footer)?a().createElement(e.footer,null):void 0}),[t.Slots]),d=zr({},null===(r=t.schema)||void 0===r?void 0:r.form);return a().createElement(we.Provider,{value:t},a().createElement(l.Form,{className:"form-render ".concat(t.className),layout:t.layout,form:f,labelCol:t.schema.form.labelCol,wrapperCol:t.schema.form.wrapperCol,onAutoSubmit:function(e){t.onSubmit(e)},onAutoSubmitFailed:function(e){t.onSubmitFailed(e)}},a().createElement(l.FormLayout,d,a().createElement(s,{schema:t.schema.schema}),a().createElement("div",{className:"form-render-footer xxm"},p))))}))})(),p})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/form-render",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "",
5
5
  "main": "lib",
6
6
  "scripts": {
@@ -62,7 +62,7 @@ export const ModalContent = (props) => {
62
62
  readOnly,
63
63
  } = props;
64
64
 
65
- const field: any = useField();
65
+ const field: any = useField() || {};
66
66
 
67
67
  const mapUtilsRef = useRef<MapUtils>();
68
68
 
@@ -24,7 +24,7 @@ export const ResInfo = (props) => {
24
24
  pickerIcon,
25
25
  pickerIconUrl,
26
26
  } = props || {};
27
- const field: any = useField();
27
+ const field: any = useField() || {};
28
28
 
29
29
  // 数据格式转为内部格式,方便存取
30
30
  const formatVal = useMemo(
@@ -70,8 +70,8 @@ export function LocationPicker(props) {
70
70
  isAutoSearch = true,
71
71
  modalConf = {},
72
72
  } = props;
73
- const field: any = useField();
74
- const fieldSchema = useFieldSchema();
73
+ const field: any = useField() || {};
74
+ const fieldSchema: any = useFieldSchema() || {};
75
75
 
76
76
  const mapUtilsRef = useRef<MapUtils>();
77
77
  const pickInfoRef = useRef(defaultLocation);