UNPKG

notifcare

Version:

Lightweight notification and alert system

1 lines 8.43 kB
function _0x2d09(_0xb06535,_0x23ce93){const _0x2f121=_0x2f12();return _0x2d09=function(_0x2d09bd,_0x3f8b2f){_0x2d09bd=_0x2d09bd-0xc1;let _0x435baa=_0x2f121[_0x2d09bd];return _0x435baa;},_0x2d09(_0xb06535,_0x23ce93);}(function(_0x2b6d44,_0x1f4787){const _0xfc0b96=_0x2d09,_0x393e37=_0x2b6d44();while(!![]){try{const _0x499868=parseInt(_0xfc0b96(0x103))/0x1+parseInt(_0xfc0b96(0xd9))/0x2*(-parseInt(_0xfc0b96(0xe6))/0x3)+-parseInt(_0xfc0b96(0x117))/0x4*(parseInt(_0xfc0b96(0x11d))/0x5)+parseInt(_0xfc0b96(0x101))/0x6*(parseInt(_0xfc0b96(0xd2))/0x7)+parseInt(_0xfc0b96(0xed))/0x8+parseInt(_0xfc0b96(0xeb))/0x9*(parseInt(_0xfc0b96(0x11a))/0xa)+-parseInt(_0xfc0b96(0xf8))/0xb;if(_0x499868===_0x1f4787)break;else _0x393e37['push'](_0x393e37['shift']());}catch(_0x98da77){_0x393e37['push'](_0x393e37['shift']());}}}(_0x2f12,0x8a0f3));const Notifcare={'useStyle':!![],'fullCustomUsed':![],'render'(_0x19fef2,_0x4426cf={},_0x1a2aa3=![]){const _0x574700=_0x2d09,_0x5a7757=document[_0x574700(0xfe)](_0x574700(0xc3));_0x5a7757[_0x574700(0x115)]=_0x19fef2['trim']();const _0x55508e=_0x5a7757[_0x574700(0xe2)][_0x574700(0xf4)][_0x574700(0x107)](!![]),_0x210eb8=_0x55508e[_0x574700(0xf2)](_0x574700(0x111)),_0x273d12=_0x55508e['querySelector']('.yes'),_0x1fb333=_0x55508e[_0x574700(0xf2)]('.no'),_0x5051e3=_0x55508e[_0x574700(0xf2)](_0x574700(0x121)),_0x55d8d3=_0x55508e[_0x574700(0xf2)]('.notifcare-buttons'),_0x3d7428=_0x4426cf[_0x574700(0xd8)]?.[_0x574700(0xe7)]?.()||'normal',_0x46629b=_0x4426cf[_0x574700(0xc8)]?.[_0x574700(0xe7)]?.()||_0x574700(0xca);if(_0x46629b===_0x574700(0xd0))_0x55508e[_0x574700(0xc1)]['add'](_0x574700(0xd0));const _0x58f102={'danger':_0x574700(0xe0),'red':'danger','info':_0x574700(0xdf),'green':_0x574700(0xdf),'blue':_0x574700(0xfd)};_0x55508e[_0x574700(0xc1)]['add'](_0x58f102[_0x3d7428]||_0x574700(0x10a));const _0x2239d9=_0x55508e['querySelector'](_0x574700(0x10b));if(_0x2239d9&&_0x4426cf['iconType']){_0x2239d9['className']=_0x574700(0xc5);const _0x3075a9=_0x4426cf[_0x574700(0x108)][_0x574700(0xc4)]('?')[0x0];_0x3075a9[_0x574700(0xf7)](/\.(jpeg|jpg|png|gif|webp)$/i)?_0x2239d9[_0x574700(0x115)]=_0x574700(0xd1)+_0x4426cf[_0x574700(0x108)]+_0x574700(0xea):_0x2239d9['innerHTML']=_0x4426cf[_0x574700(0x108)];}_0x55508e[_0x574700(0xe1)](_0x574700(0xf1),_0x4c4a62=>{const _0x13c123=_0x574700;_0x4c4a62[_0x13c123(0x11f)]===_0x55508e&&(_0x4426cf['onNo']?.(_0x5051e3?.[_0x13c123(0xce)]||null),this[_0x13c123(0x100)](_0x55508e));}),_0x273d12?.[_0x574700(0xe1)](_0x574700(0xf1),()=>{const _0x3541df=_0x574700;_0x4426cf['onYes']?.(_0x5051e3?.['files']?_0x5051e3[_0x3541df(0x109)][0x0]:_0x5051e3?.[_0x3541df(0xce)]||null),this[_0x3541df(0x100)](_0x55508e);}),_0x1fb333?.['addEventListener']('click',()=>{const _0x3c81c9=_0x574700;_0x4426cf[_0x3c81c9(0xdd)]?.(_0x5051e3?.[_0x3c81c9(0x109)]?_0x5051e3[_0x3c81c9(0x109)][0x0]:_0x5051e3?.[_0x3c81c9(0xce)]||null),this['end'](_0x55508e);});_0x1a2aa3&&_0x5051e3&&_0x5051e3[_0x574700(0xe1)](_0x574700(0xc7),()=>{const _0x2dc950=_0x574700,_0x150736=_0x5051e3[_0x2dc950(0x109)][0x0],_0x19f4f4=_0x55508e[_0x2dc950(0xf2)](_0x2dc950(0x116));_0x19f4f4[_0x2dc950(0xf2)](_0x2dc950(0xdc))?.[_0x2dc950(0x122)]();if(_0x150736?.[_0x2dc950(0xd8)]['startsWith'](_0x2dc950(0xc6))){const _0x590c62=new FileReader();_0x590c62['onload']=function(_0x51780a){const _0x3267a7=_0x2dc950,_0x27523e=document[_0x3267a7(0xfe)](_0x3267a7(0xdc));_0x27523e[_0x3267a7(0x119)]=_0x51780a[_0x3267a7(0x11f)][_0x3267a7(0x106)],_0x27523e['style'][_0x3267a7(0xe3)]=_0x3267a7(0xfb),_0x27523e['style'][_0x3267a7(0x104)]='10px',_0x27523e['style'][_0x3267a7(0xe9)]=_0x3267a7(0x10c),_0x19f4f4['appendChild'](_0x27523e);},_0x590c62[_0x2dc950(0xfc)](_0x150736);}if(!_0x55508e['querySelector'](_0x2dc950(0xcb))){const _0x419696=document[_0x2dc950(0xfe)](_0x2dc950(0xfa));_0x419696[_0x2dc950(0x10f)]=_0x2dc950(0xda),_0x419696[_0x2dc950(0x10d)]=_0x4426cf[_0x2dc950(0xcd)]||'OK',_0x55d8d3[_0x2dc950(0xe5)](_0x419696),_0x419696[_0x2dc950(0xe1)](_0x2dc950(0xf1),()=>{const _0x54ca9b=_0x2dc950;_0x4426cf[_0x54ca9b(0x112)]?.(_0x150736),this[_0x54ca9b(0x100)](_0x55508e);});}});document[_0x574700(0x123)]['appendChild'](_0x55508e);if(_0x4426cf['timer']>0x0){let _0x4f63fa=Math['ceil'](_0x4426cf[_0x574700(0xd5)]/0x3e8),_0x50c733;if(_0x4426cf[_0x574700(0xcc)]){const _0x562bcf=document[_0x574700(0xfe)](_0x574700(0xfa));_0x562bcf['className']=_0x574700(0xf0),_0x562bcf[_0x574700(0xf6)][_0x574700(0x104)]=_0x574700(0x113),_0x562bcf['style'][_0x574700(0xd6)]=_0x574700(0x11c),_0x562bcf[_0x574700(0xf6)][_0x574700(0x120)]=_0x46629b===_0x574700(0xd0)?'#ccc':'#555',_0x562bcf[_0x574700(0x10d)]=_0x574700(0xec)+_0x4f63fa+'s',_0x210eb8[_0x574700(0xe5)](_0x562bcf),_0x50c733=setInterval(()=>{const _0x3a8dac=_0x574700;_0x4f63fa--;if(_0x4f63fa<=-0x1)clearInterval(_0x50c733);else _0x562bcf[_0x3a8dac(0x10d)]='This\x20will\x20close\x20in\x20'+_0x4f63fa+'s';},0x3e8);}setTimeout(()=>{if(_0x50c733)clearInterval(_0x50c733);this['end'](_0x55508e);},_0x4426cf[_0x574700(0xd5)]);}},'clear'(){const _0x4e5756=_0x2d09;document['querySelector'](_0x4e5756(0xe8))?.[_0x4e5756(0x122)]();},'end'(_0x2555fa){const _0x2713f6=_0x2d09;if(!_0x2555fa)return;const _0x412e78=_0x2555fa[_0x2713f6(0xf2)](_0x2713f6(0x111));_0x412e78?.['classList']['add'](_0x2713f6(0xd7)),setTimeout(()=>_0x2555fa[_0x2713f6(0x122)](),0x12c);},'fullCustom'(){const _0x575abe=_0x2d09;this[_0x575abe(0x118)]=![],this[_0x575abe(0xf9)]=!![];const _0x4bac99=[_0x575abe(0xff)];_0x4bac99[_0x575abe(0xde)](_0x123d80=>{const _0x5b276f=_0x575abe,_0x3f6a5e=document[_0x5b276f(0xfe)](_0x5b276f(0x110));_0x3f6a5e['rel']=_0x5b276f(0xf5),_0x3f6a5e['href']=_0x123d80,document[_0x5b276f(0xcf)][_0x5b276f(0xe5)](_0x3f6a5e);});},'font'(_0x5b79d2){const _0x2c5f06=_0x2d09,_0xcd6275=Array[_0x2c5f06(0x114)](_0x5b79d2)?_0x5b79d2['join'](','):_0x5b79d2;document[_0x2c5f06(0xef)]['style'][_0x2c5f06(0xee)]('--Notifcare-font',_0xcd6275);}};function _0x2f12(){const _0x1f144e=['loading.js','timer','fontSize','notifcare-fade','type','3058ItlRYv','notifcare-btn\x20confirm\x20yes','file.js','img','onNo','forEach','info','danger','addEventListener','content','maxWidth','https://notifcare-assets.vercel.app/assets/notifcare.css','appendChild','213EjIcAx','toLowerCase','.Notifcare','borderRadius','\x22\x20alt=\x22icon\x22\x20style=\x22max-width:48px;\x20max-height:48px;\x20border-radius:6px;\x22>','2016AZiZrb','This\x20will\x20close\x20in\x20','4751424YKbZvQ','setProperty','documentElement','notifcare-timer','click','querySelector','error','firstElementChild','stylesheet','style','match','9492307esYHTB','fullCustomUsed','div','30%','readAsDataURL','blue','createElement','https://notifcare-assets.vercel.app/assets/main.css','end','12fOLjrK','alert.js','246788qUDWcJ','marginTop','onload','result','cloneNode','iconType','files','normal','.notifcare-symbol','6px','textContent','Gagal\x20memuat:\x20','className','link','.notifcare-box','onYes','8px','isArray','innerHTML','.notifcare-file-input-container','4XEtGDn','useStyle','src','34860orKced','rel','12px','3630775mhBslI','script','target','color','input[type=\x27file\x27],\x20.notifcare-input-field','remove','body','classList','confirm.js','template','split','notifcare-symbol\x20custom-icon','image/','change','mode','length','light','.notifcare-btn.yes','timerStatus','yes','value','head','dark','<img\x20src=\x22','2245467LQmslU','href'];_0x2f12=function(){return _0x1f144e;};return _0x2f12();}window['Notifcare']=Notifcare,function loadNotifcareAssets(){const _0x47b616=_0x2d09;if(Notifcare['useStyle']&&!Notifcare['fullCustomUsed']){const _0x3d7ca9=document[_0x47b616(0xfe)](_0x47b616(0x110));_0x3d7ca9[_0x47b616(0x11b)]=_0x47b616(0xf5),_0x3d7ca9[_0x47b616(0xd3)]=_0x47b616(0xe4),document['head']['appendChild'](_0x3d7ca9);}const _0x362c90=['ads.js',_0x47b616(0x102),_0x47b616(0xc2),_0x47b616(0xdb),_0x47b616(0xd4),'prompt.js','toast.js'];loadScripts(_0x362c90,()=>{});}();function loadScripts(_0x7fdd4a,_0x41b6a9){const _0x47134=_0x2d09;let _0x2c080=0x0;_0x7fdd4a[_0x47134(0xde)](_0x9e461e=>{const _0x39dd85=_0x47134,_0x80894=document['createElement'](_0x39dd85(0x11e));_0x80894[_0x39dd85(0x119)]='https://notifcare-assets.vercel.app/library/'+_0x9e461e,_0x80894[_0x39dd85(0x105)]=()=>{const _0x1d2679=_0x39dd85;_0x2c080++;if(_0x2c080===_0x7fdd4a[_0x1d2679(0xc9)])_0x41b6a9?.();},_0x80894['onerror']=()=>console[_0x39dd85(0xf3)](_0x39dd85(0x10e)+_0x80894[_0x39dd85(0x119)]),document[_0x39dd85(0xcf)][_0x39dd85(0xe5)](_0x80894);});}