1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4b3e76c7-7c45-485a-a82c-a3ab3046427d",e._sentryDebugIdIdentifier="sentry-dbid-4b3e76c7-7c45-485a-a82c-a3ab3046427d")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[680],{20680:function(e,t,n){n.d(t,{w:function(){return C},default:function(){return L},I:function(){return j}});var a=n(57437),r=n(2265),o=n(99376),i=n(30166),s=n(55591),c=n(99464);function l(e){return(null==e?void 0:e.trim())||void 0}function d(){var e;let t=l("phc_oWcQq3V6nq1utPn7LU4VcKrmqPPI9q2nqe3WmEBjnTZ"),n=l("https://plausible.akaasten.work"),a=void 0,r=l(""),o=l("");return{plausible:{id:"plausible",category:"product-analytics",consent:"analytics",enabled:!!c.Z.domainName&&!!n,loadStrategy:"after-interactive",purpose:"Self-hosted aggregated product analytics.",domain:c.Z.domainName,customDomain:n},posthog:{id:"posthog",category:"product-analytics",consent:"analytics",enabled:!!t,loadStrategy:"after-interactive",purpose:"Product analytics and client-side exception capture.",key:t,apiHost:"/ingest",uiHost:"https://eu.posthog.com"},googleTagManager:{id:"google-tag-manager",category:"tag-manager",consent:"marketing",enabled:!!r,loadStrategy:"after-interactive",purpose:"Marketing tag manager, mounted after the initial render to preserve campaign attribution.",gtmId:r},hotjar:{id:"hotjar",category:"technical-analytics",consent:"analytics",enabled:!!a,loadStrategy:"idle",purpose:"UX session analytics, deferred until the browser is idle.",siteId:a,version:6},crisp:{id:"crisp",category:"support-chat",consent:"support",enabled:!!o,loadStrategy:"interaction",purpose:"Customer support chat, loaded only on support-eligible routes.",websiteId:o,onlyShowOnRoutes:null!==(e=c.Z.crisp.onlyShowOnRoutes)&&void 0!==e?e:[]}}}function u(e,t){return 0===t.length||t.some(t=>e===t||e.startsWith("".concat(t,"/")))}var p=n(19748);let g=(0,i.default)(()=>n.e(3786).then(n.t.bind(n,13786,23)).then(e=>e.GoogleTagManager),{loadableGenerated:{webpack:()=>[13786]},ssr:!1}),h=(0,i.default)(()=>n.e(6723).then(n.bind(n,96723)),{loadableGenerated:{webpack:()=>[96723]},ssr:!1}),f="casanea:crisp-opened";function w(e,t,n){(0,p.q)(e,{route:"client-third-party-scripts",feature:"third-party-scripts",operation:t,tags:{tool:n}})}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=window;if(n.requestIdleCallback&&n.cancelIdleCallback){let a=n.requestIdleCallback(e,{timeout:t});return()=>{var e;return null===(e=n.cancelIdleCallback)||void 0===e?void 0:e.call(n,a)}}let a=globalThis.setTimeout(e,t);return()=>globalThis.clearTimeout(a)}function v(e){var t;let n;if("1"===navigator.doNotTrack&&"support"!==e)return!1;let a="casanea_".concat(e,"_consent");try{n=window.localStorage.getItem(a)}catch(e){console.error("[ThirdPartyScripts] Failed to read consent storage:",e)}return null!=n||(n=null===(t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith("".concat(a,"="))))||void 0===t?void 0:t.split("=")[1]),"denied"!==n&&("granted"===n||"anal
1ytics"===e)}function b(){return{analytics:v("analytics"),marketing:v("marketing"),support:v("support"),performance:v("performance")}}function y(e){return e.startsWith("casanea_")&&e.endsWith("_consent")}function E(){window.dispatchEvent(new CustomEvent("casanea:consentchange"))}function S(){window.dispatchEvent(new CustomEvent("casanea:locationchange"))}function _(e){return"".concat(window.location.pathname).concat(window.location.search)}function I(e,t){return"idle"===e?t.idleReady:"interaction"!==e||t.interactionReady}function T(e){document.querySelectorAll(e).forEach(e=>e.remove())}function k(){var e;let t=window;null===(e=document.getElementById("hotjar-init-script"))||void 0===e||e.remove(),T('script[src*="static.hotjar.com"]'),delete t.hj,delete t._hjSettings}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d();return!!(n.crisp.enabled&&n.crisp.websiteId&&v(n.crisp.consent))&&(!1===t.respectRouteAllowlist||u(e,n.crisp.onlyShowOnRoutes))}async function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=d();if(!C(e,t))return!1;let r=a.crisp.websiteId;if(!r)return!1;try{let{Crisp:t}=await n.e(3146).then(n.bind(n,3146));return t.configure(r),u(e,a.crisp.onlyShowOnRoutes)||(t.chat.offChatClosed(),t.chat.onChatClosed(()=>{t.chat.hide()})),t.chat.show(),t.chat.open(),window.dispatchEvent(new CustomEvent(f,{detail:{pathname:e}})),!0}catch(e){return console.error("[ThirdPartyScripts] Failed to open Crisp support chat:",e),!1}}function L(e){let{serverRendered:t}=e,i=(0,o.usePathname)(),c=function(e){let[t,n]=(0,r.useState)(()=>_(e));return(0,r.useEffect)(()=>{let t=()=>{n(_(e))},a=window.history.pushState,r=window.history.replaceState,o=function(e,t,n){let r=a.call(window.history,e,t,n);return S(),r},i=function(e,t,n){let a=r.call(window.history,e,t,n);return S(),a};return window.history.pushState=o,window.history.replaceState=i,t(),window.addEventListener("popstate",t),window.addEventListener("casanea:locationchange",t),()=>{window.history.pushState===o&&(window.history.pushState=a),window.history.replaceState===i&&(window.history.replaceState=r),window.removeEventListener("popstate",t),window.removeEventListener("casanea:locationchange",t)}},[e]),t}(i),l=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>m(()=>t(!0)),[]),e}(),p=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(e)return;let n=()=>t(!0),a=m(n,6e3),r={once:!0,passive:!0};return window.addEventListener("pointerdown",n,r),window.addEventListener("keydown",n,{once:!0}),window.addEventListener("scroll",n,r),()=>{a(),window.removeEventListener("pointerdown",n),window.removeEventListener("keydown",n),window.removeEventListener("scroll",n)}},[e]),e}(),v=(0,r.useMemo)(()=>d(),[]),C=function(){let[e,t]=(0,r.useState)(()=>b());return(0,r.useEffect)(()=>{let e=function(){let e,t,n,a;try{t=(e=window.localStorage).setItem.bind(e),n=e.removeItem.bind(e),a=e.clear.bind(e)}catch(e){return console.error("[ThirdPartyScripts] Failed to install consent storage watcher:",e),()=>{}}let r=function(e,n){t(e,n),y(e)&&E()},o=function(e){n(e),y(e)&&E()},i=function(){a(),E()};try{e.setItem=r,e.removeItem=o,e.clear=i}catch(e){return console.error("[ThirdPartyScripts] Failed to patch consent storage watcher:",e),()=>{}}return()=>{e.setItem===r&&(e.setItem=t),e.removeItem===o&&(e.removeItem=n),e.clear===i&&(e.clear=a)}}(),n=()=>{let e=b();t(t=>t.analytics===e.analytics&&t.marketing===e.marketing&&t.support===e.support&&t.performance===e.performance?t:e)};return n(),window.addEventListener("storage",n),window.addEventListener("focus",n),window.addEventListener("casanea:consentchange",n),window.addEventListener("casanea:consent-changed",n),()=>{e(),window.removeEventListener("storage",n),window.removeEventListener("focus",n),window.removeEventListener("casanea:consentchange",n),window.removeEventListener("casanea:consent-changed",n)}},[]),e}(),j={idleReady:l,interactionReady:p},L=v.plausible.enabled&&I(v.plausible.loadStrategy,j)&&C[v.plausible.consent],P=v.posthog.enabled&&I(v.posthog.loadStrategy,j)&&C[v.posthog.consent],M=v.hotjar.enabled&&I(v.hotjar.loadStrategy,j)&&C[v.hotjar.consent],q=v.googleTagManager.enabled&&I(v.googleTagManager.loadStrategy,j)&&C[v.googleTagManager.consent],F=v.crisp.enabled&&I(v.crisp.loadStrategy,j)&&C[v.crisp.consent]&&u(i,v.crisp.onlyShowOnRoutes),[R,B]=(0,r.useState)(!1),[x,H]=(0,r.useState)(),[N,O]=(0,r.useState)(()=>({...t,plausible:t.plausible&&function(){if("undefined"==typeof document)return!1;let e=document.getElementById("casanea-plausible-script");return(null==e?void 0:e.getAttribute("data-casanea-bootstrap-status"))!=="failed"&&!!e}(),googleTagManager:t.googleTagManager&&function(e){if("undefined"==typeof document)return!1;let t=document.getElementById(e);return(null==t?void 0:t.getAttribute("data-casanea-bootstrap-status"))!=="failed"&&!!t}("casanea-gtm-script")})),W=(0,r.useRef)(c),D=(0,r.useRef)(c),z=(0,r.useRef)(!1),Z=(0,r.useRef)(!1),A=x===i&&v.crisp.enabled&&C[v.crisp.consent];return(0,r.useEffect)(()=>{L||(function(){var e,t;let n=window;null===(e=document.getElementById("next-plausible-init"))||void 0===e||e.remove(),null===(t=document.getElementById("casanea-plausible-script"))||void 0===t||t.remove(),T('script[data-domain][src*="plausible"], script[data-api][data-domain]'),delete n.plausible}(),O(e=>({...e,plausible:!1})))},[L]),(0,r.useEffect)(()=>
1{if(!L||!N.plausible)return;let e=document.getElementById("casanea-plausible-script");if(!e){O(e=>({...e,plausible:!1}));return}let t=()=>{O(e=>({...e,plausible:!1}))};return e.addEventListener("error",t),()=>{e.removeEventListener("error",t)}},[N.plausible,L]),(0,r.useEffect)(()=>{var e;if(!L||!N.plausible){W.current=c;return}if(W.current===c)return;W.current=c;let t=window;null===(e=t.plausible)||void 0===e||e.call(t,"pageview")},[N.plausible,L,c]),(0,r.useEffect)(()=>{q||(function(){var e,t,n;let a=window;null===(e=document.getElementById("_next-gtm"))||void 0===e||e.remove(),null===(t=document.getElementById("_next-gtm-init"))||void 0===t||t.remove(),null===(n=document.getElementById("casanea-gtm-script"))||void 0===n||n.remove(),T('script[src*="googletagmanager.com/gtm.js"]'),delete a.dataLayer,delete a.google_tag_manager}(),O(e=>({...e,googleTagManager:!1})))},[q]),(0,r.useEffect)(()=>{if(!q||!N.googleTagManager)return;let e=document.getElementById("casanea-gtm-script");if(!e){O(e=>({...e,googleTagManager:!1}));return}let t=()=>{O(e=>({...e,googleTagManager:!1}))};return e.addEventListener("error",t),()=>{e.removeEventListener("error",t)}},[N.googleTagManager,q]),(0,r.useEffect)(()=>{if(!v.posthog.enabled||!v.posthog.key||!P&&!z.current)return;let e=!1;return n.e(5878).then(n.bind(n,46214)).then(t=>{let{default:n}=t;if(!e){if(!P){(0,s.T8)(void 0),Z.current=!0,n.opt_out_capturing();return}if(z.current){(0,s.T8)(n),n.opt_in_capturing(),Z.current&&(n.capture("$pageview"),D.current="".concat(window.location.pathname).concat(window.location.search),Z.current=!1);return}n.init(v.posthog.key,{api_host:v.posthog.apiHost,ui_host:v.posthog.uiHost,defaults:"2025-05-24",capture_pageview:!1,capture_exceptions:!0,debug:!1}),(0,s.T8)(n),n.opt_in_capturing(),n.capture("$pageview"),D.current="".concat(window.location.pathname).concat(window.location.search),Z.current=!1,z.current=!0}}).catch(e=>{console.error("[ThirdPartyScripts] Failed to initialize PostHog:",e),w(e,"initialize-posthog","posthog")}
1),()=>{e=!0,P&&n.e(5878).then(n.bind(n,46214)).then(e=>{let{default:t}=e;(0,s.T8)(void 0),t.opt_out_capturing()}).catch(e=>{console.error("[ThirdPartyScripts] Failed to opt out PostHog:",e),w(e,"opt-out-posthog","posthog")})}},[P,v.posthog.apiHost,v.posthog.enabled,v.posthog.key,v.posthog.uiHost]),(0,r.useEffect)(()=>{if(!P||!z.current){D.current=c;return}D.current!==c&&(D.current=c,n.e(5878).then(n.bind(n,46214)).then(e=>{let{default:t}=e;t.capture("$pageview")}).catch(e=>{console.error("[ThirdPartyScripts] Failed to capture PostHog pageview:",e),w(e,"capture-posthog-pageview","posthog")}))},[P,c]),(0,r.useEffect)(()=>{if(v.hotjar.enabled&&v.hotjar.siteId){if(!M){k();return}return n.e(1136).then(n.bind(n,31136)).then(e=>{let{default:t}=e;t.init(v.hotjar.siteId,v.hotjar.version)}).catch(e=>{console.error("[ThirdPartyScripts] Failed to initialize Hotjar:",e),w(e,"initialize-hotjar","hotjar")}),()=>{k()}}},[M,v.hotjar.enabled,v.hotjar.siteId,v.hotjar.version]),(0,r.useEffect)(()=>{let e=e=>{let t=e.detail;B(!0),H(null==t?void 0:t.pathname)};return window.addEventListener(f,e),()=>{window.removeEventListener(f,e)}},[]),(0,r.useEffect)(()=>{if(v.crisp.enabled&&v.crisp.websiteId){if(!F&&R&&!A){let e=!1;return n.e(3146).then(n.bind(n,3146)).then(t=>{let{Crisp:n}=t;e||(n.chat.offChatClosed(),n.chat.hide(),n.chat.onChatClosed(()=>{n.chat.hide()}),H(void 0))}).catch(e=>{console.error("[ThirdPartyScripts] Failed to hide Crisp chat:",e),w(e,"hide-crisp-chat","crisp")}),()=>{e=!0,n.e(3146).then(n.bind(n,3146)).then(e=>{let{Crisp:t}=e;t.chat.offChatClosed()}).catch(e=>{console.error("[ThirdPartyScripts] Failed to reset Crisp chat handlers:",e),w(e,"reset-crisp-chat-handlers","crisp")})}}if(F)return n.e(3146).then(n.bind(n,3146)).then(e=>{let{Crisp:t}=e;t.configure(v.crisp.websiteId),t.chat.offChatClosed(),t.chat.show(),B(!0)}).catch(e=>{console.error("[ThirdPartyScripts] Failed to initialize Crisp:",e),w(e,"initialize-crisp","crisp")}),()=>{n.e(3146).then(n.bind(n,3146)).then(e=>{let{Crisp:t}=e;t.chat.offChatClosed()}).catch(e=>{console.error("[ThirdPartyScripts] Failed to reset Crisp chat handlers:",e),w(e,"reset-crisp-chat-handlers","crisp")})}}},[A,F,R,v.crisp.enabled,v.crisp.websiteId]),(0,a.jsxs)(a.Fragment,{children:[L&&!N.plausible?(0,a.jsx)(h,{domain:v.plausible.domain,customDomain:v.plausible.customDomain,selfHosted:!0,scriptProps:{id:"casanea-plausible-script"}}):null,q&&!N.googleTagManager&&v.googleTagManager.gtmId?(0,a.jsx)(g,{gtmId:v.googleTagManager.gtmId}):null]})}},99464:function(e,t){t.Z={appName:"Casanea",appDescription:"L'application qui regroupe toutes les annonces immobili\xe8res de tous les sites.",domainName:"casanea.fr",supportEmail:"[email protected]",crisp:{id:"",onlyShowOnRoutes:["/offres-agences","/annonces"]},colors:{theme:"light",main:"#10CCAE"},auth:{loginUrl:"/",callbackUrl:"/"}}},55591:function(e,t,n){let a;n.d(t,{T8:function(){return s},v3:function(){return c}});let r=new Set(["web_search_submitted","web_offer_card_clicked","web_map_marker_selected","web_poi_search_submitted","web_lead_submitted","web_saved_search_created","web_error_boundary_seen"]),o=new Set,i=/(address|adresse|email|mail|name|nom|phone|prenom|prénom|raw|token|url|webhook)/i;function s(e){a=e}function c(e){var t,n,s;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[];for(let[n,a]of Object.entries(e))if(!i.test(n)&&void 0!==a){if("string"==typeof a){let e=a.trim();t.push([n,e.length>80?"".concat(e.slice(0,77),"..."):e]);continue}
1if("number"==typeof a){Number.isFinite(a)&&t.push([n,a]);continue}("boolean"==typeof a||null===a)&&t.push([n,a])}return Object.fromEntries(t)}(c);if(!r.has(e))return{captured:!1,reason:"invalid-event",eventName:e,properties:d};if(!(null!==(t=l.consentGranted)&&void 0!==t?t:function(){let e;if("1"===navigator.doNotTrack)return!1;let t="casanea_analytics_consent";try{e=window.localStorage.getItem(t)}catch(t){e=void 0}return null!=e||(e=function(e){var t;if("undefined"!=typeof document)return null===(t=document.cookie.split(";").map(e=>e.trim()).find(t=>t.startsWith("".concat(e,"="))))||void 0===t?void 0:t.split("=")[1]}(t)),"denied"!==e}()))return{captured:!1,reason:"missing-consent",eventName:e,properties:d};if(!(null!==(n=l.posthogKey)&&void 0!==n?n:"phc_oWcQq3V6nq1utPn7LU4VcKrmqPPI9q2nqe3WmEBjnTZ"))return{captured:!1,reason:"missing-key",eventName:e,properties:d};let u=null!==(s=l.client)&&void 0!==s?s:function(){if(a)return a;let e=window.posthog;return"function"==typeof(null==e?void 0:e.capture)?e:void 0}();if(!u)return{captured:!1,reason:"missing-client",eventName:e,properties:d};if(l.onceKey){let t="".concat(e,":").concat(l.onceKey);if(o.has(t))return{captured:!1,reason:"duplicate",eventName:e,properties:d};o.add(t)}return u.capture(e,d),{captured:!0,eventName:e,properties:d}}},19748:function(e,t,n){n.d(t,{q:function(){return s}});var a=n(26250),r=n(22048),o=n(53307);function i(e,t,n){null!=n&&e.setTag(t,String(n))}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,o.Et)())return a.$e(n=>{for(let[e,a]of(n.setTag("surface","website"),i(n,"route",t.route),i(n,"feature",t.feature),i(n,"operation",t.operation),Object.entries(t.tags||{})))i(n,e,a);return t.extra&&n.setContext("casanea",(0,o.X9)(t.extra)),r.Tb(e)})}}}]);
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.