1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5d5b28ad-08ae-470b-b932-191651a588cd",e._sentryDebugIdIdentifier="sentry-dbid-5d5b28ad-08ae-470b-b932-191651a588cd")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"d2911879bc35c39df91a8e85b8eeba45c19f4ad7"},(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1628],{90345:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/kyc/verifications",function(){return n(74068)}])},62277:function(e,t,n){"use strict";n.d(t,{Z:function(){return Breadcrumb}});var r=n(82729),i=n(85893),a=n(67294),l=n(94200),o=n(13952),s=n(18087),u=n(41664),c=n.n(u),d=n(11163),f=n(70714),m=n(81379);function _templateObject(){let e=(0,r._)(["\n justify-content: ",";\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n flex-direction: row;\n"]);return _templateObject=function(){return e},e}let h=f.default.ol.withConfig({componentId:"sc-50d9eec9-0"})(_templateObject(),e=>{let{justify:t="flex-start"}=e;return t}),g={label:"Home",title:"Go to Home",href:"/"};function Breadcrumb(e){let{links:t,justify:n,...r}=e,{asPath:u}=(0,d.useRouter)(),f=(0,m.default)(),p=(0,a.useMemo)(()=>{var e;let[n,...r]=t,i=r.length&&!f;return[g,i?{...n,label:(e=n.label).length>9?e.substring(0,9)+"...":e}:n,...r]},[t,f]);return(0,i.jsx)(l.x,{as:"nav","aria-label":"Breadcrumb",...r,children:(0,i.jsx)(h,{justify:n,children:p.map((e,t)=>{let{href:n,...r}=e,a=p.length===t+1;return(0,i.jsxs)("li",{children:[(0,i.jsx)(c(),{href:n||u,passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(o.e,{size:f?"small":"xsmall","data-ga":"breadcrumb::click::".concat(r.label.toLowerCase()),...a&&{"aria-current":"page",color:"#bbb"},...r})}),!a&&(0,i.jsx)(s.x,{size:"small",color:"dark-4",margin:{horizontal:"xsmall"},children:"/"})]},t)})})})}},64616:function(e,t,n){"use strict";n.d(t,{Z:function(){return Container}});var r=n(85893),i=n(6984),a=n(25009),l=n(94200),o=n(57670),s=n(1958),u=n(81379);function Container(e){let{onClose:t,title:n,theme:c="dark",children:d,...f}=e,m=(0,u.default)(),h="dark"===c;return(0,r.jsxs)(a.m,{full:!m,animation:"fadeIn",background:h?"#26272C":"#F9F9F9",gap:"small",onClickOutside:t,onEsc:t,children:[(0,r.jsxs)(l.x,{direction:"row",justify:n?"between":"end",align:"center",flex:!1,children:[n&&(0,r.jsx)(o.X,{level:"2",size:m?"small":"medium",margin:{left:"medium",vertical:"none"},children:n}),(0,r.jsx)(s.z,{alignSelf:"end",icon:(0,r.jsx)(i.n,{color:h?"white":"#A0A0A0",size:"large",onClick:t})})]}),(0,r.jsx)(l.x,{overflow:{vertical:"auto"},...f,children:d})]})}},79633:function(e,t,n){"use strict";n.d(t,{Z:function(){return Pagination}});var r=n(85893),i=n(67294),a=n(63846),l=n(91296),o=n.n(l),s=n(81379);function Pagination(e){let{onChange:t,...n}=e,l=(0,s.default)(),u=(0,i.useRef)();u.current=t;let c=(0,i.useMemo)(()=>o()(e=>{let{page:t}=e;return u.current(t)},400,{leading:!0}),[]);return(0,r.jsx)(a.t,{onChange:c,size:"medium",alignSelf:"center",numberMiddlePages:l?6:3,overflow:{horizontal:"auto"},...n})}},39176:function(e,t,n){"use strict";n.d(t,{Z:function(){return formatDateUtc},p:function(){return formatDate}});var r=n(74201),i=n(6446);function formatDateUtc(e){return(0,r.Z)((0,i.ZP)(e||new Date),"dd MMM yyyy")}function formatDate(e){return(0,r.Z)("string"==typeof e?new Date(e):e,"dd MMM yyyy")}},81231:function(e,t,n){"use strict";function getPage(e){var t;let n=Number.parseInt(null!==(t=null==e?void 0:e.toString())&&void 0!==t?t:"",10);return Number.isNaN(n)?1:n}n.d(t,{Z:function(){return getPage}})},6446:function(e,t,n){"use strict";function utc0(e){let t=new Date(e);return t.getTime()+6e4*t.getTimezoneOffset()}function utc0Date(e){return new Date(utc0(e))}function serverOtc0Date(e){let t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())}n.d(t,{FG:function(){return utc0Date},Wj:function(){return serverOtc0Date},ZP:function(){return utc0}})},16093:function(e,t,n){"use strict";n.d(t,{Z:function(){return useIsAdmin}});var r=n(20217),i=n(97407);function useIsAdmin(){let e=(0,i.Z)();return e.role===r.qy}},71845:function(e,t,n){"use strict";n.d(t,{s:function(){return r}});let r=20},85858:function(e,t,n){"use strict";n.d(t,{RO:function(){return useCreate},dV:function(){return useFetchItem},zy:function(){return useFetchList},a$:function(){return usePollingFetch},mt:function(){return useRemove},Gw:function(){return useSubmitAdmin},F:function(){return useSubmitPersonalInfo},vQ:function(){return useSubmitPersonalVideo},sM:function(){return useSubmitTranslator},q7:function(){return useSubmitUtilityBill}});var r=n(6154),i=n(67294),a=n(91521),l=n(24989),o=n(21155),s=n(16093),u=n(97407),c=n(51465);function serialize(e){let{createdAt:t,...n}=e;return{createdAt:new Date(t),processing:!1,...n}}function useCreate(e){let{onSuccess:t}=e,n=(0,o.zn)(),i=(0,u.Z)();return(0,a.Z)({action:e=>i.user.getIdToken().then(t=>r.Z.post("/api/kyc/verifications",e,{headers:{authorization:t}}).then(e=>serialize(e.data))),onError:e=>n.error(e.toString()),onSuccess:e=>{null==t||t(e),n.success("Created")}},[i])}function useFetchList(e,t,n){let i=(0,u.Z)();return(0,l.ZP)({enabled:!!i.user,action:()=>i.user.getIdToken().then(n=>r.Z.get("/api/kyc/verifications",{headers:{authorization:n},params:{page:e,search:t}})).then(e=>{let{kycs:t,total:n}=e.data;return{kycs:t.map(serialize),total:n}
1}),...n},[i.user,e,t])}function useFetchItemInternal(e){let t=(0,u.Z)();return()=>t.user.getIdToken().then(t=>r.Z.get("/api/kyc/verifications/".concat(e),{headers:{authorization:t}}))}function useFetchItem(e,t){let n=useFetchItemInternal(e),r=(0,u.Z)(),i=(0,s.Z)();return(0,l.ZP)({enabled:r.user,action:()=>n().then(e=>({...serialize(e.data),asAdmin:i})),...t},[r.user,e,i])}function usePollingFetch(e){let t=useFetchItemInternal(e),n=(0,c.Tk)(e);(0,i.useEffect)(()=>{let e;let poll=()=>{t().then(e=>{n(t=>{let{personalInfoStatus:n,veriffStatus:r,personalVideoStatus:i,utilityBillStatus:a,utilityBillLink:l,personalVideoLink:o,interviewStatus:s,veriffId:u,veriffUrl:c,veriffState:d,interviewTranslator:f,interviewTranslatorSubmitted:m,interviewVideoLink:h,firstName:g,lastName:p,projectRole:x}=e.data;return t.personalInfoStatus===n&&t.veriffStatus===r&&t.personalVideoStatus===i&&t.utilityBillStatus===a&&t.interviewStatus===s?t:(t.personalInfoStatus!==n&&(t={...t,firstName:g,lastName:p,projectRole:x}),t.veriffStatus!==r&&(t={...t,veriffId:u,veriffUrl:c,veriffState:d}),t.personalVideoStatus!==i&&(t={...t,personalVideoLink:o}),t.utilityBillStatus!==a&&(t={...t,utilityBillLink:l}),t.interviewStatus!==s&&(t={...t,interviewTranslator:f,interviewTranslatorSubmitted:m,interviewVideoLink:h}),{...t,personalInfoStatus:n,veriffStatus:r,personalVideoStatus:i,utilityBillStatus:a,interviewStatus:s})})}).finally(()=>{e=setTimeout(poll,1e4)})};return poll(),()=>clearTimeout(e)},[])}function useCommitSubmit(e,t){let n=(0,o.zn)(),i=(0,c.Tk)(e),l=(0,u.Z)();return(0,a.Z)({action:a=>(i(e=>({...e,processing:!0})),l.user.getIdToken().then(l=>r.Z.put("/api/kyc/verifications/".concat(e,"/").concat(t),a,{headers:{authorization:l}}).then(e=>{let t=serialize(e.data);return i(e=>({...e,...t,processing:!1})),n.info("Submitted"),t}))),onError:e=>{i(e=>({...e,processing:!1})),n.error(e.toString())}},[l.user,e])}function useRemove(e,t){let n=(0,u.Z)(),i=(0,c.Tk)(e),l=(0,c.e)(),s=(0,o.zn)();return(0,a.Z)({action:()=>(i(e=>({...e,processing:!0})),n.user.getIdToken().then(t=>r.Z.delete("/api/kyc/verifications/".concat(e),{headers:{authorization:t}}).then(()=>{setTimeout(()=>l(t=>(delete t[e],t)),1e3),s.info("Deleted")}))),onError:e=>{i(e=>({...e,processing:!1})),s.error(e.toString())},...t},[n])}function useSubmitPersonalInfo(e){return useCommitSubmit(e,"personalInfo")}function useSubmitUtilityBill(e){return useCommitSubmit(e,"utilityBill")}function useSubmitPersonalVideo(e){return useCommitSubmit(e,"personalVideo")}function useSubmitTranslator(e){return useCommitSubmit(e,"translator")}function useSubmitAdmin(e){return useCommitSubmit(e,"")}},9694:function(e,t,n){"use strict";n.d(t,{Ct:function(){return Badge},Ir:function(){return DecisionStatus},ZP:function(){return Status}});var r=n(85893),i=n(94200),a=n(18087),l=n(54986);function Status(e){let{kyc:t}=e,{hasInterview:n,personalInfoStatus:a,veriffStatus:o,personalVideoStatus:s,utilityBillStatus:u,interviewStatus:c}=t,d=[a,o,s,u,n&&c].filter(Boolean);return(0,r.jsx)(i.x,{direction:"row",gap:"xsmall",children:d.map((e,t)=>(0,r.jsx)(l.XL,{count:t+1,background:l.gJ[e]},t))})}function Badge(e){let{children:t,...n}=e;return(0,r.jsx)(i.x,{pad:"xxsmall",round:"xsmall",border:!0,alignSelf:"start",...n,children:(0,r.jsx)(a.x,{size:"small",children:t})})}function DecisionStatus(e){let{children:t}=e;return"approved"===t?(0,r.jsx)(a.x,{color:"status-ok",children:t}):"rejected"===t?(0,r.jsx)(a.x,{color:"status-warning",children:t}):(0,r.jsx)(a.x,{color:"status-disabled",children:"in progress"})}},54986:function(e,t,n){"use strict";n.d(t,{Cq:function(){return Review},VY:function(){return Content},XL:function(){return StepCount},ZP:function(){return Step},fB:function(){return Success},gJ:function(){return c}});var r=n(85893),i=n(94200),a=n(18087),l=n(57670),o=n(85551),s=n(17e3),u=n(81379);let c={notStarted:"border",finished:"neutral-1",review:"dark-2",pending:"white"};function Review(e){let{children:t,...n}=e;return(0,r.jsxs)(i.x,{direction:"row",gap:"xsmall",...n,children:[(0,r.jsx)(o.R,{color:"dark-4"}),(0,r.jsx)(a.x,{color:"dark-4",children:t})]})}function Success(e){let{children:t,...n}=e;return(0,r.jsxs)(i.x,{direction:"row",gap:"xsmall",...n,children:[(0,r.jsx)(s.M,{color:c.finished}),(0,r.jsx)(a.x,{color:c.finished,children:t})]})}
1function StepCount(e){let{count:t,...n}=e;return(0,r.jsx)(i.x,{round:"full",border:!0,flex:!1,pad:{horizontal:"10px",vertical:"2px"},...n,children:(0,r.jsx)(a.x,{size:"medium",children:t})})}function Content(e){let t=(0,u.default)();return(0,r.jsx)(i.x,{margin:t?{left:"56px"}:{},round:"xsmall",responsive:!1,...e})}function Step(e){let{status:t,count:n,title:a,children:o}=e;return(0,r.jsxs)(i.x,{border:{color:c[t]},round:"xsmall",pad:"medium",gap:"medium",children:[(0,r.jsxs)(i.x,{direction:"row",align:"center",children:[(0,r.jsx)(StepCount,{count:n}),(0,r.jsx)(l.X,{level:"3",margin:{left:"medium",vertical:"none"},children:a})]}),o]})}},57067:function(e,t,n){"use strict";function getInitialFrontendState(){return{userTelegram:"",groupTelegram:"",coinSlug:"",userId:"",userAddress:"",firstName:"",lastName:"",socialAccount:"",projectRole:"",email:"",personalInfoStatus:"pending",veriffId:"",veriffUrl:"",veriffState:"",veriffStatus:"notStarted",utilityBillLink:"",utilityBillStatus:"notStarted",personalVideoLink:"",personalVideoStatus:"notStarted",hasInterview:!1,interviewTranslator:"",interviewTranslatorSubmitted:!1,interviewVideoLink:"",interviewStatus:"notStarted",type:"premium",decision:"pending",createdAt:new Date,processing:!1,asAdmin:!1}}n.d(t,{K:function(){return getInitialFrontendState}})},51465:function(e,t,n){"use strict";n.d(t,{Tk:function(){return d},e:function(){return c},xj:function(){return u}});var r=n(94426);let{Provider:i,useCollection:a,useResource:l,useCollectionDispatch:o,useResourceDispatch:s}=(0,r.default)();t.ZP=i;let u=l,c=o,d=s},74068:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return F},default:function(){return KYC}});var r=n(85893),i=n(94200),a=n(1958),l=n(77310),o=n(59459),s=n(71441),u=n(64370),c=n(18087),d=n(13952),f=n(57670),m=n(54206),h=n(41664),g=n.n(h),p=n(11163),x=n(67294),b=n(48839),j=n(81379),S=n(62277),v=n(32704),y=n(64616),w=n(79633),C=n(39176),k=n(81231),I=n(16093),T=n(71845),Z=n(57067),z=n(85858),_=n(9694),P=n(91296),D=n.n(P),A=n(24372);function search_Search(e){let{initialValue:t,onChange:n,...a}=e,[l,s]=(0,x.useState)(t),u=(0,x.useMemo)(()=>D()(e=>n(e),800),[]);return(0,r.jsx)(i.x,{...a,children:(0,r.jsx)(o.o,{icon:(0,r.jsx)(A.o,{}),placeholder:"Slug, name, email, TG username",value:l,onChange:e=>{let{value:t}=e.target;s(t),u(t)},reverse:!0})})}let B={title:"KYC Verifications",description:"list of KYC verifications"},list_getInitialState=()=>({...(0,Z.K)(),disableInterview:!1});function Create(e){var t,n;let{onCreate:c,...d}=e,f=(0,j.default)(),[m,h]=(0,x.useState)(!1),[g,p]=(0,x.useState)(list_getInitialState),[b,,S]=(0,z.RO)({onSuccess:e=>{let{id:t}=e;c(t),p(list_getInitialState),h(!1)}}),v=S||!g.userTelegram||!g.groupTelegram||(null===(t=g.userTelegram)||void 0===t?void 0:t.includes("t.me"))||(null===(n=g.groupTelegram)||void 0===n?void 0:n.includes("t.me")),change=(e,t)=>
1p(n=>({...n,[e]:t}));return(0,r.jsxs)(i.x,{...d,children:[(0,r.jsx)(a.z,{alignSelf:"end",label:"Create Verification",onClick:()=>h(!0)}),m&&(0,r.jsxs)(y.Z,{title:"Create Verification",onClose:()=>h(!1),pad:"medium",width:f?{min:"600px"}:{},flex:!1,children:[(0,r.jsx)(l.W,{label:"Coin Slug",children:(0,r.jsx)(o.o,{placeholder:"coinscope",value:g.coinSlug,onChange:e=>change("coinSlug",e.target.value),disabled:S})}),(0,r.jsx)(l.W,{label:"User Telegram *",children:(0,r.jsx)(o.o,{placeholder:"coinscope_co",value:g.userTelegram,onChange:e=>change("userTelegram",e.target.value),disabled:S})}),(0,r.jsx)(l.W,{label:"Group Telegram *",children:(0,r.jsx)(o.o,{placeholder:"+I2Mz5GhT4-NkYWE0",value:g.groupTelegram,onChange:e=>change("groupTelegram",e.target.value),disabled:S})}),(0,r.jsx)(l.W,{label:"KYC Type",children:(0,r.jsxs)(i.x,{gap:"small",responsive:!1,margin:{left:"small",vertical:"xsmall"},children:[(0,r.jsx)(s.E,{name:"kycType",checked:"simple"===g.type,label:"Simple",onChange:()=>p(e=>({...e,type:"simple",disableInterview:!0})),disabled:S}),(0,r.jsx)(s.E,{name:"kycType",checked:"premium"===g.type,label:"Premium",onChange:()=>p(e=>({...e,type:"premium",disableInterview:!1})),disabled:S})]})}),(0,r.jsx)(u.J,{label:"Disable Interview Step",checked:g.disableInterview,onChange:e=>change("disableInterview",e.target.checked)}),(0,r.jsx)(a.z,{margin:{top:"small"},alignSelf:"end",label:"Create",onClick:()=>b(g),disabled:v,primary:!0})]})]})}let E=[{property:"",header:"No",render:e=>{let{ascending:t}=e;return(0,r.jsx)(c.x,{children:t})}},{property:"createdAt",header:"Created",render:e=>{let{createdAt:t}=e;return(0,r.jsx)(c.x,{children:(0,C.p)(t)})}},{property:"coinSlug",header:"Coin",render:e=>{let{coinSlug:t}=e;return t?(0,r.jsx)(g(),{href:"/coin/".concat(t),passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(d.e,{label:t,color:"brand"})}):(0,r.jsx)(c.x,{children:"-"})}},{property:"groupTelegram",header:"Group TG",render:e=>{let{groupTelegram:t}=e;return(0,r.jsx)(d.e,{label:t,href:"https://t.me/".concat(t),target:"_blank",color:"brand",size:"small"})}},{property:"user",header:"User",render:e=>{let{firstName:t,lastName:n,email:a,userTelegram:l}=e;return(0,r.jsxs)(i.x,{children:[(0,r.jsxs)(c.x,{size:"small",children:[t," ",n]}),(0,r.jsx)(c.x,{size:"small",children:a}),(0,r.jsx)(d.e,{label:l,href:"https://t.me/".concat(l),target:"_blank",color:"brand",size:"small"})]})}},{property:"status",header:"Status",render:e=>(0,r.jsx)(_.ZP,{kyc:e})},{property:"type",header:"Type",render:e=>{let{type:t}=e;return(0,r.jsx)(_.Ct,{children:t})}},{property:"decision",header:"Decision",render:e=>{let{decision:t}=e;return(0,r.jsx)(_.Ir,{children:t})}},{property:"actions",header:"Actions",render:e=>{let{id:t}=e;return(0,r.jsx)(g(),{href:"/kyc/verifications/".concat(t),passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(d.e,{label:"Open",color:"brand"})})}}];function KycListPage(e){let t=(0,p.useRouter)(),n=(0,k.Z)(t.query.page),a=t.query.search||"",l=(0,I.Z)(),pushRouter=e=>{let{nextPage:r=n,nextSearch:i=a}=e,l=[r>1&&"page=".concat(r),i.length>2&&"search=".concat(i)].filter(Boolean).join("&");t.push("?".concat(l),"",{scroll:!1})},o=(0,x.useCallback)(e=>pushRouter({nextPage:e,nextSearch:a}),[a]),[{kycs:s,total:u},c]=(0,z.zy)(n,a,{initialData:{kycs:[],total:0}});return(0,r.jsxs)(v.Z,{height:{min:"600px"},seo:B,...e,children:[(0,r.jsx)(S.Z,{links:[{label:"Admin",title:"Admin",href:"/admin"},{label:"KYC Verifications",title:"KYC Verifications"}]}),(0,r.jsx)(f.X,{level:"2",children:"KYC Verifications"}),l&&(0,r.jsxs)(x.Fragment,{children:[(0,r.jsxs)(i.x,{justify:"between",align:"end",direction:"row",children:[(0,r.jsx)(search_Search,{initialValue:a,onChange:e=>pushRouter({nextPage:1,nextSearch:e})}),(0,r.jsx)(Create,{onCreate:e=>t.push("/kyc/verifications/".concat(e))})]}),!c&&(0,r.jsx)(b.default,{justify:"center",margin:{top:"large"}}),c&&(0,r.jsx)(i.x,{overflow:{horizontal:"auto"},children:(0,r.jsx)(m.w,{margin:{top:"large"},columns:E,data:s,background:"initial"})}),c&&(0,r.jsx)(w.Z,{page:n,onChange:o,step:T.s,numberItems:u,margin:{top:"medium"}})]})]})}var F=!0;function KYC(e){return(0,r.jsx)(KycListPage,{...e})}}},function(e){e.O(0,[5336,4281,1817,4201,299,2704,9774,2888,179],function(){return e(e.s=90345)}),_N_E=e.O()}]); 2//# sourceMappingURL=verifications-e927803412d386eb.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.