1try{!function(){var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="61f59ac5-ab71-4da4-a985-3a738f6553a7",e._sentryDebugIdIdentifier="sentry-dbid-61f59ac5-ab71-4da4-a985-3a738f6553a7")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1031],{5728:(e,r,t)=>{"use strict";t.d(r,{Wt:()=>h});var a=t(37876),i=t(82386),s=t(16229),n=t(75255),l=t(53869),o=t(18387),d=t(89461),u=t(86344),c=t(56044);let[p,m]=(0,s.q)({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormError />\" "}),h=(0,d.R)((e,r)=>{let t=(0,u.o)("FormError",e),s=(0,i.M)(e),o=(0,l.Uc)();return o?.isInvalid?(0,a.jsx)(p,{value:t,children:(0,a.jsx)(c.B.div,{...o?.getErrorMessageProps(s,r),className:(0,n.cx)("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...t.text}})}):null});h.displayName="FormErrorMessage",(0,d.R)((e,r)=>{let t=m(),i=(0,l.Uc)();if(!i?.isInvalid)return null;let s=(0,n.cx)("chakra-form__error-icon",e.className);return(0,a.jsx)(o.I,{ref:r,"aria-hidden":!0,...e,__css:t.icon,className:s,children:(0,a.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}).displayName="FormErrorIcon"},9749:(e,r,t)=>{"use strict";t.d(r,{M:()=>f,Z:()=>h});var a=t(37876),i=t(82386),s=t(16229),n=t(75255),l=t(89435),o=t(74715),d=t(14232),u=t(89461),c=t(86344),p=t(56044);let[m,h]=(0,s.q)({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<InputGroup />\" "}),f=(0,u.R)(function(e,r){let t=(0,c.o)("Input",e),{children:s,className:u,...h}=(0,i.M)(e),f=(0,n.cx)("chakra-input__group",u),g={},b=(0,l.a)(s),x=t.field;b.forEach(e=>{t&&(x&&"InputLeftElement"===e.type.id&&(g.paddingStart=x.height??x.h),x&&"InputRightElement"===e.type.id&&(g.paddingEnd=x.height??x.h),"InputRightAddon"===e.type.id&&(g.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(g.borderStartRadius=0))});let y=b.map(r=>{let t=(0,o.o)({size:r.props?.size||e.size,variant:r.props?.variant||e.variant});return"Input"!==r.type.id?(0,d.cloneElement)(r,t):(0,d.cloneElement)(r,Object.assign(t,g,r.props))});return(0,a.jsx)(p.B.div,{className:f,ref:r,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...t.group},"data-group":!0,...h,children:(0,a.jsx)(m,{value:t,children:y})})});f.displayName="InputGroup"},16658:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/Settings",function(){return t(32974)}])},24747:(e,r,t)=>{"use strict";t.d(r,{c:()=>d});var a=t(37876),i=t(82386),s=t(75255),n=t(89461),l=t(86344),o=t(56044);let d=(0,n.R)(function(e,r){let{borderLeftWidth:t,borderBottomWidth:n,borderTopWidth:d,borderRightWidth:u,borderWidth:c,borderStyle:p,borderColor:m,...h}=(0,l.V)("Divider",e),{className:f,orientation:g="horizontal",__css:b,...x}=(0,i.M)(e);return(0,a.jsx)(o.B.hr,{ref:r,"aria-orientation":g,...x,__css:{...h,border:"0",borderColor:m,borderStyle:p,...{vertical:{borderLeftWidth:t||u||c||"1px",height:"100%"},horizontal:{borderBottomWidth:n||d||c||"1px",width:"100%"}}[g],...b},className:(0,s.cx)("chakra-divider",f)})});d.displayName="Divider"},32974:(e,r,t)=>{"use strict";t.r(r),t.d(r,{__N_SSP:()=>C,default:()=>E});var a=t(37876),i=t(60851),s=t(59803),n=t(53869),l=t(82736),o=t(9749),d=t(96491),u=t(38890),c=t(18387),p=t(46676),m=t(5728),h=t(11913),f=t(14232),g=t(88992),b=t(13810),x=t(74869),y=t(59571),v=t(29781),_=t(46748),I=t(3297),j=t(85479),S=t(22029),w=t(78007),k=t(89099),N=t(47082),F=t(60513);let R=F.z.object({name:F.z.string().min(2,{message:"Enter your name as it should appear to others."}),photo:F.z.custom().optional()});var C=!0;let E=()=>{let{t:e}=(0,h.Bd)(),{colorMode:r,themeColors:t}=(0,S.FG)(),F=(0,f.useRef)(null);(0,k.useRouter)();let{user:C,status:E,session:P,session:{userData:T}}=(0,v.Ay)(),[M,U]=(0,f.useState)(T?.photoUrls?.[0]??C?.image??""),{data:q,error:D,loading:B}=(0,I.o9)({variables:{id:C?.clinicId??-1},skip:!C?.clinicId}),[z,{data:A,error:O,loading:L}]=(0,j.$1)();q?.clinic;let $=(0,f.useCallback)(()=>T?.name??C?.name??"",[C?.name,T?.name]),G=P.userData?.emailAddress??P?.user?.email??"",H=(0,g.mN)({resolver:(0,b.u)(R),defaultValues:async()=>({name:$()})});_.aD.debug("user?.name = "+C?.name),(0,f.useEffect)(()=>{_.aD.debug("resetting user?.name = "+$()),H.reset({name:$()})},[$]);let{errors:V,isSubmitting:W,isValid:Z,isDirty:J}=H.formState,{onChange:X,...Y}=H.register("photo",{validate:e=>{if(!e||e.length<1)return"Files is required";for(let r of Array.from(e))if(r.size/1048576>10)return"Max file size 10mb";return!0}}),K=H.getValues("photo"),Q=async e=>{_.aD.debug("onSubmit",e);let r=[M??C?.image??"",...T?.photoUrls??[]],{data:t,errors:a}=await z({variables:{userId:C?.realUserId??-1,photoUrls:r,...e}});!a&&C&&T&&(T.name=e.name,T.photoUrls=r)},ee=async e=>{let r,t=await fetch((0,y.p)("/api/upload"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:"dash-userphoto-",contentType:"application/octet-stream"})});_.aD.debug("onUploadPhoto response",t);{let{putUrl:a,fields:i}=await t.json();await fetch(a,{method:"PUT",headers:{"Content-Type":"application/octet-stream"},body:e.target.files?.[0]}
1),r=a.split("?")[0]}_.aD.debug("new url = "+r),C&&(C.image=r),U(r)};if(B)return(0,a.jsx)(i.y,{p:10});let er=String((K?.length&&K.length>0?K:M??T?.photoUrls?.[0]??C?.image)??"");return _.aD.debug("imageUrl = ",{imageUrl:er,purl:K,userImage:C?.image}),(0,a.jsx)(w.A,{whichScreen:"SETTINGS",children:(0,a.jsx)(s.s,{justifyContent:"flex-start",width:"auto",top:0,direction:"column",bg:t.background,color:"white",px:6,py:8,children:(0,a.jsx)(g.Op,{...H,children:(0,a.jsxs)("form",{onSubmit:H.handleSubmit(Q),children:[(0,a.jsx)(n.MJ,{isInvalid:!!V,children:(0,a.jsxs)(s.s,{direction:"column",margin:10,children:[(0,a.jsx)(l.D,{mb:2,children:e("Profile")}),(0,a.jsx)(x.F,{name:$(),email:G,image:er,id:0}),(0,a.jsxs)(o.M,{onClick:()=>F.current?.click(),children:[(0,a.jsx)(d.p,{hidden:!0,type:"file",...Y,accept:"image/*",ref:F,onChange:ee}),(0,a.jsx)(u.$,{leftIcon:(0,a.jsx)(c.I,{as:N.t76}),children:e("Upload new Profile Photo")})]}),(0,a.jsx)(p.l,{mt:8,color:"text",children:e("Your name")}),(0,a.jsx)(d.p,{id:"name",color:"text",width:"40em",autoCapitalize:"words",placeholder:"Your name",...H.register("name")}),(0,a.jsx)(m.Wt,{children:V.name?.message})]})}),(0,a.jsx)(s.s,{direction:"row",align:"center",mt:8,ml:10,children:(0,a.jsx)(u.$,{colorScheme:"primary5",isLoading:W,disabled:!J,type:"submit",children:e("Save changes")})})]})})})})}},46676:(e,r,t)=>{"use strict";t.d(r,{l:()=>u});var a=t(37876),i=t(82386),s=t(75255),n=t(53869),l=t(89461),o=t(86344),d=t(56044);let u=(0,l.R)(function(e,r){let t=(0,o.V)("FormLabel",e),l=(0,i.M)(e),{className:u,children:p,requiredIndicator:m=(0,a.jsx)(c,{}),optionalIndicator:h=null,...f}=l,g=(0,n.Uc)(),b=g?.getLabelProps(f,r)??{ref:r,...f};return(0,a.jsxs)(d.B.label,{...b,className:(0,s.cx)("chakra-form__label",l.className),__css:{display:"block",textAlign:"start",...t},children:[p,g?.isRequired?m:h]})});u.displayName="FormLabel";let c=(0,l.R)(function(e,r){let t=(0,n.Uc)(),i=(0,n.TP)();if(!t?.isRequired)return null;let l=(0,s.cx)("chakra-form__required-indicator",e.className);return(0,a.jsx)(d.B.span,{...t?.getRequiredIndicatorProps(e,r),__css:i.requiredIndicator,className:l})});c.displayName="RequiredIndicator"},53869:(e,r,t)=>{"use strict";t.d(r,{MJ:()=>b,TP:()=>h,Uc:()=>g,eK:()=>x});var a=t(37876),i=t(93968),s=t(82386),n=t(16229),l=t(71851),o=t(75255),d=t(14232),u=t(89461),c=t(86344),p=t(56044);let[m,h]=(0,n.q)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[f,g]=(0,n.q)({strict:!1,name:"FormControlContext"}),b=(0,u.R)(function(e,r){let t=(0,c.o)("Form",e),{getRootProps:n,htmlProps:u,...h}=function(e){let{id:r,isRequired:t,isInvalid:a,isDisabled:s,isReadOnly:n,...o}=e,u=(0,d.useId)(),c=r||`field-${u}`,p=`${c}-label`,m=`${c}-feedback`,h=`${c}-helptext`,[f,g]=(0,d.useState)(!1),[b,x]=(0,d.useState)(!1),[y,v]=(0,d.useState)(!1),_=(0,d.useCallback)((e={},r=null)=>({id:h,...e,ref:(0,i.Px)(r,e=>{e&&x(!0)})}),[h]),I=(0,d.useCallback)((e={},r=null)=>({...e,ref:r,"data-focus":(0,l.s)(y),"data-disabled":(0,l.s)(s),"data-invalid":(0,l.s)(a),"data-readonly":(0,l.s)(n),id:void 0!==e.id?e.id:p,htmlFor:void 0!==e.htmlFor?e.htmlFor:c}),[c,s,y,a,n,p]),j=(0,d.useCallback)((e={},r=null)=>({id:m,...e,ref:(0,i.Px)(r,e=>{e&&g(!0)}),"aria-live":"polite"}),[m]),S=(0,d.useCallback)((e={},r=null)=>({...e,...o,ref:r,role:"group","data-focus":(0,l.s)(y),"data-disabled":(0,l.s)(s),"data-invalid":(0,l.s)(a),"data-readonly":(0,l.s)(n)}),[o,s,y,a,n]);return{isRequired:!!t,isInvalid:!!a,isReadOnly:!!n,isDisabled:!!s,isFocused:!!y,onFocus:()=>v(!0),onBlur:()=>v(!1),hasFeedbackText:f,setHasFeedbackText:g,hasHelpText:b,setHasHelpText:x,id:c,labelId:p,feedbackId:m,helpTextId:h,htmlProps:o,getHelpTextProps:_,getErrorMessageProps:j,getRootProps:S,getLabelProps:I,getRequiredIndicatorProps:(0,d.useCallback)((e={},r=null)=>({...e,ref:r,role:"presentation","aria-hidden":!0,children:e.children||"*"}),[])}}((0,s.M)(e)),g=(0,o.cx)("chakra-form-control",e.className);return(0,a.jsx)(f,{value:h,children:(0,a.jsx)(m,{value:t,children:(0,a.jsx)(p.B.div,{...n({},r),className:g,__css:t.container})})})});b.displayName="FormControl";let x=(0,u.R)(function(e,r){let t=g(),i=h(),s=(0,o.cx)("chakra-form__helper-text",e.className);return(0,a.jsx)(p.B.div,{...t?.getHelpTextProps(e,r),__css:i.helperText,className:s})});x.displayName="FormHelperText"},59571:(e,r,t)=>{"use strict";function a(e,r={}){return Object.keys(r).length>0&&(e+="?"+new URLSearchParams(r)),e}t.d(r,{p:()=>a})},70667:(e,r,t)=>{"use strict";t.d(r,{t:()=>n,v:()=>l});var a=t(71851),i=t(57396),s=t(53869);function n(e){let{isDisabled:r,isInvalid:t,isReadOnly:i,isRequired:s,...n}=l(e);return{...n,disabled:r,readOnly:i,required:s,"aria-invalid":(0,a.r)(t),"aria-required":(0,a.r)(s),"aria-readonly":(0,a.r)(i)}}function l(e){let r=(0,s.Uc)(),{id:t,disabled:a,readOnly:n,required:l,isRequired:o,isInvalid:d,isReadOnly:u,isDisabled:c,onFocus:p,onBlur:m,...h}=e,f=e["aria-describedby"]?[e["aria-describedby"]]:[];return r?.hasFeedbackText&&r?.isInvalid&&f.push(r.feedbackId),r?.hasHelpText&&f.pu
1sh(r.helpTextId),{...h,"aria-describedby":f.join(" ")||void 0,id:t??r?.id,isDisabled:a??c??r?.isDisabled,isReadOnly:n??u??r?.isReadOnly,isRequired:l??o??r?.isRequired,isInvalid:d??r?.isInvalid,onFocus:(0,i.H)(r?.onFocus,p),onBlur:(0,i.H)(r?.onBlur,m)}}}},e=>{e.O(0,[3371,1167,8690,4355,4386,6472,6514,8236,3826,2746,1613,9219,8007,5479,636,6593,8792],()=>e(e.s=16658)),_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.