PageSourceSearch

https://nypost.com/wp-content/plugins/nyp-membership/build/2533.1cc377bc6e1330a4ca28.bundle.min.js

js nypost.com collected 2026-09-24 07:34:35 UTC 3,353 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunknyp_membership=self.webpackChunknyp_membership||[]).push([[2533],{2533:function(e,t,a){a.r(t),a.d(t,{ProfileName:function(){return d}});var s=a(1085),n=a(4041),l=a(7309),i=a(824),r=a(3486),o=a(7093),p=a(316),m=a(7661),u=a(7682),c=a(4120);const d=()=>{const[e,t]=(0,n.useState)(!1),{state:a,dispatch:d}=(0,c.rR)(),{setVisible:f,setShowSuccess:b}=(0,u.Yc)(),{user:{profile:N={}}={}}=a,{fullName:h="",firstName:_="",lastName:y=""}=N,{clearErrors:x,register:g,handleSubmit:v,setError:j,watch:w,formState:{errors:S}}=(0,i.mN)({defaultValues:{firstName:_,lastName:y}}),F=w("firstName"),z=w("lastName"),k=e?(0,l.__)("Loading...","nypost"):(0,l.__)("Update Name","nypost"),L=(0,n.useRef)(S);return L.current=S,(0,n.useEffect)(()=>{var e,t;F&&z&&"zephr"===(null===(t=null===(e=L.current)||void 0===e?void 0:e.zephr)||void 0===t?void 0:t.type)&&x()},[F,z,x]),(0,s.jsxs)("form",{onSubmit:v(e=>{return a=void 0,s=void 0,l=function*(){t(!0);const a={firstName:e.firstName,lastName:e.lastName};h&&h.length||(a.fullName=`${e.firstName} ${e.lastName}`),!0===(yield(0,o.r7)(a))?(d((0,m.Uu)(Object.assign({},a))),f(!1),b(!0)):j("zephr",{type:"zephr",message:r.y.updatingProfile()}),t(!1)},new((n=void 0)||(n=Promise))(function(e,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function r(e){try{o(l.throw(e))}catch(e){t(e)}}function o(t){var a;t.done?e(t.value):(a=t.value,a instanceof n?a:new n(function(e){e(a)})).then(i,r)}o((l=l.apply(a,s||[])).next())});var a,s,n,l}),className:"member-profile__form member-profile__form--update update-name",children:[(0,s.jsxs)("div",{className:"floating-label input-container input-container--floating-label",children:[(0,s.jsx)("input",Object.assign({className:"floating-label__input",id:"updateFirstName",name:"firstName",type:"text",placeholder:" ",pattern:"[A-Za-zÀ-ÿ'\\s-]+",title:(0,l.__)("Only letters, hyphens, apostrophes, and spaces are permitted","nypost")},g("firstName",{setValueAs:e=>p.S.plainText(e),required:(0,l.__)("First name is required","nypost")}),{"data-empty":!F})),(0,s.jsx)("div",{className:"floating-label__label-wrap",children:(0,s.jsx)("label",{className:"floating-label__label",htmlFor:"updateFirstName",children:(0,l.__)("First Name","nypost")})})]}),(0,s.jsxs)("div",{className:"floating-label input-container input-container--floating-label",children:[(0,s.jsx)("input",Object.assign({className:"floating-label__input",id:"updateLastName",name:"lastName",type:"text",placeholder:" ",pattern:"[A-Za-zÀ-ÿ'\\s-]+",title:(0,l.__)("Only letters, hyphens, apostrophes, and spaces are permitted","nypost")},g("lastName",{setValueAs:e=>p.S.plainText(e),required:(0,l.__)("Last name is required","nypost")}),{"data-empty":!z})),(0,s.jsx)("div",{className:"floating-label__label-wrap",children:(0,s.jsx)("label",{className:"floating-label__label",htmlFor:"updateLastName",children:(0,l.__)("Last Name","nypost")})})]}),(0,s.jsx)(u.dF,{errors:S}),(0,s.jsxs)("div",{className:"input-container input-container--submit",children:[(0,s.jsx)("button",{className:"button button--solid button--solid--alt","data-testid":"submit",type:"submit",disabled:e,children:k}),(0,s.jsx)("button",{className:"button button--secondary",onClick:()=>{b(!1),f(!1)},type:"button",children:(0,l.__)("Cancel","nypost")})]})]})}}}]);
2//# sourceMappingURL=2533.1cc377bc6e1330a4ca28.bundle.min.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.