You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
26 KiB
1 line
26 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[51311],{27812:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var s=i.forwardRef(l)},67921:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z"}}]},name:"delivered-procedure",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var s=i.forwardRef(l)},61481:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var s=i.forwardRef(l)},63524:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var s=i.forwardRef(l)},32134:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var s=i.forwardRef(l)},77578:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=e=>e?"function"==typeof e?e():e:null},28103:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(92310),i=n.n(r),o=n(59301),a=n(36355),l=n(17313),s=n(83116),c=n(37613);const d=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},(0,l.Wf)(e)),{borderBlockStart:`${i}px solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*a+"%"},"&::after":{width:100-100*a+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*a+"%"},"&::after":{width:100*a+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var u=(0,s.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[d(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};var p=e=>{const{getPrefixCls:t,direction:n,divider:r}=o.useContext(a.E_),{prefixCls:l,type:s="horizontal",orientation:c="center",orientationMargin:d,className:p,rootClassName:f,children:g,dashed:m,plain:v,style:b}=e,$=h(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),w=t("divider",l),[y,S]=u(w),x=c.length>0?`-${c}`:c,k=!!g,C="left"===c&&null!=d,E="right"===c&&null!=d,O=i()(w,null==r?void 0:r.className,S,`${w}-${s}`,{[`${w}-with-text`]:k,[`${w}-with-text${x}`]:k,[`${w}-dashed`]:!!m,[`${w}-plain`]:!!v,[`${w}-rtl`]:"rtl"===n,[`${w}-no-default-orientation-margin-left`]:C,[`${w}-no-default-orientation-margin-right`]:E},p,f),I=o.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),M=Object.assign(Object.assign({},C&&{marginLeft:I}),E&&{marginRight:I});return y(o.createElement("div",Object.assign({className:O,style:Object.assign(Object.assign({},null==r?void 0:r.style),b)},$,{role:"separator"}),g&&"vertical"!==s&&o.createElement("span",{className:`${w}-inner-text`,style:M},g)))}},39722:function(e,t,n){"use strict";n.d(t,{t5:function(){return u}});var r=n(92310),i=n.n(r),o=n(55477),a=n(59301),l=n(36355),s=n(77578),c=n(17356),d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const u=e=>{const{hashId:t,prefixCls:n,className:r,style:l,placement:c="top",title:d,content:u,children:h}=e;return a.createElement("div",{className:i()(t,n,`${n}-pure`,`${n}-placement-${c}`,r),style:l},a.createElement("div",{className:`${n}-arrow`}),a.createElement(o.G,Object.assign({},e,{className:t,prefixCls:n}),h||((e,t,n)=>{if(t||n)return a.createElement(a.Fragment,null,t&&a.createElement("div",{className:`${e}-title`},(0,s.Z)(t)),a.createElement("div",{className:`${e}-inner-content`},(0,s.Z)(n)))})(n,d,u)))};t.ZP=e=>{const{prefixCls:t}=e,n=d(e,["prefixCls"]),{getPrefixCls:r}=a.useContext(l.E_),i=r("popover",t),[o,s]=(0,c.Z)(i);return o(a.createElement(u,Object.assign({},n,{prefixCls:i,hashId:s})))}},60324:function(e,t,n){"use strict";var r=n(92310),i=n.n(r),o=n(59301),a=n(77578),l=n(62892),s=n(36355),c=n(6848),d=n(39722),u=n(17356),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const p=e=>{let{title:t,content:n,prefixCls:r}=e;return o.createElement(o.Fragment,null,t&&o.createElement("div",{className:`${r}-title`},(0,a.Z)(t)),o.createElement("div",{className:`${r}-inner-content`},(0,a.Z)(n)))},f=o.forwardRef(((e,t)=>{const{prefixCls:n,title:r,content:a,overlayClassName:d,placement:f="top",trigger:g="hover",mouseEnterDelay:m=.1,mouseLeaveDelay:v=.1,overlayStyle:b={}}=e,$=h(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:w}=o.useContext(s.E_),y=w("popover",n),[S,x]=(0,u.Z)(y),k=w(),C=i()(d,x);return S(o.createElement(c.Z,Object.assign({placement:f,trigger:g,mouseEnterDelay:m,mouseLeaveDelay:v,overlayStyle:b},$,{prefixCls:y,overlayClassName:C,ref:t,overlay:r||a?o.createElement(p,{prefixCls:y,title:r,content:a}):null,transitionName:(0,l.m)(k,"zoom-big",$.transitionName),"data-popover-inject":!0})))}));f._InternalPanelDoNotUseOrYouWillBeFired=d.ZP,t.Z=f},17356:function(e,t,n){"use strict";var r=n(17313),i=n(29878),o=n(19447),a=n(33166),l=n(83116),s=n(37613);const c=e=>{const{componentCls:t,popoverColor:n,minWidth:i,fontWeightStrong:a,popoverPadding:l,boxShadowSecondary:s,colorTextHeading:c,borderRadiusLG:d,zIndexPopup:u,marginXS:h,colorBgElevated:p,popoverBg:f}=e;return[{[t]:Object.assign(Object.assign({},(0,r.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":p,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:d,boxShadow:s,padding:l},[`${t}-title`]:{minWidth:i,marginBottom:h,color:c,fontWeight:a},[`${t}-inner-content`]:{color:n}})},(0,o.ZP)(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},d=e=>{const{componentCls:t}=e;return{[t]:a.i.map((n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}}))}},u=e=>{const{componentCls:t,lineWidth:n,lineType:r,colorSplit:i,paddingSM:o,controlHeight:a,fontSize:l,lineHeight:s,padding:c}=e,d=a-Math.round(l*s);return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d/2}px ${c}px ${d/2-n}px`,borderBottom:`${n}px ${r} ${i}`},[`${t}-inner-content`]:{padding:`${o}px ${c}px`}}}};t.Z=(0,l.Z)("Popover",(e=>{const{colorBgElevated:t,colorText:n,wireframe:r}=e,o=(0,s.TS)(e,{popoverPadding:12,popoverBg:t,popoverColor:n});return[c(o),d(o),r&&u(o),(0,i._y)(o,"zoom-big")]}),(e=>({width:177,minWidth:177,zIndexPopup:e.zIndexPopupBase+30})),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},78673:function(e,t,n){"use strict";n.d(t,{Z:function(){return z}});var r=n(58617),i=n(92310),o=n.n(i),a=n(54476),l=n(20068),s=n(42978),c=n(75931),d=n(59301),u=n(18929),h=n(10228),p=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],f=d.forwardRef((function(e,t){var n,r=e.prefixCls,i=void 0===r?"rc-switch":r,f=e.className,g=e.checked,m=e.defaultChecked,v=e.disabled,b=e.loadingIcon,$=e.checkedChildren,w=e.unCheckedChildren,y=e.onClick,S=e.onChange,x=e.onKeyDown,k=(0,c.Z)(e,p),C=(0,u.Z)(!1,{value:g,defaultValue:m}),E=(0,s.Z)(C,2),O=E[0],I=E[1];function M(e,t){var n=O;return v||(I(n=e),null==S||S(n,t)),n}var L=o()(i,f,(n={},(0,l.Z)(n,"".concat(i,"-checked"),O),(0,l.Z)(n,"".concat(i,"-disabled"),v),n));return d.createElement("button",(0,a.Z)({},k,{type:"button",role:"switch","aria-checked":O,disabled:v,className:L,ref:t,onKeyDown:function(e){e.which===h.Z.LEFT?M(!1,e):e.which===h.Z.RIGHT&&M(!0,e),null==x||x(e)},onClick:function(e){var t=M(!O,e);null==y||y(t,e)}}),b,d.createElement("span",{className:"".concat(i,"-inner")},d.createElement("span",{className:"".concat(i,"-inner-checked")},$),d.createElement("span",{className:"".concat(i,"-inner-unchecked")},w)))}));f.displayName="Switch";var g=f,m=n(14088),v=n(36355),b=n(1684),$=n(19716),w=n(64993),y=n(17313),S=n(83116),x=n(37613);const k=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:l}=e,s=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:`${n}px`,[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${l+2*r}px - ${2*a}px)`,marginInlineEnd:`calc(100% - ${l+2*r}px + ${2*a}px)`},[`${s}-unchecked`]:{marginTop:-n,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:(l-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${l+2*r}px + ${2*a}px)`,marginInlineEnd:`calc(-100% + ${l+2*r}px - ${2*a}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${l+r}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},C=e=>{const{componentCls:t,handleSize:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(n-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},E=e=>{const{componentCls:t,motion:n,trackPadding:r,handleBg:i,handleShadow:o,handleSize:a}=e,l=`${t}-handle`;return{[t]:{[l]:{position:"absolute",top:r,insetInlineStart:r,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:a/2,boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${a+r}px)`},[`&:not(${t}-disabled):active`]:n?{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}:{}}}},O=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a}=e,l=`${t}-inner`;return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-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"},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${a+2*r}px - ${2*o}px)`,marginInlineEnd:`calc(100% - ${a+2*r}px + ${2*o}px)`},[`${l}-unchecked`]:{marginTop:-n,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${a+2*r}px + ${2*o}px)`,marginInlineEnd:`calc(-100% + ${a+2*r}px - ${2*o}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:2*r,marginInlineEnd:2*-r}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:2*-r,marginInlineEnd:2*r}}}}}},I=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,y.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:`${n}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,y.Qy)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}};var M=(0,S.Z)("Switch",(e=>{const t=(0,x.TS)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:.75*e.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[I(t),O(t),E(t),C(t),k(t)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,o=t*n,a=r/2,l=o-4,s=a-4;return{trackHeight:o,trackHeightSM:a,trackMinWidth:2*l+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:i,handleSize:l,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new w.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}})),L=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const P=d.forwardRef(((e,t)=>{const{prefixCls:n,size:i,disabled:a,loading:l,className:s,rootClassName:c,style:u}=e,h=L(e,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:p,direction:f,switch:w}=d.useContext(v.E_),y=d.useContext(b.Z),S=(null!=a?a:y)||l,x=p("switch",n),k=d.createElement("div",{className:`${x}-handle`},l&&d.createElement(r.Z,{className:`${x}-loading-icon`})),[C,E]=M(x),O=(0,$.Z)(i),I=o()(null==w?void 0:w.className,{[`${x}-small`]:"small"===O,[`${x}-loading`]:l,[`${x}-rtl`]:"rtl"===f},s,c,E),P=Object.assign(Object.assign({},null==w?void 0:w.style),u);return C(d.createElement(m.Z,{component:"Switch"},d.createElement(g,Object.assign({},h,{prefixCls:x,className:I,style:P,disabled:S,ref:t,loadingIcon:k}))))}));P.__ANT_SWITCH=!0;var z=P},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(59301),o=l(i),a=l(n(12708));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?o:this.calculateOffset(e,o)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore,a=(t.initialLoad,t.isReverse),l=t.loader,s=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,s&&s(t)};var d=[n];return i&&(l?a?d.unshift(l):d.push(l):this.defaultLoader&&(a?d.unshift(this.defaultLoader):d.push(this.defaultLoader))),o.default.createElement(r,c,d)}}]),t}(i.Component);s.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},s.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=s,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]); |