1var he=Object.defineProperty,Se=Object.defineProperties;var Ae=Object.getOwnPropertyDescriptors;var ne=Object.getOwnPropertySymbols;var ke=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var ie=(f,u,l)=>u in f?he(f,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[u]=l,Q=(f,u)=>{for(var l in u||(u={}))ke.call(u,l)&&ie(f,l,u[l]);if(ne)for(var l of ne(u))Te.call(u,l)&&ie(f,l,u[l]);return f},z=(f,u)=>Se(f,Ae(u));var P=(f,u,l)=>new Promise((te,F)=>{var W=g=>{try{A(l.next(g))}catch(p){F(p)}},y=g=>{try{A(l.throw(g))}catch(p){F(p)}},A=g=>g.done?te(g.value):Promise.resolve(g.value).then(W,y);A((l=l.apply(f,u)).next())});import{C as Ee,R as Pe,a as Be,b as Ie,E as Le,P as Re}from"./vendor.c5c487e86ce941c3a015f8abc135b7dd.DCvfJib9.js";import{b as Ve}from"./index.BQBj9wM1.js";import{i as $,G as qe,bY as O,$ as Oe,bW as le,bX as Fe,eQ as We,ee as Ne,bv as Ye,h as re,B as M,am as $e,fc as De,c0 as Ue,c2 as B,c3 as je,fd as He,hw as Je,gZ as Ge,aq as Qe,ar as ze,T as ce,_ as Me}from"./index.BCDVwiTT.js";import{s as de}from"./small_q.CzbGSfGr.js";import{S as Xe}from"./success.Ctg_CcBZ.js";import{u as Ze}from"./useAutoCoupon.DDOVQ3i_.js";import{D as pe}from"./vendor.71a1c81fe97d5312f7e533a0824439ee.DdqQRotv.js";import{d as Ke}from"./vendor.eb6677555573f02990f41d7923105813.Dh44Olds.js";import{g as et}from"./index.D6y5-_Io.js";import{at as tt,aA as k,aD as T,au as ue,ay as st,dN as at,dE as _,cU as C,cV as t,aE as o,ap as D,dL as xe,dw as ee,dZ as I,aQ as v,bb as X,cS as Z,em as w,b6 as K,cT as L,b5 as ot}from"./vendor.misc.D_7Dea-0.js";import{C as nt,n as it,a as U}from"./vendor.4240b7e2b857a912f4ec4760b53f9bf9.OgsM5tEN.js";const lt={key:0,class:"text-center flex items-center flex-col"},rt=["src"],ct=["src"],dt={key:1,class:"content-box"},pt={class:ee(["mt-[28px] pc-layout md:px-0 px-10px"])},ut=["onClick"],xt={class:"text-[16px] text-[#470001] leading-[22px] font-500"},ft={class:"flex gap-[8px] items-start text-[14px] leading-[24px]"},_t={class:"flex gap-[8px] items-start text-[14px] leading-[24px]"},vt={class:"flex gap-[8px] items-start text-[14px] leading-[24px]"},mt={class:"text-[#931F21] text-[13px]"},yt={class:"flex flex-col gap-[24px]"},gt={class:"min-h-[calc(447px-22px)] flex flex-col gap-[24px]"},bt={class:"flex items-center"},Ct={class:"flex-1"},wt={class:"flex gap-[32px]"},ht={class:"alibaba-font text-[#e74c3c] text-[22px] !leading-[22px]"},St=["src"],At={class:"px-14px"},kt={key:0,class:"flex flex-col gap-3px"},Tt={class:"text-[#202328] text-16px font-semibold"},Et={class:"text-14px text-[#2023284D]"},Pt={key:1,class:"text-13px text-[#202328]"},Bt={class:"px-30px pb-20px"},It={class:"flex gap-[12px] justify-center items-end mt-16px"},Lt={class:"text-[#e74c3c] text-[15px] leading-[22px]"},Rt={class:"alibaba-font text-[28px] leading-[26px]"},Vt={key:0},qt={class:"px-16px py-20px"},Ot=tt({__name:"pay",props:{status:{type:String}},emits:["updateStatus"],setup(f,{emit:u}){const l=k(()=>!$(1e3));k(()=>$()?{display:"flex",justifyContent:"space-between",flexDirection:"row-reverse"}:{}),k(()=>({components:{Radio:$()?{paddingXS:0,marginXS:0,colorText:"#202328"}:{}}}));const F={components:{Select:{borderRadius:3,colorHighlight:34,colorBorder:"#EFF0F2",colorText:"#202328",fontSize:13}}},W=window.WeixinJSBridge,y=T(qe()?"wechat":"alipay"),A=u,g=T([]),p=T(),j=T(0),fe=T(),se=T(!1),r=ue({low:"2026.04.01æ¥å¼è¥",high:"2026.04.01æ¥å¼è¥",coupon_id:void 0});P(this,null,function*(){var a,e,s;try{const[c,S]=yield Promise.all([Ne({constraints:{product_type:O.BIGPROV2}}),Ye({space_id:re()||M,privileges:[$e.BIGPRO2]})]),i=JSON.parse(et(S,"/extra/bigprov2/equity/")||"{}"),E=i&&((a=Object.keys(i))==null?void 0:a.length)>0&&!!(i!=null&&i.specification)&&Ke().isSameOrBefore(i==null?void 0:i.expire_at,"day")&&!(i!=null&&i.is_reward)&&!(i!=null&&i.is_card),x=(e=c==null?void 0:c.items)==null?void 0:e.find(d=>(d==null?void 0:d.product_id)===(i==null?void 0:i.product_id));se.value=!!E&&["spro","spro_l2"].includes(x==null?void 0:x.specification)&&(x==null?void 0:x.duration)===12;const m={product_type:O.ACTIVITY},[n]=yield Promise.all([Ve(m)]);g.value=((s=n==null?void 0:n.items)==null?void 0:s.filter(({category:d,name:b})=>d==="AIéåç²¾è±å¹è®è®¡å"&&(se.value?!0:b!=="è¿é¶çï¼å¹´ä»æè°ä¼åä¸äº«ï¼")))||[],p.value=g.value[0],J(r.coupon_id),l.value&&V()}catch(c){console.error(c)}finally{}});const _e=a=>{clearTimeout(R),r.coupon_id=void 0,A("updateStatus","NORMAL"),p.value=a,J(r.coupon_id),l.value&&V()};let R;const H=a=>P(this,null,function*(){if(!a)return U.error("订åå¼å¸¸");try{if(yield Ge(a)){Qe("event","aipeixun_scan_purchase"),ze("aipeixun_scan_purchase"),A("updateStatus","success"),clearTimeout(R);return}R=setTimeout(()=>{H(a)},2e3)}catch(e){console.error(e)}}),N=(a={},e)=>{W.invoke("getBrandWCPayRequest",{appId:ce,timeStamp:a.timeStamp,nonceStr:a.nonceStr,package:a.package,signType:a.signType,paySign:a.paySign},s=>{if(s.err_msg=="get_brand_wcpay_request:ok")H(e);else{const c=window.location.origin+window.location.pathname;s.err_msg==="get_brand_wcpay_request:fail"?U.error("æ¯ä»å¤±è´¥"):s.err_msg==="get_brand_wcpay_request:cancel"&&U.warn("åæ¶æ¯ä»"),A("updateStatus","NORMAL"),window.location.href=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${ce}&redirect_uri=${c}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`}})},V=()=>P(this,null,function*(){var a,e,s,c,S,i,E;try{if(!r.low&&!r.high||!((a=p.value)!=null&&a.id)||((s=(e=p.value)==null?void 0:e.meta_data)==null?void 0:s.level)==="low+high"&&(!r.low||!r.high))return l.value?void 0:U.warn("请å¾éç级");clearTimeout(R),Y.qrcode_status="loading";const x={order_type:O.ACTIVITY,product_id:(c=p.value)==null?void 0:c.id,space_id:M,coupon_id:r.coupon_id,notes:{name:(S=p.value)==null?void 0:S.name}};((E=(i=p.value)==null?void 0:i.meta_data)==null?void 0:E.level)==="low"?x.notes=z(Q({},x.notes),{low:r.low}):x.notes=z(Q({},x.notes),{high:r.high});const m=yield De(x),n=Ue(o(y.value)),d=n===B.WECHATJSAPI?yield je({code:re("code")}):{},b=yield He({business_notify_url:"",order_id:m==null?void 0:m.id,pay_type:n,open_id:d.openid});switch(n){case B.WECHATNATIVE:case B.ALIPAY_NATIVE:fe.value=b==null?void 0:b.code_url,Y.qrcode_url=b==null?void 0:b.code_url,A("updateStatus","PAY"),H(m==null?void 0:m.id);break;case B.WECHATH5:case B.ALIPAY_H5:window.location.href=b.h5_url;break;case B.WECHATJSAPI:typeof W=="undefined"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",N,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",N),document.attachEvent("onWeixinJSBridgeReady",N)):N(b,m==null?void 0:m.id);break}}catch(x){console.error(x)}finally{Y.qrcode_status="active"}}
1),ve=()=>{V()},Y=ue({qrcode_url:"",qrcode_status:"active",status:"normal"}),q=T(!1),me=k(()=>{var c,S;const a=(c=h.value)==null?void 0:c.find(i=>i.value===r.coupon_id);if(!a||r.coupon_id==="not_use_coupon")return 0;let e=0;const s=a;return a.value!=="not_use_coupon"&&(s.coupon_type==="full_reduction"?e=s.amount:e=new pe((S=p.value)==null?void 0:S.price).times(new pe(1).minus(s.discount)).toNumber()),e.toFixed(0)}),ye=k(()=>{var a,e;return((e=(a=h==null?void 0:h.value)==null?void 0:a.find(s=>s.value===r.coupon_id))==null?void 0:e.label)||""}),J=a=>P(this,null,function*(){var e;try{const s=yield Je({product_id:(e=p==null?void 0:p.value)==null?void 0:e.id,coupon_id:a==="not_use_coupon"?void 0:a,space_id:M,order_type:O.ACTIVITY});j.value=s==null?void 0:s.actual_price}catch(s){console.error(s)}}),G=a=>P(this,null,function*(){try{J(a),l.value&&V()}catch(e){console.error(e)}finally{}}),ge=a=>{r.coupon_id=a,G(a)},{handler:be,couponList:Ce}=Ze({product_type:O.ACTIVITY},ge);be();const h=k(()=>{var e;const a=((e=Ce.value.map(({coupon_template:s,coupon:c})=>({label:s==null?void 0:s.name,value:c==null?void 0:c.id,coupon_type:s==null?void 0:s.coupon_type,discount:s==null?void 0:s.discount,amount:s==null?void 0:s.amount,template_id:s==null?void 0:s.id})))==null?void 0:e.filter(s=>!["ce3006cc-35a4-49c3-9a9d-4c44682a78df","87e75dbd-a3e1-45b9-a60f-82d7b788b18d","db3fd998-b2e8-43e7-a02a-a6a41ea67bb9","5ace8e30-0e08-4d28-b4ca-8cd685e8ca97","7170f03f-8db7-48b1-9c7e-421535369e17"].includes(s.template_id)))||[];return $()&&a.unshift({label:"ä¸ä½¿ç¨ä¼æ å·",value:"not_use_coupon"}),a});st(()=>{clearTimeout(R)});const we=k(()=>{var a;return j.value?j.value:(a=p.value)==null?void 0:a.price}
1),{isAnniversary:ae,anniversaryPrice:oe}=Oe(y,we,!1);return(a,e)=>{const s=at("a-select"),c=Ee,S=Pe,i=Be,E=Ie,x=Le,m=Re;return f.status==="success"?(_(),C("div",lt,[t("img",{width:44,src:o(Xe)},null,8,rt),e[7]||(e[7]=t("div",{class:"text-[16px] text-[#202328] leading-[26px] font-medium mt-[6px] mb-[11px]"}," æ¥åæå ",-1)),e[8]||(e[8]=t("div",{class:"text-[14px] text-[#757A88] mb-[5px] leading-[22px] font-normal"}," æ·»å å°Qé¢åå¦ä¹ èµæ ",-1)),t("img",{class:"mb-[20px]",width:100,src:o(de)},null,8,ct)])):(_(),C("div",dt,[t("div",pt,[(_(!0),C(D,null,xe(o(g),n=>(_(),C("div",{key:n.id,class:ee(["px-[20px] py-[16px] rounded-[8px] flex-1 h-170px md:h-170px","border-[1px] flex gap-[12px] justify-between","flex-col cursor-pointer",o(p).id===n.id?"border-[#E74C3C] bg-[rgba(231,76,60,0.05)] text-[#E74C3C]":"border-[#FFE1E1] bg-[#FDF7F7]"]),onClick:()=>_e(n)},[t("div",xt,I(n.name),1),t("div",null,[t("div",ft,[t("div",null,[v(o(X),{class:"text-[#E74C3C]"})]),e[9]||(e[9]=t("div",{class:"font-300"},[t("span",{class:"text-[#400704] mr-[4px]"},"16"),t("span",{class:"text-[#470001CC]"},"å è§é¢è¯¾")],-1))]),t("div",_t,[t("div",null,[v(o(X),{class:"text-[#E74C3C]"})]),e[10]||(e[10]=t("div",{class:"font-300"},[t("span",{class:"text-[#400704] mr-[4px]"},"2"),t("span",{class:"text-[#470001CC]"},"åºç´æ")],-1))]),t("div",vt,[t("div",null,[v(o(X),{class:"text-[#E74C3C]"})]),e[11]||(e[11]=t("div",{class:"font-300"},[t("span",{class:"text-[#400704] mr-[4px]"},"1"),t("span",{class:"text-[#470001CC]"},"个ææè°çä¼å")],-1))])]),t("div",mt,"åä»·ï¼Â¥"+I(n.original_price),1)],10,ut))),128))]),e[19]||(e[19]=t("div",{class:"mt-30px"},null,-1)),t("div",yt,[o(l)?(_(),Z(o(We),{key:0,loading:f.status!=="PAY",class:"h-full"},{default:w(()=>[t("div",gt,[f.status==="PAY"?(_(),C(D,{key:0},[t("div",bt,[e[12]||(e[12]=t("div",{class:"text-[#757A88] text-14px w-56px mr-32px flex justify-between"},[t("span",null,"ä¼"),t("span",null,"æ "),t("span",null,"å¸")],-1)),t("div",Ct,[v(o(nt),{theme:F},{default:w(()=>{var n;return[v(s,{value:o(r).coupon_id,"onUpdate:value":e[0]||(e[0]=d=>o(r).coupon_id=d),onChange:G,options:o(h),class:"w-full",allowClear:"",placeholder:(n=o(h))!=null&&n.length?"è¯·éæ©ä¼æ å¸":"ææ ä¼æ å¸"},null,8,["value","options","placeholder"])]}),_:1})])]),t("div",wt,[e[13]||(e[13]=t("div",{class:"text-[#757A88] text-14px py-19px md:py-0px"},"æ¯ä»æ¹å¼",-1)),v(o(le),{class:"flex-1",value:o(y),"onUpdate:value":e[1]||(e[1]=n=>K(y)?y.value=n:null),onChange:ve},null,8,["value"])]),v(o(Fe),{class:"pt-8px","pay-type":o(y),"product-order":o(Y),"show-discount-tag":!1},{price:w(()=>[t("span",ht," Â¥"+I(o(oe)),1)]),extra:w(()=>[v(o(it),null,{content:w(()=>[t("img",{src:o(de)},null,8,St)]),default:w(()=>[e[14]||(e[14]=t("div",{class:"mt-4px leading-[19.6px] text-12px text-[#B1B1B1]"}," æ·»å å°Qäºè§£æ´å¤>> ",-1))]),_:1})]),_:1},8,["pay-type","product-order"])],64)):L("",!0)])]),_:1},8,["loading"])):L("",!0)]),o(l)?L("",!0):(_(),C(D,{key:0},[t("div",At,[v(c,{class:"!py-20px mobile-border cell",title:"伿 å¸",center:"",isLink:"",onClick:e[2]||(e[2]=n=>q.value=!0),"title-class":["text-[#757A88]","text-15px"]},{value:w(()=>[o(r).coupon_id&&o(r).coupon_id!=="not_use_coupon"?(_(),C("div",kt,[t("div",Tt,"-Â¥"+I(o(me)),1),t("div",Et,I(o(ye)),1)])):L("",!0),o(h).length===0?(_(),C("div",Pt," ææ å¯ç¨")):L("",!0)]),_:1})]),t("div",Bt,[e[17]||(e[17]=t("div",{class:"py-20px text-[#757A88] text-14px"},"æ¯ä»æ¹å¼",-1)),v(o(le),{value:o(y),"onUpdate:value":e[3]||(e[3]=n=>K(y)?y.value=n:null),class:"py-8px"},null,8,["value"]),t("div",It,[o(ae)?(_(),C("div",{key:0,class:ee([{"isAnniversary-text":o(ae)}])},"å¨å¹´åºÂ·8æ",2)):L("",!0),e[16]||(e[16]=t("div",null,"åºä»",-1)),t("div",Lt,[t("span",Rt,I(o(oe)),1),e[15]||(e[15]=ot(" å
"))])]),t("div",{onClick:V,class:"w-full mt-[20px] rounded-[5px] h-[44px] flex justify-center items-center bg-[#e74c3c] text-[#ffffff]"}," ç«å³æ¯ä» ")]),v(m,{show:o(q),"onUpdate:show":e[6]||(e[6]=n=>K(q)?q.value=n:null),round:"",closeable:!0,position:"bottom"},{default:w(()=>{var n;return[e[18]||(e[18]=t("div",{class:"text-17px text-[#202328] font-semibold text-center pt-16px pb-10px"},"鿩伿 å¸ ",-1)),((n=o(h))==null?void 0:n.length)>0?(_(),C("div",Vt,[v(E,{modelValue:o(r).coupon_id,"onUpdate:modelValue":e[4]||(e[4]=d=>o(r).coupon_id=d)},{default:w(()=>[v(i,{inset:""},{default:w(()=>[(_(!0),C(D,null,xe(o(h),d=>(_(),Z(c,{key:d.value,class:"!py-20px",title:d.label,clickable:"",onClick:b=>G(d.value)},{"right-icon":w(()=>[v(S,{disabled:d.disabled,name:d.value,"checked-color":"#e74c3c","icon-size":"24px"},null,8,["disabled","name"])]),_:2},1032,["title","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"]),t("div",qt,[t("div",{onClick:e[5]||(e[5]=d=>q.value=!1),class:"w-full h-44px mt-16px bg-[#202328] text-[#F9DEB6] text-16px flex justify-center items-center rounded-5px"},"ç¡®å®")])])):(_(),Z(x,{key:1,description:"ææ æ°æ®"}))]}),_:1},8,["show"])],64))]))}}}),Mt=Me(Ot,[["__scopeId","data-v-52ed80fb"]]);export{Mt as default};
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.