1import{u as F,Z as U,h as m}from"./CZ1wxRoR.js";import{P as _}from"./DNwqfwoa.js";const G=new Set(["XOF","XAF","NGN","GHS","KES","TZS","UGX","RWF","MGA"]),b=new Set(["GHS","NGN","KES","TZS","UGX","USD","EUR","GBP","CAD","ZAR","EGP","ETB"]);function C(c){return G.has(c.toUpperCase())?0:2}function N(c,S,d,v){const f=d.toUpperCase(),e=C(f),a=e===0?Math.round(c):c,y=v==="fr"?"fr-FR":"en-US",P=new Intl.NumberFormat(y,{minimumFractionDigits:e,maximumFractionDigits:e}).format(a),r=S.trim();return b.has(f)||r==="âµ"||r==="â¦"||r.startsWith("$")?`${r}${P}`:`${P} ${r}`}function I(){const{locale:c}=F(),{result:S,loading:d,error:v,refetch:f}=U(_,null,{enabled:!0}),e=m(()=>{var s,o;return[...((o=(s=S.value)==null?void 0:s.plans)==null?void 0:o.plans)??[]].sort((t,u)=>t.order-u.order)}),a=m(()=>e.value.filter(n=>n.is_active)),y=m(()=>a.value.filter(n=>!n.is_lifetime)),P=m(()=>e.value.filter(n=>!n.is_lifetime)),r=m(()=>a.value.filter(n=>n.is_lifetime)),E=(n,s,o)=>{var R,h;const t=e.value.find(l=>l.slug===n);if(!t)return null;const i=((R=t.prices)==null?void 0:R.find(l=>l.currency===s))??((h=t.prices)==null?void 0:h.find(l=>l.currency==="XOF"));if(!i)return null;const p=i[o];return{amount:p,formatted:N(p,i.symbol,i.currency,c.value),symbol:i.symbol}};return{plans:e,activePlans:a,subscriptionPlans:y,visibleSubscriptionPlans:P,lifetimePlans:r,isLoading:d,error:v,refetch:f,getPriceForPlan:E,getSavingsPercent:(n,s,o)=>{const t=E(n,s,"monthly"),u=E(n,s,o);if(!t||!u||t.amount===0)return 0;const i=o==="semi_annual"?6:12,g=t.amount*i,p=(g-u.amount)/g*100;return Math.round(p)}}}export{N as f,I as u};
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.