PageSourceSearch

https://app1.reachlink.com/static/js/25235.e41e5a6c.chunk.js

js reachlink.com collected 2026-10-02 06:28:11 UTC 144,672 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkreachlink_frontend=globalThis.webpackChunkreachlink_frontend||[]).push([[7165,25235],{66737(e,t,n){n.d(t,{A:()=>x});var s=n(64922),i=n(22921),o=n(20111),r=n(73605),a=n(95761),l=n(20500),c=n(3854),d=n(10508);function x({links:e,activeLast:t=!1,showBackButton:n=!1,...c}){const x=(0,i.Zp)(),m=e[e.length-1].name,p=e.map(e=>(0,s.jsx)(h,{link:e},e.name)),u=e.map(e=>(0,s.jsx)("div",{children:e.name!==m?(0,s.jsx)(h,{link:e}):(0,s.jsx)(o.A,{variant:"body2",sx:{maxWidth:260,overflow:"hidden",whiteSpace:"nowrap",color:"text.disabled",textOverflow:"ellipsis"},children:m})},e.name)),g=()=>{x(-1)},y=(0,s.jsx)(r.A,{separator:(0,s.jsx)(a.A,{component:"span",sx:{width:4,height:4,borderRadius:"50%",bgcolor:"text.disabled"}}),...c,children:t?p:u});return n?(0,s.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:2,height:"40px"},children:[(0,s.jsx)(l.A,{onClick:g,size:"medium","aria-label":"back",sx:{borderRadius:1,border:1,borderColor:"divider"},children:(0,s.jsx)(d.A,{icon:"material-symbols:arrow-back"})}),y]}):y}function h({link:e}){const{href:t,name:n,icon:o}=e;return(0,s.jsxs)(c.A,{variant:"body2",component:i.N_,to:t||"#",sx:{lineHeight:2,fontWeight:400,display:"flex",alignItems:"center",color:"text.primary","& > div":{display:"inherit"}},children:[o&&(0,s.jsx)(a.A,{sx:{mr:1,"& svg":{width:20,height:20}},children:o}),n]},n)}},2080(e,t,n){n.d(t,{A:()=>j});var s=n(64922),i=n(89437),o=n(95761),r=n(60509),a=n(20111),l=n(97581),c=n(64466),d=n(44870),x=n(6828),h=n(18604),m=n(82277),p=n(67619),u=n(10508),g=n(77810);function y(e){e.forEach(e=>{e&&(e.style.transform="scaleY(0.2)")})}const A=[.5,.75,1,.75,.5];function f({stream:e,isAudioEnabled:t,size:n=20}){const a=(0,i.A)(),l=function(e,t,n=4){const s=(0,g.useRef)([]);return(0,g.useEffect)(()=>{if(!e||!t)return void y(s.current);if(0===e.getAudioTracks().length)return void y(s.current);const i=new AudioContext,o=i.createAnalyser();o.fftSize=256,o.smoothingTimeConstant=.6;const r=i.createMediaStreamSource(e);r.connect(o);const a=new Uint8Array(o.frequencyBinCount),l=Math.floor(a.length/n)||1;let c=0;const d=()=>{o.getByteFrequencyData(a);for(let e=0;e<n;e+=1){let t=0;const n=e*l,i=n+l;for(let e=n;e<i;e+=1)t+=a[e];const o=t/l,r=.2+.8*Math.min(1,o/128),c=s.current[e];c&&(c.style.transform=`scaleY(${r})`)}c=requestAnimationFrame(d)};return c=requestAnimationFrame(d),()=>{cancelAnimationFrame(c),r.disconnect(),i.close(),y(s.current)}},[e,t,n]),s}(e??null,t,A.length);return(0,s.jsx)(r.A,{alignItems:"center",justifyContent:"center",sx:{width:n,height:n,borderRadius:"50%",overflow:"hidden",bgcolor:t?a.palette.primary.main:a.palette.common.white,transition:"background-color 0.3s ease"},children:(0,s.jsx)(c.N,{mode:"wait",children:t?(0,s.jsx)(r.A,{component:d.PY1.div,variants:p.MS,initial:"initial",animate:"animate",exit:"exit",direction:"row",alignItems:"center",justifyContent:"center",gap:.25,sx:{width:"100%",height:"100%",p:.5},children:A.map((e,t)=>(0,s.jsx)(o.A,{ref:e=>{l.current[t]=e},sx:{width:2,height:100*e+"%",borderRadius:1,bgcolor:a.palette.common.white,transform:"scaleY(0.2)",transformOrigin:"center"}},t))},"levels"):(0,s.jsx)(o.A,{component:d.PY1.div,variants:p.MS,initial:"initial",animate:"animate",exit:"exit",sx:{display:"flex"},children:(0,s.jsx)(u.A,{icon:"material-symbols:mic-off-outline",sx:{width:.6*n,height:.6*n,color:a.palette.grey[800]}})},"mic-off")})})}const j=({userName:e,isCameraEnabled:t,isAudioEnabled:n,avatarUrl:u,stream:g})=>{const y=(0,i.A)(),{translate:A}=(0,m.A)(),j=e.charAt(0).toUpperCase();return(0,s.jsxs)(o.A,{sx:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:[g&&(0,s.jsx)(x.A,{stream:g,muted:!0,mirror:!0,active:t,style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",backgroundColor:y.palette.tan.main}}),(0,s.jsx)(c.N,{children:!t&&(0,s.jsx)(r.A,{component:d.PY1.div,variants:p.MS,initial:"initial",animate:"animate",exit:"exit",sx:{position:"absolute",top:0,left:0,height:1,width:1,justifyContent:"center",alignItems:"center"},children:(0,s.jsx)(h.A,{alt:e,src:u,sx:{width:80,height:80,fontSize:48},children:j})},"avatar")}),(0,s.jsxs)(o.A,{sx:{position:"absolute",bottom:0,p:1.5,display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[(0,s.jsx)(o.A,{sx:{borderRadius:.5,px:.5,py:.25,bgcolor:t?(0,l.X4)(y.palette.common.black,.32):"transparent"},children:(0,s.jsxs)(a.A,{variant:"body2",sx:{color:t?y.palette.grey[0]:"inherit"},children:[e," ",A("sections.session.waitingRoom.you")]})}),(0,s.jsx)(f,{stream:g,isAudioEnabled:n,size:26})]})]})}},88653(e,t,n){n.d(t,{A:()=>a});var s=n(64922),i=n(95761),o=n(20111),r=n(10508);function a({icon:e,children:t,sx:n,textProps:a}){return(0,s.jsxs)(i.A,{sx:{display:"flex",alignItems:"center",...n},children:[(0,s.jsx)(r.A,{icon:e,flexShrink:0}),(0,s.jsx)(o.A,{variant:"body2",sx:{ml:1},...a,children:t})]})}}
1,3826(e,t,n){n.d(t,{A:()=>c});var s=n(64922),i=n(44870),o=n(46186),r=n(97581),a=n(95761),l=n(68070);(0,o.Ay)("div")(({theme:e})=>({right:0,bottom:0,zIndex:99999,width:"100%",height:"100%",position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.palette.background.default}));function c({isMain:e,sx:t,...n}){return(0,s.jsxs)(a.A,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",...t},children:[(0,s.jsx)(i.PY1.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(l.A,{disableLink:!0,mini:!0,width:"70%"})}),(0,s.jsx)(a.A,{component:i.PY1.div,animate:{scale:[1.2,1,1,1.2,1.2],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,borderRadius:"25%",position:"absolute",border:e=>`solid 3px ${(0,r.X4)(e.palette.primary.dark,.24)}`}}),(0,s.jsx)(a.A,{component:i.PY1.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,borderRadius:"25%",position:"absolute",border:e=>`solid 8px ${(0,r.X4)(e.palette.primary.dark,.24)}`}})]})}},18401(e,t,n){var s=n(64922),i=n(95761),o=n(48186);n.d(t,["$",0,({minHeight:e,children:t,sx:n,testId:r})=>{const a=(0,o.A)("up","lg")?"400px":"200px";return(0,s.jsx)(i.A,{"data-testid":r,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:e??a,...n},children:t})}])},82080(e,t,n){var s=n(64922),i=n(31699);n.d(t,["G",0,({children:e,sx:t})=>(0,s.jsx)(i.A,{sx:{p:3,width:1,position:"relative",border:e=>`solid 1px ${e.palette.grey[50032]}`,...t},children:e})])},16242(e,t,n){var s=n(64922),i=n(40373);const o=({size:e="medium",sx:t,...n})=>(0,s.jsx)(i.A,{size:e,sx:{borderRadius:"10px",...t},...n});n.d(t,["A",0,o])},19796(e,t,n){n.d(t,{BR:()=>d,a3:()=>r,m7:()=>o,vq:()=>a});var s=n(8312),i=n(94205);function o(e,t){try{return(0,i.bn)(e,t)}catch(n){return console.error(n),t}}function r(e,t){if(null==t)return"";return e("components.callConnect.common.durationValue",{minutes:Math.floor(t/60),seconds:t%60})}function a(e){if(null==e)return"";return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`}const l=[s.x4.IDLE,s.x4.RINGING],c=[s.x4.DISCONNECTED,s.x4.DECLINED,s.x4.NO_ANSWER];function d(e){return{providerGray:l.includes(e.providerCallStatus),providerGreen:e.providerCallStatus===s.x4.CONNECTED,providerRed:c.includes(e.providerCallStatus),clientGray:l.includes(e.clientCallStatus),clientGreen:e.clientCallStatus===s.x4.CONNECTED,clientRed:c.includes(e.clientCallStatus)}}},60672(e,t,n){n.d(t,{A:()=>A});var s=n(64922);var i=n(53040),o=n(6682),r=n(94119),a=n(80002),l=n(18875),c=n(54227),d=n(3706),x=n(76763);const h={image:"editor-image",ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",rtl:"rtl",text:{bold:"editor-text-bold",code:"editor-text-code",italic:"editor-text-italic",underline:"editor-text-underline"}};var m=n(34804),p=n(77810),u=n(76301),g=n(60509);const y={namespace:"Rich Text Editor",onError(e){throw e},theme:h},A=(0,p.forwardRef)(({onEditorStateChange:e,onTextChange:t,placeholder:n,initialState:h,initialEditable:A},f)=>{const j=(0,p.useRef)(null),[b,v]=(0,p.useState)(!1),[C,w]=(0,p.useState)(!1),[S,I]=(0,p.useState)(!1),[k,D]=(0,p.useState)(!1),[R,E]=(0,p.useState)(!1),[M,T]=(0,p.useState)(A??!0),N=(0,p.useCallback)(()=>{const e=(0,m.vJq)();(0,m.I2P)(e)&&(I(e.hasFormat("bold")),D(e.hasFormat("italic")),E(e.hasFormat("underline")))},[]),L=(0,p.useCallback)(e=>()=>{const t=(0,m.NiT)();if(null===t.getFirstChild()){const n=(0,m.lJ7)();n.append((0,m.sTu)(e)),t.append(n)}},[]),P=(0,p.useMemo)(()=>{if("string"===typeof h)try{const e=JSON.parse(h);return"root"===e?.root?.type?h:L(h)}catch{return L(h)}return h},[h,L]);return(0,p.useEffect)(()=>
1{if(j.current)return(0,u.Sd)(j.current.registerUpdateListener(({editorState:e})=>{e.read(()=>{N()})}),j.current.registerCommand(m.MvL,(e,t)=>(N(),!1),1),j.current.registerCommand(m.KfJ,e=>(v(e),!1),1),j.current.registerCommand(m.WWb,e=>(w(e),!1),1),j.current.registerEditableListener(e=>(T(e),!1)))},[N]),(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(o.n,{initialConfig:{...y,editable:A,editorState:P},children:(0,s.jsx)(g.A,{className:"editor-container",children:(0,s.jsxs)(g.A,{className:"editor-inner",sx:{color:"text.primary"},children:[(0,s.jsx)(c.$,{contentEditable:(0,s.jsx)(r.a,{className:"editor-input","aria-placeholder":n,placeholder:(0,s.jsx)("div",{className:"editor-placeholder",children:n})}),ErrorBoundary:a.R}),(0,s.jsx)(d.D,{onChange:n=>{t&&n.read(()=>{const e=(0,m.NiT)().getTextContent();t(e)}),e(JSON.stringify(n.toJSON()))},ignoreHistoryMergeTagChange:!0,ignoreSelectionChange:!0}),(0,s.jsx)(x.G,{editorRef:j}),(0,s.jsx)(l.G,{}),(0,s.jsx)(i.x,{})]})})})})})},254(e,t,n){n.d(t,{Gh:()=>a,N:()=>d,Ov:()=>r,jA:()=>c});const s=[{slug:"managing-intrusive-thoughts",version:1,pageCount:6,thumbnailPageIndex:1,sortKey:1},{slug:"behavior-chain-analysis",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:2},{slug:"yerkes-dodson-law",version:1,pageCount:3,sortKey:3},{slug:"socratic-questioning",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:4},{slug:"anger-diary",version:1,pageCount:9,thumbnailPageIndex:1,sortKey:5},{slug:"cognitive-behavioral-model",version:1,pageCount:2,sortKey:6},{slug:"emotion-log",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:7},{slug:"emotion-myths",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:8},{slug:"TIPP",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:9},{slug:"emotion-diary",version:1,pageCount:5,thumbnailPageIndex:1,sortKey:10},{slug:"imaginal-exposure",version:1,pageCount:3,thumbnailPageIndex:2,sortKey:11},{slug:"what-is-OCD",version:1,pageCount:5,sortKey:12},{slug:"ocd-subtypes",version:1,pageCount:2,sortKey:13},{slug:"wise-mind",version:1,pageCount:2,sortKey:14},{slug:"cycle-of-avoidance",version:1,pageCount:2,sortKey:15},{slug:"grief-roller-coaster",version:1,pageCount:2,sortKey:16},{slug:"exploring-anxiety",version:1,pageCount:2,sortKey:17},{slug:"boundary-types",version:1,pageCount:2,sortKey:18},{slug:"relationship-with-money",version:1,pageCount:2,sortKey:19},{slug:"maslow",version:1,pageCount:3,sortKey:20},{slug:"exploring-loneliness",version:1,pageCount:2,sortKey:21},{slug:"letter-to-a-relationship",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:22},{slug:"distress-tolerance",version:1,pageCount:4,sortKey:23},{slug:"stop-overthinking",version:1,pageCount:3,sortKey:24},{slug:"developing-a-growth-mindset",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:25},{slug:"emotion-regulation",version:1,pageCount:5,sortKey:26},{slug:"relationship-clarification-questions",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:27},{slug:"growth-mindset",version:1,pageCount:3,sortKey:28},{slug:"relationship-maintenance",version:1,pageCount:2,sortKey:29},{slug:"personal-values",version:1,pageCount:2,sortKey:30},{slug:"silver-linings",version:1,pageCount:2,thumbnailPageIndex:1,sortKey:31},{slug:"becoming-psychologically-flexible",version:1,pageCount:2,sortKey:32},{slug:"your-wisest-self",version:1,pageCount:2,sortKey:33},{slug:"creating-work-life-boundaries",version:1,pageCount:2,sortKey:34},{slug:"my-early-memories",version:1,pageCount:2,sortKey:35},{slug:"body-image-messages",version:1,pageCount:2,thumbnailPageIndex:1,sortKey:36},{slug:"seven-social-media-sins",version:1,pageCount:2,sortKey:37},{slug:"relationship-check-in",version:1,pageCount:3,sortKey:38},{slug:"cognitive-distortions",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:39},{slug:"pictures-of-me",version:1,pageCount:5,thumbnailPageIndex:1,sortKey:40},{slug:"therapy-goals",version:1,pageCount:2,sortKey:41},{slug:"money-beliefs-and-behaviors",version:1,pageCount:2,sortKey:42},{slug:"love-language-assessment",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:43},{slug:"letter-to-my-past-self",version:1,pageCount:3,sortKey:44},{slug:"coming-out",version:1,pageCount:3,sortKey:45},{slug:"coping-skills-log",version:1,pageCount:4,sortKey:46},{slug:"waking-up-refreshed",version:1,pageCount:4,sortKey:47},{slug:"habit-breakdown",version:1,pageCount:3,sortKey:48},{slug:"who-am-i",version:1,pageCount:5,thumbnailPageIndex:1,sortKey:49},{slug:"what-is-imposter-syndrome",version:1,pageCount:5,thumbnailPageIndex:1,sortKey:50},{slug:"childhood-depression",version:1,pageCount:5,thumbnailPageIndex:2,sortKey:51},{slug:"thought-defusion",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:52},{slug:"confronting-avoidance",version:1,pageCount:5,thumbnailPageIndex:1,sortKey:53},{slug:"rain",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:54},{slug:"improve-the-moment",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:55},{slug:"radical-acceptance-examples",version:1,thumbnailPageIndex:1,pageCount:3,sortKey:56},{slug:"grief-myths",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:57},{slug:"body-scan-script",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:58},{slug:"attachment-styles",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:59},{slug:"creating-secure-attachment",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:60},{slug:"gaslighting-warning-signs",version:1,pageCount:3,thumbnailPageIndex:1,sortKey:61},{slug:"relationship-green-flags",version:1,pageCount:4,thumbnailPageIndex:1,sortKey:62}],i=new Set(s.map(e=>e.slug)),o=new Map(s.filter(e=>void 0!==e.thumbnailPageIndex).map(e=>[e.slug,e.thumbnailPageIndex]));function r(e){return i.has(e)}function a(e){return o.get(e)??0}const l=new Map(s.map(e=>[e.slug,e.pageCount]));function c(e){return l.get(e)}function d(){return s}const x=s;n.d(t,["Ay",0,x])},25235(e,t,n){n.r(t),n.d(t,{default:()=>ss});var s=n(64922),i=n(12858),o=n(95761),r=n(60350),a=n(77810),l=n(22921),c=n(21234),d=n(52763),x=n(41902),h=n(82277),m=n(66561),p=n(73809);var u=n(40351),g=n(7165),y=n(67662),A=n(60509),f=n(64466),j=n(44870),b=n(78765),v=n.n(b);const C=JSON.parse('{"v":"5.7.4","fr":30,"ip":0,"op":60,"w":128,"h":128,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Video","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":45,"s":[-10]},{"t":59,"s":[0]}],"ix":10}
vendor: 5,245 bytes, line 1
1,"p":{"a":0,"k":[64.017,63.737,0],"ix":2,"l":2},"a":{"a":0,"k":[229,155.5,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.746,0.746,0.333],"y":[0,0,0]},"t":0,"s":[8,8,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":30,"s":[11,11,100]},{"t":59,"s":[8,8,100]}],"ix":6,"l":2}},"ao":0,"ef":[{"ty":21,"nm":"Fill","np":9,"mn":"ADBE Fill","ix":1,"en":1,"ef":[{"ty":10,"nm":"Fill Mask","mn":"ADBE Fill-0001","ix":1,"v":{"a":0,"k":0,"ix":1}},{"ty":7,"nm":"All Masks","mn":"ADBE Fill-0007","ix":2,"v":{"a":0,"k":0,"ix":2}},{"ty":2,"nm":"Color","mn":"ADBE Fill-0002","ix":3,"v":{"a":0,"k":[1,1,1,1],"ix":3}},{"ty":7,"nm":"Invert","mn":"ADBE Fill-0006","ix":4,"v":{"a":0,"k":0,"ix":4}},{"ty":0,"nm":"Horizontal Feather","mn":"ADBE Fill-0003","ix":5,"v":{"a":0,"k":0,"ix":5}},{"ty":0,"nm":"Vertical Feather","mn":"ADBE Fill-0004","ix":6,"v":{"a":0,"k":0,"ix":6}},{"ty":0,"nm":"Opacity","mn":"ADBE Fill-0005","ix":7,"v":{"a":0,"k":1,"ix":7}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[31.777,0],[0,0],[0,31.776],[0,0],[-31.726,0],[0,0],[0,-32.373],[0,0],[0,0],[-3.432,0.597]],"o":[[0,0],[0,0],[0,31.776],[0,0],[-31.726,0],[0,0],[0,-31.776],[0,0],[31.777,0],[0,0],[0,0],[2.884,-1.741],[0,0]],"v":[[228.5,118.701],[127.9,66.734],[127.9,97.318],[70.116,155.102],[-170.766,155.102],[-228.5,97.318],[-228.5,-97.317],[-170.766,-155.101],[70.116,-155.101],[127.9,-97.317],[127.9,-67.283],[218.007,-119.298],[227.804,-123.325]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[228.75,155.352],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Dark","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":45,"s":[-10]},{"t":59,"s":[0]}],"ix":10},"p":{"a":0,"k":[63.992,63.798,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.746,0.746,0.333],"y":[0,0,0]},"t":0,"s":[10,10,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":30,"s":[99,99,100]},{"t":59,"s":[10,10,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[128,128],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.152941182256,0.364705890417,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,-0.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Light","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":45,"s":[-10]},{"t":59,"s":[0]}],"ix":10},"p":{"a":0,"k":[63.992,64.465,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.746,0.746,0.333],"y":[0,0,0]},"t":0,"s":[90,90,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":30,"s":[99,99,100]},{"t":59,"s":[90,90,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[128,128],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.239215686917,0.474509805441,0.960784316063,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,-0.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0}],"markers":[]}');var w=n(67619),S=n(85747),I=n(861),k=n(20111),D=n(12398),R=n(11029),E=n(29506),M=n(95125),T=n(83149),N=n(10508),L=n(75421);const P=({assessmentsToTake:e})=>{const{translate:t}=(0,h.A)(),n=(0,a.useMemo)(()=>e.map(e=>{const n=T.EA[e];return{type:e,fullName:n.fullName,description:t("constants.assessment.types."+(0,L.p)(e)+".description",{defaultValue:n.description}),numQuestions:n.numQuestions}}),[e,t]),i=(0,a.useMemo)(()=>n.reduce((e,t)=>
1e+t.numQuestions,0),[n]);return(0,s.jsx)(M.A,{variant:"outlined",sx:{backgroundColor:"transparent",width:"100%",p:3},children:(0,s.jsxs)(A.A,{gap:2,children:[(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:2},children:(0,s.jsxs)(A.A,{direction:"row",gap:1,children:[(0,s.jsx)(N.A,{icon:"mdi:clipboard-text-outline",width:20,height:20,sx:{color:"text.secondary",flexShrink:0,pt:.25}}),(0,s.jsx)(k.A,{variant:"body2",textAlign:"left",children:t("sections.main.assessment.preview.aboutToTake",{count:e.length,plural:e.length>1?"s":""})})]})}),(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:2},children:(0,s.jsxs)(A.A,{direction:"row",gap:1,children:[(0,s.jsx)(N.A,{icon:"mdi:information-outline",width:20,height:20,sx:{color:"text.secondary",flexShrink:0,pt:.25}}),(0,s.jsx)(k.A,{variant:"body2",textAlign:"left",children:t("sections.main.assessment.preview.totalQuestions",{count:i})})]})}),n.map((e,n)=>(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:2},children:(0,s.jsxs)(A.A,{direction:"row",gap:1,children:[(0,s.jsx)(N.A,{icon:0===n?"mdi:clipboard-check-outline":"mdi:cl
1ipboard-plus-outline",width:20,height:20,sx:{color:"text.secondary",flexShrink:0,pt:.25}}),(0,s.jsxs)(A.A,{gap:.5,children:[(0,s.jsxs)(k.A,{variant:"body2",textAlign:"left",fontWeight:"bold",children:[e.fullName," (",t("sections.main.assessment.preview.questionCount",{count:e.numQuestions}),")"]}),(0,s.jsx)(k.A,{variant:"body2",textAlign:"left",children:e.description})]})]})},e.type)),(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:2},children:(0,s.jsxs)(A.A,{direction:"row",gap:1,children:[(0,s.jsx)(N.A,{icon:"material-symbols:info-outline",width:20,height:20,sx:{color:"text.secondary",flexShrink:0,pt:.25}}),(0,s.jsxs)(A.A,{gap:.5,children:[(0,s.jsx)(k.A,{variant:"body2",textAlign:"left",fontWeight:"bold",children:t("sections.main.assessment.preview.pleaseAnswer")}),(0,s.jsxs)(k.A,{variant:"body2",textAlign:"left",children:["\u2022 ",t("sections.main.assessment.preview.noRightWrong"),(0,s.jsx)("br",{}),"\u2022 ",t("sections.main.assessment.preview.takeTime"),(0,s.jsx)("br",{}),"\u2022"," ",t("sections.main.assessment.preview.progressSaved")]})]})]})})]})})},z=({open:e,assessmentsToTake:t,onTakeAssessments:n,onMaybeLater:i})=>{const{translate:r}=(0,h.A)();return(0,s.jsxs)(S.A,{open:e,onClose:i,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(I.A,{sx:{paddingBottom:3},children:(0,s.jsx)(o.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:(0,s.jsx)(k.A,{variant:"h6",children:r("sections.session.waitingRoom.assessmentDialogTitle")})})}),(0,s.jsxs)(D.A,{sx:{paddingBottom:0,gap:2},children:[(0,s.jsxs)(A.A,{sx:{gap:.5},children:[(0,s.jsx)(k.A,{variant:"body2",color:"text.primary",children:r("sections.session.waitingRoom.assessmentDialogDescription")}),(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",sx:{mb:3},children:r("sections.session.waitingRoom.assessmentDialogSubDescription")})]}),(0,s.jsx)(P,{assessmentsToTake:t})]}),(0,s.jsxs)(R.A,{children:[(0,s.jsx)(E.A,{variant:"outlined",color:"inherit",onClick:i,children:r("sections.session.waitingRoom.maybeLater")}),(0,s.jsx)(E.A,{variant:"contained",color:"primary",onClick:n,children:r("sections.main.assessment.preview.takeAssessments")})]})]})};var W=n(35727),F=n(50552),B=n(20396);function O({open:e,onClose:t,onConfirm:n,loading:i=!1}){const{translate:o}=(0,h.A)();return(0,s.jsxs)(F.A,{onClose:t,"aria-labelledby":"call-connect-cancel-call-dialog",open:e,maxWidth:"xs",fullWidth:!0,children:[(0,s.jsx)(B.A,{onClose:t,children:o("components.callConnect.provider.cancelDialog.title")}),(0,s.jsx)(D.A,{sx:{p:0,rowGap:3,display:"flex",flexDirection:"column"},children:(0,s.jsx)(k.A,{variant:"body1",sx:{color:"text.secondary"},children:o("components.callConnect.provider.cancelDialog.description")})}),(0,s.jsxs)(R.A,{children:[(0,s.jsx)(E.A,{variant:"outlined",onClick:()=>t(),disabled:i,children:o("components.callConnect.common.goBack")}),(0,s.jsx)(W.A,{onClick:()=>n(),variant:"contained",loading:i,children:o("components.callConnect.common.confirm")})]})]})}function $({open:e,onClose:t,onConfirm:n,loading:i=!1}){const{translate:o}=(0,h.A)();return(0,s.jsxs)(F.A,{onClose:t,"aria-labelledby":"call-connect-rejoin-video-session-dialog",open:e,maxWidth:"xs",fullWidth:!0,children:[(0,s.jsx)(B.A,{onClose:t,children:o("components.callConnect.provider.rejoinDialog.title")}),(0,s.jsx)(D.A,{sx:{p:0,rowGap:3,display:"flex",flexDirection:"column"},children:(0,s.jsx)(k.A,{variant:"body1",sx:{color:"text.secondary"},children:o("components.callConnect.provider.rejoinDialog.description")})}),(0,s.jsxs)(R.A,{children:[(0,s.jsx)(E.A,{variant:"outlined",onClick:()=>t(),disabled:i,children:o("components.callConnect.common.goBack")}),(0,s.jsx)(W.A,{onClick:()=>n(),variant:"contained",loading:i,children:o("components.callConnect.common.confirm")})]})]})}var H=n(50376),V=n(95671),G=n(8312),_=n(18401),Y=n(3826),K=n(15537),q=n.n(K),U=n(19796);function J({appointment:e,toggleShowCallConnect:t}){const{translate:n}=(0,h.A)(),{enqueueSnackbar:i}=(0,H.dh)(),[r,l]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),[x,m]=(0,a.useState)(!1),{callConnect:p,isStatusLoading:u,statusError:g,startCallConnect:y,cancelCallConnect:f,endCallConnect:j,isStarting:b,isCancelling:v,isEnding:C,refetchStatus:w}=(0,G.Ay)({appointmentId:e?.appointmentId}),S=p?.callConnectStatus===G.NL.WAITING||p?.callConnectStatus===G.NL.ON_CALL,I=(0,a.useCallback)(()=>{w().catch(()=>{})},[w]),D=(0,a.useCallback)(async()=>
1{if(!p)return!0;const e=p.callConnectStatus===G.NL.ON_CALL;try{return e?await j(p.callConnectId):await f(p.callConnectId),!0}catch(t){return i(n(e?"components.callConnect.common.endError":"components.callConnect.common.cancelError"),{variant:"error"}),!1}finally{I()}},[p,j,f,i,n,I]),R=(0,a.useCallback)(async()=>{await D(),l(!1)},[D]),M=(0,a.useCallback)(async()=>{const e=!p||!S||await D();d(!1),e&&t(!1)},[p,S,D,t]),T=(0,a.useCallback)(async()=>{m(!0);try{await w()}catch(e){}finally{m(!1)}},[w]),N=(0,a.useCallback)(async()=>{try{await y()}catch(e){I(),i((0,U.m7)(e,n("components.callConnect.common.startError")),{variant:"error"})}},[y,i,n,I]),{title:L,description:P}=(0,a.useMemo)(()=>{if(!p)return{title:"",description:""};const t=e?.client.name,{providerGray:s,providerGreen:i,clientGray:o,clientGreen:r}=(0,U.BR)(p),a=p.attempts>0,l=p.callConnectStatus===G.NL.FAILED,c=t,d={name:c,attempts:p.attempts,maxAttempts:p.maxAttempts},x=p.attempts===p.maxAttempts,h=p.attempts>1?"titleStill":"title";if(p.callConnectStatus===G.NL.CANCELLED)return{title:n("components.callConnect.provider.status.cancelled.title")};if(l&&p.clientCallStatus===G.x4.DECLINED)return{title:n("components.callConnect.provider.status.clientDeclined.title",{name:c}),description:n("components.callConnect.provider.status.clientDeclined.description",{name:c})};if(l&&p.providerCallStatus===G.x4.DECLINED)return{title:n("components.callConnect.provider.status.youDeclined.title"),description:n("components.callConnect.provider.status.youDeclined.description")};if(l&&p.clientCallStatus===G.x4.NO_ANSWER)return{title:n("components.callConnect.provider.status.clientNoAnswer.title",{name:c}),description:n("components.callConnect.provider.status.clientNoAnswer.description",{name:c})};if(l&&p.providerCallStatus===G.x4.NO_ANSWER)return{title:n("components.callConnect.provider.status.bothNoAnswer.title",{name:c}),description:n("components.callConnect.provider.status.bothNoAnswer.description",{name:c})};if(l&&p.providerCallStatus===G.x4.IDLE&&p.clientCallStatus===G.x4.IDLE)return{title:n("components.callConnect.common.internalError.title"),description:n("components.callConnect.common.internalError.description")};if(l)return V.wd("Unhandled Call Connect status (provider-1)",{level:"warning",extra:{callConnect:p}}),{title:"",description:""};if(s&&o&&a){const e=n(x?"components.callConnect.common.finalAttempt":"components.callConnect.common.retryingCall");return{title:`${n(`components.callConnect.provider.status.bothNotAnswering.${h}`,{name:c})} ${e}`,description:n("components.callConnect.provider.status.bothNotAnswering.description",d)}}if(s&&o)return{title:n("components.callConnect.provider.status.connecting.title"),description:n("components.callConnect.provider.status.connecting.description",{name:c})};if(i&&o&&a){const e=x?n("components.callConnect.common.finalAttempt"):n("components.callConnect.provider.status.clientNotAnswering.retryingCallTo",{name:c});return{title:`${n(`components.callConnect.provider.status.clientNotAnswering.${h}`,{name:c})} ${e}`,description:n("components.callConnect.provider.status.clientNotAnswering.description",d)}}if(i&&o)return{title:n("components.callConnect.provider.status.waitingForClient.title",{name:c}),description:n("components.callConnect.provider.status.waitingForClient.description",{name:c})};if(p.callConnectStatus===G.NL.COMPLETED)return{title:n("components.callConnect.provider.status.completed.title"),description:n("components.callConnect.provider.status.completed.description")};if(i&&r)return{title:n("components.callConnect.provider.status.inProgress.title"),description:n("components.callConnect.provider.status.inProgress.description",{name:c})};if(p.callConnectStatus===G.NL.WAITING&&i&&p.clientCallStatus===G.x4.NO_ANSWER){const e=x?n("components.callConnect.common.finalAttempt"):n("components.callConnect.provider.status.clientNotAnswering.retryingCallTo",{name:c});return{title:`${n(`components.callConnect.provider.status.clientNotAnswering.${h}`,{name:c})} ${e}`,description:n("components.callConnect.provider.status.clientNotAnswering.description",d)}}return V.wd("Unhandled Call Connect status (provider-2)",{level:"warning",extra:{callConnect:p}}),{title:"",description:""}},[p,e,n]),[z,F]=(0,a.useState)(()=>q()());(0,a.useEffect)(()=>
1{if(!p?.callStartTime)return;const e=setInterval(()=>F(q()()),1e3);return()=>clearInterval(e)},[p?.callStartTime]);const B=(0,a.useMemo)(()=>{if(!p?.callStartTime)return null;const e=z.diff(q()(p.callStartTime),"seconds");return(0,U.vq)(Math.max(0,e))},[p?.callStartTime,z]);if(u)return(0,s.jsx)(_.$,{children:(0,s.jsx)(Y.A,{})});if(!p){const e=Boolean(g);return(0,s.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",p:3,rowGap:3},children:[(0,s.jsx)(A.A,{direction:"row",children:(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_gray.svg",alt:"",sx:{width:100,height:100}})}),(0,s.jsxs)(A.A,{sx:{alignItems:"center",maxWidth:"800px",rowGap:1.25},children:[(0,s.jsx)(k.A,{sx:{textAlign:"center"},variant:"h6",children:n(e?"components.callConnect.common.statusError.title":"components.callConnect.common.noCall.title")}),(0,s.jsx)(k.A,{variant:"body2",sx:{textAlign:"center",color:"text.secondary"},children:n(e?"components.callConnect.common.statusError.description":"components.callConnect.common.noCall.description")})]}),(0,s.jsxs)(A.A,{direction:"row",columnGap:1.25,py:2,children:[(0,s.jsx)(E.A,{variant:"outlined",onClick:()=>t(!1),children:n("components.callConnect.common.exitPage")}),e?(0,s.jsx)(W.A,{variant:"contained",onClick:T,loading:x,children:n("components.callConnect.common.tryAgain")}):(0,s.jsx)(W.A,{variant:"contained",onClick:N,loading:b,children:n("components.callConnect.common.callAgain")})]})]})}const{providerGray:K,providerGreen:J,providerRed:Q,clientGray:X,clientGreen:Z,clientRed:ee}=(0,U.BR)(p);return p.callConnectStatus===G.NL.FAILED||p.callConnectStatus===G.NL.CANCELLED?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",p:3,rowGap:3},children:[(0,s.jsx)(A.A,{direction:"row",children:(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_red_cross.svg",alt:"",sx:{width:100,height:100}})}),(0,s.jsxs)(A.A,{sx:{alignItems:"center",maxWidth:"800px",rowGap:1.25},children:[(0,s.jsx)(k.A,{sx:{textAlign:"center"},variant:"h6",children:L}),(0,s.jsx)(k.A,{variant:"body2",sx:{textAlign:"center",color:"text.secondary"},children:P})]}),(0,s.jsxs)(A.A,{direction:"row",columnGap:1.25,py:2,children:[(0,s.jsx)(E.A,{variant:"outlined",onClick:()=>t(!1),children:n("components.callConnect.common.exitPage")}),(0,s.jsx)(W.A,{variant:"contained",onClick:N,loading:b,children:n("components.callConnect.common.callAgain")}),(0,s.jsx)(E.A,{variant:"contained",onClick:()=>d(!0),children:n("components.callConnect.common.rejoinVideoSession")})]})]}),(0,s.jsx)($,{open:c,onClose:()=>d(!1),onConfirm:M,loading:v||C})]}):p.callConnectStatus===G.NL.COMPLETED?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",p:3,rowGap:3},children:[(0,s.jsx)(A.A,{direction:"row",children:(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_green_check.svg",alt:"",sx:{width:100,height:100}})}),(0,s.jsxs)(A.A,{sx:{alignItems:"center",maxWidth:"800px",rowGap:1.25},children:[(0,s.jsx)(k.A,{sx:{textAlign:"center"},variant:"h6",children:L}),null!=p.callDuration&&(0,s.jsx)(k.A,{variant:"body2",children:n("components.callConnect.common.durationLabel",{duration:(0,U.a3)(n,p.callDuration)})}),(0,s.jsx)(k.A,{variant:"body2",sx:{textAlign:"center",color:"text.secondary"},children:P})]}),(0,s.jsxs)(A.A,{direction:"row",columnGap:1.25,py:2,children:[(0,s.jsx)(E.A,{variant:"outlined",onClick:()=>t(!1),children:n("components.callConnect.common.exitPage")}),(0,s.jsx)(W.A,{variant:"contained",onClick:N,loading:b,children:n("components.callConnect.common.callAgain")}),(0,s.jsx)(E.A,{variant:"contained",onClick:()=>d(!0),children:n("components.callConnect.common.rejoinVideoSession")})]}),p.isClientInVideoSession&&(0,s.jsx)(A.A,{direction:"row",columnGap:1.25,children:(0,s.jsx)(k.A,{variant:"body2",color:"text.primary",children:n("components.callConnect.provider.clientInVideoSession",{name:e?.client.firstName})})})]}),(0,s.jsx)($,{open:c,onClose:()=>d(!1),onConfirm:M,loading:v||C})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",p:3,rowGap:3},children:[(0,s.jsxs)(A.A,{direction:"row",children:[(0,s.jsxs)(s.Fragment,{children:[K&&(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_gray.svg",alt:"",sx:{width:100,height:100}}),J&&(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_green.svg",alt:"",sx:{width:100,height:100}}),Q&&(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_red.svg",alt:"",sx:{width:100,height:100}})]}),(0,s.jsxs)(s.Fragment,{children:[p.callConnectStatus===G.NL.ON_CALL?(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/check_large.svg",alt:"",sx:{width:100,height:100}}):(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/four_dots.svg",alt:"",sx:{width:100,height:100}}),X&&(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_gray.svg",alt:"",sx:{width:100,height:100}}),Z&&(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_green.svg",alt:"",sx:{width:100,height:100}}),ee&&(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/callconnect/phone_red.svg",alt:"",sx:{width:100,height:100}})]})]}),(0,s.jsxs)(A.A,{sx:{alignItems:"center",maxWidth:"800px",rowGap:1.25},children:[(0,s.jsx)(k.A,{sx:{textAlign:"center"},variant:"h6",children:L}),null!=B&&(0,s.jsx)(k.A,{variant:"body2",children:n("components.callConnect.common.durationLabel",{duration:B})}),(0,s.jsx)(k.A,{variant:"body2",sx:{textAlign:"center",color:"text.secondary"},children:P})]}),(0,s.jsxs)(A.A,{direction:"row",columnGap:1.25,py:2,children:[(0,s.jsx)(E.A,{variant:"outlined",onClick:()=>l(!0),children:p.callConnectStatus===G.NL.ON_CALL?n("components.callConnect.common.endCall"):n("components.callConnect.common.cancelCall")}),(0,s.jsx)(E.A,{variant:"contained",onClick:()=>d(!0),children:n("components.callConnect.common.rejoinVideoSession")})]}),p.isClientInVideoSession&&(0,s.jsx)(A.A,{direction:"row",columnGap:1.25,children:(0,s.jsx)(k.A,{variant:"body2",color:"text.primary",children:n("components.callConnect.provider.clientInVideoSession",{name:e?.client.firstName})})})]}),(0,s.jsx)(O,{open:r,onClose:()=>l(!1),onConfirm:R,loading:v||C}),(0,s.jsx)($,{open:c,onClose:()=>d(!1),onConfirm:M,loading:v||C})]})}
1var Q=n(1310),X=n(66737),Z=n(59980),ee=n(41147);const te=()=>{const{isClient:e}=(0,x.A)(),{translate:t}=(0,h.A)(),n=t(e?"sections.session.waitingRoom.clientEapDisclaimer":"sections.session.waitingRoom.providerEapDisclaimer").split("\n").filter(e=>e.trim());return(0,s.jsx)(A.A,{gap:2,children:n.map((e,t)=>(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:2},children:(0,s.jsxs)(A.A,{direction:"row",gap:1,children:[(0,s.jsx)(N.A,{icon:"material-symbols:info-outline",width:20,height:20,sx:{color:"text.secondary",flexShrink:0,pt:.25}}),(0,s.jsx)(k.A,{variant:"body2",textAlign:"left",children:e})]})},t))})};var ne=n(8543),se=n(12123),ie=n(46418);function oe(e,t){const[n,s]=(0,a.useState)(null),{data:i,loading:o}=(0,se.I)(ie.Em4,{fetchPolicy:"cache-and-network",variables:{clientUserId:e},skip:t});return(0,a.useEffect)(()=>{if(!i)return;const e=i.policies.find(e=>e.type===Z.tt.EAP&&e.isPrimary);s(e?{authorized:e.authorizedSessions,used:e.usedSessions,remaining:e.authorizedSessions-(e?.usedSessions??0),isEap:!0}:{isEap:!1})},[i]),{...n,loading:o}}const re=({icon:e,children:t})=>(0,s.jsxs)(A.A,{direction:"row",alignItems:"center",gap:1,children:[(0,s.jsx)(N.A,{icon:e,width:20,height:20,sx:{color:"text.secondary"}}),(0,s.jsx)(k.A,{variant:"body2",children:t})]}),ae=({appointment:e})=>{const{isClient:t,user:n}=(0,x.A)(),{translate:i}=(0,h.A)(),{loading:o,remaining:r}=oe(e.client.userId),l=(0,a.useMemo)(()=>Boolean(n&&e.guestIds?.find(e=>Number(e)===n.userId)),[e.guestIds,n]),c=e.client.clientProfile?.coverageType===Z.Fp.EAP,d=q()(e.startDateTime).tz(e.scheduledTimezone),m=q()(e.endDateTime).tz(e.scheduledTimezone),p=`${d.format("h:mm a")} - ${m.format("h:mm a (z)")} | ${e.duration} min`;return(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:2},children:(0,s.jsxs)(A.A,{gap:2,children:[(0,s.jsx)(re,{icon:"mdi:message-outline",children:i(`components.labels.status.sessionType.${e.sessionType?.toLowerCase()}`,{defaultValue:e.sessionType})}),(0,s.jsx)(re,{icon:"mdi:clock-time-four-outline",children:p}),e.sessionNumber&&(0,s.jsx)(re,{icon:"ant-design:bulb-twotone",children:l?i("sections.session.waitingRoom.guestSession"):t?i("sections.session.waitingRoom.thisIsYourSession",{count:Number(e.sessionNumber),ordinal:!0}):i("sections.session.waitingRoom.thisIsClientSession",{clientName:e.client.nickName||e.client.firstName,count:Number(e.sessionNumber),ordinal:!0})}),c&&(0,s.jsx)(re,{icon:"icon-park-outline:appointment",children:o?(0,s.jsx)(ne.A,{variant:"text",width:160}):i("sections.session.waitingRoom.remainingEapSessions",{remaining:r})})]})})};var le=n(20500),ce=n(89437),de=n(97581),xe=n(16242),he=n(2080),me=n(11106),pe=n(52850),ue=n(83806);const ge=({appointment:e,onJoin:t,joining:n=!1,disabled:i=!1,tooLate:r=!1})=>{const l=(0,me.A)(),{localStream:c,isStarting:d,startError:m}=l.state,[p,u]=(0,a.useState)(()=>(0,pe.l)(c,"audio")),[g,f]=(0,a.useState)(()=>(0,pe.l)(c,"video")),{user:j}=(0,x.A)(),{translate:b}=(0,h.A)(),{enqueueSnackbar:v}=(0,H.dh)(),C=(0,ce.A)(),{localVideoOptions:w,setLocalVideoOptions:S}=(0,y.b)(),{toggleCameraEnabled:I,toggleMicrophoneEnabled:D}=l.actions,R=(0,a.useMemo)(()=>c?c.getAudioTracks().map(e=>`${e.id}:${e.readyState}:${e.enabled}`).join("|"):"",[c]),E=(0,a.useMemo)(()=>c?c.getVideoTracks().map(e=>`${e.id}:${e.readyState}:${e.enabled}`).join("|"):"",[c]),T=(0,a.useMemo)(()=>e.client.nickName||e.client.name,[e.client.nickName,e.client.name]),L=(0,a.useMemo)(()=>Boolean(j&&e.guestIds?.find(e=>Number(e)===j.userId)),[e.guestIds,j]),P=(0,a.useMemo)(()=>q()(e.startDateTime).tz(e.scheduledTimezone),[e.startDateTime,e.scheduledTimezone]),z=(0,a.useMemo)(()=>q()(e.endDateTime).tz(e.scheduledTimezone),[e.endDateTime,e.scheduledTimezone]),F=r?z:P,B=(0,a.useMemo)(()=>F.isSame(q()(),"day"),[F]),O=(0,a.useMemo)(()=>b(B?"sections.session.waitingRoom.todayDateTime":"sections.session.waitingRoom.dateTime",{date:F.format("D MMM YYYY"),time:F.format("h:mm a")}),[b,B,F]);return(0,a.useEffect)(()=>{u((0,pe.l)(c,"audio"))},[R,c]),(0,a.useEffect)(()=>{f((0,pe.l)(c,"video"))},[E,c]),(0,a.useEffect)(()=>{S({...w(),micOn:p,cameraOn:g})},[p,g]),(0,s.jsx)(M.A,{sx:{backgroundColor:"tan.lighter",boxShadow:"none",p:3},children:(0,s.jsxs)(Q.Ay,{container:!0,spacing:{xs:3,md:10},alignItems:"flex-start",children:[(0,s.jsx)(Q.Ay,{item:!0,xs:12,md:6,children:(0,s.jsxs)(A.A,{gap:3,alignItems:"center",justifyContent:"center",children:[(0,s.jsx)(o.A,{sx:{width:"100%",height:250,borderRadius:1.5,overflow:"hidden",border:"1px solid rgba(158, 158, 158, 0.32)",position:"relative"},children:(0,s.jsx)(he.A,{userName:T,isCameraEnabled:g,isAudioEnabled:p,stream:c})}),(0,s.jsxs)(A.A,{direction:"row",gap:2.5,alignItems:"center",justifyContent:"center",children:[(0,s.jsx)(le.A,{onClick:()=>{const e=!p;u(e);try{D(e)}catch(t){u(!e),v((0,ue.f)(t),{variant:"error"})}},disabled:d,sx:{width:40,height:40,border:`1px solid ${C.palette.divider}`},children:(0,s.jsx)(N.A,{icon:p?"material-symbols:mic-outline":"material-symbols:mic-off-outline",sx:{color:p?C.palette.text.primary:C.palette.error.main}})}),(0,s.jsx)(le.A,{onClick:()=>{const e=!g;f(e);try{I(e)}catch(t){f(!e),v((0,ue.f)(t),{variant:"error"})}},disabled:d,sx:{width:40,height:40,border:`1px solid ${C.palette.divider}`},children:(0,s.jsx)(N.A,{icon:g?"material-symbols:videocam-outline":"material-symbols:videocam-off-outline",sx:{color:g?C.palette.text.primary:C.palette.error.main}})})]})]})}),(0,s.jsx)(Q.Ay,{item:!0,xs:12,md:6,children:(0,s.jsxs)(A.A,{sx:{ga
1p:2,justifyContent:"center",height:{xs:"auto",md:250}},children:[(0,s.jsx)(k.A,{variant:"h4",sx:{fontFamily:C.typography.fontFamily,fontWeight:"bold"},children:e.provider.name}),(0,s.jsx)(xe.A,{label:`${b(r?"sections.session.waitingRoom.ended":"sections.session.waitingRoom.onTime")} | ${O}`,sx:{backgroundColor:(0,de.X4)(r?C.palette.error.main:C.palette.success.main,.16),color:r?C.palette.error.main:C.palette.success.main,fontWeight:C.typography.fontWeightMedium,alignSelf:"flex-start"}}),(0,s.jsx)(W.A,{id:"RTCJoinSessionButton",variant:"contained",color:L?"secondary":"primary",size:"large",onClick:t,startIcon:(0,s.jsx)(N.A,{icon:"eva:arrow-forward-fill",width:20,height:20}),disabled:i,loading:n,sx:{alignSelf:"flex-start",px:2},children:b(L?"sections.session.waitingRoom.joinAsGuest":"sections.session.waitingRoom.joinSession")}),Boolean(m)&&(0,s.jsxs)(k.A,{variant:"body2",sx:{color:C.palette.error.main},children:[(0,ue.f)(m),"sdfsdfsdfsdf"]})]})})]})})},ye=({appointment:e,joinSession:t,isSessionLoading:n,tooEarly:i,tooLate:o})=>{const{translate:r}=(0,h.A)(),a=e.client.clientProfile?.coverageType===Z.Fp.EAP;return(0,s.jsxs)(A.A,{component:j.PY1.div,variants:w.OE,initial:"initial",animate:"animate",exit:"exit",sx:{gap:3},children:[(0,s.jsx)(A.A,{component:j.PY1.div,variants:w.JA,direction:"row",alignItems:"center",gap:2,children:(0,s.jsx)(X.A,{links:[{name:"Home",href:ee.uN.general.dashboard},{name:"Appointments",href:ee.uN.general.appointments},{name:e.provider.name}],showBackButton:!0})}),(0,s.jsx)(A.A,{component:j.PY1.div,variants:w.JA,children:(0,s.jsx)(ge,{appointment:e,onJoin:t,joining:n,disabled:i||o,tooLate:o})}),(0,s.jsxs)(Q.Ay,{container:!0,spacing:3,component:j.PY1.div,variants:w.JA,children:[(0,s.jsx)(Q.Ay,{item:!0,xs:12,md:a?6:12,children:(0,s.jsx)(M.A,{variant:"outlined",sx:{backgroundColor:"transparent",width:"100%",p:3},children:(0,s.jsxs)(A.A,{gap:2,children:[(0,s.jsx)(k.A,{variant:"h6",children:r("sections.session.waitingRoom.details")}),(0,s.jsx)(ae,{appointment:e})]})})}),a&&(0,s.jsx)(Q.Ay,{item:!0,xs:12,md:6,children:(0,s.jsx)(M.A,{variant:"outlined",sx:{backgroundColor:"transparent",width:"100%",p:3},children:(0,s.jsxs)(A.A,{gap:2,children:[(0,s.jsx)(k.A,{variant:"h6",children:r("sections.session.waitingRoom.disclaimer")}),(0,s.jsx)(te,{appointment:e})]})})})]})]})},Ae=()=>{const{translate:e}=(0,h.A)(),t=(0,l.Zp)();return(0,s.jsxs)(o.A,{component:j.PY1.div,variants:w.JA,initial:"initial",animate:"animate",exit:"exit",sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,width:480,gap:2},children:[(0,s.jsx)(k.A,{variant:"h5",textAlign:"center",sx:{mb:1},children:e("sections.session.waitingRoom.invalidAppointment")}),(0,s.jsx)(k.A,{variant:"body2",children:e("sections.session.waitingRoom.notAvailable")}),(0,s.jsx)(E.A,{id:"RTCJoinSessionButton",variant:"contained",sx:{mt:3},onClick:()=>t(ee.uN.general.dashboard),children:e("sections.session.waitingRoom.backToDashboard")})]})};var fe=n(40373),je=n(35131);const be=(0,je.A)([(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,s.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),ve=(0,je.A)((0,s.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined");var Ce=n(64681),we=n(98243),Se=n(89888),Ie=n(32796),ke=n(9133),De=n(1103);function Re({question:e,answer:t}){const n=(0,ce.A)();return(0,s.jsxs)(o.A,{sx:{mb:3},children:[(0,s.jsx)(k.A,{variant:"caption",sx:{display:"block",color:n.palette.text.secondary,mb:.5,fontSize:"0.75rem"},children:e}),(0,s.jsx)(k.A,{variant:"body2",sx:{fontWeight:500,color:n.palette.text.primary},children:null===t||void 0===t?"-":"boolean"===typeof t?t?"Yes":"No":String(t)})]})}function Ee({open:e,onClose:t,data:n}){return(0,s.jsx)(S.A,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{borderRadius:2,maxWidth:900}},children:(0,s.jsxs)(D.A,{sx:{p:4,position:"relative"},children:[(0,s.jsxs)(o.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:[(0,s.jsx)(k.A,{variant:"h6",sx:{fontWeight:600},children:"Medical Intake"}),(0,s.jsx)(le.A,{onClick:t,size:"small",sx:{color:"text.secondary"},children:(0,s.jsx)(De.A,{})})]}),(0,s.jsxs)(Q.Ay,{container:!0,spacing:4,children:[(0,s.jsxs)(Q.Ay,{item:!0,xs:6,children:[(0,s.jsx)(Re,{question:"Why are you seeking therapy?",answer:n?.reasonForTherapy}),(0,s.jsx)(Re,{question:"How severe is your problem?",answer:n?.problemSeverity}),(0,s.jsx)(Re,{question:"What are your goals for therapy?",answer:n?.goalsForTherapy}),(0,s.jsx)(Re,{question:"Are you prescribed any medications?",answer:n?.prescriptionDrugs&&n.prescriptionDrugs.length>0?n.prescriptionDrugs.map(e=>e.name).join(", "):"-"}),(0,s.jsx)(Re,{question:"Do you have chronic pain?",answer:n?.hasChronicPain}),(0,s.jsx)(Re,{question:"Do you drink alcohol?",answer:n?.drinksAlcohol}),(0,s.jsx)(Re,{question:"Do you use nicotine?",answer:n?.usesNicotine}),(0,s.jsx)(Re,{question:"Do you use recreational drugs?",answer:n?.usesRecDrugs}),(0,s.jsx)(Re,{question:"Have you been diagnosed with any psychiatric conditions?",answer:n?.psychConditions&&n.psychConditions.length>0?n.psychConditions.map(e=>e.name).join(", "):"-"}),(0,s.jsx)(Re,{question:"Would you describe your diet as healthy?",answer:n?.hasHealthyDiet})]}),(0,s.jsxs)(Q.Ay,{item:!0,xs:6,children:[(0,s.jsx)(Re,{question:"Do you usually eat 3 to 5 meals a day?",answer:n?.eatsThreeToFiveMeals}),(0,s.jsx)(Re,{question:"How often do you exercise?",answer:n?.exerciseFrequency}),(0,s.jsx)(Re,{question:"What is your partnership status?",answer:n?.partnershipStatus?.name}),(0,s.jsx)(Re,{question:"What is your heritage?",answer:n?.ethnicity?.n
1ame}),(0,s.jsx)(Re,{question:"How would you rate your sleep quality?",answer:n?.sleepQuality}),(0,s.jsx)(Re,{question:"In the past few weeks, have you wished you were dead?",answer:n?.wishedDead}),(0,s.jsx)(Re,{question:"In the past few weeks, have you felt that your family would be better off if you were dead?",answer:n?.feelsBetterOffDead}),(0,s.jsx)(Re,{question:"In the past week, have you been having thoughts about killing yourself?",answer:n?.hadRecentSuicidalThoughts}),(0,s.jsx)(Re,{question:"Have you ever tried to kill yourself?",answer:n?.madeSuicidalAttempt}),(0,s.jsx)(Re,{question:"Are you having thoughts of killing yourself right now?",answer:n?.hasCurrentSuicidalThoughts})]})]})]})})}var Me=n(28532);const Te=(0,je.A)([(0,s.jsx)("path",{d:"M14 12h4v1.5h-4zm0 3h4v1.5h-4z"},"0"),(0,s.jsx)("path",{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2m-9 0V4h2v5h-2zm9 13H4V9h5c0 1.1.9 2 2 2h2c1.1 0 2-.9 2-2h5z"},"1"),(0,s.jsx)("circle",{cx:"9",cy:"13.5",r:"1.5"},"2"),(0,s.jsx)("path",{d:"M11.08 16.18c-.64-.28-1.34-.43-2.08-.43s-1.44.15-2.08.43c-.56.24-.92.78-.92 1.39V18h6v-.43c0-.61-.36-1.15-.92-1.39"},"3")],"BadgeOutlined"),Ne=(0,je.A)((0,s.jsx)("path",{d:"M12 8c1.93 0 3.5 1.57 3.5 3.5S13.93 15 12 15s-3.5-1.57-3.5-3.5S10.07 8 12 8m4.53.38 3.97-3.96V7h2V1h-6v2h2.58l-3.97 3.97C14.23 6.36 13.16 6 12 6s-2.23.36-3.11.97l-.65-.65 1.41-1.41-1.41-1.42L6.82 4.9 4.92 3H7.5V1h-6v6h2V4.42l1.91 1.9-1.42 1.42L5.4 9.15l1.41-1.41.65.65c-.6.88-.96 1.95-.96 3.11 0 2.7 1.94 4.94 4.5 5.41V19H9v2h2v2h2v-2h2v-2h-2v-2.09c2.56-.47 4.5-2.71 4.5-5.41 0-1.16-.36-2.23-.97-3.12"}),"TransgenderOutlined"),Le=(0,je.A)([(0,s.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7M7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9"},"0"),(0,s.jsx)("circle",{cx:"12",cy:"9",r:"2.5"},"1")],"LocationOnOutlined"),Pe={container:{display:"flex",gap:2,alignItems:"center"},avatar:{width:64,height:64},name:{fontWeight:700,mb:.5},detailsRow:{display:"flex",gap:2,alignItems:"center"},detailItem:{display:"flex",gap:.5,alignItems:"center"},detailIcon:{fontSize:16,color:"text.secondary"}};function ze({client:e}){const t=`${e.firstName?.charAt(0)||""}${e.lastName?.charAt(0)||""}`,n=`${e.firstName||""} ${e.lastName||""}`.trim(),i=e.pronoun?.name||"N/A",r=e.addresses&&e.addresses[0]?`${e.addresses[0].city}, ${e.addresses[0].state}`:"N/A";return(0,s.jsxs)(o.A,{sx:Pe.container,children:[(0,s.jsx)(Me.A,{src:e.photoUrl||"",sx:Pe.avatar,children:t}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"h4",sx:Pe.name,children:n}),(0,s.jsxs)(o.A,{sx:Pe.detailsRow,children:[e.nickName&&(0,s.jsxs)(o.A,{sx:Pe.detailItem,children:[(0,s.jsx)(Te,{sx:Pe.detailIcon}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:e.nickName})]}),(0,s.jsxs)(o.A,{sx:Pe.detailItem,children:[(0,s.jsx)(Ne,{sx:Pe.detailIcon}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:i})]}),(0,s.jsxs)(o.A,{sx:Pe.detailItem,children:[(0,s.jsx)(Le,{sx:Pe.detailIcon}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:r})]})]})]})]})}const We={label:{fontSize:"0.75rem"}};function Fe({label:e,value:t}){return(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",sx:We.label,children:e}),"string"===typeof t?(0,s.jsx)(k.A,{variant:"body2",children:t}):t]})}var Be=n(52641);const Oe={container:{backgroundColor:Ce.Ay.light.info.lighter,borderRadius:2,p:2,mb:2,display:"flex",gap:1.5,alignItems:"flex-start"},icon:{fontSize:20,color:Ce.Ay.light.info.dark,flexShrink:0,mt:.25},list:{m:0,pl:2,"& li":{mb:.75}},text:{color:Ce.Ay.light.info.dark}};function $e({sessionDuration:e}){return(0,s.jsxs)(o.A,{sx:Oe.container,children:[(0,s.jsx)(Be.A,{sx:Oe.icon}),(0,s.jsx)(o.A,{children:(0,s.jsxs)(o.A,{component:"ul",sx:Oe.list,children:[(0,s.jsx)("li",{children:(0,s.jsxs)(k.A,{variant:"body2",sx:Oe.text,children:["This is a ",e," minute session."]})}),(0,s.jsx)("li",{children:(0,s.jsx)(k.A,{variant:"body2",sx:Oe.text,children:"EAP members cannot be provided documentation (FMLA, short-term disability, etc.) per EAP contracts. We recommend referring client to their PCP."})}),(0,s.jsx)("li",{children:(0,s.jsx)(k.A,{variant:"body2",sx:Oe.text,children:"If long-term counseling is necessary, please refer the client to ReachLink Care Coordination for transition to their insurance benefit."})}),(0,s.jsx)("li",{children:(0,s.jsx)(k.A,{variant:"body2",sx:Oe.text,children:"Clients can obtain attendance letters directly in the ReachLink portal."})}),(0,s.jsx)("li",{children:(0,s.jsx)(k.A,{variant:"body2",sx:Oe.text,children:"ReachLink may not compensate providers for additional documentation."})}),(0,s.jsx)("li",{children:(0,s.jsx)(k.A,{variant:"body2",sx:Oe.text,children:"EAP members cannot be charged no show/cancelation fees."})})]})})]})}
1var He=n(43110);const Ve={container:{display:"flex",gap:.5,alignItems:"center"},icon:{fontSize:16,color:Ce.Ay.light.error.main},text:{color:Ce.Ay.light.error.main}};function Ge({isHighRisk:e}){return e?(0,s.jsxs)(o.A,{sx:Ve.container,children:[(0,s.jsx)(He.A,{sx:Ve.icon}),(0,s.jsx)(k.A,{variant:"body2",sx:Ve.text,children:"High-risk"})]}):(0,s.jsx)(k.A,{variant:"body2",children:"Standard"})}var _e=n(87414);const Ye={card:{mb:3,boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)"},cardContent:{pb:0,"&:last-child":{pb:0}},header:{display:"flex",justifyContent:"space-between",alignItems:"center",height:100,pb:2},buttonContainer:{display:"flex",gap:1},divider:{borderBottom:`1px solid ${Ce.Ay.light.grey[300]}`,mb:2},detailsRow:{display:"flex",width:"100%",mb:2,flexDirection:"row",alignItems:"center",justifyContent:"space-between"}};function Ke({appointment:e,joinSession:t,sessionCount:n,remainingEapSessions:i}){const{translate:l}=(0,h.A)(),{client:c}=e,[d,x]=(0,a.useState)(c),[m,{data:p,loading:u}]=(0,Ie._)(ie.JJZ,{fetchPolicy:"network-only"});(0,a.useEffect)(()=>{c&&m({variables:{clientUserId:c.userId}})},[c]),(0,a.useEffect)(()=>{p&&x(p.client)},[p]);const g=e.duration||50,[y,A]=(0,a.useState)(!1),[f,j]=(0,a.useState)(q()());(0,we.A)({interval:5e3,onTick:()=>j(q()()),loop:!0});const{data:b,loading:v}=(0,se.I)(ie.wTv,d?.userId?{variables:{clientUserId:String(d?.userId)}}:ke.h),{loading:C,authorized:w,used:S,remaining:I,isEap:k}=oe(e.client?.userId,e.coverageType!==Z.Fp.EAP);return!d||u?(0,s.jsx)(r.A,{}):(0,s.jsxs)(M.A,{sx:Ye.card,children:[(0,s.jsxs)(Se.A,{sx:Ye.cardContent,children:[(0,s.jsxs)(o.A,{sx:Ye.header,children:[(0,s.jsx)(ze,{client:d}),(0,s.jsxs)(o.A,{sx:Ye.buttonContainer,children:[(0,s.jsx)(E.A,{variant:"outlined",color:"inherit",size:"large",startIcon:(0,s.jsx)(N.A,{icon:"material-symbols:prescriptions-outline",sx:{width:24,height:24}}),onClick:()=>A(!0),disabled:v,children:l("sections.session.waitingRoom.mainSessionCard.viewMedicalIntake")}),(0,s.jsx)(E.A,{variant:"contained",color:"success",size:"large",startIcon:(0,s.jsx)(N.A,{icon:"material-symbols:videocam-outline",sx:{width:24,height:24},color:Ce.Ay.light.common.white}),onClick:t,disabled:!(e=>q()(e.startDateTime).subtract(_e.Hq.start,"minutes").isBefore(f)),sx:{color:Ce.Ay.light.common.white},children:l("sections.session.waitingRoom.mainSessionCard.startSession")})]})]}),(0,s.jsx)(o.A,{sx:Ye.divider}),(0,s.jsxs)(o.A,{sx:Ye.detailsRow,children:[(0,s.jsx)(Fe,{label:l("sections.session.waitingRoom.mainSessionCard.sessionCount"),value:n?l("sections.session.waitingRoom.mainSessionCard.sessionCountValue",{count:n}
1):l("sections.session.waitingRoom.mainSessionCard.notApplicable")}),(0,s.jsx)(Fe,{label:l("sections.session.waitingRoom.mainSessionCard.duration"),value:l("sections.session.waitingRoom.mainSessionCard.durationValue",{count:e.duration})}),(0,s.jsx)(Fe,{label:l("sections.session.waitingRoom.mainSessionCard.clientCategory"),value:(0,s.jsx)(Ge,{isHighRisk:d.clientProfile?.isHighRisk||!1})}),(0,s.jsx)(Fe,{label:l("sections.session.waitingRoom.mainSessionCard.insurance"),value:d.clientProfile?.insuranceCarrier?.name||l("sections.session.waitingRoom.mainSessionCard.notApplicable")}),(0,s.jsx)(Fe,{label:l("sections.session.waitingRoom.mainSessionCard.type"),value:e.coverageType}),e.coverageType===Z.Fp.EAP&&(0,s.jsx)(Fe,{label:l("sections.session.waitingRoom.mainSessionCard.remainingEapSessions"),value:I?.toString()||l("sections.session.waitingRoom.mainSessionCard.notApplicable")})]}),e?.coverageType===Z.Fp.EAP&&(0,s.jsx)($e,{sessionDuration:g})]}),(0,s.jsx)(Ee,{open:y,onClose:()=>A(!1),data:b?.medicalIntake})]})}const qe={container:{border:`1px solid ${Ce.Ay.light.grey[300]}`,boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",borderRadius:2,px:3,pt:3,pb:3,width:"100%",height:"100%",display:"flex",flexDirection:"column"},title:{fontWeight:600,fontSize:"16px",mb:2}};function Ue({title:e,children:t}){return(0,s.jsxs)(o.A,{sx:qe.container,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:qe.title,children:e}),t]})}const Je={container:{display:"flex",alignItems:"center",gap:1,p:2,backgroundColor:"#E0F2FE",borderRadius:1},icon:{fontSize:20,color:"#0369A1"},text:{color:"#0369A1"}};function Qe({message:e}){return(0,s.jsxs)(o.A,{sx:Je.container,children:[(0,s.jsx)(Be.A,{sx:Je.icon}),(0,s.jsx)(k.A,{variant:"body2",sx:Je.text,children:e})]})}var Xe=n(4566);const Ze={container:e=>({display:"flex",justifyContent:"space-between",alignItems:"center",mb:e?3:0}),leftSection:{display:"flex",gap:1,alignItems:"center"},icon:{width:20,height:20},title:{fontWeight:600},rightSection:{display:"flex",gap:1}
1,expandButton:e=>({transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"})};function et({icon:e,title:t,expanded:n,onToggleExpand:i,actionButtons:r=[]}){return(0,s.jsxs)(o.A,{sx:Ze.container(n),children:[(0,s.jsxs)(o.A,{sx:Ze.leftSection,children:["string"===typeof e?(0,s.jsx)(o.A,{component:"img",src:e,alt:t,sx:Ze.icon}):e,(0,s.jsx)(k.A,{variant:"subtitle1",sx:Ze.title,children:t})]}),(0,s.jsxs)(o.A,{sx:Ze.rightSection,children:[r.map((e,t)=>(0,s.jsx)(E.A,{variant:"outlined",color:"inherit",size:"large",startIcon:e.icon,onClick:e.onClick,disabled:e.disabled,children:e.label},t)),(0,s.jsx)(le.A,{onClick:i,size:"small",sx:Ze.expandButton(n),children:(0,s.jsx)(Xe.A,{})})]})]})}var tt=n(97393),nt=n(56792);const st={container:{display:"flex",alignItems:"center",gap:1,pl:2,pr:3,mb:1.5},dateText:{fontWeight:600}};function it({dateRangeDisplay:e,onPrevious:t,onNext:n,nextDisabled:i=!1}){return(0,s.jsxs)(o.A,{sx:st.container,children:[(0,s.jsx)(le.A,{size:"small",onClick:t,children:(0,s.jsx)(tt.A,{fontSize:"small"})}),(0,s.jsx)(k.A,{variant:"body2",sx:st.dateText,children:e}),(0,s.jsx)(le.A,{size:"small",onClick:n,disabled:i,children:(0,s.jsx)(nt.A,{fontSize:"small"})})]})}const ot={container:{display:"flex",border:`1px solid ${Ce.Ay.light.grey[300]}`,borderRadius:1,overflow:"hidden"},button:{width:69,height:36,borderRadius:0,backgroundColor:"white",color:Ce.Ay.light.grey[700],textTransform:"none",fontWeight:500,px:2,"&:hover":{backgroundColor:Ce.Ay.light.grey[100]}},buttonActive:{backgroundColor:"#DBEAFE",color:"#1D4ED8",fontWeight:600,"&:hover":{backgroundColor:"#BFDBFE"}},buttonRight:{borderLeft:`1px solid ${Ce.Ay.light.grey[300]}`}};function rt({selectedRange:e,weekLabel:t,monthLabel:n,onRangeChange:i}){return(0,s.jsxs)(o.A,{sx:ot.container,children:[(0,s.jsx)(E.A,{onClick:()=>i("7days"),sx:[ot.button,"7days"===e&&ot.buttonActive],children:t}),(0,s.jsx)(E.A,{onClick:()=>i("30days"),sx:[ot.button,ot.buttonRight,"30days"===e&&ot.buttonActive],children:n})]})}const at={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:4,px:3,gap:1,flex:1},icon:{fontSize:40,color:Ce.Ay.light.grey[400]}};function lt({icon:e,message:t,altText:n="empty"}){return(0,s.jsxs)(o.A,{sx:at.container,children:[(0,s.jsx)(o.A,{component:"img",src:e,alt:n,sx:at.icon}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:t})]})}var ct=n(31050),dt=n(27488),xt=n(54114),ht=(e=>(e.IDLE="Idle",e.PROCESSING="Processing",e.COMPLETED="Completed",e.FAILED="Failed",e))(ht||{});var mt=n(68070);const pt={container:{display:"flex",justifyContent:"center",alignItems:"center",py:4,position:"relative"},logo:{display:"flex",alignItems:"center",justifyContent:"center",width:60,height:60},outerRing:{width:70,height:70,borderRadius:"25%",position:"absolute"},innerRing:{width:85,height:85,borderRadius:"25%",position:"absolute"}};function ut(){return(0,s.jsxs)(o.A,{sx:pt.container,children:[(0,s.jsx)(j.PY1.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},style:pt.logo,children:(0,s.jsx)(mt.A,{disableLink:!0,mini:!0,width:60})}),(0,s.jsx)(o.A,{component:j.PY1.div,animate:{scale:[1.2,1,1,1.2,1.2],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{...pt.outerRing,border:e=>`solid 2px ${(0,de.X4)(e.palette.primary.dark,.24)}`}}),(0,s.jsx)(o.A,{component:j.PY1.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{...pt.innerRing,border:e=>`solid 5px ${(0,de.X4)(e.palette.primary.dark,.24)}`}})]})}const gt={container:{mb:3},header:{display:"flex",alignItems:"center",gap:1,mb:1},title:{fontWeight:600,fontSize:"16px"},chip:{backgroundColor:Ce.Ay.light.grey[200],color:Ce.Ay.light.grey[700],fontWeight:400},text:{mt:1}};function yt({recap:e,lastSessionLabel:t,isGenerating:n}){const{translate:i}=(0,h.A)();return(0,s.jsxs)(o.A,{sx:gt.container,children:[(0,s.jsxs)(o.A,{sx:gt.header,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:gt.title,children:i("sections.session.waitingRoom.provider.preSessionNotes.recap")}),t&&(0,s.jsx)(fe.A,{label:t,size:"small",sx:gt.chip})]}),n||!e?(0,s.jsx)(ut,{}):(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:gt.text,children:e?.
1split("\n").map((e,t)=>(0,s.jsxs)("span",{children:[e,(0,s.jsx)("br",{})]},t))})]})}const At=(0,je.A)((0,s.jsx)("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}),"TrendingUp"),ft=(0,je.A)((0,s.jsx)("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}),"TrendingDown"),jt=(0,je.A)((0,s.jsx)("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2z"}),"Repeat"),bt={card:{flex:1,borderRadius:2,p:2,display:"flex",flexDirection:"column"},iconCircle:{width:48,height:48,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},icon:{fontSize:28,color:"white"},title:{fontWeight:600,color:Ce.Ay.light.grey[800],mb:.5},description:{fontWeight:400,color:Ce.Ay.light.grey[600],fontSize:"0.875rem"}};function vt({title:e,description:t,type:n}){const i=(e=>{switch(e){case"uptrend":default:return At;case"downtrend":return ft;case"cycle":return jt}})(n),r=(e=>{switch(e){case"uptrend":return{bgColor:"#E8FFE9",iconBgColor:"#E8FFE9"};case"downtrend":return{bgColor:Ce.Ay.light.error.lighter,iconBgColor:Ce.Ay.light.error.light};case"cycle":return{bgColor:Ce.Ay.light.info.lighter,iconBgColor:Ce.Ay.light.info.main};default:return{bgColor:Ce.Ay.light.success.lighter,iconBgColor:Ce.Ay.light.success.main}}})(n);return(0,s.jsxs)(o.A,{sx:{...bt.card,backgroundColor:r.bgColor},children:[(0,s.jsx)(o.A,{sx:{...bt.iconCircle,backgroundColor:r.iconBgColor},children:(0,s.jsx)(i,{sx:bt.icon})}),(0,s.jsx)(k.A,{variant:"body2",sx:bt.title,children:e}),(0,s.jsx)(k.A,{variant:"body2",sx:bt.description,children:t})]})}const Ct={grid:{display:"flex",gap:2,flex:1,alignItems:"stretch"}};function wt({patterns:e}){const{translate:t}=(0,h.A)();return e&&0!==e.length?(0,s.jsx)(Ue,{title:t("sections.session.waitingRoom.provider.emergingThemes.title"),children:(0,s.jsx)(o.A,{sx:Ct.grid,children:e.map((e,t)=>(0,s.jsx)(vt,{title:e.title,description:e.description,type:e.type},t))})}):null}var St=n(11497);const It=e=>{switch(e){case"high":return Ce.Ay.light.error.main;case"medium":return Ce.Ay.light.warning.main;case"low":return Ce.Ay.light.info.main;default:return Ce.Ay.light.grey[500]}},kt=e=>{switch(e){case"high":return Ce.Ay.light.error.lighter;case"medium":return Ce.Ay.light.warning.lighter;case"low":return Ce.Ay.light.info.lighter;default:return Ce.Ay.light.grey[200]}},Dt={container:{display:"flex",flexDirection:"column",gap:1.5,flex:1},pointCard:{display:"flex",alignItems:"flex-start",gap:1.5,p:1.5,borderRadius:1.5,backgroundColor:Ce.Ay.light.grey[100]},priorityDot:{width:8,height:8,borderRadius:"50%",flexShrink:0,mt:.75},content:{flex:1,minWidth:0},topic:{fontWeight:600,color:Ce.Ay.light.grey[800],fontSize:"0.875rem",lineHeight:1.4},rationale:{fontWeight:400,color:Ce.Ay.light.grey[600],fontSize:"0.75rem",lineHeight:1.4,mt:.25},priorityChip:{height:20,fontSize:"0.625rem",fontWeight:600,textTransform:"uppercase",flexShrink:0}};function Rt({points:e}){const{translate:t}=(0,h.A)();return e&&0!==e.length?(0,s.jsx)(Ue,{title:t("sections.session.waitingRoom.provider.suggestedDiscussionPoints.title"),children:(0,s.jsx)(o.A,{sx:Dt.container,children:e.map((e,t)=>(0,s.jsxs)(o.A,{sx:Dt.pointCard,children:[(0,s.jsx)(o.A,{sx:{...Dt.priorityDot,backgroundColor:It(e.priority)}}),(0,s.jsxs)(o.A,{sx:Dt.content,children:[(0,s.jsx)(k.A,{sx:Dt.topic,children:e.topic}),(0,s.jsx)(k.A,{sx:Dt.rationale,children:e.rationale})]}),(0,s.jsx)(St.A,{title:`${e.priority} priority`,arrow:!0,children:(0,s.jsx)(fe.A,{label:e.priority,size:"small",sx:{...Dt.priorityChip,backgroundColor:kt(e.priority),color:It(e.priority)}})})]},t))})}):null}const Et=(0,je.A)([(0,s.jsx)("path",{d:"m22 20.59-4.69-4.69C18.37 14.55 19 12.85 19 11c0-4.42-3.58-8-8-8-4.08 0-7.44 3.05-7.93 7h2.02C5.57 7.17 8.03 5 11 5c3.31 0 6 2.69 6 6s-2.69 6-6 6c-2.42 0-4.5-1.44-5.45-3.5H3.4C4.45 16.69 7.46 19 11 19c1.85 0 3.55-.63 4.9-1.69L20.59 22z"},"0"),(0,s.jsx)("path",{d:"M8.43 9.69 9.65 15h1.64l1.26-3.78.95 2.28h2V12h-1l-1.25-3h-1.54l-1.12 3.37L9.35 7H7.7l-1.25 4H1v1.5h6.55z"},"1")],"TroubleshootOutlined"),Mt={container:{backgroundColor:"#EFF6FF",borderRadius:2,p:2,mb:2,display:"flex",gap:2,alignItems:"flex-start"},iconBox:{width:40,height:40,borderRadius:"50%",backgroundColor:"#BFDBFE",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},icon:{fontSize:24,color:"#1E40AF"},text:{fontWeight:500,color:Ce.Ay.light.text.primary,mt:.5}};function Tt({label:e,code:t,description:n}){return(0,s.jsxs)(o.A,{sx:Mt.container,children:[(0,s.jsx)(o.A,{sx:Mt.iconBox,children:(0,s.jsx)(Et,{sx:Mt.icon})}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",children:e}),(0,s.jsxs)(k.A,{variant:"body2",sx:Mt.text,children:[n," (",t,")"]})]})]})}const Nt=(0,je.A)((0,s.jsx)("path",{d:"M14.4 6 14 4H5v17h2v-7h5.6l.4 2h7V6z"}),"Flag"),Lt={chip:{justifyContent:"flex-start",backgroundColor:"#FEF3C7",color:"#D97706",fontWeight:500,border:"none","& .MuiChip-label":{px:1}},icon:{fontSize:16,color:"#D97706 !important"}};function Pt({label:e}){return(0,s.jsx)(fe.A,{icon:(0,s.jsx)(Nt,{sx:Lt.icon}),label:e,sx:Lt.chip})}const zt={loadingBox:{display:"flex",justifyContent:"center",alignItems:"center",py:2,flex:1},infoBox:{backgroundColor:Ce.Ay.light.grey[100],borderRadius:2,p:2,display:"flex",gap:1,alignItems:"center"},concernsSection:{mt:2},concernsLabel:{display:"block",mb:1,mt:1},concernsList:{display:"flex",flexDirection:"column",gap:1}};function Wt({concerns:e,appointmentId:t,coverageType:n}){const{translate:i}=(0,h.A)(),{data:a,loading:l}=(0,se.I)(ie.f39,t&&n!==Z.Fp.EAP?{variables:{appointmentId:String(t)}}:ke.h),c=a?.diagnosis,d=e&&e.length>0,x=n===Z.Fp.EAP,m=c?.DiagnosisCodes?.[0],p=c?.DiagnosisCodes?.[1],u=c?.DiagnosisCodes&&c.DiagnosisCodes.length>0;return(0,s.jsxs)(Ue,{title:i("sections.session.waitingRoom.provider.diagnosis.title"),children:[l&&!x&&(0,s.jsx)(o.A,{sx:zt.loadingBox,children:(0,s.jsx)(r.A,{size:24})}),x&&!l&&(0,s.jsx)(Qe,{message:i("sections.session.waitingRoom.provider.diagnosis.infoMessage")}),!u&&!x&&!l&&(0,s.jsx)(o.A,{sx:zt.infoBox,children:(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:i("sections.session.waitingRoom.provider.diagnosis.noDiagnosisYet")})}),m&&!x&&(0,s.jsx)(Tt,{label:i("sections.session.waitingRoom.provider.diagnosis.primaryDiagnosis"),code:m.code,description:m.description}),p&&!x&&(0,s.jsx)(Tt,{label:i("sections.session.waitingRoom.provider.diagnosis.secondary
1Diagnosis"),code:p.code,description:p.description}),d&&(0,s.jsxs)(o.A,{sx:zt.concernsSection,children:[(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",sx:zt.concernsLabel,children:i("sections.session.waitingRoom.provider.diagnosis.flaggedConcerns")}),(0,s.jsx)(o.A,{sx:zt.concernsList,children:e.map(e=>(0,s.jsx)(Pt,{label:e.label},e.id))})]})]})}const Ft=(0,je.A)([(0,s.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),(0,s.jsx)("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m-5-6c.78 2.34 2.72 4 5 4s4.22-1.66 5-4z"},"2")],"SentimentVerySatisfied"),Bt=(0,je.A)([(0,s.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),(0,s.jsx)("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-4c-.73 0-1.38-.18-1.96-.52-.12.14-.86.98-1.01 1.15.86.55 1.87.87 2.97.87 1.11 0 2.12-.33 2.98-.88-.97-1.09-.01-.02-1.01-1.15-.59.35-1.24.53-1.97.53"},"2")],"SentimentSatisfied"),Ot=(0,je.A)([(0,s.jsx)("path",{d:"M9 15.5h6v1H9z"},"0"),(0,s.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"1"),(0,s.jsx)("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"2"),(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"3")],"SentimentNeutral"),$t=(0,je.A)([(0,s.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),(0,s.jsx)("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-3.5c.73 0 1.39.19 1.97.53.12-.14.86-.98 1.01-1.14-.85-.56-1.87-.89-2.98-.89-1.11 0-2.13.33-2.99.88.97 1.09.01.02 1.01 1.14.59-.33 1.25-.52 1.98-.52"},"2")],"SentimentDissatisfied"),Ht=(0,je.A)([(0,s.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),(0,s.jsx)("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-6c-2.33 0-4.32 1.45-5.12 3.5h1.67c.69-1.19 1.97-2 3.45-2s2.75.81 3.45 2h1.67c-.8-2.05-2.79-3.5-5.12-3.5"},"2")],"SentimentVeryDissatisfied"),Vt={container:{display:"flex",border:`1px solid ${Ce.Ay.light.grey[300]}`,borderRadius:1,overflow:"hidden"},button:{width:69,height:36,borderRadius:0,backgroundColor:"white",color:Ce.Ay.light.grey[700],textTransform:"none",fontWeight:500,px:2,"&:hover":{backgroundColor:Ce.Ay.light.grey[100]}},buttonActive:{backgroundColor:"#DBEAFE",color:"#1D4ED8",fontWeight:600,"&:hover":{backgroundColor:"#BFDBFE"}},buttonRight:{borderLeft:`1px solid ${Ce.Ay.light.grey[300]}`}};function Gt({selectedRange:e,weekLabel:t,monthLabel:n,onRangeChange:i}){return(0,s.jsxs)(o.A,{sx:Vt.container,children:[(0,s.jsx)(E.A,{onClick:()=>i("7days"),sx:[Vt.button,"7days"===e&&Vt.buttonActive],children:t}),(0,s.jsx)(E.A,{onClick:()=>i("30days"),sx:[Vt.button,Vt.buttonRight,"30days"===e&&Vt.buttonActive],children:n})]})}function _t(e){return"string"===typeof e&&/^\d+$/.test(e)?q()(parseInt(e,10)):q()(e)}const Yt={container:{border:`1px solid ${Ce.Ay.light.grey[300]}`,boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",borderRadius:2,width:"100%",height:"100%",display:"flex",flexDirection:"column"},loadingContainer:{border:`1px solid ${Ce.Ay.light.grey[300]}`,boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",borderRadius:2,px:3,py:3,display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",px:3,pt:3,pb:2},titleContainer:{display:"flex",gap:1,alignItems:"center"},title:{fontWeight:600,fontSize:"16px"},infoIcon:{fontSize:16,color:"text.secondary"},chartWrapper:{display:"flex",gap:0,mx:3,mb:1},yAxis:{display:"flex",flexDirection:"column",justifyContent:"space-between",minWidth:40,height:228,pt:.25,pb:.25},chartContainer:{backgroundColor:"#FFFFFF",borderRadius:2,flex:1,height:228},svgContainer:{width:"100%",height:"100%"},noDataContainer:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},xAxis:{display:"flex",justifyContent:"space-between",ml:"calc(24px + 40px)",mr:3,mb:3},dateLabel:{color:Ce.Ay.light.grey[600]}};function Kt({clientUserId:e}){const{translate:t}=(0,h.A)(),[n,i]=(0,a.useState)("7days"),[l,c]=(0,a.useState)(0),d=(0,a.useMemo)(()=>
1{if("7days"===n){const e=q()().subtract(7*Math.abs(l),"days").endOf("day");return{startDateTime:q()(e).subtract(6,"days").startOf("day").toISOString(),endDateTime:e.toISOString()}}{const e=q()().subtract(Math.abs(l),"months"),t=e.clone().startOf("month"),n=e.clone().endOf("month");return{startDateTime:t.toISOString(),endDateTime:n.toISOString()}}},[n,l]),{data:x,loading:m}=(0,se.I)(ie.mV7,e?{variables:{userId:String(e||0),startDateTime:d.startDateTime,endDateTime:d.endDateTime}}:ke.h),p=(0,a.useMemo)(()=>(x?.getMoodCalendar?.days||[]).filter(e=>null!==e.mood).map(e=>({date:e.date,moodLevel:e.mood})),[x]),u=[{Icon:Ft,color:"#4CAF50"},{Icon:Bt,color:"#81C784"},{Icon:Ot,color:"#42A5F5"},{Icon:$t,color:"#FF9800"},{Icon:Ht,color:"#F44336"}],g=(0,a.useMemo)(()=>{if(!p||0===p.length)return null;const e=208;let t=[...p];1===t.length&&(t=[t[0],t[0]]);const n=t.length>1?400/(t.length-1):400,s=t.map((t,s)=>({x:s*n,y:10+(t.moodLevel-1)/4*e,moodLevel:t.moodLevel}));let i=`M ${s[0].x} ${s[0].y}`;for(let o=0;o<s.length-1;o++){const e=s[o],t=s[o+1],n=(e.x+t.x)/2,r=(e.y+t.y)/2;i+=` Q ${e.x} ${e.y}, ${n} ${r}`,o===s.length-2&&(i+=` Q ${t.x} ${t.y}, ${t.x} ${t.y}`)}return{path:i,areaPath:i+` L ${s[s.length-1].x} 218 L ${s[0].x} 218 Z`,points:s,chartWidth:400,chartHeight:228}},[p]),y=(0,a.useMemo)(()=>{if(!p||0===p.length)return[];if(1===p.length){const e=_t(p[0].date).format("M/D");return[e,e]}return p.map(e=>_t(e.date).format("M/D"))},[p]),A=(0,a.useMemo)(()=>{const e=q()();if("7days"===n){const e=q()().subtract(7*Math.abs(l),"days");return`${q()(e).subtract(6,"days").format("DD MMM")} - ${e.format("DD MMM")}`}if(0===l){return`${q()().startOf("month").format("DD MMM")} - ${e.format("DD MMM")}`}{const e=q()().subtract(Math.abs(l),"months");return`${e.startOf("month").format("DD MMM")} - ${e.endOf("month").format("DD MMM")}`}},[n,l]);return e?m?(0,s.jsx)(o.A,{sx:Yt.loadingContainer,children:(0,s.jsx)(r.A,{size:24})}):(0,s.jsxs)(o.A,{sx:Yt.container,children:[(0,s.jsxs)(o.A,{sx:Yt.header,children:[(0,s.jsxs)(o.A,{sx:Yt.titleContainer,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:Yt.title,children:t("sections.session.waitingRoom.provider.moodTrend.title")}),(0,s.jsx)(Be.A,{sx:Yt.infoIcon})]}),(0,s.jsx)(Gt,{selectedRange:n,weekLabel:t("sections.session.waitingRoom.provider.moodTrend.week"),monthLabel:t("sections.session.waitingRoom.provider.moodTrend.month"),onRangeChange:e=>{i(e),c(0)}})]}),(0,s.jsx)(it,{dateRangeDisplay:A,onPrevious:()=>{c(e=>e-1)},onNext:()=>{l<0&&c(e=>e+1)},nextDisabled:l>=0}),(0,s.jsxs)(o.A,{sx:Yt.chartWrapper,children:[(0,s.jsx)(o.A,{sx:Yt.yAxis,children:u.map(({Icon:e,color:t},n)=>(0,s.jsx)(e,{sx:{fontSize:24,color:t}},n))}),(0,s.jsx)(o.A,{sx:Yt.chartContainer,children:g?(0,s.jsx)(o.A,{sx:Yt.svgContainer,children:(0,s.jsxs)("svg",{width:"100%",height:"100%",viewBox:`0 0 ${g.chartWidth} ${g.chartHeight}`,preserveAspectRatio:"none",children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:"areaGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:"#9FA8DA",stopOpacity:"0.5"}),(0,s.jsx)("stop",{offset:"100%",stopColor:"#9FA8DA",stopOpacity:"0"})]})}),[0,1,2,3,4].map(e=>{const t=10+52*e;return(0,s.jsx)("line",{x1:"0",y1:t,x2:g.chartWidth,y2:t,stroke:"#D1D5DB",strokeWidth:"1",strokeDasharray:"5,5",vectorEffect:"non-scaling-stroke"},e)}),(0,s.jsx)("path",{d:g.areaPath,fill:"url(#areaGradient)"}),(0,s.jsx)("path",{d:g.path,stroke:"#1565C0",strokeWidth:"3",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}):(0,s.jsx)(o.A,{sx:Yt.noDataContainer,children:(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:t("sections.session.waitingRoom.provider.moodTrend.noData")})})})]}),y.length>0&&(0,s.jsx)(o.A,{sx:Yt.xAxis,children:y.map((e,t)=>(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",sx:Yt.dateLabel,children:e},t))})]}):null}var qt=n(93057),Ut=n(90863);const Jt=(0,je.A)((0,s.jsx)("path",{d:"M19 5v9h-5v5H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10l6-6V5c0-1.1-.9-2-2-2m-7 11H7v-2h5zm5-4H7V8h10z"}),"StickyNote2Outlined"),Qt=(0,je.A)((0,s.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58
1L18 14l-6-6-6 6z"}),"KeyboardArrowUp");var Xt=n(29941),Zt=n(21165),en=n(57980);function tn({children:e,value:t,index:n}){return(0,s.jsx)("div",{hidden:t!==n,children:t===n&&(0,s.jsx)(o.A,{sx:{py:3},children:e})})}function nn({open:e,onClose:t,diagnosis:n}){const[i,r]=(0,a.useState)(0),l=e=>e?(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-wrap"},children:e}):(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:{fontStyle:"italic"},children:"No notes available"});return(0,s.jsx)(S.A,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{borderRadius:2,maxWidth:900}},children:(0,s.jsxs)(D.A,{sx:{p:0},children:[(0,s.jsxs)(o.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:3,pb:0},children:[(0,s.jsx)(k.A,{variant:"h6",sx:{fontWeight:600},children:"Notes"}),(0,s.jsx)(le.A,{onClick:t,size:"small",sx:{color:Ce.Ay.light.grey[500]},children:(0,s.jsx)(De.A,{})})]}),(0,s.jsx)(o.A,{sx:{borderBottom:1,borderColor:"divider",px:3},children:(0,s.jsxs)(Zt.A,{value:i,onChange:(e,t)=>
1{r(t)},variant:"fullWidth",sx:{"& .MuiTab-root":{textTransform:"none",fontSize:"0.875rem",fontWeight:500,minWidth:"auto",px:2}},children:[(0,s.jsx)(en.A,{label:"Subjective"}),(0,s.jsx)(en.A,{label:"Objective"}),(0,s.jsx)(en.A,{label:"Assessment"}),(0,s.jsx)(en.A,{label:"Plan"}),(0,s.jsx)(en.A,{label:"Additional"})]})}),(0,s.jsxs)(o.A,{sx:{px:3,pb:3},children:[(0,s.jsxs)(tn,{value:i,index:0,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:{fontWeight:600,mb:2},children:"Subjective Note"}),l(n?.subjectiveNote)]}),(0,s.jsxs)(tn,{value:i,index:1,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:{fontWeight:600,mb:2},children:"Objective Note"}),l(n?.objectiveNote)]}),(0,s.jsxs)(tn,{value:i,index:2,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:{fontWeight:600,mb:2},children:"Assessment Note"}),l(n?.assessmentNote)]}),(0,s.jsxs)(tn,{value:i,index:3,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:{fontWeight:600,mb:2},children:"Plan Note"}),l(n?.planNote)]}),(0,s.jsxs)(tn,{value:i,index:4,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:{fontWeight:600,mb:2},children:"Additional Note"}),l(n?.additionalNote),n?.treatmentRecommendation&&(0,s.jsxs)(o.A,{sx:{mt:2},children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:{fontWeight:600,mb:1},children:"Treatment Recommendation"}),l(n.treatmentRecommendation)]})]})]})]})})}function sn({open:e,onClose:t,clientId:n,providerId:i}){const{translate:l}=(0,h.A)(),[c,d]=(0,a.useState)("newest"),[x,m]=(0,a.useState)(new Set),[p,u]=(0,a.useState)(!1),[g,y]=(0,a.useState)(),{data:A,loading:f}=(0,se.I)(ie.VNs,e&&n&&i?{variables:{clientId:n||0,providerId:i||0,limit:20,offset:0}}:ke.h),j=A?.sessionHistory?.sessions||[],b=[...j].sort((e,t)=>"newest"===c?new Date(t.sessionDate).getTime()-new Date(e.sessionDate).getTime():new Date(e.sessionDate).getTime()-new Date(t.sessionDate).getTime());return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S.A,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{sx:on.dialogPaper},children:(0,s.jsxs)(D.A,{sx:on.dialogContent,children:[(0,s.jsxs)(o.A,{sx:on.header,children:[(0,s.jsx)(k.A,{variant:"h6",sx:on.title,children:l("sections.session.waitingRoom.provider.sessionHistory.title")}),(0,s.jsx)(le.A,{onClick:t,size:"small",sx:on.closeButton,children:(0,s.jsx)(De.A,{})})]}),(0,s.jsx)(o.A,{sx:on.sortContainer,children:(0,s.jsxs)(qt.A,{value:c,onChange:e=>d(e.target.value),size:"small",sx:on.sortSelect,children:[(0,s.jsx)(Ut.A,{value:"newest",children:l("sections.session.waitingRoom.provider.sessionHistory.sortNewest")}),(0,s.jsx)(Ut.A,{value:"oldest",children:l("sections.session.waitingRoom.provider.sessionHistory.sortOldest")})]})}),f?(0,s.jsx)(o.A,{sx:on.loadingContainer,children:(0,s.jsx)(r.A,{size:24})}):(0,s.jsxs)(o.A,{sx:on.sessionsList,children:[b.map((e,t)=>{const n=x.has(e.appointmentId),i=e.patterns||[],r=e.suggestedDiscussionPoints||[];return(0,s.jsxs)(o.A,{sx:on.sessionCard,children:[(0,s.jsxs)(o.A,{sx:on.sessionHeader,children:[(0,s.jsxs)(o.A,{sx:on.sessionInfo,onClick:()=>(e=>{const t=new Set(x);t.has(e)?t.delete(e):t.add(e),m(t)})(e.appointmentId),children:[(0,s.jsx)(k.A,{variant:"body1",sx:on.sessionDate,children:q()(e.sessionDate).format("DD MMM YYYY")}),(0,s.jsx)(o.A,{sx:on.daysAgoBadge,children:(0,s.jsx)(k.A,{variant:"caption",sx:on.daysAgoText,children:(a=e.sessionDate,q()(a).fromNow())})})]}),(0,s.jsx)(E.A,{variant:"outlined",startIcon:(0,s.jsx)(Jt,{sx:{fontSize:22}}),onClick:t=>{t.stopPropagation(),y(e.appointmentId),u(!0)},sx:on.viewNotesButton,children:l("sections.session.waitingRoom.provider.sessionHistory.viewNotes")}),(0,s.jsx)(le.A,{size:"small",children:n?(0,s.jsx)(Qt,{}):(0,s.jsx)(Xt.A,{})})]}),(0,s.jsx)(ct.A,{in:n,children:(0,s.jsxs)(o.A,{sx:on.sessionDetails,children:[e.recap&&(0,s.jsxs)(o.A,{sx:on.recapSection,children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:on.recapTitle,children:l("sections.session.waitingRoom.provider.sessionHistory.recap")}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:on.recapText,children:e.recap})]}),(i.length>0||r.length>0)&&(0,s.jsxs)(Q.Ay,{container:!0,spacing:3,children:[(0,s.jsx)(Q.Ay,{item:!0,xs:6,children:(0,s.jsx)(wt,{patterns:i})}),(0,s.jsx)(Q.Ay,{item:!0,xs:6,children:(0,s.jsx)(Rt,{points:r})})]}),!e.recap&&0===i.length&&0===r.length&&(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:on.noInsights,children:l("sections.session.waitingRoom.provider.sessionHistory.noInsights")})]})})]},t);var a}),0===b.length&&(0,s.jsx)(o.A,{sx:on.emptyState,children:(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:l("sections.session.waitingRoom.provider.sessionHistory.noHistory")})})]})]})}),(0,s.jsx)(nn,{open:p,onClose:()=>u(!1),diagnosis:(()=>{const e=j.find(e=>String(e.appointmentId)===g);return e?.diagnosis})()})]})}const on={dialogPaper:{borderRadius:2,maxWidth:900},dialogContent:{p:4},header:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},title:{fontWeight:600},closeButton:{color:Ce.Ay.light.grey[500]},sortContainer:{mb:3},sortSelect:{minWidth:180,"& .MuiOutlinedInput-notchedOutline":{borderColor:Ce.Ay.light.grey[300]}},loadingContainer:{display:"flex",justifyContent:"center",alignItems:"center",py:4},sessionsList:{display:"flex",flexDirection:"column",gap:2},sessionCard:{backgroundColor:Ce.Ay.light.grey,borderRadius:1,border:`1px solid ${Ce.Ay.light.grey[200]}`},sessionHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2},sessionInfo:{display:"flex",alignItems:"center",gap:2,flex:1,cursor:"pointer"},sessionDate:{fontWeight:600},daysAgoBadge:{px:1.5,py:.5,backgroundColor:Ce.Ay.light.grey[200],borderRadius:1},daysAgoText:{color:Ce.Ay.light.grey[700],fontSize:"0.75rem"},viewNotesButton:{height:48,borderColor:Ce.Ay.light.grey[300],color:Ce.Ay.light.grey[700],"&:hover":{borderColor:Ce.Ay.light.grey[400],backgroundColor:Ce.Ay.light.grey[100]}}
1,sessionDetails:{px:2,pb:2},recapSection:{mb:3},recapTitle:{fontWeight:600,mb:1.5},recapText:{mb:1},noInsights:{textAlign:"center",py:2},emptyState:{display:"flex",justifyContent:"center",alignItems:"center",py:4}},rn={card:{mb:3,boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)"}};function an({appointment:e,onContentChange:t}){const{translate:n}=(0,h.A)(),[i,o]=(0,a.useState)(!0),[r,l]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),x=(0,a.useRef)(null),{data:m}=(0,se.I)(ie.VNs,e?.client.userId&&e?.provider.userId?{variables:{clientId:e?.client.userId||0,providerId:e?.provider.userId||0,limit:1,offset:0}}:ke.h),p=m?.sessionHistory?.sessions?.[0],u=Boolean(p),g=e?.appointmentId,{status:y,isGenerating:A,isInitialLoading:f}=function({appointmentId:e,enabled:t=!0,pollingInterval:n=3e3,onCompleted:s,autoGenerate:i=!1,hasPreviousSession:o=!1}){const[r,l]=(0,a.useState)(!1),[c,d]=(0,a.useState)("Idle"),x=(0,a.useRef)(!1),[h,{loading:m,error:p}]=(0,dt.n)(xt.Hd),{data:u,loading:g,startPolling:y,stopPolling:A,error:f}=(0,se.I)(ie.PFE,e&&t?{variables:{appointmentId:String(e)},fetchPolicy:"network-only"}:ke.h),j=g&&!u,b=u?.sessionData?.aiPrepGenerationStatus||"Idle",v="Processing"===b||m,C=(0,a.useCallback)(async()=>{if(e&&!v)try{await h({variables:{appointmentId:String(e)}}),l(!0),y(n)}catch(t){console.error("Failed to generate session inference:",t)}},[e,v,h,y,n]);return(0,a.useEffect)(()=>{r&&("Completed"!==b&&"Failed"!==b||(A(),l(!1),"Completed"===b&&"Processing"===c&&s?.()),d(b))},[b,r,A,s,c]),(0,a.useEffect)(()=>{"Processing"===b&&!r&&e&&t&&(console.log("[Session Inference] Found PROCESSING status, starting polling for appointment:",e),l(!0),y(n))},[b,r,e,t,y,n]),(0,a.useEffect)(()=>{i&&o&&!x.current&&e&&t&&("Idle"===b?(x.current=!0,console.log("[Session Inference] Auto-generating inference for appointment:",e),C()):"Processing"===b?(x.current=!0,console.log("[Session Inference] Already processing for appointment:",e)):"Completed"===b&&(x.current=!0,console.log("[Session Inference] Already completed for appointment:",e)))},[i,o,e,t,b,C]),(0,a.useEffect)(()=>()=>{A()},[A]),{generateSessionInference:C,status:b,isGenerating:v,isInitialLoading:j,error:p||f}}({appointmentId:g,enabled:Boolean(g)&&u,autoGenerate:!0,hasPreviousSession:u}),j=f||A,{data:b,loading:v,refetch:C}=(0,se.I)(ie.CqR,g?{variables:{appointmentId:String(g||0)}}:ke.h),w=b?.sessionRecapAndPatterns;(0,a.useEffect)(()=>{y!==ht.COMPLETED||v||(console.log("[Session Inference] Generation completed, refetching AI prep data..."),C().then(e=>{console.log("[Session Inference] Refetch complete:",e.data)}))},[y,v,C]);const S=p?n("sections.session.waitingRoom.provider.preSessionNotes.lastSession",{date:q()(p.sessionDate).format("DD MMM YYYY"),timeAgo:q()(p.sessionDate).fromNow()}):void 0,I=w?.recap||null,k=w?.patterns||[],D=w?.suggestedDiscussionPoints||[],R=Boolean(w&&(w.recap||w.patterns?.length>0||w.suggestedDiscussionPoints?.length>0)),E=u||R;(0,a.useEffect)(()=>{const e=()=>{if(x.current){const e=x.current.innerText||"";t&&t(e)}},n=new MutationObserver(()=>{e()});return x.current&&n.observe(x.current,{childList:!0,subtree:!0,characterData:!0}),e(),()=>{n.disconnect()}},[t,E,j,i]);const T=[{label:n("sections.session.waitingRoom.provider.preSessionNotes.viewSessionHistory"),icon:(0,s.jsx)(N.A,{icon:"material-symbols:history",sx:{width:24,height:24}}),onClick:()=>l(!0)},{label:n("sections.session.waitingRoom.provider.preSessionNotes.viewNotes"),icon:(0,s.jsx)(N.A,{icon:"material-symbols:sticky-note-2-outline",sx:{width:24,height:24}}),onClick:()=>d(!0),disabled:!p?.diagnosis}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(M.A,{sx:rn.card,children:(0,s.jsxs)(Se.A,{children:[(0,s.jsx)(et,{icon:"/assets/icons/appointmentInfo/file_search.svg",title:n("sections.session.waitingRoom.provider.preSessionNotes.title"),expanded:i,onToggleExpand:()=>o(!i),actionButtons:T}),(0,s.jsx)(ct.A,{in:i,timeout:"auto",unmountOnExit:!0,children:E||j?(E||j)&&(0,s.jsxs)("div",{ref:x,children:[(0,s.jsx)(yt,{recap:I,lastSessionLabel:S,isGenerating:j}),(0,s.jsxs)(Q.Ay,{container:!0,spacing:3,children:[(0,s.jsx)(Q.Ay,{item:!0,xs:6,sx:{display:"flex"},children:(0,s.jsx)(wt,{patterns:k})}),(0,s.jsx)(Q.Ay,{item:!0,xs:6,sx:{display:"flex"},children:(0,s.jsx)(Rt,{points:D})}),(0,s.jsx)(Q.Ay,{item:!0,xs:6,sx:{display:"flex"},children:(0,s.jsx)(Wt,{concerns:[],appointmentId:e?.appointmentId,coverageType:e?.coverageType})}),(0,s.jsx)(Q.Ay,{item:!0,xs:6,sx:{display:"flex"},children:(0,s.jsx)(Kt,{clientUserId:e?.client.userId})})]})]}):(0,s.jsx)(Qe,{message:n(u?"sections.session.waitingRoom.provider.preSessionNotes.aiGeneratingMessage":"sections.session.waitingRoom.provider.preSessionNotes.noD
1ataMessage")})})]})}),(0,s.jsx)(sn,{open:r,onClose:()=>l(!1),clientId:e?.client.userId,providerId:e?.provider.userId}),(0,s.jsx)(nn,{open:c,onClose:()=>d(!1),diagnosis:p?.diagnosis})]})}var ln=n(60672);function cn({open:e,onClose:t,journal:n}){const{translate:i}=(0,h.A)(),[r,l]=(0,a.useState)("summary"),[c,d]=(0,a.useState)("today"),{data:x}=(0,se.I)(ie.QDQ,n?.journalId&&e?{variables:{journalId:n?.journalId||""}}:ke.h);if(!n)return null;const m=x?.inferredGoals?.map(e=>{const{emoji:t,cleanText:n}=(e=>{const t=e.match(/^(\p{Emoji_Presentation}|\p{Extended_Pictographic})\s*/u);return t?{emoji:t[1],cleanText:e.slice(t[0].length).trim()}:{emoji:"\ud83d\udcdd",cleanText:e}})(e.body);return{id:e.goalId,text:n,emoji:t,type:e.type.toLowerCase()}})||[],p=m.filter(e=>"today"===e.type),u=m.filter(e=>"future"===e.type),g="today"===c?p:u;return(0,s.jsx)(S.A,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{sx:dn.dialogPaper},children:(0,s.jsxs)(D.A,{sx:dn.dialogContent,children:[(0,s.jsxs)(o.A,{sx:dn.header,children:[(0,s.jsxs)(o.A,{sx:dn.titleContainer,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/journals.svg",alt:"journal",sx:dn.icon}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"h6",sx:dn.title,children:n.journalInference?.title||i("sections.session.waitingRoom.provider.journalModal.journalEntry")}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:q()(Number(n.createdAt)).format("DD MMM YYYY")})]})]}),(0,s.jsx)(le.A,{onClick:t,size:"small","aria-label":i("sections.session.waitingRoom.provider.journalModal.closeAria"),sx:dn.closeButton,children:(0,s.jsx)(De.A,{"aria-hidden":!0})})]}),(0,s.jsx)(o.A,{sx:dn.tabsContainer,children:(0,s.jsxs)(Zt.A,{value:r,onChange:(e,t)=>
1l(t),sx:dn.tabs,variant:"fullWidth",children:[(0,s.jsx)(en.A,{label:i("sections.session.waitingRoom.provider.journalModal.journalEntry"),value:"entry"}),(0,s.jsx)(en.A,{label:i("sections.session.waitingRoom.provider.journalModal.summary"),value:"summary"})]})}),"summary"===r?(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:dn.sectionTitle,children:i("sections.session.waitingRoom.provider.journalModal.journalSummary")}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:dn.summaryText,children:n.journalInference?.summary||"No summary available for this journal entry."}),n.journalInference?.emotions&&n.journalInference.emotions.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{sx:dn.divider}),(0,s.jsxs)(o.A,{sx:dn.section,children:[(0,s.jsxs)(o.A,{sx:dn.sectionHeader,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/emotions.svg",alt:"emotions",sx:dn.sectionIcon}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:dn.sectionSubtitle,children:i("sections.session.waitingRoom.provider.journalModal.emotionsDetected")})]}),(0,s.jsx)(o.A,{sx:dn.chipContainer,children:n.journalInference.emotions.map(e=>(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:dn.chipLabel,children:[(0,s.jsx)("span",{children:e.emoji}),(0,s.jsx)("span",{children:e.name})]}),size:"small",sx:dn.chip},e.emotionId))})]})]}),n.journalInference?.themes&&n.journalInference.themes.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{sx:dn.divider}),(0,s.jsxs)(o.A,{sx:dn.section,children:[(0,s.jsxs)(o.A,{sx:dn.sectionHeader,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/themes.svg",alt:"themes",sx:dn.sectionIcon}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:dn.sectionSubtitle,children:i("sections.session.waitingRoom.provider.journalModal.themesIdentified")})]}),(0,s.jsx)(o.A,{sx:dn.chipContainer,children:n.journalInference.themes.map(e=>(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:dn.chipLabel,children:[(0,s.jsx)("span",{children:e.emoji}),(0,s.jsx)("span",{children:e.name})]}),size:"small",sx:dn.chip},e.themeId))})]})]}),m.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{sx:dn.divider}),(0,s.jsxs)(o.A,{children:[(0,s.jsxs)(o.A,{sx:dn.sectionHeader,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/goals.svg",alt:"goals",sx:dn.sectionIcon}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:dn.sectionSubtitle,children:i("sections.session.waitingRoom.provider.journalModal.goals")})]}),(0,s.jsxs)(o.A,{sx:dn.goalTabsContainer,children:[(0,s.jsx)(E.A,{size:"small",onClick:()=>d("today"),sx:{...dn.goalTab,..."today"===c?dn.goalTabActive:{}},children:i("sections.session.waitingRoom.provider.journalModal.today")}),(0,s.jsx)(E.A,{size:"small",onClick:()=>d("future"),sx:{...dn.goalTab,..."future"===c?dn.goalTabActive:{}},children:i("sections.session.waitingRoom.provider.journalModal.future")})]}),(0,s.jsxs)(o.A,{sx:dn.goalsList,children:[g.map(e=>(0,s.jsx)(o.A,{sx:dn.goalCard,children:(0,s.jsxs)(k.A,{variant:"body2",sx:dn.goalText,children:[e.emoji," ",e.text]})},e.id)),0===g.length&&(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:dn.noGoals,children:i("today"===c?"sections.session.waitingRoom.provider.journalModal.noTodayGoals":"sections.session.waitingRoom.provider.journalModal.noFutureGoals")})]})]})]})]}):(0,s.jsx)(o.A,{children:(0,s.jsx)(ln.A,{placeholder:i("components.claim.journal.card.emptyPlaceholder"),onEditorStateChange:()=>{},initialState:n?.body,initialEditable:!1})})]})})}const dn={dialogPaper:{borderRadius:2,maxWidth:800},dialogContent:{p:4},header:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",mb:3},titleContainer:{display:"flex",gap:2,alignItems:"center"},icon:{width:40,height:40,opacity:.6},title:{fontWeight:600,mb:.5},closeButton:{color:Ce.Ay.light.grey[500]},tabsContainer:{borderBottom:2,borderColor:Ce.Ay.light.grey[300],mb:3},tabs:{"& .MuiTab-root":{textTransform:"none",fontWeight:500,color:Ce.Ay.light.grey[600]},"& .Mui-selected":{color:Ce.Ay.light.primary.main}},sectionTitle:{fontWeight:600,mb:1.5,fontSize:"0.875rem"},summaryText:{mb:3,lineHeight:1.6},section:{mb:3},sectionHeader:{display:"flex",gap:.75,mb:1.5,alignItems:"center"},sectionIcon:{width:16,height:16,opacity:.5},divider:{borderBottom:`1px solid ${Ce.Ay.light.grey[300]}`,my:3},sectionSubtitle:{fontWeight:500,fontSize:"0.8125rem",color:Ce.Ay.light.grey[600]},chipContainer:{display:"flex",gap:1,flexWrap:"wrap"},chip:{backgroundColor:Ce.Ay.light.grey[200],color:Ce.Ay.light.grey[800],fontWeight:500,fontSize:"0.875rem",px:1.5,height:32,border:`1px solid ${Ce.Ay.light.grey[300]}`},chipLabel:{display:"flex",gap:.5,alignItems:"center"},goalTabsContainer:{display:"flex",gap:.5,mb:2,justifyContent:"flex-end"},goalTab:{minWidth:75,px:2.5,py:.5,borderRadius:1,textTransform:"none",fontWeight:500,fontSize:"0.875rem",backgroundColor:"#EFF6FF",color:"#3B82F6",border:"none","&:hover":{backgroundColor:"#DBEAFE"}},goalTabActive:{backgroundColor:"#3B82F6",color:"white",border:"none","&:hover":{backgroundColor:"#2563EB"}},goalsList:{display:"flex",flexDirection:"column",gap:1},goalCard:{p:2,backgroundColor:Ce.Ay.light.grey[100],borderRadius:1.5,border:`1px solid ${Ce.Ay.light.grey[300]}`},goalText:{fontSize:"0.875rem"},noGoals:{textAlign:"center",py:2},journalBody:{lineHeight:1.8,whiteSpace:"pre-wrap"}},xn={card:{display:"flex",justifyContent:"space-between",alignItems:"center",height:74,p:2,"&:last-child":{mb:2}},content:{flex:1,minWidth:0,mr:2},title:{fontWeight:600,mb:.5,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}};function hn({title:e,createdAt:t,readMoreLabel:n,onReadMore:i}){return(0,s.jsxs)(M.A,{variant:"outlined",sx:xn.card,children:[(0,s.jsxs)(o.A,{sx:xn.content,children:[(0,s.jsx)(k.A,{variant:"body2",sx:xn.title,children:e}),(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",children:q()(Number(t)).format("DD MMM YYYY")})]}),(0,s.jsx)(E.A,{variant:"outlined",color:"inherit",size:"small",onClick:i,children:n})]})}const mn={container:{mb:3,minHeight:"424px",maxHeight:"424px",display:"flex",flexDirection:"column",overflow:"hidden"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",px:3,pt:3,pb:2},titleContainer:{display:"flex",gap:1,alignItems:"center"},title:{fontWeight:600,fontSize:"16px"},loadingContainer:{display:"flex",justifyContent:"center",alignItems:"center",py:4,flex:1},journalsList:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto",flex:1,px:3,pb:1,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:Ce.Ay.light.grey[100],borderRadius:"3px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Ce.Ay.light.grey[400],borderRadius:"3px","&:hover":{backgroundColor:Ce.Ay.light.grey[500]}}}};function pn({clientUserId:e}){const{translate:t}=(0,h.A)(),[n,i]=(0,a.useState)("7days"),[l,c]=(0,a.useState)(0),[d,x]=(0,a.useState)(null),[m,p]=(0,a.useState)(!1),{data:u,loading:g}=(0,se.I)(ie.i_w,e?{variables:{clientUserId:String(e)}}:ke.h),y=u?.journals||[],A=(0,a.useMemo)(()=>y&&0!==y.length?y.filter(e=>{const t=q()(Number(e.createdAt));if("7days"===n){const e=q()().subtract(7*Math.abs(l),"days"),n=q()(e).subtract(6,"days");return t.isBetween(n,e,"day","[]")}{const e=q()().subtract(Math.abs(l),"months");return t.isSame(e,"month")&&t.isSame(e,"year")}}):[],[y,n,l]),f=(0,a.useMemo)(()=>{const e=q()();if("7days"===n){const e=q()().subtract(7*Math.abs(l),"days");return`${q()(e).subtract(6,"days").format("DD MMM")} - ${e.format("DD MMM")}`}if(0===l){return`${q()().startOf("month").format("DD MMM")} - ${e.format("DD MMM")}`}{const e=q()().subtract(Math.abs(l),"months");return`${e.startOf("month").format("DD MMM")} - ${e.endOf("month").format("DD MMM")}`}},[n,l]);return(0,s.jsxs)(M.A,{variant:"outlined",sx:mn.container,children:[(0,s.jsxs)(o.A,{sx:mn.header,children:[(0,s.jsxs)(o.A,{sx:mn.titleContainer,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/journals.svg",alt:"journals",sx:{width:24,height:24,opacity:.6}}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:mn.title,children:t("sections.session.waitingRoom.provider.journals.title")})]}),(0,s.jsx)(rt,{selectedRange:n,weekLabel:t("sections.session.waitingRoom.provider.journals.week"),monthLabel:t
1("sections.session.waitingRoom.provider.journals.month"),onRangeChange:e=>{i(e),c(0)}})]}),g?(0,s.jsx)(o.A,{sx:mn.loadingContainer,children:(0,s.jsx)(r.A,{size:24})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(it,{dateRangeDisplay:f,onPrevious:()=>{c(e=>e-1)},onNext:()=>{l<0&&c(e=>e+1)},nextDisabled:l>=0}),A&&0!==A.length?(0,s.jsx)(o.A,{sx:mn.journalsList,children:A.map(e=>(0,s.jsx)(hn,{title:e.journalInference?.title||t("sections.session.waitingRoom.provider.journalModal.journalEntry"),createdAt:e.createdAt,readMoreLabel:t("sections.session.waitingRoom.provider.journals.readMore"),onReadMore:()=>(e=>{x(e),p(!0)})(e)},e.journalId))}):(0,s.jsx)(lt,{icon:"/assets/icons/appointmentInfo/search.svg",message:t("sections.session.waitingRoom.provider.journals.noJournalsInRange"),altText:"no journals"})]}),(0,s.jsx)(cn,{open:m,onClose:()=>p(!1),journal:d})]})}const un=(0,je.A)((0,s.jsx)("path",{d:"M7 15h7v2H7zm0-4h10v2H7zm0-4h10v2H7zm12-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75M19 19H5V5h14z"}),"AssignmentOutlined");const gn=e=>{const t=e.toLowerCase();return t.includes("coping")||t.includes("skill")?"/assets/illustrations/Coping_Skills_Assignment.png":t.includes("mood")||t.includes("check")?"/assets/illustrations/Daily_Mood_Check_In_Assignment.png":"/assets/illustrations/Sample_Assignment.jpg"};function yn({assignments:e}){const{translate:t}=(0,h.A)(),n=e&&e.length>0?e.filter(e=>"Completed"===e.status).length:0,i=e?.length||0;return(0,s.jsxs)(M.A,{variant:"outlined",sx:An.container,children:[(0,s.jsx)(o.A,{sx:An.header,children:(0,s.jsxs)(o.A,{sx:An.titleContainer,children:[(0,s.jsx)(un,{sx:{fontSize:24,color:"text.secondary"}}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:An.title,children:t("sections.session.waitingRoom.provider.assignments.title")}),e&&e.length>0&&(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",children:t("sections.session.waitingRoom.provider.assignments.completed",{completed:n,total:i})})]})]})}),e&&0!==e.length?(0,s.jsx)(o.A,{sx:An.assignmentsList,children:e.map(e=>{const n=(e=>{switch(e){case"Completed":return{bg:"#D1FAE5",text:"#065F46"};case"In Progress":return{bg:"#FEF3C7",text:"#92400E"};case"To Do":return{bg:Ce.Ay.light.grey[200],text:Ce.Ay.light.grey[700]}}})(e.status),i=`status${e.status.replace(/\s/g,"")}`;return(0,s.jsxs)(o.A,{sx:An.assignmentCard,children:[(0,s.jsxs)(o.A,{sx:An.assignmentInfo,children:[(0,s.jsx)(o.A,{component:"img",src:gn(e.title),alt:"assignment",sx:An.avatarIcon}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"body2",sx:An.assignmentTitle,children:e.title}),(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",children:t("sections.session.waitingRoom.provider.assignments.assignedOn",{date:q()(e.assignedDate).format("DD MMM YYYY")})})]})]}),(0,s.jsx)(fe.A,{label:t(`sections.session.waitingRoom.provider.assignments.${i}`),size:"small",sx:{backgroundColor:n.bg,color:n.text,fontWeight:500}})]},e.id)})}):(0,s.jsxs)(o.A,{sx:An.emptyState,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/search.svg",alt:"no assignments",sx:An.emptyIcon}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:t("sections.session.waitingRoom.provider.assignments.noAssignments")})]})]})}const An={container:{mb:3,minHeight:"424px",maxHeight:"424px",display:"flex",flexDirection:"column",overflow:"hidden"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",px:3,pt:3,pb:2},titleContainer:{display:"flex",gap:1,alignItems:"center"},title:{fontWeight:600,fontSize:"16px",lineHeight:1.2},assignButton:{height:36,border:`1px solid ${Ce.Ay.light.grey[300]}`,color:Ce.Ay.light.grey[700],textTransform:"none",fontWeight:500,"&:hover":{borderColor:Ce.Ay.light.grey[400],backgroundColor:Ce.Ay.light.grey[100]}},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:4,px:3,ga
1p:1,flex:1},emptyIcon:{width:40,height:40},assignmentsList:{display:"flex",flexDirection:"column",gap:1,overflowY:"auto",flex:1,px:3,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:Ce.Ay.light.grey[100],borderRadius:"3px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Ce.Ay.light.grey[400],borderRadius:"3px","&:hover":{backgroundColor:Ce.Ay.light.grey[500]}}},assignmentCard:{display:"flex",justifyContent:"space-between",alignItems:"center",pl:0,pr:1.5,py:1.5,backgroundColor:Ce.Ay.light.grey},assignmentInfo:{display:"flex",gap:1.5,alignItems:"center"},avatarIcon:{width:40,height:40,borderRadius:1.5,flexShrink:0,objectFit:"cover"},assignmentTitle:{fontWeight:600,mb:.25}};function fn({open:e,onClose:t,conversation:n,clientAvatar:i,clientName:l="Client"}){const{translate:c}=(0,h.A)(),[d,x]=(0,a.useState)("conversation"),{data:m,loading:p}=(0,se.I)(ie.Lt,n?.id&&e?{variables:{conversationId:n?.id||"",limit:100}}:ke.h),u=m?.conversationMessages||[];return n?(0,s.jsx)(S.A,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{sx:jn.dialogPaper},children:(0,s.jsxs)(D.A,{sx:jn.dialogContent,children:[(0,s.jsxs)(o.A,{sx:jn.header,children:[(0,s.jsxs)(o.A,{sx:jn.titleContainer,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/chatbot.svg",alt:"carebot",sx:jn.icon}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"h6",sx:jn.title,children:n.title}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:q()(parseInt(n.date,10)).format("DD MMM YYYY")})]})]}),(0,s.jsx)(le.A,{onClick:t,size:"small","aria-label":c("sections.session.waitingRoom.provider.carebotModal.closeAria"),sx:jn.closeButton,children:(0,s.jsx)(De.A,{"aria-hidden":!0})})]}),(0,s.jsx)(o.A,{sx:jn.tabsContainer,children:(0,s.jsxs)(Zt.A,{value:d,onChange:(e,t)=>
1x(t),sx:jn.tabs,variant:"fullWidth",children:[(0,s.jsx)(en.A,{label:c("sections.session.waitingRoom.provider.carebotModal.conversation")||"Carebot Conversation",value:"conversation"}),(0,s.jsx)(en.A,{label:c("sections.session.waitingRoom.provider.carebotModal.summary")||"Summary",value:"summary"})]})}),"conversation"===d?(0,s.jsx)(o.A,{sx:jn.conversationContainer,children:p?(0,s.jsx)(o.A,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(r.A,{size:24})}):u.length>0?u.map(e=>(0,s.jsxs)(o.A,{sx:{...jn.messageRow,justifyContent:"user"===e.role?"flex-end":"flex-start"},children:["assistant"===e.role&&(0,s.jsx)(o.A,{sx:jn.carebotIcon,children:(0,s.jsx)("img",{src:"/favicon/Reachlink_Favicon.svg",alt:"Reachlink",style:{width:28,height:28}})}),(0,s.jsx)(o.A,{sx:{...jn.messageBubble,..."assistant"===e.role?jn.carebotMessage:jn.userMessage},children:(0,s.jsx)(k.A,{variant:"body2",sx:jn.messageText,children:e.content})}),"user"===e.role&&(0,s.jsx)(Me.A,{src:i,alt:l,sx:jn.userAvatar,children:l.charAt(0).toUpperCase()})]},e.messageId)):(0,s.jsx)(o.A,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:"No conversation messages available."})})}):(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"subtitle2",sx:jn.sectionTitle,children:c("sections.session.waitingRoom.provider.carebotModal.conversationSummary")||"Conversation Summary"}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",sx:jn.summaryText,children:n.summary||"No summary available for this conversation."}),(0,s.jsx)(o.A,{sx:jn.divider}),(0,s.jsxs)(o.A,{sx:jn.section,children:[(0,s.jsxs)(o.A,{sx:jn.sectionHeader,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/emotions.svg",alt:"emotions",sx:jn.sectionIcon}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:jn.sectionSubtitle,children:c("sections.session.waitingRoom.provider.journalModal.emotionsDetected")})]}),(0,s.jsxs)(o.A,{sx:jn.chipContainer,children:[(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:jn.chipLabel,children:[(0,s.jsx)("span",{children:"\ud83d\ude1f"}),(0,s.jsx)("span",{children:"Anxious"})]}),size:"small",sx:jn.chip}),(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:jn.chipLabel,children:[(0,s.jsx)("span",{children:"\ud83e\udd14"}),(0,s.jsx)("span",{children:"Reflective"})]}),size:"small",sx:jn.chip})]})]}),(0,s.jsx)(o.A,{sx:jn.divider}),(0,s.jsxs)(o.A,{sx:jn.section,children:[(0,s.jsxs)(o.A,{sx:jn.sectionHeader,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/themes.svg",alt:"themes",sx:jn.sectionIcon}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:jn.sectionSubtitle,children:c("sections.session.waitingRoom.provider.journalModal.themesIdentified")})]}),(0,s.jsxs)(o.A,{sx:jn.chipContainer,children:[(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:jn.chipLabel,children:[(0,s.jsx)("span",{children:"\ud83d\udcbc"}),(0,s.jsx)("span",{children:"Work-related stress"})]}),size:"small",sx:jn.chip}),(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:jn.chipLabel,children:[(0,s.jsx)("span",{children:"\u23f0"}),(0,s.jsx)("span",{children:"Time management"})]}),size:"small",sx:jn.chip}),(0,s.jsx)(fe.A,{label:(0,s.jsxs)(o.A,{sx:jn.chipLabel,children:[(0,s.jsx)("span",{children:"\ud83d\udd25"}),(0,s.jsx)("span",{children:"Emotional regulation"})]}),size:"small",sx:jn.chip})]})]})]})]})}):null}const jn={dialogPaper:{borderRadius:2,maxWidth:800},dialogContent:{p:4},header:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",mb:3},titleContainer:{display:"flex",gap:2,alignItems:"center"},icon:{width:40,height:40,opacity:.6},title:{fontWeight:600,mb:.5},closeButton:{color:Ce.Ay.light.grey[500]},tabsContainer:{borderBottom:2,borderColor:Ce.Ay.light.grey[300],mb:3},tabs:{"& .MuiTab-root":{textTransform:"none",fontWeight:500,color:Ce.Ay.light.grey[600]},"& .Mui-selected":{color:Ce.Ay.light.primary.main}},conversationContainer:{display:"flex",flexDirection:"column",gap:2,maxHeight:"500px",overflowY:"auto",pr:1},messageRow:{display:"flex",gap:1,alignItems:"flex-start"},messageBubble:{maxWidth:"70%",p:1.5,borderRadius:2},carebotMessage:{backgroundColor:Ce.Ay.light.grey[200]},userMessage:{backgroundColor:"#D5E7F9"},messageText:{lineHeight:1.6,color:Ce.Ay.light.grey[800]},carebotIcon:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,mt:.5},userAvatar:{width:28,height:28,flexShrink:0,mt:.5},sectionTitle:{fontWeight:600,mb:1.5,fontSize:"0.875rem"},summaryText:{lineHeight:1.6,mb:3},section:{mb:3},sectionHeader:{display:"flex",gap:.75,mb:1.5,alignItems:"center"},sectionIcon:{width:16,height:16,opacity:.5},divider:{borderBottom:`1px solid ${Ce.Ay.light.grey[300]}`,my:3},sectionSubtitle:{fontWeight:500,fontSize:"0.8125rem",color:Ce.Ay.light.grey[600]},chipContainer:{display:"flex",gap:1,flexWrap:"wrap"},chip:{backgroundColor:Ce.Ay.light.grey[200],color:Ce.Ay.light.grey[800],fontWeight:500,fontSize:"0.875rem",px:1.5,height:32,border:`1px solid ${Ce.Ay.light.grey[300]}`},chipLabel:{display:"flex",gap:.5,alignItems:"center"}},bn={mb:3,minHeight:"424px",maxHeight:"424px",display:"flex",flexDirection:"column",overflow:"hidden"},vn={display:"flex",justifyContent:"space-between",alignItems:"center",px:3,pt:3,pb:2},Cn={display:"flex",gap:1,alignItems:"center"},wn={fontWeight:600,fontSize:"16px"},Sn={display:"flex",justifyContent:"center",alignItems:"center",py:4,flex:1},In={display:"flex",border:`1px solid ${Ce.Ay.light.grey[300]}`,borderRadius:1,overflow:"hidden"},kn={width:69,height:36,borderRadius:0,backgroundColor:"white",color:Ce.Ay.light.grey[700],textTransform:"none",fontWeight:500,px:2,"&:hover":{backgroundColor:Ce.Ay.light.grey}},Dn={backgroundColor:"#DBEAFE",color:"#1D4ED8",fontWeight:600,"&:hover":{backgroundColor:"#BFDBFE"}},Rn={borderLeft:`1px solid ${Ce.Ay.light.grey[300]}`},En={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:4,px:3,ga
1p:1,flex:1},Mn={fontSize:40,color:Ce.Ay.light.grey[400]},Tn={display:"flex",alignItems:"center",gap:1,pl:2,pr:3,mb:2},Nn={fontWeight:600},Ln={display:"flex",flexDirection:"column",gap:3,overflowY:"auto",flex:1,px:3,pb:1,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:Ce.Ay.light.grey[100],borderRadius:"3px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Ce.Ay.light.grey[400],borderRadius:"3px","&:hover":{backgroundColor:Ce.Ay.light.grey[500]}}},Pn={display:"flex",justifyContent:"space-between",alignItems:"center",height:74,p:2,border:`1px solid ${Ce.Ay.light.grey[300]}`,borderRadius:2,backgroundColor:"white","&:last-child":{mb:2}},zn={flex:1,minWidth:0,mr:2},Wn={fontWeight:600,mb:.5,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Fn={minWidth:"auto",color:Ce.Ay.light.grey[700],textTransform:"none",fontWeight:500,border:`1px solid ${Ce.Ay.light.grey[300]}`,borderRadius:1.5,px:2,py:.75,"&:hover":{backgroundColor:Ce.Ay.light.grey,borderColor:Ce.Ay.light.grey[400]}};function Bn({clientUserId:e,clientName:t,clientPhotoUrl:n}){const{translate:i}=(0,h.A)(),l=(0,ce.A)(),[c,d]=(0,a.useState)("7days"),[x,m]=(0,a.useState)(0),[p,u]=(0,a.useState)(null),[g,y]=(0,a.useState)(!1),{data:A,loading:f}=(0,se.I)(ie.vzi,e?{variables:{clientUserId:String(e)}}:ke.h),j=A?.carebotConversations||[],b=(0,a.useMemo)(()=>j&&0!==j.length?j.filter(e=>{const t=q()(parseInt(e.date,10));if("7days"===c){const e=q()().subtract(7*Math.abs(x),"days"),n=q()(e).subtract(6,"days");return t.isBetween(n,e,"day","[]")}{const e=q()().subtract(Math.abs(x),"months");return t.isSame(e,"month")&&t.isSame(e,"year")}}):[],[j,c,x]),v=(0,a.useMemo)(()=>{const e=q()();if("7days"===c){const e=q()().subtract(7*Math.abs(x),"days");return`${q()(e).subtract(6,"days").format("DD MMM")} - ${e.format("DD MMM")}`}if(0===x){return`${q()().startOf("month").format("DD MMM")} - ${e.format("DD MMM")}`}{const e=q()().subtract(Math.abs(x),"months");return`${e.startOf("month").format("DD MMM")} - ${e.endOf("month").format("DD MMM")}`}},[c,x]),C=e=>{d(e),m(0)};return(0,s.jsxs)(M.A,{variant:"outlined",sx:bn,children:[(0,s.jsxs)(o.A,{sx:vn,children:[(0,s.jsxs)(o.A,{sx:Cn,children:[(0,s.jsx)(N.A,{icon:"material-symbols-light:robot-2-outline",height:24,width:24,color:l.palette.text.secondary}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:wn,children:i("sections.session.waitingRoom.provider.carebot.title")})]}),(0,s.jsxs)(o.A,{sx:In,children:[(0,s.jsx)(E.A,{onClick:()=>C("7days"),sx:"7days"===c?{...kn,...Dn}:kn,children:i("sections.session.waitingRoom.provider.carebot.week")}),(0,s.jsx)(E.A,{onClick:()=>C("30days"),sx:"30days"===c?{...kn,...Rn,...Dn}:{...kn,...Rn},children:i("sections.session.waitingRoom.provider.carebot.month")})]})]}),f?(0,s.jsx)(o.A,{sx:Sn,children:(0,s.jsx)(r.A,{size:24})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.A,{sx:Tn,children:[(0,s.jsx)(le.A,{size:"small",onClick:()=>{m(e=>e-1)},"aria-label":i("sections.session.waitingRoom.provider.carebot.previousPeriodAria"),children:(0,s.jsx)(tt.A,{fontSize:"small","aria-hidden":!0})}),(0,s.jsx)(k.A,{variant:"body2",sx:Nn,children:v}),(0,s.jsx)(le.A,{size:"small",onClick:()=>{x<0&&m(e=>e+1)},disabled:x>=0,"aria-label":i("sections.session.waitingRoom.provider.carebot.nextPeriodAria"),children:(0,s.jsx)(nt.A,{fontSize:"small","aria-hidden":!0})})]}),b&&0!==b.length?(0,s.jsx)(o.A,{sx:Ln,children:b.map(e=>(0,s.jsxs)(o.A,{sx:Pn,children:[(0,s.jsxs)(o.A,{sx:zn,children:[(0,s.jsx)(k.A,{variant:"body2",sx:Wn,children:e.title}),(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",children:q()(parseInt(e.date,10)).format("DD MMM YYYY")})]}),(0,s.jsx)(E.A,{size:"small",sx:Fn,onClick:()=>(e=>{u(e),y(!0)})(e),children:i("sections.session.waitingRoom.provider.carebot.readMore")})]},e.id))}):(0,s.jsxs)(o.A,{sx:En,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/search.svg",alt:"no conversations",sx:Mn}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:i("sections.session.waitingRoom.provider.carebot.noConversationsInRange")})]})]}),(0,s.jsx)(fn,{open:g,onClose:()=>{y(!1)},conversation:p,clientAvatar:n,clientName:t})]})}
1const On=(0,je.A)((0,s.jsx)("path",{d:"m18 9-1.41-1.42L10 14.17l-2.59-2.58L6 13l4 4zm1-6h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75M19 19H5V5h14z"}),"AssignmentTurnedInOutlined"),$n=e=>T.EA[e.title].fullName||"",Hn=e=>{const t=e.toLowerCase();return t.includes("anxiety")?"/assets/illustrations/Anxiety_Assessment.png":t.includes("depression")?"/assets/illustrations/Depression_Assessment.png":t.includes("sleep")?"/assets/illustrations/Sleep_Assessment.png":"/assets/illustrations/Anxiety_Assessment.png"};function Vn({assessments:e}){const{translate:t}=(0,h.A)();return(0,s.jsxs)(M.A,{variant:"outlined",sx:Gn.container,children:[(0,s.jsxs)(o.A,{sx:Gn.header,children:[(0,s.jsx)(On,{sx:{fontSize:24,color:"text.secondary"}}),(0,s.jsx)(k.A,{variant:"subtitle2",sx:Gn.title,children:t("sections.session.waitingRoom.provider.assessments.title")})]}),e&&0!==e.length?(0,s.jsx)(o.A,{sx:Gn.assessmentsList,children:e.map(e=>{const n=(e=>{const t=T.EA[e.title];return t&&t.interpretation?t.interpretation(e.score):"minimal"})(e),i=(e=>{const t=T.YD[e];return t?{color:t.fontColor,bgColor:t.bgColor}:{color:Ce.Ay.light.grey[700],bgColor:Ce.Ay.light.grey[200]}})(n);return(0,s.jsxs)(o.A,{sx:Gn.assessmentCard,children:[(0,s.jsxs)(o.A,{sx:Gn.assessmentInfo,children:[(0,s.jsx)(o.A,{component:"img",src:Hn(e.title),alt:"assessment",sx:Gn.avatarIcon}),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(k.A,{variant:"body2",sx:Gn.assessmentTitle,children:$n(e)}),(0,s.jsx)(k.A,{variant:"caption",color:"text.secondary",children:q()(e.date).format("DD MMM YYYY, h:mm A")})]})]}),(0,s.jsx)(fe.A,{label:t("sections.session.waitingRoom.provider.assessments.score",{score:e.score}),size:"small",sx:{backgroundColor:i.bgColor,color:i.color,fontWeight:600}})]},e.id)})}):(0,s.jsxs)(o.A,{sx:Gn.emptyState,children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/search.svg",alt:"no assessments",sx:Gn.emptyIcon}),(0,s.jsx)(k.A,{variant:"body2",color:"text.secondary",children:t("sections.session.waitingRoom.provider.assessments.noAssessments")})]})]})}const Gn={container:{mb:3,minHeight:"424px",maxHeight:"424px",display:"flex",flexDirection:"column",overflow:"hidden"},header:{display:"flex",gap:1,alignItems:"center",px:3,pt:3,pb:2},title:{fontWeight:600,fontSize:"16px"},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:4,px:3,gap:1,flex:1},emptyIcon:{width:40,height:40},assessmentsList:{display:"flex",flexDirection:"column",gap:1,overflowY:"auto",flex:1,px:3,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:Ce.Ay.light.grey[100],borderRadius:"3px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Ce.Ay.light.grey[400],borderRadius:"3px","&:hover":{backgroundColor:Ce.Ay.light.grey[500]}}},assessmentCard:{display:"flex",justifyContent:"space-between",alignItems:"center",pl:0,pr:1.5,py:1.5,backgroundColor:Ce.Ay.light.grey},assessmentInfo:{display:"flex",gap:1.5,alignItems:"center"},avatarIcon:{width:40,height:40,borderRadius:1.5,flexShrink:0,objectFit:"cover"},assessmentTitle:{fontWeight:600,mb:.25}};var _n=n(254);function Yn({appointment:e}){const{translate:t}=(0,h.A)(),[n,i]=(0,a.useState)(!0),{data:r}=(0,se.I)(ie.REK,e?.client.userId?{variables:{clientUserId:String(e?.client.userId||"")}}:ke.h),l=r?.assessmentsCompleted||[],{data:c}=(0,se.I)(ie.XE,e?.client.userId?{variables:{clientId:String(e?.client.userId||""),pagination:{limit:100}}}:ke.h),d=(0,a.useMemo)(()=>c?.paginatedAssignmentSubmissions?.items||[],[c?.paginatedAssignmentSubmissions?.items]),x=(0,a.useMemo)(()=>{const e=new Map;return d.forEach(t=>{const n=t.assignment?.slug;n&&e.set(n,t)}),_n.Ay.map(t=>{const n=e.has(t.slug);return{id:t.slug,title:t.slug.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase()),assignedDate:new Date,status:n?"Completed":"To Do",dueDate:void 0}})},[d]);return(0,s.jsx)(M.A,{sx:{boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)"},children:(0,s.jsxs)(Se.A,{children:[(0,s.jsxs)(o.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:n?3:0},children:[(0,s.jsxs)(o.A,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/bolt.svg",alt:"client engagement",sx:{width:20,height:20}}),(0,s.jsx)(k.A,{variant:"subtitle1",sx:{fontWeight:600},children:"Client Engagement"})]}),(0,s.jsx)(le.A,{size:"small",onClick:()=>i(!n),"aria-label":t(n?"sections.session.waitingRoom.provider.clientEngagement.collapseAria":"sections.session.waitingRoom.provider.clientEngagement.expandAria"),"aria-expanded":n,sx:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:(0,s.jsx)(Xe.A,{"aria-hidden":!0})})]}),(0,s.jsx)(ct.A,{in:n,timeout:"auto",unmountOnExit:!0,children:(0,s.jsxs)(Q.Ay,{container:!0,spacing:3,children:[(0,s.jsxs)(Q.Ay,{item:!0,xs:6,children:[(0,s.jsx)(pn,{clientUserId:e?.client.userId}),(0,s.jsx)(yn,{assignments:x})]}),(0,s.jsxs)(Q.Ay,{item:!0,xs:6,children:[(0,s.jsx)(Bn,{clientUserId:e?.client.userId,clientName:`${e?.client.firstName||""} ${e?.client.lastName||""}`.trim(),clientPhotoUrl:e?.client.photoUrl}),(0,s.jsx)(Vn,{assessments:l})]})]})})]})})}Ce.Ay.light.primary.dark,Ce.Ay.light.primary.darker;const Kn=(e,t=220)=>{const n=e.trim().split(/\s+/).length;return Math.max(1,Math.ceil(n/t))},qn=({appointment:e,joinSession:t})=>{const{translate:n}=(0,h.A)(),i=q()(e.startDateTime),{data:r}=(0,se.I)(ie.VNs,{variables:{clientId:e.client.userId||0,providerId:e.provider.userId||0,limit:1,offset:0}
1,skip:!e.client.userId||!e.provider.userId}),l=!Boolean(r?.sessionHistory?.sessions?.length),c=r?.sessionHistory?.sessions?.[0],d=c?.appointmentId,{data:x}=(0,se.I)(ie.CqR,{variables:{appointmentId:String(d||0)},skip:!d}),m=x?.sessionRecapAndPatterns,p=m?.recap||c?.recap,u=p?Kn(p):0,[g,y]=(0,a.useState)(q()());(0,we.A)({interval:1e3,onTick:()=>y(q()()),loop:!0});const f=i.diff(g,"hours",!0),b=i.diff(g,"minutes"),v=f<=24&&f>=0,[C,S]=(0,a.useState)("");return(0,s.jsxs)(A.A,{component:j.PY1.div,variants:w.JA,initial:"initial",animate:"animate",exit:"exit",children:[(0,s.jsxs)(o.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:[(0,s.jsx)(X.A,{links:[{name:"Home",href:ee.uN.general.dashboard},{name:"Appointments",href:ee.uN.general.appointments},{name:[e.client.firstName,e.client.lastName].join(" ")}],showBackButton:!0}),(0,s.jsxs)(o.A,{sx:{display:"flex",gap:1},children:[l&&(0,s.jsx)(fe.A,{icon:(0,s.jsx)(o.A,{component:"img",src:"/assets/icons/appointmentInfo/star_burst.svg",alt:"first session",sx:{width:18,height:18}}),label:n("sections.session.waitingRoom.firstSessionLabel"),size:"medium",sx:{fontWeight:600,backgroundColor:Ce.Ay.light.success.lighter,color:Ce.Ay.light.success.darker,borderRadius:1,"& .MuiChip-icon":{color:Ce.Ay.light.success.darker}}}),(0,s.jsx)(fe.A,{icon:v?(0,s.jsx)(be,{}):(0,s.jsx)(ve,{}),label:(()=>{if(b<1)return n("sections.session.waitingRoom.startsNow");if(b<60)return n("sections.session.waitingRoom.startsInMinutes",{count:b});if(f<24){const e=Math.floor(f);return n("sections.session.waitingRoom.startsInHours",{count:e})}return i.format("ddd, MMM D [at] h:mm A")})(),variant:"outlined",size:"medium",sx:{borderRadius:1}})]})]}),(0,s.jsx)(Ke,{appointment:e,joinSession:t,sessionCount:(r?.sessionHistory?.total||0)+1}),(0,s.jsx)(o.A,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:(0,s.jsx)(k.A,{variant:"h6",sx:{fontWeight:700},children:n("sections.session.waitingRoom.preSessionNotesTitle")})}),(0,s.jsx)(o.A,{children:(0,s.jsx)(fe.A,{icon:(0,s.jsx)(be,{sx:{fontSize:16}}),label:n("sections.session.waitingRoom.minRead",{count:Kn(C)>0?Kn(C):u}),size:"small",sx:{backgroundColor:"#E0F2FE",color:"#0369A1",fontWeight:500,"& .MuiChip-icon":{color:"#0369A1"},mb:2}})}),(0,s.jsx)(an,{appointment:e,onContentChange:S}),(0,s.jsx)(Yn,{appointment:e})]})};var Un=n(88653),Jn=n(82080);function Qn(){const{translate:e}=(0,h.A)();return(0,s.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,width:"100%"},children:[(0,s.jsx)(k.A,{variant:"h6",textAlign:"center",sx:{mb:1},children:e("sections.session.waitingRoom.testSession")}),(0,s.jsx)(Jn.G,{sx:{flex:1},children:(0,s.jsxs)(A.A,{spacing:2,children:[(0,s.jsx)(Un.A,{icon:"mdi:information-outline",textProps:{textAlign:"left"},sx:{justifyContent:"flex-start"},children:e("sections.session.waitingRoom.thisIsATest")}),(0,s.jsx)(M.A,{variant:"outlined",children:(0,s.jsx)(Se.A,{children:e("sections.session.waitingRoom.testSessionDisclaimer")})})]})})]})}const Xn=({isSessionLoading:e,onStartTestSession:t})=>{const{translate:n}=(0,h.A)();return(0,s.jsx)(o.A,{component:j.PY1.div,variants:w.JA,initial:"initial",animate:"animate",exit:"exit",sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",flexShrink:1,marginTop:10},children:(0,s.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,width:480,gap:2},children:[(0,s.jsx)(Qn,{}),(0,s.jsx)(W.A,{variant:"contained",color:"primary",onClick:t,sx:{mt:2},fullWidth:!0,loading:e,children:n("sections.session.waitingRoom.joinSession")})]})})};var Zn=n(11577);var es=n(17132);const ts=({loading:e,appointment:t,isTestSession:n,showCallConnect:i=!1,toggleShowCallConnect:o})=>{const{isClient:r,isProvider:c,isSessionLoading:d,startTestSession:m,tooEarly:u,tooLate:g,pendingAssessments:b,handleStartAssessment:S,handleDismissAssessment:I,shouldRenderAssessmentPreview:k,joinSession:D}=function({loading:e,appointment:t,isTestSession:n}){const{isClient:s,isProvider:i,user:o}=(0,x.A)(),{translate:r}=(0,h.A)(),c=(0,l.Zp)(),{pendingAssessments:d,setPendingAssessments:m,showAssessmentPreview:u,setShowAssessmentPreview:g,startSession:A,isSessionLoading:f,startTestSession:j}=(0,p.T)(),[b,v]=(0,a.useState)(!1),{localVideoOptions:C,setLocalVideoOptions:w}=(0,y.b)(),{tooEarly:S,tooLate:I,shouldShowAssessment:k}=(0,a.useMemo)(()=>
1{if(!t||e)return{tooEarly:!1,tooLate:!1,shouldShowAssessment:!1};const n=q()(t.startDateTime).subtract(_e.Hq.start,"minutes").isAfter(q()()),i=q()(t.endDateTime).add(_e.Hq.end,"minutes").isBefore(q()()),o=q()().subtract(30,"minutes"),r=q()(t.startDateTime).isBefore(o);return{tooEarly:n,tooLate:i,shouldShowAssessment:s&&r}},[t,e,s]),[D,{data:R}]=(0,Ie._)(ie.JJZ,{fetchPolicy:"network-only"});(0,a.useEffect)(()=>{if(!R)return;const e=R;let t=[];e.client?.clientProfile?.assessmentsToTake?.length>0?t=(0,Zn._)(e.client.clientProfile.assessmentsToTake):e.client?.clientProfile?.prescribedAssessments?.length>0&&(t=(0,Zn._)(e.client.clientProfile.prescribedAssessments));let n=[...t];n.length>0&&!n.includes(Z.PA.VC_FEEDBACK)&&n.push(Z.PA.VC_FEEDBACK),m(n),g(!0)},[R,m,g]);const[E,M]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(t?.appointmentId){const e=`assessment_completed_${t.appointmentId}`,n="true"===sessionStorage.getItem(e);M(n),n&&g(!1)}},[t?.appointmentId,g]),(0,a.useEffect)(()=>{k&&s&&!b&&0===d.length&&t?.client?.userId&&!E&&(v(!0),D({variables:{clientUserId:t.client.userId}}),v(!1))},[k,s,b,d.length,t?.client?.userId,D,E]);const T=(0,a.useCallback)(()=>{t&&d.length>0&&(g(!1),c(ee.uN.general.assessments,{state:{assessmentsToTake:d,returnToSession:!0,appointmentId:t.appointmentId}}))},[t,d,g,c]),N=(0,a.useCallback)(()=>{if(!t)throw new Error("No appointment found");A(t)},[A,t]),L=(0,a.useCallback)(()=>{g(!1)},[g]),P=s&&k&&u&&d.length>0&&!E;return{isClient:s,isProvider:i,user:o,translate:r,navigate:c,isSessionLoading:f,localVideoOptions:C,setLocalVideoOptions:w,startTestSession:j,tooEarly:S,tooLate:I,pendingAssessments:d,handleStartAssessment:T,handleDismissAssessment:L,shouldRenderAssessmentPreview:P,joinSession:N}}({loading:e,appointment:t,isTestSession:n});return(0,s.jsx)(A.A,{sx:{flex:1},children:(0,s.jsx)(f.N,{mode:"wait",propagate:!0,children:n?(0,s.jsx)(Xn,{isSessionLoading:d,onStartTestSession:()=>m()},"test"):e?(0,s.jsx)(A.A,{component:j.PY1.div,variants:w.MS,initial:"initial",animate:"animate",exit:"exit",sx:{flex:1,justifyContent:"center",alignItems:"center",display:"flex"},children:(0,s.jsx)(v(),{animationData:C,loop:!0,autoplay:!0,style:{width:140,height:140}})}):t?r?(0,s.jsxs)(es.iI,{children:[(0,s.jsx)(ye,{appointment:t,joinSession:D,isSessionLoading:d,tooEarly:u,tooLate:g}),(0,s.jsx)(z,{open:k,assessmentsToTake:b,onTakeAssessments:S,onMaybeLater:I})]},"client-waiting-room"):c?i?(0,s.jsx)(J,{appointment:t,toggleShowCallConnect:o},"call-connect"):(0,s.jsx)(qn,{appointment:t,joinSession:D},"provider-pre-session"):(0,s.jsx)(Ae,{},"default-pre-session"):(0,s.jsx)(Ae,{},"default-pre-session")})})},ns=(0,a.lazy)(()=>n.e(52069).then(n.bind(n,52069)));function ss(){const{isInCall:e}=(0,p.T)(),{translate:t}=(0,h.A)(),{isClient:n,isProvider:A,isAuthenticated:j}=(0,x.A)(),{themeStretch:b}=(0,m.A)();let[v]=(0,l.ok)();const C=v.get("id")?parseInt(v.get("id")??""):null,w="true"===v.get("test-session"),[S,I]=(0,a.useState)(t(w?"contexts.liveSession.testSession":"contexts.liveSession.liveSession"));(0,a.useEffect)(()=>{I(t(w?"contexts.liveSession.testSession":"contexts.liveSession.liveSession"))},[w]);const k=(0,a.useCallback)(e=>{const s=n?e.provider?.nickName?e.provider?.firstName:t("contexts.liveSession.provider"):e.client?.nickName?e.client?.firstName:t("contexts.liveSession.client");I(t("contexts.liveSession.sessionWith",{name:s}))},[n,t]),{loading:D,appointment:R,error:E}=(0,d.A)(C,{skip:!j,onCompleted:k}),{setAppointmentId:M}=(0,u.A)();(0,a.useEffect)(()=>{C&&M(C)},[M,C]);const[T,N]=(0,a.useState)(!1),L=e=>{N(e)},{callConnect:P,isCallConnectActive:z}=(0,G.Ay)({appointmentId:C??void 0,enabled:j&&A&&!w&&Number.isFinite(C)});return(0,a.useEffect)(()=>{z&&!e&&P?.initiator===G.WX.PROVIDER&&N(!0)},[z,e,P?.initiator]),E?(0,s.jsx)(c.A,{title:S,children:t("contexts.liveSession.invalidLink")}):C||w?(0,s.jsx)(c.A,{title:S,sx:{display:"flex",flex:1,flexDirection:"column"},children:(0,s.jsx)(i.A,{maxWidth:!b&&"xl",sx:{display:"flex",flex:1,flexDirection:"column"},children:(0,s.jsx)(f.N,{mode:"wait",children:e?(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(o.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100vh"},children:(0,s.jsx)(r.A,{})}),children:(0,s.jsx)(ns,{appointment:R,toggleShowCallConnect:L},"video-call")}):(0,s.jsx)(y.h,{children:(0,s.jsx)(ts,{loading:D,appointment:R,isTestSession:w,showCallConnect:T,toggleShowCallConnect:L})},"pre-session")})})}):(0,s.jsx)(g.default,{})}},52763(e,t,n){n.d(t,{A:()=>a});var s=n(77810),i=n(12123),o=n(9133),r=n(46418);function a(e,t){const{data:n,loading:a,error:l}=(0,i.I)(r.H9D,!e||t?.skip?o.h:{variables:{appointmentId:e},fetchPolicy:"cache-and-network"});return(0,s.useEffect)(()=>{l&&t?.onError&&t.onError(l)},[l]),(0,s.useEffect)(()=>{n&&t?.onCompleted&&t.onCompleted(n.appointment)},[n]),{error:l,loading:a,appointment:n?.appointment}}},98243(e,t,n){var s=n(77810);const i=({onTick:e,interval:t,loop:n=!1,count:i,disabled:o=!1})=>{const r=(0,s.useRef)(e),a=(0,s.useRef)(i);(0,s.useEffect)(()=>{r.current=e},[e]),(0,s.useEffect)(()=>{a.current=i},[i]),(0,s.useEffect)(()=>
1{if(o)return;const e=setInterval(()=>{(n||a.current&&a.current>0)&&(r.current(),a.current&&(a.current-=1))},t);return()=>clearInterval(e)},[t,n,o])};n.d(t,["A",0,i])},40351(e,t,n){n.d(t,{A:()=>o});var s=n(77810),i=n(85137);function o(){const e=(0,s.useContext)(i.v);if(!e)throw new Error("useVideoCallLog must be used within a VideoCallLogProvider");return e}},7165(e,t,n){n.r(t),n.d(t,{default:()=>u});var s=n(64922),i=n(44870),o=n(22921),r=n(46186),a=n(12858),l=n(20111),c=n(29506),d=n(21234),x=n(77736),h=n(82277),m=n(66550);const p=(0,r.Ay)("div")(({theme:e})=>({maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.spacing(12,0)}));function u(){const{translate:e}=(0,h.A)();return(0,s.jsx)(d.A,{title:e("pages.errors.page404.title"),children:(0,s.jsx)(a.A,{component:x.qH,children:(0,s.jsxs)(p,{sx:{textAlign:"center",alignItems:"center"},children:[(0,s.jsx)(i.PY1.div,{variants:(0,x.se)().in,children:(0,s.jsx)(l.A,{variant:"h3",paragraph:!0,children:e("pages.errors.page404.heading")})}),(0,s.jsx)(i.PY1.div,{variants:(0,x.se)().in,children:(0,s.jsx)(l.A,{sx:{color:"text.secondary"},children:e("pages.errors.page404.description")})}),(0,s.jsx)(i.PY1.div,{variants:(0,x.se)().in,children:(0,s.jsx)(m.Tk,{"aria-hidden":!0,sx:{height:260,my:{xs:5,sm:10}}})}),(0,s.jsx)(c.A,{to:"/",size:"large",variant:"contained",component:o.N_,children:e("pages.errors.common.goToHome")})]})})})}},6828(e,t,n){n.d(t,{A:()=>r});var s=n(64922),i=n(77810);function o(e,t,n){const s=()=>{e.play().catch(e=>{!function(e,t){t instanceof DOMException?"AbortError"!==t.name&&"NotAllowedError"!==t.name&&console.warn(`[MediaStreamVie
1w] ${e} playback failed: ${t.name}`,t):console.warn(`[MediaStreamView] ${e} playback failed`,t)}(n,e)})},i=()=>{"visible"===document.visibilityState&&s()},o=()=>{s()},r="audio"===n?t.getAudioTracks():t.getVideoTracks();return e.addEventListener("loadedmetadata",s),e.addEventListener("canplay",s),document.addEventListener("visibilitychange",i),t.addEventListener("addtrack",o),r.forEach(e=>{e.addEventListener("unmute",o),e.addEventListener("ended",o)}),s(),()=>{e.removeEventListener("loadedmetadata",s),e.removeEventListener("canplay",s),document.removeEventListener("visibilitychange",i),t.removeEventListener("addtrack",o),r.forEach(e=>{e.removeEventListener("unmute",o),e.removeEventListener("ended",o)})}}function r({stream:e,muted:t=!1,mirror:n=!1,active:r=!0,style:a,speakerDeviceId:l,onVideoResize:c}){const d=(0,i.useRef)(null),x=(0,i.useRef)(null),h=e?e.getVideoTracks().map(e=>`${e.id}:${e.readyState}:${e.enabled}`).join("|")||"no-video-track":"no-stream";return(0,i.useEffect)(()=>{const t=x.current;if(!t)return;if(!e||!r)return t.pause(),void(t.srcObject=null);t.pause(),t.srcObject=null,t.srcObject=e;const n=o(t,e,"video"),s=()=>{if(!c)return;const n=t.videoWidth||t.clientWidth,s=t.videoHeight||t.clientHeight;n&&s&&c({width:n,height:s,stream:e})};return t.addEventListener("loadedmetadata",s),t.addEventListener("loadeddata",s),t.addEventListener("resize",s),s(),()=>{t.removeEventListener("loadedmetadata",s),t.removeEventListener("loadeddata",s),t.removeEventListener("resize",s),n(),t.srcObject===e&&(t.pause(),t.srcObject=null)}},[e,h,r,c]),(0,i.useEffect)(()=>{const n=d.current;if(!n)return;if(!e||t)return n.pause(),void(n.srcObject=null);n.srcObject!==e&&(n.srcObject=e);const s=o(n,e,"audio");return()=>{s(),n.srcObject===e&&(n.pause(),n.srcObject=null)}},[e,t]),(0,i.useEffect)(()=>{const e=x.current,n=d.current;e&&(e.muted=Boolean(t)),n&&n.muted!==Boolean(t)&&(n.muted=Boolean(t))},[t]),(0,i.useEffect)(()=>{const n=d.current;n&&l&&!t&&e&&n.setSinkId&&n.setSinkId(l).catch(e=>
1{console.warn("[MediaStreamView] audio sink routing failed",e)})},[l,t,e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("video",{ref:x,autoPlay:!0,playsInline:!0,muted:t,style:{transform:n?"scaleX(-1)":void 0,width:"100%",height:"100%",display:"block",...a}}),(0,s.jsx)("audio",{ref:d,autoPlay:!0,muted:t,style:{display:"none"}})]})}},52850(e,t,n){n.d(t,["l",0,(e,t)=>{const n="audio"===t?e?.getAudioTracks()[0]:e?.getVideoTracks()[0];return Boolean(n&&n.enabled&&"live"===n.readyState)}])},83806(e,t,n){const s=e=>{if("string"===typeof e)return e;if(e instanceof Error)return e.message||String(e);try{return JSON.stringify(e)}catch{return String(e)}};n.d(t,["f",0,e=>{const t=s(e).trim();return t?t.toLowerCase().includes("operation could not be performed and was aborted")?"Camera or microphone startup was interrupted. Please retry.":t:"Camera or microphone access failed."},"r",0,s])},11106(e,t,n){n.d(t,{A:()=>a});var s=n(77810),i=n(17132);const o={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},r={audio:!0,video:!0};function a(){const e=(0,i.HZ)(r),t=(0,s.useRef)(!1);return(0,s.useEffect)(()=>{const n=e.state.localStream?.getAudioTracks()[0];n&&n.applyConstraints(o).catch(e=>{t.current||(t.current=!0,console.warn("[useProcessedLocalMedia] Failed to apply audio track constraints",e))})},[e.state.localStream]),e}},67662(e,t,n){var s=n(64922),i=n(77810);const o=(0,i.createContext)(void 0);n.d(t,["b",0,()=>{const e=(0,i.useContext)(o);if(!e)throw new Error("useWherebyVideoSession must be used within a WherebyVideoSessionProvider");return e},"h",0,({children:e})=>{const[t,n]=(0,i.useState)(0),[r,a]=(0,i.useState)(!1),[l,c]=(0,i.useState)(0),d=(0,i.useCallback)(e=>{localStorage.setItem("localVideoOptions_",JSON.stringify(e)),c(e=>e+1)},[]),x=(0,i.useCallback)(()=>{const e=localStorage.getItem("localVideoOptions_");if(e)try{return JSON.parse(e)}catch{}return{floatSelf:!0,noiseCancellingMode:!0,echoCancel:!0,autoGainControl:!0,lowQualityMode:!1,micOn:!0,cameraOn:!0}},[l]);return(0,s.jsx)(o.Provider,{value:{localVideoOptions:x,setLocalVideoOptions:d,participantCount:t,setParticipantCount:n,isJoined:r,setIsJoined:a},children:e})}])},8312(e,t,n){n.d(t,{NL:()=>l,WX:()=>d,x4:()=>c});var s=n(77810),i=n(27488),o=n(12123),r=n(54114),a=n(46418),l=(e=>(e.WAITING="WAITING",e.ON_CALL="ON_CALL",e.FAILED="FAILED",e.COMPLETED="COMPLETED",e.CANCELLED="CANCELLED",e))(l||{}),c=(e=>(e.IDLE="IDLE",e.RINGING="RINGING",e.CONNECTED="CONNECTED",e.DECLINED="DECLINED",e.NO_ANSWER="NO_ANSWER",e.DISCONNECTED="DISCONNECTED",e))(c||{}),d=(e=>(e.PROVIDER="PROVIDER",e.ADMIN="ADMIN",e))(d||{});const x=["WAITING","ON_CALL"];const h=function({appointmentId:e,enabled:t=!0,pollingInterval:n=2e3,includeSupportCheck:l=!1,providerId:c}){const d=null!=e?String(e):void 0,h=Boolean(d)&&t,{data:m,loading:p,error:u,startPolling:g,stopPolling:y,refetch:A}=(0,o.I)(a.WUp,{variables:{appointmentId:d},skip:!h,fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first"}),f=m?.callConnectStatus??null,j=!!f&&x.includes(f.callConnectStatus);(0,s.useEffect)(()=>{if(h&&!(n<=0))return j?g(n):y(),()=>y()},[h,j,n,g,y]);const{data:b,loading:v,error:C,refetch:w}=(0,o.I)(a.qRG,{variables:{providerId:null!=c?String(c):void 0},skip:!t||!l,fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first"}),[S,{loading:I,error:k}]=(0,i.n)(r.$f),[D,{loading:R,error:E}]=(0,i.n)(r.VC),[M,{loading:T,error:N}]=(0,i.n)(r.qd),L=(0,s.useMemo)(()=>d?[{query:a.WUp,variables:{appointmentId:d}}]:void 0,[d]),P=(0,s.useCallback)(async()=>{if(!d)return null;const{data:e}=await S({variables:{appointmentId:d},refetchQueries:L,awaitRefetchQueries:!0});return e?.startCallConnect??null},[d,S,L]),z=(0,s.useCallback)(async e=>{const{data:t}=await D({variables:{callConnectId:String(e)},refetchQueries:L,awaitRefetchQueries:!0});return t?.cancelCallConnect??null},[D,L]),W=(0,s.useCallback)(async e=>{const{data:t}=await M({variables:{callConnectId:String(e)},refetchQueries:L,awaitRefetchQueries:!0});return t?.endCallConnect??null},[M,L]);return{callConnect:f,isCallConnectActive:j,isStatusLoading:p&&!m,statusError:u,refetchStatus:A,isCallConnectSupported:b?.isCallConnectSupportedForProvider??Boolean(C),isSupportCheckLoading:v&&!b,supportCheckError:C,refetchSupportCheck:w,startCallConnect:P,isStarting:I,startError:k,cancelCallConnect:z,isCancelling:R,cancelError:E,endCallConnect:W,isEnding:T,endError:N}
1};n.d(t,["Ay",0,h])},11577(e,t,n){n.d(t,{_:()=>o,n:()=>i});var s=n(59980);function i(e){return Object.values(s.PA).includes(e)}function o(e){return e?e.filter(i):[]}},94205(e,t,n){n.d(t,{BP:()=>l,Cg:()=>x,Gm:()=>h,Le:()=>c,bn:()=>d});var s=n(55984);const i={USER_ALREADY_EXISTS:"USER_ALREADY_EXISTS",CALL_CONNECT_ALREADY_ACTIVE:"call_connect_already_active",CONFLICT:"CONFLICT",BAD_USER_INPUT:"BAD_USER_INPUT",FORBIDDEN:"FORBIDDEN"},o=[i.FORBIDDEN,"UNAUTHENTICATED","UNAUTHORIZED"];function r(e){return s.K.is(e)?e.errors:[]}const a=e=>"string"===typeof e.extensions?.code?e.extensions.code:void 0;function l(e){for(const t of r(e)){const e=a(t);if(e)return e}}function c(e,t){return r(e).some(e=>a(e)===t)}function d(e,t){for(const n of r(e)){const e=n.message?.trim();if(e)return e}return t}function x(e){return!!c(e,i.USER_ALREADY_EXISTS)||r(e).some(e=>"This phone number is already associated with an account."===e.message?.trim())}function h(e,t,n,s){const i=r(e);if(i.some(e=>o.includes(a(e)??"")))return;const l=i.find(e=>a(e)===t);if(l){const e=l.extensions?.[n];return s(e)?e:void 0}for(const o of i){if(a(o))continue;const e=o.extensions?.[n];if(s(e))return e}}n.d(t,["bN",0,i])},97393(e,t,n){var s=n(35131),i=n(64922);const o=(0,s.A)((0,i.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");n.d(t,["A",0,o])},56792(e,t,n){var s=n(35131),i=n(64922);const o=(0,s.A)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");n.d(t,["A",0,o])},1103(e,t,n){var s=n(35131),i=n(64922);const o=(0,s.A)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");n.d(t,["A",0,o])},4566(e,t,n){var s=n(35131),i=n(64922);const o=(0,s.A)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.d(t,["A",0,o])},52641(e,t,n){var s=n(35131),i=n(64922);const o=(0,s.A)((0,i.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");n.d(t,["A",0,o])},43110(e,t,n){var s=n(35131),i=n(64922);const o=(0,s.A)((0,i.jsx)("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22zm1 14h-2v2h2zm0-6h-2v4h2z"}),"WarningAmberOutlined");n.d(t,["A",0,o])},73605(e,t,n){n.d(t,{A:()=>E});var s=n(59703),i=n(85486),o=n(77810),r=n(74984),a=n(7413),l=n(37729),c=n(46186),d=n(29115),x=n(20111),h=n(3377),m=n(35131),p=n(64922);const u=(0,m.A)((0,p.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");var g=n(72538);const y=["slots","slotProps"],A=(0,c.Ay)(g.A,{name:"MuiBreadcrumbCollapsed"})(({theme:e})=>(0,s.A)({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},"light"===e.palette.mode?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,s.A)({},"light"===e.palette.mode?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":(0,s.A)({boxShadow:e.shadows[0]},"light"===e.palette.mode?{backgroundColor:(0,h.tL)(e.palette.grey[200],.12)}:{backgroundColor:(0,h.tL)(e.palette.grey[600],.12)})})),f=(0,c.Ay)(u)({width:24,height:16});const j=function(e){const{slots:t={},slotProps:n={}}=e,o=(0,i.A)(e,y),r=e;return(0,p.jsx)("li",{children:(0,p.jsx)(A,(0,s.A)({focusRipple:!0},o,{ownerState:r,children:(0,p.jsx)(f,(0,s.A)({as:t.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})};var b=n(52679),v=n(33899);function C(e){return(0,v.Ay)("MuiBreadcrumbs",e)}const w=(0,b.A)("MuiBreadcrumbs",["root","ol","li","separator"]),S=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],I=(0,c.Ay)(x.A,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${w.li}`]:t.li},t.root]})({}),k=(0,c.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),D=(0,c.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function R(e,t,n,s){return e.reduce((i,o,r)=>
1(r<e.length-1?i=i.concat(o,(0,p.jsx)(D,{"aria-hidden":!0,className:t,ownerState:s,children:n},`separator-${r}`)):i.push(o),i),[])}const E=o.forwardRef(function(e,t){const n=(0,d.b)({props:e,name:"MuiBreadcrumbs"}),{children:c,className:x,component:h="nav",slots:m={},slotProps:u={},expandText:g="Show path",itemsAfterCollapse:y=1,itemsBeforeCollapse:A=1,maxItems:f=8,separator:b="/"}=n,v=(0,i.A)(n,S),[w,D]=o.useState(!1),E=(0,s.A)({},n,{component:h,expanded:w,expandText:g,itemsAfterCollapse:y,itemsBeforeCollapse:A,maxItems:f,separator:b}),M=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},C,t)})(E),T=(0,l.A)({elementType:m.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:E}),N=o.useRef(null),L=o.Children.toArray(c).filter(e=>o.isValidElement(e)).map((e,t)=>(0,p.jsx)("li",{className:M.li,children:e},`child-${t}`));return(0,p.jsx)(I,(0,s.A)({ref:t,component:h,color:"text.secondary",className:(0,r.A)(M.root,x),ownerState:E},v,{children:(0,p.jsx)(k,{className:M.ol,ref:N,ownerState:E,children:R(w||f&&L.length<=f?L:(e=>A+y>=e.length?e:[...e.slice(0,A),(0,p.jsx)(j,{"aria-label":g,slots:{CollapsedIcon:m.CollapsedIcon},slotProps:{collapsedIcon:T},onClick:()=>{D(!0);const e=N.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-y,e.length)])(L),M.separator,b,E)})}))})}}]);
2//# sourceMappingURL=25235.e41e5a6c.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.