@mi-avalon/libs 0.0.21 → 0.0.22
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/index.d.ts +1 -0
- package/dist/index.es.js +713 -444
- package/dist/index.js +1 -1
- package/dist/index.umd.js +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(h,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","antd"],j):(h=typeof globalThis<"u"?globalThis:h||self,j(h.MiAvalonLibs={},h.React,h.antd))})(this,function(h,j,C){"use strict";var Wr=Object.defineProperty;var Hr=(h,j,C)=>j in h?Wr(h,j,{enumerable:!0,configurable:!0,writable:!0,value:C}):h[j]=C;var b=(h,j,C)=>(Hr(h,typeof j!="symbol"?j+"":j,C),C);function Ue(o){if(o&&o.__esModule)return o;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>o[n]})}}return r.default=o,Object.freeze(r)}const N=Ue(j);var te={exports:{}},Z={};/**
|
|
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 ve;function
|
|
9
|
+
*/var ve;function Le(){if(ve)return Z;ve=1;var o=N.default,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,y){var _,R={},P=null,k=null;y!==void 0&&(P=""+y),d.key!==void 0&&(P=""+d.key),d.ref!==void 0&&(k=d.ref);for(_ in d)a.call(d,_)&&!f.hasOwnProperty(_)&&(R[_]=d[_]);if(u&&u.defaultProps)for(_ in d=u.defaultProps,d)R[_]===void 0&&(R[_]=d[_]);return{$$typeof:r,type:u,key:P,ref:k,props:R,_owner:s.current}}return Z.Fragment=n,Z.jsx=c,Z.jsxs=c,Z}var W={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,19 +14,19 @@
|
|
|
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
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var he;function Be(){return he||(he=1,process.env.NODE_ENV!=="production"&&function(){var o=N.default,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),G=Symbol.iterator,F="@@iterator";function ae(e){if(e===null||typeof e!="object")return null;var t=G&&e[G]||e[F];return typeof t=="function"?t:null}var $=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){{for(var t=arguments.length,i=new Array(t>1?t-1:0),l=1;l<t;l++)i[l-1]=arguments[l];cr("error",e,i)}}function cr(e,t,i){{var l=$.ReactDebugCurrentFrame,p=l.getStackAddendum();p!==""&&(t+="%s",i=i.concat([p]));var g=i.map(function(v){return String(v)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var lr=!1,ur=!1,fr=!1,dr=!1,mr=!1,Ee;Ee=Symbol.for("react.module.reference");function vr(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===f||mr||e===s||e===y||e===_||dr||e===k||lr||ur||fr||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===R||e.$$typeof===c||e.$$typeof===u||e.$$typeof===d||e.$$typeof===Ee||e.getModuleId!==void 0))}function hr(e,t,i){var l=e.displayName;if(l)return l;var p=t.displayName||t.name||"";return p!==""?i+"("+p+")":i}function _e(e){return e.displayName||"Context"}function M(e){if(e==null)return null;if(typeof e.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case n:return"Portal";case f:return"Profiler";case s:return"StrictMode";case y:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u:var t=e;return _e(t)+".Consumer";case c:var i=e;return _e(i._context)+".Provider";case d:return hr(e,e.render,"ForwardRef");case R:var l=e.displayName||null;return l!==null?l:M(e.type)||"Memo";case P:{var p=e,g=p._payload,v=p._init;try{return M(v(g))}catch{return null}}}return null}var Y=Object.assign,J=0,we,Se,Te,Ce,xe,je,Oe;function Pe(){}Pe.__reactDisabledLog=!0;function pr(){{if(J===0){we=console.log,Se=console.info,Te=console.warn,Ce=console.error,xe=console.group,je=console.groupCollapsed,Oe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function br(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},e,{value:we}),info:Y({},e,{value:Se}),warn:Y({},e,{value:Te}),error:Y({},e,{value:Ce}),group:Y({},e,{value:xe}),groupCollapsed:Y({},e,{value:je}),groupEnd:Y({},e,{value:Oe})})}J<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=$.ReactCurrentDispatcher,se;function X(e,t,i){{if(se===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);se=l&&l[1]||""}return`
|
|
18
|
+
`+se+e}}var oe=!1,Q;{var gr=typeof WeakMap=="function"?WeakMap:Map;Q=new gr}function Ae(e,t){if(!e||oe)return"";{var i=Q.get(e);if(i!==void 0)return i}var l;oe=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=ie.current,ie.current=null,pr();try{if(t){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(A){l=A}Reflect.construct(e,[],v)}else{try{v.call()}catch(A){l=A}e.call(v.prototype)}}else{try{throw Error()}catch(A){l=A}e()}}catch(A){if(A&&l&&typeof A.stack=="string"){for(var m=A.stack.split(`
|
|
19
|
+
`),O=l.stack.split(`
|
|
20
|
+
`),w=m.length-1,S=O.length-1;w>=1&&S>=0&&m[w]!==O[S];)S--;for(;w>=1&&S>=0;w--,S--)if(m[w]!==O[S]){if(w!==1||S!==1)do if(w--,S--,S<0||m[w]!==O[S]){var D=`
|
|
21
|
+
`+m[w].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),typeof e=="function"&&Q.set(e,D),D}while(w>=1&&S>=0);break}}}finally{oe=!1,ie.current=g,br(),Error.prepareStackTrace=p}var V=e?e.displayName||e.name:"",I=V?X(V):"";return typeof e=="function"&&Q.set(e,I),I}function Rr(e,t,i){return Ae(e,!1)}function yr(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function ee(e,t,i){if(e==null)return"";if(typeof e=="function")return Ae(e,yr(e));if(typeof e=="string")return X(e);switch(e){case y:return X("Suspense");case _:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Rr(e.render);case R:return ee(e.type,t,i);case P:{var l=e,p=l._payload,g=l._init;try{return ee(g(p),t,i)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,De={},Me=$.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,i=ee(e.type,e._source,t?t.type:null);Me.setExtraStackFrame(i)}else Me.setExtraStackFrame(null)}function Er(e,t,i,l,p){{var g=Function.call.bind(q);for(var v in e)if(g(e,v)){var m=void 0;try{if(typeof e[v]!="function"){var O=Error((l||"React class")+": "+i+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}m=e[v](t,v,l,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(w){m=w}m&&!(m instanceof Error)&&(re(p),x("%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).",l||"React class",i,v,typeof m),re(null)),m instanceof Error&&!(m.message in De)&&(De[m.message]=!0,re(p),x("Failed %s type: %s",i,m.message),re(null))}}}var _r=Array.isArray;function ce(e){return _r(e)}function wr(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,i=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function Sr(e){try{return $e(e),!1}catch{return!0}}function $e(e){return""+e}function ke(e){if(Sr(e))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",wr(e)),$e(e)}var K=$.ReactCurrentOwner,Tr={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ie,le;le={};function Cr(e){if(q.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function xr(e){if(q.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function jr(e,t){if(typeof e.ref=="string"&&K.current&&t&&K.current.stateNode!==t){var i=M(K.current.type);le[i]||(x('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',M(K.current.type),e.ref),le[i]=!0)}}function Or(e,t){{var i=function(){Ye||(Ye=!0,x("%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)",t))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function Pr(e,t){{var i=function(){Ie||(Ie=!0,x("%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)",t))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var Ar=function(e,t,i,l,p,g,v){var m={$$typeof:r,type:e,key:t,ref:i,props:v,_owner:g};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function Dr(e,t,i,l,p){{var g,v={},m=null,O=null;i!==void 0&&(ke(i),m=""+i),xr(t)&&(ke(t.key),m=""+t.key),Cr(t)&&(O=t.ref,jr(t,p));for(g in t)q.call(t,g)&&!Tr.hasOwnProperty(g)&&(v[g]=t[g]);if(e&&e.defaultProps){var w=e.defaultProps;for(g in w)v[g]===void 0&&(v[g]=w[g])}if(m||O){var S=typeof e=="function"?e.displayName||e.name||"Unknown":e;m&&Or(v,S),O&&Pr(v,S)}return Ar(e,m,O,p,l,K.current,v)}}var ue=$.ReactCurrentOwner,Ne=$.ReactDebugCurrentFrame;function z(e){if(e){var t=e._owner,i=ee(e.type,e._source,t?t.type:null);Ne.setExtraStackFrame(i)}else Ne.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function Fe(){{if(ue.current){var e=M(ue.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function Mr(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),i=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+t+":"+i+"."}return""}}var ze={};function $r(e){{var t=Fe();if(!t){var i=typeof e=="string"?e:e.displayName||e.name;i&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+
|
|
27
|
+
Check the top-level render call using <`+i+">.")}return t}}function Ve(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=$r(t);if(ze[i])return;ze[i]=!0;var l="";e&&e._owner&&e._owner!==ue.current&&(l=" It was passed a child from "+M(e._owner.type)+"."),z(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,l),z(null)}}function Ze(e,t){{if(typeof e!="object")return;if(ce(e))for(var i=0;i<e.length;i++){var l=e[i];de(l)&&Ve(l,t)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var p=ae(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),v;!(v=g.next()).done;)de(v.value)&&Ve(v.value,t)}}}function kr(e){{var t=e.type;if(t==null||typeof t=="string")return;var i;if(typeof t=="function")i=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===d||t.$$typeof===R))i=t.propTypes;else return;if(i){var l=M(t);Er(i,e.props,"prop",l,e)}else if(t.PropTypes!==void 0&&!fe){fe=!0;var p=M(t);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Yr(e){{for(var t=Object.keys(e.props),i=0;i<t.length;i++){var l=t[i];if(l!=="children"&&l!=="key"){z(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",l),z(null);break}}e.ref!==null&&(z(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),z(null))}}var We={};function He(e,t,i,l,p,g){{var v=vr(e);if(!v){var m="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(m+=" 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 O=Mr(p);O?m+=O:m+=Fe();var w;e===null?w="null":ce(e)?w="array":e!==void 0&&e.$$typeof===r?(w="<"+(M(e.type)||"Unknown")+" />",m=" Did you accidentally export a JSX literal instead of a component?"):w=typeof e,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",w,m)}var S=Dr(e,t,i,p,g);if(S==null)return S;if(v){var D=t.children;if(D!==void 0)if(l)if(ce(D)){for(var V=0;V<D.length;V++)Ze(D[V],e);Object.freeze&&Object.freeze(D)}else x("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 Ze(D,e)}if(q.call(t,"key")){var I=M(e),A=Object.keys(t).filter(function(Zr){return Zr!=="key"}),me=A.length>0?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}";if(!We[I+me]){var Vr=A.length>0?"{"+A.join(": ..., ")+": ...}":"{}";x(`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} />`,de,F,Pr,F),Le[F+de]=!0}}return e===c?Sr(g):jr(g),g}}function Tr(e,r,t){return Ue(e,r,t,!0)}function Or(e,r,t){return Ue(e,r,t,!1)}var Dr=Or,$r=Tr;L.Fragment=c,L.jsx=Dr,L.jsxs=$r}()),L}process.env.NODE_ENV==="production"?te.exports=Ze():te.exports=Be();var _=te.exports;const Z=class Z{constructor(){d(this,"callbacks",[]);d(this,"pending",!1);d(this,"timerFunc");this.timerFunc=this.determineTimerFunc()}determineTimerFunc(){if(typeof Promise<"u"){const n=Promise.resolve();return()=>n.then(this.flushCallbacks.bind(this))}if(typeof MutationObserver<"u"&&typeof window<"u"){let n=1;const l=new MutationObserver(this.flushCallbacks.bind(this)),c=document.createTextNode(String(n));return l.observe(c,{characterData:!0}),()=>{n=(n+1)%2,c.data=String(n)}}return()=>setTimeout(this.flushCallbacks.bind(this),0)}flushCallbacks(){this.pending=!1;const n=this.callbacks.slice(0);this.callbacks.length=0;for(let l=0;l<n.length;l++)n[l]()}nextTick(n,l){let c;if(this.callbacks.push(()=>{if(n)try{n.call(l)}catch(R){console.error("Error in nextTick:",R)}else c&&c()}),this.pending||(this.pending=!0,this.timerFunc()),!n&&typeof Promise<"u")return new Promise(R=>{c=R})}static nextTick(n,l){return Z.instance.nextTick(n,l)}static get instance(){return this._instance||(this._instance=new Z),this._instance}};d(Z,"_instance");let K=Z;K.instance.nextTick.bind(K.instance);const he=(o,n)=>{const l=o;let c=o;if(n.includes(" ")){c="";const R=n==null?void 0:n.split(" ");for(const P of R)c+=` ${l}-${P}`}else n&&(c=`${o}-${n}`);return c},pe=w.createContext({theme:{cssVar:!0,algorithm:[C.theme.defaultAlgorithm]}}),Je=pe.Provider;function be(){return w.useContext(pe)}function U(o){const{theme:n}=be();return _.jsx(C.ConfigProvider,{theme:n,children:o.children})}const ge=(o="")=>he("items-row",o),_e=o=>o.items?_.jsx(U,{children:_.jsx("div",{className:`${ge()} ${o.className||""}`,style:o.style,children:(o.items||[]).map((n,l)=>{const c=`${ge("item")} ${n.className}`;return n.render?_.jsx("span",{className:c,children:n.render()},l):_.jsx(C.Button,{className:c,...n.btnProps,type:n.type||"primary",onClick:n.onClick,children:n.label},n.label)})})}):null,Mr="",V=(o="")=>he("m-breadcrumb",o),qe=o=>{const{routes:n,customItems:l,style:c,className:R,offsetTop:P=64,mainAppBaseUrl:E,microAppName:S}=o,b=I.useRef(null),D=I.useCallback(()=>{var v,T;(T=(v=b.current)==null?void 0:v.updatePosition)==null||T.call(v)},[]);I.useEffect(()=>(window.addEventListener("scroll",D,!0),()=>window.removeEventListener("scroll",D)),[D]);const y=I.useCallback(v=>{if(!v)return"";const T=v.replace(/^\/+/,"");return`/${[E==null?void 0:E.replace(/\/+$/,""),S==null?void 0:S.replace(/\/+$/,""),T].filter(Boolean).join("/")}`},[E,S]);return _.jsx(U,{children:_.jsx("div",{className:`${V()} ${R||""}`,style:c,children:_.jsx(C.Affix,{ref:b,offsetTop:P,children:_.jsxs(C.Card,{className:V("container"),rootClassName:V("body"),variant:"borderless",children:[_.jsx(C.Breadcrumb,{className:V("inner-breadcrumb"),style:{fontSize:"18px"},children:n==null?void 0:n.map(v=>_.jsx(C.Breadcrumb.Item,{children:v.url?_.jsx("a",{href:`#${y(v.url)}`,children:v.name}):v.name},v.url||v.name))}),_.jsx("div",{className:V("custom-item-wrapper"),children:_.jsx(_e,{items:l})})]})})})})},Ee=o=>{const{data:n,title:l,column:c=3,lineHeight:R,align:P="left",itemLayout:E,colon:S=!0,bordered:b=!1,style:D,className:y,labelStyle:v,contentStyle:T}=o,k={...R?{lineHeight:`${R}px`}:{},textAlign:P,...E!=null&&E.label?{width:`${E.label}px`}:{},...v},G={...R?{lineHeight:`${R}px`}:{},...E!=null&&E.value?{width:`${E.value}px`}:{},...T};return _.jsx(U,{children:_.jsx(C.Descriptions,{title:l,column:c,colon:S,bordered:b,style:D,className:y,labelStyle:k,contentStyle:G,children:n.map((N,ne)=>{var Y;return _.jsx(C.Descriptions.Item,{label:N.label,span:N.span,children:N.value||"-"},((Y=N.label)==null?void 0:Y.toString())||ne)})})})};Ee.displayName="MDescriptions";function Ke(o){var l;const n=((l=o.columns)==null?void 0:l.map(c=>({...c,dataIndex:c.key})))??[];return _.jsxs(U,{children:[_.jsx(C.Table,{rowKey:c=>c.id,...o,columns:n}),";"]})}const Ge={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"},Xe=10;class h{}d(h,"integerRegex",/^-?\d+$/),d(h,"positiveIntegerRegex",/^[1-9]\d*$/),d(h,"negativeIntegerRegex",/^-[1-9]\d*$/),d(h,"floatRegex",/^-?\d+(\.\d+)?$/),d(h,"letter",/^[a-zA-Z]+$/),d(h,"chinese",/^[\u4e00-\u9fa5]+$/),d(h,"number",/^[0-9]*$/),d(h,"username",/^[a-zA-Z]\w{3,15}$/),d(h,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),d(h,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),d(h,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),d(h,"phone",/^1[3-9]\d{9}$/),d(h,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),d(h,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),d(h,"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)$/),d(h,"bankCard",/^[1-9]\d{3,30}$/),d(h,"zipCode",/^[1-9]\d{5}$/),d(h,"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])$/),d(h,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),d(h,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),d(h,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),d(h,"date",/^(\d{4})-(\d{2})-(\d{2})$/),m.CompThemeProvider=U,m.DATE_FORMAT=Ge,m.ItemsRow=_e,m.MBreadcrumb=qe,m.MDescriptions=Ee,m.MTable=Ke,m.MiThemeProvider=Je,m.PAGE_SIZE=Xe,m.PatternType=h,m.useMiThemeConfig=be,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
32
|
+
<%s key={someKey} {...props} />`,me,I,Vr,I),We[I+me]=!0}}return e===a?Yr(S):kr(S),S}}function Ir(e,t,i){return He(e,t,i,!0)}function Nr(e,t,i){return He(e,t,i,!1)}var Fr=Nr,zr=Ir;W.Fragment=a,W.jsx=Fr,W.jsxs=zr}()),W}process.env.NODE_ENV==="production"?te.exports=Le():te.exports=Be();var T=te.exports;class Je{constructor(){b(this,"add",function(r,n){let a,s,f,c;try{a=r.toString().split(".")[1].length}catch{a=0}try{s=n.toString().split(".")[1].length}catch{s=0}if(c=Math.abs(a-s),f=Math.pow(10,Math.max(a,s)),c>0){let u=Math.pow(10,c);a>s?(r=Number(r.toString().replace(".","")),n=Number(n.toString().replace(".",""))*u):(r=Number(r.toString().replace(".",""))*u,n=Number(n.toString().replace(".","")))}else r=Number(r==null?void 0:r.toString().replace(".","")),n=Number(n==null?void 0:n.toString().replace(".",""));return(r+n)/f});b(this,"sub",function(r,n){let a,s,f,c;try{a=r.toString().split(".")[1].length}catch{a=0}try{s=n.toString().split(".")[1].length}catch{s=0}return f=Math.pow(10,Math.max(a,s)),c=a>=s?a:s,Number(((r*f-n*f)/f).toFixed(c))});b(this,"mul",function(r,n){let a=0,s=r.toString(),f=n.toString();try{a+=s.split(".")[1].length}catch{}try{a+=f.split(".")[1].length}catch{}return Number(s.replace(".",""))*Number(f.replace(".",""))/Math.pow(10,a)});b(this,"div",function(r,n){let a=0,s=0,f,c;try{a=r.toString().split(".")[1].length}catch{}try{s=n.toString().split(".")[1].length}catch{}return f=Number(r.toString().replace(".","")),c=Number(n.toString().replace(".","")),f/c*Math.pow(10,s-a)})}}const qe=new Je,B=class B{constructor(){b(this,"callbacks",[]);b(this,"pending",!1);b(this,"timerFunc");this.timerFunc=this.determineTimerFunc()}determineTimerFunc(){if(typeof Promise<"u"){const r=Promise.resolve();return()=>r.then(this.flushCallbacks.bind(this))}if(typeof MutationObserver<"u"&&typeof window<"u"){let r=1;const n=new MutationObserver(this.flushCallbacks.bind(this)),a=document.createTextNode(String(r));return n.observe(a,{characterData:!0}),()=>{r=(r+1)%2,a.data=String(r)}}return()=>setTimeout(this.flushCallbacks.bind(this),0)}flushCallbacks(){this.pending=!1;const r=this.callbacks.slice(0);this.callbacks.length=0;for(let n=0;n<r.length;n++)r[n]()}nextTick(r,n){let a;if(this.callbacks.push(()=>{if(r)try{r.call(n)}catch(s){console.error("Error in nextTick:",s)}else a&&a()}),this.pending||(this.pending=!0,this.timerFunc()),!r&&typeof Promise<"u")return new Promise(s=>{a=s})}static nextTick(r,n){return B.instance.nextTick(r,n)}static get instance(){return this._instance||(this._instance=new B),this._instance}};b(B,"_instance");let H=B;const Ke=H.instance.nextTick.bind(H.instance),Ge=()=>{},ne=(o,r)=>{const n=o;let a=o;if(r.includes(" ")){a="";const s=r==null?void 0:r.split(" ");for(const f of s)a+=` ${n}-${f}`}else r&&(a=`${o}-${r}`);return a},Xe=(o,r)=>{const n=r==null?void 0:r.split(".");let a=o;for(const s of n)a=a[s];return a},Qe=o=>{for(const r in o)o[r]===null&&delete o[r];return o},er=(o,r)=>{let n=null;return(...a)=>{n&&clearTimeout(n),n=setTimeout(()=>{o(...a)},r)}},rr=(o,r)=>{let n=null,a=0;return(...s)=>{const f=Date.now();n?f-a>=r&&(o(...s),a=f):(o(...s),a=f,n=setTimeout(()=>{n=null},r))}};class tr{static isValid(r){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(r)}static compare(r,n){if(!this.isValid(r)||!this.isValid(n))throw new Error("Invalid version format");const a=d=>d.replace(/^v/,"").split(/[-+]/)[0].split("."),s=a(r),f=a(n);for(let d=0;d<3;d++){const y=parseInt(s[d]||"0",10),_=parseInt(f[d]||"0",10);if(y>_)return 1;if(y<_)return-1}const c=r.match(/-(.+)/),u=n.match(/-(.+)/);return c&&!u?-1:!c&&u?1:c&&u?c[1].localeCompare(u[1]):0}static satisfies(r,n){if(!this.isValid(r))return!1;const a=/([<>]=?|==?|\^|~)?\s*v?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+)?)/g,s=n.match(a);return!s||s.length===0?!1:s.every(f=>{const c=f.match(/([<>]=?|==?|\^|~)?\s*(v?[0-9].*)/);if(!c)return!1;const u=c[1]||"==",d=c[2];if(!this.isValid(d))return!1;const y=this.compare(r,d);switch(u){case">":return y>0;case">=":return y>=0;case"<":return y<0;case"<=":return y<=0;case"^":return this.caretRange(r,d);case"~":return this.tildeRange(r,d);case"=":case"==":default:return y===0}})}static caretRange(r,n){const a=u=>u.replace(/^v/,"").split(/[-+]/)[0].split("."),s=a(r),f=a(n);let c=0;for(let u=0;u<f.length;u++)if(parseInt(f[u],10)!==0){c=u;break}for(let u=0;u<=c;u++){const d=parseInt(s[u]||"0",10),y=parseInt(f[u]||"0",10);if(d!==y)return!1}return this.compare(r,n)>=0}static tildeRange(r,n){const a=d=>d.replace(/^v/,"").split(/[-+]/)[0].split("."),s=a(r),f=a(n);for(let d=0;d<f.length-1;d++){const y=parseInt(s[d]||"0",10),_=parseInt(f[d]||"0",10);if(y!==_)return!1}const c=parseInt(s[f.length-1]||"0",10),u=parseInt(f[f.length-1]||"0",10);return c>=u}static getMajor(r){if(!this.isValid(r))throw new Error("Invalid version format");const n=r.replace(/^v/,"").split(".");return parseInt(n[0],10)}static getMinor(r){if(!this.isValid(r))throw new Error("Invalid version format");const n=r.replace(/^v/,"").split(".");return parseInt(n[1]||"0",10)}static getPatch(r){if(!this.isValid(r))throw new Error("Invalid version format");const n=r.replace(/^v/,"").split(".");return parseInt(n[2]||"0",10)}static getPrerelease(r){if(!this.isValid(r))throw new Error("Invalid version format");const n=r.match(/-([^+]+)/);return n?n[1]:null}static getBuildMetadata(r){if(!this.isValid(r))throw new Error("Invalid version format");const n=r.match(/\+([^]+)/);return n?n[1]:null}}const pe=j.createContext({theme:{cssVar:!0,algorithm:[C.theme.defaultAlgorithm]}}),nr=pe.Provider;function be(){return j.useContext(pe)}function U(o){const{theme:r}=be();return T.jsx(C.ConfigProvider,{theme:r,children:o.children})}const ge=(o="")=>ne("items-row",o),Re=o=>o.items?T.jsx(U,{children:T.jsx("div",{className:`${ge()} ${o.className||""}`,style:o.style,children:(o.items||[]).map((r,n)=>{const a=`${ge("item")} ${r.className}`;return r.render?T.jsx("span",{className:a,children:r.render()},n):T.jsx(C.Button,{className:a,...r.btnProps,type:r.type||"primary",onClick:r.onClick,children:r.label},r.label)})})}):null,Ur="",L=(o="")=>ne("m-breadcrumb",o),ar=o=>{const{routes:r,customItems:n,style:a,className:s,offsetTop:f=64,mainAppBaseUrl:c,microAppName:u}=o,d=N.useRef(null),y=N.useCallback(()=>{var R,P;(P=(R=d.current)==null?void 0:R.updatePosition)==null||P.call(R)},[]);N.useEffect(()=>(window.addEventListener("scroll",y,!0),()=>window.removeEventListener("scroll",y)),[y]);const _=N.useCallback(R=>{if(!R)return"";const P=R.replace(/^\/+/,"");return`/${[c==null?void 0:c.replace(/\/+$/,""),u==null?void 0:u.replace(/\/+$/,""),P].filter(Boolean).join("/")}`},[c,u]);return T.jsx(U,{children:T.jsx("div",{className:`${L()} ${s||""}`,style:a,children:T.jsx(C.Affix,{ref:d,offsetTop:f,children:T.jsxs(C.Card,{className:L("container"),rootClassName:L("body"),variant:"borderless",children:[T.jsx(C.Breadcrumb,{className:L("inner-breadcrumb"),style:{fontSize:"18px"},children:r==null?void 0:r.map(R=>T.jsx(C.Breadcrumb.Item,{children:R.url?T.jsx("a",{href:`#${_(R.url)}`,children:R.name}):R.name},R.url||R.name))}),T.jsx("div",{className:L("custom-item-wrapper"),children:T.jsx(Re,{items:n})})]})})})})},ye=o=>{const{data:r,title:n,column:a=3,lineHeight:s,align:f="left",itemLayout:c,colon:u=!0,bordered:d=!1,style:y,className:_,labelStyle:R,contentStyle:P}=o,k={...s?{lineHeight:`${s}px`}:{},textAlign:f,...c!=null&&c.label?{width:`${c.label}px`}:{},...R},G={...s?{lineHeight:`${s}px`}:{},...c!=null&&c.value?{width:`${c.value}px`}:{},...P};return T.jsx(U,{children:T.jsx(C.Descriptions,{title:n,column:a,colon:u,bordered:d,style:y,className:_,labelStyle:k,contentStyle:G,children:r.map((F,ae)=>{var $;return T.jsx(C.Descriptions.Item,{label:F.label,span:F.span,children:F.value||"-"},(($=F.label)==null?void 0:$.toString())||ae)})})})};ye.displayName="MDescriptions";function ir(o){var n;const r=((n=o.columns)==null?void 0:n.map(a=>({...a,dataIndex:a.key})))??[];return T.jsxs(U,{children:[T.jsx(C.Table,{rowKey:a=>a.id,...o,columns:r}),";"]})}const sr={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"},or=10;class E{}b(E,"integerRegex",/^-?\d+$/),b(E,"positiveIntegerRegex",/^[1-9]\d*$/),b(E,"negativeIntegerRegex",/^-[1-9]\d*$/),b(E,"floatRegex",/^-?\d+(\.\d+)?$/),b(E,"letter",/^[a-zA-Z]+$/),b(E,"chinese",/^[\u4e00-\u9fa5]+$/),b(E,"number",/^[0-9]*$/),b(E,"username",/^[a-zA-Z]\w{3,15}$/),b(E,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),b(E,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),b(E,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),b(E,"phone",/^1[3-9]\d{9}$/),b(E,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),b(E,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),b(E,"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(E,"bankCard",/^[1-9]\d{3,30}$/),b(E,"zipCode",/^[1-9]\d{5}$/),b(E,"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(E,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),b(E,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),b(E,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),b(E,"date",/^(\d{4})-(\d{2})-(\d{2})$/),h.CompThemeProvider=U,h.DATE_FORMAT=sr,h.ItemsRow=Re,h.MBreadcrumb=ar,h.MDescriptions=ye,h.MTable=ir,h.MiThemeProvider=nr,h.NextTick=H,h.PAGE_SIZE=or,h.PatternType=E,h.VersionUtil=tr,h.cmx=qe,h.debounce=er,h.getClassName=ne,h.getFieldsByPath=Xe,h.nextTick=Ke,h.noop=Ge,h.removeNull=Qe,h.throttle=rr,h.useMiThemeConfig=be,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|