PageSourceSearch

https://primebank.com.np/static/js/8643.cb81d3c6.chunk.js

js primebank.com.np collected 2026-10-02 03:41:11 UTC 9,714 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkprime_react_mui=self.webpackChunkprime_react_mui||[]).push([[8643],{41312:function(e,r,i){i(47313);r.Z=i.p+"static/media/contactSVG.f3eeacb48bb3f23fcc9ecdb75d796bf8.svg"},8643:function(e,r,i){i.r(r),i.d(r,{default:function(){return p}});var t=i(1413),a=i(74165),s=i(15861),n=i(29439),o=i(47313),u=i(36059),l=i(75627),c=i(54623),d=i(20170),m=i(73411),v=i(41312),b=i(46417),p=function(){var e,r,i,p,f,h,g=(0,l.cI)(),x=g.register,j=g.handleSubmit,Z=g.reset,C=g.formState,y=C.errors,F=C.isSubmitting,N=(0,o.useState)(!1),R=(0,n.Z)(N,2),w=R[0],k=R[1],P=(0,o.useState)(!1),S=(0,n.Z)(P,2),I=S[0],E=S[1],L=function(e,r){var i,t=null===e||void 0===e||null===(i=e.response)||void 0===i?void 0:i.data;return"object"===typeof t&&null!==t?t.status_message||t.message||r:"string"===typeof t&&t.trim()?t:(null===e||void 0===e?void 0:e.message)||r},M=function(){var e=(0,s.Z)((0,a.Z)().mark((function e(r){var i,t,s,n,o,l,c,m;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l={name:null===(i=r.name)||void 0===i?void 0:i.trim(),email:null===(t=r.email)||void 0===t?void 0:t.trim().toLowerCase(),mobno:null===(s=r.mobno)||void 0===s?void 0:s.trim(),subject:null===(n=r.subject)||void 0===n?void 0:n.trim(),issue:null===(o=r.issue)||void 0===o?void 0:o.trim()},e.prev=1,e.next=4,d.Z.post("/grievance/otp",l,{withCredentials:!0});case 4:if(c=e.sent,m=c.data,"success"===String(null===m||void 0===m?void 0:m.status).toLowerCase()){e.next=9;break}return u.ZP.error((null===m||void 0===m?void 0:m.status_message)||(null===m||void 0===m?void 0:m.message)||"Failed to send verification code."),e.abrupt("return",!1);case 9:return E(!0),u.ZP.success((null===m||void 0===m?void 0:m.status_message)||"Verification code sent to your email."),e.abrupt("return",!0);case 14:return e.prev=14,e.t0=e.catch(1),console.error("OTP REQUEST ERROR:",e.t0),u.ZP.error(L(e.t0,"Failed to send verification code.")),e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(r){return e.apply(this,arguments)}}(),q=function(){var e=(0,s.Z)((0,a.Z)().mark((function e(r,i){var t,s,n;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(/^[0-9]{6}$/.test(i||"")){e.next=3;break}return u.ZP.error("Verification code must be 6 digits."),e.abrupt("return",!1);case 3:return t={email:null===r||void 0===r?void 0:r.trim().toLowerCase(),verification:null===i||void 0===i?void 0:i.trim()},e.prev=4,e.next=7,d.Z.post("/grievance/check",t,{withCredentials:!0});case 7:if(s=e.sent,n=s.data,"success"===String(null===n||void 0===n?void 0:n.status).toLowerCase()){e.next=12;break}return u.ZP.error((null===n||void 0===n?void 0:n.status_message)||(null===n||void 0===n?void 0:n.message)||"Invalid verification code."),e.abrupt("return",!1);case 12:return u.ZP.success((null===n||void 0===n?void 0:n.status_message)||"Email verified successfully."),e.abrupt("return",!0);case 16:return e.prev=16,e.t0=e.catch(4),console.error("VERIFY OTP ERROR:",e.t0),u.ZP.error(L(e.t0,"Failed to verify verification code.")),e.abrupt("return",!1);case 21:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(r,i){return e.apply(this,arguments)}}(),_=function(){var e=(0,s.Z)((0,a.Z)().mark((function e(r){var i,t,s,n,o,l,c,m,v,b;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l={name:null===(i=r.name)||void 0===i?void 0:i.trim(),email:null===(t=r.email)||void 0===t?void 0:t.trim().toLowerCase(),mobno:null===(s=r.mobno)||void 0===s?void 0:s.trim(),subject:null===(n=r.subject)||void 0===n?void 0:n.trim(),issue:null===(o=r.issue)||void 0===o?void 0:o.trim()},e.prev=1,e.next=4,d.Z.post("/grievance/form",l,{withCredentials:!0});case 4:if(m=e.sent,v=m.data,"success"===String(null===v||void 0===v?void 0:v.status).toLowerCase()){e.next=9;break}return u.ZP.error((null===v||void 0===v?void 0:v.status_message)||(null===v||void 0===v?void 0:v.message)||"Grievance submission failed."),e.abrupt("return",!1);case 9:return(b=(null===v||void 0===v||null===(c=v.data)||void 0===c?void 0:c.reference)||"")?u.ZP.success("Grievance submitted successfully. Reference: ".concat(b)):u.ZP.success((null===v||void 0===v?void 0:v.status_message)||"Grievance submitted successfully."),Z(),E(!1),e.abrupt("return",!0);case 16:return e.prev=16,e.t0=e.catch(1),console.error("FORM SUBMIT ERROR:",e.t0),u.ZP.error(L(e.t0,"Unable to submit grievance.")),e.abrupt("return",!1);case 21:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(r){return e.apply(this,arguments)}}(),V=function(){var e=(0,s.Z)((0,a.Z)().mark((function e(r){var i,t,s,n;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!w&&!F){e.next=2;break}return e.abrupt("return");case 2:if(k(!0),e.prev=3,I){e.next=8;break}return e.next=7,M(r);case 7:return e.abrupt("return");case 8:if(!I){e.next=18;break}return s=null===(i=r.email)||void 0===i?void 0:i.trim().toLowerCase(),n=null===(t=r.verification)||void 0===t?void 0:t.trim(),e.next=13,q(s,n);case 13:if(e.sent){e.next=16;break}return e.abrupt("return");case 16:return e.next=18,_(r);case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(3),console.error("GRIEVANCE ERROR:",e.t0),u.ZP.error(L(e.t0,"An error occurred."));case 24:return e.prev=24,k(!1),e.finish(24);case 27:case"end":return e.stop()}}),e,null,[[3,20,24,27]])})));return function(r){return e.apply(this,arguments)}}();return(0,b.jsxs)("div",{style:{backgroundColor:"#f3f3f3"},children:[(0,b.jsx)("div",{className:"getInTouchPageHeaderImageContainer",style:{background:"linear-gradient(\n            rgb(169, 58, 124, 0.7),\n            rgb(169, 58, 124, 0.7)\n          ), url(".concat(m,")")},children:(0,b.jsx)("h1",{className:"getInTouchPageHeaderText",children:"Grievance Form"})}),(0,b.jsxs)("div",{className:"grievanceFormMainContainer",children:[(0,b.jsx)("img",{className:"grievanceFormImage",src:v.Z,alt:"contact"}),(0,b.jsxs)("div",{className:"grievancePageFormContainer",role:"region","aria-label":"Grievance Form",tabIndex:"0",children:[(0,b.jsx)("h3",{children:I?"Please find the verification code on the email you provided":"How may We help you?"}),(0,b.jsxs)("form",{onSubmit:j(V),children:[!I&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"grievanceFormInputContainer",children:[(0,b.jsx)("label",{htmlFor:"fullName",children:"Full Name"}),(0,b.jsx)("input",(0,t.Z)({id:"fullName",type:"text",placeholder:"Full Name",autoComplete:"name","aria-describedby":"name-error"},x("name",{required:"Full Name is Required",maxLength:{value:150,message:"Full Name must be less than 150 characters"}}))),(0,b.jsx)("span",{id:"name-error",children:null===(e=y.name)||void 0===e?void 0:e.message})]}),(0,b.jsxs)("div",{className:"grievanceFormInputContainer",children:[(0,b.jsx)("label",{htmlFor:"email",children:"Email Address"}),(0,b.jsx)("input",(0,t.Z)({id:"email",type:"email",placeholder:"Email Address",autoComplete:"email","aria-describedby":"email-error"},x("email",{required:"Email is Required",pattern:{value:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,message:"Invalid email address"},maxLength:{value:254,message:"Email address is too long"}}))),(0,b.jsx)("span",{id:"email-error",children:null===(r=y.email)||void 0===r?void 0:r.message})]}),(0,b.jsxs)("div",{className:"grievanceFormInputContainer",children:[(0,b.jsx)("label",{htmlFor:"mobile",children:"Mobile Number"}),(0,b.jsx)("input",(0,t.Z)({id:"mobile",type:"tel",placeholder:"Mobile Number",autoComplete:"tel","aria-describedby":"mobno-error"},x("mobno",{required:"Mobile Number is Required",pattern:{value:/^[0-9+\-\s()]{7,30}$/,message:"Invalid Phone or Mobile Number"}}))),(0,b.jsx)("span",{id:"mobno-error",children:null===(i=y.mobno
1)||void 0===i?void 0:i.message})]}),(0,b.jsxs)("div",{className:"grievanceFormInputContainer",children:[(0,b.jsx)("label",{htmlFor:"subject",children:"Subject"}),(0,b.jsx)("input",(0,t.Z)({id:"subject",type:"text",placeholder:"Subject","aria-describedby":"subject-error"},x("subject",{required:"Subject is Required",maxLength:{value:255,message:"Subject must be less than 255 characters"}}))),(0,b.jsx)("span",{id:"subject-error",children:null===(p=y.subject)||void 0===p?void 0:p.message})]}),(0,b.jsxs)("div",{className:"grievanceFormInputContainer",children:[(0,b.jsx)("label",{htmlFor:"message",children:"Your Message"}),(0,b.jsx)("textarea",(0,t.Z)({id:"message",rows:"5",placeholder:"Your Message","aria-describedby":"issue-error"},x("issue",{required:"Message is Required",minLength:{value:10,message:"Message must be at least 10 characters"},maxLength:{value:5e3,message:"Message must be less than 5000 characters"}}))),(0,b.jsx)("span",{id:"issue-error",children:null===(f=y.issue)||void 0===f?void 0:f.message})]})]}),I&&(0,b.jsxs)("div",{className:"grievanceFormInputContainer",children:[(0,b.jsx)("label",{htmlFor:"verificationCode",children:"Email Verification Code"}),(0,b.jsx)("input",(0,t.Z)({id:"verificationCode",type:"text",inputMode:"numeric",maxLength:6,autoComplete:"one-time-code",placeholder:"Verification Code","aria-describedby":"verification-error"},x("verification",{required:"Verification Code is Required",pattern:{value:/^[0-9]{6}$/,message:"Verification code must be 6 digits"}}))),(0,b.jsx)("span",{id:"verification-error",children:null===(h=y.verification)||void 0===h?void 0:h.message})]}),(0,b.jsx)("div",{className:"grievanceFormButtonsContainer",children:(0,b.jsxs)("button",{className:"grievanceFormResetButton grievanceSubmitButton",type:"submit",disabled:F||w,children:[w&&(0,b.jsx)(c.Z,{size:20,color:"#fff"}),I?"Verify & Submit":"Send OTP"]})})]})]})]})]})}},73411:function(e,r,i){e.exports=i.p+"static/media/Contact-Us-BG.b418a6f1bf5bf4f767f8.webp"}}]);

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.