1import{B as o,b$ as w,c0 as S,c1 as $,c2 as z,c3 as I,c4 as W,c5 as E,c6 as H,c7 as O,c8 as U,c9 as T,ca as V,cb as F,cc as K,cd as D,ce as J,cf as R,cg as q,ch as G,ci as Q,cj as X,a as Y,b as l,u as Z,ao as ee,an as se,J as _,j as e,ck as ae,cl as re,C as N,K as te,F as ne}from"./index-h7ZDzd_b.js";import{g as ie}from"./theme-packages-DxMNdyCJ.js";import{m as L}from"./DashboardIcons-DRYmqubB.js";import{l as P,P as ce}from"./DashboardShared-BEUxu-ff.js";function oe(s,a){const c=Math.max(0,s-a),n=le(),t=[{icon:"pages",title:`تا ${o(s)} ÙÛÙÚ© ÙØ§Ø´Ùاس`,description:`${o(c)} ÙÛÙÚ© Ø¨ÛØ´ØªØ± از Ù¾Ù٠راÛگا٠(${o(a)}) â Ø¨Ø±Ø§Û Ù
ÙØ¶ÙعâÙØ§Û Ù
ختÙÙ.`,badge:`+${o(c)}`},{icon:"badge",title:"ÙØ´Ø§Ù تأÛÛØ¯",description:"Ú©ÙØ§Ø± ÙØ§Ù
ت در Ø¯Ø§Ø´Ø¨ÙØ±Ø¯ Ù ØµÙØÙ Ø¹Ù
ÙÙ
Û ÙÙ
Ø§ÛØ´ داد٠Ù
ÛâØ´ÙØ¯."},{icon:"ads",title:"بدÙ٠تبÙÛØº در ØµÙØÙ ÙØ§Ø´Ùاس",description:"رÙÛ ÙÛÙÚ©âÙØ§Û ØØ³Ø§Ø¨ ÙÛÚ٠تبÙÛØº ÙØ´Ø§Ù داد٠ÙÙ
ÛâØ´ÙØ¯. اگر Ø¨Ø®ÙØ§ÙÛ Ø§Ø² ØªÙØ¸ÛÙ
ات ØµÙØÙ Ù
ÛâØªÙØ§ÙÛ ÙØ¹Ø§ÙØ´ Ú©ÙÛ."},{icon:"video",title:"Ø¯Ø±ÛØ§Ùت ÙÛØ¯Û٠در Ù¾ÛØ§Ù
âÙØ§",description:"در ØªÙØ¸ÛÙ
ات ØµÙØÙØ Ø¯Ø±ÛØ§Ùت ÙÛØ¯Û٠از Ø¨Ø§Ø²Ø¯ÛØ¯Ú©ÙÙØ¯Ù را ÙØ¹Ø§Ù Ú©Ù â MP4 Ù WebM تا Û²Ûµ Ù
Ú¯."}];n>0&&t.push({icon:"package",title:`${o(n)} Ù¾Ú©ÛØ¬ Ø¢Ù
اد٠ÙÛÚÙ`,description:"ØªØ±Ú©ÛØ¨ کاÙ
٠رÙÚ¯Ø ÙØ¯Ø±Ø Ø¨ÙØ± ٠اÙÛÙ
ÛØ´Ù â ÛÚ©âÚ©ÙÛÚ© در ÙÛØ±Ø§ÛØ´ Ø¸Ø§ÙØ±.",badge:o(n)});for(const u of me()){const m=de(u);m&&t.push(m)}return t.push({icon:"bg",title:"آپÙÙØ¯ Ù¾Ø³âØ²Ù
ÛÙ٠اختصاصÛ",description:"تصÙÛØ± Ø¯ÙØ®ÙØ§Ù Ø®ÙØ¯Øª را Ø¨Ø±Ø§Û Ù¾Ø³âØ²Ù
ÛÙÙ ØµÙØÙ ÙØ§Ø´Ùاس Ø¨Ø§Ø±Ú¯Ø°Ø§Ø±Û Ù Ø°Ø®ÛØ±Ù Ú©Ù."}),t.push({icon:"brand",title:"Ù
Ø®ÙÛâکرد٠ÙÙØªØ± داÛÚ¯Ù",description:"ØµÙØÙ Ø¹Ù
ÙÙ
Û Ø¨Ø¯ÙÙ ÙÛÙÚ© Â«ÙØ¯Ø±Øª Ú¯Ø±ÙØªÙ از داÛÚ¯Ù» â ØªØ¬Ø±Ø¨Ù Ø¨Ø±ÙØ¯ شخصÛâØªØ±."}),t.push({icon:"photo",title:"عکس Ù¾ÛØ§Ù
بدÙÙ ÙØ§ØªØ±Ù
ارک",description:"رÙÛ Ø¹Ú©Ø³âÙØ§ÛÛ Ú©Ù Ø¨Ø§Ø²Ø¯ÛØ¯Ú©ÙÙØ¯Ù Ø¨Ù ØµÙØÙâØ§Øª Ù
ÛâÙØ±Ø³ØªØ¯ ÙÙÚ¯ÙÛ Ø¯Ø§ÛÚ¯Ù ÙÙ
ÛâØ®ÙØ±Ø¯."}),t.push({icon:"pages",title:"سÙÙ Û²Û°Û°Û° کاراکتر Ø¨Ø±Ø§Û Ù¾ÛØ§Ù
",description:"در ØªÙØ¸ÛÙ
ات ÙÛÙÚ©Ø ØØ¯Ø§Ú©Ø«Ø± Ù
ØªÙ Ù¾ÛØ§Ù
ÙØ§Ø´Ùاس را تا Û²Û°Û°Û° کاراکتر Ø§ÙØ²Ø§ÛØ´ بدÙ."}),t}function le(){return Object.values(ie()).filter(s=>s.premium).length}function me(){return[{category:"theme",icon:"theme"},{category:"pattern",icon:"bg"},{category:"background_image",icon:"bg"},{category:"layout",icon:"layout"},{category:"header",icon:"header"},{category:"banner",icon:"banner"},{category:"button",icon:"button"},{category:"card",icon:"card"},{category:"avatar",icon:"avatar"},{category:"send_animation",icon:"spark",suffix:"بعد از Ø§Ø±Ø³Ø§Ù Ù¾ÛØ§Ù
"}]}function ue(s){switch(s){case"theme":return U();case"pattern":return O();case"background_image":return H();case"button":return E();case"card":return W();case"layout":return I();case"avatar":return z();case"header":return $();case"banner":return S();case"send_animation":return w();default:return[]}}function de(s){var m;const a=ue(s.category);if(a.length===0)return null;const c=a.length,t=(m={theme:"ÙØ§Ùب رÙÚ¯",pattern:"اÙÚ¯ÙÛ Ù¾Ø³âØ²Ù
ÛÙÙ",background_image:"تصÙÛØ± Ù¾Ø³âØ²Ù
ÛÙÙ",button:"شک٠دکÙ
Ù",card:"استاÛ٠کارت",layout:"ÚÛØ¯Ù
Ø§Ù ØµÙØÙ",avatar:"شک٠پرÙÙØ§ÛÙ",header:"ÚÛØ¯Ù
Ø§Ù ÙØ¯Ø±",banner:"Ø´Ú©Ù Ø¨ÙØ±",send_animation:"اÙÛÙ
ÛØ´Ù ارساÙ"}[s.category])!=null?m:s.category;let u=pe(s.category,a);return s.suffix&&(u+=` â ${s.suffix}`),{icon:s.icon,title:`${o(c)} ${t} ÙÛÚÙ`,description:u,badge:o(c)}}function pe(s,a,c=6){const n=a.map(t=>T(s,t));return n.length<=c?n.join("Ø "):`${n.slice(0,c).join("Ø ")} Ù Ø¨ÛØ´ØªØ±`}X().length,Q().length,G().length,q().length,R().length,J().length,D().length,K().length,F().length,V().length;function he({name:s}){const a="size-5";switch(s){case"badge":return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 2l2.4 4.9 5.4.8-3.9 3.8.9 5.4L12 14.8 7.2 17l.9-5.4L4.2 7.7l5.4-.8L12 2z"})});case"pages":return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})});case"palette":case"theme":return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"})});case"video":return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})});case"brand":case"ads":return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})});case"photo":return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21z"})});default:return e.jsx(L,{className:a,"aria-hidden":"true"})}}function be(){var y;const{refresh:s}=Y(),[a,c]=l.useState({}),[n,t]=l.useState(null),[u,m]=l.useState(!0),[j,b]=l.useState(""),[v,f]=l.useState(""),[B]=Z(),i=B.get("payment"),k=l.useMemo(()=>Object.values(a),[a]),g=ee(),x=se(),M=l.useMemo(()=>oe(g,x),[g,x]);l.useEffect(()=>{Promise.all([_.subscriptionPlans().then(r=>{r.success&&"plans"in r&&r.plans?c(r.plans):f(r.message)}),P(t)]).finally(()=>m(!1))},[]),l.useEffect(()=>{i==="success"&&(s(),P(t))},[i,s]);async function A(r){if(!a[r])return;b(r),f("");const h=await _.initiateSubscription(r);if(b(""),!h.success||!("redirectUrl"in h)||!h.redirectUrl){f(h.message);return}window.location.href=h.redirectUrl}if(u)return e.jsx(ae,{});const d=!!(n!=null&&n.isPremium),p=(y=k.find(r=>re(r)))!=null?y:k[0],C=!!(p&&j===p.key);return e.jsx(ce,{title:"ØØ³Ø§Ø¨ ÙÛÚÙ",subtitle:"ÙÛÙÚ© Ø¨ÛØ´ØªØ±Ø بدÙ٠تبÙÛØºØ Ø¸Ø§ÙØ± Ø¨ÙØªØ± ٠اÙ
Ú©Ø§ÙØ§Øª اضاÙÙ",children:e.jsxs("div",{className:"premium-page",children:[i?e.jsxs("div",{className:N("premium-status-banner",i==="success"&&"premium-status-banner--success",i==="failed"&&"premium-status-banner--error"),role:"status",children:[e.jsx("span",{className:"text-lg","aria-hidden":"true",children:i==="success"?"â":i==="failed"?"!":"â¦"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-text-primary",children:i==="success"?"پرداخت با Ù
ÙÙÙÛØª ثبت شد":i==="failed"?"پرداخت ÙØ§Ù
ÙÙÙ Ø¨ÙØ¯":"ÙØ¶Ø¹Ûت پرداخت"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:i==="success"?"ÚÙØ¯ ÙØØ¸Ù ØµØ¨Ø± ک٠تا اشتراک ÙÛÚÙ ÙØ¹Ø§Ù Ø´ÙØ¯."
1:i==="failed"?"Ù
ÛâØªÙØ§ÙÛ Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛ.":"ÙØ¶Ø¹Ûت پرداخت در دسترس ÙÛØ³Øª."})]})]}):null,e.jsx("section",{"aria-labelledby":"premium-plans-heading",children:e.jsxs("article",{className:N("premium-offer",d&&"premium-offer--active"),children:[e.jsxs("div",{className:"premium-offer__main",children:[e.jsxs("p",{className:"premium-offer__eyebrow",children:[e.jsx("span",{className:"premium-offer__dot","aria-hidden":"true"}),d?"اشتراک ÙØ¹Ø§Ù":"ØØ³Ø§Ø¨ ÙÛÚÙ"]}),e.jsx("h2",{id:"premium-plans-heading",className:"premium-offer__title",children:"اشتراک دائÙ
Û"}),e.jsx("p",{className:"premium-offer__lead",children:d?"ØØ³Ø§Ø¨ ÙÛÚÙâØ§Øª ÙØ¹Ø§ÙÙ. ÙÛÙÚ© Ø¨ÛØ´ØªØ±Ø بدÙ٠تبÙÛØº Ù Ø¸Ø§ÙØ± Ø¨ÙØªØ± ÙÙ
ÛÙ Ø§ÙØ§Ù در دسترسÙ.":"ÛÚ© اشتراک Ø¨Ø±Ø§Û ÙÙ
٠اÙ
Ú©Ø§ÙØ§Øª ÙÛÚÙ. پرداخت اÙ
٠از طرÛ٠زرÛÙâÙ¾Ø§Ù Ø§ÙØ¬Ø§Ù
Ù
ÛâØ´ÙØ¯."}),e.jsxs("ul",{className:"premium-offer__perks",children:[e.jsxs("li",{children:["تا ",o(g)," ÙÛÙÚ© ÙØ§Ø´Ùاس"]}),e.jsx("li",{children:"بدÙ٠تبÙÛØº در ØµÙØÙ"}),e.jsx("li",{children:"ÙØ´Ø§Ù تأÛÛØ¯"}),e.jsx("li",{children:"Ø¸Ø§ÙØ± ٠رساÙÙ Ø¨ÛØ´ØªØ±"})]}),d?e.jsx("p",{className:"premium-offer__note",children:"ÙØ± ÙÙØª تÙ
اÙ
شد Ù
ÛâØªÙÙÛ Ø¯ÙØ¨Ø§Ø±Ù ÙÙ
Û٠اشتراک را بخرÛ."}):null]}),d?e.jsxs("div",{className:"premium-offer__seal","aria-hidden":"true",children:[e.jsx(L,{className:"size-7"}),e.jsx("span",{children:"ÙØ¹Ø§Ù"})]}):p?e.jsxs("div",{className:"premium-offer__aside",children:[e.jsxs("p",{className:"premium-offer__price",children:[e.jsx("span",{children:te(p.price).replace(/\s*تÙÙ
اÙ$/,"")}),e.jsx("small",{children:"تÙÙ
اÙ"})]}),e.jsx(ne,{className:"premium-offer__cta",size:"lg",disabled:!!j,onClick:()=>void A(p.key),children:C?"در ØØ§Ù Ø§ÙØªÙاÙ...":"Ø®Ø±ÛØ¯ اشتراک دائÙ
Û"}),e.jsx("p",{className:"premium-offer__trust",children:"پرداخت اÙ
٠با زرÛÙâپاÙ"})]}):null]})}),e.jsxs("section",{className:"premium-benefits-panel","aria-labelledby":"premium-benefits-heading",children:[e.jsxs("div",{className:"premium-section-head",children:[e.jsx("h2",{id:"premium-benefits-heading",className:"premium-section-head__title",children:"ÙÙ
٠اÙ
Ú©Ø§ÙØ§Øª ÙÛÚÙ"}),e.jsxs("p",{className:"premium-section-head__desc",children:["Ù
ÙØ§Ûس٠با Ù¾Ù٠راÛگا٠(",o(x)," ÙÛÙÚ©) â ÙÙ
ÙâÚÛØ² در ÛÚ© ÙگاÙ"]})]}),e.jsx("div",{className:"premium-benefits-grid",children:M.map(r=>e.jsxs("article",{className:"premium-benefit",children:[e.jsx("div",{className:"premium-benefit__icon",children:e.jsx(he,{name:r.icon})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"premium-benefit__title",children:r.title}),e.jsx("p",{className:"premium-benefit__desc",children:r.description})]})]},r.title))})]}),v?e.jsx("p",{className:"rounded-xl border border-error/20 bg-error/5 px-4 py-3 text-sm text-error",role:"alert",children:v}):null]})})}export{be as UpgradePremium};
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.