export const IBMI_KNOWN_EXTENSIONS=new Set(['.rpgle','.sqlrpgle','.clle','.cl','.clp','.dspf','.pf','.lf','.prtf','.table.sql','.index.sql','.proc.sql','.bnd','.msgf','.bnddir']);const INELIGIBLE_EXTENSIONS=new Set(['.md','.yml','.yaml','.xml','.html','.htm','.css','.js','.ts','.json','.lock','.log','.sh','.bat','.cmd','.mk','.png','.jpg','.jpeg','.gif','.svg','.ico','.zip','.tar','.gz','.pdf']),INELIGIBLE_FILENAMES=new Set(['.gitignore','.gitattributes','.gitmodules','.editorconfig','.prettierrc','.eslintrc','.npmrc','.env','license','makefile','dockerfile','jenkinsfile','.dockerignore']);export function getIbmiExtension(_0x3986f8){const _0x53eb37=_0x3986f8['split']('/')['pop']();for(const _0xc1448 of IBMI_KNOWN_EXTENSIONS){if(_0xc1448['includes']('.')&&_0xc1448!=='.'+_0x53eb37['split']('.')['pop']()){if(_0x53eb37['toLowerCase']()['endsWith'](_0xc1448))return _0xc1448;}}const _0x2a0bab=_0x53eb37['lastIndexOf']('.');return _0x2a0bab>=0x0?_0x53eb37['substring'](_0x2a0bab)['toLowerCase']():'';}export function getMemberName(_0x2360c6){const _0x2812c1=_0x2360c6['split']('/')['pop'](),_0x76a9d2=getIbmiExtension(_0x2360c6);return _0x76a9d2?_0x2812c1['substring'](0x0,_0x2812c1['length']-_0x76a9d2['length']):_0x2812c1;}export function getSourceFileName(_0x5f5c4a){const _0x13ba0d=_0x5f5c4a['split']('/');return _0x13ba0d['length']>=0x2?_0x13ba0d[_0x13ba0d['length']-0x2]:'';}export function validateIbmiFile(_0x1c5cfb){const _0x3dce9d=_0x1c5cfb['split']('/')['pop'](),_0x3b0df1=_0x3dce9d['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x3b0df1))return{'valid':![],'reason':'\x22'+_0x3dce9d+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x43cbfb=_0x3b0df1['lastIndexOf']('.');if(_0x43cbfb>=0x0){const _0x4b9677=_0x3b0df1['substring'](_0x43cbfb);if(INELIGIBLE_EXTENSIONS['has'](_0x4b9677))return{'valid':![],'reason':'\x22'+_0x4b9677+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x2a4381=getSourceFileName(_0x1c5cfb),_0x17d19f=getMemberName(_0x1c5cfb);if(_0x2a4381['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x2a4381+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0x17d19f['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0x17d19f+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x3df93c=getIbmiExtension(_0x1c5cfb);if(_0x3df93c){const _0x1d6ba7=_0x3df93c['startsWith']('.')?_0x3df93c['substring'](0x1):_0x3df93c;if(_0x1d6ba7['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x3df93c+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x468e6b){const _0x5f3aff=getIbmiExtension(_0x468e6b);return IBMI_KNOWN_EXTENSIONS['has'](_0x5f3aff);}