// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.10.2 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://greasyfork.org/zh-CN/scripts/443530-bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @match *://www.bilibili.com/ // @match *://www.bilibili.com/?* // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @require https://unpkg.com/axios@0.27.2/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.2.0/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.2.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js // @connect app.bilibili.com // @connect passport.bilibili.com // @connect link.acg.tv // @connect www.mcbbs.net // @grant GM.xmlHttpRequest // @grant GM_deleteValue // @grant GM_getValue // @grant GM_setValue // @downloadURL none // ==/UserScript== (i=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=i,document.head.appendChild(e)})(` .primary-btn:disabled:active,.primary-btn:disabled:hover{cursor:wait;background-color:inherit}.ant-btn{font-size:13px}.ant-btn:disabled{cursor:wait}._modal-mask_qk630_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_qk630_1{width:500px;max-height:calc(90vh - 50px);background-color:#fff;border-radius:10px;padding:0 15px 15px;display:flex;flex-direction:column;overflow:hidden}._modal-header_qk630_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal-body_qk630_30{padding-top:0;flex-grow:1;overflow-y:scroll}._modal-title_qk630_35{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._btn-close_qk630_42{margin-left:10px}._btn-close_qk630_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._btn-close_qk630_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._toast-container_mcbuq_1{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999999;padding:12px 24px;font-size:14px;min-width:200px;width:max-content;max-width:450px;background:#ffb243;color:#fff;border-radius:6px;white-space:pre-wrap}._toast-container_mcbuq_1._single-line_mcbuq_17{text-align:center}._modal_1rloz_1{width:500px}._title-desc_1rloz_4{margin-left:5px;font-size:40%}._reason-list_1rloz_8{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_1rloz_8{color:inherit;width:48%;text-align:center;line-height:20px;position:relative;border:1px solid #eee;padding-top:5px;padding-bottom:5px;margin-top:5px;margin-bottom:5px}body.dark ._reason_1rloz_8{border:1px solid #333}._reason_1rloz_8._active_1rloz_29{border-color:#f69;border-radius:4px}._reason-no_1rloz_33{position:absolute;left:6px;width:20px;height:20px;border-radius:50%;top:6px;display:flex;align-items:center;justify-content:center;background-color:#6a5acd;background-color:#f69;color:#fff}._tips-container_1rloz_47{margin-top:20px}._tips_1rloz_47{display:flex;align-items:center}._bili-video-card_e62cr_1{position:relative}._image-wrapper_e62cr_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_e62cr_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:4;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._preview-card-wrapper_e62cr_8 ._preview-card-inner_e62cr_21{width:100%;height:100%}._watch-later_e62cr_25{z-index:5}._badge_e62cr_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_e62cr_36{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_e62cr_51{color:default}._btn-dislike_e62cr_54{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_e62cr_54 ._btn-dislike-icon_e62cr_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_e62cr_54 ._btn-dislike-tip_e62cr_76{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_e62cr_91{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_e62cr_91{border:1px solid #333}._disliked-wrapper_e62cr_91 ._dislike-content-cover_e62cr_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_e62cr_91 ._dislike-content-cover_e62cr_105 ._dislike-content-cover-inner_e62cr_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_e62cr_91 ._dislike-content-cover_e62cr_105 ._dislike-content-cover-inner_e62cr_111 ._dislike-icon_e62cr_122{margin-bottom:5px}._disliked-wrapper_e62cr_91 ._dislike-content-cover_e62cr_105 ._dislike-content-cover-inner_e62cr_111 ._dislike-reason_e62cr_125{font-size:20px;text-align:center}._disliked-wrapper_e62cr_91 ._dislike-content-cover_e62cr_105 ._dislike-content-cover-inner_e62cr_111 ._dislike-desc_e62cr_129{font-size:16px;text-align:center}._disliked-wrapper_e62cr_91 ._dislike-content-action_e62cr_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_e62cr_91 ._dislike-content-action_e62cr_133{border-top:1px solid #333}._disliked-wrapper_e62cr_91 ._dislike-content-action_e62cr_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._skeleton-active_e62cr_150 .bili-video-card__skeleton--cover,._skeleton-active_e62cr_150 .bili-video-card__skeleton--text,._skeleton-active_e62cr_150 .bili-video-card__skeleton--light{background:linear-gradient(135deg,rgba(0,0,0,.06) 25%,rgba(0,0,0,.15) 37%,rgba(0,0,0,.06) 63%);background-size:400% 100%;animation-name:_ant-skeleton-loading_e62cr_1;animation-duration:1.4s;animation-timing-function:ease;animation-iteration-count:infinite}@keyframes _ant-skeleton-loading_e62cr_1{0%{background-position:100% 50%}to{background-position:0 50%}}._video-grid_14t5i_9{display:grid;position:relative;width:100%;grid-gap:20px 12px}@media (max-width: 1099.9px){._video-grid_14t5i_9{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1100px) and (max-width: 1700.9px){._video-grid_14t5i_9{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}@media (min-width: 1701px){._video-grid_14t5i_9{grid-template-columns:repeat(6,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 13){display:none!important}}._video-grid_14t5i_9._internal-testing_14t5i_43{grid-gap:20px 20px}@media (max-width: 1399.9px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 5){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1400px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 6){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}._narrow-mode_14t5i_71{grid-template-columns:repeat(2,1fr)!important}._config-icon_15g5q_1{line-height:1;margin-right:5px;font-size:0}._settings-group_15g5q_6{margin-bottom:10px}._settings-group_15g5q_6 ._settings-group-title_15g5q_9{font-size:2em;display:flex;align-items:center}._settings-group_15g5q_6 ._settings-group-content_15g5q_14{color:default}._settings-group_15g5q_6 ._settings-group-content_15g5q_14 button:first-child{margin-left:0}._row_15g5q_20{display:flex;align-items:center;flex-wrap:wrap}._row_15g5q_20 .primary-btn:first-child{margin-left:0}._check_15g5q_28{margin-bottom:5px;margin-inline-start:0!important;margin-inline-end:5px!important}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._modal-mask_juq7d_1._narrow-mode_juq7d_1{background-color:#000000e6}._modal_juq7d_1{width:calc(100vw - 30px);height:calc(100vh - 30px);max-height:unset;padding-right:0}body.dark ._modal_juq7d_1{border:1px solid #ff6699}._modal_juq7d_1._narrow-mode_juq7d_1{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_juq7d_1._narrow-mode_juq7d_1{border:none}._modal-header_juq7d_21,._modal-body_juq7d_22{padding-right:15px}body.dark ._btn-refresh_juq7d_25{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px} `); var QA=Object.defineProperty;var JA=(M,$e,Ye)=>$e in M?QA(M,$e,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):M[$e]=Ye;var at=(M,$e,Ye)=>(JA(M,typeof $e!="symbol"?$e+"":$e,Ye),Ye),Md=(M,$e,Ye)=>{if(!$e.has(M))throw TypeError("Cannot "+Ye)};var P=(M,$e,Ye)=>(Md(M,$e,"read from private field"),Ye?Ye.call(M):$e.get(M)),ge=(M,$e,Ye)=>{if($e.has(M))throw TypeError("Cannot add the same private member more than once");$e instanceof WeakSet?$e.add(M):$e.set(M,Ye)},ne=(M,$e,Ye,Zn)=>(Md(M,$e,"write to private field"),Zn?Zn.call(M,Ye):$e.set(M,Ye),Ye),ol=(M,$e,Ye,Zn)=>({set _(Jo){ne(M,$e,Jo,Ye)},get _(){return P(M,$e,Zn)}}),J=(M,$e,Ye)=>(Md(M,$e,"access private method"),Ye);(function(M,$e,Ye,Zn){var Ii,br,Zt,Fr,yr,Li,ct,wr,ut,qe,ue,At,Qt,Ot,mt,Sr,St,an,sn,Cr,Lr,xn,jt,Go,Rd,Un,ln,qo,Jt,qs,Eb,Gn,Di,Ko,Dr,$n,jr,On,Xo,Ad,ji,al,zi,sl,He,Qe,Yo,Nd,qn,Qo;"use strict";function Jo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const h=Jo(M),$b=Jo($e);function Ob(e){if(e.sheet)return e.sheet;for(var t=0;t0?yt(Jn,--Nt):0,Qn--,it===10&&(Qn=1,na--),it}function Wt(){return it=Nt2||Ki(it)>3?"":" "}function jb(e,t){for(;--t&&Wt()&&!(it<48||it>102||it>57&&it<65||it>70&&it<97););return qi(e,oa()+(t<6&&$r()==32&&Wt()==32))}function fl(e){for(;Wt();)switch(it){case e:return Nt;case 34:case 39:e!==34&&e!==39&&fl(it);break;case 40:e===41&&fl(e);break;case 92:Wt();break}return Nt}function zb(e,t){for(;Wt()&&e+it!==47+10;)if(e+it===42+42&&$r()===47)break;return"/*"+qi(t,Nt-1)+"*"+ta(e===47?e:Wt())}function Hb(e){for(;!Ki($r());)Wt();return qi(e,Nt)}function zd(e){return jd(sa("",null,null,null,[""],e=Dd(e),0,[0],e))}function sa(e,t,r,n,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,g=0,v=0,m=1,p=1,b=1,w=0,S="",$=i,y=o,C=n,x=S;p;)switch(v=w,w=Wt()){case 40:if(v!=108&&yt(x,d-1)==58){ul(x+=Te(aa(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:x+=aa(w);break;case 9:case 10:case 13:case 32:x+=Db(v);break;case 92:x+=jb(oa()-1,7);continue;case 47:switch($r()){case 42:case 47:ra(Wb(zb(Wt(),oa()),t,r),l);break;default:x+="/"}break;case 123*m:s[c++]=_r(x)*b;case 125*m:case 59:case 0:switch(w){case 0:case 125:p=0;case 59+u:g>0&&_r(x)-d&&ra(g>32?Wd(x+";",n,r,d-1):Wd(Te(x," ","")+";",n,r,d-2),l);break;case 59:x+=";";default:if(ra(C=Hd(x,t,r,c,u,i,s,S,$=[],y=[],d),o),w===123)if(u===0)sa(x,t,C,C,$,o,d,s,y);else switch(f===99&&yt(x,3)===110?100:f){case 100:case 109:case 115:sa(e,C,C,n&&ra(Hd(e,C,C,0,0,i,s,S,i,$=[],d),y),i,y,d,s,n?$:y);break;default:sa(x,C,C,C,[""],y,0,s,y)}}c=u=g=0,m=b=1,S=x="",d=a;break;case 58:d=1+_r(x),g=v;default:if(m<1){if(w==123)--m;else if(w==125&&m++==0&&Lb()==125)continue}switch(x+=ta(w),w*m){case 38:b=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(_r(x)-1)*b,b=1;break;case 64:$r()===45&&(x+=aa(Wt())),f=$r(),u=d=_r(S=x+=Hb(oa())),w++;break;case 45:v===45&&_r(x)==2&&(m=0)}}return o}function Hd(e,t,r,n,i,o,a,s,l,c,u){for(var d=i-1,f=i===0?o:[""],g=dl(f),v=0,m=0,p=0;v0?f[b]+" "+w:Te(w,/&\f/g,f[b])))&&(l[p++]=S);return ia(e,t,r,i===0?ll:s,l,c,u)}function Wb(e,t,r){return ia(e,t,r,kd,ta(Fb()),Ui(e,2,-2),0)}function Wd(e,t,r,n){return ia(e,t,r,cl,Ui(e,0,n),Ui(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=dl(e),i=0;i6)switch(yt(e,t+1)){case 109:if(yt(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Oe+"$2-$3$1"+ea+(yt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ul(e,"stretch")?Ud(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(yt(e,t+1)!==115)break;case 6444:switch(yt(e,_r(e)-3-(~ul(e,"!important")&&10))){case 107:return Te(e,":",":"+Oe)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Oe+(yt(e,14)===45?"inline-":"")+"box$3$1"+Oe+"$2$3$1"+xt+"$2box$3")+e}break;case 5936:switch(yt(e,t+11)){case 114:return Oe+e+xt+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Oe+e+xt+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Oe+e+xt+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Oe+e+xt+e+e}return e}var Zb=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case cl:t.return=Ud(t.value,t.length);break;case Id:return Pn([Gi(t,{value:Te(t.value,"@","@"+Oe)})],i);case ll:if(t.length)return Ib(t.props,function(o){switch(kb(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([Gi(t,{props:[Te(o,/:(read-\w+)/,":"+ea+"$1")]})],i);case"::placeholder":return Pn([Gi(t,{props:[Te(o,/:(plac\w+)/,":"+Oe+"input-$1")]}),Gi(t,{props:[Te(o,/:(plac\w+)/,":"+ea+"$1")]}),Gi(t,{props:[Te(o,/:(plac\w+)/,xt+"input-$1")]})],i)}return""})}},Qb=[Zb],Gd=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var p=m.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||Qb,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var p=m.getAttribute("data-emotion").split(" "),b=1;b=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var f0={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},h0=/[A-Z]|^ms/g,g0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qd=function(t){return t.charCodeAt(1)===45},Jd=function(t){return t!=null&&typeof t!="boolean"},pl=Ub(function(e){return Qd(e)?e:e.replace(h0,"-$&").toLowerCase()}),ef=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(g0,function(n,i,o){return Or={name:i,styles:o,next:Or},i})}return f0[t]!==1&&!Qd(t)&&typeof r=="number"&&r!==0?r+"px":r},eN="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Yi(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Or={name:r.name,styles:r.styles,next:Or},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Or={name:n.name,styles:n.styles,next:Or},n=n.next;var i=r.styles+";";return i}return m0(e,t,r)}case"function":{if(e!==void 0){var o=Or,a=r(e);return Or=o,Yi(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function m0(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i0){if(++t>=Cy)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function $y(e){return function(){return e}}var Oy=function(){try{var e=Mn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Sa=Oy;var Py=Sa?function(e,t){return Sa(e,"toString",{configurable:!0,enumerable:!1,value:$y(t),writable:!0})}:pf,Ty=_y(Py);const My=Ty;function Ry(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1}var Fy=9007199254740991,Ly=/^(?:0|[1-9]\d*)$/;function xl(e,t){var r=typeof e;return t=t??Fy,!!t&&(r=="number"||r!="symbol"&&Ly.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=By}function Vy(e){return e!=null&&_l(e.length)&&!bf(e)}var Uy=Object.prototype;function Gy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Uy;return e===r}function qy(e,t){for(var r=-1,n=Array(e);++r-1}function aw(e,t){var r=this.__data__,n=Ca(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Vr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(s)?t>1?kf(s,t-1,r,n,i):Af(i,s):n||(i[i.length]=s)}return i}function Ew(e){var t=e==null?0:e.length;return t?kf(e,1):[]}function _w(e){return My(Wy(e,void 0,Ew),e+"")}var $w="Expected a function";function Ow(e,t){var r;if(typeof t!="function")throw new TypeError($w);return e=vf(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function Pw(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n=n?e:Pw(e,t,r)}var Mw="\\ud800-\\udfff",Rw="\\u0300-\\u036f",Aw="\\ufe20-\\ufe2f",Nw="\\u20d0-\\u20ff",kw=Rw+Aw+Nw,Iw="\\ufe0e\\ufe0f",Fw="\\u200d",Lw=RegExp("["+Fw+Mw+kw+Iw+"]");function Al(e){return Lw.test(e)}function Dw(e){return e.split("")}var If="\\ud800-\\udfff",jw="\\u0300-\\u036f",zw="\\ufe20-\\ufe2f",Hw="\\u20d0-\\u20ff",Ww=jw+zw+Hw,Bw="\\ufe0e\\ufe0f",Vw="["+If+"]",Nl="["+Ww+"]",kl="\\ud83c[\\udffb-\\udfff]",Uw="(?:"+Nl+"|"+kl+")",Ff="[^"+If+"]",Lf="(?:\\ud83c[\\udde6-\\uddff]){2}",Df="[\\ud800-\\udbff][\\udc00-\\udfff]",Gw="\\u200d",jf=Uw+"?",zf="["+Bw+"]?",qw="(?:"+Gw+"(?:"+[Ff,Lf,Df].join("|")+")"+zf+jf+")*",Kw=zf+jf+qw,Xw="(?:"+[Ff+Nl+"?",Nl,Lf,Df,Vw].join("|")+")",Yw=RegExp(kl+"(?="+kl+")|"+Xw+Kw,"g");function Zw(e){return e.match(Yw)||[]}function Qw(e){return Al(e)?Zw(e):Dw(e)}function Jw(){this.__data__=new Vr,this.size=0}function eS(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function tS(e){return this.__data__.get(e)}function rS(e){return this.__data__.has(e)}var nS=200;function iS(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!ro||n.lengths))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,g=r&OS?new io:void 0;for(o.set(e,t),o.set(t,e);++d=t||x<0||d&&N>=o}function b(){var C=jl();if(p(C))return w(C);s=setTimeout(b,m(C))}function w(C){return s=void 0,f&&n?g(C):(n=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,n=l=i=s=void 0}function $(){return s===void 0?a:w(jl())}function y(){var C=jl(),x=p(C);if(n=arguments,i=this,l=C,x){if(s===void 0)return v(l);if(d)return clearTimeout(s),s=setTimeout(b,t),g(l)}return s===void 0&&(s=setTimeout(b,t)),a}return y.cancel=S,y.flush=$,y}function hC(e,t,r){for(var n=-1,i=e==null?0:e.length;++nbC)return r;do t%2&&(r+=e),t=yC(t/2),t&&(e+=e);while(t);return r}var wC=oh("length");const SC=wC;var lh="\\ud800-\\udfff",CC="\\u0300-\\u036f",xC="\\ufe20-\\ufe2f",EC="\\u20d0-\\u20ff",_C=CC+xC+EC,$C="\\ufe0e\\ufe0f",OC="["+lh+"]",zl="["+_C+"]",Hl="\\ud83c[\\udffb-\\udfff]",PC="(?:"+zl+"|"+Hl+")",ch="[^"+lh+"]",uh="(?:\\ud83c[\\udde6-\\uddff]){2}",dh="[\\ud800-\\udbff][\\udc00-\\udfff]",TC="\\u200d",fh=PC+"?",hh="["+$C+"]?",MC="(?:"+TC+"(?:"+[ch,uh,dh].join("|")+")"+hh+fh+")*",RC=hh+fh+MC,AC="(?:"+[ch+zl+"?",zl,uh,dh,OC].join("|")+")",gh=RegExp(Hl+"(?="+Hl+")|"+AC+RC,"g");function NC(e){for(var t=gh.lastIndex=0;gh.test(e);)++t;return t}function mh(e){return Al(e)?NC(e):SC(e)}var kC=Math.ceil;function IC(e,t){t=t===void 0?" ":yl(t);var r=t.length;if(r<2)return r?sh(t,e):t;var n=sh(t,kC(e/mh(t)));return Al(t)?Tw(Qw(n),0,e).join(""):n.slice(0,e)}function FC(e,t,r){e=Rf(e),t=vf(t);var n=t?mh(e):0;return t&&n=VC){var c=t?null:BC(e);if(c)return Ll(c);a=!1,i=Yf,l=new io}else l=t?[]:s;e:for(;++nnew Proxy(e,t);const Bl=Object.getPrototypeOf,Vl=new WeakMap,bh=e=>e&&(Vl.has(e)?Vl.get(e):Bl(e)===Object.prototype||Bl(e)===Array.prototype),Oa=e=>typeof e=="object"&&e!==null,KC=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(r=>{r.configurable=!0}),Object.create(Bl(e),t)},Ul=e=>e[Wl]||e,yh=(e,t,r,n)=>{if(!bh(e))return e;let i=n&&n.get(e);if(!i){const l=Ul(e);i=(c=>Object.values(Object.getOwnPropertyDescriptors(c)).some(u=>!u.configurable&&!u.writable))(l)?[l,KC(l)]:[l],n==null||n.set(e,i)}const[o,a]=i;let s=r&&r.get(o);return s&&s[1].f===!!a||(s=((l,c)=>{const u={f:c};let d=!1;const f=(v,m)=>{if(!d){let p=u[oo].get(l);if(p||(p={},u[oo].set(l,p)),v===ao)p[ao]=!0;else{let b=p[v];b||(b=new Set,p[v]=b),b.add(m)}}},g={get:(v,m)=>m===Wl?l:(f("k",m),yh(Reflect.get(v,m),u[oo],u.c)),has:(v,m)=>m===GC?(d=!0,u[oo].delete(l),!0):(f("h",m),Reflect.has(v,m)),getOwnPropertyDescriptor:(v,m)=>(f("o",m),Reflect.getOwnPropertyDescriptor(v,m)),ownKeys:v=>(f(ao),Reflect.ownKeys(v))};return c&&(g.set=g.deleteProperty=()=>!1),[g,u]})(o,!!a),s[1].p=qC(a||o,s[0]),r&&r.set(o,s)),s[1][oo]=t,s[1].c=r,s[1].p},wh=(e,t,r,n)=>{if(Object.is(e,t))return!1;if(!Oa(e)||!Oa(t))return!0;const i=r.get(Ul(e));if(!i)return!0;if(n){const a=n.get(e);if(a&&a.n===t)return a.g;n.set(e,{n:t,g:!1})}let o=null;try{for(const a of i.h||[])if(o=Reflect.has(e,a)!==Reflect.has(t,a),o)return o;if(i[ao]===!0){if(o=((a,s)=>{const l=Reflect.ownKeys(a),c=Reflect.ownKeys(s);return l.length!==c.length||l.some((u,d)=>u!==c[d])})(e,t),o)return o}else for(const a of i.o||[])if(o=!!Reflect.getOwnPropertyDescriptor(e,a)!=!!Reflect.getOwnPropertyDescriptor(t,a),o)return o;for(const a of i.k||[])if(o=wh(e[a],t[a],r,n),o)return o;return o===null&&(o=!0),o}finally{n&&n.set(e,{n:t,g:o})}},XC=e=>bh(e)&&e[Wl]||null,Sh=(e,t=!0)=>{Vl.set(e,t)},YC=(e,t,r)=>{const n=[],i=new WeakSet,o=(a,s)=>{if(i.has(a))return;Oa(a)&&i.add(a);const l=Oa(a)&&t.get(Ul(a));if(l){var c,u;if((c=l.h)==null||c.forEach(f=>{const g=`:has(${String(f)})`;n.push(s?[...s,g]:[g])}),l[ao]===!0){const f=":ownKeys";n.push(s?[...s,f]:[f])}else{var d;(d=l.o)==null||d.forEach(f=>{const g=`:hasOwn(${String(f)})`;n.push(s?[...s,g]:[g])})}(u=l.k)==null||u.forEach(f=>{r&&!("value"in(Object.getOwnPropertyDescriptor(a,f)||{}))||o(a[f],s?[...s,f]:[f])})}else s&&n.push(s)};return o(e),n},Gl=e=>typeof e=="object"&&e!==null,mn=new WeakMap,Pa=new WeakSet,ZC=(e=Object.is,t=(c,u)=>new Proxy(c,u),r=c=>Gl(c)&&!Pa.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),n=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},i=new WeakMap,o=(c,u,d=n)=>{const f=i.get(c);if((f==null?void 0:f[0])===u)return f[1];const g=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return Sh(g,!0),i.set(c,[u,g]),Reflect.ownKeys(c).forEach(v=>{if(Object.getOwnPropertyDescriptor(g,v))return;const m=Reflect.get(c,v),p={value:m,enumerable:!0,configurable:!0};if(Pa.has(m))Sh(m,!1);else if(m instanceof Promise)delete p.value,p.get=()=>d(m);else if(mn.has(m)){const[b,w]=mn.get(m);p.value=o(b,w(),d)}Object.defineProperty(g,v,p)}),g},a=new WeakMap,s=[1,1],l=c=>{if(!Gl(c))throw new Error("object required");const u=a.get(c);if(u)return u;let d=s[0];const f=new Set,g=(A,O=++s[0])=>{d!==O&&(d=O,f.forEach(I=>I(A,O)))};let v=s[1];const m=(A=++s[1])=>(v!==A&&!f.size&&(v=A,b.forEach(([O])=>{const I=O[1](A);I>d&&(d=I)})),d),p=A=>(O,I)=>{const R=[...O];R[1]=[A,...R[1]],g(R,I)},b=new Map,w=(A,O)=>{if(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&b.has(A))throw new Error("prop listener already exists");if(f.size){const I=O[3](p(A));b.set(A,[O,I])}else b.set(A,[O])},S=A=>{var O;const I=b.get(A);I&&(b.delete(A),(O=I[1])==null||O.call(I))},$=A=>(f.add(A),f.size===1&&b.forEach(([I,R],E)=>{if(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&R)throw new Error("remove already exists");const _=I[3](p(E));b.set(E,[I,_])}),()=>{f.delete(A),f.size===0&&b.forEach(([I,R],E)=>{R&&(R(),b.set(E,[I]))})}),y=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),x=t(y,{deleteProperty(A,O){const I=Reflect.get(A,O);S(O);const R=Reflect.deleteProperty(A,O);return R&&g(["delete",[O],I]),R},set(A,O,I,R){const E=Reflect.has(A,O),_=Reflect.get(A,O,R);if(E&&(e(_,I)||a.has(I)&&e(_,a.get(I))))return!0;S(O),Gl(I)&&(I=XC(I)||I);let T=I;if(I instanceof Promise)I.then(F=>{I.status="fulfilled",I.value=F,g(["resolve",[O],F])}).catch(F=>{I.status="rejected",I.reason=F,g(["reject",[O],F])});else{!mn.has(I)&&r(I)&&(T=l(I));const F=!Pa.has(T)&&mn.get(T);F&&w(O,F)}return Reflect.set(A,O,T,R),g(["set",[O],I,_]),!0}});a.set(c,x);const N=[y,m,o,$];return mn.set(x,N),Reflect.ownKeys(c).forEach(A=>{const O=Object.getOwnPropertyDescriptor(c,A);"value"in O&&(x[A]=c[A],delete O.value,delete O.writable),Object.defineProperty(y,A,O)}),x})=>[l,mn,Pa,e,t,r,n,i,o,a,s],[QC]=ZC();function so(e={}){return QC(e)}function Ch(e,t,r){const n=mn.get(e);({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&!n&&console.warn("Please use proxy object");let i;const o=[],a=n[3];let s=!1;const c=a(u=>{if(o.push(u),r){t(o.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,s&&t(o.splice(0))}))});return s=!0,()=>{s=!1,c()}}function xh(e,t){const r=mn.get(e);({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&!r&&console.warn("Please use proxy object");const[n,i,o]=r;return o(n,i(),t)}var ql={},JC={get exports(){return ql},set exports(e){ql=e}},Eh={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ni=M;function ex(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tx=typeof Object.is=="function"?Object.is:ex,rx=ni.useState,nx=ni.useEffect,ix=ni.useLayoutEffect,ox=ni.useDebugValue;function ax(e,t){var r=t(),n=rx({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return ix(function(){i.value=r,i.getSnapshot=t,Kl(i)&&o({inst:i})},[e,r,t]),nx(function(){return Kl(i)&&o({inst:i}),e(function(){Kl(i)&&o({inst:i})})},[e]),ox(r),r}function Kl(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!tx(e,r)}catch{return!0}}function sx(e,t){return t()}var lx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sx:ax;Eh.useSyncExternalStore=ni.useSyncExternalStore!==void 0?ni.useSyncExternalStore:lx,function(e){e.exports=Eh}(JC);const cx=e0(ql),{use:_h}=M,{useSyncExternalStore:ux}=cx,dx=(e,t)=>{const r=M.useRef();M.useEffect(()=>{r.current=YC(e,t,!0)}),M.useDebugValue(r.current)},fx=new WeakMap;function ii(e,t){const r=t==null?void 0:t.sync,n=M.useRef(),i=M.useRef();let o=!0;const a=ux(M.useCallback(c=>{const u=Ch(e,c,r);return c(),u},[e,r]),()=>{const c=xh(e,_h);try{if(!o&&n.current&&i.current&&!wh(n.current,c,i.current,new WeakMap))return n.current}catch{}return c},()=>xh(e,_h));o=!1;const s=new WeakMap;M.useEffect(()=>{n.current=a,i.current=s}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&dx(a,s);const l=M.useMemo(()=>new WeakMap,[]);return yh(a,s,l,fx)}const Xl={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1,openInIINAWhenRightClick:!1,usePcDesktopApi:!1,useParallelRequest:!0,autoPreviewWhenKeyboardSelect:!1,autoPreviewUpdateInterval:400,autoPreviewWhenHover:!1,filterMinPlayCountEnabled:!1,filterMinPlayCount:1e4,filterMinDurationEnabled:!1,filterMinDuration:60},_e=so({...Xl}),$h=Object.keys(Xl),qr=function(){return ii(_e)},Oh="bilibili-app-recommend.settings";function hx(){const e=GM_getValue(Oh);e&&typeof e=="object"&&Object.assign(_e,vh(e,$h)),Ch(_e,()=>{gx()})}function gx(){const e=vh(_e,$h);GM_setValue(Oh,e)}function Ta(e){Object.assign(_e,e)}function mx(){return Ta(Xl)}hx();const lo=pC(()=>!!document.querySelectorAll(".bili-feed4").length),Ph=document.querySelector(".bili-header__bar"),Th=!!(Ph&&window.getComputedStyle(Ph).display==="none")?50:64,Mh=()=>document.body.classList.contains("dark"),Rh=so({value:Mh()});function Yl(){return ii(Rh).value}const Ma=new MutationObserver(function(){Rh.value=Mh()});Ma.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{Ma==null||Ma.disconnect()});function or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e){return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Le(e)}function vx(e,t){if(Le(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Le(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ah(e){var t=vx(e,"string");return Le(t)==="symbol"?t:String(t)}function Nh(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Na(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bx(e,t){if(t&&(Le(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Na(e)}function ka(e){var t=px();return function(){var n=Aa(e),i;if(t){var o=Aa(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return bx(this,i)}}var Ql={},yx={get exports(){return Ql},set exports(e){Ql=e}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i1&&arguments[1]!==void 0?arguments[1]:{},r=[];return M.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(oi(n)):Xi.isFragment(n)&&n.props?r=r.concat(oi(n.props.children,t)):r.push(n))}),r}var kh={};function wx(e,t){}function Sx(e,t,r){!t&&!kh[r]&&(e(!1,r),kh[r]=!0)}function dr(e,t){Sx(wx,e,t)}function X(e,t,r){return t=Ah(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t0},e.prototype.connect_=function(){!rc||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ox?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!rc||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=$x.some(function(o){return!!~n.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Dh=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof ai(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new Fx(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ai(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Lx(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Hh=typeof WeakMap<"u"?new WeakMap:new Lh,Wh=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Px.getInstance(),n=new Dx(t,r,this);Hh.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Wh.prototype[e]=function(){var t;return(t=Hh.get(this))[e].apply(t,arguments)}});var jx=function(){return typeof Fa.ResizeObserver<"u"?Fa.ResizeObserver:Wh}(),vn=new Map;function zx(e){e.forEach(function(t){var r,n=t.target;(r=vn.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var Bh=new jx(zx);function Hx(e,t){vn.has(e)||(vn.set(e,new Set),Bh.observe(e)),vn.get(e).add(t)}function Wx(e,t){vn.has(e)&&(vn.get(e).delete(t),vn.get(e).size||(Bh.unobserve(e),vn.delete(e)))}var Bx=function(e){Ra(r,e);var t=ka(r);function r(){return or(this,r),t.apply(this,arguments)}return ar(r,[{key:"render",value:function(){return this.props.children}}]),r}(h.Component),nc=h.createContext(null);function Vx(e){var t=e.children,r=e.onBatchResize,n=h.useRef(0),i=h.useRef([]),o=h.useContext(nc),a=h.useCallback(function(s,l,c){n.current+=1;var u=n.current;i.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===n.current&&(r==null||r(i.current),i.current=[])}),o==null||o(s,l,c)},[r,o]);return h.createElement(nc.Provider,{value:a},t)}function Ux(e,t){var r=e.children,n=e.disabled,i=h.useRef(null),o=h.useRef(null),a=h.useContext(nc),s=typeof r=="function",l=s?r(i):r,c=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&h.isValidElement(l)&&co(l),d=u?l.ref:null,f=h.useMemo(function(){return Nn(d,i)},[d,i]),g=function(){return tc(i.current)||tc(o.current)};h.useImperativeHandle(t,function(){return g()});var v=h.useRef(e);v.current=e;var m=h.useCallback(function(p){var b=v.current,w=b.onResize,S=b.data,$=p.getBoundingClientRect(),y=$.width,C=$.height,x=p.offsetWidth,N=p.offsetHeight,A=Math.floor(y),O=Math.floor(C);if(c.current.width!==A||c.current.height!==O||c.current.offsetWidth!==x||c.current.offsetHeight!==N){var I={width:A,height:O,offsetWidth:x,offsetHeight:N};c.current=I;var R=x===Math.round(y)?y:x,E=N===Math.round(C)?C:N,_=z(z({},I),{},{offsetWidth:R,offsetHeight:E});a==null||a(_,p,S),w&&Promise.resolve().then(function(){w(_,p)})}},[]);return h.useEffect(function(){var p=g();return p&&!n&&Hx(p,m),function(){return Wx(p,m)}},[i.current,n]),h.createElement(Bx,{ref:o},u?h.cloneElement(l,{ref:f}):l)}var Gx=h.forwardRef(Ux),qx="rc-observer-key";function Kx(e,t){var r=e.children,n=typeof r=="function"?[r]:oi(r);return n.map(function(i,o){var a=(i==null?void 0:i.key)||"".concat(qx,"-").concat(o);return h.createElement(Gx,Et({},e,{key:a,ref:o===0?t:void 0}),i)})}var ic=h.forwardRef(Kx);ic.Collection=Vx;function Vh(e,t){var r=z({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}function oc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Zx(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function Vt(e,t){if(e==null)return{};var r=Zx(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=n.has(o);if(dr(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(r&&s>1)return!1;n.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):rE}function za(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function nE(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Jh(e){return Array.from((cc.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function eg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Ut())return null;var r=t.csp,n=t.prepend,i=document.createElement("style");i.setAttribute(Zh,nE(n)),r!=null&&r.nonce&&(i.nonce=r==null?void 0:r.nonce),i.innerHTML=e;var o=za(t),a=o.firstChild;if(n){if(n==="queue"){var s=Jh(o).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(Zh))});if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function tg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=za(t);return Jh(r).find(function(n){return n.getAttribute(Qh(t))===e})}function Ha(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=tg(e,t);if(r){var n=za(t);n.removeChild(r)}}function iE(e,t){var r=cc.get(e);if(!r||!tE(document,r)){var n=eg("",t),i=n.parentNode;cc.set(e,i),e.removeChild(n)}}function li(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=za(r);iE(n,r);var i=tg(t,r);if(i){var o,a;if((o=r.csp)!==null&&o!==void 0&&o.nonce&&i.nonce!==((a=r.csp)===null||a===void 0?void 0:a.nonce)){var s;i.nonce=(s=r.csp)===null||s===void 0?void 0:s.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var l=eg(e,r);return l.setAttribute(Qh(r),t),l}function Wa(e){var t="";return Object.keys(e).forEach(function(r){var n=e[r];t+=r,n&&Le(n)==="object"?t+=Wa(n):t+=n}),t}function oE(e,t){return sc("".concat(t,"_").concat(Wa(e)))}var fo="layer-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),rg="903px";function aE(e,t){if(Ut()){var r;li(e,fo);var n=document.createElement("div");n.style.position="fixed",n.style.left="0",n.style.top="0",t==null||t(n),document.body.appendChild(n);var i=getComputedStyle(n).width===rg;return(r=n.parentNode)===null||r===void 0||r.removeChild(n),Ha(fo),i}return!1}var uc=void 0;function sE(){return uc===void 0&&(uc=aE("@layer ".concat(fo," { .").concat(fo," { width: ").concat(rg,"!important; } }"),function(e){e.className=fo})),uc}var lE={},cE="css",kn=new Map;function uE(e){kn.set(e,(kn.get(e)||0)+1)}function dE(e){if(typeof document<"u"){var t=document.querySelectorAll("style[".concat(lc,'="').concat(e,'"]'));t.forEach(function(r){if(r[uo]===ja){var n;(n=r.parentNode)===null||n===void 0||n.removeChild(r)}})}}function fE(e){kn.set(e,(kn.get(e)||0)-1);var t=Array.from(kn.keys()),r=t.filter(function(n){var i=kn.get(n)||0;return i<=0});r.length2&&arguments[2]!==void 0?arguments[2]:{},n=r.salt,i=n===void 0?"":n,o=r.override,a=o===void 0?lE:o,s=r.formatToken,l=h.useMemo(function(){return Object.assign.apply(Object,[{}].concat(ee(t)))},[t]),c=h.useMemo(function(){return Wa(l)},[l]),u=h.useMemo(function(){return Wa(a)},[a]),d=Yh("token",[i,e.id,c,u],function(){var f=e.getDerivativeToken(l),g=z(z({},f),a);s&&(g=s(g));var v=oE(g,i);g._tokenKey=v,uE(v);var m="".concat(cE,"-").concat(sc(v));return g._hashId=m,[g,m]},function(f){fE(f[0]._tokenKey)});return d}var gE={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ng=Ut(),mE="_skip_check_";function ig(e){var t=Pn(zd(e),Bd);return t.replace(/\{%%%\:[^;];}/g,";")}function vE(e){return Le(e)==="object"&&e&&mE in e}function pE(e,t,r){if(!t)return e;var n=".".concat(t),i=r==="low"?":where(".concat(n,")"):n,o=e.split(",").map(function(a){var s,l=a.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(i).concat(c.slice(u.length)),[c].concat(ee(l.slice(1))).join(" ")});return o.join(",")}var bE=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,o=n.injectHash,a=n.parentSelectors,s=r.hashId,l=r.layer;r.path;var c=r.hashPriority,u=r.transformers,d=u===void 0?[]:u;r.linters;var f="",g={};function v(S){var $=S.getName(s);if(!g[$]){var y=e(S.style,r,{root:!1,parentSelectors:a}),C=K(y,1),x=C[0];g[$]="@keyframes ".concat(S.getName(s)).concat(x)}}function m(S){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return S.forEach(function(y){Array.isArray(y)?m(y,$):y&&$.push(y)}),$}var p=m(Array.isArray(t)?t:[t]);if(p.forEach(function(S){var $=typeof S=="string"&&!i?{}:S;if(typeof $=="string")f+="".concat($,` `);else if($._keyframe)v($);else{var y=d.reduce(function(C,x){var N;return(x==null||(N=x.visit)===null||N===void 0?void 0:N.call(x,C))||C},$);Object.keys(y).forEach(function(C){var x=y[C];if(Le(x)==="object"&&x&&(C!=="animationName"||!x._keyframe)&&!vE(x)){var N=!1,A=C.trim(),O=!1;(i||o)&&s?A.startsWith("@")?N=!0:A=pE(C,s,c):i&&!s&&(A==="&"||A==="")&&(A="",O=!0);var I=e(x,r,{root:O,injectHash:N,parentSelectors:[].concat(ee(a),[A])}),R=K(I,2),E=R[0],_=R[1];g=z(z({},g),_),f+="".concat(A).concat(E)}else{var T,F=(T=x==null?void 0:x.value)!==null&&T!==void 0?T:x,k=C.replace(/[A-Z]/g,function(j){return"-".concat(j.toLowerCase())}),D=F;!gE[C]&&typeof D=="number"&&D!==0&&(D="".concat(D,"px")),C==="animationName"&&x!==null&&x!==void 0&&x._keyframe&&(v(x),D=x.getName(s)),f+="".concat(k,":").concat(D,";")}})}}),!i)f="{".concat(f,"}");else if(l&&sE()){var b=l.split(","),w=b[b.length-1].trim();f="@layer ".concat(w," {").concat(f,"}"),b.length>1&&(f="@layer ".concat(l,"{%%%:%}").concat(f))}return[f,g]};function yE(e,t){return sc("".concat(e.join("%")).concat(t))}function wE(){return null}function dc(e,t){var r=e.token,n=e.path,i=e.hashId,o=e.layer,a=e.nonce,s=h.useContext(qh),l=s.autoClear;s.mock;var c=s.defaultCache,u=s.hashPriority,d=s.container,f=s.ssrInline,g=s.transformers,v=s.linters,m=r._tokenKey,p=[m].concat(ee(n)),b=ng,w=Yh("style",p,function(){var x=t(),N=bE(x,{hashId:i,hashPriority:u,layer:o,path:n.join("-"),transformers:g,linters:v}),A=K(N,2),O=A[0],I=A[1],R=ig(O),E=yE(p,R);if(b){var _={mark:si,prepend:"queue",attachTo:d},T=typeof a=="function"?a():a;T&&(_.csp={nonce:T});var F=li(R,E,_);F[uo]=ja,F.setAttribute(lc,m),Object.keys(I).forEach(function(k){li(ig(I[k]),"_effect-".concat(k),_)})}return[R,m,E]},function(x,N){var A=K(x,3),O=A[2];(N||l)&&ng&&Ha(O,{mark:si})}),S=K(w,3),$=S[0],y=S[1],C=S[2];return function(x){var N;if(!f||b||!c)N=h.createElement(wE,null);else{var A;N=h.createElement("style",Et({},(A={},X(A,lc,y),X(A,si,C),A),{dangerouslySetInnerHTML:{__html:$}}))}return h.createElement(h.Fragment,null,N,x)}}var It=function(){function e(t,r){or(this,e),X(this,"name",void 0),X(this,"style",void 0),X(this,"_keyframe",!0),this.name=t,this.style=r}return ar(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e}();function SE(e,t){if(e.length!==t.length)return!1;for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return r.forEach(function(s){if(!a)a=void 0;else{var l,c;a=(l=a)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(n=a)!==null&&n!==void 0&&n.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(r){var n;return(n=this.internalGet(r,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,n){var i=this;if(!this.has(r)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var d=K(c,2),f=d[1];return i.internalGet(u)[1]0,void 0),og+=1}return ar(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,i){return i(r,n)},void 0)}}]),e}(),hc=new fc;function ag(e){var t=Array.isArray(e)?e:[e];return hc.has(t)||hc.set(t,new CE(t)),hc.get(t)}function ci(e){return e.notSplit=!0,e}ci(["borderTop","borderBottom"]),ci(["borderTop"]),ci(["borderBottom"]),ci(["borderLeft","borderRight"]),ci(["borderLeft"]),ci(["borderRight"]);var xE=M.createContext({});const gc=xE;var In="RC_FORM_INTERNAL_HOOKS",Fe=function(){dr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},ui=h.createContext({getFieldValue:Fe,getFieldsValue:Fe,getFieldError:Fe,getFieldWarning:Fe,getFieldsError:Fe,isFieldsTouched:Fe,isFieldTouched:Fe,isFieldValidating:Fe,isFieldsValidating:Fe,resetFields:Fe,setFields:Fe,setFieldValue:Fe,setFieldsValue:Fe,validateFields:Fe,submit:Fe,getInternalHooks:function(){return Fe(),{dispatch:Fe,initEntityValue:Fe,registerField:Fe,useSubscribe:Fe,setInitialValues:Fe,destroyForm:Fe,setCallbacks:Fe,registerWatch:Fe,getFields:Fe,setValidateMessages:Fe,setPreserve:Fe,getInitialValue:Fe}}});function mc(e){return e==null?[]:Array.isArray(e)?e:[e]}function EE(e){return e&&!!e._init}function Gt(){Gt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(R,E,_){R[E]=_.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(R,E,_){return Object.defineProperty(R,E,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[E]}try{l({},"")}catch{l=function(_,T,F){return _[T]=F}}function c(R,E,_,T){var F=E&&E.prototype instanceof f?E:f,k=Object.create(F.prototype),D=new A(T||[]);return n(k,"_invoke",{value:y(R,_,D)}),k}function u(R,E,_){try{return{type:"normal",arg:R.call(E,_)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var d={};function f(){}function g(){}function v(){}var m={};l(m,o,function(){return this});var p=Object.getPrototypeOf,b=p&&p(p(O([])));b&&b!==t&&r.call(b,o)&&(m=b);var w=v.prototype=f.prototype=Object.create(m);function S(R){["next","throw","return"].forEach(function(E){l(R,E,function(_){return this._invoke(E,_)})})}function $(R,E){function _(F,k,D,j){var W=u(R[F],R,k);if(W.type!=="throw"){var U=W.arg,B=U.value;return B&&Le(B)=="object"&&r.call(B,"__await")?E.resolve(B.__await).then(function(V){_("next",V,D,j)},function(V){_("throw",V,D,j)}):E.resolve(B).then(function(V){U.value=V,D(U)},function(V){return _("throw",V,D,j)})}j(W.arg)}var T;n(this,"_invoke",{value:function(k,D){function j(){return new E(function(W,U){_(k,D,W,U)})}return T=T?T.then(j,j):j()}})}function y(R,E,_){var T="suspendedStart";return function(F,k){if(T==="executing")throw new Error("Generator is already running");if(T==="completed"){if(F==="throw")throw k;return I()}for(_.method=F,_.arg=k;;){var D=_.delegate;if(D){var j=C(D,_);if(j){if(j===d)continue;return j}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(T==="suspendedStart")throw T="completed",_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);T="executing";var W=u(R,E,_);if(W.type==="normal"){if(T=_.done?"completed":"suspendedYield",W.arg===d)continue;return{value:W.arg,done:_.done}}W.type==="throw"&&(T="completed",_.method="throw",_.arg=W.arg)}}}function C(R,E){var _=E.method,T=R.iterator[_];if(T===void 0)return E.delegate=null,_==="throw"&&R.iterator.return&&(E.method="return",E.arg=void 0,C(R,E),E.method==="throw")||_!=="return"&&(E.method="throw",E.arg=new TypeError("The iterator does not provide a '"+_+"' method")),d;var F=u(T,R.iterator,E.arg);if(F.type==="throw")return E.method="throw",E.arg=F.arg,E.delegate=null,d;var k=F.arg;return k?k.done?(E[R.resultName]=k.value,E.next=R.nextLoc,E.method!=="return"&&(E.method="next",E.arg=void 0),E.delegate=null,d):k:(E.method="throw",E.arg=new TypeError("iterator result is not an object"),E.delegate=null,d)}function x(R){var E={tryLoc:R[0]};1 in R&&(E.catchLoc=R[1]),2 in R&&(E.finallyLoc=R[2],E.afterLoc=R[3]),this.tryEntries.push(E)}function N(R){var E=R.completion||{};E.type="normal",delete E.arg,R.completion=E}function A(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(x,this),this.reset(!0)}function O(R){if(R){var E=R[o];if(E)return E.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,T=function F(){for(;++_=0;--F){var k=this.tryEntries[F],D=k.completion;if(k.tryLoc==="root")return T("end");if(k.tryLoc<=this.prev){var j=r.call(k,"catchLoc"),W=r.call(k,"finallyLoc");if(j&&W){if(this.prev=0;--T){var F=this.tryEntries[T];if(F.tryLoc<=this.prev&&r.call(F,"finallyLoc")&&this.prev=0;--_){var T=this.tryEntries[_];if(T.finallyLoc===E)return this.complete(T.completion,T.afterLoc),N(T),d}},catch:function(E){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.tryLoc===E){var F=T.completion;if(F.type==="throw"){var k=F.arg;N(T)}return k}}throw new Error("illegal catch attempt")},delegateYield:function(E,_,T){return this.delegate={iterator:O(E),resultName:_,nextLoc:T},this.method==="next"&&(this.arg=void 0),d}},e}function sg(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)}function di(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(l){sg(o,n,i,a,s,"next",l)}function s(l){sg(o,n,i,a,s,"throw",l)}a(void 0)})}}function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ba(e,t,r){return $E()?Ba=Reflect.construct.bind():Ba=function(i,o,a){var s=[null];s.push.apply(s,o);var l=Function.bind.apply(i,s),c=new l;return a&&ho(c,a.prototype),c},Ba.apply(null,arguments)}function OE(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function pc(e){var t=typeof Map=="function"?new Map:void 0;return pc=function(n){if(n===null||!OE(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Ba(n,arguments,vc(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ho(i,n)},pc(e)}var PE=/%[sdj%]/g,TE=function(){};typeof process<"u"&&process.env;function bc(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function qt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=o)return s;switch(s){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return s}});return a}return e}function ME(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function st(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||ME(t)&&typeof e=="string"&&!e)}function RE(e,t,r){var n=[],i=0,o=e.length;function a(s){n.push.apply(n,s||[]),i++,i===o&&r(n)}e.forEach(function(s){t(s,a)})}function lg(e,t,r){var n=0,i=e.length;function o(a){if(a&&a.length){r(a);return}var s=n;n=n+1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},go={integer:function(t){return go.number(t)&&parseInt(t,10)===t},float:function(t){return go.number(t)&&!go.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!go.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(hg.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(LE())},hex:function(t){return typeof t=="string"&&!!t.match(hg.hex)}},DE=function(t,r,n,i,o){if(t.required&&r===void 0){fg(t,r,n,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?go[s](r)||i.push(qt(o.messages.types[s],t.fullField,t.type)):s&&typeof r!==t.type&&i.push(qt(o.messages.types[s],t.fullField,t.type))},jE=function(t,r,n,i,o){var a=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=r,d=null,f=typeof r=="number",g=typeof r=="string",v=Array.isArray(r);if(f?d="number":g?d="string":v&&(d="array"),!d)return!1;v&&(u=r.length),g&&(u=r.replace(c,"_").length),a?u!==t.len&&i.push(qt(o.messages[d].len,t.fullField,t.len)):s&&!l&&ut.max?i.push(qt(o.messages[d].max,t.fullField,t.max)):s&&l&&(ut.max)&&i.push(qt(o.messages[d].range,t.fullField,t.min,t.max))},fi="enum",zE=function(t,r,n,i,o){t[fi]=Array.isArray(t[fi])?t[fi]:[],t[fi].indexOf(r)===-1&&i.push(qt(o.messages[fi],t.fullField,t[fi].join(", ")))},HE=function(t,r,n,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(qt(o.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(r)||i.push(qt(o.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},ye={required:fg,whitespace:FE,type:DE,range:jE,enum:zE,pattern:HE},WE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r,"string")&&!t.required)return n();ye.required(t,r,i,a,o,"string"),st(r,"string")||(ye.type(t,r,i,a,o),ye.range(t,r,i,a,o),ye.pattern(t,r,i,a,o),t.whitespace===!0&&ye.whitespace(t,r,i,a,o))}n(a)},BE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&ye.type(t,r,i,a,o)}n(a)},VE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&(ye.type(t,r,i,a,o),ye.range(t,r,i,a,o))}n(a)},UE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&ye.type(t,r,i,a,o)}n(a)},GE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),st(r)||ye.type(t,r,i,a,o)}n(a)},qE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&(ye.type(t,r,i,a,o),ye.range(t,r,i,a,o))}n(a)},KE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&(ye.type(t,r,i,a,o),ye.range(t,r,i,a,o))}n(a)},XE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r==null&&!t.required)return n();ye.required(t,r,i,a,o,"array"),r!=null&&(ye.type(t,r,i,a,o),ye.range(t,r,i,a,o))}n(a)},YE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&ye.type(t,r,i,a,o)}n(a)},ZE="enum",QE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o),r!==void 0&&ye[ZE](t,r,i,a,o)}n(a)},JE=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r,"string")&&!t.required)return n();ye.required(t,r,i,a,o),st(r,"string")||ye.pattern(t,r,i,a,o)}n(a)},e_=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r,"date")&&!t.required)return n();if(ye.required(t,r,i,a,o),!st(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),ye.type(t,l,i,a,o),l&&ye.range(t,l.getTime(),i,a,o)}}n(a)},t_=function(t,r,n,i,o){var a=[],s=Array.isArray(r)?"array":typeof r;ye.required(t,r,i,a,o,s),n(a)},yc=function(t,r,n,i,o){var a=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(st(r,a)&&!t.required)return n();ye.required(t,r,i,s,o,a),st(r,a)||ye.type(t,r,i,s,o)}n(s)},r_=function(t,r,n,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(r)&&!t.required)return n();ye.required(t,r,i,a,o)}n(a)},mo={string:WE,method:BE,number:VE,boolean:UE,regexp:GE,integer:qE,float:KE,array:XE,object:YE,enum:QE,pattern:JE,date:e_,url:yc,hex:yc,email:yc,required:t_,any:r_};function wc(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Sc=wc(),vo=function(){function e(r){this.rules=null,this._messages=Sc,this.define(r)}var t=e.prototype;return t.define=function(n){var i=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var a=n[o];i.rules[o]=Array.isArray(a)?a:[a]})},t.messages=function(n){return n&&(this._messages=dg(wc(),n)),this._messages},t.validate=function(n,i,o){var a=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var s=n,l=i,c=o;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function u(m){var p=[],b={};function w($){if(Array.isArray($)){var y;p=(y=p).concat.apply(y,$)}else p.push($)}for(var S=0;S3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!Kr(e,t.slice(0,-1))?e:mg(e,t,r,n)}function Ua(e){return Array.isArray(e)?o_(e):Le(e)==="object"&&e!==null?i_(e):e}function i_(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var r in e)t[r]=Ua(e[r]);return t}return e}function o_(e){return e.map(function(t){return Ua(t)})}function tt(e){return mc(e)}function vg(e,t){var r={};return t.forEach(function(n){var i=Kr(e,n);r=pn(r,n,i)}),r}function po(e,t){return e&&e.some(function(r){return yg(r,t)})}function pg(e){return Le(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function bg(e,t){var r=Array.isArray(e)?ee(e):z({},e);return t&&Object.keys(t).forEach(function(n){var i=r[n],o=t[n],a=pg(i)&&pg(o);r[n]=a?bg(i,o||{}):Ua(o)}),r}function bo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=n||r<0||r>=n)return e;var i=e[t],o=t-r;return o>0?[].concat(ee(e.slice(0,r)),[i],ee(e.slice(r,t)),ee(e.slice(t+1,n))):o<0?[].concat(ee(e.slice(0,t)),ee(e.slice(t+1,r+1)),[i],ee(e.slice(r+1,n))):e}var Sg=vo;function l_(e,t){return e.replace(/\$\{\w+\}/g,function(r){var n=r.slice(2,-1);return t[n]})}var Cg="CODE_LOGIC_ERROR";function Cc(e,t,r,n,i){return xc.apply(this,arguments)}function xc(){return xc=di(Gt().mark(function e(t,r,n,i,o){var a,s,l,c,u,d,f,g,v;return Gt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return a=z({},n),delete a.ruleIndex,Sg.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(b){return console.error(b),Promise.reject(Cg)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new Sg(X({},t,[a])),u=bo({},gg,i.validateMessages),c.messages(u),d=[],p.prev=10,p.next=13,Promise.resolve(c.validate(X({},t,r),z({},i)));case 13:p.next=18;break;case 15:p.prev=15,p.t0=p.catch(10),p.t0.errors&&(d=p.t0.errors.map(function(b,w){var S=b.message,$=S===Cg?u.default:S;return h.isValidElement($)?h.cloneElement($,{key:"error_".concat(w)}):$}));case 18:if(!(!d.length&&l)){p.next=23;break}return p.next=21,Promise.all(r.map(function(b,w){return Cc("".concat(t,".").concat(w),b,l,i,o)}));case 21:return f=p.sent,p.abrupt("return",f.reduce(function(b,w){return[].concat(ee(b),ee(w))},[]));case 23:return g=z(z({},n),{},{name:t,enum:(n.enum||[]).join(", ")},o),v=d.map(function(b){return typeof b=="string"?l_(b,g):b}),p.abrupt("return",v);case 26:case"end":return p.stop()}},e,null,[[10,15]])})),xc.apply(this,arguments)}function c_(e,t,r,n,i,o){var a=e.join("."),s=r.map(function(u,d){var f=u.validator,g=z(z({},u),{},{ruleIndex:d});return f&&(g.validator=function(v,m,p){var b=!1,w=function(){for(var y=arguments.length,C=new Array(y),x=0;x0&&arguments[0]!==void 0?arguments[0]:sr;if(i.validatePromise===d){var y;i.validatePromise=null;var C=[],x=[];(y=$.forEach)===null||y===void 0||y.call($,function(N){var A=N.rule.warningOnly,O=N.errors,I=O===void 0?sr:O;A?x.push.apply(x,ee(I)):C.push.apply(C,ee(I))}),i.errors=C,i.warnings=x,i.triggerMetaEvent(),i.reRender()}}),S});return i.validatePromise=d,i.dirty=!0,i.errors=sr,i.warnings=sr,i.triggerMetaEvent(),i.reRender(),d},i.isFieldValidating=function(){return!!i.validatePromise},i.isFieldTouched=function(){return i.touched},i.isFieldDirty=function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var l=i.props.fieldContext,c=l.getInternalHooks(In),u=c.getInitialValue;return u(i.getNamePath())!==void 0},i.getErrors=function(){return i.errors},i.getWarnings=function(){return i.warnings},i.isListField=function(){return i.props.isListField},i.isList=function(){return i.props.isList},i.isPreserve=function(){return i.props.preserve},i.getMeta=function(){i.prevValidating=i.isFieldValidating();var l={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return l},i.getOnlyChild=function(l){if(typeof l=="function"){var c=i.getMeta();return z(z({},i.getOnlyChild(l(i.getControlled(),c,i.props.fieldContext))),{},{isFunction:!0})}var u=oi(l);return u.length!==1||!h.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}},i.getValue=function(l){var c=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return Kr(l||c(!0),u)},i.getControlled=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.props,u=c.trigger,d=c.validateTrigger,f=c.getValueFromEvent,g=c.normalize,v=c.valuePropName,m=c.getValueProps,p=c.fieldContext,b=d!==void 0?d:p.validateTrigger,w=i.getNamePath(),S=p.getInternalHooks,$=p.getFieldsValue,y=S(In),C=y.dispatch,x=i.getValue(),N=m||function(R){return X({},v,R)},A=l[u],O=z(z({},l),N(x));O[u]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var R,E=arguments.length,_=new Array(E),T=0;T=0&&O<=I.length?(u.keys=[].concat(ee(u.keys.slice(0,O)),[u.id],ee(u.keys.slice(O))),S([].concat(ee(I.slice(0,O)),[A],ee(I.slice(O))))):(u.keys=[].concat(ee(u.keys),[u.id]),S([].concat(ee(I),[A]))),u.id+=1},remove:function(A){var O=y(),I=new Set(Array.isArray(A)?A:[A]);I.size<=0||(u.keys=u.keys.filter(function(R,E){return!I.has(E)}),S(O.filter(function(R,E){return!I.has(E)})))},move:function(A,O){if(A!==O){var I=y();A<0||A>=I.length||O<0||O>=I.length||(u.keys=wg(u.keys,A,O),S(wg(I,A,O)))}}},x=w||[];return Array.isArray(x)||(x=[]),i(x.map(function(N,A){var O=u.keys[A];return O===void 0&&(u.keys[A]=u.id,O=u.keys[A],u.id+=1),{name:A,key:O,isListField:!0}}),C,p)})))};function m_(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(i,o){e.forEach(function(a,s){a.catch(function(l){return t=!0,l}).then(function(l){r-=1,n[s]=l,!(r>0)&&(t&&o(n),i(n))})})}):Promise.resolve([])}var _g="__@field_split__";function Oc(e){return e.map(function(t){return"".concat(Le(t),":").concat(t)}).join(_g)}var hi=function(){function e(){or(this,e),this.kvs=new Map}return ar(e,[{key:"set",value:function(r,n){this.kvs.set(Oc(r),n)}},{key:"get",value:function(r){return this.kvs.get(Oc(r))}},{key:"update",value:function(r,n){var i=this.get(r),o=n(i);o?this.set(r,o):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(Oc(r))}},{key:"map",value:function(r){return ee(this.kvs.entries()).map(function(n){var i=K(n,2),o=i[0],a=i[1],s=o.split(_g);return r({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=K(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var i=n.key,o=n.value;return r[i.join(".")]=o,null}),r}}]),e}(),v_=["name"],p_=ar(function e(t){var r=this;or(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}},this.getInternalHooks=function(n){return n===In?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(dr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(n){r.subscribable=n},this.prevWithoutPreserves=null,this.setInitialValues=function(n,i){if(r.initialValues=n||{},i){var o,a=bo({},n,r.store);(o=r.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;a=pn(a,l,Kr(n,l))}),r.prevWithoutPreserves=null,r.updateStore(a)}},this.destroyForm=function(){var n=new hi;r.getFieldEntities(!0).forEach(function(i){r.isMergedPreserve(i.isPreserve())||n.set(i.getNamePath(),!0)}),r.prevWithoutPreserves=n},this.getInitialValue=function(n){var i=Kr(r.initialValues,n);return n.length?Ua(i):i},this.setCallbacks=function(n){r.callbacks=n},this.setValidateMessages=function(n){r.validateMessages=n},this.setPreserve=function(n){r.preserve=n},this.watchList=[],this.registerWatch=function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(i){return i!==n})}},this.notifyWatch=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var i=r.getFieldsValue(),o=r.getFieldsValue(!0);r.watchList.forEach(function(a){a(i,o,n)})}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(n){r.store=n},this.getFieldEntities=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(i){return i.getNamePath().length}):r.fieldEntities},this.getFieldsMap=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new hi;return r.getFieldEntities(n).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i},this.getFieldEntitiesForNamePathList=function(n){if(!n)return r.getFieldEntities(!0);var i=r.getFieldsMap(!0);return n.map(function(o){var a=tt(o);return i.get(a)||{INVALIDATE_NAME_PATH:tt(o)}})},this.getFieldsValue=function(n,i){if(r.warningUnhooked(),n===!0&&!i)return r.store;var o=r.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null),a=[];return o.forEach(function(s){var l,c="INVALIDATE_NAME_PATH"in s?s.INVALIDATE_NAME_PATH:s.getNamePath();if(!(!n&&(!((l=s.isListField)===null||l===void 0)&&l.call(s))))if(!i)a.push(c);else{var u="getMeta"in s?s.getMeta():null;i(u)&&a.push(c)}}),vg(r.store,a.map(tt))},this.getFieldValue=function(n){r.warningUnhooked();var i=tt(n);return Kr(r.store,i)},this.getFieldsError=function(n){r.warningUnhooked();var i=r.getFieldEntitiesForNamePathList(n);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:tt(n[a]),errors:[],warnings:[]}})},this.getFieldError=function(n){r.warningUnhooked();var i=tt(n),o=r.getFieldsError([i])[0];return o.errors},this.getFieldWarning=function(n){r.warningUnhooked();var i=tt(n),o=r.getFieldsError([i])[0];return o.warnings},this.isFieldsTouched=function(){r.warningUnhooked();for(var n=arguments.length,i=new Array(n),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i=new hi,o=r.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=i.get(u)||new Set;d.add({entity:l,value:c}),i.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),g=r.getInitialValue(f);if(g!==void 0)dr(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var v=i.get(f);if(v&&v.size>1)dr(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(v){var m=r.getFieldValue(f);(!n.skipExist||m===void 0)&&r.updateStore(pn(r.store,f,ee(v)[0].value))}}}})},s;n.entities?s=n.entities:n.namePathList?(s=[],n.namePathList.forEach(function(l){var c=i.get(l);if(c){var u;(u=s).push.apply(u,ee(ee(c).map(function(d){return d.entity})))}})):s=o,a(s)},this.resetFields=function(n){r.warningUnhooked();var i=r.store;if(!n){r.updateStore(bo({},r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(i,null,{type:"reset"}),r.notifyWatch();return}var o=n.map(tt);o.forEach(function(a){var s=r.getInitialValue(a);r.updateStore(pn(r.store,a,s))}),r.resetWithFieldInitialValue({namePathList:o}),r.notifyObservers(i,o,{type:"reset"}),r.notifyWatch(o)},this.setFields=function(n){r.warningUnhooked();var i=r.store,o=[];n.forEach(function(a){var s=a.name,l=Vt(a,v_),c=tt(s);o.push(c),"value"in l&&r.updateStore(pn(r.store,c,l.value)),r.notifyObservers(i,[c],{type:"setField",data:a})}),r.notifyWatch(o)},this.getFields=function(){var n=r.getFieldEntities(!0),i=n.map(function(o){var a=o.getNamePath(),s=o.getMeta(),l=z(z({},s),{},{name:a,value:r.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return i},this.initEntityValue=function(n){var i=n.props.initialValue;if(i!==void 0){var o=n.getNamePath(),a=Kr(r.store,o);a===void 0&&r.updateStore(pn(r.store,o,i))}},this.isMergedPreserve=function(n){var i=n!==void 0?n:r.preserve;return i??!0},this.registerField=function(n){r.fieldEntities.push(n);var i=n.getNamePath();if(r.notifyWatch([i]),n.props.initialValue!==void 0){var o=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(o,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(d){return d!==n}),!r.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:r.getInitialValue(i);if(i.length&&r.getFieldValue(i)!==c&&r.fieldEntities.every(function(d){return!yg(d.getNamePath(),i)})){var u=r.store;r.updateStore(pn(u,i,c,!0)),r.notifyObservers(u,[i],{type:"remove"}),r.triggerDependenciesUpdate(u,i)}}r.notifyWatch([i])}},this.dispatch=function(n){switch(n.type){case"updateValue":{var i=n.namePath,o=n.value;r.updateValue(i,o);break}case"validateField":{var a=n.namePath,s=n.triggerName;r.validateFields([a],{triggerName:s});break}}},this.notifyObservers=function(n,i,o){if(r.subscribable){var a=z(z({},o),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(n,i,a)})}else r.forceRootUpdate()},this.triggerDependenciesUpdate=function(n,i){var o=r.getDependencyChildrenFields(i);return o.length&&r.validateFields(o),r.notifyObservers(n,o,{type:"dependenciesUpdate",relatedFields:[i].concat(ee(o))}),o},this.updateValue=function(n,i){var o=tt(n),a=r.store;r.updateStore(pn(r.store,o,i)),r.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),r.notifyWatch([o]);var s=r.triggerDependenciesUpdate(a,o),l=r.callbacks.onValuesChange;if(l){var c=vg(r.store,[o]);l(c,r.getFieldsValue())}r.triggerOnFieldsChange([o].concat(ee(s)))},this.setFieldsValue=function(n){r.warningUnhooked();var i=r.store;if(n){var o=bo(r.store,n);r.updateStore(o)}r.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()},this.setFieldValue=function(n,i){r.setFields([{name:n,value:i}])},this.getDependencyChildrenFields=function(n){var i=new Set,o=[],a=new hi;r.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=tt(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(o.push(f),l(f))}})};return s(n),o},this.triggerOnFieldsChange=function(n,i){var o=r.callbacks.onFieldsChange;if(o){var a=r.getFields();if(i){var s=new hi;i.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return po(n,u)});o(l,a)}},this.validateFields=function(n,i){r.warningUnhooked();var o=!!n,a=o?n.map(tt):[],s=[];r.getFieldEntities(!0).forEach(function(u){if(o||a.push(u.getNamePath()),i!=null&&i.recursive&&o){var d=u.getNamePath();d.every(function(v,m){return n[m]===v||n[m]===void 0})&&a.push(d)}if(!(!u.props.rules||!u.props.rules.length)){var f=u.getNamePath();if(!o||po(a,f)){var g=u.validateRules(z({validateMessages:z(z({},gg),r.validateMessages)},i));s.push(g.then(function(){return{name:f,errors:[],warnings:[]}}).catch(function(v){var m,p=[],b=[];return(m=v.forEach)===null||m===void 0||m.call(v,function(w){var S=w.rule.warningOnly,$=w.errors;S?b.push.apply(b,ee($)):p.push.apply(p,ee($))}),p.length?Promise.reject({name:f,errors:p,warnings:b}):{name:f,errors:p,warnings:b}}))}}});var l=m_(s);r.lastValidatePromise=l,l.catch(function(u){return u}).then(function(u){var d=u.map(function(f){var g=f.name;return g});r.notifyObservers(r.store,d,{type:"validateFinish"}),r.triggerOnFieldsChange(d,u)});var c=l.then(function(){return r.lastValidatePromise===l?Promise.resolve(r.getFieldsValue(a)):Promise.reject([])}).catch(function(u){var d=u.filter(function(f){return f&&f.errors.length});return Promise.reject({values:r.getFieldsValue(a),errorFields:d,outOfDate:r.lastValidatePromise!==l})});return c.catch(function(u){return u}),r.triggerOnFieldsChange(a),c},this.submit=function(){r.warningUnhooked(),r.validateFields().then(function(n){var i=r.callbacks.onFinish;if(i)try{i(n)}catch(o){console.error(o)}}).catch(function(n){var i=r.callbacks.onFinishFailed;i&&i(n)})},this.forceRootUpdate=t});function $g(e){var t=h.useRef(),r=h.useState({}),n=K(r,2),i=n[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},a=new p_(o);t.current=a.getForm()}return[t.current]}var Pc=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Og=function(t){var r=t.validateMessages,n=t.onFormChange,i=t.onFormFinish,o=t.children,a=h.useContext(Pc),s=h.useRef({});return h.createElement(Pc.Provider,{value:z(z({},a),{},{validateMessages:z(z({},a.validateMessages),r),triggerFormChange:function(c,u){n&&n(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){i&&i(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=z(z({},s.current),{},X({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=z({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},o)},b_=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],y_=function(t,r){var n=t.name,i=t.initialValues,o=t.fields,a=t.form,s=t.preserve,l=t.children,c=t.component,u=c===void 0?"form":c,d=t.validateMessages,f=t.validateTrigger,g=f===void 0?"onChange":f,v=t.onValuesChange,m=t.onFieldsChange,p=t.onFinish,b=t.onFinishFailed,w=Vt(t,b_),S=h.useContext(Pc),$=$g(a),y=K($,1),C=y[0],x=C.getInternalHooks(In),N=x.useSubscribe,A=x.setInitialValues,O=x.setCallbacks,I=x.setValidateMessages,R=x.setPreserve,E=x.destroyForm;h.useImperativeHandle(r,function(){return C}),h.useEffect(function(){return S.registerForm(n,C),function(){S.unregisterForm(n)}},[S,C,n]),I(z(z({},S.validateMessages),d)),O({onValuesChange:v,onFieldsChange:function(B){if(S.triggerFormChange(n,B),m){for(var V=arguments.length,re=new Array(V>1?V-1:0),H=1;H{const{locale:t={},children:r,_ANT_MARK__:n}=e;h.useEffect(()=>(Rg(t&&t.Modal),()=>{Rg()}),[t]);const i=h.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return h.createElement(Ag.Provider,{value:i},r)},$_="5.4.2",Ga=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function wt(e,t){O_(e)&&(e="100%");var r=P_(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function qa(e){return Math.min(1,Math.max(0,e))}function O_(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function P_(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ng(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ka(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ln(e){return e.length===1?"0"+e:String(e)}function T_(e,t,r){return{r:wt(e,255)*255,g:wt(t,255)*255,b:wt(r,255)*255}}function kg(e,t,r){e=wt(e,255),t=wt(t,255),r=wt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=0,s=(n+i)/2;if(n===i)a=0,o=0;else{var l=n-i;switch(a=s>.5?l/(2-n-i):l/(n+i),n){case e:o=(t-r)/l+(t1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function M_(e,t,r){var n,i,o;if(e=wt(e,360),t=wt(t,100),r=wt(r,100),t===0)i=r,o=r,n=r;else{var a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;n=Rc(s,a,e+1/3),i=Rc(s,a,e),o=Rc(s,a,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Ac(e,t,r){e=wt(e,255),t=wt(t,255),r=wt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=n,s=n-i,l=n===0?0:s/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/s+(t>16,g:(e&65280)>>8,b:e&255}}var kc={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function gi(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=L_(e)),typeof e=="object"&&(Xr(e.r)&&Xr(e.g)&&Xr(e.b)?(t=T_(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Xr(e.h)&&Xr(e.s)&&Xr(e.v)?(n=Ka(e.s),i=Ka(e.v),t=R_(e.h,n,i),a=!0,s="hsv"):Xr(e.h)&&Xr(e.s)&&Xr(e.l)&&(n=Ka(e.s),o=Ka(e.l),t=M_(e.h,n,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=Ng(r),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var I_="[-\\+]?\\d+%?",F_="[-\\+]?\\d*\\.\\d+%?",bn="(?:".concat(F_,")|(?:").concat(I_,")"),Ic="[\\s|\\(]+(".concat(bn,")[,|\\s]+(").concat(bn,")[,|\\s]+(").concat(bn,")\\s*\\)?"),Fc="[\\s|\\(]+(".concat(bn,")[,|\\s]+(").concat(bn,")[,|\\s]+(").concat(bn,")[,|\\s]+(").concat(bn,")\\s*\\)?"),fr={CSS_UNIT:new RegExp(bn),rgb:new RegExp("rgb"+Ic),rgba:new RegExp("rgba"+Fc),hsl:new RegExp("hsl"+Ic),hsla:new RegExp("hsla"+Fc),hsv:new RegExp("hsv"+Ic),hsva:new RegExp("hsva"+Fc),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function L_(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(kc[e])e=kc[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=fr.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=fr.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=fr.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=fr.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=fr.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=fr.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=fr.hex8.exec(e),r?{r:Yt(r[1]),g:Yt(r[2]),b:Yt(r[3]),a:Ig(r[4]),format:t?"name":"hex8"}:(r=fr.hex6.exec(e),r?{r:Yt(r[1]),g:Yt(r[2]),b:Yt(r[3]),format:t?"name":"hex"}:(r=fr.hex4.exec(e),r?{r:Yt(r[1]+r[1]),g:Yt(r[2]+r[2]),b:Yt(r[3]+r[3]),a:Ig(r[4]+r[4]),format:t?"name":"hex8"}:(r=fr.hex3.exec(e),r?{r:Yt(r[1]+r[1]),g:Yt(r[2]+r[2]),b:Yt(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function Xr(e){return!!fr.CSS_UNIT.exec(String(e))}var _t=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=k_(t)),this.originalInput=t;var i=gi(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Ng(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Ac(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Ac(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=kg(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=kg(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Nc(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),A_(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(wt(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(wt(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Nc(this.r,this.g,this.b,!1),r=0,n=Object.entries(kc);r=0,o=!r&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=qa(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=qa(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=qa(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=qa(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new e(a)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(new e({h:n,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],o=360/t,a=1;a=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Xa*t:Math.round(e.h)+Xa*t:n=r?Math.round(e.h)+Xa*t:Math.round(e.h)-Xa*t,n<0?n+=360:n>=360&&(n-=360),n}function Hg(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-Fg*t:t===Dg?n=e.s+Fg:n=e.s+D_*t,n>1&&(n=1),r&&t===Lg&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function Wg(e,t,r){var n;return r?n=e.v+j_*t:n=e.v-z_*t,n>1&&(n=1),Number(n.toFixed(2))}function Yr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=gi(e),i=Lg;i>0;i-=1){var o=jg(n),a=Ya(gi({h:zg(o,i,!0),s:Hg(o,i,!0),v:Wg(o,i,!0)}));r.push(a)}r.push(Ya(n));for(var s=1;s<=Dg;s+=1){var l=jg(n),c=Ya(gi({h:zg(l,s),s:Hg(l,s),v:Wg(l,s)}));r.push(c)}return t.theme==="dark"?H_.map(function(u){var d=u.index,f=u.opacity,g=Ya(W_(gi(t.backgroundColor||"#141414"),gi(r[d]),f*100));return g}):r}var Lc={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Dc={},jc={};Object.keys(Lc).forEach(function(e){Dc[e]=Yr(Lc[e]),Dc[e].primary=Dc[e][5],jc[e]=Yr(Lc[e],{theme:"dark",backgroundColor:"#141414"}),jc[e].primary=jc[e][5]});const Bg=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function B_(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const zc={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Za=Object.assign(Object.assign({},zc),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function Vg(e,t){let{generateColorPalettes:r,generateNeutralColorPalettes:n}=t;const{colorSuccess:i,colorWarning:o,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=r(l),f=r(i),g=r(o),v=r(a),m=r(s),p=n(c,u);return Object.assign(Object.assign({},p),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorBgMask:new _t("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const V_=e=>{let t=e,r=e,n=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e>16?16:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:i}};function U_(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:i+1},V_(n))}const Zr=(e,t)=>new _t(e).setAlpha(t).toRgbString(),wo=(e,t)=>new _t(e).darken(t).toHexString(),G_=e=>{const t=Yr(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},q_=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Zr(n,.88),colorTextSecondary:Zr(n,.65),colorTextTertiary:Zr(n,.45),colorTextQuaternary:Zr(n,.25),colorFill:Zr(n,.15),colorFillSecondary:Zr(n,.06),colorFillTertiary:Zr(n,.04),colorFillQuaternary:Zr(n,.02),colorBgLayout:wo(r,4),colorBgContainer:wo(r,0),colorBgElevated:wo(r,0),colorBgSpotlight:Zr(n,.85),colorBorder:wo(r,15),colorBorderSecondary:wo(r,6)}};function K_(e){const t=new Array(10).fill(null).map((r,n)=>{const i=n-1,o=e*Math.pow(2.71828,i/5),a=n>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return t[1]=e,t.map(r=>{const n=r+8;return{size:r,lineHeight:n/r}})}const Ug=e=>{const t=K_(e),r=t.map(i=>i.size),n=t.map(i=>i.lineHeight);return{fontSizeSM:r[0],fontSize:r[1],fontSizeLG:r[2],fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:n[1],lineHeightLG:n[2],lineHeightSM:n[0],lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function Qa(e){const t=Object.keys(zc).map(r=>{const n=Yr(e[r]);return new Array(10).fill(1).reduce((i,o,a)=>(i[`${r}-${a+1}`]=n[a],i[`${r}${a+1}`]=n[a],i),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),Vg(e,{generateColorPalettes:G_,generateNeutralColorPalettes:q_})),Ug(e.fontSize)),B_(e)),Bg(e)),U_(e))}function Hc(e){return e>=0&&e<=255}function Ja(e,t){const{r,g:n,b:i,a:o}=new _t(e).toRgb();if(o<1)return e;const{r:a,g:s,b:l}=new _t(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((r-a*(1-c))/c),d=Math.round((n-s*(1-c))/c),f=Math.round((i-l*(1-c))/c);if(Hc(u)&&Hc(d)&&Hc(f))return new _t({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new _t({r,g:n,b:i,a:1}).toRgbString()}var X_=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{delete n[f]});const i=Object.assign(Object.assign({},r),n),o=480,a=576,s=768,l=992,c=1200,u=1600;return Object.assign(Object.assign(Object.assign({},i),{colorLink:i.colorInfoText,colorLinkHover:i.colorInfoHover,colorLinkActive:i.colorInfoActive,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Ja(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Ja(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Ja(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*4,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Ja(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowSecondary:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTertiary:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` 0 1px 2px -2px ${new _t("rgba(0, 0, 0, 0.16)").toRgbString()}, 0 3px 6px 0 ${new _t("rgba(0, 0, 0, 0.12)").toRgbString()}, 0 5px 12px 4px ${new _t("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerLeft:` 6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerUp:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerDown:` 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}const Gg="anticon",Z_=(e,t)=>t||(e?`ant-${e}`:"ant"),ot=h.createContext({getPrefixCls:Z_,iconPrefixCls:Gg}),Q_=(e,t,r,n,i)=>{const o=e/2,a=0,s=o,l=r*1/Math.sqrt(2),c=o-r*(1-1/Math.sqrt(2)),u=o-t*(1/Math.sqrt(2)),d=r*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),f=2*o-u,g=d,v=2*o-l,m=c,p=2*o-a,b=s,w=o*Math.sqrt(2)+r*(Math.sqrt(2)-2);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:n,clipPath:`path('M ${a} ${s} A ${r} ${r} 0 0 0 ${l} ${c} L ${u} ${d} A ${t} ${t} 0 0 1 ${f} ${g} L ${v} ${m} A ${r} ${r} 0 0 0 ${p} ${b} Z')`,content:'""'},"&::after":{content:'""',position:"absolute",width:w,height:w,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:i,zIndex:0,background:"transparent"}}},hr=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),qg=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),J_=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),e$=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},[`&:active, &:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),t$=(e,t)=>{const{fontFamily:r,fontSize:n}=e,i=`[class^="${t}"], [class*=" ${t}"]`;return{[i]:{fontFamily:r,fontSize:n,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[i]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},es=e=>({outline:`${e.lineWidthFocus}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),r$=e=>({"&:focus-visible":Object.assign({},es(e))});function Qr(e,t,r,n){return i=>{const[o,a,s]=rs(),{getPrefixCls:l,iconPrefixCls:c,csp:u}=M.useContext(ot),d=l(),f={theme:o,token:a,hashId:s,nonce:()=>u==null?void 0:u.nonce};return dc(Object.assign(Object.assign({},f),{path:["Shared",d]}),()=>[{"&":e$(a)}]),[dc(Object.assign(Object.assign({},f),{path:[e,i,c]}),()=>{const{token:g,flush:v}=i$(a),m=typeof r=="function"?r(g):r,p=Object.assign(Object.assign({},m),a[e]),b=`.${i}`,w=Ft(g,{componentCls:b,prefixCls:i,iconCls:`.${c}`,antCls:`.${d}`},p),S=t(w,{hashId:s,prefixCls:i,rootPrefixCls:d,iconPrefixCls:c,overrideComponentToken:a[e]});return v(e,p),[(n==null?void 0:n.resetStyle)===!1?null:t$(a,i),S]}),s]}}const Kg=typeof CSSINJS_STATISTIC<"u";let Wc=!0;function Ft(){for(var e=arguments.length,t=new Array(e),r=0;r{Object.keys(i).forEach(a=>{Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:()=>i[a]})})}),Wc=!0,n}function n$(){}function i$(e){let t,r=e,n=n$;return Kg&&(t=new Set,r=new Proxy(e,{get(i,o){return Wc&&t.add(o),i[o]}}),n=(i,o)=>{Array.from(t)}),{token:r,keys:t,flush:n}}function Xg(e,t){return Ga.reduce((r,n)=>{const i=e[`${n}1`],o=e[`${n}3`],a=e[`${n}6`],s=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const o$=ag(Qa),ts={token:Za,hashed:!0},Yg=M.createContext(ts);function rs(){const{token:e,hashed:t,theme:r,components:n}=M.useContext(Yg),i=`${$_}-${t||""}`,o=r||o$,[a,s]=hE(o,[Za,e],{salt:i,override:Object.assign({override:e},n),formatToken:Y_});return[o,a,t?s:""]}const a$=`-ant-${Date.now()}-${Math.random()}`;function s$(e,t){const r={},n=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},i=(a,s)=>{const l=new _t(a),c=Yr(l.toRgbString());r[`${s}-color`]=n(l),r[`${s}-color-disabled`]=c[1],r[`${s}-color-hover`]=c[4],r[`${s}-color-active`]=c[6],r[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),r[`${s}-color-deprecated-bg`]=c[0],r[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){i(t.primaryColor,"primary");const a=new _t(t.primaryColor),s=Yr(a.toRgbString());s.forEach((c,u)=>{r[`primary-${u+1}`]=c}),r["primary-color-deprecated-l-35"]=n(a,c=>c.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,c=>c.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,c=>c.tint(20)),r["primary-color-deprecated-t-50"]=n(a,c=>c.tint(50)),r["primary-color-deprecated-f-12"]=n(a,c=>c.setAlpha(c.getAlpha()*.12));const l=new _t(s[0]);r["primary-color-active-deprecated-f-30"]=n(l,c=>c.setAlpha(c.getAlpha()*.3)),r["primary-color-active-deprecated-d-02"]=n(l,c=>c.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),` :root { ${Object.keys(r).map(a=>`--${e}-${a}: ${r[a]};`).join(` `)} } `.trim()}function l$(e,t){const r=s$(e,t);Ut()&&li(r,`${a$}-dynamic-theme`)}const Bc=h.createContext(!1),c$=e=>{let{children:t,disabled:r}=e;const n=h.useContext(Bc);return h.createElement(Bc.Provider,{value:r??n},t)},So=Bc,Vc=h.createContext(void 0),u$=e=>{let{children:t,size:r}=e;const n=h.useContext(Vc);return h.createElement(Vc.Provider,{value:r||n},t)},mi=Vc;function d$(){const e=M.useContext(So),t=M.useContext(mi);return{componentDisabled:e,componentSize:t}}function f$(e,t){const r=e||{},n=r.inherit===!1||!t?ts:t;return Jl(()=>{if(!e)return t;const o=Object.assign({},n.components);return Object.keys(e.components||{}).forEach(a=>{o[a]=Object.assign(Object.assign({},o[a]),e.components[a])}),Object.assign(Object.assign(Object.assign({},n),r),{token:Object.assign(Object.assign({},n.token),r.token),components:o})},[r,n],(o,a)=>o.some((s,l)=>{const c=a[l];return!Gh(s,c,!0)}))}const h$=(e,t)=>{const[r,n]=rs();return dc({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},qg()),{[`.${e} .${e}-icon`]:{display:"block"}})}])};var g$=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{let{prefixCls:t,iconPrefixCls:r,theme:n}=e;t!==void 0&&(Zg=t),n&&l$(p$(),n)},y$=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,form:i,locale:o,componentSize:a,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,legacyLocale:d,parentContext:f,iconPrefixCls:g,theme:v,componentDisabled:m}=e,p=h.useCallback((E,_)=>{const{prefixCls:T}=e;if(_)return _;const F=T||f.getPrefixCls("");return E?`${F}-${E}`:F},[f.getPrefixCls,e.prefixCls]),b=g||f.iconPrefixCls||Gg,w=b!==f.iconPrefixCls,S=r||f.csp,$=h$(b,S),y=f$(v,f.theme),C={csp:S,autoInsertSpaceInButton:n,locale:o||d,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,getPrefixCls:p,iconPrefixCls:b,theme:y},x=Object.assign({},f);Object.keys(C).forEach(E=>{C[E]!==void 0&&(x[E]=C[E])}),m$.forEach(E=>{const _=e[E];_&&(x[E]=_)});const N=Jl(()=>x,x,(E,_)=>{const T=Object.keys(E),F=Object.keys(_);return T.length!==F.length||T.some(k=>E[k]!==_[k])}),A=h.useMemo(()=>({prefixCls:b,csp:S}),[b,S]);let O=w?$(t):t;const I=h.useMemo(()=>{var E,_,T;return bo({},((E=Tc.Form)===null||E===void 0?void 0:E.defaultValidateMessages)||{},((T=(_=N.locale)===null||_===void 0?void 0:_.Form)===null||T===void 0?void 0:T.defaultValidateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[N,i==null?void 0:i.validateMessages]);Object.keys(I).length>0&&(O=h.createElement(Og,{validateMessages:I},t)),o&&(O=h.createElement(__,{locale:o,_ANT_MARK__:E_},O)),(b||S)&&(O=h.createElement(gc.Provider,{value:A},O)),a&&(O=h.createElement(u$,{size:a},O));const R=h.useMemo(()=>{const E=y||{},{algorithm:_,token:T}=E,F=g$(E,["algorithm","token"]),k=_&&(!Array.isArray(_)||_.length>0)?ag(_):void 0;return Object.assign(Object.assign({},F),{theme:k,token:Object.assign(Object.assign({},Za),T)})},[y]);return v&&(O=h.createElement(Yg.Provider,{value:R},O)),m!==void 0&&(O=h.createElement(c$,{disabled:m},O)),h.createElement(ot.Provider,{value:N},O)},vi=e=>{const t=h.useContext(ot),r=h.useContext(Ag);return h.createElement(y$,Object.assign({parentContext:t,legacyLocale:r},e))};vi.ConfigContext=ot,vi.SizeContext=mi,vi.config=b$,vi.useConfig=d$,Object.defineProperty(vi,"SizeContext",{get:()=>mi});const Qg=vi;var Jg=function(t){return+setTimeout(t,16)},em=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(Jg=function(t){return window.requestAnimationFrame(t)},em=function(t){return window.cancelAnimationFrame(t)});var tm=0,Uc=new Map;function rm(e){Uc.delete(e)}var Jr=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;tm+=1;var n=tm;function i(o){if(o===0)rm(n),t();else{var a=Jg(function(){i(o-1)});Uc.set(n,a)}}return i(r),n};Jr.cancel=function(e){var t=Uc.get(e);return rm(t),em(t)};function w$(e,t){dr(e,"[@ant-design/icons] ".concat(t))}function nm(e){return Le(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(Le(e.icon)==="object"||typeof e.icon=="function")}function im(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:t[r]=n}return t},{})}function Gc(e,t,r){return r?M.createElement(e.tag,z(z({key:t},im(e.attrs)),r),(e.children||[]).map(function(n,i){return Gc(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):M.createElement(e.tag,z({key:t},im(e.attrs)),(e.children||[]).map(function(n,i){return Gc(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function om(e){return Yr(e)[0]}function am(e){return e?Array.isArray(e)?e:[e]:[]}var S$=` .anticon { display: inline-block; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .anticon > * { line-height: 1; } .anticon svg { display: inline-block; } .anticon::before { display: none; } .anticon .anticon-icon { display: block; } .anticon[tabindex] { cursor: pointer; } .anticon-spin::before, .anticon-spin { display: inline-block; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; } @-webkit-keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `,C$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:S$,r=M.useContext(gc),n=r.csp,i=r.prefixCls,o=t;i&&(o=o.replace(/anticon/g,i)),M.useEffect(function(){li(o,"@ant-design-icons",{prepend:!0,csp:n})},[])},x$=["icon","className","onClick","style","primaryColor","secondaryColor"],Co={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function E$(e){var t=e.primaryColor,r=e.secondaryColor;Co.primaryColor=t,Co.secondaryColor=r||om(t),Co.calculated=!!r}function _$(){return z({},Co)}var ns=function(t){var r=t.icon,n=t.className,i=t.onClick,o=t.style,a=t.primaryColor,s=t.secondaryColor,l=Vt(t,x$),c=Co;if(a&&(c={primaryColor:a,secondaryColor:s||om(a)}),C$(),w$(nm(r),"icon should be icon definiton, but got ".concat(r)),!nm(r))return null;var u=r;return u&&typeof u.icon=="function"&&(u=z(z({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Gc(u.icon,"svg-".concat(u.name),z({className:n,onClick:i,style:o,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};ns.displayName="IconReact",ns.getTwoToneColors=_$,ns.setTwoToneColors=E$;const qc=ns;function sm(e){var t=am(e),r=K(t,2),n=r[0],i=r[1];return qc.setTwoToneColors({primaryColor:n,secondaryColor:i})}function $$(){var e=qc.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var O$=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];sm("#1890ff");var is=h.forwardRef(function(e,t){var r,n=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Vt(e,O$),d=h.useContext(gc),f=d.prefixCls,g=f===void 0?"anticon":f,v=d.rootClassName,m=q(v,g,(r={},X(r,"".concat(g,"-").concat(i.name),!!i.name),X(r,"".concat(g,"-spin"),!!o||i.name==="loading"),r),n),p=s;p===void 0&&l&&(p=-1);var b=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,w=am(c),S=K(w,2),$=S[0],y=S[1];return h.createElement("span",z(z({role:"img","aria-label":i.name},u),{},{ref:t,tabIndex:p,onClick:l,className:m}),h.createElement(qc,{icon:i,primaryColor:$,secondaryColor:y,style:b}))});is.displayName="AntdIcon",is.getTwoToneColor=$$,is.setTwoToneColor=sm;const os=is;var P$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const T$=P$;var lm=function(t,r){return h.createElement(os,z(z({},t),{},{ref:r,icon:T$}))};lm.displayName="CloseOutlined";const M$=h.forwardRef(lm);function cm(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function R$(e,t){var r={animationend:cm("Animation","AnimationEnd"),transitionend:cm("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var A$=R$(Ut(),typeof window<"u"?window:{}),um={};if(Ut()){var N$=document.createElement("div");um=N$.style}var as={};function dm(e){if(as[e])return as[e];var t=A$[e];if(t)for(var r=Object.keys(t),n=r.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Jr(function(){i<=1?n({isCanceled:function(){return o!==e.current}}):r(n,i-1)});e.current=o}return h.useEffect(function(){return function(){t()}},[]),[r,t]};var ym=Ut()?M.useLayoutEffect:M.useEffect,wm=[en,bi,yi,Kc],Sm=!1,I$=!0;function Cm(e){return e===yi||e===Kc}const F$=function(e,t){var r=wi(bm),n=K(r,2),i=n[0],o=n[1],a=k$(),s=K(a,2),l=s[0],c=s[1];function u(){o(en,!0)}return ym(function(){if(i!==bm&&i!==Kc){var d=wm.indexOf(i),f=wm[d+1],g=t(i);g===Sm?o(f,!0):l(function(v){function m(){v.isCanceled()||o(f,!0)}g===!0?m():Promise.resolve(g).then(m)})}},[e,i]),h.useEffect(function(){return function(){c()}},[]),[u,i]},L$=function(e){var t=M.useRef(),r=M.useRef(e);r.current=e;var n=h.useCallback(function(a){r.current(a)},[]);function i(a){a&&(a.removeEventListener(vm,n),a.removeEventListener(mm,n))}function o(a){t.current&&t.current!==a&&i(t.current),a&&a!==t.current&&(a.addEventListener(vm,n),a.addEventListener(mm,n),t.current=a)}return h.useEffect(function(){return function(){i(t.current)}},[]),[o,i]};function D$(e,t,r,n){var i=n.motionEnter,o=i===void 0?!0:i,a=n.motionAppear,s=a===void 0?!0:a,l=n.motionLeave,c=l===void 0?!0:l,u=n.motionDeadline,d=n.motionLeaveImmediately,f=n.onAppearPrepare,g=n.onEnterPrepare,v=n.onLeavePrepare,m=n.onAppearStart,p=n.onEnterStart,b=n.onLeaveStart,w=n.onAppearActive,S=n.onEnterActive,$=n.onLeaveActive,y=n.onAppearEnd,C=n.onEnterEnd,x=n.onLeaveEnd,N=n.onVisibleChanged,A=wi(),O=K(A,2),I=O[0],R=O[1],E=wi(pi),_=K(E,2),T=_[0],F=_[1],k=wi(null),D=K(k,2),j=D[0],W=D[1],U=M.useRef(!1),B=M.useRef(null);function V(){return r()}var re=M.useRef(!1);function H(oe){var Q=V();if(!(oe&&!oe.deadline&&oe.target!==Q)){var ae=re.current,Se;T===ss&&ae?Se=y==null?void 0:y(Q,oe):T===ls&&ae?Se=C==null?void 0:C(Q,oe):T===cs&&ae&&(Se=x==null?void 0:x(Q,oe)),T!==pi&&ae&&Se!==!1&&(F(pi,!0),W(null,!0))}}var le=L$(H),ie=K(le,1),ve=ie[0],te=h.useMemo(function(){var oe,Q,ae;switch(T){case ss:return oe={},X(oe,en,f),X(oe,bi,m),X(oe,yi,w),oe;case ls:return Q={},X(Q,en,g),X(Q,bi,p),X(Q,yi,S),Q;case cs:return ae={},X(ae,en,v),X(ae,bi,b),X(ae,yi,$),ae;default:return{}}},[T]),be=F$(T,function(oe){if(oe===en){var Q=te[en];return Q?Q(V()):Sm}if(pe in te){var ae;W(((ae=te[pe])===null||ae===void 0?void 0:ae.call(te,V(),null))||null)}return pe===yi&&(ve(V()),u>0&&(clearTimeout(B.current),B.current=setTimeout(function(){H({deadline:!0})},u))),I$}),Pe=K(be,2),De=Pe[0],pe=Pe[1],Ee=Cm(pe);re.current=Ee,ym(function(){R(t);var oe=U.current;if(U.current=!0,!!e){var Q;!oe&&t&&s&&(Q=ss),oe&&t&&o&&(Q=ls),(oe&&!t&&c||!oe&&d&&!t&&c)&&(Q=cs),Q&&(F(Q),De())}},[t]),M.useEffect(function(){(T===ss&&!s||T===ls&&!o||T===cs&&!c)&&F(pi)},[s,o,c]),M.useEffect(function(){return function(){U.current=!1,clearTimeout(B.current)}},[]);var Me=h.useRef(!1);M.useEffect(function(){I&&(Me.current=!0),I!==void 0&&T===pi&&((Me.current||I)&&(N==null||N(I)),Me.current=!0)},[I,T]);var We=j;return te[en]&&pe===bi&&(We=z({transition:"none"},We)),[T,pe,We,I??t]}var j$=function(e){Ra(r,e);var t=ka(r);function r(){return or(this,r),t.apply(this,arguments)}return ar(r,[{key:"render",value:function(){return this.props.children}}]),r}(h.Component);function z$(e){var t=e;Le(e)==="object"&&(t=e.transitionSupport);function r(i){return!!(i.motionName&&t)}var n=h.forwardRef(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,d=i.children,f=i.motionName,g=i.leavedClassName,v=i.eventProps,m=r(i),p=M.useRef(),b=M.useRef();function w(){try{return p.current instanceof HTMLElement?p.current:tc(b.current)}catch{return null}}var S=D$(m,s,w,i),$=K(S,4),y=$[0],C=$[1],x=$[2],N=$[3],A=h.useRef(N);N&&(A.current=!0);var O=h.useCallback(function(k){p.current=k,ec(o,k)},[o]),I,R=z(z({},v),{},{visible:s});if(!d)I=null;else if(y===pi||!r(i))N?I=d(z({},R),O):!c&&A.current&&g?I=d(z(z({},R),{},{className:g}),O):u||!c&&!g?I=d(z(z({},R),{},{style:{display:"none"}}),O):I=null;else{var E,_;C===en?_="prepare":Cm(C)?_="active":C===bi&&(_="start"),I=d(z(z({},R),{},{className:q(pm(f,y),(E={},X(E,pm(f,"".concat(y,"-").concat(_)),_),X(E,f,typeof f=="string"),E)),style:x}),O)}if(h.isValidElement(I)&&co(I)){var T=I,F=T.ref;F||(I=h.cloneElement(I,{ref:O}))}return h.createElement(j$,{ref:b},I)});return n.displayName="CSSMotion",n}const xo=z$(gm);var Xc="add",Yc="keep",Zc="remove",Qc="removed";function H$(e){var t;return e&&Le(e)==="object"&&"key"in e?t=e:t={key:e},z(z({},t),{},{key:String(t.key)})}function Jc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(H$)}function W$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,i=t.length,o=Jc(e),a=Jc(t);o.forEach(function(c){for(var u=!1,d=n;d1});return l.forEach(function(c){r=r.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Zc}),r.forEach(function(u){u.key===c&&(u.status=Yc)})}),r}var B$=["component","children","onVisibleChanged","onAllRemoved"],V$=["status"],U$=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function G$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xo,r=function(n){Ra(o,n);var i=ka(o);function o(){var a;or(this,o);for(var s=arguments.length,l=new Array(s),c=0;c((r.startsWith("data-")||r.startsWith("aria-")||r==="role")&&!r.startsWith("data-__")&&(t[r]=e[r]),t),{})}const{isValidElement:eu}=h;function xm(e){return e&&eu(e)&&e.type===h.Fragment}function K$(e,t,r){return eu(e)?h.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t}function Si(e,t){return K$(e,e,t)}function tn(e){var t=h.useRef();t.current=e;var r=h.useCallback(function(){for(var n,i=arguments.length,o=new Array(i),a=0;a=Y.F1&&r<=Y.F12)return!1;switch(r){case Y.ALT:case Y.CAPS_LOCK:case Y.CONTEXT_MENU:case Y.CTRL:case Y.DOWN:case Y.END:case Y.ESC:case Y.HOME:case Y.INSERT:case Y.LEFT:case Y.MAC_FF_META:case Y.META:case Y.NUMLOCK:case Y.NUM_CENTER:case Y.PAGE_DOWN:case Y.PAGE_UP:case Y.PAUSE:case Y.PRINT_SCREEN:case Y.RIGHT:case Y.SHIFT:case Y.UP:case Y.WIN_KEY:case Y.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=Y.ZERO&&t<=Y.NINE||t>=Y.NUM_ZERO&&t<=Y.NUM_MULTIPLY||t>=Y.A&&t<=Y.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case Y.SPACE:case Y.QUESTION_MARK:case Y.NUM_PLUS:case Y.NUM_MINUS:case Y.NUM_PERIOD:case Y.NUM_DIVISION:case Y.SEMICOLON:case Y.DASH:case Y.EQUALS:case Y.COMMA:case Y.PERIOD:case Y.SLASH:case Y.APOSTROPHE:case Y.SINGLE_QUOTE:case Y.OPEN_SQUARE_BRACKET:case Y.BACKSLASH:case Y.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},X$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const Y$=X$;var Em=function(t,r){return h.createElement(os,z(z({},t),{},{ref:r,icon:Y$}))};Em.displayName="LoadingOutlined";const _m=h.forwardRef(Em);var Eo=z({},$b),Z$=Eo.version,Q$=Eo.render,J$=Eo.unmountComponentAtNode,us;try{var eO=Number((Z$||"").split(".")[0]);eO>=18&&(us=Eo.createRoot)}catch{}function $m(e){var t=Eo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&Le(t)==="object"&&(t.usingClientEntryPoint=e)}var ds="__rc_react_root__";function tO(e,t){$m(!0);var r=t[ds]||us(t);$m(!1),r.render(e),t[ds]=r}function rO(e,t){Q$(e,t)}function nO(e,t){if(us){tO(e,t);return}rO(e,t)}function iO(e){return tu.apply(this,arguments)}function tu(){return tu=di(Gt().mark(function e(t){return Gt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var i;(i=t[ds])===null||i===void 0||i.unmount(),delete t[ds]}));case 1:case"end":return n.stop()}},e)})),tu.apply(this,arguments)}function oO(e){J$(e)}function aO(e){return ru.apply(this,arguments)}function ru(){return ru=di(Gt().mark(function e(t){return Gt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(us===void 0){n.next=2;break}return n.abrupt("return",iO(t));case 2:oO(t);case 3:case"end":return n.stop()}},e)})),ru.apply(this,arguments)}const Om=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1},sO=e=>{const{componentCls:t,colorPrimary:r}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},lO=Qr("Wave",e=>[sO(e)]);function cO(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function nu(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&cO(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function uO(e){const{borderTopColor:t,borderColor:r,backgroundColor:n}=getComputedStyle(e);return nu(t)?t:nu(r)?r:nu(n)?n:null}function iu(e){return Number.isNaN(e)?0:e}const dO=e=>{const{className:t,target:r}=e,n=h.useRef(null),[i,o]=h.useState(null),[a,s]=h.useState([]),[l,c]=h.useState(0),[u,d]=h.useState(0),[f,g]=h.useState(0),[v,m]=h.useState(0),[p,b]=h.useState(!1),w={left:l,top:u,width:f,height:v,borderRadius:a.map($=>`${$}px`).join(" ")};i&&(w["--wave-color"]=i);function S(){const $=getComputedStyle(r);o(uO(r));const y=$.position==="static",{borderLeftWidth:C,borderTopWidth:x}=$;c(y?r.offsetLeft:iu(-parseFloat(C))),d(y?r.offsetTop:iu(-parseFloat(x))),g(r.offsetWidth),m(r.offsetHeight);const{borderTopLeftRadius:N,borderTopRightRadius:A,borderBottomLeftRadius:O,borderBottomRightRadius:I}=$;s([N,A,I,O].map(R=>iu(parseFloat(R))))}return h.useEffect(()=>{if(r){const $=Jr(()=>{S(),b(!0)});let y;return typeof ResizeObserver<"u"&&(y=new ResizeObserver(S),y.observe(r)),()=>{Jr.cancel($),y==null||y.disconnect()}}},[]),p?h.createElement(xo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:($,y)=>{var C;if(y.deadline||y.propertyName==="opacity"){const x=(C=n.current)===null||C===void 0?void 0:C.parentElement;aO(x).then(()=>{var N;(N=x.parentElement)===null||N===void 0||N.removeChild(x)})}return!1}},$=>{let{className:y}=$;return h.createElement("div",{ref:n,className:q(t,y),style:w})}):null};function fO(e,t){const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),nO(h.createElement(dO,{target:e,className:t}),r)}function hO(e,t){function r(){const n=e.current;fO(n,t)}return r}const Pm=e=>{const{children:t,disabled:r}=e,{getPrefixCls:n}=M.useContext(ot),i=M.useRef(null),o=n("wave"),[,a]=lO(o),s=hO(i,q(o,a));if(M.useEffect(()=>{const c=i.current;if(!c||c.nodeType!==1||r)return;const u=d=>{d.target.tagName==="INPUT"||!Om(d.target)||!c.getAttribute||c.getAttribute("disabled")||c.disabled||c.className.includes("disabled")||c.className.includes("-leave")||s()};return c.addEventListener("click",u,!0),()=>{c.removeEventListener("click",u,!0)}},[r]),!M.isValidElement(t))return t??null;const l=co(t)?Nn(t.ref,i):i;return Si(t,{ref:l})},gO=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},mO=e=>{const{componentCls:t}=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"}}}},Tm=Qr("Space",e=>[mO(e),gO(e)],()=>({}),{resetStyle:!1});var Mm=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const r=h.useContext(fs),n=h.useMemo(()=>{if(!r)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=r,s=i==="vertical"?"-vertical-":"-";return q({[`${e}-compact${s}item`]:!0,[`${e}-compact${s}first-item`]:o,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:n}},Am=e=>{let{children:t}=e;return h.createElement(fs.Provider,{value:null},t)},vO=e=>{var{children:t}=e,r=Mm(e,["children"]);return h.createElement(fs.Provider,{value:r},t)},pO=e=>{const{getPrefixCls:t,direction:r}=h.useContext(ot),{size:n="middle",direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:c}=e,u=Mm(e,["size","direction","block","prefixCls","className","rootClassName","children"]),d=t("space-compact",a),[f,g]=Tm(d),v=q(d,g,{[`${d}-rtl`]:r==="rtl",[`${d}-block`]:o,[`${d}-vertical`]:i==="vertical"},s,l),m=h.useContext(fs),p=oi(c),b=h.useMemo(()=>p.map((w,S)=>{const $=w&&w.key||`${d}-item-${S}`;return h.createElement(vO,{key:$,compactSize:n,compactDirection:i,isFirstItem:S===0&&(!m||(m==null?void 0:m.isFirstItem)),isLastItem:S===p.length-1&&(!m||(m==null?void 0:m.isLastItem))},w)}),[n,p,m]);return p.length===0?null:f(h.createElement("div",Object.assign({className:v},u),b))},ou=()=>({width:0,opacity:0,transform:"scale(0)"}),au=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),bO=e=>{let{prefixCls:t,loading:r,existIcon:n}=e;const i=!!r;return n?M.createElement("span",{className:`${t}-loading-icon`},M.createElement(_m,null)):M.createElement(xo,{visible:i,motionName:`${t}-loading-icon-motion`,removeOnLeave:!0,onAppearStart:ou,onAppearActive:au,onEnterStart:ou,onEnterActive:au,onLeaveStart:au,onLeaveActive:ou},(o,a)=>{let{className:s,style:l}=o;return M.createElement("span",{className:`${t}-loading-icon`,style:l,ref:a},M.createElement(_m,{className:s}))})};var yO=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{getPrefixCls:t,direction:r}=h.useContext(ot),{prefixCls:n,size:i,className:o}=e,a=yO(e,["prefixCls","size","className"]),s=t("btn-group",n),[,,l]=rs();let c="";switch(i){case"large":c="lg";break;case"small":c="sm";break}const u=q(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:r==="rtl"},o,l);return h.createElement(Nm.Provider,{value:i},h.createElement("div",Object.assign({},a,{className:u})))},km=/^[\u4e00-\u9fa5]{2}$/,su=km.test.bind(km);function SO(e){return typeof e=="string"}function lu(e){return e==="text"||e==="link"}function CO(e,t){if(e==null)return;const r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&SO(e.type)&&su(e.props.children)?Si(e,{children:e.props.children.split("").join(r)}):typeof e=="string"?su(e)?M.createElement("span",null,e.split("").join(r)):M.createElement("span",null,e):xm(e)?M.createElement("span",null,e):e}function xO(e,t){let r=!1;const n=[];return M.Children.forEach(e,i=>{const o=typeof i,a=o==="string"||o==="number";if(r&&a){const s=n.length-1,l=n[s];n[s]=`${l}${i}`}else n.push(i);r=a}),M.Children.map(n,i=>CO(i,t))}const Im=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),EO=e=>{const{componentCls:t,fontSize:r,lineWidth:n,colorPrimaryHover:i,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-n,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,[`&:hover, &:focus, &:active`]:{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},Im(`${t}-primary`,i),Im(`${t}-danger`,o)]}};function _O(e,t,r){const{focusElCls:n,focus:i,borderElCls:o}=r,a=o?"> *":"",s=["hover",i?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},n?{[`&${n}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function $O(e,t,r){const{borderElCls:n}=r,i=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Fm(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},_O(e,n,t)),$O(r,n,t))}}function OO(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function PO(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function TO(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},OO(e,t)),PO(e.componentCls,t))}}const MO=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${r} + span, > span + ${r}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},r$(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},rn=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),RO=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),AO=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),cu=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),hs=(e,t,r,n,i,o,a)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:t||void 0,backgroundColor:"transparent",borderColor:r||void 0,boxShadow:"none"},rn(Object.assign({backgroundColor:"transparent"},o),Object.assign({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),uu=e=>({"&:disabled":Object.assign({},cu(e))}),Lm=e=>Object.assign({},uu(e)),gs=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),Dm=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Lm(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),rn({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),hs(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({color:e.colorError,borderColor:e.colorError},rn({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),hs(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),uu(e))}),NO=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Lm(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),rn({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),hs(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},rn({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),hs(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),uu(e))}),kO=e=>Object.assign(Object.assign({},Dm(e)),{borderStyle:"dashed"}),IO=e=>Object.assign(Object.assign(Object.assign({color:e.colorLink},rn({color:e.colorLinkHover},{color:e.colorLinkActive})),gs(e)),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign({color:e.colorError},rn({color:e.colorErrorHover},{color:e.colorErrorActive})),gs(e))}),FO=e=>Object.assign(Object.assign(Object.assign({},rn({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),gs(e)),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign({color:e.colorError},gs(e)),rn({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),LO=e=>Object.assign(Object.assign({},cu(e)),{[`&${e.componentCls}:hover`]:Object.assign({},cu(e))}),DO=e=>{const{componentCls:t}=e;return{[`${t}-default`]:Dm(e),[`${t}-primary`]:NO(e),[`${t}-dashed`]:kO(e),[`${t}-link`]:IO(e),[`${t}-text`]:FO(e),[`${t}-disabled`]:LO(e)}},du=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:r,iconCls:n,controlHeight:i,fontSize:o,lineHeight:a,lineWidth:s,borderRadius:l,buttonPaddingHorizontal:c}=e,u=Math.max(0,(i-o*a)/2-s),d=c-s,f=`${r}-icon-only`;return[{[`${r}${t}`]:{fontSize:o,height:i,padding:`${u}px ${d}px`,borderRadius:l,[`&${f}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${r}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${r}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${r}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${f}) ${r}-loading-icon > ${n}`]:{marginInlineEnd:e.marginXS}}},{[`${r}${r}-circle${t}`]:RO(e)},{[`${r}${r}-round${t}`]:AO(e)}]},jO=e=>du(e),zO=e=>{const t=Ft(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return du(t,`${e.componentCls}-sm`)},HO=e=>{const t=Ft(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return du(t,`${e.componentCls}-lg`)},WO=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},BO=Qr("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:r}=e,n=Ft(e,{colorOutlineDefault:t,buttonPaddingHorizontal:r});return[MO(n),zO(n),jO(n),HO(n),WO(n),DO(n),EO(n),Fm(e),TO(e)]});var VO=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{loading:r=!1,prefixCls:n,type:i="default",danger:o,shape:a="default",size:s,disabled:l,className:c,rootClassName:u,children:d,icon:f,ghost:g=!1,block:v=!1,htmlType:m="button"}=e,p=VO(e,["loading","prefixCls","type","danger","shape","size","disabled","className","rootClassName","children","icon","ghost","block","htmlType"]),{getPrefixCls:b,autoInsertSpaceInButton:w,direction:S}=h.useContext(ot),$=b("btn",n),[y,C]=BO($),x=h.useContext(mi),N=h.useContext(So),A=l??N,O=h.useContext(Nm),I=h.useMemo(()=>UO(r),[r]),[R,E]=h.useState(I.loading),[_,T]=h.useState(!1),F=t||h.createRef(),k=()=>h.Children.count(d)===1&&!f&&!lu(i),D=()=>{if(!F||!F.current||w===!1)return;const pe=F.current.textContent;k()&&su(pe)?_||T(!0):_&&T(!1)};h.useEffect(()=>{let pe=null;I.delay>0?pe=window.setTimeout(()=>{pe=null,E(!0)},I.delay):E(I.loading);function Ee(){pe&&(window.clearTimeout(pe),pe=null)}return Ee},[I]),h.useEffect(D,[F]);const j=pe=>{const{onClick:Ee}=e;if(R||A){pe.preventDefault();return}Ee==null||Ee(pe)},W=w!==!1,{compactSize:U,compactItemClassnames:B}=Rm($,S),V={large:"lg",small:"sm",middle:void 0},re=U||O||s||x,H=re&&V[re]||"",le=R?"loading":f,ie=Vh(p,["navigate"]),ve=ie.href!==void 0&&A,te=q($,C,{[`${$}-${a}`]:a!=="default"&&a,[`${$}-${i}`]:i,[`${$}-${H}`]:H,[`${$}-icon-only`]:!d&&d!==0&&!!le,[`${$}-background-ghost`]:g&&!lu(i),[`${$}-loading`]:R,[`${$}-two-chinese-chars`]:_&&W&&!R,[`${$}-block`]:v,[`${$}-dangerous`]:!!o,[`${$}-rtl`]:S==="rtl",[`${$}-disabled`]:ve},B,c,u),be=f&&!R?f:h.createElement(bO,{existIcon:!!f,prefixCls:$,loading:!!R}),Pe=d||d===0?xO(d,k()&&W):null;if(ie.href!==void 0)return y(h.createElement("a",Object.assign({},ie,{className:te,onClick:j,ref:F}),be,Pe));let De=h.createElement("button",Object.assign({},p,{type:m,className:te,onClick:j,disabled:A,ref:F}),be,Pe);return lu(i)||(De=h.createElement(Pm,{disabled:!!R},De)),y(De)},fu=h.forwardRef(GO);fu.Group=wO,fu.__ANT_BUTTON=!0;const Ci=fu,qO=(e,t,r)=>r!==void 0?r:`${e}-${t}`;var jm=h.createContext(null),Mt=Ut()?h.useLayoutEffect:h.useEffect,_o=function(t,r){var n=h.useRef(!0);Mt(function(){if(!n.current)return t()},r),Mt(function(){return n.current=!1,function(){n.current=!0}},[])},zm=[];function KO(e,t){var r=h.useState(function(){if(!Ut())return null;var v=document.createElement("div");return v}),n=K(r,1),i=n[0],o=h.useRef(!1),a=h.useContext(jm),s=h.useState(zm),l=K(s,2),c=l[0],u=l[1],d=a||(o.current?void 0:function(v){u(function(m){var p=[v].concat(ee(m));return p})});function f(){i.parentElement||document.body.appendChild(i),o.current=!0}function g(){var v;(v=i.parentElement)===null||v===void 0||v.removeChild(i),o.current=!1}return Mt(function(){return e?a?a(f):f():g(),g},[e]),Mt(function(){c.length&&(c.forEach(function(v){return v()}),u(zm))},[c]),[i,d]}var hu;function XO(e){if(typeof document>"u")return 0;if(e||hu===void 0){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var r=document.createElement("div"),n=r.style;n.position="absolute",n.top="0",n.left="0",n.pointerEvents="none",n.visibility="hidden",n.width="200px",n.height="150px",n.overflow="hidden",r.appendChild(t),document.body.appendChild(r);var i=t.offsetWidth;r.style.overflow="scroll";var o=t.offsetWidth;i===o&&(o=r.clientWidth),document.body.removeChild(r),hu=i-o}return hu}function YO(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ZO="rc-util-locker-".concat(Date.now()),Hm=0;function QO(e){var t=!!e,r=h.useState(function(){return Hm+=1,"".concat(ZO,"_").concat(Hm)}),n=K(r,1),i=n[0];Mt(function(){if(t){var o=XO(),a=YO();li(` html body { overflow-y: hidden; `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",` }`),i)}else Ha(i);return function(){Ha(i)}},[t,i])}var Wm=!1;function JO(e){return typeof e=="boolean"&&(Wm=e),Wm}var Bm=function(t){return t===!1?!1:!Ut()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Vm=h.forwardRef(function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,a=o===void 0?!0:o,s=e.children,l=h.useState(r),c=K(l,2),u=c[0],d=c[1],f=u||r;h.useEffect(function(){(a||r)&&d(r)},[r,a]);var g=h.useState(function(){return Bm(i)}),v=K(g,2),m=v[0],p=v[1];h.useEffect(function(){var I=Bm(i);p(I??null)});var b=KO(f&&!m),w=K(b,2),S=w[0],$=w[1],y=m??S;QO(n&&r&&Ut()&&(y===S||y===document.body));var C=null;if(s&&co(s)&&t){var x=s;C=x.ref}var N=Fh(C,t);if(!f||!Ut()||m===void 0)return null;var A=y===!1||JO(),O=s;return t&&(O=h.cloneElement(s,{ref:N})),h.createElement(jm.Provider,{value:$},A?O:$e.createPortal(O,y))});function eP(){var e=z({},h);return e.useId}var Um=0;function tP(e){var t=h.useState("ssr-id"),r=K(t,2),n=r[0],i=r[1],o=eP(),a=o==null?void 0:o();return h.useEffect(function(){if(!o){var s=Um;Um+=1,i("rc_unique_".concat(s))}},[]),e||a||n}const $o=h.createContext({}),Gm=e=>{let{children:t,status:r,override:n}=e;const i=M.useContext($o),o=M.useMemo(()=>{const a=Object.assign({},i);return n&&delete a.isFormItemInput,r&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[r,n,i]);return h.createElement($o.Provider,{value:o},t)},rP=()=>Ut()&&window.document.documentElement;let ms;const nP=()=>{if(!rP())return!1;if(ms!==void 0)return ms;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),ms=e.scrollHeight===1,document.body.removeChild(e),ms},iP=e=>({animationDuration:e,animationFillMode:"both"}),oP=e=>({animationDuration:e,animationFillMode:"both"}),aP=function(e,t,r,n){const o=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` ${o}${e}-enter, ${o}${e}-appear `]:Object.assign(Object.assign({},iP(n)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},oP(n)),{animationPlayState:"paused"}),[` ${o}${e}-enter${e}-enter-active, ${o}${e}-appear${e}-appear-active `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},sP=new It("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),lP=new It("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),qm=new It("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Km=new It("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),cP=new It("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),uP=new It("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),dP=new It("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),fP=new It("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),hP=new It("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),gP=new It("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),mP=new It("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),vP=new It("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),pP={zoom:{inKeyframes:sP,outKeyframes:lP},"zoom-big":{inKeyframes:qm,outKeyframes:Km},"zoom-big-fast":{inKeyframes:qm,outKeyframes:Km},"zoom-left":{inKeyframes:dP,outKeyframes:fP},"zoom-right":{inKeyframes:hP,outKeyframes:gP},"zoom-up":{inKeyframes:cP,outKeyframes:uP},"zoom-down":{inKeyframes:mP,outKeyframes:vP}},bP=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=pP[t];return[aP(n,i,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` ${n}-enter, ${n}-appear `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};function gu(e){return e!==void 0}function vs(e,t){var r=t||{},n=r.defaultValue,i=r.value,o=r.onChange,a=r.postState,s=wi(function(){return gu(i)?i:gu(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),l=K(s,2),c=l[0],u=l[1],d=i!==void 0?i:c,f=a?a(d):d,g=tn(o),v=wi([d]),m=K(v,2),p=m[0],b=m[1];_o(function(){var S=p[0];c!==S&&g(c,S)},[p]),_o(function(){gu(i)||u(i)},[i]);var w=tn(function(S,$){u(S,$),b([d],$)});return[f,w]}const Xm=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var Ym=h.createContext(null);function Zm(e){return e?Array.isArray(e)?e:[e]:[]}function yP(e,t,r,n){return h.useMemo(function(){var i=Zm(r??t),o=Zm(n??t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,r,n])}function wP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function SP(e,t,r,n){for(var i=r.points,o=Object.keys(e),a=0;a0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function xi(e,t){var r=t[0],n=t[1],i,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?i=e.x:n==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function yn(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,i){return i===t?r[n]||"c":n}).join("")}function xP(e,t,r,n,i,o,a){var s=h.useState({ready:!1,offsetX:0,offsetY:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),l=K(s,2),c=l[0],u=l[1],d=h.useRef(0),f=h.useMemo(function(){return t?mu(t):[]},[t]),g=h.useRef({}),v=function(){g.current={}};e||v();var m=tn(function(){if(t&&r&&e){let hn=function(Ks,Yn){var Xs=O.x+Ks,Ys=O.y+Yn,Zs=Xs+B,Ed=Ys+U,_d=Math.max(Xs,H.left),$d=Math.max(Ys,H.top),Qs=Math.min(Zs,H.right),Od=Math.min(Ed,H.bottom);return Math.max(0,(Qs-_d)*(Od-$d))},gn=function(){bt=O.y+Ve,Tt=bt+U,zr=O.x+Je,xr=zr+B};var w=t,S=w.style.left,$=w.style.top,y=w.ownerDocument,C=Oo(w),x=z(z({},i[n]),o);w.style.left="0",w.style.top="0";var N;if(Array.isArray(r))N={x:r[0],y:r[1],width:0,height:0};else{var A=r.getBoundingClientRect();N={x:A.x,y:A.y,width:A.width,height:A.height}}var O=w.getBoundingClientRect(),I=C.getComputedStyle(w),R=I.width,E=I.height,_=y.documentElement,T=_.clientWidth,F=_.clientHeight,k=_.scrollWidth,D=_.scrollHeight,j=_.scrollTop,W=_.scrollLeft,U=O.height,B=O.width,V=N.height,re=N.width,H=x.htmlRegion==="scroll"?{left:-W,top:-j,right:k-W,bottom:D-j}:{left:0,top:0,right:T,bottom:F};H=CP(H,f),w.style.left=S,w.style.top=$;var le=ps(Math.round(B/parseFloat(R)*1e3)/1e3),ie=ps(Math.round(U/parseFloat(E)*1e3)/1e3);if(le===0||ie===0||Ia(r)&&!Om(r))return;var ve=x.offset,te=x.targetOffset,be=ve||[],Pe=K(be,2),De=Pe[0],pe=De===void 0?0:De,Ee=Pe[1],Me=Ee===void 0?0:Ee,We=te||[],oe=K(We,2),Q=oe[0],ae=Q===void 0?0:Q,Se=oe[1],vt=Se===void 0?0:Se;N.x+=ae,N.y+=vt;var nt=x.points||[],pt=K(nt,2),zt=pt[0],me=pt[1],Be=Jm(me),je=Jm(zt),dt=xi(N,Be),er=xi(O,je),Re=z({},x),Je=dt.x-er.x+pe,Ve=dt.y-er.y+Me,Pt=hn(Je,Ve),ft=xi(N,["t","l"]),tr=xi(O,["t","l"]),En=xi(N,["b","r"]),cn=xi(O,["b","r"]),ur=x.overflow||{},ce=ur.adjustX,se=ur.adjustY,xe=ur.shiftX,he=ur.shiftY,Ue=function(Yn){return typeof Yn=="boolean"?Yn:Yn>=0},bt,Tt,zr,xr;gn();var Kn=Ue(se),rr=je[0]===Be[0];if(Kn&&je[0]==="t"&&(Tt>H.bottom||g.current.bt)){var un=Ve;rr?un-=U-V:un=ft.y-cn.y-Me,hn(Je,un)>=Pt?(g.current.bt=!0,Ve=un,Re.points=[yn(je,0),yn(Be,0)]):g.current.bt=!1}if(Kn&&je[0]==="b"&&(bt=Pt?(g.current.tb=!0,Ve=Ht,Re.points=[yn(je,0),yn(Be,0)]):g.current.tb=!1}var Xn=Ue(ce),_n=je[1]===Be[1];if(Xn&&je[1]==="l"&&(xr>H.right||g.current.rl)){var Hr=Je;_n?Hr-=B-re:Hr=ft.x-cn.x-pe,hn(Hr,Ve)>=Pt?(g.current.rl=!0,Je=Hr,Re.points=[yn(je,1),yn(Be,1)]):g.current.rl=!1}if(Xn&&je[1]==="r"&&(zr=Pt?(g.current.lr=!0,Je=dn,Re.points=[yn(je,1),yn(Be,1)]):g.current.lr=!1}gn();var Wr=xe===!0?0:xe;typeof Wr=="number"&&(zrH.right&&(Je-=xr-H.right,N.x>H.right-Wr&&(Je+=N.x-H.right+Wr)));var Ae=he===!0?0:he;typeof Ae=="number"&&(btH.bottom&&(Ve-=Tt-H.bottom,N.y>H.bottom-Ae&&(Ve+=N.y-H.bottom+Ae)));var we=O.x+Je,de=we+B,Ke=O.y+Ve,ze=Ke+U,Er=N.x,nr=Er+re,ir=N.y,Ct=ir+V,Hi=Math.max(we,Er),Wi=Math.min(de,nr),fn=(Hi+Wi)/2,Zo=fn-we,Sd=Math.max(Ke,ir),Cd=Math.min(ze,Ct),xd=(Sd+Cd)/2,Bi=xd-Ke;a==null||a(t,Re),u({ready:!0,offsetX:Je/le,offsetY:Ve/ie,arrowX:Zo/le,arrowY:Bi/ie,scaleX:le,scaleY:ie,align:Re})}}),p=function(){d.current+=1;var S=d.current;Promise.resolve().then(function(){d.current===S&&m()})},b=function(){u(function(S){return z(z({},S),{},{ready:!1})})};return Mt(b,[n]),Mt(function(){e||b()},[e]),[c.ready,c.offsetX,c.offsetY,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,p]}function EP(e,t,r,n){Mt(function(){if(e&&t&&r){let u=function(){n()};var i=t,o=r,a=mu(i),s=mu(o),l=Oo(o),c=new Set([l].concat(ee(a),ee(s)));return c.forEach(function(d){d.addEventListener("scroll",u,{passive:!0})}),l.addEventListener("resize",u,{passive:!0}),n(),function(){c.forEach(function(d){d.removeEventListener("scroll",u),l.removeEventListener("resize",u)})}}},[e,t,r])}function _P(e){var t=e.prefixCls,r=e.align,n=e.arrowX,i=n===void 0?0:n,o=e.arrowY,a=o===void 0?0:o,s=h.useRef();if(!r||!r.points)return null;var l={position:"absolute"};if(r.autoArrow!==!1){var c=r.points[0],u=r.points[1],d=c[0],f=c[1],g=u[0],v=u[1];d===g||!["t","b"].includes(d)?l.top=a:d==="t"?l.top=0:l.bottom=0,f===v||!["l","r"].includes(f)?l.left=i:f==="l"?l.left=0:l.right=0}return h.createElement("div",{ref:s,className:"".concat(t,"-arrow"),style:l})}function $P(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,o=e.motion;return i?React.createElement(xo,Et({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(a){var s=a.className;return React.createElement("div",{style:{zIndex:n},className:q("".concat(t,"-mask"),s)})}):null}var OP=h.forwardRef(function(e,t){var r=e.popup,n=e.className,i=e.prefixCls,o=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,c=e.keepDom,u=e.onClick,d=e.mask,f=e.arrow,g=e.align,v=e.arrowX,m=e.arrowY,p=e.motion,b=e.maskMotion,w=e.forceRender,S=e.getPopupContainer,$=e.autoDestroy,y=e.portal,C=e.zIndex,x=e.onMouseEnter,N=e.onMouseLeave,A=e.ready,O=e.offsetX,I=e.offsetY,R=e.onAlign,E=e.onPrepare,_=e.stretch,T=e.targetWidth,F=e.targetHeight,k=typeof r=="function"?r():r,D=l||c,j=(S==null?void 0:S.length)>0,W=h.useState(!S||!j),U=K(W,2),B=U[0],V=U[1];if(Mt(function(){!B&&j&&a&&V(!0)},[B,j,a]),!B)return null;var re=A||!l?{left:O,top:I}:{left:"-1000vw",top:"-1000vh"},H={};return _&&(_.includes("height")&&F?H.height=F:_.includes("minHeight")&&F&&(H.minHeight=F),_.includes("width")&&T?H.width=T:_.includes("minWidth")&&T&&(H.minWidth=T)),l||(H.pointerEvents="none"),h.createElement(y,{open:w||D,getContainer:S&&function(){return S(a)},autoDestroy:$},h.createElement($P,{prefixCls:i,open:l,zIndex:C,mask:d,motion:b}),h.createElement(ic,{onResize:R,disabled:!l},function(le){return h.createElement(xo,Et({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:w,leavedClassName:"".concat(i,"-hidden")},p,{onAppearPrepare:E,onEnterPrepare:E,visible:l,onVisibleChanged:function(ve){var te;p==null||(te=p.onVisibleChanged)===null||te===void 0||te.call(p,ve),s(ve)}}),function(ie,ve){var te=ie.className,be=ie.style,Pe=q(i,te,n);return h.createElement("div",{ref:Nn(le,t,ve),className:Pe,style:z(z(z(z({},re),H),be),{},{boxSizing:"border-box",zIndex:C},o),onMouseEnter:x,onMouseLeave:N,onClick:u},f&&h.createElement(_P,{prefixCls:i,align:g,arrowX:v,arrowY:m}),k)})}))}),PP=h.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,i=co(r),o=h.useCallback(function(s){ec(t,n?n(s):s)},[n]),a=Fh(o,r.ref);return i?h.cloneElement(r,{ref:a}):r}),TP=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function MP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vm,t=h.forwardRef(function(r,n){var i=r.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=r.children,s=r.action,l=s===void 0?"hover":s,c=r.showAction,u=r.hideAction,d=r.popupVisible,f=r.defaultPopupVisible,g=r.onPopupVisibleChange,v=r.afterPopupVisibleChange,m=r.mouseEnterDelay,p=r.mouseLeaveDelay,b=p===void 0?.1:p,w=r.focusDelay,S=r.blurDelay,$=r.mask,y=r.maskClosable,C=y===void 0?!0:y,x=r.getPopupContainer,N=r.forceRender,A=r.autoDestroy,O=r.destroyPopupOnHide,I=r.popup,R=r.popupClassName,E=r.popupStyle,_=r.popupPlacement,T=r.builtinPlacements,F=T===void 0?{}:T,k=r.popupAlign,D=r.zIndex,j=r.stretch,W=r.getPopupClassNameFromAlign,U=r.alignPoint,B=r.onPopupClick,V=r.onPopupAlign,re=r.arrow,H=r.popupMotion,le=r.maskMotion,ie=r.popupTransitionName,ve=r.popupAnimation,te=r.maskTransitionName,be=r.maskAnimation,Pe=r.className,De=r.getTriggerDOMNode,pe=Vt(r,TP),Ee=A||O||!1,Me=h.useState(!1),We=K(Me,2),oe=We[0],Q=We[1];Mt(function(){Q(Xm())},[]);var ae=h.useRef({}),Se=h.useContext(Ym),vt=h.useMemo(function(){return{registerSubPopup:function(fe,Ie){ae.current[fe]=Ie,Se==null||Se.registerSubPopup(fe,Ie)}}},[Se]),nt=tP(),pt=h.useState(null),zt=K(pt,2),me=zt[0],Be=zt[1],je=tn(function(Z){Ia(Z)&&me!==Z&&Be(Z),Se==null||Se.registerSubPopup(nt,Z)}),dt=h.useState(null),er=K(dt,2),Re=er[0],Je=er[1],Ve=tn(function(Z){Ia(Z)&&Re!==Z&&Je(Z)}),Pt=h.Children.only(a),ft=(Pt==null?void 0:Pt.props)||{},tr={},En=tn(function(Z){var fe,Ie,Xe=Re;return(Xe==null?void 0:Xe.contains(Z))||(Xe==null||(fe=Xe.getRootNode())===null||fe===void 0?void 0:fe.host)===Z||Z===Xe||(me==null?void 0:me.contains(Z))||(me==null||(Ie=me.getRootNode())===null||Ie===void 0?void 0:Ie.host)===Z||Z===me||Object.values(ae.current).some(function(Ze){return(Ze==null?void 0:Ze.contains(Z))||Z===Ze})}),cn=Qm(o,H,ve,ie),ur=Qm(o,le,be,te),ce=h.useState(f||!1),se=K(ce,2),xe=se[0],he=se[1],Ue=d??xe,bt=tn(function(Z){d===void 0&&he(Z)});Mt(function(){he(d||!1)},[d]);var Tt=h.useRef(Ue);Tt.current=Ue;var zr=tn(function(Z){Ue!==Z&&(bt(Z),g==null||g(Z))}),xr=h.useRef(),Kn=function(){clearTimeout(xr.current)},rr=function(fe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Kn(),Ie===0?zr(fe):xr.current=setTimeout(function(){zr(fe)},Ie*1e3)};h.useEffect(function(){return Kn},[]);var un=h.useState(!1),Ht=K(un,2),Xn=Ht[0],_n=Ht[1],Hr=h.useRef(!0);Mt(function(){(!Hr.current||Ue)&&_n(!0),Hr.current=!0},[Ue]);var dn=h.useState(null),Wr=K(dn,2),Ae=Wr[0],we=Wr[1],de=h.useState([0,0]),Ke=K(de,2),ze=Ke[0],Er=Ke[1],nr=function(fe){Er([fe.clientX,fe.clientY])},ir=xP(Ue,me,U?ze:Re,_,F,k,V),Ct=K(ir,9),Hi=Ct[0],Wi=Ct[1],fn=Ct[2],Zo=Ct[3],Sd=Ct[4],Cd=Ct[5],xd=Ct[6],Bi=Ct[7],hn=Ct[8],gn=tn(function(){Xn||hn()});EP(Ue,Re,me,gn),Mt(function(){gn()},[ze]),Mt(function(){Ue&&!(F!=null&&F[_])&&gn()},[JSON.stringify(k)]);var Ks=h.useMemo(function(){var Z=SP(F,o,Bi,U);return q(Z,W==null?void 0:W(Bi))},[Bi,W,F,o,U]);h.useImperativeHandle(n,function(){return{forceAlign:gn}});var Yn=function(fe){_n(!1),hn(),v==null||v(fe)},Xs=function(){return new Promise(function(fe){we(function(){return fe})})};Mt(function(){Ae&&(hn(),Ae(),we(null))},[Ae]);var Ys=h.useState(0),Zs=K(Ys,2),Ed=Zs[0],_d=Zs[1],$d=h.useState(0),Qs=K($d,2),Od=Qs[0],UA=Qs[1],GA=function(fe,Ie){if(gn(),j){var Xe=Ie.getBoundingClientRect();_d(Xe.width),UA(Xe.height)}},qA=yP(oe,l,c,u),bb=K(qA,2),Js=bb[0],el=bb[1],tl=function(fe,Ie,Xe,Ze){tr[fe]=function(nl){var Vi;Ze==null||Ze(nl),rr(Ie,Xe);for(var Td=arguments.length,xb=new Array(Td>1?Td-1:0),il=1;il1?Ie-1:0),Ze=1;Ze1?Ie-1:0),Ze=1;Zet||e;var NP={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const kP=NP;var ev=function(t,r){return h.createElement(os,z(z({},t),{},{ref:r,icon:kP}))};ev.displayName="DownOutlined";const IP=h.forwardRef(ev);var Ei={shiftX:64,adjustY:1},_i={adjustX:1,shiftY:!0},lr=[0,0],FP={left:{points:["cr","cl"],overflow:_i,offset:[-4,0],targetOffset:lr},right:{points:["cl","cr"],overflow:_i,offset:[4,0],targetOffset:lr},top:{points:["bc","tc"],overflow:Ei,offset:[0,-4],targetOffset:lr},bottom:{points:["tc","bc"],overflow:Ei,offset:[0,4],targetOffset:lr},topLeft:{points:["bl","tl"],overflow:Ei,offset:[0,-4],targetOffset:lr},leftTop:{points:["tr","tl"],overflow:_i,offset:[-4,0],targetOffset:lr},topRight:{points:["br","tr"],overflow:Ei,offset:[0,-4],targetOffset:lr},rightTop:{points:["tl","tr"],overflow:_i,offset:[4,0],targetOffset:lr},bottomRight:{points:["tr","br"],overflow:Ei,offset:[0,4],targetOffset:lr},rightBottom:{points:["bl","br"],overflow:_i,offset:[4,0],targetOffset:lr},bottomLeft:{points:["tl","bl"],overflow:Ei,offset:[0,4],targetOffset:lr},leftBottom:{points:["br","bl"],overflow:_i,offset:[-4,0],targetOffset:lr}};function tv(e){var t=e.children,r=e.prefixCls,n=e.id,i=e.overlayInnerStyle,o=e.className,a=e.style;return h.createElement("div",{className:q("".concat(r,"-content"),o),style:a},h.createElement("div",{className:"".concat(r,"-inner"),id:n,role:"tooltip",style:i},typeof t=="function"?t():t))}var LP=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],DP=function(t,r){var n=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,c=l===void 0?.1:l,u=t.overlayStyle,d=t.prefixCls,f=d===void 0?"rc-tooltip":d,g=t.children,v=t.onVisibleChange,m=t.afterVisibleChange,p=t.transitionName,b=t.animation,w=t.motion,S=t.placement,$=S===void 0?"right":S,y=t.align,C=y===void 0?{}:y,x=t.destroyTooltipOnHide,N=x===void 0?!1:x,A=t.defaultVisible,O=t.getTooltipContainer,I=t.overlayInnerStyle;t.arrowContent;var R=t.overlay,E=t.id,_=t.showArrow,T=_===void 0?!0:_,F=Vt(t,LP),k=M.useRef(null);M.useImperativeHandle(r,function(){return k.current});var D=z({},F);"visible"in t&&(D.popupVisible=t.visible);var j=function(){return h.createElement(tv,{key:"content",prefixCls:f,id:E,overlayInnerStyle:I},R)};return h.createElement(RP,Et({popupClassName:n,prefixCls:f,popup:j,action:o,builtinPlacements:FP,popupPlacement:$,ref:k,popupAlign:C,getPopupContainer:O,onPopupVisibleChange:v,afterPopupVisibleChange:m,popupTransitionName:p,popupAnimation:b,popupMotion:w,defaultPopupVisible:A,autoDestroy:N,mouseLeaveDelay:c,popupStyle:u,mouseEnterDelay:s,arrow:T},D),g)};const jP=M.forwardRef(DP),rv=8;function nv(e){const t=rv,{contentRadius:r,limitVerticalRadius:n}=e,i=r>12?r+2:12;return{dropdownArrowOffset:i,dropdownArrowOffsetVertical:n?t:i}}function bs(e,t){return e?t:{}}function zP(e,t){const{componentCls:r,sizePopupArrow:n,borderRadiusXS:i,borderRadiusOuter:o,boxShadowPopoverArrow:a}=e,{colorBg:s,contentRadius:l=e.borderRadiusLG,limitVerticalRadius:c,arrowDistance:u=0,arrowPlacement:d={left:!0,right:!0,top:!0,bottom:!0}}=t,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:g}=nv({contentRadius:l,limitVerticalRadius:c});return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},Q_(n,i,o,s,a)),{"&:before":{background:s}})]},bs(!!d.top,{[[`&-placement-top ${r}-arrow`,`&-placement-topLeft ${r}-arrow`,`&-placement-topRight ${r}-arrow`].join(",")]:{bottom:u,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${r}-arrow`]:{left:{_skip_check_:!0,value:g}},[`&-placement-topRight ${r}-arrow`]:{right:{_skip_check_:!0,value:g}}})),bs(!!d.bottom,{[[`&-placement-bottom ${r}-arrow`,`&-placement-bottomLeft ${r}-arrow`,`&-placement-bottomRight ${r}-arrow`].join(",")]:{top:u,transform:"translateY(-100%)"},[`&-placement-bottom ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${r}-arrow`]:{left:{_skip_check_:!0,value:g}},[`&-placement-bottomRight ${r}-arrow`]:{right:{_skip_check_:!0,value:g}}})),bs(!!d.left,{[[`&-placement-left ${r}-arrow`,`&-placement-leftTop ${r}-arrow`,`&-placement-leftBottom ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:u},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${r}-arrow`]:{top:f},[`&-placement-leftBottom ${r}-arrow`]:{bottom:f}})),bs(!!d.right,{[[`&-placement-right ${r}-arrow`,`&-placement-rightTop ${r}-arrow`,`&-placement-rightBottom ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:u},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${r}-arrow`]:{top:f},[`&-placement-rightBottom ${r}-arrow`]:{bottom:f}}))}}function HP(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const i=n&&typeof n=="object"?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.dropdownArrowOffset*2+r;break;case"left":case"right":o.shiftY=t.dropdownArrowOffsetVertical*2+r;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const iv={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},WP={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},BP=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function VP(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o}=e,a=t/2,s={};return Object.keys(iv).forEach(l=>{const c=n&&WP[l]||iv[l],u=Object.assign(Object.assign({},c),{offset:[0,0]});switch(s[l]=u,BP.has(l)&&(u.autoArrow=!1),l){case"top":case"topLeft":case"topRight":u.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=a+i;break}const d=nv({contentRadius:o,limitVerticalRadius:!0});if(n)switch(l){case"topLeft":case"bottomLeft":u.offset[0]=-d.dropdownArrowOffset-a;break;case"topRight":case"bottomRight":u.offset[0]=d.dropdownArrowOffset+a;break;case"leftTop":case"rightTop":u.offset[1]=-d.dropdownArrowOffset-a;break;case"leftBottom":case"rightBottom":u.offset[1]=d.dropdownArrowOffset+a;break}u.overflow=HP(l,d,t,r)}),s}const wn=(e,t)=>new _t(e).setAlpha(t).toRgbString(),$i=(e,t)=>new _t(e).lighten(t).toHexString(),UP=e=>{const t=Yr(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},GP=(e,t)=>{const r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:wn(n,.85),colorTextSecondary:wn(n,.65),colorTextTertiary:wn(n,.45),colorTextQuaternary:wn(n,.25),colorFill:wn(n,.18),colorFillSecondary:wn(n,.12),colorFillTertiary:wn(n,.08),colorFillQuaternary:wn(n,.04),colorBgElevated:$i(r,12),colorBgContainer:$i(r,8),colorBgLayout:$i(r,0),colorBgSpotlight:$i(r,26),colorBorder:$i(r,26),colorBorderSecondary:$i(r,19)}},qP=(e,t)=>{const r=Object.keys(zc).map(i=>{const o=Yr(e[i],{theme:"dark"});return new Array(10).fill(1).reduce((a,s,l)=>(a[`${i}-${l+1}`]=o[l],a[`${i}${l+1}`]=o[l],a),{})}).reduce((i,o)=>(i=Object.assign(Object.assign({},i),o),i),{}),n=t??Qa(e);return Object.assign(Object.assign(Object.assign({},n),r),Vg(e,{generateColorPalettes:UP,generateNeutralColorPalettes:GP}))};function KP(e){const{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}const XP=(e,t)=>{const r=t??Qa(e),n=r.fontSizeSM,i=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),KP(t??e)),Ug(n)),{controlHeight:i}),Bg(Object.assign(Object.assign({},r),{controlHeight:i})))};function YP(){const[e,t,r]=rs();return{theme:e,token:t,hashId:r}}const pu={defaultConfig:ts,defaultSeed:ts.token,useToken:YP,defaultAlgorithm:Qa,darkAlgorithm:qP,compactAlgorithm:XP},ZP=e=>{const{componentCls:t,tooltipMaxWidth:r,tooltipColor:n,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:a,controlHeight:s,boxShadowSecondary:l,paddingSM:c,paddingXS:u,tooltipRadiusOuter:d}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},hr(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:r,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${t}-inner`]:{minWidth:s,minHeight:s,padding:`${c/2}px ${u}px`,color:n,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:l},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(o,rv)}},[`${t}-content`]:{position:"relative"}}),Xg(e,(f,g)=>{let{darkColor:v}=g;return{[`&${t}-${f}`]:{[`${t}-inner`]:{backgroundColor:v},[`${t}-arrow`]:{"--antd-arrow-background-color":v}}}})),{"&-rtl":{direction:"rtl"}})},zP(Ft(e,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:o,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},ov=(e,t)=>Qr("Tooltip",n=>{if(t===!1)return[];const{borderRadius:i,colorTextLightSolid:o,colorBgDefault:a,borderRadiusOuter:s}=n,l=Ft(n,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a,tooltipRadiusOuter:s>4?4:s});return[ZP(l),bP(n,"zoom-big-fast")]},n=>{let{zIndexPopupBase:i,colorBgSpotlight:o}=n;return{zIndexPopup:i+70,colorBgDefault:o}})(e),QP=Ga.map(e=>`${e}-inverse`),JP=["success","processing","error","default","warning"];function av(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(ee(QP),ee(Ga)).includes(e):Ga.includes(e)}function e2(e){return JP.includes(e)}function sv(e,t){const r=av(t),n=q({[`${e}-${t}`]:t&&r}),i={},o={};return t&&!r&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:n,overlayStyle:i,arrowStyle:o}}function t2(e){const{prefixCls:t,className:r,placement:n="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:s}=h.useContext(ot),l=s("tooltip",t),[c,u]=ov(l,!0),d=sv(l,o),f=Object.assign(Object.assign({},a),d.overlayStyle),g=d.arrowStyle;return c(h.createElement("div",{className:q(u,l,`${l}-pure`,`${l}-placement-${n}`,r,d.className),style:g},h.createElement("div",{className:`${l}-arrow`}),h.createElement(tv,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:f}),i)))}var r2=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const r={},n=Object.assign({},e);return t.forEach(i=>{e&&i in e&&(r[i]=e[i],delete n[i])}),{picked:r,omitted:n}};function o2(e,t){const r=e.type;if((r.__ANT_BUTTON===!0||e.type==="button")&&e.props.disabled||r.__ANT_SWITCH===!0&&(e.props.disabled||e.props.loading)||r.__ANT_RADIO===!0&&e.props.disabled){const{picked:n,omitted:i}=i2(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),o=Object.assign(Object.assign({display:"inline-block"},n),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),a=Object.assign(Object.assign({},i),{pointerEvents:"none"}),s=Si(e,{style:a,className:null});return h.createElement("span",{style:o,className:q(e.props.className,`${t}-disabled-compatible-wrapper`)},s)}return e}const lv=h.forwardRef((e,t)=>{var r,n;const{prefixCls:i,openClassName:o,getTooltipContainer:a,overlayClassName:s,color:l,overlayInnerStyle:c,children:u,afterOpenChange:d,afterVisibleChange:f,destroyTooltipOnHide:g,arrow:v=!0,title:m,overlay:p,builtinPlacements:b,arrowPointAtCenter:w=!1,autoAdjustOverflow:S=!0}=e,$=!!v,{token:y}=n2(),{getPopupContainer:C,getPrefixCls:x,direction:N}=h.useContext(ot),A=h.useRef(null),O=()=>{var Q;(Q=A.current)===null||Q===void 0||Q.forceAlign()};h.useImperativeHandle(t,()=>({forceAlign:O,forcePopupAlign:()=>{O()}}));const[I,R]=vs(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),E=!m&&!p&&m!==0,_=Q=>{var ae,Se;R(E?!1:Q),E||((ae=e.onOpenChange)===null||ae===void 0||ae.call(e,Q),(Se=e.onVisibleChange)===null||Se===void 0||Se.call(e,Q))},T=h.useMemo(()=>{var Q,ae;let Se=w;return typeof v=="object"&&(Se=(ae=(Q=v.pointAtCenter)!==null&&Q!==void 0?Q:v.arrowPointAtCenter)!==null&&ae!==void 0?ae:w),b||VP({arrowPointAtCenter:Se,autoAdjustOverflow:S,arrowWidth:$?y.sizePopupArrow:0,borderRadius:y.borderRadius,offset:y.marginXXS})},[w,v,b,y]),F=(Q,ae)=>{const Se=Object.keys(T).find(vt=>{var nt,pt;return T[vt].points[0]===((nt=ae.points)===null||nt===void 0?void 0:nt[0])&&T[vt].points[1]===((pt=ae.points)===null||pt===void 0?void 0:pt[1])});if(Se){const vt=Q.getBoundingClientRect(),nt={top:"50%",left:"50%"};/top|Bottom/.test(Se)?nt.top=`${vt.height-ae.offset[1]}px`:/Top|bottom/.test(Se)&&(nt.top=`${-ae.offset[1]}px`),/left|Right/.test(Se)?nt.left=`${vt.width-ae.offset[0]}px`:/right|Left/.test(Se)&&(nt.left=`${-ae.offset[0]}px`),Q.style.transformOrigin=`${nt.left} ${nt.top}`}},k=h.useMemo(()=>m===0?m:p||m||"",[p,m]),{getPopupContainer:D,placement:j="top",mouseEnterDelay:W=.1,mouseLeaveDelay:U=.1,overlayStyle:B,rootClassName:V}=e,re=r2(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),H=x("tooltip",i),le=x(),ie=e["data-popover-inject"];let ve=I;!("open"in e)&&!("visible"in e)&&E&&(ve=!1);const te=o2(eu(u)&&!xm(u)?u:h.createElement("span",null,u),H),be=te.props,Pe=!be.className||typeof be.className=="string"?q(be.className,{[o||`${H}-open`]:!0}):be.className,[De,pe]=ov(H,!ie),Ee=sv(H,l),Me=Object.assign(Object.assign({},c),Ee.overlayStyle),We=Ee.arrowStyle,oe=q(s,{[`${H}-rtl`]:N==="rtl"},Ee.className,V,pe);return De(h.createElement(jP,Object.assign({},re,{showArrow:$,placement:j,mouseEnterDelay:W,mouseLeaveDelay:U,prefixCls:H,overlayClassName:oe,overlayStyle:Object.assign(Object.assign({},We),B),getTooltipContainer:D||a||C,ref:A,builtinPlacements:T,overlay:k,visible:ve,onVisibleChange:_,afterVisibleChange:d??f,onPopupAlign:F,overlayInnerStyle:Me,arrowContent:h.createElement("span",{className:`${H}-arrow-content`}),motion:{motionName:qO(le,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!g}),ve?Si(te,{className:Pe}):te))});lv._InternalPanelDoNotUseOrYouWillBeFired=t2;const bu=lv,a2=()=>{const[e,t]=h.useState(!1);return h.useEffect(()=>{t(nP())},[]),e};function s2(e){let{className:t,direction:r,index:n,marginDirection:i,children:o,split:a,wrap:s}=e;const{horizontalSize:l,verticalSize:c,latestIndex:u,supportFlexGap:d}=h.useContext(cv);let f={};return d||(r==="vertical"?n{const{getPrefixCls:t,space:r,direction:n}=h.useContext(ot),{size:i=(r==null?void 0:r.size)||"small",align:o,className:a,rootClassName:s,children:l,direction:c="horizontal",prefixCls:u,split:d,style:f,wrap:g=!1}=e,v=l2(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap"]),m=a2(),[p,b]=h.useMemo(()=>(Array.isArray(i)?i:[i,i]).map(_=>u2(_)),[i]),w=oi(l,{keepEmpty:!0}),S=o===void 0&&c==="horizontal"?"center":o,$=t("space",u),[y,C]=Tm($),x=q($,C,`${$}-${c}`,{[`${$}-rtl`]:n==="rtl",[`${$}-align-${S}`]:S},a,s),N=`${$}-item`,A=n==="rtl"?"marginLeft":"marginRight";let O=0;const I=w.map((_,T)=>{_!=null&&(O=T);const F=_&&_.key||`${N}-${T}`;return h.createElement(s2,{className:N,key:F,direction:c,index:T,marginDirection:A,split:d,wrap:g},_)}),R=h.useMemo(()=>({horizontalSize:p,verticalSize:b,latestIndex:O,supportFlexGap:m}),[p,b,O,m]);if(w.length===0)return null;const E={};return g&&(E.flexWrap="wrap",m||(E.marginBottom=-b)),m&&(E.columnGap=p,E.rowGap=b),y(h.createElement("div",Object.assign({className:x,style:Object.assign(Object.assign({},E),f)},v),h.createElement(cv.Provider,{value:R},I)))};uv.Compact=pO;const dv=uv;var yu={},d2={get exports(){return yu},set exports(e){yu=e}};(function(e,t){(function(r,n){e.exports=n()})(Jb,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",u="week",d="month",f="quarter",g="year",v="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|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,w={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 _=["th","st","nd","rd"],T=E%100;return"["+E+(_[(T-20)%10]||_[T]||_[0])+"]"}},S=function(E,_,T){var F=String(E);return!F||F.length>=_?E:""+Array(_+1-F.length).join(T)+E},$={s:S,z:function(E){var _=-E.utcOffset(),T=Math.abs(_),F=Math.floor(T/60),k=T%60;return(_<=0?"+":"-")+S(F,2,"0")+":"+S(k,2,"0")},m:function E(_,T){if(_.date()1)return E(j[0])}else{var W=_.name;C[W]=_,k=W}return!F&&k&&(y=k),k||!F&&y},A=function(E,_){if(x(E))return E.clone();var T=typeof _=="object"?_:{};return T.date=E,T.args=arguments,new I(T)},O=$;O.l=N,O.i=x,O.w=function(E,_){return A(E,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var I=function(){function E(T){this.$L=N(T.locale,null,!0),this.parse(T)}var _=E.prototype;return _.parse=function(T){this.$d=function(F){var k=F.date,D=F.utc;if(k===null)return new Date(NaN);if(O.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var j=k.match(p);if(j){var W=j[2]-1||0,U=(j[7]||"0").substring(0,3);return D?new Date(Date.UTC(j[1],W,j[3]||1,j[4]||0,j[5]||0,j[6]||0,U)):new Date(j[1],W,j[3]||1,j[4]||0,j[5]||0,j[6]||0,U)}}return new Date(k)}(T),this.$x=T.x||{},this.init()},_.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},_.$utils=function(){return O},_.isValid=function(){return this.$d.toString()!==m},_.isSame=function(T,F){var k=A(T);return this.startOf(F)<=k&&k<=this.endOf(F)},_.isAfter=function(T,F){return A(T){const{componentCls:t,antCls:r}=e,n=`${t}-group`;return{[n]:Object.assign(Object.assign({},hr(e)),{display:"inline-block",fontSize:0,[`&${n}-rtl`]:{direction:"rtl"},[`${r}-badge ${r}-badge-count`]:{zIndex:1},[`> ${r}-badge:not(:first-child) > ${r}-button-wrapper`]:{borderInlineStart:"none"}})}},p2=e=>{const{componentCls:t,radioWrapperMarginRight:r,radioCheckedColor:n,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:s,motionEaseInOutCirc:l,radioButtonBg:c,colorBorder:u,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:g,colorTextDisabled:v,paddingXS:m,radioDotDisabledColor:p,lineType:b,radioDotDisabledSize:w,wireframe:S,colorWhite:$}=e,y=`${t}-inner`;return{[`${t}-wrapper`]:Object.assign(Object.assign({},hr(e)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:r,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${b} ${n}`,borderRadius:"50%",visibility:"hidden",animationName:m2,animationDuration:o,animationTimingFunction:s,animationFillMode:"both",content:'""'},[t]:Object.assign(Object.assign({},hr(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${t}-wrapper:hover &, &:hover ${y}`]:{borderColor:n},[`${t}-input:focus-visible + ${y}`]:Object.assign({},es(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:i,height:i,marginBlockStart:i/-2,marginInlineStart:i/-2,backgroundColor:S?n:$,borderBlockStart:0,borderInlineStart:0,borderRadius:i,transform:"scale(0)",opacity:0,transition:`all ${o} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:i,height:i,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[y]:{borderColor:n,backgroundColor:S?c:n,"&::after":{transform:`scale(${f/i})`,opacity:1,transition:`all ${o} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[y]:{backgroundColor:g,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:p}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:v,cursor:"not-allowed"},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${w/i})`}}}},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}})}},b2=e=>{const{radioButtonColor:t,controlHeight:r,componentCls:n,lineWidth:i,lineType:o,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,radioButtonPaddingHorizontal:c,fontSize:u,radioButtonBg:d,fontSizeLG:f,controlHeightLG:g,controlHeightSM:v,paddingXS:m,borderRadius:p,borderRadiusSM:b,borderRadiusLG:w,radioCheckedColor:S,radioButtonCheckedBg:$,radioButtonHoverColor:y,radioButtonActiveColor:C,radioSolidCheckedColor:x,colorTextDisabled:N,colorBgContainerDisabled:A,radioDisabledButtonCheckedColor:O,radioDisabledButtonCheckedBg:I}=e;return{[`${n}-button-wrapper`]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:`${r-i*2}px`,background:d,border:`${i}px ${o} ${a}`,borderBlockStartWidth:i+.02,borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`border-color ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${n}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-i,insetInlineStart:-i,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:i,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${i}px ${o} ${a}`,borderStartStartRadius:p,borderEndStartRadius:p},"&:last-child":{borderStartEndRadius:p,borderEndEndRadius:p},"&:first-child:last-child":{borderRadius:p},[`${n}-group-large &`]:{height:g,fontSize:f,lineHeight:`${g-i*2}px`,"&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}},[`${n}-group-small &`]:{height:v,paddingInline:m-i,paddingBlock:0,lineHeight:`${v-i*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:S},"&:has(:focus-visible)":Object.assign({},es(e)),[`${n}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${n}-button-wrapper-disabled)`]:{zIndex:1,color:S,background:$,borderColor:S,"&::before":{backgroundColor:S},"&:first-child":{borderColor:S},"&:hover":{color:y,borderColor:y,"&::before":{backgroundColor:y}},"&:active":{color:C,borderColor:C,"&::before":{backgroundColor:C}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:x,background:S,borderColor:S,"&:hover":{color:x,background:y,borderColor:y},"&:active":{color:x,background:C,borderColor:C}},"&-disabled":{color:N,backgroundColor:A,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:N,backgroundColor:A,borderColor:a}},[`&-disabled${n}-button-wrapper-checked`]:{color:O,backgroundColor:I,borderColor:a,boxShadow:"none"}}}},vv=Qr("Radio",e=>{const{padding:t,lineWidth:r,controlItemBgActiveDisabled:n,colorTextDisabled:i,colorBgContainer:o,fontSizeLG:a,controlOutline:s,colorPrimaryHover:l,colorPrimaryActive:c,colorText:u,colorPrimary:d,marginXS:f,controlOutlineWidth:g,colorTextLightSolid:v,wireframe:m}=e,p=`0 0 0 ${g}px ${s}`,b=p,w=a,S=4,$=w-S*2,y=m?$:w-(S+r)*2,C=d,x=u,N=l,A=c,O=t-r,E=Ft(e,{radioFocusShadow:p,radioButtonFocusShadow:b,radioSize:w,radioDotSize:y,radioDotDisabledSize:$,radioCheckedColor:C,radioDotDisabledColor:i,radioSolidCheckedColor:v,radioButtonBg:o,radioButtonCheckedBg:o,radioButtonColor:x,radioButtonHoverColor:N,radioButtonActiveColor:A,radioButtonPaddingHorizontal:O,radioDisabledButtonCheckedBg:n,radioDisabledButtonCheckedColor:i,radioWrapperMarginRight:f});return[v2(E),p2(E),b2(E)]});var y2=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var r,n;const i=h.useContext(hv),o=h.useContext(gv),{getPrefixCls:a,direction:s}=h.useContext(ot),l=h.useRef(null),c=Nn(t,l),{isFormItemInput:u}=h.useContext($o),d=A=>{var O,I;(O=e.onChange)===null||O===void 0||O.call(e,A),(I=i==null?void 0:i.onChange)===null||I===void 0||I.call(i,A)},{prefixCls:f,className:g,rootClassName:v,children:m,style:p}=e,b=y2(e,["prefixCls","className","rootClassName","children","style"]),w=a("radio",f),S=((i==null?void 0:i.optionType)||o)==="button"?`${w}-button`:w,[$,y]=vv(w),C=Object.assign({},b),x=h.useContext(So);i&&(C.name=i.name,C.onChange=d,C.checked=e.value===i.value,C.disabled=(r=C.disabled)!==null&&r!==void 0?r:i.disabled),C.disabled=(n=C.disabled)!==null&&n!==void 0?n:x;const N=q(`${S}-wrapper`,{[`${S}-wrapper-checked`]:C.checked,[`${S}-wrapper-disabled`]:C.disabled,[`${S}-wrapper-rtl`]:s==="rtl",[`${S}-wrapper-in-form-item`]:u},g,v,y);return $(h.createElement("label",{className:N,style:p,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},h.createElement(mv,Object.assign({},C,{type:"radio",prefixCls:S,ref:c})),m!==void 0?h.createElement("span",null,m):null))},ys=h.forwardRef(w2),S2=h.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=h.useContext(ot),i=h.useContext(mi),[o,a]=vs(e.defaultValue,{value:e.value}),s=E=>{const _=o,T=E.target.value;"value"in e||a(T);const{onChange:F}=e;F&&T!==_&&F(E)},{prefixCls:l,className:c,rootClassName:u,options:d,buttonStyle:f="outline",disabled:g,children:v,size:m,style:p,id:b,onMouseEnter:w,onMouseLeave:S,onFocus:$,onBlur:y}=e,C=r("radio",l),x=`${C}-group`,[N,A]=vv(C);let O=v;d&&d.length>0&&(O=d.map(E=>typeof E=="string"||typeof E=="number"?h.createElement(ys,{key:E.toString(),prefixCls:C,disabled:g,value:E,checked:o===E},E):h.createElement(ys,{key:`radio-group-value-options-${E.value}`,prefixCls:C,disabled:E.disabled||g,value:E.value,checked:o===E.value,style:E.style},E.label)));const I=m||i,R=q(x,`${x}-${f}`,{[`${x}-${I}`]:I,[`${x}-rtl`]:n==="rtl"},c,u,A);return N(h.createElement("div",Object.assign({},q$(e),{className:R,style:p,onMouseEnter:w,onMouseLeave:S,onFocus:$,onBlur:y,id:b,ref:t}),h.createElement(f2,{value:{onChange:s,value:o,disabled:e.disabled,name:e.name,optionType:e.optionType}},O)))}),C2=h.memo(S2);var x2=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{getPrefixCls:r}=h.useContext(ot),{prefixCls:n}=e,i=x2(e,["prefixCls"]),o=r("radio",n);return h.createElement(h2,{value:"button"},h.createElement(ys,Object.assign({prefixCls:o},i,{type:"radio",ref:t})))},_2=h.forwardRef(E2),ws=ys;ws.Button=_2,ws.Group=C2,ws.__ANT_RADIO=!0;const wu=ws,pv=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ss=e=>({borderColor:e.inputBorderHoverColor,borderInlineEndWidth:e.lineWidth}),Cs=e=>({borderColor:e.inputBorderHoverColor,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),bv=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Ss(Ft(e,{inputBorderHoverColor:e.colorBorder})))}),yv=e=>{const{inputPaddingVerticalLG:t,fontSizeLG:r,lineHeightLG:n,borderRadiusLG:i,inputPaddingHorizontalLG:o}=e;return{padding:`${t}px ${o}px`,fontSize:r,lineHeight:n,borderRadius:i}},wv=e=>({padding:`${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM-1}px`,borderRadius:e.borderRadiusSM}),Sv=(e,t)=>{const{componentCls:r,colorError:n,colorWarning:i,colorErrorOutline:o,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:l}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:n,"&:hover":{borderColor:s},"&:focus, &-focused":Object.assign({},Cs(Ft(e,{inputBorderActiveColor:n,inputBorderHoverColor:n,controlOutline:o}))),[`${r}-prefix, ${r}-suffix`]:{color:n}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:i,"&:hover":{borderColor:l},"&:focus, &-focused":Object.assign({},Cs(Ft(e,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:a}))),[`${r}-prefix, ${r}-suffix`]:{color:i}}}},Cv=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,backgroundColor:e.colorBgContainer,backgroundImage:"none",borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:e.colorBorder,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},pv(e.colorTextPlaceholder)),{"&:hover":Object.assign({},Ss(e)),"&:focus, &-focused":Object.assign({},Cs(e)),"&-disabled, &[disabled]":Object.assign({},bv(e)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},yv(e)),"&-sm":Object.assign({},wv(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),$2=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,["&[class*='col-']"]:{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},yv(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},wv(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{["&-addon, &-wrap"]:{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${e.inputPaddingHorizontal}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`-${e.inputPaddingVertical+1}px -${e.inputPaddingHorizontal}px`,[`&${r}-select-single:not(${r}-select-customize-input)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${e.lineWidth}px ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${r}-select-selector`]:{color:e.colorPrimary}}},[`${r}-cascader-picker`]:{margin:`-9px -${e.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},J_()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${t}-affix-wrapper`]:{display:"inline-flex"},[`& > ${r}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${r}-select > ${r}-select-selector, & > ${r}-select-auto-complete ${t}, & > ${r}-cascader-picker ${t}, & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child, & > ${r}-select:first-child > ${r}-select-selector, & > ${r}-select-auto-complete:first-child ${t}, & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${r}-select:last-child > ${r}-select-selector, & > ${r}-cascader-picker:last-child ${t}, & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:-e.lineWidth,[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}};function O2(e){return Ft(e,{inputAffixPadding:e.paddingXXS,inputPaddingVertical:Math.max(Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,3),inputPaddingVerticalLG:Math.ceil((e.controlHeightLG-e.fontSizeLG*e.lineHeightLG)/2*10)/10-e.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((e.controlHeightSM-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,0),inputPaddingHorizontal:e.paddingSM-e.lineWidth,inputPaddingHorizontalSM:e.paddingXS-e.lineWidth,inputPaddingHorizontalLG:e.controlPaddingHorizontal-e.lineWidth,inputBorderHoverColor:e.colorPrimaryHover,inputBorderActiveColor:e.colorPrimaryHover})}const P2=new It("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),T2=e=>{const{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},hr(e)),{display:"inline-flex"}),[r]:Object.assign(Object.assign({},hr(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:e.marginXS},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},hr(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"start",transform:`translate(0, ${e.lineHeight*e.fontSize/2-e.checkboxSize/2}px)`,[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},es(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[t]:{"&-indeterminate":{[`${t}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${r}:hover ${t}:after`]:{visibility:"visible"},[` ${r}:not(${r}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-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}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:P2,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[` ${r}-checked:not(${r}-disabled), ${t}-checked:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${r}-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 M2(e,t){const r=Ft(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[T2(r)]}const xv=Qr("Checkbox",(e,t)=>{let{prefixCls:r}=t;return[M2(r,e)]});var R2=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{defaultValue:r,children:n,options:i=[],prefixCls:o,className:a,rootClassName:s,style:l,onChange:c}=e,u=R2(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]);const{getPrefixCls:d,direction:f}=h.useContext(ot),[g,v]=h.useState(u.value||r||[]),[m,p]=h.useState([]);h.useEffect(()=>{"value"in u&&v(u.value||[])},[u.value]);const b=()=>i.map(R=>typeof R=="string"||typeof R=="number"?{label:R,value:R}:R),w=R=>{p(E=>E.filter(_=>_!==R))},S=R=>{p(E=>[].concat(ee(E),[R]))},$=R=>{const E=g.indexOf(R.value),_=ee(g);E===-1?_.push(R.value):_.splice(E,1),"value"in u||v(_);const T=b();c==null||c(_.filter(F=>m.includes(F)).sort((F,k)=>{const D=T.findIndex(W=>W.value===F),j=T.findIndex(W=>W.value===k);return D-j}))},y=d("checkbox",o),C=`${y}-group`,[x,N]=xv(y),A=Vh(u,["value","disabled"]);i&&i.length>0&&(n=b().map(R=>h.createElement(_v,{prefixCls:y,key:R.value.toString(),disabled:"disabled"in R?R.disabled:u.disabled,value:R.value,checked:g.includes(R.value),onChange:R.onChange,className:`${C}-item`,style:R.style},R.label)));const O={toggleOption:$,value:g,disabled:u.disabled,name:u.name,registerValue:S,cancelValue:w},I=q(C,{[`${C}-rtl`]:f==="rtl"},a,s,N);return x(h.createElement("div",Object.assign({className:I,style:l},A,{ref:t}),h.createElement(Ev.Provider,{value:O},n)))},N2=h.forwardRef(A2),k2=h.memo(N2);var I2=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var r,{prefixCls:n,className:i,rootClassName:o,children:a,indeterminate:s=!1,style:l,onMouseEnter:c,onMouseLeave:u,skipGroup:d=!1,disabled:f}=e,g=I2(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]);const{getPrefixCls:v,direction:m}=h.useContext(ot),p=h.useContext(Ev),{isFormItemInput:b}=h.useContext($o),w=h.useContext(So),S=(r=(p==null?void 0:p.disabled)||f)!==null&&r!==void 0?r:w,$=h.useRef(g.value);h.useEffect(()=>{p==null||p.registerValue(g.value)},[]),h.useEffect(()=>{if(!d)return g.value!==$.current&&(p==null||p.cancelValue($.current),p==null||p.registerValue(g.value),$.current=g.value),()=>p==null?void 0:p.cancelValue(g.value)},[g.value]);const y=v("checkbox",n),[C,x]=xv(y),N=Object.assign({},g);p&&!d&&(N.onChange=function(){g.onChange&&g.onChange.apply(g,arguments),p.toggleOption&&p.toggleOption({label:a,value:g.value})},N.name=p.name,N.checked=p.value.includes(g.value));const A=q({[`${y}-wrapper`]:!0,[`${y}-rtl`]:m==="rtl",[`${y}-wrapper-checked`]:N.checked,[`${y}-wrapper-disabled`]:S,[`${y}-wrapper-in-form-item`]:b},i,o,x),O=q({[`${y}-indeterminate`]:s},x),I=s?"mixed":void 0;return C(h.createElement("label",{className:A,style:l,onMouseEnter:c,onMouseLeave:u},h.createElement(mv,Object.assign({"aria-checked":I},N,{prefixCls:y,className:O,disabled:S,ref:t})),a!==void 0&&h.createElement("span",null,a)))},_v=h.forwardRef(F2),Su=_v;Su.Group=k2,Su.__ANT_CHECKBOX=!0;const L2=Su;var D2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const j2=D2;var $v=function(t,r){return h.createElement(os,z(z({},t),{},{ref:r,icon:j2}))};$v.displayName="UpOutlined";const z2=h.forwardRef($v);function Cu(){return typeof BigInt=="function"}function Dn(e){var t=e.trim(),r=t.startsWith("-");r&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var n=t||"0",i=n.split("."),o=i[0]||"0",a=i[1]||"0";o==="0"&&a==="0"&&(r=!1);var s=r?"-":"";return{negative:r,negativeStr:s,trimStr:n,integerStr:o,decimalStr:a,fullStr:"".concat(s).concat(n)}}function xu(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Po(e){var t=String(e);if(xu(e)){var r=Number(t.slice(t.indexOf("e-")+2)),n=t.match(/\.(\d+)/);return n!=null&&n[1]&&(r+=n[1].length),r}return t.includes(".")&&Eu(t)?t.length-t.indexOf(".")-1:0}function xs(e){var t=String(e);if(xu(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Cu()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(eNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(i0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":xs(this.number):this.origin}}]),e}(),W2=function(){function e(t){if(or(this,e),X(this,"origin",""),X(this,"negative",void 0),X(this,"integer",void 0),X(this,"decimal",void 0),X(this,"decimalLen",void 0),X(this,"empty",void 0),X(this,"nan",void 0),Ov(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}var r=t;if(xu(r)&&(r=Number(r)),r=typeof r=="string"?r:xs(r),Eu(r)){var n=Dn(r);this.negative=n.negative;var i=n.trimStr.split(".");this.integer=BigInt(i[0]);var o=i[1]||"0";this.decimal=BigInt(o),this.decimalLen=o.length}else this.nan=!0}return ar(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(r){var n="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(r,"0"));return BigInt(n)}},{key:"negate",value:function(){var r=new e(this.toString());return r.negative=!r.negative,r}},{key:"add",value:function(r){if(this.isInvalidate())return new e(r);var n=new e(r);if(n.isInvalidate())return this;var i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),o=this.alignDecimal(i),a=n.alignDecimal(i),s=(o+a).toString(),l=Dn(s),c=l.negativeStr,u=l.trimStr,d="".concat(c).concat(u.padStart(i+1,"0"));return new e("".concat(d.slice(0,-i),".").concat(d.slice(-i)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(r){return this.toString()===(r==null?void 0:r.toString())}},{key:"lessEquals",value:function(r){return this.add(r.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":Dn("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}();function gr(e){return Cu()?new W2(e):new H2(e)}function Es(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var i=Dn(e),o=i.negativeStr,a=i.integerStr,s=i.decimalStr,l="".concat(t).concat(s),c="".concat(o).concat(a);if(r>=0){var u=Number(s[r]);if(u>=5&&!n){var d=gr(e).add("".concat(o,"0.").concat("0".repeat(r)).concat(10-u));return Es(d.toString(),t,r,n)}return r===0?c:"".concat(c).concat(t).concat(s.padEnd(r,"0").slice(0,r))}return l===".0"?c:"".concat(c).concat(l)}var B2=function(){var t=M.useState(!1),r=K(t,2),n=r[0],i=r[1];return M.useLayoutEffect(function(){i(Xm())},[]),n},V2=200,U2=600;function G2(e){var t=e.prefixCls,r=e.upNode,n=e.downNode,i=e.upDisabled,o=e.downDisabled,a=e.onStep,s=h.useRef(),l=h.useRef();l.current=a;var c=function(b,w){b.preventDefault(),l.current(w);function S(){l.current(w),s.current=setTimeout(S,V2)}s.current=setTimeout(S,U2)},u=function(){clearTimeout(s.current)};h.useEffect(function(){return u},[]);var d=B2();if(d)return null;var f="".concat(t,"-handler"),g=q(f,"".concat(f,"-up"),X({},"".concat(f,"-up-disabled"),i)),v=q(f,"".concat(f,"-down"),X({},"".concat(f,"-down-disabled"),o)),m={unselectable:"on",role:"button",onMouseUp:u,onMouseLeave:u};return h.createElement("div",{className:"".concat(f,"-wrap")},h.createElement("span",Et({},m,{onMouseDown:function(b){c(b,!0)},"aria-label":"Increase Value","aria-disabled":i,className:g}),r||h.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),h.createElement("span",Et({},m,{onMouseDown:function(b){c(b,!1)},"aria-label":"Decrease Value","aria-disabled":o,className:v}),n||h.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function Pv(e){var t=typeof e=="number"?xs(e):Dn(e).fullStr,r=t.includes(".");return r?Dn(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}function q2(e,t){var r=M.useRef(null);function n(){try{var o=e.selectionStart,a=e.selectionEnd,s=e.value,l=s.substring(0,o),c=s.substring(a);r.current={start:o,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function i(){if(e&&r.current&&t)try{var o=e.value,a=r.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=o.length;if(o.endsWith(l))u=o.length-r.current.afterTxt.length;else if(o.startsWith(s))u=s.length;else{var d=s[c-1],f=o.indexOf(d,c-1);f!==-1&&(u=f+1)}e.setSelectionRange(u,u)}catch(g){dr(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(g.message))}}return[n,i]}const K2=function(){var e=M.useRef(0),t=function(){Jr.cancel(e.current)};return M.useEffect(function(){return t},[]),function(r){t(),e.current=Jr(function(){r()})}};var X2=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Tv=function(t,r){return t||r.isEmpty()?r.toString():r.toNumber()},Mv=function(t){var r=gr(t);return r.isInvalidate()?null:r},Rv=h.forwardRef(function(e,t){var r,n=e.prefixCls,i=n===void 0?"rc-input-number":n,o=e.className,a=e.style,s=e.min,l=e.max,c=e.step,u=c===void 0?1:c,d=e.defaultValue,f=e.value,g=e.disabled,v=e.readOnly,m=e.upHandler,p=e.downHandler,b=e.keyboard,w=e.controls,S=w===void 0?!0:w,$=e.stringMode,y=e.parser,C=e.formatter,x=e.precision,N=e.decimalSeparator,A=e.onChange,O=e.onInput,I=e.onPressEnter,R=e.onStep,E=Vt(e,X2),_="".concat(i,"-input"),T=h.useRef(null),F=h.useState(!1),k=K(F,2),D=k[0],j=k[1],W=h.useRef(!1),U=h.useRef(!1),B=h.useRef(!1),V=h.useState(function(){return gr(f??d)}),re=K(V,2),H=re[0],le=re[1];function ie(ce){f===void 0&&le(ce)}var ve=h.useCallback(function(ce,se){if(!se)return x>=0?x:Math.max(Po(ce),Po(u))},[x,u]),te=h.useCallback(function(ce){var se=String(ce);if(y)return y(se);var xe=se;return N&&(xe=xe.replace(N,".")),xe.replace(/[^\w.-]+/g,"")},[y,N]),be=h.useRef(""),Pe=h.useCallback(function(ce,se){if(C)return C(ce,{userTyping:se,input:String(be.current)});var xe=typeof ce=="number"?xs(ce):ce;if(!se){var he=ve(xe,se);if(Eu(xe)&&(N||he>=0)){var Ue=N||".";xe=Es(xe,Ue,he)}}return xe},[C,ve,N]),De=h.useState(function(){var ce=d??f;return H.isInvalidate()&&["string","number"].includes(Le(ce))?Number.isNaN(ce)?"":ce:Pe(H.toString(),!1)}),pe=K(De,2),Ee=pe[0],Me=pe[1];be.current=Ee;function We(ce,se){Me(Pe(ce.isInvalidate()?ce.toString(!1):ce.toString(!se),se))}var oe=h.useMemo(function(){return Mv(l)},[l,x]),Q=h.useMemo(function(){return Mv(s)},[s,x]),ae=h.useMemo(function(){return!oe||!H||H.isInvalidate()?!1:oe.lessEquals(H)},[oe,H]),Se=h.useMemo(function(){return!Q||!H||H.isInvalidate()?!1:H.lessEquals(Q)},[Q,H]),vt=q2(T.current,D),nt=K(vt,2),pt=nt[0],zt=nt[1],me=function(se){return oe&&!se.lessEquals(oe)?oe:Q&&!Q.lessEquals(se)?Q:null},Be=function(se){return!me(se)},je=function(se,xe){var he=se,Ue=Be(he)||he.isEmpty();if(!he.isEmpty()&&!xe&&(he=me(he)||he,Ue=!0),!v&&!g&&Ue){var bt=he.toString(),Tt=ve(bt,xe);return Tt>=0&&(he=gr(Es(bt,".",Tt)),Be(he)||(he=gr(Es(bt,".",Tt,!0)))),he.equals(H)||(ie(he),A==null||A(he.isEmpty()?null:Tv($,he)),f===void 0&&We(he,xe)),he}return H},dt=K2(),er=function ce(se){if(pt(),Me(se),!U.current){var xe=te(se),he=gr(xe);he.isNaN()||je(he,!0)}O==null||O(se),dt(function(){var Ue=se;y||(Ue=se.replace(/。/g,".")),Ue!==se&&ce(Ue)})},Re=function(){U.current=!0},Je=function(){U.current=!1,er(T.current.value)},Ve=function(se){er(se.target.value)},Pt=function(se){var xe;if(!(se&&ae||!se&&Se)){W.current=!1;var he=gr(B.current?Pv(u):u);se||(he=he.negate());var Ue=(H||gr(0)).add(he.toString()),bt=je(Ue,!1);R==null||R(Tv($,bt),{offset:B.current?Pv(u):u,type:se?"up":"down"}),(xe=T.current)===null||xe===void 0||xe.focus()}},ft=function(se){var xe=gr(te(Ee)),he=xe;xe.isNaN()?he=H:he=je(xe,se),f!==void 0?We(H,!1):he.isNaN()||We(he,!1)},tr=function(){W.current=!0},En=function(se){var xe=se.which,he=se.shiftKey;W.current=!0,he?B.current=!0:B.current=!1,xe===Y.ENTER&&(U.current||(W.current=!1),ft(!1),I==null||I(se)),b!==!1&&!U.current&&[Y.UP,Y.DOWN].includes(xe)&&(Pt(Y.UP===xe),se.preventDefault())},cn=function(){W.current=!1,B.current=!1},ur=function(){ft(!1),j(!1),W.current=!1};return _o(function(){H.isInvalidate()||We(H,!1)},[x]),_o(function(){var ce=gr(f);le(ce);var se=gr(te(Ee));(!ce.equals(se)||!W.current||C)&&We(ce,W.current)},[f]),_o(function(){C&&zt()},[Ee]),h.createElement("div",{className:q(i,o,(r={},X(r,"".concat(i,"-focused"),D),X(r,"".concat(i,"-disabled"),g),X(r,"".concat(i,"-readonly"),v),X(r,"".concat(i,"-not-a-number"),H.isNaN()),X(r,"".concat(i,"-out-of-range"),!H.isInvalidate()&&!Be(H)),r)),style:a,onFocus:function(){j(!0)},onBlur:ur,onKeyDown:En,onKeyUp:cn,onCompositionStart:Re,onCompositionEnd:Je,onBeforeInput:tr},S&&h.createElement(G2,{prefixCls:i,upNode:m,downNode:p,upDisabled:ae,downDisabled:Se,onStep:Pt}),h.createElement("div",{className:"".concat(_,"-wrap")},h.createElement("input",Et({autoComplete:"off",role:"spinbutton","aria-valuemin":s,"aria-valuemax":l,"aria-valuenow":H.isInvalidate()?null:H.toString(),step:u},E,{ref:Nn(T,t),className:_,value:Ee,onChange:Ve,disabled:g,readOnly:v}))))});Rv.displayName="InputNumber";const Y2=e=>{const{componentCls:t,lineWidth:r,lineType:n,colorBorder:i,borderRadius:o,fontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,inputPaddingHorizontalSM:u,colorTextDescription:d,motionDurationMid:f,colorPrimary:g,controlHeight:v,inputPaddingHorizontal:m,colorBgContainer:p,colorTextDisabled:b,borderRadiusSM:w,borderRadiusLG:S,controlWidth:$,handleVisible:y}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},hr(e)),Cv(e)),Sv(e,t)),{display:"inline-block",width:$,margin:0,padding:0,border:`${r}px ${n} ${i}`,borderRadius:o,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:S,[`input${t}-input`]:{height:s-2*r}},"&-sm":{padding:0,borderRadius:w,[`input${t}-input`]:{height:l-2*r,padding:`0 ${u}px`}},"&:hover":Object.assign({},Ss(e)),"&-focused":Object.assign({},Cs(e)),"&-disabled":Object.assign(Object.assign({},bv(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:c}},"&-group":Object.assign(Object.assign(Object.assign({},hr(e)),$2(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:S}},"&-sm":{[`${t}-group-addon`]:{borderRadius:w}}}}),[t]:{"&-input":Object.assign(Object.assign({width:"100%",height:v-2*r,padding:`0 ${m}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},pv(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:p,borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,opacity:y===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` ${t}-handler-up-inner, ${t}-handler-down-inner `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:d,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${r}px ${n} ${i}`,transition:`all ${f} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[` ${t}-handler-up-inner, ${t}-handler-down-inner `]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},qg()),{color:d,transition:`all ${f} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderBlockStart:`${r}px ${n} ${i}`,borderEndEndRadius:o},"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[` ${t}-handler-up-disabled, ${t}-handler-down-disabled `]:{cursor:"not-allowed"},[` ${t}-handler-up-disabled:hover &-handler-up-inner, ${t}-handler-down-disabled:hover &-handler-down-inner `]:{color:b}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},Z2=e=>{const{componentCls:t,inputPaddingHorizontal:r,inputAffixPadding:n,controlWidth:i,borderRadiusLG:o,borderRadiusSM:a}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},Cv(e)),Sv(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:o},"&-sm":{borderRadius:a},[`&:not(${t}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Ss(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:n},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:r,marginInlineStart:n}}})}},Q2=Qr("InputNumber",e=>{const t=O2(e);return[Y2(t),Z2(t),Fm(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var J2=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{getPrefixCls:r,direction:n}=h.useContext(ot),i=h.useContext(mi),[o,a]=h.useState(!1),s=h.useRef(null);h.useImperativeHandle(t,()=>s.current);const{className:l,rootClassName:c,size:u,disabled:d,prefixCls:f,addonBefore:g,addonAfter:v,prefix:m,bordered:p=!0,readOnly:b,status:w,controls:S}=e,$=J2(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),y=r("input-number",f),[C,x]=Q2(y),{compactSize:N,compactItemClassnames:A}=Rm(y,n);let O=h.createElement(z2,{className:`${y}-handler-up-inner`}),I=h.createElement(IP,{className:`${y}-handler-down-inner`});const R=typeof S=="boolean"?S:void 0;typeof S=="object"&&(O=typeof S.upIcon>"u"?O:h.createElement("span",{className:`${y}-handler-up-inner`},S.upIcon),I=typeof S.downIcon>"u"?I:h.createElement("span",{className:`${y}-handler-down-inner`},S.downIcon));const{hasFeedback:E,status:_,isFormItemInput:T,feedbackIcon:F}=h.useContext($o),k=AP(_,w),D=N||u||i,j=m!=null||E,W=!!(g||v),U=h.useContext(So),B=d??U,V=q({[`${y}-lg`]:D==="large",[`${y}-sm`]:D==="small",[`${y}-rtl`]:n==="rtl",[`${y}-borderless`]:!p,[`${y}-in-form-item`]:T},vu(y,k),A,x,l,!j&&!W&&c);let re=h.createElement(Rv,Object.assign({ref:s,disabled:B,className:V,upHandler:O,downHandler:I,prefixCls:y,readOnly:b,controls:R},$));if(j){const H=q(`${y}-affix-wrapper`,vu(`${y}-affix-wrapper`,k,E),{[`${y}-affix-wrapper-focused`]:o,[`${y}-affix-wrapper-disabled`]:e.disabled,[`${y}-affix-wrapper-sm`]:D==="small",[`${y}-affix-wrapper-lg`]:D==="large",[`${y}-affix-wrapper-rtl`]:n==="rtl",[`${y}-affix-wrapper-readonly`]:b,[`${y}-affix-wrapper-borderless`]:!p},!W&&l,!W&&c,x);re=h.createElement("div",{className:H,style:e.style,onMouseUp:()=>s.current.focus()},m&&h.createElement("span",{className:`${y}-prefix`},m),Si(re,{style:null,value:e.value,onFocus:le=>{var ie;a(!0),(ie=e.onFocus)===null||ie===void 0||ie.call(e,le)},onBlur:le=>{var ie;a(!1),(ie=e.onBlur)===null||ie===void 0||ie.call(e,le)}}),E&&h.createElement("span",{className:`${y}-suffix`},F))}if(W){const H=`${y}-group`,le=`${H}-addon`,ie=g?h.createElement("div",{className:le},g):null,ve=v?h.createElement("div",{className:le},v):null,te=q(`${y}-wrapper`,H,x,{[`${H}-rtl`]:n==="rtl"}),be=q(`${y}-group-wrapper`,{[`${y}-group-wrapper-sm`]:D==="small",[`${y}-group-wrapper-lg`]:D==="large",[`${y}-group-wrapper-rtl`]:n==="rtl"},vu(`${y}-group-wrapper`,k,E),x,l,c);re=h.createElement("div",{className:be,style:e.style},h.createElement("div",{className:te},ie&&h.createElement(Am,null,h.createElement(Gm,{status:!0,override:!0},ie)),Si(re,{style:null,disabled:B}),ve&&h.createElement(Am,null,h.createElement(Gm,{status:!0,override:!0},ve))))}return C(re)}),Nv=Av,eT=e=>h.createElement(Qg,{theme:{components:{InputNumber:{handleVisible:!0}}}},h.createElement(Av,Object.assign({},e)));Nv._InternalPanelDoNotUseOrYouWillBeFired=eT;const kv=Nv;var jn=h.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0});function _u(e,t,r){return(e-t)/(r-t)}function $u(e,t,r,n){var i=_u(t,r,n),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Oi(e,t){return Array.isArray(e)?e[t]:e}var tT=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],rT=h.forwardRef(function(e,t){var r,n,i=e.prefixCls,o=e.value,a=e.valueIndex,s=e.onStartMove,l=e.style,c=e.render,u=e.dragging,d=e.onOffsetChange,f=Vt(e,tT),g=h.useContext(jn),v=g.min,m=g.max,p=g.direction,b=g.disabled,w=g.keyboard,S=g.range,$=g.tabIndex,y=g.ariaLabelForHandle,C=g.ariaLabelledByForHandle,x=g.ariaValueTextFormatterForHandle,N="".concat(i,"-handle"),A=function(_){b||s(_,a)},O=function(_){if(!b&&w){var T=null;switch(_.which||_.keyCode){case Y.LEFT:T=p==="ltr"||p==="btt"?-1:1;break;case Y.RIGHT:T=p==="ltr"||p==="btt"?1:-1;break;case Y.UP:T=p!=="ttb"?1:-1;break;case Y.DOWN:T=p!=="ttb"?-1:1;break;case Y.HOME:T="min";break;case Y.END:T="max";break;case Y.PAGE_UP:T=2;break;case Y.PAGE_DOWN:T=-2;break}T!==null&&(_.preventDefault(),d(T,a))}},I=$u(p,o,v,m),R=h.createElement("div",Et({ref:t,className:q(N,(r={},X(r,"".concat(N,"-").concat(a+1),S),X(r,"".concat(N,"-dragging"),u),r)),style:z(z({},I),l),onMouseDown:A,onTouchStart:A,onKeyDown:O,tabIndex:b?null:Oi($,a),role:"slider","aria-valuemin":v,"aria-valuemax":m,"aria-valuenow":o,"aria-disabled":b,"aria-label":Oi(y,a),"aria-labelledby":Oi(C,a),"aria-valuetext":(n=Oi(x,a))===null||n===void 0?void 0:n(o)},f));return c&&(R=c(R,{index:a,prefixCls:i,value:o,dragging:u})),R}),nT=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],iT=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.style,i=e.onStartMove,o=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.draggingIndex,c=Vt(e,nT),u=h.useRef({});return h.useImperativeHandle(t,function(){return{focus:function(f){var g;(g=u.current[f])===null||g===void 0||g.focus()}}}),h.createElement(h.Fragment,null,a.map(function(d,f){return h.createElement(rT,Et({ref:function(v){v?u.current[f]=v:delete u.current[f]},dragging:l===f,prefixCls:r,style:Oi(n,f),key:f,value:d,valueIndex:f,onStartMove:i,onOffsetChange:o,render:s},c))}))});function Iv(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function oT(e,t,r,n,i,o,a,s,l){var c=h.useState(null),u=K(c,2),d=u[0],f=u[1],g=h.useState(-1),v=K(g,2),m=v[0],p=v[1],b=h.useState(r),w=K(b,2),S=w[0],$=w[1],y=h.useState(r),C=K(y,2),x=C[0],N=C[1],A=h.useRef(null),O=h.useRef(null);h.useEffect(function(){m===-1&&$(r)},[r,m]),h.useEffect(function(){return function(){document.removeEventListener("mousemove",A.current),document.removeEventListener("mouseup",O.current),document.removeEventListener("touchmove",A.current),document.removeEventListener("touchend",O.current)}},[]);var I=function(k,D){S.some(function(j,W){return j!==k[W]})&&(D!==void 0&&f(D),$(k),a(k))},R=function(k,D){if(k===-1){var j=x[0],W=x[x.length-1],U=n-j,B=i-W,V=D*(i-n);V=Math.max(V,U),V=Math.min(V,B);var re=o(j+V);V=re-j;var H=x.map(function(te){return te+V});I(H)}else{var le=(i-n)*D,ie=ee(S);ie[k]=x[k];var ve=l(ie,le,k,"dist");I(ve.values,ve.value)}},E=h.useRef(R);E.current=R;var _=function(k,D){k.stopPropagation();var j=r[D];p(D),f(j),N(r);var W=Iv(k),U=W.pageX,B=W.pageY,V=function(le){le.preventDefault();var ie=Iv(le),ve=ie.pageX,te=ie.pageY,be=ve-U,Pe=te-B,De=e.current.getBoundingClientRect(),pe=De.width,Ee=De.height,Me;switch(t){case"btt":Me=-Pe/Ee;break;case"ttb":Me=Pe/Ee;break;case"rtl":Me=-be/pe;break;default:Me=be/pe}E.current(D,Me)},re=function H(le){le.preventDefault(),document.removeEventListener("mouseup",H),document.removeEventListener("mousemove",V),document.removeEventListener("touchend",H),document.removeEventListener("touchmove",V),A.current=null,O.current=null,p(-1),s()};document.addEventListener("mouseup",re),document.addEventListener("mousemove",V),document.addEventListener("touchend",re),document.addEventListener("touchmove",V),A.current=V,O.current=re},T=h.useMemo(function(){var F=ee(r).sort(function(D,j){return D-j}),k=ee(S).sort(function(D,j){return D-j});return F.every(function(D,j){return D===k[j]})?S:r},[r,S]);return[m,d,T,_]}function aT(e){var t=e.prefixCls,r=e.style,n=e.start,i=e.end,o=e.index,a=e.onStartMove,s=h.useContext(jn),l=s.direction,c=s.min,u=s.max,d=s.disabled,f=s.range,g="".concat(t,"-track"),v=_u(n,c,u),m=_u(i,c,u),p=function(S){!d&&a&&a(S,-1)},b={};switch(l){case"rtl":b.right="".concat(v*100,"%"),b.width="".concat(m*100-v*100,"%");break;case"btt":b.bottom="".concat(v*100,"%"),b.height="".concat(m*100-v*100,"%");break;case"ttb":b.top="".concat(v*100,"%"),b.height="".concat(m*100-v*100,"%");break;default:b.left="".concat(v*100,"%"),b.width="".concat(m*100-v*100,"%")}return h.createElement("div",{className:q(g,f&&"".concat(g,"-").concat(o+1)),style:z(z({},b),r),onMouseDown:p,onTouchStart:p})}function sT(e){var t=e.prefixCls,r=e.style,n=e.values,i=e.startPoint,o=e.onStartMove,a=h.useContext(jn),s=a.included,l=a.range,c=a.min,u=h.useMemo(function(){if(!l){if(n.length===0)return[];var d=i??c,f=n[0];return[{start:Math.min(d,f),end:Math.max(d,f)}]}for(var g=[],v=0;v3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof m=="number"){var w,S=v[p],$=S+m,y=[];n.forEach(function(O){y.push(O.value)}),y.push(e,t),y.push(s(S));var C=m>0?1:-1;b==="unit"?y.push(s(S+C*r)):y.push(s($)),y=y.filter(function(O){return O!==null}).filter(function(O){return m<0?O<=S:O>=S}),b==="unit"&&(y=y.filter(function(O){return O!==S}));var x=b==="unit"?S:$;w=y[0];var N=Math.abs(w-x);if(y.forEach(function(O){var I=Math.abs(O-x);I1){var A=ee(v);return A[p]=w,g(A,m-C,p,b)}return w}else{if(m==="min")return e;if(m==="max")return t}},u=function(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",w=v[p],S=c(v,m,p,b);return{value:S,changed:S!==w}},d=function(v){return o===null&&v===0||typeof o=="number"&&v3&&arguments[3]!==void 0?arguments[3]:"unit",w=v.map(l),S=w[p],$=c(w,m,p,b);if(w[p]=$,i===!1){var y=o||0;p>0&&w[p-1]!==S&&(w[p]=Math.max(w[p],w[p-1]+y)),p0;A-=1)for(var O=!0;d(w[A]-w[A-1])&&O;){var I=u(w,-1,A-1);w[A-1]=I.value,O=I.changed}for(var R=w.length-1;R>0;R-=1)for(var E=!0;d(w[R]-w[R-1])&&E;){var _=u(w,-1,R-1);w[R-1]=_.value,E=_.changed}for(var T=0;T=0?_:!1},[_,ae]),vt=h.useMemo(function(){var Ae=Object.keys(le||{});return Ae.map(function(we){var de=le[we],Ke={value:Number(we)};return de&&Le(de)==="object"&&!h.isValidElement(de)&&("label"in de||"style"in de)?(Ke.style=de.style,Ke.label=de.label):Ke.label=de,Ke}).filter(function(we){var de=we.label;return de||typeof de=="number"}).sort(function(we,de){return we.value-de.value})},[le]),nt=fT(oe,Q,ae,vt,R,Se),pt=K(nt,2),zt=pt[0],me=pt[1],Be=vs(y,{value:$}),je=K(Be,2),dt=je[0],er=je[1],Re=h.useMemo(function(){var Ae=dt==null?[]:Array.isArray(dt)?dt:[dt],we=K(Ae,1),de=we[0],Ke=de===void 0?oe:de,ze=dt===null?[]:[Ke];if(C){if(ze=ee(Ae),x||dt===void 0){var Er=x>=0?x+1:2;for(ze=ze.slice(0,Er);ze.length=0&&Ee.current.focus(Ae)}ce(null)},[ur]);var xe=h.useMemo(function(){return T&&ae===null?!1:T},[T,ae]),he=function(){O==null||O(Ve(Je.current))},Ue=oT(Me,We,Re,oe,Q,zt,Pt,he,me),bt=K(Ue,4),Tt=bt[0],zr=bt[1],xr=bt[2],Kn=bt[3],rr=function(we,de){Kn(we,de),A==null||A(Ve(Je.current))},un=Tt!==-1;h.useEffect(function(){if(!un){var Ae=Re.lastIndexOf(zr);Ee.current.focus(Ae)}},[un]);var Ht=h.useMemo(function(){return ee(xr).sort(function(Ae,we){return Ae-we})},[xr]),Xn=h.useMemo(function(){return C?[Ht[0],Ht[Ht.length-1]]:[oe,Ht[0]]},[Ht,C,oe]),_n=K(Xn,2),Hr=_n[0],dn=_n[1];h.useImperativeHandle(t,function(){return{focus:function(){Ee.current.focus(0)},blur:function(){var we=document,de=we.activeElement;Me.current.contains(de)&&(de==null||de.blur())}}}),h.useEffect(function(){d&&Ee.current.focus(0)},[]);var Wr=h.useMemo(function(){return{min:oe,max:Q,direction:We,disabled:l,keyboard:u,step:ae,included:j,includedStart:Hr,includedEnd:dn,range:C,tabIndex:be,ariaLabelForHandle:Pe,ariaLabelledByForHandle:De,ariaValueTextFormatterForHandle:pe}},[oe,Q,We,l,u,ae,j,Hr,dn,C,be,Pe,De,pe]);return h.createElement(jn.Provider,{value:Wr},h.createElement("div",{ref:Me,className:q(i,o,(r={},X(r,"".concat(i,"-disabled"),l),X(r,"".concat(i,"-vertical"),k),X(r,"".concat(i,"-horizontal"),!k),X(r,"".concat(i,"-with-marks"),vt.length),r)),style:a,onMouseDown:tr},h.createElement("div",{className:"".concat(i,"-rail"),style:V}),h.createElement(sT,{prefixCls:i,style:U,values:Ht,startPoint:W,onStartMove:xe?rr:null}),h.createElement(dT,{prefixCls:i,marks:vt,dots:ie,style:re,activeStyle:H}),h.createElement(iT,{ref:Ee,prefixCls:i,style:B,values:xr,draggingIndex:Tt,onStartMove:rr,onOffsetChange:se,onFocus:f,onBlur:g,handleRender:ve}),h.createElement(cT,{prefixCls:i,marks:vt,onClick:ft})))});const gT=h.forwardRef((e,t)=>{const{open:r}=e,n=M.useRef(null),i=M.useRef(null);function o(){Jr.cancel(i.current),i.current=null}function a(){i.current=Jr(()=>{var s;(s=n.current)===null||s===void 0||s.forceAlign(),i.current=null})}return h.useEffect(()=>(r?a():o(),o),[r,e.title]),h.createElement(bu,Object.assign({ref:Nn(n,t)},e))}),mT=e=>{const{componentCls:t,controlSize:r,dotSize:n,marginFull:i,marginPart:o,colorFillContentHover:a}=e;return{[t]:Object.assign(Object.assign({},hr(e)),{position:"relative",height:r,margin:`${o}px ${i}px`,padding:0,cursor:"pointer",touchAction:"none",["&-vertical"]:{margin:`${i}px ${o}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` inset-inline-start ${e.motionDurationMid}, inset-block-start ${e.motionDurationMid}, width ${e.motionDurationMid}, height ${e.motionDurationMid}, box-shadow ${e.motionDurationMid} `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:n,height:n,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.colorPrimaryBorder}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[` ${t}-dot `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new _t(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexShortString()}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot `]:{cursor:"not-allowed !important"}}})}},Fv=(e,t)=>{const{componentCls:r,railSize:n,handleSize:i,dotSize:o}=e,a=t?"paddingBlock":"paddingInline",s=t?"width":"height",l=t?"height":"width",c=t?"insetBlockStart":"insetInlineStart",u=t?"top":"insetInlineStart";return{[a]:n,[l]:n*3,[`${r}-rail`]:{[s]:"100%",[l]:n},[`${r}-track`]:{[l]:n},[`${r}-handle`]:{[c]:(n*3-i)/2},[`${r}-mark`]:{insetInlineStart:0,top:0,[u]:i,[s]:"100%"},[`${r}-step`]:{insetInlineStart:0,top:0,[u]:n,[s]:"100%",[l]:n},[`${r}-dot`]:{position:"absolute",[c]:(n-o)/2}}},vT=e=>{const{componentCls:t,marginPartWithMark:r}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},Fv(e,!0)),{[`&${t}-with-marks`]:{marginBottom:r}})}},pT=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},Fv(e,!1)),{height:"100%"})}},bT=Qr("Slider",e=>{const t=Ft(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[mT(t),vT(t),pT(t)]},e=>{const r=e.controlHeightLG/4,n=e.controlHeightSM/2,i=e.lineWidth+1,o=e.lineWidth+1*3;return{controlSize:r,railSize:4,handleSize:r,handleSizeHover:n,dotSize:8,handleLineWidth:i,handleLineWidthHover:o}});var yT=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);itypeof e=="number"?e.toString():"",ST=h.forwardRef((e,t)=>{const{prefixCls:r,range:n,className:i,rootClassName:o,tooltipPrefixCls:a,tipFormatter:s,tooltipVisible:l,getTooltipPopupContainer:c,tooltipPlacement:u}=e,d=yT(e,["prefixCls","range","className","rootClassName","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{getPrefixCls:f,direction:g,getPopupContainer:v}=h.useContext(ot),[m,p]=h.useState({}),b=(O,I)=>{p(R=>Object.assign(Object.assign({},R),{[O]:I}))},w=(O,I)=>O||(I?g==="rtl"?"left":"right":"top"),S=f("slider",r),[$,y]=bT(S),C=q(i,o,{[`${S}-rtl`]:g==="rtl"},y);g==="rtl"&&!d.vertical&&(d.reverse=!d.reverse);const[x,N]=h.useMemo(()=>n?typeof n=="object"?[!0,n.draggableTrack]:[!0,!1]:[!1],[n]),A=(O,I)=>{var R;const{index:E,dragging:_}=I,{tooltip:T={},vertical:F}=e,k=Object.assign({},T),{open:D,placement:j,getPopupContainer:W,prefixCls:U,formatter:B}=k;let V;B||B===null?V=B:s||s===null?V=s:V=wT;const re=V?m[E]||_:!1,H=(R=D??l)!==null&&R!==void 0?R:D===void 0&&re,le=Object.assign(Object.assign({},O.props),{onMouseEnter:()=>b(E,!0),onMouseLeave:()=>b(E,!1)}),ie=f("tooltip",U??a);return h.createElement(gT,{prefixCls:ie,title:V?V(I.value):"",open:H,placement:w(j??u,F),key:E,overlayClassName:`${S}-tooltip`,getPopupContainer:W||c||v},h.cloneElement(O,le))};return $(h.createElement(hT,Object.assign({},d,{step:d.step,range:x,draggableTrack:N,className:C,ref:t,prefixCls:S,handleRender:A})))});function CT(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const _s=(e,t,r)=>{const n=CT(r);return{[`${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`]}}},xT=e=>Xg(e,(t,r)=>{let{textColor:n,lightBorderColor:i,lightColor:o,darkColor:a}=r;return{[`${e.componentCls}-${t}`]:{color:n,background:o,borderColor:i,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),ET=e=>{const{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:i}=e,o=n-r,a=t-r;return{[i]:Object.assign(Object.assign({},hr(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:o,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${i}-close-icon`]:{marginInlineStart:a,color:e.colorTextDescription,fontSize:e.tagIconSize,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}}},Lv=Qr("Tag",e=>{const{fontSize:t,lineHeight:r,lineWidth:n,fontSizeIcon:i}=e,o=Math.round(t*r),a=e.fontSizeSM,s=o-n*2,l=e.colorFillQuaternary,c=e.colorText,u=Ft(e,{tagFontSize:a,tagLineHeight:s,tagDefaultBg:l,tagDefaultColor:c,tagIconSize:i-2*n,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[ET(u),xT(u),_s(u,"success","Success"),_s(u,"processing","Info"),_s(u,"error","Error"),_s(u,"warning","Warning")]});var _T=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{prefixCls:t,className:r,checked:n,onChange:i,onClick:o}=e,a=_T(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=h.useContext(ot),l=g=>{i==null||i(!n),o==null||o(g)},c=s("tag",t),[u,d]=Lv(c),f=q(c,{[`${c}-checkable`]:!0,[`${c}-checkable-checked`]:n},r,d);return u(h.createElement("span",Object.assign({},a,{className:f,onClick:l})))};var OT=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{prefixCls:r,className:n,rootClassName:i,style:o,children:a,icon:s,color:l,onClose:c,closeIcon:u,closable:d=!1,bordered:f=!0}=e,g=OT(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:v,direction:m}=h.useContext(ot),[p,b]=h.useState(!0);h.useEffect(()=>{"visible"in g&&b(g.visible)},[g.visible]);const w=av(l)||e2(l),S=Object.assign({backgroundColor:l&&!w?l:void 0},o),$=v("tag",r),[y,C]=Lv($),x=q($,{[`${$}-${l}`]:w,[`${$}-has-color`]:l&&!w,[`${$}-hidden`]:!p,[`${$}-rtl`]:m==="rtl",[`${$}-borderless`]:!f},n,i,C),N=_=>{_.stopPropagation(),c==null||c(_),!_.defaultPrevented&&b(!1)},A=h.useMemo(()=>d?u?h.createElement("span",{className:`${$}-close-icon`,onClick:N},u):h.createElement(M$,{className:`${$}-close-icon`,onClick:N}):null,[d,u,$,N]),O=typeof g.onClick=="function"||a&&a.type==="a",I=s||null,R=I?h.createElement(h.Fragment,null,I,h.createElement("span",null,a)):a,E=h.createElement("span",Object.assign({},g,{ref:t,className:x,style:S}),R,A);return y(O?h.createElement(Pm,null,E):E)},Dv=h.forwardRef(PT);Dv.CheckableTag=$T;const To=Dv;function jv({children:e}){const t=Yl();return L(Qg,{theme:{algorithm:t?pu.darkAlgorithm:pu.defaultAlgorithm,token:{colorPrimary:"#ff6699"}},children:e})}function TT(e){return L(bu,{...e,zIndex:11100,overlayStyle:{width:"max-content",maxWidth:"50vw",...e.overlayInnerStyle},children:e.children})}var Pi={},MT={get exports(){return Pi},set exports(e){Pi=e}};const RT=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),zv=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Hv=({clearTimeout:e,setTimeout:t,willResolve:r})=>(n,{value:i,signal:o}={})=>{if(o&&o.aborted)return Promise.reject(zv());let a,s,l;const c=e||clearTimeout,u=()=>{c(a),l(zv())},d=()=>{o&&o.removeEventListener("abort",u)},f=new Promise((g,v)=>{s=()=>{d(),r?g(i):v(i)},l=v,a=(t||setTimeout)(s,n)});return o&&o.addEventListener("abort",u,{once:!0}),f.clear=()=>{c(a),a=null,s()},f},Wv=e=>{const t=Hv({...e,willResolve:!0});return t.reject=Hv({...e,willResolve:!1}),t.range=(r,n,i)=>t(RT(r,n),i),t},Ou=Wv();Ou.createWithTimers=Wv,MT.exports=Ou,Pi.default=Ou;const AT=10*1e3,NT=200;async function Bv(e,t){let r=[];const n=()=>{r=Array.from(document.querySelectorAll(e))};n();const i=performance.now();for(;!r.length&&performance.now()-it.remove())}function Vv(){var t;const e=(((t=document.activeElement)==null?void 0:t.tagName)||"").toLowerCase();return!!(["input","textarea"].includes(e)||document.querySelector(".center-search__bar.is-focus"))}var $s,Uv=$e;$s=Uv.createRoot,Uv.hydrateRoot;const ON="";var Tu={},Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.DEFAULT_ICON_CONFIGS=void 0,Lt.IconConverter=Yv,Lt.IconProvider=void 0,Lt.IconWrapper=HT;var Os=kT(M);function Gv(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Gv=function(n){return n?r:t})(e)}function kT(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Gv(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}var IT=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function qv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kv(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DT(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}var Xv={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};Lt.DEFAULT_ICON_CONFIGS=Xv;function jT(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Yv(e,t,r){var n=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],o=t.theme||r.theme;switch(o){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:i,id:e}}var Zv=(0,Os.createContext)(Xv),zT=Zv.Provider;Lt.IconProvider=zT;function HT(e,t,r){return function(n){var i=n.size,o=n.strokeWidth,a=n.strokeLinecap,s=n.strokeLinejoin,l=n.theme,c=n.fill,u=n.className,d=n.spin,f=LT(n,IT),g=(0,Os.useContext)(Zv),v=(0,Os.useMemo)(jT,[]),m=Yv(v,{size:i,strokeWidth:o,strokeLinecap:a,strokeLinejoin:s,theme:l,fill:c},g),p=[g.prefix+"-icon"];return p.push(g.prefix+"-icon-"+e),t&&g.rtl&&p.push(g.prefix+"-icon-rtl"),d&&p.push(g.prefix+"-icon-spin"),u&&p.push(u),Os.default.createElement("span",Kv(Kv({},f),{},{className:p.join(" ")}),r(m))}}Object.defineProperty(Tu,"__esModule",{value:!0});var Qv=Tu.default=void 0,Mu=BT(M),WT=Lt;function BT(e){return e&&e.__esModule?e:{default:e}}var VT=(0,WT.IconWrapper)("close",!1,function(e){return Mu.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Mu.default.createElement("path",{d:"M8 8L40 40",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Mu.default.createElement("path",{d:"M8 40L40 8",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Qv=Tu.default=VT;var Ru={};Object.defineProperty(Ru,"__esModule",{value:!0});var Jv=Ru.default=void 0,Au=GT(M),UT=Lt;function GT(e){return e&&e.__esModule?e:{default:e}}var qT=(0,UT.IconWrapper)("config",!1,function(e){return Au.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Au.default.createElement("path",{d:"M24 4L18 10H10V18L4 24L10 30V38H18L24 44L30 38H38V30L44 24L38 18V10H30L24 4Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Au.default.createElement("path",{d:"M24 30C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30Z",fill:e.colors[3],stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}))});Jv=Ru.default=qT;var Nu={};Object.defineProperty(Nu,"__esModule",{value:!0});var ep=Nu.default=void 0,Mo=XT(M),KT=Lt;function XT(e){return e&&e.__esModule?e:{default:e}}var YT=(0,KT.IconWrapper)("distraught-face",!1,function(e){return Mo.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Mo.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Mo.default.createElement("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Mo.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Mo.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});ep=Nu.default=YT;var ku={};Object.defineProperty(ku,"__esModule",{value:!0});var tp=ku.default=void 0,Ro=QT(M),ZT=Lt;function QT(e){return e&&e.__esModule?e:{default:e}}var JT=(0,ZT.IconWrapper)("info",!0,function(e){return Ro.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Ro.default.createElement("path",{d:"M24 44C29.5228 44 34.5228 41.7614 38.1421 38.1421C41.7614 34.5228 44 29.5228 44 24C44 18.4772 41.7614 13.4772 38.1421 9.85786C34.5228 6.23858 29.5228 4 24 4C18.4772 4 13.4772 6.23858 9.85786 9.85786C6.23858 13.4772 4 18.4772 4 24C4 29.5228 6.23858 34.5228 9.85786 38.1421C13.4772 41.7614 18.4772 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Ro.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 11C25.3807 11 26.5 12.1193 26.5 13.5C26.5 14.8807 25.3807 16 24 16C22.6193 16 21.5 14.8807 21.5 13.5C21.5 12.1193 22.6193 11 24 11Z",fill:e.colors[2]}),Ro.default.createElement("path",{d:"M24.5 34V20H23.5H22.5",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Ro.default.createElement("path",{d:"M21 34H28",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});tp=ku.default=JT;var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});var rp=Iu.default=void 0,Fu=tM(M),eM=Lt;function tM(e){return e&&e.__esModule?e:{default:e}}var rM=(0,eM.IconWrapper)("loading",!0,function(e){return Fu.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Fu.default.createElement("path",{d:"M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Fu.default.createElement("path",{d:"M36 24C36 17.3726 30.6274 12 24 12C17.3726 12 12 17.3726 12 24C12 30.6274 17.3726 36 24 36V36",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});rp=Iu.default=rM;var Lu={};Object.defineProperty(Lu,"__esModule",{value:!0});var np=Lu.default=void 0,Rr=iM(M),nM=Lt;function iM(e){return e&&e.__esModule?e:{default:e}}var oM=(0,nM.IconWrapper)("loading-three",!1,function(e){return Rr.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Rr.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M24 12V15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M32.4852 15.5147L30.3639 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M36 24H33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M32.4852 32.4853L30.3639 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M24 36V33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M15.5148 32.4853L17.6361 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M12 24H15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rr.default.createElement("path",{d:"M15.5148 15.5147L17.6361 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});np=Lu.default=oM;var Du={};Object.defineProperty(Du,"__esModule",{value:!0});var ip=Du.default=void 0,ju=sM(M),aM=Lt;function sM(e){return e&&e.__esModule?e:{default:e}}var lM=(0,aM.IconWrapper)("return",!0,function(e){return ju.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},ju.default.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ju.default.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});ip=Du.default=lM;const cM={Close:Qv,Config:Jv,DistraughtFace:ep,Return:ip,Loading:rp,LoadingThree:np,Info:tp};function Sn({name:e,theme:t,size:r,fill:n,...i}){t||(t="outline"),r||(r=24);const o=Yl();n||(n=o?"#fff":"#333");const a=cM[e];return L(a,{theme:t,size:r,fill:n,...i,style:{fontSize:0,...i.style}})}function Ti(){for(var e=arguments.length,t=new Array(e),r=0;r0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function et(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function $t(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n-1&&(i=setTimeout(function(){Ms.delete(e)},t)),Ms.set(e,mr(mr({},r),{timer:i}))},wM=function(e){return Ms.get(e)},Rs=new Map,SM=function(e){return Rs.get(e)},CM=function(e,t){Rs.set(e,t),t.then(function(r){return Rs.delete(e),r}).catch(function(){Rs.delete(e)})},zn={},xM=function(e,t){zn[e]&&zn[e].forEach(function(r){return r(t)})},Bu=function(e,t){return zn[e]||(zn[e]=[]),zn[e].push(t),function(){var n=zn[e].indexOf(t);zn[e].splice(n,1)}},EM=function(e,t){var r=t.cacheKey,n=t.cacheTime,i=n===void 0?5*60*1e3:n,o=t.staleTime,a=o===void 0?0:o,s=t.setCache,l=t.getCache,c=M.useRef(),u=M.useRef(),d=function(g,v){s?s(v):yM(g,i,v),xM(g,v.data)},f=function(g,v){return v===void 0&&(v=[]),l?l(v):wM(g)};return dp(function(){if(r){var g=f(r);g&&Object.hasOwnProperty.call(g,"data")&&(e.state.data=g.data,e.state.params=g.params,(a===-1||new Date().getTime()-g.time<=a)&&(e.state.loading=!1)),c.current=Bu(r,function(v){e.setState({data:v})})}},[]),No(function(){var g;(g=c.current)===null||g===void 0||g.call(c)}),r?{onBefore:function(g){var v=f(r,g);return!v||!Object.hasOwnProperty.call(v,"data")?{}:a===-1||new Date().getTime()-v.time<=a?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:function(g,v){var m=SM(r);return m&&m!==u.current?{servicePromise:m}:(m=g.apply(void 0,$t([],et(v),!1)),u.current=m,CM(r,m),{servicePromise:m})},onSuccess:function(g,v){var m;r&&((m=c.current)===null||m===void 0||m.call(c),d(r,{data:g,params:v,time:new Date().getTime()}),c.current=Bu(r,function(p){e.setState({data:p})}))},onMutate:function(g){var v;r&&((v=c.current)===null||v===void 0||v.call(c),d(r,{data:g,params:e.state.params,time:new Date().getTime()}),c.current=Bu(r,function(m){e.setState({data:m})}))}}:{}};const _M=EM;var $M=function(e,t){var r=t.debounceWait,n=t.debounceLeading,i=t.debounceTrailing,o=t.debounceMaxWait,a=M.useRef(),s=M.useMemo(function(){var l={};return n!==void 0&&(l.leading=n),i!==void 0&&(l.trailing=i),o!==void 0&&(l.maxWait=o),l},[n,i,o]);return M.useEffect(function(){if(r){var l=e.runAsync.bind(e);return a.current=ah(function(c){c()},r,s),e.runAsync=function(){for(var c=[],u=0;u-1&&Fo.splice(r,1)}}if(ko){var fp=function(){if(!(!Vu()||!FM()))for(var e=0;e{Lo++,document.body.style.overflow="hidden"},hR=()=>{Lo--,Lo<0&&(Lo=0),Lo===0&&(document.body.style.overflow="")};function Ku({show:e,onHide:t,children:r,clsModalMask:n,clsModal:i,width:o,hideWhenMaskOnClick:a=!1,hideWhenEsc:s=!1}){M.useLayoutEffect(()=>{e?fR():hR()},[e]);const l=M.useRef(null),c=Yl(),{bg:u,c:d}=M.useMemo(()=>{const p=window.getComputedStyle(document.body)["background-color"],b=window.getComputedStyle(document.body).color;return{bg:p,c:b}},[c]),f=M.useMemo(()=>c?{"--bg":u,"--c":d,backgroundColor:u,color:d}:{},[u,d,c]),g=M.useId(),v=M.useMemo(()=>{const p=document.createElement("div");return p.setAttribute("data-id","base-modal-"+g),document.body.appendChild(p),p},[]),m=ke(p=>{var b;(b=l.current)!=null&&b.contains(p.target)||a&&t()});return gt("esc",p=>{e&&s&&(p.preventDefault(),p.stopImmediatePropagation(),setTimeout(t))}),e?$e.createPortal(L("div",{className:q(vr.modalMask,n),onClick:m,children:L("div",{className:q(vr.modal,i),style:{...f,width:o},ref:l,children:r})}),v):null}const Xu=e=>L(Sn,{...e,name:"Close",size:18,style:{cursor:"pointer",marginLeft:10,...e.style}}),yp="_toast-container_mcbuq_1",wp="_single-line_mcbuq_17",FN={toastContainer:yp,singleLine:wp};function Dt(e,t=2e3){const r=document.createElement("div");r.className=yp,r.innerText=e,!e.includes(` `)&&!e.includes("r.remove(),t)}const gR="请求失败, 请重试 !!!",mR="操作失败, 请重试 !!!";function Sp(){return Dt(gR)}function Cp(){return Dt(mR)}function vR(e){const t=so({data:Array.from(e||[]),has(r){return this.data.some(n=>n[0]===r)},set(r,n){const i=this.data.find(o=>o[0]===r);return i?i[1]=n:this.data.push([r,n]),this},get(r){var n;return(n=this.data.find(i=>i[0]===r))==null?void 0:n[1]},delete(r){const n=this.data.findIndex(i=>i[0]===r);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(r){this.data.forEach(n=>{r(n[1],n[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const xp="27eb53fc9058f8c3";async function pR(){var c,u;const t=(await Ye.get("https://passport.bilibili.com/login/app/third",{params:{appkey:xp,api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((c=t==null?void 0:t.data)!=null&&c.has_login))return{errmsg:"你必须登录B站之后才能使用授权",json:t};if(!((u=t==null?void 0:t.data)!=null&&u.confirm_uri))return{errmsg:"无法获得授权网址",json:t};const r=t.data.confirm_uri;let n,i;const o=new Promise(d=>{const f=g=>{if(g.origin!="https://www.mcbbs.net"||!g.data)return;const v=g.data.match(/access_key=([0-9a-z]{32})/);if(!v||!v[1])return d({errmsg:"没有获得匹配的密钥"});d(v[1])};window.addEventListener("message",f),i=()=>window.removeEventListener("message",f),n=setTimeout(()=>{d({errmsg:"获取授权超时"})},10*1e3)}),a=document.createElement("iframe");a.src=r,a.style.display="none",document.body.appendChild(a);function s(){a==null||a.remove(),i==null||i(),i=void 0,n&&(clearTimeout(n),n=void 0)}const l=await o;return s(),l}async function bR(){const e=await pR();if(typeof e=="object"&&"errmsg"in e){Dt(e.errmsg);return}const t=e;return _e.accessKey=t,Dt("获取成功"),t}function yR(){_e.accessKey="",Dt("已删除 access_key")}const Ep="https://api.bilibili.com",_p="https://app.bilibili.com",Ns=Ye.create({baseURL:Ep});Ns.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params={...e.params,_:Date.now()}),e},function(e){return Promise.reject(e)});const ks=Ye.create({adapter:Zn});ks.interceptors.request.use(function(e){return e.params={appkey:xp,access_key:_e.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),ks.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,r=new Uint8Array(e.data),n=t.decode(r);e.data=n;try{e.data=JSON.parse(n)}catch{}}return e});function wR(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw Dt("找不到 csrf token, 请检查是否登录"),new Error("找不到 csrf token, 请检查是否登录");return e}const Do=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,$p=new Set,SR=(e,t,r,n)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},CR=e=>!$p.has(e),Cn=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Op=e=>Cn(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Is:null:null;class Is extends Array{constructor(t){super(t),this.fill(0)}}const Fi=class{constructor(t,r){at(this,"heap");at(this,"length");if(!P(Fi,Ii))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}static create(t){const r=Op(t);if(!r)return[];ne(Fi,Ii,!0);const n=new Fi(t,r);return ne(Fi,Ii,!1),n}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};let Fs=Fi;Ii=new WeakMap,ge(Fs,Ii,!1);const wd=class{constructor(t){ge(this,Go);ge(this,qs);ge(this,Dr);ge(this,jr);ge(this,Xo);ge(this,ji);ge(this,zi);ge(this,He);ge(this,Yo);ge(this,qn);ge(this,br,void 0);ge(this,Zt,void 0);ge(this,Fr,void 0);ge(this,yr,void 0);ge(this,Li,void 0);at(this,"ttl");at(this,"ttlResolution");at(this,"ttlAutopurge");at(this,"updateAgeOnGet");at(this,"updateAgeOnHas");at(this,"allowStale");at(this,"noDisposeOnSet");at(this,"noUpdateTTL");at(this,"maxEntrySize");at(this,"sizeCalculation");at(this,"noDeleteOnFetchRejection");at(this,"noDeleteOnStaleGet");at(this,"allowStaleOnFetchAbort");at(this,"allowStaleOnFetchRejection");at(this,"ignoreFetchAbort");ge(this,ct,void 0);ge(this,wr,void 0);ge(this,ut,void 0);ge(this,qe,void 0);ge(this,ue,void 0);ge(this,At,void 0);ge(this,Qt,void 0);ge(this,Ot,void 0);ge(this,mt,void 0);ge(this,Sr,void 0);ge(this,St,void 0);ge(this,an,void 0);ge(this,sn,void 0);ge(this,Cr,void 0);ge(this,Lr,void 0);ge(this,xn,void 0);ge(this,jt,void 0);ge(this,Un,()=>{});ge(this,ln,()=>{});ge(this,qo,()=>{});ge(this,Jt,()=>!1);ge(this,Gn,t=>{});ge(this,Di,(t,r,n)=>{});ge(this,Ko,(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:g=0,maxEntrySize:v=0,sizeCalculation:m,fetchMethod:p,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:$,ignoreFetchAbort:y}=t;if(r!==0&&!Cn(r))throw new TypeError("max option must be a nonnegative integer");const C=r?Op(r):Array;if(!C)throw new Error("invalid max value: "+r);if(ne(this,br,r),ne(this,Zt,g),this.maxEntrySize=v||P(this,Zt),this.sizeCalculation=m,this.sizeCalculation){if(!P(this,Zt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(p!==void 0&&typeof p!="function")throw new TypeError("fetchMethod must be a function if specified");if(ne(this,Li,p),ne(this,xn,!!p),ne(this,ut,new Map),ne(this,qe,new Array(r).fill(void 0)),ne(this,ue,new Array(r).fill(void 0)),ne(this,At,new C(r)),ne(this,Qt,new C(r)),ne(this,Ot,0),ne(this,mt,0),ne(this,Sr,Fs.create(r)),ne(this,ct,0),ne(this,wr,0),typeof c=="function"&&ne(this,Fr,c),typeof u=="function"?(ne(this,yr,u),ne(this,St,[])):(ne(this,yr,void 0),ne(this,St,void 0)),ne(this,Lr,!!P(this,Fr)),ne(this,jt,!!P(this,yr)),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!$,this.ignoreFetchAbort=!!y,this.maxEntrySize!==0){if(P(this,Zt)!==0&&!Cn(P(this,Zt)))throw new TypeError("maxSize must be a positive integer if specified");if(!Cn(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");J(this,qs,Eb).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=Cn(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Cn(this.ttl))throw new TypeError("ttl must be a positive integer if specified");J(this,Go,Rd).call(this)}if(P(this,br)===0&&this.ttl===0&&P(this,Zt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!P(this,br)&&!P(this,Zt)){const x="LRU_CACHE_UNBOUNDED";CR(x)&&($p.add(x),SR("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,wd))}}static unsafeExposeInternals(t){return{starts:P(t,sn),ttls:P(t,Cr),sizes:P(t,an),keyMap:P(t,ut),keyList:P(t,qe),valList:P(t,ue),next:P(t,At),prev:P(t,Qt),get head(){return P(t,Ot)},get tail(){return P(t,mt)},free:P(t,Sr),isBackgroundFetch:r=>{var n;return J(n=t,He,Qe).call(n,r)},backgroundFetch:(r,n,i,o)=>{var a;return J(a=t,zi,sl).call(a,r,n,i,o)},moveToTail:r=>{var n;return J(n=t,qn,Qo).call(n,r)},indexes:r=>{var n;return J(n=t,Dr,$n).call(n,r)},rindexes:r=>{var n;return J(n=t,jr,On).call(n,r)},isStale:r=>{var n;return P(n=t,Jt).call(n,r)}}}get max(){return P(this,br)}get maxSize(){return P(this,Zt)}get calculatedSize(){return P(this,wr)}get size(){return P(this,ct)}get fetchMethod(){return P(this,Li)}get dispose(){return P(this,Fr)}get disposeAfter(){return P(this,yr)}getRemainingTTL(t){return P(this,ut).has(t)?1/0:0}*entries(){for(const t of J(this,Dr,$n).call(this))P(this,ue)[t]!==void 0&&P(this,qe)[t]!==void 0&&!J(this,He,Qe).call(this,P(this,ue)[t])&&(yield[P(this,qe)[t],P(this,ue)[t]])}*rentries(){for(const t of J(this,jr,On).call(this))P(this,ue)[t]!==void 0&&P(this,qe)[t]!==void 0&&!J(this,He,Qe).call(this,P(this,ue)[t])&&(yield[P(this,qe)[t],P(this,ue)[t]])}*keys(){for(const t of J(this,Dr,$n).call(this)){const r=P(this,qe)[t];r!==void 0&&!J(this,He,Qe).call(this,P(this,ue)[t])&&(yield r)}}*rkeys(){for(const t of J(this,jr,On).call(this)){const r=P(this,qe)[t];r!==void 0&&!J(this,He,Qe).call(this,P(this,ue)[t])&&(yield r)}}*values(){for(const t of J(this,Dr,$n).call(this))P(this,ue)[t]!==void 0&&!J(this,He,Qe).call(this,P(this,ue)[t])&&(yield P(this,ue)[t])}*rvalues(){for(const t of J(this,jr,On).call(this))P(this,ue)[t]!==void 0&&!J(this,He,Qe).call(this,P(this,ue)[t])&&(yield P(this,ue)[t])}[Symbol.iterator](){return this.entries()}find(t,r={}){for(const n of J(this,Dr,$n).call(this)){const i=P(this,ue)[n],o=J(this,He,Qe).call(this,i)?i.__staleWhileFetching:i;if(o!==void 0&&t(o,P(this,qe)[n],this))return this.get(P(this,qe)[n],r)}}forEach(t,r=this){for(const n of J(this,Dr,$n).call(this)){const i=P(this,ue)[n],o=J(this,He,Qe).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,P(this,qe)[n],this)}}rforEach(t,r=this){for(const n of J(this,jr,On).call(this)){const i=P(this,ue)[n],o=J(this,He,Qe).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,P(this,qe)[n],this)}}purgeStale(){let t=!1;for(const r of J(this,jr,On).call(this,{allowStale:!0}))P(this,Jt).call(this,r)&&(this.delete(P(this,qe)[r]),t=!0);return t}dump(){const t=[];for(const r of J(this,Dr,$n).call(this,{allowStale:!0})){const n=P(this,qe)[r],i=P(this,ue)[r],o=J(this,He,Qe).call(this,i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;const a={value:o};if(P(this,Cr)&&P(this,sn)){a.ttl=P(this,Cr)[r];const s=Do.now()-P(this,sn)[r];a.start=Math.floor(Date.now()-s)}P(this,an)&&(a.size=P(this,an)[r]),t.unshift([n,a])}return t}load(t){this.clear();for(const[r,n]of t){if(n.start){const i=Date.now()-n.start;n.start=Do.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){var f,g,v;const{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=n;let{noUpdateTTL:c=this.noUpdateTTL}=n;const u=P(this,Ko).call(this,t,r,n.size||0,s);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(t),this;let d=P(this,ct)===0?void 0:P(this,ut).get(t);if(d===void 0)d=P(this,ct)===0?P(this,mt):P(this,Sr).length!==0?P(this,Sr).pop():P(this,ct)===P(this,br)?J(this,ji,al).call(this,!1):P(this,ct),P(this,qe)[d]=t,P(this,ue)[d]=r,P(this,ut).set(t,d),P(this,At)[P(this,mt)]=d,P(this,Qt)[d]=P(this,mt),ne(this,mt,d),ol(this,ct)._++,P(this,Di).call(this,d,u,l),l&&(l.set="add"),c=!1;else{J(this,qn,Qo).call(this,d);const m=P(this,ue)[d];if(r!==m){if(P(this,xn)&&J(this,He,Qe).call(this,m)?m.__abortController.abort(new Error("replaced")):a||(P(this,Lr)&&((f=P(this,Fr))==null||f.call(this,m,t,"set")),P(this,jt)&&((g=P(this,St))==null||g.push([m,t,"set"]))),P(this,Gn).call(this,d),P(this,Di).call(this,d,u,l),P(this,ue)[d]=r,l){l.set="replace";const p=m&&J(this,He,Qe).call(this,m)?m.__staleWhileFetching:m;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(i!==0&&!P(this,Cr)&&J(this,Go,Rd).call(this),P(this,Cr)&&(c||P(this,qo).call(this,d,i,o),l&&P(this,ln).call(this,l,d)),!a&&P(this,jt)&&P(this,St)){const m=P(this,St);let p;for(;p=m==null?void 0:m.shift();)(v=P(this,yr))==null||v.call(this,...p)}return this}pop(){var t;try{for(;P(this,ct);){const r=P(this,ue)[P(this,Ot)];if(J(this,ji,al).call(this,!0),J(this,He,Qe).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(P(this,jt)&&P(this,St)){const r=P(this,St);let n;for(;n=r==null?void 0:r.shift();)(t=P(this,yr))==null||t.call(this,...n)}}}has(t,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=P(this,ut).get(t);if(o!==void 0){const a=P(this,ue)[o];if(J(this,He,Qe).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(P(this,Jt).call(this,o))i&&(i.has="stale",P(this,ln).call(this,i,o));else return n&&P(this,Un).call(this,o),i&&(i.has="hit",P(this,ln).call(this,i,o)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){const{allowStale:n=this.allowStale}=r,i=P(this,ut).get(t);if(i!==void 0&&(n||!P(this,Jt).call(this,i))){const o=P(this,ue)[i];return J(this,He,Qe).call(this,o)?o.__staleWhileFetching:o}}async fetch(t,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:v=this.allowStaleOnFetchAbort,context:m,forceRefresh:p=!1,status:b,signal:w}=r;if(!P(this,xn))return b&&(b.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:b});const S={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:v,ignoreFetchAbort:g,status:b,signal:w};let $=P(this,ut).get(t);if($===void 0){b&&(b.fetch="miss");const y=J(this,zi,sl).call(this,t,$,S,m);return y.__returned=y}else{const y=P(this,ue)[$];if(J(this,He,Qe).call(this,y)){const O=n&&y.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",O&&(b.returnedStale=!0)),O?y.__staleWhileFetching:y.__returned=y}const C=P(this,Jt).call(this,$);if(!p&&!C)return b&&(b.fetch="hit"),J(this,qn,Qo).call(this,$),i&&P(this,Un).call(this,$),b&&P(this,ln).call(this,b,$),y;const x=J(this,zi,sl).call(this,t,$,S,m),A=x.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=C?"stale":"refresh",A&&C&&(b.returnedStale=!0)),A?x.__staleWhileFetching:x.__returned=x}}get(t,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,s=P(this,ut).get(t);if(s!==void 0){const l=P(this,ue)[s],c=J(this,He,Qe).call(this,l);return a&&P(this,ln).call(this,a,s),P(this,Jt).call(this,s)?(a&&(a.get="stale"),c?(a&&n&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?l.__staleWhileFetching:void 0):(o||this.delete(t),a&&n&&(a.returnedStale=!0),n?l:void 0)):(a&&(a.get="hit"),c?l.__staleWhileFetching:(J(this,qn,Qo).call(this,s),i&&P(this,Un).call(this,s),l))}else a&&(a.get="miss")}delete(t){var n,i,o,a;let r=!1;if(P(this,ct)!==0){const s=P(this,ut).get(t);if(s!==void 0)if(r=!0,P(this,ct)===1)this.clear();else{P(this,Gn).call(this,s);const l=P(this,ue)[s];J(this,He,Qe).call(this,l)?l.__abortController.abort(new Error("deleted")):(P(this,Lr)||P(this,jt))&&(P(this,Lr)&&((n=P(this,Fr))==null||n.call(this,l,t,"delete")),P(this,jt)&&((i=P(this,St))==null||i.push([l,t,"delete"]))),P(this,ut).delete(t),P(this,qe)[s]=void 0,P(this,ue)[s]=void 0,s===P(this,mt)?ne(this,mt,P(this,Qt)[s]):s===P(this,Ot)?ne(this,Ot,P(this,At)[s]):(P(this,At)[P(this,Qt)[s]]=P(this,At)[s],P(this,Qt)[P(this,At)[s]]=P(this,Qt)[s]),ol(this,ct)._--,P(this,Sr).push(s)}}if(P(this,jt)&&((o=P(this,St))!=null&&o.length)){const s=P(this,St);let l;for(;l=s==null?void 0:s.shift();)(a=P(this,yr))==null||a.call(this,...l)}return r}clear(){var t,r,n;for(const i of J(this,jr,On).call(this,{allowStale:!0})){const o=P(this,ue)[i];if(J(this,He,Qe).call(this,o))o.__abortController.abort(new Error("deleted"));else{const a=P(this,qe)[i];P(this,Lr)&&((t=P(this,Fr))==null||t.call(this,o,a,"delete")),P(this,jt)&&((r=P(this,St))==null||r.push([o,a,"delete"]))}}if(P(this,ut).clear(),P(this,ue).fill(void 0),P(this,qe).fill(void 0),P(this,Cr)&&P(this,sn)&&(P(this,Cr).fill(0),P(this,sn).fill(0)),P(this,an)&&P(this,an).fill(0),ne(this,Ot,0),ne(this,mt,0),P(this,Sr).length=0,ne(this,wr,0),ne(this,ct,0),P(this,jt)&&P(this,St)){const i=P(this,St);let o;for(;o=i==null?void 0:i.shift();)(n=P(this,yr))==null||n.call(this,...o)}}};let Yu=wd;br=new WeakMap,Zt=new WeakMap,Fr=new WeakMap,yr=new WeakMap,Li=new WeakMap,ct=new WeakMap,wr=new WeakMap,ut=new WeakMap,qe=new WeakMap,ue=new WeakMap,At=new WeakMap,Qt=new WeakMap,Ot=new WeakMap,mt=new WeakMap,Sr=new WeakMap,St=new WeakMap,an=new WeakMap,sn=new WeakMap,Cr=new WeakMap,Lr=new WeakMap,xn=new WeakMap,jt=new WeakMap,Go=new WeakSet,Rd=function(){const t=new Is(P(this,br)),r=new Is(P(this,br));ne(this,Cr,t),ne(this,sn,r),ne(this,qo,(o,a,s=Do.now())=>{if(r[o]=a!==0?s:0,t[o]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{P(this,Jt).call(this,o)&&this.delete(P(this,qe)[o])},a+1);l.unref&&l.unref()}}),ne(this,Un,o=>{r[o]=t[o]!==0?Do.now():0}),ne(this,ln,(o,a)=>{if(t[a]){const s=t[a],l=r[a];o.ttl=s,o.start=l,o.now=n||i(),o.remainingTTL=o.now+s-l}});let n=0;const i=()=>{const o=Do.now();if(this.ttlResolution>0){n=o;const a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{const a=P(this,ut).get(o);return a===void 0?0:t[a]===0||r[a]===0?1/0:r[a]+t[a]-(n||i())},ne(this,Jt,o=>t[o]!==0&&r[o]!==0&&(n||i())-r[o]>t[o])},Un=new WeakMap,ln=new WeakMap,qo=new WeakMap,Jt=new WeakMap,qs=new WeakSet,Eb=function(){const t=new Is(P(this,br));ne(this,wr,0),ne(this,an,t),ne(this,Gn,r=>{ne(this,wr,P(this,wr)-t[r]),t[r]=0}),ne(this,Ko,(r,n,i,o)=>{if(J(this,He,Qe).call(this,n))return 0;if(!Cn(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Cn(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ne(this,Di,(r,n,i)=>{if(t[r]=n,P(this,Zt)){const o=P(this,Zt)-t[r];for(;P(this,wr)>o;)J(this,ji,al).call(this,!0)}ne(this,wr,P(this,wr)+t[r]),i&&(i.entrySize=n,i.totalCalculatedSize=P(this,wr))})},Gn=new WeakMap,Di=new WeakMap,Ko=new WeakMap,Dr=new WeakSet,$n=function*({allowStale:t=this.allowStale}={}){if(P(this,ct))for(let r=P(this,mt);!(!J(this,Xo,Ad).call(this,r)||((t||!P(this,Jt).call(this,r))&&(yield r),r===P(this,Ot)));)r=P(this,Qt)[r]},jr=new WeakSet,On=function*({allowStale:t=this.allowStale}={}){if(P(this,ct))for(let r=P(this,Ot);!(!J(this,Xo,Ad).call(this,r)||((t||!P(this,Jt).call(this,r))&&(yield r),r===P(this,mt)));)r=P(this,At)[r]},Xo=new WeakSet,Ad=function(t){return t!==void 0&&P(this,ut).get(P(this,qe)[t])===t},ji=new WeakSet,al=function(t){var o,a;const r=P(this,Ot),n=P(this,qe)[r],i=P(this,ue)[r];return P(this,xn)&&J(this,He,Qe).call(this,i)?i.__abortController.abort(new Error("evicted")):(P(this,Lr)||P(this,jt))&&(P(this,Lr)&&((o=P(this,Fr))==null||o.call(this,i,n,"evict")),P(this,jt)&&((a=P(this,St))==null||a.push([i,n,"evict"]))),P(this,Gn).call(this,r),t&&(P(this,qe)[r]=void 0,P(this,ue)[r]=void 0,P(this,Sr).push(r)),P(this,ct)===1?(ne(this,Ot,ne(this,mt,0)),P(this,Sr).length=0):ne(this,Ot,P(this,At)[r]),P(this,ut).delete(n),ol(this,ct)._--,r},zi=new WeakSet,sl=function(t,r,n,i){const o=r===void 0?void 0:P(this,ue)[r];if(J(this,He,Qe).call(this,o))return o;const a=new AbortController,{signal:s}=n;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});const l={signal:a.signal,options:n,context:i},c=(m,p=!1)=>{const{aborted:b}=a.signal,w=n.ignoreFetchAbort&&m!==void 0;if(n.status&&(b&&!p?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,w&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!w&&!p)return d(a.signal.reason);const S=g;return P(this,ue)[r]===g&&(m===void 0?S.__staleWhileFetching?P(this,ue)[r]=S.__staleWhileFetching:this.delete(t):(n.status&&(n.status.fetchUpdated=!0),this.set(t,m,l.options))),m},u=m=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=m),d(m)),d=m=>{const{aborted:p}=a.signal,b=p&&n.allowStaleOnFetchAbort,w=b||n.allowStaleOnFetchRejection,S=w||n.noDeleteOnFetchRejection,$=g;if(P(this,ue)[r]===g&&(!S||$.__staleWhileFetching===void 0?this.delete(t):b||(P(this,ue)[r]=$.__staleWhileFetching)),w)return n.status&&$.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),$.__staleWhileFetching;if($.__returned===$)throw m},f=(m,p)=>{var w;const b=(w=P(this,Li))==null?void 0:w.call(this,t,o,l);b&&b instanceof Promise&&b.then(S=>m(S),p),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(m(),n.allowStaleOnFetchAbort&&(m=S=>c(S,!0)))})};n.status&&(n.status.fetchDispatched=!0);const g=new Promise(f).then(c,u),v=Object.assign(g,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(t,v,{...l.options,status:void 0}),r=P(this,ut).get(t)):P(this,ue)[r]=v,v},He=new WeakSet,Qe=function(t){if(!P(this,xn))return!1;const r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AbortController},Yo=new WeakSet,Nd=function(t,r){P(this,Qt)[r]=t,P(this,At)[t]=r},qn=new WeakSet,Qo=function(t){t!==P(this,mt)&&(t===P(this,Ot)?ne(this,Ot,P(this,At)[t]):J(this,Yo,Nd).call(this,P(this,Qt)[t],P(this,At)[t]),J(this,Yo,Nd).call(this,P(this,mt),t),ne(this,mt,t))};const xR=Yu;async function ER(e){return(await Ns.get("/pvideo",{params:{aid:e}})).data.data}async function _R(e){return[]}const Zu=new xR({max:200});async function $R(e){if(Zu.has(e))return Zu.get(e);const[t,r]=await Promise.all([ER(e),_R()]);return Zu.set(e,{pvideoData:t,dmData:r}),{pvideoData:t,dmData:r}}function Pp(e){return async function(r){const n=new FormData;n.append("aid",r),n.append("csrf",wR());const o=(await Ns.post("/x/v2/history/toview/"+e,n,{withCredentials:!0})).data,a=(o==null?void 0:o.code)===0&&(o==null?void 0:o.message)==="0";return a||Dt((o==null?void 0:o.message)||"出错了"),a}}const OR=Pp("add"),PR=Pp("del"),Tp=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(r,n){const o=(await ks.get(_p+t,{params:{goto:r.goto,id:r.param,reason_id:n,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data;return(o==null?void 0:o.code)===0&&(o==null?void 0:o.message)==="0"}},TR=Tp("dislike"),MR=Tp("cancel"),cr={modal:"_modal_1rloz_1",titleDesc:"_title-desc_1rloz_4",reasonList:"_reason-list_1rloz_8",reason:"_reason_1rloz_8",active:"_active_1rloz_29",reasonNo:"_reason-no_1rloz_33",tipsContainer:"_tips-container_1rloz_47",tips:"_tips_1rloz_47"},Ls=vR();function RR(){return ii(Ls)}function AR(e){const t=RR();if(e)return t.get(e)}function NR({show:e,onHide:t,item:r}){const[n,i]=M.useState(!1),o=ke(async g=>{if(!r)return;let v=!1,m;try{i(!0),v=await TR(r,g.id)}catch(p){m=p}finally{i(!1)}if(m)return console.error(m.stack||m),Sp();v?Dt("已标记不想看"):Cp(),v&&(Ls.set(r.param,{...g}),t())}),a=M.useMemo(()=>{var g;return((g=r==null?void 0:r.three_point)==null?void 0:g.dislike_reasons)||[]},[r]),s=()=>!!e&&!!r,l=["1","2","3","4","5","6"];gt(l,g=>{if(!s()||!l.includes(g.key))return;const v=Number(g.key)-1;u(v);const m=document.querySelectorAll(`.${cr.reason}`)[v]||null;m==null||m.click()});const[c,u]=M.useState(a.length-1);dR(()=>{u(a.length-1)},[a]);const d=g=>()=>{if(!s())return;const v=c+g;v<0||v>a.length-1||u(v)};gt("leftarrow",d(-1)),gt("rightarrow",d(1)),gt("uparrow",d(-2)),gt("downarrow",d(2)),gt("enter",g=>{var v;s()&&(c<0||c>a.length-1||(g.preventDefault(),g.stopImmediatePropagation(),(v=document.querySelector(`.${cr.reason}.${cr.active}`))==null||v.click()))});const f=M.useMemo(()=>{var g;return((g=a[c])==null?void 0:g.name)||""},[a,c]);return G(Ku,{show:e,onHide:t,clsModal:cr.modal,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[G("div",{className:vr.modalHeader,children:[G("div",{className:vr.modalTitle,children:["我不想看",L("span",{className:cr.titleDesc,children:"(选择后将减少相似内容推荐)"})]}),L("div",{className:"space",style:{flex:1}}),L(Xu,{onClick:t})]}),G("div",{className:vr.modalBody,children:[L("div",{className:cr.reasonList,children:a.map((g,v)=>G("button",{className:q(cr.reason,{[cr.active]:v===c}),"data-id":g.id,onClick:()=>{u(v),o(g)},disabled:n,children:[L("span",{className:cr.reasonNo,children:v+1}),g.name]},g.id))}),G("div",{className:cr.tipsContainer,children:[G("div",{className:cr.tips,children:[L(Sn,{name:"Info",size:15,style:{marginRight:5}}),"使用删除键打开弹框, 数字键选择, Esc 关闭"]}),f&&G("div",{className:cr.tips,children:[L(Sn,{name:"Info",size:15,style:{marginRight:5}}),"已选择「",f,"」, 回车键提交"]})]})]})]})}const Ds={show:!1,onHide:Rp,item:null},Mp=so({value:Ds.show}),kR=function(){return ii(Mp).value};function Rp(){setTimeout(()=>{Ap({show:!1,item:null})})}function Ap(e){Object.assign(Ds,e),Mp.value=Ds.show,IR().render(L(NR,{...Ds,onHide:Rp}))}let Qu;function IR(){if(!Qu){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),Qu=$s(e)}return Qu}function FR(e){e!=null&&e.param&&Ls.has(e.param)||Ap({show:!0,item:e})}function LR(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const r=Math.trunc(e/60);e-=r*60;const i=[t,r,e];return i[0]===0&&i.shift(),i.map(a=>FC(a.toString(),2,"0")).join(":")}function Ju(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}万`}function Np(e){if(e){if(/^\d+$/.test(e))return Number(e);if(/^\d+(\.\d+?)?万$/.test(e))return Number(e.slice(0,-1))*1e4}}const lt={biliVideoCard:"_bili-video-card_e62cr_1",imageWrapper:"_image-wrapper_e62cr_4",previewCardWrapper:"_preview-card-wrapper_e62cr_8",previewCardInner:"_preview-card-inner_e62cr_21",watchLater:"_watch-later_e62cr_25",badge:"_badge_e62cr_28",recommendReason:"_recommend-reason_e62cr_36",bangumiDesc:"_bangumi-desc_e62cr_51",btnDislike:"_btn-dislike_e62cr_54",btnDislikeIcon:"_btn-dislike-icon_e62cr_69",btnDislikeTip:"_btn-dislike-tip_e62cr_76",dislikedWrapper:"_disliked-wrapper_e62cr_91",dislikeContentCover:"_dislike-content-cover_e62cr_105",dislikeContentCoverInner:"_dislike-content-cover-inner_e62cr_111",dislikeIcon:"_dislike-icon_e62cr_122",dislikeReason:"_dislike-reason_e62cr_125",dislikeDesc:"_dislike-desc_e62cr_129",dislikeContentAction:"_dislike-content-action_e62cr_133",skeletonActive:"_skeleton-active_e62cr_150",antSkeletonLoading:"_ant-skeleton-loading_e62cr_1"};function DR(...e){for(const t of e)if(!isNaN(t))return t;return 0}function jR({className:e,videoDuration:t,pvideo:r,mouseEnterRelativeX:n,previewAnimationProgress:i}){const o=M.useRef(null),a=lR(o),[s,l]=M.useState(()=>({width:0,height:0}));Uu(()=>{var f;const d=(f=o.current)==null?void 0:f.getBoundingClientRect();d&&l({width:d.width,height:d.height})});let c=0;if(typeof i=="number")c=i;else{const d=DR(a.elementX,n||0);s.width&&d&&!isNaN(d)&&(c=d/s.width,c<0&&(c=0),c>1&&(c=1))}const u={videoDuration:t,pvideo:r,elWidth:s.width,elHeight:s.height,progress:c};return L("div",{ref:o,className:q(lt.previewCardWrapper,e),children:!!(r&&s.width&&s.height&&c)&&L(zR,{...u})})}function zR({videoDuration:e,pvideo:t,elWidth:r,elHeight:n,progress:i}){var y;const o=Math.floor((e||0)*i);let a=M.useMemo(()=>{const C=(t==null?void 0:t.index)||[];let x=WR(C,o);return x!==-1?x:o>C[C.length-1]?(x=Math.floor(C.length*i)-1,x<0&&(x=0),x):0},[t,o]);const{img_x_len:s,img_y_len:l,img_x_size:c,img_y_size:u}=t,d=l*s;a=a+1;const f=Math.floor(a/d),g=a-f*d,v=((y=t.image)==null?void 0:y[f])||"",m=Math.floor(g/s)+1,p=g-(m-1)*s,b=r*s,w=n*l,S=(m-1)*n,$=(p-1)*r;return L("div",{className:lt.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${v})`,backgroundPosition:`-${$}px -${S}px`,backgroundSize:`${b}px ${w}px`},children:L(HR,{progress:i})})}function HR({progress:e}){return L("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:L("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function WR(e,t){let r=0,n=e.length-1,i=-1;for(;r<=n;){const s=Math.floor((r+n)/2),l=e[s];if(t===l)return s;l{const{cover_left_icon_1:N,cover_left_text_1:A,cover_left_1_content_description:O,cover_left_icon_2:I,cover_left_text_2:R,cover_left_2_content_description:E}=e;if(js[N]==="play")return Np(A);if(js[I]==="play")return Np(R)})(),s=t?e.stat.like:void 0,l=void 0,c=void 0,u=e.title,d=t?e.pic:e.cover,f=t?e.pubdate:void 0,g=(t?e.duration:(y=e.player_args)==null?void 0:y.duration)||0,v=t?e.owner.name:e.args.up_name,m=t?e.owner.face:void 0,p=t?e.owner.mid:e.args.up_id,b=void 0,w=t?void 0:e.badge,S=t?void 0:((C=e.desc_button)==null?void 0:C.text)||"",$=t?(x=e.rcmd_reason)==null?void 0:x.content:e.rcmd_reason;return{isPc:t,isApp:r,id:n,bvid:i,goto:o,play:a,like:s,coin:l,danmaku:c,title:u,coverRaw:d,pubdate:f,duration:g,name:v,face:m,mid:p,favorite:b,bangumiBadge:w,bangumiDesc:S,rcmd_reason:$}}const BR=fv().format("YYYY"),VR=e=>{if(!e)return"";const t=fv.unix(e);return t.format("YYYY")===BR?t.format("M-D"):t.format("YY-M-D")},UR=e=>(e||"").replace(/^http:\/\//,"https://"),ed={play:"#widget-video-play-count",danmaku:"#widget-video-danmaku",like:"#widget-agree",bangumiFollow:"#widget-agree"},js={1:"play",2:"like",3:"danmaku",4:"bangumiFollow",20:"like"},zs=M.memo(M.forwardRef(function({style:t,className:r,item:n,loading:i,active:o,...a},s){i=i??!n;const l=G("div",{className:q("bili-video-card__skeleton",{hide:!i,[lt.skeletonActive]:i}),children:[L("div",{className:"bili-video-card__skeleton--cover"}),L("div",{className:"bili-video-card__skeleton--info",children:G("div",{className:"bili-video-card__skeleton--right",children:[L("p",{className:"bili-video-card__skeleton--text"}),L("p",{className:"bili-video-card__skeleton--text short"}),L("p",{className:"bili-video-card__skeleton--light"})]})})]}),c=AR((n==null?void 0:n.api)==="app"&&n.param),u=M.useRef(null),d=M.useRef(null);return M.useImperativeHandle(s,()=>({async onCancelDislike(){var f;await((f=u.current)==null?void 0:f.onCancelDislike())},async onToggleWatchLater(){var f;await((f=d.current)==null?void 0:f.onToggleWatchLater())},onTriggerDislike(){var f;(f=d.current)==null||f.onTriggerDislike()},onStartPreviewAnimation(){var f;(f=d.current)==null||f.onStartPreviewAnimation()},onHotkeyPreviewAnimation(){var f;(f=d.current)==null||f.onHotkeyPreviewAnimation()}}),[u,d]),G("div",{style:t,className:q("bili-video-card",lt.biliVideoCard,r),"data-report":"partition_recommend.content",...a,children:[l,!i&&n&&(c?L(GR,{ref:u,item:n,dislikedReason:c}):L(qR,{ref:d,item:n,active:o}))]})})),GR=M.memo(M.forwardRef(function({dislikedReason:t,item:r},n){const i=ke(async()=>{if(!(t!=null&&t.id))return;let o=!1,a;try{o=await MR(r,t.id)}catch(s){a=s}if(a)return console.error(a.stack||a),Sp();o?Dt("已撤销"):Cp(),o&&Ls.delete(r.param)});return M.useImperativeHandle(n,()=>({onCancelDislike:i}),[]),G("div",{className:q(lt.dislikedWrapper),children:[L("div",{className:lt.dislikeContentCover,children:G("div",{className:lt.dislikeContentCoverInner,children:[L(Sn,{name:"DistraughtFace",size:32,className:lt.dislikeIcon}),L("div",{className:lt.dislikeReason,children:t==null?void 0:t.name}),L("div",{className:lt.dislikeDesc,children:(t==null?void 0:t.toast)||"将减少此类内容推荐"})]})}),L("div",{className:lt.dislikeContentAction,children:G("button",{onClick:i,children:[L(Sn,{name:"Return",size:"16",style:{marginRight:4,marginTop:-2}}),"撤销"]})})]})})),qR=M.memo(M.forwardRef(function({item:t,active:r=!1},n){const i=t.api==="pc",o=t.api==="app",{id:a,bvid:s,goto:l,play:c,like:u,coin:d,danmaku:f,title:g,coverRaw:v,pubdate:m,duration:p,name:b,face:w,mid:S,favorite:$,bangumiBadge:y,bangumiDesc:C,rcmd_reason:x}=kp(t);["av","bangumi"].includes(l)||console.warn("[bilibili-app-recommend]: none (av,bangumi) goto type %s",l,t);const N=M.useMemo(()=>VR(m),[m]),A=M.useMemo(()=>UR(v),[v]),[O,I]=M.useState(null),R=M.useRef(!1),E=ke(async()=>{if(!O&&!R.current)try{R.current=!0,I(await $R(a))}finally{R.current=!1}}),_=M.useRef(null),[T,F]=M.useState(void 0);Hn("mouseenter",me=>{var er;const Be=(er=_.current)==null?void 0:er.getBoundingClientRect();if(!Be)return;const{x:je}=Be,dt=me.pageX-window.pageXOffset-je;F(dt)},{target:_});const k=Gu(_),{autoPreviewWhenHover:D}=qr(),{onStartPreviewAnimation:j,onHotkeyPreviewAnimation:W,previewAnimationProgress:U}=KR({id:a,title:g,autoPreviewWhenHover:D,active:r,tryFetchVideoData:E,videoPreviewWrapperRef:_});Ts(()=>{r&&_e.autoPreviewWhenKeyboardSelect&&j()},[r]);const B=M.useRef(null),V=Gu(B),[re,H]=M.useState(!1),{accessKey:le}=qr(),ie=!!le;M.useEffect(()=>{k&&E()},[k]),M.useImperativeHandle(n,()=>({onToggleWatchLater:be,onTriggerDislike:pe,onStartPreviewAnimation:j,onHotkeyPreviewAnimation:W}),[]);const[ve,te]=M.useState(!1),be=ke(async me=>{if(me==null||me.preventDefault(),ve)return;te(!0);const Be=re?PR:OR;let je=!1;try{je=await Be(a)}finally{te(!1)}je&&H(dt=>!dt)}),Pe=M.useRef(null),De=Gu(Pe),pe=ke(me=>{me==null||me.stopPropagation(),me==null||me.preventDefault(),o&&FR(t)}),Ee=t.goto==="bangumi",Me=t.goto==="av",We=i?Me&&s?`/video/${s}`:t.uri:Me?`/video/av${t.param}`:t.uri,oe=M.useMemo(()=>LR(p),[p]),Q=M.useMemo(()=>Ju(c),[c]),ae=M.useMemo(()=>Ju(u),[u]),Se=M.useMemo(()=>Ju($),[$]),vt=i?ae:Se,nt=ke(me=>{if(!_e.openInIINAWhenRightClick)return;const Be=new URL(We,location.href).href,je=`iina://open?url=${encodeURIComponent(Be)}`;window.open(je,"_self"),me.preventDefault()}),pt=({text:me,iconSvgName:Be})=>G("span",{className:"bili-video-card__stats--item",children:[L("svg",{className:"bili-video-card__stats--icon",children:L("use",{xlinkHref:Be})}),L("span",{className:"bili-video-card__stats--text",children:me})]}),zt=me=>{const Be=js[me]||js[1];return ed[Be]};return G("div",{className:"bili-video-card__wrap __scale-wrap",onContextMenu:nt,children:[L("a",{href:We,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:G("div",{className:"bili-video-card__image __scale-player-wrap",ref:_,children:[G("div",{className:q("bili-video-card__image--wrap",lt.imageWrapper),children:[G("picture",{className:"v-img bili-video-card__cover",children:[L("source",{srcSet:`${A}@672w_378h_1c_!web-home-common-cover.avif`,type:"image/avif"}),L("source",{srcSet:`${A}@672w_378h_1c_!web-home-common-cover.webp`,type:"image/webp"}),L("img",{src:`${A}@672w_378h_1c_!web-home-common-cover`,alt:g,loading:"eager"})]}),(k||typeof U=="number")&&L(jR,{videoDuration:p,pvideo:O==null?void 0:O.pvideoData,mouseEnterRelativeX:T,previewAnimationProgress:U}),G("div",{className:`bili-watch-later ${lt.watchLater}`,style:{display:k||r?"flex":"none"},ref:B,onClick:be,children:[L("svg",{className:"bili-watch-later__icon",children:L("use",{xlinkHref:re?"#widget-watch-save":"#widget-watch-later"})}),L("span",{className:"bili-watch-later__tip",style:{display:V?"block":"none"},children:re?"移除":"稍后再看"})]}),o&&ie&&G("div",{ref:Pe,className:lt.btnDislike,onClick:pe,style:{display:k?"flex":"none"},children:[L("svg",{className:lt.btnDislikeIcon,children:L("use",{xlinkHref:"#widget-close"})}),L("span",{className:lt.btnDislikeTip,style:{display:De?"block":"none"},children:"我不想看"})]})]}),L("div",{className:"bili-video-card__mask",children:G("div",{className:"bili-video-card__stats",children:[L("div",{className:"bili-video-card__stats--left",children:i?G(kt,{children:[pt({text:Q,iconSvgName:ed.play}),pt({text:l==="av"?ae:vt,iconSvgName:ed.like})]}):G(kt,{children:[t.cover_left_text_1&&pt({iconSvgName:zt(t.cover_left_icon_1),text:l==="picture"?t.cover_left_text_1+(t.cover_left_1_content_description||""):t.cover_left_text_1}),t.cover_left_text_2&&pt({iconSvgName:zt(t.cover_left_icon_2),text:l==="picture"?t.cover_left_text_2+(t.cover_left_2_content_description||""):t.cover_left_text_2})]})}),L("span",{className:"bili-video-card__stats__duration",children:Me&&oe})]})})]})}),L("div",{className:"bili-video-card__info __scale-disable",children:G("div",{className:"bili-video-card__info--right",children:[L("a",{href:We,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:L("h3",{className:"bili-video-card__info--tit",title:g,children:g})}),G("p",{className:"bili-video-card__info--bottom",children:[Me&&G("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${S}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[x?L("span",{className:lt.recommendReason,children:x}):L("svg",{className:"bili-video-card__info--owner__up",children:L("use",{xlinkHref:"#widget-up"})}),L("span",{className:"bili-video-card__info--author",children:b}),N&&G("span",{className:"bili-video-card__info--date",children:["· ",N]})]}),Ee&&G("a",{className:"bili-video-card__info--owner",href:We,target:"_blank",children:[L("span",{className:lt.badge,children:y||""}),L("span",{className:lt.bangumiDesc,children:C||""})]})]})]})})]})}));function KR({id:e,title:t,autoPreviewWhenHover:r,active:n,tryFetchVideoData:i,videoPreviewWrapperRef:o}){const[s,l]=bp(void 0),[c,u]=M.useState(!1),d=M.useRef(!1),f=M.useRef(!1);Hn("mouseenter",N=>{d.current=!0,r&&!v.current&&x(!0)},{target:o}),Hn("mouseleave",N=>{d.current=!1},{target:o}),Hn("mousemove",N=>{u(!0),r||p()},{target:o});const g=uR(),v=M.useRef(void 0),m=ke(()=>{if(g.current)return!0;if(r){if(f.current){if(!d.current)return!0}else if(!n)return!0}else if(!n||c)return!0;return!1}),p=ke((N=!1)=>{v.current&&cancelAnimationFrame(v.current),v.current=void 0,l(void 0),w(!1)}),[b,w,S]=JM(!1),$=M.useRef(),y=ke(()=>{var N;if(!v.current){x();return}w(A=>!A),b&&((N=$.current)==null||N.call($,s||0))}),C=ke(()=>s||0),x=ke((N=!1)=>{f.current=N,u(!1),w(!1),i(),p(!0),l(_=>typeof _>"u"?0:_);const A=8e3,O=()=>typeof _e.autoPreviewUpdateInterval=="number"?_e.autoPreviewUpdateInterval:400;let I=performance.now(),R=0;$.current=()=>{I=performance.now()-C()*A};function E(_){if(m()){p();return}const T=()=>{const F=performance.now()-I,k=Math.min(F%A/A,1);l(k)};S()||(O()?(!R||performance.now()-R>=O())&&(R=performance.now(),T()):T()),v.current=requestAnimationFrame(E)}v.current=requestAnimationFrame(E)});return{onHotkeyPreviewAnimation:y,onStartPreviewAnimation:x,previewAnimationProgress:s}}function Ip(e){return _e.filterMinDurationEnabled||_e.filterMinPlayCountEnabled?e.filter(t=>{const{play:r,duration:n}=kp(t);return!(typeof r=="number"&&_e.filterMinPlayCountEnabled&&_e.filterMinPlayCount&&r<_e.filterMinPlayCount||n&&_e.filterMinDurationEnabled&&_e.filterMinDuration&&n<_e.filterMinDuration)}):e}const Fp="bilibili-app-recommend";var jo={},XR={get exports(){return jo},set exports(e){jo=e}},Hs={},YR={get exports(){return Hs},set exports(e){Hs=e}},Ri={},ZR={get exports(){return Ri},set exports(e){Ri=e}},rt=ZR.exports={},Ar,Nr;function td(){throw new Error("setTimeout has not been defined")}function rd(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ar=setTimeout:Ar=td}catch{Ar=td}try{typeof clearTimeout=="function"?Nr=clearTimeout:Nr=rd}catch{Nr=rd}})();function Lp(e){if(Ar===setTimeout)return setTimeout(e,0);if((Ar===td||!Ar)&&setTimeout)return Ar=setTimeout,setTimeout(e,0);try{return Ar(e,0)}catch{try{return Ar.call(null,e,0)}catch{return Ar.call(this,e,0)}}}function QR(e){if(Nr===clearTimeout)return clearTimeout(e);if((Nr===rd||!Nr)&&clearTimeout)return Nr=clearTimeout,clearTimeout(e);try{return Nr(e)}catch{try{return Nr.call(null,e)}catch{return Nr.call(this,e)}}}var nn=[],Ai=!1,Wn,Ws=-1;function JR(){!Ai||!Wn||(Ai=!1,Wn.length?nn=Wn.concat(nn):Ws=-1,nn.length&&Dp())}function Dp(){if(!Ai){var e=Lp(JR);Ai=!0;for(var t=nn.length;t;){for(Wn=nn,nn=[];++Ws1)for(var r=1;r=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return s}}),a=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Us(t)?r.showHidden=t:t&&fd(r,t),Ir(r.showHidden)&&(r.showHidden=!1),Ir(r.depth)&&(r.depth=2),Ir(r.colors)&&(r.colors=!1),Ir(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=tA),Vs(r,e,r.depth)}kr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},kr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function tA(e,t){var r=kr.styles[t];return r?"\x1B["+kr.colors[r][0]+"m"+e+"\x1B["+kr.colors[r][1]+"m":e}function rA(e,t){return e}function nA(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Vs(e,t,r){if(e.customInspect&&t&&Vo(t.inspect)&&t.inspect!==kr&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Ho(n)||(n=Vs(e,n,r)),n}var i=iA(e,t);if(i)return i;var o=Object.keys(t),a=nA(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Bo(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ad(t);if(o.length===0){if(Vo(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Wo(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Gs(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Bo(t))return ad(t)}var l="",c=!1,u=["{","}"];if(ld(t)&&(c=!0,u=["[","]"]),Vo(t)){var d=t.name?": "+t.name:"";l=" [Function"+d+"]"}if(Wo(t)&&(l=" "+RegExp.prototype.toString.call(t)),Gs(t)&&(l=" "+Date.prototype.toUTCString.call(t)),Bo(t)&&(l=" "+ad(t)),o.length===0&&(!c||t.length==0))return u[0]+l+u[1];if(r<0)return Wo(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var f;return c?f=oA(e,t,r,a,o):f=o.map(function(g){return sd(e,t,r,a,g,c)}),e.seen.pop(),aA(f,l,u)}function iA(e,t){if(Ir(t))return e.stylize("undefined","undefined");if(Ho(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(cd(t))return e.stylize(""+t,"number");if(Us(t))return e.stylize(""+t,"boolean");if(zo(t))return e.stylize("null","null")}function ad(e){return"["+Error.prototype.toString.call(e)+"]"}function oA(e,t,r,n,i){for(var o=[],a=0,s=t.length;a-1&&(o?s=s.split(` `).map(function(c){return" "+c}).join(` `).substr(2):s=` `+s.split(` `).map(function(c){return" "+c}).join(` `))):s=e.stylize("[Circular]","special")),Ir(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function aA(e,t,r){var n=e.reduce(function(i,o){return o.indexOf(` `)>=0,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function ld(e){return Array.isArray(e)}function Us(e){return typeof e=="boolean"}function zo(e){return e===null}function Wp(e){return e==null}function cd(e){return typeof e=="number"}function Ho(e){return typeof e=="string"}function Bp(e){return typeof e=="symbol"}function Ir(e){return e===void 0}function Wo(e){return Bn(e)&&ud(e)==="[object RegExp]"}function Bn(e){return typeof e=="object"&&e!==null}function Gs(e){return Bn(e)&&ud(e)==="[object Date]"}function Bo(e){return Bn(e)&&(ud(e)==="[object Error]"||e instanceof Error)}function Vo(e){return typeof e=="function"}function Vp(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function Up(e){return Buffer.isBuffer(e)}function ud(e){return Object.prototype.toString.call(e)}function dd(e){return e<10?"0"+e.toString(10):e.toString(10)}var sA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function lA(){var e=new Date,t=[dd(e.getHours()),dd(e.getMinutes()),dd(e.getSeconds())].join(":");return[e.getDate(),sA[e.getMonth()],t].join(" ")}function Gp(){console.log("%s - %s",lA(),Ni.apply(null,arguments))}function fd(e,t){if(!t||!Bn(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function qp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var cA=t0(Object.freeze(Object.defineProperty({__proto__:null,_extend:fd,debuglog:Hp,default:{inherits:zp,_extend:fd,log:Gp,isBuffer:Up,isPrimitive:Vp,isFunction:Vo,isError:Bo,isDate:Gs,isObject:Bn,isRegExp:Wo,isUndefined:Ir,isSymbol:Bp,isString:Ho,isNumber:cd,isNullOrUndefined:Wp,isNull:zo,isBoolean:Us,isArray:ld,inspect:kr,deprecate:id,format:Ni,debuglog:Hp},deprecate:id,format:Ni,inherits:zp,inspect:kr,isArray:ld,isBoolean:Us,isBuffer:Up,isDate:Gs,isError:Bo,isFunction:Vo,isNull:zo,isNullOrUndefined:Wp,isNumber:cd,isObject:Bn,isPrimitive:Vp,isRegExp:Wo,isString:Ho,isSymbol:Bp,isUndefined:Ir,log:Gp},Symbol.toStringTag,{value:"Module"}))).format;function uA(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function dA(e,t){return function(){var r=this,n=[].slice.call(arguments);uA();var i=new AbortController;return n.push(i.signal),new Promise(function(o,a){var s=setTimeout(function(){var l=new Kp(t);a(l),i.abort()},t);Promise.resolve(e.apply(r,n)).then(function(l){clearTimeout(s),o(l)},function(l){clearTimeout(s),a(l)})})}}let Kp=class _b extends Error{constructor(t){super(),this.timeout=t,this.message=cA("timeout of %sms exceed",t),Error.captureStackTrace(this,_b)}};YR.exports=dA,Hs.TimeoutError=Kp;const Xp=Hs,fA=Xp.TimeoutError;XR.exports=function(t,r){const n=t;r=r||{};const i=r.times||5,o=r.timeout;o&&(t=Xp(t,o));const a=r.onerror;return async function(){const s=this,l=[].slice.call(arguments),c=new Array(i);for(let u=0;u"} ${this.times} times`,this.timeout&&(this.message+=` with timeout = ${this.timeout}ms`),Error.captureStackTrace(this,this.constructor)}}class hA extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}var gA=jo.RetryError=Yp;jo.TimeoutError=fA;class hd extends Error{constructor(t){super(),Error.captureStackTrace(this,hd),this.json=t,this.message=t.message||JSON.stringify(t)}}const mA=10;async function vA(){var n;const t=(await ks.get(_p+"/x/v2/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data;if(!t.data){if(t.code===-663)throw new hd(t);return Dt(`${Fp}: 未知错误, 请联系开发者 code=${t.code} message=${t.message||""}`,5e3),[]}return((n=t==null?void 0:t.data)==null?void 0:n.items)||[]}const pA=jo(vA,{times:5,timeout:2e3,onerror(e,t){console.info("[%s] tryGetRecommend onerror: index=%s",Fp,t,e)}});async function Zp(){try{return await pA()}catch(e){if(e instanceof gA){console.error(e.errors);const t=[Ni("请求出错, 已重试%s次:",e.times),...e.errors.map((r,n)=>Ni(" %s) %s",n+1,r.message)),"","请重新获取 access_key 后重试~"].join(` `);Dt(t,5e3)}throw e}}async function Qp(e){let t=[];const r=async()=>{t=(await Promise.all(new Array(e).fill(0).map(()=>Zp()))).flat()},n=async()=>{for(let i=1;i<=e;i++)t=t.concat(await Zp())};return await(_e.useParallelRequest?r:n)(),t=ph(t,i=>i.param),t.map(i=>({...i,api:"app",uniqId:i.param+"-"+crypto.randomUUID()}))}const Jp=14;async function eb(e){const t=e.page++;return(await Ns.get("/x/web-interface/index/top/rcmd",{baseURL:Ep,withCredentials:!0,params:{fresh_type:3,version:1,ps:Jp,fresh_idx:t,fresh_idx_1h:t,homepage_ver:1}})).data.data.item}async function tb(e,t){let r=[];const n=async()=>{r=(await Promise.all(new Array(e).fill(0).map(()=>eb(t)))).flat()},i=async()=>{for(let o=1;o<=e;o++)r=r.concat(await eb(t))};return await(_e.useParallelRequest?n:i)(),r=ph(r,o=>o.id),r.forEach(o=>{var a,s;((a=o.rcmd_reason)==null?void 0:a.reason_type)===1&&((s=o.rcmd_reason).content||(s.content="已关注"))}),r.map(o=>({...o,uniqId:o.id+"-"+crypto.randomUUID(),api:"pc"}))}async function rb(e,t){let r=[],n=async i=>{let o=_e.usePcDesktopApi?await tb(i??Math.ceil(e/Jp),t):await Qp(i??Math.ceil(e/mA));o=Ip(o),r=r.concat(o)};for(await n();r.length{this.scrollComponent=b,u&&u(b)};const p=[r];return i&&(s?a?p.unshift(s):p.push(s):this.defaultLoader&&(a?p.unshift(this.defaultLoader):p.push(this.defaultLoader))),M.createElement(n,m,p)}}at(gd,"propTypes",{children:Rt.node.isRequired,element:Rt.node,hasMore:Rt.bool,initialLoad:Rt.bool,isReverse:Rt.bool,loader:Rt.node,loadMore:Rt.func.isRequired,pageStart:Rt.number,ref:Rt.func,getScrollParent:Rt.func,threshold:Rt.number,useCapture:Rt.bool,useWindow:Rt.bool}),at(gd,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const md="_video-grid_14t5i_9",ob="_limit-two-lines_14t5i_19",vd="_internal-testing_14t5i_43",$A="_limit-one-line_14t5i_50",ab="_narrow-mode_14t5i_71",gk={videoGrid:md,limitTwoLines:ob,internalTesting:vd,limitOneLine:$A,narrowMode:ab};function OA({enabled:e,refresh:t,minIndex:r=0,maxIndex:n,containerRef:i,getScrollerRect:o,changeScrollY:a,videoCardRefs:s}){const[l,c]=M.useState(void 0),u=ke(()=>!(!e||Vv())),d=ke(()=>{var x;if(typeof l!="number"||!i.current)return!1;const y=o(),C=(x=i.current.querySelector(`.${Vn.card}.${Vn.cardActive}`))==null?void 0:x.getBoundingClientRect();return!(!y||!C||C.top-y.top<-(y.height+C.height)||C.top-y.top>y.height*2+C.height)}),f=y=>C=>{if(!u())return;C==null||C.preventDefault();let x=typeof y=="number"?y:y();const N=d()?l+x:v();if(Nn){w(n);return}c(N),w(N)};gt("leftarrow",f(-1),{exactMatch:!0}),gt("rightarrow",f(1),{exactMatch:!0}),gt("uparrow",f(()=>-$()),{exactMatch:!0}),gt("downarrow",f($),{exactMatch:!0});const g=()=>{u()&&c(void 0)};gt("esc",g),gt("enter",()=>{!u()||typeof l!="number"||S(l)}),gt("backspace",()=>{var y;!u()||typeof l!="number"||(y=s[l])==null||y.onTriggerDislike()}),gt(["s","w"],()=>{var y;!u()||typeof l!="number"||(y=s[l])==null||y.onToggleWatchLater()},{exactMatch:!0}),gt(["period","p"],()=>{var y;!u()||typeof l!="number"||(y=s[l])==null||y.onHotkeyPreviewAnimation()},{exactMatch:!0});function v(){const y=o();if(!y)return 0;const C=p();for(let x=0;x=y.top)return x;return 0}const m=`.${Vn.card}`;function p(){var y;return[...((y=i.current)==null?void 0:y.querySelectorAll(m))||[]]}function b(y){return p()[y]}function w(y){var A;const C=b(y);(A=C==null?void 0:C.scrollIntoViewIfNeeded)==null||A.call(C,!1);const x=o(),N=C.getBoundingClientRect();if(!(!x||!N)){if(N.top<=x.top){const O=-(x.top-N.top+10);a==null||a({offset:O});return}if(x.bottom-N.bottom<10){const O=10-(x.bottom-N.bottom);a==null||a({offset:O});return}}}function S(y){const C=b(y);if(!C)return;const x=C.querySelector(".bili-video-card__wrap > a");x==null||x.click()}function $(){if(_e.useNarrowMode)return 2;let y=sb.get(window.innerWidth);if(y)return y;const C=i.current;if(!C)return 0;const x=window.getComputedStyle(C);return x.display!=="grid"?0:(y=x.gridTemplateColumns.split(" ").length,sb.set(window.innerWidth,y),y)}return{activeIndex:l,clearActiveIndex:g}}const sb=new Map,Vn={loader:zu` text-align: center; line-height: 60px; font-size: 120%; `,card:zu` border: 2px solid transparent; /* global class under .card */ .bili-video-card__info { padding-left: 2px; padding-bottom: 1px; margin-top: calc(var(--info-margin-top) - 1px); } `,cardActive:zu` border-color: #fb7299; border-radius: 6px; overflow: hidden; `},lb=M.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:r,className:n,scrollerRef:i},o)=>{const[a,s]=M.useState([]),[l,c]=M.useState(!1),u=M.useMemo(()=>({page:1}),[]),d=ke(async()=>{await(r==null?void 0:r());try{S(),c(!0),u.page=1,s(await wA(u)),S()}finally{c(!1)}});M.useImperativeHandle(o,()=>({refresh:d}),[]),Uu(d);const f=ke(async()=>{const y=await bA(2,u);s(C=>[...C,...y])}),{useNarrowMode:g}=qr(),v=M.useRef(null),m=ke(()=>{var y;if(e){const C=Th+50;return new DOMRect(0,C,window.innerWidth,window.innerHeight-C)}else return(y=i==null?void 0:i.current)==null?void 0:y.getBoundingClientRect()}),p=kR(),b=M.useMemo(()=>new Array(a.length).fill(void 0),[a.length]),{activeIndex:w,clearActiveIndex:S}=OA({enabled:t&&!p,refresh:d,maxIndex:a.length-1,containerRef:v,getScrollerRect:m,videoCardRefs:b,changeScrollY:e?function({offset:y,absolute:C}){const x=document.documentElement;if(typeof y=="number"){x.scrollTop+=y;return}if(typeof C=="number"){x.scrollTop=C;return}}:void 0}),$=lo();return L(gd,{pageStart:0,loadMore:f,hasMore:!0,useWindow:e,threshold:window.innerHeight,style:{minHeight:"100%"},loader:L("div",{className:Vn.loader,children:"加载中..."},0),children:G("div",{ref:v,className:q(md,{[vd]:$},{[ab]:g},n),children:[!a.length&&new Array(24).fill(void 0).map((y,C)=>L(zs,{loading:!0,className:q(Vn.card)},C)),a.map((y,C)=>{const x=C===w;return L(zs,{ref:N=>b[C]=N,className:q(Vn.card,{[Vn.cardActive]:x}),loading:l,item:y,active:x},y.uniqId)})]})})}),cb=L(Ci,{target:"_blank",href:"https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E",children:"access_key 说明"});function ub({style:e,className:t}){const{runAsync:r,loading:n}=hp(bR,{manual:!0}),{accessKey:i}=qr(),o=M.useRef(null),a=ke(async()=>{var c;await r()&&((c=o.current)==null||c.set(!1))});return L(dv,{size:"small",style:e,className:t,children:i?G(kt,{children:[L(Ci,{onClick:()=>a(),disabled:n,children:L("span",{children:"重新获取 access_key"})}),L(Ci,{onClick:yR,children:L("span",{children:"删除 access_key"})})]}):G(kt,{children:[cb,L(Ci,{onClick:a,disabled:n,size:"middle",children:L("span",{children:"获取 access_key"})})]})})}function pr({configKey:e,label:t,className:r,extraAction:n,tooltip:i}){const a=!!qr()[e],s=M.useCallback(c=>{const u=c.target.checked;Ta({[e]:u}),n==null||n(u)},[]);let l=t||e;return i&&(l=L(bu,{title:i,zIndex:11100,overlayStyle:{width:"max-content",maxWidth:"50vw"},children:l})),L(L2,{className:r,checked:a,onChange:s,children:l})}var PA={name:"1qkltea",styles:"margin-left:5px"};const TA=function(){const e=PA;return G(kt,{children:[L(pr,{configKey:"initialShowMore",label:"自动查看更多",css:e}),L(pr,{configKey:"useNarrowMode",label:"启用居中模式",css:e})]})},Ce={configIcon:"_config-icon_15g5q_1",settingsGroup:"_settings-group_15g5q_6",settingsGroupTitle:"_settings-group-title_15g5q_9",settingsGroupContent:"_settings-group-content_15g5q_14",row:"_row_15g5q_20",check:"_check_15g5q_28"};async function db(){Dt("即将刷新网页"),await Pi(500),location.reload()}function MA(){if(window.confirm("确定?"))return mx(),db()}function pd(e,t,r){return gt(e,()=>{_e[t]=!_e[t];const n=!_e[t];Dt(`已${n?"禁用":"启用"}「${r}」`)},{exactMatch:!0})}function RA({show:e,onHide:t}){const{usePcDesktopApi:r,autoPreviewUpdateInterval:n,filterMinPlayCount:i,filterMinPlayCountEnabled:o,filterMinDuration:a,filterMinDurationEnabled:s}=qr();return pd(["shift.p"],"autoPreviewWhenKeyboardSelect","键盘选中后自动开始预览"),pd(["shift.m"],"autoPreviewWhenHover","鼠标悬浮后自动开始预览"),pd(["shift.c"],"useNarrowMode","居中模式"),G(Ku,{show:e,onHide:t,hideWhenMaskOnClick:!0,hideWhenEsc:!0,width:"700px",children:[G("div",{className:vr.modalHeader,children:[G("div",{className:vr.modalTitle,children:[L(Sn,{name:"Config",className:Ce.configIcon}),"设置项"]}),L("div",{className:"space",style:{flex:1}}),L(Xu,{onClick:t})]}),G("main",{className:vr.modalBody,children:[G("div",{className:Ce.settingsGroup,children:[L("div",{className:Ce.settingsGroupTitle,children:"接口切换"}),G("div",{className:q(Ce.settingsGroupContent),children:[G(wu.Group,{buttonStyle:"solid",value:r?"desktop":"app",onChange:l=>{const c=l.target.value;_e.usePcDesktopApi=c==="desktop"},children:[L(wu.Button,{value:"desktop",children:"使用桌面端接口"}),L(wu.Button,{value:"app",children:"使用 App 端接口"})]}),!r&&L("div",{className:Ce.row,style:{marginTop:5},children:L(ub,{})})]})]}),G("div",{className:Ce.settingsGroup,children:[L("div",{className:Ce.settingsGroupTitle,children:"开关"}),G("div",{className:q(Ce.settingsGroupContent,Ce.row),children:[L(pr,{configKey:"pureRecommend",label:"开启纯推荐模式",tooltip:G(kt,{children:["首页只保留推荐",L("br",{}),"P.S 需要刷新网页~"]}),className:Ce.check,extraAction:db}),L(pr,{configKey:"initialShowMore",label:"自动查看更多",tooltip:"打开首页时默认打开推荐弹框",className:Ce.check,extraAction:l=>{l&&Dt("已开启自动查看更多: 下次打开首页时将直接展示推荐弹框")}}),L(pr,{configKey:"useNarrowMode",label:"启用居中模式",tooltip:G(kt,{children:["居中两列",L("br",{}),"切换设置快捷键: ",L(To,{color:"green",children:"shift+c"})]}),className:Ce.check}),L(pr,{configKey:"useParallelRequest",label:"批量请求时使用并行",tooltip:G(kt,{children:["并行快但可能有重复",L("br",{}),"推荐视频大量重复时关闭这个试试~"]}),className:Ce.check})]})]}),G("div",{className:Ce.settingsGroup,children:[L("div",{className:Ce.settingsGroupTitle,children:"预览"}),G("div",{className:q(Ce.settingsGroupContent,Ce.row),children:[L(pr,{configKey:"autoPreviewWhenKeyboardSelect",label:"键盘选中后自动开始预览",className:Ce.check,tooltip:G(kt,{children:["手动预览快捷键: ",L(To,{color:"green",children:"."})," or ",L(To,{color:"green",children:"p"}),L("br",{}),"切换设置快捷键: ",L(To,{color:"green",children:"shift+p"})]})}),L(pr,{configKey:"autoPreviewWhenHover",label:"鼠标悬浮后自动开始预览",className:Ce.check,tooltip:G(kt,{children:["鼠标悬浮后自动开始预览, 预览不再跟随鼠标位置 ",L("br",{}),"切换设置快捷键: ",L(To,{color:"green",children:"shift+m"})]})}),G("div",{style:{width:"100%",display:"flex",alignItems:"center"},children:["预览更新间隔",L(ST,{style:{flex:1,margin:"0 15px"},min:0,max:1e3,keyboard:!0,onChange:l=>_e.autoPreviewUpdateInterval=l,value:n,tooltip:{open:!0}}),G("span",{style:{width:"65px"},children:["(",n,"ms)"]})]})]})]}),G("div",{className:Ce.settingsGroup,children:[G("div",{className:Ce.settingsGroupTitle,children:["视频过滤器",L(TT,{title:"启用视频过滤器会大幅降低加载速度, 谨慎开启!",children:L(Sn,{style:{marginLeft:4,cursor:"pointer"},name:"Info"})})]}),G("div",{className:q(Ce.settingsGroupContent),children:[G("div",{className:Ce.row,children:[L(pr,{configKey:"filterMinPlayCountEnabled",label:"按播放量过滤",tooltip:L(kt,{children:"不显示播放量很少的视频"})}),L(kv,{size:"small",min:1,step:1e3,value:i,onChange:l=>l&&Ta({filterMinPlayCount:l}),disabled:!o})]}),G("div",{className:Ce.row,style:{marginTop:8},children:[L(pr,{configKey:"filterMinDurationEnabled",label:"按视频时长过滤",tooltip:L(kt,{children:"不显示短视频"})}),L(kv,{style:{width:150},size:"small",min:1,step:10,addonAfter:"单位:秒",value:a,onChange:l=>l&&Ta({filterMinDuration:l}),disabled:!s})]})]})]}),G("div",{className:Ce.settingsGroup,children:[L("div",{className:Ce.settingsGroupTitle,children:"高级"}),G("div",{className:q(Ce.settingsGroupContent),children:[L("div",{className:Ce.row,children:L(Ci,{onClick:MA,danger:!0,children:"恢复默认设置"})}),L("div",{className:Ce.row,style:{marginTop:10},children:L(pr,{configKey:"openInIINAWhenRightClick",label:"右键在 IINA 中打开",className:Ce.check})})]})]}),G("div",{className:Ce.settingsGroup,children:[L("div",{className:Ce.settingsGroupTitle,children:"帮助"}),L("div",{className:q(Ce.settingsGroupContent),children:L("div",{className:Ce.row,children:G(dv,{size:"small",children:[L(Ci,{href:"https://github.com/magicdawn/bilibili-app-recommend#%E5%BF%AB%E6%8D%B7%E9%94%AE%E8%AF%B4%E6%98%8E",target:"_blank",children:"查看可用的快捷键"}),cb]})})})]})]})]})}var bd={};Object.defineProperty(bd,"__esModule",{value:!0});var fb=bd.useSticky=void 0;const yd=M;function AA(){const e=(0,yd.useRef)(null),[t,r]=(0,yd.useState)(!1);return(0,yd.useEffect)(()=>{function n(){if(!e.current)return;const i=e.current.getBoundingClientRect().top,o=parseInt(getComputedStyle(e.current).top),a=i<=o;a&&!t?r(!0):!a&&t&&r(!1)}return n(),document.addEventListener("scroll",n),window.addEventListener("resize",n),window.addEventListener("orientationchange",n),()=>{document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)}},[t]),[e,t]}fb=bd.useSticky=AA;const hb={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},NA=M.forwardRef(function({children:t},r){const[n,i]=gp(!1);M.useImperativeHandle(r,()=>i,[i]);const o=L("button",{className:q("primary-btn",hb.expandBtn),onClick:i.toggle,children:L("svg",{className:q({[hb.expanded]:n}),children:L("use",{xlinkHref:"#widget-arrow"})})});return G(kt,{children:[o,n&&t]})}),Uo={modalMask:"_modal-mask_juq7d_1",narrowMode:"_narrow-mode_juq7d_1",modal:"_modal_juq7d_1",modalHeader:"_modal-header_juq7d_21",modalBody:"_modal-body_juq7d_22",btnRefresh:"_btn-refresh_juq7d_25"},kA=M.memo(function({show:t,onHide:r}){const n=M.useRef(null),i=M.useRef(null),{useNarrowMode:o}=qr(),a=M.useMemo(()=>({[Uo.narrowMode]:o}),[o]),s=ke(()=>{var c;return(c=i.current)==null?void 0:c.refresh()}),l=ke(()=>{n.current&&(n.current.scrollTop=0)});return G(Ku,{show:t,onHide:r,clsModalMask:q(a),clsModal:q(Uo.modal,a),children:[G("div",{className:q(vr.modalHeader,Uo.modalHeader),children:[L("div",{className:vr.modalTitle,children:"推荐"}),L("div",{className:"space",style:{flex:1}}),L(NA,{children:L(TA,{})}),L(pb,{onClick:s,className:Uo.btnRefresh,refreshHotkeyEnabled:t}),L(Xu,{onClick:r})]}),L("div",{className:q(vr.modalBody,Uo.modalBody),ref:n,children:L(lb,{ref:i,shortcutEnabled:t,onScrollToTop:l,infiteScrollUseWindow:!1,scrollerRef:n})})]})}),gb={btn:Ti` padding: 0; width: 31px; height: 31px; border-radius: 50%; `,icon:Ti` svg { width: 14px; height: 14px; } `},ki=so({modalFeedVisible:_e.initialShowMore,modalConfigVisible:!1}),mb=function(){return ii(ki)},IA=()=>{ki.modalFeedVisible=!0},FA=()=>{ki.modalFeedVisible=!1},LA=()=>{ki.modalConfigVisible=!0},DA=()=>{ki.modalConfigVisible=!1};function vb({onRefresh:e,refreshHotkeyEnabled:t}){const{accessKey:r,pureRecommend:n,usePcDesktopApi:i}=qr(),{modalFeedVisible:o,modalConfigVisible:a}=ii(ki),[s,l]=fb();return G(kt,{children:[G("div",{ref:s,className:"area-header",css:[Ti` margin-bottom: 0; height: 50px; `,n&&Ti` position: sticky; top: ${Th}px; z-index: 1000; `,n&&l&&Ti` background-color: var(--bg1_float); box-shadow: 0 2px 4px rgb(0 0 0 / 8%); `,"",""],children:[G("div",{className:"left",children:[L("a",{id:"影视",className:"the-world area-anchor","data-id":"25"}),L("svg",{className:"icon",children:L("use",{xlinkHref:"#channel-cinephile"})}),L("a",{className:"title",href:"#",children:L("span",{children:"推荐"})})]}),G("div",{className:"right",children:[!i&&!r&&L(ub,{style:{marginLeft:5}}),L("button",{className:"primary-btn",css:gb.btn,onClick:LA,children:L(Sn,{name:"Config",css:gb.icon})}),L(pb,{onClick:e,refreshHotkeyEnabled:t}),!n&&G("button",{className:"primary-btn see-more",onClick:IA,children:[L("span",{children:"查看更多"}),L("svg",{children:L("use",{xlinkHref:"#widget-arrow"})})]})]})]}),L(kA,{show:o,onHide:FA}),L(RA,{show:a,onHide:DA})]})}const pb=M.forwardRef(function({onClick:e,className:t="",style:r,refreshHotkeyEnabled:n},i){n??(n=!0);const[o,a]=M.useState(0),s=ke(c=>(a(u=>u+360),e==null?void 0:e(c))),l=M.useRef(null);return M.useImperativeHandle(i,()=>({click(){var c;(c=l.current)==null||c.click()}}),[]),gt("r",()=>{var c;n&&(Vv()||(c=l.current)==null||c.click())},{exactMatch:!0}),G("button",{className:`primary-btn roll-btn ${t}`,onClick:s,style:r,ref:l,children:[L("svg",{style:{transform:`rotate(${o}deg)`,width:"10px",height:"10px",transition:o===360?"transform .5s ease":"unset"},onTransitionEnd:()=>{a(0)},children:L("use",{xlinkHref:"#widget-roll"})}),L("span",{children:"换一换"})]})}),jA={grid:Ti` /* card=299 col-gap=20 */ width: ${299*2+20}px; margin: 0 auto; `};function zA(){const{useNarrowMode:e}=qr(),{modalFeedVisible:t,modalConfigVisible:r}=mb(),n=M.useRef(null),i=ke(()=>{var a;return(a=n.current)==null?void 0:a.refresh()}),o=ke(()=>{document.documentElement.scrollTop=0});return G("section",{"data-area":"推荐",children:[L(vb,{onRefresh:i,refreshHotkeyEnabled:!(t||r)}),L(lb,{ref:n,css:[e&&jA.grid,"",""],shortcutEnabled:!(t||r),infiteScrollUseWindow:!0,onScrollToTop:o})]})}function HA(){const e=M.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),t=lo(),r=M.useMemo(()=>({page:1}),[]),{data:n,loading:i,error:o,refresh:a}=hp(()=>yA(r));o&&console.error(o.stack||o);const{modalConfigVisible:s,modalFeedVisible:l}=mb();return G("section",{"data-area":"推荐",children:[L(vb,{onRefresh:a,refreshHotkeyEnabled:!(s||l)}),L("div",{className:q(md,ob,{[vd]:t}),style:{marginBottom:t?30:0},children:i||o?e.map(c=>L(zs,{},c)):n.map(c=>L(zs,{item:c},c.uniqId))})]})}(function(){var t;if(location.href.startsWith("https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?"))return window.stop(),(t=window.top)==null?void 0:t.postMessage(location.href,"https://www.bilibili.com");if(location.pathname==="/")return WA()})();async function WA(){return Pu(".adblock-tips"),Bv("html.gray",e=>e.classList.remove("gray")),_e.pureRecommend?VA():BA()}async function BA(){const t=Date.now()+1e4;let r;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){const o=document.querySelector(".bili-layout > section.bili-grid");r=a=>o==null?void 0:o.insertAdjacentElement("afterend",a);break}if(lo()&&document.querySelector(".bili-feed4-layout")){r=o=>{var a;return(a=document.querySelector(".bili-feed4-layout"))==null?void 0:a.insertAdjacentElement("afterbegin",o)};break}if(Date.now()>t)break;await Pi(200)}if(!r){console.error("[bilibili-app-recommend]: init fail");return}const n=document.createElement("section");r(n),$s(n).render(L(jv,{children:L(HA,{})}))}async function VA(){var i,o;lo()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),Pu(".bili-feed4 .header-channel")):((o=document.querySelector(".bili-layout"))==null||o.remove(),Pu(".bili-footer"));const e=document.createElement("div");e.classList.add(lo()?"bili-feed4-layout":"bili-layout","pure-recommend");const t=document.querySelector(".bili-header");t==null||t.insertAdjacentElement("afterend",e);const r=document.createElement("section");e==null||e.appendChild(r),$s(r).render(L(jv,{children:L(zA,{})}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);