1(function(){System.register([`./rolldown-runtime-legacy-D-7HM2mt.js`,`./MessageChannel-legacy-BE5uVk2J.js`,`./embed-legacy-B1AjLEsY.js`,`./vendor-legacy-cZPK6B-h.js`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,ee,x,S,te,C,w,T,ne,E,D,O,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,k,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,A,Ne,Pe,Fe,Ie,j,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,M,N,P,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,F,vt,yt,I,bt,L,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,R,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,z,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,B,V,ps,ms,H,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,dc,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,U,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,W,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,G,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,K,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,q,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,J,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,Y,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,X,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu;function Zu(e,t){let n={...e};for(let e of t)delete n[e];return n}function Qu(e,t){let n={};if(!e)return n;for(let r of t)r in e&&e[r]!==void 0&&(n[r]=e[r]);return n}function $u(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ed(e){let{url:t,params:n}=e;return n?t.replace(Re,(e,t)=>t in n?`${n[t]}`:e):t}function td(e,t){return RegExp(`^${e.replace(Re,()=>`([^/]*)`)}$`).test(t)}function nd(e,t,n){return e.find(e=>e.method===t&&e.path===n)||e.find(e=>e.method===t&&e.path.includes(`:`)&&td(e.path,n))}function rd(e,t){return e.find(e=>e.alias===t)}function id(e,t,n){return e.find(e=>e.method===t&&e.path===n)}function ad(e,t){return{request:async(n,r)=>({...r,headers:{...r.headers,[e]:t}})}}function od(e){return e===!0||e===`response`||e===`all`}function sd(e){return e===!0||e===`request`||e===`all`}function cd(e){let t=String(e??``);return t.includes(`application/json`)||t.includes(`application/vnd.api+json`)}async function ld(e,t,{transform:n,sendDefaults:r}){let i=nd(e,t.method,t.url);if(!i)throw Error(`${j} No endpoint found for ${t.method} ${t.url}`);let{parameters:a}=i;if(!a)return t;let o={...t,queries:{...t.queries},headers:{...t.headers},params:{...t.params}},s={Query:e=>o.queries[e],Body:()=>o.data,Header:e=>o.headers[e],Path:e=>o.params[e]},c={Query:(e,t)=>{o.queries[e]=t},Body:(e,t)=>{o.data=t},Header:(e,t)=>{o.headers[e]=t},Path:(e,t)=>{o.params[e]=t}},l=sd(n);for(let{name:e,schema:n,type:i}of a){let a=s[i](e);if(r||a!==void 0){let r=await n.safeParseAsync(a);if(!r.success)throw new Le(`${j} Invalid ${i} parameter '${e}'`,t,a,r.error);l&&c[i](e,r.data)}}return o}function ud({validate:e,transform:t,sendDefaults:n}){return{name:He,request:sd(e)?(e,r)=>ld(e,r,{transform:t,sendDefaults:n}):void 0,response:od(e)?async(e,n,r)=>{let i=nd(e,n.method,n.url);if(!i)throw Error(`${j} No endpoint found for ${n.method} ${n.url}`);if(cd(r?.headers?.[`content-type`])){let e=await i.response.safeParseAsync(r.data);if(!e.success)throw new Le(`${j} Invalid response from endpoint '${i.method} ${i.path}'\nstatus: ${r.status} ${r.statusText}\ncause:\n${e.error.message}\nreceived:\n${JSON.stringify(r.data,null,2)}`,n,r.data,e.error);od(t)&&(r.data=e.data)}return r}:void 0}}function dd(e){let t=new Set;for(let n of e){let e=`${n.method} ${n.path}`;if(t.has(e))throw Error(`${j} Duplicate path '${e}'`);t.add(e)}let n=new Set;for(let t of e)if(t.alias){if(n.has(t.alias))throw Error(`${j} Duplicate alias '${t.alias}'`);n.add(t.alias)}for(let t of e)if(t.parameters&&t.parameters.filter(e=>e.type===`Body`).length>1)throw Error(`${j} Multiple body parameters in endpoint '${t.path}'`)}function fd(e){return dd(e),e}function pd(e){return Ue.includes(e)}function md(e){return Ae({...e,suspense:!0})}function hd(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 12 12`,fill:`currentColor`,...e,children:(0,N.jsxs)(`g`,{id:`Group_1459`,"data-name":`Group 1459`,transform:`translate(-4940.939 2352.061)`,children:[(0,N.jsx)(`line`,{id:`Line_9`,"data-name":`Line 9`,x1:`10`,y2:`10`,transform:`translate(4942 -2351)`,f
1ill:`none`,strokeWidth:`1.5`,strokeLinecap:`round`,stroke:`gray`}),(0,N.jsx)(`line`,{id:`Line_10`,"data-name":`Line 10`,x2:`10`,y2:`10`,transform:`translate(4942 -2351)`,fill:`none`,strokeWidth:`1.5`,strokeLinecap:`round`,stroke:`gray`})]})})}function gd(e,t){let n=yt(e,t||e);if(n.state===`resolved`)return n.value;throw n.state===`rejected`?n.error:n.suspense}function _d({children:e}){let t=gd(Fi);return(0,M.useLayoutEffect)(()=>{F.locale(t.language)},[t.language]),(0,N.jsx)(p,{i18n:t,children:e})}function vd(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z`})})}function yd(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 48 48`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M48.563,24.563a24,24,0,1,1-24-24A24,24,0,0,1,48.563,24.563ZM21.786,37.27,39.593,19.464a1.548,1.548,0,0,0,0-2.19l-2.19-2.19a1.548,1.548,0,0,0-2.19,0L20.692,29.606l-6.78-6.78a1.549,1.549,0,0,0-2.19,0l-2.19,2.19a1.548,1.548,0,0,0,0,2.19L19.6,37.27A1.548,1.548,0,0,0,21.786,37.27Z`,transform:`translate(-0.563 -0.563)`})})}function bd(e,t,n){let r=new Ge(e,Uo,t);return n&&n.forEach(e=>r.use(e)),r}function xd(e,t=`./`,n,r){let i=bd(t,n,r),a=new Je(e,i);return a.api=i,a}function Sd(e,t){if(e===t)return!0;if(!e||!t||typeof e!=`object`||typeof t!=`object`)return e!==e&&t!==t;if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Sd(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let e=0;e<n.length;e++)if(!Object.prototype.hasOwnProperty.call(t,n[e]))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Sd(e[i],t[i]))return!1}return!0}function Cd(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function wd(e,t,n){Cd(e,t),t.set(e,n)}function Td(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Ed(e,t){return e.get(Td(e,t))}function Dd(){return new Ko}function Od(e,t,n){return e.set(Td(e,t),n),n}function kd(e,t){if(!(e instanceof Yo))return new Yo(e);if(!t)throw Error(`adapter is required.`);let n=t(e.getState()),r=new Yo(n);return e.subscribe(e=>{r.set(t(e))}),r}function Ad(e,t){return t.reduce((e,t)=>e?.[t],e)}function jd(e,t){try{return e?Ad(e,t.replace(/\[([^[\]]*)\]/g,`.$1.`).split(`.`).filter(e=>e!==``)):void 0}catch{}}function Md(e){let t=e=>{let{parentNode:t,nodeName:n,id:r}=e;if(r)return`${n.toLowerCase()}#${r}`;let i=Array.from(t?t.childNodes:[]).filter(e=>e.nodeName===n);return n.toLowerCase()+(i.length>1?`:eq(${i.indexOf(e)})`:``)},n=e=>[...e.parentNode?n(e.parentNode):[],t(e)];return n(e).join(` > `)}function Nd(e){return e.replace(ns,`/${as}`).replace(Qo,is).replace($o,`/${is}`).replace(es,`/${is}`).replace(rs,`$1`)}function Pd(e,t){let n=e.replace(Xo,`$1 `).split(`?`)[0],[r=``,i=``]=Fd(n),a=t?.(r,i);return a?`${r} ${a}`:Nd(n.replace(Zo,`/${is}`))}function Fd(e){let t=e.indexOf(` `);return t<0?[``,e]:[e.slice(0,t),e.slice(t+1)]}function Id(e){return e.startsWith(`/`)&&e.includes(`:`)&&!e.includes(`*`)}function Ld(e,t=[]){let n=e.split(`/`).filter(Boolean),r=t.find(e=>zd(e,n));if(r)return r.replace(/\/\*$/,``)||`/`;let[i=``,...a]=n,o=a.length?Nd(`/${a.join(`/`)}`):``;return i?`/${os}${o}`:e}function Rd(e){return e.split(`/`).filter(e=>e&&e!==`*`).length}function zd(e,t){let n=e.split(`/`).filter(Boolean);return n[n.length-1]!==`*`&&n.length!==t.length?!1:n.every((e,n)=>e===`*`?!0:t[n]===void 0?!1:e.startsWith(`:`)||e.toLowerCase()===t[n].toLowerCase())}function Bd(e){return e?ts.test(e)?is:Nd(e):``}function Vd(e,t={}){if(!Array.isArray(e?.transactions))return e;let n=e.transactions.map(e=>{let n=Hd(e,t);return n?{...e,name:n}:e});return{...e,transactions:n}}function Hd(e,t){let{nonTenantRoutes:n,matchApiRoute:r,recallRouteTemplate:i}=t,{name:a=``,type:o=``}=e??{};if(!a)return``;if(o===ss)return Pd(a,r);if(ls.includes(o)){if(Ud(e))return``;let t=Wd(e.context?.page?.url);if(!t)return``;let r=Ld(t,n);return[a,i?.(t)].find(e=>!!e&&Id(e)&&Rd(e)>=Rd(r))??r}return``}function Ud({name:e=``,context:t}){return e.startsWith(`Click - `)&&!!Bd(t?.custom?.transaction)}function Wd(e){if(!e)return``;try{return new URL(e).pathname}catch{return``}}function Z(e=window.location.pathname){let[t=``,...n]=(e.startsWith(R.ROOT_PATH)?e.slice(R.ROOT_PATH.length):e).replace(/^\/+|\/+$/g,``).split(/\/+/);return{tenant:t,path:`/${n.join(`/`)}`}}function Gd(){let e=H(),{tenant:t}=Z(),{t:n}=_(),{data:r}=B.useGetPatientPortalAppointments({},{retry:0}),i=(0,M.useMemo)(()=>r?.find(e=>e.plannedForRecall),[r]),a=localStorage.getItem(hs),o=(0,M.useCallback)(()=>
1{i&&(e(`/${t}/appointments/edit/${i.appointmentId}`),localStorage.setItem(hs,`true`))},[i,e,t]),{isOpen:s,openModal:c,closeModal:l}=ps();(0,M.useEffect)(()=>{!a&&i&&!s&&c()},[i,a,c,s]);let u=(0,M.useMemo)(()=>(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{children:n(`BookAppointment.bookRecallAppointmentDescription`)}),(0,N.jsx)(`div`,{style:{padding:`20px 15px`,marginTop:10,backgroundColor:`#deb067`,borderRadius:`5px`},children:n(`BookAppointment.bookRecallAppointmentInformation`)})]}),[n]);return{bookAppointmentConfirmation:(0,M.useMemo)(()=>(0,N.jsx)(lt,{title:n(`BookAppointment.bookRecallAppointmentTitle`),message:u,confirmButtonText:n(`BookAppointment.bookRecallAppointmentConfirmTitle`)??``,cancelButtonText:n(`BookAppointment.bookRecallAppointmentCancelTitle`)??``,isOpen:s,onCancel:()=>{l(),localStorage.setItem(hs,`true`)},onConfirm:o}),[o,s,u,n,l]),bookAppointment:i?o:void 0}}function Kd(e,t){return new Proxy(e,{get(e,n){return(Reflect.has(e,n)?e:t)[n]}})}function qd(e,t,n=420,r=600){let i=Kd(window.screen,{availLeft:0,availTop:0}),a=i.width/2-n/2+i.availLeft,o=i.height/2-r/2+i.availTop,s=window.open(e,`_blank`,`top=${o},left=${a},width=${n},height=${r}`);if(s&&t){let e=setInterval(()=>{s.closed&&(clearInterval(e),t())},1e3)}try{window.onbeforeunload=()=>s?.close(),window.parent.onbeforeunload=window.onbeforeunload}catch{}return s?.focus(),s}function Jd(){let[e,t]=(0,M.useState)(ys);return a.on(`config`,t),e}function Yd(e){return t=>ce(e,`route-change`)(t)}function Xd(){let e=(0,M.useContext)(_s);if(e===void 0)throw Error(`useAuth called outside of AuthContext`);return e}function Zd(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,width:`1.2em`,height:`0.9em`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M12.6,28.5V20.029h4.8V28.5h6V17.206H27L15,4.5,3,17.206H6.6V28.5Z`,transform:`translate(-3 -4.5)`})})}function Qd(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 27 6`,fill:`none`,stroke:`currentColor`,...e,children:(0,N.jsxs)(`g`,{id:`Icon_feather-more-horizontal`,"data-name":`Icon feather-more-horizontal`,transform:`translate(-4.5 -15)`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,children:[(0,N.jsx)(`path`,{d:`M19.5,18A1.5,1.5,0,1,1,18,16.5,1.5,1.5,0,0,1,19.5,18Z`}),(0,N.jsx)(`path`,{d:`M30,18a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,30,18Z`}),(0,N.jsx)(`path`,{d:`M9,18a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,9,18Z`})]})})}function $d(e,t,n){let r=new Ge(e,oc,t);return n&&n.forEach(e=>r.use(e)),r}function ef(e,t=`./`,n,r){let i=$d(t,n,r),a=new Je(e,i);return a.api=i,a}function tf(e,t){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,fill:`currentColor`,ref:t,...e,children:(0,N.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`})})}function nf(e){return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 512 512`,width:`1em`,height:`1em`,fill:`currentColor`,...e,children:[(0,N.jsx)(`path`,{fill:`#c8102e`,d:`M0 0h512.1v512H0z`}),(0,N.jsx)(`path`,{fill:`#fff`,d:`M144 0h73.1v512H144z`}),(0,N.jsx)(`path`,{fill:`#fff`,d:`M0 219.4h512.1v73.2H0z`})]})}function rf(e){return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 512 512`,width:`1em`,height:`1em`,fill:`currentColor`,...e,children:[(0,N.jsx)(`rect`,{width:`512`,height:`512`,fill:`#C60B1E`}),(0,N.jsx)(`rect`,{y:`170.7`,width:`512`,height:`170.6`,fill:`#FFC400`})]})}function af(e){return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 512 512`,width:`1em`,height:`1em`,fill:`currentColor`,...e,children:[(0,N.jsx)(`rect`,{fill:`#0055A4`,x:`0`,y:`0`,width:`170.67`,height:`512`}),(0,N.jsx)(`rect`,{fill:`#FFFFFF`,x:`170.67`,y:`0`,width:`170.67`,height:`512`}),(0,N.jsx)(`rect`,{fill:`#EF4135`,x:`341.33`,y:`0`,width:`170.67`,height:`512`})]})}function of(e){return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 512 512`,width:`1em`,height:`1em`,fill:`currentColor`,...e,children:[(0,N.jsx)(`path`,{fill:`#012169`,d:`M0 0h512v512H0z`}),(0,N.jsx)(`path`,{fill:`#FFF`,d:`M512 0v64L322 256l190 187v69h-67L254 324 68 512H0v-68l186-187L0 74V0h62l192 188L440 0z`}),(0,N.jsx)(`path`,{fill:`#C8102E`,d:`m184 324 11 34L42 512H0v-3l184-185zm124-12 54 8 150 147v45L308 312zM512 0 320 196l-4-44L466 0h46zM0 1l193 189-59-8L0 49V1z`}),(0,N.jsx)(`path`,{fill:`#FFF`,d:`M176 0v512h160V0H176zM0 176v160h512V176H0z`}),(0,N.jsx)(`path`,{fill:`#C8102E`,d:`M0 208v96h512v-96H0zM208 0v512h96V0h-96z`})]})}function sf({type:e,...t}){let n=hc[e];return n?(0,N.jsx)(n,{...t}):(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 512 512`,width:`1em`,height:`1em`,fill:`currentColor`,...t,children:[(0,N.jsx)(`path`,{d:`M0 0h512v512H0z`,fill:`#BBB`}),(0,N.jsx)(`path`,{d:`M250 400c83 0 150-67 150-150M250 100c83 0 150 67 150 150M250 400c37 0 67-67 67-150M250 100c37 0 67 67 67 150m83 0H317M250 100c-37 0-67 67-67 150m67 150c-37 0-67-67-67-150m134 0H183m67-150c-83 0-150 67-150 150M250 400c-83 0-150-67-150-150m83 0H100`,fill:`none`,stroke:`#333`,strokeWidth:`34`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function cf(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 10 16`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M2.757,8,8.811,1.949A1.143,1.143,0,0,0,7.192.334L.333,7.188A1.141,1.141,0,0,0,.3,8.765l6.888,6.9a1.143,1.143,0,1,0,1.619-1.615Z`,transform:`translate(9.147 16) rotate(180)`})})}function lf(){return(0,N.jsxs)(`div`,{className:Lc.header,"aria-hidden":!0,
1children:[(0,N.jsxs)(`div`,{className:Lc.logo,children:[(0,N.jsx)(U.Box,{width:75}),(0,N.jsx)(U.Box,{height:`1.5em`,width:190})]}),(0,N.jsxs)(`div`,{className:Lc.nav,children:[(0,N.jsx)(U.Box,{width:45}),(0,N.jsx)(U.Box,{width:105}),(0,N.jsx)(U.Box,{width:75}),(0,N.jsx)(U.Circle,{size:27}),(0,N.jsx)(U.Box,{width:60})]})]})}function uf({className:e,...t}){return(0,N.jsx)(`div`,{className:D(zc.wrapper,e),"aria-busy":!0,...t,children:(0,N.jsx)(`div`,{className:zc.spinner})})}function Q(){let e=(0,M.useContext)(Ii);if(e===void 0)throw Error(`useToast called outside of ToastContext`);return e}function df(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 40 40`,width:`1em`,height:`1em`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M20,.563a20,20,0,1,0,20,20A20,20,0,0,0,20,.563ZM20,8.3a7.1,7.1,0,1,1-7.1,7.1A7.1,7.1,0,0,1,20,8.3Zm0,27.742a15.454,15.454,0,0,1-11.815-5.5,8.991,8.991,0,0,1,7.944-4.823,1.973,1.973,0,0,1,.573.089,10.678,10.678,0,0,0,3.3.556,10.637,10.637,0,0,0,3.3-.556,1.973,1.973,0,0,1,.573-.089,8.991,8.991,0,0,1,7.944,4.823A15.454,15.454,0,0,1,20,36.046Z`})})}function ff(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 26 28`,width:`26`,height:`28`,...e,children:(0,N.jsxs)(`g`,{stroke:`#000`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,fill:`none`,children:[(0,N.jsx)(`path`,{d:`M1 7h24`}),(0,N.jsx)(`path`,{d:`M22 6.333V25a2.62 2.62 0 0 1-2.571 2.667H6.571A2.62 2.62 0 0 1 4 25V6.333m3.857 0V3.667A2.62 2.62 0 0 1 10.429 1h5.143a2.62 2.62 0 0 1 2.571 2.667v2.666`})]})})}function pf(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,width:`24`,height:`26`,...e,children:(0,N.jsx)(`path`,{d:`M20.25 0a3.75 3.75 0 0 1 3 6l-1.5 1.5-5.25-5.25L18 .75A3.733 3.733 0 0 1 20.25 0ZM1.5 17.25 0 24l6.75-1.5L20.629 8.625l-5.254-5.253Zm15.271-8.729-10.5 10.5-1.293-1.292 10.5-10.5Z`})})}function mf(){let{getFeature:e}=cc(),{configuration:t}=e(Gi);return{isDepartmentBased:t?.DepartmentBased??!1}}function hf(){let{t:e}=_(),{id:t}=se(),{data:n}=B.useGetPatientPortalAppointmentsByAppointmentId({params:{appointmentId:t}},{retry:0,enabled:!!t,onError:async t=>{V(t)&&t.response.data.errorCode===`AppointmentNotFound`&&(f(`/${Z().tenant}`),p({type:z.Error,message:e(`BookAppointment.appointmentNotFoundMessage`),title:e(`BookAppointment.appointmentNotFoundTitle`)}))}}),{onEdit:r,onCancel:i,cancelAppointmentMessage:a,confirmAppointmentCancel:o,closeCancelAppointmentModal:s,closeAppointmentChangeAlert:c,appointmentChangeAlertTitle:l,isAppointmentChangeAlertOpen:u,isConfirmCancelAppointmentOpen:d}=Zc(),f=H(),{show:p}=Q(),{clinic:m}=Xd(),{general:h}=m.settings;return n?(0,N.jsxs)(`div`,{className:Qc.container,children:[(0,N.jsx)(lt,{title:e(`Appointments.cancelAppointment`),message:a,isOpen:d,onCancel:s,onConfirm:o}),(0,N.jsx)(lt,{title:l??``,message:e(`Appointments.changeAppointmentAlert`)??``,isOpen:u,onCancel:c,cancelButtonText:e(`Button.close`)??void 0}),(0,N.jsx)(Yc,{start:n.start??`0`,duration:n.duration??0,physicianName:n.physician?.fullName||``,receptionName:n.receptionName??``,departmentName:n.departmentName??``,profileImage:n.physician?.profileImage||``,type:n.appointmentTypeName||``,employmentType:n.physician?.employmentType??``,onReschedule:()=>r(n),onCancel:()=>i(n),disabledCancellation:h.disableAppointmentCancellation})]}):null}function gf(e,t){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,fill:`currentColor`,ref:t,...e,children:(0,N.jsx)(`path`,{d:`m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z`})})}function _f(e,t){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,fill:`currentColor`,ref:t,...e,children:(0,N.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`})})}function vf(){let e=navigator.userAgent;return rl.test(e)&&!il.test(e)||navigator.maxTouchPoints>1&&e.indexOf(`Macintosh`)!==-1&&e.indexOf(`Safari`)!==-1||al.test(e)}function yf(e){let t=(0,M.useRef)(e);return(0,M.useLayoutEffect)(()=>{t.current=e},[e]),(0,M.useCallback)((...e)=>t.current?t.current(...e):void 0,[])}function bf(e,t){return Object.is(e,t)?!0:!e||!t||typeof e!=`object`||typeof t!=`object`||Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(n=>bf(e[n],t[n]))}function xf(e){let t=(0,M.useRef)(e);return bf(t.current,e)||(t.current=e),t.current}function Sf(e,t,n,r){let i=yf(n),a=xf(r);(0,M.useEffect)(()=>{let n=`current`in e?e.current:e;return n?(n.addEventListener(t,i,a),()=>{n.removeEventListener(t,i,a)}):()=>{}},[e,t,i,a])}function Cf(e=[],t){Sf(document,`mousedown`,n=>{let r=[e].flat().map(({current:e})=>
1e).filter(Boolean);r.length!==0&&t&&(r.some(e=>e.contains(n.target))||t(n))})}function wf(e,t){let n=yf(t);return(0,M.useEffect)(()=>{let t=new ResizeObserver(n),r=e?.current||document.body;return t.observe(r),()=>t.disconnect()},[e,n]),[e]}function Tf(e,t,n=[]){let r=yf(()=>{t&&e?.current&&t(e.current.getBoundingClientRect(),e.current)});Sf(window,`resize`,r),Sf(window,`scroll`,r),wf(e,r),(0,M.useEffect)(r,[r,...n])}function Ef(e,t,n){let r=e.length-t,i=r===0?``:n(r);return`${e.slice(0,t).join(`, `)}${i}`}function Df(e,t){let n=e.length-1,r=n===0?``:` (+${n})`;return`${e[0].slice(0,t)}...${r}`}function Of(e){let t=e;for(;t&&t!==document.documentElement;){if(t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return window}function kf(e,t){let n=`invoiceId`in e?e.invoiceId:``,r=`appointmentTypeId`in e?e.appointmentTypeId:``,i={type:t??Sl.TermsAndConditions},a=B.useGetPatientPortalInvoicesByInvoiceIdLegaltexts({params:{invoiceId:n},queries:i},{enabled:!!t&&!!n,staleTime:1/0,refetchOnWindowFocus:!0}),o=B.useGetPatientPortalAppointmentsTypesByAppointmentTypeIdLegaltexts({params:{appointmentTypeId:r},queries:i},{enabled:!!t&&!!r,staleTime:1/0,refetchOnWindowFocus:!0});return n?a:o}function Af({source:e,value:t,onChange:n,disabled:r}){let{t:i}=_(),[a,o]=(0,M.useState)(null),{data:s,isLoading:c,isError:l}=kf(e,a),u=`invoiceId`in e?e.invoiceId:e.appointmentTypeId,d=e=>t=>{t.preventDefault(),o(e)};return(0,N.jsxs)(`div`,{className:Tl.container,children:[(0,N.jsx)(bl,{id:`termsAccepted-${u}`,name:`termsAccepted`,"data-testid":`AT_TermsAcceptedCheckbox`,checked:t.termsAndConditionsAccepted,disabled:r,onChange:e=>n({...t,termsAndConditionsAccepted:e.target.checked}),label:(0,N.jsx)(we,{t:i,i18nKey:`LegalTexts.termsLabel`,components:{termsLink:(0,N.jsx)(`button`,{type:`button`,className:Tl.link,"data-testid":`AT_TermsLink`,onClick:d(Sl.TermsAndConditions)})}})}),(0,N.jsx)(bl,{id:`privacyPolicyAccepted-${u}`,name:`privacyPolicyAccepted`,"data-testid":`AT_PrivacyPolicyAcceptedCheckbox`,checked:t.privacyPolicyAccepted,disabled:r,onChange:e=>n({...t,privacyPolicyAccepted:e.target.checked}),label:(0,N.jsx)(we,{t:i,i18nKey:`LegalTexts.privacyLabel`,components:{privacyLink:(0,N.jsx)(`button`,{type:`button`,className:Tl.link,"data-testid":`AT_PrivacyPolicyLink`,onClick:d(Sl.Privacy)})}})}),(0,N.jsxs)(st,{isOpen:!!a,onClose:()=>o(null),classes:{modal:Tl.modal},children:[(0,N.jsx)(st.Header,{children:a===Sl.Privacy?i(`LegalTexts.privacyTitle`):i(`LegalTexts.termsTitle`)}),(0,N.jsxs)(st.Body,{children:[c&&(0,N.jsx)(uf,{}),l&&(0,N.jsx)(`p`,{children:i(`Error.defaultMessage`)}),!c&&!l&&(0,N.jsx)(ms,{className:Tl.legalText,html:s?.html})]}),(0,N.jsx)(st.Footer,{children:(0,N.jsx)(P,{name:`closeLegalText`,className:Tl.cancel,"data-testid":`AT_LegalTextClose`,onClick:()=>o(null),children:i(`Button.close`)})})]})]})}function jf(){let{t:e}=_();return(0,N.jsx)(`section`,{className:Ol.container,"data-testid":`AT_PaymentPending`,"aria-live":`polite`,children:(0,N.jsxs)(`div`,{className:Ol.card,children:[(0,N.jsx)(uf,{}),(0,N.jsx)(`h2`,{className:Ol.heading,children:e(`Payment.pendingHeading`)}),(0,N.jsx)(`p`,{className:Ol.message,children:e(`Payment.pendingMessage`)})]})})}function Mf(e,t){return Number.isFinite(e)?e.toLocaleString(t,{minimumFractionDigits:2,maximumFractionDigits:2}):`-`}function Nf(e,t,n){let r=Mf(e,t);if(r===`-`)return r;switch(n){case jl.DKK:return Pf(`${r} kr.`);case jl.USD:return`$${r}`;case jl.EUR:return`â¬${r}`;default:return r}}function Pf(e){return e.replace(/ /g,`\xA0`).replace(/-/g,`â`)}function Ff(e,t,n,r){let i=e??``;return Ml(t)?`${i} â ${Nf(t,n,r)}`:i}function If(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Lf(e){if(!e)return``;let t=e.split(``);return t.splice(6,0,`-`),t.join(``)}function Rf(e,{startDate:t,endDate:n},r,i){let a=`physician`in e?e.physician.map(({id:e})=>e):void 0,o=`appointmentType`in e?e.appointmentType?.id:void 0,s=`appointment`in e?e.appointment?.appointmentId:void 0,c={start:t.toISOString(),end:n.toISOString()},l=!!s,u=B.useGetPatientPortalAppointmentsByAppointmentIdTimeslots({params:{appointmentId:s},queries:c},{onError:r,retry:0,keepPreviousData:!0,enabled:l}),d=B.useGetPatientPortalAppointmentsTimeslots({queries:{...c,appointmentTypeId:o,physicianIds:a}},{onError:r,retry:0,keepPreviousData:!0,enabled:!l&&!i&&!!(a&&o)}),f=B.useGetPatientPortalAppointmentsTimeslots({queries:{...c,appointmentTypeId:o}},{onError:r,retry:0,keepPreviousData:!0,enabled:!l&&i&&!!o});return l?u:i?f:d}function zf(e,t,n){let r=(0,M.useRef)(!0),i=(0,M.useRef)(t);i.current=t;let{show:a}=Q(),{t:o}=_(),s=Pe(),{tenant:c}=Z(),l=(0,M.useCallback)(async e=>{V(e)&&e.response.data.errorCode===`AppointmentNotFound`&&(a({type:z.Error,message:o(`BookAppointment.appointmentNotFoundMessage`),title:o(`BookAppointment.appointmentNotFoundTitle`)}),s(`/${c}`))},[a,o,s,c]),[u,d]=(0,M.useState)(0),f=(0,M.useMemo)(()=>u?F(new Date).add(u,`week`).startOf(`week`).toDate():F(new Date).utc().toDate(),[u]),[p,m]=(0,M.useMemo)(()=>{let e=F(new Date).utc(),t=F(f).endOf(`week`).toDate(),n=e.add(12,`month`).toDate();return t>n?[n,!0]:[t,!1]},[f]),{data:h,isFetched:g,error:v}=Rf(e,{startDate:f,endDate:p},l,n);(0,M.useEffect)(()=>{g&&r.current&&h?.every(e=>!e.timeslots.length)&&d(e=>e>=Nl?(r.current=!1,0):e+1)},[g,h,u]);let y=(0,M.useCallback)(e=>{i.current&&i.current(e)},[]),b=(0,M.useCallback)(e=>{r.current=!1,d(Math.max(0,e))},[]);return{timeslots:v?[]:h||[],handleSelectSlot:y,handleSetStartOffset:b,startDate:f,startOffset:u,isLoaded:g,endDate:p,isLastIteration:m}}function Bf(e){let t={};for(let n of e){let e=F(n).format(`YYYY-MM-DD`);t[e]||(t[e]=[]),t[e].push(n)}return t}function Vf(e,t){let n=F(e),r=F(t);return n.month()===r.month()?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`span`,{children:`${n.format(`D`)} - `}),(0,N.jsx)(`span`,{children:r.format(`D MMMM YYYY`)})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`span`,{children:`${n.format(`D MMMM`)} - `}),(0,N.jsx)(`span`,{children:r.format(`D MMMM YYYY`)})]})}function Hf({physician:e,physicianId:t,timeslots:n,handleSelectSlot:r,selectedSlot:i}){let a=Bf(n),{t:o}=_();return(0,N.jsxs)(`div`,{className:K.content,"data-testid":`AT_PhysicianSlots`,children:[e&&(0,N.jsxs)(`div`,{className:K.physician,children:[(0,N.jsx)(Gc,{url:e.profileImage??``,className:K.physicianPic}),(0,N.jsx)(`span`,{children:`${e.fullName} (${o(`EmploymentTypes.${e.employmentType.toLowerCase()}`)})`})]}),n.length===0&&(0,N.jsx)(`div`,{className:K.noTimesContent,children:o(`BookAppointment.noAvailableTimes`)}),Object.keys(a).map(n=>(0,N.jsxs)(`div`,{className:K.dateBlock,"data-testid":`AT_DayTimeSlots`,children:[(0,N.jsx)(`div`,{children:If(F(n).format(F.locale()===`da`?`dddd [d.] D`:`dddd, Do`))}),(0,N.jsx)(`div`,{className:K.slotsContainer,children:a[n].map(n=>(0,N.jsxs)(`label`,{className:`${K.buttonLabel} ${n.toISOString()===i?.date&&(e?.id===i?.physicianId||t===i?.physicianId)?K.buttonLabelActive:``}`,"data-testid":`AT_TimeSlot`,children:[(0,N.jsx)(`input`,{type:`radio`,value:n.toISOString(),checked:n.toISOString()===i?.date&&(e?.id===i?.physicianId||t===i?.physicianId),onChange:()=>{r({physicianId:e?.id||t,date:n.toISOString()})},className:K.hiddenRadio}),F(n).format(`HH:mm`)]},n.toISOString()))})]},n))]})}function Uf(e){let{t}=_(),n;n=`appointment`in e?{appointment:e.appointment}:e.isDepartmentBased?{appointmentType:e.appointmentType}:{physician:e.physicians,appointmentType:e.appointmentType};let{timeslots:r,handleSelectSlot:i,handleSetStartOffset:a,startDate:o,startOffset:s,isLoaded:c,endDate:l,isLastIteration:u}=zf(n,e.onSelect,e.isDepartmentBased),d=`appointment`in e?[e.appointment.physician]:e.physicians;return(0,N.jsxs)(`section`,{className:K.tile,children:[(0,N.jsxs)(`div`,{className:K.datePanel,children:[(0,N.jsx)(`button`,{className:K.arrow,"data-testid":`AT_PreviousWeekBtn`,onClick:e=>{e.preventDefault(),a(s-1)},style:{visibility:s===0?`hidden`:`inherit`},title:t(`BookAppointment.previousWeek`)??`Previous week`,children:(0,N.jsx)(Cc,{})}),(0,N.jsx)(`span`,{className:K.dateLabel,"data-testid":`AT_Week`,children:(0,N.jsx)(`div`,{children:Vf(o,l)})}),(0,N.jsx)(`button`,{className:K.arrow,"data-testid":`AT_NextWeekBtn`,onClick:e=>{e.preventDefault(),a(s+1)},style:{visibility:u?`hidden`:`inherit`},title:t(`BookAppointment.nextWeek`)??`Next week`,children:(0,N.jsx)(Cc,{})})]}),!c&&(0,N.jsx)(uf,{}),c&&(e.isDepartmentBased?(r||[]).map(t=>(0,N.jsx)(Hf,{physician:null,physicianId:t.physicianId,timeslots:t.timeslots.map(e=>new Date(e)),selectedSlot:e.value,handleSelectSlot:i},t.physicianId)):(r||[]).map(t=>{let n=d.find(e=>t.physicianId===e?.id);return n?(0,N.jsx)(Hf,{physician:n,physicianId:n.id,timeslots:t.timeslots.map(e=>new Date(e)),selectedSlot:e.value,handleSelectSlot:i},n.id):null}
1).filter(Boolean))]})}function Wf(e){let t=H(),{show:n}=Q(),{t:r}=_(),i=Ee(),{mutate:a}=B.usePostPatientPortalAppointments(void 0,{onSuccess:async()=>{(!e||e.current)&&t(`/${Z().tenant}`),n({type:z.Success,message:r(`BookAppointment.createSuccessMessage`),title:r(`BookAppointment.createSuccessTitle`)}),await i.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointments`)})},onError:async a=>{if(V(a)&&a.response.data.errorCode===`NotAllowedOperation`){await i.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalPatient`)}),await i.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalClinic`)}),(!e||e.current)&&t(`/${Z().tenant}/`),n({type:z.Error,message:r(`BookAppointment.actionNotPossibleMessage`),title:r(`BookAppointment.actionNotPossibleTitle`)});return}if(V(a)&&a.response.data.errorCode===`DefaultAppointmentTypeChanged`){n({type:z.Error,message:r(`BookAppointment.appointmentTypeNotAvailableMessage`),title:r(`BookAppointment.appointmentTypeNotAvailableTitle`)}),await i.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointmentsTypes`)});return}if(V(a)&&a.response.data.errorCode===`TooManyRequests`){n({type:z.Error,message:r(`BookAppointment.appointmentCanNotBeBookedMessage`),title:r(`BookAppointment.appointmentCanNotBeBookedTitle`)});return}n({type:z.Error,message:r(`BookAppointment.timeNotAvailableMessage`),title:r(`BookAppointment.timeNotAvailableTitle`)}),await i.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointmentsTimeslots`)})}});return(0,M.useCallback)((e,t)=>{e&&t&&a({appointmentTypeId:t,dateTime:e.date,physicianId:e.physicianId})},[a])}function Gf(e){let t=H(),{tenant:n}=Z(),{t:r}=_(),{data:i}=B.useGetPatientPortalAppointmentsCancreate(),{isOpen:a,openModal:o,closeModal:s}=ps();return{confirmation:(0,N.jsx)(lt,{title:r(`BookAppointment.newAppointmentTitle`),message:r(`BookAppointment.newAppointmentMessage`)??``,isOpen:a,onCancel:()=>{e&&e(),s()},cancelButtonText:r(`Button.close`)??void 0}),onClick:()=>{i?t(`/${n}/appointments/create`):o()},openAppointmentMaximumNumberAlert:o,canCreate:i}}function Kf(e){window.opener?.postMessage({type:Fl,status:e},window.location.origin)}function qf(){let{t:e}=_(),{show:t}=Q(),n=(0,M.useRef)(null),r=(0,M.useRef)(void 0),[i,a]=(0,M.useState)(!1),o=(0,M.useRef)(!1);(0,M.useEffect)(()=>(o.current=!1,()=>{o.current=!0,r.current?.()}),[]);let s=(0,M.useCallback)(()=>{gs&&(n.current=window.open(``,`_blank`))},[]),c=(0,M.useCallback)(()=>{r.current?.(),r.current=void 0,n.current?.close(),n.current=null},[]),l=(0,M.useCallback)(()=>{c(),a(!1)},[c]),u=(0,M.useCallback)((e,{returnUrl:t,onFinished:i})=>{let o=t&&new URL(t).pathname,s=async e=>{c();try{await i(e)}finally{a(!1)}},l=n.current;if(!l){window.location.href=e;return}if(l.closed){s();return}let u=e=>{if(e.origin!==window.location.origin||e.source!==n.current)return;let t=e.data;t?.type===Fl&&t.status&&s(t.status)},d=setInterval(()=>{let e=n.current;if(e){if(e.closed){s();return}try{o&&new URL(e.location.href).pathname===o&&s()}catch{}}},Pl);window.addEventListener(`message`,u),r.current=()=>{clearInterval(d),window.removeEventListener(`message`,u)},l.location.href=e,a(!0)},[c]);return{start:(0,M.useCallback)(async({createPaymentWindow:r,...i})=>{if(s(),gs&&!n.current){t({type:z.Error,title:e(`Payment.popupBlockedTitle`),message:e(`Payment.popupBlockedMessage`)});return}try{let e=await r();o.current||!e?l():u(e,i)}catch{l()}},[s,u,l,t,e]),isAwaiting:i}}function Jf(e,{interval:t=1500,maxRefetches:n=3}={}){let[r,i]=ve(),a=r.has(e),[o,s]=(0,M.useState)(0),c=(0,M.useRef)(null);return(0,M.useEffect)(()=>{a&&(c.current=null,s(e=>e+1),r.delete(e),i(r,{replace:!0}))},[e,a,r,i]),(0,M.useCallback)(e=>o!==0&&(c.current??(c.current=e),e<c.current+n&&t),[o,t,n])}function Yf(){let{t:e,i18n:t}=_(),{show:n}=Q(),r=H(),i=t.language,a=e=>{let t=new URL(e);return t.searchParams.set(`lng`,i),t.toString()},o=qf(),{mutateAsync:s,isPending:c}=B.usePostPatientPortalAppointmentsReservations(void 0,{onError:t=>{if(V(t)&&t.response.data.errorCode===`TooManyRequests`){n({type:z.Error,message:e(`BookAppointment.appointmentCanNotBeReservedMessage`),title:e(`BookAppointment.appointmentCanNotBeBookedTitle`)});return}n({type:z.Error,message:e(`BookAppointment.timeNotAvailableMessage`),title:e(`BookAppointment.timeNotAvailableTitle`)})}});
1return{reserve:(e,t,n)=>{if(!e||!t||c)return;let{tenant:i}=Z(),l=`${R.ROOT_URL}/${i}/appointments`,u=a(`${l}/payment/success?date=${encodeURIComponent(e.date)}`),d=a(`${l}/create`);o.start({returnUrl:d,createPaymentWindow:async()=>{let{paymentWindowUrl:r}=await s({appointmentTypeId:t,dateTime:e.date,successUrl:u,failureUrl:a(`${l}/payment/failure`),returnUrl:d,...n});return r&&a(r)},onFinished:t=>{if(!t){r(`/${i}`,{[Il]:`1`});return}t===`success`?r(`/${i}/appointments/payment/success`,{date:e.date}):r(`/${i}/appointments/payment/failure`)}})},isAwaitingPayment:o.isAwaiting}}function Xf(e,t){return e?`noPhysiciansSelectedMessage`:t?`noAppointmentTypeSelectedMessageDepartments`:`noAppointmentTypeSelectedMessage`}function Zf(){let{isDepartmentBased:e}=mf(),[t,n]=(0,M.useState)(),[r,i]=(0,M.useState)(),{data:a,isInitialLoading:o}=B.useGetPatientPortalAppointmentsTypes(),s=(0,M.useMemo)(()=>a?.length===1?a[0].id:r,[a,r]),c=Pe(),{canCreate:l,openAppointmentMaximumNumberAlert:u,confirmation:d}=Gf(()=>c(-1));(0,M.useEffect)(()=>{l===!1&&u()},[l]);let[f,p]=(0,M.useState)([]),{data:m}=B.useGetPatientPortalAppointmentsPhysicians({queries:{appointmentTypeId:s}},{enabled:!!s&&!e}),{clinic:h,patient:g}=Xd(),{general:v}=h.settings,y=(0,M.useRef)(!0),b=Wf(y),{reserve:ee,isAwaitingPayment:x}=Yf(),S=a?.find(e=>e.id===s),te=S?.bookingFee??0,C=te>0,[w,T]=(0,M.useState)(Cl),ne=wl(w),E=()=>{t&&(C?ee(t,s,w):b(t,s),n(void 0))},{t:O,i18n:re}=_(),ie=re.language,{currency:ae}=cc(),oe=(0,M.useMemo)(()=>{if(!m&&!e||!t)return``;let n=F(t.date),r=m?.find(e=>e.id===t.physicianId);return`${O(`BookAppointment.bookAppointmentMessageStart`)}${n.format(`dddd`)}${O(`Appointments.dayPostfix`)} ${n.format(`D`)}${O(`Appointments.dayNumberPostfix`)} ${n.format(`MMMM`)} ${O(`Appointments.at`)} ${n.format(`HH:mm`)} - ${n.add(r?.duration||0,`m`).format(`HH:mm`)} ${e?``:`${O(`Appointments.with`)} ${r?.fullName}`} ${O(`BookAppointment.bookAppointmentMessageEnd`)}`},[m,t,O,e]);Al({isDirty:!!t&&(!C||ne),message:oe,title:O(`BookAppointment.bookAppointmentTitle`),onConfirm:()=>{y.current=!1,E()}}),(0,M.useEffect)(()=>{e||n(void 0)},[f,e]);let se=(0,M.useMemo)(()=>[{label:O(`BookAppointment.noPhysiciansSelectedPlaceholder`),value:``,selected:!s},...(a||[]).map(e=>({label:Ff(e.title,e.bookingFee,ie,ae),value:e.id,selected:e.id===s}))],[a,s,ie,ae,O]),ce=(0,M.useMemo)(()=>[{label:O(`BookAppointment.noPhysiciansSelectedPlaceholder`),value:``,selected:f.length===0,neighbors:!1,disabled:!1},{label:O(`BookAppointment.all`),value:`all`,selected:!1,neighbors:!1,hidden:m&&m.length<2},...(m||[]).map(e=>({label:e.fullName,value:e.id,selected:f.includes(e.id)}
1)).sort((e,t)=>e.label&&t.label?e.label.localeCompare(t.label):0)],[m,f,O]);if(o)return(0,N.jsx)(`div`,{className:Ll.container,children:(0,N.jsx)(uf,{})});if(!v.allowRegisterNewPatient&&g.isNewPatient)return(0,N.jsx)(`div`,{className:Ll.container,"data-testid":`AT_RegistrationForbidden`,children:(0,N.jsx)(El,{message:O(`Home.forbiddenRegistrationMessage`)})});if(!a||!a.length)return(0,N.jsx)(`div`,{className:Ll.container,"data-testid":`AT_BookingNotPossible`,children:(0,N.jsx)(El,{message:O(`BookAppointment.notPossibleBooking`)})});if(x)return(0,N.jsx)(`div`,{className:Ll.container,children:(0,N.jsx)(jf,{})});let le=C?O(`BookAppointment.payButton`,{price:Nf(te,ie,ae)}):O(`Button.create`);return(0,N.jsxs)(`div`,{className:Ll.container,"data-testid":`AT_CreateAppointmentPage`,children:[d,(0,N.jsx)(_l,{name:`type`,"data-testid":`AT_AppointmentTypeSelect`,label:O(`BookAppointment.appointmentType`)||void 0,options:se,disabled:a?.length===1,onChange:e=>{i(e.target.value),p([]),n(void 0),T(Cl)}},s),!e&&(0,N.jsx)(_l,{name:`practitioner`,"data-testid":`AT_PractitionerSelect`,label:O(`BookAppointment.practitioner`)||void 0,options:ce,onChange:e=>{let t=Array.from(e.target.selectedOptions).map(({value:e})=>e).filter(e=>e!==``),n=t[0]===`all`;p(n?(m||[]).map(e=>e.id):t)},disabled:!s,multiple:!0}),!s||!e&&f.length===0?(0,N.jsx)(`div`,{className:Ll.emptyTimeSlots,"data-testid":`AT_EmptyTimeSlots`,children:O(`BookAppointment.${Xf(s,e)}`)}):(0,N.jsx)(Uf,{physicians:e?m??[]:(m??[]).filter(e=>f.includes(e.id)),appointmentType:S,value:t,onSelect:n,isDepartmentBased:e}),(0,N.jsxs)(`div`,{className:D(Ll.buttonContainer,C&&Ll.paymentBar),children:[C&&s&&(0,N.jsx)(Af,{source:{appointmentTypeId:s},value:w,onChange:T}),(0,N.jsx)(P,{filled:!0,onClick:E,name:`createAppointment`,"data-testid":`AT_CreateAppointmentBtn`,disabled:!t||C&&!ne,children:le})]})]})}function Qf(e,t){let{t:n}=_(),r=Pe(),{tenant:i}=Z(),{show:a}=Q(),o=Ee(),{isDepartmentBased:s}=mf(),{appointmentId:c,physician:l}=e||{},{mutate:u}=B.usePutPatientPortalAppointments(void 0,{onSuccess:async(c,u)=>{(!t||t.current)&&r(`/${i}`);let d=F(u.dateTime);a({type:z.Success,message:e?.start===null?n(`BookAppointment.createSuccessMessage`):`${n(`Appointments.appointmentRescheduledMessage`)} ${d.format(`dddd`)} ${n(`Appointments.dayPostfix`)} ${d.format(`DD MMMM`)} ${n(`Appointments.at`)} ${F(u.dateTime).format(`HH:mm`)} ${s?``:`${n(`Appointments.with`)} ${l?.fullName}`}`,title:e?.start===null?n(`BookAppointment.createSuccessTitle`):n(`Appointments.appointmentRescheduled`)}),await o.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointments`)})},onError:async e=>{if(V(e)&&e.response.data.errorCode===`NotAllowedOperation`){a({type:z.Error,message:n(`BookAppointment.actionNotPossibleMessage`),title:n(`BookAppointment.actionNotPossibleTitle`)}),(!t||t.current)&&r(`/${i}`);return}if(V(e)&&e.response.data.errorCode===`AppointmentNotFound`){a({type:z.Error,message:n(`BookAppointment.appointmentNotFoundMessage`),title:n(`BookAppointment.appointmentNotFoundTitle`)}),r(`/${i}`);return}V(e)&&e.response.data.errorCode===`AppointmentCouldNotBeRescheduled`?a({type:z.Error,message:n(`BookAppointment.rescheduleIsNotPossibleMessage`),title:n(`BookAppointment.actionNotPossibleTitle`)}):a({type:z.Error,message:n(`BookAppointment.timeNotAvailableMessage`),title:n(`BookAppointment.timeNotAvailableTitle`)}),await o.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointmentsTimeslots`)})}});return(0,M.useCallback)(e=>{e&&c&&u({appointmentId:c,dateTime:e.date})},[u,c])}function $f(){let{t:e}=_(),{id:t}=se(),[n,r]=(0,M.useState)(),i=H(),{show:a}=Q(),{isDepartmentBased:o}=mf(),s=(0,M.useRef)(!0),{data:c}=B.useGetPatientPortalAppointmentsByAppointmentId({params:{appointmentId:t}},{retry:0,enabled:!!t,onError:async t=>{V(t)&&t.response.data.errorCode===`AppointmentNotFound`&&(i(`/${Z().tenant}`),a({type:z.Error,message:e(`BookAppointment.appointmentNotFoundMessage`),title:e(`BookAppointment.appointmentNotFoundTitle`)}))}}),l=Qf(c,s),u=(0,M.useMemo)(()=>{if(!c||!n)return``;let t=F(n.date),{physician:r}=c;return`${e(`BookAppointment.rescheduleAppointmentMessageStart`)}${t.format(`dddd`)}${e(`Appointments.dayPostfix`)} ${t.format(`D`)}${e(`Appointments.dayNumberPostfix`)} ${t.format(`MMMM`)} ${e(`Appointments.at`)} ${t.format(`HH:mm`)} - ${t.add(c?.duration||0,`m`).format(`HH:mm`)} ${o?``:`${e(`Appointments.with`)} ${r?.fullName}`} ${e(`BookAppointment.rescheduleAppointmentMessageEnd`)}`},[n,c,e,o]);return Al({isDirty:!!n,message:u,title:e(`BookAppointment.rescheduleAppointmentTitle`),onConfirm:()=>{s.current=!1,l(n),r(void 0)}}),(0,N.jsx)(`div`,{className:Rl.container,children:c&&(0,N.jsxs)(N.Fragment,{children:[c.plannedForRecall&&(0,N.jsx)(`div`,{className:D(Rl.info,Rl.recallAppointmentBox),"data-testid":`AT_BookRecallAppointment`,children:(0,N.jsx)(`span`,{children:e(`BookAppointment.bookRecallAppointment`)})}),(0,N.jsxs)(`div`,{className:Rl.info,"data-testid":`AT_AppointmentDetails`,children:[(0,N.jsxs)(`span`,{children:[(0,N.jsxs)(`b`,{children:[e(`BookAppointment.appointmentType`),`: `]}),`${c.appointmentTypeName}, ${c.duration} ${e(`Appointments.durationMinutes`)}`]}),o?(0,N.jsx)(`span`,{children:c.receptionName}):(0,N.jsxs)(`span`,{children:[(0,N.jsxs)(`b`,{children:[e(`BookAppointment.practitioner`),`:`]}),` ${c.physician?.fullName} (${e(`EmploymentTypes.${c.physician?.employmentType?.toLowerCase()}`)})`]})]}),(0,N.jsx)(Uf,{appointment:c,value:n,onSelect:r,isDepartmentBased:o}),(0,N.jsx)(`div`,{className:Rl.buttonContainer,children:(0,N.jsx)(P,{name:`updateAppointment`,filled:!0,fixed:!0,onClick:()=>{l(n),r(void 0)},disabled:!n,children:e(`Button.book`)})})]})})}function ep(e){return(0,N.jsxs)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,N.jsx)(`path`,{d:`M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.89 22 5.99 22H18C19.1 22 20 21.1 20 20V8L14 2ZM18 20H6V4H13V9H18V20Z`}),(0,N.jsx)(`path`,{d:`M8 16H16V18H8V16Z`}),(0,N.jsx)(`path`,{d:`M8 12H16V14H8V12Z`})]})}function tp(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M16 7H3.83L9.42 1.41L8 0L0 8L8 16L9.41 14.59L3.83 9H16V7Z`})})}function np(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M13.64 2.35C12.19 0.9 10.2 0 7.99 0C3.57 0 0 3.58 0 8C0 12.42 3.57 16 7.99 16C11.72 16 14.83 13.45 15.72 10H13.64C12.82 12.33 10.6 14 7.99 14C4.68 14 1.99 11.31 1.99 8C1.99 4.69 4.68 2 7.99 2C9.65 2 11.13 2.69 12.21 3.78L8.99 7H15.99V0L13.64 2.35Z`})})}function rp(e){return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 48 48`,fill:`none`,...e,children:[(0,N.jsx)(`circle`,{cx:`24`,cy:`24`,r:`20`,stroke:`currentColor`,strokeWidth:`4`}),(0,N.jsx)(`path`,{d:`M16 16 L32 32 M32 16 L16 32`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`square`})]})}function ip(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 80 80`,fill:`currentColor`,...e,children:(0,N.jsx)(`path`,{d:`M40 0C17.92 0 0 17.92 0 40C0 62.08 17.92 80 40 80C62.08 80 80 62.08 80 40C80 17.92 62.08 0 40 0ZM40 72C22.36 72 8 57.64 8 40C8 22.36 22.36 8 40 8C57.64 8 72 22.36 72 40C72 57.64 57.64 72 40 72ZM58.36 22.32L32 48.68L21.64 38.36L16 44L32 60L64 28L58.36 22.32Z`})})}function ap(){let{t:e}=_(),t=H(),{tenant:n}=Z(),{status:r}=se(),[i]=ve(),a=i.get(`date`),o=r===`success`;(0,M.useEffect)(()=>{Kf(o?`success`:`failure`)},[o]);let s={key:`home`,label:e(`Payment.myAppointments`),icon:(0,N.jsx)(Bl,{style:Gl}),onClick:()=>t(`/${n}`,o?{[Il]:`1`}:void 0),testId:`AT_MyAppointmentsBtn`};if(o){let r=a?F(a):null,i=r?e(`Payment.bookingMessage`,{date:Pf(r.format(`DD-MM-YYYY`)),time:Pf(r.format(`HH:mm`))}):e(`Payment.bookingMessageNoDate`),o={key:`invoices`,label:e(`Payment.myInvoices`),icon:(0,N.jsx)(zl,{style:{fontSize:`1.33em`}}),onClick:()=>t(`/${n}/invoices`),filled:!0,testId:`AT_MyInvoicesBtn`};return(0,N.jsx)(Wl,{testId:`AT_BookingConfirmed`,icon:`success`,heading:e(`Payment.bookingHeading`),message:i,actions:[s,o]})}let c={key:`retry`,label:e(`Payment.retry`),icon:(0,N.jsx)(Vl,{style:Gl}),onClick:()=>t(`/${n}/appointments/create`),filled:!0,testId:`AT_TryAgainBtn`};return(0,N.jsx)(Wl,{testId:`AT_BookingFailed`,icon:`failure`,heading:e(`Payment.failureHeading`),message:e(`Payment.bookingFailureMessage`),actions:[s,c]})}function op(e){return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 32 32`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,...e,children:[(0,N.jsx)(`circle`,{cx:`16`,cy:`16`,r:`15`}),(0,N.jsx)(`path`,{d:`M16 6v10h8`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function sp(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,width:`26`,height:`29`,viewBox:`0 0 26 29`,...e,children:(0,N.jsxs)(`g`,{transform:`translate(1 1)`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,N.jsx)(`path`,{d:`M30,31.5v-3a6,6,0,0,0-6-6H12a6,6,0,0,0-6,6v3`,transform:`translate(-6 -4.5)`}),(0,N.jsx)(`path`,{d:`M24,10.5a6,6,0,1,1-6-6,6,6,0,0,1,6,6Z`,transform:`translate(-6 -4.5)`})]})})}function cp(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 17 22`,width:`17`,he
1ight:`22`,fill:`white`,...e,children:(0,N.jsx)(`path`,{d:`M1.222 19.556A2.452 2.452 0 0 0 3.667 22h9.778a2.452 2.452 0 0 0 2.444-2.444V4.889H1.222ZM17.111 1.222h-4.278L11.611 0H5.5L4.278 1.222H0v2.445h17.111Z`,fill:`#fff`})})}function lp(e){return(0,N.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 22 22`,width:`22`,height:`22`,fill:`white`,...e,children:(0,N.jsx)(`path`,{d:`M0 17.418v4.586h4.583L18.1 8.484l-4.584-4.58ZM21.643 4.94a1.217 1.217 0 0 0 0-1.723l-2.86-2.86a1.217 1.217 0 0 0-1.723 0l-2.237 2.237 4.583 4.583 2.236-2.236Z`,fill:`#fff`})})}function up(){let e=(0,M.useRef)(null);return(0,M.useEffect)(()=>{if(e.current===null)return()=>{};let t=(t,n=!1)=>{if(e.current===null)return;let r=e.current;if(n){let e=r.scrollWidth-r.offsetWidth;t=t<e*.6?0:e}r.scrollTo({left:t,behavior:n?`smooth`:`instant`})},n=0,r=t=>{n=t.touches[0].clientX+(e.current?.scrollLeft||0)},i=e=>{t(n-e.changedTouches[0].clientX,!0)},a=e=>{t(n-e.changedTouches[0].clientX)},o=e.current;return o.addEventListener(`touchstart`,r,{passive:!0}),o.addEventListener(`touchend`,i,{passive:!0}),o.addEventListener(`touchmove`,a,{passive:!0}),()=>{o.removeEventListener(`touchstart`,r),o.removeEventListener(`touchend`,i),o.removeEventListener(`touchmove`,a)}},[]),e}function dp(){let{t:e}=_(),t=Jf(Il),{data:n,isLoading:r}=B.useGetPatientPortalAppointments({},{retry:0,refetchInterval:(e,n)=>t(n.state.dataUpdateCount)}),{onEdit:i,onCancel:a,cancelAppointmentMessage:o,confirmAppointmentCancel:s,closeCancelAppointmentModal:c,closeAppointmentChangeAlert:l,appointmentChangeAlertTitle:u,isAppointmentChangeAlertOpen:d,isConfirmCancelAppointmentOpen:f}=Zc(),{isDepartmentBased:p}=mf(),m=(0,M.useMemo)(()=>n&&n.filter(e=>e.start!==null&&F(e?.start).startOf(`date`).toDate()>=F(new Date).startOf(`date`).toDate()&&e.appointmentState!==Ji.enum.CanceledByPatient&&e.appointmentState!==Ji.enum.CanceledByClinic&&e.appointmentState!==Ji.enum.LateCancellation&&e.appointmentState!==Ji.enum.NoShow&&e.appointmentState!==Ji.enum.Done&&!e.plannedForRecall).sort((e,t)=>new Date(e.start??``).getTime()>=new Date(t.start??``).getTime()?1:-1),[n]),h=H(),{tenant:g}=Z(),{clinic:v}=Xd(),{general:y}=v.settings,b=(0,M.useMemo)(()=>n&&n.filter(e=>!e.start&&!e.waitingList&&!e.plannedForRecall),[n]);return r||!m?null:(0,N.jsxs)(`div`,{className:$l.container,children:[(0,N.jsx)(lt,{title:e(`Appointments.cancelAppointment`),message:o,isOpen:f,onCancel:c,onConfirm:s}),(0,N.jsx)(lt,{title:u??``,message:e(`Appointments.changeAppointmentAlert`)??``,isOpen:d,onCancel:l,cancelButtonText:e(`Button.close`)??void 0}),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`span`,{className:$l.title,children:e(`Appointments.upcomingAppointments`)}),m.length===0&&(0,N.jsx)(`div`,{className:$l.noAppointmentsTile,children:(0,N.jsx)(`div`,{className:$l.noAppointments,children:e(`Appointments.noAppointments`)})}),(0,N.jsx)(`div`,{className:$l.appointmentsContainer,"data-testid":`AT_UpcomingAppointments`,children:m.length>0&&m.map(e=>(0,N.jsx)(Zl,{start:e.start??`0`,duration:e.duration??0,physicianName:e.physician?.fullName||``,receptionName:e?.re
1ceptionName||``,profileImage:e.physician?.profileImage||``,type:e.appointmentTypeName||``,disabledCancellation:y.disableAppointmentCancellation,clickHandler:()=>h(`/${g}/appointments/${e.appointmentId}`),onEdit:()=>i(e),onCancel:()=>a(e)},e.appointmentId))}),b&&b.length>0&&(0,N.jsxs)(`div`,{className:$l.plannedContainer,"data-testid":`AT_PlannedAppointmentsSection`,children:[(0,N.jsx)(`span`,{className:$l.title,children:e(`Appointments.toBePlanned`)}),(0,N.jsx)(`div`,{className:$l.messageSection,children:e(`Appointments.plannedAppointmentsMessage`)}),b.map(t=>(0,N.jsx)(`div`,{className:Ql.tile,children:(0,N.jsxs)(`button`,{className:Ql.tileButton,onClick:()=>{t.appointmentId&&h(`/${g}/appointments/edit/${t.appointmentId}`)},"data-testid":`AT_Appointment`,children:[(0,N.jsx)(Gc,{url:t.physician?.profileImage??``}),(0,N.jsxs)(`div`,{className:Ql.info,children:[(0,N.jsx)(`h3`,{className:Ql.infoTitle,children:`${t.appointmentTypeName}, 2 ${t.duration} ${e(`Appointments.durationMinutes`)}`}),p?(0,N.jsx)(`span`,{children:t.receptionName}):(0,N.jsxs)(`span`,{children:[e(`Appointments.practitioner`),`: `,t.physician?.fullName]})]})]})},t.appointmentId))]})]})]})}function fp(){let{patient:e,clinic:t}=Xd(),n=H(),{tenant:r}=Z(),{t:i}=_(),{confirmation:a,onClick:o}=Gf(),{bookAppointment:s,bookAppointmentConfirmation:c}=Gd(),{data:l}=B.useGetPatientPortalInvoicesUnpaidCount({}),{invoicesEnabled:u}=cc(),{messages:d,general:f}=t.settings;if(!d||!f)return null;let p=eu(d,e,t),m=f.allowRegisterNewPatient?p.allowedRegistrationPage||i(`Home.unregisteredMessage`):p.notAllowedRegistrationPage||i(`Home.forbiddenRegistrationMessage`);return(0,N.jsxs)(`section`,{className:J.homePageContent,children:[c,a,d.startPage&&(0,N.jsx)(`div`,{className:J.clinicNameTile,children:p.startPage}),e.isBlocked&&(0,N.jsx)(`div`,{className:J.unregisteredMessage,children:(0,N.jsx)(`p`,{children:p.blockedPatientPage||i(`Home.blockedPatientMessage`)})}),!e.isRegistered&&(0,N.jsx)(El,{message:m}),!e.isRegistered&&f.allowRegisterNewPatient&&(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(`div`,{className:J.registerContainer,children:(0,N.jsx)(P,{name:`createProfile`,filled:!0,className:J.registerButton,onClick:()=>n(`/${r}/profile/edit`),children:i(`Button.register`)})})}),e.isRegistered&&!e.isBlocked&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`section`,{className:J.tilesSection(u),"data-testid":`AT_HomeSection`,children:[(0,N.jsxs)(`button`,{name:`myProfile`,className:J.tile,onClick:()=>n(`/${r}/profile`),"data-testid":`AT_MyProfileBtn`,children:[(0,N.jsx)(ql,{className:J.icon}),(0,N.jsx)(`span`,{children:i(`Home.myProfile`)})]}),(0,N.jsxs)(`button`,{name:`bookAppointment`,className:J.tile,onClick:s??o,"data-testid":`AT_BookAppointmentBtn`,children:[(0,N.jsx)(Kl,{className:J.icon}),(0,N.jsx)(`span`,{children:i(`Home.bookAppointment`)})]}),u&&(0,N.jsxs)(`button`,{name:`invoices`,className:J.tile,onClick:()=>n(`/${r}/invoices`),"data-testid":`AT_InvoicesBtn`,children:[(0,N.jsx)(zl,{className:J.icon}),(0,N.jsx)(`span`,{children:i(`Home.invoices`)}),!!l&&(0,N.jsx)(`span`,{className:J.unpaidCount,children:i(`Home.unpaidInvoices`,{count:l})})]}),(0,N.jsx)(Jl,{patient:e})]}),(0,N.jsx)(dp,{})]})]})}function pp(e){return(0,N.jsxs)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,N.jsx)(`path`,{d:`M19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2V16H3V19C3 20.66 4.34 22 6 22H18C19.66 22 21 20.66 21 19V2L19.5 3.5ZM15 20H6C5.45 20 5 19.55 5 19V18H15V20ZM19 19C19 19.55 18.55 20 18 20C17.45 20 17 19.55 17 19V16H8V5H19V19Z`}),(0,N.jsx)(`path`,{d:`M15 7H9V9H15V7Z`}),(0,N.jsx)(`path`,{d:`M18 7H16V9H18V7Z`}),(0,N.jsx)(`path`,{d:`M15 10H9V12H15V10Z`}),(0,N.jsx)(`path`,{d:`M18 10H16V12H18V10Z`})]})}function mp(e){return e===`application/pdf`&&navigator&&`pdfViewerEnabled`in navigator&&navigator.pdfViewerEnabled}function hp(e){switch(e.split(`.`).pop()?.toLowerCase()){case`pdf`:return`application/pdf`;default:return`application/octet-stream`}}function gp(e,t){return Number.isNaN(e.getTime())?`-`:e.toLocaleDateString(t,{day:`numeric`,month:`long`,year:`numeric`})}function _p({label:e,value:t,locale:n,area:r,currency:i}){let a=(0,M.useMemo)(()=>typeof t==`number`?Nf(t,n,i):t instanceof Date?gp(t,n):t,[t,n,i]);return(0,N.jsxs)(`div`,{className:ou.field,"data-area":r,"data-numeric":typeof t==`number`||void 0,"data-empty":(typeof t==`number`?t===0:t===``)||void 0,children:[(0,N.jsx)(`div`,{className:ou.label,children:e}),(0,N.jsx)(`div`,{className:ou.value,children:a})]})}function vp(e){let{t}=_(),n=Q(),r=(0,M.useRef)(null),{isPending:i,mutateAsync:a}=ue({mutationFn:async t=>{if(!e)throw Error(`No invoice`);let{downloadLink:n}=await B.api.getPatientPortalInvoicesByInvoiceIdPdf({params:{invoiceId:e.invoiceId},queries:{showReceipt:t}});if(!n)throw Error(`No download link`);r.current?await r.current.open(n):window.open(n,`_blank`)},onError:()=>{r.current?.close(),n.show({type:z.Error,title:t(`Invoices.documentErrorTitle`),message:t(`Invoices.documentErrorMessage`)})},onSettled:()=>{r.current=null}});return{open:n=>{let i=t(n?`Invoices.receipt`:`Invoices.invoice`),o=e?e.invoiceNumber??new Date(e.date).toISOString().slice(0,10):null,s=o?`${i}_${o}.pdf`:`${i}.pdf`;return r.current=au.init(s,t(`Invoices.loadingDocument`)??void 0),a(n)},isPending:i}}function yp({invoice:e,onPay:t,payDisabled:n}){let{t:r,i18n:i}=_(),a=i.language,{currency:o}=cc(),s=vp(e),[c,l]=(0,M.useState)(Cl);return(0,N.jsxs)(`article`,{className:su.invoiceCard,children:[(0,N.jsx)(_p,{label:r(`Invoices.creationDate`),value:new Date(e.date),locale:a,area:`creation`}),(0,N.jsx)(_p,{label:r(`Invoices.invoiceNo`),value:e.invoiceNumber??`-`,locale:a,area:`number`}),(0,N.jsx)(_p,{label:r(`Invoices.dueDate`),value:new Date(e.dueDate),locale:a,area:`due`}),(0,N.jsx)(_p,{label:r(`Invoices.state`),value:r(`Invoices.InvoiceStates.${e.state}`)??`-`,locale:a,area:`state`}),(0,N.jsx)(_p,{label:r(`Invoices.total`),value:e.totalAmount,locale:a,currency:o,area:`total`}),(0,N.jsx)(_p,{label:r(`Invoices.unpaidSum`),value:e.unpaidAmount,locale:a,currency:o,area:`unpaid`}),(0,N.jsx)(_p,{label:r(`Invoices.reportDanmark`),value:e.danmarkReportStatus?r(`Invoices.DanmarkStates.${e.danmarkReportStatus}`)??`-`:`-`,locale:a,area:`report`}),(0,N.jsx)(_p,{label:r(`Invoices.danmarkSubsidy`),value:e.danmarkTotalAmount,locale:a,currency:o,area:`subsidy`}),(0,N.jsxs)(`div`,{"data-area":`docs`,children:[(0,N.jsxs)(P,{icon:!0,className:su.docLink,disabled:s.isPending,onClick:()=>s.open(!1),children:[(0,N.jsx)(zl,{style:{fontSize:`1.33em`}}),(0,N.jsx)(`span`,{children:r(`Invoices.invoice`)})]}),e.hasReceipt?(0,N.jsxs)(P,{icon:!0,className:su.docLink,disabled:s.isPending,onClick:()=>s.open(!0),children:[(0,N.jsx)(iu,{style:{fontSize:`1.33em`}}),(0,N.jsx)(`span`,{children:r(`Invoices.receipt`)})]}):null]}),e.isOnlinePaymentAvailable&&(0,N.jsxs)(`div`,{"data-area":`payment`,className:su.paymentArea,children:[(0,N.jsx)(Af,{source:{invoiceId:e.invoiceId??``},value:c,onChange:l,disabled:n}),(0,N.jsx)(P,{filled:!0,disabled:n||!wl(c),onClick:()=>t(e,c),children:r(`Invoices.payInvoice`)})]})]})}function bp({invoices:e,onPay:t,payDisabled:n}){return(0,N.jsx)(`div`,{className:cu.invoicesList,children:e.map(e=>(0,N.jsx)(yp,{invoice:e,onPay:t,payDisabled:n},e.invoiceId))})}function xp(){let{t:e,i18n:t}=_(),n=Q(),r=H(),i=Ee(),a=t.language,o=e=>{let t=new URL(e);return t.searchParams.set(`lng`,a),t.toString()},s=qf(),{isPending:c,mutateAsync:l}=ue({mutationFn:({invoiceId:e,body:t})=>B.api.postPatientPortalInvoicesByInvoiceIdTransactions(t,{params:{invoiceId:e}}),onError:()=>{n.show({type:z.Error,title:e(`Invoices.payErrorTitle`),message:e(`Invoices.payErrorMessage`)})}});return{pay:async(e,t)=>{if(c)return;let{invoiceId:n}=e,{tenant:a}=Z(),u=`${R.ROOT_URL}/${a}/invoices`,d=o(u);await s.start({returnUrl:d,createPaymentWindow:async()=>{let{paymentWindowUrl:e}=await l({invoiceId:n,body:{successUrl:o(`${u}/${n}/success`),failureUrl:o(`${u}/${n}/failure`),returnUrl:d,...t}});return e&&o(e)},onFinished:async e=>{await i.invalidateQueries({queryKey:[`patientPortalInvoices`]}),await i.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalInvoicesByInvoiceId`)}),e?r(`/${a}/invoices/${n}/${e}`):r(`/${a}/invoices`,{[Il]:`1`})}})},isPending:c,isAwaitingPayment:s.isAwaiting}}function Sp(){let{t:e}
2=_(),t=Jf(Il),n=xp(),{data:r,isLoading:i,hasNextPage:a,fetchNextPage:s,isFetchingNextPage:c}=o({queryKey:[`patientPortalInvoices`],queryFn:async({pageParam:e=0})=>({items:await B.api.getPatientPortalInvoices({queries:{offset:e,limit:lu}}),offset:e}),getNextPageParam:e=>{if(!(e.items.length<lu))return e.offset+lu},refetchInterval:(e,n)=>t(n.state.dataUpdateCount)}),l=(0,M.useMemo)(()=>r?.pages.flatMap(e=>e.items)??[],[r]),u=(0,M.useCallback)(async()=>{c||await s()},[s,c]),d=ru(!!a,u);return n.isAwaitingPayment?(0,N.jsxs)(`section`,{className:uu.container,children:[(0,N.jsx)(`span`,{className:uu.title,children:e(`Invoices.title`)}),(0,N.jsx)(jf,{})]}):(0,N.jsxs)(`section`,{className:uu.container,children:[(0,N.jsx)(`span`,{className:uu.title,children:e(`Invoices.title`)}),i&&(0,N.jsx)(uf,{}),!i&&l.length===0&&(0,N.jsx)(`p`,{className:uu.emptyState,children:e(`Invoices.empty`)}),!i&&l.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(bp,{invoices:l,onPay:n.pay,payDisabled:n.isPending}),(0,N.jsx)(`div`,{ref:d,className:uu.scrollSentinel,children:c&&(0,N.jsx)(uf,{})})]})]})}function Cp(){let{t:e,i18n:t}=_(),n=t.language,{currency:r}=cc(),i=H(),{tenant:a}=Z(),{status:o,id:s}=se(),[c,l]=(0,M.useState)(Cl),u=o===`success`;(0,M.useEffect)(()=>{Kf(u?`success`:`failure`)},[u]);let{data:d,isFetching:f,isError:p}=B.useGetPatientPortalInvoicesByInvoiceId({params:{invoiceId:s||``}},{enabled:!!s,retry:!1,refetchOnWindowFocus:!1}),m=xp(),h=vp(d),g={key:`back`,label:e(`Payment.backToInvoices`),icon:(0,N.jsx)(Bl,{style:Gl}),onClick:()=>i(`/${a}/invoices`)};if(!s||p)return(0,N.jsx)(Wl,{message:e(`Payment.invoiceNotFound`),actions:[g]});if(f)return(0,N.jsx)(Wl,{loading:!0});if(m.isAwaitingPayment)return(0,N.jsx)(jf,{});let v=d?.lastPaymentAmount??d?.totalAmount,y=[];d&&(y.push({key:`invoice`,label:e(`Payment.invoice`),value:d.invoiceNumber}),u&&v!=null&&y.push({key:`amount`,label:e(`Payment.amount`),value:Nf(v,n,r)}),!u&&d.companyPhoneNumber&&y.push({key:`phone`,label:e(`Payment.phoneNumber`),value:d.companyPhoneNumber}));let b=u?{key:`receipt`,label:e(`Payment.viewReceipt`),icon:(0,N.jsx)(iu,{style:{fontSize:`1.33em`}}),onClick:()=>h.open(!0),filled:!0,disabled:h.isPending}:{key:`retry`,label:e(`Payment.retry`),icon:(0,N.jsx)(Vl,{style:Gl}),onClick:()=>d&&m.pay(d,c),filled:!0,disabled:!d||m.isPending||!wl(c)};return(0,N.jsx)(Wl,{icon:u?`success`:`failure`,heading:e(u?`Payment.successHeading`:`Payment.failureHeading`),message:e(u?`Payment.successMessage`:`Payment.failureMessage`),details:y,actions:[g,b],children:!u&&(0,N.jsx)(Af,{source:{invoiceId:s},value:c,onChange:l,disabled:m.isPending})})}function wp(){let{i18n:e,t}=_(),n=e.language,{changeLanguage:r}=_c();return(0,N.jsx)(`section`,{className:du.languageContainer,children:vc.map(e=>(0,N.jsxs)(`button`,{className:du.languageTile,onClick:()=>r(e.value),children:[(0,N.jsx)(`span`,{className:D(du.languageFlag),children:(0,N.jsx)(gc,{type:e.value})}),(0,N.jsx)(`span`,{className:du.languageContent,children:t(`Language.${e.value}`)}),n===e.value&&(0,N.jsx)(uc,{className:du.checkmark})]},e.value))})}function Tp(e,t){return e.reduce((e,n)=>{let r=t(n);return e[r]||(e[r]=[]),e[r].push(n),e},{})}function Ep(){let e=H(),{tenant:t}=Z(),{patient:n}=Xd(),{t:r}=_(),{data:i,isLoading:a}=B.useGetPatientPortalPatientRecall({},{retry:0});if(a||!i||!n.isRegistered)return null;let{danmarkInsurance:o}=n,s=pu(i,n.isDroppedOut,r),c=Tp(n.communications||[],({communicationTypeId:e})=>e===`Mobile`||e===`Sms`||e===`WorkPhone`||e===`LandLine`?`Mobile`:e===`Mail`?`Mail`:e||`Other`);return(0,N.jsxs)(`div`,{className:Y.container,children:[(0,N.jsxs)(`section`,{className:mu.tile,"data-testid":`AT_ProfileInfoSection`,children:[(0,N.jsx)(`h3`,{className:Y.title,children:n.name}),(0,N.jsx)(`span`,{children:`${r(`Profile.born`)} ${F(n.birthday).format(`D MMMM YYYY`)}`})]}),(0,N.jsxs)(`section`,{className:mu.tile,"data-testid":`AT_ProfileExtendedInfoSection`,children:[(0,N.jsx)(`h3`,{className:Y.title,children:r(`Profile.extendedInformation`)}),Object.entries(c).map(([e,t])=>(0,N.jsxs)(`div`,{className:Y.communicationItem,"data-testid":`AT_ProfileCommunication${e}`,children:[(0,N.jsxs)(`span`,{className:Y.communicationType,children:[r(`CommunicationTypes.${e}`),`: `]}),t?.map(e=>e.contactPoint).join(`, `)]},e)),n.address&&(n.address.street||n.address.postalCode||n.address.city)&&(0,N.jsxs)(`div`,{"data-testid":`AT_ProfileAddressInfo`,className:Y.communicationItem,children:[(0,N.jsx)(`span`,{className:Y.communicationType,children:r(`Profile.address`)}),[n.address.street,[n.address.postalCode,n.address.city].filter(
2Boolean).join(` `)].filter(Boolean).join(`, `)]},`address`),o&&o.group&&o.group!==`NotAsked`&&(0,N.jsxs)(`div`,{"data-testid":`AT_ProfileInsuranceInfo`,className:Y.communicationItem,children:[(0,N.jsx)(`span`,{className:Y.communicationType,children:r(`Profile.danmarkInsurance`)}),(0,N.jsx)(`span`,{children:[r(`DanmarkInsurance.group.${o.group}`),o.condition&&o.group!==`Asked`&&r(`DanmarkInsurance.condition.${o.condition}`)].filter(Boolean).join(`, `)})]},`insurance`),(0,N.jsx)(`div`,{className:Y.buttonContainer,children:(0,N.jsx)(P,{name:`editProfile`,filled:!0,onClick:()=>e(`/${t}/profile/edit`),children:r(`Profile.editInformation`)})})]}),(0,N.jsxs)(`section`,{className:mu.tile,"data-testid":`AT_ProfileAppointmentInfoSection`,children:[(0,N.jsx)(`h3`,{className:Y.title,children:r(`Profile.appointmentInformation`)}),(0,N.jsx)(`div`,{children:s})]})]})}function Dp({label:e,value:t,multiLine:n=!1,hasCharacterCount:r=!1,hint:i,error:a,...o},s){let c=o.id||o.name||(Math.random()*46656).toString(36).slice(-6),l={id:c,...o},u=n?`textarea`:`input`;return(0,N.jsxs)(`div`,{className:D(xu.root,l.readOnly&&xu.readOnly,l.disabled&&xu.disabled),children:[e&&(0,N.jsxs)(`label`,{htmlFor:c,className:xu.label,children:[l.required&&(0,N.jsx)(`span`,{"aria-hidden":`true`,children:`*`}),e,r&&(0,N.jsx)(`span`,{"aria-hidden":`true`,style:{float:`right`},children:t?.length})]}),(0,N.jsx)(u,{ref:s,className:D(xu.input,a&&xu.invalid),value:t,placeholder:l.placeholder||`Enter ${e&&e.toLowerCase()||`value`}...`,"aria-label":e,"aria-required":l.required,"aria-invalid":!!a,"aria-describedby":a?`${c}-error`:`${c}-hint`,rows:n?4:void 0,onKeyDownCapture:l.inputMode===`numeric`?e=>{e.metaKey||e.ctrlKey||e.key.length!==1||/^\d$/.test(e.key)||e.preventDefault()}:void 0,...l}),i&&(0,N.jsx)(`div`,{id:`${c}-hint`,className:xu.hit,children:i}),a&&(0,N.jsx)(`div`,{id:`${c}-error`,className:xu.error,children:a})]})}function Op(e,t){let{fill:n=`currentColor`,...r}=e,i=[n].flat();return(0,N.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`4 4 40 40`,width:`1em`,height:`1em`,fill:`currentColor`,ref:t,...r,children:[(0,N.jsx)(`path`,{d:`${Su}${Cu}`,fill:i[0]||`currentColor`}),i[1]&&(0,N.jsx)(`path`,{d:Su,fill:i[1]})]})}function kp(){let e=H(),{patient:t}=Xd(),{show:n}=Q(),{t:r}=_(),i=(0,M.useRef)(!0),a=Ee(),{data:o}=cc(),{data:s}=B.useSuspenseGetPatientPortalAddressesDenmark({},{retry:!1,staleTime:6e4}),c=s?tu(s):null,l=[...new Set(c?.postalCodes.map(e=>e.postalCode.toString()))],u=e=>{let t=c?.municipalities.find(t=>t.district===e);return t?t.region:null},d=t.communications?.filter(({communicationTypeId:e})=>e===`Mobile`||e===`Sms`).map(e=>{let[t,n]=Ou(e.contactPoint||``);return{id:e.contactId,code:t,number:n}}),p=t.communications?.filter(({communicationTypeId:e})=>e===`Mail`).map(e=>({id:e.contactId,value:e.contactPoint||``}))||[],m=t.isRegistered?Nu.extend({email:Nu.shape.email.extend({value:p.length?Au:Au.or(ge(``))}),addressInfo:Nu.shape.addressInfo.extend({address:t.address?.street?f().trim().nonempty({message:`validationRequired`}):f().trim(),postalCode:t.address?.postalCode?f().trim().nonempty({message:`validationRequired`}).regex(/^\d+$/,{message:`validationNumber`}).min(4,{message:`validationTooShort`}):ge(``).or(f().trim().min(4,{message:`validationTooShort`}).regex(/^\d+$/,{message:`validationNumber`})),city:t.address?.city?f().trim().nonempty({message:`validationRequired`}):f().trim(),district:t.address?.district?f().trim().nonempty({message:`validationRequired`}):f().trim()})}):Mu,h={isRegistered:t.isRegistered,communications:d?.length?d:[{id:null,code:`+45`,number:``}],email:p[0]||{id:null,value:``},addressInfo:{address:t.address?.street||``,postalCode:t.address?.postalCode||``,city:t.address?.city||``,district:t.address?.district||``,region:t.address?.region||``},danmarkInsurance:{group:t.danmarkInsurance?.group===Pu.NotAsked?void 0:t.danmarkInsurance?.group,condition:t.danmarkInsurance?.condition},referralInfo:{type:X.Other,text:``},digitalMailboxConsent:t.digitalMailboxConsent},{reset:g,getValues:v,register:y,control:b,handleSubmit:ee,getFieldState:x,setValue:S,watch:te,formState:C}=Te({resolver:ke(m),defaultValues:h}),w=(0,M.useCallback)(()=>{let e=v();g(e)},[v,g]),T=B.usePutPatientPortalPatient(void 0,{onSuccess:async()=>{let{tenant:t}=Z();w(),i.current&&e(`/${t}/profile`),n({type:z.Success,message:r(`Edit.updateSuccessMessage`),title:r(`Edit.updateSuccessTitle`)});let o=B.getKeyByAlias(`getPatientPortalPatient`);await a.invalidateQueries({queryKey:o})},onError:async t=>{if(V(t)&&t.response.data.errorCode===`NotAllowedOperation`){let{tenant:t}=Z(),o=B.getKeyByAlias(`getPatientPortalPatient`);await a.invalidateQueries({queryKey:o}),i.current&&e(`/${t}/`),n({type:z.Error,message:r(`Edit.blockedPatientMessage`),title:r(`Edit.blockedPatientTitle`)})}else n({type:z.Error,message:r(`Edit.updateErrorMessage`),title:r(`Edit.updateErrorTitle`)})}}),ne=B.usePostPatientPortalPatient(void 0,{onSuccess:async()=>{let{tenant:t}=Z();w(),i.current&&e(`/${t}/appointments/create`),n({type:z.Success,message:r(`Edit.createSuccessMessage`),title:r(`Edit.createSuccessTitle`)});let o=B.getKeyByAlias(`getPatientPortalPatient`);await a.invalidateQueries({queryKey:o})},onError:async t=>{if(V(t)&&t.response.data.errorCode===`NotAllowedOperation`){let{tenant:t}=Z(),o=B.getKeyByAlias(`getPatientPortalClinic`);await a.invalidateQueries({queryKey:o}),i.current&&e(`/${t}/`),n({type:z.Error,message:r(`Edit.notAllowedCreateMessage`),title:r(`Edit.notAllowedCreateTitle`)})}else n({type:z.Error,message:r(`Edit.createErrorMessage`),title:r(`Edit.createErrorTitle`)})}}),E=(...e)=>{let{error:t}=x(e[0],C);return t&&t.message?r(`Form.${t.message}`):void 0},D=(...e)=>({...y(...e),error:E(e[0])}),O=e=>{let n=[...new Map(e.communications.map(e=>[`${e.code}${e.number}`,e])).values()].map(e=>({communicationTypeId:`Sms`,...t.communications?.find(({contactId:t})=>t===e.id),contactId:e.id||void 0,contactPoint:`${e.code}${e.number}`}));if(e.email.value&&n.push({communicationTypeId:`Mail`,...t.communications?.find(({contactId:t})=>t===e.email.id),contactId:e.email.id||void 0,contactPoint:e.email.value}),(t.communications||[]).filter(t=>t.communicationTypeId===`Mail`&&t.contactId!==e.email.id).forEac
2h(e=>n.push(e)),e.isRegistered){T.mutate({healthInsuranceGroup:t.healthInsuranceGroup||0,communications:n?.map(({contactId:e,...t})=>({private:!1,...t})),danmarkInsurance:{condition:e.danmarkInsurance.condition||Fu.New,group:e.danmarkInsurance.group||Pu.NotAsked},address:{street:e.addressInfo.address,postalCode:e.addressInfo.postalCode,city:e.addressInfo.city,district:e.addressInfo.district,region:u(e.addressInfo.district)},digitalMailboxConsent:e.digitalMailboxConsent});return}ne.mutate({communications:n?.map(({contactId:e,...t})=>({private:!1,...t})),referralInfo:{type:e.referralInfo.type,text:e.referralInfo.text||null},digitalMailboxConsent:e.digitalMailboxConsent})},{fields:re,append:ie,remove:ae}=ye({control:b,name:`communications`}),oe=me({control:b,name:`referralInfo.type`}),se=me({control:b,name:`isRegistered`}),ce=me({control:b,name:`danmarkInsurance.group`});Al({isDirty:C.isDirty&&(Object.keys(C.touchedFields).length>0||Object.keys(C.dirtyFields).includes(`digitalMailboxConsent`)),title:r(`Edit.unsavedChangesTitle`),message:r(`Edit.unsavedChangesMessage`)??``,onConfirm:()=>{i.current=!1,ee(e=>O(e))()}});let le=se?`Update`:`Register`,ue=oe===X.OtherDentist||oe===X.Other,de=te(`addressInfo.district`),fe=D(`addressInfo.postalCode`),pe={...fe,onChange:async e=>{await fe.onChange(e);let t=c?.postalCodes.find(t=>t.postalCode.toString()===e.target.value);t&&(S(`addressInfo.city`,t.city),t.district.length===1?S(`addressInfo.district`,t.district[0]):S(`addressInfo.district`,``))}};return(0,M.useEffect)(()=>{S(`referralInfo.text`,``)},[oe,S]),(0,N.jsxs)(_u,{noValidate:!0,children:[T.isError?(0,N.jsxs)(`div`,{children:[r(`Form.errorOccurred`),` `,T.error.message]}):null,ne.isError?(0,N.jsxs)(`div`,{children:[r(`Form.errorOccurred`),` `,ne.error.message]}):null,(0,N.jsx)(bu,{name:`idCode`,label:Pi(r,o?.profileName)||void 0,value:Lf(t.idCode||``),readOnly:!0}),(0,N.jsx)(bu,{label:r(`Form.fullName`)||void 0,value:t.name||``,readOnly:!0}),re.map((e,t)=>(0,N.jsxs)(_u.Row,{columns:`30px 160px auto`,children:[(0,N.jsx)(P,{icon:!0,type:`button`,"aria-label":r(`Edit.deletePhoneNumber`)||`Delete phone number`,style:{fontSize:28,marginTop:35},disabled:re.length<2,onClick:()=>re.length>1&&ae(t),children:(0,N.jsx)(Tu,{fill:[`red`,`white`]})}),(0,N.jsx)(_l,{...D(`communications.${t}.code`),label:r(`Form.countryCode`)||void 0,required:!0,options:Du.map(e=>({label:e,value:e}))}),(0,N.jsx)(bu,{...D(`communications.${t}.number`),label:r(`Form.number`)||void 0,placeholder:r(`Form.numberPlaceholder`)||void 0,required:!0,inputMode:`numeric`})]},e.id)),E(`communications`)&&(0,N.jsx)(`p`,{style:{color:`red`},children:E(`communications`)}),(0,N.jsx)(P,{type:`button`,name:`addPhoneNumber`,filled:!0,onClick:()=>ie({id:null,code:`+45`,number:``}),"data-testid":`AT_AddNumberBtn`,children:r(`Form.addNumber`)}),(0,N.jsx)(bu,{...D(`email.value`),label:r(`Form.email`)||void 0,placeholder:r(`Form.emailPlaceholder`)||void 0,required:!!p.length}),(0,N.jsx)(bl,{...D(`digitalMailboxConsent`),label:r(`Form.digitalMailboxConsent`)||void 0}),!se&&(0,N.jsxs)(`div`,{className:ue?Lu.referralInfoContainer:``,children:[(0,N.jsx)(_l,{...D(`referralInfo.type`),label:r(`Form.foundUsAt`)||void 0,options:Iu.map(e=>({label:r(`ReferralTypes.${e}`),value:e}))}),ue&&(0,N.jsx)(bu,{...D(`referralInfo.text`),label:r(`Form.foundUsAtSpecify`)||void 0,placeholder:(oe===X.Other?r(`Form.foundUsAtSpecifyPlaceholder.other`):r(`Form.foundUsAtSpecifyPlaceholder.otherDentist`))||void 0,maxLength:255})]}),se?(0,N.jsxs)(hu,{label:r(`Edit.addressInformation`)||void 0,name:`addressInfo`,children:[(0,N.jsx)(bu,{...D(`addressInfo.address`),placeholder:r(`Form.addressPlaceholder`)||void 0,label:r(`Form.address`)||void 0,required:!!h.addressInfo.address,error:E(`addressInfo.address`)}),(0,N.jsxs)(_u.Row,{columns:`3fr 11fr`,children:[(0,N.jsx)(_l,{...pe,label:r(`Form.postalCode`)||void 0,placeholder:r(`Form.postalCodePlaceholder`)||void 0,options:l.map(e=>({label:e,value:e})),required:!!h.addressInfo.postalCode,error:E(`addressInfo.postalCode`)}),(0,N.jsx)(bu,{...D(`addressInfo.city`),label:r(`Form.city`)||void 0,placeholder:r(`Form.cityPlaceholder`)||void 0,required:!!h.addressInfo.city,error:E(`addressInfo.city`)})]}),c&&(0,N.jsx)(_l,{...D(`addressInfo.district`),placeholder:r(`Form.districtPlaceholder`)||void 0,label:r(`Form.district`)||void 0,options:c.municipalities.map(e=>({label:`${e.districtName} (${e.region})`,value:e.district})),value:de,required:!!h.addressInfo.district,error:E(`addressInfo.district`)})]}
2):null,se&&(0,N.jsxs)(hu,{label:r(`Form.danmarkMembership`)||void 0,name:`danmark`,children:[(0,N.jsx)(_l,{...D(`danmarkInsurance.group`),label:r(`Form.danmark`)||void 0,placeholder:r(`Form.danmarkPlaceholder`)||void 0,options:Object.keys(Pu).filter(e=>e!==`NotAsked`).map(e=>({label:r(`DanmarkInsurance.group.${e}`),value:e}))}),(0,N.jsx)(_l,{...D(`danmarkInsurance.condition`),label:r(`Form.membershipState`)||void 0,placeholder:r(`Form.membershipStatePlaceholder`)||void 0,disabled:!ce||ce===Pu.Asked||ce===Pu.NotAsked,options:Object.keys(Fu).map(e=>({label:r(`DanmarkInsurance.condition.${e}`),value:e}))})]}),(0,N.jsx)(`div`,{className:Lu.buttonContainer,children:(0,N.jsx)(P,{name:`${le.toLowerCase()}PatientBtn`,type:`submit`,onClick:e=>{e.preventDefault(),(!e.detail||e.detail===1)&&ee(e=>O(e))()},filled:!0,fixed:!0,disabled:ne.isPending||T.isPending,"data-testid":`AT_${le}PatientBtn`,children:r(`Button.${le.toLocaleLowerCase()}`)})})]})}function Ap(...e){return e.reduce((e,t)=>{if(!t)return e;let[n,r]=Array.isArray(t)?t:[t,{}],i=({children:t})=>(0,N.jsx)(e,{children:(0,N.jsx)(n,{...r,children:t})});return i.displayName=`${n.name??`Component`}Provider`,i},e=>(0,N.jsx)(M.Fragment,{...e}))}function jp({code:e,configKey:t,fallback:n=null,children:r=null}){let{data:i,isError:a}=cc(),o=i?.features?.find(t=>t.code===e),s=t===void 0||!!o?.configuration?.[t];return(0,M.useMemo)(()=>(0,N.jsx)(N.Fragment,{children:!o?.enabled||!s||a?n:r}),[o,s,a,r,n])}function Mp(){return(0,N.jsxs)(`div`,{style:{padding:`24px`},"aria-hidden":!0,children:[(0,N.jsx)(U.Box,{className:Ru.subheader,height:70,color:`#4d5677`,radius:10,shadow:!0}),(0,N.jsxs)(`div`,{className:Ru.row,children:[(0,N.jsx)(U.Box,{width:`47%`,height:90,color:`white`,radius:10,shadow:!0}),(0,N.jsx)(U.Box,{width:`47%`,height:90,color:`white`,radius:10,shadow:!0})]})]})}function Np({h1:e,h2:t,h3:n,h1Styles:r,children:i}){return(0,N.jsxs)(`div`,{className:zu.root,children:[(0,N.jsx)(`h1`,{className:zu.h1,style:r,children:e}),t&&(0,N.jsx)(`h2`,{className:zu.h2,children:t}),n&&(0,N.jsx)(`h3`,{className:zu.h3,children:n}),i]})}function Pp(){let{t:e}=_(),t=H();return(0,N.jsx)(Np,{h1:e(`AuthFailed.title`),h3:e(`AuthFailed.message`),h1Styles:{textTransform:`uppercase`,fontSize:`35px`},children:(0,N.jsx)(P,{onClick:()=>t(`/${Z().tenant}/`),filled:!0,children:e(`AuthFailed.retry`)})})}function Fp(){let{t:e}=_(),{tenant:t}=Z();return(0,N.jsx)(Np,{h1:e(`Error.header`),h2:e(`Error.title`),h3:e(`Error.defaultMessage`),children:t?(0,N.jsx)(P,{onClick:()=>{window.location.href=`${R.ROOT_URL}/${t}${window.location.search}`},filled:!0,children:e(`Error.home`)}):null})}function Ip(){let{t:e}=_(),t=(0,M.useRef)(null),[n,r]=(0,M.useState)(!0);if((0,M.useLayoutEffect)(()=>{localStorage.removeItem(hs)},[]),(0,M.useLayoutEffect)(()=>{if(gs)return;let e=Vu();window.location.href=Bu(e).toString()},[]),!gs)return null;let i=async()=>{try{if(`requestStorageAccess`in document&&await document.requestStorageAccess(),!t.current||t.current.closed){let e=Bu(`${R.ROOT_URL}/close.html`);t.current=qd(e.toString(),()=>{window.location.href=Vu()})}t.current?.focus()}catch{r(!1)}};return n?(0,N.jsx)(`section`,{className:Hu.page,children:(0,N.jsxs)(`button`,{className:Hu.button,onClick:i,children:[(0,N.jsxs)(`span`,{children:[e(`Login.via`),` `]}),(0,N.jsxs)(`svg`,{viewBox:`0 0 216 56`,width:`86px`,height:`22px`,xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,children:[(0,N.jsx)(`title`,{children:`MitID`}),(0,N.jsx)(`path`,{fill:`#FFF`,d:`M95.9 6.7v10.4h8.5v8.5H96v16.7c0 3 1.6 4.4 4.4 4.4a9 9 0 0 0 4.7-1.3v9.4a16 16 0 0 1-7 1.2c-7.9 0-12.8-3.8-12.8-12.3v-18h-6V17h6V6.7H96ZM183.7 1C206.4.9 216 12.9 216 28c0 15.2-9.6 27.2-32.3 27.2h-9.3V1h9.3Zm-40.5 30.5c12.5 0 22.7 7 24.2 23.3v.5H119c1.4-16.7 11.6-23.8 24.3-23.8ZM10.4 2.8l16.2 24.8 16-24.8H53v52.4H42V21.4L26.6 44h-.3L10.9 21.4v33.8H0V2.8h10.4Zm63 14.3v38.1H62.6V17.1h10.8ZM143.2 0c7.4 0 13.4 5.9 13.4 13.2 0 7.2-6 13.1-13.4 13.1s-13.5-5.9-13.5-13.1c0-7.3 6-13.2 13.5-13.2ZM68 0c3.6 0 6.4 2.8 6.4 6.3 0 3.4-2.8 6.2-6.4 6.2a6.3 6.3 0 0 1-6.4-6.2C61.6 2.8 64.5 0 68 0Z`})]})]})}):(0,N.jsx)(`section`,{className:Hu.page,children:(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`p`,{children:e(`Login.storageAccessDenied`)}),(0,N.jsxs)(`button`,{className:Hu.button,onClick:i,children:[(0,N.jsxs)(`span`,{children:[e(`Login.retry`),` `]}
2),(0,N.jsx)(`svg`,{viewBox:`3 3 18 18`,width:`22px`,height:`22px`,xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,fill:`currentColor`,children:(0,N.jsx)(`path`,{d:`M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z`})})]}),(0,N.jsxs)(`a`,{className:Hu.button,href:window.location.toString(),target:`_blank`,rel:`noreferrer`,children:[(0,N.jsxs)(`span`,{children:[e(`Login.newPage`),` `]}),(0,N.jsx)(`svg`,{viewBox:`3 3 18 18`,width:`22px`,height:`22px`,xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,fill:`currentColor`,children:(0,N.jsx)(`path`,{d:`M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z`})})]})]})})}function Lp(){let{t:e}=_(),{tenant:t,path:n}=Z();return(0,N.jsx)(Np,{h1:`404`,h2:e(`NotFound.title`),h3:e(`NotFound.message`),children:t&&n.replace(/\//g,``).length?(0,N.jsx)(P,{onClick:()=>{window.location.href=`${R.ROOT_URL}/${t}${window.location.search}`},filled:!0,children:e(`NotFound.home`)}):null})}function $(e,t){let{auth:n=!0,routePolicy:r=`registered`,fallback:i}=t??{},a=Ap(i!==!1&&[M.Suspense,{fallback:i||Uu}],[Ss,{fallback:Wu}],n&&bs,n&&[Uc,{policy:r}]);return(0,N.jsx)(a,{children:e})}function Rp(){return(0,N.jsx)(jp,{code:Gi,fallback:(0,N.jsx)(Lp,{}),children:(0,N.jsx)(de,{router:Gu})})}function zp(){let{inOverlay:e}=Jd();return e?(0,N.jsx)(`button`,{name:`signout`,style:{position:`absolute`,display:`flex`,top:10,right:10,zIndex:1e3,appearance:`none`,background:`none`,border:`none`,cursor:`pointer`,padding:0,width:`38px`,height:`38px`,fontSize:`38px`},onClick:vs,children:(0,N.jsx)(nl,{})}):null}function Bp(e){let t=({target:t})=>{if(!(t instanceof Element))return;let n=t.closest([`a`,`button`,`input`,`select`,`textarea`,`[data-testid]:not([aria-hidden="true"])`,`[data-transaction]:not([aria-hidden="true"])`].join(`,`));n&&Vp(e,n,t)},n=`click`;return window.addEventListener(n,t,!0),()=>{window.removeEventListener(n,t,!0)}}function Vp(e,t,n){let{transactionName:r,context:i}=Hp(t,n),a=e.startTransaction(`${cs}${r}`,Ku,{managed:!0,canReuse:!0,reuseThreshold:300});a&&i&&a.addContext(i)}function Hp(e,t){let n={tag:e.tagName.toLowerCase(),id:e.getAttribute(`id`),name:e.getAttribute(`name`),title:e.getAttribute(`title`),testid:e.getAttribute(`data-testid`),transaction:e.getAttribute(`data-transaction`),classes:e.getAttribute(`class`),path:Md(t)};return{transactionName:Bd(n.transaction)||n.tag,context:{custom:n}}}function Up(){return(0,N.jsxs)(be,{client:qu,children:[(0,N.jsx)(zp,{}),(0,N.jsx)(Ju,{children:(0,N.jsx)(Rp,{})})]})}return{setters:[function(e){n=e.n,r=e.r},function(e){i=e.n},function(e){a=e.t},function(e){o=e.$,s=e.A,c=e.B,l=e.C,u=e.D,d=e.E,f=e.F,p=e.G,m=e.H,h=e.I,g=e.J,_=e.K,v=e.L,y=e.M,b=e.N,ee=e.O,x=e.P,S=e.Q,te=e.R,C=e.S,w=e.T,T=e.U,ne=e.V,E=e.W,D=e.X,O=e.Y,re=e.Z,ie=e._,ae=e.a,oe=e.at,se=e.b,ce=e.c,le=e.d,ue=e.et,de=e.f,fe=e.g,pe=e.h,me=e.i,he=e.it,ge=e.j,k=e.k,_e=e.l,ve=e.m,ye=e.n,be=e.nt,xe=e.o,Se=e.ot,Ce=e.p,we=e.q,Te=e.r,Ee=e.rt,De=e.s,Oe=e.st,ke=e.t,Ae=e.tt,je=e.u,Me=e.v,A=e.w,Ne=e.x,Pe=e.y,Fe=e.z}],execute:function(){Ie=document.createElement(`style`),Ie.textContent=`/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 3html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{margin:.67em 0;font-size:2em}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:100%;line-height:1.15}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner{border-style:none;padding:0}[type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]::-moz-focus-inner{border-style:none;padding:0}[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring{outline:1px dotted buttontext}[type=button]:-moz-focusring{outline:1px dotted buttontext}[type=reset]:-moz-focusring{outline:1px dotted buttontext}[type=submit]:-moz-focusring{outline:1px dotted buttontext}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;white-space:normal;max-width:100%;padding:0;display:table}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button{height:auto}[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
3details{display:block}summary{display:list-item}template,[hidden]{display:none}@font-face{font-family:Titillium Web;font-weight:300;src:local(Titillium Web),url(`+new URL(`TitilliumWeb-Light.ttf`,t.meta.url).href+`)format("truetype")}@font-face{font-family:Titillium Web;font-weight:300;font-style:italic;src:local(Titillium Web),url(`+new URL(`TitilliumWeb-LightItalic.ttf`,t.meta.url).href+`)format("truetype")}@font-face{font-family:Titillium Web;font-weight:400;src:local(Titillium Web),url(`+new URL(`TitilliumWeb-Regular.ttf`,t.meta.url).href+`)format("truetype")}@font-face{font-family:Titillium Web;font-weight:600;src:local(Titillium Web),url(`+new URL(`TitilliumWeb-SemiBold.ttf`,t.meta.url).href+`)format("truetype")}*,:before,:after{box-sizing:border-box}html,button,input,optgroup,select,textarea{line-height:1.5}:root{color:#213547;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;background-color:#f9f9fa;font-family:Titillium Web,Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}a{color:#646cff;text-decoration:inherit;font-weight:500}a:hover{color:#535bf2}html,body{min-height:-webkit-fill-available}body{justify-content:center;place-items:center;width:100%;min-width:320px;min-height:100%;margin:0;display:flex}h1{font-size:3.2em;line-height:1.1}button{font-family:inherit}button:hover{border-color:#646cff}button:focus-visible{outline:4px auto -webkit-focus-ring-color}#root{width:100%;max-width:1280px;min-height:100%}#toast{box-sizing:border-box;z-index:999998;flex-direction:column;justify-content:flex-start;align-items:flex-start;width:40%;max-width:550px;margin:0 auto;display:flex;position:fixed;bottom:16px;left:0;right:0}@media (max-width:650px){#toast{width:100%;bottom:0;left:0}} 4/*$vite$:1*/`,document.head.appendChild(Ie),j=`[@nexta/api]`,Le=class extends Error{constructor(e,t,n,r){super(e),this.config=t,this.data=n,this.cause=r,this.name=`ApiValidationError`}},Re=/:([a-zA-Z_][a-zA-Z0-9_]*)/g,ze=class{constructor(e,t){this.plugins=[],this.key=`${e}-${t}`}indexOf(e){return this.plugins.findIndex(t=>t?.name===e)}use(e){if(e.name){let t=this.indexOf(e.name);if(t!==-1)return this.plugins[t]=e,{key:this.key,value:t}}return this.plugins.push(e),{key:this.key,value:this.plugins.length-1}}eject(e){if(typeof e==`string`){let t=this.indexOf(e);if(t===-1)throw Error(`${j} Plugin with name '${e}' not found`);this.plugins[t]=void 0;return}if(e.key!==this.key)throw Error(`${j} Plugin with key '${e.key}' is not registered for endpoint '${this.key}'`);this.plugins[e.value]=void 0}async interceptRequest(e,t){let n=t;for(let t of this.plugins)t?.request&&(n=await t.request(e,n));return n}interceptResponse(e,t,n){let r=n;for(let n=this.plugins.length-1;n>=0;--n){let{response:i,error:a}=this.plugins[n]??{};(i||a)&&(r=r.then(i?n=>i(e,t,n):void 0,a?n=>a(e,t,n):void 0))}return r}},Be={name:`form-data`,request:async(e,t)=>{if(typeof t.data!=`object`||Array.isArray(t.data))throw new Le(`${j} multipart/form-data body must be an object`,t);let n=new FormData;return Object.entries(t.data).forEach(([e,t])=>n.append(e,t)),{...t,data:n}}},Ve={name:`form-url`,request:async(e,t)=>{if(typeof t.data!=`object`||Array.isArray(t.data))throw new Le(`${j} application/x-www-form-urlencoded body must be an object`,t);return{...t,data:new URLSearchParams(t.data).toString(),headers:{...t.headers,"Content-Type":`application/x-www-form-urlencoded`}}}},He=`zod-validation`,Ue=[`post`,`put`,`patch`,`delete`],We=class{constructor(e,t,n){this.sharedPlugins=new ze(`any`,`any`),this.endpointPlugins=new Map;let r,i;if(!e)throw Error(Array.isArray(t)?`${j} missing base url`:`${j} missing api description`);if(typeof e==`string`&&Array.isArray(t))r=e,this.api=t,i=n;else if(Array.isArray(e))this.api=e,i=t;else throw Error(`${j} api must be an array`);dd(this.api),this.options={validate:!0,transform:!0,sendDefaults:!1,...i},this.axiosInstance=this.options.axiosInstance??S.create({...this.options.axiosConfig}),r&&(this.axiosInstance.defaults.baseURL=r),this.injectAliasEndpoints(),this.initPlugins(),(sd(this.options.validate)||od(this.options.validate))&&this.use(ud(this.options))}
4initPlugins(){this.api.forEach(e=>{let t=new ze(e.method,e.path);switch(e.requestFormat){case`binary`:t.use(ad(`Content-Type`,`application/octet-stream`));break;case`form-data`:t.use(Be);break;case`form-url`:t.use(Ve);break;case`text`:t.use(ad(`Content-Type`,`text/plain`))}this.endpointPlugins.set(`${e.method}-${e.path}`,t)})}findEndpointPlugins(e,t){return this.endpointPlugins.get(`${e}-${t}`)}get baseURL(){return this.axiosInstance.defaults.baseURL}get axios(){return this.axiosInstance}use(...e){if(e.length===1)return this.sharedPlugins.use(e[0]);if(e.length===2){let[t,n]=e,r=rd(this.api,t),i=r&&this.findEndpointPlugins(r.method,r.path);if(!i)throw Error(`${j} No alias '${t}' found to register plugin`);return i.use(n)}let[t,n,r]=e,i=this.findEndpointPlugins(t,n);if(!i)throw Error(`${j} No endpoint '${t} ${n}' found to register plugin`);return i.use(r)}eject(e){if(typeof e==`string`){this.sharedPlugins.eject(e);return}if(e.key===this.sharedPlugins.key){this.sharedPlugins.eject(e);return}this.endpointPlugins.get(e.key)?.eject(e)}injectAliasEndpoints(){let e=this;this.api.forEach(t=>{let{alias:n,method:r,path:i}=t;n&&(pd(r)?e[n]=(e,t)=>this.request({...t,method:r,url:i,data:e}):e[n]=e=>this.request({...e,method:r,url:i}))})}async request(e){let t=e,n=this.findEndpointPlugins(t.method,t.url);t=await this.sharedPlugins.interceptRequest(this.api,t),n&&(t=await n.interceptRequest(this.api,t));let r=this.axiosInstance.request({...Zu(t,[`params`,`queries`]),url:ed(t),params:t.queries});return n&&(r=n.interceptResponse(this.api,t,r)),r=this.sharedPlugins.interceptResponse(this.api,t,r),(await r).data}async get(e,...[t]){return this.request({...t,method:`get`,url:e})}async post(e,t,...[n]){return this.request({...n,method:`post`,url:e,data:t})}async put(e,t,...[n]){return this.request({...n,method:`put`,url:e,data:t})}async patch(e,t,...[n]){return this.request({...n,method:`patch`,url:e,data:t})}async delete(e,t,...[n]){return this.request({...n,method:`delete`,url:e,data:t})}},Ge=We,Ke=[`params`,`queries`],qe=class{constructor(e,t){this.apiName=e,this.client=t,this.injectAliasEndpoints()}get axios(){return this.client.axios}injectAliasEndpoints(){let e=this;this.client.api.forEach(({alias:t,method:n,path:r})=>{t&&(pd(n)?e[`use${$u(t)}`]=(e,t)=>this.useMutation(n,r,e,t):(e[`use${$u(t)}`]=(e,t)=>this.useQuery(r,e,t),e[`useSuspense${$u(t)}`]=(e,t)=>this.useSuspenseQuery(r,e,t)))})}key(e,t){return t?[{api:this.apiName,path:e},Qu(t,Ke)]:[{api:this.apiName,path:e}]}getKeyByPath(e,t,n){let r=id(this.client.api,e,t);if(!r)throw Error(`${j} No endpoint found for path '${e} ${t}'`);return this.key(r.path,n)}getKeyByAlias(e,t){let n=rd(this.client.api,e);if(!n)throw Error(`${j} No endpoint found for alias '${e}'`);return this.key(n.path,t)}useQuery(e,...[t,n]){let r=this.key(e,t),i=Ee(),a=Ae({...n,queryKey:r,queryFn:()=>this.client.get(e,t)});return Object.assign(a,{invalidate:()=>i.invalidateQueries({queryKey:r}),key:r})}useSuspenseQuery(e,...[t,n]){let r=this.key(e,t),i=Ee(),a=md({...n,queryKey:r,queryFn:()=>this.client.get(e,t)});return Object.assign(a,{invalidate:()=>i.invalidateQueries({queryKey:r}),key:r})}useInfiniteQuery(e,...[t,n]){let r=t,i=Qu(r,Ke);if(n){let e=n.getPageParamList();i.params&&(i.params=Zu(i.params,e)),i.queries&&(i.queries=Zu(i.queries,e))}let a=[{api:this.apiName,path:e},i],s=Ee();return{invalidate:()=>s.invalidateQueries({queryKey:a}),key:a,...o({...n,queryKey:a,queryFn:({pageParam:t})=>this.client.get(e,{...r,queries:{...r?.queries,...t?.queries},params:{...r?.params,...t?.params}})})}}useMutation(e,t,...[n,r]){return ue({...r,mutationFn:r=>this.client.request({...n,method:e,url:t,data:r})})}},Je=qe,Ye=oe(),M=r(Oe(),1),N=E(),P=({icon:e,filled:t,fixed:n,className:r,...i})=>{let a=(0,N.jsx)(`button`,{className:D(Xe.container,{[Xe.icon]:e,[Xe.filled]:t,[Xe.transparent]:!t&&!e,[Xe.disabled]:i.disabled,[Xe.fixed]:n},r),...i});return n?(0,N.jsx)(`div`,{className:Xe.fixedContainer,children:a}):a},Xe={container:O` 5 display: inline-flex; 6 font-weight: 600; 7 border-radius: 4px; 8 padding: 6px 22px; 9 border: none; 10 justify-content: center; 11 min-width: max-content; 12 max-width: 160px; 13 cursor: pointer; 14 `,icon:O` 15 background: none; 16 padding: 0; 17 `,filled:O` 18 background-color: #4d5677; 19 color: #ffffff; 20 border: none; 21 :hover, 22 :focus-visible { 23 background-color: #4d5677cc; 24 border: none; 25 } 26 `,transparent:O` 27 background-color: transparent; 28 color: #000; 29 box-shadow: inset 0 0 0 1px #dad9d9; 30 :hover, 31 :focus-visible { 32 background-color: rgba(77, 86, 119, 0.85); 33 box-shadow: none; 34 color: #ffffff; 35 } 36 `,disabled:O` 37 opacity: 0.5; 38 pointer-events: none; 39 `,fixed:O` 40 display: flex; 41 width: 100%; 42 @media (max-width: 650px) { 43 max-width: 100%; 44 width: 100% !important; 45 } 46 `,fixedContainer:O` 47 display: flex; 48 justify-content: center;
49 align-items: center; 50 width: 100%; 51 @media (max-width: 650px) { 52 position: fixed; 53 bottom: 74px; 54 left: 0; 55 padding: 10px 15px; 56 background-color: #dad9d9; 57 } 58 `},Ze=r(Se(),1),Qe=({active:e,onDeactivate:t,children:n,className:r,focusOnFirstElement:i=!0})=>{let a=(0,M.useRef)(null);return(0,M.useEffect)(()=>{if(e){let e=a.current?.querySelectorAll(`a[href], button:not([disabled]), textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select`),n=e[0],r=e[e.length-1],o=e=>{e.key===`Tab`?e.shiftKey?document.activeElement===n&&(e.preventDefault(),r.focus()):document.activeElement===r&&(e.preventDefault(),n.focus()):e.key===`Escape`&&t?.()};return document.addEventListener(`keydown`,o),(i?n:r).focus(),()=>{document.removeEventListener(`keydown`,o)}}},[e,t,i]),(0,N.jsx)(`div`,{ref:a,tabIndex:-1,className:r,children:n})},$e=M.memo(hd),et=({children:e})=>(0,N.jsx)(`div`,{className:D(`modal-body`,tt.container),children:e}),tt={container:O` 59 padding: 0 1rem; 60 `},nt=({children:e})=>(0,N.jsx)(`div`,{className:D(`modal-footer`,rt.container),children:e}),rt={container:O` 61 padding: 1em; 62 display: flex; 63 justify-content: end; 64 gap: 1em; 65 @media (max-width: 650px) { 66 flex-direction: column; 67 gap: 0.5em; 68 } 69 `},it=({children:e})=>(0,N.jsx)(`h2`,{className:D(`modal-header`,at.container),children:e}),at={container:O` 70 display: flex; 71 justify-content: space-between; 72 align-items: center; 73 padding: 0 1rem; 74 font-weight: 600; 75 `},ot=({isOpen:e,onClose:t,children:n,blocking:r=!1,hideCloseButton:i=!1,classes:a})=>{let o=(0,N.jsxs)(`div`,{className:D(`modal`,r&&`blocking`,ct.container,a?.modal),role:`dialog`,"aria-modal":`true`,children:[(0,N.jsx)(`div`,{role:`button`,tabIndex:-1,className:D(`modal-overlay`,ct.modalOverlay),onClick:r?()=>{}:t,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())}}),(0,N.jsx)(Qe,{active:e,onDeactivate:t,focusOnFirstElement:!1,className:ct.focusTrap,children:(0,N.jsxs)(`div`,{className:D(`modal-content`,ct.modalContent),children:[!i&&(0,N.jsx)(`button`,{className:ct.closeButton,onClick:t,children:(0,N.jsx)($e,{width:`15px`,height:`15px`})}),n]})})]});return e?Ze.createPortal(o,document.body):null},st=Object.assign(ot,{Header:it,Body:et,Footer:nt}),ct={container:O` 76 position: fixed; 77 z-index: 1000; 78 display: flex; 79 align-items: center; 80 justify-content: center; 81 max-width: 32em; 82 margin: 1em; 83 font-weight: 100; 84 min-width: 35%; 85 top: 20vh; 86 `,modalOverlay:O` 87 position: fixed; 88 top: 0; 89 left: 0; 90 z-index: -1; 91 width: 100vw; 92 height: 100vh; 93 background-color: #000; 94 opacity: 0.5; 95 `,modalContent:O` 96 display: inline-block; 97 white-space: pre-wrap; 98 padding: 0 0.2em; 99 background-color: #fff; 100 border-radius: 1em; 101 width: 100%; 102 position: relative; 103 `,focusTrap:O` 104 width: 100%; 105 `,closeButton:O` 106 display: flex; 107 justify-content: center; 108 align-items: center; 109 position: absolute; 110 color: gray; 111 right: 10px; 112 top: 10px; 113 background-color: transparent; 114 border: none; 115 width: 16px; 116 height: 16px; 117 padding: 0; 118 cursor: pointer; 119 `},lt=({isOpen:e,title:t,message:n,cancelButtonText:r,confirmButtonText:i,onConfirm:a,onCancel:o,onClose:s,hideCloseButton:c})=>{let{t:l}=_(),u=typeof n==`function`?n():n;return(0,N.jsxs)(st,{isOpen:e,onClose:s||o,blocking:!0,hideCloseButton:c,children:[(0,N.jsx)(st.Header,{children:t}),(0,N.jsx)(st.Body,{children:u}),(0,N.jsxs)(st.Footer,{children:[o&&(0,N.jsx)(P,{filled:!1,onClick:o,name:`confirmationModal${r??`Cancel`}`,"data-testid":`AT_ModalCancel`,className:ut.cancel,children:r||l(`Button.no`)}),a&&(0,N.jsx)(P,{filled:!0,onClick:a,name:`confirmationModal${i??`Confirm`}`,"data-testid":`AT_ModalConfirm`,className:ut.confirm,children:i||l(`Button.yes`)})]})]})},ut={confirm:O` 120 @media (max-width: 650px) { 121 order: 1; 122 max-width: 100%; 123 } 124 `,cancel:O` 125 @media (max-width: 650px) { 126 order: 2; 127 max-width: 100%; 128 } 129 `},dt=(0,M.createContext)(null),ft=({children:e})=>{let[t,n]=(0,M.useState)(null),[r,i]=(0,M.useState)(!1),a=(0,M.useCallback)(e=>{n(e),i(!0)},[i]),o=()=>{t?.onConfirm?.(),i(!1)},s=()=>{t?.onCancel?.(),i(!1)},c=()=>{t?.onClose?.(),i(!1)},l=(0,M.useMemo)(()=>({show:a}
129),[a]);return(0,N.jsxs)(dt.Provider,{value:l,children:[(0,N.jsx)(lt,{...t,title:t?.title||``,onCancel:s,onConfirm:o,onClose:c,isOpen:r}),e]})},pt=r(T(),1),mt=r(m(),1),ht=r(ne(),1),gt=r(c(),1),_t=r(Fe(),1),pt.default.extend(mt.default),pt.default.extend(ht.default),pt.default.extend(gt.default),pt.default.extend(_t.default),F=pt.default,vt=new Map,yt=(e,t)=>{let n=vt.get(e);if(n)return n;let r={state:`pending`,value:null,error:null,suspense:t.then(e=>{r.state=`resolved`,r.value=e},e=>{r.state=`rejected`,r.error=e})};return vt.set(e,r),r},I=A([`Warning`,`Block`]),bt=A(`None.Afg.Alb.Ata.Dza.Asm.And.Ago.Atg.Aze.Arg.Aus.Aut.Bhs.Bhr.Bgd.Arm.Brb.Bel.Bmu.Btn.Bol.Bih.Bwa.Bvt.Bra.Blz.Iot.Slb.Vgb.Brn.Bgr.Mmr.Bdi.Blr.Khm.Cmr.Can.Cpv.Cym.Caf.Lka.Tcd.Chl.Chn.Twn.Cxr.Cck.Col.Com.Myt.Cog.Cod.Cok.Cri.Hrv.Cub.Cyp.Cze.Ben.Dnk.Dma.Dom.Ecu.Slv.Gnq.Eth.Eri.Est.Fro.Flk.Sgs.Fji.Fin.Ala.Fra.Guf.Pyf.Atf.Dji.Gab.Geo.Gmb.Pse.Deu.Gha.Gib.Kir.Grc.Grl.Grd.Glp.Gum.Gtm.Gin.Guy.Hti.Hmd.VAT.Hnd.Hkg.Hun.Isl.Ind.Idn.Irn.Irq.Irl.Isr.Ita.Civ.Jam.Jpn.Kaz.Jor.Ken.Prk.Kor.Kwt.Kgz.Lao.Lbn.Lso.Lva.Lbr.Lby.Lie.Ltu.Lux.Mac.Mdg.Mwi.Mys.Mdv.Mli.Mlt.Mtq.Mrt.Mus.Mex.Mco.Mng.Mda.Mne.Msr.Mar.Moz.Omn.Nam.Nru.Npl.Nld.Cuw.Abw.Sxm.Bes.Ncl.Vut.Nzl.Nic.Ner.Nga.Niu.Nfk.Nor.Mnp.Umi.Fsm.Mhl.Plw.Pak.Pan.Png.Pry.Per.Phl.Pcn.Pol.Prt.Gnb.Tls.Pri.Qat.Reu.Rou.Rus.Rwa.Blm.Shn.Kna.Aia.Lca.Maf.Spm.Vct.Smr.Stp.Sau.Sen.Srb.Syc.Sle.Sgp.Svk.Vnm.Svn.Som.Zaf.Zwe.Esp.Ssd.Sdn.Esh.Sur.Sjm.Swz.Swe.Che.Syr.Tjk.Tha.Tgo.Tkl.Ton.Tto.Are.Tun.Tur.Tkm.Tca.Tuv.Uga.Ukr.Mkd.Egy.Gbr.Ggy.Jey.Imn.Tza.Usa.Vir.Bfa.Ury.Uzb.Ven.Wlf.Wsm.Yem.Zmb`.split(`.`)),L=b({street:f().nullable(),coAddress:f().nullable(),postalCode:f().nullable(),city:f().nullable(),region:f().nullable(),district:f().nullable(),country:bt.nullable()}),xt=b({street:f().nullable(),coAddress:f().nullable(),postalCode:f().nullable(),city:f().nullable(),region:f().nullable(),regionNumber:y().int(),district:f().nullable(),districtNumber:y().int(),country:bt}),St=A([`None`,`Street`,`City`,`Phone`,`Mail`,`Contact`,`Invoice`,`EAN`,`CRN`]),Ct=A([`RS1`,`RS512`,`RS384`,`RS256`,`ES256K`,`PS512`,`PS384`,`PS256`,`ES512`,`ES384`,`EdDSA`,`ES256`]),wt=A([`Debtor`,`Patient`]),Tt=A([`Letter`,`Mail`,`Mobile`,`Sms`,`LandLine`,`WorkPhone`,`EANNumber`,`WhatsApp`]),Et=b({contactId:k(),contactPoint:f().nullable(),communicationTypeId:Tt,private:u(),sortOrder:y().int()}),Dt=A([`Municipality`,`Insurance`,`School`,`Referer`,`Dentist`,`Doctor`,`RegionAccounting`,`Others`]),Ot=b({debtorId:k(),debtorType:Dt.nullable(),uniqueIdentifier:y().int(),idCode:f().nullable(),name:f().nullable(),companyRegistrationNumber:f().nullable(),address:xt.nullable(),communications:d(Et).nullable()}),b({patientId:k(),entityId:k(),name:f().nullable(),coverage:y().nullable(),convention:u().nullable(),minAmount:y().nullable(),maxAmount:y().nullable(),payerType:wt,isBUTDebtor:u(),alternativePayerInfo:Ot.nullable()}),b({patientUniqueIdentifier:f().nullable(),ssoSignIn:u()}),kt=b({id:k(),initials:f().nullable()}),At=b({changeDate:v({offset:!0}),user:kt.nullable(),state:f().nullable(),startDate:v({offset:!0}).nullable(),duration:y().int(),note:f().nullable(),type:f().nullable(),waitingList:u(),locked:u(),action:f().nullable(),physician:kt.nullable(),recallReminder:d(f()).nullable(),hideOnPatientPortal:u()}),jt=A([`None`,`CancelledByPhysician`,`CancelledByPatient`,`ScheduledByPhysician`,`ScheduledByPatient`,`RescheduledByPhysician`,`RescheduledByPatient`,`MovedToWaitingList`,`MovedToPlanned`,`Deleted`,`NotShow`]),Mt=A([`None`,`Low`,`Medium`,`High`]),Nt=b({priority:Mt.nullable()}),Nt.and(x(f(),h())),Pt=b({id:k(),idCode:f().nullable(),firstName:f().nullable(),lastName:f().nullable()}),b({appointmentId:k(),patient:Pt.nullable(),companyId:k(),lastUpdated:v({offset:!0}),changes:d(At).nullable()}),Ft=A([`NotSpecified`,`Dentist`,`Leader`,`Staff`,`DentistOwner`,`DentalAssistant`,`Receptionist`,`Accountant`,`DentalHygienist`,`DentalHygienistOwner`,`Student`]),It=b({id:k(),initials:f().nullable(),fullName:f().nullable(),employmentType:Ft}),Lt=A([`Active`,`InviteSent`,`InviteFailed`,`Done`,`Arrived`,`NoShow`,`BillReady`,`Late5Minutes`,`Late10Minutes`,`Late15Minutes`,`Late20Minutes`,`LateCancellation`,`CanceledByPatient`,`CanceledByClinic`,`PhysicianLate10Minutes`,`PhysicianLate20Minutes`,`PhysicianLate30Minutes`,`Deleted`,`Recall`,`SMSSent`,`SMSFailed`,`Confirmed`,`EmailSent`,`EmailFailed`,`Reserved`]),Rt=A([`NotSet`,`Male`,`Female`]),zt
129=A([`None`,`Eus`,`Cat`,`Dan`,`Nld`,`Eng`,`Fin`,`Fra`,`Glg`,`Deu`,`Ita`,`Nor`,`Pol`,`Por`,`Rus`,`Spa`,`Swe`,`Ukr`]),Bt=A([`None`,`Mr`,`Mrs`,`Miss`,`Dr`,`Ms`,`Prof`,`Rev`,`Lady`,`Sir`]),Vt=b({personId:k(),firstName:f().nullable(),lastName:f().nullable(),displayName:f().nullable(),prefix:Bt,language:zt,gender:Rt,birthday:v({offset:!0}).nullable(),age:y().int().nullable(),idCode:f().nullable()}),Ht=A([`Done`,`Sms`,`Email`,`WhatsApp`]),Ut=b({appointmentId:k(),patientId:k(),physicianId:k().nullable().optional(),appointmentTypeId:k(),companyId:k().nullable().optional(),start:v({offset:!0}).nullable().optional(),duration:y().int().optional(),note:f().nullable().optional(),waitingList:u().optional(),locked:u().optional(),appointmentState:Lt.optional(),customAppointmentStateId:k().nullable().optional(),patientInfo:Vt.nullable().optional(),physician:It.nullable().optional(),communications:d(Et).nullable().optional(),timestamp:v({offset:!0}).optional(),bookedOnline:u().optional(),recallReminder:d(Ht).nullable().optional(),hideOnPatientPortal:u().optional(),departmentId:k().nullable().optional(),receptionId:k().nullable().optional(),isRecallRelated:u().optional(),scheduledTimestamp:v({offset:!0}).nullable().optional(),priority:Mt.nullable().optional()}),b({items:d(Ut).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),A([`Active`,`Done`,`Arrived`,`NoShow`,`BillReady`,`LateCancellation`,`CanceledByPatient`,`CanceledByClinic`,`PhysicianLate10Minutes`,`PhysicianLate20Minutes`,`PhysicianLate30Minutes`,`Deleted`,`Recall`,`SMSSent`,`Locked`,`WaitingList`,`Planned`,`RecallReminder`]),b({categories:d(f()).nullable()}),Wt=A([`Contacted`,`NoAnswer`]),Gt=b({outcome:Wt,byInitials:f().nullable(),at:v({offset:!0})}),Kt=A([`Scheduled`,`Sent`]),qt=A([`Standard`,`Extra`,`ConfirmationLink`]),Jt=b({type:qt,state:Kt,manual:u(),at:v({offset:!0})}),Yt=A([`High`,`Elevated`]),Xt=b({appointmentId:k(),start:v({offset:!0}).nullable(),durationMinutes:y().int(),band:Yt,reasons:d(f()).nullable(),patientId:k().nullable(),patientFullName:f().nullable(),appointmentTypeName:f().nullable(),appointmentTypeId:k().nullable(),physicianId:k().nullable(),physicianName:f().nullable(),physicianInitials:f().nullable(),canReceiveReminder:u(),reminders:d(Jt).nullable(),noReminderPreferences:u(),contactAttempts:d(Gt).nullable()}),b({items:d(Xt).nullable()}),b({enabled:u(),tier:f().nullable(),actionType:f().nullable(),leadDays:y().int()}),Zt=A([`none`,`indirect`,`direct`]),Qt=b({"example.extension":h(),appid:f().nullable(),authnSel:d(f()).nullable(),exts:u().nullable(),uvm:u().nullable()}),$t=A([`platform`,`cross-platform`]),en=A([`required`,`preferred`,`discouraged`]),tn=b({authenticatorAttachment:$t.nullable(),requireResidentKey:u(),userVerification:en}),nn=A([`usb`,`nfc`,`ble`,`internal`]),b({id:k(),debtorType:Dt,name:f().nullable(),uniqueIdentifier:y().int()}),rn=A([`Completed`,`Failed`]),b({idCodeLookupId:k().nullable(),patientId:k().nullable(),created:v({offset:!0}),requestedBy:f().nullable(),status:rn}),b({id:k().nullable(),note:f().nullable(),date:f(),version:y().int().nullable()}),b({id:k(),note:f().nullable(),date:f(),version:y().int()}),an=b({teeth:y().int(),canals:y().int()}),b({createPlannedWhenCanceledByPatient:u(),createPlannedWhenCanceledByClinic:u()}),b({id:k(),title:f().nullable(),receptionId:k(),departmentId:k(),duration:y().int()}),on=b({id:k().nullable(),name:f().nullable(),dates:d(f()).nullable(),timeSlots:x(f(),y().int()).nullable(),modifiedAt:v({offset:!0}).nullable()}),sn=A([`Examination`,`DentalHygienist`,`Treatment`,`EmergencyTreatment`,`Other`]),b({currentPassword:f().nullable(),newPassword:f().nullable()}),b({welcomeTemplate:f().nullable(),descriptionTemplate:f().nullable(),color:f().nullable(),liveBackground:u()}),b({welcomeTemplate:f().nullable(),descriptionTemplate:f().nullable(),color:f().nullable(),liveBackground:u()}),cn=b({city:f().nullable(),postalCode:y().int(),districtCode:f().nullable(),districtName:f().nullable(),regionName:f().nullable()}),ln=b({message:f(),details:d(f()).nullable()}),b({correlationId:k(),state:f(),reason:ln.nullable()}),un=A([`SMS`,`Email`,`Economic`,`DanmarkReporting`,`RegionReporting`,`MunicipalityReporting`,`SSNLookup`,`EDI`,`WhatsApp`]),b({overviewJournalCodes:d(k()).nullable(),enableOutgoingCommunication:u(),enableOutgoingCommunicationFeatures:d(un).nullable(),phoneUsedForSms:u(),defaultTreatmentPlanTemplateId:k().nullable(),defaultTreatmentPlanTemplateIdTranslations:b({None:k(),Eus:k(),Cat:k(),Dan:k(),Nld:k(),Eng:k(),Fin:k(),Fra:k(),Glg:k(),Deu:k(),Ita:k(),Nor:k(),Pol:k(),Por:k(),Rus:k(),Spa:k(),Swe:k(),Ukr:k()}).nullable(),defaultStatusRecordPanelTemplateId:k().nullable(),defaultBUTPatientPanelTemplateId:k().nullable(),languages:d(zt).nullable()}),dn=A([`Denmark`,`Global`,`Spain`]),fn=A([`Active`,`Archived`]),b({creationDate:v({offset:!0}),chainId:k().nullable(),clinicId:k(),name:f().nullable(),tenant:f().nullable(),companies:y().int(),locations:y().int(),users:y().int(),patients:y().int(),status:fn,eanReceiver:f().nullable(),profile:dn,phones:d(f()).nullable(),supportAccessEnabledTill:v({offset:!0}).nullable()}),pn=b({clinicId:k(),tenant:f().nullable()}),mn=A([`Unknown`,`PrivateLimitedCompany`,`PublicLimitedCompany`,`EntrepreneurCompany`,`GeneralPartnership`,`LimitedPartnership`,`SoleProprietorship`]),hn=b({companyId:k(),companyType:mn,clinicId:k(),name:f().nullable(),companyRegistrationNumber:f().nullable(),web:f
129().nullable(),email:f().nullable(),creditorNumber:f().nullable(),locationNumber:f().nullable(),ediUsername:f().nullable(),ediPassword:f().nullable()}),b({chainId:k().nullable(),clinicId:k(),name:f().nullable(),status:fn,tenant:f().nullable(),eanReceiver:f().nullable(),profile:dn,companies:d(hn).nullable()}),b({id:k(),collaboratingPartnerType:Dt,companyRegistrationNumber:f().nullable(),name:f().nullable(),note:f().nullable(),contactPersonName:f().nullable(),contactPersonDepartment:f().nullable(),address:xt.nullable(),communications:d(Et).nullable()}),gn=b({communicationTypeId:Tt,contactPoint:f().nullable(),private:u()}),_n=A([`NotAsked`,`Yes`,`No`,`Exempted`]),vn=b({locationId:k().nullable(),street:f().nullable(),coAddress:f().nullable(),city:f().nullable(),postalCode:f().nullable(),district:f().nullable(),country:bt,phoneNumber:f().nullable(),webpageAddress:f().nullable(),region:f().nullable()}),yn=b({companyType:mn,name:f().nullable(),web:f().nullable(),email:f().nullable(),locations:d(vn).nullable(),creditorNumber:f().nullable(),registrationNumber:f().nullable()}),bn=b({locationId:k(),street:f().nullable(),coAddress:f().nullable(),city:f().nullable(),postalCode:f().nullable(),district:f().nullable(),districtNumber:y().int(),country:bt,phoneNumber:f().nullable(),webpageAddress:f().nullable(),region:f().nullable(),regionNumber:y().int()}),b({companyId:k(),clinicId:k(),chainId:k().nullable(),companyName:f().nullable(),chainName:f().nullable(),clinicName:f().nullable(),owner:f().nullable(),locationNumber:f().nullable(),companyRegistrationNumber:f().nullable(),web:f().nullable(),email:f().nullable(),creditorNumber:f().nullable(),locations:d(bn).nullable()}),b({companyId:k()}),xn=b({locationId:k(),locationName:f().nullable()}),b({companyId:k(),companyName:f().nullable(),locations:d(xn).nullable()}),b({companyId:k(),companyType:mn,name:f().nullable(),registrationNumber:f().nullable(),web:f().nullable(),email:f().nullable(),creditorNumber:f().nullable(),locationNumber:f().nullable(),ediUsername:f().nullable(),ediPassword:f().nullable()}),b({companyId:k(),companyType:mn,name:f().nullable(),registrationNumber:f().nullable(),web:f().nullable(),email:f().nullable(),creditorNumber:f().nullable(),locationNumber:f().nullable(),ediUsername:f().nullable(),ediPassword:f().nullable(),locations:d(vn).nullable()}),b({companyId:k(),companyType:mn,clinicId:k(),name:f().nullable(),companyRegistrationNumber:f().nullable(),web:f().nullable(),email:f().nullable(),creditorNumber:f().nullable(),clinic:f().nullable(),chain:f().nullable(),chainId:k().nullable(),locationNumber:f().nullable(),ediUsername:f().nullable(),ediPassword:f().nullable()}),Sn=A([`WithoutAppointment`,`WithAppointment`,`Manual`]),Cn=A([`None`,`Email`,`TextMessage`,`EBoks`,`PatientPortal`,`SnailMail`,`Other`,`WhatsApp`]),wn=A([`AppointmentBooked`,`NotificationSent`,`NoCommunicationSpecified`,`NoFreeTime`,`SMSSendFailed`,`EmailSendFailed`,`RecallWithoutAppointment`,`NotSent`,`NotRecalled`,`WhatsAppMessageFailed`]),b({patientId:k(),idCode:f().nullable(),patientFullName:f().nullable(),expectedRecallDate:v({offset:!0}).nullable(),physicianId:k().nullable(),nextAppointmentDate:v({offset:!0}).nullable(),lastVisitDate:v({offset:!0}).nullable(),recallType:Sn,preferredRecallCommunication:Cn,note:f().nullable(),recallId:k(),recallDate:v({offset:!0}),bookedAppointmentDate:v({offset:!0}).nullable(),bookedAppointmentId:k().nullable(),recallState:wn,confirmed:u(),pushRecallCount:y().int(),confirmedByEmployeeId:k().nullable(),confirmedByEmployeeInitials:f().nullable(),confirmedDate:v({offset:!0}).nullable()}),Tn=A([`NotConfirmed`,`Success`,`AlreadyConfirmed`,`Expired`]),b({status:Tn,language:f().nullable(),clinicName:f().nullable(),start:v({offset:!0})}),En=A([`No`,`Yes`,`Exempt`]),b({contactAttempts:d(Gt).nullable()}),b({patientId:k(),entityId:k(),coverage:y().nullable(),convention:u().nullable(),minAmount:y().nullable(),maxAmount:y().nullable(),isBUTDebtor:u(),payerType:wt}),b({patientId:k(),physicianId:k().nullable().optional(),appointmentTypeId:k(),companyId:k().nullable().optional(),start:v({offset:!0}).nullable().optional(),duration:y().int().optional(),note:f().nullable().optional(),waitingList:u().optional(),locked:u().optional(),forceCreate:u().optional(),recallReminder:d(Ht).nullable().optional(),hideOnPatientPortal:u().optional(),departmentId:k().nullable().optional(),receptionId:k().nullable().optional(),sourceAppointmentId:k().nullable().optional(),priority:Mt.nullable().optional()}),b({description:f().nullable(),backgroundColor:f().nullable(),edgeColor:f().nullable(),duration:y().int(),stdLetter:k().nullable(),category:sn,excemptFromCalculations:u()}),b({collaboratingPartnerType:Dt,companyRegistrationNumber:f().nullable(),name:f().nullable(),note:f().nullable(),communications:d(gn).nullable(),address:L.nullable()}),b({name:f().nullable(),description:f().nullable(),color:f().nullable()}),b({debtorType:Dt,companyRegistrationNumber:f().nullable(),name:f().nullable(),note:f().nullable(),communications:d(gn).nullable(),address:L.nullable()}),Dn=b({companyId:k(),title:f().nullable().optional(),note:f().nullable().optional(),locations:d(k()),companyResponsible:u().optional(),ar
129chived:u().optional(),fmkList:f().nullable().optional()}),On=b({firstName:f().nullable(),lastName:f().nullable(),prefix:Bt,language:zt,gender:Rt,displayName:f().nullable(),birthday:v({offset:!0}).nullable(),idCode:f().nullable()}),b({authorizationId:f().nullable().optional(),specialityId:f().nullable().optional(),initials:f().nullable().optional(),employmentType:Ft,employment:Dn,person:On,address:L,communications:d(gn).nullable().optional(),hasAccess:u().optional(),password:f().nullable().optional(),vendorNumber:f().nullable().optional()}),kn=A([`Various`,`Reception`,`Orthodontist`,`BiteFunctionality`,`Diagnosis`,`Treatments`,`Examination`,`RootTreatment`,`Surgical`,`Anesthesia`,`XRays`,`Images`,`Fillings`,`RemovableProsthetic`,`NonRemovableProsthetic`,`PA`]),An=A([`None`,`SurfaceRelated`,`CanalRelated`]),jn=A(`ExtraTooth.Aplasia.Extracted.NotErupted.SemiErupted.RetainedTooth.SemiRetainedTooth.Erupted.Implant.NotWorthPreserving.RootLeftBehind.CariesTotalis.Sealant.Inlay.Crown.Onlay.FoodImpact.Jewelry.Icing.DrySocket.Missing.Retainer.Bridge.ExtensionJoint.Denture.DefectFillingTreatment.DefectFilling.ToothFracture.Infraction.Usur.WearTreatment.Wear.Caries.InactiveCaries.Filling.Trauma.RootFilling.Hemisektion.Post.RootTipInflammation.Apicoetomy.BridgePellet.Reset.PrimaryAplasia.ActiveCariesTreatmentRequiredWithCavity.ActiveCariesTreatmentRequiredWithoutCavity.InactiveCariesTreatmentNotRequiredWithCavity.InactiveCariesTreatmentNotRequiredWithoutCavity.Note.PrimaryErupted.PrimarySemiErupted.PrimaryNotErupted.PermanentDentition.PrimaryDentition.NoDentition.NoGraphics`.split(`.`)),b({title:f().nullable(),category:kn,requiresAnamnesis:u(),updatesRecall:u(),onceOnTooth:u(),onceInDay:u(),toothRelated:u(),toothRelation:An.nullable(),canBeUsedWithoutTooth:u(),deepCleaning:u(),removeGraphic:u(),productIds:d(k()).nullable(),graphic:jn.nullable(),graphicColor:f().nullable(),graphicTitle:f().nullable(),templatePanelIds:d(k()).nullable()}),Mn=A([`Email`,`Sms`,`Eboks`,`Whatsapp`]),Nn=A([`General`,`RecallReminderWithAppointment`,`RecallWithoutAppointment`,`AppointmentReminder`,`Feedback`,`PhysicianLate`]),b({name:f().nullable(),template:f().nullable(),channel:Mn,type:Nn}),Pn=A([`Open`,`Close`]),b({employeeIds:d(k()),startDate:f(),endDate:f(),start:f().nullable().optional(),end:f().nullable().optional(),type:Pn}),b({id:k(),overlapsWithAppointment:u()}),Fn=A([`New`,`MoreThan5Years`,`Waiting`]),In=A([`NotAsked`,`Asked`,`Group1`,`Group2`,`Group5`,`Basis`]),Ln=b({group:In,condition:Fn}),Rn=A([`Active`,`Archived`]),zn=A([`Active_No`,`Active_Yes_WithoutAppointment`,`Active_Yes_WithAppointment`]),Bn=A([`Other`,`Facebook`,`Google`,`NewsPaper`,`BusAdd`,`WordOfMouth`,`OtherDentist`,`Instagram`]),Vn=b({type:Bn,text:f().nullable()}),Hn=b({name:f().nullable(),relation:f().nullable(),position:f().nullable(),phone:f().nullable(),mail:f().nullable(),idCode:f().nullable(),address:L.nullable(),isPayer:u()}),b({healthInsuranceGroup:y().int(),primaryLocationId:k(),owningCompanyId:k(),mainPhysicianId:k().nullable().optional(),journalNumber:y().int().optional(),person:On,note:f().nullable().optional(),preferredRecallCommunication:d(Cn).nullable().optional(),recallActive:zn.optional(),status:Rn.optional(),riskProfile:f().nullable().optional(),secondaryContacts:d(Hn).nullable().optional(),address:L.nullable().optional(),communications:d(gn).nullable().optional(),communicationViaEboks:_n.optional(),referralInfo:Vn.nullable().optional(),danmarkInsurance:Ln.nullable().optional(),ownerId:k().optional(),digitalMailboxConsent:En.nullable().optional()}),Un=A([`OneMonthBefore`,`TwoWeeksBefore`,`OneWeekBefore`,`FortyEightHoursBefore`,`TwentyFourHoursBefore`,`FourHoursBefore`,`TwoHoursBefore`,`OneHourBefore`,`SameMorningAtEight`,`NightBeforeAtEighteen`,`NightBeforeAtTwenty`,`FiveMinutesAfterCreation`]),Wn=b({patientId:k(),reminderType:Cn.optional(),timeType:Un.optional(),text:f().nullable().optional()}),Gn=A([`Even`,`Odd`,`All`]),Kn=A([`All`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`]),qn=b({weekdays:Kn,week:Gn,beginTime:f(),endTime:f()}),b({patientId:k(),preferredTimes:d(qn).nullable().optional()}),Jn=A([`Group0`,`Group1`,`Group2`,`BUT`,`Group100`,`Group125`,`Group150`,`All`]),Yn=b({id:k().nullable().optional(),patientCategory:Jn,patientAmount:y(),insuranceAmount:y().optional(),totalAmount:y().optional(),taxPercentage:y().min(0).max(100).optional(),healthcareCode:f().nullable().optional(),danmarkCode:y().int().nullable().optional()}),b({productCategoryId:k(),journalCodeId:k().nullable().optional(),name:f().min(1),prices:d(Yn).nullable().optional()}),Xn=b({physician:k(),duration:y().int(),tempDuration:y().int(),interval:y().int(),appointmentType:k(),sequenceOrder:y().int(),linkOrder:y().int(),note:f().nullable()}),b({patientId:k(),firstRecallDate:v({offset:!0}),sequence:d(Xn).nullable()}),b({responderId:k(),documentsIds:d(k()).nullable(),employeeSignature:u(),updateAnamnesis:u(),anamnesisResponderFullName:f().nullable()}),b({name:f().min(1),vat:f().nullable().optional(),street:f().nullable().optional(),cityName:f().nullable().optional(),postalCode:f().nullable().optional(),phoneNumber:f().min(1),email:f().min(1)}),Zn=A([`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]),Qn=A([`Weekly`,`Monthly`,`Yearly`]),$n=A([`First`,`Second`,`Third`,`Fourth`,`Last`]),er=b({mode:Qn,foreachX:y().int(),startDate:v({offset:!0}),endDate:v({offset:!0}).nullable(),endAfterXOccurrence:y().int().nullable(),weekModeDays:d(Zn).nullable(),weekOfMonth:$n.nullable()}),tr=b({dateFrom:v({offset:!0}),dateTo:v({offset:!0}),physicianId:k().nullable()}),b({appointmentTypeId:k().nullable(),physicianIds:d(k()).nullable(),title:f().nullable(),color:f().nullable(),start:v({offset:!0}),end:v({offset:!0}),isPrivate:u(),repetition:er.nullable(),filter:tr.nullable()}),nr=A([`Clinic`,`Personal`]),b({securityKeyOptionsId:k(),name:f().nullable(),keyType:nr,id:f().nullable(),rawId:f().nullable(),attestationObject:f().nullable(),clientDataJson:f().nullable(),note:f().nullable()}),rr=b({studentId:k(),timeLimited:u()}),ir=A(`BA1.BA1P1.BA1ENDO1.BA1ONLAY.BA1KOF.BA1PFY1.KA1.KA2.KABU.KABUORTO.VUORTO.SASYL.SENDO.SOPM.SPAEDO.SPARO.SREHAB.SRAD.STMD.SORTO.STMK.STMKVISIT.STMKAMP.STMK8.STMK9.STMK10.SSKADEOGKLAGESAGER.SFORSK.TP1.TP2.TP3.TP3EKS.TPVISITATION.TPPERSONLIG.TPDEPSUB.TPDEPSUPRA.SKTRAD.RAD.SKTOVELSE.ARKIV`.split(`.`)),ar=A([`Pending`,`Assigned`,`Booked`,`Completed`,`Rejected`]),b({patientId:k(),category:ir,departmentId:k(),students:d(rr).nullable(),physicianIds:d(k()).nullable(),status:ar,note:f().max(200).nullable(),deadline:f().nullable()}),b({category:ir,note:f().max(200).nullable(),deadline:f().nullable()}),or=A([`EachDay`,`OnceAWeek`]),b({useRecall:u(),pauseRecall:u(),fromDate:v({offset:!0}).nullable(),toDate:v({offset:!0}).nullable(),whenToRun:or,dayOfWeek:Zn.nullable(),triggerTime:v({offset:!0}).nullable(),weekCount:y().int(),recallsCountBeforeDropout:y().int(),pushInterval:y().int().nullable(),scheduleFromDays:y().int().nullable(),scheduleToDays:y().int().nullable(),primaryPhysicianId:k().nullable(),secondaryPhysicians:d(k()).nullable()}),sr=A([`None`,`DKK`,`USD`,`EUR`]),b({id:k(),danmarkCode:y().int(),name:f().nullable(),group:y().int(),coverageGroup:y().int(),val
129idFrom:v({offset:!0}),validTo:v({offset:!0}),fixedPrice:y().int().nullable(),patientSharePercentage:y().int().nullable(),maxPayoutPerTreatment:y().int().nullable(),maxPayout:y().int().nullable(),ageMin:y().int().nullable(),ageMax:y().int().nullable(),seniorityFrom:y().int().nullable(),seniorityTo:y().int().nullable()}),cr=A([`NotAsked`,`No`,`Yes`]),b({id:k(),debtorType:Dt,companyRegistrationNumber:f().nullable(),name:f().nullable(),note:f().nullable(),contactPersonName:f().nullable(),contactPersonDepartment:f().nullable(),uniqueIdentifier:y().int(),address:xt.nullable(),communications:d(Et).nullable()}),b({textToJournal:f().nullable(),isMistake:u()}),lr=s(()=>b({routineName:f(),totalItems:y().int(),startedAt:v({offset:!0}),updatedAt:v({offset:!0}),processedItems:y().int(),processedBytes:y().int(),itemsPerSecond:y(),bytesPerSecond:y(),subroutines:d(lr).nullable(),duration:f(),progress:y(),completionEstimate:f()})),ur=b({jobId:k().nullable(),submittedAt:v({offset:!0}).nullable(),startedAt:v({offset:!0}).nullable(),completedAt:v({offset:!0}).nullable(),progress:lr.nullable(),reason:ln.nullable()}),b({correlationId:k(),clinicId:k(),clinicName:f(),tenant:f(),state:f(),markedBy:k(),markedByName:f(),markedAt:v({offset:!0}),deletedBy:k().nullable(),deletedByName:f().nullable(),startedAt:v({offset:!0}).nullable(),completedAt:v({offset:!0}).nullable(),reason:ln.nullable(),jobs:x(f(),ur).nullable()}),b({apiKey:f().max(256).nullable()}),dr=b({departmentId:k(),departmentName:f().nullable(),departmentCode:f().nullable(),appointmentTypeId:k().nullable(),receptionId:k().nullable(),physicianId:k().nullable(),bookingWindow:y().int().nullable(),bookingFee:y().nullable(),isAvailableOnPatientPortal:u(),capacities:d(on).nullable()}),fr=A([`Checkin`,`Reception`]),b({id:k(),key:f().nullable(),type:fr,name:f().nullable()}),pr=b({code:f().nullable(),name:f().nullable(),cityPostalCodes:d(cn).nullable()}),b({patientId:k(),idCode:f().nullable(),patientFullName:f().nullable(),expectedRecallDate:v({offset:!0}).nullable(),physicianId:k().nullable(),nextAppointmentDate:v({offset:!0}).nullable(),lastVisitDate:v({offset:!0}).nullable(),recallType:Sn.nullable(),preferredRecallCommunication:Cn,note:f().nullable(),isDead:u(),movedToDropoutDate:v({offset:!0}).nullable(),mainPhysicianId:k().nullable()}),mr=b({companyId:k(),userName:f().nullable(),password:f().nullable()}),b({url:f().nullable()}),hr=b({appointmentTypeId:k(),availableOnPatientPortal:u(),availableForNewPatients:u(),appointmentDuration:y().int()}),gr=A([`None`,`IsCurrentLoggedInUser`,`IsLastAdmin`,`IsMainRecallResponsible`,`HasAppointmentCalendar`,`IsPatientOwner`,`HasRecallSequence`]),b({deleteAllowed:u(),deleteDenyReasons:d(gr).nullable()}),b({employeeId:k(),ediCredentials:d(mr).nullable().optional()}),b({employeeId:k(),ediCredentials:d(mr).nullable()}),_r=b({employmentId:k(),companyId:k(),title:f().nullable(),archived:u(),note:f().nullable(),locations:d(k()).nullable()}),vr=b({id:k(),employmentType:Ft,initials:f().nullable(),fullName:f().nullable(),employments:d(_r).nullable(),userId:k(),uniqueIdentifier:y().int(),vendorNumber:f().nullable(),hasAppointmentCalendar:u(),turnoverAllowed:u(),calendarColor:f().nullable()}),b({items:d(vr).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),b({semesters:d(f()).nullable(),classes:d(f()).nullable()}),yr=b({class:f().min(1),semester:f().min(1)}),b({id:k(),employeeId:k(),class:f().nullable(),semester:f().nullable(),created:v({offset:!0})}),br=b({personId:k(),employeeId:k(),uniqueIdentifier:y().int(),idCode:f().nullable(),firstName:f().nullable(),lastName:f(),name:f(),initials:f().nullable(),authorizationId:f().nullable(),vendorNumber:f().nullable(),address:f().nullable(),postalCode:f().nullable(),city:f().nullable(),phoneNumber:f().nullable(),email:f().nullable(),employmentType:Ft,title:f().nullable(),deleted:u(),hasAppointmentCalendar:u(),turnoverAllowed:u(),profileImage:f().nullable()}),b({items:d(br).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),xr=b({id:k(),initials:f().nullable()}),Sr=b({id:k(),employmentType:Ft,initials:f().nullable()}),b({items:d(Sr).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),Cr=b({employeeId:k(),initials:f().nullable(),fullName:f().nullable(),expiresOn:f().nullable()}),wr=b({employmentId:k(),companyId:k(),title:f().nullable(),archived:u(),fmkList:f().nullable(),note:f().nullable(),locations:d(k()).nullable(),companyResponsible:u()}),b({id:k(),authorizationId:f().nullable(),employmentType:Ft,specialityId:f().nullable(),initials:f().nullable(),employments:d(wr).nullable(),person:Vt.nullable(),address:xt.nullable(),communications:d(Et).nullable(),userId:k(),uniqueIdentifier:y().int(),vendorNumber:f().nullable(),hasAccess:u(),hasPassword:u(),isUsedAsOwner:u().nullable(),isAssignedToPatient:u(),clinicId:k(),hasAppointmentCalendar:u(),deleted:u(),turnoverAllowed:u(),calendarColor:f().nullable(),profileImage:f().nullable()}),Tr=A([`Login`,`ConcurrentUsers`]),b({type:Tr,clinicIds:d(k()).nullable(),from:f(),to:f().nullable()}),Er=b({key:f().nullable(),value:f().nullable()}),Dr=b({start:f(),end:f(),weekday:Kn,week:Gn}
129),Or=b({id:k().nullable().optional(),employeeId:k(),startDate:f(),endDate:f().nullable().optional(),days:d(Dr)}),b({actual:Or.nullable(),upcoming:d(Or).nullable(),outdated:d(Or).nullable()}),kr=A(`InternalServerError.InvalidModelState.MissingWarmupEndpoint.UnknownEndpoint.UserManagementTokenError.InvalidGuid.TooManyRequests.Timeout.ValueNotUniqueAsExpected.ValueInUse.EntityNull.InvalidIdentification.NotActiveCompany.ValueIsNullOrWhiteSpace.InvalidValue.InvalidUrl.ListIsEmpty.EntityNotFound.UnsupportedValue.InvalidCommunicationType.InvalidDebtorType.InvalidEmploymentType.InvalidProductType.InvalidProductCategory.InvalidCompany.InvalidLocation.InvalidEmployee.InvalidRelationGroup.InvalidRelationGroupType.InvalidUserId.InvalidEboksState.InvalidChain.InvalidPatient.InvalidClinic.PrimaryCodeNotFound.ToothValueIsInvalid.PrimaryCodeCategoryNotFound.ProductNotFound.ProductCategoryNotFound.PrimaryCodeInUse.ProductAlreadyWithNameExist.ProductAlreadyWithJournalCodeExist.ProductCategoryHasProducts.EmptyPrimaryCode.LevelWithoutGuid.UserNotAllowedInGlobalSettings.EmployeeNotAllowedInGlobalSettings.ExternalServiceCallFailedException.CertificateNotFound.NotAdminMember.RoleNotFoundInClinic.UserNotFoundInClinic.InvalidPermissionId.NotAllowedOperation.ElasticSearchUriMissing.ElasticSearchUsernameMissing.ElasticSearchPasswordMissing.TemplateNotFound.TemplateChangeNotAllowedByStandard.TemplateChangeNotAllowedByChain.TemplateHasPatients.TemplateDeleteNotAllowedByStandard.TemplateDeleteNotAllowedByChain.AppointmentTypeNotFound.AppointmentTypeDeleteNotAllowed.AppointmentStateCanNotBeChanged.AppointmentNotFound.AppointmentCouldNotBeCreated.AppointmentCanNotBeChanged.AppointmentCouldNotBeRescheduled.DefaultAppointmentTypeChanged.AlternativePayerNotFound.AlternativePayerExpired.PatientNotFound.PatientCouldNotBeArchived.InitialsInvalid.EmployeeNotFound.EmployeeDeleted.DebtorCantCreate.ReservedTimeslotNotFound.ReservedTimeslotDeleteNotAllowed.UserNotFound.FailedToCreateUser.FailedToResetPassword.ClientNotFound.ClientIsAlreadyExist.JournalCodeNotFound.JournalCodeWithNameAlreadyExist.JournalCodeIsUsed.JournalCodeIsUsedInContinuation.PaChartNotFound.CannotDeletePaChart.PatientRecordNotFound.CustomFieldNotFound.CustomFieldsDuplicates.CustomFieldAnswerRequired.CustomFieldOnlyOneAnswer.CustomFieldSupplement.OptionNotFound.OptionDupl
129icates.SupplementIsNotAllowed.SupplementIsRequired.AnamnesisRecordNotFound.AnamnesisRecordCouldNotBeDeleted.JournalCodeOnceOnTooth.JournalCodeOnceADay.MaximumExtraTeeth.DuplicatedTooth.ToothNotFound.StatusRecordCanBeDeletedWithin48Hours.StatusRecordNotFound.LastStatusRecordCanBeDeleted.ConvertedEntryCantBeEdited.StatusConnectedToContinuation.FmkRecordCantBeDeleted.FmkRecordCantBeModified.JournalCodeRemoveGraphic.SameDentition.PrimaryGraphicsNotAllowed.DentalMonitoringApiKeyNotConfigured.DentalMonitoringAuthenticationFailed.DentalMonitoringUnavailable.DentalMonitoringPatientNotAccessible.DentalMonitoringPatientNotLinked.DentalMonitoringPatientAlreadyLinked.DentalMonitoringDoctorNotResolved.RecallIsNotUsed.ScannerNotFound.ScannerFailedConnection.TreatmentPlanNotFound.TreatmentPlanWithNameAlreadyExists.TreatmentNotFound.InvalidTreatmentStatus.TreatmentPlanDeleteDefaultNotAllowed.MediaItemWithNameAlreadyExists.MediaItemNotFound.MediaItemInvalidCaptureDate.SecondOpinionRequestFailed.MediaItemsDownloadInvalidSizeFailed.MediaItemsDownloadNoItemsFailed.DocumentTemplateNotFound.FailedToStoreDocument.FailedToUploadDocument.MediaItemUsedInPatientRecord.MediaItemNotBelongToSourcePatient.InsufficientPrepaid.SubsidyCalculationError.NotCompletedInvoiceTransactions.InvoiceNotFound.InvoiceSeriesNotFound.NoAvailablePrefixesForInvoiceSeries.DefaultInvoiceSeriesCannotBeDeleted.InvoiceSeriesInUseCannotBeDeleted.InvalidPrefix.InvoiceSeriesExists.InvoiceSeriesNumberOutOfRange.NoPayerOrDNI.InvalidSecondaryContact.WebhookNotFound.PaymentNotFound.CashReportNotFound.PdfFileNotFound.CashReportOutdated.InsuranceAccountNotFound.InvalidRepresentationDocument.UnsupportedPaymentMethods.BookingFeeSessionFailed.EPayMerchantNotFound.OnlineRefundFailed.EPayModeNotAllowed.PlanpayTerminalDuplicated.AccountNumberIsNotEnterable.EconomicForbiddenError.ProfileDefinitionNotFound.ProfileSmsAddonDisabled.ProfileEBoksAddonDisabled.ProfileEDIAddonDisabled.ProfileSecondOpinionAddonDisabled.ProfileReferralAddonDisabled.ProfileNotFound.ProfileSSNLookupNotAllowed.ProfileIsNullOrInvalid.ProfilePaymentTerminalAddonDisabled.ProfileScannerAddonDisabled.ProfileSecurityConnectAddonDisabled.ProfilePatientPortalAddonDisabled.ProfilePhoneAddonDisabled.ProfileCheckinAddonDisabled.ProfileImageEditorAddonDisabled.ProfileThreeShapeAddonDisabled.ProfileDocumentEditorAddonDisabled.ProfileReceptionDevicesAddonDisabled.ProfileWhatsAppAddonDisabled.ProfileAppointmentFeedbackAddonDisabled.ProfileTreatmentTasksAddonDisabled.ProfileExternalIdentityProviderAddonDisabled.ProfileDepartmentCalendarAddonDisabled.ProfileEconomicFeatureDisabled.ProfilePublicAuditLogsFeatureDisabled.LayoutFeatureDisabled.ProfilePaymentMethodsFeatureDisabled.ProfilePlanpayOnlineAddonDisabled.ProfilePlanpayAddonDisabled.PatientPortalInvoiceDisabled.ProfileAttendancePredictionFeatureDisabled.ProfileDentalMonitoringAddonDisabled.ProfileIsActive.FailedToEstablishConnectionToEdiPortal.FailedAuthenticationToEdiPortal.PhoneIntegrationTenantNotFound.PhoneIntegrationMessageIncomplete.ClinicNotFound.ClinicNameIsAlreadyUsed.ClinicIsNotActive.ProfileChatAddonDisabled.MatrixRequestFailed.UnableToCreateUniqueKey.CompanyNotFound.DocumentNotFound.DocumentContentNotFound.PdfCreationFailed.DocumentCannotBeSigned.FileNotFound.TemplatePanelNotFound.PatientFeedbackExpired.PatientFeedbackAlreadySubmitted.PatientFeedbackNotFound.TreatmentTaskRequestNotPending.TreatmentTaskRequestLimitReached.TreatmentTaskRequestCategoryMismatch.TreatmentTaskRequestStudentAlreadyAssigned.TreatmentTaskNotAssignable`.split(`.`)),b({errorCode:kr,errorMessage:f().nullable(),innerErrorMessage:f().nullable(),modelState:x(f(),d(f()).nullable()).nullable()}),b({patientId:k(),idCode:f().nullable(),patientFullName:f().nullable(),expectedRecallDate:v({offset:!0}).nullable(),physicianId:k().nullable(),nextAppointmentDate:v({offset:!0}).nullable(),lastVisitDate:v({offset:!0}).nullable(),recallType:Sn,preferredRecallCommunication:Cn,note:f().nullable(),recallId:k(),pushRecallCount:y().int(),originalPatientRecallId:k().nullable(),hasAppointmentInMonitoringInterval:u(),mainPhysicianId:k().nullable(),bookedAppointmentDate:v({offset:!0}).nullable(),bookedAppointmentId:k().nullable()}),b({correlationId:k(),packageId:k(),userId:k(),clinicId:k(),startedAt:v({offset:!0}),completedAt:v({offset:!0}).nullable(),state:f(),reason:ln.nullable(),progress:lr.nullable()}),b({correlationId:k(),packageId:k(),clinicId:k(),tenant:f(),status:f(),reason:f(),startedAt:v({offset:!0}),completedAt:v({offset:!0}).nullable()}),b({correlationId:k(),state:f(),reason:ln.nullable()}
129),Ar=b({name:f().nullable(),id:f().nullable(),displayName:f().nullable()}),jr=b({initials:f().nullable().optional(),person:On.nullable().optional(),address:L,communications:d(gn).nullable().optional(),authorizationId:f().nullable().optional(),employmentType:Ft.optional(),vendorNumber:f().nullable().optional(),specialityId:f().nullable().optional()}),b({baseClinicId:k().nullable().optional(),profile:dn.optional(),clinicName:f().min(1),tenant:f().min(1),company:yn,employee:jr.nullable().optional(),password:f().nullable().optional(),userRoles:d(k()).nullable().optional(),country:bt,language:zt,currency:sr.nullable().optional(),eanReceiver:f().nullable().optional(),identityProviderDefinitionId:k().nullable().optional()}),b({tenant:f().min(1),securityKeyType:nr,securityKeyName:f().min(1),securityKeyNote:f().nullable().optional()}),b({accessToken:f().nullable(),tokenCode:f().nullable()}),b({token:f().nullable()}),b({id:k(),description:f().nullable(),backgroundColor:f().nullable(),edgeColor:f().nullable(),duration:y().int(),stdLetter:k().nullable(),category:sn,excemptFromCalculations:u(),archived:u()}),Mr=b({title:f().nullable(),category:kn,requiresAnamnesis:u(),updatesRecall:u(),onceOnTooth:u(),onceInDay:u(),toothRelated:u(),toothRelation:An.nullable(),canBeUsedWithoutTooth:u(),deepCleaning:u(),removeGraphic:u(),productIds:d(k()).nullable(),graphic:jn.nullable(),graphicColor:f().nullable(),graphicTitle:f().nullable(),id:k(),creationDate:v({offset:!0}),lastModified:v({offset:!0}).nullable(),archived:u(),productLinkDisabled:u(),documentIds:d(k()).nullable()}),b({patientId:k().nullable(),idCode:f().nullable(),firstName:f().nullable(),lastName:f().nullable(),address:f().nullable(),isAlive:u(),postalCode:y().int().nullable(),municipalityCode:y().int().nullable(),hasProtectedAddress:u().nullable()}),Nr=b({teeth:y().int(),surfaces:y().int().nullable(),surfacesNumber:y().int().nullable()}),Pr=A([`None`,`Front`,`Premolar`,`Molar`,`Extra`,`PrimaryFront`,`PrimaryPremolar`]),Fr=b({id:k(),name:f().nullable(),toothRestriction:Pr,surfaceRestrictions:d(Nr).nullable(),canalRestrictions:d(an).nullable(),quantityTeethRule:u(),quantityCanalsRule:u()}),b({title:f().nullable(),category:kn,requiresAnamnesis:u(),updatesRecall:u(),onceOnTooth:u(),onceInDay:u(),toothRelated:u(),toothRelation:An.nullable(),canBeUsedWithoutTooth:u(),deepCleaning:u(),removeGraphic:u(),productIds:d(k()).nullable(),graphic:jn.nullable(),graphicColor:f().nullable(),graphicTitle:f().nullable(),id:k(),creationDate:v({offset:!0}),lastModified:v({offset:!0}).nullable(),archived:u(),productInfos:d(Fr).nullable(),rulesChangeDisabled:u(),productLinkDisabled:u(),documentIds:d(k()).nullable()}),Ir=b({id:k(),name:f().nullable(),patientAmount:y(),insuranceAmount:y(),danmarkAmount:y(),taxPercentage:y(),fixedPrice:u(),quantityTeethRule:u()}),b({sumPatientAmount:y(),sumInsuranceAmount:y(),sumDanmarkAmount:y(),productInfos:d(Ir).nullable()}),b({outcome:Wt}),b({userId:f().nullable(),homeServer:f().nullable(),deviceId:f().nullable(),accessToken:f().nullable(),refreshToken:f().nullable(),expiresInMs:y().int()}),b({correlationId:k(),packageId:k().nullable(),source:pn,destination:pn,userId:k(),startedAt:v({offset:!0}),completedAt:v({offset:!0}).nullable(),state:f(),reason:ln.nullable(),totalConflicts:y().int().nullable()}),b({correlationId:k(),state:f(),reason:ln.nullable()}),b({id:k(),name:f().nullable(),template:f().nullable(),channel:Mn,type:Nn,modifiedAt:v({offset:!0}).nullable()}),Lr=A([`Department`,`Reception`]),Rr=b({id:k(),name:f().nullable(),code:f().nullable(),type:Lr,defaultParentId:k().nullable()}),b({id:k(),logDate:v({offset:!0}),changedBy:k(),createdByInitials:f().nullable(),employees:d(xr).nullable(),startDate:f(),endDate:f(),start:te().nullable(),end:te().nullable(),type:Pn}),b({patientId:k(),idCode:f().nullable(),patientFullName:f().nullable(),expectedRecallDate:v({offset:!0}).nullable(),physicianId:k().nullable(),nextAppointmentDate:v({offset:!0}).nullable(),lastVisitDate:v({offset:!0}).nullable(),recallType:Sn,preferredRecallCommunication:Cn,note:f().nullable(),isDead:u()}),zr=b({start:v({offset:!0}).nullable(),patientId:k(),physicianId:k().nullable(),appointmentTypeId:k(),duration:y().int().nullable(),note:f().nullable(),waitingList:u().nullable(),locked:u().nullable(),appointmentState:Lt,customAppointmentStateId:k().nullable(),continuationAction:jt.nullable(),textToJournal:f().nullable(),resetAppointment:u().nullable(),recallReminder:d(Ht).nullable(),hideOnPatientPortal:u(),departmentId:k().nullable(),receptionId:k().nullable()}),zr.and(x(f(),h())),Br=b({vendorNumber:f().nullable(),employmentType:Ft.nullable()}),Br.and(x(f(),h())),Vr=b({students:d(rr).nullable(),physicianIds:d(k()).nullable(),status:ar.nullable(),note:f().max(200).nullable(),deadline:f().nullable()}),Vr.and(x(f(),h())),Hr=b({category:ir.nullable(),note:f().max(200).nullable(),deadline:f().nullable()}),Hr.and(x(f(),h())),b({id:k(),name:f().nullable()}),Ur=A([`None`,`PendingDraftInvoices`,`PendingInvoices`,`PendingPrepay`,`RegionReporting`,`UpcomingAppointments`,`MunicipalityReporting`]),b({deleteAllowed:u(),deleteDenyReasons:d(Ur).nullable(),latestContinuationEntryDate:v({offset:!0})}),Wr=ge(`Appointment`),b({feedbackId:k(),entityType:Wr,entityId:k().nullable(),sendingTime:v({offset:!0}).nullable(),responseTime:v({offset:!0}).nullable(),expired:u(),rate:y().int().nullable(),comment:f().nullable()}),b({responded:u(),expired:u(),language:f().nullable()}),Gr=b({employeeId:k(),availableAppointmentsCount:y().int().nullable(),isAvailableOnPatientPortal:u(),appointmentTypes:d(hr).nullable()}),b({employeeId:k(),fullName:f().nullable(),initials:f().nullable(),isAvailableOnPatientPortal:u(),availableAppointmentsCount:y().int().nullable(),appointmentTypes:d(hr).nullable()}),b({allowRegisterNewPatient:u(),smsConfirmationEnabled:u(),emailConfirmationEnabled:u(),appointmentRescheduleCount:y().int().nullable(),disableAppointmentCancellation:u()}),b({startPage:f().nullable(),blockedPatientPage:f().nullable(),allowedRegistrationPage:f().nullable(),notAllowedRegistrationPage:f().nullable()}),Kr=A([`Other`,`JournalHandedOver`,`PatientNotActive`]),qr=A([`Yes`,`Hiatus`,`No`,`NoHaveAsked`,`NotAsked`]),Jr=b({patientId:k(),firstName:f().nullable(),lastName:f().nullable(),displayName:f().nullable(),idCode:f().nullable(),status:Rn,isDead:u()}),Yr=b({contactId:k(),name:f().nullable(),relation:f().nullable(),position:f().nullable(),phone:f().nullable(),mail:f().nullable(),idCode:f().nullable(),address:L.nullable(),isPayer:u()}),b({id:k(),healthInsuranceGroup:y().int(),journalNumber:y().int(),status:Rn,primaryLocationId:k(),owningCompanyId:k(),mainPhysicianId:k().nullable(),recallNotification:qr,preferredRecallCommunication:d(Cn).nullable(),recallActive:zn,note:f().nullable(),journalNote:f().nullable(),communicationViaEboks:_n,referralInfo:Vn.nullable(),person:Vt.nullable(),address:xt.nullable(),communications:d(Et).nullable(),secondaryContacts:d(Yr).nullable(),danmarkInsurance:Ln.nullable(),danskTandforsikringInsurance:cr,riskProfile:f().nullable(),isGeneratedIdCode:u(),ownerId:k().nullable(),isDroppedOut:u(),dentalHygienistId:k().nullable(),isDead:u(),isBlockedOnPatientPortal:u(),isBlocked:u(),digitalMailboxConsent:En.nullable()}),b({id:k(),status:Rn,hasPayableAmount:u(),hasUpcomingAppointments:u(),hasDraftContinuationEntries:u(),hasPrepayAmount:u()}),b({periodValidationId:k()}),Xr=b({id:k().nullable().optional(),periodProductId:k()}),Zr=b({id:k(),periodProductId:k()}),b({id:k().nullable().optional(),productId:k(),actionBill:I,actionRecord:I,period:f(),periodValidationProducts:d(Xr).nullable().optional()}),Qr=A([`Concurrent`,`Prohibited`,`PreviousInclude`,`PreviousExclude`,`Seance`,`Required`]),$r=b({id:k(),productId:k(),actionBill:I,actionRecord:I,period:f(),type:Qr,products:d(Zr).nullable()}),b({call_id:f().nullable(),sequence_number:y().int().nullable(),timestamp:f().nullable(),state:f().nullable(),direction:f().nullable(),from:f().nullable(),to:f().nullable(),extension:f().nullable(),payload:x(f(),f().nullable()).nullable()}),ei=b({id:k(),name:f().min(1),extension:f().min(1)}
129),b({phoneExtensions:d(ei).nullable()}),b({clinicSegment:f().nullable(),token:f().nullable(),phoneExtensions:d(ei).nullable()}),b({physicianId:k(),timeslots:d(v({offset:!0}))}),b({enableOutgoingCommunication:u(),enableOutgoingCommunicationFeatures:d(un).nullable()}),b({preferredReminderId:k(),patientId:k(),reminderType:Cn,timeType:Un,text:f().nullable()}),b({preferredTimesId:k(),patientId:k(),weekdays:Kn,week:Gn,beginTime:f(),endTime:f()}),ti=b({id:k(),patientCategory:Jn,patientAmount:y(),insuranceAmount:y(),healthCareCode:f().nullable(),danmarkCode:y().int().nullable(),totalAmount:y(),taxPercentage:y()}),ni=A([`All`,`Patient`,`Debtor`,`Employee`]),ri=A([`Orthodontics`,`BiteFunction`,`FixedProsthetics`,`FillingsWithoutSubsidy`,`Surgery`,`ServicesWithSubsidy`,`RemovableProsthetics`,`Prophylaxis`,`Miscellaneous`]),ii=b({id:k(),category:ri}),ai=b({id:k(),productId:k(),actionBill:I,actionRecord:I,prohibitedProductId:k()}),oi=A([`None`,`Green`,`Yellow`,`Red`]),si=b({id:k(),productId:k(),actionBill:I,actionRecord:I,riskLevel:oi,validationType:Qr}),ci=b({productId:k(),concurrentValidations:d($r).nullable(),previousValidations:d($r).nullable(),riskValidations:d(si).nullable(),prohibitedValidations:d(ai).nullable()}),b({id:k(),name:f().nullable(),productCategoryId:k(),category:ri.nullable(),healthcareCode:f().nullable(),fixedPrice:u(),journalCodeId:k().nullable(),journalCode:f().nullable(),prices:d(ti).nullable(),validations:ci.nullable(),toothRestriction:d(Pr).nullable(),surfaceRestrictions:d(Nr).nullable(),canalRestrictions:d(an).nullable(),quantityTeethRule:u(),quantityCanalsRule:u()}),b({id:k(),name:f().nullable()}),li=A([`None`,`FixedPrice`,`ManualPriceUpdate`]),b({id:k(),productCategory:ii.nullable(),productCategoryId:k(),journalCode:Mr.nullable(),name:f().nullable(),nameTranslations:b({None:f(),Eus:f(),Cat:f(),Dan:f(),Nld:f(),Eng:f(),Fin:f(),Fra:f(),Glg:f(),Deu:f(),Ita:f(),Nor:f(),Pol:f(),Por:f(),Rus:f(),Spa:f(),Swe:f(),Ukr:f()}).nullable(),prices:d(ti).nullable(),options:li,toothRestriction:Pr,surfaceRestrictions:d(Nr).nullable(),productValidationsResponse:ci.nullable(),quantityTeethRule:u(),quantityCanalsRule:u(),canalRestrictions:d(an).nullable()}),b({offset:y().int().min(0).max(2147483647).nullable(),limit:y().int().min(0).max(2147483647).nullable(),includeCategories:u(),healthcareCodes:d(f()).nullable(),journalCodes:d(k()).nullable(),searchText:f().nullable(),categories:d(ri).nullable(),fixedPrice:u().nullable(),sort:f().nullable(),includeValidations:u(),includeToothRestrictions:u()}),b({prohibitedValidationId:k()}),b({id:k().nullable().optional(),productId:k(),actionBill:I,actionRecord:I,prohibitedProductId:k()}),ui=ge(`public-key`),di=b({type:ui,alg:Ct}),b({id:k(),title:f().nullable(),startDate:f(),endDate:f()}),fi=b({type:ui.nullable(),id:f().nullable(),transports:d(nn).nullable()}),pi=b({type:ui.nullable(),id:f().nullable(),transports:d(nn).nullable(),idBase64:f().nullable()}),mi=b({id:f(),name:f(),icon:f().nullable()}),b({recallSequenceId:k(),duration:y().int(),tempDuration:y().int(),interval:y().int(),nextRecallDate:v({offset:!0}),sequenceOrder:y().int(),linkOrder:y().int(),note:f().nullable(),physicianIds:d(k()).nullable(),appointmentType:k()}),b({name:f().nullable()}),b({id:k(),name:f().nullable(),key:f().nullable(),isConnected:u(),hasActiveSession:u()}),hi=b({id:k().nullable().optional(),name:f().min(1),email:f().nullable().optional(),phoneNumber:f().nullable().optional()}),gi=b({id:k(),name:f().nullable(),email:f().nullable(),phoneNumber:f().nullable()}),b({id:k(),clinicId:k(),name:f().nullable(),vat:f().nullable(),street:f().nullable(),cityName:f().nullable(),postalCode:f().nullable(),phoneNumber:f().nullable(),email:f().nullable(),note:f().nullable(),physicians:d(gi).nullable()}),b({refreshToken:f().min(1)}),b({accessToken:f().nullable(),refreshToken:f().nullable(),expiresInMs:y().int()}),b({code:f().nullable(),name:f().nullable(),districts:d(pr).nullable()}),b({rejectionNote:f().max(500).nullable()}),_i=A([`Sms`,`Email`,`WhatsApp`]),vi=A([`Appointment`,`AllAppointments`]),b({entityId:k(),channel:_i,type:vi,confirmationLink:u()}),b({timeslotId:f(),sequenceId:k(),appointmentTypeId:k().nullable(),physicianId:k(),title:f().nullable(),color:f().nullable(),start:v({offset:!0}),end:v({offset:!0}),isPrivate:u()}),b({sequenceId:k(),appointmentTypeId:k().nullable(),physicianIds:d(k()).nullable(),title:f().nullable(),color:f().nullable(),start:v({offset:!0}),end:v({offset:!0}),isPrivate:u(),repetition:er.nullable()}),b({riskValidationId:k()}),b({id:k().nullable().optional(),productId:k(),actionBill:I,actionRecord:I,riskLevel:oi.optional(),validationType:Qr.optional()}),yi=A([`Scanner`,`Camera`,`Other`]),bi=b({systemName:f().min(1),name:f().nullable().optional(),category:yi.optional(),showDeviceUI:u().optional()}),b({machineName:f().min(1),scanners:d(bi).nullable().optional()}),b({searchString:f().min(1),primaryDebtorType:ni.optional(),searchType:St.o
129ptional()}),b({id:k(),challengeBase64:f().nullable(),userIdBase64:f().nullable(),excludeCredentialsBase64:d(pi).nullable(),rp:mi.nullable(),user:Ar.nullable(),challenge:f().nullable(),pubKeyCredParams:d(di).nullable(),timeout:y().int(),attestation:Zt,authenticatorSelection:tn.nullable(),excludeCredentials:d(fi).nullable(),extensions:Qt.nullable(),status:f().nullable(),errorMessage:f().nullable()}),b({id:k(),name:f().nullable(),keyType:nr,isActivated:u(),lastUsed:v({offset:!0}).nullable(),created:v({offset:!0}),modified:v({offset:!0}).nullable(),loginCount:y().int(),note:f().nullable()}),b({type:qt}),b({patientId:k(),mediaId:k(),title:f().nullable(),groupId:k().nullable()}),b({entityId:k(),entityType:Wr,patientId:k()}),b({communicationId:k(),content:f().nullable()}),b({password:f().nullable()}),b({packageId:k()}),b({rate:y().int(),comment:f().nullable()}),xi=A([`Hour`,`Day`,`Week`,`Indefinitely`]),b({supportAccessEnabledTill:v({offset:!0}).nullable()}),b({id:k(),email:f().nullable(),name:f().nullable(),date:v({offset:!0}),reason:f().nullable()}),b({id:k(),date:v({offset:!0}),reason:f().nullable()}),b({offset:y().int().min(0).max(2147483647).nullable(),limit:y().int().min(0).max(2147483647).nullable(),patientId:k().nullable(),departmentId:k().nullable(),departmentIds:d(k()).nullable(),excludeStudentId:k().nullable(),statuses:d(ar).nullable(),categories:d(ir).nullable(),studentIds:d(k()).nullable(),physicianIds:d(k()).nullable(),age:y().int().nullable(),sortBy:f().nullable()}),b({treatmentTaskId:k(),timeLimited:u()}),Si=A([`Pending`,`Assigned`,`Rejected`]),Ci=b({treatmentTaskRequestId:k(),category:ir,student:Cr.nullable(),status:Si,note:f().nullable(),rejectionNote:f().nullable(),deadline:f().nullable(),treatmentTaskId:k().nullable(),created:v({offset:!0}),updatedBy:f().nullable(),updated:v({offset:!0}).nullable()}),b({items:d(Ci).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),b({offset:y().int().min(0).max(2147483647).nullable(),limit:y().int().min(0).max(2147483647).nullable(),categories:d(ir).nullable(),statuses:d(Si).nullable(),studentIds:d(k()).nullable(),semesters:d(f()).nullable(),classes:d(f()).nullable(),sortBy:f().nullable()}),wi=b({treatmentTaskId:k(),patient:Jr.nullable(),category:ir,department:Rr.nullable(),students:d(Cr).nullable(),physicians:d(Cr).nullable(),status:ar,note:f().nullable(),created:v({offset:!0}),deadline:f().nullable(),nextAppointmentDate:v({offset:!0}).nullable()}),b({items:d(wi).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),b({id:k(),description:f().nullable(),backgroundColor:f().nullable(),edgeColor:f().nullable(),duration:y().int(),stdLetter:k().nullable(),category:sn,excemptFromCalculations:u(),order:y().int()}),b({name:f().nullable()}),b({id:k(),companyRegistrationNumber:f().nullable().optional(),name:f().min(2).max(75),note:f().max(4096).nullable().optional(),contactPersonName:f().nullable().optional(),contactPersonDepartment:f().nullable().optional(),address:L.nullable().optional(),communications:d(gn).nullable().optional(),region:y().int().optional()}),b({id:k(),name:f().nullable(),description:f().nullable(),color:f().nullable(),order:y().int()}),b({id:k(),companyRegistrationNumber:f().nullable(),name:f().nullable(),note:f().nullable(),contactPersonName:f().nullable(),contactPersonDepartment:f().nullable(),address:L.nullable(),communications:d(gn).nullable()}),b({hasAccess:u()}),b({employments:d(Dn).nullable(),authorizationId:f().nullable(),employmentType:Ft,specialityId:f().nullable(),initials:f().nullable(),person:On.nullable(),address:L.nullable(),communications:d(gn).nullable(),vendorNumber:f().nullable(),hasAppointmentCalendar:u(),transferCalendarEmployeeId:k().nullable(),turnoverAllowed:u()}),b({blobName:f().nullable()}),b({settings:d(Er).nullable()}),b({title:f().nullable(),category:kn,requiresAnamnesis:u(),updatesRecall:u(),onceOnTooth:u(),onceInDay:u(),toothRelated:u(),toothRelation:An.nullable(),canBeUsedWithoutTooth:u(),deepCleaning:u(),removeGraphic:u(),productIds:d(k()).nullable(),graphic:jn.nullable(),graphicColor:f().nullable(),graphicTitle:f().nullable(),creationDate:v({offset:!0}),archived:u(),documentIds:d(k()).nullable(),templatePanelIds:d(k()).nullable()}),b({name:f().nullable(),template:f().nullable()}),b({isBlocked:u(),isBlockedOnPatientPortal:u()}),b({id:k(),healthInsuranceGroup:y().int(),primaryLocationId:k(),owningCompanyId:k(),mainPhysicianId:k().nullable().optional(),recallNotification:qr.optional(),preferredRecallCommunication:d(Cn).nullable().optional(),recallActive:zn.optional(),note:f().nullable().optional(),journalNote:f().nullable().optional(),secondaryContacts:d(Hn).nullable().optional(),person:On.nullable().optional(),address:L.nullable().optional(),communications:d(gn).nullable().optional(),communicationViaEboks:_n.optional(),referralInfo:Vn.nullable().optional(),danmarkInsurance:Ln.nullable().optional(),danskTandforsikringInsurance:cr.optional(),ownerId:k().nullable().optional(),dentalHygienistId:k().nullable().optional(),isDead:u().optional(),digitalMailboxConsent:En.nullable().optional()}),b({id:k(),status:Rn}),b({id:k(),productCategoryId:k(),journalCodeId:k().nullable().optional(),name:f().min(1),nameTranslations:b({None:f(),Eus:f(),Cat:f(),Dan:f(),Nld:f(),Eng:f(),Fin:f(),Fra:f(),Glg:f(),Deu:f(),Ita:f(),Nor:f(),Pol:f(),Por:f(),Rus:f(),Spa:f(),Swe:f(),Ukr:f()}).nullable().optional(),options:li.optional(),prices:d(Yn).nullable().optional(),toothRestriction:Pr.optional(),surfaceRestrictions:d(Nr).nullable().optional(),quantityTeethRule:u().optional(),quantityCanalsRule:u().optional(),canalRestrictions:d(an).nullable().optional()}),b({id:k(),name:f().min(1),vat:f().nullable().optional(),street:f().nullable().optional(),cityName:f().nullable().optional(),postalCode:f().nullable().optional(),phoneNumber:f().min(1),email:f().nullable().optional(),note:f().nullable().optional(),physicians:d(hi).nullable().optional()}),b({appointmentTypeId:k().nullable(),physicianIds:d(k()).nullable(),title:f().nullable(),color:f().nullable(),start:v({offset:!0}),end:v({offset:!0}),isPrivate:u(),repetition:er.nullable()}),b({id:k(),name:f().nullable(),isActivated:u(),note:f().nullable()}),b({period:xi}),Ti=b({physicianId:k(),initials:f().nullable()}),b({physicians:d(Ti).nullable(),durations:d(y().int()).nullable()}),b({offset:y().int().min(0).max(2147483647).nullable(),limit:y().int().min(0).max(2147483647).nullable(),search:f().nullable(),physicianIds:d(k()).nullable(),appointmentTypeIds:d(k()).nullable(),durations:d(y().int()).nullable(),priorities:d(Mt).nullable(),from:v({offset:!0}).nullable(),to:v({offset:!0}).nullable()}),Ei=b({appointmentId:k(),patientId:k().nullable(),initials:f().nullable(),patientFullName:f().nullable(),phone:f().nullable(),created:v({offset:!0}),appointmentTypeId:k(),appointmentTypeName:f().nullable(),duration:y().int(),note:f().nullable(),nextAppointmentDate:v({offset:!0}).nullable(),priority:Mt.nullable()}),b({items:d(Ei).nullable(),offset:y().int(),limit:y().int(),total:y().int().nullable()}),b({id:k().nullable().optional(),startDate:f(),days:d(Dr)}),Di=b({date:f(),start:f().nullable(),end:f().nullable()}),b({employeeId:k(),workingHours:d(Di).nullable()}),d(yr),b({file:ee(e=>typeof Blob<`u`&&e instanceof Blob)}
129),Lr.optional(),Kr.optional(),nr.optional(),b({file:ee(e=>typeof Blob<`u`&&e instanceof Blob)}),d(Wn),d(Gr),d(dr),Pn.optional(),Oi=window,ki=new URL(Oi.document.baseURI),Ai=ki.pathname.replace(/\/+$/,``),Oi._env_=Oi._env_||{},Oi._env_.ROOT_URL=ki.origin+Ai,Oi._env_.API_URL=Oi._env_.API_URL||ki.origin.replace(ki.host,`api.${ki.host}`).replace(`patient.`,``),Oi._env_.ROOT_PATH=Ai,Oi._env_.BUILD_NUMBER=document.querySelector(`meta[name="version"]`)?.content||`unknown`,R=Oi._env_,ji=[{value:`da`,profile:dn.enum.Denmark},{value:`en`,profile:dn.enum.Global},{value:`fr`,profile:`France`},{value:`es`,profile:dn.enum.Spain}],Mi=new C(null,{order:[`querystring`,`htmlTag`,`cookie`,`localStorage`,`sessionStorage`,`navigator`],lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`]}),Ni=l.use(Ne).use(Mi).use(g).init({returnNull:!1,backend:{loadPath:`${R.ROOT_URL}/locales/{{lng}}/{{ns}}.json`,addPath:`${R.ROOT_URL}/locales/add/{{lng}}/{{ns}}`,queryStringParams:{version:R.BUILD_NUMBER||Date.now().toString()}},fallbackLng:`da`,supportedLngs:ji.map(e=>e.value),interpolation:{escapeValue:!1},detection:{caches:[]}}),l.on(`languageChanged`,e=>{document.documentElement.lang=e}),Pi=(e,t,n)=>{let r=ji.find(e=>e.profile===t)?.value??ji[0].value;return e(n??`Form.idCode.${r}`,{lng:r,defaultValue:`SSN`})},Fi=Ni.then(()=>l),Ii=(0,M.createContext)(void 0),Li=M.memo(vd),Ri=M.memo(yd),zi=10500,z=function(e){return e.Success=`Success`,e.Error=`Error`,e}({}),Bi=({item:e,hide:t})=>{let{timer:n,id:r,title:i,type:a,message:o}=e,s=(0,M.useRef)(null),c=()=>{window.setTimeout(t,n||zi)};return(0,M.useEffect)(()=>{c(),s.current?.focus()},[]),(0,N.jsxs)(`output`,{ref:s,className:Hi.container,onClick:t,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&t()},children:[a===`Success`?(0,N.jsx)(Ri,{className:D(Hi.icon,Hi.success)}):(0,N.jsx)(Li,{className:D(Hi.icon,Hi.error)}),(0,N.jsxs)(`span`,{className:Hi.infoContainer,children:[(0,N.jsx)(`h3`,{className:Hi.toastTitle,children:i}),(0,N.jsx)(`p`,{className:Hi.toastMessage,children:o})]})]},r)},Vi=M.memo(Bi),Hi={container:O` 130 display: flex; 131 flex-direction: row; 132 width: 100%; 133 box-sizing: border-box; 134 border-radius: 10px; 135 padding: 32px 35px; 136 margin-bottom: 3px; 137 z-index: 999998; 138 justify-content: flex-start; 139 align-items: flex-start; 140 animation: toast-slide-up 0.3s; 141 will-change: transform; 142 background-color: #ffffff; 143 box-shadow: 0px 3px 6px #00000029; 144 `,infoContainer:O` 145 display: flex; 146 flex-direction: column; 147 margin-left: 16px; 148 `,icon:O` 149 min-height: 48px; 150 min-width: 48px; 151 width: 48px; 152 height: 48px; 153 `,success:O` 154 color: #62a457; 155 `,error:O` 156 color: #e81f1f; 157 `,toastTitle:O` 158 color: #4a4742; 159 font-size: 20px; 160 margin-block-start: 0; 161 margin-block-end: 0; 162 `,toastMessage:O` 163 color: #4a4742; 164 font-size: 14px; 165 margin-block-start: 0; 166 margin-block-end: 0; 167 `},Ui=`toast`,Wi=({children:e})=>{let[t,n]=(0,M.useState)([]),r=(0,M.useRef)(null);(0,M.useEffect)(()=>{if(r.current===null){let e=document.getElementById(Ui);e||(e=document.createElement(`div`),e.setAttribute(`id`,Ui),document.body.appendChild(e));let t=(0,Ye.createRoot)(e);r.current=t}},[]);let i=(0,M.useCallback)(e=>{n(t=>[...t.filter(t=>t.id!==e)])},[n]),a=(0,M.useCallback)(()=>{let e=t?.map(e=>(0,N.jsx)(Vi,{item:e,hide:()=>i(e.id)},e.id));r.current&&r.current.render(e)},[t,i]);(0,M.useEffect)(()=>{a()},[t,a]);let o={show:(0,M.useCallback)(e=>{let r=Math.random().toString(36).substring(2,9);n([...t,{...e,id:e.id||r}
167])},[t,n]),hide:i};return(0,N.jsx)(Ii.Provider,{value:o,children:e})},Gi=`Patient_Portal`,Ki=`Patient_Portal_Invoice`,qi=n({AppointmentStates:()=>Ji,CityPostalCodeDTO:()=>Yi,CommunicationPartRequest:()=>Zi,CommunicationPartResponse:()=>Qi,CommunicationTypes:()=>Xi,DanmarkInsurance:()=>ta,DanmarkInsuranceCondition:()=>$i,DanmarkInsuranceGroup:()=>ea,DanmarkReportStatusEnum:()=>na,DanskTandforsikringInsurance:()=>ra,DistrictDTO:()=>ia,EmploymentTypes:()=>aa,InitiateOnlinePaymentResponse:()=>oa,InitiatePaymentRequest:()=>sa,InvoicePdfResponseDTO:()=>ca,InvoiceStates:()=>la,LegalTextResponse:()=>ua,LegalTextType:()=>da,PatientPortalAddressPartDTO:()=>fa,PatientPortalAppointmentResponseDTO:()=>ma,PatientPortalAppointmentTypeDTO:()=>ha,PatientPortalCancelAppointmentRequest:()=>ga,PatientPortalClinicInfo:()=>ba,PatientPortalClinicSettingsDTO:()=>ya,PatientPortalCompanyInfoResponseDTO:()=>xa,PatientPortalCreateAppointmentRequest:()=>Sa,PatientPortalCreatePatientRequestDTO:()=>Ta,PatientPortalGeneralSettingsDTO:()=>_a,PatientPortalInfoResponseDTO:()=>Ea,PatientPortalInvoiceDto:()=>Da,PatientPortalMessageSettingsDTO:()=>va,PatientPortalPhysicianDTO:()=>pa,PatientPortalReserveAppointmentRequest:()=>Oa,PatientPortalReserveAppointmentResponse:()=>ka,PatientPortalUpdateAppointmentRequest:()=>Aa,PhysicianFreeTimeslotsDTO:()=>ja,RecallSequenceReplyDTO:()=>Ma,ReferralInfoDto:()=>wa,ReferralTypes:()=>Ca,RegionDTO:()=>Na,UpdatePatientPortalInfoDTO:()=>Pa,deleteApipatientPortalappointments_Body:()=>Ra,postApipatientPortalappointments_Body:()=>Ia,postApipatientPortalappointmentsreservations_Body:()=>za,postApipatientPortalinvoicesInvoiceIdtransactions_Body:()=>Ha,postApipatientPortalpatient_Body:()=>Ba,putApipatientPortalappointments_Body:()=>La,putApipatientPortalpatient_Body:()=>Va,type:()=>Fa}),Ji=A([`Active`,`InviteSent`,`InviteFailed`,`Done`,`Arrived`,`NoShow`,`BillReady`,`Late5Minutes`,`Late10Minutes`,`Late15Minutes`,`Late20Minutes`,`LateCancellation`,`CanceledByPatient`,`CanceledByClinic`,`PhysicianLate10Minutes`,`PhysicianLate20Minutes`,`PhysicianLate30Minutes`,`Deleted`,`Recall`,`SMSSent`,`SMSFailed`,`Confirmed`,`EmailSent`,`EmailFailed`,`Reserved`]),Yi=b({city:f().nullable(),postalCode:y().int(),districtCode:f().nullable(),districtName:f().nullable(),regionName:f().nullable()}),Xi=A([`Letter`,`Mail`,`Mobile`,`Sms`,`LandLine`,`WorkPhone`,`EANNumber`,`WhatsApp`]),Zi=b({communicationTypeId:Xi,contactPoint:f().nullable(),private:u()}),Qi=b({contactId:k(),contactPoint:f().nullable(),communicationTypeId:Xi,private:u(),sortOrder:y().int()}),$i=A([`New`,`MoreThan5Years`,`Waiting`]),ea=A([`NotAsked`,`Asked`,`Group1`,`Group2`,`Group5`,`Basis`]),ta=b({group:ea,condition:$i}),na=A([`Waiting`,`Manual`,`Sent`,`AwaitingManualProcessing`,`Accepted`,`PartiallyAccepted`,`Retracted`,`Accepted29`,`Rejected41`,`Rejected42`,`Rejected45`]),ra=A([`NotAsked`,`No`,`Yes`]),ia=b({code:f().nullable(),name:f().nullable(),cityPostalCodes:d(Yi).nullable()}),aa=A([`NotSpecified`,`Dentist`,`Leader`,`Staff`,`DentistOwner`,`DentalAssistant`,`Receptionist`,`Accountant`,`DentalHygienist`,`DentalHygienistOwner`,`Student`]),oa=b({paymentWindowUrl:f().nullable()}),sa=b({successUrl:f().nullable(),failureUrl:f().nullable(),returnUrl:f().nullable(),termsAndConditionsAccepted:u(),privacyPolicyAccepted:u()}),ca=b({downloadLink:f().nullable()}),la=A([`Unpaid`,`PartlyPaid`,`Paid`,`Credited`,`CreditNote`,`WrittenOff`,`NotApplicable`]),ua=b({html:f().nullable()}),da=A([`TermsAndConditions`,`Privacy`]),fa=b({street:f().nullable(),postalCode:f().nullable(),city:f().nullable(),district:f().nullable(),region:f().nullable()}),pa=b({id:k(),initials:f().min(1),employmentType:aa,fullName:f().min(1),isAvailableOnPatientPortal:u().optional(),duration:y().int().nullable().optional(),profileImage:f().nullable().optional()}),ma=b({appointmentId:k(),appointmentTypeId:k(),appointmentTypeName:f().nullable(),start:v({offset:!0}).nullable(),duration:y().int(),note:f().nullable(),waitingList:u(),appointmentState:Ji,rescheduledByPatientCount:y().int(),physician:pa.nullable(),locked:u(),plannedForRecall:u(),departmentName:f().nullable(),receptionName:f().nullable(),invoiceId:k().nullable()}),ha=b({id:k(),title:f().nullable(),duration:y().int(),isDefault:u(),bookingFee:y().nullable()}),ga=b({appointmentId:k()}),_a=b({allowRegisterNewPatient:u(),smsConfirmationEnabled:u(),emailConfirmationEnabled:u(),appointmentRescheduleCount:y().int().nullable(),disableAppointmentCancellation:u()}),va=b({startPage:f().nullable(),blockedPatientPage:f().nullable(),allowedRegistrationPage:f().nullable(),notAllowedRegistrationPage:f().nullable()}),ya=b({general:_a,messages:va}),ba=b({name:f().min(1),settings:ya}),xa=b({streetAddress:f().nullable(),city:f().nullable(),postalCode:f().nullable(),district:f().nullable(),phoneNumber:f().nullable(),region:f().nullable()}),Sa=b({appointmentTypeId:k(),physicianId:k(),dateTime:v({offset:!0})}),Ca=A([`Other`,`Facebook`,`Google`,`NewsPaper`,`BusAdd`,`WordOfMouth`,`OtherDentist`,`Instagram`]),wa=b({type:Ca,text:f().nullable()}),Ta=b({communications:d(Zi).nullable(),referralInfo:wa.nullable(),digitalMailboxConsent:u()}),Ea=b({name:f().nullable(),birthday:f().nullable(),idCode:f().nullable(),healthInsuranceGroup:y().int(),address:fa.nullable(),communications:d(Qi).nullable(),danmarkInsurance:ta.nullable(),danskTandforsikringInsurance:ra,isDroppedOut:u(),isRegistered:u(),company:xa.nullable(),isBlocked:u(),isNewPatient:u(),digitalMailboxConsent:u(),lastReminderDate:v({offset:!0}).nullable()}),Da=b({invoiceId:k(),invoiceNumber:f().nullable(),date:v({offset:!0}),dueDate:v({offset:!0}),state:la,totalAmount:y(),unpaidAmount:y(),danmarkTotalAmount:y(),lastPaymentAmount:y().nullable(),isOnlinePaymentAvailable:u(),companyPhoneNumber:f().nullable(),danmarkReportStatus:na.nullable(),hasReceipt:u()}),Oa=b({appointmentTypeId:k(),dateTime:v({offset:!0}),successUrl:f().nullable(),failureUrl:f().nullable(),returnUrl:f().nullable(),termsAndConditionsAccepted:u(),privacyPolicyAccepted:u()}),ka=b({appointmentId:k(),paymentWindowUrl:f().nullable()}),Aa=b({appointmentId:k(),dateTime:v({offset:!0})}),ja=b({physicianId:k(),timeslots:d(v({offset:!0}))}),Ma=b({recallSequenceId:k(),duration:y().int(),tempDuration:y().int(),interval:y().int(),nextRecallDate:v({offset:!0}),sequenceOrder:y().int(),linkOrder:y().int(),note:f().nullable(),physicianIds:d(k()).nullable(),appointmentType:k()}),Na=b({code:f().nullable(),name:f().nullable(),districts:d(ia).nullable()}),Pa=b({healthInsuranceGroup:y().int(),address:fa.nullable().optional(),communications:d(Zi).nullable().optional(),danmarkInsurance:ta.nullable().optional(),danskTandforsikringInsurance:ra.optional(),digitalMailboxConsent:u().optional()}),Fa=da.optional(),Ia=Sa,La=Aa,Ra=ga,za=Oa,Ba=Ta,Va=Pa,Ha=sa,Ua=n({CommunicationPartResponse:()=>Wa,default:()=>Ga}
167),Wa=Qi.extend({contactId:f().uuid().optional(),private:u().optional(),sortOrder:y().optional()}),Ga={},{AppointmentStates:Ka,CityPostalCodeDTO:qa,CommunicationTypes:Ja,CommunicationPartRequest:Ya,CommunicationPartResponse:Xa,DanmarkInsuranceCondition:Za,DanmarkInsuranceGroup:Qa,DanmarkInsurance:$a,DanmarkReportStatusEnum:eo,DanskTandforsikringInsurance:to,DistrictDTO:no,EmploymentTypes:ro,InitiateOnlinePaymentResponse:io,InitiatePaymentRequest:ao,InvoicePdfResponseDTO:oo,InvoiceStates:so,LegalTextResponse:co,LegalTextType:lo,PatientPortalAddressPartDTO:uo,PatientPortalPhysicianDTO:fo,PatientPortalAppointmentResponseDTO:po,PatientPortalAppointmentTypeDTO:mo,PatientPortalCancelAppointmentRequest:ho,PatientPortalGeneralSettingsDTO:go,PatientPortalMessageSettingsDTO:_o,PatientPortalClinicSettingsDTO:vo,PatientPortalClinicInfo:yo,PatientPortalCompanyInfoResponseDTO:bo,PatientPortalCreateAppointmentRequest:xo,ReferralTypes:So,ReferralInfoDto:Co,PatientPortalCreatePatientRequestDTO:wo,PatientPortalInfoResponseDTO:To,PatientPortalInvoiceDto:Eo,PatientPortalReserveAppointmentRequest:Do,PatientPortalReserveAppointmentResponse:Oo,PatientPortalUpdateAppointmentRequest:ko,PhysicianFreeTimeslotsDTO:Ao,RecallSequenceReplyDTO:jo,RegionDTO:Mo,UpdatePatientPortalInfoDTO:No,type:Po,postApipatientPortalappointments_Body:Fo,putApipatientPortalappointments_Body:Io,deleteApipatientPortalappointments_Body:Lo,postApipatientPortalappointmentsreservations_Body:Ro,postApipatientPortalpatient_Body:zo,putApipatientPortalpatient_Body:Bo,postApipatientPortalinvoicesInvoiceIdtransactions_Body:Vo}={...qi,...Ua},Ho={AppointmentStates:Ka,CityPostalCodeDTO:qa,CommunicationTypes:Ja,CommunicationPartRequest:Ya,CommunicationPartResponse:Xa,DanmarkInsuranceCondition:Za,DanmarkInsuranceGroup:Qa,DanmarkInsurance:$a,DanmarkReportStatusEnum:eo,DanskTandforsikringInsurance:to,DistrictDTO:no,EmploymentTypes:ro,InitiateOnlinePaymentResponse:io,InitiatePaymentRequest:ao,InvoicePdfResponseDTO:oo,InvoiceStates:so,LegalTextResponse:co,LegalTextType:lo,PatientPortalAddressPartDTO:uo,PatientPortalPhysicianDTO:fo,PatientPortalAppointmentResponseDTO:po,PatientPortalAppointmentTypeDTO:mo,PatientPortalCancelAppointmentRequest:ho,PatientPortalGeneralSettingsDTO:go,PatientPortalMessageSettingsDTO:_o,PatientPortalClinicSettingsDTO:vo,PatientPortalClinicInfo:yo,PatientPortalCompanyInfoResponseDTO:bo,PatientPortalCreateAppointmentRequest:xo,ReferralTypes:So,ReferralInfoDto:Co,PatientPortalCreatePatientRequestDTO:wo,PatientPortalInfoResponseDTO:To,PatientPortalInvoiceDto:Eo,PatientPortalReserveAppointmentRequest:Do,PatientPortalReserveAppointmentResponse:Oo,PatientPortalUpdateAppointmentRequest:ko,PhysicianFreeTimeslotsDTO:Ao,RecallSequenceReplyDTO:jo,RegionDTO:Mo,UpdatePatientPortalInfoDTO:No,type:Po,postApipatientPortalappointments_Body:Fo,putApipatientPortalappointments_Body:Io,deleteApipatientPortalappointments_Body:Lo,postApipatientPortalappointmentsreservations_Body:Ro,postApipatientPortalpatient_Body:zo,putApipatientPortalpatient_Body:Bo,postApipatientPortalinvoicesInvoiceIdtransactions_Body:Vo},Uo=fd([{method:`get`,path:`/api/patient-portal/addresses/Denmark`,alias:`getPatientPortalAddressesDenmark`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(Mo),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`post`,path:`/api/patient-portal/appointments`,alias:`postPatientPortalAppointments`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:Fo},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments`,alias:`getPatientPortalAppointments`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}
167],response:d(po),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`put`,path:`/api/patient-portal/appointments`,alias:`putPatientPortalAppointments`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:Io},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`delete`,path:`/api/patient-portal/appointments`,alias:`deletePatientPortalAppointments`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:Lo},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/:appointmentId`,alias:`getPatientPortalAppointmentsByAppointmentId`,requestFormat:`json`,parameters:[{name:`appointmentId`,type:`Path`,schema:f()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:po,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/:appointmentId/timeslots`,alias:`getPatientPortalAppointmentsByAppointmentIdTimeslots`,requestFormat:`json`,parameters:[{name:`start`,type:`Query`,schema:v({offset:!0})},{name:`end`,type:`Query`,schema:v({offset:!0})},{name:`appointmentId`,type:`Path`,schema:f()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(Ao),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/cancreate`,alias:`getPatientPortalAppointmentsCancreate`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:u(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/physicians`,alias:`getPatientPortalAppointmentsPhysicians`,requestFormat:`json`,parameters:[{name:`appointmentTypeId`,type:`Query`,schema:k().optional()},{name:`reschedule`,type:`Query`,schema:u().optional()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(fo),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`post`,path:`/api/patient-portal/appointments/reservations`,alias:`postPatientPortalAppointmentsReservations`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:Ro},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:Oo,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/timeslots`,alias:`getPatientPortalAppointmentsTimeslots`,requestFormat:`json`,parameters:[{name:`appointmentTypeId`,type:`Query`,schema:k()},{name:`physicianIds`,type:`Query`,schema:d(k()).optional()},{name:`start`,type:`Query`,schema:v({offset:!0})},{name:`end`,type:`Query`,schema:v({offset:!0})},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(Ao),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/types`,alias:`getPatientPortalAppointmentsTypes`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(mo),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/appointments/types/:appointmentTypeId/legaltexts`,alias:`getPatientPortalAppointmentsTypesByAppointmentTypeIdLegaltexts`,requestFormat:`json`,parameters:[{name:`appointmentTypeId`,type:`Path`,schema:k()},{name:`type`,type:`Query`,schema:Po},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:co,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/auth/login`,alias:`getPatientPortalAuthLogin`,requestFormat:`json`,parameters:[{name:`tenant`,type:`Query`,schema:f()},{name:`returnUrl`,type:`Query`,schema:f().default(`/`).optional()},{name:`loginFailedUrl`,type:`Query`,schema:f().default(`/`).optional()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/auth/logout`,alias:`getPatientPortalAuthLogout`,requestFormat:`json`,parameters:[{name:`returnUrl`,type:`Query`,schema:f().default(`/`).optional()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/clinic`,alias:`getPatientPortalClinic`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:yo,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/invoices`,alias:`getPatientPortalInvoices`,requestFormat:`json`,parameters:[{name:`offset`,type:`Query`,schema:y().int().min(0).max(2147483647).optional()},{name:`limit`,type:`Query`,schema:y().int().min(0).max(2147483647).optional()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(Eo),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/invoices/:invoiceId`,alias:`getPatientPortalInvoicesByInvoiceId`,requestFormat:`json`,parameters:[{name:`invoiceId`,type:`Path`,schema:k()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:Eo,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/invoices/:invoiceId/legaltexts`,alias:`getPatientPortalInvoicesByInvoiceIdLegaltexts`,requestFormat:`json`,parameters:[{name:`invoiceId`,type:`Path`,schema:k()},{name:`type`,type:`Query`,schema:Po},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:co,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/invoices/:invoiceId/pdf`,alias:`getPatientPortalInvoicesByInvoiceIdPdf`,requestFormat:`json`,parameters:[{name:`invoiceId`,type:`Path`,schema:k()},{name:`showReceipt`,type:`Query`,schema:u().optional()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:oo,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`post`,path:`/api/patient-portal/invoices/:invoiceId/transactions`,alias:`postPatientPortalInvoicesByInvoiceIdTransactions`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:Vo},{name:`invoiceId`,type:`Path`,schema:k()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:io,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/invoices/unpaid/count`,alias:`getPatientPortalInvoicesUnpaidCount`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:y().int(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/patient`,alias:`getPatientPortalPatient`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:To,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`post`,path:`/api/patient-portal/patient`,alias:`postPatientPortalPatient`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:zo},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`put`,path:`/api/patient-portal/patient`,alias:`putPatientPortalPatient`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:Bo},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/patient-portal/patient/recall`,alias:`getPatientPortalPatientRecall`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(jo),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]}
167]),Wo=new WeakMap,Go=new WeakMap,Ko=class{constructor(){wd(this,Wo,new Set),wd(this,Go,new Map)}emit(e){Ed(Wo,this).forEach(t=>{let n=Ed(Go,this).get(t);n&&n(e)})}subscribe(e,t){let n=t||e;return Ed(Wo,this).add(n),Ed(Go,this).set(n,e),()=>this.unsubscribe(n)}unsubscribe(e){Ed(Wo,this).delete(e),Ed(Go,this).delete(e)}},qo=new WeakMap,Jo=new WeakMap,Yo=class{constructor(e){wd(this,qo,void 0),wd(this,Jo,Dd()),Od(qo,this,e)}getState(){return Ed(qo,this)}set(e){let t=Ed(qo,this),n=typeof e==`function`?e(t):e;return Sd(t,n)||(Od(qo,this,n),Ed(Jo,this).emit([n,t])),this}subscribe(e){return Ed(Jo,this).subscribe(([t,n])=>e(t,n),e)}unsubscribe(e){return Ed(Jo,this).unsubscribe(e)}},Xo=/^(\S+)\s+https?:\/\/[^/]+/,Zo=/\/(?:[!$@]|%40|%21|%24)[^/]*/g,Qo=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,$o=/\/[0-9a-f]{16,}(?=[/.]|$)/gi,es=/\/\d+(?=[/.]|$)/g,ts=/^\d+$/,ns=/\/\d{4}-\d{2}-\d{2}[^/]*/g,rs=/(:id)\.[A-Za-z0-9]{2,5}(?=\/|$)/g,is=`:id`,as=`:date`,os=`:tenant`,ss=`http-request`,cs=`Click - `,ls=[`route-change`,`page-load`],us={withCredentials:!0,paramsSerializer:e=>{let t=new URLSearchParams;for(let n of Object.keys(e)){let r=e[n];if(Array.isArray(r))for(let e of r)t.append(n,e);else t.append(n,r)}return t.toString()}},ds=e=>{if(e.response.status===401){let{tenant:e}=Z(),t=new URLSearchParams(window.location.search).get(`lng`),n=new URL(`${R.ROOT_URL}/${e}/login`);return n.searchParams.set(`returnUrl`,window.location.toString().replace(`${R.ROOT_URL}/${e}`,``)),t&&n.searchParams.set(`lng`,t),setTimeout(()=>{window.location.href=n.toString()},1e3),new Promise(()=>{})}return Promise.reject(e)},fs=e=>{e.defaults.withCredentials=!0,e.interceptors.response.use(null,ds)},B=xd(`api:patient-portal`,R.API_URL,{axiosConfig:us}),V=e=>typeof e!=`object`||!e?!1:(`isAxiosError`in e&&e.isAxiosError&&jd(e,`response.data.errorCode`),!0),fs(B.axios),ps=e=>{let[t,n]=(0,M.useState)(e??{isOpen:!1}),r=e=>n(t=>({isOpen:!0,message:e?.message??t.message,title:e?.title??t.title,handleCancel:e?.handleCancel??t.handleCancel,handleConfirm:e?.handleConfirm??t.handleConfirm})),i=()=>n(e=>({...e,isOpen:!1}));return{...t,openModal:r,closeModal:i}},ms=({html:e,className:t})=>(0,N.jsx)(`div`,{className:t,dangerouslySetInnerHTML:{__html:je.sanitize(e??``)}}),H=()=>{let e=Pe(),{i18n:t}=_();return(0,M.useCallback)((n,r)=>{let i=new URLSearchParams({...r,lng:t.language});e(`${n}?${i.toString()}`)},[t.language,e])},hs=`bookAppointmentShown`,gs=(()=>{try{return window.self!==window.top}catch{return!0}})(),_s=(0,M.createContext)(void 0),vs=()=>
167{if(localStorage.removeItem(hs),window.location.toString().includes(`/login`)){a.emit(`logout`,void 0);return}let e=`${R.ROOT_URL}/${Z().tenant}`,t=new URL(`${R.API_URL}/api/patient-portal/auth/logout`);if(gs){t.searchParams.set(`returnUrl`,`${R.ROOT_URL}/close.html`),qd(t.toString(),()=>{a.emit(`logout`,void 0),setTimeout(()=>{window.location.href=e||``},1e3)});return}t.searchParams.set(`returnUrl`,e),window.location.href=`${R.API_URL}/api/patient-portal/auth/logout?returnUrl=${e}`},a.on(`logout`,vs),ys={},a.on(`config`,e=>{ys=e}),a.emit(`config`,{}),bs=({children:e})=>(0,M.useContext)(_s)?(0,N.jsx)(N.Fragment,{children:e}):(0,N.jsx)(xs,{children:e}),xs=({children:e})=>{let{data:t}=B.useSuspenseGetPatientPortalPatient({},{retry:0}),{data:n}=B.useSuspenseGetPatientPortalClinic({},{retry:0});if(!t||!n)throw Error(`Can't load patient data or clinic settings`);let r={patient:t,clinic:n,logout:vs};return(0,N.jsx)(_s.Provider,{value:r,children:e})},Ss=class extends M.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`Error caught by ErrorBoundary:`,e,t)}render(){return this.state.hasError?this.props.fallback:this.props.children}},Cs=e=>{let{parentElement:t,firstChild:n}=e;if(!t||!n)return;let r=t.clientWidth/e.clientWidth,i=parseInt(n.style.fontSize,10),a=Math.min(25,Math.floor(i*r));n.style.fontSize=`${a}px`},ws=({patientName:e})=>{let t=(0,M.useRef)(null),{t:n}=_();return(0,M.useEffect)(()=>{t.current&&Cs(t.current)},[t]),(0,N.jsxs)(`div`,{className:Ts.container,children:[(0,N.jsx)(`span`,{className:Ts.greeting,children:n(`Greeting.welcome`)}),(0,N.jsx)(`div`,{ref:t,children:(0,N.jsx)(`h3`,{className:Ts.name,style:{fontSize:`20px`},children:e})})]})},Ts={container:O` 168 display: flex; 169 flex-direction: column; 170 justify-content: flex-start; 171 align-items: flex-start; 172 width: 100%; 173 font-size: 20px; 174 `,greeting:O` 175 font-size: 12px; 176 font-weight: 400; 177 `,name:O` 178 display: flex; 179 flex-wrap: nowrap; 180 white-space: nowrap; 181 margin-block-end: 0; 182 margin-block-start: 0; 183 font-weight: 600; 184 `},Es=()=>{let{patient:e}=Xd();return e?(0,N.jsx)(`header`,{className:Ds.container,children:(0,N.jsx)(ws,{patientName:e.name||``})}):null},Ds={container:O` 185 display: flex; 186 flex-direction: row; 187 justify-content: flex-start; 188 @media (max-width: 650px) { 189 border-radius: 0 0 10px 10px; 190 background-color: #ffffff; 191 box-shadow: 0px 3px 6px #00000029; 192 width: 100%; 193 padding: 1rem; 194 box-sizing: border-box; 195 } 196 `},Os=M.memo(Zd),ks=M.memo(Qd),As=n({ClinicProfileDefinitionDto:()=>Fs,ClinicProfileDefinitionFeatureDto:()=>js,ClinicProfileDto:()=>Rs,ClinicProfileFeatureDto:()=>Is,ClinicProfileIdentityProviderInfoDto:()=>Ls,Country:()=>Ms,Currency:()=>Ns,IdentityProviderDefinitionBaseDto:()=>zs,LanguageCodes:()=>Ps,UpdateClinicFeatureDto:()=>Bs,UpdateClinicProfileDTO:()=>Vs,patchApiprofilesclinicsClinicId_Body:()=>Hs,patchApiprofilesclinicsfeatures_Body:()=>Us}),js=b({code:f().min(1),isAddon:u().optional(),configuration:x(f(),h()).nullable().optional()}),Ms=A(`None.Afg.Alb.Ata.Dza.Asm.And.Ago.Atg.Aze.Arg.Aus.Aut.Bhs.Bhr.Bgd.Arm.Brb.Bel.Bmu.Btn.Bol.Bih.Bwa.Bvt.Bra.Blz.Iot.Slb.Vgb.Brn.Bgr.Mmr.Bdi.Blr.Khm.Cmr.Can.Cpv.Cym.Caf.Lka.Tcd.Chl.Chn.Twn.Cxr.Cck.Col.Com.Myt.Cog.Cod.Cok.Cri.Hrv.Cub.Cyp.Cze.Ben.Dnk.Dma.Dom.Ecu.Slv.Gnq.Eth.Eri.Est.Fro.Flk.Sgs.Fji.Fin.Ala.Fra.Guf.Pyf.Atf.Dji.Gab.Geo.Gmb.Pse.Deu.Gha.Gib.Kir.Grc.Grl.Grd.Glp.Gum.Gtm.Gin.Guy.Hti.Hmd.VAT.Hnd.Hkg.Hun.Isl.Ind.Idn.Irn.Irq.Irl.Isr.Ita.Civ.Jam.Jpn.Kaz.Jor.Ken.Prk.Kor.Kwt.Kgz.Lao.Lbn.Lso.Lva.Lbr.Lby.Lie.Ltu.Lux.Mac.Mdg.Mwi.Mys.Mdv.Mli.Mlt.Mtq.Mrt.Mus.Mex.Mco.Mng.Mda.Mne.Msr.Mar.Moz.Omn.Nam.Nru.Npl.Nld.Cuw.Abw.Sxm.Bes.Ncl.Vut.Nzl.Nic.Ner.Nga.Niu.Nfk.Nor.Mnp.Umi.Fsm.Mhl.Plw.Pak.Pan.Png.Pry.Per.Phl.Pcn.Pol.Prt.Gnb.Tls.Pri.Qat.Reu.Rou.Rus.Rwa.Blm.Shn.Kna.Aia.Lca.Maf.Spm.Vct.Smr.Stp.Sau.Sen.Srb.Syc.Sle.Sgp.Svk.Vnm.Svn.Som.Zaf.Zwe.Esp.Ssd.Sdn.Esh.Sur.Sjm.Swz.Swe.Che.Syr.Tjk.Tha.Tgo.Tkl.Ton.Tto.Are.Tun.Tur.Tkm.Tca.Tuv.Uga.Ukr.Mkd.Egy.Gbr.Ggy.Jey.Imn.Tza.Usa.Vir.Bfa.Ury.Uzb.Ven.Wlf.Wsm.Yem.Zmb`.split(`.`)),Ns=A([`None`,`DKK`,`USD`,`EUR`]),Ps=A([`None`,`Eus`,`Cat`,`Dan`,`Nld`,`Eng`,`Fin`,`Fra`,`Glg`,`Deu`,`Ita`,`Nor`,`Pol`,`Por`,`Rus`,`Spa`,`Swe`,`Ukr`]),Fs=b({name:f().min(1),timeZone:f().nullable().optional(),country:Ms.optional(),language:Ps.optional(),currency:Ns.optional(),features:d(js).nullable().optional()}),Is=b({code:f().nullable(),enabled:u(),isAddon:u(),updated:v({offset:!0}),configuration:x(f(),h()).nullable()}
196),Ls=b({clientId:f().nullable(),authority:f().nullable(),issuers:d(f()).nullable(),rolesMapping:x(f(),k()).nullable()}),Rs=b({clinicId:k(),profileName:f().nullable().optional(),tenant:f().nullable().optional(),timeZone:f().nullable().optional(),isActive:u().optional(),features:d(Is).nullable().optional(),country:Ms.optional(),language:Ps.optional(),currency:Ns.optional(),updated:v({offset:!0}).optional(),identityProviderDefinitionInfo:Ls.nullable().optional()}),zs=b({id:k(),name:f().nullable()}),Bs=b({clinicId:k(),featureCode:f().nullable(),enabled:u(),configuration:h()}),Vs=b({country:Ms.nullable(),language:Ps.nullable(),currency:Ns.nullable(),active:u().nullable()}),Hs=Vs,Us=Bs,Ws=n({default:()=>Gs}),Gs={},{ClinicProfileDefinitionFeatureDto:Ks,Country:qs,Currency:Js,LanguageCodes:Ys,ClinicProfileDefinitionDto:Xs,ClinicProfileFeatureDto:Zs,ClinicProfileIdentityProviderInfoDto:Qs,ClinicProfileDto:$s,IdentityProviderDefinitionBaseDto:ec,UpdateClinicFeatureDto:tc,UpdateClinicProfileDTO:nc,patchApiprofilesclinicsClinicId_Body:rc,patchApiprofilesclinicsfeatures_Body:ic}={...As,...Ws},ac={ClinicProfileDefinitionFeatureDto:Ks,Country:qs,Currency:Js,LanguageCodes:Ys,ClinicProfileDefinitionDto:Xs,ClinicProfileFeatureDto:Zs,ClinicProfileIdentityProviderInfoDto:Qs,ClinicProfileDto:$s,IdentityProviderDefinitionBaseDto:ec,UpdateClinicFeatureDto:tc,UpdateClinicProfileDTO:nc,patchApiprofilesclinicsClinicId_Body:rc,patchApiprofilesclinicsfeatures_Body:ic},oc=fd([{method:`get`,path:`/api/identityproviders`,alias:`getIdentityproviders`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(ec),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/profiles`,alias:`getProfiles`,requestFormat:`json`,parameters:[{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:d(Xs),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/profiles/:profileName`,alias:`getProfilesByProfileName`,requestFormat:`json`,parameters:[{name:`profileName`,type:`Path`,schema:f()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:Xs,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`patch`,path:`/api/profiles/clinics/:clinicId`,alias:`patchProfilesClinicsByClinicId`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:rc},{name:`clinicId`,type:`Path`,schema:k()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:$s,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/profiles/clinics/:profileClinicId`,alias:`getProfilesClinicsByProfileClinicId`,requestFormat:`json`,parameters:[{name:`profileClinicId`,type:`Path`,schema:k()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:$s,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`get`,path:`/api/profiles/clinics/:tenant`,alias:`getProfilesClinicsByTenant`,requestFormat:`json`,parameters:[{name:`tenant`,type:`Path`,schema:f()},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:$s,errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]},{method:`patch`,path:`/api/profiles/clinics/features`,alias:`patchProfilesClinicsFeatures`,requestFormat:`json`,parameters:[{name:`body`,type:`Body`,schema:ic},{name:`X-DentalSuite-CompanyId`,type:`Header`,schema:h().optional()}],response:w(),errors:[{status:401,description:`Unauthorized`,schema:w()},{status:403,description:`Forbidden`,schema:w()}]}]),sc=ef(`api:portal`,R.API_URL),cc=()=>{let{tenant:e}=Z(),{data:t,isError:n}=sc.useGetProfilesClinicsByTenant({params:{tenant:e}},{suspense:!0,useErrorBoundary:!1,retry:1});return{data:t,isError:n,getFeature:(0,M.useCallback)(e=>{let n=t?.features?.find(t=>t.code===e&&t.enabled);return{isEnabled:!!n,configuration:n?.configuration??null}},[t]),invoicesEnabled:t?.features?.find(e=>e.code===`Patient_Portal_Invoice`)?.enabled??!1,currency:t?.currency??null}},lc=M.forwardRef(tf),uc=M.memo(lc),dc=M.memo(nf),dc.displayName=`Flag(DK)`,fc=M.memo(rf),fc.displayName=`Flag(ES)`,pc=M.memo(af),pc.displayName=`Flag(FR)`,mc=M.memo(of),mc.displayName=`Flag(GB)`,hc={en:mc,gb:mc,da:dc,dk:dc,es:fc,fr:pc},gc=M.memo(sf),gc.displayName=`Flag`,De(),xe(),ae(),_c=()=>{let{i18n:e}=_(),[,t]=ve();return{changeLanguage:(0,M.useCallback)(n=>{e.changeLanguage(n),F.locale(n),t(e=>(e.set(`lng`,n),e))},[e,t])}},vc=[{value:`da`},{value:`en`},{value:`fr`},{value:`es`}],yc=()=>{let e=(0,M.useRef)(null),{i18n:t,t:n}=_(),r=t.language,{changeLanguage:i}=_c(),a=`--lang-switcher-anchor-${(0,M.useId)().replace(/:/g,``)}`,o=()=>e.current?.showModal(),s=()=>e.current?.close();return(0,N.jsxs)(`div`,{className:bc.languageSwitcherContainer,children:[(0,N.jsx)(`button`,{className:bc.currentLanguage,style:{anchorName:a},onClick:o,"aria-label":n(`Navigation.changeLanguage`)||`Change language`,"data-testid":`AT_ChangeLanguageBtn`,children:(0,N.jsx)(gc,{type:r})}),(0,N.jsx)(`dialog`,{ref:e,className:bc.dialog,style:{positionAnchor:a},onClick:e=>e.target===e.currentTarget&&s(),onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&s()},children:vc.map(e=>(0,N.jsxs)(`button`,{className:bc.languageButton,onClick:()=>{i(e.value),s()},"data-testid":e.value===`en`?`AT_LanguageEnglishBtn`:`AT_LanguageDanishBtn`,"data-current":e.value===r,children:[(0,N.jsx)(`span`,{className:bc.flagIcon,children:(0,N.jsx)(gc,{type:e.value})}),(0,N.jsx)(`span`,{className:bc.language,children:n(`Language.${e.value}`)}),r===e.value&&(0,N.jsx)(uc,{className:bc.checkmark})]},e.value))})]})},bc={languageSwitcherContainer:O` 197 display: flex; 198 position: relative; 199 `,dialog:O` 200 display: none; 201 &[open] { 202 display: flex; 203 } 204 flex-direction: column; 205 align-items: flex-start; 206 gap: 8px; 207 box-sizing: border-box; 208 padding: 16px; 209 border-radius: 6px; 210 background-color: #ffffff; 211 box-shadow: 3px 3px 6px #00000029; 212 border: none; 213 inset: unset; 214 215 anchor-name: none; 216 margin: 5px 0; 217 position-area: block-end span-inline-start; 218 position-try-fallbacks: block-start span-inline-start; 219 220 [data-current='true'] { 221 display: none; 222 } 223 224 &::backdrop { 225 background: transparent; 226 } 227 228 @media (max-width: 650px) { 229 background-color: #f9f9fa; 230 gap: 16px; 231 padding: 24px; 232 min-width: 60%; 233 position-area: none; 234 top: 50%; 235 left: 50%; 236 transform: translate(-50%, -50%); 237 238 [data-current='true'] { 239 display: flex; 240 } 241 242 &::backdrop { 243 background: rgba(0, 0, 0, 0.5); 244 } 245 } 246 `,languageButton:O` 247 display: flex; 248 width: 100%; 249 flex-direction: row; 250 justify-content: flex-start;
251 align-items: center; 252 gap: 8px; 253 font-weight: 300; 254 font-size: 14px; 255 border: none; 256 background-color: #ffffff; 257 cursor: pointer; 258 259 @media (max-width: 650px) { 260 gap: 16px; 261 border-radius: 6px; 262 font-size: 16px; 263 padding: 16px; 264 box-shadow: 0 3px 6px #00000029; 265 } 266 `,currentLanguage:O` 267 display: flex; 268 width: 24px; 269 height: 24px; 270 font-size: 24px; 271 background-color: transparent; 272 padding: 0; 273 border: none; 274 border-radius: 50%; 275 overflow: hidden; 276 cursor: pointer; 277 `,flagIcon:O` 278 display: flex; 279 flex-shrink: 0; 280 width: 16px; 281 height: 16px; 282 font-size: 16px; 283 border-radius: 50%; 284 overflow: hidden; 285 @media (max-width: 650px) { 286 font-size: 24px; 287 width: 24px; 288 height: 24px; 289 } 290 `,language:O` 291 flex-grow: 1; 292 text-align: left; 293 `,checkmark:O` 294 flex-shrink: 0; 295 font-size: 24px; 296 color: #4a4742; 297 `},xc=({item:e,clickHandler:t})=>{let{t:n}=_(),{search:r}=Me();return(0,N.jsx)(`li`,{className:Sc.listItemContainer,"data-mobile":e.icon!==void 0,children:(0,N.jsxs)(le,{"aria-label":e.name,className:({isActive:e})=>D(Sc.link({isActive:e})),to:`${e.route}${r}`,onClick:t,end:!0,children:[(0,N.jsx)(`span`,{className:Sc.iconContainer,children:e.icon}),(0,N.jsx)(`span`,{children:n(`Navigation.${e.name}`)})]})})},Sc={listItemContainer:O` 298 font-size: 18px; 299 color: #4a4742; 300 @media (max-width: 650px) { 301 font-size: 10px; 302 display: none; 303 &[data-mobile='true'] { 304 display: flex; 305 } 306 flex-direction: column; 307 justify-content: center; 308 margin-left: 0; 309 } 310 `,iconContainer:O` 311 @media (min-width: 650px) { 312 display: none; 313 } 314 `,link:({isActive:e})=>O` 315 color: ${e?`#4d5677`:`#4a4742`}; 316 display: flex; 317 flex-direction: column; 318 :hover { 319 color: #4d5677; 320 } 321 `},Cc=M.memo(cf),wc=({items:e,closeHandler:t})=>{let n=H(),{logout:r}=Xd(),{t:i}=_();return(0,N.jsx)(`div`,{className:Tc.overlay,children:(0,N.jsxs)(`div`,{className:Tc.container,children:[(0,N.jsx)(`div`,{className:Tc.itemsBox,children:e.map((e,r)=>(0,N.jsxs)(`button`,{className:Tc.item,onClick:()=>{t(),e.route&&n(`${e.route}`)},children:[(0,N.jsx)(`span`,{children:i(`Navigation.${e.name}`)}),(0,N.jsx)(Cc,{className:Tc.arrow,style:{width:`10px`,height:`16px`}})]},r))}),(0,N.jsx)(P,{className:Tc.signOutButton,name:`signout`,filled:!1,onClick:()=>{t(),r()},children:i(`Navigation.signOut`)})]})})},Tc={overlay:O` 322 display: none; 323 @media (max-width: 650px) { 324 display: flex; 325 position: fixed; 326 background-color: rgba(64, 64, 64, 0.5); 327 top: 0; 328 left: 0; 329 width: 100%; 330 height: calc(100% - 74px); 331 flex-direction: column; 332 justify-content: flex-end; 333 align-items: center; 334 margin-bottom: 75px; 335 z-index: 10; 336 border-bottom: 1px solid #dfdddd; 337 } 338 `,container:O` 339 display: flex; 340 flex-direction: column; 341 justify-content: center; 342 width: 100%; 343 box-sizing: border-box; 344 background-color: #ffffff; 345 padding: 21px 24px; 346 `,itemsBox:O` 347 display: flex; 348 flex-direction: column; 349 box-shadow: 0px 3px 6px #00000029; 350 border-radius: 10px; 351 padding: 16px; 352 margin-bottom: 16px; 353 `,item:O` 354 display: flex; 355 flex-direction: row; 356 justify-content: space-between; 357 align-items: center; 358 color: #4a4742; 359 margin-bottom: 16px; 360 background-color: transparent; 361 border: none; 362 padding: 0; 363 font-size: 16px; 364 font-weight: 400; 365 :last-of-type { 366 margin-bottom: 0; 367 } 368 `,arrow:O` 369 color: #000000; 370 `,signOutButton:O` 371 margin: 0 auto; 372 width: 155px; 373 `},{tenant:Ec}=Z(),Dc=[{name:`home`,route:`/${Ec}`,icon:(0,N.jsx)(Os,{style:{width:`25px`,height:`25px`}})},{name:`myProfile`,route:`/${Ec}/profile`,private:!0},{name:`invoices`,route:`/${Ec}/invoices`,private:!0,addon:`invoices`}],Oc=[{name:`changeLanguage`,route:`/${Ec}/language`},{name:`myProfile`,route:`/${Ec}/profile`,private:!0},{name:`invoices`,route:`/${Ec}/invoices`,private:!0,addon:`invoices`}],kc=()=>{let[e,t]=(0,M.useState)(),{t:n}=_(),{logout:r,patient:i}=Xd(),{invoicesEnabled:a}=cc(),o=(0,M.useMemo)(()=>({invoices:a}),[a]),s=(0,M.useCallback)(e=>(i.isRegistered&&!i.isBlocked||!e.private)&&(!e.addon||!!o[e.addon]),[i.isRegistered,i.isBlocked,o]),c=(0,M.useCallback)(()=>{t(!e)},[e]),l=Jd();return(0,N.jsx)(Qe,{active:!!e,onDeactivate:c,children:(0,N.jsxs)(`div`,{className:Ac.c
373ontainer,children:[(0,N.jsxs)(`nav`,{className:Ac.navigationContainer,children:[(0,N.jsxs)(`ul`,{className:Ac.listContainer,children:[Dc.filter(s).map(e=>(0,N.jsx)(xc,{item:e,clickHandler:()=>t(!1)},e.route)),(0,N.jsx)(`li`,{className:Sc.listItemContainer,children:(0,N.jsx)(yc,{})}),!l.inOverlay&&(0,N.jsx)(`li`,{className:Sc.listItemContainer,children:(0,N.jsx)(`button`,{name:`signout`,className:Ac.signOut,onClick:()=>r(),children:(0,N.jsx)(`div`,{className:D(Sc.link({isActive:!1})),children:n(`Navigation.signOut`)})})})]}),(0,N.jsxs)(`button`,{name:`more`,className:Ac.moreContainer(!!e),onClick:c,children:[(0,N.jsx)(`span`,{className:Sc.iconContainer,children:(0,N.jsx)(ks,{style:{width:`25px`,height:`25px`}})}),(0,N.jsx)(`div`,{children:n(`Navigation.more`)})]})]}),e&&(0,N.jsx)(wc,{items:Oc.filter(s),closeHandler:()=>t(!1)})]})})},Ac={container:O` 374 display: flex; 375 width: 100%; 376 height: inherit; 377 @media (max-width: 650px) { 378 position: fixed; 379 bottom: 0; 380 left: 0; 381 } 382 `,navigationContainer:O` 383 display: flex; 384 flex-direction: row; 385 justify-content: flex-end; 386 font-weight: 300; 387 text-align: center; 388 @media (max-width: 650px) { 389 position: fixed; 390 width: 100%; 391 bottom: 0; 392 background-color: #ffffff; 393 box-shadow: 3px 3px 6px #00000029; 394 display: flex; 395 flex-direction: row; 396 justify-content: space-between; 397 } 398 `,listContainer:O` 399 list-style-type: none; 400 display: flex; 401 flex-direction: row; 402 justify-content: flex-end; 403 align-items: flex-end; 404 margin-block-end: 0; 405 margin-block-start: 0; 406 margin-inline-end: 0; 407 margin-inline-start: 0; 408 padding-inline-start: 0; 409 gap: 15px; 410 @media (max-width: 650px) { 411 gap: 25px; 412 margin: 15px 15px 15px 25px; 413 justify-content: flex-start; 414 & > li:first-child { 415 padding-left: 6px; 416 } 417 } 418 `,moreContainer:e=>O` 419 display: none; 420 font-size: 10px; 421 flex-direction: column; 422 justify-content: center; 423 background-color: transparent; 424 color: ${e?`#4d5677`:`#4A4742`}; 425 padding: 15px 25px 15px 15px; 426 border: unset; 427 align-items: center; 428 font-weight: 300; 429 @media (max-width: 650px) { 430 display: flex; 431 } 432 `,signOut:O` 433 display: flex; 434 background-color: transparent; 435 border: unset; 436 align-items: center; 437 padding: 0; 438 :hover { 439 cursor: pointer; 440 color: #4d5677; 441 } 442 `},jc=({className:e,width:t=`100%`,height:n=`1em`,radius:r=4,shadow:i=!1,color:a=`#e0e0e0`,wave:o=!1,style:s})=>(0,N.jsx)(`div`,{className:D(o?Ic.wave:Ic.breath,e),style:{width:t,height:n,backgroundColor:a,borderRadius:r,boxShadow:i?`0 3px 6px #00000029`:`none`,...s},"aria-busy":!0}),Mc=({size:e=`1em`,...t})=>(0,N.jsx)(jc,{...t,width:e,height:e,radius:`50%`}),Nc=({lines:e=1,height:t,...n})=>{let r=t?`${t/e}px`:`1em`;return(0,N.jsx)(N.Fragment,{children:Array.from({length:e},(t,i)=>(0,M.createElement)(jc,{...n,key:i,width:i===e-1&&e>1?`80%`:`100%`,height:r,style:{display:`inline-block`,marginBottom:i<e-1?`0.5em`:`0`,...n.style}}))})},U={Box:jc,Circle:Mc,Text:Nc},Pc=re` 443 0% { 444 opacity: 0.8; 445 } 446 50% { 447 opacity: 0.3; 448 } 449 100% { 450 opacity: 0.8; 451 } 452`,Fc=re` 453 to { 454 background-position-x: -200%; 455 } 456`,Ic={breath:O` 457 opacity: 0.8; 458 background-color: #fff; 459 border-radius: 4px; 460 animation: 2s ease-in-out 0.5s infinite normal none running ${Pc}; 461 `,wave:O` 462 background-color: #fff; 463 background-image: linear-gradient( 464 110deg, 465 rgba(220, 220, 220, 0.5) 20%, 466 rgba(255, 255, 255, 0.8) 35%, 467 rgba(255, 255, 255, 0.8) 45%, 468 rgba(220, 220, 220, 0.5) 60% 469 ); 470 border-radius: 4px; 471 background-size: 200% 100%; 472 animation: 1.5s ${Fc} linear infinite; 473 `},Lc={root:O` 474 box-sizing: border-box; 475 width: 100%; 476 height: 100%; 477 padding: 2rem; 478 @media (max-width: 650px) { 479 padding: 0; 480 } 481 `,header:O` 482 box-sizing: border-box; 483 display: flex; 484 align-items: end; 485 justify-content: space-between; 486 padding: 16px; 487 border-bottom-left-radius: 10px; 488 border-bottom-right-radius: 10px; 489 box-shadow: 0 3px 6px #00000029; 490 491 @media (min-width: 650px) { 492 background: none; 493 box-shadow: none; 494 padding: 0; 495 } 496 `,logo:O` 497 display: flex; 498 flex-direction: column; 499 gap: 5px; 500 `,nav:O` 501 display: flex; 502 align-items: center; 503 gap: 15px; 504 @media (max-width: 650px) { 505 display: none; 506 }
507 `,footer:O` 508 box-sizing: border-box; 509 position: fixed; 510 left: 0; 511 bottom: 0; 512 width: 100%; 513 padding: 15px; 514 box-shadow: 0 3px 6px #00000029; 515 display: flex; 516 align-items: center; 517 justify-content: space-between; 518 @media (min-width: 650px) { 519 display: none; 520 } 521 `,content:O` 522 box-sizing: border-box; 523 width: 60%; 524 max-width: 800px; 525 margin: 0 auto; 526 @media (max-width: 1200px) { 527 width: 70%; 528 } 529 @media (max-width: 650px) { 530 width: 100%; 531 } 532 `},Rc=re` 533 0% { 534 transform: rotate(0deg); 535 } 536 100% { 537 transform: rotate(360deg); 538 } 539`,zc={wrapper:O` 540 display: flex; 541 justify-content: center; 542 align-items: center; 543 width: 100%; 544 padding: 10px; 545 `,spinner:O` 546 border: 5px solid #ccc; 547 border-top: 5px solid #2b2d30; 548 border-radius: 50%; 549 width: 50px; 550 height: 50px; 551 animation: ${Rc} 1s linear infinite; 552 `},Bc=()=>(0,N.jsxs)(`div`,{className:Hc.container,children:[(0,N.jsx)(`div`,{className:Hc.header,children:(0,N.jsxs)(M.Suspense,{fallback:(0,N.jsx)(lf,{}),children:[(0,N.jsx)(Es,{}),(0,N.jsx)(kc,{})]})}),(0,N.jsx)(`main`,{className:Hc.mainSection,children:(0,N.jsx)(M.Suspense,{fallback:(0,N.jsx)(uf,{style:{minHeight:250}}),children:(0,N.jsx)(fe,{})})})]}),Vc=Yd(`/`)(Bc),Hc={mainSection:O` 553 min-width: 60%; 554 max-width: 100%; 555 width: min-content; 556 display: flex; 557 margin: 0 auto; 558 @media (max-width: 1200px) { 559 min-width: 70%; 560 } 561 @media (max-width: 650px) { 562 min-width: 100%; 563 padding-bottom: 70px; 564 } 565 `,container:O` 566 display: flex; 567 flex-direction: column; 568 justify-content: center; 569 padding: 2rem; 570 @media (max-width: 650px) { 571 padding: 0; 572 } 573 `,header:O` 574 display: flex; 575 flex-grow: 1; 576 flex-direction: row; 577 justify-content: space-between; 578 z-index: 1; 579 `},Uc=({children:e,policy:t=`registered`})=>{let{patient:n,clinic:r}=Xd(),{tenant:i}=Z(),{i18n:a}=_();if(t===`public`)return(0,N.jsx)(N.Fragment,{children:e});let{isBlocked:o}=n,s=!n.isRegistered,c=r.settings.general.allowRegisterNewPatient;return(t===`onboarding`?o||s&&!c:o||s)?(0,N.jsx)(pe,{to:`/${i}/?lng=${a.language}`,replace:!0}):(0,N.jsx)(N.Fragment,{children:e})},Wc=M.memo(df),Gc=({url:e,className:t})=>e?(0,N.jsx)(`img`,{src:e,alt:`Avatar`,className:D(Kc.base,Kc.image,t),crossOrigin:``}):(0,N.jsx)(Wc,{className:D(Kc.base,t)}),Kc={base:O` 580 flex: 40px 0 0; 581 width: 40px; 582 height: 40px; 583 color: #ebebeb; 584 `,image:O` 585 border-radius: 50%; 586 `},qc=M.memo(ff),Jc=M.memo(pf),Yc=({start:e,duration:t,type:n,physicianName:r,receptionName:i,departmentName:a,profileImage:o,employmentType:s,disabledCancellation:c,onCancel:l,onReschedule:u})=>{let{isDepartmentBased:d}=mf(),{t:f}=_(),p=(0,pt.default)(e),m=p.add(t,`minutes`),h=`${p.format(`dddd DD MMMM`)} ${f(`Appointments.at`)} ${p.format(`HH:mm`)}-${m.format(`HH:mm`)}`;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{className:W.tile,"data-testid":`AT_PhysicianDetails`,children:[(0,N.jsx)(Gc,{url:o,className:W.physicianPic}),(0,N.jsxs)(`div`,{className:W.info,children:[(0,N.jsx)(`h3`,{className:W.infoTitle,children:d?a:r}),(0,N.jsx)(`span`,{children:d?i:f(`EmploymentTypes.${s.toLowerCase()}`)})]})]}),(0,N.jsx)(`div`,{className:W.tile,"data-testid":`AT_AppointmentDetails`,children:(0,N.jsxs)(`div`,{className:W.info,children:[(0,N.jsx)(`h3`,{className:W.infoTitle,children:`${n}, ${t} ${f(`Appointments.durationMinutes`)}`}),(0,N.jsx)(`span`,{children:h})]})}),c?(0,N.jsx)(`div`,{className:W.rescheduleContainer,children:(0,N.jsx)(P,{name:`rescheduleAppointment`,filled:!0,onClick:u,"data-testid":`AT_RescheduleAppointmentBtn`,children:f(`Appointments.rescheduleAppointment`)})}):(0,N.jsxs)(`div`,{className:W.menuPanel,children:[(0,N.jsxs)(`button`,{name:`cancelAppointment`,className:D(W.tile,W.menuTile),onClick:l,"data-testid":`AT_CancelAppointmentBtn`,children:[(0,N.jsx)(qc,{}),(0,N.jsx)(`span`,{children:f(`Appointments.cancelAppointment`)})]}),(0,N.jsxs)(`button`,{className:D(W.tile,W.menuTile),onClick:u,"data-testid":`AT_RescheduleAppointmentBtn`,children:[(0,N.jsx)(Jc,{}),(0,N.jsx)(`span`,{children:f(`Appointments.rescheduleAppointment`)})]})]})]})},W={info:O` 587 display: flex; 588 flex-direction: column; 589 justify-content: center;
590 align-items: flex-start; 591 font-size: 18px; 592 font-weight: 300; 593 line-height: 27px; 594 `,infoTitle:O` 595 font-size: 18px; 596 font-weight: 600; 597 margin-block-end: 0; 598 margin-block-start: 0; 599 text-align: start; 600 `,physicianPic:O` 601 margin-right: 16px; 602 flex: 64px 0 0; 603 width: 64px; 604 height: 64px; 605 `,tile:O` 606 background-color: #ffffff; 607 border-radius: 10px; 608 color: #000000; 609 box-shadow: 0px 3px 6px #00000029; 610 padding: 16px; 611 display: flex; 612 flex-direction: row; 613 justify-content: flex-start; 614 align-items: center; 615 width: 100%; 616 box-sizing: border-box; 617 margin-bottom: 16px; 618 :last-of-type { 619 margin-bottom: 0; 620 } 621 :first-of-type { 622 height: 90px; 623 padding-left: 10px; 624 } 625 `,menuPanel:O` 626 display: flex; 627 width: 100%; 628 height: 90px; 629 gap: 24px; 630 `,rescheduleContainer:O` 631 width: 100%; 632 display: flex; 633 justify-content: flex-end; 634 `,menuTile:O` 635 justify-content: center; 636 cursor: pointer; 637 font-size: 12px; 638 font-weight: bold; 639 text-align: center; 640 display: flex; 641 flex-direction: column; 642 gap: 12px; 643 padding: 0 !important; 644 border: none; 645 :disabled { 646 opacity: 0.5; 647 cursor: default; 648 } 649 `},Xc=48,Zc=()=>{let{t:e}=_(),{mutateAsync:t}=B.useDeletePatientPortalAppointments(),n=H(),{tenant:r}=Z(),{show:i}=Q(),a=Ee(),{clinic:o}=Xd(),{general:s}=o.settings,{isDepartmentBased:c}=mf(),{isOpen:l,openModal:u,closeModal:d,message:f,handleConfirm:p}=ps(),{isOpen:m,openModal:h,closeModal:g,title:v}=ps(),y=async t=>{let{start:i,appointmentId:a,locked:o,rescheduledByPatientCount:c}=t;if(!a||o||i&&F(i).diff(F(new Date),`hour`)<Xc||s.appointmentRescheduleCount!=null&&c!==void 0&&s.appointmentRescheduleCount<=c){h({title:e(`Appointments.editAppointment`)??``});return}n(`/${r}/appointments/edit/${a}`)},b=async(o,s=!1)=>{if(o){d();try{await t({appointmentId:o}),i({type:z.Success,message:e(s?`Appointments.cancelRefundSuccess`:`Appointments.cancelAppointmentSuccess`),title:e(`Appointments.cancelAppointmentToastTitle`)}),await a.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointments`)}),n(`/${r}`)}catch(t){if(V(t)&&t.response.data.errorCode===`OnlineRefundFailed`){h({title:e(`Appointments.cancelAppointment`)??``}),await a.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointments`)});return}V(t)&&t.response.data.errorCode===`AppointmentCanNotBeChanged`?i({type:z.Error,message:e(`BookAppointment.appointmentCanNotBeChangedMessage`),title:e(`BookAppointment.appointmentCanNotBeChangedTitle`)}):V(t)&&t.response.data.errorCode===`AppointmentNotFound`?i({type:z.Error,message:e(`BookAppointment.appointmentNotFoundMessage`),title:e(`BookAppointment.appointmentNotFoundTitle`)}):i({type:z.Error,message:e(`Appointments.cancelAppointmentError`),title:e(`Appointments.cancelAppointmentToastTitle`)}),await a.invalidateQueries({queryKey:B.getKeyByAlias(`getPatientPortalAppointments`)}),n(`/${r}`)}}},ee=t=>{let{start:n,appointmentId:r,physician:i,locked:a}=t;if(s.disableAppointmentCancellation||F(n).diff(F(new Date),`hour`)<Xc||a){h({title:e(`Appointments.cancelAppointment`)??``});return}let o=!!t.invoiceId;u({message:x(n||``,i?.fullName??``,o),handleConfirm:()=>b(r,o)})},x=(t,n,r)=>{let i=F(t),a=`${e(`Appointments.cancelConfirmation`)} ${i.format(`dddd`)}${e(`Appointments.dayPostfix`)} ${i.format(`DD MMMM`)} ${e(`Appointments.at`)} ${F(t).format(`HH:mm`)}${c?``:` ${e(`Appointments.with`)} ${n}`}?`;return r?`${a} ${e(`Appointments.cancelRefundNotice`)}`:a};return{onEdit:y,onCancel:ee,cancelAppointmentMessage:f,confirmAppointmentCancel:p,closeCancelAppointmentModal:d,closeAppointmentChangeAlert:g,appointmentChangeAlertTitle:v,isAppointmentChangeAlertOpen:m,isConfirmCancelAppointmentOpen:l}},Qc={container:O` 650 display: flex; 651 flex-direction: column; 652 justify-content: center; 653 align-items: flex-start; 654 padding: 24px 19px; 655 box-sizing: border-box; 656 width: 100%; 657 margin: 0 auto; 658 `},$c=M.forwardRef(gf),el=M.memo($c),tl=M.forwardRef(_f),nl=M.memo(tl),rl=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,il=/CrOS/,al=/android|ipad|playbook|silk/i,ol=typeof window<`u`&&window.matchMedia(`(display-mode: standalone)`).matches,sl=({items:e,placeholder:t,formatRemaining:n=e=>` (+${e})`})=>{let r=(0,M.useRef)(null);return Tf(r,(r,i)=>{let a=e.filter(e=>e);if(a.length===0){i.textContent=t??``;return}if(i.textContent=a.join(`, `),a.length<1)return;let o=document.createElement(`span`);o.style.position=`absolute`,o.style.opacity=`0`,o.style.whiteSpace=`nowrap`,o.style.pointerEvents=`none`,i.appendChild(o);for(let e=1;e<=a.length;e++)if(o.textContent=Ef(a,e,n),o.getBoundingClientRect().width>r.width){if(e===1){for(let e=a[0].length-1;e>=0;e--)if(o.textContent=Df(a,e),o.getBoundingClientRect().width<=r.width){i.removeChild(o),i.textContent=Df(a,e);return}}i.removeChild(o),i.textContent=Ef(a,e-1,n);return}i.removeChild(o),i.textContent=a.join(`, `)}
658,[e,t,n]),(0,N.jsx)(`span`,{ref:r,style:{display:`inline-block`,position:`relative`,width:`100%`,whiteSpace:`nowrap`},children:t})},cl=({fixed:e=!1,overlay:t=!1,anchor:n,children:r,className:i,...a},o)=>{let s=(0,M.useRef)(null);(0,M.useImperativeHandle)(o,()=>s.current,[]);let c=(0,M.useMemo)(()=>{let e=document.createElement(`div`);return e.style.position=`absolute`,e.style.top=`0`,e.style.left=`0`,e},[]);Tf(n,t=>{let n=s.current;if(e||!n)return;let{height:r}=n.getBoundingClientRect(),i=window.innerHeight<t.bottom+r?t.top-r-5:t.bottom+5;n.style.transform=`translate3d(${t.left}px, ${i}px, 0)`,n.style.minWidth=`${t.width}px`}),(0,M.useLayoutEffect)(()=>(document.body.appendChild(c),()=>{document.body.removeChild(c)}),[c]),(0,M.useEffect)(()=>{let t=s.current,r=n?.current;if(!e||!t||!r)return;let{height:i}=t.getBoundingClientRect(),{bottom:a}=r.getBoundingClientRect(),o=Math.max(0,i-(window.innerHeight-a)+15);Of(r).scrollBy({top:o,behavior:`smooth`})},[e,n]);let l=[t&&(0,N.jsx)(`div`,{className:ll.overlay},`overlay`),(0,N.jsx)(`div`,{ref:s,className:D(i,e?ll.fixed:ll.relative),tabIndex:-1,...a,children:r},`wrapper`)];return Ze.createPortal(l,c)},ll={overlay:O` 659 position: fixed; 660 top: 0; 661 left: 0; 662 right: 0; 663 bottom: 0; 664 background-color: rgba(0, 0, 0, 0.3); 665 z-index: 9999; 666 `,relative:O` 667 position: fixed; 668 top: 0; 669 left: 0; 670 z-index: 9999; 671 `,fixed:O` 672 position: fixed; 673 bottom: 0; 674 width: 100%; 675 z-index: 9999; 676 `},ul=M.forwardRef(cl),dl=M.memo(ul),fl=(e,t,n)=>{let[r,i]=(0,M.useState)([]),a=(0,M.useRef)(t);a.current=t,(0,M.useEffect)(()=>{let{current:t}=e;if(!t)return()=>{};let n=e=>{let t=e.target,n=Array.from(t.selectedOptions).map(({value:e})=>e);i(a.current.filter(e=>n.includes(e.value)))};return t.addEventListener(`change`,n),t.dispatchEvent(new Event(`change`,{bubbles:!0})),()=>t.removeEventListener(`change`,n)},[e,n.value]);let o=(0,M.useCallback)(t=>{let{current:n}=e;if(!n)return;let r=!1;n.querySelectorAll(`option`).forEach(e=>{let n=t.some(({value:t})=>t===e.value);e.selected!==n&&(e.selected=n,r=!0)}),r&&n.dispatchEvent(new Event(`change`,{bubbles:!0}))},[e]),s=t.filter(e=>r.findIndex(t=>t.value===e.value)!==-1||e.selected).map(({value:e})=>e);return[t.map(e=>({...e,selected:e.selected===void 0?r.findIndex(({value:t})=>t===e.value)!==-1:e.selected})),o,(0,N.jsxs)(`select`,{ref:e,value:n.multiple?s:s[0],...n,tabIndex:-1,style:{pointerEvents:`none`},autoFocus:!1,onFocus:e=>e.target.blur(),children:[(0,N.jsx)(`option`,{},`empty`),t.map(({value:e})=>(0,N.jsx)(`option`,{value:e,children:e},e))]},`native-select`)]},pl=({option:e,highlighted:t,...n})=>{let r=(0,M.useRef)(null);return(0,M.useEffect)(()=>{t&&(r.current?.scrollIntoView({behavior:`smooth`,block:`nearest`}),r.current?.focus({preventScroll:!0}))},[t]),e.hidden?null:(0,N.jsx)(`div`,{ref:r,tabIndex:t?0:-1,className:D(G.option,e.selected&&G.optionSelected,e.disabled&&G.disabled,t&&G.optionHighlighted),role:`option`,"aria-selected":!!e.selected,"aria-disabled":!!e.disabled,...n,children:e.label})},ml=({children:e,mobile:t})=>t?(0,N.jsx)(`div`,{className:D(G.mobileInnerScroll),children:e}):(0,N.jsx)(N.Fragment,{children:e}),hl=({label:e,options:t,mobile:n=vf(),overlay:r=!1,search:i=!1,resettable:a=!1,hint:o,error:s,...c},l)=>{let u=(0,M.useMemo)(()=>c.id||c.name||(Math.random()*46656).toString(36).slice(-6),[c.id,c.name]),d={id:u,...c},f=(0,M.useRef)(null);(0,M.useImperativeHandle)(l,()=>f.current,[]);let[p,m,h]=fl(f,t,d),g=p.filter(e=>e.selected),[_=g[0]||t[0],v]=(0,M.useState)(),y=(0,M.useRef)(null),[b,ee]=(0,M.useState)(!1),[x,S]=(0,M.useState)(``),te=()=>ee(!0),C=()=>{b&&(ee(!1),v(void 0),d.multiple||(f.current?.focus(),f.current?.blur()),y.current?.focus(),S(``))},w=()=>{d.disabled||(b?C():te())},T=e=>{if(!e)return;let t=g.filter(t=>t.value!==e.value&&t.neighbors!==!1);g.every(t=>t.value!==e.value)&&((!d.multiple||e.neighbors===!1)&&t.splice(0,t.length),t.push(e)),(t.length>0||a)&&m(t),(!d.multiple||e.neighbors===!1)&&C()},ne=()=>C(),E=e=>{b&&!d.disabled&&(e.key===`Escape`||e.key===`Tab`?C():e.key===`ArrowUp`||e.key===`ArrowDown`?
676(e.preventDefault(),O(e.key===`ArrowUp`?-1:1)):e.key===`Enter`?(e.preventDefault(),d.multiple?C():T(_)):e.key===` `&&(e.preventDefault(),T(_)))},O=e=>{let n=(t.findIndex(({value:e})=>_.value===e)+e)%t.length;n<0&&(n+=t.length),v(t[n])},re=e=>{S(e.target.value)},ie=(0,M.useMemo)(()=>p.filter(e=>e.label.toLowerCase().includes(x.toLowerCase())),[p,x]),ae=(0,M.useRef)(null),oe=(0,M.useRef)(null);return Cf([ae,oe],ne),(0,N.jsxs)(`div`,{ref:ae,className:D(G.selectWrapper,d.disabled&&G.disabled),onKeyDown:E,children:[(0,N.jsxs)(`label`,{className:G.label,htmlFor:`${u}-btn`,children:[d.required&&(0,N.jsx)(`span`,{"aria-hidden":`true`,children:`*`}),e]}),(0,N.jsx)(`button`,{id:`${u}-btn`,ref:y,className:D(G.selectButton,!d.multiple&&G.ellipsis,s&&G.invalid),onClick:w,type:`button`,"aria-disabled":d.disabled,"aria-haspopup":`listbox`,"aria-expanded":b,children:(0,N.jsx)(sl,{items:g.length>0?g.map(e=>e.label):[d.placeholder||``]})}),(0,N.jsx)(`div`,{className:G.hidden,"aria-hidden":`true`,children:h}),o&&(0,N.jsx)(`div`,{id:`${u}-hint`,className:G.hit,children:o}),s&&(0,N.jsx)(`div`,{id:`${u}-error`,className:G.error,children:s}),b&&(0,N.jsxs)(dl,{ref:oe,anchor:y,fixed:n,overlay:r,children:[n&&(0,N.jsxs)(`div`,{className:G.actions,children:[(0,N.jsx)(`button`,{className:G.actionButton,onClick:C,"aria-label":`close select`,type:`button`,children:(0,N.jsx)(nl,{})}),(0,N.jsx)(`span`,{className:G.actionLabel,children:d.placeholder}),(0,N.jsx)(`button`,{className:G.actionButton,onClick:ne,type:`button`,"aria-label":`select item`,children:g.length>1?(0,N.jsx)(el,{}):(0,N.jsx)(uc,{})})]}),i&&(0,N.jsx)(`input`,{type:`text`,className:G.searchInput,placeholder:`Search`,value:x,onChange:re}),(0,N.jsx)(`div`,{className:D(G.optionWrapper,n?G.mobileWrapper:G.desktopWrapper),style:{marginBottom:ol?16:0},role:`listbox`,tabIndex:-1,children:(0,N.jsx)(ml,{mobile:n,children:ie.map((e,t)=>(0,N.jsx)(pl,{option:e,highlighted:_?e.value===_.value:t===0,onClick:()=>T(e),onMouseMove:()=>v(e)},e.value))})})]})]})},gl=M.forwardRef(hl),_l=M.memo(gl),G={selectWrapper:O` 677 position: relative; 678 display: block; 679 width: 100%; 680 margin: 8px 0; 681 `,disabled:O` 682 opacity: 0.5; 683 pointer-events: none; 684 `,label:O` 685 display: block; 686 font-size: 12px; 687 line-height: 19px; 688 padding-left: 4px; 689 `,selectButton:O` 690 position: relative; 691 box-sizing: border-box; 692 min-height: 40px; 693 padding: 8px 30px 8px 16px; 694 border: none; 695 border-radius: 6px; 696 background-color: #fff; 697 color: currentColor; 698 appearance: none; 699 text-align: left; 700 font-size: 14px; 701 line-height: 21px; 702 cursor: pointer; 703 width: 100%; 704 box-shadow: 0 3px 6px #00000029; 705 &::after { 706 content: ''; 707 position: absolute; 708 right: 12px; 709 top: calc(50% - 3px); 710 width: 0; 711 height: 0; 712 border: 7px solid #1a262d; 713 border-left-color: transparent; 714 border-right-color: transparent; 715 border-bottom-width: 0; 716 transition: all 0.3s; 717 clear: both; 718 } 719 `,ellipsis:O` 720 text-overflow: ellipsis; 721 white-space: nowrap; 722 overflow: hidden; 723 `,invalid:O` 724 outline: 2px solid red; 725 &::after { 726 border-top-color: red; 727 } 728 `,hit:O` 729 font-size: 10px; 730 color: #1a262d; 731 `,error:O` 732 font-size: 10px; 733 color: red; 734 `,optionWrapper:O` 735 box-sizing: border-box; 736 background-color: #fff; 737 box-shadow: 0 3px 6px #00000029; 738 max-height: 350px; 739 overflow: auto; 740 `,mobileWrapper:O` 741 text-align: center; 742 min-height: 200px; 743 block-size: clamp(200px, 50dvh, 350px); 744 min-block-size: 200px; 745 max-block-size: 350px; 746 `,desktopWrapper:O` 747 border-radius: 6px; 748 `,mobileInnerScroll:O` 749 min-block-size: 100%; 750 display: flex; 751 flex-direction: column; 752 align-items: center; 753 justify-content: center; 754 `,option:O` 755 box-sizing: border-box; 756 padding: 5px 16px; 757 cursor: pointer; 758 line-height: 25px; 759 min-height: 35px; 760 width: 100%; 761 font-size: 14px; 762 `,optionSelected:O` 763 background-color: #f2f2f2; 764 `,optionHighlighted:O` 765 background-color: #f8f8f8; 766 `,searchInput:O` 767 padding: 5px 15px; 768 width: 100%; 769 border: none; 770 margin: 5px 0; 771 `,actions:O` 772 display: flex; 773 background-color: #ebebeb; 774 justify-content: space-between; 775 vertical-align: baseline; 776 `,actionLabel:O`
777 align-self: center; 778 font-size: 14px; 779 line-height: 21px; 780 `,actionButton:O` 781 line-height: 20px; 782 padding: 5px 10px; 783 cursor: pointer; 784 height: 60px; 785 width: 68px; 786 border: none; 787 background: none; 788 font-size: 22px; 789 color: currentColor; 790 `,hidden:O` 791 border: 0; 792 clip: rect(0px, 0px, 0px, 0px); 793 clip-path: inset(50%); 794 height: 1px; 795 margin: -1px; 796 overflow: hidden; 797 padding: 0; 798 position: absolute; 799 width: 1px; 800 white-space: nowrap; 801 `},vl=({label:e,error:t,...n},r)=>{let i=n.id||n.name||(Math.random()*46656).toString(36).slice(-6),a={id:i,...n};return(0,N.jsxs)(`label`,{className:xl.root,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`input`,{ref:r,className:xl.input,type:`checkbox`,"aria-label":typeof e==`string`?e:void 0,"aria-required":a.required,"aria-invalid":!!t,"aria-describedby":t?`${i}-error`:`${i}-label`,...a}),(0,N.jsx)(`div`,{className:D(xl.checkbox,t&&xl.invalid),children:(0,N.jsx)(`svg`,{viewBox:`0 0 18 18`,width:18,height:18,"aria-hidden":`true`,children:(0,N.jsx)(`polyline`,{points:`1 9 7 14 15 4`})})})]}),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{id:`${i}-label`,children:[a.required&&(0,N.jsx)(`span`,{"aria-hidden":`true`,children:`*`}),e]}),t&&(0,N.jsx)(`div`,{id:`${i}-error`,className:xl.error,children:t})]})]})},yl=M.forwardRef(vl),bl=M.memo(yl),xl={root:O` 802 display: flex; 803 flex-direction: row; 804 gap: 8px; 805 margin: 8px 0; 806 font-size: 12px; 807 color: #1a262d; 808 cursor: pointer; 809 `,input:O` 810 border: 0; 811 clip: rect(0px, 0px, 0px, 0px); 812 clip-path: inset(50%); 813 height: 1px; 814 margin: -1px; 815 overflow: hidden; 816 padding: 0; 817 position: absolute; 818 width: 1px; 819 white-space: nowrap; 820 &:checked + * { 821 background: #4d5677; 822 svg { 823 stroke-dashoffset: 44px; 824 } 825 } 826 `,checkbox:O` 827 display: inline-block; 828 width: 24px; 829 height: 24px; 830 padding: 3px 4px; 831 background: #fff; 832 box-sizing: border-box; 833 box-shadow: 0 3px 6px #00000029; 834 border: none; 835 border-radius: 6px; 836 transition: all 0.2s; 837 svg { 838 fill: none; 839 stroke: #fff; 840 stroke-width: 3px; 841 stroke-dasharray: 22; 842 stroke-dashoffset: 66px; 843 transition: all 0.2s ease-in-out 0.1s; 844 } 845 `,invalid:O` 846 outline: 2px solid red; 847 `,error:O` 848 font-size: 10px; 849 color: red; 850 `},Sl=Ho.LegalTextType.enum,Cl={termsAndConditionsAccepted:!1,privacyPolicyAccepted:!1},wl=({termsAndConditionsAccepted:e,privacyPolicyAccepted:t})=>e&&t,Tl={container:O` 851 display: flex; 852 flex-direction: column; 853 & > label { 854 align-items: center; 855 } 856 `,link:O` 857 display: inline; 858 padding: 0; 859 border: none; 860 background: none; 861 font: inherit; 862 color: #535bf2; 863 cursor: pointer; 864 `,legalText:O` 865 background: #f6f7f9; 866 border-radius: 10px; 867 padding: 12px 16px; 868 max-height: 55vh; 869 overflow-y: auto; 870 overflow-wrap: anywhere; 871 white-space: normal; 872 font-size: 12px; 873 `,modal:O` 874 top: 0; 875 bottom: 0; 876 left: 0; 877 right: 0; 878 width: fit-content; 879 height: fit-content; 880 margin: auto; 881 max-width: min(32em, calc(100vw - 2em)); 882 `,cancel:O` 883 @media (max-width: 650px) { 884 max-width: 100%; 885 } 886 `},El=({message:e})=>(0,N.jsx)(`div`,{className:Dl.root,children:(0,N.jsx)(`p`,{children:e})}),Dl={root:O` 887 box-sizing: border-box; 888 background-color: #ebebeb; 889 box-shadow: 0 3px 6px #00000029; 890 border-radius: 10px; 891 font-style: italic; 892 padding: 16px 10px; 893 margin-bottom: 24px; 894 font-size: 14px; 895 width: 100%; 896 white-space: break-spaces; 897 p { 898 background-color: #f8f8f8; 899 box-shadow: 0 3px 6px #00000029; 900 border-radius: 10px; 901 padding: 24px; 902 margin: 0; 903 } 904 `},Ol={container:O` 905 width: 100%; 906 padding: 24px 16px; 907 display: flex; 908 justify-content: center; 909 `,card:O` 910 display: flex; 911 flex-direction: column; 912 align-items: center; 913 gap: 8px; 914 width: 100%; 915 padding: 32px 24px; 916 text-align: center; 917 background: #ffffff; 918 border-radius: 8px; 919 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); 920 `,heading:O` 921 color: #4d5678; 922 font-size: 20px; 923 font-weight: 700; 924 margin: 16px 0 0; 925 `,message:O` 926 color: #4d5678; 927 font-size: 16px; 928 margin: 0; 929 white-space: pre-line; 930 `},kl=()=>{let e=(0,M.useContext)(dt);if(!e)throw Error(`useConfirm must be used within a ConfirmProvider`);return e}
930,Al=({isDirty:e=!1,title:t,message:n,confirmButtonText:r,cancelButtonText:i,onConfirm:a,onCancel:o})=>{let s=ie(({currentLocation:t,nextLocation:n})=>{if(!e)return!1;let r=new URLSearchParams(t.search),i=new URLSearchParams(n.search),a=r.get(`lng`),o=i.get(`lng`);return r.delete(`lng`),i.delete(`lng`),t.pathname!==n.pathname||r.toString()!==i.toString()||a===o}),{show:c}=kl(),l=(0,M.useCallback)(()=>e?new Promise(e=>{c({title:t,message:n,confirmButtonText:r,cancelButtonText:i,onConfirm:()=>{a?.(),e(!0)},onCancel:()=>{o?.(),e(!0)},onClose:()=>{e(!1)}})}):Promise.resolve(!0),[i,r,e,o,a,c,n,t]);return(0,M.useEffect)(()=>{s.state===`blocked`&&l().then(e=>{e?s.proceed():s.reset()})},[s,l]),(0,M.useEffect)(()=>{let t=e=>(e.preventDefault(),n);return e&&window.addEventListener(`beforeunload`,t,{capture:!0}),()=>{window.removeEventListener(`beforeunload`,t,{capture:!0})}},[e,n]),{confirm:l}},jl=ac.Currency.enum,Ml=e=>typeof e==`number`&&e>0,Nl=8,K={tile:O` 931 display: flex; 932 flex-direction: column; 933 justify-content: flex-start; 934 align-items: flex-start; 935 background-color: #ffffff; 936 border-radius: 6px; 937 font-size: 14px; 938 color: #000000; 939 box-sizing: border-box; 940 padding: 16px 28px; 941 box-shadow: 0px 3px 6px #00000029; 942 margin-bottom: 16px; 943 width: 100%; 944 text-align: start; 945 margin-top: 16px; 946 overflow-wrap: anywhere; 947 :last-of-type { 948 margin-bottom: 0; 949 } 950 `,datePanel:O` 951 margin: auto; 952 font-size: 18px; 953 `,arrow:O` 954 cursor: pointer; 955 margin: 0 8px; 956 margin-top: 2px; 957 color: #4d5677; 958 background: none; 959 border: none; 960 padding: 0; 961 svg { 962 width: 13.5px; 963 height: 23px; 964 } 965 :first-child { 966 svg { 967 transform: scale(-1, 1); 968 } 969 } 970 `,dateLabel:O` 971 vertical-align: top; 972 width: 200px; 973 display: inline-block; 974 text-align: center; 975 user-select: none; 976 white-space: break-spaces; 977 span { 978 /* noinspection CssInvalidPropertyValue */ 979 text-wrap: nowrap; 980 } 981 div { 982 display: flex; 983 flex-wrap: wrap; 984 justify-content: center; 985 width: 100%; 986 } 987 `,physician:O` 988 display: flex; 989 flex-direction: row; 990 align-items: center; 991 color: #4a4742; 992 font-size: 16px; 993 user-select: none; 994 `,physicianPic:O` 995 margin-right: 8px; 996 flex-shrink: 0; 997 `,dateBlock:O` 998 padding: 8px 0; 999 user-select: none; 1000 `,buttonLabel:O` 1001 height: 32px; 1002 width: 55px; 1003 cursor: pointer; 1004 color: black; 1005 border: 1px solid #d1d1d1; 1006 border-radius: 3px; 1007 transition: background-color 0.3s ease; 1008 display: flex; 1009 align-items: center; 1010 place-content: center; 1011 font-size: 12px; 1012 `,buttonLabelActive:O` 1013 background-color: #4d5677; 1014 color: white !important; 1015 `,hiddenRadio:O` 1016 display: none; 1017 `,slotsContainer:O` 1018 display: flex; 1019 flex-wrap: wrap; 1020 gap: 8px; 1021 padding-top: 8px; 1022 `,content:O` 1023 padding-top: 16px; 1024 `,noTimesContent:O` 1025 padding-top: 10px; 1026 `},Pl=1e3,Fl=`nexta:payment-result`,Il=`refresh`,Ll={emptyTimeSlots:O` 1027 display: flex; 1028 width: 100%; 1029 flex-direction: column; 1030 justify-content: center; 1031 align-items: center; 1032 text-align: center; 1033 background-color: #ffffff; 1034 border-radius: 6px; 1035 font-size: 14px; 1036 color: #000000; 1037 box-sizing: border-box; 1038 padding: 16px 28px; 1039 box-shadow: 0 3px 6px #00000029; 1040 margin-bottom: 16px; 1041 margin-top: 16px; 1042 overflow-wrap: anywhere; 1043 `,container:O` 1044 display: flex; 1045 width: 100%; 1046 flex-direction: column; 1047 justify-content: center; 1048 align-items: center; 1049 padding: 24px 19px; 1050 `,buttonContainer:O` 1051 display: flex; 1052 align-self: flex-end; 1053 margin-top: 16px; 1054 @media (max-width: 650px) { 1055 margin-top: 56px; 1056 align-self: center; 1057 } 1058 button[name='createAppointment'] { 1059 width: 155px; 1060 } 1061 `,paymentBar:O` 1062 align-self: stretch; 1063 justify-content: space-between; 1064 align-items: center; 1065 padding: 0px 24px; 1066 @media (max-width: 650px) { 1067 & > div { 1068 width: 100%; 1069 } 1070 margin-top: 16px; 1071 align-self: stretch; 1072 flex-direction: column; 1073 align-self: stretch; 1074 button[name='createAppointment'] { 1075 width: 100%; 1076 max-width: 100%; 1077 margin-top: 8px; 1078 } 1079 } 1080 `},Rl={container:O` 1081 display: flex; 1082 width: 100%; 1083 flex-direction: column; 1084 justify-content: center;
1085 align-items: center; 1086 padding: 24px 19px; 1087 `,buttonContainer:O` 1088 display: flex; 1089 align-self: flex-end; 1090 margin-top: 16px; 1091 @media (max-width: 650px) { 1092 margin-top: 56px; 1093 align-self: center; 1094 } 1095 button { 1096 width: 155px; 1097 } 1098 `,info:O` 1099 display: flex; 1100 flex-direction: column; 1101 background-color: #4d5677; 1102 color: white; 1103 width: 100%; 1104 height: 90px; 1105 justify-content: center; 1106 border-radius: 10px; 1107 padding: 16px; 1108 box-sizing: border-box; 1109 font-size: 14px; 1110 font-weight: lighter; 1111 `,recallAppointmentBox:O` 1112 background-color: #deb067; 1113 color: black; 1114 margin-bottom: 10px; 1115 `},zl=M.memo(ep),zl.displayName=`InvoiceIcon`,Bl=M.memo(tp),Vl=M.memo(np),Hl=M.memo(rp),Ul=M.memo(ip),Wl=({icon:e,heading:t,message:n,details:r,actions:i,loading:a,testId:o,children:s})=>(0,N.jsx)(`section`,{className:q.container,"data-testid":o,children:(0,N.jsx)(`div`,{className:q.card,children:a?(0,N.jsx)(uf,{}):(0,N.jsxs)(N.Fragment,{children:[e===`success`?(0,N.jsx)(Ul,{className:q.statusIcon,style:{color:`#20AA3B`}}):null,e===`failure`?(0,N.jsx)(Hl,{className:q.statusIcon,style:{color:`#d32f2f`}}):null,t?(0,N.jsx)(`h1`,{className:q.heading,children:t}):null,n?(0,N.jsx)(`p`,{className:q.subtext,children:n}):null,r&&r.length>0?(0,N.jsx)(`div`,{className:q.details,children:r.map(e=>(0,N.jsxs)(`div`,{className:q.detailRow,children:[(0,N.jsxs)(`span`,{className:q.detailLabel,children:[e.label,`:`]}),(0,N.jsx)(`span`,{className:q.detailValue,children:e.value})]},e.key))}):null,s?(0,N.jsx)(`div`,{className:q.childrenSlot,children:s}):null,i&&i.length>0?(0,N.jsx)(`div`,{className:q.buttons,children:i.map(e=>(0,N.jsxs)(P,{filled:e.filled,className:D(q.button,!e.filled&&q.backButton),disabled:e.disabled,onClick:e.onClick,"data-testid":e.testId,children:[e.icon,e.label]},e.key))}):null]})})}),q={container:O` 1116 width: 100%; 1117 padding: 24px 16px; 1118 display: flex; 1119 justify-content: center; 1120 1121 @media (min-width: 640px) { 1122 padding: 48px 16px; 1123 } 1124 `,card:O` 1125 display: flex; 1126 flex-direction: column; 1127 align-items: center; 1128 gap: 24px; 1129 text-align: center; 1130 background: #ffffff; 1131 border-radius: 8px; 1132 padding: 32px 24px; 1133 width: 100%; 1134 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); 1135 1136 @media (min-width: 640px) { 1137 padding: 40px 80px 32px; 1138 } 1139 `,heading:O` 1140 font-size: 24px; 1141 font-weight: 700; 1142 color: #4d5678; 1143 margin: 0; 1144 1145 @media (min-width: 640px) { 1146 font-size: 48px; 1147 } 1148 `,subtext:O` 1149 color: #4d5678; 1150 font-size: 16px; 1151 margin: 0; 1152 white-space: pre-line; 1153 line-height: 32px; 1154 font-weight: 600; 1155 1156 @media (min-width: 640px) { 1157 font-size: 24px; 1158 line-height: 32px; 1159 } 1160 `,details:O` 1161 width: 100%; 1162 background: #f5f5f5; 1163 border-radius: 4px; 1164 overflow: hidden; 1165 display: grid; 1166 grid-template-columns: auto auto; 1167 justify-content: center; 1168 column-gap: 32px; 1169 height: 128px; 1170 align-content: center; 1171 `,detailRow:O` 1172 display: contents; 1173 font-size: 16px; 1174 `,detailLabel:O` 1175 color: #4d5678; 1176 text-align: left; 1177 padding: 6px 0 6px 16px; 1178 font-weight: 600; 1179 `,detailValue:O` 1180 color: #4d5678; 1181 text-align: left; 1182 padding: 6px 16px 6px 0; 1183 font-weight: 700; 1184 `,childrenSlot:O` 1185 width: 100%; 1186 text-align: left; 1187 `,buttons:O` 1188 display: flex; 1189 flex-direction: column-reverse; 1190 gap: 16px; 1191 width: 100%; 1192 margin-top: 8px; 1193 1194 @media (min-width: 640px) { 1195 flex-direction: row; 1196 gap: 24px; 1197 } 1198 `,button:O` 1199 display: inline-flex; 1200 align-items: center; 1201 justify-content: center; 1202 gap: 16px; 1203 flex: 1; 1204 max-width: none !important; 1205 `,backButton:O` 1206 color: #4d5677; 1207 `,statusIcon:O` 1208 width: 80px; 1209 height: 80px; 1210 flex-shrink: 0; 1211 `},Gl={width:14,height:14,flexShrink:0},Kl=M.memo(op),ql=M.memo(sp),Jl=({patient:e})=>{let t=H(),{tenant:n}=Z(),{t:r}=_(),i=Ee(),{show:a}=Q(),[o,s]=(0,M.useState)(!1),c=B.usePutPatientPortalPatient(void 0,{onSuccess:async()=>{let e=B.getKeyByAlias(`getPatientPortalPatient`);await i.invalidateQueries({queryKey:e})}}),l=e.lastReminderDate?(0,pt.default)(e.lastReminderDate).add(6,`month`):(0,pt.default)(new Date);(0,M.useLayoutEffect)(()=>{let t=new URL(window.location.href);t.searchParams.has(`showReminder`)&&(e.isRegistered&&l.diff((0,pt.default)(new Date),`minute`)<=0&&s(!0),t.searchParams.delete(`showReminder`),window.history.replaceState(null,``,t.toString()))},[l,e.isRegistered]);let u=e.communications?.find(e=>e.communicationTypeId===`Mail`)?.contactPoint,d=e.communications?.filter(e=>e.communicationTypeId===`Sms`)?.map(e=>e.contactPoint).join(`, `),f=(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{children:r(`Home.updateInfoReminderDescription`)}),(0,N.jsxs)(`div`,{style:{paddingTop:10},children:[(0,N.jsxs)(`b`,{style:{fontWeight:`bold`},children:[r(`Home.updateInfoEmail`),`:`]}),` `,(0,N.jsx)(`span`,{style:{wordBreak:`break-all`},children:u})]}),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`b`,{style:{fontWeight:`bold`},children:[r(`Home.updateInfoMobile`),`:`]}),` `,(0,N.jsx)(`span`,{style:{wordBreak:`break-all`},children:d})]})]});return o?(0,N.jsx)(lt,{title:r(`Home.updateInfoReminderTitle`),message:f,isOpen:!0,onCancel:()=>{t(`/${n}/profile/edit`)},onConfirm:()=>{a({type:z.Success,message:r(`Home.infoUpdatedMessage`),title:r(`Home.infoUpdatedTitle`)}),c.mutate({healthInsuranceGroup:e.healthInsuranceGroup||0,danmarkInsurance:e.danmarkInsurance,digitalMailboxConsent:e.digitalMailboxConsent}),s(!1)}
1211,cancelButtonText:r(`Button.update`)??void 0,confirmButtonText:r(`Button.confirm`)??void 0,hideCloseButton:!0}):null},Yl=M.memo(cp),Xl=M.memo(lp),Zl=e=>{let{t}=_(),n=F(e.start),r=n.add(e.duration,`minutes`),i=If(`${n.format(`dddd`)} ${t(`Appointments.dayPostfix`)} ${n.format(`D`)}${t(`Appointments.dayNumberPostfix`)} ${n.format(`MMMM`)} ${t(`Appointments.at`)} ${n.format(`HH:mm`)}-${r.format(`HH:mm`)}`),{isDepartmentBased:a}=mf(),o=up();return(0,N.jsxs)(`div`,{ref:o,className:Ql.tile,children:[(0,N.jsxs)(`button`,{name:`Appointment`,className:Ql.tileButton,onClick:e.clickHandler,"data-testid":`AT_Appointment`,children:[(0,N.jsx)(Gc,{url:e.profileImage}),(0,N.jsxs)(`div`,{className:Ql.info,children:[(0,N.jsx)(`h3`,{className:Ql.infoTitle,children:`${e.type}, ${e.duration} ${t(`Appointments.durationMinutes`)}`}),(0,N.jsx)(`span`,{children:i}),a?(0,N.jsx)(`span`,{children:e.receptionName}):(0,N.jsxs)(`span`,{children:[t(`Appointments.practitioner`),`: `,e.physicianName]})]}),(0,N.jsx)(Cc,{style:{flex:`10px 0 0`,width:`10px`,height:`16px`}})]}),(0,N.jsxs)(`button`,{tabIndex:-1,className:Ql.menuButton,onClick:e.onEdit,style:{backgroundColor:`#929292`},"data-testid":`AT_EditAppointmentBtn`,children:[(0,N.jsx)(Xl,{}),(0,N.jsx)(`span`,{children:t(`Button.edit`)})]}),!e.disabledCancellation&&(0,N.jsxs)(`button`,{name:`cancelAppointmentMenuButton`,tabIndex:-1,className:Ql.menuButton,onClick:e.onCancel,style:{backgroundColor:`#c32121`},"data-testid":`AT_CancelAppointmentBtn`,children:[(0,N.jsx)(Yl,{}),(0,N.jsx)(`span`,{children:t(`Button.cancel`)})]})]})},Ql={tile:O` 1212 white-space: nowrap; 1213 background-color: #ffffff; 1214 border-radius: 10px; 1215 color: #000000; 1216 box-shadow: 0 3px 6px #00000029; 1217 padding: 0; 1218 width: 100%; 1219 box-sizing: border-box; 1220 margin-bottom: 19px; 1221 cursor: pointer; 1222 overflow: hidden; 1223 :last-of-type { 1224 margin-bottom: 0; 1225 } 1226 `,tileButton:O` 1227 box-sizing: border-box; 1228 display: inline-flex; 1229 vertical-align: middle; 1230 background-color: #ffffff; 1231 color: #000000; 1232 width: 100%; 1233 border-radius: 10px; 1234 border: none; 1235 padding: 16px; 1236 flex-direction: revert; 1237 justify-content: space-between; 1238 align-items: center; 1239 appearance: none; 1240 gap: 16px; 1241 `,info:O` 1242 display: flex; 1243 flex-direction: column; 1244 justify-content: center; 1245 align-items: flex-start; 1246 flex-grow: 1; 1247 font-size: 18px; 1248 font-weight: 300; 1249 line-height: 27px; 1250 text-align: left; 1251 white-space: normal; 1252 `,infoTitle:O` 1253 font-size: 18px; 1254 font-weight: 600; 1255 margin-block-end: 0; 1256 margin-block-start: 0; 1257 text-align: start; 1258 `,menuButton:O` 1259 display: inline-flex; 1260 vertical-align: middle; 1261 height: 100%; 1262 width: 60px; 1263 border: none; 1264 color: white; 1265 flex-direction: column; 1266 justify-content: center; 1267 align-items: center; 1268 gap: 5px; 1269 :disabled { 1270 opacity: 0.5; 1271 } 1272 `},$l={container:O` 1273 display: flex; 1274 flex-direction: column; 1275 justify-content: center; 1276 align-items: flex-start; 1277 padding: 24px 0px; 1278 box-sizing: border-box; 1279 width: 100%; 1280 margin: 0 auto; 1281 `,title:O` 1282 font-weight: 300; 1283 margin-bottom: 10px; 1284 `,noAppointments:O` 1285 font-size: 14px; 1286 font-weight: 300; 1287 font-style: italic; 1288 width: 100%; 1289 display: flex; 1290 align-self: flex-start; 1291 margin: 16px 0; 1292 `,appointmentsContainer:O` 1293 display: flex; 1294 flex-direction: column; 1295 width: 100%; 1296 `,noAppointmentsTile:O` 1297 background-color: #ffffff; 1298 color: #000000; 1299 border-radius: 10px; 1300 box-shadow: 0 3px 6px #00000029; 1301 padding: 16px; 1302 width: 100%; 1303 box-sizing: border-box; 1304 margin-bottom: 0; 1305 :last-of-type { 1306 margin-bottom: 0; 1307 } 1308 `,plannedContainer:O` 1309 margin-top: 24px; 1310 width: 100%; 1311 `,messageSection:O` 1312 display: flex; 1313 width: 100%; 1314 background-color: #d39129b3; 1315 border-radius: 10px; 1316 color: #ffffff; 1317 font-size: 14px; 1318 font-weight: 600; 1319 margin-top: 8px; 1320 padding: 24px 16px; 1321 white-space: pre-wrap; 1322 margin-bottom: 16px; 1323 `},eu=(e,t,n)=>{function r(e){switch(e){case`[PATIENT_NAME]`:return t.name||``;case`[CLINIC_NAME]`:return n?.name||``;case`[COMPANY_POSTAL_CODE]`:return t.company?.postalCode||``;case`[COMPANY_FULL_ADDRESS]`:return[t.company?.phoneNumber,[t.company?.streetAddress,t.company?.postalCode,t.company?.city].filter(
1323Boolean).join(`, `)].filter(Boolean).join(` 1324`)||``;case`[COMPANY_STREET_NAME]`:return t.company?.streetAddress||``;case`[COMPANY_PHONE_NUMBER]`:return t.company?.phoneNumber||``;default:return``}}let i={};return Object.entries(e).forEach(([e,t])=>{i[e]=(t||``).replaceAll(/\[([a-zA-Z]|[0-9]|_)+\]/gm,r)}),i},J={homePageContent:O` 1325 display: flex; 1326 width: 100%; 1327 flex-direction: column; 1328 justify-content: center; 1329 align-items: center; 1330 padding: 24px 19px; 1331 white-space: pre-wrap; 1332 `,clinicNameTile:O` 1333 display: flex; 1334 flex-direction: column; 1335 justify-content: center; 1336 align-items: center; 1337 background-color: #4d5677; 1338 box-shadow: 0 3px 6px #00000029; 1339 border-radius: 10px; 1340 font-size: 14px; 1341 color: #ffffff; 1342 padding: 24px; 1343 margin-bottom: 24px; 1344 width: 100%; 1345 box-sizing: border-box; 1346 `,unregisteredMessage:O` 1347 box-sizing: border-box; 1348 background-color: #ebebeb; 1349 box-shadow: 0 3px 6px #00000029; 1350 border-radius: 10px; 1351 font-style: italic; 1352 padding: 16px 10px; 1353 margin-bottom: 24px; 1354 font-size: 14px; 1355 width: 100%; 1356 p { 1357 background-color: #f8f8f8; 1358 box-shadow: 0 3px 6px #00000029; 1359 border-radius: 10px; 1360 padding: 24px; 1361 margin: 0; 1362 } 1363 `,tilesSection:e=>O` 1364 display: flex; 1365 flex-direction: row; 1366 gap: ${e?`20px`:`40px`}; 1367 width: 100%; 1368 `,tile:O` 1369 display: flex; 1370 flex-direction: column; 1371 justify-content: center; 1372 align-items: center; 1373 box-shadow: 0 3px 6px #00000029; 1374 background-color: #ffffff; 1375 border-radius: 10px; 1376 flex: 1; 1377 color: #4a4742; 1378 font-size: 12px; 1379 border: none; 1380 padding: 17px 0; 1381 cursor: pointer; 1382 1383 &:hover, 1384 &:focus-visible, 1385 &:active { 1386 background-color: #edeef1; 1387 } 1388 `,icon:O` 1389 margin-bottom: 10px; 1390 width: 30px; 1391 height: 30px; 1392 color: #4d5677; 1393 `,unpaidCount:O` 1394 color: #e53935; 1395 font-size: 11px; 1396 margin-top: 4px; 1397 font-weight: 600; 1398 `,registerContainer:O` 1399 width: 100%; 1400 display: flex; 1401 justify-content: flex-end; 1402 align-items: center; 1403 @media (max-width: 650px) { 1404 justify-content: center; 1405 } 1406 `,registerButton:O` 1407 width: 155px; 1408 `},kd([]),kd([]),tu=e=>{let t=e.reduce((e,t)=>(t.code&&t.name&&e.push({region:t.code,regionName:t.name}),e),[]),n=e.reduce((e,t)=>{let n=[];return t.districts?.forEach(e=>{t.code&&e.name&&e.code&&n.push({countryCode:``,region:t.code,districtName:e.name,district:e.code})}),e.push(...n),e},[]),r=e.reduce((e,t)=>(t.districts?.forEach(n=>{n.cityPostalCodes?.forEach(n=>{let r=t.districts?.filter(e=>e.cityPostalCodes?.some(({postalCode:e})=>e===n.postalCode));if(n.city&&r){let t=e.findIndex(e=>e.postalCode===n.postalCode);t===-1?e.push({city:n.city,postalCode:n.postalCode,district:r.map(({code:e})=>e||``),countryCode:``}):e[t].district.push(...r.map(({code:e})=>e||``))}})}),e),[]);return r.sort((e,t)=>e.postalCode-t.postalCode),{regions:t,postalCodes:r,municipalities:n}},nu={threshold:.1},ru=(e,t)=>{let n=(0,M.useRef)(null),r=(0,M.useRef)(null),i=(0,M.useCallback)(t=>{n.current=t,r.current&&(n.current&&r.current.unobserve(n.current),t&&e&&r.current.observe(t))},[e]);return(0,M.useEffect)(()=>{let i=n.current,a=new IntersectionObserver(n=>{e&&n[0]&&n[0].isIntersecting&&t()},nu);return i&&e&&a.observe(i),i&&!e&&a.unobserve(i),r.current=a,()=>{i&&a.unobserve(i),a.disconnect(),r.current=null}},[e,t]),i},iu=M.memo(pp),iu.displayName=`ReceiptIcon`,au=class e{constructor(e,t,n=hp(t)){i(this,`win`,void 0),i(this,`fileName`,void 0),i(this,`type`,void 0),this.win=e,this.fileName=t,this.type=n}static init(t,n){let r=window.open(`about:blank`,`_blank`);return r&&(r.document.title=t,n&&(r.document.body.innerText=n)),new e(r,t)}async open(e){try{let t=await fetch(e,{redirect:`follow`});if(!t.ok){this.openOrDownload(e);return}let n=await t.blob(),r=n.type===this.type?n:new Blob([n],{type:this.t
1408ype}),i=URL.createObjectURL(r);this.openOrDownload(i)}catch{this.openOrDownload(e)}}close(){this.win?.close(),this.win=null}openOrDownload(e){this.win&&mp(this.type)?(this.win.location.href=e,this.win.focus()):this.download(e)}download(e){if(!navigator.userActivation?.hasBeenActive){let t=this.win||window;t.location.href=e,t.focus();return}this.win?.close();let t=document.createElement(`a`);t.href=e,t.download=this.fileName,document.body.appendChild(t),t.click(),t.remove()}},ou={field:O` 1409 display: flex; 1410 align-self: stretch; 1411 justify-content: center; 1412 flex-direction: column; 1413 gap: 8px; 1414 `,label:O` 1415 font-weight: 400; 1416 line-height: 1; 1417 color: #4d5677; 1418 `,value:O` 1419 font-weight: 700; 1420 line-height: 1.2; 1421 white-space: nowrap; 1422 `},su={invoiceCard:O` 1423 display: grid; 1424 grid-template-columns: subgrid; 1425 grid-column: 1 / -1; 1426 align-items: center; 1427 width: 100%; 1428 padding: 16px 24px; 1429 border-radius: 10px; 1430 background: #ffffff; 1431 box-shadow: 0 10px 24px rgba(17, 24, 39, 0.13); 1432 1433 [data-numeric] { 1434 text-align: right; 1435 } 1436 1437 [data-area='report'] { 1438 text-align: right; 1439 } 1440 [data-area='total'] { 1441 min-width: 80px; 1442 } 1443 [data-area='unpaid'] { 1444 padding: 8px 16px; 1445 border-radius: 10px; 1446 background: #f6f7f9; 1447 } 1448 [data-area='docs'] { 1449 display: flex; 1450 flex-direction: column; 1451 flex-wrap: wrap; 1452 align-items: start; 1453 gap: 8px; 1454 min-width: 80px; 1455 grid-column: span 2; 1456 } 1457 [data-area='payment'] { 1458 grid-column: 1 / -1; 1459 display: flex; 1460 justify-content: space-between; 1461 align-items: center; 1462 gap: 16px; 1463 } 1464 1465 @media (max-width: 980px) { 1466 grid-template-rows: repeat(6, minmax(min-content, auto)); 1467 grid-template-areas: 1468 'creation state' 1469 'number report' 1470 'due subsidy' 1471 'total unpaid' 1472 'docs docs' 1473 'payment payment'; 1474 row-gap: 16px; 1475 padding: 16px; 1476 1477 [data-area='creation'] { 1478 grid-area: creation; 1479 } 1480 [data-area='state'] { 1481 grid-area: state; 1482 } 1483 [data-area='number'] { 1484 grid-area: number; 1485 } 1486 [data-area='report'] { 1487 grid-area: report; 1488 } 1489 [data-area='due'] { 1490 grid-area: due; 1491 } 1492 [data-area='subsidy'] { 1493 grid-area: subsidy; 1494 } 1495 [data-area='total'] { 1496 grid-area: total; 1497 } 1498 [data-area='unpaid'] { 1499 grid-area: unpaid; 1500 } 1501 [data-area='docs'] { 1502 grid-area: docs; 1503 } 1504 [data-area='payment'] { 1505 grid-area: payment; 1506 flex-direction: column; 1507 align-items: stretch; 1508 } 1509 1510 [data-numeric] { 1511 text-align: left; 1512 } 1513 [data-numeric][data-empty] div:last-child { 1514 opacity: 0.4; 1515 } 1516 [data-area='report'] { 1517 text-align: left; 1518 } 1519 1520 [data-area='total'], 1521 [data-area='unpaid'] { 1522 flex-direction: row; 1523 flex-wrap: wrap; 1524 align-items: center; 1525 padding: 8px; 1526 border-radius: 10px; 1527 background: #f6f7f9; 1528 } 1529 [data-area='docs'] { 1530 display: grid; 1531 grid-template-columns: repeat(2, minmax(min-content, 1fr)); 1532 gap: 12px; 1533 1534 &:last-child { 1535 grid-template-columns: subgrid; 1536 grid-column: 1 / -1; 1537 } 1538 & button:only-child { 1539 grid-column: span 2; 1540 } 1541 & button { 1542 box-shadow: inset 0 0 0 1px #dad9d9; 1543 padding: 6px; 1544 } 1545 & button:hover, 1546 & button:focus-visible { 1547 background-color: rgba(77, 86, 119, 0.85); 1548 box-shadow: none; 1549 color: #ffffff; 1550 } 1551 } 1552 [data-area='payment'] > button { 1553 width: 100%; 1554 max-width: 100%; 1555 } 1556 } 1557 `,docLink:O` 1558 display: inline-flex; 1559 align-items: center; 1560 gap: 6px; 1561 color: #4d5677; 1562 font-weight: 700; 1563 max-width: 100%; 1564 `,paymentArea:O` 1565 background-color: #f6f7f8; 1566 padding: 4px 16px; 1567 margin-top: 8px; 1568 border-radius: 10px; 1569 `},cu={invoicesList:O` 1570 display: grid; 1571 grid-template-columns: repeat(8, auto) repeat(2, min-content); 1572 column-gap: 12px; 1573 row-gap: 24px; 1574 font-size: 12px; 1575 width: 100%; 1576 1577 @media (max-width: 980px) { 1578 grid-template-columns: repeat(2, minmax(min-content, 1fr)); 1579 } 1580 `},lu=10,uu={container:O` 1581 padding: 24px 19px; 1582 margin: 0 auto; 1583 max-width: 100%; 1584 width: 100vw; 1585 `,title:O` 1586 display: block; 1587 font-weight: 300; 1588 margin-bottom: 10px; 1589 `,emptyState:O` 1590 color: #848484; 1591 font-size: 16px; 1592 text-align: center; 1593 padding: 32px 0; 1594 `,scrollSentinel:O` 1595 display: flex; 1596 justify-content: center; 1597 padding: 16px 0; 1598 min-height: 1px; 1599 `},du={languageContainer:O` 1600 display: flex; 1601 width: 100%; 1602 flex-direction: column; 1603 justify-content: center;
1604 align-items: center; 1605 padding: 24px 19px; 1606 `,languageTile:O` 1607 display: flex; 1608 flex-direction: row; 1609 justify-content: space-between; 1610 align-items: center; 1611 gap: 16px; 1612 background-color: #ffffff; 1613 border-radius: 6px; 1614 font-size: 16px; 1615 color: #000000; 1616 box-sizing: border-box; 1617 padding: 16px; 1618 box-shadow: 0 3px 6px #00000029; 1619 margin-bottom: 16px; 1620 width: 100%; 1621 text-align: start; 1622 :last-of-type { 1623 margin-bottom: 0; 1624 } 1625 border: none; 1626 cursor: pointer; 1627 `,languageContent:O` 1628 flex-grow: 1; 1629 `,languageFlag:O` 1630 display: flex; 1631 width: 32px; 1632 height: 32px; 1633 font-size: 32px; 1634 border-radius: 50%; 1635 overflow: hidden; 1636 `,checkmark:O` 1637 font-size: 24px; 1638 color: #4a4742; 1639 `},fu=e=>{let t=new Date;if(t.setHours(0,0,0,0),!e.nextRecallDate)return;let n=new Date(e.nextRecallDate);if(n>t)return n;if(e.interval){for(;n<t;)n=F(n).add(e.interval,`month`).toDate();return n}},pu=(e,t,n)=>{if(t)return n(`Profile.droppedOutMessage`);if(e.length===0)return n(`Profile.noRecallMessage`);e.filter(e=>e.nextRecallDate).sort((e,t)=>e.nextRecallDate&&t.nextRecallDate&&new Date(e.nextRecallDate).getTime()>=new Date(t.nextRecallDate).getTime()?1:-1);let r=e.reduce((e,t)=>t.nextRecallDate&&e.nextRecallDate&&new Date(t.nextRecallDate)<new Date(e.nextRecallDate)?t:e),i=fu(r),a=i?Math.ceil((i.getTime()-new Date().getTime())/864e5):`?`;return n(`Profile.recallMessage`,{interval:r.interval||`?`,days:a})},mu={tile:O` 1640 display: flex; 1641 flex-direction: column; 1642 justify-content: flex-start; 1643 align-items: flex-start; 1644 background-color: #ffffff; 1645 border-radius: 6px; 1646 font-size: 14px; 1647 color: #000000; 1648 box-sizing: border-box; 1649 padding: 16px; 1650 box-shadow: 0 3px 6px #00000029; 1651 margin-bottom: 16px; 1652 width: 100%; 1653 text-align: start; 1654 :last-of-type { 1655 margin-bottom: 0; 1656 } 1657 `},Y={container:O` 1658 display: flex; 1659 width: 100%; 1660 flex-direction: column; 1661 justify-content: center; 1662 align-items: center; 1663 padding: 24px 19px; 1664 `,title:O` 1665 display: flex; 1666 font-size: 16px; 1667 font-weight: 600; 1668 margin-block-start: 0; 1669 margin-block-end: 0.5em; 1670 color: #4a4742; 1671 `,communicationType:O` 1672 font-weight: 600; 1673 `,communicationItem:O` 1674 margin-bottom: 0.25em; 1675 overflow-wrap: anywhere; 1676 :last-of-type { 1677 margin-bottom: 1em; 1678 } 1679 `,buttonContainer:O` 1680 display: flex; 1681 align-self: flex-end; 1682 margin-top: 16px; 1683 @media (max-width: 650px) { 1684 align-self: center; 1685 } 1686 `},hu=({label:e,children:t})=>(0,N.jsxs)(`fieldset`,{className:gu.fieldset,children:[e&&(0,N.jsx)(`legend`,{className:gu.legend,children:e}),t]}),gu={legend:O` 1687 font-size: 20px; 1688 line-height: 31px; 1689 padding: 0; 1690 `,fieldset:O` 1691 border: none; 1692 padding: 0; 1693 margin: 16px 0; 1694 `},_u=e=>(0,N.jsx)(`form`,{className:vu.form,...e}),_u.Row=({columns:e=`auto`,children:t})=>(0,N.jsx)(`div`,{className:vu.row,style:{gridTemplateColumns:e}
1694,children:t}),vu={form:O` 1695 box-sizing: border-box; 1696 width: 100%; 1697 display: flex; 1698 flex-direction: row; 1699 justify-content: center; 1700 flex-wrap: wrap; 1701 padding: 20px; 1702 gap: 8px; 1703 & > * { 1704 flex-basis: 100%; 1705 } 1706 `,row:O` 1707 display: grid; 1708 column-gap: 10px; 1709 align-items: start; 1710 `},yu=M.forwardRef(Dp),bu=M.memo(yu),xu={root:O` 1711 margin: 8px 0; 1712 `,readOnly:O` 1713 opacity: 0.5; 1714 `,disabled:O` 1715 opacity: 0.5; 1716 `,label:O` 1717 display: block; 1718 font-size: 12px; 1719 line-height: 19px; 1720 padding-left: 4px; 1721 `,input:O` 1722 font-family: inherit; 1723 font-size: 14px; 1724 line-height: 21px; 1725 box-sizing: border-box; 1726 box-shadow: 0 3px 6px #00000029; 1727 border: none; 1728 border-radius: 6px; 1729 padding: 6px 12px; 1730 min-height: 40px; 1731 width: 100%; 1732 appearance: none; 1733 `,invalid:O` 1734 outline: 2px solid red; 1735 `,hit:O` 1736 font-size: 10px; 1737 color: #1a262d; 1738 `,error:O` 1739 font-size: 10px; 1740 color: red; 1741 `},Su=`M15.5 25.35h17.05q.6 0 1.025-.45.425-.45.425-1.05 0-.65-.425-1.075-.425-.425-1.075-.425H15.45q-.6 0-1.025.45-.425.45-.425 1.05 0 .65.425 1.075.425.425 1.075.425Z`,Cu=`M24 44q-4.25 0-7.9-1.525-3.65-1.525-6.35-4.225-2.7-2.7-4.225-6.35Q4 28.25 4 24q0-4.2 1.525-7.85Q7.05 12.5 9.75 9.8q2.7-2.7 6.35-4.25Q19.75 4 24 4q4.2 0 7.85 1.55Q35.5 7.1 38.2 9.8q2.7 2.7 4.25 6.35Q44 19.8 44 24q0 4.25-1.55 7.9-1.55 3.65-4.25 6.35-2.7 2.7-6.35 4.225Q28.2 44 24 44Z`,wu=M.forwardRef(Op),Tu=M.memo(wu),Eu={Afg:`+93`,Ala:`+358`,Alb:`+355`,Dza:`+213`,Asm:`+1684`,And:`+376`,Ago:`+244`,Aia:`+1264`,Ata:`+672`,Atg:`+1268`,Arg:`+54`,Arm:`+374`,Abw:`+297`,Aus:`+61`,Aut:`+43`,Aze:`+994`,Bhs:`+1242`,Bhr:`+973`,Bgd:`+880`,Brb:`+1246`,Blr:`+375`,Bel:`+32`,Blz:`+501`,Ben:`+229`,Bmu:`+1441`,Btn:`+975`,Bol:`+591`,Bes:`+599`,Bih:`+387`,Bwa:`+267`,Bvt:`+47`,Bra:`+55`,Iot:`+246`,Brn:`+673`,Bgr:`+359`,Bfa:`+226`,Bdi:`+257`,Cpv:`+238`,Khm:`+855`,Cmr:`+237`,Can:`+1`,Cym:`+345`,Caf:`+236`,Tcd:`+235`,Chl:`+56`,Chn:`+86`,Cxr:`+61`,Cck:`+61`,Col:`+57`,Com:`+269`,Cod:`+243`,Cog:`+242`,Cok:`+682`,Cri:`+506`,Civ:`+225`,Hrv:`+385`,Cub:`+53`,Cuw:`+599`,Cyp:`+357`,Cze:`+420`,Dnk:`+45`,Dji:`+253`,Dma:`+1767`,Dom:`+1849`,Ecu:`+593`,Egy:`+20`,Slv:`+503`,Gnq:`+240`,Eri:`+291`,Est:`+372`,Swz:`+268`,Eth:`+251`,Flk:`+500`,Fro:`+298`,Fji:`+679`,Fin:`+358`,Fra:`+33`,Guf:`+594`,Pyf:`+689`,Atf:`+262`,Gab:`+241`,Gmb:`+220`,Geo:`+995`,Deu:`+49`,Gha:`+233`,Gib:`+350`,Grc:`+30`,Grl:`+299`,Grd:`+1473`,Glp:`+590`,Gum:`+1671`,Gtm:`+502`,Ggy:`+44`,Gin:`+224`,Gnb:`+245`,Guy:`+595`,Hti:`+509`,Hmd:`+672`,VAT:`+379`,Hnd:`+504`,Hkg:`+852`,Hun:`+36`,Isl:`+354`,Ind:`+91`,Idn:`+62`,Irn:`+98`,Irq:`+964`,Irl:`+353`,Imn:`+44`,Isr:`+972`,Ita:`+39`,Jam:`+1876`,Jpn:`+81`,Jey:`+44`,Jor:`+962`,Kaz:`+77`,Ken:`+254`,Kir:`+686`,Prk:`+850`,Kor:`+82`,Kwt:`+965`,Kgz:`+996`,Lao:`+856`,Lva:`+371`,Lbn:`+961`,Lso:`+266`,Lbr:`+231`,Lby:`+218`,Lie:`+423`,Ltu:`+370`,Lux:`+352`,Mac:`+853`,Mdg:`+261`,Mwi:`+265`,Mys:`+60`,Mdv:`+960`,Mli:`+223`,Mlt:`+356`,Mhl:`+692`,Mtq:`+596`,Mrt:`+222`,Mus:`+230`,Myt:`+262`,Mex:`+52`,Fsm:`+691`,Mda:`+373`,Mco:`+377`,Mng:`+976`,Mne:`+382`,Msr:`+1664`,Mar:`+212`,Moz:`+258`,Mmr:`+95`,Nam:`+264`,Nru:`+674`,Npl:`+977`,Nld:`+31`,Ncl:`+687`,Nzl:`+64`,Nic:`+505`,Ner:`+227`,Nga:`+234`,Niu:`+683`,Nfk:`+672`,Mkd:`+389`,Mnp:`+1670`,Nor:`+47`,Omn:`+968`,Pak:`+92`,Plw:`+680`,Pse:`+970`,Pan:`+507`,Png:`+675`,Pry:`+595`,Per:`+51`,Phl:`+63`,Pcn:`+872`,Pol:`+48`,Prt:`+351`,Pri:`+1939`,Qat:`+974`,Reu:`+262`,Rou:`+40`,Rus:`+7`,Rwa:`+250`,Blm:`+590`,Shn:`+290`,Kna:`+1869`,Lca:`+1758`,Maf:`+590`,Spm:`+508`,Vct:`+1784`,Wsm:`+685`,Smr:`+378`,Stp:`+239`,Sau:`+966`,Sen:`+221`,Srb:`+381`,Syc:`+248`,Sle:`+232`,Sgp:`+65`,Sxm:`+1721`,Svk:`+421`,Svn:`+386`,Slb:`+677`,Som:`+252`,Zaf:`+27`,Sgs:`+500`,Ssd:`+211`,Esp:`+34`,Lka:`+94`,Sdn:`+249`,Sur:`+597`,Sjm:`+47`,Swe:`+46`,Che:`+41`,Syr:`+963`,Twn:`+886`,Tjk:`+992`,Tza:`+255`,Tha:`+66`,Tls:`+670`,Tgo:`+228`,Tkl:`+690`,Ton:`+676`,Tto:`+1868`,Tun:`+216`,Tur:`+90`,Tkm:`+993`,Tca:`+1649`,Tuv:`+688`,Uga:`+256`,Ukr:`+380`,Are:`+971`,Gbr:`+44`,Umi:`+1581`,Usa:`+1`,Ury:`+598`,Uzb:`+998`,Vut:`+678`,Ven:`+58`,Vnm:`+84`,Vgb:`+1284`,Vir:`+1340`,Wlf:`+681`,Esh:`+732`,Yem:`+967`,Zmb:`+260`,Zwe:`+263`},Du=[...new Set(Object.values(Eu))].sort(),Ou=e=>{let t=[...Du].reverse().find(t=>e.startsWith(t))||``;return[t,e.replace(t,``)]},ku=b({id:f().nullable(),code:f().trim().nonempty({message:`validationRequired`}),number:f().trim().nonempty({message:`validationRequired`}).regex(/^\d+$/,{message:`validationNumber`})}).required().refine(e=>!/^\+?0*$/.test(`${e.code+e.number}`),{message:`validationNoZero`,path:[`number`]}
1741).refine(e=>!/^(\+|00)?\d{0,7}$/.test(`${e.code+e.number}`),{message:`validationTooShort`,path:[`number`]}).refine(e=>/^\+?\d{0,20}$/.test(`${e.code+e.number}`),{message:`validationTooLong`,path:[`number`]}).array().min(1,{message:`validationPhoneNumberRequired`}),Au=f().trim().nonempty({message:`validationRequired`}).regex(/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/i,{message:`validationEmail`}).refine(e=>e.length<320,{message:`validationTooLong`}).refine(e=>{let t=e.split(`@`);return t.length===2&&t[0].length<=64&&t[1].length<=255},{message:`validationTooLong`}),ju=b({communications:ku,email:b({id:f().nullable(),value:Au.or(ge(``))}).required(),referralInfo:b({type:Ho.ReferralTypes,text:f().nullable()}),digitalMailboxConsent:u()}),Mu=ju.extend({isRegistered:ge(!1),referralInfo:b({type:Ho.ReferralTypes,text:f().nullable()})}),Nu=ju.extend({isRegistered:ge(!0),addressInfo:b({address:f().trim(),postalCode:f().trim(),city:f().trim(),district:f().trim()}).required(),danmarkInsurance:b({group:Ho.DanmarkInsuranceGroup.or(ge(``)),condition:Ho.DanmarkInsuranceCondition}).partial()}),Pu=Ho.DanmarkInsurance.shape.group.enum,Fu=Ho.DanmarkInsurance.shape.condition.enum,X=Ho.ReferralTypes.enum,Iu=[X.Facebook,X.Instagram,X.Google,X.NewsPaper,X.BusAdd,X.WordOfMouth,X.OtherDentist,X.Other],Lu={buttonContainer:O` 1742 display: flex; 1743 justify-content: center; 1744 align-self: center; 1745 width: 100%; 1746 @media (max-width: 650px) { 1747 margin-top: 40px; 1748 } 1749 `,referralInfoContainer:O` 1750 display: grid; 1751 column-gap: 10px; 1752 grid-template-columns: 200px auto; 1753 `},Ru={subheader:O` 1754 margin-bottom: 24px; 1755 `,row:O` 1756 display: flex; 1757 justify-content: space-between; 1758 margin-bottom: 24px; 1759 `,text:O` 1760 display: inline-block; 1761 background-color: #757575; 1762 border-radius: 5px; 1763 `},zu={root:O` 1764 margin: 0 auto; 1765 padding: 2rem; 1766 text-align: center; 1767 `,h1:O` 1768 font-weight: 600; 1769 color: #e95a17; 1770 margin: 0 0 25px 0; 1771 letter-spacing: 0; 1772 font-size: 136px; 1773 line-height: 181px; 1774 `,h2:O` 1775 font-weight: 600; 1776 color: #1a262d; 1777 margin: 0 0 10px 0; 1778 letter-spacing: 0; 1779 text-transform: uppercase; 1780 font-size: 35px; 1781 line-height: 47px; 1782 `,h3:O` 1783 color: #848484; 1784 letter-spacing: 0; 1785 font-size: 30px; 1786 line-height: 40px; 1787 `},Bu=e=>{let t=new URL(`${R.API_URL}
1787/api/patient-portal/auth/login`),{tenant:n}=Z(),r=new URLSearchParams(window.location.search).get(`lng`);return t.searchParams.set(`tenant`,n),t.searchParams.set(`loginFailedUrl`,`${R.ROOT_URL}/${n}/auth_failed?lng=${r}`),t.searchParams.set(`returnUrl`,e),t},Vu=()=>{let e=new URLSearchParams(window.location.search).get(`returnUrl`);return e?.includes(`showReminder`)?`${R.ROOT_URL}/${Z().tenant}${e}`:`${R.ROOT_URL}/${Z().tenant}${e&&e!==`/`?`${e}&`:`?`}showReminder=true`},Hu={page:O` 1788 box-sizing: border-box; 1789 display: flex; 1790 flex-direction: column; 1791 justify-content: center; 1792 align-items: center; 1793 font-size: 30px; 1794 width: 100%; 1795 height: 100%; 1796 min-height: 100vh; 1797 padding: 17px 30px; 1798 1799 p { 1800 margin: 0; 1801 } 1802 `,button:O` 1803 display: inline-block; 1804 box-shadow: 0 3px 6px #00000029; 1805 background-color: #0060e6; 1806 border-radius: 10px; 1807 color: #fff; 1808 font-size: 30px; 1809 line-height: 1; 1810 font-weight: bold; 1811 border: none; 1812 padding: 17px 30px; 1813 cursor: pointer; 1814 appearance: none; 1815 margin-top: 17px; 1816 margin-right: 30px; 1817 1818 &[href] { 1819 background-color: #fff; 1820 color: #0060e6; 1821 } 1822 1823 &:last-child { 1824 margin-right: 0; 1825 } 1826 1827 svg { 1828 display: inline; 1829 } 1830 `},Uu=(0,N.jsx)(uf,{style:{minHeight:250}}),Wu=(0,N.jsx)(Fp,{}),Gu=Ce([{path:`/:tenant/login`,element:$((0,N.jsx)(Ip,{}),{fallback:(0,N.jsx)(uf,{style:{position:`fixed`,minHeight:`100%`}}),auth:!1}),index:!0},{path:`/:tenant`,element:$((0,N.jsx)(Vc,{}),{fallback:!1,routePolicy:`public`}),children:[{index:!0,element:$((0,N.jsx)(fp,{}),{fallback:(0,N.jsx)(Mp,{}),routePolicy:`public`})},{path:`/:tenant/appointments`,element:(0,N.jsx)(pe,{to:`/${Z().tenant}`})},{path:`/:tenant/appointments/:id`,element:$((0,N.jsx)(hf,{}))},{path:`/:tenant/appointments/create`,element:$((0,N.jsx)(Zf,{}))},{path:`/:tenant/appointments/edit/:id`,element:$((0,N.jsx)($f,{}))},{path:`/:tenant/appointments/payment/:status`,element:$((0,N.jsx)(ap,{}))},{path:`/:tenant/profile`,element:$((0,N.jsx)(Ep,{}))},{path:`/:tenant/profile/edit`,element:$((0,N.jsx)(kp,{}),{routePolicy:`onboarding`})},{path:`/:tenant/invoices`,element:$((0,N.jsx)(jp,{code:Ki,fallback:(0,N.jsx)(Lp,{}),children:(0,N.jsx)(Sp,{})}))},{path:`/:tenant/invoices/:id/:status`,element:$((0,N.jsx)(jp,{code:Ki,fallback:(0,N.jsx)(Lp,{}),children:(0,N.jsx)(Cp,{})}))},{path:`/:tenant/language`,element:$((0,N.jsx)(wp,{}),{routePolicy:`public`})}]},{path:`/:tenant/auth_failed`,element:(0,N.jsx)(Pp,{}),index:!0},{path:`*`,element:(0,N.jsx)(Lp,{}),index:!0}]),Ku=`user-interaction`;try{let e={"mintandsundhed.dk":`proddk`}[window.location.host],t=_e({serviceName:`nexta-spa-patient`,serverUrl:R.LOGGING_URL,serviceVersion:R.BUILD_NUMBER,environment:e||`unknown`,active:!!e,distributedTracingOrigins:[R.API_URL],disableInstrumentations:[`eventtarget`,`click`]});t.addFilter(e=>Vd(e)),Bp(t)}catch{}if(qu=new he,Ju=Ap([M.Suspense,{fallback:(0,N.jsx)(uf,{style:{position:`fixed`,minHeight:`100%`,left:0}})}],_d,Wi,ft),Yu=document.getElementById(`root`),!Yu)throw Error(`#root not found!`);Xu=()=>(0,M.createElement)(M.StrictMode,{},(0,M.createElement)(Up)),Yu.hasChildNodes()?(0,Ye.hydrateRoot)(Yu,(0,M.createElement)(Xu)):(0,Ye.createRoot)(Yu).render((0,M.createElement)(Xu))}}})})();
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.