master-components-react 2.2.12 → 2.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ Check the top-level render call using <`+He+">.")}return De}}function rd(Z,De){{
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,yf,ka,Zk,ka),Ra[ka+yf]=!0}}return Z===n?Cf(si):mf(si),si}}function jk(Z,De,He){return _r(Z,De,He,!0)}function qk(Z,De,He){return _r(Z,De,He,!1)}var Yk=qk,Xk=jk;Ks.Fragment=n,Ks.jsx=Yk,Ks.jsxs=Xk}()),Ks}process.env.NODE_ENV==="production"?s_.exports=Jk():s_.exports=eB();var R=s_.exports;const tB=({loadingColor:e})=>R.jsxs("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30",style:{enableBackground:"new 0 0 50 50"},"xml:space":"preserve",children:[R.jsxs("rect",{x:"0",y:"10",width:"4",height:"10",fill:e??"#ffffff",opacity:"0.2",children:[R.jsx("animate",{attributeName:"opacity",attributeType:"XML",values:"0.2; 1; .2",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"height",attributeType:"XML",values:"10; 20; 10",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"y",attributeType:"XML",values:"10; 5; 10",begin:"0s",dur:"0.6s",repeatCount:"indefinite"})]}),R.jsxs("rect",{x:"8",y:"10",width:"4",height:"10",fill:e??"#ffffff",opacity:"0.2",children:[R.jsx("animate",{attributeName:"opacity",attributeType:"XML",values:"0.2; 1; .2",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"height",attributeType:"XML",values:"10; 20; 10",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"y",attributeType:"XML",values:"10; 5; 10",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"})]}),R.jsxs("rect",{x:"16",y:"10",width:"4",height:"10",fill:e??"#ffffff",opacity:"0.2",children:[R.jsx("animate",{attributeName:"opacity",attributeType:"XML",values:"0.2; 1; .2",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"height",attributeType:"XML",values:"10; 20; 10",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"y",attributeType:"XML",values:"10; 5; 10",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"})]})]}),iB="MainButton-module__mainButton",nB="MainButton-module__sm",rB="MainButton-module__onlyIcon",aB="MainButton-module__buttonSlot",oB="MainButton-module__buttonLabel",sB="MainButton-module__md",lB="MainButton-module__lg",uB="MainButton-module__xl",dB="MainButton-module__xl2",cB="MainButton-module__disabled",hB="MainButton-module__dark",Ba={mainButton:iB,sm:nB,onlyIcon:rB,buttonSlot:aB,buttonLabel:oB,md:sB,lg:lB,xl:uB,xl2:dB,disabled:cB,dark:hB},iu=({label:e,buttonType:t="button",onClick:i,size:n="md",disabled:r,loading:a,withIcons:o,iconOne:s,iconTwo:l,onlyIcon:u,buttonStyle:d,labelStyle:c,buttonSlotStyle:h,theme:f="light"})=>R.jsx("button",{type:t,style:d&&typeof d=="object"?d:{},className:`${f==="dark"?Ba.dark:""} ${Ba.mainButton} ${u?Ba.onlyIcon:""} ${n?Ba[n]:""} ${r?Ba.disabled:""}`,onClick:()=>{i&&typeof i=="function"&&i()},children:R.jsxs("div",{className:Ba.buttonSlot,style:h??{},children:[u||o&&s?s:"",!u&&R.jsx(R.Fragment,{children:a?R.jsx("div",{style:{display:"grid",placeItems:"center"},children:R.jsx(tB,{})}):R.jsx("span",{style:c??{},className:Ba.buttonLabel,children:e??"Button"})}),o&&l?l:""]})}),fB="FormInput-module__inputWrapper",pB="FormInput-module__inputLabel",vB="FormInput-module__required",_B="FormInput-module__inputContainer",gB="FormInput-module__inputContent",mB="FormInput-module__inputTags",CB="FormInput-module__focused",yB="FormInput-module__error",xB="FormInput-module__rightIcon",bB="FormInput-module__leftIcon",SB="FormInput-module__inputDropDown",EB="FormInput-module__http",wB="FormInput-module__disabled",IB="FormInput-module__sm",TB="FormInput-module__md",AB="FormInput-module__withCopy",DB="FormInput-module__inputHelperText",OB="FormInput-module__dark",li={inputWrapper:fB,inputLabel:pB,required:vB,inputContainer:_B,inputContent:gB,inputTags:mB,focused:CB,error:yB,rightIcon:xB,leftIcon:bB,inputDropDown:SB,http:EB,disabled:wB,sm:IB,md:TB,withCopy:AB,inputHelperText:DB,dark:OB},wh=({width:e,height:t,color:i})=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:R.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),RB=({width:e,height:t,color:i})=>R.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[R.jsx("g",{clipPath:"url(#clip0_444_26)",children:R.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:i??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),R.jsx("defs",{children:R.jsx("clipPath",{id:"clip0_444_26",children:R.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),yu=e=>R.jsx("svg",{xmlns:e.xmlns??"http://www.w3.org/2000/svg",width:e.width??"14",height:e.height??"14",viewBox:e.viewBox??"0 0 14 14",fill:e.fill??"none",children:R.jsx("path",{d:e.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:e.stroke??"#A4A7AE",strokeWidth:e.strokeWidth??"1.66667",strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round"})}),kB="Checkbox-module__checkboxWrapper",BB="Checkbox-module__sm",LB="Checkbox-module__md",PB="Checkbox-module__checkMark",FB="Checkbox-module__checked",MB="Checkbox-module__disabled",VB="Checkbox-module__dark",No={checkboxWrapper:kB,sm:BB,md:LB,checkMark:PB,checked:FB,disabled:MB,dark:VB},mI=({color:e,width:t,height:i})=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:R.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),CI=e=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:R.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Ih=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,theme:l="light"})=>{const u=ve.useRef(null),[d,c]=ve.useState(!1),h=()=>{t&&typeof t=="function"&&t(!e)},f=()=>d?o??{}:s??{};return R.jsxs("div",{style:f(),className:` ${l==="dark"?No.dark:""} ${No.checkboxWrapper} ${No[a]} ${e?No.checked:No.unChecked} ${i?No.disabled:""}`,onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onMouseLeave:()=>c(!1),onClick:h,children:[R.jsx("input",{ref:u,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?R.jsx(CI,{}):R.jsx(mI,{}):""]})},NB="Tag-module__tagContainer",HB="Tag-module__onlyLabel",$B="Tag-module__sm",WB="Tag-module__md",zB="Tag-module__lg",GB="Tag-module__tagLabel",UB="Tag-module__tagNumber",KB="Tag-module__tagClose",jB="Tag-module__dark",La={tagContainer:NB,onlyLabel:HB,sm:$B,md:WB,lg:zB,tagLabel:GB,tagNumber:UB,tagClose:KB,dark:jB},Lg=({id:e,label:t,icon:i,withClose:n,withCheckbox:r,withNumber:a,number:o,checkboxProps:s,disable:l,size:u,onClose:d,tagContainerStyle:c,tagLabelStyle:h,tagNumberStyle:f,tagCloseStlye:p,theme:g})=>{const m=()=>!r&&!i&&!n&&!a,C=()=>i,x=()=>{d&&typeof d=="function"&&d(e??null)};return R.jsxs("div",{style:c??{},className:`${g==="dark"?La.dark:""} ${La.tagContainer} ${m()?La.onlyLabel:""} ${La[u??"md"]}`,children:[r&&R.jsx(Ih,{...s}),i&&C(),t&&R.jsx("p",{style:h??{},className:La.tagLabel,children:t??""}),a&&R.jsx("div",{style:f??{},className:La.tagNumber,children:o??""}),n&&R.jsx("div",{style:p??{},className:La.tagClose,onClick:x,children:R.jsx(yu,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},fc=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFouce:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:g,onRightIconIconMouseEnter:m,onRightIconIconMouseLeave:C,onLeftIconIconClick:x,onLeftIconIconMouseEnter:T,onLeftIconIconMouseLeave:k,onPressEnter:A,rightIcon:z,leftIcon:H,withDropDown:N,dropdownData:K,dropDownPosition:U="left",onSelectData:X,withTags:M,tagProps:Y,withLink:b,withCopy:j,onCopy:ie,inputWrapperStyle:J,inputLabelStyle:pe,requiredStyle:le,inputContainerStyle:Q,leftIconStyle:W,inputDropDownStyle:y,ulStyle:I,liStyle:S,httpStyle:B,inputStyle:V,rightIconStyle:G,withCopyStyle:$,inputHelperTextStyle:ne,theme:ae="light"})=>{const[Ce,se]=ve.useState(!1),Te=ve.useRef(null),[w,ce]=ve.useState(!1);ve.useState(!1);const oe=ve.useRef(null),P=ve.useRef(null),[L,q]=ve.useState(!1),[he,ye]=ve.useState(1),re=Ye=>{let st=Ye.target.value;st.length===1&&(st=st.trim()),s&&typeof s=="function"&&s(f?st.replace(/\d/g,""):st)},Ie=()=>{ce(!0),l&&typeof l=="function"&&l()},Pe=()=>{ce(!1),u&&typeof u=="function"&&u()},Ae=Ye=>{const st=Ye.target.value,Oi=st.length===0;a==="number"&&(Ye.keyCode===69||!Oi&&(Ye.keyCode===187||Ye.keyCode===107||Ye.keyCode===189||Ye.keyCode===109))&&Ye.preventDefault(),Ye.key==="Enter"&&st&&st.length>0&&A&&typeof A=="function"&&A(st)},ze=()=>{ie&&typeof ie=="function"&&ie(e)},qe=Ye=>Ye,rt=()=>{let Ye={};return j&&(Ye.borderTopRightRadius=0,Ye.borderBottomRightRadius=0,Ye.borderRight=0),N&&(U==="right"?Ye.flexDirection="row-reverse":N&&(Ye.paddingLeft=0)),{...Ye,...Q??{}}},zt=Ye=>{!Ye.composedPath().includes(P.current)&&Ye.composedPath().includes(oe.current)||q(!1)},bi=Ye=>{ye(Ye.id),q(!1),X&&typeof X=="function"&&X(Ye)};ve.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),ve.useEffect(()=>(document.addEventListener("click",zt),()=>{document.removeEventListener("click",zt)}),[]);const Gt=ve.useRef(!1);return ve.useEffect(()=>{Gt.current?setTimeout(()=>{se(Ye=>!Ye)},0):Gt.current=!0},[]),R.jsxs("div",{className:`${ae==="dark"?li.dark:""} ${li.inputWrapper}`,style:J??{},children:[t&&R.jsxs("label",{className:li.inputLabel,style:pe??{},children:[t," ",R.jsx("span",{className:li.required,style:le??{},children:n&&"*"})]}),R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsxs("div",{style:rt(),className:`${li.inputContainer} ${w&&!c?li.focused:""} ${r?li.disabled:""} ${d!=null&&d.error?li.error:""} ${li[o??"sm"]}`,children:[!N&&!b&&H&&R.jsx("div",{className:li.leftIcon,style:W??{},onClick:()=>{x&&typeof x=="function"&&x()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:qe(H)}),!b&&N&&R.jsxs("div",{className:li.inputDropDown,style:y??{},onClick:()=>q(!0),ref:oe,children:[K.find(Ye=>Ye.id===he).label,L&&R.jsx("ul",{ref:P,style:I??{},children:K&&K.length&&K.map((Ye,st)=>R.jsx("li",{style:S??{},onClick:()=>bi(Ye),children:(Ye==null?void 0:Ye.label)??"-"},Ye.id))}),R.jsx(wh,{})]}),b&&R.jsx("div",{className:`${li.inputDropDown} ${li.http}`,style:B??{},onClick:()=>q(!0),ref:oe,children:"http://"}),R.jsxs("div",{className:li.inputContent,children:[M&&p&&p.length>0&&R.jsx("div",{className:li.inputTags,children:p.map((Ye,st)=>R.jsx("div",{className:li.inputSingleTags,children:R.jsx(Lg,{...Y,id:Ye,label:Ye,withClose:!0})},st))}),R.jsx("input",{ref:Te,style:V??{},type:a??"text",value:e,onChange:Ye=>re(Ye),onFocus:Ie,onBlur:Pe,disabled:r,required:n,onKeyDown:Ae,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),z&&R.jsx("div",{className:li.rightIcon,style:G??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{C&&typeof C=="function"&&C()},children:qe(z)})]}),j&&R.jsxs("div",{style:$??{},onClick:ze,className:li.withCopy,children:[R.jsx(RB,{}),R.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&R.jsx("div",{style:ne??{},className:`${li.inputHelperText} ${d!=null&&d.error?li.error:""}`,children:R.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},qB="Textarea-module__textareaContainer",YB="Textarea-module__textAreaLabel",XB="Textarea-module__required",ZB="Textarea-module__wrap",QB="Textarea-module__textarea",JB="Textarea-module__focused",eL="Textarea-module__disabled",tL="Textarea-module__error",iL="Textarea-module__helperTextStyle",nL="Textarea-module__dark",tn={textareaContainer:qB,textAreaLabel:YB,required:XB,wrap:ZB,textarea:QB,focused:JB,disabled:eL,error:tL,helperTextStyle:iL,dark:nL},rL=({placeholder:e,label:t,msg:i,cols:n,rows:r,value:a,maxLength:o,onChange:s,onFocus:l,onBlur:u,disabled:d,required:c,textareaContainerStyle:h,textareaLabelStyle:f,requiredStyle:p,textareaStyle:g,textareaHelperTextStyle:m,theme:C,labelIcon:x})=>{const[T,k]=ve.useState(!1),A=K=>{let U=K.target.value;s&&typeof s=="function"&&s(U)},z=K=>K,H=()=>{k(!0),l&&typeof l=="function"&&l()},N=()=>{k(!1),u&&typeof u=="function"&&u()};return R.jsxs("div",{style:h??{},className:`${C==="dark"?tn.dark:""} ${tn.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?tn[i==null?void 0:i.type]:""} ${d?tn.disabled:null}`,children:[t&&R.jsxs("div",{style:f,className:tn.textAreaLabel,children:[R.jsx("p",{children:t}),R.jsx("span",{style:p??{},className:tn.required,children:c&&"*"}),x&&z(x)]}),R.jsx("div",{className:tn.wrap,children:R.jsx("textarea",{style:g??{},className:`${tn.textarea} ${T?tn.focused:""} ${d?tn.disabled:""} ${i!=null&&i.error?tn.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:o??null,onFocus:H,disabled:d,onBlur:N,onChange:A})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&R.jsx("div",{style:m??{},className:`${tn.helperTextStyle} ${i!=null&&i.error?tn.error:""}`,children:R.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},aL="Toggle-module__toggleWrapper",oL="Toggle-module__toggleState",sL="Toggle-module__checked",lL="Toggle-module__disabled",uL="Toggle-module__dark",js={toggleWrapper:aL,toggleState:oL,checked:sL,disabled:lL,dark:uL},dL=({checked:e,change:t,disabled:i,required:n,activeStyle:r,bgStyle:a,checkedBgStyle:o,disabledBgStyle:s,circleStyle:l,checkedCircleStyle:u,disabledCircleStyle:d,theme:c="light"})=>{const[h,f]=ve.useState(!1),p=()=>{t&&typeof t=="function"&&t(!e)},g=()=>{if(h)return r??{};if(e){if(o)return o}else if(e){if(i&&s)return s}else if(a)return a;return{}},m=()=>{if(e){if(u)return u}else if(e){if(i&&d)return d}else if(l)return l;return{}};return R.jsx("div",{style:g(),onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onMouseLeave:()=>f(!1),onClick:p,className:`${c==="dark"?js.dark:""} ${js.toggleWrapper} ${e?js.checked:""} ${i?js.disabled:""}`,children:R.jsx("div",{style:m(),className:js.toggleState,children:R.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},cL="Radio-module__radioWrapper",hL="Radio-module__sm",fL="Radio-module__md",pL="Radio-module__checked",vL="Radio-module__innerCircle",_L="Radio-module__radioState",gL="Radio-module__disabled",mL="Radio-module__dark",qr={radioWrapper:cL,sm:hL,md:fL,checked:pL,innerCircle:vL,radioState:_L,disabled:gL,dark:mL},yI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!0,size:a,theme:o="light"})=>{ve.useState(!1);const s=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return R.jsxs("div",{className:`${o==="dark"?qr.dark:""} ${qr.radioWrapper} ${qr[a]??qr.md} ${e?qr.checked:""} ${i?qr.disabled:""}`,onClick:s,children:[R.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),R.jsx("div",{className:qr.radioState,children:R.jsx("div",{className:qr.innerCircle})})]})},CL="Dropdown-module__dropdownWrapper",yL="Dropdown-module__placeHolder",xL="Dropdown-module__dropdownLabel",bL="Dropdown-module__required",SL="Dropdown-module__dropdownContainer",EL="Dropdown-module__sm",wL="Dropdown-module__md",IL="Dropdown-module__selectedTags",TL="Dropdown-module__selectedList",AL="Dropdown-module__additional",DL="Dropdown-module__dropdownListContainer",OL="Dropdown-module__dropdownList",RL="Dropdown-module__checkIcon",kL="Dropdown-module__disabled",BL="Dropdown-module__selected",LL="Dropdown-module__dropdownListFooter",PL="Dropdown-module__focused",FL="Dropdown-module__error",ML="Dropdown-module__dropdownHelperText",VL="Dropdown-module__dark",ai={dropdownWrapper:CL,placeHolder:yL,dropdownLabel:xL,required:bL,dropdownContainer:SL,sm:EL,md:wL,selectedTags:IL,selectedList:TL,additional:AL,dropdownListContainer:DL,dropdownList:OL,checkIcon:RL,disabled:kL,selected:BL,dropdownListFooter:LL,focused:PL,error:FL,dropdownHelperText:ML,dark:VL},NL=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:R.jsx("path",{stroke:"#10B77F",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 18.333c4.584 0 8.334-3.75 8.334-8.334 0-4.583-3.75-8.333-8.334-8.333-4.583 0-8.333 3.75-8.333 8.333 0 4.584 3.75 8.334 8.333 8.334zM6.667 10h6.667M10 13.333V6.666"})}),HL=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:R.jsx("path",{d:"M16.5 16.5L13.5834 13.5833M15.6667 8.58333C15.6667 12.4954 12.4954 15.6667 8.58333 15.6667C4.67132 15.6667 1.5 12.4954 1.5 8.58333C1.5 4.67132 4.67132 1.5 8.58333 1.5C12.4954 1.5 15.6667 4.67132 15.6667 8.58333Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),l_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,onFocus:c,onBlur:h,withClearAll:f=!0,withSelectAll:p=!0,withPlus:g=!1,searchComponent:m=!1,withFooter:C=!0,data:x,onSelect:T,selectedOptionID:k,withFilter:A=!0,withClose:z=!0,fixedDropdown:H=!1,onSearch:N,pagination:K,withMultiSelect:U=!1,skipSelected:X,labelIcon:M,closeIcon:Y,dropdownIcon:b,iconDown:j,onLabelIconClick:ie,onLabelIconMouseEnter:J,onLabelIconMouseLeave:pe,dropdownWrapperStyle:le,dropdownLabelStyle:Q,requiredStyle:W,labelIconStyle:y,dropdownContainerStyle:I,placeHolderStyle:S,selectedTagsStyle:B,selectedListStyle:V,additionalStyle:G,dropdownListStyle:$,listStyle:ne,theme:ae="light"})=>{const[Ce,se]=ve.useState(!1),[Te,w]=ve.useState(!1),[ce,oe]=ve.useState(""),[P,L]=ve.useState("");ve.useState(null);const q=ve.useRef([]),he=ve.useRef(null),ye=ve.useRef(null),re=ve.useRef({}),Ie=(Se,we)=>{const Ze=new Set;return Se.filter(_e=>Ze.has(_e[we])?!1:(Ze.add(_e[we]),!0))},Pe=Se=>{var we;re.current=Se,oe((we=re.current)==null?void 0:we.label),T&&typeof T=="function"&&T(re.current)},Ae=Se=>{q.current=[...q.current,...x.filter(we=>we.selected==!0),...x.filter(we=>we.id===Se.id)],Se.selected=!Se.selected,q.current=Ie(q.current,"id").filter(we=>we.selected),T&&typeof T=="function"&&T(q.current),m||oe(q.current.map(we=>we.label).join(", ")),se(we=>!we)},ze=Se=>{Se.stopPropagation(),q.current=[],k=null,x&&x.length>0&&x.forEach(we=>we.selected=!1),qe(""),U?T([]):(re.current={},T({})),oe("")},qe=Se=>{N&&typeof N=="function"&&N(Se),L(Se),oe(Se)},rt=()=>{if(k||k===0){let Se=x.filter(we=>Number(we.id)===Number(k));Se&&Se[0]&&(re.current=Se[0],X?(N&&typeof N=="function"&&N(re.current.label),oe(re.current.label),closeOnSelect&&setCollapsed(we=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):Pe(Se[0]))}},[zt,bi]=ve.useState(!1),Gt=Se=>{let we=he.current.querySelector("ul"),_e=Math.abs(we.scrollTop+we.clientHeight-we.scrollHeight)<=2;K&&_e&&!zt&&(d&&typeof d=="function"&&d(!0),bi(!0)),_e||bi(!1)},Ye=()=>{x.forEach(Se=>{Se.selected=!1}),q.current=[],T([]),oe(""),l&&typeof l=="function"&&l(),se(Se=>!Se)},st=()=>{x.forEach(Se=>{Se!=null&&Se.id&&(Se==null?void 0:Se.id)!==null&&(Se!=null&&Se.label)&&(Se==null?void 0:Se.label)!==""&&(Se==null?void 0:Se.label)!=="-"&&!Se.disabled&&(Se.selected=!0)}),q.current=x,q.current=Ie(q.current,"id").filter(Se=>Se.selected),oe(q.current.map(Se=>Se.label).join(", ")),u&&typeof u=="function"&&u(),T(q.current),se(Se=>!Se)},Oi=ve.useRef(!0);ve.useEffect(()=>{if(Oi.current){Oi.current=!1;return}Te||h&&typeof h=="function"&&h()},[Te]);const fn=()=>{c&&typeof c=="function"&&c()},ni=Se=>Se,pn=Se=>{Se.composedPath().includes(he.current)||w(!1)},Ln=Se=>{if(H){if(Se.composedPath().includes(he.current))return;w(!1)}},Ji=()=>{const Se=he.current,we=ye.current;if(!we||!Se)return;const Ze=Se.getBoundingClientRect(),_e=window.innerHeight;H?(we.style.position="fixed",we.style.width=Ze.width+"px",we.style.left=`${Ze.left+window.pageXOffset}px`,Ze.bottom+we.offsetHeight>_e?(we.style.top=`${window.scrollY+Ze.top-we.offsetHeight-8}px`,we.style.bottom="unset"):(we.style.top=`${window.scrollY+Ze.bottom}px`,we.style.bottom="unset")):Ze.bottom>_e?(we.style.top="unset",we.style.bottom="calc(100% + 8px)"):(we.style.bottom="unset",we.style.top="calc(100% + 8px)")},en=ve.useRef(null);return ve.useEffect(()=>{Te&&en.current&&en.current.focus()},[Te]),ve.useEffect(()=>{U&&(q.current=x.filter(Se=>Se.selected),oe(x.filter(Se=>Se.selected).map(Se=>Se.label).join(", ")))},[]),ve.useEffect(()=>{m&&s&&s.length>0&&L(s)},[]),ve.useEffect(()=>{Ji()},[ye,Te]),ve.useEffect(()=>{U||rt()},[k]),ve.useEffect(()=>(document.addEventListener("click",pn),document.addEventListener("wheel",Ln),()=>{document.removeEventListener("click",pn),document.removeEventListener("wheel",Ln)}),[]),R.jsxs("div",{className:`${ae==="dark"?ai.dark:""} ${ai.dropdownWrapper}`,style:le??{},children:[e&&R.jsxs("label",{className:ai.dropdownLabel,style:Q??{},children:[e," ",R.jsx("span",{className:ai.required,style:W??{},children:i&&"*"}),R.jsxs("span",{style:{...y??{},display:"grid",placeItems:"center"},onClick:()=>{ie&&typeof ie=="function"&&ie()},onMouseEnter:()=>{J&&typeof J=="function"&&J()},onMouseLeave:()=>{pe&&typeof pe=="function"&&pe()},children:[" ",ni(M)]})]}),R.jsxs("div",{onFocus:fn,ref:he,onClick:()=>(w(Se=>!Se),Ji()),className:`${ai.dropdownContainer} ${Te&&!o?ai.focused:""} ${t?ai.disabled:""} ${a!=null&&a.error?ai.error:""} ${ai[n]}`,style:I??{},children:[m?R.jsxs("div",{children:[" ",R.jsx(HL,{})]}):R.jsx(R.Fragment,{children:b&&R.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:ni(b)})}),!m&&U&&r&&!Te&&q.current.length===0&&R.jsx("span",{className:ai.placeHolder,style:S??{},children:r??""}),U&&R.jsx("div",{className:ai.selectedTags,style:B??{},children:!m&&!Te?R.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:[q.current.slice(0,3).map((Se,we)=>{let Ze=q.current[q.current.length-1];return R.jsxs("span",{className:ai.selectedList,style:V??{},children:[!g&&Se.label,!g&&Se.id!==Ze.id&&we!==2?", ":""]},Se==null?void 0:Se.id)}),!g&&q.current.length>3&&R.jsxs("span",{className:ai.additional,style:G??{},children:[" ","+(",q.current.length-3,")"]})]}):R.jsx("input",{ref:en,onClick:Se=>(Se.stopPropagation(),w(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...m?{value:P}:{},onChange:Se=>qe(Se.target.value)},k)}),R.jsx("input",{autoCorrect:"off",hidden:U,placeholder:r,readOnly:!A||!Te||U,type:"text",value:U&&!m&&Te?"":ce,onChange:Se=>qe(Se.target.value)},k),x&&x.length>0&&Te&&R.jsxs("div",{ref:ye,onClick:Se=>Se.stopPropagation(),className:ai.dropdownListContainer,children:[R.jsx("ul",{onScroll:Se=>Gt(),onClick:Se=>Se.stopPropagation(),className:ai.dropdownList,style:$??{},children:x.map(Se=>{var we,Ze,_e,Fe;return R.jsxs("li",{style:ne??{},className:`${!(Se!=null&&Se.label)||Se.label===void 0||Se!=null&&Se.disabled?ai.disabled:""} ${(U?Se.selected:(we=re.current)!=null&&we.id&&((Ze=re.current)==null?void 0:Ze.id)===Se.id)?ai.selected:""}`,onClick:()=>{U?Ae(Se):Pe(Se)},children:[R.jsxs("p",{children:[" ",Se!=null&&Se.customLabel?Se.customLabel():(Se==null?void 0:Se.label)??"-"]}),g?R.jsx(R.Fragment,{children:Se.selected?R.jsx(CI,{}):R.jsx(NL,{})}):(U?Se.selected:((_e=re.current)==null?void 0:_e.id)&&((Fe=re.current)==null?void 0:Fe.id)===Se.id)&&R.jsx("span",{className:ai.checkIcon,children:R.jsx(mI,{color:"#7F56D9",width:20,height:20})})]},Se==null?void 0:Se.id)})}),U&&C&&R.jsxs("div",{className:ai.dropdownListFooter,children:[f&&R.jsx("span",{onClick:Ye,children:"Clear All"}),p&&R.jsx("span",{onClick:st,children:"Select All"})]})]}),!U&&z&&(q.current.length>0||ce.length)>0&&R.jsx("div",{onClick:Se=>ze(Se),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:Y?ni(Y):R.jsx(yu,{width:16,height:16})}),j?ni(j):R.jsx("div",{style:{display:"grid",placeItems:"center",transform:Te?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!m&&R.jsx(wh,{})})]}),a&&(a==null?void 0:a.visible)&&R.jsx("div",{className:`${ai.dropdownHelperText} ${a!=null&&a.error?ai.error:""}`,children:!Te&&R.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},$L="Tooltip-module__tooltipContainer",WL="Tooltip-module__tooltipContent",zL="Tooltip-module__top",GL="Tooltip-module__right",UL="Tooltip-module__bottom",KL="Tooltip-module__left",jL="Tooltip-module__tooltipTitle",qL="Tooltip-module__tooltipText",YL="Tooltip-module__dark",Pa={tooltipContainer:$L,tooltipContent:WL,top:zL,right:GL,bottom:UL,left:KL,tooltipTitle:jL,tooltipText:qL,dark:YL},XL=({children:e,tooltipSlot:t,delay:i,placement:n="top",trigger:r="hover",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",theme:c})=>{const h=ve.useRef(null),f=ve.useRef(null);let p;const[g,m]=ve.useState(!1),C=()=>{r==="hover"&&(p=setTimeout(()=>{m(!0)},i||400))},x=()=>{r==="hover"&&(clearTimeout(p),setTimeout(()=>{m(!1)},i||400))},T=()=>{r==="click"&&m(z=>!z)},k=()=>{const z=h.current,H=f.current;if(!H||!z)return;const N=z.getBoundingClientRect();switch(H.style.position="fixed",n){case"top":H.style.top=`${N.top-H.offsetHeight-8}px`;break;case"bottom":H.style.top=`${N.bottom+8}px`;break;case"left":H.style.top=`${N.top+N.height/2-H.offsetHeight/2}px`,H.style.left=`${N.left-H.offsetWidth-8}px`;break;case"right":H.style.top=`${N.top+N.height/2-H.offsetHeight/2}px`,H.style.left=`${N.right+8}px`;break}},A=z=>{z.composedPath().includes(h.current)||m(!1)};return ve.useEffect(()=>{k()},[h,g]),ve.useEffect(()=>(document.addEventListener("click",A),()=>{document.removeEventListener("click",A)}),[]),ve.useEffect(()=>{const z=f.current;z&&z.style.setProperty("--pointer-position",`${d}`)},[g]),R.jsxs("div",{ref:h,className:`${c==="dark"?Pa.dark:""} ${Pa.tooltipContainer}`,onClick:T,onMouseEnter:C,onMouseLeave:x,children:[e,g&&t?t():g&&R.jsxs("div",{style:s??{},onClick:z=>z.stopPropagation(),ref:f,className:`${Pa.tooltipContent} ${n?Pa[n]:Pa.bottom}`,children:[a&&a.length>0&&R.jsx("h2",{className:Pa.tooltipTitle,style:l??{},children:a}),o&&o.length>0&&R.jsx("p",{className:Pa.tooltipText,style:u??{},children:o})]})]})},ZL="Popup-module__modalOverlay",QL="Popup-module__popupDrawerMode",JL="Popup-module__popupContainer",eP="Popup-module__EnterFromLeft",tP="Popup-module__fadeIn",iP="Popup-module__withOptions",nP="Popup-module__horizontal",rP="Popup-module__popupHeader",aP="Popup-module__popupTitle",oP="Popup-module__popupDescription",sP="Popup-module__typeIcon",lP="Popup-module__icon",uP="Popup-module__templateWrapper",dP="Popup-module__dark",_n={modalOverlay:ZL,popupDrawerMode:QL,popupContainer:JL,enterFromLeft:eP,fadeIn:tP,withOptions:iP,horizontal:nP,popupHeader:rP,popupTitle:aP,popupDescription:oP,typeIcon:sP,icon:lP,templateWrapper:uP,dark:dP},cP=e=>{const t=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];let i=0,n=parseInt(e,10)||0;for(;n>=1024&&++i;)n=n/1024;return n.toFixed(n<10&&i>0?1:0)+" "+t[i]},hP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),fP=e=>new Promise((t,i)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result.split(",")[1]),n.onerror=r=>i(r)});location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const pP=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},vP=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:R.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),_P=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:R.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),xI=({width:e,color:t})=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:R.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:t??"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Pg=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,theme:h})=>{const f=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return R.jsx(xI,{});case"unsaved":return R.jsx(_P,{});case"success":return R.jsx(vP,{})}},p=()=>{a&&typeof a=="function"&&a(!1)},g=ve.useRef(null),m=C=>{C.target===g.current&&r&&typeof r=="function"&&r(!1)};return ve.useEffect(()=>(document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}),[]),e&&R.jsx("div",{ref:g,style:s??{},className:`
31
+ <%s key={someKey} {...props} />`,yf,ka,Zk,ka),Ra[ka+yf]=!0}}return Z===n?Cf(si):mf(si),si}}function jk(Z,De,He){return _r(Z,De,He,!0)}function qk(Z,De,He){return _r(Z,De,He,!1)}var Yk=qk,Xk=jk;Ks.Fragment=n,Ks.jsx=Yk,Ks.jsxs=Xk}()),Ks}process.env.NODE_ENV==="production"?s_.exports=Jk():s_.exports=eB();var R=s_.exports;const tB=({loadingColor:e})=>R.jsxs("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30",style:{enableBackground:"new 0 0 50 50"},xmlSpace:"preserve",children:[R.jsxs("rect",{x:"0",y:"10",width:"4",height:"10",fill:e??"#ffffff",opacity:"0.2",children:[R.jsx("animate",{attributeName:"opacity",attributeType:"XML",values:"0.2; 1; .2",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"height",attributeType:"XML",values:"10; 20; 10",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"y",attributeType:"XML",values:"10; 5; 10",begin:"0s",dur:"0.6s",repeatCount:"indefinite"})]}),R.jsxs("rect",{x:"8",y:"10",width:"4",height:"10",fill:e??"#ffffff",opacity:"0.2",children:[R.jsx("animate",{attributeName:"opacity",attributeType:"XML",values:"0.2; 1; .2",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"height",attributeType:"XML",values:"10; 20; 10",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"y",attributeType:"XML",values:"10; 5; 10",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"})]}),R.jsxs("rect",{x:"16",y:"10",width:"4",height:"10",fill:e??"#ffffff",opacity:"0.2",children:[R.jsx("animate",{attributeName:"opacity",attributeType:"XML",values:"0.2; 1; .2",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"height",attributeType:"XML",values:"10; 20; 10",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}),R.jsx("animate",{attributeName:"y",attributeType:"XML",values:"10; 5; 10",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"})]})]}),iB="MainButton-module__mainButton",nB="MainButton-module__sm",rB="MainButton-module__onlyIcon",aB="MainButton-module__buttonSlot",oB="MainButton-module__buttonLabel",sB="MainButton-module__md",lB="MainButton-module__lg",uB="MainButton-module__xl",dB="MainButton-module__xl2",cB="MainButton-module__disabled",hB="MainButton-module__dark",Ba={mainButton:iB,sm:nB,onlyIcon:rB,buttonSlot:aB,buttonLabel:oB,md:sB,lg:lB,xl:uB,xl2:dB,disabled:cB,dark:hB},iu=({label:e,buttonType:t="button",onClick:i,size:n="md",disabled:r,loading:a,withIcons:o,iconOne:s,iconTwo:l,onlyIcon:u,buttonStyle:d,labelStyle:c,buttonSlotStyle:h,theme:f="light"})=>R.jsx("button",{type:t,style:d&&typeof d=="object"?d:{},className:`${f==="dark"?Ba.dark:""} ${Ba.mainButton} ${u?Ba.onlyIcon:""} ${n?Ba[n]:""} ${r?Ba.disabled:""}`,onClick:()=>{i&&typeof i=="function"&&i()},children:R.jsxs("div",{className:Ba.buttonSlot,style:h??{},children:[u||o&&s?s:"",!u&&R.jsx(R.Fragment,{children:a?R.jsx("div",{style:{display:"grid",placeItems:"center"},children:R.jsx(tB,{})}):R.jsx("span",{style:c??{},className:Ba.buttonLabel,children:e??"Button"})}),o&&l?l:""]})}),fB="FormInput-module__inputWrapper",pB="FormInput-module__inputLabel",vB="FormInput-module__required",_B="FormInput-module__inputContainer",gB="FormInput-module__inputContent",mB="FormInput-module__inputTags",CB="FormInput-module__focused",yB="FormInput-module__error",xB="FormInput-module__rightIcon",bB="FormInput-module__leftIcon",SB="FormInput-module__inputDropDown",EB="FormInput-module__http",wB="FormInput-module__disabled",IB="FormInput-module__sm",TB="FormInput-module__md",AB="FormInput-module__withCopy",DB="FormInput-module__inputHelperText",OB="FormInput-module__dark",li={inputWrapper:fB,inputLabel:pB,required:vB,inputContainer:_B,inputContent:gB,inputTags:mB,focused:CB,error:yB,rightIcon:xB,leftIcon:bB,inputDropDown:SB,http:EB,disabled:wB,sm:IB,md:TB,withCopy:AB,inputHelperText:DB,dark:OB},wh=({width:e,height:t,color:i})=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:R.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),RB=({width:e,height:t,color:i})=>R.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[R.jsx("g",{clipPath:"url(#clip0_444_26)",children:R.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:i??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),R.jsx("defs",{children:R.jsx("clipPath",{id:"clip0_444_26",children:R.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),yu=e=>R.jsx("svg",{xmlns:e.xmlns??"http://www.w3.org/2000/svg",width:e.width??"14",height:e.height??"14",viewBox:e.viewBox??"0 0 14 14",fill:e.fill??"none",children:R.jsx("path",{d:e.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:e.stroke??"#A4A7AE",strokeWidth:e.strokeWidth??"1.66667",strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round"})}),kB="Checkbox-module__checkboxWrapper",BB="Checkbox-module__sm",LB="Checkbox-module__md",PB="Checkbox-module__checkMark",FB="Checkbox-module__checked",MB="Checkbox-module__disabled",VB="Checkbox-module__dark",No={checkboxWrapper:kB,sm:BB,md:LB,checkMark:PB,checked:FB,disabled:MB,dark:VB},mI=({color:e,width:t,height:i})=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:R.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),CI=e=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:R.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Ih=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,theme:l="light"})=>{const u=ve.useRef(null),[d,c]=ve.useState(!1),h=()=>{t&&typeof t=="function"&&t(!e)},f=()=>d?o??{}:s??{};return R.jsxs("div",{style:f(),className:` ${l==="dark"?No.dark:""} ${No.checkboxWrapper} ${No[a]} ${e?No.checked:No.unChecked} ${i?No.disabled:""}`,onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onMouseLeave:()=>c(!1),onClick:h,children:[R.jsx("input",{ref:u,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?R.jsx(CI,{}):R.jsx(mI,{}):""]})},NB="Tag-module__tagContainer",HB="Tag-module__onlyLabel",$B="Tag-module__sm",WB="Tag-module__md",zB="Tag-module__lg",GB="Tag-module__tagLabel",UB="Tag-module__tagNumber",KB="Tag-module__tagClose",jB="Tag-module__dark",La={tagContainer:NB,onlyLabel:HB,sm:$B,md:WB,lg:zB,tagLabel:GB,tagNumber:UB,tagClose:KB,dark:jB},Lg=({id:e,label:t,icon:i,withClose:n,withCheckbox:r,withNumber:a,number:o,checkboxProps:s,disable:l,size:u,onClose:d,tagContainerStyle:c,tagLabelStyle:h,tagNumberStyle:f,tagCloseStlye:p,theme:g})=>{const m=()=>!r&&!i&&!n&&!a,C=()=>i,x=()=>{d&&typeof d=="function"&&d(e??null)};return R.jsxs("div",{style:c??{},className:`${g==="dark"?La.dark:""} ${La.tagContainer} ${m()?La.onlyLabel:""} ${La[u??"md"]}`,children:[r&&R.jsx(Ih,{...s}),i&&C(),t&&R.jsx("p",{style:h??{},className:La.tagLabel,children:t??""}),a&&R.jsx("div",{style:f??{},className:La.tagNumber,children:o??""}),n&&R.jsx("div",{style:p??{},className:La.tagClose,onClick:x,children:R.jsx(yu,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},fc=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFouce:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:g,onRightIconIconMouseEnter:m,onRightIconIconMouseLeave:C,onLeftIconIconClick:x,onLeftIconIconMouseEnter:T,onLeftIconIconMouseLeave:k,onPressEnter:A,rightIcon:z,leftIcon:H,withDropDown:N,dropdownData:K,dropDownPosition:U="left",onSelectData:X,withTags:M,tagProps:Y,withLink:b,withCopy:j,onCopy:ie,inputWrapperStyle:J,inputLabelStyle:pe,requiredStyle:le,inputContainerStyle:Q,leftIconStyle:W,inputDropDownStyle:y,ulStyle:I,liStyle:S,httpStyle:B,inputStyle:V,rightIconStyle:G,withCopyStyle:$,inputHelperTextStyle:ne,theme:ae="light"})=>{const[Ce,se]=ve.useState(!1),Te=ve.useRef(null),[w,ce]=ve.useState(!1);ve.useState(!1);const oe=ve.useRef(null),P=ve.useRef(null),[L,q]=ve.useState(!1),[he,ye]=ve.useState(1),re=Ye=>{let st=Ye.target.value;st.length===1&&(st=st.trim()),s&&typeof s=="function"&&s(f?st.replace(/\d/g,""):st)},Ie=()=>{ce(!0),l&&typeof l=="function"&&l()},Pe=()=>{ce(!1),u&&typeof u=="function"&&u()},Ae=Ye=>{const st=Ye.target.value,Oi=st.length===0;a==="number"&&(Ye.keyCode===69||!Oi&&(Ye.keyCode===187||Ye.keyCode===107||Ye.keyCode===189||Ye.keyCode===109))&&Ye.preventDefault(),Ye.key==="Enter"&&st&&st.length>0&&A&&typeof A=="function"&&A(st)},ze=()=>{ie&&typeof ie=="function"&&ie(e)},qe=Ye=>Ye,rt=()=>{let Ye={};return j&&(Ye.borderTopRightRadius=0,Ye.borderBottomRightRadius=0,Ye.borderRight=0),N&&(U==="right"?Ye.flexDirection="row-reverse":N&&(Ye.paddingLeft=0)),{...Ye,...Q??{}}},zt=Ye=>{!Ye.composedPath().includes(P.current)&&Ye.composedPath().includes(oe.current)||q(!1)},bi=Ye=>{ye(Ye.id),q(!1),X&&typeof X=="function"&&X(Ye)};ve.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),ve.useEffect(()=>(document.addEventListener("click",zt),()=>{document.removeEventListener("click",zt)}),[]);const Gt=ve.useRef(!1);return ve.useEffect(()=>{Gt.current?setTimeout(()=>{se(Ye=>!Ye)},0):Gt.current=!0},[]),R.jsxs("div",{className:`${ae==="dark"?li.dark:""} ${li.inputWrapper}`,style:J??{},children:[t&&R.jsxs("label",{className:li.inputLabel,style:pe??{},children:[t," ",R.jsx("span",{className:li.required,style:le??{},children:n&&"*"})]}),R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsxs("div",{style:rt(),className:`${li.inputContainer} ${w&&!c?li.focused:""} ${r?li.disabled:""} ${d!=null&&d.error?li.error:""} ${li[o??"sm"]}`,children:[!N&&!b&&H&&R.jsx("div",{className:li.leftIcon,style:W??{},onClick:()=>{x&&typeof x=="function"&&x()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:qe(H)}),!b&&N&&R.jsxs("div",{className:li.inputDropDown,style:y??{},onClick:()=>q(!0),ref:oe,children:[K.find(Ye=>Ye.id===he).label,L&&R.jsx("ul",{ref:P,style:I??{},children:K&&K.length&&K.map((Ye,st)=>R.jsx("li",{style:S??{},onClick:()=>bi(Ye),children:(Ye==null?void 0:Ye.label)??"-"},Ye.id))}),R.jsx(wh,{})]}),b&&R.jsx("div",{className:`${li.inputDropDown} ${li.http}`,style:B??{},onClick:()=>q(!0),ref:oe,children:"http://"}),R.jsxs("div",{className:li.inputContent,children:[M&&p&&p.length>0&&R.jsx("div",{className:li.inputTags,children:p.map((Ye,st)=>R.jsx("div",{className:li.inputSingleTags,children:R.jsx(Lg,{...Y,id:Ye,label:Ye,withClose:!0})},st))}),R.jsx("input",{ref:Te,style:V??{},type:a??"text",value:e,onChange:Ye=>re(Ye),onFocus:Ie,onBlur:Pe,disabled:r,required:n,onKeyDown:Ae,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),z&&R.jsx("div",{className:li.rightIcon,style:G??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{C&&typeof C=="function"&&C()},children:qe(z)})]}),j&&R.jsxs("div",{style:$??{},onClick:ze,className:li.withCopy,children:[R.jsx(RB,{}),R.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&R.jsx("div",{style:ne??{},className:`${li.inputHelperText} ${d!=null&&d.error?li.error:""}`,children:R.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},qB="Textarea-module__textareaContainer",YB="Textarea-module__textAreaLabel",XB="Textarea-module__required",ZB="Textarea-module__wrap",QB="Textarea-module__textarea",JB="Textarea-module__focused",eL="Textarea-module__disabled",tL="Textarea-module__error",iL="Textarea-module__helperTextStyle",nL="Textarea-module__dark",tn={textareaContainer:qB,textAreaLabel:YB,required:XB,wrap:ZB,textarea:QB,focused:JB,disabled:eL,error:tL,helperTextStyle:iL,dark:nL},rL=({placeholder:e,label:t,msg:i,cols:n,rows:r,value:a,maxLength:o,onChange:s,onFocus:l,onBlur:u,disabled:d,required:c,textareaContainerStyle:h,textareaLabelStyle:f,requiredStyle:p,textareaStyle:g,textareaHelperTextStyle:m,theme:C,labelIcon:x})=>{const[T,k]=ve.useState(!1),A=K=>{let U=K.target.value;s&&typeof s=="function"&&s(U)},z=K=>K,H=()=>{k(!0),l&&typeof l=="function"&&l()},N=()=>{k(!1),u&&typeof u=="function"&&u()};return R.jsxs("div",{style:h??{},className:`${C==="dark"?tn.dark:""} ${tn.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?tn[i==null?void 0:i.type]:""} ${d?tn.disabled:null}`,children:[t&&R.jsxs("div",{style:f,className:tn.textAreaLabel,children:[R.jsx("p",{children:t}),R.jsx("span",{style:p??{},className:tn.required,children:c&&"*"}),x&&z(x)]}),R.jsx("div",{className:tn.wrap,children:R.jsx("textarea",{style:g??{},className:`${tn.textarea} ${T?tn.focused:""} ${d?tn.disabled:""} ${i!=null&&i.error?tn.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:o??null,onFocus:H,disabled:d,onBlur:N,onChange:A})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&R.jsx("div",{style:m??{},className:`${tn.helperTextStyle} ${i!=null&&i.error?tn.error:""}`,children:R.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},aL="Toggle-module__toggleWrapper",oL="Toggle-module__toggleState",sL="Toggle-module__checked",lL="Toggle-module__disabled",uL="Toggle-module__dark",js={toggleWrapper:aL,toggleState:oL,checked:sL,disabled:lL,dark:uL},dL=({checked:e,change:t,disabled:i,required:n,activeStyle:r,bgStyle:a,checkedBgStyle:o,disabledBgStyle:s,circleStyle:l,checkedCircleStyle:u,disabledCircleStyle:d,theme:c="light"})=>{const[h,f]=ve.useState(!1),p=()=>{t&&typeof t=="function"&&t(!e)},g=()=>{if(h)return r??{};if(e){if(o)return o}else if(e){if(i&&s)return s}else if(a)return a;return{}},m=()=>{if(e){if(u)return u}else if(e){if(i&&d)return d}else if(l)return l;return{}};return R.jsx("div",{style:g(),onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onMouseLeave:()=>f(!1),onClick:p,className:`${c==="dark"?js.dark:""} ${js.toggleWrapper} ${e?js.checked:""} ${i?js.disabled:""}`,children:R.jsx("div",{style:m(),className:js.toggleState,children:R.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},cL="Radio-module__radioWrapper",hL="Radio-module__sm",fL="Radio-module__md",pL="Radio-module__checked",vL="Radio-module__innerCircle",_L="Radio-module__radioState",gL="Radio-module__disabled",mL="Radio-module__dark",qr={radioWrapper:cL,sm:hL,md:fL,checked:pL,innerCircle:vL,radioState:_L,disabled:gL,dark:mL},yI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!0,size:a,theme:o="light"})=>{ve.useState(!1);const s=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return R.jsxs("div",{className:`${o==="dark"?qr.dark:""} ${qr.radioWrapper} ${qr[a]??qr.md} ${e?qr.checked:""} ${i?qr.disabled:""}`,onClick:s,children:[R.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),R.jsx("div",{className:qr.radioState,children:R.jsx("div",{className:qr.innerCircle})})]})},CL="Dropdown-module__dropdownWrapper",yL="Dropdown-module__placeHolder",xL="Dropdown-module__dropdownLabel",bL="Dropdown-module__required",SL="Dropdown-module__dropdownContainer",EL="Dropdown-module__sm",wL="Dropdown-module__md",IL="Dropdown-module__selectedTags",TL="Dropdown-module__selectedList",AL="Dropdown-module__additional",DL="Dropdown-module__dropdownListContainer",OL="Dropdown-module__dropdownList",RL="Dropdown-module__checkIcon",kL="Dropdown-module__disabled",BL="Dropdown-module__selected",LL="Dropdown-module__dropdownListFooter",PL="Dropdown-module__focused",FL="Dropdown-module__error",ML="Dropdown-module__dropdownHelperText",VL="Dropdown-module__dark",ai={dropdownWrapper:CL,placeHolder:yL,dropdownLabel:xL,required:bL,dropdownContainer:SL,sm:EL,md:wL,selectedTags:IL,selectedList:TL,additional:AL,dropdownListContainer:DL,dropdownList:OL,checkIcon:RL,disabled:kL,selected:BL,dropdownListFooter:LL,focused:PL,error:FL,dropdownHelperText:ML,dark:VL},NL=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:R.jsx("path",{stroke:"#10B77F",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 18.333c4.584 0 8.334-3.75 8.334-8.334 0-4.583-3.75-8.333-8.334-8.333-4.583 0-8.333 3.75-8.333 8.333 0 4.584 3.75 8.334 8.333 8.334zM6.667 10h6.667M10 13.333V6.666"})}),HL=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:R.jsx("path",{d:"M16.5 16.5L13.5834 13.5833M15.6667 8.58333C15.6667 12.4954 12.4954 15.6667 8.58333 15.6667C4.67132 15.6667 1.5 12.4954 1.5 8.58333C1.5 4.67132 4.67132 1.5 8.58333 1.5C12.4954 1.5 15.6667 4.67132 15.6667 8.58333Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),l_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,onFocus:c,onBlur:h,withClearAll:f=!0,withSelectAll:p=!0,withPlus:g=!1,searchComponent:m=!1,withFooter:C=!0,data:x,onSelect:T,selectedOptionID:k,withFilter:A=!0,withClose:z=!0,fixedDropdown:H=!1,onSearch:N,pagination:K,withMultiSelect:U=!1,skipSelected:X,labelIcon:M,closeIcon:Y,dropdownIcon:b,iconDown:j,onLabelIconClick:ie,onLabelIconMouseEnter:J,onLabelIconMouseLeave:pe,dropdownWrapperStyle:le,dropdownLabelStyle:Q,requiredStyle:W,labelIconStyle:y,dropdownContainerStyle:I,placeHolderStyle:S,selectedTagsStyle:B,selectedListStyle:V,additionalStyle:G,dropdownListStyle:$,listStyle:ne,theme:ae="light"})=>{const[Ce,se]=ve.useState(!1),[Te,w]=ve.useState(!1),[ce,oe]=ve.useState(""),[P,L]=ve.useState("");ve.useState(null);const q=ve.useRef([]),he=ve.useRef(null),ye=ve.useRef(null),re=ve.useRef({}),Ie=(Se,we)=>{const Ze=new Set;return Se.filter(_e=>Ze.has(_e[we])?!1:(Ze.add(_e[we]),!0))},Pe=Se=>{var we;re.current=Se,oe((we=re.current)==null?void 0:we.label),T&&typeof T=="function"&&T(re.current)},Ae=Se=>{q.current=[...q.current,...x.filter(we=>we.selected==!0),...x.filter(we=>we.id===Se.id)],Se.selected=!Se.selected,q.current=Ie(q.current,"id").filter(we=>we.selected),T&&typeof T=="function"&&T(q.current),m||oe(q.current.map(we=>we.label).join(", ")),se(we=>!we)},ze=Se=>{Se.stopPropagation(),q.current=[],k=null,x&&x.length>0&&x.forEach(we=>we.selected=!1),qe(""),U?T([]):(re.current={},T({})),oe("")},qe=Se=>{N&&typeof N=="function"&&N(Se),L(Se),oe(Se)},rt=()=>{if(k||k===0){let Se=x.filter(we=>Number(we.id)===Number(k));Se&&Se[0]&&(re.current=Se[0],X?(N&&typeof N=="function"&&N(re.current.label),oe(re.current.label),closeOnSelect&&setCollapsed(we=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):Pe(Se[0]))}},[zt,bi]=ve.useState(!1),Gt=Se=>{let we=he.current.querySelector("ul"),_e=Math.abs(we.scrollTop+we.clientHeight-we.scrollHeight)<=2;K&&_e&&!zt&&(d&&typeof d=="function"&&d(!0),bi(!0)),_e||bi(!1)},Ye=()=>{x.forEach(Se=>{Se.selected=!1}),q.current=[],T([]),oe(""),l&&typeof l=="function"&&l(),se(Se=>!Se)},st=()=>{x.forEach(Se=>{Se!=null&&Se.id&&(Se==null?void 0:Se.id)!==null&&(Se!=null&&Se.label)&&(Se==null?void 0:Se.label)!==""&&(Se==null?void 0:Se.label)!=="-"&&!Se.disabled&&(Se.selected=!0)}),q.current=x,q.current=Ie(q.current,"id").filter(Se=>Se.selected),oe(q.current.map(Se=>Se.label).join(", ")),u&&typeof u=="function"&&u(),T(q.current),se(Se=>!Se)},Oi=ve.useRef(!0);ve.useEffect(()=>{if(Oi.current){Oi.current=!1;return}Te||h&&typeof h=="function"&&h()},[Te]);const fn=()=>{c&&typeof c=="function"&&c()},ni=Se=>Se,pn=Se=>{Se.composedPath().includes(he.current)||w(!1)},Ln=Se=>{if(H){if(Se.composedPath().includes(he.current))return;w(!1)}},Ji=()=>{const Se=he.current,we=ye.current;if(!we||!Se)return;const Ze=Se.getBoundingClientRect(),_e=window.innerHeight;H?(we.style.position="fixed",we.style.width=Ze.width+"px",we.style.left=`${Ze.left+window.pageXOffset}px`,Ze.bottom+we.offsetHeight>_e?(we.style.top=`${window.scrollY+Ze.top-we.offsetHeight-8}px`,we.style.bottom="unset"):(we.style.top=`${window.scrollY+Ze.bottom}px`,we.style.bottom="unset")):Ze.bottom>_e?(we.style.top="unset",we.style.bottom="calc(100% + 8px)"):(we.style.bottom="unset",we.style.top="calc(100% + 8px)")},en=ve.useRef(null);return ve.useEffect(()=>{Te&&en.current&&en.current.focus()},[Te]),ve.useEffect(()=>{U&&(q.current=x.filter(Se=>Se.selected),oe(x.filter(Se=>Se.selected).map(Se=>Se.label).join(", ")))},[]),ve.useEffect(()=>{m&&s&&s.length>0&&L(s)},[]),ve.useEffect(()=>{Ji()},[ye,Te]),ve.useEffect(()=>{U||rt()},[k]),ve.useEffect(()=>(document.addEventListener("click",pn),document.addEventListener("wheel",Ln),()=>{document.removeEventListener("click",pn),document.removeEventListener("wheel",Ln)}),[]),R.jsxs("div",{className:`${ae==="dark"?ai.dark:""} ${ai.dropdownWrapper}`,style:le??{},children:[e&&R.jsxs("label",{className:ai.dropdownLabel,style:Q??{},children:[e," ",R.jsx("span",{className:ai.required,style:W??{},children:i&&"*"}),R.jsxs("span",{style:{...y??{},display:"grid",placeItems:"center"},onClick:()=>{ie&&typeof ie=="function"&&ie()},onMouseEnter:()=>{J&&typeof J=="function"&&J()},onMouseLeave:()=>{pe&&typeof pe=="function"&&pe()},children:[" ",ni(M)]})]}),R.jsxs("div",{onFocus:fn,ref:he,onClick:()=>(w(Se=>!Se),Ji()),className:`${ai.dropdownContainer} ${Te&&!o?ai.focused:""} ${t?ai.disabled:""} ${a!=null&&a.error?ai.error:""} ${ai[n]}`,style:I??{},children:[m?R.jsxs("div",{children:[" ",R.jsx(HL,{})]}):R.jsx(R.Fragment,{children:b&&R.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:ni(b)})}),!m&&U&&r&&!Te&&q.current.length===0&&R.jsx("span",{className:ai.placeHolder,style:S??{},children:r??""}),U&&R.jsx("div",{className:ai.selectedTags,style:B??{},children:!m&&!Te?R.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:[q.current.slice(0,3).map((Se,we)=>{let Ze=q.current[q.current.length-1];return R.jsxs("span",{className:ai.selectedList,style:V??{},children:[!g&&Se.label,!g&&Se.id!==Ze.id&&we!==2?", ":""]},Se==null?void 0:Se.id)}),!g&&q.current.length>3&&R.jsxs("span",{className:ai.additional,style:G??{},children:[" ","+(",q.current.length-3,")"]})]}):R.jsx("input",{ref:en,onClick:Se=>(Se.stopPropagation(),w(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...m?{value:P}:{},onChange:Se=>qe(Se.target.value)},k)}),R.jsx("input",{autoCorrect:"off",hidden:U,placeholder:r,readOnly:!A||!Te||U,type:"text",value:U&&!m&&Te?"":ce,onChange:Se=>qe(Se.target.value)},k),x&&x.length>0&&Te&&R.jsxs("div",{ref:ye,onClick:Se=>Se.stopPropagation(),className:ai.dropdownListContainer,children:[R.jsx("ul",{onScroll:Se=>Gt(),onClick:Se=>Se.stopPropagation(),className:ai.dropdownList,style:$??{},children:x.map(Se=>{var we,Ze,_e,Fe;return R.jsxs("li",{style:ne??{},className:`${!(Se!=null&&Se.label)||Se.label===void 0||Se!=null&&Se.disabled?ai.disabled:""} ${(U?Se.selected:(we=re.current)!=null&&we.id&&((Ze=re.current)==null?void 0:Ze.id)===Se.id)?ai.selected:""}`,onClick:()=>{U?Ae(Se):Pe(Se)},children:[R.jsxs("p",{children:[" ",Se!=null&&Se.customLabel?Se.customLabel():(Se==null?void 0:Se.label)??"-"]}),g?R.jsx(R.Fragment,{children:Se.selected?R.jsx(CI,{}):R.jsx(NL,{})}):(U?Se.selected:((_e=re.current)==null?void 0:_e.id)&&((Fe=re.current)==null?void 0:Fe.id)===Se.id)&&R.jsx("span",{className:ai.checkIcon,children:R.jsx(mI,{color:"#7F56D9",width:20,height:20})})]},Se==null?void 0:Se.id)})}),U&&C&&R.jsxs("div",{className:ai.dropdownListFooter,children:[f&&R.jsx("span",{onClick:Ye,children:"Clear All"}),p&&R.jsx("span",{onClick:st,children:"Select All"})]})]}),!U&&z&&(q.current.length>0||ce.length)>0&&R.jsx("div",{onClick:Se=>ze(Se),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:Y?ni(Y):R.jsx(yu,{width:16,height:16})}),j?ni(j):R.jsx("div",{style:{display:"grid",placeItems:"center",transform:Te?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!m&&R.jsx(wh,{})})]}),a&&(a==null?void 0:a.visible)&&R.jsx("div",{className:`${ai.dropdownHelperText} ${a!=null&&a.error?ai.error:""}`,children:!Te&&R.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},$L="Tooltip-module__tooltipContainer",WL="Tooltip-module__tooltipContent",zL="Tooltip-module__top",GL="Tooltip-module__right",UL="Tooltip-module__bottom",KL="Tooltip-module__left",jL="Tooltip-module__tooltipTitle",qL="Tooltip-module__tooltipText",YL="Tooltip-module__dark",Pa={tooltipContainer:$L,tooltipContent:WL,top:zL,right:GL,bottom:UL,left:KL,tooltipTitle:jL,tooltipText:qL,dark:YL},XL=({children:e,tooltipSlot:t,delay:i,placement:n="top",trigger:r="hover",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",theme:c})=>{const h=ve.useRef(null),f=ve.useRef(null);let p;const[g,m]=ve.useState(!1),C=()=>{r==="hover"&&(p=setTimeout(()=>{m(!0)},i||400))},x=()=>{r==="hover"&&(clearTimeout(p),setTimeout(()=>{m(!1)},i||400))},T=()=>{r==="click"&&m(z=>!z)},k=()=>{const z=h.current,H=f.current;if(!H||!z)return;const N=z.getBoundingClientRect();switch(H.style.position="fixed",n){case"top":H.style.top=`${N.top-H.offsetHeight-8}px`;break;case"bottom":H.style.top=`${N.bottom+8}px`;break;case"left":H.style.top=`${N.top+N.height/2-H.offsetHeight/2}px`,H.style.left=`${N.left-H.offsetWidth-8}px`;break;case"right":H.style.top=`${N.top+N.height/2-H.offsetHeight/2}px`,H.style.left=`${N.right+8}px`;break}},A=z=>{z.composedPath().includes(h.current)||m(!1)};return ve.useEffect(()=>{k()},[h,g]),ve.useEffect(()=>(document.addEventListener("click",A),()=>{document.removeEventListener("click",A)}),[]),ve.useEffect(()=>{const z=f.current;z&&z.style.setProperty("--pointer-position",`${d}`)},[g]),R.jsxs("div",{ref:h,className:`${c==="dark"?Pa.dark:""} ${Pa.tooltipContainer}`,onClick:T,onMouseEnter:C,onMouseLeave:x,children:[e,g&&t?t():g&&R.jsxs("div",{style:s??{},onClick:z=>z.stopPropagation(),ref:f,className:`${Pa.tooltipContent} ${n?Pa[n]:Pa.bottom}`,children:[a&&a.length>0&&R.jsx("h2",{className:Pa.tooltipTitle,style:l??{},children:a}),o&&o.length>0&&R.jsx("p",{className:Pa.tooltipText,style:u??{},children:o})]})]})},ZL="Popup-module__modalOverlay",QL="Popup-module__popupDrawerMode",JL="Popup-module__popupContainer",eP="Popup-module__EnterFromLeft",tP="Popup-module__fadeIn",iP="Popup-module__withOptions",nP="Popup-module__horizontal",rP="Popup-module__popupHeader",aP="Popup-module__popupTitle",oP="Popup-module__popupDescription",sP="Popup-module__typeIcon",lP="Popup-module__icon",uP="Popup-module__templateWrapper",dP="Popup-module__dark",_n={modalOverlay:ZL,popupDrawerMode:QL,popupContainer:JL,enterFromLeft:eP,fadeIn:tP,withOptions:iP,horizontal:nP,popupHeader:rP,popupTitle:aP,popupDescription:oP,typeIcon:sP,icon:lP,templateWrapper:uP,dark:dP},cP=e=>{const t=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];let i=0,n=parseInt(e,10)||0;for(;n>=1024&&++i;)n=n/1024;return n.toFixed(n<10&&i>0?1:0)+" "+t[i]},hP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),fP=e=>new Promise((t,i)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result.split(",")[1]),n.onerror=r=>i(r)});location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const pP=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},vP=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:R.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),_P=()=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:R.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),xI=({width:e,color:t})=>R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:R.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:t??"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Pg=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,theme:h})=>{const f=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return R.jsx(xI,{});case"unsaved":return R.jsx(_P,{});case"success":return R.jsx(vP,{})}},p=()=>{a&&typeof a=="function"&&a(!1)},g=ve.useRef(null),m=C=>{C.target===g.current&&r&&typeof r=="function"&&r(!1)};return ve.useEffect(()=>(document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}),[]),e&&R.jsx("div",{ref:g,style:s??{},className:`
32
32
  ${h==="dark"?_n.dark:""}
33
33
  ${_n.modalOverlay}
34
34
  ${i&&(i==null?void 0:i.mode)==="drawer"?_n.popupDrawerMode:""}
@@ -667,7 +667,7 @@ const rB = ({ loadingColor: e }) => /* @__PURE__ */ R.jsxs(
667
667
  height: "30px",
668
668
  viewBox: "0 0 24 30",
669
669
  style: { enableBackground: "new 0 0 50 50" },
670
- "xml:space": "preserve",
670
+ xmlSpace: "preserve",
671
671
  children: [
672
672
  /* @__PURE__ */ R.jsxs("rect", { x: "0", y: "10", width: "4", height: "10", fill: e ?? "#ffffff", opacity: "0.2", children: [
673
673
  /* @__PURE__ */ R.jsx("animate", { attributeName: "opacity", attributeType: "XML", values: "0.2; 1; .2", begin: "0s", dur: "0.6s", repeatCount: "indefinite" }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "master-components-react",
3
3
  "private": false,
4
- "version": "2.2.12",
4
+ "version": "2.2.13",
5
5
  "type": "module",
6
6
  "main": "dist/master-components-react.cjs.js",
7
7
  "module": "dist/master-components-react.es.js",