@ceraph/react-native-mcp 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 'use strict';function _0x1bf6(_0x8ee8d8,_0x1eeff4){_0x8ee8d8=_0x8ee8d8-0xb0;const _0x285abc=_0x285a();let _0x1bf62e=_0x285abc[_0x8ee8d8];return _0x1bf62e;}const _0x978f9f=_0x1bf6;(function(_0x224e0e,_0x5a94b7){const _0x5c1038=_0x1bf6,_0x38070a=_0x224e0e();while(!![]){try{const _0x15709b=-parseInt(_0x5c1038(0xd6))/0x1+-parseInt(_0x5c1038(0xc7))/0x2+parseInt(_0x5c1038(0xbc))/0x3*(-parseInt(_0x5c1038(0xe7))/0x4)+-parseInt(_0x5c1038(0xf0))/0x5+parseInt(_0x5c1038(0xc1))/0x6*(parseInt(_0x5c1038(0xdb))/0x7)+parseInt(_0x5c1038(0xbf))/0x8*(-parseInt(_0x5c1038(0xe6))/0x9)+-parseInt(_0x5c1038(0xb0))/0xa*(-parseInt(_0x5c1038(0xf4))/0xb);if(_0x15709b===_0x5a94b7)break;else _0x38070a['push'](_0x38070a['shift']());}catch(_0x27a90d){_0x38070a['push'](_0x38070a['shift']());}}}(_0x285a,0xe8587));var __defProp=Object[_0x978f9f(0xd5)],__getOwnPropDesc=Object[_0x978f9f(0xd9)],__getOwnPropNames=Object['getOwnPropertyNames'],__hasOwnProp=Object[_0x978f9f(0xb5)][_0x978f9f(0xc9)],__export=(_0x108b91,_0xdc8e9e)=>{for(var _0x78c03c in _0xdc8e9e)__defProp(_0x108b91,_0x78c03c,{'get':_0xdc8e9e[_0x78c03c],'enumerable':!![]});},__copyProps=(_0xd1a5bc,_0x267f0d,_0x290709,_0x5a19e2)=>{const _0x45a5f1=_0x978f9f;if(_0x267f0d&&typeof _0x267f0d==='object'||typeof _0x267f0d===_0x45a5f1(0xcd)){if('aEiBp'!==_0x45a5f1(0xee)){for(let _0x44faa3 of __getOwnPropNames(_0x267f0d))if(!__hasOwnProp[_0x45a5f1(0xc0)](_0xd1a5bc,_0x44faa3)&&_0x44faa3!==_0x290709)__defProp(_0xd1a5bc,_0x44faa3,{'get':()=>_0x267f0d[_0x44faa3],'enumerable':!(_0x5a19e2=__getOwnPropDesc(_0x267f0d,_0x44faa3))||_0x5a19e2[_0x45a5f1(0xd7)]});}else{const _0x341df1=_0x6c8d8b(_0x4cab9f['relPath']),_0x5af6ae=_0x341df1+'|'+_0x1f1436['line']+'|'+_0x2d5515[_0x45a5f1(0xe5)]+'|'+(_0x4a2952['tag']??''),_0x4d3158=_0x1b7909(_0x5af6ae)['slice'](0x0,0xa);return''+_0x3ebded+_0x5a7d4e(_0x341df1)+'_'+_0x50bb50[_0x45a5f1(0xb4)]+'_'+_0x18ceab[_0x45a5f1(0xe5)]+'_'+_0x4d3158;}}return _0xd1a5bc;},__toCommonJS=_0x291d47=>__copyProps(__defProp({},'__esModule',{'value':!![]}),_0x291d47),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module[_0x978f9f(0xdc)]=__toCommonJS(babel_plugin_exports);var CERAPH_TESTID_PREFIX='cer_';function normalizeRelPath(_0x6b833f){return _0x6b833f['replace'](/\\/g,'/')['replace'](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0xf8ef2){const _0x3b5452=_0x978f9f,_0x3587b6=_0xf8ef2['replace'](/\.[jt]sx?$/i,''),_0x4d466a=_0x3587b6[_0x3b5452(0xba)]()[_0x3b5452(0xec)](/[^a-z0-9]+/g,'-')[_0x3b5452(0xec)](/-+/g,'-')[_0x3b5452(0xec)](/^-+|-+$/g,'');return _0x4d466a[_0x3b5452(0xe9)]>0x28?_0x4d466a[_0x3b5452(0xda)](_0x4d466a[_0x3b5452(0xe9)]-0x28)['replace'](/^-+/,''):_0x4d466a;}function fnv1a64Hex(_0x4285e7){const _0x33bbbe=_0x978f9f;let _0x4c6160=0xcbf29ce484222325n;const _0x21b0e1=0x100000001b3n,_0x422fe6=0xffffffffffffffffn;for(let _0x3bed5c=0x0;_0x3bed5c<_0x4285e7[_0x33bbbe(0xe9)];_0x3bed5c++){_0x4c6160^=BigInt(_0x4285e7[_0x33bbbe(0xb3)](_0x3bed5c)),_0x4c6160=_0x4c6160*_0x21b0e1&_0x422fe6;}return _0x4c6160[_0x33bbbe(0xcf)](0x10)[_0x33bbbe(0xc8)](0x10,'0');}function deriveTestId(_0x2794d7){const _0x3bd108=_0x978f9f,_0x34d947=normalizeRelPath(_0x2794d7['relPath']),_0x1d468a=_0x34d947+'|'+_0x2794d7[_0x3bd108(0xb4)]+'|'+_0x2794d7[_0x3bd108(0xe5)]+'|'+(_0x2794d7['tag']??''),_0x146a0f=fnv1a64Hex(_0x1d468a)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x34d947)+'_'+_0x2794d7['line']+'_'+_0x2794d7['col']+'_'+_0x146a0f;}function _0x285a(){const _0x335a7f=['MenuItem','toString','object','posix','TextField','production','testID','defineProperty','1667772kjQHRt','enumerable','property','getOwnPropertyDescriptor','slice','7144781eXGVNi','exports','stringLiteral','jsxIdentifier','jsxAttribute','Slider','types','attributes','Pressable','node','col','32544OAASsl','12ItybVm','Switch','length','onChange','has','replace','opts','RwNmB','Picker','3731080yAIWCK','TouchableHighlight','ListItem','join','54874501PAiDJQ','root','10AYMzdD','Chip','file','charCodeAt','line','prototype','sep','name','path','SearchBar','toLowerCase','TextInput','67713EzKtMS','TouchableNativeFeedback','unshift','4064kEvuTA','call','6SRJdjV','loc','onLongPress','process','isJSXIdentifier','isJSXMemberExpression','1477916mFYiOK','padStart','hasOwnProperty','enabled','isJSXAttribute','relative','function'];_0x285a=function(){return _0x335a7f;};return _0x285a();}var INTERACTIVE_TAGS=new Set([_0x978f9f(0xe3),'TouchableOpacity',_0x978f9f(0xf1),'TouchableWithoutFeedback',_0x978f9f(0xbd),'Button','Link','IconButton',_0x978f9f(0xce),_0x978f9f(0xf2),_0x978f9f(0xb1)]),INPUT_TAGS=new Set([_0x978f9f(0xbb),_0x978f9f(0xd2),_0x978f9f(0xe8),_0x978f9f(0xef),_0x978f9f(0xe0),'Checkbox','SegmentedControl',_0x978f9f(0xb9)]),PRESS_PROPS=new Set(['onPress','onPressIn',_0x978f9f(0xc3),'onClick']),INPUT_PROPS=new Set(['onChangeText','onValueChange',_0x978f9f(0xea)]);function baseTag(_0x508366){return _0x508366['split']('.')[0x0];}function isTargetableJsx(_0x59ab9a,_0x25e50b){const _0x333689=_0x978f9f,_0x2ecc92=baseTag(_0x59ab9a);if(INTERACTIVE_TAGS[_0x333689(0xeb)](_0x59ab9a)||INTERACTIVE_TAGS[_0x333689(0xeb)](_0x2ecc92)||INPUT_TAGS[_0x333689(0xeb)](_0x59ab9a)||INPUT_TAGS['has'](_0x2ecc92))return!![];for(const _0x4832fc of _0x25e50b){if(PRESS_PROPS[_0x333689(0xeb)](_0x4832fc)||INPUT_PROPS[_0x333689(0xeb)](_0x4832fc))return!![];}return![];}var import_node_path=require(_0x978f9f(0xb8));function jsxTagName(_0x4608b6,_0x117670){const _0xfe2eba=_0x978f9f;if(_0x117670['isJSXIdentifier'](_0x4608b6))return _0x4608b6['name'];if(_0x117670[_0xfe2eba(0xc6)](_0x4608b6)){const _0x282a86=[];let _0xe2ff55=_0x4608b6;while(_0x117670[_0xfe2eba(0xc6)](_0xe2ff55)){_0x282a86[_0xfe2eba(0xbe)](_0xe2ff55[_0xfe2eba(0xd8)]['name']),_0xe2ff55=_0xe2ff55[_0xfe2eba(0xd0)];}if(_0x117670['isJSXIdentifier'](_0xe2ff55))_0x282a86['unshift'](_0xe2ff55['name']);return _0x282a86['join']('.');}if(_0x117670['isJSXNamespacedName'](_0x4608b6))return _0x4608b6['namespace']['name']+':'+_0x4608b6[_0xfe2eba(0xb7)]['name'];return'';}function attrName(_0x142322,_0x3304aa){const _0x34ad12=_0x978f9f;return _0x3304aa[_0x34ad12(0xc5)](_0x142322['name'])?_0x142322['name']['name']:void 0x0;}function attrNames(_0x2eabc2,_0x5b3a95){const _0x1a156b=_0x978f9f,_0x4cf559=[];for(const _0x3b089a of _0x2eabc2[_0x1a156b(0xe2)]){if(_0x5b3a95[_0x1a156b(0xcb)](_0x3b089a)){const _0x3abab1=attrName(_0x3b089a,_0x5b3a95);if(_0x3abab1)_0x4cf559['push'](_0x3abab1);}}return _0x4cf559;}function hasTestId(_0x575acc){return _0x575acc['includes']('testID');}function toRelPath(_0x3319d3,_0x43f38b){const _0x4079c9=_0x978f9f,_0xafb9e=_0x3319d3??'',_0x25cc30=_0xafb9e?(0x0,import_node_path[_0x4079c9(0xcc)])(_0xafb9e,_0x43f38b):_0x43f38b;return import_node_path['sep']==='/'?_0x25cc30:_0x25cc30['split'](import_node_path['sep'])[_0x4079c9(0xf3)](import_node_path[_0x4079c9(0xd1)][_0x4079c9(0xb6)]);}function defaultEnabled(){const _0x148897=_0x978f9f,_0x10664c=globalThis[_0x148897(0xc4)]?.['env'];return _0x10664c?.['NODE_ENV']!==_0x148897(0xd3);}function ceraphTestIdPlugin(_0x4fcdbb,_0x1eaf67={}){const _0x1a057c=_0x978f9f,_0x250005=_0x4fcdbb[_0x1a057c(0xe1)],_0x13dba3=_0x1eaf67[_0x1a057c(0xca)]??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x4911d5,_0x135a0c){const _0x1ec540=_0x1a057c;if(!_0x13dba3)return;const _0x38e8f1=_0x4911d5[_0x1ec540(0xe4)],_0x53f5f4=_0x38e8f1[_0x1ec540(0xc2)];if(!_0x53f5f4)return;const _0x25ad80=_0x135a0c['file'][_0x1ec540(0xed)]['filename'];if(!_0x25ad80)return;const _0x8a2a18=jsxTagName(_0x38e8f1['name'],_0x250005),_0x461d42=attrNames(_0x38e8f1,_0x250005);if(hasTestId(_0x461d42))return;if(!isTargetableJsx(_0x8a2a18,_0x461d42))return;const _0x345674=toRelPath(_0x135a0c[_0x1ec540(0xb2)]['opts'][_0x1ec540(0xf5)]??null,_0x25ad80),_0x40c907=deriveTestId({'relPath':_0x345674,'line':_0x53f5f4['start'][_0x1ec540(0xb4)],'col':_0x53f5f4['start']['column']+0x1,'tag':_0x8a2a18});_0x38e8f1[_0x1ec540(0xe2)][_0x1ec540(0xbe)](_0x250005[_0x1ec540(0xdf)](_0x250005[_0x1ec540(0xde)](_0x1ec540(0xd4)),_0x250005[_0x1ec540(0xdd)](_0x40c907)));}}};}
1
+ 'use strict';const _0xec1b36=_0x1041;(function(_0x425405,_0x3ec134){const _0x464a8b=_0x1041,_0x5458f8=_0x425405();while(!![]){try{const _0x562d0b=-parseInt(_0x464a8b(0x8e))/0x1+-parseInt(_0x464a8b(0x9b))/0x2*(parseInt(_0x464a8b(0x95))/0x3)+-parseInt(_0x464a8b(0x6e))/0x4*(-parseInt(_0x464a8b(0x73))/0x5)+parseInt(_0x464a8b(0x76))/0x6*(parseInt(_0x464a8b(0x8d))/0x7)+parseInt(_0x464a8b(0x9a))/0x8+-parseInt(_0x464a8b(0x70))/0x9+parseInt(_0x464a8b(0x6d))/0xa;if(_0x562d0b===_0x3ec134)break;else _0x5458f8['push'](_0x5458f8['shift']());}catch(_0x1e58f7){_0x5458f8['push'](_0x5458f8['shift']());}}}(_0x59eb,0x91231));var __defProp=Object[_0xec1b36(0x93)],__getOwnPropDesc=Object[_0xec1b36(0xa8)],__getOwnPropNames=Object[_0xec1b36(0x94)],__hasOwnProp=Object[_0xec1b36(0x9d)]['hasOwnProperty'],__export=(_0x1f98a8,_0x17ca8)=>{for(var _0x36860b in _0x17ca8)__defProp(_0x1f98a8,_0x36860b,{'get':_0x17ca8[_0x36860b],'enumerable':!![]});},__copyProps=(_0x4025bb,_0x31008a,_0x125e36,_0x46107a)=>{const _0x19dedf=_0xec1b36;if(_0x31008a&&typeof _0x31008a===_0x19dedf(0xa5)||typeof _0x31008a===_0x19dedf(0x85)){for(let _0x4b80a6 of __getOwnPropNames(_0x31008a))if(!__hasOwnProp['call'](_0x4025bb,_0x4b80a6)&&_0x4b80a6!==_0x125e36)__defProp(_0x4025bb,_0x4b80a6,{'get':()=>_0x31008a[_0x4b80a6],'enumerable':!(_0x46107a=__getOwnPropDesc(_0x31008a,_0x4b80a6))||_0x46107a[_0x19dedf(0x72)]});}return _0x4025bb;},__toCommonJS=_0x4752b9=>__copyProps(__defProp({},_0xec1b36(0x8c),{'value':!![]}),_0x4752b9),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module[_0xec1b36(0x69)]=__toCommonJS(babel_plugin_exports);var CERAPH_TESTID_PREFIX='cer_';function normalizeRelPath(_0x2ffda8){const _0x585562=_0xec1b36;return _0x2ffda8[_0x585562(0x9e)](/\\/g,'/')[_0x585562(0x9e)](/^\.\//,'')[_0x585562(0x9e)](/^\/+/,'');}function slug(_0x517740){const _0x18d136=_0xec1b36,_0x3ec1cf=_0x517740['replace'](/\.[jt]sx?$/i,''),_0x457262=_0x3ec1cf[_0x18d136(0x7f)]()['replace'](/[^a-z0-9]+/g,'-')[_0x18d136(0x9e)](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x457262[_0x18d136(0x97)]>0x28?_0x457262[_0x18d136(0x7d)](_0x457262['length']-0x28)['replace'](/^-+/,''):_0x457262;}function fnv1a64Hex(_0x565826){const _0x41d865=_0xec1b36;let _0x508499=0xcbf29ce484222325n;const _0x678f5d=0x100000001b3n,_0x452f6f=0xffffffffffffffffn;for(let _0xf1ed5=0x0;_0xf1ed5<_0x565826['length'];_0xf1ed5++){_0x508499^=BigInt(_0x565826[_0x41d865(0x7e)](_0xf1ed5)),_0x508499=_0x508499*_0x678f5d&_0x452f6f;}return _0x508499[_0x41d865(0x7c)](0x10)['padStart'](0x10,'0');}function deriveTestId(_0x588eeb){const _0x50295c=_0xec1b36,_0xd6e2d7=normalizeRelPath(_0x588eeb[_0x50295c(0x7b)]),_0x9ae2a5=_0xd6e2d7+'|'+_0x588eeb['line']+'|'+_0x588eeb[_0x50295c(0x77)]+'|'+(_0x588eeb['tag']??''),_0x27318d=fnv1a64Hex(_0x9ae2a5)[_0x50295c(0x7d)](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0xd6e2d7)+'_'+_0x588eeb[_0x50295c(0x6a)]+'_'+_0x588eeb['col']+'_'+_0x27318d;}var INTERACTIVE_TAGS=new Set(['Pressable',_0xec1b36(0x71),_0xec1b36(0xa1),'TouchableWithoutFeedback','TouchableNativeFeedback','Button',_0xec1b36(0x8a),_0xec1b36(0x91),_0xec1b36(0x75),'ListItem','Chip']),INPUT_TAGS=new Set(['TextInput',_0xec1b36(0x9c),'Switch','Picker',_0xec1b36(0xa4),'Checkbox','SegmentedControl','SearchBar']),PRESS_PROPS=new Set([_0xec1b36(0x99),'onPressIn','onLongPress','onClick']),INPUT_PROPS=new Set([_0xec1b36(0x86),'onValueChange',_0xec1b36(0xa3)]);function baseTag(_0x5e5198){const _0xbade78=_0xec1b36;return _0x5e5198[_0xbade78(0x6f)]('.')[0x0];}function isTargetableJsx(_0x9e3d6b,_0x2e4190){const _0x2ac226=_0xec1b36,_0x78813c=baseTag(_0x9e3d6b);if(INTERACTIVE_TAGS['has'](_0x9e3d6b)||INTERACTIVE_TAGS['has'](_0x78813c)||INPUT_TAGS['has'](_0x9e3d6b)||INPUT_TAGS['has'](_0x78813c))return!![];for(const _0x8940a2 of _0x2e4190){if(PRESS_PROPS[_0x2ac226(0x82)](_0x8940a2)||INPUT_PROPS[_0x2ac226(0x82)](_0x8940a2))return!![];}return![];}function _0x1041(_0x47cbaf,_0x211131){_0x47cbaf=_0x47cbaf-0x69;const _0x59eb99=_0x59eb();let _0x1041da=_0x59eb99[_0x47cbaf];return _0x1041da;}var import_node_path=require(_0xec1b36(0x9f));function _0x59eb(){const _0x3fd9b9=['loc','onPress','6775472QeQESl','336628FTHzqJ','TextField','prototype','replace','path','types','TouchableHighlight','join','onChange','Slider','object','isJSXIdentifier','stringLiteral','getOwnPropertyDescriptor','node','exports','line','env','start','3539240MdrtRJ','16xnKKvB','split','2388969hBAydX','TouchableOpacity','enumerable','44285rtqkCZ','isJSXAttribute','MenuItem','66YroYWD','col','posix','name','opts','relPath','toString','slice','charCodeAt','toLowerCase','unshift','root','has','file','isJSXNamespacedName','function','onChangeText','sep','includes','push','Link','jsxAttribute','__esModule','89327VaDiQp','11793bcmAuH','process','property','IconButton','jsxIdentifier','defineProperty','getOwnPropertyNames','9TKeopW','testID','length'];_0x59eb=function(){return _0x3fd9b9;};return _0x59eb();}function jsxTagName(_0x4e5473,_0x40c6af){const _0x2c85c0=_0xec1b36;if(_0x40c6af[_0x2c85c0(0xa6)](_0x4e5473))return _0x4e5473[_0x2c85c0(0x79)];if(_0x40c6af['isJSXMemberExpression'](_0x4e5473)){const _0x3779eb=[];let _0x40fb57=_0x4e5473;while(_0x40c6af['isJSXMemberExpression'](_0x40fb57)){_0x3779eb['unshift'](_0x40fb57[_0x2c85c0(0x90)]['name']),_0x40fb57=_0x40fb57[_0x2c85c0(0xa5)];}if(_0x40c6af[_0x2c85c0(0xa6)](_0x40fb57))_0x3779eb[_0x2c85c0(0x80)](_0x40fb57[_0x2c85c0(0x79)]);return _0x3779eb[_0x2c85c0(0xa2)]('.');}if(_0x40c6af[_0x2c85c0(0x84)](_0x4e5473))return _0x4e5473['namespace']['name']+':'+_0x4e5473[_0x2c85c0(0x79)]['name'];return'';}function attrName(_0x2fa218,_0x294b69){const _0x45f20b=_0xec1b36;return _0x294b69[_0x45f20b(0xa6)](_0x2fa218[_0x45f20b(0x79)])?_0x2fa218['name'][_0x45f20b(0x79)]:void 0x0;}function attrNames(_0x436f58,_0x568ee4){const _0x4e65d1=_0xec1b36,_0x403c40=[];for(const _0x7fcc67 of _0x436f58['attributes']){if(_0x568ee4[_0x4e65d1(0x74)](_0x7fcc67)){const _0x28f8cf=attrName(_0x7fcc67,_0x568ee4);if(_0x28f8cf)_0x403c40[_0x4e65d1(0x89)](_0x28f8cf);}}return _0x403c40;}function hasTestId(_0x2e15cb){const _0x3d31d9=_0xec1b36;return _0x2e15cb[_0x3d31d9(0x88)](_0x3d31d9(0x96));}function toRelPath(_0x8375c8,_0x17f6c5){const _0x433177=_0xec1b36,_0x1bfada=_0x8375c8??'',_0x87482e=_0x1bfada?(0x0,import_node_path['relative'])(_0x1bfada,_0x17f6c5):_0x17f6c5;return import_node_path[_0x433177(0x87)]==='/'?_0x87482e:_0x87482e[_0x433177(0x6f)](import_node_path[_0x433177(0x87)])['join'](import_node_path[_0x433177(0x78)]['sep']);}function defaultEnabled(){const _0x3d1e5c=_0xec1b36,_0x224d97=globalThis[_0x3d1e5c(0x8f)]?.[_0x3d1e5c(0x6b)];return _0x224d97?.['NODE_ENV']!=='production';}function ceraphTestIdPlugin(_0x7a0353,_0x16abb9={}){const _0x254feb=_0xec1b36,_0x738510=_0x7a0353[_0x254feb(0xa0)],_0x3cb722=_0x16abb9['enabled']??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x4dc432,_0x113347){const _0x3cc583=_0x254feb;if(!_0x3cb722)return;const _0x142823=_0x4dc432[_0x3cc583(0xa9)],_0x30b62=_0x142823[_0x3cc583(0x98)];if(!_0x30b62)return;const _0x2e2ed7=_0x113347[_0x3cc583(0x83)][_0x3cc583(0x7a)]['filename'];if(!_0x2e2ed7)return;const _0xbfdd46=jsxTagName(_0x142823[_0x3cc583(0x79)],_0x738510),_0x19987a=attrNames(_0x142823,_0x738510);if(hasTestId(_0x19987a))return;if(!isTargetableJsx(_0xbfdd46,_0x19987a))return;const _0xa75f92=toRelPath(_0x113347[_0x3cc583(0x83)]['opts'][_0x3cc583(0x81)]??null,_0x2e2ed7),_0x49d491=deriveTestId({'relPath':_0xa75f92,'line':_0x30b62['start']['line'],'col':_0x30b62[_0x3cc583(0x6c)]['column']+0x1,'tag':_0xbfdd46});_0x142823['attributes'][_0x3cc583(0x80)](_0x738510[_0x3cc583(0x8b)](_0x738510[_0x3cc583(0x92)](_0x3cc583(0x96)),_0x738510[_0x3cc583(0xa7)](_0x49d491)));}}};}
@@ -1 +1 @@
1
- const _0xf638dd=_0x1f63;(function(_0x136789,_0x18ca57){const _0x16802c=_0x1f63,_0x174f47=_0x136789();while(!![]){try{const _0x531e2c=parseInt(_0x16802c(0xed))/0x1+-parseInt(_0x16802c(0x111))/0x2*(parseInt(_0x16802c(0x10e))/0x3)+parseInt(_0x16802c(0x103))/0x4*(-parseInt(_0x16802c(0x10c))/0x5)+-parseInt(_0x16802c(0xfa))/0x6+-parseInt(_0x16802c(0xf4))/0x7*(-parseInt(_0x16802c(0xf0))/0x8)+-parseInt(_0x16802c(0xe7))/0x9*(-parseInt(_0x16802c(0x106))/0xa)+-parseInt(_0x16802c(0x101))/0xb*(-parseInt(_0x16802c(0xe4))/0xc);if(_0x531e2c===_0x18ca57)break;else _0x174f47['push'](_0x174f47['shift']());}catch(_0x1147d4){_0x174f47['push'](_0x174f47['shift']());}}}(_0x37fb,0x29d75));var CERAPH_TESTID_PREFIX=_0xf638dd(0xec);function normalizeRelPath(_0x4b5b23){const _0x32bd95=_0xf638dd;return _0x4b5b23[_0x32bd95(0xff)](/\\/g,'/')['replace'](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x5792de){const _0x5ddedd=_0xf638dd,_0x68baa5=_0x5792de[_0x5ddedd(0xff)](/\.[jt]sx?$/i,''),_0x3624af=_0x68baa5['toLowerCase']()[_0x5ddedd(0xff)](/[^a-z0-9]+/g,'-')[_0x5ddedd(0xff)](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x3624af['length']>0x28?_0x3624af[_0x5ddedd(0xe2)](_0x3624af['length']-0x28)['replace'](/^-+/,''):_0x3624af;}function fnv1a64Hex(_0x26e43e){const _0x17748b=_0xf638dd;let _0x2a02fe=0xcbf29ce484222325n;const _0x17c459=0x100000001b3n,_0x245c35=0xffffffffffffffffn;for(let _0x50bc0d=0x0;_0x50bc0d<_0x26e43e[_0x17748b(0xf3)];_0x50bc0d++){_0x2a02fe^=BigInt(_0x26e43e['charCodeAt'](_0x50bc0d)),_0x2a02fe=_0x2a02fe*_0x17c459&_0x245c35;}return _0x2a02fe['toString'](0x10)['padStart'](0x10,'0');}function deriveTestId(_0x520de1){const _0x57a24c=_0xf638dd,_0x287dce=normalizeRelPath(_0x520de1[_0x57a24c(0xe5)]),_0x588cd3=_0x287dce+'|'+_0x520de1['line']+'|'+_0x520de1['col']+'|'+(_0x520de1['tag']??''),_0x1a914d=fnv1a64Hex(_0x588cd3)[_0x57a24c(0xe2)](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x287dce)+'_'+_0x520de1['line']+'_'+_0x520de1['col']+'_'+_0x1a914d;}function _0x37fb(){const _0x4480fb=['MenuItem','1771KHoUIa','testID','72qhvpOS','push','attributes','30YsAyVm','opts','Chip','Slider','name','stringLiteral','55065RLJihf','env','3GqMXoj','enabled','onPressIn','316930zsmPfW','Pressable','SearchBar','Button','property','Switch','slice','join','25764IsaIpq','relPath','NODE_ENV','107163uGppcY','isJSXIdentifier','start','file','types','cer_','106111kUICCW','has','jsxAttribute','16HvdzKL','jsxIdentifier','isJSXMemberExpression','length','650251wpHoit','root','unshift','column','split','loc','871230yYzMuJ','onClick','ListItem','sep','TouchableHighlight','replace'];_0x37fb=function(){return _0x4480fb;};return _0x37fb();}var INTERACTIVE_TAGS=new Set([_0xf638dd(0x112),'TouchableOpacity',_0xf638dd(0xfe),'TouchableWithoutFeedback','TouchableNativeFeedback',_0xf638dd(0xdf),'Link','IconButton',_0xf638dd(0x100),_0xf638dd(0xfc),_0xf638dd(0x108)]),INPUT_TAGS=new Set(['TextInput','TextField',_0xf638dd(0xe1),'Picker',_0xf638dd(0x109),'Checkbox','SegmentedControl',_0xf638dd(0xde)]),PRESS_PROPS=new Set(['onPress',_0xf638dd(0x110),'onLongPress',_0xf638dd(0xfb)]),INPUT_PROPS=new Set(['onChangeText','onValueChange','onChange']);function baseTag(_0x52e5c1){const _0x216447=_0xf638dd;return _0x52e5c1[_0x216447(0xf8)]('.')[0x0];}function isTargetableJsx(_0x3d6583,_0x4d75b9){const _0x238ee=_0xf638dd,_0x1b7129=baseTag(_0x3d6583);if(INTERACTIVE_TAGS['has'](_0x3d6583)||INTERACTIVE_TAGS[_0x238ee(0xee)](_0x1b7129)||INPUT_TAGS[_0x238ee(0xee)](_0x3d6583)||INPUT_TAGS[_0x238ee(0xee)](_0x1b7129))return!![];for(const _0x4c664a of _0x4d75b9){if(PRESS_PROPS['has'](_0x4c664a)||INPUT_PROPS['has'](_0x4c664a))return!![];}return![];}import{posix,relative,sep}from'path';function jsxTagName(_0x3ed216,_0x38bbde){const _0x8f1609=_0xf638dd;if(_0x38bbde['isJSXIdentifier'](_0x3ed216))return _0x3ed216['name'];if(_0x38bbde[_0x8f1609(0xf2)](_0x3ed216)){const _0x164410=[];let _0x437d43=_0x3ed216;while(_0x38bbde['isJSXMemberExpression'](_0x437d43)){_0x164410[_0x8f1609(0xf6)](_0x437d43[_0x8f1609(0xe0)]['name']),_0x437d43=_0x437d43['object'];}if(_0x38bbde[_0x8f1609(0xe8)](_0x437d43))_0x164410[_0x8f1609(0xf6)](_0x437d43['name']);return _0x164410[_0x8f1609(0xe3)]('.');}if(_0x38bbde['isJSXNamespacedName'](_0x3ed216))return _0x3ed216['namespace'][_0x8f1609(0x10a)]+':'+_0x3ed216[_0x8f1609(0x10a)][_0x8f1609(0x10a)];return'';}function attrName(_0x5bedb8,_0x848e4d){const _0x206e01=_0xf638dd;return _0x848e4d['isJSXIdentifier'](_0x5bedb8['name'])?_0x5bedb8[_0x206e01(0x10a)][_0x206e01(0x10a)]:void 0x0;}function attrNames(_0x5443e0,_0x5c4483){const _0x2d25bc=_0xf638dd,_0x17fd9d=[];for(const _0x1dfd78 of _0x5443e0[_0x2d25bc(0x105)]){if(_0x5c4483['isJSXAttribute'](_0x1dfd78)){const _0x4b33c7=attrName(_0x1dfd78,_0x5c4483);if(_0x4b33c7)_0x17fd9d[_0x2d25bc(0x104)](_0x4b33c7);}}return _0x17fd9d;}function _0x1f63(_0x507adf,_0x484750){_0x507adf=_0x507adf-0xde;const _0x37fb2a=_0x37fb();let _0x1f630c=_0x37fb2a[_0x507adf];return _0x1f630c;}function hasTestId(_0x3cf81d){const _0x5ad3a8=_0xf638dd;return _0x3cf81d['includes'](_0x5ad3a8(0x102));}function toRelPath(_0x42b2ff,_0x17ed56){const _0x46942c=_0xf638dd,_0x4f2592=_0x42b2ff??'',_0x497a18=_0x4f2592?relative(_0x4f2592,_0x17ed56):_0x17ed56;return sep==='/'?_0x497a18:_0x497a18[_0x46942c(0xf8)](sep)['join'](posix[_0x46942c(0xfd)]);}function defaultEnabled(){const _0x137254=_0xf638dd,_0x2e3732=globalThis['process']?.[_0x137254(0x10d)];return _0x2e3732?.[_0x137254(0xe6)]!=='production';}function ceraphTestIdPlugin(_0x198c84,_0xecd3d5={}){const _0x244544=_0xf638dd,_0x457e1a=_0x198c84[_0x244544(0xeb)],_0x168ab8=_0xecd3d5[_0x244544(0x10f)]??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x334876,_0x2501fb){const _0x3e23ce=_0x244544;if(!_0x168ab8)return;const _0x36beed=_0x334876['node'],_0x258f14=_0x36beed[_0x3e23ce(0xf9)];if(!_0x258f14)return;const _0x48b869=_0x2501fb['file']['opts']['filename'];if(!_0x48b869)return;const _0x81fb84=jsxTagName(_0x36beed['name'],_0x457e1a),_0x2e8674=attrNames(_0x36beed,_0x457e1a);if(hasTestId(_0x2e8674))return;if(!isTargetableJsx(_0x81fb84,_0x2e8674))return;const _0x504e6f=toRelPath(_0x2501fb[_0x3e23ce(0xea)][_0x3e23ce(0x107)][_0x3e23ce(0xf5)]??null,_0x48b869),_0x2425a6=deriveTestId({'relPath':_0x504e6f,'line':_0x258f14[_0x3e23ce(0xe9)]['line'],'col':_0x258f14[_0x3e23ce(0xe9)][_0x3e23ce(0xf7)]+0x1,'tag':_0x81fb84});_0x36beed['attributes']['unshift'](_0x457e1a[_0x3e23ce(0xef)](_0x457e1a[_0x3e23ce(0xf1)](_0x3e23ce(0x102)),_0x457e1a[_0x3e23ce(0x10b)](_0x2425a6)));}}};}export{ceraphTestIdPlugin as default};
1
+ const _0x2d249e=_0x583a;(function(_0x3e7a4c,_0x45c8fc){const _0x581946=_0x583a,_0x186157=_0x3e7a4c();while(!![]){try{const _0xd34c95=-parseInt(_0x581946(0x1ac))/0x1*(-parseInt(_0x581946(0x1a2))/0x2)+parseInt(_0x581946(0x1a0))/0x3+parseInt(_0x581946(0x193))/0x4*(parseInt(_0x581946(0x1a4))/0x5)+parseInt(_0x581946(0x1a8))/0x6+-parseInt(_0x581946(0x191))/0x7+parseInt(_0x581946(0x18e))/0x8+-parseInt(_0x581946(0x1b9))/0x9;if(_0xd34c95===_0x45c8fc)break;else _0x186157['push'](_0x186157['shift']());}catch(_0x98223e){_0x186157['push'](_0x186157['shift']());}}}(_0x24e1,0x8ff92));var CERAPH_TESTID_PREFIX=_0x2d249e(0x196);function normalizeRelPath(_0x4ed0c5){const _0x215b35=_0x2d249e;return _0x4ed0c5[_0x215b35(0x1af)](/\\/g,'/')['replace'](/^\.\//,'')[_0x215b35(0x1af)](/^\/+/,'');}function slug(_0x4e3612){const _0x2c7a6d=_0x2d249e,_0x20af26=_0x4e3612[_0x2c7a6d(0x1af)](/\.[jt]sx?$/i,''),_0xc44934=_0x20af26[_0x2c7a6d(0x197)]()['replace'](/[^a-z0-9]+/g,'-')[_0x2c7a6d(0x1af)](/-+/g,'-')[_0x2c7a6d(0x1af)](/^-+|-+$/g,'');return _0xc44934[_0x2c7a6d(0x1ab)]>0x28?_0xc44934[_0x2c7a6d(0x1ad)](_0xc44934[_0x2c7a6d(0x1ab)]-0x28)[_0x2c7a6d(0x1af)](/^-+/,''):_0xc44934;}function _0x583a(_0x1dc3f3,_0x166736){_0x1dc3f3=_0x1dc3f3-0x18b;const _0x24e111=_0x24e1();let _0x583a23=_0x24e111[_0x1dc3f3];return _0x583a23;}function fnv1a64Hex(_0x4f6a8a){const _0x59d0e9=_0x2d249e;let _0x3348b6=0xcbf29ce484222325n;const _0x36235d=0x100000001b3n,_0x13603d=0xffffffffffffffffn;for(let _0x272007=0x0;_0x272007<_0x4f6a8a['length'];_0x272007++){_0x3348b6^=BigInt(_0x4f6a8a[_0x59d0e9(0x1b8)](_0x272007)),_0x3348b6=_0x3348b6*_0x36235d&_0x13603d;}return _0x3348b6[_0x59d0e9(0x1b2)](0x10)['padStart'](0x10,'0');}function deriveTestId(_0x279379){const _0x70a5ff=_0x2d249e,_0x3f1a13=normalizeRelPath(_0x279379['relPath']),_0x403999=_0x3f1a13+'|'+_0x279379['line']+'|'+_0x279379[_0x70a5ff(0x1b4)]+'|'+(_0x279379['tag']??''),_0x4a438a=fnv1a64Hex(_0x403999)[_0x70a5ff(0x1ad)](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x3f1a13)+'_'+_0x279379['line']+'_'+_0x279379[_0x70a5ff(0x1b4)]+'_'+_0x4a438a;}var INTERACTIVE_TAGS=new Set([_0x2d249e(0x1a6),_0x2d249e(0x1a1),_0x2d249e(0x1ae),_0x2d249e(0x1a7),_0x2d249e(0x1aa),_0x2d249e(0x19e),_0x2d249e(0x18b),'IconButton','MenuItem',_0x2d249e(0x1a9),_0x2d249e(0x19a)]),INPUT_TAGS=new Set(['TextInput','TextField','Switch',_0x2d249e(0x192),_0x2d249e(0x19f),'Checkbox','SegmentedControl','SearchBar']),PRESS_PROPS=new Set(['onPress',_0x2d249e(0x18d),'onLongPress','onClick']),INPUT_PROPS=new Set([_0x2d249e(0x190),'onValueChange','onChange']);function baseTag(_0x1339ff){return _0x1339ff['split']('.')[0x0];}function isTargetableJsx(_0x30483a,_0xf0139b){const _0x5f493a=_0x2d249e,_0x56667f=baseTag(_0x30483a);if(INTERACTIVE_TAGS[_0x5f493a(0x18c)](_0x30483a)||INTERACTIVE_TAGS[_0x5f493a(0x18c)](_0x56667f)||INPUT_TAGS[_0x5f493a(0x18c)](_0x30483a)||INPUT_TAGS['has'](_0x56667f))return!![];for(const _0x6fa91e of _0xf0139b){if(PRESS_PROPS['has'](_0x6fa91e)||INPUT_PROPS['has'](_0x6fa91e))return!![];}return![];}import{posix,relative,sep}from'path';function jsxTagName(_0x4c3b03,_0x5ee374){const _0x40aedc=_0x2d249e;if(_0x5ee374['isJSXIdentifier'](_0x4c3b03))return _0x4c3b03[_0x40aedc(0x1b6)];if(_0x5ee374[_0x40aedc(0x1b0)](_0x4c3b03)){const _0x59b5b8=[];let _0x81adca=_0x4c3b03;while(_0x5ee374['isJSXMemberExpression'](_0x81adca)){_0x59b5b8[_0x40aedc(0x19d)](_0x81adca[_0x40aedc(0x1b5)]['name']),_0x81adca=_0x81adca['object'];}if(_0x5ee374['isJSXIdentifier'](_0x81adca))_0x59b5b8[_0x40aedc(0x19d)](_0x81adca['name']);return _0x59b5b8['join']('.');}if(_0x5ee374[_0x40aedc(0x1b3)](_0x4c3b03))return _0x4c3b03['namespace'][_0x40aedc(0x1b6)]+':'+_0x4c3b03[_0x40aedc(0x1b6)]['name'];return'';}function attrName(_0x135840,_0x32bde1){const _0x34fc0c=_0x2d249e;return _0x32bde1['isJSXIdentifier'](_0x135840[_0x34fc0c(0x1b6)])?_0x135840[_0x34fc0c(0x1b6)]['name']:void 0x0;}function attrNames(_0x369aa1,_0x1e5652){const _0xb0a882=_0x2d249e,_0x3df50d=[];for(const _0x8815e9 of _0x369aa1[_0xb0a882(0x1a3)]){if(_0x1e5652['isJSXAttribute'](_0x8815e9)){const _0x22199c=attrName(_0x8815e9,_0x1e5652);if(_0x22199c)_0x3df50d[_0xb0a882(0x199)](_0x22199c);}}return _0x3df50d;}function hasTestId(_0x59469f){const _0x278bd1=_0x2d249e;return _0x59469f[_0x278bd1(0x19b)]('testID');}function toRelPath(_0x4a7452,_0x454dd4){const _0x3d7583=_0x2d249e,_0x1e6028=_0x4a7452??'',_0x3618f2=_0x1e6028?relative(_0x1e6028,_0x454dd4):_0x454dd4;return sep==='/'?_0x3618f2:_0x3618f2['split'](sep)['join'](posix[_0x3d7583(0x198)]);}function defaultEnabled(){const _0x13bbd3=_0x2d249e,_0x2f3095=globalThis[_0x13bbd3(0x1b7)]?.['env'];return _0x2f3095?.['NODE_ENV']!==_0x13bbd3(0x194);}function _0x24e1(){const _0x35d5a9=['attributes','323755MUtARF','filename','Pressable','TouchableWithoutFeedback','890082AGpXBt','ListItem','TouchableNativeFeedback','length','76kWcxiZ','slice','TouchableHighlight','replace','isJSXMemberExpression','jsxAttribute','toString','isJSXNamespacedName','col','property','name','process','charCodeAt','18770733ZLSByt','Link','has','onPressIn','7456936MKemIm','testID','onChangeText','5298202VwLBGX','Picker','44YMnjiz','production','ceraph-testid-injector','cer_','toLowerCase','sep','push','Chip','includes','file','unshift','Button','Slider','3105708AHxrza','TouchableOpacity','15902dgUlIg'];_0x24e1=function(){return _0x35d5a9;};return _0x24e1();}function ceraphTestIdPlugin(_0x1a2bc0,_0x51caca={}){const _0x2d3e78=_0x2d249e,_0x1cf5d7=_0x1a2bc0['types'],_0x3ac3e6=_0x51caca['enabled']??defaultEnabled();return{'name':_0x2d3e78(0x195),'visitor':{'JSXOpeningElement'(_0x220ab0,_0x3ca4b7){const _0x1cf66d=_0x2d3e78;if(!_0x3ac3e6)return;const _0x59cc16=_0x220ab0['node'],_0x330358=_0x59cc16['loc'];if(!_0x330358)return;const _0x25fe33=_0x3ca4b7['file']['opts'][_0x1cf66d(0x1a5)];if(!_0x25fe33)return;const _0x5d76da=jsxTagName(_0x59cc16[_0x1cf66d(0x1b6)],_0x1cf5d7),_0x1ee730=attrNames(_0x59cc16,_0x1cf5d7);if(hasTestId(_0x1ee730))return;if(!isTargetableJsx(_0x5d76da,_0x1ee730))return;const _0x574146=toRelPath(_0x3ca4b7[_0x1cf66d(0x19c)]['opts']['root']??null,_0x25fe33),_0x5c4acf=deriveTestId({'relPath':_0x574146,'line':_0x330358['start']['line'],'col':_0x330358['start']['column']+0x1,'tag':_0x5d76da});_0x59cc16['attributes']['unshift'](_0x1cf5d7[_0x1cf66d(0x1b1)](_0x1cf5d7['jsxIdentifier'](_0x1cf66d(0x18f)),_0x1cf5d7['stringLiteral'](_0x5c4acf)));}}};}export{ceraphTestIdPlugin as default};