1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2783],{92783:function(t,e,n){n.d(e,{Z:function(){return B}});var i=n(67294),o=n(93967),a=n.n(o),r=n(87462),l=n(97685),c=n(91),u=n(4942),s=n(1413),d=n(71002),m=n(21770),f=n(98423),h=n(42550),b=n(29372),g=n(8410),v=function(t,e){if(!t)return null;var n={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.clientHeight};return e?{left:0,right:0,width:0,top:n.top,bottom:n.bottom,height:n.height}:{left:n.left,right:n.right,width:n.width,top:0,bottom:0,height:0}},p=function(t){return void 0!==t?"".concat(t,"px"):void 0};function $(t){var e=t.prefixCls,n=t.containerRef,o=t.value,r=t.getValueIndex,c=t.motionName,u=t.onMotionStart,d=t.onMotionEnd,m=t.direction,f=t.vertical,$=void 0!==f&&f,w=i.useRef(null),S=i.useState(o),y=(0,l.Z)(S,2),k=y[0],Z=y[1],O=function(t){var i,o=r(t),a=null===(i=n.current)||void 0===i?void 0:i.querySelectorAll(".".concat(e,"-item"))[o];return(null==a?void 0:a.offsetParent)&&a},x=i.useState(null),C=(0,l.Z)(x,2),j=C[0],N=C[1],E=i.useState(null),M=(0,l.Z)(E,2),R=M[0],H=M[1];(0,g.Z)(function(){if(k!==o){var t=O(k),e=O(o),n=v(t,$),i=v(e,$);Z(o),N(n),H(i),t&&e?u():d()}},[o]);var P=i.useMemo(function(){if($){var t;return p(null!==(t=null==j?void 0:j.top)&&void 0!==t?t:0)}return"rtl"===m?p(-(null==j?void 0:j.right)):p(null==j?void 0:j.left)},[$,m,j]),D=i.useMemo(function(){if($){var t;return p(null!==(t=null==R?void 0:R.top)&&void 0!==t?t:0)}return"rtl"===m?p(-(null==R?void 0:R.right)):p(null==R?void 0:R.left)},[$,m,R]);return j&&R?i.createElement(b.ZP,{visible:!0,motionName:c,motionAppear:!0,onAppearStart:function(){return $?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},onAppearActive:function(){return $?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},onVisibleChanged:function(){N(null),H(null),d()}},function(t,n){var o=t.className,r=t.style,l=(0,s.Z)((0,s.Z)({},r),{},{"--thumb-start-left":P,"--thumb-start-width":p(null==j?void 0:j.width),"--thumb-active-left":D,"--thumb-active-width":p(null==R?void 0:R.width),"--thumb-start-top":P,"--thumb-start-height":p(null==j?void 0:j.height),"--thumb-active-top":D,"--thumb-active-height":p(null==R?void 0:R.height)}),c={ref:(0,h.sQ)(w,n),style:l,className:a()("".concat(e,"-thumb"),o)};return i.createElement("div",c)}):null}var w=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"],S=function(t){var e=t.prefixCls,n=t.className,o=t.disabled,r=t.checked,l=t.label,c=t.title,s=t.value,d=t.name,m=t.onChange,f=t.onFocus,h=t.onBlur,b=t.onKeyDown,g=t.onKeyUp,v=t.onMouseDown;return i.createElement("label",{className:a()(n,(0,u.Z)({},"".concat(e,"-item-disabled"),o)),onMouseDown:v},i.createElement("input",{name:d,className:"".concat(e,"-item-input"),type:"radio",disabled:o,checked:r,onChange:function(t){o||m(t,s)},onFocus:f,onBlur:h,onKeyDown:b,onKeyUp:g}),i.createElement("div",{className:"".concat(e,"-item-label"),title:c},l))},y=i.forwardRef(function(t,e){var n,o=t.prefixCls,b=void 0===o?"rc-segmented":o,g=t.direction,v=t.vertical,p=t.options,y=void 0===p?[]:p,k=t.disabled,Z=t.defaultValue,O=t.value,x=t.name,C=t.onChange,j=t.className,N=t.motionName,E=(0,c.Z)(t,w),M=i.useRef(null),R=i.useMemo(function(){return(0,h.sQ)(M,e)},[M,e]),H=i.useMemo(function(){return y.map(function(t){if("object"===(0,d.Z)(t)&&null!==t){var e=function(t){if(void 0!==t.title)return t.title;if("object"!==(0,d.Z)(t.label)){var e;return null===(e=t.label)||void 0===e?void 0:e.toString()}}(t);return(0,s.Z)((0,s.Z)({},t),{},{title:e})}return{label:null==t?void 0:t.toString(),title:null==t?void 0:t.toString(),value:t}})},[y]),P=(0,m.Z)(null===(n=H[0])||void 0===n?void 0:n.value,{value:O,defaultValue:Z}),D=(0,l.Z)(P,2),I=D[0],z=D[1],B=i.useState(!1),A=(0,l.Z)(B,2),q=A[0],X=A[1],K=function(t,e){z(e),null==C||C(e)},L=(0,f.Z)(E,["children"]),T=i.useState(!1),V=(0,l.Z)(T,2),W=V[0],F=V[1],U=i.useState(!1),_=(0,l.Z)(U,2),G=_[0],Q=_[1],Y=function(){Q(!0)},J=function(){Q(!1)},tt=function(){F(!1)},te=function(t){"Tab"===t.key&&F(!0)},tn=function(t){var e=H.findIndex(function(t){return t.value===I}),n=H.length,i=H[(e+t+n)%n];i&&(z(i.value),null==C||C(i.value))},ti=function(t){switch(t.key){case"ArrowLeft":case"ArrowUp":tn(-1);break;case"ArrowRight":case"ArrowDown":tn(1)}};return i.createElement("div",(0,r.Z)({role:"radiogroup","aria-label":"segmented control",tabIndex:k?void 0:0,"aria-orientation":v?"vertical":"horizontal"},L,{className:a()(b,(0,u.Z)((0,u.Z)((0,u.Z)({},"".concat(b,"-rtl"),"rtl"===g),"".concat(b,"-disabled"),k),"".concat(b,"-vertical"),v),void 0===j?"":j),ref:R}),i.createElement("div",{className:"".concat(b,"-group")},i.createElement($,{vertical:v,prefixCls:b,value:I,containerRef:M,motionName:"".concat(b,"-").concat(void 0===N?"thumb-motion":N),direction:g,getValueIndex:function(t){return H.findIndex(function(e){return e.value===t})},onMotionStart:function(){X(!0)},onMotionEnd:function(){X(!1)}}),H.map(function(t){return i.createElement(S,(0,r.Z)({},t,{name:x,key:t.value,prefixCls:b,className:a()(t.className,"".concat(b,"-item"),(0,u.Z)((0,u.Z)({},"".concat(b,"-item-selected"),t.value===I&&!q),"".concat(b,"-item-focused"),G&&W&&t.value===I)),checked:t.value===I,onChange:K,onFocus:Y,onBlur:J,onKeyDown:ti,onKeyUp:te,onMouseDown:tt,disabled:!!k||!!t.disabled}))})))}),k=n(7028),Z=n(53124),O=n(98675),x=n(85982),C=n(14747),j=n(83559),N=n(83262);function E(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function M(t){return{background:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}let R=Object.assign({overflow:"hidden"},C.vS),H=t=>{let{componentCls:e}=t,n=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),i=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),o=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`}),(0,C.Qy)(t)),{[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,x.unit)(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},M(t)),{color:t.itemSelectedColor}),"&-focused":(0,C.oN)(t),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,pointerEvents:"none"},[`&:not(${e}-item-selected):not(${e}-item-disabled)`]:{"&:hover, &:active":{color:t.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:t.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:t.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:(0,x.unit)(n),padding:`0 ${(0,x.unit)(t.segmentedPaddingHorizontal)}`},R),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()}
1,"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Object.assign(Object.assign({},M(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,x.unit)(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:i,lineHeight:(0,x.unit)(i),padding:`0 ${(0,x.unit)(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:(0,x.unit)(o),padding:`0 ${(0,x.unit)(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),E(`&-disabled ${e}-item`,t)),E(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"},[`&${e}-shape-round`]:{borderRadius:9999,[`${e}-item, ${e}-thumb`]:{borderRadius:9999}}})}},P=t=>{let{colorTextLabel:e,colorText:n,colorFillSecondary:i,colorBgElevated:o,colorFill:a,lineWidthBold:r,colorBgLayout:l}=t;return{trackPadding:r,trackBg:l,itemColor:e,itemHoverColor:n,itemHoverBg:i,itemSelectedBg:o,itemActiveBg:a,itemSelectedColor:n}};var D=(0,j.I$)("Segmented",t=>{let{lineWidth:e,calc:n}=t,i=(0,N.mergeToken)(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return H(i)},P),I=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)0>e.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n};let z=i.forwardRef((t,e)=>{let n=(0,k.Z)(),{prefixCls:o,className:r,rootClassName:l,block:c,options:u=[],size:s="middle",style:d,vertical:m,shape:f="default",name:h=n}=t,b=I(t,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:g,direction:v,className:p,style:$}=(0,Z.dj)("segmented"),w=g("segmented",o),[S,x,C]=D(w),j=(0,O.Z)(s),N=i.useMemo(()=>u.map(t=>{if("object"==typeof t&&(null==t?void 0:t.icon)){let{icon:e,label:n}=t,o=I(t,["icon","label"]);return Object.assign(Object.assign({},o),{label:i.createElement(i.Fragment,null,i.createElement("span",{className:`${w}-item-icon`},e),n&&i.createElement("span",null,n))})}return t}),[u,w]),E=a()(r,l,p,{[`${w}-block`]:c,[`${w}-sm`]:"small"===j,[`${w}-lg`]:"large"===j,[`${w}-vertical`]:m,[`${w}-shape-${f}`]:"round"===f},x,C),M=Object.assign(Object.assign({},$),d);return S(i.createElement(y,Object.assign({},b,{name:h,className:E,style:M,options:N,ref:e,prefixCls:w,direction:v,vertical:m})))});var B=z}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.