function permissionInSet(_0x4fb2f8,_0x3bf958){if(!_0x4fb2f8||!_0x3bf958)return![];if(_0x4fb2f8['includes']('*'))return!![];if(_0x4fb2f8['includes'](_0x3bf958))return!![];const [_0x18a4f0]=_0x3bf958['split'](':');if(_0x4fb2f8['includes'](_0x18a4f0+':*'))return!![];return![];}function hasServerPermission(_0x47547b,_0x19b4bd){const _0x4686b2=_0x47547b?.['permissions']?.['server'];if(!_0x4686b2)return![];return permissionInSet(_0x4686b2,_0x19b4bd);}function hasEnvPermission(_0x466790,_0x1efcb2){if(hasServerPermission(_0x466790,'*'))return!![];const _0x3c3861=_0x466790?.['permissions']?.['environments'];if(!_0x3c3861)return![];for(const _0x250101 of Object['values'](_0x3c3861)){if(permissionInSet(_0x250101,_0x1efcb2))return!![];}return![];}function hasEnvPermissionOn(_0x18c486,_0x62f074,_0x54ef5c){if(hasServerPermission(_0x18c486,'*'))return!![];const _0x18b94c=_0x18c486?.['permissions']?.['environments']?.[_0x62f074];if(!_0x18b94c)return![];return permissionInSet(_0x18b94c,_0x54ef5c);}function hasTeamPermission(_0x437ffd,_0x4f3461){if(hasServerPermission(_0x437ffd,'*'))return!![];const _0x586de8=_0x437ffd?.['permissions']?.['teams'];if(!_0x586de8)return![];for(const _0x6f0ccd of Object['values'](_0x586de8)){if(permissionInSet(_0x6f0ccd,_0x4f3461))return!![];}return![];}function hasAnyEnvironment(_0x1226e5){if(hasServerPermission(_0x1226e5,'*'))return!![];const _0x11b436=_0x1226e5?.['permissions']?.['environments'];return _0x11b436!=null&&Object['keys'](_0x11b436)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};