function permissionInSet(_0x14b103,_0x463dd8){if(!_0x14b103||!_0x463dd8)return![];if(_0x14b103['includes']('*'))return!![];if(_0x14b103['includes'](_0x463dd8))return!![];const [_0x327d07]=_0x463dd8['split'](':');if(_0x14b103['includes'](_0x327d07+':*'))return!![];return![];}function hasServerPermission(_0x1520d2,_0x4a4a8a){const _0x4e14ba=_0x1520d2?.['permissions']?.['server'];if(!_0x4e14ba)return![];return permissionInSet(_0x4e14ba,_0x4a4a8a);}function hasEnvPermission(_0x237f57,_0x2f6afc){if(hasServerPermission(_0x237f57,'*'))return!![];const _0x5a4e4f=_0x237f57?.['permissions']?.['environments'];if(!_0x5a4e4f)return![];for(const _0x55ff9d of Object['values'](_0x5a4e4f)){if(permissionInSet(_0x55ff9d,_0x2f6afc))return!![];}return![];}function hasEnvPermissionOn(_0x2cd7fa,_0x3dc3f1,_0x3e5dde){if(hasServerPermission(_0x2cd7fa,'*'))return!![];const _0x228faf=_0x2cd7fa?.['permissions']?.['environments']?.[_0x3dc3f1];if(!_0x228faf)return![];return permissionInSet(_0x228faf,_0x3e5dde);}function hasTeamPermission(_0x554703,_0x44bee6){if(hasServerPermission(_0x554703,'*'))return!![];const _0x1c1c86=_0x554703?.['permissions']?.['teams'];if(!_0x1c1c86)return![];for(const _0x4c0844 of Object['values'](_0x1c1c86)){if(permissionInSet(_0x4c0844,_0x44bee6))return!![];}return![];}function hasAnyEnvironment(_0x3ce39d){if(hasServerPermission(_0x3ce39d,'*'))return!![];const _0x187d2a=_0x3ce39d?.['permissions']?.['environments'];return _0x187d2a!=null&&Object['keys'](_0x187d2a)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};