PageSourceSearch

https://velaflow.com/_next/static/chunks/pages/settings/privacy-security-e1c185616fa1cb42.js

js velaflow.com collected 2026-10-01 16:26:07 UTC 8,004 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[101],{25035:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var l=s(37876);s(14232);var r=s(96145);let n=e=>{let{onBack:t,text:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center ml-7 space-x-2 mb-6",children:[(0,l.jsx)(r.In,{onClick:t,id:"arrow-left-icn",className:"w-5 h-5 align-middle inline-block cursor-pointer"}),(0,l.jsx)(r.DZ,{type:"h2",text:s,className:"text-14 text-black"})]}),(0,l.jsx)("hr",{className:"my-2 pl-0 border-dividerGrey"})]})}},74587:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>f,default:()=>j});var l=s(37876),r=s(14232),n=s(96145),a=s(89099),c=s(25035),i=s(81220),d=s(85480),o=s(97685),u=s(10553);let x=[{text:"Muted Words and tags",href:"/settings/privacy-security/muted-tags",icon:"muted-tags-icn"},{text:"Muted accounts",href:"/settings/privacy-security/muted-accounts",icon:"muted-account-icn"},{text:"Blocked accounts",href:"/settings/privacy-security/blocked-accounts",icon:"blocked-account-icn"}],m=e=>{var t,s,m,h,p;let{userDetails:f}=e,j=(0,a.useRouter)(),{data:y}=(0,u.useSession)(),b=null==y||null==(m=y.user)||null==(s=m.userDetails)||null==(t=s.user)?void 0:t.two_factor_enabled;console.log("twoFactorEnabled",b);let[v,g]=(0,r.useState)(null==f||null==(h=f.user)?void 0:h.non_sexual_nudity),[N,w]=(0,r.useState)(!1),[k,_]=(0,r.useState)("SEND_EMAIL"),[E,A]=(0,r.useState)(!1),[D,C]=(0,r.useState)(""),S=async()=>{let e=new FormData;e.append("non_sexual_nudity",+!v),g(!v);try{(await (0,i.Qo)(e)).error&&console.error(error)}catch(e){console.error(e)}},F=async()=>{try{A(!0);let e=new FormData;e.append("enable",1===b?"0":"1");let t=await (0,i.C$)(e);t.error||(A(!1),o.Ay.success(null==t?void 0:t.message),_("VERIFY_CODE"))}catch(t){var e;o.Ay.error(null==(e=response)?void 0:e.error)}finally{A(!1)}},I=async()=>{if(!D||D.length<5)return void o.Ay.error("Please enter valid OTP");try{A(!0);let e=new FormData;e.append("enable",1===b?"0":"1"),e.append("otp",D);let t=await (0,i.mQ)(e);t.error||(A(!1),o.Ay.success(null==t?void 0:t.message),w(!1))}catch(s){var e,t;o.Ay.error((null==s||null==(t=s.response)||null==(e=t.data)?void 0:e.message)||"Invalid OTP")}finally{A(!1)}};return(0,r.useEffect)(()=>(N?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[N]),(0,r.useEffect)(()=>{N||(_("SEND_EMAIL"),C(""))},[N]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"w-full mt-6 rounded-[5px]",children:[(0,l.jsx)("div",{children:(0,l.jsx)(c.A,{onBack:()=>{j.push("/settings")},text:"Privacy & Security"})}),(0,l.jsx)("div",{className:"bg-white p-3 mt-10 rounded-[5px] mx-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center p-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(n.In,{id:"two-fa-icn",className:"w-5 h-5 inline-block text-primary align-middle"}),(0,l.jsx)("span",{className:"text-center text-black text-14 p-2",children:"Two-factor authentication (2FA)"})]}),(0,l.jsx)("div",{children:(0,l.jsx)(n.$n,{className:"text-black text-14 border border-black px-4 py-2 rounded-[5px]",onClick:()=>{w(!0)},children:1===b?"Disable":"Enable"})})]})}),(0,l.jsx)("div",{className:"bg-white p-4 mt-3 rounded-[5px] mx-6",children:(0,l.jsx)("div",{className:"mt-3",children:null==x?void 0:x.map((e,t)=>(0,l.jsx)("div",{className:"flex items-center p-1",children:(0,l.jsxs)(n.N_,{href:e.href,children:[(0,l.jsx)(n.In,{id:e.icon,className:"text-primary w-5 h-5 inline-block align-middle"}),(0,l.jsx)("span",{className:"p-2 text-black text-14",children:e.text})]})},"settings-".concat(t)))})}),(0,l.jsx)("div",{className:"bg-white p-4 mt-3 rounded-[5px] mx-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center p-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(n.In,{id:"non-sexual-icn",className:"w-5 h-5 inline-block text-red align-middle"}),(0,l.jsx)("span",{className:"text-center text-black text-14 p-2",children:"Non-sexual Nudity"})]}),(0,l.jsx)("div",{children:(0,l.jsx)(n.$n,{onClick:()=>S(),className:"w-13 h-6 flex items-center rounded-full p-0 transition-colors duration-300 ".concat(v?"bg-secondaryNavy":"bg-white border border-grey"),children:(0,l.jsx)("div",{className:"bg-primary w-6 h-6 rounded-full shadow-md transform duration-300 ".concat(v?"translate-x-7":"translate-x-0")})})})]})})]}),N&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center",onClick:()=>w(!1),children:(0,l.jsxs)("div",{className:"bg-white w-[420px] rounded-xl p-8 relative",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("button",{className:"absolute right-4 top-4 text-xl",onClick:()=>w(!1),children:"✕"}),"SEND_EMAIL"===k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h2",{class:"text-[40px] mb-4",children:"Verify your email"}),(0,l.jsxs)("p",{class:"text-14 text-grey mb-4",children:["We’ll send an email to ",(0,l.jsxs)("b",{children:[null==f||null==(p=f.user)?void 0:p.email," "]}),"containing a link to complete verification."]}),(0,l.jsx)("button",{className:"w-full bg-blue-600 text-white py-2 rounded-full",disabled:E,onClick:()=>{F()},children:E?(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(n.aH,{})}):"Send OTP"}),(0,l.jsxs)("p",{class:"text-14 text-grey m-4 text-center",children:["Have a code?"," ",(0,l.jsx)("span",{className:"text-blue-600 cursor-pointer",onClick:()=>_("VERIFY_CODE"),children:"Click here"})]})]}),"VERIFY_CODE"===k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h2",{class:"text-[40px] mb-4",children:"Verify email code"}),(0,l.jsx)("p",{class:"text-14 text-grey  text-center",children:"Please enter the code sent to your email."}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(d.A,{setOtpInput:C})}),(0,l.jsx)("button",{className:"w-full bg-blue-400 text-white py-2 rounded-full mt-4",onClick:I,disabled:E,children:E?(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(n.aH,{})}):"Verify code"}),(0,l.jsxs)("p",{class:"text-14 text-grey m-4 text-center mt-4",children:["Don’t have a code?"," ",(0,l.jsx)("span",{className:"text-blue-600 cursor-pointer",onClick:()=>_("SEND_EMAIL"),children:"Click here"})]})]})]})})]})};var h=s(42489),p=s(80612),f=!0;function j(e){let{userDetails:t,suggestionList:s,tagsList:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.A,{title:"Privacy & Security"}),(0,l.jsx)(h.A,{tagsList:r,userDetails:t,suggestionList:s,children:(0,l.jsx)(m,{userDetails:t})})]})}},79633:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/privacy-security",function(){return s(74587)}])},80612:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(37876),r=s(77328),n=s.n(r);function a(e){let{title:t}=e;return(0,l.jsx)(n(),{children:(0,l.jsx)("title",{children:t?"".concat(t," | Velaflow"):"Velaflow"})})}},85480:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var l=s(37876),r=s(14232);let n=e=>{let{setOtpInput:t}=e,[s,n]=(0,r.useState)(Array(6).fill("")),a=(0,r.useRef)([]);(0,r.useEffect)(()=>{a.current[0]&&a.current[0].focus()},[]);let c=e=>{var l;e.preventDefault();let r=e.clipboardData.getData("Text").trim().replace(/\s/g,"").slice(0,6);if(!/^[0-9a-zA-Z]+$/.test(r))return;let c=[...s];for(let e=0;e<6;e++)c[e]=r[e]||"",a.current[e]&&(a.current[e].value=r[e]||"");n(c),t(c.join(""));let i=r.length<6?r.length:5;null==(l=a.current[i])||l.focus()};return(0,l.jsx)("div",{className:"flex gap-2 mt-4",children:s.map((e,r)=>
1(0,l.jsx)("input",{type:"text",maxLength:1,value:e,onChange:e=>((e,l)=>{let r=e.target.value;if(!/^[0-9a-zA-Z]?$/.test(r))return;let c=[...s];c[l]=r,n(c),t(c.join("")),r&&l<5&&a.current[l+1].focus()})(e,r),onKeyDown:e=>((e,t)=>{"Backspace"===e.key&&""===s[t]&&t>0&&a.current[t-1].focus()})(e,r),onPaste:c,ref:e=>a.current[r]=e,className:"w-10 h-10 text-black font-normal md:w-12 md:h-12 text-center text-2xl border border-grey rounded focus:outline-none focus:ring-2 focus:ring-primary"},r))})}}},e=>{e.O(0,[4668,9634,2489,636,6593,8792],()=>e(e.s=79633)),_N_E=e.O()}]);

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.