PageSourceSearch

https://008-47.vip/assets/theme-0/ReporterFacebookImp.BldcTX-Q.js

js 008-47.vip collected 2026-10-09 04:33:33 UTC 7,678 bytes, 1 lines download raw bytes

1var x=Object.defineProperty;var D=(l,o,e)=>o in l?x(l,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[o]=e;var C=(l,o,e)=>D(l,typeof o!="symbol"?o+"":o,e);import{b as w,rI as i,z as A,bH as N,rJ as V,qU as L,qH as _,u as O,rK as T,ga as b,e1 as S,dz as q,qM as U}from"./commonChunk.Dhe5lqYh.js";import{g as I,s as $}from"./utils.D87q6YUL.js";import{injectFbSdkAndPageView as W,reinitFbPixelWithUserData as B}from"./fb.sdk.D6D3yM6o.js";import"./vendorChunk.BdsO83GQ.js";import"../vendors/vendor-stable.B8ub4Ug6.js";import"../vendors/vendor-swiper.T_wbf2QY.js";function j(l){const o=Date.now(),e=Math.floor(Math.random()*1e6).toString().padStart(6,"0");return[l,o,e].filter(Boolean).join("-")}function z(l){var f;const o=[i.PageView,i.ViewContent,i.PwaInstalled,i.Login,i.Logout,i.RechargeClick,i.WithdrawOrderSuccess,i.PwaFirstOpen,i.RechargeSelectAmount,i.EnterGame],{eventName:e,eventId:t,extra:n}=l,{getMetaCookie:r}=A();if(o.includes(e)){const s={event_name:e,event_id:t,channel_id:N().urlParams.cid,user_id:(f=w().userInfos)==null?void 0:f.username,extra:n,fbp:r("_fbp"),fbc:r("_fbc")};V(s)}}function G(l){const o=[i.PageView,i.ViewContent,i.Login,i.RegisterClick,i.Register,i.RechargeClick,i.FirstRecharge,i.Recharge,i.Deposit,i.WithdrawOrderSuccess,i.PwaInstalled,i.PwaFirstOpen,i.RechargeSelectAmount,i.EnterGame],e=[i.Register,i.RechargeClick,i.FirstRecharge,i.Deposit];return{isFilter:!o.includes(l),isMapping:e.includes(l),multiply:l==i.FirstRecharge}}function H(l,o,e){var c,m,d,h;const{userInfos:t}=w(),n={content_type:"product",external_id:e,user_name:(c=w().userInfos)==null?void 0:c.platfromid},r={value:Number((m=o.amount)!=null?m:0),currency:(d=o.currency)!=null?d:t==null?void 0:t.currency,order_id:(h=o.orderNo)==null?void 0:h.toString()},s={AddPaymentInfo:a=>({...n,...r,content_ids:a.content_ids,contents:a.contents}),AddToCart:a=>({...n,...r,content_ids:a.content_ids,contents:a.contents}),AddToWishlist:a=>({...n,...r,content_ids:a.content_ids,contents:a.contents}),CompleteRegistration:()=>({...n,...r,status:!0}),Contact:()=>n,CustomizeProduct:()=>n,Donate:()=>n,FindLocation:()=>n,InitiateCheckout:a=>({...n,...r,num_items:a.num_items,content_ids:a.content_ids,contents:a.contents}),Lead:()=>({...n,...r}),Purchase:a=>({...n,...r,num_items:a.num_items,content_ids:a.content_ids,contents:a.contents}),Schedule:()=>n,Search:a=>({...n,content_ids:a.content_ids,contents:a.contents,search_string:a.search_string}),StartTrial:a=>({...n,...r,predicted_ltv:a.predicted_ltv}),SubmitApplication:()=>n,Subscribe:a=>({...n,...r,predicted_ltv:a.predicted_ltv}),ViewContent:a=>({...n,...r,content_ids:a.content_ids,contents:a.contents})}[l];return s?s(o):{...n,...r}}class y extends L{constructor(e){super(_.FacebookMatePixel);C(this,"platformId");C(this,"platformConfig");C(this,"eventMap");this.platformConfig=e,this.initByManual()}initialize(){}disableV1ForFbV2(){this.platformId=void 0,this.eventMap=void 0,this.isInitialized=!1;const e=window;e.FacebookMatePixel===this&&(e.FacebookMatePixel=void 0)}initByManual(){var f,s,c,m,d,h,a,u;const e=(f=O().siteCode)!=null?f:"",t=(c=(s=this.platformConfig)==null?void 0:s.debugChannel)==null?void 0:c.monitor_type;if(e==="1757"&&t!==!0&&this.isNonAdLink())return;const n={190:"502096145140928",252:"2659889657642835"};if(((m=this.platformConfig)==null?void 0:m.closed)===!0){this.disableV1ForFbV2();return}const r=((d=this.platformConfig)==null?void 0:d.gid)||new URL(location.href).searchParams.get("fb_dynamic_pixel")||n[e];if(this.platformId=this.isValidTrackingId(r)?r:void 0,this.platformId&&T({gid:this.platformId,closed:(h=this.platformConfig)==null?void 0:h.closed,debugChannel:(a=this.platformConfig)==null?void 0:a.debugChannel})){this.disableV1ForFbV2();return}if(this.platformId){const g=(u=this.platformConfig)==null?void 0:u.eventMap;this.eventMap=g==null?void 0:g.reduce((p,v)=>(p[v.originEventName]=v.platformEventName,p),{}),this.loadJs(),this.createNoScript(),window.FacebookMatePixel=this,this.isInitialized=!0}}report(e){if(!this.platformId)return;const t=window.fbq;if(typeof t=="function"&&t.callMethod&&t.loaded){this.executeTrack(e);const n=b.localStorage.get(_.FacebookMatePixel)||[];n.length>0&&(n.forEach(r=>this.executeTrack(r)),b.localStorage.set(_.FacebookMatePixel,[]))}else this.handleSdkNotReady(e)}executeTrack(e){var g,p,v,F,P,M;const{eventName:t,payload:n}=e,{userInfos:r}=w(),f=(g=n==null?void 0:n.username)!=null?g:r==null?void 0:r.username,s=(p=this.eventMap)==null?void 0:p[t],c=H(s||t,n,f);if((F=(v=this.platformConfig)==null?void 0:v.debugChannel)!=null&&F.link_value){const k=(R,E)=>Math.floor(Math.random()*(E-R+1))+R;t===i.ViewContent?c.value=k(1,2):t===i.Register?c.value=k(3,8):t===i.RechargeClick&&(c.value=k(9,20))}const m=!!((M=(P=this.platformConfig)==null?void 0:P.debugChannel)!=null&&M.official_event_name),d=[i.RechargeSelectAmount,i.EnterGame];
1if(!m&&d.includes(t))return;const h=G(t);if(h.isFilter)return;const a=[i.FirstRecharge,i.Recharge,i.Deposit];let u;t===i.Register?u=String(f):a.includes(t)&&(n!=null&&n.orderNo)?u=String(n.orderNo):u=j(),z({...e,eventId:u,extra:c}),m?s&&this.rawFbq("trackSingle",s,c,`${s}-${u}`):(h.isMapping&&s&&this.rawFbq("trackSingle",s,c,`${s}-${u}`),(!h.isMapping||h.multiply)&&this.rawFbq("trackSingleCustom",t,c,`${t}-${u}`))}rawFbq(e,t,n,r){window.fbq(e,this.platformId,t,n,{eventID:r})}handleSdkNotReady(e){const{eventName:t,payload:n}=e;[i.Register,i.RechargeClick,i.FirstRecharge,i.Recharge,i.Deposit].includes(t)&&(S.doReport({rule:S.rules.SENSOR_BURIED,eventName:S.sensorEvents.Error,payload:{errorType:"fb_sdk_load_error",errorEventName:t,errorEventPayload:n}}),y.uploadCache(e))}async loadJs(){var e,t;if(this.platformId)try{const{isP2a:n}=q();let r=!1;if(n&&!U){const d=`pwa_first_open_sent_${this.platformId}`;b.localStorage.getAny(d)||(r=!0,b.localStorage.setAny(d,!0))}let f;if(this.isFbAdvancedMatchingEnabled()){const d=I();if(d&&Object.keys(d).length>0){const{userInfos:h}=w(),a=String((e=h==null?void 0:h.username)!=null?e:""),u=(t=d.username)!=null?t:"";if(a&&a===u){const{username:g,...p}=d;f=p}}}if(!await W(this.platformId,f))return;await this.waitForFbpCookie();const c=new URLSearchParams(location.search);c.get("pwaLaunch")==="1"&&c.has("fbPixelId")||this.handleCustomReporting(i.ViewContent),r&&this.handleCustomReporting(i.PwaFirstOpen)}catch(n){console.error("An error occurred while loading the Facebook Pixel script:",n)}}createNoScript(){var t;(t=document.querySelector("#fb-noscript"))==null||t.remove();const e=document.createElement("noscript");e.id="fb-noscript",e.innerHTML=`<iframe title="facebook" src="https://www.facebook.com/tr?id=${this.platformId}&ev=PageView&noscript=1" height="0" width="0" style="display: none; visibility: hidden"></iframe>`,document.body.insertBefore(e,document.body.children[0])}static uploadCache(e){const t=b.localStorage.get(_.FacebookMatePixel)||[];t.push(e);const n=t.slice(-20);b.localStorage.set(_.FacebookMatePixel,n)}waitForFbpCookie(e=5e3){return new Promise(t=>{if(document.cookie.includes("_fbp=")){t(!0);return}const n=Date.now(),r=setInterval(()=>{document.cookie.includes("_fbp=")?(clearInterval(r),t(!0)):Date.now()-n>=e&&(clearInterval(r),t(!1))},300)})}async handleCustomReporting(e,t={}){this.report({eventName:e,payload:t})}isFbAdvancedMatchingEnabled(){var e,t;return!!((t=(e=this.platformConfig)==null?void 0:e.debugChannel)!=null&&t.enableadvancedmatching)}reinitWithAdvancedMatching(e){if(!this.platformId||!this.isFbAdvancedMatchingEnabled())return;$(e);const t=I();if(!t||Object.keys(t).length===0)return;const{username:n,...r}=t;Object.keys(r).length!==0&&B(this.platformId,r)}}export{y as ReporterFacebookImp,y 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.