PageSourceSearch

https://app.leorad.com.br/assets/index-BqDfGf8M.js

js leorad.com.br collected 2026-09-24 14:10:03 UTC 18,718 bytes, 1 lines download raw bytes

1import{j as e,r as g,f as ie}from"./vendor-react-BoKnjLLK.js";import{d as C,c as U,a as $,h as _,i as B,f as se,b as T,A as N,L as G,S as J,C as te,e as ce,j as oe}from"./index-I8V-zHcE.js";import{u as ae,p as ne,e as de,a as xe,f as le,s as pe,b as me,P as he}from"./PlanCredits-BwpFNYZe.js";import{c as n}from"./index-Cy51oCf_.js";import{S as H,i as ge,B as D,k as ue,P as fe,ao as be,C as je,aI as ye,t as ve,a as Ne,b as we}from"./vendor-antd-wczZiUTi.js";function ke(){const{t:r}=C(),{theme:s}=U(),t=B(s),{credits:o,carregando:p}=ae(),d=o.acquired?o.acquired:450,l=o.consumed?o.consumed:0,h=ne({acquired:d,additional:o.additional,consumed:l}),i=$.trialExpired()||!$.trialExpiration(),c=$.trialExpiration()?_($.trialExpiration()).utc().fromNow():"";return e.jsx(H,{spinning:p,size:"large",children:e.jsxs("div",{className:n("mx-auto mb-7 flex max-w-5xl flex-wrap items-center justify-between gap-x-8 gap-y-4 rounded-lg border px-5 py-4",i?t?"border-red-900 bg-red-950/40":"border-red-200 bg-red-50":t?"border-slate-700 bg-[#030712]":"border-gray-200 bg-white"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:n("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",i?t?"bg-red-900/50":"bg-red-100":t?"bg-[#22b1e3]/15":"bg-[#e6f7fd]"),children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:i?"#ef4444":"#22b1e3",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"M12 7v5l3 2"})]})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:n("font-semibold",{"text-red-500":i,"text-gray-100":!i&&t,"text-[#00164b]":!i&&!t}),children:i?r("plan.trialOver"):r("plan.trialEndsIn",{when:c})}),e.jsx("div",{className:n("text-[13px]",{"text-gray-400":t,"text-gray-500":!t}),children:r(i?"plan.trialOverMsg":"plan.trialKeeps")})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:n("text-[13px]",{"text-gray-400":t,"text-gray-500":!t}),children:r("plan.trialUsed")}),e.jsx("div",{className:n("h-2 w-40 overflow-hidden rounded-full",t?"bg-slate-700":"bg-gray-200"),children:e.jsx("div",{className:n("h-full rounded-full",i?"bg-red-500":"bg-[#22b1e3]"),style:{width:`${h}%`}})}),e.jsxs("div",{className:n("text-[13px] font-semibold",{"text-gray-200":t,"text-gray-700":!t}),children:[l," / ",d]})]})]})})}function ee(r){const{plans:s,hasSubscription:t}=r,[o,p]=g.useState("month"),{theme:d,isRadflow:l}=U(),{t:h}=C(),i=B(d),c=de(s),b=s.filter(a=>a.interval===o),u=xe(b);return e.jsxs("div",{className:"pb-2",children:[e.jsxs("div",{className:"mb-6 flex flex-col items-center gap-2 px-4 text-center",children:[e.jsx("div",{className:n("text-2xl font-bold leading-tight",{"text-gray-100":i,"text-[#00164b]":!i}),children:h("plan.chooseTitle")}),e.jsx("div",{className:n("max-w-xl text-base",{"text-gray-400":i,"text-gray-500":!i}),children:h("plan.chooseSubtitle")}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-3",children:[e.jsx(ge,{shape:"round",className:n({"bg-[#475569] text-gray-300":i,"bg-gray-200":!i}),size:"large",options:[{label:h("plan.monthly"),value:"month"},{label:h("plan.yearly"),value:"year"}],value:o,onChange:p}),c!==null&&e.jsx("span",{className:n("rounded-full px-3 py-1 text-xs font-semibold",i?"bg-green-500/15 text-green-400":"bg-green-100 text-green-700"),children:h("plan.annualSave",{percent:c})})]})]}),e.jsx("div",{className:"mx-auto flex max-w-5xl flex-wrap items-stretch justify-center",children:[...b].sort((a,L)=>a.price-L.price).map(a=>e.jsx(Se,{plan:a,hasSubscription:t,isPopular:a.id===u},a.id))}),e.jsx(Pe,{escuro:i,isRadflow:l})]})}function Pe({escuro:r,isRadflow:s}){const{t}=C(),o="text-2xl font-bold "+(r?"text-gray-100":"text-[#00164b]"),p="max-w-[190px] text-xs leading-snug "+(r?"text-gray-400":"text-gray-500");return e.jsxs("div",{className:n("mx-auto mt-6 flex max-w-5xl flex-wrap items-center justify-center gap-x-10 gap-y-4 rounded-lg border px-6 py-4",r?"border-slate-700 bg-[#030712]":"border-gray-200 bg-white"),children:[!s&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:o,children:"97%"}),e.jsx("span",{className:p,children:t("plan.proofRecommend")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:o,children:"70%"}),e.jsx("span",{className:p,children:t("plan.proofFaster")})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:r?"#e5e7eb":"#00164b",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6z"}),e.jsx("path",{d:"M9 12l2 2 4-4"})]}),e.jsx("span",{className:p,children:t("plan.proofSecure")})]})]})}function Se(r){const{plan:s,hasSubscription:t,isPopular:o}=r,{theme:p}=U(),{t:d}
1=C(),l=B(p),h=u=>le(u,s.currency),i=async u=>{const a={successUrl:window.location.origin+"/plans/success",cancelUrl:window.location.origin+"/plans",priceId:u},{data:L}=await T.post(`${N.payment.checkout}`,a);window.location.assign(L.url)},c=s.hasUnlimitedAiCredits||s.aiCredits==null?d("plan.unlimitedPerMonth"):d("plan.creditsPerMonth",{credits:s.aiCredits.toLocaleString()}),b=Array.isArray(s.features)&&s.features.length>0?s.features:Ce(s.displayName,d);return s?e.jsx("div",{className:"w-full p-3 md:w-1/3",children:e.jsxs("div",{className:n("relative flex h-full flex-col rounded-xl p-6",o?"pt-8":"pt-6",{"bg-white":se(p),"bg-[#030712]":l},o?l?"border-2 border-[#22b1e3] shadow-xl":"border-2 border-[#00164b] shadow-xl":l?"border border-slate-700":"border border-gray-200 shadow-sm"),children:[o&&e.jsx("span",{className:n("absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full px-3 py-1 text-[11px] font-semibold tracking-widest",l?"bg-[#22b1e3] text-[#00164b]":"bg-[#00164b] text-white"),children:d("plan.mostChosen")}),e.jsx("div",{className:n("text-xs font-semibold uppercase tracking-widest",{"text-gray-400":l,"text-gray-500":!l}),children:s.displayName}),e.jsxs("div",{className:"mt-2 flex items-baseline gap-1",children:[e.jsx("span",{className:n("text-4xl font-bold leading-none",{"text-white":l,"text-[#00164b]":!l}),children:h(s.interval==="year"?s.price/12:s.price)}),e.jsxs("span",{className:n("text-sm",{"text-gray-400":l,"text-gray-500":!l}),children:["/ ",d("plan.monthly")]})]}),e.jsx("div",{className:n("mt-1 min-h-[18px] text-xs",{"text-gray-500":l,"text-gray-400":!l}),children:s.interval==="year"?d("plan.chargedYearly",{total:h(s.price)}):d("plan.chargedMonthly")}),e.jsx("div",{className:n("my-4 h-px",l?"bg-slate-700":"bg-gray-200")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#22b1e3",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:e.jsx("path",{d:"M13 2L4 14h7l-1 8 9-12h-7z"})}),e.jsx("span",{className:n("text-[15px] font-semibold",{"text-gray-100":l,"text-[#00164b]":!l}),children:c})]}),e.jsx("div",{className:"mt-4 flex flex-1 flex-col gap-2",children:b.map((u,a)=>e.jsxs("div",{className:n("flex items-start gap-2 text-[13px]",{"text-gray-300":l,"text-gray-700":!l}),children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mt-[3px] shrink-0",children:e.jsx("path",{d:"M5 12.5l4.5 4.5L19 7"})}),e.jsx("span",{children:u})]},a))}),!t&&e.jsxs("div",{className:"mt-6",children:[e.jsx(D,{onClick:()=>i(s.id),type:o?"primary":"default",className:n({"border-blue-500 text-blue-500":!o}),block:!0,children:d("plan.subscribePlan",{plan:s.displayName})}),e.jsx("div",{className:n("mt-2 text-center text-xs",{"text-gray-500":l,"text-gray-400":!l}),children:d("plan.cancelAnytime")})]})]})}):e.jsx(e.Fragment,{})}function Ce(r,s){const t=r??"";return t.startsWith("Básico")?[s("plan.basic1"),s("plan.basic2"),s("plan.basic3"),s("plan.basic4")]:t.startsWith("Pro")?[s("plan.pro1"),s("plan.pro2"),s("plan.pro3")]:t.startsWith("Premium")?[s("plan.premium1"),s("plan.premium2"),s("plan.premium3"),s("plan.premium4")]:[]}function Le(r){var R,K,V,Q,X,Z;const{setActivePlan:s,plan:t,setShowPlans:o,showPlans:p,plans:d=[]}=r,[l,h]=g.useState(!1),{theme:i}=U(),c=B(i),{credits:b,carregando:u}=ae(),{t:a}=C(),L=async()=>{await T.delete(`${N.payment.subscription}`),s({});try{const P=JSON.parse(G.get(J.auth)||"{}"),Y=await te.post(`${N.baseURL}${N.auth.refreshToken}`,{refresh_token:P.refresh_token});G.set(J.auth,Y.data)}catch(P){console.log(P)}},F=async()=>{const P={returnUrl:window.location.origin+"/plans"},{data:Y}=await T.post(`${N.payment.billingPortal}`,P);window.location.assign(Y.url)},O=async P=>{const Y={successUrl:window.location.origin+"/plans/success",cancelUrl:window.location.origin+"/plans",priceId:P},{data:re}=await T.post(`${N.payment.checkout}`,Y);window.location.assign(re.url)};if(!t)return e.jsx(e.Fragment,{});const W=(R=t.price)==null?void 0:R.currency,A=P=>le(P,W),q=b.acquired??t.aiCredits??0,w=b.additional??0,f=b.consumed??0,M={acquired:q,additional:w,consumed:f},E=ne(M),j=t.status==="active"&&$.isSubscription(),y={id:(K=t.price)==null?void 0:K.id,displayName:(V=t.price)==null?void 0:V.displayName,price:(Q=t.price)==null?void 0:Q.price,interval:t.interval,aiCredits:t.aiCredits},v=j?pe(y,d,M):null,S=j&&!v?me(y,d):null,z=S&&y.price?Math.round((1-S.price/12/y.price)*100):0,I=n("flex flex-col gap-4 roun
1ded-xl border p-6",c?"border-slate-700 bg-[#030712]":"border-gray-200 bg-white shadow-sm"),x=n("text-xs",c?"text-gray-500":"text-gray-400"),m=n("text-[13px] font-medium",c?"text-gray-200":"text-gray-700"),k=n("font-semibold",c?"text-gray-100":"text-[#00164b]");return e.jsxs(H,{spinning:u,size:"large",children:[e.jsxs("div",{className:"mx-auto grid max-w-5xl grid-cols-1 items-start gap-6 px-4 md:grid-cols-2",children:[e.jsxs("div",{className:I,children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:n("text-xs font-semibold uppercase tracking-widest",c?"text-gray-400":"text-gray-500"),children:a("plan.yourSignature")}),e.jsx("div",{className:n("text-2xl font-bold leading-tight",c?"text-white":"text-[#00164b]"),children:(X=t.price)==null?void 0:X.displayName})]}),e.jsx(ue,{color:j?"green":"red",bordered:!1,children:a(j?"plan.status":"plan.statusInactive")})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:n("text-3xl font-bold leading-none",c?"text-white":"text-[#00164b]"),children:A((Z=t.price)==null?void 0:Z.price)}),e.jsxs("span",{className:n("text-sm",c?"text-gray-400":"text-gray-500"),children:["/"," ",t.interval==="month"?a("plan.monthly"):a("plan.yearly")]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:x,children:a("plan.since")}),e.jsx("span",{className:m,children:_(t.startDate).format("DD/MM/YYYY")})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:x,children:a("plan.nextCharge")}),e.jsx("span",{className:m,children:_(t.currentPeriodEnd).format("DD/MM/YYYY")})]})]}),e.jsx("div",{className:n("h-px",c?"bg-slate-700":"bg-gray-200")}),e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsx("div",{className:k,children:a("plan.creditsThisPeriod")}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:n("text-2xl font-bold leading-none",c?"text-white":"text-[#00164b]"),children:f.toLocaleString()}),e.jsx("span",{className:n("text-[13px]",c?"text-gray-400":"text-gray-500"),children:a("plan.creditsUsedOf",{total:(q+w).toLocaleString()})})]}),e.jsx("div",{className:n("h-2.5 w-full overflow-hidden rounded-full",c?"bg-slate-700":"bg-gray-200"),children:e.jsx("div",{className:"h-full rounded-full bg-blue-500",style:{width:`${E}%`}})}),e.jsxs("div",{className:n("flex flex-wrap gap-x-5 gap-y-1 text-xs",c?"text-gray-400":"text-gray-500"),children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-blue-500"}),a("plan.creditsFromPlan",{credits:q.toLocaleString()})]}),w>0&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-[#22b1e3]"}),a("plan.creditsExtra",{credits:w.toLocaleString()})]})]}),E>=100&&j&&e.jsx("div",{className:"text-sm font-semibold text-red-500",children:a("profile.noCredits")}),!j&&e.jsx("div",{className:"text-sm font-semibold text-red-500",children:a("profile.noPlanActive")})]}),j&&e.jsx(D,{onClick:()=>h(!0),type:"primary",block:!0,children:a("plan.addCredits")}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-[13px]",children:[e.jsx("a",{onClick:F,children:a("plan.managePayment")}),e.jsx(fe,{title:e.jsx("div",{className:"text-lg",children:a("plan.confirm")}),description:e.jsxs("div",{style:{maxWidth:290},children:[a("plan.confirmDesc1")," ",_(t.currentPeriodEnd).format("DD/MM/YYYY")," ",a("plan.confirmDesc2")]}),onConfirm:L,okText:a("plan.yes"),cancelText:a("plan.no"),children:e.jsx("a",{className:c?"text-gray-500":"text-gray-400",children:a("plan.cancel")})})]})]}),e.jsxs("div",{className:"flex flex-col gap-5",children:[v&&e.jsxs("div",{className:"flex flex-col gap-3 rounded-xl bg-[#00164b] p-6 text-white",children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-widest text-[#22b1e3]",children:a("plan.upgradeEyebrow",{percent:E})}),e.jsx("div",{className:"text-xl font-bold leading-snug",children:a("plan.upgradeTitle",{plan:v.plano.displayName,credits:(v.plano.aiCredits??0).toLocaleStr
1ing(),diff:A(v.diferenca)})}),e.jsx("div",{className:"text-[13px] leading-relaxed text-white/75",children:a("plan.upgradeDesc")}),e.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[e.jsx(D,{onClick:()=>O(v.plano.id),className:"border-none bg-[#22b1e3] font-semibold text-[#00164b] hover:bg-[#4cc4ec]",children:a("plan.upgradeCta",{plan:v.plano.displayName})}),e.jsx(D,{ghost:!0,onClick:()=>o(!p),className:"border-white/35 text-white",children:a("plan.seeAllPlans")})]})]}),S&&z>0&&e.jsxs("div",{className:I,children:[e.jsx("div",{className:k,children:a("plan.annualTitle",{percent:z})}),e.jsx("div",{className:n("text-[13px] leading-relaxed",c?"text-gray-400":"text-gray-500"),children:a("plan.annualDesc",{plan:y.displayName,monthly:A(S.price/12),total:A(S.price)})}),e.jsx("div",{children:e.jsx(D,{type:"primary",onClick:()=>O(S.id),children:a("plan.annualCta")})})]}),!v&&e.jsx("div",{className:"flex justify-center md:justify-start",children:e.jsx(D,{onClick:()=>o(!p),children:a("plan.showPlans")})})]})]}),e.jsx(be,{title:a("plan.creditsModal"),open:l,footer:null,width:560,onCancel:()=>h(!1),children:e.jsx(he,{uso:M})})]})}function qe(){const{theme:r}=U(),{t:s}=C(),t=[{key:"1",label:e.jsx("span",{className:"text-lg font-medium",children:s("plan.faq.q1.title")}),children:e.jsx("p",{className:"text-md",children:s("plan.faq.q1.description")})},{key:"2",label:e.jsx("span",{className:"text-lg font-medium",children:s("plan.faq.q2.title")}),children:e.jsx("p",{className:"text-md",children:s("plan.faq.q2.description")})},{key:"3",label:e.jsx("span",{className:"text-lg font-medium",children:s("plan.faq.q3.title")}),children:e.jsx("p",{className:"text-md",children:s("plan.faq.q3.description")})},{key:"4",label:e.jsx("span",{className:"text-lg font-medium",children:s("plan.faq.q4.title")}),children:e.jsx("p",{className:"text-md",children:s("plan.faq.q4.description")})}];return e.jsxs("div",{className:"pb-14",children:[e.jsx("div",{className:n("mb-5 mt-10 text-center text-3xl font-semibold",{"text-gray-300":B(r),"text-gray-800":se(r)}),children:s("plan.faq.title")}),e.jsx(je,{className:"mx-10",items:t})]})}function Ae(){const{t:r}=C();return e.jsx(ye,{theme:{components:{Spin:{colorPrimary:"#fff"}}},children:e.jsxs("div",{className:"mx-5 mb-10 rounded-lg bg-green-500 p-4 text-center",children:[e.jsx(H,{size:"large"}),e.jsx("div",{className:"mt-3 text-2xl font-bold text-white",children:r("plan.processPay")}),e.jsx("div",{className:"text-lg text-white opacity-80",children:r("plan.processPayDesc")})]})})}function Ye(){const[r,s]=g.useState(!0),[t,o]=g.useState(!1),[p,d]=g.useState(!0),[l,h]=g.useState([]),[i,c]=g.useState({}),[b,u]=g.useState(!1),[a,L]=g.useState(0),{success:F}=ie(),{preferences:O}=ce(),W=O.homeMode||"transcribed",A=W==="reports"?"/reports":W==="templates"?"/templates":"/transcribed",{t:q}=C(),w=JSON.parse(G.get(J.auth)||"{}"),f=w.token&&typeof w.token=="string"?oe(w.token):null,M=f!=null&&f.enterprise&&f.enterprise.id?f.enterprise.id:1,E=f!=null&&f.enterprise&&f.enterprise.name?f.enterprise.name:"LEO",j=g.useCallback(async()=>{try{return await T.get(`${N.payment.subscription}`)}catch(x){console.log(x)}},[]),y=g.useCallback(x=>{const m=l.find(k=>k.id===x.price.id);return m&&(x.name=m.name,x.aiCredits=m.aiCredits,x.interval=m.interval),x},[l]),v=async()=>{const x=await te.post(`${N.baseURL}${N.auth.refreshToken}`,{refresh_token:w.refresh_token});G.set(J.auth,x.data)};g.useEffect(()=>{(async()=>{const m=await T.get(`${N.payment.prices}`);m&&(h(m.data.data),d(!1))})()},[]),g.useEffect(()=>{p||(async()=>{const m=await j();m&&m.data&&m.data.id&&c(y(m.data)),s(!1)})()},[y,j,p]),g.useEffect(()=>{if(F&&!r){u(!0);const x=setInterval(()=>{(async()=>{const k=await j();k&&k.data&&k.data.id&&(c(y(k.data)),u(!1),clearInterval(x),v()),L(R=>R+1)})()},1500);return a>24&&(u(!1),clearInterval(x)),()=>clearInterval(x)}},[y,j,r,F]);const{token:{colorBgContainer:S,colorTextBase:z}}=ve.useToken(),I=window.location.href.indexOf("philips")!==-1||window.location.href.indexOf("medapp.")!==-1;return e.jsxs("div",{style:{background:S,color:z,height:I?"calc(100vh - 50px)":"calc(100vh - 64px)",maxHeight:I?"calc(100vh - 50px)":"calc(100vh - 64px)"},className:"select-none px-4 pb-10 pt-4",children:[e.jsx(Ne,{className:"pb-5",items:[{href:A,title:e.jsx(we,{})},{title:q("profile.myAccount")},{title:q("plan.signature")}]}),e.jsxs(H,{spinning:r&&!b,size:"large",children:[b&&e.jsx(Ae,{}),M!==1&&e.jsxs("div",{className:"text-2xl font-semibold",children:[q("plan.signature")," - ",E]}),!b&&!r&&M===1&&e.jsxs(e.Fragment,{children:[!i.id&&e.jsxs(e.Fragment,{children:[e.jsx(ke,{}),e.jsx(ee,{plans:l,hasSubscription:!!i.id})]}),i&&i.id&&e.jsxs(e.Fragment,{children:[e.jsx(Le,{setActivePlan:c,plan:i,setShowPlans:o,showPlans:t,plans:l}),t&&e.jsx(ee,{plans:l,hasSubscription:!!i.id})]}),e.jsx(qe,{})]})]})]})}export{Ye as default};

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.