import{m as Lt,c as Et,e as Nt,a as Ft,d as Rt,b as jt,i as Ot,f as Ut,r as It,g as ke,h as Bt,j as G,k as w,l as U,o as oe,E as F,n as He,p as _,q as S,s as Ce,V as Wt,_ as B,w as g,t as c,u as zt,v as Yt,x as at,y as Kt,z as J,A as r,B as l,C as u,D as L,F as $,G as ne,H as j,I as it,J as Q,K as X,L as ie,M as qt,N as le,O as Gt,P as W,Q as Jt,R as re,S as Pe,T as I,U as te,W as he,X as ve,Y as be,Z as Me,$ as q,a0 as Le,a1 as fe,a2 as E,a3 as lt,a4 as Ae,a5 as rt,a6 as Qt,a7 as Xt,a8 as dt,a9 as Zt,aa as eo,ab as to,ac as oo,ad as ct,ae as no,af as so,ag as ao,ah as Ke,ai as io,aj as _e,ak as lo,al as qe,am as ro,an as Ge,ao as co,ap as uo,aq as ut,ar as po,as as fo,at as ce,au as mo,av as go,aw as ho,ax as vo,ay as bo,az as yo,aA as Je,aB as _o,aC as wo,aD as ko,aE as xe,aF as Co,aG as Po,aH as Ao,aI as xo,aJ as Vo,aK as Do,aL as To,aM as $o,aN as So,aO as Ho,aP as Mo}from"./dashboard-practitioner-b373edf1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2442060b-ca4c-4708-8f2f-4fdf2a811c15",e._sentryDebugIdIdentifier="sentry-dbid-2442060b-ca4c-4708-8f2f-4fdf2a811c15")}catch{}})();(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const Lo={defaults:{VAppBar:{flat:!0},VAutocomplete:{variant:"filled"},VBanner:{color:"primary"},VBottomSheet:{contentClass:"rounded-t-xl overflow-hidden"},VBtn:{color:"primary",rounded:"xl"},VBtnGroup:{rounded:"xl",VBtn:{rounded:null}},VCard:{rounded:"lg"},VCheckbox:{color:"secondary",inset:!0},VChip:{rounded:"sm"},VCombobox:{variant:"filled"},VNavigationDrawer:{},VSelect:{variant:"filled"},VSlider:{color:"primary"},VTabs:{color:"primary"},VTextarea:{variant:"filled"},VTextField:{variant:"filled"},VToolbar:{VBtn:{color:null}}},icons:{defaultSet:"mdi",sets:{mdi:Lt}},theme:{themes:{light:{colors:{primary:"#6750a4",secondary:"#b4b0bb",tertiary:"#7d5260",error:"#b3261e",surface:"#fffbfe"}}}}},Eo={badge:"Badge",open:"Ouvrir",close:"Fermer",dismiss:"Dismiss",confirmEdit:{ok:"OK",cancel:"Annuler"},dataIterator:{noResultsText:"Aucun enregistrement correspondant trouvé",loadingText:"Chargement de l'élément..."},dataTable:{itemsPerPageText:"Lignes par page :",ariaLabel:{sortDescending:"Tri décroissant.",sortAscending:"Tri croissant.",sortNone:"Non trié.",activateNone:"Activer pour supprimer le tri.",activateDescending:"Activer pour trier par ordre décroissant.",activateAscending:"Activer pour trier par ordre croissant."},sortBy:"Trier par"},dataFooter:{itemsPerPageText:"Éléments par page :",itemsPerPageAll:"Tous",nextPage:"Page suivante",prevPage:"Page précédente",firstPage:"Première page",lastPage:"Dernière page",pageText:"{0}-{1} de {2}"},dateRangeInput:{divider:"à"},datePicker:{itemsSelected:"{0} selected",range:{title:"Sélectionner des dates",header:"Entrer des dates"},title:"Sélectionner une date",header:"Entrer une date",input:{placeholder:"Entrer une date"}},noDataText:"Aucune donnée disponible",carousel:{prev:"Visuel précédent",next:"Visuel suivant",ariaLabel:{delimiter:"Diapositive {0} de {1}"}},calendar:{moreEvents:"{0} de plus",today:"Aujourd'hui"},input:{clear:"Vider {0}",prependAction:"{0} action avant",appendAction:"{0} action après",otp:"Caractère {0} du mot de passe à usage unique"},fileInput:{counter:"{0} fichier(s)",counterSize:"{0} fichier(s) ({1} au total)"},fileUpload:{title:"Drag and drop files here",divider:"or",browse:"Browse Files"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Navigation de pagination",next:"Page suivante",previous:"Page précédente",page:"Aller à la page {0}",currentPage:"Page actuelle, Page {0}",first:"Première page",last:"Dernière page"}},stepper:{next:"Suivant",prev:"Précédent"},rating:{ariaLabel:{item:"Note de {0} sur {1}"}},loading:"Chargement...",infiniteScroll:{loadMore:"Charger plus",empty:"Aucune donnée supplémentaire"}},No={dark:!1,colors:{primary:"#256c68",secondary:"#12c29b","secondary-lighten-3":"#dff4ef",accent:"#f3cc71","accent-lighten-1":"#f3d98c","accent-lighten-2":"#fff2d5",accent2:"#ff958a",surface:"#ebfffe","surface-lighten-1":"#E5F6EB","surface-lighten-2":"#EEFFEF","surface-blue":"#eef1fa",background:"#fff","on-secondary":"#fff","on-accent":"#fff","on-accent2":"#12372f",gray:"#aaa1a1","gray-100":"#FAFAFC","gray-80":"#616161",green:"#00D575","green-100":"#86A4A2","green-200":"#458181","gray-50":"#99A4AA","gray-200":"#E4EDEA","gray-20":"#F5F5F5","gray-300":"#636D79",blue:"#1a73e9","aero-blue":"#C4FFF2","dark-green":"#004838","jade-green":"#33CC99","gray-ligth":"#C2C2C2","pale-green":"#F4FBF7","pale-mind-green":"#E3F3E8",teal:"#007058","teal-green":"#029978",darkgray:"#c1c1c1","bright-red":"#FF5353","light-pink":"#FFE8E8","bright-orange":"#EE720D","yellow-light":"#FEE29F",yellow:"#D6B25D","yellow-dark":"#443513","yellow-ligth":"#FFFBF1",orange:"#FEB23E","gray-70":"#757575",danger:"#8C1F1F","orange-pure":"#F4511E","blue-07":"#0A5BC7"}},Fo=Et({blueprint:Lo,theme:{defaultTheme:"holitimeLightTheme",themes:{holitimeLightTheme:No},variations:{colors:["primary","secondary"],lighten:2,darken:2}},defaults:{VBtn:{variant:"flat",rounded:"xl"},VTextField:{variant:"outlined",rounded:!0},VAutocomplete:{variant:"outlined",rounded:!0,autoSelectFirst:!0},VCombobox:{variant:"outlined",rounded:!0},VSelect:{variant:"outlined",rounded:!0},VTextarea:{variant:"outlined"},VCard:{elevation:1}},locale:{messages:{fr:Eo,en:Nt},locale:"fr",fallback:"en"},components:Ft,directives:Rt}),Ro=jt();function jo(e){Ot({app:e,dsn:"https://[email protected]/4506855235518464",integrations:[Ut({router:ke}),It({maskAllText:!1,maskAllInputs:!1,blockAllMedia:!1,networkDetailAllowUrls:[/\/.+/]})],tracesSampleRate:1,tracePropagationTargets:["localhost",/^https:\/\/api\.holitime\.org/],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,environment:"production"}),e.use(Fo).use(ke).use(Ro).use(Bt)}const Oo=G({__name:"Message",setup(e){const t=w(!1),n=w(""),o=w("info"),a=U(()=>{switch(o.value){case"success":return"$success";case"info":return"$info";case"warning":return"$warning";case"error":return"$error";default:return"$info"}}),i=({text:s,severity:d})=>{t.value=!0,n.value=s,o.value=d,setTimeout(()=>{t.value=!1},6e3)};return oe(()=>{F.on("message",i)}),He(()=>{F.off("message",i)}),(s,d)=>(_(),S(Wt,{class:Ce({wrapper:!0,visible:t.value}),color:o.value,text:n.value,icon:a.value,density:"comfortable"},null,8,["class","color","text","icon"]))}});const Uo=B(Oo,[["__scopeId","data-v-132a0f1a"]]),Io=G({__name:"LoadingBackdrop",setup(e){const t=w(!1),n=({active:o})=>{t.value=o};return oe(()=>{F.on("loading",n)}),He(()=>{F.off("loading",n)}),(o,a)=>(_(),S(Yt,{persistent:"",modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=i=>t.value=i),class:"d-flex align-center justify-center"},{default:g(()=>[c(zt,{indeterminate:"",color:"primary",size:"54"})]),_:1},8,["modelValue"]))}}),Bo=G({__name:"ConfirmDialog",setup(e){const{xs:t}=at(),n=w(!1),o=w(""),a=w(""),i=Kt({onConfirm:()=>{},onCancel:()=>{}}),s=w(),d=w(),h=w(!1),v=w(!1);oe(()=>{const k=y=>{o.value=y.title,a.value=y.message,i.onConfirm=y.optionsConfirm.onConfirm,i.onCancel=y.optionsConfirm.onCancel,s.value=y.cancelBtnLabel,d.value=y.confirmBtnLabel,n.value=!0,h.value=y.mandatory,v.value=y.onlyConfirmAction};F.on("confirm",k),F.on("close-confirm",C)});const C=()=>{n.value=!1};He(()=>{F.off("confirm",D),F.off("close-confirm",C)});const D=()=>{i.onConfirm(),n.value=!1},f=()=>{i.onCancel(),n.value=!1};return(k,y)=>(_(),S(X,{modelValue:n.value,"onUpdate:modelValue":y[0]||(y[0]=A=>n.value=A),persistent:"","min-width":r(t)?300:500,width:"fit-content",transition:"dialog-top-transition"},{default:g(()=>[c(Q,{class:"bg-white"},{default:g(()=>[c(J,{class:Ce(["d-flex pa-4 text-wrap w-full align-center bg-surface-lighten-1 text-primary",[r(t)?"justify-space-between":"justify-center"]])},{default:g(()=>[l("span",null,u(o.value),1),h.value?$("",!0):(_(),S(L,{key:0,class:Ce(["mr-2",{"close-icon":!r(t)}]),variant:"text",icon:"mdi-close",onClick:f},null,8,["class"]))]),_:1},8,["class"]),c(ne,{class:"pa-4 text-center"},{default:g(()=>[j(u(a.value),1)]),_:1}),c(it,{class:"d-flex justify-end align-center flex-wrap pa-4 pt-2"},{default:g(()=>[v.value?$("",!0):(_(),S(L,{key:0,class:"px-6",variant:"outlined",color:"black",text:s.value??k.$t("confirmDialog.cancelBtn"),onClick:f},null,8,["text"])),c(L,{class:"px-6",variant:"flat",color:"blue-darken-1",text:d.value??k.$t("confirmDialog.confirmBtn"),onClick:D},null,8,["text"])]),_:1})]),_:1})]),_:1},8,["modelValue","min-width"]))}});const Wo=B(Bo,[["__scopeId","data-v-e39fdf72"]]),Qe=ie(),Ve=qt("askPractitionerConsultationStore",()=>{const e=w([]),t=w([]),n=w(!1),o=async()=>{if(le().isLogged)try{if(n.value)return;n.value=!0;const h=await Qe.get("/appointment-notification/practician");if(h.status!=200)throw Error(JSON.stringify(h.data));e.value=h.data.map(v=>({id:v.id,appointmentReason:v.appointmentReason,customerName:v.customerName,date:Gt(W(v.date).format("ddd D MMM")),duration:Jt(""+v.duration),price:""+v.price+" €",time:W(v.date).format("HH:mm").replace(":","h"),note:v.comment,photo:v.customerPicture})),0<e.value.length&&F.emit("open-practitioner-ask-presence-dialog")}catch(h){console.error(h)}finally{(!e.value||!e.value.length)&&F.emit("close-practitioner-ask-presence-dialog"),n.value=!1}},a=async d=>{const h=e.value.findIndex(v=>v.id===d);e.value.splice(h,1)},i=async(d,h)=>{const v=e.value.findIndex(C=>C.id===d);e.value.splice(v,1);try{const C=await Qe.post(`/opinion/absence-protest/${d}`,h);if(C.status!=200)throw Error(JSON.stringify(C.data))}catch(C){console.error(C)}};async function s(){await o(),setInterval(o,5*60*1e3)}return{fetchConsultations:o,consultations:e,startLoop:s,allConsultationForAbsence:t,sendDataForAbsence:a,contesterForAbsence:i}}),zo={props:{dialog:Boolean},emits:["update:dialog","close"],setup(e,{emit:t}){const{t:n}=re(),o=ie(),a=w(1),i=w(""),s=w(null),d=w(""),h=P=>{s.value=P},v=w(0),C=U(()=>D.consultations),D=Ve(),f=P=>{t("update:dialog",P)},k=()=>{f(!1)},y=w(!1),A=async()=>{if(d.value="",!y.value)return!1;if(s.value===null)return d.value="Veuillez sélectionner une option.",!1;s.value==="absent"?await T():await x()},x=async()=>{I.start();try{await o.post(`/appointment-notification/${C.value[a.value-1].id}/confirmed`,{comment:i.value},{headers:{"Content-Type":"application/json"}}),s.value=null,i.value=""}catch(P){te.error(n("common.error.errorHasOccurred")),console.error(P)}await D.fetchConsultations(),I.stop()},T=async()=>{I.start();try{await o.post(`/appointment-notification/${C.value[a.value-1].id}/unconfirmed`,{comment:i.value},{headers:{"Content-Type":"application/json"}}),s.value=null,i.value=""}catch(P){te.error(n("common.error.errorHasOccurred")),console.error(P)}await D.fetchConsultations(),I.stop()},V=async()=>{};return Pe(()=>e.dialog,async P=>{P&&await V()},{immediate:!0}),{t:n,updateDialog:f,toggleDialog:k,confirmPatientPresence:x,confirmPatientAbsence:T,dialogAskPractitionerConsultationStore:D,onOpen:V,consultations:C,page:a,comment:i,toggleChoice:h,choice:s,isValidForm:y,onSubmit:A,selectOptionMsg:d,commentRules:[P=>P.length<=300||n("300_caracteres")],commentKey:v}}};const Yo={class:"dialog-header"},Ko={class:"text-center"},qo=["innerHTML"],Go={class:"d-flex flex-column ga-3"},Jo={style:{"background-color":"#f3fcfa"},class:"pa-5 d-flex flex-column ga-2 rounded-lg"},Qo={class:"d-flex flex-column ga-2"},Xo={class:"d-flex justify-space-between"},Zo={class:"text-teal font-weight-bold"},en={class:"d-flex justify-space-between"},tn={class:"text-teal font-weight-bold"},on={class:"d-flex flex-column ga-2"},nn={class:"d-flex justify-space-between"},sn={class:"text-teal font-weight-bold"},an={class:"d-flex justify-space-between"},ln={class:"text-teal font-weight-bold"},rn={class:"d-flex flex-column ga-2"},dn={class:"d-flex justify-space-between"},cn={class:"text-teal font-weight-bold"},un={class:"mb-2"},pn=["innerHTML"],fn={class:"d-flex flex-column ga-2"},mn={class:"text-center d-flex flex-column ga-2"},gn={class:"font-weight-bold"},hn={class:"d-sm-flex ga-2 justify-center w-sm-75 mx-auto"},vn={key:0,class:"text-red"},bn={class:"dialog-text"},yn={class:"d-flex justify-end"};function _n(e,t,n,o,a,i){return _(),S(X,{"model-value":n.dialog,"onUpdate:modelValue":o.updateDialog,persistent:"","max-width":"600",transition:"dialog-top-transition",class:"blur-background"},{default:g(()=>[c(Q,{elevation:"24",class:"border-radius-none"},{default:g(()=>[c(J,{class:"d-flex pa-1 justify-center w-full align-center bg-surface-lighten-1 text-primary"},{default:g(()=>[l("span",Yo,u(e.$t("dashboard.consultationDialog.title")),1),l("img",{style:{position:"absolute",right:"10px"},class:"cursor-pointer mr-2",onClick:t[0]||(t[0]=s=>e.$emit("close")),src:he})]),_:1}),c(ve,{modelValue:o.isValidForm,"onUpdate:modelValue":t[5]||(t[5]=s=>o.isValidForm=s),onSubmit:be(o.onSubmit,["prevent"])},{default:g(()=>[c(ne,{class:"text-gray-80"},{default:g(()=>[l("div",Ko,[o.consultations.length>1?(_(),S(Me,{key:0,"active-color":"secondary",density:"compact",color:"primary",modelValue:o.page,"onUpdate:modelValue":t[1]||(t[1]=s=>o.page=s),length:o.consultations.length,"total-visible":5},null,8,["modelValue","length"])):$("",!0)]),l("div",{style:{color:"#757575"},class:"d-flex justify-center text-center avis-title",innerHTML:e.$t("dashboard.avisConsultationDialog.recap",{date:o.consultations[o.page-1].date})},null,8,qo),l("div",Go,[l("div",Jo,[l("div",Qo,[l("div",Xo,[l("span",null,u(e.$t("dashboard.consultationDialog.fullName"))+":",1),l("span",Zo,u(o.consultations[o.page-1].customerName),1)]),l("div",en,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.reason"))+":",1),l("span",tn,u(o.consultations[o.page-1].appointmentReason),1)])]),c(q),l("div",on,[l("div",nn,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.duration"))+":",1),l("span",sn,u(o.consultations[o.page-1].duration),1)]),l("div",an,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.price"))+":",1),l("span",ln,u(o.consultations[o.page-1].price),1)])]),c(q),l("div",rn,[l("div",dn,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.time"))+":",1),l("span",cn,u(o.consultations[o.page-1].time),1)])])]),l("div",un,[l("label",{innerHTML:e.$t("dashboard.consultationDialog.note")},null,8,pn),(_(),S(Le,{id:e.$t("dashboard.consultationDialog.note"),key:o.commentKey,modelValue:o.comment,"onUpdate:modelValue":t[2]||(t[2]=s=>o.comment=s),outlined:"","persistent-hint":"",class:"w-full mt-2 custom-textarea",rows:"5",rules:o.commentRules,hint:e.$t("dashboard.avisConsultationDialog.avis_feedback")},null,8,["id","modelValue","rules","hint"]))])]),l("div",fn,[l("div",mn,[l("span",gn,u(e.$t("dashboard.consultationDialog.confirm")),1),l("div",null,[l("div",hn,[c(L,{class:"w-sm-50 w-100",onClick:t[3]||(t[3]=s=>o.toggleChoice("absent")),color:o.choice==="absent"?"red":"#F3D0D0"},{default:g(()=>[l("span",{style:fe({color:o.choice==="absent"?"white":"#A82525"})},u(e.$t("dashboard.consultationDialog.absent")),5)]),_:1},8,["color"]),c(L,{block:"",class:"w-sm-50 w-100 mt-2 mt-sm-0",onClick:t[4]||(t[4]=s=>o.toggleChoice("present")),color:o.choice==="present"?"primary":"#C2ECE2"},{default:g(()=>[l("span",{style:fe({color:o.choice==="present"?"white":"#004838"})},u(e.$t("dashboard.consultationDialog.present")),5)]),_:1},8,["color"])]),o.selectOptionMsg&&!o.choice?(_(),E("span",vn,u(o.selectOptionMsg),1)):$("",!0)])]),l("span",bn,u(e.$t("dashboard.consultationDialog.modifyChoiceInfo")),1),l("div",yn,[c(L,{class:"",color:"secondary",type:"submit"},{default:g(()=>[j(u(e.$t("dashboard.appointmentMissingDialog.save")),1)]),_:1})])])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["model-value","onUpdate:modelValue"])}const wn=B(zo,[["render",_n],["__scopeId","data-v-fc765dd8"]]),kn={props:{dialogAvis:Boolean},emits:["update:dialogAvis","close"],setup(e,{emit:t}){const{t:n}=re(),o=ie(),a=lt(),i=w(1),s=w(!1),d=w(""),h=w(0),v=U(()=>a.consultations),C=U(()=>a.consultations),D=N=>{t("update:dialogAvis",N)},f=w(null),k=N=>{f.value=N},y=()=>{D(!1)},A=()=>{D(!1)},x=async N=>{if(d.value="",!s.value)return!1;if(f.value===null)return d.value="Veuillez indiquer votre avis en sélectionnant une option.",!1;I.start();try{await o.post(`/opinion/opinion/${N}`,{opinion:M.value,thumbUp:f.value},{headers:{"Content-Type":"application/json"}})}catch(Y){te.error(n("common.error.errorHasOccurred")),console.error(Y)}if(!le().user.token){I.stop();return}M.value="",await a.fetchConsultations(),I.stop()},T=w(!1),V=w(!1),H=()=>{V.value&&(V.value=!1),T.value=!T.value},P=()=>{T.value&&(T.value=!1),V.value=!V.value},M=w("");return{t:n,consultations:v,sendReview:x,dialogAvisConsultationStore:a,updateDialogAvis:D,toggleDialog:y,validate:A,page:i,like:T,dislike:V,toggleLike:H,toggleDislike:P,consultationLists:C,commentRules:[N=>N.length<=300||n("300_caracteres")],comment:M,toggleThumbUp:k,thumbUp:f,isValidForm:s,selectOptionMsg:d,consultationKey:h}}};const Cn={class:"dialog-header font-weight-bold"},Pn={key:0,class:"text-center"},An=["innerHTML"],xn={style:{"background-color":"#f3fcfa"},class:"pa-5 d-flex flex-column ga-5 rounded-lg"},Vn={class:"d-flex flex-column ga-2"},Dn={class:"d-flex justify-space-between"},Tn={class:"text-teal font-weight-bold"},$n={class:"d-flex justify-space-between"},Sn={class:"text-teal font-weight-bold"},Hn={class:"d-flex flex-column ga-2"},Mn={class:"d-flex justify-space-between"},Ln={class:"text-teal font-weight-bold"},En={class:"d-flex justify-space-between"},Nn={class:"text-teal font-weight-bold"},Fn={class:"d-flex flex-column ga-2"},Rn={class:"d-flex justify-space-between"},jn={class:"text-teal font-weight-bold"},On={class:"mt-4 text-center"},Un={class:"confirm-title"},In={class:"d-flex justify-center mt-2"},Bn={key:0,class:"mb-2 text-red"},Wn={class:"d-sm-flex ga-sm-2 mt-5"};function zn(e,t,n,o,a,i){return _(),S(X,{"model-value":n.dialogAvis,"onUpdate:modelValue":o.updateDialogAvis,persistent:"","max-width":"600",transition:"dialog-top-transition",class:"blur-background"},{default:g(()=>[c(Q,{elevation:"24",class:"border-radius-none",rounded:"xl"},{default:g(()=>[c(J,{class:"d-flex pa-1 justify-center w-full align-center bg-surface-lighten-1 text-primary"},{default:g(()=>[l("span",Cn,u(e.$t("dashboard.avisConsultationDialog.title")),1),l("img",{style:{position:"absolute",right:"10px"},class:"cursor-pointer mr-2",onClick:t[0]||(t[0]=s=>e.$emit("close")),src:he})]),_:1}),o.consultations.length?(_(),S(ne,{key:0},{default:g(()=>[o.consultations.length>1?(_(),E("div",Pn,[c(Me,{"active-color":"secondary",density:"compact",color:"primary",modelValue:o.page,"onUpdate:modelValue":t[1]||(t[1]=s=>o.page=s),length:o.consultations.length,"total-visible":5},null,8,["modelValue","length"])])):$("",!0),l("div",{style:{color:"#757575"},class:"d-flex justify-center text-center avis-title",innerHTML:e.$t("dashboard.avisConsultationDialog.recap",{date:o.consultations[o.page-1].date})},null,8,An),c(ve,{modelValue:o.isValidForm,"onUpdate:modelValue":t[6]||(t[6]=s=>o.isValidForm=s),onSubmit:t[7]||(t[7]=be(s=>o.sendReview(o.consultations[o.page-1].id),["prevent"]))},{default:g(()=>[l("div",xn,[l("div",Vn,[l("div",Dn,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.fullName"))+":",1),l("span",Tn,u(o.consultations[o.page-1].practitionerName),1)]),l("div",$n,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.reason"))+":",1),l("span",Sn,u(o.consultations[o.page-1].appointmentReason),1)])]),c(q),l("div",Hn,[l("div",Mn,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.duration"))+":",1),l("span",Ln,u(o.consultations[o.page-1].duration),1)]),l("div",En,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.price"))+":",1),l("span",Nn,u(o.consultations[o.page-1].price),1)])]),c(q),l("div",Fn,[l("div",Rn,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.time"))+":",1),l("span",jn,u(o.consultations[o.page-1].time),1)])])]),l("div",On,[l("div",Un,u(e.$t("dashboard.avisConsultationDialog.confirm")),1),l("div",In,[c(L,{onClick:t[2]||(t[2]=()=>o.toggleThumbUp(!0)),icon:"",color:"#12C29B33",class:"text-white"},{default:g(()=>[c(Ae,{width:"35px",height:"31.25px",color:"#343330"},{default:g(()=>[j(u(o.thumbUp?"mdi-thumb-up":"mdi-thumb-up-outline"),1)]),_:1})]),_:1}),c(L,{onClick:t[3]||(t[3]=()=>o.toggleThumbUp(!1)),icon:"",color:"#C2121533",class:"mx-2 text-white"},{default:g(()=>[c(Ae,{width:"35px",height:"31.25px",color:"#343330"},{default:g(()=>[j(u(o.thumbUp===!1?"mdi-thumb-down":"mdi-thumb-down-outline"),1)]),_:1})]),_:1})]),o.selectOptionMsg?(_(),E("div",Bn,u(o.selectOptionMsg),1)):$("",!0)]),l("div",null,[l("label",null,u(e.$t("dashboard.avisConsultationDialog.note")),1),(_(),S(Le,{id:e.$t("dashboard.avisConsultationDialog.note"),key:o.consultationKey,modelValue:o.comment,"onUpdate:modelValue":t[4]||(t[4]=s=>o.comment=s),placeholder:e.$t("dashboard.avisConsultationDialog.placeholder"),"persistent-hint":"",outlined:"",class:"w-full mt-2",rows:"5",rules:o.commentRules,hint:e.$t("dashboard.avisConsultationDialog.avis_feedback")},null,8,["id","modelValue","placeholder","rules","hint"]))]),l("div",Wn,[c(L,{onClick:t[5]||(t[5]=s=>e.$emit("close")),color:"#E0E0E0",class:"w-sm-50 w-100"},{default:g(()=>[j(u(e.$t("cancel_btn")),1)]),_:1}),c(L,{class:"w-sm-50 w-100 mt-2 mt-sm-0",color:"secondary",type:"submit"},{default:g(()=>[j(u(e.$t("dashboard.avisConsultationDialog.soumettre")),1)]),_:1})])]),_:1},8,["modelValue"])]),_:1})):$("",!0)]),_:1})]),_:1},8,["model-value","onUpdate:modelValue"])}const Yn=B(kn,[["render",zn],["__scopeId","data-v-d7ed6e0f"]]),Kn={props:{dialog:Boolean},emits:["update:dialog"],setup(e,{emit:t}){const{t:n}=re(),o=ie(),a=w(1),i=rt(),s=w(0),d=w(!1),h=P=>{t("update:dialog",P)},v=()=>{h(!1)},C=()=>{h(!1)},D=U(()=>i.consultations),f=w(null),k=w(""),y=async P=>{I.start();try{await o.post(`/opinion/absence-confirm/${P}`,{headers:{"Content-Type":"application/json"}}),f.value=null,T.value=""}catch(M){te.error(n("common.error.errorHasOccurred")),console.error(M)}await i.fetchConsultations(),I.stop()},A=async(P,M)=>{I.start();try{await o.post(`/opinion/absence-protest/${P}`,{commentPatient:M}),f.value=null,T.value=""}catch(O){te.error(n("common.error.errorHasOccurred")),console.error(O)}await i.fetchConsultations(),I.stop()},x=[P=>P.length<=300||n("300_caracteres")],T=w("");return{t:n,consultations:D,dialogYouAbsenceStore:i,updateDialogAppointment:h,toggleDialog:v,validate:C,confirmAbsence:y,disputeAbsence:A,page:a,commentRules:x,note:T,choice:f,onSubmit:async()=>{if(k.value="",!d.value)return!1;if(!f.value){k.value="Veuillez sélectionner une option.";return}f.value==="confirm"?await y(D.value[a.value-1].id):await A(D.value[a.value-1].id,T.value)},toggleChoice:P=>{f.value=P},isValidForm:d,choiceMsg:k,consultationNote:s}}};const qn={class:"font-weight-bold"},Gn={key:0,class:"text-center"},Jn=["innerHTML"],Qn={style:{"background-color":"#f3fcfa"},class:"pa-5 d-flex flex-column ga-2 rounded-lg"},Xn={class:"d-flex flex-column ga-2"},Zn={class:"d-flex justify-space-between"},es={class:"text-teal font-weight-bold"},ts={class:"d-flex justify-space-between"},os={class:"text-teal font-weight-bold"},ns={class:"d-flex flex-column ga-2"},ss={class:"d-flex justify-space-between"},as={class:"text-teal font-weight-bold"},is={class:"d-flex justify-space-between"},ls={class:"text-teal font-weight-bold"},rs={class:"d-flex justify-space-between"},ds={class:"text-teal font-weight-bold"},cs={class:"mt-3"},us={class:"d-flex flex-column ga-4 mt-3"},ps={class:"text-center text-gray-80 font-weight-medium"},fs={class:"d-sm-flex ga-3 px-6"},ms={key:0,class:"text-center text-red mt-1"},gs=["innerHTML"],hs={class:"d-flex justify-end pa-4"};function vs(e,t,n,o,a,i){return _(),S(X,{"model-value":n.dialog,"onUpdate:modelValue":o.updateDialogAppointment,persistent:"","max-width":"600",transition:"dialog-top-transition"},{default:g(()=>[c(Q,null,{default:g(()=>[c(J,{class:"d-flex pa-1 justify-center w-full align-center bg-surface-lighten-1 text-primary"},{default:g(()=>[l("span",qn,u(e.$t("dashboard.appointmentMissingDialog.title")),1),l("img",{style:{position:"absolute",right:"10px"},class:"cursor-pointer mr-2",onClick:t[0]||(t[0]=(...s)=>o.validate&&o.validate(...s)),src:he})]),_:1}),c(ve,{modelValue:o.isValidForm,"onUpdate:modelValue":t[5]||(t[5]=s=>o.isValidForm=s),onSubmit:be(o.onSubmit,["prevent"])},{default:g(()=>[o.consultations.length?(_(),S(ne,{key:0},{default:g(()=>[o.consultations.length>1?(_(),E("div",Gn,[c(Me,{"active-color":"secondary",density:"compact",color:"primary",modelValue:o.page,"onUpdate:modelValue":t[1]||(t[1]=s=>o.page=s),length:o.consultations.length,"total-visible":5},null,8,["modelValue","length"])])):$("",!0),l("div",{style:{color:"#757575"},class:"d-flex justify-center text-center abscence-title",innerHTML:e.$t("dashboard.avisConsultationDialog.recap",{date:o.consultations[o.page-1].date})},null,8,Jn),l("div",Qn,[l("div",Xn,[l("div",Zn,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.fullName"))+":",1),l("span",es,u(o.consultations[o.page-1].practitionerName),1)]),l("div",ts,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.reason"))+":",1),l("span",os,u(o.consultations[o.page-1].appointmentReason),1)])]),c(q),l("div",ns,[l("div",ss,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.duration"))+":",1),l("span",as,u(o.consultations[o.page-1].duration),1)]),l("div",is,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.price"))+":",1),l("span",ls,u(o.consultations[o.page-1].price),1)])]),c(q),l("div",null,[l("div",rs,[l("span",null,u(e.$t("dashboard.avisConsultationDialog.time"))+":",1),l("span",ds,u(o.consultations[o.page-1].time),1)])])]),l("div",cs,[l("label",null,u(e.$t("dashboard.avisConsultationDialog.note")),1),(_(),S(Le,{id:e.$t("dashboard.avisConsultationDialog.note"),key:o.consultationNote,modelValue:o.note,"onUpdate:modelValue":t[2]||(t[2]=s=>o.note=s),placeholder:e.$t("dashboard.appointmentMissingDialog.note"),"persistent-hint":"",outlined:"",class:"w-full mt-2",rows:"5",rules:o.commentRules,hint:e.$t("dashboard.avisConsultationDialog.avis_feedback")},null,8,["id","modelValue","placeholder","rules","hint"]))]),l("div",us,[l("div",ps,u(e.$t("dashboard.avisConsultationDialog.confirmAbscenceTitle")),1),l("div",null,[l("div",fs,[c(L,{class:"w-sm-50 w-100",color:o.choice==="dispute"?"red":"#F3D0D0",onClick:t[3]||(t[3]=s=>o.toggleChoice("dispute"))},{default:g(()=>[l("span",{style:fe({color:o.choice==="dispute"?"white":"#A82525"})},u(e.$t("dashboard.appointmentMissingDialog.dispute")),5)]),_:1},8,["color"]),c(L,{class:"w-sm-50 w-100 mt-sm-0 mt-3",color:o.choice==="confirm"?"primary":"#C2ECE2",onClick:t[4]||(t[4]=s=>o.toggleChoice("confirm"))},{default:g(()=>[l("span",{style:fe({color:o.choice==="confirm"?"white":"#004838"})},u(e.$t("dashboard.appointmentMissingDialog.confirm")),5)]),_:1},8,["color"])]),o.choiceMsg?(_(),E("div",ms,u(o.choiceMsg),1)):$("",!0)])])]),_:1})):$("",!0),c(Qt,{cols:"12"},{default:g(()=>[l("span",{class:"mr-auto dialog-text",innerHTML:e.$t("dashboard.appointmentMissingDialog.modifyChoiceInfo")},null,8,gs)]),_:1}),l("div",hs,[c(L,{class:"",color:"secondary",type:"submit"},{default:g(()=>[j(u(e.$t("dashboard.appointmentMissingDialog.save")),1)]),_:1})])]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["model-value","onUpdate:modelValue"])}const bs=B(Kn,[["render",vs],["__scopeId","data-v-544fbd5e"]]);const ys={__name:"AppointmentCanceledDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{xs:t}=at(),n=Xt(e,"modelValue"),o=()=>{n.value=!1};return(a,i)=>(_(),S(X,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),persistent:"","min-width":r(t)?0:500,width:"fit-content",transition:"dialog-top-transition"},{default:g(()=>[c(Q,{class:"bg-white"},{default:g(()=>[c(J,{class:"d-flex pa-4 justify-center w-full align-center bg-surface-lighten-1 text-primary"},{default:g(()=>[l("span",null,u(a.$t("tmpAppointmentDialog.titleAppointmentCanceled")),1),c(L,{class:"close-icon mr-2",variant:"text",icon:"mdi-close",onClick:o})]),_:1}),c(ne,{class:"pa-4 text-center"},{default:g(()=>[j(u(a.$t("tmpAppointmentDialog.messageAppointmentCanceled")),1)]),_:1}),c(it,{class:"d-flex justify-center align-center pa-4 pt-2"},{default:g(()=>[c(L,{class:"px-6",variant:"flat",color:"blue-darken-1",text:a.$t("confirmDialog.confirmBtn"),onClick:o},null,8,["text"])]),_:1})]),_:1})]),_:1},8,["modelValue","min-width"]))}},_s=B(ys,[["__scopeId","data-v-bad96da7"]]),ws={class:"version-chip"},ks=G({__name:"VersionChip",setup(e){w(""),ie();const t=U(()=>"v4.4.0");return oe(async()=>!1),(n,o)=>(_(),E("div",ws,u(t.value),1))}});const Cs=B(ks,[["__scopeId","data-v-e35b0e37"]]),Ps="/assets/onboarding-alert-a728755b.jpg",As={class:"font-weight-bold title"},xs={class:"px-5 d-flex flex-column ga-4"},Vs={class:"start"},Ds={class:"start-desc"},Ts={class:"px-5 py-5"},$s={class:"d-sm-flex ga-sm-2"},Ss={class:"font-weight-bold",style:{color:"#757575"}},Hs=G({__name:"AlertCloseOnboarding",props:{display:Boolean},emits:["confirmDelete","cancel"],setup(e,{emit:t}){const n=dt();re();const o=async()=>{await n.resetOnboarding(),n.visible==!1,await n.toggleOnboarding(!0),n.leave=!0},a=()=>{n.onboardingAlert=!1,setTimeout(()=>n.visible=!0,300)},i=async()=>{n.continueLater=!0,n.visible=!1,n.onboardingAlert=!1,await n.toggleOnboarding(!0),n.leave=!0};return(s,d)=>(_(),S(X,{persistent:"","model-value":e.display,width:"650"},{default:g(()=>[c(Q,{disabled:r(n).loading,"max-width":"450",color:"white",transition:"dialog-top-transition"},{default:g(()=>[c(J,{class:"py-3 d-flex justify-center w-full align-center bg-surface-lighten-1"},{default:g(()=>[l("span",As,u(s.$t("onboarding.discoverHolitime")),1),l("img",{style:{position:"absolute",right:"10px"},class:"cursor-pointer mr-2",onClick:d[0]||(d[0]=()=>a()),src:he})]),_:1}),l("div",null,[c(Zt,{eager:"",src:Ps}),l("div",xs,[l("p",Vs,u(s.$t("onboarding.modalAlertTitle")),1),l("p",Ds,u(s.$t("onboarding.modalAlertDesc")),1)])]),l("div",Ts,[l("div",$s,[c(L,{color:"#E0E0E0",class:"w-sm-50 w-100",onClick:d[1]||(d[1]=()=>o())},{default:g(()=>[l("span",Ss,u(s.$t("onboarding.noLongerDisplay")),1)]),_:1}),c(L,{color:"#12C29B",class:"w-sm-50 w-100 mt-sm-0 mt-2 text-white",onClick:d[2]||(d[2]=()=>i())},{default:g(()=>[j(u(s.$t("onboarding.continueLater")),1)]),_:1})])])]),_:1},8,["disabled"])]),_:1},8,["model-value"]))}});const Ms=B(Hs,[["__scopeId","data-v-7fbe81e7"]]);const Ls={},Es={class:"loader"};function Ns(e,t){return _(),E("div",Es)}const Fs=B(Ls,[["render",Ns],["__scopeId","data-v-b8ff8710"]]),Z=e=>(Po("data-v-eea2ce8e"),e=e(),Ao(),e),Rs={class:"title-modal font-weight-bold"},js={key:0,class:"my-2"},Os={class:"font-weight-bold d-flex align-center ga-3"},Us={key:2},Is=Z(()=>l("label",null,"Sélection patient",-1)),Bs={class:"d-flex ga-2"},Ws={key:0},zs={key:0,class:"pa-4"},Ys={class:"label-custom"},Ks={class:"my-2"},qs={class:"text-caption"},Gs={key:4,style:{"font-size":"0.8em"},class:"text-red text-center font-italic"},Js={class:"d-flex ga-2"},Qs={class:"w-100"},Xs=Z(()=>l("label",null,"Date",-1)),Zs={class:"d-sm-flex align-center ga-2 mt-2"},ea={class:"w-sm-50"},ta=Z(()=>l("label",null,"De",-1)),oa={class:"w-sm-50 mt-2 mt-sm-0"},na=Z(()=>l("label",null,"À",-1)),sa={class:"text-desabled"},aa={key:5,class:"my-2"},ia=Z(()=>l("label",null,"Sélection adresse",-1)),la={key:0},ra={key:1,class:"text-black align-self-center"},da={class:"my-2"},ca={for:""},ua={class:"remote-wrapper d-flex align-center justify-start ga-4"},pa={key:7,class:"mb-2"},fa={key:0},ma={key:8,class:"mb-2"},ga=["href"],ha=Z(()=>l("label",null,"Description",-1)),va={class:"d-flex flex-column flex-sm-row ga-2 mt-4"},ba=Z(()=>l("span",{style:{color:"#757575","font-weight":"700"}},"Annuler",-1)),ya=G({__name:"DialogAppointment",setup(e){const{required:t}=eo(),{t:n}=re(),o=le(),a=to(),i=oo(),s=ct(),d=no(),h=so(),v=new Date().toISOString().split("T")[0],C=w(""),D=w(""),f=w(!1),k=U(()=>[p=>!!p||n("login.error.emailRequired"),p=>/.+@.+\..+/.test(p)||n("login.error.emailInvalid")]),y=ao(),{isLoading:A,patients:x,isLoadingMore:T}=Ke(y),V=w(""),H=w(null),P=w(null),M=ko(p=>{N(p)},500),O=p=>{var R;const m=(R=p.clipboardData)==null?void 0:R.getData("text");m&&(V.value=m,H.value&&clearTimeout(H.value),N(m))},N=async p=>{if(V.value=p||"",!p||!p.trim()){P.value=null,s.selectedPatient=null,await Y({refresh:!0,append:!1});return}P.value&&p===`${P.value.firstName} ${P.value.lastName}`||await Y({refresh:!0,append:!1})},Ne=p=>{if(!p){V.value="",s.selectedPatient=null,P.value=null;return}V.value=`${p.firstName} ${p.lastName}`;const m={firstName:p.firstName,lastName:p.lastName,email:p.email,phoneNumber:p.phone};s.selectedPatient=m,P.value=p,xe(()=>{const R=document.querySelector(".v-autocomplete input");R&&(R.value=V.value)})},Y=async(p={refresh:!1,append:!1})=>{try{await y.fetchPatients({search:V.value,refresh:p.refresh,append:p.append})}catch(m){console.error("Error fetching patients:",m)}};function _t(p){p&&y.hasMore&&Y({refresh:!1,append:!0})}const wt=p=>{p===null&&(s.selectedAppointmentReason=s.fileteredAppointmentReason[0]),s.selectedAppointmentReason=s.fileteredAppointmentReason.find(m=>m.profile.id==p.id)},ee=w("");Pe(()=>ee.value,()=>{k.value.map(m=>m(ee.value)).filter(m=>m!==!0).length>0?s.newPatientEmail="":s.newPatientEmail=ee.value.toLowerCase()}),Pe(()=>s.isOpen,()=>{ee.value=s.newPatientEmail;const p=s.selectedDate?W(s.selectedDate):W();s.startHour=p.hour(),s.startMinute=p.minute(),d.fillPatients()});function kt(p){return p?[]:["Une option doit être sélectionnée."]}const Ct=async()=>{if(!Re.value)return te.error(n("dashboard.appointment.dialogPopup.enterAddress")),!1;if(!s.isEditing&&!Tt.value||!je.value)return!1;if(s.isNewPatient){if(D.value&&!f.value)return!1;s.newPatientPhone=C.value}if(s.isEditing)s.updateAppointment();else if(await s.createAppointment(),s.isNewPatient){const p={id:"",firstName:s.newPatientFirstName,lastName:s.newPatientLastName,email:s.newPatientEmail,phoneNumber:s.newPatientPhone||"",fullName:`${s.newPatientFirstName} ${s.newPatientLastName}`,emailConfirmed:!1,avatar:"",language:"fr",publicName:`${s.newPatientFirstName} ${s.newPatientLastName}`,passwordSet:!1};d.patients.push(p),d.patients.sort((m,R)=>m.fullName.localeCompare(R.fullName))}};oe(async()=>{(!a.addresses||!a.addresses.length)&&a.initAddresses(),(!i.profiles||!i.profiles.length)&&await i.initProfiles(),s.selectedProfile=i.profiles[0],h.appointmentReasons||await h.refreshAppointmentReasons(),s.selectedAppointmentReason=s.fileteredAppointmentReason[0],s.isEditing?s.selectedPatient&&(P.value=s.selectedPatient):Y({refresh:!0,append:!1})});const Fe=w(null),Pt=()=>{s.isNewPatient=!1},At=async()=>{P.value=null,V.value="",await Y({refresh:!0,append:!1})},xt=()=>{s.isNewPatient=!0,xe(()=>{const p=Fe.value.querySelector("input:not([type=hidden]),textarea:not([type=hidden])");p&&setTimeout(()=>{p.focus()},0)})},{selectedAddress:Re,selectedAppointmentReason:Vt,selectedDate:je,acceptRemote:Dt}=Ke(s),Tt=U(()=>s.selectedPatient&&s.selectedPatient.email&&s.selectedPatient.firstName&&s.selectedPatient.lastName&&(Re.value||a.addresses.length>0)&&Vt.value&&!!je.value&&Dt.value);U(()=>!s.selectedDate||!s.selectedStartTime?!1:W(`${s.selectedDate.format("YYYY-MM-DD")} ${s.selectedStartTime}`,"YYYY-MM-DD HH:mm").isAfter(W())),s.$subscribe((p,m)=>{m.selectedAddress||(m.selectedAddress=a.addresses[0])});const $t=()=>{Co.confirm({title:n("dashboard.appointment.dialogPopup.confirmDeleteAppointment"),message:n("dashboard.appointment.dialogPopup.confirmDeleteAppointmentQuetion"),optionsConfirm:{onCancel(){},onConfirm(){d.handleDeleteAppointment(s.id)}}})},St=()=>{const p=s.selectedAppointmentReason?s.selectedAppointmentReason.duration:null;p&&(s.selectedEndTime=W(s.selectedDate+" "+s.selectedStartTime,"YYYY-MM-DD H:mm").add(p,"minutes").format("YYYY-MM-DD HH:mm").split(" ")[1])},Ht=U(()=>{var K;const p=(K=s.selectedAppointmentReason)==null?void 0:K.duration,m=Number(s.startHour),R=Number(s.startMinute);return W().hour(m).minute(R).add(p,"minute").format("HH:mm")}),Mt=async p=>{f.value=p.valid,C.value=p.number};return U(()=>{if(!V.value)return d.patients;const p=V.value.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/-/g," ").replace(/\s+/g," ").trim();return d.patients.filter(m=>{const R=ae=>ae?ae.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/-/g," ").replace(/\s+/g," ").trim():"",se=R(m.fullName),K=m.fullName?R(m.fullName.split(" ").reverse().join(" ")):"",de=R(m.email);return se.includes(p)||K.includes(p)||de.includes(p)})}),(p,m)=>(_(),S(X,{"model-value":r(s).isOpen,persistent:"",transition:"dialog-top-transition",width:"550"},{default:g(()=>[c(Q,{class:"bg-white"},{default:g(()=>[c(J,{class:"d-flex justify-center w-full align-center bg-surface-lighten-1 text-primary"},{default:g(()=>[l("span",Rs,u(r(s).isEditing?p.$t("dashboard.appointment.dialogPopup.titleEdit"):p.$t("dashboard.appointment.dialogPopup.titleCreate")),1),c(io,{size:"24",onClick:m[0]||(m[0]=()=>r(s).toggleDialog()),class:"mr-4 close-icon cursor-pointer"})]),_:1}),c(q),c(ne,{class:"d-flex flex-column ga-2 px-12 xxs-padding"},{default:g(()=>[c(ve,{ref:"form",onSubmit:be(Ct,["prevent"])},{default:g(()=>{var R,se,K,de,ae,Oe,Ue,Ie,Be,We,ze,Ye;return[1<r(i).profiles.length?(_(),E("div",js,[l("label",null,u(p.$t("dashboard.appointment.dialogPopup.labelProfile")),1),c(_e,{modelValue:r(s).selectedProfile,"onUpdate:modelValue":[m[1]||(m[1]=b=>r(s).selectedProfile=b),wt],"auto-select-first":!1,"custom-filter":()=>!0,items:r(i).profiles,clearable:"","item-title":"mainDiscipline.name","item-value":"mainDiscipline.name","return-object":"","validate-on":"lazy",density:"compact",rules:r(t),"hide-details":"",rounded:"lg",placeholder:"selection de profile"},null,8,["modelValue","items","rules"])])):$("",!0),r(s).isNewPatient&&!r(s).isEditing?(_(),S(L,{key:1,onClick:Pt,variant:"text",block:"",density:"comfortable"},{default:g(()=>[l("div",Os,[l("span",null,u(p.$t("dashboard.appointment.dialogPopup.selectOlderPatient")),1)])]),_:1})):$("",!0),r(s).isNewPatient?$("",!0):(_(),E("div",Us,[Is,l("div",Bs,[c(lo,{modelValue:P.value,"onUpdate:modelValue":[m[2]||(m[2]=b=>P.value=b),Ne],items:r(x),placeholder:p.$t("dashboard.appointment.dialogPopup.placeholderNamePatient"),"auto-select-first":!1,"item-title":b=>b?`${b.firstName} ${b.lastName}`:"","item-value":"id","return-object":"",variant:"outlined",density:"compact",rounded:"lg",clearable:"","no-filter":"","search-input":V.value,"onUpdate:searchInput":m[3]||(m[3]=b=>V.value=b),"onUpdate:search":r(M),"onClick:clear":At,onPaste:O,"error-messages":r(d).errorMessage("owner"),rules:r(t),"hide-details":"auto","no-data-text":r(A)?p.$t("dashboard.appointment.dialogPopup.searching"):p.$t("dashboard.appointment.dialogPopup.noDataAvailable"),disabled:r(s).isEditing},{"append-inner":g(({isActive:b})=>[qe(c(L,{loading:r(A)||r(T),variant:"text",icon:"mdi-loading",size:"small",disabled:""},null,8,["loading"]),[[ro,(r(A)||r(T))&&b]])]),item:g(({item:b,props:ye})=>[c(Ge,co(ye,{title:b.raw.firstName+" "+b.raw.lastName,subtitle:b.raw.email}),{prepend:g(()=>[b.raw.firstName?(_(),S(uo,{key:0,color:"surface-variant",size:"33"},{default:g(()=>[j(u(b.raw.firstName.slice(0,1)),1)]),_:2},1024)):$("",!0)]),_:2},1040,["title","subtitle"])]),"append-item":g(()=>[r(x).length?(_(),E(ut,{key:0},[r(A)?$("",!0):qe((_(),E("div",Ws,[r(T)?(_(),E("div",zs,[c(Fs)])):$("",!0)])),[[po,_t]])],64)):$("",!0)]),_:1},8,["modelValue","items","placeholder","item-title","search-input","onUpdate:search","error-messages","rules","no-data-text","disabled"]),!r(s).isNewPatient&&!r(s).isEditing?(_(),S(L,{key:0,onClick:m[4]||(m[4]=()=>xt()),color:"#12C29B",icon:"",size:"small"},{default:g(()=>[c(Ae,{color:"white"},{default:g(()=>[j("mdi-plus")]),_:1})]),_:1})):$("",!0)])])),r(s).isNewPatient&&!r(s).isEditing?(_(),S(fo,{key:3},{default:g(()=>[l("form",{ref_key:"formNewPatient",ref:Fe,class:"mb-2 d-flex flex-column ga-1"},[l("div",null,[l("label",null,u(`${p.$t("dashboard.appointment.dialogPopup.firstName")}*`),1),c(ce,{modelValue:r(s).newPatientFirstName,"onUpdate:modelValue":m[5]||(m[5]=b=>r(s).newPatientFirstName=b),"hide-details":"","error-messages":r(d).errorMessage("firstNamePatient"),density:"compact",clearable:"",rules:r(t),rounded:"lg",placeholder:p.$t("dashboard.appointment.dialogPopup.firstName")},null,8,["modelValue","error-messages","rules","placeholder"])]),l("div",null,[l("label",null,u(`${p.$t("dashboard.appointment.dialogPopup.lastName")}*`),1),c(ce,{modelValue:r(s).newPatientLastName,"onUpdate:modelValue":m[6]||(m[6]=b=>r(s).newPatientLastName=b),"hide-details":"","error-messages":r(d).errorMessage("lastNamePatient"),density:"compact",clearable:"",rules:r(t),rounded:"lg",placeholder:p.$t("dashboard.appointment.dialogPopup.lastName")},null,8,["modelValue","error-messages","rules","placeholder"])]),l("div",null,[l("label",null,u(`${p.$t("Email")}*`),1),c(ce,{modelValue:ee.value,"onUpdate:modelValue":m[7]||(m[7]=b=>ee.value=b),"hide-details":"","error-messages":r(d).errorMessage("emailPatient"),density:"compact",clearable:"",rules:k.value,rounded:"lg",placeholder:p.$t("Email")},null,8,["modelValue","error-messages","rules","placeholder"])]),l("div",null,[l("label",Ys,u(r(n)("dashboard.account.phoneNumber")),1),c(mo,{modelValue:D.value,"onUpdate:modelValue":m[8]||(m[8]=b=>D.value=b),label:p.$t("accountForm.phone.label"),"show-dial-code":!1,rounded:"",onChange:Mt,onValide:m[9]||(m[9]=b=>f.value=b)},null,8,["modelValue","label"])])],512)]),_:1})):$("",!0),l("div",Ks,[l("label",null,u(p.$t("dashboard.appointment.dialogPopup.placeholderSelectMotive")),1),c(_e,{modelValue:r(s).selectedAppointmentReason,"onUpdate:modelValue":[m[10]||(m[10]=b=>r(s).selectedAppointmentReason=b),St],items:r(s).fileteredAppointmentReason,rounded:"lg",density:"compact","item-title":"label","item-value":"id","return-object":"","error-messages":kt(r(s).selectedAppointmentReason),"hide-details":"auto",placeholder:"Sélectionner un motif"},{item:g(({props:b,item:ye})=>[c(Ge,go(ho(b)),{default:g(()=>[l("div",qs,u(p.$t("dashboard.time-slot.dialogTimeSlot.duration",{duration:ye.raw.duration})),1)]),_:2},1040)]),_:1},8,["modelValue","items","error-messages"])]),r(s).fileteredAppointmentReason.length?$("",!0):(_(),E("span",Gs,u(p.$t("dashboard.time-slot.dialogTimeSlot.messageErrorForMotif")),1)),l("div",Js,[l("div",Qs,[Xs,c(r(vo),{"prepend-icon":"",modelValue:r(s).selectedDate,"onUpdate:modelValue":m[11]||(m[11]=b=>r(s).selectedDate=b),"append-inner-icon":"mdi-calendar-remove",placeholder:p.$t("dashboard.time-slot.dialogVacation.datePlaceholder"),density:"compact",rounded:"lg","hide-details":"auto","hide-actions":"",variant:"outlined",min:r(v),rules:r(t)},null,8,["modelValue","placeholder","min","rules"])])]),l("div",Zs,[l("div",ea,[ta,c(bo,{class:"w-100",hour:r(s).startHour,"onUpdate:hour":m[12]||(m[12]=b=>r(s).startHour=b),minute:r(s).startMinute,"onUpdate:minute":m[13]||(m[13]=b=>r(s).startMinute=b)},null,8,["hour","minute"])]),l("div",oa,[na,l("div",sa,u(Ht.value),1)])]),r(a).addresses.length>1?(_(),E("div",aa,[ia,c(_e,{modelValue:r(s).selectedAddress,"onUpdate:modelValue":m[14]||(m[14]=b=>r(s).selectedAddress=b),class:"flex-grow-1","hide-details":"",density:"compact","item-title":"formattedAddress","item-value":"formattedAddress","return-object":"",items:r(a).addresses,rounded:"lg"},{selection:g(({item:b})=>[b.title.length<50?(_(),E("span",la,u(b.title),1)):(_(),E("span",ra,u(b.title.slice(0,50))+" ... ",1))]),_:1},8,["modelValue","items"])])):$("",!0),l("div",da,[l("label",ca,u(p.$t("dashboard.appointment.dialogPopup.modality")),1),l("div",ua,[c(yo,{class:"mx-auto ga-2 flex accept-remote items-center",inline:"","hide-details":"",modelValue:r(s).acceptRemote,"onUpdate:modelValue":m[15]||(m[15]=b=>r(s).acceptRemote=b)},{default:g(()=>[c(Je,{color:"secondary",label:p.$t("dashboard.time-slot.in-person"),value:"in-person"},null,8,["label"]),c(Je,{color:"secondary",label:p.$t("dashboard.time-slot.remote"),value:"remote"},null,8,["label"])]),_:1},8,["modelValue"])])]),r(s).acceptRemote=="remote"&&((se=(R=r(o))==null?void 0:R.user)!=null&&se.hasVisioToolFeature)?(_(),S(_o,{key:6,modelValue:r(s).useInternalVisioTool,"onUpdate:modelValue":m[16]||(m[16]=b=>r(s).useInternalVisioTool=b),label:p.$t("dashboard.appointment.dialogPopup.useInternalVisioTool"),"hide-details":""},null,8,["modelValue","label"])):$("",!0),r(s).acceptRemote=="remote"?(_(),E("div",pa,[(de=(K=r(o))==null?void 0:K.user)!=null&&de.hasVisioToolFeature&&!r(s).useInternalVisioTool||(Oe=(ae=r(o))==null?void 0:ae.user)!=null&&Oe.hasVisioToolFeature&&r(s).isEditing&&r(s).remoteAppointmentLink&&r(s).remoteAppointmentLink.includes("/appointment/")||!((Ie=(Ue=r(o))==null?void 0:Ue.user)!=null&&Ie.hasVisioToolFeature)&&!r(s).isEditing?(_(),E("label",fa,u(p.$t("dashboard.appointment.dialogPopup.remoteAppointmentLink")),1)):$("",!0),!((We=(Be=r(o))==null?void 0:Be.user)!=null&&We.hasVisioToolFeature)||!r(s).useInternalVisioTool?(_(),S(ce,{key:1,modelValue:r(s).remoteAppointmentLink,"onUpdate:modelValue":m[17]||(m[17]=b=>r(s).remoteAppointmentLink=b),"hide-details":"auto","error-messages":r(d).errorMessage("meetingLink"),density:"compact",rounded:"lg",clearable:""},null,8,["modelValue","error-messages"])):$("",!0)])):$("",!0),r(s).acceptRemote=="remote"&&((Ye=(ze=r(o))==null?void 0:ze.user)!=null&&Ye.hasVisioToolFeature)&&r(s).useInternalVisioTool&&r(s).isEditing&&r(s).remoteAppointmentLink&&r(s).remoteAppointmentLink.includes("/appointment/")?(_(),E("div",ma,[l("a",{href:r(s).remoteAppointmentLink,target:"_blank"},u(r(s).remoteAppointmentLink),9,ga)])):$("",!0),l("div",null,[ha,c(wo,{content:r(s).description,"onUpdate:content":m[18]||(m[18]=b=>r(s).description=b),contentType:"html",placeholder:p.$t("dashboard.appointment.dialogPopup.placeholderDescription"),toolbar:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],["link"]],rules:[],"error-messages":[],color:"secondary"},null,8,["content","placeholder"])]),l("div",va,[r(s).isEditing?(_(),S(L,{key:0,class:"w-sm-50 w-100",color:"red-darken-1",onClick:$t},{default:g(()=>[j(u(p.$t("common.delete")),1)]),_:1})):(_(),S(L,{key:1,onClick:m[19]||(m[19]=()=>r(s).toggleDialog()),color:"#E0E0E0",class:"w-sm-50 w-100 mb-2 mb-sm-0"},{default:g(()=>[ba]),_:1})),c(L,{class:"w-sm-50 w-100",variant:"flat",color:"secondary",loading:r(d).loading,type:"submit"},{default:g(()=>[j(u(p.$t("common.save")),1)]),_:1},8,["loading"])])]}),_:1},512)]),_:1})]),_:1})]),_:1},8,["model-value"]))}});const _a=B(ya,[["__scopeId","data-v-eea2ce8e"]]),wa=G({__name:"App",setup(e){const t=ct(),n=xo(),o=dt();w(null);const a=Vo(),i=le(),s=Ve(),d=rt();oe(async()=>{i.isLogged&&(await h(),i.user.profilType==="patient"||n.navRole==="patient"?n.navRole="patient":n.navRole="praticien")});const h=async()=>{i.user.profilType==="practitioner"&&await Ve().startLoop(),(i.user.profilType==="patient"||i.user.profilType==="practitioner")&&(await lt().startLoop(),await d.startLoop())},v=w(!0);function C(){v.value=!0}function D(){v.value=!1}F.on("open-practitioner-ask-presence-dialog",C),F.on("close-practitioner-ask-presence-dialog",D);const f=w(!1);function k(){f.value=!0}function y(){f.value=!1}F.on("open-dialog-avis-consultation",k),F.on("close-dialog-avis-consultation",y);const A=w(!1);function x(){A.value=!0}function T(){A.value=!1}F.on("open-dialog-your-absence",x),F.on("close-dialog-your-absence",T);const V=w(!1),H=async()=>{F.emit("close-confirm"),await ke.push({name:"PractitionerPublicProfile",params:{...a.publicProfileParams}}),V.value=!0};return F.on("tmp-appointment-canceled",H),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?i.isPageVisible=!1:i.isPageVisible=!0}),(P,M)=>{const O=Do("router-view");return _(),E(ut,null,[c(To,{defaults:{VApp:{style:"font-family: Poppins, sans-serif;"},VHeading:{style:"font-family: Poppins, sans-serif;"},VBtn:{style:"font-family: Poppins, sans-serif;"}}},{default:g(()=>[c(Io),c(Uo),c(Wo),c(O),r(i).isLogged&&r(s).consultations.length?(_(),S(wn,{key:0,dialog:v.value,"onUpdate:dialog":M[0]||(M[0]=N=>v.value=N),onClose:D},null,8,["dialog"])):$("",!0),c(Yn,{dialogAvis:f.value,"onUpdate:dialogAvis":M[1]||(M[1]=N=>f.value=N),onClose:y},null,8,["dialogAvis"]),r(d).consultations.length?(_(),S(bs,{key:1,dialog:A.value,"onUpdate:dialog":M[2]||(M[2]=N=>A.value=N)},null,8,["dialog"])):$("",!0),c(_s,{modelValue:V.value,"onUpdate:modelValue":M[3]||(M[3]=N=>V.value=N)},null,8,["modelValue"]),c(Cs)]),_:1}),c(Ms,{display:r(o).onboardingAlert},null,8,["display"]),r(t).isOpen?(_(),S(_a,{key:0})):$("",!0)],64)}}});const ka=new Set(["title","titleTemplate","script","style","noscript"]),pe=new Set(["base","meta","link","style","script","noscript"]),Ca=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),Pa=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),pt=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),Aa=typeof window<"u";function me(e){let t=9;for(let n=0;n<e.length;)t=Math.imul(t^e.charCodeAt(n++),9**9);return((t^t>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function De(e){if(e._h)return e._h;if(e._d)return me(e._d);let t=`${e.tag}:${e.textContent||e.innerHTML||""}:`;for(const n in e.props)t+=`${n}:${String(e.props[n])},`;return me(t)}function xa(e,t){return e instanceof Promise?e.then(t):t(e)}function Te(e,t,n,o){const a=o||mt(typeof t=="object"&&typeof t!="function"&&!(t instanceof Promise)?{...t}:{[e==="script"||e==="noscript"||e==="style"?"innerHTML":"textContent"]:t},e==="templateParams"||e==="titleTemplate");if(a instanceof Promise)return a.then(s=>Te(e,t,n,s));const i={tag:e,props:a};for(const s of pt){const d=i.props[s]!==void 0?i.props[s]:n[s];d!==void 0&&((!(s==="innerHTML"||s==="textContent"||s==="children")||ka.has(i.tag))&&(i[s==="children"?"innerHTML":s]=d),delete i.props[s])}return i.props.body&&(i.tagPosition="bodyClose",delete i.props.body),i.tag==="script"&&typeof i.innerHTML=="object"&&(i.innerHTML=JSON.stringify(i.innerHTML),i.props.type=i.props.type||"application/json"),Array.isArray(i.props.content)?i.props.content.map(s=>({...i,props:{...i.props,content:s}})):i}function Va(e,t){var o;const n=e==="class"?" ":";";return t&&typeof t=="object"&&!Array.isArray(t)&&(t=Object.entries(t).filter(([,a])=>a).map(([a,i])=>e==="style"?`${a}:${i}`:a)),(o=String(Array.isArray(t)?t.join(n):t))==null?void 0:o.split(n).filter(a=>!!a.trim()).join(n)}function ft(e,t,n,o){for(let a=o;a<n.length;a+=1){const i=n[a];if(i==="class"||i==="style"){e[i]=Va(i,e[i]);continue}if(e[i]instanceof Promise)return e[i].then(s=>(e[i]=s,ft(e,t,n,a)));if(!t&&!pt.has(i)){const s=String(e[i]),d=i.startsWith("data-");s==="true"||s===""?e[i]=d?"true":!0:e[i]||(d&&s==="false"?e[i]="false":delete e[i])}}}function mt(e,t=!1){const n=ft(e,t,Object.keys(e),0);return n instanceof Promise?n.then(()=>e):e}const Da=10;function gt(e,t,n){for(let o=n;o<t.length;o+=1){const a=t[o];if(a instanceof Promise)return a.then(i=>(t[o]=i,gt(e,t,o)));Array.isArray(a)?e.push(...a):e.push(a)}}function Ta(e){const t=[],n=e.resolvedInput;for(const a in n){if(!Object.prototype.hasOwnProperty.call(n,a))continue;const i=n[a];if(!(i===void 0||!Ca.has(a))){if(Array.isArray(i)){for(const s of i)t.push(Te(a,s,e));continue}t.push(Te(a,i,e))}}if(t.length===0)return[];const o=[];return xa(gt(o,t,0),()=>o.map((a,i)=>(a._e=e._i,e.mode&&(a._m=e.mode),a._p=(e._i<<Da)+i,a)))}const Xe=new Set(["onload","onerror","onabort","onprogress","onloadstart"]),Ze={base:-10,title:10},et={critical:-80,high:-10,low:20};function ge(e){const t=e.tagPriority;if(typeof t=="number")return t;let n=100;return e.tag==="meta"?e.props["http-equiv"]==="content-security-policy"?n=-30:e.props.charset?n=-20:e.props.name==="viewport"&&(n=-15):e.tag==="link"&&e.props.rel==="preconnect"?n=20:e.tag in Ze&&(n=Ze[e.tag]),t&&t in et?n+et[t]:n}const $a=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],Sa=["name","property","http-equiv"];function ht(e){const{props:t,tag:n}=e;if(Pa.has(n))return n;if(n==="link"&&t.rel==="canonical")return"canonical";if(t.charset)return"charset";if(t.id)return`${n}:id:${t.id}`;for(const o of Sa)if(t[o]!==void 0)return`${n}:${o}:${t[o]}`;return!1}const z="%separator";function Ha(e,t){var o;let n;if(t==="s"||t==="pageTitle")n=e.pageTitle;else if(t.includes(".")){const a=t.indexOf(".");n=(o=e[t.substring(0,a)])==null?void 0:o[t.substring(a+1)]}else n=e[t];return n!==void 0?(n||"").replace(/"/g,'\\"'):void 0}const Ma=new RegExp(`${z}(?:\\s*${z})*`,"g");function ue(e,t,n){if(typeof e!="string"||!e.includes("%"))return e;let o=e;try{o=decodeURI(e)}catch{}const a=o.match(/%\w+(?:\.\w+)?/g);if(!a)return e;const i=e.includes(z);return e=e.replace(/%\w+(?:\.\w+)?/g,s=>{if(s===z||!a.includes(s))return s;const d=Ha(t,s.slice(1));return d!==void 0?d:s}).trim(),i&&(e.endsWith(z)&&(e=e.slice(0,-z.length)),e.startsWith(z)&&(e=e.slice(z.length)),e=e.replace(Ma,n).trim()),e}function tt(e,t){return e==null?t||null:typeof e=="function"?e(t):e}async function La(e,t={}){const n=t.document||e.resolvedOptions.document;if(!n||!e.dirty)return;const o={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",o),!!o.shouldRender)return e._domUpdatePromise||(e._domUpdatePromise=new Promise(async a=>{var D;const i=(await e.resolveTags()).map(f=>({tag:f,id:pe.has(f.tag)?De(f):f.tag,shouldRender:!0}));let s=e._dom;if(!s){s={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};const f=new Set;for(const k of["body","head"]){const y=(D=n[k])==null?void 0:D.children;for(const A of y){const x=A.tagName.toLowerCase();if(!pe.has(x))continue;const T={tag:x,props:await mt(A.getAttributeNames().reduce((M,O)=>({...M,[O]:A.getAttribute(O)}),{})),innerHTML:A.innerHTML},V=ht(T);let H=V,P=1;for(;H&&f.has(H);)H=`${V}:${P++}`;H&&(T._d=H,f.add(H)),s.elMap[A.getAttribute("data-hid")||De(T)]=A}}}s.pendingSideEffects={...s.sideEffects},s.sideEffects={};function d(f,k,y){const A=`${f}:${k}`;s.sideEffects[A]=y,delete s.pendingSideEffects[A]}function h({id:f,$el:k,tag:y}){const A=y.tag.endsWith("Attrs");if(s.elMap[f]=k,A||(y.textContent&&y.textContent!==k.textContent&&(k.textContent=y.textContent),y.innerHTML&&y.innerHTML!==k.innerHTML&&(k.innerHTML=y.innerHTML),d(f,"el",()=>{var x;(x=s.elMap[f])==null||x.remove(),delete s.elMap[f]})),y._eventHandlers)for(const x in y._eventHandlers)Object.prototype.hasOwnProperty.call(y._eventHandlers,x)&&k.getAttribute(`data-${x}`)!==""&&((y.tag==="bodyAttrs"?n.defaultView:k).addEventListener(x.substring(2),y._eventHandlers[x].bind(k)),k.setAttribute(`data-${x}`,""));for(const x in y.props){if(!Object.prototype.hasOwnProperty.call(y.props,x))continue;const T=y.props[x],V=`attr:${x}`;if(x==="class"){if(!T)continue;for(const H of T.split(" "))A&&d(f,`${V}:${H}`,()=>k.classList.remove(H)),!k.classList.contains(H)&&k.classList.add(H)}else if(x==="style"){if(!T)continue;for(const H of T.split(";")){const P=H.indexOf(":"),M=H.substring(0,P).trim(),O=H.substring(P+1).trim();d(f,`${V}:${M}`,()=>{k.style.removeProperty(M)}),k.style.setProperty(M,O)}}else k.getAttribute(x)!==T&&k.setAttribute(x,T===!0?"":String(T)),A&&d(f,V,()=>k.removeAttribute(x))}}const v=[],C={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const f of i){const{tag:k,shouldRender:y,id:A}=f;if(y){if(k.tag==="title"){n.title=k.textContent;continue}f.$el=f.$el||s.elMap[A],f.$el?h(f):pe.has(k.tag)&&v.push(f)}}for(const f of v){const k=f.tag.tagPosition||"head";f.$el=n.createElement(f.tag.tag),h(f),C[k]=C[k]||n.createDocumentFragment(),C[k].appendChild(f.$el)}for(const f of i)await e.hooks.callHook("dom:renderTag",f,n,d);C.head&&n.head.appendChild(C.head),C.bodyOpen&&n.body.insertBefore(C.bodyOpen,n.body.firstChild),C.bodyClose&&n.body.appendChild(C.bodyClose);for(const f in s.pendingSideEffects)s.pendingSideEffects[f]();e._dom=s,await e.hooks.callHook("dom:rendered",{renders:i}),a()}).finally(()=>{e._domUpdatePromise=void 0,e.dirty=!1})),e._domUpdatePromise}function Ea(e,t={}){const n=t.delayFn||(o=>setTimeout(o,10));return e._domDebouncedUpdatePromise=e._domDebouncedUpdatePromise||new Promise(o=>n(()=>La(e,t).then(()=>{delete e._domDebouncedUpdatePromise,o()})))}function Na(e){return t=>{var o,a;const n=((a=(o=t.resolvedOptions.document)==null?void 0:o.head.querySelector('script[id="unhead:payload"]'))==null?void 0:a.innerHTML)||!1;return n&&t.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":i=>{Ea(i,e)}}}}}function $e(e,t={},n){for(const o in e){const a=e[o],i=n?`${n}:${o}`:o;typeof a=="object"&&a!==null?$e(a,t,i):typeof a=="function"&&(t[i]=a)}return t}const Fa={run:e=>e()},Ra=()=>Fa,vt=typeof console.createTask<"u"?console.createTask:Ra;function ja(e,t){const n=t.shift(),o=vt(n);return e.reduce((a,i)=>a.then(()=>o.run(()=>i(...t))),Promise.resolve())}function Oa(e,t){const n=t.shift(),o=vt(n);return Promise.all(e.map(a=>o.run(()=>a(...t))))}function we(e,t){for(const n of[...e])n(t)}class Ua{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,o={}){if(!t||typeof n!="function")return()=>{};const a=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!o.allowDeprecated){let s=i.message;s||(s=`${a} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(s)||(console.warn(s),this._deprecatedMessages.add(s))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let o,a=(...i)=>(typeof o=="function"&&o(),o=void 0,a=void 0,n(...i));return o=this.hook(t,a),o}removeHook(t,n){if(this._hooks[t]){const o=this._hooks[t].indexOf(n);o!==-1&&this._hooks[t].splice(o,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const o=this._hooks[t]||[];delete this._hooks[t];for(const a of o)this.hook(t,a)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=$e(t),o=Object.keys(n).map(a=>this.hook(a,n[a]));return()=>{for(const a of o.splice(0,o.length))a()}}removeHooks(t){const n=$e(t);for(const o in n)this.removeHook(o,n[o])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(ja,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Oa,t,...n)}callHookWith(t,n,...o){const a=this._before||this._after?{name:n,args:o,context:{}}:void 0;this._before&&we(this._before,a);const i=t(n in this._hooks?[...this._hooks[n]]:[],o);return i instanceof Promise?i.finally(()=>{this._after&&a&&we(this._after,a)}):(this._after&&a&&we(this._after,a),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Ia(){return new Ua}const Ba=new Set(["templateParams","htmlAttrs","bodyAttrs"]),Wa={hooks:{"tag:normalise":({tag:e})=>{e.props.hid&&(e.key=e.props.hid,delete e.props.hid),e.props.vmid&&(e.key=e.props.vmid,delete e.props.vmid),e.props.key&&(e.key=e.props.key,delete e.props.key);const t=ht(e);t&&!t.startsWith("meta:og:")&&!t.startsWith("meta:twitter:")&&delete e.key;const n=t||(e.key?`${e.tag}:${e.key}`:!1);n&&(e._d=n)},"tags:resolve":e=>{const t=Object.create(null);for(const o of e.tags){const a=(o.key?`${o.tag}:${o.key}`:o._d)||De(o),i=t[a];if(i){let d=o==null?void 0:o.tagDuplicateStrategy;if(!d&&Ba.has(o.tag)&&(d="merge"),d==="merge"){const h=i.props;h.style&&o.props.style&&(h.style[h.style.length-1]!==";"&&(h.style+=";"),o.props.style=`${h.style} ${o.props.style}`),h.class&&o.props.class?o.props.class=`${h.class} ${o.props.class}`:h.class&&(o.props.class=h.class),t[a].props={...h,...o.props};continue}else if(o._e===i._e){i._duped=i._duped||[],o._d=`${i._d}:${i._duped.length+1}`,i._duped.push(o);continue}else if(ge(o)>ge(i))continue}if(!(o.innerHTML||o.textContent||Object.keys(o.props).length!==0)&&pe.has(o.tag)){delete t[a];continue}t[a]=o}const n=[];for(const o in t){const a=t[o],i=a._duped;n.push(a),i&&(delete a._duped,n.push(...i))}e.tags=n,e.tags=e.tags.filter(o=>!(o.tag==="meta"&&(o.props.name||o.props.property)&&!o.props.content))}}},za=new Set(["script","link","bodyAttrs"]),Ya=e=>({hooks:{"tags:resolve":t=>{for(const n of t.tags){if(!za.has(n.tag))continue;const o=n.props;for(const a in o){if(a[0]!=="o"||a[1]!=="n"||!Object.prototype.hasOwnProperty.call(o,a))continue;const i=o[a];typeof i=="function"&&(e.ssr&&Xe.has(a)?o[a]=`this.dataset.${a}fired = true`:delete o[a],n._eventHandlers=n._eventHandlers||{},n._eventHandlers[a]=i)}e.ssr&&n._eventHandlers&&(n.props.src||n.props.href)&&(n.key=n.key||me(n.props.src||n.props.href))}},"dom:renderTag":({$el:t,tag:n})=>{var a,i;const o=t==null?void 0:t.dataset;if(o)for(const s in o){if(!s.endsWith("fired"))continue;const d=s.slice(0,-5);Xe.has(d)&&((i=(a=n._eventHandlers)==null?void 0:a[d])==null||i.call(t,new Event(d.substring(2))))}}}}),Ka=new Set(["link","style","script","noscript"]),qa={hooks:{"tag:normalise":({tag:e})=>{e.key&&Ka.has(e.tag)&&(e.props["data-hid"]=e._h=me(e.key))}}},Ga={mode:"server",hooks:{"tags:beforeResolve":e=>{const t={};let n=!1;for(const o of e.tags)o._m!=="server"||o.tag!=="titleTemplate"&&o.tag!=="templateParams"&&o.tag!=="title"||(t[o.tag]=o.tag==="title"||o.tag==="titleTemplate"?o.textContent:o.props,n=!0);n&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},Ja={hooks:{"tags:resolve":e=>{var t;for(const n of e.tags)if(typeof n.tagPriority=="string")for(const{prefix:o,offset:a}of $a){if(!n.tagPriority.startsWith(o))continue;const i=n.tagPriority.substring(o.length),s=(t=e.tags.find(d=>d._d===i))==null?void 0:t._p;if(s!==void 0){n._p=s+a;break}}e.tags.sort((n,o)=>{const a=ge(n),i=ge(o);return a<i?-1:a>i?1:n._p-o._p})}}},Qa={meta:"content",link:"href",htmlAttrs:"lang"},Xa=["innerHTML","textContent"],Za=e=>({hooks:{"tags:resolve":t=>{var s;const{tags:n}=t;let o;for(let d=0;d<n.length;d+=1)n[d].tag==="templateParams"&&(o=t.tags.splice(d,1)[0].props,d-=1);const a=o||{},i=a.separator||"|";delete a.separator,a.pageTitle=ue(a.pageTitle||((s=n.find(d=>d.tag==="title"))==null?void 0:s.textContent)||"",a,i);for(const d of n){if(d.processTemplateParams===!1)continue;const h=Qa[d.tag];if(h&&typeof d.props[h]=="string")d.props[h]=ue(d.props[h],a,i);else if(d.processTemplateParams||d.tag==="titleTemplate"||d.tag==="title")for(const v of Xa)typeof d[v]=="string"&&(d[v]=ue(d[v],a,i))}e._templateParams=a,e._separator=i},"tags:afterResolve":({tags:t})=>{let n;for(let o=0;o<t.length;o+=1){const a=t[o];a.tag==="title"&&a.processTemplateParams!==!1&&(n=a)}n!=null&&n.textContent&&(n.textContent=ue(n.textContent,e._templateParams,e._separator))}}}),ei={hooks:{"tags:resolve":e=>{const{tags:t}=e;let n,o;for(let a=0;a<t.length;a+=1){const i=t[a];i.tag==="title"?n=i:i.tag==="titleTemplate"&&(o=i)}if(o&&n){const a=tt(o.textContent,n.textContent);a!==null?n.textContent=a||n.textContent:e.tags.splice(e.tags.indexOf(n),1)}else if(o){const a=tt(o.textContent);a!==null&&(o.textContent=a,o.tag="title",o=void 0)}o&&e.tags.splice(e.tags.indexOf(o),1)}}},ti={hooks:{"tags:afterResolve":e=>{for(const t of e.tags)typeof t.innerHTML=="string"&&(t.innerHTML&&(t.props.type==="application/ld+json"||t.props.type==="application/json")?t.innerHTML=t.innerHTML.replace(/</g,"\\u003C"):t.innerHTML=t.innerHTML.replace(new RegExp(`</${t.tag}`,"g"),`<\\/${t.tag}`))}}};let bt;function oi(e={}){const t=ni(e);return t.use(Na()),bt=t}function ot(e,t){return!e||e==="server"&&t||e==="client"&&!t}function ni(e={}){const t=Ia();t.addHooks(e.hooks||{}),e.document=e.document||(Aa?document:void 0);const n=!e.document,o=()=>{d.dirty=!0,t.callHook("entries:updated",d)};let a=0,i=[];const s=[],d={plugins:s,dirty:!1,resolvedOptions:e,hooks:t,headEntries(){return i},use(h){const v=typeof h=="function"?h(d):h;(!v.key||!s.some(C=>C.key===v.key))&&(s.push(v),ot(v.mode,n)&&t.addHooks(v.hooks||{}))},push(h,v){v==null||delete v.head;const C={_i:a++,input:h,...v};return ot(C.mode,n)&&(i.push(C),o()),{dispose(){i=i.filter(D=>D._i!==C._i),o()},patch(D){for(const f of i)f._i===C._i&&(f.input=C.input=D);o()}}},async resolveTags(){const h={tags:[],entries:[...i]};await t.callHook("entries:resolve",h);for(const v of h.entries){const C=v.resolvedInput||v.input;if(v.resolvedInput=await(v.transform?v.transform(C):C),v.resolvedInput)for(const D of await Ta(v)){const f={tag:D,entry:v,resolvedOptions:d.resolvedOptions};await t.callHook("tag:normalise",f),h.tags.push(f.tag)}}return await t.callHook("tags:beforeResolve",h),await t.callHook("tags:resolve",h),await t.callHook("tags:afterResolve",h),h.tags},ssr:n};return[Wa,Ga,Ya,qa,Ja,Za,ei,ti,...(e==null?void 0:e.plugins)||[]].forEach(h=>d.use(h)),d.hooks.callHook("init",d),d}function si(){return bt}const ai=$o[0]==="3";function ii(e){return typeof e=="function"?e():r(e)}function Se(e){if(e instanceof Promise||e instanceof Date||e instanceof RegExp)return e;const t=ii(e);if(!e||!t)return t;if(Array.isArray(t))return t.map(n=>Se(n));if(typeof t=="object"){const n={};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(o==="titleTemplate"||o[0]==="o"&&o[1]==="n"){n[o]=r(t[o]);continue}n[o]=Se(t[o])}return n}return t}const li={hooks:{"entries:resolve":e=>{for(const t of e.entries)t.resolvedInput=Se(t.input)}}},yt="usehead";function ri(e){return{install(n){ai&&(n.config.globalProperties.$unhead=e,n.config.globalProperties.$head=e,n.provide(yt,e))}}.install}function di(e={}){e.domDelayFn=e.domDelayFn||(n=>xe(()=>setTimeout(()=>n(),0)));const t=oi(e);return t.use(li),t.install=ri(t),t}const nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},st="__unhead_injection_handler__";function mi(){if(st in nt)return nt[st]();const e=So(yt);return e||si()}const Ee=Ho(wa),ci=di();jo(Ee);const ui=Mo();ui.initialize("AIzaSyC1nASQFlMZvAc93aRuW4r2OVRGJkT6zhQ");const pi=le();pi.init();Ee.use(ci);Ee.mount("#app");export{Fs as F,mi as i,Se as r,Ve as u};
//# sourceMappingURL=index-72b3bdb7.js.map