@mi-avalon/libs 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MForm/MFormItemConst.js +1 -1
- package/dist/components/MiModal/index.d.ts +2 -2
- package/dist/components/ThemeContext/index.d.ts +3 -6
- package/dist/constants/date.d.ts +2 -0
- package/dist/constants/date.js +2 -0
- package/dist/constants/pattern.d.ts +66 -0
- package/dist/constants/pattern.js +66 -22
- package/dist/hooks/usePagination.js +4 -2
- package/dist/hooks/useVirtualList.d.ts +1 -27
- package/dist/hooks/useVirtualList.js +56 -46
- package/dist/index.es.js +1917 -1486
- package/dist/index.umd.js +16 -16
- package/dist/utils/calc.d.ts +179 -12
- package/dist/utils/calc.js +355 -81
- package/package.json +5 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(v,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("antd"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","react-dom"],h):(v=typeof globalThis<"u"?globalThis:v||self,h(v.MiAvalonLibs={},v.React,v.antd,v.ReactDOM))})(this,function(v,h,w,gr){"use strict";var is=Object.defineProperty;var os=(v,h,w)=>h in v?is(v,h,{enumerable:!0,configurable:!0,writable:!0,value:w}):v[h]=w;var b=(v,h,w)=>(os(v,typeof h!="symbol"?h+"":h,w),w);const pr=n=>n&&n.__esModule?n:{default:n};function mr(n){if(n&&n.__esModule)return n;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}function br(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(n,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const z=mr(h),vr=pr(gr);function yr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var He={exports:{}},ve={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var yt;function wr(){if(yt)return ve;yt=1;var n=z.default,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,f,c){var d,p={},S=null,D=null;c!==void 0&&(S=""+c),f.key!==void 0&&(S=""+f.key),f.ref!==void 0&&(D=f.ref);for(d in f)r.call(f,d)&&!a.hasOwnProperty(d)&&(p[d]=f[d]);if(l&&l.defaultProps)for(d in f=l.defaultProps,f)p[d]===void 0&&(p[d]=f[d]);return{$$typeof:e,type:l,key:S,ref:D,props:p,_owner:i.current}}return ve.Fragment=t,ve.jsx=o,ve.jsxs=o,ve}var ye={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,27 +14,26 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),M=
|
|
21
|
-
`+
|
|
17
|
+
*/var wt;function Sr(){return wt||(wt=1,process.env.NODE_ENV!=="production"&&function(){var n=z.default,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),$=Symbol.iterator,I="@@iterator";function q(s){if(s===null||typeof s!="object")return null;var u=$&&s[$]||s[I];return typeof u=="function"?u:null}var P=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(s){{for(var u=arguments.length,g=new Array(u>1?u-1:0),y=1;y<u;y++)g[y-1]=arguments[y];N("error",s,g)}}function N(s,u,g){{var y=P.ReactDebugCurrentFrame,k=y.getStackAddendum();k!==""&&(u+="%s",g=g.concat([k]));var j=g.map(function(_){return String(_)});j.unshift("Warning: "+u),Function.prototype.apply.call(console[s],console,j)}}var B=!1,V=!1,J=!1,K=!1,Re=!1,te;te=Symbol.for("react.module.reference");function ae(s){return!!(typeof s=="string"||typeof s=="function"||s===r||s===a||Re||s===i||s===c||s===d||K||s===D||B||V||J||typeof s=="object"&&s!==null&&(s.$$typeof===S||s.$$typeof===p||s.$$typeof===o||s.$$typeof===l||s.$$typeof===f||s.$$typeof===te||s.getModuleId!==void 0))}function he(s,u,g){var y=s.displayName;if(y)return y;var k=u.displayName||u.name||"";return k!==""?g+"("+k+")":g}function je(s){return s.displayName||"Context"}function O(s){if(s==null)return null;if(typeof s.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case r:return"Fragment";case t:return"Portal";case a:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case l:var u=s;return je(u)+".Consumer";case o:var g=s;return je(g._context)+".Provider";case f:return he(s,s.render,"ForwardRef");case p:var y=s.displayName||null;return y!==null?y:O(s.type)||"Memo";case S:{var k=s,j=k._payload,_=k._init;try{return O(_(j))}catch{return null}}}return null}var F=Object.assign,x=0,H,X,Z,se,Q,ge,pe;function Qt(){}Qt.__reactDisabledLog=!0;function Pn(){{if(x===0){H=console.log,X=console.info,Z=console.warn,se=console.error,Q=console.group,ge=console.groupCollapsed,pe=console.groupEnd;var s={configurable:!0,enumerable:!0,value:Qt,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}x++}}function $n(){{if(x--,x===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},s,{value:H}),info:F({},s,{value:X}),warn:F({},s,{value:Z}),error:F({},s,{value:se}),group:F({},s,{value:Q}),groupCollapsed:F({},s,{value:ge}),groupEnd:F({},s,{value:pe})})}x<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ut=P.ReactCurrentDispatcher,ft;function ze(s,u,g){{if(ft===void 0)try{throw Error()}catch(k){var y=k.stack.trim().match(/\n( *(at )?)/);ft=y&&y[1]||""}return`
|
|
18
|
+
`+ft+s}}var dt=!1,Ie;{var Mn=typeof WeakMap=="function"?WeakMap:Map;Ie=new Mn}function er(s,u){if(!s||dt)return"";{var g=Ie.get(s);if(g!==void 0)return g}var y;dt=!0;var k=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=ut.current,ut.current=null,Pn();try{if(u){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(G){y=G}Reflect.construct(s,[],_)}else{try{_.call()}catch(G){y=G}s.call(_.prototype)}}else{try{throw Error()}catch(G){y=G}s()}}catch(G){if(G&&y&&typeof G.stack=="string"){for(var E=G.stack.split(`
|
|
19
|
+
`),W=y.stack.split(`
|
|
20
|
+
`),M=E.length-1,A=W.length-1;M>=1&&A>=0&&E[M]!==W[A];)A--;for(;M>=1&&A>=0;M--,A--)if(E[M]!==W[A]){if(M!==1||A!==1)do if(M--,A--,A<0||E[M]!==W[A]){var ee=`
|
|
21
|
+
`+E[M].replace(" at new "," at ");return s.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",s.displayName)),typeof s=="function"&&Ie.set(s,ee),ee}while(M>=1&&A>=0);break}}}finally{dt=!1,ut.current=j,$n(),Error.prepareStackTrace=k}var be=s?s.displayName||s.name:"",le=be?ze(be):"";return typeof s=="function"&&Ie.set(s,le),le}function An(s,u,g){return er(s,!1)}function zn(s){var u=s.prototype;return!!(u&&u.isReactComponent)}function Le(s,u,g){if(s==null)return"";if(typeof s=="function")return er(s,zn(s));if(typeof s=="string")return ze(s);switch(s){case c:return ze("Suspense");case d:return ze("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case f:return An(s.render);case p:return Le(s.type,u,g);case S:{var y=s,k=y._payload,j=y._init;try{return Le(j(k),u,g)}catch{}}}return""}var Oe=Object.prototype.hasOwnProperty,tr={},rr=P.ReactDebugCurrentFrame;function Ye(s){if(s){var u=s._owner,g=Le(s.type,s._source,u?u.type:null);rr.setExtraStackFrame(g)}else rr.setExtraStackFrame(null)}function In(s,u,g,y,k){{var j=Function.call.bind(Oe);for(var _ in s)if(j(s,_)){var E=void 0;try{if(typeof s[_]!="function"){var W=Error((y||"React class")+": "+g+" type `"+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[_]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw W.name="Invariant Violation",W}E=s[_](u,_,y,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(M){E=M}E&&!(E instanceof Error)&&(Ye(k),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",y||"React class",g,_,typeof E),Ye(null)),E instanceof Error&&!(E.message in tr)&&(tr[E.message]=!0,Ye(k),C("Failed %s type: %s",g,E.message),Ye(null))}}}var Ln=Array.isArray;function ht(s){return Ln(s)}function Yn(s){{var u=typeof Symbol=="function"&&Symbol.toStringTag,g=u&&s[Symbol.toStringTag]||s.constructor.name||"Object";return g}}function Hn(s){try{return nr(s),!1}catch{return!0}}function nr(s){return""+s}function sr(s){if(Hn(s))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Yn(s)),nr(s)}var De=P.ReactCurrentOwner,Vn={key:!0,ref:!0,__self:!0,__source:!0},ar,ir,gt;gt={};function Fn(s){if(Oe.call(s,"ref")){var u=Object.getOwnPropertyDescriptor(s,"ref").get;if(u&&u.isReactWarning)return!1}return s.ref!==void 0}function qn(s){if(Oe.call(s,"key")){var u=Object.getOwnPropertyDescriptor(s,"key").get;if(u&&u.isReactWarning)return!1}return s.key!==void 0}function Bn(s,u){if(typeof s.ref=="string"&&De.current&&u&&De.current.stateNode!==u){var g=O(De.current.type);gt[g]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',O(De.current.type),s.ref),gt[g]=!0)}}function Un(s,u){{var g=function(){ar||(ar=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};g.isReactWarning=!0,Object.defineProperty(s,"key",{get:g,configurable:!0})}}function Wn(s,u){{var g=function(){ir||(ir=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};g.isReactWarning=!0,Object.defineProperty(s,"ref",{get:g,configurable:!0})}}var Zn=function(s,u,g,y,k,j,_){var E={$$typeof:e,type:s,key:u,ref:g,props:_,_owner:j};return E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(E,"_self",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function Gn(s,u,g,y,k){{var j,_={},E=null,W=null;g!==void 0&&(sr(g),E=""+g),qn(u)&&(sr(u.key),E=""+u.key),Fn(u)&&(W=u.ref,Bn(u,k));for(j in u)Oe.call(u,j)&&!Vn.hasOwnProperty(j)&&(_[j]=u[j]);if(s&&s.defaultProps){var M=s.defaultProps;for(j in M)_[j]===void 0&&(_[j]=M[j])}if(E||W){var A=typeof s=="function"?s.displayName||s.name||"Unknown":s;E&&Un(_,A),W&&Wn(_,A)}return Zn(s,E,W,k,y,De.current,_)}}var pt=P.ReactCurrentOwner,or=P.ReactDebugCurrentFrame;function me(s){if(s){var u=s._owner,g=Le(s.type,s._source,u?u.type:null);or.setExtraStackFrame(g)}else or.setExtraStackFrame(null)}var mt;mt=!1;function bt(s){return typeof s=="object"&&s!==null&&s.$$typeof===e}function cr(){{if(pt.current){var s=O(pt.current.type);if(s)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+s+"`."}return""}}function Jn(s){{if(s!==void 0){var u=s.fileName.replace(/^.*[\\\/]/,""),g=s.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+u+":"+g+"."}return""}}var lr={};function Kn(s){{var u=cr();if(!u){var g=typeof s=="string"?s:s.displayName||s.name;g&&(u=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+
|
|
27
|
+
Check the top-level render call using <`+g+">.")}return u}}function ur(s,u){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var g=Kn(u);if(lr[g])return;lr[g]=!0;var y="";s&&s._owner&&s._owner!==pt.current&&(y=" It was passed a child from "+O(s._owner.type)+"."),me(s),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,y),me(null)}}function fr(s,u){{if(typeof s!="object")return;if(ht(s))for(var g=0;g<s.length;g++){var y=s[g];bt(y)&&ur(y,u)}else if(bt(s))s._store&&(s._store.validated=!0);else if(s){var k=q(s);if(typeof k=="function"&&k!==s.entries)for(var j=k.call(s),_;!(_=j.next()).done;)bt(_.value)&&ur(_.value,u)}}}function Xn(s){{var u=s.type;if(u==null||typeof u=="string")return;var g;if(typeof u=="function")g=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===p))g=u.propTypes;else return;if(g){var y=O(u);In(g,s.props,"prop",y,s)}else if(u.PropTypes!==void 0&&!mt){mt=!0;var k=O(u);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Qn(s){{for(var u=Object.keys(s.props),g=0;g<u.length;g++){var y=u[g];if(y!=="children"&&y!=="key"){me(s),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",y),me(null);break}}s.ref!==null&&(me(s),C("Invalid attribute `ref` supplied to `React.Fragment`."),me(null))}}var dr={};function hr(s,u,g,y,k,j){{var _=ae(s);if(!_){var E="";(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var W=Jn(k);W?E+=W:E+=cr();var M;s===null?M="null":ht(s)?M="array":s!==void 0&&s.$$typeof===e?(M="<"+(O(s.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):M=typeof s,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",M,E)}var A=Gn(s,u,g,k,j);if(A==null)return A;if(_){var ee=u.children;if(ee!==void 0)if(y)if(ht(ee)){for(var be=0;be<ee.length;be++)fr(ee[be],s);Object.freeze&&Object.freeze(ee)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else fr(ee,s)}if(Oe.call(u,"key")){var le=O(s),G=Object.keys(u).filter(function(as){return as!=="key"}),vt=G.length>0?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}";if(!dr[le+vt]){var ss=G.length>0?"{"+G.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
28
28
|
let props = %s;
|
|
29
29
|
<%s {...props} />
|
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
|
31
31
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,pt,de,ma,de),gr[de+pt]=!0}}return a===n?fa(I):ua(I),I}}function da(a,f,h){return pr(a,f,h,!0)}function ha(a,f,h){return pr(a,f,h,!1)}var ga=ha,pa=da;Ce.Fragment=n,Ce.jsx=ga,Ce.jsxs=pa}()),Ce}process.env.NODE_ENV==="production"?Fe.exports=wr():Fe.exports=xr();var m=Fe.exports;class _r{constructor(){v(this,"add",function(e,t){let n,s,o,i;try{n=e.toString().split(".")[1].length}catch{n=0}try{s=t.toString().split(".")[1].length}catch{s=0}if(i=Math.abs(n-s),o=Math.pow(10,Math.max(n,s)),i>0){let l=Math.pow(10,i);n>s?(e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""))*l):(e=Number(e.toString().replace(".",""))*l,t=Number(t.toString().replace(".","")))}else e=Number(e==null?void 0:e.toString().replace(".","")),t=Number(t==null?void 0:t.toString().replace(".",""));return(e+t)/o});v(this,"sub",function(e,t){let n,s,o,i;try{n=e.toString().split(".")[1].length}catch{n=0}try{s=t.toString().split(".")[1].length}catch{s=0}return o=Math.pow(10,Math.max(n,s)),i=n>=s?n:s,Number(((e*o-t*o)/o).toFixed(i))});v(this,"mul",function(e,t){let n=0,s=e.toString(),o=t.toString();try{n+=s.split(".")[1].length}catch{}try{n+=o.split(".")[1].length}catch{}return Number(s.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)});v(this,"div",function(e,t){let n=0,s=0,o,i;try{n=e.toString().split(".")[1].length}catch{}try{s=t.toString().split(".")[1].length}catch{}return o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,s-n)})}}const Er=new _r,Oe=class Oe{constructor(){v(this,"callbacks",[]);v(this,"pending",!1);v(this,"timerFunc");this.timerFunc=this.determineTimerFunc()}determineTimerFunc(){if(typeof Promise<"u"){const e=Promise.resolve();return()=>e.then(this.flushCallbacks.bind(this))}if(typeof MutationObserver<"u"&&typeof window<"u"){let e=1;const t=new MutationObserver(this.flushCallbacks.bind(this)),n=document.createTextNode(String(e));return t.observe(n,{characterData:!0}),()=>{e=(e+1)%2,n.data=String(e)}}return()=>setTimeout(this.flushCallbacks.bind(this),0)}flushCallbacks(){this.pending=!1;const e=this.callbacks.slice(0);this.callbacks.length=0;for(let t=0;t<e.length;t++)e[t]()}nextTick(e,t){let n;if(this.callbacks.push(()=>{if(e)try{e.call(t)}catch(s){console.error("Error in nextTick:",s)}else n&&n()}),this.pending||(this.pending=!0,this.timerFunc()),!e&&typeof Promise<"u")return new Promise(s=>{n=s})}static nextTick(e,t){return Oe.instance.nextTick(e,t)}static get instance(){return this._instance||(this._instance=new Oe),this._instance}};v(Oe,"_instance");let Se=Oe;const Rr=Se.instance.nextTick.bind(Se.instance);var he={},Ue,Be,we=Cr.default;if(process.env.NODE_ENV==="production")Be=he.createRoot=we.createRoot,Ue=he.hydrateRoot=we.hydrateRoot;else{var Ne=we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Be=he.createRoot=function(r,e){Ne.usingClientEntryPoint=!0;try{return we.createRoot(r,e)}finally{Ne.usingClientEntryPoint=!1}},Ue=he.hydrateRoot=function(r,e,t){Ne.usingClientEntryPoint=!0;try{return we.hydrateRoot(r,e,t)}finally{Ne.usingClientEntryPoint=!1}}}const Or=yr({__proto__:null,get createRoot(){return Be},default:he,get hydrateRoot(){return Ue}},[he]),{createRoot:jr}=Or;let ne=null,oe=null;function Pr(){return ne||(ne=document.createElement("div"),document.body.appendChild(ne)),ne}function bt(r,e){const t=Pr();let n={open:!0,...e,onClosed:e.onClosed||(c=>{u(c)})};if(!oe)try{oe=jr(t)}catch(c){return console.error("Failed to create root:",c),{destroy:()=>{},update:()=>{}}}const s=()=>{oe&&(oe.unmount(),oe=null),ne&&ne.parentNode&&(ne.parentNode.removeChild(ne),ne=null)},o=c=>{typeof n.onClosed=="function"&&n.onClosed(c),s()},i=c=>{oe&&oe.render(m.jsx(r,{...c}))},l=c=>{n=typeof c=="function"?c(n):{...n,...c},i(n)},u=c=>{n.open?(n={...n,open:!1,onClosed:g=>{e.onClosed&&e.onClosed(g||c),o(g||c)}},i(n)):console.warn("Modal is already closed.")};return i(n),{destroy:u,update:l}}const Tr=()=>{},xe=(r,e)=>{const t=r;let n=r;if(e.includes(" ")){n="";const s=e==null?void 0:e.split(" ");for(const o of s)n+=` ${t}-${o}`}else e&&(n=`${r}-${e}`);return n},kr=(r,e)=>{const t=e==null?void 0:e.split(".");let n=r;for(const s of t)n=n[s];return n},yt=r=>{for(const e in r)r[e]===null&&delete r[e];return r},We=(r,e)=>{let t=null;return(...n)=>{t&&clearTimeout(t),t=setTimeout(()=>{r(...n)},e)}},Nr=(r,e)=>{let t=null,n=0;return(...s)=>{const o=Date.now();t?o-n>=e&&(r(...s),n=o):(r(...s),n=o,t=setTimeout(()=>{t=null},e))}};class Dr{static isValid(e){return/^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/i.test(e)}static compare(e,t){if(!this.isValid(e)||!this.isValid(t))throw new Error("Invalid version format");const n=u=>u.replace(/^v/,"").split(/[-+]/)[0].split("."),s=n(e),o=n(t);for(let u=0;u<3;u++){const c=parseInt(s[u]||"0",10),g=parseInt(o[u]||"0",10);if(c>g)return 1;if(c<g)return-1}const i=e.match(/-(.+)/),l=t.match(/-(.+)/);return i&&!l?-1:!i&&l?1:i&&l?i[1].localeCompare(l[1]):0}static satisfies(e,t){if(!this.isValid(e))return!1;const n=/([<>]=?|==?|\^|~)?\s*v?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+)?)/g,s=t.match(n);return!s||s.length===0?!1:s.every(o=>{const i=o.match(/([<>]=?|==?|\^|~)?\s*(v?[0-9].*)/);if(!i)return!1;const l=i[1]||"==",u=i[2];if(!this.isValid(u))return!1;const c=this.compare(e,u);switch(l){case">":return c>0;case">=":return c>=0;case"<":return c<0;case"<=":return c<=0;case"^":return this.caretRange(e,u);case"~":return this.tildeRange(e,u);case"=":case"==":default:return c===0}})}static caretRange(e,t){const n=l=>l.replace(/^v/,"").split(/[-+]/)[0].split("."),s=n(e),o=n(t);let i=0;for(let l=0;l<o.length;l++)if(parseInt(o[l],10)!==0){i=l;break}for(let l=0;l<=i;l++){const u=parseInt(s[l]||"0",10),c=parseInt(o[l]||"0",10);if(u!==c)return!1}return this.compare(e,t)>=0}static tildeRange(e,t){const n=u=>u.replace(/^v/,"").split(/[-+]/)[0].split("."),s=n(e),o=n(t);for(let u=0;u<o.length-1;u++){const c=parseInt(s[u]||"0",10),g=parseInt(o[u]||"0",10);if(c!==g)return!1}const i=parseInt(s[o.length-1]||"0",10),l=parseInt(o[o.length-1]||"0",10);return i>=l}static getMajor(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.replace(/^v/,"").split(".");return parseInt(t[0],10)}static getMinor(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.replace(/^v/,"").split(".");return parseInt(t[1]||"0",10)}static getPatch(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.replace(/^v/,"").split(".");return parseInt(t[2]||"0",10)}static getPrerelease(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.match(/-([^+]+)/);return t?t[1]:null}static getBuildMetadata(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.match(/\+([^]+)/);return t?t[1]:null}}const Ct=p.createContext({theme:{cssVar:!0,algorithm:[w.theme.defaultAlgorithm]}}),Ar=Ct.Provider;function St(){return p.useContext(Ct)}function ie(r){const{theme:e}=St();return m.jsx(w.ConfigProvider,{theme:e,children:r.children})}const wt=(r="")=>xe("items-row",r),xt=r=>r.items?m.jsx(ie,{children:m.jsx("div",{className:`${wt()} ${r.className||""}`,style:r.style,children:(r.items||[]).map((e,t)=>{const n=`${wt("item")} ${e.className}`;return e.render?m.jsx("span",{className:n,children:e.render()},t):m.jsx(w.Button,{className:n,...e.btnProps,type:e.type||"primary",onClick:e.onClick,children:e.label},e.label)})})}):null,Ca="",_e=(r="")=>xe("m-breadcrumb",r),$r=r=>{const{routes:e,customItems:t,style:n,className:s,offsetTop:o=64,mainAppBaseUrl:i,microAppName:l}=r,u=z.useRef(null),c=z.useCallback(()=>{var d,C;(C=(d=u.current)==null?void 0:d.updatePosition)==null||C.call(d)},[]);z.useEffect(()=>(window.addEventListener("scroll",c,!0),()=>window.removeEventListener("scroll",c)),[c]);const g=z.useCallback(d=>{if(!d)return"";const C=d.replace(/^\/+/,"");return`/${[i==null?void 0:i.replace(/\/+$/,""),l==null?void 0:l.replace(/\/+$/,""),C].filter(Boolean).join("/")}`},[i,l]);return m.jsx(ie,{children:m.jsx("div",{className:`${_e()} ${s||""}`,style:n,children:m.jsx(w.Affix,{ref:u,offsetTop:o,children:m.jsxs(w.Card,{className:_e("container"),rootClassName:_e("body"),variant:"borderless",children:[m.jsx(w.Breadcrumb,{className:_e("inner-breadcrumb"),style:{fontSize:"18px"},children:e==null?void 0:e.map(d=>m.jsx(w.Breadcrumb.Item,{children:d.url?m.jsx("a",{href:`#${g(d.url)}`,children:d.name}):d.name},d.url||d.name))}),m.jsx("div",{className:_e("custom-item-wrapper"),children:m.jsx(xt,{items:t})})]})})})})},_t=r=>{const{data:e,title:t,column:n=3,lineHeight:s,align:o="left",itemLayout:i,colon:l=!0,bordered:u=!1,style:c,className:g,labelStyle:d,contentStyle:C}=r,k={...s?{lineHeight:`${s}px`}:{},textAlign:o,...i!=null&&i.label?{width:`${i.label}px`}:{},...d},D={...s?{lineHeight:`${s}px`}:{},...i!=null&&i.value?{width:`${i.value}px`}:{},...C};return m.jsx(ie,{children:m.jsx(w.Descriptions,{title:t,column:n,colon:l,bordered:u,style:c,className:g,labelStyle:k,contentStyle:D,children:e.map((A,V)=>{var N;return m.jsx(w.Descriptions.Item,{label:A.label,span:A.span,children:A.value||"-"},((N=A.label)==null?void 0:N.toString())||V)})})})};_t.displayName="MDescriptions";const Sa="";var Mr=p.createContext({});const Et=Mr;function ge(){return ge=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},ge.apply(null,arguments)}function Ir(r){if(Array.isArray(r))return r}function zr(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,s,o,i,l=[],u=!0,c=!1;try{if(o=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(g){c=!0,s=g}finally{try{if(!u&&t.return!=null&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw s}}return l}}function Rt(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function Yr(r,e){if(r){if(typeof r=="string")return Rt(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Rt(r,e):void 0}}function Hr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ot(r,e){return Ir(r)||zr(r,e)||Yr(r,e)||Hr()}function ce(r){"@babel/helpers - typeof";return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(r)}function Lr(r,e){if(ce(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(ce(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Vr(r){var e=Lr(r,"string");return ce(e)=="symbol"?e:e+""}function B(r,e,t){return(e=Vr(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Fr(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function jt(r,e){if(r==null)return{};var t,n,s=Fr(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)t=o[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(s[t]=r[t])}return s}var Pt={exports:{}};/*!
|
|
32
|
+
<%s key={someKey} {...props} />`,vt,le,ss,le),dr[le+vt]=!0}}return s===r?Qn(A):Xn(A),A}}function es(s,u,g){return hr(s,u,g,!0)}function ts(s,u,g){return hr(s,u,g,!1)}var rs=ts,ns=es;ye.Fragment=r,ye.jsx=rs,ye.jsxs=ns}()),ye}process.env.NODE_ENV==="production"?He.exports=wr():He.exports=Sr();var m=He.exports;const Y=class Y{static getDecimalLength(e){const t=e.toString(),r=t.indexOf(".");return r===-1?0:t.length-r-1}static toInteger(e,t){const r=e.toString().replace(".","");return Number(r)*Math.pow(10,t)}add(...e){return e.length<2?e[0]||0:e.reduce((t,r)=>{const i=Y.getDecimalLength(t),a=Y.getDecimalLength(r),o=Math.max(i,a),l=Math.pow(10,o),f=Y.toInteger(t,o-i),c=Y.toInteger(r,o-a);return(f+c)/l})}sub(e,t){const r=Y.getDecimalLength(e),i=Y.getDecimalLength(t),a=Math.max(r,i),o=Math.pow(10,a);return Number(((e*o-t*o)/o).toFixed(a))}mul(...e){return e.length<2?e[0]||0:e.reduce((t,r)=>{const i=Y.getDecimalLength(t)+Y.getDecimalLength(r),a=Number(t.toString().replace(".","")),o=Number(r.toString().replace(".",""));return a*o/Math.pow(10,i)})}div(e,t){if(t===0)throw new Error("除数不能为零");const r=1+Number.EPSILON,i=Y.getDecimalLength(e),a=Y.getDecimalLength(t),o=Number(e.toString().replace(".",""))*r,l=Number(t.toString().replace(".",""))*r;return o/l*Math.pow(10,a-i)}round(e,t=0){const r=Math.pow(10,t);return Math.round(e*r)/r}percent(e,t){return this.div(this.mul(e,t),100)}average(...e){return e.length===0?0:this.div(e.reduce((t,r)=>this.add(t,r)),e.length)}approxEqual(e,t,r=1e-10){return Math.abs(this.sub(e,t))<r}ln(e,t=10){if(e<=0)throw new Error("对数函数的输入必须为正数");if(e===1)return 0;let r=0;const i=Math.pow(10,-t-1);let a=this.div(this.sub(e,1),this.add(e,1));const o=this.mul(a,a);let l=a,f=1;do r=this.add(r,this.div(l,f)),l=this.mul(l,o),f+=2;while(Math.abs(l)>i);return this.round(this.mul(2,r),t)}exp(e,t=10){if(e===0)return 1;if(e===1)return Math.E;let r=1,i=1;const a=Math.pow(10,-t-1);let o=1,l=0;do l=r,i=this.div(this.mul(i,e),o),r=this.add(r,i),o++;while(Math.abs(i)>a&&!this.approxEqual(r,l,a));return this.round(r,t)}sqrt(e,t=10){if(e<0)throw new Error("负数平方根需使用复数计算");if(e===0)return 0;let r=e/2;const i=Math.pow(10,-t-1);do r=this.div(this.add(r,this.div(e,r)),2);while(Math.abs(this.sub(this.mul(r,r),e))>i);return this.round(r,t)}safeLog(e,t={}){const{safe:r=!0,replaceNeg:i=NaN,replaceZero:a=-1/0}=t;if(e>0)return Math.log(e);if(!r)throw new Error("Invalid input");return e===0?a:i}factorial(e){if(!Number.isInteger(e)||e<0)return NaN;if(e<0)return NaN;if(e>Number.MAX_SAFE_INTEGER){let r=BigInt(1);for(let i=2;i<=e;i++)r*=BigInt(i);return Number(r.toString())}if(e>170)return 1/0;if(Y.factorialCache.has(e))return Y.factorialCache.get(e);let t=1;for(let r=2;r<=e;r++){if(Y.factorialCache.has(r)){t=Y.factorialCache.get(r);continue}t=this.mul(t,r),Y.factorialCache.set(r,t)}return t}hypFunc(e,t,r=10){const i=this.exp(e,r+2),a=this.exp(-e,r+2);switch(t){case"sinh":return this.round(this.div(this.sub(i,a),2),r);case"cosh":return this.round(this.div(this.add(i,a),2),r);case"tanh":return this.round(this.div(this.sub(i,a),this.add(i,a)),r);default:throw new Error("不支持的函数类型")}}permComb(e,t,r){if(!Number.isInteger(e)||!Number.isInteger(t)||t>e||t<0)return NaN;let i=1;for(let a=0;a<t;a++)i=this.mul(i,e-a),r==="combination"&&(i=this.div(i,a+1));return i}gcd(e,t){for(e=Math.abs(e),t=Math.abs(t);t!==0;){const r=t;t=e%t,e=r}return e}lcm(e,t){return this.div(this.mul(e,t),this.gcd(e,t))}};b(Y,"factorialCache",new Map);let Ve=Y;const Cr=new Ve,ke=class ke{constructor(){b(this,"callbacks",[]);b(this,"pending",!1);b(this,"timerFunc");this.timerFunc=this.determineTimerFunc()}determineTimerFunc(){if(typeof Promise<"u"){const e=Promise.resolve();return()=>e.then(this.flushCallbacks.bind(this))}if(typeof MutationObserver<"u"&&typeof window<"u"){let e=1;const t=new MutationObserver(this.flushCallbacks.bind(this)),r=document.createTextNode(String(e));return t.observe(r,{characterData:!0}),()=>{e=(e+1)%2,r.data=String(e)}}return()=>setTimeout(this.flushCallbacks.bind(this),0)}flushCallbacks(){this.pending=!1;const e=this.callbacks.slice(0);this.callbacks.length=0;for(let t=0;t<e.length;t++)e[t]()}nextTick(e,t){let r;if(this.callbacks.push(()=>{if(e)try{e.call(t)}catch(i){console.error("Error in nextTick:",i)}else r&&r()}),this.pending||(this.pending=!0,this.timerFunc()),!e&&typeof Promise<"u")return new Promise(i=>{r=i})}static nextTick(e,t){return ke.instance.nextTick(e,t)}static get instance(){return this._instance||(this._instance=new ke),this._instance}};b(ke,"_instance");let we=ke;const xr=we.instance.nextTick.bind(we.instance);var ue={},Fe,qe,Se=vr.default;if(process.env.NODE_ENV==="production")qe=ue.createRoot=Se.createRoot,Fe=ue.hydrateRoot=Se.hydrateRoot;else{var Te=Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;qe=ue.createRoot=function(n,e){Te.usingClientEntryPoint=!0;try{return Se.createRoot(n,e)}finally{Te.usingClientEntryPoint=!1}},Fe=ue.hydrateRoot=function(n,e,t){Te.usingClientEntryPoint=!0;try{return Se.hydrateRoot(n,e,t)}finally{Te.usingClientEntryPoint=!1}}}const Er=br({__proto__:null,get createRoot(){return qe},default:ue,get hydrateRoot(){return Fe}},[ue]),{createRoot:_r}=Er;let re=null,ie=null;function kr(){return re||(re=document.createElement("div"),document.body.appendChild(re)),re}function St(n,e){const t=kr();let r={open:!0,...e,onClosed:e.onClosed||(c=>{f(c)})};if(!ie)try{ie=_r(t)}catch(c){return console.error("Failed to create root:",c),{destroy:()=>{},update:()=>{}}}const i=()=>{ie&&(ie.unmount(),ie=null),re&&re.parentNode&&(re.parentNode.removeChild(re),re=null)},a=c=>{typeof r.onClosed=="function"&&r.onClosed(c),i()},o=c=>{ie&&ie.render(m.jsx(n,{...c}))},l=c=>{r=typeof c=="function"?c(r):{...r,...c},o(r)},f=c=>{r.open?(r={...r,open:!1,onClosed:d=>{e.onClosed&&e.onClosed(d||c),a(d||c)}},o(r)):console.warn("Modal is already closed.")};return o(r),{destroy:f,update:l}}const Rr=()=>{},Ce=(n,e)=>{const t=n;let r=n;if(e.includes(" ")){r="";const i=e==null?void 0:e.split(" ");for(const a of i)r+=` ${t}-${a}`}else e&&(r=`${n}-${e}`);return r},jr=(n,e)=>{const t=e==null?void 0:e.split(".");let r=n;for(const i of t)r=r[i];return r},Ct=n=>{for(const e in n)n[e]===null&&delete n[e];return n},Be=(n,e)=>{let t=null;return(...r)=>{t&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}},Or=(n,e)=>{let t=null,r=0;return(...i)=>{const a=Date.now();t?a-r>=e&&(n(...i),r=a):(n(...i),r=a,t=setTimeout(()=>{t=null},e))}};class Dr{static isValid(e){return/^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/i.test(e)}static compare(e,t){if(!this.isValid(e)||!this.isValid(t))throw new Error("Invalid version format");const r=f=>f.replace(/^v/,"").split(/[-+]/)[0].split("."),i=r(e),a=r(t);for(let f=0;f<3;f++){const c=parseInt(i[f]||"0",10),d=parseInt(a[f]||"0",10);if(c>d)return 1;if(c<d)return-1}const o=e.match(/-(.+)/),l=t.match(/-(.+)/);return o&&!l?-1:!o&&l?1:o&&l?o[1].localeCompare(l[1]):0}static satisfies(e,t){if(!this.isValid(e))return!1;const r=/([<>]=?|==?|\^|~)?\s*v?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+)?)/g,i=t.match(r);return!i||i.length===0?!1:i.every(a=>{const o=a.match(/([<>]=?|==?|\^|~)?\s*(v?[0-9].*)/);if(!o)return!1;const l=o[1]||"==",f=o[2];if(!this.isValid(f))return!1;const c=this.compare(e,f);switch(l){case">":return c>0;case">=":return c>=0;case"<":return c<0;case"<=":return c<=0;case"^":return this.caretRange(e,f);case"~":return this.tildeRange(e,f);case"=":case"==":default:return c===0}})}static caretRange(e,t){const r=l=>l.replace(/^v/,"").split(/[-+]/)[0].split("."),i=r(e),a=r(t);let o=0;for(let l=0;l<a.length;l++)if(parseInt(a[l],10)!==0){o=l;break}for(let l=0;l<=o;l++){const f=parseInt(i[l]||"0",10),c=parseInt(a[l]||"0",10);if(f!==c)return!1}return this.compare(e,t)>=0}static tildeRange(e,t){const r=f=>f.replace(/^v/,"").split(/[-+]/)[0].split("."),i=r(e),a=r(t);for(let f=0;f<a.length-1;f++){const c=parseInt(i[f]||"0",10),d=parseInt(a[f]||"0",10);if(c!==d)return!1}const o=parseInt(i[a.length-1]||"0",10),l=parseInt(a[a.length-1]||"0",10);return o>=l}static getMajor(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.replace(/^v/,"").split(".");return parseInt(t[0],10)}static getMinor(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.replace(/^v/,"").split(".");return parseInt(t[1]||"0",10)}static getPatch(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.replace(/^v/,"").split(".");return parseInt(t[2]||"0",10)}static getPrerelease(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.match(/-([^+]+)/);return t?t[1]:null}static getBuildMetadata(e){if(!this.isValid(e))throw new Error("Invalid version format");const t=e.match(/\+([^]+)/);return t?t[1]:null}}const xt=h.createContext({theme:{cssVar:!0,algorithm:[w.theme.defaultAlgorithm]}}),Tr=xt.Provider;function Et(){return h.useContext(xt)}function oe(n){const{theme:e}=Et();return m.jsx(w.ConfigProvider,{theme:e,children:n.children})}const _t=(n="")=>Ce("items-row",n),kt=n=>n.items?m.jsx(oe,{children:m.jsx("div",{className:`${_t()} ${n.className||""}`,style:n.style,children:(n.items||[]).map((e,t)=>{const r=`${_t("item")} ${e.className}`;return e.render?m.jsx("span",{className:r,children:e.render()},t):m.jsx(w.Button,{className:r,...e.btnProps,type:e.type||"primary",onClick:e.onClick,children:e.label},e.label)})})}):null,cs="",xe=(n="")=>Ce("m-breadcrumb",n),Nr=n=>{const{routes:e,customItems:t,style:r,className:i,offsetTop:a=64,mainAppBaseUrl:o,microAppName:l}=n,f=z.useRef(null),c=z.useCallback(()=>{var p,S;(S=(p=f.current)==null?void 0:p.updatePosition)==null||S.call(p)},[]);z.useEffect(()=>(window.addEventListener("scroll",c,!0),()=>window.removeEventListener("scroll",c)),[c]);const d=z.useCallback(p=>{if(!p)return"";const S=p.replace(/^\/+/,"");return`/${[o==null?void 0:o.replace(/\/+$/,""),l==null?void 0:l.replace(/\/+$/,""),S].filter(Boolean).join("/")}`},[o,l]);return m.jsx(oe,{children:m.jsx("div",{className:`${xe()} ${i||""}`,style:r,children:m.jsx(w.Affix,{ref:f,offsetTop:a,children:m.jsxs(w.Card,{className:xe("container"),rootClassName:xe("body"),variant:"borderless",children:[m.jsx(w.Breadcrumb,{className:xe("inner-breadcrumb"),style:{fontSize:"18px"},children:e==null?void 0:e.map(p=>m.jsx(w.Breadcrumb.Item,{children:p.url?m.jsx("a",{href:`#${d(p.url)}`,children:p.name}):p.name},p.url||p.name))}),m.jsx("div",{className:xe("custom-item-wrapper"),children:m.jsx(kt,{items:t})})]})})})})},Rt=n=>{const{data:e,title:t,column:r=3,lineHeight:i,align:a="left",itemLayout:o,colon:l=!0,bordered:f=!1,style:c,className:d,labelStyle:p,contentStyle:S}=n,D={...i?{lineHeight:`${i}px`}:{},textAlign:a,...o!=null&&o.label?{width:`${o.label}px`}:{},...p},$={...i?{lineHeight:`${i}px`}:{},...o!=null&&o.value?{width:`${o.value}px`}:{},...S};return m.jsx(oe,{children:m.jsx(w.Descriptions,{title:t,column:r,colon:l,bordered:f,style:c,className:d,labelStyle:D,contentStyle:$,children:e.map((I,q)=>{var P;return m.jsx(w.Descriptions.Item,{label:I.label,span:I.span,children:I.value||"-"},((P=I.label)==null?void 0:P.toString())||q)})})})};Rt.displayName="MDescriptions";const ls="",jt=h.createContext({});var Ot={exports:{}};/*!
|
|
34
33
|
Copyright (c) 2018 Jed Watson.
|
|
35
34
|
Licensed under the MIT License (MIT), see
|
|
36
35
|
http://jedwatson.github.io/classnames
|
|
37
|
-
*/(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var o="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(o=s(o,n(l)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var l in o)e.call(o,l)&&o[l]&&(i=s(i,l));return i}function s(o,i){return i?o?o+" "+i:o+i:o}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(Pt);var Ur=Pt.exports;const Br=Sr(Ur),H=Math.round;function qe(r,e){const t=r.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(s=>parseFloat(s));for(let s=0;s<3;s+=1)n[s]=e(n[s]||0,t[s]||"",s);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const Tt=(r,e,t)=>t===0?r:r/100;function Ee(r,e){const t=e||255;return r>t?t:r<0?0:r}class pe{constructor(e){B(this,"isValid",!0),B(this,"r",0),B(this,"g",0),B(this,"b",0),B(this,"a",1),B(this,"_h",void 0),B(this,"_s",void 0),B(this,"_l",void 0),B(this,"_v",void 0),B(this,"_max",void 0),B(this,"_min",void 0),B(this,"_brightness",void 0);function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let s=function(o){return n.startsWith(o)};const n=e.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):s("rgb")?this.fromRgbString(n):s("hsl")?this.fromHslString(n):(s("hsv")||s("hsb"))&&this.fromHsvString(n)}else if(e instanceof pe)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=Ee(e.r),this.g=Ee(e.g),this.b=Ee(e.b),this.a=typeof e.a=="number"?Ee(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(o){const i=o/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),s=e(this.b);return .2126*t+.7152*n+.0722*s}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=H(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let s=this.getLightness()-e/100;return s<0&&(s=0),this._c({h:t,s:n,l:s,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let s=this.getLightness()+e/100;return s>1&&(s=1),this._c({h:t,s:n,l:s,a:this.a})}mix(e,t=50){const n=this._c(e),s=t/100,o=l=>(n[l]-this[l])*s+this[l],i={r:H(o("r")),g:H(o("g")),b:H(o("b")),a:H(o("a")*100)/100};return this._c(i)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),s=o=>H((this[o]*this.a+t[o]*t.a*(1-this.a))/n);return this._c({r:s("r"),g:s("g"),b:s("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const s=(this.b||0).toString(16);if(e+=s.length===2?s:"0"+s,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=H(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=H(this.getSaturation()*100),n=H(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const s=this.clone();return s[e]=Ee(t,n),s}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(s,o){return parseInt(t[s]+t[o||s],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:s}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof s=="number"?s:1,t<=0){const C=H(n*255);this.r=C,this.g=C,this.b=C}let o=0,i=0,l=0;const u=e/60,c=(1-Math.abs(2*n-1))*t,g=c*(1-Math.abs(u%2-1));u>=0&&u<1?(o=c,i=g):u>=1&&u<2?(o=g,i=c):u>=2&&u<3?(i=c,l=g):u>=3&&u<4?(i=g,l=c):u>=4&&u<5?(o=g,l=c):u>=5&&u<6&&(o=c,l=g);const d=n-c/2;this.r=H((o+d)*255),this.g=H((i+d)*255),this.b=H((l+d)*255)}fromHsv({h:e,s:t,v:n,a:s}){this._h=e%360,this._s=t,this._v=n,this.a=typeof s=="number"?s:1;const o=H(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const i=e/60,l=Math.floor(i),u=i-l,c=H(n*(1-t)*255),g=H(n*(1-t*u)*255),d=H(n*(1-t*(1-u))*255);switch(l){case 0:this.g=d,this.b=c;break;case 1:this.r=g,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=g;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=g;break}}fromHsvString(e){const t=qe(e,Tt);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=qe(e,Tt);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=qe(e,(n,s)=>s.includes("%")?H(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}var De=2,kt=.16,Wr=.05,qr=.05,Zr=.15,Nt=5,Dt=4,Gr=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function At(r,e,t){var n;return Math.round(r.h)>=60&&Math.round(r.h)<=240?n=t?Math.round(r.h)-De*e:Math.round(r.h)+De*e:n=t?Math.round(r.h)+De*e:Math.round(r.h)-De*e,n<0?n+=360:n>=360&&(n-=360),n}function $t(r,e,t){if(r.h===0&&r.s===0)return r.s;var n;return t?n=r.s-kt*e:e===Dt?n=r.s+kt:n=r.s+Wr*e,n>1&&(n=1),t&&e===Nt&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function Mt(r,e,t){var n;return t?n=r.v+qr*e:n=r.v-Zr*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Kr(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],n=new pe(r),s=n.toHsv(),o=Nt;o>0;o-=1){var i=new pe({h:At(s,o,!0),s:$t(s,o,!0),v:Mt(s,o,!0)});t.push(i)}t.push(n);for(var l=1;l<=Dt;l+=1){var u=new pe({h:At(s,l),s:$t(s,l),v:Mt(s,l)});t.push(u)}return e.theme==="dark"?Gr.map(function(c){var g=c.index,d=c.amount;return new pe(e.backgroundColor||"#141414").mix(t[g],d).toHexString()}):t.map(function(c){return c.toHexString()})}var Ze=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ze.primary=Ze[5];function It(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function ee(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?It(Object(t),!0).forEach(function(n){B(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):It(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Jr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Xr(r,e){if(!r)return!1;if(r.contains)return r.contains(e);for(var t=e;t;){if(t===r)return!0;t=t.parentNode}return!1}var zt="data-rc-order",Yt="data-rc-priority",Qr="rc-util-key",Ge=new Map;function Ht(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.mark;return e?e.startsWith("data-")?e:"data-".concat(e):Qr}function Ke(r){if(r.attachTo)return r.attachTo;var e=document.querySelector("head");return e||document.body}function en(r){return r==="queue"?"prependQueue":r?"prepend":"append"}function Je(r){return Array.from((Ge.get(r)||r).children).filter(function(e){return e.tagName==="STYLE"})}function Lt(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Jr())return null;var t=e.csp,n=e.prepend,s=e.priority,o=s===void 0?0:s,i=en(n),l=i==="prependQueue",u=document.createElement("style");u.setAttribute(zt,i),l&&o&&u.setAttribute(Yt,"".concat(o)),t!=null&&t.nonce&&(u.nonce=t==null?void 0:t.nonce),u.innerHTML=r;var c=Ke(e),g=c.firstChild;if(n){if(l){var d=(e.styles||Je(c)).filter(function(C){if(!["prepend","prependQueue"].includes(C.getAttribute(zt)))return!1;var k=Number(C.getAttribute(Yt)||0);return o>=k});if(d.length)return c.insertBefore(u,d[d.length-1].nextSibling),u}c.insertBefore(u,g)}else c.appendChild(u);return u}function tn(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=Ke(e);return(e.styles||Je(t)).find(function(n){return n.getAttribute(Ht(e))===r})}function rn(r,e){var t=Ge.get(r);if(!t||!Xr(document,t)){var n=Lt("",e),s=n.parentNode;Ge.set(r,s),r.removeChild(n)}}function nn(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Ke(t),s=Je(n),o=ee(ee({},t),{},{styles:s});rn(n,o);var i=tn(e,o);if(i){var l,u;if((l=o.csp)!==null&&l!==void 0&&l.nonce&&i.nonce!==((u=o.csp)===null||u===void 0?void 0:u.nonce)){var c;i.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return i.innerHTML!==r&&(i.innerHTML=r),i}var g=Lt(r,o);return g.setAttribute(Ht(o),e),g}function Vt(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}function an(r){return Vt(r)instanceof ShadowRoot}function sn(r){return an(r)?Vt(r):null}var Xe={},Qe=[],on=function(e){Qe.push(e)};function cn(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Qe.reduce(function(n,s){return s(n??"","warning")},e);t&&console.error("Warning: ".concat(t))}}function ln(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Qe.reduce(function(n,s){return s(n??"","note")},e);t&&console.warn("Note: ".concat(t))}}function un(){Xe={}}function Ft(r,e,t){!e&&!Xe[t]&&(r(!1,t),Xe[t]=!0)}function Ae(r,e){Ft(cn,r,e)}function fn(r,e){Ft(ln,r,e)}Ae.preMessage=on,Ae.resetWarned=un,Ae.noteOnce=fn;function dn(r){return r.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function hn(r,e){Ae(r,"[@ant-design/icons] ".concat(e))}function Ut(r){return ce(r)==="object"&&typeof r.name=="string"&&typeof r.theme=="string"&&(ce(r.icon)==="object"||typeof r.icon=="function")}function Bt(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(r).reduce(function(e,t){var n=r[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[dn(t)]=n}return e},{})}function et(r,e,t){return t?z.default.createElement(r.tag,ee(ee({key:e},Bt(r.attrs)),t),(r.children||[]).map(function(n,s){return et(n,"".concat(e,"-").concat(r.tag,"-").concat(s))})):z.default.createElement(r.tag,ee({key:e},Bt(r.attrs)),(r.children||[]).map(function(n,s){return et(n,"".concat(e,"-").concat(r.tag,"-").concat(s))}))}function Wt(r){return Kr(r)[0]}function qt(r){return r?Array.isArray(r)?r:[r]:[]}var gn=`
|
|
36
|
+
*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var a="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(a=i(a,r(l)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return t.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var l in a)e.call(a,l)&&a[l]&&(o=i(o,l));return o}function i(a,o){return o?a?a+" "+o:a+o:a}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(Ot);var Pr=Ot.exports;const $r=yr(Pr),Mr={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},L=Math.round;function Ue(n,e){const t=n.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=t.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,t[i]||"",i);return t[3]?r[3]=t[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Dt=(n,e,t)=>t===0?n:n/100;function Ee(n,e){const t=e||255;return n>t?t:n<0?0:n}class fe{constructor(e){b(this,"isValid",!0);b(this,"r",0);b(this,"g",0);b(this,"b",0);b(this,"a",1);b(this,"_h");b(this,"_s");b(this,"_l");b(this,"_v");b(this,"_max");b(this,"_min");b(this,"_brightness");function t(r){return r[0]in e&&r[1]in e&&r[2]in e}if(e)if(typeof e=="string"){let i=function(a){return r.startsWith(a)};const r=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(i("rgb"))this.fromRgbString(r);else if(i("hsl"))this.fromHslString(r);else if(i("hsv")||i("hsb"))this.fromHsvString(r);else{const a=Mr[r.toLowerCase()];a&&this.fromHexString(parseInt(a,36).toString(16).padStart(6,"0"))}}else if(e instanceof fe)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=Ee(e.r),this.g=Ee(e.g),this.b=Ee(e.b),this.a=typeof e.a=="number"?Ee(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(a){const o=a/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}const t=e(this.r),r=e(this.g),i=e(this.b);return .2126*t+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=L(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:t,s:r,l:i,a:this.a})}lighten(e=10){const t=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:t,s:r,l:i,a:this.a})}mix(e,t=50){const r=this._c(e),i=t/100,a=l=>(r[l]-this[l])*i+this[l],o={r:L(a("r")),g:L(a("g")),b:L(a("b")),a:L(a("a")*100)/100};return this._c(o)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),r=this.a+t.a*(1-this.a),i=a=>L((this[a]*this.a+t[a]*t.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=L(this.a*255).toString(16);e+=a.length===2?a:"0"+a}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=L(this.getSaturation()*100),r=L(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${r}%,${this.a})`:`hsl(${e},${t}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,r){const i=this.clone();return i[e]=Ee(t,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function r(i,a){return parseInt(t[i]+t[a||i],16)}t.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=t[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=t[6]?r(6,7)/255:1)}fromHsl({h:e,s:t,l:r,a:i}){if(this._h=e%360,this._s=t,this._l=r,this.a=typeof i=="number"?i:1,t<=0){const S=L(r*255);this.r=S,this.g=S,this.b=S}let a=0,o=0,l=0;const f=e/60,c=(1-Math.abs(2*r-1))*t,d=c*(1-Math.abs(f%2-1));f>=0&&f<1?(a=c,o=d):f>=1&&f<2?(a=d,o=c):f>=2&&f<3?(o=c,l=d):f>=3&&f<4?(o=d,l=c):f>=4&&f<5?(a=d,l=c):f>=5&&f<6&&(a=c,l=d);const p=r-c/2;this.r=L((a+p)*255),this.g=L((o+p)*255),this.b=L((l+p)*255)}fromHsv({h:e,s:t,v:r,a:i}){this._h=e%360,this._s=t,this._v=r,this.a=typeof i=="number"?i:1;const a=L(r*255);if(this.r=a,this.g=a,this.b=a,t<=0)return;const o=e/60,l=Math.floor(o),f=o-l,c=L(r*(1-t)*255),d=L(r*(1-t*f)*255),p=L(r*(1-t*(1-f))*255);switch(l){case 0:this.g=p,this.b=c;break;case 1:this.r=d,this.b=c;break;case 2:this.r=c,this.b=p;break;case 3:this.r=c,this.g=d;break;case 4:this.r=p,this.g=c;break;case 5:default:this.g=c,this.b=d;break}}fromHsvString(e){const t=Ue(e,Dt);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Ue(e,Dt);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Ue(e,(r,i)=>i.includes("%")?L(r/100*255):r);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const Ne=2,Tt=.16,Ar=.05,zr=.05,Ir=.15,Nt=5,Pt=4,Lr=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function $t(n,e,t){let r;return Math.round(n.h)>=60&&Math.round(n.h)<=240?r=t?Math.round(n.h)-Ne*e:Math.round(n.h)+Ne*e:r=t?Math.round(n.h)+Ne*e:Math.round(n.h)-Ne*e,r<0?r+=360:r>=360&&(r-=360),r}function Mt(n,e,t){if(n.h===0&&n.s===0)return n.s;let r;return t?r=n.s-Tt*e:e===Pt?r=n.s+Tt:r=n.s+Ar*e,r>1&&(r=1),t&&e===Nt&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function At(n,e,t){let r;return t?r=n.v+zr*e:r=n.v-Ir*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Yr(n,e={}){const t=[],r=new fe(n),i=r.toHsv();for(let a=Nt;a>0;a-=1){const o=new fe({h:$t(i,a,!0),s:Mt(i,a,!0),v:At(i,a,!0)});t.push(o)}t.push(r);for(let a=1;a<=Pt;a+=1){const o=new fe({h:$t(i,a),s:Mt(i,a),v:At(i,a)});t.push(o)}return e.theme==="dark"?Lr.map(({index:a,amount:o})=>new fe(e.backgroundColor||"#141414").mix(t[a],o).toHexString()):t.map(a=>a.toHexString())}const We=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];We.primary=We[5];function Hr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Vr(n,e){if(!n)return!1;if(n.contains)return n.contains(e);let t=e;for(;t;){if(t===n)return!0;t=t.parentNode}return!1}const zt="data-rc-order",It="data-rc-priority",Fr="rc-util-key",Ze=new Map;function Lt({mark:n}={}){return n?n.startsWith("data-")?n:`data-${n}`:Fr}function Ge(n){return n.attachTo?n.attachTo:document.querySelector("head")||document.body}function qr(n){return n==="queue"?"prependQueue":n?"prepend":"append"}function Je(n){return Array.from((Ze.get(n)||n).children).filter(e=>e.tagName==="STYLE")}function Yt(n,e={}){if(!Hr())return null;const{csp:t,prepend:r,priority:i=0}=e,a=qr(r),o=a==="prependQueue",l=document.createElement("style");l.setAttribute(zt,a),o&&i&&l.setAttribute(It,`${i}`),t!=null&&t.nonce&&(l.nonce=t==null?void 0:t.nonce),l.innerHTML=n;const f=Ge(e),{firstChild:c}=f;if(r){if(o){const d=(e.styles||Je(f)).filter(p=>{if(!["prepend","prependQueue"].includes(p.getAttribute(zt)))return!1;const S=Number(p.getAttribute(It)||0);return i>=S});if(d.length)return f.insertBefore(l,d[d.length-1].nextSibling),l}f.insertBefore(l,c)}else f.appendChild(l);return l}function Br(n,e={}){let{styles:t}=e;return t||(t=Je(Ge(e))),t.find(r=>r.getAttribute(Lt(e))===n)}function Ur(n,e){const t=Ze.get(n);if(!t||!Vr(document,t)){const r=Yt("",e),{parentNode:i}=r;Ze.set(n,i),n.removeChild(r)}}function Wr(n,e,t={}){var f,c,d;const r=Ge(t),i=Je(r),a={...t,styles:i};Ur(r,a);const o=Br(e,a);if(o)return(f=a.csp)!=null&&f.nonce&&o.nonce!==((c=a.csp)==null?void 0:c.nonce)&&(o.nonce=(d=a.csp)==null?void 0:d.nonce),o.innerHTML!==n&&(o.innerHTML=n),o;const l=Yt(n,a);return l.setAttribute(Lt(a),e),l}function Ht(n){var e;return(e=n==null?void 0:n.getRootNode)==null?void 0:e.call(n)}function Zr(n){return Ht(n)instanceof ShadowRoot}function Gr(n){return Zr(n)?Ht(n):null}let Ke={};const Xe=[],Jr=n=>{Xe.push(n)};function Kr(n,e){if(process.env.NODE_ENV!=="production"&&!n&&console!==void 0){const t=Xe.reduce((r,i)=>i(r??"","warning"),e);t&&console.error(`Warning: ${t}`)}}function Xr(n,e){if(process.env.NODE_ENV!=="production"&&!n&&console!==void 0){const t=Xe.reduce((r,i)=>i(r??"","note"),e);t&&console.warn(`Note: ${t}`)}}function Qr(){Ke={}}function Vt(n,e,t){!e&&!Ke[t]&&(n(!1,t),Ke[t]=!0)}function Pe(n,e){Vt(Kr,n,e)}function en(n,e){Vt(Xr,n,e)}Pe.preMessage=Jr,Pe.resetWarned=Qr,Pe.noteOnce=en;function tn(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function rn(n,e){Pe(n,`[@ant-design/icons] ${e}`)}function Ft(n){return typeof n=="object"&&typeof n.name=="string"&&typeof n.theme=="string"&&(typeof n.icon=="object"||typeof n.icon=="function")}function qt(n={}){return Object.keys(n).reduce((e,t)=>{const r=n[t];switch(t){case"class":e.className=r,delete e.class;break;default:delete e[t],e[tn(t)]=r}return e},{})}function Qe(n,e,t){return t?z.default.createElement(n.tag,{key:e,...qt(n.attrs),...t},(n.children||[]).map((r,i)=>Qe(r,`${e}-${n.tag}-${i}`))):z.default.createElement(n.tag,{key:e,...qt(n.attrs)},(n.children||[]).map((r,i)=>Qe(r,`${e}-${n.tag}-${i}`)))}function Bt(n){return Yr(n)[0]}function Ut(n){return n?Array.isArray(n)?n:[n]:[]}const nn=`
|
|
38
37
|
.anticon {
|
|
39
38
|
display: inline-flex;
|
|
40
39
|
align-items: center;
|
|
@@ -55,6 +54,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
55
54
|
|
|
56
55
|
.anticon svg {
|
|
57
56
|
display: inline-block;
|
|
57
|
+
vertical-align: inherit;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.anticon::before {
|
|
@@ -89,6 +89,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
89
89
|
transform: rotate(360deg);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
93
|
-
|
|
94
|
-
}`)),p.useEffect(function(){var l=e.current,u=sn(l);nn(i,"@ant-design-icons",{prepend:!o,csp:n,attachTo:u})},[])},mn=["icon","className","onClick","style","primaryColor","secondaryColor"],Re={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function vn(r){var e=r.primaryColor,t=r.secondaryColor;Re.primaryColor=e,Re.secondaryColor=t||Wt(e),Re.calculated=!!t}function bn(){return ee({},Re)}var $e=function(e){var t=e.icon,n=e.className,s=e.onClick,o=e.style,i=e.primaryColor,l=e.secondaryColor,u=jt(e,mn),c=z.useRef(),g=Re;if(i&&(g={primaryColor:i,secondaryColor:l||Wt(i)}),pn(c),hn(Ut(t),"icon should be icon definiton, but got ".concat(t)),!Ut(t))return null;var d=t;return d&&typeof d.icon=="function"&&(d=ee(ee({},d),{},{icon:d.icon(g.primaryColor,g.secondaryColor)})),et(d.icon,"svg-".concat(d.name),ee(ee({className:n,onClick:s,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:c}))};$e.displayName="IconReact",$e.getTwoToneColors=bn,$e.setTwoToneColors=vn;const tt=$e;function Zt(r){var e=qt(r),t=Ot(e,2),n=t[0],s=t[1];return tt.setTwoToneColors({primaryColor:n,secondaryColor:s})}function yn(){var r=tt.getTwoToneColors();return r.calculated?[r.primaryColor,r.secondaryColor]:r.primaryColor}var Cn=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Zt(Ze.primary);var Me=z.forwardRef(function(r,e){var t=r.className,n=r.icon,s=r.spin,o=r.rotate,i=r.tabIndex,l=r.onClick,u=r.twoToneColor,c=jt(r,Cn),g=z.useContext(Et),d=g.prefixCls,C=d===void 0?"anticon":d,k=g.rootClassName,D=Br(k,C,B(B({},"".concat(C,"-").concat(n.name),!!n.name),"".concat(C,"-spin"),!!s||n.name==="loading"),t),A=i;A===void 0&&l&&(A=-1);var V=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,N=qt(u),S=Ot(N,2),P=S[0],L=S[1];return z.createElement("span",ge({role:"img","aria-label":n.name},c,{ref:e,tabIndex:A,onClick:l,className:D}),z.createElement(tt,{icon:n,primaryColor:P,secondaryColor:L,style:V}))});Me.displayName="AntdIcon",Me.getTwoToneColor=yn,Me.setTwoToneColor=Zt;const rt=Me;var Sn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const wn=Sn;var xn=function(e,t){return z.createElement(rt,ge({},e,{ref:t,icon:wn}))},Gt=z.forwardRef(xn);process.env.NODE_ENV!=="production"&&(Gt.displayName="CaretDownOutlined");const _n=Gt;var En={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};const Rn=En;var On=function(e,t){return z.createElement(rt,ge({},e,{ref:t,icon:Rn}))},Kt=z.forwardRef(On);process.env.NODE_ENV!=="production"&&(Kt.displayName="CaretUpOutlined");const jn=Kt;var Pn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};const Tn=Pn;var kn=function(e,t){return z.createElement(rt,ge({},e,{ref:t,icon:Tn}))},Jt=z.forwardRef(kn);process.env.NODE_ENV!=="production"&&(Jt.displayName="UploadOutlined");const Nn=Jt;var W=(r=>(r.Input="input",r.InputNumber="inputNumber",r.Text="text",r.Password="password",r.Radio="radio",r.Select="select",r.Checkbox="checkbox",r.DatePicker="datePicker",r.RangePicker="rangePicker",r.Upload="upload",r.Mentions="mentions",r.Cascader="cascader",r.TreeSelect="treeSelect",r))(W||{});const{RangePicker:Dn}=w.DatePicker,O=class O{static getDefaultArrayPlaceholder(e){let t;switch(e.type){case"rangePicker":t=["开始时间","结束时间"];break}return t}static getDefaultPlaceholder(e){let t;switch(e.type){case W.Input:case W.Password:case W.InputNumber:case W.Text:case W.Mentions:t=`请输入${e.label}`;break;case W.Select:case W.Checkbox:case W.Radio:case W.DatePicker:case W.RangePicker:case W.Cascader:case W.Upload:case W.TreeSelect:t=`请选择${e.label}`;break}return t}};v(O,"labelCol",{span:7}),v(O,"wrapperCol",{span:17}),v(O,"defaultRowGutter",24),v(O,"input",e=>m.jsx(w.Input,{disabled:e.disabled,maxLength:e.maxLength,...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"password",e=>m.jsx(w.Input.Password,{disabled:e.disabled,...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"text",e=>m.jsx(w.Input.TextArea,{disabled:e.disabled,maxLength:e.maxLength,...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"inputNumber",e=>m.jsx(w.InputNumber,{disabled:e.disabled,maxLength:e.maxLength,...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"datePicker",e=>m.jsx(w.DatePicker,{disabled:e.disabled,...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"rangePicker",e=>m.jsx(Dn,{disabled:e.disabled,...e.props,placeholder:e.placeholder||O.getDefaultArrayPlaceholder(e)})),v(O,"select",e=>m.jsx(w.Select,{...e.props,disabled:e.disabled,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"radio",e=>m.jsx(w.Radio.Group,{disabled:e.disabled,...e.props})),v(O,"checkbox",e=>m.jsx(w.Checkbox.Group,{disabled:e.disabled,...e.props})),v(O,"upload",e=>m.jsx(w.Upload,{defaultFileList:e.initialValue,...e.props,children:e.children||m.jsxs(w.Button,{children:[m.jsx(Nn,{})," 点击上传"]})})),v(O,"mentions",e=>m.jsx(w.Mentions,{...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"cascader",e=>m.jsx(w.Cascader,{...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)})),v(O,"treeSelect",e=>m.jsx(w.TreeSelect,{...e.props,placeholder:e.placeholder||O.getDefaultPlaceholder(e)}));let le=O;const nt=(r="")=>xe("m-form",r);function at(r){const{formProps:e,formItems:t=[],column:n=1,form:s,itemLayout:o,formRowProps:i}=r,l=(c,g)=>{if(c.render)return c.render(g);const d=le[c.type];return c&&c.type&&d?d(c):m.jsx("div",{className:"error-message",children:"Invalid form item configuration"})},u=c=>{const{show:g=!0}=c;if(!g)return null;const d=[...c.rules||[]];c.required&&d.push({required:!0,message:c.required});const C={labelCol:le.labelCol,wrapperCol:le.wrapperCol,...o,...c.itemLayout};return m.jsx(w.Col,{span:c.span||24/n,children:m.jsx("div",{className:nt("item-wrapper"),children:m.jsx(w.Form.Item,{label:c.label,name:c.id,rules:d,initialValue:c.initialValue,...C,...c.formItemProps,children:l(c,s)})})},`col-${c.id}`)};return m.jsx(ie,{children:m.jsx(w.Form,{form:s,...e,className:`${nt()} ${e==null?void 0:e.className}`,children:m.jsx(w.Row,{gutter:le.defaultRowGutter,...i,className:`${nt("grid")} ${i==null?void 0:i.className}`,children:t.map(c=>u(c))})})})}at.displayName="MForm";let st="default";const Ie=[];let Xt=r=>{switch(r){case"light":return{algorithm:[w.theme.defaultAlgorithm]};case"dark":return{algorithm:[w.theme.darkAlgorithm]};default:return{algorithm:[w.theme.defaultAlgorithm]}}};const me=class me extends p.Component{constructor(){super(...arguments);v(this,"handleCancel",t=>{var n,s,o,i;(s=(n=this.props).onCancel)==null||s.call(n,t),(i=(o=this.props).onClosed)==null||i.call(o,{cancel:!0})});v(this,"handleOk",t=>{var n,s,o,i;(s=(n=this.props).onOk)==null||s.call(n,t),(i=(o=this.props).onClosed)==null||i.call(o,{ok:!0})})}getTheme(){const t=this.props.mode||st;return Xt(t)}render(){return m.jsx(w.ConfigProvider,{theme:this.getTheme(),componentSize:"middle",componentDisabled:!1,children:m.jsx(w.Modal,{maskClosable:!1,open:this.props.open,onCancel:this.handleCancel,onOk:this.handleOk,okText:"确定",cancelText:"取消",...this.props,children:this.props.children})})}};v(me,"setMode",t=>{st=t,Ie.forEach(n=>{n.update({mode:t})})}),v(me,"setThemeConfig",t=>{Xt=t}),v(me,"open",t=>{const n=bt(me,{mode:st,...t});Ie.push(n);const s=n.destroy;return n.destroy=(...o)=>{const i=Ie.indexOf(n);return i!==-1&&Ie.splice(i,1),s(...o)},n});let ot=me;const wa="",An=13,ae=(r="")=>xe("m-search",r),$n=r=>{const{className:e,searchItems:t=[],onSearch:n,defaultShowAll:s=!1,customButtons:o=[],form:i}=r,[l,u]=p.useState(s),[c]=w.Form.useForm(),g=p.useRef(null),d=i??c,C=S=>{const{keyCode:P}=S;P===An&&D()};p.useEffect(()=>{const S=g.current;return S==null||S.addEventListener("keydown",C),()=>{S==null||S.removeEventListener("keydown",C)}},[]);const k=()=>{d==null||d.resetFields(),D(!0)},D=(S=!1)=>{d==null||d.validateFields().then(P=>{yt(P),n==null||n(P,S)})},A=()=>{const S=t.length>2;return m.jsxs("div",{className:ae("btn-wrapper"),children:[(o==null?void 0:o.length)>0?m.jsx(m.Fragment,{children:o.map((P,L)=>m.jsx(w.Button,{className:ae("btn"),...P,children:P.children},`custom-btn-${L}`))}):m.jsxs(m.Fragment,{children:[m.jsx(w.Button,{className:ae("btn btn-reset"),onClick:k,children:"重置"}),m.jsx(w.Button,{className:ae("btn btn-search"),onClick:()=>D(),type:"primary",children:"搜索"})]}),S&&m.jsxs("div",{className:ae("btn btn-collapse"),onClick:()=>u(!l),children:[m.jsx("span",{children:l?"收起":"展开"}),l?m.jsx(jn,{}):m.jsx(_n,{})]})]})},V=t.map((S,P)=>{var Z;const L={...S};return t.length>2&&P>=2&&!l&&(L.formItemProps={...S.formItemProps,style:{...(Z=S.formItemProps)==null?void 0:Z.style,display:"none"}}),L}),N=t.length>2;return m.jsx(ie,{children:m.jsx("div",{className:`${ae("")} ${l?"":ae("collapsed")} ${e||""}`,ref:g,children:m.jsxs(w.Card,{children:[m.jsxs("div",{className:ae("form"),children:[m.jsx(at,{form:d,formItems:V,column:3}),(!N||N&&!l)&&A()]}),N&&l&&m.jsx("div",{className:ae("footer"),children:A()})]})})})};function Mn(r){var t;const e=((t=r.columns)==null?void 0:t.map(n=>({...n,dataIndex:n.key})))??[];return m.jsxs(ie,{children:[m.jsx(w.Table,{rowKey:n=>n.id,...r,columns:e}),";"]})}const In={YMD_Hms:"YYYY-MM-DD HH:mm:ss",YMD:"YYYY-MM-DD",YMD2:"YYYYMMDD",YMD_POINT:"YYYY.M.DD",Hms:"HH:mm:ss",Hm:"HH:mm",YMD_000:"YYYY-MM-DD 00:00:00",YMD_end:"YYYY-MM-DD 23:59:59",YMD_Hm:"YYYYMMDD HHmm"},Qt=10;class T{}v(T,"integerRegex",/^-?\d+$/),v(T,"positiveIntegerRegex",/^[1-9]\d*$/),v(T,"negativeIntegerRegex",/^-[1-9]\d*$/),v(T,"floatRegex",/^-?\d+(\.\d+)?$/),v(T,"letter",/^[a-zA-Z]+$/),v(T,"chinese",/^[\u4e00-\u9fa5]+$/),v(T,"number",/^[0-9]*$/),v(T,"username",/^[a-zA-Z]\w{3,15}$/),v(T,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),v(T,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),v(T,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),v(T,"phone",/^1[3-9]\d{9}$/),v(T,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),v(T,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),v(T,"idCard",/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/),v(T,"bankCard",/^[1-9]\d{3,30}$/),v(T,"zipCode",/^[1-9]\d{5}$/),v(T,"ip",/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/),v(T,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),v(T,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),v(T,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),v(T,"date",/^(\d{4})-(\d{2})-(\d{2})$/);function zn(r,e){const[t,n]=p.useState(!1),[s,o]=p.useState(null),[i,l]=p.useState(null),u=p.useRef(void 0),c=p.useRef(0),g=()=>{var C;(C=u.current)==null||C.abort(),n(!1),o(null)},d=async(...C)=>{var A,V,N,S;const k=++c.current;g();const D=new AbortController;u.current=D;try{if(n(!0),o(null),e!=null&&e.onBefore&&!await((A=e==null?void 0:e.onBefore)==null?void 0:A.call(e,...C))){g();return}const P=C.length>=r.length?C:[...C,{signal:D.signal}],L=await r(...P);return!D.signal.aborted&&k===c.current&&(l(L),await((V=e==null?void 0:e.onSuccess)==null?void 0:V.call(e,L))),L}catch(P){throw!D.signal.aborted&&k===c.current&&(o(P),await((N=e==null?void 0:e.onError)==null?void 0:N.call(e,P))),P}finally{!D.signal.aborted&&k===c.current&&(n(!1),await((S=e==null?void 0:e.onFinally)==null?void 0:S.call(e)))}};return p.useEffect(()=>(e!=null&&e.autoRunArgs&&d(...e.autoRunArgs).catch(()=>{}),g),[JSON.stringify(e==null?void 0:e.autoRunArgs)]),{run:d,cancel:g,loading:t,error:s,data:i}}function Yn(r,e,t=!1){const n=p.useRef(void 0),s=p.useRef(r);p.useEffect(()=>{s.current=r},[r]);const o=p.useCallback(()=>{n.current&&(clearInterval(n.current),n.current=void 0)},[]),i=p.useCallback(()=>{o(),e!=null&&(n.current=setInterval(()=>s.current(),e))},[e,o]);return p.useEffect(()=>(t&&s.current(),i(),o),[e,i,o,t]),{start:i,clear:o,isRunning:!!n.current}}const Hn=(r,e,t)=>{const{isReady:n=!0,dataSource:s=[],current:o=1,pageSize:i=10}=t||{},[l,u]=p.useState(o),[c,g]=p.useState(i),[d,C]=p.useState(s),[k,D]=p.useState(0),[A,V]=p.useState(!1),[N,S]=p.useState(!1),P=p.useRef(l),L=p.useRef(c),Z=R=>{u(R),P.current=R},se=R=>{g(R),L.current=R},J=p.useRef(0),je=async()=>{if(!n)return;let R=P.current,Y=L.current;V(!0),J.current++;const te=J.current;try{let G=Math.round((R-1)*Y);G<0&&(G=0),Y<1&&(Y=1);let{dataSource:fe,total:re}=await r({limit:Y,offset:G,current:R});if(te!==J.current)return;if(c*(R-1)>=re&&R!==1){R=1;const ze=Math.ceil(re/c);if({dataSource:fe,total:re}=await r({limit:Y,offset:G,current:R}),te!==J.current)return;R=ze}C(fe),Z(R),se(Y),D(re)}catch(G){if(console.error("fetch err",G),te!==J.current)return}finally{S(!0),V(!1)}},X=async R=>{R&&(C([]),Z(o),se(i)),await je()},ue=p.useCallback(We(X,500),[X]),Pe=[...e||[],n];return p.useEffect(()=>{n&&ue(!0)},Pe),{tableProps:{loading:A,dataSource:d},loading:A,dataSource:d,paginationProps:{current:l,pageSize:c,total:k,onChange:async(R,Y)=>{Z(R),se(Y),await X()},onShowSizeChange:async(R,Y)=>{se(R),Z(Y),await X()}},isFirstComplete:N,refresh:X,debounceRefresh:ue,setDataSource:C}};function Ln(){const r=window.location.href.split("?")[1]||"",e=new URLSearchParams(r);return Object.fromEntries(e.entries())}const Vn=r=>{const[e,t]=p.useState(r),n=p.useRef(e),s=p.useCallback(l=>{t(u=>{const c=typeof l=="function"?l(u):l,g={...u,...c};return n.current=g,g})},[]),o=p.useCallback(()=>n.current,[]),i=p.useCallback(()=>{t(r),n.current=r},[r]);return[e,s,o,i]};function Fn(r,e,t=!1){const n=p.useRef(void 0),s=p.useRef(r);p.useEffect(()=>{s.current=r},[r]);const o=p.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=void 0)},[]),i=p.useCallback(()=>{o(),e!=null&&(n.current=setTimeout(()=>s.current(),e))},[e,o]);return p.useEffect(()=>(t&&s.current(),i(),o),[e,i,o,t]),{start:i,clear:o,isRunning:!!n.current}}const Un=(r,e,t)=>{const{isReady:n=!0,dataSource:s=[],current:o=1,pageSize:i=Qt}=t||{},[l,u]=p.useState(!1),[c,g]=p.useState(o),[d,C]=p.useState(i),[k,D]=p.useState(0),[A,V]=p.useState(!1),[N,S]=p.useState(s),P=p.useRef(c),L=p.useRef(d),Z=F=>{g(F),P.current=F},se=F=>{C(F),L.current=F},J=p.useRef(0),je=async F=>{if(!n)return;let $=P.current,U=L.current;V(!0),J.current+=1;const R=J.current;try{let Y=Math.round(($-1)*U);Y<0&&(Y=0),U<1&&(U=1);let{dataSource:te,total:G}=await r({limit:U,offset:Y,current:$});if(R!==J.current)return;if(d*($-1)>=G&&$!==1){const re=Math.ceil(G/d);if({dataSource:te,total:G}=await r({limit:U,offset:Math.round((re-1)*U),current:$}),R!==J.current)return;$=re}const fe=F?te:N.concat(te);S(fe),Z($),se(U),D(G)}catch(Y){if(console.error("fetch err",Y),R!==J.current)return}u(!0),V(!1)},X=async F=>{if(F)S([]),Z(o),se(i);else{const $=d*c;if(k&&k<=$)return;Z(c+1)}await je(F)},ue=p.useCallback(We(X,500),[X]),Pe=[...e||[],n];return p.useEffect(()=>{n&&ue(!0)},Pe),{loading:A,dataSource:N,paginationProps:{current:c,pageSize:d,total:k},isFirstComplete:l,refresh:async F=>{await X(F)},debounceRefresh:ue,setDataSource:S,setTotal:D}};b.CompThemeProvider=ie,b.DATE_FORMAT=In,b.ItemsRow=xt,b.MBreadcrumb=$r,b.MDescriptions=_t,b.MForm=at,b.MFormItemConst=le,b.MFormItemTypeEnum=W,b.MSearch=$n,b.MTable=Mn,b.MiModal=ot,b.MiThemeProvider=Ar,b.NextTick=Se,b.PAGE_SIZE=Qt,b.PatternType=T,b.VersionUtil=Dr,b.cmx=Er,b.debounce=We,b.getClassName=xe,b.getFieldsByPath=kr,b.nextTick=Rr,b.noop=Tr,b.openModal=bt,b.removeNull=yt,b.throttle=Nr,b.useFuncRequest=zn,b.useInterval=Yn,b.useMiThemeConfig=St,b.usePagination=Hn,b.useQuery=Ln,b.useReactive=Vn,b.useTimeout=Fn,b.useVirtualList=Un,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
|
92
|
+
`,sn=n=>{const{csp:e,prefixCls:t,layer:r}=h.useContext(jt);let i=nn;t&&(i=i.replace(/anticon/g,t)),r&&(i=`@layer ${r} {
|
|
93
|
+
${i}
|
|
94
|
+
}`),h.useEffect(()=>{const a=n.current,o=Gr(a);Wr(i,"@ant-design-icons",{prepend:!r,csp:e,attachTo:o})},[])},_e={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function an({primaryColor:n,secondaryColor:e}){_e.primaryColor=n,_e.secondaryColor=e||Bt(n),_e.calculated=!!e}function on(){return{..._e}}const $e=n=>{const{icon:e,className:t,onClick:r,style:i,primaryColor:a,secondaryColor:o,...l}=n,f=z.useRef();let c=_e;if(a&&(c={primaryColor:a,secondaryColor:o||Bt(a)}),sn(f),rn(Ft(e),`icon should be icon definiton, but got ${e}`),!Ft(e))return null;let d=e;return d&&typeof d.icon=="function"&&(d={...d,icon:d.icon(c.primaryColor,c.secondaryColor)}),Qe(d.icon,`svg-${d.name}`,{className:t,onClick:r,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...l,ref:f})};$e.displayName="IconReact",$e.getTwoToneColors=on,$e.setTwoToneColors=an;const et=$e;function Wt(n){const[e,t]=Ut(n);return et.setTwoToneColors({primaryColor:e,secondaryColor:t})}function cn(){const n=et.getTwoToneColors();return n.calculated?[n.primaryColor,n.secondaryColor]:n.primaryColor}function tt(){return tt=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},tt.apply(this,arguments)}Wt(We.primary);const Me=z.forwardRef((n,e)=>{const{className:t,icon:r,spin:i,rotate:a,tabIndex:o,onClick:l,twoToneColor:f,...c}=n,{prefixCls:d="anticon",rootClassName:p}=z.useContext(jt),S=$r(p,d,{[`${d}-${r.name}`]:!!r.name,[`${d}-spin`]:!!i||r.name==="loading"},t);let D=o;D===void 0&&l&&(D=-1);const $=a?{msTransform:`rotate(${a}deg)`,transform:`rotate(${a}deg)`}:void 0,[I,q]=Ut(f);return z.createElement("span",tt({role:"img","aria-label":r.name},c,{ref:e,tabIndex:D,onClick:l,className:S}),z.createElement(et,{icon:r,primaryColor:I,secondaryColor:q,style:$}))});Me.displayName="AntdIcon",Me.getTwoToneColor=cn,Me.setTwoToneColor=Wt;const rt=Me;var ln={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const un=ln;function nt(){return nt=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},nt.apply(this,arguments)}const fn=(n,e)=>z.createElement(rt,nt({},n,{ref:e,icon:un})),Zt=z.forwardRef(fn);process.env.NODE_ENV!=="production"&&(Zt.displayName="CaretDownOutlined");const dn=Zt;var hn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};const gn=hn;function st(){return st=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},st.apply(this,arguments)}const pn=(n,e)=>z.createElement(rt,st({},n,{ref:e,icon:gn})),Gt=z.forwardRef(pn);process.env.NODE_ENV!=="production"&&(Gt.displayName="CaretUpOutlined");const mn=Gt;var bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};const vn=bn;function at(){return at=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},at.apply(this,arguments)}const yn=(n,e)=>z.createElement(rt,at({},n,{ref:e,icon:vn})),Jt=z.forwardRef(yn);process.env.NODE_ENV!=="production"&&(Jt.displayName="UploadOutlined");const wn=Jt;var U=(n=>(n.Input="input",n.InputNumber="inputNumber",n.Text="text",n.Password="password",n.Radio="radio",n.Select="select",n.Checkbox="checkbox",n.DatePicker="datePicker",n.RangePicker="rangePicker",n.Upload="upload",n.Mentions="mentions",n.Cascader="cascader",n.TreeSelect="treeSelect",n))(U||{});const{RangePicker:Sn}=w.DatePicker,R=class R{static getDefaultArrayPlaceholder(e){let t;switch(e.type){case"rangePicker":t=["开始时间","结束时间"];break}return t}static getDefaultPlaceholder(e){let t;switch(e.type){case U.Input:case U.Password:case U.InputNumber:case U.Text:case U.Mentions:t=`请输入${e.label}`;break;case U.Select:case U.Checkbox:case U.Radio:case U.DatePicker:case U.RangePicker:case U.Cascader:case U.Upload:case U.TreeSelect:t=`请选择${e.label}`;break}return t}};b(R,"labelCol",{span:7}),b(R,"wrapperCol",{span:17}),b(R,"defaultRowGutter",24),b(R,"input",e=>m.jsx(w.Input,{disabled:e.disabled,maxLength:e.maxLength,...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"password",e=>m.jsx(w.Input.Password,{disabled:e.disabled,...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"text",e=>m.jsx(w.Input.TextArea,{disabled:e.disabled,maxLength:e.maxLength,...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"inputNumber",e=>m.jsx(w.InputNumber,{disabled:e.disabled,maxLength:e.maxLength,...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"datePicker",e=>m.jsx(w.DatePicker,{disabled:e.disabled,...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"rangePicker",e=>m.jsx(Sn,{disabled:e.disabled,...e.props,placeholder:e.placeholder||R.getDefaultArrayPlaceholder(e)})),b(R,"select",e=>m.jsx(w.Select,{...e.props,disabled:e.disabled,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"radio",e=>m.jsx(w.Radio.Group,{disabled:e.disabled,...e.props})),b(R,"checkbox",e=>m.jsx(w.Checkbox.Group,{disabled:e.disabled,...e.props})),b(R,"upload",e=>m.jsx(w.Upload,{...e.props,children:e.children||m.jsxs(w.Button,{children:[m.jsx(wn,{})," 点击上传"]})})),b(R,"mentions",e=>m.jsx(w.Mentions,{...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"cascader",e=>m.jsx(w.Cascader,{...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)})),b(R,"treeSelect",e=>m.jsx(w.TreeSelect,{...e.props,placeholder:e.placeholder||R.getDefaultPlaceholder(e)}));let ce=R;const it=(n="")=>Ce("m-form",n);function ot(n){const{formProps:e,formItems:t=[],column:r=1,form:i,itemLayout:a,formRowProps:o}=n,l=(c,d)=>{if(c.render)return c.render(d);const p=ce[c.type];return c&&c.type&&p?p(c):m.jsx("div",{className:"error-message",children:"Invalid form item configuration"})},f=c=>{const{show:d=!0}=c;if(!d)return null;const p=[...c.rules||[]];c.required&&p.push({required:!0,message:c.required});const S={labelCol:ce.labelCol,wrapperCol:ce.wrapperCol,...a,...c.itemLayout};return m.jsx(w.Col,{span:c.span||24/r,children:m.jsx("div",{className:it("item-wrapper"),children:m.jsx(w.Form.Item,{label:c.label,name:c.id,rules:p,initialValue:c.initialValue,...S,...c.formItemProps,children:l(c,i)})})},`col-${c.id}`)};return m.jsx(oe,{children:m.jsx(w.Form,{form:i,...e,className:`${it()} ${e==null?void 0:e.className}`,children:m.jsx(w.Row,{gutter:ce.defaultRowGutter,...o,className:`${it("grid")} ${o==null?void 0:o.className}`,children:t.map(c=>f(c))})})})}ot.displayName="MForm";let ct="default";const Ae=[];let Kt=n=>{switch(n){case"light":return{algorithm:[w.theme.defaultAlgorithm]};case"dark":return{algorithm:[w.theme.darkAlgorithm]};default:return{algorithm:[w.theme.defaultAlgorithm]}}};const de=class de extends h.Component{constructor(){super(...arguments);b(this,"handleCancel",t=>{var r,i,a,o;(i=(r=this.props).onCancel)==null||i.call(r,t),(o=(a=this.props).onClosed)==null||o.call(a,{cancel:!0})});b(this,"handleOk",t=>{var r,i,a,o;(i=(r=this.props).onOk)==null||i.call(r,t),(o=(a=this.props).onClosed)==null||o.call(a,{ok:!0})})}getTheme(){const t=this.props.mode||ct;return Kt(t)}render(){return m.jsx(w.ConfigProvider,{theme:this.getTheme(),componentSize:"middle",componentDisabled:!1,children:m.jsx(w.Modal,{maskClosable:!1,open:this.props.open,onCancel:this.handleCancel,onOk:this.handleOk,okText:"确定",cancelText:"取消",...this.props,children:this.props.children})})}};b(de,"setMode",t=>{ct=t,Ae.forEach(r=>{r.update({mode:t})})}),b(de,"setThemeConfig",t=>{Kt=t}),b(de,"open",t=>{const r=St(de,{mode:ct,...t});Ae.push(r);const i=r.destroy;return r.destroy=(...a)=>{const o=Ae.indexOf(r);return o!==-1&&Ae.splice(o,1),i(...a)},r});let lt=de;const fs="",Cn=13,ne=(n="")=>Ce("m-search",n),xn=n=>{const{className:e,searchItems:t=[],onSearch:r,defaultShowAll:i=!1,customButtons:a=[],form:o}=n,[l,f]=h.useState(i),[c]=w.Form.useForm(),d=h.useRef(null),p=o??c,S=C=>{const{keyCode:N}=C;N===Cn&&$()};h.useEffect(()=>{const C=d.current;return C==null||C.addEventListener("keydown",S),()=>{C==null||C.removeEventListener("keydown",S)}},[]);const D=()=>{p==null||p.resetFields(),$(!0)},$=(C=!1)=>{p==null||p.validateFields().then(N=>{Ct(N),r==null||r(N,C)})},I=()=>{const C=t.length>2;return m.jsxs("div",{className:ne("btn-wrapper"),children:[(a==null?void 0:a.length)>0?m.jsx(m.Fragment,{children:a.map((N,B)=>m.jsx(w.Button,{className:ne("btn"),...N,children:N.children},`custom-btn-${B}`))}):m.jsxs(m.Fragment,{children:[m.jsx(w.Button,{className:ne("btn btn-reset"),onClick:D,children:"重置"}),m.jsx(w.Button,{className:ne("btn btn-search"),onClick:()=>$(),type:"primary",children:"搜索"})]}),C&&m.jsxs("div",{className:ne("btn btn-collapse"),onClick:()=>f(!l),children:[m.jsx("span",{children:l?"收起":"展开"}),l?m.jsx(mn,{}):m.jsx(dn,{})]})]})},q=t.map((C,N)=>{var V;const B={...C};return t.length>2&&N>=2&&!l&&(B.formItemProps={...C.formItemProps,style:{...(V=C.formItemProps)==null?void 0:V.style,display:"none"}}),B}),P=t.length>2;return m.jsx(oe,{children:m.jsx("div",{className:`${ne("")} ${l?"":ne("collapsed")} ${e||""}`,ref:d,children:m.jsxs(w.Card,{children:[m.jsxs("div",{className:ne("form"),children:[m.jsx(ot,{form:p,formItems:q,column:3}),(!P||P&&!l)&&I()]}),P&&l&&m.jsx("div",{className:ne("footer"),children:I()})]})})})};function En(n){var t;const e=((t=n.columns)==null?void 0:t.map(r=>({...r,dataIndex:r.key})))??[];return m.jsxs(oe,{children:[m.jsx(w.Table,{rowKey:r=>r.id,...n,columns:e}),";"]})}const _n={YMD_Hms:"YYYY-MM-DD HH:mm:ss",YMD:"YYYY-MM-DD",YMD2:"YYYYMMDD",YMD_POINT:"YYYY.M.DD",Hms:"HH:mm:ss",Hm:"HH:mm",YMD_000:"YYYY-MM-DD 00:00:00",YMD_end:"YYYY-MM-DD 23:59:59",YMD_Hm:"YYYYMMDD HHmm",YMD_SLASH:"YYYY/MM/DD",YMD_SLASH_Hms:"YYYY/MM/DD HH:mm:ss"},Xt=10;class T{}b(T,"integerRegex",/^-?\d+$/),b(T,"positiveIntegerRegex",/^[1-9]\d*$/),b(T,"negativeIntegerRegex",/^-[1-9]\d*$/),b(T,"floatRegex",/^-?\d+(\.\d+)?$/),b(T,"letter",/^[a-zA-Z]+$/),b(T,"chinese",/^[\u4e00-\u9fa5]+$/),b(T,"number",/^[0-9]*$/),b(T,"username",/^[a-zA-Z]\w{3,15}$/),b(T,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),b(T,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),b(T,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),b(T,"phone",/^1[3-9]\d{9}$/),b(T,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),b(T,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),b(T,"idCard",/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/),b(T,"bankCard",/^[1-9]\d{3,30}$/),b(T,"zipCode",/^[1-9]\d{5}$/),b(T,"ip",/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/),b(T,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),b(T,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),b(T,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),b(T,"date",/^(\d{4})-(\d{2})-(\d{2})$/);function kn(n,e){const[t,r]=h.useState(!1),[i,a]=h.useState(null),[o,l]=h.useState(null),f=h.useRef(void 0),c=h.useRef(0),d=()=>{var S;(S=f.current)==null||S.abort(),r(!1),a(null)},p=async(...S)=>{var I,q,P,C;const D=++c.current;d();const $=new AbortController;f.current=$;try{if(r(!0),a(null),e!=null&&e.onBefore&&!await((I=e==null?void 0:e.onBefore)==null?void 0:I.call(e,...S))){d();return}const N=S.length>=n.length?S:[...S,{signal:$.signal}],B=await n(...N);return!$.signal.aborted&&D===c.current&&(l(B),await((q=e==null?void 0:e.onSuccess)==null?void 0:q.call(e,B))),B}catch(N){throw!$.signal.aborted&&D===c.current&&(a(N),await((P=e==null?void 0:e.onError)==null?void 0:P.call(e,N))),N}finally{!$.signal.aborted&&D===c.current&&(r(!1),await((C=e==null?void 0:e.onFinally)==null?void 0:C.call(e)))}};return h.useEffect(()=>(e!=null&&e.autoRunArgs&&p(...e.autoRunArgs).catch(()=>{}),d),[JSON.stringify(e==null?void 0:e.autoRunArgs)]),{run:p,cancel:d,loading:t,error:i,data:o}}function Rn(n,e,t=!1){const r=h.useRef(void 0),i=h.useRef(n);h.useEffect(()=>{i.current=n},[n]);const a=h.useCallback(()=>{r.current&&(clearInterval(r.current),r.current=void 0)},[]),o=h.useCallback(()=>{a(),e!=null&&(r.current=setInterval(()=>i.current(),e))},[e,a]);return h.useEffect(()=>(t&&i.current(),o(),a),[e,o,a,t]),{start:o,clear:a,isRunning:!!r.current}}const jn=(n,e,t)=>{const{isReady:r=!0,dataSource:i=[],current:a=1,pageSize:o=10}=t||{},[l,f]=h.useState(a),[c,d]=h.useState(o),[p,S]=h.useState(i),[D,$]=h.useState(0),[I,q]=h.useState(!1),[P,C]=h.useState(!1),N=h.useRef(l),B=h.useRef(c),V=x=>{f(x),N.current=x},J=x=>{d(x),B.current=x},K=h.useRef(0),Re=async()=>{if(!r)return;let x=N.current,H=B.current;q(!0),K.current++;const X=K.current;try{let Z=Math.round((x-1)*H);Z<0&&(Z=0),H<1&&(H=1);let{dataSource:se,total:Q}=await n({limit:H,offset:Z,current:x});if(X!==K.current)return;if(c*(x-1)>=Q&&x!==1){x=1;const ge=Math.ceil(Q/c);if({dataSource:se,total:Q}=await n({limit:H,offset:Z,current:x}),X!==K.current)return;x=ge}S(se),V(x),J(H),$(Q)}catch(Z){if(console.error("usePagination error",Z),X!==K.current)return}finally{C(!0),q(!1)}},te=async x=>{x&&(S([]),V(a),J(o)),await Re()},ae=h.useCallback(Be(te,500),[te]),he=[...e||[],r];return h.useEffect(()=>{r&&ae(!0)},he),{tableProps:{loading:I,dataSource:p},loading:I,dataSource:p,paginationProps:{current:l,pageSize:c,total:D,showTotal(x){return`共 ${x} 条`},onChange:async(x,H)=>{V(x),J(H),await te()},onShowSizeChange:async(x,H)=>{J(x),V(H),await te()}},isFirstComplete:P,refresh:te,debounceRefresh:ae,setDataSource:S}};function On(){const n=window.location.href.split("?")[1]||"",e=new URLSearchParams(n);return Object.fromEntries(e.entries())}const Dn=n=>{const[e,t]=h.useState(n),r=h.useRef(e),i=h.useCallback(l=>{t(f=>{const c=typeof l=="function"?l(f):l,d={...f,...c};return r.current=d,d})},[]),a=h.useCallback(()=>r.current,[]),o=h.useCallback(()=>{t(n),r.current=n},[n]);return[e,i,a,o]};function Tn(n,e,t=!1){const r=h.useRef(void 0),i=h.useRef(n);h.useEffect(()=>{i.current=n},[n]);const a=h.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=void 0)},[]),o=h.useCallback(()=>{a(),e!=null&&(r.current=setTimeout(()=>i.current(),e))},[e,a]);return h.useEffect(()=>(t&&i.current(),o(),a),[e,o,a,t]),{start:o,clear:a,isRunning:!!r.current}}const Nn=(n,e,t)=>{const{isReady:r=!0,dataSource:i=[],current:a=1,pageSize:o=Xt}=t||{},[l,f]=h.useState(!1),[c,d]=h.useState(a),[p,S]=h.useState(o),[D,$]=h.useState(0),[I,q]=h.useState(!1),[P,C]=h.useState(i),N=h.useRef(c),B=h.useRef(p),V=h.useRef(0),J=h.useCallback(O=>{d(O),N.current=O},[]),K=h.useCallback(O=>{S(O),B.current=O},[]),Re=h.useCallback(O=>{C(O)},[]),te=h.useCallback(async O=>{if(!r)return;let F=N.current,x=B.current;q(!0),V.current+=1;const H=V.current;try{let X=Math.max(0,Math.round((F-1)*x));x=Math.max(1,x);let Z=await n({limit:x,offset:X,current:F});if(H!==V.current)return;let{dataSource:se,total:Q}=Z;if(p*(F-1)>=Q&&F!==1){const pe=Math.max(1,Math.ceil(Q/p));if(X=Math.max(0,Math.round((pe-1)*x)),Z=await n({limit:x,offset:X,current:pe}),H!==V.current)return;se=Z.dataSource,Q=Z.total,F=pe}const ge=O?se:[...P,...se];C(ge),J(F),K(x),$(Q),f(!0)}catch(X){if(console.error("useVirtualList error",X),H!==V.current)return}finally{H===V.current&&q(!1)}},[r,n,P,J,K]),ae=h.useCallback(async O=>{if(O)C([]),J(a),K(o);else{const F=p*c;if(D&&D<=F)return;J(c+1)}await te(O)},[c,te,p,a,o,J,K,D]),he=h.useCallback(Be(O=>{ae(O)},500),[ae]),je=h.useMemo(()=>[...e||[],r],[e,r]);return h.useEffect(()=>{r&&he(!0)},je),{loading:I,dataSource:P,paginationProps:{current:c,pageSize:p,total:D},isFirstComplete:l,refresh:ae,debounceRefresh:he,setDataSource:Re,setTotal:$}};v.CompThemeProvider=oe,v.DATE_FORMAT=_n,v.ItemsRow=kt,v.MBreadcrumb=Nr,v.MDescriptions=Rt,v.MForm=ot,v.MFormItemConst=ce,v.MFormItemTypeEnum=U,v.MSearch=xn,v.MTable=En,v.MiModal=lt,v.MiThemeProvider=Tr,v.NextTick=we,v.PAGE_SIZE=Xt,v.PatternType=T,v.VersionUtil=Dr,v.cmx=Cr,v.debounce=Be,v.getClassName=Ce,v.getFieldsByPath=jr,v.nextTick=xr,v.noop=Rr,v.openModal=St,v.removeNull=Ct,v.throttle=Or,v.useFuncRequest=kn,v.useInterval=Rn,v.useMiThemeConfig=Et,v.usePagination=jn,v.useQuery=On,v.useReactive=Dn,v.useTimeout=Tn,v.useVirtualList=Nn,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
package/dist/utils/calc.d.ts
CHANGED
|
@@ -1,20 +1,187 @@
|
|
|
1
1
|
declare class CMX {
|
|
2
|
+
private static factorialCache;
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
* 获取数字的小数位数长度
|
|
5
|
+
* @private
|
|
6
|
+
* @param num 要检查的数字
|
|
7
|
+
* @returns 小数位数长度
|
|
8
|
+
*/
|
|
9
|
+
private static getDecimalLength;
|
|
6
10
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
* 将数字转换为整数(移除小数点)
|
|
12
|
+
* @private
|
|
13
|
+
* @param num 要转换的数字
|
|
14
|
+
* @param decimalPlaces 需要补零的小数位数
|
|
15
|
+
* @returns 转换后的整数值
|
|
16
|
+
*/
|
|
17
|
+
private static toInteger;
|
|
10
18
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
* 精确加法运算(支持多个参数)
|
|
20
|
+
* @param args 要相加的数字序列
|
|
21
|
+
* @returns 所有数字的和
|
|
22
|
+
* @example
|
|
23
|
+
* cmx.add(0.1, 0.2) // 返回 0.3
|
|
24
|
+
* cmx.add(1, 2, 3) // 返回 6
|
|
25
|
+
*/
|
|
26
|
+
add(...args: number[]): number;
|
|
14
27
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
* 精确减法运算
|
|
29
|
+
* @param arg1 被减数
|
|
30
|
+
* @param arg2 减数
|
|
31
|
+
* @returns 两数之差
|
|
32
|
+
* @example
|
|
33
|
+
* cmx.sub(0.3, 0.1) // 返回 0.2
|
|
34
|
+
*/
|
|
35
|
+
sub(arg1: number, arg2: number): number;
|
|
36
|
+
/**
|
|
37
|
+
* 精确乘法运算(支持多个参数)
|
|
38
|
+
* @param args 要相乘的数字序列
|
|
39
|
+
* @returns 所有数字的乘积
|
|
40
|
+
* @example
|
|
41
|
+
* cmx.mul(0.1, 0.2) // 返回 0.02
|
|
42
|
+
* cmx.mul(2, 3, 4) // 返回 24
|
|
43
|
+
*/
|
|
44
|
+
mul(...args: number[]): number;
|
|
45
|
+
/**
|
|
46
|
+
* 精确除法运算
|
|
47
|
+
* @param arg1 被除数
|
|
48
|
+
* @param arg2 除数
|
|
49
|
+
* @returns 两数之商
|
|
50
|
+
* @throws {Error} 除数为零时抛出错误
|
|
51
|
+
* @example
|
|
52
|
+
* cmx.div(0.3, 0.1) // 返回 3
|
|
53
|
+
*/
|
|
54
|
+
div(arg1: number, arg2: number): number;
|
|
55
|
+
/**
|
|
56
|
+
* 精确四舍五入
|
|
57
|
+
* @param num 要舍入的数字
|
|
58
|
+
* @param decimalPlaces 保留的小数位数(默认为0)
|
|
59
|
+
* @returns 舍入后的数字
|
|
60
|
+
* @example
|
|
61
|
+
* cmx.round(1.2345, 2) // 返回 1.23
|
|
62
|
+
*/
|
|
63
|
+
round(num: number, decimalPlaces?: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* 计算百分比值
|
|
66
|
+
* @param value 基础值
|
|
67
|
+
* @param percent 百分比
|
|
68
|
+
* @returns 计算后的百分比值
|
|
69
|
+
* @example
|
|
70
|
+
* cmx.percent(200, 15) // 返回 30(200的15%)
|
|
71
|
+
*/
|
|
72
|
+
percent(value: number, percent: number): number;
|
|
73
|
+
/**
|
|
74
|
+
* 计算平均数
|
|
75
|
+
* @param args 要计算平均数的数字序列
|
|
76
|
+
* @returns 平均数
|
|
77
|
+
* @example
|
|
78
|
+
* cmx.average(1, 2, 3) // 返回 2
|
|
79
|
+
*/
|
|
80
|
+
average(...args: number[]): number;
|
|
81
|
+
/**
|
|
82
|
+
* 判断两个数是否近似相等(解决浮点数精度问题)
|
|
83
|
+
* @param a 第一个数
|
|
84
|
+
* @param b 第二个数
|
|
85
|
+
* @param tolerance 允许的误差范围(默认为1e-10)
|
|
86
|
+
* @returns 如果差值小于误差范围则返回true
|
|
87
|
+
* @example
|
|
88
|
+
* cmx.approxEqual(0.1 + 0.2, 0.3) // 返回 true
|
|
89
|
+
*/
|
|
90
|
+
approxEqual(a: number, b: number, tolerance?: number): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* 计算自然对数(ln(x))
|
|
93
|
+
* @param num 要计算对数的数字
|
|
94
|
+
* @param decimalPlaces 结果保留的小数位数(默认保留10位)
|
|
95
|
+
* @returns 自然对数值
|
|
96
|
+
* @throws {Error} 当输入小于等于0时抛出错误
|
|
97
|
+
* @example
|
|
98
|
+
* cmx.ln(1) // 返回 0
|
|
99
|
+
* cmx.ln(Math.E) // 返回 1
|
|
100
|
+
*/
|
|
101
|
+
ln(num: number, decimalPlaces?: number): number;
|
|
102
|
+
/**
|
|
103
|
+
* 高精度指数函数(解决Math.exp的精度问题)
|
|
104
|
+
* @param x 指数
|
|
105
|
+
* @param decimalPlaces 精度位数(默认10位)
|
|
106
|
+
* @returns e^x 的精确值
|
|
107
|
+
* @example
|
|
108
|
+
* cmx.exp(1) // 2.7182818285(比Math.exp(1)更可控精度)
|
|
109
|
+
* cmx.exp(-3.5) // 0.0301973834
|
|
110
|
+
*/
|
|
111
|
+
exp(x: number, decimalPlaces?: number): number;
|
|
112
|
+
/**
|
|
113
|
+
* 精确计算平方根(解决Math.sqrt的精度问题)
|
|
114
|
+
* @param num 输入数字(必须 ≥0)
|
|
115
|
+
* @param decimalPlaces 结果精度(默认10位)
|
|
116
|
+
* @returns 精确的平方根值
|
|
117
|
+
* @throws {Error} 输入负数时抛出
|
|
118
|
+
* @example
|
|
119
|
+
* cmx.sqrt(2) // 1.4142135624 (Math.sqrt(2)可能产生微小误差)
|
|
120
|
+
*/
|
|
121
|
+
sqrt(num: number, decimalPlaces?: number): number;
|
|
122
|
+
/**
|
|
123
|
+
* 安全对数计算(解决Math.log的边界问题)
|
|
124
|
+
* @param num 输入数字(支持 ≤0 的特殊处理)
|
|
125
|
+
* @param options 配置项:
|
|
126
|
+
* - safe: 是否返回安全值(默认true)
|
|
127
|
+
* - replaceNeg: 负数替换值(默认NaN)
|
|
128
|
+
* - replaceZero: 零替换值(默认-Infinity)
|
|
129
|
+
* @returns 处理后的结果
|
|
130
|
+
* @example
|
|
131
|
+
* cmx.safeLog(-1) // NaN(Math.log直接报错)
|
|
132
|
+
* cmx.safeLog(0) // -Infinity(可配置替换值)
|
|
133
|
+
*/
|
|
134
|
+
safeLog(num: number, options?: {
|
|
135
|
+
safe?: boolean;
|
|
136
|
+
replaceNeg?: number;
|
|
137
|
+
replaceZero?: number;
|
|
138
|
+
}): number;
|
|
139
|
+
/**
|
|
140
|
+
* 精确阶乘(解决Math无阶乘方法的问题)
|
|
141
|
+
* @param n 输入整数(0≤n≤170)
|
|
142
|
+
* @returns 精确结果(超过170返回Infinity)
|
|
143
|
+
* @example
|
|
144
|
+
* cmx.factorial(20) // 2432902008176640000(JS整数精确范围)
|
|
145
|
+
*/
|
|
146
|
+
factorial(n: number): number;
|
|
147
|
+
/**
|
|
148
|
+
* 双曲函数精确计算(解决大数精度问题)
|
|
149
|
+
* @param x 输入值
|
|
150
|
+
* @param type 函数类型:'sinh' | 'cosh' | 'tanh'
|
|
151
|
+
* @param decimalPlaces 精度(默认10位)
|
|
152
|
+
* @returns 计算结果
|
|
153
|
+
* @example
|
|
154
|
+
* cmx.hypFunc(1, 'tanh') // 0.761594156(比Math.tanh更精确)
|
|
155
|
+
*/
|
|
156
|
+
hypFunc(x: number, type: 'sinh' | 'cosh' | 'tanh', decimalPlaces?: number): number;
|
|
157
|
+
/**
|
|
158
|
+
* 精确排列组合(解决大数计算问题)
|
|
159
|
+
* @param n 总数
|
|
160
|
+
* @param k 选取数
|
|
161
|
+
* @param type 计算类型:'permutation' | 'combination'
|
|
162
|
+
* @returns 精确结果
|
|
163
|
+
* @example
|
|
164
|
+
* cmx.permComb(100, 5, 'combination') // 75287520
|
|
165
|
+
*/
|
|
166
|
+
permComb(n: number, k: number, type: 'permutation' | 'combination'): number;
|
|
167
|
+
/**
|
|
168
|
+
* 计算最大公约数(GCD)
|
|
169
|
+
* @param a 第一个数字
|
|
170
|
+
* @param b 第二个数字
|
|
171
|
+
* @returns 最大公约数
|
|
172
|
+
* @example
|
|
173
|
+
* cmx.gcd(48, 18) // 返回 6
|
|
174
|
+
*/
|
|
175
|
+
gcd(a: number, b: number): number;
|
|
176
|
+
/**
|
|
177
|
+
* 计算最小公倍数(LCM)
|
|
178
|
+
* @param a 第一个数字
|
|
179
|
+
* @param b 第二个数字
|
|
180
|
+
* @returns 最小公倍数
|
|
181
|
+
* @example
|
|
182
|
+
* cmx.lcm(12, 15) // 返回 60
|
|
183
|
+
*/
|
|
184
|
+
lcm(a: number, b: number): number;
|
|
18
185
|
}
|
|
19
186
|
export declare const cmx: CMX;
|
|
20
187
|
export {};
|