PageSourceSearch

https://echevarriatiketxeberriara.com/g_assets/js/member.js?v=69a73d3&lang=th

js echevarriatiketxeberriara.com collected 2026-10-03 02:33:19 UTC 42,386 bytes, 906 lines download raw bytes

1// cache: 2026-09-02 22:18:11
2//vc version lastest update 31/10/2021
3
4Vue.component('entrance-games-theme1',()=>import('/components/entrance_game_original.js?v='+HASH));
5Vue.component('entrance-games-theme2',()=>import('/components/entrance_game_minitab.js?v='+HASH));
6Vue.component('entrance-games-theme3',()=>import('/components/entrance_game_landscape.js?v='+HASH));
7
8window.resetMemberGamePanelStickyState = function () {
9    try {
10        var panel = document.querySelector('.section-wrapper-container.game-list-panel');
11        if (panel) {
12            panel.style.removeProperty('position');
13            panel.style.removeProperty('top');
14            panel.style.removeProperty('height');
15            panel.style.removeProperty('z-index');
16        }
17
18        // Reset scroll position of game grids and side menu
19        var scrollables = document.querySelectorAll(
20            '.section-wrapper-container.game-list-panel .game-grid, ' +
21            '.section-wrapper-container.game-list-panel .side-menu-main__items'
22        );
23        scrollables.forEach(function (el) {
24            el.style.removeProperty('overscroll-behavior-y');
25            el.scrollTop = 0;
26        });
27
28        var member = document.getElementById('member');
29        if (member) {
30            member.style.removeProperty('height');
31            member.style.removeProperty('min-height');
32            member.scrollTop = 0;
33        }
34
35        var main = document.querySelector('.main');
36        if (main) {
37            main.scrollTop = 0;
38        }
39
40        // window.scrollTo is more reliable than scrollTop on iOS Safari
41        window.scrollTo(0, 0);
42    } catch (error) {
43        console.warn('resetMemberGamePanelStickyState failed', error);
44    }
45};
46
47const router = new VueRouter({
48    routes: [
49        { path: '/', name: 'home', component: member_index },
50        { path: '/deposit', name: 'deposit', component: member_deposit },
51        { path: '/crypto', name: 'crypto', component: member_crypto },
52        { path: '/cryptodeposit', name: 'cryptodeposit', component: member_cryptodeposit },
53        { path: '/deposit/slip', name: 'deposit-slip', component: member_deposit_slip },
54        { path: '/history', name: 'history', component: member_history },
55        { path: '/withdraw', name: 'withdraw', component: member_withdraw },
56        { path: '/profile', name: 'profile', component: member_profile },
57        { path: '/notify', name: 'notify', component: member_notify },
58        { path: '/ref', name: 'ref', component: member_ref },
59        { path: '/promotion', name: 'promotion', component:member_promotion },
60        { path: '/games/:type', name: 'game-sub', component: member_game_sub },
61        { path: '/games/:type/:vendor', name: 'game-sub-vendor', component: member_game_sub_list },
62        { path: '/games-enter', name: 'game-box', component: member_game_box  },
63    ],
64});
65
66function authRouteFail(route) {
67    if (!_.includes(['game-sub', 'game-sub-vendor'], route)) return location.href = '/login';
68    return location.href = '/';
69}
70
71router.beforeEach((to, from, next) => {
72    Vue.nextTick(function() {
73        if (router.app.logged === false) {
74            authRouteFail(to.name);
75        }
76        if (this.isSafari) window.scrollTo({top: 0, left: 0, behavior: 'smooth'});
77        if($('#navbarSupportedContent').length){
78            new bootstrap.Collapse(document.querySelector('#navbarSupportedContent'), {toggle: false}).hide();
79        }
80        next();
81    });
82});
83
84
85const _member = new Vue({
86    el: '#app',
87    mixins: [_V],
88    router,
89    data() {
90        return {
91            user: {},
92            next_game: null,
93            next_meta: {},
94            credit: 'Loading...',
95            notify:{},
96            notifyMessageCount: 0,
97            el: {
98                loginModal: null,
99                sliderShow: true,
100            },
101            loading: false,
102            select2: {
103                bank_id: {
104                    templateResult: (opt) => {
105                        if (!opt.id) return opt.text; // optgroup
106                        let bank_id = $(opt.element).data('bank_id');
107                        return `<img class='flag' src='/assets/method-icon/${bank_id}.png'/><span class="str">${opt.text}</span>`;
108                    },
109                    templateSelection: (opt)=>{
110                        if (!opt.id) return opt.text; // optgroup
111                        let bank_id = $(opt.element).data('bank_id');
112                        let acc_no = $(opt.element).data('acc_no');
113                        let name = $(opt.element).data('name');
114                        return $(opt.element).val() === '0' ? opt.text : `<img class='flag' src='/assets/method-icon/${bank_id}.png'><span class="str">${opt.text}</span>`;
115                    },
116                    minimumResultsForSearch: -1,
117                    width: '100%',
118                    // height: '20px',
119                    escapeMarkup: function(m) { return m; }
120                },
121                imgLeft: {
122                    templateResult: (opt) => {
123                        if (!opt.id) return opt.text; // optgroup
124                        let logo = $(opt.element).data('img');
125                        return `<img class="sel-img" src="${logo}"><span class="str">${opt.text}</span>`;
126                    },
127                    templateSelection: (opt)=>{
128                        if (!opt.id) return opt.text; // optgroup
129                        let logo = $(opt.element).data('img');
130                        return $(opt.element).val() === '0' ? opt.text : `<img class="sel-img" src="${logo}"><span class="str">${opt.text}</span>`;
131                    },
132                    minimumResultsForSearch: -1,
133                    width: '100%',
134                    // height: '20px',
135                    escapeMarkup: function(m) { return m; }
136                },
137            },
138            latestDateUpdateCredit:'-',
139            bankList:[],
140            isSafari:false,
141            playgame:false,
142            fullscreen:false,
143            currentPlay:'',
144            showNavInGame:false,
145            addHomeScreen:true,
146            depositBank:[],
147            deposit:{
148                info:{},
149                bank_list:[],
150                payment_gateway:[]
151            },
152            crypto_active_account: null,
153            withdraw:{
154                info: {},
155                fm: {amount: 0}, 
156            },
157            formWithdraw:{
158                amount: ''
159            },
160            force_target:false,
161            game_theme:{
162                type:1
163            },
164            mobile_menu_active:false,
165            route_name: 'member',
166            save_obj_play:{},
167            ref_root:{},
168            side_menu_right_active: false
169        }
170    },
171    methods: {
172        resetScrollAll() {
173            window.scrollTo(0, 0);
174            document.body.scrollTop = 0;
175            document.documentElement.scrollTop = 0;
176            var memberEl = document.getElementById('member');
177            if (memberEl) memberEl.scrollTop = 0;
178        },
179        fitViewport(el) {
180            // CSS (100dvh + overflow:hidden + scroll chain break) จัดการ fullscreen ครบแล้ว
181            // เหลือแค่ reset scroll เพื่อความชัวร์
182            this.resetScrollAll();
183        },
184        async logout(force = false) {
185            if (!force) {
186                let r = await modal.confirm('', 'ออกจากระบบ');
187                if (!r) return;
188            }
189            Cookies.remove('member_popup_seen'); // show welcome popup again on next login
190            await this.easy.callApi('logout');
191        },
192        notifyRead() {
193            if (this.notify.unread > 0) {
194                socket.emit('notify_read');
195                this.notify.unread = 0;
196            }
197        },
198        async play(g,force_newtab = false) {
199            console.log('[play:debug] g =', g, '| keys =', g ? Object.keys(g) : null, '| route =', this.$route && this.$route.params, '| force_newtab =', force_newtab);
200            // // === BYPASS TEST FULLSCREEN (ลบทิ้งเมื่อเทสเสร็จ) ===
201            // if (true) {
202            //     this.next_meta = {};
203            //     this.next_game = 'https://m.pg-demo.com/126/index.html?&ot=ca7094186b309ee149c55c8822e7ecf2&l=en&btt=2&or=04wxexmg=7inddzsc4=gsq&__hv=2fMEUCIDA8vaFNaorBGxV%2Bp2N0BDVIBLeZkxrM5xj42j8x9P7cAiEA6cMtxWIZOfgIq1m9KM8gfmfjN0Y6%2Bk%2FXBpN3gUBlcPA%3D&__sv=010601azkdnuO6ltZVmUGtzsn2ffZ6gHyGjSKF2-IwTQIlRjo';
204            //     this.$router.push({name: 'game-box'});
205            //     this.fullscreen = true;
206            //     return;
207            // }
208            // // === END BYPASS ===
209            
210            this.save_obj_play = g;
211            if (!this.logged) return this.$router.push({name: 'login'});
212            this.loading = true;
213            if(g.vendor){
214                this.currentPlay = g.vendor;
215            }
216
217            let _isMobile = this.device.is_mobile;
218            //check type sport for let user select play by mobile ui or desktop ui
219            if(g.type == 'sport'){
220                const aHref = ezHost + '/easy/game-enter2?' + new URLSearchParams({s: localStorage.getItem('sess'), vendor: g.vendor,
221                    game_id: g.game_id,
222                    game_code: g.game_code,
223                    type:g.type
224                }).toString();
225                    await Swal.fire({
226                    icon: 'question',
227                    title: "เกมส์กีฬา(Sport)",
228                    // text:'เลือกเข้าเกมส์แบบ Mobile หรือ  Desktop',
229                    showConfirmButton: false,
230                    html: 
231                    `
232                    <div class="swal2-html-container mb-2" style="display: block;">เลือกเข้าเกมส์แบบ Mobile หรือ  Desktop</div>
233                    <div class="d-flex" style="justify-content: center;">
234                        <a class="btn btn-info mx-2" href="${aHref}" target="_blank"><i class="fa fa-tv fa-2x"></i> Desktop</a>
235                        <a class="btn btn-primary mx-2" href="${aHref}&mobile=true" target="_blank"><i class="fa fa-mobile fa-2x"></i> Mobile</a>
236                    </div>
237                    `,
238                    didOpen: ()=>{
239                        $('.btn-select-type-play-sport').on('click',function(){          
240                            _isMobile = $(this).attr('play_sport_mobile') === 'true';
241                            Swal.close();
242                        }) 
243                    }  
244                })
245            }
246            
247            let res = await this.easy.callApi('game_enter',  
248            {   vendor: g.vendor,
249                game_id: g.game_id, 
250                game_code: g.game_code, 
251                mobile:_isMobile,
252                type:g.type,
253                lang: this.language.default 
254            });
255           
256            this.loading = false;
257            if (!res.success) return modal.error(res.data || 'ไม่สามารถเข้าเล่นเกมได้ในขณะนี้ เกมอาจปิดปรับปรุงชั่วคราว!', 'ไม่สามารถเข้าเล่นเกม');
258
259            if(g.vendor === 'POCKET') {
260                // พยายามเปิดแท็บใหม่ก่อน (ถ้าไม่ถูกบล็อกจะจบที่นี่)
261                const w = window.open(res.data, '_blank');
262                if (w && !w.closed) return;
263
264                // สร้าง overlay + ปุ่มกลางจอ (fallback เมื่อถูก Safari บล็อก)
265                const appEl = document.getElementById('app');
266                if (!appEl) {
267                    // ถ้าไม่เจอ #app เปิดแท็บเดิมเป็น fallback สุดท้าย
268                    window.location.href = res.data;
269                    return;
270                }
271
272                // กันซ้ำ
273                const old = document.getElementById('open-link-overlay');
274                if (old) old.remove();
275
276                // overlay เต็มจอ
277                const overlay = document.createElement('div');
278                overlay.id = 'open-link-overlay';
279                Object.assign(overlay.style, {
280                    position: 'fixed',
281                    inset: '0',
282                    background: 'rgba(0,0,0,0.4)',
283                    display: 'flex',
284                    alignItems: 'center',
285                    justifyContent: 'center',
286                    zIndex: '99999'
287                });
288
289                // ปุ่มแบบเกม
290                const btn = document.createElement('a');
291                btn.href = res.data;
292                btn.target = '_blank';
293                btn.rel = 'noopener noreferrer';
294                btn.textContent = 'คลิกเพื่อเข้าเกม';
295                
296               // สไตล์ปุ่ม
297                Object.assign(btn.style, {
298                    display: 'inline-block',
299                    padding: '12px 28px',
300                    fontSize: '20px',
301                    fontWeight: 'bold',
302                    fontFamily: `'Comic Sans MS', sans-serif`,
303                    color: '#fff',
304                    textShadow: '0 2px 2px rgba(0,0,0,0.3)',
305                    textDecoration: 'none',
306                    borderRadius: '50px',
307                    border: '4px solid #ffe599', // outer border
308                    boxShadow: 'inset 0 -4px 0 rgba(0,0,0,0.2), inset 0 4px 0 rgba(255,255,255,0.3)',
309                    background: 'linear-gradient(#ff9933, #ff6600)',
310                    position: 'relative'
311                });
312
313                // สร้าง inner border แบบ pseudo-element ด้วย div ซ้อน
314                const innerBorder = document.createElement('div');
315                Object.assign(innerBorder.style, {
316                    position: 'absolute',
317                    top: '3px',
318                    left: '3px',
319                    right: '3px',
320                    bottom: '3px',
321                    borderRadius: '50px',
322                    border: '3px solid rgba(255,255,255,0.6)',
323                    pointerEvents: 'none'
324                });
325                btn.appendChild(innerBorder);
326
327                                // กดปุ่ม → ลบ overlay
328                btn.addEventListener('click', () => {
329                    overlay.remove();
330                });
331
332                // คลิกนอกปุ่ม → ลบ overlay
333                overlay.addEventListener('click', (e) => {
334                    if (e.target === overlay) overlay.remove();
335                });
336
337                overlay.appendChild(btn);
338                appEl.appendChild(overlay);
339
340                // จบการทำงานในบล็อกนี้ ไม่ให้โค้ดด้านล่างรันต่อ
341                return;
342            }
343
344            if(g.play_self) return location.href = res.data;    
345
346            if(_.get(_CONF, `p_game_list.${g.type}.newtab`) || force_newtab || !/^https:/.test(res.data)) return window.open(res.data, '_blank');
347            
348            let arr_sub_keno = ['keno','atom','number','rng'];
349            if(this.device.is_ios && arr_sub_keno.includes(g.vendor)) return window.open(res.data, '_blank');
350
351            if(g.vendor === 'pg_slot' && !this.device.is_mobile && !res.fake) return window.open(res.data, '_blank');
352
353            if(_.includes(['hotgraph', 'micro_gaming','esport','SEX'], g.vend
353or)) {
354                if (this.device.is_ios) return location.href = res.data;
355                return window.open(res.data, '_blank');
356            }
357        
358            if(g.new_tab) return window.open(res.data, '_blank');
359
360            this.next_meta = {};
361            if (this.user.feature[0] == '1' && _.includes(['slot'], g.type)) {
362                this.next_meta.soot = true;
363                this.next_meta.gid = g.id;
364            }
365
366            this.next_game = res.data;
367
368            this.resetScrollAll();
369            this.fullscreen = true;
370
371            this.$router.push({name: 'game-box'});
372
373        },
374        editBankId(userBankId,systemBankId){
375            if(systemBankId == 999){
376                return 999;
377            }else{
378                return userBankId;
379            }
380        },
381        openBankApp(bankId, bankCode){
382            const url = (bankCode === 'TRUE' && member_style.true_wallet_link_active)
383                ? member_style.true_wallet_link_url
384                : '/open_app?openExternalBrowser=1&id=' + this.editBankId(this.user.bank_id, bankId);
385            window.open(url, '_blank');
386        },
387        async copyBankAcc(bankNum,taget = ''){
388            let copied = false;
389            if (navigator.clipboard && window.isSecureContext) {  // ตรวจสอบว่า HTTPS หรือ localhost
390                try {
391                    await navigator.clipboard.writeText(bankNum);
392                    copied = true;
393                    console.log(' copy clipboard มือถือสมัยใหม่ทำงานปกติˆ: ' + bankNum);
394                } catch (error) {
395                    console.error('copy clipboard มือถือสมัยใหม่ error: ', error);
396                }
397            }
398            if (!copied) {
399                // Fallback for mobile and older browsers
400                let input = null;
401                if (taget) {
402                    input = document.querySelector('input.ip-copyfrom' + taget);
403                }
404                let created = false;
405                if (!input) {
406                    input = document.createElement('textarea');
407                    created = true;
408                }
409                input.style.position = 'fixed';
410                input.style.top = '0';
411                input.style.left = '0';
412                input.style.width = '2em';
413                input.style.height = '2em';
414                input.style.padding = '0';
415                input.style.border = '0';
416                input.style.outline = 'none';
417                input.style.boxShadow = 'none';
418                input.style.background = 'transparent';
419                input.style.opacity = '0';
420                if (created) {
421                    document.body.appendChild(input);
422                }
423                input.value = bankNum;
424                input.setAttribute('readonly', '');
425                input.focus();
426                input.select();
427                input.setSelectionRange(0, input.value.length);
428
429                try {
430                    copied = document.execCommand('copy');
431                } catch (error) {
432                    copied = false;
433                    console.error('document.execCommand failed: ', error);
434                }
435                if (created) {
436                    document.body.removeChild(input);
437                }
438                if (copied) {
439                    console.log('copy clipboard มือถือรุ่นเก่า สำเร็จ: ' + bankNum);
440                }
441            }
442
443            let toast_el = document.querySelector('.custom-toast-member');
444            let toast_body = toast_el.querySelector('.toast-body');
445            toast_body.innerText = `คัดลอกเลขบัญชี "${bankNum}" สำเร็จ`;
446            new bootstrap.Toast(toast_el).show();
447        },
448        async depositInfo(){
449            let res = await this.easy.callApi('deposit_info',{lang:this.language.default});
450            if (!res.success) return modal.error(res.data, res.title);
451            if(_.get(res,'data')) {
452                this.deposit.info = res.data
453            };
454            console.log('res -- deposit_info',res);
455            if(_.get(res,'payment_gateway')) {
456                this.deposit.payment_gateway = res.payment_gateway;   
457                // console.log(object);
458            }
459            return res;
460        },
461        async cryptoDepositInfo(){
462            let res = await this.easy.callApi('deposit_info',{lang:this.language.default, bankType:'cryptonet'});
463            if (!res.success) return modal.error(res.data, res.title);
464            if(_.get(res,'data')) {
465                this.deposit.info = res.data
466            };
467            console.log('res -- deposit_info',res);
468            if(_.get(res,'payment_gateway')) {
469                this.deposit.payment_gateway = res.payment_gateway;   
470                // console.log(object);
471            }
472            return res;
473        },
474        depositModal(){
475            let depositModal = new bootstrap.Modal(document.getElementById("depositModal"), {});
476            depositModal.show();
477            this.depositInfo();
478        },
479        cryptoDepositModal(){
480            let cryptoDepositModal = new bootstrap.Modal(document.getElementById("cryptoDepositModal"), {});
481            cryptoDepositModal.show();
482            this.cryptoDepositInfo();
483        },
484        async withdrawInfo() {
485            console.log('call - withdraw_info');
486            let res = await this.easy.callApi('withdraw_info');
487            console.log('res - withdraw_info',res);
488            if (!res.success) return modal.error(res.data, res.title);
489            this.withdraw.info = res.data;
490        },
491        async withdrawSubmit(){
492            if (!this.withdraw.info.withdrawable) return modal.error('ไม่สามารถถอนได้');
493
494            let fm = this.$root.withdraw.fm;
495            fm.amount = this.removeNoneNumber(fm.amount);
496            if (this.$root.user.bank_id == 999) {
497                if (member_style.max_limit_withdraw_true_wallet && fm.amount > 5000) return modal.error('ลูกค้าทรูมันนี่วอลเลท ไม่สามารถถอนเงินเกิน ครั้งละ 5,000 บาทได้');
498                if (member_style.min_withdraw_true_wallet && (fm.amount < 100 || (fm.amount % 10 !== 0))) return modal.error('ลูกค้าทรูต้องถอนเงินขั้นต่ำ 100 และต้องเป็นจำนวนเต็ม 10 เช่น 110, 120, 150, 190');
499            }
500
501            let a = await modal.confirmLoading('ยืนยันการถอนเงิน?', 'ยืนยัน');
502            if (!a) return;
503            let res = await this.easy.callApi('withdraw_req', this.withdraw.fm);
504            this.withdrawReset();
505            if (!res.success) return modal.error(res.data, res.title);
506            modal.success(res.data, res.title);
507        },
508        removeNoneNumber(value){
509            const digits = String(value || '').replace(/\D/g, '');
510            return Number(digits);
511        },
512        withdrawReset() { this.withdraw.fm = {amount: ''}; },
513        withdrawModal() {
514            this.withdrawReset();
515            let withdrawModal = new bootstrap.Modal(document.getElementById("withdrawModal"), {});
516            withdrawModal.show();
517            this.withdrawInfo();
518        },
519        convertGameName(name) {
520            let obj = {
521                lotto: 'แทงหวย',
522                slot:'สล็อต',
523                baccarat:'บาคาร่า',
524                card:'เกมส์ไพ่',
525                poker:'โป้กเกอร์',
526                sport:'แทงบอล',
527                keno:'คีโน่',
528                hotgraph:'เทรด',
529                fish:'ยิงปลา'
530            }
531            if(!obj[name]) return name;
532            return obj[name];
533        },
534        async enterDirectSite(type = '_blank', param = null) {
535            console.log('call : site_enter');
536            let res = await this.$root.easy.callApi('site_enter', param);
537            console.log('res : site_enter',res);
538            if (!res.success) return modal.error(res.data || res.code);
539            if (type === '_blank' || type === '_self') return window.open(res.data, type);
540            if (type === 'iframe') {
541                this.next_game = res.data;
542                this.$router.push({name: 'game-box'});
543                this.fullscreen = true;
544            }
545
546            //todo: iframe later
547        },
548        openSideMenu(){
549            console.log('open side menu!');
550            this.mobile_menu_active = !this.mobile_menu_active;
551        },
552        creditRequire(){
553            const element = document.querySelector('.after-txt');
554            element.classList.add('active');
555            setTimeout(() => {
556                element.classList.remove('active');
557            }, 600); 
558
559            this.easy.callApi('credit_req');
560        },
561        async getGamesRec(){
562            let res =  await this.easy.callApi('game_recommend'); //<-- { success,data} --> _.orderBy(res.data,'idx');
563            console.log('getGamesRec : -> res ' , res);
564            if(!res.success) return [];
565            return _.orderBy(res.data,'idx');
566        },
567        async refreshNotifyMessageCount() {
568            try {
569                let r = await this.easy.callApi('msg_list', {page: 1, length: 10});
570                let rows = Array.isArray(r.data) ? r.data : [];
571                this.notifyMessageCount = rows.length;
572            } catch (e) {
573                this.notifyMessageCount = 0;
574            }
575        },
576        async getGamesHit(){
577            let res = await this.easy.callApi('game_top');
578            console.log('getGamesHit : -> res ', res);
579            if(!res.success) return [];
580            return res.data;
581        }
582    },
583    computed:{
584        isLogged(){
585            return (this.logged !== null && (typeof this.logged == 'boolean') && this.logged);
586        },
587        cntNotifyUnread(){
588            if(!this.notify.data) {
589                return 0;
590            }else{
591                return (this.notify.data).filter(i => i.saw == 0).length;
592            }
593        },
594        getBankNameByBankId(){
595            if(this.user.bank_id == 0) return '-';
596            if(jQuery.isEmptyObject(this.deposit.bank_list)) return '-';
597            if(!this.deposit.bank_list[this.user.bank_id]) return '-';
598            return (this.deposit.bank_list[this.user.bank_id]).name;
599        }
600    },
601    watch: {
602        fullscreen(val){
603            
604            if($('.woot-widget-bubble.woot-widget--expanded').length){
605                if(val) {
606                    $('.woot-widget-bubble.woot-widget--expanded').each(function(){
607                        this.style.setProperty('z-index', '-1', 'important');
608                    });
609                }else {
610                    $('.woot-widget-bubble.woot-widget--expanded').each(function(){
611                        this.style.setProperty('z-index', '2147483000', 'important');
612                    });
613                }
614            }
615            
616            if(val) return $('.footer-block.mobile').css('display','none');
617            $('.footer-block.mobile').css('display','flex');
618
619
620        },
621        showNavInGame(val){
622            if(val) return $('.footer-block.mobile').css('display','flex');
623            $('.footer-block.mobile').css('display','none');
624        }
625    },
626    mounted() {
627        setTimeout(() =>{
628            let is_home_route = this.$route.name === 'home';
629            let not_show_today = Cookies.get('not_show_pop_today');
630            let already_seen = Cookies.get('member_popup_seen');
631            let member_popup = document.getElementById('memberPopup');
632            if(member_popup && is_home_route && !not_show_today && !already_seen){
633                Cookies.set('member_popup_seen', 1); // session cookie: remember for this login, cleared on logout()
634                let pop =  new bootstrap.Modal(member_popup);
635                pop.show();
636                if(member_popup.dataset.popupDisplay === 'multiple'){
637                    let popup_items = member_popup.querySelectorAll('.member-popup-item');
638                    let popup_dots = member_popup.querySelectorAll('.member-popup-dot');
639                    let popup_close = member_popup.querySelector('.member-popup-close');
640                    let popup_wrap = member_popup.querySelector('.member-popup-multiple');
641                    let popup_content = member_popup.querySelector('.member-popup-content');
642                    let popup_mode = member_popup.dataset.popupMultipleMode || 'close_next';
643                    let popup_slide_duration = Math.min(Math.max(parseInt(member_popup.dataset.popupSlideDuration, 10) || 2, 1), 10) * 1000;
644                    let popup_index = 0;
645                    let popup_slide_timer = null;
646                    let popup_touch_start = 0;
647                    let popup_is_swiping = false;
648                    let popup_is_animating = false;
649
650                    let showPopupItem = (idx, animate = true) => {
651                        if(!popup_items.length) return;
652                        let next_index = (idx + popup_items.length) % popup_items.length;
653                        let current_index = popup_index;
654                        if(next_index === current_index && popup_items[next_index].classList.contains('active')) return;
655                        if(popup_is_animating) return;
656                        popup_is_animating = true;
657                        popup_index = next_index;
658                        let current_item = popup_items[current_index];
659                        let next_item = popup_items[next_index];
660
661                        popup_items.forEach((item, item_idx) => {
662                            item.classList.toggle('active', item_idx === next_index);
663                        });
664                        if(!animate || !current_item || current_item === next_item){
665                            popup_items.forEach((item, item_idx) => {
666                                item.style.display = item_idx === next_index ? 'block' : 'none';
667                                item.style.opacity = item_idx === next_index ? '1' : '0';
668                                item.style.transform = item_idx === next_index ? 'translateX(0) scale(1)' : 'translateX(0) scale(.94)';
669                            });
670                            popup_is_animating = false;
671                        } else {
672                            if(popup_mode === 'slide'){
673                                if(popup_wrap) popup_wrap.style.minHeight = current_item.offsetHeight + 'px';
674                                next_item.style.display = 'block';
675                                next_item.style.position = 'absolute';
676                                next_item.style.top = '0';
677                                next_item.style.left = '0';
678                                current_item.style.transition = 'opacity .38s ease, transform .38s cubic-bezier(.22,.61,.36,1)';
679                                next_item.style.transition = 'opacity .38s ease, transform .38s cubic-bezier(.22,.61,.36,1)';
680                                next_item.style.opacity = '0';
681                                next_item.style.transform = 'translateX(42px) scale(.985)';
682                                requestAnimationFrame(() => {
683                                    current_item.style.opacity = '0';
684                                    current_item.style.transform = 'translateX(-48px) scale(.985)';
685                                    next_item.style.opacity = '1';
686                                    next_item.style.transform = 'translateX(0) scale(1)';
687                                });
688                                setTimeout(() => {
689                                    popup_items.forEach((item, item_idx) => {
690                                        item.style.display = item_idx === next_index ? 'block' : 'none';
691                                        item.style.position = '';
692                                        item.style.top = '';
693                                        item.style.left = '';
694                                        if(item_idx !== next_index){
695                                            item.style.opacity = '0';
696                                            item.style.transform = 'translateX(0) scale(.94)';
697                                        }
698                                    });
699                                    if(popup_wrap) popup_wrap.style.minHeight = '';
700                                    popup_is_animating = false;
701                                }, 420);
702                            } else {
703                                current_item.style.opacity = '0';
704                                current_item.style.transform = 'translateX(0) scale(.9)';
705                                setTimeout(() => {
706                                    popup_items.forEach((item, item_idx) => {
707                                        item.style.display = 'none';
708                                        item.style.opacity = '0';
709                                        item.style.transform = 'translateX(0) scale(.94)';
710                                    });
711                                    next_item.style.display = 'block';
712                                    requestAnimationFrame(() => {
713                                        next_item.style.opacity = '1';
714                                        next_item.style.transform = 'translateX(0) scale(1)';
715                                    });
716                                    setTimeout(() => {
717                                        popup_items.forEach((item, item_idx) => {
718                                            item.style.display = item_idx === next_index ? 'block' : 'none';
719                                        });
720                                        popup_is_animating = false;
721                                    }, 160);
722                                }, 140);
723                            }
724                        }
725                        popup_dots.forEach((dot, dot_idx) => {
726                            dot.classList.toggle('active', dot_idx === next_index);
727                            dot.style.background = dot_idx === next_index ? '#ffffff' : 'rgba(255,255,255,.45)';
728                        });
729                    };
730                    let stopPopupSlide = () => {
731                        if(popup_slide_timer) clearInterval(popup_slide_timer);
732                        popup_slide_timer = null;
733                    };
734                    let startPopupSlide = () => {
735                        if(popup_mode !== 'slide' || popup_items.length < 2) return;
736                        stopPopupSlide();
737                        popup_slide_timer = setInterval(() => showPopupItem(popup_index + 1), popup_slide_duration);
738                    };
739
740                    showPopupItem(0, false);
741                    popup_items.forEach((item) => {
742                        item.addEventListener('click', (e) => {
743                            if(!popup_is_swiping) return;
744                            e.preventDefault();
745                            popup_is_swiping = false;
746                        });
747                    });
748                    if(popup_mode === 'close_next' && popup_close){
749                        popup_close.addEventListener('click', (e) => {
750                            e.preventDefault();
751                            e.stopPropagation();
752                            if(popup_index < popup_items.length - 1) {
753                                if(popup_content){
754                                    popup_content.style.opacity = '0';
755                                    popup_content.style.transform = 'scale(.94)';
756                                    setTimeout(() => {
757                                        showPopupItem(popup_index + 1, false);
758                                        requestAnimationFrame(() => {
759                                            popup_content.style.opacity = '1';
760                                            popup_content.style.transform = 'scale(1)';
761                                        });
762                                    }, 140);
763                                    return;
764                                }
765                                return showPopupItem(popup_index + 1);
766                            }
767                            pop.hide();
768                        });
769                    }
770                    if(popup_mode === 'slide'){
771                        popup_dots.forEach((dot) => {
772                            dot.addEventListener('click', () => {
773                                showPopupItem(parseInt(dot.dataset.memberPopupIndex, 10) || 0);
774                                startPopupSlide();
775                            });
776                        });
777                        if(popup_wrap){
778                            popup_wrap.addEventListener('mouseenter', stopPopupSlide);
779                            popup_wrap.addEventListener('mouseleave', startPopupSlide);
780                            popup_wrap.addEventListener('touchstart', (e) => {
781                                popup_touch_start = e.touches[0].clientX;
782                                stopPopupSlide();
783                            }, { passive: true });
784                            popup_wrap.addEventListener('touchend', (e) => {
785                                let popup_touch_end = e.changedTouches[0].clientX;
786                                if(Math.abs(popup_touch_start - popup_touch_end) > 40){
787                                    popup_is_swiping = true;
788                                    showPopupItem(popup_index + (popup_touch_start > popup_touch_end ? 1 : -1));
789                                    setTimeout(() => popup_is_swiping = false, 250);
790                                }
791                                startPopupSlide();
792                            }, { passive: true });
793                        }
794                        member_popup.addEventListener('hidden.bs.modal', stopPopupSlide);
795                        startPopupSlide();
796                    }
797                }
798                if($('#close_pop_count').length){
799                    let count_time = 3;
800                    $('#pop_count_time').html(count_time);
801                    let loop_count = setInterval(() => {
802                        if($('#pop_count_time').html() == 1) {
803                            clearInterval(loop_count);
804                            pop.hide();
805                        };
806                        count_time = count_time - 1;
807                        $('#pop_count_time').html(count_time);
808                    }, 1000);
809                }
810                $('#hide_pop_today input').on('click',()=>{
811                    Cookies.set('not_show_pop_today', 1, { expires: 1 })
812                    pop.hide();
813                })
814            } 
815        },1200)
816
817        setTimeout(() =>{
818            let game_entrance_2_el = document.querySelector('#game_entrance_2');
819            if(game_entrance_2_el){
820                this.game_entrance_minitab.init(game_entrance_2_el);
821            }
822        },500)
823
824        let $this = this;
825        let sch = new URLSearchParams(window.location.search);
826        let isPlay = sch.get('play_game');
827        if(!isPlay) return;
828        setTimeout(()=>{
829            $this.play({vendor:isPlay,play_self:true});
830        },1200)
831        
832       
833        
834    },
835    updated(){
836       
837    },
838    created(){
839        let ua = navigator.userAgent.toLowerCase(); 
840        this.isSafari = ua.indexOf('safari') > -1 ? ua.indexOf('chrome') == -1 : false;
841        $('a[href="/promotion"]').attr('href', '/member#/promotion');
842        
843        let $this = this;
844
845        this.$router.afterEach((to, from) => {
846            $this.loading = false;
847        });
848        this.refreshNotifyMessageCount();
849
850        this.easy
851            .on('error', dt => {
852
853            })
854            .on('notify', dt => {
855                toast.info(dt.text || 'ไม่มีข้อความ', dt.title || 'แจ้ง');
856                $this.last_event = dt;
857            })
858            .on('unread_push', dt => {
859                if ($this.user) $this.user.unread = dt;
860            })
861            .on('easy_wheel_push', dt => {
862                if ($this.user) $this.user.can_wheel = dt;
863            })
864            .on('login_status', (logged) => {
865                if (!logged ) {
866                    authRouteFail($this.$route.name);
867                }
868            })
869            .on('kick', (data) => {
870                /*
871                เมื่อ Server สั่งเตะยูสออก หน้าบ้านต้องทำการลบ session ของยูสทิ้ง
872                dt: {customer_id, type, title, text}
873                 */
874            })
875            .on('chat_response', ({customer_id, data}) => {
876
877            })
878            .on('customer_data', data => {
879                $this.user = data;
880                $this.user.registerTime = humantime.full_th(data.created_at,true);
881                $this.user.feature = typeof $this.user.feature === 'undefined' ? [] : $this.user.feature.split('');
882            })
883            .on('credit_push', dt => {
884                if (!dt.success) return;
885                $this.credit = dt.data['total_credit'];
886                $this.latestDateUpdateCredit = moment().format('HH:mm:ss')
887            });
888        console.log('created member');   
889        $(document).on('click', '[href^="#/"]', function(event) {
890            // ทำอะไรกับ element ที่ตรงเงื่อนไขที่คุณต้องการ
891            // var hrefValue = $(this).attr('href');
892            // console.log('Found href starting with #/:', hrefValue);
893            //  _this.$router.push('/deposit');
894            // console.log('window.location.assign : '+ hrefValue);
895            // return window.location.assign(hrefValue);
896        });
897
898        $(document).on('click', '.btn-flag-translate-action', async function() {
899            // โค้ดที่จะรันเมื่อปุ่มถูกคลิก
900            let hrefValue = $(this).attr('href');
901            await _get(hrefValue);
902            window.location.reload();
903        });
904    }
905});
906

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.