@ceraph/react-native-mcp 0.4.5 → 0.4.6

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.

Potentially problematic release.


This version of @ceraph/react-native-mcp might be problematic. Click here for more details.

@@ -1 +1 @@
1
- 'use strict';const _0x50ee6e=_0x5795;(function(_0x5a6590,_0x496257){const _0x163059=_0x5795,_0x161787=_0x5a6590();while(!![]){try{const _0x1c9096=parseInt(_0x163059(0x122))/0x1*(parseInt(_0x163059(0x127))/0x2)+parseInt(_0x163059(0x12f))/0x3*(parseInt(_0x163059(0x13a))/0x4)+-parseInt(_0x163059(0x14a))/0x5*(parseInt(_0x163059(0x147))/0x6)+-parseInt(_0x163059(0x132))/0x7*(-parseInt(_0x163059(0x13f))/0x8)+-parseInt(_0x163059(0x150))/0x9*(-parseInt(_0x163059(0x13e))/0xa)+parseInt(_0x163059(0x129))/0xb*(-parseInt(_0x163059(0x139))/0xc)+-parseInt(_0x163059(0x14e))/0xd;if(_0x1c9096===_0x496257)break;else _0x161787['push'](_0x161787['shift']());}catch(_0x5a8118){_0x161787['push'](_0x161787['shift']());}}}(_0x36b0,0xd4b3e));var __defProp=Object['defineProperty'],__getOwnPropDesc=Object[_0x50ee6e(0x12b)],__getOwnPropNames=Object['getOwnPropertyNames'],__hasOwnProp=Object['prototype']['hasOwnProperty'],__export=(_0x47c36e,_0xacd9a0)=>{for(var _0x246753 in _0xacd9a0)__defProp(_0x47c36e,_0x246753,{'get':_0xacd9a0[_0x246753],'enumerable':!![]});},__copyProps=(_0x2c7d0f,_0x46475c,_0x2d5b69,_0x2bc0f3)=>{const _0x1ebfec=_0x50ee6e;if(_0x46475c&&typeof _0x46475c===_0x1ebfec(0x12e)||typeof _0x46475c==='function'){for(let _0x1accfe of __getOwnPropNames(_0x46475c))if(!__hasOwnProp['call'](_0x2c7d0f,_0x1accfe)&&_0x1accfe!==_0x2d5b69)__defProp(_0x2c7d0f,_0x1accfe,{'get':()=>_0x46475c[_0x1accfe],'enumerable':!(_0x2bc0f3=__getOwnPropDesc(_0x46475c,_0x1accfe))||_0x2bc0f3[_0x1ebfec(0x143)]});}return _0x2c7d0f;},__toCommonJS=_0x572501=>__copyProps(__defProp({},_0x50ee6e(0x130),{'value':!![]}),_0x572501),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module[_0x50ee6e(0x123)]=__toCommonJS(babel_plugin_exports);function _0x5795(_0x13a3b2,_0x49637f){_0x13a3b2=_0x13a3b2-0x119;const _0x36b0c0=_0x36b0();let _0x579523=_0x36b0c0[_0x13a3b2];return _0x579523;}var CERAPH_TESTID_PREFIX=_0x50ee6e(0x11e);function normalizeRelPath(_0x463f72){const _0x3b33c9=_0x50ee6e;return _0x463f72[_0x3b33c9(0x144)](/\\/g,'/')['replace'](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x2fd314){const _0x2a3421=_0x50ee6e,_0x18c32c=_0x2fd314[_0x2a3421(0x144)](/\.[jt]sx?$/i,''),_0x3ce966=_0x18c32c[_0x2a3421(0x119)]()['replace'](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')[_0x2a3421(0x144)](/^-+|-+$/g,'');return _0x3ce966[_0x2a3421(0x128)]>0x28?_0x3ce966['slice'](_0x3ce966[_0x2a3421(0x128)]-0x28)[_0x2a3421(0x144)](/^-+/,''):_0x3ce966;}function fnv1a64Hex(_0x468eb7){const _0x7cc731=_0x50ee6e;let _0x5a409d=0xcbf29ce484222325n;const _0x5c0299=0x100000001b3n,_0x3f243a=0xffffffffffffffffn;for(let _0x511134=0x0;_0x511134<_0x468eb7['length'];_0x511134++){_0x5a409d^=BigInt(_0x468eb7[_0x7cc731(0x149)](_0x511134)),_0x5a409d=_0x5a409d*_0x5c0299&_0x3f243a;}return _0x5a409d['toString'](0x10)[_0x7cc731(0x151)](0x10,'0');}function deriveTestId(_0x33a262){const _0x47a438=_0x50ee6e,_0x46a09b=normalizeRelPath(_0x33a262[_0x47a438(0x11d)]),_0x41a098=_0x46a09b+'|'+_0x33a262['line']+'|'+_0x33a262['col']+'|'+(_0x33a262['tag']??''),_0x177402=fnv1a64Hex(_0x41a098)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x46a09b)+'_'+_0x33a262[_0x47a438(0x121)]+'_'+_0x33a262['col']+'_'+_0x177402;}var INTERACTIVE_TAGS=new Set(['Pressable',_0x50ee6e(0x133),_0x50ee6e(0x126),_0x50ee6e(0x13b),_0x50ee6e(0x13d),'Button','Link','IconButton',_0x50ee6e(0x135),'ListItem',_0x50ee6e(0x136)]),INPUT_TAGS=new Set(['TextInput',_0x50ee6e(0x131),'Switch','Picker','Slider',_0x50ee6e(0x120),_0x50ee6e(0x138),'SearchBar']),PRESS_PROPS=new Set(['onPress',_0x50ee6e(0x154),_0x50ee6e(0x11b),'onClick']),INPUT_PROPS=new Set(['onChangeText',_0x50ee6e(0x14f),'onChange']);function baseTag(_0x57ae16){const _0x4c414b=_0x50ee6e;return _0x57ae16[_0x4c414b(0x14b)]('.')[0x0];}function isTargetableJsx(_0x40cf78,_0x5430e4){const _0x438277=_0x50ee6e,_0x218b45=baseTag(_0x40cf78);if(INTERACTIVE_TAGS['has'](_0x40cf78)||INTERACTIVE_TAGS['has'](_0x218b45)||INPUT_TAGS['has'](_0x40cf78)||INPUT_TAGS[_0x438277(0x137)](_0x218b45)){if(_0x438277(0x156)==='mWNeP'){for(var _0x3b190f in _0x5555a8)_0x3adf1a(_0x5b4398,_0x3b190f,{'get':_0x10d94d[_0x3b190f],'enumerable':!![]});}else return!![];}for(const _0x5dde3d of _0x5430e4){if(PRESS_PROPS[_0x438277(0x137)](_0x5dde3d)||INPUT_PROPS[_0x438277(0x137)](_0x5dde3d))return!![];}return![];}var import_node_path=require('path');function jsxTagName(_0xc0a1eb,_0x33a3e2){const _0x88a60c=_0x50ee6e;if(_0x33a3e2[_0x88a60c(0x12c)](_0xc0a1eb))return _0xc0a1eb['name'];if(_0x33a3e2['isJSXMemberExpression'](_0xc0a1eb)){const _0x517b49=[];let _0x493310=_0xc0a1eb;while(_0x33a3e2[_0x88a60c(0x141)](_0x493310)){if('taevR'===_0x88a60c(0x13c))_0x517b49['unshift'](_0x493310[_0x88a60c(0x155)]['name']),_0x493310=_0x493310['object'];else return _0x3247f4[_0x88a60c(0x144)](/\\/g,'/')[_0x88a60c(0x144)](/^\.\//,'')['replace'](/^\/+/,'');}if(_0x33a3e2['isJSXIdentifier'](_0x493310))_0x517b49['unshift'](_0x493310['name']);return _0x517b49['join']('.');}if(_0x33a3e2['isJSXNamespacedName'](_0xc0a1eb))return _0xc0a1eb[_0x88a60c(0x12a)][_0x88a60c(0x14d)]+':'+_0xc0a1eb[_0x88a60c(0x14d)]['name'];return'';}function attrName(_0x285a14,_0x5a504c){return _0x5a504c['isJSXIdentifier'](_0x285a14['name'])?_0x285a14['name']['name']:void 0x0;}function attrNames(_0x2b6e53,_0x2bd02b){const _0x57cd95=_0x50ee6e,_0x3ab3bb=[];for(const _0x1555bd of _0x2b6e53[_0x57cd95(0x11a)]){if(_0x2bd02b[_0x57cd95(0x140)](_0x1555bd)){const _0x325525=attrName(_0x1555bd,_0x2bd02b);if(_0x325525)_0x3ab3bb['push'](_0x325525);}}return _0x3ab3bb;}function hasTestId(_0x453417){const _0x5486dc=_0x50ee6e;return _0x453417['includes'](_0x5486dc(0x125));}function _0x36b0(){const _0x2a2381=['NODE_ENV','testID','TouchableHighlight','39692XjjltL','length','11XPffLt','namespace','getOwnPropertyDescriptor','isJSXIdentifier','sep','object','230634wYTizs','__esModule','TextField','63SbfyJr','TouchableOpacity','node','MenuItem','Chip','has','SegmentedControl','13727100eLoQrr','32nMDZaq','TouchableWithoutFeedback','taevR','TouchableNativeFeedback','677180IrcQtP','338176OesRRs','isJSXAttribute','isJSXMemberExpression','env','enumerable','replace','loc','filename','323694HDHvDR','production','charCodeAt','25ocZVQw','split','unshift','name','14411670vrWNXp','onValueChange','171XiZKHK','padStart','file','enabled','onPressIn','property','mckJC','toLowerCase','attributes','onLongPress','opts','relPath','cer_','posix','Checkbox','line','56BOzvTT','exports'];_0x36b0=function(){return _0x2a2381;};return _0x36b0();}function toRelPath(_0xd27745,_0x5cf877){const _0x5e6331=_0x50ee6e,_0x42a636=_0xd27745??'',_0x391b90=_0x42a636?(0x0,import_node_path['relative'])(_0x42a636,_0x5cf877):_0x5cf877;return import_node_path[_0x5e6331(0x12d)]==='/'?_0x391b90:_0x391b90[_0x5e6331(0x14b)](import_node_path['sep'])['join'](import_node_path[_0x5e6331(0x11f)][_0x5e6331(0x12d)]);}function defaultEnabled(){const _0xf9ca39=_0x50ee6e,_0xc1dae8=globalThis['process']?.[_0xf9ca39(0x142)];return _0xc1dae8?.[_0xf9ca39(0x124)]!==_0xf9ca39(0x148);}function ceraphTestIdPlugin(_0x44d89e,_0x202768={}){const _0x191f8a=_0x50ee6e,_0x1be2e8=_0x44d89e['types'],_0x5ede7d=_0x202768[_0x191f8a(0x153)]??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x401cc6,_0x46418c){const _0x2096fc=_0x191f8a;if(!_0x5ede7d)return;const _0x502b01=_0x401cc6[_0x2096fc(0x134)],_0xa9467d=_0x502b01[_0x2096fc(0x145)];if(!_0xa9467d)return;const _0x5a4267=_0x46418c['file'][_0x2096fc(0x11c)][_0x2096fc(0x146)];if(!_0x5a4267)return;const _0x66e81a=jsxTagName(_0x502b01['name'],_0x1be2e8),_0x3d8a36=attrNames(_0x502b01,_0x1be2e8);if(hasTestId(_0x3d8a36))return;if(!isTargetableJsx(_0x66e81a,_0x3d8a36))return;const _0x48c8c8=toRelPath(_0x46418c[_0x2096fc(0x152)]['opts']['root']??null,_0x5a4267),_0x4e49d7=deriveTestId({'relPath':_0x48c8c8,'line':_0xa9467d['start'][_0x2096fc(0x121)],'col':_0xa9467d['start']['column']+0x1,'tag':_0x66e81a});_0x502b01[_0x2096fc(0x11a)][_0x2096fc(0x14c)](_0x1be2e8['jsxAttribute'](_0x1be2e8['jsxIdentifier'](_0x2096fc(0x125)),_0x1be2e8['stringLiteral'](_0x4e49d7)));}}};}
1
+ 'use strict';const _0x21f2ef=_0x4906;(function(_0x5b2516,_0x552fd5){const _0x5e2d8b=_0x4906,_0x26527b=_0x5b2516();while(!![]){try{const _0x166e35=parseInt(_0x5e2d8b(0x204))/0x1*(parseInt(_0x5e2d8b(0x20b))/0x2)+-parseInt(_0x5e2d8b(0x1f7))/0x3+parseInt(_0x5e2d8b(0x1ef))/0x4*(-parseInt(_0x5e2d8b(0x20f))/0x5)+parseInt(_0x5e2d8b(0x1ff))/0x6+-parseInt(_0x5e2d8b(0x218))/0x7+-parseInt(_0x5e2d8b(0x1f5))/0x8*(parseInt(_0x5e2d8b(0x1fd))/0x9)+parseInt(_0x5e2d8b(0x201))/0xa;if(_0x166e35===_0x552fd5)break;else _0x26527b['push'](_0x26527b['shift']());}catch(_0x29fdf5){_0x26527b['push'](_0x26527b['shift']());}}}(_0x59ce,0xc82a3));var __defProp=Object['defineProperty'],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__getOwnPropNames=Object['getOwnPropertyNames'],__hasOwnProp=Object['prototype'][_0x21f2ef(0x1e9)],__export=(_0x1b2d97,_0x2c33d2)=>{for(var _0x4851f9 in _0x2c33d2)__defProp(_0x1b2d97,_0x4851f9,{'get':_0x2c33d2[_0x4851f9],'enumerable':!![]});},__copyProps=(_0x1f8637,_0x9277c,_0x35b760,_0x44b3bd)=>{const _0x1a5beb=_0x21f2ef;if(_0x9277c&&typeof _0x9277c===_0x1a5beb(0x216)||typeof _0x9277c===_0x1a5beb(0x1f2)){for(let _0x1c7567 of __getOwnPropNames(_0x9277c))if(!__hasOwnProp[_0x1a5beb(0x1eb)](_0x1f8637,_0x1c7567)&&_0x1c7567!==_0x35b760)__defProp(_0x1f8637,_0x1c7567,{'get':()=>_0x9277c[_0x1c7567],'enumerable':!(_0x44b3bd=__getOwnPropDesc(_0x9277c,_0x1c7567))||_0x44b3bd[_0x1a5beb(0x1f1)]});}return _0x1f8637;},__toCommonJS=_0x448aa8=>__copyProps(__defProp({},'__esModule',{'value':!![]}),_0x448aa8),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module[_0x21f2ef(0x200)]=__toCommonJS(babel_plugin_exports);var CERAPH_TESTID_PREFIX=_0x21f2ef(0x203);function normalizeRelPath(_0x1d6c1f){const _0x3def1b=_0x21f2ef;return _0x1d6c1f['replace'](/\\/g,'/')[_0x3def1b(0x1e7)](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x3607d1){const _0x1b8d8a=_0x21f2ef,_0x1adca6=_0x3607d1[_0x1b8d8a(0x1e7)](/\.[jt]sx?$/i,''),_0x12aea3=_0x1adca6['toLowerCase']()['replace'](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')[_0x1b8d8a(0x1e7)](/^-+|-+$/g,'');return _0x12aea3['length']>0x28?_0x12aea3[_0x1b8d8a(0x1ed)](_0x12aea3[_0x1b8d8a(0x1f3)]-0x28)[_0x1b8d8a(0x1e7)](/^-+/,''):_0x12aea3;}function fnv1a64Hex(_0x49cf15){const _0x50f366=_0x21f2ef;let _0x4f2b91=0xcbf29ce484222325n;const _0x5e65c1=0x100000001b3n,_0x20b9c7=0xffffffffffffffffn;for(let _0x462f41=0x0;_0x462f41<_0x49cf15[_0x50f366(0x1f3)];_0x462f41++){_0x4f2b91^=BigInt(_0x49cf15['charCodeAt'](_0x462f41)),_0x4f2b91=_0x4f2b91*_0x5e65c1&_0x20b9c7;}return _0x4f2b91['toString'](0x10)[_0x50f366(0x1e3)](0x10,'0');}function deriveTestId(_0x4d2c68){const _0x14b3f0=_0x21f2ef,_0x43f433=normalizeRelPath(_0x4d2c68['relPath']),_0x3ca73a=_0x43f433+'|'+_0x4d2c68[_0x14b3f0(0x206)]+'|'+_0x4d2c68[_0x14b3f0(0x1f6)]+'|'+(_0x4d2c68[_0x14b3f0(0x1f8)]??''),_0x552f81=fnv1a64Hex(_0x3ca73a)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x43f433)+'_'+_0x4d2c68[_0x14b3f0(0x206)]+'_'+_0x4d2c68[_0x14b3f0(0x1f6)]+'_'+_0x552f81;}var INTERACTIVE_TAGS=new Set([_0x21f2ef(0x209),_0x21f2ef(0x1fe),'TouchableHighlight','TouchableWithoutFeedback',_0x21f2ef(0x214),_0x21f2ef(0x1f4),_0x21f2ef(0x1fb),'IconButton','MenuItem',_0x21f2ef(0x1f0),'Chip']),INPUT_TAGS=new Set(['TextInput','TextField',_0x21f2ef(0x20a),'Picker',_0x21f2ef(0x1f9),_0x21f2ef(0x20c),'SegmentedControl','SearchBar']),PRESS_PROPS=new Set(['onPress','onPressIn','onLongPress','onClick']),INPUT_PROPS=new Set(['onChangeText','onValueChange','onChange']);function baseTag(_0x815ba0){return _0x815ba0['split']('.')[0x0];}function _0x4906(_0x27ed9b,_0x41ff15){_0x27ed9b=_0x27ed9b-0x1e2;const _0x59ce4e=_0x59ce();let _0x4906d2=_0x59ce4e[_0x27ed9b];return _0x4906d2;}function _0x59ce(){const _0x2ec0c3=['isJSXMemberExpression','25895nCPeLy','env','column','file','namespace','TouchableNativeFeedback','unshift','object','sep','10986549zWceKj','NODE_ENV','padStart','split','has','testID','replace','push','hasOwnProperty','start','call','attributes','slice','isJSXAttribute','340wpFjTs','ListItem','enumerable','function','length','Button','8mdSeOc','col','2007636NGLfDP','tag','Slider','loc','Link','name','134163UIhRZO','TouchableOpacity','7762398gWElfZ','exports','14262200EAISuY','filename','cer_','41777wjRViV','opts','line','enabled','property','Pressable','Switch','38PxUITV','Checkbox','ceraph-testid-injector'];_0x59ce=function(){return _0x2ec0c3;};return _0x59ce();}function isTargetableJsx(_0x4492b2,_0x1c0059){const _0x4300fc=_0x21f2ef,_0x261e51=baseTag(_0x4492b2);if(INTERACTIVE_TAGS[_0x4300fc(0x1e5)](_0x4492b2)||INTERACTIVE_TAGS['has'](_0x261e51)||INPUT_TAGS[_0x4300fc(0x1e5)](_0x4492b2)||INPUT_TAGS['has'](_0x261e51))return!![];for(const _0x140184 of _0x1c0059){if(PRESS_PROPS[_0x4300fc(0x1e5)](_0x140184)||INPUT_PROPS[_0x4300fc(0x1e5)](_0x140184))return!![];}return![];}var import_node_path=require('path');function jsxTagName(_0x4eed95,_0x1c1631){const _0x4f21b8=_0x21f2ef;if(_0x1c1631['isJSXIdentifier'](_0x4eed95))return _0x4eed95[_0x4f21b8(0x1fc)];if(_0x1c1631[_0x4f21b8(0x20e)](_0x4eed95)){const _0x269421=[];let _0x298a88=_0x4eed95;while(_0x1c1631['isJSXMemberExpression'](_0x298a88)){_0x269421['unshift'](_0x298a88[_0x4f21b8(0x208)][_0x4f21b8(0x1fc)]),_0x298a88=_0x298a88[_0x4f21b8(0x216)];}if(_0x1c1631['isJSXIdentifier'](_0x298a88))_0x269421[_0x4f21b8(0x215)](_0x298a88[_0x4f21b8(0x1fc)]);return _0x269421['join']('.');}if(_0x1c1631['isJSXNamespacedName'](_0x4eed95))return _0x4eed95[_0x4f21b8(0x213)][_0x4f21b8(0x1fc)]+':'+_0x4eed95[_0x4f21b8(0x1fc)]['name'];return'';}function attrName(_0x25658f,_0x3cf082){const _0x592f5b=_0x21f2ef;return _0x3cf082['isJSXIdentifier'](_0x25658f['name'])?_0x25658f[_0x592f5b(0x1fc)][_0x592f5b(0x1fc)]:void 0x0;}function attrNames(_0x4f7d83,_0x5cd44b){const _0x2c548b=_0x21f2ef,_0x1c5401=[];for(const _0x483c21 of _0x4f7d83['attributes']){if(_0x5cd44b[_0x2c548b(0x1ee)](_0x483c21)){const _0x5a4f89=attrName(_0x483c21,_0x5cd44b);if(_0x5a4f89)_0x1c5401[_0x2c548b(0x1e8)](_0x5a4f89);}}return _0x1c5401;}function hasTestId(_0x31257d){const _0x3d5255=_0x21f2ef;return _0x31257d['includes'](_0x3d5255(0x1e6));}function toRelPath(_0x3d6ac7,_0x2c19db){const _0x56330d=_0x21f2ef,_0x88ed96=_0x3d6ac7??'',_0xc7f6d2=_0x88ed96?(0x0,import_node_path['relative'])(_0x88ed96,_0x2c19db):_0x2c19db;return import_node_path[_0x56330d(0x217)]==='/'?_0xc7f6d2:_0xc7f6d2[_0x56330d(0x1e4)](import_node_path['sep'])['join'](import_node_path['posix'][_0x56330d(0x217)]);}function defaultEnabled(){const _0x3ba803=_0x21f2ef,_0x28271e=globalThis['process']?.[_0x3ba803(0x210)];return _0x28271e?.[_0x3ba803(0x1e2)]!=='production';}function ceraphTestIdPlugin(_0x425062,_0x300af5={}){const _0x42372f=_0x21f2ef,_0x3c7664=_0x425062['types'],_0x4b4d5c=_0x300af5[_0x42372f(0x207)]??defaultEnabled();return{'name':_0x42372f(0x20d),'visitor':{'JSXOpeningElement'(_0x1b3be3,_0x2003df){const _0x437728=_0x42372f;if(!_0x4b4d5c)return;const _0x145895=_0x1b3be3['node'],_0x15a4f5=_0x145895[_0x437728(0x1fa)];if(!_0x15a4f5)return;const _0x372d5a=_0x2003df[_0x437728(0x212)][_0x437728(0x205)][_0x437728(0x202)];if(!_0x372d5a)return;const _0x46d4bb=jsxTagName(_0x145895['name'],_0x3c7664),_0x40e2fb=attrNames(_0x145895,_0x3c7664);if(hasTestId(_0x40e2fb))return;if(!isTargetableJsx(_0x46d4bb,_0x40e2fb))return;const _0x5458a9=toRelPath(_0x2003df[_0x437728(0x212)]['opts']['root']??null,_0x372d5a),_0x29cfae=deriveTestId({'relPath':_0x5458a9,'line':_0x15a4f5['start'][_0x437728(0x206)],'col':_0x15a4f5[_0x437728(0x1ea)][_0x437728(0x211)]+0x1,'tag':_0x46d4bb});_0x145895[_0x437728(0x1ec)]['unshift'](_0x3c7664['jsxAttribute'](_0x3c7664['jsxIdentifier']('testID'),_0x3c7664['stringLiteral'](_0x29cfae)));}}};}
@@ -1 +1 @@
1
- const _0x48071e=_0x11dd;(function(_0x37284e,_0x178610){const _0x2ef483=_0x11dd,_0x35aac9=_0x37284e();while(!![]){try{const _0xb6fc8f=-parseInt(_0x2ef483(0x122))/0x1+-parseInt(_0x2ef483(0x118))/0x2*(-parseInt(_0x2ef483(0x124))/0x3)+-parseInt(_0x2ef483(0x107))/0x4+-parseInt(_0x2ef483(0x11f))/0x5+-parseInt(_0x2ef483(0x126))/0x6+-parseInt(_0x2ef483(0x131))/0x7+parseInt(_0x2ef483(0x134))/0x8*(parseInt(_0x2ef483(0x133))/0x9);if(_0xb6fc8f===_0x178610)break;else _0x35aac9['push'](_0x35aac9['shift']());}catch(_0x20c413){_0x35aac9['push'](_0x35aac9['shift']());}}}(_0x2df0,0x773a2));var CERAPH_TESTID_PREFIX=_0x48071e(0x117);function normalizeRelPath(_0x13d913){const _0x144bb1=_0x48071e;return _0x13d913[_0x144bb1(0x130)](/\\/g,'/')['replace'](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x2fe056){const _0x371ccc=_0x48071e,_0x5c5b60=_0x2fe056['replace'](/\.[jt]sx?$/i,''),_0x5d8904=_0x5c5b60[_0x371ccc(0x10b)]()[_0x371ccc(0x130)](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x5d8904['length']>0x28?_0x5d8904['slice'](_0x5d8904['length']-0x28)['replace'](/^-+/,''):_0x5d8904;}function fnv1a64Hex(_0x24046f){const _0x3f9ee2=_0x48071e;let _0x2f42da=0xcbf29ce484222325n;const _0x256409=0x100000001b3n,_0x580cdf=0xffffffffffffffffn;for(let _0x1638bd=0x0;_0x1638bd<_0x24046f['length'];_0x1638bd++){_0x2f42da^=BigInt(_0x24046f['charCodeAt'](_0x1638bd)),_0x2f42da=_0x2f42da*_0x256409&_0x580cdf;}return _0x2f42da['toString'](0x10)[_0x3f9ee2(0x12a)](0x10,'0');}function deriveTestId(_0x43872f){const _0x3747fc=_0x48071e,_0x24b2fd=normalizeRelPath(_0x43872f[_0x3747fc(0x113)]),_0x5f5a2b=_0x24b2fd+'|'+_0x43872f['line']+'|'+_0x43872f['col']+'|'+(_0x43872f['tag']??''),_0x22d904=fnv1a64Hex(_0x5f5a2b)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x24b2fd)+'_'+_0x43872f['line']+'_'+_0x43872f['col']+'_'+_0x22d904;}var INTERACTIVE_TAGS=new Set([_0x48071e(0x112),'TouchableOpacity',_0x48071e(0x11d),'TouchableWithoutFeedback','TouchableNativeFeedback',_0x48071e(0x121),_0x48071e(0x11b),_0x48071e(0x109),_0x48071e(0x12b),'ListItem',_0x48071e(0x135)]),INPUT_TAGS=new Set([_0x48071e(0x127),'TextField','Switch',_0x48071e(0x132),'Slider','Checkbox','SegmentedControl',_0x48071e(0x11c)]),PRESS_PROPS=new Set(['onPress','onPressIn',_0x48071e(0x12d),'onClick']),INPUT_PROPS=new Set(['onChangeText','onValueChange',_0x48071e(0x12c)]);function baseTag(_0x460781){return _0x460781['split']('.')[0x0];}function isTargetableJsx(_0x37b280,_0x549f15){const _0x357815=_0x48071e,_0x147ee4=baseTag(_0x37b280);if(INTERACTIVE_TAGS[_0x357815(0x111)](_0x37b280)||INTERACTIVE_TAGS['has'](_0x147ee4)||INPUT_TAGS['has'](_0x37b280)||INPUT_TAGS['has'](_0x147ee4))return!![];for(const _0x1b1aab of _0x549f15){if(PRESS_PROPS[_0x357815(0x111)](_0x1b1aab)||INPUT_PROPS['has'](_0x1b1aab))return!![];}return![];}import{posix,relative,sep}from'path';function _0x11dd(_0x129193,_0x34ab21){_0x129193=_0x129193-0x107;const _0x2df0b6=_0x2df0();let _0x11dd46=_0x2df0b6[_0x129193];return _0x11dd46;}function jsxTagName(_0x1596b6,_0xe52562){const _0x270f0e=_0x48071e;if(_0xe52562['isJSXIdentifier'](_0x1596b6))return _0x1596b6['name'];if(_0xe52562[_0x270f0e(0x12e)](_0x1596b6)){const _0x3cdf0c=[];let _0xbe6e82=_0x1596b6;while(_0xe52562[_0x270f0e(0x12e)](_0xbe6e82)){_0x3cdf0c['unshift'](_0xbe6e82['property']['name']),_0xbe6e82=_0xbe6e82[_0x270f0e(0x125)];}if(_0xe52562[_0x270f0e(0x10c)](_0xbe6e82))_0x3cdf0c['unshift'](_0xbe6e82[_0x270f0e(0x10e)]);return _0x3cdf0c['join']('.');}if(_0xe52562['isJSXNamespacedName'](_0x1596b6))return _0x1596b6[_0x270f0e(0x115)][_0x270f0e(0x10e)]+':'+_0x1596b6['name'][_0x270f0e(0x10e)];return'';}function _0x2df0(){const _0x85ecfa=['node','column','has','Pressable','relPath','includes','namespace','jsxAttribute','cer_','318cYnzGk','jsxIdentifier','isJSXAttribute','Link','SearchBar','TouchableHighlight','root','3639835NxlrxF','stringLiteral','Button','793522ZKgRcl','testID','2553JDnSAW','object','1997394gHvSlv','TextInput','opts','process','padStart','MenuItem','onChange','onLongPress','isJSXMemberExpression','env','replace','6085380TSNgEH','Picker','15291zWELzi','17688TsPoHV','Chip','2718864RHtVzj','file','IconButton','start','toLowerCase','isJSXIdentifier','attributes','name'];_0x2df0=function(){return _0x85ecfa;};return _0x2df0();}function attrName(_0x4ce20b,_0x615cf6){const _0x565919=_0x48071e;return _0x615cf6['isJSXIdentifier'](_0x4ce20b['name'])?_0x4ce20b[_0x565919(0x10e)][_0x565919(0x10e)]:void 0x0;}function attrNames(_0x82e263,_0x12cc32){const _0x44d579=_0x48071e,_0x265831=[];for(const _0x248b21 of _0x82e263[_0x44d579(0x10d)]){if(_0x12cc32[_0x44d579(0x11a)](_0x248b21)){const _0x1357ff=attrName(_0x248b21,_0x12cc32);if(_0x1357ff)_0x265831['push'](_0x1357ff);}}return _0x265831;}function hasTestId(_0x452e92){const _0xf9c51e=_0x48071e;return _0x452e92[_0xf9c51e(0x114)](_0xf9c51e(0x123));}function toRelPath(_0x550e32,_0x555104){const _0x5c99d6=_0x550e32??'',_0x5668b4=_0x5c99d6?relative(_0x5c99d6,_0x555104):_0x555104;return sep==='/'?_0x5668b4:_0x5668b4['split'](sep)['join'](posix['sep']);}function defaultEnabled(){const _0x4a65ba=_0x48071e,_0x36e400=globalThis[_0x4a65ba(0x129)]?.[_0x4a65ba(0x12f)];return _0x36e400?.['NODE_ENV']!=='production';}function ceraphTestIdPlugin(_0x1ac91c,_0x53230f={}){const _0x1fc548=_0x1ac91c['types'],_0x7a7cdb=_0x53230f['enabled']??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x55e12d,_0x4d6190){const _0x38d5ee=_0x11dd;if(!_0x7a7cdb)return;const _0x1bab15=_0x55e12d[_0x38d5ee(0x10f)],_0x583a2b=_0x1bab15['loc'];if(!_0x583a2b)return;const _0x18de79=_0x4d6190[_0x38d5ee(0x108)][_0x38d5ee(0x128)]['filename'];if(!_0x18de79)return;const _0x14a1a3=jsxTagName(_0x1bab15[_0x38d5ee(0x10e)],_0x1fc548),_0x41c877=attrNames(_0x1bab15,_0x1fc548);if(hasTestId(_0x41c877))return;if(!isTargetableJsx(_0x14a1a3,_0x41c877))return;const _0xf7eb6a=toRelPath(_0x4d6190['file']['opts'][_0x38d5ee(0x11e)]??null,_0x18de79),_0x3337f3=deriveTestId({'relPath':_0xf7eb6a,'line':_0x583a2b[_0x38d5ee(0x10a)]['line'],'col':_0x583a2b['start'][_0x38d5ee(0x110)]+0x1,'tag':_0x14a1a3});_0x1bab15['attributes']['unshift'](_0x1fc548[_0x38d5ee(0x116)](_0x1fc548[_0x38d5ee(0x119)]('testID'),_0x1fc548[_0x38d5ee(0x120)](_0x3337f3)));}}};}export{ceraphTestIdPlugin as default};
1
+ const _0x20ecbd=_0x57cf;(function(_0x58d4d1,_0x100f73){const _0x5ae4c7=_0x57cf,_0x482b8f=_0x58d4d1();while(!![]){try{const _0x1b0909=-parseInt(_0x5ae4c7(0x133))/0x1+-parseInt(_0x5ae4c7(0x11a))/0x2+parseInt(_0x5ae4c7(0x137))/0x3+parseInt(_0x5ae4c7(0x115))/0x4*(parseInt(_0x5ae4c7(0x113))/0x5)+-parseInt(_0x5ae4c7(0x142))/0x6+parseInt(_0x5ae4c7(0x12d))/0x7*(parseInt(_0x5ae4c7(0x13a))/0x8)+-parseInt(_0x5ae4c7(0x13f))/0x9*(parseInt(_0x5ae4c7(0x11c))/0xa);if(_0x1b0909===_0x100f73)break;else _0x482b8f['push'](_0x482b8f['shift']());}catch(_0x4af8b1){_0x482b8f['push'](_0x482b8f['shift']());}}}(_0x45cd,0xdd4cc));var CERAPH_TESTID_PREFIX='cer_';function normalizeRelPath(_0x591053){const _0x4c2032=_0x57cf;return _0x591053['replace'](/\\/g,'/')['replace'](/^\.\//,'')[_0x4c2032(0x141)](/^\/+/,'');}function slug(_0x412217){const _0x4c46a4=_0x57cf,_0xf05090=_0x412217[_0x4c46a4(0x141)](/\.[jt]sx?$/i,''),_0x535b71=_0xf05090[_0x4c46a4(0x130)]()[_0x4c46a4(0x141)](/[^a-z0-9]+/g,'-')[_0x4c46a4(0x141)](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x535b71['length']>0x28?_0x535b71['slice'](_0x535b71['length']-0x28)['replace'](/^-+/,''):_0x535b71;}function fnv1a64Hex(_0x65a5de){const _0x58598a=_0x57cf;let _0x13ecdb=0xcbf29ce484222325n;const _0x510bbf=0x100000001b3n,_0x19125e=0xffffffffffffffffn;for(let _0x368b81=0x0;_0x368b81<_0x65a5de[_0x58598a(0x126)];_0x368b81++){_0x13ecdb^=BigInt(_0x65a5de[_0x58598a(0x112)](_0x368b81)),_0x13ecdb=_0x13ecdb*_0x510bbf&_0x19125e;}return _0x13ecdb[_0x58598a(0x12b)](0x10)['padStart'](0x10,'0');}function deriveTestId(_0x4a8c41){const _0x142077=_0x57cf,_0x50a983=normalizeRelPath(_0x4a8c41['relPath']),_0x3467e9=_0x50a983+'|'+_0x4a8c41['line']+'|'+_0x4a8c41[_0x142077(0x125)]+'|'+(_0x4a8c41[_0x142077(0x123)]??''),_0x9bace7=fnv1a64Hex(_0x3467e9)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x50a983)+'_'+_0x4a8c41['line']+'_'+_0x4a8c41[_0x142077(0x125)]+'_'+_0x9bace7;}var INTERACTIVE_TAGS=new Set(['Pressable',_0x20ecbd(0x116),_0x20ecbd(0x13d),'TouchableWithoutFeedback',_0x20ecbd(0x13b),'Button','Link',_0x20ecbd(0x119),_0x20ecbd(0x127),_0x20ecbd(0x124),'Chip']),INPUT_TAGS=new Set(['TextInput',_0x20ecbd(0x121),'Switch','Picker','Slider','Checkbox',_0x20ecbd(0x12c),'SearchBar']),PRESS_PROPS=new Set([_0x20ecbd(0x144),_0x20ecbd(0x11d),_0x20ecbd(0x114),_0x20ecbd(0x131)]),INPUT_PROPS=new Set([_0x20ecbd(0x140),_0x20ecbd(0x110),'onChange']);function baseTag(_0x3402c1){const _0x577ce7=_0x20ecbd;return _0x3402c1[_0x577ce7(0x128)]('.')[0x0];}function isTargetableJsx(_0x50be75,_0x61e4e7){const _0xa5a4ad=_0x20ecbd,_0x497df3=baseTag(_0x50be75);if(INTERACTIVE_TAGS[_0xa5a4ad(0x12a)](_0x50be75)||INTERACTIVE_TAGS['has'](_0x497df3)||INPUT_TAGS[_0xa5a4ad(0x12a)](_0x50be75)||INPUT_TAGS[_0xa5a4ad(0x12a)](_0x497df3))return!![];for(const _0x2d36ee of _0x61e4e7){if(PRESS_PROPS[_0xa5a4ad(0x12a)](_0x2d36ee)||INPUT_PROPS[_0xa5a4ad(0x12a)](_0x2d36ee))return!![];}return![];}import{posix,relative,sep}from'path';function jsxTagName(_0x2f22f0,_0x3c9cc4){const _0x3da31f=_0x20ecbd;if(_0x3c9cc4['isJSXIdentifier'](_0x2f22f0))return _0x2f22f0[_0x3da31f(0x135)];if(_0x3c9cc4[_0x3da31f(0x13e)](_0x2f22f0)){const _0x2948ad=[];let _0x302206=_0x2f22f0;while(_0x3c9cc4['isJSXMemberExpression'](_0x302206)){_0x2948ad[_0x3da31f(0x118)](_0x302206['property']['name']),_0x302206=_0x302206['object'];}if(_0x3c9cc4['isJSXIdentifier'](_0x302206))_0x2948ad['unshift'](_0x302206['name']);return _0x2948ad['join']('.');}if(_0x3c9cc4[_0x3da31f(0x139)](_0x2f22f0))return _0x2f22f0[_0x3da31f(0x11b)]['name']+':'+_0x2f22f0['name'][_0x3da31f(0x135)];return'';}function attrName(_0x33ca7d,_0x33b513){const _0x302411=_0x20ecbd;return _0x33b513[_0x302411(0x13c)](_0x33ca7d[_0x302411(0x135)])?_0x33ca7d['name']['name']:void 0x0;}function attrNames(_0x32b27d,_0x480f03){const _0x567b71=_0x20ecbd,_0x32ddfa=[];for(const _0x30c394 of _0x32b27d['attributes']){if(_0x567b71(0x129)!=='Cinml'){if(_0x480f03['isJSXAttribute'](_0x30c394)){const _0x170a09=attrName(_0x30c394,_0x480f03);if(_0x170a09)_0x32ddfa['push'](_0x170a09);}}else{const _0x8dba6c=[];for(const _0x366806 of _0x21d7e2['attributes']){if(_0x15e480[_0x567b71(0x12f)](_0x366806)){const _0x1af027=_0xd6fc94(_0x366806,_0x553278);if(_0x1af027)_0x8dba6c[_0x567b71(0x120)](_0x1af027);}}return _0x8dba6c;}}return _0x32ddfa;}function hasTestId(_0x5a9b05){return _0x5a9b05['includes']('testID');}function toRelPath(_0x2e313c,_0x588d72){const _0x1d3488=_0x20ecbd,_0x3af1d2=_0x2e313c??'',_0x33c012=_0x3af1d2?relative(_0x3af1d2,_0x588d72):_0x588d72;return sep==='/'?_0x33c012:_0x33c012[_0x1d3488(0x128)](sep)[_0x1d3488(0x136)](posix[_0x1d3488(0x111)]);}function _0x57cf(_0x1ba854,_0x2e3cf){_0x1ba854=_0x1ba854-0x10f;const _0x45cd08=_0x45cd();let _0x57cf4b=_0x45cd08[_0x1ba854];return _0x57cf4b;}function defaultEnabled(){const _0xc7a9f0=_0x20ecbd,_0x242457=globalThis[_0xc7a9f0(0x122)]?.['env'];return _0x242457?.['NODE_ENV']!==_0xc7a9f0(0x132);}function _0x45cd(){const _0x1cb0f9=['toLowerCase','onClick','production','1106456VeTTua','jsxAttribute','name','join','4697955vtTOED','start','isJSXNamespacedName','8728pABMYS','TouchableNativeFeedback','isJSXIdentifier','TouchableHighlight','isJSXMemberExpression','3983076PDLsbV','onChangeText','replace','10462344VbTsmX','loc','onPress','testID','filename','onValueChange','sep','charCodeAt','590FHuEsU','onLongPress','60776KqAfwZ','TouchableOpacity','jsxIdentifier','unshift','IconButton','1459276wWjUsC','namespace','10QaFasf','onPressIn','file','ceraph-testid-injector','push','TextField','process','tag','ListItem','col','length','MenuItem','split','igClQ','has','toString','SegmentedControl','10073jdbbbN','column','isJSXAttribute'];_0x45cd=function(){return _0x1cb0f9;};return _0x45cd();}function ceraphTestIdPlugin(_0xa92e70,_0x44b4ff={}){const _0x506e0a=_0x20ecbd,_0x16ec2f=_0xa92e70['types'],_0x3e138c=_0x44b4ff['enabled']??defaultEnabled();return{'name':_0x506e0a(0x11f),'visitor':{'JSXOpeningElement'(_0x1f6aae,_0x4ec0a5){const _0x592d0e=_0x506e0a;if(!_0x3e138c)return;const _0x32dfdf=_0x1f6aae['node'],_0x4c3c46=_0x32dfdf[_0x592d0e(0x143)];if(!_0x4c3c46)return;const _0x34b816=_0x4ec0a5[_0x592d0e(0x11e)]['opts'][_0x592d0e(0x10f)];if(!_0x34b816)return;const _0x36ab19=jsxTagName(_0x32dfdf['name'],_0x16ec2f),_0x3cb592=attrNames(_0x32dfdf,_0x16ec2f);if(hasTestId(_0x3cb592))return;if(!isTargetableJsx(_0x36ab19,_0x3cb592))return;const _0x3a342b=toRelPath(_0x4ec0a5['file']['opts']['root']??null,_0x34b816),_0x38f103=deriveTestId({'relPath':_0x3a342b,'line':_0x4c3c46[_0x592d0e(0x138)]['line'],'col':_0x4c3c46[_0x592d0e(0x138)][_0x592d0e(0x12e)]+0x1,'tag':_0x36ab19});_0x32dfdf['attributes'][_0x592d0e(0x118)](_0x16ec2f[_0x592d0e(0x134)](_0x16ec2f[_0x592d0e(0x117)](_0x592d0e(0x145)),_0x16ec2f['stringLiteral'](_0x38f103)));}}};}export{ceraphTestIdPlugin as default};