const _0x4975ca=_0x7cec;(function(_0x1dcd7d,_0x504745){const _0x34c240=_0x7cec,_0x1dea92=_0x1dcd7d();while(!![]){try{const _0xbe7d21=-parseInt(_0x34c240(0x1cd))/0x1+parseInt(_0x34c240(0x1d2))/0x2+parseInt(_0x34c240(0x1d6))/0x3*(parseInt(_0x34c240(0x1ca))/0x4)+parseInt(_0x34c240(0x1d0))/0x5+parseInt(_0x34c240(0x1cf))/0x6+-parseInt(_0x34c240(0x1d1))/0x7*(parseInt(_0x34c240(0x1d5))/0x8)+-parseInt(_0x34c240(0x1d7))/0x9;if(_0xbe7d21===_0x504745)break;else _0x1dea92['push'](_0x1dea92['shift']());}catch(_0x41c307){_0x1dea92['push'](_0x1dea92['shift']());}}}(_0x4313,0x6077a));function _0x4313(){const _0x3961b9=['__generic:','4kkfrpK','delete','setRuntimeVar','195797yyOZMU','add','3400212bvvSSF','1146005Iagsuw','4816511SMQgmm','387856enpRwr','isValid','getRuntimeVar','8CTNmzC','1972119JYhjaj','3313836HDddSK'];_0x4313=function(){return _0x3961b9;};return _0x4313();}function _0x7cec(_0x32922a,_0x2d7e1a){const _0x43130d=_0x4313();return _0x7cec=function(_0x7cec91,_0x5ad553){_0x7cec91=_0x7cec91-0x1ca;let _0x51a41e=_0x43130d[_0x7cec91];return _0x51a41e;},_0x7cec(_0x32922a,_0x2d7e1a);}let i=0x0;export default function (ticks,category=_0x4975ca(0x1d8)+ ++i+'__'){const runtimeVar='cooldownHook_'+category,entities=new Set();return[function trigger(entity,customTick){const _0x19aa4f=_0x7cec;entity[_0x19aa4f(0x1cc)](runtimeVar,customTick!==null&&customTick!==void 0x0?customTick:ticks),entities[_0x19aa4f(0x1ce)](entity);},function onCooldown(entity){var ref;return!!((ref=entity['getRuntimeVar'])===null||ref===void 0x0?void 0x0:ref['call'](entity,runtimeVar));},function update(){const _0x68e5a3=_0x7cec;for(const entity of entities){let cooldown=entity[_0x68e5a3(0x1d4)](runtimeVar);cooldown!==undefined&&entity[_0x68e5a3(0x1d3)]()?(entity[_0x68e5a3(0x1cc)](runtimeVar,--cooldown),cooldown<=0x0&&(entity['setRuntimeVar'](runtimeVar,undefined),entities[_0x68e5a3(0x1cb)](entity))):entities[_0x68e5a3(0x1cb)](entity);}}];}