PageSourceSearch

https://solidityscan.com/assets/index-BPFAbAQp.js

js solidityscan.com collected 2026-10-03 21:22:35 UTC 7,340 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-dotlottie-CKWLB76h.js";import{i as re,a as t,L as ie,W as ae}from"./vendor-react-CCzXVbVA.js";import{g as ce,a0 as le,I as de,a1 as R,L as ue,b as w,a2 as C,a3 as D,S as ge,A as H,c as B}from"./app-ZGxtfi_0.js";import{H as me}from"./index.esm-DvnQRwk9.js";import{k as xe,aj as he,F as o,a0 as pe,j as S,V as F,h as I,T as r,U as k,W as A,X as L,I as v,D as E,a3 as fe,g as K,C as je}from"./vendor-chakra-z2eW50qa.js";import{c as V}from"./capitalize-rFTeAViz.js";import{f as U}from"./index.esm-Ds02zZ7m.js";import{a as ye}from"./vendor-query-Cq2FYR_1.js";import"./vendor-analytics-kxESroPO.js";import"./vendor-victory-2uYGyQN6.js";import"./vendor-monaco-CiJro7ev.js";const _=pe(o);function _e(){const g=ce(),$=re(),N=xe(),q=ye(),[G,m]=t.useState(!1),[x,d]=t.useState(!1),[u,z]=t.useState(),[h,P]=t.useState(""),[p,Q]=t.useState(!1),[f,J]=t.useState(""),{onCopy:M,hasCopied:X}=he(f),[T,Y]=t.useState(!1),[Z,ee]=t.useState(!1),[a,se]=t.useState(),{data:i,isLoading:te}=le(),{data:j}=de(!0),c=localStorage.getItem("provider"),y=localStorage.getItem("machineId"),b=localStorage.getItem("requestToken");t.useEffect(()=>((!c||!y||!b)&&$.push("/home",{replace:!0}),window.addEventListener("unload",l),()=>{window.removeEventListener("unload",l)}),[]),t.useEffect(()=>{if(i?.orgs?.length){const s=i?.orgs.filter(n=>n.role!=="owner");s&&s.length&&(Y(!0),ee(s.length!==i?.orgs?.length))}},[i]),t.useEffect(()=>{c&&P(R[c])},[c]),t.useEffect(()=>{u&&(u.status==="success"&&J(u.access_token),l())},[u]);const O=async s=>{d(!0),se(s);try{const{data:n}=await H.post(B.API_SWITCH_ORGANIZATIONS,{org_name:s.role==="owner"?void 0:s.org_name,switch_type:s.role==="owner"?"account":"organization"});n&&n.status==="success"&&(await q.invalidateQueries(),await W())}catch{}d(!1)},W=async()=>{if(c&&y&&b)try{P(R[c]),d(!0);const{data:s}=await H.post(B.API_PLUGIN_LOGIN,{provider:c,machine_id:y,token:b});d(!1),m(!0),s?z(s):l()}catch{l(),m(!0)}else z(null),d(!1),m(!0)},oe=()=>{l(),window.close()},l=()=>{localStorage.removeItem("provider"),localStorage.removeItem("machineId"),localStorage.removeItem("requestToken")},ne=()=>{M(),N({title:"Access key copied",status:"success",duration:1500,isClosable:!0,position:"bottom"})};return e.jsxs(e.Fragment,{children:[e.jsx(ie,{id:"ss-home-link",to:"/home",children:e.jsx(o,{as:"header",justifyContent:"space-between",maxW:"80vw",mx:"auto",py:8,children:e.jsx(ue,{})})}),G?u?.status==="success"?e.jsxs(_,{align:"center",direction:"column",my:[10,10,10,28],px:6,initial:{opacity:0}
1,animate:{opacity:1},children:[e.jsx(S,{src:`${g}icons/login_successful.svg`}),e.jsxs(F,{my:[10,10,10,4],mx:"8",spacing:"2",textAlign:"center",children:[e.jsx(I,{fontSize:"2xl",children:"Login Successful"}),e.jsxs(r,{fontSize:"md",color:"subtle",children:["Please return to ",h," and use this access key to continue"]})]}),e.jsxs(o,{mx:[0,0,0,6],my:[3,3,3,6],px:[4,4,4,6],pt:8,pb:6,backgroundColor:"#FCFCFC",border:"2px solid #EAEAEA",borderRadius:"15px",flexDir:"column",minW:["100%","100%","100%","600px"],maxW:["100%","100%","100%","600px"],h:f?"fit-content":"100%",children:[a?e.jsxs(e.Fragment,{children:[e.jsxs(o,{w:"100%",alignItems:"center",textColor:"black",children:[e.jsx(r,{w:"calc(100% - 140px)",isTruncated:!0,children:a.org_name}),e.jsxs(k,{ml:"auto",bg:"#F4F4F4",borderRadius:7,color:"#8A94A6",w:"110px",py:1.5,alignItems:"center",justifyContent:"center",children:[e.jsx(A,{as:a.role==="owner"?C:D,boxSize:5}),e.jsx(L,{children:a.role==="owner"?"Personal":V(a.role)})]})]})," ",e.jsx(E,{color:"#ECECEC",my:6})]}):null,p?e.jsx(r,{color:"detail",fontWeight:400,fontSize:"sm",children:f}):e.jsx(r,{color:"#323B4B",fontWeight:400,lineHeight:[1.5,1.5,1.5,"3rem"],children:"The access key is hidden. Click on View Key to reveal."}),e.jsx(E,{my:5,color:"#EAEAEA",borderBottomWidth:"2px"}),e.jsxs(o,{align:"center",flexDir:["column","column","column","row"],children:[e.jsxs(o,{align:"center",cursor:"pointer",color:"blue",mr:4,onClick:ne,children:[e.jsx(r,{children:"Click here to copy the access key"}),X?e.jsx(je,{ml:2}):e.jsx(v,{as:me,fontSize:"2xl",ml:2})]}),e.jsx(K,{id:"ss-view-key",onClick:()=>Q(!p),variant:"outline",borderWidth:"1px",borderColor:"blackAlpha.600",borderRadius:"8px",fontWeight:500,px:8,mt:[6,6,6,0],ml:[0,0,0,"auto"],children:p?"Hide Key":"View Key"})]})]})]}):e.jsxs(_,{align:"center",direction:"column",my:36,initial:{opacity:0}
1,animate:{opacity:1},children:[e.jsx(S,{src:`${g}icons/login_failed.svg`}),e.jsxs(F,{my:[20,20,20,4],mx:"8",spacing:"2",textAlign:"center",children:[e.jsx(I,{fontSize:"2xl",color:"red",children:"Login Failed"}),e.jsxs(r,{fontSize:"md",color:"subtle",children:["Please return to ",h," and try again"]})]})]}):e.jsxs(_,{align:"center",direction:"column",my:36,initial:{opacity:0},animate:{opacity:1},children:[e.jsx(S,{src:`${g}icons/integrations/${localStorage.getItem("provider")}.svg`}),e.jsxs(F,{my:6,mx:"8",spacing:"2",textAlign:"center",children:[e.jsxs(I,{fontSize:"2xl",children:["Sign In to your ",h," plugin"]}),e.jsx(r,{fontSize:"md",color:"subtle",maxW:["95%","95%","90%","60%"],children:T?"It looks like you are part of multiple organizations. Please select the organization you want to log in to.":"Please confirm to continue using the plugin. You will be logged into your account, or cancel to return to your dashboard."})]}),te?e.jsx(w,{width:"100%",height:"100%"}):T?e.jsxs(o,{backgroundColor:"#FCFCFC",border:"2px solid #EAEAEA",borderRadius:"15px",flexDir:"column",w:"100%",mx:[0,0,0,6],my:[3,3,3,6],py:[2,2,2,4],maxW:["100%","100%","100%","600px"],children:[!Z&&e.jsxs(o,{alignItems:"center",w:"100%",py:3,px:[4,4,4,6],cursor:"pointer",_hover:{background:"#F9F9F9"},_focus:{background:"#F9F9F9"},onClick:()=>O({org_name:j?.name,role:"owner"}),children:[e.jsxs(o,{w:"100%",alignItems:"center",textColor:"black",mr:6,children:[e.jsx(r,{w:"calc(100% - 140px)",isTruncated:!0,children:j?.name}),e.jsxs(k,{ml:"auto",bg:"#F4F4F4",borderRadius:7,color:"#8A94A6",w:"110px",py:1.5,alignItems:"center",justifyContent:"center",children:[e.jsx(A,{as:C,boxSize:5}),e.jsx(L,{children:"Personal"})]})]}),x&&a.org_name===j?.name?e.jsx(w,{width:"20px",height:"20px",size:20,color:"black"}):e.jsx(v,{as:U,fontSize:"lg"})]}),i?.orgs&&i?.orgs.length&&i?.orgs.map((s,n)=>e.jsxs(ae.Fragment,{children:[e.jsxs(o,{alignItems:"center",w:"100%",py:3,px:[4,4,4,6],cursor:"pointer",_hover:{background:"#F9F9F9"},_focus:{background:"#F9F9F9"},onClick:()=>O(s),children:[e.jsxs(o,{w:"100%",alignItems:"center",textColor:"black",mr:6,children:[e.jsx(r,{w:"calc(100% - 140px)",isTruncated:!0,children:s.org_name}),e.jsxs(k,{ml:"auto",bg:"#F4F4F4",borderRadius:7,color:"#8A94A6",w:"110px",py:1.5,alignItems:"center",justifyContent:"center",children:[e.jsx(A,{as:s.role==="owner"?C:D,boxSize:5}),e.jsx(L,{children:s.role==="owner"?"Personal":V(s.role)})]})]}),x&&a?.org_name===s.org_name?e.jsx(w,{width:"20px",height:"20px",size:20,color:"black"}):e.jsx(v,{as:U,fontSize:"lg"})]},n),n!==i?.orgs.length-1&&e.jsx(E,{color:"#ECECEC"})]},n))]}):e.jsxs(fe,{direction:["column","column","row"],spacing:4,mt:16,children:[e.jsx(K,{id:"ss-login-cancel",variant:"accent-outline",bg:"#F5F2FF",px:20,h:"45px",onClick:oe,children:"Cancel"}),e.jsx(ge,{id:"ss-login-confirm",variant:"brand",px:20,h:"45px",isLoading:x,onClick:W,children:"Confirm"})]})]})]})}export{_e 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.