Spaces:
Running
Running
Upload vai-master-fix-v2026.js
Browse files- vai-master-fix-v2026.js +161 -0
vai-master-fix-v2026.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* V.AI STUDIO — MASTER FIX v2026 (ALL-IN-ONE)
|
| 3 |
+
*
|
| 4 |
+
* 1. PROMPT: "Malloca ck 35%, giao hàng 200k, lắp đặt 500k, cọc 5tr, ghi chú: giao thứ 7"
|
| 5 |
+
* → Parse "Brand ck X%" → CK% toàn bộ
|
| 6 |
+
* → Giao hàng, lắp đặt → fees[]
|
| 7 |
+
* → Cọc → deposit
|
| 8 |
+
* → Ghi chú → notes[]
|
| 9 |
+
* → Hiển thị trên modal báo giá, Excel/PDF tải về VÀ đơn hàng lưu
|
| 10 |
+
*
|
| 11 |
+
* 2. HÌNH ẢNH: CORS proxy khi bizweb.dktcdn.net chặn, AWAIT ảnh trước khi ghi Excel
|
| 12 |
+
*
|
| 13 |
+
* 3. ORDER STORE: brand+ck pre-process, fees/deposit/notes sync lên bot
|
| 14 |
+
*/
|
| 15 |
+
(function() {
|
| 16 |
+
'use strict';
|
| 17 |
+
console.log('[VAI MASTER FIX v2026] === LOADING ===');
|
| 18 |
+
var _f=window.fetch;
|
| 19 |
+
var CDN=['bizweb.dktcdn.net','product.hstatic.net','file.hstatic.net','bizweb.dktcdn.com'];
|
| 20 |
+
window.fetch=function(i,o){
|
| 21 |
+
var u=(typeof i==='string')?i:(i&&i.url)||'';
|
| 22 |
+
for(var k=0;k<CDN.length;k++){if(u.indexOf(CDN[k])>=0)return _f(u,Object.assign({},o||{},{mode:'cors'})).catch(function(){return _f('https://api.allorigins.win/raw?url='+encodeURIComponent(u));});}
|
| 23 |
+
return _f.apply(this,arguments);
|
| 24 |
+
};
|
| 25 |
+
function br(t){return t.replace(/\b(Malloca|Eurogold|Grob|Canzy|Demax|Hafele|Garis|Boss|ĐMX|DMX)\s+ck\s+/gi,'ck ');}
|
| 26 |
+
function pp(){
|
| 27 |
+
if(!window.VAI_QR||typeof window.VAI_QR.parsePrompt!=='function'){setTimeout(pp,500);return;}
|
| 28 |
+
if(window.VAI_QR.__mp)return;window.VAI_QR.__mp=true;
|
| 29 |
+
var o=window.VAI_QR.parsePrompt;
|
| 30 |
+
window.VAI_QR.parsePrompt=function(t){
|
| 31 |
+
if(!t)return o.call(this,t);
|
| 32 |
+
var p=br(t),r=o.call(this,p);
|
| 33 |
+
if(p!==t){var m=p.match(/ck\s+([\d.]+)\s*%/i);if(m){var v=parseFloat(m[1].replace(',','.'));if(v>0&&v<=100)r.discountPercent=v;}}
|
| 34 |
+
return r;
|
| 35 |
+
};
|
| 36 |
+
}
|
| 37 |
+
function gd(){
|
| 38 |
+
if(!window.VAI_QR||typeof window.VAI_QR.getData!=='function'){setTimeout(gd,500);return;}
|
| 39 |
+
if(window.VAI_QR.__mg)return;window.VAI_QR.__mg=true;
|
| 40 |
+
var o=window.VAI_QR.getData;
|
| 41 |
+
window.VAI_QR.getData=function(){
|
| 42 |
+
var r=o.apply(this,arguments);
|
| 43 |
+
if((!r.discountPercent||r.discountPercent===0)&&r.qd&&r.qd.items&&r.qd.items.length){
|
| 44 |
+
var t=(window.VAI_QR.getPromptText&&window.VAI_QR.getPromptText())||'';
|
| 45 |
+
if(t){var m=t.match(/\b(Malloca|Eurogold|Grob|Canzy|Demax|Hafele|Garis|Boss|ĐMX|DMX)\s+ck\s+([\d.]+)\s*%/i);
|
| 46 |
+
if(m){var p=parseFloat(m[2].replace(',','.'));if(p>0&&p<=100){
|
| 47 |
+
r.discountPercent=p;
|
| 48 |
+
r.qd.items.forEach(function(it){var b=Number(it.price||0);if(b>0){it.discPrice=Math.round(b*(1-p/100));it.total=it.discPrice*Number(it.qty||1);}});
|
| 49 |
+
var pt=0;r.qd.items.forEach(function(it){pt+=Number(it.total||0);});
|
| 50 |
+
var sc=0;(r.fees||[]).forEach(function(f){sc+=Number(f.amount||0);});
|
| 51 |
+
r.productTotal=pt;r.grandTotal=pt+sc;r.remaining=r.grandTotal-(r.deposit||0);if(r.remaining<0)r.remaining=0;
|
| 52 |
+
}}
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
return r;
|
| 56 |
+
};
|
| 57 |
+
}
|
| 58 |
+
function osp(){
|
| 59 |
+
if(typeof parsePrompt!=='function'){setTimeout(osp,500);return;}
|
| 60 |
+
if(window.__msp)return;window.__msp=true;
|
| 61 |
+
var o=parsePrompt;window.parsePrompt=function(t){return o(t?br(t):t);};
|
| 62 |
+
}
|
| 63 |
+
function pg(){
|
| 64 |
+
if(typeof genXl!=='function'){setTimeout(pg,300);return;}
|
| 65 |
+
if(window.__mgx)return;window.__mgx=true;
|
| 66 |
+
genXl=async function(d,qd,code){
|
| 67 |
+
console.log('[VAI MASTER] genXl',code);
|
| 68 |
+
var its=qd.items||[];
|
| 69 |
+
var ib=await Promise.all(its.map(function(it){
|
| 70 |
+
if(it&&it.image&&it.image.startsWith('http'))
|
| 71 |
+
return _f(it.image,{mode:'cors'}).then(function(r){if(r.ok)return r.arrayBuffer();throw 0;}).catch(function(){
|
| 72 |
+
return _f('https://api.allorigins.win/raw?url='+encodeURIComponent(it.image)).then(function(r){if(r.ok)return r.arrayBuffer();return null;}).catch(function(){return null;});
|
| 73 |
+
});
|
| 74 |
+
return Promise.resolve(null);
|
| 75 |
+
}));
|
| 76 |
+
try{if(typeof _doExportExcel==='function'&&window.VAI_QR&&window.VAI_QR.getData){var dd=window.VAI_QR.getData();var ec=window.VAI_QR.getEffectiveOrderCode?window.VAI_QR.getEffectiveOrderCode():code;var qr=window.VAI_QR.getQRUrl?window.VAI_QR.getQRUrl(dd.deposit>0?dd.remaining:dd.grandTotal,ec):'';await _doExportExcel(dd,dd.qd,ec,qr);return;}}catch(e){}
|
| 77 |
+
var M='#,##0"đ"',N='#,##0',WH={argb:'FFFFFFFF'},WB={top:{style:'thin',color:WH},bottom:{style:'thin',color:WH},left:{style:'thin',color:WH},right:{style:'thin',color:WH}};
|
| 78 |
+
var wb=new ExcelJS.Workbook(),ws=wb.addWorksheet('Báo giá');
|
| 79 |
+
ws.views=[{showGridLines:false}];ws.columns=[{width:5},{width:11},{width:28},{width:13},{width:20},{width:6},{width:13},{width:13},{width:15},{width:14}];
|
| 80 |
+
ws.mergeCells('A1:J1');ws.getRow(1).height=28;ws.getCell('A1').value='V.AI STUDIO';ws.getCell('A1').border=WB;
|
| 81 |
+
ws.mergeCells('A3:J3');ws.getRow(3).height=30;ws.getCell('A3').value='BẢNG BÁO GIÁ';ws.getCell('A3').font={bold:true,size:18,color:{argb:'FFDB9815'}};ws.getCell('A3').alignment={horizontal:'center',vertical:'middle'};
|
| 82 |
+
var cust=qd.customer||{};
|
| 83 |
+
ws.getCell('A5').value='KH:';ws.getCell('A5').font={bold:true,size:9};ws.getCell('A5').border=WB;ws.mergeCells('B5:E5');ws.getCell('B5').value=cust.name||'';ws.getCell('B5').font={bold:true,size:10};ws.getCell('B5').border=WB;ws.getCell('H5').value='Mã:';ws.getCell('H5').font={size:9};ws.getCell('H5').border=WB;ws.mergeCells('I5:J5');ws.getCell('I5').value=code;ws.getCell('I5').font={bold:true,size:10,color:{argb:'FF003F62'}};ws.getCell('I5').border=WB;
|
| 84 |
+
ws.getCell('A6').value='SĐT:';ws.getCell('A6').font={size:9};ws.getCell('A6').border=WB;ws.getCell('B6').value=cust.phone||'';ws.getCell('B6').border=WB;ws.getCell('H6').value='Ngày:';ws.getCell('H6').font={size:9};ws.getCell('H6').border=WB;ws.getCell('I6').value=cust.date||'';ws.getCell('I6').border=WB;
|
| 85 |
+
ws.getCell('A7').value='ĐC:';ws.getCell('A7').font={size:9};ws.getCell('A7').border=WB;ws.mergeCells('B7:J7');ws.getCell('B7').value=cust.addr||'';ws.getCell('B7').border=WB;
|
| 86 |
+
var HB={top:{style:'thin',color:{argb:'FF003F62'}},bottom:{style:'thin',color:{argb:'FF003F62'}},left:{style:'thin',color:{argb:'FF003F62'}},right:{style:'thin',color:{argb:'FF003F62'}}};
|
| 87 |
+
var hR=ws.getRow(9);hR.height=20;['STT','Hình','Tên sản phẩm','Mã SP','Thông tin','SL','Đơn giá','Giá CK','Thành tiền','Ghi chú'].forEach(function(h,i){var c=hR.getCell(i+1);c.value=h;c.font={bold:true,color:{argb:'FFFFFFFF'},size:9};c.fill={type:'pattern',pattern:'solid',fgColor:{argb:'FF003F62'}};c.alignment={horizontal:'center',vertical:'middle',wrapText:true};c.border=HB;});
|
| 88 |
+
var cr=10;
|
| 89 |
+
its.forEach(function(it,i){
|
| 90 |
+
var row=ws.getRow(cr);row.height=50;var bg=i%2===0?'FFF8FAFC':'FFFFFFFF';
|
| 91 |
+
var RB={top:{style:'thin',color:{argb:bg}},bottom:{style:'thin',color:{argb:bg}},left:{style:'thin',color:{argb:bg}},right:{style:'thin',color:{argb:bg}}};
|
| 92 |
+
var qty=Number(it.qty||1),price=Number(it.price||0),dP=Number(it.discPrice||it.price||0),lt=dP*qty;
|
| 93 |
+
row.getCell(1).value=it.stt||(i+1);row.getCell(1).alignment={horizontal:'center',vertical:'middle'};
|
| 94 |
+
if(it.image&&it.image.startsWith('http')&&ib[i]){try{var ext=it.image.includes('.png')?'png':'jpeg';var iid=wb.addImage({buffer:ib[i],extension:ext});ws.addImage(iid,{tl:{col:1,row:cr-1},ext:{width:46,height:46}});}catch(e){}}
|
| 95 |
+
row.getCell(3).value=it.name||'';row.getCell(3).font={bold:true,size:9};row.getCell(3).alignment={wrapText:true,vertical:'middle'};
|
| 96 |
+
row.getCell(4).value=it.model||'';row.getCell(4).alignment={horizontal:'center'};
|
| 97 |
+
row.getCell(5).value=it.specs||(it.info||'');row.getCell(5).font={size:8,color:{argb:'FF64748B'}};row.getCell(5).alignment={wrapText:true,vertical:'middle'};
|
| 98 |
+
row.getCell(6).value=qty;row.getCell(6).numFmt=N;row.getCell(6).alignment={horizontal:'center'};
|
| 99 |
+
row.getCell(7).value=price;row.getCell(7).numFmt=M;row.getCell(7).alignment={horizontal:'right',vertical:'middle'};
|
| 100 |
+
row.getCell(8).value=dP;row.getCell(8).numFmt=M;row.getCell(8).alignment={horizontal:'right',vertical:'middle'};if(dP<price)row.getCell(8).font={bold:true,color:{argb:'FFDC3545'}};
|
| 101 |
+
row.getCell(9).value=lt;row.getCell(9).numFmt=M;row.getCell(9).font={bold:true,size:9};row.getCell(9).alignment={horizontal:'right',vertical:'middle'};
|
| 102 |
+
row.getCell(10).value=it.note||'';row.getCell(10).font={size:8};row.getCell(10).alignment={wrapText:true,vertical:'middle'};
|
| 103 |
+
for(var ci=1;ci<=10;ci++){row.getCell(ci).fill={type:'pattern',pattern:'solid',fgColor:{argb:bg}};row.getCell(ci).border=RB;}
|
| 104 |
+
cr++;
|
| 105 |
+
});
|
| 106 |
+
var fees=d.fees||[];
|
| 107 |
+
if(fees.length){fees.forEach(function(f){ws.mergeCells(cr,1,cr,8);ws.getRow(cr).height=20;ws.getCell('A'+cr).value=' ⊕ '+(f.label||'Phụ phí');ws.getCell('A'+cr).font={size:9,color:{argb:'FF92400E'}};ws.getCell('I'+cr).value=Number(f.amount||0);ws.getCell('I'+cr).numFmt=M;ws.getCell('I'+cr).font={bold:true,size:9,color:{argb:'FF92400E'}};for(var ci=1;ci<=10;ci++)ws.getCell(cr,ci).fill={type:'pattern',pattern:'solid',fgColor:{argb:'FFFFFBEB'}};cr++;});}
|
| 108 |
+
var TBG='FF003F62',TB={top:{style:'thin',color:{argb:TBG}},bottom:{style:'thin',color:{argb:TBG}},left:{style:'thin',color:{argb:TBG}},right:{style:'thin',color:{argb:TBG}}};
|
| 109 |
+
ws.mergeCells(cr,1,cr,8);var tR=ws.getRow(cr);tR.height=28;tR.getCell(1).value='TỔNG CỘNG';tR.getCell(1).font={bold:true,size:13,color:{argb:'FFFFFFFF'}};tR.getCell(1).alignment={horizontal:'left',vertical:'middle',indent:1};
|
| 110 |
+
for(var ci=1;ci<=10;ci++){tR.getCell(ci).fill={type:'pattern',pattern:'solid',fgColor:{argb:TBG}};tR.getCell(ci).border=TB;}
|
| 111 |
+
tR.getCell(9).value=Number(d.grandTotal||0);tR.getCell(9).numFmt=M;tR.getCell(9).font={bold:true,size:15,color:{argb:'FFF0B840'}};tR.getCell(9).alignment={horizontal:'right',vertical:'middle'};cr++;
|
| 112 |
+
var dep=Number(d.deposit||0);
|
| 113 |
+
if(dep>0){ws.mergeCells(cr,1,cr,8);ws.getRow(cr).height=22;ws.getCell('A'+cr).value='Đã cọc';ws.getCell('A'+cr).font={bold:true,size:11,color:{argb:'FF166534'}};ws.getCell('I'+cr).value=dep;ws.getCell('I'+cr).numFmt=M;ws.getCell('I'+cr).font={bold:true,size:11,color:{argb:'FF166534'}};for(var ci=1;ci<=10;ci++)ws.getCell(cr,ci).fill={type:'pattern',pattern:'solid',fgColor:{argb:'FFF0FDF4'}};cr++;
|
| 114 |
+
ws.mergeCells(cr,1,cr,8);ws.getRow(cr).height=24;ws.getCell('A'+cr).value='CÒN LẠI';ws.getCell('A'+cr).font={bold:true,size:12,color:{argb:'FFDC2626'}};ws.getCell('I'+cr).value=Number(d.remaining||0);ws.getCell('I'+cr).numFmt=M;ws.getCell('I'+cr).font={bold:true,size:13,color:{argb:'FFDC2626'}};for(var ci=1;ci<=10;ci++)ws.getCell(cr,ci).fill={type:'pattern',pattern:'solid',fgColor:{argb:'FFFEF2F2'}};cr++;}
|
| 115 |
+
var notes=d.notes||[];
|
| 116 |
+
if(notes.length){ws.mergeCells(cr,1,cr,10);ws.getCell('A'+cr).value='📝 Ghi chú: '+notes.join('; ');ws.getCell('A'+cr).font={italic:true,size:9,color:{argb:'FF166534'}};for(var ci=1;ci<=10;ci++)ws.getCell(cr,ci).fill={type:'pattern',pattern:'solid',fgColor:{argb:'FFF0FDF4'}};cr++;}
|
| 117 |
+
cr++;ws.mergeCells(cr,1,cr,10);ws.getCell('A'+cr).value='🏦 VIB | 918258385 | Trần Quốc Vương | '+(dep>0?Number(d.remaining||0):Number(d.grandTotal||0)).toLocaleString('vi-VN')+'đ | '+code;ws.getCell('A'+cr).font={bold:true,size:10};
|
| 118 |
+
ws.eachRow(function(row){row.eachCell(function(cell){if(!cell.border)cell.border=WB;});});
|
| 119 |
+
wb.calcProperties.fullCalcOnLoad=true;
|
| 120 |
+
var buf=await wb.xlsx.writeBuffer();var blob=new Blob([buf],{type:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
|
| 121 |
+
var url=URL.createObjectURL(blob);var a=document.createElement('a');a.href=url;a.download=code+'.xlsx';a.style.display='none';document.body.appendChild(a);a.click();
|
| 122 |
+
setTimeout(function(){document.body.removeChild(a);},60000);
|
| 123 |
+
};
|
| 124 |
+
}
|
| 125 |
+
function pe(){
|
| 126 |
+
if(typeof _doExportExcel!=='function'){setTimeout(pe,300);return;}
|
| 127 |
+
if(window.__mee)return;window.__mee=true;
|
| 128 |
+
window.exportExcel=async function(){
|
| 129 |
+
try{if(window.VAI_QR&&typeof window.VAI_QR.getData==='function'){var d=window.VAI_QR.getData();var code=window.VAI_QR.getEffectiveOrderCode?window.VAI_QR.getEffectiveOrderCode():'BAOGIA';var qr=window.VAI_QR.getQRUrl?window.VAI_QR.getQRUrl(d.deposit>0?d.remaining:d.grandTotal,code):'';await _doExportExcel(d,d.qd,code,qr);return;}}catch(e){}
|
| 130 |
+
if(typeof genXl==='function'){try{var d2=window.VAI_QR&&window.VAI_QR.getData?window.VAI_QR.getData():null;if(d2&&d2.qd)await genXl(d2,d2.qd,'BAOGIA');}catch(e2){}}
|
| 131 |
+
};
|
| 132 |
+
if(window.VAI_QR)window.VAI_QR.exportExcel=window.exportExcel;
|
| 133 |
+
}
|
| 134 |
+
function eqm(){
|
| 135 |
+
var m=document.querySelector('.quote-overlay.open .quote-modal,.quote-overlay[style*="flex"] .quote-modal');if(!m||m.querySelector('.vai-me'))return;
|
| 136 |
+
if(!window.VAI_QR||!window.VAI_QR.getData)return;var d;try{d=window.VAI_QR.getData();}catch(e){return;}if(!d)return;
|
| 137 |
+
var fees=d.fees||[],notes=d.notes||[],dep=d.deposit||0,rem=d.remaining||0;
|
| 138 |
+
if(!fees.length&&!dep&&!notes.length)return;
|
| 139 |
+
var a=m.querySelector('.quote-actions');if(!a)return;
|
| 140 |
+
var sec=document.createElement('div');sec.className='vai-me';var h='';
|
| 141 |
+
if(fees.length){h+='<div style="padding:6px 12px;background:#fffbeb;border-radius:6px;margin-bottom:6px;font-size:11px"><div style="font-weight:700;color:#92400e;margin-bottom:3px">PHỤ PHÍ</div>';fees.forEach(function(f){h+='<div style="display:flex;justify-content:space-between"><span>'+(f.label||'')+'</span><b>'+Number(f.amount||0).toLocaleString('vi-VN')+'đ</b></div>';});h+='</div>';}
|
| 142 |
+
if(dep>0){h+='<div style="padding:5px 12px;background:#f0fdf4;border-radius:6px;margin-bottom:6px;font-size:11px"><div style="display:flex;justify-content:space-between"><span>Đã cọc</span><b style="color:#166534">'+Number(dep).toLocaleString('vi-VN')+'đ</b></div><div style="display:flex;justify-content:space-between;margin-top:2px"><span style="font-weight:700">Còn lại</span><b style="color:#dc2626">'+Number(Math.max(0,rem)).toLocaleString('vi-VN')+'đ</b></div></div>';}
|
| 143 |
+
if(notes.length){h+='<div style="padding:5px 12px;background:#f0f9ff;border-radius:6px;font-size:10px;margin-bottom:6px"><b>Ghi chú:</b> '+notes.join('; ')+'</div>';}
|
| 144 |
+
if(h){sec.innerHTML=h;sec.style.cssText='margin:8px 16px;font-size:12px';a.parentNode.insertBefore(sec,a);}
|
| 145 |
+
}
|
| 146 |
+
function pod(){
|
| 147 |
+
if(window.__mpod)return;window.__mpod=true;
|
| 148 |
+
new MutationObserver(function(){
|
| 149 |
+
var pi=document.getElementById('od-prompt');if(!pi||pi.dataset.vm)return;pi.dataset.vm='1';
|
| 150 |
+
var ab=document.getElementById('od-apply');if(ab&&!ab.dataset.vma){ab.dataset.vma='1';var oa=ab.onclick;if(oa)ab.onclick=function(e){var v=pi.value||'',p=br(v);if(p!==v)pi.value=p;return oa.call(this,e);};}
|
| 151 |
+
var sb=document.getElementById('od-save');if(sb&&!sb.dataset.vms){sb.dataset.vms='1';var os=sb.onclick;if(os)sb.onclick=function(e){var v=pi.value||'',p=br(v);if(p!==v)pi.value=p;return os.call(this,e);};}
|
| 152 |
+
}).observe(document.body,{childList:true,subtree:true});
|
| 153 |
+
}
|
| 154 |
+
function init(){
|
| 155 |
+
setTimeout(pp,500);setTimeout(gd,800);setTimeout(osp,1000);
|
| 156 |
+
setTimeout(pg,1500);setTimeout(pe,2000);
|
| 157 |
+
setInterval(eqm,2000);setTimeout(pod,2000);
|
| 158 |
+
console.log('[VAI MASTER FIX v2026] ✅ Loaded');
|
| 159 |
+
}
|
| 160 |
+
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();
|
| 161 |
+
})();
|