1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="bd62cff8-8dbf-2c83-d559-45c8c56b5e8c")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,83760,70067,e=>{"use strict";let t,r;var a,s,i,n,o,l=e.i(91398),c=e.i(91788),u=e.i(82725),d=e.i(26019),h=e.i(94638),m=e.i(17563),f=e.i(74266),p=e.i(17803),g=e.i(5224),y=e.i(41129),x=e.i(64056),w=e.i(56119),v=e.i(41158),C=e.i(58021),E=e.i(45704);e.i(23400);var N=e.i(38320);e.i(704);var b=e.i(29305),j=e.i(25448);let M=({onSubmit:e,loading:t,isDisable:r})=>{let{register:a,handleSubmit:s,formState:{errors:i}}=(0,C.useForm)({resolver:(0,E.yupResolver)(N.LoginSchema)});return(0,l.jsx)("div",{children:(0,l.jsxs)("form",{className:"flex flex-col gap-3 max-w-96 min-w-fit max-sm:min-w-0 max-sm:w-[20.438rem] sm:w-[45%]",onSubmit:s(t=>{e({email:j.default.sanitize(t.email),password:j.default.sanitize(t.password)})}),children:[(0,l.jsx)(x.TextField,{label:"Email Address",...a("email"),variant:"outlined",autoComplete:"off",placeholder:"Email Address",error:!!i.email,helperText:i.email?.message,fullWidth:!0,InputProps:{className:"rounded-[0.625rem] border-icon-darkgray "},InputLabelProps:{className:"text-secondary-main"}}),(0,l.jsx)(b.PasswordField,{id:"login-password",label:"Password",placeholder:"Password",validation:a("password"),error:!!i.password,helperText:i.password?.message,InputLabelProps:{className:"text-secondary-main"}}),(0,l.jsx)(m.Box,{className:`sm:w-[25rem] z-10 flex justify-end ${i.password?"mt-0 sm:-mt-9":"-mt-3"}`,children:(0,l.jsx)(v.default,{className:"text-x text-right sm:pr-5 text-icon-darkGray font-semibold ","data-testid":"automation-IRHQ_SignIn-ForgotPassword",href:"/forgot-password",children:(0,l.jsx)(w.Typography,{variant:"subtitle2",color:"text.secondary",className:"!normal-case text-[0.813rem]",children:"Forgot password?"})})}),(0,l.jsx)(h.default,{fullwidth:!0,loading:t,text:"Sign in",type:"submit",disabled:r,onClick:()=>{},extraClass:"!normal-case"})]})})};e.s(["default",0,M],70067);var _=e.i(3828),R=e.i(2606),S=e.i(77001),A=e.i(9382),P=e.i(46858),I=e.i(54909);let T=({handleBack:e,blockedUserData:t,loading:r})=>{let[a,s]=(0,c.useState)(!1),{openToast:i}=(0,P.useStore)(),n=async()=>{s(!0);try{let e=await (0,S.default)({path:"access-restriction-notify",method:"post",data:{email:t?.email}});e?.status&&i(e?.msg??"Your request has been sent to the administrator","success")}catch(e){i(e.response?.data?.msg??"something went wrong!","error")}s(!1)};return(0,l.jsxs)("div",{children:[(0,l.jsx)(w.Typography,{variant:"h1",className:"pb-8 pt-16 text-center",children:"Access restricted"}),(0,l.jsx)(w.Typography,{children:"Weâre sorry, but it looks like access to your account"}),(0,l.jsxs)(w.Typography,{children:[t?.email||""," has been temporarily restricted."]}),(0,l.jsx)(w.Typography,{className:"my-4 mb-8",children:"To resolve this issue, please contact an administrator."}),(0,l.jsx)(h.default,{loading:r||a,fullwidth:!0,text:"Contact administrator",type:"submit",onClick:n,extraClass:"!normal-case"}),(0,l.jsx)(m.Box,{className:"flex gap-2 w-full pt-6 justify-center sm:justify-start relative items-center",children:(0,l.jsxs)(m.Box,{onClick:()=>e(null),className:"flex items-center cursor-pointer",children:[(0,l.jsx)(I.NewArrowIcon,{className:"fill-primary-main"}),(0,l.jsx)(w.Typography,{variant:"buttonLink",color:"primary.main",children:"Back to Sign In page"})]})})]})};var k=e.i(41011);let L=({onComplete:e,onChange:t,disabled:r=!1,error:a=!1,autoFocus:s=!0})=>{let[i,n]=(0,c.useState)(Array(6).fill("")),o=(0,c.useRef)([]),u=(0,c.useRef)(!1);(0,c.useEffect)(()=>{s&&!r&&o.current[0]?.focus()},[s,r]);let d=r=>{n(r);let a=r.join("");t?.(a),6!==a.length||r.includes("")?u.current=!1:u.current||(u.current=!0,e(a))},h=e=>{let t=o.current[Math.max(0,Math.min(5,e))];t?.focus(),t?.select()};return(0,l.jsx)("div",{className:"flex gap-2 sm:gap-3 justify-center","data-testid":"automation-IRHQ_TwoFactor-Code",children:i.map((e,t)=>(0,l.jsx)(x.TextField,{value:e,disabled:r,error:a,autoComplete:0===t?"one-time-code":"off",inputProps:{"aria-label":`Digit ${t+1}`,inputMode:"numeric",maxLength:1,className:"text-center text-l font-semibold px-0 py-3"},inputRef:e=>{o.current[t]=e},onChange:e=>((e,t)=>{let r=t.replace(/\D/g,"");if(!r){if(""!==t)return;let r=[...i];r[e]="",d(r);return}let a=[...i];r.split("").forEach((t,r)=>{e+r<6&&(a[e+r]=t)}),d(a),h(e+r.length)})(t,e.target.value),onKeyDown:e=>((e,t)=>{if("Backspace"===t.key){t.preventDefault();let r=[...i];r[e]?(r[e]="",d(r)):e>0&&(r[e-1]="",d(r),h(e-1));return}"ArrowLeft"===t.key&&(t.preventDefault(),h(e-1)),"ArrowRight"===t.key&&(t.preventDefault(),h(e+1))})(t,e),onPaste:e=>((e,t)=>{let r=t.clipboardData.getData("text").replace(/\D/g,"");if(!r)return;t.preventDefault();let a=[...i];r.slice(0,6-e).split("").forEach((t,r)=>{a[e+r]=t}),d(a),h(e+r.length)})(t,e),onFocus:e=>e.target.select(),className:"w-[2.75rem] sm:w-[3.25rem]",InputProps:{className:"rounded-[0.625rem]"}},t))})},O=({onVerify:e,onBack:t,loading:r=!1,title:a="Two-factor authentication",subtitle:s="Enter the 6-digit code from your authenticator app.",emailHint:i,expiresIn:n,backText:o="Back to sign in"})=>{let u,d,[m,f]=(0,c.useState)(()=>n?Math.max(0,n-10):0),[p,g]=(0,c.useState)("");(0,c.useEffect)(()=>
vendor: 13,790 bytes, line 2
2{if(!n)return;let e=setInterval(()=>{f(e=>e<=1?0:e-1)},1e3);return()=>clearInterval(e)},[n]);let y=!!n&&m<=0;return(0,l.jsxs)("div",{className:"flex flex-col items-center max-w-[26.5rem]",children:[(0,l.jsx)(w.Typography,{variant:"h5",className:"text-center",children:a}),(0,l.jsx)(w.Typography,{variant:"body2",color:"text.secondary",className:"text-center pt-2",children:s}),i&&(0,l.jsx)(w.Typography,{variant:"subtitle2",className:"text-center pt-1",children:i}),(0,l.jsx)("div",{className:"pt-8 w-full",children:(0,l.jsx)(L,{disabled:y||r,onChange:g,onComplete:t=>{y||e(t)}})}),!!n&&(0,l.jsx)(w.Typography,{variant:"body2",color:y?"error.main":"text.secondary",className:"pt-4 text-center",children:y?"Code entry timed out â sign in again":`Code expires in ${d=Math.floor((u=Math.max(0,m))/60),`${d}:${String(u%60).padStart(2,"0")}`}`}),(0,l.jsx)(h.default,{divClass:"mt-6 w-full",text:"Verify",type:"button",fullwidth:!0,loading:r,disabled:y||6!==p.length,onClick:()=>e(p)}),(0,l.jsx)(w.Typography,{component:"button",type:"button",variant:"body2",color:"primary.main",className:"cursor-pointer pt-6 font-semibold bg-transparent border-0",onClick:t,children:o})]})};var D=Object.defineProperty,F=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U=(e,t)=>{for(var r in t||(t={}))B.call(t,r)&&H(e,r,t[r]);if(F)for(var r of F(t))z.call(t,r)&&H(e,r,t[r]);return e},$=(e,t)=>{var r={};for(var a in e)B.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&F)for(var a of F(e))0>t.indexOf(a)&&z.call(e,a)&&(r[a]=e[a]);return r};(e=>{let t=class t{constructor(e,r,a,i){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version value out of range");if(i<-1||i>7)throw RangeError("Mask value out of range");this.size=4*e+17;let n=[];for(let e=0;e<this.size;e++)n.push(!1);for(let e=0;e<this.size;e++)this.modules.push(n.slice()),this.isFunction.push(n.slice());this.drawFunctionPatterns();const o=this.addEccAndInterleave(a);if(this.drawCodewords(o),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(i=t,e=r),this.applyMask(t)}}s(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(r,a){let s=e.QrSegment.makeSegments(r);return t.encodeSegments(s,a)}static encodeBinary(r,a){let s=e.QrSegment.makeBytes(r);return t.encodeSegments([s],a)}static encodeSegments(e,a,i=1,o=40,l=-1,c=!0){let u,d;if(!(t.MIN_VERSION<=i&&i<=o&&o<=t.MAX_VERSION)||l<-1||l>7)throw RangeError("Invalid value");for(u=i;;u++){let r=8*t.getNumDataCodewords(u,a),s=n.getTotalBits(e,u);if(s<=r){d=s;break}if(u>=o)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,e)&&(a=e);let h=[];for(let t of e)for(let e of(r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h),t.getData()))h.push(e);s(h.length==d);let m=8*t.getNumDataCodewords(u,a);s(h.length<=m),r(0,Math.min(4,m-h.length),h),r(0,(8-h.length%8)%8,h),s(h.length%8==0);for(let e=236;h.length<m;e^=253)r(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach((e,t)=>f[t>>>3]|=e<<7-(7&t)),new t(u,a,f,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let a=0;a<t;a++)(0!=r||0!=a)&&(0!=r||a!=t-1)&&(r!=t-1||0!=a)&&this.drawAlignmentPattern(e[r],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,r=t;for(let e=0;e<10;e++)r=r<<1^(r>>>9)*1335;let i=(t<<10|r)^21522;s(i>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,a(i,e));this.setFunctionModule(8,7,a(i,6)),this.setFunctionModule(8,8,a(i,7)),this.setFunctionModule(7,8,a(i,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,a(i,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,a(i,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,a(i,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;s(t>>>18==0);for(let e=0;e<18;e++){let r=a(t,e),s=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(s,i,r),this.setFunctionModule(i,s,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let s=Math.max(Math.abs(a),Math.abs(r)),i=e+a,n=t+r;0<=i&&i<this.size&&0<=n&&n<this.size&&this.setFunctionModule(i,n,2!=s&&4!=s)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,t+r,1!=Math.max(Math.abs(a),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){let r=this.version,a=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,a))throw RangeError("Invalid argument");let i=t.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][r],n=t.ECC_CODEWORDS_PER_BLOCK[a.ordinal][r],o=Math.floor(t.getNumRawDataModules(r)/8),l=i-o%i,c=Math.floor(o/i),u=[],d=t.reedSolomonComputeDivisor(n);for(let r=0,a=0;r<i;r++){let s=e.slice(a,a+c-n+(r<l?0:1));a+=s.length;let i=t.reedSolomonComputeRemainder(s,d);r<l&&s.push(0),u.push(s.concat(i))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach((t,r)=>{(e!=c-n||r>=l)&&h.push(t[e])});return s(h.length==o),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let s=0;s<this.size;s++)for(let i=0;i<2;i++){let n=t-i,o=(t+1&2)==0?this.size-1-s:s;!this.isFunction[o][n]&&r<8*e.length&&(this.modules[o][n]=a(e[r>>>3],7-(7&r)),r++)}}s(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let a;switch(e){case 0:a=(r+t)%2==0;break;case 1:a=t%2==0;break;case 2:a=r%3==0;break;case 3:a=(r+t)%3==0;break;case 4:a=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:a=r*t%2+r*t%3==0;break;case 6:a=(r*t%2+r*t%3)%2==0;break;case 7:a=((r+t)%2+r*t%3)%2==0;break;default:throw Error("Unreachable")}!this.isFunction[t][r]&&a&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let a=!1,s=0,i=[0,0,0,0,0,0,0];for(let n=0;n<this.size;n++)this.modules[r][n]==a?5==++s?e+=t.PENALTY_N1:s>5&&e++:(this.finderPenaltyAddHistory(s,i),a||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),a=this.modules[r][n],s=1);e+=this.finderPenaltyTerminateAndCount(a,s,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let a=!1,s=0,i=[0,0,0,0,0,0,0];for(let n=0;n<this.size;n++)this.modules[n][r]==a?5==++s?e+=t.PENALTY_N1:s>5&&e++:(this.finderPenaltyAddHistory(s,i),a||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),a=this.modules[n][r],s=1);e+=this.finderPenaltyTerminateAndCount(a,s,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let a=0;a<this.size-1;a++){let s=this.modules[r][a];s==this.modules[r][a+1]&&s==this.modules[r+1][a]&&s==this.modules[r+1][a+1]&&(e+=t.PENALTY_N2)}let r=0;for(let e of this.modules)r=e.reduce((e,t)=>e+ +!!t,r);let a=this.size*this.size,i=Math.ceil(Math.abs(20*r-10*a)/a)-1;return s(0<=i&&i<=9),s(0<=(e+=i*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let a=this.size-7;r.length<e;a-=t)r.splice(1,0,a);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return s(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let a=1;for(let s=0;s<e;s++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],a),e+1<r.length&&(r[e]^=r[e+1]);a=t.reedSolomonMultiply(a,2)}return r}static reedSolomonComputeRemainder(e,r){let a=r.map(e=>0);for(let s of e){let e=s^a.shift();a.push(0),r.forEach((r,s)=>a[s]^=t.reedSolomonMultiply(r,e))}return a}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let a=7;a>=0;a--)r=r<<1^(r>>>7)*285^(t>>>a&1)*e;return s(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];s(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let a=t-1;a>=0;a--)r.push(e>>>a&1)}function a(e,t){return(e>>>t&1)!=0}function s(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;let i=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let a=[];for(let e of t)r(e,8,a);return new e(e.Mode.BYTE,t.length,a)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError("String contains non-numeric characters");let a=[];for(let e=0;e<t.length;){let s=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+s),10),3*s+1,a),e+=s}return new e(e.Mode.NUMERIC,t.length,a)}static makeAlphanumeric(t){let a;if(!e.isAlphanumeric(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let s=[];for(a=0;a+2<=t.length;a+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(a));r(i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(a+1)),11,s)}return a<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(a)),6,s),new e(e.Mode.ALPHANUMERIC,t.length,s)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let a=[];if(t<0)throw RangeError("ECI assignment value out of range");if(t<128)r(t,8,a);else if(t<16384)r(2,2,a),r(t,14,a);else if(t<1e6)r(6,3,a),r(t,21,a);else throw RangeError("ECI assignment value out of range");return new e(e.Mode.ECI,0,a)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(let a of e){let e=a.mode.numCharCountBits(t);if(a.numChars>=1<<e)return 1/0;r+=4+e+a.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let n=i;e.QrSegment=i})(o||(o={})),s=(a=o||(o={})).QrCode||(a.QrCode={}),(t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}}).LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),s.Ecc=t,n=(i=o||(o={})).QrSegment||(i.QrSegment={}),(r=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}}).NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),n.Mode=r;var Q=o,V={L:Q.QrCode.Ecc.LOW,M:Q.QrCode.Ecc.MEDIUM,Q:Q.QrCode.Ecc.QUARTILE,H:Q.QrCode.Ecc.HIGH},Y="#FFFFFF",G="#000000";function W(e,t=0){let r=[];return e.forEach(function(e,a){let s=null;e.forEach(function(i,n){if(!i&&null!==s){r.push(`M${s+t} ${a+t}h${n-s}v1H${s+t}z`),s=null;return}if(n===e.length-1){if(!i)return;null===s?r.push(`M${n+t},${a+t} h1v1H${n+t}z`):r.push(`M${s+t},${a+t} h${n+1-s}v1H${s+t}z`);return}i&&null===s&&(s=n)})}),r.join("")}function K(e,t){return e.slice().map((e,r)=>r<t.y||r>=t.y+t.h?e:e.map((e,r)=>(r<t.x||r>=t.x+t.w)&&e))}function X({value:e,level:t,minVersion:r,includeMargin:a,marginSize:s,imageSettings:i,size:n,boostLevel:o}){let l=c.default.useMemo(()=>{let a=(Array.isArray(e)?e:[e]).reduce((e,t)=>
2(e.push(...Q.QrSegment.makeSegments(t)),e),[]);return Q.QrCode.encodeSegments(a,V[t],r,void 0,void 0,o)},[e,t,r,o]),{cells:u,margin:d,numCells:h,calculatedImageSettings:m}=c.default.useMemo(()=>{let e=l.getModules(),t=null!=s?Math.max(Math.floor(s),0):4*!!a,r=e.length+2*t,o=function(e,t,r,a){if(null==a)return null;let s=e.length+2*r,i=Math.floor(.1*t),n=s/t,o=(a.width||i)*n,l=(a.height||i)*n,c=null==a.x?e.length/2-o/2:a.x*n,u=null==a.y?e.length/2-l/2:a.y*n,d=null==a.opacity?1:a.opacity,h=null;if(a.excavate){let e=Math.floor(c),t=Math.floor(u),r=Math.ceil(o+c-e),a=Math.ceil(l+u-t);h={x:e,y:t,w:r,h:a}}return{x:c,y:u,h:l,w:o,excavation:h,opacity:d,crossOrigin:a.crossOrigin}}(e,n,t,i);return{cells:e,margin:t,numCells:r,calculatedImageSettings:o}},[l,n,i,a,s]);return{qrcode:l,margin:d,cells:u,numCells:h,calculatedImageSettings:m}}var q=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}();c.default.forwardRef(function(e,t){let{value:r,size:a=128,level:s="L",bgColor:i=Y,fgColor:n=G,includeMargin:o=!1,minVersion:l=1,boostLevel:u,marginSize:d,imageSettings:h}=e,m=$(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:f}=m,p=$(m,["style"]),g=null==h?void 0:h.src,y=c.default.useRef(null),x=c.default.useRef(null),w=c.default.useCallback(e=>{y.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]),[v,C]=c.default.useState(!1),{margin:E,cells:N,numCells:b,calculatedImageSettings:j}=X({value:r,level:s,minVersion:l,boostLevel:u,includeMargin:o,marginSize:d,imageSettings:h,size:a});c.default.useEffect(()=>{if(null!=y.current){let e=y.current,t=e.getContext("2d");if(!t)return;let r=N,s=x.current,o=null!=j&&null!==s&&s.complete&&0!==s.naturalHeight&&0!==s.naturalWidth;o&&null!=j.excavation&&(r=K(N,j.excavation));let l=window.devicePixelRatio||1;e.height=e.width=a*l;let c=a/b*l;t.scale(c,c),t.fillStyle=i,t.fillRect(0,0,b,b),t.fillStyle=n,q?t.fill(new Path2D(W(r,E))):N.forEach(function(e,r){e.forEach(function(e,a){e&&t.fillRect(a+E,r+E,1,1)})}),j&&(t.globalAlpha=j.opacity),o&&t.drawImage(s,j.x+E,j.y+E,j.w,j.h)}}),c.default.useEffect(()=>{C(!1)},[g]);let M=U({height:a,width:a},f),_=null;return null!=g&&(_=c.default.createElement("img",{src:g,key:g,style:{display:"none"},onLoad:()=>{C(!0)},ref:x,crossOrigin:null==j?void 0:j.crossOrigin})),c.default.createElement(c.default.Fragment,null,c.default.createElement("canvas",U({style:M,height:a,width:a,ref:w,role:"img"},p)),_)}).displayName="QRCodeCanvas";var J=c.default.forwardRef(function(e,t){let{value:r,size:a=128,level:s="L",bgColor:i=Y,fgColor:n=G,includeMargin:o=!1,minVersion:l=1,boostLevel:u,title:d,marginSize:h,imageSettings:m}=e,f=$(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:p,cells:g,numCells:y,calculatedImageSettings:x}=X({value:r,level:s,minVersion:l,boostLevel:u,includeMargin:o,marginSize:h,imageSettings:m,size:a}),w=g,v=null;null!=m&&null!=x&&(null!=x.excavation&&(w=K(g,x.excavation)),v=c.default.createElement("image",{href:m.src,height:x.h,width:x.w,x:x.x+p,y:x.y+p,preserveAspectRatio:"none",opacity:x.opacity,crossOrigin:x.crossOrigin}));let C=W(w,p);return c.default.createElement("svg",U({height:a,width:a,viewBox:`0 0 ${y} ${y}`,ref:t,role:"img"},f),!!d&&c.default.createElement("title",null,d),c.default.createElement("path",{fill:i,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),c.default.createElement("path",{fill:n,d:C,shapeRendering:"crispEdges"}),v)});J.displayName="QRCodeSVG";let Z=({mode:e,setupToken:t,onComplete:r,onCancel:a,compact:s=!1})=>{let[i,n]=(0,c.useState)("intro"),[o,u]=(0,c.useState)(null),[d,m]=(0,c.useState)(!1),[p,g]=(0,c.useState)(!1),{openToast:y}=(0,P.useStore)(),x="login"===e&&t?{Authorization:`Bearer ${t}`}:void 0,v=async()=>{m(!0);try{let t=await (0,S.default)({path:"login"===e?"login/two-factor/setup":"profile/two-factor/setup",method:"post",headers:x});t?.status&&t?.data?.otpauth_uri?(u(t.data),n("qr")):y(t?.msg||"Could not start two-factor setup","error")}catch(e){y(e?.response?.data?.msg||"Could not start two-factor setup","error")}finally{m(!1)}},C=async t=>{m(!0);try{let a=await (0,S.default)({path:"login"===e?"login/two-factor/setup/confirm":"profile/two-factor/confirm",method:"post",headers:x,data:{code:t}});a?.status?r(a):y(a?.msg||"Invalid verification code. Please try again.","error")}catch(e){y(e?.response?.data?.msg||"Invalid verification code. Please try again.","error")}finally{m(!1)}},E=async()=>
2{if(o?.secret)try{await navigator.clipboard.writeText(o.secret),g(!0),setTimeout(()=>g(!1),2e3)}catch{y("Could not copy the key","error")}};return"confirm"===i?(0,l.jsx)(O,{title:"Confirm your authenticator app",subtitle:"Enter the 6-digit code your app is showing now.",loading:d,onVerify:C,onBack:()=>n("qr"),backText:"Back"}):"qr"===i&&o?(0,l.jsxs)("div",{className:"flex flex-col items-center max-w-[26.5rem]",children:[(0,l.jsx)(w.Typography,{variant:"h5",className:"text-center",children:"Scan this code"}),(0,l.jsx)(w.Typography,{variant:"body2",color:"text.secondary",className:"text-center pt-2",children:"Open your authenticator app and scan the QR code below."}),(0,l.jsx)("div",{className:"mt-6 p-3 bg-white rounded-[0.625rem] border border-[#E0E0E0]",children:(0,l.jsx)(J,{value:o.otpauth_uri,size:s?160:190})}),(0,l.jsx)(w.Typography,{variant:"body2",color:"text.secondary",className:"pt-6 text-center",children:"Canât scan? Enter this key manually:"}),(0,l.jsx)(w.Typography,{variant:"subtitle2",className:"pt-1 text-center tracking-[0.15em] break-all","data-testid":"automation-IRHQ_TwoFactor-Secret",children:(o.secret||"").replace(/\s+/g,"").replace(/(.{4})/g,"$1 ").trim()}),(0,l.jsx)(w.Typography,{component:"button",type:"button",variant:"body2",color:"primary.main",className:"cursor-pointer pt-1 font-semibold bg-transparent border-0",onClick:E,children:p?"Copied":"Copy key"}),(0,l.jsx)(h.default,{divClass:"mt-8 w-full",text:"Next",fullwidth:!0,onClick:()=>n("confirm")}),a&&(0,l.jsx)(w.Typography,{component:"button",type:"button",variant:"body2",color:"primary.main",className:"cursor-pointer pt-6 font-semibold bg-transparent border-0",onClick:a,children:"Back to sign in"})]}):(0,l.jsxs)("div",{className:"flex flex-col items-center max-w-[26.5rem]",children:[(0,l.jsx)(w.Typography,{variant:"h5",className:"text-center",children:"Set up two-factor authentication"}),(0,l.jsx)(w.Typography,{variant:"body2",color:"text.secondary",className:"text-center pt-2",children:"Your account needs an authenticator app to sign in. Install Google Authenticator, Microsoft Authenticator, Authy or 1Password on your phone, then continue."}),d?(0,l.jsx)("div",{className:"flex justify-center pt-10",children:(0,l.jsx)(f.CircularProgress,{size:28})}):(0,l.jsx)(h.default,{divClass:"mt-8 w-full",text:"Continue",fullwidth:!0,onClick:v}),a&&(0,l.jsx)(w.Typography,{component:"button",type:"button",variant:"body2",color:"primary.main",className:"cursor-pointer pt-6 font-semibold bg-transparent border-0",onClick:a,children:"Back to sign in"})]})},ee="relait.2fa.login",et=()=>{try{sessionStorage.removeItem(ee)}catch{}};var er=e.i(94834),ea=e.i(50977);let es={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",borderRadius:2,boxShadow:24,p:4};e.s(["default",0,()=>{let[e,t]=(0,c.useState)(!1),[r,a]=(0,c.useState)(!1),[s,i]=(0,c.useState)(!1),[n,o]=(0,c.useState)(""),[C,E]=(0,c.useState)(""),[N,b]=(0,c.useState)(null),[j,I]=(0,c.useState)("credentials"),[L,D]=(0,c.useState)(null),[F,B]=(0,c.useState)(""),z=(0,_.useRouter)(),H=z?.query?.redirect_url??null,U=z.asPath,$="/";U.includes("redirect_url=")&&($=decodeURIComponent(U.split("redirect_url=")[1]));let Q=(0,ea.validatePath)(H?.split("?")[0])?$:"/",{redirectionUrl:V,themeLogo:Y,themeLoading:G,setProfile:W,openToast:K}=(0,P.useStore)(),[X,q]=(0,c.useState)(!1),{canInvestorLogin:J}=(0,k.useTier)();(0,c.useEffect)(()=>{q(window.location.hostname.startsWith("portal"))},[]);let ei=e=>{if(!e?.access_token){K(e?.msg||"Something went wrong. Please sign in again.","error"),en();return}if(K("Login successfully!","success"),u.default.set("access_token",e.access_token),"__widget_login__"===H&&window.opener){window.opener.postMessage({type:"RELAIT_WIDGET_LOGIN",access_token:e.access_token},"*"),window.close();return}e?.data?.user_type==="investor"&&(0,A.handleSessionVisits)(!1,!0),V?z.push(V):e?.data?.user_type==="investor"?z.push("/"):H&&"__widget_login__"!==H?z.push(`${Q}`):z.push("/admin")},en=()=>{et(),D(null),B(""),I("credentials")};(0,c.useEffect)(()=>{let e=(()=>{try{let e=sessionStorage.getItem(ee);if(!e)return null;let t=JSON.parse(e);if(!t?.challenge_id||!t?.email)return null;if(!t.expires_at||t.expires_at<=Date.now())return et(),null;return t}catch{return null}})();e&&(D(e),E(e.email),I("code"))},[]);let eo=async e=>{W(e=>({...e,user_type:""})),E(e?.email);let r={email:e?.email,password:e?.password};try{a(!0);let t=await (0,S.default)({path:"login",method:"post",data:r});if(t?.two_factor_required){let r=Number(t?.expires_in)||180,a={challenge_id:t?.challenge_id,email:e?.email,email_hint:t?.email_hint,expires_at:Date.now()+1e3*r};try{sessionStorage.setItem(ee,JSON.stringify(a))}catch{}D(a),I("code");return}if(t?.two_factor_setup_required){B(t?.setup_token),I("setup");return}t.status&&ei(t)}catch(e){e?.response?.data?.msg=="User is not confirmed."&&t(!0),e?.response?.data?.blocked&&b(e?.response?.data),K(e?.response?.data?.msg||"Invalid business user!","error")}finally{a(!1)}},el=async e=>{if(L)try{a(!0);let t=await (0,S.default)({path:"login/two-factor/verify",method:"post",data:{email:L.email,challenge_id:L.challenge_id,code:e}});if(t?.status&&t?.access_token){et(),D(null),ei(t);return}K(t?.msg||"Invalid verification code. Please try again.","error")}catch(e){K(e?.response?.data?.msg||"Invalid verification code. Please try again.","error"),/session has expired|sign in again/i.test("string"==typeof e?.response?.data?.msg?e.response.data.msg:"string"==typeof e?.msg?e.msg:"")&&en()}finally{a(!1)}},ec=async()=>{try{a(!0);let e=await (0,S.default)({path:"confirm-signup",method:"post",data:{email:C,confirmation_code:n}});e.status&&(i(!0),K(e?.msg??"Verified successfully!","success"),z.push("/login"),t(!1))}catch(e){K(e?.response?.data?.msg||"Invalid code!","error")}finally{a(!1)}},eu=async()=>{try{(await (0,S.default)({path:"resend-confirmation-code",method:"post",data:{email:C}})).status&&K("Confirmation code sent successfully!","success")}catch(e){K(e?.response?.data?.msg||"Something went wrong","error")}finally{a(!1)}};return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex w-full h-[100dvh] justify-between",children:[(0,l.jsxs)("div",{className:"w-full md:w-[50vw] flex justify-center pt-8 pb-16 md:py-0 md:items-center relative",children:[(0,l.jsxs)("div",{className:"flex flex-col my-auto md:my-0 relative ",children:[(0,l.jsx)("div",{className:"w-full flex justify-center",children:G?(0,l.jsx)(y.Skeleton,{className:"h-[4.75rem] w-[10rem]"}):window.location.hostname.startsWith("portal")?(0,l.jsx)("img",{src:Y.logo,alt:"Logo",className:"max-w-[20.75rem] h-[2.75rem] object-contain"}):(0,l.jsx)(v.default,{href:"/",children:(0,l.jsx)("img",{src:Y.logo,alt:"Logo",className:"max-w-[20.75rem] h-[2.75rem] object-contain"})})}),N?(0,l.jsx)(T,{handleBack:b,blockedUserData:N,loading:r}):"code"===j&&L?(0,l.jsx)("div",{className:"pt-8 md:pt-16",children:(0,l.jsx)(O,{loading:r,emailHint:L.email_hint,expires
2In:Math.max(0,Math.round((L.expires_at-Date.now())/1e3)),onVerify:el,onBack:en},L.challenge_id)}):"setup"===j?(0,l.jsx)("div",{className:"pt-8 md:pt-16",children:(0,l.jsx)(Z,{mode:"login",setupToken:F,compact:"__widget_login__"===H,onComplete:ei,onCancel:en})}):(0,l.jsxs)("div",{children:[(0,l.jsx)(w.Typography,{variant:"h1",className:"pb-8 pt-8 md:pt-16 text-center",children:"Sign In"}),(0,l.jsx)(M,{loading:r,onSubmit:eo,isDisable:!1}),(0,l.jsx)(m.Box,{className:"flex gap-2 w-full pt-6 justify-center sm:justify-start relative items-center",children:!X&&J&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(w.Typography,{variant:"body2",color:"text.secondary",children:"Don't have an account?"}),(0,l.jsx)(v.default,{href:{pathname:"/create-account",query:{redirect_url:"__widget_login__"}},children:(0,l.jsx)(w.Typography,{variant:"buttonLink",color:"primary.main",children:"Register"})})]})})]})]}),(0,l.jsxs)("div",{className:"text-secondary-main w-full pl-4 flex justify-start absolute gap-4 bottom-4 left-0 md:left-8",children:[(0,l.jsxs)(w.Typography,{variant:"caption",children:["© ",(0,er.default)().format("YYYY")," Relait PTY LTD"]})," ",(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(w.Typography,{variant:"buttonLarge_sm",color:"text.secondary",children:(0,l.jsx)("a",{href:"https://www.relait.com.au/privacy-policy",target:"_blank",className:"hover:underline",children:"Privacy"})}),(0,l.jsx)(p.Divider,{orientation:"vertical",className:"h-3 w-px items-center flex justify-center"}),(0,l.jsx)(w.Typography,{variant:"buttonLarge_sm",color:"text.secondary",children:(0,l.jsx)(v.default,{href:"https://www.relait.com.au/eula",target:"_blank",className:"hover:underline",children:"Terms"})})]})]})]}),(0,l.jsx)("div",{className:"hidden md:flex justify-end w-[50vw] h-full",children:(0,l.jsx)(d.default,{src:R.LoginImage,className:"h-[100vh] aspect-auto ",alt:"login"})})]}),(0,l.jsx)(g.Modal,{open:e,children:(0,l.jsxs)(m.Box,{sx:es,children:[r&&(0,l.jsxs)("div",{className:"w-full flex flex-col justify-center items-center",children:[(0,l.jsx)(f.CircularProgress,{}),(0,l.jsx)(w.Typography,{children:"Processing"})]}),!r&&(0,l.jsx)("div",{children:s?(0,l.jsx)(w.Typography,{children:" Registered Successfully!"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(w.Typography,{children:[" ","You are un verified user, check you email and enter your verification code."]}),(0,l.jsx)(x.TextField,{label:"Verification Code",fullWidth:!0,margin:"normal",onChange:e=>o(e.target.value)}),(0,l.jsxs)("div",{className:"flex gap-6 justify-center mt-4",children:[(0,l.jsx)(h.default,{variant:"outlined",onClick:eu,text:"Resend"}),(0,l.jsx)(h.default,{variant:"contained",onClick:ec,text:"Confirm"})]})]})})]})})]})}],83760)}]); 3 4//# debugId=bd62cff8-8dbf-2c83-d559-45c8c56b5e8c 5//# sourceMappingURL=2oer481ghtvcw.js.map
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.