mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-15 11:47:54 +00:00
1 line
26 KiB
JavaScript
1 line
26 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[6766],{55439:function(e,n,t){t.d(n,{Z:function(){return c}});var i=t(77260),l=t(44194),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},r=t(54183),o=function(e,n){return l.createElement(r.Z,(0,i.Z)({},e,{ref:n,icon:a}))};var c=l.forwardRef(o)},27113:function(e,n,t){t.r(n),t.d(n,{default:function(){return W}});var i=t(45332),l=t.n(i),a=t(24522),r=t(14870),o=t(95660),c=t(5488),s=t(85817),d=t(79401),u=t(78875),h=t(20228),g=t(32973),f=t(49616),m=t(8340),p=t(90879),v=t(77260),b=t(44194),k={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},x=t(54183),w=function(e,n){return b.createElement(x.Z,(0,v.Z)({},e,{ref:n,icon:k}))};var $=b.forwardRef(w),y={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},S=function(e,n){return b.createElement(x.Z,(0,v.Z)({},e,{ref:n,icon:y}))};var M=b.forwardRef(S),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},Z=function(e,n){return b.createElement(x.Z,(0,v.Z)({},e,{ref:n,icon:C}))};var I=b.forwardRef(Z),j=t(55439),z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},E=function(e,n){return b.createElement(x.Z,(0,v.Z)({},e,{ref:n,icon:z}))};var H=b.forwardRef(E),N=t(31549),O=s.Z.Title,R=s.Z.Text,W=function(){var e=(0,r.useIntl)(),n=(0,a.Z)(),t=n.isDarkMode,i=n.themeMode,s=n.setThemeMode,v=(0,b.useState)(!0),k=l()(v,2),x=k[0],w=k[1];(0,b.useEffect)((function(){var e=localStorage.getItem(c.aE);null===e?(localStorage.setItem(c.aE,"false"),w(!1)):w("true"===e)}),[]);var y=(0,r.getLocale)();return(0,N.jsx)("div",{style:{padding:"24px",backgroundColor:t?"#1f1f1f":"#f0f2f5",minHeight:"100vh"},children:(0,N.jsxs)(d.Z,{variant:"borderless",style:{maxWidth:800,margin:"0 auto",borderRadius:"12px",boxShadow:t?"0 2px 8px rgba(255, 255, 255, 0.05)":"0 2px 8px rgba(0, 0, 0, 0.1)"},children:[(0,N.jsxs)(O,{level:2,style:{marginBottom:"24px",textAlign:"center"},children:[(0,N.jsx)(p.Z,{style:{marginRight:"8px",color:"#1890ff"}}),e.formatMessage({id:"basic.settings.title",defaultMessage:"基本设置"})]}),(0,N.jsx)(d.Z,{title:(0,N.jsxs)(R,{strong:!0,style:{fontSize:"16px"},children:[(0,N.jsx)(p.Z,{style:{marginRight:"8px",color:"#722ed1"}}),e.formatMessage({id:"theme.title",defaultMessage:"主题模式"})]}),size:"small",style:{marginBottom:"24px",backgroundColor:t?"#262626":void 0},children:(0,N.jsx)(u.Z,{children:(0,N.jsx)(h.Z,{span:24,children:(0,N.jsx)(g.ZP.Group,{onChange:function(e){o.Z.log("radio checked",e.target.value),s(e.target.value),window.location.reload()},value:i,size:"large",children:(0,N.jsxs)(f.Z,{direction:"vertical",size:"middle",children:[(0,N.jsx)(g.ZP,{value:"light",children:(0,N.jsxs)(f.Z,{children:[(0,N.jsx)($,{style:{color:"#faad14"}}),(0,N.jsx)(r.FormattedMessage,{id:"theme.light"})]})}),(0,N.jsx)(g.ZP,{value:"dark",children:(0,N.jsxs)(f.Z,{children:[(0,N.jsx)(M,{style:{color:"#722ed1"}}),(0,N.jsx)(r.FormattedMessage,{id:"theme.dark"})]})}),(0,N.jsx)(g.ZP,{value:"system",children:(0,N.jsxs)(f.Z,{children:[(0,N.jsx)(I,{style:{color:"#52c41a"}}),(0,N.jsx)(r.FormattedMessage,{id:"theme.system"})]})})]})})})})}),(0,N.jsx)(d.Z,{title:(0,N.jsxs)(R,{strong:!0,style:{fontSize:"16px"},children:[(0,N.jsx)(j.Z,{style:{marginRight:"8px",color:"#13c2c2"}}),e.formatMessage({id:"language.title",defaultMessage:"语言设置"})]}),size:"small",style:{marginBottom:"24px",backgroundColor:t?"#262626":void 0},children:(0,N.jsx)(u.Z,{children:(0,N.jsx)(h.Z,{span:24,children:(0,N.jsx)(g.ZP.Group,{value:y,onChange:function(e){var n=e.target.value;o.Z.log("localeValue:",n),(0,r.setLocale)(n)},size:"large",children:(0,N.jsxs)(f.Z,{size:"middle",children:[(0,N.jsx)(g.ZP.Button,{value:"en-US",children:"🇺🇸 English"}),(0,N.jsx)(g.ZP.Button,{value:"zh-CN",children:"🇨🇳 简体中文"}),(0,N.jsx)(g.ZP.Button,{value:"zh-TW",children:"🇹🇼 繁体中文"})]})})})})}),(0,N.jsx)(d.Z,{title:(0,N.jsxs)(R,{strong:!0,style:{fontSize:"16px"},children:[(0,N.jsx)(H,{style:{marginRight:"8px",color:"#fa8c16"}}),e.formatMessage({id:"debug.title",defaultMessage:"调试设置"})]}),size:"small",style:{backgroundColor:t?"#262626":void 0},children:(0,N.jsx)(u.Z,{children:(0,N.jsx)(h.Z,{span:24,children:(0,N.jsxs)(f.Z,{align:"center",style:{width:"100%",justifyContent:"space-between"},children:[(0,N.jsx)(R,{children:e.formatMessage({id:"debug.console.log",defaultMessage:"控制台日志"})}),(0,N.jsx)(m.Z,{checkedChildren:"已开启",unCheckedChildren:"已关闭",checked:x,onChange:function(e){o.Z.log("log enabled",e),localStorage.setItem(c.aE,e?"true":"false"),w(e),e?(o.Z.info("控制台日志已开启"),o.Z.log("现在可以看到所有日志输出了"),o.Z.debug("这是一条调试信息"),o.Z.warn("这是一条警告信息")):o.Z.info("控制台日志已关闭"),o.Z.error("这是错误日志,无论开关状态如何都会显示")},style:{backgroundColor:t?x?"#1890ff":"#434343":void 0}})]})})})})]})})}},22811:function(e,n,t){t.d(n,{Z:function(){return a}});var i=t(44194),l=t(24589);function a(e){const n=i.useRef(null),t=()=>{l.Z.cancel(n.current),n.current=null};return[()=>{t(),n.current=(0,l.Z)((()=>{n.current=null}))},i=>{n.current&&(i.stopPropagation(),t()),null==e||e(i)}]}},47432:function(e,n,t){t.d(n,{Z:function(){return v},S:function(){return m}});var i=t(44194),l=t(11478),a=t(43359);const r=e=>"object"==typeof e&&null!=e&&1===e.nodeType,o=(e,n)=>(!n||"hidden"!==e)&&"visible"!==e&&"clip"!==e,c=(e,n)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const t=getComputedStyle(e,null);return o(t.overflowY,n)||o(t.overflowX,n)||(e=>{const n=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!n&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)})(e)}return!1},s=(e,n,t,i,l,a,r,o)=>a<e&&r>n||a>e&&r<n?0:a<=e&&o<=t||r>=n&&o>=t?a-e-i:r>n&&o<t||a<e&&o>t?r-n+l:0,d=e=>{const n=e.parentElement;return null==n?e.getRootNode().host||null:n},u=(e,n)=>{var t,i,l,a;if("undefined"==typeof document)return[];const{scrollMode:o,block:u,inline:h,boundary:g,skipOverflowHiddenElements:f}=n,m="function"==typeof g?g:e=>e!==g;if(!r(e))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,v=[];let b=e;for(;r(b)&&m(b);){if(b=d(b),b===p){v.push(b);break}null!=b&&b===document.body&&c(b)&&!c(document.documentElement)||null!=b&&c(b,f)&&v.push(b)}const k=null!=(i=null==(t=window.visualViewport)?void 0:t.width)?i:innerWidth,x=null!=(a=null==(l=window.visualViewport)?void 0:l.height)?a:innerHeight,{scrollX:w,scrollY:$}=window,{height:y,width:S,top:M,right:C,bottom:Z,left:I}=e.getBoundingClientRect(),{top:j,right:z,bottom:E,left:H}=(e=>{const n=window.getComputedStyle(e);return{top:parseFloat(n.scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0}})(e);let N="start"===u||"nearest"===u?M-j:"end"===u?Z+E:M+y/2-j+E,O="center"===h?I+S/2-H+z:"end"===h?C+z:I-H;const R=[];for(let e=0;e<v.length;e++){const n=v[e],{height:t,width:i,top:l,right:a,bottom:r,left:d}=n.getBoundingClientRect();if("if-needed"===o&&M>=0&&I>=0&&Z<=x&&C<=k&&(n===p&&!c(n)||M>=l&&Z<=r&&I>=d&&C<=a))return R;const g=getComputedStyle(n),f=parseInt(g.borderLeftWidth,10),m=parseInt(g.borderTopWidth,10),b=parseInt(g.borderRightWidth,10),j=parseInt(g.borderBottomWidth,10);let z=0,E=0;const H="offsetWidth"in n?n.offsetWidth-n.clientWidth-f-b:0,W="offsetHeight"in n?n.offsetHeight-n.clientHeight-m-j:0,P="offsetWidth"in n?0===n.offsetWidth?0:i/n.offsetWidth:0,q="offsetHeight"in n?0===n.offsetHeight?0:t/n.offsetHeight:0;if(p===n)z="start"===u?N:"end"===u?N-x:"nearest"===u?s($,$+x,x,m,j,$+N,$+N+y,y):N-x/2,E="start"===h?O:"center"===h?O-k/2:"end"===h?O-k:s(w,w+k,k,f,b,w+O,w+O+S,S),z=Math.max(0,z+$),E=Math.max(0,E+w);else{z="start"===u?N-l-m:"end"===u?N-r+j+W:"nearest"===u?s(l,r,t,m,j+W,N,N+y,y):N-(l+t/2)+W/2,E="start"===h?O-d-f:"center"===h?O-(d+i/2)+H/2:"end"===h?O-a+b+H:s(d,a,i,f,b+H,O,O+S,S);const{scrollLeft:e,scrollTop:o}=n;z=0===q?0:Math.max(0,Math.min(o+z/q,n.scrollHeight-t/q+W)),E=0===P?0:Math.max(0,Math.min(e+E/P,n.scrollWidth-i/P+H)),N+=o-z,O+=e-E}R.push({el:n,top:z,left:E})}return R};function h(e,n){if(!e.isConnected||!(e=>{let n=e;for(;n&&n.parentNode;){if(n.parentNode===document)return!0;n=n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}return!1})(e))return;const t=(e=>{const n=window.getComputedStyle(e);return{top:parseFloat(n.scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(n))return n.behavior(u(e,n));const i="boolean"==typeof n||null==n?void 0:n.behavior;for(const{el:l,top:a,left:r}of u(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(n))){const e=a-t.top+t.bottom,n=r-t.left+t.right;l.scroll({top:e,left:n,behavior:i})}}var g=t(43313),f=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(i=Object.getOwnPropertySymbols(e);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]])}return t};function m(e){return(0,g.qo)(e).join("_")}function p(e,n){const t=n.getFieldInstance(e),i=(0,a.bn)(t);if(i)return i;const l=(0,g.dD)((0,g.qo)(e),n.__INTERNAL__.name);return l?document.getElementById(l):void 0}function v(e){const[n]=(0,l.cI)(),t=i.useRef({}),a=i.useMemo((()=>null!=e?e:Object.assign(Object.assign({},n),{__INTERNAL__:{itemRef:e=>n=>{const i=m(e);n?t.current[i]=n:delete t.current[i]}},scrollToField:(e,n={})=>{const{focus:t}=n,i=f(n,["focus"]),l=p(e,a);l&&(h(l,Object.assign({scrollMode:"if-needed",block:"nearest"},i)),t&&a.focusField(e))},focusField:e=>{var n,t;const i=a.getFieldInstance(e);"function"==typeof(null==i?void 0:i.focus)?i.focus():null===(t=null===(n=p(e,a))||void 0===n?void 0:n.focus)||void 0===t||t.call(n)},getFieldInstance:e=>{const n=m(e);return t.current[n]}})),[e,n]);return[a]}},43313:function(e,n,t){t.d(n,{dD:function(){return a},lR:function(){return r},qo:function(){return l}});const i=["parentNode"];function l(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function a(e,n){if(!e.length)return;const t=e.join("_");if(n)return`${n}_${t}`;return i.includes(t)?`form_item_${t}`:t}function r(e,n,t,i,l,a){let r=i;return void 0!==a?r=a:t.validating?r="validating":e.length?r="error":n.length?r="warning":(t.touched||l&&t.validated)&&(r="success"),r}},8340:function(e,n,t){t.d(n,{Z:function(){return O}});var i=t(44194),l=t(54883),a=t(51865),r=t.n(a),o=t(77260),c=t(54549),s=t(76285),d=t(17323),u=t(81424),h=t(46748),g=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],f=i.forwardRef((function(e,n){var t,l=e.prefixCls,a=void 0===l?"rc-switch":l,f=e.className,m=e.checked,p=e.defaultChecked,v=e.disabled,b=e.loadingIcon,k=e.checkedChildren,x=e.unCheckedChildren,w=e.onClick,$=e.onChange,y=e.onKeyDown,S=(0,d.Z)(e,g),M=(0,u.Z)(!1,{value:m,defaultValue:p}),C=(0,s.Z)(M,2),Z=C[0],I=C[1];function j(e,n){var t=Z;return v||(I(t=e),null==$||$(t,n)),t}var z=r()(a,f,(t={},(0,c.Z)(t,"".concat(a,"-checked"),Z),(0,c.Z)(t,"".concat(a,"-disabled"),v),t));return i.createElement("button",(0,o.Z)({},S,{type:"button",role:"switch","aria-checked":Z,disabled:v,className:z,ref:n,onKeyDown:function(e){e.which===h.Z.LEFT?j(!1,e):e.which===h.Z.RIGHT&&j(!0,e),null==y||y(e)},onClick:function(e){var n=j(!Z,e);null==w||w(n,e)}}),b,i.createElement("span",{className:"".concat(a,"-inner")},i.createElement("span",{className:"".concat(a,"-inner-checked")},k),i.createElement("span",{className:"".concat(a,"-inner-unchecked")},x)))}));f.displayName="Switch";var m=f,p=t(11506),v=t(35779),b=t(72305),k=t(77936),x=t(59199),w=t(87471),$=t(49336),y=t(79255),S=t(77167);const M=e=>{const{componentCls:n,trackHeightSM:t,trackPadding:i,trackMinWidthSM:l,innerMinMarginSM:a,innerMaxMarginSM:r,handleSizeSM:o,calc:c}=e,s=`${n}-inner`,d=(0,x.bf)(c(o).add(c(i).mul(2)).equal()),u=(0,x.bf)(c(r).mul(2).equal());return{[n]:{[`&${n}-small`]:{minWidth:l,height:t,lineHeight:(0,x.bf)(t),[`${n}-inner`]:{paddingInlineStart:r,paddingInlineEnd:a,[`${s}-checked, ${s}-unchecked`]:{minHeight:t},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${s}-unchecked`]:{marginTop:c(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:o,height:o},[`${n}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:a,paddingInlineEnd:r,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${(0,x.bf)(c(o).add(i).equal())})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${n}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},C=e=>{const{componentCls:n,handleSize:t,calc:i}=e;return{[n]:{[`${n}-loading-icon${e.iconCls}`]:{position:"relative",top:i(i(t).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:e.switchColor}}}},Z=e=>{const{componentCls:n,trackPadding:t,handleBg:i,handleShadow:l,handleSize:a,calc:r}=e,o=`${n}-handle`;return{[n]:{[o]:{position:"absolute",top:t,insetInlineStart:t,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:r(a).div(2).equal(),boxShadow:l,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,x.bf)(r(a).add(t).equal())})`},[`&:not(${n}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},I=e=>{const{componentCls:n,trackHeight:t,trackPadding:i,innerMinMargin:l,innerMaxMargin:a,handleSize:r,calc:o}=e,c=`${n}-inner`,s=(0,x.bf)(o(r).add(o(i).mul(2)).equal()),d=(0,x.bf)(o(a).mul(2).equal());return{[n]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:l,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:t},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${d})`,marginInlineEnd:`calc(100% - ${s} + ${d})`},[`${c}-unchecked`]:{marginTop:o(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${c}`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${d})`,marginInlineEnd:`calc(-100% + ${s} - ${d})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:o(i).mul(2).equal(),marginInlineEnd:o(i).mul(-1).mul(2).equal()}},[`&${n}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:o(i).mul(-1).mul(2).equal(),marginInlineEnd:o(i).mul(2).equal()}}}}}},j=e=>{const{componentCls:n,trackHeight:t,trackMinWidth:i}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:t,lineHeight:(0,x.bf)(t),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.Qy)(e)),{[`&${n}-checked`]:{background:e.switchColor,[`&:hover:not(${n}-disabled)`]:{background:e.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}};var z=(0,y.I$)("Switch",(e=>{const n=(0,S.IX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[j(n),I(n),Z(n),C(n),M(n)]}),(e=>{const{fontSize:n,lineHeight:t,controlHeight:i,colorWhite:l}=e,a=n*t,r=i/2,o=a-4,c=r-4;return{trackHeight:a,trackHeightSM:r,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:l,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new w.t("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}})),E=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(i=Object.getOwnPropertySymbols(e);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]])}return t};const H=i.forwardRef(((e,n)=>{const{prefixCls:t,size:a,disabled:o,loading:c,className:s,rootClassName:d,style:h,checked:g,value:f,defaultChecked:x,defaultValue:w,onChange:$}=e,y=E(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[S,M]=(0,u.Z)(!1,{value:null!=g?g:f,defaultValue:null!=x?x:w}),{getPrefixCls:C,direction:Z,switch:I}=i.useContext(v.E_),j=i.useContext(b.Z),H=(null!=o?o:j)||c,N=C("switch",t),O=i.createElement("div",{className:`${N}-handle`},c&&i.createElement(l.Z,{className:`${N}-loading-icon`})),[R,W,P]=z(N),q=(0,k.Z)(a),T=r()(null==I?void 0:I.className,{[`${N}-small`]:"small"===q,[`${N}-loading`]:c,[`${N}-rtl`]:"rtl"===Z},s,d,W,P),D=Object.assign(Object.assign({},null==I?void 0:I.style),h);return R(i.createElement(p.Z,{component:"Switch"},i.createElement(m,Object.assign({},y,{checked:S,onChange:(...e)=>{M(e[0]),null==$||$.apply(void 0,e)},prefixCls:N,className:T,style:D,disabled:H,ref:n,loadingIcon:O}))))})),N=H;N.__ANT_SWITCH=!0;var O=N},72375:function(e,n,t){var i=t(77260),l=t(39328),a=t(54549),r=t(76285),o=t(17323),c=t(51865),s=t.n(c),d=t(81424),u=t(44194),h=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],g=(0,u.forwardRef)((function(e,n){var t=e.prefixCls,c=void 0===t?"rc-checkbox":t,g=e.className,f=e.style,m=e.checked,p=e.disabled,v=e.defaultChecked,b=void 0!==v&&v,k=e.type,x=void 0===k?"checkbox":k,w=e.title,$=e.onChange,y=(0,o.Z)(e,h),S=(0,u.useRef)(null),M=(0,u.useRef)(null),C=(0,d.Z)(b,{value:m}),Z=(0,r.Z)(C,2),I=Z[0],j=Z[1];(0,u.useImperativeHandle)(n,(function(){return{focus:function(e){var n;null===(n=S.current)||void 0===n||n.focus(e)},blur:function(){var e;null===(e=S.current)||void 0===e||e.blur()},input:S.current,nativeElement:M.current}}));var z=s()(c,g,(0,a.Z)((0,a.Z)({},"".concat(c,"-checked"),I),"".concat(c,"-disabled"),p));return u.createElement("span",{className:z,title:w,style:f,ref:M},u.createElement("input",(0,i.Z)({},y,{className:"".concat(c,"-input"),ref:S,onChange:function(n){p||("checked"in e||j(n.target.checked),null==$||$({target:(0,l.Z)((0,l.Z)({},e),{},{type:x,checked:n.target.checked}),stopPropagation:function(){n.stopPropagation()},preventDefault:function(){n.preventDefault()},nativeEvent:n.nativeEvent}))},disabled:p,checked:!!I,type:x})),u.createElement("span",{className:"".concat(c,"-inner")}))}));n.Z=g}}]); |