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