@ceraph/react-native-mcp 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -4,7 +4,7 @@ MCP server for React Native and Expo development. It lets your coding agent driv
4
4
 
5
5
  Works with any MCP client: Claude Code, Cursor, Codex, VS Code, Antigravity, and others.
6
6
 
7
- > ⚠️ **Ignore the `npm i` line above.** Run this once instead:
7
+ > **To install and configure Ceraph, run this command from your project root:**
8
8
  >
9
9
  > ```bash
10
10
  > npx @ceraph/react-native-mcp@latest init
@@ -14,10 +14,8 @@ Works with any MCP client: Claude Code, Cursor, Codex, VS Code, Antigravity, and
14
14
 
15
15
  Ceraph supports React Native and Expo apps. iOS testing runs on macOS through
16
16
  Xcode and WebDriverAgent. Android testing runs on macOS, Windows, or Linux
17
- through ADB and UiAutomator2.
18
-
19
- Ceraph supports Expo projects through a development build that `ceraph start`
20
- creates, installs, and launches when needed.
17
+ through ADB and UiAutomator2. Expo projects use a development build rather than
18
+ Expo Go.
21
19
 
22
20
  | Target / host | Status | Notes |
23
21
  | -------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------- |
@@ -28,7 +26,7 @@ creates, installs, and launches when needed.
28
26
 
29
27
  ### Choosing a platform and target
30
28
 
31
- On macOS, an otherwise ambiguous `auto` request defaults to iOS. On Windows and
29
+ On macOS, `ceraph start` defaults to iOS. On Windows and
32
30
  Linux it defaults to Android. An active automation session stays selected.
33
31
  With `--device`, Ceraph selects the platform automatically when exactly one USB
34
32
  device is connected. When multiple devices are connected, pass the exact Apple
@@ -58,17 +56,16 @@ The `rn_target_status` tool reports the active platform, exact runtime, target p
58
56
  ## Requirements
59
57
 
60
58
  - Node.js 20.19+, 22.12+, or 24+
61
- - For iOS: macOS with Xcode 14+ and either an iOS 16+ USB device or a booted Simulator. See [iOS setup](#ios-setup).
62
- - For Android: the Android SDK/JDK used by your project, with `adb` available, and either an authorized USB device or a booted Android Emulator. See [Android setup](#android-setup).
59
+ - For iOS: macOS with Xcode 14+ and either an iOS 16+ USB device or an available Simulator runtime. See [iOS setup](#ios-setup).
60
+ - For Android: the Android SDK/JDK used by your project, with `adb` available, and either an authorized USB device or a configured Android Emulator. See [Android setup](#android-setup).
63
61
 
64
62
  > **Multiple agents:** One running app instance has one active Ceraph driver. Simultaneous contenders are arbitrated so they receive a busy result instead of fighting over the same device, simulator, or emulator.
65
63
 
66
64
  ## iOS setup
67
65
 
68
- iOS device testing requires macOS, Xcode 14+, and iOS 16 or later.
69
-
70
- For projects with multiple iOS build flavors, use `--scheme <name>` and
71
- `--configuration <name>` (default `Debug`).
66
+ Install Xcode 14 or later and complete its first-launch setup. Physical devices
67
+ require iOS 16 or later; simulator testing requires an installed iOS Simulator
68
+ runtime.
72
69
 
73
70
  ### Physical device
74
71
 
@@ -86,27 +83,24 @@ dependency, `ceraph doctor` provides the exact installation step.
86
83
 
87
84
  The Simulator has two presentation modes:
88
85
 
89
- - `ceraph start --simulator` opens a windowed Simulator for visible testing.
86
+ - `ceraph start --simulator` selects and boots a windowed Simulator for visible testing.
90
87
  - `ceraph start --headless` runs without Simulator.app for CI, cloud Macs, and
91
88
  background agent verification. Screenshots, recordings, snapshots, and WDA
92
89
  remain available; host audio is not disabled.
93
90
 
94
91
  Add an exact simulator UDID after either flag to select a particular simulator.
92
+ For projects with multiple iOS build flavors, add `--scheme <name>` and
93
+ `--configuration <name>` (default `Debug`).
95
94
 
96
95
  Ceraph automatically installs the optional `appium-webdriveragent` package the
97
96
  first time it targets a Simulator, then builds and launches WDA. The first build
98
97
  usually takes about a minute; later runs reuse it. Device-only setups do not
99
98
  install this dependency.
100
99
 
101
- You can let Ceraph boot a Simulator or boot one yourself:
102
-
103
- ```bash
104
- open -a Simulator
105
- # or: xcrun simctl boot <UDID>
106
- ```
107
-
108
- Use `xcrun simctl list devices booted` to see booted Simulators. Call
109
- `rn_wda_stop` to stop WDA, or exit the MCP server to stop its managed process.
100
+ Ceraph reuses an eligible booted Simulator or boots the selected/default one
101
+ when needed. Use `xcrun simctl list devices available` to see available
102
+ Simulators. Call `rn_wda_stop` to stop WDA, or exit the MCP server to stop its
103
+ managed process.
110
104
 
111
105
  To make headless mode the default for the current environment:
112
106
 
@@ -127,8 +121,6 @@ never selected automatically. Target one explicitly with
127
121
 
128
122
  ## Android setup
129
123
 
130
- Use `--variant <name>` when the project has multiple debuggable build variants.
131
-
132
124
  Install Android Studio and use its SDK Manager to install Platform-Tools and the
133
125
  SDK components required by your React Native project. Ensure `adb` is available
134
126
  on your `PATH`, then confirm that it can see the intended runtime:
@@ -153,7 +145,8 @@ The Android Emulator has two presentation modes:
153
145
  and background testing.
154
146
 
155
147
  Add an AVD name after either flag to select the virtual device to start or reuse.
156
- `--emulator` also accepts the adb serial of a running emulator.
148
+ `--emulator` also accepts the adb serial of a running emulator. When the project
149
+ has multiple debuggable build variants, add `--variant <name>`.
157
150
 
158
151
  Ceraph manages build and installation, automation, app launch, wake and unlock
159
152
  verification, and Expo dev-client routing for both Android targets.
@@ -305,7 +298,7 @@ Settings → Tools → MCP Servers → Add, then enter:
305
298
  | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
306
299
  | `ceraph_snapshot` | Structured accessibility-tree snapshot of the current screen. Pass `includeStyles: true` after visual changes to include bounded render-time styles for uniquely matched visible elements, plus honest style-coverage metadata. |
307
300
  | `ceraph_run_hook` | Run a project-owned command inside the live app when authentication, gated state, a development-only blocker, or cleanup would otherwise prevent meaningful testing. |
308
- | `ceraph_record_run` | Replay an already-verified path without model pauses and produce a clean MP4 with structured UI snapshots and screenshots tracing the verified flow. |
301
+ | `ceraph_record_run` | Replay an already-verified path without model pauses and produce a clean MP4 with structured UI snapshots and screenshots tracing the verified flow. The recording is screen-only evidence; it does not capture or verify audio. |
309
302
  | `screen_tap` | Tap by snapshot ref, bounds, or coordinates. Prefer a stable ref; screenshot-derived coordinates are best-effort. |
310
303
  | `screen_tap_and_verify` | Find an element by ref/text/label/type, tap its center, and assert a required follow-up selector is on screen. Use `screen_tap` when no postcondition is needed. |
311
304
  | `screen_tap_chain` | Tap a sequence of controls on the same stable screen; sends nothing if any target cannot be resolved. |
@@ -355,7 +348,7 @@ internal use. [Read the full agreement](https://ceraph.dev/license.txt).
355
348
 
356
349
  ## Media picker testing
357
350
 
358
- Call `ceraph_add_media` before opening a native image or video picker when the selected runtime needs something to choose. Ceraph adds the supplied media to the runtime's system photo library; the agent then opens and drives the app's real picker UI as part of the end-to-end flow.
351
+ Call `ceraph_add_media` before opening a native image or video picker when the selected runtime needs something to choose. Ceraph adds the supplied media to the runtime's system photo library; the agent then opens and drives the app's real picker UI as part of the flow.
359
352
 
360
353
  The tool accepts JPEG, PNG, WebP, and HEIC images up to 5 MB, plus MP4, MOV,
361
354
  and M4V videos up to 25 MB. It supports iOS Simulators and Android emulators or
@@ -389,8 +382,7 @@ export function ScanProfileScreen() {
389
382
  `mediaKey` can select both an image and a video for a screen that supports both
390
383
  capture modes.
391
384
 
392
- Ask the agent to add fixtures with `ceraph_add_camera_image` or
393
- `ceraph_add_camera_video`. Images support JPEG, PNG, WebP, and HEIC up to 5 MB;
385
+ Ask your agent to add test images or videos. Images support JPEG, PNG, WebP, and HEIC up to 5 MB;
394
386
  videos support MP4, MOV, and M4V up to 25 MB. Set `overwrite: true` when replacing
395
387
  an existing key.
396
388
 
@@ -428,12 +420,6 @@ A **hook** is a project-owned command that Ceraph can run inside the live
428
420
  development app. It can use the app's own state, navigation, auth, feature-flag,
429
421
  and API modules. The agent invokes a hook explicitly with `ceraph_run_hook`.
430
422
 
431
- > **Safety:** Hooks use your app's services, so a development build
432
- > can still affect a production backend. Use disposable, non-production data,
433
- > keep credentials in your existing secret configuration, and prefer idempotent
434
- > (safe-to-repeat), `runId`-scoped effects. Never modify production or real-user
435
- > data without explicit human authorization. Clean up afterward.
436
-
437
423
  **Create a hook** in `.ceraph/hooks/`, one file per route, named `*.hook.ts` or `*.hook.js`. It exports the route it fires on and a `run` function, and may import your app's own modules:
438
424
 
439
425
  ```ts
@@ -525,16 +511,12 @@ preference or when Ceraph's remediation asks for an explicit override.
525
511
  ## Updates
526
512
 
527
513
  Ceraph automatically informs your agent when it detects a newer release.
528
- You normally don't need to check for updates yourself. To invoke an update
529
- manually, run this from an initialized project:
514
+ You normally don't need to check for updates yourself. To update manually:
530
515
 
531
516
  ```bash
532
517
  ceraph update
533
518
  ```
534
519
 
535
- If the global command is unavailable, run
536
- `npx @ceraph/react-native-mcp@latest update` instead.
537
-
538
520
  By default, Ceraph asks for permission before installing an update. You can ask
539
521
  your agent to enable automatic updates instead at any time.
540
522
 
@@ -1 +1 @@
1
- 'use strict';const _0x2b5fa5=_0x16da;(function(_0x17e19a,_0x50d9fb){const _0x5873ef=_0x16da,_0x1d8d39=_0x17e19a();while(!![]){try{const _0x26ef88=parseInt(_0x5873ef(0xef))/0x1*(parseInt(_0x5873ef(0xd6))/0x2)+parseInt(_0x5873ef(0xe2))/0x3*(-parseInt(_0x5873ef(0xc1))/0x4)+-parseInt(_0x5873ef(0xd3))/0x5+-parseInt(_0x5873ef(0xde))/0x6+-parseInt(_0x5873ef(0xe6))/0x7*(parseInt(_0x5873ef(0xe3))/0x8)+-parseInt(_0x5873ef(0xea))/0x9+-parseInt(_0x5873ef(0xd2))/0xa*(-parseInt(_0x5873ef(0xe0))/0xb);if(_0x26ef88===_0x50d9fb)break;else _0x1d8d39['push'](_0x1d8d39['shift']());}catch(_0x4c68d5){_0x1d8d39['push'](_0x1d8d39['shift']());}}}(_0x4cf8,0x1aaea));var __defProp=Object[_0x2b5fa5(0xd9)],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__getOwnPropNames=Object['getOwnPropertyNames'],__hasOwnProp=Object['prototype']['hasOwnProperty'],__export=(_0x50d821,_0x3fe370)=>{for(var _0x13fcab in _0x3fe370)__defProp(_0x50d821,_0x13fcab,{'get':_0x3fe370[_0x13fcab],'enumerable':!![]});},__copyProps=(_0x93af45,_0x35b48c,_0x53fc0f,_0x2e92b7)=>{const _0x5d65c4=_0x2b5fa5;if(_0x35b48c&&typeof _0x35b48c==='object'||typeof _0x35b48c===_0x5d65c4(0xc2)){for(let _0x1ffe33 of __getOwnPropNames(_0x35b48c))if(!__hasOwnProp['call'](_0x93af45,_0x1ffe33)&&_0x1ffe33!==_0x53fc0f)__defProp(_0x93af45,_0x1ffe33,{'get':()=>_0x35b48c[_0x1ffe33],'enumerable':!(_0x2e92b7=__getOwnPropDesc(_0x35b48c,_0x1ffe33))||_0x2e92b7[_0x5d65c4(0xce)]});}return _0x93af45;},__toCommonJS=_0x1c3508=>__copyProps(__defProp({},_0x2b5fa5(0xca),{'value':!![]}),_0x1c3508),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module[_0x2b5fa5(0xba)]=__toCommonJS(babel_plugin_exports);var CERAPH_TESTID_PREFIX=_0x2b5fa5(0xec);function normalizeRelPath(_0x202f90){const _0x3194b0=_0x2b5fa5;return _0x202f90['replace'](/\\/g,'/')[_0x3194b0(0xeb)](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x270c8d){const _0x7ce41=_0x2b5fa5,_0x478cd4=_0x270c8d[_0x7ce41(0xeb)](/\.[jt]sx?$/i,''),_0x48d7f9=_0x478cd4['toLowerCase']()['replace'](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x48d7f9['length']>0x28?_0x48d7f9['slice'](_0x48d7f9[_0x7ce41(0xc6)]-0x28)[_0x7ce41(0xeb)](/^-+/,''):_0x48d7f9;}function fnv1a64Hex(_0x1b8841){const _0x5b31bf=_0x2b5fa5;let _0x39f8dc=0xcbf29ce484222325n;const _0x2f23de=0x100000001b3n,_0x55213e=0xffffffffffffffffn;for(let _0x3411ab=0x0;_0x3411ab<_0x1b8841['length'];_0x3411ab++){_0x39f8dc^=BigInt(_0x1b8841[_0x5b31bf(0xe8)](_0x3411ab)),_0x39f8dc=_0x39f8dc*_0x2f23de&_0x55213e;}return _0x39f8dc['toString'](0x10)[_0x5b31bf(0xe4)](0x10,'0');}function deriveTestId(_0x57280a){const _0x34b8f6=_0x2b5fa5,_0x195579=normalizeRelPath(_0x57280a[_0x34b8f6(0xc9)]),_0x59f93d=_0x195579+'|'+_0x57280a[_0x34b8f6(0xdc)]+'|'+_0x57280a[_0x34b8f6(0xbe)]+'|'+(_0x57280a[_0x34b8f6(0xbb)]??''),_0x4f8d19=fnv1a64Hex(_0x59f93d)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x195579)+'_'+_0x57280a[_0x34b8f6(0xdc)]+'_'+_0x57280a[_0x34b8f6(0xbe)]+'_'+_0x4f8d19;}var INTERACTIVE_TAGS=new Set([_0x2b5fa5(0xe7),'TouchableOpacity','TouchableHighlight',_0x2b5fa5(0xda),_0x2b5fa5(0xcd),_0x2b5fa5(0xcb),'Link','IconButton','MenuItem','ListItem',_0x2b5fa5(0xb9)]),INPUT_TAGS=new Set(['TextInput','TextField','Switch','Picker','Slider','Checkbox','SegmentedControl','SearchBar']),PRESS_PROPS=new Set([_0x2b5fa5(0xbc),_0x2b5fa5(0xe1),'onLongPress','onClick']),INPUT_PROPS=new Set(['onChangeText','onValueChange','onChange']);function baseTag(_0x35d191){return _0x35d191['split']('.')[0x0];}function _0x16da(_0x489059,_0x4d633c){_0x489059=_0x489059-0xb8;const _0x4cf879=_0x4cf8();let _0x16dad0=_0x4cf879[_0x489059];return _0x16dad0;}function isTargetableJsx(_0x43d133,_0x6322c1){const _0x4f93f2=_0x2b5fa5,_0x149385=baseTag(_0x43d133);if(INTERACTIVE_TAGS['has'](_0x43d133)||INTERACTIVE_TAGS['has'](_0x149385)||INPUT_TAGS[_0x4f93f2(0xc4)](_0x43d133)||INPUT_TAGS['has'](_0x149385)){if('vskEM'===_0x4f93f2(0xee))return!![];else _0x4a7cc1^=_0x3fe6a9(_0x51ddb5['charCodeAt'](_0x11b36b)),_0x4f64a0=_0x408250*_0x3f421a&_0x523d2e;}for(const _0x21dbd2 of _0x6322c1){if('REHBY'!=='Cswhv'){if(PRESS_PROPS[_0x4f93f2(0xc4)](_0x21dbd2)||INPUT_PROPS['has'](_0x21dbd2))return!![];}else{if(_0x47d829[_0x4f93f2(0xc4)](_0xb05506)||_0x34e2ee['has'](_0x55376b))return!![];}}return![];}var import_node_path=require('path');function jsxTagName(_0x1bae14,_0x4ebb99){const _0x95ab42=_0x2b5fa5;if(_0x4ebb99[_0x95ab42(0xb8)](_0x1bae14))return _0x1bae14[_0x95ab42(0xc7)];if(_0x4ebb99[_0x95ab42(0xd1)](_0x1bae14)){if(_0x95ab42(0xdf)==='qrpLY'){const _0x1445eb=[];let _0x496bdc=_0x1bae14;while(_0x4ebb99[_0x95ab42(0xd1)](_0x496bdc)){if(_0x95ab42(0xd0)==='AsBxx')_0x1445eb['unshift'](_0x496bdc[_0x95ab42(0xc8)]['name']),_0x496bdc=_0x496bdc[_0x95ab42(0xc0)];else{const _0x5efc0c=_0x96134[_0x95ab42(0xc5)]?.['env'];return _0x5efc0c?.[_0x95ab42(0xe5)]!=='production';}}if(_0x4ebb99['isJSXIdentifier'](_0x496bdc))_0x1445eb['unshift'](_0x496bdc[_0x95ab42(0xc7)]);return _0x1445eb[_0x95ab42(0xdd)]('.');}else{const _0x322f84=_0x2334b9[_0x95ab42(0xeb)](/\.[jt]sx?$/i,''),_0x428ceb=_0x322f84['toLowerCase']()['replace'](/[^a-z0-9]+/g,'-')[_0x95ab42(0xeb)](/-+/g,'-')[_0x95ab42(0xeb)](/^-+|-+$/g,'');return _0x428ceb[_0x95ab42(0xc6)]>0x28?_0x428ceb['slice'](_0x428ceb[_0x95ab42(0xc6)]-0x28)['replace'](/^-+/,''):_0x428ceb;}}if(_0x4ebb99['isJSXNamespacedName'](_0x1bae14))return _0x1bae14['namespace'][_0x95ab42(0xc7)]+':'+_0x1bae14[_0x95ab42(0xc7)][_0x95ab42(0xc7)];return'';}function _0x4cf8(){const _0x209199=['sep','object','319044UHxUEB','function','testID','has','process','length','name','property','relPath','__esModule','Button','node','TouchableNativeFeedback','enumerable','types','AsBxx','isJSXMemberExpression','670COmwQO','840nugnGT','ceraph-testid-injector','start','19958cmOMaM','enabled','opts','defineProperty','TouchableWithoutFeedback','filename','line','join','1280448fBjloT','qrpLY','80707Fpqugx','onPressIn','3CISvAE','304RuBBCl','padStart','NODE_ENV','9317ZDcLtq','Pressable','charCodeAt','attributes','614799ahPxgo','replace','cer_','jsxAttribute','vskEM','3ftcKtl','isJSXIdentifier','Chip','exports','tag','onPress','split','col'];_0x4cf8=function(){return _0x209199;};return _0x4cf8();}function attrName(_0x57e9b8,_0x411bb5){const _0x403186=_0x2b5fa5;return _0x411bb5[_0x403186(0xb8)](_0x57e9b8['name'])?_0x57e9b8[_0x403186(0xc7)][_0x403186(0xc7)]:void 0x0;}function attrNames(_0x51f7e0,_0x3b63f9){const _0x4a7058=_0x2b5fa5,_0x276182=[];for(const _0x1c4741 of _0x51f7e0[_0x4a7058(0xe9)]){if('htVEj'==='RYMFA'){for(var _0x15af03 in _0x10fa17)_0x5bae95(_0x570918,_0x15af03,{'get':_0x4fd00c[_0x15af03],'enumerable':!![]});}else{if(_0x3b63f9['isJSXAttribute'](_0x1c4741)){const _0xe66c1=attrName(_0x1c4741,_0x3b63f9);if(_0xe66c1)_0x276182['push'](_0xe66c1);}}}return _0x276182;}function hasTestId(_0xbc09cb){return _0xbc09cb['includes']('testID');}function toRelPath(_0x212905,_0x596427){const _0x609a4c=_0x2b5fa5,_0x223627=_0x212905??'',_0x28394b=_0x223627?(0x0,import_node_path['relative'])(_0x223627,_0x596427):_0x596427;return import_node_path['sep']==='/'?_0x28394b:_0x28394b[_0x609a4c(0xbd)](import_node_path[_0x609a4c(0xbf)])['join'](import_node_path['posix'][_0x609a4c(0xbf)]);}function defaultEnabled(){const _0x2ff4ef=_0x2b5fa5,_0x2eed18=globalThis[_0x2ff4ef(0xc5)]?.['env'];return _0x2eed18?.[_0x2ff4ef(0xe5)]!=='production';}function ceraphTestIdPlugin(_0x337b5b,_0x1a2625={}){const _0x114e7e=_0x2b5fa5,_0x959fc3=_0x337b5b[_0x114e7e(0xcf)],_0x5cb655=_0x1a2625[_0x114e7e(0xd7)]??defaultEnabled();return{'name':_0x114e7e(0xd4),'visitor':{'JSXOpeningElement'(_0x40c805,_0x56a93f){const _0x21be0f=_0x114e7e;if(!_0x5cb655)return;const _0x375428=_0x40c805[_0x21be0f(0xcc)],_0x289883=_0x375428['loc'];if(!_0x289883)return;const _0x4464c9=_0x56a93f['file'][_0x21be0f(0xd8)][_0x21be0f(0xdb)];if(!_0x4464c9)return;const _0x33a08c=jsxTagName(_0x375428[_0x21be0f(0xc7)],_0x959fc3),_0x12cb4a=attrNames(_0x375428,_0x959fc3);if(hasTestId(_0x12cb4a))return;if(!isTargetableJsx(_0x33a08c,_0x12cb4a))return;const _0x243b07=toRelPath(_0x56a93f['file'][_0x21be0f(0xd8)]['root']??null,_0x4464c9),_0x4f544c=deriveTestId({'relPath':_0x243b07,'line':_0x289883[_0x21be0f(0xd5)]['line'],'col':_0x289883['start']['column']+0x1,'tag':_0x33a08c});_0x375428[_0x21be0f(0xe9)]['unshift'](_0x959fc3[_0x21be0f(0xed)](_0x959fc3['jsxIdentifier'](_0x21be0f(0xc3)),_0x959fc3['stringLiteral'](_0x4f544c)));}}};}
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 +1 @@
1
- const _0x19a59a=_0x4878;(function(_0x3c8dff,_0x1f963b){const _0x2e70c2=_0x4878,_0x1154ad=_0x3c8dff();while(!![]){try{const _0x2bbe8d=-parseInt(_0x2e70c2(0x21f))/0x1*(parseInt(_0x2e70c2(0x21e))/0x2)+-parseInt(_0x2e70c2(0x1f6))/0x3*(parseInt(_0x2e70c2(0x205))/0x4)+-parseInt(_0x2e70c2(0x20b))/0x5*(-parseInt(_0x2e70c2(0x20d))/0x6)+-parseInt(_0x2e70c2(0x1ef))/0x7*(parseInt(_0x2e70c2(0x221))/0x8)+-parseInt(_0x2e70c2(0x218))/0x9*(-parseInt(_0x2e70c2(0x1fc))/0xa)+-parseInt(_0x2e70c2(0x1f5))/0xb*(-parseInt(_0x2e70c2(0x1f4))/0xc)+parseInt(_0x2e70c2(0x215))/0xd;if(_0x2bbe8d===_0x1f963b)break;else _0x1154ad['push'](_0x1154ad['shift']());}catch(_0x5960b8){_0x1154ad['push'](_0x1154ad['shift']());}}}(_0x47f7,0x9b589));var CERAPH_TESTID_PREFIX=_0x19a59a(0x1f0);function normalizeRelPath(_0x24414d){const _0x577453=_0x19a59a;return _0x24414d['replace'](/\\/g,'/')[_0x577453(0x217)](/^\.\//,'')[_0x577453(0x217)](/^\/+/,'');}function slug(_0x47fa67){const _0x1fa879=_0x19a59a,_0x4894c3=_0x47fa67['replace'](/\.[jt]sx?$/i,''),_0xb99dda=_0x4894c3[_0x1fa879(0x1f7)]()['replace'](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')[_0x1fa879(0x217)](/^-+|-+$/g,'');return _0xb99dda[_0x1fa879(0x219)]>0x28?_0xb99dda['slice'](_0xb99dda['length']-0x28)['replace'](/^-+/,''):_0xb99dda;}function _0x4878(_0x3b375f,_0x390e3d){_0x3b375f=_0x3b375f-0x1ec;const _0x47f760=_0x47f7();let _0x4878d2=_0x47f760[_0x3b375f];return _0x4878d2;}function fnv1a64Hex(_0x3d4e1d){let _0x5bc8a8=0xcbf29ce484222325n;const _0x151397=0x100000001b3n,_0x461ba8=0xffffffffffffffffn;for(let _0x3393b3=0x0;_0x3393b3<_0x3d4e1d['length'];_0x3393b3++){_0x5bc8a8^=BigInt(_0x3d4e1d['charCodeAt'](_0x3393b3)),_0x5bc8a8=_0x5bc8a8*_0x151397&_0x461ba8;}return _0x5bc8a8['toString'](0x10)['padStart'](0x10,'0');}function deriveTestId(_0xc33e36){const _0x203f75=_0x19a59a,_0x59b431=normalizeRelPath(_0xc33e36['relPath']),_0x30310b=_0x59b431+'|'+_0xc33e36['line']+'|'+_0xc33e36['col']+'|'+(_0xc33e36['tag']??''),_0x1dbc75=fnv1a64Hex(_0x30310b)[_0x203f75(0x21a)](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x59b431)+'_'+_0xc33e36[_0x203f75(0x1ff)]+'_'+_0xc33e36[_0x203f75(0x1fb)]+'_'+_0x1dbc75;}var INTERACTIVE_TAGS=new Set(['Pressable',_0x19a59a(0x1ee),_0x19a59a(0x203),_0x19a59a(0x201),'TouchableNativeFeedback',_0x19a59a(0x210),'Link','IconButton','MenuItem','ListItem',_0x19a59a(0x20a)]),INPUT_TAGS=new Set(['TextInput','TextField','Switch',_0x19a59a(0x202),_0x19a59a(0x222),_0x19a59a(0x1f9),'SegmentedControl',_0x19a59a(0x1f3)]),PRESS_PROPS=new Set([_0x19a59a(0x20c),'onPressIn','onLongPress','onClick']),INPUT_PROPS=new Set(['onChangeText',_0x19a59a(0x1f8),'onChange']);function baseTag(_0x566668){return _0x566668['split']('.')[0x0];}function isTargetableJsx(_0x3d6fd0,_0xf24719){const _0x285502=_0x19a59a,_0x531d0c=baseTag(_0x3d6fd0);if(INTERACTIVE_TAGS[_0x285502(0x20f)](_0x3d6fd0)||INTERACTIVE_TAGS['has'](_0x531d0c)||INPUT_TAGS['has'](_0x3d6fd0)||INPUT_TAGS['has'](_0x531d0c))return!![];for(const _0x1caf1c of _0xf24719){if(PRESS_PROPS[_0x285502(0x20f)](_0x1caf1c)||INPUT_PROPS[_0x285502(0x20f)](_0x1caf1c))return!![];}return![];}import{posix,relative,sep}from'path';function jsxTagName(_0x2e63c0,_0x169a93){const _0x480680=_0x19a59a;if(_0x169a93[_0x480680(0x208)](_0x2e63c0))return _0x2e63c0[_0x480680(0x1ed)];if(_0x169a93['isJSXMemberExpression'](_0x2e63c0)){if('jJVbQ'===_0x480680(0x20e))_0xdf70a2['unshift'](_0x597cde[_0x480680(0x209)]['name']),_0x10c235=_0x214857['object'];else{const _0x216faf=[];let _0x4c3c85=_0x2e63c0;while(_0x169a93['isJSXMemberExpression'](_0x4c3c85)){_0x216faf['unshift'](_0x4c3c85['property']['name']),_0x4c3c85=_0x4c3c85['object'];}if(_0x169a93['isJSXIdentifier'](_0x4c3c85))_0x216faf[_0x480680(0x1fa)](_0x4c3c85['name']);return _0x216faf['join']('.');}}if(_0x169a93['isJSXNamespacedName'](_0x2e63c0))return _0x2e63c0[_0x480680(0x220)]['name']+':'+_0x2e63c0['name']['name'];return'';}function attrName(_0x3c12b4,_0x5677aa){const _0x576b70=_0x19a59a;return _0x5677aa[_0x576b70(0x208)](_0x3c12b4[_0x576b70(0x1ed)])?_0x3c12b4['name']['name']:void 0x0;}function attrNames(_0xd5ea8b,_0x2e2d3d){const _0x4c837f=_0x19a59a,_0x2f1e55=[];for(const _0x3feb94 of _0xd5ea8b[_0x4c837f(0x206)]){if(_0x2e2d3d[_0x4c837f(0x21b)](_0x3feb94)){const _0x52ad47=attrName(_0x3feb94,_0x2e2d3d);if(_0x52ad47)_0x2f1e55['push'](_0x52ad47);}}return _0x2f1e55;}function hasTestId(_0x1814f8){const _0x415d46=_0x19a59a;return _0x1814f8[_0x415d46(0x216)](_0x415d46(0x213));}function _0x47f7(){const _0x175d3b=['file','line','jsxAttribute','TouchableWithoutFeedback','Picker','TouchableHighlight','start','5872ihzYQV','attributes','root','isJSXIdentifier','property','Chip','15510eoIczp','onPress','678RjbFBF','TPeBe','has','Button','production','opts','testID','loc','23756343uCCJvq','includes','replace','5787stEJgU','length','slice','isJSXAttribute','env','enabled','355468wkEVyf','6XTQKgs','namespace','4326176FassNc','Slider','types','sep','name','TouchableOpacity','14uNAXrY','cer_','column','filename','SearchBar','13314300rsDmPV','11yWlKDp','2370fjRCNJ','toLowerCase','onValueChange','Checkbox','unshift','col','10210CuNWsk','join'];_0x47f7=function(){return _0x175d3b;};return _0x47f7();}function toRelPath(_0x357132,_0x1e571e){const _0x1a1ca5=_0x19a59a,_0x2d7b48=_0x357132??'',_0x364ae5=_0x2d7b48?relative(_0x2d7b48,_0x1e571e):_0x1e571e;return sep==='/'?_0x364ae5:_0x364ae5['split'](sep)[_0x1a1ca5(0x1fd)](posix[_0x1a1ca5(0x1ec)]);}function defaultEnabled(){const _0x163337=_0x19a59a,_0x5ef0d0=globalThis['process']?.[_0x163337(0x21c)];return _0x5ef0d0?.['NODE_ENV']!==_0x163337(0x211);}function ceraphTestIdPlugin(_0x563960,_0x4b2f71={}){const _0x48258e=_0x19a59a,_0x195d5f=_0x563960[_0x48258e(0x223)],_0x5bb06a=_0x4b2f71[_0x48258e(0x21d)]??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x3b16e1,_0xe87300){const _0x50b2eb=_0x48258e;if(!_0x5bb06a)return;const _0x3db1cc=_0x3b16e1['node'],_0x18193f=_0x3db1cc[_0x50b2eb(0x214)];if(!_0x18193f)return;const _0x5646e9=_0xe87300[_0x50b2eb(0x1fe)]['opts'][_0x50b2eb(0x1f2)];if(!_0x5646e9)return;const _0x27c9ed=jsxTagName(_0x3db1cc['name'],_0x195d5f),_0x58713a=attrNames(_0x3db1cc,_0x195d5f);if(hasTestId(_0x58713a))return;if(!isTargetableJsx(_0x27c9ed,_0x58713a))return;const _0x33a71e=toRelPath(_0xe87300['file'][_0x50b2eb(0x212)][_0x50b2eb(0x207)]??null,_0x5646e9),_0x521342=deriveTestId({'relPath':_0x33a71e,'line':_0x18193f[_0x50b2eb(0x204)][_0x50b2eb(0x1ff)],'col':_0x18193f['start'][_0x50b2eb(0x1f1)]+0x1,'tag':_0x27c9ed});_0x3db1cc['attributes']['unshift'](_0x195d5f[_0x50b2eb(0x200)](_0x195d5f['jsxIdentifier'](_0x50b2eb(0x213)),_0x195d5f['stringLiteral'](_0x521342)));}}};}export{ceraphTestIdPlugin as default};
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};