montana/Russian/Site/messenger/dist/4765.e3067f5e960f91f40a97.js

2 lines
99 KiB
JavaScript
Raw Normal View History

2026-05-18 18:05:32 +03:00
"use strict";(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[4765],{43434(e,t,n){n.d(t,{A:()=>c});var r=n(84051),o=n(87357),i=n(39351),a=n(18276),l=n(90751),s=n(20021);const c=(0,r.ph)(({title:e,disabled:t,isForForum:n,currentAvatarBlobUrl:c,onChange:d})=>{const[h,u]=(0,r.J0)(),[p,m]=(0,r.J0)(c),f=(0,i.A)();(0,r.vJ)(()=>{m(c)},[c]);const g=(0,r.hb)(e=>{u(void 0),d(e),p&&p!==c&&URL.revokeObjectURL(p),m(URL.createObjectURL(e))},[p,c,d]),v=(0,r.hb)(()=>{u(void 0)},[]),A=(0,o.A)(p&&"filled",t&&"disabled",n&&"rounded-square");return(0,s.FD)("div",{className:"AvatarEditable",children:[(0,s.FD)("label",{className:A,role:"button",tabIndex:0,title:e||f("ChangeYourProfilePicture"),children:[(0,s.Y)("input",{type:"file",onChange:function(e){const t=e.target;t?.files?.[0]&&(u(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),(0,s.Y)(a.A,{name:"camera-add"}),p&&(0,s.Y)("img",{src:p,draggable:!1,alt:""})]}),(0,s.Y)(l.A,{file:h,onClose:v,onChange:g})]})})},24713(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(87357),i=n(68292),a=n(26607);var l=n(20021);const s=(0,r.ph)(({text:e,className:t,isAlternateColor:n})=>(0,l.Y)(a.A,{className:(0,o.A)("Y3ZoW17O",n?"Lq67O2D2":"DWjOG2Ze",t),isOpen:Boolean(e),children:e&&(0,l.Y)(i.A,{text:e})}))},19806(e,t,n){n.d(t,{A:()=>v});var r=n(84051),o=n(87357),i=n(76023),a=n(4961),l=n(14),s=n(39351),c=n(17712),d=n(21849),h=n(18276),u=n(64493),p=n(97422),m=n(20021);const f=1.25*i.$,g=({id:e,name:t,value:n,label:i,peer:v,labelText:A,subLabel:C,checked:w,tabIndex:x,disabled:b,withIcon:Y,blocking:y,permissionGroup:N,isLoading:k,className:S,rightIcon:D,onlyInput:M,isRound:B,nestedCheckbox:F,nestedCheckboxCount:_,nestedOptionList:L,leftElement:R,values:I,onChange:E,onCheck:T,onClickLabel:H})=>{const O=(0,s.A)(),$=(0,r.li)(),[P,J]=(0,r.J0)(!1),K=(0,l.A)(v,!0),z=(0,c.A)(e=>{b||(E&&E(e,L),T&&T(e.currentTarget.checked))}),q=(0,c.A)(()=>{J(!P)}),G=(0,o.A)("Checkbox",b&&"disabled",Y&&"withIcon",k&&"loading",y&&"blocking",F&&"nested",C&&"withSubLabel",N&&"permission-group",Boolean(R)&&"avatar",M&&"onlyInput",B&&"round",Boolean(D)&&"withNestedList",S);return(0,m.FD)(m.FK,{children:[(0,m.FD)("label",{className:G,dir:O.isRtl?"rtl":void 0,onClick:H?function(e){e.target!==$.current&&H?.(e,n)}:void 0,ref:$,children:[(0,m.Y)("input",{type:"checkbox",id:e,name:t,value:n,checked:w,disabled:b,tabIndex:x,onChange:z,onClick:H?function(e){e.stopPropagation()}:void 0}),(0,m.FD)("div",{className:(0,o.A)("Checkbox-main",Boolean(R)&&"Nested-avatar-list"),children:[(0,m.Y)("div",{className:(0,o.A)("user-avatar",K&&"user-avatar-visible"),children:K&&(0,m.Y)(d.A,{peer:K,size:f})}),(0,m.FD)("span",{className:"label",dir:"auto",children:[R,"string"==typeof i?(0,a.A)(i):i,Boolean(A)&&(0,m.Y)("span",{className:"ml-1",children:(0,a.A)(A)})]}),C&&(0,m.Y)("span",{className:"subLabel",dir:"auto",children:(0,a.A)(C)}),D&&(0,m.Y)(h.A,{name:D,className:"right-icon"})]}),F&&(0,m.Y)("span",{className:"nestedButton",dir:"auto",children:(0,m.FD)(u.A,{className:"button",color:"translucent",size:"smaller",onClick:q,children:[(0,m.Y)(h.A,{name:"group-filled",className:"group-icon"}),_,(0,m.Y)(h.A,{name:P?"up":"down"})]})}),k&&(0,m.Y)(p.A,{})]}),F&&(0,m.Y)("div",{className:(0,o.A)("nested-checkbox-group",P&&"nested-checkbox-group-open"),children:L?.map(e=>(0,m.Y)(g,{leftElement:R,onChange:z,checked:-1!==I?.indexOf(e.value),values:I,...e},e.value))})]})},v=(0,r.ph)(g)},77561(e,t,n){n.d(t,{A:()=>c});var r=n(84051),o=n(87357),i=n(87894),a=n(17712),l=n(19806),s=n(20021);const c=(0,r.ph)(({id:e,options:t,selected:n,disabled:r,nestedCheckbox:c,loadingOptions:d,isRound:h,onChange:u,onClickLabel:p,className:m})=>{const f=(0,a.A)((e,t)=>{const{value:r,checked:o}=e.currentTarget;let a;o?(a=(0,i.Am)([...n,r]),t?.forEach(e=>{a.includes(e.value)||a.push(e.value)})):(a=n.filter(e=>e!==r),t&&(a=a.filter(e=>!t.some(t=>t.value===e)))),u(a)}),g=(0,a.A)(e=>{const t=e?.filter(e=>n.includes(e.value)).length;return t>0?t:e.length});return(0,s.Y)("div",{id:e,className:(0,o.A)("radio-group",m),children:t.map(e=>(0,s.Y)(l.A,{label:e.label,subLa
//# sourceMappingURL=4765.e3067f5e960f91f40a97.js.map