PageSourceSearch

https://pocketdocapp.com/9638.54afb153.js

js pocketdocapp.com collected 2026-10-02 00:56:07 UTC 383,244 bytes, 1 lines download raw bytes

1(self.webpackChunkpocketdoc_web=self.webpackChunkpocketdoc_web||[]).push([[9638],{31351:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765);t.A=function(){var e=(0,r.A)(o().mark(function e(t){var n,r,i,l,c,u,s,m,d,p,g,f,y,h;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.firstName,r=t.lastName,i=t.memberId,l=t.dob,c=t.gender,u=t.plan,s=t.planId,m=t.auditId,d=t.providedFirstName,p=t.providedLastName,g=t.processedBy,e.prev=1,e.next=2,a.Ay.post("/api/employee/v2/insurance/verification",{firstName:n,lastName:r,memberId:i,dob:l,gender:c,plan:u,planId:s,auditId:m,providedFirstName:d,providedLastName:p,processedBy:g},{timeout:25e3});case 2:return f=e.sent,y=f.data,e.abrupt("return",y.audit);case 3:throw e.prev=3,h=e.catch(1),new Error(h.msg||"An unexpected error occurred.");case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()},54890:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765),l=function(e,t){return e.name>t.name?1:e.name<t.name?-1:0},c=function(){var e=(0,r.A)(o().mark(function e(){var t,n,r;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,a.Ay.get("/api/insurance-checker/v2/plans");case 1:return t=e.sent,n=t.data,e.abrupt("return",n.insurancePlans.sort(l));case 2:throw e.prev=2,r=e.catch(0),new Error(r||"an unexpected error occurred when fetching insurances");case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}();t.A=c},93024:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765);t.A=function(){var e=(0,r.A)(o().mark(function e(t,n){var r,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,a.Ay.patch("/api/employee/v2/insurance/audits/".concat(t,"/status"),{status:n});case 1:return r=e.sent,i=r.data,e.abrupt("return",i.success);case 2:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},40050:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765);t.A=function(){var e=(0,r.A)(o().mark(function e(t){var n,r,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.appointmentEmrId,r=t.patientEmrIdType,i=t.patientEmrIdValue,e.next=1,a.Ay.delete("/api/employee/cancel-appointment-by-identifiers/".concat(n,"/").concat(r,"/").concat(i));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},77266:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765),l=n(44726);t.A=function(){var e=(0,r.A)(o().mark(function e(t){var n,r;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dob?(0,l.Vn)(t.dob):"",e.next=1,a.Ay.post("/api/employee/lookup/patient-search",{nameOrMrn:t.nameOrMrn,phone:t.phone,dob:n,email:t.email},{timeout:3e4});case 1:return r=e.sent,e.abrupt("return",r.data.results);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},27869:function(e,t,n){"use strict";var r=n(10467),i=n(45458),o=n(54756),a=n.n(o),l=n(98765),c=n(95689),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;return e.reduce(function(e,n,r){var o=Math.floor(r/t);return e[o]=[].concat((0,i.A)(e[o]||[]),[n]),e},[])},s=function(){var e=(0,r.A)(a().mark(function e(t){var n,r;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=u(Array.isArray(t)?t:[t]),e.next=1,Promise.all(n.map(function(e){return l.Ay.get("/api/employee/query-patient-ids",{params:{ids:e.join(","),page:0,limit:Array.isArray(t)?30:1}})}));case 1:return r=e.sent,e.abrupt("return",r.map(function(e){return(e.data.patients||[]).map(c.vb)}).flat());case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();t.A=s},70133:function(e,t,n){"use strict";var r=n(64467),i=n(10467),o=n(54756),a=n.n(o),l=n(98765),c=n(20151);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?u(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}t.A=function(){var e=(0,i.A)(a().mark(function e(t,n){var r,i;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,l.Ay.get("/api/employee/demographics-from-identifier/".concat(t,"/").concat(n));case 1:return r=e.sent,i=r.data,e.abrupt("return",s(s({},i),{},{dob:c.kB.parse(i.dob).goto("utc")}));case 2:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},56767:function(e,t,n){"use strict";var r=n(64467),i=n(10467),o=n(54756),a=n.n(o),l=n(98765),c=n(95689);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}t.A=function(){var e=(0,i.A)(a().mark(function e(t){var n,i,o;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object.keys(t).filter(function(e){return!!t[e]}).reduce(function(e,n){return s(s({},e),{},(0,r.A)({},"filters[".concat(n,"]"),t[n]||""))},{}),e.next=1,l.Ay.get("/api/employee/patients",{params:n});case 1:return i=e.sent,o=i.data,e.abrupt("return",(o.patients||[]).map(c.vb));case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},98678:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765);t.A=function(){var e=(0,r.A)(o().mark(function e(t,n,r){var i,l;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,a.Ay.post("/api/employee/patients/".concat(t,"/sessions"),{appointmentEmrId:n,locationEmrId:r},{timeout:2e4});case 1:return i=e.sent,l=i.data,e.abrupt("return",l.session._id);case 2:case"end":return e.stop()}},e)}));return function(t,n,r){return e.apply(this,arguments)}}()},8076:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});var r=function(e,t){return"".concat(e," ").concat(t).toLowerCase().split(/\s+/).join("-")}},3811:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765);t.A=function(){var e=(0,r.A)(o().mark(function e(t,n){var r,i,l;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,a.Ay.get("/api/employee/releases",{params:{limit:t,skip:n}});case 1:return r=e.sent,i=r.data,e.abrupt("return",i.releases);case 2:throw e.prev=2,l=e.catch(0),new Error(l.msg||"An unexpected error occurred.");case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}()},15031:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765),l=n(95689),c=n(14740),u=n(95592);t.A=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,c.O$)(function(e){return e.user.serviceArea});return(0,u.Ay)([t,"/schedule/meta"],(0,r.A)(o().mark(function e(){var t,n;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,a.Ay.get("/api/schedule/meta");case 1:return t=e.sent,n=t.data,e.abrupt("return",{area:n.area,providers:(0,l.ek)(n.providers||[],n.specialtyAreas||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),locations:(0,l.O3)(n.locations||[],n.specialtyAreas||[]),specialtyAreas:n.specialtyAreas||[],specialties:n.specialties||[]});case 2:case"end":return e.stop()}},e)})),{revalidateOnMount:e,errorRetryCount:4,revalidateOnFocus:!1})}},53353:function(e,t,n){"use strict";var r=n(10467),i=n(54756),o=n.n(i),a=n(98765);t.A=function(){var e=(0,r.A)(o().mark(function e(t){var n,r,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.videoAppointmentId,r=t.employeeId,i=t.chargeAmount,e.next=1,a.Ay.put("/api/employee/visit/charge-card",{videoAppointmentId:n,employeeId:r,chargeAmount:i});case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},9638:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Kf}});var r=n(80296),i=n(96540),o=n(54625),a=n(67881),l=n(39023),c=n(25381),u=n(52594),s=n(33876),m=n(98765),d=function(e,t){return new Promise(function(n,r){m.Ay.post("/api/auth/employee",{email:e,password:t}).then(function(e){var t=e.data;t.success?n(t.token||null):r(new Error(t.msg||"An unexpected error occurred."))}).catch(r)})};n.dn(d);var p,g=n(14740),f=n(46756),y=n(20151),h=n(4706),v=n(57528),w=n(54740),b=n(76194),E=function(e){var t=e.withServiceAreaReset,n=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.serviceArea}),r=(0,g.O$)(function(e){return e.user.serviceArea}),o=(0,g.E9)(function(e){return e.user.setServiceArea}),a=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.providerEpicId}),l=n===m.xS.SA||void 0!==n&&(0,b.kv)(n)&&!a;return i.createElement(x,null,i.createElement(A,null,i.createElement(S,null),"32dc115a682fd2b9445addde1c69f47dfaca84c7".substr(0,8)),t&&l&&i.createElement(k,{type:"button",onClick:function(){return o(null)}},i.createElement(C,null),"Service Area: ",r))},x=(0,a.Ay)("div")({position:"fixed",bottom:"0",left:"0",marginBottom:"0.25rem",marginLeft:"0.5rem",display:"flex",alignItems:"center","--tw-text-opacity":"1",color:"rgb(229 231 235 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}}),A=(0,a.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem"}),S=(0,a.Ay)(h.loI)({marginRight:"0.25rem",display:"inline-block",width:"1rem"}),k=(0,a.Ay)("button")({marginLeft:"1rem",cursor:"pointer",fontSize:"0.875rem",lineHeight:"1.25rem",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}}),C=(0,a.Ay)(h.fNY).withConfig({componentId:"sc-1w7cd7m-0"})({marginRight:"0.25rem",display:"inline-block",width:"1rem"}),I=n(764),R=(0,a.DU)(["body{",";}"],{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}),P=(0,a.i7)(["50%{transform:translateX(3px);}100%{transform:translateX(-3px);}"]),T=a.Ay.div(p||(p=(0,v.A)(["\n    ",";\n    transform: perspective(1px) translateZ(0);\n    ",";\n"])),{marginTop:"2.5rem",borderRadius:"0.5rem",borderTopWidth:"4px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"1.5rem","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"100ms","@media (min-width: 768px)":{padding:"2rem"}},function(e){return e.$wiggle&&(0,a.AH)(["",";animation:"," 150ms linear 3;"],{"--tw-border-opacity":"1",borderColor:"rgb(239 68 68 / var(--tw-border-opacity, 1))"},P)}),O=function(e){var t=e.title,n=e.subtitle,r=e.children,o=e.wiggle,a=void 0!==o&&o;return i.createElement(i.Fragment,null,i.createElement(R,null),i.createElement(D,null,i.createElement(N,null,i.createElement(j,{src:w}),i.createElement("div",null,i.createElement(L,null,t),n&&i.createElement(z,null,n))),i.createElement(T,{$wiggle:a},r),i.createElement(B,null,"Having issues with PocketDoc? Email ",i.createElement("strong",null,I.OF))),i.createElement(E,null))},D=(0,a.Ay)("div")({marginLeft:"1rem",marginRight:"1rem",marginTop:"2.5rem",width:"auto","@media (min-width: 768px)":{marginLeft:"auto",marginRight:"auto",marginTop:"5rem",width:"33.333333%"}}),N=(0,a.Ay)("div")({display:"flex",alignItems:"center"}),j=(0,a.Ay)("img")({marginLeft:"1rem",marginRight:"1rem",display:"block",height:"4rem",width:"4rem",userSelect:"none","@media (min-width: 768px)":{height:"6rem",width:"6rem"}}),L=(0,a.Ay)("h1")({fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),z=(0,a.Ay)("h2")({fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),B=(0,a.Ay)("p").withConfig({componentId:"sc-1bz7w4c-0"})({marginTop:"1rem",textAlign:"center",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),W=n(90380),F=n(96763),$=function(){var e=(0,f.W6)(),t=(0,o.zy)().state,n=(0,i.useState)(""),a=(0,r.A)(n,2),s=a[0],m=a[1],p=(0,g.E9)(function(e){return e.user.setToken});return i.createElement(O,{title:"Welcome back!",subtitle:"Sign into your account here.",wiggle:!!s},i.createElement(l.l1,{onSubmit:function(t,n){var r=n.setSubmitting,i=n.setFieldValue;m(""),d(t.email,t.password).then(function(e){return p(e)}).then(function(){return e.replace("/".concat(window.location.search.replace("?","")).concat(window.location.hash))}).catch(function(e){F.error(e),p(void 0),m(y.LV.getErrorFromResponse(e)),i("password",""),r(!1)})},validateOnBlur:!1,validateOnChange:!1,initialValues:{email:"",password:""},validationSchema:(0,c.Ik)().shape({email:(0,c.Yj)().email("Please enter your email address.").required("Please enter your email address."),password:(0,c.Yj)().required("Please provide your account password.")})},function(e){var n=e.isSubmitting,r=e.isValid,o=e.values;return i.createElement(l.lV,null,s&&i.createElement(_,null,i.createElement(V,null),s),(null==t?void 0:t.callback)&&i.createElement(M,null,i.createElement(q,null),function(e,t){switch(e){case"reset-requested":return i.createElement(i.Fragment,null,"Please check ",t?i.createElement(i.Fragment,null,"the email address ",i.createElement(H,null,t)):"your email"," for a link to reset your password.");case"reset-success":return"Password successfully reset. Please log in with your new password.";default:return""}}(t.callback,t.email)),i.createElement(u.pd.Formik,{name:"email",label:"Email",type:"email",disabled:n,autoFocus:!0}),i.createElement(U,null,i.createElement(Y,{style:{top:"-0.25rem"}},i.createElement(G,{to:{pathname:W._9,state:{email:o.email}}},"Forgot your password?")),i.createElement(u.pd.Formik,{name:"password",label:"Password",type:"password",disabled:n})),i.createElement(J,null,i.createElement(K,{type:"submit"},n&&r?i.createElement(u.y$,{size:"small",white:!0}):"Sign In")))}))},H=(0,a.Ay)("span")({fontWeight:"600"}),_=(0,a.Ay)("div")({marginTop:"-1rem",marginBottom:"1.5rem",fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),V=(0,a.Ay)(h.hZx)({marginRight:"0.5rem",display:"inline-block",height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),M=(0,a.Ay)("div")({marginTop:"-1rem",marginBottom:"1.5rem",fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),q=(0,a.Ay)(h.C1y)({marginRight:"0.5rem",display:"inline-block",height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),U=(0,a.Ay)("div")({position:"relative",marginTop:"2rem"}),Y=(0,a.Ay)("div")({position:"absolute",right:"0"}),G=(0,a.Ay)(o.N_)({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}}),J=(0,a.Ay)("div")({display:"flex",justifyContent:"flex-end"}),K=(0,a.Ay)(s.$).withConfig({componentId:"sc-2jr0z5-0"})({marginTop:"1rem",display:"flex",height:"3rem",width:"100%",alignItems:"center",justifyContent:"center",paddingLeft:"3rem",paddingRight:"3rem","@media (min-width: 768px)":{width:"auto"}}),X=(0,a.DU)(["body{",";}h1,h2,h3,h4,h5,h6{","}h1{","}h2{","}h3{","}h4{","}"],{fontFamily:"brandon-grotesque, sans-serif"},{fontWeight:"300",lineHeight:"1.25","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"},{fontSize:"1.875rem",lineHeight:"2.25rem"},{fontSize:"1.5rem",lineHeight:"2rem"},{fontSize:"1.25rem",lineHeight:"1.75rem"},{fontSize:"1.125rem",lineHeight:"1.75rem"}),Z=n(61849),Q=function(e){return new Promise(function(t,n){var r="/api/auth/employee/forgot-password?origin=".concat(window.location.origin);m.Ay.post(r,{email:e}).then(function(e){var r=e.data;if(!r.success)return n(new Error(r.msg||"Unexpected error encountered while resetting password."));t()}).catch(n)})};n.dn(Q);var ee,te=n(96763),ne=function(){var e=(0,f.W6)(),t=(0,o.zy)().state,n=(0,i.useState)(""),a=(0,r.A)(n,2),s=a[0],m=a[1];return i.createElement(O,{title:"Oops!",subtitle:"Enter your details below to recover your password."},i.createElement(l.l1,{onSubmit:function(t,n){var r=t.email,i=n.setSubmitting;Q(r).then(function(){return e.replace(W.zG,{callback:"reset-requested",email:r})}).catch(function(e){te.error(e),m(y.LV.getErrorFromResponse(e)),i(!1)})},validateOnBlur:!1,validateOnChange:!1,initialValues:{email:(null==t?void 0:t.email)||""},validationSchema:(0,c.Ik)().shape({email:(0,c.Yj)().email("Please enter your email address.").required("Please enter your email address.")})},function(e){var t=e.isSubmitting,n=e.isValid,r=e.values;return i.createElement(l.lV,null,s&&i.createElement(re,null,i.createElement(ie,null),s),i.createElement(u.pd.Formik,{autoFocus:!0,name:"email",type:"email",label:"Your Email",disabled:t}),i.createElement(oe,null,i.createElement(ae,{to:{pathname:W.zG,state:{email:r.email}}},i.createElement(le,{type:"button"},"Return to Login")),i.createElement(ce,{type:"submit"},t&&n?i.createElement(u.y$,{size:"small",white:!0}):"Recover Password")))}))},re=(0,a.Ay)("div")({marginTop:"-1rem",marginBottom:"1.5rem",fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),ie=(0,a.Ay)(h.hZx)({marginRight:"0.5rem",display:"inline-block",height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),oe=(0,a.Ay)("div")({marginTop:"1.5rem",display:"flex",flexWrap:"wrap-reverse",alignItems:"center",justifyContent:"space-between","@media (min-width: 768px)":{flexWrap:"nowrap"}}),ae=(0,a.Ay)(o.N_)({marginTop:"1.5rem",width:"100%","@media (min-width: 768px)":{marginTop:"0",width:"auto"}}),le=(0,a.Ay)(s.$.Gray)({display:"flex",height:"3rem",width:"100%",alignItems:"center",justifyContent:"center","@media (min-width: 768px)":{width:"auto"}}),ce=(0,a.Ay)(s.$).withConfig({componentId:"sc-1o59ss4-0"})({display:"flex",height:"3rem",width:"100%",alignItems:"center",justifyContent:"center","@media (min-width: 768px)":{width:"auto"}}),ue=n(59779),se=n(10467),me=n(54756),de=n.n(me),pe=n(95689),ge=function(){var e=(0,se.A)(de().mark(function e(t,n){var r,i;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,m.Ay.put("/api/auth/employee/forgot-password",{resetToken:t,password:n});case 1:return r=e.sent,i=r.data,e.abrupt("return",[i.token,(0,pe._k)(i.user)]);case 2:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),fe=ge,ye=n(96763),he=(0,c.Ik)().shape({password:(0,c.Yj)().required("Please enter your new password").test("regex","Password must be at least 8 characters including a number and a lowercase letter",b.xp),confirmPassword:(0,c.Yj)().when("password",{is:function(e){return e&&e.length},then:(0,c.Yj)().oneOf([(0,c.KR)("password")],"Passwords do not match.")})}),ve=function(){var e=(0,f.W6)(),t=(0,o.zy)(),n=(0,g.E9)(function(e){return e.user.setToken}),a=(0,i.useState)(""),c=(0,r.A)(a,2),s=c[0],m=c[1],d=new URLSearchParams(t.search).get("token")||"";d||e.replace(W.yZ);return i.createElement(O,{title:"Reset Password",subtitle:"Please choose your new password."},i.createElement(l.l1,{onSubmit:function(t,i){var o=t.password,a=i.setSubmitting;fe(d,o).then(function(e){var t=(0,r.A)(e,1)[0];n(t)}).then(function(){return e.replace(W.zG,{callback:"reset-success"})}).catch(function(e){ye.error(e),m(y.LV.getErrorFromResponse(e)),a(!1)})},initialValues:{password:"",confirmPassword:""},validationSchema:he},function(e){var t=e.isSubmitting;return i.createElement(l.lV,null,i.createElement(u.y$.Overlay,{visible:t,size:"small"}),s&&i.createElement(we,null,i.createElement(be,null),s),i.createElement(u.pd.Formik,{name:"password",type:"password",label:"New Password",description:"Enter your new password."}),i.createElement(Ee,null,i.createElement(u.pd.Formik,{name:"confirmPassword",type:"password",label:"Confirm New Password"})),i.createElement(xe,null,i.createElement(Ae,null,"Set New Password")))}))},we=(0,a.Ay)("div")({marginTop:"-1rem",marginBottom:"1.5rem",fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),be=(0,a.Ay)(h.hZx)({marginRight:"0.5rem",display:"inline-block",height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),Ee=(0,a.Ay)("div")({marginTop:"2rem"}),xe=(0,a.Ay)("div")({marginTop:"2rem",display:"flex",justifyContent:"flex-end"}),Ae=(0,a.Ay)(s.$).withConfig({componentId:"sc-1rsu2rd-0"})({width:"100%",paddingLeft:"3rem",paddingRight:"3rem",paddingTop:"0.75rem",paddingBottom:"0.75rem","@media (min-width: 768px)":{width:"auto"}}),Se=n(91319),ke=n(97874),Ce=function(e){var t=e.message,n=e.fixed,r=void 0===n||n;return i.createElement(Ie,{$_css:[{zIndex:"50",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2.5rem"},r&&{position:"fixed",left:"0",top:"0",height:"100vh",width:"100%","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))"}]},i.createElement(Re,null,i.createElement(Pe,null,i.createElement(Te,{src:ke})),i.createElement("div",null,i.createElement(u.y$,null))),t&&i.createElement(Oe,null,t))},Ie=(0,a.Ay)("div")(ee||(ee=(0,v.A)(["",""])),function(e){return e.$_css}),Re=(0,a.Ay)("div")({display:"flex",alignItems:"center"}),Pe=(0,a.Ay)("div")({marginRight:"1.5rem","@media (min-width: 768px)":{marginRight:"2.5rem"}}),Te=(0,a.Ay)("img")({height:"5rem",width:"100%",userSelect:"none","@media (min-width: 768px)":{width:"auto"}}),Oe=(0,a.Ay)("p").withConfig({componentId:"sc-1nv6870-0"})({marginTop:"0.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),De=n(72505),Ne=n.n(De),je=function(){var e=(0,i.useState)(!1),t=(0,r.A)(e,2),n=t[0],o=t[1];return(0,i.useEffect)(function(){var e=Array.from(document.getElementsByTagName("script")).find(function(e){return e.src.match(/main\.(\w{8})\.js$/)});if(e){var t=setInterval(function(){Ne().head(e.src+"?timestamp="+(new Date).getTime(),{timeout:1e4}).catch(function(e){var n;404===(null===(n=e.response)||void 0===n?void 0:n.status)&&(o(!0),clearInterval(t))})},3e5);return function(){clearInterval(t)}}},[]),n?i.createElement(Le,{onClick:function(){window.location.reload()}},"An update is available, click to reload."):null},Le=(0,a.Ay)("div").withConfig({componentId:"sc-1ocn5j7-0"})({cursor:"pointer",borderBottomWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(214 158 46 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(236 201 75 / var(--tw-bg-opacity, 1))",padding:"0.75rem",textAlign:"center",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(214 158 46 / var(--tw-bg-opacity, 1))"}}),ze=n(45862),Be=(n(45044),n(21117),n(85072)),We=n.n(Be),Fe=n(97825),$e=n.n(Fe),He=n(77659),_e=n.n(He),Ve=n(55056),Me=n.n(Ve),qe=n(10540),Ue=n.n(qe),Ye=n(41113),Ge=n.n(Ye),Je=n(68634),Ke={};Ke.styleTagTransform=Ge(),Ke.setAttributes=Me(),Ke.insert=_e().bind(null,"head"),Ke.domAPI=$e(),Ke.insertStyleElement=Ue();We()(Je.A,Ke),Je.A&&Je.A.locals&&Je.A.locals;var Xe,Ze,Qe,et=n(20982),tt=n(66188),nt=n(53273),rt=function(e){var t=e.containerStyle,n={},r=(0,g.O$)(function(e){return e.flash.messages}),o=(0,g.E9)(function(e){return e.flash.removeMessage});return(0,i.useEffect)(function(){return function(){Object.keys(n).forEac
1h(function(e){return clearTimeout(n[e])})}},[]),(0,nt.Ij)(function(){r.forEach(function(e){n[e.id]||(n[e.id]=window.setTimeout(function(){return o(e.id)},7500))})},[r]),i.createElement(it,{$_css:t},r.map(function(e){return i.createElement(ot,{key:e.id},i.createElement(at,null,i.createElement(lt,null,"An error occurred:")," ",e.message),i.createElement(ct,{onClick:function(){return o(e.id)}},i.createElement(ut,{fixedWidth:!0,icon:tt.GRI})))}))},it=(0,a.Ay)("div")(Xe||(Xe=(0,v.A)(["",""])),function(e){return e.$_css}),ot=(0,a.Ay)("div")({position:"relative",borderRadius:"0.25rem",borderLeftWidth:"4px","--tw-border-opacity":"1",borderColor:"rgb(220 38 38 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem"}),at=(0,a.Ay)("p")({"--tw-text-opacity":"1",color:"rgb(127 29 29 / var(--tw-text-opacity, 1))"}),lt=(0,a.Ay)("span")({fontWeight:"500"}),ct=(0,a.Ay)("button")({position:"absolute",right:"0",top:"0",marginRight:"0.5rem",display:"flex",height:"100%",alignItems:"center",padding:"0.5rem"}),ut=(0,a.Ay)(et.g).withConfig({componentId:"sc-1bg9qem-0"})({cursor:"pointer","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity, 1))"}}),st=n(81306),mt=n(78420),dt=function(){var e=(0,g.E9)(function(e){return e.user.setServiceArea}),t=(0,g.E9)(function(e){return e.user.setOrganization}),n=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.providerEpicId}),r=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.serviceArea}),o=[{displayName:"Perlman Clinic",serviceArea:m.xS.MPC,org:mt.A.find(function(e){return e.name===m.xS.MPC})},{displayName:"Perlman Clinic: Mental Health",serviceArea:m.xS.MTL,org:mt.A.find(function(e){return e.name===m.xS.MPC})},{displayName:"Perlman Clinic: Wellness",serviceArea:m.xS.WEL,org:mt.A.find(function(e){return e.name===m.xS.MPC})},{displayName:"Perlman Clinic: Endocrinology",serviceArea:m.xS.ENDO,org:mt.A.find(function(e){return e.name===m.xS.MPC})},{displayName:"Perlman Clinic: Pain Management",serviceArea:m.xS.PAIN,org:mt.A.find(function(e){return e.name===m.xS.MPC})},{displayName:"Perlman Clinic: Gastroenterology",serviceArea:m.xS.GASTRO,org:mt.A.find(function(e){return e.name===m.xS.MPC})},{displayName:"Perlman Clinic: Physical Therapy",serviceArea:m.xS.PHYS,org:mt.A.find(function(e){return e.name===m.xS.MPC})}];return mt.A.length&&r?i.createElement(i.Fragment,null,i.createElement(st.A,null),i.createElement(u.zW,{timeout:250,appear:!0,in:!0},i.createElement(gt,null,i.createElement(ft,{style:{maxWidth:"400px"}},i.createElement(yt,null,"Service Area"),i.createElement(ht,null,"Please select the service area you wish to manage."),(o||[]).filter(function(e){var t,i=e.serviceArea;return t=i,!(r!==m.xS.SA&&(0,b.kv)(r)&&!n)||(0,b.kv)(t)}).map(function(n,r){return i.createElement(vt,{key:"".concat(r,"__service_area_selector"),secondary:0!==r,onClick:function(){var r;e(n.serviceArea),null!==(r=n.org)&&void 0!==r&&r.name&&t({name:n.org.name})}},n.displayName)}))))):i.createElement(pt,null,i.createElement(u.y$,null))},pt=(0,a.Ay)("div")({display:"flex",height:"100vh",alignItems:"center",justifyContent:"center"}),gt=(0,a.Ay)("div")({marginLeft:"1rem",marginRight:"1rem",display:"flex",height:"100vh",width:"auto",alignItems:"flex-start",justifyContent:"center",paddingTop:"5rem"}),ft=(0,a.Ay)("div")({width:"100%",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"2rem","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),yt=(0,a.Ay)("h2")({fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),ht=(0,a.Ay)("p")({marginTop:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),vt=(0,a.Ay)(s.$).withConfig({componentId:"sc-vvu0iz-0"})({marginTop:"0.5rem",width:"100%",paddingTop:"0.75rem",paddingBottom:"0.75rem",fontSize:"1.125rem",lineHeight:"1.75rem"}),wt=n(31114),bt=n(97423),Et=n(74967),xt=n(64467);function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kt,Ct,It,Rt,Pt,Tt,Ot,Dt,Nt,jt,Lt,zt,Bt=function(e){var t=e.children,n=e.icon,r=e.secondary,o={lineHeight:".9em"};return i.createElement(Wt,{$_css:[{display:"flex",alignItems:"center"}]},i.createElement(Ft,{icon:n,$_css2:[{marginRight:"0","--tw-scale-x":"1.5","--tw-scale-y":"1.5",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","@media (min-width: 640px)":{marginRight:"0"},"@media (min-width: 1024px)":{marginRight:"0","--tw-scale-x":"1.1","--tw-scale-y":"1.1",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}},St({},o)]}),i.createElement($t,{$_css3:[{display:"none",whiteSpace:"nowrap",fontSize:"0.75rem",fontWeight:"500",lineHeight:"1","@media (min-width: 1536px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},r?{"@media (min-width: 1280px)":{display:"inline"}}:{"@media (min-width: 1024px)":{display:"inline"}},St(St({},o),{},{marginLeft:6})]},t))},Wt=(0,a.Ay)("div")(Ze||(Ze=(0,v.A)(["",""])),function(e){return e.$_css}),Ft=(0,a.Ay)(et.g)(Qe||(Qe=(0,v.A)(["",""])),function(e){return e.$_css2}),$t=(0,a.Ay)("span").withConfig({componentId:"sc-32i753-0"})(["",""],function(e){return e.$_css3}),Ht=n(7897),_t=n(79656),Vt=n(3811),Mt=n(97101),qt=function(){var e=(0,i.useState)(!1),t=(0,r.A)(e,2),n=t[0],o=t[1],a=(0,g.O$)(function(e){return e.user.employee});return(0,i.useEffect)(function(){var e=function(){var e=(0,se.A)(de().mark(function e(){var t;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,(0,Vt.A)(1,0);case 1:if((t=e.sent).length){e.next=2;break}return o(!1),e.abrupt("return");case 2:(null==a||!a.lastViewedRelease||(null==a?void 0:a.lastViewedRelease)!==t[0]._id&&t[0].status===b.kP.Publish)&&o(!0),e.next=4;break;case 3:e.prev=3,e.catch(0);case 4:case"end":return e.stop()}},e,null,[[0,3]])}));return function(){return e.apply(this,arguments)}}();e()},[a]),i.createElement(Ut,{$_css:n?{marginLeft:"0.25rem"}:""},n?i.createElement(Mt.A,{content:"Check out what's new!"},i.createElement(Yt,null,i.createElement(Gt,{icon:tt.iW_}))):null)},Ut=(0,a.Ay)("div")(kt||(kt=(0,v.A)(["",""])),function(e){return e.$_css}),Yt=(0,a.Ay)("span")({position:"relative"}),Gt=(0,a.Ay)(et.g).withConfig({componentId:"sc-1muh0s-0"})({"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Jt={display:"flex",width:"100%",alignItems:"center",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"left",fontSize:"0.875rem",fontWeight:"400",textTransform:"none",lineHeight:"1.25rem",letterSpacing:"0","--tw-text-opacity":"1 !important",color:"rgb(55 65 81 / var(--tw-text-opacity, 1)) !important","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))","--tw-text-opacity":"1 !important",color:"rgb(17 24 39 / var(--tw-text-opacity, 1)) !important"}},Kt=function(e){var t=e.onFeedbackClick,n=(0,i.useState)(!1),o=(0,r.A)(n,2),a=o[0],l=o[1],c=(0,i.useRef)(null),u=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.providerEpicId}),s=(0,g.O$)(function(e){return e.user.serviceArea});return(0,i.useEffect)(function(){if(a){var e=function(e){c.current&&!c.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}},[a]),i.createElement(Xt,{ref:c},i.createElement(Zt,{type:"button",onClick:function(){return l(function(e){return!e})}},i.createElement(Qt,{icon:Ht.hP6})),a&&i.createElement(en,null,!!u&&i.createElement(i.Fragment,null,!!s&&(0,b.kv)(s)&&i.createElement(tn,{to:W.Cn,onClick:function(){return l(!1)}},"Profile"),i.createElement(nn,{to:W.Sk,onClick:function(){return l(!1)}},"Ratings")),i.createElement(rn,{to:W.Co,onClick:function(){return l(!1)}}
1,"Updates",i.createElement(qt,null)),i.createElement(on,{type:"button",onClick:function(){l(!1),t()}},"Give feedback"),i.createElement(an,null),i.createElement(ln,{to:W.T_,onClick:function(e){if(!confirm("Are you sure you want to log off?"))return e.preventDefault(),!1;l(!1)}},i.createElement(cn,{icon:_t.PIP}),"Sign out")))},Xt=(0,a.Ay)("div")({position:"relative"}),Zt=(0,a.Ay)("button")({display:"flex",height:"100%",alignItems:"center","--tw-text-opacity":"1 !important",color:"rgb(107 114 128 / var(--tw-text-opacity, 1)) !important","&:hover":{"--tw-text-opacity":"1 !important",color:"rgb(55 65 81 / var(--tw-text-opacity, 1)) !important"}}),Qt=(0,a.Ay)(et.g)({"--tw-scale-x":"1.5","--tw-scale-y":"1.5",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","@media (min-width: 1024px)":{"--tw-scale-x":"1.25","--tw-scale-y":"1.25",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}),en=(0,a.Ay)("div")({position:"absolute",right:"0",top:"100%",zIndex:"50",width:"12rem",borderRadius:"0.5rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(243 244 246 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingTop:"0.5rem",paddingBottom:"0.5rem","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),tn=(0,a.Ay)(o.k2)(Ct||(Ct=(0,v.A)(["",""])),Jt),nn=(0,a.Ay)(o.k2)(It||(It=(0,v.A)(["",""])),Jt),rn=(0,a.Ay)(o.k2)(Rt||(Rt=(0,v.A)(["",""])),Jt),on=(0,a.Ay)("button")(Pt||(Pt=(0,v.A)(["",""])),Jt),an=(0,a.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(243 244 246 / var(--tw-border-opacity, 1))"}),ln=(0,a.Ay)(o.k2)(Tt||(Tt=(0,v.A)(["",""])),Jt),cn=(0,a.Ay)(et.g).withConfig({componentId:"sc-rx2owm-0"})({marginRight:"0.5rem"}),un=n(94644),sn=function(){return(0,g.E9)(function(e){return e.employeeLogout})(),i.createElement(f.rd,{to:W.zG})},mn=n(65088),dn=n(56621),pn=n(77266),gn=n(56767),fn=n(49638),yn=n(96763),hn=function(e){var t=(0,i.useState)("idle"),n=(0,r.A)(t,2),o=n[0],a=n[1],l=(0,i.useState)(null),c=(0,r.A)(l,2),u=c[0],s=c[1],m=(0,i.useState)([]),d=(0,r.A)(m,2),p=d[0],g=d[1],f=(0,i.useState)(!1),y=(0,r.A)(f,2),h=y[0],v=y[1],w=(0,i.useRef)(null),b=function(e){w.current=e,s(e),v(!1),a("searching");var t=function(e){var t=e.replace(/\D/g,"");return t.length>=10?t.slice(-10):t}(e);Promise.all([(0,pn.A)({nameOrMrn:"",dob:"",phone:t,email:""}).catch(function(e){return mn.Cp(e),[]}),(0,gn.A)({phone:t}).catch(function(e){return mn.Cp(e),[]})]).then(function(e){var n=(0,r.A)(e,2),i=n[0],o=n[1],l=(0,fn.n0)(i,o,{phone:t});g(l),a(l.length>0?"results":"no-results")}).catch(function(e){mn.Cp(e),a("no-results")})},E=function(){a("idle"),s(null),g([]),v(!1),w.current=null};return(0,i.useEffect)(function(){if(e){var t=dn.Sn.collection(dn.pV.RINGCENTRAL_ACTIVE_CALLS).doc(e).onSnapshot(function(e){if(e.exists){var t,n,r,i,o={callerPhoneNumber:(t=e.data()).callerPhoneNumber,recipientExtensionId:t.recipientExtensionId,answeredAt:null!==(n=null===(r=t.answeredAt)||void 0===r||null===(i=r.toDate)||void 0===i?void 0:i.call(r))&&void 0!==n?n:null},a=o.callerPhoneNumber;if(a){o.answeredAt&&Date.now()-o.answeredAt.getTime()>3e5||a!==w.current&&b(a)}else E()}else E()},function(e){yn.error("[useIncomingCall] Firestore error:",e),mn.Cp(e)});return function(){return t()}}yn.warn("No extension ID found for user")},[e]),{status:o,callerPhoneNumber:u,results:p,visible:!h&&"idle"!==o,dismiss:function(){v(!0)},triggerSearch:b,clearCall:E}},vn=n(44726),wn=n(85930),bn=n(23279),En=n(95533),xn=a.Ay.div(Ot||(Ot=(0,v.A)(["\n    ",";\n    top: 72px;\n    right: 24px;\n    width: 380px;\n    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n"])),{position:"fixed",zIndex:"50",overflow:"hidden",borderRadius:"0.5rem",borderTopWidth:"8px","--tw-border-opacity":"1",borderColor:"rgb(97 190 161 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))"}),An=a.Ay.div(Dt||(Dt=(0,v.A)(["\n    ",";\n"])),{display:"flex",height:"2.25rem",width:"2.25rem",flexShrink:"0",alignItems:"center",justifyContent:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1))"}),Sn=a.Ay.div(Nt||(Nt=(0,v.A)(["\n    ",";\n"])),{marginLeft:"1rem",marginRight:"1rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))"}),kn=(0,a.Ay)(Sn)({marginTop:"0.5rem"}),Cn=(0,a.Ay)(Sn)({marginLeft:"0",marginRight:"0",marginTop:"0.75rem",width:"100%"}),In=function(){return i.createElement(Tn,null,i.createElement(u.y$,{size:"small"}),i.createElement(On,null,"Searching patient records..."))},Rn=function(e){var t=e.onSearchManually,n=(0,wn.d0)();return(0,i.useEffect)(function(){(0,wn.e3)({employeeProperties:n})},[]),i.createElement(Dn,null,i.createElement(Nn,null,i.createElement(jn,{icon:tt.MjD})),i.createElement(Ln,null,"No patient matched this phone number. The caller may be a new patient or calling from a provider office, hospital, insurance company, or another organization."),i.createElement(Cn,null),i.createElement(zn,{type:"button",onClick:t},"Search Manually →"))},Pn=function(e){var t=e.status,n=e.callerPhoneNumber,r=e.results,a=e.onDismiss,l=(0,o.W6)(),c=(0,g.E9)(function(e){return e.flash.setEpicPatient}),u=(0,g.E9)(function(e){return e.flash.setProfileViewSource}),d=(0,g.E9)(function(e){return e.flash.setSearchSource}),p=(0,wn.d0)();(0,i.useEffect)(function(){"results"!==t&&"no-results"!==t||(0,wn.hn)({count:r.length,employeeProperties:p})},[t]);var f,y,h=function(){var e=(0,se.A)(de().mark(function e(t){var n,r,i,o,s,d,p;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u(wt.IY.LIVE_SEARCH),a(),!t.childId||!t.pocketDocId){e.next=1;break}return l.push("".concat(W.RN,"/").concat(t.pocketDocId).concat(W.$t,"/").concat(t.childId
1)),e.abrupt("return");case 1:if(!t.pocketDocId){e.next=2;break}return l.push("".concat(W.RN,"/").concat(t.pocketDocId)),e.abrupt("return");case 2:if(!(r=null===(n=t.emrIds.find(function(e){return e.Type===m.jv.EPI}))||void 0===n?void 0:n.ID)){e.next=7;break}return e.prev=3,e.next=4,(0,gn.A)({epi:r});case 4:if(1!==(i=e.sent).length){e.next=5;break}return l.push("".concat(W.RN,"/").concat(i[0].id)),e.abrupt("return");case 5:e.next=7;break;case 6:e.prev=6,p=e.catch(3),mn.Cp(p);case 7:t.epicResult&&(c(t.epicResult),(d=null===(o=t.epicResult.emrIds)||void 0===o||null===(s=o.find(function(e){return e.Type===m.jv.EPI}))||void 0===s?void 0:s.ID)?l.push("".concat(W.RN,"/epic"),{epi:d}):(sessionStorage.removeItem("epicPatientEpi"),l.push("".concat(W.RN,"/epic"))));case 8:case"end":return e.stop()}},e,null,[[3,6]])}));return function(t){return e.apply(this,arguments)}}(),v=function(){a(),d(wt.Cy.LIVE_SEARCH),l.push({pathname:W.RN,state:{callerPhone:(0,b.cz)(n)}})};return i.createElement(xn,null,i.createElement(Bn,null,i.createElement(Wn,null,i.createElement(Fn,null,i.createElement(An,null,i.createElement($n,{icon:tt.KKr})),i.createElement("div",null,i.createElement(Hn,null,function(e,t){return"searching"===e?"Incoming call - searching":"no-results"===e?"Incoming call - no patient found":1===t?"Incoming call matched a patient":"Incoming call - ".concat(t," patients found")}(t,r.length)),i.createElement(_n,null,"Auto-searched from RingCentral"),i.createElement(Vn,null,i.createElement(Mn,null,i.createElement(qn,{icon:tt.KKr}),(f=n,10===(y=(0,vn.YO)(f)).length?"(".concat(y.slice(0,3),") ").concat(y.slice(3,6),"-").concat(y.slice(6)):f))))),i.createElement(Un,{onClick:function(){(0,wn.zG)({employeeProperties:p}),a()},"aria-label":"Dismiss"},i.createElement(Yn,{icon:tt.GRI})))),i.createElement(Sn,null),"searching"===t&&i.createElement(In,null),"no-results"===t&&i.createElement(Rn,{onSearchManually:function(){(0,wn.er)({employeeProperties:p}),v()}}),"results"===t&&i.createElement(i.Fragment,null,i.createElement(Gn,null,r.length," ",1===r.length?"result":"results"),i.createElement(Jn,null,r.slice(0,3).map(function(e,t){var n;return i.createElement(Kn,{key:t},i.createElement(bn.T,{key:e.pocketDocId||(null===(n=e.emrIds[0])||void 0===n?void 0:n.ID)||t,name:"".concat(e.firstName," ").concat(e.lastName),dob:(0,En.A)(e.dateOfBirth),onClick:function(){(0,wn.sm)({row:t+1,count:r.length,employeeProperties:p}),h(e)}}))})),i.createElement(kn,null),i.createElement(Xn,null,i.createElement(s.$,{variant:"gray",type:"button",onClick:function(){(0,wn.sL)({count:r.length,employeeProperties:p}),v()}},"View in Search →"))))},Tn=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"center",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1.25rem",paddingBottom:"1.25rem"}),On=(0,a.Ay)("p")({marginTop:"0.75rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Dn=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"center",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",textAlign:"center"}),Nn=(0,a.Ay)("div")({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"0.75rem"}),jn=(0,a.Ay)(et.g)({height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Ln=(0,a.Ay)("p")({marginTop:"0.75rem",fontSize:"0.875rem",lineHeight:"1.375","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),zn=(0,a.Ay)(s.$)({marginTop:"1rem",alignSelf:"flex-start",fontSize:"0.875rem",lineHeight:"1.25rem"}),Bn=(0,a.Ay)("div")({paddingLeft:"1.25rem",paddingRight:"1.25rem",paddingBottom:"0.75rem",paddingTop:"1rem"}),Wn=(0,a.Ay)("div")({display:"flex",alignItems:"flex-start",justifyContent:"space-between"}),Fn=(0,a.Ay)("div")({display:"flex",alignItems:"flex-start",gap:"0.75rem"}),$n=(0,a.Ay)(et.g)({height:"0.875rem",width:"0.875rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Hn=(0,a.Ay)("p")({fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.25","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),_n=(0,a.Ay)("p")({marginTop:"0.125rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Vn=(0,a.Ay)("div")({marginTop:"0.25rem"}
1),Mn=(0,a.Ay)("span")({display:"inline-flex",alignItems:"center",gap:"0.375rem",borderRadius:"1.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.125rem",paddingBottom:"0.125rem",fontSize:"0.75rem",fontWeight:"500",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),qn=(0,a.Ay)(et.g)({height:"0.625rem",width:"0.625rem"}),Un=(0,a.Ay)("button")({marginLeft:"0.5rem",marginTop:"0.125rem",flexShrink:"0","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}}),Yn=(0,a.Ay)(et.g)({height:"0.875rem",width:"0.875rem"}),Gn=(0,a.Ay)("p")({paddingLeft:"1.25rem",paddingRight:"1.25rem",paddingBottom:"0.25rem",paddingTop:"0.75rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Jn=(0,a.Ay)("div")({marginLeft:"1rem",marginRight:"1rem"}),Kn=(0,a.Ay)("div")({marginBottom:"0.5rem"}),Xn=(0,a.Ay)("div").withConfig({componentId:"sc-ilma45-0"})({paddingLeft:"1.25rem",paddingRight:"1.25rem",paddingTop:"0.75rem",paddingBottom:"0.75rem"}),Zn=function(e){var t=e.extensionId,n=e.onSimulateCall,o=e.onEndCall,a=(0,i.useState)(!1),l=(0,r.A)(a,2),c=l[0],u=l[1],s=(0,i.useState)(""),m=(0,r.A)(s,2),d=m[0],p=m[1],g=(0,i.useState)({state:"idle"}),f=(0,r.A)(g,2),y=f[0],h=f[1],v=function(){d.trim()&&n(d.trim())},w=function(){var e=(0,se.A)(de().mark(function e(){var n,r,i;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h({state:"loading"}),e.prev=1,e.next=2,dn.Sn.collection(dn.pV.RINGCENTRAL_ACTIVE_CALLS).where("recipientExtensionId","==",t).get();case 2:n=e.sent,h({state:"ok",docs:n.docs.map(function(e){return{id:e.id,data:e.data()}})}),e.next=4;break;case 3:e.prev=3,i=e.catch(1),h({state:"error",message:null!==(r=null==i?void 0:i.message)&&void 0!==r?r:String(i)});case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}();return c?i.createElement(tr,{$_css:[{position:"fixed",bottom:"1.5rem",right:"1.5rem",zIndex:"50",borderRadius:"0.5rem",borderTopWidth:"8px","--tw-border-opacity":"1",borderColor:"rgb(51 170 133 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))"},{width:340,boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.25)"}]},i.createElement(nr,null,i.createElement(rr,null,i.createElement(ir,null,i.createElement(or,{icon:tt.wG0}),i.createElement(ar,null,"Live Search Debug")),i.createElement(lr,{onClick:function(){return u(!1)},"aria-label":"Close"},i.createElement(et.g,{icon:tt.GRI}))),i.createElement(cr,null,"Extension ID"),i.createElement(ur,null,t),i.createElement(sr,null,i.createElement(mr,null,i.createElement(dr,null,"Firestore query test"),i.createElement(pr,{onClick:w,disabled:"loading"===y.state},"loading"===y.state?"Running…":"Run")),i.createElement(gr,null,".where('recipientExtensionId', '==', '",t,"')"),"ok"===y.state&&0===y.docs.length&&i.createElement(fr,null,"No matching documents found"),"ok"===y.state&&y.docs.length>0&&i.createElement(yr,null,i.createElement(hr,null,y.docs.length," doc(s) found:"),y.docs.map(function(e){return i.createElement(vr,{key:e.id},i.createElement(wr,null,"id: ",e.id),i.createElement(br,null,JSON.stringify(e.data,null,2)))})),"error"===y.state&&i.createElement(Er,null,y.message)),i.createElement(xr,null,"Caller phone number"),i.createElement(Ar,{type:"text",placeholder:"e.g. (454) 545-4545",value:d,onChange:function(e){return p(e.target.value)},onKeyDown:function(e){return"Enter"===e.key&&v()}}),i.createElement(Sr,null,i.createElement(kr,{onClick:v,disabled:!d.trim()},i.createElement(et.g,{icon:tt.KKr,style:{fontSize:11}}),"Simulate Call"),i.createElement(Cr,{onClick:function(){o(),p("")}},"End Call")))):i.createElement(Qn,{onClick:function(){return u(!0)}},i.createElement(er,{icon:tt.wG0}),"Live Search Debug")},Qn=(0,a.Ay)("button")({position:"fixed",bottom:"1.5rem",right:"1.5rem",zIndex:"50",display:"flex",alignItems:"center",gap:"0.5rem",borderRadius:"0.5rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.75rem",fontWeight:"500",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))","--tw-shadow":"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-sha
1dow-color), 0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity, 1))"}}),er=(0,a.Ay)(et.g)({"--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),tr=(0,a.Ay)("div")(jt||(jt=(0,v.A)(["",""])),function(e){return e.$_css}),nr=(0,a.Ay)("div")({paddingLeft:"1.25rem",paddingRight:"1.25rem",paddingTop:"1rem",paddingBottom:"1rem"}),rr=(0,a.Ay)("div")({marginBottom:"1rem",display:"flex",alignItems:"center",justifyContent:"space-between"}),ir=(0,a.Ay)("div")({display:"flex",alignItems:"center",gap:"0.5rem"}),or=(0,a.Ay)(et.g)({"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),ar=(0,a.Ay)("span")({fontSize:"0.875rem",fontWeight:"500",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"}),lr=(0,a.Ay)("button")({"--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}}),cr=(0,a.Ay)("div")({marginBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),ur=(0,a.Ay)("div")({marginBottom:"1rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),sr=(0,a.Ay)("div")({marginBottom:"1rem",borderRadius:"0.5rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))",padding:"0.75rem"}),mr=(0,a.Ay)("div")({marginBottom:"0.5rem",display:"flex",alignItems:"center",justifyContent:"space-between"}),dr=(0,a.Ay)("span")({fontSize:"0.75rem",fontWeight:"500",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),pr=(0,a.Ay)("button")({fontSize:"0.75rem",fontWeight:"500",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(4 120 87 / var(--tw-text-opacity, 1))","&:hover":{"--tw-text-opacity":"1",color:"rgb(6 95 70 / var(--tw-text-opacity, 1))"},"&:disabled":{opacity:"0.5"}}),gr=(0,a.Ay)("div")({marginBottom:"0.5rem",fontSize:"0.75rem",lineHeight:"1.25","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),fr=(0,a.Ay)("div")({borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 243 199 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(183 121 31 / var(--tw-text-opacity, 1))"}),yr=(0,a.Ay)("div")({borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(4 120 87 / var(--tw-text-opacity, 1))"}),hr=(0,a.Ay)("div")({marginBottom:"0.25rem",fontWeight:"500"}),vr=(0,a.Ay)("div")({marginTop:"0.25rem"}),wr=(0,a.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),br=(0,a.Ay)("pre")({marginTop:"0.125rem",whiteSpace:"pre-wrap",wordBreak:"break-all","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Er=(0,a.Ay)("div")({wordBreak:"break-all",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(253 204 204 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity, 1))"}),xr=(0,a.Ay)("label")({marginBottom:"0.25rem",display:"block",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Ar=(0,a.Ay)("input")({marginBottom:"0.75rem",width:"100%",borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.375rem",paddingBottom:"0.375rem",fontSize:"0.875rem",lineHeight:"1.25rem","&:focus":{"--tw-border-opacity":"1",borderColor:"rgb(51 170 133 / var(--tw-border-opacity, 1))",outline:"2px s
1olid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(51 170 133 / var(--tw-ring-opacity, 1))"}}),Sr=(0,a.Ay)("div")({display:"flex",gap:"0.5rem"}),kr=(0,a.Ay)("button")({display:"flex",flex:"1 1 0%",alignItems:"center",justifyContent:"center",gap:"0.5rem",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(4 120 87 / var(--tw-bg-opacity, 1))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",fontWeight:"500",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(6 95 70 / var(--tw-bg-opacity, 1))"},"&:disabled":{opacity:"0.5"}}),Cr=(0,a.Ay)("button").withConfig({componentId:"sc-91j2a1-0"})({flex:"1 1 0%",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",fontWeight:"500",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1))"}}),Ir=a.Ay.div(Lt||(Lt=(0,v.A)(["\n    ",";\n    & > div {\n        ","\n    }\n    & > div > * {\n        padding-left: 0.85rem;\n        padding-right: 0.85rem; \n        ","\n        ","\n\n        &:not(.active):hover {\n            ",";\n        }\n\n        &.active {\n            ",";\n        }\n    }\n"])),{display:"flex",alignItems:"center"},{display:"flex",height:"4rem",flexDirection:"row",alignItems:"center"},{display:"flex",height:"100%",cursor:"pointer",flexDirection:"row",alignItems:"stretch",fontSize:"0.875rem",fontWeight:"500",textTransform:"uppercase",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms","@media (min-width: 1024px)":{paddingLeft:"0.5rem",paddingRight:"0.5rem"},"@media (min-width: 1280px)":{paddingLeft:"1rem",paddingRight:"1rem"}},function(e){return!e.isAdmin&&{paddingLeft:"1.25rem",paddingRight:"1.25rem"}},{"--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"},{"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),Rr=function(e){var t,n,a,l=e.children,c=(0,i.useState)(!1),u=(0,r.A)(c,2),s=u[0],d=u[1],p=(0,i.useState)(!1),f=(0,r.A)(p,2),y=f[0],h=f[1],v=(0,g.O$)(function(e){return e.user.serviceArea}),x=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.isAdmin}),A=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.providerEpicId}),S=(0,g.O$)(function(e){return e.user.token}),k=(0,g.O$)(function(e){return e.user.employee}),C=(0,g.E9)(function(e){return e.flash.setSearchSource}),I=null==k?void 0:k.ringCentralExtensionId,R=hn(I);if(!v||v===m.xS.SA){var P=window.location.pathname===W.T_;return P||null!=k&&k.isThirdParty?P?i.createElement(sn,null):i.createElement(i.Fragment,null):i.createElement(dt,null)}var T=x&&!!A;return i.createElement(i.Fragment,null,i.createElement(Pr,null,i.createElement(Tr,{$_css:[{marginRight:"1rem",display:"none",userSelect:"none",alignItems:"center"},T?{"@media (min-width: 1280px)":{display:"flex"}}:{"@media (min-width: 768px)":{display:"flex"}}]},i.createElement(Or,{src:w}),i.createElement(Dr,null,"PocketDoc")),i.createElement(Nr,null,i.createElement(Ir,{isAdmin:!!x},i.createElement("div",null,i.createElement(i.Fragment,null,i.createElement(o.k2,{to:W.yZ,isActive:function(e,t){return"/"===t.pathname}},i.createElement(Bt,{icon:tt.isQ},"Today's Visits")),i.createElement(o.k2,{to:W.S2},i.createElement(Bt,{icon:tt.n2W},"Dialer")),i.createElement(o.k2,{to:W.RN,onClick:function(){return C(wt.Cy.NAV)}},i.createElement(Bt,{icon:tt.$UM},"Patients")),(0,b.kv)(v)&&i.createElement("a",{href:"".concat(ze.A.employeeScheduler,"/sso?token=").concat(S),target:"_blank",rel:"noreferrer"},i.createElement(Bt,{icon:tt._JS},"Scheduler")),(0,b.kv)(v)&&i.createElement(o.k2,{to:W.v9},i.createElement(Bt,{icon:tt.e68},"Eligibility")),i.createElement(o.k2,{to:W.Nd},i.createElement(Bt,{icon:tt.y_8},"Communication"))),(null==k||null===(t=k.experimentalFeatures)||void 0===t?void 0:t.includes(un.T.ReferralsDirectory))&&i.createElement(o.k2,{to:W.B8},i.createElement(Bt,{icon:tt.isI},"Referrals")),(null==k||null===(n=k.experimentalFeatures)||void 0===n?void 0:n.includes(un.T.Billing))&&i.createElement(o.k2,{to:W.CS},i.createElement(Bt,{icon:tt.Vpi},"Billing")),(null==k||null===(a=k.experimentalFeatures)||void 0===a?void 0:a.includes(un.T.PocketDocAgentFeatures))&&i.createElement(o.k2,{to:W.Iv},i.createElement(Bt,{icon:tt.UBk},"Agents")),x&&i.createElement(o.k2,{to:W.rf},i.createElement(Bt,{icon:tt.h6r},"Admin"))),i.createElement(jr,null,i.createElement(Kt,{onFeedbackClick:function(){return d(!0)}})))),i.createElement(bt.A,{visible:s,onModalDismissed:function(){return d(!1)}}),i.createElement(Et.A,{visible:y,onModalDismissed:function(){return h(!1)}})),i.createElement(rt,{containerStyle:{marginLeft:"1rem",marginRight:"1rem",marginBottom:"-1rem",marginTop:"1rem","@media (min-width: 768px)":{marginLeft:"5rem",marginRight:"5rem"}}}),i.createElement(Lr,{$_css2:[{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"2rem",paddingBottom:"2rem","@media (min-width: 768px)":{paddingLeft:"3rem",paddingRight:"3rem",paddingTop:"2.5rem",paddingBottom:"2.5rem"}}]},l),i.createElement(E,{withServiceAreaReset:!0}),R.visible&&R.callerPhoneNumber&&i.createElement(Pn,{status:R.status,callerPhoneNumber:
1R.callerPhoneNumber,results:R.results,onDismiss:R.dismiss}),"production"!==ze.A.sentry.provider.environment&&i.createElement(Zn,{extensionId:null!=I?I:"No extensionID",onSimulateCall:R.triggerSearch,onEndCall:R.clearCall}))},Pr=(0,a.Ay)("div")({display:"flex",height:"4rem",alignItems:"center","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem","@media (min-width: 768px)":{paddingLeft:"3rem",paddingRight:"3rem"}}),Tr=(0,a.Ay)("div")(zt||(zt=(0,v.A)(["",""])),function(e){return e.$_css}),Or=(0,a.Ay)("img")({height:"2rem",width:"2rem"}),Dr=(0,a.Ay)("span")({marginLeft:"0.5rem",display:"none",fontSize:"1.875rem",fontWeight:"400",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))","@media (min-width: 1536px)":{display:"flex"}}),Nr=(0,a.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem",display:"flex",justifyContent:"center","@media (min-width: 768px)":{marginTop:"0",marginBottom:"0",display:"block"}}),jr=(0,a.Ay)("div")({position:"absolute",right:"1rem","@media (min-width: 768px)":{right:"3rem"}}),Lr=(0,a.Ay)("div").withConfig({componentId:"sc-6z0qzd-0"})(["",""],function(e){return e.$_css2});function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Wr={name:192,actions:290,visitType:200,status:98,provider:160,location:144,date:160,time:80,primaryUrgent:0,insurance:192,medGroup:0},Fr=(0,xt.A)((0,xt.A)((0,xt.A)((0,xt.A)((0,xt.A)((0,xt.A)((0,xt.A)((0,xt.A)({},m.xS.MPC,Br(Br({},Wr),{},{primaryUrgent:176,medGroup:192})),m.xS.MTL,Wr),m.xS.WEL,Wr),m.xS.ENDO,Wr),m.xS.PAIN,Wr),m.xS.GASTRO,Wr),m.xS.PHYS,Wr),m.xS.SA,Wr),$r=function(e){return Object.values(e).reduce(function(e,t){return e+t},0)},Hr=function(e){var t=$r(e),n=Object.keys(e).reduce(function(n,r){return Br(Br({},n),{},(0,xt.A)({},r,function(e,t){return{width:"".concat(Math.round(e/t*100),"%"),minWidth:e}}(e[r],t)))},{});return n},_r=Hr(Wr),Vr=$r(Wr),Mr=(0,i.createContext)({styles:_r,totalBaseWidth:Vr}),qr=function(){return(0,i.useContext)(Mr)},Ur=function(e){var t=e.children,n=(0,g.O$)(function(e){return e.user.serviceArea}),r=null!==n?Fr[n]:Wr,o=Hr(r),a=$r(r);return i.createElement(Mr.Provider,{value:{styles:o,totalBaseWidth:a}},t)},Yr=function(e){var t=e.serviceArea,n=qr(),r=n.totalBaseWidth,o=n.styles;return i.createElement(Gr,{style:{minWidth:"calc(3rem + ".concat(r,"px)")}},i.createElement("p",{style:o.time},"Time"),i.createElement("p",{style:o.name},"Name"),i.createElement("p",{style:o.actions}),i.createElement("p",{style:o.visitType},"Visit Type"),i.createElement("p",{style:o.status},"Status"),i.createElement("p",{style:o.provider},"Provider"),i.createElement("p",{style:o.location},"Location"),i.createElement(Jr,null,t===m.xS.MPC?i.createElement(i.Fragment,null,i.createElement("p",{style:o.insurance},"Insurance"),i.createElement("p",{style:o.medGroup},"Med. Group & PCP")):i.createElement(i.Fragment,null,i.createElement("p",{style:o.insurance},"Insurance"))))},Gr=(0,a.Ay)("div")({display:"flex",flexDirection:"row",borderBottomWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity, 1))",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"0.5rem",paddingBottom:"0.5rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Jr=(0,a.Ay)("div").withConfig({componentId:"sc-1mfmyta-0"})({display:"flex",flexDirection:"row"}),Kr=n(46239),Xr=function(){return i.createElement(Zr,null,i.createElement(Qr,null,"Patient not connecting or doesn’t have PocketDoc? Send a video link to any phone number or email using the dialer."),i.createElement(ei,{to:W.S2},i.createElement(ti,{type:"button"},i.createElement(ni,null),i.createElement(ri,null,"PocketDoc Dialer"))))},Zr=(0,a.Ay)("div")({display:"flex",flexWrap:"wrap",alignItems:"center",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"0.75rem",paddingBottom:"0.75rem","@media (min-width: 640px)":{flexWrap:"nowrap"}}),Qr=(0,a.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ei=(0,a.Ay)(o.N_)({marginTop:"1rem",flexShrink:"0","@media (min-width: 640px)":{marginLeft:"1.5rem",marginTop:"0"}}),ti=(0,a.Ay)(s.$)({display:"flex",alignItems:"center"}),ni=(0,a.Ay)(h.EsG)({width:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity, 1))"}),ri=(0,a.Ay)("span").withConfig({componentId:"sc-101jf28-0"})({marginLeft:"0.5rem","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity, 1))"}),ii=function(){var e=(0,i.useState)(window.innerWidth),t=(0,r.A)(e,2),n=t[0],o=t[1];return(0,i.useEffect)(function(){var e=function(){o(window.innerWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]),n},oi=n(64263),ai=(0,a.i7)(["from{transform:translateX(-100%)}to{transform:translateX(0%)}"]),li=(0,a.i7)(["from{transform:translateX(100%)}to{transform:translateX(0%)}"]),ci=a.Ay.div.withConfig({componentId:"sc-7rhydy-0"})([""," "," margin:0 3px;animation:"," 150ms ease-in;",""],{position:"absolute",height:"1rem",width:"1rem",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))"},function(e){return e.active?{right:"0"}:{left:"0"}},function(e){return e.active?e.isMounted?ai:"":e.isMounted?li:""},function(e){return e.sliderStyle}),ui=a.Ay.button.withConfig({componentId:"sc-7rhydy-1"})([""," "," height:22px;width:40px;border-radius:24px;",""],{position:"relative",display:"flex",alignItems:"center",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)",transitionDuration:"150ms"},function(e){return e.active?{"--tw-bg-opacity":"1",backgroundColor:"rgb(5 150 105 / var(--tw-bg-opacity, 1))"}:e.disabled?{"--tw-bg-opacity":"1",backgroundColor:"rgb(209 213 219 / var(--tw-bg-opacity, 1))"}:{"--tw-bg-opacity":"1",backgroundColor:"rgb(156 163 175 / var(--tw-bg-opacity, 1))"}},function(e){return e.containerStyle}
1),si=function(e){var t=e.value,n=e.onChange,o=e.containerStyle,a=e.sliderStyle,l=e.disabled,c=(0,i.useState)(!1),u=(0,r.A)(c,2),s=u[0],m=u[1],d=(0,i.useRef)(!1);return(0,i.useEffect)(function(){d.current?s||m(!0):d.current=!0},[t]),i.createElement(ui,{type:"button",active:t,disabled:l||!1,onClick:function(){return l?null:n(!t)},containerStyle:o},i.createElement(ci,{active:t,sliderStyle:a,isMounted:s}))},mi=n(58168),di=n(80045),pi=n(87065),gi=["styles"];function fi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fi(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var hi,vi,wi,bi,Ei,xi,Ai=function(e){return i.createElement(pi.dK.DropdownIndicator,e,i.createElement(Ci,{icon:tt.Jt$}))},Si={container:function(e){return yi(yi({},e),{},{fontSize:14,color:"#6b7280",flexShrink:0})},control:function(e){return yi(yi({},e),{},{borderColor:"#9ca3af",borderRadius:3,minHeight:0})},input:function(e){return yi(yi({},e),{},{padding:0})},valueContainer:function(e){return yi(yi({},e),{},{padding:"4px 10px",paddingRight:0})},indicatorSeparator:function(){return{}},singleValue:function(e){return yi(yi({},e),{},{color:"#6b7280"})}},ki=function(e){var t=e.styles,n=(0,di.A)(e,gi);return i.createElement(Kr.A,(0,mi.A)({styles:yi(yi({},Si),t),components:{DropdownIndicator:Ai}},n))},Ci=(0,a.Ay)(et.g).withConfig({componentId:"sc-1b1crde-0"})({width:"0.75rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),Ii=function(){var e=(0,se.A)(de().mark(function e(t,n){var r,i,o,a;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,m.Ay.patch("/api/employee/employees/".concat(t,"/booking-alert-settings"),{bookingAlertSettings:n});case 1:return r=e.sent,i=r.data,e.abrupt("return",(0,pe._k)(i.employee));case 2:throw e.prev=2,a=e.catch(0),o=(0,Se.getErrorFromResponse)(a),new Error("There was an error updating booking alert settings. "+o);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),Ri=Ii;function Pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pi(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Oi,Di,Ni=[{label:"5 minutes",value:5},{label:"15 minutes",value:15},{label:"30 minutes",value:30},{label:"1 hour",value:60}],ji="Notification"in window,Li={alertsEnabled:!0,soundsEnabled:!0,desktopNotificationsEnabled:ji&&"granted"===Notification.permission,timeframe:30},zi=function(e){var t=e.children,n=e.customStyle;return i.createElement($i,{$_css:[{marginTop:"1.5rem",marginBottom:"1.5rem",display:"flex",borderTopWidth:"1px",paddingTop:"1.5rem"},{borderTopColor:"#D1D5DB"},n]},t)},Bi=function(e){var t=e.children,n=e.customStyle;return i.createElement(Hi,{$_css2:[{flexShrink:"0",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem"},n]},t)},Wi=function(e){var t=e.children,n=e.customStyle;return i.createElement(_i,{$_css3:[{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"},n]},t)},Fi=(0,oi.AC)()(function(e){var t=e.handleClose,n=e.providerFilters,o=e.locationFilters,a=(0,i.useState)(""),c=(0,r.A)(a,2),u=c[0],s=c[1],m=(0,i.useRef)(null),d=(0,g.O$)(function(e){return e.user.employee}),p=(0,g.E9)(function(e){return e.user.setEmployee}),f=function(){var e=(0,se.A)(de().mark(function e(n){var r,i;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Ri(d.id,n);case 1:r=e.sent,p(r),t(),e.next=3;break;case 2:e.prev=2,i=e.catch(0),s(i||"Error updating notification settings.");case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,se.A)(de().mark(function e(){var t,n;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!1,!ji){e.next=2;break}return e.next=1,Notification.requestPermission();case 1:n=e.sent,t="granted"===n;case 2:return e.abrupt("return",t);case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),h=function(){return setTimeout(function(){ji&&"granted"!==Notification.permission&&s("Unable to turn on desktop notifications. Check your browser permissions for this site.")},500)};return i.createElement(i.Fragment,null,i.createElement(Vi,null,"Short Notice Booking Alert Settings"),i.createElement(Wi,null,"This notification will alert you if a patient books a video visit on short notice so that you can prepare for the appointment."),i.createElement(l.l1,{onSubmit:f,initialValues:d.bookingAlertSettings?Ti(Ti({},d.bookingAlertSettings),{},{desktopNotificationsEnabled:ji&&"granted"===Notification.permission&&d.bookingAlertSettings.desktopNotificationsEnabled}):Li,innerRef:function(e){e&&(m.current=e)}},function(e){var r=e.values,a=e.setFieldValue;return i.createElement(l.lV,null,i.createElement(zi,null,i.createElement(Bi,{customStyle:{width:"7rem"}},"General"),i.createElement(Mi,null,i.createElement(qi,null,i.createElement(Wi,{customStyle:{width:172}},"Receive booking alerts"),i.createElement(si,{onChange:function(e){a("alertsEnabled",e),e||(a("soundsEnabled",!1),a("desktopNotificationsEnabled",!1))},value:r.alertsEnabled})),i.createElement(Ui,null,i.createElement(Wi,{customStyle:{width:172}},"Notification sound"),i.createElement(si,{onChange:function(e){r.alertsEnabled&&a("soundsEnabled",e)},value:r.soundsEnabled,disabled:!r.alertsEnabled}
1),!r.alertsEnabled&&i.createElement(Yi,null,"To enable sound, first enable booking alerts.")),i.createElement(Gi,null,i.createElement(Wi,{customStyle:{width:172}},"Desktop notifications"),i.createElement(si,{onChange:function(){var e=(0,se.A)(de().mark(function e(t){var n;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.alertsEnabled){e.next=1;break}return e.abrupt("return");case 1:if(h(),!ji||"granted"===Notification.permission){e.next=3;break}return e.next=2,y();case 2:return n=e.sent,a("desktopNotificationsEnabled",n),s(n?"":"Unable to turn on desktop notifications. Check your browser permissions for this site."),e.abrupt("return");case 3:a("desktopNotificationsEnabled",t);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),value:r.desktopNotificationsEnabled,disabled:!r.alertsEnabled}),!r.alertsEnabled&&i.createElement(Ji,null,"To enable desktop notifications, first enable booking alerts.")),u&&i.createElement(Wi,{customStyle:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1 !important",color:"rgb(239 68 68 / var(--tw-text-opacity, 1)) !important"}},u))),i.createElement(zi,null,i.createElement(Bi,{customStyle:{width:"7rem"}},"Timeframe"),i.createElement(Wi,null,"Alert me when a video visit is booked within",i.createElement(Ki,null,i.createElement(ki,{options:Ni,value:Ni.filter(function(e){return r.timeframe===e.value}),onChange:function(e){return a("timeframe",e.value)},isSearchable:!1,styles:{valueContainer:function(e){return Ti(Ti({},e),{},{minWidth:"4rem"})}}})),"or less before the appointment time.")),i.createElement(zi,{customStyle:{flexDirection:"column"}},i.createElement(Bi,{customStyle:{marginBottom:"0.5rem",width:"100%"}},"Provider and Location Selected"),i.createElement(Wi,{customStyle:{marginBottom:"0.5rem"}},"You will receive notifications for the provider or location you filter by in Today's Visits."),i.createElement(Wi,null,"If you are front desk staff, we recommend filtering by your clinic location."),i.createElement(Wi,null,"If you are an MA, we recommend filtering by the provider you work with."),i.createElement(Xi,null,i.createElement(Wi,{customStyle:{alignSelf:"center"}},"Current Filters Applied"),i.createElement(Zi,null,i.createElement(Wi,{customStyle:{marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem"}},"Providers"),i.createElement(Qi,{$_css4:[{display:"flex",flexWrap:"wrap",gap:"0.5rem",borderRadius:"0.125rem","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))",padding:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"},{borderWidth:1}]},n.length?n.map(function(e){return i.createElement(eo,{key:e},e)}):i.createElement(to,null,"None"))),i.createElement(no,null,i.createElement(Wi,{customStyle:{marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem"}},"Locations"),i.createElement(ro,{$_css5:[{display:"flex",flexWrap:"wrap",gap:"0.5rem",borderRadius:"0.125rem","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))",padding:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"},{borderWidth:1}]},o.length?o.map(function(e){return i.createElement(io,{key:e},e)}):i.createElement(oo,null,"None"))))),i.createElement(ao,null,i.createElement(lo,{type:"button",secondary:!0,onClick:function(){return t()},$_css6:[{marginRight:"1rem","--tw-border-opacity":"1",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1))",paddingLeft:"1.25rem",paddingRight:"1.25rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))","&:hover":{"--tw-border-opacity":"1 !important",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1)) !important","--tw-bg-opacity":"1 !important",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1)) !important","--tw-text-opacity":"1 !important",color:"rgb(5 150 105 / var(--tw-text-opacity, 1)) !important"}},{borderWidth:1}]},"Cancel"),i.createElement(co,{type:"submit"},"Save and Close")))}))}),$i=(0,a.Ay)("div")(hi||(hi=(0,v.A)(["",""])),function(e){return e.$_css}),Hi=(0,a.Ay)("h4")(vi||(vi=(0,v.A)(["",""])),function(e){return e.$_css2}),_i=(0,a.Ay)("div")(wi||(wi=(0,v.A)(["",""])),function(e){return e.$_css3}),Vi=(0,a.Ay)("h3")({marginBottom:"0.5rem",fontSize:"1.25rem",fontWeight:"500",lineHeight:"1.75rem"}),Mi=(0,a.Ay)("div")({display:"flex",flexDirection:"column"}),qi=(0,a.Ay)("div")({display:"flex",alignItems:"center"}),Ui=(0,a.Ay)("div")({marginTop:"1rem",display:"flex",alignItems:"center"}),Yi=(0,a.Ay)("div")({marginLeft:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Gi=(0,a.Ay)("div")({marginTop:"1rem",display:"flex",alignItems:"center"}),Ji=(0,a.Ay)("div")({marginLeft:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Ki=(0,a.Ay)("span")({marginLeft:"0.5rem",marginRight:"0.5rem",display:"inline-block"}),Xi=(0,a.Ay)("div")({marginTop:"1rem",display:"grid",width:"100%",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"0.5rem",paddingRight:"2rem"}),Zi=(0,a.Ay)("div")({display:"flex",flexDirection:"column","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Qi=(0,a.Ay)("div")(bi||(bi=(0,v.A)(["",""])),function(e){return e.$_css4}),eo=(0,a.Ay)("div")({borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontWeight:"500"}),to=(0,a.Ay)("div")({fontWeight:"500"}),no=(0,a.Ay)("div")({display:"flex",flexDirection:"column","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ro=(0,a.Ay)("div")(Ei||(Ei=(0,v.A)(["",""])),function(e){return e.$_css5}),io=(0,a.Ay)("div")({borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontWeight:"500"}),oo=(0,a.Ay)("div")({fontWeight:"500"}),ao=(0,a.Ay)("div")({display:"flex",justifyContent:"flex-end"}),lo=(0,a.Ay)(oi.$n)(xi||(xi=(0,v.A)(["",""])),function(e){return e.$_css6}),co=(0,a.Ay)(oi.$n).withConfig({componentId:"sc-1wvu2h0-0"})({paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem"});function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?uo(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var mo,po,go=function(e){var t=e.dismiss,n=(0,i.useState)(""),o=(0,r.A)(n,2),a=o[0],l=o[1],c=(0,g.O$)(function(e){return e.user.employee}),u=(0,g.E9)(function(e){return e.user.setEmployee}),s=function(e){var n=c.id,r=c.bookingAlertSettings,i=so(so({},null!=r?r:Li),{},{desktopNotificationsEnabled:e});Ri(n,i).then(function(e){u(e),t()}).catch(function(e){l("Error enabling notifications: "+e)})},m=function(e){e.enableNotifications?Notification.requestPermission().then(function(e){"granted"===e&&s(!0),"denied"===e&&l("Can't enable notifications. Please check your browser settings for this website.")}):s(!1)};return i.createElement(fo,{$_css:[{position:"absolute",zIndex:"50",borderRadius:"0.5rem",borderTopWidth:"8px","--tw-border-opacity":"1",borderColor:"rgb(51 170 133 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem",paddingBottom:"1rem"},{top:48,right:0,width:455,boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.25)"}]},i.createElement(yo,{$_css2:[{position:"absolute",height:"0",width:"0"},{borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderBottom:"18px solid ".concat("#33AA85"),zIndex:50,top:-22,right:65}]}),i.createElement(ho,null,"Enable desktop notifications for booking alerts?"),i.createElement(vo,null,"Receive short notice booking alerts for video visits even when you are in another tab. You can always edit your choice in Notification Settings."),a&&i.createElement(wo,null,a),i.createElement(bo,null,i.createElement(Eo,{secondary:!0,type:"button",onClick:function(){return m({enableNotifications:!1})}},"Don't Enable"),i.createElement(xo,{type:"button",onClick:function(){return m({enableNotifications:!0})}},"Enable")))},fo=(0,a.Ay)("div")(Oi||(Oi=(0,v.A)(["",""])),function(e){return e.$_css}),yo=(0,a.Ay)("div")(Di||(Di=(0,v.A)(["",""])),function(e){return e.$_css2}),ho=(0,a.Ay)("span")({marginBottom:"0.5rem",fontSize:"1.125rem",lineHeight:"1.75rem"}),vo=(0,a.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),wo=(0,a.Ay)("p")({marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),bo=(0,a.Ay)("div")({display:"flex",alignItems:"center",justifyContent:"flex-end",paddingTop:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Eo=(0,a.Ay)(s.$)({marginRight:"1rem","--tw-border-opacity":"1",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))","&:hover":{"--tw-border-opacity":"1 !important",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1)) !important","--tw-bg-opacity":"1 !important",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1)) !important","--tw-text-opacity":"1 !important",color:"rgb(5 150 105 / var(--tw-text-opacity, 1)) !important"}}),xo=(0,a.Ay)(s.$).withConfig({componentId:"sc-13jx2ii-0"})({paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem"}),Ao=function(e){var t=e.resetFilters;return i.createElement(ko,{onClick:t},"Reset filters")},So=function(e){var t=e.locations,n=e.providers,o=e.specialtyAreas,a=e.numVisible,l=e.showNotificationSettings,c=e.openModal,s=(0,i.useState)(""),m=(0,r.A)(s,2),d=m[0],p=m[1],f=(0,i.useState)(""),y=(0,r.A)(f,2),h=y[0],v=y[1],w=(0,i.useState)(!1),b=(0,r.A)(w,2),E=b[0],x=b[1],A=(0,g.O$)(function(e){return e.user.employee}),S=(0,g.O$)(function(e){return e.user.dailyScheduleFilters}),k=(0,g.E9)(function(e){return e.user.setDailyScheduleFilterValues}),C=(0,g.E9)(function(e){return e.user.resetDailyScheduleFilters}),I=(0,g.E9)(function(e){return e.user.cleanDailyScheduleFiltersOnNavigate}),R=(0,g.O$)(function(e){return e.user.dailyScheduleFiltersIsDefault}),P=t.length>0&&n.length>0&&o.length>0,T="Notification"in window;(0,i.useEffect)(function(){if(T){var e,t=!(null!=A&&A.bookingAlertSettings)||!0===(null==A||null===(e=A.bookingAlertSettings)||void 0===e?void 0:e.desktopNotificationsEnabled),n="default"===Notification.permission&&t;x(n)}},[]);var O=ii(),D=O<768,N=O<600;(0,nt.Ij)(function(){requestAnimationFrame(function(){return k({name:h})})},[(0,nt.d7)(h,350)]),(0,nt.Ij)(function(){!S.providers.length&&null!=A&&A.providerEpicId&&k({providers:[null==A?void 0:A.providerEpicId]})},[n]),(0,i.useEffect)(function(){return function(){return I()}},[]),(0,nt.Ij)(function(){if(P){var e=[];S.name&&e.push("name: ".concat(S.name)),S.providers.length>0&&e.push("providers: ".concat(n.filter(function(e){return S.providers.includes(e.value)}).map(function(e){return'"'.concat(e.label,'"')}).join(", "),"\n                ")),S.locations.length>0&&e.push("locations: ".concat(t.filter(function(e){return S.locations.includes(e.value)}).map(function(e){return'"'.concat(e.label,'"')}).join(", "),"\n                ")),S.specialtyAreas.length>0&&e.push("provider areas: ".concat(o.filter(function(e){return S.specialtyAreas.includes(e.value)}).map(function(e){return'"'.concat(e.label,'"')}).join(", "),"\n                ")),e.push("visit types: ".concat(S.visitTypes)),p(e.join(", "))}},[S,P]);var j=[{label:"All",value:"All"},{label:"PocketDoc Only",value:"PocketDoc Only"},{label:"In-Office Only",value:"In-Office Only"}];return i.createElement(Co,null,i.createElement(Io,null,i.createElement(Ro,null,"Today’s Visits",i.createElement(Po,null,a," visible")),l&&!N&&i.createElement(To,null,i.createElement(Oo,{secondary:!0,type:"button",onClick:function(){return c({type:"Booking Alert Settings",providerFilters:n.filter(function(e){return S.providers.includes(e.value)}).map(function(e){return e.label}),locationFilters:t.filter(function(e){return S.locations.includes(e.value)}).map(function(e){return e.label})})}},i.createElement(Do,{icon:tt.BH7}),i.createElement("span",null,"Notification Settings")),E&&i.createElement(go,{dismiss:function(){return x(!1)}}))),i.createElement(No,null,i.createElement(jo,{$_css:[{gap:"0.5rem"},{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(13rem, 1fr))"}]},i.createElement("div",null,i.createElement(u.JU,null,"Name"),i.createElement(u.pd,{name:"name",value:h,onChange:function(e){v(e.target.value)}})),i.createElement("div",null,i.createElement(u.JU,null,"Providers"),i.createElement(Kr.A,{name:"providers",isMulti:!0,options:n,value:n.filter(function(e){return S.providers.indexOf(e.value)>=0}),onChange:function(e){e.length<=10?k({providers:(e||[]).map(function(e){return e.value})}):alert("You may only filter up to 10 providers.")}})),o.length>1&&i.createElement("div",null,i.createElement(Lo,null,i.createElement(u.JU,null,"Provider Areas"),i.createElement(Mt.A,{content:i.createElement(zo,null,"Filters providers by specialty area. Appointments for matched providers may include other specialty areas."),placement:D?"top":"top-end"},i.createElement(Bo,null,i.createElement(Wo,{icon:tt.iW_})))),i.createElement(Kr.A,{name:"specialtyAreas",isMulti:!0,options:o,value:o.filter(function(e){return S.specialtyAreas.indexOf(e.value)>=0}),onChange:function(e){e.length<=10?k({specialtyAreas:(e||[]).map(function(e){return e.value})}):alert("You may only filter up to 10 specialty areas.")}})),i.createElement("div",null,i.createElement(u.JU,null,"Locations"),i.createElement(Kr.A,{name:"locations",isMulti:!0,options:t,value:t.filter(function(e){return S.locations.indexOf(e.value)>=0}),onChange:function(e){e.length<=10?k({locations:(e||[]).map(function(e){return e.value})}):alert("You may only filter up to 10 locations.")}})),i.createElement("div",null,i.createElement(u.JU,null,"Visit Types"),i.createElement(Kr.A,{name:"visitTypes",options:j,value:j.filter(function(e){return S.visitTypes===e.value}),onChange:function(e){k({visitTypes:e.value})}}))),!R&&P&&i.createElement(Fo,null,i.createElement($o,null,"Displaying filtered results for: ",i.createElement(Ho,null,d)),i.createElement(Ao,{resetFilters:function(){v(""),C(),p("")}})),i.createElement(_o,null,i.createElement(Xr,null),i.createElement(Vo,null,i.createElement(Mo,{to:"".concat(W.q$,"-v2")},"Active Calls"),i.createElement(qo,null,i.createElement(u.Sc,{id:"show_completed",checked:S.showCompleted,onChange:function(e){return k({showCompleted:e.currentTarget.checked})}}),i.createElement(Uo,{uppercase:!0,htmlFor:"show_completed"},"Show Hidden Appointments"),i.createElement(Mt.A,{content:i.createElement(Yo,null,"Show hidden appointments where:",i.createElement("br",null),i.createElement(Go,null,"a) the status is Completed or"),i.createElement("br",null),i.createElement(Jo,null,"b) a call was started on PocketDoc")),placement:D?"top":"top-end"},i.createElement(Ko,null,i.createElement(Xo,{icon:tt.iW_}))))))))},ko=(0,a.Ay)("p")({cursor:"pointer",paddingLeft:"1.5rem",paddingRight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))",textDecorationLine:"underline"}}
1),Co=(0,a.Ay)("div")({zIndex:"10",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"0.75rem","@media (min-width: 768px)":{padding:"1.5rem"}}),Io=(0,a.Ay)("div")({marginBottom:"0.5rem",display:"flex",alignItems:"center"}),Ro=(0,a.Ay)("h1")({marginBottom:"0.5rem",marginRight:"1rem",flex:"1 1 0%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"1.5rem",lineHeight:"2rem"}),Po=(0,a.Ay)("span")({display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"left",fontSize:"0.875rem",fontWeight:"400",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))","@media (min-width: 768px)":{marginLeft:"0.5rem",display:"inline"}}),To=(0,a.Ay)("div")({position:"relative"}),Oo=(0,a.Ay)(s.$)({"--tw-border-opacity":"1",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Do=(0,a.Ay)(et.g)({marginTop:"auto",marginBottom:"auto",marginRight:"0.5rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),No=(0,a.Ay)("div")({display:"flex",flexDirection:"column"}),jo=(0,a.Ay)("div")(mo||(mo=(0,v.A)(["",""])),function(e){return e.$_css}),Lo=(0,a.Ay)("div")({display:"flex",alignItems:"center"}),zo=(0,a.Ay)("div")({maxWidth:"20rem"}),Bo=(0,a.Ay)("span")({marginLeft:"0.5rem",cursor:"pointer",alignItems:"center",justifyContent:"center",textAlign:"right"}),Wo=(0,a.Ay)(et.g)({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Fo=(0,a.Ay)("div")({marginTop:"1rem",display:"flex",alignItems:"center"}),$o=(0,a.Ay)("p")({flex:"1 1 0%","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Ho=(0,a.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),_o=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"flex-start",paddingTop:"1rem","@media (min-width: 768px)":{alignItems:"flex-end"},"@media (min-width: 1024px)":{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}}),Vo=(0,a.Ay)("div")({marginTop:"1rem",display:"flex",flexShrink:"0",flexDirection:"column-reverse","@media (min-width: 768px)":{flexDirection:"row",alignItems:"center"},"@media (min-width: 1024px)":{marginTop:"0"}}),Mo=(0,a.Ay)(o.k2)({marginBottom:"0.5rem",marginRight:"0.5rem",marginTop:"0.75rem",flexShrink:"0","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))","&:hover":{"--tw-text-opacity":"1",color:"rgb(4 120 87 / var(--tw-text-opacity, 1))",textDecorationLine:"underline"},"@media (min-width: 768px)":{marginBottom:"0",marginLeft:"1.5rem",marginTop:"0"}}),qo=(0,a.Ay)("div")({display:"flex",height:"3rem",flexShrink:"0",alignItems:"center",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 768px)":{marginLeft:"0.5rem"}}),Uo=(0,a.Ay)(u.JU)({marginBottom:"0",marginLeft:"0.5rem",cursor:"pointer"}),Yo=(0,a.Ay)("div")({padding:"0.5rem"}),Go=(0,a.Ay)("span")({marginLeft:"1rem"}),Jo=(0,a.Ay)("span")({marginLeft:"1rem"}),Ko=(0,a.Ay)("span")({marginLeft:"0.5rem",cursor:"pointer",alignItems:"center",justifyContent:"center",textAlign:"right","@media (min-width: 768px)":{paddingRight:"0.25rem"}}),Xo=(0,a.Ay)(et.g).withConfig({componentId:"sc-1e0x4ft-0"})({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Zo=function(e){var t=e.handleClick;return i.createElement(Qo,{secondary:!0,onClick:t},"Cancel")},Qo=(0,a.Ay)(s.$.Red).withConfig({componentId:"sc-1mlseyx-0"})({paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem"}),ea=(0,i.forwardRef)(function(e,t){var n=e.handleClick,r=e.disabled,o=e.customStyles;return i.createElement(i.Fragment,null,i.createElement(la,{ref:t,onClick:n,disabled:r,$_css:[{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}},r&&{cursor:"not-allowed"},o]},i.createElement(ca,null),i.createElement(ua,null,"Send Text")))});ea.displayName="MessageButton";var ta,na,ra,ia,oa,aa=ea,la=(0,a.Ay)("button")(po||(po=(0,v.A)(["",""])),function(e){return e.$_css}),ca=(0,a.Ay)(h.dM0)({width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),ua=(0,a.Ay)("div").withConfig({componentId:"sc-fg98tr-0"})({marginLeft:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),sa=function(e){var t=e.formattedPatientName,n=e.patientEmrId,r=e.patientPocketDocId,a=e.patientChildPocketDocId,l=e.ageIsChild,c=e.accountFound,u=(0,o.W6)(),s=!(!r||!c),m=!s&&!!n,d=s||m,p=s?"".concat(W.RN,"/").concat(r).concat(a?"".concat(W.$t,"/").concat(a,"/profile"):""):void 0,g="";return d||(r||n?g="We are unable to find an account for the PocketDoc ID associated with this appointment."
1:(g="A PocketDoc account does not exist for this patient.",l&&(g+=" The patient's guardian must create a PocketDoc account and add the patient as a child."))),i.createElement(ma,null,i.createElement(da,null,i.createElement(Mt.A,{placement:"top-start",content:g,disabled:d},s?i.createElement(o.N_,{to:p},i.createElement(pa,null,t)):m?i.createElement(ga,{type:"button",onClick:function(){return u.push("".concat(W.RN,"/epic"),{epi:n})}},t):i.createElement(fa,null,t))),i.createElement(ya,null,l&&i.createElement(ha,null,"Child")))},ma=(0,a.Ay)("div")({flex:"1 1 0%",overflow:"hidden"}),da=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),pa=(0,a.Ay)("span")({paddingTop:"0.25rem",paddingBottom:"0.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ga=(0,a.Ay)("button")({cursor:"pointer",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),fa=(0,a.Ay)("span")({cursor:"not-allowed",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ya=(0,a.Ay)("div")({marginTop:"0.25rem",display:"flex",alignItems:"center"}),ha=(0,a.Ay)("p").withConfig({componentId:"sc-1w63p0h-0"})({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),va=n(89053),wa=function(e){var t=e.handleClick,n=e.asNavLink,r=void 0!==n&&n;return i.createElement(i.Fragment,null,r?i.createElement(o.N_,{to:"#",onClick:t,className:"hover-reverse"},i.createElement(va.UaG,null),i.createElement(ba,null,"See Patient"),i.createElement(Ea,null)):i.createElement(xa,{onClick:t},"See Patient"))},ba=(0,a.Ay)("span")({flex:"1 1 0%"}),Ea=(0,a.Ay)(h.pTT)({height:"1.25rem !important",width:"1.25rem !important"}),xa=(0,a.Ay)(s.$).withConfig({componentId:"sc-1w6prcq-0"})({paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem"}),Aa=n(30115),Sa=n.n(Aa),ka=n(74096),Ca=function(e){var t,n,r,o,a=e.account,l=(0,g.O$)(function(e){return e.user.serviceArea}),c=qr().styles;if(!a||!(0,b.Nt)(a.selectedPayment))return i.createElement(Ia,null,l===m.xS.MPC?i.createElement(i.Fragment,null,i.createElement("div",{style:c.insurance}),i.createElement("div",{style:c.medGroup})):i.createElement("div",{style:c.insurance}));r=a.selectedPayment,n=a.pharmacy,o=a.id,null===r.primaryCare&&null===r.urgentCare&&(r.requestErrorCode="NO_RESPONSE");var u=null===(t=n)||void 0===t?void 0:t.state.slice(0,2).toUpperCase(),s="insurance"===r.type&&"-2"===r.payorId;return i.createElement(Ra,null,l===m.xS.MPC&&r.requestErrorCode&&!r.isManuallyVerified?i.createElement(Pa,null,["NO_RESPONSE","LIMIT_REACHED","UNKNOWN_PLAN"].indexOf(r.requestErrorCode)>=0?i.createElement(Mt.A,{content:"View Patient Insurance"},i.createElement(Ta,{to:"".concat(W.RN,"/").concat(o).concat(W.YO)},"".concat(r.requestError||"No response received",": verify in Epic."))):i.createElement(Oa,{$_css:"1075"===r.payorId?{"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}},"1075"===r.payorId?i.createElement(Da,{icon:tt.zpE}):i.createElement(Na,{icon:tt.tUE}),i.createElement(Mt.A,{content:"View Patinet Insurnace"},i.createElement(ja,{to:"".concat(W.RN,"/").concat(o).concat(W.YO)},(0,b.Sv)(r.requestErrorCode,r.requestError||""))))):i.createElement(i.Fragment,null,i.createElement(La,null,i.createElement(za,null,u&&i.createElement(Ba,{$_css2:[{marginRight:"0.5rem",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"1px",paddingBottom:"1px",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"},"CA"!==u&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity, 1))","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}]},u),i.createElement(Mt.A,{content:r.plan},i.createElement(Wa,{$_css3:[{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},s&&{"--tw-text-opacity":"1",color:"rgb(49 130 206 / var(--tw-text-opacity, 1))"}]},(0,ka.title)(r.plan)))),r.isManuallyVerified?i.createElement($a,null,"Manually Verified"):i.createElement(Fa,{title:r.planType},r.planType)),l===m.xS.MPC?i.createElement(Ha,null,r.medicalGroup&&"na"!==r.medicalGroup.toLowerCase()?i.createElement(_a,{title:r.medicalGroup},i.createElement(Va,null,"GRP"),i.createElement(Mt.A,{content:r.medicalGroup,placement:"top-end"},i.createElement(Ma,null,(0,ka.title)(r.medicalGroup)))):null,["","na","not found"].indexOf(r.pcp.toLowerCase())<0&&i.createElement(qa,{title:r.pcp},i.createElement(Ua,null,"PCP"),i.createElement(Ya,null,(0,ka.title)(r.pcp)))):null))},Ia=(0,a.Ay)("div")({display:"flex",flexDirection:"row",alignItems:"center"}),Ra=(0,a.Ay)("div")({display:"flex",flexDirection:"row",alignItems:"center"}),Pa=(0,a.Ay)("div")({width:"24rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),Ta=(0,a.Ay)(o.N_)({"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}}),Oa=(0,a.Ay)("p")(ta||(ta=(0,v.A)(["",""])),function(e){return e.$_css}),Da=(0,a.Ay)(et.g)({marginRight:"0.5rem","--tw-text-opacity":"1",color:"rgb(236 201 75 / var(--tw-text-opacity, 1))"}),Na=(0,a.Ay)(et.g)({marginRight:"0.5rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),ja=(0,a.Ay)(o.N_)({"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}}),La=(0,a.Ay)("div")({width:"12rem"}),za=(0,a.Ay)("div")({marginBottom:"0.25rem",display:"flex",alignItems:"center"}),Ba=(0,a.Ay)("span")(na||(na=(0,v.A)(["",""])),function(e){return e.$_css2}),Wa=(0,a.Ay)("p")(ra||(ra=(0,v.A)(["",""])),function(e){return e.$_css3}),Fa=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),$a=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",fontWeight:"500",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Ha=(0,a.Ay)("div")({width:"12rem"}),_a=(0,a.Ay)("p")({marginBottom:"0.25rem",display:"flex",alignItems:"center"}),Va=(0,a.Ay)("span")({marginRight:"0.5rem",userSelect:"none",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"1px",paddingBottom:"1px",fontSize:"0.75rem",lineHeight:"1rem"}),Ma=(0,a.Ay)("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}
1),qa=(0,a.Ay)("p")({display:"flex",alignItems:"center"}),Ua=(0,a.Ay)("span")({marginRight:"0.5rem",userSelect:"none",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"1px",paddingBottom:"1px",fontSize:"0.75rem",lineHeight:"1rem"}),Ya=(0,a.Ay)("span").withConfig({componentId:"sc-1f2qlxe-0"})({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Ga=function(){return i.createElement(Mt.A,{content:"Call was started for this appointment."},i.createElement("div",{style:{transform:"translateY(-1px) translateX(6px)"}},i.createElement(h.EsG,{style:{height:16}})))},Ja=n(70133),Ka=n(1170),Xa={top:"bottom",bottom:"top",left:"right",right:"left",auto:"auto"},Za=a.Ay.div.withConfig({componentId:"sc-19mqw3-0"})([""," &::after{",' content:"";}',""],{position:"relative",zIndex:"50",height:"0",width:"0"},{position:"absolute",zIndex:"50",height:"0",width:"0"},function(e){switch(e.position){case"left":return"\n                    border-top: 10px solid transparent;\n                    border-bottom: 10px solid transparent;\n                    border-right: 18px solid #E5E7EB;\n                    left: -18px;\n                    ::after {\n                        border-top: 8px solid transparent;\n                        border-bottom: 8px solid transparent;\n                        border-right: 14px solid white;\n                        top: -8px;\n                        left: 4px;\n                    }\n                ";case"right":return"\n                    border-top: 10px solid transparent;\n                    border-bottom: 10px solid transparent;\n                    border-left: 18px solid #E5E7EB;\n                    right: -18px;\n                    ::after {\n                        border-top: 8px solid transparent;\n                        border-bottom: 8px solid transparent;\n                        border-left: 14px solid white;\n                        top: -8px;\n                        right: 4px;\n                    }\n                ";case"top":return"\n                    border-left: 10px solid transparent;\n                    border-right: 10px solid transparent;\n                    border-bottom: 18px solid #E5E7EB;\n                    top: -18px;\n                    ::after {\n                        border-left: 8px solid transparent;\n                        border-right: 8px solid transparent;\n                        border-bottom: 14px solid white;\n                        left: -8px;\n                        bottom: -18px;\n                    }\n                ";case"bottom":return"\n                    border-left: 10px solid transparent;\n                    border-right: 10px solid transparent;\n                    border-top: 18px solid #E5E7EB;\n                    bottom: -18px;\n                    ::after {\n                        border-left: 8px solid transparent;\n                        border-right: 8px solid transparent;\n                        border-top: 14px solid white;\n                        left: -8px;\n                        top: -18px;\n                    }\n                "}}),Qa={backgroundColor:"transparent",textAlign:"left",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"},el=a.Ay.div.withConfig({componentId:"sc-19mqw3-1"})([""," "," ",""],{position:"absolute",zIndex:"50",float:"left"},function(e){var t;return null!==(t=e.customBubbleStyles)&&void 0!==t?t:Qa},function(e){return e.arrow?{left:40}:""}),tl="right",nl=function(e){var t=e.targetRef,n=e.placement,o=void 0===n?"right-end":n,a=e.visible,l=e.arrow,c=e.customStyles,u=e.children,s=(0,i.useState)(tl),m=(0,r.A)(s,2),d=m[0],p=m[1],g=(0,i.useState)(""),f=(0,r.A)(g,2),y=f[0],h=f[1],v=(0,i.useRef)(d),w=(0,i.useRef)(null),b=(0,i.useRef)(null);return(0,i.useEffect)(function(){h(Xa[d])},[d]),(0,i.useEffect)(function(){t&&t.current&&w.current&&w&&(0,Ka.n4)(t.current,w.current,{placement:o,modifiers:[{name:"offset",options:{offset:[0,20]}},{name:"arrow",options:{element:b.current}},{name:"placementUpdate",enabled:!0,phase:"main",requires:["arrow"],fn:function(e){var t=e.state;if(!t.placement.startsWith(v.current)){var n=function(e){return e?e.split("-")[0]:tl}(t.placement);v.current=n,p(n)}}}]})},[a,t]),i.createElement(i.Fragment,null,a&&i.createElement(el,{ref:w,arrow:l||!1,customBubbleStyles:null==c?void 0:c.bubble},i.createElement(i.Fragment,null,l&&i.createElement(Za,{ref:b,position:y,customArrowStyles:null==c?void 0:c.arrow,"data-popper-arrow":!0}),u)))},rl=n(40961),il=function(e){var t,n=e.appointment,o=e.providerDisplayName,a=e.locationDisplayName,l=e.isPocketDoc,c=e.showMessagePatientPopper,u=e.openModal,s=e.setLoading,d=e.handlePopperDismiss,p=(0,i.useState)(!1),g=(0,r.A)(p,2),y=g[0],h=g[1],v=qr(),w=v.totalBaseWidth,E=v.styles,x=(0,i.useRef)(null),A=n.appointmentEmrStatus===b.Qf.Completed||n.callStarted,S=(0,f.W6)().push;return(0,i.useEffect)(function(){var e=new IntersectionObserver(function(e){return h(e[0].isIntersecting)},{threshold:1});return e.observe(x.current),function(){return e.disconnect()}},[x]),i.createElement(al,{style:{minWidth:"calc(3rem + ".concat(w,"px)")},$_css:[{display:"flex",flexDirection:"row","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem",paddingBottom:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"},A&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1))"}]},i.createElement(ll,{style:E.time},i.createElement(cl,null,n.timeFormatted)),i.createElement(ul,{style:E.name},i.createElement(sa,{patientEmrId:n.patientEmrId,formattedPatientName:n.patientNameFormatted,patientPocketDocId:n.patientPocketDocId,patientChildPocketDocId:n.patientChildPocketDocId,ageIsChild:n.ageIsChild,accountFound:!(null===(t=n.pocketDocAccount)||void 0===t||!t.id)})),i.createElement(sl,{style:E.actions},i.createElement(ml,null,l&&i.createElement(wa,{handleClick:function(){return e=n.visitToken,void S("".concat(W.g9,"/").concat(e));var e}})),i.createElement(dl,null,n.appointmentEmrStatus!==b.Qf.Completed&&i.createElement(Zo,{handleClick:function(){return u({type:"Cancel",appointmentEmrId:n.appointmentEmrId,patientName:n.patientNameFormatted,patientEmrId:n.patientEmrId,providerName:o})}})),i.createElement(pl,null,i.createElement(aa,{ref:x,handleClick:function(){return function(e){var t,n,r=null!==(t=null===(n=e.pocketDocAccount)||void 0===n?void 0:n.phone)&&void 0!==t?t:"";""!==r?u({type:"Message",recipientPhoneNumber:r}):(s(!0),(0,Ja.A)(m.jv.EPI,e.patientEmrId).then(function(e){var t,n,i;""!==(r=null!==(t=null===(n=e.phones)||void 0===n||null===(i=n.find(function(e){return"Mobile"===e.type}))||void 0===i?void 0:i.number)&&void 0!==t?t:"")?u({type:"Message",recipientPhoneNumber:r}):alert("SMS unavailable for patient. No valid phone number in patient chart.")}).catch(function(){alert("SMS unavailable for patient. Error while fetching a phone number.")}).finally(function(){return s(!1)}))}(n)},customStyles:A?{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1))","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(209 213 219 / var(--tw-bg-opacity, 1))"}}:void 0}))),c&&(0,rl.createPortal)(i.createElement(nl,{visible:y,targetRef
1:x,placement:"right",arrow:!0,customStyles:{arrow:{borderBottomWidth:"2px",borderLeftWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))"},bubble:{zIndex:"50",borderRadius:"0.5rem",borderWidth:"2px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"1rem","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}}},i.createElement(gl,null,i.createElement(fl,null,"Keep patients updated via text"),i.createElement(yl,null,"Click here to text a patient when you are running late or starting soon."),i.createElement(hl,null,i.createElement(vl,{onClick:d},"OK")))),document.body),i.createElement(wl,{style:E.visitType},i.createElement(bl,null,n.visitTypeEmrName)),i.createElement(El,{style:E.status,$_css2:[{display:"flex",alignItems:"center",paddingRight:"1rem"},n.appointmentEmrStatus===b.Qf.Completed&&{"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}]},i.createElement(xl,null,n.appointmentEmrStatus),n.callStarted&&i.createElement(Ga,null)),i.createElement(Al,{style:E.provider},i.createElement(Sl,null,o)),i.createElement(kl,{style:E.location},i.createElement(Cl,null,a)),i.createElement(Il,null,i.createElement(Ca,{account:n.pocketDocAccount})))},ol=(0,i.memo)(il,Sa()),al=(0,a.Ay)("div")(ia||(ia=(0,v.A)(["",""])),function(e){return e.$_css}),ll=(0,a.Ay)("div")({display:"flex",alignItems:"center",paddingRight:"1rem"}),cl=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem"}),ul=(0,a.Ay)("div")({display:"flex",alignItems:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingRight:"1rem"}),sl=(0,a.Ay)("div")({display:"grid",gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gap:"0.25rem",paddingLeft:"0.5rem",paddingRight:"1rem"}),ml=(0,a.Ay)("div")({gridColumn:"span 4 / span 4",display:"flex",alignItems:"center"}),dl=(0,a.Ay)("div")({gridColumn:"span 3 / span 3",display:"flex",alignItems:"center",justifyContent:"center"}),pl=(0,a.Ay)("div")({gridColumn:"span 5 / span 5",display:"flex",alignItems:"center",justifyContent:"center"}),gl=(0,a.Ay)("div")({maxWidth:275}),fl=(0,a.Ay)("div")({marginBottom:"0.5rem",fontSize:"1rem",fontWeight:"500",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),yl=(0,a.Ay)("div")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),hl=(0,a.Ay)("div")({display:"flex",justifyContent:"flex-end"}),vl=(0,a.Ay)(s.$)({paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem"}),wl=(0,a.Ay)("div")({display:"flex",alignItems:"center",paddingRight:"1rem"}),bl=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem"}),El=(0,a.Ay)("div")(oa||(oa=(0,v.A)(["",""])),function(e){return e.$_css2}),xl=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem"}),Al=(0,a.Ay)("div")({display:"flex",alignItems:"center",paddingRight:"1rem"}),Sl=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem"}),kl=(0,a.Ay)("div")({display:"flex",alignItems:"center",paddingRight:"1rem"}),Cl=(0,a.Ay)("p")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem"}),Il=(0,a.Ay)("div").withConfig({componentId:"sc-zqouv0-0"})({display:"flex",flexDirection:"row",alignItems:"center"}),Rl=n(15031),Pl=n(45458),Tl=n(13684),Ol=n(27869),Dl=n(96763);function Nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Nl(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ll(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return zl(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function zl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bl,Wl,Fl,$l,Hl,_l,Vl,Ml,ql,Ul,Yl,Gl,Jl,Kl,Xl,Zl,Ql,ec,tc,nc=function(){var e,t,n=(0,i.useRef)(!1),o=(0,g.O$)(function(e){return e.user.serviceArea}),a=(0,Rl.A)().data,l=(0,g.O$)(function(e){return e.user.dailyScheduleFilters}),c=(0,i.useState)([]),u=(0,r.A)(c,2),s=u[0],m=u[1],d=(0,i.useState)(),p=(0,r.A)(d,2),f=p[0],y=p[1],h=(0,i.useState)(!0),v=(0,r.A)(h,2),w=v[0],b=v[1],E=(0,i.useRef)(),x=function(){E.current&&E.current()},A=(null!==(e=null==a?void 0:a.locations.length)&&void 0!==e?e:0)>0&&(null!==(t=null==a?void 0:a.providers.length)&&void 0!==t?t:0)>0,S=(0,i.useRef)({}).current,k=function(e){var t,n=Ll(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;S[r.id]=r}}catch(e){n.e(e)}finally{n.f()}},C=function(e){y({appointment:e,action:"added"}),m(function(t){return[].concat((0,Pl.A)(t),[e])})},I=function(e){y({appointment:e,action:"modified"}),m(function(t){return t.map(function(t){return t.appointmentEmrId===e.appointmentEmrId?e:t})})};return(0,Tl.A)(function(){n.current=!1,x();var e=En.A.now(),t=new Date(e.startOf("day").epoch),r=new Date(e.endOf("day").epoch);if(A){var i=dn.Sn.collection(dn.pV.DAILY_SCHEDULE).where("serviceArea","==",o).where("appointmentDateTime",">",t).where("appointmentDateTime","<",r);l.providers.length>0?i=i.where("providerEmrId","in",l.providers):l.locations.length>0&&(i=i.where("locationEmrId","in",l.locations)),E.current=i.onSnapshot(function(e){n.current&&e.docChanges().forEac
1h(function(e){var t=e.type,n=e.doc;if("added"===t){var r=(0,pe.GH)(n.data());r.patientPocketDocId?S[r.patientPocketDocId]?C(jl(jl({},r),{},{pocketDocAccount:S[r.patientPocketDocId]})):(0,Ol.A)([r.patientPocketDocId]).then(function(e){var t;k(e),C(jl(jl({},r),{},{pocketDocAccount:null!==(t=S[r.patientPocketDocId])&&void 0!==t?t:void 0}))}).catch(function(e){return Dl.error(e)}):C(r)}if("modified"===t){var i=(0,pe.GH)(n.data());i.patientPocketDocId?S[i.patientPocketDocId]?I(jl(jl({},i),{},{pocketDocAccount:S[i.patientPocketDocId]})):(0,Ol.A)([i.patientPocketDocId]).then(function(e){var t;k(e),I(jl(jl({},i),{},{pocketDocAccount:null!==(t=S[i.patientPocketDocId])&&void 0!==t?t:void 0}))}).catch(function(e){return Dl.error(e)}):I(i)}"removed"===t&&function(e){y({appointment:e,action:"removed"}),m(function(t){return t.filter(function(t){return t.appointmentEmrId!==e.appointmentEmrId})})}((0,pe.GH)(n.data()))})}),b(!0),i.get().then(function(e){if(e.docs){var t=e.docs.map(function(e){return e.data()}).map(pe.GH),r=(0,Pl.A)(new Set(t.filter(function(e){return!!e.patientPocketDocId}).map(function(e){return e.patientPocketDocId})));(0,Ol.A)(r).then(function(e){k(e),m(t.map(function(e){var t;return jl(jl({},e),{},{pocketDocAccount:null!==(t=S[e.patientPocketDocId])&&void 0!==t?t:void 0})})),n.current=!0,b(!1)}).catch(function(e){return Dl.error(e)})}})}},[o,A,l.providers,l.locations]),(0,i.useEffect)(function(){return x},[]),{scheduleAppointments:s,lastHandledAppointment:f,appointmentsLoading:w}},rc=n(99625),ic=n(60559),oc=n(40050),ac=function(e){var t=e.appointmentEmrId,n=e.patientEmrId,r=e.patientName,o=e.providerName,a=e.handleClose,l=e.setError,c=e.setLoading;return i.createElement(u.Gu,{title:"Cancel ".concat(r,"'s Appointment?"),cancel:"No, Keep this Appointment",confirm:"Yes, Cancel this Appointment",onDismissed:a,onConfirmClick:function(){c(!0),(0,oc.A)({appointmentEmrId:t,patientEmrIdType:m.jv.EPI,patientEmrIdValue:n}).catch(function(e){return l((0,Se.getErrorFromResponse)(e))}).finally(function(){return c(!1)})}},i.createElement(lc,null,"Are you sure you want to cancel ",r,"'s appointment with ",o,"?"))},lc=(0,a.Ay)("p").withConfig({componentId:"sc-hkdw09-0"})({marginTop:"0.5rem",fontSize:"1.125rem",lineHeight:"1.75rem"}),cc=n(22321),uc=(0,oi.AC)()(function(e){var t=e.emrIdType,n=e.emrIdValue,o=(0,i.useState)(!0),a=(0,r.A)(o,2),l=a[0],c=a[1],s=(0,i.useState)(null),d=(0,r.A)(s,2),p=d[0],g=d[1],f=(0,i.useState)(""),y=(0,r.A)(f,2),h=y[0],v=y[1];return(0,i.useEffect)(function(){(0,Ja.A)(t,n).then(function(e){g(e)}).catch(function(e){return v((0,Se.getErrorFromResponse)(e))}).finally(function(){return c(!1)})},[]),i.createElement(i.Fragment,null,l&&i.createElement(sc,null,i.createElement(u.y$,{size:"large"}),i.createElement(mc,null,"Looking up patient demographics.")),!l&&null!==p&&i.createElement(cc.A,{mrn:p.ids.find(function(e){return e.Type===m.jv.UCSDMRN}).ID,data:p}),""!==h&&i.createElement(dc,null,i.createElement(pc,null,h)))}),sc=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"5rem",paddingBottom:"5rem"}),mc=(0,a.Ay)("p")({marginTop:"2rem",fontSize:"1.25rem",lineHeight:"1.75rem"}),dc=(0,a.Ay)("div")({marginBottom:"1rem",borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(239 68 68 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity, 1))",padding:"1rem"}),pc=(0,a.Ay)("p").withConfig({componentId:"sc-16fwdsj-0"})({fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),gc=n(98678),fc=n(96763),yc=function(e){var t=e.patientPocketDocId,n=e.handleClose,r=e.setError,o=e.setLoading,a=e.appointmentEmrId,l=e.locationEmrId,c=(0,f.W6)();return i.createElement(u.Gu,{title:"Start a Video Session?",onDismissed:n,onConfirmClick:function(){o(!0),(0,gc.A)(t,a,l).then(function(e){return c.push("".concat(W.RN,"/").concat(t,"/sessions/").concat(e))}).catch(function(e){fc.error(e),r((0,Se.getErrorFromResponse)(e))}).then(function(){return o(!1)})},confirm:i.createElement(hc,null,"Start Session"),borderColor:"#D69E2E"},"You'll have a chance to check your video and audio settings before the patient is notified.")},hc=(0,a.Ay)(s.$).withConfig({componentId:"sc-fmdpz2-0"})({"--tw-border-opacity":"1",borderColor:"rgb(214 158 46 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1 !important",backgroundColor:"rgb(214 158 46 / var(--tw-bg-opacity, 1)) !important","&:hover":{"--tw-border-opacity":"1 !important",borderColor:"rgb(183 121 31 / var(--tw-border-opacity, 1)) !important","--tw-bg-opacity":"1 !important",backgroundColor:"rgb(183 121 31 / var(--tw-bg-opacity, 1)) !important"}}),vc=function(e){var t=e.state,n=e.handleClose,o=(0,i.useState)(!1),a=(0,r.A)(o,2),l=a[0],c=a[1],s=(0,i.useState)(""),d=(0,r.A)(s,2),p=d[0],g=d[1];return i.createElement(i.Fragment,null,null===t?null:i.createElement(i.Fragment,null,"Register"===t.type&&i.createElement(uc,{visible:!0,emrIdType:m.jv.EPI,emrIdValue:t.patientEmrId,onModalDismissed:n}),"Cancel"===t.type&&i.createElement(ac,{appointmentEmrId:t.appointmentEmrId,patientEmrId:t.patientEmrId,patientName:t.patientName,providerName:t.providerName,handleClose:n,setLoading:c,setError:g}),"Message"===t.type&&i.createElement(ic.A,{recipientPhoneNumber:t.recipientPhoneNumber,visible:!0,onModalDismissed:n}),"See Patient"===t.type&&i.createElement(yc,{patientPocketDocId:t.patientPocketDocId,appointmentEmrId:t.appointmentEmrId,locationEmrId:t.locationEmrId,handleClose:n,setLoading:c,setError:g}),"Booking Alert Settings"===t.type&&i.createElement(Fi,{visible:!0,handleClose:n,onModalDismissed:n,providerFilters:t.providerFilters,locationFilters:t.locationFilters})),l&&i.createElement(u.y$.Overlay,{size:"base",visible:l}),p&&i.createElement(u.Gu,{title:"Something went wrong.",cancel:null,confirm:"Okay",onDismissed:function(){return g("")}},p))},wc=n.p+"alert.aed7510a.mp3",bc=function(){var e=(0,i.useState)(document.hasFocus()),t=(0,r.A)(e,2),n=t[0],o=t[1],a=function(){return o(!0)},l=function(){return o(!1)};return(0,i.useEffect)(function(){return window.addEventListener("focus",a),window.addEventListener("blur",l),function(){window.removeEventListener("focus",a),window.removeEventListener("blur",l)}},[]),n},Ec=n(75859),xc=function(){return i.createElement(Ic,{$_css:[{paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"},{width:"17rem"}]},"Alerts you if a patient books a video visit on short notice. Edit your preferences using the Settings button on the bottom right.")},Ac=a.Ay.div(Bl||(Bl=(0,v.A)(["\n    ","\n    width: 36px;\n    height: 36px;\n    background-color: #F8F8FA;\n"])),{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Sc=function(e){var t=e.icon,n=e.name,r=e.description;return i.createElement(Rc,null,i.createElement(Ac,null,i.createElement(Pc,{icon:t})),i.createElement(Tc,null,i.createElement(Oc,null,n),i.createElement(Dc,null,r)))},kc=new Audio(wc),Cc=function(e){var t,n,o=e.lastHandledAppointment,l=e.providerEmrIdMap,c=e.locationEmrIdMap,u=e.visitTypeEmrIdMap,s=e.openModal,m=(0,i.useState)([]),d=(0,r.A)(m,2),p=d[0],f=d[1],h=(0,i.useState)(p.length?p[0]:null),v=(0,r.A)(h,2),w=v[0],E=v[1],x=(0,i.useRef)(document.title),A=(0,g.O$)(function(e){return e.user.dailyScheduleFilters}),S=(0,g.O$)(function(e){return e.user.employee}).bookingAlertSettings,k=(0,g.O$)(function(e){return e.user.dailyScheduleFilters}),C=k.providers,I=k.locations,R=k.visitTypes,P=null===(t=null==S?void 0:S.alertsEnabled)||void 0===t||t,T=null===(n=null==S?void 0:S.soundsEnabled)||void 0===n||n,O=!(!("Notification"in window)||"granted"!==Notification.permission||null==S||!S.desktopNotificationsEnabled),D=C.length>0,N=I.length>0,j=D||N,L=["PocketDoc Only","All"].includes(R),z=bc(),B=ii(),W=P&&j&&L&&!(B<600),F=function(e){return l[e]},$=function(e){var t=e.firstName,n=e.lastName,r=e.providerTitle;return t+" "+n+(r?" "+r:"")},H=function(e){var t=p.filter(function(t){return t.appointmentEmrId!==e});f(t)},_=w?(0,Ec.GPZ)(w.appointmentDateTime,"MMM d, yyyy h:mma"):"",V=w?(0,Ec.GPZ)(null==w?void 0:w.appointmentDateTime,"h:mma"):"",M=w?(0,Ec.GPZ)((0,Ec.z5D)(null==w?void 0:w.appointmentDateTime,15),"h:mma"):"";(0,i.useEffect)(function(){var e,t,n,r,i,a;W&&(void 0!==o&&("removed"===o.action&&H(o.appointment.appointmentEmrId),"added"===o.action&&function(e){var t,n;if(!(null===(t=u[e.visitTypeEmrId])||void 0===t?void 0:t.isPocketDoc))return!1;var r=y.kB.now().diff(e.appointmentDateTime,"minute"),i=r>=-15&&r<=(null!==(n=null==S?void 0:S.timeframe)&&void 0!==n?n:30);if(e.callStarted||!i)return!1;var o=C.includes(e.providerEmrId),a=I.includes(e.locationEmrId);return D&&N?o&&a:D?o:!!N&&a}
1(o.appointment)&&(!function(e){var t=F(e.providerEmrId),n=$(t),r=(0,Ec.qgA)(e.dateFormatted,"MMM d, yyyy h:mm a",new Date);if(r){var i=(0,Ec.LYq)(r,1),o={appointmentEmrId:e.appointmentEmrId,appointmentDateTime:r,patientNameFormatted:e.patientNameFormatted,providerNameFormatted:n,visitTypeEmrName:e.visitTypeEmrName,staleAtTime:i};f([o].concat((0,Pl.A)(p)))}}(o.appointment),T&&kc&&kc.play(),!z&&O&&(e=o.appointment,t=e.appointmentDateTime,n=e.providerEmrId,r=t.format("{ampm}").toUpperCase(),i=t.format("{hour}:{minute-pad}")+r,a=$(F(n)),new Notification("Short Notice Booking Alert",{body:"".concat(i," for ").concat(a),requireInteraction:!0,silent:!0})))))},[o]);(0,i.useEffect)(function(){var e=setInterval(function(){var e=(0,b.q8)(new Date);f(p.filter(function(t){return(0,Ec.Y8r)(e,t.staleAtTime)}))},3e5);return function(){return clearInterval(e)}},[p]);(0,i.useEffect)(function(){var e;p.length?E(p[0]):E(null),e=p.length,document.title=e?"(".concat(e,") ").concat(x.current):x.current},[p.length]),(0,i.useEffect)(function(){return function(){document.title=x.current}},[]);var q=(0,i.useContext)(a.Dx).colors.charts.pocketDocPink;return i.createElement(i.Fragment,null,W&&!!w&&i.createElement(Nc,{$_css2:[{position:"absolute",right:"0",top:"0",zIndex:"30",borderRadius:"0.5rem",borderTopWidth:"8px","--tw-border-opacity":"1",borderColor:"rgb(51 170 133 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem",paddingBottom:"1rem"},{width:524,boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.25)"}]},i.createElement(jc,null,i.createElement("div",null,i.createElement(Lc,null,"Short Notice Booking Alert"),i.createElement(zc,null,i.createElement(Mt.A,{content:i.createElement(xc,null)},i.createElement("span",null,i.createElement(Bc,{icon:tt.iW_}))))),i.createElement("div",null,p.length>1&&i.createElement(Wc,{type:"button",onClick:function(){f([]),E(null)},$_css3:[{fontSize:"0.75rem",lineHeight:"1rem"},{color:q}]},"Dismiss All (",p.length,")"))),i.createElement(Fc,{$_css4:[{marginTop:"1rem",marginBottom:"1rem",display:"grid",rowGap:"1rem"},{gridTemplateColumns:"minmax(auto, 2fr) auto"}]},i.createElement(Sc,{icon:tt.X46,name:"Name",description:w.patientNameFormatted}),i.createElement(Sc,{icon:tt.rWQ,name:"Provider",description:w.providerNameFormatted}),i.createElement(Sc,{icon:tt.n2W,name:"Visit Type",description:w.visitTypeEmrName}),i.createElement(Sc,{icon:tt.isQ,name:"Date",description:_})),i.createElement($c,null,i.createElement(Hc,null,"As a reminder, you should start this visit between",i.createElement(_c,null," ",V," - ",M),"."),i.createElement(Vc,null,i.createElement(Mc,{secondary:!0,type:"button",onClick:function(){return s({type:"Booking Alert Settings",providerFilters:A.providers.map(function(e){return l[e].name}),locationFilters:A.locations.map(function(e){return c[e].name})})},$_css5:[{display:"flex",width:"6rem",alignItems:"center","--tw-border-opacity":"1",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1))",padding:"0",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))","&:hover":{"--tw-border-opacity":"1 !important",borderColor:"rgb(5 150 105 / var(--tw-border-opacity, 1)) !important","--tw-bg-opacity":"1 !important",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1)) !important","--tw-text-opacity":"1 !important",color:"rgb(5 150 105 / var(--tw-text-opacity, 1)) !important"}},{height:30}]},i.createElement(qc,{icon:tt.BH7}),i.createElement("span",null,"Settings")),i.createElement(Uc,{onClick:function(){return H(w.appointmentEmrId)},$_css6:[{marginLeft:"1rem",display:"flex",width:"5rem",alignItems:"center",padding:"0",fontSize:"0.875rem",lineHeight:"1.25rem"},{height:30}]},i.createElement("span",null,"OK"))))))},Ic=(0,a.Ay)("div")(Wl||(Wl=(0,v.A)(["",""])),function(e){return e.$_css}),Rc=(0,a.Ay)("div")({display:"flex",fontSize:"0.875rem",lineHeight:"1.25rem"}),Pc=(0,a.Ay)(et.g)({height:"1rem",width:"1.25rem"}),Tc=(0,a.Ay)("div")({marginLeft:"1rem",display:"flex",flexDirection:"column"}),Oc=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Dc=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Nc=(0,a.Ay)("div")(Fl||(Fl=(0,v.A)(["",""])),function(e){return e.$_css2}),jc=(0,a.Ay)("div")({display:"flex",alignItems:"center",justifyContent:"space-between"}),Lc=(0,a.Ay)("span")({marginBottom:"0.5rem",fontSize:"1.125rem",lineHeight:"1.75rem"}),zc=(0,a.Ay)("span")({marginLeft:"0.5rem"}),Bc=(0,a.Ay)(et.g)({width:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))","&:hover":{cursor:"pointer"}}),Wc=(0,a.Ay)("button")($l||($l=(0,v.A)(["",""])),function(e){return e.$_css3}),Fc=(0,a.Ay)("div")(Hl||(Hl=(0,v.A)(["",""])),function(e){return e.$_css4}),$c=(0,a.Ay)("div")({display:"flex",justifyContent:"space-between"}),Hc=(0,a.Ay)("div")({fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),_c=(0,a.Ay)("span")({fontWeight:"500","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Vc=(0,a.Ay)("div")({marginLeft:"0.5rem",display:"flex",flexShrink:"0",flexWrap:"nowrap"}),Mc=(0,a.Ay)(s.$)(_l||(_l=(0,v.A)(["",""])),function(e){return e.$_css5}),qc=(0,a.Ay)(et.g)({marginTop:"auto",marginBottom:"auto",marginRight:"0.5rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Uc=(0,a.Ay)(s.$).withConfig({componentId:"sc-1e7vqje-0"})(["",""],function(e){return e.$_css6}),Yc=function(){var e=(0,se.A)(de().mark(function e(t,n){var r,i,o,a;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,m.Ay.patch("/api/employee/employees/".concat(t,"/dismissed-settings"),{dismissedUIElement:n});case 1:return r=e.sent,i=r.data,e.abrupt("return",(0,pe._k)(i.employee));case 2:throw e.prev=2,a=e.catch(0),o=(0,Se.getErrorFromResponse)(a),new Error("There was an error updating dismissed UI elements. "+o);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),Gc=Yc,Jc=n(50064),Kc=function(){var e,t,n=(0,g.O$)(function(e){return e.user.serviceArea}),o=(0,g.O$)(function(e){return e.user.dailyScheduleFilters}),a=(0,g.O$)(function(e){return e.user.employee}),l=(0,g.E9)(function(e){return e.user.setEmployee}),c=[m.xS.MPC,m.xS.MTL,m.xS.WEL,m.xS.ENDO,m.xS.PAIN,m.xS.GASTRO,m.xS.PHYS].includes(n),s=(0,Rl.A)(),d=s.data,p=s.mutate,f=nc(),y=f.scheduleAppointments,h=f.lastHandledAppointment,v=f.appointmentsLoading,w=(0,i.useState)([]),E=(0,r.A)(w,2),x=E[0],A=E[1],S=(0,i.useState)(!1),k=(0,r.A)(S,2),C=k[0],R=k[1],P=!(null!==(e=a.dism
1issedUIElements)&&void 0!==e&&e.includes(I._8.MESSAGE_PATIENT_POPOVER)),T=(0,i.useState)(P),O=(0,r.A)(T,2),D=O[0],N=O[1],j=function(){N(!1),Gc(a.id,I._8.MESSAGE_PATIENT_POPOVER).then(function(e){l(e)}).catch(function(){return null})},L={},z=[];((null==d?void 0:d.providers)||[]).map(function(e){L[e.providerId]=e,z.push({label:e.name,value:e.providerId})});var B={},W=[];((null==d?void 0:d.locations)||[]).map(function(e){B[e.departmentId]=e,W.push({label:e.name,value:e.departmentId})});var F=[];((null==d?void 0:d.specialtyAreas)||[]).map(function(e){F.push({label:e.name,value:e.key})});var $={};((null==d||null===(t=d.area)||void 0===t?void 0:t.visitTypes)||[]).map(function(e){$[e.id]=e}),(0,nt.Ij)(function(){if(d){var e=y.filter(function(e){return!o.name||e.patientNameFormatted.toLowerCase().includes(o.name.toLowerCase())}).filter(function(e){return 0===o.providers.length||o.providers.includes(e.providerEmrId)}).filter(function(e){return 0===o.locations.length||o.locations.includes(e.locationEmrId)}).filter(function(e){var t;return 0===o.specialtyAreas.length||(0,b.tH)({assigned:null===(t=L[e.providerEmrId])||void 0===t?void 0:t.specialtyAreas,filter:o.specialtyAreas})}).filter(function(e){return!!o.showCompleted||e.appointmentEmrStatus!==b.Qf.Completed&&!e.callStarted}).filter(function(e){var t,n;switch(o.visitTypes){case"All":return!0;case"PocketDoc Only":return null===(t=$[e.visitTypeEmrId])||void 0===t?void 0:t.isPocketDoc;case"In-Office Only":return!(null!==(n=$[e.visitTypeEmrId])&&void 0!==n&&n.isPocketDoc);default:return!1}});A(e)}},[y,o,d]),(0,i.useEffect)(function(){d||p()},[y]);var H=(0,i.useMemo)(function(){return y.sort(function(e,t){return e.appointmentDateTime.isBefore(t.appointmentDateTime)?-1:1})},[y]),_=!v,V=function(){var e=(0,i.useState)(null),t=(0,r.A)(e,2),n=t[0],o=t[1];return{modalState:n,openModal:function(e){o(e)},closeModal:function(){o(null)}}}(),M=V.modalState,q=V.openModal,U=V.closeModal;return i.createElement(Jc.A,null,C&&i.createElement(u.y$.Overlay,{size:"base",visible:C}),i.createElement(vc,{state:M,handleClose:U}),c&&i.createElement(Cc,{lastHandledAppointment:h,visitTypeEmrIdMap:$,providerEmrIdMap:L,locationEmrIdMap:B,openModal:q}),i.createElement(st.A,null),i.createElement(Xc,null,i.createElement(So,{locations:W,providers:z,specialtyAreas:F,numVisible:null==x?void 0:x.length,showNotificationSettings:c,openModal:q}),i.createElement(Ur,null,i.createElement(Zc,{$_css:[{height:"100%",width:"100%",flexGrow:"1",overflowX:"auto",overflowY:"hidden"},{minHeight:320},0!==H.length&&{"--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}]},i.createElement(rc.aY,{defaultItemHeight:80,totalCount:_?x.length+1:2,topItemCount:1,itemContent:function(e){var t,r,o;if(0===e)return i.createElement(Yr,{serviceArea:n});if(!_&&1===e)return i.createElement(Qc,null,i.createElement(u.y$,null));var a=x[e-1];return i.createElement(i.Fragment,null,i.createElement(ol,{key:a.appointmentEmrId,appointment:a,providerDisplayName:null===(t=L[a.providerEmrId])||void 0===t?void 0:t.name,locationDisplayName:null===(r=B[a.locationEmrId])||void 0===r?void 0:r.name,isPocketDoc:null===(o=$[a.visitTypeEmrId])||void 0===o?void 0:o.isPocketDoc,showMessagePatientPopper:1===e&&D,handlePopperDismiss:j,openModal:q,setLoading:R}))}})))))},Xc=(0,a.Ay)("div")({display:"flex",height:"100%",flexDirection:"column"}),Zc=(0,a.Ay)("div")(Vl||(Vl=(0,v.A)(["",""])),function(e){return e.$_css}),Qc=(0,a.Ay)("div").withConfig({componentId:"sc-1c9gwj7-0"})({display:"flex",alignItems:"center",justifyContent:"center",padding:"2.5rem"}),eu=function(e){var t=e.admin,n=e.serviceArea,r=e.fallback,o=e.children,a=(0,g.O$)(function(e){var t;return(null===(t=e.user.employee)||void 0===t?void 0:t.isAdmin)||!1}),l=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.serviceArea}),c=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.providerEpicId});if(t&&!a)return i.createElement(i.Fragment,null,r||null);var u=void 0!==l&&(0,b.kv)(l),s=void 0!==n&&(0,b.kv)(n);return u&&s&&!c?i.createElement(i.Fragment,null,o):n&&l!==m.xS.SA&&l!==n?i.createElement(i.Fragment,null,r||null):i.createElement(i.Fragment,null,o)},tu=n(96763),nu=function(e){var t=e.children,n=!1,r=(0,g.E9)(function(e){return e.employeeLogout}),o=(0,g.O$)(function(e){return e.firebase.user}),a=(0,g.O$)(function(e){return e.firebase.token}),l=(0,g.O$)(function(e){return e.firebase.isAuthenticated}),c=(0,g.E9)(function(e){return e.firebase}),s=c.getToken,m=c.setUser,d=function(){s().then(function(e){return dn.j2.signInWithCustomToken(e)}).catch(function(e){mn.Cp(e),tu.error("Unexpected Firebase error while signing in with custom auth token.",e),n=!0,r()})};return(0,i.useEffect)(function(){d();var e=dn.j2.onAuthStateChanged(function(e){return m(e)});return function(){return e()}},[]),(0,i.useEffect)(function(){if(o)return function(){a&&!n&&(mn.ZQ({message:"User was logged out by Firebase, attempting to sign back in with new token."}),d())}},[null==o?void 0:o.uid]),l?i.createElement(i.Fragment,null,t):i.createElement(u.y$.Overlay,{size:"large",visible:!0})},ru=function(e){var t=e.children,n=(0,f.W6)(),r=(0,g.O$)(function(e){return e.user.token}),o=(0,g.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.isThirdParty});return(0,i.useEffect)(function(){r||n.push(W.zG)},[r]),(0,i.useEffect)(function(){var e=window.location.pathname;o&&r&&e!==W.T_&&window.location.replace("".concat(ze.A.employeeScheduler,"/sso?token=").concat(r))},[o]),i.createElement(nu,null,i.createElement(i.Fragment,null,t))},iu=n(93028),ou=n(2098),au=n(74464),lu=function(e){var t=e.error,n=(0,o.W6)().push,r=function(){n(W.yZ)};return i.createElement(u.Gu,{title:t.title,cancel:null,confirm:"Okay",onDismissed:r,onConfirmClick:r},t.subtitle)},cu=n(74216),uu=n(54142),su=n(62384),mu=a.Ay.div(Ml||(Ml=(0,v.A)(["\n    ","\n\n    aspect-ratio: 16 / 9;\n\n    & video {\n        ",";\n        object-fit: cover;\n        transform: scale(-1, 1);\n    }\n"])),{position:"relative",zIndex:"50",display:"flex",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0.5rem",borderBottomRightRadius:"0",borderBottomLeftRadius:"0","--tw-bg-opacity":"1",backgroundColor:"rgb(31 41 55 / var(--tw-bg-opacity, 1))"},{minHeight:"100%",minWidth:"100%"}),du=function(e){var t=e.onClick,n=e.icon,r=e.disabledIcon,o=e.enabled,a=e.title;return i.createElement(gu,{onClick:t,style:{height:54,width:64},$_css:[{marginLeft:"0.5rem",marginRight:"0.5rem",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"9999px",padding:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))",outline:"2px s
1olid transparent !important",outlineOffset:"2px !important"},o?{"--tw-text-opacity":"1 !important",color:"rgb(31 41 55 / var(--tw-text-opacity, 1)) !important"}:{"--tw-text-opacity":"1 !important",color:"rgb(55 65 81 / var(--tw-text-opacity, 1)) !important"}]},i.createElement(fu,{icon:o?n:r,style:{fontSize:17},$_css2:[{"--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"},o?{"--tw-text-opacity":"1 !important",color:"rgb(31 41 55 / var(--tw-text-opacity, 1)) !important"}:{"--tw-text-opacity":"1 !important",color:"rgb(55 65 81 / var(--tw-text-opacity, 1)) !important"}]}),i.createElement(yu,{style:{marginTop:7},$_css3:{fontSize:"0.875rem",lineHeight:"1"}},a))},pu=function(){var e=(0,i.useRef)(null),t=(0,i.useRef)(),n=au.A.useStoreState(function(e){return e.visit}),r=(0,cu.nV)(),o=r.localVideo,a=r.audioEnabled,l=r.videoEnabled,c=r.errors,u=(0,uu.E)(),s=u.toggleAudio,m=u.toggleVideo,d=u.toggleSettings;return(0,i.useEffect)(function(){var e;o&&(0,su.vp)("Pre-call local video track ready.",{token:(null==n||null===(e=n.appointmentInfo)||void 0===e?void 0:e.token)||""})},[o,n]),(0,i.useEffect)(function(){if(e.current&&o){var n=function(){if(e.current&&o){t.current&&o.detach(t.current);var n=o.attach();n&&(t.current=n,e.current.appendChild(n))}};n();var r=o.on("updated",function(){n()});return function(){r(),o&&t.current&&o.detach(t.current),e.current&&(e.current.innerHTML="")}}},[o]),i.createElement(i.Fragment,null,i.createElement(mu,{ref:e},((null==c?void 0:c.audio)||(null==c?void 0:c.video))&&i.createElement(hu,{style:{top:25,maxWidth:"90%",zIndex:100},$_css4:{position:"absolute"}},(null==c?void 0:c.video)&&i.createElement(vu,{$_css5:{marginTop:"0.25rem",marginBottom:"0.25rem",borderRadius:"0.25rem",borderTopWidth:"4px","--tw-border-opacity":"1",borderColor:"rgb(239 68 68 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"0.5rem",paddingLeft:"1rem",paddingRight:"1rem"}},i.createElement(wu,{$_css6:{fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}},"Camera Error: ",c.video.message),i.createElement(bu,{$_css7:{marginTop:"0.5rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}},"You must grant this browser permission to access your camera, then reload this page.")))),(null==c?void 0:c.audio)&&i.createElement(Eu,{$_css8:{width:"100%",borderTopWidth:"4px","--tw-border-opacity":"1",borderColor:"rgb(239 68 68 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"0.5rem",paddingLeft:"1rem",paddingRight:"1rem"}},i.createElement(xu,{$_css9:{fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}},"Microphone Error: ",c.audio.message),i.createElement(Au,{$_css0:{marginTop:"0.5rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}},"You must grant this browser permission to access your microphone, then reload this page.")),i.createElement(Su,{style:{marginTop:-1,height:64},$_css1:{zIndex:"50",display:"flex",width:"100%",alignItems:"center",justifyContent:"center",borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}},i.createElement(du,{icon:tt.A54,disabledIcon:tt.$zK,enabled:a,onClick:s,title:"Mute"}),i.createElement(du,{icon:tt.n2W,disabledIcon:tt.uOS,enabled:l,onClick:m,title:"Video"}),i.createElement(du,{icon:tt.BH7,disabledIcon:tt.BH7,enabled:!0,onClick:d,title:"Settings"})))},gu=(0,a.Ay)("button")(ql||(ql=(0,v.A)(["",""])),function(e){return e.$_css}),fu=(0,a.Ay)(et.g)(Ul||(Ul=(0,v.A)(["",""])),function(e){return e.$_css2}),yu=(0,a.Ay)("p")(Yl||(Yl=(0,v.A)(["",""])),function(e){return e.$_css3}),hu=(0,a.Ay)("div")(Gl||(Gl=(0,v.A)(["",""])),function(e){return e.$_css4}),vu=(0,a.Ay)("div")(Jl||(Jl=(0,v.A)(["",""])),function(e){return e.$_css5}),wu=(0,a.Ay)("p")(Kl||(Kl=(0,v.A)(["",""])),function(e){return e.$_css6}),bu=(0,a.Ay)("p")(Xl||(Xl=(0,v.A)(["",""])),function(e){return e.$_css7}),Eu=(0,a.Ay)("div")(Zl||(Zl=(0,v.A)(["",""])),function(e){return e.$_css8}),xu=(0,a.Ay)("p")(Ql||(Ql=(0,v.A)(["",""])),function(e){return e.$_css9}),Au=(0,a.Ay)("p")(ec||(ec=(0,v.A)(["",""])),function(e){return e.$_css0}),Su=(0,a.Ay)("div").withConfig({componentId:"sc-1bkijwf-0"})(["",""],function(e){return e.$_css1}),ku=(0,c.Ik)().shape({phone:(0,c.Yj)().when(["email"],{is:function(e){return!e},then:(0,c.Yj)().matches(I.uK,"Please enter a valid phone number.").required("A phone number or email is required to start a call."),otherwise:(0,c.Yj)().matches(I.uK,"Please include a valid phone number.")}),email:(0,c.Yj)().when(["phone"],{is:function(e){return!e},then:(0,c.Yj)().email("Please enter a valid email.").required("A phone number or email is required to start a call."),otherwise:(0,c.Yj)().email("Please include a valid email.")})},[["phone","email"]]),Cu=i.forwardRef(function(e,t){var n,r=e.appointmentInfo,o=e.contactInfo,a=e.onStartVisit,c={phone:null!=o&&o.phone?o.phone.replace(/\D/g,""):"",email:null!==(n=null==o?void 0:o.email)&&void 0!==n?n:""};return i.createElement(l.l1,{initialValues:c,validationSchema:ku,onSubmit:a},function(e){var n=e.errors,o=e.submitCount;return i.createElement(Pu,null,i.createElement(Tu,null,i.createElement(Ou,
1null,i.createElement(Du,null,"Patient phone"),i.createElement(Nu,{name:"phone",style:{fontSize:22},$_css:[{fontWeight:"500",letterSpacing:"0.025em","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"},n.phone&&o>0&&{"--tw-border-opacity":"1",borderColor:"rgb(220 38 38 / var(--tw-border-opacity, 1))"}]}),n.phone&&o>0&&i.createElement(ju,null,n.phone)),i.createElement(Lu,null,i.createElement(zu,null,"Patient email"),i.createElement(Bu,{name:"email",style:{fontSize:22,fontWeight:500}}))),i.createElement(Wu,null,i.createElement(Fu,{type:"submit",style:{width:r&&"scheduled"!==r.status?190:160,fontSize:23},ref:t},r&&"scheduled"!==r.status?"Resume Visit":"Start Visit")))})});Cu.displayName="StartVisitForm";var Iu,Ru=Cu,Pu=(0,a.Ay)(l.lV)({width:"100%"}),Tu=(0,a.Ay)("div")({marginTop:"2rem",display:"flex",width:"100%",flexDirection:"column",flexWrap:"nowrap",alignItems:"flex-start","@media (min-width: 768px)":{flexDirection:"row"}}),Ou=(0,a.Ay)("div")({width:"100%","@media (min-width: 768px)":{marginRight:"0.75rem",width:"50%"}}),Du=(0,a.Ay)("h4")({marginBottom:"0.5rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"}),Nu=(0,a.Ay)(u.LR.Formik)(tc||(tc=(0,v.A)(["",""])),function(e){return e.$_css}),ju=(0,a.Ay)("p")({marginTop:"0.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),Lu=(0,a.Ay)("div")({marginTop:"1rem",width:"100%","@media (min-width: 768px)":{marginLeft:"0.75rem",marginTop:"0",width:"50%"}}),zu=(0,a.Ay)("h4")({marginBottom:"0.5rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"}),Bu=(0,a.Ay)(u.pd.Formik)({"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),Wu=(0,a.Ay)("div")({marginTop:"2rem",display:"none",width:"100%",alignItems:"flex-end",justifyContent:"space-between"}),Fu=(0,a.Ay)(u.$n).withConfig({componentId:"sc-10731dt-0"})({paddingLeft:"2rem",paddingRight:"2rem",paddingTop:"0.75rem",paddingBottom:"0.75rem",fontSize:"1.25rem",lineHeight:"1.75rem"}),$u=function(e){var t=new Date(e).toLocaleString("en-US",{timeZone:"America/Los_Angeles"});return new Date(t)},Hu=function(e){var t=e.appointment,n=t.appointmentTime,r=t.completedAtTime,o=t.patient,a=t.isChild,l=t.patientName,c=t.dob,u=t.age,s=t.status;return i.createElement(i.Fragment,null,i.createElement(_u,null,i.createElement(Vu,null,t.visitType,function(){var e=$u(new Date(n)),t=(0,Ec.GPZ)(e,"h:mma");if(function(e){var t=$u(new Date),n=$u(e);return n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()}(e))return" at "+t;var r=(0,Ec.GPZ)(e,"EEEE, MMMM d");return" on ".concat(r," at ").concat(t)}()),"completed"===s&&""!==r&&i.createElement(Mu,null,i.createElement(qu,{style:{padding:"6px 8px 6px 8px"},$_css:[{marginTop:"-0.25rem",marginRight:"1rem",display:"flex",width:"auto",flexDirection:"row",alignItems:"center",borderRadius:"1.5rem",borderWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(189 229 218 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1))",fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}]},i.createElement(Uu,{icon:tt.SGM,style:{height:22}}),i.createElement(Yu,null,"Call ended at ",r)))),i.createElement("div",null,o?i.createElement(Gu,{to:"".concat(W.RN,"/").concat(o.id).concat(a?W.Ju:""),target:"_blank",rel:"noopener noreferrer"},a?(0,b.Ji)(l):"".concat(o.firstName," ").concat(o.lastName),i.createElement(Ju,{icon:tt.Ju_})):i.createElement(Ku,null,(0,b.Ji)(l))),i.createElement(Xu,null,c," (age: ",u,")"))},_u=(0,a.Ay)("div")({marginBottom:"1rem",display:"flex",width:"100%",flexDirection:"row",flexWrap:"wrap",alignItems:"flex-start"}),Vu=(0,a.Ay)("h1")({marginBottom:"0.5rem",flexGrow:"1",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Mu=(0,a.Ay)("div")({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"}),qu=(0,a.Ay)("div")(Iu||(Iu=(0,v.A)(["",""])),function(e){return e.$_css}),Uu=(0,a.Ay)(et.g)({marginRight:"0.5rem"}),Yu=(0,a.Ay)("span")({lineHeight:"1.25"}),Gu=(0,a.Ay)(o.N_)({marginBottom:"0.25rem",display:"flex",alignItems:"center",fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))","&:hover":{"--tw-text-opacity":"1 !important",color:"rgb(31 41 55 / var(--tw-text-opacity, 1)) !important"}}),Ju=(0,a.Ay)(et.g)({marginLeft:"0.5rem",height:"1.25rem"}),Ku=(0,a.Ay)("h2")({marginBottom:"0.25rem",fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),Xu=(0,a.Ay)("div").withConfig({componentId:"sc-1e6qazv-0"})({fontSize:"1.5rem",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Zu=function(e){var t=e.visible,n=e.className,o=e.toggleAble,a=(0,i.useState)(!1),l=(0,r.A)(a,2),c=l[0],u=l[1],s=(0,i.useState)(!o),m=(0,r.A)(s,2),d=m[0],p=m[1];return i.createElement(i.Fragment,null,t&&!c?i.createElement(Qu,{className:n},i.createElement(es,null,i.createElement(ts,null,i.createElement(ns,{icon:tt.lEd}),i.createElement(rs,null,"Alert: Apple devices may show emojis during video calls")),o&&i.createElement(is,{onClick:function(){return p(!d)}},"Show ",d?"less":"more"),d&&i.createElement(i.Fragment,null,i.createElement(os,null,"Apple's latest software updates iPhone and Mac to automatically enable emojis to feature in video calls."),i.createElement(as,null,"To turn off reactions on a Mac with macOS Sonoma:"),i.createElement(ls,null,i.createElement(cs,null,"• Open FaceTime."),i.createElement(us,null,"• Click the Video menu in the menu bar, represented by a green and white camera icon."),i.createElement(ss,null,'• Click "Reactions" to turn them off.')))),i.createElement("div",{onClick:function(){(0,b.lk)(I._8.MACOS_REACTIONS_WARNING,!0),u(!0)}},i.createElement(ms,{icon:tt.GRI}))):null)},Qu=(0,a.Ay)("div")({marginTop:"1.5rem",display:"flex",flexDirection:"row",justifyContent:"space-between",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"1.5rem","--tw-shadow":"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-sha
1dow-color), 0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),es=(0,a.Ay)("div")({display:"flex",flexDirection:"column"}),ts=(0,a.Ay)("div")({display:"flex",flexDirection:"row",alignItems:"center"}),ns=(0,a.Ay)(et.g)({height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),rs=(0,a.Ay)("h3")({marginLeft:"0.75rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem"}),is=(0,a.Ay)("button")({marginTop:"0.5rem",alignSelf:"flex-start",textDecorationLine:"underline"}),os=(0,a.Ay)("p")({marginTop:"0.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),as=(0,a.Ay)("p")({marginTop:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ls=(0,a.Ay)("div")({display:"flex",flexDirection:"column"}),cs=(0,a.Ay)("p")({"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),us=(0,a.Ay)("p")({"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ss=(0,a.Ay)("p")({"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),ms=(0,a.Ay)(et.g).withConfig({componentId:"sc-k2lnvi-0"})({height:"1.5rem",width:"1.5rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{cursor:"pointer","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}}),ds=function(){return i.createElement(i.Fragment,null,i.createElement(ps,null,"PocketDoc Dialer"),i.createElement(gs,null,"Patient not connecting or doesn't have PocketDoc?"),i.createElement(fs,null,"Send a video link to any phone number or email using the dialer."))},ps=(0,a.Ay)("h1")({marginBottom:"0.5rem",fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),gs=(0,a.Ay)("p")({fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),fs=(0,a.Ay)("p").withConfig({componentId:"sc-r84nvf-0"})({fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),ys=i.forwardRef(function(e,t){var n,r=e.onStartVisit,o=(0,f.zy)().state,a=o?{phone:o.patientPhone,email:o.patientEmail}:null,l=au.A.useStoreState(function(e){return e.visit}),c=null!==(n=null==l?void 0:l.contactInfo)&&void 0!==n?n:null,u=null==l?void 0:l.appointmentInfo,s=au.A.useStoreState(function(e){return e.token}),m=!(null!==(0,b.zM)(I._8.MACOS_REACTIONS_WARNING));return i.createElement(ws,null,i.createElement(bs,null,u?i.createElement(Hu,{appointment:u}):i.createElement(ds,null),i.createElement(Ru,{appointmentInfo:u,contactInfo:a||c,onStartVisit:r,ref:t,key:s})),i.createElement(Es,{visible:m,toggleAble:!0}))});ys.displayName="PreVisitSidebar";var hs,vs=ys,ws=(0,a.Ay)("div")({width:"100%","@media (min-width: 1024px)":{marginRight:"1.5rem",width:"50%",flex:"1 1 0%"}}),bs=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"flex-start",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"1.5rem"}),Es=(0,a.Ay)(Zu).withConfig({componentId:"sc-1wpw9uu-0"})({"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))","--tw-shadow":"0 0 #0000 !important","--tw-shadow-colored":"0 0 #0000 !important",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-sha
1dow) !important"}),xs=n(23089),As=function(e){var t=e.className,n=au.A.useStoreState(function(e){return e.token}),o=(0,i.useState)(!1),a=(0,r.A)(o,2),l=a[0],c=a[1];return(0,i.useEffect)(function(){if(n){var e=xs.A.database().ref(dn.Lv.VIDEO_VISITS).child(n).orderByChild("role").equalTo("patient"),t=function(){return c(!0)},r=function(){return c(!1)};return e.on("child_added",t),e.on("child_removed",r),function(){e.off("child_added",t),e.off("child_removed",r)}}},[n]),l?i.createElement(oi.zW,{in:!0,timeout:300,key:"present-".concat(l),appear:!0,out:!0},i.createElement(Ss,{className:t},i.createElement(ks,{icon:tt.iW_}),i.createElement(Cs,null,"Patient is in the waiting room"))):null},Ss=(0,a.Ay)("div")({display:"flex",alignItems:"center"}),ks=(0,a.Ay)(et.g)({marginRight:"0.5rem",height:"1.25rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Cs=(0,a.Ay)("p").withConfig({componentId:"sc-1rr8r84-0"})({fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Is=n(21057);function Rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ps(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rs(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ts=function(e){var t=e.className;return i.createElement(Bs,{className:t},i.createElement(Ws,null,"Connection Issues"),i.createElement(Fs,null,i.createElement($s,null,"Limit intense activities on your computer or internet network."),i.createElement("li",null,"Try moving closer to your wifi router or use an ethernet connection.")))},Os=(0,a.Ay)(Ts).withConfig({componentId:"sc-1pkrnbb-0"})({display:"none","@media (min-width: 768px)":{display:"block"}}),Ds=(0,a.Ay)(Ts)({display:"block","@media (min-width: 768px)":{display:"none"}}),Ns=function(e){var t=e.className;return i.createElement(Hs,{className:t},i.createElement(_s,null,"Audio or Camera Issues"),i.createElement(Vs,null,i.createElement(Ms,null,"It may take up to 15 seconds for video and audio to connect."),i.createElement(qs,null,"Make sure the correct microphone, speaker, and camera are connected."),i.createElement(Us,null,"If you’re using an external device, try disconnecting and reconnecting it."),i.createElement("li",null,"If you’re still having issues, try refreshing the page. ")))},js=function(e){var t=e.localStatusString,n=e.remoteStatusString;return t||n?i.createElement(Ys,null,i.createElement(Gs,null,"Connection Status"),i.createElement(Js,null,"You: ",i.createElement(Ks,{$_css:[function(){switch(t){case"Connected":return{"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"};case"Reconnecting":return{"--tw-text-opacity":"1",color:"rgb(214 158 46 / var(--tw-text-opacity, 1))"};case"Disconnected":return{"--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"};default:return{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}}}(),{fontWeight:"400"}]},t)),i.createElement(Xs,null,"Patient: ",i.createElement(Zs,null,n))):null},Ls=function(e){var t,n,r,o,a,l,c=e.localStatusString,u=e.remoteStatusString,s=(0,cu.nV)(),m=s.localVideo,d=s.availableMics,p=s.availableCameras,g=s.availableSpeakers,f=ou.A.useStoreState(function(e){return e.selectedMicId}),y=ou.A.useStoreState(function(e){return e.selectedCameraId}),h=ou.A.useStoreState(function(e){return e.selectedSpeakerId}),v=ou.A.useStoreActions(function(e){return e.setSelectedMicId}),w=ou.A.useStoreActions(function(e){return e.setSelectedCameraId}),b=ou.A.useStoreActions(function(e){return e.setSelectedSpeakerId}),E=(0,i.useRef)(null),x=(0,i.useRef)(),A="function"==typeof HTMLMediaElement.prototype.setSinkId&&g.length>0;(0,i.useEffect)(function(){if(E.current&&m){var e=function(){if(E.current&&m){x.current&&m.detach(x.current);var e=m.attach();e&&(x.current=e,E.current.appendChild(e))}};e();var t=m.on("updated",e),n=m.on("dimensions-changed",e);return function(){t(),n(),m&&x.current&&m.detach(x.current),E.current&&(E.current.innerHTML="")}}},[m]);var S=null!==(t=null===(n=d.find(function(e,t){return function(e){var t=d.find(function(e){return e.isDefault});return!(!f||e.deviceId!==f)||!(null!==f||!e.isDefault)||null===f&&!t&&0===e.index}(Ps(Ps({},e),{},{index:t}))}))||void 0===n?void 0:n.deviceId)&&void 0!==t?t:"",k=null!==(r=null===(o=g.find(function(e,t){return function(e){var t=g.find(function(e){return e.isDefault});if(h&&e.deviceId===h)return!0;
1if(null===h){if(e.isDefault)return!0;if(!t)return 0===e.index}return!1}(Ps(Ps({},e),{},{index:t}))}))||void 0===o?void 0:o.deviceId)&&void 0!==r?r:"",C=null!==(a=null===(l=p.find(function(e){return t=e,y?t.deviceId===y:t.deviceId===(null===(n=p[0])||void 0===n?void 0:n.deviceId);var t,n}))||void 0===l?void 0:l.deviceId)&&void 0!==a?a:"";return i.createElement("div",null,i.createElement(Qs,null,"Troubleshoot Connection Issues"),i.createElement(em,null,i.createElement(tm,null,i.createElement(js,{localStatusString:c,remoteStatusString:u}),i.createElement(Ds,null),i.createElement(nm,null,i.createElement(rm,null,"Microphone"),i.createElement(im,{value:S,onChange:function(e){return v(e.target.value)}},d.length>0?d.map(function(e){return i.createElement("option",{key:e.deviceId,value:e.deviceId},e.label||"Unknown Microphone",e.isDefault?" - System Default":"")}):i.createElement("option",{value:""},"No Microphone Found"))),A&&i.createElement(om,null,i.createElement(am,null,"Speaker"),i.createElement(lm,{value:k,onChange:function(e){return b(e.target.value)}},g.length>0?g.map(function(e){return i.createElement("option",{key:e.deviceId,value:e.deviceId},e.label||"Unknown Speaker",e.isDefault?" - System Default":"")}):i.createElement("option",{value:""},"No Speaker Found"))),i.createElement("div",null,i.createElement(cm,null,"Camera"),i.createElement(um,{value:C,onChange:function(e){w(e.target.value)}},p.length>0?p.map(function(e){return i.createElement("option",{key:e.deviceId,value:e.deviceId},e.label||"Unknown Camera")}):i.createElement("option",{value:""},"No Camera Found")))),i.createElement(sm,null,i.createElement(Os,null),i.createElement(Ns,null),i.createElement(oi.$n,{onClick:function(){return window.location.reload()}},"Refresh the page"))))},zs=function(e){var t=e.visible,n=e.onDismissed,r=e.localStatusString,o=e.remoteStatusString;return i.createElement(Is.a,{fullscreen:!0,visible:t,onDismissed:n},i.createElement(Ls,{localStatusString:r,remoteStatusString:o}))},Bs=(0,a.Ay)("div")({"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingBottom:"2rem"}),Ws=(0,a.Ay)("h3")({marginBottom:"0.5rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Fs=(0,a.Ay)("ul")({marginTop:"0.5rem",listStyleType:"disc",paddingLeft:"2rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),$s=(0,a.Ay)("li")({marginBottom:"0.25rem"}),Hs=(0,a.Ay)("div")({"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingBottom:"2rem"}),_s=(0,a.Ay)("h3")({marginBottom:"0.5rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Vs=(0,a.Ay)("ul")({marginTop:"0.5rem",listStyleType:"disc",paddingLeft:"2rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Ms=(0,a.Ay)("li")({marginBottom:"0.25rem"}),qs=(0,a.Ay)("li")({marginBottom:"0.25rem"}),Us=(0,a.Ay)("li")({marginBottom:"0.25rem"}),Ys=(0,a.Ay)("div")({marginBottom:"2rem",borderRadius:"0.375rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"1rem"}),Gs=(0,a.Ay)("h4")({marginBottom:"0.5rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Js=(0,a.Ay)("p")({marginBottom:"0.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Ks=(0,a.Ay)("span")(hs||(hs=(0,v.A)(["",""])),function(e){return e.$_css}),Xs=(0,a.Ay)("p")({fontWeight:"500","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Zs=(0,a.Ay)("span")({fontWeight:"400"}),Qs=(0,a.Ay)("h2")({marginBottom:"1rem",fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),em=(0,a.Ay)("div")({marginBottom:"2rem",display:"flex",flexDirection:"column","@media (min-width: 768px)":{flexDirection:"row"}}),tm=(0,a.Ay)("div")({marginBottom:"2rem",marginRight:"0",width:"100%","@media (min-width: 768px)":{marginBottom:"0",marginRight:"1rem",width:"50%"},"@media (min-width: 1280px)":{marginRight:"2rem"}}),nm=(0,a.Ay)("div")({marginBottom:"1.5rem"}),rm=(0,a.Ay)("label")({marginBottom:"0.25rem",display:"block",fontSize:"1rem",fontWeight:"500",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),im=(0,a.Ay)("select")({width:"100%",borderRadius:"0.25rem",borderWidth:"1px",padding:"0.5rem"}),om=(0,a.Ay)("div")({marginBottom:"1.5rem"}),am=(0,a.Ay)("label")({marginBottom:"0.25rem",display:"block",fontSize:"1rem",fontWeight:"500",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),lm=(0,a.Ay)("select")({width:"100%",borderRadius:"0.25rem",borderWidth:"1px",padding:"0.5rem"}),cm=(0,a.Ay)("label")({marginBottom:"0.25rem",display:"block",fontSize:"1rem",fontWeight:"500",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),um=(0,a.Ay)("select")({width:"100%",borderRadius:"0.25rem",borderWidth:"1px",padding:"0.5rem"}),sm=(0,a.Ay)("div")({marginLeft:"0",width:"100%",paddingBottom:"5rem","@media (min-width: 768px)":{marginLeft:"1rem",width:"50%",paddingBottom:"0"},"@media (min-width: 1280px)":{marginLeft:"2rem"}}),mm=function(){var e=au.A.useStoreState(function(e){return e.visit}),t=au.A.useStoreActions(function(e){return e.startVisit}),n=au.A.useStoreActions(function(e){return e.resumeCompletedVisit}),o=(0,i.useState)(""),a=(0,r.A)(o,2),l=a[0],c=a[1],s=(0,i.useState)(!1),m=(0,r.A)(s,2),d=m[0],p=m[1],g=(0,cu.nV)().errors,f=(0,uu.E)(),y=f.showTroubleshooting,h=f.closeTroubleshooting,v=Boolean((null==g?void 0:g.audio)||(null==g?void 0:g.video)),w=(0,i.useRef)(null),b=function(){w.current&&w.current.click()},E=function(){var n=(0,se.A)(de().mark(function n(r){return de().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!v){n.next=1;break}return n.abrupt("return");case 1:if(null==e||!e.appointmentInfo){n.next=2;break}if("completed"!==e.appointmentInfo.status){n.next=2;break}return p(!0),n.abrupt("return");case 2:t(r);case 3:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}();return i.createElement(i.Fragment,null,i.createElement(dm,null,i.createElement(pm,null,i.createElement(vs,{onStartVisit:E,ref:w}),i.createElement(gm,null,i.createElement(pu,null),i.createElement(fm,{onClick:b,disabled:v},"Join Call"),i.createElement(ym,null)))),d&&i.createElement(u.Gu,{borderColor:"green",title:"Resume Visit?",confirm:i.createElement(oi.$n,null,"Resume"),cancel:"Cancel",onDismissed:function(){return p(!1)},onConfirmClick:function(){n().then(function(){b()}),p(!1)}},i.createElement(hm,null,'Clicking "Resume Visit" will mark this appointment as in progress and allow you to continue the call with the patient.')),l&&i.createElement(u.Gu,{title:"An error occurred",cancel:null,confirm:"Okay",onDismissed:function(){return c("")}},l),i.createElement(zs,{visible:y,onDismissed:h}))},dm=(0,a.Ay)("div")({display:"flex",width:"100%",flexDirection:"column",alignItems:"center"}),pm=(0,a.Ay)("div")({display:"flex",width:"100%",maxWidth:"80rem",flexWrap:"wrap-reverse","@media (min-width: 1024px)":{flexDirection:"row",flexWrap:"wrap"}}),gm=(0,a.Ay)("div")({marginBottom:"3rem",display:"flex",width:"100%",flexDirection:"column",alignItems:"center","@media (min-width: 1024px)":{marginBottom:"0",width:"50%"}}),fm=(0,a.Ay)(oi.$n)({marginTop:"1.5rem"}),ym=(0,a.Ay)(As)({marginTop:"1rem"}),hm=(0,a.Ay)("p").withConfig({componentId:"sc-fudjf6-0"})({fontSize:"1.125rem",lineHeight:"1.75rem"}),vm=n(53353),wm=n(96763),bm=(0,i.memo)(function(e){var t=e.name,n=e.providers,o=e.visitTypes,a=(0,l.Mt)("employeeId"),c=(0,r.A)(a,1)[0].value,s=(0,l.Mt)(t),m=(0,r.A)(s,3)[2].setValue;(0,i.useEffect)(function(){return function(){m("",!1)}},[c]);var d=n.find(function(e){return e.id===c});return i.createElement(l.D0,{name:"chargeAmount",as:u.l6},i.createElement("option",{value:"",disabled:!0}),o.filter(function(e){return e.cashPayPrice>0}).map(function(e){var t=(null==d?void 0:d.cashPricing[e.id])||e.cashPayPrice;return i.createElement("option",{key:e.id,value:"".concat(e.id,"_").concat(t.toString())},"$",t," — ",e.key," [",e.id,"]")}),i.createElement("option",{value:"-1"},"$0 — DO NOT CHARGE"))},Sa());bm.displayName="ChargePriceSelector";var Em,xm,Am,Sm,km,Cm,Im,Rm,Pm,Tm,Om,Dm,Nm,jm=(0,c.Ik)().shape({employeeId:(0,c.Yj)().required("The provider who completed this visit must be selected."),chargeAmount:(0,
1c.Yj)().required("Please select a valid charge amount for this visit.")}),Lm=function(){var e=(0,i.useState)(""),t=(0,r.A)(e,2),n=t[0],o=t[1],a=au.A.useStoreState(function(e){return e.visit}),c=null==a?void 0:a.appointmentInfo,s=au.A.useStoreActions(function(e){return e.refreshVisit}),m=(0,Rl.A)(!0).data,d=(0,nt.lB)(function(){var e;return m&&c?null===(e=m.providers.find(function(e){return e.providerId===c.providerEmrId}))||void 0===e?void 0:e.id:""},[c,m]);return i.createElement(zm,null,i.createElement(Bm,null,"Charge Patient Card"),i.createElement(Wm,null,n?i.createElement(Fm,null,n):"This visit must be completed before a new call can be started."),m&&c?i.createElement(l.l1,{onSubmit:function(e,t){var n=t.setSubmitting,r=e.chargeAmount.split("_")[1]||"0";o(""),(0,vm.A)({videoAppointmentId:c.videoAppointmentId,employeeId:e.employeeId,chargeAmount:Number(r||"0")}).then(function(){return s()}).catch(function(e){wm.error(e),o((0,Se.getErrorFromResponse)(e))}).finally(function(){return n(!1)})},validationSchema:jm,initialValues:{employeeId:d,chargeAmount:""}},function(e){var t=e.isSubmitting,n=e.isValid;return i.createElement(Hm,null,i.createElement(u.y$.Overlay,{visible:t&&n}),i.createElement(u.ar,{name:"employeeId",label:"Provider",description:"Select the provider who completed this visit."},i.createElement(l.D0,{name:"employeeId",as:u.l6},i.createElement("option",{value:"",disabled:!0}),m.providers.sort(function(e,t){return e.lastName.toLowerCase().localeCompare(t.lastName.toLowerCase())}).map(function(e){return i.createElement("option",{key:e.id,value:e.id},e.lastName,", ",e.firstName,e.providerTitle&&" (".concat(e.providerTitle,")"))}))),i.createElement(_m,{name:"chargeAmount",label:"Charge Amount",description:"Select the amount to charge the patient for this visit."},i.createElement(bm,{name:"chargeAmount",providers:m.providers,visitTypes:m.area.visitTypes})),i.createElement(Vm,null,i.createElement(Mm,null,"Complete Visit")))}):i.createElement($m,null,i.createElement(u.y$,null)))},zm=(0,a.Ay)("div")({marginLeft:"1.5rem",width:"100%",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"1.5rem"}),Bm=(0,a.Ay)("h2")({marginBottom:"0.5rem",fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),Wm=(0,a.Ay)("p")({fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Fm=(0,a.Ay)("span")({fontWeight:"500","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),$m=(0,a.Ay)("div")({display:"flex",justifyContent:"center"}),Hm=(0,a.Ay)(l.lV)({marginTop:"1.5rem","@media (min-width: 1024px)":{width:"66.666667%"},"@media (min-width: 1280px)":{width:"50%"}}),_m=(0,a.Ay)(u.ar)({marginTop:"1.5rem"}),Vm=(0,a.Ay)("div")({marginTop:"1.5rem"}),Mm=(0,a.Ay)(s.$).withConfig({componentId:"sc-zwfluj-0"})({width:"100%"}),qm=function(){var e=au.A.useStoreState(function(e){return e.visit}),t=au.A.useStoreState(function(e){return e.callType}),n=au.A.useStoreState(function(e){return e.token}),o=(0,i.useState)(!1),a=(0,r.A)(o,2),l=a[0],c=a[1],s=(0,cu.nV)().errors;(0,nt.Ij)(function(){if(e&&e.appointmentInfo){var t=e.appointmentInfo,n=t.status,r=t.signed,i=t.selectedPayment;if(!i)return;"completed"===n&&!r&&"card"===i.type&&c(!0)}},[e]),(0,i.useEffect)(function(){null!=s&&s.audio&&(0,su.vp)("Pre-call audio error surfaced.",{token:null!=n?n:"",kind:s.audio.kind,errorMessage:s.audio.message}),null!=s&&s.video&&(0,su.vp)("Pre-call video error surfaced.",{token:null!=n?n:"",kind:s.video.kind,errorMessage:s.video.message})},[null==s?void 0:s.audio,null==s?void 0:s.video,n]);var m="dialer"===t&&!e||"appointment"===t&&!!e;return i.createElement(i.Fragment,null,e&&l&&i.createElement(Lm,null),m&&!l&&i.createElement(mm,null),((null==s?void 0:s.video)||(null==s?void 0:s.audio))&&i.createElement(u.Gu,{title:"Device permissions error",cancel:null,confirm:"Refresh page",onDismissed:function(){window.location.reload()}},i.createElement("div",null,"You must grant this browser permission to access your camera and microphone, then reload this page.")))},Um=n(94911),Ym=a.Ay.div(Em||(Em=(0,v.A)(["\n    width: 100%;\n    @media screen and (min-width: 1000px) {\n        width: ","px;\n    };\n    flex-shrink: 1;\n"])),330),Gm=a.Ay.div(xm||(xm=(0,v.A)(["\n    ",";\n    width: 100%;\n    @media screen and (min-width: 1000px) {\n        width: ","px;\n    };\n    flex-shrink: 1;\n    border-radius: 8px;\n"])),{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"1.5rem"},330),Jm=a.Ay.div(Am||(Am=(0,v.A)(["\n    ","\n    width: 100%;\n    @media screen and (min-width: 1000px) {\n        width: ","px;\n    };\n    flex-shrink: 1;\n"])),{display:"flex",flexDirection:"column",alignItems:"center"},330),Km={marginLeft:"-0.5rem",marginRight:"-0.5rem",display:"flex",cursor:"pointer",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",textAlign:"left",lineHeight:"1 !important","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))",outline:"2px s
1olid transparent !important",outlineOffset:"2px !important",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1 !important",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1)) !important"}},Xm=function(e){var t=e.onClick,n=e.children,r=e.icon,o=e.iconColor,a=e.className,l=e.loading,c=e.disabled,s=e.disabledText,m=i.createElement(cd,{type:"button",onClick:t,style:{width:"calc(100% + 1rem)"},className:a,disabled:c||l,$_css:[Km,c&&{cursor:"not-allowed",opacity:"0.5","&:hover":{backgroundColor:"transparent !important"}}]},i.createElement(ud,{style:{width:24}},l?i.createElement(u.y$,{size:"small"}):i.createElement(et.g,{icon:r,style:{color:o,height:19,width:"auto"}})),i.createElement(sd,null,n));return c&&s?i.createElement(md,{content:s},i.createElement(dd,null,m)):m},Zm=function(e){var t=e.to,n=e.target,r=e.children,o=e.icon,a=e.iconColor,l=e.className,c=e.disabled,u=e.disabledText;return c?i.createElement(Xm,{onClick:function(){},icon:o,iconColor:a,className:l,disabled:!0,disabledText:u},r):i.createElement(pd,{to:t,target:n,style:{width:"calc(100% + 1rem)"},className:l},i.createElement(gd,{style:{width:24}},i.createElement(et.g,{icon:o,style:{color:a,height:19,width:"auto"}})),i.createElement(fd,null,r))},Qm=function(e){var t=e.patient,n=e.patientEmrName,r=e.dob,o=t?"".concat(t.firstName," ").concat(t.lastName):(0,b.Ji)(n),a=(0,Ec.Vq$)(new Date,new Date(r)),l={fontSize:"1.5rem",fontWeight:"600",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"};return i.createElement(yd,null,null!=t&&t.id?i.createElement(hd,null,i.createElement(vd,{to:"/patients/".concat(t.id),target:"_blank",rel:"noreferrer",$_css2:[l,{display:"flex",width:"auto",alignItems:"center","&:hover":{"--tw-text-opacity":"1 !important",color:"rgb(31 41 55 / var(--tw-text-opacity, 1)) !important"}}]},o,i.createElement(wd,{icon:tt.Ju_,style:{width:"auto"}}))):i.createElement(bd,{$_css3:l},o),i.createElement(Ed,null,r," (age ",a,")"))},ed=function(e){var t=e.className,n=e.phone,r=e.email;return i.createElement("div",{className:t},i.createElement(xd,null,"PocketDoc Dialer"),n&&i.createElement(Ad,null,(0,ka.formatPhone)(n)),r&&i.createElement(Sd,null,r))},td=function(e){var t,n=e.address,r=e.className,o=!(null==n||!n.city||null==n||null===(t=n.state)||void 0===t||!t.abbreviation)?i.createElement(kd,null,n.city,", ",n.state.abbreviation):i.createElement(Cd,{content:"No patient location listed in Epic."},i.createElement(Id,null,"Location not set"));return i.createElement(Rd,{className:r},i.createElement(Pd,{style:{paddingTop:4,width:24}},i.createElement(Td,{icon:_t.muz,style:{height:19,width:"auto"}})),i.createElement(Od,{style:{lineHeight:"28px"}},o))},nd=function(e){var t=e.patient,n=e.className,r=null;if(null!=t&&t.pharmacy){var o=t.pharmacy,a=o.name,l=o.street,c=o.city,u=o.state,s=o.zip;r=i.createElement(i.Fragment,null,i.createElement(Dd,null,(0,b.Z3)((0,b.sJ)(a))),i.createElement(Nd,null,(0,b.Z3)(l)),i.createElement(jd,null,(0,b.Z3)(c),", ",u," ",(0,b.jR)(s)))}else r=i.createElement(Ld,{content:"The patient has not indicated their preferred pharmacy on PocketDoc."},i.createElement(zd,null,"Pharmacy not on file"));return i.createElement(Bd,{className:n},i.createElement(Wd,{style:{paddingTop:4,width:24}},i.createElement(Fd,{icon:_t.F5L,style:{height:19,width:"auto"}})),i.createElement($d,{style:{lineHeight:"28px"}},r))},rd=function(e){var t=e.onSendText,n=e.onResendVideoLink,r=e.onSendReminderToJoinCall,o=e.automatedCallProcessing,a=e.onStartPhoneCall,l=e.className;return i.createElement(Hd,{className:l,$_css4:[{borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingTop:"1.25rem",paddingBottom:"1.25rem"}]},i.createElement(Xm,{onClick:t,icon:_t.Y$q,iconColor:"#4299E1"},"Send Text"),i.createElement(Xm,{onClick:n,icon:_t.wic,iconColor:"#4299E1"},"Resend Video Link"),!!r&&i.createElement(Xm,{onClick:r,icon:_t.pHs,iconColor:"#4299E1",loading:o},"Send Reminder To Join Call"),!!a&&i.createElement(Xm,{onClick:a,icon:_t.KKr,iconColor:"#4299E1"},"Start Phone Call"))},id=function(e){var t=e.onSendSchedulingLink,n=e.onScheduleFollowUp,r=e.videoAppointment,o=e.className;return i.createElement(_d,{className:o},i.createElement(Xm,{onClick:n,icon:_t._JS,iconColor:"#33AA85",disabled:!r||!n,disabledText:"This call is not associated with an appointment. To schedule follow ups, start calls from Today's Visits."},"Schedule Follow Up"),i.createElement(Xm,{onClick:t,icon:_t.bpm,iconColor:"#33AA85"},"Send Scheduling Link"))},od=function(e){var t=e.patientId,n=e.className;return i.createElement(Vd,{className:n},i.createElement(Zm,{to:"/patients/".concat(t,"/health-tracking"),target:"_blank",icon:Ht.qcK,iconColor:"#F87171",disabled:!t,disabledText:"The patient does not have a PocketDoc account. Register them using the 'Patients' tab at the top."},"Health Tracking"),i.createElement(Zm,{to:"/patients/".concat(t,"/questionnaires"),target:"_blank",icon:_t.dpu,iconColor:"#F87171",disabled:!t,disabledText:"The patient does not have a PocketDoc account. Register them using the 'Patients' tab at the top."},"Questionnaires"))},ad=function(){var e=(0,wn.$N)(),t=(0,Um.lJ)(),n=t.shouldNudgeTroubleshoot,r=t.localStatusString,o=t.remoteStatusString,a=(0,uu.E)(),l=a.showTroubleshooting,c=a.openTroubleshooting,u=a.closeTroubleshooting;return i.createElement(i.Fragment,null,i.createElement(Jm,null,i.createElement(Md,{$_css5:[{marginTop:"0.75rem",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},n&&{"@keyframes pulse":{"50%":{opacity:".5"}},animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite","--tw-bg-opacity":"1",backgroundColor:"rgb(235 248 255 / var(--tw-bg-opacity, 1))"}]},i.createElement("div",null,"Connection issues?")," ",i.createElement(qd,{onClick:function(){c(),(0,wn.P6)(e)}},"Troubleshoot"))),i.createElement(zs,{visible:l,onDismissed:u,localStatusString:r,remoteStatusString:o}))},ld=function(e){var t,n=e.videoAppointment,r=e.patientContactInfo,o=e.onSendText,a=e.onResendVideoLink,l=e.onSendReminderToJoinCall,c=e.automatedCallProcessing,u=e.onStartPhoneCall,s=e.onSendSchedulingLink,m=e.onScheduleFollowUp,d=au.A.useStoreState(function(e){return e.phase});return i.createElement(Ym,null,i.createElement(Gm,null,n&&i.createElement(Qm,{patient:n.patient,patientEmrName:n.patientName,dob:n.dob}),!n&&i.createElement(ed,{phone:r.phone,email:r.email}),i.createElement(td,{address:null==n?void 0:n.address}),i.createElement(nd,{patient:null==n?void 0:n.patient}),i.createElement(rd,{onSendText:o,onResendVideoLink:a,onSendReminderToJoinCall:l,automatedCallProcessing:c,onStartPhoneCall:u}),i.createElement(id,{videoAppointment:n,onSendSchedulingLink:s,onScheduleFollowUp:m}),i.createElement(od,{patientId:null==n||null===(t=n.patient)||void 0===t?void 0:t.id})),"in-call"===d&&i.createElement(ad,null))},cd=(0,a.Ay)("button")(Sm||(Sm=(0,v.A)(["",""])),function(e){return e.$_css}),ud=(0,a.Ay)("div")({marginRight:"1rem",display:"flex",justifyContent:"center"}),sd=(0,a.Ay)("span")({fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem"}),md=(0,a.Ay)(Mt.A)({"--tw-bg-opacity":"1 !important",backgroundColor:"rgb(17 24 39 / var(--tw-bg-opacity, 1)) !important",paddingTop:"2.5rem !important"}
1),dd=(0,a.Ay)("span")({display:"inline-block",width:"100%"}),pd=(0,a.Ay)(o.N_)(km||(km=(0,v.A)(["",""])),Km),gd=(0,a.Ay)("div")({marginRight:"1rem",display:"flex",justifyContent:"center"}),fd=(0,a.Ay)("span")({fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem"}),yd=(0,a.Ay)("div")({display:"flex",width:"100%",flexDirection:"column"}),hd=(0,a.Ay)("div")({display:"flex",alignItems:"center"}),vd=(0,a.Ay)(o.N_)(Cm||(Cm=(0,v.A)(["",""])),function(e){return e.$_css2}),wd=(0,a.Ay)(et.g)({marginLeft:"0.5rem",fontSize:"1.125rem",lineHeight:"1.75rem"}),bd=(0,a.Ay)("h2")(Im||(Im=(0,v.A)(["",""])),function(e){return e.$_css3}),Ed=(0,a.Ay)("h4")({fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),xd=(0,a.Ay)("h2")({fontSize:"1.5rem",fontWeight:"600",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Ad=(0,a.Ay)("p")({fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Sd=(0,a.Ay)("p")({fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),kd=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Cd=(0,a.Ay)(Mt.A)({"--tw-translate-y":"0.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","--tw-bg-opacity":"1 !important",backgroundColor:"rgb(17 24 39 / var(--tw-bg-opacity, 1)) !important",paddingTop:"2.5rem !important"}),Id=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Rd=(0,a.Ay)("div")({display:"flex",alignItems:"flex-start",justifyContent:"flex-start",paddingTop:"1.25rem"}),Pd=(0,a.Ay)("div")({marginRight:"1rem",display:"flex",flexShrink:"0",justifyContent:"center"}),Td=(0,a.Ay)(et.g)({"--tw-text-opacity":"1",color:"rgb(248 113 113 / var(--tw-text-opacity, 1))"}),Od=(0,a.Ay)("div")({fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem"}),Dd=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Nd=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),jd=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Ld=(0,a.Ay)(Mt.A)({"--tw-bg-opacity":"1 !important",backgroundColor:"rgb(17 24 39 / var(--tw-bg-opacity, 1)) !important",paddingTop:"2.5rem !important"}),zd=(0,a.Ay)("div")({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),Bd=(0,a.Ay)("div")({display:"flex",alignItems:"flex-start",justifyContent:"flex-start",borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingBottom:"1.5rem",paddingTop:"0.5rem"}),Wd=(0,a.Ay)("div")({marginRight:"1rem",display:"flex",flexShrink:"0",justifyContent:"center"}),Fd=(0,a.Ay)(et.g)({"--tw-text-opacity":"1",color:"rgb(248 113 113 / var(--tw-text-opacity, 1))"}),$d=(0,a.Ay)("div")({fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem"}),Hd=(0,a.Ay)("div")(Rm||(Rm=(0,v.A)(["",""])),function(e){return e.$_css4}),_d=(0,a.Ay)("div")({"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingTop:"1.25rem"}),Vd=(0,a.Ay)("div")({marginTop:"1.25rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingTop:"1.25rem"}),Md=(0,a.Ay)("div")(Pm||(Pm=(0,v.A)(["",""])),function(e){return e.$_css5}),qd=(0,a.Ay)("button").withConfig({componentId:"sc-nvliqx-0"})({fontWeight:"500","--tw-text-opacity":"1",color:"rgb(49 130 206 / var(--tw-text-opacity, 1))","&:hover":{"--tw-text-opacity":"1",color:"rgb(43 108 176 / var(--tw-text-opacity, 1))"}}),Ud=function(){var e=(0,se.A)(de().mark(function e(t){var n,r;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,m.Ay.post("/api/employee/communication/sms-and-email",t);case 1:return n=e.sent,r=n.data,e.abrupt("return",r);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),Yd=Ud,Gd=(0,c.Ik)().shape({phone:(0,c.Yj)().when(["email"],{is:function(e){return!e},then:(0,c.Yj)().matches(I.uK,"Please enter a valid phone number.").required("A phone number or email is required to start a call."),otherwise:(0,c.Yj)().matches(I.uK,"Please include a valid phone number.")}),email:(0,c.Yj)().when(["phone"],{is:function(e){return!e},then:(0,c.Yj)().email("Please enter a valid email.").required("A phone number or email is required to start a call."),otherwise:(0,c.Yj)().email("Please include a valid email.")})},[["phone","email"]]),Jd=function(e){var t=e.phone,n=e.email;return i.createElement("div",null,i.createElement(Xd,null,i.createElement(Zd,{icon:tt.SGM})),i.createElement(Qd,null,"Video link has been resent"),i.createElement(ep,null,i.createElement(tp,null,t&&i.createElement(np,null,i.createElement(rp,null,i.createElement(ip,{icon:_t.K8s})),i.createElement(op,null,"Text message sent to ",(0,ka.formatPhone)(t))),n&&i.createElement(ap,{$_css:[{display:"flex",alignItems:"center",justifyContent:"flex-start"},t&&{marginTop:"1rem"}]},i.createElement(lp,null,i.createElement(cp,{icon:_t.y_8})),i.createElement(up,null,"Email sent to ",n)))))},Kd=(0,oi.AC)()(function(e){var t=e.firstName,n=e.link,o=e.phone,a=e.email,c=(0,i.useState)(""),s=(0,r.A)(c,2),m=s[0],d=s[1],p=(0,i.useState)(!1),g=(0,r.A)(p,2),f=g[0],y=g[1],h={phone:o?(0,b.cz)(o):"",email:null!=a?a:""},v=(0,wn.$N)(),w=function(){var e=(0,se.A)(de().mark(function e(r,i){var o,a,l,c,u,s;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d(""),i.validateForm(),i.setSubmitting(!0),o=I.EJ,a="Here is the link for your PocketDoc video visit: "+n,e.prev=1,e.next=2,Yd({phone:r.phone,email:r.email,message:a,subject:"PocketDoc Visit Link",from:o,firstName:t});case 2:y(!0),(0,wn.nz)(v),e.next=4;break;case 3:e.prev=3,s=e.catch(1),d((0,Se.getErrorFromResponse)(s)),u=null!==(l=null===(c=r.phone)||void 0===c?void 0:c.replace(/[^\d]/g,""))&&void 0!==l?l:"",(0,su.fn)("Error resending visit link.",s,{phone:u,email:r.email,errorMsg:(0,Se.getErrorFromResponse)(s)});case 4:return e.prev=4,i.setSubmitting(!1),e.finish(4);case 5:case"end":return e.stop()}},e,null,[[1,3,4,5]])}));return function(t,n){return e.apply(this,arguments)}}();return i.createElement(l.l1,{initialValues:h,validationSchema:Gd,onSubmit:w},function(e){var t=e.errors,r=e.submitCount,o=e.values,a=e.isSubmitting;return(0,i.useEffect)(function(){var e=!!t.email||!!t.phone;if(r>0&&e){var n,i,a=null!==(n=null===(i=o.phone)||void 0===i?void 0:i.replace(/[^\d]/g,""))&&void 0!==n?n:"",l="Error submitting Resend Visit Links form.";(0,su.fn)(l,new Error(l),{phone:a,email:o.email,errors:Object.values(t).join(", ")})}},[r]),i.createElement(l.lV,null,f?i.createElement(oi.zW,{timeout:250,in:f,appear:!0,unmountOnExit:!0},i.createElement(Jd,{phone:o.phone,email:o.email})):i.createElement(i.Fragment,null,i.createElement(sp,null,"Resend video visit link"),i.createElement(mp,null,
1n),i.createElement(dp,null,i.createElement(pp,null,i.createElement(gp,null,"Patient phone number"),i.createElement(fp,{name:"phone",style:{fontSize:18},$_css2:[{fontWeight:"500",letterSpacing:"0.025em","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"},t.phone&&r>0&&{"--tw-border-opacity":"1",borderColor:"rgb(220 38 38 / var(--tw-border-opacity, 1))"}]}),t.phone&&r>0&&i.createElement(yp,null,t.phone)),i.createElement(hp,null,i.createElement(vp,null,"Patient email"),i.createElement(wp,{name:"email",style:{fontSize:18,fontWeight:500}})),i.createElement(bp,null,i.createElement(Ep,{type:"submit",style:{transform:"translateY(-1px)",width:100,height:42},disabled:a},a?i.createElement(u.y$,{size:"small",white:!0}):"Resend")))),m&&i.createElement(xp,null,m))})}),Xd=(0,a.Ay)("div")({marginBottom:"1.25rem",display:"flex",width:"100%",alignItems:"center",justifyContent:"center","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Zd=(0,a.Ay)(et.g)({height:"3rem"}),Qd=(0,a.Ay)("h2")({marginBottom:"2rem",textAlign:"center",fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),ep=(0,a.Ay)("div")({display:"flex",width:"100%",alignItems:"center",justifyContent:"center"}),tp=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start"}),np=(0,a.Ay)("div")({display:"flex",alignItems:"center",justifyContent:"flex-start"}),rp=(0,a.Ay)("div")({display:"flex",height:"3rem",width:"4rem",alignItems:"center",justifyContent:"center",borderRightWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))"}),ip=(0,a.Ay)(et.g)({height:"2rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),op=(0,a.Ay)("p")({marginLeft:"0.75rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),ap=(0,a.Ay)("div")(Tm||(Tm=(0,v.A)(["",""])),function(e){return e.$_css}),lp=(0,a.Ay)("div")({display:"flex",height:"3rem",width:"4rem",alignItems:"center",justifyContent:"center",borderRightWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))"}),cp=(0,a.Ay)(et.g)({height:"2rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),up=(0,a.Ay)("p")({marginLeft:"0.75rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),sp=(0,a.Ay)("h1")({marginBottom:"0.5rem",fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem"}),mp=(0,a.Ay)("h2")({fontSize:"1.25rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(49 130 206 / var(--tw-text-opacity, 1))"}),dp=(0,a.Ay)("div")({marginTop:"2rem",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start","@media (min-width: 768px)":{flexDirection:"row",alignItems:"flex-start"}}),pp=(0,a.Ay)("div")({marginBottom:"2rem",width:"100%","@media (min-width: 768px)":{marginBottom:"0",width:"40%",paddingRight:"1rem"}}),gp=(0,a.Ay)("label")({fontSize:"1.125rem",lineHeight:"1.75rem"}),fp=(0,a.Ay)(u.LR.Formik)(Om||(Om=(0,v.A)(["",""])),function(e){return e.$_css2}),yp=(0,a.Ay)("p")({marginTop:"0.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),hp=(0,a.Ay)("div")({marginBottom:"2rem",width:"100%","@media (min-width: 768px)":{marginBottom:"0",width:"40%",paddingRight:"1rem"}}),vp=(0,a.Ay)("label")({fontSize:"1.125rem",lineHeight:"1.75rem"}),wp=(0,a.Ay)(u.pd.Formik)({"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),bp=(0,a.Ay)("div")({display:"flex",width:"100%",justifyContent:"flex-end",alignSelf:"flex-end","@media (min-width: 768px)":{marginBottom:"0.25rem",width:"20%",justifyContent:"flex-start",alignSelf:"flex-end"}}),Ep=(0,a.Ay)(oi.$n)({display:"flex",alignItems:"center",justifyContent:"center"}),xp=(0,a.Ay)("p").withConfig({componentId:"sc-l40i7z-0"})({marginTop:"1rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),Ap=function(){var e=(0,se.A)(de().mark(function e(t){return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,m.Ay.post("/api/employee/v2/renotify",{phone:t});case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),Sp=n(10755),kp=n(64804),Cp=function(){var e=(0,se.A)(de().mark(function e(){var t;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"==typeof(t=document).exitPictureInPicture&&t.pictureInPictureElement)try{t.exitPictureInPicture()}catch(e){}case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ip=n(19198),Rp=(0,c.Ik)().shape({phoneNumber:(0,c.Yj)().required("A phone number is required to send a text message.").matches(I.uK,"Please include a valid phone number.")}),Pp=(0,oi.AC)()(function(e){var t=e.phoneNumber,n=e.handleClose,r=e.handleSubmit;return i.createElement(l.l1,{initialValues:{phoneNumber:(0,b.cz)(t)},validationSchema:Rp,onSubmit:r},function(e){var t=e.errors,r=e.submitCount;return i.createElement(l.lV,null,i.createElement(Tp,null,"Send Reminder Text and Phone Call?"),i.createElement(Op,null,"If the patient is not joining the visit, send an automated text and phone call reminder."),i.createElement(Dp,null,i.createElement(Np,null,i.createElement(jp,{htmlFor:"phoneNumber"},"Phone Number"),i.createElement(Lp,{name:"phoneNumber"}),t.phoneNumber&&r>0&&i.createElement(zp,null,t.phoneNumber)),i.createElement(Bp,null,i.createElement(Wp,{secondary:!0,onClick:n},"Cancel"),i.createElement(Fp,{type:"submit"},"Send Reminder"))))})}),Tp=(0,a.Ay)("h1")({fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Op=(0,a.Ay)("p")({marginTop:"0.5rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),Dp=(0,a.Ay)("div")({display:"flex",flexShrink:"1",flexWrap:"nowrap",alignItems:"flex-end",justifyContent:"space-between"}),Np=(0,a.Ay)("div")({flexGrow:"1"}),jp=(0,a.Ay)("label")({marginTop:"1.5rem",display:"block",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Lp=(0,a.Ay)(u.LR.Formik)({marginTop:"0.25rem",width:"100%"}),zp=(0,a.Ay)("p")({marginTop:"0.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),Bp=(0,a.Ay)("div")({marginLeft:"1rem",display:"flex",flexWrap:"nowrap"}),Wp=(0,a.Ay)(oi.$n)({display:"flex",height:"3rem",alignItems:"center",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(243 244 246 / var(--tw-border-opacity, 1))"}),Fp=(0,a.Ay)(oi.$n).withConfig({componentId:"sc-8468ua-0"})({marginLeft:"0.75rem",display:"flex",height:"3rem",alignItems:"center"}),$p=a.Ay.div.withConfig({componentId:"sc-1aknhbg-0"})(["",";@media screen and (min-width:1000px){",";}",";max-width:1366px;"],{marginLeft:"auto",marginRight:"auto",flexDirection:"column-reverse"},{flexDirection:"row"},{display:"flex",width:"100%",alignItems:"flex-start"}),Hp=function(e){var t,n=e.children,o=au.A.useStoreState(function(e){return e.visit}),a=au.A.useStoreActions(function(e){return e.setTransientError});if(!o)throw new Error("VisitTools rendered without a visit in state.");var l=o.appointmentInfo,c=o.contactInfo,u=o.visitLink,s=function(e){var t,n,r=e.appointmentInfo,i=null!=r&&r.patient?null===(t=r.patient)||void 0===t?void 0:t.firstName:"",o=null!=r&&r.patient?null===(n=r.patient)||void 0===n?void 0:n.lastName:"",a="".concat(i," ").concat(o);return""===a.trim()&&null!=r&&r.patientName&&(a=(0,b.Ji)(r.patientName)),{first:i,last:o,fullName:a.trim()}}(o),m=null!=l&&l.patient?l.patient.phone:c.phone,d=null!=l&&l.patient?l.patient.email:c.email,p=(0,wn.$N)(),f=(0,i.useState)(!1),y=(0,r.A)(f,2),h=y[0],v=y[1],w=(0,i.useState)(!1),E=(0,r.A)(w,2),x=E[0],A=E[1],S=(0,i.useState)(!1),k=(0,r.A)(S,2),C=k[0],I=k[1],R=(0,i.useState)(!1),P=(0,r.A)(R,2),T=P[0],O=P[1],D=function(){var e=(0,se.A)(de().mark(function e(t){var n;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return O(!1),I(!0),e.prev=1,e.next=2,Ap(t.phoneNumber);case 2:setTimeout(function(){I(!1)},5e3),(0,wn.fy)(p),e.next=4;break;case 3:e.prev=3,n=e.catch(1),a({title:"Failed to send automated call reminder",subtitle:(0,Se.getErrorFromResponse)(n)}),I(!1);case 4:case"end":return e.stop()}},e,null,[[1,3]])}
1));return function(t){return e.apply(this,arguments)}}(),N=(0,i.useState)(!1),j=(0,r.A)(N,2),L=j[0],z=j[1],B=(0,g.E9)(function(e){return e.call.toggleShowDialer}),W=(0,g.E9)(function(e){return e.call.setPatientCallData}),F=(0,i.useState)(!1),$=(0,r.A)(F,2),H=$[0],_=$[1],V=(0,i.useState)(!1),M=(0,r.A)(V,2),q=M[0],U=M[1],Y=(0,i.useMemo)(function(){if(l){var e,t;if(l.isChild||!l.patient){var n=(l.patientName||"").split(",");t=(n[0]||"").trim(),e=(n[1]||"").trim()}else e=l.patient.firstName,t=l.patient.lastName;return{firstName:e,lastName:t,emrId:l.patientEmrId,insuranceStatus:""}}},[l]),G=(0,i.useRef)(null),J=(0,i.useCallback)(function(){if(G.current){var e=G.current.getElementsByTagName("video").item(0);e&&"function"==typeof e.requestPictureInPicture&&e.requestPictureInPicture()}},[]);return i.createElement(i.Fragment,null,i.createElement($p,null,i.createElement(ld,{videoAppointment:l,patientContactInfo:c,onSendText:function(){v(!0),(0,wn.O0)(p)},onResendVideoLink:function(){A(!0),(0,wn.tN)(p)},onSendReminderToJoinCall:function(){O(!0)},automatedCallProcessing:C,onStartPhoneCall:function(){z(!0),(0,wn.b$)(p)},onSendSchedulingLink:function(){_(!0),(0,wn.Ve)(p)},onScheduleFollowUp:function(){U(!0),(0,wn.vc)(p)}}),n({participantVideoRef:G,onRequestPictureInPicture:J})),i.createElement(ic.A,{recipientPhoneNumber:null!=l&&l.patient?l.patient.phone:c.phone,visible:h,onModalDismissed:function(){return v(!1)}}),i.createElement(Kd,{visible:x,onModalDismissed:function(){return A(!1)},link:u,phone:m,email:null!=l&&l.patient?l.patient.email:c.email,firstName:s.first}),T&&i.createElement(Pp,{visible:T,phoneNumber:m,handleSubmit:D,handleClose:function(){return O(!1)}}),L&&i.createElement(Ip.A,{visible:L,phoneNumber:m,handleSubmit:function(e){var t={id:null!=l&&l.patient?l.patient.id:void 0,name:s.fullName,phone:e.phoneNumber};W(t),B(),z(!1),(0,wn.PV)(p)},onModalDismissed:function(){z(!1)},handleClose:function(){return z(!1)}}),l&&i.createElement(Sp.A,{visible:q,referenceAppointment:function(){if(!l)throw new Error("Cannot create reference appointment without appointment info.");return{patientEmrId:l.patientEmrId.ID,locationEmrId:l.locationEmrId,providerEmrId:l.providerEmrId,appointmentDateTime:(0,En.A)(l.appointmentTime)}}(),onRequestPictureInPicture:J,emrPatient:Y,onModalDismissed:function(){U(!1),Cp()}}),i.createElement(kp.A,{visible:H,onModalDismissed:function(){return _(!1)},patientId:null==l||null===(t=l.patient)||void 0===t?void 0:t.id,firstName:s.first,email:d,phone:m}))},_p=a.Ay.div.withConfig({componentId:"sc-tfkhxd-0"})(["",";top:16px;right:16px;z-Index:1000;max-width:25%;& video{",";object-fit:cover;transform:scale(-1,1);}"],{position:"absolute",zIndex:"50",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(31 41 55 / var(--tw-bg-opacity, 1))","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"},{minHeight:"100%",minWidth:"100%"}),Vp=192,Mp=function(){var e=(0,i.useRef)(null),t=(0,i.useRef)(),n=(0,cu.nV)().localVideo;(0,i.useEffect)(function(){if(e.current&&n){var r=function(){if(e.current&&n){t.current&&n.detach(t.current);var r=n.attach();r&&(t.current=r,e.current.appendChild(r))}};r();var i=n.on("updated",r),o=n.on("dimensions-changed",r);return function(){i(),o(),n&&t.current&&n.detach(t.current),e.current&&(e.current.innerHTML="")}}},[n]);var o=i.useState({width:Vp,height:Vp}),a=(0,r.A)(o,2),l=a[0],c=a[1];return(0,i.useEffect)(function(){if(n){var e=function(){var e=n.getDimensions();if(e&&e.width&&e.height){var t=e.width/e.height,r=Vp,i=Vp/t;i>Vp&&(i=Vp,r=Vp*t),c({width:r,height:i})}};e();var t=n.on("dimensions-changed",e),r=n.on("updated",e);return function(){t(),r()}}},[n]),i.createElement(_p,{ref:e,style:{width:l.width,height:l.height}})},qp=n(96763);function Up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Up(Object(n),!0).forEach(function(t){(0,xt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Gp=a.Ay.div(Dm||(Dm=(0,v.A)(["\n    ",";\n    z-index: 50;\n    top: 0;\n    left: 0;\n    height: calc(100% - 64px);\n\n    display: flex;\n    align-items: center;\n    justify-content: center;\n\n    & video {\n        ",";\n        object-fit: contain;\n        transform: rotate(",");\n    }\n"])),{position:"absolute",width:"100%",alignSelf:"stretch",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(19 26 32 / var(--tw-bg-opacity, 1))"},{position:"absolute",left:"0",height:"100%",width:"100%"},function(e){var t=e.rotation;return"".concat(t,"deg")}),Jp=function(e){var t=e.children;return i.createElement(og,{$_css:[{marginTop:"0.25rem",marginBottom:"0.25rem",borderRadius:"0.5rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},{backgroundColor:"rgba(30, 30, 30, 0.75)"}]},i.createElement(ag,null,t))},Kp=(0,i.forwardRef)(function(e,t){var n=e.rotation,o=(0,Um.lJ)().room,a=(0,i.useState)({video:!0,audio:!0}),l=(0,r.A)(a,2),c=l[0],u=l[1],s=(0,cu.SU)(),m=function(e){t.current&&e&&"data"!==e.kind&&("audio"===e.kind&&(t.current.appendChild(e.attach()),o.participants.forEac
1h(function(e){e.audioTracks.forEach(function(e){var n=e.track;if(t.current){for(var r=t.current.getElementsByTagName("audio")[0];r;)t.current.removeChild(r),r=t.current.getElementsByTagName("audio")[0];var i=n.attach();t.current.appendChild(i);var o=s.getState().selectedSpeakerId;o&&"function"==typeof i.setSinkId&&i.setSinkId(o).catch(function(e){qp.warn("Failed to set sinkId on remote audio element",e)})}})})),"video"===e.kind&&o.participants.forEach(function(e){e.videoTracks.forEach(function(e){var n=e.track;if(t.current){var r=t.current.getElementsByTagName("video")[0];r&&t.current.removeChild(r),t.current.appendChild(n.attach())}})}),u(function(t){return Yp(Yp({},t),{},(0,xt.A)({},e.kind,e.isEnabled))}),"video"===e.kind?u(function(t){return Yp(Yp({},t),{},(0,xt.A)({},e.kind,(n=e,!Boolean(n&&"placeholder"===n.name))));var n}):(e.on("enabled",function(){return u(function(t){return Yp(Yp({},t),{},(0,xt.A)({},e.kind,!0))})}),e.on("disabled",function(){return u(function(t){return Yp(Yp({},t),{},(0,xt.A)({},e.kind,!1))})})))},d=function(e){t.current&&e&&"data"!==e.kind&&e.detach().forEach(function(e){return t.current.removeChild(e)})},p=function(e){var n=t.current;n&&(n.innerHTML="",e.tracks.forEach(function(e){var t=e.isSubscribed,n=e.track;return t&&m(n)}),e.on("trackSubscribed",function(e){return m(e)}),e.on("trackUnpublished",function(e){var t=e.track;return d(t)}),e.on("disconnected",function(){return e.tracks.forEach(function(e){var t=e.track;d(t)})}))};return(0,i.useEffect)(function(){o&&(o.on("participantConnected",function(e){return p(e)}
1),o.participants.forEach(function(e){p(e)}))},[o]),i.createElement(i.Fragment,null,i.createElement(Gp,{ref:t,rotation:n}),i.createElement(lg,{style:{zIndex:100}},i.createElement(cg,null,!c.audio&&i.createElement(Jp,null,"Patient audio is paused."),!c.video&&i.createElement(Jp,null,"Patient video is paused."))))});Kp.displayName="RemoteParticipantView";var Xp,Zp,Qp,eg,tg,ng,rg,ig=Kp,og=(0,a.Ay)("div")(Nm||(Nm=(0,v.A)(["",""])),function(e){return e.$_css}),ag=(0,a.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(243 244 246 / var(--tw-text-opacity, 1))"}),lg=(0,a.Ay)("div")({position:"absolute",zIndex:"10",height:"100%",width:"100%"}),cg=(0,a.Ay)("div").withConfig({componentId:"sc-gsa6on-0"})({display:"flex",height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center"}),ug=a.Ay.div(Xp||(Xp=(0,v.A)(["\n    ",";\n"])),{display:"flex",width:"100%",alignItems:"center",justifyContent:"center","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}),sg=a.Ay.button(Zp||(Zp=(0,v.A)(["\n    ",";\n    ",";\n\n    @media screen and (max-width: 540px) {\n        & > span {\n            display: none !important;\n        }\n    }\n"])),{marginLeft:"0.25rem",marginRight:"0.25rem",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))",outline:"2px solid transparent !important",outlineOffset:"2px !important",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1))"}},function(e){return e.highlighted&&{"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))","&:hover":{"--tw-text-opacity":"1",color:"rgb(4 120 87 / var(--tw-text-opacity, 1))"}}}),mg=function(e){var t=e.title,n=e.onClick,r=e.isDefaultState,o=e.highlighted,a=e.iconComponent,l=e.secondaryStateIconComponent,c=e.disabled,u=!r&&l?l:a,s=au.A.useStoreState(function(e){return e.callLoading}),m=c||s;return i.createElement(sg,{type:"button",onClick:n,style:{height:64,width:87,cursor:m?"not-allowed":"pointer"},highlighted:o,disabled:m},u,i.createElement(pg,{style:{marginTop:8}},t))},dg=function(e){var t=e.onToggleScreenShare,n=e.onToggleFullScreen,r=e.onRotate,o=e.onToggleMiniPlayer,a=e.onEndCall,l=e.className,c=e.isFullScreen,u=(0,uu.E)(),s=u.toggleAudio,m=u.toggleVideo,d=u.toggleSettings,p=(0,cu.nV)(),g=p.audioEnabled,f=p.videoEnabled,y=p.screenShareEnabled,h=Boolean(navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia),v=(0,wn.$N)();return i.createElement(ug,{style:{height:64,zIndex:100,bottom:0},className:l},i.createElement(mg,{title:"Mute",onClick:s,isDefaultState:g,iconComponent:i.createElement(et.g,{icon:tt.A54}),secondaryStateIconComponent:i.createElement(et.g,{icon:tt.$zK})}),i.createElement(mg,{title:"Video",onClick:m,isDefaultState:f,iconComponent:i.createElement(et.g,{icon:tt.n2W}),secondaryStateIconComponent:i.createElement(et.g,{icon:tt.uOS}),disabled:y}),h&&i.createElement(mg,{title:"Screenshare",onClick:t,isDefaultState:!0,highlighted:y,iconComponent:i.createElement(et.g,{icon:tt.ArK})}),i.createElement(mg,{title:"Full Screen",onClick:n,isDefaultState:!c,secondaryStateIconComponent:i.createElement(et.g,{icon:tt.DOu}),iconComponent:i.createElement(et.g,{icon:tt.skf}),highlighted:c}),i.createElement(mg,{title:"Rotate",onClick:r,iconComponent:i.createElement(et.g,{icon:tt.lLb}),isDefaultState:!0}),i.createElement(mg,{title:"Mini Player",onClick:o,isDefaultState:!0,iconComponent:i.createElement(et.g,{icon:tt.iOf})}),i.createElement(mg,{title:"Settings",onClick:function(){d(),(0,wn.cY)(v)},isDefaultState:!0,iconComponent:i.createElement(et.g,{icon:tt.BH7})}),i.createElement(mg,{title:"End",onClick:a,isDefaultState:!0,iconComponent:i.createElement(gg,{icon:tt.KKr})}))},pg=(0,a.Ay)("span")({whiteSpace:"nowrap",textAlign:"center",fontSize:"0.875rem",lineHeight:"1"}),gg=(0,a.Ay)(et.g).withConfig({componentId:"sc-172tese-0"})({"--tw-text-opacity":"1 !important",color:"rgb(220 38 38 / var(--tw-text-opacity, 1)) !important"}),fg=(0,a.i7)(["0%{opacity:0.5;transform:scale(0.95);}50%{opacity:1;transform:scale(1.1);}100%{opacity:0.5;transform:scale(0.95);}"]),yg=a.Ay.span(Qp||(Qp=(0,v.A)(["\n  ",";\n  animation: 4s ease-in "," infinite;\n"])),{marginRight:"0.5rem",display:"inline-block",height:"0.5rem",width:"0.5rem",borderRadius:"9999px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"},fg),hg=(0,a.Ay)(yg).withConfig({componentId:"sc-rx8qi9-0"})(["",""],function(e){return e.$_css2}),vg=function(e){var t=e.className,n=(0,Um.lJ)(),r=n.connectionStatus,o=n.remoteStatusString,a=function(e){switch(e){case Um.OM.Disconnected:return{"--tw-bg-opacity":"1",backgroundColor:"rgb(239 68 68 / var(--tw-bg-opacity, 1))","--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity, 1))"};case Um.OM.Connecting:case Um.OM.Reconnecting:return{"--tw-bg-opacity":"1",backgroundColor:"rgb(236 201 75 / var(--tw-bg-opacity, 1))","--tw-ring-opacity":"1","--tw-ring-color":"rgb(214 158 46 / var(--tw-ring-opacity, 1))"};case Um.OM.Connected:return{"--tw-bg-opacity":"1",backgroundColor:"rgb(51 170 133 / var(--tw-bg-opacity, 1))","--tw-ring-opacity":"1","--tw-ring-color":"rgb(5 150 105 / var(--tw-ring-opacity, 1))"};case Um.OM.ConnectionFailed:default:return{"--tw-bg-opacity":"1",backgroundColor:"rgb(239 68 68 / var(--tw-bg-opacity, 1))","--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity, 1))"}}}(r.remote);return i.createElement(wg,{className:t,$_css:[{borderRadius:"0.5rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},{backgroundColor:"rgba(30, 30, 30, 0.75)"}]},i.createElement(bg,null,i.createElement(hg,{$_css2:a}),"Patient ",o))},wg=(0,a.Ay)("div")(eg||(eg=(0,v.A)(["",""])),function(e){return e.$_css}),bg=(0,a.Ay)("p")({display:"flex",alignItems:"center",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(243 244 246 / var(--tw-text-opacity, 1))"}),Eg=function(e){var t=e.variant,n=void 0===t?"default":t,o=(0,i.useRef)(null),a=au.A.useStoreState(function(e){return e.session}),l=(0,i.useState)(null),c=(0,r.A)(l,2),u=c[0],s=c[1];return(0,i.useEffect)(function(){a&&(o.current=a.createdAt)},[a]),(0,i.useEffect)(function(){var e=setInterval(function(){if(o.current){var e=En.A.now().diff(o.current,"second");s((0,ka.formatDuration)(e))}},1e3);return function(){clearInterval(e)}},[]),"overlay"===n?i.createElement(xg,{$_css:[{borderRadius:"0.5rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},{backgroundColor:"rgba(30, 30, 30, 0.75)"}]},i.createElement(Ag,null,i.createElement(Sg,null,"Duration:")," ",u?i.createElement("span",null,u):null)):i.createElement(kg,null,i.createElement(Cg,null,"Duration:")," ",u?i.createElement(Ig,null,u):null)},xg=(0,a.Ay)("div")(tg||(tg=(0,v.A)(["",""])),function(e){return e.$_css}),Ag=(0,a.Ay)("p")({display:"flex",alignItems:"center",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(243 244 246 / var(--tw-text-opacity, 1))"}),Sg=(0,a.Ay)("span")({fontWeight:"600"}),kg=(0,a.Ay)("div")({display:"flex",fontSize:"1rem",lineHeight:"1.5rem"}),Cg=(0,a.Ay)("span")({fontWeight:"600","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"}),Ig=(0,a.Ay)("span").withConfig({componentId:"sc-1ymwbxn-0"})({"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Rg=function(){var e=(0,Um.lJ)(),t=e.localStatusString,n=e.remoteStatusString;return i.createElement(Pg,null,i.createElement(Tg,null,"Local: ",t),i.createElement(Og,null,"Remote: ",n))},Pg=(0,a.Ay)("div")({textAlign:"right","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),Tg=(0,a.Ay)("p")({fontSize:"0.75rem",lineHeight:"1rem"}),Og=(0,a.Ay)("p").withConfig({componentId:"sc-o6n42d-0"})({fontSize:"0.75rem",lineHeight:"1rem"}),Dg=a.Ay.div.withConfig({componentId:"sc-1xy0w0h-0"})(["",";z-index:50;top:0;left:0;height:calc(100% - 64px);display:flex;align-items:center;justify-content:center;"],{position:"absolute",width:"100%",alignSelf:"stretch",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(156 163 175 / var(--tw-bg-opacity, 1))"}),Ng=function(){return i.createElement(i.Fragment,null,i.createElement(Dg,null,i.createElement(u.y$,{size:"large",white:!0})))},jg=n(79179),Lg=a.Ay.div(ng||(ng=(0,v.A)(["\n    ",";\n    @media screen and (min-width: 1000px) {\n        ",";\n    };\n    ",";\n    flex-grow: 1;\n"])),{marginBottom:"2rem",marginLeft:"0",width:"100%"},{marginBottom:"0",marginLeft:"1.5rem",width:"auto"},{display:"flex",flexDirection:"column"}),zg=a.Ay.div(rg||(rg=(0,v.A)(["\n    ",";\n    ",";\n    overflow: hidden;\n    padding-bottom: calc(56.25% + 64px); // aspect ratio 16/9;\n    @media screen and (max-width: 600px) {\n        padding-bottom: calc(133.33% + 64px); // aspect ratio 3/4;\n    };\n"])),{position:"relative",width:"100%",borderBottomLeftRadius:"0.5rem",borderBottomRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem"},{zIndex:"50",display:"flex",overflow:"hidden"}),Bg=(0,i.forwardRef)(function(e,t){var n=e.onRequestPictureInPicture,o=e.onEndCall,a=au.A.useStoreState(function(e){return e.callLoading}),l=au.A.useStoreState(function(e){return e.token}),c=(0,cu.SU)(),u=c.startScreenShare,s=c.stopScreenShare,m=(0,cu.nV)().screenShareEnabled,d=(0,wn.$N)(),p=(0,i.useRef)(null),g=(0,i.useState)(!1),f=(0,r.A)(g,2),y=f[0],h=f[1];(0,i.useEffect)(function(){var e=function(){return h(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){document.removeEventListener("fullscreenchange",e)}},[]);var v=(0,i.useState)(0),w=(0,r.A)(v,2),b=w[0],E=w[1];return i.createElement(Lg,null,i.createElement(zg,{ref:p},a?i.createElement(Ng,null):i.createElement(i.Fragment,null,i.createElement(Mp,null),i.createElement(ig,{ref:t,rotation:b}),i.createElement(_g,null,i.createElement(vg,null),y?i.createElement(Vg,null,i.createElement(Eg,{variant:"overlay"})):null),i.createElement(jg.A,{app:"provider",visitToken:l})),i.createElement(Mg,{onToggleScreenShare:function(){return m?s():u()},onToggleFullScreen:function(){document.fullscreenElement?"function"==typeof document.exitFullscreen&&document.exitFullscreen():p.current&&p.current.requestFullscreen()},onRotate:function(){E(270===b?0:b+90)},onToggleMiniPlayer:function(){null!==document.pictureInPictureElement?Cp():(n(),(0,wn.jZ)(d))},onEndCall:o,isFullScreen:y})),i.createElement(qg,null,i.createElement(Eg,null),i.createElement(Rg,null)))});Bg.displayName="VideoCallView";var Wg,Fg,$g,Hg=Bg,_g=(0,a.Ay)("div")({position:"absolute",left:"0",top:"0",zIndex:"50",margin:"1rem",display:"flex",alignItems:"center"}),Vg=(0,a.Ay)("div")({marginLeft:"0.5rem"}),Mg=(0,a.Ay)(dg)({position:"absolute",zIndex:"50"}),qg=(0,a.Ay)("div").withConfig({componentId:"sc-r7uyr6-0"})({marginTop:"0.5rem",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}),Ug=function(){var e=au.A.useStoreState(function(e){return e.visit});if(!e)throw new Error("InCallScreen rendered without a visit in state.");var t=e.appointmentInfo,n=au.A.useStoreActions(function(e){return e.cleanUpCall}),o=au.A.useStoreState(function(e){return e.session}),a=au.A.useStoreState(function(e){return e.twilioToken}),l=au.A.useStoreState(function(e){return e.token}),c=au.A.useStoreActions(function(e){return e.joinVisit});(0,i.useEffect)(function(){return c(),function(){n()}},[]);var s=au.A.useStoreActions(function(e){return e.pauseVisit}),m=au.A.useStoreActions(function(e){return e.endVisit}),d=(0,wn.$N)(),p=(0,nt.lB)(function(){return d},[d]);(0,i.useEffect)(function(){if(p)return(0,wn.r1)(p,"start"),function(){(0,wn.r1)(p,"end")}}
1,[p]);var g=!!t,f=(0,i.useState)(!1),y=(0,r.A)(f,2),h=y[0],v=y[1],w=function(){v(!0)},b=(0,cu.nV)().errors;return i.createElement(i.Fragment,null,i.createElement(Hp,null,function(e){var t=e.participantVideoRef,n=e.onRequestPictureInPicture;return null!==o&&a?i.createElement(Um.pT,{app:"provider",roomId:o.twilioRoomSid,roomToken:a,visitToken:l},i.createElement(Hg,{onRequestPictureInPicture:n,ref:t,onEndCall:w})):i.createElement(Hg,{onRequestPictureInPicture:n,ref:t,onEndCall:w})}),h&&i.createElement(u.Gu,{title:"End Visit?",cancel:g?"Pause Visit":null,confirm:"End Visit",onConfirmClick:function(){v(!1),m()},onDismissed:function(){v(!1),s()}},i.createElement(i.Fragment,null,i.createElement(Yg,{onClick:function(){return v(!1)},style:{top:4,right:12}},i.createElement(Gg,{icon:tt.yYc})),i.createElement("p",null,g?i.createElement(i.Fragment,null,'To mark this appointment as complete, click "End Visit". To pause the visit and send the patient back to the waiting room, click "Pause Visit".'):i.createElement(i.Fragment,null,"Are you sure you want to end the visit?")))),((null==b?void 0:b.video)||(null==b?void 0:b.audio))&&i.createElement(u.Gu,{title:"Device permissions error",cancel:null,confirm:"Refresh page",onDismissed:function(){window.location.reload()}},i.createElement("div",null,"You must grant this browser permission to access your camera and microphone, then reload this page.")))},Yg=(0,a.Ay)("button")({position:"absolute"}),Gg=(0,a.Ay)(et.g).withConfig({componentId:"sc-p3s78p-0"})({height:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))","&:hover":{"--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}}),Jg=n(17853),Kg=a.Ay.div(Wg||(Wg=(0,v.A)(["\n    ",";\n    @media screen and (min-width: 1000px) {\n        ",";\n    };\n    ",";\n    flex-grow: 1;\n"])),{marginBottom:"2rem",marginLeft:"0",width:"100%"},{marginBottom:"0",marginLeft:"1.5rem",width:"auto"},{display:"flex",flexDirection:"column"}),Xg=a.Ay.div(Fg||(Fg=(0,v.A)(["\n    ",";\n    ",";\n    overflow: hidden;\n    padding-bottom: calc(56.25% + 64px); // aspect ratio 16/9;\n    @media screen and (max-width: 600px) {\n        padding-bottom: calc(133.33% + 64px); // aspect ratio 3/4;\n    };\n"])),{position:"relative",width:"100%",borderBottomLeftRadius:"0.5rem",borderBottomRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem"},{zIndex:"50",display:"flex",overflow:"hidden"}),Zg=function(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return"".concat(t.toString().padStart(2,"0"),":")+"".concat(n.toString().padStart(2,"0"),":")+"".concat(r.toString().padStart(2,"0"))},Qg=function(e){var t=e.sessions,n=e.totalCallDurationSeconds;return i.createElement(tf,{style:{maxWidth:600}},i.createElement(nf,null,i.createElement(rf,null,"Start Time"),i.createElement(of,null,"Duration"),i.createElement(af,null,"Caller")),t.map(function(e,n){return i.createElement(lf,{key:n,$_css:[{display:"flex",width:"100%",alignItems:"center","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"},1===t.length&&{borderBottomLeftRadius:"0.5rem",borderBottomRightRadius:"0.5rem"}]},i.createElement(cf,null,(0,Ec.GPZ)((0,b.q8)(e.startTime),"h:mm:ss a")),i.createElement(uf,null,Zg(e.durationSeconds)),i.createElement(sf,null,e.callerDisplayName))}),t.length>1&&i.createElement(mf,null,i.createElement(df,null,"Total Duration"),i.createElement(pf,null,Zg(n)),i.createElement(gf,null)))},ef=function(){var e=au.A.useStoreState(function(e){return e.postCallData}),t=au.A.useStoreActions(function(e){return e.rejoinFromPostCall}),n=au.A.useStoreState(function(e){return e.callType}),r=(0,o.W6)().push,a="appointment"===n;return i.createElement(Kg,null,i.createElement(Xg,null,i.createElement(ff,null,i.createElement(yf,{src:Jg,alt:"Call Ended"}),i.createElement(hf,null,"Call Ended"),(null==e?void 0:e.visitType)&&i.createElement(vf,null,e.visitType),i.createElement(Qg,{sessions:(null==e?void 0:e.sessions)||[],totalCallDurationSeconds:(null==e?void 0:e.totalCallDurationSeconds)||0}),i.createElement(wf,null,a&&i.createElement(bf,{secondary:!0,onClick:function(){t()}},"Rejoin Call"),i.createElement(Ef,{onClick:function(){r(W.yZ)}},"Return to Today's Visits")))))},tf=(0,a.Ay)("div")({marginTop:"2rem",display:"flex",width:"100%",flexDirection:"column",justifyContent:"flex-start"}),nf=(0,a.Ay)("div")({display:"flex",width:"100%",alignItems:"center",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"}),rf=(0,a.Ay)("div")({width:"25%",fontWeight:"500","@media (min-width: 768px)":{width:"20%"}}),of=(0,a.Ay)("div")({width:"25%",fontWeight:"500","@media (min-width: 768px)":{width:"20%"}}),af=(0,a.Ay)("div")({width:"50%",fontWeight:"500","@media (min-width: 768px)":{width:"60%"}}),lf=(0,a.Ay)("div")($g||($g=(0,v.A)(["",""])),function(e){return e.$_css}),cf=(0,a.Ay)("div")({width:"25%",fontSize:"0.875rem",lineHeight:"1.25rem","@media (min-width: 768px)":{width:"20%",fontSize:"1rem",lineHeight:"1.5rem"}}),uf=(0,a.Ay)("div")({width:"25%",fontSize:"0.875rem",lineHeight:"1.25rem","@media (min-width: 768px)":{width:"20%",fontSize:"1rem",lineHeight:"1.5rem"}}),sf=(0,a.Ay)("div")({width:"50%",fontSize:"0.875rem",lineHeight:"1.25rem","@media (min-width: 768px)":{width:"60%",fontSize:"1rem",lineHeight:"1.5rem"}}),mf=(0,a.Ay)("div")({display:"flex",width:"100%",alignItems:"center",borderBottomLeftRadius:"0.5rem",borderBottomRightRadius:"0.5rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"}),df=(0,a.Ay)("div")({width:"25%",fontWeight:"500","@media (min-width: 768px)":{width:"20%"}}),pf=(0,a.Ay)("div")({width:"25%","@media (min-width: 768px)":{width:"20%"}}),gf=(0,a.Ay)("div")({width:"50%","@media (min-width: 768px)":{width:"60%"}}),ff=(0,a.Ay)("div")({display:"flex",height:"100%",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"flex-start","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"1.5rem"}),yf=(0,a.Ay)("img")({marginBottom:"1.5rem",height:"8rem",width:"auto"}),hf=(0,a.Ay)("h2")({fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),vf=(0,a.Ay)("p")({marginTop:"0.25rem",fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),wf=(0,a.Ay)("div")({marginTop:"1.5rem",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"}),bf=(0,a.Ay)(oi.$n)({marginLeft:"0.5rem",marginRight:"0.5rem",display:"flex",height:"3rem",alignItems:"center",borderWidth:"1px !important","--tw-border-opacity":"1 !important",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1)) !important","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))","&:hover":{"--tw-bg-opacity":"1 !important",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important"}}),Ef=(0,a.Ay)(oi.$n).withConfig({componentId:"sc-1ocpzqi-0"})({marginLeft:"0.5rem",marginRight:"0.5rem",display:"flex",height:"3rem",alignItems:"center"}),xf=function(){var e,t=au.A.useStoreState(function(e){return e.visit});if(!t)throw new Error("PostCallScreen rendered without a visit in state.");var n=t.appointmentInfo,r="completed"===(null==n?void 0:n.status)&&"card"===(null==n||null===(e=n.selectedPayment)||void 0===e?void 0:e.type)&&!(null!=n&&n.signed);return i.createElement(i.Fragment,null,i.createElement(Hp,null,function(){return r?i.createElement(Lm,null):i.createElement(ef,null)}))},Af=function(e){var t=e.visitPhase,n=e.error,r=e.clearError;if(null===t)return null;var o="pre-call"===t||"in-call"===t;return i.createElement(i.Fragment,null,"error"===t&&i.createElement(lu,{error:n}),i.createElement(i.Fragment,null,o&&i.createElement(cu.jD,null,"pre-call"===t&&i.createElement(qm,null),"in-call"===t&&i.createElement(Ug,null))),"post-call"===t&&i.createElement(xf,null),n&&"transient"===n.type&&i.createElement(u.Gu,{title:n.title,cancel:null,confirm:"Okay",onDismissed:r},n.subtitle))},Sf=function(){var e=(0,o.W6)(),t=au.A.useStoreState(function(e){return e.redirectTo}),n=au.A.useStoreActions(function(e){return e.setRedirectTo});return(0,i.useEffect)(function(){t&&(e.replace(t),n(null))},[t,e,n]),null},kf=function(){var e=(0,f.g)().token,t=au.A.useStoreActions(function(e){return e.setToken}),n=au.A.useStoreActions(function(e){return e.initEmptyDialerVisit}),r=au.A.useStoreActions(function(e){return e.init}),o=au.A.useStoreState(function(e){return e.loading}),a=au.A.useStoreState(function(e){return e.error}),l=au.A.useStoreActions(function(e){return e.clearTransientError}),c=au.A.useStoreState(function(e){return e.phase}),s=(0,f.zy)();return(0,i.useEffect)(function(){t(null!=e?e:null);var i=s.pathname.includes(W.S2);if(e)r();else{if(!e&&!i)throw new Error("Missing visit token for this appointment!");n()}},[e]),i.createElement(i.Fragment,null,i.createElement(u.y$.Overlay,{visible:o}),i.createElement(Af,{error:a,visitPhase:c,clearError:l}))},Cf=function(){return i.createElement(au.A.Provider,null,i.createElement(Sf,null),i.createElement(kf,null))};n.dn(Cf);var If,Rf,Pf=function(){var e=(0,o.zy)();return i.createElement(ou.A.Provider,{key:e.pathname},i.createElement(Cf,null))},Tf=(0,i.lazy)(function(){return Promise.all([n.e(2369),n.e(1891),n.e(3645),n.e(7057),n.e(9350),n.e(9884)]).then(n.bind(n,38478))}),Of=[{path:W.yZ,exact:!0,component:Kc},{path:W.q$,exact:!0,component:(0,i.lazy)(function(){return n.e(6369).then(n.bind(n,86587))})},{path:"".concat(W.q$,"-v2"),exact:!0,component:(0,i.lazy)(function(){return n.e(1086).then(n.bind(n,88625))})},{path:W.$2,exact:!0,component:(0,i.lazy)(function(){return Promise.all([n.e(2362),n.e(7781),n.e(7792),n.e(7753),n.e(6807)]).then(n.bind(n,40300))})},{path:W.RN,exact:!0,component:(0,i.lazy)(function(){return Promise.all([n.e(2354),n.e(8223)]).then(n.bind(n,32225))})},{path:"".concat(W.RN,"/:parentId").concat(W.$t,"/:childId"),component:(0,i.lazy)(function(){return Promise.all([n.e(2354),n.e(8088),n.e(3275)]).then(n.bind(n,64143))})},{path:"".concat(W.RN,"/:patientId"),component:(0,i.lazy)(function(){return Promise.all([n.e(2362),n.e(2354),n.e(8088),n.e(7753),n.e(9002)]).then(n.bind(n,37709))})},{path:W.Nd,component:(0,i.lazy)(function(){return Promise.all([n.e(2549),n.e(3001)]).then(n.bind(n,80066))})},{path:W.Sk,component:(0,i.lazy)(function(){return Promise.all([n.e(2369),n.e(3528)]).then(n.bind(n,18068))})},{path:W.Cn,component:(0,i.lazy)(function(){return n.e(8138).then(n.bind(n,91254))})},{path:W.T_,component:sn},{path:W.Co,component:(0,i.lazy)(function(){return Promise.all([n.e(3236),n.e(3105),n.e(5378)]).then(n.bind(n,92858))})},{path:W.A2,component:(0,i.lazy)(function(){return Promise.all([n.e(1170),n.e(4624),n.e(4706),n.e(4319),n.e(3742),n.e(4928),n.e(1601),n.e(3550)]).then(n.bind(n,44424))})},{path:W.s6,component:(0,i.lazy)(function(){return n.e(7752).then(n.bind(n,15856))})},{path:["".concat(W.U5,"/:sessionId"),"".concat(W.U5)],component:(0,i.lazy)(function(){return Promise.all([n.e(7781),n.e(1570)]).then(n.bind(n,22055))})},{path:W.B8,component:(0,i.lazy)(function(){return n.e(2043).then(n.bind(n,70549))})},{path:W.v9,component:(0,i.lazy)(function(){return Promise.all([n.e(2369),n.e(1891),n.e(7057),n.e(9350),n.e(7257)]).then(n.bind(n,112))})},{path:W.CS,component:(0,i.lazy)(function(){return n.e(8964).then(n.bind(n,19545))})},{path:W.Iv,component:(0,i.lazy)(function(){return Promise.all([n.e(3236),n.e(9170)]).then(n.bind(n,51619))})}],Df=function(){var e="".concat(window.location.search.replace("?sendTo=","")).concat(window.location.hash);return i.createElement(ru,null,i.createElement(Rr,null,i.createElement(iu.A,null,i.createElement(o.dO,null,Of.map(function(e){var t=e.path,n=e.component,r=e.exact,a=void 0!==r&&r;return i.createElement(o.qh,{key:"router:".concat(t),path:t,exact:a},i.createElement(n,null))}),i.createElement(o.qh,{path:W.rf},i.createElement(eu,{admin:!0,fallback:i.createElement(o.rd,{to:W.yZ})},i.createElement(Tf,null))),i.createElement(o.qh,{path:[W.S2,"".concat(W.Yc,"/:token"),"".concat(W.g9,"/:token")]},i.createElement(Pf,null)),i.createElement(o.rd,{to:e||"/"})))))},Nf=function(){var e=(0,se.A)(de().mark(function e(){var t,n;return de().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,m.Ay.get("/api/calls/auth-token");case 1:return t=e.sent,n=t.data,e.abrupt("return",n.token);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),jf=Nf,Lf=n(91527),zf=n(63773),Bf=function(e){var t=e.children,n=e.initialTop,o=e.width,l=e.height,c=(0,i.useRef)(0),u=(0,i.useRef)(n),s=(0,i.useState)(c.current),m=(0,r.A)(s,2),d=m[0],p=m[1],g=(0,i.useState)(u.current),f=(0,r.A)(g,2),y=f[0],h=f[1],v=(0,i.useCallback)(function(e){e.preventDefault(),function(e){return e.clientY
1<=50||e.clientX<=50||e.clientY>=window.innerHeight-50||e.clientX>=window.innerWidth-50}(e)||(c.current=c.current+e.movementX,u.current=u.current+e.movementY,p(c.current),h(u.current))},[]),w=function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",w)},b=function(){c.current>window.innerWidth-(o+10)&&(c.current=window.innerWidth-(o+10),p(c.current)),u.current>window.innerHeight-(l+10)&&(u.current=window.innerHeight-(l+10),h(u.current))};(0,i.useEffect)(function(){return c.current=(window.innerWidth-o)/2,p(c.current),window.addEventListener("resize",b),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",w),window.removeEventListener("resize",b)}},[]);var E=a.Ay.div.withConfig({componentId:"sc-qzlg6u-0"})(["&{"," left:",";width:",";height:",";top:",";z-index:1000;}"],{position:"fixed",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))","--tw-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","--tw-shadow-colored":"0 4px 6px -1px var(--tw-sha
1dow-color), 0 2px 4px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"},d+"px",o+"px",l+"px",y+"px");return i.createElement(E,{onMouseDown:function(e){e.preventDefault(),window.addEventListener("mousemove",v),window.addEventListener("mouseup",w)}},t)},Wf=a.Ay.div(If||(If=(0,v.A)(["\n    & {\n        ",";\n    }\n    & svg {\n        ",";\n    }\n\n    &:hover {\n        ",";\n      & > svg {\n            ",";\n        }\n    }\n"])),{marginBottom:"0.25rem",display:"flex",alignItems:"center",borderRadius:"0.25rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},{marginRight:"0.75rem",display:"inline",height:"1.5rem",width:"1.5rem","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},{cursor:"pointer","--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity, 1))",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"},{"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}),Ff=a.Ay.div(Rf||(Rf=(0,v.A)(["\n    & {\n        ","\n    }\n"])),{display:"block",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem",borderTopWidth:"8px","--tw-border-opacity":"1",borderTopColor:"rgb(5 150 105 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))"}),$f=function(){var e=(0,i.useRef)(null),t=(0,i.useState)(null),n=(0,r.A)(t,2),o=n[0],a=n[1],l=(0,i.useState)(!1),c=(0,r.A)(l,2),u=c[0],s=c[1],m=(0,g.O$)(function(e){return e.user.employee}),d=(0,g.O$)(function(e){return e.call.showDialer}),p=(0,g.O$)(function(e){return e.call.patient}),f=(0,g.E9)(function(e){return e.call.setShowDialer}),y=(0,g.E9)(function(e){return e.call.setPatientCallData}),h=function(){var t=e.current;t&&t.disconnectAll(),f(!1)},v=function(){var t=(0,se.A)(de().mark(function t(){var n,r,i;return de().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.current){t.next=1;break}return t.abrupt("return",!1);case 1:return t.prev=1,t.next=2,jf();case 2:if(r=t.sent){t.next=3;break}
1return(0,su.fn)("Twilio call token refresh returned an empty token.",new Error("Empty Twilio token")),t.abrupt("return",!1);case 3:return n.updateToken(r),(0,su.vp)("Twilio call token refreshed."),t.abrupt("return",!0);case 4:return t.prev=4,i=t.catch(1),(0,su.fn)("Failed to refresh Twilio call token.",i),mn.Cp(i),t.abrupt("return",!1);case 5:case"end":return t.stop()}},t,null,[[1,4]])}));return function(){return t.apply(this,arguments)}}(),w=function(e){e.on("tokenWillExpire",function(){v()}),e.on("error",function(t,n){var r,i={code:null==t?void 0:t.code,twilioName:null==t?void 0:t.name,deviceState:e.state,callSid:null==n||null===(r=n.parameters)||void 0===r?void 0:r.CallSid};(0,su.fn)("Twilio device error.",t,i),mn.Cp(t,{extra:i}),20104!==(null==t?void 0:t.code)&&20101!==(null==t?void 0:t.code)||v()}),e.on("registered",function(){return(0,su.vp)("Twilio device registered.")}),e.on("unregistered",function(){return(0,su.vp)("Twilio device unregistered.")})},E=function(){var t=(0,se.A)(de().mark(function t(){var n,r,i,o;return de().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=1,jf();case 1:if(n=t.sent){t.next=2;break}
1return(0,su.fn)("Twilio device init received an empty token.",new Error("Empty Twilio token")),t.abrupt("return");case 2:r={appName:"Provider Patient Caller",appVersion:"32dc115a682fd2b9445addde1c69f47dfaca84c7",edge:"umatilla"},i=new Lf.pF(n,r),e.current=i,w(i),(0,su.vp)("Twilio device initialized."),t.next=4;break;case 3:t.prev=3,o=t.catch(0),(0,su.fn)("Failed to initialize Twilio device.",o),mn.Cp(o);case 4:case"end":return t.stop()}},t,null,[[0,3]])}));return function(){return t.apply(this,arguments)}}();(0,i.useEffect)(function(){return E(),f(!1),function(){var t=e.current;t&&(t.disconnectAll(),t.destroy()),e.current=null,f(!1),y(null)}},[]),(0,i.useEffect)(function(){o&&o.mute(u)},[u]);var x=function(){var t=(0,se.A)(de().mark(function t(n,r,i){var o,l,c,u;return de().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((o=e.current)&&n){t.next=1;break}return(0,su.fn)("Attempted to place a call before the Twilio device was ready.",new Error("Twilio device not ready"),{hasDevice:!!o,hasNumber:!!n}),t.abrupt("return");case 1:return t.next=2,v();case 2:return l={To:"+1"+n,From:"provider-in-browser",ProviderId:i,CallBackNumber:(null==m?void 0:m.alternatePhone)||(0,b.mT)(null==m?void 0:m.serviceArea)},r&&Object.assign(l,{PatientId:r}),t.prev=3,(0,su.vp)("Placing outbound Twilio call.",{providerId:i,hasPatientId:!!r}),t.next=4,o.connect({params:l,rtcConstraints:{audio:!0}});case 4:if(c=t.sent){t.next=5;break}
1return(0,su.fn)("Twilio device.connect resolved without a call.",new Error("No call returned from device.connect")),t.abrupt("return");case 5:c.on("cancel",function(){(0,su.vp)("Twilio call cancelled."),h()}),c.on("disconnect",function(){(0,su.vp)("Twilio call disconnected."),h()}),c.on("reject",function(){(0,su.vp)("Twilio call rejected."),h()}),c.on("error",function(e){var t={code:null==e?void 0:e.code,twilioName:null==e?void 0:e.name};(0,su.fn)("Twilio call error.",e,t),mn.Cp(e,{extra:t}),h()}),a(c),t.next=7;break;case 6:t.prev=6,u=t.catch(3),(0,su.fn)("Twilio device.connect threw.",u),mn.Cp(u),h();case 7:case"end":return t.stop()}},t,null,[[3,6]])}));return function(e,n,r){return t.apply(this,arguments)}}();(0,i.useEffect)(function(){d&&m&&p&&x(p.phone,p.id,m.id)},[d]);var A=function(e){e.stopPropagation(),s(!u)},S=(null==p?void 0:p.name)&&""!==p.name.trim()?p.name:"the patient";return i.createElement(i.Fragment,null,d&&(null==p?void 0:p.phone)&&i.createElement(Bf,{initialTop:window.innerHeight-194,width:400,height:150,key:"patient".concat(null==p?void 0:p.id)},i.createElement(Ff,null,i.createElement(Wf,null,i.createElement(va.EsG,null),i.createElement("span",null,"Call in Progress"),i.createElement(zf.A,null)),i.createElement(Hf,null,i.createElement("p",null,"Calling ",S," at ",(0,ka.formatPhone)(p.phone))),i.createElement(_f,null,i.createElement("div",null,u?i.createElement(Mf,{onMouseDown:A},"Muted"):i.createElement(Vf,{onMouseDown:A},"Mute")),i.createElement("div",null,i.createElement(qf,{onMouseDown:function(e){e.stopPropagation(),h()}},"End Call"))))))},Hf=(0,a.Ay)("div")({margin:"0.75rem"}),_f=(0,a.Ay)("div")({margin:"0.625rem",display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:"0.75rem"}),Vf=(0,a.Ay)(s.$.Gray)({width:"100%"}),Mf=(0,a.Ay)(s.$)({width:"100%"}),qf=(0,a.Ay)(s.$.Red).withConfig({componentId:"sc-myp5kb-0"})({width:"100%"}),Uf=n(96763),Yf=function(){return(0,wn.Lq)(),null},Gf=function(){var e=(0,i.useState)(""),t=(0,r.A)(e,2),n=t[0],a=t[1],l=(0,i.useState)(!0),c=(0,r.A)(l,2),u=c[0],s=c[1],m=(0,g.O$)(function(e){return e.user.token}),d=(0,g.E9)(function(e){return e.user.setToken}),p=(0,g.E9)(function(e){return e.user.getEmployee});return(0,i.useEffect)(function(){if(!m)return s(!1);requestAnimationFrame(function(){p().then(function(){return s(!1)}).catch(function(e){var t,n;(0,Se.isAxiosError)(e)&&(401!==(null===(t=e.response)||void 0===t?void 0:t.status)&&403!==(null===(n=e.response)||void 0===n?void 0:n.status)||d(void 0));a((0,Se.getErrorFromResponse)(e)),Uf.error(e)})})},[m]),i.createElement(i.Fragment,null,u?i.createElement(Ce,{message:"Network Error"===n?"Could not connect to API server, please try refreshing the page.":n||"Signing you in...",fixed:!0}):i.createElement(ue.A,null,i.createElement($f,null),i.createElement(je,null),null,m?i.createElement(Df,null):i.createElement(o.dO,null,i.createElement(o.qh,{path:W.zG},i.createElement($,null)),i.createElement(o.qh,{path:W._9},i.createElement(ne,null)),i.createElement(o.qh,{path:W.Ou},i.createElement(ve,null)),i.createElement(o.rd,{to:"".concat(W.zG,"?sendTo=").concat(window.location.pathname).concat(window.location.search).concat(window.location.hash)}))))},Jf=function(){return(0,Z.jZ)()?i.createElement(i.Fragment,null,i.createElement(Yf,null),i.createElement(Gf,null)):null},Kf=function(){return i.createElement(i.Fragment,null,i.createElement(X,null),i.createElement(Jf,null))}},97423:function(e,t,n){"use strict";n.d(t,{A:function(){return k}});var r=n(58168),i=n(80296),o=n(67881),a=n(96540),l=n(52594),c=n(64263),u=n(39023),s=n(10467),m=n(54756),d=n.n(m),p=n(98765),g=n(91319),f=function(){var e=(0,s.A)(d().mark(function e(t){var n,r;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,p.Ay.post("/api/employee/feedback",t);case 1:e.next=3;break;case 2:throw e.prev=2,r=e.catch(0),n=(0,g.getErrorFromResponse)(r),new Error("There was an error submitting feedback. "+n);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),y=f,h=n(14740),v=n(25381),w=n(20982),b=n(66188),E=n(85930),x={message:""},A=(0,v.Ik)().shape({message:(0,v.Yj)().required("Your feedback must be at least 4 characters to submit.").min(4,"Your feedback must be at least 4 characters to submit.")}),S=function(){return a.createElement(C,null,a.createElement(w.g,{icon:b.SGM,color:l.w4.colors.primary[500]})," Thanks for your feedback!")},k=(0,c.AC)()(function(e){var t=e.session,n=e.patientEmail,o=e.messageTag,c=(0,a.useState)(""),s=(0,i.A)(c,2),m=s[0],d=s[1],p=(0,a.useState)(!1),g=(0,i.A)(p,2),f=g[0],v=g[1],w=(0,h.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.firstName}),b=(0,h.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.lastName}),k=(0,h.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.email}),C=(0,h.O$)(function(e){return e.user.serviceArea}),N=(0,E.d0)(),j=(0,a.useRef)(null);(0,a.useEffect)(function(){null!==j.current&&(j.current.parentNode.parentNode.style.borderColor=l.w4.colors.gray[500])},[j.current]);var L=(0,E.$N)();return a.createElement(u.l1,{onSubmit:function(e,r){var i,a,l=r.setSubmitting;(0,r.validateForm)(),d(""),l(!0),y({message:o?"[".concat(o,"] ").concat(e.message):e.message,firstName:w,lastName:b,email:k,serviceArea:C,sourceUrl:window.location.href,sessionId:null!==(i=null==t?void 0:t.id)&&void 0!==i?i:void 0,patientId:null!==(a=null==t?void 0:t.patient)&&void 0!==a?a:void 0,patientEmail:n}).then(function(){l(!1),v(!0),L?(0,E.Tt)(L):(0,E.TH)({employeeProperties:N})}).catch(function(e){d(e.message),l(!1)})},initialValues:x,validationSchema:A,validateOnMount:!0},function(e){var t=e.isSubmitting,n=e.errors,i=e.touched;return a.createElement(u.lV,{ref:j},f?a.createElement(S,null):a.createElement(a.Fragment,null,a.createElement(I,null,"Provide Software Feedback"),a.createElement(R,null,"Please provide any suggestions for improvement or technical feedback for the Pocketdoc team."),a.createElement(u.D0,{name:"message"},function(e){var t=e.field;return a.createElement(P,(0,r.A)({maxLength:1e3},t))}),a.createElement(T,{type:"submit",disabled:t||!!n.message},t?a.createElement(l.y$,{size:"small",white:!0}):"Submit")),a.createElement(O,null,"Your feedback helps the PocketDoc team improve the app experience. Someone from our team will review your feedback, and we may email you for more information or updates. We appreciate it!"),n.message&&i.message||""!==m?a.createElement(D,null,n.message||m):null)})}),C=(0,o.Ay)("h2")({marginBottom:"0.5rem",fontSize:"1.5rem",fontWeight:"700",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),I=(0,o.Ay)("h2")({marginBottom:"0.5rem",fontSize:"1.5rem",fontWeight:"700",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),R=(0,o.Ay)("h3")({marginBottom:"0.25rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),P=(0,o.Ay)(l.pd.Textarea)({marginBottom:"1rem"}),T=(0,o.Ay)(c.$n)({display:"flex",height:"3rem",width:"12rem",alignItems:"center",justifyContent:"center"}),O=(0,o.Ay)("p")({marginTop:"1rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),D=(0,o.Ay)("p").withConfig({componentId:"sc-bfygs1-0"})({marginTop:"1rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"})},54641:function(e,t,n){"use strict";n.d(t,{fz:function(){return A},bD:function(){return w},Ay:function(){return C},hA:function(){return b}});var r=n(10467),i=n(80296),o=n(67881),a=n(54756),l=n.n(a),c=n(96540),u=n(98765),s=function(){var e=(0,r.A)(l().mark(function e(t){var n,r;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,u.Ay.get("/api/employee/v2/insurance/audits/".concat(t));case 1:return n=e.sent,r=n.data,e.abrupt("return",r.data);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),m=n(31351),d=n(52594),p=n(64263),g=n(87937),f=n(95533),y=n(20982),h=n(66188),v=n(14740),w="Easy Switch",b=function(e){return e?(0,f.A)(e).goto("America/Los_Angeles").format("{month-short} {date}, {year} {time}"):""},E=function(e){var t=e.images,n=(0,c.useState)([]),r=(0,i.A)(n,2),o=r[0],a=r[1];return(0,c.useEffect)(function(){a(t.map(function(){return 0}))},[]),c.createElement(I,null,t.map(function(e,t){return c.createElement(R,{key:e},c.createElement(P,null,c.createElement(T,{icon:h.ULb,onClick:function(){!function(e){a(o.map(function(t,n){return n===e?t+90:t}))}(t)}})),c.createElement(O,null,c.createElement("a",{href:e,target:"_blank",rel:"noreferrer"},c.createElement(D,{src:e,style:{transform:"rotate(".concat(o[t],"deg)"),userSelect:"none"}}))))}))},x=function(e){var t=e.response;return c.createElement(N,{style:{height:"800px"}},JSON.stringify(t,void 0,2))},A=function(e){var t=e.value,n=e.unknown;return"boolean"==typeof t?c.createElement(j,null,c.createElement(g.eG,{value:t,unknown:n})):c.createElement("span",null,t)},S=function(e){var t=e.field,n=e.value2,r=e.unknown;return c.createElement(L,null,c.createElement(z,null,t),c.createElement(B,null,t===w?c.createElement(W,null,c.createElement(g.To,{value:!!n,unknown:r})):c.createElement(A,{value:n,unknown:r})))},k=function(e){var t=e.audit,n=e.handleReRunVerification;return c.createElement(F,null,c.createElement($,null,c.createElement(p.$n,{onClick:n},"Re-Run Eligibility")),c.createElement(H,null,c.createElement(_,null,c.createElement(V,null,c.createElement(M,null,"Field"),c.createElement(q,null,"Value")),c.createElement(S,{field:"First Name",value2:t.firstName}),c.createElement(S,{field:"Last Name",value2:t.lastName}),c.createElement(S,{field:"MRN",value2:t.mrn}),c.createElement(S,{field:"DOB",value2:t.dob}),c.createElement(S,{field:"Gender",value2:t.gender}),c.createElement(S,{field:"Logged At",value2:b(t.loggedAt)}),c.createElement(S,{field:"Status",value2:t.status}),c.createElement(S,{field:"Date Of Service",value2:t.dateOfService}),c.createElement(S,{field:"Booked",value2:t.booked}),c.createElement(S,{field:"Service Area",value2:t.serviceArea}),c.createElement(S,{field:"Provider",value2:t.provider}),c.createElement(S,{field:"Specialty Area",value2:t.specialtyArea}),c.createElement(S,{field:"Primary Care",value2:t.primaryCare,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Urgent Care",value2:t.urgentCare,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Mental Health",value2:t.mentalHealth,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Specialty Injections",value2:t.specialtyInjections,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Physical Therapy",value2:t.physicalTherapy,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Gastroenterology",value2:t.gastroenterology,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Endocrinology",value2:t.endocrinology,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Cardiology",value2:t.cardiology,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Urology",value2:t.urology,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Allergy",value2:t.allergy,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Dietitian",value2:t.dietitian,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Pain Management",value2:t.painManagement,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Dermatology",value2:t.dermatology,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Sleep Medicine",value2:t.sleepMedicine,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Podiatry",value2:t.podiatry,unknown:(0,g.DU)(t)}),c.createElement(S,{field:"Rheumatology",value2:t.rheumatology,unknown:(0,g.DU)(t)}),c.createElement(S,{field:w,value2:t.easySwitch,unknown:(0,g.v4)(t)}),c.createElement(S,{field:"Insurance Provider",value2:t.insuranceProvider}),c.createElement(S,{field:"Insurance Details",value2:t.insuranceDetails}),c.createElement(S,{field:"Insurance Type",value2:t.insuranceType}),c.createElement(S,{field:"Network",value2:t.network}),c.createElement(S,{field:"Network Details",value2:t.networkDetails}),c.createElement(S,{field:"Medical Group",value2:"HMO"===t.network?t.medicalGroup:""}),c.createElement(S,{field:"PCP",value2:"HMO"===t.network?t.pcp:""}),c.createElement(S,{field:"Member ID",value2:t.memberId}),c.createElement(S,{field:"Epic ID",value2:t.epicId}),c.createElement(S,{field:"Payer Code",value2:t.tradingPartnerServiceId}),c.createElement(S,{field:"Provided First Name",value2:t.providedFirstName}),c.createElement(S,{field:"Provided Last Name",value2:t.providedLastName}),c.createElement(S,{field:"Request Error",value2:t.requestError}),c.createElement(S,{field:"Request Error Code",value2:t.requestErrorCode}))))},C=function(e){var t=e.id,n=e.onDismissed,o=e.visible,a=(0,c.useState)(),u=(0,i.A)(a,2),g=u[0],f=u[1],y=(0,c.useState)("audit"),h=(0,i.A)(y,2),w=h[0],b=h[1],A=(0,c.useState)(!1),S=(0,i.A)(A,2),C=S[0],I=S[1],R=(0,c.useState)(!1),P=(0,i.A)(R,2),T=P[0],O=P[1],D=(0,v.O$)(function(e){return e.user.employee}),N=function(){var e=(0,r.A)(l().mark(function e(){var r,i;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.prev=1,e.next=2,s(t);case 2:r=e.sent,f(r),e.next=4;break;case 3:e.prev=3,i=e.catch(1),n(T,i);case 4:return e.prev=4,I(!1),e.finish(4);case 5:case"end":return e.stop()}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.A)(l().mark(function e(){var t,r,i;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!0),e.prev=1,t=null==g?void 0:g.auditV2){e.next=2;break}return e.abrupt("return");case 2:return r={auditId:t._id,memberId:t.memberId,planId:t.planId,plan:t.insuranceProvider,f
1irstName:t.firstName,lastName:t.lastName,gender:t.gender,dob:t.dob,providedFirstNAme:t.providedFirstName,providedLastName:t.providedLastName,processedBy:"".concat(null==D?void 0:D.firstName," ").concat(null==D?void 0:D.lastName)},e.next=3,(0,m.A)(r);case 3:e.sent&&(N(),O(!0)),e.next=5;break;case 4:e.prev=4,i=e.catch(1),n(T,i);case 5:return e.prev=5,I(!1),e.finish(5);case 6:case"end":return e.stop()}},e,null,[[1,4,5,6]])}));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)(function(){t&&N()},[t]),g?c.createElement(p.aF,{onDismissed:function(){b("audit"),f(void 0),n(T),O(!1)},fullscreen:!0,visible:o},c.createElement(d.y$.Overlay,{visible:C}),c.createElement(U,null,c.createElement(Y,null,c.createElement(G,{style:"audit"===w?{backgroundColor:"#33AA85"}:{},onClick:function(){b("audit")}},"Audit"),c.createElement(J,{style:"response"===w?{backgroundColor:"#33AA85"}:{},onClick:function(){b("response")}},"Response"),g.imageUrls.length&&g.imageUrls[0]&&c.createElement(K,{style:"images"===w?{backgroundColor:"#33AA85"}:{},onClick:function(){b("images")}},"Insurance Card")),"audit"===w&&c.createElement(k,{audit:g.auditV2,handleReRunVerification:function(){j()}}),"response"===w&&c.createElement(x,{response:g.response}),"images"===w&&c.createElement(E,{images:g.imageUrls}))):c.createElement(c.Fragment,null)},I=(0,o.Ay)("div")({display:"flex",width:"100%"}),R=(0,o.Ay)("div")({width:"50%"}),P=(0,o.Ay)("div")({display:"flex",width:"100%",justifyContent:"center",paddingBottom:"0.5rem"}),T=(0,o.Ay)(y.g)({marginLeft:"0.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))","&:hover":{cursor:"pointer"}}),O=(0,o.Ay)("div")({display:"flex",width:"100%",overflow:"hidden"}),D=(0,o.Ay)("img")({width:"100%"}),N=(0,o.Ay)("pre")({overflow:"scroll",borderWidth:"1px","--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity, 1))",padding:"0.5rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),j=(0,o.Ay)("div")({float:"left"}),L=(0,o.Ay)("div")({position:"relative",display:"flex",alignItems:"center",borderBottomWidth:"1px",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.75rem",paddingBottom:"0.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}}),z=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),B=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),W=(0,o.Ay)("div")({float:"left"}),F=(0,o.Ay)("div")({width:"100%"}),$=(0,o.Ay)("div")({marginBottom:"3rem",display:"flex",width:"100%",alignContent:"center",justifyContent:"center"}),H=(0,o.Ay)("div")({display:"flex",width:"100%",alignContent:"center",justifyContent:"center"}),_=(0,o.Ay)("div")({width:"66.666667%"}),V=(0,o.Ay)("div")({display:"flex",flexDirection:"row",alignItems:"flex-end",borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))",paddingBottom:"0.5rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),M=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),q=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),U=(0,o.Ay)("div")({}),Y=(0,o.Ay)("div")({marginBottom:"3rem",display:"flex",width:"100%",alignContent:"center",justifyContent:"center"}),G=(0,o.Ay)(p.$n)({borderTopLeftRadius:"0.25rem",borderBottomLeftRadius:"0.25rem",borderTopRightRadius:"0",borderBottomRightRadius:"0","--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity, 1))",paddingLeft:"8rem",paddingRight:"8rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"}),J=(0,o.Ay)(p.$n)({borderTopLeftRadius:"0",borderBottomLeftRadius:"0",borderTopRightRadius:"0.25rem",borderBottomRightRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity, 1))",paddingLeft:"8rem",paddingRight:"8rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"}),K=(0,o.Ay)(p.$n).withConfig({componentId:"sc-1igs2qo-0"})({borderTopLeftRadius:"0",borderBottomLeftRadius:"0",borderTopRightRadius:"0.25rem",borderBottomRightRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity, 1))",paddingLeft:"8rem",paddingRight:"8rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"})},87937:function(e,t,n){"use strict";n.d(t,{eG:function(){return p},To:function(){return g},Ay:function(){return h},v4:function(){return y},DU:function(){return f}});var r=n(80296),i=n(67881),o=n(96540),a=(n(95533),n(46239)),l=n(93024),c=n(89053),u=n(90380),s=n(54625),m=n(54641),d=n(14740),p=function(e){var t=e.value,n=e.unknown;return t?o.createElement(v,null):n?o.createElement(w,null):o.createElement(b,null)},g=function(e){var t=e.value,n=e.unknown;return t?n?o.createElement(E,null):o.createElement(x,null):o.createElement("span",null)},f=function(e){return!!e.requestError||"HMO"===e.network&&!e.pcpInNetwork},y=function(e){return!!e.requestError||"HMO"===e.network&&!e.pcp},h=function(e){var t=e.audit,n=e.handleShowAudit,i=e.handleMouseUp,c=(0,d.O$)(function(e){var t;return null===(t=e.user.employee)||void 0===t?void 0:t.isAdmin}),s=function(e){var t=e.id,n=e.status,c=[{label:"Un-reviewed",value:"un-reviewed"},{label:"Correct",value:"correct"},{label:"Incorrect",value:"incorrect"}],u=c.find(function(e){return e.value===n});u||(u=c[0]);var s=(0,o.useState)(u),m=(0,r.A)(s,2),d=m[0],p=m[1];return o.createElement("div",{onMouseUp:function(e){e.stopPropagation(),i()}},o.createElement(a.A,{options:c,placeholder:o.createElement("span",null),value:d,onChange:function(e){!function(e){p(e);try{(0,l.A)(t,e.value)}catch(e){}}(e)}}))};return o.createElement(A,{onMouseUp:n},o.createElement(S,null,(0,m.hA)(t.loggedAt)),o.createElement(k,null,"000000000000000000000000"!==t.patientId?o.createElement(C,{to:"".concat(u.RN,"/").concat(t.patientId)},"".concat(t.firstName," ").concat(t.lastName)):o.createElement(I,null,"".concat(t.firstName," ").concat(t.lastName))),o.createElement(R,null,t.mrn),c?o.createElement(P,null,o.createElement(s,{id:t._id,status:t.status})):null,o.createElement(T,null,t.dateOfService),o.createElement(O,null,t.provider),o.createElement(D,null,t.specialtyArea),o.createElement(N,null,o.createElement(p,{value:t.booked})),o.createElement(j,null,o.createElement(p,{value:t.primaryCare,unknown:f(t)})),o.createElement(L,null,o.createElement(p,{value:t.urgentCare,unknown:f(t)})),o.createElement(z,null,o.createElement(p,{value:t.mentalHealth,unknown:f(t)})),o.createElement(B,null,o.createElement(p,{value:t.specialtyInjections,unknown:f(t)})),o.createElement(W,null,o.createElement(p,{value:t.physicalTherapy,unknown:f(t)})),o.createElement(F,null,o.createElement(p,{value:t.gastroenterology,unknown:f(t)})),o.createElement($,null,o.createElement(p,{value:t.endocrinology,unknown:f(t)})),o.createElement(H,null,o.createElement(p,{value:t.cardiology,unknown:f(t)})),o.createElement(_,null,o.createElement(p,{value:t.urology,unknown:f(t)})),o.createElement(V,null,o.createElement(p,{value:t.allergy,unknown:f(t)})),o.createElement(M,null,o.createElement(p,{value:t.dietitian,unknown:f(t)})),o.createElement(q,null,o.createElement(p,{value:t.painManagement,unknown:f(t)})),o.createElement(U,null,o.createElement(p,{value:t.dermatology,unknown:f(t)})),o.createElement(Y,null,o.createElement(p,{value:t.sleepMedicine,unknown:f(t)})),o.createElement(G,null,o.createElement(p,{value:t.podiatry,unknown:f(t)})),o.createElement(J,null,o.createElement(p,{value:t.rheumatology,unknown:f(t)})),o.createElement(K,null,o.createElement(g,{value:t.easySwitch,unknown:y(t)})),o.createElement(X,null,t.insuranceProvider),o.createElement(Z,null,t.insuranceDetails),o.createElement(Q,null,t.insuranceType),o.createElement(ee,null,t.network),o.createElement(te,null,t.networkDetails),o.createElement(ne,null,"HMO"===t.network?t.medicalGroup:""),o.createElement(re,null,"HMO"===t.network?t.pcp:""),o.createElement(ie,null,t.memberId),o.createElement(oe,null,t.processedBy),o.createElement(ae,null,t.fromCache),o.createElement(le,null,t.requestError))},v=(0,i.Ay)(c.C1y)({marginLeft:"auto",marginRight:"auto",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),w=(0,i.Ay)(c.R2D)({marginLeft:"auto",marginRight:"auto",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),b=(0,i.Ay)(c.qhh)({marginLeft:"auto",marginRight:"auto",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),E=(0,i.Ay)(c.R2D)({marginLeft:"auto",marginRight:"auto",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),x=(0,i.Ay)(c.C1y)({marginLeft:"auto",marginRight:"auto",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(214 158 46 / var(--tw-text-opacity, 1))"}),A=(0,i.Ay)("div")({position:"relative",display:"flex",alignItems:"center",borderBottomWidth:"1px",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.75rem",paddingBottom:"0.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}}),S=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),k=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),C=(0,i.Ay)(s.N_)({fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(5 150 105 / var(--tw-text-opacity, 1))"}}),I=(0,i.Ay)("span")({fontSize:"1.125rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"}),R=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),P=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none"}),T=(0,i.Ay)("div")({marginRight:"0.5rem",width:"8rem",flex:"none",textAlign:"center"}),O=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),D=(0,i.Ay)("div")({marginRight:"0.5rem",width:"8rem",flex:"none",textAlign:"center"}),N=(0,i.Ay)("div")({marginRight:"0.5rem",width:"3rem",flex:"none",textAlign:"center"}),j=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),L=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),z=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),B=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),W=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),F=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),$=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),H=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),_=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),V=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),M=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),q=(0,i.Ay)("div")({marginRight:"0.5rem",width:"5rem",flex:"none",textAlign:"center"}),U=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),Y=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),G=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),J=(0,i.Ay)("div")({marginRight:"0.5rem",width:"4rem",flex:"none",textAlign:"center"}),K=(0,i.Ay)("div")({marginRight:"0.5rem",width:"6rem",flex:"none",textAlign:"center"}),X=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),Z=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),Q=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),ee=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),te=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),ne=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),re=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),ie=(0,i.Ay)("div")({marginRight:"0.5rem",width:"8rem",flex:"none",textAlign:"center"}),oe=(0,i.Ay)("div")({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"}),ae=(0,i.Ay)("div")({marginRight:"0.5rem",width:"3rem",flex:"none",textAlign:"center"}),le=(0,i.Ay)("div").withConfig({componentId:"sc-743zoe-0"})({marginRight:"0.5rem",width:"10rem",flex:"none",textAlign:"center"})},63773:function(e,t,n){"use strict";var r=n(67881),i="rgba(55,65,81, 1);",o=(0,r.i7)(["0%{background-color:",";}50%,100%{background-color:",";}"],i,"rgba(55,65,81, 0.1);
1"),a=r.Ay.div.withConfig({componentId:"sc-1dkr6an-0"})(["&{position:relative;left:25px;top:0px;width:8px;height:8px;border-radius:4px;background-color:",";color:r",";animation:"," 1s infinite alternate;animation-delay:.5s;}&::before,&::after{content:'';display:inline-block;position:absolute;top:0;}&::before{left:-15px;width:8px;height:8px;border-radius:4px;background-color:",";color:",";animation:"," 1s infinite alternate;animation-delay:0s;}&::after{left:15px;width:8px;height:8px;border-radius:4px;background-color:",";color:",";animation:"," 1s infinite alternate;animation-delay:1s;}"],i,i,o,i,i,o,i,i,o);t.A=a},59779:function(e,t,n){"use strict";n.d(t,{X:function(){return f}});var r=n(23029),i=n(92901),o=n(56822),a=n(53954),l=n(85501),c=n(64467),u=n(67881),s=n(96540),m=n(65088);function d(e,t,n){return t=(0,a.A)(t),(0,o.A)(e,p()?Reflect.construct(t,n||[],(0,a.A)(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var g=function(e){function t(){var e;(0,r.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=d(this,t,[].concat(i)),(0,c.A)(e,"state",{hasError:!1,eventId:null}),e}
1return(0,l.A)(t,e),(0,i.A)(t,[{key:"componentDidCatch",value:function(e,t){var n=this;m.v4(function(r){r.setExtras(t);var i=m.Cp(e);n.setState({eventId:i})})}},{key:"render",value:function(){return this.state.hasError?s.createElement(y,null,s.createElement(h,{style:{maxWidth:"400px"}},s.createElement(v,null,"Application Error"),s.createElement(w,null,"There was unexpected error rendering this component. Please try refreshing the page.")),this.state.eventId&&s.createElement(b,null,"Error Code: ",s.createElement(E,null,this.state.eventId.substr(0,6).toLowerCase()))):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}])}(s.Component);function f(e){var t;return t=function(t){function n(){return(0,r.A)(this,n),d(this,n,arguments)}return(0,l.A)(n,t),(0,i.A)(n,[{key:"render",value:function(){return s.createElement(g,null,s.createElement(e,this.props))}}])}(s.Component),(0,c.A)(t,"displayName","withErrorBoundary(".concat(e.displayName,")")),t}t.A=g;var y=(0,u.Ay)("div")({position:"relative",zIndex:"50",marginTop:"2.5rem",marginBottom:"2.5rem",display:"flex",height:"100%",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center"}),h=(0,u.Ay)("div")({borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))",padding:"2rem","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-sha
1dow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),v=(0,u.Ay)("h3")({fontSize:"1.875rem",fontWeight:"500",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),w=(0,u.Ay)("p")({marginTop:"1rem",fontSize:"1.25rem",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),b=(0,u.Ay)("p")({marginTop:"1rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),E=(0,u.Ay)("span").withConfig({componentId:"sc-1n72qko-0"})({fontWeight:"500",letterSpacing:"0.05em","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity, 1))"})},50064:function(e,t,n){"use strict";var r=n(67881),i=n(96540);t.A=function(e){var t=e.children;return i.createElement(o,null,t)};var o=(0,r.Ay)("div").withConfig({componentId:"sc-1m7aarq-0"})({position:"relative",height:"calc(100vh - 8rem)",overflowY:"auto","@media (min-width: 768px)":{height:"calc(100vh - 9rem)"}})},81306:function(e,t,n){"use strict";var r=n(67881);t.A=(0,r.DU)(["body{",";}"],{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity, 1))"})},74967:function(e,t,n){"use strict";var r=n(10467),i=n(80296),o=n(67881),a=n(54756),l=n.n(a),c=n(96540),u=n(39023),s=n(52594),m=n(64263),d=n(25381),p=n(764),g=n(31351),f=n(54890),y=n(54641),h=n(87937),v=n(46239),w=n(91319),b=n(20982),E=n(66188),x=n(14740),A={plan:"",firstName:"",lastName:"",dob:"",gender:"",memberId:"",planId:""},S=(0,d.Ik)().shape({plan:(0,d.Yj)().required(),firstName:(0,d.Yj)().required(),lastName:(0,d.Yj)().required(),dob:(0,d.Yj)().matches(p.mm,"The DOB provided appears to be invalid.").required(),gender:(0,d.Yj)().required(),memberId:(0,d.Yj)(),planId:(0,d.Yj)()}),k=function(e){var t=e.field,n=e.value,r=e.unknown;return c.createElement(I,null,c.createElement(R,null,t),c.createElement(P,null,t===y.bD?c.createElement(T,null,c.createElement(h.To,{value:!!n,unknown:r})):c.createElement(y.fz,{value:n,unknown:r})))},C=function(e){var t=e.audit,n=e.clearAudit;return c.createElement("div",null,t.requestError?c.createElement(O,{type:"error"},c.createElement(D,null,"An error occurred:")," ",c.createElement("span",null,t.requestError)):null,c.createElement(N,null,c.createElement(j,{size:"lg",onClick:n,icon:E.yYc})),c.createElement(L,null,c.createElement(z,null,c.createElement(B,null,c.createElement(W,null,"Field"),c.createElement(F,null,"Value")),c.createElement(k,{field:"First Name",value:t.firstName}),c.createElement(k,{field:"Last Name",value:t.lastName}),c.createElement(k,{field:"DOB",value:t.dob}),c.createElement(k,{field:"Gender",value:t.gender}),c.createElement(k,{field:"Urgent Care",value:t.urgentCare,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Primary Care",value:t.primaryCare,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Dietitian",value:t.dietitian,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Mental Health",value:t.mentalHealth,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Pain Management",value:t.painManagement,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Endocrinology",value:t.endocrinology,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Cardiology",value:t.cardiology,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Dermatology",value:t.dermatology,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Specialty Injections",value:t.specialtyInjections,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Physical Therapy",value:t.physicalTherapy,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Gastroenterology",value:t.gastroenterology,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Urology",value:t.urology,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Allergy",value:t.allergy,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Sleep Medicine",value:t.sleepMedicine,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Podiatry",value:t.podiatry,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Rheumatology",value:t.rheumatology,unknown:(0,h.DU)(t)}),c.createElement(k,{field:y.bD,value:t.easySwitch,unknown:(0,h.DU)(t)}),c.createElement(k,{field:"Insurance Provider",value:t.insuranceProvider}),c.createElement(k,{field:"Insurance Details",value:t.insuranceDetails}),c.createElement(k,{field:"Network",value:t.network}),c.createElement(k,{field:"Network Details",value:t.networkDetails}),c.createElement(k,{field:"Medical Group",value:"HMO"===t.network?t.medicalGroup:""}),c.createElement(k,{field:"PCP",value:"HMO"===t.network?t.pcp:""}),c.createElement(k,{field:"Member ID",value:t.memberId}),c.createElement(k,{field:"Request Error",value:t.requestError}),c.createElement(k,{field:"Request Error Code",value:t.requestErrorCode}))))};t.A=(0,m.AC)()(function(){var e=(0,c.useState)(""),t=(0,i.A)(e,2),n=t[0],o=t[1],a=(0,c.useState)("error"),m=(0,i.A)(a,2),d=m[0],p=m[1],y=(0,c.useState)(null),h=(0,i.A)(y,2),b=h[0],E=h[1],k=(0,c.useState)([]),I=(0,i.A)(k,2),R=I[0],P=I[1],T=(0,c.useState)([]),O=(0,i.A)(T,2),D=O[0],N=O[1],j=[{value:"M",label:"Male"},{value:"F",label:"Female"}],L=(0,x.O$)(function(e){return e.user.employee}),z=function(){var e=(0,r.A)(l().mark(function e(){var t,n;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,(0,f.A)();case 1:t=e.sent,P(t),N(t.filter(function(e){return e.epicPayorId}).map(function(e){return{label:e.name,value:e._id||""}})),e.next=3;break;case 2:e.prev=2,n=e.catch(0),o(n);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}();(0,c.useEffect)(function(){z()},[]);var B=function(){var e=(0,r.A)(l().mark(function e(t){var n,r,i,a,c,u,s,m,d,p;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.firstName,r=t.lastName,i=t.memberId,a=t.dob,c=t.gender,u=t.plan,s=t.planId,m="".concat(null==L?void 0:L.firstName," ").concat(null==L?void 0:L.lastName),e.prev=1,e.next=2,(0,g.A)({firstName:n,lastName:r,memberId:i,dob:a,gender:c,plan:u,planId:s,processedBy:m});case 2:d=e.sent,E(d),e.next=4;break;case 3:e.prev=3,p=e.catch(1),E(null),o((0,w.getErrorFromResponse)(p));case 4:case"end":return e.stop()}},e,null,[[1,3]])}
1));return function(t){return e.apply(this,arguments)}}();return c.createElement(c.Fragment,null,c.createElement($,null,"Check Eligibility and In-Network Status"),c.createElement(H,null,"*This tool will not work for all health plans. If needed, try using the ",c.createElement(_,{href:"https://perlmanclinic.com/insurancechecker/",target:"_blank",rel:"noreferrer"},"insurance checker"),", another eligibility tool, or call billing. Also, if you think the response is incorrect (i.e. showing a patient out-of-network who is in-network), please contact billing to double check."),n?c.createElement(V,{type:d},"error"===d?c.createElement(M,null,"An error occurred: "):null,c.createElement("span",null,n)):null,b?c.createElement(C,{audit:b,clearAudit:function(){E(null)}}):c.createElement("div",null,c.createElement(u.l1,{onSubmit:function(e){o(""),p("error"),E(null),B(e)},validateOnChange:!1,validateOnBlur:!1,initialValues:A,validationSchema:S},function(e){var t=e.isSubmitting,n=e.setFieldValue,r=e.values;return c.createElement(u.lV,null,c.createElement(q,null,c.createElement(U,null,c.createElement(s.pd.Formik,{name:"firstName",label:"Patient First Name",disabled:t})),c.createElement(Y,null,c.createElement(s.pd.Formik,{name:"lastName",label:"Patient Last Name",disabled:t}))),c.createElement(G,null,c.createElement(J,null,c.createElement(K,null,"Gender"),c.createElement(v.A,{isClearable:!0,options:j,placeholder:c.createElement("span",null),value:j.find(function(e){return e.value===r.gender}),onChange:function(e){n("gender",e.value)}})),c.createElement(X,null,c.createElement(s.ar,{name:"dob",label:"Date of Birth"},c.createElement(s.J3.Formik,{name:"dob",disabled:t})))),c.createElement(Z,null,c.createElement(Q,null,c.createElement(ee,null,"Insurance"),c.createElement(v.A,{maxMenuHeight:150,isClearable:!0,options:D,placeholder:c.createElement("span",null),value:D.find(function(e){return e.value===r.plan}),onChange:function(e){n("plan",e.label),n("planId",e.value),function(e){if(!R.find(function(t){return t.name===e&&t.tradingPartnerServiceId}))return o("This tool does not work with ".concat(e,". Please use the insurance checker, another eligibility tool, or contact billing to verify.")),void p("warning");o(""),p("error")}(e.label)}})),c.createElement(te,null,c.createElement(s.pd.Formik,{name:"memberId",label:"Member Id",disabled:t,placeholder:"As spelled on card (i.e. include dashes, etc)"}))),c.createElement(ne,null,c.createElement(re,{type:"submit",disabled:t||"warning"===d},t?c.createElement(s.y$,{size:"small",white:!0}):"Run")))})))});var I=(0,o.Ay)("div")({position:"relative",display:"flex",alignItems:"center",borderBottomWidth:"1px",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.75rem",paddingBottom:"0.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"75ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}}),R=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),P=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),T=(0,o.Ay)("div")({float:"left"}),O=(0,o.Ay)(s.IC)({marginTop:"1rem"}),D=(0,o.Ay)("strong")({fontWeight:"500"}),N=(0,o.Ay)("div")({display:"flex",alignContent:"flex-end",justifyContent:"flex-end"}),j=(0,o.Ay)(b.g)({marginLeft:"0.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))","&:hover":{cursor:"pointer"}}),L=(0,o.Ay)("div")({display:"flex",width:"100%",alignContent:"center",justifyContent:"center"}),z=(0,o.Ay)("div")({width:"100%"}),B=(0,o.Ay)("div")({display:"flex",flexDirection:"row",alignItems:"flex-end",borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity, 1))",paddingBottom:"0.5rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),W=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),F=(0,o.Ay)("div")({marginRight:"0.5rem",width:"50%",flex:"none"}),$=(0,o.Ay)("h2")({marginBottom:"0.5rem",fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),H=(0,o.Ay)("p")({marginBottom:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),_=(0,o.Ay)("a")({"&:hover":{textDecorationLine:"underline"}}),V=(0,o.Ay)(s.IC)({marginTop:"1rem"}),M=(0,o.Ay)("strong")({fontWeight:"500"}),q=(0,o.Ay)("div")({marginTop:"1rem",display:"flex"}),U=(0,o.Ay)("div")({flex:"1 1 0%"}),Y=(0,o.Ay)("div")({marginLeft:"1rem",flex:"1 1 0%"}),G=(0,o.Ay)("div")({marginTop:"1rem",display:"flex"}),J=(0,o.Ay)("div")({flex:"1 1 0%"}),K=(0,o.Ay)("label")({fontSize:"0.875rem",fontWeight:"500",textTransform:"uppercase",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),X=(0,o.Ay)("div")({marginLeft:"1rem",flex:"1 1 0%"}),Z=(0,o.Ay)("div")({marginTop:"1rem",display:"flex"}),Q=(0,o.Ay)("div")({flex:"1 1 0%"}),ee=(0,o.Ay)("label")({fontSize:"0.875rem",fontWeight:"500",textTransform:"uppercase",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),te=(0,o.Ay)("div")({marginLeft:"1rem",flex:"1 1 0%"}),ne=(0,o.Ay)("div")({marginBottom:"12rem",marginTop:"1rem",display:"flex",justifyContent:"flex-end"}),re=(0,o.Ay)(m.$n).withConfig({componentId:"sc-ruvnqo-0"})({display:"flex",height:"2.5rem",width:"8rem",alignItems:"center",justifyContent:"center"})},46321:function(e,t,n){"use strict";n.d(t,{A:function(){return w}});var r=n(58168),i=n(64467),o=n(80296),a=n(80045),l=n(67881),c=n(96540),u=n(52594),s=["visible","onDismissed","children","withContainer"],m=function(e){var t=e.visible,n=e.onDismissed,i=e.children,o=e.withContainer,l=void 0===o||o,m=(0,a.A)(e,s);return c.createElement(u.zW,(0,r.A)({timeout:150,in:t,onExit:function(){return n&&n()}},m),l?c.createElement(d,{style:{background:"rgba(255, 255, 255, 0.8)",zIndex:9999}},i):i)},d=(0,l.Ay)("div").withConfig({componentId:"sc-2yqo4j-0"})({position:"fixed",left:"0",top:"0",display:"flex",height:"100vh",width:"100%",alignItems:"center",justifyContent:"center"}),p=["visible","children","fullscreen","dismissable","closeOnBackgroun
1d","onBeforeDismiss","style"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var y=l.Ay.div.withConfig({componentId:"sc-1c9km0g-0"})(["",";top:1.5rem;& > svg{",";}&:hover > svg{",";transform:rotate(90deg);}"],{position:"absolute",right:"0",cursor:"pointer",padding:"0.5rem"},{height:"1.5rem",width:"1.5rem","--tw-text-opacity":"1",color:"rgb(209 213 219 / var(--tw-text-opacity, 1))",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},{"--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity, 1))"}),h=l.Ay.div.withConfig({componentId:"sc-1c9km0g-1"})(["",";max-height:calc(100vh - 0.5rem);@media (min-width:","){height:auto;max-height:calc(100vh - 8rem);}& .modal-element--children{",";}"],{marginTop:"0.25rem",marginBottom:"0.25rem",overflowY:"auto",overflowX:"hidden",borderRadius:"0.5rem",borderTopWidth:"8px","--tw-border-opacity":"1",borderColor:"rgb(51 170 133 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity, 1))","--tw-shadow":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","--tw-shadow-colored":"0 20px 25px -5px var(--tw-sha
1dow-color), 0 10px 10px -5px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{marginTop:"4rem"}},function(e){return e.theme.breakpoints.sm},{marginTop:"2rem",padding:"2rem","@media (min-width: 640px)":{marginTop:"0"}}),v=l.Ay.div.withConfig({componentId:"sc-1c9km0g-2"})(["",";background:rgba(6%,9%,16%,0.75);z-index:9999;& > div{",";",";}"],{position:"fixed",left:"0",top:"0",display:"flex",height:"100vh",width:"100%",justifyContent:"center"},{position:"relative",marginLeft:"0.25rem",marginRight:"0.25rem",width:"100%","@media (min-width: 768px)":{marginLeft:"auto",marginRight:"auto",width:"75%"},"@media (min-width: 1024px)":{width:"50%"}},function(e){return e.fullscreen&&{"@media (min-width: 768px)":{width:"75%"},"@media (min-width: 1024px)":{width:"75%"}}}),w=function(e){var t=e.visible,n=e.children,i=e.fullscreen,l=e.dismissable,u=void 0===l||l,s=e.closeOnBackground,d=void 0===s||s,g=e.onBeforeDismiss,w=e.style,b=(0,a.A)(e,p),E=(0,c.useState)(t),x=(0,o.A)(E,2),A=x[0],S=x[1];(0,c.useEffect)(function(){return S(t)},[t]);var k=function(){!u||g&&!g()||S(!1)};return c.createElement(m,(0,r.A)({visible:A,withContainer:!1},b),c.createElement(v,{fullscreen:i,onClick:function(){return d&&k()}},c.createElement("div",null,u&&c.createElement(y,{onClick:k},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}))),c.createElement(h,{onClick:function(e){return e.stopPropagation()},style:f({},w)},c.createElement("div",{className:"modal-element--children"},n)))))}},23279:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var r=n(67881),i=n(66188),o=n(20982),a=n(96540),l=function(e){var t=e.name,n=e.dob,r=e.age,o=e.gender,l=e.onClick,d=function(e,t,n){var r=e.format("{iso-month}/{date}/{year}"),i=void 0!==t?" (".concat(t," ").concat(1===t?"year":"years",")"):"",o=void 0!==n?" - ".concat(n):"";return"DOB: ".concat(r)+i+o}(n,r,o);return a.createElement("div",null,a.createElement(c,{type:"button",onClick:l},a.createElement("div",null,a.createElement(u,null,t),a.createElement(s,null,d)),a.createElement(m,{icon:i.XkK})))},c=(0,r.Ay)("button")({display:"flex",width:"100%",flex:"1 1 0%",alignItems:"center",justifyContent:"space-between",borderRadius:"0.5rem",borderWidth:"1px",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity, 1))"}}),u=(0,r.Ay)("p")({textAlign:"left",fontSize:"0.875rem",fontWeight:"500",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),s=(0,r.Ay)("p")({marginTop:"0.125rem",textAlign:"left",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),m=(0,r.Ay)(o.g).withConfig({componentId:"sc-p3izqj-0"})({height:"0.75rem",width:"0.75rem",flexShrink:"0","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"})},46239:function(e,t,n){"use strict";var r=n(58168),i=n(80045),o=n(64467),a=n(96540),l=n(87065),c=["styles","autoScrollToSelected"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){(0,o.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var m={container:function(e){return s(s({},e),{},{fontSize:"1.125rem"})},control:function(e,t){return s(s({},e),{},{borderWidth:"2px",boxShadow:t.isFocused?"0 0 0 3px rgba(15%, 52%, 100%, 0.25)":e.boxShadow,borderColor:t.isFocused?"#4299E1".toString():"#e5e7eb".toString(),"&:hover":{cursor:"pointer",borderColor:"#90CDF4".toString()}})},clearIndicator:function(e){return s(s({},e),{},{color:"#d1d5db".toString(),"&:hover":{color:"#9ca3af".toString()}})},multiValue:function(e){return s(s({},e),{},{borderRadius:5,padding:"0.05rem 0.25rem",backgroundColor:"#f3f4f6".toString()})},multiValueRemove:function(e){return s(s({},e),{},{"&:hover":{backgroundColor:"inherit"}})},valueContainer:function(e){return s(s({},e),{},{padding:"0.25rem 0.75rem"})}};t.A=function(e){var t=e.styles,n=e.autoScrollToSelected,o=(0,i.A)(e,c),u=n?{className:"MyDropdown",classNamePrefix:"MyDropdown",onMenuOpen:function(){setTimeout(function(){var e=document.getElementsByClassName("MyDropdown__option--is-selected")[0];e&&e.scrollIntoView({block:"start",inline:"start"})},15)},menuPosition:"fixed"}:{};return a.createElement(l.Ay,(0,r.A)({styles:s(s({},m),t)},o,u))}},93028:function(e,t,n){"use strict";var r=n(67881),i=n(96540),o=n(52594);t.A=function(e){var t=e.children,n=e.size;return i.createElement(i.Suspense,{fallback:i.createElement(a,null,i.createElement(o.y$,{size:n}))},t)};var a=(0,r.Ay)("div").withConfig({componentId:"sc-1br4ti4-0"})({display:"flex",width:"100%",alignItems:"center",justifyContent:"center",padding:"2.5rem"})},97101:function(e,t,n){"use strict";var r,i,o=n(58168),a=n(80045),l=n(57528),c=n(67881),u=n(96540),s=["content"],m=(0,u.lazy)(function(){return n.e(3871).then(n.bind(n,8587))}),d=c.Ay.div(r||(r=(0,l.A)(["\n  ",";\n\n  &, &::before {\n    z-index: -2;\n    ",";\n    background: inherit;\n  }\n\n  &::before {\n    ",";\n    content: '';\n    transform: rotate(45deg);\n  }\n"])),{visibility:"hidden"},{position:"absolute",height:"1rem",width:"1rem"},{visibility:"visible"}),p=c.Ay.div(i||(i=(0,l.A)(['\n  &[data-placement^="top"] > ',' {\n    bottom: -2px;\n  }\n\n  &[data-placement^="bottom"] > ',' {\n    top: -2px;\n  }\n\n  &[data-placement^="left"] > ',' {\n    right: -2px;\n    top: 6px;\n  }\n\n  &[data-placement^="right"] > ',' {\n    left: -2px;\n    top: 6px;\n  }\n\n  &[data-placement$="end"] > ',' {\n    right: 6px;\n  }\n\n  &[data-placement="top"], &[data-placement="bottom"] {\n    & > '," {\n      ",';\n    }\n  }\n\n  &[data-placement="left"], &[data-placement="right"] {\n    & > '," {\n      ",";\n    }\n  }\n"])),d,d,d,d,d,d,{left:"0",right:"0",marginLeft:"auto",marginRight:"auto"},d,{bottom:"0",top:"0",marginTop:"auto",marginBottom:"auto"}),g=(0,c.Ay)(p).withConfig({componentId:"sc-x893oa-0"})({maxWidth:"36rem",borderRadius:"0.25rem","--tw-bg-opacity":"1",backgroundColor:"rgb(31 41 55 / var(--tw-bg-opacity, 1))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(243 244 246 / var(--tw-text-opacity, 1))",opacity:"0.75"});t.A=function(e){var t=e.content,n=(0,a.A)(e,s);return t?u.createElement(u.Suspense,{fallback:u.createElement(u.Fragment,null,n.children)},u.createElement(m,(0,o.A)({render:function(e){return u.createElement(g,(0,o.A)({role:"tooltip",tabIndex:-1},e),t,u.createElement(d,null))}},n))):u.createElement(u.Fragment,null,n.children)}},23178:function(e,t,n){"use strict";var r=n(67881),i=n(96540),o=n(52594),a=n(33876);t.A=function(e){var t=e.submit,n=e.isSubmitting,r=e.values;return i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement(o.JU,{htmlFor:"messagePreview",uppercase:!0},"Body"),i.createElement(l,{name:"messagePreview",value:function(e){return e.body?"Hi ".concat(e.firstName,",\n\n").concat(e.body):""}(r),readOnly:!0})),i.createElement(c,null,i.createElement(u,{type:"button",disabled:n,onClick:t},n?i.createElement(s,{size:"small",white:!0}):"Send Message")))};var l=(0,r.Ay)(o.pd.Textarea)({height:"16rem !important",width:"100%",flexGrow:"1",resize:"vertical","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}),c=(0,r.Ay)("div")({marginTop:"1rem",display:"flex",flexWrap:"wrap",alignItems:"center","@media (min-width: 768px)":{flexWrap:"nowrap"}}),u=(0,r.Ay)(a.$)({width:"100%","@media (min-width: 768px)":{flex:"1 1 0%"}}),s=(0,r.Ay)(o.y$).withConfig({componentId:"sc-15pe35c-0"})({marginLeft:"auto",marginRight:"auto"})},54121:function(e,t,n){"use strict";var r=n(96540);t.A=function(e){var t=e.providers;if(t.length>0){var n=t.map(function(e){return r.createElement("option",{key:e.id,value:e.name},e.lastName,", ",e.firstName,", ",e.providerTitle)});return r.createElement(r.Fragment,null,n)}return r.createElement("option",{disabled:!0},"Loading...")}},82657:function(e,t,n){"use strict";var r=n(67881),i=n(96540),o=n(97101),a=n(66188),l=n(20982),c=n(764);t.A=function(e){var t=e.headerText,n=e.content;return i.createElement(u,null,i.createElement(s,null,t||"Templated Messaging"),i.createElement(o.A,{content:n||i.createElement(i.Fragment,null,i.createElement("div",null,"Templated messages are direct emails and/or texts to a patient."),i.createElement("div",null,"Any template suggestions? Reach out to ",c.OF,"."))},i.createElement(m,null,i.createElement(l.g,{icon:a.iW_}))))};var u=(0,r.Ay)("div")({display:"flex"}),s=(0,r.Ay)("h4")({marginRight:"0.25rem"}),m=(0,r.Ay)("span").withConfig({componentId:"sc-1321vkj-0"})({marginTop:"auto",marginBottom:"auto"})},78125:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(39023),c=n(15031),u=n(54121),s=n(82657),m=n(23178),d=n(76194),p=n(20227),g=n(8076),f=function(e){return e.Rx="Rx",e.Labs="Labs",e}(f||{}),y=function(e,t){return(p.h.VideoVisit,"https://endocrinology.perlmanclinic.com/schedule")+"".concat(e?"/provider/".concat((0,g.L)(e.firstName,e.lastName)):"")};t.A=function(){var e=(0,l.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,p=e.submitForm,g=(0,o.useState)(0),T=(0,r.A)(g,2),O=T[0],D=T[1],N=(0,o.useState)(""),j=(0,r.A)(N,2),L=j[0],z=j[1],B=(0,o.useState)(""),W=(0,r.A)(B,2),F=W[0],$=(W[1],(0,o.useState)(void 0)),H=(0,r.A)($,2),_=H[0],V=(H[1],(0,o.useState)("")),M=(0,r.A)(V,2),q=M[0],U=M[1],Y=(0,o.useState)(""),G=(0,r.A)(Y,2),J=G[0],K=G[1],X=(0,c.A)(),Z=X.data,Q=X.mutate;(0,o.useEffect)(function(){null!=Z&&Z.providers||Q()},[]);var ee=((null==Z?void 0:Z.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),te=function(){var e=null==ee?void 0:ee.find(function(e){return e.name===q}),t=y(e,_),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(O,L),r=function(e){switch(e){case"":return"";
1case f.Labs:return" to discuss lab results";case f.Rx:return" to discuss prescriptions";default:return""}}(F);return"".concat(q||"PROVIDER"," is requesting ").concat("a follow up visit").concat(n).concat(r,". Please schedule ").concat("a PocketDoc appointment"," with ").concat(q||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at 858-250-0286.\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){q&&K("")},[q]),(0,o.useEffect)(function(){n("body",te())},[q,L,O,F,_]);var ne=function(){return o.createElement(h,null,"*")};return o.createElement(o.Fragment,null,o.createElement(s.A,null),o.createElement(v,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(w,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(b,null,o.createElement(E,null,o.createElement(x,null,o.createElement(A,null,"Provider",o.createElement(ne,null),":"),o.createElement(S,{value:q,onChange:function(e){U(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(u.A,{providers:ee})),J&&o.createElement(k,null,J)),!1,o.createElement(C,null,o.createElement(I,null,"When:"),o.createElement(R,{value:O,onChange:function(e){D(e.target.value)}}),o.createElement(P,{value:L,onChange:function(e){z(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months"))),!1))),o.createElement(m.A,{submit:function(){q?p():K("A selected provider is required.")},isSubmitting:i,values:t}))};var h=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),v=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),w=(0,i.Ay)("div")({marginBottom:"1rem"}),b=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),E=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),x=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),A=(0,i.Ay)("label")({marginRight:"0.5rem"}),S=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),k=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),C=((0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),(0,i.Ay)("label")({marginRight:"0.5rem"}),(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"}),(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"})),I=(0,i.Ay)("label")({marginRight:"0.5rem"}),R=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),P=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"});(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),(0,i.Ay)("label")({marginRight:"0.5rem"})},3921:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(39023),c=n(15031),u=n(54121),s=n(82657),m=n(23178),d=n(76194),p=n(8076),g=n(74096),f=n(14740),y=function(e){return"https://gastro.perlmanclinic.com/schedule"+"".concat(e?"/provider/".concat((0,p.L)(e.firstName,e.lastName)):"")};t.A=function(){var e=(0,l.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,p=e.submitForm,T=(0,o.useState)(0),O=(0,r.A)(T,2),D=O[0],N=O[1],j=(0,o.useState)(""),L=(0,r.A)(j,2),z=L[0],B=L[1],W=(0,o.useState)(""),F=(0,r.A)(W,2),$=F[0],H=F[1],_=(0,o.useState)(""),V=(0,r.A)(_,2),M=V[0],q=V[1],U=(0,c.A)(),Y=U.data,G=U.mutate,J=(0,f.O$)(function(e){return e.user.serviceArea}),K=(0,d.mT)(J),X=(0,g.formatPhone)(K);(0,o.useEffect)(function(){null!=Y&&Y.providers||G()},[]);var Z=((null==Y?void 0:Y.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),Q=function(){var e=null==Z?void 0:Z.find(function(e){return e.name===$}),t=y(e),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(D,z);return"".concat($||"PROVIDER"," is requesting ").concat("a follow up visit").concat(n,". Please schedule ").concat("a PocketDoc appointment"," with ").concat($||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at ").concat(X,".\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){$&&q("")},[$]),(0,o.useEffect)(function(){n("body",Q())},[$,z,D]);var ee=function(){return o.createElement(h,null,"*")};return o.createElement(o.Fragment,null,o.createElement(s.A,null),o.createElement(v,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(w,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(b,null,o.createElement(E,null,o.createElement(x,null,o.createElement(A,null,"Provider",o.createElement(ee,null),":"),o.createElement(S,{value:$,onChange:function(e){H(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(u.A,{providers:Z})),M&&o.createElement(k,null,M)),o.createElement(C,null,o.createElement(I,null,"When:"),o.createElement(R,{value:D,onChange:function(e){N(e.target.value)}}),o.createElement(P,{value:z,onChange:function(e){B(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months")))))),o.createElement(m.A,{submit:function(){$?p():q("A selected provider is required.")},isSubmitting:i,values:t}))};var h=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),v=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),w=(0,i.Ay)("div")({marginBottom:"1rem"}),b=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),E=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),x=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),A=(0,i.Ay)("label")({marginRight:"0.5rem"}),S=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),k=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),C=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),I=(0,i.Ay)("label")({marginRight:"0.5rem"}),R=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),P=(0,i.Ay)("select").withConfig({componentId:"sc-kcfqiu-0"})({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"})},7177:function(e,t,n){"use strict";n.d(t,{CV:function(){return v},VN:function(){return h},j8:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(33876),c=n(39023),u=n(15031),s=n(54121),m=n(82657),d=n(76194),p=n(20227),g=n(8076),f=function(e){return e.Rx="Rx",e.Labs="Labs",e}(f||{}),y=function(){return"https://schedule.perlmanclinic.com/schedule?is_pocketdoc=false&patient_age=adult&new_patient=false&existing_patient_visit_type=ma-visit"},h=function(e,t){var n=t===p.h.VideoVisit,r="https://schedule.perlmanclinic.com/schedule"+"".concat(e?"/provider/".concat((0,g.L)(e.firstName,e.lastName)):"");return void 0!==t&&(r+="?is_pocketdoc=".concat(n)),r},v=function(e){switch(e){case p.h.OfficeVisit:return"a follow up in-office visit";case p.h.VideoVisit:return"a follow up video visit";default:return"a follow up visit"}};t.Ay=function(){var e=(0,c.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,l=e.submitForm,g=(0,o.useState)(0),y=(0,r.A)(g,2),_=y[0],V=y[1],M=(0,o.useState)(""),q=(0,r.A)(M,2),U=q[0],Y=q[1],G=(0,o.useState)(""),J=(0,r.A)(G,2),K=J[0],X=J[1],Z=(0,o.useState)(void 0),Q=(0,r.A)(Z,2),ee=Q[0],te=Q[1],ne=(0,o.useState)(""),re=(0,r.A)(ne,2),ie=re[0],oe=re[1],ae=(0,o.useState)(""),le=(0,r.A)(ae,2),ce=le[0],ue=le[1],se=(0,u.A)(),me=se.data,de=se.mutate;(0,o.useEffect)(function(){null!=me&&me.providers||de()},[]);var pe=((null==me?void 0:me.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),ge=function(){var e=null==pe?void 0:pe.find(function(e){return e.name===ie}),t=h(e,ee),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(_,U),r=function(e){switch(e){case"":return"";case f.Labs:return" to discuss lab results";case f.Rx:return" to discuss prescriptions";default:return""}}(K),i=function(e){switch(e){case p.h.OfficeVisit:return"an office visit";case p.h.VideoVisit:return"a PocketDoc appointment";default:return"an appointment"}}(ee),o=v(ee);return"".concat(ie||"PROVIDER"," is requesting ").concat(o).concat(n).concat(r,". Please schedule ").concat(i," with ").concat(ie||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at 858-554-1212.\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){ie&&ue("")},[ie]),(0,o.useEffect)(function(){n("body",ge())},[ie,U,_,K,ee]);var fe=function(){return o.createElement(w,null,"*")};return o.createElement(o.Fragment,null,o.createElement(m.A,null),o.createElement(b,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(E,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(x,null,o.createElement(A,null,o.createElement(S,null,o.createElement(k,null,"Provider",o.createElement(fe,null),":"),o.createElement(C,{value:ie,onChange:function(e){oe(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(s.A,{providers:pe})),ce&&o.createElement(I,null,ce)),o.createElement(R,null,o.createElement(P,null,"Why:"),o.createElement(T,{value:K,onChange:function(e){X(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"Labs"},"Lab Results"),o.createElement("option",{value:"Rx"},"Rx"))),o.createElement(O,null,o.createElement(D,null,"When:"),o.createElement(N,{value:_,onChange:function(e){V(e.target.value)}}),o.createElement(j,{value:U,onChange:function(e){Y(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months"))),o.createElement(L,null,o.createElement(z,null,"Where:"),o.createElement(B,{value:ee,onChange:function(e){te(e.target.value)}},o.createElement("option",{value:void 0},"n/a"),o.createElement("option",{value:p.h.OfficeVisit},"Office Visit"),o.createElement("option",{value:p.h.VideoVisit},"PocketDoc")))))),o.createElement("div",null,o.createElement(a.JU,{htmlFor:"messagePreview",uppercase:!0},"Body"),o.createElement(W,{name:"messagePreview",value:"Hi ".concat(t.firstName,",\n\n").concat(t.body),readOnly:!0})),o.createElement(F,null,o.createElement($,{type:"button",disabled:i,onClick:function(){ie?l():ue("A selected provider is required.")}},i?o.createElement(H,{size:"small",white:!0}):"Send Message")))};var w=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),b=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),E=(0,i.Ay)("div")({marginBottom:"1rem"}),x=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),A=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),S=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),k=(0,i.Ay)("label")({marginRight:"0.5rem"}),C=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),I=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),R=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),P=(0,i.Ay)("label")({marginRight:"0.5rem"}),T=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"}),O=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),D=(0,i.Ay)("label")({marginRight:"0.5rem"}),N=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),j=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"}),L=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),z=(0,i.Ay)("label")({marginRight:"0.5rem"}),B=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"}),W=(0,i.Ay)(a.pd.Textarea)({height:"16rem !important",width:"100%",flexGrow:"1",resize:"vertical","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))"}),F=(0,i.Ay)("div")({marginTop:"1rem",display:"flex",flexWrap:"wrap",alignItems:"center","@media (min-width: 768px)":{flexWrap:"nowrap"}}),$=(0,i.Ay)(l.$)({width:"100%","@media (min-width: 768px)":{flex:"1 1 0%"}}),H=(0,i.Ay)(a.y$).withConfig({componentId:"sc-onlw9p-0"})({marginLeft:"auto",marginRight:"auto"})},69291:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(39023),c=n(15031),u=n(54121),s=n(82657),m=n(23178),d=n(76194),p=n(20227),g=n(8076),f=function(e){return e.Rx="Rx",e.Labs="Labs",e}(f||{}),y=function(e,t){return(p.h.VideoVisit,"https://mentalhealth.perlmanclinic.com/schedule")+"".concat(e?"/provider/".concat((0,g.L)(e.firstName,e.lastName)):"")};t.A=function(){var e=(0,l.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,p=e.submitForm,g=(0,o.useState)(0),T=(0,r.A)(g,2),O=T[0],D=T[1],N=(0,o.useState)(""),j=(0,r.A)(N,2),L=j[0],z=j[1],B=(0,o.useState)(""),W=(0,r.A)(B,2),F=W[0],$=(W[1],(0,o.useState)(void 0)),H=(0,r.A)($,2),_=H[0],V=(H[1],(0,o.useState)("")),M=(0,r.A)(V,2),q=M[0],U=M[1],Y=(0,o.useState)(""),G=(0,r.A)(Y,2),J=G[0],K=G[1],X=(0,c.A)(),Z=X.data,Q=X.mutate;(0,o.useEffect)(function(){null!=Z&&Z.providers||Q()},[]);var ee=((null==Z?void 0:Z.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),te=function(){var e=null==ee?void 0:ee.find(function(e){return e.name===q}),t=y(e,_),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(O,L),r=function(e){switch(e){case"":return"";case f.Labs:return" to discuss lab results";case f.Rx:return" to discuss prescriptions";default:return""}}(F);return"".concat(q||"PROVIDER"," is requesting ").concat("a follow up visit").concat(n).concat(r,". Please schedule ").concat("a PocketDoc appointment"," with ").concat(q||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at 858-250-0286.\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){q&&K("")},[q]),(0,o.useEffect)(function(){n("body",te())},[q,L,O,F,_]);var ne=function(){return o.createElement(h,null,"*")};return o.createElement(o.Fragment,null,o.createElement(s.A,null),o.createElement(v,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(w,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(b,null,o.createElement(E,null,o.createElement(x,null,o.createElement(A,null,"Provider",o.createElement(ne,null),":"),o.createElement(S,{value:q,onChange:function(e){U(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(u.A,{providers:ee})),J&&o.createElement(k,null,J)),!1,o.createElement(C,null,o.createElement(I,null,"When:"),o.createElement(R,{value:O,onChange:function(e){D(e.target.value)}}),o.createElement(P,{value:L,onChange:function(e){z(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months"))),!1))),o.createElement(m.A,{submit:function(){q?p():K("A selected provider is required.")},isSubmitting:i,values:t}))};var h=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),v=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),w=(0,i.Ay)("div")({marginBottom:"1rem"}),b=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),E=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),x=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),A=(0,i.Ay)("label")({marginRight:"0.5rem"}),S=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),k=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),C=((0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),(0,i.Ay)("label")({marginRight:"0.5rem"}),(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"}),(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"})),I=(0,i.Ay)("label")({marginRight:"0.5rem"}),R=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),P=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"});(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),(0,i.Ay)("label")({marginRight:"0.5rem"})},12337:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(39023),c=n(15031),u=n(54121),s=n(82657),m=n(23178),d=n(76194),p=n(8076),g=n(14740),f=n(74096),y=function(e){return"https://painmanagement.perlmanclinic.com/schedule"+"".concat(e?"/provider/".concat((0,p.L)(e.firstName,e.lastName)):"")};t.A=function(){var e=(0,l.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,p=e.submitForm,T=(0,o.useState)(0),O=(0,r.A)(T,2),D=O[0],N=O[1],j=(0,o.useState)(""),L=(0,r.A)(j,2),z=L[0],B=L[1],W=(0,o.useState)(""),F=(0,r.A)(W,2),$=F[0],H=F[1],_=(0,o.useState)(""),V=(0,r.A)(_,2),M=V[0],q=V[1],U=(0,c.A)(),Y=U.data,G=U.mutate,J=(0,g.O$)(function(e){return e.user.serviceArea}),K=(0,d.mT)(J),X=(0,f.formatPhone)(K);(0,o.useEffect)(function(){null!=Y&&Y.providers||G()},[]);var Z=((null==Y?void 0:Y.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),Q=function(){var e=null==Z?void 0:Z.find(function(e){return e.name===$}),t=y(e),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(D,z);return"".concat($||"PROVIDER"," is requesting ").concat("a follow up visit").concat(n,". Please schedule ").concat("a PocketDoc appointment"," with ").concat($||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at ").concat(X,".\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){$&&q("")},[$]),(0,o.useEffect)(function(){n("body",Q())},[$,z,D]);var ee=function(){return o.createElement(h,null,"*")};return o.createElement(o.Fragment,null,o.createElement(s.A,null),o.createElement(v,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(w,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(b,null,o.createElement(E,null,o.createElement(x,null,o.createElement(A,null,"Provider",o.createElement(ee,null),":"),o.createElement(S,{value:$,onChange:function(e){H(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(u.A,{providers:Z})),M&&o.createElement(k,null,M)),o.createElement(C,null,o.createElement(I,null,"When:"),o.createElement(R,{value:D,onChange:function(e){N(e.target.value)}}),o.createElement(P,{value:z,onChange:function(e){B(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months")))))),o.createElement(m.A,{submit:function(){$?p():q("A selected provider is required.")},isSubmitting:i,values:t}))};var h=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),v=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),w=(0,i.Ay)("div")({marginBottom:"1rem"}),b=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),E=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),x=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),A=(0,i.Ay)("label")({marginRight:"0.5rem"}),S=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),k=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),C=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),I=(0,i.Ay)("label")({marginRight:"0.5rem"}),R=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),P=(0,i.Ay)("select").withConfig({componentId:"sc-5hj55-0"})({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"})},7161:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(39023),c=n(15031),u=n(54121),s=n(82657),m=n(23178),d=n(76194),p=n(8076),g=n(74096),f=n(14740),y=function(e){return"https://physical-therapy.perlmanclinic.com/schedule"+"".concat(e?"/provider/".concat((0,p.L)(e.firstName,e.lastName)):"")};t.A=function(){var e=(0,l.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,p=e.submitForm,T=(0,o.useState)(0),O=(0,r.A)(T,2),D=O[0],N=O[1],j=(0,o.useState)(""),L=(0,r.A)(j,2),z=L[0],B=L[1],W=(0,o.useState)(""),F=(0,r.A)(W,2),$=F[0],H=F[1],_=(0,o.useState)(""),V=(0,r.A)(_,2),M=V[0],q=V[1],U=(0,c.A)(),Y=U.data,G=U.mutate,J=(0,f.O$)(function(e){return e.user.serviceArea}),K=(0,d.mT)(J),X=(0,g.formatPhone)(K);(0,o.useEffect)(function(){null!=Y&&Y.providers||G()},[]);var Z=((null==Y?void 0:Y.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),Q=function(){var e=null==Z?void 0:Z.find(function(e){return e.name===$}),t=y(e),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(D,z);return"".concat($||"PROVIDER"," is requesting ").concat("a follow up visit").concat(n,". Please schedule ").concat("a PocketDoc appointment"," with ").concat($||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at ").concat(X,".\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){$&&q("")},[$]),(0,o.useEffect)(function(){n("body",Q())},[$,z,D]);var ee=function(){return o.createElement(h,null,"*")};return o.createElement(o.Fragment,null,o.createElement(s.A,null),o.createElement(v,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(w,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(b,null,o.createElement(E,null,o.createElement(x,null,o.createElement(A,null,"Provider",o.createElement(ee,null),":"),o.createElement(S,{value:$,onChange:function(e){H(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(u.A,{providers:Z})),M&&o.createElement(k,null,M)),o.createElement(C,null,o.createElement(I,null,"When:"),o.createElement(R,{value:D,onChange:function(e){N(e.target.value)}}),o.createElement(P,{value:z,onChange:function(e){B(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months")))))),o.createElement(m.A,{submit:function(){$?p():q("A selected provider is required.")},isSubmitting:i,values:t}))};var h=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),v=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),w=(0,i.Ay)("div")({marginBottom:"1rem"}),b=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),E=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),x=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),A=(0,i.Ay)("label")({marginRight:"0.5rem"}),S=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),k=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),C=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),I=(0,i.Ay)("label")({marginRight:"0.5rem"}),R=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),P=(0,i.Ay)("select").withConfig({componentId:"sc-cfjlps-0"})({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"})},20227:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var r=function(e){return e.OfficeVisit="OV",e.VideoVisit="PocketDoc",e.MAVisit="MAVisit",e}({})},17607:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var r=n(80296),i=n(67881),o=n(96540),a=n(52594),l=n(39023),c=n(15031),u=n(54121),s=n(82657),m=n(23178),d=n(76194),p=n(20227),g=n(8076),f=function(e){return e.Rx="Rx",e.Labs="Labs",e}(f||{}),y=function(e,t){return(p.h.VideoVisit,"https://wellness.perlmanclinic.com/schedule")+"".concat(e?"/provider/".concat((0,g.L)(e.firstName,e.lastName)):"")};t.A=function(){var e=(0,l.j7)(),t=e.values,n=e.setFieldValue,i=e.isSubmitting,p=e.submitForm,g=(0,o.useState)(0),T=(0,r.A)(g,2),O=T[0],D=T[1],N=(0,o.useState)(""),j=(0,r.A)(N,2),L=j[0],z=j[1],B=(0,o.useState)(""),W=(0,r.A)(B,2),F=W[0],$=(W[1],(0,o.useState)(void 0)),H=(0,r.A)($,2),_=H[0],V=(H[1],(0,o.useState)("")),M=(0,r.A)(V,2),q=M[0],U=M[1],Y=(0,o.useState)(""),G=(0,r.A)(Y,2),J=G[0],K=G[1],X=(0,c.A)(),Z=X.data,Q=X.mutate;(0,o.useEffect)(function(){null!=Z&&Z.providers||Q()},[]);var ee=((null==Z?void 0:Z.providers)||[]).sort(function(e,t){return e.lastName>t.lastName?1:-1}),te=function(){var e=null==ee?void 0:ee.find(function(e){return e.name===q}),t=y(e,_),n=function(e,t){var n,r="";if((e=Number(e))>0&&t){n=1===e?t.slice(0,-1):t;var i=(0,d.Wk)(e,t);r=" in ".concat(e," ").concat(n," (around ").concat(i,")")}else 0===e&&""!==r&&(r="");return r}(O,L),r=function(e){switch(e){case"":return"";case f.Labs:return" to discuss lab results";case f.Rx:return" to discuss prescriptions";default:return""}}(F);return"".concat(q||"PROVIDER"," is requesting ").concat("a follow up visit").concat(n).concat(r,". Please schedule ").concat("a PocketDoc appointment"," with ").concat(e||"PROVIDER"," through our web scheduler (").concat(t,") or by giving us a call at 858-250-0286.\n\nBest,\nPerlman Clinic")};(0,o.useEffect)(function(){q&&K("")},[q]),(0,o.useEffect)(function(){n("body",te())},[q,L,O,F,_]);var ne=function(){return o.createElement(h,null,"*")};return o.createElement(o.Fragment,null,o.createElement(s.A,null),o.createElement(v,null,o.createElement(a.pd.Formik,{label:"Subject",name:"subject",disabled:!0})),o.createElement(w,null,o.createElement(a.JU,{uppercase:!0},"Options"),o.createElement(b,null,o.createElement(E,null,o.createElement(x,null,o.createElement(A,null,"Provider",o.createElement(ne,null),":"),o.createElement(S,{value:q,onChange:function(e){U(e.target.value)}},o.createElement("option",{value:"",disabled:!0},"Required"),o.createElement(u.A,{providers:ee})),J&&o.createElement(k,null,J)),!1,o.createElement(C,null,o.createElement(I,null,"When:"),o.createElement(R,{value:O,onChange:function(e){D(e.target.value)}}),o.createElement(P,{value:L,onChange:function(e){z(e.target.value)}},o.createElement("option",{value:""},"n/a"),o.createElement("option",{value:"days"},"Days"),o.createElement("option",{value:"weeks"},"Weeks"),o.createElement("option",{value:"months"},"Months"))),!1))),o.createElement(m.A,{submit:function(){q?p():K("A selected provider is required.")},isSubmitting:i,values:t}))};var h=(0,i.Ay)("span")({"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),v=(0,i.Ay)("div")({marginTop:"0.5rem",marginBottom:"0.5rem"}),w=(0,i.Ay)("div")({marginBottom:"1rem"}),b=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap",paddingLeft:"0.75rem",paddingRight:"0.75rem"}),E=(0,i.Ay)("div")({display:"flex",width:"100%",flexWrap:"wrap"}),x=(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),A=(0,i.Ay)("label")({marginRight:"0.5rem"}),S=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))"}),k=(0,i.Ay)("p")({fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity, 1))"}),C=((0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),(0,i.Ay)("label")({marginRight:"0.5rem"}),(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"}),(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"})),I=(0,i.Ay)("label")({marginRight:"0.5rem"}),R=(0,i.Ay)("input")({marginRight:"0.5rem",width:"3rem",borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",textAlign:"center","&:hover":{"--tw-border-opacity":"1",borderColor:"rgb(144 205 244 / var(--tw-border-opacity, 1))"},"&:focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)"}}),P=(0,i.Ay)("select")({borderRadius:"0.125rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity, 1))",paddingLeft:"0.25rem",paddingRight:"0.25rem"});(0,i.Ay)("span")({marginRight:"1.5rem",marginTop:"0.5rem"}),(0,i.Ay)("label")({marginRight:"0.5rem"})},60559:function(e,t,n){"use strict";n.d(t,{A:function(){return V}});var r,i=n(80296),o=n(57528),a=n(67881),l=n(96540),c=n(52594),u=n(64263),s=n(59779),m=n(14740),d=n(10467),p=n(54756),g=n.n(p),f=n(98765),y=function(){var e=(0,d.A)(g().mark(function e(t){var n,r,i,o;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,f.Ay.post("/api/employee/communication/sms",t);case 1:e.next=3;break;case 2:throw e.prev=2,o=e.catch(0),i=(null==o||null===(n=o.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.msg)||o.message||"Unknown error. Please contact [email protected] for assistance.",new Error(i);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),h=y,v=n(65088),w=n(91319),b=n(15031),E=n(54121),x=n(17607),A=n(7177),S=n(69291),k=n(78125),C=n(12337),I=n(3921),R=n(7161),P=n(20227),T=n(20982),O=n(66188),D=n(85930),N=n(39023),j=n(25381),L=n(764),z=n(76194),B=function(e){return e.Writing="writing",e.Sending="sending",e.Success="success",e}(B||{}),W=(0,a.Ay)(c.pd.Textarea)(r||(r=(0,o.A)(["\n  resize: none;\n  ",";\n\n  &::placeholder {\n    ",";\n  }\n"])),{height:"12rem","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity, 1))",padding:"0.5rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"},{"--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),F=(0,a.Ay)(W)({marginTop:"0.5rem"}),$="running-late",H="None",_=(0,j.Ik)().shape({phoneNumber:(0,j.Yj)().required("A phone number is required to send a text message.").matches(L.uK,"Please include a valid phone number.")}),V=(0,u.AC)()(function(e){var t=e.recipientPhoneNumber,n=(0,l.useState)(B.Writing),r=(0,i.A)(n,2),o=r[0],a=r[1],u=(0,l.useState)(""),d=(0,i.A)(u,2),p=d[0],g=d[1],y=(0,l.useState)("5"),T=(0,i.A)(y,2),j=T[0],L=T[1],W=(0,l.useState)($),V=(0,i.A)(W,2),de=V[0],pe=V[1],ge=(0,l.useState)(""),fe=(0,i.A)(ge,2),ye=fe[0],he=fe[1],ve=(0,l.useState)(void 0),we=(0,i.A)(ve,2),be=we[0],Ee=we[1],xe=(0,m.O$)(function(e){return e.user.serviceArea}),Ae=(0,m.O$)(function(e){return e.user.employee}),Se=(0,b.A)(),ke=Se.data,Ce=Se.mutate,Ie=o===B.Writing||o===B.Sending,Re=(0,D.d0)(),Pe="From: Perlman Clinic\n\n";(0,l.useEffect)(function(){null!=ke&&ke.providers||Ce()},[null==ke?void 0:ke.providers]);var Te=null==ke?void 0:ke.providers.filter(function(e){return e.id===(null==Ae?void 0:Ae.id)})[0],Oe=null==ke?void 0:ke.providers.filter(function(e){return e.id!==(null==Ae?void 0:Ae.id)});(0,l.useEffect)(function(){switch(de){case"free-text":g("");break;case"running-late":g("We apologize for the delay, but we are running [MINUTES] minutes behind schedule. You will receive a notification once we are ready to start the visit. Thank you for your patience.".replace("[MINUTES]",j));break;case"starting-soon":g("As a heads up, we're planning to start your visit in the next [MINUTES] minutes. You'll receive a notification at the start time. Thanks!".replace("[MINUTES]",j));break;case"follow-up":g(function(e,t,n){var r,i="",o=null==ke?void 0:ke.providers.find(function(e){return e.name===t});switch(e){case f.xS.WEL:i=(0,x.V)(o,n);break;case f.xS.MTL:i=(0,S.V)(o,n);break;case f.xS.ENDO:i=(0,k.V)(o,n);break;case f.xS.PAIN:i=(0,C.V)(o);break;case f.xS.GASTRO:i=(0,I.V)(o);break;case f.xS.PHYS:i=(0,R.V)(o);break;case f.xS.MPC:default:i=(0,A.VN)(o,n)}var a="Please schedule [VISIT_TYPE][WITH_PROVIDER] using the web scheduler: ".concat(i," or by giving us a call at ").concat(null==ke||null===(r=ke.area)||void 0===r?void 0:r.phone,".\n\nBest,\n").concat("Perlman Clinic").replace("[WITH_PROVIDER]",t&&t!==H?" with ".concat(t):"");return a.replace("[VISIT_TYPE]",(0,A.CV)(n))}(xe,ye,be));break;
1case"blood-work-instructions":g("We have ordered blood work for you today. Please fast 10 hours (water is okay) if you are having cholesterol or testosterone checked. You may schedule an appointment with us at the link below, following the prompts for a blood draw, OR you may schedule with Labcorp at www.labcorp.com.\n\nhttps://schedule.perlmanclinic.com/schedule?specialty=first-available&is_pocketdoc=false&new_patient=false&patient_age=adult&existing_patient_visit_type=ma-visit");break;case"ihs-xray-instructions":g("We have ordered an x-ray for you today to be completed at Imaging Healthcare Specialists. You can schedule the x-ray to be completed at any of their locations. Please call 858-658-6500 or visit imaginghealthcare.com to schedule. We will reach out to you when we have reviewed your x-ray (typically within 24 hours). Thank you!");break;case"ma-visit-scheduler":g("Please schedule a medical assistant visit using the web scheduler:\n"+(0,A.j8)()+" or by giving us a call at 858-554-1212.\n\nBest,\nPerlman Clinic");break;case"referrals-info":g("You may call Perlman Clinic's referrals department directly at 858-200-8480.");break;case"therapy-informed-consent":g("Please find and review Perlman Wellness's Mental Health Informed Consent at https://perlmanclinic.com/therapy-informed-consent/.\n\nIf you have any questions, you may discuss them with the provider during your visit, or call Perlman Wellness at 858-250-0286.\n\nBest,\nPerlman Wellness");break;case"medical-records":g("Please complete Option 2: Online Request Form at this link to request outside medical records to be sent to Perlman Clinic: https://www.perlmanclinic.com/medical-records/");break;case"medication-agreement":g("Please complete our standard Medication Agreement located at this link: https://www.perlmanclinic.com/medication-agreement")}},[j,de,ye,be]);var De=(0,D.$N)(),Ne={phoneNumber:t?(0,z.cz)(t):""};return l.createElement(M,null,Ie&&l.createElement(q,null,"Send a Text Message"),l.createElement(s.A,null,l.createElement(l.Fragment,null,l.createElement(c.zW,{timeout:150,in:o===B.Sending,appear:!0,unmountOnExit:!0},l.createElement(U,{style:{background:"rgba(255, 255, 255, 0.75)"}},l.createElement(c.y$,null),l.createElement(Y,null,"Sending message..."))),Ie&&l.createElement(N.l1,{validationSchema:_,initialValues:Ne,onSubmit:function(e){var t=e.phoneNumber;a(B.Sending),h({recipientPhone:t,message:Pe+p}).then(function(){a(B.Success),De?(0,D._8)(De):(0,D.hu)({toolLabel:"Text",actionPerformed:"Text Message Sent",employeeProperties:Re})}).catch(function(e){v.Cp(e),alert("There was an error while sending this message: ".concat((0,w.getErrorFromResponse)(e))),a(B.Writing)})}},function(e){var t=e.errors,n=e.submitCount;return l.createElement(N.lV,null,l.createElement(G,{htmlFor:"phoneNumber"},"Phone Number"),l.createElement(J,{name:"phoneNumber"}),t.phoneNumber&&n>0&&l.createElement(K,null,t.phoneNumber),l.createElement(X,{defaultValue:$,onChange:function(e){return pe(e.currentTarget.value)}},l.createElement("optgroup",{label:"Send a message"},l.createElement("option",{value:"running-late"},"Running Late"),l.createElement("option",{value:"starting-soon"},"Starting Soon"),l.createElement("option",{value:"follow-up"},"Follow-up"),l.createElement("option",{value:"ma-visit-scheduler"},"Schedule MA Visit"),l.createElement("option",{value:"blood-work-instructions"},"Blood Work Instructions"),l.createElement("option",{value:"ihs-xray-instructions"},"IHS X-ray Instructions"),l.createElement("option",{value:"referrals-info"},"Referrals Department Information"),l.createElement("option",{value:"therapy-informed-consent"},"Informed Consent (Therapy)"),l.createElement("option",{value:"medical-records"},"Medical Records Request"),l.createElement("option",{value:"medication-agreement"},"Medication Agreement"),l.createElement("option",{value:"free-text"},"Custom"))),("running-late"===de||"starting-soon"===de)&&l.createElement(Z,{defaultValue:j,onChange:function(e){return L(e.currentTarget.value)}},l.createElement("option",{value:"5"},"5 minutes"),l.createElement("option",{value:"10"},"10 minutes"),l.createElement("option",{value:"15"},"15 minutes"),l.createElement("option",{value:"20"},"20 minutes"),l.createElement("option",{value:"25"},"25 minutes"),l.createElement("option",{value:"30"},"30 minutes")),"follow-up"===de&&l.createElement(l.Fragment,null,l.createElement(Q,{defaultValue:j,onChange:function(e){he(e.currentTarget.value)}},l.createElement("option",{value:H},"None"),Te&&l.createElement(E.A,{providers:[Te]}),l.createElement("option",{disabled:!0},"──────────"),l.createElement(E.A,{providers:Oe})),l.createElement(ee,{value:be,onChange:function(e){Ee(e.target.value)}},l.createElement("option",{value:void 0},"N/A"),l.createElement("option",{value:P.h.OfficeVisit},"Office Visit"),l.createElement("option",{value:P.h.VideoVisit},"PocketDoc"))),l.createElement(te,null,l.createElement(ne,null,Pe),l.createElement(F,{value:p,placeholder:"Type a text message to the patient. For example, you can tell patients you're running late. Note: these messages will not be stored in EPIC.",onChange:function(e){return g(e.currentTarget.value)}})),l.createElement(re,null,p.length," / ",478),l.createElement(ie,null,l.createElement(oe,{type:"submit",disabled:p.length<1||p.length>500},"Send Text to Patient")))}),l.createElement(c.zW,{timeout:250,in:o===B.Success,appear:!0,unmountOnExit:!0},l.createElement(ae,null,l.createElement(le,{icon:O.SGM}),l.createElement(ce,null,"Text message has been sent"),l.createElement(ue,null,l.createElement(se,null,Pe),l.createElement(me,null,p)))))))}),M=(0,a.Ay)("div")({position:"relative"}),q=(0,a.Ay)("h3")({marginBottom:"0.5rem",fontSize:"1.25rem",fontWeight:"500",lineHeight:"1.75rem"}),U=(0,a.Ay)("div")({position:"absolute",left:"0",top:"0",zIndex:"50",display:"flex",height:"100%",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center"}),Y=(0,a.Ay)("p")({marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),G=(0,a.Ay)("label")({marginTop:"1.5rem",display:"block",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),J=(0,a.Ay)(c.LR.Formik)({marginTop:"0.25rem",width:"100%"}),K=(0,a.Ay)("p")({marginTop:"0.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),X=(0,a.Ay)(c.l6)({marginTop:"1.5rem",width:"100%","@media (min-width: 768px)":{width:"33.333333%"}}),Z=(0,a.Ay)(c.l6)({marginTop:"1rem",width:"100%","@media (min-width: 768px)":{marginLeft:"1rem",width:"33.333333%"}}),Q=(0,a.Ay)(c.l6)({marginTop:"1rem",width:"100%","@media (min-width: 768px)":{marginLeft:"1rem",width:"33.333333%"}}),ee=(0,a.Ay)(c.l6)({marginTop:"1rem",width:"100%","@media (min-width: 768px)":{marginLeft:"1rem",width:"20%"}}),te=(0,a.Ay)("div")({position:"relative"}),ne=(0,a.Ay)("div")({marginTop:"1.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity, 1))"}),re=(0,a.Ay)("div")({marginTop:"0.25rem",userSelect:"none",textAlign:"right",fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity, 1))"}),ie=(0,a.Ay)("div")({marginTop:"0.25rem",textAlign:"right"}),oe=(0,a.Ay)(u.$n)({marginTop:"1rem",width:"100%","@media (min-width: 768px)":{width:"auto"}}),ae=(0,a.Ay)("div")({display:"flex",flexDirection:"column",alignItems:"center"}),le=(0,a.Ay)(T.g)({marginTop:"1.5rem",height:"4rem",width:"4rem","--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),ce=(0,a.Ay)("div")({marginTop:"1.5rem",fontSize:"1.875rem",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),ue=(0,a.Ay)("div")({marginTop:"2rem",borderRadius:"0.25rem",borderWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(97 190 161 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(235 249 246 / var(--tw-bg-opacity, 1))",padding:"1rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),se=(0,a.Ay)("div")({marginBottom:"1rem"}),me=(0,a.Ay)("div").withConfig({componentId:"sc-1aivgkb-0"})({whiteSpace:"pre-line"})},22321:function(e,t,n){"use strict";n.d(t,{A:function(){return x}});var r=n(80296),i=n(67881),o=n(96540),a=n(25381),l=n(39023),c=n(52594),u=n(33876),s=n(10467),m=n(54756),d=n.n(m),p=n(98765),g=n(95689),f=function(){var e=(0,s.A)(d().mark(function e(t){var n,r;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,p.Ay.post("/api/employee/patient-register",{mrn:t},{timeout:3e4});case 1:return n=e.sent,r=n.data,e.abrupt("return",(0,g.vb)(r.patient));case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),y=n(91319),h=n(54625),v=n(90380),w=n(85930),b=n(96763),E=(0,a.Ik)().shape({firstName:(0,a.Yj)().required("The patient's first name is required."),lastName:(0,a.Yj)().required("The patient's last name is required."),email:(0,a.Yj)().email("Please ensure there is a valid email address on file within EPIC for this patient.").required("Please ensure there is a valid email address on file within EPIC for this patient."),phone:(0,a.Yj)().matches(/^[^1]/,'The patient phone number should not begin with a "1".').required("Please ensure a phone number is provided within EPIC for this patient.").matches(/^\d{10}$/,"Please ensure a phone number is provided within EPIC for this patient.")}),x=function(e){var t=e.mrn,n=e.data,i=e.dismiss,a=(0,h.W6)().push,s=(0,o.useState)(""),m=(0,r.A)(s,2),d=m[0],p=m[1],g=(0,o.useRef)(null),x=(0,w.d0)(),L=n.phones.find(function(e){return"mobile"===e.type.toLowerCase()}
1)||n.phones[0]||null;return(0,o.useEffect)(function(){g.current&&g.current.scrollIntoView()},[]),o.createElement(l.l1,{onSubmit:function(e,n){var r=n.setSubmitting;p(""),(0,w.TW)({employeeProperties:x}),f(t).then(function(e){(0,w.qN)({patientId:e.id,employeeProperties:x}),a("".concat(v.RN,"/").concat(e.id)),i&&i()}).catch(function(e){b.error(e),r(!1);var t=(0,y.getErrorFromResponse)(e);(0,w.jK)({error:t,employeeProperties:x}),p(t)})},enableReinitialize:!0,initialValues:{firstName:n.firstName,lastName:n.lastName,email:n.email||"",phone:(null==L?void 0:L.number.replace(/(^\+1)|\D/g,""))||"",gender:n.gender||"Male",dob:n.dob.unixFmt("MM/dd/yyyy")},validationSchema:E},function(e){var t=e.isSubmitting;return o.createElement(l.lV,null,o.createElement(c.y$.Overlay,{visible:t}),d&&o.createElement(A,null,o.createElement(S,null,d,d.indexOf("patient registered with PocketDoc")>=0&&o.createElement(o.Fragment,null," Please try looking them up in the ",o.createElement(k,{to:v.RN},"patient directory"),"."))),o.createElement(C,{name:"firstName",label:"First Name",disabled:!0}),o.createElement(I,{name:"lastName",label:"Last Name",disabled:!0}),o.createElement(R,null,o.createElement(P,null,o.createElement(c.ar,{name:"dob",label:"DOB"},o.createElement(c.J3.Formik,{name:"dob",disabled:!0}))),o.createElement(T,null,o.createElement(c.pd.Formik,{name:"gender",label:"Gender",disabled:!0}))),o.createElement(O,{name:"email",label:"Email",disabled:!0}),o.createElement(D,{name:"phone",label:"Mobile Phone"},o.createElement(c.LR.Formik,{name:"phone",disabled:!0})),o.createElement(N,null,"An email will be sent to this patient to finish their PocketDoc account setup. Once setup, they'll also be provided links to download the app."),o.createElement(j,{ref:g},o.createElement(u.$,{type:"submit"},"Register Patient")))})},A=(0,i.Ay)("div")({marginBottom:"1rem",borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(239 68 68 / var(--tw-border-opacity, 1))","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity, 1))",padding:"1rem"}),S=(0,i.Ay)("p")({fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),k=(0,i.Ay)(h.k2)({fontWeight:"500","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))",textDecorationLine:"underline",transitionProperty:"background-color, border-color, color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity, 1))"}}),C=(0,i.Ay)(c.pd.Formik)({marginBottom:"1rem"}),I=(0,i.Ay)(c.pd.Formik)({marginBottom:"1rem"}),R=(0,i.Ay)("div")({marginBottom:"1rem",display:"flex",alignItems:"center"}),P=(0,i.Ay)("div")({marginRight:"1rem",flex:"1 1 0%"}),T=(0,i.Ay)("div")({flex:"1 1 0%"}),O=(0,i.Ay)(c.pd.Formik)({marginBottom:"1rem"}),D=(0,i.Ay)(c.ar)({marginBottom:"1rem"}),N=(0,i.Ay)("p")({marginBottom:"1rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity, 1))"}),j=(0,i.Ay)("div").withConfig({componentId:"sc-1v8ez9p-0"})({display:"flex",justifyContent:"flex-end"})},64804:function(e,t,n){"use strict";n.d(t,{A:function(){return ne}});var r,i,o,a,l,c,u,s,m,d,p=n(64467),g=n(80296),f=n(57528),y=n(67881),h=n(96540),v=n(52594),w=n(64263),b=n(59779),E=n(14740),x=n(65088),A=n(91319),S=n(98765),k=n(15031),C=n(17607),I=n(7177),R=n(69291),P=n(78125),T=n(12337),O=n(3921),D=n(7161),N=n(89053),j=n(4706),L=n(66188),z=n(7897),B=n(20982),W=n(80045),F=n(10467),$=n(54756),H=n.n($),_=["patientId","sessionId"],V=function(){var e=(0,F.A)(H().mark(function e(t){var n,r,i,o,a,l,c,u,s,m,d;return H().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.patientId,r=t.sessionId,i=(0,W.A)(t,_),o=n?"/api/employee/patients/".concat(n,"/send-scheduling-links"):r?"/api/employee/accountless-sessions/".concat(r,"/send-scheduling-links"):"/api/employee/send-scheduling-links",e.prev=1,e.next=2,S.Ay.post(o,i);case 2:return a=e.sent,l=a.data,c={email:l.email,phone:l.phone},e.abrupt("return",c);case 3:throw e.prev=3,d=e.catch(1),m=(null==d||null===(u=d.response)||void 0===u||null===(s=u.data)||void 0===s?void 0:s.msg)||d.message||"Unknown error. Please contact developer team for assistance.",new Error(m);case 4:case"end":return e.stop()}},e,null,[[1,3]])}
1));return function(t){return e.apply(this,arguments)}}(),M=n(74096),q=n(20227),U=n(35434),Y=n(39023),G=n(25381),J=n(85930),K=n(764),X=n(76194);function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Q=y.Ay.div(r||(r=(0,f.A)(["\n    ","\n    ","\n    ","\n"])),{margin:"1rem",display:"flex",height:"12rem",width:"12rem",cursor:"pointer",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"0.5rem",borderWidth:"1px","--tw-shadow":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","&:hover":{"--tw-scale-x":"1.05","--tw-scale-y":"1.05",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}},function(e){return e.isSelected?{"--tw-border-opacity":"1",borderColor:"rgb(51 170 133 / var(--tw-border-opacity, 1))"}:{"--tw-border-opacity":"1",borderColor:"rgb(19 26 32 / var(--tw-border-opacity, 1))"}},function(e){return e.isSelected?{"--tw-scale-x":"1.05","--tw-scale-y":"1.05",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}:{}}),ee="any provider",te=(0,G.Ik)().shape({phone:(0,G.Yj)().when(["email"],{is:function(e){return!e},then:(0,G.Yj)().matches(K.uK,"Please enter a valid phone number.").required("Please enter a phone number or email."),otherwise:(0,G.Yj)().matches(K.uK,"Please include a valid phone number.")}),email:(0,G.Yj)().when(["phone"],{is:function(e){return!e},then:(0,G.Yj)().email("Please enter a valid email.").required("Please enter a phone number or email."),otherwise:(0,G.Yj)().email("Please include a valid email.")})},[["phone","email"]]),ne=(0,w.AC)()(function(e){var t=e.patientId,n=e.firstName,r=e.email,i=e.phone,o=e.sessionId,a=(0,h.useState)("Loading visit options"),l=(0,g.A)(a,2),c=l[0],u=l[1],s=(0,h.useState)(void 0),m=(0,g.A)(s,2),d=m[0],f=m[1],y=(0,h.useState)(!1),w=(0,g.A)(y,2),N=w[0],j=w[1],B=(0,h.useState)(""),W=(0,g.A)(B,2),F=W[0],$=W[1],H=(0,h.useState)(""),_=(0,g.A)(H,2),G=_[0],K=_[1],ne=(0,h.useState)(""),We=(0,g.A)(ne,2),Fe=We[0],$e=We[1],He=(0,E.O$)(function(e){return e.user.serviceArea}),_e=(0,E.O$)(function(e){return e.user.employee}),Ve=(0,k.A)(),Me=Ve.data,qe=Ve.mutate,Ue=(0,J.d0)(),Ye=(null!=He?He:S.xS.MPC)===S.xS.MPC,Ge=(0,h.useState)(!1),Je=(0,g.A)(Ge,2),Ke=Je[0],Xe=Je[1],Ze=(0,h.useRef)(null),Qe=(0,h.useState)(!1),et=(0,g.A)(Qe,2),tt=et[0],nt=et[1];(0,h.useEffect)(function(){null!=Me&&Me.providers||qe()},[null==Me?void 0:Me.providers]),(0,h.useEffect)(function(){(0,U.A)([null!=He?He:S.xS.MPC]).then(function(e){var t=e[He],n=t.area.visitTypes.some(function(e){return e.isPocketDoc}),r=t.area.visitTypes.some(function(e){return!e.isPocketDoc});Xe(n),nt(r),!n||r||Ye||requestAnimationFrame(function(){var e;null!==(e=Ze.current)&&void 0!==e&&e.click&&Ze.current.click()})}).catch(function(e){x.Cp(e),alert("There was an error while getting scheduling links: ".concat((0,A.getErrorFromResponse)(e)))}).finally(function(){u("")})},[]);var rt=null==Me?void 0:Me.providers.filter(function(e){return e.id===(null==_e?void 0:_e.id)})[0],it=null==Me?void 0:Me.providers.filter(function(e){return e.id!==(null==_e?void 0:_e.id)}),ot=(0,J.$N)(),at=d===q.h.OfficeVisit,lt=d===q.h.VideoVisit,ct=d===q.h.MAVisit;return h.createElement(b.A,null,h.createElement(h.Fragment,null,h.createElement(v.zW,{timeout:250,in:!N&&!!c,appear:!0,exit:!1,unmountOnExit:!0},h.createElement(re,{style:{background:"rgba(255, 255, 255, 0.75)"}},h.createElement(ie,null),h.createElement(oe,null,c))),N?h.createElement(ae,null,h.createElement(le,{icon:L.SGM}),h.createElement(ce,null,G&&Fe?"Scheduling links have been sent":"Scheduling link has been sent"),h.createElement(ue,null,Fe&&h.createElement(se,null,h.createElement(me,null),h.createElement(de,null,"Text message sent to ".concat((0,M.formatPhone)(Fe)))),G&&h.createElement(pe,null,h.createElement(ge,{icon:z.y_8}),h.createElement(fe,null,"Email sent to ".concat(G))))):null,c||N?null:h.createElement(Y.l1,{initialValues:{phone:i?(0,X.cz)(i):"",email:r||""},validationSchema:te,validateOnBlur:!1,onSubmit:function(e){var n;u("Sending message..."),j(!1);var r=function(e,t,n){var r="";t===ee&&(t="");var i=null==Me?void 0:Me.providers.find(function(e){return e.id===t});if(n===q.h.MAVisit)r=(0,I.j8)();else switch(e){case S.xS.WEL:r=(0,C.V)(i,n);break;case S.xS.MTL:r=(0,R.V)(i,n);break;case S.xS.ENDO:r=(0,P.V)(i,n);break;case S.xS.PAIN:r=(0,T.V)(i);break;case S.xS.GASTRO:r=(0,O.V)(i);break;case S.xS.PHYS:r=(0,D.V)(i);break;case S.xS.MPC:default:r=(0,I.VN)(i,n)}return r}(He,F,d),i=null==Me?void 0:Me.providers.find(function(e){return e.id===F});V(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Z(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({patientId:t||"",url:r,withProvider:null!==(n=null==i?void 0:i.name)&&void 0!==n?n:"",visitMethod:d,sessionId:o},e)).then(function(e){K(e.email),$e(e.phone),j(!0),ot?(0,J.ov)(ot):(0,J.hu)({toolLabel:"Send Scheduling Links",actionPerformed:"Scheduling Links Sent",employeeProperties:Ue})}).catch(function(e){x.Cp(e),alert("There was an error while sending scheduling links: ".concat((0,A.getErrorFromResponse)(e)))}).finally(function(){u("")})}},function(e){var t=e.errors,r=e.submitCount,i=e.submitForm;return h.createElement(h.Fragment,null,h.createElement(ye,null,"Email and/or text a scheduling link to ",n||"the patient"),h.createElement(Y.lV,null,h.createElement(he,null,h.createElement(ve,{$_css:[{marginLeft:"1.25rem",marginRight:"1.25rem",display:"flex",width:"100%",flexDirection:"column"},{maxWidth:300}]},h.createElement(we,null,"Patient phone number"),h.createElement(be,{name:"phone",$_css2:t.phone&&r>0?{"--tw-border-opacity":"1",borderColor:"rgb(220 38 38 / var(--tw-border-opacity, 1))"}:""}),t.phone&&h.createElement(Ee,null,t.phone)),h.createElement(xe,{$_css3:[{marginLeft:"1.25rem",marginRight:"1.25rem",display:"flex",width:"100%",flexDirection:"column"},{maxWidth:300}]},h.createElement(Ae,null,"Patient email"),h.createElement(v.pd.Formik,{name:"email"})))),h.createElement(Se,null,tt&&h.createElement(Q,{isSelected:at,onClick:function(){f(q.h.OfficeVisit)}},h.createElement(ke,{$_css4:[{width:"3rem"},at?{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}]}),h.createElement(Ce,{$_css5:[{marginTop:"0.75rem"},at?{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}]},"Office Visit")),Ke&&h.createElement(Q,{ref:Ze,isSelected:lt,onClick:function(){f(q.h.VideoVisit)}},h.createElement(Ie,{$_css6:[{width:"3rem"},lt?{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}]}),h.createElement(Re,{$_css7:[{marginTop:"0.75rem"},lt?{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}]},"Video Visit")),Ye&&h.createElement(Q,{isSelected:ct,onClick:function(){f(q.h.MAVisit)}},h.createElement(Pe,{$_css8:[{width:"3rem"},ct?{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}]}),h.createElement(Te,{$_css9:[{marginTop:"0.75rem"},ct?{"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}:{"--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}]},"MA Visit"))),h.createElement(Oe,null,h.createElement(v.zW,{timeout:250,in:at||lt,onExit:function(){$("")},appear:!0,unmountOnExit:!0},h.createElement(De,null,h.createElement(Ne,null,h.createElement(je,null,"Select a provider"),h.createElement(Le,{onChange:function(e){$(e.currentTarget.value)}},rt&&h.createElement("option",{key:rt.id,value:rt.id},rt.lastName,", ",rt.firstName,", ",rt.providerTitle),h.createElement("option",{disabled:!0},"──────────"),h.createElement("option",{key:"AnyProvider",value:ee},"Any Provider"),h.createElement("option",{disabled:!0},"──────────"),null==it?void 0:it.map(function(e){return h.createElement("option",{key:e.id,value:e.id},e.lastName,", ",e.firstName,", ",e.providerTitle)})))))),d&&h.createElement(ze,null,h.createElement(Be,{onClick:i,disabled:!1},"Send Link")))})))}),re=(0,y.Ay)("div")({left:"0",top:"0",zIndex:"50",display:"flex",height:"24rem",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center"}),ie=(0,y.Ay)(v.y$)({"--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),oe=(0,y.Ay)("p")({marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"}),ae=(0,y.Ay)("div")({display:"flex",height:"24rem",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center"}),le=(0,y.Ay)(B.g)({height:"4rem",width:"4rem",paddingTop:"0.5rem",paddingBottom:"0.5rem","--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),ce=(0,y.Ay)("h2")({marginTop:"1rem",fontSize:"1.875rem",lineHeight:"2.25rem"}),ue=(0,y.Ay)("div")({marginTop:"2rem",display:"flex",flexDirection:"column",alignItems:"flex-start"}),se=(0,y.Ay)("div")({display:"flex",flexDirection:"row"}),me=(0,y.Ay)(N.SE9)({height:"3.5rem",width:"3.5rem",borderRightWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingRight:"1rem","--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),de=(0,y.Ay)("p")({marginLeft:"0.5rem",display:"flex",alignItems:"center"}),pe=(0,y.Ay)("div")({marginLeft:"-0.375rem",display:"flex",flexDirection:"row",paddingTop:"0.5rem",paddingBottom:"0.5rem"}),ge=(0,y.Ay)(B.g)({height:"2rem",width:"2rem",borderRightWidth:"2px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity, 1))",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"1rem","--tw-text-opacity":"1",color:"rgb(51 170 133 / var(--tw-text-opacity, 1))"}),fe=(0,y.Ay)("p")({marginLeft:"0.5rem",display:"flex",alignItems:"center"}),ye=(0,y.Ay)("h1")({marginTop:"1.5rem",display:"flex",justifyContent:"center",fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem"}
1),he=(0,y.Ay)("div")({marginTop:"1.5rem",display:"flex",justifyContent:"center"}),ve=(0,y.Ay)("div")(i||(i=(0,f.A)(["",""])),function(e){return e.$_css}),we=(0,y.Ay)("h2")({marginBottom:"0.5rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),be=(0,y.Ay)(v.LR.Formik)(o||(o=(0,f.A)(["",""])),function(e){return e.$_css2}),Ee=(0,y.Ay)("p")({marginTop:"0.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),xe=(0,y.Ay)("div")(a||(a=(0,f.A)(["",""])),function(e){return e.$_css3}),Ae=(0,y.Ay)("h2")({marginBottom:"0.5rem",fontSize:"1.125rem",fontWeight:"500",lineHeight:"1.75rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),Se=(0,y.Ay)("div")({marginBottom:"0.5rem",marginTop:"1.5rem",display:"flex",flexDirection:"row",justifyContent:"center"}),ke=(0,y.Ay)(N.CTc)(l||(l=(0,f.A)(["",""])),function(e){return e.$_css4}),Ce=(0,y.Ay)("span")(c||(c=(0,f.A)(["",""])),function(e){return e.$_css5}),Ie=(0,y.Ay)(j.UaG)(u||(u=(0,f.A)(["",""])),function(e){return e.$_css6}),Re=(0,y.Ay)("span")(s||(s=(0,f.A)(["",""])),function(e){return e.$_css7}),Pe=(0,y.Ay)(j.uiJ)(m||(m=(0,f.A)(["",""])),function(e){return e.$_css8}),Te=(0,y.Ay)("span")(d||(d=(0,f.A)(["",""])),function(e){return e.$_css9}),Oe=(0,y.Ay)("div")({position:"relative"}),De=(0,y.Ay)("div")({display:"flex",width:"100%",justifyContent:"center"}),Ne=(0,y.Ay)("div")({display:"flex",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center"}),je=(0,y.Ay)("h1")({marginBottom:"0.5rem",marginTop:"0.5rem",display:"flex",justifyContent:"center",fontSize:"1.25rem",fontWeight:"500",lineHeight:"1.75rem"}),Le=(0,y.Ay)(v.l6)({gridColumn:"span 3 / span 3",display:"flex","@media (min-width: 768px)":{width:"33.333333%"}}),ze=(0,y.Ay)("div")({marginTop:"0.75rem",display:"flex",flexDirection:"row",justifyContent:"center"}),Be=(0,y.Ay)(w.$n).withConfig({componentId:"sc-1qlx3n7-0"})({marginTop:"1rem",width:"100%","@media (min-width: 768px)":{width:"auto"}})},10755:function(e,t,n){"use strict";n.d(t,{A:function(){return O}});var r=n(80296),i=n(64467),o=n(67881),a=n(96540),l=n(72505),c=n.n(l),u=n(15031),s=n(14740),m=n(45862),d=n(20151),p=n(58168),g=n(23029),f=n(92901),y=n(56822),h=n(53954),v=n(85501),w=n(52594),b=n(40961),E=n(76273),x=n(46321);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}var k=function(e){return function(t){var n;return n=function(n){function r(e){var t,n,o,a;return(0,g.A)(this,r),n=this,o=r,a=[e],o=(0,h.A)(o),t=(0,y.A)(n,S()?Reflect.construct(o,a||[],(0,h.A)(n).constructor):o.apply(n,a)),(0,i.A)(t,"dismiss",function(){return t.setState({visible:!1})}),t.state={render:e.visible,visible:e.visible},t}return(0,v.A)(r,n),(0,f.A)(r,[{key:"modalProps",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},"function"==typeof e?e(this.props):e)}},{key:"componentDidUpdate",value:function(e){e.visible&&!this.props.visible?this.setState({visible:!1}):!e.visible&&this.props.visible&&this.setState({render:!0,visible:!0})}},{key:"render",value:function(){var e=this;return(0,b.createPortal)(a.createElement(C,{$_css:[this.state.render?"":{display:"none"}]},a.createElement(E.F,null,a.createElement(w.zW,{timeout:150},a.createElement(x.A,(0,p.A)({appear:!0,visible:this.state.visible,onDismissed:function(){return e.setState({render:!1},function(){"function"==typeof e.props.onModalDismissed&&e.props.onModalDismissed()})}},this.modalProps),a.createElement(w.Vs.Provider,{value:{dismiss:this.dismiss.bind(this)}},a.createElement(t,this.props)))))),document.getElementById("app-portal"))}}])}
1(a.PureComponent),(0,i.A)(n,"displayName","asPreloadingModal(".concat(t.displayName,")")),n}},C=(0,o.Ay)("div").withConfig({componentId:"sc-1ays3xg-0"})(["",""],function(e){return e.$_css}),I=n(60867),R=n(44928);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}(0,n(54887).Lj)(m.A.quickBookingMixpanelToken);var T=c().create({baseURL:m.A.api.endpoint,timeout:m.A.api.timeout,headers:{Accept:"application/json","Content-Type":"application/json","Is-Web":"true"}});T.interceptors.request.use(function(e){var t=s.Ay.current.getState().user,n=t.token,r=t.serviceArea;return"OPTIONS"!==e.method&&(e.headers=e.headers||{},n&&(e.headers.Authorization=n),r&&(e.headers["X-Service-Area"]=r)),e}),T.interceptors.request.use(function(e){return e.data&&(e.data=d.Ik.stringifySpacetimeValues(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e.data))),e}),T.interceptors.response.use(function(e){return e},function(e){var t,n=s.Ay.current.getActions();return 401===(null===(t=e.response)||void 0===t?void 0:t.status)&&n.employeeLogout(),Promise.reject(e)});var O=k({style:{borderRadius:"0.25rem",borderStyle:"none"}})(function(e){var t,n=e.visible,i=e.referenceAppointment,o=e.onRequestPictureInPicture,l=e.emrPatient,c=(0,u.A)(),m=c.data,d=c.mutate,p=(0,s.O$)(function(e){return e.user.employee}),g=(0,s.O$)(function(e){return e.user.serviceArea}),f=(0,a.useState)(0),y=(0,r.A)(f,2),h=y[0],v=y[1],w=(0,a.useRef)(!1);(0,a.useEffect)(function(){w.current&&!n&&v(function(e){return e+1}),w.current=n},[n]),(0,a.useEffect)(function(){m||d()},[m]),(0,a.useEffect)(function(){n&&o()},[n]);var b=(0,a.useMemo)(function(){if(m)return m.providers.find(function(e){return e.providerId===i.providerEmrId})},[m,i.providerEmrId]),E=(0,a.useMemo)(function(){if(m)return m.locations.find(function(e){return e.departmentId===i.locationEmrId})},[m,i.locationEmrId]),x=(0,a.useMemo)(function(){return l||(t=((e=i).patientEmrName||e.patientNameFormatted||"").split(","),n=(t[0]||"").trim(),{firstName:(t[1]||"").trim(),lastName:n,emrId:{ID:e.patientEmrId,Type:"EPI"},insuranceStatus:""});var e,t,n},[l,i]);return m&&b&&E?a.createElement("div",{style:{minHeight:500}},a.createElement(I.sK,{value:{httpClient:T,location:E,serviceArea:g,isEmployeeScheduler:!0,visitTypes:null!==(t=m.area.visitTypes)&&void 0!==t?t:[],visitCategory:null,employee:p,providerLoginUrl:window.location.origin+"/login"}},a.createElement(R.iR,{key:h,isEmployee:!0,bookedAppointmentDate:i.appointmentDateTime,providerEpicId:i.providerEmrId,departmentId:i.locationEmrId,emrPatient:x,provider:b}))):a.createElement(D,{style:{minHeight:500,height:"80vh"}},a.createElement(N,null,"Loading scheduling data..."))}),D=(0,o.Ay)("div")({display:"flex",alignItems:"center",justifyContent:"center"}),N=(0,o.Ay)("p").withConfig({componentId:"sc-1d4ko11-0"})({"--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity, 1))"})},19198:function(e,t,n){"use strict";var r=n(67881),i=n(764),o=n(64263),a=n(76194),l=n(52594),c=n(39023),u=n(96540),s=n(25381),m=(0,s.Ik)().shape({phoneNumber:(0,s.Yj)().required("A phone number is required to send a text message.").matches(i.uK,"Please include a valid phone number.")});t.A=(0,o.AC)()(function(e){var t=e.phoneNumber,n=e.handleClose,r=e.handleSubmit;return u.createElement(c.l1,{initialValues:{phoneNumber:(0,a.cz)(t)},validationSchema:m,onSubmit:r},function(e){var t=e.errors,r=e.submitCount;return u.createElement(c.lV,null,u.createElement(d,null,"Start Phone Call with Patient"),u.createElement(p,null,u.createElement(g,null,u.createElement(f,{htmlFor:"phoneNumber"},"Phone Number"),u.createElement(y,{name:"phoneNumber"}),t.phoneNumber&&r>0&&u.createElement(h,null,t.phoneNumber)),u.createElement(v,null,u.createElement(w,{secondary:!0,onClick:n},"Cancel"),u.createElement(b,{type:"submit"},"Call Patient"))))})});var d=(0,r.Ay)("h1")({fontSize:"1.5rem",fontWeight:"500",lineHeight:"2rem","--tw-text-opacity":"1",color:"rgb(19 26 32 / var(--tw-text-opacity, 1))"}),p=(0,r.Ay)("div")({display:"flex",flexShrink:"1",flexWrap:"nowrap",alignItems:"flex-end",justifyContent:"space-between"}),g=(0,r.Ay)("div")({flexGrow:"1"}),f=(0,r.Ay)("label")({marginTop:"1.5rem",display:"block",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity, 1))"}),y=(0,r.Ay)(l.LR.Formik)({marginTop:"0.25rem",width:"100%"}),h=(0,r.Ay)("p")({marginTop:"0.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity, 1))"}),v=(0,r.Ay)("div")({marginLeft:"1rem",display:"flex",flexWrap:"nowrap"}),w=(0,r.Ay)(o.$n)({display:"flex",height:"3rem",alignItems:"center",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(243 244 246 / var(--tw-border-opacity, 1))"}),b=(0,r.Ay)(o.$n).withConfig({componentId:"sc-12td8ij-0"})({marginLeft:"0.75rem",display:"flex",height:"3rem",alignItems:"center"})},49638:function(e,t,n){"use strict";n.d(t,{n0:function(){return p}});var r=n(45458),i=n(64467),o=n(98765),a=n(44726);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?l(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=function(e,t,n,r,i){var o=i.nameQuery,a=i.dob,l=i.mrn;return l?r.some(function(e){return e.ID===l}):!(o&&!function(e,t,n){var r=n.trim().toLowerCase().split(/\s+/).filter(Boolean);if(!r.length)return!1;var i=e.toLowerCase(),o=t.toLowerCase();return r.every(function(e){return i.includes(e)||o.includes(e)})}(e,t,o))&&(!a||n===a)},d=function(e,t){return{pocketDocPatient:t,source:"pocketdoc",firstName:e.firstName,lastName:e.lastName,dateOfBirth:e.dob.format("{iso-month}/{date}/{year}"),phones:[],gender:e.gender,email:void 0,emrIds:e.epicPatientIDs.map(function(e){return{ID:e.ID,Type:e.Type}}),pocketDocId:t.id,childId:e.id,parentName:"".concat(t.firstName," ").concat(t.lastName)}},p=function(e,t){var n,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=[],p=!!(null!==(n=l.nameQuery)&&void 0!==n&&n.trim()||l.dob||l.mrn||l.phone),g=new Map,f=new Set,y=new Set,h=u(t);try{for(h.s();!(i=h.n()).done;){var v=i.value;v.patientEpicId&&g.set(v.patientEpicId,v);var w,b=u(v.children||[]);try{for(b.s();!(w=b.n()).done;){var E,x,A=null===(E=w.value.epicPatientIDs)||void 0===E||null===(x=E.find(function(e){return e.Type===o.jv.EPI}))||void 0===x?void 0:x.ID;A&&g.set(A,v)}}catch(e){b.e(e)}finally{b.f()}}}catch(e){h.e(e)}finally{h.f()}var S,k=u(e);try{var C=function(){var e,t,n=S.value,r=null===(e=n.emrIds.find(function(e){return e.Type===o.jv.EPI}))||void 0===e?void 0:e.ID,i=r?g.get(r):void 0;i&&f.add(i.id);var a=r&&i?null===(t=i.children)||void 0===t?void 0:t.find(function(e){var t;return null===(t=e.epicPatientIDs)||void 0===t?void 0:t.some(function(e){return e.Type===o.jv.EPI&&e.ID===r})}):void 0;if(a){if(y.has(a.id)||(y.add(a.id),s.push({epicResult:n,pocketDocPatient:i,source:"both",firstName:n.firstName,lastName:n.lastName,preferredName:n.preferredName,dateOfBirth:n.dateOfBirth,phones:n.phones||[],address:n.address,gender:n.gender,email:void 0,emrIds:n.emrIds,pocketDocId:i.id,childId:a.id,parentName:"".concat(i.firstName," ").concat(i.lastName)})),p){var c,h=u(i.children||[]);try{for(h.s();!(c=h.n()).done;){var v=c.value;if(v.id!==a.id){var w=v.dob.format("{iso-month}/{date}/{year}"),b=v.epicPatientIDs.map(function(e){return{ID:e.ID,Type:e.Type}});!y.has(v.id)&&m(v.firstName,v.lastName,w,b,l)&&(y.add(v.id),s.push(d(v,i)))}}}catch(e){h.e(e)}finally{h.f()}}return 1}var E=!p||m(n.firstName,n.lastName,n.dateOfBirth,n.emrIds,l),x=[];if(p){var A,k=u((null==i?void 0:i.children)||[]);try{for(k.s();!(A=k.n()).done;){var C=A.value;if(!y.has(C.id)){var I=C.dob.format("{iso-month}/{date}/{year}"),R=C.epicPatientIDs.map(function(e){return{ID:e.ID,Type:e.Type}});m(C.firstName,C.lastName,I,R,l)&&(y.add(C.id),x.push(d(C,i)))}}}catch(e){k.e(e)}finally{k.f()}}if(E||0===x.length){var P,T=null!=i&&null!==(P=i.children)&&void 0!==P&&P.length?i.children.map(function(e){return"".concat(e.firstName," ").concat(e.lastName)}):void 0;s.push({epicResult:n,pocketDocPatient:i||void 0,source:i?"both":"epic",firstName:n.firstName,lastName:n.lastName,preferredName:n.preferredName,dateOfBirth:n.dateOfBirth,phones:n.phones||[],address:n.address,gender:n.gender,email:n.email,emrIds:n.emrIds,pocketDocId:null==i?void 0:i.id,childrenNames:T})}s.push.apply(s,x)};for(k.s();!(S=k.n()).done;)C()}catch(e){k.e(e)}finally{k.f()}var I,R=u(t);try{var P=function(){var e=I.value;if(f.has(e.id))return 0;var t=e.dob.format("{iso-month}/{date}/{year}"),n=s.findIndex(function(n){return"epic"===n.source&&n.firstName.trim().toLowerCase()===e.firstName.trim().toLowerCase()&&n.lastName.trim().toLowerCase()===e.lastName.trim().toLowerCase()&&n.dateOfBirth===t&&function(e,t){if(!t)return!1;var n=(0,a.YO)(t);return!!n&&e.some(function(e){return(0,a.YO)(e)===n})}(n.phones,e.phone)});if(-1!==n){var i;if(s[n]=c(c({},s[n]),{},{source:"both",pocketDocPatient:e,pocketDocId:e.id,childrenNames:null!==(i=e.children)&&void 0!==i&&i.length?e.children.map(function(e){return"".concat(e.firstName," ").concat(e.lastName)}):s[n].childrenNames}),p){var g,h=u(e.children||[]);try{for(h.s();!(g=h.n()).done;){var v=g.value;if(!y.has(v.id)){var w=v.dob.format("{iso-month}/{date}/{year}"),b=v.epicPatientIDs.map(function(e){return{ID:e.ID,Type:e.Type}});m(v.firstName,v.lastName,w,b,l)&&(y.add(v.id),s.push(d(v,e)))}}}catch(e){h.e(e)}finally{h.f()}}return 0}var E,x=[].concat((0,r.A)(e.patientEpicMRN?[{ID:e.patientEpicMRN,Type:o.jv.UCSDMRN}
1]:[]),(0,r.A)(e.patientEpicId?[{ID:e.patientEpicId,Type:o.jv.EPI}]:[])),A=!p||m(e.firstName,e.lastName,t,x,l),S=p?e.children.filter(function(e){if(y.has(e.id))return!1;var t=e.dob.format("{iso-month}/{date}/{year}"),n=e.epicPatientIDs.map(function(e){return{ID:e.ID,Type:e.Type}});return m(e.firstName,e.lastName,t,n,l)}):[];(A||0===S.length)&&s.push({pocketDocPatient:e,source:"pocketdoc",firstName:e.firstName,lastName:e.lastName,dateOfBirth:t,phones:e.phone?[e.phone]:[],gender:e.gender,email:e.email,emrIds:x,pocketDocId:e.id,childrenNames:null!==(E=e.children)&&void 0!==E&&E.length?e.children.map(function(e){return"".concat(e.firstName," ").concat(e.lastName)}):void 0});var k,C=u(S);try{for(C.s();!(k=C.n()).done;){var R=k.value;y.add(R.id),s.push(d(R,e))}}catch(e){C.e(e)}finally{C.f()}};for(R.s();!(I=R.n()).done;)P()}catch(e){R.e(e)}finally{R.f()}return s}},44726:function(e,t,n){"use strict";n.d(t,{Lz:function(){return a},Vn:function(){return l},X1:function(){return i},YO:function(){return c}});var r=n(80296),i=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e},o=function(e){return e.split(/(\s+|-|')/).map(function(e){return/^\s+$/.test(e)||"-"===e||"'"===e?e:(t=e).charAt(0).toUpperCase()+t.slice(1).toLowerCase();var t}).join("")},a=function(e){var t={firstName:"",lastName:""},n=e.trim();if(""===n)return t;if(n.includes(",")){var i=n.split(",").map(function(e){return e.trim()}),a=(0,r.A)(i,2),l=a[0],c=a[1];return{firstName:o(c),lastName:o(l)}}var u=n.split(" ");return 0===u.length?t:1===u.length?{firstName:o(u[0]),lastName:""}:{firstName:o(u[0]),lastName:o(u.slice(1).join(" "))}},l=function(e){var t=(e=e.trim()).split("/"),n=(0,r.A)(t,3),i=n[0],o=n[1],a=n[2];return"".concat(a,"-").concat(i,"-").concat(o)},c=function(e){return e.replace(/\D/g,"").slice(-10)}},94644:function(e,t,n){"use strict";n.d(t,{T:function(){return r}});var r=function(e){return e.PhoneticNames="phonetic-names",e.ReferralsDirectory="referrals-directory",e.FeatureFlagging="feature-flagging",e.Billing="billing",e.PocketDocAgentFeatures="pocketdoc-agent-features",e.PocketDocAgentMasterAgent="pocketdoc-agent-features-master-agent",e.PocketDocAgentStandoutProviders="pocketdoc-agent-features-standout-providers",e.PocketDocAgentChatFeedback="pocketdoc-agent-features-chat-feedback",e}({})},56621:function(e,t,n){"use strict";n.d(t,{Lv:function(){return o},OO:function(){return u},Sn:function(){return s},j2:function(){return c},pV:function(){return l}});var r=n(23089),i=(n(84070),n(98605),n(89976),n(45862)),o={PATIENTS:"patients",WAITING_ROOM:"waiting-room",ACTIVE_CALLS:"active-calls",ACCOUNTLESS_ACTIVE_CALLS:"accountless-active-calls",VIDEO_VISITS:"video-visits"},a="production",l={DAILY_SCHEDULE:"daily-schedule",SESSIONS_V2:"sessionsV2",VIDEO_VISITS:"video-visits",PARTICIPANTS:"participants",RINGCENTRAL_ACTIVE_CALLS:a?"ringcentral-active-calls-".concat(a):"ringcentral-active-calls"};r.A.initializeApp(i.A.firebase);var c=r.A.auth(),u=r.A.database(),s=r.A.firestore()},13684:function(e,t,n){"use strict";var r=n(45458),i=n(14740),o=n(53273);t.A=function(e,t){var n=(0,i.O$)(function(e){return e.firebase.isAuthenticated});(0,o.Ij)(function(){if(n)return e()},t?[].concat((0,r.A)(t),[n]):[n])},n.dn(t.A)},53273:function(e,t,n){"use strict";n.d(t,{d7:function(){return o},Ij:function(){return c},lB:function(){return a.l}});var r=n(80296),i=n(96540);function o(e,t){var n=(0,i.useState)(e),o=(0,r.A)(n,2),a=o[0],l=o[1];return(0,i.useEffect)(function(){var n=setTimeout(function(){l(e)},t);return function(){return clearTimeout(n)}},[e]),a}var a=n(39529),l=n(39444);function c(e,t){return(0,i.useEffect)(e,(0,l.a)(t))}},39529:function(e,t,n){"use strict";n.d(t,{l:function(){return o}});var r=n(96540),i=n(39444);function o(e,t){return(0,r.useMemo)(e,(0,i.a)(t))}},39444:function(e,t,n){"use strict";n.d(t,{a:function(){return a}});var r=n(96540),i=n(30115),o=n.n(i);function a(e){var t=(0,r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},74096:function(e,t,n){"use strict";n.r(t),n.d(t,{camelToTitle:function(){return a},capitalize:function(){return i},formatDuration:function(){return c},formatPhone:function(){return l},title:function(){return o}});var r=n(35238),i=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},o=function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},a=function(e){return o(e.replace(/([A-Z])/g," $1"))},l=function(e){var t=e.match(/^(\+1)?(\d{3})(\s|\.|-)?(\d{3})(\s|\.|-)?(\d{4})$/);return t?"(".concat(t[2],") ").concat(t[4],"-").concat(t[6]):e},c=function(e){if(!e||Number.isNaN(Number(e))&&!(0,r.isSpacetime)(e))return"00:00:00";(0,r.isSpacetime)(e)&&(e=e.goto("America/Los_Angeles").diff((0,r.now)(),"second")),e=Math.abs(e);var t=Math.floor(e/3600).toFixed(0).padStart(2,"0");e%=3600;var n=Math.floor(e/60).toFixed(0).padStart(2,"0"),i=(e%60).toFixed(0).padStart(2,"0");return"".concat(t,":").concat(n,":").concat(i)}},20151:function(e,t,n){"use strict";n.d(t,{_J:function(){return o},LV:function(){return h},Ik:function(){return r},kB:function(){return i}});var r={};n.r(r),n.d(r,{getIceDescriptionString:function(){return p},getSDPDescriptionString:function(){return d},pick:function(){return y},stringifySpacetimeValues:function(){return f},traverse:function(){return g}});var i=n(35238),o=n(74096),a=n(64467),l=n(82284),c=n(79155),u=n.n(c);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?s(Object(n),!0).forEach(function(t){(0,a.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var d=function(e){return JSON.stringify({sdp:e})},p=function(e){return JSON.stringify({ice:e})},g=function(e,t){return e&&"object"===(0,l.A)(e)&&!(0,i.isSpacetime)(e)&&Object.keys(e).length>0?Object.keys(e).forEach(function(n){e[n]=g(e[n],t)}):e=t(e),e},f=function(e){return g(u()(e,!0),function(e){return(0,i.isSpacetime)(e)?(0,i.utcString)(e):e})},y=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return m(m({},t),{},(0,a.A)({},n,e[n]))},{})},h=n(91319)},35238:function(e,t,n){"use strict";n.r(t),n.d(t,{isSpacetime:function(){return l},now:function(){return i},parse:function(){return a},utcString:function(){return o}});var r=n(95533),i=function(){return r.A.now("America/Los_Angeles")},o=function(e){return e.format("iso-utc")},a=function(e){return(0,r.A)(e).goto("America/Los_Angeles")},l=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&(Object.prototype.hasOwnProperty.call(e,"epoch")&&Object.prototype.hasOwnProperty.call(e,"tz")&&Object.prototype.hasOwnProperty.call(e,"d")&&"function"==typeof e.toLocalDate&&(!!e.epoch||0===e.epoch))}},68634:function(e,t,n){"use strict";var r=n(71354),i=n.n(r),o=n(76314),a=n.n(o)()(i());a.push([e.id,"/*\n * provider-base-parity.css\n *\n * Provider's base layer used to come from twin.macro 2's <GlobalStyles/>. Under twin 3 with\n * corePlugins.preflight:false that emits only CSS-variable defaults, so provider takes its\n * reset from landing's static v1 snapshot instead. Three declarations differ between the two\n * resets; this restores provider's original values so the port renders identically.\n *\n * Import AFTER the landing base CSS.\n */\n\n/* twin 2 preflight: rgba(229,231,235,...) = #E5E7EB. landing v1 base hard-codes #e2e8f0. */\n*,\n::before,\n::after {\n    border-color: #E5E7EB;\n}\n\n/* twin 2 preflight resolved this from theme.colors.gray.400. landing v1 base uses #a0aec0. */\ninput::placeholder,\ntextarea::placeholder {\n    color: #9CA3AF;\n}\n\n/* twin 2 preflight shipped the modern-normalize mono stack; landing v1 base has monospace,monospace. */\ncode,\nkbd,\nsamp,\npre {\n    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;\n    font-size: 1em;\n}\n\n/* twin 2 preflight (modern-normalize) set these; the v1 base does not. */\nhtml {\n    -moz-tab-size: 4;\n    tab-size: 4;\n}\n","",{version:3,sources:["webpack://./src/assets/css/provider-base-parity.css"],names:[],mappings:"AAAA;;;;;;;;;EASE;;AAEF,2FAA2F;AAC3F;;;IAGI,qBAAqB;AACzB;;AAEA,6FAA6F;AAC7F;;IAEI,cAAc;AAClB;;AAEA,uGAAuG;AACvG;;;;IAII,wFAAwF;IACxF,cAAc;AAClB;;AAEA,yEAAyE;AACzE;IACI,gBAAgB;IAChB,WAAW;AACf",sourcesContent:["/*\n * provider-base-parity.css\n *\n * Provider's base layer used to come from twin.macro 2's <GlobalStyles/>. Under twin 3 with\n * corePlugins.preflight:false that emits only CSS-variable defaults, so provider takes its\n * reset from landing's static v1 snapshot instead. Three declarations differ between the two\n * resets; this restores provider's original values so the port renders identically.\n *\n * Import AFTER the landing base CSS.\n */\n\n/* twin 2 preflight: rgba(229,231,235,...) = #E5E7EB. landing v1 base hard-codes #e2e8f0. */\n*,\n::before,\n::after {\n    border-color: #E5E7EB;\n}\n\n/* twin 2 preflight resolved this from theme.colors.gray.400. landing v1 base uses #a0aec0. */\ninput::placeholder,\ntextarea::placeholder {\n    color: #9CA3AF;\n}\n\n/* twin 2 preflight shipped the modern-normalize mono stack; landing v1 base has monospace,monospace. */\ncode,\nkbd,\nsamp,\npre {\n    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;\n    font-size: 1em;\n}\n\n/* twin 2 preflight (modern-normalize) set these; the v1 base does not. */\nhtml {\n    -moz-tab-size: 4;\n    tab-size: 4;\n}\n"],sourceRoot:""}]),t.A=a},97874:function(e,t,n){e.exports={srcSet:n.p+"pocketdoc_logo.5c47adc6.png 1062w",images:[{path:n.p+"pocketdoc_logo.5c47adc6.png",width:1062,height:261}],src:n.p+"pocketdoc_logo.5c47adc6.png",toString:function(){return n.p+"pocketdoc_logo.5c47adc6.png"},width:1062,height:261}},17853:function(e,t,n){e.exports={srcSet:n.p+"post-call.d6759eea.png 512w",images:[{path:n.p+"post-call.d6759eea.png",width:512,height:431}],src:n.p+"post-call.d6759eea.png",toString:function(){return n.p+"post-call.d6759eea.png"},width:512,height:431}},54740:function(e,t,n){e.exports={srcSet:n.p+"secondary_logo.f56737ba.png 513w",images:[{path:n.p+"secondary_logo.f56737ba.png",width:513,height:490}],src:n.p+"secondary_logo.f56737ba.png",toString:function(){return n.p+"secondary_logo.f56737ba.png"},width:513,height:490}}}]);

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.