1import{a as m}from"/build/_shared/chunk-I5UT2UAU.js";import{a as b}from"/build/_shared/chunk-UXJUA2QE.js";import{a as L,b as N}from"/build/_shared/chunk-X7KDVMAY.js";import{a as y}from"/build/_shared/chunk-5OBEDPFR.js";import{a as _}from"/build/_shared/chunk-H6S7FWVP.js";import{d as f}from"/build/_shared/chunk-T36URGAI.js";var i=f(_());var E={width:24,height:24,paths:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.2956 6.73256C7.97562 5.72592 9.92232 4.978 12.0001 4.978C16.7216 4.978 20.7663 8.84013 22.5432 10.8239C22.8238 11.1464 22.9791 11.5655 22.9791 12.0001C22.9791 12.4346 22.8238 12.8537 22.5432 13.1763C21.5637 14.2697 19.8951 15.934 17.8041 17.2075M14.5385 18.6626C13.7222 18.8903 12.8727 19.0221 12.0001 19.0221C7.27854 19.0221 3.23393 15.16 1.457 13.1763C1.17635 12.8537 1.021 12.4346 1.021 12.0001C1.021 11.5655 1.17635 11.1464 1.457 10.8239C2.01998 10.1954 2.8106 9.3783 3.77826 8.55526" stroke="black" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.3932 14.2068C15.715 12.9881 15.715 11.012 14.3932 9.79326C13.0715 8.57449 10.9285 8.57449 9.60669 9.79326" stroke="black" stroke-linecap="round" stroke-linejoin="round"/><path d="M23 22.1429L1 1.85718" stroke="black" stroke-linecap="round" stroke-linejoin="round"/></svg>'};var H={width:24,height:24,paths:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.5634 10.8276C22.8445 11.1491 23.0001 11.5669 23.0001 12.0001C23.0001 12.4332 22.8445 12.851 22.5634 13.1726C20.783 15.1501 16.7307 19.0001 12.0001 19.0001C7.26959 19.0001 3.21727 15.1501 1.43696 13.1726C1.15577 12.851 1.00012 12.4332 1.00012 12.0001C1.00012 11.5669 1.15577 11.1491 1.43696 10.8276C3.21727 8.85007 7.26959 5.00006 12.0001 5.00006C16.7307 5.00006 20.783 8.85007 22.5634 10.8276Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.0001 15.1109C13.8729 15.1109 15.3911 13.7181 15.3911 11.9999C15.3911 10.2817 13.8729 8.88879 12.0001 8.88879C10.1272 8.88879 8.60901 10.2817 8.60901 11.9999C8.60901 13.7181 10.1272 15.1109 12.0001 15.1109Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/></svg>'};var e=f(y()),Q=({className:R="",label:p,labelClassName:D,containerClassName:j,errors:c,error:s,inputRef:w,inputClassName:h,dataTestId:k,hyphenatedInput:C,readOnlyValue:o,errorTextClass:d,errorOnlyBorder:g=!1,translator:A,...t})=>{let v=(0,i.useContext)(N),Z=A||(v?n=>L(v.translations,n):n=>n),[a,x]=(0,i.useState)(t.type),[r,u]=(0,i.useState)(t.value);(0,i.useEffect)(()=>{u(t.value)},[t.value]);let l=t.name?c==null?void 0:c.find(n=>n.path.includes(t.name)):void 0;if((0,i.useEffect)(()=>{var n;C&&u((n=r==null?void 0:r.toString())==null?void 0:n.replace(/-/g,"").replace(/(\w{4})(\w{4})(\w{4})(\w{4})/,"$1-$2-$3-$4").replace(/(\w{4})(\w{4})(\w{4})(\w+)/,"$1-$2-$3-$4").replace(/(\w{4})(\w{4})(\w+)/,"$1-$2-$3").replace(/(\w{4})(\w+)/,"$1-$2"))},[r,C]),a==="hidden")return(0,e.jsx)("input",{className:"p-1 w-full",...t,type:a});let $=n=>{var M,T;let I=n.target.value;u(I),I.trim()===""&&g?(M=t.onChange)==null||M.call(t,{...n,target:{...n.target,value:""}}):(T=t.onChange)==null||T.call(t,n)};return(0,e.jsxs)("div",{className:`${j} flex flex-col gap-2`,children:[p&&(0,e.jsx)("label",{className:D,children:p}),(0,e.jsxs)("div",{className:`flex flex-col gap-2 relative ${R}`,children:[t.type==="password"&&(0,e.jsx)("div",{className:"absolute right-4 top-3.5",children:a==="password"?(0,e.jsx)("button",{type:"button",onClick:()=>x("text"),children:(0,e.jsx)(m,{icon:H})}):(0,e.jsx)("button",{type:"button",onClick:()=>x("password"),children:(0,e.jsx)(m,{icon:E})})}),a==="textArea"?(0,e.jsx)("textarea",{ref:w,className:`px-4 text-input py-2 w-full font-light placeholder-grey-4 rounded focus:outline-none ${g?"border border-dark-red":l||s?"border border-dark-red focus:border-dark-red":"border border-grey-3 focus:border-black"} ${o?"bg-grey-1 text-grey-4":"bg-site-background"} ${h||""}`,"data-test-id":`${k}`,...t,type:a,value:o!=null?o:r,onChange:o?void 0:$,disabled:!!o}):(0,e.jsx)("input",{ref:w,className:`px-4 text-input py-2 h-[50px] w-full font-light placeholder-grey-4 roun
1ded focus:outline-none ${g?"border border-dark-red":l||s?"border border-dark-red focus:border-dark-red":"border border-grey-3 focus:border-black"} ${o?"bg-grey-1 text-grey-4":"bg-site-background"} ${h||""}`,"data-test-id":`${k}`,...t,type:a,value:o!=null?o:r,onChange:o?void 0:$,disabled:!!o}),l&&(0,e.jsx)("div",{"data-test-id":"validation-error",children:(0,e.jsx)(b,{className:`text-dark-red ${d||""}`,children:Z(l.message)})}),s&&(0,e.jsx)("div",{"data-test-id":"validation-error",children:(0,e.jsx)(b,{className:`text-dark-red ${d||""}`,children:s})})]})]})};export{Q as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.