const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index144.js?v=1764233927359","js/page_layout.js?v=1764233927359","js/vue.js?v=1764233927359","js/__commonjsHelpers__.js?v=1764233927359","js/naive.js?v=1764233927359","js/common.js?v=1764233927359","js/public.js?v=1764233927359","css/public.css?v=1764233927359","css/page_layout.css?v=1764233927359","css/index70.css?v=1764233927359"])))=>i.map(i=>d[i]);
import{k as e,a0 as a,R as t,V as o,H as s,U as n,S as r,c as p,a2 as u,W as l,j as c,u as i,aq as d,r as m,e as x,an as _,a4 as v,_ as f}from"./vue.js?v=1764233927359";import{u as b,p as h,bG as g,bH as y,a as C,d as k}from"./page_layout.js?v=1764233927359";import{b as q,u as j}from"./public.js?v=1764233927359";import{dd as w,d_ as P}from"./naive.js?v=1764233927359";const R=h(e({__name:"index",props:{source:{type:Number,default:27}},setup(e){const{isPro:p}=a(b()),u=()=>{q({source:e.source})};return(e,a)=>(o(),t("div",{class:s(["pro-badge",{pro:n(p)}]),onClick:u},a[0]||(a[0]=[r("i",{class:"i-common:pro text-14px color-white"},null,-1),r("span",{class:"text"},"PRO",-1)]),2))}}),[["__scopeId","data-v-2e4cedc1"]]);function S(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const z=e({__name:"time",props:{endtime:{default:0}},emits:["finish"],setup(e,{emit:a}){const t=e,s=a,r=p(()=>{const e=Date.now(),a=1e3*t.endtime;return Math.max(0,a-e)}),i=e=>e.toString().padStart(2,"0"),d=({hours:e,minutes:a,seconds:t})=>{let o,s,n,r;const p=Math.floor(e/24);return e%=24,l("div",{class:"inline-flex items-center"},[p>0?l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(o=i(p))?o:{default:()=>[o]}):"",p>0?l("span",{class:"mx-4px"},[c(":")]):"",l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(s=i(e))?s:{default:()=>[s]}),l("span",{class:"mx-4px"},[c(":")]),l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(n=i(a))?n:{default:()=>[n]}),l("span",{class:"mx-4px"},[c(":")]),l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(r=i(t))?r:{default:()=>[r]})])},m=()=>{t.endtime>0&&s("finish")};return(e,a)=>{const t=g;return o(),u(t,{duration:n(r),render:d,"on-finish":m},null,8,["duration"])}}}),I={class:"text-pro"},O={key:0,class:"font-bold"},H={key:1,class:"flex items-center"},$={class:"mr-6px"},D=h(e({__name:"index",props:{arrowPlacement:{type:String,default:"right"}},setup(e){const u=y(),{showCoupon:c,receiveCoupon:i}=a(u),{width:b}=d(),h=m([]),g=p(()=>h.value.length),w=p(()=>0===g.value?0:h.value[g.value-1].deduct_amount),R=x({quota:0,total:0,received:0}),S=()=>{1!==i.value.status?i.value.total>0&&q({source:176}):j({width:400,bgColor:"transparent",data:{obtainId:i.value.obtain_id,endTime:i.value.end_time,couponQuota:R,couponList:h.value,onReceive:()=>{q({source:176})}},component:f(()=>C(()=>import("./index144.js?v=1764233927359"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])))})};return(async()=>{const e=await u.getReceiveCoupon();k(e)&&(P(e.coupons,"deduct_amount"),h.value=e.coupons,e.package_quota&&(R.quota=e.package_quota.quota,R.total=e.package_quota.total,R.received=e.package_quota.total-e.package_quota.quota))})(),(a,p)=>n(c)?(o(),t("div",{key:0,class:s(["coupon-box",e.arrowPlacement]),onClick:S},[p[0]||(p[0]=r("div",{class:"coupon-logo"},null,-1)),r("div",I,[1===n(i).status?(o(),t("div",O,v(n(b)>1500?a.$t("Component.Coupon.index_11",[n(w)]):a.$t("Component.Coupon.index_12",[n(g)])),1)):n(i).total>0?(o(),t("div",H,[r("span",$,v(a.$t("Component.Coupon.index_4")),1),l(z,{endtime:n(i).end_time},null,8,["endtime"])])):_("",!0)])],2)):_("",!0)}}),[["__scopeId","data-v-f507497a"]]);export{D as H,R as P};
