@kne-components/components-core 0.4.12 → 0.4.13

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.
Files changed (136) hide show
  1. package/build/asset-manifest.json +95 -95
  2. package/build/index.html +1 -1
  3. package/build/remoteEntry.js +1 -1
  4. package/build/remoteEntry.js.map +1 -1
  5. package/build/static/css/1996.b4f38679.chunk.css +2 -0
  6. package/build/static/css/{1996.b1436cc8.chunk.css.map → 1996.b4f38679.chunk.css.map} +1 -1
  7. package/build/static/css/2004.99fe0683.chunk.css +2 -0
  8. package/build/static/css/{2004.c035d26e.chunk.css.map → 2004.99fe0683.chunk.css.map} +1 -1
  9. package/build/static/css/206.05852c5d.chunk.css +2 -0
  10. package/build/static/css/206.05852c5d.chunk.css.map +1 -0
  11. package/build/static/css/254.10beca73.chunk.css +2 -0
  12. package/build/static/css/{254.a12729ab.chunk.css.map → 254.10beca73.chunk.css.map} +1 -1
  13. package/build/static/css/2628.21fc08fe.chunk.css +2 -0
  14. package/build/static/css/{2628.3188c686.chunk.css.map → 2628.21fc08fe.chunk.css.map} +1 -1
  15. package/build/static/css/3404.67a9e351.chunk.css +2 -0
  16. package/build/static/css/{3404.b9717d24.chunk.css.map → 3404.67a9e351.chunk.css.map} +1 -1
  17. package/build/static/css/3652.e8f881ae.chunk.css +2 -0
  18. package/build/static/css/{3652.86f3b6bb.chunk.css.map → 3652.e8f881ae.chunk.css.map} +1 -1
  19. package/build/static/css/3771.53c92dd6.chunk.css +2 -0
  20. package/build/static/css/{3771.446d3735.chunk.css.map → 3771.53c92dd6.chunk.css.map} +1 -1
  21. package/build/static/css/{3790.d1b530a4.chunk.css → 3790.0bd5dcca.chunk.css} +2 -2
  22. package/build/static/css/{3790.d1b530a4.chunk.css.map → 3790.0bd5dcca.chunk.css.map} +1 -1
  23. package/build/static/css/{4277.3194c080.chunk.css → 4277.1e6d3ee3.chunk.css} +2 -2
  24. package/build/static/css/{4277.3194c080.chunk.css.map → 4277.1e6d3ee3.chunk.css.map} +1 -1
  25. package/build/static/css/4741.8c1069d9.chunk.css +2 -0
  26. package/build/static/css/{4741.5a84abe3.chunk.css.map → 4741.8c1069d9.chunk.css.map} +1 -1
  27. package/build/static/css/4832.01d63eb8.chunk.css +2 -0
  28. package/build/static/css/4832.01d63eb8.chunk.css.map +1 -0
  29. package/build/static/css/5195.5df3263a.chunk.css +2 -0
  30. package/build/static/css/5195.5df3263a.chunk.css.map +1 -0
  31. package/build/static/css/6763.dd66ef2f.chunk.css +2 -0
  32. package/build/static/css/{6763.42d76eb7.chunk.css.map → 6763.dd66ef2f.chunk.css.map} +1 -1
  33. package/build/static/css/6980.5f0b0cb2.chunk.css +12 -0
  34. package/build/static/css/{6980.f5424a2c.chunk.css.map → 6980.5f0b0cb2.chunk.css.map} +1 -1
  35. package/build/static/css/7227.748fb9a1.chunk.css +2 -0
  36. package/build/static/css/{7227.e83fd744.chunk.css.map → 7227.748fb9a1.chunk.css.map} +1 -1
  37. package/build/static/css/760.aed85987.chunk.css +2 -0
  38. package/build/static/css/{760.7efd69c3.chunk.css.map → 760.aed85987.chunk.css.map} +1 -1
  39. package/build/static/css/8593.44f6d410.chunk.css +2 -0
  40. package/build/static/css/{8593.df922b83.chunk.css.map → 8593.44f6d410.chunk.css.map} +1 -1
  41. package/build/static/css/9556.e0c6c7f6.chunk.css +2 -0
  42. package/build/static/css/{9556.3024763d.chunk.css.map → 9556.e0c6c7f6.chunk.css.map} +1 -1
  43. package/build/static/css/9772.94f5f083.chunk.css +2 -0
  44. package/build/static/css/{9772.e21859cf.chunk.css.map → 9772.94f5f083.chunk.css.map} +1 -1
  45. package/build/static/js/{1014.ac7e07be.chunk.js → 1014.e5b4dfc7.chunk.js} +1 -1
  46. package/build/static/js/{1996.1779e813.chunk.js → 1996.3a236927.chunk.js} +2 -2
  47. package/build/static/js/{1996.1779e813.chunk.js.map → 1996.3a236927.chunk.js.map} +1 -1
  48. package/build/static/js/{2004.182c7c0f.chunk.js → 2004.f8dd7cdf.chunk.js} +3 -3
  49. package/build/static/js/{2004.182c7c0f.chunk.js.map → 2004.f8dd7cdf.chunk.js.map} +1 -1
  50. package/build/static/js/206.6d11e36b.chunk.js +2 -0
  51. package/build/static/js/{206.870edee0.chunk.js.map → 206.6d11e36b.chunk.js.map} +1 -1
  52. package/build/static/js/{2097.0567ed2b.chunk.js → 2097.cb0ebbbb.chunk.js} +2 -2
  53. package/build/static/js/{2097.0567ed2b.chunk.js.map → 2097.cb0ebbbb.chunk.js.map} +1 -1
  54. package/build/static/js/254.bb219d2f.chunk.js +2 -0
  55. package/build/static/js/{254.238ab8af.chunk.js.map → 254.bb219d2f.chunk.js.map} +1 -1
  56. package/build/static/js/{2628.13f2cd3d.chunk.js → 2628.f675039d.chunk.js} +2 -2
  57. package/build/static/js/{2628.13f2cd3d.chunk.js.map → 2628.f675039d.chunk.js.map} +1 -1
  58. package/build/static/js/{3404.1b947536.chunk.js → 3404.94f6275b.chunk.js} +3 -3
  59. package/build/static/js/{3404.1b947536.chunk.js.map → 3404.94f6275b.chunk.js.map} +1 -1
  60. package/build/static/js/{3652.5d13bc4c.chunk.js → 3652.e5a28adc.chunk.js} +2 -2
  61. package/build/static/js/{3652.5d13bc4c.chunk.js.map → 3652.e5a28adc.chunk.js.map} +1 -1
  62. package/build/static/js/{3771.60b0504e.chunk.js → 3771.998da4f9.chunk.js} +2 -2
  63. package/build/static/js/{3771.60b0504e.chunk.js.map → 3771.998da4f9.chunk.js.map} +1 -1
  64. package/build/static/js/{3790.72c7a465.chunk.js → 3790.effe004b.chunk.js} +2 -2
  65. package/build/static/js/{3790.72c7a465.chunk.js.map → 3790.effe004b.chunk.js.map} +1 -1
  66. package/build/static/js/3856.d51e240b.chunk.js +2 -0
  67. package/build/static/js/{3856.29d5e528.chunk.js.map → 3856.d51e240b.chunk.js.map} +1 -1
  68. package/build/static/js/4277.c0f74e50.chunk.js +2 -0
  69. package/build/static/js/{4277.de810104.chunk.js.map → 4277.c0f74e50.chunk.js.map} +1 -1
  70. package/build/static/js/4474.8524d82a.chunk.js +2 -0
  71. package/build/static/js/{4474.dfb83cf2.chunk.js.map → 4474.8524d82a.chunk.js.map} +1 -1
  72. package/build/static/js/4832.e478f6cf.chunk.js +2 -0
  73. package/build/static/js/{4832.cf55c52c.chunk.js.map → 4832.e478f6cf.chunk.js.map} +1 -1
  74. package/build/static/js/5195.c7f2e172.chunk.js +2 -0
  75. package/build/static/js/{5195.9ac8caa0.chunk.js.map → 5195.c7f2e172.chunk.js.map} +1 -1
  76. package/build/static/js/{6183.23d57d24.chunk.js → 6183.9f9ecead.chunk.js} +2 -2
  77. package/build/static/js/6183.9f9ecead.chunk.js.map +1 -0
  78. package/build/static/js/{6454.d8a2bc1e.chunk.js → 6454.1dea34c5.chunk.js} +1 -1
  79. package/build/static/js/{6617.94f51cff.chunk.js → 6617.1cb118cb.chunk.js} +1 -1
  80. package/build/static/js/{6763.97f4747b.chunk.js → 6763.c0930523.chunk.js} +2 -2
  81. package/build/static/js/{6763.97f4747b.chunk.js.map → 6763.c0930523.chunk.js.map} +1 -1
  82. package/build/static/js/{6980.5b98fb8f.chunk.js → 6980.eb0ca6af.chunk.js} +2 -2
  83. package/build/static/js/6980.eb0ca6af.chunk.js.map +1 -0
  84. package/build/static/js/7227.6e355494.chunk.js +3 -0
  85. package/build/static/js/{7227.65b21900.chunk.js.map → 7227.6e355494.chunk.js.map} +1 -1
  86. package/build/static/js/{7338.0c458623.chunk.js → 7338.18d781f2.chunk.js} +2 -2
  87. package/build/static/js/{7338.0c458623.chunk.js.map → 7338.18d781f2.chunk.js.map} +1 -1
  88. package/build/static/js/{760.bc8726da.chunk.js → 760.0e9d9610.chunk.js} +2 -2
  89. package/build/static/js/{760.bc8726da.chunk.js.map → 760.0e9d9610.chunk.js.map} +1 -1
  90. package/build/static/js/8593.c2266549.chunk.js +2 -0
  91. package/build/static/js/{8593.a7cfca38.chunk.js.map → 8593.c2266549.chunk.js.map} +1 -1
  92. package/build/static/js/9556.e0e3aa34.chunk.js +3 -0
  93. package/build/static/js/{9556.bd02b06f.chunk.js.map → 9556.e0e3aa34.chunk.js.map} +1 -1
  94. package/build/static/js/{9772.8953d82a.chunk.js → 9772.2e6315a6.chunk.js} +2 -2
  95. package/build/static/js/9772.2e6315a6.chunk.js.map +1 -0
  96. package/build/static/js/{main.83f21429.js → main.d69b3bad.js} +2 -2
  97. package/build/static/js/{main.83f21429.js.map → main.d69b3bad.js.map} +1 -1
  98. package/package.json +2 -2
  99. package/build/static/css/1996.b1436cc8.chunk.css +0 -2
  100. package/build/static/css/2004.c035d26e.chunk.css +0 -2
  101. package/build/static/css/206.c2648b4c.chunk.css +0 -2
  102. package/build/static/css/206.c2648b4c.chunk.css.map +0 -1
  103. package/build/static/css/254.a12729ab.chunk.css +0 -2
  104. package/build/static/css/2628.3188c686.chunk.css +0 -2
  105. package/build/static/css/3404.b9717d24.chunk.css +0 -2
  106. package/build/static/css/3652.86f3b6bb.chunk.css +0 -2
  107. package/build/static/css/3771.446d3735.chunk.css +0 -2
  108. package/build/static/css/4741.5a84abe3.chunk.css +0 -2
  109. package/build/static/css/4832.ee29b4d5.chunk.css +0 -2
  110. package/build/static/css/4832.ee29b4d5.chunk.css.map +0 -1
  111. package/build/static/css/5195.9d6bb120.chunk.css +0 -2
  112. package/build/static/css/5195.9d6bb120.chunk.css.map +0 -1
  113. package/build/static/css/6763.42d76eb7.chunk.css +0 -2
  114. package/build/static/css/6980.f5424a2c.chunk.css +0 -12
  115. package/build/static/css/7227.e83fd744.chunk.css +0 -2
  116. package/build/static/css/760.7efd69c3.chunk.css +0 -2
  117. package/build/static/css/8593.df922b83.chunk.css +0 -2
  118. package/build/static/css/9556.3024763d.chunk.css +0 -2
  119. package/build/static/css/9772.e21859cf.chunk.css +0 -2
  120. package/build/static/js/206.870edee0.chunk.js +0 -2
  121. package/build/static/js/254.238ab8af.chunk.js +0 -2
  122. package/build/static/js/3856.29d5e528.chunk.js +0 -2
  123. package/build/static/js/4277.de810104.chunk.js +0 -2
  124. package/build/static/js/4474.dfb83cf2.chunk.js +0 -2
  125. package/build/static/js/4832.cf55c52c.chunk.js +0 -2
  126. package/build/static/js/5195.9ac8caa0.chunk.js +0 -2
  127. package/build/static/js/6183.23d57d24.chunk.js.map +0 -1
  128. package/build/static/js/6980.5b98fb8f.chunk.js.map +0 -1
  129. package/build/static/js/7227.65b21900.chunk.js +0 -3
  130. package/build/static/js/8593.a7cfca38.chunk.js +0 -2
  131. package/build/static/js/9556.bd02b06f.chunk.js +0 -3
  132. package/build/static/js/9772.8953d82a.chunk.js.map +0 -1
  133. /package/build/static/js/{2004.182c7c0f.chunk.js.LICENSE.txt → 2004.f8dd7cdf.chunk.js.LICENSE.txt} +0 -0
  134. /package/build/static/js/{3404.1b947536.chunk.js.LICENSE.txt → 3404.94f6275b.chunk.js.LICENSE.txt} +0 -0
  135. /package/build/static/js/{7227.65b21900.chunk.js.LICENSE.txt → 7227.6e355494.chunk.js.LICENSE.txt} +0 -0
  136. /package/build/static/js/{9556.bd02b06f.chunk.js.LICENSE.txt → 9556.e0e3aa34.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ (self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2723,2908,4277],{17342:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var s=i(34581),l=i.n(s);i(46733);const n=l()},19449:(e,t,i)=>{var s=i(94710),l=i(32952),n=i(9096),a=i(54052);e.exports=function(e,t){return function(i,o){var r=a(i)?s:l,c=t?t():{};return r(i,e,n(o,2),c)}}},32520:(e,t,i)=>{var s=i(75816),l=i(9096),n=i(99140),a=Math.max;e.exports=function(e,t,i){var o=null==e?0:e.length;if(!o)return-1;var r=null==i?0:n(i);return r<0&&(r=a(o+r,0)),s(e,l(t,3),r)}},32952:(e,t,i)=>{var s=i(45652);e.exports=function(e,t,i,l){return s(e,function(e,s,n){t(l,e,i(e),n)}),l}},39835:(e,t,i)=>{var s=i(71775),l=i(19449),n=Object.prototype.hasOwnProperty,a=l(function(e,t,i){n.call(e,i)?e[i].push(t):s(e,i,[t])});e.exports=a},45652:(e,t,i)=>{var s=i(94664),l=i(76516)(s);e.exports=l},46733:()=>{},75816:e=>{e.exports=function(e,t,i,s){for(var l=e.length,n=i+(s?1:-1);s?n--:++n<l;)if(t(e[n],n,e))return n;return-1}},76516:(e,t,i)=>{var s=i(6571);e.exports=function(e,t){return function(i,l){if(null==i)return i;if(!s(i))return e(i,l);for(var n=i.length,a=t?n:-1,o=Object(i);(t?a--:++a<n)&&!1!==l(o[a],a,o););return i}}},82723:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s.Content});var s=i(22436)},85855:(e,t,i)=>{e.exports=i(96483)},89384:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>w});var s=i(55199),l=i(53984),n=i.n(l),a=i(83136),o=i.n(a),r=i(17342),c=i(63743),d=i(64671),_=i(82723);const u={notification:"style_notification__Vv-MM__DHs+D",list:"style_list__l8KOo__DHs+D",header:"style_header__3dcv8__DHs+D",item:"style_item__d92RS__DHs+D","item-box":"style_item-box__dd-Lk__DHs+D","index-1":"style_index-1__f97L0__DHs+D","index-2":"style_index-2__04vAw__DHs+D","item-box-main":"style_item-box-main__lnSak__DHs+D","item-title":"style_item-title__mArMd__DHs+D","level-high":"style_level-high__Uys7Y__DHs+D","level-middle":"style_level-middle__EewyC__DHs+D","level-low":"style_level-low__8kVyL__DHs+D","title-icon":"style_title-icon__1EoAG__DHs+D","item-subtitle":"style_item-subtitle__xeFJs__DHs+D","close-btn":"style_close-btn__7qpG3__DHs+D","is-loading":"style_is-loading__upVL+__DHs+D","item-content":"style_item-content__8MlsG__DHs+D","link-outer":"style_link-outer__kegyZ__DHs+D",link:"style_link__F2CO-__DHs+D","is-last-item":"style_is-last-item__MytRl__DHs+D"};var v=i(73884),h=i(39835),m=i.n(h),x=i(85855),p=i.n(x),f=i(96604),g=i.n(f),y=i(81014),j=i(32520),D=i.n(j),b=i(70579);const k=["high","middle","low"],H=e=>{let{level:t="low",title:i,groupLength:l,subtitle:n,content:a,link:r,id:v,children:h,className:m}=e;const{setGlobal:x}=(0,c.useGlobalContext)("notification"),{apis:p,ajax:f}=(0,c.usePreset)(),{isLoading:j,callback:k}=(0,y.useLoading)(async()=>{var e;const{data:t}=null!==p&&void 0!==p&&null!==(e=p.notification)&&void 0!==e&&e.read?await f(Object.assign({},p.notification.read,{data:{ids:[v]}})):{data:{code:0}};0===t.code&&x(e=>{const t=((null===e||void 0===e?void 0:e.list)||[]).slice(0),i=D()(t,e=>v===e.id);return i>-1&&t.splice(i,1),Object.assign({},e,{list:t})})});return(0,b.jsxs)("div",{className:o()(u.item,m),style:{"--group-length":Math.min(l,3)||1},children:[l&&l>1&&g()(1,Math.min(l,3)).reverse().map(e=>(0,b.jsx)("div",{className:o()(u["item-box"],u[`index-${e}`])},e)),(0,b.jsxs)("div",{className:o()(u["item-box"],u["item-box-main"]),children:[(0,b.jsxs)("div",{className:o()(u["item-title"],u[`level-${t}`]),children:[(0,b.jsx)(d.default,{className:u["title-icon"],type:"high"===t?"icon-tishi":"icon-daiwochuli"}),(0,b.jsx)(s.Typography.Text,{ellipsis:!0,children:i})]}),(0,b.jsxs)("div",{className:u["item-content"],children:[(0,b.jsxs)("div",{className:u["item-subtitle"],children:[(0,b.jsx)(s.Typography.Text,{ellipsis:!0,children:n||""}),(0,b.jsx)(d.default,{className:o()(u["close-btn"],{[u["is-loading"]]:j}),type:"icon-close-thin",onClick:()=>{j||v&&k()}})]}),Array.isArray(a)?(0,b.jsx)(_.default,{list:a,labelAlign:"auto",size:"small"}):h]}),r&&(0,b.jsx)("div",{className:u["link-outer"],children:(0,b.jsx)(y.default,{className:u.link,size:"small",onClick:async()=>{var e;const{data:t}=null!==p&&void 0!==p&&null!==(e=p.notification)&&void 0!==e&&e.read?await f(Object.assign({},p.notification.read,{data:{ids:[v]}})):{data:{code:0}};0===t.code&&window.open(r)},children:"\u67e5\u770b\u8be6\u60c5"})})]})]})},w=e=>{let{itemClassName:t}=e;const{global:i,setGlobal:l}=(0,c.useGlobalContext)("notification"),a=(0,v.useRef)(),{apis:d,ajax:_}=(0,c.usePreset)(),[h,x]=(0,v.useState)(32);(0,v.useEffect)(()=>{var e;a.current&&x(null===(e=a.current)||void 0===e?void 0:e.clientHeight)},[]);const{list:f,expand:g}=Object.assign({},{expand:!1,list:[]},i),j=(0,v.useMemo)(()=>{const e=m()(f,e=>e.level||"low");return k.map(t=>e[t]||[])},[f]);return 0===f.length?null:(0,b.jsxs)("div",{className:o()({},u.notification,"notification"),style:{"--head-option-height":`${h}px`},children:[(0,b.jsx)("div",{ref:a,children:(0,b.jsxs)(s.Row,{justify:"end",wrap:!1,className:u.header,gutter:8,children:[j.some(e=>e.length>1)&&(0,b.jsx)(s.Col,{children:(0,b.jsx)(s.Button,{size:"small",onClick:()=>{l(Object.assign({},i,{expand:!g}))},children:g?"\u5168\u90e8\u6298\u53e0":"\u5168\u90e8\u5c55\u5f00"})}),(0,b.jsx)(s.Col,{children:(0,b.jsx)(y.default,{type:"primary",size:"small",onClick:async()=>{var e;const{data:t}=null!==d&&void 0!==d&&null!==(e=d.notification)&&void 0!==e&&e.read?await _(Object.assign({},d.notification.read,{data:{ids:f.map(e=>e.id).filter(e=>!!e)}})):{data:{code:0}};0===t.code&&l(Object.assign({},i,{list:[]}))},children:"\u5168\u90e8\u6e05\u9664"})})]})}),(0,b.jsx)(r.A,{className:u.list,children:(0,b.jsx)(n(),{leaveReverse:!0,duration:200,interval:20,children:j.filter(e=>e&&e.length>0).map((e,i)=>{var s;if(g)return e.map((t,s)=>{var l;return t&&(0,b.jsx)("div",{children:(0,b.jsx)(H,{...Object.assign({},t),className:o()({[u["is-last-item"]]:+i+1===Math.min(null===(l=j.filter(e=>e&&e.length))||void 0===l?void 0:l.length,3)&&s===(null===e||void 0===e?void 0:e.length)-1})})},`group-${i}-${s}`)});const l=p()(e);return(0,b.jsx)("div",{children:(0,b.jsx)(H,{...Object.assign({},l),groupLength:e.length,className:o()({[u["is-last-item"]]:(null===j||void 0===j?void 0:j.length)&&+i+1===Math.min(null===(s=j.filter(e=>e&&e.length))||void 0===s?void 0:s.length,3)},t)})},`group-${i}-0`)})})})]})}},94710:e=>{e.exports=function(e,t,i,s){for(var l=-1,n=null==e?0:e.length;++l<n;){var a=e[l];t(s,a,i(a),e)}return s}},96483:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},99140:(e,t,i)=>{var s=i(37303);e.exports=function(e){var t=s(e),i=t%1;return t===t?i?t-i:t:0}}}]);
2
+ //# sourceMappingURL=4277.c0f74e50.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/4277.de810104.chunk.js","mappings":"+MAGA,QAAeA,G,kBCHf,IAAIC,EAAkBC,EAAQ,OAC1BC,EAAiBD,EAAQ,OACzBE,EAAeF,EAAQ,MACvBG,EAAUH,EAAQ,OAmBtBI,EAAOC,QATP,SAA0BC,EAAQC,GAChC,OAAO,SAASC,EAAYC,GAC1B,IAAIC,EAAOP,EAAQK,GAAcT,EAAkBE,EAC/CU,EAAcJ,EAAcA,IAAgB,CAAC,EAEjD,OAAOG,EAAKF,EAAYF,EAAQJ,EAAaO,EAAU,GAAIE,EAC7D,CACF,C,kBCpBA,IAAIC,EAAgBZ,EAAQ,OACxBE,EAAeF,EAAQ,MACvBa,EAAYb,EAAQ,OAGpBc,EAAYC,KAAKC,IAiDrBZ,EAAOC,QAZP,SAAmBY,EAAOC,EAAWC,GACnC,IAAIC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACvC,IAAKA,EACH,OAAQ,EAEV,IAAIC,EAAqB,MAAbF,EAAoB,EAAIN,EAAUM,GAI9C,OAHIE,EAAQ,IACVA,EAAQP,EAAUM,EAASC,EAAO,IAE7BT,EAAcK,EAAOf,EAAagB,EAAW,GAAIG,EAC1D,C,kBCpDA,IAAIC,EAAWtB,EAAQ,OAoBvBI,EAAOC,QAPP,SAAwBG,EA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ar.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/findIndex.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/first.js","webpack://@kne-components/components-core/./src/components/Notification/style.module.scss?659e","components/Notification/index.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/head.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","module.exports = require('./head');\n","// extracted by mini-css-extract-plugin\nexport default {\"notification\":\"style_notification__Vv-MM__RltKb\",\"list\":\"style_list__l8KOo__RltKb\",\"header\":\"style_header__3dcv8__RltKb\",\"item\":\"style_item__d92RS__RltKb\",\"item-box\":\"style_item-box__dd-Lk__RltKb\",\"index-1\":\"style_index-1__f97L0__RltKb\",\"index-2\":\"style_index-2__04vAw__RltKb\",\"item-box-main\":\"style_item-box-main__lnSak__RltKb\",\"item-title\":\"style_item-title__mArMd__RltKb\",\"level-high\":\"style_level-high__Uys7Y__RltKb\",\"level-middle\":\"style_level-middle__EewyC__RltKb\",\"level-low\":\"style_level-low__8kVyL__RltKb\",\"title-icon\":\"style_title-icon__1EoAG__RltKb\",\"item-subtitle\":\"style_item-subtitle__xeFJs__RltKb\",\"close-btn\":\"style_close-btn__7qpG3__RltKb\",\"is-loading\":\"style_is-loading__upVL+__RltKb\",\"item-content\":\"style_item-content__8MlsG__RltKb\",\"link-outer\":\"style_link-outer__kegyZ__RltKb\",\"link\":\"style_link__F2CO-__RltKb\",\"is-last-item\":\"style_is-last-item__MytRl__RltKb\"};","import {Row, Col, Button, Typography} from \"antd\";\nimport QueueAnim from \"rc-queue-anim\";\nimport classnames from \"classnames\";\nimport SimpleBar from \"@common/components/SimpleBar\";\nimport {useGlobalContext, usePreset} from \"@components/Global\";\nimport Icon from \"@components/Icon\";\nimport Content from \"@components/Content\";\nimport style from \"./style.module.scss\";\nimport {useMemo, useRef, useState, useEffect} from \"react\";\nimport groupBy from \"lodash/groupBy\";\nimport first from \"lodash/first\";\nimport range from \"lodash/range\";\nimport LoadingButton, {useLoading} from \"@components/LoadingButton\";\nimport findIndex from \"lodash/findIndex\";\n\nconst LEVEL = [\"high\", \"middle\", \"low\"];\n\nconst NotificationItem = ({\n level = \"low\", title, groupLength, subtitle, content, link, id, children, className,\n }) => {\n const {setGlobal} = useGlobalContext(\"notification\");\n const {apis, ajax} = usePreset();\n const {isLoading, callback} = useLoading(async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n\n if (resData.code === 0) {\n setGlobal((notification) => {\n const newList = (notification?.list || []).slice(0);\n const index = findIndex(newList, (item) => id === item.id);\n if (index > -1) {\n newList.splice(index, 1);\n }\n return Object.assign({}, notification, {list: newList});\n });\n }\n });\n return (<div\n className={classnames(style[\"item\"], className)}\n style={{\"--group-length\": Math.min(groupLength, 3) || 1}}\n >\n {groupLength && groupLength > 1 && range(1, Math.min(groupLength, 3))\n .reverse()\n .map((number) => (<div\n className={classnames(style[\"item-box\"], style[`index-${number}`])}\n key={number}\n />))}\n <div className={classnames(style[\"item-box\"], style[\"item-box-main\"])}>\n <div\n className={classnames(style[\"item-title\"], style[`level-${level}`])}\n >\n <Icon\n className={style[\"title-icon\"]}\n type={level === \"high\" ? \"icon-tishi\" : \"icon-daiwochuli\"}\n />\n <Typography.Text ellipsis>{title}</Typography.Text>\n </div>\n <div className={style[\"item-content\"]}>\n <div className={style[\"item-subtitle\"]}>\n <Typography.Text ellipsis>{subtitle || \"\"}</Typography.Text>\n <Icon\n className={classnames(style[\"close-btn\"], {\n [style[\"is-loading\"]]: isLoading,\n })}\n type=\"icon-close-thin\"\n onClick={() => {\n if (isLoading) {\n return;\n }\n\n if (!id) {\n return;\n }\n\n callback();\n }}\n />\n </div>\n {Array.isArray(content) ? (<Content list={content} labelAlign=\"auto\" size=\"small\"/>) : (children)}\n </div>\n {link && (<div className={style[\"link-outer\"]}>\n <LoadingButton\n className={style[\"link\"]}\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n window.open(link);\n }\n }}\n >\n 查看详情\n </LoadingButton>\n </div>)}\n </div>\n </div>);\n};\n\nconst Notification = ({itemClassName}) => {\n const {global: notification, setGlobal} = useGlobalContext(\"notification\");\n const headOptionRef = useRef();\n const {apis, ajax} = usePreset();\n const [headOptionHeight, setHeadOptionHeight] = useState(32);\n\n useEffect(() => {\n headOptionRef.current && setHeadOptionHeight(headOptionRef.current?.clientHeight);\n }, []);\n\n const {list, expand} = Object.assign({}, {\n expand: false, list: [],\n }, notification);\n\n const groupList = useMemo(() => {\n const group = groupBy(list, (item) => item.level || \"low\");\n return LEVEL.map((name) => group[name] || []);\n }, [list]);\n\n if (list.length === 0) {\n return null;\n }\n\n return (<div\n className={classnames({}, style[\"notification\"], \"notification\")}\n style={{\n \"--head-option-height\": `${headOptionHeight}px`,\n }}\n >\n <div ref={headOptionRef}>\n <Row justify=\"end\" wrap={false} className={style[\"header\"]} gutter={8}>\n {groupList.some((item) => item.length > 1) && (<Col>\n <Button\n size=\"small\"\n onClick={() => {\n setGlobal(Object.assign({}, notification, {expand: !expand}));\n }}\n >\n {expand ? \"全部折叠\" : \"全部展开\"}\n </Button>\n </Col>)}\n <Col>\n <LoadingButton\n type=\"primary\"\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {\n ids: list.map((item) => item.id).filter((id) => !!id),\n },\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n setGlobal(Object.assign({}, notification, {list: []}));\n }\n }}\n >\n 全部清除\n </LoadingButton>\n </Col>\n </Row>\n </div>\n <SimpleBar className={style[\"list\"]}>\n <QueueAnim leaveReverse duration={200} interval={20}>\n {groupList\n .filter((item) => item && item.length > 0)\n .map((item, groupKey) => {\n if (expand) {\n return item.map((notification, index) => notification && (\n <div key={`group-${groupKey}-${index}`}>\n <NotificationItem\n {...Object.assign({}, notification)}\n className={classnames({\n [style[\"is-last-item\"]]: +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3) && index === item?.length - 1,\n })}\n />\n </div>));\n }\n const firstItem = first(item);\n return (<div key={`group-${groupKey}-0`}>\n <NotificationItem\n {...Object.assign({}, firstItem)}\n groupLength={item.length}\n className={classnames({\n [style[\"is-last-item\"]]: groupList?.length && +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3),\n }, itemClassName)}\n />\n </div>);\n })}\n </QueueAnim>\n </SimpleBar>\n </div>);\n};\n\nexport default Notification;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n"],"names":["SimpleBar","arrayAggregator","require","baseAggregator","baseIteratee","isArray","module","exports","setter","initializer","collection","iteratee","func","accumulator","baseFindIndex","toInteger","nativeMax","Math","max","array","predicate","fromIndex","length","index","baseEach","value","key","baseAssignValue","createAggregator","hasOwnProperty","Object","prototype","groupBy","result","call","push","baseForOwn","createBaseEach","fromRight","isArrayLike","eachFunc","iterable","LEVEL","NotificationItem","_ref","level","title","groupLength","subtitle","content","link","id","children","className","setGlobal","useGlobalContext","apis","ajax","usePreset","isLoading","callback","useLoading","async","_apis$notification","data","resData","notification","read","assign","ids","code","newList","list","slice","findIndex","item","splice","_jsxs","classnames","style","min","range","reverse","map","number","_jsx","Icon","type","Typography","Text","ellipsis","onClick","Array","Content","labelAlign","size","LoadingButton","_apis$notification2","window","open","_ref2","itemClassName","global","headOptionRef","useRef","headOptionHeight","setHeadOptionHeight","useState","useEffect","_headOptionRef$curren","current","clientHeight","expand","groupList","useMemo","group","name","ref","Row","justify","wrap","gutter","some","Col","Button","_apis$notification3","filter","QueueAnim","leaveReverse","duration","interval","groupKey","_groupList$filter2","_groupList$filter","firstItem","first","undefined","toFinite","remainder"],"sourceRoot":""}
1
+ {"version":3,"file":"static/js/4277.c0f74e50.chunk.js","mappings":"+MAGA,QAAeA,G,kBCHf,IAAIC,EAAkBC,EAAQ,OAC1BC,EAAiBD,EAAQ,OACzBE,EAAeF,EAAQ,MACvBG,EAAUH,EAAQ,OAmBtBI,EAAOC,QATP,SAA0BC,EAAQC,GAChC,OAAO,SAASC,EAAYC,GAC1B,IAAIC,EAAOP,EAAQK,GAAcT,EAAkBE,EAC/CU,EAAcJ,EAAcA,IAAgB,CAAC,EAEjD,OAAOG,EAAKF,EAAYF,EAAQJ,EAAaO,EAAU,GAAIE,EAC7D,CACF,C,kBCpBA,IAAIC,EAAgBZ,EAAQ,OACxBE,EAAeF,EAAQ,MACvBa,EAAYb,EAAQ,OAGpBc,EAAYC,KAAKC,IAiDrBZ,EAAOC,QAZP,SAAmBY,E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C9C,CACA,OAAON,CACT,C,YCGAP,EAAOC,QAJP,SAAcY,GACZ,OAAQA,GAASA,EAAMG,OAAUH,EAAM,QAAKqH,CAC9C,C,kBCpBA,IAAIC,EAAWvI,EAAQ,OAmCvBI,EAAOC,QAPP,SAAmBkB,GACjB,IAAIQ,EAASwG,EAAShH,GAClBiH,EAAYzG,EAAS,EAEzB,OAAOA,IAAWA,EAAUyG,EAAYzG,EAASyG,EAAYzG,EAAU,CACzE,C","sources":["common/components/SimpleBar.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/findIndex.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/first.js","webpack://@kne-components/components-core/./src/components/Notification/style.module.scss?659e","components/Notification/index.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/head.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","module.exports = require('./head');\n","// extracted by mini-css-extract-plugin\nexport default {\"notification\":\"style_notification__Vv-MM__DHs+D\",\"list\":\"style_list__l8KOo__DHs+D\",\"header\":\"style_header__3dcv8__DHs+D\",\"item\":\"style_item__d92RS__DHs+D\",\"item-box\":\"style_item-box__dd-Lk__DHs+D\",\"index-1\":\"style_index-1__f97L0__DHs+D\",\"index-2\":\"style_index-2__04vAw__DHs+D\",\"item-box-main\":\"style_item-box-main__lnSak__DHs+D\",\"item-title\":\"style_item-title__mArMd__DHs+D\",\"level-high\":\"style_level-high__Uys7Y__DHs+D\",\"level-middle\":\"style_level-middle__EewyC__DHs+D\",\"level-low\":\"style_level-low__8kVyL__DHs+D\",\"title-icon\":\"style_title-icon__1EoAG__DHs+D\",\"item-subtitle\":\"style_item-subtitle__xeFJs__DHs+D\",\"close-btn\":\"style_close-btn__7qpG3__DHs+D\",\"is-loading\":\"style_is-loading__upVL+__DHs+D\",\"item-content\":\"style_item-content__8MlsG__DHs+D\",\"link-outer\":\"style_link-outer__kegyZ__DHs+D\",\"link\":\"style_link__F2CO-__DHs+D\",\"is-last-item\":\"style_is-last-item__MytRl__DHs+D\"};","import {Row, Col, Button, Typography} from \"antd\";\nimport QueueAnim from \"rc-queue-anim\";\nimport classnames from \"classnames\";\nimport SimpleBar from \"@common/components/SimpleBar\";\nimport {useGlobalContext, usePreset} from \"@components/Global\";\nimport Icon from \"@components/Icon\";\nimport Content from \"@components/Content\";\nimport style from \"./style.module.scss\";\nimport {useMemo, useRef, useState, useEffect} from \"react\";\nimport groupBy from \"lodash/groupBy\";\nimport first from \"lodash/first\";\nimport range from \"lodash/range\";\nimport LoadingButton, {useLoading} from \"@components/LoadingButton\";\nimport findIndex from \"lodash/findIndex\";\n\nconst LEVEL = [\"high\", \"middle\", \"low\"];\n\nconst NotificationItem = ({\n level = \"low\", title, groupLength, subtitle, content, link, id, children, className,\n }) => {\n const {setGlobal} = useGlobalContext(\"notification\");\n const {apis, ajax} = usePreset();\n const {isLoading, callback} = useLoading(async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n\n if (resData.code === 0) {\n setGlobal((notification) => {\n const newList = (notification?.list || []).slice(0);\n const index = findIndex(newList, (item) => id === item.id);\n if (index > -1) {\n newList.splice(index, 1);\n }\n return Object.assign({}, notification, {list: newList});\n });\n }\n });\n return (<div\n className={classnames(style[\"item\"], className)}\n style={{\"--group-length\": Math.min(groupLength, 3) || 1}}\n >\n {groupLength && groupLength > 1 && range(1, Math.min(groupLength, 3))\n .reverse()\n .map((number) => (<div\n className={classnames(style[\"item-box\"], style[`index-${number}`])}\n key={number}\n />))}\n <div className={classnames(style[\"item-box\"], style[\"item-box-main\"])}>\n <div\n className={classnames(style[\"item-title\"], style[`level-${level}`])}\n >\n <Icon\n className={style[\"title-icon\"]}\n type={level === \"high\" ? \"icon-tishi\" : \"icon-daiwochuli\"}\n />\n <Typography.Text ellipsis>{title}</Typography.Text>\n </div>\n <div className={style[\"item-content\"]}>\n <div className={style[\"item-subtitle\"]}>\n <Typography.Text ellipsis>{subtitle || \"\"}</Typography.Text>\n <Icon\n className={classnames(style[\"close-btn\"], {\n [style[\"is-loading\"]]: isLoading,\n })}\n type=\"icon-close-thin\"\n onClick={() => {\n if (isLoading) {\n return;\n }\n\n if (!id) {\n return;\n }\n\n callback();\n }}\n />\n </div>\n {Array.isArray(content) ? (<Content list={content} labelAlign=\"auto\" size=\"small\"/>) : (children)}\n </div>\n {link && (<div className={style[\"link-outer\"]}>\n <LoadingButton\n className={style[\"link\"]}\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n window.open(link);\n }\n }}\n >\n 查看详情\n </LoadingButton>\n </div>)}\n </div>\n </div>);\n};\n\nconst Notification = ({itemClassName}) => {\n const {global: notification, setGlobal} = useGlobalContext(\"notification\");\n const headOptionRef = useRef();\n const {apis, ajax} = usePreset();\n const [headOptionHeight, setHeadOptionHeight] = useState(32);\n\n useEffect(() => {\n headOptionRef.current && setHeadOptionHeight(headOptionRef.current?.clientHeight);\n }, []);\n\n const {list, expand} = Object.assign({}, {\n expand: false, list: [],\n }, notification);\n\n const groupList = useMemo(() => {\n const group = groupBy(list, (item) => item.level || \"low\");\n return LEVEL.map((name) => group[name] || []);\n }, [list]);\n\n if (list.length === 0) {\n return null;\n }\n\n return (<div\n className={classnames({}, style[\"notification\"], \"notification\")}\n style={{\n \"--head-option-height\": `${headOptionHeight}px`,\n }}\n >\n <div ref={headOptionRef}>\n <Row justify=\"end\" wrap={false} className={style[\"header\"]} gutter={8}>\n {groupList.some((item) => item.length > 1) && (<Col>\n <Button\n size=\"small\"\n onClick={() => {\n setGlobal(Object.assign({}, notification, {expand: !expand}));\n }}\n >\n {expand ? \"全部折叠\" : \"全部展开\"}\n </Button>\n </Col>)}\n <Col>\n <LoadingButton\n type=\"primary\"\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {\n ids: list.map((item) => item.id).filter((id) => !!id),\n },\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n setGlobal(Object.assign({}, notification, {list: []}));\n }\n }}\n >\n 全部清除\n </LoadingButton>\n </Col>\n </Row>\n </div>\n <SimpleBar className={style[\"list\"]}>\n <QueueAnim leaveReverse duration={200} interval={20}>\n {groupList\n .filter((item) => item && item.length > 0)\n .map((item, groupKey) => {\n if (expand) {\n return item.map((notification, index) => notification && (\n <div key={`group-${groupKey}-${index}`}>\n <NotificationItem\n {...Object.assign({}, notification)}\n className={classnames({\n [style[\"is-last-item\"]]: +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3) && index === item?.length - 1,\n })}\n />\n </div>));\n }\n const firstItem = first(item);\n return (<div key={`group-${groupKey}-0`}>\n <NotificationItem\n {...Object.assign({}, firstItem)}\n groupLength={item.length}\n className={classnames({\n [style[\"is-last-item\"]]: groupList?.length && +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3),\n }, itemClassName)}\n />\n </div>);\n })}\n </QueueAnim>\n </SimpleBar>\n </div>);\n};\n\nexport default Notification;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n"],"names":["SimpleBar","arrayAggregator","require","baseAggregator","baseIteratee","isArray","module","exports","setter","initializer","collection","iteratee","func","accumulator","baseFindIndex","toInteger","nativeMax","Math","max","array","predicate","fromIndex","length","index","baseEach","value","key","baseAssignValue","createAggregator","hasOwnProperty","Object","prototype","groupBy","result","call","push","baseForOwn","createBaseEach","fromRight","isArrayLike","eachFunc","iterable","LEVEL","NotificationItem","_ref","level","title","groupLength","subtitle","content","link","id","children","className","setGlobal","useGlobalContext","apis","ajax","usePreset","isLoading","callback","useLoading","async","_apis$notification","data","resData","notification","read","assign","ids","code","newList","list","slice","findIndex","item","splice","_jsxs","classnames","style","min","range","reverse","map","number","_jsx","Icon","type","Typography","Text","ellipsis","onClick","Array","Content","labelAlign","size","LoadingButton","_apis$notification2","window","open","_ref2","itemClassName","global","headOptionRef","useRef","headOptionHeight","setHeadOptionHeight","useState","useEffect","_headOptionRef$curren","current","clientHeight","expand","groupList","useMemo","group","name","ref","Row","justify","wrap","gutter","some","Col","Button","_apis$notification3","filter","QueueAnim","leaveReverse","duration","interval","groupKey","_groupList$filter2","_groupList$filter","firstItem","first","undefined","toFinite","remainder"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[330,4474],{330:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var n=s(29871),l=s.n(n),r={};for(const o in n)"default"!==o&&(r[o]=()=>n[o]);s.d(t,r),l().Fetch=n.FlexBoxFetch;const a=l()},1904:(e,t,s)=>{s.d(t,{A:()=>i,N:()=>d});var n=s(98434),l=s(43856);const{useOnChange:r,useDecorator:a}=n.hooks,o=e=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(l.AddressSelectField);o.Field=l.AddressSelectField,o.AddressEnum=l.AddressSelectField.AddressEnum,o.createAddressApi=l.AddressSelectField.createAddressApi,o.withAddressApi=l.AddressSelectField.withAddressApi;const i=o,d=e=>a(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label,inputPlaceholder:"\u8bf7\u8f93\u5165"+e.label},e))(l.AddressInputField);d.Field=l.AddressInputField},2196:(e,t,s)=>{s.d(t,{A:()=>m});var n=s(55199),l=s(73884),r=s(41381),a=s(330),o=s(68532),i=s(47094),d=s(83136),c=s.n(d),u=s(70579);const m=e=>{let{list:t=[],groupArgs:s,itemRender:d,column:m=2,gap:p,className:h,outer:g=(0,u.jsx)(r.default.Part,{}),children:f,..._}=e;const x=!(Number.isInteger(m)&&m>0),{ref:v,column:j}=(0,a.useFlexBox)(x?m:{}),y=(e,l)=>(0,u.jsx)(o.FormInfo,{list:t,column:e,groupArgs:s,itemRender:(e,t)=>"function"===typeof d?d(e,t):(0,u.jsx)(n.Col,{span:t.span,children:e}),children:(e,t)=>(0,u.jsx)(n.Row,{gutter:[p||24,0],className:c()({[i.A["column-not-layout"]]:l}),children:"function"===typeof f?f(e,t):e})});return(0,l.cloneElement)(g,Object.assign({},_,{className:c()(h,i.A["form-info"])}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{ref:v}),x?j?y(j.col):y(2,!0):y(m)]}))}},2842:(e,t,s)=>{s.d(t,{default:()=>l.a});s(2885);var n=s(22986),l=s.n(n);s.o(n,"PHONE_NUMBER_INPUT")&&s.d(t,{PHONE_NUMBER_INPUT:function(){return n.PHONE_NUMBER_INPUT}})},5995:(e,t,s)=>{s.d(t,{Ay:()=>d,Vl:()=>c,W6:()=>u});var n=s(3382),l=s(73025),r=s(55199),a=s(76995),o=s(47094),i=s(70579);const d=e=>(0,i.jsx)(n.default,{...(0,a.A)(Object.assign({},e,{className:o.A["form-modal"]}))}),c=()=>{const e=(0,n.useModal)();return t=>e((0,a.A)(Object.assign({},t,{className:o.A["form-modal"]})))},u=e=>{let{classNames:t,...s}=e;const n=c();if(!s.api){const{modalProps:e,...t}=s;return(0,i.jsx)(r.Button,{...t,onClick:()=>{n(e)}})}return(0,i.jsx)(l.A,{...s,modalFunc:n})}},15209:(e,t,s)=>{s.d(t,{A:()=>c});var n=s(55199),l=s(10986),r=s.n(l),a=s(13050),o=s(70579);const i=e=>{let{...t}=e;const[s,l]=r()(t);return(0,o.jsx)(n.Input,{...t,value:s,onChange:e=>{l(e.target.value?e.target.value.toUpperCase():e.target.value,e)}})},d=(0,a.createWithRemoteLoader)({modules:["FormInfo@formModule"]})(e=>{let{remoteModules:t,...s}=e;const[n]=t,{hooks:l}=n,{useDecorator:r}=l;return r(Object.assign({placeholder:`\u8bf7\u8f93\u5165${s.label||""}`},s))(i)});d.field=i;const c=d},15445:(e,t,s)=>{s.d(t,{A:()=>J,E:()=>K});var n=s(98434),l=s(30096),r=s(34643),a=s(1904),o=s(83230),i=s(55199),d=s(70579);const{useOnChange:c}=n.hooks,u=e=>(0,d.jsx)(i.ColorPicker,{...e,onChange:t=>e.onChange(t.toHexString())}),m=e=>c(Object.assign({},e))(u);m.Field=m;const p=m;var h=s(81026),g=s(78756),f=s(92328),_=s(2842);const{useOnChange:x,useCheckedToValue:v}=n.hooks,{withChecked:j}=n.hoc,y=j(e=>{let{checked:t,children:s=null,...n}=e;return(0,d.jsxs)(i.Space,{children:[(0,d.jsx)(i.Switch,{checked:t,...n}),"function"===typeof s?s({checked:t}):s]})}),A=e=>{e=Object.assign({},{fieldName:"switch"},e);const t=v(e);return x(t)(y)};A.Field=i.Switch;const b=A;var D=s(89099),N=s(96339),S=s(36972),w=s(15209),C=s(74529),F=s.n(C),P=s(73884),I=s(47458),M=s(33097),T=s.n(M),k=s(21079),O=s(46237),L=s(56259),H=s(29556),E=s(64671),R=s(83136),z=s.n(R),U=s(47094);const B=e=>t=>{const s=F()(...e)(e=>{let{forwardedRef:s,label:n,placeholder:l,...r}=e;return(0,d.jsx)(t,{...r,label:n,placeholder:l,labelRender:()=>r.tips?(0,d.jsxs)(i.Space,{children:[n,(0,d.jsx)(H.default,{content:r.tips,children:(0,d.jsx)("span",{className:z()(U.A["field-tips"],{[U.A["label-hidden"]]:r.labelHidden}),children:(0,d.jsx)(E.default,{type:"icon-xinxi-miaobian"})})})]}):n,ref:s})}),n=(0,P.forwardRef)((e,t)=>(0,d.jsx)(s,{...e,forwardedRef:t}));return Object.keys(t).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(e=>{n[e]=t[e]}),n},$=e=>t=>{let{placeholder:s,label:n,...l}=t;return(0,d.jsx)(I.FormattedMessage,{id:"defaultInputPlaceholder",moduleName:"FormInfo",values:{label:n},children:t=>(0,d.jsx)(e,{...l,label:n,placeholder:s||t})})},W=e=>t=>{let{placeholder:s,label:n,...l}=t;return(0,d.jsx)(I.FormattedMessage,{id:"defaultSelectPlaceholder",moduleName:"FormInfo",values:{label:n},children:t=>(0,d.jsx)(e,{...l,label:n,placeholder:s||t})})},V=e=>t=>{const s=(0,n.useGroup)(),l=T()(s,"name"),r=(0,k.get)(s,"index"),a=(0,O.oc)();return a&&Array.isArray(a)&&a.length>0?a.map(s=>{if("string"===typeof s)return(0,P.createElement)(e,{...t,key:s});const{name:n,label:a,options:o}=s,i=T()(o,"ignore",[]),d=T()(o,"disabled",[]),c=T()(o,"fields",[]),u=e=>t.name===e.name&&!(e.hasOwnProperty("groupName")&&e.groupName!==l)&&!(e.hasOwnProperty("groupIndex")&&e.groupIndex!==r);if(i.length>0&&i.find(u))return null;if(c.length>0&&!c.find(u))return null;let m=Object.assign({},t,{name:T()(o,"nameTransform",(e,t)=>`${e}${t}`)(t.name,n),label:T()(o,"labelTransform",(e,t)=>e&&`${e}${t}`)(t.label,a)});return d.length>0&&d.find(u)&&(m.disabled=!0,m.rule=""),(0,P.createElement)(e,{...m,key:n})}):(0,d.jsx)(e,{...t})},q=B([V,$])(n.Input),G=B([V,$])(n.InputNumber);q.Password=B([V,$])(n.Input.Password);const Q=B([V,W])(n.DatePicker);Q.MonthPicker=B([V,W])(n.DatePicker.MonthPicker),Q.RangePicker=B([V,W])(n.DatePicker.RangePicker),Q.WeekPicker=B([V,W])(n.DatePicker.WeekPicker);const X=B([V,W])(n.TimePicker);X.RangePicker=B([V,W])(n.TimePicker.RangePicker);const Y=B([V])(e=>{let{placeholder:t,label:s,soFarText:l,...r}=e;const{formatMessage:a}=(0,I.useIntl)({moduleName:"FormInfo"});return(0,d.jsx)(n.DatePickerToday,{...r,label:s,placeholder:[a({id:"startDate"}),a({id:"endDate"})],soFarText:l||a({id:"soFarText"})})}),J={Input:q,Checkbox:n.Checkbox,Password:q.Password,InputNumber:G,DatePicker:Q,MonthPicker:Q.MonthPicker,WeekPicker:Q.WeekPicker,DateRangePicker:Q.RangePicker,TimeRangePicker:X.RangePicker,TimePicker:X,DatePickerToday:Y,RadioGroup:B([V])(n.RadioGroup),CheckboxGroup:B([V])(n.CheckboxGroup),Rate:B([V])(n.Rate),Switch:B([V])(b),Slider:B([V])(n.Slider),SalaryInput:B([V,$])(S.A),TypeDateRangePicker:B([V])(L.A),MoneyInput:B([V,$])(f.A),PhoneNumber:B([V,$])(_.default),Upload:B([V])(D.A),Avatar:B([V])(N.A),FunctionSelect:B([V,W])(h.A),IndustrySelect:B([V,W])(g.A),Cascader:B([V,W])(o.A),ColorPicker:B([V,W])(p),AddressSelect:B([V,W])(a.A),AddressInput:B([V,W])(a.N),TreeSelect:B([V,W])(n.TreeSelect),ReactInputNumber:B([V,$])(n.InputNumber),InputUpperCase:B([V,$])(w.A),Select:B([V,W])(n.Select),TextArea:B([V,$])(n.TextArea),AdvancedSelect:B([V,W])(l.Ay),SuperSelect:B([V,W])(r.Ay),SuperSelectTableList:B([V,W])(r.eM),SuperSelectUser:B([V,W])(r.Pg)},K={createWithFieldDecorator:B,withInputDefaultPlaceholder:$,withSelectDefaultPlaceholder:W,withLang:V}},18936:(e,t,s)=>{s.d(t,{A:()=>k});const n={"ant-tag":"style_ant-tag__7ct2q__DHs+D",overlay:"style_overlay__CXfU5__DHs+D",input:"style_input__+OpvV__DHs+D","is-disabled":"style_is-disabled__uX4qq__DHs+D","input-icon":"style_input-icon__E3NjK__DHs+D",large:"style_large__vMozz__DHs+D",small:"style_small__ubqQ+__DHs+D","input-inner":"style_input-inner__sY-6k__DHs+D","input-custom":"style_input-custom__Kxq3n__DHs+D","display-content":"style_display-content__qA1jn__DHs+D","overlay-footer-extra":"style_overlay-footer-extra__yCzWX__DHs+D","selected-tag":"style_selected-tag__BZsMM__DHs+D","selected-tag-list":"style_selected-tag-list__As0ho__DHs+D","selected-tag-inner":"style_selected-tag-inner__2NH59__DHs+D","text-inner":"style_text-inner__Bq2Ji__DHs+D",placeholder:"style_placeholder__odotY__DHs+D","is-modal":"style_is-modal__4cj8L__DHs+D","overlay-content":"style_overlay-content__kpGRn__DHs+D"};var l=s(74981);const{context:r,useContext:a,Provider:o,Consumer:i}=(0,l.A)();var d=s(73884),c=s(10986),u=s.n(c),m=s(87558),p=s(33097),h=s.n(p),g=s(55199),f=s(83136),_=s.n(f),x=s(3382),v=s(64671),j=s(79686),y=s.n(j),A=s(41740),b=s.n(A),D=s(74065),N=s.n(D),S=s(17342),w=s(70579);const C=e=>{let{maxLength:t,single:s,setValue:n,value:l,message:r}=e;return e=>n(!s&&Number.isInteger(t)&&t>0&&e.length>t?(r(`\u6700\u591a\u9009\u62e9${t}\u4e2a`),l):e)},F=e=>{let{single:t,value:s,mapping:l,onClose:r}=e;return s&&Array.isArray(s)&&0!==s.length?t?(0,w.jsx)("span",{className:n["text-inner"],children:h()(l.get(s[0]),"label")||s[0]}):s.map(e=>{const t=l.get(e);return(0,w.jsx)(g.Tag,{className:n["display-tag"],closable:!0,onClose:s=>{s.preventDefault(),r(e,t)},children:(0,w.jsx)("span",{className:n["tag-inner"],children:h()(t,"label")||e})},e)}):null},P=(0,d.forwardRef)((e,t)=>{let{value:s,onChange:l,extra:r,showSelectedTag:a,renderSelectedContent:o,children:i,...c}=e;const[u,m]=(0,d.useState)(s),p=(0,d.useRef)(s);p.current=s;const[h,f]=(0,d.useState)(!1),{message:_}=g.App.useApp(),v=C({maxLength:c.maxLength,single:c.single,setValue:m,value:u,message:_.error});return(0,d.useEffect)(()=>{h&&m(p.current)},[h]),(0,d.useImperativeHandle)(t,()=>({modalOpen:()=>{f(!0)},close:()=>{f(!1)}})),(0,w.jsx)(x.default,{...c,open:h,onConfirm:()=>{l(u)},onClose:()=>{f(!1)},footer:(a||r)&&(0,w.jsxs)(g.Space,{direction:"vertical",className:n["overlay-footer"],children:[r&&(0,w.jsx)("div",{className:n["overlay-footer-extra"],children:r}),a&&o({value:u,setValue:v})]}),children:"function"===typeof i?i({value:u,setValue:v}):i})}),I=(0,d.forwardRef)((e,t)=>{let{value:s,setValue:l,children:r,renderSelectedContent:a,showSelectedTag:o,placement:i,inputContent:c,single:u,extra:m,overlayWidth:p,wrapClassName:h,...f}=e;const[_,x]=(0,d.useState)(!1);return(0,d.useImperativeHandle)(t,()=>({close:()=>{x(!1)}}),[]),(0,w.jsx)(g.Popover,{...f,open:_,onOpenChange:x,overlayClassName:n.overlay,arrow:!1,content:(0,w.jsxs)("div",{style:p?{"--overlay-width":p}:{},className:n["overlay-content"],onClick:e=>{e.stopPropagation()},children:[(0,w.jsx)("div",{className:n["overlay-inner"],children:"function"===typeof r?r({value:s,setValue:e=>{(!u||s[0]!==e[0])&&l(e),u&&x(!1)}}):r}),(o||m)&&(0,w.jsxs)("div",{className:n["overlay-footer"],children:[m&&(0,w.jsx)("div",{className:n["overlay-footer-extra"],children:m}),o&&a({value:s,setValue:l})]})]}),trigger:"click",placement:i,children:(0,w.jsx)("div",{className:n["input-inner"],children:c})})}),M=(0,m.withFetch)(e=>{let{setFetchApi:t,wrapClassName:s,...l}=e;const[r,o]=(0,d.useState)(!1),i=(0,d.useRef)(null),c=(0,d.useRef)(null),u=a(),{valueState:m,mapping:p,props:h}=u,[f,x]=m,{single:j,placement:y,getPopupContainer:A,placeholder:b,isPopup:D,disabled:N,showSelectedTag:C,extra:M,inputContent:T}=h,k=(0,d.useRef)(l);k.current=l,(0,d.useEffect)(()=>{t(Object.assign({},k.current,{data:l.data,isComplete:l.isComplete}))},[l.data,t,l.isComplete]);const O=F({single:j,value:f,mapping:p,onClose:e=>{x(t=>{const s=t.slice(0),n=t.indexOf(e);return n>-1&&s.splice(n,1),s})}}),L=e=>{let{value:t,setValue:s}=e;return(0,w.jsxs)(g.Space,{className:n["selected-tag"],align:"center",wrap:!0,children:[(0,w.jsxs)("div",{children:["\u5df2\u9009",!h.single&&Number.isInteger(h.maxLength)&&h.maxLength>0?`(${t.length}/${h.maxLength})`:"",":"]}),(0,w.jsx)(S.A,{className:n["selected-tag-list"],children:(0,w.jsx)("div",{className:n["selected-tag-inner"],children:F({value:t,mapping:p,onClose:e=>{s(t=>{const s=t.slice(0),n=t.indexOf(e);return n>-1&&s.splice(n,1),s})}})})})]})},H=T?T(u):(0,w.jsxs)(g.Space,{className:n["display-content"],onMouseOver:()=>{o(!0)},onMouseOut:()=>{o(!1)},children:[(0,w.jsx)("div",{children:O||(0,w.jsx)("span",{className:n.placeholder,children:b})}),r&&f&&f.length>0&&!N?(0,w.jsx)(v.default,{className:_()(n.close,n["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),x([])}}):(0,w.jsx)(v.default,{className:_()(n["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return D?(0,w.jsx)(I,{ref:c,overlayWidth:h.overlayWidth,value:f,setValue:x,single:j,inputContent:H,extra:"function"===typeof M?M({close:()=>c.current.close(),context:u}):M,renderSelectedContent:L,showSelectedTag:C,trigger:"click",placement:y,getPopupContainer:A,children:h.children}):(0,w.jsxs)("div",{className:n["input-inner"],onClick:()=>{i.current.modalOpen()},children:[(0,w.jsx)(P,{size:h.modalSize,ref:i,single:h.single,maxLength:h.maxLength,disabledScroller:!0,wrapClassName:_()(n.overlay,n["is-modal"],s),title:h.placeholder,value:f,onChange:x,extra:"function"===typeof M?M({close:()=>i.current.close(),context:u}):M,showSelectedTag:C,renderSelectedContent:L,children:h.children}),H]})}),T=e=>{let{api:t,className:s,displayItems:l,wrapClassName:r,...a}=e;const[i,c]=(0,d.useState)(""),[m,p]=(0,d.useState)(new Map(l.map(e=>[e.value,e]))),[f,x]=(0,d.useState)({}),{message:v}=g.App.useApp(),j=e=>{const t=e.filter(e=>m.get(e.value)!==e);0!==t.length&&p(e=>{const s=b()(e);return t.forEach(e=>{s.set(e.value,e)}),s})},A=e=>((e,t,s)=>"all"!==s?e:(t(e),e.map(e=>e.value)))(a.single?y()(e)?[]:[e]:e||[],j,a.valueType),[D,S]=u()(Object.assign({},a,{onChange:e=>{const t=((e,t,s)=>"all"!==s?e:e.map(e=>t.get(e)))(e,m,a.valueType);a.onChange&&a.onChange(a.single?N()(t):t)}},"value"in a?{value:A(a.value)}:{defaultValue:A(a.defaultValue)})),F=C({maxLength:a.maxLength,single:a.single,setValue:S,value:D,message:v.error});return(0,w.jsx)(o,{value:{mapping:m,searchText:i,setSearchText:c,appendMapping:j,setItems:e=>{f.setData(e),j(h()(a.dataFormat(e),"list",[]))},fetchApi:f,valueState:[D,F],props:a},children:(0,w.jsx)("div",{className:_()(n["input"+(a.inputContent&&"function"===typeof a.inputContent?"-custom":"")],s),children:(0,w.jsx)(M,{...t,wrapClassName:r,loading:null,setFetchApi:x,onRequestSuccess:e=>{j(h()(a.dataFormat(e),"list",[])),t.onRequestSuccess&&t.onRequestSuccess(e)}})})})};T.defaultProps={placeholder:"\u8bf7\u9009\u62e9",displayItems:[],extra:null,api:{loader:()=>[]},dataFormat:e=>({list:e}),placement:"bottomLeft",getPopupContainer:null,showSelectedTag:!0},T.useContext=a;const k=T},19343:(e,t,s)=>{s.r(t),s.d(t,{Download:()=>u,FileButton:()=>j,FileLink:()=>y,List:()=>v,OptionButtons:()=>x,PrintButton:()=>r.PrintButton,default:()=>a(),download:()=>r.download,downloadBlobFile:()=>r.downloadBlobFile,useDownload:()=>r.useDownload,useFileModal:()=>A});s(64674);var n=s(96418),l=s.n(n),r=s(68827),a=s.n(r),o=s(3382),i=s(83136),d=s.n(i),c=s(70579);r.Download.useDownload=r.useDownload,r.Download.downloadBlobFile=r.downloadBlobFile;const u=r.Download;var m=s(26304),p=s.n(m),h=s(74065),g=s.n(h),f=s(96252);const _=e=>{let{apis:t}=e;const s=(0,f.useFormModal)();return"function"===typeof(null===t||void 0===t?void 0:t.onEditModalShow)?t.onEditModalShow:(e,t)=>{const n=s({size:"small",title:"\u4fee\u6539\u6587\u4ef6\u540d\u79f0",formProps:{data:{name:p()(e.filename.split(".")).join(".")},onSubmit:async s=>{!1!==((null===t||void 0===t?void 0:t.onEdit)&&await(null===t||void 0===t?void 0:t.onEdit({formData:Object.assign({},s,{name:`${s.name}.${g()(e.filename.split("."))}`}),item:e})))&&n.close()}},children:(0,c.jsx)(f.default,{column:1,list:[(0,c.jsx)(f.Input,{name:"name",label:"\u6587\u4ef6\u540d\u79f0",rule:"REQ LEN-0-100"})]})})}},x=e=>{var t;const s=_({apis:e.apis});return(0,c.jsx)(r.FileListOptionButtons,{...e,onEdit:t=>s(t,e.apis),onDelete:null===(t=e.apis)||void 0===t?void 0:t.onDelete,renderModal:"function"===typeof e.renderModal?e.renderModal:e=>{let{onCancel:t,...s}=e;return(0,c.jsx)(o.default,{...Object.assign({},s),onClose:t})}})},v=e=>{let{apis:t,...s}=e;const n=_({apis:t});return(0,c.jsx)(r.FileList,{...s,apis:t,onEdit:e=>n(e,t),onDelete:null===t||void 0===t?void 0:t.onDelete,renderModal:"function"===typeof s.renderModal?s.renderModal:e=>{let{onCancel:t,...s}=e;return(0,c.jsx)(o.default,{...Object.assign({},s),onClose:t})}})},j=e=>(0,c.jsx)(r.FileButton,{...Object.assign({},e,{modalProps:{renderModal:e=>{let{onCancel:t,...s}=e;return(0,c.jsx)(o.default,{...Object.assign({},s),onClose:t})}}})}),y=e=>{const{className:t,...s}=Object.assign({},e);return(0,c.jsx)(j,{...s,className:d()(t,"btn-no-padding"),type:"link",children:s.children||s.filename||s.originName})},A=e=>{const{title:t,children:s,footer:n}=(0,r.useFileModalProps)(Object.assign({},e)),a=(0,o.useModal)();return l()(()=>a({title:t,children:s,footer:n}))}},24474:(e,t,s)=>{s.r(t),s.d(t,{DragArea:()=>Y,DragAreaOuter:()=>Q,DragButton:()=>q,FileUpload:()=>ne,Title:()=>H,UploadButton:()=>G,UploadTips:()=>X,default:()=>ee});var n=s(73884),l=s(33097),r=s.n(l),a=s(55199);const o="style_file-list-outer__wPhbb__DHs+D",i="style_file-list-title__zXM5r__DHs+D",d="style_container__P4RaF__DHs+D",c="style_file-preview-inner__cvE72__DHs+D",u="style_file-preview__M-Asq__DHs+D",m="style_drag-area__Q+lm7__DHs+D",p="style_upload-drag-close__u5o8W__DHs+D",h="style_upload-drag-tips__z7puZ__DHs+D",g="style_upload-drag-icon__sGGoS__DHs+D",f="style_upload-drag-title__9Afmb__DHs+D",_="style_upload-drag-text__o38vS__DHs+D",x="style_title-group__8IJkS__DHs+D",v="style_upload-btn__Q+Jxn__DHs+D",j="style_total-count__z1fyd__DHs+D",y="style_file-select__mHqyI__DHs+D",A="style_file-name__QkvMn__DHs+D",b="style_file-select-info__fOLiM__DHs+D",D="style_file-select-option__AbDrD__DHs+D";var N=s(75087),S=s.n(N),w=s(74065),C=s.n(w),F=s(57469),P=s.n(F),I=s(64671),M=s(19343),T=s(47458),k=s(83136),O=s.n(k),L=s(70579);const H=e=>{let{currentTab:t,setCurrentTab:s,previewMap:n,previewList:l,getPermission:r,currentPreviewFileId:o,setCurrentPreviewFileId:d,itemApis:c,children:u,maxWidth:m=260,getPopupContainer:p}=e;return(0,L.jsx)("div",{className:i,children:(0,L.jsxs)(a.Row,{align:"middle",justify:"space-between",wrap:!1,children:[(0,L.jsx)(a.Col,{children:(0,L.jsxs)(a.Space,{className:O()(x,"core-file-list-title-group"),size:4,children:[(0,L.jsx)(a.Segmented,{value:t,onChange:s,options:[{label:(0,L.jsxs)(a.Space,{size:4,children:[(0,L.jsx)(I.default,{type:"icon-shitu-liebiao"}),(0,L.jsx)(T.FormattedMessage,{id:"listText",moduleName:"FileList"})]}),value:"list"},{label:(0,L.jsxs)(a.Space,{size:4,children:[(0,L.jsx)(I.default,{type:"icon-shitu-yulan"}),(0,L.jsx)(T.FormattedMessage,{id:"previewText",moduleName:"FileList"})]}),value:"preview"}]}),"preview"===t&&o&&n.get(o)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(a.Select,{className:y,variant:"borderless",popupMatchSelectWidth:!1,value:o,onChange:d,getPopupContainer:p,children:l.map(e=>{let{filename:t,userName:s,date:n,id:l}=e;return(0,L.jsx)(a.Select.Option,{className:D,value:l,children:(0,L.jsxs)(a.Space,{direction:"vertical",children:[(0,L.jsxs)(a.Space,{size:4,align:"start",children:[(0,L.jsx)(S(),{type:C()(t.split(".")),size:14}),(0,L.jsx)(a.Typography.Text,{className:A,ellipsis:!0,style:{"--max-width":`${m}px`},children:t})]}),s||n?(0,L.jsxs)(a.Space,{className:b,size:24,children:[(0,L.jsxs)("div",{children:[(0,L.jsx)(T.FormattedMessage,{id:"uploadUser",moduleName:"FileList"}),":",s]}),(0,L.jsxs)("div",{children:[(0,L.jsx)(T.FormattedMessage,{id:"uploadTime",moduleName:"FileList"}),":",n&&P()(n).format("YYYY-MM-DD HH:mm:ss")]})]}):null]})},l)})}),(0,L.jsx)(M.OptionButtons,{hasPreview:!1,getPermission:r,item:n.get(o),apis:c}),(0,L.jsx)("div",{className:j,children:(0,L.jsx)(T.FormattedMessage,{id:"totalCount",values:{count:l.length},moduleName:"FileList"})})]})]})}),(0,L.jsx)(a.Col,{children:u})]})})},E=e=>({"en-US":()=>s.e(3333).then(s.bind(s,63333)),"zh-CN":()=>s.e(8795).then(s.bind(s,48795))}[e]());var R=s(70720),z=s.n(R);const U=(0,n.createContext)({}),{Provider:B}=U,$=()=>(0,n.useContext)(U);var W=s(68827),V=s(81348);const q=e=>{let{children:t}=e;const{onOpenChange:s,getDragButtonEl:n}=$();return(0,L.jsx)("div",{ref:n,className:v,onClick:()=>{s(e=>!e)},children:(0,L.jsxs)(a.Typography.Text,{className:"ant-btn",children:[(0,L.jsx)(I.default,{type:"icon-tuozhuaishangchuan"}),t||(0,L.jsx)(T.FormattedMessage,{id:"dragText",moduleName:"FileList"})]})})},G=e=>{let{children:t}=e;const{accept:s,onFileSelected:n}=$();return(0,L.jsx)(W.FileInput,{className:O()(v,"btn-no-padding"),accept:s,multiple:!0,onChange:n,children:e=>{let{children:s,...n}=e;return(0,L.jsxs)(a.Button,{...n,type:"text",children:[(0,L.jsx)(I.default,{type:"icon-tianjia"}),t,s]})}})},Q=e=>{let{title:t,accept:s=[".png",".jpg",".pdf",".docx",".doc"],fileSize:l=20,maxLength:r,onFileSelected:i,children:c,className:u,defaultOpen:m=!1}=e;const[p,h]=(0,n.useState)(m),g=(0,n.useRef)(null),f=z()(e=>{g.current&&(g.current.contains(e.target)||e.target===g.current||h(!1))});return(0,L.jsx)(T.IntlProvider,{importMessages:E,moduleName:"FileList",children:(0,L.jsx)(B,{value:{open:p,onOpenChange:h,accept:s,fileSize:l,maxLength:r,onFileSelected:i,getDragButtonEl:e=>{g.current=e}},children:(0,L.jsxs)(a.Space,{className:o,direction:"vertical",children:[t,(0,L.jsx)("div",{className:O()(d,u),ref:f,onDragEnter:()=>{h(!0)},children:c})]})})})},X=e=>{let{icon:t,title:s,renderTips:n=e=>e}=e;const{accept:l,fileSize:r,maxLength:a}=$(),o=n((0,T.useIntl)({moduleName:"FileList"}).formatMessage({id:"dragTips"},{accept:l.map(e=>e.replace(/^\./,"")).join("\u3001"),size:r}),{fileSize:r,maxLength:a,accept:l});return(0,L.jsxs)("div",{className:O()(h,"upload-drag-tips"),children:[(0,L.jsx)("div",{className:g,children:t||(0,L.jsx)(I.default,{type:"icon-shangchuan",size:64})}),(0,L.jsx)("div",{className:f,children:s||(0,L.jsx)(T.FormattedMessage,{id:"dragTitle",moduleName:"FileList"})}),(0,L.jsx)("div",{className:_,children:o})]})},Y=e=>{let{children:t=(0,L.jsx)(X,{}),className:s}=e;const{open:n,accept:l,onOpenChange:r,onFileSelected:o}=$();return n?(0,L.jsxs)("div",{className:O()(m,s),onDragOver:e=>{e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDrop:e=>{if(e.stopPropagation(),e.preventDefault(),0===e.dataTransfer.files.length)return;r(!1);const t=Array.from(e.dataTransfer.files).filter(e=>(0,V.A)(e,l));o(t)},onDragEnd:()=>{r(!1)},children:[(0,L.jsx)(a.Button,{className:p,type:"text",shape:"circle",size:"small",icon:(0,L.jsx)(I.default,{type:"icon-close-bold"}),onClick:()=>{r(!1)}}),t]}):null};var J=s(50196),K=s(63743);const Z=e=>{var t,s;let{className:l,maxLength:o=Number.MAX_VALUE,list:i,setList:d,infoItemRenders:m,defaultTab:p="list",defaultPreviewFileId:h,apis:g,getPermission:f=()=>!0,titleExtra:_=null,fileSize:x=20,accept:v=[".png",".jpg",".pdf",".docx",".doc"],getPopupContainer:j}=e;const{apis:y}=(0,K.usePreset)(),A=Object.assign({},y,g),b=(i||[]).map(e=>Object.assign({},{id:e.ossId},e)),{fileList:D,onFileSelected:N}=(0,W.useFileUpload)({maxLength:o,multiple:!0,value:b,onChange:d,concurrentCount:1,onAdd:()=>{w("list")},onSave:async function(e){if("function"===typeof A.onSave){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];const l=await A.onSave(e,...s);return Object.assign({},{id:null===l||void 0===l?void 0:l.ossId},l)}return r()(e,"data")||{}},onUpload:A.onUpload||A.ossUpload}),[S,w]=(0,n.useState)(p),{formatMessage:C}=(0,T.useIntl)({moduleName:"FileList"}),{message:F}=a.App.useApp(),P=(0,n.useMemo)(()=>new Map(b.map(e=>[e.id,e])),[b]),[I,k]=(0,n.useState)(h||r()(b,"[0].id",null));(0,n.useEffect)(()=>{I&&P.get(I)||k(r()(b,"[0].id",null))},[b,P,I]);const O={...A,onPreview:e=>{k(e.id),w("preview")},onDelete:async e=>{A.onDelete&&!1===await A.onDelete(e)||(d(t=>{const s=t.slice(0),n=t.findIndex(t=>{let{id:s}=t;return s===e.id});return n>-1&&s.splice(n,1),s}),F.success(C({id:"successDelete"},{name:e.filename})))},onEdit:async e=>{let{formData:t,item:s}=e;const n=A.onEdit&&await A.onEdit({formData:t,item:s});return!1!==n&&(d(e=>{const n=e.slice(0),l=e.findIndex(e=>{let{id:t}=e;return t===s.id});return l>-1&&n.splice(l,1,Object.assign({},s,{filename:t.name})),n}),F.success(C({id:"successEditFileName"},{name:s.filename}))),n}},E="function"===typeof _?_({currentPreviewFileId:I,currentTab:S}):_;return(0,L.jsx)("div",{className:l,children:(0,L.jsxs)(Q,{title:(0,L.jsx)(H,{currentTab:S,setCurrentTab:w,previewMap:P,previewList:b,getPermission:f,currentPreviewFileId:I,setCurrentPreviewFileId:k,itemApis:O,getPopupContainer:j,children:(0,L.jsxs)(a.Space,{split:(0,L.jsx)(a.Divider,{type:"vertical"}),children:[E,f("add",{})?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(q,{children:C({id:"dragText"})}),(0,L.jsx)(G,{children:C({id:"uploadFile"})})]}):null]})}),fileSize:x,maxLength:o,onFileSelected:N,accept:v,defaultOpen:0===b.length,children:["list"===S?(0,L.jsx)(M.List,{dataSource:[...b,...D],getPermission:f,apis:O,infoItemRenders:m}):null,"preview"===S?I?(0,L.jsx)("div",{className:c,children:(0,L.jsx)(J.default,{className:u,src:null===(t=P.get(I))||void 0===t?void 0:t.src,id:I,apis:A,filename:null===(s=P.get(I))||void 0===s?void 0:s.filename})}):(0,L.jsx)(a.Empty,{image:a.Empty.PRESENTED_IMAGE_SIMPLE,className:"ant-empty-normal"}):null,(0,L.jsx)(Y,{})]})})},ee=e=>(0,L.jsx)(T.IntlProvider,{importMessages:E,moduleName:"FileList",children:(0,L.jsx)(Z,{...e})});var te=s(10986),se=s.n(te);const ne=e=>{let{maxLength:t=Number.MAX_VALUE,apis:s,getPermission:n=()=>!0,fileSize:l=20,accept:o=[".png",".jpg",".pdf",".docx",".doc"],defaultList:i=[],...d}=e;const{apis:c}=(0,K.usePreset)(),u=Object.assign({},c,s),[m,p]=se()({defaultList:i,...d},{defaultValue:"defaultList",value:"list",onChange:"setList"}),{fileList:h,onFileSelected:g}=(0,W.useFileUpload)({maxLength:t,multiple:!0,value:m,onChange:p,concurrentCount:1,onSave:async function(e){if("function"===typeof u.onSave){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];const l=await u.onSave(e,...s);return Object.assign({},{id:null===l||void 0===l?void 0:l.ossId},l)}return r()(e,"data")||{}},onUpload:u.ossUpload});return(0,L.jsxs)(Q,{title:(0,L.jsxs)(a.Row,{children:[(0,L.jsx)(a.Col,{flex:1}),(0,L.jsx)(a.Col,{children:(0,L.jsxs)(a.Space,{split:(0,L.jsx)(a.Divider,{type:"vertical"}),children:[(0,L.jsx)(q,{}),(0,L.jsx)(G,{children:"\u4e0a\u4f20"})]})})]}),fileSize:l,maxLength:t,onFileSelected:g,accept:o,children:[(0,L.jsx)(M.List,{dataSource:[...h,...m],getPermission:n,apis:u}),(0,L.jsx)(Y,{})]})}},29556:(e,t,s)=>{s.r(t),s.d(t,{TooltipFetch:()=>w,TooltipInfoLabel:()=>D,default:()=>A});var n=s(55199),l=s(83136),r=s.n(l);const a="style_tooltip__zHGMI__DHs+D",o="style_large__lvmsm__DHs+D",i="style_small__nUt0r__DHs+D",d="style_popup-content__-rKQN__DHs+D",c="style_title__1EQPq__DHs+D",u="style_important-info__qTSZY__DHs+D",m="style_error__yTTq3__DHs+D",p="style_warning__CMJxz__DHs+D",h="style_success__AvJVx__DHs+D",g="style_sub-title__uD8CH__DHs+D",f="style_content__lzgUz__DHs+D",_="style_alone__q6q82__DHs+D",x="style_fetch-content__tEOEV__DHs+D",v="style_fetch-loading__tN-WB__DHs+D",j="style_title-info-icon__iY8Q+__DHs+D";var y=s(70579);const A=e=>{let{overlayClassName:t,title:s,size:l,subtitle:x,content:v,importantInfo:j,importantInfoType:A,moreInfo:b,...D}=e;return(0,y.jsx)(n.Tooltip,{...D,rootClassName:r()(t,a,{[i]:"small"===l,[o]:"large"===l}),title:(0,y.jsxs)(n.Space,{direction:"vertical",className:d,children:[s&&(0,y.jsx)("div",{className:c,children:s}),j&&(0,y.jsx)("div",{className:r()(u,{[h]:"success"===A,[p]:"warning"===A,[m]:"error"===A}),children:j}),x&&(0,y.jsx)("div",{className:g,children:x}),v&&(0,y.jsx)("div",{className:r()(f,{[_]:[s,x,j,b].every(e=>!e)}),children:v}),b&&(0,y.jsx)("div",{children:b})]})})};var b=s(64671);const D=e=>{let{title:t,tooltipTitle:s}=e;return(0,y.jsxs)("div",{children:[t,s?(0,y.jsx)(A,{...s,children:(0,y.jsx)("span",{children:(0,y.jsx)(b.default,{type:"icon-xinxi-miaobian",className:j,size:14})})}):null]})};var N=s(73884),S=s(87558);const w=e=>{let{api:t,children:s,fetchContent:l,showLoading:a=!0,loadingClassName:o,force:i,...d}=e;const[c,u]=(0,N.useState)(!1),m=(0,S.useFetch)(Object.assign({},t,{auto:!1})),{isComplete:p,isLoading:h,data:g,send:f}=m;return(0,y.jsx)(A,{...Object.assign({},d,p?l(g,m):{}),open:c,onOpenChange:async e=>{!e||p&&!i||await f({type:"refresh"}),u(e)},children:(0,y.jsxs)("span",{className:x,children:[s,a&&h?(0,y.jsx)(n.Spin,{size:"small",className:r()(o,v)}):null]})})}},30096:(e,t,s)=>{s.d(t,{Ay:()=>c});var n=s(98434),l=s(43856);const{useOnChange:r}=n.hooks,a=e=>{const t=t=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+t.label},t))(e);return t.field=t.Field=e,t},o=a(l.UserField),i=a(l.TableField),d=a(l.AdvancedSelectField);d.createdList=e=>{let{renderList:t,defaultProps:s}=e;return a((0,l.createListField)({renderList:t,defaultProps:s}))},d.User=o,d.Table=i;const c=d},30891:(e,t,s)=>{s.d(t,{A:()=>l});var n=s(98434);const l=e=>{let{children:t}=e;const{openApi:s,formData:l}=(0,n.useFormContext)();return t({...s,formData:l})}},34643:(e,t,s)=>{s.d(t,{Ay:()=>u,Pg:()=>d,eM:()=>c});var n=s(98434),l=s(43856),r=s(60586);const{useOnChange:a}=n.hooks,o=e=>{const t=t=>a(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+t.label},t))(e);return t.field=t.Field=e,t},i=o(l.SuperSelectField),d=o(r.$9),c=o(l.SuperSelectTableListField),u=i},35774:(e,t,s)=>{s.d(t,{A:()=>a});var n=s(98434),l=s(81014),r=s(70579);const a=e=>{let{onClick:t,...s}=e;const a=(0,n.useFormContext)();return(0,r.jsx)(l.default,{...s,onClick:e=>t(a,e)})}},36972:(e,t,s)=>{s.d(t,{A:()=>M});var n=s(73884),l=s(87558),r=s(98434),a=s(78491),o=s.n(a),i=s(55199);const d="style_salary__sUOtT__DHs+D",c="style_salary-type__Sl1LC__DHs+D",u="style_input-number__eoEZr__DHs+D",m="style_full__NPqJm__DHs+D",p="style_input-group__toLB7__DHs+D",h="style_input-group-no-mb__C4nzh__DHs+D";var g=s(47458),f=s(55431),_=s(48731),x=s(10986),v=s.n(x),j=s(21079),y=s(70579);const A=(0,l.withFetch)(e=>{let{data:t,...s}=e;return(0,y.jsx)(i.Select,{...s,options:t})}),{useDecorator:b,useUIDecorator:D}=r.hooks,N=e=>{if(!e)return"";const t=isNaN(Number(e))?e:Math.abs(Number(e));return e.split(".")[1]&&e.split(".")[1].length>2?t.toFixed(2):t},S=e=>{let{children:t,isError:s}=e;return(0,y.jsx)("div",{style:{marginBottom:0},className:"react-form__field "+(s?"is-error":""),children:(0,y.jsx)("div",{className:"react-form__field-main",children:(0,y.jsx)("div",{className:"react-form__field-input",children:(0,n.cloneElement)(t,{className:"react-form__field-component"})})})})},w=e=>{let{getPopupContainer:t,onBlur:s,api:n,isRange:l=!0,placeholder:r,disabled:a,showMonth:f,remindUnit:x,req:b,...D}=e;const[w,C]=v()(D),{formatMessage:F}=(0,g.useIntl)({moduleName:"FormInfo"}),P=F({id:"defaultSelectPlaceholder"},{label:""}),I=F({id:"defaultInputPlaceholder"},{label:""}),M=[6].indexOf((0,j.get)(w,"type"))>-1,T=1===(0,j.get)(w,"type"),k=7===(0,j.get)(w,"type"),O=e=>{if(e)return M?e/1e4:e},L=o()(s||(()=>{}));return(0,y.jsx)("div",{ref:L,className:d,children:(0,y.jsxs)(i.Row,{wrap:!1,gutter:10,children:[(0,y.jsx)(i.Col,{children:(0,y.jsx)(A,{className:c,...n,value:(0,j.get)(w,"type"),onChange:e=>{C&&C(Object.assign({},T?{}:w,{type:e,min:"",max:""}))},placeholder:r||P,getPopupContainer:t,disabled:a})}),T?null:(0,y.jsxs)(i.Col,{flex:1,children:[l&&(0,y.jsxs)(i.Row,{className:x&&[5,6].includes(null===w||void 0===w?void 0:w.type)?p:h,wrap:!1,children:[(0,y.jsx)(i.Col,{flex:1,children:(0,y.jsx)(S,{isError:!(0,j.get)(w,"min")&&b,children:(0,y.jsx)(i.InputNumber,{disabled:a,placeholder:I,formatter:N,value:O((0,j.get)(w,"min")),style:{textAlign:"center"},onChange:e=>{C(Object.assign({},w,{min:M?1e4*e:e}))},description:x&&[5,6].includes(null===w||void 0===w?void 0:w.type)?(0,y.jsxs)("span",{style:{color:"#fc3333"},children:["\u6ce8\u610f\uff1a",(0,y.jsx)(_.default,{name:null===w||void 0===w?void 0:w.type,moduleName:"salaryTypeEnum"}),"\u7684\u5355\u4f4d\u4e3a",M?F({id:"thousand"}):k?"":F({id:"yuan"})]}):null})})}),(0,y.jsx)(i.Col,{children:(0,y.jsx)(i.Input,{style:{width:30,borderLeft:0,borderRight:0,pointerEvents:"none"},placeholder:"~",disabled:!0})}),(0,y.jsx)(i.Col,{flex:1,children:(0,y.jsx)(S,{isError:!(0,j.get)(w,"max")&&b,children:(0,y.jsx)(i.InputNumber,{disabled:a,placeholder:I,formatter:N,value:O((0,j.get)(w,"max")),style:{textAlign:"center"},addonAfter:M?F({id:"thousand"}):k?"":F({id:"yuan"}),onChange:e=>{C(Object.assign({},w,{max:M?1e4*e:e}))}})})}),5===(0,j.get)(w,"type")&&f&&(0,y.jsx)(i.Col,{children:(0,y.jsxs)("span",{className:(0,j.get)(w,"max")&&(0,j.get)(w,"min")&&!(0,j.get)(w,"month")&&b?"error":"",children:[(0,y.jsx)("span",{className:u,children:"X"}),(0,y.jsx)(i.InputNumber,{min:12,disabled:a,value:(0,j.get)(w,"month"),onChange:e=>{C(Object.assign({},w,{month:e}))},style:{width:100,textAlign:"center"},placeholder:"\u6570\u91cf",addonAfter:"\u6708"})]})})]}),!l&&!k&&(0,y.jsx)(i.InputNumber,{disabled:a,min:0,max:1e8,placeholder:I,className:m,formatter:N,value:O((0,j.get)(w,"max")),style:{textAlign:"center"},addonAfter:M?F({id:"thousand"}):k?"":F({id:"yuan"}),onChange:e=>{C(Object.assign({},w,{max:M?1e4*e:e}))}}),!l&&k&&(0,y.jsx)(i.Input,{disabled:a,placeholder:I,className:m,onChange:e=>{C(Object.assign({},w,{max:e.target.value}))},value:(0,j.get)(w,"max"),style:{textAlign:"center"}})]})]})})},C={loader:()=>[{value:1,label:"\u9762\u8bae"},{value:2,label:"\u65f6\u85aa"},{value:3,label:"\u65e5\u85aa"},{value:4,label:"\u5468\u85aa"},{value:5,label:"\u6708\u85aa"},{value:6,label:"\u5e74\u85aa"}]},F={type:5,min:"",max:"",month:12},P=e=>{let{api:t=C,defaultValue:s=F,...n}=e;return(0,y.jsx)(g.IntlProvider,{moduleName:"FormInfo",importMessages:f.A,children:(0,y.jsx)(w,{...n,api:t,defaultValue:s})})},I=e=>{var t;return b({...e,req:(null===e||void 0===e||null===(t=e.rule)||void 0===t?void 0:t.indexOf("REQ"))>-1})(P)};I.Field=P;const M=I},41381:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l.a});s(55664);var n=s(22436),l=s.n(n),r={};for(const a in n)"default"!==a&&(r[a]=()=>n[a]);s.d(t,r)},45053:(e,t,s)=>{s.d(t,{A:()=>m});var n=s(98434),l=s(55199),r=s(73884),a=s(83136),o=s.n(a),i=s(70720),d=s.n(i),c=s(47094),u=s(70579);const m=e=>{let{name:t,groupName:s,overlayClassName:a,errorRender:i=()=>null,groupIndex:m,children:p}=e;const h=(e=>{let{name:t,groupName:s,groupIndex:l}=e;const{emitter:a,formState:o}=(0,n.useFormContext)(),i=(0,r.useRef)({name:t,groupName:s,groupIndex:l});i.current={name:t,groupName:s,groupIndex:l};const d=(0,r.useRef)(o);d.current=o;const[c,u]=(0,r.useState)(null);return(0,r.useEffect)(()=>{const e=a.addListener("form-field-validate-complete",e=>{let{id:t,validate:s}=e;const l=d.current[t];if(!l)return;const r=i.current;l.name!==r.name||r.groupName&&(l.groupName!==r.groupName||l.groupIndex!==r.groupIndex)||u(2===s.status?Object.assign({},s,{label:l.label,errMsg:n.util.compileErrMsg(s.msg,l.label)}):null)});return()=>{e&&e.remove()}},[a]),c})({name:t,groupName:s,groupIndex:m}),[g,f]=(0,r.useState)(!1),_=h&&g&&i(Object.assign({},h,{closeHover:()=>f(!1)})),x=(0,r.useRef)(null),v=(0,r.useRef)(null);d()(()=>{f(!1)}).current={contains:e=>x.current.contains(e)||v.current&&v.current.contains(e)};const[j,y]=(0,r.useState)(0);return(0,r.useLayoutEffect)(()=>{const e=()=>{const e=x.current.querySelector(".react-form__field-component");e&&y(e.clientWidth)};e();const t=new ResizeObserver(e);t.observe(x.current);const s=new MutationObserver(e);return s.observe(x.current,{subtree:!0,childList:!0}),()=>{s.disconnect(),t.disconnect()}},[]),(0,u.jsx)(l.Popover,{open:!!_,rootClassName:o()(a,c.A["error-tip-overlay"]),content:_&&(0,u.jsx)("div",{ref:v,style:{width:j},className:o()(c.A["error-tip-overlay-content"]),children:_}),placement:"bottom",transitionName:"ant-slide-up",arrow:!1,children:(0,u.jsx)("div",{className:o()("error-tip"),ref:x,onMouseEnter:()=>{f(!0)},children:p})})}},46237:(e,t,s)=>{s.d(t,{Ay:()=>i,oc:()=>o});var n=s(73884);const l=(0,n.createContext)([]),{Provider:r,Consumer:a}=l,o=()=>(0,n.useContext)(l),i=r},46732:(e,t,s)=>{s.d(t,{A:()=>c,K:()=>d});var n=s(75363),l=s(73884),r=s(98434),a=s(47094),o=s(70579);const i=(0,l.createContext)(""),{Provider:d}=i,c=e=>{let{name:t}=e;const s=(0,l.useContext)(i),d=(0,r.useGroup)();return s&&(0,o.jsx)(n.default,{className:a.A["helper-guide-field"],name:s+"-"+(d.name?d.name+"-":"")+t})}},47094:(e,t,s)=>{s.d(t,{A:()=>n});const n={"form-outer":"style_form-outer__IWUs0__DHs+D","form-drawer":"style_form-drawer__uYDXS__DHs+D","table-list":"style_table-list__6lp-A__DHs+D","list-item":"style_list-item__hVzQa__DHs+D","table-list-inner":"style_table-list-inner__uc8DK__DHs+D","table-list-field":"style_table-list-field__JSJfB__DHs+D","table-list-header":"style_table-list-header__KXvKa__DHs+D","is-req":"style_is-req__LfXQf__DHs+D","table-list-extra":"style_table-list-extra__faYTK__DHs+D","list-btn":"style_list-btn__WKYkm__DHs+D","form-info":"style_form-info__B8bAP__DHs+D","list-part":"style_list-part__Ld0GA__DHs+D","is-important":"style_is-important__vaBk1__DHs+D","list-item-part":"style_list-item-part__MzKP7__DHs+D","money-input":"style_money-input__J86Pb__DHs+D","money-description":"style_money-description__Gz3p7__DHs+D","components-upload-wrapper":"style_components-upload-wrapper__Ir0gz__DHs+D","textarea-wrapped-component":"style_textarea-wrapped-component__r1oKc__DHs+D","helper-guide-field":"style_helper-guide-field__Wke3w__DHs+D","error-tip-overlay":"style_error-tip-overlay__aNCGc__DHs+D","error-tip-overlay-content":"style_error-tip-overlay-content__kDOoQ__DHs+D","column-not-layout":"style_column-not-layout__+SXC+__DHs+D","mult-field-item":"style_mult-field-item__eS0nJ__DHs+D","react-form__field-label":"style_react-form__field-label__2U91E__DHs+D","mult-field-add-btn":"style_mult-field-add-btn__5Baxz__DHs+D","form-step-section":"style_form-step-section__RvkHy__DHs+D"}},47338:(e,t,s)=>{s.r(t),s.d(t,{ConfirmButton:()=>n.ConfirmButton,ConfirmLink:()=>n.ConfirmLink,ConfirmText:()=>n.ConfirmText,default:()=>l,withConfirm:()=>n.withConfirm});s(9056);var n=s(5195);const l=n.ConfirmButton},48221:(e,t,s)=>{s.d(t,{Ay:()=>i,WJ:()=>c,Xy:()=>d});var n=s(25963),l=s(73025),r=s(47094),a=s(76995),o=s(70579);const i=e=>(0,o.jsx)(n.default,{...(0,a.A)(Object.assign({},e,{className:r.A["form-drawer"]}))}),d=()=>{const e=(0,n.useDrawer)();return t=>e((0,a.A)(Object.assign({},t,{className:r.A["form-drawer"]})))},c=e=>{const t=d();return(0,o.jsx)(l.A,{...e,modalFunc:t})}},50196:(e,t,s)=>{s.r(t),s.d(t,{AudioPreview:()=>n.AudioPreview,HtmlPreview:()=>n.HtmlPreview,ImagePreview:()=>n.ImagePreview,OSSFilePreview:()=>n.OSSFilePreview,OfficePreview:()=>n.OfficePreview,PdfPreview:()=>n.PdfPreview,TextPreview:()=>n.TextPreview,UnknownPreview:()=>n.UnknownPreview,VideoPreview:()=>n.VideoPreview,default:()=>n.FilePreview});s(64674);var n=s(68827)},55431:(e,t,s)=>{s.d(t,{A:()=>n});const n=e=>({"en-US":()=>s.e(1649).then(s.bind(s,21649)),"zh-CN":()=>s.e(711).then(s.bind(s,80711))}[e]())},56259:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(89319),l=s(98434);const{useOnChange:r}=l.hooks,a=e=>r(Object.assign({},{},e))(n.A);a.Field=n.A;const o=a},64261:(e,t,s)=>{s.d(t,{A:()=>f});var n=s(98434),l=s(57469),r=s.n(l),a=s(34677),o=s.n(a),i=s(33097),d=s.n(i),c=(s(17448),s(2842)),u=s(46732),m=s(13050),p=s(70579);const h=n.RULES.REQ,g=n.RULES.LEN,f=async(e,t)=>{const{locale:s}=Object.assign({},t);n.interceptors.input.use("photo-string",e=>{if(e&&"string"===typeof e){return{id:e.split("?")[0]}}return e}),n.interceptors.output.use("photo-string",e=>{var t,s;return e&&"string"!==typeof e?(null===(t=e.id)||void 0===t||null===(s=t.split("?"))||void 0===s?void 0:s[0])||e.id:e}),n.interceptors.input.use("photo-string-list",e=>e&&Array.isArray(e)&&e.length>0?e.map(e=>({id:e.split("?")[0]})):e),n.interceptors.output.use("photo-string-list",e=>e&&Array.isArray(e)&&e.length>0?e.map(e=>null===e||void 0===e?void 0:e.id):e),n.interceptors.input.use("to-array",e=>Array.isArray(e)?e[0]:e),n.interceptors.output.use("to-array",e=>[e]),n.interceptors.input.use("array-single",e=>e?[e]:[]),n.interceptors.output.use("array-single",e=>e?e[0]:null),n.interceptors.input.use("boolean-number",e=>1===e||"1"===e),n.interceptors.output.use("boolean-number",e=>e?1:0),n.interceptors.input.use("un-boolean",e=>!e),n.interceptors.output.use("un-boolean",e=>!e),n.interceptors.output.use("object-output-value",e=>e?e.value||e.id:e),n.interceptors.input.use("date-string",e=>e?r()(e):null),n.interceptors.output.use("date-string",e=>e?new Date(e.valueOf()).toISOString():""),n.interceptors.input.use("date-range-string",e=>{if(!Array.isArray(e))return[];const t=[];return e[0]&&t.push(r()(e[0])),e[0]&&e[1]&&"sofar"===e[1]&&t.push("\u81f3\u4eca"),e[0]&&e[1]&&"\u81f3\u4eca"!==e[1]&&t.push(r()(e[1])),t}),n.interceptors.output.use("date-range-string",e=>{if(!Array.isArray(e))return[];const t=[];return e[0]&&t.push(new Date(e[0].valueOf()).toISOString()),e[0]&&e[1]&&"\u81f3\u4eca"===e[1]&&t.push("sofar"),e[0]&&e[1]&&"\u81f3\u4eca"!==e[1]&&t.push(new Date(e[1].valueOf()).toISOString()),t}),n.interceptors.output.use("file-format",e=>Array.isArray(e)?e.map(e=>Object.assign({},e,{id:e.id||e.ossId,originalName:e.filename})):[]),n.interceptors.input.use("file-format",e=>Array.isArray(e)?e.map(e=>({id:e.id||e.ossId,ossId:e.id||e.ossId,filename:e.originalName||e.filename})):[]);const{default:l}=await(0,m.loadModule)("components-iconfont:CountyFlag@load"),a=await l(),i=new Map(a.map(e=>{let{ab:t,country_code:s}=e;return[t,s]})),f=new Map(a.map(e=>{let{ab:t,country_code:s}=e;return[s,t]}));n.interceptors.output.use("phone-number-string",e=>null!==e&&void 0!==e&&e.code&&null!==e&&void 0!==e&&e.value?`+${i.get(e.code)} ${e.value.replace(/\s+/g,"")}`:""),n.interceptors.input.use("phone-number-string",e=>{if(!e)return{};const t=e.match(/^\+(\d+)\s(.*)/);return t&&t.length>=3?{code:f.get(Number(t[1])),value:t[2]}:{code:f.get(86),value:e}});const _=(e,t)=>{const n={REQ:{"zh-CN":"%s\u4e0d\u80fd\u4e3a\u7a7a","en-US":"%s cannot be empty "},EMAIL:{"zh-CN":"\u8bf7\u8f93\u5165\u6709\u6548\u7684%s","en-US":"Please enter a valid %s"},LENGTH_EQUAL:{"zh-CN":`%s\u5fc5\u987b\u7b49\u4e8e${(t=Object.assign({},t)).end}`,"en-US":`%s must be equal to ${t.end}`},LENGTH_MORE:{"zh-CN":`%s\u5fc5\u987b\u5927\u4e8e${t.start}`,"en-US":`%s must be greater than ${t.start}`},LENGTH_LESS:{"zh-CN":`%s\u5fc5\u987b\u5c0f\u4e8e${t.end}`,"en-US":`%s must be less than ${t.end}`}},l=d()(n,`${e}.${s}`);return l||d()(n,`${e}.zh-CN`)};(0,n.preset)(o()({},{type:"inner",rules:{REQ:function(){return Object.assign({},h(...arguments),{errMsg:_("REQ")})},LEN:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const[n,l,r]=t;let a="";return r===l&&n.length!==Number(r)&&(a="LENGTH_EQUAL"),n.length<l&&(a="LENGTH_MORE"),r&&n.length>r&&(a="LENGTH_LESS"),Object.assign({},g(...t),{errMsg:_(a,{start:l,end:r})})},EMAIL:function(e){return{result:/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e),errMsg:_("EMAIL")}},PHONE_NUMBER_INPUT:c.PHONE_NUMBER_INPUT,ARRAY_LENGTH:(e,t,s)=>s===t&&e.length!==Number(s)?{result:!1,errMsg:_("LENGTH_EQUAL",{start:t,end:s})}:e.length<t?{result:!1,errMsg:_("LENGTH_MORE",{start:t,end:s})}:s&&e.length>s?{result:!1,errMsg:_("LENGTH_LESS",{start:t,end:s})}:{result:!0}},field:{datePicker:{defaultProps:{interceptor:"date-string"}},rangeDatePicker:{defaultProps:{interceptor:"date-range-string"}},inputNumber:{defaultProps:{changeOnWheel:!1}},textArea:{defaultProps:{autoSize:{minRows:2,maxRows:6}}}},globalProps:{labelTips:e=>(0,p.jsx)(u.A,{...e})}},"function"===typeof e?e({interceptors:n.interceptors,RULES:n.RULES}):e))}},76995:(e,t,s)=>{s.d(t,{A:()=>m});var n=s(55431),l=s(98434),r=s(47458),a=s(83799),o=s(83136),i=s.n(o),d=s(47094),c=s(70579);const u="FormInfo",m=e=>{let{className:t,withDecorator:s,footerButtons:o,formProps:m,cancelText:p,saveText:h,autoClose:g=!0,...f}=e;return{...f,footerButtons:o||[{children:(0,c.jsx)(r.IntlProvider,{importMessages:n.A,moduleName:u,children:p||(0,c.jsx)(r.FormattedMessage,{id:"Cancel",moduleName:u})}),ButtonComponent:l.CancelButton},{type:"primary",children:(0,c.jsx)(r.IntlProvider,{importMessages:n.A,moduleName:u,children:h||(0,c.jsx)(r.FormattedMessage,{id:"Save",moduleName:u})}),ButtonComponent:l.SubmitButton,autoClose:!1}],withDecorator:(e,t)=>{const l=t=>{const{onSubmit:s,...l}=Object.assign({},"function"===typeof m?m(t):m);return(0,c.jsx)(a.lV,{...l,onSubmit:async function(e){for(var n=arguments.length,l=new Array(n>1?n-1:0),r=1;r<n;r++)l[r-1]=arguments[r];!1!==(s&&await s(e,Object.assign({},t),...l))&&g&&t.close()},children:(0,c.jsx)(r.IntlProvider,{importMessages:n.A,moduleName:"FormInfo",children:e(t)})})};return"function"===typeof s?s(l,t):l(t)},className:i()(t,d.A["form-outer"])}}},78756:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(43856),l=s(98434);const{useOnChange:r}=l.hooks,a=e=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(n.IndustrySelectField);a.Field=n.IndustrySelectField,a.Enum=n.IndustrySelectField.Enum;const o=a},81026:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(43856),l=s(98434);const{useOnChange:r}=l.hooks,a=e=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(n.FunctionSelectField);a.Field=n.FunctionSelectField,a.Enum=n.FunctionSelectField.Enum;const o=a},83230:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(98434),l=s(43856);const{useOnChange:r}=n.hooks,a=e=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(l.CascaderField);a.Field=l.CascaderField,a.createTreeUtils=l.createTreeUtils;const o=a},83799:(e,t,s)=>{s.d(t,{NI:()=>H,TQ:()=>u.A,JL:()=>T,eu:()=>x.A,vx:()=>m.A,lr:()=>q,s3:()=>G,lV:()=>l.A,d4:()=>p.A,ZN:()=>h.A,pd:()=>R,YI:()=>$,h2:()=>E,F0:()=>g.A,go:()=>f.default,tt:()=>n.Rate,lu:()=>v.A,l6:()=>B,Ap:()=>n.Slider,wD:()=>k,eM:()=>O,Pg:()=>L,dO:()=>n.Switch,EY:()=>F,fs:()=>z,AG:()=>V,f7:()=>W,w5:()=>y.A,_O:()=>_.A,nk:()=>Q});var n=s(98434),l=s(85696),r=s(47458),a=s(73884),o=s(30891),i=s(47094),d=s(30096),c=s(34643),u=s(1904),m=s(83230),p=s(81026),h=s(78756),g=s(92328),f=s(2842),_=s(89099),x=s(96339),v=s(36972),j=s(15209),y=s(56259),A=s(55199),b=s(10986),D=s.n(b),N=s(70579);const{useDecorator:S}=n.hooks,w=e=>{let{children:t,...s}=e;const[n]=D()(s);return(0,N.jsxs)(A.Typography.Text,{...s,children:[(0,N.jsx)("div",{style:{height:0,width:0,overflow:"hidden"},children:(0,N.jsx)(A.Input,{value:n})}),t||n]})},C=e=>S(e)(w);C.Field=w;const F=C;var P=s(45053);const I=e=>{const t=(0,a.forwardRef)((t,s)=>{let{placeholder:n,label:l,...a}=t;return(0,N.jsx)(r.FormattedMessage,{id:"defaultInputPlaceholder",moduleName:"FormInfo",values:{label:l},children:t=>(0,N.jsx)(e,{...a,ref:s,label:l,placeholder:n||t})})});return Object.keys(e).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(s=>{t[s]=e[s]}),t},M=e=>{const t=(0,a.forwardRef)((t,s)=>{let{placeholder:n,label:l,...a}=t;return(0,N.jsx)(r.FormattedMessage,{id:"defaultSelectPlaceholder",moduleName:"FormInfo",values:{label:l},children:t=>(0,N.jsx)(e,{...a,ref:s,label:l,placeholder:n||t})})});return Object.keys(e).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(s=>{t[s]=e[s]}),t},T=M(d.Ay),k=M(c.Ay),O=M(c.eM),L=M(c.Pg),H=M(u.N),E=I(j.A),R=I(n.Input);R.Password=I(n.Input.Password);const z=(U=n.TextArea,e=>{let{placeholder:t,label:s,className:n,...l}=e;return(0,N.jsx)(r.FormattedMessage,{id:"defaultInputPlaceholder",moduleName:"FormInfo",values:{label:s},children:e=>(0,N.jsx)("div",{className:i.A["textarea-wrapped-component"],children:(0,N.jsx)(U,{...l,label:s,placeholder:t||e})})})});var U;const B=M(n.Select),$=I(n.InputNumber),W=M(n.TreeSelect),V=M(n.TimePicker);V.RangePicker=M(n.TimePicker.RangePicker);const q=M(n.DatePicker);q.MonthPicker=M(n.DatePicker.MonthPicker),q.RangePicker=M(n.DatePicker.RangePicker),q.WeekPicker=M(n.DatePicker.WeekPicker);const G=e=>{let{placeholder:t,label:s,soFarText:l,...a}=e;const{formatMessage:o}=(0,r.useIntl)({moduleName:"FormInfo"});return(0,N.jsx)(n.DatePickerToday,{...a,label:s,placeholder:[o({id:"startDate"}),o({id:"endDate"})],soFarText:l||o({id:"soFarText"})})},Q=Object.assign({},n,{Input:R,InputUpperCase:E,TextArea:z,Select:B,InputNumber:$,TreeSelect:W,TimePicker:V,DatePicker:q,DatePickerToday:G,Form:l.A,FormItem:o.A,AdvancedSelect:T,SuperSelect:k,SuperSelectTableList:O,SuperSelectUser:L,AddressSelect:u.A,AddressInput:H,MoneyInput:g.A,PhoneNumber:f.default,Cascader:m.A,FunctionSelect:p.A,IndustrySelect:h.A,TypeDateRangePicker:y.A,Upload:_.A,Avatar:x.A,SalaryInput:v.A,Text:F,Rate:n.Rate,Switch:n.Switch,Slider:n.Slider,ErrorTip:P.A})},85696:(e,t,s)=>{s.d(t,{A:()=>v});var n=s(73884),l=s(63743),r=s(33097),a=s.n(r),o=s(64261),i=s(47458),d=s(55431),c=s(46237),u=s(41381),m=s(46732),p=s(98434),h=s(83136),g=s.n(h),f=s(47094),_=s(70579);const x=e=>{let{children:t}=e;const[s,r]=(0,n.useState)(!1),i=(0,l.usePreset)(),d=a()(i,"formInfo",{}),c=a()(i,"locale");return(0,n.useEffect)(()=>{Promise.resolve((0,o.A)(d,{locale:c})).then(()=>{r(!0)})},[d,c]),s?t:null},v=(0,n.forwardRef)((e,t)=>{let{className:s,helperGuideName:n,children:l,lang:r,...a}=e;return(0,_.jsx)(i.IntlProvider,{importMessages:d.A,moduleName:"FormInfo",children:(0,_.jsx)(c.Ay,{value:r,children:(0,_.jsx)(m.K,{value:n,children:(0,_.jsx)(x,{children:(0,_.jsx)(p.FormAntd,{...a,ref:t,className:g()(s,f.A["form-outer"]),children:(0,_.jsx)(u.default,{children:l})})})})})})})},85846:(e,t,s)=>{s.d(t,{A:()=>x});var n=s(73884),l=s(68532),r=s(55199),a=s(64671),o=s(41381),i=s(47338),d=s(2196),c=s(83136),u=s.n(c),m=s(55431),p=s(47458),h=s(47094),g=s(70579);const f=(0,p.createWithIntl)({moduleName:"FormInfo",importMessages:m.A})(e=>{let{addText:t,className:s,important:o,outer:c=(0,g.jsx)(_,{}),renderChildren:m=e=>e,deleteButtonProps:f,title:x,...v}=e;const{formatMessage:j}=(0,p.useIntl)({moduleName:"FormInfo"});return(0,g.jsx)(l.SubList,{...v,listRender:e=>{let{list:t,title:s,id:n,allowRemove:l,onRemove:c,...m}=e;return(0,g.jsxs)("div",{className:u()(h.A["list-item"],{[h.A["is-important"]]:o}),children:[(0,g.jsx)(d.A,{...m,title:s,list:t,className:h.A["list-item-part"],gap:16,extra:(0,g.jsx)(p.FormattedMessage,{id:"delText",moduleName:"FormInfo",children:e=>l?(0,g.jsx)(i.default,{danger:!0,className:"btn-no-padding",message:j({id:"delConfirm"},{name:s}),type:"link",onClick:()=>{c(n)},...Object.assign({},f),children:null!==f&&void 0!==f&&f.children?null===f||void 0===f?void 0:f.children:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.default,{type:"icon-shanchu"}),e]})}):null})}),(0,g.jsx)(r.Divider,{})]},n)},children:(e,l)=>{let{allowAdd:r,onAdd:a}=l;return(0,n.cloneElement)(c,{title:x,addText:t,className:u()(s,h.A["list-part"]),allowAdd:r,add:()=>a({isUnshift:!1})},m(e))}})}),_=e=>{let{add:t,addText:s,className:n,allowAdd:l,...i}=e;return(0,g.jsx)(o.default.Part,{...i,className:n,extra:l&&(0,g.jsx)(p.FormattedMessage,{id:"addText",moduleName:"FormInfo",children:e=>(0,g.jsxs)(r.Typography.Text,{className:h.A["list-btn"],onClick:t,children:[(0,g.jsx)(a.default,{type:"icon-tianjia"}),s||e]})})})},x=f},89099:(e,t,s)=>{s.d(t,{A:()=>A});var n=s(55199),l=s(83136),r=s.n(l),a=s(10986),o=s.n(a);const i="style_upload__t422Q__DHs+D",d="style_upload-list__Q9HDc__DHs+D",c="style_tips__3Gpnu__DHs+D";var u=s(19343),m=s(98434),p=s(47458),h=s(1488),g=s.n(h),f=s(17508),_=s(55431),x=s(70579);const{useOnChange:v}=m.hooks,j=(0,p.createWithIntl)({importMessages:_.A,moduleName:"FormInfo"})(e=>{const{formatMessage:t}=(0,p.useIntl)({moduleName:"FormInfo"}),{className:s,fileSize:l,maxLength:a,multiple:m,size:h,accept:_,children:v,renderTips:j,showUploadList:y,onSave:A,ossUpload:b,onUpload:D,getPermission:N,concurrentCount:S,...w}=Object.assign({},{defaultValue:[],children:t({id:"uploadButtonText"}),accept:[".pdf",".jpg",".png",".jpeg",".doc",".docx",".xls",".xlsx",".html",".msg",".eml",".zip"],renderTips:e=>e,multiple:!0,showUploadList:!0,maxLength:10,fileSize:30,concurrentCount:10},e),[C,F]=o()(w),P=C||[],{fileList:I,onFileSelected:M}=(0,f.lN)({multiple:m,onSave:A,onUpload:b||D,fileSize:l,maxLength:a,value:P,onChange:F,concurrentCount:S}),T=[...I,...P],k=j(t({id:"uploadTips"},{extensionNames:_.map(e=>e.replace(/^\./,"")).join(","),maxLength:a,fileSize:l}),{fileSize:l,maxLength:a,accept:_});return(0,x.jsxs)(n.Space,{direction:"vertical",children:[(0,x.jsxs)(n.Flex,{align:"start",gap:8,vertical:!0,children:[(0,x.jsx)(f.Zi,{...g()(w,["value","onChange"]),size:h,multiple:m,accept:_,className:r()(i,s),onChange:M,children:v}),k&&(0,x.jsx)("div",{className:c,children:k})]}),y&&T.length>0&&(0,x.jsx)(u.List,{className:d,dataSource:T,infoItemRenders:[],getPermission:N||(e=>"delete"===e),apis:{onDelete:e=>{const t=P.slice(0),s=t.indexOf(e);s>-1&&t.splice(s,1),F(t)}}})]})}),y=e=>{let{interceptor:t="file-format",...s}=e;return v({interceptor:t,...s})(j)};y.Field=j;const A=y},92328:(e,t,s)=>{s.d(t,{A:()=>j});var n=s(10986),l=s.n(n),r=s(98434),a=s(55199),o=s(69484);const i="style_money-input__Pyur7__DHs+D",d="style_money-description__9pFk4__DHs+D";var c=s(83136),u=s.n(c),m=s(34677),p=s.n(m),h=s(73884),g=s(70579);const{isNotEmpty:f}=r.util||r.formUtils,{useOnChange:_}=r.hooks,x=e=>{let{chineseEmpty:t,className:s,showError:n,errorDesc:r,transformMoneyToChinese:c,onBlur:m,moneyFormat:_,...x}=e;const[v,j]=(0,h.useState)(""),[y,A]=l()(x),b=p()({controls:!1,precision:2,addonAfter:"\u5143"},x,{max:f(x.max)?x.max>o.e?o.e:x.max:o.e});return(0,g.jsxs)("div",{className:u()(s,"money-input",i),children:[(0,g.jsx)(a.InputNumber,{...b,status:v,formatter:_?e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,","):null,parser:e=>{const t=_?null===e||void 0===e?void 0:e.replace(/\$\s?|(,*)/g,""):e;return f(t)?(Number(t)>Number(b.max)||f(b.min)&&Number(t)<Number(b.min))&&j("error"):j(""),f(t)?Number(t):null},onChange:e=>{A(e)},onBlur:e=>{m&&m(e,j)}}),(0,g.jsx)("div",{className:u()(d),children:"error"===v&&n?r:f(y)?(0,o.A)(c?c(y):y):t})]})},v=e=>_(Object.assign({placeholder:`\u8bf7\u8f93\u5165${e.label||""}`},e))(x);v.Field=x,v.toChineseCharacter=o.A;const j=v},94005:(e,t,s)=>{s.d(t,{$X:()=>_,Ay:()=>f,Wp:()=>x});var n=s(3382),l=s(73884),r=s(98434),a=s(73025),o=s(47458),i=s(47094),d=s(55431),c=s(55199),u=s(76995),m=s(70579);const p="FormInfo",h=e=>{let{items:t,children:s}=e;const[n,r]=(0,l.useState)(0);return s({currentIndex:n,setCurrentIndex:r,stepCacheRef:(0,l.useRef)({}),isLastStep:n===t.length-1,currentProps:Object.assign({},t[n])})},g=e=>{let{footerButtons:t,cancelText:s,completeText:n,nextText:l,items:a,withDecorator:g,...f}=e;return(0,u.A)(Object.assign({},f,{footerButtons:e=>{let{currentIndex:t,isLastStep:i}=e;const{footerButtons:c}=Object.assign({},a[t]);return c||[{children:(0,m.jsx)(o.IntlProvider,{importMessages:d.A,moduleName:p,children:s||(0,m.jsx)(o.FormattedMessage,{id:"Cancel",moduleName:p})}),ButtonComponent:r.CancelButton},{type:"primary",children:(0,m.jsx)(o.IntlProvider,{importMessages:d.A,moduleName:p,children:i?n||(0,m.jsx)(o.FormattedMessage,{id:"Complete",moduleName:p}):l||(0,m.jsx)(o.FormattedMessage,{id:"Next",moduleName:p})}),ButtonComponent:r.SubmitButton,autoClose:!1}]},withDecorator:(e,t)=>{const s=t=>(0,m.jsx)(h,{items:a,children:s=>{var n;let{currentIndex:l,isLastStep:r,setCurrentIndex:o,currentProps:d,stepCacheRef:u}=s;const{formProps:p,title:h,...g}=d,{onSubmit:_,...x}="function"===typeof p?p(t):p,v=Object.assign({},x.data,null===(n=u.current[l])||void 0===n?void 0:n.data);return e(Object.assign({},t,g,{currentIndex:l,isLastStep:r,setCurrentIndex:o,stepCacheRef:u,stepSection:(0,m.jsx)(c.Steps,{className:i.A["form-step-section"],current:l,items:a.map(e=>{let{title:t}=e;return{title:t}})}),formProps:Object.assign({},x,{key:l,data:v,onSubmit:async function(e){u.current[l]={data:e};for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];const i=_&&await _(e,Object.assign({},t,{currentIndex:l,isLastStep:r,setCurrentIndex:o,currentProps:d,stepCacheRef:u}),...n);return f.autoClose&&!r&&!1!==i&&o(e=>e+1),!!r&&i}})}))}});return"function"===typeof g?g(s,t):s(t)},formProps:e=>{let{formProps:t,...s}=e;return Object.assign({},s,t)},children:e=>{let{children:t,stepSection:s,...n}=e;return(0,m.jsxs)(c.Flex,{vertical:!0,gap:24,children:[(0,m.jsx)(c.Flex,{justify:"center",children:s}),"function"===typeof t?t(n):t]})}}))},f=e=>(0,m.jsx)(n.default,{...g(Object.assign({},e,{className:i.A["form-modal"]}))}),_=()=>{const e=(0,n.useModal)();return t=>e(g(Object.assign({},t,{className:i.A["form-modal"]})))},x=e=>{const t=_();if(!e.api){const{modalProps:s,...n}=e;return(0,m.jsx)(c.Button,{...n,onClick:()=>{t(s)}})}return(0,m.jsx)(a.A,{...e,modalFunc:t})}},96252:(e,t,s)=>{s.r(t),s.d(t,{AddressInput:()=>x.NI,AddressSelect:()=>x.TQ,AdvancedSelect:()=>x.JL,Avatar:()=>x.eu,Cascader:()=>x.vx,DatePicker:()=>x.lr,DatePickerToday:()=>x.s3,ErrorTip:()=>h.A,Form:()=>m.A,FormApiButton:()=>i.A,FormDrawer:()=>u.Ay,FormDrawerButton:()=>u.WJ,FormItem:()=>p.A,FormModal:()=>d.Ay,FormModalButton:()=>d.W6,FormStepModal:()=>c.Ay,FormStepModalButton:()=>c.Wp,FunctionSelect:()=>x.d4,IndustrySelect:()=>x.ZN,Input:()=>x.pd,InputNumber:()=>x.YI,InputUpperCase:()=>x.h2,List:()=>a.A,MoneyInput:()=>x.F0,MultiField:()=>g.A,PhoneNumber:()=>x.go,Rate:()=>x.tt,SalaryInput:()=>x.lu,Select:()=>x.l6,SelectInnerInput:()=>v.A,Slider:()=>x.Ap,SuperSelect:()=>x.wD,SuperSelectTableList:()=>x.eM,SuperSelectUser:()=>x.Pg,Switch:()=>x.dO,TableList:()=>o.A,Text:()=>x.EY,TextArea:()=>x.fs,TimePicker:()=>x.AG,TreeSelect:()=>x.f7,TypeDateRangePicker:()=>x.w5,Upload:()=>x._O,default:()=>j,fieldDecorator:()=>r.E,fields:()=>r.A,formModule:()=>x.nk,useFormDrawer:()=>u.Xy,useFormModal:()=>d.Vl,useFormStepModal:()=>c.$X});var n=s(64261),l=s(2196),r=s(15445),a=s(85846),o=s(97056),i=s(35774),d=s(5995),c=s(94005),u=s(48221),m=s(85696),p=s(30891),h=s(45053),g=s(97949),f=s(98434),_={};for(const y in f)["default","Form","FormItem","ErrorTip","fields","fieldDecorator","List","TableList","FormApiButton","FormModal","useFormModal","FormModalButton","FormStepModal","useFormStepModal","FormStepModalButton","FormDrawer","useFormDrawer","FormDrawerButton","MultiField","SelectInnerInput"].indexOf(y)<0&&(_[y]=()=>f[y]);s.d(t,_);var x=s(83799),v=s(18936);(0,n.A)(),l.A.fields=r.A,l.A.List=a.A,l.A.TableList=o.A,l.A.FormApiButton=i.A,l.A.FormModal=d.Ay,l.A.useFormModal=d.Vl,l.A.FormModalButton=d.W6,l.A.FormStepModal=c.Ay,l.A.useFormStepModal=c.$X,l.A.FormStepModalButton=c.Wp,l.A.FormDrawer=u.Ay,l.A.useFormDrawer=u.Xy,l.A.FormDrawerButton=u.WJ,l.A.Form=m.A,l.A.FormItem=p.A,l.A.ErrorTip=h.A,l.A.SubmitButton=f.SubmitButton,l.A.CancelButton=f.CancelButton,l.A.fieldDecorator=r.E,l.A.MultiField=g.A,l.A.useFormContext=f.useFormContext,l.A.hooks=f.hooks,l.A.widget=f.widget,l.A.utils=f.utils,l.A.formUtils=f.formUtils;const j=l.A},96339:(e,t,s)=>{s.d(t,{A:()=>R});var n=s(73884),l=s(17508),r=s(40438),a=s(63743),o=s(3382),i=s(64671),d=s(55199),c=s(53202),u=s.n(c),m=s(33097),p=s.n(m),h=s(83136),g=s.n(h),f=s(51941),_=s(98434),x=s(34677),v=s.n(x);const j="style_upload-btn__-6XtP__DHs+D",y="style_square__UPkfA__DHs+D",A="style_is-loading__wx6Pd__DHs+D",b="style_upload-btn-tips__YtxWz__DHs+D",D="style_drop-tips__N-v59__DHs+D",N="style_preview-area__aV3SN__DHs+D";var S=s(18411),w=s(47458),C=s(55431),F=s(70579);const{useOnChange:P}=_.hooks,I=r.default.Avatar,M="FormInfo",T=(0,l.Ay)(e=>{let{className:t,icon:s,loading:n,value:l,gender:r,width:a,height:o,children:c,shape:u,defaultAvatar:m,displayAvatar:h,apis:f}=e;const _=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(I,{...Object.assign({},"function"===typeof h?h(l):{id:p()(l,"id")}),gender:r,width:64*a/o,height:64,shape:u,defaultAvatar:m,apis:f}),(0,F.jsx)("div",{className:b,children:s||(0,F.jsx)(i.default,{type:"icon-chuanzhaopian",size:16})}),c]});return(0,F.jsx)("div",{className:g()(t,j,{[A]:n,[y]:"square"===u||!(a&&a===o)}),style:{width:64*a/o},children:n?(0,F.jsx)(d.Spin,{children:_}):_})}),k=e=>{let t=e.split(","),s=t[1].substring(0,t[1].length-2),n=t[0].match(/:(.*?);/)[1],l=atob(s),r=l.length,a=new Uint8Array(r);for(;r--;)a[r]=l.charCodeAt(r);return new Blob([a],{type:n})},O=(0,n.forwardRef)((e,t)=>{let{image:s,width:r,height:a,borderRadius:o,preview:c,fileSize:m,accept:p,renderTips:h,getApi:g,shape:_,border:x=1,...v}=e;const j=(0,w.useIntl)({moduleName:M}),[y,A]=(0,n.useState)(0),b=(0,n.useRef)(null),[S,C]=(0,n.useState)(s),[P,I]=(0,n.useState)(1),[T,O]=(0,n.useState)(0),[L,H]=(0,n.useState)(""),E=(0,n.useRef)(null);(0,n.useLayoutEffect)(()=>{A(2*b.current.clientWidth/3)},[]),g({getImage:()=>{const e=E.current.getImage(),t=document.createElement("canvas"),s=t.getContext("2d");return t.width=r,t.height=a,s.drawImage(e,0,0,t.width,t.height),new window.File([k(t.toDataURL())],S.name,{type:S.type})}});const R=()=>{H(E.current.getImage().toDataURL())},z=(0,f.useDebouncedCallback)(R,500);return(0,F.jsx)("div",{ref:b,children:(0,F.jsxs)(d.Row,{wrap:!1,align:"middle",children:[(0,F.jsx)(d.Col,{span:c?16:24,children:y&&(0,F.jsxs)(d.Space,{direction:"vertical",children:[(0,F.jsx)(u(),{...v,ref:E,image:S,scale:P,rotate:T,width:y-2*x,height:a*y/r-2*x*a/r,border:x,color:[0,0,0,.6],borderRadius:o*y/r,onImageReady:R,onImageChange:z}),(0,F.jsx)("div",{className:D,children:h(`${j.formatMessage({id:"PictureFormat"})}${p.map(e=>e.replace(/^\./,"")).join(" ")} ${j.formatMessage({id:"ImageSize"})}${j.formatMessage({id:"NotExceeding"},{size:m})}`,{accept:p,fileSize:m})}),(0,F.jsxs)(d.Row,{gutter:14,align:"middle",children:[(0,F.jsx)(d.Col,{children:(0,F.jsx)(d.Tooltip,{title:j.formatMessage({id:"Rotate"}),placement:"bottom",children:(0,F.jsx)(i.default,{type:"icon-xuanzhuan",onClick:()=>{O(e=>(e-90)%360)}})})}),(0,F.jsx)(d.Col,{children:(0,F.jsx)(d.Tooltip,{title:j.formatMessage({id:"ImageFull"}),placement:"bottom",children:(0,F.jsx)(i.default,{type:"icon-chongman",onClick:()=>{I(1)}})})}),(0,F.jsx)(d.Col,{flex:1,children:(0,F.jsx)(d.Slider,{tooltip:{placement:"bottom",formatter:()=>j.formatMessage({id:"Size"})},value:P,step:.05,min:.2,max:3,onChange:I})}),(0,F.jsx)(d.Col,{children:(0,F.jsx)(l.FI,{accept:p,onChange:e=>{e[0].size>1024*m*1024?d.message.error(j.formatMessage({id:"FileNotExceeding"},{name:e[0].name,size:m})):(O(0),I(1),C(e[0]))},children:j.formatMessage({id:"ReUpload"})})})]})]})}),c&&(0,F.jsx)(d.Col,{span:8,children:(0,F.jsx)("div",{className:N,children:(0,F.jsxs)(d.Space,{direction:"vertical",children:[(0,F.jsx)(d.Avatar,{src:L,shape:_,style:{width:y/2-36,height:(y/2-36)*a/r}}),(0,F.jsx)("div",{style:{textAlign:"center"},children:j.formatMessage({id:"Preview"})})]})})})]})})}),L=()=>{const e=(0,o.useModal)();return t=>{const{image:s,width:n,height:l,borderRadius:r,getApi:a,preview:o,fileSize:i,accept:d,renderTips:c,border:u,dropModalSize:m,...p}=Object.assign({},{title:"\u7f16\u8f91\u5934\u50cf",width:200,height:200,borderRadius:"circle"===t.shape&&t.width&&t.width===t.height?t.width/2:2,preview:!0},t);return e({...p,size:m,children:(0,F.jsx)(O,{preview:o,fileSize:i,accept:d,getApi:a,renderTips:c,width:n,height:l,shape:"circle"===t.shape&&t.width&&t.width===t.height?"circle":"square",borderRadius:r,image:s,border:u,scale:1,rotate:0})})}},H=(0,w.createWithIntl)({importMessages:C.A,moduleName:"FormInfo"})(e=>{var t;let{value:s,gender:l,fileSize:r=2,accept:o=[".jpg",".png",".jpeg"],openEditor:i=!0,apis:c,renderTips:u=e=>e,onChange:m,shape:p="circle",width:h=200,height:g=200,title:f=(0,F.jsx)(w.IntlProvider,{importMessages:C.A,moduleName:"FormInfo",children:(0,F.jsx)(w.FormattedMessage,{id:"Crop",moduleName:"FormInfo"})}),border:_=1,icon:x,dropModalSize:j="small",defaultAvatar:y=S.A,displayAvatar:A}=e;const[b,D]=(0,n.useState)(!1),{apis:N}=(0,a.usePreset)(),P=v()({},N,c),I=P.ossUpload||P.upload||(null===(t=P.file)||void 0===t?void 0:t.upload),k=(0,n.useRef)(null),O=L(),H=(0,w.useIntl)({moduleName:M});return(0,F.jsx)(T,{value:s,gender:l,accept:o,width:h,height:g,shape:p,icon:x,loading:b,defaultAvatar:y,displayAvatar:A,apis:P,onChange:e=>{if(e[0].size>1024*r*1024)return void d.message.error(H.formatMessage({id:"FileNotExceeding"},{name:e[0].name,size:r}));const t=e=>(D(!0),I({file:e}).then(e=>{let{data:t}=e;0===t.code?m(t.data):d.message.error(H.formatMessage({id:"UploadFailed"},{msg:t.msg?":"+t.msg:""}))}).finally(()=>{D(!1)}));i?O({image:e[0],width:h,height:g,title:f,shape:p,border:_,dropModalSize:j,getApi:e=>k.current=e,fileSize:r,accept:o,renderTips:u,onConfirm:()=>{t(k.current.getImage())}}):t(e[0])}})}),E=e=>P(e)(H);E.Field=H,E.useDropModal=L;const R=E},97056:(e,t,s)=>{s.d(t,{A:()=>p});var n=s(55199),l=s(64671),r=s(83136),a=s.n(r),o=s(47094),i=s(68532),d=s(41381),c=s(47458),u=s(55431),m=s(70579);const p=(0,c.createWithIntl)({moduleName:"FormInfo",importMessages:u.A})(e=>{let{className:t,...s}=e;const{formatMessage:r}=(0,c.useIntl)({moduleName:"FormInfo"});return(0,m.jsx)("div",{className:a()(t,o.A["table-list"]),children:(0,m.jsx)(i.TableList,{...s,className:a()(t,o.A["table-list"]),headerRender:(e,t)=>{let{width:s}=t;return(0,m.jsxs)(n.Row,{wrap:!1,className:o.A["table-list-header"],style:{"--col-width":s},children:[e,(0,m.jsx)(n.Col,{className:o.A["table-list-extra"]})]})},headerItemRender:(e,t)=>{let{id:s,isReq:l}=t;return(0,m.jsx)(n.Col,{className:a()({[o.A["is-req"]]:l}),children:e},s)},listRender:(e,t)=>{let{id:s,width:a,onRemove:i,allowRemove:d}=t;return(0,m.jsxs)(n.Row,{wrap:!1,style:{"--col-width":a},children:[e,(0,m.jsx)(n.Col,{className:o.A["table-list-extra"],children:(0,m.jsx)(n.Button,{type:"link",onClick:i,danger:!0,disabled:!d,children:(0,m.jsxs)("span",{children:[(0,m.jsx)(l.default,{type:"shanchu"}),r({id:"delText"})]})})})]},s)},itemRender:e=>(0,m.jsx)(n.Col,{className:o.A["table-list-field"],flex:1,children:e}),children:(e,t)=>{let{title:s,allowAdd:i,onAdd:c}=t;return(0,m.jsx)(d.default.Part,{title:s,className:a()(o.A["table-list-inner"]),extra:i&&(0,m.jsxs)(n.Typography.Link,{className:o.A["list-btn"],onClick:()=>c({isUnshift:!1}),children:[(0,m.jsx)(l.default,{type:"tianjia"}),r({id:"addText"})]}),children:e})}})})})},97949:(e,t,s)=>{s.d(t,{A:()=>m});var n=s(55199),l=s(47458),r=s(64671),a=s(47094),o=s(83136),i=s.n(o),d=s(55431),c=s(68532),u=s(70579);const m=(0,l.createWithIntl)({moduleName:"FormInfo",importMessages:d.A})(e=>{const{formatMessage:t}=(0,l.useIntl)({moduleName:"FormInfo"});return(0,u.jsx)(c.MultiField,{...e,itemRender:(e,t)=>{let{id:s,index:l,allowRemove:o,onRemove:d}=t;return(0,u.jsxs)("div",{className:i()(a.A["mult-field-item"],"mult-field-item",{[a.A["first-item"]]:0===l}),children:[e,(0,u.jsxs)("div",{className:i()("form-info-mult-option"),children:[(0,u.jsx)("div",{className:i()(a.A["react-form__field-label"],"react-form__field-label","mult-field-delete--label")}),(0,u.jsx)(n.Button,{icon:(0,u.jsx)(r.default,{type:"shanchu"}),onClick:d,disabled:!o})]})]},s)},children:(s,l)=>{let{allowAdd:o,onAdd:d}=l;return(0,u.jsxs)("div",{className:i()(a.A["mult-field"],"mult-field"),children:[s,o&&(0,u.jsx)("div",{className:i()("form-info-mult-add-btn"),children:(0,u.jsxs)(n.Button,{className:a.A["mult-field-add-btn"],type:"dashed",onClick:()=>d({isUnshift:!1}),children:[(0,u.jsx)(r.default,{type:"tianjia"}),t({id:"addSomeThing"},{label:e.label})]})})]})}})})}}]);
2
+ //# sourceMappingURL=4474.8524d82a.chunk.js.map