forstok-ui-lib 5.1.9 → 5.1.10

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.
package/dist/index.js CHANGED
@@ -925,5 +925,5 @@
925
925
  overflow-wrap: break-word;
926
926
  word-break: break-word;
927
927
  }
928
- `;exports.ButtonComponent=U,exports.CheckboxComponent=t=>{var{id:n,name:r,children:i,$flow:o,extendKey:a,extendClass:l,reset:c,setReset:u,isForceUpdate:d,setForceUpdate:p,evChange:h,$isError:g,$iconRight:f}=t,A=s(t,["id","name","children","$flow","extendKey","extendClass","reset","setReset","isForceUpdate","setForceUpdate","evChange","$isError","$iconRight"]);const{disabled:b,defaultChecked:C}=A,[v,B]=e.useState(C||!1),x=e.useRef(null);e.useEffect((()=>{d&&(B(C||!1),p&&p(!1)),c&&(B(!1),u&&u(!1))}),[c,u,d,p,C]);return delete Object.assign({},A).defaultChecked,m.jsxs(z,{$flow:o,$iconRight:f,ref:x,htmlFor:n,disabled:b||!1,children:[i,m.jsx(M,Object.assign({id:n,type:"checkbox",checked:v,name:r,evChange:e=>{B(e.target.checked),h&&h(e)}},l&&{className:l},""!==a&&{"data-key":a},A)),m.jsx(Y,Object.assign({$isError:g},A["data-qa-id"]&&{"data-qa-id":A["data-qa-id"]}))]})},exports.DropdownComponent=t=>{var{children:n,title:r,subTitle:i,$externalWidth:o,$externalMinWidth:a,$internalWidth:l,$area:c,$openPosition:u,$placement:d,$top:p,onClick:h,$alias:g,type:f,portalId:A,$bottom:b}=t,C=s(t,["children","title","subTitle","$externalWidth","$externalMinWidth","$internalWidth","$area","$openPosition","$placement","$top","onClick","$alias","type","portalId","$bottom"]);const v=e.useRef(null),B=()=>{const e=document.getElementsByClassName("_refContainer is-shown")[0];if(e){const t=e.getBoundingClientRect(),n=document.querySelector(`#${A} ._refDropdownPortal`);if(n){const e=n.querySelector("._refDropdownWrapper");n.style.left=t.left+t.width-e.getBoundingClientRect().width+"px",n.style.top=t.top+parseInt(p||"0")-32+"px"}}},x=()=>{const e=document.getElementsByClassName("_refContainer is-shown");if(e.length)for(let t=0;t<e.length;t++)e[t].classList.remove("is-shown");document.querySelector("._refScrollContainer").removeEventListener("scroll",B,!0),setTimeout((()=>{if(A){const e=document.getElementsByClassName("_refDropdownPortal is-shown");if(e.length)for(let t=0;t<e.length;t++)e[t].style.left="0",e[t].style.top="0",e[t].classList.remove("is-shown")}}),10)},I=e=>{const t=v.current;if(t){const n=e.target.closest(`.${t.classList[0]}`);if(!n)return;const r=n.closest("._refContainer");if(r){const t=r.classList.contains("is-shown"),n=r.getBoundingClientRect();t?(r.classList.remove("is-shown"),setTimeout((()=>{if(A){const e=document.querySelector(`#${A} ._refDropdownPortal`),t=document.querySelector("._refScrollContainer"),n=e.querySelector("._refDropdownWrapper");e&&(e.classList.remove("is-shown"),e.style.left="0px",e.style.top="0px",n&&t.removeEventListener("scroll",B,!0))}}),10)):(x(),r.classList.add("is-shown"),setTimeout((()=>{if(A){const e=document.querySelector(`#${A} ._refDropdownPortal`),t=document.querySelector("._refScrollContainer"),r=e.querySelector("._refDropdownWrapper");e&&(n&&(r?setTimeout((()=>{r.style.right="auto",e.style.left=n.left+n.width-r.getBoundingClientRect().width+"px",e.style.top=n.top+parseInt(p||"0")-32+"px",e.style.zIndex="8",t.addEventListener("scroll",B,!0)}),10):(e.style.left=n.left+(parseInt(l||"0")+n.width)/2+"px",e.style.top=n.top+n.height+"px")),e.classList.add("is-shown"))}}),10),h&&h(e))}}};e.useEffect((()=>(setTimeout((()=>{const e=document.querySelectorAll("._refDropdownPortal._refHover");for(let t of e)t&&t.addEventListener("mouseenter",(e=>{const t=e.target;t.classList.add("is-shown"),t.classList.add("unhiddenable")})),t&&t.addEventListener("mouseleave",(e=>{const t=e.target;t.classList.remove("is-shown"),t.classList.remove("unhiddenable"),t.style.left="0",t.style.top="0"}))}),1),()=>{const e=document.querySelectorAll("._refDropdownPortal._refHover");for(let t of e)t&&t.removeEventListener("mouseenter",(e=>{const t=e.target;t.classList.add("is-shown"),t.classList.add("unhiddenable")}),!0),t&&t.removeEventListener("mouseleave",(e=>{const t=e.target;t.classList.remove("is-shown"),t.classList.remove("unhiddenable"),t.style.left="0",t.style.top="0"}),!0)})),[A]);const F=i?m.jsx(pe,{children:i}):null,y=r?m.jsxs(de,{children:[r," ",F]}):null,w=n.filter((t=>e.isValidElement(t)?"control"===t.props["aria-label"]:null)),E=w&&e.isValidElement(w[0])?"hover"===f?m.jsxs(ce,{children:[m.jsx(le,Object.assign({className:"_refDropdownControl"},A&&{onMouseEnter:e=>{const t=v.current;if(t){const n=e.target.closest(`.${t.classList[0]}`);if(!n)return;const r=document.querySelectorAll("._refDropdownPortal");for(const e of r)e.classList.remove("is-shown"),e.style.left="0",e.style.top="0";const i=n.closest("._refContainer");if(i){const e=i.getBoundingClientRect(),t=document.querySelector(`#${A} ._refDropdownPortal`);if(t){if(e){t.style.left=e.left+(parseInt(l||"0")+e.width)/2+"px";let n=e.top+e.height;const r=t.querySelector("._refDropdownWrapper");r&&(r.style.display="block",n+r.clientHeight>=document.body.clientHeight&&(n=e.top-r.clientHeight-10)),t.style.top=n+"px"}t.classList.add("is-shown")}}}},onMouseLeave:e=>{const t=v.current;if(t){if(!e.target.closest(`.${t.classList[0]}`))return;setTimeout((()=>{const e=document.querySelector(`#${A} ._refDropdownPortal`);e&&!e.classList.contains("unhiddenable")&&(e.classList.remove("is-shown"),e.style.left="0",e.style.top="0")}),150)}}},{children:w[0].props.children})),m.jsx(le,{className:"_refDropdownControlMobile",ref:v,onClick:I,children:w[0].props.children})]}):m.jsx(le,{ref:v,onClick:I,children:w[0].props.children}):null,k=n.filter((t=>e.isValidElement(t)?"body"===t.props["aria-label"]:null)),D=k&&e.isValidElement(k[0])?m.jsx(he,{$area:c,children:k[0].props.children}):null,G=n.filter((t=>e.isValidElement(t)?"action"===t.props["aria-label"]:null)),S=G&&e.isValidElement(G[0])?m.jsx(ge,{$position:G[0].props["data-position"],className:G[0].props.className,children:G[0].props.children}):null,N=m.jsxs(ae,Object.assign({className:"_refDropdownWrapper"},l&&{$internalWidth:l},p&&{$top:p},u&&{$openPosition:u},d&&{$placement:d},b&&{$bottom:b},{children:[y,D,S]}));return m.jsxs(ue,Object.assign({className:"_refContainer "+(f?`_refContainer${f}`:"")},o&&{$externalWidth:o},a&&{$externalMinWidth:a},c&&{$area:c},p&&{$top:p},g&&{$alias:g},u&&{$openPosition:u},d&&{$placement:d},b&&{$bottom:b},C,{children:[E,m.jsx(se,{className:"_refDropdownOverlay",onClick:()=>{x()}}),A?m.jsx(oe,{wrapperId:A,children:m.jsx(fe,{className:"_refDropdownPortal "+("hover"===f?"_refHover":""),children:N})}):N]}))},exports.ErrorComponent=e=>{var{children:t,$mode:n}=e,r=s(e,["children","$mode"]);return m.jsxs($u,Object.assign({$mode:n,className:"_refErrorContainer"},r,{children:[m.jsx(ie,{$name:"alert",$width:"11px"}),t]}))},exports.FoContainer=Id,exports.FormContainer=gd,exports.HeaderContainer=vd,exports.IconComponent=ie,exports.ImageComponent=e=>{var{$mode:t}=e,n=s(e,["$mode"]);const{width:r,height:i}=n;return m.jsx(zi,Object.assign({$mode:t,width:r,height:i,onError:e=>{e.target.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEsASwDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAj/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCjwFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB//9k="}},n))},exports.InfoGroup=Fd,exports.InputComponent=M,exports.InputRefComponent=R,exports.LabelComponent=e=>{var{children:t,$mode:n,$position:r}=e,i=s(e,["children","$mode","$position"]);return m.jsx($,Object.assign({$mode:n,$position:r},i,{children:t}))},exports.LinkComponent=e=>{var{children:t,mode:n,$activated:r=!1,href:i,$elipsis:o=!1,$shadow:a=!1,disabled:l=!1}=e,c=s(e,["children","mode","$activated","href","$elipsis","$shadow","disabled"]);const{onClick:u}=c;return i?m.jsx(L,Object.assign({className:"_refLink",mode:n,$activated:r,$elipsis:o,$shadow:a,disabled:l,href:i},c,{children:t})):m.jsx(X,Object.assign({className:"_refLink",mode:n,$activated:r,$elipsis:o,$shadow:a,disabled:l,onClick:u},c,{children:t}))},exports.ListContainer=Ad,exports.LoadingComponent=te,exports.MessageComponent=({timer:t=500,$type:n,message:r,callback:i})=>{const[o,a]=be.useStateWithCallbackLazy(!1),[s,l]=be.useStateWithCallbackLazy(!1),[c,u]=be.useStateWithCallbackLazy(!1),d=e.useCallback((()=>{u(!c,(()=>{document.getElementsByTagName("BODY")[0].classList.remove("is-immuned"),i&&i()}))}),[i,u,c]),p=e.useCallback((()=>{d()}),[d]);return e.useEffect((()=>{const e=t||2e3,n=document.querySelector("._refMessageOverlay");return o||c?o&&c&&(a&&a(!o,(()=>{})),l&&l(!s,(()=>{})),n&&n.removeEventListener("click",p)):a(!o,(()=>{n&&n.addEventListener("click",p),setTimeout((()=>{l(!s,(()=>{setTimeout((()=>!s&&d()),e)}))}),1)})),()=>{n&&n.removeEventListener("click",p)}}),[o,s,t,d,a,l,p,c]),m.jsxs(xe,{$isOpen:o,children:[m.jsx(Ie,{className:"_refMessageOverlay"}),m.jsx(ye,{children:m.jsx(Fe,{$isOpen:s,children:m.jsxs(we,{$type:n,children:[m.jsx("i",{}),r,m.jsx(U,{$mode:"small-white-round-close",onClick:d})]})})})]})},exports.MessageQuestionComponent=({$type:t,title:n,subtitle:r,callback:i,buttonSubmit:o,cancelCallback:a})=>{const[s,l]=be.useStateWithCallbackLazy(!1),[c,u]=be.useStateWithCallbackLazy(!1),[d,p]=be.useStateWithCallbackLazy(!1),h=e.useCallback((()=>{p(!d,(()=>{a&&a();document.getElementsByTagName("BODY")[0].classList.remove("is-immuned")}))}),[a,d,p]),g=e.useCallback((()=>{h()}),[h]);return e.useEffect((()=>{const e=document.querySelector("._refQuestionMessageOverlay");s||d?s&&d&&(l(!s,(()=>{})),u(!c,(()=>{})),e&&e.removeEventListener("click",g)):l(!s,(()=>{setTimeout((()=>{u(!c,(()=>{})),e&&e.addEventListener("click",g)}),1)}))}),[s,c,l,u,g,d]),m.jsxs(xe,{$isOpen:s,children:[m.jsx(Ie,{className:"_refQuestionMessageOverlay",$type:t}),m.jsx(ye,{$type:t,children:m.jsx(Fe,{$isOpen:c,children:m.jsxs(we,{$type:t,children:[m.jsx("i",{}),m.jsxs("div",{children:[m.jsx(C,{$elipsis:!1,style:{fontWeight:600,fontSize:"15px"},children:n}),m.jsx(C,{$color:"grey",$elipsis:!1,children:Si(r)}),m.jsxs("aside",{children:[m.jsx(U,{$mode:"white",$size:"small",onClick:h,children:"Cancel"}),m.jsx(U,{$mode:"red",$size:"small",onClick:()=>{p(!d,(()=>{document.getElementsByTagName("BODY")[0].classList.remove("is-immuned"),i&&i()}))},children:o||"Confirm"})]})]})]})})})]})},exports.PanelContainer=md,exports.PanelWrapper=bd,exports.PopupComponent=t=>{var{children:n,body:r,mode:i,height:o,width:a,isOpen:l,evTooglePopup:c}=t,u=s(t,["children","body","mode","height","width","isOpen","evTooglePopup"]);const[d,p]=be.useStateWithCallbackLazy(!1),h=e.useRef(null),g=e.useCallback((e=>{ji=setTimeout((()=>{p(e,(()=>{const e=h&&h.current?h.current:null;e&&(e.scrollTop=0)})),clearTimeout(ji)}),1)}),[p]),f=e.useRef({init:()=>{g(l)}});e.useEffect((()=>{const{init:e}=f.current;return e(),()=>{clearTimeout(ji)}}),[]),e.useEffect((()=>{g(l)}),[l,g]);let A=[...n];const b=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"head"===t.props["aria-label"])))||null,C=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"sub-head"===t.props["aria-label"])))||null,v=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"body"===t.props["aria-label"])))||null,B=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"foot"===t.props["aria-label"])))||null,x=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"left-foot"===t.props["aria-label"])))||null,I=C.length?m.jsx("aside",{children:C[0]&&e.isValidElement(C[0])?C[0].props.children:null}):null,F=b.length&&b[0]&&e.isValidElement(b[0])?b[0].props["data-qa-id"]:"";return m.jsxs(Li,{$isOpen:l,children:[m.jsx(Xi,{}),m.jsx(Ti,Object.assign({ref:h},u["data-qa-id"]&&{"data-qa-id":u["data-qa-id"]},{children:"question"===i?m.jsx(Oi,{$isOpen:d,children:m.jsxs(Ri,{$width:a,children:[m.jsx(ie,{$name:"warning",$width:"30px"}),m.jsxs(Vi,{$mode:i,children:[b.length?m.jsx(Pi,{children:b[0]&&e.isValidElement(b[0])?b[0].props.children:null}):null,I,B.length?m.jsx(Mi,{children:B[0]&&e.isValidElement(B[0])?m.jsx("aside",{"data-type":B[0].props.type||"",children:B[0].props.children}):null}):null]})]})}):m.jsxs(m.Fragment,{children:[m.jsx(Vi,{$width:a,$isOpen:d,$mode:i,children:b.length?m.jsxs(m.Fragment,{children:[m.jsx(U,{$mode:"round-close",onClick:c}),m.jsx(Pi,{"data-qa-id":F,children:b[0]&&e.isValidElement(b[0])&&b[0].props.children})]}):null}),m.jsxs(Oi,{$width:a,$isOpen:d,$withHeader:!!b.length,children:[I,v.length?m.jsx(Wi,{$mode:r,$width:a,$height:o,children:v[0]&&e.isValidElement(v[0])&&v[0].props.children}):null,B.length?m.jsxs(Mi,{$isLeft:!!x.length,children:[m.jsx("aside",{children:x&&x.length&&x[0]&&e.isValidElement(x[0])?x[0].props.children:null}),B[0]&&e.isValidElement(B[0])?m.jsxs("aside",{"data-type":B[0].props.type||"",children:[i&&"info"===i?m.jsx(U,{$mode:"white",$size:"small",onClick:c,children:"Close"}):m.jsx(U,{$mode:"white",$size:"small",onClick:c,"data-qa-id":"popup-button-cancel",children:"Cancel"}),B[0].props.children]}):null]}):null]})]})}))]})},exports.ReactPortalComponent=oe,exports.SelectComponent=t=>{var{type:n,isError:r=!1,mode:i,customOption:o,customLabel:a,MenuList:l,isCreateable:c=!1,isClearable:u=!1,selectKey:d,disabled:p,defaultValue:h,width:g,reset:f,setReset:A,isForceUpdate:b,setForceUpdate:C,isCheckAutoCopy:v,evChangeCustom:B,isField:x,evCreate:I,evChange:F,isMinOption:y,isMulti:w=!1,options:E,name:k,placeholder:D,removeMessage:G,evCreateMessageQuestion:S}=t,N=s(t,["type","isError","mode","customOption","customLabel","MenuList","isCreateable","isClearable","selectKey","disabled","defaultValue","width","reset","setReset","isForceUpdate","setForceUpdate","isCheckAutoCopy","evChangeCustom","isField","evCreate","evChange","isMinOption","isMulti","options","name","placeholder","removeMessage","evCreateMessageQuestion"]);const[L,X]=e.useState(h||null);e.useEffect((()=>{if(f&&(X(null),A&&A(!1)),b){let e=h;if(v&&e){let t=!1;if(w){let n=e;if(Array.isArray(n)&&n.length){let e=[];for(const r of n){const n=null==E?void 0:E.filter((e=>e.label===r.label&&e.value===r.value));(null==n?void 0:n.length)&&Array.isArray(e)?e.push(r):!t&&(t=!0)}e.length&&(n=e)}}else{let n=e;if(n){const r=null==E?void 0:E.filter((e=>n&&e.label===n.label&&e.value===n.value));(null==r?void 0:r.length)&&(e=null,t=!0)}}t&&k&&B&&B(k,e)}X(e),C&&C(!1)}}),[h,B,v,b,w,k,E,f,C,A]);const T=()=>{const e=document.getElementsByClassName("_refContainer is-shown");if(e.length)for(let t=0;t<e.length;t++)e[t].classList.remove("is-shown")},O=(e,{action:t,removedValue:n,option:r})=>{if(w){const i=e,o=()=>{X(i),F&&F(i,{action:t,removedValue:n,option:r})};switch(t){case"remove-value":if(y&&"remove-value"===t&&Array.isArray(L)&&1===L.length)return!1;if(n.isFixed)return;break;case"pop-value":if(n.isFixed)return;break;case"clear":e=(null==E?void 0:E.filter((e=>e.isFixed)))||[]}if(G&&"remove-value"===t){const e=((e,t,n,r,i,o)=>({$type:e,title:t,subtitle:n,callback:r,buttonSubmit:i,cancelCallback:o}))("confirm",(null==G?void 0:G.title)||"",(null==G?void 0:G.subtitle)||"",o);return S&&S(e),!1}X(i),F&&F(i,{action:t,removedValue:n,option:r})}else{const o=e;X("paymentReceiveStore"===i?o?{value:o.value,label:o.label,channel:o.channel}:o:o?{value:o.value,label:o.label}:o),F&&F(o,{action:t,removedValue:n,option:r})}!w&&x&&B&&k&&B(k,e)},V=()=>{x&&B&&k&&L&&B(k,L)},P={container:e=>Object.assign(Object.assign({},e),{display:"inline-block",width:g?g+"px":"100%",minHeight:"1px",textAlign:"left",border:"none"}),control:(e,t)=>Object.assign(Object.assign({},e),{borderRadius:"filter"===i?"var(--sec-rd)":"var(--ter-rd)",minHeight:"picklist"===i?"30px":"1px",height:"orders"===i?"90px":"30px",maxHeight:"picklist"===i?"46px":"none",cursor:"pointer",borderWidth:"1px",boxShadow:t.isFocused&&"filter"===i?"var(--act-shd-bx)":"none",borderColor:t.isFocused&&"filter"!==i&&!r?"var(--pri-clr-ln__fc)":r?"var(--err-clr-ln)":"filter"===i?"var(--ter-clr-ln)":" var(--ck-clr-ln)",background:"filter"===i?"var(--ter-clr-ln)":"",overflow:"picklist"===i?"hidden":"orders"===i?"auto":"initial",alignItems:"orders"===i?"start":"center",padding:"orders"===i?"6px 0":"unset","&:hover":{borderColor:t.isFocused&&"filter"!==i&&!r?"var(--pri-clr-ln__fc)":r?"var(--err-clr-ln)":"filter"===i?"var(--ter-clr-ln)":" var(--ck-clr-ln)"},color:p?"#ADADAD":"initial",opacity:p?".7":1}),placeholder:e=>Object.assign(Object.assign({},e),{fontStyle:"italic"}),input:e=>Object.assign(Object.assign({},e),{minHeight:"1px",margin:"0 2px",padding:"0",input:{boxShadow:"none !important"}}),dropdownIndicator:e=>Object.assign(Object.assign({},e),{minHeight:"1px",paddingTop:"0",paddingBottom:"0",paddingLeft:"2px",paddingRight:"2px",color:"#757575",alignSelf:"orders"===i?"start":"unset"}),indicatorSeparator:e=>Object.assign(Object.assign({},e),{minHeight:"1px",height:"24px",display:"tag"===n?"block":"none"}),clearIndicator:e=>Object.assign(Object.assign({},e),{minHeight:"1px",marginRight:"-6px",padding:"0"}),valueContainer:e=>Object.assign(Object.assign({},e),{height:"30px",maxHeight:"picklist"===i?"46px":"none",minHeight:"picklist"===i?"30px":"1px",overflow:"picklist"===i?"auto":"initial",paddingTop:"0",paddingBottom:"0",paddingRight:"2px"}),singleValue:e=>Object.assign(Object.assign({},e),{minHeight:"1px",paddingBottom:"2px",color:p?"#ADADAD":"form"===i?"#2d3c48":"initial",opacity:p?".7":1}),option:(e,t)=>Object.assign(Object.assign({},e),{color:p?"#ADADAD":t.isSelected?"#ffffff":"#000000",backgroundColor:p?"transparent":t.isSelected||t.isFocused?"#fc5c64":"transparent",cursor:"pointer","&:hover":{backgroundColor:p?"transparent":"#ec5b62",color:p?"#ADADAD":"#ffffff"}}),menu:e=>Object.assign(Object.assign({},e),{borderRadius:"filter"===i?"var(--sec-rd)":"var(--ter-rd)"}),menuPortal:e=>Object.assign(Object.assign({},e),{zIndex:9999,letterSpacing:"normal",lineHeight:"normal"}),multiValue:(e,t)=>t.data.isFixed?Object.assign(Object.assign({},e),{backgroundColor:"gray"}):e,multiValueLabel:(e,t)=>t.data.isFixed?Object.assign(Object.assign({},e),{fontWeight:"bold",color:"white",paddingRight:6}):e,multiValueRemove:(e,t)=>Object.assign(Object.assign({},e),{display:t.data.isFixed?"none":"block",svg:{position:"relative",top:"2px"}})};let W=c?m.jsx(Ku,Object.assign({options:E,styles:P,onMenuOpen:T,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"auto",value:L,onChange:O,onCreateOption:e=>{A&&A(!1),w?Array.isArray(L)?X([...L,{value:e,label:e}]):X([{value:e,label:e}]):X({value:e,label:e}),I&&I(e)},isValidNewOption:(e,t)=>!(0===e.trim().length||t.find((t=>t.name===e))),noOptionsMessage:()=>null,isClearable:u?!Array.isArray(L)||!L.length||L.some((e=>!e.isFixed)):u},w&&{isMulti:!0},o&&{components:{Option:o}},l&&{components:{MenuList:l,Option:o}},d&&{key:d},p&&{isDisabled:p},w&&{closeMenuOnSelect:!1},w&&{onBlur:V},D&&{placeholder:D},N)):m.jsx(Zu,Object.assign({options:E,styles:P,onMenuOpen:T,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"auto",value:L,onChange:O,noOptionsMessage:()=>null,isClearable:u?!Array.isArray(L)||!L.length||L.some((e=>!e.isFixed)):u},w&&{isMulti:!0},o&&{components:{Option:o}},"paymentReceiveStore"===i&&{components:{Option:o,SingleValue:a}},l&&{components:{MenuList:l,Option:o}},d&&{key:d},p&&{isDisabled:p},w&&{closeMenuOnSelect:!1},w&&{onBlur:V},D&&{placeholder:D},N));return m.jsx("section",Object.assign({className:"_refContainer"},N,{children:W}))},exports.SingleFormContainer=fd,exports.TabsContainer=Bd,exports.TabsContent=xd,exports.TextComponent=C,exports.Title=Cd,exports.UploadComponent=e=>{var{children:t,mode:n}=e,r=s(e,["children","mode"]);const{id:i,width:o}=r;return"image"===n?m.jsxs(m.Fragment,{children:[t,m.jsx(od,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]}):m.jsxs(td,{$width:o,children:[m.jsxs(nd,{htmlFor:i,children:[m.jsx(id,{}),m.jsx(rd,{children:t})]}),m.jsx(od,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]})},exports.UploadDragDropComponent=t=>{var{children:n,id:r,name:i,evChange:o,evCreateMessage:a}=t,l=s(t,["children","id","name","evChange","evCreateMessage"]);const{accept:c}=l,[u,d]=e.useState(!1),p=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?d(!0):"dragleave"===e.type&&d(!1)};return m.jsxs(ad,{onDragEnter:p,className:u?"drag-active":"",children:[m.jsx(od,Object.assign({id:r,name:i,onChange:e=>{e.preventDefault();const t=e.target;t.files&&t.files[0]&&o&&o(t.files)}},l)),m.jsx(sd,{id:"label-file-dragdrop-upload",htmlFor:r,children:m.jsx(cd,{children:n?m.jsxs(dd,{children:[m.jsx(pd,{}),m.jsx("span",{children:n})]}):m.jsxs(ud,{children:["Drag & Drop file here to upload, or ",m.jsx("span",{children:"browse"}),"."]})})}),u&&m.jsx(ld,{onDragEnter:p,onDragLeave:p,onDragOver:p,onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),d(!1),e.dataTransfer.files[0]){const t=c?c.split(",").map((e=>e.trim().replace(".",""))):null;for(let n=0;n<e.dataTransfer.files.length;n++){const r=e.dataTransfer.files[n].name.split(".").pop();if((null==t?void 0:t.length)&&r&&!t.includes(r)){const e={$type:"failed",message:"File type is not allowed. Please check again",timer:2e3};return a&&a(e),!1}}o&&o(e.dataTransfer.files)}}})]})},exports.boxBase=y,exports.clearList=v,exports.dropBase=w,exports.elipsis=x,exports.formLabel=k,exports.headTable=E,exports.multiElipsis=I,exports.responseWidth=B,exports.thirdElipsis=F;
928
+ `;exports.ButtonComponent=U,exports.CheckboxComponent=t=>{var{id:n,name:r,children:i,$flow:o,extendKey:a,extendClass:l,reset:c,setReset:u,isForceUpdate:d,setForceUpdate:p,evChange:h,$isError:g,$iconRight:f}=t,A=s(t,["id","name","children","$flow","extendKey","extendClass","reset","setReset","isForceUpdate","setForceUpdate","evChange","$isError","$iconRight"]);const{disabled:b,defaultChecked:C}=A,[v,B]=e.useState(C||!1),x=e.useRef(null);e.useEffect((()=>{d&&(B(C||!1),p&&p(!1)),c&&(B(!1),u&&u(!1))}),[c,u,d,p,C]);return delete Object.assign({},A).defaultChecked,m.jsxs(z,{$flow:o,$iconRight:f,ref:x,htmlFor:n,disabled:b||!1,children:[i,m.jsx(M,Object.assign({id:n,type:"checkbox",checked:v,name:r,evChange:e=>{B(e.target.checked),h&&h(e)}},l&&{className:l},""!==a&&{"data-key":a},A)),m.jsx(Y,Object.assign({$isError:g},A["data-qa-id"]&&{"data-qa-id":A["data-qa-id"]}))]})},exports.DropdownComponent=t=>{var{children:n,title:r,subTitle:i,$externalWidth:o,$externalMinWidth:a,$internalWidth:l,$area:c,$openPosition:u,$placement:d,$top:p,onClick:h,$alias:g,type:f,portalId:A,$bottom:b}=t,C=s(t,["children","title","subTitle","$externalWidth","$externalMinWidth","$internalWidth","$area","$openPosition","$placement","$top","onClick","$alias","type","portalId","$bottom"]);const v=e.useRef(null),B=()=>{const e=document.getElementsByClassName("_refContainer is-shown")[0];if(e){const t=e.getBoundingClientRect(),n=document.querySelector(`#${A} ._refDropdownPortal`);if(n){const e=n.querySelector("._refDropdownWrapper");n.style.left=t.left+t.width-e.getBoundingClientRect().width+"px",n.style.top=t.top+parseInt(p||"0")-32+"px"}}},x=()=>{const e=document.getElementsByClassName("_refContainer is-shown");if(e.length)for(let t=0;t<e.length;t++)e[t].classList.remove("is-shown");document.querySelector("._refScrollContainer").removeEventListener("scroll",B,!0),setTimeout((()=>{if(A){const e=document.getElementsByClassName("_refDropdownPortal is-shown");if(e.length)for(let t=0;t<e.length;t++)e[t].style.left="0",e[t].style.top="0",e[t].classList.remove("is-shown")}}),10)},I=e=>{const t=v.current;if(t){const n=e.target.closest(`.${t.classList[0]}`);if(!n)return;const r=n.closest("._refContainer");if(r){const t=r.classList.contains("is-shown"),n=r.getBoundingClientRect();t?(r.classList.remove("is-shown"),setTimeout((()=>{if(A){const e=document.querySelector(`#${A} ._refDropdownPortal`),t=document.querySelector("._refScrollContainer"),n=e.querySelector("._refDropdownWrapper");e&&(e.classList.remove("is-shown"),e.style.left="0px",e.style.top="0px",n&&t.removeEventListener("scroll",B,!0))}}),10)):(x(),r.classList.add("is-shown"),setTimeout((()=>{if(A){const e=document.querySelector(`#${A} ._refDropdownPortal`),t=document.querySelector("._refScrollContainer"),r=e.querySelector("._refDropdownWrapper");e&&(n&&(r?setTimeout((()=>{r.style.right="auto",e.style.left=n.left+n.width-r.getBoundingClientRect().width+"px",e.style.top=n.top+parseInt(p||"0")-32+"px",e.style.zIndex="8",t.addEventListener("scroll",B,!0)}),10):(e.style.left=n.left+(parseInt(l||"0")+n.width)/2+"px",e.style.top=n.top+n.height+"px")),e.classList.add("is-shown"))}}),10),h&&h(e))}}};e.useEffect((()=>(setTimeout((()=>{const e=document.querySelectorAll("._refDropdownPortal._refHover");for(let t of e)t&&t.addEventListener("mouseenter",(e=>{const t=e.target;t.classList.add("is-shown"),t.classList.add("unhiddenable")})),t&&t.addEventListener("mouseleave",(e=>{const t=e.target;t.classList.remove("is-shown"),t.classList.remove("unhiddenable"),t.style.left="0",t.style.top="0"}))}),1),()=>{const e=document.querySelectorAll("._refDropdownPortal._refHover");for(let t of e)t&&t.removeEventListener("mouseenter",(e=>{const t=e.target;t.classList.add("is-shown"),t.classList.add("unhiddenable")}),!0),t&&t.removeEventListener("mouseleave",(e=>{const t=e.target;t.classList.remove("is-shown"),t.classList.remove("unhiddenable"),t.style.left="0",t.style.top="0"}),!0)})),[A]);const F=i?m.jsx(pe,{children:i}):null,y=r?m.jsxs(de,{children:[r," ",F]}):null,w=n.filter((t=>e.isValidElement(t)?"control"===t.props["aria-label"]:null)),E=w&&e.isValidElement(w[0])?"hover"===f?m.jsxs(ce,{children:[m.jsx(le,Object.assign({className:"_refDropdownControl"},A&&{onMouseEnter:e=>{const t=v.current;if(t){const n=e.target.closest(`.${t.classList[0]}`);if(!n)return;const r=document.querySelectorAll("._refDropdownPortal");for(const e of r)e.classList.remove("is-shown"),e.style.left="0",e.style.top="0";const i=n.closest("._refContainer");if(i){const e=i.getBoundingClientRect(),t=document.querySelector(`#${A} ._refDropdownPortal`);if(t){if(e){t.style.left=e.left+(parseInt(l||"0")+e.width)/2+"px";let n=e.top+e.height;const r=t.querySelector("._refDropdownWrapper");r&&(r.style.display="block",n+r.clientHeight>=document.body.clientHeight&&(n=e.top-r.clientHeight-10)),t.style.top=n+"px"}t.classList.add("is-shown")}}}},onMouseLeave:e=>{const t=v.current;if(t){if(!e.target.closest(`.${t.classList[0]}`))return;setTimeout((()=>{const e=document.querySelector(`#${A} ._refDropdownPortal`);e&&!e.classList.contains("unhiddenable")&&(e.classList.remove("is-shown"),e.style.left="0",e.style.top="0")}),150)}}},{children:w[0].props.children})),m.jsx(le,{className:"_refDropdownControlMobile",ref:v,onClick:I,children:w[0].props.children})]}):m.jsx(le,{ref:v,onClick:I,children:w[0].props.children}):null,k=n.filter((t=>e.isValidElement(t)?"body"===t.props["aria-label"]:null)),D=k&&e.isValidElement(k[0])?m.jsx(he,{$area:c,children:k[0].props.children}):null,G=n.filter((t=>e.isValidElement(t)?"action"===t.props["aria-label"]:null)),S=G&&e.isValidElement(G[0])?m.jsx(ge,{$position:G[0].props["data-position"],className:G[0].props.className,children:G[0].props.children}):null,N=m.jsxs(ae,Object.assign({className:"_refDropdownWrapper"},l&&{$internalWidth:l},p&&{$top:p},u&&{$openPosition:u},d&&{$placement:d},b&&{$bottom:b},{children:[y,D,S]}));return m.jsxs(ue,Object.assign({className:"_refContainer "+(f?`_refContainer${f}`:"")},o&&{$externalWidth:o},a&&{$externalMinWidth:a},c&&{$area:c},p&&{$top:p},g&&{$alias:g},u&&{$openPosition:u},d&&{$placement:d},b&&{$bottom:b},C,{children:[E,m.jsx(se,{className:"_refDropdownOverlay",onClick:()=>{x()}}),A?m.jsx(oe,{wrapperId:A,children:m.jsx(fe,{className:"_refDropdownPortal "+("hover"===f?"_refHover":""),children:N})}):N]}))},exports.ErrorComponent=e=>{var{children:t,$mode:n}=e,r=s(e,["children","$mode"]);return m.jsxs($u,Object.assign({$mode:n,className:"_refErrorContainer"},r,{children:[m.jsx(ie,{$name:"alert",$width:"11px"}),t]}))},exports.FoContainer=Id,exports.FormContainer=gd,exports.HeaderContainer=vd,exports.IconComponent=ie,exports.ImageComponent=e=>{var{$mode:t}=e,n=s(e,["$mode"]);const{width:r,height:i}=n;return m.jsx(zi,Object.assign({$mode:t,width:r,height:i,onError:e=>{e.target.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEsASwDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAj/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCjwFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB//9k="}},n))},exports.InfoGroup=Fd,exports.InputComponent=M,exports.InputRefComponent=R,exports.LabelComponent=e=>{var{children:t,$mode:n,$position:r}=e,i=s(e,["children","$mode","$position"]);return m.jsx($,Object.assign({$mode:n,$position:r},i,{children:t}))},exports.LinkComponent=e=>{var{children:t,mode:n,$activated:r=!1,href:i,$elipsis:o=!1,$shadow:a=!1,disabled:l=!1}=e,c=s(e,["children","mode","$activated","href","$elipsis","$shadow","disabled"]);const{onClick:u}=c;return i?m.jsx(L,Object.assign({className:"_refLink",mode:n,$activated:r,$elipsis:o,$shadow:a,disabled:l,href:i},c,{children:t})):m.jsx(X,Object.assign({className:"_refLink",mode:n,$activated:r,$elipsis:o,$shadow:a,disabled:l,onClick:u},c,{children:t}))},exports.ListContainer=Ad,exports.LoadingComponent=te,exports.MessageComponent=({timer:t=500,$type:n,message:r,callback:i})=>{const[o,a]=be.useStateWithCallbackLazy(!1),[s,l]=be.useStateWithCallbackLazy(!1),[c,u]=be.useStateWithCallbackLazy(!1),d=e.useCallback((()=>{u(!c,(()=>{document.getElementsByTagName("BODY")[0].classList.remove("is-immuned"),i&&i()}))}),[i,u,c]),p=e.useCallback((()=>{d()}),[d]);return e.useEffect((()=>{const e=t||2e3,n=document.querySelector("._refMessageOverlay");return o||c?o&&c&&(a&&a(!o,(()=>{})),l&&l(!s,(()=>{})),n&&n.removeEventListener("click",p)):a(!o,(()=>{n&&n.addEventListener("click",p),setTimeout((()=>{l(!s,(()=>{setTimeout((()=>!s&&d()),e)}))}),1)})),()=>{n&&n.removeEventListener("click",p)}}),[o,s,t,d,a,l,p,c]),m.jsxs(xe,{$isOpen:o,children:[m.jsx(Ie,{className:"_refMessageOverlay"}),m.jsx(ye,{children:m.jsx(Fe,{$isOpen:s,children:m.jsxs(we,{$type:n,children:[m.jsx("i",{}),r,m.jsx(U,{$mode:"small-white-round-close",onClick:d})]})})})]})},exports.MessageQuestionComponent=({$type:t,title:n,subtitle:r,callback:i,buttonSubmit:o,cancelCallback:a})=>{const[s,l]=be.useStateWithCallbackLazy(!1),[c,u]=be.useStateWithCallbackLazy(!1),[d,p]=be.useStateWithCallbackLazy(!1),h=e.useCallback((()=>{p(!d,(()=>{a&&a();document.getElementsByTagName("BODY")[0].classList.remove("is-immuned")}))}),[a,d,p]),g=e.useCallback((()=>{h()}),[h]);return e.useEffect((()=>{const e=document.querySelector("._refQuestionMessageOverlay");s||d?s&&d&&(l(!s,(()=>{})),u(!c,(()=>{})),e&&e.removeEventListener("click",g)):l(!s,(()=>{setTimeout((()=>{u(!c,(()=>{})),e&&e.addEventListener("click",g)}),1)}))}),[s,c,l,u,g,d]),m.jsxs(xe,{$isOpen:s,children:[m.jsx(Ie,{className:"_refQuestionMessageOverlay",$type:t}),m.jsx(ye,{$type:t,children:m.jsx(Fe,{$isOpen:c,children:m.jsxs(we,{$type:t,children:[m.jsx("i",{}),m.jsxs("div",{children:[m.jsx(C,{$elipsis:!1,style:{fontWeight:600,fontSize:"15px"},children:n}),m.jsx(C,{$color:"grey",$elipsis:!1,children:Si(r)}),m.jsxs("aside",{children:[m.jsx(U,{$mode:"white",$size:"small",onClick:h,children:"Cancel"}),m.jsx(U,{$mode:"red",$size:"small",onClick:()=>{p(!d,(()=>{document.getElementsByTagName("BODY")[0].classList.remove("is-immuned"),i&&i()}))},children:o||"Confirm"})]})]})]})})})]})},exports.PanelContainer=md,exports.PanelWrapper=bd,exports.PopupComponent=t=>{var{children:n,body:r,mode:i,height:o,width:a,isOpen:l,evTooglePopup:c}=t,u=s(t,["children","body","mode","height","width","isOpen","evTooglePopup"]);const[d,p]=be.useStateWithCallbackLazy(!1),h=e.useRef(null),g=e.useCallback((e=>{ji=setTimeout((()=>{p(e,(()=>{const e=h&&h.current?h.current:null;e&&(e.scrollTop=0)})),clearTimeout(ji)}),1)}),[p]),f=e.useRef({init:()=>{g(l)}});e.useEffect((()=>{const{init:e}=f.current;return e(),()=>{clearTimeout(ji)}}),[]),e.useEffect((()=>{g(l)}),[l,g]);let A=[...n];const b=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"head"===t.props["aria-label"])))||null,C=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"sub-head"===t.props["aria-label"])))||null,v=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"body"===t.props["aria-label"])))||null,B=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"foot"===t.props["aria-label"])))||null,x=(null==A?void 0:A.filter((t=>e.isValidElement(t)&&"left-foot"===t.props["aria-label"])))||null,I=C.length?m.jsx("aside",{children:C[0]&&e.isValidElement(C[0])?C[0].props.children:null}):null,F=b.length&&b[0]&&e.isValidElement(b[0])?b[0].props["data-qa-id"]:"";return m.jsxs(Li,{$isOpen:l,children:[m.jsx(Xi,{}),m.jsx(Ti,Object.assign({ref:h},u["data-qa-id"]&&{"data-qa-id":u["data-qa-id"]},{children:"question"===i?m.jsx(Oi,{$isOpen:d,children:m.jsxs(Ri,{$width:a,children:[m.jsx(ie,{$name:"warning",$width:"30px"}),m.jsxs(Vi,{$mode:i,children:[b.length?m.jsx(Pi,{children:b[0]&&e.isValidElement(b[0])?b[0].props.children:null}):null,I,B.length?m.jsx(Mi,{children:B[0]&&e.isValidElement(B[0])?m.jsx("aside",{"data-type":B[0].props.type||"",children:B[0].props.children}):null}):null]})]})}):m.jsxs(m.Fragment,{children:[m.jsx(Vi,{$width:a,$isOpen:d,$mode:i,children:b.length?m.jsxs(m.Fragment,{children:[m.jsx(U,{$mode:"round-close",onClick:c}),m.jsx(Pi,{"data-qa-id":F,children:b[0]&&e.isValidElement(b[0])&&b[0].props.children})]}):null}),m.jsxs(Oi,{$width:a,$isOpen:d,$withHeader:!!b.length,children:[I,v.length?m.jsx(Wi,{$mode:r,$width:a,$height:o,children:v[0]&&e.isValidElement(v[0])&&v[0].props.children}):null,B.length?m.jsxs(Mi,{$isLeft:!!x.length,children:[m.jsx("aside",{children:x&&x.length&&x[0]&&e.isValidElement(x[0])?x[0].props.children:null}),B[0]&&e.isValidElement(B[0])?m.jsxs("aside",{"data-type":B[0].props.type||"",children:[i&&"info"===i?m.jsx(U,{$mode:"white",$size:"small",onClick:c,children:"Close"}):m.jsx(U,{$mode:"white",$size:"small",onClick:c,"data-qa-id":"popup-button-cancel",children:"Cancel"}),B[0].props.children]}):null]}):null]})]})}))]})},exports.ReactPortalComponent=oe,exports.SelectComponent=t=>{var{type:n,isError:r=!1,mode:i,customOption:o,customLabel:a,MenuList:l,isCreateable:c=!1,isClearable:u=!1,selectKey:d,disabled:p,defaultValue:h,width:g,reset:f,setReset:A,isForceUpdate:b,setForceUpdate:C,isCheckAutoCopy:v,evChangeCustom:B,isField:x,evCreate:I,evChange:F,isMinOption:y,isMulti:w=!1,options:E,name:k,placeholder:D,removeMessage:G,evCreateMessageQuestion:S}=t,N=s(t,["type","isError","mode","customOption","customLabel","MenuList","isCreateable","isClearable","selectKey","disabled","defaultValue","width","reset","setReset","isForceUpdate","setForceUpdate","isCheckAutoCopy","evChangeCustom","isField","evCreate","evChange","isMinOption","isMulti","options","name","placeholder","removeMessage","evCreateMessageQuestion"]);const[L,X]=e.useState(h||null);e.useEffect((()=>{if(f&&(X(null),A&&A(!1)),b){let e=h;if(v&&e){let t=!1;if(w){let n=e;if(Array.isArray(n)&&n.length){let e=[];for(const r of n){const n=null==E?void 0:E.filter((e=>e.label===r.label&&e.value===r.value));(null==n?void 0:n.length)&&Array.isArray(e)?e.push(r):!t&&(t=!0)}e.length&&(n=e)}}else{let n=e;if(n){const r=null==E?void 0:E.filter((e=>n&&e.label===n.label&&e.value===n.value));(null==r?void 0:r.length)&&(e=null,t=!0)}}t&&k&&B&&B(k,e)}X(e),C&&C(!1)}}),[h,B,v,b,w,k,E,f,C,A]);const T=()=>{const e=document.getElementsByClassName("_refContainer is-shown");if(e.length)for(let t=0;t<e.length;t++)e[t].classList.remove("is-shown")},O=(e,{action:t,removedValue:n,option:r})=>{if(w){const i=e,o=()=>{X(i),F&&F(i,{action:t,removedValue:n,option:r})};switch(t){case"remove-value":if(y&&"remove-value"===t&&Array.isArray(L)&&1===L.length)return!1;if(n.isFixed)return;break;case"pop-value":if(n.isFixed)return;break;case"clear":e=(null==E?void 0:E.filter((e=>e.isFixed)))||[]}if(G&&"remove-value"===t){const e=((e,t,n,r,i,o)=>({$type:e,title:t,subtitle:n,callback:r,buttonSubmit:i,cancelCallback:o}))("confirm",(null==G?void 0:G.title)||"",(null==G?void 0:G.subtitle)||"",o);return S&&S(e),!1}X(i),F&&F(i,{action:t,removedValue:n,option:r})}else{const o=e;X("paymentReceiveStore"===i?o?{value:o.value,label:o.label,channel:o.channel}:o:o?{value:o.value,label:o.label}:o),F&&F(o,{action:t,removedValue:n,option:r})}!w&&x&&B&&k&&B(k,e)},V=()=>{x&&B&&k&&L&&B(k,L)},P={container:e=>Object.assign(Object.assign({},e),{display:"inline-block",width:g?g+"px":"100%",minHeight:"1px",textAlign:"left",border:"none"}),control:(e,t)=>Object.assign(Object.assign({},e),{borderRadius:"filter"===i?"var(--sec-rd)":"var(--ter-rd)",minHeight:"picklist"===i?"30px":"1px",height:"orders"===i?"90px":"30px",maxHeight:"picklist"===i?"46px":"none",cursor:"pointer",borderWidth:"1px",boxShadow:t.isFocused&&"filter"===i?"var(--act-shd-bx)":"none",borderColor:t.isFocused&&"filter"!==i&&!r?"var(--pri-clr-ln__fc)":r?"var(--err-clr-ln)":"filter"===i?"var(--ter-clr-ln)":" var(--ck-clr-ln)",background:"filter"===i?"var(--ter-clr-ln)":"",overflow:"picklist"===i?"hidden":"orders"===i?"auto":"initial",alignItems:"orders"===i?"start":"center",padding:"orders"===i?"6px 0":"unset","&:hover":{borderColor:t.isFocused&&"filter"!==i&&!r?"var(--pri-clr-ln__fc)":r?"var(--err-clr-ln)":"filter"===i?"var(--ter-clr-ln)":" var(--ck-clr-ln)"},color:p?"#ADADAD":"initial",opacity:p?".7":1}),placeholder:e=>Object.assign(Object.assign({},e),{fontStyle:"italic"}),input:e=>Object.assign(Object.assign({},e),{minHeight:"1px",margin:"0 2px",padding:"0",input:{boxShadow:"none !important"}}),dropdownIndicator:e=>Object.assign(Object.assign({},e),{minHeight:"1px",paddingTop:"0",paddingBottom:"0",paddingLeft:"2px",paddingRight:"2px",color:"#757575",alignSelf:"orders"===i?"start":"unset"}),indicatorSeparator:e=>Object.assign(Object.assign({},e),{minHeight:"1px",height:"24px",display:"tag"===n?"block":"none"}),clearIndicator:e=>Object.assign(Object.assign({},e),{minHeight:"1px",marginRight:"-6px",padding:"0"}),valueContainer:e=>Object.assign(Object.assign({},e),{height:"30px",maxHeight:"picklist"===i?"46px":"none",minHeight:"picklist"===i?"30px":"1px",overflow:"picklist"===i?"auto":"initial",paddingTop:"0",paddingBottom:"0",paddingRight:"2px"}),singleValue:e=>Object.assign(Object.assign({},e),{minHeight:"1px",paddingBottom:"2px",color:p?"#ADADAD":"form"===i?"#2d3c48":"initial",opacity:p?".7":1}),option:(e,t)=>Object.assign(Object.assign({},e),{color:p||t.isSelected?"#ADADAD":t.isSelected?"#ffffff":"#000000",backgroundColor:p||t.isSelected?"transparent":t.isSelected||t.isFocused?"#fc5c64":"transparent",cursor:"pointer","&:hover":{backgroundColor:p||t.isSelected?"transparent":"#ec5b62",color:p||t.isSelected?"#ADADAD":"#ffffff"}}),menu:e=>Object.assign(Object.assign({},e),{borderRadius:"filter"===i?"var(--sec-rd)":"var(--ter-rd)"}),menuPortal:e=>Object.assign(Object.assign({},e),{zIndex:9999,letterSpacing:"normal",lineHeight:"normal"}),multiValue:(e,t)=>t.data.isFixed?Object.assign(Object.assign({},e),{backgroundColor:"gray"}):e,multiValueLabel:(e,t)=>t.data.isFixed?Object.assign(Object.assign({},e),{fontWeight:"bold",color:"white",paddingRight:6}):e,multiValueRemove:(e,t)=>Object.assign(Object.assign({},e),{display:t.data.isFixed?"none":"block",svg:{position:"relative",top:"2px"}})};let W=c?m.jsx(Ku,Object.assign({options:E,styles:P,onMenuOpen:T,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"auto",value:L,onChange:O,onCreateOption:e=>{A&&A(!1),w?Array.isArray(L)?X([...L,{value:e,label:e}]):X([{value:e,label:e}]):X({value:e,label:e}),I&&I(e)},isValidNewOption:(e,t)=>!(0===e.trim().length||t.find((t=>t.name===e))),noOptionsMessage:()=>null,isClearable:u?!Array.isArray(L)||!L.length||L.some((e=>!e.isFixed)):u},w&&{isMulti:!0},o&&{components:{Option:o}},l&&{components:{MenuList:l,Option:o}},d&&{key:d},p&&{isDisabled:p},w&&{closeMenuOnSelect:!1},w&&{onBlur:V},D&&{placeholder:D},N)):m.jsx(Zu,Object.assign({options:E,styles:P,onMenuOpen:T,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"auto",value:L,onChange:O,noOptionsMessage:()=>null,isClearable:u?!Array.isArray(L)||!L.length||L.some((e=>!e.isFixed)):u},w&&{isMulti:!0},o&&{components:{Option:o}},"paymentReceiveStore"===i&&{components:{Option:o,SingleValue:a}},l&&{components:{MenuList:l,Option:o}},d&&{key:d},p&&{isDisabled:p},w&&{closeMenuOnSelect:!1},w&&{onBlur:V},D&&{placeholder:D},N));return m.jsx("section",Object.assign({className:"_refContainer"},N,{children:W}))},exports.SingleFormContainer=fd,exports.TabsContainer=Bd,exports.TabsContent=xd,exports.TextComponent=C,exports.Title=Cd,exports.UploadComponent=e=>{var{children:t,mode:n}=e,r=s(e,["children","mode"]);const{id:i,width:o}=r;return"image"===n?m.jsxs(m.Fragment,{children:[t,m.jsx(od,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]}):m.jsxs(td,{$width:o,children:[m.jsxs(nd,{htmlFor:i,children:[m.jsx(id,{}),m.jsx(rd,{children:t})]}),m.jsx(od,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]})},exports.UploadDragDropComponent=t=>{var{children:n,id:r,name:i,evChange:o,evCreateMessage:a}=t,l=s(t,["children","id","name","evChange","evCreateMessage"]);const{accept:c}=l,[u,d]=e.useState(!1),p=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?d(!0):"dragleave"===e.type&&d(!1)};return m.jsxs(ad,{onDragEnter:p,className:u?"drag-active":"",children:[m.jsx(od,Object.assign({id:r,name:i,onChange:e=>{e.preventDefault();const t=e.target;t.files&&t.files[0]&&o&&o(t.files)}},l)),m.jsx(sd,{id:"label-file-dragdrop-upload",htmlFor:r,children:m.jsx(cd,{children:n?m.jsxs(dd,{children:[m.jsx(pd,{}),m.jsx("span",{children:n})]}):m.jsxs(ud,{children:["Drag & Drop file here to upload, or ",m.jsx("span",{children:"browse"}),"."]})})}),u&&m.jsx(ld,{onDragEnter:p,onDragLeave:p,onDragOver:p,onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),d(!1),e.dataTransfer.files[0]){const t=c?c.split(",").map((e=>e.trim().replace(".",""))):null;for(let n=0;n<e.dataTransfer.files.length;n++){const r=e.dataTransfer.files[n].name.split(".").pop();if((null==t?void 0:t.length)&&r&&!t.includes(r)){const e={$type:"failed",message:"File type is not allowed. Please check again",timer:2e3};return a&&a(e),!1}}o&&o(e.dataTransfer.files)}}})]})},exports.boxBase=y,exports.clearList=v,exports.dropBase=w,exports.elipsis=x,exports.formLabel=k,exports.headTable=E,exports.multiElipsis=I,exports.responseWidth=B,exports.thirdElipsis=F;
929
929
  //# sourceMappingURL=index.js.map