1import{j as e}from"./vendor-dotlottie-CKWLB76h.js";import{i as Z,a as E,e as Oe,f as ke,g as Ye}from"./vendor-react-CCzXVbVA.js";import{a as Ke,b as Je}from"./index.esm-DOW5uEmc.js";import{u as Xe}from"./index.esm-Dhj9gSlK.js";import{a as ee,u as Ze}from"./vendor-query-Cq2FYR_1.js";import{a as et,b as tt}from"./index.esm-C221wYgj.js";import{a7 as rt,S as K,A as I,c as O,ab as xe,u as st,g as Me,ac as ot,n as nt,a4 as at,b as q,ad as oe,ae as ye,af as it,I as lt,a as je,s as ut,ag as ct,d as dt}from"./app-ZGxtfi_0.js";import{E as pe}from"./EmailInput-CIk9kp1G.js";import{k as $,M as ze,a as ve,b as Ne,c as be,d as Ce,D as J,e as Ee,F as L,aq as ft,V,ar as ht,ae as gt,H as G,aC as mt,T as y,aj as pt,h as xt,l as vt,m as bt,B as M,o as Ct,p as Et,aD as yt,q as jt,s as wt,C as We,aE as At,J as _t,K as Dt,j as Tt,I as z,g as Q,ac as W,ad as H,af as St,aF as Pt,aG as Lt,a3 as He,f as X}from"./vendor-chakra-z2eW50qa.js";import{T as Ue}from"./TwoFAField-ksbEJcbE.js";import{N as we}from"./NameInput-DO5rzGo1.js";import{P as Bt}from"./PhoneInput-DvhQEhu3.js";import{P as ne}from"./PasswordInput-CNMhHeVF.js";import{C as Qe}from"./ConfirmPopup-C5Ob1C70.js";import{C as Rt}from"./confirmActionForm-DVkExoKW.js";import{T as Ft}from"./TurnstileComponent-DGwBZ16v.js";import{g as It,h as ae}from"./index.esm-Ds02zZ7m.js";import{G as Ot}from"./index.esm-BaQRSTLG.js";import{s as kt}from"./AddDetectorModal-C_1HPvqP.js";import"./vendor-analytics-kxESroPO.js";import"./vendor-victory-2uYGyQN6.js";import"./vendor-monaco-CiJro7ev.js";import"./debounce-CxjSGMPP.js";import"./smallMessageModal-B0XVKEMH.js";import"./useIssueDetail--1F7ufoz.js";import"./assertThisInitialized-DtB8HoZg.js";const Mt=({isOpen:d,onClose:u})=>{const i=Z(),m=ee(),f=$(),{profileData:o}=rt(),[l,s]=E.useState(!1),[r,t]=E.useState(""),[n,a]=E.useState(1),[c,g]=E.useState("");E.useEffect(()=>{o&&o.email_verified&&t(o.email)},[]);const p=async()=>{try{s(!0);const{data:_}=await I.delete(O.API_DELETE_ACCOUNT,{data:{reason:v[P],comment:x,can_contact_user:w,email:r}});_.status==="success"?(f({title:_.message,status:"success",duration:3e3,isClosable:!0,position:"bottom"}),u(),xe(i,m)):f({title:_.message,status:"error",duration:3e3,isClosable:!0,position:"bottom"}),s(!1)}catch{s(!1)}},h=async()=>{o&&o.email_verified?p():n===1?a(2):p()},v=["I could not implement my business process using SolidityScan","Customer support could not clarity my questions or resolve my issue ","I like SolidityScan, will be back soon ","Do not wish to specify/Others "],[x,A]=E.useState(),[w,D]=E.useState(!0),[P,T]=E.useState(3);return e.jsx(e.Fragment,{children:e.jsxs(ze,{isOpen:d,onClose:u,children:[e.jsx(ve,{}),e.jsxs(Ne,{maxW:["90vw","90vw","45vw"],minW:"300px",minH:"600px",alignItems:"center",borderRadius:"15px",mb:10,p:5,children:[e.jsx(be,{textAlign:"center",fontSize:["lg","lg","xl"],children:"Delete Account"}),e.jsx(Ce,{m:[6,6,6,7],onClick:()=>{u()}}),e.jsx(J,{w:"90%",mb:10,color:"#ECECEC",borderBottomWidth:"2px"}),e.jsx(Ee,{h:"100%",w:"100%",px:[6,6,6,12],children:o&&e.jsxs(L,{justifyContent:"center",w:"100%",h:"50vh",direction:"column",alignItems:"center",textAlign:"center",children:[n===1&&e.jsxs(e.Fragment,{children:[e.jsx(ft,{w:"100%",children:e.jsx(V,{w:"100%",alignItems:"flex-start",justifyContent:"flex-start",children:v.map((_,S)=>e.jsx(ht,{onChange:()=>T(S),variant:"brand",value:S.toString(),children:_}))})}),e.jsx(gt,{variant:"brand",placeholder:"Add Comment (Optional)",borderRadius:"16px",fontSize:"15px",backgroundColor:"#F6F6F6",noOfLines:4,mt:10,p:5,value:x,onChange:_=>{A(_.target.value)},height:"120px",size:"sm",_focus:{boxShadow:"0px 12px 23px rgba(107, 255, 55, 0.1)"}}),e.jsxs(G,{width:"100%",mt:3,alignItems:"center",justifyContent:"flex-start",children:[e.jsx(mt,{isChecked:w,colorScheme:"purple",onChange:()=>{D(!w)}}),e.jsx(y,{fontSize:"sm",children:"You can contact me if youâd like to learn more why I delete my account"})]})]}),n===2&&e.jsxs(e.Fragment,{children:[e.jsx(y,{mb:3,children:"Enter your email to delete account "}),e.jsx(pe,{isRequired:!0,showLeftIcon:!0,placeholder:"Your email",autoComplete:"username",value:r,onChange:_=>t(_.target.value.toLowerCase()),onError:_=>g(_)})]}),e.jsx(y,{width:"100%",p:5,borderWidth:1,borderColor:"#FFC661",background:"#FFF8ED",color:"#4E5D78",my:7,fontSize:"sm",fontWeight:300,borderRadius:10,children:"Deleting account canât be undone and the data canât be restored"}),e.jsx(K,{id:"ss-delete-acc",h:"50px",mt:"auto",mb:2,w:"80%",variant:"brand",px:12,isLoading:l,borderRadius:10,fontSize:"md",fontWeight:500,disabled:!!c,onClick:h,children:o.email_verified?"Delete Account":n===1?"Proceed":"Delete Account"})]})})]})]})})};var U={},ie,Ae;function qe(){return Ae||(Ae=1,ie={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),ie}var le,_e;function zt(){if(_e)return le;_e=1;var d=qe();function u(i){this.mode=d.MODE_8BIT_BYTE,this.data=i}return u.prototype={getLength:function(i){return this.data.length},write:function(i){for(var m=0;m<this.data.length;m++)i.put(this.data.charCodeAt(m),8)}},le=u,le}var ue,De;function Ge(){return De||(De=1,ue={L:1,M:0,Q:3,H:2}),ue}var ce,Te;function Nt(){if(Te)return ce;Te=1;var d=Ge();function u(i,m){this.totalCount=i,this.dataCount=m}return u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37
vendor: 13,144 bytes, line 1
1],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(i,m){var f=u.getRsBlockTable(i,m);if(f==null)throw new Error("bad rs block @ typeNumber:"+i+"/errorCorrectLevel:"+m);for(var o=f.length/3,l=new Array,s=0;s<o;s++)for(var r=f[s*3+0],t=f[s*3+1],n=f[s*3+2],a=0;a<r;a++)l.push(new u(t,n));return l},u.getRsBlockTable=function(i,m){switch(m){case d.L:return u.RS_BLOCK_TABLE[(i-1)*4+0];case d.M:return u.RS_BLOCK_TABLE[(i-1)*4+1];case d.Q:return u.RS_BLOCK_TABLE[(i-1)*4+2];case d.H:return u.RS_BLOCK_TABLE[(i-1)*4+3];default:return}},ce=u,ce}var de,Se;function Wt(){if(Se)return de;Se=1;function d(){this.buffer=new Array,this.length=0}return d.prototype={get:function(u){var i=Math.floor(u/8);return(this.buffer[i]>>>7-u%8&1)==1},put:function(u,i){for(var m=0;m<i;m++)this.putBit((u>>>i-m-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(u){var i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),u&&(this.buffer[i]|=128>>>this.length%8),this.length++}},de=d,de}var fe,Pe;function $e(){if(Pe)return fe;Pe=1;for(var d={glog:function(i){if(i<1)throw new Error("glog("+i+")");return d.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return d.EXP_TABLE[i]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},u=0;u<8;u++)d.EXP_TABLE[u]=1<<u;for(var u=8;u<256;u++)d.EXP_TABLE[u]=d.EXP_TABLE[u-4]^d.EXP_TABLE[u-5]^d.EXP_TABLE[u-6]^d.EXP_TABLE[u-8];for(var u=0;u<255;u++)d.LOG_TABLE[d.EXP_TABLE[u]]=u;return fe=d,fe}var he,Le;function Ve(){if(Le)return he;Le=1;var d=$e();function u(i,m){if(i.length==null)throw new Error(i.length+"/"+m);for(var f=0;f<i.length&&i[f]==0;)f++;this.num=new Array(i.length-f+m);for(var o=0;o<i.length-f;o++)this.num[o]=i[o+f]}return u.prototype={get:function(i){return this.num[i]},getLength:function(){return this.num.length},multiply:function(i){for(var m=new Array(this.getLength()+i.getLength()-1),f=0;f<this.getLength();f++)for(var o=0;o<i.getLength();o++)m[f+o]^=d.gexp(d.glog(this.get(f))+d.glog(i.get(o)));return new u(m,0)},mod:function(i){if(this.getLength()-i.getLength()<0)return this;for(var m=d.glog(this.get(0))-d.glog(i.get(0)),f=new Array(this.getLength()),o=0;o<this.getLength();o++)f[o]=this.get(o);for(var o=0;o<i.getLength();o++)f[o]^=d.gexp(d.glog(i.get(o))+m);return new u(f,0).mod(i)}},he=u,he}var ge,Be;function Ht(){if(Be)return ge;Be=1;var d=qe(),u=Ve(),i=$e(),m={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(o){for(var l=o<<10;f.getBCHDigit(l)-f.getBCHDigit(f.G15)>=0;)l^=f.G15<<f.getBCHDigit(l)-f.getBCHDigit(f.G15);return(o<<10|l)^f.G15_MASK},getBCHTypeNumber:function(o){for(var l=o<<12;f.getBCHDigit(l)-f.getBCHDigit(f.G18)>=0;)l^=f.G18<<f.getBCHDigit(l)-f.getBCHDigit(f.G18);return o<<12|l},getBCHDigit:function(o){for(var l=0;o!=0;)l++,o>>>=1;return l},getPatternPosition:function(o){return f.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,l,s){switch(o){case m.PATTERN000:return(l+s)%2==0;case m.PATTERN001:return l%2==0;case m.PATTERN010:return s%3==0;case m.PATTERN011:return(l+s)%3==0;case m.PATTERN100:return(Math.floor(l/2)+Math.floor(s/3))%2==0;case m.PATTERN101:return l*s%2+l*s%3==0;case m.PATTERN110:return(l*s%2+l*s%3)%2==0;case m.PATTERN111:return(l*s%3+(l+s)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var l=new u([1],0),s=0;s<o;s++)l=l.multiply(new u([1,i.gexp(s)],0));return l},getLengthInBits:function(o,l){if(1<=l&&l<10)switch(o){case d.MODE_NUMBER:return 10;case d.MODE_ALPHA_NUM:return 9;case d.MODE_8BIT_BYTE:return 8;case d.MODE_KANJI:return 8;default:throw new Error("mode:"+o)}else if(l<27)switch(o){case d.MODE_NUMBER:return 12;case d.MODE_ALPHA_NUM:return 11;case d.MODE_8BIT_BYTE:return 16;case d.MODE_KANJI:return 10;default:throw new Error("mode:"+o)}else if(l<41)switch(o){case d.MODE_NUMBER:return 14;case d.MODE_ALPHA_NUM:return 13;case d.MODE_8BIT_BYTE:return 16;case d.MODE_KANJI:return 12;default:throw new Error("mode:"+o)}else throw new Error("type:"+l)},getLostPoint:function(o){for(var l=o.getModuleCount(),s=0,r=0;r<l;r++)for(var t=0;t<l;t++){for(var n=0,a=o.isDark(r,t),c=-1;c<=1;c++)if(!(r+c<0||l<=r+c))for(var g=-1;g<=1;g++)t+g<0||l<=t+g||c==0&&g==0||a==o.isDark(r+c,t+g)&&n++;n>5&&(s+=3+n-5)}for(var r=0;r<l-1;r++)for(var t=0;t<l-1;t++){var p=0;o.isDark(r,t)&&p++,o.isDark(r+1,t)&&p++,o.isDark(r,t+1)&&p++,o.isDark(r+1,t+1)&&p++,(p==0||p==4)&&(s+=3)}for(var r=0;r<l;r++)for(var t=0;t<l-6;t++)o.isDark(r,t)&&!o.isDark(r,t+1)&&o.isDark(r,t+2)&&o.isDark(r,t+3)&&o.isDark(r,t+4)&&!o.isDark(r,t+5)&&o.isDark(r,t+6)&&(s+=40);for(var t=0;t<l;t++)for(var r=0;r<l-6;r++)o.isDark(r,t)&&!o.isDark(r+1,t)&&o.isDark(r+2,t)&&o.isDark(r+3,t)&&o.isDark(r+4,t)&&!o.isDark(r+5,t)&&o.isDark(r+6,t)&&(s+=40);for(var h=0,t=0;t<l;t++)for(var r=0;r<l;r++)o.isDark(r,t)&&h++;var v=Math.abs(100*h/l/l-50)/5;return s+=v*10,s}};return ge=f,ge}var me,Re;function Ut(){if(Re)return me;Re=1;var d=zt(),u=Nt(),i=Wt(),m=Ht(),f=Ve();function o(s,r){this.typeNumber=s,this.errorCorrectLevel=r,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var l=o.prototype;return l.addData=function(s){var r=new d(s);this.dataList.push(r),this.dataCache=null},l.isDark=function(s,r){if(s<0||this.moduleCount<=s||r<0||this.moduleCount<=r)throw new Error(s+","+r);return this.modules[s][r]},l.getModuleCount=function(){return this.moduleCount},l.make=function(){if(this.typeNumber<1){var s=1;for(s=1;s<40;s++){for(var r=u.getRSBlocks(s,this.errorCorrectLevel),t=new i,n=0,a=0;a<r.length;a++)n+=r[a].dataCount;for(var a=0;a<this.dataList.length;a++){var c=this.dataList[a];t.put(c.mode,4),t.put(c.getLength(),m.getLengthInBits(c.mode,s)),c.write(t)}if(t.getLengthInBits()<=n*8)break}this.typeNumber=s}this.makeImpl(!1,this.getBestMaskPattern())},l.makeImpl=function(s,r){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++){this.modules[t]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[t][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(s,r),this.typeNumber>=7&&this.setupTypeNumber(s),this.dataCache==null&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,r)},l.setupPositionProbePattern=function(s,r){for(var t=-1;t<=7;t++)if(!(s+t<=-1||this.moduleCount<=s+t))for(var n=-1;n<=7;n++)r+n<=-1||this.moduleCount<=r+n||(0<=t&&t<=6&&(n==0||n==6)||0<=n&&n<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=n&&n<=4?this.modules[s+t][r+n]=!0:this.modules[s+t][r+n]=!1)},l.getBestMaskPattern=function(){for(var s=0,r=0,t=0;t<8;t++){this.makeImpl(!0,t);var n=m.getLostPoint(this);(t==0||s>n)&&(s=n,r=t)}return r},l.createMovieClip=function(s,r,t){var n=s.createEmptyMovieClip(r,t),a=1;this.make();for(var c=0;c<this.modules.length;c++)for(var g=c*a,p=0;p<this.modules[c].length;p++){var h=p*a,v=this.modules[c][p];v&&(n.beginFill(0,100),n.moveTo(h,g),n.lineTo(h+a,g),n.lineTo(h+a,g+a),n.lineTo(h,g+a),n.endFill())}return n},l.setupTimingPattern=function(){for(var s=8;s<this.moduleCount-8;s++)this.modules[s][6]==null&&(this.modules[s][6]=s%2==0);for(var r=8;r<this.moduleCount-8;r++)this.modules[6][r]==null&&(this.modules[6][r]=r%2==0)},l.setupPositionAdjustPattern=function(){for(var s=m.getPatternPosition(this.typeNumber),r=0;r<s.length;r++)for(var t=0;t<s.length;t++){var n=s[r],a=s[t];if(this.modules[n][a]==null)for(var c=-2;c<=2;c++)for(var g=-2;g<=2;g++)c==-2||c==2||g==-2||g==2||c==0&&g==0?this.modules[n+c][a+g]=!0:this.modules[n+c][a+g]=!1}},l.setupTypeNumber=function(s){for(var r=m.getBCHTypeNumber(this.typeNumber),t=0;t<18;t++){var n=!s&&(r>>t&1)==1;this.modules[Math.floor(t/3)][t%3+this.moduleCount-8-3]=n}for(var t=0;t<18;t++){var n=!s&&(r>>t&1)==1;this.modules[t%3+this.moduleCount-8-3][Math.floor(t/3)]=n}},l.setupTypeInfo=function(s,r){for(var t=this.errorCorrectLevel<<3|r,n=m.getBCHTypeInfo(t),a=0;a<15;a++){var c=!s&&(n>>a&1)==1;a<6?this.modules[a][8]=c:a<8?this.modules[a+1][8]=c:this.modules[this.moduleCount-15+a][8]=c}for(var a=0;a<15;a++){var c=!s&&(n>>a&1)==1;a<8?this.modules[8][this.moduleCount-a-1]=c:a<9?this.modules[8][15-a-1+1]=c:this.modules[8][15-a-1]=c}this.modules[this.moduleCount-8][8]=!s},l.mapData=function(s,r){for(var t=-1,n=this.moduleCount-1,a=7,c=0,g=this.moduleCount-1;g>0;g-=2)for(g==6&&g--;;){for(var p=0;p<2;p++)if(this.modules[n][g-p]==null){var h=!1;c<s.length&&(h=(s[c]>>>a&1)==1);var v=m.getMask(r,n,g-p);v&&(h=!h),this.modules[n][g-p]=h,a--,a==-1&&(c++,a=7)}if(n+=t,n<0||this.moduleCount<=n){n-=t,t=-t;break}}},o.PAD0=236,o.PAD1=17,o.createData=function(s,r,t){for(var n=u.getRSBlocks(s,r),a=new i,c=0;c<t.length;c++){var g=t[c];a.put(g.mode,4),a.put(g.getLength(),m.getLengthInBits(g.mode,s)),g.write(a)}for(var p=0,c=0;c<n.length;c++)p+=n[c].dataCount;if(a.getLengthInBits()>p*8)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+p*8+")");for(a.getLengthInBits()+4<=p*8&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=p*8||(a.put(o.PAD0,8),a.getLengthInBits()>=p*8));)a.put(o.PAD1,8);return o.createBytes(a,n)},o.createBytes=function(s,r){for(var t=0,n=0,a=0,c=new Array(r.length),g=new Array(r.length),p=0;p<r.length;p++){var h=r[p].dataCount,v=r[p].totalCount-h;n=Math.max(n,h),a=Math.max(a,v),c[p]=new Array(h);for(var x=0;x<c[p].length;x++)c[p][x]=255&s.buffer[x+t];t+=h;var A=m.getErrorCorrectPolynomial(v),w=new f(c[p],A.getLength()-1),D=w.mod(A);g[p]=new Array(A.getLength()-1);for(var x=0;x<g[p].length;x++){var P=x+D.getLength()-g[p].length;g[p][x]=P>=0?D.get(P):0}}for(var T=0,x=0;x<r.length;x++)T+=r[x].totalCount;for(var _=new Array(T),S=0,x=0;x<n;x++)for(var p=0;p<r.length;p++)x<c[p].length&&(_[S++]=c[p][x]);for(var x=0;x<a;x++)for(var p=0;p<r.length;p++)x<g[p].length&&(_[S++]=g[p][x]);return _},me=o,me}var Y={},Fe;function Qt(){if(Fe)return Y;
1Fe=1,Object.defineProperty(Y,"__esModule",{value:!0});var d=Object.assign||function(n){for(var a=1;a<arguments.length;a++){var c=arguments[a];for(var g in c)Object.prototype.hasOwnProperty.call(c,g)&&(n[g]=c[g])}return n},u=ke(),i=o(u),m=Oe(),f=o(m);function o(n){return n&&n.__esModule?n:{default:n}}function l(n,a){var c={};for(var g in n)a.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(n,g)&&(c[g]=n[g]);return c}var s={bgColor:i.default.oneOfType([i.default.object,i.default.string]).isRequired,bgD:i.default.string.isRequired,fgColor:i.default.oneOfType([i.default.object,i.default.string]).isRequired,fgD:i.default.string.isRequired,size:i.default.number.isRequired,title:i.default.string,viewBoxSize:i.default.number.isRequired,xmlns:i.default.string},r={title:void 0,xmlns:"http://www.w3.org/2000/svg"},t=(0,m.forwardRef)(function(n,a){var c=n.bgColor,g=n.bgD,p=n.fgD,h=n.fgColor,v=n.size,x=n.title,A=n.viewBoxSize,w=l(n,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize"]);return f.default.createElement("svg",d({},w,{height:v,ref:a,viewBox:"0 0 "+A+" "+A,width:v}),x?f.default.createElement("title",null,x):null,f.default.createElement("path",{d:g,fill:c}),f.default.createElement("path",{d:p,fill:h}))});return t.displayName="QRCodeSvg",t.propTypes=s,t.defaultProps=r,Y.default=t,Y}var Ie;function qt(){if(Ie)return U;Ie=1,Object.defineProperty(U,"__esModule",{value:!0}),U.QRCode=void 0;var d=Object.assign||function(v){for(var x=1;x<arguments.length;x++){var A=arguments[x];for(var w in A)Object.prototype.hasOwnProperty.call(A,w)&&(v[w]=A[w])}return v},u=Ut(),i=a(u),m=Ge(),f=a(m),o=ke(),l=a(o),s=Oe(),r=a(s),t=Qt(),n=a(t);function a(v){return v&&v.__esModule?v:{default:v}}function c(v,x){var A={};for(var w in v)x.indexOf(w)>=0||Object.prototype.hasOwnProperty.call(v,w)&&(A[w]=v[w]);return A}var g={bgColor:l.default.oneOfType([l.default.object,l.default.string]),fgColor:l.default.oneOfType([l.default.object,l.default.string]),level:l.default.string,size:l.default.number,value:l.default.string.isRequired},p={bgColor:"#FFFFFF",fgColor:"#000000",level:"L",size:256},h=(0,s.forwardRef)(function(v,x){var A=v.bgColor,w=v.fgColor,D=v.level,P=v.size,T=v.value,_=c(v,["bgColor","fgColor","level","size","value"]),S=new i.default(-1,f.default[D]);S.addData(T),S.make();var b=S.modules;return r.default.createElement(n.default,d({},_,{bgColor:A,bgD:b.map(function(B,N){return B.map(function(R,F){return R?"":"M "+F+" "+N+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:w,fgD:b.map(function(B,N){return B.map(function(R,F){return R?"M "+F+" "+N+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:x,size:P,viewBoxSize:b.length}))});return U.QRCode=h,h.displayName="QRCode",h.propTypes=g,h.defaultProps=p,U.default=h,U}var Gt=qt();const $t=Ye(Gt),Vt=({isOpen:d,onClose:u,provisioning_uri:i,two_factor_hash:m})=>{const f=$(),o=st(),l=Me(o),[s,r]=E.useState(!1),t=Z(),n=ee(),{onCopy:a,hasCopied:c}=pt(m),g=async p=>{try{r(!0);const{status:h}=await I.post(O.API_2FA_VERIFY,{otp:p});h===200&&(xe(t,n),f({title:"2FA setup is complete. Please login again.",status:"success",duration:3e3,isClosable:!0,position:"bottom"})),r(!1)}catch{r(!1)}};return e.jsx(e.Fragment,{children:e.jsxs(ze,{isOpen:d,onClose:u,isCentered:!0,children:[e.jsx(ve,{}),e.jsxs(Ne,{maxW:["90vw","90vw","1000px"],minW:"300px",bg:"bg.subtle",minH:"fit-content",children:[e.jsx(be,{px:10,background:"rgba(82, 255, 0, 0.04)",backgroundImage:`url('${l}background/pattern.png')`,textAlign:["center","center","center","left"],children:e.jsx(G,{spacing:5,children:e.jsx(xt,{fontSize:"xl",fontWeight:600,children:"Setup Two factor Authentication"})})}),e.jsx(Ce,{}),e.jsx(Ee,{h:"fit-content",w:"100%",px:[6,6,6,12],pb:5,children:e.jsxs(L,{justifyContent:"flex-start",alignItems:"center",w:"100%",flexDir:"column",py:5,children:[e.jsxs(V,{alignItems:"center",children:[e.jsx(y,{textAlign:"center",fontSize:"lg",fontWeight:600,children:"Setup Two Factor Authentication with Authenticator App"}),e.jsx(y,{fontSize:"sm",textAlign:"center",children:"Authenticator apps and browser extensions such as 1Password, Authy, Microsoft Authenticator, and others create single-use passwords utilized as a secondary verification method for confirming your identity when required during the login process."})]}),e.jsx(y,{textAlign:"center",mt:10,fontSize:"md",fontWeight:600,children:"Scan the QR Code"}),e.jsx(y,{textAlign:"center",mt:2,fontSize:"sm",children:"Use an authenticator app or browser extension to scan the below QR code."}),i&&e.jsx($t,{size:50,style:{height:"auto",width:"220px",padding:"10px",border:"2px s
1olid #b2bec2",borderRadius:"10px",marginTop:"20px"},value:i,viewBox:"0 0 50 50"}),e.jsxs(y,{textAlign:"center",my:10,fontSize:"sm",children:["Unable to scan? You can use"," ",e.jsxs(vt,{children:[e.jsx(bt,{children:e.jsx(M,{as:"span",color:"#3300FF",fontStyle:"underline",children:"setup key"})}),e.jsxs(Ct,{children:[e.jsx(Et,{}),e.jsx(yt,{}),e.jsx(jt,{children:"Your Two Factor Secret"}),e.jsx(wt,{children:e.jsxs(G,{children:[e.jsx(y,{textAlign:"left",w:"90%",textOverflow:"",children:m}),c?e.jsx(We,{cursor:"pointer",color:"#38CB89"}):e.jsx(At,{cursor:"pointer",onClick:a})]})})]})]})," ","the to manually configure your authenticator app."]}),e.jsx(Ue,{isLoading:s,buttonText:"Verify",verify2FA:g})]})})]})]})})},Yt=async()=>{try{const{data:d}=await I.get(O.API_2FA_SETUP);return d}catch{}},Kt=async d=>{try{const{data:u}=await I.delete(O.API_2FA_DISABLE,{data:{otp:d}});return u}catch{}},Jt=async(d,u)=>{const{data:i}=await I.get(`${O.API_GET_USER_ACTIVITY_HISTORY}?page=${d}&per_page=${u}`);return i},Xt=(d,u,i)=>Ze(["user_activity_logs",d,u],()=>Jt(d,u),{enabled:i});function Zt(d){const{isOpen:u,onClose:i}=d,m={ADD_DETECTOR:{label:"Added New Detector",iconBg:"#EFEBFF",icon:e.jsx(ye,{isAcitvity:!0})},EDIT_DETECTOR:{label:"Edited Detector",iconBg:"#EFEBFF",icon:e.jsx(ye,{isAcitvity:!0})},ADD_BUG:{label:"Added Bug",iconBg:"#E6FFF0",icon:e.jsx(z,{as:Ot,boxSize:5,color:"#32CE6D"})},DELETE_BUG:{label:"Deleted Bug",iconBg:"#FFF2EF",icon:e.jsx(z,{as:ae,boxSize:5,color:"#E24329"})},DELETE_BLOCK:{label:"Deleted Block Scan",iconBg:"#FFF2EF",icon:e.jsx(z,{as:ae,boxSize:5,color:"#E24329"})},DELETE_PROJECT:{label:"Deleted Project",iconBg:"#FFF2EF",icon:e.jsx(z,{as:ae,boxSize:5,color:"#E24329"})},BLOCK_SCAN:{label:"Scanned Block",iconBg:"#E6FFF0",icon:e.jsx(oe,{size:20,primaryColor:"#32CE6D",secondaryColor:"#32CE6D"})},PROJECT_SCAN:{label:"Scanned Project",iconBg:"#E6FFF0",icon:e.jsx(oe,{size:20,primaryColor:"#32CE6D",secondaryColor:"#32CE6D"})},PROJECT_RESCAN:{label:"Re-Scanned Project",iconBg:"#E6FFF0",icon:e.jsx(oe,{size:20,primaryColor:"#32CE6D",secondaryColor:"#32CE6D"})},GENERATE_REPORT:{label:"Generated Report",iconBg:"#F5F5F5",icon:e.jsx(z,{as:It,boxSize:5,color:"#323B4B"})},UPDATE_PROFILE:{label:"Updated Profile",iconBg:"#EDF5FF",icon:e.jsx(z,{as:Ke,boxSize:5,color:"#2684FF"})}},f=Me(),[o,l]=E.useState(1),[s,r]=E.useState(!0),[t,n]=E.useState([]),{data:a}=Xt(o,10,u);E.useEffect(()=>{if(a?.data){let h;o>1&&t?h=t.concat(a.data?.history):h=a.data?.history,n(h),o<a.page?.total_pages?r(!0):r(!1)}},[a]);const c=()=>{l(o+1)},g=h=>{const v=new Date(h),x=v.getDate(),A=v.toLocaleString("default",{month:"long"}),w=v.getFullYear();return`${x} ${A} ${w}`},p=h=>{const v=new Date(h);let x=v.getHours();const A=v.getMinutes(),w=x>=12?"PM":"AM";return x=x%12,x=x||12,`${x}:${A.toString().padStart(2,"0")} ${w}`};return e.jsxs(_t,{placement:"right",onClose:i,isOpen:u,size:"md",children:[e.jsx(ve,{bg:"#00000033",backdropFilter:"blur(3px)"}),e.jsxs(Dt,{children:[e.jsx(Ce,{color:"#B0B7C3"}),e.jsx(be,{borderBottom:"none",children:"Access Logs History"}),e.jsx(Ee,{id:"scrollableDiv",pb:20,pt:0,borderTop:"1px solid #ECECEC",children:e.jsx(L,{w:"100%",flexDir:"column",px:[2,2,4],children:e.jsx(ot,{dataLength:t?.length||0,next:()=>c(),hasMore:s,loader:e.jsx(M,{w:"100%",h:"50vh",display:"flex",justifyContent:"center",alignItems:"center",children:e.jsx(q,{})}),scrollableTarget:"scrollableDiv",style:{overflow:"hidden"},children:t?.map((h,v)=>e.jsxs(L,{w:"100%",alignItems:"flex-start",animation:"fadeIn 0.5s ease forwards",children:[e.jsxs(L,{w:"90px",alignItems:"center",pt:4,children:[e.jsx(L,{w:"50px",h:"50px",borderRadius:"full",bg:m[h.event]?.iconBg,alignItems:"center",justifyContent:"center",children:m[h.event]?.icon}),e.jsx(J,{borderColor:"#D9D9D9",w:"22px"}),e.jsx(M,{w:"18px",h:"18px",borderRadius:"full",bg:"#D9D9D9"})]}),e.jsxs(L,{borderLeft:"1px solid #D9D9D9",w:"80%",flexDir:"column",ml:"-0.6rem",px:5,py:8,children:[e.jsxs(y,{fontSize:"13px",children:[g(h.created_at),e.jsx("span",{style:{color:"#4E5D78",fontWeight:400,marginLeft:"1rem"},children:p(h.created_at)})]}),e.jsx(y,{fontWeight:700,my:1.5,children:m[h.event]?.label||h.event.replace(/_/g," ")}),h.project_id||h.block_address||h.issue_id?e.jsxs(L,{w:"80%",alignItems:"center",children:[e.jsx(M,{w:"25px",h:"25px",children:h.project_url?e.jsx(Tt,{mx:0,src:`${f}${`icons/integrations/${nt(h.project_url||"")}`}.svg`,h:"25px",w:"25px"}):h.block_chain?e.jsx(at,{contract:{contract_chain:h.block_chain,contract_platform:h.block_platform},size:25}):h.issue_id?e.jsx(L,{w:"12px",h:"25px",borderRadius:"full",alignItems:"center",justifyContent:"center",children:e.jsx(M,{width:"12px",height:"12px",borderRadius:"full",bg:kt[h.issue_severity]})}):null}),e.jsx(y,{fontSize:"sm",color:"text",ml:2,isTruncated:!0,children:h.project_id||h.block_address||h.issue_name||h.issue_id})]}):null,e.jsx(L,{w:"100%",alignItems:"flex-start",bg:"#F6F6F6",borderRadius:"8px",p:4,pr:6,mt:4,justifyContent:"space-between",children:e.jsxs(V,{alignItems:"flex-start",spacing:1,children:[e.jsxs(y,{fontSize:"sm",fontWeight:700,children:[h.first_name," ",h.last_name]}),e.jsx(y,{fontSize:"xs",fontWeight:400,color:"subtle",children:h.account_email})]})})]})]},v))})})})]})]})}const Sr=()=>{const d=$(),[u,i]=E.useState(!1),[m,f]=E.useState(!1),[o,l]=E.useState(""),[s,r]=E.useState(""),[t,n]=E.useState(!1),[a,c]=E.useState({}),{data:g,refetch:p}=it(!0),[h,v]=E.useState(""),[x,A]=E.useState(""),[w,D]=E.useState(""),[P,T]=E.useState(!1),[_,S]=E.useState(""),{data:b,refetch:B}=lt(!0),N=ee(),[R,F]=E.useState(!0);E.useEffect(()=>{b&&(f(b.verification_email_sent),b.verification_email_sent&&!b.email_verified&&r(b.email),v(b.company_name),A(b.contact_number),D(b.name),F(b.logged_in_via==="normal_login"))},[b]);const te=async()=>{try{T(!0);const{data:C}=await I.post(O.API_UPDATE_PROFILE,{company_name:h,contact_number:x,first_name:w});N.invalidateQueries("profile"),C.status==="success"&&(d({title:"Profile Updated successfully",status:"success",duration:2e3,isClosable:!0,position:"bottom"}),i(!1))}catch{T(!1)}T(!1)},re=async()=>
1{if(s){n(!0);const{data:C}=await I.put(O.API_UPDATE_EMAIL,{email:s});n(!1),C&&C.status&&C.status==="success"?(l(C.message),f(!0),d({title:"Verification email sent",description:`We've sent a link to your email ${s}.`,status:"success",duration:5e3,isClosable:!0,position:"bottom"}),N.invalidateQueries("profile")):(f(!1),r(""))}},se=async()=>{n(!0);const{data:C}=await I.post(O.API_SEND_EMAIL,{email:s},{headers:{"Content-Type":"application/json","cf-turnstile-response":_}});C&&C.status&&C.status==="success"&&(f(!0),l(C.message),d({title:"Verification email sent",description:`We've sent a link to your email ${s}.`,status:"success",duration:5e3,isClosable:!0,position:"bottom"})),n(!1)};return e.jsxs(M,{sx:{w:"98%",bg:"bg.subtle",borderRadius:"20px",py:4,px:4,ml:[0,0,4],my:4,minH:"78vh"},children:[!b&&e.jsx(L,{sx:{w:"100%",mx:[0,0,4],my:24,justifyContent:"center"},children:e.jsx(q,{})}),b&&e.jsxs(e.Fragment,{children:[" ",e.jsxs("form",{style:{display:"flex",justifyContent:"flex-start",flexDirection:"column",alignItems:"flex-start",width:"100%",backgroundColor:"white",borderRadius:"20px",padding:"20px"},children:[e.jsxs(L,{w:"100%",alignItems:"center",justifyContent:"space-between",children:[e.jsx(y,{fontWeight:300,fontSize:"xl",children:"Profile Details"}),u?e.jsxs(Q,{id:"ss-profile-save",variant:"accent-ghost",type:"submit",isDisabled:Object.values(a).join("").length>0,isLoading:P,spinner:e.jsx(q,{color:"#3300FF",size:25}),onClick:C=>{te()},children:[e.jsx(z,{as:et,color:"accent",mr:2})," Save"]}):e.jsxs(Q,{id:"ss-profile-edit",variant:"accent-ghost",onClick:C=>{C.preventDefault(),i(!0)},children:[e.jsx(z,{as:tt,color:"accent",mr:2})," Edit"]})]}),e.jsxs(V,{w:"100%",spacing:u?4:8,my:4,children:[e.jsxs(W,{id:"name",children:[e.jsx(H,{color:"subtle",children:"Name"}),u?e.jsx(we,{isRequired:!0,isDisabled:P,defaultValue:b.name,value:w,onChange:C=>D(C.target.value),onError:C=>c(j=>({...j,Name:C}))}):e.jsx(y,{fontSize:"lg",children:b.name})]}),e.jsxs(W,{id:"companyName",children:[e.jsx(H,{color:"subtle",children:"Company Name"}),u?e.jsx(we,{title:"Company Name",isDisabled:P,defaultValue:b.company_name,value:h,onChange:C=>{v(C.target.value)},onError:C=>c(j=>({...j,Company:C}))}):e.jsx(y,{fontSize:"lg",children:b.company_name})]}),e.jsxs(W,{id:"mobileNumber",children:[e.jsx(H,{color:"subtle",children:"Mobile Number"}),u?e.jsx(Bt,{isDisabled:P,defaultValue:b.contact_number,value:x,onChange:C=>{A(C.target.value)},onError:C=>c(j=>({...j,Phone:C}))}):e.jsx(y,{fontSize:"lg",children:b.contact_number})]}),b.public_address&&e.jsxs(W,{id:"public_address",children:[e.jsx(H,{color:"subtle",children:"Public Address"}),u?e.jsx(St,{borderRadius:"15px",size:"lg",isDisabled:!0,type:"text",w:"100%",maxW:"600px",value:b.public_address}):e.jsx(y,{fontSize:"lg",children:b.public_address})]}),b.email_verified&&e.jsxs(W,{id:"email",children:[e.jsx(H,{color:"subtle",children:"Email ID"}),u?e.jsx(pe,{isDisabled:!0,value:b.email,onError:C=>c(j=>({...j,Email:C}))}):e.jsx(y,{fontSize:"lg",children:b.email})]}),!b.email_verified&&b.public_address&&e.jsxs(W,{id:"email",children:[e.jsx(H,{color:"subtle",children:e.jsxs(L,{w:"100%",children:["Email",e.jsx(Pt,{label:m?"Email verification is pending":"Please add your Email",placement:"top",children:e.jsx(Lt,{color:"accent",ml:1,fontSize:"sm"})})]})}),e.jsxs(He,{spacing:6,direction:["column","column","column","row"],children:[e.jsx(pe,{isDisabled:b.verification_email_sent,value:s,onChange:C=>r(C.target.value.toLowerCase()),onError:C=>c(j=>({...j,Email:C}))}),e.jsx(Q,{id:"ss-profile-email",variant:"brand",onClick:m?se:re,disabled:a.Email&&a.Email.length>0?!0:!s||je().reCAPTCHA_enabled&&!_,px:10,minW:"150px",children:t?e.jsx(q,{}):m?"Resend Email":"Verify Email"}),je().reCAPTCHA_enabled&&e.jsx(Ft,{setTurnstileToken:S})]}),m&&e.jsxs(y,{color:"success",my:2,children:[e.jsx(z,{as:Je})," ",o||"Email sent successfully. Check your inbox for verification link."]})]})]})]}),!b.public_address&&e.jsx(er,{twoFAEnabled:b["2fa_enabled"],isOwner:R,refetchProfile:B,profileData:b}),R&&e.jsx(rr,{}),g&&g.user_organization&&g.user_organization.status==="joined"&&e.jsx(tr,{isOwner:R,organizations:g.user_organization,refetchOrgProfile:p})]})]})}
1,er=({isOwner:d,twoFAEnabled:u,refetchProfile:i,profileData:m})=>{const f=Z(),o=$(),[l,s]=E.useState(""),[r,t]=E.useState(""),[n,a]=E.useState(""),{handleSubmit:c}=Xe(),{isOpen:g,onClose:p,onOpen:h}=X(),{isOpen:v,onOpen:x,onClose:A}=X(),[w,D]=E.useState(!1),[P,T]=E.useState(!1),[_,S]=E.useState(!1),[b,B]=E.useState(!1),[N,R]=E.useState({}),[F,te]=E.useState(null),re=async j=>{B(!0);try{const k=await Kt(j);k&&k.status==="success"&&(o({title:k.message,status:"success",duration:2e3,isClosable:!0,position:"bottom"}),i()),D(!1),T(!1),B(!1)}catch{B(!1)}},se=async()=>{B(!0);const j=await Yt();j&&te({provisioning_uri:j.provisioning_uri,two_factor_hash:j.two_factor_hash})};E.useEffect(()=>{F!==null&&(h(),B(!1))},[F]);const C=async()=>{if(r!==n){o({title:"Passwords do not match",status:"error",duration:9e3,isClosable:!0,position:"bottom"});return}S(!0);try{const{data:j}=await I.post(O.API_CHANGE_PASSWORD,{password:l,new_password:r});j.status==="success"&&(dt.deauthenticateUser(),f.push("/signin?isPasswordReset=true"))}catch{}S(!1)};return e.jsxs(M,{w:"100%",bgColor:"white",borderRadius:"20px",p:4,px:6,mt:8,children:[e.jsx(y,{fontWeight:300,fontSize:"xl",children:"Security"}),e.jsxs("form",{style:{padding:"20px 0px"},onSubmit:c(C),children:[e.jsxs(He,{spacing:6,width:["90%","80%","600px"],children:[e.jsx(ne,{isRequired:!0,showLeftIcon:!0,showError:!1,enableSpecialCharCheck:!1,value:l,placeholder:"Old Password",onChange:j=>s(j.target.value),onError:j=>R(k=>({...k,Password:j}))}),e.jsx(ne,{isRequired:!0,showLeftIcon:!0,value:r,placeholder:"New Password",onChange:j=>t(j.target.value),onError:j=>R(k=>({...k,NewPassword:j}))}),e.jsx(ne,{isRequired:!0,showLeftIcon:!0,value:n,placeholder:"Confirm Password",onChange:j=>a(j.target.value),onError:j=>R(k=>({...k,ConfirmPassword:j}))})]}),e.jsx(Q,{id:"ss-change-password",variant:"brand",type:"submit",mt:6,px:6,onClick:C,isLoading:_,spinner:e.jsx(q,{color:"#3300FF",size:25}),isDisabled:Object.values(N).join("").length>0||r!==n,children:"Change Password"})]}),e.jsx(J,{my:10}),e.jsx(y,{fontWeight:700,fontSize:"md",mt:5,children:"Setup Two-Factor Authentication"}),e.jsx(y,{color:"subtle",fontSize:"sm",mt:1,maxWidth:"1000px",children:"Set up and configure your account to enable Two-Factor Authentication (2FA) using an Authenticator App, bolstering your security measures by requiring an additional authentication step for added protection. This process ensures that your account remains safeguarded against unauthorized access and potential threats."}),u?e.jsxs(V,{alignItems:"flex-start",my:5,spacing:0,children:[e.jsxs(G,{fontWeight:700,spacing:2,my:5,children:[e.jsx(We,{color:"low"}),e.jsx(y,{color:"low",children:"Your Account is 2FA Enabled"})," "]}),e.jsx(K,{id:"ss-disable-tfa",py:6,isLoading:b,onClick:()=>D(!0),children:"Disable Two Factor Authentication"})]}):e.jsx(K,{id:"ss-setup-tfa",my:5,py:6,isLoading:b,onClick:()=>se(),children:"Setup 2FA Authentication"}),F!==null&&e.jsx(Vt,{isOpen:g,onClose:p,refetchProfile:i,two_factor_hash:F.two_factor_hash,provisioning_uri:F.provisioning_uri}),e.jsx(Qe,{header:"Confirm Disable 2FA",body:"Are you sure you want to Disable Two Factor Authentication ?",confirmText:"Disable 2FA",isOpen:w,onCancel:()=>D(!1),onClose:()=>D(!1),onConfirm:()=>T(!0),isLoading:b}),e.jsx(Rt,{isOpen:P,onClose:()=>{T(!1),D(!1)},modalHeader:"Please verify before disabling",modelText:e.jsx(Ue,{isLoading:b,buttonText:"Verify",verify2FA:re})}),m?.current_package==="custom"&&e.jsxs(e.Fragment,{children:[e.jsx(J,{my:10}),e.jsxs(y,{fontSize:"20px",fontWeight:400,children:["View Access Logs History"," "]}),e.jsx(y,{fontWeight:700,fontSize:"md",mt:5,children:"Access Logs History"}),e.jsx(y,{color:"subtle",fontSize:"sm",mt:1,maxWidth:"1000px",children:"Access a detailed log of your scanned projects, custom detectors, reported bugs, and all past actions, securely tied to your user account."}),e.jsx(K,{id:"ss-setup-tfa",my:5,py:6,isLoading:b,onClick:x,children:"View Access Logs History"}),e.jsx(Zt,{isOpen:v,onClose:A})]})]})},tr=({isOwner:d,organizations:u,refetchOrgProfile:i})=>{const{isOpen:m,onClose:f,onOpen:o}=X(),l=Z(),s=ee(),r=$();let t=new Date(u.joined_at);const n=async()=>{const{data:c}=await I.get(O.API_LEAVE_ORGANISATION);c.status==="success"?r({title:c.message,status:"success",duration:3e3,isClosable:!0,position:"bottom"}):r({title:c.message,status:"error",duration:3e3,isClosable:!0,position:"bottom"}),f(),xe(l,s)},a=async()=>{const{data:c}=await I.delete(O.API_DELETE_ORGANISATION);c.status==="success"?r({title:c.message,status:"success",duration:3e3,isClosable:!0,position:"bottom"}):r({title:c.message,status:"error",duration:3e3,isClosable:!0,position:"bottom"}),i(),f()};return e.jsxs(M,{w:"100%",bgColor:"white",borderRadius:"20px",p:4,px:6,mt:8,children:[e.jsxs(y,{fontWeight:300,fontSize:"xl",children:[d?"Close":"Leave"," Organization"]}),e.jsx(y,{mt:5,fontWeight:700,fontSize:"md",children:u.org_name}),e.jsxs(G,{mt:2,children:[e.jsx(y,{fontWeight:700,fontSize:"sm",children:ut(u.role)}),e.jsxs(y,{fontWeight:700,fontSize:"sm",color:"#B0B7C3",children:["|"," ",`${d?"Created":"Joined"} at ${t.getDate()} ${ct[t.getMonth()]} ${t.getFullYear()}`]})]}),e.jsx(y,{mt:10,fontWeight:300,color:"gray.500",fontSize:"md",children:"This action is permanent and cannot be undone."}),e.jsxs(Q,{id:"ss-leave-org",variant:"outline",mt:5,py:6,bg:"white",w:["200px"],borderColor:"#cf222e",borderWidth:2,color:"#cf222e",_hover:{backgroundColor:"#cf222e10"},onClick:o,children:[d?"Close":"Leave"," Organization"]}),e.jsx(Qe,{header:`Confirm ${d?"Close":"Leave"} Organization`,body:e.jsxs(e.Fragment,{children:["Are you sure you want to ",d?"Close":"Leave"," ",e.jsx(M,{as:"span",sx:{fontWeight:600},children:u.org_name})," ","Organization ?"]}),confirmText:d?"Close":"Leave",isOpen:m,onCancel:f,onClose:f,onConfirm:()=>{d?a():n()}})]})},rr=()=>{const{isOpen:d,onClose:u,onOpen:i}=X();return e.jsxs(M,{w:"100%",bgColor:"white",borderRadius:"20px",p:4,px:6,mt:8,children:[e.jsx(y,{fontWeight:300,fontSize:"xl",children:"Delete Account"}),e.jsx(y,{mt:5,fontWeight:700,fontSize:"md",children:"Delete your account"}),e.jsx(y,{mt:5,fontWeight:300,color:"gray.500",fontSize:"md",children:"This action is permanent and cannot be undone."}),e.jsx(Q,{id:"ss-delete-account",variant:"outline",mt:5,py:6,bg:"white",w:["200px"],borderColor:"#cf222e",borderWidth:2,color:"#cf222e",_hover:{backgroundColor:"#cf222e10"},onClick:i,children:"Delete Account"}),e.jsx(Mt,{onClose:u,isOpen:d})]})};export{Sr as default};
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.