1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="8e136bc1-8613-5fa9-8a2d-fe64924e9520")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,781251,e=>{"use strict";var t=e.i(269186);e.s(["BootSplash",0,()=>(0,t.jsxs)("div",{className:"fixed inset-0 bg-[#F4F8FA] flex flex-col items-center justify-center gap-6",role:"status","aria-label":"Chargement de Markus",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Markus Santé",className:"h-[40px] w-auto"}),(0,t.jsx)("div",{className:"w-10 h-10 rounded-full border-4 border-ds-sb200 border-t-ds-sb400 animate-spin"})]}),"RouteLoading",0,()=>(0,t.jsx)("div",{className:"w-full h-full min-h-[60vh] flex items-center justify-center bg-ds-background-base",role:"status","aria-label":"Chargement de la page",children:(0,t.jsx)("div",{className:"w-9 h-9 rounded-full border-4 border-ds-sb200 border-t-ds-sb400 animate-spin"})})])},51158,e=>{"use strict";var t=e.i(306005),s=e.i(269186),i=e.i(138718),n=e.i(896884),r=function(e,t){if(!(this instanceof r))return new r(e,t);this.url=e,t=t||{},this.headers=t.headers||{},this.payload=void 0!==t.payload?t.payload:"",this.method=t.method||this.payload&&"POST"||"GET",this.withCredentials=!!t.withCredentials,this.debug=!!t.debug,this.autoReconnect=void 0!==t.autoReconnect&&t.autoReconnect,this.reconnectDelay=void 0!==t.reconnectDelay?t.reconnectDelay:3e3,this.maxRetries=void 0!==t.maxRetries?t.maxRetries:null,this.retryCount=0,this.reconnectTimer=null,this.useLastEventId=void 0===t.useLastEventId||t.useLastEventId,this.FIELD_SEPARATOR=":",this.listeners={},this.xhr=null,this.readyState=r.INITIALIZING,this.progress=0,this.chunk="",this.lastEventId="",this.addEventListener=function(e,t){void 0===this.listeners[e]&&(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)},this.removeEventListener=function(e,t){if(void 0===this.listeners[e])return;let s=[];this.listeners[e].forEach(function(e){e!==t&&s.push(e)}),0===s.length?delete this.listeners[e]:this.listeners[e]=s},this.dispatchEvent=function(e){if(!e)return!0;this.debug&&console.debug(e),e.source=this;let t="on"+e.type;return(!this.hasOwnProperty(t)||(this[t].call(this,e),!e.defaultPrevented))&&(!this.listeners[e.type]||this.listeners[e.type].every(function(t){return t(e),!e.defaultPrevented}))},this._markClosed=function(){if(this.xhr=null,this.progress=0,this.chunk="",this._setReadyState(r.CLOSED),this.autoReconnect){if(null!==this.maxRetries&&this.retryCount>=this.maxRetries){this.debug&&console.debug(`SSE max retries (${this.maxRetries}) reached, stopping reconnection attempts`),this.autoReconnect=!1,this.close();return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.debug&&console.debug(`SSE will attempt to reconnect in ${this.reconnectDelay}ms (attempt ${this.retryCount+1}${this.maxRetries?"/"+this.maxRetries:""})`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.retryCount++,this.stream()},this.reconnectDelay)}},this._setReadyState=function(e){let t=new CustomEvent("readystatechange");t.readyState=e,this.readyState=e,this.dispatchEvent(t)},this._onStreamFailure=function(e){let t=new CustomEvent("error");t.responseCode=e.currentTarget.status,t.data=e.currentTarget.response,this.dispatchEvent(t),this._markClosed()},this._onStreamAbort=function(){this.dispatchEvent(new CustomEvent("abort")),this._markClosed()},this._onStreamProgress=function(e){if(!this.xhr)return;if(this.xhr.status<200||this.xhr.status>=300)return void this._onStreamFailure(e);this.retryCount=0;let t=this.xhr.responseText.substring(this.progress);this.progress+=t.length;let s=(this.chunk+t).split(/(\r\n\r\n|\r\r|\n\n)/g),i=s.pop();s.forEach((function(e){e.trim().length>0&&this.dispatchEvent(this._parseEventChunk(e))}).bind(this)),this.chunk=i},this._onStreamLoaded=function(e){this._onStreamProgress(e),this.dispatchEvent(this._parseEventChunk(this.chunk)),this.chunk="",this._markClosed()},this._parseEventChunk=function(e){if(!e||0===e.length)return null;this.debug&&console.debug(e);let t={id:null,retry:null,data:null,event:null};
1if(e.split(/\n|\r\n|\r/).forEach((function(e){let s,i,n=e.indexOf(this.FIELD_SEPARATOR);if(n>0){let t=" "===e[n+1]?2:1;s=e.substring(0,n),i=e.substring(n+t)}else{if(!(n<0))return;s=e,i=""}s in t&&("data"===s&&null!==t[s]?t.data+="\n"+i:t[s]=i)}).bind(this)),null===t.data)return null;null!==t.id&&(this.lastEventId=t.id);let s=new CustomEvent(t.event||"message");return s.id=t.id,s.data=t.data||"",s.lastEventId=this.lastEventId,s},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){let e={};for(let t of this.xhr.getAllResponseHeaders().trim().split("\r\n")){let[s,...i]=t.split(":"),n=i.join(":").trim();e[s.trim().toLowerCase()]=e[s.trim().toLowerCase()]||[],e[s.trim().toLowerCase()].push(n)}let t=new CustomEvent("open");t.responseCode=this.xhr.status,t.headers=e,this.dispatchEvent(t),this._setReadyState(r.OPEN)}},this.stream=function(){if(!this.xhr){for(let e in this._setReadyState(r.CONNECTING),this.xhr=new XMLHttpRequest,this.xhr.addEventListener("progress",this._onStreamProgress.bind(this)),this.xhr.addEventListener("load",this._onStreamLoaded.bind(this)),this.xhr.addEventListener("readystatechange",this._onReadyStateChange.bind(this)),this.xhr.addEventListener("error",this._onStreamFailure.bind(this)),this.xhr.addEventListener("abort",this._onStreamAbort.bind(this)),this.xhr.open(this.method,this.url),this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.useLastEventId&&this.lastEventId.length>0&&this.xhr.setRequestHeader("Last-Event-ID",this.lastEventId),this.xhr.withCredentials=this.withCredentials,this.xhr.send(this.payload)}},this.close=function(){this.readyState!==r.CLOSED&&(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.autoReconnect=!1,this.xhr.abort())},(void 0===t.start||t.start)&&this.stream()};r.INITIALIZING=-1,r.CONNECTING=0,r.OPEN=1,r.CLOSED=2,e.i(809787);var a=e.i(389052),o=e.i(103528),h=e.i(822685),d=e.i(732571),l=e.i(795509),u=e.i(531030);e.i(708547);var c=e.i(558330),m=e.i(42095),p=e.i(132881),f=e.i(403358),v=e.i(412454),x=e.i(719285);e.i(792122);var g=e.i(748967),E=e.i(761880),b=e.i(933365),y=e.i(709168),C=e.i(781251),R=e.i(213575);let L=e=>(0,s.jsxs)("div",{className:"fixed inset-0 bg-[#F4F8FA] flex flex-col items-center justify-center gap-6 px-6 text-center",role:"alert","data-testid":"boot-unreachable",children:[(0,s.jsx)("img",{src:"/logo.png",alt:"Markus Santé",className:"h-[40px] w-auto"}),(0,s.jsx)("span",{"aria-hidden":!0,children:(0,s.jsx)(g.Icons.WifiOff,{size:28})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 max-w-[420px]",children:[(0,s.jsx)("p",{className:"text-ds-text-base font-medium",children:"Connexion au serveur impossible"}),(0,s.jsx)("p",{className:"text-ds-text-secondary text-sm",children:"Vérifiez votre connexion internet. Vous êtes toujours connecté à votre compte : Markus reprendra dès que le serveur répondra."})]}),(0,s.jsx)(R.Button,{title:"Réessayer",variant:"primary",onClick:e.onRetry,inProgress:e.retrying,disabled:e.retrying,testID:"boot-unreachable-retry",a11yLabel:"Réessayer de se connecter au serveur"})]}),S=e=>{let t=(0,n.useRouter)(),r=(0,n.usePathname)();d.ViewModels.useObservabilityIdentity("web");let a=d.ViewModels.useAppVm({fullChatsRefresh:r===c.Routes.Chats,onUnauthorized:()=>{let e=window.location.pathname;if(["/auth/success","/signup","/login","/verify-email","/f/"].some(t=>e.startsWith(t)))return!1;(0,u.logAuth)("unauthorized_redirect",{path:e}),t.push(c.Routes.Login)}});return((0,i.useEffect)(()=>{a.handleLoad()},[]),a.loaded)?e.children:a.bootUnreachable?(0,s.jsx)(L,{onRetry:()=>void a.handleRetryLoad(),retrying:a.bootRetrying}):(0,s.jsx)(C.BootSplash,{})};function w(e){return!!e&&e.startsWith("/f/")}let _=()=>{let e=(0,n.usePathname)();return(0,i.useEffect)(()=>{w(window.location.pathname)||(m.Tracking.mixpanelInit(),(0,v.initPostHogWeb)())},[]),(0,i.useEffect)(()=>{!(!e||w(e))&&(m.Tracking.trackRouteChanged(),e&&(0,v.capturePageviewWeb)(e))},[e]),null},T=()=>{let e=(0,n.useSearchParams)(),t=e?.toString();return(0,i.useEffect)(()=>{if((0,l.captureAttribution)(),!e)return;let t=e.get("ref")?.trim()||(0,l.attributionRefCode)();
1t&&""!==t.trim()&&x.storage.set(d.ViewModels.PENDING_REFERRAL_KEY,{code:t.trim().toUpperCase(),capturedAt:Date.now()});let s=["promo","promo_code","code_promo"].map(t=>e.get(t)).find(e=>!!e&&""!==e.trim()),i=s?.trim()||(0,l.attributionPromoCode)();i&&x.storage.set(d.ViewModels.PENDING_PROMO_KEY,{code:i.trim(),capturedAt:Date.now()})},[t,e]),null},I=()=>{let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=()=>t(!0),s=()=>t(!1);return navigator.onLine||t(!0),window.addEventListener("offline",e),window.addEventListener("online",s),()=>{window.removeEventListener("offline",e),window.removeEventListener("online",s)}},[]),(0,s.jsx)(b.Toast,{open:e,onOpenChange:t,variant:"error",icon:(0,s.jsx)(g.Icons.WifiOff,{size:18}),title:"Pas de connexion internet",description:"Vérifiez votre connexion réseau. Vos données seront synchronisées automatiquement."})};e.s(["LayoutClient",0,e=>((0,i.useEffect)(()=>{},[]),(0,i.useEffect)(()=>{let e=e=>{e.preventDefault()};return document.body.addEventListener("drop",e),document.body.addEventListener("dragover",e),()=>{document.body.removeEventListener("drop",e),document.body.removeEventListener("dragover",e)}},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_,{}),(0,s.jsx)(i.Suspense,{fallback:null,children:(0,s.jsx)(T,{})}),(0,s.jsx)(o.AppContextProvider,{stage:"prod",deviceType:"web",siteUrl:t.default.env.NEXT_PUBLIC_SITE_URL,actionsUrl:t.default.env.NEXT_PUBLIC_ACTIONS_URL,transcriptionGuide:!0,askMarkus:!0,children:(0,s.jsx)(a.Api.Provider,{url:"/api",readToken:async()=>p.LocalStorage.getToken(),writeToken:async e=>p.LocalStorage.setToken(e),readSession:async()=>p.LocalStorage.getSession(),writeSession:async e=>p.LocalStorage.setSession(e),getClientInfo:f.getWebClientInfo,defaultHeaders:{...a.Api.clientHeader("mkp_pub_web"),"X-App-Platform":"web"},createEventSource:(e,t)=>new r(e,{method:t?.method,payload:t?.body,autoReconnect:!t?.disableReconnections,headers:{"Content-Type":"application/json",...t?.headers||{}}}),children:(0,s.jsx)(E.PermissionsProvider,{children:(0,s.jsx)(h.MakeHooksProvider,{subscribeNewsletterUrl:"https://kzzeqlthbyjxppnmmecn.supabase.co/functions/v1/marketing-optin",onboardingCompleteUrl:t.default.env.NEXT_PUBLIC_MAKE_HOOK_ONBOARDING_COMPLETE??"",isProd:!0,children:(0,s.jsxs)(b.ToastProvider,{children:[(0,s.jsx)(y.TranscriptionProvider,{children:(0,s.jsx)(S,{children:e.children})}),(0,s.jsx)(I,{}),(0,s.jsx)(b.ToastViewport,{})]})})})})})]}))],51158)},698136,e=>{e.v(t=>Promise.all(["static/chunks/554d789de9b1a20b.js"].map(t=>e.l(t))).then(()=>t(994890)))}]); 2 3//# sourceMappingURL=06d8874d7f170583.js.map 4//# chunkId=8e136bc1-8613-5fa9-8a2d-fe64924e9520
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.