← Back
Editing: feature-Pay.js
;(() => { const stylesheetSelector = "link[rel=stylesheet]" const loaded = new Set(Array.from(document.querySelectorAll(stylesheetSelector)).map(link => link.href)) const version = "1795169270504" const findLoadedLink = href => Array.from(document.querySelectorAll(stylesheetSelector)).find(link => link.href === href) const removeAfterLoad = (freshLink, staleLink) => { const remove = () => staleLink.remove() if (freshLink.sheet) { requestAnimationFrame(remove) return } freshLink.addEventListener("load", remove, { once: true }) } for (const link of Array.from(document.querySelectorAll(stylesheetSelector))) { const url = new URL(link.href, location.href) if (url.origin !== location.origin || url.searchParams.get("v") === version) continue url.searchParams.set("v", version) if (loaded.has(url.href)) { const freshLink = findLoadedLink(url.href) if (freshLink && freshLink !== link) removeAfterLoad(freshLink, link) continue } const freshLink = document.createElement("link") freshLink.rel = "stylesheet" freshLink.href = url.href link.parentNode?.insertBefore(freshLink, link.nextSibling) loaded.add(url.href) removeAfterLoad(freshLink, link) } })(); import{r as e}from"./rolldown-runtime.js?v=1795169270504";import{$n as t,$r as n,An as r,Ar as i,Bn as a,Br as o,Cn as s,Dr as c,En as l,Ft as u,Gn as d,Hn as f,Jn as p,Ln as m,Mn as h,Mr as g,Qn as _,Rn as v,Sn as y,Tn as b,Yn as x,Zn as S,_n as C,dr as w,er as T,fr as E,gr as D,ii as O,jn as k,kn as A,kr as j,ln as M,lr as N,o as P,or as F,pn as I,pr as L,rr as ee,sr as R,ur as te,wn as z,wr as B,yr as V,zn as ne,zt as re}from"./vendor-utils.js?v=1795169270504";import{f as ie,l as H,p as U}from"./vendor-vue.js?v=1795169270504";import{M as ae,Nt as oe,Pt as se,_t as W,d as ce,ft as le,it as ue,kt as G,mt as de,nt as fe,p as pe,pt as me,v as he}from"./vendor-naive.js?v=1795169270504";import{Af as ge,Cf as _e,Cs as ve,Gf as K,Hf as ye,Jf as q,Kf as be,Op as J,Sp as xe,Tp as Y,Vf as Se,_f as Ce,af as we,bf as Te,c as Ee,df as De,ff as Oe,hf as ke,i as Ae,if as je,jc as Me,jf as Ne,mf as Pe,op as Fe,pf as Ie,qf as Le,s as Re,sf as ze,uf as Be,vf as Ve,vn as He,yf as Ue}from"./app.js?v=1795169270504";import{ba as We}from"./app-components.js?v=1795169270504";import{Fd as Ge,Id as Ke,Ld as qe,Rd as Je}from"./app-shared.js?v=1795169270504";import{a as Ye,i as Xe}from"./vendor-pdf.js?v=1795169270504";import{f as Ze}from"./domain-config.js?v=1795169270504";import{n as Qe}from"./vendor-pay.js?v=1795169270504";m(),D();function $e(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!ne(e)}var et=h({__name:`time`,props:{endtime:{default:0}},setup(e){let t=e,n=B(0),i=()=>{n.value=t.endtime*1e3-Math.floor(Date.now())},a=e=>e.toString().padStart(2,`0`),o=({hours:e,minutes:t,seconds:n})=>{let i,o,s,{t:c}=H();return r(`div`,{class:`flex justify-center items-center text-font2 text-16px`},[r(`span`,null,[c(`Component.Coupon.index_10`)]),r(G,{type:`error`,size:`small`,class:`h-30px mx-10px px-4px text-18px font-bold`,bordered:!1},$e(i=a(e))?i:{default:()=>[i]}),r(`span`,null,[A(`:`)]),r(G,{type:`error`,size:`small`,class:`h-30px mx-10px px-4px text-18px font-bold`,bordered:!1},$e(o=a(t))?o:{default:()=>[o]}),r(`span`,null,[A(`:`)]),r(G,{type:`error`,size:`small`,class:`h-30px mx-10px px-4px text-18px font-bold`,bordered:!1},$e(s=a(n))?s:{default:()=>[s]})])};return i(),(e,t)=>{let r=ue;return S(),z(r,{duration:g(n),render:o},null,8,[`duration`])}}});m(),o(),D();var tt={class:`coupon-box`},nt={class:`pt-24px bg-modal rounded-10px`},rt={class:`px-36px`},it={class:`text-20px text-pro`},at={class:`coupon-list`},ot={class:`decoration`},st={class:`coupon-amount`},ct={class:`coupon-price`},lt={class:`text-34px`},ut={class:`coupon-info`},dt={class:`coupon-name`},ft={class:`coupon-time`},pt={class:`mr-0.25em text-error text-20px`},mt={class:`pt-14px`},ht={class:`mt-24px text-center`},gt={key:0,class:`coupon-number`},_t={class:`px-36px pb-16px bg-modal rounded-10px`},vt={class:`w-200px mt-10px mx-auto`},yt=h({__name:`index`,props:{obtainId:{default:0},endTime:{default:0},couponList:{default:()=>[]},couponQuota:{default:()=>({quota:0,total:0,received:0})}},emits:[`close`,`receive`],setup(e,{emit:n}){let{t:a}=H(),o=e,{couponList:c,couponQuota:u}=i(o),d=y(()=>u.value.total-u.value.quota),f=n,p=ve(),m=e=>Math.floor(e/86400),h=B(null),_=[{label:a(`Component.Coupon.index_6`),value:`today`},{label:a(`Component.Coupon.index_7`),value:`week`},{label:a(`Component.Coupon.index_8`),value:`forver`}],v=async()=>{await _e({obtain_id:`${o.obtainId}`}),p.getReceiveCoupon(),f(`close`),f(`receive`)},x=(e,t)=>{Se({title:a(`Public.Confirm.Title`),content:`${a(`Component.Coupon.index_9`,[t.label])}`,onConfirm:async()=>{let t=0;switch(e){case`today`:t=new Date(new Date().toLocaleDateString()).getTime()+864e5-1;break;case`week`:t=new Date(new Date().toLocaleDateString()).getTime()+6048e5-1;break;case`forver`:t=-100}t=Math.floor(t>0?t/1e3:t),await Te({limit_time:t}),p.getReceiveCoupon(),f(`close`)}})};return(n,i)=>{let a=fe;return S(),l(`div`,tt,[s(`div`,nt,[s(`div`,rt,[s(`div`,it,O(n.$t(`Component.Coupon.index_1`)),1),s(`div`,at,[(S(!0),l(C,null,t(g(c),(e,t)=>(S(),l(`div`,{key:`${t}`,class:`coupon-item`},[s(`div`,ot,O(n.$t(`Component.Coupon.index_2`)),1),s(`div`,st,[s(`div`,ct,[i[0]||(i[0]=s(`span`,{class:`text-20px mr-4px`},`$`,-1)),s(`span`,lt,O(e.deduct_amount),1)])]),s(`div`,ut,[s(`div`,dt,O(e.title),1),s(`div`,ft,[s(`span`,null,O(n.$t(`Component.Coupon.index_3`)),1),s(`span`,pt,O(m(e.expires)),1),s(`span`,null,O(n.$t(`Public.Unit.Day`,m(e.expires))),1)])])]))),128))])])]),s(`div`,mt,[s(`div`,ht,[r(et,{endtime:e.endTime},null,8,[`endtime`])]),g(u).total>0?(S(),l(`div`,gt,` ⏳Remaining: `+O(g(d))+` / `+O(g(u).total)+` (🎁 `+O(g(d))+` peoples have get it) `,1)):b(``,!0),s(`div`,_t,[s(`div`,{class:`coupon-btn`,onClick:v},O(n.$t(`Component.Coupon.index_5`))+` (Last `+O(g(u).quota)+` coupons) `,1),s(`div`,vt,[r(a,{value:g(h),options:_,"consistent-menu-width":!1,placeholder:n.$t(`Component.Coupon.index_13`),"onUpdate:value":x},null,8,[`value`,`placeholder`])])])])])}}}),bt=e({default:()=>xt}),xt=q(yt,[[`__scopeId`,`data-v-5b993027`]]);D(),m();var X=ie(`PayStore`,()=>{let e=B(``),t=B(!0),n=B(``),r=B(27),i=B(``),a=B([]),o=B(!1),s=B(!0),c=B(0),l=B([]),d=B(0),f=y(()=>l.value.length>0?l.value[c.value].children:[]),p=y(()=>f.value[d.value]),m=B(!0),h={order_no:``,stripe_publishable_key:``,order_id:0,paypal_client_id:``,price:``,market_price:``,cycle:1,cycle_unit:`month`,couponPrice:``},g=B(u(h)),_=B(`stripe`),v=B(!1),b=B(0),x=B([]),S=B([]),C=B({status:0,end_time:0,obtain_id:0,total:0,length:0,coupons:[],package_quota:{total:0,quota:0}}),w=B(``),T=B([]),E=B([]),D=()=>{e.value=``,t.value=!0,n.value=``,r.value=27,i.value=``,a.value=[],o.value=!1,s.value=!0,O(),k()},O=()=>{c.value=0,l.value=[],d.value=0,m.value=!0,g.value=u(h),_.value=`stripe`},k=()=>{w.value=`voucher`,T.value=[],E.value=[]};return{currentMenu:e,isFirstCutMenu:t,pid:n,source:r,username:i,plugins:a,openSsl:o,isFirstFetchSsl:s,cycleIndex:c,numberIndex:d,cycleList:l,numberList:f,currentProduct:p,shouldFetchOrder:m,orderInfo:g,channelMenu:_,isUseCoupon:v,couponId:b,couponList:x,couponAllList:S,receiveCoupon:C,voucherMenu:w,voucherAllList:T,authorizationAllList:E,reset:D,resetProduct:O,resetVoucher:k}}),St=()=>{let e=X(),{username:t,source:n,pid:r,currentMenu:i,plugins:a}=U(e);return{setUsername:e=>{t.value=e},setSource:e=>{n.value=e},setPid:e=>{r.value=e},setCurrentMenu:e=>{i.value=e},setPlugins:e=>{e&&(a.value=[e])}}};m();var Ct=Symbol(`paymentSuccess`);function wt(){let e=v(Ct,void 0);return async t=>{(t==null?void 0:t.refreshAuthorization)!==!1&&await Me({force:1}),await(e==null?void 0:e()),xe(2e3)}}m(),D(),o();var Tt={class:`feature-box relative w-full h-full py-40px pl-22px pr-8px rounded-tl-10px rounded-bl-10px`},Et={class:`mb-38px`},Dt={class:`flex mb-10px text-20px feature-title`},Ot={key:0,class:`glyphicon glyphicon-vip`},kt={key:1,class:`ml-8px`},At={key:2},jt={key:0,class:`min-h-34px feature-desc`},Mt={key:0},Nt={class:`mb-16px text-15px feature-text`},Pt={class:`text-13px`},Ft={class:`flex-1 ml-8px overflow-hidden text-font2 feature-desc`},It={key:1,class:`mt-36px text-default`},Lt={class:`mb-16px text-15px`},Rt=[`innerHTML`],zt={key:2,class:`pay-info-bg`},Bt={key:3,class:`contrast`,href:`https://aapanel.com/new/pricing.html`,target:`_blank`,rel:`noreferrer noopener`},Vt={key:4,class:`pay-info-recom`},Ht={class:`buy`},Ut={class:`text`},Wt=q(h({__name:`ProductFeatures`,setup(e){let n=X(),{currentMenu:r,plugins:i}=U(n),a=B([]),o=y(()=>{var e;return be((e=i.value[0])==null?void 0:e.ps)}),c=async()=>{let{message:e}=await Pe({product_id:`100000058`});J(e)&&(a.value=Y(e.res)?e.res:[])};return w(()=>{(r.value===`pro`||r.value===`voucher`)&&c()}),(e,n)=>(S(),l(`div`,Tt,[s(`div`,Et,[s(`div`,Dt,[g(r)===`pro`||g(r)===`voucher`?(S(),l(`span`,Ot)):b(``,!0),g(r)===`pro`||g(r)===`voucher`?(S(),l(`span`,kt,O(e.$t(`Component.Pay.index_1`)),1)):b(``,!0),g(r)===`plugin`&&g(i).length>0?(S(),l(`span`,At,O(g(i)[0].name),1)):b(``,!0)]),g(r)===`pro`||g(r)===`voucher`?(S(),l(`div`,jt,O(e.$t(`Component.Pay.index_2`)),1)):b(``,!0)]),g(r)===`pro`||g(r)===`voucher`?(S(),l(`div`,Mt,[s(`div`,Nt,O(e.$t(`Component.Pay.index_3`))+`:`,1),s(`div`,Pt,[(S(!0),l(C,null,t(g(a),e=>(S(),l(`div`,{key:e,class:`flex py-10px`},[n[0]||(n[0]=s(`span`,{class:`glyphicon glyphicon-ok feature-title`},null,-1)),s(`span`,Ft,O(e),1)]))),128))])])):b(``,!0),g(r)===`plugin`&&g(i).length>0?(S(),l(`div`,It,[s(`div`,Lt,O(g(i)[0].type===100?e.$t(`Mail.Overview.today_17`):e.$t(`Component.Pay.index_4`))+`: `,1),s(`div`,{class:`w-186px leading-22px text-13px whitespace-pre-line break-words`,innerHTML:g(o)},null,8,Rt)])):b(``,!0),g(r)===`pro`||g(r)===`voucher`?(S(),l(`div`,zt)):b(``,!0),g(r)===`pro`||g(r)===`voucher`?(S(),l(`a`,Bt,O(e.$t(`Component.Pay.index_5`)),1)):b(``,!0),g(r)===`plugin`&&g(i)[0].type!==100?(S(),l(`div`,Vt,[s(`div`,Ht,O(e.$t(`Component.Pay.index_6`)),1),s(`div`,Ut,[s(`span`,null,O(e.$t(`Component.Pay.index_7`)),1)])])):b(``,!0)]))}}),[[`__scopeId`,`data-v-cf840b36`]]);m();var Z=()=>{let e=X(),{pid:t,source:n,cycleIndex:r,cycleList:i,currentProduct:a,openSsl:o,isFirstFetchSsl:s,shouldFetchOrder:c,orderInfo:l,channelMenu:u,isUseCoupon:d,couponId:f,couponList:p,couponAllList:m,receiveCoupon:h}=U(e),g=y(()=>{let e=!1;switch(u.value){case`paypal`:e=a.value.paypal_first_subscription_price>0||a.value.paypal_subscription_price>0;break;case`stripe`:e=a.value.first_subscription_price>0||a.value.subscription_price>0}return e}),_=y(()=>{if(d.value&&!g.value){let e=p.value.find(e=>e.id===f.value);if(e)return e.deduct_amount}return 0}),v=y(()=>h.value.status!==1||h.value.end_time-Math.floor(Date.now()/1e3)<=0?!1:h.value.length>0),b=async()=>{let{message:e}=await Ie({product_id:t.value||`100000058`});i.value=Y(e)?e:[]},x=e=>{u.value=e},S=async()=>{if(!s.value)return;let{message:e}=await Be();s.value=!1,J(e)&&(o.value=e.result)},C=async()=>{let{message:e}=await Ue();m.value=Y(e)?e:[],w(),T()},w=()=>{if(m.value.length>0){let e=m.value[0];for(let t=0;t<i.value.length;t++){let n=e.charge_type===2?`999`:`${e.cycle}`;if(i.value[t].cycle===n&&i.value[t].cycle_unit===e.cycle_unit){r.value=t;break}}}},T=()=>{var e;p.value=[],(e=a.value.usable_coupons)==null||e.forEach(e=>{let n=m.value.find(n=>n.id===e&&`${n.product_id}`===t.value);n&&p.value.push(n)}),p.value.sort((e,t)=>Number(t.deduct_amount)-Number(e.deduct_amount)),p.value.length>0?(f.value=p.value[0].id,d.value=!0):(f.value=0,d.value=!1)},E=async()=>{let{message:e}=await Ce();J(e)&&(h.value.status=e.status,h.value.end_time=e.end_time,h.value.obtain_id=e.obtain_id,h.value.length=e.coupons.length,h.value.total=e.total,h.value.coupons=e.coupons,h.value.package_quota=e.package_quota)},D=()=>{c.value=!0},O=()=>({pid:t.value,cycle:a.value.cycle,cycle_unit:a.value.cycle_unit,charge_type:a.value.charge_type,num:a.value.num,source:n.value,...d.value&&f.value!==0?{coupon_id:f.value}:{}});return{subscribe:g,couponPrice:_,showCouponModal:v,getCycleList:b,getSslStatus:S,getOrderInfo:async()=>{if(!c.value)return;let e=O(),{message:t}=await ze(e);c.value=!1,J(t)&&(l.value.order_no=t.order_no,l.value.stripe_publishable_key=t.stripe_publishable_key,l.value.order_id=t.order_id,l.value.paypal_client_id=t.paypal_client_id,l.value.price=t.price,l.value.market_price=t.market_price,l.value.cycle=re(t,`transaction.cycle`,1),l.value.cycle_unit=re(t,`transaction.cycle_unit`,``))},setChannelMenu:x,getCouponList:C,setCouponList:T,getReceiveCoupon:E,resetOrder:D}},Gt=()=>{let e=X(),{pid:t,currentMenu:n,isFirstCutMenu:r,voucherMenu:i,voucherAllList:a,authorizationAllList:o}=U(e),s=async()=>{if(a.value.length>0)return;let{message:e}=await ke();a.value=Y(e)?e:[]},c=async()=>{if(o.value.length>0)return;let{message:e}=await Oe();o.value=Y(e)?e:[]};return{getVoucherList:s,getAuthorizationList:c,initCurrentMenu:async()=>{if(r.value){if(await c(),o.value.find(e=>e.product.id===We(t.value)))return r.value=!1,t.value=`0`,n.value=`voucher`,i.value=`authorization`,Promise.reject(!1);if(await s(),a.value.find(e=>e.product.id===We(t.value)))return r.value=!1,t.value=`0`,n.value=`voucher`,i.value=`voucher`,Promise.reject(!1)}}}};m(),M();var Kt={class:`h-full`},Q=q(h({__name:`ProductLoading`,props:{loading:{type:Boolean,default:!1}},setup(e){return(t,n)=>{let i=Le,a=he;return S(),z(a,{class:`h-full`,show:e.loading,rotate:!1},{description:E(()=>[...n[0]||(n[0]=[s(`div`,{class:`pt-8px text-14px leading-20px`},`Loading, please wait...`,-1)])]),icon:E(()=>[r(i,{class:`loading-icon`,name:`base-loading`})]),default:E(()=>[L(s(`div`,Kt,[T(t.$slots,`default`,{},void 0,!0)],512),[[I,!e.loading]])]),_:3},8,[`show`])}}}),[[`__scopeId`,`data-v-b8f5f34f`]]);m(),o();var qt={class:`product-section`},Jt={class:`section-title`},Yt={class:`section-body`},$=q(h({__name:`ProductSection`,props:{title:{type:String,default:``}},setup(e){return(t,n)=>(S(),l(`div`,qt,[s(`div`,Jt,O(e.title),1),s(`div`,Yt,[T(t.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-f226922f`]]);m(),o(),D(),M();var Xt=[`onClick`],Zt={class:`new-price`},Qt={class:`number`},$t={class:`time`},en={class:`old-price`},tn={key:0,class:`tips`},nn={class:`flex-center h-103px`},rn=q(h({__name:`CycleSelect`,props:a({options:{type:Array,default:()=>[]}},{value:{default:0},valueModifiers:{}}),emits:[`update:value`],setup(e){let i=e,a=R(e,`value`),{t:o}=H(),u=N(`cycleSelectRef`),m=c(!0),h,_=()=>{let e=u.value,t=e==null?void 0:e.querySelectorAll(`.n-carousel__slide`),n=t==null?void 0:t[0],r=t==null?void 0:t[t.length-1];if(!e||!n||!r){m.value=!1;return}let i=r.getBoundingClientRect().right-n.getBoundingClientRect().left;m.value=i>e.clientWidth+.5},v=async()=>{await f();let e=u.value;h==null||h.disconnect(),h=new ResizeObserver(_),e&&(h.observe(e),e.querySelectorAll(`.n-carousel__slide`).forEach(e=>{h==null||h.observe(e)})),_()};p(v),te(()=>i.options.length,v,{flush:`post`}),d(()=>h==null?void 0:h.disconnect());let y=e=>{let t=e.children[0],n=We(t.cycle);return n===999?o(`Component.Auth.index_6`):t.cycle_unit===`year`?o(`Component.Pay.index_14`,[n,o(`Public.Unit.Year`,n)]):o(`Component.Pay.index_15`,[n,o(`Public.Unit.Month`,n)])},x=e=>{a.value=e};return(i,o)=>(S(),l(C,null,[s(`div`,{ref_key:`cycleSelectRef`,ref:u,class:n([`cycle-select`,{"cycle-select--fit":!m.value}])},[L(r(g(me),{"slides-per-view":`auto`,effect:`slide`,"space-between":20,loop:!1,"show-dots":!1,draggable:!0,"show-arrow":!0},{default:E(()=>[(S(!0),l(C,null,t(e.options,(e,t)=>(S(),z(g(de),{key:`${e.cycle+e.cycle_unit}`,class:`pt-8px w-190px!`},{default:E(()=>[e.children.length>0?(S(),l(`div`,{key:0,class:n([`radio-item pro`,{active:a.value===t}]),onClick:e=>x(t)},[s(`div`,Zt,[s(`span`,Qt,[o[0]||(o[0]=s(`span`,{class:`symbol`},`$`,-1)),s(`span`,null,O(e.children[0].price.toFixed(2)),1)]),o[1]||(o[1]=s(`span`,{class:`ml-4px mr-2px`},`/`,-1)),s(`span`,$t,O(y(e)),1)]),s(`div`,en,O(i.$t(`Component.Pay.index_16`,[e.children[0].market_price])),1),t===0?(S(),l(`div`,tn,O(i.$t(`Component.Pay.index_10`)),1)):b(``,!0),o[2]||(o[2]=s(`div`,{class:`checked`},null,-1))],10,Xt)):b(``,!0)]),_:2},1024))),128))]),_:1},512),[[I,e.options.length>0]])],2),L(s(`div`,nn,[r(g(se))],512),[[I,e.options.length===0]])],64))}}),[[`__scopeId`,`data-v-f8436c70`]]);m(),o(),M();var an={class:`product-selector`},on=[`onClick`],sn={key:0,class:`discount`},cn={class:`flex-center`},ln=q(h({__name:`ProductSelect`,props:a({onChange:[Function,Array],options:{type:Array,default:()=>[]}},{value:{},valueModifiers:{}}),emits:[`update:value`],setup(e){let i=R(e,`value`),a=t=>{i.value=t.value,e.onChange&&oe(e.onChange,t.value)};return(o,c)=>{let u=se;return S(),l(C,null,[L(s(`div`,an,[(S(!0),l(C,null,t(e.options,e=>(S(),l(`div`,{key:e.value,class:n([`product-option`,{active:i.value===e.value}]),onClick:t=>a(e)},[A(O(e.label)+` `,1),e.discount&&e.discount<100?(S(),l(`div`,sn,O(o.$t(`Component.Pay.index_13`,[`${e.discount}%`])),1)):b(``,!0)],10,on))),128))],512),[[I,e.options.length>0]]),L(s(`div`,cn,[r(u,{size:`small`})],512),[[I,e.options.length===0]])],64)}}}),[[`__scopeId`,`data-v-a92aa359`]]);m(),D();var un={class:`ml-16px`};function dn(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!ne(e)}var fn=h({__name:`time`,props:{endtime:{default:0}},emits:[`finish`],setup(e,{emit:t}){let n=e,i=t,{t:a}=H(),o=y(()=>{let e=Date.now(),t=n.endtime*1e3;return Math.max(0,t-e)}),s=e=>e.toString().padStart(2,`0`),c=({hours:e,minutes:t,seconds:n})=>{let i,o,c,l,u=Math.floor(e/24);return e%=24,r(`div`,{class:`text-desc`},[r(`span`,{class:`mr-6px`},[a(`Component.Pay.index_40`)]),u>0?r(G,{type:`error`,size:`small`,class:`px-4px`,bordered:!1},dn(i=s(u))?i:{default:()=>[i]}):``,u>0?r(`span`,{class:`mx-4px`},[A(`:`)]):``,r(G,{type:`error`,size:`small`,class:`px-4px`,bordered:!1},dn(o=s(e))?o:{default:()=>[o]}),r(`span`,{class:`mx-4px`},[A(`:`)]),r(G,{type:`error`,size:`small`,class:`px-4px`,bordered:!1},dn(c=s(t))?c:{default:()=>[c]}),r(`span`,{class:`mx-4px`},[A(`:`)]),r(G,{type:`error`,size:`small`,class:`px-4px`,bordered:!1},dn(l=s(n))?l:{default:()=>[l]})])},u=()=>{n.endtime>0&&i(`finish`)};return(e,t)=>{let n=ue;return S(),l(`div`,un,[r(n,{duration:g(o),render:c,"on-finish":u},null,8,[`duration`])])}}});m(),D(),o(),M();var pn=q(h({__name:`index`,props:a({data:{default:()=>[]}},{value:{},valueModifiers:{},checked:{type:Boolean},checkedModifiers:{}}),emits:a([`change`,`finish`],[`update:value`,`update:checked`]),setup(e,{emit:t}){let i=e,a=t,{t:o}=H(),{subscribe:c}=Z(),u=j(i,`data`),d=R(e,`value`),f=R(e,`checked`),p=y(()=>{if(d.value!==-1){let e=u.value.find(e=>e.id===d.value);if(e)return e.end_time}return 0}),m=e=>e.charge_type===2?o(`Component.Auth.index_6`).toLocaleLowerCase():e.cycle_unit===`year`?o(`Public.Unit.Year`).toLocaleLowerCase():o(`Public.Unit.Month`).toLocaleLowerCase(),h=y(()=>u.value.length>0?u.value.map(e=>{let t=m(e);return{label:o(`Component.Pay.index_19`,[e.deduct_amount,t]),value:e.id}}):[{label:o(`Component.Pay.index_20`),value:-1}]),_=y(()=>i.data.length===0||c.value),v=()=>{_.value||(f.value=!f.value,a(`change`))},b=e=>{e.stopPropagation()},x=e=>{f.value=e,a(`change`)},C=()=>{a(`change`)},w=()=>{a(`finish`)};return(t,i)=>{let a=le,o=fe;return S(),l(`div`,{class:n([`coupon-box mb-16px`,{active:f.value}]),onClick:v},[r(a,{checked:f.value,disabled:g(_),onClick:b,"onUpdate:checked":x},{default:E(()=>[s(`span`,null,O(t.$t(`Component.Pay.index_18`,[e.data.length])),1)]),_:1},8,[`checked`,`disabled`]),s(`div`,{class:`w-220px ml-16px`,onClick:b},[r(o,{value:d.value,"onUpdate:value":[i[0]||(i[0]=e=>d.value=e),C],options:g(h),"fallback-option":!1,disabled:g(_),"menu-props":{style:{"--n-option-check-color":`#e4a93c`,"--n-option-text-color-active":`#e4a93c`}}},null,8,[`value`,`options`,`disabled`])]),L(r(fn,{endtime:g(p),onFinish:w},null,8,[`endtime`]),[[I,g(p)>0]])],2)}}}),[[`__scopeId`,`data-v-8674d607`]]);m();function mn(){let{t:e}=H(),t=X(),n=wt(),r=null,i=!0,a,o=()=>{r!==null&&(window.clearTimeout(r),r=null)},s=()=>{i||r!==null||(r=window.setTimeout(()=>{r=null,c()},1e3))},c=async()=>{if(!i){if(a!=null&&a.closed)i=!0,o();else try{let{message:r}=await we({order_id:t.orderInfo.order_id});if(i||a!=null&&a.closed){i=!0,o();return}if(!J(r)||r.res!==1){s();return}i=!0,o(),K.success(e(`Component.Pay.index_7`)),await n()}catch(e){i=!0,o()}}};return d(()=>{i=!0,o(),a==null||a.close()}),{checkOrder:e=>{o(),a=e,i=!1,c()}}}m();var hn=`stripe-payment-error`;function gn(){let{t:e}=H(),{orderInfo:t}=U(X()),{checkOrder:n}=mn(),r=null,i=null,a=!1,o=()=>{r==null||r(),r=null},s=()=>{K.error(e(`Component.Pay.index_28`),{id:hn})},c=()=>{i&&!i.closed&&i.close(),i=null};return d(()=>{o(),c()}),{openCheckout:async l=>{if(a)return;let u=Re();if(!u){s();return}a=!0,i=u,r=K.loading(e(`Component.Pay.index_12`),{mask:!1}).close;let d=!1;try{let{message:e}=await Ve({order_no:t.value.order_no,subscribe:l.subscribe,...l.adaptive_pricing?{adaptive_pricing:l.adaptive_pricing}:{}});if(u.closed)return;if(!J(e)){s();return}let r=Ee(e.stripe_checkout_redirect_url)||``;if(r){u.location.replace(r),d=!0,i=null,n(u);return}if(!e.id){s();return}let a=u.document.createElement(`script`);a.src=`https://js.stripe.com/v3/`,a.async=!0,a.addEventListener(`load`,()=>{let n=u.Stripe;n?n(t.value.stripe_publishable_key).redirectToCheckout({sessionId:e.id}).then(({error:e})=>{e&&(s(),u.close())}).catch(()=>{s(),u.close()}):(s(),u.close())},{once:!0}),a.addEventListener(`error`,()=>{s(),u.close()},{once:!0}),u.document.head.append(a),d=!0,i=null,n(u)}catch(e){(!J(e)||typeof e.status!=`number`)&&s()}finally{o(),d||c(),a=!1}}}}m(),o(),D();var _n={key:0,class:`flex-center flex-col h-full text-font2`},vn={class:`mb-12px text-16px`},yn=h({__name:`ssl`,props:{show:{type:Boolean,default:!1}},setup(e){let t=P(`--pay-color`),n=()=>{Ze()};return(i,a)=>{let o=W;return e.show?T(i.$slots,`default`,{},void 0,void 0,1):(S(),l(`div`,_n,[s(`div`,vn,O(i.$t(`Component.Pay.index_41`)),1),r(o,{type:`primary`,class:`h-36px`,size:`large`,color:g(t),onClick:n},{default:E(()=>[A(O(i.$t(`Component.Pay.index_42`)),1)]),_:1},8,[`color`])]))}}});m(),o(),D();var bn={key:0,class:`mb-8px text-font2 text-13px`},xn={class:`font-bold`},Sn={class:`flex flex-wrap justify-center items-baseline text-font2`},Cn={class:`mr-4px text-14px`},wn={class:`mr-4px pay-price-color`},Tn={class:`text-24px font-bold`},En={key:0,class:`ml-8px pay-price-color font-bold`},Dn=q(h({__name:`total`,props:{payType:{type:String,default:``},subscribe:{type:Boolean,default:!1},currency:{type:Boolean,default:!1}},setup(e){let{t}=H(),n=X(),{currentProduct:r,orderInfo:i}=U(n),{couponPrice:a}=Z(),o=y(()=>e.subscribe?c.value:i.value.price),c=y(()=>e.payType===`paypal`?r.value.paypal_first_subscription_price>0?r.value.paypal_first_subscription_price.toFixed(2):r.value.paypal_subscription_price.toFixed(2):r.value.first_subscription_price>0?r.value.first_subscription_price.toFixed(2):r.value.subscription_price.toFixed(2)),u=y(()=>{let{cycle_unit:e}=r.value;return e===`year`?90:10}),d=y(()=>{let e=We(i.value.cycle);return e===999?t(`Component.Auth.index_6`):r.value.cycle_unit===`year`?t(`Component.Pay.index_14`,[e,t(`Public.Unit.Year`,e)]):t(`Component.Pay.index_15`,[e,t(`Public.Unit.Month`,e)])}),f=y(()=>r.value.charge_type===2?t(`Component.Auth.index_6`).toLocaleLowerCase():r.value.cycle_unit===`year`?t(`Public.Unit.Year`).toLocaleLowerCase():t(`Public.Unit.Month`).toLocaleLowerCase());return(t,n)=>(S(),l(C,null,[e.subscribe?(S(),l(`div`,bn,[s(`span`,null,O(t.$t(`Component.Pay.index_43`)),1),s(`span`,xn,O(t.$t(`Component.Pay.index_44`,[g(u)])),1)])):b(``,!0),s(`div`,Sn,[s(`span`,Cn,O(t.$t(`Component.Pay.index_25`)),1),s(`span`,wn,[n[0]||(n[0]=s(`span`,{class:`mr-2px text-18px font-bold`},`$`,-1)),s(`span`,Tn,O(g(o)),1)]),s(`span`,null,`/`+O(g(d)),1),g(a)?(S(),l(`span`,En,O(t.$t(`Component.Pay.index_19`,[g(a),g(f)])),1)):b(``,!0)])],64))}}),[[`__scopeId`,`data-v-5fc19cba`]]);m(),D(),o();var On={class:`relative flex-center flex-col h-full`},kn={class:`absolute left-0 bottom-12px w-full text-center text-font3`},An={class:`ml-8px`},jn=h({__name:`index`,setup(e,{expose:t}){let{openSsl:n}=U(X()),{subscribe:i,getSslStatus:a,getOrderInfo:o,setChannelMenu:c}=Z(),{openCheckout:l}=gn(),u=B(!0),d=()=>l({subscribe:+!!i.value}),f=async()=>{try{u.value=!0,await a(),await o()}finally{u.value=!1}};return p(f),t({init:f}),(e,t)=>{let a=He;return S(),z(Q,{loading:u.value},{default:E(()=>[r(yn,{show:g(n)},{default:E(()=>[s(`div`,On,[r(Dn,{"pay-type":`stripe`,subscribe:g(i),currency:!1},null,8,[`subscribe`]),r(g(W),{class:`pay-button mt-14px w-150px h-34px text-14px`,type:`primary`,bordered:!1,onClick:d},{default:E(()=>[A(O(e.$t(`Component.Pay.index_26`)),1)]),_:1}),t[2]||(t[2]=s(`div`,{class:`h-32px`},null,-1)),s(`div`,kn,[s(`span`,An,O(e.$t(`Component.Pay.index_27`,[`Stripe`])),1),r(a,{onClick:t[0]||(t[0]=e=>g(c)(`paypal`))},{default:E(()=>[...t[1]||(t[1]=[A(`PayPal`,-1)])]),_:1})])])]),_:1},8,[`show`])]),_:1},8,[`loading`])}}});m(),D(),o();var Mn={class:`relative flex-center flex-col h-full`},Nn={class:`absolute left-0 bottom-12px w-full text-center text-font3`},Pn={class:`ml-8px`},Fn=h({__name:`index`,setup(e,{expose:t}){let{t:n}=H(),i=X(),{openSsl:a,orderInfo:o,currentProduct:c}=U(i),{subscribe:l,getSslStatus:u,getOrderInfo:d,setChannelMenu:f}=Z(),m=wt(),h=B(null),_=B(!0),v=()=>{f(`stripe`)},y=async()=>{try{_.value=!0,await u(),await d(),l.value?await w():await x()}finally{_.value=!1}},b=e=>new Promise((t,n)=>{let{message:r}=e;if(J(r)){if(r.status)return t(r.res);K.error(r.msg)}n(r)}),x=async()=>{let e=await Qe({clientId:o.value.paypal_client_id});if(e&&h.value){var t,r;h.value.innerHTML=``,(t=e.Buttons)==null||t.call(e,{style:{height:34},fundingSource:(r=e.FUNDING)==null?void 0:r.PAYPAL,createOrder:()=>De({oid:o.value.order_id}).then(b).then(e=>e),onApprove:async e=>{await je({paypal_order_id:e.orderID}),K.success(n(`Component.Pay.index_7`)),await m({refreshAuthorization:!1})}}).render(h.value)}},w=async()=>{let e=await Qe({clientId:o.value.paypal_client_id,vault:!0,intent:`subscription`});if(e&&h.value){var t,n;h.value.innerHTML=``,(t=e.Buttons)==null||t.call(e,{style:{height:34},fundingSource:(n=e.FUNDING)==null?void 0:n.PAYPAL,createSubscription:(e,t)=>t.subscription.create({custom_id:`${o.value.order_id}`,plan_id:c.value.paypal_subscription_plan_id}),onApprove:()=>(D(),Promise.resolve())}).render(h.value)}},T=null,D=async()=>{let{close:e}=K.loading(()=>r(C,null,[r(`span`,null,[A(`Paying in progress, `)]),r(W,{text:!0,type:`primary`,onClick:t},{default:()=>[A(`Cancel Pay`)]})])),t=()=>{Se({title:n(`Public.Confirm.Title`),content:`Do you want to confirm the cancellation of payment?`,onConfirm:async()=>{T&&(clearTimeout(T),T=null),e()}})},i=async(t=!0)=>{let{message:r}=await we({order_id:o.value.order_id});J(r)&&r.res===1?(T&&(clearTimeout(T),T=null),e(),K.success(n(`Component.Pay.index_7`)),await m()):t&&T!==null&&a()},a=()=>{T=window.setTimeout(async()=>{await i()},1e3)};T&&clearTimeout(T),await i(!1),a()};return p(()=>{y()}),t({init:y}),(e,t)=>{let n=He;return S(),z(Q,{loading:g(_)},{default:E(()=>[r(yn,{show:g(a)},{default:E(()=>[s(`div`,Mn,[r(Dn,{"pay-type":`paypal`,subscribe:g(l),currency:!1},null,8,[`subscribe`]),s(`div`,{ref_key:`payBtnRef`,ref:h,class:`relative w-150px h-34px mt-16px z-10`},null,512),t[1]||(t[1]=s(`div`,{class:`h-32px`},null,-1)),s(`div`,Nn,[s(`span`,Pn,O(e.$t(`Component.Pay.index_27`,[`Paypal`])),1),r(n,{onClick:v},{default:E(()=>[...t[0]||(t[0]=[A(`Stripe`,-1)])]),_:1})])])]),_:1},8,[`show`])]),_:1},8,[`loading`])}}});m(),D(),o();var In={class:`relative flex-center flex-col h-full`},Ln={class:`absolute left-0 bottom-12px w-full text-center text-font3`},Rn={class:`ml-8px`},zn=h({__name:`index`,setup(e,{expose:t}){let{openSsl:n}=U(X()),{getSslStatus:i,getOrderInfo:a,setChannelMenu:o}=Z(),{openCheckout:c}=gn(),l=B(!0),u=()=>c({subscribe:0,adaptive_pricing:1}),d=async()=>{try{l.value=!0,await i(),await a()}finally{l.value=!1}};return p(d),t({init:d}),(e,t)=>{let i=He;return S(),z(Q,{loading:l.value},{default:E(()=>[r(yn,{show:g(n)},{default:E(()=>[s(`div`,In,[t[5]||(t[5]=s(`div`,{class:`flex gap-16px mb-8px`},[s(`img`,{class:`h-32px`,src:Je,alt:``}),s(`img`,{class:`h-32px`,src:qe,alt:``}),s(`img`,{class:`h-32px`,src:Ke,alt:``}),s(`img`,{class:`h-32px`,src:Ge,alt:``})],-1)),r(Dn,{"pay-type":`stripe`,subscribe:!1,currency:!0}),r(g(W),{class:`pay-button mt-12px w-150px h-34px text-14px`,type:`primary`,bordered:!1,onClick:u},{default:E(()=>[A(O(e.$t(`Component.Pay.index_47`)),1)]),_:1}),t[6]||(t[6]=s(`div`,{class:`h-32px`},null,-1)),s(`div`,Ln,[s(`span`,Rn,O(e.$t(`Component.Pay.index_27`,[``])),1),r(i,{onClick:t[0]||(t[0]=e=>g(o)(`stripe`))},{default:E(()=>[...t[2]||(t[2]=[A(`Stripe`,-1)])]),_:1}),t[4]||(t[4]=s(`span`,null,` or `,-1)),r(i,{onClick:t[1]||(t[1]=e=>g(o)(`paypal`))},{default:E(()=>[...t[3]||(t[3]=[A(`PayPal`,-1)])]),_:1})])])]),_:1},8,[`show`])]),_:1},8,[`loading`])}}});m(),D();var Bn={class:`flex-center flex-col h-full`},Vn=h({__name:`index`,setup(e){let t=P(`--pay-color`),n=()=>{window.open(`mailto:support@aapanel.com`)};return(e,i)=>{let a=W;return S(),l(`div`,Bn,[i[1]||(i[1]=s(`div`,{class:`mb-12px text-14px leading-20px text-center text-font2`},[A(` For USDT payments, please contact our customer`),s(`br`),A(` service team at `),s(`b`,null,`support@aapanel.com`),A(` for`),s(`br`),A(` assistance with the transaction. `)],-1)),r(a,{type:`primary`,class:`h-36px`,size:`large`,color:g(t),onClick:n},{default:E(()=>[...i[0]||(i[0]=[s(`span`,{class:`ml-4px`},`Contact Support`,-1)])]),_:1},8,[`color`])])}}});m(),D();var Hn=q(h({__name:`index`,setup(e,{expose:t}){let n=X(),{channelMenu:i,shouldFetchOrder:a}=U(n),o=N(`stripeRef`),s=N(`paypalRef`),c=N(`otherRef`),l=()=>{a.value&&u()},u=()=>{switch(i.value){case`stripe`:var e;(e=o.value)==null||e.init();break;case`paypal`:var t;(t=s.value)==null||t.init();break;case`other`:var n;(n=c.value)==null||n.init()}};return t({init:u}),(e,t)=>{let n=pe,a=ce;return S(),z(a,{value:g(i),"onUpdate:value":[t[0]||(t[0]=e=>V(i)?i.value=e:null),l],class:`pay-menu pro`,type:`card`,placement:`left`},{default:E(()=>[r(n,{name:`stripe`,tab:`Stripe`,"display-directive":`show:lazy`},{default:E(()=>[r(jn,{ref_key:`stripeRef`,ref:o},null,512)]),_:1}),r(n,{name:`paypal`,tab:`Paypal`,"display-directive":`show:lazy`},{default:E(()=>[r(Fn,{ref_key:`paypalRef`,ref:s},null,512)]),_:1}),r(n,{name:`other`,tab:`Other Payment`,"display-directive":`show:lazy`},{default:E(()=>[r(zn,{ref_key:`otherRef`,ref:c},null,512)]),_:1}),r(n,{name:`usdt`,tab:`USDT`,"display-directive":`show:lazy`},{default:E(()=>[r(Vn)]),_:1})]),_:1},8,[`value`])}}}),[[`__scopeId`,`data-v-841898b5`]]);m(),D(),o(),Ye();var Un={class:`h-full`},Wn={class:`mb-16px text-15px text-font2`},Gn=h({__name:`LinuxProfessional`,setup(e){let t=X(),{cycleIndex:n,cycleList:i,numberIndex:a,numberList:o,isUseCoupon:c,couponId:u,couponList:d,receiveCoupon:f}=U(t),{showCouponModal:m,resetOrder:h,getCycleList:_,getCouponList:v,setCouponList:x,getReceiveCoupon:w}=Z(),{initCurrentMenu:T}=Gt(),D=N(`channelRef`),j=B(!0),M=y(()=>o.value.map((e,t)=>({label:`${e.num}`,value:t,discount:Math.round(100-e.discount_rate*100)}))),P=()=>{var e;a.value=0,h(),x(),(e=D.value)==null||e.init()},F=()=>{var e;h(),x(),(e=D.value)==null||e.init()},I=()=>{var e;h(),(e=D.value)==null||e.init()},L=async()=>{var e;await v(),h(),(e=D.value)==null||e.init()},ee=async()=>{await w(),m.value&&ye({width:400,bgColor:`transparent`,data:{obtainId:f.value.obtain_id,endTime:f.value.end_time,couponList:f.value.coupons,couponQuota:f.value.package_quota,onReceive:async()=>{R()}},component:k(()=>Xe(()=>Promise.resolve().then(()=>bt),void 0))})},R=async()=>{try{j.value=!0,t.resetProduct(),await T(),await _(),await v(),ee()}finally{j.value=!1}};return p(()=>{R()}),(e,t)=>{let o=He;return S(),l(`div`,Un,[r(Q,{loading:g(j)},{default:E(()=>[s(`div`,Wn,[s(`span`,null,O(e.$t(`Component.Pay.index_8`)),1),r(o,{href:`mailto:support@aapanel.com`,target:`_blank`},{default:E(()=>[...t[4]||(t[4]=[A(`support@aapanel.com`,-1)])]),_:1})]),r($,{title:`Choose your plan`},{default:E(()=>[r(rn,{value:g(n),"onUpdate:value":[t[0]||(t[0]=e=>V(n)?n.value=e:null),P],options:g(i)},null,8,[`value`,`options`])]),_:1}),r($,{title:`Number of license`},{default:E(()=>[r(ln,{value:g(a),"onUpdate:value":[t[1]||(t[1]=e=>V(a)?a.value=e:null),F],options:g(M)},null,8,[`value`,`options`])]),_:1}),g(j)?b(``,!0):(S(),l(C,{key:0},[r(pn,{value:g(u),"onUpdate:value":t[2]||(t[2]=e=>V(u)?u.value=e:null),checked:g(c),"onUpdate:checked":t[3]||(t[3]=e=>V(c)?c.value=e:null),data:g(d),onChange:I,onFinish:L},null,8,[`value`,`checked`,`data`]),r(Hn,{ref_key:`channelRef`,ref:D},null,512)],64))]),_:1},8,[`loading`])])}}});m(),o();var Kn={class:`max-h-200px overflow-auto`},qn={key:0,class:`voucher-list`},Jn=[`onClick`],Yn={class:`voucher-name`},Xn={class:`voucher-date`},Zn={key:1,class:`flex-center h-72px`},Qn=q(h({__name:`VoucherList`,props:a({type:String,options:{type:Array,default:()=>[]}},{value:{},valueModifiers:{}}),emits:[`update:value`],setup(e){let i=R(e,`value`),a=t=>e.type===`authorization`||t===0?`Lifetime`:Fe(t,`yyyy-MM-dd`),o=t=>{let{cycle:n,charge_type:r,rest_days:i}=t;return r===2?`Lifetime`:e.type===`authorization`?`${i} day${i>1?`s`:``}`:`${n} ${t.cycle_unit}${n>1?`s`:``}`},c=e=>{i.value=e};return(u,d)=>{let f=se;return S(),l(`div`,Kn,[e.options.length>0?(S(),l(`div`,qn,[(S(!0),l(C,null,t(e.options,(e,t)=>(S(),l(`div`,{key:t,class:n([`voucher-item`,{selected:i.value===e.id}]),onClick:t=>c(e.id)},[s(`div`,Yn,O(o(e)),1),s(`div`,Xn,O(u.$t(`Component.Auth.index_4`))+O(a(e.end_time)),1)],10,Jn))),128))])):(S(),l(`div`,Zn,[r(f)]))])}}}),[[`__scopeId`,`data-v-13e5d52c`]]);m(),D(),o();var $n={class:`voucher-container`},er=q(h({__name:`index`,setup(e){let{t}=H(),n=X(),{voucherMenu:i,voucherAllList:a,authorizationAllList:o}=U(n),{getVoucherList:c,getAuthorizationList:u}=Gt(),d=wt(),f=B(!1),m=P(`--pay-color`),h=[{label:t(`Component.Pay.index_21`),value:`voucher`},{label:t(`Component.Pay.index_22`),value:`authorization`}],_=B(0),v=B([]),y=B(0),b=B([]),C=async e=>{try{T(),f.value=!0,await e(),D(),k()}finally{f.value=!1}},w=async(e,t)=>{let n=e();n&&(await t(n),await d())},T=()=>{v.value=[],b.value=[],_.value=0,y.value=0},D=()=>{let e=i.value===`voucher`?a.value:o.value,t=new Map;e.forEach(e=>{e.product&&t.set(e.product.id,e.product.name)});let n=Array.from(t.entries()),r=n.findIndex(([e])=>e===100000058);if(r!==-1){let e=n[r];n.splice(r,1),n.unshift(e)}v.value=n.map(([e,t])=>({label:t,value:e})),n.length>0?_.value=n[0][0]:_.value=0},k=()=>{let e=i.value===`voucher`?a.value:o.value;b.value=e.filter(e=>{var t;return((t=e.product)==null?void 0:t.id)===_.value}).map(e=>{var t;return{id:e.id,cycle:e.cycle,cycle_unit:e.cycle_unit,charge_type:e.charge_type,end_time:e.end_time,rest_days:i.value===`voucher`||(t=e.rest_days)==null?0:t}}),b.value.length>0?y.value=b.value[0].id:y.value=0},j=async()=>{await C(c)},M=async()=>{await C(u)},N=e=>{switch(e){case`voucher`:a.value=[],j();break;case`authorization`:o.value=[],M()}},F=()=>{k()},I=async()=>{await w(()=>a.value.find(e=>e.id===y.value),e=>Ne({pid:`${e.product_id}`,code:e.code,coupon_id:e.id,cycle:e.cycle,cycle_unit:e.cycle_unit,charge_type:e.charge_type}))},L=async()=>{await w(()=>o.value.find(e=>e.id===y.value),e=>ge({serial_no:e.serial_no}))},ee=()=>{switch(i.value){case`voucher`:I();break;case`authorization`:L()}};return p(()=>{i.value||(i.value=`voucher`),N(i.value)}),x(()=>{n.resetVoucher()}),(e,t)=>{let n=W;return S(),l(`div`,$n,[r(Q,{loading:g(f)},{default:E(()=>[r($,{title:`Voucher Type`},{default:E(()=>[r(ln,{value:g(i),"onUpdate:value":t[0]||(t[0]=e=>V(i)?i.value=e:null),options:h,onChange:N},null,8,[`value`])]),_:1}),r($,{title:`Product Type`},{default:E(()=>[r(ln,{value:g(_),"onUpdate:value":t[1]||(t[1]=e=>V(_)?_.value=e:null),options:g(v),onChange:F},null,8,[`value`,`options`])]),_:1}),r($,{title:`${g(i)===`authorization`?`License`:`Voucher`} List`},{default:E(()=>[r(Qn,{value:g(y),"onUpdate:value":t[2]||(t[2]=e=>V(y)?y.value=e:null),type:g(i),options:g(b)},null,8,[`value`,`type`,`options`])]),_:1},8,[`title`]),s(`div`,null,[r(n,{type:`primary`,size:`large`,color:g(m),disabled:g(b).length===0,onClick:ee},{default:E(()=>[A(O(e.$t(`Component.Pay.index_39`)),1)]),_:1},8,[`color`,`disabled`])])]),_:1},8,[`loading`])])}}}),[[`__scopeId`,`data-v-a14cf5ff`]]);m(),D(),o();var tr={class:`pay-container`},nr={class:`pay-sidebar`},rr={class:`pay-body`},ir={class:`product-tabs`},ar=[`onClick`],or={class:`tab-content`},sr={class:`tab-title`},cr={key:0,class:`glyphicon glyphicon-vip`},lr={class:`text`},ur={class:`tab-desc`},dr={class:`pay-main`},fr={class:`absolute flex items-center justify-end right-20px bottom-20px`},pr=h({__name:`index`,props:{source:{type:Number,required:!0},plugin:{type:Object},product_id:{type:String},onSuccess:{type:Function}},setup(e){let i=e,{source:a,plugin:o}=i;_(Ct,i.onSuccess);let{t:c}=H(),u=Ae(),d=X(),{currentMenu:f,plugins:m,pid:h,isFirstCutMenu:v}=U(d),{setUsername:w,setSource:T,setCurrentMenu:D,setPid:k,setPlugins:j}=St(),M=B([{key:`pro`,pid:`100000058`,title:c(`Component.Pay.index_1`),description:c(`Component.Pay.index_2`)},{key:`voucher`,pid:`0`,title:`Voucher`,description:`Voucher License`}]),N=y(()=>{switch(f.value){case`pro`:case`plugin`:return Gn;case`voucher`:return er;default:return null}}),P=e=>{v.value=!1,k(e.pid),D(e.key)},F=async()=>{await Me({force:1}),xe()},I=()=>{if(m.value.length>0){let e=m.value[0],t={key:`plugin`,title:e.name,description:e.type===100?c(`Mail.Overview.today_16`,[e.name]):c(`Component.Pay.index_17`),pid:`${e.pid}`};M.value.splice(1,0,t),k(`${e.pid}`),D(`plugin`)}else k(`100000058`),D(`pro`)};return p(()=>{w(u.username),T(a),j(o),I()}),x(()=>{d.reset()}),(e,i)=>{let a=W;return S(),l(`div`,tr,[s(`div`,nr,[r(Wt)]),s(`div`,rr,[s(`div`,ir,[(S(!0),l(C,null,t(g(M),e=>(S(),l(`div`,{key:e.key,class:n([`tab-item`,[e.key===`pro`?e.key:``,g(f)===e.key?`active`:``]]),onClick:t=>P(e)},[s(`div`,or,[s(`div`,sr,[e.key===`pro`?(S(),l(`span`,cr)):b(``,!0),s(`div`,lr,O(e.title),1)]),s(`div`,ur,O(e.description),1)])],10,ar))),128))]),s(`div`,dr,[(S(),z(ee(g(N)),{key:g(h)})),s(`div`,fr,[i[1]||(i[1]=s(`span`,{class:`mr-12px text-font3`},`License didn't changed?`,-1)),r(a,{type:`primary`,size:`small`,ghost:``,onClick:F},{default:E(()=>[...i[0]||(i[0]=[A(` Refresh License State `,-1)])]),_:1})])])])])}}}),mr=e({default:()=>hr}),hr=q(pr,[[`__scopeId`,`data-v-1b95b5af`]]);m(),o(),D();var gr={class:`aa-pay-feature`},_r={class:`intro flex flex-col items-center text-center`},vr={class:`heading flex items-center justify-center gap-10px`},yr={class:`pay-feature-title m-0`},br={key:0,class:`description text-14px text-desc leading-24px`},xr={key:1,class:`features flex flex-wrap items-center justify-center`},Sr={key:2,class:`supplement flex items-center justify-center gap-4px text-12px text-desc`},Cr={key:0,class:`preview`},wr={key:0,class:`content`},Tr=[`aria-label`],Er=[`aria-pressed`,`aria-controls`,`onClick`],Dr=[`id`],Or=q(h({name:`AaPayFeature`,__name:`AaPayFeature`,props:{title:{},showVoucher:{type:Boolean,default:!0},description:{},actionText:{},features:{default:()=>[]},previews:{default:()=>[]}},emits:[`action`,`redeem`],setup(e,{emit:i}){let a=e,o=i,{t:c}=H(),u=F(),d=B(),f=y(()=>{var e;return(e=a.previews.find(e=>e.key===d.value))==null?a.previews[0]:e});return(i,a)=>(S(),l(`section`,gr,[s(`div`,_r,[s(`div`,vr,[s(`h2`,yr,O(e.title),1),a[2]||(a[2]=s(`span`,{class:`pro-badge inline-flex items-center justify-center`},`Pro`,-1))]),e.description?(S(),l(`p`,br,O(e.description),1)):b(``,!0),e.features.length>0?(S(),l(`div`,xr,[(S(!0),l(C,null,t(e.features,e=>(S(),l(`span`,{key:e.key,class:`feature`},[s(`i`,{class:n([e.icon,`text-18px shrink-0 text-primary`]),"aria-hidden":`true`},null,2),s(`span`,null,O(e.label),1)]))),128))])):b(``,!0),T(i.$slots,`action`,{},()=>[r(g(W),{type:`primary`,class:`action text-14px font-bold`,onClick:a[0]||(a[0]=e=>o(`action`))},{default:E(()=>[A(O(e.actionText),1)]),_:1})],!0),e.showVoucher?(S(),l(`div`,Sr,[s(`span`,null,O(g(c)(`proFeature.business.payFeature.voucherNote`)),1),r(g(W),{text:``,type:`primary`,class:`font-bold`,onClick:a[1]||(a[1]=e=>o(`redeem`))},{default:E(()=>[A(O(g(c)(`proFeature.business.payFeature.redeem`)),1)]),_:1})])):b(``,!0)]),f.value?(S(),l(`div`,Cr,[e.previews.length>1?(S(),l(`div`,wr,[s(`div`,{class:`navigation`,role:`group`,"aria-label":e.title},[(S(!0),l(C,null,t(e.previews,e=>(S(),l(`button`,{key:e.key,type:`button`,class:n([`tab`,{active:f.value.key===e.key}]),"aria-pressed":f.value.key===e.key,"aria-controls":g(u),onClick:t=>d.value=e.key},O(e.label),11,Er))),128))],8,Tr),s(`div`,{id:g(u),class:`image`},[r(g(ae),{class:`screenshot`,width:`100%`,src:f.value.src,alt:f.value.label},null,8,[`src`,`alt`])],8,Dr)])):(S(),z(g(ae),{key:f.value.key,class:`screenshot single`,width:`100%`,src:f.value.src,alt:f.value.label},null,8,[`src`,`alt`]))])):b(``,!0)]))}}),[[`__scopeId`,`data-v-bd6c2884`]]);m(),o(),D();var kr={class:`aa-pay-gate`},Ar={key:0,class:`notice flex flex-wrap items-center gap-16px mb-16px p-14px border rounded-8px`},jr={class:`flex-1 basis-260px min-w-0`},Mr={class:`flex flex-wrap items-center gap-8px`},Nr={class:`m-0 text-14px font-bold text-base`},Pr={key:0,class:`m-0 mt-4px text-12px text-desc leading-18px`},Fr=[`inert`,`aria-hidden`],Ir=q(h({name:`AaPayGate`,__name:`AaPayGate`,props:{locked:{type:Boolean},title:{},description:{}},emits:[`action`],setup(e,{emit:t}){let i=e,a=t,{t:o}=H();return(e,t)=>{let c=W;return S(),l(`div`,kr,[i.locked?(S(),l(`div`,Ar,[s(`div`,jr,[s(`div`,Mr,[s(`h3`,Nr,O(i.title),1),t[1]||(t[1]=s(`span`,{class:`pro-badge px-6px py-2px rounded-4px text-10px font-bold`},`PRO`,-1))]),i.description?(S(),l(`p`,Pr,O(i.description),1)):b(``,!0)]),r(c,{type:`primary`,class:`shrink-0`,onClick:t[0]||(t[0]=e=>a(`action`))},{default:E(()=>[A(O(g(o)(`proFeature.business.payGate.upgrade`)),1)]),_:1})])):b(``,!0),s(`div`,{class:n([`content min-w-0`,{locked:i.locked}]),inert:i.locked?!0:void 0,"aria-hidden":i.locked?`true`:void 0},[T(e.$slots,`default`,{},void 0,!0)],10,Fr)])}}}),[[`__scopeId`,`data-v-8563abef`]]);export{bt as i,Or as n,mr as r,Ir as t};
Save File
Cancel