"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4091],{4091:(e,t,i)=>{i.d(t,{k:()=>_e});var n=i(58632),o=i(24643),r=i(67518),a=i(41271),l=i(73580),s=i(40099),d=i(56546),c=i(25754),u=i(96110),h=i(73635),g=i(75778),p=i(60072),f=i(84908),m=i(53737),v=i(32125),x=i(90159),b=i(25616),_=i(53438),w=i(88920),y=i(53764),S=i(95481),C=i(85349),k=i(89311),T=i(50970),L=i(11983),j=i(52333),z=i(62186),F=i(81825),I=i(29098),P=i(7751),M=i(7713),U=i(72153),D=i(84827),E=i(97397);const R=(0,z.default)("div",{target:"e140z3d00"})({position:"relative",width:400},"label:DivSendMessagePanelContainer;"),N=(0,z.default)("div",{target:"e140z3d01"})((({theme:{direction:e}})=>[{position:"absolute",top:36,cursor:"pointer"},(0,U.mp)({direction:e,end:32})]),"label:DivCloseButtonWrapper;"),A=(0,z.default)("h2",{target:"e140z3d02"})((({theme:e,theme:{direction:t}})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P0",fontWeight:"bold"}),{padding:"32px 0 0"},(0,U.mp)({direction:t,paddingStart:32,paddingEnd:62})]),"label:H2ModalTitle;"),O=(0,z.default)("div",{target:"e140z3d03"})((({theme:e})=>({display:"flex",alignItems:"center",width:336,height:36,margin:"24px 32px 0",borderRadius:"4px",backgroundColor:e.colors.BGPlaceholderDefault})),"label:DivSearchContainer;"),B=(0,z.default)(F.A,{target:"e140z3d04"})((({theme:{direction:e}})=>[(0,U.mp)({direction:e,marginStart:16,marginEnd:12})]),"label:StyledMagnifyingGlass;"),q=(0,z.default)("input",{target:"e140z3d05"})((({theme:e,theme:{colors:t}})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P2"}),{width:240,height:22,border:"none",outline:"none",background:"transparent",color:t.TextPrimary,caretColor:t.Primary,"::placeholder":{color:t.TextTertiary}}]),"label:InputUser;"),H=(0,z.default)("div",{target:"e140z3d06"})((({theme:{direction:e}})=>[{width:16,height:16,cursor:"pointer"},(0,U.mp)({direction:e,marginStart:8})]),"label:DivClearButton;"),W=(0,z.default)("div",{target:"e140z3d07"})({minHeight:200,marginTop:24},"label:DivUserListContainer;"),V=(0,z.default)("p",{target:"e140z3d08"})((({theme:e})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P1",color:"TextQuaternary"}),{marginTop:74,textAlign:"center"}]),"label:PNoResult;"),G=(0,z.default)(D.R,{target:"e140z3d09"})({width:36,height:36,margin:"6px auto 12px"},"label:StyledLoading;"),$=(0,z.default)("p",{target:"e140z3d010"})((({theme:e,theme:{direction:t}})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P4",color:"TextTertiary"}),{marginBottom:4,fontSize:"13px"},(0,U.mp)({direction:t,marginStart:32})]),"label:PUserTitle;"),K=(0,z.default)("div",{target:"e140z3d011"})((({long:e,isSearching:t})=>({position:"relative",boxSizing:"border-box",overflowY:"auto",width:"100%",minHeight:t?e?578:472:200,maxHeight:e?578:472,paddingBottom:e?210:102,"::-webkit-scrollbar":{display:"none"}})),"label:DivUserListInnerContainer;"),Y=(0,z.default)("div",{target:"e140z3d012"})((({theme:e})=>({boxSizing:"border-box",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"8px 32px",cursor:"pointer",":hover":{backgroundColor:e.colors.BGView}})),"label:DivUserItemContainer;"),J=(0,z.default)("div",{target:"e140z3d013"})({display:"flex",flex:1,alignItems:"center",height:48},"label:DivUserItem;"),Q=(0,z.default)("div",{target:"e140z3d014"})((({theme:{direction:e}})=>(0,U.mp)({direction:e,marginStart:12})),"label:DivRightPart;"),X=(0,z.default)("div",{target:"e140z3d015"})([{display:"flex",alignItems:"center"}],"label:DivNicknameContainer;"),Z=(0,z.default)("span",{target:"e140z3d016"})((({theme:e})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P1",fontWeight:"bold"}),{maxWidth:220},U.PR]),"label:SpanNickname;"),ee=(0,z.default)(I.A,{target:"e140z3d017"})((({theme:{direction:e}})=>[{flexShrink:0},(0,U.mp)({direction:e,marginStart:4})]),"label:StyledVerifiedBadgeColor;"),te=(0,z.default)("p",{target:"e140z3d018"})((({theme:e})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"TextTertiary"}),{maxWidth:240,marginTop:2},U.PR]),"label:PUniqueId;"),ie=(0,z.default)("div",{target:"e140z3d019"})((({theme:{direction:e}})=>[{flexShrink:0,width:22,height:22},(0,U.mp)({direction:e,marginStart:12})]),"label:DivCheckboxContainer;"),ne=(0,z.default)("div",{target:"e140z3d020"})((({theme:{colors:e}})=>({position:"absolute",bottom:0,left:0,right:0,padding:"12px 32px 32px 32px",backgroundColor:e.BGPrimary,borderRadius:"0 0 8px 8px",":before":{position:"absolute",top:0,left:0,right:0,content:'""',transform:"scaleY(.5)",width:"100%",height:1,backgroundColor:e.LineReverse2}})),"label:DivSendContainer;"),oe=(0,z.default)(E.y,{target:"e140z3d021"})({width:336,height:46,marginTop:12},"label:StyledSendButton;"),re=(0,z.default)("div",{target:"e140z3d022"})({display:"flex",marginTop:12},"label:DivMessageContainer;"),ae=(0,z.default)("textarea",{target:"e140z3d023"})((({theme:e,theme:{direction:t,colors:i}})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P2"}),{display:"block",width:268,height:98,border:"none",resize:"none",outline:"none",wordBreak:"break-word",overflowWrap:"break-word",backgroundColor:i.BGPrimary,color:i.TextPrimary,caretColor:i.Primary,"::placeholder":{color:i.TextTertiary}},(0,U.mp)({direction:t,marginEnd:12})]),"label:Textarea;"),le=(0,z.default)("img",{target:"e140z3d024"})({width:56,height:74},"label:ImgCover;"),se=(0,z.default)("div",{target:"e140z3d025"})((({theme:e,theme:{direction:t}})=>[{display:"flex",alignItems:"center",width:336,padding:"12px 0 12px",margin:"16px 32px 0",borderRadius:"4px",backgroundColor:e.colors.BGView},(0,U.mp)({direction:t,paddingStart:16,paddingEnd:4})]),"label:DivTipContainer;"),de=(0,z.default)(P.A,{target:"e140z3d026"})({width:24,height:24,flexShrink:0},"label:StyledPersonArrowLeftRight;"),ce=(0,z.default)(M.A,{target:"e140z3d027"})({width:24,height:24,flexShrink:0},"label:StyledTwoPerson;"),ue=(0,z.default)("div",{target:"e140z3d028"})((({theme:{colors:e}})=>({width:24,height:24,flexShrink:0,fontSize:"24px",color:e.TextSecondary})),"label:DivSubOnlyTagContainer;"),he=(0,z.default)("p",{target:"e140z3d029"})((({theme:e,theme:{direction:t}})=>[(0,U.zy)({theme:e,fontFamily:"TikTokFont",typography:"P4",color:"TextSecondary"}),{fontSize:"13px"},(0,U.mp)({direction:t,marginStart:12})]),"label:PTip;");var ge=i(92846),pe=i(40070),fe=i(60484);const me=(0,s.forwardRef)((function({uniqueId:e,isSelected:t=!1,searchValue:i="",selectedCount:n,onUserSelected:r},a){const l=(0,f.nW)((t=>t.users[e]),v.bN),d=(0,s.useRef)(null);(0,s.useImperativeHandle)(a,(()=>({get offsetTop(){var e,t;return null!==(t=null===(e=d.current)||void 0===e?void 0:e.offsetTop)&&void 0!==t?t:0}})),[]);const c=(0,s.useCallback)((()=>{n>=15&&!t||r(l,!t)}),[t,l,n,r]),{avatarThumb:u,nickname:h="",verified:g}=(0,fe.L$)(l),p=h.toLocaleLowerCase().indexOf(i.toLocaleLowerCase()),m=-1===p?0:i.length;if(!e||!l)return null;const x=h.slice(0,p),b=h.slice(p,p+m),_=h.slice(p+m);return(0,o.jsxs)(Y,{ref:d,onClick:c,children:[(0,o.jsxs)(J,{children:[(0,o.jsx)(ge.e,{size:48,src:u}),(0,o.jsxs)(Q,{children:[(0,o.jsxs)(X,{children:[(0,o.jsx)(Z,{children:(0,o.jsxs)("span",{children:[x,(0,o.jsx)("span",{style:{color:"#fe2c55"},children:b}),_]})}),g&&(0,o.jsx)(ee,{width:14,height:14,style:{verticalAlign:"middle",marginLeft:4}})]}),(0,o.jsx)(te,{children:e})]})]}),(0,o.jsx)(ie,{children:(0,o.jsx)(pe.S,{size:22,isCircle:!1,value:t})})]})}));var ve,xe=i(22884),be=i(44494);!function(e){e.RECENT="recent",e.FOLLOWING="following"}(ve||(ve={}));const _e=(0,s.memo)((function({visible:e,videoId:t,onClose:i,onKeyDown:z}){const F=(0,b.s)(),I=(0,a.P)(T.L,{dependencies:[],selector:e=>{var t;return null===(t=e.appContext)||void 0===t?void 0:t.user}}),P=(0,p.F3)((e=>e[t]),v.bN),{video:M,forFriend:U,author:D="",authorId:E="",subVideoMeta:Y}=(0,s.useMemo)((()=>null!=P?P:{}),[P]),[J,Q]=(0,f.JY)((e=>e.users[D]),v.bN),{privateAccount:X,nickname:Z}=(0,s.useMemo)((()=>null!=J?J:{}),[J]),[{recentUserList:ee,recentUserNameList:te,recentUidList:ie,followingUser:ge,isFollowingLoading:pe,isSendMessageLoading:fe},ve]=(0,m.D1)((e=>({recentUserList:e.recentUserList,recentUserNameList:e.recentUserNameList,recentUidList:e.recentUidList,followingUser:e.followingUser,isFollowingLoading:e.isFollowingLoading,isSendMessageLoading:e.isSendMessageLoading})),v.bN),_e=(0,l.Nj)(d.A),we=(0,s.useRef)({recent:!1,following:!1}),ye=(0,s.useRef)({recent:{list:[],hasShown:[]},following:{list:[],hasShown:[]}}),Se=(0,s.useCallback)(((e,t)=>i=>{ye.current[t].list[e]=i}),[]),{isRTL:Ce}=(0,k.m)(),{colors:ke}=(0,r.u)(),[Te,Le]=(0,s.useState)(""),[je,ze]=(0,s.useState)(""),[Fe,Ie]=(0,s.useState)([]),[Pe,Me]=(0,s.useState)([]),[Ue,De]=(0,s.useState)([]),Ee=Fe.length,Re=ee.length,{list:Ne,nicknameList:Ae,uidList:Oe,hasMore:Be}=ge,qe=Ne.length,He=Ee>0,We=""!==Te,Ve=X||U||Boolean(Y),Ge=(0,xe.f7)();(0,s.useEffect)((()=>{e||(Le(""),ze(""),Ie([]),ve.setSendMessageStatus({isFailed:!1,isLoading:!1}))}),[e,ve]),(0,s.useEffect)((()=>{if(!qe&&Be){if(I){const{uid:e,avatarUri:t,nickName:i}=I,o=(0,n.__rest)(I,["uid","avatarUri","nickName"]),r=Object.assign({id:e,nickname:i,verified:!1,relation:0,avatarThumb:t[0],avatarMedium:t[0],avatarLarger:t[0]},o);Q.setUser(r),ve.updateFollowingUserList({list:[I.uniqueId],nicknameList:[i],uidList:[e],hasMore:!0,maxCursor:0,minCursor:0})}ve.getFollowingUserListWithCanShare({count:90})}}),[]),(0,s.useEffect)((()=>{Promise.resolve().then((()=>{const e=ye.current.recent,t=ye.current.following;if(Re&&!we.current.recent&&(we.current.recent=!0,ee.slice(0,5).forEach(((t,i)=>{var n,o;(null!==(o=null===(n=e.list[i])||void 0===n?void 0:n.offsetTop)&&void 0!==o?o:1/0)<354&&(c.w.handleShareHeadShow({user_type:"recent",rank_index:i,is_self:t===(null==I?void 0:I.uniqueId)?1:0,to_user_id:ie[i]}),e.hasShown[i]=!0)}))),qe&&!we.current.following){if(1===qe&&Be)return;we.current.following=!0,Ne.slice(0,5).forEach(((e,i)=>{var n,o;(null!==(o=null===(n=t.list[i])||void 0===n?void 0:n.offsetTop)&&void 0!==o?o:1/0)<354&&(c.w.handleShareHeadShow({user_type:"following",rank_index:i,is_self:e===(null==I?void 0:I.uniqueId)?1:0,to_user_id:Oe[i]}),t.hasShown[i]=!0)}))}})).catch((()=>{}))}),[null==I?void 0:I.uniqueId,Ne,qe,ee,Re,ie,Oe,Be]),(0,s.useEffect)((()=>{if(!Te)return;const e=[],t=[],i=Te.toLocaleLowerCase();te.forEach(((t,n)=>{(t.toLocaleLowerCase().indexOf(i)>-1||ee[n].toLocaleLowerCase().indexOf(i)>-1)&&e.push(ee[n])})),Ae.forEach(((n,o)=>{e.indexOf(Ne[o])<0&&(n.toLocaleLowerCase().indexOf(i)>-1||Ne[o].toLocaleLowerCase().indexOf(i)>-1)&&t.push(Ne[o])})),Me(e),De(t)}),[Te,te,ee,Ne,Ae]);const $e=(0,s.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]),Ke=(0,s.useCallback)((()=>{i()}),[i]),Ye=(0,_.MA)(P),Je=(0,s.useCallback)(((e,t)=>{var i;if(t)e&&Ie([...Fe,e]),_e.handleShare(Object.assign({platform:"chat_head",group_id:null==M?void 0:M.id,author_id:E,poi_id:null===(i=null==P?void 0:P.poi)||void 0===i?void 0:i.id,is_sub_only_video:Y?1:0},Ye));else{let t=-1;Fe.some(((i,n)=>i.uniqueId===(null==e?void 0:e.uniqueId)&&(t=n,!0))),t>-1&&(Fe.splice(t,1),Ie([...Fe]))}}),[Fe,_e,null==M?void 0:M.id,E,P]),Qe=(0,s.useCallback)((e=>{const{value:t}=e.target;Le(t)}),[]),Xe=(0,s.useCallback)((()=>{c.w.handleSearchContact()}),[]),Ze=(0,s.useCallback)((()=>{Le("")}),[]),et=(0,s.useCallback)((e=>{const{value:t}=e.target;ze(t)}),[]),tt=function({selectedUserList:e,messageText:t,videoId:i}){const[{conversationMap:o},r]=(0,m.D1)((e=>({conversationMap:e.conversationMap}))),l=(0,a.P)(T.L,{dependencies:[],selector:e=>{var t;return null===(t=e.appContext)||void 0===t?void 0:t.user}}),d=(0,a.P)(j.k,{selector:e=>e[i],dependencies:[i]});return(0,s.useCallback)((()=>{var a;const{authorId:s="",nickname:u,authorSecId:h,avatarThumb:g,video:p}=null!=d?d:{},f=[];let m=!1;e.forEach((e=>{(null==e?void 0:e.id)===(null==l?void 0:l.uid)&&(m=!0),f.push(null==e?void 0:e.id)})),c.w.handleShareVideoToChat({platform:"chat_head",is_self:m?1:0,group_id:null!==(a=null==p?void 0:p.id)&&void 0!==a?a:"",author_id:s,is_with_text:t.trim()?1:0,chat_cnt:e.length,to_user_id:String(f)}),r.setSendMessageStatus({isLoading:!0,isFailed:!1}),e.forEach((e=>(0,n.__awaiter)(this,void 0,void 0,(function*(){var n;const{id:a,relation:l}=e,d=Boolean(null==o?void 0:o[a]),c=null===(n=null==o?void 0:o[a])||void 0===n?void 0:n.id;yield r.sendMessage({convId:c,uid:a,relation:l,type:8,content:{aweType:800,itemId:i,uid:s,secUID:h,content_thumb:{url_list:[g],uri:g},content_name:u,cover_url:{url_list:[null==p?void 0:p.cover],uri:null==p?void 0:p.cover},cover_width:null==p?void 0:p.width,cover_height:null==p?void 0:p.height},hasConversation:d}),t.trim()&&(yield r.sendMessage({convId:c,uid:a,relation:l,type:7,content:{aweType:0,text:t},hasConversation:d}))}))))}),[d,e,t,r,null==l?void 0:l.uid,o,i])}({selectedUserList:Fe,messageText:je,videoId:t}),{isInExperiment:it}=(0,w.NV)();!function({selectedUserList:e,messageText:t,handleSuccess:i,isRTL:n}){const o=(0,b.s)(),[{isSendMessageFailed:r,successSentMessageCount:a},l]=(0,m.D1)((e=>({isSendMessageFailed:e.isSendMessageFailed,successSentMessageCount:e.successSentMessageCount})),v.bN),d=e.length;(0,s.useEffect)((()=>{var s,c,u,h;if(r&&(L.F.open({content:o("support_webapp_sharing_error_message"),duration:3,widthType:"half",getContainer:y.M,getContainerPosition:"fixed"}),l.setSendMessageStatus({isLoading:!1,isFailed:!1,successCount:0})),0!==a&&a===d*(t.trim()?2:1)){const t=null!==(c=null===(s=e[d-1])||void 0===s?void 0:s.nickname)&&void 0!==c?c:"",r=null!==(h=null===(u=e[d-2])||void 0===u?void 0:u.nickname)&&void 0!==h?h:"";switch(d){case 1:L.F.open({content:o("support_webapp_sharing_sent_toast_1",{username:t}),type:"success",duration:3,widthType:"half",isRTL:n,getContainer:y.M,getContainerPosition:"fixed"});break;case 2:L.F.open({content:o("support_webapp_sharing_sent_toast_2",{username:t,username2:r}),type:"success",duration:3,widthType:"half",isRTL:n,getContainer:y.M,getContainerPosition:"fixed"});break;default:L.F.open({content:o("support_webapp_sharing_sent_toast_3",{username:t,number:d-1}),type:"success",duration:3,widthType:"half",isRTL:n,getContainer:y.M,getContainerPosition:"fixed"})}l.setSendMessageStatus({isLoading:!1,successCount:0}),i()}}),[r,a,e,t,d,o,l,i,n])}({selectedUserList:Fe,messageText:je,handleSuccess:()=>{if(it&&Fe.length>0){const e=Fe[Fe.length-1];Ge.updateLastSharedInfo({platformId:be.Ag.message,user:e})}i()},isRTL:Ce});const nt=(0,x._g)((e=>{if(We)return;const t=e.target,{scrollHeight:i,scrollTop:n,clientHeight:o}=t;i-n===o&&!pe&&Be&&ve.getFollowingUserListWithCanShare({count:30});const r=ye.current.recent,a=ye.current.following;r.list.forEach(((e,t)=>{var i;r.hasShown[t]||(null!==(i=null==e?void 0:e.offsetTop)&&void 0!==i?i:1/0){var i;a.hasShown[t]||(null!==(i=null==e?void 0:e.offsetTop)&&void 0!==i?i:1/0){const n=Fe.some((t=>t.uniqueId===e));return(0,o.jsx)(me,{uniqueId:e,isSelected:n,searchValue:Te,selectedCount:Ee,onUserSelected:Je,ref:Se(t,i)},t)}),[Te,Ee,Fe,Se,Je]),rt=(0,y.M)();return(0,s.useEffect)((()=>{rt.addEventListener("keydown",(e=>{null==z||z(e)}))}),[z,rt]),(0,o.jsx)(S.aF,{parentRef:rt,visible:e,maskCloseable:!1,children:(0,o.jsx)(R,{onClick:$e,children:(0,o.jsxs)(C.t,{isMobile:!1,children:[(0,o.jsx)(N,{onClick:Ke,children:(0,o.jsx)(h.A,{width:24,height:24})}),(0,o.jsx)(A,{children:F("support_webapp_sharing_option_button")}),(()=>{if(!Ve)return null;let e=(0,o.jsx)(ce,{fill:ke.TextSecondary}),t="support_webapp_sharing_toast_2";return U?(e=(0,o.jsx)(de,{fill:ke.TextSecondary}),t="support_webapp_sharing_toast_1"):Y&&(e=(0,o.jsx)(ue,{children:(0,o.jsx)(u.P,{})}),t="subVideo_share_note"),(0,o.jsxs)(se,{children:[e,(0,o.jsx)(he,{children:F(t,{username:Z})})]})})(),(0,o.jsxs)(O,{children:[(0,o.jsx)(B,{width:24,height:24,fill:We?ke.TextPrimary:ke.TextReverse4}),(0,o.jsx)(q,{value:Te,placeholder:F("support_webapp_sharing_searchbar_ghosttext"),onChange:Qe,onClick:Xe}),We&&(0,o.jsx)(H,{onClick:Ze,children:(0,o.jsx)(g.A,{width:16,height:16,fill:ke.TextReverse4})})]}),(0,o.jsx)(W,{children:(0,o.jsx)(K,{long:He,isSearching:We,onScroll:nt,children:(()=>{if(We){const e=Pe.length>0||Ue.length>0;return(0,o.jsxs)(o.Fragment,{children:[Pe.map(((e,t)=>ot(e,t,"recent"))),Ue.map(((e,t)=>ot(e,t,"following"))),!e&&(0,o.jsx)(V,{children:F("support_webapp_sharing_search_results")})]})}return(0,o.jsxs)(o.Fragment,{children:[0!==Re&&(0,o.jsx)($,{children:F("support_webapp_sharing_recent")}),ee.map(((e,t)=>ot(e,t,"recent"))),(0,o.jsx)($,{style:{marginTop:Re?12:0},children:F("support_webapp_sharing_following")}),Ne.map(((e,t)=>ot(e,t,"following"))),pe&&(0,o.jsx)(G,{})]})})()})}),(0,o.jsxs)(ne,{children:[He&&(0,o.jsxs)(re,{children:[(0,o.jsx)(ae,{value:je,placeholder:F("support_webapp_sharing_write_a_message"),maxLength:6e3,onChange:et}),(0,o.jsx)(le,{src:null==M?void 0:M.cover})]}),(0,o.jsxs)(oe,{buttonTheme:"primary",disabled:!He,onClick:tt,loading:fe,children:[F("support_webapp_sharing_send_button"),Ee>1?`(${Ee})`:""]})]})]})})})}))},40070:(e,t,i)=>{i.d(t,{S:()=>h});var n=i(24643),o=i(40099),r=i(54502),a=i(62186),l=i(72153);const s=(0,a.default)("label",{target:"e8efyri0"})((({theme:e})=>({display:"flex",fontFamily:e.fontFamilies.TikTokFont,fontWeight:e.fontWeights.normal,fontSize:"14px",color:e.colors.TextPrimary,cursor:"pointer"})),"label:LabelCheckbox;"),d=(0,a.default)("div",{target:"e8efyri1"})({color:"#fff",position:"relative"},"label:DivCheckboxSymbol;"),c=(0,a.default)("input",{target:"e8efyri2"})((({selected:e,theme:t,theme:{direction:i}})=>[Object.assign({appearance:"none",border:`1.5px solid ${t.colors.LineSecondary}`,margin:"0 0 -2.5px 0",cursor:"pointer","&:focus":{outline:"none"},"&:focus-visible":{outline:`2px solid ${t.colors.Negative}`}},e?{border:"none",backgroundColor:t.colors.Primary}:{}),(0,l.mp)({direction:i,marginEnd:4})]),"label:InputCheckbox;"),u=(0,a.default)("div",{target:"e8efyri3"})((({theme:{direction:e}})=>[{pointerEvents:"none",position:"absolute",top:"3px"},(0,l.mp)({direction:e,start:3})]),"label:DivCheckboxIcon;"),h=(0,o.memo)((function({id:e,value:t,label:i,size:a=16,isCircle:l=!0,disabled:h,style:g,e2eTag:p,onChange:f}){const m=a,v=a-6,x=(0,o.useCallback)((e=>{null==f||f(e.target.checked)}),[f]);return(0,n.jsxs)(s,Object.assign({htmlFor:e,style:g,"data-e2e":p},{children:[(0,n.jsxs)(d,Object.assign({className:"checkbox-symbol"+(t?" selected":"")},{children:[(0,n.jsx)(c,{style:{width:m,height:m,borderRadius:l?m/2:0},selected:t,id:e,checked:t,type:"checkbox",disabled:h,onChange:x}),t&&(0,n.jsx)(u,Object.assign({style:{width:v,height:v}},{children:(0,n.jsx)(r.A,{width:v,height:v})}))]})),i]}))}))}}]);