import{F as U,a as ce,M as X}from"./financial-core-C_85DMsm.js";import{C as le}from"./core-services-C5m_3GXM.js";function ue(a,n){for(var s=0;si[c]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function de(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}function je(a){if(Object.prototype.hasOwnProperty.call(a,"__esModule"))return a;var n=a.default;if(typeof n=="function"){var s=function i(){var c=!1;try{c=this instanceof i}catch{}return c?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};s.prototype=n.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(a).forEach(function(i){var c=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(s,i,c.get?c:{enumerable:!0,get:function(){return a[i]}})}),s}var J={exports:{}},w={},z={exports:{}},o={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var K;function pe(){if(K)return o;K=1;var a=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),g=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),C=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=C&&e[C]||e["@@iterator"],typeof e=="function"?e:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function E(e,t,l){this.props=e,this.context=t,this.refs=k,this.updater=l||N}E.prototype.isReactComponent={},E.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},E.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function F(){}F.prototype=E.prototype;function O(e,t,l){this.props=e,this.context=t,this.refs=k,this.updater=l||N}var A=O.prototype=new F;A.constructor=O,S(A,E.prototype),A.isPureReactComponent=!0;var T=Array.isArray,P=Object.prototype.hasOwnProperty,V={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function Q(e,t,l){var p,d={},y=null,v=null;if(t!=null)for(p in t.ref!==void 0&&(v=t.ref),t.key!==void 0&&(y=""+t.key),t)P.call(t,p)&&!H.hasOwnProperty(p)&&(d[p]=t[p]);var x=arguments.length-2;if(x===1)d.children=l;else if(1{const n=Math.abs(a).toFixed(2),[s,i]=n.split("."),f=`${s.replace(/\B(?=(\d{3})+(?!\d))/g," ")},${i}`;return`${a<0?"-":""}${f} $`},ye=a=>{const s=Math.abs(a).toFixed(1).replace(".",",");return`${a<0?"-":""}${s} %`};class xe{static generateComparison(n){const s={name:"MonPlanRetraite.ca",description:"Normes IPF 2025 + Table CPM2014",assumptions:{inflation:U.INFLATION,stockReturns:U.ACTIONS_CANADIENNES,bondReturns:U.REVENU_FIXE,lifeExpectancy:this.getLifeExpectancyCPM2014(n.currentAge,n.gender)},source:"Institut de planification financière + Institut canadien des actuaires"},i={name:"Calculateur générique",description:"Hypothèses approximatives moyennes",assumptions:{inflation:.02,stockReturns:.06,bondReturns:.03,lifeExpectancy:this.getGenericLifeExpectancy(n.currentAge,n.gender)},source:"Estimations approximatives"},c={name:"Calculateur conservateur",description:"Hypothèses pessimistes",assumptions:{inflation:.025,stockReturns:.055,bondReturns:.025,lifeExpectancy:this.getLifeExpectancyCPM2014(n.currentAge,n.gender)+3},source:"Approche très prudente"},f=this.calculateProjection(n,s,"ipf"),g=this.calculateProjection(n,i,"generic"),h=this.calculateProjection(n,c,"conservative"),u=this.calculateAdvantages(f,g,h);return{monplanretraite:f,generic:g,conservative:h,advantages:u}}static calculateProjection(n,s,i){const c=Math.max(0,n.currentAge),f=Math.max(c,n.retirementAge),g=Math.max(0,Math.round((f-c)*12)),h=ce.getAllocationByAge(c),u=h.actions*s.assumptions.stockReturns+h.obligations*s.assumptions.bondReturns+h.liquidites*U.COURT_TERME;let j=Math.max(0,n.currentSavings||0);const _=Math.max(0,n.monthlyContribution||0),C=u/12;if(g>0)for(let P=0;P0?S>1e-6?j*(S/(1-Math.pow(1+S,-N))):j/N:0,E=Math.max(0,n.desiredIncome||0),F=N>0?S>1e-6?E*((1-Math.pow(1+S,-N))/S):E*N:0,O=Math.max(0,F-j);let A;i==="generic"?A=Math.min(100,Math.round(n.currentAge+s.assumptions.lifeExpectancy+2)):A=X.getRecommendedPlanningAge(n.currentAge,n.gender);const T=i==="ipf"?.85:i==="conservative"?.7:.6;return{scenario:s,projectedCapital:Math.max(0,Math.round(j)),monthlyRetirementIncome:Math.max(0,Math.round(k)),capitalShortfall:Math.max(0,Math.round(O)),planningAge:A,confidence:T}}static calculateAdvantages(n,s,i){const c=[],f=n.projectedCapital-s.projectedCapital;f>0&&s.projectedCapital>0&&c.push({category:"Capital de retraite",advantage:f,percentage:f/s.projectedCapital*100,message:`Nos calculs IPF 2025 projettent ${I(f)} de plus pour votre retraite`,explanation:"Grâce aux hypothèses IPF 2025 plus précises (6,6 % vs 6 % actions, 2,1 % vs 2 % inflation)"});const g=s.planningAge-n.planningAge;g>0&&c.push({category:"Planification plus précise",advantage:g,percentage:0,message:`Notre table CPM2014 permet une planification ${g.toFixed(1)} années plus précise`,explanation:"Table officielle Institut canadien des actuaires vs estimations génériques"});const h=n.monthlyRetirementIncome-i.monthlyRetirementIncome;return h>0&&i.monthlyRetirementIncome>0&&c.push({category:"Revenus de retraite",advantage:h*12,percentage:h/i.monthlyRetirementIncome*100,message:`${I(h*12)} de revenus supplémentaires par année vs approche conservatrice`,explanation:"Optimisation équilibrée basée sur données officielles plutôt que pessimisme excessif"}),c}static getLifeExpectancyCPM2014(n,s){const i=X.calculateLifeExpectancy({age:n,gender:s});return Math.max(1,i.lifeExpectancy)}static getGenericLifeExpectancy(n,s){return Math.max(1,(s==="male"?79:83)-n)}}function re({userProfile:a,showDetails:n=!1}){const[s,i]=$.useState("generic"),c=$.useMemo(()=>xe.generateComparison(a),[a]),f=s==="generic"?c.generic:c.conservative,g=c.advantages;$.useEffect(()=>{le.trackComparison(a,g)},[a,g]);const h=u=>u.category.toLowerCase().includes("planification");return r.jsxs("div",{className:"seniors-comparison-widget bg-white border-2 border-gray-300 rounded-lg p-8 shadow-lg",children:[r.jsxs("div",{className:"comparison-header mb-8",children:[r.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Pourquoi nos calculs sont plus précis"}),r.jsx("p",{className:"text-xl text-gray-700 leading-relaxed",children:"Comparaison avec d'autres calculateurs de retraite utilisant des hypothèses approximatives"})]}),r.jsxs("div",{className:"comparison-selector mb-8",children:[r.jsx("p",{className:"text-lg font-semibold mb-4",children:"Comparer avec :"}),r.jsxs("div",{className:"selector-buttons",children:[r.jsx("button",{className:`selector-btn ${s==="generic"?"active":""}`,onClick:()=>i("generic"),children:"Calculateur moyen du marché"}),r.jsx("button",{className:`selector-btn ${s==="conservative"?"active":""}`,onClick:()=>i("conservative"),children:"Calculateur très conservateur"})]})]}),r.jsxs("div",{className:"comparison-grid grid grid-cols-1 md:grid-cols-2 gap-8 mb-8",children:[r.jsxs("div",{className:"scenario-card our-platform",children:[r.jsxs("div",{className:"card-header bg-green-50 border-2 border-green-200 rounded-t-lg p-6",children:[r.jsx("h3",{className:"text-2xl font-bold text-green-800",children:"MonPlanRetraite.ca"}),r.jsx("p",{className:"text-lg text-green-700",children:"Normes IPF 2025 + Table CPM2014"})]}),r.jsxs("div",{className:"card-content p-6 border-2 border-green-200 border-t-0 rounded-b-lg",children:[r.jsxs("div",{className:"financial-result mb-4",children:[r.jsxs("span",{className:"result-label",children:["Capital projeté à ",a.retirementAge," ans"]}),r.jsx("div",{className:"result-amount text-4xl font-bold text-green-600","aria-live":"polite",children:I(c.monplanretraite.projectedCapital)})]}),r.jsxs("div",{className:"financial-result",children:[r.jsx("span",{className:"result-label",children:"Revenus mensuels possibles"}),r.jsxs("div",{className:"result-amount text-3xl font-bold text-green-600","aria-live":"polite",children:[I(c.monplanretraite.monthlyRetirementIncome),"/mois"]})]})]})]}),r.jsxs("div",{className:"scenario-card competitor",children:[r.jsxs("div",{className:"card-header bg-gray-50 border-2 border-gray-300 rounded-t-lg p-6",children:[r.jsx("h3",{className:"text-2xl font-bold text-gray-700",children:f.scenario.name}),r.jsx("p",{className:"text-lg text-gray-600",children:f.scenario.description})]}),r.jsxs("div",{className:"card-content p-6 border-2 border-gray-300 border-t-0 rounded-b-lg",children:[r.jsxs("div",{className:"financial-result mb-4",children:[r.jsxs("span",{className:"result-label",children:["Capital projeté à ",a.retirementAge," ans"]}),r.jsx("div",{className:"result-amount text-4xl font-bold text-gray-600","aria-live":"polite",children:I(f.projectedCapital)})]}),r.jsxs("div",{className:"financial-result",children:[r.jsx("span",{className:"result-label",children:"Revenus mensuels possibles"}),r.jsxs("div",{className:"result-amount text-3xl font-bold text-gray-600","aria-live":"polite",children:[I(f.monthlyRetirementIncome),"/mois"]})]})]})]})]}),r.jsxs("div",{className:"advantages-section",children:[r.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Votre avantage avec nos calculs précis"}),g.map((u,j)=>r.jsxs("div",{className:"advantage-card bg-blue-50 border-2 border-blue-200 rounded-lg p-6 mb-4",children:[r.jsxs("div",{className:"advantage-header mb-3",children:[r.jsx("h4",{className:"text-xl font-bold text-blue-800",children:u.category}),r.jsxs("div",{className:"advantage-amount text-3xl font-bold text-blue-600",children:[h(u)?`${u.advantage.toFixed(1)} années`:I(u.advantage),u.percentage>0&&r.jsxs("span",{className:"advantage-percentage text-xl ml-2",children:["(+",ye(u.percentage),")"]})]})]}),r.jsx("p",{className:"advantage-message text-lg text-blue-700 mb-3",children:u.message}),n&&r.jsx("p",{className:"advantage-explanation text-base text-blue-600",children:u.explanation})]},j))]}),r.jsxs("div",{className:"credibility-section mt-8 p-6 bg-gray-50 rounded-lg",children:[r.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:"Nos sources officielles"}),r.jsxs("div",{className:"sources-grid grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"source-item",children:[r.jsx("div",{className:"source-name font-semibold",children:"Institut de planification financière"}),r.jsx("div",{className:"source-detail text-gray-700",children:"Normes d'hypothèses de projection 2025"})]}),r.jsxs("div",{className:"source-item",children:[r.jsx("div",{className:"source-name font-semibold",children:"Institut canadien des actuaires"}),r.jsx("div",{className:"source-detail text-gray-700",children:"Table de mortalité CPM2014 officielle"})]})]})]}),r.jsxs("div",{className:"cta-section mt-8 text-center",children:[r.jsx("button",{className:"cta-button bg-blue-600 text-white text-xl font-bold py-4 px-8 rounded-lg hover:bg-blue-700 transition-colors",children:"Voir ma projection précise maintenant"}),r.jsx("p",{className:"cta-subtext text-lg text-gray-600 mt-3",children:"Gratuit • Conforme IPF 2025 • Spécialement conçu pour les Québécois"})]})]})}const Ne=Object.freeze(Object.defineProperty({__proto__:null,SeniorsCompetitiveComparison:re,default:re},Symbol.toStringTag,{value:"Module"}));export{_e as R,re as S,de as a,ne as b,be as c,he as d,ye as e,I as f,je as g,Ne as h,r as j,$ as r};