PageSourceSearch

https://buddiz.app/assets/mountDevenirSpotRoute-C9PLhxqJ.js

js buddiz.app collected 2026-10-02 00:44:09 UTC 32,620 bytes, 1 lines download raw bytes

1import{c as I,u as J,b as E,j as s,l as te,n as ue,t as xe,I as oe,H as je,J as ye,B as Ne}from"./index-BxmgPWYo.js";import{d as ke,f as we,c as Ce,g as Pe,D as he,e as Te,h as Ee,m as Oe}from"./OfferPage-DPw5cZUy.js";import{S as ge,a as ie,f as $e,s as Fe,p as me,b as _e,c as Ae,d as qe,e as ze}from"./spotQuoteRepo-a_DJD1dm.js";import{P as Ie}from"./types-BeqiJ_MG.js";import"./mapbox-Dsi-_OTH.js";function ve(t){const e=I.c(77),{trialEligible:r,starting:o,onCheckout:i,readOnly:l,initialPeriod:a,highlightTier:c,pricePercent:d,disabled:x}=t,p=l===void 0?!1:l,f=a===void 0?null:a,m=c===void 0?null:c,b=d===void 0?100:d,h=x===void 0?!1:x,{t:n}=J(),[u,g]=E.useState(f??"monthly_committed");let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=y=>()=>{g(y)},e[0]=v):v=e[0];const N=v;let j;e[1]!==i||e[2]!==u?(j=y=>()=>{i(y,u)},e[1]=i,e[2]=u,e[3]=j):j=e[3];const k=j;let S;e[4]!==u||e[5]!==n?(S=n(u==="annual"?"devenirSpot.grid.perYear":"devenirSpot.grid.perMonth"),e[4]=u,e[5]=n,e[6]=S):S=e[6];const C=S;let O;e[7]!==n||e[8]!==r?(O=n(r?"devenirSpot.cta.checkout":"devenirSpot.cta.checkoutNoTrial"),e[7]=n,e[8]=r,e[9]=O):O=e[9];const T=O;let P;e[10]!==T||e[11]!==o||e[12]!==n?(P=o?n("devenirSpot.cta.starting"):T,e[10]=T,e[11]=o,e[12]=n,e[13]=P):P=e[13];const $=P;let w;e[14]!==n?(w=n("devenirSpot.grid.periodAria"),e[14]=n,e[15]=w):w=e[15];let F;e[16]!==u||e[17]!==n?(F=ge.map(y=>s.jsx("button",{type:"button",role:"radio","aria-checked":u===y,onClick:N(y),className:te("rounded-full px-4 py-2 text-sm font-medium transition-colors",u===y?"bg-primary text-primary-foreground":"text-muted-foreground"),children:n(`devenirSpot.grid.period.${y}`)},y)),e[16]=u,e[17]=n,e[18]=F):F=e[18];let q;e[19]!==w||e[20]!==F?(q=s.jsx("div",{role:"radiogroup","aria-label":w,className:"mx-auto flex w-fit rounded-full bg-muted p-1",children:F}),e[19]=w,e[20]=F,e[21]=q):q=e[21];let R;e[22]!==u||e[23]!==n?(R=u==="monthly_committed"&&s.jsx("p",{className:"mt-3 text-center text-xs text-muted-foreground",children:n("devenirSpot.grid.commitmentNote")}),e[22]=u,e[23]=n,e[24]=R):R=e[24];let L;e[25]!==$||e[26]!==h||e[27]!==k||e[28]!==m||e[29]!==u||e[30]!==b||e[31]!==p||e[32]!==o||e[33]!==C||e[34]!==n||e[35]!==r?(L=ie.map(y=>s.jsxs("div",{className:te("flex flex-col rounded-2xl border border-border bg-card p-5",y==="visibilite"&&"border-primary/40 bg-primary/[0.07]",y===m&&"border-primary ring-1 ring-primary"),"data-testid":`pricing-card-${y}`,"data-chosen":y===m?"1":void 0,children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("h3",{className:"text-lg font-bold text-foreground",children:n(`devenirSpot.grid.tier.${y}`)}),s.jsx("span",{className:"rounded-full border border-primary/30 bg-primary/10 px-2 py-0.5 text-[11px] font-semibold text-primary-ink",children:n("devenirSpot.grid.founderBadge")})]}),s.jsxs("p",{className:"mt-1 text-2xl font-extrabold text-foreground",children:[$e(Fe(y,u,b)),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:C})]}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:n(`devenirSpot.grid.tierDesc.${y}`)}),s.jsxs("ul",{className:"mt-3 flex flex-1 flex-col gap-1.5",children:[me(y)?s.jsx("li",{className:"text-xs font-semibold text-foreground",children:n("spotTierFeatures.everythingIn",{tier:n(`devenirSpot.grid.tier.${me(y)}`)})}):null,_e(y).map(ee=>s.jsxs("li",{className:"flex gap-1.5 text-xs leading-relaxed text-muted-foreground",children:[s.jsx("span",{"aria-hidden":!0,className:"text-primary-ink",children:"+"}),s.jsx("span",{children:n(`spotTierFeatures.${ee.key}`)})]},ee.key))]}),r&&s.jsx("p",{className:"mt-3 text-xs font-semibold text-primary-ink",children:n("devenirSpot.grid.trialBadge")}),p?s.jsx("a",{href:"/dl",className:"mt-3 rounded-xl bg-primary px-4 py-3 text-center text-sm font-bold text-primary-foreground no-underline",children:n("devenirSpot.noToken.downloadCta")}):s.jsx("button",{type:"button",disabled:o||h,onClick:k(y),className:te("mt-3 rounded-xl bg-primary px-4 py-3 text-sm font-bold text-primary-foreground transition-opacity",(o||h)&&"opacity-60"),children:$})]},y)),e[25]=$,e[26]=h,e[27]=k,e[28]=m,e[29]=u,e[30]=b,e[31]=p,e[32]=o,e[33]=C,e[34]=n,e[35]=r,e[36]=L):L=e[36];let U;e[37]!==L?(U=s.jsx("div",{className:"mt-6 grid gap-4 sm:grid-cols-3",children:L}),e[37]=L,e[38]=U):U=e[38];let B;e[39]!==n?(B=n("spotTierFeatures.tableTitle"),e[39]=n,e[40]=B):B=e[40];let D;e[41]!==B?(D=s.jsx("h3",{className:"mb-2 text-[11px] font-bold uppercase tracking-wide text-muted-foreground",children:B}),e[41]=B,e[42]=D):D=e[42];let K;e[43]!==n?(K=n("centreTierFeatures.featureColumn"),e[43]=n,e[44]=K):K=e[44];let H;e[45]!==K?(H=s.jsx("th",{scope:"col",className:"p-3 text-left font-semibold text-foreground",children:K}),e[45]=K,e[46]=H):H=e[46];let M;e[47]!==n?(M=ie.map(y=>s.jsx("th",{scope:"col",className:"w-32 p-3 text-center font-semibold text-foreground",children:n(`devenirSpot.grid.tier.${y}`)},y)),e[47]=n,e[48]=M):M=e[48];let Q;e[49]!==H||e[50]!==M?(Q=s.jsx("thead",{children:s.jsxs("tr",{className:"bg-muted",children:[H,M]})}),e[49]=H,e[50]=M,e[51]=Q):Q=e[51];let W;e[52]!==n?(W=Ae.map(y=>s.jsxs("tr",{className:"border-t border-border",children:[s.jsx("th",{scope:"row",className:"p-3 text-left text-[13px] font-normal text-muted-foreground",children:n(`spotTierFeatures.${y.key}`)}),ie.map(ee=>{const ne=qe(y,ee);return s.jsx("td",{className:"p-3 text-center","data-testid":`grid-feature-${y.key}-${ee}`,children:s.jsx("span",{className:ne?"text-primary-ink":"text-muted-foreground
1/50","aria-label":n(ne?"centreTierFeatures.included":"centreTierFeatures.notIncluded"),children:ne?"✓":"–"})},ee)})]},y.key)),e[52]=n,e[53]=W):W=e[53];let G;e[54]!==W?(G=s.jsx("tbody",{children:W}),e[54]=W,e[55]=G):G=e[55];let V;e[56]!==Q||e[57]!==G?(V=s.jsxs("table",{className:"w-full border-collapse overflow-hidden rounded-2xl border border-border text-sm",children:[Q,G]}),e[56]=Q,e[57]=G,e[58]=V):V=e[58];let X;e[59]!==D||e[60]!==V?(X=s.jsxs("div",{className:"mt-8 hidden md:block",children:[D,V]}),e[59]=D,e[60]=V,e[61]=X):X=e[61];let Y;e[62]!==n?(Y=n("devenirSpot.grid.lockedNote"),e[62]=n,e[63]=Y):Y=e[63];let Z;e[64]!==Y?(Z=s.jsx("p",{className:"mt-4 text-center text-xs text-muted-foreground",children:Y}),e[64]=Y,e[65]=Z):Z=e[65];let _;e[66]!==n?(_=n("devenirSpot.grid.vatNote"),e[66]=n,e[67]=_):_=e[67];let A;e[68]!==_?(A=s.jsx("p",{className:"text-center text-xs leading-relaxed text-muted-foreground",children:_}),e[68]=_,e[69]=A):A=e[69];let z;return e[70]!==q||e[71]!==R||e[72]!==U||e[73]!==X||e[74]!==Z||e[75]!==A?(z=s.jsxs("div",{children:[q,R,U,X,Z,A]}),e[70]=q,e[71]=R,e[72]=U,e[73]=X,e[74]=Z,e[75]=A,e[76]=z):z=e[76],z}async function Re(t){const{data:e,error:r}=await ue.functions.invoke("spot-subscription-checkout",{body:{action:"context",token:t}});return r||!e?{kind:"error"}:e.invalid_token?{kind:"invalid"}:e.expired?{kind:"expired"}:e.consumed?{kind:"consumed"}:typeof e.placeName!="string"?{kind:"error"}:{kind:"ok",placeName:e.placeName,purpose:e.purpose==="renew"?"renew":"propose",trialEligible:!!e.trialEligible,alreadyActive:!!e.alreadyActive,zone:typeof e.zone=="string"&&/^[A-Z]$/.test(e.zone)?e.zone:null,pricePercent:ae(e.pricePercent),activeFloor:ae(e.activeFloor),minActive:ae(e.minActive)}}function ae(t){return typeof t=="number"&&Number.isInteger(t)?t:null}function Le(t,e){return{successUrl:`${t}/devenir-spot?paid=1&session_id={CHECKOUT_SESSION_ID}`,cancelUrl:`${t}/devenir-spot?t=${e}&canceled=1`}}async function Ue(t){const{data:e,error:r}=await ue.functions.invoke("spot-subscription-checkout",{body:{action:"checkout",token:t.token,tier:t.tier,period:t.period,successUrl:t.successUrl,cancelUrl:t.cancelUrl}});return r||!e?{kind:"error"}:e.already_active?{kind:"already_active"}:e.not_sellable?{kind:"not_sellable"}:e.url?{kind:"redirect",url:e.url}:{kind:"error"}}const pe={invalid_name:"name",invalid_category:"category",invalid_category_other:"category_other",invalid_address:"address",invalid_coordinates:"address",invalid_email:"email"};async function Be(t){if(!t||typeof t!="object"||!("context"in t))return null;const e=t.context;if(!(e instanceof Response))return null;try{const r=await e.json();if(r&&typeof r=="object"&&"error"in r){const o=r.error;return typeof o=="string"?o:null}}catch{return null}return null}function De(t){if(typeof t!="string")return!1;try{const e=new URL(t);return e.protocol==="https:"&&(e.hostname==="checkout.stripe.com"||e.hostname.endsWith(".stripe.com"))}catch{return!1}}async function Ke(t){try{const{data:e,error:r}=await ue.functions.invoke("spot-subscription-checkout",{body:{action:"web_checkout",...t}});if(r){const o=await Be(r);return o&&pe[o]?{kind:"invalid",field:pe[o]}:{kind:"error"}}return e?.not_sellable?{kind:"not_sellable"}:!e||!De(e.url)?{kind:"error"}:{kind:"redirect",url:e.url}}catch{return{kind:"error"}}}function He(t){return ie.includes(t??"")?t:null}function Me(t){return ge.includes(t??"")?t:null}function se(t){const e=new URLSearchParams(t);return{token:e.get("t"),paid:e.get("paid")==="1",canceled:e.get("canceled")==="1",period:Me(e.get("period")),tier:He(e.get("tier"))}}function Qe(t){const e=I.c(26);let r;e[0]!==t?(r={},e[0]=t,e[1]=r):r=e[1];const o=r,i=o.search??window.location.search;let l;e[2]!==i?(l=se(i),e[2]=i,e[3]=l):l=e[3];const a=l;let c;e[4]!==a.paid||e[5]!==a.token?(c=()=>a.paid?{mode:"paid"}:a.token?{mode:"loading"}:{mode:"noToken"},e[4]=a.paid,e[5]=a.token,e[6]=c):c=e[6];const[d,x]=E.useState(c);let p;e[7]!==i?(p=()=>se(i).period,e[7]=i,e[8]=p):p=e[8];const[f]=E.useState(p);let m;e[9]!==i?(m=()=>se(i).tier,e[9]=i,e[10]=m):m=e[10];const[b]=E.useState(m),[h,n]=E.useState(!1),[u,g]=E.useState(!1);let v,N;e[11]!==i?(v=()=>{const P=se(i);if(P.paid||!P.token)return;let $=!1;return Re(P.token).then(w=>
1{if(!$){if(w.kind==="ok"){w.alreadyActive?x({mode:"alreadyActive",placeName:w.placeName}):x({mode:"grid",placeName:w.placeName,purpose:w.purpose,trialEligible:w.trialEligible,canceled:P.canceled,zone:{zone:w.zone,pricePercent:w.pricePercent,activeFloor:w.activeFloor,minActive:w.minActive}});return}x({mode:w.kind})}}),()=>{$=!0}},N=[i],e[11]=i,e[12]=v,e[13]=N):(v=e[12],N=e[13]),E.useEffect(v,N);const j=o.navigate,k=o.origin,S=a.token;let C;e[14]!==j||e[15]!==k||e[16]!==S||e[17]!==d?(C=async(P,$)=>{if(!S)return;n(!0),g(!1);const w=Le(k??window.location.origin,S),F=await Ue({token:S,tier:P,period:$,...w});if(F.kind==="redirect"){(j??We)(F.url);return}if(n(!1),F.kind==="already_active"){const q=d.mode==="grid"?d.placeName:"";x({mode:"alreadyActive",placeName:q});return}if(F.kind==="not_sellable"){d.mode==="grid"&&x({...d,zone:{...d.zone,zone:null,pricePercent:null,activeFloor:null}});return}g(!0)},e[14]=j,e[15]=k,e[16]=S,e[17]=d,e[18]=C):C=e[18];const O=C;let T;return e[19]!==u||e[20]!==f||e[21]!==b||e[22]!==O||e[23]!==h||e[24]!==d?(T={view:d,starting:h,checkoutFailed:u,startCheckout:O,initialPeriod:f,initialTier:b},e[19]=u,e[20]=f,e[21]=b,e[22]=O,e[23]=h,e[24]=d,e[25]=T):T=e[25],T}function We(t){return window.location.assign(t)}const ce="formules",Ge=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Ye(t){window.location.assign(t)}function Ze(t,e){const r=I.c(29),o=Ye,[i,l]=E.useState(""),[a,c]=E.useState(""),[d,x]=E.useState(""),[p,f]=E.useState(""),[m,b]=E.useState("idle"),[h,n]=E.useState(null),u=E.useRef(!1);let g,v;r[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{const P=function(w){w.persisted&&(u.current=!1,b("idle"))};return window.addEventListener("pageshow",P),()=>window.removeEventListener("pageshow",P)},v=[],r[0]=g,r[1]=v):(g=r[0],v=r[1]),E.useEffect(g,v);let N;r[2]!==a||r[3]!==d?(N=a==="other"&&d.trim().length===0,r[2]=a,r[3]=d,r[4]=N):N=r[4];const j=N;let k;r[5]!==j||r[6]!==a||r[7]!==d||r[8]!==p||r[9]!==i||r[10]!==m?(k=m!=="submitting"&&i.trim().length>=2&&a!==""&&!j&&d.trim().length<=40&&Ge.test(p.trim()),r[5]=j,r[6]=a,r[7]=d,r[8]=p,r[9]=i,r[10]=m,r[11]=k):k=r[11];const S=k;let C;r[12]!==S||r[13]!==a||r[14]!==d||r[15]!==p||r[16]!==i||r[17]!==t||r[18]!==o?(C=async(P,$)=>{if(!S||u.current)return;u.current=!0,b("submitting"),n(null),xe("spot_web_checkout_started",{tier:P});const w=await Ke({name:i.trim(),category:a,categoryOther:a==="other"?d.trim():"",address:t.address,lat:t.lat,lng:t.lng,email:p.trim().toLowerCase(),tier:P,period:$});if(w.kind==="redirect"){o(w.url);return}u.current=!1,w.kind==="invalid"&&n(w.field),b(w.kind)},r[12]=S,r[13]=a,r[14]=d,r[15]=p,r[16]=i,r[17]=t,r[18]=o,r[19]=C):C=r[19];const O=C;let T;return r[20]!==S||r[21]!==a||r[22]!==d||r[23]!==p||r[24]!==h||r[25]!==i||r[26]!==O||r[27]!==m?(T={name:i,category:a,categoryOther:d,email:p,status:m,invalidField:h,canOrder:S,setName:l,setCategory:c,setCategoryOther:x,setEmail:f,startOrder:O},r[20]=S,r[21]=a,r[22]=d,r[23]=p,r[24]=h,r[25]=i,r[26]=O,r[27]=m,r[28]=T):T=r[28],T}const de="mt-1 h-11 bg-background text-base",le="mt-4 block text-sm font-semibold";function Je(t){const e=I.c(96),{place:r,pricePercent:o}=t,{t:i}=J(),l=Ze(r);let a;e[0]!==l?(a=function(A){const{target:z}=A,{value:y}=z;l.setName(y)},e[0]=l,e[1]=a):a=e[1];const c=a;let d;e[2]!==l?(d=function(A){const{target:z}=A,{value:y}=z;l.setCategory(y)},e[2]=l,e[3]=d):d=e[3];const x=d;let p;e[4]!==l?(p=function(A){const{target:z}=A,{value:y}=z;l.setCategoryOther(y)},e[4]=l,e[5]=p):p=e[5];const f=p;let m;e[6]!==l?(m=function(A){const{target:z}=A,{value:y}=z;l.setEmail(y)},e[6]=l,e[7]=m):m=e[7];const b=m;let h;e[8]!==l?(h=function(A,z){l.startOrder(A,z)},e[8]=l,e[9]=h):h=e[9];const n=h;let u;e[10]!==i?(u=i("devenirSpot.order.title"),e[10]=i,e[11]=u):u=e[11];let g;e[12]!==u?(g=s.jsx("h3",{className:"text-xl font-extrabold",children:u}),e[12]=u,e[13]=g):g=e[13];let v;e[14]!==r.address?(v=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:r.address}),e[14]=r.address,e[15]=v):v=e[15];let N;e[16]!==i?(N=i("spotPropose.fields.name"),e[16]=i,e[17]=N):N=e[17];let j;e[18]!==N?(j=s.jsx("label",{className:le,htmlFor:"spot-nom",children:N}),e[18]=N,e[19]=j):j=e[19];let k;e[20]!==c||e[21]!==l.name?(k=s.jsx(oe,{id:"spot-nom",className:de,value:l.name,onChange:c,maxLength:120}),e[20]=c,e[21]=l.name,e[22]=k):k=e[22];let S;e[23]!==i?(S=i("spotPropose.fields.category"),e[23]=i,e[24]=S):S=e[24];let C;e[25]!==S?(C=s.jsx("label",{className:le,htmlFor:"spot-type",children:S}),e[25]=S,e[26]=C):C=e[26];const O=l.category;let T;e[27]!==i?(T=i("devenirSpot.order.categoryPlaceholder"),e[27]=i,e[28]=T):T=e[28];let P;e[29]!==T?(P=s.jsx("option",{value:"",children:T}),e[29]=T,e[30]=P):P=e[30];let $;e[31]!==i?($=Ie.map(_=>s.jsx("option",{value:_,children:i(_==="other"?"devenirSpot.order.otherOption":`partners.category.${_}`)},_)),e[31]=i,e[32]=$):$=e[32];let w;e[33]!==x||e[34]!==P||e[35]!==$||e[36]!==l.category?(w=s.jsxs("select",{id:"spot-type",value:O,onChange:x,className:"mt-1 h-11 w-full rounded-md border border-border bg-background px-3 text-base",children:[P,$]}),e[33]=x,e[34]=P,e[35]=$,e[36]=l.category,e[37]=w):w=e[37];let F;e[38]!==f||e[39]!==i||e[40]!==l.category||e[41]!==l.categoryOther?(F=l.category==="other"&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:le,htmlFor:"spot-type-autre",children:i("spotPropose.fields.categoryOther")}),s.jsx(oe,{id:"spot-type-autre",className:de,value:l.categoryOther,onChange:f,maxLength:40,placeholder:i("spotPropose.fields.categoryOtherPlaceholder")})]}),e[38]=f,e[39]=i,e[40]=l.category,e[41]=l.categoryOther,e[42]=F):F=e[42];let q;e[43]!==i?(q=i("devenirSpot.order.emailLabel"),e[43]=i,e[44]=q):q=e[44];let R;e[45]!==q?(R=s.jsx("label",{className:le,htmlFor:"spot-email",children:q}),e[45]=q,e[46]=R):R=e[46];let L;e[47]!==b||e[48]!==l.email?(L=s.jsx(oe,{id:"spot-email",type:"email",autoComplete:"email",className:de,value:l.email,onChange:b,maxLength:200,"aria-describedby":"spot-email-aide"}),e[47]=b,e[48]=l.email,e[49]=L):L=e[49];let U;e[50]!==i?(U=i("devenirSpot.order.emailHint"),e[50]=i,e[51]=U):U=e[51];let B;e[52]!==U?(B=s.jsx("p",{id:"spot-email-aide",className:"mt-1 text-sm text-muted-foreground",children:U}),e[52]=U,e[53]=B):B=e[53];let D;e[54]!==i?(D=i("devenirSpot.order.validationNote"),e[54]=i,e[55]=D):D=e[55];let K;e[56]!==D?(K=s.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:D}),e[56]=D,e[57]=K):K=e[57];let H;e[58]!==i||e[59]!==l.invalidField||e[60]!==l.status?(H=l.status==="invalid"&&l.invali
1dField&&s.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:i(`devenirSpot.order.invalid.${l.invalidField}`)}),e[58]=i,e[59]=l.invalidField,e[60]=l.status,e[61]=H):H=e[61];let M;e[62]!==i||e[63]!==l.status?(M=l.status==="not_sellable"&&s.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:i("devenirSpot.order.notSellable")}),e[62]=i,e[63]=l.status,e[64]=M):M=e[64];let Q;e[65]!==i||e[66]!==l.status?(Q=l.status==="error"&&s.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:i("devenirSpot.order.error")}),e[65]=i,e[66]=l.status,e[67]=Q):Q=e[67];let W;e[68]!==j||e[69]!==k||e[70]!==C||e[71]!==w||e[72]!==F||e[73]!==R||e[74]!==L||e[75]!==B||e[76]!==K||e[77]!==H||e[78]!==M||e[79]!==Q||e[80]!==g||e[81]!==v?(W=s.jsxs("div",{className:"rounded-3xl border border-border bg-card p-6 md:p-8",children:[g,v,j,k,C,w,F,R,L,B,K,H,M,Q]}),e[68]=j,e[69]=k,e[70]=C,e[71]=w,e[72]=F,e[73]=R,e[74]=L,e[75]=B,e[76]=K,e[77]=H,e[78]=M,e[79]=Q,e[80]=g,e[81]=v,e[82]=W):W=e[82];let G;e[83]!==i||e[84]!==l.canOrder||e[85]!==l.status?(G=!l.canOrder&&l.status!=="submitting"&&s.jsx("p",{className:"text-sm font-semibold text-primary-ink",children:i("devenirSpot.order.fillFirst")}),e[83]=i,e[84]=l.canOrder,e[85]=l.status,e[86]=G):G=e[86];const V=l.status==="submitting",X=!l.canOrder;let Y;e[87]!==n||e[88]!==o||e[89]!==V||e[90]!==X?(Y=s.jsx(ve,{trialEligible:!0,starting:V,disabled:X,onCheckout:n,pricePercent:o}),e[87]=n,e[88]=o,e[89]=V,e[90]=X,e[91]=Y):Y=e[91];let Z;return e[92]!==W||e[93]!==G||e[94]!==Y?(Z=s.jsxs("div",{className:"flex flex-col gap-6",children:[W,G,Y]}),e[92]=W,e[93]=G,e[94]=Y,e[95]=Z):Z=e[95],Z}function Ve(){const[t,e]=E.useState(null),[r,o]=E.useState(null),[i,l]=E.useState("idle"),a=E.useRef(0),c=E.useRef(!1),d=E.useCallback(p=>{a.current+=1,c.current=!1,e(p),o(null),l("idle")},[]),x=E.useCallback(async()=>{if(!t||c.current)return;c.current=!0;const p=++a.current;l("loading");try{const f=await ze(t.lat,t.lng);if(p!==a.current)return;o(f),l("done"),xe("spot_quote_computed",{zone:f.zone??"none"})}catch{if(p!==a.current)return;o(null),l("error")}finally{p===a.current&&(c.current=!1)}},[t]);return{place:t,quote:r,status:i,canRequest:t!=null&&i!=="loading",setPlace:d,requestQuote:x}}const Xe="[email protected]",et="fr,re,gp,mq,gf,yt";function be(t){const e=I.c(13),{zone:r,radiusKm:o}=t,{t:i}=J();let l;e[0]!==i||e[1]!==r?(l=i("devenirSpot.quote.zoneTitle",{zone:r}),e[0]=i,e[1]=r,e[2]=l):l=e[2];let a;e[3]!==l?(a=s.jsx("h3",{className:"text-xl font-extrabold",children:l}),e[3]=l,e[4]=a):a=e[4];let c;e[5]!==o||e[6]!==i?(c=i("devenirSpot.quote.rule",{radius:o}),e[5]=o,e[6]=i,e[7]=c):c=e[7];let d;e[8]!==c?(d=s.jsx("p",{className:"mt-2 text-muted-foreground",children:c}),e[8]=c,e[9]=d):d=e[9];let x;return e[10]!==a||e[11]!==d?(x=s.jsxs("div",{className:"rounded-2xl bg-primary/10 p-5",children:[a,d]}),e[10]=a,e[11]=d,e[12]=x):x=e[12],x}function Se(t){const e=I.c(22),{minActive:r,radiusKm:o,placeLabel:i}=t,{t:l}=J(),a=i??"";let c;e[0]!==l||e[1]!==a?(c=l("devenirSpot.quote.belowMailSubject",{place:a}),e[0]=l,e[1]=a,e[2]=c):c=e[2];const d=c;let x;e[3]!==l?(x=l("devenirSpot.quote.belowTitle"),e[3]=l,e[4]=x):x=e[4];let p;e[5]!==x?(p=s.jsx("h3",{className:"text-lg font-bold",children:x}),e[5]=x,e[6]=p):p=e[6];const f=r??30;let m;e[7]!==o||e[8]!==l||e[9]!==f?(m=l("devenirSpot.quote.belowText",{min:f,radius:o}),e[7]=o,e[8]=l,e[9]=f,e[10]=m):m=e[10];let b;e[11]!==m?(b=s.jsx("p",{className:"mt-2 text-muted-foreground",children:m}),e[11]=m,e[12]=b):b=e[12];const h=`mailto:${Xe}?subject=${encodeURIComponent(d)}`;let n;e[13]!==l?(n=l("devenirSpot.quote.belowCta"),e[13]=l,e[14]=n):n=e[14];let u;e[15]!==h||e[16]!==n?(u=s.jsx("a",{href:h,className:"mt-4 inline-block rounded-xl border border-foreground px-5 py-3 font-semibold text-foreground no-underline",children:n}),e[15]=h,e[16]=n,e[17]=u):u=e[17];let g;return e[18]!==u||e[19]!==p||e[20]!==b?(g=s.jsxs("div",{className:"rounded-2xl bg-muted p-5",children:[p,b,u]}),e[18]=u,e[19]=p,e[20]=b,e[21]=g):g=e[21],g}function tt(){const t=I.c(40),{t:e}=J(),r=Ve();let o;t[0]!==r?(o=function(S){r.setPlace(S)},t[0]=r,t[1]=o):o=t[1];const i=o;let l;t[2]!==r?(l=function(){r.requestQuote()},t[2]=r,t[3]=l):l=t[3];const a=l,c=r.status==="done"?r.quote:null;let d;t[4]!==e?(d=e("devenirSpot.quote.placeLabel"),t[4]=e,t[5]=d):d=t[5];let x;t[6]!==d?(x=s.jsx("label",{className:"block text-sm font-semibold",htmlFor:"spot-adresse",children:d}),t[6]=d,t[7]=x):x=t[7];const p=r.place?.address??"";let f;t[8]!==e?(f=e("devenirSpot.quote.placePlaceholder"),t[8]=e,t[9]=f):f=t[9];let m;t[10]!==i||t[11]!==p||t[12]!==f?(m=s.jsx("div",{id:"spot-adresse",className:"mt-2",children:s.jsx(je,{value:p,onChange:i,placeholder:f,countries:et})}),t[10]=i,t[11]=p,t[12]=f,t[13]=m):m=t[13];const b=!r.canRequest;let h;t[14]!==e||t[15]!==r.status?(h=r.status==="loading"?e("devenirSpot.quote.loading"):e("devenirSpot.quote.cta"),t[14]=e,t[15]=r.status,t[16]=h):h=t[16];let n;t[17]!==a||t[18]!==b||t[19]!==h?(n=s.jsx(ye,{type:"button",size:"lg",className:"mt-5 w-full text-base font-bold",disabled:b,onClick:a,children:h}),t[17]=a,t[18]=b,t[19]=h,t[20]=n):n=t[20];let u;t[21]!==e||t[22]!==r.status?(u=r.status==="error"&&s.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:e("devenirSpot.quote.error")}),t[21]=e,t[22]=r.status,t[23]=u):u=t[23];let g;t[24]!==u||t[25]!==x||t[26]!==m||t[27]!==n?(g=s.jsxs("div",{className:"rounded-3xl border border-border bg-card p-6 shadow-lg md:p-8",children:[x,m,n,u]}),t[24]=u,t[25]=x,t[26]=m,t[27]=n,t[28]=g):g=t[28];let v;t[29]!==c||t[30]!==r.place?(v=c&&c.zone&&c.pricePercent!=null&&r.place&&s.jsxs(s.Fragment,{children:[s.jsx(be,{zone:c.zone,radiu
1sKm:c.radiusKm}),s.jsx(Je,{place:r.place,pricePercent:c.pricePercent},r.place.address)]}),t[29]=c,t[30]=r.place,t[31]=v):v=t[31];let N;t[32]!==c||t[33]!==r.place?.address||t[34]!==r.place?.city?(N=c&&!c.zone&&s.jsx(Se,{minActive:c.minActive,radiusKm:c.radiusKm,placeLabel:r.place?.city||r.place?.address}),t[32]=c,t[33]=r.place?.address,t[34]=r.place?.city,t[35]=N):N=t[35];let j;return t[36]!==g||t[37]!==v||t[38]!==N?(j=s.jsxs("div",{className:"flex flex-col gap-6",children:[g,v,N]}),t[36]=g,t[37]=v,t[38]=N,t[39]=j):j=t[39],j}function rt(t){const e=I.c(40),{placeName:r,className:o}=t,i=r===void 0?null:r,{t:l}=J();let a;e[0]!==i||e[1]!==l?(a=i??l("devenirSpot.preview.placeholder"),e[0]=i,e[1]=l,e[2]=a):a=e[2];const c=a;let d;e[3]!==o?(d=te("rounded-[1.75rem] border border-border bg-card p-3 shadow-2xl",o),e[3]=o,e[4]=d):d=e[4];let x;e[5]!==l?(x=l("devenirSpot.preview.label"),e[5]=l,e[6]=x):x=e[6];let p;e[7]!==x?(p=s.jsx("p",{className:"px-1 pb-2 text-[11px] font-bold uppercase tracking-wide text-muted-foreground",children:x}),e[7]=x,e[8]=p):p=e[8];let f;e[9]!==c?(f=s.jsx("p",{className:"truncate text-base font-bold text-foreground",children:c}),e[9]=c,e[10]=f):f=e[10];let m;e[11]!==l?(m=l("devenirSpot.preview.category"),e[11]=l,e[12]=m):m=e[12];let b;e[13]!==l?(b=l("devenirSpot.preview.distance"),e[13]=l,e[14]=b):b=e[14];let h;e[15]!==m||e[16]!==b?(h=s.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[m," · ",b]}),e[15]=m,e[16]=b,e[17]=h):h=e[17];let n;e[18]!==f||e[19]!==h?(n=s.jsxs("div",{className:"min-w-0",children:[f,h]}),e[18]=f,e[19]=h,e[20]=n):n=e[20];let u;e[21]!==l?(u=l("devenirSpot.preview.tag"),e[21]=l,e[22]=u):u=e[22];let g;e[23]!==u?(g=s.jsx("span",{className:"shrink-0 rounded-full bg-primary px-2 py-0.5 text-[10px] font-bold text-primary-foreground",children:u}),e[23]=u,e[24]=g):g=e[24];let v;e[25]!==n||e[26]!==g?(v=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n,g]}),e[25]=n,e[26]=g,e[27]=v):v=e[27];let N;e[28]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ne,{name:"handshake",className:"h-4 w-4 shrink-0"}),e[28]=N):N=e[28];let j;e[29]!==l?(j=l("devenirSpot.preview.perk"),e[29]=l,e[30]=j):j=e[30];let k;e[31]!==j?(k=s.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-xl bg-primary/15 px-3 py-2 text-xs font-semibold text-primary-ink",children:[N,s.jsx("span",{className:"truncate",children:j})]}),e[31]=j,e[32]=k):k=e[32];let S;e[33]!==v||e[34]!==k?(S=s.jsxs("div",{className:"rounded-2xl bg-muted p-4",children:[v,k]}),e[33]=v,e[34]=k,e[35]=S):S=e[35];let C;return e[36]!==S||e[37]!==d||e[38]!==p?(C=s.jsxs("div",{"data-testid":"spot-preview",className:d,children:[p,S]}),e[36]=S,e[37]=d,e[38]=p,e[39]=C):C=e[39],C}const st=["1","2","3"];function lt(){const t=I.c(7),{t:e}=J();let r;t[0]!==e?(r=e("devenirSpot.page.stepsTitle"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==e?(o=st.map(l=>({title:e(`devenirSpot.page.step${l}Title`),text:e(`devenirSpot.page.step${l}Text`)})),t[2]=e,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=s.jsx(Ce,{title:r,items:o}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}const it=[{key:"seen",icon:"compass"},{key:"group",icon:"handshake"},{key:"proof",icon:"chart"}];function nt(){const t=I.c(7),{t:e}=J();let r;t[0]!==e?(r=e("devenirSpot.benefits.title"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==e?(o=it.map(l=>{const{key:a,icon:c}=l;return{icon:c,title:e(`devenirSpot.benefits.${a}.title`),text:e(`devenirSpot.benefits.${a}.text`)}}),t[2]=e,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=s.jsx(ke,{title:r,items:o}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}const ot=["1","2","3","4"];function at(){const t=I.c(7),{t:e}=J();let r;t[0]!==e?(r=e("devenirSpot.faq.title"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==e?(o=ot.map(l=>({q:e(`devenirSpot.faq.q${l}`),a:e(`devenirSpot.faq.a${l}`)})),t[2]=e,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=s.jsx("div",{"data-testid":"spot-faq",children:s.jsx(we,{title:r,items:o})}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}function dt(){const t=I.c(10),{t:e}=J();let r;t[0]!==e?(r=e("devenirSpot.page.finalTitle"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==e?(o=e("devenirSpot.page.finalText"),t[2]=e,t[3]=o):o=t[3];let i;t[4]!==e?(i=e("devenirSpot.page.finalCta"),t[4]=e,t[5]=i):i=t[5];let l;return t[6]!==r||t[7]!==o||t[8]!==i?(l=s.jsx(Pe,{title:r,text:o,cta:i,href:`#${ce}`}),t[6]=r,t[7]=o,t[8]=i,t[9]=l):l=t[9],l}const fe=10,ct="/web-clubs-prepa-2.webp";function ut(){const t=I.c(64),{t:e}=J(),{view:r,starting:o,checkoutFailed:i,startCheckout:l,initialPeriod:a,initialTier:c}=Qe();let d;t[0]!==l?(d=(P,$)=>{l(P,$)},t[0]=l,t[1]=d):d=t[1];const x=d,[p]=E.useState(mt),f=r.mode==="noToken",m=r.mode==="grid";let b;t[2]!==i||t[3]!==m||t[4]!==e||t[5]!==r.canceled||t[6]!==r.placeName||t[7]!==r.purpose||t[8]!==r.trialEligible||t[9]!==f?(b=(f||m)&&s.jsxs("div",{className:"mt-8 grid items-center gap-10 md:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-primary-ink",children:e("devenirSpot.hero.badge")}),s.jsx("h1",{className:te(he,"mt-3 text-4xl md:text-6xl"),children:m&&r.purpose==="renew"?e("devenirSpot.hero.renewTitle"):e("devenirSpot.hero.title")}),s.jsx("p",{className:"mt-4 max-w-xl text-lg text-muted-foreground",children:e("devenirSpot.hero.subtitle")}),m&&s.jsx("p",{className:"mt-4 font-semibold text-primary-ink",children:e("devenirSpot.hero.forPlace",{placeName:r.placeName})}),m&&r.canceled&&s.jsx("p",{className:"mt-4 max-w-xl text-sm text-muted-foreground",children:e("devenirSpot.status.canceled")}),m&&i&&s.jsx("p",{role:"alert",className:"mt-4 max-w-xl text-sm text-destructive",children:e("devenirSpot.status.checkoutFailed")}),m&&r.trialEligible&&s.jsxs("div",{className:"mt-6 max-w-xl rounded-2xl border border-primary/30 bg-primary/10 p-4",children:[s.jsx("p",{className:"font-bold text-primary-ink",children:e("devenirSpot.trial.title")}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e("devenirSpot.trial.text")})]}),s.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[s.jsx("a",{href:`#${ce}`,className:"inline-flex min-h-11 items-center rounded-xl bg-primary px-6 py-3 font-bold text-primary-foreground no-underline",children:e(m?"devenirSpot.page.chooseCta":"devenirSpot.page.pricesCta")}),f&&s.jsx("a",{href:"/dl",className:"inline-flex min-h-11 items-center rounded-xl border border-foreground px-6 py-3 font-bold text-foreground no-underline",children:e("devenirSpot.noToken.downloadCta")})]})]}),s.jsxs("figure",{children:[s.jsxs("div",{className:"relative pb-24 md:pb-16",children:[s.jsx("img",{src:ct,alt:e("devenirSpot.page.photoAlt"),width:720,height:960,className:"h-80 w-full rounded-3xl object-cover shadow-xl md:h-[28rem]"}),s.jsx(rt,{placeName:m?r.placeName:null,className:"absolute bottom-0 left-4 right-4 md:left-auto md:right-6 md:w-80"})]}),s.jsx("figcaption",{className:"mt-3 text-sm text-muted-foreground",children:e("devenirSpot.preview.caption")})]})]}),t[2]=i,t[3]=m,t[4]=e,t[5]=r.canceled,t[6]=r.placeName,t[7]=r.purpose,t[8]=r.trialEligible,t[9]=f,t[10]=b):b=t[10];let h;t[11]!==e||t[12]!==r.mode?(h=r.mode==="loading"&&s.jsx("p",{className:"mt-10 text-center text-muted-foreground",children:e("devenirSpot.status.loading")}),t[11]=e,t[12]=r.mode,t[13]=h):h=t[13];let n;t[14]!==e||t[15]!==r.mode?(n=(r.mode==="invalid"||r.mode==="error")&&s.jsx(re,{titre:e("devenirSpot.status.invalid"),children:e("devenirSpot.status.invalidHint")}),t[14]=e,t[15]=r.mode,t[16]=n):n=t[16];let u;t[17]!==e||t[18]!==r.mode?(u=r.mode==="expired"&&s.jsx(re,{titre:e("devenirSpot.status.expired"),children:e("devenirSpot.status.expiredHint")}),t[17]=e,t[18]=r.mode,t[19]=u):u=t[19];let g;t[20]!==e||t[21]!==r.mode?(g=r.mode==="consumed"&&s.jsx(re,{titre:e("devenirSpot.status.consumed")}),t[20]=e,t[21]=r.mode,t[22]=g):g=t[22];let v;t[23]!==p||t[24]!==e||t[25]!==r.mode?(v=r.mode==="paid"&&s.jsx(re,{titre:e("devenirSpot.status.paidTitle"),children:e(p?"devenirSpot.order.paidWebText":"devenirSpot.status.paidText")}),t[23]=p,t[24]=e,t[25]=r.mode,t[26]=v):v=t[26];let N;t[27]!==p||t[28]!==e||t[29]!==r.mode?(N=r.mode==="paid"&&p&&s.jsx("p",{className:"mt-6 text-center",children:s.jsx("a",{href:"/dl",className:"inline-flex min-h-11 items-center rounded-xl bg-primary px-6 py-3 font-bold text-primary-foreground no-underline",children:e("devenirSpot.noToken.downloadCta")})}),t[27]=p,t[28]=e,t[29]=r.mode,t[30]=N):N=t[30];let j;t[31]!==e||t[32]!==r.mode||t[33]!==r.placeName?(j=r.mode==="alreadyActive"&&s.jsx(re,{titre:e("devenirSpot.status.alreadyActiveTitle",{placeName:r.placeName}),children:e("devenirSpot.status.alreadyActiveText")}),t[31]=e,t[32]=r.mode,t[33]=r.placeName,t[34]=j):j=t[34];let k;t[35]!==b||t[36]!==h||t[37]!==n||t[38]!==u||t[39]!==g||t[40]!==v||t[41]!==N||t[42]!==j?(k=s.jsxs(s.Fragment,{children:[b,h,n,u,g,v,N,j]}),t[35]=b,t[36]=h,t[37]=n,t[38]=u,t[39]=g,t[40]=v,t[41]=N,t[42]=j,t[43]=k):k=t[43];let S;t[44]!==f?(S=f&&s.jsx(lt,{}),t[44]=f,t[45]=S):S=t[45];let C;t[46]!==m||t[47]!==x||t[48]!==a||t[49]!==c||t[50]!==o||t[51]!==e||t[52]!==r.placeName||t[53]!==r.trialEligible||t[54]!==r.zone||t[55]!==f?(C=(f||m)&&s.jsxs(s.Fragment,{children:[s.jsx(nt,{}),s.jsx(Te,{id:ce,title:e("devenirSpot.page.pricesTitle"),children:s.jsxs("div",{className:"mx-auto mt-8 max-w-3xl",children:[m&&r.zone.zone&&r.zone.pricePercent!=null&&s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(be,{zone:r.zone.zone,radiu
1sKm:fe}),s.jsx(ve,{trialEligible:r.trialEligible,starting:o,onCheckout:x,initialPeriod:a,highlightTier:c,pricePercent:r.zone.pricePercent})]}),m&&!r.zone.zone&&s.jsx(Se,{minActive:r.zone.minActive,radiusKm:fe,placeLabel:r.placeName}),f&&s.jsx(tt,{})]})}),s.jsx(at,{})]}),t[46]=m,t[47]=x,t[48]=a,t[49]=c,t[50]=o,t[51]=e,t[52]=r.placeName,t[53]=r.trialEligible,t[54]=r.zone,t[55]=f,t[56]=C):C=t[56];let O;t[57]!==f?(O=f&&s.jsx(dt,{}),t[57]=f,t[58]=O):O=t[58];let T;return t[59]!==S||t[60]!==C||t[61]!==O||t[62]!==k?(T=s.jsxs(Ee,{hero:k,children:[S,C,O]}),t[59]=S,t[60]=C,t[61]=O,t[62]=k,t[63]=T):T=t[63],T}function mt(){return new URLSearchParams(window.location.search).get("web")==="1"}function re(t){const e=I.c(8),{titre:r,children:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=te(he,"text-3xl"),e[0]=i):i=e[0];let l;e[1]!==r?(l=s.jsx("h1",{className:i,children:r}),e[1]=r,e[2]=l):l=e[2];let a;e[3]!==o?(a=o&&s.jsx("p",{className:"mt-3 text-muted-foreground",children:o}),e[3]=o,e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==a?(c=s.jsxs("section",{className:"mx-auto mt-10 max-w-xl text-center",children:[l,a]}),e[5]=l,e[6]=a,e[7]=c):c=e[7],c}function vt(){Oe(s.jsx(ut,{}))}export{vt as mountDevenirSpotRoute};

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.