'use strict';
import { SyntaxKind, VariableDeclarationKind } from 'ts-morph';
import { first } from '../../fd-toolbox/server/collections/single-funcs.js';

var __defProp=Object['defineProperty'],__name=(_0x28e007,_0x49f8ec)=>__defProp(_0x28e007,'name',{'value':_0x49f8ec,'configurable':!![]});function resolveBinaryExpression(_0x7e1fc4){if(!_0x7e1fc4['isKind'](SyntaxKind['BinaryExpression']))return void(-0x1de9+0x60*-0x1f+-0x5ef*-0x7);const _0x3ca919=_0x7e1fc4;if(_0x3ca919['getOperatorToken']()['getKind']()!==SyntaxKind['PlusToken'])return void(-0xe5*-0xb+0x647+-0x101e);const _0x2df90d=resolveExpression(_0x3ca919['getLeft']()),_0x1d8eee=resolveExpression(_0x3ca919['getRight']());if(_0x2df90d===void(-0x355+0x166f+-0x131a)||_0x1d8eee===void(0x2539+0x123*-0x12+-0x10c3))return void(0x190d+0x1961+-0x326e*0x1);return _0x2df90d+_0x1d8eee;}__name(resolveBinaryExpression,'resolveBinaryExpression');function resolveExpression(_0x5dbbff){let _0x3a04ab;if(_0x5dbbff['isKind'](SyntaxKind['StringLiteral'])||_0x5dbbff['isKind'](SyntaxKind['NoSubstitutionTemplateLiteral']))_0x3a04ab=_0x5dbbff['getLiteralValue']();else {if(_0x5dbbff['isKind'](SyntaxKind['Identifier']))_0x3a04ab=resolveIdentifier(_0x5dbbff);else {if(_0x5dbbff['isKind'](SyntaxKind['PropertyAccessExpression']))_0x3a04ab=_0x5dbbff['getText']();else {if(_0x5dbbff['isKind'](SyntaxKind['BinaryExpression']))_0x3a04ab=resolveBinary(_0x5dbbff);else _0x5dbbff['isKind'](SyntaxKind['TemplateExpression'])&&(_0x3a04ab=resolveTemplate(_0x5dbbff));}}}return _0x3a04ab;}__name(resolveExpression,'resolveExpression');function resolveIdentifier(_0x2a1468){const _0x2e5ea5=_0x2a1468['getSymbol']();let _0x1bb950;if(_0x2e5ea5){const _0x2749f8=_0x2e5ea5['getDeclarations']();if(_0x2749f8['length']>0x1654*0x1+-0x60*0x40+0x1*0x1ac){const _0x224f2a=first(_0x2749f8),_0x2d30be=_0x224f2a['getParentIfKind'](SyntaxKind['VariableDeclarationList'])?.['getDeclarationKind']()===VariableDeclarationKind['Const'];if(_0x2d30be&&_0x224f2a['isKind'](SyntaxKind['VariableDeclaration'])){const _0x3016a2=_0x224f2a['getInitializer']();_0x3016a2&&(_0x1bb950=resolveExpression(_0x3016a2));}}}return _0x1bb950;}__name(resolveIdentifier,'resolveIdentifier');function resolveBinary(_0x287808){if(_0x287808['getOperatorToken']()['getKind']()!==SyntaxKind['PlusToken'])return void(0x1228+0x1f43+0x1*-0x316b);const _0x209701=resolveExpression(_0x287808['getLeft']()),_0xd67a60=resolveExpression(_0x287808['getRight']());if(_0x209701===void(0x1ccb+-0x9*-0x1e7+-0x12*0x28d)||_0xd67a60===void(-0x2131+0x1a7e+0x5*0x157))return void(-0x5b3*-0x2+0x245d+0x1*-0x2fc3);return _0x209701+_0xd67a60;}__name(resolveBinary,'resolveBinary');function resolveTemplate(_0x13b08a){let _0x491cae=_0x13b08a['getHead']()['getLiteralText']();for(const _0x5e6a4c of _0x13b08a['getTemplateSpans']()){const _0x5712a5=resolveExpression(_0x5e6a4c['getExpression']());if(_0x5712a5===void(0x303+0x10*-0xbf+0x8ed*0x1))return void(-0x18da*0x1+-0x1*0x13ad+-0x2c87*-0x1);_0x491cae+=_0x5712a5+_0x5e6a4c['getLiteral']()['getLiteralText']();}return _0x491cae;}__name(resolveTemplate,'resolveTemplate');

export { resolveBinaryExpression, resolveExpression };
