PageSourceSearch

https://pixwire.net/_next/static/chunks/2061.7956c94aac1b17f5.js

js pixwire.net collected 2026-10-05 01:09:59 UTC 11,511 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2061],{4075:function(e,t,r){r.d(t,{Z:function(){return a}});var s=r(3288);r(2466);var n=r(426);function a(e){var t=e.className,r=e.size,a=void 0===r?"100px":r;return(0,s.jsx)("div",{className:"flex items-center w-full h-full text-center ".concat(void 0===t?"":t),children:(0,s.jsx)("div",{className:"mx-auto",children:(0,s.jsx)(n.NB,{height:a,width:a,colors:["#dc6e80","#b9668f","#8e6292","#635d88","#415473"]})})})}},6785:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(3288),n=r(2466),a=r(7240);function l(e){var t=e.children,r=e.close,l=e.open;return((0,n.useEffect)(function(){var e=function(e){"Escape"===e.key&&r()};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[]),!1===l)?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)("div",{className:"absolute top-0 left-0 z-40 flex w-full h-full bg-black bg-opacity-25",onClick:r,children:(0,s.jsxs)("div",{className:"relative z-50 self-center p-8 m-auto text-center bg-white rounded shadow-xl",onClick:function(e){return e.stopPropagation()},children:[(0,s.jsx)("button",{className:"absolute top-0 right-0 mt-3 mr-4 text-xl text-gray-600 hover:text-black",onClick:function(){r()},children:(0,s.jsx)(a.aHS,{className:"inline"})}),(0,s.jsx)("div",{className:"inline",children:t})]})})}},2061:function(e,t,r){r.r(t),r.d(t,{default:function(){return b}});var s=r(1017),n=r(9354),a=r(132),l=r(3288),i=r(8082),c=r(2466),d=r(2829),o=r(3656),u=r(3600),m=r(4075);function x(e){var t,r=(0,n.Z)((0,c.useState)(e.defaultAvatarUrl),2),i=r[0],d=r[1],u=(0,n.Z)((0,c.useState)(!1),2),x=u[0],h=u[1],p=(0,n.Z)((0,c.useState)(!1),2),f=p[0],b=p[1],g=(t=(0,s.Z)(function(e){var t,r,s;return(0,a.__generator)(this,function(n){switch(n.label){case 0:if(!e.target.files||!e.target.files.length)return[2];return t=e.target.files[0],(r=new FormData).append("picture",t),s={method:"POST",body:r,credentials:"include"},b(!1),h(!0),[4,fetch("https://api.pixwire.net/users/me/avatar",s).then(function(e){e.json().then(function(e){d(e.picture)})}).catch(function(e){b(!0)}).finally(function(){return h(!1)})];case 1:return n.sent(),[2]}})}),function(e){return t.apply(this,arguments)});return(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsxs)("label",{className:"flex justify-center w-48 h-48 m-4 text-transparent duration-300 ease-out bg-black rounded-full cursor-pointer group hover:text-white",children:[x?(0,l.jsx)("div",{className:"relative w-48 h-48 rounded-full"}):(0,l.jsx)("img",{className:"relative w-48 h-48 transition-opacity duration-300 ease-out rounded-full group-hover:opacity-25",src:i}),(0,l.jsx)("input",{type:"file",className:"hidden",onChange:g,disabled:x}),x?(0,l.jsx)("div",{className:"absolute self-center",children:(0,l.jsx)(m.Z,{size:"48"})}):(0,l.jsx)(o.U$P,{className:"absolute self-center text-4xl"})]}),f?(0,l.jsx)("div",{className:"flex justify-center text-red-700",children:"Failed to upload image, please try again!"}):(0,l.jsx)("div",{className:"m-3"})]})}var h=r(6785);function p(e){var t=e.close,r=(0,i.Z)("app").t,d=(0,n.Z)((0,c.useState)(""),2),o=d[0],x=d[1],p=(0,n.Z)((0,c.useState)(""),2),f=p[0],b=p[1],g=(0,n.Z)((0,c.useState)(""),2),v=g[0],w=g[1],j=(0,n.Z)((0,c.useState)(!1),2),y=j[0],N=j[1],_=(0,n.Z)((0,u.$h)(),2),Z=(_[0].fetching,_[1]);function k(){return(k=(0,s.Z)(function(e){return(0,a.__generator)(this,function(t){switch(t.label){case 0:return[4,Z({input:{newPassword:e}},{requestPolicy:"network-only"})];case 1:return t.sent(),[2]}})})).apply(this,arguments)}function C(){return(C=(0,s.Z)(function(){return(0,a.__generator)(this,function(e){switch(e.label){case 0:if(!(""===o?(w(r("app:settings.pwd_modal_err_empty")),!1):o.length>500?(w(r("app:settings.pwd_modal_err_max")),!1):o.length<8?(w(r("app:settings.pwd_modal_err_min")),!1):o!==f?(w(r("app:settings.pwd_modal_err_diff")),!1):(w(""),!0)))return N(!1),[2];return[4,function(e){return k.apply(this,arguments)}(o)];case 1:return e.sent(),N(!1),t(),[2]}})})).apply(this,arguments)}return(0,l.jsx)(h.Z,{close:t,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"p-4 mb-8 text-2xl font-bold text-black",children:r("app:settings.change_password")}),(0,l.jsxs)("div",{className:"w-full max-w-2xl",children:[(0,l.jsxs)("div",{className:"mb-6 md:flex md:items-center",children:[(0,l.jsx)("div",{className:"md:w-1/3",children:(0,l.jsx)("label",{className:"block pr-4 mb-1 font-bold text-gray-500 md:text-right md:mb-0",htmlFor:"password",children:r("app:settings.password")})}),(0,l.jsx)("div",{className:"md:w-2/4",children:(0,l.jsx)("input",{disabled:y,className:"w-full px-4 py-2 leading-tight text-gray-700 border-2 border-gray-300 rounded appearance-none focus:outline-none focus:bg-white focus:border-blue-500 hover:border-blue-300 "+(y&&"bg-gray-300 border-gray-400"),id:"password",type:"password",value:o,onChange:function(e){return x(e.target.value)}})})]}),(0,l.jsxs)("div",{className:"mb-6 md:flex md:items-center",children:[(0,l.jsx)("div",{className:"md:w-1/3",children:(0,l.jsx)("label",{className:"block pr-4 mb-1 font-bold text-gray-500 md:text-right md:mb-0",htmlFor:"password2",children:r("app:settings.confirm_password")})}),(0,l.jsx)("div",{className:"md:w-2/4",children:(0,l.jsx)("input",{disabled:y,className:"w-full px-4 py-2 leading-tight text-gray-700 border-2 border-gray-300 rounded appearance-none focus:outline-none focus:bg-white focus:border-blue-500 hover:border-blue-300 "+(y&&"bg-gray-300 border-gray-400"),id:"password2",type:"password",value:f,onChange:function(e){return b(e.target.value)}})})]}),""!==v?(0,l.jsx)("div",{className:"text-red-700 text-bold",children:v}):(0,l.jsx)("div",{className:"p-3",children:" "})]}),(0,l.jsxs)("div",{className:"flex justify-end px-4 pt-4 pb-2",children:[(0,l.jsx)("button",{className:"px-4 py-2 mr-4 font-semibold text-white bg-red-500 border-2 border-red-600 rounded hover:bg-red-600 hover:border-red-700 "+(y&&"border-red-900 bg-red-900"),onClick:t,disabled:y,children:r("app:settings.pwd_modal_cancel")}),y?(0,l.jsx)("div",{className:"flex items-center w-10 h-10 px-10 py-2",children:(0,l.jsx)(m.Z,{size:"28px"})}):(0,l.jsx)("button",{className:"px-4 py-2 font-semibold text-white bg-blue-500 border-2 border-blue-600 rounded hover:bg-blue-600 hover:border-blue-700",onClick:function(){!function(){C.apply(this,arguments)}()},children:r("app:settings.pwd_modal_save")})]})]})})}var f=r(1395);function b(){var e=(0,i.Z)("app").t,t=(0,f.useRouter)(),r=(0,n.Z)((0,u.UE)({requestPolicy:"cache-and-network"}),2),h=r[0],b=h.fetching,g=h.data;h.error,r[1];var v=(0,n.Z)((0,c.useState)(""),2),w=v[0],j=v[1],y=(0,n.Z)((0,c.useState)(""),2),N=y[0],_=y[1],Z=(0,n.Z)((0,u.PB)(),2),k=Z[0].fetching,C=Z[1],S=(0,n.Z)((0,u.g0)(),2),F=S[0].fetching,P=S[1],E=(0,n.Z)((0,c.useState)(!1),2),z=E[0],U=E[1];if((0,c.useEffect)(function(){b||(j(g.me.displayName),_(g.me.email))},[g]),b)return(0,l.jsx)("div",{className:"flex flex-col items-center w-full h-full m-auto bg-white",children:(0,l.jsx)(m.Z,{})});var B=function(){U(!1)};function A(){return(A=(0,s.Z)(function(){return(0,a.__generator)(this,function(e){switch(e.label){case 0:if(!confirm("Are you sure you want to delete your account?"))return[2];return[4,fetch("https://api.pixwire.net/users/me",{method:"delete",credentials:"include"})];case 1:return e.sent(),[4,fetch("https://api.pixwire.net/users/logout",{credentials:"include"})];case 2:return e.sent(),localStorage.clear(),t.push("/"),[2]}})})).apply(this,arguments)}return(0,l.jsxs)(l.Fragment,{children:[z&&(0,l.jsx)(p,{close:B}),(0,l.jsx)("div",{className:"flex flex-col h-screen w-full overflow-y-auto content-center",children:(0,l.jsxs)("div",{className:"flex flex-col items-center m-auto bg-white w-max px-20 py-10 rounded-lg shadow",children:[(0,l.jsx)("div",{className:"mb-5",children:(0,l.jsx)(x,{defaultAvatarUrl:g.me.avatarUrl})}),(0,l.jsxs)("div",{className:"w-full max-w-2xl",children:[(0,l.jsxs)("div",{className:"mb-6 md:flex md:items-center",children:[(0,l.jsx)("div",{className:"md:w-1/4",children:(0,l.jsx)("label",{className:"block pr-4 mb-1 font-bold text-gray-500 md:text-right md:mb-0",htmlFor:"displayName",children:e("app:settings.username")})}),(0,l.jsx)("div",{className:"md:w-2/4",children:(0,l.jsx)("input",{disabled:k,className:"w-full px-4 py-2 leading-tight text-gray-700 border-2  rounded appearance-none focus:outline-none focus:bg-white focus:border-blue-500 hover:border-blue-300 "+(k?"bg-gray-300 border-gray-400":"border-gray-300"),id:"displayName",type:"text",value:w,onChange:function(e){j(e.target.value)}})}),k&&(0,l.jsx)("div",{className:"flex items-center w-10 h-10 ml-3",children:(0,l.jsx)(m.Z,{size:"28px"})}),!k&&w!==g.me.displayName&&(0,l.jsxs)("div",{className:"md:w-1/4",children:[(0,l.jsx)("button",{className:"py-2 ml-2 mr-1",onClick:(0,s.Z)(function(){return(0,a.__generator)(this,function(e){switch(e.label){case 0:return[4,C({name:w})];case 1:return e.sent(),[2]}})}),children:(0,l.jsx)(d.mny,{className:"text-2xl hover:text-green-700"})}),(0,l.jsx)("button",{className:"py-2 ml-1",onClick:function(){j(g.me.displayName)},children:(0,l.jsx)(o.B4e,{className:"text-2xl hover:text-red-700"})})]})]}),(0,l.jsxs)("div",{className:"mb-6 md:flex md:items-center",children:[(0,l.jsx)("div",{className:"md:w-1/4",children:(0,l.jsx)("label",{className:"block pr-4 mb-1 font-bold text-gray-500 md:text-right md:mb-0",htmlFor:"email",children:e("app:settings.email")})}),(0,l.jsx)("div",{className:"md:w-2/4",children:(0,l.jsx)("input",{disabled:F,className:"w-full px-4 py-2 leading-tight text-gray-700 border-2  rounded appearance-none focus:outline-none focus:bg-white focus:border-blue-500 hover:border-blue-300 "+(F?"bg-gray-300 border-gray-400":"border-gray-300"),id:"email",type:"text",value:N,onChange:function(e){_(e.target.value)}})}),F&&(0,l.jsx)("div",{className:"flex items-center w-10 h-10 ml-3",children:(0,l.jsx)(m.Z,{size:"28px"})}),!F&&N!==g.me.email&&(0,l.jsxs)("div",{className:"md:w-1/4",children:[(0,l.jsx)("button",{className:"py-2 ml-2 mr-1",onClick:(0,s.Z)(function(){return(0,a.__generator)(this,function(e){switch(e.label){case 0:return[4,P({email:N})];case 1:return e.sent(),[2]}})}),children:(0,l.jsx)(d.mny,{className:"text-2xl hover:text-green-700"})}),(0,l.jsx)("button",{className:"py-2 ml-1",onClick:function(){j(g.me.email)},children:(0,l.jsx)(o.B4e,{className:"text-2xl hover:text-red-700"})})]})]}),(0,l.jsxs)("div",{className:"mb-6 md:flex md:items-center",children:[(0,l.jsx)("div",{className:"md:w-1/4",children:(0,l.jsx)("label",{className:"block pr-4 mb-1 font-bold text-gray-500 md:text-right md:mb-0",htmlFor:"password",children:e("app:settings.password")})}),(0,l.jsx)("div",{className:"md:w-2/4",children:(0,l.jsx)("a",{className:"text-lg text-blue-700 cursor-pointer hover:text-blue-900",onClick:function(){U(!0)},children:e("app:settings.change_password")})})]}),(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)("button",{className:"bg-red-700 rounded text-red-50 px-3 py-2 w-max mx-auto",onClick:function(){return A.apply(this,arguments)},children:"Delete my account"})})]})]})})]})}},1017:function(e,t,r){function s(e,t,r,s,n,a,l){try{var i=e[a](l),c=i.value}catch(d){r(d);return}i.done?t(c):Promise.resolve(c).then(s,n)}function n(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var l=e.apply(t,r);function i(e){s(l,n,a,i,c,"next",e)}function c(e){s(l,n,a,i,c,"throw",e)}i(void 0)})}}r.d(t,{Z:function(){return n}})}}]);

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.