From 581048ba446d593485a4822873aa60095e7d1647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=81=A5=E9=93=AD?= Date: Fri, 4 Dec 2026 20:07:46 -0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=9E=84=E5=BB=BA=E6=96=B0?= =?UTF-8?q?=E7=89=88=E7=95=8C=E9=9D=A2=20web/dist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .../assets/{antd-DyieCF1D.js => antd-CHeDoVQW.js} | 22 +++++++++---------- 新账系统/web/dist/assets/index-9vpK4WRZ.js | 3 --- 新账系统/web/dist/assets/index-Bz-jy7Ju.js | 3 +++ 新账系统/web/dist/assets/index-Ct_xTggL.css | 1 - 新账系统/web/dist/assets/index-DumwbEyo.css | 1 + .../{react-6WBM9IkR.js => react-DKzIiI9e.js} | 2 +- 新账系统/web/dist/index.html | 10 ++++----- 7 files changed, 21 insertions(+), 21 deletions(-) rename 新账系统/web/dist/assets/{antd-DyieCF1D.js => antd-CHeDoVQW.js} (86%) delete mode 100644 新账系统/web/dist/assets/index-9vpK4WRZ.js create mode 100644 新账系统/web/dist/assets/index-Bz-jy7Ju.js delete mode 100644 新账系统/web/dist/assets/index-Ct_xTggL.css create mode 100644 新账系统/web/dist/assets/index-DumwbEyo.css rename 新账系统/web/dist/assets/{react-6WBM9IkR.js => react-DKzIiI9e.js} (99%) diff --git a/新账系统/web/dist/assets/antd-DyieCF1D.js b/新账系统/web/dist/assets/antd-CHeDoVQW.js similarity index 86% rename from 新账系统/web/dist/assets/antd-DyieCF1D.js rename to 新账系统/web/dist/assets/antd-CHeDoVQW.js index 57b9863..3065970 100644 --- a/新账系统/web/dist/assets/antd-DyieCF1D.js +++ b/新账系统/web/dist/assets/antd-CHeDoVQW.js @@ -230,14 +230,14 @@ html body { `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` ${n}-checked:not(${n}-disabled), ${t}-checked:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function $6(e,t){return Q6(La(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var eb=_o(`Checkbox`,(e,{prefixCls:t})=>[$6(t,e)]),tb=s.createContext(null),nb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,className:r,rootClassName:i,children:a,indeterminate:o=!1,style:c,onMouseEnter:l,onMouseLeave:u,skipGroup:d=!1,disabled:f}=e,p=nb(e,[`prefixCls`,`className`,`rootClassName`,`children`,`indeterminate`,`style`,`onMouseEnter`,`onMouseLeave`,`skipGroup`,`disabled`]),{getPrefixCls:m,direction:g,checkbox:_}=s.useContext(da),v=s.useContext(tb),{isFormItemInput:y}=s.useContext(xh),b=s.useContext(va),x=(v?.disabled||f)??b,S=s.useRef(p.value),C=s.useRef(null),w=R(t,C);s.useEffect(()=>{v?.registerValue(p.value)},[]),s.useEffect(()=>{if(!d)return p.value!==S.current&&(v?.cancelValue(S.current),v?.registerValue(p.value),S.current=p.value),()=>v?.cancelValue(p.value)},[p.value]),s.useEffect(()=>{C.current?.input&&(C.current.input.indeterminate=o)},[o]);let T=m(`checkbox`,n),E=Rc(T),[D,O,k]=eb(T,E),A=Object.assign({},p);v&&!d&&(A.onChange=(...e)=>{p.onChange&&p.onChange.apply(p,e),v.toggleOption&&v.toggleOption({label:a,value:p.value})},A.name=v.name,A.checked=v.value.includes(p.value));let j=(0,h.default)(`${T}-wrapper`,{[`${T}-rtl`]:g===`rtl`,[`${T}-wrapper-checked`]:A.checked,[`${T}-wrapper-disabled`]:x,[`${T}-wrapper-in-form-item`]:y},_?.className,r,i,k,E,O),M=(0,h.default)({[`${T}-indeterminate`]:o},mu,O),[N,P]=N4(A.onClick);return D(s.createElement(xu,{component:`Checkbox`,disabled:x},s.createElement(`label`,{className:j,style:Object.assign(Object.assign({},_?.style),c),onMouseEnter:l,onMouseLeave:u,onClick:N},s.createElement(M4,Object.assign({},A,{onClick:P,prefixCls:T,className:M,disabled:x,ref:w})),a!=null&&s.createElement(`span`,{className:`${T}-label`},a))))}),ib=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:c,style:l,onChange:u}=e,d=ib(e,[`defaultValue`,`children`,`options`,`prefixCls`,`className`,`rootClassName`,`style`,`onChange`]),{getPrefixCls:f,direction:p}=s.useContext(da),[m,g]=s.useState(d.value||n||[]),[_,v]=s.useState([]);s.useEffect(()=>{`value`in d&&g(d.value||[])},[d.value]);let y=s.useMemo(()=>i.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e),[i]),b=e=>{v(t=>t.filter(t=>t!==e))},x=e=>{v(t=>[].concat(X(t),[e]))},S=e=>{let t=m.indexOf(e.value),n=X(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||g(n),u?.(n.filter(e=>_.includes(e)).sort((e,t)=>y.findIndex(t=>t.value===e)-y.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=Rc(C),[E,D,O]=eb(C,T),k=du(d,[`value`,`disabled`]),A=i.length?y.map(e=>s.createElement(rb,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:(0,h.default)(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,j=s.useMemo(()=>({toggleOption:S,value:m,disabled:d.disabled,name:d.name,registerValue:x,cancelValue:b}),[S,m,d.disabled,d.name,x,b]),M=(0,h.default)(w,{[`${w}-rtl`]:p===`rtl`},o,c,O,T,D);return E(s.createElement(`div`,Object.assign({className:M,style:l},k,{ref:t}),s.createElement(tb.Provider,{value:j},A)))}),ob=rb;ob.Group=ab,ob.__ANT_CHECKBOX=!0;var sb=(0,s.createContext)({}),cb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{getPrefixCls:n,direction:r}=s.useContext(da),{gutter:i,wrap:a}=s.useContext(sb),{prefixCls:o,span:c,order:l,offset:u,push:d,pull:f,className:p,children:m,flex:g,style:_}=e,v=cb(e,[`prefixCls`,`span`,`order`,`offset`,`push`,`pull`,`className`,`children`,`flex`,`style`]),y=n(`col`,o),[b,x,S]=xg(y),C={},w={};ub.forEach(t=>{let n={},i=e[t];typeof i==`number`?n.span=i:typeof i==`object`&&(n=i||{}),delete v[t],w=Object.assign(Object.assign({},w),{[`${y}-${t}-${n.span}`]:n.span!==void 0,[`${y}-${t}-order-${n.order}`]:n.order||n.order===0,[`${y}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${y}-${t}-push-${n.push}`]:n.push||n.push===0,[`${y}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${y}-rtl`]:r===`rtl`}),n.flex&&(w[`${y}-${t}-flex`]=!0,C[`--${y}-${t}-flex`]=lb(n.flex))});let T=(0,h.default)(y,{[`${y}-${c}`]:c!==void 0,[`${y}-order-${l}`]:l,[`${y}-offset-${u}`]:u,[`${y}-push-${d}`]:d,[`${y}-pull-${f}`]:f},p,w,x,S),E={};if(i?.[0]){let e=typeof i[0]==`number`?`${i[0]/2}px`:`calc(${i[0]} / 2)`;E.paddingLeft=e,E.paddingRight=e}return g&&(E.flex=lb(g),a===!1&&!E.minWidth&&(E.minWidth=0)),b(s.createElement(`div`,Object.assign({},v,{style:Object.assign(Object.assign(Object.assign({},E),_),C),className:T,ref:t}),m))});function fb(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((e,t)=>{if(typeof e==`object`&&e)for(let r=0;r{if(typeof e==`string`&&r(e),typeof e==`object`)for(let n=0;n{i()},[JSON.stringify(e),t]),n}var hb=s.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:c,gutter:l=0,wrap:u}=e,d=pb(e,[`prefixCls`,`justify`,`align`,`className`,`style`,`children`,`gutter`,`wrap`]),{getPrefixCls:f,direction:p}=s.useContext(da),m=gy(!0,null),g=mb(i,m),_=mb(r,m),v=f(`row`,n),[y,b,x]=yg(v),S=fb(l,m),C=(0,h.default)(v,{[`${v}-no-wrap`]:u===!1,[`${v}-${_}`]:_,[`${v}-${g}`]:g,[`${v}-rtl`]:p===`rtl`},a,b,x),w={};if(S?.[0]){let e=typeof S[0]==`number`?`${S[0]/-2}px`:`calc(${S[0]} / -2)`;w.marginLeft=e,w.marginRight=e}let[T,E]=S;w.rowGap=E;let D=s.useMemo(()=>({gutter:[T,E],wrap:u}),[T,E,u]);return y(s.createElement(sb.Provider,{value:D},s.createElement(`div`,Object.assign({},d,{className:C,style:Object.assign(Object.assign({},w),o),ref:t}),c)))});function gb(e){return!!(e.addonBefore||e.addonAfter)}function _b(e){return!!(e.prefix||e.suffix||e.allowClear)}function vb(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function yb(e,t,n,r){if(n){var i=t;t.type===`click`?(i=vb(t,e,``),n(i)):(e.type!==`file`&&r!==void 0&&(i=vb(t,e,r)),n(i))}}function bb(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var xb=s.forwardRef(function(e,t){var n=e.inputElement,r=e.children,i=e.prefixCls,a=e.prefix,o=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,p=e.style,m=e.disabled,g=e.readOnly,_=e.focused,v=e.triggerFocus,y=e.allowClear,b=e.value,x=e.handleReset,S=e.hidden,C=e.classes,w=e.classNames,T=e.dataAttrs,D=e.styles,k=e.components,A=e.onClear,j=r??n,M=k?.affixWrapper||`span`,N=k?.groupWrapper||`span`,P=k?.wrapper||`span`,F=k?.groupAddon||`span`,I=(0,s.useRef)(null),L=function(e){var t;(t=I.current)!=null&&t.contains(e.target)&&v?.()},R=_b(e),z=(0,s.cloneElement)(j,{value:b,className:(0,h.default)(j.props?.className,!R&&w?.variant)||null}),B=(0,s.useRef)(null);if(s.useImperativeHandle(t,function(){return{nativeElement:B.current||I.current}}),R){var V=null;if(y){var H=!m&&!g&&b,U=`${i}-clear-icon`,W=l(y)===`object`&&y!=null&&y.clearIcon?y.clearIcon:`✖`;V=s.createElement(`button`,{type:`button`,tabIndex:-1,onClick:function(e){x?.(e),A?.()},onMouseDown:function(e){return e.preventDefault()},className:(0,h.default)(U,E(E({},`${U}-hidden`,!H),`${U}-has-suffix`,!!o))},W)}var G=`${i}-affix-wrapper`,K=(0,h.default)(G,E(E(E(E(E({},`${i}-disabled`,m),`${G}-disabled`,m),`${G}-focused`,_),`${G}-readonly`,g),`${G}-input-with-clear-btn`,o&&y&&b),C?.affixWrapper,w?.affixWrapper,w?.variant),q=(o||y)&&s.createElement(`span`,{className:(0,h.default)(`${i}-suffix`,w?.suffix),style:D?.suffix},V,o);z=s.createElement(M,c({className:K,style:D?.affixWrapper,onClick:L},T?.affixWrapper,{ref:I}),a&&s.createElement(`span`,{className:(0,h.default)(`${i}-prefix`,w?.prefix),style:D?.prefix},a),z,q)}if(gb(e)){var ee=`${i}-group`,J=`${ee}-addon`,Y=`${ee}-wrapper`,te=(0,h.default)(`${i}-wrapper`,ee,C?.wrapper,w?.wrapper),ne=(0,h.default)(Y,E({},`${Y}-disabled`,m),C?.group,w?.groupWrapper);z=s.createElement(N,{className:ne,ref:B},s.createElement(P,{className:te},u&&s.createElement(F,{className:J},u),z,d&&s.createElement(F,{className:J},d)))}return s.cloneElement(z,{className:(0,h.default)(z.props?.className,f)||null,style:O(O({},z.props?.style),p),hidden:S})}),Sb=[`show`];function Cb(e,t){return s.useMemo(function(){var n={};t&&(n.show=l(t)===`object`&&t.formatter?t.formatter:!!t),n=O(O({},n),e);var r=n,i=r.show,a=yt(r,Sb);return O(O({},a),{},{show:!!i,showFormatter:typeof i==`function`?i:void 0,strategy:a.strategy||function(e){return e.length}})},[e,t])}var wb=[`autoComplete`,`onChange`,`onFocus`,`onBlur`,`onPressEnter`,`onKeyDown`,`onKeyUp`,`prefixCls`,`disabled`,`htmlSize`,`className`,`maxLength`,`suffix`,`showCount`,`count`,`type`,`classes`,`classNames`,`styles`,`onCompositionStart`,`onCompositionEnd`],Tb=(0,s.forwardRef)(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,a=e.onBlur,o=e.onPressEnter,l=e.onKeyDown,u=e.onKeyUp,d=e.prefixCls,f=d===void 0?`rc-input`:d,p=e.disabled,m=e.htmlSize,g=e.className,_=e.maxLength,v=e.suffix,y=e.showCount,b=e.count,x=e.type,S=x===void 0?`text`:x,C=e.classes,w=e.classNames,T=e.styles,D=e.onCompositionStart,k=e.onCompositionEnd,A=yt(e,wb),j=Z((0,s.useState)(!1),2),M=j[0],N=j[1],P=(0,s.useRef)(!1),F=(0,s.useRef)(!1),I=(0,s.useRef)(null),L=(0,s.useRef)(null),R=function(e){I.current&&bb(I.current,e)},z=Z(Na(e.defaultValue,{value:e.value}),2),B=z[0],V=z[1],H=B==null?``:String(B),U=Z((0,s.useState)(null),2),W=U[0],G=U[1],K=Cb(b,y),q=K.max||_,ee=K.strategy(H),J=!!q&&ee>q;(0,s.useImperativeHandle)(t,function(){return{focus:R,blur:function(){var e;(e=I.current)==null||e.blur()},setSelectionRange:function(e,t,n){var r;(r=I.current)==null||r.setSelectionRange(e,t,n)},select:function(){var e;(e=I.current)==null||e.select()},input:I.current,nativeElement:L.current?.nativeElement||I.current}}),(0,s.useEffect)(function(){F.current&&=!1,N(function(e){return e&&p?!1:e})},[p]);var Y=function(e,t,n){var i=t;if(!P.current&&K.exceedFormatter&&K.max&&K.strategy(t)>K.max)i=K.exceedFormatter(t,{max:K.max}),t!==i&&G([I.current?.selectionStart||0,I.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;V(i),I.current&&yb(I.current,e,r,i)};(0,s.useEffect)(function(){if(W){var e;(e=I.current)==null||e.setSelectionRange.apply(e,X(W))}},[W]);var te=function(e){Y(e,e.target.value,{source:`change`})},ne=function(e){P.current=!1,Y(e,e.currentTarget.value,{source:`compositionEnd`}),k?.(e)},re=function(e){o&&e.key===`Enter`&&!F.current&&(F.current=!0,o(e)),l?.(e)},ie=function(e){e.key===`Enter`&&(F.current=!1),u?.(e)},ae=function(e){N(!0),i?.(e)},oe=function(e){F.current&&=!1,N(!1),a?.(e)},se=function(e){V(``),R(),I.current&&yb(I.current,e,r)},ce=J&&`${f}-out-of-range`;return s.createElement(xb,c({},A,{prefixCls:f,className:(0,h.default)(g,ce),handleReset:se,value:H,focused:M,triggerFocus:R,suffix:function(){var e=Number(q)>0;if(v||K.show){var t=K.showFormatter?K.showFormatter({value:H,count:ee,maxLength:q}):`${ee}${e?` / ${q}`:``}`;return s.createElement(s.Fragment,null,K.show&&s.createElement(`span`,{className:(0,h.default)(`${f}-show-count-suffix`,E({},`${f}-show-count-has-suffix`,!!v),w?.count),style:O({},T?.count)},t),v)}return null}(),disabled:p,classes:C,classNames:w,styles:T,ref:L}),function(){var t=du(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return s.createElement(`input`,c({autoComplete:n},t,{onChange:te,onFocus:ae,onBlur:oe,onKeyDown:re,onKeyUp:ie,className:(0,h.default)(f,E({},`${f}-disabled`,p),w?.input),style:T?.input,ref:I,size:m,type:S,onCompositionStart:function(e){P.current=!0,D?.(e)},onCompositionEnd:ne}))}())}),Eb=e=>{let t;return typeof e==`object`&&e?.clearIcon?t=e:e&&(t={clearIcon:s.createElement(nc,null)}),t};function Db(e,t){let n=(0,s.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{var t;e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&((t=e.current)==null||t.input.removeAttribute(`value`))}))};return(0,s.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function Ob(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var kb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:c,onFocus:l,suffix:u,allowClear:d,addonAfter:f,addonBefore:p,className:m,style:g,styles:_,rootClassName:v,onChange:y,classNames:b,variant:x,_skipAddonWarning:S}=e,C=kb(e,[`prefixCls`,`bordered`,`status`,`size`,`disabled`,`onBlur`,`onFocus`,`suffix`,`allowClear`,`addonAfter`,`addonBefore`,`className`,`style`,`styles`,`rootClassName`,`onChange`,`classNames`,`variant`,`_skipAddonWarning`]),{getPrefixCls:w,direction:T,allowClear:E,autoComplete:D,className:O,style:k,classNames:A,styles:j}=ma(`input`),M=w(`input`,n),N=(0,s.useRef)(null),P=Rc(M),[F,I,L]=k3(M,v),[z]=A3(M,P),{compactSize:B,compactItemClassnames:V}=Du(M,T),H=Su(e=>a??B??e),U=s.useContext(va),W=o??U,{status:G,hasFeedback:K,feedbackIcon:q}=(0,s.useContext)(xh),ee=dv(G,i),J=Ob(e)||!!K;(0,s.useRef)(J);let Y=Db(N,!0),te=e=>{Y(),c?.(e)},ne=e=>{Y(),l?.(e)},re=e=>{Y(),y?.(e)},ie=(K||u)&&s.createElement(s.Fragment,null,u,K&&q),ae=Eb(d??E),[oe,se]=xv(`input`,x,r);return F(z(s.createElement(Tb,Object.assign({ref:R(t,N),prefixCls:M,autoComplete:D},C,{disabled:W,onBlur:te,onFocus:ne,style:Object.assign(Object.assign({},k),g),styles:Object.assign(Object.assign({},j),_),suffix:ie,allowClear:ae,className:(0,h.default)(m,v,L,P,V,O),onChange:re,addonBefore:p&&s.createElement(wh,{form:!0,space:!0},p),addonAfter:f&&s.createElement(wh,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},b),A),{input:(0,h.default)({[`${M}-sm`]:H===`small`,[`${M}-lg`]:H===`large`,[`${M}-rtl`]:T===`rtl`},b?.input,A.input,I),variant:(0,h.default)({[`${M}-${oe}`]:se},uv(M,ee)),affixWrapper:(0,h.default)({[`${M}-affix-wrapper-sm`]:H===`small`,[`${M}-affix-wrapper-lg`]:H===`large`,[`${M}-affix-wrapper-rtl`]:T===`rtl`},I),wrapper:(0,h.default)({[`${M}-group-rtl`]:T===`rtl`},I),groupWrapper:(0,h.default)({[`${M}-group-wrapper-sm`]:H===`small`,[`${M}-group-wrapper-lg`]:H===`large`,[`${M}-group-wrapper-rtl`]:T===`rtl`,[`${M}-group-wrapper-${oe}`]:se},uv(`${M}-group-wrapper`,ee,K),I)})}))))});function jb(e){return[`small`,`middle`,`large`].includes(e)}function Mb(e){return e?typeof e==`number`&&!Number.isNaN(e):!1}var Nb=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d}=e;return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,paddingInline:r,margin:0,background:u,borderWidth:d,borderStyle:`solid`,borderColor:i,borderRadius:n,"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},zf(e,{focus:!1})]}},Pb=_o([`Space`,`Addon`],e=>[Nb(e)]),Fb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{className:n,children:r,style:i,prefixCls:a}=e,o=Fb(e,[`className`,`children`,`style`,`prefixCls`]),{getPrefixCls:c,direction:l}=s.useContext(da),u=c(`space-addon`,a),[d,f,p]=Pb(u),{compactItemClassnames:m,compactSize:g}=Du(u,l),_=(0,h.default)(u,f,m,p,{[`${u}-${g}`]:g},n);return d(s.createElement(`div`,Object.assign({ref:t,className:_,style:i},o),r))}),Lb=s.createContext({latestIndex:0}),Rb=Lb.Provider,zb=({className:e,index:t,children:n,split:r,style:i})=>{let{latestIndex:a}=s.useContext(Lb);return n==null?null:s.createElement(s.Fragment,null,s.createElement(`div`,{className:e,style:i},n),t{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},Vb=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},Hb=_o(`Space`,e=>{let t=La(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[Bb(t),Vb(t)]},()=>({}),{resetStyle:!1}),Ub=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:c,styles:l}=ma(`space`),{size:u=i??`small`,align:d,className:f,rootClassName:p,children:m,direction:_=`horizontal`,prefixCls:v,split:y,style:b,wrap:x=!1,classNames:S,styles:C}=e,w=Ub(e,[`size`,`align`,`className`,`rootClassName`,`children`,`direction`,`prefixCls`,`split`,`style`,`wrap`,`classNames`,`styles`]),[T,E]=Array.isArray(u)?u:[u,u],D=jb(E),O=jb(T),k=Mb(E),A=Mb(T),j=g(m,{keepEmpty:!0}),M=d===void 0&&_===`horizontal`?`center`:d,N=n(`space`,v),[P,F,I]=Hb(N),L=(0,h.default)(N,a,F,`${N}-${_}`,{[`${N}-rtl`]:r===`rtl`,[`${N}-align-${M}`]:M,[`${N}-gap-row-${E}`]:D,[`${N}-gap-col-${T}`]:O},f,p,I),R=(0,h.default)(`${N}-item`,S?.item??c.item),z=Object.assign(Object.assign({},l.item),C?.item),B=j.map((e,t)=>{let n=e?.key||`${R}-${t}`;return s.createElement(zb,{className:R,key:n,index:t,split:y,style:z},e)}),V=s.useMemo(()=>({latestIndex:j.reduce((e,t,n)=>t==null?e:n,0)}),[j]);if(j.length===0)return null;let H={};return x&&(H.flexWrap=`wrap`),!O&&A&&(H.columnGap=T),!D&&k&&(H.rowGap=E),P(s.createElement(`div`,Object.assign({ref:t,className:L,style:Object.assign(Object.assign(Object.assign({},H),o),b)},w),s.createElement(Rb,{value:V},B)))});Wb.Compact=Au,Wb.Addon=Ib;function Gb(e){return e==null?null:typeof e==`object`&&!(0,s.isValidElement)(e)?e:{title:e}}function Kb(e){let[t,n]=s.useState(e);return s.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var qb=e=>{let{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:`hidden`,transition:`height ${e.motionDurationFast} ${e.motionEaseInOut}, + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function $6(e,t){return Q6(La(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var eb=_o(`Checkbox`,(e,{prefixCls:t})=>[$6(t,e)]),tb=s.createContext(null),nb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,className:r,rootClassName:i,children:a,indeterminate:o=!1,style:c,onMouseEnter:l,onMouseLeave:u,skipGroup:d=!1,disabled:f}=e,p=nb(e,[`prefixCls`,`className`,`rootClassName`,`children`,`indeterminate`,`style`,`onMouseEnter`,`onMouseLeave`,`skipGroup`,`disabled`]),{getPrefixCls:m,direction:g,checkbox:_}=s.useContext(da),v=s.useContext(tb),{isFormItemInput:y}=s.useContext(xh),b=s.useContext(va),x=(v?.disabled||f)??b,S=s.useRef(p.value),C=s.useRef(null),w=R(t,C);s.useEffect(()=>{v?.registerValue(p.value)},[]),s.useEffect(()=>{if(!d)return p.value!==S.current&&(v?.cancelValue(S.current),v?.registerValue(p.value),S.current=p.value),()=>v?.cancelValue(p.value)},[p.value]),s.useEffect(()=>{C.current?.input&&(C.current.input.indeterminate=o)},[o]);let T=m(`checkbox`,n),E=Rc(T),[D,O,k]=eb(T,E),A=Object.assign({},p);v&&!d&&(A.onChange=(...e)=>{p.onChange&&p.onChange.apply(p,e),v.toggleOption&&v.toggleOption({label:a,value:p.value})},A.name=v.name,A.checked=v.value.includes(p.value));let j=(0,h.default)(`${T}-wrapper`,{[`${T}-rtl`]:g===`rtl`,[`${T}-wrapper-checked`]:A.checked,[`${T}-wrapper-disabled`]:x,[`${T}-wrapper-in-form-item`]:y},_?.className,r,i,k,E,O),M=(0,h.default)({[`${T}-indeterminate`]:o},mu,O),[N,P]=N4(A.onClick);return D(s.createElement(xu,{component:`Checkbox`,disabled:x},s.createElement(`label`,{className:j,style:Object.assign(Object.assign({},_?.style),c),onMouseEnter:l,onMouseLeave:u,onClick:N},s.createElement(M4,Object.assign({},A,{onClick:P,prefixCls:T,className:M,disabled:x,ref:w})),a!=null&&s.createElement(`span`,{className:`${T}-label`},a))))}),ib=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:c,style:l,onChange:u}=e,d=ib(e,[`defaultValue`,`children`,`options`,`prefixCls`,`className`,`rootClassName`,`style`,`onChange`]),{getPrefixCls:f,direction:p}=s.useContext(da),[m,g]=s.useState(d.value||n||[]),[_,v]=s.useState([]);s.useEffect(()=>{`value`in d&&g(d.value||[])},[d.value]);let y=s.useMemo(()=>i.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e),[i]),b=e=>{v(t=>t.filter(t=>t!==e))},x=e=>{v(t=>[].concat(X(t),[e]))},S=e=>{let t=m.indexOf(e.value),n=X(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||g(n),u?.(n.filter(e=>_.includes(e)).sort((e,t)=>y.findIndex(t=>t.value===e)-y.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=Rc(C),[E,D,O]=eb(C,T),k=du(d,[`value`,`disabled`]),A=i.length?y.map(e=>s.createElement(rb,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:(0,h.default)(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,j=s.useMemo(()=>({toggleOption:S,value:m,disabled:d.disabled,name:d.name,registerValue:x,cancelValue:b}),[S,m,d.disabled,d.name,x,b]),M=(0,h.default)(w,{[`${w}-rtl`]:p===`rtl`},o,c,O,T,D);return E(s.createElement(`div`,Object.assign({className:M,style:l},k,{ref:t}),s.createElement(tb.Provider,{value:j},A)))}),ob=rb;ob.Group=ab,ob.__ANT_CHECKBOX=!0;var sb=(0,s.createContext)({}),cb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{getPrefixCls:n,direction:r}=s.useContext(da),{gutter:i,wrap:a}=s.useContext(sb),{prefixCls:o,span:c,order:l,offset:u,push:d,pull:f,className:p,children:m,flex:g,style:_}=e,v=cb(e,[`prefixCls`,`span`,`order`,`offset`,`push`,`pull`,`className`,`children`,`flex`,`style`]),y=n(`col`,o),[b,x,S]=xg(y),C={},w={};ub.forEach(t=>{let n={},i=e[t];typeof i==`number`?n.span=i:typeof i==`object`&&(n=i||{}),delete v[t],w=Object.assign(Object.assign({},w),{[`${y}-${t}-${n.span}`]:n.span!==void 0,[`${y}-${t}-order-${n.order}`]:n.order||n.order===0,[`${y}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${y}-${t}-push-${n.push}`]:n.push||n.push===0,[`${y}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${y}-rtl`]:r===`rtl`}),n.flex&&(w[`${y}-${t}-flex`]=!0,C[`--${y}-${t}-flex`]=lb(n.flex))});let T=(0,h.default)(y,{[`${y}-${c}`]:c!==void 0,[`${y}-order-${l}`]:l,[`${y}-offset-${u}`]:u,[`${y}-push-${d}`]:d,[`${y}-pull-${f}`]:f},p,w,x,S),E={};if(i?.[0]){let e=typeof i[0]==`number`?`${i[0]/2}px`:`calc(${i[0]} / 2)`;E.paddingLeft=e,E.paddingRight=e}return g&&(E.flex=lb(g),a===!1&&!E.minWidth&&(E.minWidth=0)),b(s.createElement(`div`,Object.assign({},v,{style:Object.assign(Object.assign(Object.assign({},E),_),C),className:T,ref:t}),m))});function fb(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((e,t)=>{if(typeof e==`object`&&e)for(let r=0;r{if(typeof e==`string`&&r(e),typeof e==`object`)for(let n=0;n{i()},[JSON.stringify(e),t]),n}var hb=s.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:c,gutter:l=0,wrap:u}=e,d=pb(e,[`prefixCls`,`justify`,`align`,`className`,`style`,`children`,`gutter`,`wrap`]),{getPrefixCls:f,direction:p}=s.useContext(da),m=gy(!0,null),g=mb(i,m),_=mb(r,m),v=f(`row`,n),[y,b,x]=yg(v),S=fb(l,m),C=(0,h.default)(v,{[`${v}-no-wrap`]:u===!1,[`${v}-${_}`]:_,[`${v}-${g}`]:g,[`${v}-rtl`]:p===`rtl`},a,b,x),w={};if(S?.[0]){let e=typeof S[0]==`number`?`${S[0]/-2}px`:`calc(${S[0]} / -2)`;w.marginLeft=e,w.marginRight=e}let[T,E]=S;w.rowGap=E;let D=s.useMemo(()=>({gutter:[T,E],wrap:u}),[T,E,u]);return y(s.createElement(sb.Provider,{value:D},s.createElement(`div`,Object.assign({},d,{className:C,style:Object.assign(Object.assign({},w),o),ref:t}),c)))}),gb=db;function _b(e){return!!(e.addonBefore||e.addonAfter)}function vb(e){return!!(e.prefix||e.suffix||e.allowClear)}function yb(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function bb(e,t,n,r){if(n){var i=t;t.type===`click`?(i=yb(t,e,``),n(i)):(e.type!==`file`&&r!==void 0&&(i=yb(t,e,r)),n(i))}}function xb(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var Sb=s.forwardRef(function(e,t){var n=e.inputElement,r=e.children,i=e.prefixCls,a=e.prefix,o=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,p=e.style,m=e.disabled,g=e.readOnly,_=e.focused,v=e.triggerFocus,y=e.allowClear,b=e.value,x=e.handleReset,S=e.hidden,C=e.classes,w=e.classNames,T=e.dataAttrs,D=e.styles,k=e.components,A=e.onClear,j=r??n,M=k?.affixWrapper||`span`,N=k?.groupWrapper||`span`,P=k?.wrapper||`span`,F=k?.groupAddon||`span`,I=(0,s.useRef)(null),L=function(e){var t;(t=I.current)!=null&&t.contains(e.target)&&v?.()},R=vb(e),z=(0,s.cloneElement)(j,{value:b,className:(0,h.default)(j.props?.className,!R&&w?.variant)||null}),B=(0,s.useRef)(null);if(s.useImperativeHandle(t,function(){return{nativeElement:B.current||I.current}}),R){var V=null;if(y){var H=!m&&!g&&b,U=`${i}-clear-icon`,W=l(y)===`object`&&y!=null&&y.clearIcon?y.clearIcon:`✖`;V=s.createElement(`button`,{type:`button`,tabIndex:-1,onClick:function(e){x?.(e),A?.()},onMouseDown:function(e){return e.preventDefault()},className:(0,h.default)(U,E(E({},`${U}-hidden`,!H),`${U}-has-suffix`,!!o))},W)}var G=`${i}-affix-wrapper`,K=(0,h.default)(G,E(E(E(E(E({},`${i}-disabled`,m),`${G}-disabled`,m),`${G}-focused`,_),`${G}-readonly`,g),`${G}-input-with-clear-btn`,o&&y&&b),C?.affixWrapper,w?.affixWrapper,w?.variant),q=(o||y)&&s.createElement(`span`,{className:(0,h.default)(`${i}-suffix`,w?.suffix),style:D?.suffix},V,o);z=s.createElement(M,c({className:K,style:D?.affixWrapper,onClick:L},T?.affixWrapper,{ref:I}),a&&s.createElement(`span`,{className:(0,h.default)(`${i}-prefix`,w?.prefix),style:D?.prefix},a),z,q)}if(_b(e)){var ee=`${i}-group`,J=`${ee}-addon`,Y=`${ee}-wrapper`,te=(0,h.default)(`${i}-wrapper`,ee,C?.wrapper,w?.wrapper),ne=(0,h.default)(Y,E({},`${Y}-disabled`,m),C?.group,w?.groupWrapper);z=s.createElement(N,{className:ne,ref:B},s.createElement(P,{className:te},u&&s.createElement(F,{className:J},u),z,d&&s.createElement(F,{className:J},d)))}return s.cloneElement(z,{className:(0,h.default)(z.props?.className,f)||null,style:O(O({},z.props?.style),p),hidden:S})}),Cb=[`show`];function wb(e,t){return s.useMemo(function(){var n={};t&&(n.show=l(t)===`object`&&t.formatter?t.formatter:!!t),n=O(O({},n),e);var r=n,i=r.show,a=yt(r,Cb);return O(O({},a),{},{show:!!i,showFormatter:typeof i==`function`?i:void 0,strategy:a.strategy||function(e){return e.length}})},[e,t])}var Tb=[`autoComplete`,`onChange`,`onFocus`,`onBlur`,`onPressEnter`,`onKeyDown`,`onKeyUp`,`prefixCls`,`disabled`,`htmlSize`,`className`,`maxLength`,`suffix`,`showCount`,`count`,`type`,`classes`,`classNames`,`styles`,`onCompositionStart`,`onCompositionEnd`],Eb=(0,s.forwardRef)(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,a=e.onBlur,o=e.onPressEnter,l=e.onKeyDown,u=e.onKeyUp,d=e.prefixCls,f=d===void 0?`rc-input`:d,p=e.disabled,m=e.htmlSize,g=e.className,_=e.maxLength,v=e.suffix,y=e.showCount,b=e.count,x=e.type,S=x===void 0?`text`:x,C=e.classes,w=e.classNames,T=e.styles,D=e.onCompositionStart,k=e.onCompositionEnd,A=yt(e,Tb),j=Z((0,s.useState)(!1),2),M=j[0],N=j[1],P=(0,s.useRef)(!1),F=(0,s.useRef)(!1),I=(0,s.useRef)(null),L=(0,s.useRef)(null),R=function(e){I.current&&xb(I.current,e)},z=Z(Na(e.defaultValue,{value:e.value}),2),B=z[0],V=z[1],H=B==null?``:String(B),U=Z((0,s.useState)(null),2),W=U[0],G=U[1],K=wb(b,y),q=K.max||_,ee=K.strategy(H),J=!!q&&ee>q;(0,s.useImperativeHandle)(t,function(){return{focus:R,blur:function(){var e;(e=I.current)==null||e.blur()},setSelectionRange:function(e,t,n){var r;(r=I.current)==null||r.setSelectionRange(e,t,n)},select:function(){var e;(e=I.current)==null||e.select()},input:I.current,nativeElement:L.current?.nativeElement||I.current}}),(0,s.useEffect)(function(){F.current&&=!1,N(function(e){return e&&p?!1:e})},[p]);var Y=function(e,t,n){var i=t;if(!P.current&&K.exceedFormatter&&K.max&&K.strategy(t)>K.max)i=K.exceedFormatter(t,{max:K.max}),t!==i&&G([I.current?.selectionStart||0,I.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;V(i),I.current&&bb(I.current,e,r,i)};(0,s.useEffect)(function(){if(W){var e;(e=I.current)==null||e.setSelectionRange.apply(e,X(W))}},[W]);var te=function(e){Y(e,e.target.value,{source:`change`})},ne=function(e){P.current=!1,Y(e,e.currentTarget.value,{source:`compositionEnd`}),k?.(e)},re=function(e){o&&e.key===`Enter`&&!F.current&&(F.current=!0,o(e)),l?.(e)},ie=function(e){e.key===`Enter`&&(F.current=!1),u?.(e)},ae=function(e){N(!0),i?.(e)},oe=function(e){F.current&&=!1,N(!1),a?.(e)},se=function(e){V(``),R(),I.current&&bb(I.current,e,r)},ce=J&&`${f}-out-of-range`;return s.createElement(Sb,c({},A,{prefixCls:f,className:(0,h.default)(g,ce),handleReset:se,value:H,focused:M,triggerFocus:R,suffix:function(){var e=Number(q)>0;if(v||K.show){var t=K.showFormatter?K.showFormatter({value:H,count:ee,maxLength:q}):`${ee}${e?` / ${q}`:``}`;return s.createElement(s.Fragment,null,K.show&&s.createElement(`span`,{className:(0,h.default)(`${f}-show-count-suffix`,E({},`${f}-show-count-has-suffix`,!!v),w?.count),style:O({},T?.count)},t),v)}return null}(),disabled:p,classes:C,classNames:w,styles:T,ref:L}),function(){var t=du(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return s.createElement(`input`,c({autoComplete:n},t,{onChange:te,onFocus:ae,onBlur:oe,onKeyDown:re,onKeyUp:ie,className:(0,h.default)(f,E({},`${f}-disabled`,p),w?.input),style:T?.input,ref:I,size:m,type:S,onCompositionStart:function(e){P.current=!0,D?.(e)},onCompositionEnd:ne}))}())}),Db=e=>{let t;return typeof e==`object`&&e?.clearIcon?t=e:e&&(t={clearIcon:s.createElement(nc,null)}),t};function Ob(e,t){let n=(0,s.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{var t;e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&((t=e.current)==null||t.input.removeAttribute(`value`))}))};return(0,s.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function kb(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var Ab=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:c,onFocus:l,suffix:u,allowClear:d,addonAfter:f,addonBefore:p,className:m,style:g,styles:_,rootClassName:v,onChange:y,classNames:b,variant:x,_skipAddonWarning:S}=e,C=Ab(e,[`prefixCls`,`bordered`,`status`,`size`,`disabled`,`onBlur`,`onFocus`,`suffix`,`allowClear`,`addonAfter`,`addonBefore`,`className`,`style`,`styles`,`rootClassName`,`onChange`,`classNames`,`variant`,`_skipAddonWarning`]),{getPrefixCls:w,direction:T,allowClear:E,autoComplete:D,className:O,style:k,classNames:A,styles:j}=ma(`input`),M=w(`input`,n),N=(0,s.useRef)(null),P=Rc(M),[F,I,L]=k3(M,v),[z]=A3(M,P),{compactSize:B,compactItemClassnames:V}=Du(M,T),H=Su(e=>a??B??e),U=s.useContext(va),W=o??U,{status:G,hasFeedback:K,feedbackIcon:q}=(0,s.useContext)(xh),ee=dv(G,i),J=kb(e)||!!K;(0,s.useRef)(J);let Y=Ob(N,!0),te=e=>{Y(),c?.(e)},ne=e=>{Y(),l?.(e)},re=e=>{Y(),y?.(e)},ie=(K||u)&&s.createElement(s.Fragment,null,u,K&&q),ae=Db(d??E),[oe,se]=xv(`input`,x,r);return F(z(s.createElement(Eb,Object.assign({ref:R(t,N),prefixCls:M,autoComplete:D},C,{disabled:W,onBlur:te,onFocus:ne,style:Object.assign(Object.assign({},k),g),styles:Object.assign(Object.assign({},j),_),suffix:ie,allowClear:ae,className:(0,h.default)(m,v,L,P,V,O),onChange:re,addonBefore:p&&s.createElement(wh,{form:!0,space:!0},p),addonAfter:f&&s.createElement(wh,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},b),A),{input:(0,h.default)({[`${M}-sm`]:H===`small`,[`${M}-lg`]:H===`large`,[`${M}-rtl`]:T===`rtl`},b?.input,A.input,I),variant:(0,h.default)({[`${M}-${oe}`]:se},uv(M,ee)),affixWrapper:(0,h.default)({[`${M}-affix-wrapper-sm`]:H===`small`,[`${M}-affix-wrapper-lg`]:H===`large`,[`${M}-affix-wrapper-rtl`]:T===`rtl`},I),wrapper:(0,h.default)({[`${M}-group-rtl`]:T===`rtl`},I),groupWrapper:(0,h.default)({[`${M}-group-wrapper-sm`]:H===`small`,[`${M}-group-wrapper-lg`]:H===`large`,[`${M}-group-wrapper-rtl`]:T===`rtl`,[`${M}-group-wrapper-${oe}`]:se},uv(`${M}-group-wrapper`,ee,K),I)})}))))}),Mb=s.createContext(null),Nb=s.createContext({}),Pb=[`prefixCls`,`className`,`containerRef`],Fb=function(e){var t=e.prefixCls,n=e.className,r=e.containerRef,i=yt(e,Pb),a=z(s.useContext(Nb).panel,r);return s.createElement(`div`,c({className:(0,h.default)(`${t}-content`,n),role:`dialog`,ref:a},pc(e,{aria:!0}),{"aria-modal":`true`},i))};function Ib(e){return typeof e==`string`&&String(Number(e))===e?(C(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var Lb={width:0,height:0,overflow:`hidden`,outline:`none`,position:`absolute`};function Rb(e,t){var n=e.prefixCls,r=e.open,i=e.placement,a=e.inline,o=e.push,l=e.forceRender,u=e.autoFocus,d=e.keyboard,f=e.classNames,p=e.rootClassName,m=e.rootStyle,g=e.zIndex,_=e.className,v=e.id,y=e.style,b=e.motion,x=e.width,S=e.height,C=e.children,w=e.mask,T=e.maskClosable,D=e.maskMotion,k=e.maskClassName,A=e.maskStyle,j=e.afterOpenChange,M=e.onClose,N=e.onMouseEnter,P=e.onMouseOver,F=e.onMouseLeave,I=e.onClick,L=e.onKeyDown,R=e.onKeyUp,z=e.styles,B=e.drawerRender,V=s.useRef(),H=s.useRef(),U=s.useRef();s.useImperativeHandle(t,function(){return V.current});var W=function(e){var t=e.keyCode,n=e.shiftKey;switch(t){case $.TAB:if(t===$.TAB){if(!n&&document.activeElement===U.current){var r;(r=H.current)==null||r.focus({preventScroll:!0})}else if(n&&document.activeElement===H.current){var i;(i=U.current)==null||i.focus({preventScroll:!0})}}break;case $.ESC:M&&d&&(e.stopPropagation(),M(e))}};s.useEffect(function(){if(r&&u){var e;(e=V.current)==null||e.focus({preventScroll:!0})}},[r]);var G=Z(s.useState(!1),2),K=G[0],q=G[1],ee=s.useContext(Mb),J=(typeof o==`boolean`?o?{}:{distance:0}:o||{})?.distance??ee?.pushDistance??180,Y=s.useMemo(function(){return{pushDistance:J,push:function(){q(!0)},pull:function(){q(!1)}}},[J]);s.useEffect(function(){if(r){var e;ee==null||(e=ee.push)==null||e.call(ee)}else{var t;ee==null||(t=ee.pull)==null||t.call(ee)}},[r]),s.useEffect(function(){return function(){var e;ee==null||(e=ee.pull)==null||e.call(ee)}},[]);var te=s.createElement(vs,c({key:`mask`},D,{visible:w&&r}),function(e,t){var i=e.className,a=e.style;return s.createElement(`div`,{className:(0,h.default)(`${n}-mask`,i,f?.mask,k),style:O(O(O({},a),A),z?.mask),onClick:T&&r?M:void 0,ref:t})}),ne=typeof b==`function`?b(i):b,re={};if(K&&J)switch(i){case`top`:re.transform=`translateY(${J}px)`;break;case`bottom`:re.transform=`translateY(${-J}px)`;break;case`left`:re.transform=`translateX(${J}px)`;break;default:re.transform=`translateX(${-J}px)`}i===`left`||i===`right`?re.width=Ib(x):re.height=Ib(S);var ie={onMouseEnter:N,onMouseOver:P,onMouseLeave:F,onClick:I,onKeyDown:L,onKeyUp:R},ae=s.createElement(vs,c({key:`panel`},ne,{visible:r,forceRender:l,onVisibleChanged:function(e){j?.(e)},removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),function(t,r){var i=t.className,a=t.style,o=s.createElement(Fb,c({id:v,containerRef:r,prefixCls:n,className:(0,h.default)(_,f?.content),style:O(O({},y),z?.content)},pc(e,{aria:!0}),ie),C);return s.createElement(`div`,c({className:(0,h.default)(`${n}-content-wrapper`,f?.wrapper,i),style:O(O(O({},re),a),z?.wrapper)},pc(e,{data:!0})),B?B(o):o)}),oe=O({},m);return g&&(oe.zIndex=g),s.createElement(Mb.Provider,{value:Y},s.createElement(`div`,{className:(0,h.default)(n,`${n}-${i}`,p,E(E({},`${n}-open`,r),`${n}-inline`,a)),style:oe,tabIndex:-1,ref:V,onKeyDown:W},te,s.createElement(`div`,{tabIndex:0,ref:H,style:Lb,"aria-hidden":`true`,"data-sentinel":`start`}),ae,s.createElement(`div`,{tabIndex:0,ref:U,style:Lb,"aria-hidden":`true`,"data-sentinel":`end`})))}var zb=s.forwardRef(Rb),Bb=function(e){var t=e.open,n=t!==void 0&&t,r=e.prefixCls,i=r===void 0?`rc-drawer`:r,a=e.placement,o=a===void 0?`right`:a,c=e.autoFocus,l=c===void 0||c,u=e.keyboard,d=u===void 0||u,f=e.width,p=f===void 0?378:f,m=e.mask,h=m===void 0||m,g=e.maskClosable,_=g===void 0||g,v=e.getContainer,y=e.forceRender,b=e.afterOpenChange,x=e.destroyOnClose,S=e.onMouseEnter,C=e.onMouseOver,w=e.onMouseLeave,T=e.onClick,E=e.onKeyDown,D=e.onKeyUp,k=e.panelRef,A=Z(s.useState(!1),2),j=A[0],M=A[1],N=Z(s.useState(!1),2),P=N[0],F=N[1];qt(function(){F(!0)},[]);var I=P?n:!1,L=s.useRef(),R=s.useRef();qt(function(){I&&(R.current=document.activeElement)},[I]);var z=function(e){var t;if(M(e),b?.(e),!e&&R.current&&!((t=L.current)!=null&&t.contains(R.current))){var n;(n=R.current)==null||n.focus({preventScroll:!0})}},B=s.useMemo(function(){return{panel:k}},[k]);if(!y&&!j&&!I&&x)return null;var V={onMouseEnter:S,onMouseOver:C,onMouseLeave:w,onClick:T,onKeyDown:E,onKeyUp:D},H=O(O({},e),{},{open:I,prefixCls:i,placement:o,autoFocus:l,keyboard:d,width:p,mask:h,maskClosable:_,inline:v===!1,afterOpenChange:z,ref:L},V);return s.createElement(Nb.Provider,{value:B},s.createElement(mp,{open:I||y||j,autoDestroy:!1,getContainer:v,autoLock:h&&(I||j)},s.createElement(zb,H)))},Vb=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:c,onClose:l,headerStyle:u,bodyStyle:d,footerStyle:f,children:p,classNames:m,styles:g}=e,_=ma(`drawer`),v;v=o===!1?void 0:o===void 0||o===!0?`start`:o?.placement===`end`?`end`:`start`;let y=s.useCallback(e=>s.createElement(`button`,{type:`button`,onClick:l,className:(0,h.default)(`${t}-close`,{[`${t}-close-${v}`]:v===`end`})},e),[l,t,v]),[b,x]=ol(rl(e),rl(_),{closable:!0,closeIconRender:y});return s.createElement(s.Fragment,null,!r&&!b?null:s.createElement(`div`,{style:Object.assign(Object.assign(Object.assign({},_.styles?.header),u),g?.header),className:(0,h.default)(`${t}-header`,{[`${t}-header-close-only`]:b&&!r&&!a},_.classNames?.header,m?.header)},s.createElement(`div`,{className:`${t}-header-title`},v===`start`&&x,r&&s.createElement(`div`,{className:`${t}-title`,id:n},r)),a&&s.createElement(`div`,{className:`${t}-extra`},a),v===`end`&&x),s.createElement(`div`,{className:(0,h.default)(`${t}-body`,m?.body,_.classNames?.body),style:Object.assign(Object.assign(Object.assign({},_.styles?.body),d),g?.body)},c?s.createElement(ig,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):p),(()=>{if(!i)return null;let e=`${t}-footer`;return s.createElement(`div`,{className:(0,h.default)(e,_.classNames?.footer,m?.footer),style:Object.assign(Object.assign(Object.assign({},_.styles?.footer),f),g?.footer)},i)})())},Hb=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Ub=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),Wb=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}}},Ub({opacity:e},{opacity:1})),Gb=(e,t)=>[Wb(.7,t),Ub({transform:Hb(e)},{transform:`none`})],Kb=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:Wb(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>Object.assign(Object.assign({},e),{[`&-${t}`]:Gb(t,n)}),{})}}},qb=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,calc:T}=e,E=`${n}-content-wrapper`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`},[E]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${E}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${E}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${E}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${E}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-content`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Q(l)} ${Q(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Q(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:Object.assign({display:`inline-flex`,width:T(d).add(c).equal(),height:T(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b}},mo(e)),[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Q(C)} ${Q(w)}`,borderTop:`${Q(p)} ${m} ${h}`},"&-rtl":{direction:`rtl`}}}},Jb=_o(`Drawer`,e=>{let t=La(e,{});return[qb(t),Kb(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding})),Yb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{rootClassName:t,width:n,height:r,size:i=`default`,mask:a=!0,push:o=Xb,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:g,"aria-labelledby":_,visible:v,afterVisibleChange:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:S,destroyOnClose:C,destroyOnHidden:w}=e,T=Yb(e,[`rootClassName`,`width`,`height`,`size`,`mask`,`push`,`open`,`afterOpenChange`,`onClose`,`prefixCls`,`getContainer`,`panelRef`,`style`,`className`,`aria-labelledby`,`visible`,`afterVisibleChange`,`maskStyle`,`drawerStyle`,`contentWrapperStyle`,`destroyOnClose`,`destroyOnHidden`]),E=yp(),D=T.title?E:void 0,{getPopupContainer:O,getPrefixCls:k,direction:A,className:j,style:M,classNames:N,styles:P}=ma(`drawer`),F=k(`drawer`,d),[I,L,z]=Jb(F),B=f===void 0&&O?()=>O(document.body):f,V=(0,h.default)({"no-mask":!a,[`${F}-rtl`]:A===`rtl`},t,L,z),H=s.useMemo(()=>n??(i===`large`?736:378),[n,i]),U=s.useMemo(()=>r??(i===`large`?736:378),[r,i]),W={motionName:uu(F,`mask-motion`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},G=e=>({motionName:uu(F,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),K=R(p,sg()),[q,ee]=hl(`Drawer`,T.zIndex),{classNames:J={},styles:Y={}}=T;return I(s.createElement(wh,{form:!0,space:!0},s.createElement(ll.Provider,{value:ee},s.createElement(Bb,Object.assign({prefixCls:F,onClose:u,maskMotion:W,motion:G},T,{classNames:{mask:(0,h.default)(J.mask,N.mask),content:(0,h.default)(J.content,N.content),wrapper:(0,h.default)(J.wrapper,N.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},Y.mask),b),P.mask),content:Object.assign(Object.assign(Object.assign({},Y.content),x),P.content),wrapper:Object.assign(Object.assign(Object.assign({},Y.wrapper),S),P.wrapper)},open:c??v,mask:a,push:o,width:H,height:U,style:Object.assign(Object.assign({},M),m),className:(0,h.default)(j,g),rootClassName:V,getContainer:B,afterOpenChange:l??y,panelRef:K,zIndex:q,"aria-labelledby":_??D,destroyOnClose:w??C}),s.createElement(Vb,Object.assign({prefixCls:F},T,{ariaId:D,onClose:u}))))))};Zb._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`}=e,a=Yb(e,[`prefixCls`,`style`,`className`,`placement`]),{getPrefixCls:o}=s.useContext(da),c=o(`drawer`,t),[l,u,d]=Jb(c),f=(0,h.default)(c,`${c}-pure`,`${c}-${i}`,u,d,r);return l(s.createElement(`div`,{className:f,style:n},s.createElement(Vb,Object.assign({prefixCls:c},a))))};function Qb(e){return[`small`,`middle`,`large`].includes(e)}function $b(e){return e?typeof e==`number`&&!Number.isNaN(e):!1}var e8=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d}=e;return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,paddingInline:r,margin:0,background:u,borderWidth:d,borderStyle:`solid`,borderColor:i,borderRadius:n,"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},zf(e,{focus:!1})]}},t8=_o([`Space`,`Addon`],e=>[e8(e)]),n8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{className:n,children:r,style:i,prefixCls:a}=e,o=n8(e,[`className`,`children`,`style`,`prefixCls`]),{getPrefixCls:c,direction:l}=s.useContext(da),u=c(`space-addon`,a),[d,f,p]=t8(u),{compactItemClassnames:m,compactSize:g}=Du(u,l),_=(0,h.default)(u,f,m,p,{[`${u}-${g}`]:g},n);return d(s.createElement(`div`,Object.assign({ref:t,className:_,style:i},o),r))}),i8=s.createContext({latestIndex:0}),a8=i8.Provider,o8=({className:e,index:t,children:n,split:r,style:i})=>{let{latestIndex:a}=s.useContext(i8);return n==null?null:s.createElement(s.Fragment,null,s.createElement(`div`,{className:e,style:i},n),t{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},c8=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},l8=_o(`Space`,e=>{let t=La(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[s8(t),c8(t)]},()=>({}),{resetStyle:!1}),u8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:c,styles:l}=ma(`space`),{size:u=i??`small`,align:d,className:f,rootClassName:p,children:m,direction:_=`horizontal`,prefixCls:v,split:y,style:b,wrap:x=!1,classNames:S,styles:C}=e,w=u8(e,[`size`,`align`,`className`,`rootClassName`,`children`,`direction`,`prefixCls`,`split`,`style`,`wrap`,`classNames`,`styles`]),[T,E]=Array.isArray(u)?u:[u,u],D=Qb(E),O=Qb(T),k=$b(E),A=$b(T),j=g(m,{keepEmpty:!0}),M=d===void 0&&_===`horizontal`?`center`:d,N=n(`space`,v),[P,F,I]=l8(N),L=(0,h.default)(N,a,F,`${N}-${_}`,{[`${N}-rtl`]:r===`rtl`,[`${N}-align-${M}`]:M,[`${N}-gap-row-${E}`]:D,[`${N}-gap-col-${T}`]:O},f,p,I),R=(0,h.default)(`${N}-item`,S?.item??c.item),z=Object.assign(Object.assign({},l.item),C?.item),B=j.map((e,t)=>{let n=e?.key||`${R}-${t}`;return s.createElement(o8,{className:R,key:n,index:t,split:y,style:z},e)}),V=s.useMemo(()=>({latestIndex:j.reduce((e,t,n)=>t==null?e:n,0)}),[j]);if(j.length===0)return null;let H={};return x&&(H.flexWrap=`wrap`),!O&&A&&(H.columnGap=T),!D&&k&&(H.rowGap=E),P(s.createElement(`div`,Object.assign({ref:t,className:L,style:Object.assign(Object.assign(Object.assign({},H),o),b)},w),s.createElement(a8,{value:V},B)))});d8.Compact=Au,d8.Addon=r8;function f8(e){return e==null?null:typeof e==`object`&&!(0,s.isValidElement)(e)?e:{title:e}}var p8={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`},m8=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:p8}))});function h8(e){let[t,n]=s.useState(e);return s.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var g8=e=>{let{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:`hidden`,transition:`height ${e.motionDurationFast} ${e.motionEaseInOut}, opacity ${e.motionDurationFast} ${e.motionEaseInOut}, - transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${r}-leave-active`]:{transform:`translateY(-5px)`}}}}},Jb=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Q(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Yb=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},Xb=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},so(e)),Jb(e)),{[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Yb(e,e.controlHeightSM)),"&-large":Object.assign({},Yb(e,e.controlHeightLG))})}},Zb=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},so(e)),{marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, - &-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`SimSun, sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{"--ant-display":`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:Bd,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},Qb=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),$b=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, - ${t}-col-xl-24${n}-label`]:Qb(e)}}},e8=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, - > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},t8=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:Qb(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},n8=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, + transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${r}-leave-active`]:{transform:`translateY(-5px)`}}}}},_8=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Q(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),v8=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},y8=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},so(e)),_8(e)),{[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},v8(e,e.controlHeightSM)),"&-large":Object.assign({},v8(e,e.controlHeightLG))})}},b8=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},so(e)),{marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, + &-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`SimSun, sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{"--ant-display":`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:Bd,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},x8=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),S8=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, + ${t}-col-xl-24${n}-label`]:x8(e)}}},C8=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, + > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},w8=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:x8(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},T8=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, ${r}-col-24${n}-label, - ${r}-col-xl-24${n}-label`]:Qb(e)},[`@media (max-width: ${Q(e.screenXSMax)})`]:[t8(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:Qb(e)}}}],[`@media (max-width: ${Q(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:Qb(e)}}},[`@media (max-width: ${Q(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:Qb(e)}}},[`@media (max-width: ${Q(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:Qb(e)}}}}},r8=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),i8=(e,t)=>La(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),a8=_o(`Form`,(e,{rootPrefixCls:t})=>{let n=i8(e,t);return[Xb(n),Zb(n),qb(n),$b(n),e8(n),n8(n),hd(n),Bd]},r8,{order:-1e3}),o8=[];function s8(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var c8=({help:e,helpStatus:t,errors:n=o8,warnings:r=o8,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:c}=s.useContext(bh),l=`${c}-item-explain`,u=Rc(c),[d,f,p]=a8(c,u),m=s.useMemo(()=>lu(c),[c]),g=Kb(n),_=Kb(r),v=s.useMemo(()=>e==null?[].concat(X(g.map((e,t)=>s8(e,`error`,`error`,t))),X(_.map((e,t)=>s8(e,`warning`,`warning`,t)))):[s8(e,`help`,t)],[e,t,g,_]),y=s.useMemo(()=>{let e={};return v.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),v.map((t,n)=>Object.assign(Object.assign({},t),{key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[v]),b={};return a&&(b.id=`${a}_help`),d(s.createElement(vs,{motionDeadline:m.motionDeadline,motionName:`${c}-show-help`,visible:!!y.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return s.createElement(`div`,Object.assign({},b,{className:(0,h.default)(l,t,p,u,i,f),style:n}),s.createElement(_s,Object.assign({keys:y},lu(c),{motionName:`${c}-show-help-item`,component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return s.createElement(`div`,{key:t,className:(0,h.default)(i,{[`${l}-${r}`]:r}),style:a},n)}))}))},l8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let n=s.useContext(va),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:c,className:l,style:u}=ma(`form`),{prefixCls:d,className:f,rootClassName:p,size:m,disabled:g=n,form:_,colon:v,labelAlign:y,labelWrap:b,labelCol:x,wrapperCol:S,hideRequiredMark:C,layout:w=`horizontal`,scrollToFirstError:T,requiredMark:E,onFinishFailed:D,name:O,style:k,feedbackIcons:A,variant:j}=e,M=l8(e,[`prefixCls`,`className`,`rootClassName`,`size`,`disabled`,`form`,`colon`,`labelAlign`,`labelWrap`,`labelCol`,`wrapperCol`,`hideRequiredMark`,`layout`,`scrollToFirstError`,`requiredMark`,`onFinishFailed`,`name`,`style`,`feedbackIcons`,`variant`]),N=Su(m),P=s.useContext(Lr),F=s.useMemo(()=>E===void 0?C?!1:a===void 0||a:E,[C,E,a]),I=v??o,L=r(`form`,d),R=Rc(L),[z,B,V]=a8(L,R),H=(0,h.default)(L,`${L}-${w}`,{[`${L}-hide-required-mark`]:F===!1,[`${L}-rtl`]:i===`rtl`,[`${L}-${N}`]:N},V,R,B,l,f,p),[U]=J4(_),{__INTERNAL__:W}=U;W.name=O;let G=s.useMemo(()=>({name:O,labelAlign:y,labelCol:x,labelWrap:b,wrapperCol:S,layout:w,colon:I,requiredMark:F,itemRef:W.itemRef,form:U,feedbackIcons:A}),[O,y,x,S,w,I,F,U,A]),K=s.useRef(null);s.useImperativeHandle(t,()=>Object.assign(Object.assign({},U),{nativeElement:K.current?.nativeElement}));let q=(e,t)=>{if(e){let n={block:`nearest`};typeof e==`object`&&(n=Object.assign(Object.assign({},n),e)),U.scrollToField(t,n)}};return z(s.createElement(Ch.Provider,{value:j},s.createElement(ya,{disabled:g},s.createElement(ba.Provider,{value:N},s.createElement(yh,{validateMessages:P},s.createElement(_h.Provider,{value:G},s.createElement(Sh,{status:!0},s.createElement(gh,Object.assign({id:O},M,{name:O,onFinishFailed:e=>{if(D?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(T!==void 0){q(T,t);return}c!==void 0&&q(c,t)}},form:U,ref:K,style:Object.assign(Object.assign({},u),k),className:H})))))))))});function d8(e){if(typeof e==`function`)return e;let t=g(e);return t.length<=1?t[0]:t}var f8=()=>{let{status:e,errors:t=[],warnings:n=[]}=s.useContext(xh);return{status:e,errors:t,warnings:n}};f8.Context=xh;function p8(e){let[t,n]=s.useState(e),r=s.useRef(null),i=s.useRef([]),a=s.useRef(!1);s.useEffect(()=>(a.current=!1,()=>{a.current=!0,$e.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=$e(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}function m8(){let{itemRef:e}=s.useContext(_h),t=s.useRef({});function n(n,r){let i=r&&typeof r==`object`&&H(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=R(e(n),i)),t.current.ref}return n}var h8=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},g8=yo([`Form`,`item-item`],(e,{rootPrefixCls:t})=>h8(i8(e,t))),_8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:c,_internalItemRender:l,extra:u,help:d,fieldId:f,marginBottom:p,onErrorVisibleChanged:m,label:g}=e,_=`${t}-item`,v=s.useContext(_h),y=s.useMemo(()=>{let e=Object.assign({},i||v.wrapperCol||{});return g===null&&!r&&!i&&v.labelCol&&[void 0,`xs`,`sm`,`md`,`lg`,`xl`,`xxl`].forEach(t=>{let n=t?[t]:[],r=Dr(v.labelCol,n),i=typeof r==`object`?r:{},a=Dr(e,n),o=typeof a==`object`?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t}=v;return _8(v,[`labelCol`,`wrapperCol`])},[v]),S=s.useRef(null),[C,w]=s.useState(0);qt(()=>{u&&S.current?w(S.current.clientHeight):w(0)},[u]);let T=s.createElement(`div`,{className:`${_}-control-input`},s.createElement(`div`,{className:`${_}-control-input-content`},a)),E=s.useMemo(()=>({prefixCls:t,status:n}),[t,n]),D=p!==null||o.length||c.length?s.createElement(bh.Provider,{value:E},s.createElement(c8,{fieldId:f,errors:o,warnings:c,help:d,helpStatus:n,className:`${_}-explain-connected`,onVisibleChanged:m})):null,O={};f&&(O.id=`${f}_extra`);let k=u?s.createElement(`div`,Object.assign({},O,{className:`${_}-extra`,ref:S}),u):null,A=D||k?s.createElement(`div`,{className:`${_}-additional`,style:p?{minHeight:p+C}:{}},D,k):null,j=l&&l.mark===`pro_table_render`&&l.render?l.render(e,{input:T,errorList:D,extra:k}):s.createElement(s.Fragment,null,T,A);return s.createElement(_h.Provider,{value:x},s.createElement(db,Object.assign({},y,{className:b}),j),s.createElement(g8,{prefixCls:t}))},b8={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`question-circle`,theme:`outlined`},x8=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:b8}))}),S8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let[d]=Zr(`Form`),{labelAlign:f,labelCol:p,labelWrap:m,colon:g}=s.useContext(_h);if(!t)return null;let _=r||p||{},v=i||f,y=`${e}-item-label`,b=(0,h.default)(y,v===`left`&&`${y}-left`,_.className,{[`${y}-wrap`]:!!m}),x=t,S=a===!0||g!==!1&&a!==!1;S&&!u&&typeof t==`string`&&t.trim()&&(x=t.replace(/[:|:]\s*$/,``));let C=Gb(l);if(C){let{icon:t=s.createElement(x8,null)}=C,n=S8(C,[`icon`]),r=s.createElement(Wy,Object.assign({},n),s.cloneElement(t,{className:`${e}-item-tooltip`,title:``,onClick:e=>{e.preventDefault()},tabIndex:null}));x=s.createElement(s.Fragment,null,x,r)}let w=c===`optional`,T=typeof c==`function`,E=c===!1;T?x=c(x,{required:!!o}):w&&!o&&(x=s.createElement(s.Fragment,null,x,s.createElement(`span`,{className:`${e}-item-optional`,title:``},d?.optional||Wr.Form?.optional)));let D;E?D=`hidden`:(w||T)&&(D=`optional`);let O=(0,h.default)({[`${e}-item-required`]:o,[`${e}-item-required-mark-${D}`]:D,[`${e}-item-no-colon`]:!S});return s.createElement(db,Object.assign({},_,{className:b}),s.createElement(`label`,{htmlFor:n,className:O,title:typeof t==`string`?t:``},x))},w8={success:ec,warning:oc,error:nc,validating:tl};function T8({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:c,name:l}){let u=`${a}-item`,{feedbackIcons:d}=s.useContext(_h),f=W4(t,n,o,null,!!r,i),{isFormItemInput:p,status:m,hasFeedback:g,feedbackIcon:_,name:v}=s.useContext(xh),y=s.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||d,a=f&&i?.({status:f,errors:t,warnings:n})?.[f],o=f?w8[f]:null;e=a!==!1&&o?s.createElement(`span`,{className:(0,h.default)(`${u}-feedback-icon`,`${u}-feedback-icon-${f}`)},a||s.createElement(o,null)):null}let i={status:f||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:l};return c&&(i.status=(f??m)||``,i.isFormItemInput=p,i.hasFeedback=!!(r??g),i.feedbackIcon=r===void 0?_:i.feedbackIcon,i.name=l??v),i},[f,r,c,p,m]);return s.createElement(xh.Provider,{value:y},e)}var E8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{if(j&&D.current){let e=getComputedStyle(D.current);P(Number.parseInt(e.marginBottom,10))}},[j,M]);let F=e=>{e||P(null)},I=((e=!1)=>W4(e?O:u.errors,e?k:u.warnings,u,``,!!d,l))(),L=(0,h.default)(S,n,r,{[`${S}-with-help`]:A||O.length||k.length,[`${S}-has-feedback`]:I&&d,[`${S}-has-success`]:I===`success`,[`${S}-has-warning`]:I===`warning`,[`${S}-has-error`]:I===`error`,[`${S}-is-validating`]:I===`validating`,[`${S}-hidden`]:f,[`${S}-${T}`]:T});return s.createElement(`div`,{className:L,style:i,ref:D},s.createElement(hb,Object.assign({className:`${S}-row`},du(x,`_internalItemRender.colon.dependencies.extra.fieldKey.getValueFromEvent.getValueProps.htmlFor.id.initialValue.isListField.label.labelAlign.labelCol.labelWrap.messageVariables.name.normalize.noStyle.preserve.requiredMark.rules.shouldUpdate.trigger.tooltip.validateFirst.validateTrigger.valuePropName.wrapperCol.validateDebounce`.split(`.`))),s.createElement(C8,Object.assign({htmlFor:m},e,{requiredMark:C,required:g??_,prefixCls:t,vertical:E})),s.createElement(y8,Object.assign({},e,u,{errors:O,warnings:k,prefixCls:t,status:I,help:a,marginBottom:N,onErrorVisibleChanged:F}),s.createElement(vh.Provider,{value:v},s.createElement(T8,{prefixCls:t,meta:u,errors:u.errors,warnings:u.warnings,hasFeedback:d,validateStatus:I,name:b},p)))),!!N&&s.createElement(`div`,{className:`${S}-margin-offset`,style:{marginBottom:-N}}))}var O8=`__SPLIT__`;function k8(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var A8=s.memo(({children:e})=>e,(e,t)=>k8(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function j8(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function M8(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:c,children:l,required:u,label:d,messageVariables:f,trigger:p=`onChange`,validateTrigger:m,hidden:g,help:_,layout:v}=e,{getPrefixCls:y}=s.useContext(da),{name:b}=s.useContext(_h),x=d8(l),S=typeof x==`function`,C=s.useContext(vh),{validateTrigger:w}=s.useContext(Pp),T=m===void 0?w:m,E=t!=null,D=y(`form`,a),O=Rc(D),[k,A,j]=a8(D,O);Ir(`Form.Item`);let M=s.useContext(Fp),N=s.useRef(null),[P,F]=p8({}),[I,L]=ja(()=>j8()),R=e=>{let t=M?.getKey(e.name);if(L(e.destroy?j8():e,!0),n&&_!==!1&&C){let n=e.name;if(e.destroy)n=N.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(X(r)),N.current=n}C(e,n)}},z=(e,t)=>{F(n=>{let r=Object.assign({},n),i=[].concat(X(e.name.slice(0,-1)),X(t)).join(O8);return e.destroy?delete r[i]:r[i]=e,r})},[V,H]=s.useMemo(()=>{let e=X(I.errors),t=X(I.warnings);return Object.values(P).forEach(n=>{e.push.apply(e,X(n.errors||[])),t.push.apply(t,X(n.warnings||[]))}),[e,t]},[P,I.errors,I.warnings]),U=m8();function W(i,a,o){return n&&!g?s.createElement(T8,{prefixCls:D,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:I,errors:V,warnings:H,noStyle:!0,name:t},i):s.createElement(D8,Object.assign({key:`row`},e,{className:(0,h.default)(r,j,O,A),prefixCls:D,fieldId:a,isRequired:o,errors:V,warnings:H,meta:I,onSubItemMetaChange:z,layout:v,name:t}),i)}if(!E&&!S&&!i)return k(W(x));let G={};return typeof d==`string`?G.label=d:t&&(G.label=String(t)),f&&(G=Object.assign(Object.assign({},G),f)),k(s.createElement(th,Object.assign({},e,{messageVariables:G,trigger:p,validateTrigger:T,onMetaChange:R}),(n,r,a)=>{let l=H4(t).length&&r?r.name:[],d=U4(l,b),f=u===void 0?!!c?.some(e=>{if(e&&typeof e==`object`&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):u,m=Object.assign({},n),h=null;if(Array.isArray(x)&&E)h=x;else if((!S||(o||i)&&!E)&&(!i||S||E)){if(s.isValidElement(x)){let t=Object.assign(Object.assign({},x.props),m);if(t.id||=d,_||V.length>0||H.length>0||e.extra){let n=[];(_||V.length>0)&&n.push(`${d}_help`),e.extra&&n.push(`${d}_extra`),t[`aria-describedby`]=n.join(` `)}V.length>0&&(t[`aria-invalid`]=`true`),f&&(t[`aria-required`]=`true`),B(x)&&(t.ref=U(l,x)),new Set([].concat(X(H4(p)),X(H4(T)))).forEach(e=>{t[e]=(...t)=>{var n,r,i,a,o;(i=m[e])==null||(n=i).call.apply(n,[m].concat(t)),(o=(a=x.props)[e])==null||(r=o).call.apply(r,[a].concat(t))}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];h=s.createElement(A8,{control:m,update:x,childProps:n},gc(x,t))}else h=S&&(o||i)&&!E?x(a):x}return W(h,d,f)}))}var N8=M8;N8.useStatus=f8;var P8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{var{prefixCls:t,children:n}=e,r=P8(e,[`prefixCls`,`children`]);let{getPrefixCls:i}=s.useContext(da),a=i(`form`,t),o=s.useMemo(()=>({prefixCls:a,status:`error`}),[a]);return s.createElement(nh,Object.assign({},r),(e,t,r)=>s.createElement(bh.Provider,{value:o},n(e.map(e=>Object.assign(Object.assign({},e),{fieldKey:e.key})),t,{errors:r.errors,warnings:r.warnings})))},I8=u8;I8.Item=N8,I8.List=F8,I8.ErrorList=c8,I8.useForm=J4,I8.useFormInstance=function(){let{form:e}=s.useContext(_h);return e},I8.useWatch=hh,I8.Provider=yh,I8.create=()=>{};var L8={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`},R8=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:L8}))}),z8=e=>{let{getPrefixCls:t,direction:n}=(0,s.useContext)(da),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,c,l]=A3(t(`input`)),u=(0,h.default)(a,l,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},c,i),d=(0,s.useContext)(xh),f=(0,s.useMemo)(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return o(s.createElement(`span`,{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},s.createElement(xh.Provider,{value:f},e.children)))},B8=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},V8=_o([`Input`,`OTP`],e=>B8(La(e,e3(e))),t3),H8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:c}=e,l=H8(e,[`className`,`value`,`onChange`,`onActiveChange`,`index`,`mask`]),{getPrefixCls:u}=s.useContext(da),d=u(`otp`),f=typeof c==`string`?c:r,p=s.useRef(null);s.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},g=()=>{$e(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})};return s.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},c&&r!==``&&r!==void 0&&s.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),s.createElement(Ab,Object.assign({"aria-label":`OTP Input ${o+1}`,type:c===!0?`password`:`text`},l,{ref:p,value:r,onInput:m,onFocus:g,onKeyDown:e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),g()},onMouseDown:g,onMouseUp:g,className:(0,h.default)(n,{[`${d}-mask-input`]:c})})))}),W8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{index:t,prefixCls:n,separator:r}=e,i=typeof r==`function`?r(t):r;return i?s.createElement(`span`,{className:`${n}-separator`},i):null},q8=s.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:c,formatter:l,separator:u,variant:d,disabled:f,status:p,autoFocus:m,mask:g,type:_,onInput:v,inputMode:y}=e,b=W8(e,[`prefixCls`,`length`,`size`,`defaultValue`,`value`,`onChange`,`formatter`,`separator`,`variant`,`disabled`,`status`,`autoFocus`,`mask`,`type`,`onInput`,`inputMode`]),{getPrefixCls:x,direction:S}=s.useContext(da),C=x(`otp`,n),w=pc(b,{aria:!0,data:!0,attr:!0}),[T,E,D]=V8(C),O=Su(e=>i??e),k=s.useContext(xh),A=dv(k.status,p),j=s.useMemo(()=>Object.assign(Object.assign({},k),{status:A,hasFeedback:!1,feedbackIcon:null}),[k,A]),M=s.useRef(null),N=s.useRef({});s.useImperativeHandle(t,()=>({focus:()=>{var e;(e=N.current[0])==null||e.focus()},blur:()=>{var e;for(let t=0;tl?l(e):e,[F,I]=s.useState(()=>G8(P(a||``)));s.useEffect(()=>{o!==void 0&&I(G8(o))},[o]);let L=Aa(e=>{I(e),v&&v(e),c&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>F[t]!==e)&&c(e.join(``))}),R=Aa((e,t)=>{let n=X(F);for(let t=0;t=0&&!n[e];--e)n.pop();return n=G8(P(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),z=(e,t)=>{var n;let i=R(e,t),a=Math.min(e+t.length,r-1);a!==e&&i[e]!==void 0&&((n=N.current[a])==null||n.focus()),L(i)},B=e=>{var t;(t=N.current[e])==null||t.focus()},V={variant:d,disabled:f,status:A,mask:g,type:_,inputMode:y};return T(s.createElement(`div`,Object.assign({},w,{ref:M,className:(0,h.default)(C,{[`${C}-sm`]:O===`small`,[`${C}-lg`]:O===`large`,[`${C}-rtl`]:S===`rtl`},D,E),role:`group`}),s.createElement(xh.Provider,{value:j},Array.from({length:r}).map((e,t)=>{let n=`otp-${t}`,i=F[t]||``;return s.createElement(s.Fragment,{key:n},s.createElement(U8,Object.assign({ref:e=>{N.current[t]=e},index:t,size:O,htmlSize:1,className:`${C}-input`,onChange:z,value:i,onActiveChange:B,autoFocus:t===0&&m},V)),te?s.createElement(R8,null):s.createElement(Y8,null),Q8={click:`onClick`,hover:`onMouseOver`},$8=s.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=Z8,suffix:o}=e,c=s.useContext(va),l=n??c,u=typeof i==`object`&&i.visible!==void 0,[d,f]=(0,s.useState)(()=>u?i.visible:!1),p=(0,s.useRef)(null);s.useEffect(()=>{u&&f(i.visible)},[u,i]);let m=Db(p),g=()=>{var e;if(l)return;d&&m();let t=!d;f(t),typeof i==`object`&&((e=i.onVisibleChange)==null||e.call(i,t))},_=e=>{let t=Q8[r]||``,n=a(d),i={[t]:g,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return s.cloneElement(s.isValidElement(n)?n:s.createElement(`span`,null,n),i)},{className:v,prefixCls:y,inputPrefixCls:b,size:x}=e,S=X8(e,[`className`,`prefixCls`,`inputPrefixCls`,`size`]),{getPrefixCls:C}=s.useContext(da),w=C(`input`,b),T=C(`input-password`,y),E=i&&_(T),D=(0,h.default)(T,v,{[`${T}-${x}`]:!!x}),O=Object.assign(Object.assign({},du(S,[`suffix`,`iconRender`,`visibilityToggle`])),{type:d?`text`:`password`,className:D,prefixCls:w,suffix:s.createElement(s.Fragment,null,E,o)});return x&&(O.size=x),s.createElement(Ab,Object.assign({ref:R(t,p)},O))}),ex=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,suffix:o,enterButton:c=!1,addonAfter:l,loading:u,disabled:d,onSearch:f,onChange:p,onCompositionStart:m,onCompositionEnd:g,variant:_,onPressEnter:v}=e,y=ex(e,[`prefixCls`,`inputPrefixCls`,`className`,`size`,`suffix`,`enterButton`,`addonAfter`,`loading`,`disabled`,`onSearch`,`onChange`,`onCompositionStart`,`onCompositionEnd`,`variant`,`onPressEnter`]),{getPrefixCls:b,direction:x}=s.useContext(da),S=s.useRef(!1),C=b(`input-search`,n),w=b(`input`,r),{compactSize:T}=Du(C,x),E=Su(e=>a??T??e),D=s.useRef(null),O=e=>{e?.target&&e.type===`click`&&f&&f(e.target.value,e,{source:`clear`}),p?.(e)},k=e=>{document.activeElement===D.current?.input&&e.preventDefault()},A=e=>{f&&f(D.current?.input?.value,e,{source:`input`})},j=e=>{S.current||u||(v?.(e),A(e))},M=typeof c==`boolean`?s.createElement(ny,null):null,N=`${C}-button`,P,F=c||{},I=F.type&&F.type.__ANT_BUTTON===!0;P=I||F.type===`button`?gc(F,Object.assign({onMouseDown:k,onClick:e=>{var t,n;(n=(t=F?.props)?.onClick)==null||n.call(t,e),A(e)},key:`enterButton`},I?{className:N,size:E}:{})):s.createElement(Yf,{className:N,color:c?`primary`:`default`,size:E,disabled:d,key:`enterButton`,onMouseDown:k,onClick:A,loading:u,icon:M,variant:_===`borderless`||_===`filled`||_===`underlined`?`text`:c?`solid`:void 0},c),l&&(P=[P,gc(l,{key:`addonAfter`})]);let L=(0,h.default)(C,{[`${C}-rtl`]:x===`rtl`,[`${C}-${E}`]:!!E,[`${C}-with-button`]:!!c},i),z=Object.assign(Object.assign({},y),{className:L,prefixCls:w,type:`search`,size:E,variant:_,onPressEnter:j,onCompositionStart:e=>{S.current=!0,m?.(e)},onCompositionEnd:e=>{S.current=!1,g?.(e)},addonAfter:P,suffix:o,onChange:O,disabled:d,_skipAddonWarning:!0});return s.createElement(Ab,Object.assign({ref:R(D,t)},z))}),nx=` + ${r}-col-xl-24${n}-label`]:x8(e)},[`@media (max-width: ${Q(e.screenXSMax)})`]:[w8(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:x8(e)}}}],[`@media (max-width: ${Q(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:x8(e)}}},[`@media (max-width: ${Q(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:x8(e)}}},[`@media (max-width: ${Q(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:x8(e)}}}}},E8=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),D8=(e,t)=>La(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),O8=_o(`Form`,(e,{rootPrefixCls:t})=>{let n=D8(e,t);return[y8(n),b8(n),g8(n),S8(n),C8(n),T8(n),hd(n),Bd]},E8,{order:-1e3}),k8=[];function A8(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var j8=({help:e,helpStatus:t,errors:n=k8,warnings:r=k8,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:c}=s.useContext(bh),l=`${c}-item-explain`,u=Rc(c),[d,f,p]=O8(c,u),m=s.useMemo(()=>lu(c),[c]),g=h8(n),_=h8(r),v=s.useMemo(()=>e==null?[].concat(X(g.map((e,t)=>A8(e,`error`,`error`,t))),X(_.map((e,t)=>A8(e,`warning`,`warning`,t)))):[A8(e,`help`,t)],[e,t,g,_]),y=s.useMemo(()=>{let e={};return v.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),v.map((t,n)=>Object.assign(Object.assign({},t),{key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[v]),b={};return a&&(b.id=`${a}_help`),d(s.createElement(vs,{motionDeadline:m.motionDeadline,motionName:`${c}-show-help`,visible:!!y.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return s.createElement(`div`,Object.assign({},b,{className:(0,h.default)(l,t,p,u,i,f),style:n}),s.createElement(_s,Object.assign({keys:y},lu(c),{motionName:`${c}-show-help-item`,component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return s.createElement(`div`,{key:t,className:(0,h.default)(i,{[`${l}-${r}`]:r}),style:a},n)}))}))},M8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let n=s.useContext(va),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:c,className:l,style:u}=ma(`form`),{prefixCls:d,className:f,rootClassName:p,size:m,disabled:g=n,form:_,colon:v,labelAlign:y,labelWrap:b,labelCol:x,wrapperCol:S,hideRequiredMark:C,layout:w=`horizontal`,scrollToFirstError:T,requiredMark:E,onFinishFailed:D,name:O,style:k,feedbackIcons:A,variant:j}=e,M=M8(e,[`prefixCls`,`className`,`rootClassName`,`size`,`disabled`,`form`,`colon`,`labelAlign`,`labelWrap`,`labelCol`,`wrapperCol`,`hideRequiredMark`,`layout`,`scrollToFirstError`,`requiredMark`,`onFinishFailed`,`name`,`style`,`feedbackIcons`,`variant`]),N=Su(m),P=s.useContext(Lr),F=s.useMemo(()=>E===void 0?C?!1:a===void 0||a:E,[C,E,a]),I=v??o,L=r(`form`,d),R=Rc(L),[z,B,V]=O8(L,R),H=(0,h.default)(L,`${L}-${w}`,{[`${L}-hide-required-mark`]:F===!1,[`${L}-rtl`]:i===`rtl`,[`${L}-${N}`]:N},V,R,B,l,f,p),[U]=J4(_),{__INTERNAL__:W}=U;W.name=O;let G=s.useMemo(()=>({name:O,labelAlign:y,labelCol:x,labelWrap:b,wrapperCol:S,layout:w,colon:I,requiredMark:F,itemRef:W.itemRef,form:U,feedbackIcons:A}),[O,y,x,S,w,I,F,U,A]),K=s.useRef(null);s.useImperativeHandle(t,()=>Object.assign(Object.assign({},U),{nativeElement:K.current?.nativeElement}));let q=(e,t)=>{if(e){let n={block:`nearest`};typeof e==`object`&&(n=Object.assign(Object.assign({},n),e)),U.scrollToField(t,n)}};return z(s.createElement(Ch.Provider,{value:j},s.createElement(ya,{disabled:g},s.createElement(ba.Provider,{value:N},s.createElement(yh,{validateMessages:P},s.createElement(_h.Provider,{value:G},s.createElement(Sh,{status:!0},s.createElement(gh,Object.assign({id:O},M,{name:O,onFinishFailed:e=>{if(D?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(T!==void 0){q(T,t);return}c!==void 0&&q(c,t)}},form:U,ref:K,style:Object.assign(Object.assign({},u),k),className:H})))))))))});function P8(e){if(typeof e==`function`)return e;let t=g(e);return t.length<=1?t[0]:t}var F8=()=>{let{status:e,errors:t=[],warnings:n=[]}=s.useContext(xh);return{status:e,errors:t,warnings:n}};F8.Context=xh;function I8(e){let[t,n]=s.useState(e),r=s.useRef(null),i=s.useRef([]),a=s.useRef(!1);s.useEffect(()=>(a.current=!1,()=>{a.current=!0,$e.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=$e(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}function L8(){let{itemRef:e}=s.useContext(_h),t=s.useRef({});function n(n,r){let i=r&&typeof r==`object`&&H(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=R(e(n),i)),t.current.ref}return n}var R8=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},z8=yo([`Form`,`item-item`],(e,{rootPrefixCls:t})=>R8(D8(e,t))),B8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:c,_internalItemRender:l,extra:u,help:d,fieldId:f,marginBottom:p,onErrorVisibleChanged:m,label:g}=e,_=`${t}-item`,v=s.useContext(_h),y=s.useMemo(()=>{let e=Object.assign({},i||v.wrapperCol||{});return g===null&&!r&&!i&&v.labelCol&&[void 0,`xs`,`sm`,`md`,`lg`,`xl`,`xxl`].forEach(t=>{let n=t?[t]:[],r=Dr(v.labelCol,n),i=typeof r==`object`?r:{},a=Dr(e,n),o=typeof a==`object`?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t}=v;return B8(v,[`labelCol`,`wrapperCol`])},[v]),S=s.useRef(null),[C,w]=s.useState(0);qt(()=>{u&&S.current?w(S.current.clientHeight):w(0)},[u]);let T=s.createElement(`div`,{className:`${_}-control-input`},s.createElement(`div`,{className:`${_}-control-input-content`},a)),E=s.useMemo(()=>({prefixCls:t,status:n}),[t,n]),D=p!==null||o.length||c.length?s.createElement(bh.Provider,{value:E},s.createElement(j8,{fieldId:f,errors:o,warnings:c,help:d,helpStatus:n,className:`${_}-explain-connected`,onVisibleChanged:m})):null,O={};f&&(O.id=`${f}_extra`);let k=u?s.createElement(`div`,Object.assign({},O,{className:`${_}-extra`,ref:S}),u):null,A=D||k?s.createElement(`div`,{className:`${_}-additional`,style:p?{minHeight:p+C}:{}},D,k):null,j=l&&l.mark===`pro_table_render`&&l.render?l.render(e,{input:T,errorList:D,extra:k}):s.createElement(s.Fragment,null,T,A);return s.createElement(_h.Provider,{value:x},s.createElement(db,Object.assign({},y,{className:b}),j),s.createElement(z8,{prefixCls:t}))},U8={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`question-circle`,theme:`outlined`},W8=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:U8}))}),G8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let[d]=Zr(`Form`),{labelAlign:f,labelCol:p,labelWrap:m,colon:g}=s.useContext(_h);if(!t)return null;let _=r||p||{},v=i||f,y=`${e}-item-label`,b=(0,h.default)(y,v===`left`&&`${y}-left`,_.className,{[`${y}-wrap`]:!!m}),x=t,S=a===!0||g!==!1&&a!==!1;S&&!u&&typeof t==`string`&&t.trim()&&(x=t.replace(/[:|:]\s*$/,``));let C=f8(l);if(C){let{icon:t=s.createElement(W8,null)}=C,n=G8(C,[`icon`]),r=s.createElement(Wy,Object.assign({},n),s.cloneElement(t,{className:`${e}-item-tooltip`,title:``,onClick:e=>{e.preventDefault()},tabIndex:null}));x=s.createElement(s.Fragment,null,x,r)}let w=c===`optional`,T=typeof c==`function`,E=c===!1;T?x=c(x,{required:!!o}):w&&!o&&(x=s.createElement(s.Fragment,null,x,s.createElement(`span`,{className:`${e}-item-optional`,title:``},d?.optional||Wr.Form?.optional)));let D;E?D=`hidden`:(w||T)&&(D=`optional`);let O=(0,h.default)({[`${e}-item-required`]:o,[`${e}-item-required-mark-${D}`]:D,[`${e}-item-no-colon`]:!S});return s.createElement(db,Object.assign({},_,{className:b}),s.createElement(`label`,{htmlFor:n,className:O,title:typeof t==`string`?t:``},x))},q8={success:ec,warning:oc,error:nc,validating:tl};function J8({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:c,name:l}){let u=`${a}-item`,{feedbackIcons:d}=s.useContext(_h),f=W4(t,n,o,null,!!r,i),{isFormItemInput:p,status:m,hasFeedback:g,feedbackIcon:_,name:v}=s.useContext(xh),y=s.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||d,a=f&&i?.({status:f,errors:t,warnings:n})?.[f],o=f?q8[f]:null;e=a!==!1&&o?s.createElement(`span`,{className:(0,h.default)(`${u}-feedback-icon`,`${u}-feedback-icon-${f}`)},a||s.createElement(o,null)):null}let i={status:f||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:l};return c&&(i.status=(f??m)||``,i.isFormItemInput=p,i.hasFeedback=!!(r??g),i.feedbackIcon=r===void 0?_:i.feedbackIcon,i.name=l??v),i},[f,r,c,p,m]);return s.createElement(xh.Provider,{value:y},e)}var Y8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{if(j&&D.current){let e=getComputedStyle(D.current);P(Number.parseInt(e.marginBottom,10))}},[j,M]);let F=e=>{e||P(null)},I=((e=!1)=>W4(e?O:u.errors,e?k:u.warnings,u,``,!!d,l))(),L=(0,h.default)(S,n,r,{[`${S}-with-help`]:A||O.length||k.length,[`${S}-has-feedback`]:I&&d,[`${S}-has-success`]:I===`success`,[`${S}-has-warning`]:I===`warning`,[`${S}-has-error`]:I===`error`,[`${S}-is-validating`]:I===`validating`,[`${S}-hidden`]:f,[`${S}-${T}`]:T});return s.createElement(`div`,{className:L,style:i,ref:D},s.createElement(hb,Object.assign({className:`${S}-row`},du(x,`_internalItemRender.colon.dependencies.extra.fieldKey.getValueFromEvent.getValueProps.htmlFor.id.initialValue.isListField.label.labelAlign.labelCol.labelWrap.messageVariables.name.normalize.noStyle.preserve.requiredMark.rules.shouldUpdate.trigger.tooltip.validateFirst.validateTrigger.valuePropName.wrapperCol.validateDebounce`.split(`.`))),s.createElement(K8,Object.assign({htmlFor:m},e,{requiredMark:C,required:g??_,prefixCls:t,vertical:E})),s.createElement(H8,Object.assign({},e,u,{errors:O,warnings:k,prefixCls:t,status:I,help:a,marginBottom:N,onErrorVisibleChanged:F}),s.createElement(vh.Provider,{value:v},s.createElement(J8,{prefixCls:t,meta:u,errors:u.errors,warnings:u.warnings,hasFeedback:d,validateStatus:I,name:b},p)))),!!N&&s.createElement(`div`,{className:`${S}-margin-offset`,style:{marginBottom:-N}}))}var Z8=`__SPLIT__`;function Q8(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var $8=s.memo(({children:e})=>e,(e,t)=>Q8(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function ex(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function tx(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:c,children:l,required:u,label:d,messageVariables:f,trigger:p=`onChange`,validateTrigger:m,hidden:g,help:_,layout:v}=e,{getPrefixCls:y}=s.useContext(da),{name:b}=s.useContext(_h),x=P8(l),S=typeof x==`function`,C=s.useContext(vh),{validateTrigger:w}=s.useContext(Pp),T=m===void 0?w:m,E=t!=null,D=y(`form`,a),O=Rc(D),[k,A,j]=O8(D,O);Ir(`Form.Item`);let M=s.useContext(Fp),N=s.useRef(null),[P,F]=I8({}),[I,L]=ja(()=>ex()),R=e=>{let t=M?.getKey(e.name);if(L(e.destroy?ex():e,!0),n&&_!==!1&&C){let n=e.name;if(e.destroy)n=N.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(X(r)),N.current=n}C(e,n)}},z=(e,t)=>{F(n=>{let r=Object.assign({},n),i=[].concat(X(e.name.slice(0,-1)),X(t)).join(Z8);return e.destroy?delete r[i]:r[i]=e,r})},[V,H]=s.useMemo(()=>{let e=X(I.errors),t=X(I.warnings);return Object.values(P).forEach(n=>{e.push.apply(e,X(n.errors||[])),t.push.apply(t,X(n.warnings||[]))}),[e,t]},[P,I.errors,I.warnings]),U=L8();function W(i,a,o){return n&&!g?s.createElement(J8,{prefixCls:D,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:I,errors:V,warnings:H,noStyle:!0,name:t},i):s.createElement(X8,Object.assign({key:`row`},e,{className:(0,h.default)(r,j,O,A),prefixCls:D,fieldId:a,isRequired:o,errors:V,warnings:H,meta:I,onSubItemMetaChange:z,layout:v,name:t}),i)}if(!E&&!S&&!i)return k(W(x));let G={};return typeof d==`string`?G.label=d:t&&(G.label=String(t)),f&&(G=Object.assign(Object.assign({},G),f)),k(s.createElement(th,Object.assign({},e,{messageVariables:G,trigger:p,validateTrigger:T,onMetaChange:R}),(n,r,a)=>{let l=H4(t).length&&r?r.name:[],d=U4(l,b),f=u===void 0?!!c?.some(e=>{if(e&&typeof e==`object`&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):u,m=Object.assign({},n),h=null;if(Array.isArray(x)&&E)h=x;else if((!S||(o||i)&&!E)&&(!i||S||E)){if(s.isValidElement(x)){let t=Object.assign(Object.assign({},x.props),m);if(t.id||=d,_||V.length>0||H.length>0||e.extra){let n=[];(_||V.length>0)&&n.push(`${d}_help`),e.extra&&n.push(`${d}_extra`),t[`aria-describedby`]=n.join(` `)}V.length>0&&(t[`aria-invalid`]=`true`),f&&(t[`aria-required`]=`true`),B(x)&&(t.ref=U(l,x)),new Set([].concat(X(H4(p)),X(H4(T)))).forEach(e=>{t[e]=(...t)=>{var n,r,i,a,o;(i=m[e])==null||(n=i).call.apply(n,[m].concat(t)),(o=(a=x.props)[e])==null||(r=o).call.apply(r,[a].concat(t))}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];h=s.createElement($8,{control:m,update:x,childProps:n},gc(x,t))}else h=S&&(o||i)&&!E?x(a):x}return W(h,d,f)}))}var nx=tx;nx.useStatus=F8;var rx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{var{prefixCls:t,children:n}=e,r=rx(e,[`prefixCls`,`children`]);let{getPrefixCls:i}=s.useContext(da),a=i(`form`,t),o=s.useMemo(()=>({prefixCls:a,status:`error`}),[a]);return s.createElement(nh,Object.assign({},r),(e,t,r)=>s.createElement(bh.Provider,{value:o},n(e.map(e=>Object.assign(Object.assign({},e),{fieldKey:e.key})),t,{errors:r.errors,warnings:r.warnings})))},ax=N8;ax.Item=nx,ax.List=ix,ax.ErrorList=j8,ax.useForm=J4,ax.useFormInstance=function(){let{form:e}=s.useContext(_h);return e},ax.useWatch=hh,ax.Provider=yh,ax.create=()=>{};var ox={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`},sx=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:ox}))}),cx=e=>{let{getPrefixCls:t,direction:n}=(0,s.useContext)(da),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,c,l]=A3(t(`input`)),u=(0,h.default)(a,l,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},c,i),d=(0,s.useContext)(xh),f=(0,s.useMemo)(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return o(s.createElement(`span`,{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},s.createElement(xh.Provider,{value:f},e.children)))},lx=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},ux=_o([`Input`,`OTP`],e=>lx(La(e,e3(e))),t3),dx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:c}=e,l=dx(e,[`className`,`value`,`onChange`,`onActiveChange`,`index`,`mask`]),{getPrefixCls:u}=s.useContext(da),d=u(`otp`),f=typeof c==`string`?c:r,p=s.useRef(null);s.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},g=()=>{$e(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})};return s.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},c&&r!==``&&r!==void 0&&s.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),s.createElement(jb,Object.assign({"aria-label":`OTP Input ${o+1}`,type:c===!0?`password`:`text`},l,{ref:p,value:r,onInput:m,onFocus:g,onKeyDown:e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),g()},onMouseDown:g,onMouseUp:g,className:(0,h.default)(n,{[`${d}-mask-input`]:c})})))}),px=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{index:t,prefixCls:n,separator:r}=e,i=typeof r==`function`?r(t):r;return i?s.createElement(`span`,{className:`${n}-separator`},i):null},gx=s.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:c,formatter:l,separator:u,variant:d,disabled:f,status:p,autoFocus:m,mask:g,type:_,onInput:v,inputMode:y}=e,b=px(e,[`prefixCls`,`length`,`size`,`defaultValue`,`value`,`onChange`,`formatter`,`separator`,`variant`,`disabled`,`status`,`autoFocus`,`mask`,`type`,`onInput`,`inputMode`]),{getPrefixCls:x,direction:S}=s.useContext(da),C=x(`otp`,n),w=pc(b,{aria:!0,data:!0,attr:!0}),[T,E,D]=ux(C),O=Su(e=>i??e),k=s.useContext(xh),A=dv(k.status,p),j=s.useMemo(()=>Object.assign(Object.assign({},k),{status:A,hasFeedback:!1,feedbackIcon:null}),[k,A]),M=s.useRef(null),N=s.useRef({});s.useImperativeHandle(t,()=>({focus:()=>{var e;(e=N.current[0])==null||e.focus()},blur:()=>{var e;for(let t=0;tl?l(e):e,[F,I]=s.useState(()=>mx(P(a||``)));s.useEffect(()=>{o!==void 0&&I(mx(o))},[o]);let L=Aa(e=>{I(e),v&&v(e),c&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>F[t]!==e)&&c(e.join(``))}),R=Aa((e,t)=>{let n=X(F);for(let t=0;t=0&&!n[e];--e)n.pop();return n=mx(P(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),z=(e,t)=>{var n;let i=R(e,t),a=Math.min(e+t.length,r-1);a!==e&&i[e]!==void 0&&((n=N.current[a])==null||n.focus()),L(i)},B=e=>{var t;(t=N.current[e])==null||t.focus()},V={variant:d,disabled:f,status:A,mask:g,type:_,inputMode:y};return T(s.createElement(`div`,Object.assign({},w,{ref:M,className:(0,h.default)(C,{[`${C}-sm`]:O===`small`,[`${C}-lg`]:O===`large`,[`${C}-rtl`]:S===`rtl`},D,E),role:`group`}),s.createElement(xh.Provider,{value:j},Array.from({length:r}).map((e,t)=>{let n=`otp-${t}`,i=F[t]||``;return s.createElement(s.Fragment,{key:n},s.createElement(fx,Object.assign({ref:e=>{N.current[t]=e},index:t,size:O,htmlSize:1,className:`${C}-input`,onChange:z,value:i,onActiveChange:B,autoFocus:t===0&&m},V)),te?s.createElement(sx,null):s.createElement(vx,null),xx={click:`onClick`,hover:`onMouseOver`},Sx=s.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=bx,suffix:o}=e,c=s.useContext(va),l=n??c,u=typeof i==`object`&&i.visible!==void 0,[d,f]=(0,s.useState)(()=>u?i.visible:!1),p=(0,s.useRef)(null);s.useEffect(()=>{u&&f(i.visible)},[u,i]);let m=Ob(p),g=()=>{var e;if(l)return;d&&m();let t=!d;f(t),typeof i==`object`&&((e=i.onVisibleChange)==null||e.call(i,t))},_=e=>{let t=xx[r]||``,n=a(d),i={[t]:g,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return s.cloneElement(s.isValidElement(n)?n:s.createElement(`span`,null,n),i)},{className:v,prefixCls:y,inputPrefixCls:b,size:x}=e,S=yx(e,[`className`,`prefixCls`,`inputPrefixCls`,`size`]),{getPrefixCls:C}=s.useContext(da),w=C(`input`,b),T=C(`input-password`,y),E=i&&_(T),D=(0,h.default)(T,v,{[`${T}-${x}`]:!!x}),O=Object.assign(Object.assign({},du(S,[`suffix`,`iconRender`,`visibilityToggle`])),{type:d?`text`:`password`,className:D,prefixCls:w,suffix:s.createElement(s.Fragment,null,E,o)});return x&&(O.size=x),s.createElement(jb,Object.assign({ref:R(t,p)},O))}),Cx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,suffix:o,enterButton:c=!1,addonAfter:l,loading:u,disabled:d,onSearch:f,onChange:p,onCompositionStart:m,onCompositionEnd:g,variant:_,onPressEnter:v}=e,y=Cx(e,[`prefixCls`,`inputPrefixCls`,`className`,`size`,`suffix`,`enterButton`,`addonAfter`,`loading`,`disabled`,`onSearch`,`onChange`,`onCompositionStart`,`onCompositionEnd`,`variant`,`onPressEnter`]),{getPrefixCls:b,direction:x}=s.useContext(da),S=s.useRef(!1),C=b(`input-search`,n),w=b(`input`,r),{compactSize:T}=Du(C,x),E=Su(e=>a??T??e),D=s.useRef(null),O=e=>{e?.target&&e.type===`click`&&f&&f(e.target.value,e,{source:`clear`}),p?.(e)},k=e=>{document.activeElement===D.current?.input&&e.preventDefault()},A=e=>{f&&f(D.current?.input?.value,e,{source:`input`})},j=e=>{S.current||u||(v?.(e),A(e))},M=typeof c==`boolean`?s.createElement(ny,null):null,N=`${C}-button`,P,F=c||{},I=F.type&&F.type.__ANT_BUTTON===!0;P=I||F.type===`button`?gc(F,Object.assign({onMouseDown:k,onClick:e=>{var t,n;(n=(t=F?.props)?.onClick)==null||n.call(t,e),A(e)},key:`enterButton`},I?{className:N,size:E}:{})):s.createElement(Yf,{className:N,color:c?`primary`:`default`,size:E,disabled:d,key:`enterButton`,onMouseDown:k,onClick:A,loading:u,icon:M,variant:_===`borderless`||_===`filled`||_===`underlined`?`text`:c?`solid`:void 0},c),l&&(P=[P,gc(l,{key:`addonAfter`})]);let L=(0,h.default)(C,{[`${C}-rtl`]:x===`rtl`,[`${C}-${E}`]:!!E,[`${C}-with-button`]:!!c},i),z=Object.assign(Object.assign({},y),{className:L,prefixCls:w,type:`search`,size:E,variant:_,onPressEnter:j,onCompositionStart:e=>{S.current=!0,m?.(e)},onCompositionEnd:e=>{S.current=!1,g?.(e)},addonAfter:P,suffix:o,onChange:O,disabled:d,_skipAddonWarning:!0});return s.createElement(jb,Object.assign({ref:R(D,t)},z))}),Tx=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -248,23 +248,23 @@ html body { top:0 !important; right:0 !important; pointer-events: none !important; -`,rx=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],ix={},ax;function ox(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&ix[n])return ix[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:rx.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(ix[n]=s),s}function sx(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ax||(ax=document.createElement(`textarea`),ax.setAttribute(`tab-index`,`-1`),ax.setAttribute(`aria-hidden`,`true`),ax.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(ax)),e.getAttribute(`wrap`)?ax.setAttribute(`wrap`,e.getAttribute(`wrap`)):ax.removeAttribute(`wrap`);var i=ox(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;ax.setAttribute(`style`,`${c};${nx}`),ax.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=ax.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){ax.value=` `;var p=ax.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var cx=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],lx=0,ux=1,dx=2,fx=s.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,o=n.autoSize,u=n.onResize,d=n.className,f=n.style,p=n.disabled,m=n.onChange;n.onInternalAutoSize;var g=yt(n,cx),_=Z(Na(i,{value:a,postState:function(e){return e??``}}),2),v=_[0],y=_[1],b=function(e){y(e.target.value),m?.(e)},x=s.useRef();s.useImperativeHandle(t,function(){return{textArea:x.current}});var S=Z(s.useMemo(function(){return o&&l(o)===`object`?[o.minRows,o.maxRows]:[]},[o]),2),C=S[0],w=S[1],T=!!o,D=Z(s.useState(dx),2),k=D[0],A=D[1],j=Z(s.useState(),2),M=j[0],N=j[1],P=function(){A(lx)};qt(function(){T&&P()},[a,C,w,T]),qt(function(){if(k===lx)A(ux);else if(k===ux){var e=sx(x.current,!1,C,w);A(dx),N(e)}},[k]);var F=s.useRef(),I=function(){$e.cancel(F.current)},L=function(e){k===dx&&(u?.(e),o&&(I(),F.current=$e(function(){P()})))};s.useEffect(function(){return I},[]);var R=T?M:null,z=O(O({},f),R);return(k===lx||k===ux)&&(z.overflowY=`hidden`,z.overflowX=`hidden`),s.createElement(Ue,{onResize:L,disabled:!(o||u)},s.createElement(`textarea`,c({},g,{ref:x,style:z,className:(0,h.default)(r,d,E({},`${r}-disabled`,p)),disabled:p,value:v,onChange:b})))}),px=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],mx=s.forwardRef(function(e,t){var n=e.defaultValue,r=e.value,i=e.onFocus,a=e.onBlur,o=e.onChange,l=e.allowClear,u=e.maxLength,d=e.onCompositionStart,f=e.onCompositionEnd,p=e.suffix,m=e.prefixCls,g=m===void 0?`rc-textarea`:m,_=e.showCount,v=e.count,y=e.className,b=e.style,x=e.disabled,S=e.hidden,C=e.classNames,w=e.styles,T=e.onResize,D=e.onClear,k=e.onPressEnter,A=e.readOnly,j=e.autoSize,M=e.onKeyDown,N=yt(e,px),P=Z(Na(n,{value:r,defaultValue:n}),2),F=P[0],I=P[1],L=F==null?``:String(F),R=Z(s.useState(!1),2),z=R[0],B=R[1],V=s.useRef(!1),H=Z(s.useState(null),2),U=H[0],W=H[1],G=(0,s.useRef)(null),K=(0,s.useRef)(null),q=function(){return K.current?.textArea},ee=function(){q().focus()};(0,s.useImperativeHandle)(t,function(){return{resizableTextArea:K.current,focus:ee,blur:function(){q().blur()},nativeElement:G.current?.nativeElement||q()}}),(0,s.useEffect)(function(){B(function(e){return!x&&e})},[x]);var J=Z(s.useState(null),2),Y=J[0],te=J[1];s.useEffect(function(){if(Y){var e;(e=q()).setSelectionRange.apply(e,X(Y))}},[Y]);var ne=Cb(v,_),re=ne.max??u,ie=Number(re)>0,ae=ne.strategy(L),oe=!!re&&ae>re,se=function(e,t){var n=t;!V.current&&ne.exceedFormatter&&ne.max&&ne.strategy(t)>ne.max&&(n=ne.exceedFormatter(t,{max:ne.max}),t!==n&&te([q().selectionStart||0,q().selectionEnd||0])),I(n),yb(e.currentTarget,e,o,n)},ce=function(e){V.current=!0,d?.(e)},le=function(e){V.current=!1,se(e,e.currentTarget.value),f?.(e)},ue=function(e){se(e,e.target.value)},de=function(e){e.key===`Enter`&&k&&k(e),M?.(e)},fe=function(e){B(!0),i?.(e)},pe=function(e){B(!1),a?.(e)},me=function(e){I(``),ee(),yb(q(),e,o)},he=p,ge;ne.show&&(ge=ne.showFormatter?ne.showFormatter({value:L,count:ae,maxLength:re}):`${ae}${ie?` / ${re}`:``}`,he=s.createElement(s.Fragment,null,he,s.createElement(`span`,{className:(0,h.default)(`${g}-data-count`,C?.count),style:w?.count},ge)));var _e=function(e){var t;T?.(e),(t=q())!=null&&t.style.height&&W(!0)},ve=!j&&!_&&!l;return s.createElement(xb,{ref:G,value:L,allowClear:l,handleReset:me,suffix:he,prefixCls:g,classNames:O(O({},C),{},{affixWrapper:(0,h.default)(C?.affixWrapper,E(E({},`${g}-show-count`,_),`${g}-textarea-allow-clear`,l))}),disabled:x,focused:z,className:(0,h.default)(y,oe&&`${g}-out-of-range`),style:O(O({},b),U&&!ve?{height:`auto`}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ge==`string`?ge:void 0}},hidden:S,readOnly:A,onClear:D},s.createElement(fx,c({},N,{autoSize:j,maxLength:u,onKeyDown:de,onChange:ue,onFocus:fe,onBlur:pe,onCompositionStart:ce,onCompositionEnd:le,className:(0,h.default)(C?.textarea),style:O(O({},w?.textarea),{},{resize:b?.resize}),disabled:x,prefixCls:g,onResize:_e,ref:K,readOnly:A})))}),hx=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` +`,Ex=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],Dx={},Ox;function kx(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&Dx[n])return Dx[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:Ex.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(Dx[n]=s),s}function Ax(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ox||(Ox=document.createElement(`textarea`),Ox.setAttribute(`tab-index`,`-1`),Ox.setAttribute(`aria-hidden`,`true`),Ox.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(Ox)),e.getAttribute(`wrap`)?Ox.setAttribute(`wrap`,e.getAttribute(`wrap`)):Ox.removeAttribute(`wrap`);var i=kx(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;Ox.setAttribute(`style`,`${c};${Tx}`),Ox.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=Ox.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){Ox.value=` `;var p=Ox.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var jx=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],Mx=0,Nx=1,Px=2,Fx=s.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,o=n.autoSize,u=n.onResize,d=n.className,f=n.style,p=n.disabled,m=n.onChange;n.onInternalAutoSize;var g=yt(n,jx),_=Z(Na(i,{value:a,postState:function(e){return e??``}}),2),v=_[0],y=_[1],b=function(e){y(e.target.value),m?.(e)},x=s.useRef();s.useImperativeHandle(t,function(){return{textArea:x.current}});var S=Z(s.useMemo(function(){return o&&l(o)===`object`?[o.minRows,o.maxRows]:[]},[o]),2),C=S[0],w=S[1],T=!!o,D=Z(s.useState(Px),2),k=D[0],A=D[1],j=Z(s.useState(),2),M=j[0],N=j[1],P=function(){A(Mx)};qt(function(){T&&P()},[a,C,w,T]),qt(function(){if(k===Mx)A(Nx);else if(k===Nx){var e=Ax(x.current,!1,C,w);A(Px),N(e)}},[k]);var F=s.useRef(),I=function(){$e.cancel(F.current)},L=function(e){k===Px&&(u?.(e),o&&(I(),F.current=$e(function(){P()})))};s.useEffect(function(){return I},[]);var R=T?M:null,z=O(O({},f),R);return(k===Mx||k===Nx)&&(z.overflowY=`hidden`,z.overflowX=`hidden`),s.createElement(Ue,{onResize:L,disabled:!(o||u)},s.createElement(`textarea`,c({},g,{ref:x,style:z,className:(0,h.default)(r,d,E({},`${r}-disabled`,p)),disabled:p,value:v,onChange:b})))}),Ix=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],Lx=s.forwardRef(function(e,t){var n=e.defaultValue,r=e.value,i=e.onFocus,a=e.onBlur,o=e.onChange,l=e.allowClear,u=e.maxLength,d=e.onCompositionStart,f=e.onCompositionEnd,p=e.suffix,m=e.prefixCls,g=m===void 0?`rc-textarea`:m,_=e.showCount,v=e.count,y=e.className,b=e.style,x=e.disabled,S=e.hidden,C=e.classNames,w=e.styles,T=e.onResize,D=e.onClear,k=e.onPressEnter,A=e.readOnly,j=e.autoSize,M=e.onKeyDown,N=yt(e,Ix),P=Z(Na(n,{value:r,defaultValue:n}),2),F=P[0],I=P[1],L=F==null?``:String(F),R=Z(s.useState(!1),2),z=R[0],B=R[1],V=s.useRef(!1),H=Z(s.useState(null),2),U=H[0],W=H[1],G=(0,s.useRef)(null),K=(0,s.useRef)(null),q=function(){return K.current?.textArea},ee=function(){q().focus()};(0,s.useImperativeHandle)(t,function(){return{resizableTextArea:K.current,focus:ee,blur:function(){q().blur()},nativeElement:G.current?.nativeElement||q()}}),(0,s.useEffect)(function(){B(function(e){return!x&&e})},[x]);var J=Z(s.useState(null),2),Y=J[0],te=J[1];s.useEffect(function(){if(Y){var e;(e=q()).setSelectionRange.apply(e,X(Y))}},[Y]);var ne=wb(v,_),re=ne.max??u,ie=Number(re)>0,ae=ne.strategy(L),oe=!!re&&ae>re,se=function(e,t){var n=t;!V.current&&ne.exceedFormatter&&ne.max&&ne.strategy(t)>ne.max&&(n=ne.exceedFormatter(t,{max:ne.max}),t!==n&&te([q().selectionStart||0,q().selectionEnd||0])),I(n),bb(e.currentTarget,e,o,n)},ce=function(e){V.current=!0,d?.(e)},le=function(e){V.current=!1,se(e,e.currentTarget.value),f?.(e)},ue=function(e){se(e,e.target.value)},de=function(e){e.key===`Enter`&&k&&k(e),M?.(e)},fe=function(e){B(!0),i?.(e)},pe=function(e){B(!1),a?.(e)},me=function(e){I(``),ee(),bb(q(),e,o)},he=p,ge;ne.show&&(ge=ne.showFormatter?ne.showFormatter({value:L,count:ae,maxLength:re}):`${ae}${ie?` / ${re}`:``}`,he=s.createElement(s.Fragment,null,he,s.createElement(`span`,{className:(0,h.default)(`${g}-data-count`,C?.count),style:w?.count},ge)));var _e=function(e){var t;T?.(e),(t=q())!=null&&t.style.height&&W(!0)},ve=!j&&!_&&!l;return s.createElement(Sb,{ref:G,value:L,allowClear:l,handleReset:me,suffix:he,prefixCls:g,classNames:O(O({},C),{},{affixWrapper:(0,h.default)(C?.affixWrapper,E(E({},`${g}-show-count`,_),`${g}-textarea-allow-clear`,l))}),disabled:x,focused:z,className:(0,h.default)(y,oe&&`${g}-out-of-range`),style:O(O({},b),U&&!ve?{height:`auto`}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ge==`string`?ge:void 0}},hidden:S,readOnly:A,onClear:D},s.createElement(Fx,c({},N,{autoSize:j,maxLength:u,onKeyDown:de,onChange:ue,onFocus:fe,onBlur:pe,onCompositionStart:ce,onCompositionEnd:le,className:(0,h.default)(C?.textarea),style:O(O({},w?.textarea),{},{resize:b?.resize}),disabled:x,prefixCls:g,onResize:_e,ref:K,readOnly:A})))}),Rx=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` &-allow-clear > ${t}, &-affix-wrapper${r}-has-feedback ${t} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},gx=_o([`Input`,`TextArea`],e=>hx(La(e,e3(e))),t3,{resetFont:!1}),_x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:c,classNames:l,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:g,onMouseDown:_,onResize:v}=e,y=_x(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:b,direction:x,allowClear:S,autoComplete:C,className:w,style:T,classNames:E,styles:D}=ma(`textArea`),O=s.useContext(va),k=a??O,{status:A,hasFeedback:j,feedbackIcon:M}=s.useContext(xh),N=dv(A,o),P=s.useRef(null);s.useImperativeHandle(t,()=>({resizableTextArea:P.current?.resizableTextArea,focus:e=>{bb(P.current?.resizableTextArea?.textArea,e)},blur:()=>P.current?.blur()}));let F=b(`input`,n),I=Rc(F),[L,R,z]=k3(F,u),[B]=gx(F,I),{compactSize:V,compactItemClassnames:H}=Du(F,x),U=Su(e=>i??V??e),[W,G]=xv(`textArea`,m,r),K=Eb(c??S),[q,ee]=s.useState(!1),[J,Y]=s.useState(!1),te=e=>{ee(!0),_?.(e);let t=()=>{ee(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ne=e=>{if(v?.(e),q&&typeof getComputedStyle==`function`){let e=(P.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&Y(!0)}};return L(B(s.createElement(mx,Object.assign({autoComplete:C},y,{style:Object.assign(Object.assign({},T),f),styles:Object.assign(Object.assign({},D),p),disabled:k,allowClear:K,className:(0,h.default)(z,I,d,u,H,w,J&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},l),E),{textarea:(0,h.default)({[`${F}-sm`]:U===`small`,[`${F}-lg`]:U===`large`},R,l?.textarea,E.textarea,q&&`${F}-mouse-active`),variant:(0,h.default)({[`${F}-${W}`]:G},uv(F,N)),affixWrapper:(0,h.default)(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:x===`rtl`,[`${F}-affix-wrapper-sm`]:U===`small`,[`${F}-affix-wrapper-lg`]:U===`large`,[`${F}-textarea-show-count`]:g||e.count?.show},R)}),prefixCls:F,suffix:j&&s.createElement(`span`,{className:`${F}-textarea-suffix`},M),showCount:g,ref:P,onResize:ne,onMouseDown:te}))))}),yx=Ab;yx.Group=z8,yx.Search=tx,yx.TextArea=vx,yx.Password=$8,yx.OTP=q8;var bx=100,xx=bx/5,Sx=bx/2-xx/2,Cx=80*Math.PI,wx=50,Tx=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return s.createElement(`circle`,{className:(0,h.default)(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:Sx,cx:wx,cy:wx,strokeWidth:xx,style:n})},Ex=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=s.useState(!1);qt(()=>{e!==0&&o(!0)},[e!==0]);let c=Math.max(Math.min(e,100),0);if(!a)return null;let l={strokeDashoffset:`${Cx/4}`,strokeDasharray:`${Cx*c/100} ${Cx*(100-c)/100}`};return s.createElement(`span`,{className:(0,h.default)(r,`${n}-progress`,c<=0&&i)},s.createElement(`svg`,{viewBox:`0 0 ${bx} ${bx}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},s.createElement(Tx,{dotClassName:n,hasCircleCls:!0}),s.createElement(Tx,{dotClassName:n,style:l})))};function Dx(e){let{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,i=`${r}-holder`,a=`${i}-hidden`;return s.createElement(s.Fragment,null,s.createElement(`span`,{className:(0,h.default)(i,n>0&&a)},s.createElement(`span`,{className:(0,h.default)(r,`${t}-dot-spin`)},[1,2,3,4].map(e=>s.createElement(`i`,{className:`${t}-dot-item`,key:e})))),s.createElement(Ex,{prefixCls:t,percent:n}))}function Ox(e){let{prefixCls:t,indicator:n,percent:r}=e,i=`${t}-dot`;return n&&s.isValidElement(n)?gc(n,{className:(0,h.default)(n.props?.className,i),percent:r}):s.createElement(Dx,{prefixCls:t,percent:r})}var kx=new Cr(`antSpinMove`,{to:{opacity:1}}),Ax=new Cr(`antRotate`,{to:{transform:`rotate(405deg)`}}),jx=e=>{let{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},so(e)),{position:`absolute`,display:`none`,color:e.colorPrimary,fontSize:0,textAlign:`center`,verticalAlign:`middle`,opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:`relative`,display:`inline-block`,opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:`fixed`,width:`100vw`,height:`100vh`,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:`flex`,alignItems:`center`,flexDirection:`column`,justifyContent:`center`,opacity:0,visibility:`hidden`,transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:`visible`},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:`relative`,[`> div > ${t}`]:{position:`absolute`,top:0,insetInlineStart:0,zIndex:4,display:`block`,width:`100%`,height:`100%`,maxHeight:e.contentHeight,[`${t}-dot`]:{position:`absolute`,top:`50%`,insetInlineStart:`50%`,margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:`absolute`,top:`50%`,width:`100%`,textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},[`${t}-blur`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:`1em`,height:`1em`,fontSize:e.dotSize,display:`inline-block`,transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:`50% 50%`,lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:`scale(0.3)`,opacity:0}},[`${t}-dot-progress`]:{position:`absolute`,inset:0},[`${t}-dot`]:{position:`relative`,display:`inline-block`,fontSize:e.dotSize,width:`1em`,height:`1em`,"&-item":{position:`absolute`,display:`block`,width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:kx,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-spin":{transform:`rotate(45deg)`,animationName:Ax,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(t=>`${t} ${e.motionDurationSlow} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:`block`}})}},Mx=_o(`Spin`,e=>jx(La(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),Nx=200,Px=[[30,.05],[70,.03],[96,.01]];function Fx(e,t){let[n,r]=s.useState(0),i=s.useRef(null),a=t===`auto`;return s.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var Ix=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o=`default`,tip:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m}=e,g=Ix(e,[`prefixCls`,`spinning`,`delay`,`className`,`rootClassName`,`size`,`tip`,`wrapperClassName`,`style`,`children`,`fullscreen`,`indicator`,`percent`]),{getPrefixCls:_,direction:v,className:y,style:b,indicator:x}=ma(`spin`),S=_(`spin`,t),[C,w,T]=Mx(S),[E,D]=s.useState(()=>n&&!Rx(n,r)),O=Fx(E,m);s.useEffect(()=>{if(n){let e=Z6(r,()=>{D(!0)});return e(),()=>{var t;(t=e?.cancel)==null||t.call(e)}}D(!1)},[r,n]);let k=s.useMemo(()=>d!==void 0&&!f,[d,f]),A=(0,h.default)(S,y,{[`${S}-sm`]:o===`small`,[`${S}-lg`]:o===`large`,[`${S}-spinning`]:E,[`${S}-show-text`]:!!c,[`${S}-rtl`]:v===`rtl`},i,!f&&a,w,T),j=(0,h.default)(`${S}-container`,{[`${S}-blur`]:E}),M=p??x??Lx,N=Object.assign(Object.assign({},b),u),P=s.createElement(`div`,Object.assign({},g,{style:N,className:A,"aria-live":`polite`,"aria-busy":E}),s.createElement(Ox,{prefixCls:S,indicator:M,percent:O}),c&&(k||f)?s.createElement(`div`,{className:`${S}-text`},c):null);return C(k?s.createElement(`div`,Object.assign({},g,{className:(0,h.default)(`${S}-nested-loading`,l,w,T)}),E&&s.createElement(`div`,{key:`loading`},P),s.createElement(`div`,{className:j,key:`container`},d)):f?s.createElement(`div`,{className:(0,h.default)(`${S}-fullscreen`,{[`${S}-fullscreen-show`]:E},a,w,T)},P):P)};zx.setDefaultIndicator=e=>{Lx=e};var Bx=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e],Vx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:c,footer:l}=e,u=Vx(e,[`prefixCls`,`className`,`closeIcon`,`closable`,`type`,`title`,`children`,`footer`]),{getPrefixCls:d}=s.useContext(da),f=d(),p=t||d(`modal`),m=Rc(f),[g,_,v]=kg(p,m),y=`${p}-confirm`,b={};return b=a?{closable:i??!1,title:``,footer:``,children:s.createElement(Ig,Object.assign({},e,{prefixCls:p,confirmPrefixCls:y,rootPrefixCls:f,content:c}))}:{closable:i??!0,title:o,footer:l!==null&&s.createElement(dg,Object.assign({},e)),children:c},g(s.createElement(Ep,Object.assign({prefixCls:p,className:(0,h.default)(_,`${p}-pure-panel`,a&&y,a&&`${y}-${a}`,n,v,m)},u,{closeIcon:ug(p,r),closable:i},b)))});function Ux(e){return Ug(Wg(e))}var Wx=Mg;Wx.useModal=$g,Wx.info=function(e){return Ug(Gg(e))},Wx.success=function(e){return Ug(Kg(e))},Wx.error=function(e){return Ug(qg(e))},Wx.warning=Ux,Wx.warn=Ux,Wx.confirm=function(e){return Ug(Jg(e))},Wx.destroyAll=function(){for(;zg.length;){let e=zg.pop();e&&e()}},Wx.config=function({rootPrefixCls:e}){Bg=e},Wx._InternalPanelDoNotUseOrYouWillBeFired=Hx;var Gx={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`},Kx=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:Gx}))}),qx=()=>s.createElement(`svg`,{width:`252`,height:`294`},s.createElement(`title`,null,`No Found`),s.createElement(`g`,{fill:`none`,fillRule:`evenodd`},s.createElement(`circle`,{cx:`126.75`,cy:`128.1`,r:`126`,fill:`#E4EBF7`}),s.createElement(`circle`,{cx:`31.55`,cy:`130.8`,r:`8.3`,fill:`#FFF`}),s.createElement(`path`,{stroke:`#FFF`,d:`m37 134.3 10.5 6m.9 6.2-12.7 10.8`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2`}),s.createElement(`path`,{fill:`#FFF`,d:`M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4`}),s.createElement(`path`,{stroke:`#FFF`,d:`M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z`,strokeWidth:`2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7`}),s.createElement(`circle`,{cx:`204.3`,cy:`30`,r:`29.5`,fill:`#1677ff`}),s.createElement(`path`,{fill:`#FFF`,d:`M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2`}),s.createElement(`path`,{fill:`#FFB594`,d:`M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6`}),s.createElement(`path`,{fill:`#FFF`,d:`M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6`}),s.createElement(`path`,{fill:`#2B0849`,d:`M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z`}),s.createElement(`path`,{fill:`#2B0849`,d:`M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1`}),s.createElement(`path`,{fill:`#7BB2F9`,d:`m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M107.3 222.1s2.7-1.1 6-3.9`,strokeLinecap:`round`,strokeLinejoin:`round`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#192064`,d:`M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4`}),s.createElement(`path`,{fill:`#FFF`,d:`M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8`}),s.createElement(`path`,{fill:`#192064`,d:`M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5`}),s.createElement(`path`,{fill:`#520038`,d:`M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z`}),s.createElement(`path`,{fill:`#552950`,d:`M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3`}),s.createElement(`path`,{stroke:`#DB836E`,d:`m110.1 74.8-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M110.8 74.5s1.8-.7 2.6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M103.3 73s1.8 1 4.1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1`}),s.createElement(`path`,{fill:`#F4D19D`,d:`M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z`}),s.createElement(`path`,{fill:`#CC9B6E`,d:`M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z`}),s.createElement(`path`,{fill:`#F4D19D`,d:`M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8`}),s.createElement(`path`,{fill:`#CC9B6E`,d:`M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#5BA02E`,d:`M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6`}),s.createElement(`path`,{fill:`#92C110`,d:`M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M89 89.5s7.8 5.4 16.6 2.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),Jx=()=>s.createElement(`svg`,{width:`254`,height:`294`},s.createElement(`title`,null,`Server Error`),s.createElement(`g`,{fill:`none`,fillRule:`evenodd`},s.createElement(`path`,{fill:`#E4EBF7`,d:`M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7`}),s.createElement(`path`,{stroke:`#FFF`,d:`m37.2 135.6 10.5 6m1 6.3-12.8 10.8`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8`}),s.createElement(`circle`,{cx:`201.35`,cy:`30.2`,r:`29.7`,fill:`#FF603B`}),s.createElement(`path`,{fill:`#FFF`,d:`m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7`}),s.createElement(`path`,{fill:`#FFB594`,d:`M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5`}),s.createElement(`path`,{fill:`#FFF`,d:`M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2`}),s.createElement(`path`,{fill:`#FFB594`,d:`m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6`}),s.createElement(`path`,{fill:`#520038`,d:`M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z`}),s.createElement(`path`,{fill:`#552950`,d:`M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3`}),s.createElement(`path`,{stroke:`#DB836E`,d:`m99.2 73.6-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M100 73.3s1.7-.7 2.4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M92.3 71.7s1.9 1.1 4.2 1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5`}),s.createElement(`path`,{fill:`#2B0849`,d:`M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z`}),s.createElement(`path`,{fill:`#2B0849`,d:`M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1`}),s.createElement(`path`,{fill:`#7BB2F9`,d:`M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M97 219.4s2.9-1.2 6.3-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#192064`,d:`M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7`}),s.createElement(`path`,{fill:`#FFF`,d:`M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8`}),s.createElement(`path`,{fill:`#192064`,d:`M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#E59788`,d:`M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6`}),s.createElement(`path`,{stroke:`#E59788`,d:`M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M109.3 112.5s3.4-3.6 7.6-4.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E59788`,d:`M107.4 123s9.7-2.7 11.4-.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#BFCDDD`,d:`m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#A3B4C6`,d:`M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4`}),s.createElement(`path`,{fill:`#A3B4C6`,d:`M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8`}),s.createElement(`path`,{fill:`#A3B4C6`,d:`M154.1 190.1h70.5v-84.6h-70.5z`}),s.createElement(`path`,{fill:`#BFCDDD`,d:`M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8`}),s.createElement(`path`,{fill:`#BFCDDD`,d:`M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2`}),s.createElement(`path`,{stroke:`#7C90A5`,d:`M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8`}),s.createElement(`path`,{fill:`#BFCDDD`,d:`M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4`}),s.createElement(`path`,{stroke:`#A3B4C6`,d:`M177.3 207.2v11.5m23.8-11.5v11.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#5BA02E`,d:`M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4`}),s.createElement(`path`,{fill:`#92C110`,d:`M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2`}))),Yx=e=>{let{componentCls:t,lineHeightHeading3:n,iconCls:r,padding:i,paddingXL:a,paddingXS:o,paddingLG:s,marginXS:c,lineHeight:l}=e;return{[t]:{padding:`${Q(e.calc(s).mul(2).equal())} ${Q(a)}`,"&-rtl":{direction:`rtl`}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:`auto`},[`${t} ${t}-icon`]:{marginBottom:s,textAlign:`center`,[`& > ${r}`]:{fontSize:e.iconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.titleFontSize,lineHeight:n,marginBlock:c,textAlign:`center`},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.subtitleFontSize,lineHeight:l,textAlign:`center`},[`${t} ${t}-content`]:{marginTop:s,padding:`${Q(s)} ${Q(e.calc(i).mul(2.5).equal())}`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.extraMargin,textAlign:`center`,"& > *":{marginInlineEnd:o,"&:last-child":{marginInlineEnd:0}}}}},Xx=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},Zx=e=>[Yx(e),Xx(e)],Qx=e=>Zx(e),$x=_o(`Result`,e=>[Qx(La(e,{resultInfoIconColor:e.colorInfo,resultErrorIconColor:e.colorError,resultSuccessIconColor:e.colorSuccess,resultWarningIconColor:e.colorWarning,imageWidth:250,imageHeight:295}))],e=>({titleFontSize:e.fontSizeHeading3,subtitleFontSize:e.fontSize,iconFontSize:e.fontSizeHeading3*3,extraMargin:`${e.paddingLG}px 0 0 0`})),e5=()=>s.createElement(`svg`,{width:`251`,height:`294`},s.createElement(`title`,null,`Unauthorized`),s.createElement(`g`,{fill:`none`,fillRule:`evenodd`},s.createElement(`path`,{fill:`#E4EBF7`,d:`M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129`}),s.createElement(`path`,{fill:`#FFF`,d:`M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6`}),s.createElement(`path`,{stroke:`#FFF`,d:`m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2`}),s.createElement(`path`,{fill:`#FFF`,d:`M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4`}),s.createElement(`path`,{stroke:`#FFF`,d:`M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z`,strokeWidth:`2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#A26EF4`,d:`M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0`}),s.createElement(`path`,{fill:`#FFF`,d:`m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7`}),s.createElement(`path`,{fill:`#FFF`,d:`M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7`}),s.createElement(`path`,{fill:`#5BA02E`,d:`M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6`}),s.createElement(`path`,{fill:`#92C110`,d:`M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3`}),s.createElement(`path`,{fill:`#FFF`,d:`M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2`}),s.createElement(`path`,{fill:`#FFB594`,d:`M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26`}),s.createElement(`path`,{fill:`#FFF`,d:`M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M78.2 94.7s.9 7.4-5 13`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.9`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z`}),s.createElement(`path`,{fill:`#FFB594`,d:`m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9`}),s.createElement(`path`,{fill:`#5C2552`,d:`M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`m100.8 77.1 1.7-1-1-4.3.7-1.4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#552950`,d:`M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M91.1 86.8s5.3 5 12.7 2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#DB836E`,d:`M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M64 84.8s-6 10-13.5 10`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M130.5 85.5s4.6 5.7 11.7 6.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M121.7 105.7s-.4 8.6-1.3 13.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M115.8 161.5s-3.6-1.5-2.7-7.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6`}),s.createElement(`path`,{fill:`#2B0849`,d:`M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z`}),s.createElement(`path`,{fill:`#2B0849`,d:`M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1`}),s.createElement(`path`,{fill:`#7BB2F9`,d:`m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M108.5 221s2.7-1.2 6-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#192064`,d:`M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4`}),s.createElement(`path`,{fill:`#FFF`,d:`M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7`}),s.createElement(`path`,{fill:`#192064`,d:`M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),t5={success:ec,error:nc,info:oc,warning:Kx},n5={404:qx,500:Jx,403:e5},r5=Object.keys(n5),i5=({prefixCls:e,icon:t,status:n})=>{let r=(0,h.default)(`${e}-icon`);if(r5.includes(`${n}`)){let t=n5[n];return s.createElement(`div`,{className:`${r} ${e}-image`},s.createElement(t,null))}let i=s.createElement(t5[n]);return t===null||t===!1?null:s.createElement(`div`,{className:r},t||i)},a5=({prefixCls:e,extra:t})=>t?s.createElement(`div`,{className:`${e}-extra`},t):null,o5=({prefixCls:e,className:t,rootClassName:n,subTitle:r,title:i,style:a,children:o,status:c=`info`,icon:l,extra:u})=>{let{getPrefixCls:d,direction:f,result:p}=s.useContext(da),m=d(`result`,e),[g,_,v]=$x(m),y=(0,h.default)(m,`${m}-${c}`,t,p?.className,n,{[`${m}-rtl`]:f===`rtl`},_,v),b=Object.assign(Object.assign({},p?.style),a);return g(s.createElement(`div`,{className:y,style:b},s.createElement(i5,{prefixCls:m,status:c,icon:l}),s.createElement(`div`,{className:`${m}-title`},i),r&&s.createElement(`div`,{className:`${m}-subtitle`},r),s.createElement(a5,{prefixCls:m,extra:u}),o&&s.createElement(`div`,{className:`${m}-content`},o)))};o5.PRESENTED_IMAGE_403=n5[403],o5.PRESENTED_IMAGE_404=n5[404],o5.PRESENTED_IMAGE_500=n5[500];var s5=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},so(e)),{display:`inline-block`,height:`auto`,marginInlineEnd:e.marginXS,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,background:e.defaultBg,border:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:`transparent`,[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}}),[`${i}-borderless`]:{borderColor:`transparent`,background:e.tagBorderlessBg}}},c5=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return La(e,{tagFontSize:i,tagLineHeight:Q(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},l5=e=>({defaultBg:new oi(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),u5=_o(`Tag`,e=>s5(c5(e)),l5),d5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:c,onChange:l,onClick:u}=e,d=d5(e,[`prefixCls`,`style`,`className`,`checked`,`children`,`icon`,`onChange`,`onClick`]),{getPrefixCls:f,tag:p}=s.useContext(da),m=e=>{l?.(!a),u?.(e)},g=f(`tag`,n),[_,v,y]=u5(g),b=(0,h.default)(g,`${g}-checkable`,{[`${g}-checkable-checked`]:a},p?.className,i,v,y);return _(s.createElement(`span`,Object.assign({},d,{ref:t,style:Object.assign(Object.assign({},r),p?.style),className:b,onClick:m}),c,s.createElement(`span`,null,o)))}),p5=e=>bo(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:`transparent`}}})),m5=yo([`Tag`,`preset`],e=>p5(c5(e)),l5);function h5(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var g5=(e,t,n)=>{let r=h5(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:`transparent`}}}},_5=yo([`Tag`,`status`],e=>{let t=c5(e);return[g5(t,`success`,`Success`),g5(t,`processing`,`Info`),g5(t,`error`,`Error`),g5(t,`warning`,`Warning`)]},l5),v5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:c,color:l,onClose:u,bordered:d=!0,visible:f}=e,p=v5(e,[`prefixCls`,`className`,`rootClassName`,`style`,`children`,`icon`,`color`,`onClose`,`bordered`,`visible`]),{getPrefixCls:m,direction:g,tag:_}=s.useContext(da),[v,y]=s.useState(!0),b=du(p,[`closeIcon`,`closable`]);s.useEffect(()=>{f!==void 0&&y(f)},[f]);let x=zy(l),S=By(l),C=x||S,w=Object.assign(Object.assign({backgroundColor:l&&!C?l:void 0},_?.style),a),T=m(`tag`,n),[E,D,O]=u5(T),k=(0,h.default)(T,_?.className,{[`${T}-${l}`]:C,[`${T}-has-color`]:l&&!C,[`${T}-hidden`]:!v,[`${T}-rtl`]:g===`rtl`,[`${T}-borderless`]:!d},r,i,D,O),A=e=>{e.stopPropagation(),u?.(e),e.defaultPrevented||y(!1)},[,j]=ol(rl(e),rl(_),{closable:!1,closeIconRender:e=>hc(e,s.createElement(`span`,{className:`${T}-close-icon`,onClick:A},e),e=>({onClick:t=>{var n;(n=e?.onClick)==null||n.call(e,t),A(t)},className:(0,h.default)(e?.className,`${T}-close-icon`)}))}),M=typeof p.onClick==`function`||o&&o.type===`a`,N=c||null,P=N?s.createElement(s.Fragment,null,N,o&&s.createElement(`span`,null,o)):o,F=s.createElement(`span`,Object.assign({},b,{ref:t,className:k,style:w}),P,j,x&&s.createElement(m5,{key:`preset`,prefixCls:T}),S&&s.createElement(_5,{key:`status`,prefixCls:T}));return E(M?s.createElement(xu,{component:`Tag`},F):F)});y5.CheckableTag=f5;var b5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`},x5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:b5}))}),S5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`},C5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:S5}))}),w5=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},T5=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},zx=_o([`Input`,`TextArea`],e=>Rx(La(e,e3(e))),t3,{resetFont:!1}),Bx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:c,classNames:l,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:g,onMouseDown:_,onResize:v}=e,y=Bx(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:b,direction:x,allowClear:S,autoComplete:C,className:w,style:T,classNames:E,styles:D}=ma(`textArea`),O=s.useContext(va),k=a??O,{status:A,hasFeedback:j,feedbackIcon:M}=s.useContext(xh),N=dv(A,o),P=s.useRef(null);s.useImperativeHandle(t,()=>({resizableTextArea:P.current?.resizableTextArea,focus:e=>{xb(P.current?.resizableTextArea?.textArea,e)},blur:()=>P.current?.blur()}));let F=b(`input`,n),I=Rc(F),[L,R,z]=k3(F,u),[B]=zx(F,I),{compactSize:V,compactItemClassnames:H}=Du(F,x),U=Su(e=>i??V??e),[W,G]=xv(`textArea`,m,r),K=Db(c??S),[q,ee]=s.useState(!1),[J,Y]=s.useState(!1),te=e=>{ee(!0),_?.(e);let t=()=>{ee(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ne=e=>{if(v?.(e),q&&typeof getComputedStyle==`function`){let e=(P.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&Y(!0)}};return L(B(s.createElement(Lx,Object.assign({autoComplete:C},y,{style:Object.assign(Object.assign({},T),f),styles:Object.assign(Object.assign({},D),p),disabled:k,allowClear:K,className:(0,h.default)(z,I,d,u,H,w,J&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},l),E),{textarea:(0,h.default)({[`${F}-sm`]:U===`small`,[`${F}-lg`]:U===`large`},R,l?.textarea,E.textarea,q&&`${F}-mouse-active`),variant:(0,h.default)({[`${F}-${W}`]:G},uv(F,N)),affixWrapper:(0,h.default)(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:x===`rtl`,[`${F}-affix-wrapper-sm`]:U===`small`,[`${F}-affix-wrapper-lg`]:U===`large`,[`${F}-textarea-show-count`]:g||e.count?.show},R)}),prefixCls:F,suffix:j&&s.createElement(`span`,{className:`${F}-textarea-suffix`},M),showCount:g,ref:P,onResize:ne,onMouseDown:te}))))}),Hx=jb;Hx.Group=cx,Hx.Search=wx,Hx.TextArea=Vx,Hx.Password=Sx,Hx.OTP=gx;var Ux=100,Wx=Ux/5,Gx=Ux/2-Wx/2,Kx=80*Math.PI,qx=50,Jx=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return s.createElement(`circle`,{className:(0,h.default)(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:Gx,cx:qx,cy:qx,strokeWidth:Wx,style:n})},Yx=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=s.useState(!1);qt(()=>{e!==0&&o(!0)},[e!==0]);let c=Math.max(Math.min(e,100),0);if(!a)return null;let l={strokeDashoffset:`${Kx/4}`,strokeDasharray:`${Kx*c/100} ${Kx*(100-c)/100}`};return s.createElement(`span`,{className:(0,h.default)(r,`${n}-progress`,c<=0&&i)},s.createElement(`svg`,{viewBox:`0 0 ${Ux} ${Ux}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},s.createElement(Jx,{dotClassName:n,hasCircleCls:!0}),s.createElement(Jx,{dotClassName:n,style:l})))};function Xx(e){let{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,i=`${r}-holder`,a=`${i}-hidden`;return s.createElement(s.Fragment,null,s.createElement(`span`,{className:(0,h.default)(i,n>0&&a)},s.createElement(`span`,{className:(0,h.default)(r,`${t}-dot-spin`)},[1,2,3,4].map(e=>s.createElement(`i`,{className:`${t}-dot-item`,key:e})))),s.createElement(Yx,{prefixCls:t,percent:n}))}function Zx(e){let{prefixCls:t,indicator:n,percent:r}=e,i=`${t}-dot`;return n&&s.isValidElement(n)?gc(n,{className:(0,h.default)(n.props?.className,i),percent:r}):s.createElement(Xx,{prefixCls:t,percent:r})}var Qx=new Cr(`antSpinMove`,{to:{opacity:1}}),$x=new Cr(`antRotate`,{to:{transform:`rotate(405deg)`}}),e5=e=>{let{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},so(e)),{position:`absolute`,display:`none`,color:e.colorPrimary,fontSize:0,textAlign:`center`,verticalAlign:`middle`,opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:`relative`,display:`inline-block`,opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:`fixed`,width:`100vw`,height:`100vh`,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:`flex`,alignItems:`center`,flexDirection:`column`,justifyContent:`center`,opacity:0,visibility:`hidden`,transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:`visible`},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:`relative`,[`> div > ${t}`]:{position:`absolute`,top:0,insetInlineStart:0,zIndex:4,display:`block`,width:`100%`,height:`100%`,maxHeight:e.contentHeight,[`${t}-dot`]:{position:`absolute`,top:`50%`,insetInlineStart:`50%`,margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:`absolute`,top:`50%`,width:`100%`,textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},[`${t}-blur`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:`1em`,height:`1em`,fontSize:e.dotSize,display:`inline-block`,transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:`50% 50%`,lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:`scale(0.3)`,opacity:0}},[`${t}-dot-progress`]:{position:`absolute`,inset:0},[`${t}-dot`]:{position:`relative`,display:`inline-block`,fontSize:e.dotSize,width:`1em`,height:`1em`,"&-item":{position:`absolute`,display:`block`,width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:Qx,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-spin":{transform:`rotate(45deg)`,animationName:$x,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(t=>`${t} ${e.motionDurationSlow} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:`block`}})}},t5=_o(`Spin`,e=>e5(La(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),n5=200,r5=[[30,.05],[70,.03],[96,.01]];function i5(e,t){let[n,r]=s.useState(0),i=s.useRef(null),a=t===`auto`;return s.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var a5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o=`default`,tip:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m}=e,g=a5(e,[`prefixCls`,`spinning`,`delay`,`className`,`rootClassName`,`size`,`tip`,`wrapperClassName`,`style`,`children`,`fullscreen`,`indicator`,`percent`]),{getPrefixCls:_,direction:v,className:y,style:b,indicator:x}=ma(`spin`),S=_(`spin`,t),[C,w,T]=t5(S),[E,D]=s.useState(()=>n&&!s5(n,r)),O=i5(E,m);s.useEffect(()=>{if(n){let e=Z6(r,()=>{D(!0)});return e(),()=>{var t;(t=e?.cancel)==null||t.call(e)}}D(!1)},[r,n]);let k=s.useMemo(()=>d!==void 0&&!f,[d,f]),A=(0,h.default)(S,y,{[`${S}-sm`]:o===`small`,[`${S}-lg`]:o===`large`,[`${S}-spinning`]:E,[`${S}-show-text`]:!!c,[`${S}-rtl`]:v===`rtl`},i,!f&&a,w,T),j=(0,h.default)(`${S}-container`,{[`${S}-blur`]:E}),M=p??x??o5,N=Object.assign(Object.assign({},b),u),P=s.createElement(`div`,Object.assign({},g,{style:N,className:A,"aria-live":`polite`,"aria-busy":E}),s.createElement(Zx,{prefixCls:S,indicator:M,percent:O}),c&&(k||f)?s.createElement(`div`,{className:`${S}-text`},c):null);return C(k?s.createElement(`div`,Object.assign({},g,{className:(0,h.default)(`${S}-nested-loading`,l,w,T)}),E&&s.createElement(`div`,{key:`loading`},P),s.createElement(`div`,{className:j,key:`container`},d)):f?s.createElement(`div`,{className:(0,h.default)(`${S}-fullscreen`,{[`${S}-fullscreen-show`]:E},a,w,T)},P):P)};c5.setDefaultIndicator=e=>{o5=e};var l5=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e],u5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:c,footer:l}=e,u=u5(e,[`prefixCls`,`className`,`closeIcon`,`closable`,`type`,`title`,`children`,`footer`]),{getPrefixCls:d}=s.useContext(da),f=d(),p=t||d(`modal`),m=Rc(f),[g,_,v]=kg(p,m),y=`${p}-confirm`,b={};return b=a?{closable:i??!1,title:``,footer:``,children:s.createElement(Ig,Object.assign({},e,{prefixCls:p,confirmPrefixCls:y,rootPrefixCls:f,content:c}))}:{closable:i??!0,title:o,footer:l!==null&&s.createElement(dg,Object.assign({},e)),children:c},g(s.createElement(Ep,Object.assign({prefixCls:p,className:(0,h.default)(_,`${p}-pure-panel`,a&&y,a&&`${y}-${a}`,n,v,m)},u,{closeIcon:ug(p,r),closable:i},b)))});function f5(e){return Ug(Wg(e))}var p5=Mg;p5.useModal=$g,p5.info=function(e){return Ug(Gg(e))},p5.success=function(e){return Ug(Kg(e))},p5.error=function(e){return Ug(qg(e))},p5.warning=f5,p5.warn=f5,p5.confirm=function(e){return Ug(Jg(e))},p5.destroyAll=function(){for(;zg.length;){let e=zg.pop();e&&e()}},p5.config=function({rootPrefixCls:e}){Bg=e},p5._InternalPanelDoNotUseOrYouWillBeFired=d5;var m5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`},h5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:m5}))}),g5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`},_5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:g5}))}),v5=()=>s.createElement(`svg`,{width:`252`,height:`294`},s.createElement(`title`,null,`No Found`),s.createElement(`g`,{fill:`none`,fillRule:`evenodd`},s.createElement(`circle`,{cx:`126.75`,cy:`128.1`,r:`126`,fill:`#E4EBF7`}),s.createElement(`circle`,{cx:`31.55`,cy:`130.8`,r:`8.3`,fill:`#FFF`}),s.createElement(`path`,{stroke:`#FFF`,d:`m37 134.3 10.5 6m.9 6.2-12.7 10.8`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2`}),s.createElement(`path`,{fill:`#FFF`,d:`M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4`}),s.createElement(`path`,{stroke:`#FFF`,d:`M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z`,strokeWidth:`2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7`}),s.createElement(`circle`,{cx:`204.3`,cy:`30`,r:`29.5`,fill:`#1677ff`}),s.createElement(`path`,{fill:`#FFF`,d:`M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2`}),s.createElement(`path`,{fill:`#FFB594`,d:`M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6`}),s.createElement(`path`,{fill:`#FFF`,d:`M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6`}),s.createElement(`path`,{fill:`#2B0849`,d:`M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z`}),s.createElement(`path`,{fill:`#2B0849`,d:`M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1`}),s.createElement(`path`,{fill:`#7BB2F9`,d:`m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M107.3 222.1s2.7-1.1 6-3.9`,strokeLinecap:`round`,strokeLinejoin:`round`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#192064`,d:`M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4`}),s.createElement(`path`,{fill:`#FFF`,d:`M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8`}),s.createElement(`path`,{fill:`#192064`,d:`M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5`}),s.createElement(`path`,{fill:`#520038`,d:`M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z`}),s.createElement(`path`,{fill:`#552950`,d:`M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3`}),s.createElement(`path`,{stroke:`#DB836E`,d:`m110.1 74.8-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M110.8 74.5s1.8-.7 2.6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M103.3 73s1.8 1 4.1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1`}),s.createElement(`path`,{fill:`#F4D19D`,d:`M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z`}),s.createElement(`path`,{fill:`#CC9B6E`,d:`M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z`}),s.createElement(`path`,{fill:`#F4D19D`,d:`M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8`}),s.createElement(`path`,{fill:`#CC9B6E`,d:`M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#5BA02E`,d:`M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6`}),s.createElement(`path`,{fill:`#92C110`,d:`M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M89 89.5s7.8 5.4 16.6 2.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),y5=()=>s.createElement(`svg`,{width:`254`,height:`294`},s.createElement(`title`,null,`Server Error`),s.createElement(`g`,{fill:`none`,fillRule:`evenodd`},s.createElement(`path`,{fill:`#E4EBF7`,d:`M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7`}),s.createElement(`path`,{stroke:`#FFF`,d:`m37.2 135.6 10.5 6m1 6.3-12.8 10.8`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8`}),s.createElement(`circle`,{cx:`201.35`,cy:`30.2`,r:`29.7`,fill:`#FF603B`}),s.createElement(`path`,{fill:`#FFF`,d:`m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7`}),s.createElement(`path`,{fill:`#FFB594`,d:`M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5`}),s.createElement(`path`,{fill:`#FFF`,d:`M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2`}),s.createElement(`path`,{fill:`#FFB594`,d:`m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6`}),s.createElement(`path`,{fill:`#520038`,d:`M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z`}),s.createElement(`path`,{fill:`#552950`,d:`M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3`}),s.createElement(`path`,{stroke:`#DB836E`,d:`m99.2 73.6-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M100 73.3s1.7-.7 2.4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M92.3 71.7s1.9 1.1 4.2 1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5`}),s.createElement(`path`,{fill:`#2B0849`,d:`M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z`}),s.createElement(`path`,{fill:`#2B0849`,d:`M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1`}),s.createElement(`path`,{fill:`#7BB2F9`,d:`M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M97 219.4s2.9-1.2 6.3-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#192064`,d:`M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7`}),s.createElement(`path`,{fill:`#FFF`,d:`M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8`}),s.createElement(`path`,{fill:`#192064`,d:`M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#E59788`,d:`M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6`}),s.createElement(`path`,{stroke:`#E59788`,d:`M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M109.3 112.5s3.4-3.6 7.6-4.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E59788`,d:`M107.4 123s9.7-2.7 11.4-.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#BFCDDD`,d:`m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#A3B4C6`,d:`M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4`}),s.createElement(`path`,{fill:`#A3B4C6`,d:`M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8`}),s.createElement(`path`,{fill:`#A3B4C6`,d:`M154.1 190.1h70.5v-84.6h-70.5z`}),s.createElement(`path`,{fill:`#BFCDDD`,d:`M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8`}),s.createElement(`path`,{fill:`#BFCDDD`,d:`M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2`}),s.createElement(`path`,{stroke:`#7C90A5`,d:`M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#FFF`,d:`M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8`}),s.createElement(`path`,{fill:`#BFCDDD`,d:`M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4`}),s.createElement(`path`,{stroke:`#A3B4C6`,d:`M177.3 207.2v11.5m23.8-11.5v11.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#5BA02E`,d:`M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4`}),s.createElement(`path`,{fill:`#92C110`,d:`M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2`}))),b5=e=>{let{componentCls:t,lineHeightHeading3:n,iconCls:r,padding:i,paddingXL:a,paddingXS:o,paddingLG:s,marginXS:c,lineHeight:l}=e;return{[t]:{padding:`${Q(e.calc(s).mul(2).equal())} ${Q(a)}`,"&-rtl":{direction:`rtl`}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:`auto`},[`${t} ${t}-icon`]:{marginBottom:s,textAlign:`center`,[`& > ${r}`]:{fontSize:e.iconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.titleFontSize,lineHeight:n,marginBlock:c,textAlign:`center`},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.subtitleFontSize,lineHeight:l,textAlign:`center`},[`${t} ${t}-content`]:{marginTop:s,padding:`${Q(s)} ${Q(e.calc(i).mul(2.5).equal())}`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.extraMargin,textAlign:`center`,"& > *":{marginInlineEnd:o,"&:last-child":{marginInlineEnd:0}}}}},x5=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},S5=e=>[b5(e),x5(e)],C5=e=>S5(e),w5=_o(`Result`,e=>[C5(La(e,{resultInfoIconColor:e.colorInfo,resultErrorIconColor:e.colorError,resultSuccessIconColor:e.colorSuccess,resultWarningIconColor:e.colorWarning,imageWidth:250,imageHeight:295}))],e=>({titleFontSize:e.fontSizeHeading3,subtitleFontSize:e.fontSize,iconFontSize:e.fontSizeHeading3*3,extraMargin:`${e.paddingLG}px 0 0 0`})),T5=()=>s.createElement(`svg`,{width:`251`,height:`294`},s.createElement(`title`,null,`Unauthorized`),s.createElement(`g`,{fill:`none`,fillRule:`evenodd`},s.createElement(`path`,{fill:`#E4EBF7`,d:`M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129`}),s.createElement(`path`,{fill:`#FFF`,d:`M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6`}),s.createElement(`path`,{stroke:`#FFF`,d:`m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2`}),s.createElement(`path`,{fill:`#FFF`,d:`M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#FFF`,d:`M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4`}),s.createElement(`path`,{stroke:`#FFF`,d:`M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z`,strokeWidth:`2`}),s.createElement(`path`,{stroke:`#FFF`,d:`m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7`,strokeWidth:`2`}),s.createElement(`path`,{fill:`#A26EF4`,d:`M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0`}),s.createElement(`path`,{fill:`#FFF`,d:`m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7`}),s.createElement(`path`,{fill:`#FFF`,d:`M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7`}),s.createElement(`path`,{fill:`#5BA02E`,d:`M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6`}),s.createElement(`path`,{fill:`#92C110`,d:`M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6`}),s.createElement(`path`,{fill:`#F2D7AD`,d:`M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3`}),s.createElement(`path`,{fill:`#FFF`,d:`M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2`}),s.createElement(`path`,{fill:`#FFB594`,d:`M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26`}),s.createElement(`path`,{fill:`#FFF`,d:`M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M78.2 94.7s.9 7.4-5 13`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.9`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z`}),s.createElement(`path`,{fill:`#FFB594`,d:`m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9`}),s.createElement(`path`,{fill:`#5C2552`,d:`M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`m100.8 77.1 1.7-1-1-4.3.7-1.4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#552950`,d:`M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M91.1 86.8s5.3 5 12.7 2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#DB836E`,d:`M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2`}),s.createElement(`path`,{stroke:`#5C2552`,d:`M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M64 84.8s-6 10-13.5 10`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{fill:`#FFC6A0`,d:`m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7`}),s.createElement(`path`,{stroke:`#DB836E`,d:`M130.5 85.5s4.6 5.7 11.7 6.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),s.createElement(`path`,{stroke:`#E4EBF7`,d:`M121.7 105.7s-.4 8.6-1.3 13.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M115.8 161.5s-3.6-1.5-2.7-7.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6`}),s.createElement(`path`,{fill:`#2B0849`,d:`M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),s.createElement(`path`,{fill:`#CBD1D1`,d:`M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z`}),s.createElement(`path`,{fill:`#2B0849`,d:`M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2`}),s.createElement(`path`,{fill:`#A4AABA`,d:`M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1`}),s.createElement(`path`,{fill:`#7BB2F9`,d:`m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M108.5 221s2.7-1.2 6-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),s.createElement(`path`,{fill:`#192064`,d:`M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4`}),s.createElement(`path`,{fill:`#FFF`,d:`M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7`}),s.createElement(`path`,{fill:`#192064`,d:`M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7`}),s.createElement(`path`,{stroke:`#648BD8`,d:`M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),E5={success:ec,error:nc,info:oc,warning:_5},D5={404:v5,500:y5,403:T5},O5=Object.keys(D5),k5=({prefixCls:e,icon:t,status:n})=>{let r=(0,h.default)(`${e}-icon`);if(O5.includes(`${n}`)){let t=D5[n];return s.createElement(`div`,{className:`${r} ${e}-image`},s.createElement(t,null))}let i=s.createElement(E5[n]);return t===null||t===!1?null:s.createElement(`div`,{className:r},t||i)},A5=({prefixCls:e,extra:t})=>t?s.createElement(`div`,{className:`${e}-extra`},t):null,j5=({prefixCls:e,className:t,rootClassName:n,subTitle:r,title:i,style:a,children:o,status:c=`info`,icon:l,extra:u})=>{let{getPrefixCls:d,direction:f,result:p}=s.useContext(da),m=d(`result`,e),[g,_,v]=w5(m),y=(0,h.default)(m,`${m}-${c}`,t,p?.className,n,{[`${m}-rtl`]:f===`rtl`},_,v),b=Object.assign(Object.assign({},p?.style),a);return g(s.createElement(`div`,{className:y,style:b},s.createElement(k5,{prefixCls:m,status:c,icon:l}),s.createElement(`div`,{className:`${m}-title`},i),r&&s.createElement(`div`,{className:`${m}-subtitle`},r),s.createElement(A5,{prefixCls:m,extra:u}),o&&s.createElement(`div`,{className:`${m}-content`},o)))};j5.PRESENTED_IMAGE_403=D5[403],j5.PRESENTED_IMAGE_404=D5[404],j5.PRESENTED_IMAGE_500=D5[500];var M5=hb,N5=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},so(e)),{display:`inline-block`,height:`auto`,marginInlineEnd:e.marginXS,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,background:e.defaultBg,border:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:`transparent`,[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}}),[`${i}-borderless`]:{borderColor:`transparent`,background:e.tagBorderlessBg}}},P5=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return La(e,{tagFontSize:i,tagLineHeight:Q(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},F5=e=>({defaultBg:new oi(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),I5=_o(`Tag`,e=>N5(P5(e)),F5),L5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:c,onChange:l,onClick:u}=e,d=L5(e,[`prefixCls`,`style`,`className`,`checked`,`children`,`icon`,`onChange`,`onClick`]),{getPrefixCls:f,tag:p}=s.useContext(da),m=e=>{l?.(!a),u?.(e)},g=f(`tag`,n),[_,v,y]=I5(g),b=(0,h.default)(g,`${g}-checkable`,{[`${g}-checkable-checked`]:a},p?.className,i,v,y);return _(s.createElement(`span`,Object.assign({},d,{ref:t,style:Object.assign(Object.assign({},r),p?.style),className:b,onClick:m}),c,s.createElement(`span`,null,o)))}),z5=e=>bo(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:`transparent`}}})),B5=yo([`Tag`,`preset`],e=>z5(P5(e)),F5);function V5(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var H5=(e,t,n)=>{let r=V5(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:`transparent`}}}},U5=yo([`Tag`,`status`],e=>{let t=P5(e);return[H5(t,`success`,`Success`),H5(t,`processing`,`Info`),H5(t,`error`,`Error`),H5(t,`warning`,`Warning`)]},F5),W5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:c,color:l,onClose:u,bordered:d=!0,visible:f}=e,p=W5(e,[`prefixCls`,`className`,`rootClassName`,`style`,`children`,`icon`,`color`,`onClose`,`bordered`,`visible`]),{getPrefixCls:m,direction:g,tag:_}=s.useContext(da),[v,y]=s.useState(!0),b=du(p,[`closeIcon`,`closable`]);s.useEffect(()=>{f!==void 0&&y(f)},[f]);let x=zy(l),S=By(l),C=x||S,w=Object.assign(Object.assign({backgroundColor:l&&!C?l:void 0},_?.style),a),T=m(`tag`,n),[E,D,O]=I5(T),k=(0,h.default)(T,_?.className,{[`${T}-${l}`]:C,[`${T}-has-color`]:l&&!C,[`${T}-hidden`]:!v,[`${T}-rtl`]:g===`rtl`,[`${T}-borderless`]:!d},r,i,D,O),A=e=>{e.stopPropagation(),u?.(e),e.defaultPrevented||y(!1)},[,j]=ol(rl(e),rl(_),{closable:!1,closeIconRender:e=>hc(e,s.createElement(`span`,{className:`${T}-close-icon`,onClick:A},e),e=>({onClick:t=>{var n;(n=e?.onClick)==null||n.call(e,t),A(t)},className:(0,h.default)(e?.className,`${T}-close-icon`)}))}),M=typeof p.onClick==`function`||o&&o.type===`a`,N=c||null,P=N?s.createElement(s.Fragment,null,N,o&&s.createElement(`span`,null,o)):o,F=s.createElement(`span`,Object.assign({},b,{ref:t,className:k,style:w}),P,j,x&&s.createElement(B5,{key:`preset`,prefixCls:T}),S&&s.createElement(U5,{key:`status`,prefixCls:T}));return E(M?s.createElement(xu,{component:`Tag`},F):F)});G5.CheckableTag=R5;var K5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`},q5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:K5}))}),J5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`},Y5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:J5}))}),X5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`},Z5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:X5}))}),Q5=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},$5=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` h${t}&, div&-h${t}, div&-h${t} > textarea, h${t} - `]=w5(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},E5=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},go(e)),{userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`}}})}},D5=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Ci[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),O5=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},k5=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),A5=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),j5=_o(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"\n div&,\n p\n ":{marginBottom:`1em`}},T5(e)),{[` + `]=Q5(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},e7=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},go(e)),{userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`}}})}},t7=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Ci[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),n7=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},r7=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),i7=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),a7=_o(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"\n div&,\n p\n ":{marginBottom:`1em`}},$5(e)),{[` & + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t} - `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),D5(e)),E5(e)),{[` + `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),t7(e)),e7(e)),{[` ${t}-expand, ${t}-collapse, ${t}-edit, ${t}-copy - `]:Object.assign(Object.assign({},go(e)),{marginInlineStart:e.marginXXS})}),O5(e)),k5(e)),A5()),{"&-rtl":{direction:`rtl`}})}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),M5=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:c=!0,value:l,onSave:u,onCancel:d,onEnd:f,component:p,enterIcon:m=s.createElement(C5,null)}=e,g=s.useRef(null),_=s.useRef(!1),v=s.useRef(null),[y,b]=s.useState(l);s.useEffect(()=>{b(l)},[l]),s.useEffect(()=>{if(g.current?.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let x=({target:e})=>{b(e.value.replace(/[\n\r]/g,``))},S=()=>{_.current=!0},C=()=>{_.current=!1},w=({keyCode:e})=>{_.current||(v.current=e)},T=()=>{u(y.trim())},E=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{v.current!==e||_.current||t||n||r||i||(e===$.ENTER?(T(),f?.()):e===$.ESC&&d())},D=()=>{T()},[O,k,A]=j5(t),j=(0,h.default)(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${p}`]:!!p},r,k,A);return O(s.createElement(`div`,{className:j,style:i},s.createElement(vx,{ref:g,maxLength:o,value:y,onChange:x,onKeyDown:w,onKeyUp:E,onCompositionStart:S,onCompositionEnd:C,onBlur:D,"aria-label":n,rows:1,autoSize:c}),m===null?null:gc(m,{className:`${t}-edit-content-confirm`})))},N5=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r{var n=N5(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}t.exports=function(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}}))()),F5=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},I5=({copyConfig:e,children:t})=>{let[n,r]=s.useState(!1),[i,a]=s.useState(!1),o=s.useRef(null),c=()=>{o.current&&clearTimeout(o.current)},l={};return e.format&&(l.format=e.format),s.useEffect(()=>c,[]),{copied:n,copyLoading:i,onClick:Aa(n=>F5(void 0,void 0,void 0,function*(){var i;n?.preventDefault(),n?.stopPropagation(),a(!0);try{let s=typeof e.text==`function`?yield e.text():e.text;(0,P5.default)(s||Bx(t,!0).join(``)||``,l),a(!1),r(!0),c(),o.current=setTimeout(()=>{r(!1)},3e3),(i=e.onCopy)==null||i.call(e,n)}catch(e){throw a(!1),e}}))}};function L5(e,t){return s.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e==`object`?e:null)]},[e])}var R5=e=>{let t=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{t.current=e}),t.current},z5=(e,t,n)=>(0,s.useMemo)(()=>e===!0?{title:t??n}:(0,s.isValidElement)(e)?{title:e}:typeof e==`object`?Object.assign({title:t??n},e):{title:e},[e,t,n]),B5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,setContentRef:o,children:c,direction:l,style:u}=e,d=B5(e,[`prefixCls`,`component`,`className`,`rootClassName`,`setContentRef`,`children`,`direction`,`style`]),{getPrefixCls:f,direction:p,className:m,style:g}=ma(`typography`),_=l??p,v=o?R(t,o):t,y=f(`typography`,n),[b,x,S]=j5(y),C=(0,h.default)(y,m,{[`${y}-rtl`]:_===`rtl`},i,a,x,S),w=Object.assign(Object.assign({},g),u);return b(s.createElement(r,Object.assign({className:C,style:w,ref:v},d),c))}),H5={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`},U5=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:H5}))});function W5(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function G5(e,t,n){return e===!0||e===void 0?t:e||n&&t}function K5(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var q5=e=>[`string`,`number`].includes(typeof e),J5=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:a,tabIndex:o,onCopy:c,loading:l})=>{let u=W5(i),d=W5(a),{copied:f,copy:p}=n??{},m=t?f:p,g=G5(u[+!!t],m),_=typeof g==`string`?g:m;return s.createElement(Wy,{title:g},s.createElement(`button`,{type:`button`,className:(0,h.default)(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:c,"aria-label":_,tabIndex:o},t?G5(d[1],s.createElement(Qv,null),!0):G5(d[0],l?s.createElement(tl,null):s.createElement(U5,null),!0)))},Y5=s.forwardRef(({style:e,children:t},n)=>{let r=s.useRef(null);return s.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),s.createElement(`span`,{"aria-hidden":!0,ref:r,style:Object.assign({position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`},e)},t)}),X5=e=>e.reduce((e,t)=>e+(q5(t)?String(t).length:1),0);function Z5(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var Q5=0,$5=1,e7=2,t7=3,n7=4,r7={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function i7(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:c,onEllipsis:l}=e,u=s.useMemo(()=>g(r),[r]),d=s.useMemo(()=>X5(u),[r]),f=s.useMemo(()=>i(u,!1),[r]),[p,m]=s.useState(null),h=s.useRef(null),_=s.useRef(null),v=s.useRef(null),y=s.useRef(null),b=s.useRef(null),[x,S]=s.useState(!1),[C,w]=s.useState(Q5),[T,E]=s.useState(0),[D,O]=s.useState(null);qt(()=>{w(t&&n&&d?$5:Q5)},[n,r,a,t,u]),qt(()=>{if(C===$5){w(e7);let e=_.current&&getComputedStyle(_.current).whiteSpace;O(e)}else if(C===e7){let e=!!v.current?.isExceed();w(e?t7:n7),m(e?[0,d]:null),S(e);let t=v.current?.getHeight()||0,n=a===1?0:y.current?.getHeight()||0,r=b.current?.getHeight()||0,i=Math.max(t,n+r);E(i+1),l(e)}},[C]);let k=p?Math.ceil((p[0]+p[1])/2):0;qt(()=>{let[e,t]=p||[0,0];if(e!==t){let n=(h.current?.getHeight()||0)>T,r=k;t-e===1&&(r=n?e:t),m(n?[e,r]:[r,t])}},[p,k]);let A=s.useMemo(()=>{if(!t)return i(u,!1);if(C!==t7||!p||p[0]!==p[1]){let e=i(u,!1);return[n7,Q5].includes(C)?e:s.createElement(`span`,{style:Object.assign(Object.assign({},r7),{WebkitLineClamp:a})},e)}return i(o?u:Z5(u,p[0]),x)},[o,C,p,u].concat(X(c))),j={width:n,margin:0,padding:0,whiteSpace:D===`nowrap`?`normal`:`inherit`};return s.createElement(s.Fragment,null,A,C===e7&&s.createElement(s.Fragment,null,s.createElement(Y5,{style:Object.assign(Object.assign(Object.assign({},j),r7),{WebkitLineClamp:a}),ref:v},f),s.createElement(Y5,{style:Object.assign(Object.assign(Object.assign({},j),r7),{WebkitLineClamp:a-1}),ref:y},f),s.createElement(Y5,{style:Object.assign(Object.assign(Object.assign({},j),r7),{WebkitLineClamp:1}),ref:b},i([],!0))),C===t7&&p&&p[0]!==p[1]&&s.createElement(Y5,{style:Object.assign(Object.assign({},j),{top:400}),ref:h},i(Z5(u,k),!0)),C===$5&&s.createElement(`span`,{style:{whiteSpace:`inherit`},ref:_}))}var a7=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!r?.title||!e?n:s.createElement(Wy,Object.assign({open:t?void 0:!1},r),n),o7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:c,ellipsis:l,editable:u,copyable:d,component:f,title:p}=e,m=o7(e,[`prefixCls`,`className`,`style`,`type`,`disabled`,`children`,`ellipsis`,`editable`,`copyable`,`component`,`title`]),{getPrefixCls:_,direction:v}=s.useContext(da),[y]=Zr(`Text`),b=s.useRef(null),x=s.useRef(null),S=_(`typography`,n),C=du(m,l7),[w,T]=L5(u),[E,D]=Na(!1,{value:T.editing}),{triggerType:O=[`icon`]}=T,k=e=>{var t;e&&((t=T.onStart)==null||t.call(T)),D(e)},A=R5(E);qt(()=>{var e;!E&&A&&((e=x.current)==null||e.focus())},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{var t;(t=T.onChange)==null||t.call(T,e),k(!1)},N=()=>{var e;(e=T.onCancel)==null||e.call(T),k(!1)},[P,F]=L5(d),{copied:I,copyLoading:L,onClick:z}=I5({copyConfig:F,children:c}),[B,V]=s.useState(!1),[H,U]=s.useState(!1),[W,G]=s.useState(!1),[K,q]=s.useState(!1),[ee,J]=s.useState(!0),[Y,te]=L5(l,{expandable:!1,symbol:e=>e?y?.collapse:y?.expand}),[ne,re]=Na(te.defaultExpanded||!1,{value:te.expanded}),ie=Y&&(!ne||te.expandable===`collapsible`),{rows:ae=1}=te,oe=s.useMemo(()=>ie&&(te.suffix!==void 0||te.onEllipsis||te.expandable||w||P),[ie,te,w,P]);qt(()=>{Y&&!oe&&(V(Dh(`webkitLineClamp`)),U(Dh(`textOverflow`)))},[oe,Y]);let[se,ce]=s.useState(ie),le=s.useMemo(()=>oe?!1:ae===1?H:B,[oe,H,B]);qt(()=>{ce(le&&ie)},[le,ie]);let ue=ie&&(se?K:W),de=ie&&ae===1&&se,fe=ie&&ae>1&&se,pe=(e,t)=>{var n;re(t.expanded),(n=te.onExpand)==null||n.call(te,e,t)},[me,he]=s.useState(0),ge=({offsetWidth:e})=>{he(e)},_e=e=>{var t;G(e),W!==e&&((t=te.onEllipsis)==null||t.call(te,e))};s.useEffect(()=>{let e=b.current;if(Y&&se&&e){let t=K5(e);K!==t&&q(t)}},[Y,se,c,fe,ee,me]),s.useEffect(()=>{let e=b.current;if(typeof IntersectionObserver>`u`||!e||!se||!ie)return;let t=new IntersectionObserver(()=>{J(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[se,ie]);let ve=z5(te.tooltip,T.text,c),ye=s.useMemo(()=>{if(Y&&!se)return[T.text,c,p,ve.title].find(q5)},[Y,se,p,ve.title,ue]);if(E)return s.createElement(M5,{value:T.text??(typeof c==`string`?c:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:S,className:r,style:i,direction:v,component:f,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let be=()=>{let{expandable:e,symbol:t}=te;return e?s.createElement(`button`,{type:`button`,key:`expand`,className:`${S}-${ne?`collapse`:`expand`}`,onClick:e=>pe(e,{expanded:!ne}),"aria-label":ne?y.collapse:y?.expand},typeof t==`function`?t(ne):t):null},xe=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=g(t)[0]||y?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?s.createElement(Wy,{key:`edit`,title:t===!1?``:r},s.createElement(`button`,{type:`button`,ref:x,className:`${S}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||s.createElement(x5,{role:`button`}))):null},Se=()=>P?s.createElement(J5,Object.assign({key:`copy`},F,{prefixCls:S,copied:I,locale:y,onCopy:z,loading:L,iconOnly:c==null})):null,Ce=e=>[e&&be(),xe(),Se()],we=e=>[e&&!ne&&s.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},c7),te.suffix,Ce(e)];return s.createElement(Ue,{onResize:ge,disabled:!ie},l=>s.createElement(a7,{tooltipProps:ve,enableEllipsis:ie,isEllipsis:ue},s.createElement(V5,Object.assign({className:(0,h.default)({[`${S}-${a}`]:a,[`${S}-disabled`]:o,[`${S}-ellipsis`]:Y,[`${S}-ellipsis-single-line`]:de,[`${S}-ellipsis-multiple-line`]:fe},r),prefixCls:n,style:Object.assign(Object.assign({},i),{WebkitLineClamp:fe?ae:void 0}),component:f,ref:R(l,b,t),direction:v,onClick:O.includes(`text`)?j:void 0,"aria-label":ye?.toString(),title:p},C),s.createElement(i7,{enableMeasure:ie&&!se,text:c,rows:ae,width:me,onEllipsis:_e,expanded:ne,miscDeps:[I,ne,L,w,P,y].concat(X(l7.map(t=>e[t])))},(t,n)=>s7(e,s.createElement(s.Fragment,null,t.length>0&&n&&!ne&&ye?s.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,we(n)))))))}),d7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{ellipsis:n,rel:r,children:i,navigate:a}=e,o=d7(e,[`ellipsis`,`rel`,`children`,`navigate`]),c=Object.assign(Object.assign({},o),{rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r});return s.createElement(u7,Object.assign({},c,{ref:t,ellipsis:!!n,component:`a`}),i)}),p7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{children:n}=e,r=p7(e,[`children`]);return s.createElement(u7,Object.assign({ref:t},r,{component:`div`}),n)}),h7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{ellipsis:n,children:r}=e,i=h7(e,[`ellipsis`,`children`]),a=s.useMemo(()=>n&&typeof n==`object`?du(n,[`expandable`,`rows`]):n,[n]);return s.createElement(u7,Object.assign({ref:t},i,{ellipsis:a,component:`span`}),r)}),_7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{level:n=1,children:r}=e,i=_7(e,[`level`,`children`]),a=v7.includes(n)?`h${n}`:`h1`;return s.createElement(u7,Object.assign({ref:t},i,{component:a}),r)}),b7=V5;b7.Text=g7,b7.Link=f7,b7.Title=y7,b7.Paragraph=m7;var x7=t(((e,t)=>{t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports})),S7=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),C7=t(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=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},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),w7=t(((e,t)=>{var n=C7().default;t.exports=function(e,t){if(n(e)!=`object`||!e)return e;var r;if(typeof Symbol<`u`&&(r=e[Symbol.toPrimitive])!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)},t.exports.__esModule=!0,t.exports.default=t.exports})),T7=t(((e,t)=>{var n=C7().default,r=w7();t.exports=function(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``},t.exports.__esModule=!0,t.exports.default=t.exports})),E7=t(((e,t)=>{var n=T7();t.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},t.exports.__esModule=!0,t.exports.default=t.exports})),D7=t(((e,t)=>{var n=E7();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}t.exports=function(e){for(var t=1;t{Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),k7=t((e=>{var t=x7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(D7()),r=O7();e.default=(0,n.default)((0,n.default)({},r.commonLocale),{},{locale:`zh_CN`,today:`今天`,now:`此刻`,backToToday:`返回今天`,ok:`确定`,timeSelect:`选择时间`,dateSelect:`选择日期`,weekSelect:`选择周`,clear:`清除`,week:`周`,month:`月`,year:`年`,previousMonth:`上个月 (翻页上键)`,nextMonth:`下个月 (翻页下键)`,monthSelect:`选择月份`,yearSelect:`选择年份`,decadeSelect:`选择年代`,previousYear:`上一年 (Control键加左方向键)`,nextYear:`下一年 (Control键加右方向键)`,previousDecade:`上一年代`,nextDecade:`下一年代`,previousCentury:`上一世纪`,nextCentury:`下一世纪`,yearFormat:`YYYY年`,cellDateFormat:`D`,monthBeforeYear:!1})})),A7=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),j7=t((e=>{var t=x7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(k7()),r=t(A7()),i={lang:Object.assign({placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`]},n.default),timePickerLocale:Object.assign({},r.default)};i.lang.ok=`确定`,e.default=i})),M7=t((e=>{var t=x7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=t(j7()).default})),N7=t((e=>{var t=x7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(S7()),r=t(M7()),i=t(j7()),a=t(A7()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:`预览`},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),P7=t(((e,t)=>{t.exports=N7()}));export{kc as _,Wx as a,r as b,I8 as c,Y6 as d,$4 as f,of as g,Yf as h,o5 as i,Wb as l,M_ as m,b7 as n,zx as o,cy as p,y5 as r,yx as s,P7 as t,ob as u,Ps as v,a as y}; \ No newline at end of file + `]:Object.assign(Object.assign({},go(e)),{marginInlineStart:e.marginXXS})}),n7(e)),r7(e)),i7()),{"&-rtl":{direction:`rtl`}})}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),o7=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:c=!0,value:l,onSave:u,onCancel:d,onEnd:f,component:p,enterIcon:m=s.createElement(Z5,null)}=e,g=s.useRef(null),_=s.useRef(!1),v=s.useRef(null),[y,b]=s.useState(l);s.useEffect(()=>{b(l)},[l]),s.useEffect(()=>{if(g.current?.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let x=({target:e})=>{b(e.value.replace(/[\n\r]/g,``))},S=()=>{_.current=!0},C=()=>{_.current=!1},w=({keyCode:e})=>{_.current||(v.current=e)},T=()=>{u(y.trim())},E=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{v.current!==e||_.current||t||n||r||i||(e===$.ENTER?(T(),f?.()):e===$.ESC&&d())},D=()=>{T()},[O,k,A]=a7(t),j=(0,h.default)(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${p}`]:!!p},r,k,A);return O(s.createElement(`div`,{className:j,style:i},s.createElement(Vx,{ref:g,maxLength:o,value:y,onChange:x,onKeyDown:w,onKeyUp:E,onCompositionStart:S,onCompositionEnd:C,onBlur:D,"aria-label":n,rows:1,autoSize:c}),m===null?null:gc(m,{className:`${t}-edit-content-confirm`})))},s7=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r{var n=s7(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}t.exports=function(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}}))()),l7=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},u7=({copyConfig:e,children:t})=>{let[n,r]=s.useState(!1),[i,a]=s.useState(!1),o=s.useRef(null),c=()=>{o.current&&clearTimeout(o.current)},l={};return e.format&&(l.format=e.format),s.useEffect(()=>c,[]),{copied:n,copyLoading:i,onClick:Aa(n=>l7(void 0,void 0,void 0,function*(){var i;n?.preventDefault(),n?.stopPropagation(),a(!0);try{let s=typeof e.text==`function`?yield e.text():e.text;(0,c7.default)(s||l5(t,!0).join(``)||``,l),a(!1),r(!0),c(),o.current=setTimeout(()=>{r(!1)},3e3),(i=e.onCopy)==null||i.call(e,n)}catch(e){throw a(!1),e}}))}};function d7(e,t){return s.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e==`object`?e:null)]},[e])}var f7=e=>{let t=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{t.current=e}),t.current},p7=(e,t,n)=>(0,s.useMemo)(()=>e===!0?{title:t??n}:(0,s.isValidElement)(e)?{title:e}:typeof e==`object`?Object.assign({title:t??n},e):{title:e},[e,t,n]),m7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,setContentRef:o,children:c,direction:l,style:u}=e,d=m7(e,[`prefixCls`,`component`,`className`,`rootClassName`,`setContentRef`,`children`,`direction`,`style`]),{getPrefixCls:f,direction:p,className:m,style:g}=ma(`typography`),_=l??p,v=o?R(t,o):t,y=f(`typography`,n),[b,x,S]=a7(y),C=(0,h.default)(y,m,{[`${y}-rtl`]:_===`rtl`},i,a,x,S),w=Object.assign(Object.assign({},g),u);return b(s.createElement(r,Object.assign({className:C,style:w,ref:v},d),c))}),g7={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`},_7=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:g7}))});function v7(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function y7(e,t,n){return e===!0||e===void 0?t:e||n&&t}function b7(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var x7=e=>[`string`,`number`].includes(typeof e),S7=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:a,tabIndex:o,onCopy:c,loading:l})=>{let u=v7(i),d=v7(a),{copied:f,copy:p}=n??{},m=t?f:p,g=y7(u[+!!t],m),_=typeof g==`string`?g:m;return s.createElement(Wy,{title:g},s.createElement(`button`,{type:`button`,className:(0,h.default)(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:c,"aria-label":_,tabIndex:o},t?y7(d[1],s.createElement(Qv,null),!0):y7(d[0],l?s.createElement(tl,null):s.createElement(_7,null),!0)))},C7=s.forwardRef(({style:e,children:t},n)=>{let r=s.useRef(null);return s.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),s.createElement(`span`,{"aria-hidden":!0,ref:r,style:Object.assign({position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`},e)},t)}),w7=e=>e.reduce((e,t)=>e+(x7(t)?String(t).length:1),0);function T7(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var E7=0,D7=1,O7=2,k7=3,A7=4,j7={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function M7(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:c,onEllipsis:l}=e,u=s.useMemo(()=>g(r),[r]),d=s.useMemo(()=>w7(u),[r]),f=s.useMemo(()=>i(u,!1),[r]),[p,m]=s.useState(null),h=s.useRef(null),_=s.useRef(null),v=s.useRef(null),y=s.useRef(null),b=s.useRef(null),[x,S]=s.useState(!1),[C,w]=s.useState(E7),[T,E]=s.useState(0),[D,O]=s.useState(null);qt(()=>{w(t&&n&&d?D7:E7)},[n,r,a,t,u]),qt(()=>{if(C===D7){w(O7);let e=_.current&&getComputedStyle(_.current).whiteSpace;O(e)}else if(C===O7){let e=!!v.current?.isExceed();w(e?k7:A7),m(e?[0,d]:null),S(e);let t=v.current?.getHeight()||0,n=a===1?0:y.current?.getHeight()||0,r=b.current?.getHeight()||0,i=Math.max(t,n+r);E(i+1),l(e)}},[C]);let k=p?Math.ceil((p[0]+p[1])/2):0;qt(()=>{let[e,t]=p||[0,0];if(e!==t){let n=(h.current?.getHeight()||0)>T,r=k;t-e===1&&(r=n?e:t),m(n?[e,r]:[r,t])}},[p,k]);let A=s.useMemo(()=>{if(!t)return i(u,!1);if(C!==k7||!p||p[0]!==p[1]){let e=i(u,!1);return[A7,E7].includes(C)?e:s.createElement(`span`,{style:Object.assign(Object.assign({},j7),{WebkitLineClamp:a})},e)}return i(o?u:T7(u,p[0]),x)},[o,C,p,u].concat(X(c))),j={width:n,margin:0,padding:0,whiteSpace:D===`nowrap`?`normal`:`inherit`};return s.createElement(s.Fragment,null,A,C===O7&&s.createElement(s.Fragment,null,s.createElement(C7,{style:Object.assign(Object.assign(Object.assign({},j),j7),{WebkitLineClamp:a}),ref:v},f),s.createElement(C7,{style:Object.assign(Object.assign(Object.assign({},j),j7),{WebkitLineClamp:a-1}),ref:y},f),s.createElement(C7,{style:Object.assign(Object.assign(Object.assign({},j),j7),{WebkitLineClamp:1}),ref:b},i([],!0))),C===k7&&p&&p[0]!==p[1]&&s.createElement(C7,{style:Object.assign(Object.assign({},j),{top:400}),ref:h},i(T7(u,k),!0)),C===D7&&s.createElement(`span`,{style:{whiteSpace:`inherit`},ref:_}))}var N7=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!r?.title||!e?n:s.createElement(Wy,Object.assign({open:t?void 0:!1},r),n),P7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:c,ellipsis:l,editable:u,copyable:d,component:f,title:p}=e,m=P7(e,[`prefixCls`,`className`,`style`,`type`,`disabled`,`children`,`ellipsis`,`editable`,`copyable`,`component`,`title`]),{getPrefixCls:_,direction:v}=s.useContext(da),[y]=Zr(`Text`),b=s.useRef(null),x=s.useRef(null),S=_(`typography`,n),C=du(m,L7),[w,T]=d7(u),[E,D]=Na(!1,{value:T.editing}),{triggerType:O=[`icon`]}=T,k=e=>{var t;e&&((t=T.onStart)==null||t.call(T)),D(e)},A=f7(E);qt(()=>{var e;!E&&A&&((e=x.current)==null||e.focus())},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{var t;(t=T.onChange)==null||t.call(T,e),k(!1)},N=()=>{var e;(e=T.onCancel)==null||e.call(T),k(!1)},[P,F]=d7(d),{copied:I,copyLoading:L,onClick:z}=u7({copyConfig:F,children:c}),[B,V]=s.useState(!1),[H,U]=s.useState(!1),[W,G]=s.useState(!1),[K,q]=s.useState(!1),[ee,J]=s.useState(!0),[Y,te]=d7(l,{expandable:!1,symbol:e=>e?y?.collapse:y?.expand}),[ne,re]=Na(te.defaultExpanded||!1,{value:te.expanded}),ie=Y&&(!ne||te.expandable===`collapsible`),{rows:ae=1}=te,oe=s.useMemo(()=>ie&&(te.suffix!==void 0||te.onEllipsis||te.expandable||w||P),[ie,te,w,P]);qt(()=>{Y&&!oe&&(V(Dh(`webkitLineClamp`)),U(Dh(`textOverflow`)))},[oe,Y]);let[se,ce]=s.useState(ie),le=s.useMemo(()=>oe?!1:ae===1?H:B,[oe,H,B]);qt(()=>{ce(le&&ie)},[le,ie]);let ue=ie&&(se?K:W),de=ie&&ae===1&&se,fe=ie&&ae>1&&se,pe=(e,t)=>{var n;re(t.expanded),(n=te.onExpand)==null||n.call(te,e,t)},[me,he]=s.useState(0),ge=({offsetWidth:e})=>{he(e)},_e=e=>{var t;G(e),W!==e&&((t=te.onEllipsis)==null||t.call(te,e))};s.useEffect(()=>{let e=b.current;if(Y&&se&&e){let t=b7(e);K!==t&&q(t)}},[Y,se,c,fe,ee,me]),s.useEffect(()=>{let e=b.current;if(typeof IntersectionObserver>`u`||!e||!se||!ie)return;let t=new IntersectionObserver(()=>{J(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[se,ie]);let ve=p7(te.tooltip,T.text,c),ye=s.useMemo(()=>{if(Y&&!se)return[T.text,c,p,ve.title].find(x7)},[Y,se,p,ve.title,ue]);if(E)return s.createElement(o7,{value:T.text??(typeof c==`string`?c:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:S,className:r,style:i,direction:v,component:f,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let be=()=>{let{expandable:e,symbol:t}=te;return e?s.createElement(`button`,{type:`button`,key:`expand`,className:`${S}-${ne?`collapse`:`expand`}`,onClick:e=>pe(e,{expanded:!ne}),"aria-label":ne?y.collapse:y?.expand},typeof t==`function`?t(ne):t):null},xe=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=g(t)[0]||y?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?s.createElement(Wy,{key:`edit`,title:t===!1?``:r},s.createElement(`button`,{type:`button`,ref:x,className:`${S}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||s.createElement(Y5,{role:`button`}))):null},Se=()=>P?s.createElement(S7,Object.assign({key:`copy`},F,{prefixCls:S,copied:I,locale:y,onCopy:z,loading:L,iconOnly:c==null})):null,Ce=e=>[e&&be(),xe(),Se()],we=e=>[e&&!ne&&s.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},I7),te.suffix,Ce(e)];return s.createElement(Ue,{onResize:ge,disabled:!ie},l=>s.createElement(N7,{tooltipProps:ve,enableEllipsis:ie,isEllipsis:ue},s.createElement(h7,Object.assign({className:(0,h.default)({[`${S}-${a}`]:a,[`${S}-disabled`]:o,[`${S}-ellipsis`]:Y,[`${S}-ellipsis-single-line`]:de,[`${S}-ellipsis-multiple-line`]:fe},r),prefixCls:n,style:Object.assign(Object.assign({},i),{WebkitLineClamp:fe?ae:void 0}),component:f,ref:R(l,b,t),direction:v,onClick:O.includes(`text`)?j:void 0,"aria-label":ye?.toString(),title:p},C),s.createElement(M7,{enableMeasure:ie&&!se,text:c,rows:ae,width:me,onEllipsis:_e,expanded:ne,miscDeps:[I,ne,L,w,P,y].concat(X(L7.map(t=>e[t])))},(t,n)=>F7(e,s.createElement(s.Fragment,null,t.length>0&&n&&!ne&&ye?s.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,we(n)))))))}),z7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{ellipsis:n,rel:r,children:i,navigate:a}=e,o=z7(e,[`ellipsis`,`rel`,`children`,`navigate`]),c=Object.assign(Object.assign({},o),{rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r});return s.createElement(R7,Object.assign({},c,{ref:t,ellipsis:!!n,component:`a`}),i)}),V7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{children:n}=e,r=V7(e,[`children`]);return s.createElement(R7,Object.assign({ref:t},r,{component:`div`}),n)}),U7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{ellipsis:n,children:r}=e,i=U7(e,[`ellipsis`,`children`]),a=s.useMemo(()=>n&&typeof n==`object`?du(n,[`expandable`,`rows`]):n,[n]);return s.createElement(R7,Object.assign({ref:t},i,{ellipsis:a,component:`span`}),r)}),G7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{level:n=1,children:r}=e,i=G7(e,[`level`,`children`]),a=K7.includes(n)?`h${n}`:`h1`;return s.createElement(R7,Object.assign({ref:t},i,{component:a}),r)}),J7=h7;J7.Text=W7,J7.Link=B7,J7.Title=q7,J7.Paragraph=H7;var Y7=t(((e,t)=>{t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports})),X7=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),Z7=t(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=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},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Q7=t(((e,t)=>{var n=Z7().default;t.exports=function(e,t){if(n(e)!=`object`||!e)return e;var r;if(typeof Symbol<`u`&&(r=e[Symbol.toPrimitive])!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)},t.exports.__esModule=!0,t.exports.default=t.exports})),$7=t(((e,t)=>{var n=Z7().default,r=Q7();t.exports=function(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``},t.exports.__esModule=!0,t.exports.default=t.exports})),e9=t(((e,t)=>{var n=$7();t.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},t.exports.__esModule=!0,t.exports.default=t.exports})),t9=t(((e,t)=>{var n=e9();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}t.exports=function(e){for(var t=1;t{Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),r9=t((e=>{var t=Y7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(t9()),r=n9();e.default=(0,n.default)((0,n.default)({},r.commonLocale),{},{locale:`zh_CN`,today:`今天`,now:`此刻`,backToToday:`返回今天`,ok:`确定`,timeSelect:`选择时间`,dateSelect:`选择日期`,weekSelect:`选择周`,clear:`清除`,week:`周`,month:`月`,year:`年`,previousMonth:`上个月 (翻页上键)`,nextMonth:`下个月 (翻页下键)`,monthSelect:`选择月份`,yearSelect:`选择年份`,decadeSelect:`选择年代`,previousYear:`上一年 (Control键加左方向键)`,nextYear:`下一年 (Control键加右方向键)`,previousDecade:`上一年代`,nextDecade:`下一年代`,previousCentury:`上一世纪`,nextCentury:`下一世纪`,yearFormat:`YYYY年`,cellDateFormat:`D`,monthBeforeYear:!1})})),i9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),a9=t((e=>{var t=Y7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r9()),r=t(i9()),i={lang:Object.assign({placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`]},n.default),timePickerLocale:Object.assign({},r.default)};i.lang.ok=`确定`,e.default=i})),o9=t((e=>{var t=Y7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=t(a9()).default})),s9=t((e=>{var t=Y7().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(X7()),r=t(o9()),i=t(a9()),a=t(i9()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:`预览`},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),c9=t(((e,t)=>{t.exports=s9()})),l9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z`}}]},name:`arrow-right`,theme:`outlined`},u9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:l9}))}),d9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z`}}]},name:`clear`,theme:`outlined`},f9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:d9}))}),p9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}},{tag:`path`,attrs:{d:`M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z`}}]},name:`cloud-sync`,theme:`outlined`},m9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:p9}))}),h9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`},g9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:h9}))}),_9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`},v9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:_9}))}),y9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`},b9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:y9}))}),x9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8zm32-104H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z`}}]},name:`printer`,theme:`outlined`},S9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:x9}))}),C9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`},w9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:C9}))}),T9={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`},E9=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:T9}))});export{Wy as A,r as B,d8 as C,Y6 as D,ob as E,of as F,kc as I,ic as L,Qv as M,M_ as N,M3 as O,Yf as P,Ps as R,m8 as S,gb as T,p5 as _,v9 as a,ax as b,f9 as c,J7 as d,q5 as f,h5 as g,j5 as h,b9 as i,cy as j,$4 as k,u9 as l,M5 as m,w9 as n,g9 as o,G5 as p,S9 as r,m9 as s,E9 as t,c9 as u,c5 as v,Zb as w,W8 as x,Hx as y,a as z}; \ No newline at end of file diff --git a/新账系统/web/dist/assets/index-9vpK4WRZ.js b/新账系统/web/dist/assets/index-9vpK4WRZ.js deleted file mode 100644 index d4f5377..0000000 --- a/新账系统/web/dist/assets/index-9vpK4WRZ.js +++ /dev/null @@ -1,3 +0,0 @@ -import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./antd-DyieCF1D.js";import{n as x,t as S}from"./react-6WBM9IkR.js";var C=t(((e,t,n)=>{var r;(function(n,i){typeof e==`object`&&t!==void 0?t.exports=i():typeof r==`function`&&r.amd?r(i):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=i()})(n,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){var r;(function(n,i){typeof e==`object`&&t!==void 0?t.exports=i(C()):typeof r==`function`&&r.amd?r([`dayjs`],i):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=i(n.dayjs)})(n,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),T=e(i(),1),E=x(),D=e(C(),1),O=e(v(),1);w();async function k(e){let t=await e.api(`/api/session`);return e.setUser(t.user?.id||``),t}async function A(e){return e.api(`/api/state`)}async function j(e,t,n){if(!t)throw Error(`请选择登录账号`);if(!n)throw Error(`请输入密码`);return e.api(`/api/login`,{member:t,password:n})}async function M(e,t){return e.api(`/api/demo-login`,{member:t})}function N(e){let t={storeName:e.storeName.trim(),ownerLabel:e.ownerLabel.trim(),ownerLoginName:e.ownerLoginName.trim(),ownerPassword:e.ownerPassword};if(!t.storeName||t.storeName.length>80)throw Error(`店铺名称请填写1~80字`);if(!t.ownerLabel||t.ownerLabel.length>30)throw Error(`店主显示名请填写1~30字`);if(!t.ownerLoginName||t.ownerLoginName.length>60)throw Error(`店主登录名请填写1~60字`);if(t.ownerPassword.length<12)throw Error(`店主密码至少12个字符`);return t}async function ee(e,t){return N(t),e.api(`/api/setup`,t)}async function te(e){if(e.pending())throw Error(`请先恢复上次未确认的操作,再退出`);await e.api(`/api/logout`,{}),e.setUser(``)}function P(e,t){return e?.shopSettings?.storeName||e?.printing?.store||t?.brand?.storeName||`珠宝台账`}function F(e){return e.replace(/\/+$/,``)===`/next/login`?`login`:`create`}function ne(e,{keepSearch:t=!1}={}){let n=(e===`login`?`/next/login`:`/next/`)+(t?window.location.search:``);window.location.pathname+window.location.search!==n&&window.history.pushState(null,``,n),window.dispatchEvent(new Event(`next-route`))}function re(){let[e,t]=(0,T.useState)(()=>F(window.location.pathname));return(0,T.useEffect)(()=>{let e=()=>t(F(window.location.pathname));return window.addEventListener(`popstate`,e),window.addEventListener(`next-route`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`next-route`,e)}},[]),e}function ie(e){return new URLSearchParams(window.location.search).get(e)||``}var I=S();function ae({client:e,session:t,onLoggedIn:r}){let[i,a]=(0,T.useState)(``),[s,c]=(0,T.useState)(``),u=P(null,t),f=t.loginOptions||[],m=t.mode===`demo`?`用虚构订单练习完整流程,演示数据与新账隔离。`:`先设置账号。当前是本机试用,正式云端开账另行配置。`;async function h(e,t){a(``),c(e);try{await t(),await r()}catch(e){a(e.message)}finally{c(``)}}return(0,I.jsx)(`div`,{className:`login-wrap`,children:(0,I.jsxs)(o,{className:`login-card`,children:[(0,I.jsx)(`div`,{className:`brand-mark large`,"aria-hidden":`true`,children:Array.from(u)[0]||`店`}),(0,I.jsxs)(p.Title,{level:3,children:[u,` · 新账系统`]}),(0,I.jsx)(p.Paragraph,{type:`secondary`,children:t.setup||t.mode===`demo`?m:`录入、收款与复核,从同一张订单开始。`}),(0,I.jsxs)(p.Paragraph,{type:`secondary`,className:`small`,children:[`新版界面(对照试用)·`,` `,(0,I.jsx)(`a`,{href:`/`,className:`old-ui-link`,children:`返回旧版界面`})]}),i&&(0,I.jsx)(n,{type:`error`,showIcon:!0,message:i,className:`login-error`,role:`alert`}),t.mode===`demo`?(0,I.jsx)(d,{direction:`vertical`,style:{width:`100%`},children:f.map(t=>(0,I.jsx)(l,{block:!0,size:`large`,type:t.member===`owner`?`primary`:`default`,loading:s===t.member,disabled:!!s&&s!==t.member,onClick:()=>h(t.member,()=>M(e,t.member)),children:`以`+t.label+`身份进入演示`},t.member))}):t.setup?(0,I.jsx)(L,{working:s===`setup`,onSubmit:t=>h(`setup`,()=>ee(e,t))}):(0,I.jsx)(oe,{options:f,working:s===`login`,onSubmit:(t,n)=>h(`login`,()=>j(e,t,n))}),(0,I.jsx)(p.Paragraph,{type:`secondary`,className:`small login-foot`,children:`云端数据库和飞书同步的真实状态,会在系统内显示。`})]})})}function oe({options:e,working:t,onSubmit:n}){let[r,i]=(0,T.useState)(``),[o,s]=(0,T.useState)(``);return(0,I.jsx)(`form`,{className:`login-form`,onSubmit:e=>{e.preventDefault(),n(r,o)},children:(0,I.jsxs)(a,{layout:`vertical`,component:!1,children:[(0,I.jsx)(a.Item,{label:`登录账号`,required:!0,children:(0,I.jsx)(h,{"aria-label":`登录账号`,"data-testid":`login-member`,value:r||void 0,placeholder:`请选择账号`,options:e.map(e=>({value:e.member,label:e.label})),onChange:i})}),(0,I.jsx)(a.Item,{label:`密码`,required:!0,children:(0,I.jsx)(_.Password,{name:`password`,"aria-label":`密码`,autoComplete:`current-password`,value:o,onChange:e=>s(e.target.value)})}),(0,I.jsx)(l,{type:`primary`,htmlType:`submit`,block:!0,size:`large`,loading:t,children:`登录`})]})})}function L({working:e,onSubmit:t}){let[n,r]=(0,T.useState)({storeName:``,ownerLabel:`店主`,ownerLoginName:`owner`,ownerPassword:``}),i=e=>({value:n[e],onChange:t=>r({...n,[e]:t.target.value})});return(0,I.jsx)(`form`,{className:`setup-form`,onSubmit:e=>{e.preventDefault(),t(n)},children:(0,I.jsxs)(a,{layout:`vertical`,component:!1,children:[(0,I.jsx)(a.Item,{label:`店铺名称`,required:!0,children:(0,I.jsx)(_,{name:`storeName`,"aria-label":`店铺名称`,maxLength:80,...i(`storeName`)})}),(0,I.jsx)(a.Item,{label:`店主显示名`,required:!0,children:(0,I.jsx)(_,{name:`ownerLabel`,"aria-label":`店主显示名`,maxLength:30,...i(`ownerLabel`)})}),(0,I.jsx)(a.Item,{label:`店主登录名`,required:!0,children:(0,I.jsx)(_,{name:`ownerLoginName`,"aria-label":`店主登录名`,maxLength:60,...i(`ownerLoginName`)})}),(0,I.jsx)(a.Item,{label:`店主密码(至少12个字符)`,required:!0,children:(0,I.jsx)(_.Password,{name:`ownerPassword`,"aria-label":`店主密码`,autoComplete:`new-password`,...i(`ownerPassword`)})}),(0,I.jsx)(p.Paragraph,{type:`secondary`,children:`进入系统后,在设置 → 员工管理中添加员工。`}),(0,I.jsx)(l,{type:`primary`,htmlType:`submit`,block:!0,size:`large`,loading:e,children:`建立试用账号`})]})})}var se=e=>`mm-next-draft-${e}`;function ce(e,t){try{let n=JSON.parse(e.getItem(se(t))||`null`);return n&&typeof n==`object`&&Array.isArray(n.lines)?n:null}catch{return null}}function le(e,t,n){try{e.setItem(se(t),JSON.stringify(n))}catch{}}function ue(e,t){try{e.removeItem(se(t))}catch{}}function de(e){return(0,T.useSyncExternalStore)(t=>{let n=e.subscribe(t);return()=>void n()},()=>[e.busy,e.progressText,e.user,e.pending()?.key||``].join(`\0`))}var R={exports:{}};(function(e){let t=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(e);function n(e,t,n){let r=String(e??``).trim();if(!RegExp(`^\\d+(?:\\.\\d{1,`+t+`})?$`).test(r))throw Error(n+`须为非负数字,最多`+t+`位小数`);let[i,a=``]=r.split(`.`),o=BigInt(i)*10n**BigInt(t)+BigInt(a.padEnd(t,`0`));if(o>100000000000n)throw Error(n+`超出支持范围`);return o}function r(e,t=`金额`){return Number(n(e,2,t))}let i=e=>[`足银999`,`纯银925`].includes(e);function a(e=[]){if(!Array.isArray(e)||e.length>100)throw Error(`每行最多填写100项附加项目`);let t=[],n=0;for(let i of e){if(!i||typeof i!=`object`)throw Error(`附加项目格式无效`);let e=i.id==null?``:String(i.id);if(e&&!/^[a-f0-9-]{36}$/.test(e))throw Error(`附加项目标识无效`);if(i.costRemoved!==void 0&&typeof i.costRemoved!=`boolean`)throw Error(`内部成本移除标记无效`);let a=i.amount==null||i.amount===``,o=String(i.name??``).trim();if(a&&(!e||!o))continue;if(!o||o.length>40)throw Error(`附加项目名称须为1~40字`);let s=a?null:r(i.amount,`附加项目金额`);t.push({...e?{id:e}:{},name:o,amount:s,...i.costRemoved===!0?{costRemoved:!0}:{}}),n+=s||0}if(n>1e11)throw Error(`附加项目合计超出支持范围`);return{items:t,total:n}}function o(e){let t=e.pricingMode===`auto`?c(e):null,n=t?t.sale:r(e.baseSale??e.sale,`商品基础金额`),i=a(e.charges),o=n+i.total;if(o>1e11)throw Error(`本行销售额超出支持范围`);return{...t||{},baseSale:n,charges:i.items,chargesTotal:i.total,sale:o}}function s(e,t=0,n=`yuan`){let r=100000000000n;if(!Array.isArray(e)||e.length<1||e.length>60)throw Error(`每单需要1~60行商品`);if(![`yuan`,`cent`].includes(n))throw Error(`整单金额取整方式无效`);if(!Number.isSafeInteger(t)||t<0||BigInt(t)>r)throw Error(`整单优惠须为范围内的非负整数分`);let i=0n;for(let t of e){if(!Number.isSafeInteger(t)||t<0||BigInt(t)>r)throw Error(`商品行金额须为范围内的非负整数分`);i+=BigInt(t)}if(i>r)throw Error(`整单销售合计超出支持范围`);let a=i-BigInt(t);if(a<=0n)throw Error(`优惠后成交额必须大于0`);let o=n===`yuan`?(a+50n)/100n*100n:a;if(o<=0n)throw Error(`整单四舍五入后成交额必须大于0元,请核对销售金额`);if(o>r)throw Error(`整单销售合计超出支持范围`);return{subtotal:Number(i),discount:t,unroundedTotal:Number(a),total:Number(o),rounding_mode:n,rounding_adjustment:Number(o-a)}}function c(e){if(e.unit!==`g`)throw Error(`按金价计算需要填写克重;按件报价请选择直接填金额`);let t=n(e.quantity,3,`克重`);if(t<=0n)throw Error(`克重必须大于0`);let r=n(e.goldPrice,2,`金价`),i=n(e.laborRate,2,`销售工费`);if(![`gram`,`piece`].includes(e.laborMode))throw Error(`请选择克工费或件工费`);let a=1n;if(e.laborMode===`piece`){if(!/^\d+$/.test(String(e.pieces??`1`)))throw Error(`件数须为正整数`);if(a=BigInt(e.pieces??1),a<1n||a>1000000n)throw Error(`件数须为1~1000000的整数`)}let o=(t*r+(e.laborMode===`gram`?t*i:a*i*1000n)+500n)/1000n;if(o>100000000000n)throw Error(`本行销售额超出支持范围`);return{sale:Number(o),goldPrice:Number(r),laborRate:Number(i),laborMode:e.laborMode,pieces:Number(a)}}let l={material:`料费成本`,labor:`进货工费`,accessories:`配件成本`,other:`其他货品成本`};function u(e){if(e!==void 0){if(!e||typeof e!=`object`||Array.isArray(e)||Object.keys(e).some(e=>![`material`,`labor`].includes(e)))throw Error(`料费和进货工费付款人无效`);for(let n of[`material`,`labor`])if(!Object.hasOwn(e,n)||!t(e[n]))throw Error(l[n]+`付款人无效`);return{material:e.material,labor:e.labor}}}function d(e){let t={},n=0,i=!1;for(let[a,o]of Object.entries(l))t[a]=e?.[a]==null||e[a]===``?null:r(e[a],o),t[a]===null?i=!0:n+=t[a];if(n>1e11)throw Error(`货品成本超出支持范围`);return{parts:t,total:i?null:n}}function f(e){let t={...e.costParts},r=(r,i,a,o,s,c)=>{let l=i?.mode||`total`;if(![`gram`,`total`].includes(l))throw Error(s);let u={mode:l};if(l===`gram`){if(e.unit!==`g`)throw Error(c);let s=i?.rate,l=s==null||s===``?null:n(s,2,a);if(u.rate=l===null?null:Number(l),l===null)t[r]=``;else{let i=n(e.quantity,3,`克重`);if(i<=0n)throw Error(`克重必须大于0`);let a=(i*l+500n)/1000n;if(a>100000000000n)throw Error(o+`超出支持范围`);t[r]=`${a/100n}.${String(a%100n).padStart(2,`0`)}`}}return u},a;if(e.costMaterial?.mode===`pool`){if(e.unit!==`g`||i(e.name))throw Error(`日购料成本只支持按克黄金商品`);let n=String(e.costMaterial.poolId??``);if(!/^\d{4}-\d{2}-\d{2}$/.test(n))throw Error(`请选择日购料日期`);a={mode:`pool`,poolId:n};let r=e.materialPool?.amount;t.material=Number.isSafeInteger(r)&&r>=0?(r/100).toFixed(2):``}else a=r(`material`,e.costMaterial,`进货料价`,`料费总成本`,`请选择每克料价或料费总成本`,`每克料价需要克重,按件商品请填写料费总成本`);let o=r(`labor`,e.costLabor,`进货克工费`,`进货总工费`,`请选择进货克工费或总工费`,`进货克工费需要克重,按件商品请填写总工费`);return{...d(t),costMaterial:a,costLabor:o}}function p(e,t,n){for(let r of[e,t,n])if(!Number.isSafeInteger(r)||r<0||r>1e11)throw Error(`日购料金额或克重无效`);if(!t)throw Error(`日购料尚未登记克重`);let r=(BigInt(e)*BigInt(n)+BigInt(t)/2n)/BigInt(t);if(r>100000000000n)throw Error(`日购料成本超出支持范围`);return Number(r)}function m(e,t,{orderId:n=null,allUsages:r=e.usages||[]}={}){let i=e=>Number.isSafeInteger(e)&&e>=0&&e<=1e11;if(!i(e.totalAmount)||!i(e.totalMg)||!Array.isArray(t)||!Array.isArray(e.usages)||!Array.isArray(r))throw Error(`日购料预估记录无效,请刷新料价`);let a=new Set;for(let e of t){if(!Number.isSafeInteger(e.lineIndex)||e.lineIndex<0||a.has(e.lineIndex)||!i(e.mg)||!e.mg)throw Error(`日购料预估克重或商品行无效`);a.add(e.lineIndex)}let o=n?r.filter(e=>e.order_id===n):[],s=e.usages.filter(e=>e.active&&(!n||e.order_id!==n)).map(e=>({...e})),c=s.reduce((e,t)=>e+t.mg,0),l=t.reduce((e,t)=>e+t.mg,0),u=e.totalMg>0&&c+l<=e.totalMg,d=Object.fromEntries(t.map(e=>[e.lineIndex,null]));for(let e of t){let t=o.find(t=>t.line_index===e.lineIndex);s.push({...t,mg:e.mg,previewIndex:e.lineIndex,appended:!t})}for(let e of s)if(!i(e.mg)||!e.mg||!e.appended&&(!Number.isSafeInteger(e.fifo_sequence)||e.fifo_sequence<1||typeof e.created!=`string`||!e.created))throw Error(`日购料耗用顺序尚未读到,请刷新料价`);if(s.sort((e,t)=>Number(!!e.appended)-Number(!!t.appended)||(e.appended?e.previewIndex-t.previewIndex:e.createdt.created?1:e.fifo_sequence-t.fifo_sequence)),u){let t=0,n=0;for(let r of s){t+=r.mg;let i=p(e.totalAmount,e.totalMg,t);r.previewIndex!==void 0&&(d[r.previewIndex]=i-n),n=i}}return{amounts:d,usedMg:c,wantedMg:l,covered:u}}function h(e){let t=n(e.lockedQuantity,3,`锁定克重`),r=n(e.quantity,3,`实际克重`),i=n(e.buyRate,2,`原进货料价`);if(t<=0n||r<=0n)throw Error(`锁定克重和实际克重必须大于0`);if(i<=0n)throw Error(`原进货料价必须大于0`);let a=rt?r-t:0n,s=o?n(e.extraBuyRate,2,`补重进货料价`):0n;if(o&&s<=0n)throw Error(`补重进货料价必须大于0`);let c=(e,t)=>(e*t+500n)/1000n,l=c(t,i),u=c(a,i),d=c(o,s);if([l,u+d].some(e=>e>100000000000n))throw Error(`锁价料费成本超出支持范围`);return{lockedMg:Number(t),finalMg:Number(r),originalUsedMg:Number(a),extraMg:Number(o),leftoverMg:Number(t-a),originalPurchase:Number(l),originalUsedCost:Number(u),extraCost:Number(d),materialCost:Number(u+d),leftoverCost:Number(l-u)}}function g(e){let n=()=>({goods:0,goodsMissing:0,paidFees:0,pendingFees:0,pendingMissing:0,total:0,missing:0}),r={owner:n(),assistant:n(),assistant2:n()},i=[],a=[`returned`,`cancelled`].includes(e.status),o=e=>{if(i.push(e),e.excluded)return;if(!t(e.payer))throw Error(`成本付款人无效`);let a=r[e.payer]||(r[e.payer]=n());e.kind===`goods`&&(e.amount==null?a.goodsMissing++:a.goods+=e.amount),e.kind===`paid`&&(a.paidFees+=e.amount),e.kind===`pending`&&(e.amount==null?a.pendingMissing++:a.pendingFees+=e.amount)};for(let[n,r]of e.lines.entries()){let e=u(r.costPayers),i=r.costParts?Object.entries(l).map(([e,t])=>({key:e,name:t,amount:r.costParts[e]??null})):[{key:`total`,name:`货品成本(原单未分项)`,amount:r.cost??null}];for(let s of i)if(s.key===`material`&&(r.priceLockPool||r.priceLockExtraPool)&&s.amount===null)o({kind:`goods`,component:`material`,name:s.name,source:`锁价料池成本待补`,amount:null,payer:e?.material??r.payer,excluded:a,materialPoolId:(r.priceLockExtraPool?.amount===null?r.priceLockExtraPool:r.priceLockPool||r.priceLockExtraPool).poolId,poolPending:!0,calculation:null});else if(s.key===`material`&&r.costMaterial?.mode===`pool`){let i=r.materialPool,c=i?.allocations;if(s.amount===null||!c?.length)o({kind:`goods`,component:`material`,name:s.name,source:`商品 ${n+1} · ${r.name} · ${r.costMaterial.poolId}日购料待补`,amount:null,payer:e?.material??r.payer,excluded:a,materialPoolId:r.costMaterial.poolId,materialPoolRevision:i?.revision,poolPending:!0,calculation:null});else{if(!Array.isArray(c)||c.some(e=>!t(e.payer)||!Number.isSafeInteger(e.amount)||e.amount<0)||c.reduce((e,t)=>e+t.amount,0)!==s.amount)throw Error(`日购料分项成本记录无效`);for(let e of c)o({kind:`goods`,component:`material`,name:s.name,source:`商品 ${n+1} · ${r.name} · ${r.costMaterial.poolId}日购料`,amount:e.amount,payer:e.payer,excluded:a,materialPoolId:r.costMaterial.poolId,materialPoolRevision:i?.revision,calculation:{rate:i.averageRate,quantity:i.quantity??r.quantity,weighted:!0}})}}else if(s.key===`material`&&r.materialAllocations){let e=r.materialAllocations;if(!Array.isArray(e)||!e.length||e.some(e=>![`original`,`extra`].includes(e.source)||!t(e.payer)||!Number.isSafeInteger(e.amount)||e.amount<0||!Number.isSafeInteger(e.quantity)||e.quantity<=0||!Number.isSafeInteger(e.rate)||e.rate<=0)||e.reduce((e,t)=>e+t.amount,0)!==s.amount)throw Error(`锁价分项料费记录无效`);for(let t of e)o({kind:`goods`,component:`material`,name:s.name,source:`商品 ${n+1} · ${r.name} · ${t.source===`original`?t.weighted?`原锁日料池`:`原锁价采购`:t.weighted?`交付日补重料池`:`补重采购`}`,amount:t.amount,payer:t.payer,excluded:a,priceLockSource:t.source,...t.poolId?{materialPoolId:t.poolId}:{},calculation:{rate:t.rate,quantity:t.quantity,...t.weighted?{weighted:!0}:{}}})}else o({kind:`goods`,name:s.name,source:`商品 ${n+1} · ${r.name}`+(s.key===`labor`&&r.returnedStock?` · 退回现货继承工费`:``),amount:s.amount,payer:e?.[s.key]??r.payer,excluded:a,...s.key===`labor`&&r.returnedStock?{inheritedStockCost:!0,returnedStockId:r.returnedStockId}:{},calculation:s.key===`material`&&r.recovery_id&&r.costMaterial?.rate!==void 0?{rate:r.costMaterial.rate,quantity:r.recoveryMaterialMg}:s.key===`material`&&r.costMaterial?.mode===`gram`?{rate:r.costMaterial.rate,quantity:r.quantity}:s.key===`labor`&&r.costLabor?.mode===`gram`?{rate:r.costLabor.rate,quantity:r.quantity}:null})}let s=new Set((e.corrections||[]).filter(e=>e.type===`expense`).map(e=>e.target));for(let t of e.expenses||[])t.amount>0&&!s.has(t.id)&&o({kind:`paid`,name:t.note,source:t.date,amount:t.amount,payer:t.payer});let c=t=>{let n=e.lines.findIndex(e=>(e.charges||[]).some(e=>`charge:`+e.id===t.key));return n<0?`整单费用`:`商品 ${n+1} · ${e.lines[n].name}`};for(let t of e.pendingFees||[])o({kind:`pending`,name:t.note,source:c(t),amount:t.amount,payer:t.payer});for(let t of e.fee_items||[])t.status===`recorded`&&t.amount===0&&o({kind:`zero`,name:t.note,source:c(t),amount:0,payer:t.payer});let d=n();for(let e of Object.values(r)){e.total=e.goods+e.paidFees+e.pendingFees,e.missing=e.goodsMissing+e.pendingMissing;for(let t of Object.keys(d))d[t]+=e[t]}return{byPayer:r,total:d,rows:i,goodsExcluded:a,pendingCount:(e.pendingFees||[]).length}}let _={calculate:c,cents:r,isSilver:i,costs:d,costLabels:l,costPayers:u,normalizeCostPayers:u,charges:a,sale:o,orderTotal:s,purchaseCosts:f,poolMaterialAmount:p,poolMaterialPreview:m,priceLockCost:h,orderCosts:g};typeof R==`object`&&R.exports?R.exports=_:e.LedgerCalc=_})(typeof globalThis==`object`?globalThis:void 0);var z=R.exports,B={exports:{}};(function(e){let t=e=>[`助理信用卡`,`助理1信用卡`,`麦麦信用卡`,`助理2信用卡`].includes(e);function n(e=6){if(!Number.isSafeInteger(e)||e<0||e>1e3)throw Error(`信用卡手续费率须为0~1000的整数‰`);return e}let r=e=>t(e)?`麦麦信用卡`:e,i=(e=6)=>`信用卡手续费(${n(e)}‰)`,a=e=>e?.system===`credit_card`||String(e?.key||``).startsWith(`card_fee:`);function o(e,t=6){if(!Number.isSafeInteger(e)||e<0||e>1e11)throw Error(`客户付款金额无效`);return Number((BigInt(e)*BigInt(n(t))+500n)/1000n)}let s={isAccount:t,isFee:a,amount:o,rate:n,ratePermille:6,normalizeAccount:r,note:i};typeof B==`object`&&B.exports?B.exports=s:e.CreditCardFees=s})(typeof globalThis==`object`?globalThis:void 0);var V=B.exports,H={"./calculations":z},fe=e=>{if(!Object.prototype.hasOwnProperty.call(H,e))throw Error(`未知依赖 `+e);return H[e]},U={exports:{}};(function(e){let t=typeof U==`object`&&U.exports?fe(`./calculations`):e.LedgerCalc,n={证书:`4`,包装:`3`,快递:`6`},r=e=>({包装盒:`包装`,快递费:`快递`,运费:`快递`})[e]||e;function i(e){let t=String(e||``).trim();return[`快递`,`快递费`,`运费`,`京东快递`,`圆通快递`].includes(t)?`shipping`:[`包装`,`包装盒`,`盒子`].includes(t)||/^盒子(\d+个 × [\d.]+元\/个)$/.test(t)?`box`:[`钢绳`,`钢绳(店里)`,`钢绳(店里)`].includes(t)?`braiding`:[`银链`,`银链(家里)`,`银链(家里)`].includes(t)?`silverChain`:``}function a(e){let t=String(e??``).trim(),n=Number(t);if(!/^\d+$/.test(t)||!Number.isSafeInteger(n)||n<1||n>333333333)throw Error(`盒子数量须为支持范围内的正整数`);return n}let o=Object.freeze({jd:{amount:`8`,payer:`owner`},yt:{amount:`6`,payer:`order`},box:{amount:`3`,payer:`owner`},steel:{amount:`7`,payer:`owner`},silver:{amount:`18`,payer:`owner`}}),s=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9-]{36}$/.test(e),c={jd:`京东快递`,yt:`圆通快递`,box:`盒子`,steel:`钢绳(店里)`,silver:`银链(家里)`};function l(e){return Object.fromEntries(Object.entries(e===void 0?o:e).filter(([e])=>Object.hasOwn(o,e)||/^custom_[a-f0-9-]{36}$/.test(e)).map(([e,t])=>[e,{...o[e],...t}]))}function u(e){return Object.fromEntries(Object.entries(l(e)).map(([e,t])=>[e,{name:c[e]||``,enabled:!0,byQuantity:e===`box`,...t}]))}function d(e){return e!==void 0&&Object.keys(o).some(t=>!Object.hasOwn(e,t))||Object.entries(e||{}).some(([e,t])=>!Object.hasOwn(o,e)||[`name`,`enabled`,`byQuantity`].some(e=>Object.hasOwn(t,e)))}function f(e){return{jd:`shipping`,yt:`shipping`,box:`box`,steel:`braiding`,silver:`other`}[e]||`manual:`+e.slice(7)}function p(e,n,r,i){let o=u(i)[e];if(!o||!o.enabled)throw Error(`成本项目已停用,请重新核对`);let s=o.byQuantity?a(n):1,c=t.cents(String(o.amount),`常用成本`)*s;if(!Number.isSafeInteger(c)||c>1e11)throw Error(`常用成本金额超出支持范围`);return{key:f(e),note:o.byQuantity?`${o.name}(${s}个 × ${o.amount}元/个)`:o.name,amount:(c/100).toFixed(2).replace(/\.00$/,``),payer:o.payer===`order`?r:o.payer,status:`estimated`,edited:!0}}function m(e,n){for(let[r,i]of Object.entries(u(n))){if(!i.enabled||e.key!==f(r))continue;let a=i.byQuantity?String(e.note).match(/(([^)]*)个 × [\d.]+元\/个)$/)?.[1]:`1`;try{let i=p(r,a,e.payer,n);if(i.note===e.note&&i.payer===e.payer&&(e.amount===``||t.cents(String(e.amount))===t.cents(i.amount)))return r}catch{}}return``}function h(e,{recorded:n=!1,presets:r}={}){let i=l(r),o=t=>i[t].payer===`order`?s(e?.payer):e?.payer===i[t].payer;if(!e||e.expense_id&&!n||e.funding)return``;if(d(r))return m(e,r);if(e.key===`shipping`&&e.note===`京东快递`&&Number(e.amount)===Number(i.jd.amount)&&o(`jd`))return`jd`;if(e.key===`shipping`&&e.note===`圆通快递`&&Number(e.amount)===Number(i.yt.amount)&&o(`yt`))return`yt`;if(e.key===`braiding`&&e.note===`钢绳(店里)`&&Number(e.amount)===Number(i.steel.amount)&&o(`steel`))return`steel`;if(e.key===`other`&&e.note===`银链(家里)`&&Number(e.amount)===Number(i.silver.amount)&&o(`silver`))return`silver`;let c=e.key===`box`&&String(e.note).match(/^盒子(([^)]*)个 × ([\d.]+)元\/个)$/);if(c&&Number(c[2])===Number(i.box.amount)&&o(`box`)){if(e.amount===``)return`box`;try{if(t.cents(String(e.amount),`盒子成本`)===a(c[1])*t.cents(String(i.box.amount),`盒子单价`))return`box`}catch{}}return``}function g({shipping:e=``,box:n=!1,quantity:r=`1`,steel:i=!1,silver:o=!1}={},c=`assistant`,u){let d=l(u),f=[],p=e=>d[e].payer===`order`?s(c)?c:`assistant`:d[e].payer,m=(e,n,r,i=1)=>{let a=t.cents(String(d[e].amount),`常用成本`)*i;if(!Number.isSafeInteger(a)||a>1e11)throw Error(`常用成本金额超出支持范围`);f.push({key:n,note:r,amount:(a/100).toFixed(2).replace(/\.00$/,``),payer:p(e),status:`estimated`,edited:!0})};if(e===`jd`?m(`jd`,`shipping`,`京东快递`):e===`yt`&&m(`yt`,`shipping`,`圆通快递`),n){let e=a(r);m(`box`,`box`,`盒子(${e}个 × ${d.box.amount}元/个)`,e)}return i&&m(`steel`,`braiding`,`钢绳(店里)`),o&&m(`silver`,`other`,`银链(家里)`),f}function _(e,t,{addShipping:a=!1,defaultPayer:o=`assistant`,shopDefaults:s={},checkboxCosts:c=!1}={}){let l={证书:s.certificate??n.证书,包装:s.packaging??n.包装,快递:s.shipping??n.快递},u=[`owner`,`assistant`,`assistant2`].includes(s.packagingPayer)||/^staff_[a-f0-9-]{36}$/.test(s.packagingPayer)?s.packagingPayer:`owner`,d=e.map(e=>({...e})),f=[];for(let[e,n]of t.entries())for(let t of n.charges||[]){let n=String(t.name||``).trim();if(!t.id||!n||t.costRemoved===!0)continue;let a=r(n);if(c&&i(n))continue;if(a===`快递`){d.some(e=>e.key===`shipping`)||d.push({key:`shipping`,note:`快递费`,amount:l.快递,payer:o,status:`estimated`,edited:!1});continue}let s=`charge:`+t.id,p=d.findIndex(e=>e.key===s);p<0&&(p=d.findIndex(e=>!e.key.startsWith(`charge:`)&&e.key!==`shipping`&&r(e.note)===a));let m=p<0?null:d.splice(p,1)[0],h=m&&(m.edited||m.sourceName===n||!m.sourceName)?m.amount:l[a]??``,g=!m||!m.edited&&m.sourceName&&r(m.sourceName)!==a?a===`包装`?u:o:m.payer||o;f.push({...m,key:s,note:n,sourceName:n,lineNumber:e+1,amount:h,payer:g,status:m?.status||`estimated`,edited:m?.edited||!1})}let p=new Set(t.flatMap(e=>(e.charges||[]).filter(e=>i(e.name)).map(e=>`charge:`+e.id))),m=d.filter(e=>!e.key.startsWith(`charge:`)||c&&(i(e.sourceName||e.note)||p.has(e.key))),h=t.some(e=>(e.charges||[]).some(e=>e.costRemoved===!0&&r(String(e.name||``).trim())===`快递`));return a&&!c&&!h&&!m.some(e=>e.key===`shipping`)&&m.unshift({key:`shipping`,note:`快递费`,amount:l.快递,payer:o,status:`estimated`,edited:!1}),[...m,...f]}let v={presetCatalog:u,customPresets:d,presetKey:f,presetFee:p,sync:_,defaults:n,normalize:r,checkboxCategory:i,boxCount:a,presetKind:h,presetDefaults:o,presets:l,checkboxFees:g};typeof U==`object`&&U.exports?U.exports=v:e.FeeEstimates=v})(typeof globalThis==`object`?globalThis:void 0);var pe=U.exports,me={"./calculations":z},he=e=>{if(!Object.prototype.hasOwnProperty.call(me,e))throw Error(`未知依赖 `+e);return me[e]},W={exports:{}};(function(e){let t=typeof W==`object`&&W.exports?he(`./calculations`):e.LedgerCalc,n=e=>{let[t,n=``]=e.split(`.`);return(t.replace(/^0+(?=\d)/,``)||`0`)+(n.replace(/0+$/,``)?`.`+n.replace(/0+$/,``):``)},r=e=>e.normalize(`NFKC`).replace(/\\\*/g,`*`).replace(/[×✕xX]/g,`*`).replace(/\s/g,``).replace(/\\+$/,``).replace(/元$/,``),i=`(\\d+(?:\\.\\d+)?)`,a=`((?:\\+\\d+(?:\\.\\d+)?)*)`,o=`(?:=`+i+`)?$`,s=i+`(?:克|g)?\\*`,c=RegExp(`^`+s+`\\(`+i+`\\+`+i+`\\)`+a+o,`i`),l=RegExp(`^`+s+i+`\\+`+i+a+o,`i`),u=e=>t.cents(n(e),`公式金额`);function d(e,{roundingMode:i=`yuan`}={}){if(typeof e!=`string`||e.length>300)throw Error(`每行请填写300字以内的销售公式`);let a=r(e),o=c.exec(a),s=o||l.exec(a);if(!s)throw Error(`请填写“克重×(金价+克工费)+附加费”或“克重×金价+件工费”;可在末尾写=金额`);let[,d,f,p,m,h]=s,g=m?m.slice(1).split(`+`):[];if(g.length>100)throw Error(`每件商品最多100项附加费`);let _={unit:`g`,pricingMode:`auto`,quantity:n(d),goldPrice:n(f),laborMode:o?`gram`:`piece`,laborRate:n(p),pieces:`1`,charges:g.map(e=>({name:`附加费`,amount:n(e)}))},v=t.sale(_),y=t.orderTotal([v.sale],0,i),b=h===void 0?null:u(h);return{formula:a,line:_,subtotal:v.sale,total:y.total,roundingMode:i,roundingAdjustment:y.rounding_adjustment,statedTotal:b,mismatch:b!==null&&b!==y.total}}function f(e,{roundingMode:n=`yuan`}={}){if(typeof e!=`string`||e.length>18e3)throw Error(`请填写18000字以内的公式,每件商品一行`);let i=e.split(/\r\n?|\n/).map(e=>e.trim()).filter(Boolean);if(!i.length||i.length>61)throw Error(`请填写1~60件商品公式,可在最后另写一行合计`);let a=[],o=[],s=null;i.forEach((e,t)=>{let c=r(e).replace(/^(?:合计|总价|总计|总金额):?/,``).match(/^(\d+(?:\.\d+)?(?:\+\d+(?:\.\d+)?)+)(?:=(\d+(?:\.\d+)?))?$/);if(c){if(!a.length||t!==i.length-1)throw Error(`合计公式只能放在全部商品之后的最后一行`);let e=c[1].split(`+`).map(u),n=e.reduce((e,t)=>e+t,0);if(!Number.isSafeInteger(n)||n>1e11)throw Error(`合计金额超出支持范围`);s={amounts:e,sum:n,statedTotal:c[2]===void 0?n:u(c[2])},(e.length!==a.length||e.some((e,t)=>e!==(a[t]?.statedTotal??a[t]?.total)))&&o.push(`合计行的加数与各商品金额不对应,请核对是否漏了一件或重复相加。`),s.statedTotal!==n&&o.push(`合计行左右金额不相等,请核对。`)}else{if(a.length>=60)throw Error(`每单最多60件商品`);let r;try{r=d(e,{roundingMode:n})}catch(e){throw Error(`第`+(t+1)+`行:`+e.message)}a.push(r),r.mismatch&&o.push(`商品 `+a.length+` 写的是 `+(r.statedTotal/100).toFixed(2)+`元,按当前取整规则计算为 `+(r.total/100).toFixed(2)+`元。`)}});let c=t.orderTotal(a.map(e=>e.subtotal),0,n);return s&&s.statedTotal!==c.total&&o.push(`公式合计为 `+(s.statedTotal/100).toFixed(2)+`元;系统先合计各件精确金额,再整单取整,结果为 `+(c.total/100).toFixed(2)+`元。`),{items:a,lines:a.map(e=>e.line),summary:s,subtotal:c.subtotal,total:c.total,roundingMode:n,roundingAdjustment:c.rounding_adjustment,warnings:o,mismatch:o.length>0}}let p={parse:d,parseBatch:f};typeof W==`object`&&W.exports?W.exports=p:e.OrderFormula=p})(typeof globalThis==`object`?globalThis:void 0);var ge=W.exports,_e={"./fee-estimates":pe,"./credit-card-fees":V},ve=e=>{if(!Object.prototype.hasOwnProperty.call(_e,e))throw Error(`未知依赖 `+e);return _e[e]},G={exports:{}};(function(e,t){let n=t(typeof G==`object`&&G.exports?ve(`./fee-estimates`):e.FeeEstimates,typeof G==`object`&&G.exports?ve(`./credit-card-fees`):e.CreditCardFees);typeof G==`object`&&G.exports?G.exports=n:e.OrderTemplates=n})(typeof globalThis==`object`?globalThis:void 0,function(e,t){let n=[`足金999`,`足银999`,`纯银925`],r=[`编绳`,`证书`,`包装`,`快递`,`附加费`],i=[``,`现货`,`金料`,`找金`,`回收旧料`,`君宝汇`],a=[`助理2微信`,`助理2支付宝`,`助理2现金`,`助理2信用卡`,`助理微信`,`助理支付宝`,`助理现金`,`助理信用卡`,`麦麦微信`,`麦麦支付宝`,`麦麦现金`,`麦麦信用卡`],o=e=>t?.normalizeAccount?t.normalizeAccount(e):[`助理信用卡`,`助理1信用卡`,`助理2信用卡`,`麦麦信用卡`].includes(e)?`麦麦信用卡`:e,s=e=>e?.system===`credit_card`||String(e?.key||``).startsWith(`card_fee:`),c=/^[a-f0-9-]{36}$/;function l(e,t){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(t+`格式无效`);return e}function u(e,t,n=100){if(e!=null&&![`string`,`number`].includes(typeof e))throw Error(t+`格式无效`);let r=String(e??``).trim();if(r.length>n)throw Error(t+`最多填写`+n+`字`);return r}function d(e,t,n,r){let i=e??r;if(!t.includes(i))throw Error(n+`无效`);return i}function f(e,t,n=2){let r=u(e,t,24);if(!r)return``;if(!RegExp(`^\\d+(?:\\.\\d{1,`+n+`})?$`).test(r))throw Error(t+`须为非负数字,最多`+n+`位小数`);let[i,a=``]=r.split(`.`);if(BigInt(i)*10n**BigInt(n)+BigInt(a.padEnd(n,`0`))>100000000000n)throw Error(t+`超出支持范围`);return r}function p(e,t){let n=u(e,t,12);if(n&&!/^\d+$/.test(n))throw Error(t+`须为非负整数`);if(Number(n)>1e9)throw Error(t+`超出支持范围`);return n}let m=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(e);function h(e,t=`owner`){let n=e??t;if(n!==``&&!m(n))throw Error(`成本付款人无效`);return n}function g(e){let t=o(e??`助理微信`);if(!a.includes(t)&&!/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(微信|支付宝|现金)$/.test(t))throw Error(`收款账户无效`);return t}function _(e={},t={}){return l(e,`备用料费`),{mode:d(e.mode,[`gram`,`total`],`备用料费方式`,t.mode||`gram`),rate:f(e.rate??t.rate,`备用进货料价`),total:f(e.total??t.total,`备用料费合计`),originalTotal:``,payer:h(e.payer,t.payer??`owner`)}}function v(t,{newId:a=()=>globalThis.crypto.randomUUID(),pocketKeys:o=i}={}){if(l(t,`开单预设`),!Array.isArray(t.lines)||!t.lines.length||t.lines.length>60)throw Error(`模板需要1~60行商品`);let m=new Map,v=new Set,y=t.lines.map(e=>{let t=l(e,`模板商品`),i=d(t.unit,[`g`,`件`],`商品单位`,`g`),s=u(t.name,`商品名称`,60),g=d(t.nameType,[...n,`其他`],`商品名称`,n.includes(s)?s:s?`其他`:`足金999`),y={nameType:g,customName:u(t.customName??(g===`其他`?s:``),`其他商品名称`,60),unit:i,quantity:i===`g`?f(t.quantity,`商品克重`,3):p(t.quantity,`商品件数`),pocket:i===`件`||[`足银999`,`纯银925`].includes(g)?``:d(t.pocket,[``,...o],`出库货盘`,g===`足金999`?`现货`:``),payer:h(t.payer,`owner`),pricingMode:i===`件`?`manual`:d(t.pricingMode,[`auto`,`manual`],`计价方式`,t.sale==null?`auto`:`manual`),goldPrice:f(t.goldPrice,`销售金价`),laborMode:d(t.laborMode,[`gram`,`piece`],`销售工费方式`,`gram`),laborRate:f(t.laborRate,`销售工费`),pieces:p(t.pieces??`1`,`计工费件数`),priceNote:u(t.priceNote,`销售单价说明`,100),sale:f(t.sale,`本行销售额`),baseSale:f(t.baseSale??t.sale,`商品基础金额`)};if(y.name=g===`其他`?y.customName:g,t.stockCount!=null&&String(t.stockCount).trim()!==``&&(y.stockCount=p(t.stockCount,`出库数量(对)`),Number(y.stockCount)<1))throw Error(`出库数量(对)须为正整数,一对填1`);let b=t.charges??[];if(!Array.isArray(b)||b.length>100)throw Error(`每行最多填写100项附加项目`);if(y.charges=b.map(e=>{let t=l(e,`附加项目`),n=u(t.id,`附加项目标识`,36);if(n&&(!c.test(n)||v.has(n)))throw Error(`附加项目标识无效或重复`);n&&v.add(n);let i=u(t.name,`附加项目名称`,40),o=d(t.nameType,[...r,`其他`],`附加项目`,r.includes(i)?i:i?`其他`:`编绳`);if(t.costRemoved!==void 0&&typeof t.costRemoved!=`boolean`)throw Error(`内部成本移除标记无效`);let s=a();n&&m.set(n,s);let p=u(t.customName??(o===`其他`?i:``),`附加项目名称`,40),h=f(t.amount,`附加金额`),g={};if(t.chargePrices!=null){l(t.chargePrices,`附加项目预设报价`);for(let e of[...r,`其他`])Object.hasOwn(t.chargePrices,e)&&(g[e]=f(t.chargePrices[e],`附加项目报价`))}return{id:s,nameType:o,customName:p,name:o===`其他`?p:o,amount:h,chargePrices:{...g,[o]:h},...t.costRemoved===!0?{costRemoved:!0}:{}}}),t.costParts!=null){l(t.costParts,`分项成本`);let e=Object.fromEntries([`material`,`labor`,`accessories`,`other`].map(e=>[e,f(t.costParts[e],`货品成本`)])),n=l(t.costMaterial??{},`料费方式`),r=l(t.costLabor??{},`进货工费方式`),a=d(n.mode,[`gram`,`total`,`pool`],`进货料费方式`,i===`g`&&e.material===``?`gram`:`total`);if(y.costParts=e,y.costPayers={material:h(t.costPayers?.material,y.payer),labor:h(t.costPayers?.labor,y.payer)},y.costMaterial={mode:i===`件`?`total`:a,...a===`gram`?{rate:f(n.rate,`进货料价`)}:{}},y.costLabor={mode:i===`件`?`total`:d(r.mode,[`gram`,`total`],`进货工费方式`,`total`),rate:f(r.rate,`进货克工费`)},y.costMaterial.mode===`pool`){if([`足银999`,`纯银925`].includes(g))throw Error(`银饰模板请手动填写料费`);e.material=``,y.materialPoolDraft={defaultDate:!0,manual:_(t.materialPoolDraft?.manual)}}else if(t.costMaterialDraft){let r=_(t.costMaterialDraft,{mode:y.costMaterial.mode,rate:n.rate,total:e.material,payer:y.costPayers.material});y.costMaterialDraft={mode:r.mode,rate:r.rate,total:r.total,originalTotal:``}}}else Object.hasOwn(t,`cost`)&&(y.cost=f(t.cost,`货品成本`));return y}),b=t.fee_items??[];if(!Array.isArray(b)||b.length>6100)throw Error(`模板费用项目过多`);let x=new Set(b.filter(s).map(e=>e.expense_id).filter(Boolean)),S=new Set,C=b.map(t=>{let n=l(t,`模板费用`);if(s(n)||n.expense_id&&x.has(n.expense_id))return null;if(e.presetKind(n)===`box`&&(e.boxCount(n.note.match(/(([^)]*)个 ×/)[1]),n.amount===``))throw Error(`请先填写正整数的盒子数量`);let r=u(n.key,`费用标识`,80);if(![`shipping`,`box`,`certificate`,`braiding`,`sticker`,`other`].includes(r)&&!/^(charge|manual):[a-f0-9-]{36}$/.test(r))throw Error(`模板费用项目无效`);if(S.has(r))throw Error(`模板费用项目不能重复`);S.add(r);let i=r.startsWith(`charge:`)?m.get(r.slice(7)):null;return r.startsWith(`charge:`)&&!i?null:{key:i?`charge:`+i:r===`shipping`||e.presetKind(n)?r:`manual:`+a(),note:u(n.note,`费用名称`,150),amount:f(n.amount,`实际费用`),payer:h(n.payer,`assistant`),status:`estimated`,edited:n.edited!==!1,...i?{sourceName:u(n.sourceName||n.note,`附加项目名称`,40)}:{}}}).filter(Boolean),w={salesperson:u(t.salesperson,`开单人`,30),payment_account:g(t.payment_account),credit_card_fee_payer:h(t.credit_card_fee_payer,`owner`),discount:f(t.discount??`0`,`整单优惠`),note:u(t.note,`客户单备注`,240),fee_auto_initialized:!0,...t.fee_cost_mode===`checkboxes`?{fee_cost_mode:`checkboxes`}:{},lines:y,fee_items:e.sync(C,y,{checkboxCosts:t.fee_cost_mode===`checkboxes`})};if(JSON.stringify(w).length>24e4)throw Error(`模板内容过大,请减少商品或附加项目`);return w}function y(e,{today:t,salesperson:n=``,newId:r,pocketKeys:i}={}){if(!/^\d{4}-\d{2}-\d{2}$/.test(t||``)||!Number.isFinite(Date.parse(t+`T00:00:00Z`))||new Date(t+`T00:00:00Z`).toISOString().slice(0,10)!==t)throw Error(`未取得有效系统日期,请刷新后再套用模板。`);let a=v({...e,fee_cost_mode:`checkboxes`},{newId:r,pocketKeys:i});for(let e of a.lines)e.costMaterial?.mode===`pool`&&(e.costMaterial={mode:`pool`,poolId:t},e.materialPoolDraft={...e.materialPoolDraft,poolId:t,defaultDate:!0});return{...a,date:t,fees_date:t,customer:``,salesperson:a.salesperson||n,rounding_mode:`yuan`}}return{fromDraft:v,apply:y}});var ye=G.exports,be={"./fee-estimates":pe,"./credit-card-fees":V},xe=e=>{if(!Object.prototype.hasOwnProperty.call(be,e))throw Error(`未知依赖 `+e);return be[e]},K={exports:{}};(function(e,t){let n=t(typeof K==`object`&&K.exports?xe(`./fee-estimates`):e.FeeEstimates,typeof K==`object`&&K.exports?xe(`./credit-card-fees`):e.CreditCardFees);typeof K==`object`&&K.exports?K.exports=n:e.OrderCopy=n})(typeof globalThis==`object`?globalThis:void 0,function(e,t){let n=e=>e==null?``:(e/100).toFixed(2),r=e=>e!=null&&String(e).trim()!==``,i=e=>t?.normalizeAccount?t.normalizeAccount(e):[`助理信用卡`,`助理1信用卡`,`助理2信用卡`,`麦麦信用卡`].includes(e)?`麦麦信用卡`:e,a=e=>e?.system===`credit_card`||String(e?.key||``).startsWith(`card_fee:`);function o(e){return{...e,rounding_mode:e.rounding_mode||`cent`,discount:n(e.discount),fee_items:(e.fee_items||[]).map(e=>({...e,amount:n(e.amount)})),lines:e.lines.map(e=>({...e,quantity:e.unit===`g`?(e.quantity/1e3).toFixed(3):e.quantity,sale:n(e.sale),baseSale:n(e.baseSale??e.sale),cost:n(e.cost),costMaterial:e.costMaterial?.mode===`pool`?{...e.costMaterial}:{mode:e.costMaterial?.mode||((e.unit||`g`)===`g`&&e.costParts?.material==null?`gram`:`total`),...e.costMaterial?.mode===`gram`?{rate:n(e.costMaterial.rate)}:{}},costLabor:{mode:e.costLabor?.mode||`total`,rate:n(e.costLabor?.rate)},charges:(e.charges||[]).map(e=>({...e,amount:n(e.amount)})),...e.pricingMode===`auto`?{goldPrice:n(e.goldPrice),laborRate:n(e.laborRate)}:{},...e.costParts?{costParts:Object.fromEntries(Object.entries(e.costParts).map(([e,t])=>[e,n(t)]))}:{}}))}}function s(t,r,i,o){let s=new Set((t.corrections||[]).filter(e=>e.type===`expense`).map(e=>e.target)),c=new Set(t.fee_items.filter(a).map(e=>e.expense_id).filter(Boolean)),l=t.expenses.filter(e=>e.amount>0&&!String(e.note||``).startsWith(`更正冲回:`)&&!a(e)&&!c.has(e.id)),u=l.filter(e=>!s.has(e.id)),d=new Set,f=new Set,p=[],m=new Set((t.pendingFees||[]).map(e=>e.key)),h=(t,n)=>t.amount===n.amount&&t.payer===n.payer&&e.normalize(t.note)===e.normalize(n.note);for(let e of t.fee_items){if(a(e)||e.expense_id&&c.has(e.expense_id))continue;let t=i.get(String(e.key).replace(/^charge:/,``)),r=t?`charge:`+t:e.key===`shipping`?`shipping`:`manual:`+o(),u=e.amount,g=e.payer;if(e.status!==`estimated`&&!m.has(e.key)){let t=l.find(t=>!d.has(t.id)&&h(t,e));t?(d.add(t.id),s.has(t.id)?u=0:f.add(t.id)):u=0}p.push({key:r,note:e.note,amount:n(u),payer:g,status:`estimated`,edited:!0,...t?{sourceName:e.sourceName||e.note}:{}})}for(let t of u){if(f.has(t.id))continue;let r=e.normalize(t.note)===`快递`&&!p.some(e=>e.key===`shipping`)?`shipping`:`manual:`+o();p.push({key:r,note:t.note,amount:n(t.amount),payer:t.payer,status:`estimated`,edited:!0})}let g=[`delivered`,`returned`,`cancelled`].includes(t.status);for(let[t,n]of r.entries())for(let r of n.charges){if(r.costRemoved===!0)continue;let n=e.normalize(r.name)===`快递`,i=n?`shipping`:`charge:`+r.id;if(p.some(e=>e.key===i))continue;let a=p.find(t=>t.key.startsWith(`manual:`)&&e.normalize(t.note)===e.normalize(r.name));a?a.key=i:p.push({key:i,note:n?`快递费`:r.name,amount:g?`0.00`:``,payer:e.normalize(r.name)===`包装`?`owner`:`assistant`,status:`estimated`,edited:!0}),n||Object.assign(p.find(e=>e.key===i),{sourceName:r.name,lineNumber:t+1})}return e.sync(p,r)}function c(e,{today:t,newId:n=()=>globalThis.crypto.randomUUID()}={}){if(!/^\d{4}-\d{2}-\d{2}$/.test(t||``))throw Error(`未取得系统日期,请刷新后再复制。`);if(!e||!Array.isArray(e.lines)||!Array.isArray(e.fee_items)||!Array.isArray(e.expenses))throw Error(`订单详情未完整返回,请重新读取后再复制。`);let r=o(e),a=new Map,c=!!e.price_lock_id||e.lines.some(e=>e.materialAllocations?.length),l=r.lines.map(r=>{let i=Object.fromEntries([`name`,`nameType`,`customName`,`unit`,`quantity`,`pocket`,`stockCount`,`payer`,`pricingMode`,`goldPrice`,`laborMode`,`laborRate`,`pieces`,`priceNote`,`sale`,`baseSale`].filter(e=>Object.hasOwn(r,e)).map(e=>[e,r[e]]));if(i.charges=r.charges.map(e=>{let t=n();return e.id&&a.set(e.id,t),{id:t,name:e.name,amount:e.amount,...e.costRemoved===!0?{costRemoved:!0}:{}}}),r.costParts){if(i.costParts={...r.costParts},i.costMaterial={...r.costMaterial},i.costLabor={...r.costLabor},i.costPayers={material:r.costPayers?.material??r.payer??`owner`,labor:r.costPayers?.labor??r.payer??`owner`},r.costMaterial?.mode===`pool`){let n=r.costMaterial.poolId===e.date,a=n?t:r.costMaterial.poolId;i.costMaterial={mode:`pool`,poolId:a},i.costParts.material=``,i.materialPoolDraft={poolId:a,defaultDate:n,manual:{mode:`gram`,rate:``,total:``,originalTotal:``,payer:i.costPayers.material}}}c&&(i.costParts.material=``,i.costMaterial={mode:`total`},i.costPayers.material=``,delete i.materialPoolDraft)}else i.cost=r.cost;return i});return{date:t,fees_date:t,customer:``,salesperson:r.salesperson||``,payment_account:i(r.payment_account||`助理微信`),discount:r.discount,note:c?String(r.note||``).replace(/;?锁价单 [^;]*;按原锁定金价 [^;]*元\/克结算$/,``):r.note||``,rounding_mode:`yuan`,copy_kind:c?`price-lock`:`ordinary`,fee_auto_initialized:!0,lines:l,fee_items:s(e,l,a,n)}}function l(e,{today:t,salesperson:n}={}){return!e||typeof e!=`object`||!Array.isArray(e.lines)?!!e:e.id||e.copy_kind||r(e.customer)||r(e.note)||r(e.internal_note)||Number(e.discount)||e.date&&t&&e.date!==t||e.salesperson&&n&&e.salesperson!==n||e.payment_account&&e.payment_account!==`助理微信`||(e.fee_items||[]).some(e=>e.key!==`shipping`||e.edited||e.status!==`estimated`||Number(e.amount)!==6||e.payer!==`assistant`)?!0:e.lines.length!==1||e.lines.some(e=>e.charges?.length||e.name&&e.name!==`足金999`||e.customName||e.unit&&e.unit!==`g`||e.pocket!=null&&e.pocket!==`现货`||e.payer&&e.payer!==`owner`||e.costMaterial?.mode===`pool`||[`quantity`,`stockCount`,`sale`,`baseSale`,`goldPrice`,`laborRate`,`priceNote`,`cost`].some(t=>r(e[t]))||[`material`,`labor`].some(t=>r(e.costParts?.[t])||r(e[t===`material`?`costMaterial`:`costLabor`]?.rate)||e.costPayers?.[t]&&e.costPayers[t]!==`owner`)?!0:[`accessories`,`other`].some(t=>Number(e.costParts?.[t])))}return{inputs:o,fromOrder:c,hasDraftContent:l}});var Se=K.exports,Ce={"./calculations":z,"./fee-estimates":pe,"./credit-card-fees":V},we=e=>{if(!Object.prototype.hasOwnProperty.call(Ce,e))throw Error(`未知依赖 `+e);return Ce[e]},Te={exports:{}};(function(e,t){let n=typeof Te==`object`&&Te.exports,r=t(n?we(`./calculations`):e.LedgerCalc,n?we(`./fee-estimates`):e.FeeEstimates,n?we(`./credit-card-fees`):e.CreditCardFees);n?Te.exports=r:e.OrderEntryModel=r})(typeof globalThis==`object`?globalThis:void 0,function(e,t,n){let r=[`足金999`,`足银999`,`纯银925`],i=[`编绳`,`证书`,`包装`,`快递`,`附加费`],a={编绳:`55`,证书:`10`,包装:`10`,快递:`8`},o={shipping:`快递费`,box:`包装盒`,certificate:`证书`,braiding:`编绳`,sticker:`手机贴`,other:`其他直接费用`},s=[{member:`owner`,label:`麦麦`},{member:`assistant`,label:`娜娜`},{member:`assistant2`,label:`小昊`}],c=[`现货`,`金料`,`找金`,`回收旧料`,`君宝汇`],l={jd:`shipping`,yt:`shipping`,box:`box`,steel:`braiding`,silver:`silverChain`},u=e=>e===void 0?void 0:JSON.parse(JSON.stringify(e)),d=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f=e=>e==null?`待补`:(e/100).toLocaleString(`zh-CN`,{minimumFractionDigits:2,maximumFractionDigits:2}),p=e=>(e/1e3).toFixed(3);function m(e,t){return e==null?`待补`:`¥`+(t===`yuan`?(e/100).toLocaleString(`zh-CN`,{minimumFractionDigits:0,maximumFractionDigits:0}):f(e))}function h(e){if(e.rounding_mode!==`yuan`)return`保留原单金额,精确到分。`;let t=e.rounding_adjustment;return`四舍五入到元`+(t?` · 优惠后 ¥`+f(e.unroundedTotal)+` → `+m(e.total,`yuan`)+`(差额 `+(t>0?`+`:`-`)+f(Math.abs(t))+`元)`:``)}function g(e){return(e?.members?.length?e.members:e?.shopSettings?.members?.length?e.shopSettings.members:s).filter(e=>e&&typeof e.member==`string`)}let _=e=>g(e).map(e=>e.member),v=(e,t)=>g(e).find(e=>e.member===t)?.enabled!==!1&&_(e).includes(t),y=e=>_(e).filter(t=>v(e,t)),b=e=>!!(e?.user?.member||e?.members?.some(e=>e.member===`assistant2`)),x=(e,t)=>e?.user?.member||t?.user?.member||(e?.user?.role===`owner`?`owner`:`assistant`);function S(e,t,n){return e?.shopSettings?.members?.find(e=>e.member===t)?.label||e?.members?.find(e=>e.member===t)?.label||n?.loginOptions?.find(e=>e.member===t)?.label||{owner:`麦麦`,assistant:`娜娜`,assistant2:`小昊`}[t]||`待确认`}function C(e,t=!1,{selected:n=``}={}){let r=y(e).filter(t=>b(e)||t!==`assistant2`);t&&(r=[...r.filter(e=>e!==`owner`),...r.filter(e=>e===`owner`)]);let i=r.map(t=>[t,S(e,t)]);return n&&_(e).includes(n)&&!r.includes(n)&&i.push([n,S(e,n)+`(已停用 · 原记录)`]),i}function w(e,t){let n=e?.user||t?.user,r=x(e,t);return e?.shopSettings?.members?.find(e=>e.member===r)?.operatorName||n?.operatorName||e?.shopSettings?.members?.find(e=>e.member===r)?.label||e?.members?.find(e=>e.member===r)?.label||n?.label||n?.name||``}let T=e=>({certificate:`4`,packaging:`3`,shipping:`6`,packagingPayer:`owner`,...e?.shopSettings?.feeDefaults}),E=e=>t.presets(e?.shopSettings?.costPresets),D=e=>e?.shopSettings?.creditCardRatePermille??6,O=e=>!!e?.accounts?.includes(`麦麦信用卡`),k=e=>({owner:`麦麦`,assistant:`助理`,assistant2:`助理2`})[e]||e;function A(e,t){let n=String(t??``);for(let t of _(e)){let e=t===`assistant`?[`助理`,`助理1`]:[k(t)];for(let r of e)if(n===r)return{member:t,prefix:r,channel:``};else if(n.startsWith(r)&&[`微信`,`支付宝`,`现金`,`信用卡`].includes(n.slice(r.length)))return{member:t,prefix:r,channel:n.slice(r.length)}}return null}let j=e=>Array.isArray(e?.pockets)?e.pockets:c,M=(e,t)=>e?.pocketCatalog?.find(e=>e.key===t)?.name||String(t??``),N=(e,t)=>!!t&&e?.pocketCatalog?.some(e=>e.key===t&&e.countUnit===`pair`)===!0;function ee(e,t=``,n=!1){let r=j(e),i=r.map(t=>[t,M(e,t)]);return t&&!r.includes(t)&&i.push([t,M(e,t)+(n?`(已停用 · 原货盘)`:`(已停用,请重新选择)`),!0]),[[``,`外配/不扣黄金`],...i]}function te(e,{optional:t=!1,title:n=`库存数量(对)`}={}){let r=String(e??``).trim();if(!r&&t)return null;if(!/^\d+$/.test(r)||!Number.isSafeInteger(Number(r))||Number(r)>1e9||Number(r)<1)throw Error(n+`请填写大于0的整数,一对填1。`);return Number(r)}let P=e=>n.normalizeAccount(e);function F(e={},t){let n=e.nameType||(i.includes(e.name)?e.name:e.name?`其他`:`编绳`),r=d(e,`amount`)?e.amount??``:a[n]??``;return{id:e.id||t(),type:n,customName:e.customName??(n===`其他`?e.name:``),amount:String(r),prices:{...e.chargePrices,[n]:String(r)},...e.costRemoved===!0?{costRemoved:!0}:{}}}function ne(e,t){if(t===e.type)return e;let n={...e.prices,[e.type]:e.amount},r=d(n,t)?n[t]:a[t]??``;return{...e,type:t,amount:r,prices:{...n,[t]:r}}}let re=(e,t)=>({...e,amount:t,prices:{...e.prices,[e.type]:t}}),ie=e=>e.type===`其他`?e.customName:e.type,I=e=>({id:e.id,nameType:e.type,customName:e.customName,name:ie(e),amount:e.amount,chargePrices:{...e.prices},...e.costRemoved===!0?{costRemoved:!0}:{}});function ae(e){if([`gram`,`total`].includes(e.costMaterial?.mode))return e.costMaterial;let t=e.costParts?.material,n=t!=null&&String(t).trim()!==``;return{mode:(e.unit||`g`)===`g`&&!n?`gram`:`total`}}function oe(e,t){let n=e.materialPoolDraft?.manual;if(e.costMaterial?.mode===`pool`)return{mode:n?.mode||(t===`g`?`gram`:`total`),rate:n?.rate??``,total:n?.total??``,originalTotal:n?.originalTotal??``,payer:n?.payer||`owner`};let r=[`gram`,`total`].includes(e.costMaterial?.mode)?e.costMaterial.mode:t===`g`&&e.costParts?.material==null?`gram`:`total`;return{mode:e.costMaterialDraft?.mode||r,rate:e.costMaterial?.rate??e.costMaterialDraft?.rate??``,total:e.costMaterialDraft?.total??(r===`total`?e.costParts?.material??``:``),originalTotal:e.costMaterialDraft?.originalTotal??(r===`total`?e.costParts?.material??``:``),payer:e.costPayers?.material??e.payer??`owner`}}let L=e=>e==null?``:String(e);function se(e={},t){let{st:n}=t,i=e;i.name||i.quantity||i.sale||i.cost||i.costParts||i.pricingMode||(i={...i,cost:void 0,sale:void 0});let a=i.nameType||(r.includes(i.name)?i.name:i.name?`其他`:`足金999`),o=i.costParts==null&&i.cost!==void 0,s=i.unit||`g`,c=i.pocket??(a===`足金999`?`现货`:``),l=t.member??x(n),d={legacy:o,historicalPocket:!!t.historicalPocket,countOriginalPocket:t.historicalPocket&&i.pocket||``,countOriginalQuantity:t.historicalPocket?L(i.quantity):``,countHistoricalUnknown:!!t.historicalPocket&&i.stockCount==null,nameType:a,customName:L(i.customName??(a===`其他`?i.name:``)),pricingMode:i.pricingMode||(i.sale===void 0?`auto`:`manual`),unit:s,quantity:L(i.quantity),goldPrice:L(i.goldPrice),laborMode:i.laborMode||`gram`,laborRate:L(i.laborRate),pieces:L(i.pieces??`1`),priceNote:i.priceNote||``,baseSale:L(i.baseSale??i.sale),sale:L(i.sale),pocket:c,stockCount:L(i.stockCount),payer:o?i.payer||`owner`:i.payer??`owner`,charges:(i.charges||[]).map(e=>F(e,t.uuid)),cost:o?L(i.cost):``,purchase:null,pool:null,view:{calculation:``,materialFormula:``,laborFormula:``,materialOriginal:``,poolNote:``}};if(o)return d;let f=i.costParts||{material:``,labor:``,accessories:`0`,other:`0`},p=ae(i),m=i.costMaterialDraft||{},h=b(n)?l:`owner`,g={material:i.costPayers?.material??i.payer??h,labor:i.costPayers?.labor??i.payer??h};if(i.costMaterial?.mode===`pool`){let e=oe(i,s);f={...f,material:e.total},p={mode:e.mode,rate:e.rate},m={mode:e.mode,rate:e.rate,total:e.total,originalTotal:e.originalTotal},g={...g,material:e.payer}}let v=i.costLabor||{},y=s===`g`&&p.mode||`total`,S=_(n);d.purchase={materialMode:y,materialRate:L(p.rate??m.rate),material:L(f.material),materialPayer:S.includes(g.material)?g.material:``,laborMode:v.mode||`total`,laborRate:L(v.rate),labor:L(f.labor),laborPayer:S.includes(g.labor)?g.labor:``,accessories:L(f.accessories),other:L(f.other),dataMode:y,preferredMode:m.mode||p.mode||`total`,dataUnit:s,total:L(m.total??(y===`total`?f.material??``:``)),originalTotal:L(m.originalTotal??(y===`total`?f.material??``:``)),...i.costFundings?{costFundings:u(i.costFundings)}:{}};let C=i.materialPoolDraft||{},w=i.costMaterial?.poolId||C.poolId||``;return d.pool={source:i.costMaterial?.mode===`pool`?`pool`:`manual`,poolId:w,dataPoolId:w,dataSource:`manual`,preferredSource:i.costMaterial?.mode===`pool`?`pool`:`manual`,defaultDate:!(C.defaultDate===!1||w&&!C.defaultDate),manual:oe(i,s),allowed:!0,preview:null,options:[]},d}function ce(e,t,n){let r={...e,[t]:n};return t===`nameType`&&[`足银999`,`纯银925`].includes(n)&&(r.pocket=``),t===`unit`&&n===`件`&&(r.pricingMode=`manual`,r.pocket=``),r}function le(e,t,n){return{...e,purchase:{...e.purchase,[t]:n}}}function ue(e,t){return{...e,pool:{...e.pool,source:t}}}function de(e){let t=e.purchase;return{mode:t.preferredMode||t.materialMode,rate:t.materialRate,total:t.materialMode===`total`?t.material:t.total,originalTotal:t.originalTotal,payer:t.materialPayer}}function R(e){let t=e.purchase,n=t.materialMode,r={costParts:{material:t.material,labor:t.labor,accessories:t.accessories,other:t.other},costPayers:{material:t.materialPayer,labor:t.laborPayer},costMaterial:{mode:n,...n===`gram`?{rate:t.materialRate}:{}},costMaterialDraft:{mode:t.preferredMode,rate:t.materialRate,total:n===`total`?t.material:t.total,originalTotal:t.originalTotal},costLabor:{mode:t.laborMode,...t.laborMode===`gram`?{rate:t.laborRate}:{}},...t.costFundings?{costFundings:{labor:u(t.costFundings.labor)}}:{}},i=e.pool;if(!i)return r;let a=i.source===`pool`||i.dataSource===`pool`?i.manual:de(e),o=i.poolId||i.dataPoolId;return r.materialPoolDraft={poolId:o,defaultDate:i.defaultDate,manual:{...a}},i.source===`pool`&&(r.costMaterial={mode:`pool`,poolId:o},r.costMaterialDraft={mode:a.mode,rate:a.rate,total:a.total,originalTotal:a.originalTotal},r.costPayers.material=a.payer,r.materialPool=u(i.preview)||{poolId:o,date:o,status:`pending`,amount:null}),r}function z(e,t){let n={nameType:e.nameType,customName:e.customName,pricingMode:e.pricingMode,unit:e.unit,quantity:e.quantity,goldPrice:e.goldPrice,laborMode:e.laborMode,laborRate:e.laborRate,pieces:e.pieces,priceNote:e.priceNote,baseSale:e.baseSale,sale:e.sale,pocket:e.pocket,stockCount:e.stockCount,payer:e.payer,...e.legacy?{cost:e.cost}:{}};return n.charges=e.charges.map(I),n.name=n.nameType===`其他`?n.customName:n.nameType,!N(t,n.pocket)||n.unit!==`g`?delete n.stockCount:String(n.stockCount??``).trim()===``&&(n.stockCount=null),e.legacy||Object.assign(n,R(e)),n}function B(e){let t=String(e??``).trim();if(!/^\d+(?:\.\d{1,3})?$/.test(t))return null;let[n,r=``]=t.split(`.`),i=BigInt(n)*1000n+BigInt(r.padEnd(3,`0`));return i>0n&&i<=100000000000n?Number(i):null}let V=e=>!!e&&d(e,`personalPools`),H=e=>e?.rolling?.enabled===!0?e.rolling:null;function fe(e){let t=e?.rows||[];return e?.rolling?.enabled&&e.current?[e.current,...t.filter(t=>t.id!==e.current.id)]:t}function U(e,t,n,{orderId:r=``,member:i}={}){let a=fe(e),o=H(e),s=a.map(e=>{if(!V(e))return{...e,availableMg:r?Math.max(0,e.totalMg-(e.usages||[]).filter(e=>e.active&&e.order_id!==r).reduce((e,t)=>e+t.mg,0)):e.remainingMg};let t=r?(e.usages||[]).filter(e=>e.active&&e.order_id===r).flatMap(e=>e.materialSources||[{kind:`public`,quantity:e.mg}]).filter(e=>e.kind===`public`||e.member===i).reduce((e,t)=>e+t.quantity,0):0;return{...e,availableMg:e.remainingMg+(e.personalPools[i]?.remainingMg||0)+t}}),c=e=>({id:e,date:e,totalMg:0,usedMg:0,remainingMg:0,availableMg:0,status:`pending`});if(o&&t>=o.cutover)return[s.find(e=>e.id===t)||c(t)];let l=new Map(s.filter(e=>e.date<=t&&(e.availableMg>0||e.id===n||e.date===t||r&&e.usages?.some(e=>e.active&&e.order_id===r))).map(e=>[e.id,e]));return t&&!l.has(t)&&l.set(t,c(t)),n&&n<=t&&!l.has(n)&&l.set(n,c(n)),[...l.values()].sort((e,t)=>t.date.localeCompare(e.date))}function pe(e,t){return e.date+(t?` · 统一料价`:``)+` · `+(V(e)?`可用 ${p(e.availableMg??e.remainingMg)}g(个人回收料+公共)`:e.totalMg?`余 ${p(e.availableMg??e.remainingMg)}g`:`待补采购`)+(e.totalMg&&e.status===`pending`?` · 待补采购`:``)}function me(t,n){let r=[];return t.lines.forEach((i,a)=>{if(!i.pool||i.unit!==`g`||e.isSilver(i.nameType)||i.pool.source!==`pool`)return;let o=i.pool.poolId||i.pool.dataPoolId,s=H(n.materialPools);(s&&t.date>=s.cutover||i.pool.defaultDate||!o||o>t.date)&&(o=t.date);let c=B(i.quantity);c&&r.push({lineIndex:a,poolId:o,mg:c})}),{date:t.date,member:Z(t,n.st),...t.id?{orderId:t.id}:{},entries:r}}function he(t,n,r,i){if(V(r)){let e=me(t,i),a=i.quote&&JSON.stringify(i.quote.input)===JSON.stringify(e)?i.quote:null,o=a?.result?.entries.find(e=>e.lineIndex===n),s=a?.result?.pools.find(e=>e.poolId===r.id);return{amount:o?.amount??null,materialSources:o?.materialSources||[],allocations:o?.allocations||[],balance:s,quoteError:a?.error||``,quoteReady:!!a?.result,covered:o?.amount!=null,wantedMg:e.entries.filter(e=>e.poolId===r.id).reduce((e,t)=>e+t.mg,0)}}let a=[];t.lines.forEach((n,o)=>{if(!n.pool)return;let s=n.pool.poolId||n.pool.dataPoolId,c=H(i.materialPools);(c&&t.date>=c.cutover||n.pool.defaultDate||!s||s>t.date)&&(s=t.date);let l=n.unit===`g`&&!e.isSilver(n.nameType),u=n.pool.source===`pool`||l&&n.pool.allowed===!1&&n.pool.preferredSource===`pool`;if(!l||!u||s!==r.id)return;let d=B(n.quantity);d&&a.push({lineIndex:o,mg:d})});let o=fe(i.materialPools).flatMap(e=>e.usages||[]),s=e.poolMaterialPreview(r,a,{orderId:t.id||null,allUsages:o});return{...s,amount:s.amounts[n]??null}}function W(t,n,r,i){if(!t.pool)return{line:t,pooled:!1};let{st:a}=i,o=i.materialPools,s={...t.pool},c={...t.purchase},l={...t.view},u=t.unit===`g`&&!e.isSilver(t.nameType);!u&&s.source===`pool`?(s.preferredSource=`pool`,s.source=`manual`):u&&s.allowed===!1&&s.preferredSource===`pool`&&(s.source=`pool`),s.allowed=u;let d=s.poolId||s.dataPoolId,m=H(o),h=!!m&&n.date>=m.cutover;(h||s.defaultDate||!d||d>n.date)&&(d=n.date);let g=Z(n,a);s.options=(o?U(o,n.date,d,{orderId:n.id||``,member:g}):[]).map(e=>({value:e.id,label:pe(e,h)})),!o&&d&&(s.options=[{value:d,label:d}]),s.poolId=d,s.dataPoolId=d,s.unified=h;let v=s.source===`pool`,y=s.dataSource,b={...t,pool:s,purchase:c,view:l};if(v&&y!==`pool`&&(s.manual=de(b)),!v&&y===`pool`){let e=s.manual;Object.assign(c,{materialMode:e.mode,materialRate:e.rate,material:e.total,materialPayer:e.payer,dataMode:e.mode,preferredMode:e.mode,total:e.total,originalTotal:e.originalTotal,dataUnit:t.unit})}if(s.dataSource=s.source,s.help=u?h?`昨日余料、今日购料及退货回料合并加权;今日加料只更新今日订单。进货工费按实际填写。`:`料价按当天加权;垫付款按购料录入顺序扣减。进货工费仍按实际填写。`:`按件商品和银饰请手动填写料费成本。`,!v)return s.preview=null,l.poolNote=``,{line:b,pooled:!1};let x=o?fe(o).find(e=>e.id===d):null,C=B(t.quantity),w=V(x),T=null,E=``;if(x)try{!w&&x.totalAmount===null?E=`材料成本尚未补齐,请先由店主核对历史材料记录。`:T=he(n,r,x,i)}catch(e){E=e.message}w&&(E=E||T?.quoteError||``);let D=T?.wantedMg??0,O=T?.usedMg??x?.usedMg??0,k=T?.covered===!0,A=C?T?.amount??null:null;return c.materialMode=`total`,c.materialRate=w||x?.averageRate==null?``:(x.averageRate/100).toFixed(2),c.material=A==null?``:(A/100).toFixed(2),s.payerText=w?T?.allocations?.length?(e=>[...new Set(e.map(e=>S(a,e.payer)))].join(`、`))(T.allocations):`按本单来源核对`:_(a).filter(e=>x?.byPayer?.[e]?.purchased>0).map(e=>S(a,e)).join(`、`)||`待补采购`,s.personal=w,l.materialFormula=w?T?.materialSources?.length?T.materialSources.map(e=>`${e.kind===`personal_recovery`?S(a,e.member)+`个人回收料`:`公共料`} ${p(e.quantity)}g · ${e.amount==null?`料费待补`:`¥`+f(e.amount)}`).join(`;`)+`;各来源独立加权,已计分币尾差。`:E||`正在按`+S(a,g)+`的归属核对个人回收料与公共补足。`:A==null?`料费尚未确定;登记足额购料后自动补齐,销售金额保持原单。`:`${t.quantity}g 按当天加权料价计费,本行 ${f(A)}元(已分配分币尾差);垫付款按购料录入顺序扣减,保存后可查看本单归属。`,l.materialOriginal=``,l.poolNote=o?E||(!x||!x.totalMg?`${d} 尚无可用材料。可以先开单,稍后补足购料后自动核算成本与利润。`:k?`${d} ${h?`统一材料`:`已购`} ${p(x.totalMg)}g,已用 ${p(O)}g,余 ${p(Math.max(0,x.totalMg-O))}g;本次共用 ${p(D)}g。`:`${d} ${h?`统一材料`:`已购`} ${p(x.totalMg)}g,已用 ${p(O)}g,本次共用 ${p(D)}g;还需补采购 ${p(Math.max(0,O+D-x.totalMg))}g。可先开单,料费与利润暂待补。`):`正在读取每日料价;可保留选择,读取完成后显示当前料费。`,s.preview={poolId:d,date:d,status:A==null?`pending`:`preview`,amount:A,quantity:C,averageRate:w?null:x?.averageRate??null,revision:T?.balance?.revision??x?.revision??0,allocations:T?.allocations||[],...w?{materialSources:T?.materialSources||[]}:{}},{line:b,pooled:!0}}function ge(t,n){let r={...t.purchase},i={...t.view},a=t.unit,o=t.quantity,s=r.dataMode,c=r.dataUnit!==a;!n&&s===`total`&&(r.total=r.material),!n&&c?a!==`g`&&s===`gram`?(r.preferredMode=`gram`,r.materialMode=`total`,r.material=r.total):a===`g`&&r.preferredMode===`gram`&&(r.materialMode=`gram`):!n&&r.materialMode!==s&&(r.preferredMode=r.materialMode,r.materialMode===`total`&&(r.total===``&&(r.total=r.material),r.material=r.total)),a!==`g`&&(r.materialMode=`total`),r.dataMode=r.materialMode,r.dataUnit=a,i.materialOriginal=n||r.originalTotal===``?``:`已保留原料费合计 ${r.originalTotal}元。原金额不会当成每克料价;切换按克后请填写实际进货料价。`;for(let[t,s]of[[`material`,`costMaterial`],[`labor`,`costLabor`]]){if(t===`material`&&n)continue;let c=t+`Mode`,l=t+`Rate`,u=t+`Formula`;if(a!==`g`&&r[c]===`gram`&&(r[c]=`total`),r[c]!==`gram`)i[u]=t===`material`?a===`g`?`直接填写本行料费合计,不再乘以克重。`:`按件商品请填写本行料费合计${r.materialRate===``?``:`;每克料价已保留,切回g可恢复`}。`:`直接填写本行总工费。`;else try{let n=e.purchaseCosts({unit:a,quantity:o,costParts:{material:`0`,labor:`0`,accessories:`0`,other:`0`},costMaterial:{mode:`total`},costLabor:{mode:`total`},[s]:{mode:`gram`,rate:r[l]}}).parts[t];r[t]=n===null?``:(n/100).toFixed(2),i[u]=n===null?t===`material`?`填写每克进货料价后,系统自动乘以本行克重。`:`填写每克工费后自动乘以克重。`:`${o}g × ${r[l]}元/克 = ${f(n)}元`}catch(e){r[t]=``,i[u]=e.message}}return{...t,purchase:r,view:i}}function _e(t,n,r,i){let a=t.pricingMode===`auto`,o={...t,view:{...t.view}};try{let n=e.sale(z(t,i.st));o.sale=(n.sale/100).toFixed(2),a&&(o.baseSale=(n.baseSale/100).toFixed(2));let r=a?t.laborMode===`gram`?`${t.quantity} ×(${t.goldPrice} + ${t.laborRate})`:`${t.quantity} × ${t.goldPrice} + ${t.laborRate} × ${t.pieces}件`:`基础金额 ${f(n.baseSale)}`;o.view.calculation=r+(n.charges.length?` + 附加 `+f(n.chargesTotal):``)+` = `+f(n.sale)+` 元`,o.view.saleCents=n.sale}catch(e){o.sale=``,o.view.calculation=e.message,o.view.saleCents=null}if(o.legacy)return o;let s=W(o,n,r,i);o=ge(s.line,s.pooled);try{o.view.purchase=e.purchaseCosts({...R(o),unit:o.unit,quantity:o.quantity})}catch{o.view.purchase=null}return o}function ve(t,n){let r=t.pricingMode===`auto`,i=t.countHistoricalUnknown&&t.countOriginalPocket===t.pocket&&Number(t.countOriginalQuantity)===Number(t.quantity),a=e=>t.unit===`g`&&e===`gram`,o=t.pool?.source===`pool`;return{customName:t.nameType===`其他`,goldPrice:r,laborMode:r,laborRate:r,pieces:r&&t.laborMode===`piece`,priceNote:!r,baseSale:!r,stockCount:t.unit===`g`&&N(n,t.pocket),stockCountOptional:i,materialRate:o?!t.pool.personal:a(t.purchase?.materialMode),materialMode:!o,materialPayer:!o,materialReadOnly:o||a(t.purchase?.materialMode),laborRateInput:a(t.purchase?.laborMode),laborReadOnly:a(t.purchase?.laborMode),poolAllowed:t.unit===`g`&&!e.isSilver(t.nameType),extraCosts:![`accessories`,`other`].every(e=>/^\d+(?:\.\d{1,2})?$/.test(String(t.purchase?.[e]??``).trim())&&Number(t.purchase?.[e])===0)}}function G(e,t,r){let i=n.isFee(e);return{key:e.key,note:e.note,amount:L(e.amount),payer:e.payer||(i?`owner`:r),sourceName:e.sourceName||``,edited:!!e.edited,status:e.status||`legacy`,...e.expense_id?{expense_id:e.expense_id}:{},...e.date?{date:e.date}:{},...e.lineNumber?{lineNumber:e.lineNumber}:{},...e.funding?{funding:u(e.funding)}:{},...i?{automatic:u(e)}:{}}}function ye(e){return e.automatic?{...u(e.automatic),...e.date?{date:e.date}:{},amount:e.amount,payer:e.payer}:{key:e.key,sourceName:e.sourceName||void 0,edited:e.edited===!0,...e.expense_id?{expense_id:e.expense_id}:{},...e.date?{date:e.date}:{},...e.status===`estimated`?{status:`estimated`}:{},note:e.note,amount:e.amount,payer:e.payer,...e.funding?{funding:u(e.funding)}:{}}}let be=e=>e.automatic?`已记录的信用卡收款手续费`:e.key.startsWith(`charge:`)?e.lineNumber?`商品 `+e.lineNumber+` 的附加项目`:`附加项目已改类,原成本行保留`:`整单费用`;function xe(e,r,i){let a=e.feeRows.map(ye),o=[...t.sync(a.filter(e=>!n.isFee(e)),r,{defaultPayer:b(i.st)?Z(e,i.st):`assistant`,shopDefaults:T(i.st),checkboxCosts:!!e.presets||e.feeCostMode===`checkboxes`}),...a.filter(e=>n.isFee(e))],s=a.map(e=>e.key).join(`|`)===o.map(e=>e.key).join(`|`);return o.map((t,n)=>s?{...e.feeRows[n],sourceName:t.sourceName||``,note:t.note,amount:L(t.amount),payer:t.payer,...t.lineNumber?{lineNumber:t.lineNumber}:{}}:G(t,i.st,K(e,i.st)))}let K=(e,t)=>b(t)?Z(e,t):`assistant`;function Se(e,t,n,r){let i=e.feeRows.map((e,i)=>i===t?{...e,[n]:r,edited:!0}:e);return{...e,feeRows:i}}function Ce(e,t,n){return{...e,feeRows:[...e.feeRows,G({key:`manual:`+n(),note:`其他费用`,amount:``,payer:K(e,t),status:`estimated`,edited:!0},t,K(e,t))]}}function we(e,n){let r=e.feeRows[n];if(!r||r.automatic)return e;let i=r.key,a=e.lines.map(e=>({...e,charges:e.charges.map(e=>i===`charge:`+e.id||i===`shipping`&&t.normalize(ie(e).trim())===`快递`?{...e,costRemoved:!0}:e)}));return{...e,lines:a,feeRows:e.feeRows.filter((e,t)=>t!==n)}}function Te(e,t,n){let r=e.lines.map((e,r)=>r===t?{...e,charges:e.charges.map((e,t)=>{if(t!==n)return e;let r={...e};return delete r.costRemoved,r})}:e);return{...e,lines:r}}function Ee(e){return e.key===`shipping`||e.key===`box`?e.key:String(e.note||``).trim()===`编绳`?``:t.checkboxCategory(e.note)||t.checkboxCategory(e.sourceName)}function De(e,n=[]){let r=E(e);if(t.customPresets(r)){let e=t.presetCatalog(r),i=new Map(n.map(n=>[t.presetKind(n,{presets:e}),n]).filter(([e])=>e)),a={},o={};for(let[t,n]of Object.entries(e))a[t]=i.has(t),n.byQuantity&&(o[t]=i.get(t)?.note.match(/(([^)]*)个 ×/)?.[1]||`1`);return{configured:!0,checked:a,quantity:o}}let i=new Map(n.map(e=>[t.presetKind(e,{presets:r}),e]).filter(([e])=>e)),a=i.get(`box`);return{configured:!1,checked:{jd:i.has(`jd`),yt:i.has(`yt`),box:!!a,steel:i.has(`steel`),silver:i.has(`silver`)},quantity:{box:a?a.note.match(/(([^)]*)个 ×/)[1]:`1`}}}let Oe=(e,t)=>l[t]||t;function ke(e,t){if(String(e.key).startsWith(`manual:`)){let n=`custom_`+e.key.slice(7);if(E(t)[n])return n}return Ee(e)}function q(e,n,r,i,a){let o={...e.presets,checked:{...e.presets.checked,[n]:r}},s=Oe(o,n);if(r&&s===`shipping`)for(let e of[`jd`,`yt`])e!==n&&d(o.checked,e)&&(o.checked[e]=!1);let c=e.feeRows;if(r){let e=o.configured?t.presetKey(n):s===`silverChain`?`other`:s,r=e=>o.configured?ke(e,i):Ee(e);c=c.filter(e=>e.automatic||e.funding||r(ye(e))!==s).map(t=>!t.automatic&&t.key===e?{...t,key:`manual:`+a()}:t)}return{...e,presets:o,feeRows:c}}function J(e,t,n){return{...e,presets:{...e.presets,quantity:{...e.presets.quantity,[t]:n}}}}function Y(e,n){let r=e.presets;if(!r)return{items:[],notes:{}};let i=Z(e,n),a={};if(r.configured){let e=t.presetCatalog(E(n)),o=[];for(let[n,s]of Object.entries(e)){if(!s.enabled||!r.checked[n]){a[n]=`勾选后计费`;continue}let c=r.quantity[n]??`1`;try{let r=t.presetFee(n,c,i,e);a[n]=`${c}个 × ${s.amount}元 = ${r.amount}元`,o.push(r)}catch(e){a[n]=e.message,o.push({key:t.presetKey(n),note:s.name,amount:``,payer:s.payer===`order`?i:s.payer,status:`estimated`,edited:!0})}}return{items:o,notes:a}}let o=E(n),s=r.quantity.box,c={shipping:r.checked.jd?`jd`:r.checked.yt?`yt`:``,box:r.checked.box,quantity:s,steel:r.checked.steel,silver:r.checked.silver},l;try{l=t.checkboxFees(c,i,o),a.box=c.box?t.boxCount(s)+`个 × `+o.box.amount+`元 = `+l.find(e=>e.key===`box`).amount+`元`:`勾选后计费`}catch{l=t.checkboxFees({...c,box:!1},i,o),l.push({key:`box`,note:`盒子(${s}个 × ${o.box.amount}元/个)`,amount:``,payer:o.box.payer===`order`?i:o.box.payer,status:`estimated`,edited:!0}),a.box=`请填写正整数数量`}return a.ytPayer=S(n,l.find(e=>e.note===`圆通快递`)?.payer||(o.yt.payer===`order`?i:o.yt.payer))+`付款`+(o.yt.payer===`order`?`(订单归属人)`:``),{items:l,notes:a}}function X(e,n){if(!e.presets)return[];let r=Z(e,n);if(e.presets.configured)return Object.entries(t.presetCatalog(E(n))).filter(([,e])=>e.enabled).map(([e,t])=>({kind:e,name:t.name,price:t.amount+`元`+(t.byQuantity?`/个`:``),payer:(t.payer===`order`?`订单归属人`:S(n,t.payer))+`付款`,byQuantity:!!t.byQuantity,shipping:e===`jd`||e===`yt`}));let i=E(n),a=e=>i[e].payer===`order`?S(n,r)+`付款(订单归属人)`:S(n,i[e].payer)+`付款`;return[{kind:`jd`,name:`京东快递`,price:i.jd.amount+`元`,payer:a(`jd`),shipping:!0},{kind:`yt`,name:`圆通快递`,price:i.yt.amount+`元`,payer:a(`yt`),shipping:!0},{kind:`box`,name:`盒子`,price:i.box.amount+`元/个`,payer:a(`box`),byQuantity:!0},{kind:`steel`,name:`钢绳(店里)`,price:i.steel.amount+`元`,payer:a(`steel`)},{kind:`silver`,name:`银链(家里)`,price:i.silver.amount+`元`,payer:a(`silver`)}]}function Z(e,t){return e.member||x(t)}function Q(e,t){let n=b(t)?Z(e,t):`assistant`;return k(v(t,n)?n:`owner`)}function $(e){return[`微信`,`支付宝`,`现金`,...O(e)?[`信用卡`]:[]]}function Ae(e,t){let n=C(e,!b(e)).map(([e,t])=>[k(e),t]),r=A(e,t.recipient+t.method);return r&&!v(e,r.member)&&!n.some(([e])=>e===t.recipient)&&n.push([t.recipient,S(e,r.member)+`(已停用 · 原记录)`]),n}function je(e,t,r){e=P(e||Q(t,r)+`微信`);let i=n.isAccount(e),a=A(r,e),o=a?k(a.member):Q(t,r);return{method:a?.channel||`微信`,recipient:i?`麦麦`:o,nonCardRecipient:i?Q(t,r):o,cardLocked:i}}function Me(e,t){let n={...e.payment};return n.method===`信用卡`?(n.cardLocked||(n.nonCardRecipient=n.recipient||Q(e,t)),n.recipient=`麦麦`,n.cardLocked=!0):(n.cardLocked&&(n.recipient=n.nonCardRecipient||Q(e,t)),n.cardLocked=!1,n.nonCardRecipient=n.recipient),{...e,payment:n}}let Ne=e=>P((e.payment.recipient||``)+(e.payment.method||``));function Pe(e,n,r){if(!b(r))return{...e,member:n};let i=k(n),a={...e.payment,nonCardRecipient:i};a.method!==`信用卡`&&(a.recipient=i);let o=e.feeRows.map(e=>!e.edited&&t.normalize(e.note)!==`包装`?{...e,payer:n}:e);return{...e,member:n,payment:a,feeRows:o}}function Fe(e){return e.id?e.rounding_mode||`cent`:`yuan`}function Ie(e){return!e.id&&!e.customer&&!e.note&&!e.internal_note&&!Number(e.discount)&&!e.fee_items?.some(e=>Number(e.amount)&&(e.edited||e.status!==`estimated`||e.key!==`shipping`))&&(e.lines||[]).every(e=>!e.charges?.some(e=>Number(e.amount))&&!e.quantity&&!e.stockCount&&!e.sale&&!e.goldPrice&&!e.laborRate&&!e.cost&&!Object.values(e.costParts||{}).some(Number))}function Le(e,n){let{st:r,session:i,uuid:a}=e,s=n||{date:r.today,lines:[{}]};s={...s,rounding_mode:Fe(s)},Ie(s)&&(s={...s,date:r.today,fees_date:r.today});let c=!s.id,l=b(r)?_(r).includes(s.member||x(r,i))&&s.member||x(r,i):``,u=(s.fee_items||[]).map(e=>({...e,note:e.note||o[e.key],edited:e.edited??!0})),d={copy_kind:s.copy_kind||``,id:s.id||``,revision:s.revision||``,paper_date:s.paper_date||``,paper_number:s.paper_number||``,rounding_mode:s.rounding_mode,memberLocked:!!s.id||r?.user?.role!==`owner`,member:l,date:s.date||r.today,customer:s.customer||``,customer_type:[`new`,`returning`].includes(s.customer_type)?s.customer_type:``,customerTypeRequired:!s.id,original_customer_type:s.customer_type,salesperson:s.salesperson||(s.id?i?.user?.name||r?.user?.name||``:w(r,i)),credit_card_fee_payer:s.credit_card_fee_payer||`owner`,fees_date:s.fees_date||s.date||r.today,feeCostMode:c?`checkboxes`:s.fee_cost_mode||`legacy`,discount:s.discount||`0`,note:s.note||``,internal_note:s.internal_note||``,presets:null,feeRows:[],lines:[]};d.payment=je(s.payment_account,d,r);let f=E(r),p=c?u.filter(e=>!t.presetKind(e,{presets:f})):u;return d.presets=c?De(r,u):null,d.feeRows=p.map(e=>G(e,r,K(d,r))),d.lines=(s.lines?.length?s.lines:[{}]).map(e=>se(e,{st:r,member:d.member||x(r,i),historicalPocket:!!s.id,uuid:a})),d}function Re(e,t){if(e.lines.length>=60)throw Error(`每单需要1~60行商品`);return{...e,lines:[...e.lines,se({},{st:t.st,member:Z(e,t.st),uuid:t.uuid})]}}function ze(e,t){if(e.lines.length<=1)throw Error(`请至少保留一行商品`);return{...e,lines:e.lines.filter((e,n)=>n!==t)}}function Be(e,t,n){let r=e.lines[t];if(r.charges.length>=100)throw Error(`每行最多填写100项附加项目`);return Ve(e,t,{...r,charges:[...r.charges,F({},n)]})}function Ve(e,t,n){return{...e,lines:e.lines.map((e,r)=>r===t?n:e)}}function He(e,t){return{...e.copy_kind?{copy_kind:e.copy_kind}:{},id:e.id||void 0,revision:Number(e.revision)||void 0,paper_date:e.paper_date||``,rounding_mode:e.rounding_mode,...b(t)?{member:e.member||x(t)}:{},date:e.date,customer:e.customer,customer_type:e.customer_type||e.original_customer_type||`unknown`,salesperson:e.salesperson,paper_number:e.paper_number||``,payment_account:Ne(e),credit_card_fee_payer:e.credit_card_fee_payer||`owner`,fees_date:e.fees_date,fee_auto_initialized:!0,fee_cost_mode:e.feeCostMode||(e.id?`legacy`:`checkboxes`),fee_items:[...e.feeRows.map(ye),...Y(e,t).items].filter(e=>!n.isFee(e)),discount:e.discount,note:e.note,internal_note:e.internal_note,lines:e.lines.map(e=>z(e,t))}}function Ue(t,r){let i=Me(t,r.st);i={...i,lines:i.lines.map((e,t)=>_e(e,i,t,r))},i={...i,feeRows:xe(i,i.lines.map(e=>z(e,r.st)),r)};let a=He(i,r.st),o={total:null,totalText:`待填写`,roundingHint:``,card:null,feesText:``,presetNotes:{}};try{let t=e.orderTotal(a.lines.map(t=>e.cents(t.sale,`商品销售额`)),e.cents(a.discount,`整单优惠`),a.rounding_mode);o.total=t.total,o.totalText=m(t.total,t.rounding_mode),o.roundingHint=h(t)}catch{o.roundingHint=a.rounding_mode===`yuan`?`合计后四舍五入到元,请先填写商品金额与优惠。`:`保留原单金额,精确到分。`}let s=0;if(n.isAccount(a.payment_account)){let e=D(r.st);try{let t=n.amount(o.total,e);o.card={rate:e,amount:t,amountText:(t/100).toFixed(2),formula:`成交合计 ¥${f(o.total)} × ${e}‰ = ¥${f(t)}。计入内部成本,客户付款金额不变;退款不退回已发生的手续费。`},s=t}catch{o.card={rate:e,amount:null,amountText:``,formula:`填写客户付款金额后自动计算${e}‰手续费;付款人默认${S(r.st,`owner`)},可按实际修改。`},s=null}}let c=a.fee_items.filter(e=>!n.isFee(e));try{let t=c.filter(e=>e.amount===``).length,n=c.reduce((t,n)=>t+(n.amount===``?0:e.cents(n.amount)),0)+(s??0);o.feesText=`实际费用合计`+(t||s===null?`(已知部分)`:``)+`:¥`+f(n)+(t?` · 还有 `+t+` 项待补齐(没有成本填0)`:``)+(s===null?` · 信用卡手续费待计算`:``)}catch{o.feesText=`请检查费用金额`}return o.presetNotes=Y(i,r.st).notes,{form:i,draft:a,summary:o}}function We(e,{requireInternalNote:t=!0}={}){let n=String(e.customer??``).trim(),r=String(e.salesperson??``).trim();if(!n||n.length>60)throw Error(`客户称呼/代号必填,请填写 1~60 字。`);if(!r||r.length>30)throw Error(`开单人必填,请填写 1~30 字。`);if(t&&String(e.internal_note??``).replace(/\s/gu,``).length<3)throw Error(`内部备注至少填写3个字符,#号计入,空格和换行不计入。`);if(String(e.internal_note??``).trim().length>500)throw Error(`内部备注最多填写500字。`);return{...e,customer:n,salesperson:r,...t?{internal_note:String(e.internal_note??``).trim()}:{}}}let Ge=e=>/^\d{4}-\d{2}-\d{2}$/.test(e||``)&&new Date(e+`T00:00:00Z`).toISOString().slice(0,10)===e;function Ke(e,n){let r=[];if(e.customerTypeRequired&&![`new`,`returning`].includes(e.customer_type)&&r.push(`请选择客户类型(新客户或老客户)`),(!Ge(e.date)||e.date>n.today)&&r.push(`业务日期请选择今天或之前的有效日期`),(e.feeRows.length||Y(e,n).items.length)&&(!Ge(e.fees_date)||e.fees_date>n.today)&&r.push(`费用实际支付日期请选择今天或之前的有效日期`),/^\d+(?:\.\d{1,2})?$/.test(String(e.discount).trim())||r.push(`整单优惠请填写0或正数,最多2位小数`),e.lines.forEach((e,t)=>{let i=`商品 `+(t+1),a=ve(e,n),o=String(e.quantity).trim();o&&(!/^\d+(?:\.\d{1,3})?$/.test(o)||Number(o)<.001)&&r.push(i+`的克重/数量须大于0,最多3位小数`),a.pieces&&!/^[1-9]\d*$/.test(String(e.pieces).trim())&&r.push(i+`的计工费件数须为正整数`),!e.legacy&&!e.purchase.materialPayer&&e.pool?.source!==`pool`&&r.push(i+`请选择料费付款人`),!e.legacy&&!e.purchase.laborPayer&&r.push(i+`请选择进货工费付款人`),e.pocket&&!j(n).includes(e.pocket)&&!e.historicalPocket&&r.push(`货盘「`+M(n,e.pocket)+`」已停用,请重新选择已启用货盘,或明确选择外配。`)}),e.presets){let i=Y(e,n).notes;if(!e.presets.configured&&e.presets.checked.box&&i.box===`请填写正整数数量`&&r.push(`盒子数量请填写正整数`),e.presets.configured){for(let[n,i]of Object.entries(e.presets.checked))if(i&&d(e.presets.quantity,n))try{t.boxCount(e.presets.quantity[n])}catch(e){r.push(e.message)}}}if(r.length)throw Error(`请先修改:`+r.join(`;`)+`。`)}function qe(t,r,{requireIdentity:i=!0}={}){if(i&&(t=We(t)),n.isAccount(t.payment_account)&&!O(r))throw Error(`信用卡收款暂未准备好,请刷新后重新核对收款方式。`);let a=[],o=e=>e==null||String(e).trim()===``;if(!t.lines.length)throw Error(`请至少填写一行商品。`);if(t.lines.forEach((n,i)=>{let s=`商品 `+(i+1);if(o(n.name)&&a.push(s+`的名称`),o(n.quantity)&&a.push(s+`的克重/数量`),N(r,n.pocket)&&n.unit===`g`&&te(n.stockCount,{optional:!!n.historicalUnknown,title:s+`出库数量(对)`}),n.pricingMode===`auto`?(o(n.goldPrice)&&a.push(s+`的金价/银价`),o(n.laborRate)&&a.push(s+`的销售工费`)):o(n.baseSale??n.sale)&&a.push(s+`的基础金额`),(n.charges||[]).forEach((e,t)=>{o(e.name)&&a.push(s+`附加项目 `+(t+1)+`的名称`),o(e.amount)&&a.push(s+`的`+(e.name||`附加项目 `+(t+1))+`收费`)}),n.costParts){if(![`material`,`labor`].every(e=>_(r).includes(n.costPayers?.[e])))throw Error(s+`请选择料费和进货工费付款人。`);let i=e.purchaseCosts(n);if(n.costMaterial?.mode===`pool`&&(!Ge(n.costMaterial.poolId)||n.costMaterial.poolId>t.date))throw Error(s+`请选择不晚于订单日期的料价日期。`);for(let[t,r]of Object.entries(i.parts))r===null&&(t!==`material`||n.costMaterial?.mode!==`pool`)&&a.push(s+`的`+e.costLabels[t])}else o(n.cost)&&a.push(s+`的货品成本`)}),t.fee_items.forEach((e,t)=>{o(e.note)&&a.push(`费用 `+(t+1)+`的名称`),o(e.amount)&&a.push((e.note||`费用 `+(t+1))+`的实际成本`)}),a.length)throw Error(`开单前请补齐:`+a.join(`、`)+`。没有收费或成本的项目填0,不需要的费用请移除。`);return t.lines.forEach((t,n)=>{try{e.sale(t),t.costParts||e.cents(t.cost,`货品成本`)}catch(e){throw Error(`商品 `+(n+1)+`:`+e.message)}}),t.fee_items.forEach(t=>e.cents(t.amount,t.note+`实际成本`)),e.orderTotal(t.lines.map(t=>e.sale(t).sale),e.cents(t.discount,`整单优惠`),t.rounding_mode),t}function Je(e){return{...e,rounding_mode:e.rounding_mode||`cent`,discount:(e.discount/100).toFixed(2),fee_items:e.fee_items.map(e=>({...e,amount:e.amount===null?``:(e.amount/100).toFixed(2)})),lines:e.lines.map(e=>({...e,costMaterial:e.costMaterial?.mode===`pool`?{...e.costMaterial}:{mode:ae(e).mode,...e.costMaterial?.mode===`gram`?{rate:e.costMaterial.rate==null?``:(e.costMaterial.rate/100).toFixed(2)}:{}},costLabor:{mode:e.costLabor?.mode||`total`,rate:e.costLabor?.rate==null?``:(e.costLabor.rate/100).toFixed(2)},quantity:e.unit===`g`?p(e.quantity):e.quantity,sale:(e.sale/100).toFixed(2),baseSale:((e.baseSale??e.sale)/100).toFixed(2),charges:(e.charges||[]).map(e=>({...e,amount:e.amount===null?``:(e.amount/100).toFixed(2)})),cost:e.cost===null?``:(e.cost/100).toFixed(2),...e.pricingMode===`auto`?{goldPrice:(e.goldPrice/100).toFixed(2),laborRate:(e.laborRate/100).toFixed(2)}:{},...e.costParts?{costParts:Object.fromEntries(Object.entries(e.costParts).map(([e,t])=>[e,t===null?``:(t/100).toFixed(2)]))}:{}}))}}function Ye(e){return e.unit===`g`&&![`quantity`,`goldPrice`,`laborRate`,`baseSale`,`sale`].some(t=>e[t]!==``)&&!e.charges.length}function Xe(e,t,n){let r=e.lines.map((e,t)=>t).filter(t=>Ye(e.lines[t]));if(e.lines.length+Math.max(0,t.length-r.length)>60)throw Error(`加上本次商品后超过60件,请先整理现有商品`);let i=e,a=[];for(let e of t){let t=r.shift();t===void 0&&(i=Re(i,n),t=i.lines.length-1);let o={...i.lines[t]};for(let t of[`unit`,`pricingMode`,`quantity`,`goldPrice`,`laborMode`,`laborRate`,`pieces`])o[t]=String(e[t]);o.charges=[...o.charges,...e.charges.map(e=>F({...e,id:n.uuid()},n.uuid))],i=Ve(i,t,o),a.push(t+1)}return{form:i,filled:a}}function Ze(e){return String(e??``).match(/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u)?.[1]||``}function Qe(e,t){let n=Ze(t);return e.filter(e=>!n||e.slice(1).includes(n)).slice(0,20)}function $e(e,t){let n=String(e??``),r=n.match(/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u),i=r?n.slice(0,n.length-r[1].length-1):n,a=i+(i&&!/\s$/.test(i)?` `:``)+t+` `;if(a.length>500)throw Error(`内部备注最多填写500字。`);return a}return{productNames:r,chargeNames:i,chargeSaleDefaults:a,feeLabels:o,yuan:f,grams:p,orderAmount:m,orderRoundingHint:h,teamMode:b,currentMember:x,memberKeys:_,memberEnabled:v,memberName:S,memberOptions:C,defaultSalesperson:w,shopFeeDefaults:T,costConfig:E,creditCardRate:D,creditCardAvailable:O,memberAccountPrefix:k,accountIdentity:A,activePocketKeys:j,pocketLabel:M,pocketOptions:ee,pocketCountsEnabled:N,stockCountValue:te,newCharge:F,changeChargeType:ne,setChargeAmount:re,collectCharge:I,newLine:se,setLineField:ce,setPurchaseField:le,setPoolSource:ue,collectLine:z,syncLine:_e,lineVisibility:ve,materialPoolMg:B,poolQuoteInput:me,feeSourceText:be,editFeeRow:Se,addManualFee:Ce,removeFeeRow:we,restoreChargeCost:Te,newPresets:De,togglePreset:q,setPresetQuantity:J,readPresets:Y,presetCatalogView:X,paymentMethods:$,recipientOptions:Ae,readPaymentAccount:Ne,changeMember:Pe,formMember:Z,isBlankDraft:Ie,newForm:Le,addLine:Re,removeLine:ze,addCharge:Be,updateLine:Ve,collectDraft:He,syncForm:Ue,validateOrderIdentity:We,validateFormFields:Ke,validateIssueDraft:qe,draftInputs:Je,isFormulaBlank:Ye,applyFormulaLines:Xe,noteTagQuery:Ze,filterNoteTags:Qe,insertNoteTag:$e}});var Ee=Te.exports,De=ge,Oe=ye,ke=Se,q=Ee,J=()=>window.crypto.randomUUID();function Y({client:e,state:t,session:n,initialDraft:r}){let[i,a]=(0,T.useState)(null),[o,s]=(0,T.useState)(``),[c,l]=(0,T.useState)(null),u=(0,T.useMemo)(()=>({st:t,session:n,uuid:J,materialPools:i,quote:c}),[t,n,i,c]),d=(0,T.useRef)(u),[f,p]=(0,T.useState)(()=>q.syncForm(q.newForm({st:t,session:n,uuid:J},r||void 0),{st:t,session:n,uuid:J})),m=(0,T.useRef)(f),h=(0,T.useCallback)(e=>{m.current=e,p(e)},[]),g=(0,T.useCallback)(e=>h(q.syncForm(e(m.current.form),d.current)),[h]),_=(0,T.useCallback)(e=>h(q.syncForm(q.newForm(d.current,e||void 0),d.current)),[h]);(0,T.useEffect)(()=>{d.current=u,h(q.syncForm(m.current.form,u))},[u,h]),(0,T.useEffect)(()=>{le(window.localStorage,t.user.id,f.draft)},[f.draft,t.user.id]);let[v,y]=(0,T.useState)(0),b=(0,T.useCallback)(()=>y(e=>e+1),[]);(0,T.useEffect)(()=>{let t=!0;return e.api(`/api/material-pools`).then(e=>{if(!Array.isArray(e.rows))throw Error(`每日料价记录未完整返回,请重新读取。`);t&&(a(e),s(``))}).catch(e=>{t&&s(`每日料价尚未读到:`+(e.name===`AbortError`?`读取超时,请点击“刷新料价”。`:e.message))}),()=>{t=!1}},[e,v]);let x=(0,T.useMemo)(()=>{let e=q.poolQuoteInput(f.form,u),t=i?.rows||[];return e.entries.some(e=>t.some(t=>t.id===e.poolId&&t.personalPools!==void 0))?JSON.stringify(e):``},[f.form,u,i]);return(0,T.useEffect)(()=>{if(!x||c&&JSON.stringify(c.input)===x)return;let t=!0,n=window.setTimeout(async()=>{let n=JSON.parse(x);try{let r=await e.api(`/api/material-pools/quote`,n);t&&l({input:n,result:r,error:``})}catch(e){t&&l({input:n,result:null,error:e.message})}},180);return()=>{t=!1,window.clearTimeout(n)}},[x,c,e]),{store:f,update:g,reset:_,ctx:u,pools:i,poolError:o,loadPools:b}}function X({label:e,field:t,hint:n,hidden:r,className:i,children:a}){return r?null:(0,I.jsxs)(`div`,{className:`field `+(i||``),"data-field":t,children:[(0,I.jsx)(`label`,{className:`field-label`,children:e}),a,n?(0,I.jsx)(`div`,{className:`field-hint`,children:n}):null]})}function Z({value:e,onChange:t,numeric:n,readOnly:r,disabled:i,placeholder:a,maxLength:o,type:s,...c}){return(0,I.jsx)(X,{...c,children:(0,I.jsx)(_,{name:c.field,"aria-label":typeof c.label==`string`?c.label:c.field,value:e,type:s,inputMode:n?`decimal`:void 0,autoComplete:`off`,readOnly:r,disabled:i,placeholder:a,maxLength:o,className:r?`readonly-input`:void 0,onChange:e=>t?.(e.target.value)})})}function Q({value:e,options:t,onChange:n,disabled:r,placeholder:i,...a}){return(0,I.jsx)(X,{...a,children:(0,I.jsx)(h,{"aria-label":typeof a.label==`string`?a.label:a.field,value:e===``&&i?void 0:e,placeholder:i,disabled:r,popupMatchSelectWidth:!1,options:t.map(([e,t,n])=>({value:e,label:t,disabled:!!n,title:t})),onChange:n,getPopupContainer:()=>document.body})})}function $({value:e,options:t,onChange:n,disabled:r,...i}){return(0,I.jsx)(X,{...i,children:(0,I.jsx)(s.Group,{value:e,disabled:r,optionType:`button`,buttonStyle:`solid`,size:`middle`,onChange:e=>n(e.target.value),options:t.map(([e,t,n])=>({value:e,label:t,disabled:!!n}))})})}function Ae({form:e,state:t,paperNumber:n,update:r}){let i=e=>t=>r(n=>({...n,[e]:t})),a=q.teamMode(t),s=e.payment.method===`信用卡`;return(0,I.jsxs)(o,{className:`panel`,title:`客户与单据`,extra:(0,I.jsx)(`span`,{className:`small muted`,children:e.id?`补齐原草稿,生成销售单据后完成记账`:`填写内容自动暂存,生成单据即完成记账`}),children:[(0,I.jsxs)(`div`,{className:`grid four`,children:[(0,I.jsx)(Z,{label:`业务日期`,field:`date`,type:`date`,value:e.date,onChange:i(`date`)}),(0,I.jsx)(Z,{label:`纸单编号(自动)`,field:`paper_number`,value:n,readOnly:!0}),(0,I.jsx)(Z,{label:`客户称呼/代号(必填)`,field:`customer`,value:e.customer,maxLength:60,placeholder:`方便找回订单即可`,onChange:i(`customer`)}),(0,I.jsx)($,{label:`客户类型`+(e.customerTypeRequired?`(必选)`:``),field:`customer_type`,value:e.customer_type,options:[[`new`,`新客户`],[`returning`,`老客户`]],onChange:i(`customer_type`)}),(0,I.jsx)(Z,{label:`开单人(必填)`,field:`salesperson`,value:e.salesperson,maxLength:30,onChange:i(`salesperson`)}),a&&(e.memberLocked?(0,I.jsx)(Z,{label:`订单归属(经营款与业绩)`,field:`member`,value:q.memberName(t,e.member),readOnly:!0}):(0,I.jsx)(Q,{label:`订单归属(经营款与业绩)`,field:`member`,value:e.member,options:q.memberOptions(t),onChange:e=>r(n=>q.changeMember(n,e,t))})),(0,I.jsx)($,{label:`收款方式`,field:`payment_method`,value:e.payment.method,options:q.paymentMethods(t).map(e=>[e,e]),onChange:e=>r(t=>({...t,payment:{...t.payment,method:e}}))}),(0,I.jsx)(Q,{label:`收款人`,field:`payment_recipient`,value:e.payment.recipient,disabled:s,options:q.recipientOptions(t,e.payment),hint:s&&q.creditCardAvailable(t)?`信用卡统一由${q.memberName(t,`owner`)}收款。`:void 0,onChange:e=>r(t=>({...t,payment:{...t.payment,recipient:e}}))})]}),(0,I.jsx)(p.Paragraph,{type:`secondary`,className:`small section-note`,children:`纸单号前半段为业务日期,后半段序号持续累计,中间不加横线,换日期不归零;生成时分配。生成单据即按成交合计记录全额收款,同时按所选货盘扣减黄金库存并计入实际利润。请核对商品已交付,选择实际收款方式与收款人;业务日期作为收款和出库日期。`})]})}function je({index:e,line:t,update:n}){let r=(t,r)=>n(n=>{let i=n.lines[e];return q.updateLine(n,e,{...i,charges:i.charges.map((e,n)=>n===t?r(e):e)})});return(0,I.jsxs)(`div`,{className:`sale-charges`,children:[(0,I.jsxs)(`div`,{className:`panel-title`,children:[(0,I.jsx)(`strong`,{children:`工费附加项目(选填)`}),(0,I.jsx)(l,{size:`small`,"data-action":`add-charge`,onClick:()=>n(t=>q.addCharge(t,e,J)),children:`+ 添加附加项目`})]}),(0,I.jsx)(`p`,{className:`small muted`,children:`向客户收费预填:编绳55元、证书10元、包装10元、快递8元,均可修改;按填写金额自动加进本行销售额。`}),(0,I.jsx)(`div`,{className:`charge-list`,children:t.charges.map((t,i)=>(0,I.jsxs)(`div`,{className:`charge-row`,"data-charge":i,children:[(0,I.jsx)(Q,{label:`附加项目`,field:`chargeType`,value:t.type,options:[...q.chargeNames,`其他`].map(e=>[e,e]),onChange:e=>r(i,t=>q.changeChargeType(t,e))}),(0,I.jsx)(Z,{label:`附加项目名称`,field:`chargeName`,hidden:t.type!==`其他`,value:t.customName,maxLength:40,onChange:e=>r(i,t=>({...t,customName:e}))}),(0,I.jsx)(Z,{label:`附加金额(元)`,field:`chargeAmount`,numeric:!0,value:t.amount,placeholder:`没有收费填0,可修改金额`,onChange:e=>r(i,t=>q.setChargeAmount(t,e))}),(0,I.jsxs)(`div`,{className:`charge-actions`,children:[(0,I.jsx)(l,{type:`text`,size:`small`,"data-action":`remove-charge`,onClick:()=>n(t=>{let n=t.lines[e];return q.updateLine(t,e,{...n,charges:n.charges.filter((e,t)=>t!==i)})}),children:`移除附加项`}),t.costRemoved&&(0,I.jsxs)(`small`,{className:`muted`,children:[`内部成本已移除`,` `,(0,I.jsx)(l,{type:`link`,size:`small`,"data-action":`restore-charge-cost`,onClick:()=>n(t=>q.restoreChargeCost(t,e,i)),children:`恢复内部成本`})]})]})]},t.id))})]})}function Me({index:e,line:t,state:n,update:r,onReloadPools:i}){let a=q.lineVisibility(t,n),o=t=>r(n=>q.updateLine(n,e,t(n.lines[e]))),s=e=>t=>o(n=>q.setPurchaseField(n,e,t)),c=q.memberOptions(n),u=t.purchase,d=t.pool?.source===`pool`,f=e=>q.memberKeys(n).includes(e)?q.memberOptions(n,!1,{selected:e}):c;return(0,I.jsxs)(`div`,{className:`internal`,children:[(0,I.jsx)(`div`,{className:`internal-title`,children:`内部成本 · 客户单据不显示`}),(0,I.jsxs)(`div`,{className:`grid two cost-source-fields`,children:[(0,I.jsx)(Q,{label:`出库货盘(仅黄金)`,field:`pocket`,value:t.pocket,options:q.pocketOptions(n,t.pocket,t.historicalPocket),onChange:e=>o(t=>q.setLineField(t,`pocket`,e))}),(0,I.jsx)(Z,{label:`出库数量(对)`,field:`stockCount`,numeric:!0,hidden:!a.stockCount,value:t.stockCount,placeholder:`一对填1`,hint:a.stockCountOptional?`历史未记录对数,可保留空白;与计工费件数分别填写。`:`与计工费件数分别填写。`,onChange:e=>o(t=>q.setLineField(t,`stockCount`,e))})]}),t.legacy?(0,I.jsx)(Z,{label:`原单货品成本(旧版未分项)`,field:`cost`,value:t.cost,readOnly:!0}):u&&(0,I.jsxs)(`div`,{className:`cost-fields`,children:[t.pool&&(0,I.jsxs)(`div`,{className:`material-source`,children:[(0,I.jsxs)(`div`,{className:`grid three`,children:[(0,I.jsx)($,{label:`料费成本来源`,field:`materialSource`,value:t.pool.source,options:[[`manual`,`手动填写成本`],[`pool`,`当日加权料价`,!a.poolAllowed]],onChange:e=>o(t=>q.setPoolSource(t,e))}),d&&(0,I.jsx)(Q,{label:`料价日期`,field:`materialPoolId`,value:t.pool.poolId,options:t.pool.options.map(e=>[e.value,e.label]),onChange:e=>o(t=>({...t,pool:t.pool?{...t.pool,poolId:e}:t.pool}))}),d&&(0,I.jsxs)(`div`,{className:`field`,children:[(0,I.jsx)(`label`,{className:`field-label`,children:`\xA0`}),(0,I.jsx)(l,{size:`small`,"data-action":`reload-material-choices`,onClick:i,children:`刷新料价`})]})]}),(0,I.jsx)(`p`,{className:`small muted`,children:t.pool.help}),d&&t.view.poolNote&&(0,I.jsx)(`p`,{className:`small material-pool-note`,"aria-live":`polite`,"data-testid":`pool-note`,children:t.view.poolNote})]}),(0,I.jsxs)(`div`,{className:`grid four purchase-cost-grid`,children:[a.materialMode&&(0,I.jsx)($,{label:`进货料费方式`,field:`cost-materialMode`,value:u.materialMode,options:[[`gram`,`按克料价`,t.unit!==`g`],[`total`,`直接填总料费`]],onChange:s(`materialMode`)}),(0,I.jsx)(Z,{label:d?`加权进货料价(元/克,自动)`:`进货料价(元/克)`,field:`cost-materialRate`,numeric:!0,hidden:!a.materialRate,readOnly:d,value:u.materialRate,placeholder:d?`待核算`:`填写每克进货料价`,onChange:s(`materialRate`)}),(0,I.jsx)(Z,{label:d?`耗用料费合计(元,自动)`:`料费成本合计(元)`,field:`cost-material`,numeric:!0,readOnly:a.materialReadOnly,value:u.material,placeholder:d?`待核算`:`开单前必填,没有填0`,onChange:s(`material`)}),a.materialPayer?(0,I.jsx)(Q,{label:`料费付款人`,field:`cost-materialPayer`,value:u.materialPayer,placeholder:`请选择`,options:f(u.materialPayer),onChange:s(`materialPayer`)}):(0,I.jsx)(Z,{label:t.pool?.personal?`材料原付款人`:`本批购料付款人`,field:`cost-materialPoolPayer`,value:t.pool?.payerText||``,readOnly:!0})]}),(0,I.jsx)(`p`,{className:`purchase-formula small muted`,"aria-live":`polite`,children:t.view.materialFormula}),t.view.materialOriginal&&(0,I.jsx)(`p`,{className:`small muted`,children:t.view.materialOriginal}),(0,I.jsxs)(`div`,{className:`grid four purchase-cost-grid`,children:[(0,I.jsx)($,{label:`进货工费方式`,field:`cost-laborMode`,value:u.laborMode,options:[[`gram`,`克工费`,t.unit!==`g`],[`total`,`总工费`]],onChange:s(`laborMode`)}),(0,I.jsx)(Z,{label:`进货克工费(元/克)`,field:`cost-laborRate`,numeric:!0,hidden:!a.laborRateInput,value:u.laborRate,placeholder:`填写每克工费`,onChange:s(`laborRate`)}),(0,I.jsx)(Z,{label:`进货总工费(元)`,field:`cost-labor`,numeric:!0,readOnly:a.laborReadOnly,value:u.labor,placeholder:`开单前必填,没有填0`,onChange:s(`labor`)}),(0,I.jsx)(Q,{label:`进货工费付款人`,field:`cost-laborPayer`,value:u.laborPayer,placeholder:`请选择`,options:f(u.laborPayer),onChange:s(`laborPayer`)})]}),(0,I.jsx)(`p`,{className:`purchase-formula small muted`,"aria-live":`polite`,children:t.view.laborFormula}),a.extraCosts&&(0,I.jsxs)(`div`,{className:`legacy-extra-costs`,children:[(0,I.jsx)(`p`,{className:`small muted`,children:`这里保留原来填写的货品成本,不要在下方实际费用重复登记。`}),(0,I.jsxs)(`div`,{className:`grid three`,children:[(0,I.jsx)(Z,{label:`配件成本(元,本行合计)`,field:`cost-accessories`,numeric:!0,value:u.accessories,onChange:s(`accessories`)}),(0,I.jsx)(Z,{label:`其他货品成本(元,本行合计)`,field:`cost-other`,numeric:!0,value:u.other,onChange:s(`other`)}),(0,I.jsx)(Q,{label:`原有配件及其他成本付款人`,field:`payer`,value:t.payer,options:c,onChange:e=>o(t=>({...t,payer:e}))})]})]}),(0,I.jsxs)(`p`,{className:`cost-summary small`,children:[`本行货品成本合计:`,t.view.purchase?.total==null?d?`料费待核算`:`请补齐(没有的项目填0)`:`¥`+q.yuan(t.view.purchase.total)]})]})]})}function Ne({form:e,state:t,update:n,onError:r,onReloadPools:i}){let a=e=>{try{n(e)}catch(e){r(e.message)}};return(0,I.jsxs)(o,{className:`panel`,title:`商品明细`,extra:(0,I.jsx)(`span`,{className:`small muted`,children:`金价与工费分开填写`}),children:[e.lines.map((o,s)=>(0,I.jsx)(Pe,{index:s,line:o,state:t,canRemove:e.lines.length>1,update:n,onRemove:()=>{if(e.lines.length<=1)return r(`请至少保留一行商品`);a(e=>q.removeLine(e,s))},onReloadPools:i},s)),(0,I.jsxs)(`div`,{className:`form-actions`,children:[(0,I.jsx)(l,{"data-action":`add-line`,onClick:()=>a(e=>q.addLine(e,{st:t,uuid:J})),children:`+ 添加商品`}),(0,I.jsx)(`span`,{className:`small muted`,children:`银饰不扣黄金货盘;外配使用店内金料时,选实际出库货盘。`})]})]})}function Pe({index:e,line:t,state:n,canRemove:r,update:i,onRemove:a,onReloadPools:o}){let s=q.lineVisibility(t,n),c=t=>i(n=>q.updateLine(n,e,t(n.lines[e]))),u=e=>t=>c(n=>q.setLineField(n,e,t));return(0,I.jsxs)(`section`,{className:`line-item`,"data-line":e,"aria-label":`商品 `+(e+1),children:[(0,I.jsxs)(`div`,{className:`line-top`,children:[(0,I.jsxs)(`strong`,{children:[`商品 `,String(e+1).padStart(2,`0`)]}),(0,I.jsx)(l,{type:`text`,size:`small`,"data-action":`remove-line`,disabled:!r,onClick:a,children:`移除`})]}),(0,I.jsxs)(`div`,{className:`grid four`,children:[(0,I.jsx)(Q,{label:`商品名称`,field:`nameType`,value:t.nameType,options:[...q.productNames,`其他`].map(e=>[e,e]),onChange:u(`nameType`)}),(0,I.jsx)(Z,{label:`其他商品名称`,field:`customName`,hidden:!s.customName,value:t.customName,maxLength:60,onChange:u(`customName`)}),(0,I.jsx)($,{label:`计价方式`,field:`pricingMode`,value:t.pricingMode,options:[[`auto`,`按金价与工费计算`],[`manual`,`直接填写金额`]],onChange:u(`pricingMode`)}),(0,I.jsx)($,{label:`单位`,field:`unit`,value:t.unit,options:[[`g`,`g`],[`件`,`件`]],onChange:u(`unit`)}),(0,I.jsx)(Z,{label:`克重/数量`,field:`quantity`,numeric:!0,value:t.quantity,onChange:u(`quantity`)})]}),(0,I.jsxs)(`div`,{className:`grid four sale-inputs`,children:[(0,I.jsx)(Z,{label:`金价/银价(元/克)`,field:`goldPrice`,numeric:!0,hidden:!s.goldPrice,value:t.goldPrice,onChange:u(`goldPrice`)}),(0,I.jsx)($,{label:`销售工费方式`,field:`laborMode`,hidden:!s.laborMode,value:t.laborMode,options:[[`gram`,`克工费`],[`piece`,`件工费`]],onChange:u(`laborMode`)}),(0,I.jsx)(Z,{label:`销售工费`,field:`laborRate`,numeric:!0,hidden:!s.laborRate,value:t.laborRate,onChange:u(`laborRate`)}),(0,I.jsx)(Z,{label:`计工费件数`,field:`pieces`,numeric:!0,hidden:!s.pieces,value:t.pieces,onChange:u(`pieces`)}),(0,I.jsx)(Z,{label:`销售单价说明(客户可见)`,field:`priceNote`,hidden:!s.priceNote,value:t.priceNote,maxLength:100,onChange:u(`priceNote`)}),(0,I.jsx)(Z,{label:`商品基础金额(不含附加项目)`,field:`baseSale`,numeric:!0,hidden:!s.baseSale,value:t.baseSale,onChange:u(`baseSale`)})]}),(0,I.jsx)(je,{index:e,line:t,update:i}),(0,I.jsxs)(`div`,{className:`grid two sale-result`,children:[(0,I.jsx)(Z,{label:`本行销售额(元,含附加项目)`,field:`sale`,value:t.sale,readOnly:!0}),(0,I.jsx)(p.Paragraph,{className:`calculation small`,"aria-live":`polite`,"data-testid":`line-calculation`,children:t.view.calculation})]}),(0,I.jsx)(Me,{index:e,line:t,state:n,update:i,onReloadPools:o})]})}function Fe({form:e,state:t,summary:n,update:r}){let i=e.presets,a=q.presetCatalogView(e,t),s={certificate:`4`,packaging:`3`,shipping:`6`,...t.shopSettings?.feeDefaults};return(0,I.jsxs)(o,{className:`panel internal`,title:`实际费用(内部)`,extra:(0,I.jsx)(l,{size:`small`,"data-action":`add-fee`,onClick:()=>r(e=>q.addManualFee(e,t,J)),children:`+ 添加其他成本`}),children:[(0,I.jsxs)(`p`,{className:`small muted`,children:[i?`按实际发生勾选,快递最多选一项;盒子按配置单价和数量计费。取消勾选不记成本,客户收费不受影响。`:e.feeCostMode===`checkboxes`?`沿用本单已有费用、付款人与支付日期。普通费用按凭据核对;信用卡手续费金额和日期自动维护。`:`上方附加项目自动带入成本。证书默认${s.certificate}元、包装${s.packaging}元;快递按整单默认${s.shipping}元,均可修改。请填写实际已付金额,没有成本填0;不需要的整单费用可移除。开单时记录费用和付款人。`,` `,`客户单据不显示。`]}),(0,I.jsx)(`div`,{className:`grid four`,children:(0,I.jsx)(Z,{label:`费用实际支付日期`,field:`fees_date`,type:`date`,value:e.fees_date,onChange:e=>r(t=>({...t,fees_date:e}))})}),i&&(0,I.jsxs)(`fieldset`,{className:`order-cost-presets`,"data-testid":`cost-presets`,children:[(0,I.jsx)(`legend`,{children:`常用成本 · 按实际发生勾选`}),(0,I.jsx)(`p`,{className:`small muted`,children:`快递二选一,也可不选;取消勾选不记成本。`}),(0,I.jsxs)(`div`,{className:`order-cost-options`,children:[a.length===0&&(0,I.jsx)(`p`,{children:`暂无启用的勾选成本,可在店铺配置中添加。`}),a.map(e=>(0,I.jsxs)(`div`,{className:`order-cost-option`,"data-preset":e.kind,children:[(0,I.jsxs)(y,{checked:!!i.checked[e.kind],onChange:n=>r(r=>q.togglePreset(r,e.kind,n.target.checked,t,J)),children:[(0,I.jsx)(`strong`,{children:e.name}),` `,(0,I.jsx)(`span`,{className:`order-cost-price`,children:e.price}),(0,I.jsxs)(`small`,{className:`muted`,children:[` `,e.kind===`yt`&&!i.configured?n.presetNotes.ytPayer:e.payer]})]}),e.byQuantity&&(0,I.jsx)(X,{label:`数量(个)`,field:`cost_`+e.kind+`_quantity`,hint:n.presetNotes[e.kind],children:(0,I.jsx)(_,{name:`cost_`+e.kind+`_quantity`,inputMode:`numeric`,value:i.quantity[e.kind]??`1`,disabled:!i.checked[e.kind],onChange:t=>r(n=>q.setPresetQuantity(n,e.kind,t.target.value))})})]},e.kind))]})]}),(0,I.jsx)(`div`,{className:`fee-grid`,children:e.feeRows.map((e,n)=>{let i=e.key.startsWith(`manual:`);return(0,I.jsxs)(`div`,{className:`fee-row`,"data-fee":e.key,"data-fee-index":n,children:[(0,I.jsxs)(`div`,{className:`fee-title`,children:[i?(0,I.jsx)(Z,{label:`费用项目名称`,field:`feeNote`,value:e.note,maxLength:150,onChange:e=>r(t=>q.editFeeRow(t,n,`note`,e))}):(0,I.jsx)(`strong`,{className:`fee-name`,children:e.note}),(0,I.jsx)(`span`,{className:`small muted fee-source`,children:q.feeSourceText(e)})]}),(0,I.jsx)(Z,{label:`实际成本(元)`,field:`feeAmount`,numeric:!0,value:e.amount,placeholder:`没有成本填0`,onChange:e=>r(t=>q.editFeeRow(t,n,`amount`,e))}),(0,I.jsx)(Q,{label:`费用付款人`,field:`feePayer`,value:e.payer,options:q.memberOptions(t,!0,{selected:e.payer}),onChange:e=>r(t=>q.editFeeRow(t,n,`payer`,e))}),(0,I.jsx)(l,{type:`text`,size:`small`,"data-action":`remove-fee`,onClick:()=>r(e=>q.removeFeeRow(e,n)),children:`移除费用`})]},e.key)})}),n.card&&(0,I.jsxs)(`div`,{className:`credit-card-preview`,"data-testid":`credit-card-preview`,children:[(0,I.jsxs)(`div`,{className:`credit-card-heading`,children:[(0,I.jsx)(`strong`,{children:`信用卡手续费(内部)`}),(0,I.jsx)(`span`,{className:`small muted`,children:`自动计算 · 客户单据不显示`})]}),(0,I.jsxs)(`div`,{className:`grid two`,children:[(0,I.jsx)(Z,{label:`手续费(元,自动)`,field:`credit_card_fee`,value:n.card.amountText,readOnly:!0}),(0,I.jsx)(Q,{label:`手续费付款人`,field:`credit_card_fee_payer`,value:e.credit_card_fee_payer,options:q.memberOptions(t),onChange:e=>r(t=>({...t,credit_card_fee_payer:e}))})]}),(0,I.jsx)(`p`,{className:`small muted`,"aria-live":`polite`,children:n.card.formula})]}),(0,I.jsx)(`div`,{className:`small fees-total`,"data-testid":`fees-total`,children:n.feesText})]})}function Ie({form:e,summary:t,tags:r,tagsStatus:i,busy:a,error:s,update:c,onError:u}){let d=q.filterNoteTags(r,e.internal_note),f=/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u.test(e.internal_note);return(0,I.jsxs)(o,{className:`panel`,children:[(0,I.jsxs)(`div`,{className:`grid two`,children:[(0,I.jsx)(Z,{label:`整单优惠/抹零(元)`,field:`discount`,numeric:!0,value:e.discount,onChange:e=>c(t=>({...t,discount:e}))}),(0,I.jsx)(X,{label:`客户单备注`,field:`note`,children:(0,I.jsx)(_.TextArea,{name:`note`,"aria-label":`客户单备注`,maxLength:240,rows:2,placeholder:`只写可让客户看到的内容`,value:e.note,onChange:e=>c(t=>({...t,note:e.target.value}))})})]}),(0,I.jsx)(X,{label:(0,I.jsxs)(I.Fragment,{children:[`内部备注(客户不可见)`,(0,I.jsx)(`span`,{className:`small muted`,children:`必填,至少3个字符(含#号),最多500字`})]}),field:`internal_note`,children:(0,I.jsx)(_.TextArea,{name:`internal_note`,"aria-label":`内部备注`,maxLength:500,rows:3,placeholder:`仅供内部跟进,不会出现在客户销售单或打印件中`,value:e.internal_note,onChange:e=>c(t=>({...t,internal_note:e.target.value}))})}),(0,I.jsxs)(`div`,{className:`order-note-tags`,children:[(0,I.jsx)(`p`,{className:`small muted`,children:`输入 #词语 添加标签,例如 #补货、#客户自提。保存订单后可复用,点击下方标签即可填入。`}),(0,I.jsx)(`div`,{className:`order-note-tag-options`,"aria-label":`内部备注快捷标签`,"data-testid":`note-tags`,children:i?(0,I.jsx)(`span`,{className:`small muted`,children:i}):d.length?d.map(t=>(0,I.jsx)(l,{size:`small`,"data-note-tag":t,disabled:a,onClick:()=>{try{let n=q.insertNoteTag(e.internal_note,t);c(e=>({...e,internal_note:n}))}catch(e){u(e.message)}},children:t},t)):(0,I.jsx)(`span`,{className:`small muted`,children:f?`没有匹配标签,可继续输入新标签。`:`暂无已保存标签,填写 #词语 并保存订单后即可复用。`})})]}),(0,I.jsxs)(`div`,{className:`create-submit-bar`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`span`,{className:`small muted`,children:`成交合计`}),(0,I.jsx)(`div`,{className:`summary-amount`,"data-testid":`create-total`,children:t.totalText}),(0,I.jsx)(`div`,{className:`small muted`,"aria-live":`polite`,"data-testid":`rounding-note`,children:t.roundingHint})]}),(0,I.jsx)(l,{type:`primary`,htmlType:`submit`,size:`large`,loading:a,"data-action":`issue`,children:`生成销售单据`})]}),s&&(0,I.jsx)(n,{type:`error`,showIcon:!0,message:s,className:`order-error`,role:`alert`,"data-testid":`order-error`})]})}function Le({client:e,state:t,session:n,form:r,ctx:i,update:a,reset:o}){return(0,I.jsx)(c,{className:`entry-tools`,items:[{key:`templates`,label:(0,I.jsxs)(`span`,{children:[`开单模板 `,(0,I.jsx)(`span`,{className:`small muted`,children:`选择或保存常用模板`})]}),children:(0,I.jsx)(Re,{client:e,state:t,session:n,form:r,reset:o})},...r.id?[]:[{key:`formula`,label:(0,I.jsxs)(`span`,{children:[`公式快速开单 `,(0,I.jsx)(`span`,{className:`small muted`,children:`粘贴公式,自动填入商品`})]}),children:(0,I.jsx)(ze,{form:r,ctx:i,update:a})}]]})}function Re({client:e,state:t,session:i,form:a,reset:o}){let{message:s,modal:c}=f.useApp(),[u,p]=(0,T.useState)(null),[m,g]=(0,T.useState)(``),[v,y]=(0,T.useState)({text:``}),[b,x]=(0,T.useState)(null),S=a.member||q.currentMember(t),C=q.teamMode(t),w=(0,T.useCallback)(async()=>{try{let n=C&&t.user.role===`owner`?`?`+new URLSearchParams({member:S}):``,r=await e.api(`/api/order-templates`+n);if(!Array.isArray(r.rows))throw Error(`模板列表未完整返回,请重试。`);return p(r.rows),g(e=>r.rows.some(t=>t.id===e)?e:``),!0}catch(e){return y({text:`模板尚未读到:`+e.message,error:!0}),!1}},[e,S,C,t.user.role]);(0,T.useEffect)(()=>{w()},[w]);let E=q.defaultSalesperson(t,i);async function D(n){if(e.busy)throw Error(`正在处理订单,请稍候再套用模板。`);if(e.pending())throw Error(`请先恢复上次未确认的操作,再套用模板。`);let r=t.user.id,[i,l]=await Promise.all([e.api(`/api/order-templates/`+encodeURIComponent(n)),e.api(`/api/session`)]);if(l.user?.id!==r)throw Error(`登录账号已变化,请刷新后再套用模板。`);let u=Oe.apply(i.preset,{today:l.today,salesperson:E,pocketKeys:[...new Set([...q.activePocketKeys(t),...(i.preset.lines||[]).map(e=>e.pocket||``).filter(Boolean)])]});u.salesperson=E,C&&(u.member=i.member||S);let d=q.collectDraft(a,t);(!ke.hasDraftContent(d,{today:l.today,salesperson:E})&&!m&&!d.lines.some(e=>e.pricingMode===`manual`||e.laborMode&&e.laborMode!==`gram`||e.pieces!=null&&String(e.pieces)!==`1`||e.costLabor?.mode===`gram`||e.costMaterial?.mode===`total`)||await c.confirm({title:`套用模板`,content:`当前还有未保存的开单内容。套用模板会替换这份草稿,客户称呼将留空、日期改为今天,是否继续?`,okText:`继续`,cancelText:`取消`}))&&(o(u),g(n),y({text:`已套用「`+i.name+`」,请核对本次克重、报价和费用后生成单据。`}),s.success(`模板已填入,生成销售单据后才记账`))}async function O(){if(!b)return;let n=b.name.trim();try{if(!n||n.length>60)throw Error(`模板名称请填写1~60字。`);let r=b.kind===`update`?u?.find(e=>e.id===m):null,i={...C?{member:S}:{},name:n,preset:Oe.fromDraft(q.collectDraft(a,t),{pocketKeys:q.activePocketKeys(t),newId:J}),...r?{revision:r.revision}:{}},o=`/api/order-templates`+(r?`/`+encodeURIComponent(r.id)+`/update`:``),c=await e.mutate(o,i);x(null),g(c.id);let l=await w();y({text:`已保存模板「`+(c.name||n)+`」`+(l?`。`:`;列表暂未读到,可重新读取,当前表单已保留。`)}),s.success(`模板已保存,当前开单内容保留`)}catch(e){x(t=>t&&{...t,error:e.message.replace(`不要重新开单`,`不要重复保存模板`)})}}async function k(){let t=u?.find(e=>e.id===m);if(t&&await c.confirm({title:`删除模板`,content:`删除模板「`+t.name+`」?当前开单内容和已保存订单会保留。`,okText:`删除`,cancelText:`取消`}))try{await e.mutate(`/api/order-templates/`+encodeURIComponent(t.id)+`/delete`,{revision:t.revision}),g(``),await w(),y({text:`模板已删除。`})}catch(e){y({text:e.message,error:!0})}}return(0,I.jsxs)(`div`,{className:`template-panel`,children:[(0,I.jsxs)(d,{wrap:!0,children:[(0,I.jsx)(h,{"aria-label":`选择模板`,"data-testid":`template-select`,style:{minWidth:220},value:m||void 0,placeholder:u?`选择后自动填入预设`:`正在读取模板…`,disabled:!u,options:(u||[]).map(e=>({value:e.id,label:e.name})),onChange:e=>D(e).catch(e=>y({text:e.message,error:!0}))}),(0,I.jsx)(l,{onClick:()=>x({kind:`new`,name:``,error:``}),children:`保存为新模板`}),(0,I.jsx)(l,{disabled:!m,onClick:()=>x({kind:`update`,name:u?.find(e=>e.id===m)?.name||``,error:``}),children:`更新所选模板`}),(0,I.jsx)(l,{disabled:!m,onClick:()=>void k(),children:`删除模板`})]}),(0,I.jsx)(`p`,{className:`small muted`,children:`用于普通开单,可以保存未填完的表单。客户称呼和内部备注不存入模板,套用时留空;业务日期和费用日期用今天;每日料价随本次订单日期读取。`}),v.text&&(0,I.jsx)(`p`,{className:`small `+(v.error?`danger-text`:`muted`),children:v.text}),(0,I.jsxs)(r,{open:!!b,title:b?.kind===`update`?`更新模板`:`保存为新模板`,okText:b?.kind===`update`?`保存更新`:`保存模板`,cancelText:`取消`,onOk:()=>void O(),onCancel:()=>x(null),confirmLoading:e.busy,children:[(0,I.jsx)(`p`,{className:`small muted`,children:`将当前普通开单表单保存为预设,允许金额和克重留空。客户、内部备注、日期及订单编号不存入模板;本次正在填写的内容会保留。`}),(0,I.jsx)(_,{"aria-label":`模板名称`,maxLength:60,placeholder:`例如:足金手链常用报价`,value:b?.name||``,onChange:e=>x(t=>t&&{...t,name:e.target.value})}),b?.error&&(0,I.jsx)(n,{type:`error`,showIcon:!0,message:b.error,style:{marginTop:12}})]})]})}function ze({form:e,ctx:t,update:r}){let[i,a]=(0,T.useState)(``),[o,s]=(0,T.useState)(null);function c(n){try{let c=De.parseBatch(i,{roundingMode:e.rounding_mode}),l=c.items.map((e,t)=>{let n=e.line,r=n.laborMode===`gram`?`${n.quantity}克 ×(金价 ${n.goldPrice} + 克工费 ${n.laborRate})`:`${n.quantity}克 × 金价 ${n.goldPrice} + 1件 × 件工费 ${n.laborRate}`;return`本次第 ${t+1} 件:${r}${n.charges.map(e=>` + 附加费 `+e.amount).join(``)} = ${q.yuan(e.subtotal)}元`});if(l.push(`本次商品合计 ${q.yuan(c.subtotal)}元${c.roundingMode===`yuan`?`,整单取整为 `+q.yuan(c.total)+`元`:``}。`),c.mismatch&&!n){s({kind:`warning`,title:`公式金额与计算结果不一致`,lines:[...l,...c.warnings,`请修改公式,或按计算结果预填。`],pending:i});return}if(n&&o?.pending!==i)throw Error(`公式已改变,请重新点击“识别并预填”核对`);let u=q.applyFormulaLines(e,c.lines,t),d=u.filled;r(()=>u.form),s({kind:`note`,title:`已预填商品 ${d.join(`、`)},共 ${d.length} 件`,lines:[...l,...c.mismatch?[`已采用左侧公式计算金额,未采用不一致的手写金额。`]:[],(c.lines.some(e=>e.charges.length)?`附加费已填金额,未判断编绳、烤漆等类目,可自行改名;内部成本请另行核对。`:``)+`已有商品、优惠和客户资料保留,尚未生成订单。`]}),a(``)}catch(e){s({kind:`error`,lines:[e.message]})}}return(0,I.jsxs)(`div`,{className:`formula-panel`,children:[(0,I.jsx)(_.TextArea,{"aria-label":`粘贴销售公式`,rows:4,maxLength:18e3,autoComplete:`off`,placeholder:`0.79×822+120=769 -0.58×(822+45)+55=558 -769+558=1327`,value:i,onChange:e=>a(e.target.value)}),(0,I.jsxs)(d,{style:{marginTop:8},children:[(0,I.jsx)(l,{type:`primary`,onClick:()=>c(!1),children:`识别并预填`}),o?.kind===`warning`&&(0,I.jsx)(l,{onClick:()=>c(!0),children:`按计算金额预填`})]}),(0,I.jsx)(`p`,{className:`small muted`,children:`括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。`}),o&&(0,I.jsx)(n,{role:`status`,type:o.kind===`note`?`success`:o.kind,message:o.title||(o.kind===`error`?o.lines[0]:``),description:o.kind===`error`?void 0:(0,I.jsx)(`div`,{children:o.lines.filter(Boolean).map((e,t)=>(0,I.jsx)(`p`,{children:e},t))})})]})}var Be=(e,t)=>q.orderAmount(e,t),Ve=e=>e===`demo`?`团队功能预览 · 虚构数据`:e===`production`?`云端系统`:`本机试用`;function He({order:e,error:t,onRetry:n,onNew:r}){let i=e.total!==void 0;return(0,I.jsx)(u,{status:`success`,title:`销售单据已生成`,subTitle:i?e.materialCostPending?`收款、费用和出库已记账;料费待补,补足购料后自动核算利润。`:`收款、费用、出库和利润已记账。`:t||`正在读取已生成的销售单…`,extra:(0,I.jsxs)(d,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[i&&(0,I.jsxs)(`div`,{className:`issued-summary`,"data-testid":`issued-summary`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(p.Text,{type:`secondary`,children:`纸单号`}),(0,I.jsx)(`div`,{className:`issued-value`,"data-testid":`issued-paper-number`,children:e.paper_number||`未分配`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(p.Text,{type:`secondary`,children:`成交合计`}),(0,I.jsx)(`div`,{className:`issued-value`,"data-testid":`issued-total`,children:Be(e.total??null,e.rounding_mode||`cent`)})]}),e.customer&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(p.Text,{type:`secondary`,children:`客户`}),(0,I.jsx)(`div`,{className:`issued-value small`,children:e.customer})]})]}),(0,I.jsxs)(d,{wrap:!0,className:`issued-actions`,children:[(0,I.jsx)(l,{type:`primary`,size:`large`,href:`/print/`+encodeURIComponent(e.id),target:`_blank`,rel:`noopener`,"data-action":`print-preview`,children:`打开打印预览`}),(0,I.jsx)(l,{size:`large`,onClick:r,"data-action":`new-order`,children:`开始新的一单`}),!i&&(0,I.jsx)(l,{onClick:n,children:`重新读取订单`}),(0,I.jsx)(l,{size:`large`,href:`/`,type:`link`,children:`到旧版界面查看订单`})]})]})})}function Ue(e){let{client:t,state:n}=e,r=ie(`draft`),[i,a]=(0,T.useState)(r?null:{draft:ce(window.localStorage,n.user.id),note:``});return(0,T.useEffect)(()=>{if(!r)return;let e=!0;return(async()=>{try{if(n.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let i=await t.api(`/api/orders/`+encodeURIComponent(r));if(i.status!==`draft`)throw Error(`这张订单不是未开单的旧草稿,请在旧版界面查看。`);e&&a({draft:q.draftInputs(i),note:`正在继续填写旧草稿,生成销售单据后完成记账。`})}catch(t){e&&a({draft:ce(window.localStorage,n.user.id),note:`旧草稿未能打开:`+t.message})}})(),()=>{e=!1}},[t,r,n.user.id,n.user.role]),i?(0,I.jsx)(We,{...e,initialDraft:i.draft,initialNote:i.note}):(0,I.jsx)(`div`,{className:`page-loading`,children:(0,I.jsx)(m,{tip:`正在读取旧草稿…`,children:(0,I.jsx)(`div`,{style:{height:60}})})})}function We({client:e,state:t,session:r,refreshState:i,onAccountChanged:a,initialDraft:o,initialNote:s}){let{message:c}=f.useApp();de(e);let{store:u,update:d,reset:m,ctx:h,poolError:g,loadPools:_}=Y({client:e,state:t,session:r,initialDraft:o}),{form:v,summary:y}=u,[b,x]=(0,T.useState)(``),[S,C]=(0,T.useState)(!1),[w,E]=(0,T.useState)(null),[D,O]=(0,T.useState)([]),[k,A]=(0,T.useState)(`正在读取快捷标签…`),j=e.busy,M=e.pending(),[N,ee]=(0,T.useState)(null),te=(0,T.useMemo)(()=>{if(v.paper_number){let e=v.paper_date&&v.paper_number.match(/^\d{8}-?(\d+)$/);return e?v.date.replaceAll(`-`,``)+e[1]:v.paper_number}return N?.date===v.date?N.number+`(预计)`:`保存时分配`},[v.paper_number,v.paper_date,v.date,N]);(0,T.useEffect)(()=>{if(v.paper_number)return;let t=!0,n=v.date;return e.api(`/api/paper-number?date=`+encodeURIComponent(n)).then(e=>t&&ee({date:n,number:e.number})).catch(()=>{}),()=>{t=!1}},[e,v.date,v.paper_number]),(0,T.useEffect)(()=>{let t=!0;return e.api(`/api/order-note-tags`).then(e=>{t&&(O(Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):[]),A(``))}).catch(()=>t&&A(`快捷标签暂未读取成功,可直接填写备注。`)),()=>{t=!1}},[e]);let P=(0,T.useCallback)(e=>{let t=e;t.code===`ACCOUNT_CHANGED`&&C(!0),x(t.message),c.error(t.message)},[c]),F=(0,T.useCallback)(async(n,r)=>{ue(window.localStorage,t.user.id),E({order:{id:r.id},error:``});try{let t=await e.api(`/api/orders/`+encodeURIComponent(r.id));E({order:{...t,id:r.id},error:``}),c.success(t.materialCostPending?`销售单据已生成;料费待补,补足购料后自动核算利润`:`销售单据已生成,收款、费用、出库和利润已记账`),i().catch(()=>{})}catch{E({order:{id:r.id,customer:n.customer},error:`销售单据已经生成,最新订单暂未读到。请重新读取或查看已生成销售单;不要重复开单。`})}},[e,c,i,t.user.id]);async function ne(){x(``);try{q.validateFormFields(v,t);let n=q.validateIssueDraft(q.collectDraft(v,t),t);if(n.id&&t.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let r=await e.mutate(`/api/orders/issue`,n);await F(n,r)}catch(e){P(e)}}async function re(t){x(``);try{let n=await e.retryPending();if(!n)return;if(t.url===`/api/orders/issue`&&n.result.id)return await F(t.data,n.result);c.success(`原操作已确认,不会重复记账`)}catch(e){P(e)}}function ie(){ue(window.localStorage,t.user.id),window.location.search&&window.history.replaceState(null,``,window.location.pathname),E(null),x(``),m(null)}return w?(0,I.jsx)(He,{order:w.order,error:w.error,onRetry:()=>void F({customer:w.order.customer},{id:w.order.id}),onNew:ie}):(0,I.jsxs)(`div`,{className:`create-page`,children:[(0,I.jsxs)(`div`,{className:`page-heading`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`eyebrow`,children:`NEW ORDER · 新版界面`}),(0,I.jsx)(p.Title,{level:2,children:`开一张新单`}),(0,I.jsxs)(p.Paragraph,{type:`secondary`,children:[`开单即交付,一次记录全额收款、实际费用、出库和利润。订单列表、报表等其他功能请`,(0,I.jsx)(`a`,{href:`/`,children:`返回旧版界面`}),`。`]})]}),(0,I.jsx)(l,{"data-action":`clear-draft`,disabled:j,onClick:ie,children:`清空表单`})]}),M&&(0,I.jsx)(n,{className:`pending`,type:`warning`,showIcon:!0,"data-testid":`pending`,message:`上次提交结果尚未确认,请先恢复原操作。重试会使用同一个操作号。`,action:(0,I.jsx)(l,{danger:!0,size:`small`,disabled:j,"data-action":`retry`,onClick:()=>void re(M),children:`恢复原操作`})}),S&&(0,I.jsx)(n,{type:`error`,showIcon:!0,message:`登录账号已在其他页面切换,原操作已暂停。`,action:(0,I.jsx)(l,{size:`small`,onClick:a,children:`重新读取登录状态`})}),s&&(0,I.jsx)(n,{type:`info`,showIcon:!0,message:s}),v.copy_kind&&(0,I.jsx)(n,{type:`info`,showIcon:!0,message:`已复制为未保存的新订单,客户称呼已留空。`}),g&&(0,I.jsx)(n,{type:`warning`,showIcon:!0,message:g}),(0,I.jsx)(Le,{client:e,state:t,session:r,form:v,ctx:h,update:d,reset:e=>m(e)}),(0,I.jsx)(`form`,{id:`order-form`,className:`order-form`,noValidate:!0,onSubmit:e=>{e.preventDefault(),j||ne()},children:(0,I.jsxs)(`fieldset`,{disabled:j,className:`form-fieldset`,children:[(0,I.jsx)(Ae,{form:v,state:t,paperNumber:te,update:d}),(0,I.jsx)(Ne,{form:v,state:t,update:d,onError:e=>c.error(e),onReloadPools:()=>void _()}),(0,I.jsx)(Fe,{form:v,state:t,summary:y,update:d}),(0,I.jsx)(Ie,{form:v,summary:y,tags:D,tagsStatus:k,busy:j,error:b,update:d,onError:e=>c.error(e)})]})})]})}function Ge({client:e,state:t,session:n,onLoggedOut:r}){let{message:i}=f.useApp(),[a,o]=(0,T.useState)(!1);de(e);let s=P(t,n);return(0,I.jsxs)(`header`,{className:`topbar`,children:[(0,I.jsxs)(`div`,{className:`topbar-brand`,children:[(0,I.jsx)(`span`,{className:`brand-mark`,"aria-hidden":`true`,children:Array.from(s)[0]||`店`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`strong`,{"data-testid":`store-name`,children:s}),(0,I.jsx)(`small`,{children:`新版界面 · 开单`})]})]}),(0,I.jsxs)(`div`,{className:`topbar-right`,children:[(0,I.jsx)(g,{className:`mode-tag`,children:Ve(t.mode)}),(0,I.jsx)(`span`,{className:`identity`,"data-testid":`identity`,children:t.user.label||t.user.name}),(0,I.jsx)(`a`,{className:`old-ui-link`,href:`/`,children:`返回旧版界面`}),(0,I.jsx)(l,{size:`small`,loading:a,disabled:e.busy,onClick:async()=>{o(!0);try{await te(e),r()}catch(e){i.error(e.message)}finally{o(!1)}},children:`退出`})]})]})}function Ke({client:e}){return de(e),e.progressText?(0,I.jsx)(n,{className:`request-status`,type:`info`,showIcon:!0,role:`status`,message:e.progressText}):null}function qe({client:e}){let[t,n]=(0,T.useState)(null),[r,i]=(0,T.useState)(null),[a,o]=(0,T.useState)(``),s=re(),[c,d]=(0,T.useState)(0),f=(0,T.useCallback)(()=>d(e=>e+1),[]);(0,T.useEffect)(()=>{let t=!0;return k(e).then(async r=>{if(!t)return;if(o(``),n(r),!r.user){i(null),ne(`login`,{keepSearch:!0});return}let a=await A(e);t&&(i(a),ne(`create`,{keepSearch:!0}))}).catch(e=>t&&o(e.message)),()=>{t=!1}},[e,c]);let p=(0,T.useCallback)(async()=>{let t=await A(e);return i(t),t},[e]);return a?(0,I.jsx)(u,{status:`warning`,title:`系统暂时没有连接上`,subTitle:a+` 请保持启动窗口打开,再刷新页面。`,extra:(0,I.jsx)(l,{type:`primary`,onClick:f,children:`重新连接`})}):t?!t.user||s===`login`&&!r?(0,I.jsx)(ae,{client:e,session:t,onLoggedIn:f}):r?(0,I.jsxs)(`div`,{className:`shell`,children:[(0,I.jsx)(Ge,{client:e,state:r,session:t,onLoggedOut:f}),(0,I.jsx)(Ke,{client:e}),(0,I.jsx)(`main`,{className:`main`,children:(0,I.jsx)(Ue,{client:e,state:r,session:t,refreshState:p,onAccountChanged:f},r.user.id)})]}):(0,I.jsx)(`div`,{className:`page-loading`,children:(0,I.jsx)(m,{tip:`正在读取店铺资料…`,size:`large`,children:(0,I.jsx)(`div`,{style:{height:80}})})}):(0,I.jsx)(`div`,{className:`page-loading`,children:(0,I.jsx)(m,{tip:`正在读取登录状态…`,size:`large`,children:(0,I.jsx)(`div`,{style:{height:80}})})})}var Je=Symbol(`mutationRetry`),Ye=[400,1200],Xe=25e3,Ze=[`/api/session`,`/api/login`,`/api/setup`,`/api/demo-login`];function Qe(e){return/^\/api\/print-status\/(order|recovery)\/[a-f0-9-]{36}$/.test(e)||[`/api/orders`,`/api/orders/issue`,`/api/people-count`,`/api/after-sales`,`/api/recoveries`,`/api/customer-materials`,`/api/material-purchases`,`/api/material-pools/rolling-enable`,`/api/price-locks`,`/api/order-templates`,`/api/reimbursements`,`/api/daily-funds/confirm`,`/api/team-funds/transfers`,`/api/team-funds/transfer`,`/api/stock`,`/api/inventory/review`,`/api/pockets`,`/api/close`,`/api/printing`,`/api/shop-settings`,`/api/employees`].includes(e)||[/^\/api\/pockets\/[^/]+\/update$/,/^\/api\/employees\/[^/]+\/(?:update|deactivate|reactivate|delete)$/,/^\/api\/orders\/[^/]+\/(?:edit|ownership|change|cancellation|canceltoday|confirm|receipt|refund|expense|fees|cost|deliver|complete|cancel|return|settlement|review|correct|print)$/,/^\/api\/(?:order-templates\/[^/]+\/(?:update|delete)|reimbursements\/[^/]+\/(?:update|approve|reject)|price-locks\/[^/]+\/(?:deliver|edit|cancel|change-requests)|price-lock-changes\/[^/]+\/(?:approve|reject)|material-purchases\/[^/]+\/(?:edit|delete|change)|material-pools\/\d{4}-\d{2}-\d{2}\/settlement|after-sales\/[^/]+\/update|after-sales\/changes\/[^/]+\/(?:approve|reject)|(?:order-changes|order-ownership-changes|order-cancellations|material-purchase-changes)\/[^/]+\/(?:approve|reject)|inventory\/movements\/[^/]+\/(?:update|delete)|inventory\/changes\/[^/]+\/(?:approve|reject))$/].some(t=>t.test(e))}function $e(){return Object.assign(Error(`登录账号已切换,请刷新后继续;原操作已暂停。`),{status:409,code:`ACCOUNT_CHANGED`})}var et=class{env;currentUser=``;progress=new Map;listeners=new Set;busy=!1;progressText=``;constructor(e){this.env=e}get user(){return this.currentUser}setUser(e){this.currentUser=e||``,this.emit()}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}emit(){for(let e of this.listeners)e()}showProgress(e,t=``){t?this.progress.set(e,t):this.progress.delete(e),this.progressText=[...this.progress].filter(([e])=>e.user===this.currentUser).sort(([e],[t])=>Number(e.write)-Number(t.write)).at(-1)?.[1]||``,this.emit()}async api(e,t,n,r){let i=!!t,a=i?JSON.stringify(t):void 0,o=e.startsWith(`/api/`)&&!Ze.includes(e)?r?.user||this.currentUser:``,s=!i||r?.permission===Je&&Qe(e)&&/^[a-zA-Z0-9_-]{16,100}$/.test(n||``),c={user:o||this.currentUser,write:i},l=()=>!o||this.currentUser===o;i&&r&&this.showProgress(c,`正在保存,请稍候…`);try{for(let t=0;;t++){if(!l())throw $e();let r=new AbortController,u=this.env.setTimeout(()=>r.abort(),Xe);try{let t=await this.env.fetch(e,{method:i?`POST`:`GET`,headers:{...i?{"Content-Type":`application/json`,"X-Requested-With":`maimai-ledger`,...n?{"Idempotency-Key":n}:{}}:{},...o?{"X-Ledger-User":o}:{}},...i?{body:a}:{},signal:r.signal});if([408,502,503,504].includes(t.status))throw Object.assign(Error(`服务器暂时没有响应(`+t.status+`)`),{status:t.status,retryable:!0});let s;try{s=await t.json()}catch(e){if(t.ok)throw e.retryable=!0,e;s=null}if(!t.ok){let e=s,n=!!e&&typeof e.error==`string`;throw Object.assign(Error(n?e.error:`请求被拒绝(`+t.status+`),服务器未返回可确认的业务结果。`),{confirmed:n,status:t.status,...e?.code?{code:e.code}:{}})}if(!l())throw Object.assign($e(),{completed:!0});return s}catch(e){let n=e;if(!l()&&n.code!==`ACCOUNT_CHANGED`)throw $e();let r=n.retryable||!n.status&&[`TypeError`,`AbortError`,`TimeoutError`].includes(n.name);if(!s||!r||t>=Ye.length)throw n;this.showProgress(c,`连接暂时中断,正在自动`+(i?`确认`:`重连`)+`(`+(t+1)+`/2)…`),await new Promise(e=>this.env.setTimeout(e,Ye[t]))}finally{this.env.clearTimeout(u)}}}finally{this.showProgress(c)}}pendingKey(e=this.currentUser){return`mm-pending-${e}`}pending(){try{return JSON.parse(this.env.storage.getItem(this.pendingKey())||`null`)}catch{return null}}clearPendingJob(e,t){try{JSON.parse(this.env.storage.getItem(e)||`null`)?.key===t.key&&this.env.storage.removeItem(e)}catch{}}async mutate(e,t,n){if(this.busy)throw Error(`正在保存,请稍候`);if(this.pending()&&!n)throw Error(`请先点击顶部“恢复原操作”,确认上次提交结果`);let r=this.currentUser;if(!r)throw Error(`请先登录后再保存`);let i=JSON.parse(JSON.stringify(n||{url:e,data:t,key:this.env.randomUUID(),userId:r})),a=this.pendingKey();if(n&&(i.userId&&i.userId!==r||JSON.stringify(this.pending())!==JSON.stringify(n)))throw Error(`待恢复操作与当前账号不匹配,请刷新后核对。`);this.busy=!0;try{this.env.storage.setItem(a,JSON.stringify(i)),this.emit();let e=await this.api(i.url,i.data,i.key,{permission:Je,user:r});return this.clearPendingJob(a,i),e}catch(e){let t=e;throw(t.completed||t.code!==`ACCOUNT_CHANGED`&&t.confirmed&&[400,403,404,409,413].includes(t.status??0))&&this.clearPendingJob(a,i),t.code!==`ACCOUNT_CHANGED`&&(t.status===401?t.message=`登录已过期,请刷新并登录,再恢复原操作。`:!t.confirmed&&(!t.status||t.retryable)?t.message=`连接中断,提交结果待确认。请点“恢复原操作”,不要重新开单。`:t.confirmed||(t.message+=` 提交结果仍待确认,请保留原操作。`)),t}finally{this.busy=!1,this.emit()}}async retryPending(){let e=this.pending();return e?{job:e,result:await this.mutate(e.url,e.data,e)}:null}};function tt(){return new et({fetch:(e,t)=>window.fetch(e,t),storage:window.localStorage,setTimeout:(e,t)=>window.setTimeout(e,t),clearTimeout:e=>window.clearTimeout(e),randomUUID:()=>window.crypto.randomUUID()})}D.default.locale(`zh-cn`);var nt=tt();(0,E.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(T.StrictMode,{children:(0,I.jsx)(b,{locale:O.default,theme:{token:{colorPrimary:`#9a6a2f`,borderRadius:8,fontSize:15}},componentSize:`middle`,children:(0,I.jsx)(f,{children:(0,I.jsx)(qe,{client:nt})})})})); \ No newline at end of file diff --git a/新账系统/web/dist/assets/index-Bz-jy7Ju.js b/新账系统/web/dist/assets/index-Bz-jy7Ju.js new file mode 100644 index 0000000..9265293 --- /dev/null +++ b/新账系统/web/dist/assets/index-Bz-jy7Ju.js @@ -0,0 +1,3 @@ +import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{A as n,B as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,R as m,S as h,T as g,_,a as v,b as y,c as b,d as x,f as S,g as C,h as w,i as T,j as E,k as D,l as O,m as k,n as A,o as j,p as M,r as ee,s as te,t as ne,u as re,v as N,w as ie,x as ae,y as P}from"./antd-CHeDoVQW.js";import{n as oe,t as se}from"./react-DKzIiI9e.js";var ce=t(((e,t,n)=>{var r;(function(n,i){typeof e==`object`&&t!==void 0?t.exports=i():typeof r==`function`&&r.amd?r(i):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=i()})(n,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){var r;(function(n,i){typeof e==`object`&&t!==void 0?t.exports=i(ce()):typeof r==`function`&&r.amd?r([`dayjs`],i):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=i(n.dayjs)})(n,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),I=e(r(),1),le=oe(),ue=e(ce(),1),de=e(re(),1);F();async function fe(e){let t=await e.api(`/api/session`);return e.setUser(t.user?.id||``),t}async function pe(e){return e.api(`/api/state`)}async function me(e,t,n){if(!t)throw Error(`请选择登录账号`);if(!n)throw Error(`请输入密码`);return e.api(`/api/login`,{member:t,password:n})}async function he(e,t){return e.api(`/api/demo-login`,{member:t})}function ge(e){let t={storeName:e.storeName.trim(),ownerLabel:e.ownerLabel.trim(),ownerLoginName:e.ownerLoginName.trim(),ownerPassword:e.ownerPassword};if(!t.storeName||t.storeName.length>80)throw Error(`店铺名称请填写1~80字`);if(!t.ownerLabel||t.ownerLabel.length>30)throw Error(`店主显示名请填写1~30字`);if(!t.ownerLoginName||t.ownerLoginName.length>60)throw Error(`店主登录名请填写1~60字`);if(t.ownerPassword.length<12)throw Error(`店主密码至少12个字符`);return t}async function _e(e,t){return ge(t),e.api(`/api/setup`,t)}async function ve(e){if(e.pending())throw Error(`请先恢复上次未确认的操作,再退出`);await e.api(`/api/logout`,{}),e.setUser(``)}function ye(e,t){return e?.shopSettings?.storeName||e?.printing?.store||t?.brand?.storeName||`珠宝台账`}function be(e){return e.replace(/\/+$/,``)===`/next/login`?`login`:`create`}function xe(e,{keepSearch:t=!1}={}){let n=(e===`login`?`/next/login`:`/next/`)+(t?window.location.search:``);window.location.pathname+window.location.search!==n&&window.history.pushState(null,``,n),window.dispatchEvent(new Event(`next-route`))}function Se(){let[e,t]=(0,I.useState)(()=>be(window.location.pathname));return(0,I.useEffect)(()=>{let e=()=>t(be(window.location.pathname));return window.addEventListener(`popstate`,e),window.addEventListener(`next-route`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`next-route`,e)}},[]),e}function Ce(e){return new URLSearchParams(window.location.search).get(e)||``}var L=se();function we({name:e,size:t=`md`}){return(0,L.jsx)(`span`,{className:`brand-mark brand-mark-`+t,"aria-hidden":`true`,children:Array.from(e)[0]||`店`})}var Te={exports:{}};(function(e){let t=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(e);function n(e,t,n){let r=String(e??``).trim();if(!RegExp(`^\\d+(?:\\.\\d{1,`+t+`})?$`).test(r))throw Error(n+`须为非负数字,最多`+t+`位小数`);let[i,a=``]=r.split(`.`),o=BigInt(i)*10n**BigInt(t)+BigInt(a.padEnd(t,`0`));if(o>100000000000n)throw Error(n+`超出支持范围`);return o}function r(e,t=`金额`){return Number(n(e,2,t))}let i=e=>[`足银999`,`纯银925`].includes(e);function a(e=[]){if(!Array.isArray(e)||e.length>100)throw Error(`每行最多填写100项附加项目`);let t=[],n=0;for(let i of e){if(!i||typeof i!=`object`)throw Error(`附加项目格式无效`);let e=i.id==null?``:String(i.id);if(e&&!/^[a-f0-9-]{36}$/.test(e))throw Error(`附加项目标识无效`);if(i.costRemoved!==void 0&&typeof i.costRemoved!=`boolean`)throw Error(`内部成本移除标记无效`);let a=i.amount==null||i.amount===``,o=String(i.name??``).trim();if(a&&(!e||!o))continue;if(!o||o.length>40)throw Error(`附加项目名称须为1~40字`);let s=a?null:r(i.amount,`附加项目金额`);t.push({...e?{id:e}:{},name:o,amount:s,...i.costRemoved===!0?{costRemoved:!0}:{}}),n+=s||0}if(n>1e11)throw Error(`附加项目合计超出支持范围`);return{items:t,total:n}}function o(e){let t=e.pricingMode===`auto`?c(e):null,n=t?t.sale:r(e.baseSale??e.sale,`商品基础金额`),i=a(e.charges),o=n+i.total;if(o>1e11)throw Error(`本行销售额超出支持范围`);return{...t||{},baseSale:n,charges:i.items,chargesTotal:i.total,sale:o}}function s(e,t=0,n=`yuan`){let r=100000000000n;if(!Array.isArray(e)||e.length<1||e.length>60)throw Error(`每单需要1~60行商品`);if(![`yuan`,`cent`].includes(n))throw Error(`整单金额取整方式无效`);if(!Number.isSafeInteger(t)||t<0||BigInt(t)>r)throw Error(`整单优惠须为范围内的非负整数分`);let i=0n;for(let t of e){if(!Number.isSafeInteger(t)||t<0||BigInt(t)>r)throw Error(`商品行金额须为范围内的非负整数分`);i+=BigInt(t)}if(i>r)throw Error(`整单销售合计超出支持范围`);let a=i-BigInt(t);if(a<=0n)throw Error(`优惠后成交额必须大于0`);let o=n===`yuan`?(a+50n)/100n*100n:a;if(o<=0n)throw Error(`整单四舍五入后成交额必须大于0元,请核对销售金额`);if(o>r)throw Error(`整单销售合计超出支持范围`);return{subtotal:Number(i),discount:t,unroundedTotal:Number(a),total:Number(o),rounding_mode:n,rounding_adjustment:Number(o-a)}}function c(e){if(e.unit!==`g`)throw Error(`按金价计算需要填写克重;按件报价请选择直接填金额`);let t=n(e.quantity,3,`克重`);if(t<=0n)throw Error(`克重必须大于0`);let r=n(e.goldPrice,2,`金价`),i=n(e.laborRate,2,`销售工费`);if(![`gram`,`piece`].includes(e.laborMode))throw Error(`请选择克工费或件工费`);let a=1n;if(e.laborMode===`piece`){if(!/^\d+$/.test(String(e.pieces??`1`)))throw Error(`件数须为正整数`);if(a=BigInt(e.pieces??1),a<1n||a>1000000n)throw Error(`件数须为1~1000000的整数`)}let o=(t*r+(e.laborMode===`gram`?t*i:a*i*1000n)+500n)/1000n;if(o>100000000000n)throw Error(`本行销售额超出支持范围`);return{sale:Number(o),goldPrice:Number(r),laborRate:Number(i),laborMode:e.laborMode,pieces:Number(a)}}let l={material:`料费成本`,labor:`进货工费`,accessories:`配件成本`,other:`其他货品成本`};function u(e){if(e!==void 0){if(!e||typeof e!=`object`||Array.isArray(e)||Object.keys(e).some(e=>![`material`,`labor`].includes(e)))throw Error(`料费和进货工费付款人无效`);for(let n of[`material`,`labor`])if(!Object.hasOwn(e,n)||!t(e[n]))throw Error(l[n]+`付款人无效`);return{material:e.material,labor:e.labor}}}function d(e){let t={},n=0,i=!1;for(let[a,o]of Object.entries(l))t[a]=e?.[a]==null||e[a]===``?null:r(e[a],o),t[a]===null?i=!0:n+=t[a];if(n>1e11)throw Error(`货品成本超出支持范围`);return{parts:t,total:i?null:n}}function f(e){let t={...e.costParts},r=(r,i,a,o,s,c)=>{let l=i?.mode||`total`;if(![`gram`,`total`].includes(l))throw Error(s);let u={mode:l};if(l===`gram`){if(e.unit!==`g`)throw Error(c);let s=i?.rate,l=s==null||s===``?null:n(s,2,a);if(u.rate=l===null?null:Number(l),l===null)t[r]=``;else{let i=n(e.quantity,3,`克重`);if(i<=0n)throw Error(`克重必须大于0`);let a=(i*l+500n)/1000n;if(a>100000000000n)throw Error(o+`超出支持范围`);t[r]=`${a/100n}.${String(a%100n).padStart(2,`0`)}`}}return u},a;if(e.costMaterial?.mode===`pool`){if(e.unit!==`g`||i(e.name))throw Error(`日购料成本只支持按克黄金商品`);let n=String(e.costMaterial.poolId??``);if(!/^\d{4}-\d{2}-\d{2}$/.test(n))throw Error(`请选择日购料日期`);a={mode:`pool`,poolId:n};let r=e.materialPool?.amount;t.material=Number.isSafeInteger(r)&&r>=0?(r/100).toFixed(2):``}else a=r(`material`,e.costMaterial,`进货料价`,`料费总成本`,`请选择每克料价或料费总成本`,`每克料价需要克重,按件商品请填写料费总成本`);let o=r(`labor`,e.costLabor,`进货克工费`,`进货总工费`,`请选择进货克工费或总工费`,`进货克工费需要克重,按件商品请填写总工费`);return{...d(t),costMaterial:a,costLabor:o}}function p(e,t,n){for(let r of[e,t,n])if(!Number.isSafeInteger(r)||r<0||r>1e11)throw Error(`日购料金额或克重无效`);if(!t)throw Error(`日购料尚未登记克重`);let r=(BigInt(e)*BigInt(n)+BigInt(t)/2n)/BigInt(t);if(r>100000000000n)throw Error(`日购料成本超出支持范围`);return Number(r)}function m(e,t,{orderId:n=null,allUsages:r=e.usages||[]}={}){let i=e=>Number.isSafeInteger(e)&&e>=0&&e<=1e11;if(!i(e.totalAmount)||!i(e.totalMg)||!Array.isArray(t)||!Array.isArray(e.usages)||!Array.isArray(r))throw Error(`日购料预估记录无效,请刷新料价`);let a=new Set;for(let e of t){if(!Number.isSafeInteger(e.lineIndex)||e.lineIndex<0||a.has(e.lineIndex)||!i(e.mg)||!e.mg)throw Error(`日购料预估克重或商品行无效`);a.add(e.lineIndex)}let o=n?r.filter(e=>e.order_id===n):[],s=e.usages.filter(e=>e.active&&(!n||e.order_id!==n)).map(e=>({...e})),c=s.reduce((e,t)=>e+t.mg,0),l=t.reduce((e,t)=>e+t.mg,0),u=e.totalMg>0&&c+l<=e.totalMg,d=Object.fromEntries(t.map(e=>[e.lineIndex,null]));for(let e of t){let t=o.find(t=>t.line_index===e.lineIndex);s.push({...t,mg:e.mg,previewIndex:e.lineIndex,appended:!t})}for(let e of s)if(!i(e.mg)||!e.mg||!e.appended&&(!Number.isSafeInteger(e.fifo_sequence)||e.fifo_sequence<1||typeof e.created!=`string`||!e.created))throw Error(`日购料耗用顺序尚未读到,请刷新料价`);if(s.sort((e,t)=>Number(!!e.appended)-Number(!!t.appended)||(e.appended?e.previewIndex-t.previewIndex:e.createdt.created?1:e.fifo_sequence-t.fifo_sequence)),u){let t=0,n=0;for(let r of s){t+=r.mg;let i=p(e.totalAmount,e.totalMg,t);r.previewIndex!==void 0&&(d[r.previewIndex]=i-n),n=i}}return{amounts:d,usedMg:c,wantedMg:l,covered:u}}function h(e){let t=n(e.lockedQuantity,3,`锁定克重`),r=n(e.quantity,3,`实际克重`),i=n(e.buyRate,2,`原进货料价`);if(t<=0n||r<=0n)throw Error(`锁定克重和实际克重必须大于0`);if(i<=0n)throw Error(`原进货料价必须大于0`);let a=rt?r-t:0n,s=o?n(e.extraBuyRate,2,`补重进货料价`):0n;if(o&&s<=0n)throw Error(`补重进货料价必须大于0`);let c=(e,t)=>(e*t+500n)/1000n,l=c(t,i),u=c(a,i),d=c(o,s);if([l,u+d].some(e=>e>100000000000n))throw Error(`锁价料费成本超出支持范围`);return{lockedMg:Number(t),finalMg:Number(r),originalUsedMg:Number(a),extraMg:Number(o),leftoverMg:Number(t-a),originalPurchase:Number(l),originalUsedCost:Number(u),extraCost:Number(d),materialCost:Number(u+d),leftoverCost:Number(l-u)}}function g(e){let n=()=>({goods:0,goodsMissing:0,paidFees:0,pendingFees:0,pendingMissing:0,total:0,missing:0}),r={owner:n(),assistant:n(),assistant2:n()},i=[],a=[`returned`,`cancelled`].includes(e.status),o=e=>{if(i.push(e),e.excluded)return;if(!t(e.payer))throw Error(`成本付款人无效`);let a=r[e.payer]||(r[e.payer]=n());e.kind===`goods`&&(e.amount==null?a.goodsMissing++:a.goods+=e.amount),e.kind===`paid`&&(a.paidFees+=e.amount),e.kind===`pending`&&(e.amount==null?a.pendingMissing++:a.pendingFees+=e.amount)};for(let[n,r]of e.lines.entries()){let e=u(r.costPayers),i=r.costParts?Object.entries(l).map(([e,t])=>({key:e,name:t,amount:r.costParts[e]??null})):[{key:`total`,name:`货品成本(原单未分项)`,amount:r.cost??null}];for(let s of i)if(s.key===`material`&&(r.priceLockPool||r.priceLockExtraPool)&&s.amount===null)o({kind:`goods`,component:`material`,name:s.name,source:`锁价料池成本待补`,amount:null,payer:e?.material??r.payer,excluded:a,materialPoolId:(r.priceLockExtraPool?.amount===null?r.priceLockExtraPool:r.priceLockPool||r.priceLockExtraPool).poolId,poolPending:!0,calculation:null});else if(s.key===`material`&&r.costMaterial?.mode===`pool`){let i=r.materialPool,c=i?.allocations;if(s.amount===null||!c?.length)o({kind:`goods`,component:`material`,name:s.name,source:`商品 ${n+1} · ${r.name} · ${r.costMaterial.poolId}日购料待补`,amount:null,payer:e?.material??r.payer,excluded:a,materialPoolId:r.costMaterial.poolId,materialPoolRevision:i?.revision,poolPending:!0,calculation:null});else{if(!Array.isArray(c)||c.some(e=>!t(e.payer)||!Number.isSafeInteger(e.amount)||e.amount<0)||c.reduce((e,t)=>e+t.amount,0)!==s.amount)throw Error(`日购料分项成本记录无效`);for(let e of c)o({kind:`goods`,component:`material`,name:s.name,source:`商品 ${n+1} · ${r.name} · ${r.costMaterial.poolId}日购料`,amount:e.amount,payer:e.payer,excluded:a,materialPoolId:r.costMaterial.poolId,materialPoolRevision:i?.revision,calculation:{rate:i.averageRate,quantity:i.quantity??r.quantity,weighted:!0}})}}else if(s.key===`material`&&r.materialAllocations){let e=r.materialAllocations;if(!Array.isArray(e)||!e.length||e.some(e=>![`original`,`extra`].includes(e.source)||!t(e.payer)||!Number.isSafeInteger(e.amount)||e.amount<0||!Number.isSafeInteger(e.quantity)||e.quantity<=0||!Number.isSafeInteger(e.rate)||e.rate<=0)||e.reduce((e,t)=>e+t.amount,0)!==s.amount)throw Error(`锁价分项料费记录无效`);for(let t of e)o({kind:`goods`,component:`material`,name:s.name,source:`商品 ${n+1} · ${r.name} · ${t.source===`original`?t.weighted?`原锁日料池`:`原锁价采购`:t.weighted?`交付日补重料池`:`补重采购`}`,amount:t.amount,payer:t.payer,excluded:a,priceLockSource:t.source,...t.poolId?{materialPoolId:t.poolId}:{},calculation:{rate:t.rate,quantity:t.quantity,...t.weighted?{weighted:!0}:{}}})}else o({kind:`goods`,name:s.name,source:`商品 ${n+1} · ${r.name}`+(s.key===`labor`&&r.returnedStock?` · 退回现货继承工费`:``),amount:s.amount,payer:e?.[s.key]??r.payer,excluded:a,...s.key===`labor`&&r.returnedStock?{inheritedStockCost:!0,returnedStockId:r.returnedStockId}:{},calculation:s.key===`material`&&r.recovery_id&&r.costMaterial?.rate!==void 0?{rate:r.costMaterial.rate,quantity:r.recoveryMaterialMg}:s.key===`material`&&r.costMaterial?.mode===`gram`?{rate:r.costMaterial.rate,quantity:r.quantity}:s.key===`labor`&&r.costLabor?.mode===`gram`?{rate:r.costLabor.rate,quantity:r.quantity}:null})}let s=new Set((e.corrections||[]).filter(e=>e.type===`expense`).map(e=>e.target));for(let t of e.expenses||[])t.amount>0&&!s.has(t.id)&&o({kind:`paid`,name:t.note,source:t.date,amount:t.amount,payer:t.payer});let c=t=>{let n=e.lines.findIndex(e=>(e.charges||[]).some(e=>`charge:`+e.id===t.key));return n<0?`整单费用`:`商品 ${n+1} · ${e.lines[n].name}`};for(let t of e.pendingFees||[])o({kind:`pending`,name:t.note,source:c(t),amount:t.amount,payer:t.payer});for(let t of e.fee_items||[])t.status===`recorded`&&t.amount===0&&o({kind:`zero`,name:t.note,source:c(t),amount:0,payer:t.payer});let d=n();for(let e of Object.values(r)){e.total=e.goods+e.paidFees+e.pendingFees,e.missing=e.goodsMissing+e.pendingMissing;for(let t of Object.keys(d))d[t]+=e[t]}return{byPayer:r,total:d,rows:i,goodsExcluded:a,pendingCount:(e.pendingFees||[]).length}}let _={calculate:c,cents:r,isSilver:i,costs:d,costLabels:l,costPayers:u,normalizeCostPayers:u,charges:a,sale:o,orderTotal:s,purchaseCosts:f,poolMaterialAmount:p,poolMaterialPreview:m,priceLockCost:h,orderCosts:g};typeof Te==`object`&&Te.exports?Te.exports=_:e.LedgerCalc=_})(typeof globalThis==`object`?globalThis:void 0);var Ee=Te.exports,De={exports:{}};(function(e){let t=e=>[`助理信用卡`,`助理1信用卡`,`麦麦信用卡`,`助理2信用卡`].includes(e);function n(e=6){if(!Number.isSafeInteger(e)||e<0||e>1e3)throw Error(`信用卡手续费率须为0~1000的整数‰`);return e}let r=e=>t(e)?`麦麦信用卡`:e,i=(e=6)=>`信用卡手续费(${n(e)}‰)`,a=e=>e?.system===`credit_card`||String(e?.key||``).startsWith(`card_fee:`);function o(e,t=6){if(!Number.isSafeInteger(e)||e<0||e>1e11)throw Error(`客户付款金额无效`);return Number((BigInt(e)*BigInt(n(t))+500n)/1000n)}let s={isAccount:t,isFee:a,amount:o,rate:n,ratePermille:6,normalizeAccount:r,note:i};typeof De==`object`&&De.exports?De.exports=s:e.CreditCardFees=s})(typeof globalThis==`object`?globalThis:void 0);var Oe=De.exports,ke={"./calculations":Ee},Ae=e=>{if(!Object.prototype.hasOwnProperty.call(ke,e))throw Error(`未知依赖 `+e);return ke[e]},R={exports:{}};(function(e){let t=typeof R==`object`&&R.exports?Ae(`./calculations`):e.LedgerCalc,n={证书:`4`,包装:`3`,快递:`6`},r=e=>({包装盒:`包装`,快递费:`快递`,运费:`快递`})[e]||e;function i(e){let t=String(e||``).trim();return[`快递`,`快递费`,`运费`,`京东快递`,`圆通快递`].includes(t)?`shipping`:[`包装`,`包装盒`,`盒子`].includes(t)||/^盒子(\d+个 × [\d.]+元\/个)$/.test(t)?`box`:[`钢绳`,`钢绳(店里)`,`钢绳(店里)`].includes(t)?`braiding`:[`银链`,`银链(家里)`,`银链(家里)`].includes(t)?`silverChain`:``}function a(e){let t=String(e??``).trim(),n=Number(t);if(!/^\d+$/.test(t)||!Number.isSafeInteger(n)||n<1||n>333333333)throw Error(`盒子数量须为支持范围内的正整数`);return n}let o=Object.freeze({jd:{amount:`8`,payer:`owner`},yt:{amount:`6`,payer:`order`},box:{amount:`3`,payer:`owner`},steel:{amount:`7`,payer:`owner`},silver:{amount:`18`,payer:`owner`}}),s=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9-]{36}$/.test(e),c={jd:`京东快递`,yt:`圆通快递`,box:`盒子`,steel:`钢绳(店里)`,silver:`银链(家里)`};function l(e){return Object.fromEntries(Object.entries(e===void 0?o:e).filter(([e])=>Object.hasOwn(o,e)||/^custom_[a-f0-9-]{36}$/.test(e)).map(([e,t])=>[e,{...o[e],...t}]))}function u(e){return Object.fromEntries(Object.entries(l(e)).map(([e,t])=>[e,{name:c[e]||``,enabled:!0,byQuantity:e===`box`,...t}]))}function d(e){return e!==void 0&&Object.keys(o).some(t=>!Object.hasOwn(e,t))||Object.entries(e||{}).some(([e,t])=>!Object.hasOwn(o,e)||[`name`,`enabled`,`byQuantity`].some(e=>Object.hasOwn(t,e)))}function f(e){return{jd:`shipping`,yt:`shipping`,box:`box`,steel:`braiding`,silver:`other`}[e]||`manual:`+e.slice(7)}function p(e,n,r,i){let o=u(i)[e];if(!o||!o.enabled)throw Error(`成本项目已停用,请重新核对`);let s=o.byQuantity?a(n):1,c=t.cents(String(o.amount),`常用成本`)*s;if(!Number.isSafeInteger(c)||c>1e11)throw Error(`常用成本金额超出支持范围`);return{key:f(e),note:o.byQuantity?`${o.name}(${s}个 × ${o.amount}元/个)`:o.name,amount:(c/100).toFixed(2).replace(/\.00$/,``),payer:o.payer===`order`?r:o.payer,status:`estimated`,edited:!0}}function m(e,n){for(let[r,i]of Object.entries(u(n))){if(!i.enabled||e.key!==f(r))continue;let a=i.byQuantity?String(e.note).match(/(([^)]*)个 × [\d.]+元\/个)$/)?.[1]:`1`;try{let i=p(r,a,e.payer,n);if(i.note===e.note&&i.payer===e.payer&&(e.amount===``||t.cents(String(e.amount))===t.cents(i.amount)))return r}catch{}}return``}function h(e,{recorded:n=!1,presets:r}={}){let i=l(r),o=t=>i[t].payer===`order`?s(e?.payer):e?.payer===i[t].payer;if(!e||e.expense_id&&!n||e.funding)return``;if(d(r))return m(e,r);if(e.key===`shipping`&&e.note===`京东快递`&&Number(e.amount)===Number(i.jd.amount)&&o(`jd`))return`jd`;if(e.key===`shipping`&&e.note===`圆通快递`&&Number(e.amount)===Number(i.yt.amount)&&o(`yt`))return`yt`;if(e.key===`braiding`&&e.note===`钢绳(店里)`&&Number(e.amount)===Number(i.steel.amount)&&o(`steel`))return`steel`;if(e.key===`other`&&e.note===`银链(家里)`&&Number(e.amount)===Number(i.silver.amount)&&o(`silver`))return`silver`;let c=e.key===`box`&&String(e.note).match(/^盒子(([^)]*)个 × ([\d.]+)元\/个)$/);if(c&&Number(c[2])===Number(i.box.amount)&&o(`box`)){if(e.amount===``)return`box`;try{if(t.cents(String(e.amount),`盒子成本`)===a(c[1])*t.cents(String(i.box.amount),`盒子单价`))return`box`}catch{}}return``}function g({shipping:e=``,box:n=!1,quantity:r=`1`,steel:i=!1,silver:o=!1}={},c=`assistant`,u){let d=l(u),f=[],p=e=>d[e].payer===`order`?s(c)?c:`assistant`:d[e].payer,m=(e,n,r,i=1)=>{let a=t.cents(String(d[e].amount),`常用成本`)*i;if(!Number.isSafeInteger(a)||a>1e11)throw Error(`常用成本金额超出支持范围`);f.push({key:n,note:r,amount:(a/100).toFixed(2).replace(/\.00$/,``),payer:p(e),status:`estimated`,edited:!0})};if(e===`jd`?m(`jd`,`shipping`,`京东快递`):e===`yt`&&m(`yt`,`shipping`,`圆通快递`),n){let e=a(r);m(`box`,`box`,`盒子(${e}个 × ${d.box.amount}元/个)`,e)}return i&&m(`steel`,`braiding`,`钢绳(店里)`),o&&m(`silver`,`other`,`银链(家里)`),f}function _(e,t,{addShipping:a=!1,defaultPayer:o=`assistant`,shopDefaults:s={},checkboxCosts:c=!1}={}){let l={证书:s.certificate??n.证书,包装:s.packaging??n.包装,快递:s.shipping??n.快递},u=[`owner`,`assistant`,`assistant2`].includes(s.packagingPayer)||/^staff_[a-f0-9-]{36}$/.test(s.packagingPayer)?s.packagingPayer:`owner`,d=e.map(e=>({...e})),f=[];for(let[e,n]of t.entries())for(let t of n.charges||[]){let n=String(t.name||``).trim();if(!t.id||!n||t.costRemoved===!0)continue;let a=r(n);if(c&&i(n))continue;if(a===`快递`){d.some(e=>e.key===`shipping`)||d.push({key:`shipping`,note:`快递费`,amount:l.快递,payer:o,status:`estimated`,edited:!1});continue}let s=`charge:`+t.id,p=d.findIndex(e=>e.key===s);p<0&&(p=d.findIndex(e=>!e.key.startsWith(`charge:`)&&e.key!==`shipping`&&r(e.note)===a));let m=p<0?null:d.splice(p,1)[0],h=m&&(m.edited||m.sourceName===n||!m.sourceName)?m.amount:l[a]??``,g=!m||!m.edited&&m.sourceName&&r(m.sourceName)!==a?a===`包装`?u:o:m.payer||o;f.push({...m,key:s,note:n,sourceName:n,lineNumber:e+1,amount:h,payer:g,status:m?.status||`estimated`,edited:m?.edited||!1})}let p=new Set(t.flatMap(e=>(e.charges||[]).filter(e=>i(e.name)).map(e=>`charge:`+e.id))),m=d.filter(e=>!e.key.startsWith(`charge:`)||c&&(i(e.sourceName||e.note)||p.has(e.key))),h=t.some(e=>(e.charges||[]).some(e=>e.costRemoved===!0&&r(String(e.name||``).trim())===`快递`));return a&&!c&&!h&&!m.some(e=>e.key===`shipping`)&&m.unshift({key:`shipping`,note:`快递费`,amount:l.快递,payer:o,status:`estimated`,edited:!1}),[...m,...f]}let v={presetCatalog:u,customPresets:d,presetKey:f,presetFee:p,sync:_,defaults:n,normalize:r,checkboxCategory:i,boxCount:a,presetKind:h,presetDefaults:o,presets:l,checkboxFees:g};typeof R==`object`&&R.exports?R.exports=v:e.FeeEstimates=v})(typeof globalThis==`object`?globalThis:void 0);var je=R.exports,Me={"./calculations":Ee},Ne=e=>{if(!Object.prototype.hasOwnProperty.call(Me,e))throw Error(`未知依赖 `+e);return Me[e]},z={exports:{}};(function(e){let t=typeof z==`object`&&z.exports?Ne(`./calculations`):e.LedgerCalc,n=e=>{let[t,n=``]=e.split(`.`);return(t.replace(/^0+(?=\d)/,``)||`0`)+(n.replace(/0+$/,``)?`.`+n.replace(/0+$/,``):``)},r=e=>e.normalize(`NFKC`).replace(/\\\*/g,`*`).replace(/[×✕xX]/g,`*`).replace(/\s/g,``).replace(/\\+$/,``).replace(/元$/,``),i=`(\\d+(?:\\.\\d+)?)`,a=`((?:\\+\\d+(?:\\.\\d+)?)*)`,o=`(?:=`+i+`)?$`,s=i+`(?:克|g)?\\*`,c=RegExp(`^`+s+`\\(`+i+`\\+`+i+`\\)`+a+o,`i`),l=RegExp(`^`+s+i+`\\+`+i+a+o,`i`),u=e=>t.cents(n(e),`公式金额`);function d(e,{roundingMode:i=`yuan`}={}){if(typeof e!=`string`||e.length>300)throw Error(`每行请填写300字以内的销售公式`);let a=r(e),o=c.exec(a),s=o||l.exec(a);if(!s)throw Error(`请填写“克重×(金价+克工费)+附加费”或“克重×金价+件工费”;可在末尾写=金额`);let[,d,f,p,m,h]=s,g=m?m.slice(1).split(`+`):[];if(g.length>100)throw Error(`每件商品最多100项附加费`);let _={unit:`g`,pricingMode:`auto`,quantity:n(d),goldPrice:n(f),laborMode:o?`gram`:`piece`,laborRate:n(p),pieces:`1`,charges:g.map(e=>({name:`附加费`,amount:n(e)}))},v=t.sale(_),y=t.orderTotal([v.sale],0,i),b=h===void 0?null:u(h);return{formula:a,line:_,subtotal:v.sale,total:y.total,roundingMode:i,roundingAdjustment:y.rounding_adjustment,statedTotal:b,mismatch:b!==null&&b!==y.total}}function f(e,{roundingMode:n=`yuan`}={}){if(typeof e!=`string`||e.length>18e3)throw Error(`请填写18000字以内的公式,每件商品一行`);let i=e.split(/\r\n?|\n/).map(e=>e.trim()).filter(Boolean);if(!i.length||i.length>61)throw Error(`请填写1~60件商品公式,可在最后另写一行合计`);let a=[],o=[],s=null;i.forEach((e,t)=>{let c=r(e).replace(/^(?:合计|总价|总计|总金额):?/,``).match(/^(\d+(?:\.\d+)?(?:\+\d+(?:\.\d+)?)+)(?:=(\d+(?:\.\d+)?))?$/);if(c){if(!a.length||t!==i.length-1)throw Error(`合计公式只能放在全部商品之后的最后一行`);let e=c[1].split(`+`).map(u),n=e.reduce((e,t)=>e+t,0);if(!Number.isSafeInteger(n)||n>1e11)throw Error(`合计金额超出支持范围`);s={amounts:e,sum:n,statedTotal:c[2]===void 0?n:u(c[2])},(e.length!==a.length||e.some((e,t)=>e!==(a[t]?.statedTotal??a[t]?.total)))&&o.push(`合计行的加数与各商品金额不对应,请核对是否漏了一件或重复相加。`),s.statedTotal!==n&&o.push(`合计行左右金额不相等,请核对。`)}else{if(a.length>=60)throw Error(`每单最多60件商品`);let r;try{r=d(e,{roundingMode:n})}catch(e){throw Error(`第`+(t+1)+`行:`+e.message)}a.push(r),r.mismatch&&o.push(`商品 `+a.length+` 写的是 `+(r.statedTotal/100).toFixed(2)+`元,按当前取整规则计算为 `+(r.total/100).toFixed(2)+`元。`)}});let c=t.orderTotal(a.map(e=>e.subtotal),0,n);return s&&s.statedTotal!==c.total&&o.push(`公式合计为 `+(s.statedTotal/100).toFixed(2)+`元;系统先合计各件精确金额,再整单取整,结果为 `+(c.total/100).toFixed(2)+`元。`),{items:a,lines:a.map(e=>e.line),summary:s,subtotal:c.subtotal,total:c.total,roundingMode:n,roundingAdjustment:c.rounding_adjustment,warnings:o,mismatch:o.length>0}}let p={parse:d,parseBatch:f};typeof z==`object`&&z.exports?z.exports=p:e.OrderFormula=p})(typeof globalThis==`object`?globalThis:void 0);var Pe=z.exports,Fe={"./fee-estimates":je,"./credit-card-fees":Oe},Ie=e=>{if(!Object.prototype.hasOwnProperty.call(Fe,e))throw Error(`未知依赖 `+e);return Fe[e]},B={exports:{}};(function(e,t){let n=t(typeof B==`object`&&B.exports?Ie(`./fee-estimates`):e.FeeEstimates,typeof B==`object`&&B.exports?Ie(`./credit-card-fees`):e.CreditCardFees);typeof B==`object`&&B.exports?B.exports=n:e.OrderTemplates=n})(typeof globalThis==`object`?globalThis:void 0,function(e,t){let n=[`足金999`,`足银999`,`纯银925`],r=[`编绳`,`证书`,`包装`,`快递`,`附加费`],i=[``,`现货`,`金料`,`找金`,`回收旧料`,`君宝汇`],a=[`助理2微信`,`助理2支付宝`,`助理2现金`,`助理2信用卡`,`助理微信`,`助理支付宝`,`助理现金`,`助理信用卡`,`麦麦微信`,`麦麦支付宝`,`麦麦现金`,`麦麦信用卡`],o=e=>t?.normalizeAccount?t.normalizeAccount(e):[`助理信用卡`,`助理1信用卡`,`助理2信用卡`,`麦麦信用卡`].includes(e)?`麦麦信用卡`:e,s=e=>e?.system===`credit_card`||String(e?.key||``).startsWith(`card_fee:`),c=/^[a-f0-9-]{36}$/;function l(e,t){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(t+`格式无效`);return e}function u(e,t,n=100){if(e!=null&&![`string`,`number`].includes(typeof e))throw Error(t+`格式无效`);let r=String(e??``).trim();if(r.length>n)throw Error(t+`最多填写`+n+`字`);return r}function d(e,t,n,r){let i=e??r;if(!t.includes(i))throw Error(n+`无效`);return i}function f(e,t,n=2){let r=u(e,t,24);if(!r)return``;if(!RegExp(`^\\d+(?:\\.\\d{1,`+n+`})?$`).test(r))throw Error(t+`须为非负数字,最多`+n+`位小数`);let[i,a=``]=r.split(`.`);if(BigInt(i)*10n**BigInt(n)+BigInt(a.padEnd(n,`0`))>100000000000n)throw Error(t+`超出支持范围`);return r}function p(e,t){let n=u(e,t,12);if(n&&!/^\d+$/.test(n))throw Error(t+`须为非负整数`);if(Number(n)>1e9)throw Error(t+`超出支持范围`);return n}let m=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(e);function h(e,t=`owner`){let n=e??t;if(n!==``&&!m(n))throw Error(`成本付款人无效`);return n}function g(e){let t=o(e??`助理微信`);if(!a.includes(t)&&!/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(微信|支付宝|现金)$/.test(t))throw Error(`收款账户无效`);return t}function _(e={},t={}){return l(e,`备用料费`),{mode:d(e.mode,[`gram`,`total`],`备用料费方式`,t.mode||`gram`),rate:f(e.rate??t.rate,`备用进货料价`),total:f(e.total??t.total,`备用料费合计`),originalTotal:``,payer:h(e.payer,t.payer??`owner`)}}function v(t,{newId:a=()=>globalThis.crypto.randomUUID(),pocketKeys:o=i}={}){if(l(t,`开单预设`),!Array.isArray(t.lines)||!t.lines.length||t.lines.length>60)throw Error(`模板需要1~60行商品`);let m=new Map,v=new Set,y=t.lines.map(e=>{let t=l(e,`模板商品`),i=d(t.unit,[`g`,`件`],`商品单位`,`g`),s=u(t.name,`商品名称`,60),g=d(t.nameType,[...n,`其他`],`商品名称`,n.includes(s)?s:s?`其他`:`足金999`),y={nameType:g,customName:u(t.customName??(g===`其他`?s:``),`其他商品名称`,60),unit:i,quantity:i===`g`?f(t.quantity,`商品克重`,3):p(t.quantity,`商品件数`),pocket:i===`件`||[`足银999`,`纯银925`].includes(g)?``:d(t.pocket,[``,...o],`出库货盘`,g===`足金999`?`现货`:``),payer:h(t.payer,`owner`),pricingMode:i===`件`?`manual`:d(t.pricingMode,[`auto`,`manual`],`计价方式`,t.sale==null?`auto`:`manual`),goldPrice:f(t.goldPrice,`销售金价`),laborMode:d(t.laborMode,[`gram`,`piece`],`销售工费方式`,`gram`),laborRate:f(t.laborRate,`销售工费`),pieces:p(t.pieces??`1`,`计工费件数`),priceNote:u(t.priceNote,`销售单价说明`,100),sale:f(t.sale,`本行销售额`),baseSale:f(t.baseSale??t.sale,`商品基础金额`)};if(y.name=g===`其他`?y.customName:g,t.stockCount!=null&&String(t.stockCount).trim()!==``&&(y.stockCount=p(t.stockCount,`出库数量(对)`),Number(y.stockCount)<1))throw Error(`出库数量(对)须为正整数,一对填1`);let b=t.charges??[];if(!Array.isArray(b)||b.length>100)throw Error(`每行最多填写100项附加项目`);if(y.charges=b.map(e=>{let t=l(e,`附加项目`),n=u(t.id,`附加项目标识`,36);if(n&&(!c.test(n)||v.has(n)))throw Error(`附加项目标识无效或重复`);n&&v.add(n);let i=u(t.name,`附加项目名称`,40),o=d(t.nameType,[...r,`其他`],`附加项目`,r.includes(i)?i:i?`其他`:`编绳`);if(t.costRemoved!==void 0&&typeof t.costRemoved!=`boolean`)throw Error(`内部成本移除标记无效`);let s=a();n&&m.set(n,s);let p=u(t.customName??(o===`其他`?i:``),`附加项目名称`,40),h=f(t.amount,`附加金额`),g={};if(t.chargePrices!=null){l(t.chargePrices,`附加项目预设报价`);for(let e of[...r,`其他`])Object.hasOwn(t.chargePrices,e)&&(g[e]=f(t.chargePrices[e],`附加项目报价`))}return{id:s,nameType:o,customName:p,name:o===`其他`?p:o,amount:h,chargePrices:{...g,[o]:h},...t.costRemoved===!0?{costRemoved:!0}:{}}}),t.costParts!=null){l(t.costParts,`分项成本`);let e=Object.fromEntries([`material`,`labor`,`accessories`,`other`].map(e=>[e,f(t.costParts[e],`货品成本`)])),n=l(t.costMaterial??{},`料费方式`),r=l(t.costLabor??{},`进货工费方式`),a=d(n.mode,[`gram`,`total`,`pool`],`进货料费方式`,i===`g`&&e.material===``?`gram`:`total`);if(y.costParts=e,y.costPayers={material:h(t.costPayers?.material,y.payer),labor:h(t.costPayers?.labor,y.payer)},y.costMaterial={mode:i===`件`?`total`:a,...a===`gram`?{rate:f(n.rate,`进货料价`)}:{}},y.costLabor={mode:i===`件`?`total`:d(r.mode,[`gram`,`total`],`进货工费方式`,`total`),rate:f(r.rate,`进货克工费`)},y.costMaterial.mode===`pool`){if([`足银999`,`纯银925`].includes(g))throw Error(`银饰模板请手动填写料费`);e.material=``,y.materialPoolDraft={defaultDate:!0,manual:_(t.materialPoolDraft?.manual)}}else if(t.costMaterialDraft){let r=_(t.costMaterialDraft,{mode:y.costMaterial.mode,rate:n.rate,total:e.material,payer:y.costPayers.material});y.costMaterialDraft={mode:r.mode,rate:r.rate,total:r.total,originalTotal:``}}}else Object.hasOwn(t,`cost`)&&(y.cost=f(t.cost,`货品成本`));return y}),b=t.fee_items??[];if(!Array.isArray(b)||b.length>6100)throw Error(`模板费用项目过多`);let x=new Set(b.filter(s).map(e=>e.expense_id).filter(Boolean)),S=new Set,C=b.map(t=>{let n=l(t,`模板费用`);if(s(n)||n.expense_id&&x.has(n.expense_id))return null;if(e.presetKind(n)===`box`&&(e.boxCount(n.note.match(/(([^)]*)个 ×/)[1]),n.amount===``))throw Error(`请先填写正整数的盒子数量`);let r=u(n.key,`费用标识`,80);if(![`shipping`,`box`,`certificate`,`braiding`,`sticker`,`other`].includes(r)&&!/^(charge|manual):[a-f0-9-]{36}$/.test(r))throw Error(`模板费用项目无效`);if(S.has(r))throw Error(`模板费用项目不能重复`);S.add(r);let i=r.startsWith(`charge:`)?m.get(r.slice(7)):null;return r.startsWith(`charge:`)&&!i?null:{key:i?`charge:`+i:r===`shipping`||e.presetKind(n)?r:`manual:`+a(),note:u(n.note,`费用名称`,150),amount:f(n.amount,`实际费用`),payer:h(n.payer,`assistant`),status:`estimated`,edited:n.edited!==!1,...i?{sourceName:u(n.sourceName||n.note,`附加项目名称`,40)}:{}}}).filter(Boolean),w={salesperson:u(t.salesperson,`开单人`,30),payment_account:g(t.payment_account),credit_card_fee_payer:h(t.credit_card_fee_payer,`owner`),discount:f(t.discount??`0`,`整单优惠`),note:u(t.note,`客户单备注`,240),fee_auto_initialized:!0,...t.fee_cost_mode===`checkboxes`?{fee_cost_mode:`checkboxes`}:{},lines:y,fee_items:e.sync(C,y,{checkboxCosts:t.fee_cost_mode===`checkboxes`})};if(JSON.stringify(w).length>24e4)throw Error(`模板内容过大,请减少商品或附加项目`);return w}function y(e,{today:t,salesperson:n=``,newId:r,pocketKeys:i}={}){if(!/^\d{4}-\d{2}-\d{2}$/.test(t||``)||!Number.isFinite(Date.parse(t+`T00:00:00Z`))||new Date(t+`T00:00:00Z`).toISOString().slice(0,10)!==t)throw Error(`未取得有效系统日期,请刷新后再套用模板。`);let a=v({...e,fee_cost_mode:`checkboxes`},{newId:r,pocketKeys:i});for(let e of a.lines)e.costMaterial?.mode===`pool`&&(e.costMaterial={mode:`pool`,poolId:t},e.materialPoolDraft={...e.materialPoolDraft,poolId:t,defaultDate:!0});return{...a,date:t,fees_date:t,customer:``,salesperson:a.salesperson||n,rounding_mode:`yuan`}}return{fromDraft:v,apply:y}});var Le=B.exports,Re={"./fee-estimates":je,"./credit-card-fees":Oe},ze=e=>{if(!Object.prototype.hasOwnProperty.call(Re,e))throw Error(`未知依赖 `+e);return Re[e]},V={exports:{}};(function(e,t){let n=t(typeof V==`object`&&V.exports?ze(`./fee-estimates`):e.FeeEstimates,typeof V==`object`&&V.exports?ze(`./credit-card-fees`):e.CreditCardFees);typeof V==`object`&&V.exports?V.exports=n:e.OrderCopy=n})(typeof globalThis==`object`?globalThis:void 0,function(e,t){let n=e=>e==null?``:(e/100).toFixed(2),r=e=>e!=null&&String(e).trim()!==``,i=e=>t?.normalizeAccount?t.normalizeAccount(e):[`助理信用卡`,`助理1信用卡`,`助理2信用卡`,`麦麦信用卡`].includes(e)?`麦麦信用卡`:e,a=e=>e?.system===`credit_card`||String(e?.key||``).startsWith(`card_fee:`);function o(e){return{...e,rounding_mode:e.rounding_mode||`cent`,discount:n(e.discount),fee_items:(e.fee_items||[]).map(e=>({...e,amount:n(e.amount)})),lines:e.lines.map(e=>({...e,quantity:e.unit===`g`?(e.quantity/1e3).toFixed(3):e.quantity,sale:n(e.sale),baseSale:n(e.baseSale??e.sale),cost:n(e.cost),costMaterial:e.costMaterial?.mode===`pool`?{...e.costMaterial}:{mode:e.costMaterial?.mode||((e.unit||`g`)===`g`&&e.costParts?.material==null?`gram`:`total`),...e.costMaterial?.mode===`gram`?{rate:n(e.costMaterial.rate)}:{}},costLabor:{mode:e.costLabor?.mode||`total`,rate:n(e.costLabor?.rate)},charges:(e.charges||[]).map(e=>({...e,amount:n(e.amount)})),...e.pricingMode===`auto`?{goldPrice:n(e.goldPrice),laborRate:n(e.laborRate)}:{},...e.costParts?{costParts:Object.fromEntries(Object.entries(e.costParts).map(([e,t])=>[e,n(t)]))}:{}}))}}function s(t,r,i,o){let s=new Set((t.corrections||[]).filter(e=>e.type===`expense`).map(e=>e.target)),c=new Set(t.fee_items.filter(a).map(e=>e.expense_id).filter(Boolean)),l=t.expenses.filter(e=>e.amount>0&&!String(e.note||``).startsWith(`更正冲回:`)&&!a(e)&&!c.has(e.id)),u=l.filter(e=>!s.has(e.id)),d=new Set,f=new Set,p=[],m=new Set((t.pendingFees||[]).map(e=>e.key)),h=(t,n)=>t.amount===n.amount&&t.payer===n.payer&&e.normalize(t.note)===e.normalize(n.note);for(let e of t.fee_items){if(a(e)||e.expense_id&&c.has(e.expense_id))continue;let t=i.get(String(e.key).replace(/^charge:/,``)),r=t?`charge:`+t:e.key===`shipping`?`shipping`:`manual:`+o(),u=e.amount,g=e.payer;if(e.status!==`estimated`&&!m.has(e.key)){let t=l.find(t=>!d.has(t.id)&&h(t,e));t?(d.add(t.id),s.has(t.id)?u=0:f.add(t.id)):u=0}p.push({key:r,note:e.note,amount:n(u),payer:g,status:`estimated`,edited:!0,...t?{sourceName:e.sourceName||e.note}:{}})}for(let t of u){if(f.has(t.id))continue;let r=e.normalize(t.note)===`快递`&&!p.some(e=>e.key===`shipping`)?`shipping`:`manual:`+o();p.push({key:r,note:t.note,amount:n(t.amount),payer:t.payer,status:`estimated`,edited:!0})}let g=[`delivered`,`returned`,`cancelled`].includes(t.status);for(let[t,n]of r.entries())for(let r of n.charges){if(r.costRemoved===!0)continue;let n=e.normalize(r.name)===`快递`,i=n?`shipping`:`charge:`+r.id;if(p.some(e=>e.key===i))continue;let a=p.find(t=>t.key.startsWith(`manual:`)&&e.normalize(t.note)===e.normalize(r.name));a?a.key=i:p.push({key:i,note:n?`快递费`:r.name,amount:g?`0.00`:``,payer:e.normalize(r.name)===`包装`?`owner`:`assistant`,status:`estimated`,edited:!0}),n||Object.assign(p.find(e=>e.key===i),{sourceName:r.name,lineNumber:t+1})}return e.sync(p,r)}function c(e,{today:t,newId:n=()=>globalThis.crypto.randomUUID()}={}){if(!/^\d{4}-\d{2}-\d{2}$/.test(t||``))throw Error(`未取得系统日期,请刷新后再复制。`);if(!e||!Array.isArray(e.lines)||!Array.isArray(e.fee_items)||!Array.isArray(e.expenses))throw Error(`订单详情未完整返回,请重新读取后再复制。`);let r=o(e),a=new Map,c=!!e.price_lock_id||e.lines.some(e=>e.materialAllocations?.length),l=r.lines.map(r=>{let i=Object.fromEntries([`name`,`nameType`,`customName`,`unit`,`quantity`,`pocket`,`stockCount`,`payer`,`pricingMode`,`goldPrice`,`laborMode`,`laborRate`,`pieces`,`priceNote`,`sale`,`baseSale`].filter(e=>Object.hasOwn(r,e)).map(e=>[e,r[e]]));if(i.charges=r.charges.map(e=>{let t=n();return e.id&&a.set(e.id,t),{id:t,name:e.name,amount:e.amount,...e.costRemoved===!0?{costRemoved:!0}:{}}}),r.costParts){if(i.costParts={...r.costParts},i.costMaterial={...r.costMaterial},i.costLabor={...r.costLabor},i.costPayers={material:r.costPayers?.material??r.payer??`owner`,labor:r.costPayers?.labor??r.payer??`owner`},r.costMaterial?.mode===`pool`){let n=r.costMaterial.poolId===e.date,a=n?t:r.costMaterial.poolId;i.costMaterial={mode:`pool`,poolId:a},i.costParts.material=``,i.materialPoolDraft={poolId:a,defaultDate:n,manual:{mode:`gram`,rate:``,total:``,originalTotal:``,payer:i.costPayers.material}}}c&&(i.costParts.material=``,i.costMaterial={mode:`total`},i.costPayers.material=``,delete i.materialPoolDraft)}else i.cost=r.cost;return i});return{date:t,fees_date:t,customer:``,salesperson:r.salesperson||``,payment_account:i(r.payment_account||`助理微信`),discount:r.discount,note:c?String(r.note||``).replace(/;?锁价单 [^;]*;按原锁定金价 [^;]*元\/克结算$/,``):r.note||``,rounding_mode:`yuan`,copy_kind:c?`price-lock`:`ordinary`,fee_auto_initialized:!0,lines:l,fee_items:s(e,l,a,n)}}function l(e,{today:t,salesperson:n}={}){return!e||typeof e!=`object`||!Array.isArray(e.lines)?!!e:e.id||e.copy_kind||r(e.customer)||r(e.note)||r(e.internal_note)||Number(e.discount)||e.date&&t&&e.date!==t||e.salesperson&&n&&e.salesperson!==n||e.payment_account&&e.payment_account!==`助理微信`||(e.fee_items||[]).some(e=>e.key!==`shipping`||e.edited||e.status!==`estimated`||Number(e.amount)!==6||e.payer!==`assistant`)?!0:e.lines.length!==1||e.lines.some(e=>e.charges?.length||e.name&&e.name!==`足金999`||e.customName||e.unit&&e.unit!==`g`||e.pocket!=null&&e.pocket!==`现货`||e.payer&&e.payer!==`owner`||e.costMaterial?.mode===`pool`||[`quantity`,`stockCount`,`sale`,`baseSale`,`goldPrice`,`laborRate`,`priceNote`,`cost`].some(t=>r(e[t]))||[`material`,`labor`].some(t=>r(e.costParts?.[t])||r(e[t===`material`?`costMaterial`:`costLabor`]?.rate)||e.costPayers?.[t]&&e.costPayers[t]!==`owner`)?!0:[`accessories`,`other`].some(t=>Number(e.costParts?.[t])))}return{inputs:o,fromOrder:c,hasDraftContent:l}});var Be=V.exports,Ve={"./calculations":Ee,"./fee-estimates":je,"./credit-card-fees":Oe},He=e=>{if(!Object.prototype.hasOwnProperty.call(Ve,e))throw Error(`未知依赖 `+e);return Ve[e]},Ue={exports:{}};(function(e,t){let n=typeof Ue==`object`&&Ue.exports,r=t(n?He(`./calculations`):e.LedgerCalc,n?He(`./fee-estimates`):e.FeeEstimates,n?He(`./credit-card-fees`):e.CreditCardFees);n?Ue.exports=r:e.OrderEntryModel=r})(typeof globalThis==`object`?globalThis:void 0,function(e,t,n){let r=[`足金999`,`足银999`,`纯银925`],i=[`编绳`,`证书`,`包装`,`快递`,`附加费`],a={编绳:`55`,证书:`10`,包装:`10`,快递:`8`},o={shipping:`快递费`,box:`包装盒`,certificate:`证书`,braiding:`编绳`,sticker:`手机贴`,other:`其他直接费用`},s=[{member:`owner`,label:`麦麦`},{member:`assistant`,label:`娜娜`},{member:`assistant2`,label:`小昊`}],c=[`现货`,`金料`,`找金`,`回收旧料`,`君宝汇`],l={jd:`shipping`,yt:`shipping`,box:`box`,steel:`braiding`,silver:`silverChain`},u=e=>e===void 0?void 0:JSON.parse(JSON.stringify(e)),d=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f=e=>e==null?`待补`:(e/100).toLocaleString(`zh-CN`,{minimumFractionDigits:2,maximumFractionDigits:2}),p=e=>(e/1e3).toFixed(3);function m(e,t){return e==null?`待补`:`¥`+(t===`yuan`?(e/100).toLocaleString(`zh-CN`,{minimumFractionDigits:0,maximumFractionDigits:0}):f(e))}function h(e){if(e.rounding_mode!==`yuan`)return`保留原单金额,精确到分。`;let t=e.rounding_adjustment;return`四舍五入到元`+(t?` · 优惠后 ¥`+f(e.unroundedTotal)+` → `+m(e.total,`yuan`)+`(差额 `+(t>0?`+`:`-`)+f(Math.abs(t))+`元)`:``)}function g(e){return(e?.members?.length?e.members:e?.shopSettings?.members?.length?e.shopSettings.members:s).filter(e=>e&&typeof e.member==`string`)}let _=e=>g(e).map(e=>e.member),v=(e,t)=>g(e).find(e=>e.member===t)?.enabled!==!1&&_(e).includes(t),y=e=>_(e).filter(t=>v(e,t)),b=e=>!!(e?.user?.member||e?.members?.some(e=>e.member===`assistant2`)),x=(e,t)=>e?.user?.member||t?.user?.member||(e?.user?.role===`owner`?`owner`:`assistant`);function S(e,t,n){return e?.shopSettings?.members?.find(e=>e.member===t)?.label||e?.members?.find(e=>e.member===t)?.label||n?.loginOptions?.find(e=>e.member===t)?.label||{owner:`麦麦`,assistant:`娜娜`,assistant2:`小昊`}[t]||`待确认`}function C(e,t=!1,{selected:n=``}={}){let r=y(e).filter(t=>b(e)||t!==`assistant2`);t&&(r=[...r.filter(e=>e!==`owner`),...r.filter(e=>e===`owner`)]);let i=r.map(t=>[t,S(e,t)]);return n&&_(e).includes(n)&&!r.includes(n)&&i.push([n,S(e,n)+`(已停用 · 原记录)`]),i}function w(e,t){let n=e?.user||t?.user,r=x(e,t);return e?.shopSettings?.members?.find(e=>e.member===r)?.operatorName||n?.operatorName||e?.shopSettings?.members?.find(e=>e.member===r)?.label||e?.members?.find(e=>e.member===r)?.label||n?.label||n?.name||``}let T=e=>({certificate:`4`,packaging:`3`,shipping:`6`,packagingPayer:`owner`,...e?.shopSettings?.feeDefaults}),E=e=>t.presets(e?.shopSettings?.costPresets),D=e=>e?.shopSettings?.creditCardRatePermille??6,O=e=>!!e?.accounts?.includes(`麦麦信用卡`),k=e=>({owner:`麦麦`,assistant:`助理`,assistant2:`助理2`})[e]||e;function A(e,t){let n=String(t??``);for(let t of _(e)){let e=t===`assistant`?[`助理`,`助理1`]:[k(t)];for(let r of e)if(n===r)return{member:t,prefix:r,channel:``};else if(n.startsWith(r)&&[`微信`,`支付宝`,`现金`,`信用卡`].includes(n.slice(r.length)))return{member:t,prefix:r,channel:n.slice(r.length)}}return null}let j=e=>Array.isArray(e?.pockets)?e.pockets:c,M=(e,t)=>e?.pocketCatalog?.find(e=>e.key===t)?.name||String(t??``),ee=(e,t)=>!!t&&e?.pocketCatalog?.some(e=>e.key===t&&e.countUnit===`pair`)===!0;function te(e,t=``,n=!1){let r=j(e),i=r.map(t=>[t,M(e,t)]);return t&&!r.includes(t)&&i.push([t,M(e,t)+(n?`(已停用 · 原货盘)`:`(已停用,请重新选择)`),!0]),[[``,`外配/不扣黄金`],...i]}function ne(e,{optional:t=!1,title:n=`库存数量(对)`}={}){let r=String(e??``).trim();if(!r&&t)return null;if(!/^\d+$/.test(r)||!Number.isSafeInteger(Number(r))||Number(r)>1e9||Number(r)<1)throw Error(n+`请填写大于0的整数,一对填1。`);return Number(r)}let re=e=>n.normalizeAccount(e);function N(e={},t){let n=e.nameType||(i.includes(e.name)?e.name:e.name?`其他`:`编绳`),r=d(e,`amount`)?e.amount??``:a[n]??``;return{id:e.id||t(),type:n,customName:e.customName??(n===`其他`?e.name:``),amount:String(r),prices:{...e.chargePrices,[n]:String(r)},...e.costRemoved===!0?{costRemoved:!0}:{}}}function ie(e,t){if(t===e.type)return e;let n={...e.prices,[e.type]:e.amount},r=d(n,t)?n[t]:a[t]??``;return{...e,type:t,amount:r,prices:{...n,[t]:r}}}let ae=(e,t)=>({...e,amount:t,prices:{...e.prices,[e.type]:t}}),P=e=>e.type===`其他`?e.customName:e.type,oe=e=>({id:e.id,nameType:e.type,customName:e.customName,name:P(e),amount:e.amount,chargePrices:{...e.prices},...e.costRemoved===!0?{costRemoved:!0}:{}});function se(e){if([`gram`,`total`].includes(e.costMaterial?.mode))return e.costMaterial;let t=e.costParts?.material,n=t!=null&&String(t).trim()!==``;return{mode:(e.unit||`g`)===`g`&&!n?`gram`:`total`}}function ce(e,t){let n=e.materialPoolDraft?.manual;if(e.costMaterial?.mode===`pool`)return{mode:n?.mode||(t===`g`?`gram`:`total`),rate:n?.rate??``,total:n?.total??``,originalTotal:n?.originalTotal??``,payer:n?.payer||`owner`};let r=[`gram`,`total`].includes(e.costMaterial?.mode)?e.costMaterial.mode:t===`g`&&e.costParts?.material==null?`gram`:`total`;return{mode:e.costMaterialDraft?.mode||r,rate:e.costMaterial?.rate??e.costMaterialDraft?.rate??``,total:e.costMaterialDraft?.total??(r===`total`?e.costParts?.material??``:``),originalTotal:e.costMaterialDraft?.originalTotal??(r===`total`?e.costParts?.material??``:``),payer:e.costPayers?.material??e.payer??`owner`}}let F=e=>e==null?``:String(e);function I(e={},t){let{st:n}=t,i=e;i.name||i.quantity||i.sale||i.cost||i.costParts||i.pricingMode||(i={...i,cost:void 0,sale:void 0});let a=i.nameType||(r.includes(i.name)?i.name:i.name?`其他`:`足金999`),o=i.costParts==null&&i.cost!==void 0,s=i.unit||`g`,c=i.pocket??(a===`足金999`?`现货`:``),l=t.member??x(n),d={legacy:o,historicalPocket:!!t.historicalPocket,countOriginalPocket:t.historicalPocket&&i.pocket||``,countOriginalQuantity:t.historicalPocket?F(i.quantity):``,countHistoricalUnknown:!!t.historicalPocket&&i.stockCount==null,nameType:a,customName:F(i.customName??(a===`其他`?i.name:``)),pricingMode:i.pricingMode||(i.sale===void 0?`auto`:`manual`),unit:s,quantity:F(i.quantity),goldPrice:F(i.goldPrice),laborMode:i.laborMode||`gram`,laborRate:F(i.laborRate),pieces:F(i.pieces??`1`),priceNote:i.priceNote||``,baseSale:F(i.baseSale??i.sale),sale:F(i.sale),pocket:c,stockCount:F(i.stockCount),payer:o?i.payer||`owner`:i.payer??`owner`,charges:(i.charges||[]).map(e=>N(e,t.uuid)),cost:o?F(i.cost):``,purchase:null,pool:null,view:{calculation:``,materialFormula:``,laborFormula:``,materialOriginal:``,poolNote:``}};if(o)return d;let f=i.costParts||{material:``,labor:``,accessories:`0`,other:`0`},p=se(i),m=i.costMaterialDraft||{},h=b(n)?l:`owner`,g={material:i.costPayers?.material??i.payer??h,labor:i.costPayers?.labor??i.payer??h};if(i.costMaterial?.mode===`pool`){let e=ce(i,s);f={...f,material:e.total},p={mode:e.mode,rate:e.rate},m={mode:e.mode,rate:e.rate,total:e.total,originalTotal:e.originalTotal},g={...g,material:e.payer}}let v=i.costLabor||{},y=s===`g`&&p.mode||`total`,S=_(n);d.purchase={materialMode:y,materialRate:F(p.rate??m.rate),material:F(f.material),materialPayer:S.includes(g.material)?g.material:``,laborMode:v.mode||`total`,laborRate:F(v.rate),labor:F(f.labor),laborPayer:S.includes(g.labor)?g.labor:``,accessories:F(f.accessories),other:F(f.other),dataMode:y,preferredMode:m.mode||p.mode||`total`,dataUnit:s,total:F(m.total??(y===`total`?f.material??``:``)),originalTotal:F(m.originalTotal??(y===`total`?f.material??``:``)),...i.costFundings?{costFundings:u(i.costFundings)}:{}};let C=i.materialPoolDraft||{},w=i.costMaterial?.poolId||C.poolId||``;return d.pool={source:i.costMaterial?.mode===`pool`?`pool`:`manual`,poolId:w,dataPoolId:w,dataSource:`manual`,preferredSource:i.costMaterial?.mode===`pool`?`pool`:`manual`,defaultDate:!(C.defaultDate===!1||w&&!C.defaultDate),manual:ce(i,s),allowed:!0,preview:null,options:[]},d}function le(e,t,n){let r={...e,[t]:n};return t===`nameType`&&[`足银999`,`纯银925`].includes(n)&&(r.pocket=``),t===`unit`&&n===`件`&&(r.pricingMode=`manual`,r.pocket=``),r}function ue(e,t,n){return{...e,purchase:{...e.purchase,[t]:n}}}function de(e,t){return{...e,pool:{...e.pool,source:t}}}function fe(e){let t=e.purchase;return{mode:t.preferredMode||t.materialMode,rate:t.materialRate,total:t.materialMode===`total`?t.material:t.total,originalTotal:t.originalTotal,payer:t.materialPayer}}function pe(e){let t=e.purchase,n=t.materialMode,r={costParts:{material:t.material,labor:t.labor,accessories:t.accessories,other:t.other},costPayers:{material:t.materialPayer,labor:t.laborPayer},costMaterial:{mode:n,...n===`gram`?{rate:t.materialRate}:{}},costMaterialDraft:{mode:t.preferredMode,rate:t.materialRate,total:n===`total`?t.material:t.total,originalTotal:t.originalTotal},costLabor:{mode:t.laborMode,...t.laborMode===`gram`?{rate:t.laborRate}:{}},...t.costFundings?{costFundings:{labor:u(t.costFundings.labor)}}:{}},i=e.pool;if(!i)return r;let a=i.source===`pool`||i.dataSource===`pool`?i.manual:fe(e),o=i.poolId||i.dataPoolId;return r.materialPoolDraft={poolId:o,defaultDate:i.defaultDate,manual:{...a}},i.source===`pool`&&(r.costMaterial={mode:`pool`,poolId:o},r.costMaterialDraft={mode:a.mode,rate:a.rate,total:a.total,originalTotal:a.originalTotal},r.costPayers.material=a.payer,r.materialPool=u(i.preview)||{poolId:o,date:o,status:`pending`,amount:null}),r}function me(e,t){let n={nameType:e.nameType,customName:e.customName,pricingMode:e.pricingMode,unit:e.unit,quantity:e.quantity,goldPrice:e.goldPrice,laborMode:e.laborMode,laborRate:e.laborRate,pieces:e.pieces,priceNote:e.priceNote,baseSale:e.baseSale,sale:e.sale,pocket:e.pocket,stockCount:e.stockCount,payer:e.payer,...e.legacy?{cost:e.cost}:{}};return n.charges=e.charges.map(oe),n.name=n.nameType===`其他`?n.customName:n.nameType,!ee(t,n.pocket)||n.unit!==`g`?delete n.stockCount:String(n.stockCount??``).trim()===``&&(n.stockCount=null),e.legacy||Object.assign(n,pe(e)),n}function he(e){let t=String(e??``).trim();if(!/^\d+(?:\.\d{1,3})?$/.test(t))return null;let[n,r=``]=t.split(`.`),i=BigInt(n)*1000n+BigInt(r.padEnd(3,`0`));return i>0n&&i<=100000000000n?Number(i):null}let ge=e=>!!e&&d(e,`personalPools`),_e=e=>e?.rolling?.enabled===!0?e.rolling:null;function ve(e){let t=e?.rows||[];return e?.rolling?.enabled&&e.current?[e.current,...t.filter(t=>t.id!==e.current.id)]:t}function ye(e,t,n,{orderId:r=``,member:i}={}){let a=ve(e),o=_e(e),s=a.map(e=>{if(!ge(e))return{...e,availableMg:r?Math.max(0,e.totalMg-(e.usages||[]).filter(e=>e.active&&e.order_id!==r).reduce((e,t)=>e+t.mg,0)):e.remainingMg};let t=r?(e.usages||[]).filter(e=>e.active&&e.order_id===r).flatMap(e=>e.materialSources||[{kind:`public`,quantity:e.mg}]).filter(e=>e.kind===`public`||e.member===i).reduce((e,t)=>e+t.quantity,0):0;return{...e,availableMg:e.remainingMg+(e.personalPools[i]?.remainingMg||0)+t}}),c=e=>({id:e,date:e,totalMg:0,usedMg:0,remainingMg:0,availableMg:0,status:`pending`});if(o&&t>=o.cutover)return[s.find(e=>e.id===t)||c(t)];let l=new Map(s.filter(e=>e.date<=t&&(e.availableMg>0||e.id===n||e.date===t||r&&e.usages?.some(e=>e.active&&e.order_id===r))).map(e=>[e.id,e]));return t&&!l.has(t)&&l.set(t,c(t)),n&&n<=t&&!l.has(n)&&l.set(n,c(n)),[...l.values()].sort((e,t)=>t.date.localeCompare(e.date))}function be(e,t){return e.date+(t?` · 统一料价`:``)+` · `+(ge(e)?`可用 ${p(e.availableMg??e.remainingMg)}g(个人回收料+公共)`:e.totalMg?`余 ${p(e.availableMg??e.remainingMg)}g`:`待补采购`)+(e.totalMg&&e.status===`pending`?` · 待补采购`:``)}function xe(t,n){let r=[];return t.lines.forEach((i,a)=>{if(!i.pool||i.unit!==`g`||e.isSilver(i.nameType)||i.pool.source!==`pool`)return;let o=i.pool.poolId||i.pool.dataPoolId,s=_e(n.materialPools);(s&&t.date>=s.cutover||i.pool.defaultDate||!o||o>t.date)&&(o=t.date);let c=he(i.quantity);c&&r.push({lineIndex:a,poolId:o,mg:c})}),{date:t.date,member:V(t,n.st),...t.id?{orderId:t.id}:{},entries:r}}function Se(t,n,r,i){if(ge(r)){let e=xe(t,i),a=i.quote&&JSON.stringify(i.quote.input)===JSON.stringify(e)?i.quote:null,o=a?.result?.entries.find(e=>e.lineIndex===n),s=a?.result?.pools.find(e=>e.poolId===r.id);return{amount:o?.amount??null,materialSources:o?.materialSources||[],allocations:o?.allocations||[],balance:s,quoteError:a?.error||``,quoteReady:!!a?.result,covered:o?.amount!=null,wantedMg:e.entries.filter(e=>e.poolId===r.id).reduce((e,t)=>e+t.mg,0)}}let a=[];t.lines.forEach((n,o)=>{if(!n.pool)return;let s=n.pool.poolId||n.pool.dataPoolId,c=_e(i.materialPools);(c&&t.date>=c.cutover||n.pool.defaultDate||!s||s>t.date)&&(s=t.date);let l=n.unit===`g`&&!e.isSilver(n.nameType),u=n.pool.source===`pool`||l&&n.pool.allowed===!1&&n.pool.preferredSource===`pool`;if(!l||!u||s!==r.id)return;let d=he(n.quantity);d&&a.push({lineIndex:o,mg:d})});let o=ve(i.materialPools).flatMap(e=>e.usages||[]),s=e.poolMaterialPreview(r,a,{orderId:t.id||null,allUsages:o});return{...s,amount:s.amounts[n]??null}}function Ce(t,n,r,i){if(!t.pool)return{line:t,pooled:!1};let{st:a}=i,o=i.materialPools,s={...t.pool},c={...t.purchase},l={...t.view},u=t.unit===`g`&&!e.isSilver(t.nameType);!u&&s.source===`pool`?(s.preferredSource=`pool`,s.source=`manual`):u&&s.allowed===!1&&s.preferredSource===`pool`&&(s.source=`pool`),s.allowed=u;let d=s.poolId||s.dataPoolId,m=_e(o),h=!!m&&n.date>=m.cutover;(h||s.defaultDate||!d||d>n.date)&&(d=n.date);let g=V(n,a);s.options=(o?ye(o,n.date,d,{orderId:n.id||``,member:g}):[]).map(e=>({value:e.id,label:be(e,h)})),!o&&d&&(s.options=[{value:d,label:d}]),s.poolId=d,s.dataPoolId=d,s.unified=h;let v=s.source===`pool`,y=s.dataSource,b={...t,pool:s,purchase:c,view:l};if(v&&y!==`pool`&&(s.manual=fe(b)),!v&&y===`pool`){let e=s.manual;Object.assign(c,{materialMode:e.mode,materialRate:e.rate,material:e.total,materialPayer:e.payer,dataMode:e.mode,preferredMode:e.mode,total:e.total,originalTotal:e.originalTotal,dataUnit:t.unit})}if(s.dataSource=s.source,s.help=u?h?`昨日余料、今日购料及退货回料合并加权;今日加料只更新今日订单。进货工费按实际填写。`:`料价按当天加权;垫付款按购料录入顺序扣减。进货工费仍按实际填写。`:`按件商品和银饰请手动填写料费成本。`,!v)return s.preview=null,l.poolNote=``,{line:b,pooled:!1};let x=o?ve(o).find(e=>e.id===d):null,C=he(t.quantity),w=ge(x),T=null,E=``;if(x)try{!w&&x.totalAmount===null?E=`材料成本尚未补齐,请先由店主核对历史材料记录。`:T=Se(n,r,x,i)}catch(e){E=e.message}w&&(E=E||T?.quoteError||``);let D=T?.wantedMg??0,O=T?.usedMg??x?.usedMg??0,k=T?.covered===!0,A=C?T?.amount??null:null;return c.materialMode=`total`,c.materialRate=w||x?.averageRate==null?``:(x.averageRate/100).toFixed(2),c.material=A==null?``:(A/100).toFixed(2),s.payerText=w?T?.allocations?.length?(e=>[...new Set(e.map(e=>S(a,e.payer)))].join(`、`))(T.allocations):`按本单来源核对`:_(a).filter(e=>x?.byPayer?.[e]?.purchased>0).map(e=>S(a,e)).join(`、`)||`待补采购`,s.personal=w,l.materialFormula=w?T?.materialSources?.length?T.materialSources.map(e=>`${e.kind===`personal_recovery`?S(a,e.member)+`个人回收料`:`公共料`} ${p(e.quantity)}g · ${e.amount==null?`料费待补`:`¥`+f(e.amount)}`).join(`;`)+`;各来源独立加权,已计分币尾差。`:E||`正在按`+S(a,g)+`的归属核对个人回收料与公共补足。`:A==null?`料费尚未确定;登记足额购料后自动补齐,销售金额保持原单。`:`${t.quantity}g 按当天加权料价计费,本行 ${f(A)}元(已分配分币尾差);垫付款按购料录入顺序扣减,保存后可查看本单归属。`,l.materialOriginal=``,l.poolNote=o?E||(!x||!x.totalMg?`${d} 尚无可用材料。可以先开单,稍后补足购料后自动核算成本与利润。`:k?`${d} ${h?`统一材料`:`已购`} ${p(x.totalMg)}g,已用 ${p(O)}g,余 ${p(Math.max(0,x.totalMg-O))}g;本次共用 ${p(D)}g。`:`${d} ${h?`统一材料`:`已购`} ${p(x.totalMg)}g,已用 ${p(O)}g,本次共用 ${p(D)}g;还需补采购 ${p(Math.max(0,O+D-x.totalMg))}g。可先开单,料费与利润暂待补。`):`正在读取每日料价;可保留选择,读取完成后显示当前料费。`,s.preview={poolId:d,date:d,status:A==null?`pending`:`preview`,amount:A,quantity:C,averageRate:w?null:x?.averageRate??null,revision:T?.balance?.revision??x?.revision??0,allocations:T?.allocations||[],...w?{materialSources:T?.materialSources||[]}:{}},{line:b,pooled:!0}}function L(t,n){let r={...t.purchase},i={...t.view},a=t.unit,o=t.quantity,s=r.dataMode,c=r.dataUnit!==a;!n&&s===`total`&&(r.total=r.material),!n&&c?a!==`g`&&s===`gram`?(r.preferredMode=`gram`,r.materialMode=`total`,r.material=r.total):a===`g`&&r.preferredMode===`gram`&&(r.materialMode=`gram`):!n&&r.materialMode!==s&&(r.preferredMode=r.materialMode,r.materialMode===`total`&&(r.total===``&&(r.total=r.material),r.material=r.total)),a!==`g`&&(r.materialMode=`total`),r.dataMode=r.materialMode,r.dataUnit=a,i.materialOriginal=n||r.originalTotal===``?``:`已保留原料费合计 ${r.originalTotal}元。原金额不会当成每克料价;切换按克后请填写实际进货料价。`;for(let[t,s]of[[`material`,`costMaterial`],[`labor`,`costLabor`]]){if(t===`material`&&n)continue;let c=t+`Mode`,l=t+`Rate`,u=t+`Formula`;if(a!==`g`&&r[c]===`gram`&&(r[c]=`total`),r[c]!==`gram`)i[u]=t===`material`?a===`g`?`直接填写本行料费合计,不再乘以克重。`:`按件商品请填写本行料费合计${r.materialRate===``?``:`;每克料价已保留,切回g可恢复`}。`:`直接填写本行总工费。`;else try{let n=e.purchaseCosts({unit:a,quantity:o,costParts:{material:`0`,labor:`0`,accessories:`0`,other:`0`},costMaterial:{mode:`total`},costLabor:{mode:`total`},[s]:{mode:`gram`,rate:r[l]}}).parts[t];r[t]=n===null?``:(n/100).toFixed(2),i[u]=n===null?t===`material`?`填写每克进货料价后,系统自动乘以本行克重。`:`填写每克工费后自动乘以克重。`:`${o}g × ${r[l]}元/克 = ${f(n)}元`}catch(e){r[t]=``,i[u]=e.message}}return{...t,purchase:r,view:i}}function we(t,n,r,i){let a=t.pricingMode===`auto`,o={...t,view:{...t.view}};try{let n=e.sale(me(t,i.st));o.sale=(n.sale/100).toFixed(2),a&&(o.baseSale=(n.baseSale/100).toFixed(2));let r=a?t.laborMode===`gram`?`${t.quantity} ×(${t.goldPrice} + ${t.laborRate})`:`${t.quantity} × ${t.goldPrice} + ${t.laborRate} × ${t.pieces}件`:`基础金额 ${f(n.baseSale)}`;o.view.calculation=r+(n.charges.length?` + 附加 `+f(n.chargesTotal):``)+` = `+f(n.sale)+` 元`,o.view.saleCents=n.sale}catch(e){o.sale=``,o.view.calculation=e.message,o.view.saleCents=null}if(o.legacy)return o;let s=Ce(o,n,r,i);o=L(s.line,s.pooled);try{o.view.purchase=e.purchaseCosts({...pe(o),unit:o.unit,quantity:o.quantity})}catch{o.view.purchase=null}return o}function Te(t,n){let r=t.pricingMode===`auto`,i=t.countHistoricalUnknown&&t.countOriginalPocket===t.pocket&&Number(t.countOriginalQuantity)===Number(t.quantity),a=e=>t.unit===`g`&&e===`gram`,o=t.pool?.source===`pool`;return{customName:t.nameType===`其他`,goldPrice:r,laborMode:r,laborRate:r,pieces:r&&t.laborMode===`piece`,priceNote:!r,baseSale:!r,stockCount:t.unit===`g`&&ee(n,t.pocket),stockCountOptional:i,materialRate:o?!t.pool.personal:a(t.purchase?.materialMode),materialMode:!o,materialPayer:!o,materialReadOnly:o||a(t.purchase?.materialMode),laborRateInput:a(t.purchase?.laborMode),laborReadOnly:a(t.purchase?.laborMode),poolAllowed:t.unit===`g`&&!e.isSilver(t.nameType),extraCosts:![`accessories`,`other`].every(e=>/^\d+(?:\.\d{1,2})?$/.test(String(t.purchase?.[e]??``).trim())&&Number(t.purchase?.[e])===0)}}function Ee(e,t,r){let i=n.isFee(e);return{key:e.key,note:e.note,amount:F(e.amount),payer:e.payer||(i?`owner`:r),sourceName:e.sourceName||``,edited:!!e.edited,status:e.status||`legacy`,...e.expense_id?{expense_id:e.expense_id}:{},...e.date?{date:e.date}:{},...e.lineNumber?{lineNumber:e.lineNumber}:{},...e.funding?{funding:u(e.funding)}:{},...i?{automatic:u(e)}:{}}}function De(e){return e.automatic?{...u(e.automatic),...e.date?{date:e.date}:{},amount:e.amount,payer:e.payer}:{key:e.key,sourceName:e.sourceName||void 0,edited:e.edited===!0,...e.expense_id?{expense_id:e.expense_id}:{},...e.date?{date:e.date}:{},...e.status===`estimated`?{status:`estimated`}:{},note:e.note,amount:e.amount,payer:e.payer,...e.funding?{funding:u(e.funding)}:{}}}let Oe=e=>e.automatic?`已记录的信用卡收款手续费`:e.key.startsWith(`charge:`)?e.lineNumber?`商品 `+e.lineNumber+` 的附加项目`:`附加项目已改类,原成本行保留`:`整单费用`;function ke(e,r,i){let a=e.feeRows.map(De),o=[...t.sync(a.filter(e=>!n.isFee(e)),r,{defaultPayer:b(i.st)?V(e,i.st):`assistant`,shopDefaults:T(i.st),checkboxCosts:!!e.presets||e.feeCostMode===`checkboxes`}),...a.filter(e=>n.isFee(e))],s=a.map(e=>e.key).join(`|`)===o.map(e=>e.key).join(`|`);return o.map((t,n)=>s?{...e.feeRows[n],sourceName:t.sourceName||``,note:t.note,amount:F(t.amount),payer:t.payer,...t.lineNumber?{lineNumber:t.lineNumber}:{}}:Ee(t,i.st,Ae(e,i.st)))}let Ae=(e,t)=>b(t)?V(e,t):`assistant`;function R(e,t,n,r){let i=e.feeRows.map((e,i)=>i===t?{...e,[n]:r,edited:!0}:e);return{...e,feeRows:i}}function je(e,t,n){return{...e,feeRows:[...e.feeRows,Ee({key:`manual:`+n(),note:`其他费用`,amount:``,payer:Ae(e,t),status:`estimated`,edited:!0},t,Ae(e,t))]}}function Me(e,n){let r=e.feeRows[n];if(!r||r.automatic)return e;let i=r.key,a=e.lines.map(e=>({...e,charges:e.charges.map(e=>i===`charge:`+e.id||i===`shipping`&&t.normalize(P(e).trim())===`快递`?{...e,costRemoved:!0}:e)}));return{...e,lines:a,feeRows:e.feeRows.filter((e,t)=>t!==n)}}function Ne(e,t,n){let r=e.lines.map((e,r)=>r===t?{...e,charges:e.charges.map((e,t)=>{if(t!==n)return e;let r={...e};return delete r.costRemoved,r})}:e);return{...e,lines:r}}function z(e){return e.key===`shipping`||e.key===`box`?e.key:String(e.note||``).trim()===`编绳`?``:t.checkboxCategory(e.note)||t.checkboxCategory(e.sourceName)}function Pe(e,n=[]){let r=E(e);if(t.customPresets(r)){let e=t.presetCatalog(r),i=new Map(n.map(n=>[t.presetKind(n,{presets:e}),n]).filter(([e])=>e)),a={},o={};for(let[t,n]of Object.entries(e))a[t]=i.has(t),n.byQuantity&&(o[t]=i.get(t)?.note.match(/(([^)]*)个 ×/)?.[1]||`1`);return{configured:!0,checked:a,quantity:o}}let i=new Map(n.map(e=>[t.presetKind(e,{presets:r}),e]).filter(([e])=>e)),a=i.get(`box`);return{configured:!1,checked:{jd:i.has(`jd`),yt:i.has(`yt`),box:!!a,steel:i.has(`steel`),silver:i.has(`silver`)},quantity:{box:a?a.note.match(/(([^)]*)个 ×/)[1]:`1`}}}let Fe=(e,t)=>l[t]||t;function Ie(e,t){if(String(e.key).startsWith(`manual:`)){let n=`custom_`+e.key.slice(7);if(E(t)[n])return n}return z(e)}function B(e,n,r,i,a){let o={...e.presets,checked:{...e.presets.checked,[n]:r}},s=Fe(o,n);if(r&&s===`shipping`)for(let e of[`jd`,`yt`])e!==n&&d(o.checked,e)&&(o.checked[e]=!1);let c=e.feeRows;if(r){let e=o.configured?t.presetKey(n):s===`silverChain`?`other`:s,r=e=>o.configured?Ie(e,i):z(e);c=c.filter(e=>e.automatic||e.funding||r(De(e))!==s).map(t=>!t.automatic&&t.key===e?{...t,key:`manual:`+a()}:t)}return{...e,presets:o,feeRows:c}}function Le(e,t,n){return{...e,presets:{...e.presets,quantity:{...e.presets.quantity,[t]:n}}}}function Re(e,n){let r=e.presets;if(!r)return{items:[],notes:{}};let i=V(e,n),a={};if(r.configured){let e=t.presetCatalog(E(n)),o=[];for(let[n,s]of Object.entries(e)){if(!s.enabled||!r.checked[n]){a[n]=`勾选后计费`;continue}let c=r.quantity[n]??`1`;try{let r=t.presetFee(n,c,i,e);a[n]=`${c}个 × ${s.amount}元 = ${r.amount}元`,o.push(r)}catch(e){a[n]=e.message,o.push({key:t.presetKey(n),note:s.name,amount:``,payer:s.payer===`order`?i:s.payer,status:`estimated`,edited:!0})}}return{items:o,notes:a}}let o=E(n),s=r.quantity.box,c={shipping:r.checked.jd?`jd`:r.checked.yt?`yt`:``,box:r.checked.box,quantity:s,steel:r.checked.steel,silver:r.checked.silver},l;try{l=t.checkboxFees(c,i,o),a.box=c.box?t.boxCount(s)+`个 × `+o.box.amount+`元 = `+l.find(e=>e.key===`box`).amount+`元`:`勾选后计费`}catch{l=t.checkboxFees({...c,box:!1},i,o),l.push({key:`box`,note:`盒子(${s}个 × ${o.box.amount}元/个)`,amount:``,payer:o.box.payer===`order`?i:o.box.payer,status:`estimated`,edited:!0}),a.box=`请填写正整数数量`}return a.ytPayer=S(n,l.find(e=>e.note===`圆通快递`)?.payer||(o.yt.payer===`order`?i:o.yt.payer))+`付款`+(o.yt.payer===`order`?`(订单归属人)`:``),{items:l,notes:a}}function ze(e,n){if(!e.presets)return[];let r=V(e,n);if(e.presets.configured)return Object.entries(t.presetCatalog(E(n))).filter(([,e])=>e.enabled).map(([e,t])=>({kind:e,name:t.name,price:t.amount+`元`+(t.byQuantity?`/个`:``),payer:(t.payer===`order`?`订单归属人`:S(n,t.payer))+`付款`,byQuantity:!!t.byQuantity,shipping:e===`jd`||e===`yt`}));let i=E(n),a=e=>i[e].payer===`order`?S(n,r)+`付款(订单归属人)`:S(n,i[e].payer)+`付款`;return[{kind:`jd`,name:`京东快递`,price:i.jd.amount+`元`,payer:a(`jd`),shipping:!0},{kind:`yt`,name:`圆通快递`,price:i.yt.amount+`元`,payer:a(`yt`),shipping:!0},{kind:`box`,name:`盒子`,price:i.box.amount+`元/个`,payer:a(`box`),byQuantity:!0},{kind:`steel`,name:`钢绳(店里)`,price:i.steel.amount+`元`,payer:a(`steel`)},{kind:`silver`,name:`银链(家里)`,price:i.silver.amount+`元`,payer:a(`silver`)}]}function V(e,t){return e.member||x(t)}function Be(e,t){let n=b(t)?V(e,t):`assistant`;return k(v(t,n)?n:`owner`)}function Ve(e){return[`微信`,`支付宝`,`现金`,...O(e)?[`信用卡`]:[]]}function He(e,t){let n=C(e,!b(e)).map(([e,t])=>[k(e),t]),r=A(e,t.recipient+t.method);return r&&!v(e,r.member)&&!n.some(([e])=>e===t.recipient)&&n.push([t.recipient,S(e,r.member)+`(已停用 · 原记录)`]),n}function Ue(e,t,r){e=re(e||Be(t,r)+`微信`);let i=n.isAccount(e),a=A(r,e),o=a?k(a.member):Be(t,r);return{method:a?.channel||`微信`,recipient:i?`麦麦`:o,nonCardRecipient:i?Be(t,r):o,cardLocked:i}}function We(e,t){let n={...e.payment};return n.method===`信用卡`?(n.cardLocked||(n.nonCardRecipient=n.recipient||Be(e,t)),n.recipient=`麦麦`,n.cardLocked=!0):(n.cardLocked&&(n.recipient=n.nonCardRecipient||Be(e,t)),n.cardLocked=!1,n.nonCardRecipient=n.recipient),{...e,payment:n}}let Ge=e=>re((e.payment.recipient||``)+(e.payment.method||``));function Ke(e,n,r){if(!b(r))return{...e,member:n};let i=k(n),a={...e.payment,nonCardRecipient:i};a.method!==`信用卡`&&(a.recipient=i);let o=e.feeRows.map(e=>!e.edited&&t.normalize(e.note)!==`包装`?{...e,payer:n}:e);return{...e,member:n,payment:a,feeRows:o}}function qe(e){return e.id?e.rounding_mode||`cent`:`yuan`}function H(e){return!e.id&&!e.customer&&!e.note&&!e.internal_note&&!Number(e.discount)&&!e.fee_items?.some(e=>Number(e.amount)&&(e.edited||e.status!==`estimated`||e.key!==`shipping`))&&(e.lines||[]).every(e=>!e.charges?.some(e=>Number(e.amount))&&!e.quantity&&!e.stockCount&&!e.sale&&!e.goldPrice&&!e.laborRate&&!e.cost&&!Object.values(e.costParts||{}).some(Number))}function Je(e,n){let{st:r,session:i,uuid:a}=e,s=n||{date:r.today,lines:[{}]};s={...s,rounding_mode:qe(s)},H(s)&&(s={...s,date:r.today,fees_date:r.today});let c=!s.id,l=b(r)?_(r).includes(s.member||x(r,i))&&s.member||x(r,i):``,u=(s.fee_items||[]).map(e=>({...e,note:e.note||o[e.key],edited:e.edited??!0})),d={copy_kind:s.copy_kind||``,id:s.id||``,revision:s.revision||``,paper_date:s.paper_date||``,paper_number:s.paper_number||``,rounding_mode:s.rounding_mode,memberLocked:!!s.id||r?.user?.role!==`owner`,member:l,date:s.date||r.today,customer:s.customer||``,customer_type:[`new`,`returning`].includes(s.customer_type)?s.customer_type:``,customerTypeRequired:!s.id,original_customer_type:s.customer_type,salesperson:s.salesperson||(s.id?i?.user?.name||r?.user?.name||``:w(r,i)),credit_card_fee_payer:s.credit_card_fee_payer||`owner`,fees_date:s.fees_date||s.date||r.today,feeCostMode:c?`checkboxes`:s.fee_cost_mode||`legacy`,discount:s.discount||`0`,note:s.note||``,internal_note:s.internal_note||``,presets:null,feeRows:[],lines:[]};d.payment=Ue(s.payment_account,d,r);let f=E(r),p=c?u.filter(e=>!t.presetKind(e,{presets:f})):u;return d.presets=c?Pe(r,u):null,d.feeRows=p.map(e=>Ee(e,r,Ae(d,r))),d.lines=(s.lines?.length?s.lines:[{}]).map(e=>I(e,{st:r,member:d.member||x(r,i),historicalPocket:!!s.id,uuid:a})),d}function Ye(e,t){if(e.lines.length>=60)throw Error(`每单需要1~60行商品`);return{...e,lines:[...e.lines,I({},{st:t.st,member:V(e,t.st),uuid:t.uuid})]}}function Xe(e,t){if(e.lines.length<=1)throw Error(`请至少保留一行商品`);return{...e,lines:e.lines.filter((e,n)=>n!==t)}}function Ze(e,t,n){let r=e.lines[t];if(r.charges.length>=100)throw Error(`每行最多填写100项附加项目`);return Qe(e,t,{...r,charges:[...r.charges,N({},n)]})}function Qe(e,t,n){return{...e,lines:e.lines.map((e,r)=>r===t?n:e)}}function $e(e,t){return{...e.copy_kind?{copy_kind:e.copy_kind}:{},id:e.id||void 0,revision:Number(e.revision)||void 0,paper_date:e.paper_date||``,rounding_mode:e.rounding_mode,...b(t)?{member:e.member||x(t)}:{},date:e.date,customer:e.customer,customer_type:e.customer_type||e.original_customer_type||`unknown`,salesperson:e.salesperson,paper_number:e.paper_number||``,payment_account:Ge(e),credit_card_fee_payer:e.credit_card_fee_payer||`owner`,fees_date:e.fees_date,fee_auto_initialized:!0,fee_cost_mode:e.feeCostMode||(e.id?`legacy`:`checkboxes`),fee_items:[...e.feeRows.map(De),...Re(e,t).items].filter(e=>!n.isFee(e)),discount:e.discount,note:e.note,internal_note:e.internal_note,lines:e.lines.map(e=>me(e,t))}}function et(t,r){let i=We(t,r.st);i={...i,lines:i.lines.map((e,t)=>we(e,i,t,r))},i={...i,feeRows:ke(i,i.lines.map(e=>me(e,r.st)),r)};let a=$e(i,r.st),o={total:null,totalText:`待填写`,roundingHint:``,card:null,feesText:``,presetNotes:{}};try{let t=e.orderTotal(a.lines.map(t=>e.cents(t.sale,`商品销售额`)),e.cents(a.discount,`整单优惠`),a.rounding_mode);o.total=t.total,o.totalText=m(t.total,t.rounding_mode),o.roundingHint=h(t)}catch{o.roundingHint=a.rounding_mode===`yuan`?`合计后四舍五入到元,请先填写商品金额与优惠。`:`保留原单金额,精确到分。`}let s=0;if(n.isAccount(a.payment_account)){let e=D(r.st);try{let t=n.amount(o.total,e);o.card={rate:e,amount:t,amountText:(t/100).toFixed(2),formula:`成交合计 ¥${f(o.total)} × ${e}‰ = ¥${f(t)}。计入内部成本,客户付款金额不变;退款不退回已发生的手续费。`},s=t}catch{o.card={rate:e,amount:null,amountText:``,formula:`填写客户付款金额后自动计算${e}‰手续费;付款人默认${S(r.st,`owner`)},可按实际修改。`},s=null}}let c=a.fee_items.filter(e=>!n.isFee(e));try{let t=c.filter(e=>e.amount===``).length,n=c.reduce((t,n)=>t+(n.amount===``?0:e.cents(n.amount)),0)+(s??0);o.feesText=`实际费用合计`+(t||s===null?`(已知部分)`:``)+`:¥`+f(n)+(t?` · 还有 `+t+` 项待补齐(没有成本填0)`:``)+(s===null?` · 信用卡手续费待计算`:``)}catch{o.feesText=`请检查费用金额`}return o.presetNotes=Re(i,r.st).notes,{form:i,draft:a,summary:o}}function tt(e,{requireInternalNote:t=!0}={}){let n=String(e.customer??``).trim(),r=String(e.salesperson??``).trim();if(!n||n.length>60)throw Error(`客户称呼/代号必填,请填写 1~60 字。`);if(!r||r.length>30)throw Error(`开单人必填,请填写 1~30 字。`);if(t&&String(e.internal_note??``).replace(/\s/gu,``).length<3)throw Error(`内部备注至少填写3个字符,#号计入,空格和换行不计入。`);if(String(e.internal_note??``).trim().length>500)throw Error(`内部备注最多填写500字。`);return{...e,customer:n,salesperson:r,...t?{internal_note:String(e.internal_note??``).trim()}:{}}}let nt=e=>/^\d{4}-\d{2}-\d{2}$/.test(e||``)&&new Date(e+`T00:00:00Z`).toISOString().slice(0,10)===e;function rt(e,n){let r=[];if(e.customerTypeRequired&&![`new`,`returning`].includes(e.customer_type)&&r.push(`请选择客户类型(新客户或老客户)`),(!nt(e.date)||e.date>n.today)&&r.push(`业务日期请选择今天或之前的有效日期`),(e.feeRows.length||Re(e,n).items.length)&&(!nt(e.fees_date)||e.fees_date>n.today)&&r.push(`费用实际支付日期请选择今天或之前的有效日期`),/^\d+(?:\.\d{1,2})?$/.test(String(e.discount).trim())||r.push(`整单优惠请填写0或正数,最多2位小数`),e.lines.forEach((e,t)=>{let i=`商品 `+(t+1),a=Te(e,n),o=String(e.quantity).trim();o&&(!/^\d+(?:\.\d{1,3})?$/.test(o)||Number(o)<.001)&&r.push(i+`的克重/数量须大于0,最多3位小数`),a.pieces&&!/^[1-9]\d*$/.test(String(e.pieces).trim())&&r.push(i+`的计工费件数须为正整数`),!e.legacy&&!e.purchase.materialPayer&&e.pool?.source!==`pool`&&r.push(i+`请选择料费付款人`),!e.legacy&&!e.purchase.laborPayer&&r.push(i+`请选择进货工费付款人`),e.pocket&&!j(n).includes(e.pocket)&&!e.historicalPocket&&r.push(`货盘「`+M(n,e.pocket)+`」已停用,请重新选择已启用货盘,或明确选择外配。`)}),e.presets){let i=Re(e,n).notes;if(!e.presets.configured&&e.presets.checked.box&&i.box===`请填写正整数数量`&&r.push(`盒子数量请填写正整数`),e.presets.configured){for(let[n,i]of Object.entries(e.presets.checked))if(i&&d(e.presets.quantity,n))try{t.boxCount(e.presets.quantity[n])}catch(e){r.push(e.message)}}}if(r.length)throw Error(`请先修改:`+r.join(`;`)+`。`)}function U(t,r,{requireIdentity:i=!0}={}){if(i&&(t=tt(t)),n.isAccount(t.payment_account)&&!O(r))throw Error(`信用卡收款暂未准备好,请刷新后重新核对收款方式。`);let a=[],o=e=>e==null||String(e).trim()===``;if(!t.lines.length)throw Error(`请至少填写一行商品。`);if(t.lines.forEach((n,i)=>{let s=`商品 `+(i+1);if(o(n.name)&&a.push(s+`的名称`),o(n.quantity)&&a.push(s+`的克重/数量`),ee(r,n.pocket)&&n.unit===`g`&&ne(n.stockCount,{optional:!!n.historicalUnknown,title:s+`出库数量(对)`}),n.pricingMode===`auto`?(o(n.goldPrice)&&a.push(s+`的金价/银价`),o(n.laborRate)&&a.push(s+`的销售工费`)):o(n.baseSale??n.sale)&&a.push(s+`的基础金额`),(n.charges||[]).forEach((e,t)=>{o(e.name)&&a.push(s+`附加项目 `+(t+1)+`的名称`),o(e.amount)&&a.push(s+`的`+(e.name||`附加项目 `+(t+1))+`收费`)}),n.costParts){if(![`material`,`labor`].every(e=>_(r).includes(n.costPayers?.[e])))throw Error(s+`请选择料费和进货工费付款人。`);let i=e.purchaseCosts(n);if(n.costMaterial?.mode===`pool`&&(!nt(n.costMaterial.poolId)||n.costMaterial.poolId>t.date))throw Error(s+`请选择不晚于订单日期的料价日期。`);for(let[t,r]of Object.entries(i.parts))r===null&&(t!==`material`||n.costMaterial?.mode!==`pool`)&&a.push(s+`的`+e.costLabels[t])}else o(n.cost)&&a.push(s+`的货品成本`)}),t.fee_items.forEach((e,t)=>{o(e.note)&&a.push(`费用 `+(t+1)+`的名称`),o(e.amount)&&a.push((e.note||`费用 `+(t+1))+`的实际成本`)}),a.length)throw Error(`开单前请补齐:`+a.join(`、`)+`。没有收费或成本的项目填0,不需要的费用请移除。`);return t.lines.forEach((t,n)=>{try{e.sale(t),t.costParts||e.cents(t.cost,`货品成本`)}catch(e){throw Error(`商品 `+(n+1)+`:`+e.message)}}),t.fee_items.forEach(t=>e.cents(t.amount,t.note+`实际成本`)),e.orderTotal(t.lines.map(t=>e.sale(t).sale),e.cents(t.discount,`整单优惠`),t.rounding_mode),t}function it(e){return{...e,rounding_mode:e.rounding_mode||`cent`,discount:(e.discount/100).toFixed(2),fee_items:e.fee_items.map(e=>({...e,amount:e.amount===null?``:(e.amount/100).toFixed(2)})),lines:e.lines.map(e=>({...e,costMaterial:e.costMaterial?.mode===`pool`?{...e.costMaterial}:{mode:se(e).mode,...e.costMaterial?.mode===`gram`?{rate:e.costMaterial.rate==null?``:(e.costMaterial.rate/100).toFixed(2)}:{}},costLabor:{mode:e.costLabor?.mode||`total`,rate:e.costLabor?.rate==null?``:(e.costLabor.rate/100).toFixed(2)},quantity:e.unit===`g`?p(e.quantity):e.quantity,sale:(e.sale/100).toFixed(2),baseSale:((e.baseSale??e.sale)/100).toFixed(2),charges:(e.charges||[]).map(e=>({...e,amount:e.amount===null?``:(e.amount/100).toFixed(2)})),cost:e.cost===null?``:(e.cost/100).toFixed(2),...e.pricingMode===`auto`?{goldPrice:(e.goldPrice/100).toFixed(2),laborRate:(e.laborRate/100).toFixed(2)}:{},...e.costParts?{costParts:Object.fromEntries(Object.entries(e.costParts).map(([e,t])=>[e,t===null?``:(t/100).toFixed(2)]))}:{}}))}}function at(e){return e.unit===`g`&&![`quantity`,`goldPrice`,`laborRate`,`baseSale`,`sale`].some(t=>e[t]!==``)&&!e.charges.length}function ot(e,t,n){let r=e.lines.map((e,t)=>t).filter(t=>at(e.lines[t]));if(e.lines.length+Math.max(0,t.length-r.length)>60)throw Error(`加上本次商品后超过60件,请先整理现有商品`);let i=e,a=[];for(let e of t){let t=r.shift();t===void 0&&(i=Ye(i,n),t=i.lines.length-1);let o={...i.lines[t]};for(let t of[`unit`,`pricingMode`,`quantity`,`goldPrice`,`laborMode`,`laborRate`,`pieces`])o[t]=String(e[t]);o.charges=[...o.charges,...e.charges.map(e=>N({...e,id:n.uuid()},n.uuid))],i=Qe(i,t,o),a.push(t+1)}return{form:i,filled:a}}function W(e){return String(e??``).match(/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u)?.[1]||``}function st(e,t){let n=W(t);return e.filter(e=>!n||e.slice(1).includes(n)).slice(0,20)}function G(e,t){let n=String(e??``),r=n.match(/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u),i=r?n.slice(0,n.length-r[1].length-1):n,a=i+(i&&!/\s$/.test(i)?` `:``)+t+` `;if(a.length>500)throw Error(`内部备注最多填写500字。`);return a}return{productNames:r,chargeNames:i,chargeSaleDefaults:a,feeLabels:o,yuan:f,grams:p,orderAmount:m,orderRoundingHint:h,teamMode:b,currentMember:x,memberKeys:_,memberEnabled:v,memberName:S,memberOptions:C,defaultSalesperson:w,shopFeeDefaults:T,costConfig:E,creditCardRate:D,creditCardAvailable:O,memberAccountPrefix:k,accountIdentity:A,activePocketKeys:j,pocketLabel:M,pocketOptions:te,pocketCountsEnabled:ee,stockCountValue:ne,newCharge:N,changeChargeType:ie,setChargeAmount:ae,collectCharge:oe,newLine:I,setLineField:le,setPurchaseField:ue,setPoolSource:de,collectLine:me,syncLine:we,lineVisibility:Te,materialPoolMg:he,poolQuoteInput:xe,feeSourceText:Oe,editFeeRow:R,addManualFee:je,removeFeeRow:Me,restoreChargeCost:Ne,newPresets:Pe,togglePreset:B,setPresetQuantity:Le,readPresets:Re,presetCatalogView:ze,paymentMethods:Ve,recipientOptions:He,readPaymentAccount:Ge,changeMember:Ke,formMember:V,isBlankDraft:H,newForm:Je,addLine:Ye,removeLine:Xe,addCharge:Ze,updateLine:Qe,collectDraft:$e,syncForm:et,validateOrderIdentity:tt,validateFormFields:rt,validateIssueDraft:U,draftInputs:it,isFormulaBlank:at,applyFormulaLines:ot,noteTagQuery:W,filterNoteTags:st,insertNoteTag:G}});var We=Ue.exports,Ge=Pe,Ke=Le,qe=Be,H=We,Je=(e,t)=>H.orderAmount(e,t),Ye=e=>e===`demo`?`团队功能预览 · 虚构数据`:e===`production`?`云端系统`:`本机试用`;function Xe({client:e,session:t,onLoggedIn:n}){let[r,i]=(0,I.useState)(``),[o,s]=(0,I.useState)(``),l=ye(null,t),u=t.loginOptions||[],d=t.mode===`demo`?`用虚构订单练习完整流程,演示数据与新账隔离。`:`先设置账号。当前是本机试用,正式云端开账另行配置。`;async function f(e,t){i(``),s(e);try{await t(),await n()}catch(e){i(e.message)}finally{s(``)}}return(0,L.jsxs)(`div`,{className:`login-wrap`,children:[(0,L.jsxs)(a,{className:`login-card`,children:[(0,L.jsxs)(`div`,{className:`login-head`,children:[(0,L.jsx)(we,{name:l,size:`lg`}),(0,L.jsxs)(x.Title,{level:1,className:`login-title`,children:[l,` · 新账系统`]}),(0,L.jsx)(x.Paragraph,{type:`secondary`,className:`login-intro`,children:t.setup||t.mode===`demo`?d:`录入、收款与复核,从同一张订单开始。`}),(0,L.jsx)(`span`,{className:`login-mode`,children:Ye(t.mode)})]}),r&&(0,L.jsx)(c,{type:`error`,showIcon:!0,message:r,className:`login-error`,role:`alert`}),t.mode===`demo`?(0,L.jsx)(`div`,{className:`role-cards`,role:`group`,"aria-label":`选择演示身份`,children:u.map(t=>(0,L.jsxs)(p,{className:`role-card`+(t.member===`owner`?` role-card-owner`:``),"aria-label":`以`+t.label+`身份进入演示`,loading:o===t.member,disabled:!!o&&o!==t.member,onClick:()=>f(t.member,()=>he(e,t.member)),children:[(0,L.jsx)(`span`,{className:`role-avatar`,"aria-hidden":`true`,children:Array.from(t.label)[0]}),(0,L.jsxs)(`span`,{className:`role-text`,children:[(0,L.jsx)(`strong`,{children:t.label}),(0,L.jsx)(`small`,{children:t.member===`owner`?`店主`:`店员`})]}),(0,L.jsx)(O,{className:`role-go`,"aria-hidden":`true`})]},t.member))}):t.setup?(0,L.jsx)(Qe,{working:o===`setup`,onSubmit:t=>f(`setup`,()=>_e(e,t))}):(0,L.jsx)(Ze,{options:u,working:o===`login`,onSubmit:(t,n)=>f(`login`,()=>me(e,t,n))}),(0,L.jsxs)(`div`,{className:`login-foot`,children:[(0,L.jsx)(`span`,{className:`small muted`,children:`新版界面(对照试用)`}),(0,L.jsx)(`a`,{href:`/`,className:`old-ui-link`,children:`返回旧版界面`})]})]}),(0,L.jsx)(`p`,{className:`login-note small muted`,children:`云端数据库和飞书同步的真实状态,会在系统内显示。`})]})}function Ze({options:e,working:t,onSubmit:n}){let[r,i]=(0,I.useState)(``),[a,o]=(0,I.useState)(``);return(0,L.jsx)(`form`,{className:`login-form`,onSubmit:e=>{e.preventDefault(),n(r,a)},children:(0,L.jsxs)(y,{layout:`vertical`,component:!1,children:[(0,L.jsx)(y.Item,{label:`登录账号`,required:!0,children:(0,L.jsx)(E,{"aria-label":`登录账号`,suffixIcon:(0,L.jsx)(ne,{}),"data-testid":`login-member`,value:r||void 0,placeholder:`请选择账号`,options:e.map(e=>({value:e.member,label:e.label})),onChange:i})}),(0,L.jsx)(y.Item,{label:`密码`,required:!0,children:(0,L.jsx)(P.Password,{name:`password`,"aria-label":`密码`,prefix:(0,L.jsx)(j,{className:`input-icon`}),autoComplete:`current-password`,value:a,onChange:e=>o(e.target.value)})}),(0,L.jsx)(p,{type:`primary`,htmlType:`submit`,block:!0,size:`large`,loading:t,children:`登录`})]})})}function Qe({working:e,onSubmit:t}){let[n,r]=(0,I.useState)({storeName:``,ownerLabel:`店主`,ownerLoginName:`owner`,ownerPassword:``}),i=e=>({value:n[e],onChange:t=>r({...n,[e]:t.target.value})});return(0,L.jsx)(`form`,{className:`setup-form`,onSubmit:e=>{e.preventDefault(),t(n)},children:(0,L.jsxs)(y,{layout:`vertical`,component:!1,children:[(0,L.jsx)(y.Item,{label:`店铺名称`,required:!0,children:(0,L.jsx)(P,{name:`storeName`,"aria-label":`店铺名称`,maxLength:80,...i(`storeName`)})}),(0,L.jsx)(y.Item,{label:`店主显示名`,required:!0,children:(0,L.jsx)(P,{name:`ownerLabel`,"aria-label":`店主显示名`,maxLength:30,...i(`ownerLabel`)})}),(0,L.jsx)(y.Item,{label:`店主登录名`,required:!0,children:(0,L.jsx)(P,{name:`ownerLoginName`,"aria-label":`店主登录名`,maxLength:60,...i(`ownerLoginName`)})}),(0,L.jsx)(y.Item,{label:`店主密码(至少12个字符)`,required:!0,children:(0,L.jsx)(P.Password,{name:`ownerPassword`,"aria-label":`店主密码`,autoComplete:`new-password`,...i(`ownerPassword`)})}),(0,L.jsx)(x.Paragraph,{type:`secondary`,className:`small`,children:`进入系统后,在设置 → 员工管理中添加员工。`}),(0,L.jsx)(p,{type:`primary`,htmlType:`submit`,block:!0,size:`large`,loading:e,children:`建立试用账号`})]})})}var $e=e=>`mm-next-draft-${e}`;function et(e,t){try{let n=JSON.parse(e.getItem($e(t))||`null`);return n&&typeof n==`object`&&Array.isArray(n.lines)?n:null}catch{return null}}function tt(e,t,n){try{e.setItem($e(t),JSON.stringify(n))}catch{}}function nt(e,t){try{e.removeItem($e(t))}catch{}}function rt(e){return(0,I.useSyncExternalStore)(t=>{let n=e.subscribe(t);return()=>void n()},()=>[e.busy,e.progressText,e.user,e.pending()?.key||``].join(`\0`))}var U=()=>window.crypto.randomUUID();function it({client:e,state:t,session:n,initialDraft:r}){let[i,a]=(0,I.useState)(null),[o,s]=(0,I.useState)(``),[c,l]=(0,I.useState)(null),u=(0,I.useMemo)(()=>({st:t,session:n,uuid:U,materialPools:i,quote:c}),[t,n,i,c]),d=(0,I.useRef)(u),[f,p]=(0,I.useState)(()=>H.syncForm(H.newForm({st:t,session:n,uuid:U},r||void 0),{st:t,session:n,uuid:U})),m=(0,I.useRef)(f),h=(0,I.useCallback)(e=>{m.current=e,p(e)},[]),g=(0,I.useCallback)(e=>h(H.syncForm(e(m.current.form),d.current)),[h]),_=(0,I.useCallback)(e=>h(H.syncForm(H.newForm(d.current,e||void 0),d.current)),[h]);(0,I.useEffect)(()=>{d.current=u,h(H.syncForm(m.current.form,u))},[u,h]),(0,I.useEffect)(()=>{tt(window.localStorage,t.user.id,f.draft)},[f.draft,t.user.id]);let[v,y]=(0,I.useState)(0),b=(0,I.useCallback)(()=>y(e=>e+1),[]);(0,I.useEffect)(()=>{let t=!0;return e.api(`/api/material-pools`).then(e=>{if(!Array.isArray(e.rows))throw Error(`每日料价记录未完整返回,请重新读取。`);t&&(a(e),s(``))}).catch(e=>{t&&s(`每日料价尚未读到:`+(e.name===`AbortError`?`读取超时,请点击“刷新料价”。`:e.message))}),()=>{t=!1}},[e,v]);let x=(0,I.useMemo)(()=>{let e=H.poolQuoteInput(f.form,u),t=i?.rows||[];return e.entries.some(e=>t.some(t=>t.id===e.poolId&&t.personalPools!==void 0))?JSON.stringify(e):``},[f.form,u,i]);return(0,I.useEffect)(()=>{if(!x||c&&JSON.stringify(c.input)===x)return;let t=!0,n=window.setTimeout(async()=>{let n=JSON.parse(x);try{let r=await e.api(`/api/material-pools/quote`,n);t&&l({input:n,result:r,error:``})}catch(e){t&&l({input:n,result:null,error:e.message})}},180);return()=>{t=!1,window.clearTimeout(n)}},[x,c,e]),{store:f,update:g,reset:_,ctx:u,pools:i,poolError:o,loadPools:b}}function at({children:e,label:t=`查看说明`}){return(0,L.jsx)(n,{title:e,trigger:[`hover`,`focus`,`click`],placement:`top`,children:(0,L.jsx)(`span`,{className:`help-icon`,role:`button`,tabIndex:0,"aria-label":t,children:(0,L.jsx)(ae,{})})})}function ot(){return(0,L.jsxs)(`span`,{className:`internal-tag`,children:[(0,L.jsx)(j,{"aria-hidden":`true`}),` 内部 · 客户不可见`]})}function W({label:e,field:t,hint:n,help:r,hidden:i,className:a,span:o,id:s,labelId:c,children:l}){if(i)return null;let u=(0,L.jsxs)(`div`,{className:`field `+(a||``),"data-field":t,children:[(0,L.jsxs)(`div`,{className:`field-label-row`,children:[(0,L.jsx)(`label`,{className:`field-label`,htmlFor:s,id:c,children:e}),r?(0,L.jsx)(at,{children:r}):null]}),l,n?(0,L.jsx)(`div`,{className:`field-hint`,children:n}):null]});return o?(0,L.jsx)(g,{...o,children:u}):u}var st=e=>typeof e.label==`string`?e.label:e.field;function G({value:e,onChange:t,numeric:n,readOnly:r,disabled:i,placeholder:a,maxLength:o,type:s,...c}){let l=(0,I.useId)();return(0,L.jsx)(W,{...c,id:l,children:(0,L.jsx)(P,{id:l,name:c.field,"aria-label":st(c),value:e,type:s,inputMode:n?`decimal`:void 0,autoComplete:`off`,readOnly:r,disabled:i,placeholder:a,maxLength:o,className:(r?`readonly-input`:``)+(n?` num`:``),onChange:e=>t?.(e.target.value)})})}function K({value:e,options:t,onChange:n,disabled:r,placeholder:i,...a}){let o=(0,I.useId)();return(0,L.jsx)(W,{...a,id:o,children:(0,L.jsx)(E,{id:o,"aria-label":st(a),value:e===``&&i?void 0:e,placeholder:i,disabled:r,popupMatchSelectWidth:!1,options:t.map(([e,t,n])=>({value:e,label:t,disabled:!!n,title:t})),onChange:n,getPopupContainer:()=>document.body})})}function q({value:e,options:t,onChange:n,disabled:r,...i}){let a=(0,I.useId)();return(0,L.jsx)(W,{...i,labelId:a,children:(0,L.jsx)(D.Group,{value:e,disabled:r,optionType:`button`,buttonStyle:`solid`,block:!0,role:`radiogroup`,"aria-labelledby":a,onChange:e=>n(e.target.value),options:t.map(([e,t,n])=>({value:e,label:t,disabled:!!n}))})})}var J={xs:24,sm:12,xl:6},Y={xs:12,sm:12,xl:6},X={xs:24,sm:12,xl:8},ct={xs:24,md:12};function lt({step:e,title:t,help:n,extra:r,internal:i,className:o,testId:s,children:c}){return(0,L.jsx)(a,{className:`panel`+(i?` panel-internal`:``)+(o?` `+o:``),"data-testid":s,title:(0,L.jsxs)(`div`,{className:`section-title`,children:[(0,L.jsx)(`span`,{className:`step-no`,"aria-hidden":`true`,children:e}),(0,L.jsx)(`h2`,{children:t}),n?(0,L.jsx)(at,{label:`关于`+(typeof t==`string`?t:`本区`),children:n}):null,i?(0,L.jsx)(ot,{}):null]}),extra:r,children:c})}function ut({form:e,state:t,paperNumber:n,update:r}){let i=e=>t=>r(n=>({...n,[e]:t})),a=H.teamMode(t),o=e.payment.method===`信用卡`;return(0,L.jsx)(lt,{step:`01`,title:`客户与单据`,help:`生成单据即按成交合计记录全额收款,同时按所选货盘扣减黄金库存并计入实际利润。请核对商品已交付,选择实际收款方式与收款人;业务日期作为收款和出库日期。`,extra:(0,L.jsxs)(`span`,{className:`section-extra`,children:[(0,L.jsx)(te,{"aria-hidden":`true`}),` `,e.id?`补齐原草稿,生成销售单据后完成记账`:`填写内容自动暂存,生成单据即完成记账`]}),children:(0,L.jsxs)(k,{gutter:[16,14],children:[(0,L.jsx)(G,{span:Y,label:`业务日期`,field:`date`,type:`date`,value:e.date,onChange:i(`date`)}),(0,L.jsx)(G,{span:Y,label:`纸单编号(自动)`,field:`paper_number`,value:n,readOnly:!0,help:`前半段为业务日期,后半段序号持续累计,中间不加横线,换日期不归零;生成时分配。`}),(0,L.jsx)(G,{span:J,label:`客户称呼/代号(必填)`,field:`customer`,value:e.customer,maxLength:60,placeholder:`方便找回订单即可`,onChange:i(`customer`)}),(0,L.jsx)(q,{span:J,label:`客户类型`+(e.customerTypeRequired?`(必选)`:``),field:`customer_type`,value:e.customer_type,options:[[`new`,`新客户`],[`returning`,`老客户`]],onChange:i(`customer_type`)}),(0,L.jsx)(G,{span:Y,label:`开单人(必填)`,field:`salesperson`,value:e.salesperson,maxLength:30,onChange:i(`salesperson`)}),a&&(e.memberLocked?(0,L.jsx)(G,{span:Y,label:`订单归属(经营款与业绩)`,field:`member`,value:H.memberName(t,e.member),readOnly:!0}):(0,L.jsx)(K,{span:Y,label:`订单归属(经营款与业绩)`,field:`member`,value:e.member,options:H.memberOptions(t),onChange:e=>r(n=>H.changeMember(n,e,t))})),(0,L.jsx)(q,{span:J,label:`收款方式`,field:`payment_method`,value:e.payment.method,options:H.paymentMethods(t).map(e=>[e,e]),onChange:e=>r(t=>({...t,payment:{...t.payment,method:e}}))}),(0,L.jsx)(K,{span:J,label:`收款人`,field:`payment_recipient`,value:e.payment.recipient,disabled:o,options:H.recipientOptions(t,e.payment),hint:o&&H.creditCardAvailable(t)?`信用卡统一由${H.memberName(t,`owner`)}收款。`:void 0,onChange:e=>r(t=>({...t,payment:{...t.payment,recipient:e}}))})]})})}function dt({index:e,line:t,update:n}){let r=(t,r)=>n(n=>{let i=n.lines[e];return H.updateLine(n,e,{...i,charges:i.charges.map((e,n)=>n===t?r(e):e)})});return(0,L.jsxs)(`div`,{className:`sale-charges`,children:[(0,L.jsxs)(`div`,{className:`sub-title`,children:[(0,L.jsxs)(`div`,{className:`sub-title-text`,children:[(0,L.jsx)(`strong`,{children:`工费附加项目`}),(0,L.jsx)(`span`,{className:`small muted`,children:`选填 · 编绳、证书、包装、快递`}),(0,L.jsx)(at,{label:`关于工费附加项目`,children:`向客户收费预填:编绳55元、证书10元、包装10元、快递8元,均可修改;按填写金额自动加进本行销售额。`})]}),(0,L.jsx)(p,{size:`small`,icon:(0,L.jsx)(f,{}),"data-action":`add-charge`,onClick:()=>n(t=>H.addCharge(t,e,U)),children:`添加附加项目`})]}),t.charges.length>0&&(0,L.jsx)(`div`,{className:`charge-list`,children:t.charges.map((t,i)=>(0,L.jsxs)(`div`,{className:`charge-row`,"data-charge":i,children:[(0,L.jsx)(K,{label:`附加项目`,field:`chargeType`,value:t.type,options:[...H.chargeNames,`其他`].map(e=>[e,e]),onChange:e=>r(i,t=>H.changeChargeType(t,e))}),(0,L.jsx)(G,{label:`附加项目名称`,field:`chargeName`,hidden:t.type!==`其他`,value:t.customName,maxLength:40,onChange:e=>r(i,t=>({...t,customName:e}))}),(0,L.jsx)(G,{label:`附加金额(元)`,field:`chargeAmount`,numeric:!0,value:t.amount,placeholder:`没有收费填0,可修改金额`,onChange:e=>r(i,t=>H.setChargeAmount(t,e))}),(0,L.jsxs)(`div`,{className:`charge-actions`,children:[(0,L.jsx)(p,{type:`text`,size:`small`,icon:(0,L.jsx)(l,{}),"data-action":`remove-charge`,onClick:()=>n(t=>{let n=t.lines[e];return H.updateLine(t,e,{...n,charges:n.charges.filter((e,t)=>t!==i)})}),children:`移除附加项`}),t.costRemoved&&(0,L.jsxs)(`small`,{className:`muted`,children:[`内部成本已移除`,` `,(0,L.jsx)(p,{type:`link`,size:`small`,"data-action":`restore-charge-cost`,onClick:()=>n(t=>H.restoreChargeCost(t,e,i)),children:`恢复内部成本`})]})]})]},t.id))})]})}function ft({index:e,line:t,state:n,update:r,onReloadPools:i}){let a=H.lineVisibility(t,n),o=t=>r(n=>H.updateLine(n,e,t(n.lines[e]))),s=e=>t=>o(n=>H.setPurchaseField(n,e,t)),c=H.memberOptions(n),l=t.purchase,u=t.pool?.source===`pool`,d=e=>H.memberKeys(n).includes(e)?H.memberOptions(n,!1,{selected:e}):c;return(0,L.jsxs)(`div`,{className:`internal`,children:[(0,L.jsxs)(`div`,{className:`internal-title`,children:[(0,L.jsx)(j,{"aria-hidden":`true`}),(0,L.jsx)(`strong`,{children:`内部成本`}),(0,L.jsx)(`span`,{className:`internal-tag`,children:`内部 · 客户不可见`})]}),(0,L.jsxs)(k,{gutter:[16,14],className:`cost-source-fields`,children:[(0,L.jsx)(K,{span:X,label:`出库货盘(仅黄金)`,field:`pocket`,value:t.pocket,options:H.pocketOptions(n,t.pocket,t.historicalPocket),onChange:e=>o(t=>H.setLineField(t,`pocket`,e))}),(0,L.jsx)(G,{span:X,label:`出库数量(对)`,field:`stockCount`,numeric:!0,hidden:!a.stockCount,value:t.stockCount,placeholder:`一对填1`,hint:a.stockCountOptional?`历史未记录对数,可保留空白;与计工费件数分别填写。`:`与计工费件数分别填写。`,onChange:e=>o(t=>H.setLineField(t,`stockCount`,e))})]}),t.legacy?(0,L.jsx)(G,{label:`原单货品成本(旧版未分项)`,field:`cost`,value:t.cost,readOnly:!0}):l&&(0,L.jsxs)(`div`,{className:`cost-fields`,children:[t.pool&&(0,L.jsxs)(`div`,{className:`material-source`,children:[(0,L.jsxs)(k,{gutter:[16,14],children:[(0,L.jsx)(q,{span:X,label:`料费成本来源`,help:t.pool.help,field:`materialSource`,value:t.pool.source,options:[[`manual`,`手动填写成本`],[`pool`,`当日加权料价`,!a.poolAllowed]],onChange:e=>o(t=>H.setPoolSource(t,e))}),u&&(0,L.jsx)(K,{span:X,label:`料价日期`,field:`materialPoolId`,value:t.pool.poolId,options:t.pool.options.map(e=>[e.value,e.label]),onChange:e=>o(t=>({...t,pool:t.pool?{...t.pool,poolId:e}:t.pool}))}),u&&(0,L.jsx)(W,{span:X,label:`\xA0`,field:`reload-material-choices`,children:(0,L.jsx)(p,{icon:(0,L.jsx)(C,{}),"data-action":`reload-material-choices`,onClick:i,className:`reload-button`,children:`刷新料价`})})]}),u&&t.view.poolNote&&(0,L.jsx)(`p`,{className:`small material-pool-note`,"aria-live":`polite`,"data-testid":`pool-note`,children:t.view.poolNote})]}),(0,L.jsxs)(k,{gutter:[16,14],className:`purchase-cost-grid`,children:[a.materialMode&&(0,L.jsx)(q,{span:J,label:`进货料费方式`,field:`cost-materialMode`,value:l.materialMode,options:[[`gram`,`按克料价`,t.unit!==`g`],[`total`,`直接填总料费`]],onChange:s(`materialMode`)}),(0,L.jsx)(G,{span:Y,label:u?`加权进货料价(元/克,自动)`:`进货料价(元/克)`,field:`cost-materialRate`,numeric:!0,hidden:!a.materialRate,readOnly:u,value:l.materialRate,placeholder:u?`待核算`:`填写每克进货料价`,onChange:s(`materialRate`)}),(0,L.jsx)(G,{span:Y,label:u?`耗用料费合计(元,自动)`:`料费成本合计(元)`,field:`cost-material`,numeric:!0,readOnly:a.materialReadOnly,value:l.material,placeholder:u?`待核算`:`开单前必填,没有填0`,onChange:s(`material`)}),a.materialPayer?(0,L.jsx)(K,{span:J,label:`料费付款人`,field:`cost-materialPayer`,value:l.materialPayer,placeholder:`请选择`,options:d(l.materialPayer),onChange:s(`materialPayer`)}):(0,L.jsx)(G,{span:J,label:t.pool?.personal?`材料原付款人`:`本批购料付款人`,field:`cost-materialPoolPayer`,value:t.pool?.payerText||``,readOnly:!0})]}),(0,L.jsx)(`p`,{className:`purchase-formula small muted`,"aria-live":`polite`,children:t.view.materialFormula}),t.view.materialOriginal&&(0,L.jsx)(`p`,{className:`small muted`,children:t.view.materialOriginal}),(0,L.jsxs)(k,{gutter:[16,14],className:`purchase-cost-grid`,children:[(0,L.jsx)(q,{span:J,label:`进货工费方式`,field:`cost-laborMode`,value:l.laborMode,options:[[`gram`,`克工费`,t.unit!==`g`],[`total`,`总工费`]],onChange:s(`laborMode`)}),(0,L.jsx)(G,{span:Y,label:`进货克工费(元/克)`,field:`cost-laborRate`,numeric:!0,hidden:!a.laborRateInput,value:l.laborRate,placeholder:`填写每克工费`,onChange:s(`laborRate`)}),(0,L.jsx)(G,{span:Y,label:`进货总工费(元)`,field:`cost-labor`,numeric:!0,readOnly:a.laborReadOnly,value:l.labor,placeholder:`开单前必填,没有填0`,onChange:s(`labor`)}),(0,L.jsx)(K,{span:J,label:`进货工费付款人`,field:`cost-laborPayer`,value:l.laborPayer,placeholder:`请选择`,options:d(l.laborPayer),onChange:s(`laborPayer`)})]}),(0,L.jsx)(`p`,{className:`purchase-formula small muted`,"aria-live":`polite`,children:t.view.laborFormula}),a.extraCosts&&(0,L.jsxs)(`div`,{className:`legacy-extra-costs`,children:[(0,L.jsx)(`p`,{className:`small muted`,children:`这里保留原来填写的货品成本,不要在下方实际费用重复登记。`}),(0,L.jsxs)(k,{gutter:[16,14],children:[(0,L.jsx)(G,{span:X,label:`配件成本(元,本行合计)`,field:`cost-accessories`,numeric:!0,value:l.accessories,onChange:s(`accessories`)}),(0,L.jsx)(G,{span:X,label:`其他货品成本(元,本行合计)`,field:`cost-other`,numeric:!0,value:l.other,onChange:s(`other`)}),(0,L.jsx)(K,{span:X,label:`原有配件及其他成本付款人`,field:`payer`,value:t.payer,options:c,onChange:e=>o(t=>({...t,payer:e}))})]})]}),(0,L.jsxs)(`p`,{className:`cost-summary`,children:[(0,L.jsx)(`span`,{children:`本行货品成本合计`}),(0,L.jsx)(`span`,{className:`num`+(t.view.purchase?.total==null?` pending`:``),children:t.view.purchase?.total==null?u?`料费待核算`:`请补齐(没有的项目填0)`:`¥`+H.yuan(t.view.purchase.total)})]})]})]})}var pt={xs:24,sm:12,xl:8},mt={xs:12,sm:12,xl:4};function ht({form:e,state:t,update:n,onError:r,onReloadPools:i}){let a=e=>{try{n(e)}catch(e){r(e.message)}};return(0,L.jsxs)(lt,{step:`02`,title:`商品明细`,help:`金价与工费分开填写。银饰不扣黄金货盘;外配使用店内金料时,选实际出库货盘。`,extra:(0,L.jsxs)(`span`,{className:`section-extra`,children:[`共 `,e.lines.length,` 件商品`]}),children:[e.lines.map((o,s)=>(0,L.jsx)(gt,{index:s,line:o,state:t,canRemove:e.lines.length>1,update:n,onRemove:()=>{if(e.lines.length<=1)return r(`请至少保留一行商品`);a(e=>H.removeLine(e,s))},onReloadPools:i},s)),(0,L.jsxs)(`div`,{className:`form-actions`,children:[(0,L.jsx)(p,{className:`add-line-button`,icon:(0,L.jsx)(f,{}),"data-action":`add-line`,onClick:()=>a(e=>H.addLine(e,{st:t,uuid:U})),children:`添加商品`}),(0,L.jsx)(`span`,{className:`small muted`,children:`银饰不扣黄金货盘;外配用店内金料时选实际出库货盘。`})]})]})}function gt({index:e,line:t,state:n,canRemove:r,update:i,onRemove:a,onReloadPools:o}){let s=H.lineVisibility(t,n),c=t=>i(n=>H.updateLine(n,e,t(n.lines[e]))),l=e=>t=>c(n=>H.setLineField(n,e,t));return(0,L.jsxs)(`section`,{className:`line-item`,"data-line":e,"aria-label":`商品 `+(e+1),children:[(0,L.jsxs)(`div`,{className:`line-top`,children:[(0,L.jsxs)(`div`,{className:`line-heading`,children:[(0,L.jsx)(`span`,{className:`line-no`,children:String(e+1).padStart(2,`0`)}),(0,L.jsxs)(`strong`,{children:[`商品 `,String(e+1).padStart(2,`0`)]}),(0,L.jsx)(`span`,{className:`line-name muted`,children:t.nameType===`其他`?t.customName:t.nameType})]}),(0,L.jsx)(p,{type:`text`,size:`small`,icon:(0,L.jsx)(S,{}),"data-action":`remove-line`,disabled:!r,onClick:a,children:`移除`})]}),(0,L.jsxs)(k,{gutter:[16,14],children:[(0,L.jsx)(K,{span:J,label:`商品名称`,field:`nameType`,value:t.nameType,options:[...H.productNames,`其他`].map(e=>[e,e]),onChange:l(`nameType`)}),(0,L.jsx)(G,{span:J,label:`其他商品名称`,field:`customName`,hidden:!s.customName,value:t.customName,maxLength:60,onChange:l(`customName`)}),(0,L.jsx)(q,{span:pt,label:`计价方式`,field:`pricingMode`,value:t.pricingMode,options:[[`auto`,`按金价与工费计算`],[`manual`,`直接填写金额`]],onChange:l(`pricingMode`)}),(0,L.jsx)(q,{span:mt,label:`单位`,field:`unit`,value:t.unit,options:[[`g`,`g`],[`件`,`件`]],onChange:l(`unit`)}),(0,L.jsx)(G,{span:Y,label:`克重/数量`,field:`quantity`,numeric:!0,value:t.quantity,onChange:l(`quantity`)})]}),(0,L.jsxs)(k,{gutter:[16,14],className:`sale-inputs`,children:[(0,L.jsx)(G,{span:Y,label:`金价/银价(元/克)`,field:`goldPrice`,numeric:!0,hidden:!s.goldPrice,value:t.goldPrice,onChange:l(`goldPrice`)}),(0,L.jsx)(q,{span:Y,label:`销售工费方式`,field:`laborMode`,hidden:!s.laborMode,value:t.laborMode,options:[[`gram`,`克工费`],[`piece`,`件工费`]],onChange:l(`laborMode`)}),(0,L.jsx)(G,{span:Y,label:`销售工费`,field:`laborRate`,numeric:!0,hidden:!s.laborRate,value:t.laborRate,onChange:l(`laborRate`)}),(0,L.jsx)(G,{span:Y,label:`计工费件数`,field:`pieces`,numeric:!0,hidden:!s.pieces,value:t.pieces,onChange:l(`pieces`)}),(0,L.jsx)(G,{span:ct,label:`销售单价说明(客户可见)`,field:`priceNote`,hidden:!s.priceNote,value:t.priceNote,maxLength:100,onChange:l(`priceNote`)}),(0,L.jsx)(G,{span:J,label:`商品基础金额(不含附加项目)`,field:`baseSale`,numeric:!0,hidden:!s.baseSale,value:t.baseSale,onChange:l(`baseSale`)})]}),(0,L.jsx)(dt,{index:e,line:t,update:i}),(0,L.jsxs)(k,{gutter:[16,8],className:`sale-result`,align:`bottom`,children:[(0,L.jsx)(G,{span:{xs:24,md:10,xl:8},className:`sale-field`,label:`本行销售额(元,含附加项目)`,field:`sale`,value:t.sale,readOnly:!0}),(0,L.jsx)(g,{xs:24,md:14,xl:16,children:(0,L.jsx)(x.Paragraph,{className:`calculation small`,"aria-live":`polite`,"data-testid":`line-calculation`,children:t.view.calculation})})]}),(0,L.jsx)(ft,{index:e,line:t,state:n,update:i,onReloadPools:o})]})}function _t({form:e,state:t,summary:n,update:r}){let i=e.presets,a=H.presetCatalogView(e,t),s={certificate:`4`,packaging:`3`,shipping:`6`,...t.shopSettings?.feeDefaults},c=i?`按实际发生勾选,快递最多选一项;盒子按配置单价和数量计费。取消勾选不记成本,客户收费不受影响。`:e.feeCostMode===`checkboxes`?`沿用本单已有费用、付款人与支付日期。普通费用按凭据核对;信用卡手续费金额和日期自动维护。`:`上方附加项目自动带入成本。证书默认${s.certificate}元、包装${s.packaging}元;快递按整单默认${s.shipping}元,均可修改。请填写实际已付金额,没有成本填0;不需要的整单费用可移除。开单时记录费用和付款人。`;return(0,L.jsxs)(lt,{step:`03`,title:`实际费用`,internal:!0,testId:`fee-costs`,help:c+` 客户单据不显示。`,extra:(0,L.jsx)(p,{size:`small`,icon:(0,L.jsx)(f,{}),"data-action":`add-fee`,onClick:()=>r(e=>H.addManualFee(e,t,U)),children:`添加其他成本`}),children:[!i&&(0,L.jsx)(`p`,{className:`small muted section-lead`,children:c}),(0,L.jsx)(k,{gutter:[16,14],children:(0,L.jsx)(G,{span:J,label:`费用实际支付日期`,field:`fees_date`,type:`date`,value:e.fees_date,onChange:e=>r(t=>({...t,fees_date:e}))})}),i&&(0,L.jsxs)(`fieldset`,{className:`order-cost-presets`,"data-testid":`cost-presets`,children:[(0,L.jsxs)(`legend`,{children:[`常用成本 `,(0,L.jsx)(`span`,{className:`small muted`,children:`按实际发生勾选 · 快递二选一,也可不选`})]}),(0,L.jsxs)(`div`,{className:`order-cost-options`,children:[a.length===0&&(0,L.jsx)(`p`,{className:`muted`,children:`暂无启用的勾选成本,可在店铺配置中添加。`}),a.map(e=>{let a=!!i.checked[e.kind];return(0,L.jsxs)(`div`,{className:`order-cost-option`+(a?` checked`:``),"data-preset":e.kind,children:[(0,L.jsxs)(o,{className:`order-cost-check`,checked:a,onChange:n=>r(r=>H.togglePreset(r,e.kind,n.target.checked,t,U)),children:[(0,L.jsxs)(`span`,{className:`order-cost-main`,children:[(0,L.jsx)(`strong`,{children:e.name}),(0,L.jsx)(`span`,{className:`order-cost-price num`,children:e.price})]}),(0,L.jsx)(`small`,{className:`order-cost-payer`,children:e.kind===`yt`&&!i.configured?n.presetNotes.ytPayer:e.payer})]}),e.byQuantity&&a&&(0,L.jsx)(W,{className:`order-cost-quantity`,label:`数量(个)`,field:`cost_`+e.kind+`_quantity`,hint:n.presetNotes[e.kind],children:(0,L.jsx)(P,{name:`cost_`+e.kind+`_quantity`,"aria-label":e.name+`数量(个)`,inputMode:`numeric`,className:`num`,value:i.quantity[e.kind]??`1`,onChange:t=>r(n=>H.setPresetQuantity(n,e.kind,t.target.value))})})]},e.kind)})]})]}),(0,L.jsx)(`div`,{className:`fee-grid`,children:e.feeRows.map((e,n)=>{let i=e.key.startsWith(`manual:`);return(0,L.jsxs)(`div`,{className:`fee-row`,"data-fee":e.key,"data-fee-index":n,children:[(0,L.jsxs)(`div`,{className:`fee-title`,children:[i?(0,L.jsx)(G,{label:`费用项目名称`,field:`feeNote`,value:e.note,maxLength:150,onChange:e=>r(t=>H.editFeeRow(t,n,`note`,e))}):(0,L.jsx)(`strong`,{className:`fee-name`,children:e.note}),(0,L.jsx)(`span`,{className:`small muted fee-source`,children:H.feeSourceText(e)})]}),(0,L.jsx)(G,{label:`实际成本(元)`,field:`feeAmount`,numeric:!0,value:e.amount,placeholder:`没有成本填0`,onChange:e=>r(t=>H.editFeeRow(t,n,`amount`,e))}),(0,L.jsx)(K,{label:`费用付款人`,field:`feePayer`,value:e.payer,options:H.memberOptions(t,!0,{selected:e.payer}),onChange:e=>r(t=>H.editFeeRow(t,n,`payer`,e))}),(0,L.jsx)(p,{type:`text`,size:`small`,icon:(0,L.jsx)(l,{}),"data-action":`remove-fee`,onClick:()=>r(e=>H.removeFeeRow(e,n)),children:`移除费用`})]},e.key)})}),n.card&&(0,L.jsxs)(`div`,{className:`credit-card-preview`,"data-testid":`credit-card-preview`,children:[(0,L.jsxs)(`div`,{className:`credit-card-heading`,children:[(0,L.jsx)(`strong`,{children:`信用卡手续费`}),(0,L.jsx)(`span`,{className:`small muted`,children:`自动计算 · 客户单据不显示`})]}),(0,L.jsxs)(k,{gutter:[16,14],children:[(0,L.jsx)(G,{span:ct,label:`手续费(元,自动)`,field:`credit_card_fee`,value:n.card.amountText,readOnly:!0}),(0,L.jsx)(K,{span:ct,label:`手续费付款人`,field:`credit_card_fee_payer`,value:e.credit_card_fee_payer,options:H.memberOptions(t),onChange:e=>r(t=>({...t,credit_card_fee_payer:e}))})]}),(0,L.jsx)(`p`,{className:`small muted`,"aria-live":`polite`,children:n.card.formula})]}),(0,L.jsx)(`div`,{className:`fees-total num`,"data-testid":`fees-total`,children:n.feesText})]})}function vt({form:e,tags:t,tagsStatus:n,busy:r,update:i,onError:a}){let o=H.filterNoteTags(t,e.internal_note),s=/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u.test(e.internal_note);return(0,L.jsxs)(lt,{step:`04`,title:`优惠与备注`,children:[(0,L.jsxs)(k,{gutter:[16,14],children:[(0,L.jsx)(G,{span:{xs:24,md:8},label:`整单优惠/抹零(元)`,field:`discount`,numeric:!0,value:e.discount,onChange:e=>i(t=>({...t,discount:e}))}),(0,L.jsx)(W,{span:{xs:24,md:16},label:`客户单备注`,field:`note`,id:`order-note`,children:(0,L.jsx)(P.TextArea,{id:`order-note`,name:`note`,"aria-label":`客户单备注`,maxLength:240,autoSize:{minRows:1,maxRows:4},placeholder:`只写可让客户看到的内容`,value:e.note,onChange:e=>i(t=>({...t,note:e.target.value}))})})]}),(0,L.jsxs)(`div`,{className:`internal internal-note`,children:[(0,L.jsx)(W,{label:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(j,{"aria-hidden":`true`}),` 内部备注 `,(0,L.jsx)(`span`,{className:`small muted`,children:`必填,至少3个字符(含#号),最多500字`})]}),help:`输入 #词语 添加标签,例如 #补货、#客户自提。保存订单后可复用,点击下方标签即可填入。内部备注不会出现在客户销售单或打印件中。`,field:`internal_note`,id:`order-internal-note`,children:(0,L.jsx)(P.TextArea,{id:`order-internal-note`,name:`internal_note`,"aria-label":`内部备注`,maxLength:500,autoSize:{minRows:2,maxRows:6},placeholder:`仅供内部跟进,不会出现在客户销售单或打印件中`,value:e.internal_note,onChange:e=>i(t=>({...t,internal_note:e.target.value}))})}),(0,L.jsx)(`div`,{className:`order-note-tag-options`,"aria-label":`内部备注快捷标签`,"data-testid":`note-tags`,children:n?(0,L.jsx)(`span`,{className:`small muted`,children:n}):o.length?o.map(t=>(0,L.jsx)(p,{size:`small`,className:`note-tag`,"data-note-tag":t,disabled:r,onClick:()=>{try{let n=H.insertNoteTag(e.internal_note,t);i(e=>({...e,internal_note:n}))}catch(e){a(e.message)}},children:t},t)):(0,L.jsx)(`span`,{className:`small muted`,children:s?`没有匹配标签,可继续输入新标签。`:`暂无已保存标签,填写 #词语 并保存订单后即可复用。`})})]})]})}function yt({form:e,summary:t,busy:n,error:r}){let i=String(e.discount).trim(),a=/^\d+(?:\.\d{1,2})?$/.test(i)?Math.round(Number(i)*100):0;return(0,L.jsxs)(`div`,{className:`submit-bar`,role:`region`,"aria-label":`成交合计与提交`,children:[r&&(0,L.jsx)(c,{type:`error`,showIcon:!0,message:r,className:`order-error`,role:`alert`,"data-testid":`order-error`}),(0,L.jsxs)(`div`,{className:`submit-bar-row`,children:[(0,L.jsxs)(`div`,{className:`submit-total`,children:[(0,L.jsx)(`span`,{className:`submit-label`,children:`成交合计`}),(0,L.jsx)(`div`,{className:`summary-amount num`+(t.total==null?` pending`:``),"data-testid":`create-total`,children:t.totalText})]}),(0,L.jsxs)(`div`,{className:`submit-facts`,children:[(0,L.jsxs)(`span`,{className:`fact`,children:[e.lines.length,` 件商品`,a>0?(0,L.jsxs)(L.Fragment,{children:[` · 整单优惠 −¥`,H.yuan(a)]}):null]}),(0,L.jsx)(`span`,{className:`fact muted`,"aria-live":`polite`,"data-testid":`rounding-note`,children:t.roundingHint})]}),(0,L.jsx)(p,{type:`primary`,htmlType:`submit`,size:`large`,icon:(0,L.jsx)(u,{}),loading:n,"data-action":`issue`,className:`issue-button`,children:`生成销售单据`})]})]})}var Z=(e,...t)=>{for(let n of t){let t=e?.querySelector(`[data-field="${n}"]`);if(t&&!t.querySelector(`input[readonly]`))return t}return null},Q=(e,t)=>e.querySelector(`[data-line="${Number(t[1])-1}"]`),bt=(e,t,n)=>{for(let r of e?.querySelectorAll(t)||[]){let e=r.querySelector(`[data-field="${n}"]`);if(e&&!e.querySelector(`input`)?.value)return e}return null},xt=[[/客户称呼/,e=>Z(e,`customer`)],[/客户类型/,e=>Z(e,`customer_type`)],[/开单人/,e=>Z(e,`salesperson`)],[/内部备注/,e=>Z(e,`internal_note`)],[/费用实际支付日期/,e=>Z(e,`fees_date`)],[/业务日期/,e=>Z(e,`date`)],[/整单优惠/,e=>Z(e,`discount`)],[/盒子数量|数量请填写正整数/,e=>e.querySelector(`[data-field^="cost_"][data-field$="_quantity"]`)],[/商品 (\d+)的名称/,(e,t)=>Z(Q(e,t),`customName`,`nameType`)],[/商品 (\d+)的克重/,(e,t)=>Z(Q(e,t),`quantity`)],[/商品 (\d+)的计工费件数/,(e,t)=>Z(Q(e,t),`pieces`)],[/商品 (\d+)的金价/,(e,t)=>Z(Q(e,t),`goldPrice`)],[/商品 (\d+)的销售工费/,(e,t)=>Z(Q(e,t),`laborRate`)],[/商品 (\d+)的基础金额/,(e,t)=>Z(Q(e,t),`baseSale`)],[/商品 (\d+)出库数量/,(e,t)=>Z(Q(e,t),`stockCount`)],[/商品 (\d+)(?:附加项目|的.+收费)/,(e,t)=>bt(Q(e,t),`[data-charge]`,`chargeAmount`)],[/商品 (\d+)请选择料费付款人|商品 (\d+)请选择料费和/,(e,t)=>Z(Q(e,t),`cost-materialPayer`)],[/商品 (\d+)请选择进货工费付款人/,(e,t)=>Z(Q(e,t),`cost-laborPayer`)],[/商品 (\d+)请选择不晚于/,(e,t)=>Z(Q(e,t),`materialPoolId`)],[/商品 (\d+)的料费成本/,(e,t)=>Z(Q(e,t),`cost-materialRate`,`cost-material`)],[/商品 (\d+)的进货工费/,(e,t)=>Z(Q(e,t),`cost-laborRate`,`cost-labor`)],[/商品 (\d+)的(?:配件成本)/,(e,t)=>Z(Q(e,t),`cost-accessories`)],[/商品 (\d+)的(?:其他货品成本)/,(e,t)=>Z(Q(e,t),`cost-other`)],[/商品 (\d+)的货品成本/,(e,t)=>Z(Q(e,t),`cost`)],[/商品 (\d+):/,(e,t)=>Q(e,t)],[/的实际成本|实际成本/,e=>bt(e,`.fee-row`,`feeAmount`)||Z(e.querySelector(`.fee-row`),`feeAmount`)]];function St(e,t){let n=null;for(let[r,i]of xt){let a=r.exec(t);if(!a||n&&a.index>=n.index)continue;a[1]===void 0&&a[2]!==void 0&&(a[1]=a[2]);let o=i(e,a);o&&(n={index:a.index,el:o})}return n?.el||null}function Ct(e,t){if(!e||!t)return;let n=St(e,t);if(!n)return;e.querySelectorAll(`.field-invalid`).forEach(e=>e.classList.remove(`field-invalid`)),n.classList.add(`field-invalid`),n.scrollIntoView?.({block:`center`,behavior:`smooth`});let r=n.querySelector(`input:not([type=hidden]):not([readonly]), textarea`);window.setTimeout(()=>r?.focus({preventScroll:!0}),350);let i=()=>{n.classList.remove(`field-invalid`),n.removeEventListener(`input`,i),n.removeEventListener(`click`,i)};n.addEventListener(`input`,i),n.addEventListener(`click`,i)}function wt({client:e,state:t,session:n,form:r,ctx:i,update:a,reset:o}){return(0,L.jsx)(s,{className:`entry-tools`,items:[{key:`templates`,label:(0,L.jsxs)(`span`,{children:[`开单模板 `,(0,L.jsx)(`span`,{className:`small muted`,children:`选择或保存常用模板`})]}),children:(0,L.jsx)(Tt,{client:e,state:t,session:n,form:r,reset:o})},...r.id?[]:[{key:`formula`,label:(0,L.jsxs)(`span`,{children:[`公式快速开单 `,(0,L.jsx)(`span`,{className:`small muted`,children:`粘贴公式,自动填入商品`})]}),children:(0,L.jsx)(Et,{form:r,ctx:i,update:a})}]]})}function Tt({client:e,state:t,session:n,form:r,reset:a}){let{message:o,modal:s}=d.useApp(),[l,u]=(0,I.useState)(null),[f,m]=(0,I.useState)(``),[h,g]=(0,I.useState)({text:``}),[v,y]=(0,I.useState)(null),b=r.member||H.currentMember(t),x=H.teamMode(t),S=(0,I.useCallback)(async()=>{try{let n=x&&t.user.role===`owner`?`?`+new URLSearchParams({member:b}):``,r=await e.api(`/api/order-templates`+n);if(!Array.isArray(r.rows))throw Error(`模板列表未完整返回,请重试。`);return u(r.rows),m(e=>r.rows.some(t=>t.id===e)?e:``),!0}catch(e){return g({text:`模板尚未读到:`+e.message,error:!0}),!1}},[e,b,x,t.user.role]);(0,I.useEffect)(()=>{S()},[S]);let C=H.defaultSalesperson(t,n);async function w(n){if(e.busy)throw Error(`正在处理订单,请稍候再套用模板。`);if(e.pending())throw Error(`请先恢复上次未确认的操作,再套用模板。`);let i=t.user.id,[c,l]=await Promise.all([e.api(`/api/order-templates/`+encodeURIComponent(n)),e.api(`/api/session`)]);if(l.user?.id!==i)throw Error(`登录账号已变化,请刷新后再套用模板。`);let u=Ke.apply(c.preset,{today:l.today,salesperson:C,pocketKeys:[...new Set([...H.activePocketKeys(t),...(c.preset.lines||[]).map(e=>e.pocket||``).filter(Boolean)])]});u.salesperson=C,x&&(u.member=c.member||b);let d=H.collectDraft(r,t);(!qe.hasDraftContent(d,{today:l.today,salesperson:C})&&!f&&!d.lines.some(e=>e.pricingMode===`manual`||e.laborMode&&e.laborMode!==`gram`||e.pieces!=null&&String(e.pieces)!==`1`||e.costLabor?.mode===`gram`||e.costMaterial?.mode===`total`)||await s.confirm({title:`套用模板`,content:`当前还有未保存的开单内容。套用模板会替换这份草稿,客户称呼将留空、日期改为今天,是否继续?`,okText:`继续`,cancelText:`取消`}))&&(a(u),m(n),g({text:`已套用「`+c.name+`」,请核对本次克重、报价和费用后生成单据。`}),o.success(`模板已填入,生成销售单据后才记账`))}async function T(){if(!v)return;let n=v.name.trim();try{if(!n||n.length>60)throw Error(`模板名称请填写1~60字。`);let i=v.kind===`update`?l?.find(e=>e.id===f):null,a={...x?{member:b}:{},name:n,preset:Ke.fromDraft(H.collectDraft(r,t),{pocketKeys:H.activePocketKeys(t),newId:U}),...i?{revision:i.revision}:{}},s=`/api/order-templates`+(i?`/`+encodeURIComponent(i.id)+`/update`:``),c=await e.mutate(s,a);y(null),m(c.id);let u=await S();g({text:`已保存模板「`+(c.name||n)+`」`+(u?`。`:`;列表暂未读到,可重新读取,当前表单已保留。`)}),o.success(`模板已保存,当前开单内容保留`)}catch(e){y(t=>t&&{...t,error:e.message.replace(`不要重新开单`,`不要重复保存模板`)})}}async function D(){let t=l?.find(e=>e.id===f);if(t&&await s.confirm({title:`删除模板`,content:`删除模板「`+t.name+`」?当前开单内容和已保存订单会保留。`,okText:`删除`,cancelText:`取消`}))try{await e.mutate(`/api/order-templates/`+encodeURIComponent(t.id)+`/delete`,{revision:t.revision}),m(``),await S(),g({text:`模板已删除。`})}catch(e){g({text:e.message,error:!0})}}return(0,L.jsxs)(`div`,{className:`template-panel`,children:[(0,L.jsxs)(i,{wrap:!0,children:[(0,L.jsx)(E,{"aria-label":`选择模板`,"data-testid":`template-select`,style:{minWidth:220},value:f||void 0,placeholder:l?`选择后自动填入预设`:`正在读取模板…`,disabled:!l,options:(l||[]).map(e=>({value:e.id,label:e.name})),onChange:e=>w(e).catch(e=>g({text:e.message,error:!0}))}),(0,L.jsx)(p,{onClick:()=>y({kind:`new`,name:``,error:``}),children:`保存为新模板`}),(0,L.jsx)(p,{disabled:!f,onClick:()=>y({kind:`update`,name:l?.find(e=>e.id===f)?.name||``,error:``}),children:`更新所选模板`}),(0,L.jsx)(p,{disabled:!f,onClick:()=>void D(),children:`删除模板`})]}),(0,L.jsx)(`p`,{className:`small muted`,children:`用于普通开单,可以保存未填完的表单。客户称呼和内部备注不存入模板,套用时留空;业务日期和费用日期用今天;每日料价随本次订单日期读取。`}),h.text&&(0,L.jsx)(`p`,{className:`small `+(h.error?`danger-text`:`muted`),children:h.text}),(0,L.jsxs)(_,{open:!!v,title:v?.kind===`update`?`更新模板`:`保存为新模板`,okText:v?.kind===`update`?`保存更新`:`保存模板`,cancelText:`取消`,onOk:()=>void T(),onCancel:()=>y(null),confirmLoading:e.busy,children:[(0,L.jsx)(`p`,{className:`small muted`,children:`将当前普通开单表单保存为预设,允许金额和克重留空。客户、内部备注、日期及订单编号不存入模板;本次正在填写的内容会保留。`}),(0,L.jsx)(P,{"aria-label":`模板名称`,maxLength:60,placeholder:`例如:足金手链常用报价`,value:v?.name||``,onChange:e=>y(t=>t&&{...t,name:e.target.value})}),v?.error&&(0,L.jsx)(c,{type:`error`,showIcon:!0,message:v.error,style:{marginTop:12}})]})]})}function Et({form:e,ctx:t,update:n}){let[r,a]=(0,I.useState)(``),[o,s]=(0,I.useState)(null);function l(i){try{let c=Ge.parseBatch(r,{roundingMode:e.rounding_mode}),l=c.items.map((e,t)=>{let n=e.line,r=n.laborMode===`gram`?`${n.quantity}克 ×(金价 ${n.goldPrice} + 克工费 ${n.laborRate})`:`${n.quantity}克 × 金价 ${n.goldPrice} + 1件 × 件工费 ${n.laborRate}`;return`本次第 ${t+1} 件:${r}${n.charges.map(e=>` + 附加费 `+e.amount).join(``)} = ${H.yuan(e.subtotal)}元`});if(l.push(`本次商品合计 ${H.yuan(c.subtotal)}元${c.roundingMode===`yuan`?`,整单取整为 `+H.yuan(c.total)+`元`:``}。`),c.mismatch&&!i){s({kind:`warning`,title:`公式金额与计算结果不一致`,lines:[...l,...c.warnings,`请修改公式,或按计算结果预填。`],pending:r});return}if(i&&o?.pending!==r)throw Error(`公式已改变,请重新点击“识别并预填”核对`);let u=H.applyFormulaLines(e,c.lines,t),d=u.filled;n(()=>u.form),s({kind:`note`,title:`已预填商品 ${d.join(`、`)},共 ${d.length} 件`,lines:[...l,...c.mismatch?[`已采用左侧公式计算金额,未采用不一致的手写金额。`]:[],(c.lines.some(e=>e.charges.length)?`附加费已填金额,未判断编绳、烤漆等类目,可自行改名;内部成本请另行核对。`:``)+`已有商品、优惠和客户资料保留,尚未生成订单。`]}),a(``)}catch(e){s({kind:`error`,lines:[e.message]})}}return(0,L.jsxs)(`div`,{className:`formula-panel`,children:[(0,L.jsx)(P.TextArea,{"aria-label":`粘贴销售公式`,rows:4,maxLength:18e3,autoComplete:`off`,placeholder:`0.79×822+120=769 +0.58×(822+45)+55=558 +769+558=1327`,value:r,onChange:e=>a(e.target.value)}),(0,L.jsxs)(i,{style:{marginTop:8},children:[(0,L.jsx)(p,{type:`primary`,onClick:()=>l(!1),children:`识别并预填`}),o?.kind===`warning`&&(0,L.jsx)(p,{onClick:()=>l(!0),children:`按计算金额预填`})]}),(0,L.jsx)(`p`,{className:`small muted`,children:`括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。`}),o&&(0,L.jsx)(c,{role:`status`,type:o.kind===`note`?`success`:o.kind,message:o.title||(o.kind===`error`?o.lines[0]:``),description:o.kind===`error`?void 0:(0,L.jsx)(`div`,{children:o.lines.filter(Boolean).map((e,t)=>(0,L.jsx)(`p`,{children:e},t))})})]})}function Dt({order:e,error:t,onRetry:n,onNew:r}){let o=e.total!==void 0;return(0,L.jsx)(`div`,{className:`issued-page`,children:(0,L.jsx)(a,{className:`issued-card`,children:(0,L.jsx)(w,{status:`success`,title:`销售单据已生成`,subTitle:o?e.materialCostPending?`收款、费用和出库已记账;料费待补,补足购料后自动核算利润。`:`收款、费用、出库和利润已记账。`:t||`正在读取已生成的销售单…`,extra:(0,L.jsxs)(i,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[o&&(0,L.jsxs)(`dl`,{className:`issued-summary`,"data-testid":`issued-summary`,children:[(0,L.jsxs)(`div`,{className:`issued-item`,children:[(0,L.jsx)(`dt`,{children:(0,L.jsx)(x.Text,{type:`secondary`,children:`纸单号`})}),(0,L.jsx)(`dd`,{className:`issued-value num`,"data-testid":`issued-paper-number`,children:e.paper_number||`未分配`})]}),(0,L.jsxs)(`div`,{className:`issued-item`,children:[(0,L.jsx)(`dt`,{children:(0,L.jsx)(x.Text,{type:`secondary`,children:`成交合计`})}),(0,L.jsx)(`dd`,{className:`issued-value issued-total num`,"data-testid":`issued-total`,children:Je(e.total??null,e.rounding_mode||`cent`)})]}),e.customer&&(0,L.jsxs)(`div`,{className:`issued-item`,children:[(0,L.jsx)(`dt`,{children:(0,L.jsx)(x.Text,{type:`secondary`,children:`客户`})}),(0,L.jsx)(`dd`,{className:`issued-value small`,children:e.customer})]})]}),(0,L.jsxs)(`div`,{className:`issued-actions`,children:[(0,L.jsx)(p,{type:`primary`,size:`large`,icon:(0,L.jsx)(ee,{}),href:`/print/`+encodeURIComponent(e.id),target:`_blank`,rel:`noopener`,"data-action":`print-preview`,children:`打开打印预览`}),(0,L.jsx)(p,{size:`large`,icon:(0,L.jsx)(f,{}),onClick:r,"data-action":`new-order`,children:`开始新的一单`}),!o&&(0,L.jsx)(p,{size:`large`,onClick:n,children:`重新读取订单`})]}),(0,L.jsx)(p,{href:`/`,type:`link`,icon:(0,L.jsx)(h,{}),children:`到旧版界面查看订单`})]})})})})}function Ot(e){let{client:t,state:n}=e,r=Ce(`draft`),[i,a]=(0,I.useState)(r?null:{draft:et(window.localStorage,n.user.id),note:``});return(0,I.useEffect)(()=>{if(!r)return;let e=!0;return(async()=>{try{if(n.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let i=await t.api(`/api/orders/`+encodeURIComponent(r));if(i.status!==`draft`)throw Error(`这张订单不是未开单的旧草稿,请在旧版界面查看。`);e&&a({draft:H.draftInputs(i),note:`正在继续填写旧草稿,生成销售单据后完成记账。`})}catch(t){e&&a({draft:et(window.localStorage,n.user.id),note:`旧草稿未能打开:`+t.message})}})(),()=>{e=!1}},[t,r,n.user.id,n.user.role]),i?(0,L.jsx)(kt,{...e,initialDraft:i.draft,initialNote:i.note}):(0,L.jsx)(`div`,{className:`page-loading`,children:(0,L.jsx)(N,{tip:`正在读取旧草稿…`,children:(0,L.jsx)(`div`,{style:{height:60}})})})}function kt({client:e,state:t,session:n,refreshState:r,onAccountChanged:i,initialDraft:a,initialNote:o}){let{message:s}=d.useApp();rt(e);let{store:l,update:u,reset:f,ctx:m,poolError:h,loadPools:g}=it({client:e,state:t,session:n,initialDraft:a}),{form:_,summary:v}=l,[y,S]=(0,I.useState)(``),[C,w]=(0,I.useState)(!1),[T,E]=(0,I.useState)(null),[D,O]=(0,I.useState)([]),[k,A]=(0,I.useState)(`正在读取快捷标签…`),j=e.busy,M=e.pending(),ee=(0,I.useRef)(null),[te,ne]=(0,I.useState)(null),re=(0,I.useMemo)(()=>{if(_.paper_number){let e=_.paper_date&&_.paper_number.match(/^\d{8}-?(\d+)$/);return e?_.date.replaceAll(`-`,``)+e[1]:_.paper_number}return te?.date===_.date?te.number+`(预计)`:`保存时分配`},[_.paper_number,_.paper_date,_.date,te]);(0,I.useEffect)(()=>{if(_.paper_number)return;let t=!0,n=_.date;return e.api(`/api/paper-number?date=`+encodeURIComponent(n)).then(e=>t&&ne({date:n,number:e.number})).catch(()=>{}),()=>{t=!1}},[e,_.date,_.paper_number]),(0,I.useEffect)(()=>{let t=!0;return e.api(`/api/order-note-tags`).then(e=>{t&&(O(Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):[]),A(``))}).catch(()=>t&&A(`快捷标签暂未读取成功,可直接填写备注。`)),()=>{t=!1}},[e]);let N=(0,I.useCallback)(e=>{let t=e;t.code===`ACCOUNT_CHANGED`&&w(!0),S(t.message),s.error(t.message),Ct(ee.current,t.message)},[s]),ie=(0,I.useCallback)(async(n,i)=>{nt(window.localStorage,t.user.id),E({order:{id:i.id},error:``});try{let t=await e.api(`/api/orders/`+encodeURIComponent(i.id));E({order:{...t,id:i.id},error:``}),s.success(t.materialCostPending?`销售单据已生成;料费待补,补足购料后自动核算利润`:`销售单据已生成,收款、费用、出库和利润已记账`),r().catch(()=>{})}catch{E({order:{id:i.id,customer:n.customer},error:`销售单据已经生成,最新订单暂未读到。请重新读取或查看已生成销售单;不要重复开单。`})}},[e,s,r,t.user.id]);async function ae(){S(``);try{H.validateFormFields(_,t);let n=H.validateIssueDraft(H.collectDraft(_,t),t);if(n.id&&t.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let r=await e.mutate(`/api/orders/issue`,n);await ie(n,r)}catch(e){N(e)}}async function P(t){S(``);try{let n=await e.retryPending();if(!n)return;if(t.url===`/api/orders/issue`&&n.result.id)return await ie(t.data,n.result);s.success(`原操作已确认,不会重复记账`)}catch(e){N(e)}}function oe(){nt(window.localStorage,t.user.id),window.location.search&&window.history.replaceState(null,``,window.location.pathname),E(null),S(``),f(null)}return T?(0,L.jsx)(Dt,{order:T.order,error:T.error,onRetry:()=>void ie({customer:T.order.customer},{id:T.order.id}),onNew:oe}):(0,L.jsxs)(`div`,{className:`create-page`,children:[(0,L.jsxs)(`div`,{className:`page-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`eyebrow`,children:`New Order · 新版界面`}),(0,L.jsx)(x.Title,{level:1,children:`开一张新单`}),(0,L.jsx)(x.Paragraph,{type:`secondary`,children:`开单即交付,一次记录全额收款、实际费用、出库和利润。`})]}),(0,L.jsx)(p,{icon:(0,L.jsx)(b,{}),"data-action":`clear-draft`,disabled:j,onClick:oe,children:`清空表单`})]}),M&&(0,L.jsx)(c,{className:`pending`,type:`warning`,showIcon:!0,"data-testid":`pending`,message:`上次提交结果尚未确认,请先恢复原操作。重试会使用同一个操作号。`,action:(0,L.jsx)(p,{danger:!0,size:`small`,disabled:j,"data-action":`retry`,onClick:()=>void P(M),children:`恢复原操作`})}),C&&(0,L.jsx)(c,{type:`error`,showIcon:!0,message:`登录账号已在其他页面切换,原操作已暂停。`,action:(0,L.jsx)(p,{size:`small`,onClick:i,children:`重新读取登录状态`})}),o&&(0,L.jsx)(c,{type:`info`,showIcon:!0,message:o}),_.copy_kind&&(0,L.jsx)(c,{type:`info`,showIcon:!0,message:`已复制为未保存的新订单,客户称呼已留空。`}),h&&(0,L.jsx)(c,{type:`warning`,showIcon:!0,message:h}),(0,L.jsx)(wt,{client:e,state:t,session:n,form:_,ctx:m,update:u,reset:e=>f(e)}),(0,L.jsx)(`form`,{id:`order-form`,ref:ee,className:`order-form`,noValidate:!0,onSubmit:e=>{e.preventDefault(),j||ae()},children:(0,L.jsxs)(`fieldset`,{disabled:j,className:`form-fieldset`,children:[(0,L.jsx)(ut,{form:_,state:t,paperNumber:re,update:u}),(0,L.jsx)(ht,{form:_,state:t,update:u,onError:e=>s.error(e),onReloadPools:()=>void g()}),(0,L.jsx)(_t,{form:_,state:t,summary:v,update:u}),(0,L.jsx)(vt,{form:_,tags:D,tagsStatus:k,busy:j,update:u,onError:e=>s.error(e)}),(0,L.jsx)(yt,{form:_,summary:v,busy:j,error:y})]})})]})}function At(e){let t=e===`owner`;return[{key:`create`,no:`01`,label:`开单`},{key:`price-locks`,no:`02`,label:`待交付`},{key:`material-pools`,no:`03`,label:`每日购料`},{key:`recoveries`,no:`04`,label:`回收/置换`},{key:`orders`,no:`05`,label:`订单`},{key:`stock`,no:`06`,label:`库存`},{key:`report`,no:`07`,label:`每日对账`},...t?[{key:`team-funds`,no:`08`,label:`团队账目`},{key:`private-operations`,no:`09`,label:`私域运营概况`}]:[{key:`people-entry`,label:`登记人数`}],{key:`settings`,no:`10`,label:t?`店铺与打印设置`:`修改密码`}]}function jt({role:e,onNavigate:t}){return(0,L.jsxs)(`nav`,{className:`side-nav`,"aria-label":`主要功能`,children:[(0,L.jsx)(`ul`,{children:At(e).map(e=>e.key===`create`?(0,L.jsx)(`li`,{children:(0,L.jsxs)(`a`,{className:`nav-link active`,href:`/next/`,"aria-current":`page`,onClick:t,children:[(0,L.jsx)(`span`,{className:`nav-no`,children:e.no}),(0,L.jsx)(`span`,{className:`nav-label`,children:e.label})]})},e.key):(0,L.jsx)(`li`,{children:(0,L.jsxs)(`a`,{className:`nav-link`,href:`/`,title:`在旧版界面打开「`+e.label+`」`,children:[(0,L.jsx)(`span`,{className:`nav-no`,children:e.no||`··`}),(0,L.jsx)(`span`,{className:`nav-label`,children:e.label}),(0,L.jsx)(`span`,{className:`nav-old`,children:`旧版`})]})},e.key))}),(0,L.jsxs)(`p`,{className:`nav-foot`,children:[`新版界面目前只有开单;`,(0,L.jsx)(`br`,{}),`其他分区在旧版界面中打开。`]})]})}function Mt({client:e,state:t,session:n,onLoggedOut:r,children:i}){let{message:a}=d.useApp(),[o,s]=(0,I.useState)(!1),[c,l]=(0,I.useState)(!1);rt(e);let u=ye(t,n),f=t.user.label||t.user.name;async function m(){s(!0);try{await ve(e),r()}catch(e){a.error(e.message)}finally{s(!1)}}return(0,L.jsxs)(`div`,{className:`shell`,children:[(0,L.jsxs)(`header`,{className:`app-header`,children:[(0,L.jsxs)(`div`,{className:`app-header-brand`,children:[(0,L.jsx)(p,{className:`menu-button`,type:`text`,icon:(0,L.jsx)(T,{}),"aria-label":`打开导航`,"aria-expanded":c,onClick:()=>l(!0)}),(0,L.jsx)(we,{name:u}),(0,L.jsxs)(`div`,{className:`brand-text`,children:[(0,L.jsx)(`strong`,{"data-testid":`store-name`,children:u}),(0,L.jsx)(`small`,{children:`开单 · 库存 · 订单利润`})]})]}),(0,L.jsxs)(`div`,{className:`app-header-right`,children:[(0,L.jsx)(M,{className:`mode-tag`,bordered:!1,children:Ye(t.mode)}),(0,L.jsxs)(`a`,{className:`old-ui-link`,href:`/`,children:[(0,L.jsx)(A,{"aria-hidden":`true`}),` 返回旧版界面`]}),(0,L.jsxs)(`span`,{className:`identity`,"data-testid":`identity`,title:`当前账号:`+f,children:[(0,L.jsx)(`span`,{className:`identity-avatar`,"aria-hidden":`true`,children:Array.from(f)[0]}),(0,L.jsx)(`span`,{className:`identity-name`,children:f})]}),(0,L.jsx)(p,{className:`logout-button`,icon:(0,L.jsx)(v,{}),loading:o,disabled:e.busy,onClick:()=>void m(),children:`退出`})]})]}),(0,L.jsxs)(`div`,{className:`app-body`,children:[(0,L.jsx)(`aside`,{className:`app-sider`,children:(0,L.jsx)(jt,{role:t.user.role})}),(0,L.jsxs)(ie,{className:`nav-drawer`,placement:`left`,width:272,open:c,onClose:()=>l(!1),title:(0,L.jsxs)(`span`,{className:`drawer-title`,children:[(0,L.jsx)(we,{name:u}),u]}),children:[(0,L.jsx)(jt,{role:t.user.role,onNavigate:()=>l(!1)}),(0,L.jsxs)(`div`,{className:`drawer-meta`,children:[(0,L.jsx)(M,{bordered:!1,children:Ye(t.mode)}),(0,L.jsx)(`a`,{href:`/`,children:`返回旧版界面`})]})]}),(0,L.jsx)(`main`,{className:`main`,children:i})]})]})}function Nt({client:e}){return rt(e),e.progressText?(0,L.jsx)(c,{className:`request-status`,type:`info`,showIcon:!0,role:`status`,message:e.progressText}):null}function Pt({client:e}){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(``),s=Se(),[c,l]=(0,I.useState)(0),u=(0,I.useCallback)(()=>l(e=>e+1),[]);(0,I.useEffect)(()=>{let t=!0;return fe(e).then(async r=>{if(!t)return;if(o(``),n(r),!r.user){i(null),xe(`login`,{keepSearch:!0});return}let a=await pe(e);t&&(i(a),xe(`create`,{keepSearch:!0}))}).catch(e=>t&&o(e.message)),()=>{t=!1}},[e,c]);let d=(0,I.useCallback)(async()=>{let t=await pe(e);return i(t),t},[e]);return a?(0,L.jsx)(`div`,{className:`page-center`,children:(0,L.jsx)(w,{status:`warning`,title:`系统暂时没有连接上`,subTitle:a+` 请保持启动窗口打开,再刷新页面。`,extra:(0,L.jsx)(p,{type:`primary`,onClick:u,children:`重新连接`})})}):t?!t.user||s===`login`&&!r?(0,L.jsx)(Xe,{client:e,session:t,onLoggedIn:u}):r?(0,L.jsxs)(Mt,{client:e,state:r,session:t,onLoggedOut:u,children:[(0,L.jsx)(Nt,{client:e}),(0,L.jsx)(Ot,{client:e,state:r,session:t,refreshState:d,onAccountChanged:u},r.user.id)]}):(0,L.jsx)(`div`,{className:`page-loading`,children:(0,L.jsx)(N,{tip:`正在读取店铺资料…`,size:`large`,children:(0,L.jsx)(`div`,{style:{height:80}})})}):(0,L.jsx)(`div`,{className:`page-loading`,children:(0,L.jsx)(N,{tip:`正在读取登录状态…`,size:`large`,children:(0,L.jsx)(`div`,{style:{height:80}})})})}var Ft=Symbol(`mutationRetry`),It=[400,1200],Lt=25e3,Rt=[`/api/session`,`/api/login`,`/api/setup`,`/api/demo-login`];function zt(e){return/^\/api\/print-status\/(order|recovery)\/[a-f0-9-]{36}$/.test(e)||[`/api/orders`,`/api/orders/issue`,`/api/people-count`,`/api/after-sales`,`/api/recoveries`,`/api/customer-materials`,`/api/material-purchases`,`/api/material-pools/rolling-enable`,`/api/price-locks`,`/api/order-templates`,`/api/reimbursements`,`/api/daily-funds/confirm`,`/api/team-funds/transfers`,`/api/team-funds/transfer`,`/api/stock`,`/api/inventory/review`,`/api/pockets`,`/api/close`,`/api/printing`,`/api/shop-settings`,`/api/employees`].includes(e)||[/^\/api\/pockets\/[^/]+\/update$/,/^\/api\/employees\/[^/]+\/(?:update|deactivate|reactivate|delete)$/,/^\/api\/orders\/[^/]+\/(?:edit|ownership|change|cancellation|canceltoday|confirm|receipt|refund|expense|fees|cost|deliver|complete|cancel|return|settlement|review|correct|print)$/,/^\/api\/(?:order-templates\/[^/]+\/(?:update|delete)|reimbursements\/[^/]+\/(?:update|approve|reject)|price-locks\/[^/]+\/(?:deliver|edit|cancel|change-requests)|price-lock-changes\/[^/]+\/(?:approve|reject)|material-purchases\/[^/]+\/(?:edit|delete|change)|material-pools\/\d{4}-\d{2}-\d{2}\/settlement|after-sales\/[^/]+\/update|after-sales\/changes\/[^/]+\/(?:approve|reject)|(?:order-changes|order-ownership-changes|order-cancellations|material-purchase-changes)\/[^/]+\/(?:approve|reject)|inventory\/movements\/[^/]+\/(?:update|delete)|inventory\/changes\/[^/]+\/(?:approve|reject))$/].some(t=>t.test(e))}function Bt(){return Object.assign(Error(`登录账号已切换,请刷新后继续;原操作已暂停。`),{status:409,code:`ACCOUNT_CHANGED`})}var Vt=class{env;currentUser=``;progress=new Map;listeners=new Set;busy=!1;progressText=``;constructor(e){this.env=e}get user(){return this.currentUser}setUser(e){this.currentUser=e||``,this.emit()}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}emit(){for(let e of this.listeners)e()}showProgress(e,t=``){t?this.progress.set(e,t):this.progress.delete(e),this.progressText=[...this.progress].filter(([e])=>e.user===this.currentUser).sort(([e],[t])=>Number(e.write)-Number(t.write)).at(-1)?.[1]||``,this.emit()}async api(e,t,n,r){let i=!!t,a=i?JSON.stringify(t):void 0,o=e.startsWith(`/api/`)&&!Rt.includes(e)?r?.user||this.currentUser:``,s=!i||r?.permission===Ft&&zt(e)&&/^[a-zA-Z0-9_-]{16,100}$/.test(n||``),c={user:o||this.currentUser,write:i},l=()=>!o||this.currentUser===o;i&&r&&this.showProgress(c,`正在保存,请稍候…`);try{for(let t=0;;t++){if(!l())throw Bt();let r=new AbortController,u=this.env.setTimeout(()=>r.abort(),Lt);try{let t=await this.env.fetch(e,{method:i?`POST`:`GET`,headers:{...i?{"Content-Type":`application/json`,"X-Requested-With":`maimai-ledger`,...n?{"Idempotency-Key":n}:{}}:{},...o?{"X-Ledger-User":o}:{}},...i?{body:a}:{},signal:r.signal});if([408,502,503,504].includes(t.status))throw Object.assign(Error(`服务器暂时没有响应(`+t.status+`)`),{status:t.status,retryable:!0});let s;try{s=await t.json()}catch(e){if(t.ok)throw e.retryable=!0,e;s=null}if(!t.ok){let e=s,n=!!e&&typeof e.error==`string`;throw Object.assign(Error(n?e.error:`请求被拒绝(`+t.status+`),服务器未返回可确认的业务结果。`),{confirmed:n,status:t.status,...e?.code?{code:e.code}:{}})}if(!l())throw Object.assign(Bt(),{completed:!0});return s}catch(e){let n=e;if(!l()&&n.code!==`ACCOUNT_CHANGED`)throw Bt();let r=n.retryable||!n.status&&[`TypeError`,`AbortError`,`TimeoutError`].includes(n.name);if(!s||!r||t>=It.length)throw n;this.showProgress(c,`连接暂时中断,正在自动`+(i?`确认`:`重连`)+`(`+(t+1)+`/2)…`),await new Promise(e=>this.env.setTimeout(e,It[t]))}finally{this.env.clearTimeout(u)}}}finally{this.showProgress(c)}}pendingKey(e=this.currentUser){return`mm-pending-${e}`}pending(){try{return JSON.parse(this.env.storage.getItem(this.pendingKey())||`null`)}catch{return null}}clearPendingJob(e,t){try{JSON.parse(this.env.storage.getItem(e)||`null`)?.key===t.key&&this.env.storage.removeItem(e)}catch{}}async mutate(e,t,n){if(this.busy)throw Error(`正在保存,请稍候`);if(this.pending()&&!n)throw Error(`请先点击顶部“恢复原操作”,确认上次提交结果`);let r=this.currentUser;if(!r)throw Error(`请先登录后再保存`);let i=JSON.parse(JSON.stringify(n||{url:e,data:t,key:this.env.randomUUID(),userId:r})),a=this.pendingKey();if(n&&(i.userId&&i.userId!==r||JSON.stringify(this.pending())!==JSON.stringify(n)))throw Error(`待恢复操作与当前账号不匹配,请刷新后核对。`);this.busy=!0;try{this.env.storage.setItem(a,JSON.stringify(i)),this.emit();let e=await this.api(i.url,i.data,i.key,{permission:Ft,user:r});return this.clearPendingJob(a,i),e}catch(e){let t=e;throw(t.completed||t.code!==`ACCOUNT_CHANGED`&&t.confirmed&&[400,403,404,409,413].includes(t.status??0))&&this.clearPendingJob(a,i),t.code!==`ACCOUNT_CHANGED`&&(t.status===401?t.message=`登录已过期,请刷新并登录,再恢复原操作。`:!t.confirmed&&(!t.status||t.retryable)?t.message=`连接中断,提交结果待确认。请点“恢复原操作”,不要重新开单。`:t.confirmed||(t.message+=` 提交结果仍待确认,请保留原操作。`)),t}finally{this.busy=!1,this.emit()}}async retryPending(){let e=this.pending();return e?{job:e,result:await this.mutate(e.url,e.data,e)}:null}};function Ht(){return new Vt({fetch:(e,t)=>window.fetch(e,t),storage:window.localStorage,setTimeout:(e,t)=>window.setTimeout(e,t),clearTimeout:e=>window.clearTimeout(e),randomUUID:()=>window.crypto.randomUUID()})}var $={ink:`#233d35`,muted:`#5f6a64`,paper:`#f6f5f0`,border:`#dedfd6`,borderStrong:`#c9cbbf`,gold:`#a97b35`,goldText:`#86601f`,green:`#254e40`,greenHover:`#336553`,white:`#fffefa`,danger:`#a03d31`,soft:`#edf2ec`,internalText:`#6e4b17`,internalTextAlt:`#805617`,internalBg:`#fffaf0`,internalBgAlt:`#faf7ef`,internalBorder:`#d2bf98`,internalBorderAlt:`#d9cbae`},Ut=`-apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif`,Wt={token:{colorPrimary:$.green,colorInfo:$.green,colorSuccess:`#2f6b4f`,colorWarning:$.gold,colorError:$.danger,colorLink:$.green,colorLinkHover:$.greenHover,colorText:$.ink,colorTextHeading:$.ink,colorTextSecondary:$.muted,colorTextDescription:$.muted,colorBorder:$.borderStrong,colorBorderSecondary:$.border,colorBgLayout:$.paper,colorBgContainer:$.white,colorBgElevated:`#ffffff`,colorFillAlter:$.internalBgAlt,colorBgContainerDisabled:`#f1f0ea`,fontFamily:Ut,fontSize:14,borderRadius:8,borderRadiusLG:12,borderRadiusSM:6,controlHeight:38,controlHeightLG:46,controlHeightSM:28,lineWidthFocus:2,controlOutline:`rgba(37, 78, 64, 0.16)`,boxShadowTertiary:`0 1px 2px rgba(35, 61, 53, 0.04), 0 2px 8px rgba(35, 61, 53, 0.04)`},components:{Button:{primaryShadow:`none`,defaultShadow:`none`,fontWeight:500},Card:{headerFontSize:16,headerHeight:56,paddingLG:24},Radio:{buttonSolidCheckedBg:$.green,buttonSolidCheckedHoverBg:$.greenHover,buttonPaddingInline:12},Collapse:{headerBg:$.white,contentBg:$.white},Tag:{defaultBg:$.soft,defaultColor:$.ink},Tooltip:{colorBgSpotlight:$.ink},Result:{titleFontSize:22},Drawer:{colorBgElevated:$.white}}};function Gt(e=document.documentElement){for(let[t,n]of Object.entries($))e.style.setProperty(`--`+t.replace(/[A-Z]/g,e=>`-`+e.toLowerCase()),n);e.style.setProperty(`--font`,Ut)}ue.default.locale(`zh-cn`),Gt();var Kt=Ht();(0,le.createRoot)(document.getElementById(`root`)).render((0,L.jsx)(I.StrictMode,{children:(0,L.jsx)(m,{locale:de.default,theme:Wt,componentSize:`middle`,children:(0,L.jsx)(d,{children:(0,L.jsx)(Pt,{client:Kt})})})})); \ No newline at end of file diff --git a/新账系统/web/dist/assets/index-Ct_xTggL.css b/新账系统/web/dist/assets/index-Ct_xTggL.css deleted file mode 100644 index 537c154..0000000 --- a/新账系统/web/dist/assets/index-Ct_xTggL.css +++ /dev/null @@ -1 +0,0 @@ -:root{--gold:#9a6a2f;--ink:#2b2620;--muted:#7a7064;--paper:#faf7f2;--line:#e8e0d4;--internal:#f4f1fb}*{box-sizing:border-box}html,body{background:var(--paper);color:var(--ink);-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,sans-serif}.small{font-size:13px}.muted{color:var(--muted)}.danger-text{color:#c0392b}.page-loading{justify-content:center;padding:120px 16px;display:flex}.topbar{z-index:10;border-bottom:1px solid var(--line);background:#fff;justify-content:space-between;align-items:center;gap:12px;padding:10px 20px;display:flex;position:sticky;top:0}.topbar-brand{align-items:center;gap:10px;min-width:0;display:flex}.topbar-brand strong{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}.topbar-brand small{color:var(--muted);font-size:12px}.topbar-right{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;display:flex}.brand-mark{background:var(--gold);color:#fff;border-radius:10px;flex:none;justify-content:center;align-items:center;width:36px;height:36px;font-weight:700;display:inline-flex}.brand-mark.large{width:56px;height:56px;margin-bottom:12px;font-size:26px}.identity{font-weight:600}.old-ui-link{white-space:nowrap}.request-status{margin:8px 20px 0}.main{max-width:1180px;margin:0 auto;padding:16px 20px 80px}.page-heading{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.page-heading h2{margin:0 0 4px}.eyebrow{color:var(--gold);letter-spacing:.08em;font-size:12px;font-weight:600}.create-page>.ant-alert,.entry-tools{margin-bottom:12px}.form-fieldset{border:0;min-width:0;margin:0;padding:0}.panel{margin-bottom:14px}.panel.internal,.internal{background:var(--internal)}.panel-title{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.section-note{margin:12px 0 0}.grid{align-items:start;gap:12px 16px;display:grid}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field{flex-direction:column;gap:4px;min-width:0;display:flex}.field-label{color:var(--muted);font-size:13px}.field-hint{color:var(--muted);font-size:12px}.field .ant-radio-group{flex-wrap:wrap;display:flex}.readonly-input{background:#f5f2ec}.line-item{border:1px solid var(--line);background:#fff;border-radius:10px;margin-bottom:14px;padding:14px}.line-top{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.sale-inputs,.sale-result{margin-top:12px}.sale-charges{border:1px dashed var(--line);border-radius:8px;margin-top:12px;padding:10px}.charge-row{border-top:1px solid var(--line);grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:8px 12px;padding:8px 0;display:grid}.calculation{color:var(--gold);margin:26px 0 0}.internal{border-radius:8px;margin-top:14px;padding:12px}.internal-title{margin-bottom:8px;font-weight:600}.material-source,.purchase-cost-grid{margin-top:10px}.purchase-formula,.material-pool-note{margin:6px 0 0}.cost-summary{margin:10px 0 0;font-weight:600}.order-cost-presets{border:1px solid var(--line);background:#fff;border-radius:8px;margin:12px 0;padding:10px 12px}.order-cost-presets legend{padding:0 6px;font-weight:600}.order-cost-options{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;display:grid}.order-cost-option{flex-direction:column;gap:6px;display:flex}.fee-grid{flex-direction:column;gap:10px;margin-top:10px;display:flex}.fee-row{background:#fff;border-radius:8px;grid-template-columns:1.4fr 1fr 1fr auto;align-items:end;gap:8px 12px;padding:10px;display:grid}.fee-title{flex-direction:column;gap:2px;display:flex}.credit-card-preview{background:#fff;border:1px solid #d9c9ef;border-radius:8px;margin-top:12px;padding:10px}.credit-card-heading{flex-wrap:wrap;justify-content:space-between;gap:8px;margin-bottom:8px;display:flex}.fees-total{margin-top:12px;font-weight:600}.order-note-tags{margin-top:8px}.order-note-tag-options{flex-wrap:wrap;gap:6px;display:flex}.create-submit-bar{border-top:1px solid var(--line);justify-content:space-between;align-items:center;gap:16px;margin-top:16px;padding-top:14px;display:flex}.summary-amount{color:var(--gold);font-size:30px;font-weight:700}.order-error{margin-top:12px}.form-actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.issued-summary{flex-wrap:wrap;justify-content:center;gap:32px;display:flex}.issued-value{font-size:26px;font-weight:700}.issued-value.small{font-size:18px}.login-wrap{justify-content:center;padding:48px 16px;display:flex}.login-card{width:100%;max-width:440px}.login-error{margin-bottom:14px}.login-foot{margin-top:22px}@media (width<=900px){.grid.four,.fee-row,.charge-row{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=560px){.main{padding:10px 10px 70px}.topbar{flex-wrap:wrap;padding:8px 10px}.topbar-brand small,.mode-tag{display:none}.grid.four,.grid.three,.grid.two,.fee-row,.charge-row{grid-template-columns:minmax(0,1fr)}.page-heading{flex-direction:column}.calculation{margin-top:0}.line-item{padding:10px}.create-submit-bar{z-index:5;background:#fff;margin:16px -24px -24px;padding:10px 14px;position:sticky;bottom:0;box-shadow:0 -2px 8px #00000014}.summary-amount{font-size:24px}.ant-card .ant-card-body{padding:14px}.ant-card .ant-card-head{padding:0 14px}} diff --git a/新账系统/web/dist/assets/index-DumwbEyo.css b/新账系统/web/dist/assets/index-DumwbEyo.css new file mode 100644 index 0000000..3ab2223 --- /dev/null +++ b/新账系统/web/dist/assets/index-DumwbEyo.css @@ -0,0 +1 @@ +*{box-sizing:border-box}html,body{background:var(--paper);color:var(--ink);font-family:var(--font);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;margin:0}.small{font-size:12.5px}.muted{color:var(--muted)}.danger-text{color:var(--danger)}.num,.num input,input.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}a:focus-visible,.help-icon:focus-visible,.nav-link:focus-visible,.order-cost-option:focus-within{outline:2px solid var(--gold);outline-offset:2px;border-radius:6px}.page-loading,.page-center{justify-content:center;padding:120px 16px;display:flex}.app-header{z-index:30;background:var(--white);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;height:68px;padding:0 28px;display:flex;position:sticky;top:0}.app-header-brand{align-items:center;gap:12px;min-width:0;display:flex}.brand-mark{background:var(--green);color:#e7dcc2;border-radius:11px;flex:none;place-items:center;width:40px;height:40px;font-family:Songti SC,STSong,SimSun,serif;font-size:21px;display:inline-grid;box-shadow:inset 0 0 0 1px #e7dcc22e}.brand-mark-lg{border-radius:16px;width:60px;height:60px;font-size:31px}.brand-text{min-width:0}.brand-text strong{letter-spacing:2px;white-space:nowrap;text-overflow:ellipsis;font-size:17px;display:block;overflow:hidden}.brand-text small{letter-spacing:1px;color:var(--muted);font-size:11px;display:block}.app-header-right{flex:none;align-items:center;gap:14px;display:flex}.mode-tag.ant-tag{margin:0;font-size:12px}.old-ui-link{white-space:nowrap;font-size:13px}.identity{white-space:nowrap;align-items:center;gap:8px;font-weight:600;display:inline-flex}.identity-avatar{background:var(--soft);width:30px;height:30px;color:var(--green);border-radius:50%;place-items:center;font-size:13px;display:inline-grid}.menu-button.ant-btn{display:none}.app-body{grid-template-columns:236px minmax(0,1fr);min-height:calc(100vh - 68px);display:grid}.app-sider{border-right:1px solid var(--border);padding:26px 16px}.app-sider .side-nav{position:sticky;top:94px}.side-nav ul{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.nav-link{color:var(--ink);border-radius:8px;align-items:center;gap:10px;padding:10px 12px;font-weight:500;text-decoration:none;transition:background .15s;display:flex}.nav-link:hover{color:var(--ink);background:#254e400f}.nav-no{color:#7f877f;font-variant-numeric:tabular-nums;width:18px;font-size:11px}.nav-label{flex:1;min-width:0}.nav-old{color:var(--muted);border:1px solid var(--border);border-radius:4px;padding:0 5px;font-size:10.5px;line-height:17px}.nav-link.active{background:var(--green);color:#fff;box-shadow:0 2px 6px #254e4038}.nav-link.active .nav-no{color:#c9d6cd}.nav-foot{color:var(--muted);margin:28px 12px 0;font-size:11.5px;line-height:1.8}.drawer-title{align-items:center;gap:10px;display:flex}.drawer-title .brand-mark{border-radius:9px;width:32px;height:32px;font-size:17px}.nav-drawer .ant-drawer-body{padding:12px}.drawer-meta{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:8px;margin:20px 12px 0;padding-top:16px;display:flex}.request-status{margin-bottom:12px}.main{width:100%;min-width:0;max-width:1180px;padding:28px 32px 0}.page-heading{justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px;display:flex}.page-heading h1.ant-typography{letter-spacing:1px;margin:0 0 4px;font-size:28px}.page-heading .ant-typography-secondary,.page-heading div.ant-typography{margin:0}.eyebrow{letter-spacing:2px;text-transform:uppercase;color:var(--gold-text);margin-bottom:6px;font-size:11px;font-weight:700}.create-page>.ant-alert{margin-bottom:12px}.form-fieldset{border:0;min-width:0;margin:0;padding:0}.entry-tools.ant-collapse{background:0 0;border:0;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;margin-bottom:16px;display:grid}.entry-tools.ant-collapse>.ant-collapse-item{border:1px solid var(--border);background:var(--white);border-radius:12px;overflow:hidden}.entry-tools.ant-collapse>.ant-collapse-item:last-child,.entry-tools.ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header{border-radius:12px}.entry-tools .ant-collapse-header{font-weight:600}.entry-tools .ant-collapse-header .muted{margin-left:6px;font-weight:400}.entry-tools .ant-collapse-content{border-top:1px solid var(--border)}.panel.ant-card{border-color:var(--border);margin-bottom:16px;box-shadow:0 1px 2px #233d350a}.panel>.ant-card-head{border-bottom-color:var(--border)}.section-title{flex-wrap:wrap;align-items:center;gap:10px;min-width:0;padding:2px 0;display:flex}.section-title h2{letter-spacing:.5px;margin:0;font-size:17px;font-weight:650}.step-no{background:var(--soft);min-width:30px;height:22px;color:var(--green);letter-spacing:1px;font-variant-numeric:tabular-nums;border-radius:6px;place-items:center;padding:0 6px;font-size:11.5px;font-weight:700;display:inline-grid}.section-extra{color:var(--muted);font-size:12.5px;font-weight:400}.section-lead{margin:0 0 14px}.help-icon{color:#8a918b;cursor:help;align-items:center;font-size:13px;display:inline-flex}.help-icon:hover{color:var(--green)}.internal-tag{color:var(--internal-text);white-space:nowrap;background:#f6ead5;border-radius:999px;align-items:center;gap:5px;padding:1px 9px;font-size:11.5px;font-weight:600;line-height:20px;display:inline-flex}.field{flex-direction:column;gap:6px;min-width:0;display:flex}.field-label-row{align-items:center;gap:6px;min-height:20px;display:flex}.field-label{color:#3e544c;font-size:13px;font-weight:500}.field-label .muted{font-weight:400}.field-hint{color:var(--muted);font-size:12px}.readonly-input.ant-input{color:var(--ink);background:#f3f2ec;font-weight:600}.readonly-input.ant-input:focus{box-shadow:none}.field-invalid .ant-input,.field-invalid .ant-select-selector,.field-invalid .ant-radio-button-wrapper{border-color:var(--danger)!important}.field-invalid .field-label{color:var(--danger)}.field-invalid{border-radius:8px;animation:1.2s ease-out invalid-pulse}@keyframes invalid-pulse{0%{box-shadow:0 0 #a03d3159}to{box-shadow:0 0 0 10px #a03d3100}}.field .ant-radio-group-block{display:flex}.field .ant-radio-button-wrapper{text-align:center;white-space:nowrap;padding-inline:8px}.line-item{border:1px solid var(--border);background:#fff;border-radius:12px;margin-bottom:16px;padding:16px 18px 18px}.line-top{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.line-heading{align-items:center;gap:10px;min-width:0;display:flex}.line-no{border:1px solid var(--gold);width:26px;height:26px;color:var(--gold-text);border-radius:50%;place-items:center;font-size:11px;font-weight:700;display:inline-grid}.line-heading strong{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.line-name{color:var(--ink);font-weight:600}.sale-inputs{margin-top:14px}.sale-charges{border:1px dashed var(--border-strong);background:#fcfcf9;border-radius:10px;margin-top:16px;padding:12px 14px}.sub-title{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.sub-title-text{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.charge-list{margin-top:10px}.charge-row{border-top:1px solid var(--border);grid-template-columns:repeat(2,minmax(0,1fr)) auto;align-items:end;gap:10px 16px;padding:10px 0 0;display:grid}.charge-row+.charge-row{margin-top:10px}.charge-row:has([data-field=chargeName]){grid-template-columns:repeat(3,minmax(0,1fr)) auto}.charge-actions{flex-direction:column;align-items:flex-end;gap:2px;padding-bottom:4px;display:flex}.sale-result{margin-top:16px}.sale-field .readonly-input.ant-input{background:var(--soft);color:var(--green);font-variant-numeric:tabular-nums;border-color:#cfdccf;font-size:16px}.calculation.ant-typography{color:var(--gold-text);margin:0 0 9px}.form-actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.add-line-button.ant-btn{border-style:dashed}.internal{border:1px solid var(--internal-border-alt);border-left:4px solid var(--gold);background:var(--internal-bg);border-radius:10px;margin-top:16px;padding:14px 16px 16px}.internal-title{color:var(--internal-text);align-items:center;gap:8px;margin-bottom:12px;display:flex}.internal .field-label{color:var(--internal-text)}.internal .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){background:var(--internal-text-alt);border-color:var(--internal-text-alt)}.internal .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{background:var(--internal-text);border-color:var(--internal-text)}.material-source,.purchase-cost-grid{margin-top:12px}.purchase-cost-grid+.purchase-formula:empty{display:none}.purchase-formula,.material-pool-note{margin:6px 0 0}.material-pool-note{color:var(--internal-text)}.legacy-extra-costs{margin-top:12px}.reload-button.ant-btn{align-self:flex-start}.cost-summary{border-top:1px dashed var(--internal-border);color:var(--internal-text);justify-content:space-between;align-items:baseline;gap:12px;margin:14px 0 0;padding-top:10px;font-weight:600;display:flex}.cost-summary .num{font-size:15px}.cost-summary .pending{font-size:12.5px;font-weight:500}.panel-internal.ant-card{background:var(--internal-bg-alt);border-color:var(--internal-border-alt);border-left:4px solid var(--gold)}.panel-internal>.ant-card-head{border-bottom-color:var(--internal-border-alt)}.panel-internal .step-no{color:var(--internal-text);background:#f1e5cc}.panel-internal .section-title h2,.panel-internal .field-label{color:var(--internal-text)}.order-cost-presets{border:0;min-width:0;margin:18px 0 0;padding:0}.order-cost-presets legend{color:var(--internal-text);margin-bottom:10px;padding:0;font-weight:600}.order-cost-presets legend .muted{margin-left:6px;font-weight:400}.order-cost-options{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));align-items:start;gap:10px;display:grid}.order-cost-option{border:1px solid var(--internal-border-alt);background:#fff;border-radius:10px;flex-direction:column;gap:10px;padding:12px 14px;transition:border-color .15s,box-shadow .15s;display:flex}.order-cost-option:hover{border-color:var(--internal-border)}.order-cost-option.checked{border-color:var(--internal-text-alt);box-shadow:inset 0 0 0 1px var(--internal-text-alt);background:#fffdf7}.order-cost-check.ant-checkbox-wrapper{align-items:flex-start;width:100%;display:flex}.order-cost-check .ant-checkbox{align-self:flex-start;margin-top:2px}.order-cost-check .ant-checkbox+span{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.order-cost-check .ant-checkbox-checked .ant-checkbox-inner{background:var(--internal-text-alt);border-color:var(--internal-text-alt)}.order-cost-main{justify-content:space-between;gap:8px;display:flex}.order-cost-price{color:var(--internal-text);white-space:nowrap;font-weight:600}.order-cost-payer{color:var(--muted);font-size:12px}.order-cost-quantity{padding-left:26px}.fee-grid{flex-direction:column;gap:10px;margin-top:14px;display:flex}.fee-grid:empty{display:none}.fee-row{border:1px solid var(--internal-border-alt);background:#fff;border-radius:10px;grid-template-columns:1.4fr 1fr 1fr auto;align-items:end;gap:10px 16px;padding:12px 14px;display:grid}.fee-title{flex-direction:column;align-self:center;gap:2px;display:flex}.fee-row>.ant-btn{margin-bottom:4px}.credit-card-preview{border:1px solid var(--internal-border);background:#fff;border-radius:10px;margin-top:14px;padding:12px 14px}.credit-card-heading{color:var(--internal-text);flex-wrap:wrap;justify-content:space-between;gap:8px;margin-bottom:10px;display:flex}.fees-total{border-top:1px dashed var(--internal-border);color:var(--internal-text);text-align:right;margin-top:16px;padding-top:12px;font-weight:600}.internal-note{margin-top:16px}.order-note-tag-options{flex-wrap:wrap;gap:6px;margin-top:10px;display:flex}.note-tag.ant-btn{border-color:var(--internal-border);color:var(--internal-text);background:#fff;border-radius:999px}.submit-bar{z-index:20;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border:1px solid var(--border);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#fffefaf7;border-bottom:0;border-radius:14px 14px 0 0;margin:8px 0 0;position:sticky;bottom:0;box-shadow:0 -6px 20px #233d3514}.submit-bar-row{align-items:center;gap:20px;display:flex}.submit-total{flex-direction:column;flex:none;display:flex}.submit-label{color:var(--muted);letter-spacing:1px;font-size:12px}.summary-amount{color:var(--green);letter-spacing:.5px;font-size:30px;font-weight:700;line-height:1.15}.summary-amount.pending{color:#8a918b;font-size:22px;font-weight:600}.submit-facts{border-left:1px solid var(--border);flex-direction:column;flex:1;gap:2px;min-width:0;padding-left:20px;font-size:12.5px;display:flex}.issue-button.ant-btn{flex:none;min-width:168px;height:48px;font-size:16px;font-weight:600}.order-error{margin-bottom:10px}.issued-page{justify-content:center;padding:24px 0 48px;display:flex}.issued-card.ant-card{border-color:var(--border);border-top:4px solid var(--green);width:100%;max-width:680px}.issued-summary{border:1px solid var(--border);background:var(--paper);border-radius:12px;flex-wrap:wrap;justify-content:center;gap:0;margin:0;padding:16px 8px;display:flex}.issued-item{flex:160px;padding:4px 16px}.issued-item+.issued-item{border-left:1px solid var(--border)}.issued-summary dt{font-size:12.5px}.issued-summary dd{margin:4px 0 0}.issued-value{letter-spacing:1px;font-size:24px;font-weight:700}.issued-total{color:var(--green)}.issued-value.small{font-size:18px}.issued-actions{flex-wrap:wrap;justify-content:center;gap:12px;display:flex}.login-wrap{background:radial-gradient(circle at 15% 10%, #254e4014, transparent 42%), radial-gradient(circle at 85% 90%, #a97b351a, transparent 45%), var(--paper);flex-direction:column;justify-content:center;align-items:center;min-height:100vh;padding:48px 16px;display:flex}.login-card.ant-card{border-color:var(--border);width:100%;max-width:420px;box-shadow:0 10px 40px #233d3514}.login-card>.ant-card-body{padding:36px 32px 24px}.login-head{text-align:center;flex-direction:column;align-items:center;margin-bottom:24px;display:flex}.login-head .brand-mark{margin-bottom:16px}h1.login-title.ant-typography{letter-spacing:1px;margin:0 0 6px;font-size:22px}.login-intro.ant-typography{margin:0 0 12px}.login-mode{background:var(--soft);color:var(--green);border-radius:999px;padding:2px 10px;font-size:11.5px}.login-error,.login-form .ant-form-item,.setup-form .ant-form-item{margin-bottom:16px}.input-icon{color:#8a918b}.login-foot{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:8px;margin-top:22px;padding-top:16px;display:flex}.login-note{text-align:center;margin:18px 0 0}.role-cards{flex-direction:column;gap:10px;display:flex}.role-card.ant-btn{text-align:left;border-color:var(--border);background:#fff;border-radius:12px;justify-content:flex-start;align-items:center;gap:14px;width:100%;height:auto;padding:14px 16px;display:flex}.role-card.ant-btn:not(:disabled):hover{border-color:var(--green);background:#fbfcf9}.role-avatar{background:var(--soft);width:40px;height:40px;color:var(--green);border-radius:50%;flex:none;place-items:center;font-size:16px;font-weight:700;display:inline-grid}.role-card-owner .role-avatar{background:var(--green);color:#e7dcc2}.role-text{flex-direction:column;flex:1;min-width:0;line-height:1.4;display:flex}.role-text strong{color:var(--ink);font-size:15px}.role-text small{color:var(--muted);font-size:12px}.role-go{color:var(--gold)}@media (width<=1199px){.main{padding:24px 24px 0}}@media (width<=991px){.app-body{grid-template-columns:minmax(0,1fr)}.app-sider{display:none}.menu-button.ant-btn{display:inline-flex}.app-header{padding:0 16px 0 8px}.old-ui-link,.mode-tag.ant-tag{display:none}.main{max-width:none}}@media (width<=767px){.entry-tools.ant-collapse{grid-template-columns:minmax(0,1fr);gap:8px}:is(.fee-row,.charge-row,.charge-row:has([data-field=chargeName])){grid-template-columns:repeat(2,minmax(0,1fr))}.fee-title{grid-column:1/-1}.fee-row>.ant-btn,.charge-actions{grid-column:1/-1;justify-self:end;align-items:flex-end}}@media (width<=575px){.app-header{gap:8px;height:58px}.app-body{min-height:calc(100vh - 58px)}.brand-mark{border-radius:9px;width:34px;height:34px;font-size:18px}.brand-text strong{letter-spacing:1px;font-size:15px}.brand-text small,.identity-name{display:none}.app-header-right{gap:8px}.main{padding:16px 12px 0}.page-heading{align-items:flex-start;margin-bottom:14px}.page-heading h1.ant-typography{font-size:23px}.page-heading .ant-typography-secondary{font-size:13px}.panel.ant-card{margin-bottom:12px}.panel>.ant-card-head{min-height:50px;padding:0 14px}.panel>.ant-card-head .ant-card-extra{font-size:12px}.panel>.ant-card-body{padding:14px}.panel-internal.ant-card{border-left-width:3px}.section-extra{display:none}.panel-internal .ant-card-extra .ant-btn{padding-inline:8px}.line-item{margin-bottom:12px;padding:12px}.internal{border-left-width:3px;margin-top:14px;padding:12px}.sale-charges{padding:10px 12px}.order-cost-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.order-cost-option{padding:10px 12px}.order-cost-main{flex-direction:column;gap:0}.order-cost-quantity{padding-left:0}.submit-bar{padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-inline:0;border-radius:14px 14px 0 0;margin:8px -12px 0}.submit-bar-row{gap:12px}.summary-amount{font-size:24px}.summary-amount.pending{font-size:18px}.submit-facts .fact:first-child,.sub-title-text>.muted{display:none}.field[data-field=paper_number] .ant-input{padding-inline:8px;font-size:13px}.submit-bar-row{flex-wrap:wrap;row-gap:4px}.submit-facts{border-left:0;flex-flow:wrap;flex-basis:100%;order:3;column-gap:10px;padding-left:0;font-size:11.5px}.submit-total{flex:1;min-width:0}.issue-button.ant-btn{min-width:0;height:46px;padding-inline:18px;font-size:15px}.order-error{max-height:30vh;overflow:auto}.issued-item+.issued-item{border-left:0;border-top:1px solid var(--border)}.issued-item{padding:10px 12px}.login-card>.ant-card-body{padding:28px 20px 20px}} diff --git a/新账系统/web/dist/assets/react-6WBM9IkR.js b/新账系统/web/dist/assets/react-DKzIiI9e.js similarity index 99% rename from 新账系统/web/dist/assets/react-6WBM9IkR.js rename to 新账系统/web/dist/assets/react-DKzIiI9e.js index 722fc04..f589de7 100644 --- a/新账系统/web/dist/assets/react-6WBM9IkR.js +++ b/新账系统/web/dist/assets/react-DKzIiI9e.js @@ -1,4 +1,4 @@ -import{t as e}from"./rolldown-runtime-Dl_DZoUm.js";import{b as t,y as n}from"./antd-DyieCF1D.js";var r=e((e=>{function t(e,t){var n=e.length;for(e.push(t);0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,te||(te=!0,oe());else{var t=n(l);t!==null&&le(ee,t.startTime-e)}}}var te=!1,ne=-1,re=5,ie=-1;function ae(){return g?!0:!(e.unstable_now()-iet&&ae());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break t}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(ee,u.startTime-t),i=!1}}break e}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():te=!1}}}var oe;if(typeof y==`function`)oe=function(){y(x)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=x,oe=function(){ce.postMessage(null)}}else oe=function(){_(x,0)};function le(t,n){ne=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ne),ne=-1):h=!0,le(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te||(te=!0,oe()))),r},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var r=i(),a=t(),o=n();function s(e){var t=`https://react.dev/errors/`+e;if(1je||(e.current=Ae[je],Ae[je]=null,je--)}function T(e,t){je++,Ae[je]=e.current,e.current=t}var Ne=Me(null),Pe=Me(null),Fe=Me(null),Ie=Me(null);function Le(e,t){switch(T(Fe,t),T(Pe,e),T(Ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}w(Ne),T(Ne,e)}function Re(){w(Ne),w(Pe),w(Fe)}function ze(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,T(Ie,e)),t=Ne.current;var n=dp(t,e.type);t!==n&&(T(Pe,e),T(Ne,n))}function Be(e){Pe.current===e&&(w(Ne),w(Pe)),Ie.current===e&&(w(Ie),sh._currentValue=ke)}var Ve,He;function Ue(e){if(Ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||``,He=-1{function t(e,t){var n=e.length;for(e.push(t);0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,te||(te=!0,oe());else{var t=n(l);t!==null&&le(ee,t.startTime-e)}}}var te=!1,ne=-1,re=5,ie=-1;function ae(){return g?!0:!(e.unstable_now()-iet&&ae());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break t}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(ee,u.startTime-t),i=!1}}break e}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():te=!1}}}var oe;if(typeof y==`function`)oe=function(){y(x)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=x,oe=function(){ce.postMessage(null)}}else oe=function(){_(x,0)};function le(t,n){ne=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ne),ne=-1):h=!0,le(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te||(te=!0,oe()))),r},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var r=i(),a=t(),o=n();function s(e){var t=`https://react.dev/errors/`+e;if(1je||(e.current=Ae[je],Ae[je]=null,je--)}function T(e,t){je++,Ae[je]=e.current,e.current=t}var Ne=Me(null),Pe=Me(null),Fe=Me(null),Ie=Me(null);function Le(e,t){switch(T(Fe,t),T(Pe,e),T(Ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}w(Ne),T(Ne,e)}function Re(){w(Ne),w(Pe),w(Fe)}function ze(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,T(Ie,e)),t=Ne.current;var n=dp(t,e.type);t!==n&&(T(Pe,e),T(Ne,n))}function Be(e){Pe.current===e&&(w(Ne),w(Pe)),Ie.current===e&&(w(Ie),sh._currentValue=ke)}var Ve,He;function Ue(e){if(Ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||``,He=-1)`:-1 - + 开单 · 新账系统(新版界面) - + - - - + + +