PageSourceSearch

https://s.dvdfab.cn/dist/202603/_nuxt3/VYCzfpFg.js

js dvdfab.cn collected 2026-10-01 11:47:23 UTC 9,837 bytes, 1 lines download raw bytes

1import{x as ye,U as l,b as le,y as ke,b7 as ie,b8 as W,b9 as we,ba as be,A as he,u as Ce,aW as xe,_ as Te}from"./CCBpn2jN.js";import _e from"./Cm5sdiG-.js";import Ie from"./CetlwuBU.js";import{l as Le,r as f,t as Me,B as Pe,y as Se,i as Re,m as b,I as $,F as h,s as d,O as re,P as G,u as _,L as Ee,J as Fe,T as De,a1 as He,H as Ne,o as i,M as Be}from"./CQFj2rK5.js";import"./_DaKjOLS.js";import"./C-PlcRpI.js";const Ae={key:1,class:"egg-social-proof"},Oe=["disabled"],$e={class:"egg-tips-dlg"},Ge=["innerHTML"],je=["innerHTML"],Ve=["innerHTML"],se=3e3,ze=Le({__name:"index",props:{pageType:{type:String,default:""},promotionInfo:{type:Object,default:()=>({})},lotteryConfig:{type:Object,required:!0},imgDir:{type:String,default:""},windowFnName:{type:String,default:"openEggSmash"},mockCouponCode:{type:String,default:""},shakeEnabled:{type:Boolean,default:!0}},emits:["complete","close"],setup(t,{expose:ce,emit:ue}){const q=ue,n=t,I={egg:"https://images.dvdfab.cn/media/egg_enpeuf.png/public",hammer:"https://images.dvdfab.cn/media/cz_i0d3c7.png/public",eggOpen:"https://images.dvdfab.cn/media/egg_open_2el8l7.png/public",btnNormal:"https://images.dvdfab.cn/media/lucky_btn_n_hf3l8c.png/public",btnHover:"https://images.dvdfab.cn/media/lucky_btn_h_v4xtcc.png/public"},R=f(null),C=f(null),L=f(null),s=f(null),k=f(null),x=f(null),p=f(!1),M=f(!1),j=f(!1),H=f(!1),S=f({}),{$trace:fe}=ye();function E(o){fe.traceCustomEvent({...n.lotteryConfig.elkparams||{},promotion_id:[n.lotteryConfig.promotionId],...o})}let g=null,c=null,m=null,N=!1;const U=()=>{X()};function F(){s.value&&(l.set(s.value,{rotation:0,x:0,y:0,opacity:1}),m=l.to(s.value,{y:-6,duration:1.2,yoyo:!0,repeat:-1,ease:"sine.inOut"}))}function J(){C.value&&l.set(C.value,{xPercent:-50,yPercent:-50}),L.value&&l.set(L.value,{xPercent:-50,yPercent:-50}),k.value&&l.set(k.value,{xPercent:-50,yPercent:-50}),x.value&&l.set(x.value,{xPercent:-50,yPercent:-50})}function B(){g&&(g.kill(),g=null),c&&(c(),c=null),m&&(m.kill(),m=null),J(),R.value&&l.set(R.value,{x:0,y:0}),C.value&&l.set(C.value,{x:0,y:0,rotation:0,scale:1,opacity:1}),L.value&&l.set(L.value,{x:0,y:0,rotation:0,opacity:0,scale:1}),s.value&&l.set(s.value,{rotation:0,x:0,y:0,opacity:1}),k.value&&l.set(k.value,{x:0,y:0,rotation:0,scale:1,opacity:0}),x.value&&l.set(x.value,{x:0,y:0,rotation:0,opacity:0,scale:.5})}function de(){return new Promise(o=>{m&&(m.kill(),m=null),c=o;const e=l.timeline({onComplete:()=>{c=null,o()}});g=e;const a=u=>{const r=u===2;e.to(s.value,{rotation:-20,duration:.14,ease:"power2.out"}),e.to(s.value,{rotation:55,duration:.18,ease:"power3.in"}),e.to(C.value,{keyframes:[{rotation:-18,duration:.08},{rotation:18,duration:.12},{rotation:-9,duration:.1},{rotation:4,duration:.06},{rotation:0,duration:.04}],ease:"elastic.out(1, 0.3)"},"<"),n.shakeEnabled&&R.value&&e.to(R.value,{keyframes:[{x:-7},{x:7},{x:-4},{x:4},{x:0}],duration:.12},"<"),r&&k.value&&e.fromTo(k.value,{opacity:0,scale:.8},{opacity:1,scale:1,duration:.3,ease:"power2.out"},"<"),r?e.to(s.value,{rotation:-90,x:80,y:-50,opacity:0,duration:.3,ease:"power2.out"}):e.to(s.value,{rotation:0,duration:.22,ease:"power2.out"})};a(0),a(1),a(2),e.fromTo(x.value,{opacity:0,scale:.5},{opacity:1,scale:1.8,duration:.3,ease:"power2.out"}),e.to([C.value,k.value],{opacity:0,scale:.95,duration:.3},"+=0"),e.fromTo(L.value,{opacity:0,scale:.95},{opacity:1,scale:1,duration:.3},"<"),e.to(x.value,{opacity:.3,duration:.4})})}Me(()=>{N=!0;const o={event:"show",event_category:"go_draw",ext_params_str_param2:"promotion_game"};n.pageType==="pop"&&(o.event_label="popup"),E(o),window[n.windowFnName]=e=>V(e),[I.eggOpen,I.hammer,I.btnHover].forEach(e=>{const a=new Image;a.src=e}),Pe(()=>{if(J(),F(),n.pageType==="pop"){V({skipCache:!0});return}X()}),window.addEventListener("pageshow",U)}),Se(()=>{N=!1,g&&(g.kill(),g=null),c&&(c(),c=null),m&&(m.kill(),m=null),window.removeEventListener("pageshow",U),l.killTweensOf([C.value,L.value,s.value,k.value,x.value].filter(Boolean)),delete window[n.windowFnName]});function pe(){j.value=!0,E({event:"click",event_category:"go_draw",event_label:"rule"})}function Y(){j.value=!1,E({event:"click",event_category:"go_draw",event_label:"rule_close"})}function K(){E({event:"show",event_category:"go_draw",event_label:"rule"})}ce({onTipsShown:K,closeDlg:z});const Q=le.common().locale,ge=le.common().ip,me=ke(),D=Re("promotionCommonData",null);function X(){if(n.pageType==="pop")return;const o=ie(n.lotteryConfig.tag);if(!(o!=null&&o.code)||o.code==="thanks"||!o.floaterReady)return;const e=W(o.code);e&&(S.value=e,M.value=!1,H.value=!0,p.value=!1,B(),F())}async function ve(o){var T,v,y,w,P;if(n.mockCouponCode)return{coupon_code:n.mockCouponCode,level:null};const{apiPromotion:e}=he(),u=await(n.lotteryConfig.apiMethod==="getLotteryGuaranteed"?e.getLotteryGuaranteed.bind(e):e.getLottery.bind(e))({lang:Q,type:n.lotteryConfig.tag,ip:ge,domain:(v=(T=Ce())==null?void 0:T.web_domain)==null?void 0:v[Q],email:o||me,product_line:n.lotteryConfig.productLine});if((y=u.error)!=null&&y.value)throw new Error(`lottery network error: ${u.error.value.message}`);const r=u.data.value||{};if(r.cscode===0)return{coupon_code:((w=r.data)==null?void 0:w.coupon_code)||null,level:((P=r.data)==null?void 0:P.level)??null};throw new Error(`lottery api cscode=${r.cscode}`)}async function V(o){var T;if(p.value)return;p.value=!0;const e=!n.mockCouponCode&&!(o!=null&&o.skipCache)?ie(n.lotteryConfig.tag):null;let a=null,u="thanks";const r=de();try{if(e!=null&&e.code){if(await Promise.all([r,new Promise(y=>setTimeout(y,se))]),!N){p.value=!1;return}a=W(e.code),u=e.code}else{const[y]=await Promise.allSettled([ve(o==null?void 0:o.email),new Promise(A=>setTimeout(A,se))]);if(await r,!N){p.value=!1;return}if(y.status==="rejected"){B(),F(),p.value=!1;return}const{coupon_code:w,level:P}=y.value;a=W(w),u=w||"thanks",n.mockCouponCode||we(n.lotteryConfig.tag,{code:w||"thanks",strText:(a==null?void 0:a.discount)||"",level:P})}const v={event:"click",event_category:"go_draw",event_value:u,ext_params_str_param2:"promotion_game"};n.pageType==="pop"?v.event_label="popup":v.event_label=e?"again":"first",E(v),S.value=a||{},M.value=!0,q("complete"),a!=null&&a.coupon&&((T=D==null?void 0:D.updateLotterInfo)==null||T.call(D,{couponCode:
1a.coupon}))}catch{B(),F(),p.value=!1}finally{M.value&&(p.value=!1)}}function z(){g&&(g.kill(),g=null),c&&(c(),c=null),M.value=!1,p.value=!1,document.body.style.overflow="",S.value&&S.value.coupon&&(H.value=!0,be(n.lotteryConfig.tag)),B(),F(),q("close")}return(o,e)=>{var T,v,y,w,P,A,Z,ee,te,oe;const a=xe,u=_e,r=Ie;return i(),b("div",{class:Ne(["egg-smash",t.pageType==="pop"?"egg-smash--pop":""])},[t.pageType!=="pop"?(i(),$(a,{key:0,class:"egg-social-proof",names:((T=t.promotionInfo)==null?void 0:T.names)||[],"roll-desc":((v=t.promotionInfo)==null?void 0:v.rollDesc)||""},null,8,["names","roll-desc"])):(y=t.promotionInfo)!=null&&y.rollFloaterDesc?(i(),b("div",Ae,re(t.promotionInfo.rollFloaterDesc),1)):h("",!0),d("div",{ref_key:"stageRef",ref:R,class:"egg-stage"},[d("div",{ref_key:"eggRef",ref:C,class:"egg-img",style:G(`background-image: url(${I.egg})`)},null,4),d("div",{ref_key:"eggOpenRef",ref:L,class:"egg-open",style:G(`background-image: url(${I.eggOpen})`)},null,4),d("div",{ref_key:"hammerRef",ref:s,class:"hammer-img",style:G(`background-image: url(${I.hammer})`)},null,4),(i(),b("svg",{ref_key:"crackRef",ref:k,class:"egg-cracks",viewBox:"0 0 100 120",preserveAspectRatio:"xMidYMid meet"},[...e[2]||(e[2]=[d("path",{d:"M50,18 L42,38 L48,54 L40,74"},null,-1),d("path",{d:"M50,18 L58,40 L52,60"},null,-1),d("path",{d:"M50,18 L50,34 L44,48"},null,-1)])],512)),d("div",{ref_key:"glowRef",ref:x,class:"egg-glow"},null,512)],512),d("button",{class:"egg-btn",disabled:_(p),style:G(`background-image: url(${I.btnNormal})`),onClick:e[0]||(e[0]=O=>V())},null,12,Oe),(w=t.promotionInfo)!=null&&w.tips?(i(),b("div",{key:2,class:"egg-tips-trigger",onClick:pe},re(t.promotionInfo.tips),1)):h("",!0),t.pageType==="pop"?(i(),b("div",{key:3,class:"egg-close-btn",title:"close-btn",onClick:z})):h("",!0),(i(),$(He,{to:"body"},[Ee(De,{name:"tips-dlg-fade",onAfterEnter:K},{default:Fe(()=>{var O,ne,ae;return[_(j)?(i(),b("div",{key:0,class:"egg-tips-overlay",onClick:Be(Y,["self"])},[d("div",$e,[d("button",{class:"egg-tips-close",onClick:Y},"\xD7"),(O=t.promotionInfo)!=null&&O.tipTitle?(i(),b("h3",{key:0,class:"egg-tips-title",innerHTML:t.promotionInfo.tipTitle},null,8,Ge)):h("",!0),(ne=t.promotionInfo)!=null&&ne.tipDesc?(i(),b("ul",{key:1,class:"egg-tips-desc",innerHTML:t.promotionInfo.tipDesc},null,8,je)):h("",!0),(ae=t.promotionInfo)!=null&&ae.tipExtra?(i(),b("p",{key:2,class:"egg-tips-extra",innerHTML:t.promotionInfo.tipExtra},null,8,Ve)):h("",!0)])])):h("",!0)]}),_:1})])),_(H)&&!_(M)?(i(),$(u,{key:4,"select-info":_(S),"lottery-config":t.lotteryConfig,"promotion-info":t.promotionInfo,onClose:e[1]||(e[1]=O=>H.value=!1)},null,8,["select-info","lottery-config","promotion-info"])):h("",!0),_(M)?(i(),$(r,{key:5,"select-info":_(S),"show-success-dlg":_(M),names:((P=t.promotionInfo)==null?void 0:P.names)||[],"roll-desc":((A=t.promotionInfo)==null?void 0:A.rollDesc)||"","coupon-desc":((Z=t.promotionInfo)==null?void 0:Z.selectCouponDesc)||"","btn-label":((ee=t.promotionInfo)==null?void 0:ee.selectBtnLabel)||"","footer-text":((te=t.promotionInfo)==null?void 0:te.footerText)||"","coupon-dlg-bg":((oe=t.promotionInfo)==null?void 0:oe.couponDlgBg)||"","lottery-tag":t.lotteryConfig.tag,elkparams:t.lotteryConfig.elkparams||{},"promotion-id":t.lotteryConfig.promotionId,"product-line":t.lotteryConfig.productLine||"",onClose:z},null,8,["select-info","show-success-dlg","names","roll-desc","coupon-desc","btn-label","footer-text","coupon-dlg-bg","lottery-tag","elkparams","promotion-id","product-line"])):h("",!0)],2)}}}),Qe=Te(ze,[["__scopeId","data-v-7295d5d4"]]);export{Qe 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.