@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-beta.4

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.
Files changed (279) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/upgrade.js +1 -1
  163. package/lib/commands/registry.js +1 -1
  164. package/lib/commands/role/create.js +1 -1
  165. package/lib/commands/role/delete.js +1 -1
  166. package/lib/commands/role/detail.js +1 -1
  167. package/lib/commands/role/index.js +1 -1
  168. package/lib/commands/role/list.js +1 -1
  169. package/lib/commands/role/shared.js +1 -1
  170. package/lib/commands/role/update.js +1 -1
  171. package/lib/commands/role/user-add.js +1 -1
  172. package/lib/commands/role/user-remove.js +1 -1
  173. package/lib/commands/role/user-resolve.js +1 -1
  174. package/lib/commands/run/index.js +1 -1
  175. package/lib/commands/schema.js +1 -1
  176. package/lib/commands/sql/create.js +1 -1
  177. package/lib/commands/sql/delete.js +1 -1
  178. package/lib/commands/sql/detail.js +1 -1
  179. package/lib/commands/sql/exec.js +1 -1
  180. package/lib/commands/sql/index.js +1 -1
  181. package/lib/commands/sql/list.js +1 -1
  182. package/lib/commands/sql/pull.js +1 -1
  183. package/lib/commands/sql/push.js +1 -1
  184. package/lib/commands/sql/shared.js +1 -1
  185. package/lib/commands/sql/status.js +1 -1
  186. package/lib/commands/sql/validate.js +1 -1
  187. package/lib/commands/task/index.js +1 -1
  188. package/lib/commands/task/status.js +1 -1
  189. package/lib/commands/tenant/index.js +1 -1
  190. package/lib/commands/tenant/members-list.js +1 -1
  191. package/lib/commands/tenant/shared.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -1
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
  274. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  275. package/templates/projects/sub-app-react-demo/README.md +1 -1
  276. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  277. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  278. package/lib/commands/project/init.js +0 -1
  279. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- const a212_0x2bd868=a212_0x3fb5;(function(_0x4382f8,_0x287b3a){const _0x48bf18=a212_0x3fb5,_0x336267=_0x4382f8();while(!![]){try{const _0x28252d=parseInt(_0x48bf18(0x1a2))/0x1*(parseInt(_0x48bf18(0x1aa))/0x2)+-parseInt(_0x48bf18(0x1a5))/0x3+-parseInt(_0x48bf18(0x1c0))/0x4*(parseInt(_0x48bf18(0x199))/0x5)+parseInt(_0x48bf18(0x19e))/0x6*(parseInt(_0x48bf18(0x1b8))/0x7)+-parseInt(_0x48bf18(0x1a0))/0x8+-parseInt(_0x48bf18(0x1a8))/0x9*(parseInt(_0x48bf18(0x198))/0xa)+-parseInt(_0x48bf18(0x19a))/0xb*(-parseInt(_0x48bf18(0x1a7))/0xc);if(_0x28252d===_0x287b3a)break;else _0x336267['push'](_0x336267['shift']());}catch(_0x46dd08){_0x336267['push'](_0x336267['shift']());}}}(a212_0x5b78,0xbb941));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a212_0x2bd868(0x1a4),'ENDPOINT',a212_0x2bd868(0x1a3)];export function normalizeBffType(_0xb5dbbf){const _0x1c4f11=a212_0x2bd868;if(!_0xb5dbbf)return undefined;const _0x33f27f=_0xb5dbbf['trim']()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x1c4f11(0x1b0)](_0x33f27f)?_0x33f27f:undefined;}function a212_0x3fb5(_0x4d9653,_0x38cc28){_0x4d9653=_0x4d9653-0x198;const _0x5b7803=a212_0x5b78();let _0x3fb530=_0x5b7803[_0x4d9653];return _0x3fb530;}async function scanJsFilesRecursively(_0x4856cc,_0x4a83d7){const _0x290a34=a212_0x2bd868,_0x2fbd4d=[];try{const _0x2b09b5=await readdir(_0x4856cc,{'withFileTypes':!![]});for(const _0x191e8a of _0x2b09b5){const _0x52fa32=join(_0x4856cc,_0x191e8a[_0x290a34(0x1b1)]);if(_0x191e8a[_0x290a34(0x1b9)]())_0x2fbd4d[_0x290a34(0x1b7)](...await scanJsFilesRecursively(_0x52fa32,_0x4a83d7+'/'+_0x191e8a[_0x290a34(0x1b1)]));else _0x191e8a[_0x290a34(0x1ad)]()&&_0x191e8a[_0x290a34(0x1b1)][_0x290a34(0x1a1)](_0x290a34(0x19f))&&_0x2fbd4d['push']({'lockKey':_0x4a83d7+'/'+_0x191e8a['name']['replace'](/\.js$/,''),'filePath':_0x52fa32});}}catch(_0x292316){if(_0x292316[_0x290a34(0x1ab)]!==_0x290a34(0x1bf))throw _0x292316;}return _0x2fbd4d;}async function scanFlatFunctions(_0x2eddd9,_0x46c1d7){const _0x2ea0d1=a212_0x2bd868,_0x4bf4ff=join(_0x2eddd9[_0x2ea0d1(0x1b2)],_0x46c1d7),_0x8a6693=await scanJsFilesRecursively(_0x4bf4ff,_0x46c1d7);return _0x8a6693['map'](({lockKey:_0x32625a,filePath:_0x2e9bd8})=>({'type':_0x46c1d7,'name':_0x32625a['split']('/')['at'](-0x1)??'','filePath':_0x2e9bd8,'lockKey':_0x32625a}));}async function scanHookFunctions(_0x411601){const _0x1a5a63=a212_0x2bd868,_0x57d986=join(_0x411601[_0x1a5a63(0x1b2)],_0x1a5a63(0x1a3)),_0x3675fb=[];try{const _0x38820c=await readdir(_0x57d986,{'withFileTypes':!![]});for(const _0x3cbae3 of _0x38820c){if(!_0x3cbae3['isDirectory']())continue;const _0xebb8c6=_0x3cbae3[_0x1a5a63(0x1b1)],_0x5f5c31=join(_0x57d986,_0xebb8c6),_0x412694=await readdir(_0x5f5c31,{'withFileTypes':!![]});for(const _0x5cb3c7 of _0x412694){if(!_0x5cb3c7[_0x1a5a63(0x1b9)]())continue;const _0x47c138=_0x5cb3c7[_0x1a5a63(0x1b1)],_0x435d10=join(_0x5f5c31,_0x47c138),_0x325d03=await readdir(_0x435d10,{'withFileTypes':!![]});for(const _0x57dfb9 of _0x325d03){if(!_0x57dfb9[_0x1a5a63(0x1b9)]())continue;const _0x377240=_0x57dfb9[_0x1a5a63(0x1b1)],_0x3bb629=join(_0x435d10,_0x377240),_0x1607d6=await readdir(_0x3bb629,{'withFileTypes':!![]});for(const _0x6e6fb of _0x1607d6){if(!_0x6e6fb['isFile']()||!_0x6e6fb['name'][_0x1a5a63(0x1a1)](_0x1a5a63(0x19f)))continue;const _0xc5def4=_0x6e6fb[_0x1a5a63(0x1b1)][_0x1a5a63(0x1b5)](/\.js$/,'');_0x3675fb['push']({'type':_0x1a5a63(0x1a3),'name':_0xc5def4,'filePath':join(_0x3bb629,_0x6e6fb[_0x1a5a63(0x1b1)]),'lockKey':_0x1a5a63(0x1a6)+_0xebb8c6+'/'+_0x47c138+'/'+_0x377240+'/'+_0xc5def4,'alias':_0xebb8c6,'operationType':_0x47c138,'functionNode':_0x377240});}}}}}catch(_0x157d94){if(_0x157d94['code']!==_0x1a5a63(0x1bf))throw _0x157d94;}return _0x3675fb;}export async function scanLocalBffFunctions(_0x1e4902,_0x16f81d){const _0x965b62=a212_0x2bd868;if(_0x16f81d===_0x965b62(0x1a4)||_0x16f81d==='ENDPOINT')return scanFlatFunctions(_0x1e4902,_0x16f81d);if(_0x16f81d===_0x965b62(0x1a3))return scanHookFunctions(_0x1e4902);const [_0x2911c6,_0x3fa7ae,_0x45249f]=await Promise[_0x965b62(0x1bb)]([scanFlatFunctions(_0x1e4902,_0x965b62(0x1a4)),scanFlatFunctions(_0x1e4902,_0x965b62(0x1b6)),scanHookFunctions(_0x1e4902)]);return[..._0x2911c6,..._0x3fa7ae,..._0x45249f];}export function resolveLocalFilePathFromLockKey(_0x26b248,_0x2336f4){const _0x3b93f1=a212_0x2bd868;return join(_0x26b248[_0x3b93f1(0x1b2)],..._0x2336f4[_0x3b93f1(0x1bd)]('/'))+_0x3b93f1(0x19f);}export function createHookLocationMap(_0x574ef9){const _0x64baf9=a212_0x2bd868,_0x2747a1=new Map();for(const _0x36d396 of _0x574ef9){_0x36d396[_0x64baf9(0x1ac)]&&_0x2747a1[_0x64baf9(0x1af)](_0x36d396[_0x64baf9(0x1ac)],{'datasetCode':_0x36d396[_0x64baf9(0x1a9)],'operationType':snakeToCamel(_0x36d396['operationType']),'functionNode':'before'}),_0x36d396[_0x64baf9(0x1be)]&&_0x2747a1[_0x64baf9(0x1af)](_0x36d396[_0x64baf9(0x1be)],{'datasetCode':_0x36d396[_0x64baf9(0x1a9)],'operationType':snakeToCamel(_0x36d396[_0x64baf9(0x1ba)]),'functionNode':_0x64baf9(0x19c)});}return _0x2747a1;}export function resolveRemoteScriptTarget(_0x584b18,_0x2a612b,_0x783983,_0x30b21f,_0x424580){const _0x2bea4a=a212_0x2bd868,_0xb22614=normalizeBffType(_0x2a612b[_0x2bea4a(0x1b3)]);if(!_0xb22614||!_0x2a612b['functionName'])return null;if(_0xb22614==='HOOK'){const _0x59b697=(_0x2a612b['id']?_0x783983[_0x2bea4a(0x1ae)](_0x2a612b['id']):undefined)??findHookLocationByRemoteId(_0x30b21f,_0x2a612b['id']);if(!_0x59b697)return null;const _0x1253a2=_0x59b697[_0x2bea4a(0x1b4)]||_0x424580[_0x2bea4a(0x1ae)](_0x59b697['datasetCode']),_0x194874=_0x1253a2??_0x59b697['datasetCode'],_0x22b48d={..._0x59b697,'alias':_0x1253a2},_0x69b564=_0x2bea4a(0x1a6)+_0x194874+'/'+_0x22b48d[_0x2bea4a(0x1ba)]+'/'+_0x22b48d[_0x2bea4a(0x19d)]+'/'+_0x2a612b[_0x2bea4a(0x19b)];return{'lockKey':_0x69b564,'filePath':resolveLocalFilePathFromLockKey(_0x584b18,_0x69b564),'type':'HOOK','hookLocation':_0x22b48d};}const _0x1c9b2f=_0xb22614+'/'+_0x2a612b[_0x2bea4a(0x19b)];return{'lockKey':_0x1c9b2f,'filePath':resolveLocalFilePathFromLockKey(_0x584b18,_0x1c9b2f),'type':_0xb22614};}export async function ensureParentDirectory(_0xf373a3){await mkdir(dirname(_0xf373a3),{'recursive':!![]});}function a212_0x5b78(){const _0x1739e0=['HOOK','COMMON','1519056VwMmkF','HOOK/','72ADvneR','63QqUOtU','datasetCode','1376546YwebzP','code','beforeScriptId','isFile','get','set','includes','name','scriptsRootDir','scriptType','alias','replace','ENDPOINT','push','44471ktiYEt','isDirectory','operationType','all','F_OK','split','afterScriptId','ENOENT','4vLfoCO','1718120XfArtk','25335nGmDfP','4249311WTytTZ','functionName','after','functionNode','882wNqGQA','.js','11660368nqocpn','endsWith','1kqLkND'];a212_0x5b78=function(){return _0x1739e0;};return a212_0x5b78();}export async function fileExists(_0x3f1e24){const _0x3e4de1=a212_0x2bd868;try{return await access(_0x3f1e24,constants[_0x3e4de1(0x1bc)]),!![];}catch{return![];}}export async function directoryExists(_0x6b149){const _0xb7bb07=a212_0x2bd868;try{const _0x35234b=await stat(_0x6b149);return _0x35234b[_0xb7bb07(0x1b9)]();}catch{return![];}}
1
+ const a210_0x5a2842=a210_0x5454;(function(_0x86337e,_0x4c37aa){const _0x53c7b8=a210_0x5454,_0x16e482=_0x86337e();while(!![]){try{const _0x292ee3=-parseInt(_0x53c7b8(0x15a))/0x1*(parseInt(_0x53c7b8(0x155))/0x2)+-parseInt(_0x53c7b8(0x14e))/0x3+-parseInt(_0x53c7b8(0x162))/0x4*(-parseInt(_0x53c7b8(0x167))/0x5)+parseInt(_0x53c7b8(0x14c))/0x6*(-parseInt(_0x53c7b8(0x14a))/0x7)+-parseInt(_0x53c7b8(0x147))/0x8+parseInt(_0x53c7b8(0x150))/0x9+-parseInt(_0x53c7b8(0x156))/0xa*(-parseInt(_0x53c7b8(0x161))/0xb);if(_0x292ee3===_0x4c37aa)break;else _0x16e482['push'](_0x16e482['shift']());}catch(_0x4837ef){_0x16e482['push'](_0x16e482['shift']());}}}(a210_0x22b1,0x4a13d));function a210_0x5454(_0x2ece56,_0x24f2ca){_0x2ece56=_0x2ece56-0x145;const _0x22b13c=a210_0x22b1();let _0x5454b6=_0x22b13c[_0x2ece56];return _0x5454b6;}import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a210_0x5a2842(0x165),a210_0x5a2842(0x148),'HOOK'];export function normalizeBffType(_0x3d2e7f){const _0x71b107=a210_0x5a2842;if(!_0x3d2e7f)return undefined;const _0x352901=_0x3d2e7f[_0x71b107(0x154)]()['toUpperCase']();return SUPPORTED_BFF_TYPES['includes'](_0x352901)?_0x352901:undefined;}async function scanJsFilesRecursively(_0x4a1a63,_0xab296e){const _0x42d8d2=a210_0x5a2842,_0x502d0f=[];try{const _0x2864c3=await readdir(_0x4a1a63,{'withFileTypes':!![]});for(const _0x5a9211 of _0x2864c3){const _0x2a0b60=join(_0x4a1a63,_0x5a9211[_0x42d8d2(0x164)]);if(_0x5a9211[_0x42d8d2(0x153)]())_0x502d0f['push'](...await scanJsFilesRecursively(_0x2a0b60,_0xab296e+'/'+_0x5a9211[_0x42d8d2(0x164)]));else _0x5a9211[_0x42d8d2(0x16c)]()&&_0x5a9211[_0x42d8d2(0x164)][_0x42d8d2(0x14d)](_0x42d8d2(0x149))&&_0x502d0f[_0x42d8d2(0x16a)]({'lockKey':_0xab296e+'/'+_0x5a9211[_0x42d8d2(0x164)]['replace'](/\.js$/,''),'filePath':_0x2a0b60});}}catch(_0x13daf4){if(_0x13daf4[_0x42d8d2(0x146)]!==_0x42d8d2(0x168))throw _0x13daf4;}return _0x502d0f;}async function scanFlatFunctions(_0x395041,_0x333428){const _0xb2a8aa=a210_0x5a2842,_0x12de43=join(_0x395041[_0xb2a8aa(0x157)],_0x333428),_0x138ae0=await scanJsFilesRecursively(_0x12de43,_0x333428);return _0x138ae0[_0xb2a8aa(0x15f)](({lockKey:_0x5dc1b9,filePath:_0x4f1fdb})=>({'type':_0x333428,'name':_0x5dc1b9[_0xb2a8aa(0x159)]('/')['at'](-0x1)??'','filePath':_0x4f1fdb,'lockKey':_0x5dc1b9}));}async function scanHookFunctions(_0x3a86ca){const _0x23a29b=a210_0x5a2842,_0x44cb08=join(_0x3a86ca[_0x23a29b(0x157)],_0x23a29b(0x145)),_0x8f191c=[];try{const _0x3cb861=await readdir(_0x44cb08,{'withFileTypes':!![]});for(const _0xccc51e of _0x3cb861){if(!_0xccc51e[_0x23a29b(0x153)]())continue;const _0x354937=_0xccc51e['name'],_0x23382a=join(_0x44cb08,_0x354937),_0x2c10f4=await readdir(_0x23382a,{'withFileTypes':!![]});for(const _0x41d700 of _0x2c10f4){if(!_0x41d700[_0x23a29b(0x153)]())continue;const _0x9a7a1=_0x41d700['name'],_0x5009fe=join(_0x23382a,_0x9a7a1),_0x336d55=await readdir(_0x5009fe,{'withFileTypes':!![]});for(const _0xdf4c60 of _0x336d55){if(!_0xdf4c60[_0x23a29b(0x153)]())continue;const _0x272da8=_0xdf4c60[_0x23a29b(0x164)],_0x2c0dda=join(_0x5009fe,_0x272da8),_0x1dee2b=await readdir(_0x2c0dda,{'withFileTypes':!![]});for(const _0x58cefd of _0x1dee2b){if(!_0x58cefd['isFile']()||!_0x58cefd[_0x23a29b(0x164)][_0x23a29b(0x14d)](_0x23a29b(0x149)))continue;const _0x47f3fb=_0x58cefd[_0x23a29b(0x164)][_0x23a29b(0x16b)](/\.js$/,'');_0x8f191c[_0x23a29b(0x16a)]({'type':_0x23a29b(0x145),'name':_0x47f3fb,'filePath':join(_0x2c0dda,_0x58cefd[_0x23a29b(0x164)]),'lockKey':_0x23a29b(0x166)+_0x354937+'/'+_0x9a7a1+'/'+_0x272da8+'/'+_0x47f3fb,'alias':_0x354937,'operationType':_0x9a7a1,'functionNode':_0x272da8});}}}}}catch(_0x3414a7){if(_0x3414a7[_0x23a29b(0x146)]!==_0x23a29b(0x168))throw _0x3414a7;}return _0x8f191c;}export async function scanLocalBffFunctions(_0x45c114,_0x5c85ce){const _0x251df9=a210_0x5a2842;if(_0x5c85ce===_0x251df9(0x165)||_0x5c85ce==='ENDPOINT')return scanFlatFunctions(_0x45c114,_0x5c85ce);if(_0x5c85ce==='HOOK')return scanHookFunctions(_0x45c114);const [_0x3f639d,_0x205408,_0x167fb3]=await Promise['all']([scanFlatFunctions(_0x45c114,_0x251df9(0x165)),scanFlatFunctions(_0x45c114,_0x251df9(0x148)),scanHookFunctions(_0x45c114)]);return[..._0x3f639d,..._0x205408,..._0x167fb3];}export function resolveLocalFilePathFromLockKey(_0x461c92,_0x1dd831){const _0x9dcec7=a210_0x5a2842;return join(_0x461c92[_0x9dcec7(0x157)],..._0x1dd831[_0x9dcec7(0x159)]('/'))+_0x9dcec7(0x149);}export function createHookLocationMap(_0x5dc973){const _0x41861b=a210_0x5a2842,_0x4ea26e=new Map();for(const _0x3b13db of _0x5dc973){_0x3b13db[_0x41861b(0x15b)]&&_0x4ea26e[_0x41861b(0x15e)](_0x3b13db[_0x41861b(0x15b)],{'datasetCode':_0x3b13db[_0x41861b(0x151)],'operationType':snakeToCamel(_0x3b13db['operationType']),'functionNode':_0x41861b(0x160)}),_0x3b13db[_0x41861b(0x158)]&&_0x4ea26e[_0x41861b(0x15e)](_0x3b13db[_0x41861b(0x158)],{'datasetCode':_0x3b13db['datasetCode'],'operationType':snakeToCamel(_0x3b13db['operationType']),'functionNode':_0x41861b(0x15d)});}return _0x4ea26e;}export function resolveRemoteScriptTarget(_0x4dd90c,_0x55a9cf,_0x5ff8ec,_0x141ed9,_0x193692){const _0x32e07c=a210_0x5a2842,_0x2095af=normalizeBffType(_0x55a9cf[_0x32e07c(0x152)]);if(!_0x2095af||!_0x55a9cf[_0x32e07c(0x14f)])return null;if(_0x2095af===_0x32e07c(0x145)){const _0x5e47d2=(_0x55a9cf['id']?_0x5ff8ec[_0x32e07c(0x169)](_0x55a9cf['id']):undefined)??findHookLocationByRemoteId(_0x141ed9,_0x55a9cf['id']);if(!_0x5e47d2)return null;const _0x41199b=_0x5e47d2[_0x32e07c(0x14b)]||_0x193692[_0x32e07c(0x169)](_0x5e47d2['datasetCode']),_0x1241c3=_0x41199b??_0x5e47d2[_0x32e07c(0x151)],_0x2336c3={..._0x5e47d2,'alias':_0x41199b},_0x95bd9a=_0x32e07c(0x166)+_0x1241c3+'/'+_0x2336c3['operationType']+'/'+_0x2336c3[_0x32e07c(0x15c)]+'/'+_0x55a9cf[_0x32e07c(0x14f)];return{'lockKey':_0x95bd9a,'filePath':resolveLocalFilePathFromLockKey(_0x4dd90c,_0x95bd9a),'type':_0x32e07c(0x145),'hookLocation':_0x2336c3};}const _0x14e639=_0x2095af+'/'+_0x55a9cf[_0x32e07c(0x14f)];return{'lockKey':_0x14e639,'filePath':resolveLocalFilePathFromLockKey(_0x4dd90c,_0x14e639),'type':_0x2095af};}export async function ensureParentDirectory(_0x473cef){await mkdir(dirname(_0x473cef),{'recursive':!![]});}export async function fileExists(_0x19fa8f){const _0x1757bf=a210_0x5a2842;try{return await access(_0x19fa8f,constants[_0x1757bf(0x163)]),!![];}catch{return![];}}export async function directoryExists(_0x4622af){const _0x417a63=a210_0x5a2842;try{const _0xf1a63a=await stat(_0x4622af);return _0xf1a63a[_0x417a63(0x153)]();}catch{return![];}}function a210_0x22b1(){const _0x442c17=['before','407cwdFFY','8612WuuPBT','F_OK','name','COMMON','HOOK/','535XolgjR','ENOENT','get','push','replace','isFile','HOOK','code','1212760bReCDV','ENDPOINT','.js','14812gkcTGD','alias','870vXMrCj','endsWith','1138851mglSmE','functionName','1119411CqINLg','datasetCode','scriptType','isDirectory','trim','12HCRzct','254830IhoVpQ','scriptsRootDir','afterScriptId','split','26028OFtfxh','beforeScriptId','functionNode','after','set','map'];a210_0x22b1=function(){return _0x442c17;};return a210_0x22b1();}
@@ -1 +1 @@
1
- (function(_0x404bca,_0x3ed833){const _0x5d6463=a213_0x3d37,_0x4e674e=_0x404bca();while(!![]){try{const _0x48c359=-parseInt(_0x5d6463(0x108))/0x1*(parseInt(_0x5d6463(0xfe))/0x2)+-parseInt(_0x5d6463(0x102))/0x3*(-parseInt(_0x5d6463(0x106))/0x4)+parseInt(_0x5d6463(0x10b))/0x5+parseInt(_0x5d6463(0x105))/0x6+-parseInt(_0x5d6463(0xfd))/0x7*(-parseInt(_0x5d6463(0x100))/0x8)+-parseInt(_0x5d6463(0xff))/0x9+parseInt(_0x5d6463(0x109))/0xa*(parseInt(_0x5d6463(0x101))/0xb);if(_0x48c359===_0x3ed833)break;else _0x4e674e['push'](_0x4e674e['shift']());}catch(_0x403048){_0x4e674e['push'](_0x4e674e['shift']());}}}(a213_0xcff4,0x1cb2c));import{readFile}from'node:fs/promises';function a213_0xcff4(){const _0x1d23ab=['2048175VapvqJ','163952sEwPhF','1995499FsjtEl','188817PwbjSy','utf8','update','461568wuVJXo','8gGYQNR','createHash','11492SEQfEN','10QRPCZR','digest','748800InDbvG','hex','14oGGCLi','40GKTpXH'];a213_0xcff4=function(){return _0x1d23ab;};return a213_0xcff4();}function a213_0x3d37(_0x50d268,_0x250691){_0x50d268=_0x50d268-0xfd;const _0xcff4de=a213_0xcff4();let _0x3d3709=_0xcff4de[_0x50d268];return _0x3d3709;}import a213_0x2d9bdc from'node:crypto';export function computeContentHash(_0x1e5f35){const _0x1f4411=a213_0x3d37;return a213_0x2d9bdc[_0x1f4411(0x107)]('md5')[_0x1f4411(0x104)](_0x1e5f35)[_0x1f4411(0x10a)](_0x1f4411(0x10c));}export async function computeFileHash(_0x31e830){const _0x1a2ab3=a213_0x3d37,_0x5afc45=await readFile(_0x31e830,_0x1a2ab3(0x103));return computeContentHash(_0x5afc45);}
1
+ function a211_0x2b0d(_0x25984c,_0x2497e7){_0x25984c=_0x25984c-0x14f;const _0x6b46f0=a211_0x6b46();let _0x2b0d06=_0x6b46f0[_0x25984c];return _0x2b0d06;}(function(_0xa93660,_0x7d266a){const _0x2a2c59=a211_0x2b0d,_0x10ad49=_0xa93660();while(!![]){try{const _0x32bc09=-parseInt(_0x2a2c59(0x15a))/0x1+-parseInt(_0x2a2c59(0x150))/0x2+parseInt(_0x2a2c59(0x15b))/0x3+-parseInt(_0x2a2c59(0x14f))/0x4*(parseInt(_0x2a2c59(0x152))/0x5)+-parseInt(_0x2a2c59(0x154))/0x6+-parseInt(_0x2a2c59(0x157))/0x7*(-parseInt(_0x2a2c59(0x155))/0x8)+parseInt(_0x2a2c59(0x159))/0x9*(parseInt(_0x2a2c59(0x156))/0xa);if(_0x32bc09===_0x7d266a)break;else _0x10ad49['push'](_0x10ad49['shift']());}catch(_0x28c48a){_0x10ad49['push'](_0x10ad49['shift']());}}}(a211_0x6b46,0x38583));import{readFile}from'node:fs/promises';import a211_0x1994f3 from'node:crypto';export function computeContentHash(_0x4cc647){const _0x466894=a211_0x2b0d;return a211_0x1994f3[_0x466894(0x151)]('md5')['update'](_0x4cc647)[_0x466894(0x158)](_0x466894(0x153));}function a211_0x6b46(){const _0x191ff7=['10nUTxTW','hex','459816pCmyDR','31056PPDruF','47750kAJFUM','707BkptUw','digest','963USJKtl','31332vUcSal','382023MCQadF','657548jVBtPx','725638REfpOO','createHash'];a211_0x6b46=function(){return _0x191ff7;};return a211_0x6b46();}export async function computeFileHash(_0x101834){const _0x248f27=await readFile(_0x101834,'utf8');return computeContentHash(_0x248f27);}
@@ -1 +1 @@
1
- (function(_0x796ec2,_0x86c63d){const _0x367b14=a214_0x5f1a,_0x18aac1=_0x796ec2();while(!![]){try{const _0x2fcf27=-parseInt(_0x367b14(0x148))/0x1+-parseInt(_0x367b14(0x152))/0x2*(parseInt(_0x367b14(0x14e))/0x3)+parseInt(_0x367b14(0x15a))/0x4+-parseInt(_0x367b14(0x150))/0x5*(-parseInt(_0x367b14(0x144))/0x6)+parseInt(_0x367b14(0x143))/0x7+-parseInt(_0x367b14(0x155))/0x8*(-parseInt(_0x367b14(0x14c))/0x9)+parseInt(_0x367b14(0x151))/0xa*(-parseInt(_0x367b14(0x146))/0xb);if(_0x2fcf27===_0x86c63d)break;else _0x18aac1['push'](_0x18aac1['shift']());}catch(_0x2a5530){_0x18aac1['push'](_0x18aac1['shift']());}}}(a214_0x1e54,0x5f0de));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a214_0x1e54(){const _0x344184=['Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','8whNMWP','current\x20\x22','parse',':\x20scriptsRoot\x20mismatch\x20—\x20','functions','1789336veuVHZ','utf8','stringify','3622647DgvWDw','48xHnUiN','\x22\x20vs\x20lock\x20\x22','11OwTHYT','code','385963ppFoQs','ENOENT','apps','scriptsRoot','4364847pdiRoj','\x22.\x20','905937iSNxjy','object','387560mqlKsE','9926500vEDYQY','2DPXzqV','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20'];a214_0x1e54=function(){return _0x344184;};return a214_0x1e54();}function a214_0x5f1a(_0x57fbf1,_0x40be00){_0x57fbf1=_0x57fbf1-0x142;const _0x1e548a=a214_0x1e54();let _0x5f1a95=_0x1e548a[_0x57fbf1];return _0x5f1a95;}export function ensureLockScope(_0x5a72ec,_0x222267,_0x97ef60,_0x148995){const _0x131e5a=a214_0x5f1a,_0x56f239={'apps':_0x5a72ec[_0x131e5a(0x14a)]&&typeof _0x5a72ec[_0x131e5a(0x14a)]===_0x131e5a(0x14f)?_0x5a72ec['apps']:{}};let _0x1dadd9=_0x56f239['apps'][_0x222267];if(!_0x1dadd9)return _0x1dadd9={'scriptsRoot':_0x97ef60,'lastSync':'','functions':{}},_0x56f239['apps'][_0x222267]=_0x1dadd9,{'lockData':_0x56f239,'appLock':_0x1dadd9};if(!_0x1dadd9[_0x131e5a(0x14b)])_0x1dadd9[_0x131e5a(0x14b)]=_0x97ef60;else{if(_0x1dadd9[_0x131e5a(0x14b)]!==_0x97ef60)throw new Error(_0x148995+_0x131e5a(0x158)+(_0x131e5a(0x156)+_0x97ef60+_0x131e5a(0x145)+_0x1dadd9[_0x131e5a(0x14b)]+_0x131e5a(0x14d))+_0x131e5a(0x154));}return!_0x1dadd9['functions']&&(_0x1dadd9[_0x131e5a(0x159)]={}),!_0x1dadd9['lastSync']&&(_0x1dadd9['lastSync']=''),{'lockData':_0x56f239,'appLock':_0x1dadd9};}export async function readBffLockFile(_0x3c44a4){const _0x1eecfe=a214_0x5f1a;try{const _0x5892d6=await readFile(_0x3c44a4,_0x1eecfe(0x15b)),_0x190a3f=JSON[_0x1eecfe(0x157)](_0x5892d6);return{'apps':_0x190a3f[_0x1eecfe(0x14a)]&&typeof _0x190a3f['apps']===_0x1eecfe(0x14f)?_0x190a3f['apps']:{}};}catch(_0x48b2d7){if(_0x48b2d7[_0x1eecfe(0x147)]===_0x1eecfe(0x149))return null;throw new Error(_0x1eecfe(0x153)+String(_0x48b2d7));}}export async function writeBffLockFile(_0x2787de,_0x259f32){const _0x29506b=a214_0x5f1a;await mkdir(dirname(_0x2787de),{'recursive':!![]}),await writeFile(_0x2787de,JSON[_0x29506b(0x142)](_0x259f32,null,0x2),_0x29506b(0x15b));}
1
+ (function(_0x2a0931,_0x5b86f2){const _0x3aced0=a212_0x35f5,_0x59c1b7=_0x2a0931();while(!![]){try{const _0x1963f0=parseInt(_0x3aced0(0x132))/0x1+-parseInt(_0x3aced0(0x124))/0x2*(parseInt(_0x3aced0(0x137))/0x3)+parseInt(_0x3aced0(0x122))/0x4*(-parseInt(_0x3aced0(0x138))/0x5)+parseInt(_0x3aced0(0x130))/0x6+-parseInt(_0x3aced0(0x135))/0x7*(parseInt(_0x3aced0(0x126))/0x8)+-parseInt(_0x3aced0(0x139))/0x9*(parseInt(_0x3aced0(0x123))/0xa)+parseInt(_0x3aced0(0x12c))/0xb;if(_0x1963f0===_0x5b86f2)break;else _0x59c1b7['push'](_0x59c1b7['shift']());}catch(_0x57bb7e){_0x59c1b7['push'](_0x59c1b7['shift']());}}}(a212_0x589a,0xc1e4d));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x5f4288,_0x417f64,_0x590d59,_0x3f5101){const _0x113876=a212_0x35f5,_0x1c5284={'apps':_0x5f4288['apps']&&typeof _0x5f4288['apps']===_0x113876(0x133)?_0x5f4288['apps']:{}};let _0x52c168=_0x1c5284[_0x113876(0x134)][_0x417f64];if(!_0x52c168)return _0x52c168={'scriptsRoot':_0x590d59,'lastSync':'','functions':{}},_0x1c5284[_0x113876(0x134)][_0x417f64]=_0x52c168,{'lockData':_0x1c5284,'appLock':_0x52c168};if(!_0x52c168[_0x113876(0x12f)])_0x52c168[_0x113876(0x12f)]=_0x590d59;else{if(_0x52c168[_0x113876(0x12f)]!==_0x590d59)throw new Error(_0x3f5101+_0x113876(0x136)+('current\x20\x22'+_0x590d59+_0x113876(0x125)+_0x52c168[_0x113876(0x12f)]+_0x113876(0x128))+_0x113876(0x121));}return!_0x52c168[_0x113876(0x12e)]&&(_0x52c168['functions']={}),!_0x52c168['lastSync']&&(_0x52c168[_0x113876(0x12b)]=''),{'lockData':_0x1c5284,'appLock':_0x52c168};}function a212_0x35f5(_0x4cf00a,_0x418327){_0x4cf00a=_0x4cf00a-0x120;const _0x589ab0=a212_0x589a();let _0x35f562=_0x589ab0[_0x4cf00a];return _0x35f562;}export async function readBffLockFile(_0x3f68e7){const _0x243b77=a212_0x35f5;try{const _0x93fb64=await readFile(_0x3f68e7,_0x243b77(0x127)),_0x5af627=JSON[_0x243b77(0x120)](_0x93fb64);return{'apps':_0x5af627['apps']&&typeof _0x5af627[_0x243b77(0x134)]===_0x243b77(0x133)?_0x5af627[_0x243b77(0x134)]:{}};}catch(_0x21d194){if(_0x21d194[_0x243b77(0x131)]===_0x243b77(0x12a))return null;throw new Error(_0x243b77(0x129)+String(_0x21d194));}}function a212_0x589a(){const _0x3599d2=['Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','1969972LQiXbc','10aVxlrr','4346AoAVzc','\x22\x20vs\x20lock\x20\x22','3352VWrKZa','utf8','\x22.\x20','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','ENOENT','lastSync','31070809QZNqXW','stringify','functions','scriptsRoot','3126558RhJVMG','code','721322IPSHqO','object','apps','21840jqNdot',':\x20scriptsRoot\x20mismatch\x20—\x20','51fyvbIQ','5xkHJeg','12925179zkYTOH','parse'];a212_0x589a=function(){return _0x3599d2;};return a212_0x589a();}export async function writeBffLockFile(_0x715b56,_0x40c772){const _0x3e9dad=a212_0x35f5;await mkdir(dirname(_0x715b56),{'recursive':!![]}),await writeFile(_0x715b56,JSON[_0x3e9dad(0x12d)](_0x40c772,null,0x2),_0x3e9dad(0x127));}
@@ -1 +1 @@
1
- function a216_0x57f1(_0x1d1341,_0x493054){_0x1d1341=_0x1d1341-0xcc;const _0x4bbbf6=a216_0x4bbb();let _0x57f164=_0x4bbbf6[_0x1d1341];return _0x57f164;}(function(_0xe11754,_0x245564){const _0x22b9a3=a216_0x57f1,_0x17dadd=_0xe11754();while(!![]){try{const _0x6781a1=parseInt(_0x22b9a3(0xdb))/0x1*(-parseInt(_0x22b9a3(0xd8))/0x2)+parseInt(_0x22b9a3(0xd1))/0x3*(parseInt(_0x22b9a3(0xe0))/0x4)+-parseInt(_0x22b9a3(0xdf))/0x5*(-parseInt(_0x22b9a3(0xd0))/0x6)+parseInt(_0x22b9a3(0xda))/0x7*(-parseInt(_0x22b9a3(0xd3))/0x8)+parseInt(_0x22b9a3(0xce))/0x9*(-parseInt(_0x22b9a3(0xdd))/0xa)+parseInt(_0x22b9a3(0xd5))/0xb+-parseInt(_0x22b9a3(0xd2))/0xc;if(_0x6781a1===_0x245564)break;else _0x17dadd['push'](_0x17dadd['shift']());}catch(_0x2fed01){_0x17dadd['push'](_0x17dadd['shift']());}}}(a216_0x4bbb,0x714d5));export function snakeToCamel(_0x39b7d1){const _0x1eb619=a216_0x57f1;return _0x39b7d1[_0x1eb619(0xd7)]()['replace'](/_([a-z])/g,(_0x569ca1,_0x18140b)=>_0x18140b[_0x1eb619(0xcd)]());}export function findHookLocationByRemoteId(_0x41315a,_0x326b92){const _0x3da579=a216_0x57f1;if(!_0x326b92)return undefined;for(const _0xe0c99 of Object['values'](_0x41315a)){if(_0xe0c99['remoteId']===_0x326b92&&_0xe0c99[_0x3da579(0xd6)]&&_0xe0c99[_0x3da579(0xcf)]&&_0xe0c99['functionNode'])return{'datasetCode':_0xe0c99[_0x3da579(0xd6)],'operationType':_0xe0c99['operationType'],'functionNode':_0xe0c99[_0x3da579(0xcc)]};}return undefined;}function a216_0x4bbb(){const _0x2b0847=['before','10vibrxY','after','1450415YwZWzF','56rzNZsJ','functionNode','toUpperCase','4056093gNFhxp','operationType','12uUUMle','122103DlIcnH','4718004nUvisp','296nAehWs','match','7998848PvEEFk','datasetCode','toLowerCase','1130QlhpVm','trim','53389VNOELC','508lOeFxE'];a216_0x4bbb=function(){return _0x2b0847;};return a216_0x4bbb();}export function extractScriptDescription(_0x4231bd){const _0x9bc982=a216_0x57f1,_0x275cef=_0x4231bd[_0x9bc982(0xd4)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x275cef?.[0x1]?.['trim']()||undefined;}export function isValidBffFunctionName(_0x31326b){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x31326b);}export function normalizeHookFunctionNode(_0x22490f){const _0x21229c=a216_0x57f1;if(!_0x22490f)return undefined;const _0x542fe6=_0x22490f[_0x21229c(0xd9)]()[_0x21229c(0xd7)]();if(_0x542fe6===_0x21229c(0xdc)||_0x542fe6===_0x21229c(0xde))return _0x542fe6;return undefined;}
1
+ (function(_0x109be5,_0x4d6d8a){const _0x358fd4=a214_0x2628,_0x278f=_0x109be5();while(!![]){try{const _0x24ad6e=-parseInt(_0x358fd4(0x12b))/0x1*(-parseInt(_0x358fd4(0x140))/0x2)+-parseInt(_0x358fd4(0x133))/0x3+parseInt(_0x358fd4(0x131))/0x4*(-parseInt(_0x358fd4(0x135))/0x5)+-parseInt(_0x358fd4(0x137))/0x6*(-parseInt(_0x358fd4(0x136))/0x7)+parseInt(_0x358fd4(0x12f))/0x8+-parseInt(_0x358fd4(0x134))/0x9*(parseInt(_0x358fd4(0x138))/0xa)+parseInt(_0x358fd4(0x13d))/0xb;if(_0x24ad6e===_0x4d6d8a)break;else _0x278f['push'](_0x278f['shift']());}catch(_0x51e4ef){_0x278f['push'](_0x278f['shift']());}}}(a214_0x28ad,0xb2943));function a214_0x28ad(){const _0x12e463=['operationType','datasetCode','functionNode','14502752SurrOb','replace','values','6gYofhj','test','340227cSoSQL','toLowerCase','before','trim','4460384MmhgIk','after','8DvviZw','toUpperCase','4119693ITdTXS','581589tEQgIE','1873055XBleOK','56ELLseo','16404kvuHwC','10vnyTKK','remoteId'];a214_0x28ad=function(){return _0x12e463;};return a214_0x28ad();}export function snakeToCamel(_0xbd3f69){const _0x5203d4=a214_0x2628;return _0xbd3f69[_0x5203d4(0x12c)]()[_0x5203d4(0x13e)](/_([a-z])/g,(_0x49b9b4,_0x1443d0)=>_0x1443d0[_0x5203d4(0x132)]());}function a214_0x2628(_0x3b88e1,_0x31d8c8){_0x3b88e1=_0x3b88e1-0x12b;const _0x28adb4=a214_0x28ad();let _0x262866=_0x28adb4[_0x3b88e1];return _0x262866;}export function findHookLocationByRemoteId(_0x31895b,_0x3abaf9){const _0x1bb0ae=a214_0x2628;if(!_0x3abaf9)return undefined;for(const _0x395bab of Object[_0x1bb0ae(0x13f)](_0x31895b)){if(_0x395bab[_0x1bb0ae(0x139)]===_0x3abaf9&&_0x395bab['datasetCode']&&_0x395bab['operationType']&&_0x395bab[_0x1bb0ae(0x13c)])return{'datasetCode':_0x395bab[_0x1bb0ae(0x13b)],'operationType':_0x395bab[_0x1bb0ae(0x13a)],'functionNode':_0x395bab[_0x1bb0ae(0x13c)]};}return undefined;}export function extractScriptDescription(_0x332505){const _0x1ab0c4=a214_0x2628,_0x21b911=_0x332505['match'](/\[\s*脚本描述\s*]\s*(.+)/);return _0x21b911?.[0x1]?.[_0x1ab0c4(0x12e)]()||undefined;}export function isValidBffFunctionName(_0x3cf3c4){const _0x2dab09=a214_0x2628;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x2dab09(0x141)](_0x3cf3c4);}export function normalizeHookFunctionNode(_0x1b89ec){const _0x28c081=a214_0x2628;if(!_0x1b89ec)return undefined;const _0x1bf2f1=_0x1b89ec['trim']()[_0x28c081(0x12c)]();if(_0x1bf2f1===_0x28c081(0x12d)||_0x1bf2f1===_0x28c081(0x130))return _0x1bf2f1;return undefined;}
@@ -1 +1 @@
1
- (function(_0x86780d,_0x15deb1){const _0x668809=a217_0x5003,_0x473aba=_0x86780d();while(!![]){try{const _0x639e9a=parseInt(_0x668809(0x163))/0x1+parseInt(_0x668809(0x15d))/0x2*(parseInt(_0x668809(0x176))/0x3)+-parseInt(_0x668809(0x16c))/0x4*(-parseInt(_0x668809(0x161))/0x5)+parseInt(_0x668809(0x170))/0x6*(-parseInt(_0x668809(0x16b))/0x7)+parseInt(_0x668809(0x177))/0x8*(parseInt(_0x668809(0x16f))/0x9)+-parseInt(_0x668809(0x16a))/0xa+parseInt(_0x668809(0x168))/0xb;if(_0x639e9a===_0x15deb1)break;else _0x473aba['push'](_0x473aba['shift']());}catch(_0xab9e16){_0x473aba['push'](_0x473aba['shift']());}}}(a217_0x2f3f,0xb0792));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x9336ec){const _0x458ef0=a217_0x5003;if(cache[_0x458ef0(0x172)](_0x9336ec))return cache[_0x458ef0(0x175)](_0x9336ec);const _0x16c4ef=await listDatasets(_0x9336ec),_0x2d80e4=new Map();for(const _0x18450b of _0x16c4ef){const _0x5aa6a5=_0x18450b[_0x458ef0(0x171)];_0x5aa6a5?.[_0x458ef0(0x178)]!=null&&_0x2d80e4[_0x458ef0(0x166)](_0x5aa6a5[_0x458ef0(0x178)],_0x5aa6a5[_0x458ef0(0x15c)]??'db-'+_0x5aa6a5[_0x458ef0(0x178)]);}const _0x2bfa4a=[..._0x2d80e4['entries']()]['map'](([_0x5df15e,_0x426c96])=>({'dbId':_0x5df15e,'dbName':_0x426c96}));return cache[_0x458ef0(0x166)](_0x9336ec,_0x2bfa4a),_0x2bfa4a;}export async function resolveDb(_0x1690a4,_0x4f1cbe){const _0x292d22=a217_0x5003,_0x3235dc=await listDatabases(_0x1690a4);if(_0x3235dc['length']===0x0)return{'resolved':[],'error':_0x292d22(0x15e)+_0x1690a4+_0x292d22(0x174)};if(!_0x4f1cbe)return{'resolved':_0x3235dc};const _0xe11d6d=Number(_0x4f1cbe);if(!Number['isNaN'](_0xe11d6d)){const _0x4be9fe=_0x3235dc['find'](_0x14bc6e=>_0x14bc6e[_0x292d22(0x178)]===_0xe11d6d);if(_0x4be9fe)return{'resolved':[_0x4be9fe]};}const _0x38e0cd=_0x4f1cbe['toLowerCase'](),_0xb2e629=_0x3235dc[_0x292d22(0x16e)](_0x4c3efb=>_0x4c3efb['dbName'][_0x292d22(0x169)]()[_0x292d22(0x17a)](_0x38e0cd));if(_0xb2e629['length']>0x0)return{'resolved':_0xb2e629};const _0x3f4e3a=_0x3235dc[_0x292d22(0x165)](_0x35ed93=>_0x35ed93[_0x292d22(0x15c)]+'\x20('+_0x35ed93[_0x292d22(0x178)]+')')[_0x292d22(0x162)](',\x20');return{'resolved':[],'error':_0x292d22(0x164)+_0x4f1cbe+'\x22\x20under\x20app\x20\x22'+_0x1690a4+'\x22.\x20Available:\x20'+_0x3f4e3a+_0x292d22(0x173)};}function a217_0x5003(_0x1a786e,_0x5058f8){_0x1a786e=_0x1a786e-0x15c;const _0x2f3f98=a217_0x2f3f();let _0x500363=_0x2f3f98[_0x1a786e];return _0x500363;}export async function resolveOneDb(_0x69243a,_0x5007aa){const _0x296711=a217_0x5003,{resolved:_0x4978d9,error:_0xfb66cc}=await resolveDb(_0x69243a,_0x5007aa);if(_0xfb66cc)return{'db':null,'error':_0xfb66cc};if(_0x4978d9[_0x296711(0x179)]===0x1)return{'db':_0x4978d9[0x0]};if(!_0x5007aa){const _0x2ec97a=_0x4978d9['map'](_0x34dc0f=>_0x34dc0f[_0x296711(0x15c)]+'\x20('+_0x34dc0f['dbId']+')')[_0x296711(0x162)](',\x20');return{'db':null,'error':_0x296711(0x15f)+_0x2ec97a};}const _0x10b071=_0x4978d9[_0x296711(0x165)](_0x23d2da=>_0x23d2da['dbName']+'\x20('+_0x23d2da[_0x296711(0x178)]+')')[_0x296711(0x162)](',\x20');return{'db':null,'error':'\x22'+_0x5007aa+_0x296711(0x16d)+_0x10b071+_0x296711(0x160)};}function a217_0x2f3f(){const _0x4dafed=['\x22\x20matches\x20multiple\x20databases:\x20','filter','6243876wGvqZh','6uIkQPF','dbtableConfig','has','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','get','3eyPjuM','16qMXaMc','dbId','length','includes','dbName','794980LLlFRk','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','.\x20Be\x20more\x20specific.','5fQCxmc','join','909263dWSpvL','No\x20database\x20matching\x20\x22','map','set','find','7004503npcxAH','toLowerCase','13737250sOzith','9858856izDSIv','695652dclaZQ'];a217_0x2f3f=function(){return _0x4dafed;};return a217_0x2f3f();}export async function getDbName(_0x521c25,_0x466c61){const _0x5c8f75=a217_0x5003,_0x5285d1=await listDatabases(_0x521c25);return _0x5285d1[_0x5c8f75(0x167)](_0xdc05d6=>_0xdc05d6['dbId']===_0x466c61)?.[_0x5c8f75(0x15c)];}
1
+ function a215_0x19b7(_0x351ee0,_0x35986d){_0x351ee0=_0x351ee0-0x178;const _0x5b0707=a215_0x5b07();let _0x19b719=_0x5b0707[_0x351ee0];return _0x19b719;}(function(_0x41bf0d,_0x58059c){const _0x9e66f=a215_0x19b7,_0x5b648f=_0x41bf0d();while(!![]){try{const _0x2e5fc6=-parseInt(_0x9e66f(0x196))/0x1+-parseInt(_0x9e66f(0x18c))/0x2+-parseInt(_0x9e66f(0x17d))/0x3*(parseInt(_0x9e66f(0x189))/0x4)+-parseInt(_0x9e66f(0x190))/0x5+parseInt(_0x9e66f(0x17a))/0x6*(-parseInt(_0x9e66f(0x180))/0x7)+parseInt(_0x9e66f(0x197))/0x8*(-parseInt(_0x9e66f(0x186))/0x9)+-parseInt(_0x9e66f(0x195))/0xa*(-parseInt(_0x9e66f(0x185))/0xb);if(_0x2e5fc6===_0x58059c)break;else _0x5b648f['push'](_0x5b648f['shift']());}catch(_0x501eb0){_0x5b648f['push'](_0x5b648f['shift']());}}}(a215_0x5b07,0xa82ff));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x21aea1){const _0xe4380c=a215_0x19b7;if(cache[_0xe4380c(0x18b)](_0x21aea1))return cache[_0xe4380c(0x18a)](_0x21aea1);const _0x355436=await listDatasets(_0x21aea1),_0x3441d6=new Map();for(const _0x47c789 of _0x355436){const _0x27c3b5=_0x47c789[_0xe4380c(0x17c)];_0x27c3b5?.[_0xe4380c(0x183)]!=null&&_0x3441d6['set'](_0x27c3b5[_0xe4380c(0x183)],_0x27c3b5['dbName']??_0xe4380c(0x17f)+_0x27c3b5[_0xe4380c(0x183)]);}const _0x1582d3=[..._0x3441d6[_0xe4380c(0x184)]()][_0xe4380c(0x17b)](([_0x3f6311,_0x27c96f])=>({'dbId':_0x3f6311,'dbName':_0x27c96f}));return cache[_0xe4380c(0x18f)](_0x21aea1,_0x1582d3),_0x1582d3;}function a215_0x5b07(){const _0x230ac2=['16yEuXsW','get','has','1081400DJQZuR','find','.\x20Be\x20more\x20specific.','set','1837770naSnhI','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','filter','dbName','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','1561830RnuzuN','1149558BIoASO','3485472gUVEZN','includes','isNaN','6XALnaU','map','dbtableConfig','209094UukKKH','\x22\x20matches\x20multiple\x20databases:\x20','db-','4197025WpPkLZ','join','toLowerCase','dbId','entries','286VPaqLw','9ETcKTq','length','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'];a215_0x5b07=function(){return _0x230ac2;};return a215_0x5b07();}export async function resolveDb(_0x275ec6,_0x2996a7){const _0x2e59be=a215_0x19b7,_0x4e8aaf=await listDatabases(_0x275ec6);if(_0x4e8aaf[_0x2e59be(0x187)]===0x0)return{'resolved':[],'error':_0x2e59be(0x191)+_0x275ec6+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x2996a7)return{'resolved':_0x4e8aaf};const _0x5c2c5e=Number(_0x2996a7);if(!Number[_0x2e59be(0x179)](_0x5c2c5e)){const _0x1d58d7=_0x4e8aaf[_0x2e59be(0x18d)](_0x59351e=>_0x59351e[_0x2e59be(0x183)]===_0x5c2c5e);if(_0x1d58d7)return{'resolved':[_0x1d58d7]};}const _0x1efbf2=_0x2996a7['toLowerCase'](),_0x21d06e=_0x4e8aaf[_0x2e59be(0x192)](_0x54d821=>_0x54d821[_0x2e59be(0x193)][_0x2e59be(0x182)]()[_0x2e59be(0x178)](_0x1efbf2));if(_0x21d06e[_0x2e59be(0x187)]>0x0)return{'resolved':_0x21d06e};const _0x5bb87e=_0x4e8aaf[_0x2e59be(0x17b)](_0x238939=>_0x238939[_0x2e59be(0x193)]+'\x20('+_0x238939[_0x2e59be(0x183)]+')')[_0x2e59be(0x181)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x2996a7+'\x22\x20under\x20app\x20\x22'+_0x275ec6+'\x22.\x20Available:\x20'+_0x5bb87e+_0x2e59be(0x188)};}export async function resolveOneDb(_0x3cd3cf,_0x358f0c){const _0x99aaf6=a215_0x19b7,{resolved:_0x2383a3,error:_0x8fce3d}=await resolveDb(_0x3cd3cf,_0x358f0c);if(_0x8fce3d)return{'db':null,'error':_0x8fce3d};if(_0x2383a3[_0x99aaf6(0x187)]===0x1)return{'db':_0x2383a3[0x0]};if(!_0x358f0c){const _0x43f7ba=_0x2383a3[_0x99aaf6(0x17b)](_0x17d6cf=>_0x17d6cf[_0x99aaf6(0x193)]+'\x20('+_0x17d6cf[_0x99aaf6(0x183)]+')')[_0x99aaf6(0x181)](',\x20');return{'db':null,'error':_0x99aaf6(0x194)+_0x43f7ba};}const _0x17612=_0x2383a3[_0x99aaf6(0x17b)](_0x3a7bc4=>_0x3a7bc4['dbName']+'\x20('+_0x3a7bc4[_0x99aaf6(0x183)]+')')[_0x99aaf6(0x181)](',\x20');return{'db':null,'error':'\x22'+_0x358f0c+_0x99aaf6(0x17e)+_0x17612+_0x99aaf6(0x18e)};}export async function getDbName(_0x56b869,_0x3f0f0f){const _0x13f4ed=a215_0x19b7,_0x16f4f0=await listDatabases(_0x56b869);return _0x16f4f0[_0x13f4ed(0x18d)](_0x54fd36=>_0x54fd36[_0x13f4ed(0x183)]===_0x3f0f0f)?.['dbName'];}
@@ -1 +1 @@
1
- const a218_0x76fec1=a218_0x1766;(function(_0xeda959,_0x4a3353){const _0x855b8d=a218_0x1766,_0x5007b4=_0xeda959();while(!![]){try{const _0x437c8e=parseInt(_0x855b8d(0x133))/0x1*(parseInt(_0x855b8d(0x135))/0x2)+-parseInt(_0x855b8d(0x134))/0x3*(-parseInt(_0x855b8d(0x12f))/0x4)+parseInt(_0x855b8d(0x128))/0x5+-parseInt(_0x855b8d(0x12d))/0x6*(parseInt(_0x855b8d(0x137))/0x7)+-parseInt(_0x855b8d(0x131))/0x8*(parseInt(_0x855b8d(0x12a))/0x9)+-parseInt(_0x855b8d(0x12e))/0xa+-parseInt(_0x855b8d(0x132))/0xb;if(_0x437c8e===_0x4a3353)break;else _0x5007b4['push'](_0x5007b4['shift']());}catch(_0x189a67){_0x5007b4['push'](_0x5007b4['shift']());}}}(a218_0x5976,0x9dcf0));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x2bec05,_0x48667f=process[a218_0x76fec1(0x129)]()){const _0xde8183=a218_0x76fec1,_0x3fdfc2=resolve(_0x48667f),_0x360a85=join(_0x3fdfc2,_0xde8183(0x136),_0xde8183(0x12b));return{'projectRoot':_0x3fdfc2,'pagesBaseDir':_0x360a85,'appPagesDir':join(_0x360a85,_0x2bec05),'lockFilePath':join(_0x3fdfc2,_0xde8183(0x136),_0xde8183(0x12c))};}function a218_0x1766(_0x2a3488,_0x54dae1){_0x2a3488=_0x2a3488-0x128;const _0x597691=a218_0x5976();let _0x176680=_0x597691[_0x2a3488];return _0x176680;}function a218_0x5976(){const _0xe80b32=['1lFpdHS','630nwCQxP','1338154kbreZA','.rabetbase','7682185BgeTaX','5864820jIwRST','cwd','223173EMhBoC','page','page.lock.json','6oMigjA','1780520jQKGfE','13304eFgqGu','appPagesDir','168zzzlxt','1076603plfGah'];a218_0x5976=function(){return _0xe80b32;};return a218_0x5976();}export function buildPageFileName(_0x2ca7b7,_0x2c4b92){return _0x2ca7b7+'-'+String(_0x2c4b92)['toUpperCase']()+'.json';}export function resolvePageFilePath(_0x2a58e0,_0x5253c4,_0x2bd278){const _0x306774=a218_0x76fec1;return join(_0x2a58e0[_0x306774(0x130)],buildPageFileName(_0x5253c4,_0x2bd278));}export async function ensureParentDirectory(_0x354079){await mkdir(dirname(_0x354079),{'recursive':!![]});}export async function fileExists(_0xb3fff2){try{return await access(_0xb3fff2,constants['F_OK']),!![];}catch{return![];}}
1
+ const a216_0x306d77=a216_0x37f5;(function(_0x417c03,_0x5f1389){const _0x4af1f6=a216_0x37f5,_0xd70078=_0x417c03();while(!![]){try{const _0x241511=parseInt(_0x4af1f6(0x8a))/0x1*(parseInt(_0x4af1f6(0x8c))/0x2)+parseInt(_0x4af1f6(0x89))/0x3*(-parseInt(_0x4af1f6(0x85))/0x4)+-parseInt(_0x4af1f6(0x82))/0x5*(parseInt(_0x4af1f6(0x8b))/0x6)+-parseInt(_0x4af1f6(0x86))/0x7*(parseInt(_0x4af1f6(0x7a))/0x8)+parseInt(_0x4af1f6(0x7e))/0x9*(-parseInt(_0x4af1f6(0x81))/0xa)+-parseInt(_0x4af1f6(0x80))/0xb*(parseInt(_0x4af1f6(0x83))/0xc)+-parseInt(_0x4af1f6(0x88))/0xd*(-parseInt(_0x4af1f6(0x7d))/0xe);if(_0x241511===_0x5f1389)break;else _0xd70078['push'](_0xd70078['shift']());}catch(_0x30779b){_0xd70078['push'](_0xd70078['shift']());}}}(a216_0x2c25,0x375b2));import{constants}from'node:fs';function a216_0x37f5(_0x109fd5,_0x27ce60){_0x109fd5=_0x109fd5-0x7a;const _0x2c2551=a216_0x2c25();let _0x37f5bc=_0x2c2551[_0x109fd5];return _0x37f5bc;}import{access,mkdir}from'node:fs/promises';function a216_0x2c25(){const _0x76883d=['.rabetbase','1205582fnfivF','1611kjDMHV','F_OK','12441xWuZcE','20410YvQdyb','64280cNxYtu','4764tibOSR','page','4oqQSEC','21huohhy','cwd','208uKyyYx','595557HIhBMe','3687yAkcOS','114nouDdR','104vIEcJt','228440BPZXir','.json'];a216_0x2c25=function(){return _0x76883d;};return a216_0x2c25();}import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x20a364,_0x34fc04=process[a216_0x306d77(0x87)]()){const _0x1edc3a=a216_0x306d77,_0x2f4c82=resolve(_0x34fc04),_0x5ee868=join(_0x2f4c82,_0x1edc3a(0x7c),_0x1edc3a(0x84));return{'projectRoot':_0x2f4c82,'pagesBaseDir':_0x5ee868,'appPagesDir':join(_0x5ee868,_0x20a364),'lockFilePath':join(_0x2f4c82,_0x1edc3a(0x7c),'page.lock.json')};}export function buildPageFileName(_0x52de9d,_0xdb39b3){const _0x24b5de=a216_0x306d77;return _0x52de9d+'-'+String(_0xdb39b3)['toUpperCase']()+_0x24b5de(0x7b);}export function resolvePageFilePath(_0x340de8,_0x32b5fb,_0x4cfdb2){return join(_0x340de8['appPagesDir'],buildPageFileName(_0x32b5fb,_0x4cfdb2));}export async function ensureParentDirectory(_0x506660){await mkdir(dirname(_0x506660),{'recursive':!![]});}export async function fileExists(_0x1a0779){const _0x1acdab=a216_0x306d77;try{return await access(_0x1a0779,constants[_0x1acdab(0x7f)]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x7c397d,_0x43b6ff){const _0x4154d2=a219_0x4113,_0x5a0ddd=_0x7c397d();while(!![]){try{const _0x34d3e2=parseInt(_0x4154d2(0x147))/0x1+-parseInt(_0x4154d2(0x148))/0x2+parseInt(_0x4154d2(0x14c))/0x3*(-parseInt(_0x4154d2(0x149))/0x4)+-parseInt(_0x4154d2(0x14d))/0x5*(parseInt(_0x4154d2(0x146))/0x6)+parseInt(_0x4154d2(0x150))/0x7+-parseInt(_0x4154d2(0x14e))/0x8*(-parseInt(_0x4154d2(0x14f))/0x9)+-parseInt(_0x4154d2(0x14b))/0xa;if(_0x34d3e2===_0x43b6ff)break;else _0x5a0ddd['push'](_0x5a0ddd['shift']());}catch(_0x1d1b46){_0x5a0ddd['push'](_0x5a0ddd['shift']());}}}(a219_0x514c,0xf0314));import a219_0x205e7c from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x3ede34){const _0xea70f=a219_0x4113;return JSON['stringify'](JSON[_0xea70f(0x151)](_0x3ede34),null,0x2)+'\x0a';}function a219_0x4113(_0x4ffa16,_0x4372e1){_0x4ffa16=_0x4ffa16-0x146;const _0x514ce9=a219_0x514c();let _0x411348=_0x514ce9[_0x4ffa16];return _0x411348;}export function computePageContentHash(_0x42dd5e){const _0x3ce390=a219_0x4113;return a219_0x205e7c[_0x3ce390(0x14a)]('md5')['update'](_0x42dd5e)['digest']('hex');}export function computeSerializedSchemaHash(_0xfd574e){return computePageContentHash(serializePageSchemaForFile(_0xfd574e));}export async function computePageFileHash(_0x194c85){const _0xb50ddb=a219_0x4113,_0x1562f6=await readFile(_0x194c85,_0xb50ddb(0x152));return computePageContentHash(_0x1562f6);}function a219_0x514c(){const _0x522e1b=['4UBYoGx','createHash','7585040PrCssT','405609JwXipf','505EuxBXW','56QBKjOm','2403639eTxlCx','6738816ByjjRG','parse','utf8','111066DkVRPl','1884735lHujSV','1939548cafEJm'];a219_0x514c=function(){return _0x522e1b;};return a219_0x514c();}
1
+ (function(_0x284123,_0x2c6137){const _0x511f64=a217_0x4c0b,_0xef105a=_0x284123();while(!![]){try{const _0x4158eb=parseInt(_0x511f64(0x114))/0x1*(-parseInt(_0x511f64(0x11c))/0x2)+-parseInt(_0x511f64(0x11d))/0x3+-parseInt(_0x511f64(0x11b))/0x4*(parseInt(_0x511f64(0x121))/0x5)+parseInt(_0x511f64(0x11e))/0x6*(parseInt(_0x511f64(0x118))/0x7)+parseInt(_0x511f64(0x113))/0x8+-parseInt(_0x511f64(0x11f))/0x9+parseInt(_0x511f64(0x116))/0xa;if(_0x4158eb===_0x2c6137)break;else _0xef105a['push'](_0xef105a['shift']());}catch(_0x3afc2c){_0xef105a['push'](_0xef105a['shift']());}}}(a217_0x4a72,0xe2d1e));function a217_0x4c0b(_0x30eb24,_0x47a66f){_0x30eb24=_0x30eb24-0x113;const _0x4a72bc=a217_0x4a72();let _0x4c0b4d=_0x4a72bc[_0x30eb24];return _0x4c0b4d;}import a217_0x261eed from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0xae49d1){const _0xb483f1=a217_0x4c0b;return JSON[_0xb483f1(0x120)](JSON[_0xb483f1(0x122)](_0xae49d1),null,0x2)+'\x0a';}export function computePageContentHash(_0x5bdcde){const _0x2aaa1a=a217_0x4c0b;return a217_0x261eed[_0x2aaa1a(0x117)]('md5')[_0x2aaa1a(0x115)](_0x5bdcde)[_0x2aaa1a(0x11a)](_0x2aaa1a(0x119));}export function computeSerializedSchemaHash(_0x3e7c57){return computePageContentHash(serializePageSchemaForFile(_0x3e7c57));}function a217_0x4a72(){const _0x2c777d=['9793784hJCIsz','417UBmQcG','update','412280qejpyP','createHash','77497zSoXKO','hex','digest','39604LWrDVU','1086ARxnUG','1366542jizgwz','594fRxuOx','2387988NkWdzE','stringify','245OuKZwB','parse'];a217_0x4a72=function(){return _0x2c777d;};return a217_0x4a72();}export async function computePageFileHash(_0x2d5a4a){const _0x99a3ed=await readFile(_0x2d5a4a,'utf8');return computePageContentHash(_0x99a3ed);}
@@ -1 +1 @@
1
- function a220_0x13bf(){const _0x31c686=['Failed\x20to\x20read\x20page\x20lock\x20file:\x20','1241706ARJkVC','object','1979928UgFlys','1355936lOSShf','2277SDskZQ','ENOENT','5911272EJhord','stringify','apps','parse','58107pOFaWS','pages','192wVWeIc','103860LeDerZ','1069954jeSvlZ','utf8','25qppNio'];a220_0x13bf=function(){return _0x31c686;};return a220_0x13bf();}(function(_0x12c90d,_0x41ba2f){const _0x42079e=a220_0x2371,_0x4ed9d5=_0x12c90d();while(!![]){try{const _0x2ad03a=-parseInt(_0x42079e(0x1d1))/0x1+-parseInt(_0x42079e(0x1dc))/0x2+parseInt(_0x42079e(0x1d0))/0x3+-parseInt(_0x42079e(0x1d4))/0x4+-parseInt(_0x42079e(0x1cc))/0x5*(-parseInt(_0x42079e(0x1ce))/0x6)+-parseInt(_0x42079e(0x1d8))/0x7*(parseInt(_0x42079e(0x1da))/0x8)+parseInt(_0x42079e(0x1d2))/0x9*(parseInt(_0x42079e(0x1db))/0xa);if(_0x2ad03a===_0x41ba2f)break;else _0x4ed9d5['push'](_0x4ed9d5['shift']());}catch(_0x4dbc89){_0x4ed9d5['push'](_0x4ed9d5['shift']());}}}(a220_0x13bf,0xb8302));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x367efd,_0x118768){const _0x2ad952=a220_0x2371,_0x1fa0d8={'apps':_0x367efd[_0x2ad952(0x1d6)]&&typeof _0x367efd[_0x2ad952(0x1d6)]==='object'?_0x367efd[_0x2ad952(0x1d6)]:{}};let _0x5164c8=_0x1fa0d8[_0x2ad952(0x1d6)][_0x118768];if(!_0x5164c8)return _0x5164c8={'lastSync':'','pages':{}},_0x1fa0d8[_0x2ad952(0x1d6)][_0x118768]=_0x5164c8,{'lockData':_0x1fa0d8,'appLock':_0x5164c8};return!_0x5164c8['lastSync']&&(_0x5164c8['lastSync']=''),(!_0x5164c8[_0x2ad952(0x1d9)]||typeof _0x5164c8[_0x2ad952(0x1d9)]!==_0x2ad952(0x1cf))&&(_0x5164c8['pages']={}),{'lockData':_0x1fa0d8,'appLock':_0x5164c8};}function a220_0x2371(_0x6c2d48,_0x1d8ef6){_0x6c2d48=_0x6c2d48-0x1cb;const _0x13bf79=a220_0x13bf();let _0x23711a=_0x13bf79[_0x6c2d48];return _0x23711a;}export async function readPageLockFile(_0x1f6226){const _0x3feee6=a220_0x2371;try{const _0x6e9a49=await readFile(_0x1f6226,'utf8'),_0x475730=JSON[_0x3feee6(0x1d7)](_0x6e9a49);return{'apps':_0x475730[_0x3feee6(0x1d6)]&&typeof _0x475730[_0x3feee6(0x1d6)]===_0x3feee6(0x1cf)?_0x475730['apps']:{}};}catch(_0x5105b4){if(_0x5105b4['code']===_0x3feee6(0x1d3))return null;throw new Error(_0x3feee6(0x1cd)+String(_0x5105b4));}}export async function writePageLockFile(_0x3dca57,_0x5bcca9){const _0x892e62=a220_0x2371;await mkdir(dirname(_0x3dca57),{'recursive':!![]}),await writeFile(_0x3dca57,JSON[_0x892e62(0x1d5)](_0x5bcca9,null,0x2),_0x892e62(0x1cb));}
1
+ (function(_0x2e1277,_0xe76435){const _0x3e1132=a218_0xaeb9,_0x2bdcbb=_0x2e1277();while(!![]){try{const _0x1e0b4f=parseInt(_0x3e1132(0x10a))/0x1*(-parseInt(_0x3e1132(0x10b))/0x2)+-parseInt(_0x3e1132(0x10d))/0x3*(parseInt(_0x3e1132(0x105))/0x4)+-parseInt(_0x3e1132(0x109))/0x5+-parseInt(_0x3e1132(0x106))/0x6+-parseInt(_0x3e1132(0x108))/0x7+parseInt(_0x3e1132(0x111))/0x8*(parseInt(_0x3e1132(0x107))/0x9)+-parseInt(_0x3e1132(0x112))/0xa*(-parseInt(_0x3e1132(0x113))/0xb);if(_0x1e0b4f===_0xe76435)break;else _0x2bdcbb['push'](_0x2bdcbb['shift']());}catch(_0x20e67f){_0x2bdcbb['push'](_0x2bdcbb['shift']());}}}(a218_0x281d,0xe9e1e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a218_0x281d(){const _0x2429af=['pages','913389fTuuAR','object','parse','lastSync','408872yHgLGm','22570zWeMRS','21043sVycsL','code','utf8','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','apps','4TaNLEp','1572588dYfBOC','108OzkCmj','2367134UKNFxW','8617150qEWzZR','718RveiXY','3746mHQozZ'];a218_0x281d=function(){return _0x2429af;};return a218_0x281d();}export function ensurePageLockScope(_0x49540a,_0x1f8076){const _0x2b423d=a218_0xaeb9,_0x55e70d={'apps':_0x49540a[_0x2b423d(0x104)]&&typeof _0x49540a['apps']==='object'?_0x49540a[_0x2b423d(0x104)]:{}};let _0x1855dc=_0x55e70d[_0x2b423d(0x104)][_0x1f8076];if(!_0x1855dc)return _0x1855dc={'lastSync':'','pages':{}},_0x55e70d['apps'][_0x1f8076]=_0x1855dc,{'lockData':_0x55e70d,'appLock':_0x1855dc};return!_0x1855dc[_0x2b423d(0x110)]&&(_0x1855dc[_0x2b423d(0x110)]=''),(!_0x1855dc[_0x2b423d(0x10c)]||typeof _0x1855dc[_0x2b423d(0x10c)]!==_0x2b423d(0x10e))&&(_0x1855dc['pages']={}),{'lockData':_0x55e70d,'appLock':_0x1855dc};}export async function readPageLockFile(_0x5f5c41){const _0x12beec=a218_0xaeb9;try{const _0x263cb1=await readFile(_0x5f5c41,_0x12beec(0x115)),_0x42e7d4=JSON[_0x12beec(0x10f)](_0x263cb1);return{'apps':_0x42e7d4[_0x12beec(0x104)]&&typeof _0x42e7d4[_0x12beec(0x104)]===_0x12beec(0x10e)?_0x42e7d4[_0x12beec(0x104)]:{}};}catch(_0x52ed28){if(_0x52ed28[_0x12beec(0x114)]==='ENOENT')return null;throw new Error(_0x12beec(0x116)+String(_0x52ed28));}}function a218_0xaeb9(_0x1a7e6c,_0x6497a1){_0x1a7e6c=_0x1a7e6c-0x104;const _0x281da9=a218_0x281d();let _0xaeb929=_0x281da9[_0x1a7e6c];return _0xaeb929;}export async function writePageLockFile(_0x3103c0,_0x49711b){const _0xad37fd=a218_0xaeb9;await mkdir(dirname(_0x3103c0),{'recursive':!![]}),await writeFile(_0x3103c0,JSON['stringify'](_0x49711b,null,0x2),_0xad37fd(0x115));}
@@ -1 +1 @@
1
- (function(_0x143259,_0x2a5115){const _0x52ef1a=a222_0x2ae8,_0xa41df7=_0x143259();while(!![]){try{const _0x1e3ba4=parseInt(_0x52ef1a(0x187))/0x1+-parseInt(_0x52ef1a(0x176))/0x2*(-parseInt(_0x52ef1a(0x181))/0x3)+-parseInt(_0x52ef1a(0x190))/0x4*(-parseInt(_0x52ef1a(0x15d))/0x5)+parseInt(_0x52ef1a(0x175))/0x6+parseInt(_0x52ef1a(0x18d))/0x7*(-parseInt(_0x52ef1a(0x193))/0x8)+parseInt(_0x52ef1a(0x18a))/0x9*(parseInt(_0x52ef1a(0x195))/0xa)+-parseInt(_0x52ef1a(0x189))/0xb;if(_0x1e3ba4===_0x2a5115)break;else _0xa41df7['push'](_0xa41df7['shift']());}catch(_0xa5f552){_0xa41df7['push'](_0xa41df7['shift']());}}}(a222_0x4052,0xe2d12));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x3e0184,_0x1c39cb){const _0x492281=a222_0x2ae8,_0x4d7f2a=[],_0x3ecc7b=normalizeSqlForStaticAnalysis(_0x3e0184),_0x36df17=(_0x3ecc7b['error']?[]:extractJoinFacts(_0x3ecc7b[_0x492281(0x154)]))[_0x492281(0x177)](_0x25ba01=>{const _0x4ec82f=_0x492281;if(_0x25ba01[_0x4ec82f(0x170)]||_0x25ba01[_0x4ec82f(0x18f)][_0x4ec82f(0x16e)]===0x0)return _0x4d7f2a[_0x4ec82f(0x159)]({'code':_0x4ec82f(0x15e),'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01[_0x4ec82f(0x18f)],'reason':_0x25ba01['unsupportedReason']??_0x4ec82f(0x182)}),{'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01[_0x4ec82f(0x18f)],'status':_0x4ec82f(0x18c)};const _0x3c1be5=resolveTableMetadata(_0x1c39cb,_0x25ba01[_0x4ec82f(0x15b)]),_0x260781=(_0x3c1be5?.['indexes']??[])['map'](_0x52fa40=>({'index':_0x52fa40,'matchedPrefix':findEqualityPrefix(_0x52fa40[_0x4ec82f(0x18f)],_0x25ba01['columns'])}))[_0x4ec82f(0x160)](_0xecac4c=>_0xecac4c[_0x4ec82f(0x178)][_0x4ec82f(0x16e)]>0x0),_0x41a8d8=_0x260781['reduce']((_0x4d2691,_0x218f47)=>!_0x4d2691||_0x218f47[_0x4ec82f(0x178)][_0x4ec82f(0x16e)]>_0x4d2691[_0x4ec82f(0x178)][_0x4ec82f(0x16e)]?_0x218f47:_0x4d2691,_0x260781[0x0]);if(_0x41a8d8)return{'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01['alias'],'columns':_0x25ba01['columns'],'status':_0x4ec82f(0x15c),'matchedIndex':{..._0x41a8d8[_0x4ec82f(0x16d)],'matchedPrefix':_0x41a8d8['matchedPrefix']}};const _0x52ad0b=_0x3c1be5?.[_0x4ec82f(0x17f)][_0x4ec82f(0x160)](_0x586557=>_0x586557['columns']['some'](_0x50d54b=>_0x25ba01[_0x4ec82f(0x18f)][_0x4ec82f(0x191)](_0x6721dc=>columnNamesMatch(_0x50d54b,_0x6721dc))))??[];if(_0x52ad0b['length']>0x0)return _0x4d7f2a[_0x4ec82f(0x159)]({'code':_0x4ec82f(0x17e),'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01[_0x4ec82f(0x18f)],'reason':_0x4ec82f(0x165)}),{'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01[_0x4ec82f(0x18f)],'status':_0x4ec82f(0x151),'candidateIndexes':_0x52ad0b};if(_0x3c1be5&&_0x3c1be5[_0x4ec82f(0x16c)]!==![]&&_0x3c1be5[_0x4ec82f(0x17f)]['length']>0x0&&_0x25ba01['columns']['length']>0x0)return _0x4d7f2a['push']({'code':_0x4ec82f(0x184),'table':_0x25ba01['table'],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01[_0x4ec82f(0x18f)],'reason':_0x4ec82f(0x166)}),{'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01[_0x4ec82f(0x18f)],'status':_0x4ec82f(0x151)};return _0x4d7f2a['push']({'code':_0x4ec82f(0x16f),'table':_0x25ba01['table'],'alias':_0x25ba01[_0x4ec82f(0x158)],'columns':_0x25ba01['columns'],'reason':_0x3c1be5?_0x4ec82f(0x152):_0x4ec82f(0x18e)}),{'table':_0x25ba01[_0x4ec82f(0x15b)],'alias':_0x25ba01['alias'],'columns':_0x25ba01[_0x4ec82f(0x18f)],'status':_0x4ec82f(0x18c)};});return{'checked':_0x36df17[_0x492281(0x16e)]>0x0,'joins':_0x36df17,'warnings':_0x4d7f2a};}function extractJoinFacts(_0xa2ef6c){const _0x4b7b90=a222_0x2ae8,_0x1adfd2=maskNestedQueries(stripSqlNoise(_0xa2ef6c)),_0xc79617=maskQuotedIdentifiers(_0x1adfd2),_0x21bfea=[],_0x4851a6=new Set(),_0x11a48a=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x51e4a8 of _0x1adfd2[_0x4b7b90(0x183)](_0x11a48a)){const _0x588496=_0x51e4a8['index']??0x0,_0x1c4d4c=_0x51e4a8[0x0]['search'](/\bJOIN\b/i),_0xd3c078=_0x588496+Math[_0x4b7b90(0x169)](0x0,_0x1c4d4c);if(!/^JOIN\b/i[_0x4b7b90(0x192)](_0xc79617['slice'](_0xd3c078)))continue;_0x4851a6['add'](_0xd3c078);const _0x96e89a=normalizeIdentifier(_0x51e4a8[0x1]||_0x4b7b90(0x156)),_0x482fdb=normalizeIdentifier(_0x51e4a8[0x2]??''),_0x306191=normalizeIdentifier(_0x51e4a8[0x3]||_0x482fdb[_0x4b7b90(0x196)]('.')['at'](-0x1)||_0x482fdb),_0x3909ce=[],_0x4645d3=_0x482fdb===_0x4b7b90(0x185);let _0x2b44bd=_0x96e89a===_0x4b7b90(0x174)||_0x96e89a==='full'||_0x4645d3,_0x41d6b2=_0x2b44bd?_0x4645d3?'Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.':_0x96e89a[_0x4b7b90(0x180)]()+'\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.':undefined;const _0x42faf5=stripOuterParentheses(_0x51e4a8[0x4]??''),_0x5e0c71=_0x42faf5[_0x4b7b90(0x161)](MYBATIS_DYNAMIC_START_MARKER)||_0x42faf5[_0x4b7b90(0x161)](MYBATIS_DYNAMIC_END_MARKER),_0x5c0fdb=_0x42faf5[_0x4b7b90(0x161)](MYBATIS_INCLUDE_MARKER);_0x5e0c71&&(_0x2b44bd=!![],_0x41d6b2??=_0x4b7b90(0x171));_0x5c0fdb&&(_0x2b44bd=!![],_0x41d6b2??=_0x4b7b90(0x17d));const _0x294dbf=_0x42faf5[_0x4b7b90(0x155)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x4b7b90(0x155)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x4b7b90(0x155)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x294dbf,'OR')&&(_0x2b44bd=!![],_0x41d6b2??=_0x4b7b90(0x172));for(const _0x1a6edf of splitTopLevelAnd(_0x294dbf)){const _0x184fa5=stripOuterParentheses(_0x1a6edf);if(hasTopLevelKeyword(_0x184fa5,'OR')){_0x2b44bd=!![],_0x41d6b2??=_0x4b7b90(0x172);continue;}const _0x167cb6=splitEquality(_0x184fa5);if(!_0x167cb6){containsColumnReference(_0x1a6edf,_0x306191)&&(_0x2b44bd=!![]);continue;}const _0x5dae2d=parseDirectColumnReference(_0x167cb6[0x0],_0x306191),_0x3a0cc4=parseDirectColumnReference(_0x167cb6[0x1],_0x306191),_0x16b41c=containsColumnReference(_0x167cb6[0x0],_0x306191),_0x2973a9=containsColumnReference(_0x167cb6[0x1],_0x306191),_0x13d9f1=_0x5dae2d&&!_0x2973a9?_0x5dae2d:_0x3a0cc4&&!_0x16b41c?_0x3a0cc4:null;if(_0x13d9f1&&!_0x3909ce[_0x4b7b90(0x161)](_0x13d9f1))_0x3909ce[_0x4b7b90(0x159)](_0x13d9f1);else!_0x13d9f1&&containsColumnReference(_0x1a6edf,_0x306191)&&(_0x2b44bd=!![]);}_0x21bfea[_0x4b7b90(0x159)]({'table':_0x482fdb,'alias':_0x306191,'columns':_0x3909ce,'unsupportedPredicate':_0x2b44bd,'unsupportedReason':_0x41d6b2,'containsUnresolvedInclude':_0x5c0fdb,'position':_0xd3c078});}for(const _0x5da786 of _0xc79617[_0x4b7b90(0x183)](/\bJOIN\b/gi)){const _0x3ab105=_0x5da786[_0x4b7b90(0x16d)]??0x0;if(_0x4851a6[_0x4b7b90(0x16b)](_0x3ab105))continue;const _0x217bd7=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x4b7b90(0x163)](_0x1adfd2[_0x4b7b90(0x17b)](_0x3ab105+_0x5da786[0x0][_0x4b7b90(0x16e)])),_0x153ddb=normalizeIdentifier(_0x217bd7?.[0x1]||'unknown'),_0x52d849=normalizeIdentifier(_0x217bd7?.[0x2]||''),_0x3716b6=isSqlClauseKeyword(_0x52d849)?_0x153ddb[_0x4b7b90(0x196)]('.')['at'](-0x1)||_0x153ddb:_0x52d849||_0x153ddb[_0x4b7b90(0x196)]('.')['at'](-0x1)||_0x153ddb;_0x21bfea['push']({'table':_0x153ddb,'alias':_0x3716b6,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x4b7b90(0x15a),'position':_0x3ab105});}const _0x4a0185=_0xc79617['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x4a0185>=0x0&&!_0x21bfea[_0x4b7b90(0x191)](_0x357967=>_0x357967[_0x4b7b90(0x16a)])&&_0x21bfea['push']({'table':_0x4b7b90(0x17a),'alias':_0x4b7b90(0x17a),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x4b7b90(0x164),'containsUnresolvedInclude':!![],'position':_0x4a0185}),_0x21bfea[_0x4b7b90(0x194)]((_0x19ca50,_0x26a608)=>_0x19ca50[_0x4b7b90(0x162)]-_0x26a608[_0x4b7b90(0x162)]);}function stripSqlNoise(_0x51bf4e){const _0x25aa22=a222_0x2ae8,_0x18b98c=Array['from'](_0x51bf4e),_0x2a3f7d=(_0x2a25f8,_0x3c20ca)=>{for(let _0x4e30b6=_0x2a25f8;_0x4e30b6<_0x3c20ca;_0x4e30b6+=0x1){_0x18b98c[_0x4e30b6]!=='\x0a'&&_0x18b98c[_0x4e30b6]!=='\x0d'&&(_0x18b98c[_0x4e30b6]='\x20');}};for(let _0x5660b5=0x0;_0x5660b5<_0x18b98c[_0x25aa22(0x16e)];_0x5660b5+=0x1){const _0x1999aa=_0x18b98c[_0x5660b5],_0x49a74d=_0x18b98c[_0x5660b5+0x1];if(_0x1999aa==='\x27'||_0x1999aa==='\x22'||_0x1999aa==='`'){const _0x1dbfb9=_0x1999aa,_0x28002a=_0x5660b5;_0x5660b5+=0x1;while(_0x5660b5<_0x18b98c['length']){if(_0x18b98c[_0x5660b5]==='\x5c'&&_0x5660b5+0x1<_0x18b98c[_0x25aa22(0x16e)]){_0x5660b5+=0x2;continue;}if(_0x18b98c[_0x5660b5]!==_0x1dbfb9){_0x5660b5+=0x1;continue;}if(_0x18b98c[_0x5660b5+0x1]===_0x1dbfb9){_0x5660b5+=0x2;continue;}break;}if(_0x1dbfb9==='\x27')_0x2a3f7d(_0x28002a,Math['min'](_0x5660b5+0x1,_0x18b98c[_0x25aa22(0x16e)]));continue;}if(_0x1999aa==='-'&&_0x49a74d==='-'){const _0x372f79=_0x5660b5;while(_0x5660b5<_0x18b98c[_0x25aa22(0x16e)]&&_0x18b98c[_0x5660b5]!=='\x0a')_0x5660b5+=0x1;_0x2a3f7d(_0x372f79,_0x5660b5);continue;}if(_0x1999aa==='/'&&_0x49a74d==='*'){const _0x49f2f7=_0x5660b5;_0x5660b5+=0x2;while(_0x5660b5<_0x18b98c['length']&&!(_0x18b98c[_0x5660b5]==='*'&&_0x18b98c[_0x5660b5+0x1]==='/')){_0x5660b5+=0x1;}_0x5660b5=Math[_0x25aa22(0x157)](_0x5660b5+0x1,_0x18b98c[_0x25aa22(0x16e)]-0x1),_0x2a3f7d(_0x49f2f7,_0x5660b5+0x1);continue;}if(_0x1999aa==='#'&&_0x49a74d!=='{'){const _0x452d21=_0x5660b5;while(_0x5660b5<_0x18b98c[_0x25aa22(0x16e)]&&_0x18b98c[_0x5660b5]!=='\x0a')_0x5660b5+=0x1;_0x2a3f7d(_0x452d21,_0x5660b5);continue;}if((_0x1999aa==='#'||_0x1999aa==='$')&&_0x49a74d==='{'){const _0x1c9a3d=_0x5660b5;_0x5660b5+=0x2;while(_0x5660b5<_0x18b98c['length']&&_0x18b98c[_0x5660b5]!=='}')_0x5660b5+=0x1;_0x2a3f7d(_0x1c9a3d,Math[_0x25aa22(0x157)](_0x5660b5+0x1,_0x18b98c['length']));}}return _0x18b98c[_0x25aa22(0x17c)]('');}function maskQuotedIdentifiers(_0x5e2d97){const _0x9591b9=a222_0x2ae8,_0x2fbebc=Array['from'](_0x5e2d97);for(let _0x465ecc=0x0;_0x465ecc<_0x2fbebc['length'];_0x465ecc+=0x1){const _0x4bc4d2=_0x2fbebc[_0x465ecc];if(_0x4bc4d2!=='\x22'&&_0x4bc4d2!=='`')continue;_0x465ecc+=0x1;while(_0x465ecc<_0x2fbebc['length']){if(_0x2fbebc[_0x465ecc]===_0x4bc4d2){if(_0x2fbebc[_0x465ecc+0x1]===_0x4bc4d2){_0x2fbebc[_0x465ecc]='\x20',_0x2fbebc[_0x465ecc+0x1]='\x20',_0x465ecc+=0x2;continue;}break;}_0x2fbebc[_0x465ecc]='\x20',_0x465ecc+=0x1;}}return _0x2fbebc[_0x9591b9(0x17c)]('');}function a222_0x4052(){const _0x2ca15f=['unsupportedPredicate','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','tableName','right','6647478ekiRTO','1760014ytgNps','map','matchedPrefix','natural','unknown','slice','join','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','JOIN_INDEX_NOT_USABLE','indexes','toUpperCase','3QdoHgC','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','matchAll','JOIN_INDEX_MISSING','__sq__','toLowerCase','176922KPgjaw','trim','43493494HUOiGa','954HBwuvD','match','unavailable','996457YelVir','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','columns','1862052SNayif','some','test','8FqlBoe','sort','138110gYACFj','split','where','full','warning','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','\x5c$&','sql','replaceAll','INNER','min','alias','push','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','table','covered','15BgHPWc','JOIN_PREDICATE_UNSUPPORTED','startsWith','filter','includes','position','exec','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','inner','replace','max','containsUnresolvedInclude','has','metadataAvailable','index','length','INDEX_METADATA_UNAVAILABLE'];a222_0x4052=function(){return _0x2ca15f;};return a222_0x4052();}function maskNestedQueries(_0x2304d4){const _0x3cba4e=a222_0x2ae8,_0x3b9671=Array['from'](_0x2304d4);for(let _0x199bb5=0x0;_0x199bb5<_0x3b9671[_0x3cba4e(0x16e)];_0x199bb5+=0x1){if(_0x3b9671[_0x199bb5]!=='(')continue;const _0x5b9048=_0x2304d4[_0x3cba4e(0x17b)](_0x199bb5+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x5b9048))continue;let _0x1c6330=0x1,_0x30a52c=_0x199bb5+0x1;for(;_0x30a52c<_0x3b9671[_0x3cba4e(0x16e)]&&_0x1c6330>0x0;_0x30a52c+=0x1){if(_0x3b9671[_0x30a52c]==='(')_0x1c6330+=0x1;if(_0x3b9671[_0x30a52c]===')')_0x1c6330-=0x1;}if(_0x1c6330!==0x0)continue;for(let _0x1cbd47=_0x199bb5;_0x1cbd47<_0x30a52c;_0x1cbd47+=0x1){_0x3b9671[_0x1cbd47]='\x20';}const _0x3b568a=_0x3cba4e(0x185);for(let _0x352c5a=0x0;_0x352c5a<_0x3b568a[_0x3cba4e(0x16e)]&&_0x199bb5+_0x352c5a<_0x30a52c;_0x352c5a+=0x1){_0x3b9671[_0x199bb5+_0x352c5a]=_0x3b568a[_0x352c5a];}_0x199bb5=_0x30a52c-0x1;}return _0x3b9671[_0x3cba4e(0x17c)]('');}function splitTopLevelAnd(_0x36f5ef){const _0x15fa7b=a222_0x2ae8,_0x102186=[];let _0x3b3af1=0x0,_0x5ed50e=0x0;for(let _0x2a962b=0x0;_0x2a962b<_0x36f5ef['length'];_0x2a962b+=0x1){const _0x1f1b13=_0x36f5ef[_0x2a962b];if(_0x1f1b13==='(')_0x3b3af1+=0x1;if(_0x1f1b13===')')_0x3b3af1=Math[_0x15fa7b(0x169)](0x0,_0x3b3af1-0x1);_0x3b3af1===0x0&&_0x36f5ef[_0x15fa7b(0x17b)](_0x2a962b)[_0x15fa7b(0x18b)](/^AND\b/i)&&(_0x2a962b===0x0||/\s/[_0x15fa7b(0x192)](_0x36f5ef[_0x2a962b-0x1]??''))&&(_0x102186[_0x15fa7b(0x159)](_0x36f5ef[_0x15fa7b(0x17b)](_0x5ed50e,_0x2a962b)['trim']()),_0x2a962b+=0x2,_0x5ed50e=_0x2a962b+0x1);}const _0x4b2a8c=_0x36f5ef[_0x15fa7b(0x17b)](_0x5ed50e)[_0x15fa7b(0x188)]();if(_0x4b2a8c)_0x102186[_0x15fa7b(0x159)](_0x4b2a8c);return _0x102186;}function hasTopLevelKeyword(_0x4fd40d,_0x1c708b){const _0x12f299=a222_0x2ae8;let _0x174751=0x0;for(let _0x562999=0x0;_0x562999<_0x4fd40d['length'];_0x562999+=0x1){const _0x4167ab=_0x4fd40d[_0x562999];if(_0x4167ab==='(')_0x174751+=0x1;if(_0x4167ab===')')_0x174751=Math['max'](0x0,_0x174751-0x1);if(_0x174751!==0x0)continue;const _0x1b7087=_0x4fd40d[_0x12f299(0x17b)](_0x562999,_0x562999+_0x1c708b[_0x12f299(0x16e)]),_0xedd480=_0x4fd40d[_0x562999-0x1]??'\x20',_0x2d7537=_0x4fd40d[_0x562999+_0x1c708b[_0x12f299(0x16e)]]??'\x20';if(_0x1b7087[_0x12f299(0x180)]()===_0x1c708b[_0x12f299(0x180)]()&&!/[\w$]/[_0x12f299(0x192)](_0xedd480)&&!/[\w$]/['test'](_0x2d7537))return!![];}return![];}function splitEquality(_0x5a2d0a){const _0x280a2b=a222_0x2ae8,_0x3e1aa4=stripOuterParentheses(_0x5a2d0a);let _0x5439da=0x0,_0x4bdb59;for(let _0x4d5832=0x0;_0x4d5832<_0x3e1aa4[_0x280a2b(0x16e)];_0x4d5832+=0x1){const _0x51f701=_0x3e1aa4[_0x4d5832];if(_0x51f701==='(')_0x5439da+=0x1;if(_0x51f701===')')_0x5439da=Math[_0x280a2b(0x169)](0x0,_0x5439da-0x1);const _0x3ed823=_0x3e1aa4[_0x4d5832-0x1]??'',_0x20c217=_0x3e1aa4[_0x4d5832+0x1]??'';if(_0x51f701==='='&&_0x5439da===0x0&&!/[!<>=:]/[_0x280a2b(0x192)](_0x3ed823)&&_0x20c217!=='='){if(_0x4bdb59!==undefined)return null;_0x4bdb59=_0x4d5832;}}return _0x4bdb59===undefined?null:[_0x3e1aa4[_0x280a2b(0x17b)](0x0,_0x4bdb59)[_0x280a2b(0x188)](),_0x3e1aa4[_0x280a2b(0x17b)](_0x4bdb59+0x1)[_0x280a2b(0x188)]()];}function parseDirectColumnReference(_0x3c7c58,_0x557043){const _0x46c40c=a222_0x2ae8,_0x4ed1e7=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x46c40c(0x163)](stripOuterParentheses(_0x3c7c58));if(!_0x4ed1e7)return null;if(normalizeIdentifier(_0x4ed1e7[0x1]??'')!==normalizeIdentifier(_0x557043))return null;return normalizeIdentifier(_0x4ed1e7[0x2]??'');}function containsColumnReference(_0x4a0039,_0x1a9265){const _0x56f90a=a222_0x2ae8,_0x5fe4de=_0x4a0039[_0x56f90a(0x168)](/[`"]/g,''),_0x527cc7=_0x1a9265['replace'](/[.*+?^${}()|[\]\\]/g,_0x56f90a(0x153));return new RegExp('(?:^|[^\x5cw$])'+_0x527cc7+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x56f90a(0x192)](_0x5fe4de);}function findEqualityPrefix(_0x190a08,_0x3f37d2){const _0x4ba409=a222_0x2ae8,_0x9553ef=new Set(_0x3f37d2['map'](normalizeIdentifier)),_0xfd01a9=[];for(const _0x4d4e50 of _0x190a08){if(!_0x9553ef[_0x4ba409(0x16b)](normalizeIdentifier(_0x4d4e50)))break;_0xfd01a9[_0x4ba409(0x159)](_0x4d4e50);}return _0xfd01a9;}function resolveTableMetadata(_0xcfd758,_0xcd5913){const _0x34490f=a222_0x2ae8,_0x2abd84=normalizeIdentifier(_0xcd5913),_0x19e4ed=_0xcfd758[_0x34490f(0x160)](_0x38ba8a=>normalizeIdentifier(_0x38ba8a[_0x34490f(0x173)])===_0x2abd84);if(_0x19e4ed[_0x34490f(0x16e)]===0x1)return _0x19e4ed[0x0];const _0x2e7804=_0x2abd84[_0x34490f(0x161)]('.'),_0x38cfc8=_0x2abd84['split']('.')['at'](-0x1),_0xa4eb76=_0xcfd758[_0x34490f(0x160)](_0xd58a4b=>{const _0x29a9f7=_0x34490f,_0x5cf603=normalizeIdentifier(_0xd58a4b[_0x29a9f7(0x173)]);if(_0x2e7804&&_0x5cf603[_0x29a9f7(0x161)]('.'))return![];return _0x5cf603['split']('.')['at'](-0x1)===_0x38cfc8;});return _0xa4eb76[_0x34490f(0x16e)]===0x1?_0xa4eb76[0x0]:undefined;}function columnNamesMatch(_0x5a3354,_0x4afb1c){return normalizeIdentifier(_0x5a3354)===normalizeIdentifier(_0x4afb1c);}function normalizeIdentifier(_0x511355){const _0x5dbf68=a222_0x2ae8;return _0x511355[_0x5dbf68(0x168)](/[`"]/g,'')[_0x5dbf68(0x188)]()[_0x5dbf68(0x186)]();}function a222_0x2ae8(_0x50d0db,_0x2ad4c8){_0x50d0db=_0x50d0db-0x14f;const _0x4052c2=a222_0x4052();let _0x2ae8c6=_0x4052c2[_0x50d0db];return _0x2ae8c6;}function isSqlClauseKeyword(_0x116b2f){const _0x3167ef=a222_0x2ae8;return new Set(['on','using',_0x3167ef(0x14f),_0x3167ef(0x17c),_0x3167ef(0x167),'left',_0x3167ef(0x174),_0x3167ef(0x150),'cross',_0x3167ef(0x179)])[_0x3167ef(0x16b)](_0x116b2f);}function stripOuterParentheses(_0x37a930){const _0x467aae=a222_0x2ae8;let _0x54379d=_0x37a930[_0x467aae(0x188)]();while(_0x54379d[_0x467aae(0x15f)]('(')&&_0x54379d['endsWith'](')')){let _0x1a95cb=0x0,_0x24e384=!![];for(let _0x38d4ba=0x0;_0x38d4ba<_0x54379d[_0x467aae(0x16e)];_0x38d4ba+=0x1){if(_0x54379d[_0x38d4ba]==='(')_0x1a95cb+=0x1;if(_0x54379d[_0x38d4ba]===')')_0x1a95cb-=0x1;if(_0x1a95cb===0x0&&_0x38d4ba<_0x54379d[_0x467aae(0x16e)]-0x1){_0x24e384=![];break;}}if(!_0x24e384||_0x1a95cb!==0x0)break;_0x54379d=_0x54379d[_0x467aae(0x17b)](0x1,-0x1)[_0x467aae(0x188)]();}return _0x54379d;}
1
+ (function(_0x228adb,_0x50f56f){const _0x46bdfa=a220_0x52c2,_0x5e3cbb=_0x228adb();while(!![]){try{const _0x28f832=parseInt(_0x46bdfa(0x125))/0x1*(-parseInt(_0x46bdfa(0x13b))/0x2)+parseInt(_0x46bdfa(0x13a))/0x3+parseInt(_0x46bdfa(0x131))/0x4*(parseInt(_0x46bdfa(0x137))/0x5)+parseInt(_0x46bdfa(0x140))/0x6*(-parseInt(_0x46bdfa(0x143))/0x7)+-parseInt(_0x46bdfa(0x150))/0x8+parseInt(_0x46bdfa(0x14e))/0x9*(parseInt(_0x46bdfa(0x122))/0xa)+parseInt(_0x46bdfa(0x12f))/0xb*(parseInt(_0x46bdfa(0x112))/0xc);if(_0x28f832===_0x50f56f)break;else _0x5e3cbb['push'](_0x5e3cbb['shift']());}catch(_0x45aeb1){_0x5e3cbb['push'](_0x5e3cbb['shift']());}}}(a220_0x4ac6,0x1b54c));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';function a220_0x52c2(_0x1a3904,_0x44d07b){_0x1a3904=_0x1a3904-0x10b;const _0x4ac666=a220_0x4ac6();let _0x52c20e=_0x4ac666[_0x1a3904];return _0x52c20e;}export function auditSqlJoinIndexes(_0x5f1a0b,_0x1099b7){const _0x5e9a5a=a220_0x52c2,_0x57257b=[],_0x3f829b=normalizeSqlForStaticAnalysis(_0x5f1a0b),_0x4abd59=(_0x3f829b[_0x5e9a5a(0x111)]?[]:extractJoinFacts(_0x3f829b['sql']))[_0x5e9a5a(0x124)](_0x340a17=>{const _0x55c122=_0x5e9a5a;if(_0x340a17[_0x55c122(0x146)]||_0x340a17['columns']['length']===0x0)return _0x57257b[_0x55c122(0x13f)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17[_0x55c122(0x130)],'reason':_0x340a17[_0x55c122(0x132)]??_0x55c122(0x14a)}),{'table':_0x340a17['table'],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17[_0x55c122(0x130)],'status':'unavailable'};const _0x2d3e0f=resolveTableMetadata(_0x1099b7,_0x340a17[_0x55c122(0x148)]),_0x29de15=(_0x2d3e0f?.[_0x55c122(0x11d)]??[])[_0x55c122(0x124)](_0x1160ac=>({'index':_0x1160ac,'matchedPrefix':findEqualityPrefix(_0x1160ac[_0x55c122(0x130)],_0x340a17[_0x55c122(0x130)])}))['filter'](_0x8063bc=>_0x8063bc['matchedPrefix'][_0x55c122(0x121)]>0x0),_0x512d7e=_0x29de15['reduce']((_0x4264d3,_0x20cca6)=>!_0x4264d3||_0x20cca6[_0x55c122(0x10f)]['length']>_0x4264d3[_0x55c122(0x10f)][_0x55c122(0x121)]?_0x20cca6:_0x4264d3,_0x29de15[0x0]);if(_0x512d7e)return{'table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17['alias'],'columns':_0x340a17[_0x55c122(0x130)],'status':_0x55c122(0x11c),'matchedIndex':{..._0x512d7e[_0x55c122(0x158)],'matchedPrefix':_0x512d7e['matchedPrefix']}};const _0x2a47be=_0x2d3e0f?.['indexes'][_0x55c122(0x10e)](_0x43758d=>_0x43758d[_0x55c122(0x130)][_0x55c122(0x12e)](_0x2848e0=>_0x340a17[_0x55c122(0x130)][_0x55c122(0x12e)](_0x12838d=>columnNamesMatch(_0x2848e0,_0x12838d))))??[];if(_0x2a47be[_0x55c122(0x121)]>0x0)return _0x57257b['push']({'code':_0x55c122(0x156),'table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17[_0x55c122(0x130)],'reason':_0x55c122(0x157)}),{'table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17['columns'],'status':'warning','candidateIndexes':_0x2a47be};if(_0x2d3e0f&&_0x2d3e0f[_0x55c122(0x151)]!==![]&&_0x2d3e0f[_0x55c122(0x11d)][_0x55c122(0x121)]>0x0&&_0x340a17[_0x55c122(0x130)][_0x55c122(0x121)]>0x0)return _0x57257b[_0x55c122(0x13f)]({'code':'JOIN_INDEX_MISSING','table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17[_0x55c122(0x130)],'reason':_0x55c122(0x10c)}),{'table':_0x340a17['table'],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17['columns'],'status':_0x55c122(0x128)};return _0x57257b[_0x55c122(0x13f)]({'code':_0x55c122(0x110),'table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17[_0x55c122(0x130)],'reason':_0x2d3e0f?_0x55c122(0x12b):_0x55c122(0x144)}),{'table':_0x340a17[_0x55c122(0x148)],'alias':_0x340a17[_0x55c122(0x115)],'columns':_0x340a17[_0x55c122(0x130)],'status':_0x55c122(0x12d)};});return{'checked':_0x4abd59[_0x5e9a5a(0x121)]>0x0,'joins':_0x4abd59,'warnings':_0x57257b};}function extractJoinFacts(_0x4f85af){const _0x3f8d2c=a220_0x52c2,_0x3ed830=maskNestedQueries(stripSqlNoise(_0x4f85af)),_0x3cda9b=maskQuotedIdentifiers(_0x3ed830),_0x3dd374=[],_0x4e53bf=new Set(),_0x3ab670=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x4e53c0 of _0x3ed830[_0x3f8d2c(0x11e)](_0x3ab670)){const _0x324929=_0x4e53c0[_0x3f8d2c(0x158)]??0x0,_0x26da17=_0x4e53c0[0x0][_0x3f8d2c(0x126)](/\bJOIN\b/i),_0x4f9a58=_0x324929+Math[_0x3f8d2c(0x114)](0x0,_0x26da17);if(!/^JOIN\b/i[_0x3f8d2c(0x12c)](_0x3cda9b[_0x3f8d2c(0x147)](_0x4f9a58)))continue;_0x4e53bf[_0x3f8d2c(0x129)](_0x4f9a58);const _0x58c5aa=normalizeIdentifier(_0x4e53c0[0x1]||'INNER'),_0x381b4e=normalizeIdentifier(_0x4e53c0[0x2]??''),_0x25b70b=normalizeIdentifier(_0x4e53c0[0x3]||_0x381b4e[_0x3f8d2c(0x10b)]('.')['at'](-0x1)||_0x381b4e),_0x3cd42d=[],_0x536d02=_0x381b4e===_0x3f8d2c(0x14c);let _0x17797b=_0x58c5aa===_0x3f8d2c(0x152)||_0x58c5aa===_0x3f8d2c(0x13c)||_0x536d02,_0x6a0c78=_0x17797b?_0x536d02?_0x3f8d2c(0x136):_0x58c5aa[_0x3f8d2c(0x14b)]()+_0x3f8d2c(0x10d):undefined;const _0x41cf1f=stripOuterParentheses(_0x4e53c0[0x4]??''),_0x1ebd46=_0x41cf1f[_0x3f8d2c(0x127)](MYBATIS_DYNAMIC_START_MARKER)||_0x41cf1f[_0x3f8d2c(0x127)](MYBATIS_DYNAMIC_END_MARKER),_0x5b5fc3=_0x41cf1f[_0x3f8d2c(0x127)](MYBATIS_INCLUDE_MARKER);_0x1ebd46&&(_0x17797b=!![],_0x6a0c78??=_0x3f8d2c(0x12a));_0x5b5fc3&&(_0x17797b=!![],_0x6a0c78??=_0x3f8d2c(0x116));const _0x24b689=_0x41cf1f[_0x3f8d2c(0x11f)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x3f8d2c(0x11f)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x24b689,'OR')&&(_0x17797b=!![],_0x6a0c78??=_0x3f8d2c(0x142));for(const _0x1827c8 of splitTopLevelAnd(_0x24b689)){const _0x6d6038=stripOuterParentheses(_0x1827c8);if(hasTopLevelKeyword(_0x6d6038,'OR')){_0x17797b=!![],_0x6a0c78??=_0x3f8d2c(0x142);continue;}const _0x101eeb=splitEquality(_0x6d6038);if(!_0x101eeb){containsColumnReference(_0x1827c8,_0x25b70b)&&(_0x17797b=!![]);continue;}const _0x5eaf1a=parseDirectColumnReference(_0x101eeb[0x0],_0x25b70b),_0x59c885=parseDirectColumnReference(_0x101eeb[0x1],_0x25b70b),_0x357e7c=containsColumnReference(_0x101eeb[0x0],_0x25b70b),_0x372043=containsColumnReference(_0x101eeb[0x1],_0x25b70b),_0x11438c=_0x5eaf1a&&!_0x372043?_0x5eaf1a:_0x59c885&&!_0x357e7c?_0x59c885:null;if(_0x11438c&&!_0x3cd42d[_0x3f8d2c(0x127)](_0x11438c))_0x3cd42d[_0x3f8d2c(0x13f)](_0x11438c);else!_0x11438c&&containsColumnReference(_0x1827c8,_0x25b70b)&&(_0x17797b=!![]);}_0x3dd374['push']({'table':_0x381b4e,'alias':_0x25b70b,'columns':_0x3cd42d,'unsupportedPredicate':_0x17797b,'unsupportedReason':_0x6a0c78,'containsUnresolvedInclude':_0x5b5fc3,'position':_0x4f9a58});}for(const _0x39fd38 of _0x3cda9b[_0x3f8d2c(0x11e)](/\bJOIN\b/gi)){const _0x11f407=_0x39fd38[_0x3f8d2c(0x158)]??0x0;if(_0x4e53bf[_0x3f8d2c(0x13e)](_0x11f407))continue;const _0x4e5a7e=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x3f8d2c(0x135)](_0x3ed830[_0x3f8d2c(0x147)](_0x11f407+_0x39fd38[0x0]['length'])),_0x112e73=normalizeIdentifier(_0x4e5a7e?.[0x1]||_0x3f8d2c(0x13d)),_0x388050=normalizeIdentifier(_0x4e5a7e?.[0x2]||''),_0x57e8b2=isSqlClauseKeyword(_0x388050)?_0x112e73[_0x3f8d2c(0x10b)]('.')['at'](-0x1)||_0x112e73:_0x388050||_0x112e73[_0x3f8d2c(0x10b)]('.')['at'](-0x1)||_0x112e73;_0x3dd374[_0x3f8d2c(0x13f)]({'table':_0x112e73,'alias':_0x57e8b2,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x3f8d2c(0x113),'position':_0x11f407});}const _0x8e57ea=_0x3cda9b[_0x3f8d2c(0x11b)](MYBATIS_INCLUDE_MARKER);return _0x8e57ea>=0x0&&!_0x3dd374[_0x3f8d2c(0x12e)](_0x3ca87a=>_0x3ca87a[_0x3f8d2c(0x120)])&&_0x3dd374[_0x3f8d2c(0x13f)]({'table':_0x3f8d2c(0x13d),'alias':_0x3f8d2c(0x13d),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x3f8d2c(0x154),'containsUnresolvedInclude':!![],'position':_0x8e57ea}),_0x3dd374['sort']((_0x34136e,_0x47fc99)=>_0x34136e[_0x3f8d2c(0x14d)]-_0x47fc99[_0x3f8d2c(0x14d)]);}function stripSqlNoise(_0x31bf7e){const _0x3813e3=a220_0x52c2,_0x4d28c1=Array[_0x3813e3(0x155)](_0x31bf7e),_0x3b9df9=(_0x34dd19,_0xddf98d)=>{for(let _0x46fcc4=_0x34dd19;_0x46fcc4<_0xddf98d;_0x46fcc4+=0x1){_0x4d28c1[_0x46fcc4]!=='\x0a'&&_0x4d28c1[_0x46fcc4]!=='\x0d'&&(_0x4d28c1[_0x46fcc4]='\x20');}};for(let _0x274648=0x0;_0x274648<_0x4d28c1[_0x3813e3(0x121)];_0x274648+=0x1){const _0x54807a=_0x4d28c1[_0x274648],_0x505bd6=_0x4d28c1[_0x274648+0x1];if(_0x54807a==='\x27'||_0x54807a==='\x22'||_0x54807a==='`'){const _0x37993e=_0x54807a,_0x4309d6=_0x274648;_0x274648+=0x1;while(_0x274648<_0x4d28c1[_0x3813e3(0x121)]){if(_0x4d28c1[_0x274648]==='\x5c'&&_0x274648+0x1<_0x4d28c1['length']){_0x274648+=0x2;continue;}if(_0x4d28c1[_0x274648]!==_0x37993e){_0x274648+=0x1;continue;}if(_0x4d28c1[_0x274648+0x1]===_0x37993e){_0x274648+=0x2;continue;}break;}if(_0x37993e==='\x27')_0x3b9df9(_0x4309d6,Math[_0x3813e3(0x134)](_0x274648+0x1,_0x4d28c1[_0x3813e3(0x121)]));continue;}if(_0x54807a==='-'&&_0x505bd6==='-'){const _0xbe3e6d=_0x274648;while(_0x274648<_0x4d28c1[_0x3813e3(0x121)]&&_0x4d28c1[_0x274648]!=='\x0a')_0x274648+=0x1;_0x3b9df9(_0xbe3e6d,_0x274648);continue;}if(_0x54807a==='/'&&_0x505bd6==='*'){const _0x47c0dc=_0x274648;_0x274648+=0x2;while(_0x274648<_0x4d28c1[_0x3813e3(0x121)]&&!(_0x4d28c1[_0x274648]==='*'&&_0x4d28c1[_0x274648+0x1]==='/')){_0x274648+=0x1;}_0x274648=Math[_0x3813e3(0x134)](_0x274648+0x1,_0x4d28c1[_0x3813e3(0x121)]-0x1),_0x3b9df9(_0x47c0dc,_0x274648+0x1);continue;}if(_0x54807a==='#'&&_0x505bd6!=='{'){const _0x126b18=_0x274648;while(_0x274648<_0x4d28c1[_0x3813e3(0x121)]&&_0x4d28c1[_0x274648]!=='\x0a')_0x274648+=0x1;_0x3b9df9(_0x126b18,_0x274648);continue;}if((_0x54807a==='#'||_0x54807a==='$')&&_0x505bd6==='{'){const _0x11f274=_0x274648;_0x274648+=0x2;while(_0x274648<_0x4d28c1[_0x3813e3(0x121)]&&_0x4d28c1[_0x274648]!=='}')_0x274648+=0x1;_0x3b9df9(_0x11f274,Math[_0x3813e3(0x134)](_0x274648+0x1,_0x4d28c1[_0x3813e3(0x121)]));}}return _0x4d28c1[_0x3813e3(0x153)]('');}function maskQuotedIdentifiers(_0x17a470){const _0x41de95=a220_0x52c2,_0x2a05b6=Array[_0x41de95(0x155)](_0x17a470);for(let _0x385d30=0x0;_0x385d30<_0x2a05b6[_0x41de95(0x121)];_0x385d30+=0x1){const _0x49c143=_0x2a05b6[_0x385d30];if(_0x49c143!=='\x22'&&_0x49c143!=='`')continue;_0x385d30+=0x1;while(_0x385d30<_0x2a05b6[_0x41de95(0x121)]){if(_0x2a05b6[_0x385d30]===_0x49c143){if(_0x2a05b6[_0x385d30+0x1]===_0x49c143){_0x2a05b6[_0x385d30]='\x20',_0x2a05b6[_0x385d30+0x1]='\x20',_0x385d30+=0x2;continue;}break;}_0x2a05b6[_0x385d30]='\x20',_0x385d30+=0x1;}}return _0x2a05b6['join']('');}function maskNestedQueries(_0x202657){const _0x3dbcaa=a220_0x52c2,_0x4b89ef=Array[_0x3dbcaa(0x155)](_0x202657);for(let _0x14acbe=0x0;_0x14acbe<_0x4b89ef[_0x3dbcaa(0x121)];_0x14acbe+=0x1){if(_0x4b89ef[_0x14acbe]!=='(')continue;const _0x490212=_0x202657[_0x3dbcaa(0x147)](_0x14acbe+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x490212))continue;let _0x1b5f5e=0x1,_0x19cbbd=_0x14acbe+0x1;for(;_0x19cbbd<_0x4b89ef[_0x3dbcaa(0x121)]&&_0x1b5f5e>0x0;_0x19cbbd+=0x1){if(_0x4b89ef[_0x19cbbd]==='(')_0x1b5f5e+=0x1;if(_0x4b89ef[_0x19cbbd]===')')_0x1b5f5e-=0x1;}if(_0x1b5f5e!==0x0)continue;for(let _0x318ec8=_0x14acbe;_0x318ec8<_0x19cbbd;_0x318ec8+=0x1){_0x4b89ef[_0x318ec8]='\x20';}const _0x4bc7ff=_0x3dbcaa(0x14c);for(let _0x22f226=0x0;_0x22f226<_0x4bc7ff['length']&&_0x14acbe+_0x22f226<_0x19cbbd;_0x22f226+=0x1){_0x4b89ef[_0x14acbe+_0x22f226]=_0x4bc7ff[_0x22f226];}_0x14acbe=_0x19cbbd-0x1;}return _0x4b89ef[_0x3dbcaa(0x153)]('');}function splitTopLevelAnd(_0x1de89a){const _0x28620e=a220_0x52c2,_0x5e3818=[];let _0x2c4047=0x0,_0x1ac4b7=0x0;for(let _0x391cf2=0x0;_0x391cf2<_0x1de89a[_0x28620e(0x121)];_0x391cf2+=0x1){const _0x5036be=_0x1de89a[_0x391cf2];if(_0x5036be==='(')_0x2c4047+=0x1;if(_0x5036be===')')_0x2c4047=Math['max'](0x0,_0x2c4047-0x1);_0x2c4047===0x0&&_0x1de89a[_0x28620e(0x147)](_0x391cf2)[_0x28620e(0x123)](/^AND\b/i)&&(_0x391cf2===0x0||/\s/['test'](_0x1de89a[_0x391cf2-0x1]??''))&&(_0x5e3818[_0x28620e(0x13f)](_0x1de89a[_0x28620e(0x147)](_0x1ac4b7,_0x391cf2)['trim']()),_0x391cf2+=0x2,_0x1ac4b7=_0x391cf2+0x1);}const _0x149bb5=_0x1de89a['slice'](_0x1ac4b7)[_0x28620e(0x14f)]();if(_0x149bb5)_0x5e3818[_0x28620e(0x13f)](_0x149bb5);return _0x5e3818;}function a220_0x4ac6(){const _0x4a06b9=['inner','(?:^|[^\x5cw$])','toLowerCase','indexOf','covered','indexes','matchAll','replaceAll','containsUnresolvedInclude','length','336910zTYAEl','match','map','34660DuHJKS','search','includes','warning','add','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','test','unavailable','some','16753hOytva','columns','37028vohnEK','unsupportedReason','replace','min','exec','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','35tEfVWj','using','\x5c$&','445029xKbaHu','4llsvMn','full','unknown','has','push','157506hPjWeC','left','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','42HuVMmD','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','\x5cs*\x5c.\x5cs*[\x5cw$]+','unsupportedPredicate','slice','table','startsWith','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','toUpperCase','__sq__','position','27FqJGgd','trim','1582392sFmyLS','metadataAvailable','right','join','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','from','JOIN_INDEX_NOT_USABLE','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','index','split','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','filter','matchedPrefix','INDEX_METADATA_UNAVAILABLE','error','1752MfKZrj','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','max','alias','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','tableName'];a220_0x4ac6=function(){return _0x4a06b9;};return a220_0x4ac6();}function hasTopLevelKeyword(_0x3abd06,_0x2c6de9){const _0x15aa48=a220_0x52c2;let _0x4d2fea=0x0;for(let _0x2a8a59=0x0;_0x2a8a59<_0x3abd06[_0x15aa48(0x121)];_0x2a8a59+=0x1){const _0x68d13f=_0x3abd06[_0x2a8a59];if(_0x68d13f==='(')_0x4d2fea+=0x1;if(_0x68d13f===')')_0x4d2fea=Math['max'](0x0,_0x4d2fea-0x1);if(_0x4d2fea!==0x0)continue;const _0x26ff49=_0x3abd06[_0x15aa48(0x147)](_0x2a8a59,_0x2a8a59+_0x2c6de9['length']),_0x1420ab=_0x3abd06[_0x2a8a59-0x1]??'\x20',_0x41c047=_0x3abd06[_0x2a8a59+_0x2c6de9[_0x15aa48(0x121)]]??'\x20';if(_0x26ff49['toUpperCase']()===_0x2c6de9[_0x15aa48(0x14b)]()&&!/[\w$]/['test'](_0x1420ab)&&!/[\w$]/[_0x15aa48(0x12c)](_0x41c047))return!![];}return![];}function splitEquality(_0x499476){const _0x1fbae7=a220_0x52c2,_0x357f8a=stripOuterParentheses(_0x499476);let _0x547c0e=0x0,_0x564842;for(let _0x360b63=0x0;_0x360b63<_0x357f8a[_0x1fbae7(0x121)];_0x360b63+=0x1){const _0x104ce5=_0x357f8a[_0x360b63];if(_0x104ce5==='(')_0x547c0e+=0x1;if(_0x104ce5===')')_0x547c0e=Math[_0x1fbae7(0x114)](0x0,_0x547c0e-0x1);const _0x1021f4=_0x357f8a[_0x360b63-0x1]??'',_0x590ab1=_0x357f8a[_0x360b63+0x1]??'';if(_0x104ce5==='='&&_0x547c0e===0x0&&!/[!<>=:]/[_0x1fbae7(0x12c)](_0x1021f4)&&_0x590ab1!=='='){if(_0x564842!==undefined)return null;_0x564842=_0x360b63;}}return _0x564842===undefined?null:[_0x357f8a[_0x1fbae7(0x147)](0x0,_0x564842)[_0x1fbae7(0x14f)](),_0x357f8a[_0x1fbae7(0x147)](_0x564842+0x1)[_0x1fbae7(0x14f)]()];}function parseDirectColumnReference(_0x136c16,_0x4461ad){const _0x4eb414=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x136c16));if(!_0x4eb414)return null;if(normalizeIdentifier(_0x4eb414[0x1]??'')!==normalizeIdentifier(_0x4461ad))return null;return normalizeIdentifier(_0x4eb414[0x2]??'');}function containsColumnReference(_0x1e5156,_0x3b3914){const _0x641aa4=a220_0x52c2,_0x5a5b6e=_0x1e5156[_0x641aa4(0x133)](/[`"]/g,''),_0x4f48e2=_0x3b3914[_0x641aa4(0x133)](/[.*+?^${}()|[\]\\]/g,_0x641aa4(0x139));return new RegExp(_0x641aa4(0x119)+_0x4f48e2+_0x641aa4(0x145),'i')[_0x641aa4(0x12c)](_0x5a5b6e);}function findEqualityPrefix(_0x8ebe07,_0x499e3b){const _0xa0b2c9=a220_0x52c2,_0x20a580=new Set(_0x499e3b['map'](normalizeIdentifier)),_0x54eb72=[];for(const _0x56abf5 of _0x8ebe07){if(!_0x20a580[_0xa0b2c9(0x13e)](normalizeIdentifier(_0x56abf5)))break;_0x54eb72[_0xa0b2c9(0x13f)](_0x56abf5);}return _0x54eb72;}function resolveTableMetadata(_0x214686,_0x495016){const _0x3d6d65=a220_0x52c2,_0x32f8a8=normalizeIdentifier(_0x495016),_0x3b5423=_0x214686[_0x3d6d65(0x10e)](_0x380ffc=>normalizeIdentifier(_0x380ffc[_0x3d6d65(0x117)])===_0x32f8a8);if(_0x3b5423[_0x3d6d65(0x121)]===0x1)return _0x3b5423[0x0];const _0x4c996e=_0x32f8a8[_0x3d6d65(0x127)]('.'),_0xef0fef=_0x32f8a8[_0x3d6d65(0x10b)]('.')['at'](-0x1),_0x32c7cb=_0x214686['filter'](_0x237088=>{const _0x27fe0a=_0x3d6d65,_0x2c6324=normalizeIdentifier(_0x237088[_0x27fe0a(0x117)]);if(_0x4c996e&&_0x2c6324[_0x27fe0a(0x127)]('.'))return![];return _0x2c6324[_0x27fe0a(0x10b)]('.')['at'](-0x1)===_0xef0fef;});return _0x32c7cb[_0x3d6d65(0x121)]===0x1?_0x32c7cb[0x0]:undefined;}function columnNamesMatch(_0x52d90f,_0x34f34c){return normalizeIdentifier(_0x52d90f)===normalizeIdentifier(_0x34f34c);}function normalizeIdentifier(_0x4dbd03){const _0x4ed98f=a220_0x52c2;return _0x4dbd03['replace'](/[`"]/g,'')['trim']()[_0x4ed98f(0x11a)]();}function isSqlClauseKeyword(_0x3b914f){const _0x4120d3=a220_0x52c2;return new Set(['on',_0x4120d3(0x138),'where',_0x4120d3(0x153),_0x4120d3(0x118),_0x4120d3(0x141),_0x4120d3(0x152),_0x4120d3(0x13c),'cross','natural'])[_0x4120d3(0x13e)](_0x3b914f);}function stripOuterParentheses(_0x4b42eb){const _0x363aea=a220_0x52c2;let _0x10a09f=_0x4b42eb[_0x363aea(0x14f)]();while(_0x10a09f[_0x363aea(0x149)]('(')&&_0x10a09f['endsWith'](')')){let _0x5b28d0=0x0,_0x594ee6=!![];for(let _0x5bcba0=0x0;_0x5bcba0<_0x10a09f[_0x363aea(0x121)];_0x5bcba0+=0x1){if(_0x10a09f[_0x5bcba0]==='(')_0x5b28d0+=0x1;if(_0x10a09f[_0x5bcba0]===')')_0x5b28d0-=0x1;if(_0x5b28d0===0x0&&_0x5bcba0<_0x10a09f[_0x363aea(0x121)]-0x1){_0x594ee6=![];break;}}if(!_0x594ee6||_0x5b28d0!==0x0)break;_0x10a09f=_0x10a09f[_0x363aea(0x147)](0x1,-0x1)['trim']();}return _0x10a09f;}
@@ -1 +1 @@
1
- const a223_0x5b0774=a223_0x48a5;function a223_0x48a5(_0x289f0,_0x50c889){_0x289f0=_0x289f0-0xbe;const _0x5d0201=a223_0x5d02();let _0x48a58e=_0x5d0201[_0x289f0];return _0x48a58e;}(function(_0x3a3406,_0x50087e){const _0x25687a=a223_0x48a5,_0xe69a68=_0x3a3406();while(!![]){try{const _0x3674cb=parseInt(_0x25687a(0xc2))/0x1*(-parseInt(_0x25687a(0xc4))/0x2)+-parseInt(_0x25687a(0xc8))/0x3+-parseInt(_0x25687a(0xbe))/0x4+-parseInt(_0x25687a(0xbf))/0x5*(-parseInt(_0x25687a(0xc3))/0x6)+parseInt(_0x25687a(0xc0))/0x7+parseInt(_0x25687a(0xc9))/0x8*(-parseInt(_0x25687a(0xcc))/0x9)+-parseInt(_0x25687a(0xc7))/0xa*(-parseInt(_0x25687a(0xc6))/0xb);if(_0x3674cb===_0x50087e)break;else _0xe69a68['push'](_0xe69a68['shift']());}catch(_0x55638c){_0xe69a68['push'](_0xe69a68['shift']());}}}(a223_0x5d02,0xb89ba));function a223_0x5d02(){const _0x40e048=['2uIytll','.rabetbase','5014977NGGOZI','10opSQOP','104073RLkAUS','24QdggtG','/sql','sql.lock.json','1760751TSyYFY','2755352pNpJqG','5GuCesO','10392347aHvmex','sql-trash','454437ESegra','3483054dxNTWW'];a223_0x5d02=function(){return _0x40e048;};return a223_0x5d02();}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a223_0x5b0774(0xc5),LOCK_FILE_NAME=a223_0x5b0774(0xcb),TRASH_DIR_NAME=a223_0x5b0774(0xc1);export function loadSqlProjectConfig(_0x4600d4,_0x4a5ad7){const _0x4a0d46=a223_0x5b0774,_0x144e37=resolve(_0x4a5ad7??findProjectRootDirectory()),_0x4894ad=DOT_DIR+_0x4a0d46(0xca),_0x3c12ed=_0x4894ad+'/'+_0x4600d4;return{'projectRoot':_0x144e37,'appCode':_0x4600d4,'sqlWorkspaceRoot':_0x4894ad,'sqlRoot':_0x3c12ed,'sqlRootDir':resolve(_0x144e37,DOT_DIR,'sql',_0x4600d4),'lockFilePath':resolve(_0x144e37,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x144e37,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a221_0x386815=a221_0x2fc2;(function(_0x44f801,_0x47ff1c){const _0x560b25=a221_0x2fc2,_0xa36e3f=_0x44f801();while(!![]){try{const _0x34fac0=parseInt(_0x560b25(0x13f))/0x1*(parseInt(_0x560b25(0x140))/0x2)+-parseInt(_0x560b25(0x144))/0x3+parseInt(_0x560b25(0x13b))/0x4*(-parseInt(_0x560b25(0x142))/0x5)+-parseInt(_0x560b25(0x13a))/0x6*(parseInt(_0x560b25(0x141))/0x7)+-parseInt(_0x560b25(0x146))/0x8+parseInt(_0x560b25(0x13c))/0x9*(-parseInt(_0x560b25(0x145))/0xa)+-parseInt(_0x560b25(0x143))/0xb*(-parseInt(_0x560b25(0x139))/0xc);if(_0x34fac0===_0x47ff1c)break;else _0xa36e3f['push'](_0xa36e3f['shift']());}catch(_0x161d4f){_0xa36e3f['push'](_0xa36e3f['shift']());}}}(a221_0x4a5e,0x453ea));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a221_0x386815(0x138),LOCK_FILE_NAME=a221_0x386815(0x13d),TRASH_DIR_NAME='sql-trash';function a221_0x2fc2(_0x29cccd,_0x5e546b){_0x29cccd=_0x29cccd-0x138;const _0x4a5ef0=a221_0x4a5e();let _0x2fc2e0=_0x4a5ef0[_0x29cccd];return _0x2fc2e0;}export function loadSqlProjectConfig(_0x1b7d34,_0x4064da){const _0x31d136=a221_0x386815,_0x39fa7f=resolve(_0x4064da??findProjectRootDirectory()),_0x4db6c1=DOT_DIR+'/sql',_0x12ab3c=_0x4db6c1+'/'+_0x1b7d34;return{'projectRoot':_0x39fa7f,'appCode':_0x1b7d34,'sqlWorkspaceRoot':_0x4db6c1,'sqlRoot':_0x12ab3c,'sqlRootDir':resolve(_0x39fa7f,DOT_DIR,_0x31d136(0x13e),_0x1b7d34),'lockFilePath':resolve(_0x39fa7f,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x39fa7f,DOT_DIR,TRASH_DIR_NAME)};}function a221_0x4a5e(){const _0x5ea514=['23082GlpjnB','76qOCRwZ','9kHFeDE','sql.lock.json','sql','977JRlWty','298VdwkEL','623WzCZwc','127335LxJRug','14267RddlSe','304560vfVMMl','5138450maRFol','1878632fQooxr','.rabetbase','16788CtCMqH'];a221_0x4a5e=function(){return _0x5ea514;};return a221_0x4a5e();}
@@ -1 +1 @@
1
- (function(_0x5a723d,_0x595028){const _0x480d6f=a224_0x4287,_0x2a7b98=_0x5a723d();while(!![]){try{const _0x1f9335=parseInt(_0x480d6f(0x156))/0x1+parseInt(_0x480d6f(0x155))/0x2+-parseInt(_0x480d6f(0x162))/0x3+parseInt(_0x480d6f(0x15e))/0x4+-parseInt(_0x480d6f(0x167))/0x5*(-parseInt(_0x480d6f(0x16a))/0x6)+-parseInt(_0x480d6f(0x15c))/0x7+parseInt(_0x480d6f(0x153))/0x8*(-parseInt(_0x480d6f(0x168))/0x9);if(_0x1f9335===_0x595028)break;else _0x2a7b98['push'](_0x2a7b98['shift']());}catch(_0x483470){_0x2a7b98['push'](_0x2a7b98['shift']());}}}(a224_0x7e73,0x6e43b));import{readdir,stat}from'node:fs/promises';function a224_0x7e73(){const _0x18dc49=['dbName','push','1518891fGFeaf','sqlRootDir','dbId','isDirectory','mode','59135gEwQPL','45NptCnc','sql','354WKCJoD','slice','length','sqlCode','name','filter','code','indexOf','2167384qWcYuG','mybatisXml','1116330WKKZDh','829160yPmaba','toLowerCase','path','test','split','.xml','4403952uwONYi','replace','3426292LBysJJ','sqlName'];a224_0x7e73=function(){return _0x18dc49;};return a224_0x7e73();}import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x405ea0){const _0x744713=a224_0x4287;if(_0x405ea0==='.sql')return'sql';if(_0x405ea0===_0x744713(0x15b))return _0x744713(0x154);return undefined;}async function scanSqlFilesRecursively(_0x12a8be,_0x2ad2ee){const _0x41104d=a224_0x4287,_0x1479cb=[];try{const _0x271f96=await readdir(_0x12a8be,{'withFileTypes':!![]});for(const _0x47d7db of _0x271f96){const _0x5ed4dd=join(_0x12a8be,_0x47d7db[_0x41104d(0x16e)]);if(_0x47d7db['isDirectory']()){_0x1479cb['push'](...await scanSqlFilesRecursively(_0x5ed4dd,_0x2ad2ee));continue;}if(!_0x47d7db['isFile']())continue;const _0x282e25=extname(_0x47d7db[_0x41104d(0x16e)])[_0x41104d(0x157)](),_0x24ebcf=extensionToMode(_0x282e25);if(!_0x24ebcf)continue;const _0x3e4071=relative(_0x2ad2ee,_0x5ed4dd)[_0x41104d(0x15d)](/\\/g,'/'),_0x744a51=_0x3e4071[_0x41104d(0x15a)]('/')[_0x41104d(0x16f)](Boolean),_0x362c43=parseSqlPath(_0x744a51,_0x47d7db[_0x41104d(0x16e)],_0x282e25);if(!_0x362c43)continue;_0x1479cb[_0x41104d(0x161)]({'sqlCode':_0x362c43[_0x41104d(0x16d)],'sqlName':_0x362c43['sqlName'],'dbDirectory':_0x744a51[0x0],'filePath':_0x5ed4dd,'relativePath':_0x3e4071,'lockKey':_0x362c43[_0x41104d(0x16d)],'mode':_0x24ebcf});}}catch(_0x4235d6){if(_0x4235d6[_0x41104d(0x170)]!=='ENOENT')throw _0x4235d6;}return _0x1479cb;}export async function scanLocalSqlQueries(_0x4c8d60){const _0x59c51a=a224_0x4287;return scanSqlFilesRecursively(_0x4c8d60[_0x59c51a(0x163)],_0x4c8d60['sqlRootDir']);}export function resolveLocalSqlFilePath(_0x24d07c,_0x4361b6,_0x27ead4){const _0x1055fb=a224_0x4287,_0x424a02=_0x27ead4?.[_0x1055fb(0x158)]||(_0x27ead4?.[_0x1055fb(0x15f)]||_0x27ead4?.[_0x1055fb(0x160)]?buildSqlRelativePath(_0x4361b6,_0x27ead4?.[_0x1055fb(0x15f)],_0x27ead4?.[_0x1055fb(0x160)],_0x27ead4?.[_0x1055fb(0x166)]||_0x1055fb(0x169),_0x27ead4?.[_0x1055fb(0x164)]):buildDefaultSqlFileName(_0x4361b6,_0x27ead4?.[_0x1055fb(0x166)]||_0x1055fb(0x169)));return join(_0x24d07c[_0x1055fb(0x163)],_0x424a02);}export async function directoryExists(_0x2ba8b5){const _0x53b706=a224_0x4287;try{const _0xc1265a=await stat(_0x2ba8b5);return _0xc1265a[_0x53b706(0x165)]();}catch{return![];}}function parseSqlPath(_0x2664db,_0x24365f,_0x58eb91){const _0x2beef2=a224_0x4287,_0x44f1ea=_0x24365f[_0x2beef2(0x16b)](0x0,-_0x58eb91[_0x2beef2(0x16c)]);if(_0x2664db[_0x2beef2(0x16c)]<0x2)return null;const _0x26e984=_0x44f1ea[_0x2beef2(0x171)]('_');if(_0x26e984<=0x0||_0x26e984>=_0x44f1ea[_0x2beef2(0x16c)]-0x1)return null;const _0x2e2c04=_0x44f1ea[_0x2beef2(0x16b)](0x0,_0x26e984);if(!isLikelySqlCode(_0x2e2c04))return null;return{'sqlCode':_0x2e2c04,'sqlName':_0x44f1ea[_0x2beef2(0x16b)](_0x26e984+0x1)};}function a224_0x4287(_0x4bcdf8,_0x34024b){_0x4bcdf8=_0x4bcdf8-0x153;const _0x7e7351=a224_0x7e73();let _0x428781=_0x7e7351[_0x4bcdf8];return _0x428781;}function isLikelySqlCode(_0x20ea3f){const _0xabf6e6=a224_0x4287;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0xabf6e6(0x159)](_0x20ea3f);}
1
+ function a222_0xd670(){const _0x29ba93=['dbId','toLowerCase','4211145lpRLoa','name','isFile','length','67613610LeqBnb','mybatisXml','864391FlIRYR','push','split','indexOf','5073905FuMSHh','3418221XdPmOO','sql','slice','sqlCode','928060aOpoKq','.xml','isDirectory','dbName','mode','code','4MLLDTS','sqlName','8561AxTRgN','24VXrpOv','5112FwpHJj','sqlRootDir','filter'];a222_0xd670=function(){return _0x29ba93;};return a222_0xd670();}(function(_0x29004b,_0x8c6fd8){const _0xd076b3=a222_0x53ee,_0x3ba697=_0x29004b();while(!![]){try{const _0x93aaa5=-parseInt(_0xd076b3(0x8e))/0x1+-parseInt(_0xd076b3(0x97))/0x2+parseInt(_0xd076b3(0x93))/0x3*(-parseInt(_0xd076b3(0x9d))/0x4)+-parseInt(_0xd076b3(0x92))/0x5+-parseInt(_0xd076b3(0x83))/0x6*(parseInt(_0xd076b3(0x9f))/0x7)+-parseInt(_0xd076b3(0x82))/0x8*(parseInt(_0xd076b3(0x88))/0x9)+parseInt(_0xd076b3(0x8c))/0xa;if(_0x93aaa5===_0x8c6fd8)break;else _0x3ba697['push'](_0x3ba697['shift']());}catch(_0x236899){_0x3ba697['push'](_0x3ba697['shift']());}}}(a222_0xd670,0xcb611));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x1e47cd){const _0x58337d=a222_0x53ee;if(_0x1e47cd==='.sql')return _0x58337d(0x94);if(_0x1e47cd===_0x58337d(0x98))return _0x58337d(0x8d);return undefined;}async function scanSqlFilesRecursively(_0x32049a,_0x15a1ba){const _0x1c37c7=a222_0x53ee,_0x478d8a=[];try{const _0x344f71=await readdir(_0x32049a,{'withFileTypes':!![]});for(const _0x421347 of _0x344f71){const _0x2674b1=join(_0x32049a,_0x421347['name']);if(_0x421347[_0x1c37c7(0x99)]()){_0x478d8a[_0x1c37c7(0x8f)](...await scanSqlFilesRecursively(_0x2674b1,_0x15a1ba));continue;}if(!_0x421347[_0x1c37c7(0x8a)]())continue;const _0x59c96d=extname(_0x421347[_0x1c37c7(0x89)])[_0x1c37c7(0x87)](),_0x2ef31=extensionToMode(_0x59c96d);if(!_0x2ef31)continue;const _0x5aaf3a=relative(_0x15a1ba,_0x2674b1)['replace'](/\\/g,'/'),_0x21705c=_0x5aaf3a[_0x1c37c7(0x90)]('/')[_0x1c37c7(0x85)](Boolean),_0x4ccc5a=parseSqlPath(_0x21705c,_0x421347['name'],_0x59c96d);if(!_0x4ccc5a)continue;_0x478d8a[_0x1c37c7(0x8f)]({'sqlCode':_0x4ccc5a['sqlCode'],'sqlName':_0x4ccc5a[_0x1c37c7(0x9e)],'dbDirectory':_0x21705c[0x0],'filePath':_0x2674b1,'relativePath':_0x5aaf3a,'lockKey':_0x4ccc5a[_0x1c37c7(0x96)],'mode':_0x2ef31});}}catch(_0x210a93){if(_0x210a93[_0x1c37c7(0x9c)]!=='ENOENT')throw _0x210a93;}return _0x478d8a;}export async function scanLocalSqlQueries(_0x2ddc92){const _0x28e3e8=a222_0x53ee;return scanSqlFilesRecursively(_0x2ddc92[_0x28e3e8(0x84)],_0x2ddc92[_0x28e3e8(0x84)]);}export function resolveLocalSqlFilePath(_0x4e7379,_0x3f7f39,_0x29d902){const _0x2dccf4=a222_0x53ee,_0x5c3b5f=_0x29d902?.['path']||(_0x29d902?.[_0x2dccf4(0x9e)]||_0x29d902?.[_0x2dccf4(0x9a)]?buildSqlRelativePath(_0x3f7f39,_0x29d902?.['sqlName'],_0x29d902?.[_0x2dccf4(0x9a)],_0x29d902?.[_0x2dccf4(0x9b)]||_0x2dccf4(0x94),_0x29d902?.[_0x2dccf4(0x86)]):buildDefaultSqlFileName(_0x3f7f39,_0x29d902?.['mode']||_0x2dccf4(0x94)));return join(_0x4e7379[_0x2dccf4(0x84)],_0x5c3b5f);}export async function directoryExists(_0x18f382){const _0x2b1ea4=a222_0x53ee;try{const _0x698745=await stat(_0x18f382);return _0x698745[_0x2b1ea4(0x99)]();}catch{return![];}}function a222_0x53ee(_0x36ccea,_0x22002a){_0x36ccea=_0x36ccea-0x82;const _0xd6700a=a222_0xd670();let _0x53ee13=_0xd6700a[_0x36ccea];return _0x53ee13;}function parseSqlPath(_0x479f8c,_0x3d5dbf,_0x212078){const _0x5620bf=a222_0x53ee,_0x56ec1f=_0x3d5dbf[_0x5620bf(0x95)](0x0,-_0x212078[_0x5620bf(0x8b)]);if(_0x479f8c[_0x5620bf(0x8b)]<0x2)return null;const _0xb909f7=_0x56ec1f[_0x5620bf(0x91)]('_');if(_0xb909f7<=0x0||_0xb909f7>=_0x56ec1f['length']-0x1)return null;const _0x5e2d55=_0x56ec1f[_0x5620bf(0x95)](0x0,_0xb909f7);if(!isLikelySqlCode(_0x5e2d55))return null;return{'sqlCode':_0x5e2d55,'sqlName':_0x56ec1f[_0x5620bf(0x95)](_0xb909f7+0x1)};}function isLikelySqlCode(_0x2cf03f){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0x2cf03f);}
@@ -1 +1 @@
1
- (function(_0x7d50c9,_0x1e6427){const _0x260d2c=a225_0x52c7,_0x35c8fc=_0x7d50c9();while(!![]){try{const _0x1a633a=-parseInt(_0x260d2c(0xdf))/0x1*(-parseInt(_0x260d2c(0xde))/0x2)+-parseInt(_0x260d2c(0xe3))/0x3+parseInt(_0x260d2c(0xdb))/0x4+parseInt(_0x260d2c(0xe6))/0x5*(parseInt(_0x260d2c(0xe9))/0x6)+-parseInt(_0x260d2c(0xe0))/0x7*(-parseInt(_0x260d2c(0xe8))/0x8)+-parseInt(_0x260d2c(0xe2))/0x9+-parseInt(_0x260d2c(0xea))/0xa*(parseInt(_0x260d2c(0xdd))/0xb);if(_0x1a633a===_0x1e6427)break;else _0x35c8fc['push'](_0x35c8fc['shift']());}catch(_0x4021ac){_0x35c8fc['push'](_0x35c8fc['shift']());}}}(a225_0x1eb4,0x2e273));function a225_0x1eb4(){const _0x597ee0=['update','1713240FcxjjB','135642rKjuau','md5','hex','298365JXcfgG','createHash','416bfzhuD','18AwaNXT','750XawItU','103276sMSxUL','utf8','10109BgpXai','43592HgvTyH','13AoQvce','721kqcvyL'];a225_0x1eb4=function(){return _0x597ee0;};return a225_0x1eb4();}import{readFile}from'node:fs/promises';import a225_0x5ebaf5 from'node:crypto';export function computeSqlContentHash(_0x5e861e){const _0x3fd26f=a225_0x52c7;return a225_0x5ebaf5[_0x3fd26f(0xe7)](_0x3fd26f(0xe4))[_0x3fd26f(0xe1)](_0x5e861e)['digest'](_0x3fd26f(0xe5));}function a225_0x52c7(_0x3f2c25,_0x46642f){_0x3f2c25=_0x3f2c25-0xdb;const _0x1eb4ea=a225_0x1eb4();let _0x52c78f=_0x1eb4ea[_0x3f2c25];return _0x52c78f;}export async function computeSqlFileHash(_0x13ceaa){const _0x711384=a225_0x52c7,_0x3b3c78=await readFile(_0x13ceaa,_0x711384(0xdc));return computeSqlContentHash(_0x3b3c78);}
1
+ function a223_0x23d3(){const _0x550d2c=['28nAREAI','createHash','md5','344960AbfyUx','285900YTPHWr','update','179985ElTqvF','4MCqxHb','1882600KxPllu','16gYsuHx','1122201GzcOPU','utf8','digest','704465ezXweF','22934zjycgO'];a223_0x23d3=function(){return _0x550d2c;};return a223_0x23d3();}function a223_0x22fd(_0x1d8a51,_0x32f8e2){_0x1d8a51=_0x1d8a51-0x111;const _0x23d370=a223_0x23d3();let _0x22fd95=_0x23d370[_0x1d8a51];return _0x22fd95;}(function(_0x275f69,_0x5eb046){const _0x4d9f37=a223_0x22fd,_0x278223=_0x275f69();while(!![]){try{const _0x572b13=parseInt(_0x4d9f37(0x11b))/0x1*(-parseInt(_0x4d9f37(0x111))/0x2)+parseInt(_0x4d9f37(0x118))/0x3+parseInt(_0x4d9f37(0x119))/0x4*(parseInt(_0x4d9f37(0x11f))/0x5)+-parseInt(_0x4d9f37(0x116))/0x6*(-parseInt(_0x4d9f37(0x112))/0x7)+-parseInt(_0x4d9f37(0x115))/0x8+parseInt(_0x4d9f37(0x11c))/0x9+-parseInt(_0x4d9f37(0x11a))/0xa;if(_0x572b13===_0x5eb046)break;else _0x278223['push'](_0x278223['shift']());}catch(_0x49ecf6){_0x278223['push'](_0x278223['shift']());}}}(a223_0x23d3,0x18bcd));import{readFile}from'node:fs/promises';import a223_0x249d29 from'node:crypto';export function computeSqlContentHash(_0x5cd616){const _0x539bc4=a223_0x22fd;return a223_0x249d29[_0x539bc4(0x113)](_0x539bc4(0x114))[_0x539bc4(0x117)](_0x5cd616)[_0x539bc4(0x11e)]('hex');}export async function computeSqlFileHash(_0x2dd208){const _0x120e28=a223_0x22fd,_0x4a5130=await readFile(_0x2dd208,_0x120e28(0x11d));return computeSqlContentHash(_0x4a5130);}
@@ -1 +1 @@
1
- function a226_0x18b6(){const _0x45572b=['780905lMMQAh','37MsNOxK','\x22.\x20','1710291dwJEKX','1242928sbjAMa','code','utf8','sqls','28hrWAQr','9227280zahnEx','apps','9mLYGfz','7158642nxkJxb','ENOENT',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','parse','sqlRoot','85718bjzBrH','lastSync','stringify','49UqDAXt','524557jGsRQt'];a226_0x18b6=function(){return _0x45572b;};return a226_0x18b6();}function a226_0x4208(_0x1bece6,_0xc2dd72){_0x1bece6=_0x1bece6-0x96;const _0x18b61b=a226_0x18b6();let _0x42084e=_0x18b61b[_0x1bece6];return _0x42084e;}(function(_0x6a9256,_0x52fa28){const _0x59333e=a226_0x4208,_0x250bb9=_0x6a9256();while(!![]){try{const _0x3215d3=parseInt(_0x59333e(0x99))/0x1*(parseInt(_0x59333e(0xa9))/0x2)+-parseInt(_0x59333e(0x9b))/0x3+parseInt(_0x59333e(0xa0))/0x4*(parseInt(_0x59333e(0x98))/0x5)+-parseInt(_0x59333e(0xa4))/0x6+-parseInt(_0x59333e(0x96))/0x7*(parseInt(_0x59333e(0x9c))/0x8)+parseInt(_0x59333e(0xa3))/0x9*(parseInt(_0x59333e(0xa1))/0xa)+parseInt(_0x59333e(0x97))/0xb;if(_0x3215d3===_0x52fa28)break;else _0x250bb9['push'](_0x250bb9['shift']());}catch(_0x557124){_0x250bb9['push'](_0x250bb9['shift']());}}}(a226_0x18b6,0xc2feb));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x22ad94,_0x4c0c56,_0x8c3777,_0x489a93){const _0x1a53aa=a226_0x4208,_0x4a1dc4=_0x22ad94??createEmptySqlLock();let _0x130a8e=_0x4a1dc4[_0x1a53aa(0xa2)][_0x4c0c56];if(!_0x130a8e)return _0x130a8e={'sqlRoot':_0x8c3777,'lastSync':'','sqls':{}},_0x4a1dc4[_0x1a53aa(0xa2)][_0x4c0c56]=_0x130a8e,{'lockData':_0x4a1dc4,'appLock':_0x130a8e};if(!_0x130a8e[_0x1a53aa(0xa8)])_0x130a8e[_0x1a53aa(0xa8)]=_0x8c3777;else{if(_0x130a8e[_0x1a53aa(0xa8)]!==_0x8c3777)throw new Error(_0x489a93+_0x1a53aa(0xa6)+_0x8c3777+'\x22\x20vs\x20lock\x20\x22'+_0x130a8e[_0x1a53aa(0xa8)]+_0x1a53aa(0x9a)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x130a8e[_0x1a53aa(0x9f)]&&(_0x130a8e[_0x1a53aa(0x9f)]={}),!_0x130a8e['lastSync']&&(_0x130a8e[_0x1a53aa(0xaa)]=''),{'lockData':_0x4a1dc4,'appLock':_0x130a8e};}export async function readSqlLockFile(_0x10d6cf){const _0xac76d2=a226_0x4208;try{const _0x360485=await readFile(_0x10d6cf,_0xac76d2(0x9e));return JSON[_0xac76d2(0xa7)](_0x360485);}catch(_0x56ce1c){if(_0x56ce1c[_0xac76d2(0x9d)]===_0xac76d2(0xa5))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x56ce1c));}}export async function writeSqlLockFile(_0x403ed2,_0x4d431e){const _0x14a14f=a226_0x4208;await mkdir(dirname(_0x403ed2),{'recursive':!![]}),await writeFile(_0x403ed2,JSON[_0x14a14f(0xab)](_0x4d431e,null,0x2),_0x14a14f(0x9e));}
1
+ (function(_0x9d7b89,_0x4655c8){const _0x53ddc8=a224_0x1814,_0x4971b9=_0x9d7b89();while(!![]){try{const _0x1d9632=parseInt(_0x53ddc8(0x1e7))/0x1*(parseInt(_0x53ddc8(0x1e8))/0x2)+-parseInt(_0x53ddc8(0x1f1))/0x3+parseInt(_0x53ddc8(0x1ee))/0x4*(parseInt(_0x53ddc8(0x1e4))/0x5)+-parseInt(_0x53ddc8(0x1ea))/0x6*(-parseInt(_0x53ddc8(0x1de))/0x7)+-parseInt(_0x53ddc8(0x1ec))/0x8+-parseInt(_0x53ddc8(0x1e9))/0x9*(-parseInt(_0x53ddc8(0x1df))/0xa)+parseInt(_0x53ddc8(0x1dd))/0xb;if(_0x1d9632===_0x4655c8)break;else _0x4971b9['push'](_0x4971b9['shift']());}catch(_0xe58e5d){_0x4971b9['push'](_0x4971b9['shift']());}}}(a224_0x3042,0x43c9a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a224_0x3042(){const _0x40908d=['ENOENT','156ASNRtr','sqlRoot','utf8','931950kvikpr','\x22\x20vs\x20lock\x20\x22','5228113ndzZkX','4235cMuGLb','149620HePgxR','\x22.\x20','lastSync','code','sqls','3935zMVRmI','apps','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','38657RriNwc','22PcHTCe','18Ybbjga','42WmaTTX','stringify','3016432jTheFu'];a224_0x3042=function(){return _0x40908d;};return a224_0x3042();}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x49fe0c,_0xcd8726,_0x318738,_0x4e0731){const _0xa28e59=a224_0x1814,_0x2a6297=_0x49fe0c??createEmptySqlLock();let _0x567c1c=_0x2a6297[_0xa28e59(0x1e5)][_0xcd8726];if(!_0x567c1c)return _0x567c1c={'sqlRoot':_0x318738,'lastSync':'','sqls':{}},_0x2a6297[_0xa28e59(0x1e5)][_0xcd8726]=_0x567c1c,{'lockData':_0x2a6297,'appLock':_0x567c1c};if(!_0x567c1c[_0xa28e59(0x1ef)])_0x567c1c[_0xa28e59(0x1ef)]=_0x318738;else{if(_0x567c1c[_0xa28e59(0x1ef)]!==_0x318738)throw new Error(_0x4e0731+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x318738+_0xa28e59(0x1f2)+_0x567c1c[_0xa28e59(0x1ef)]+_0xa28e59(0x1e0)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x567c1c[_0xa28e59(0x1e3)]&&(_0x567c1c['sqls']={}),!_0x567c1c[_0xa28e59(0x1e1)]&&(_0x567c1c[_0xa28e59(0x1e1)]=''),{'lockData':_0x2a6297,'appLock':_0x567c1c};}export async function readSqlLockFile(_0x179171){const _0x34ec01=a224_0x1814;try{const _0x313193=await readFile(_0x179171,_0x34ec01(0x1f0));return JSON['parse'](_0x313193);}catch(_0x1ba4a8){if(_0x1ba4a8[_0x34ec01(0x1e2)]===_0x34ec01(0x1ed))return null;throw new Error(_0x34ec01(0x1e6)+String(_0x1ba4a8));}}function a224_0x1814(_0x492b1c,_0x2f8293){_0x492b1c=_0x492b1c-0x1dd;const _0x3042f7=a224_0x3042();let _0x18148f=_0x3042f7[_0x492b1c];return _0x18148f;}export async function writeSqlLockFile(_0xda8eab,_0x34492b){const _0x1cc078=a224_0x1814;await mkdir(dirname(_0xda8eab),{'recursive':!![]}),await writeFile(_0xda8eab,JSON[_0x1cc078(0x1eb)](_0x34492b,null,0x2),_0x1cc078(0x1f0));}
@@ -1 +1 @@
1
- function a228_0x53de(){const _0x3c048c=['.sql','1188260rsYxgh','35736RaQstv','mybatisXml','764463nGQELf','9236899TyUvEL','test','16pmkNDA','63408PRlZtV','sql','2718cLIXJj','495OrECPm','4EItZpG','122323PSHDxJ','replace','4663879wMIHYl','12lXnLFW'];a228_0x53de=function(){return _0x3c048c;};return a228_0x53de();}(function(_0x30b162,_0x1702b6){const _0x195382=a228_0x900c,_0x43951a=_0x30b162();while(!![]){try{const _0x31bf95=parseInt(_0x195382(0x198))/0x1*(-parseInt(_0x195382(0x1a3))/0x2)+-parseInt(_0x195382(0x1a0))/0x3*(-parseInt(_0x195382(0x197))/0x4)+-parseInt(_0x195382(0x196))/0x5*(-parseInt(_0x195382(0x193))/0x6)+parseInt(_0x195382(0x1a1))/0x7+parseInt(_0x195382(0x19e))/0x8*(-parseInt(_0x195382(0x195))/0x9)+parseInt(_0x195382(0x19d))/0xa+-parseInt(_0x195382(0x19a))/0xb*(-parseInt(_0x195382(0x19b))/0xc);if(_0x31bf95===_0x1702b6)break;else _0x43951a['push'](_0x43951a['shift']());}catch(_0x5acbe7){_0x43951a['push'](_0x43951a['shift']());}}}(a228_0x53de,0xcc0df));export function detectSqlMode(_0x4c63d0){const _0x158304=a228_0x900c,_0x1b8534=_0x4c63d0['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0x158304(0x1a2)](_0x1b8534))return'mybatisXml';return _0x158304(0x194);}export function getSqlFileExtension(_0x3edbf3){const _0x15445f=a228_0x900c;return _0x3edbf3===_0x15445f(0x19f)?'.xml':_0x15445f(0x19c);}function a228_0x900c(_0x5b6ac2,_0x3b905d){_0x5b6ac2=_0x5b6ac2-0x193;const _0x53de9f=a228_0x53de();let _0x900ccb=_0x53de9f[_0x5b6ac2];return _0x900ccb;}export function buildDefaultSqlFileName(_0x3a6a36,_0x4b2735){return''+_0x3a6a36+getSqlFileExtension(_0x4b2735);}export function sanitizeSqlPathSegment(_0x39f0db,_0x265b85){const _0xe76f1c=a228_0x900c,_0x1f3e55=String(_0x39f0db??'')['trim'](),_0x47bdc8=_0x1f3e55['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0xe76f1c(0x199)](/\s+/g,'-')[_0xe76f1c(0x199)](/-+/g,'-')['replace'](/^\.+/,'')[_0xe76f1c(0x199)](/\.+$/,'')['replace'](/^-+/,'')[_0xe76f1c(0x199)](/-+$/,'');return _0x47bdc8||_0x265b85;}export function buildDbDirectoryName(_0xdf55f6,_0x32d5e9){return sanitizeSqlPathSegment(_0xdf55f6,_0x32d5e9!=null?'db-'+_0x32d5e9:'unknown-db');}export function buildSqlRelativePath(_0x7124b,_0x44fec6,_0xb4a286,_0x1787ff,_0x1fa070){const _0xf0cc5e=buildDbDirectoryName(_0xb4a286,_0x1fa070),_0x10ad52=sanitizeSqlPathSegment(_0x7124b,'unknown-sql'),_0x4dcb17=sanitizeSqlPathSegment(_0x44fec6,_0x10ad52);return _0xf0cc5e+'/'+_0x10ad52+'_'+_0x4dcb17+getSqlFileExtension(_0x1787ff);}
1
+ function a226_0x5e3f(){const _0x551c40=['.xml','2268440gQenPm','18158uedtyw','3600333JnUheH','.sql','db-','unknown-db','7526136artsIK','5nORSGa','9853fslglW','51PPdYBl','1019910YXoHZd','sql','replace','3232zuSZFM','mybatisXml','239828OOGLWs','20hhRUfw','44CUBePD','trim'];a226_0x5e3f=function(){return _0x551c40;};return a226_0x5e3f();}(function(_0x48f66f,_0x32e287){const _0x12ef00=a226_0x310a,_0x58ae3a=_0x48f66f();while(!![]){try{const _0x406081=parseInt(_0x12ef00(0x93))/0x1*(parseInt(_0x12ef00(0x87))/0x2)+-parseInt(_0x12ef00(0x94))/0x3*(parseInt(_0x12ef00(0x86))/0x4)+-parseInt(_0x12ef00(0x92))/0x5*(parseInt(_0x12ef00(0x95))/0x6)+parseInt(_0x12ef00(0x8c))/0x7*(-parseInt(_0x12ef00(0x84))/0x8)+parseInt(_0x12ef00(0x8d))/0x9+-parseInt(_0x12ef00(0x8b))/0xa+parseInt(_0x12ef00(0x88))/0xb*(parseInt(_0x12ef00(0x91))/0xc);if(_0x406081===_0x32e287)break;else _0x58ae3a['push'](_0x58ae3a['shift']());}catch(_0x30baf3){_0x58ae3a['push'](_0x58ae3a['shift']());}}}(a226_0x5e3f,0x849e5));function a226_0x310a(_0x378974,_0x5c73b8){_0x378974=_0x378974-0x84;const _0x5e3f77=a226_0x5e3f();let _0x310a00=_0x5e3f77[_0x378974];return _0x310a00;}export function detectSqlMode(_0x4a33b2){const _0x55ce84=a226_0x310a,_0x2eb3af=_0x4a33b2['trimStart']();if(/^<(select|insert|update|delete)\b/i['test'](_0x2eb3af))return _0x55ce84(0x85);return _0x55ce84(0x96);}export function getSqlFileExtension(_0x26af0d){const _0x473675=a226_0x310a;return _0x26af0d===_0x473675(0x85)?_0x473675(0x8a):_0x473675(0x8e);}export function buildDefaultSqlFileName(_0xea0b2,_0x3f8bd7){return''+_0xea0b2+getSqlFileExtension(_0x3f8bd7);}export function sanitizeSqlPathSegment(_0x2f1b33,_0x2e0743){const _0x5cf864=a226_0x310a,_0x3de552=String(_0x2f1b33??'')[_0x5cf864(0x89)](),_0x29d37a=_0x3de552[_0x5cf864(0x97)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x5cf864(0x97)](/\s+/g,'-')[_0x5cf864(0x97)](/-+/g,'-')[_0x5cf864(0x97)](/^\.+/,'')[_0x5cf864(0x97)](/\.+$/,'')['replace'](/^-+/,'')[_0x5cf864(0x97)](/-+$/,'');return _0x29d37a||_0x2e0743;}export function buildDbDirectoryName(_0x678d74,_0x1921f3){const _0x3b2556=a226_0x310a;return sanitizeSqlPathSegment(_0x678d74,_0x1921f3!=null?_0x3b2556(0x8f)+_0x1921f3:_0x3b2556(0x90));}export function buildSqlRelativePath(_0x38356f,_0x229b78,_0x8981e4,_0x1f299c,_0x5139bd){const _0x52ba2b=buildDbDirectoryName(_0x8981e4,_0x5139bd),_0x14c8da=sanitizeSqlPathSegment(_0x38356f,'unknown-sql'),_0x3c9299=sanitizeSqlPathSegment(_0x229b78,_0x14c8da);return _0x52ba2b+'/'+_0x14c8da+'_'+_0x3c9299+getSqlFileExtension(_0x1f299c);}
@@ -1 +1 @@
1
- const a229_0x3e8915=a229_0x241d;(function(_0x3fb267,_0xc3d378){const _0x181044=a229_0x241d,_0xd5242b=_0x3fb267();while(!![]){try{const _0x49beda=parseInt(_0x181044(0x15a))/0x1*(-parseInt(_0x181044(0x193))/0x2)+parseInt(_0x181044(0x181))/0x3+-parseInt(_0x181044(0x136))/0x4*(parseInt(_0x181044(0x165))/0x5)+parseInt(_0x181044(0x172))/0x6*(-parseInt(_0x181044(0x166))/0x7)+-parseInt(_0x181044(0x153))/0x8*(parseInt(_0x181044(0x182))/0x9)+parseInt(_0x181044(0x150))/0xa+parseInt(_0x181044(0x176))/0xb;if(_0x49beda===_0xc3d378)break;else _0xd5242b['push'](_0xd5242b['shift']());}catch(_0x54c8a6){_0xd5242b['push'](_0xd5242b['shift']());}}}(a229_0xb35c,0xe29e4));const MYBATIS_OUTER_TAGS=new Map([[a229_0x3e8915(0x141),'SELECT'],[a229_0x3e8915(0x155),'INSERT'],['update',a229_0x3e8915(0x173)],[a229_0x3e8915(0x175),a229_0x3e8915(0x14f)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a229_0x3e8915(0x135),a229_0x3e8915(0x163),a229_0x3e8915(0x170),a229_0x3e8915(0x146),a229_0x3e8915(0x16d),a229_0x3e8915(0x15f),a229_0x3e8915(0x162),a229_0x3e8915(0x160),a229_0x3e8915(0x13d),a229_0x3e8915(0x149)]),MYBATIS_BRANCH_TAGS=new Set(['if',a229_0x3e8915(0x163),'choose',a229_0x3e8915(0x146),a229_0x3e8915(0x16d)]);export const MYBATIS_DYNAMIC_START_MARKER=a229_0x3e8915(0x18d);export const MYBATIS_DYNAMIC_END_MARKER=a229_0x3e8915(0x194);export const MYBATIS_INCLUDE_MARKER=a229_0x3e8915(0x140);function a229_0x241d(_0x3e5c5c,_0x327c77){_0x3e5c5c=_0x3e5c5c-0x133;const _0xb35c1=a229_0xb35c();let _0x241dee=_0xb35c1[_0x3e5c5c];return _0x241dee;}const UNRESOLVED_SQL_FRAGMENT=a229_0x3e8915(0x142),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a229_0x3e8915(0x14a)+[...MYBATIS_OUTER_TAGS[a229_0x3e8915(0x13a)]()][a229_0x3e8915(0x159)]('|')+a229_0x3e8915(0x13f),'i');export function normalizeSqlForStaticAnalysis(_0x2529b7){const _0x2b1dad=a229_0x3e8915,_0x5b4620=typeof _0x2529b7===_0x2b1dad(0x16a)?_0x2529b7:'';if(!startsWithMybatisStatementWrapper(_0x5b4620))return{'sql':_0x5b4620,'mode':_0x2b1dad(0x184)};let _0x2cacff=0x0,_0x1c0591='',_0x33a8da,_0x41a1e5=![],_0x340b11=![];const _0x5e76ae=[];while(_0x2cacff<_0x5b4620[_0x2b1dad(0x147)]){if(_0x5b4620[_0x2b1dad(0x183)](_0x2b1dad(0x13b),_0x2cacff)){const _0x113b88=_0x5b4620[_0x2b1dad(0x13e)](_0x2b1dad(0x180),_0x2cacff+0x4);if(_0x113b88<0x0)return invalidMybatisSource(_0x2b1dad(0x18b));_0x1c0591+='\x20',_0x2cacff=_0x113b88+0x3;continue;}if(_0x5b4620[_0x2b1dad(0x183)](_0x2b1dad(0x145),_0x2cacff)){if(!_0x41a1e5||_0x340b11)return invalidMybatisSource('CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x506f3d=_0x5b4620[_0x2b1dad(0x13e)](_0x2b1dad(0x14c),_0x2cacff+0x9);if(_0x506f3d<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x1c0591+=_0x5b4620[_0x2b1dad(0x143)](_0x2cacff+0x9,_0x506f3d),_0x2cacff=_0x506f3d+0x3;continue;}if(_0x5b4620['startsWith']('<?',_0x2cacff)){if(_0x41a1e5)return invalidMybatisSource(_0x2b1dad(0x161));const _0x42b151=_0x5b4620[_0x2b1dad(0x13e)]('?>',_0x2cacff+0x2);if(_0x42b151<0x0)return invalidMybatisSource(_0x2b1dad(0x15d));_0x1c0591+='\x20',_0x2cacff=_0x42b151+0x2;continue;}if(_0x5b4620[_0x2cacff]!=='<'){const _0x47452a=_0x5b4620['indexOf']('<',_0x2cacff),_0x3852b9=_0x47452a<0x0?_0x5b4620[_0x2b1dad(0x147)]:_0x47452a,_0x4508f0=_0x5b4620[_0x2b1dad(0x143)](_0x2cacff,_0x3852b9);if((!_0x41a1e5||_0x340b11)&&_0x4508f0[_0x2b1dad(0x15f)]())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x41a1e5&&!_0x340b11){const _0x2c6636=decodeXmlEntities(_0x4508f0);if(_0x2c6636===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x1c0591+=_0x2c6636;}else _0x1c0591+='\x20';_0x2cacff=_0x3852b9;continue;}const _0x4fba24=findXmlTagEnd(_0x5b4620,_0x2cacff);if(_0x4fba24<0x0)return invalidMybatisSource(_0x2b1dad(0x148));const _0x184bc5=_0x5b4620[_0x2b1dad(0x143)](_0x2cacff,_0x4fba24+0x1),_0x35ac77=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x2b1dad(0x17c)](_0x184bc5);if(!_0x35ac77)return invalidMybatisSource(_0x2b1dad(0x192));const _0x33ed2b=_0x35ac77[0x1]==='/',_0x51e369=_0x35ac77[0x2]??'',_0x4b097c=_0x51e369[_0x2b1dad(0x17d)](),_0x54aae6=_0x35ac77[0x3]??'',_0x7de2ba=_0x35ac77[0x4]==='/',_0x5d86be=MYBATIS_OUTER_TAGS[_0x2b1dad(0x168)](_0x4b097c);if(!_0x5d86be&&!MYBATIS_DYNAMIC_TAGS['has'](_0x4b097c))return invalidMybatisSource('Unsupported\x20MyBatis\x20XML\x20tag:\x20<'+_0x4b097c+'>.');if(!_0x5d86be&&_0x51e369!==_0x4b097c)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x51e369+'>.');if(_0x33ed2b){if(_0x54aae6[_0x2b1dad(0x15f)]()||_0x7de2ba)return invalidMybatisSource(_0x2b1dad(0x18e)+_0x51e369+'>.');const _0x197b80=_0x5e76ae['at'](-0x1);if(!_0x197b80||(_0x197b80[_0x2b1dad(0x14e)]?_0x197b80[_0x2b1dad(0x156)]!==_0x4b097c:_0x197b80[_0x2b1dad(0x179)]!==_0x51e369))return invalidMybatisSource(_0x2b1dad(0x18a)+_0x51e369+'>.');_0x5e76ae[_0x2b1dad(0x17b)]();if(_0x197b80[_0x2b1dad(0x14e)])_0x340b11=!![];_0x1c0591+=MYBATIS_BRANCH_TAGS[_0x2b1dad(0x151)](_0x4b097c)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x54aae6))return invalidMybatisSource(_0x2b1dad(0x144)+_0x51e369+'>.');if(_0x4b097c===_0x2b1dad(0x149)&&(!_0x7de2ba||_0x5e76ae['at'](-0x1)?.['tagName']!=='include'))return invalidMybatisSource(_0x2b1dad(0x174));if(_0x5d86be){if(_0x41a1e5||_0x5e76ae[_0x2b1dad(0x147)]>0x0)return invalidMybatisSource(_0x2b1dad(0x15b));_0x41a1e5=!![],_0x340b11=_0x7de2ba,_0x33a8da=_0x5d86be;}else{if(!_0x41a1e5||_0x340b11)return invalidMybatisSource(_0x2b1dad(0x186)+_0x51e369+'>.');}_0x1c0591+=_0x4b097c===_0x2b1dad(0x135)?_0x2b1dad(0x16f):_0x4b097c==='set'?_0x2b1dad(0x178):_0x4b097c===_0x2b1dad(0x13d)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x2b1dad(0x151)](_0x4b097c)&&!_0x7de2ba?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x7de2ba&&_0x5e76ae['push']({'rawName':_0x51e369,'tagName':_0x4b097c,'outer':!!_0x5d86be});}_0x2cacff=_0x4fba24+0x1;}if(_0x5e76ae[_0x2b1dad(0x147)]>0x0)return invalidMybatisSource(_0x2b1dad(0x187)+_0x5e76ae['at'](-0x1)?.[_0x2b1dad(0x179)]+'>.');if(!_0x41a1e5||!_0x340b11)return invalidMybatisSource(_0x2b1dad(0x154));return{'sql':_0x1c0591[_0x2b1dad(0x15f)](),'mode':_0x2b1dad(0x138),..._0x33a8da?{'statementType':_0x33a8da}:{}};}function hasWellFormedXmlAttributes(_0x5a0343){const _0x5e1b0e=a229_0x3e8915;let _0x49d15f=0x0;const _0x57af68=new Set();while(_0x49d15f<_0x5a0343['length']){while(_0x49d15f<_0x5a0343['length']&&/\s/[_0x5e1b0e(0x137)](_0x5a0343[_0x49d15f]??''))_0x49d15f+=0x1;if(_0x49d15f>=_0x5a0343[_0x5e1b0e(0x147)])return!![];const _0x546e1f=/^[A-Za-z_:][\w:.-]*/[_0x5e1b0e(0x17c)](_0x5a0343[_0x5e1b0e(0x143)](_0x49d15f)),_0x5a0a5e=_0x546e1f?.[0x0];if(!_0x5a0a5e||_0x57af68[_0x5e1b0e(0x151)](_0x5a0a5e))return![];_0x57af68[_0x5e1b0e(0x16c)](_0x5a0a5e),_0x49d15f+=_0x5a0a5e['length'];while(_0x49d15f<_0x5a0343[_0x5e1b0e(0x147)]&&/\s/['test'](_0x5a0343[_0x49d15f]??''))_0x49d15f+=0x1;if(_0x5a0343[_0x49d15f]!=='=')return![];_0x49d15f+=0x1;while(_0x49d15f<_0x5a0343[_0x5e1b0e(0x147)]&&/\s/[_0x5e1b0e(0x137)](_0x5a0343[_0x49d15f]??''))_0x49d15f+=0x1;const _0x22e503=_0x5a0343[_0x49d15f];if(_0x22e503!=='\x22'&&_0x22e503!=='\x27')return![];_0x49d15f+=0x1;const _0x361755=_0x5a0343[_0x5e1b0e(0x13e)](_0x22e503,_0x49d15f);if(_0x361755<0x0)return![];if(decodeXmlEntities(_0x5a0343[_0x5e1b0e(0x143)](_0x49d15f,_0x361755))===null)return![];_0x49d15f=_0x361755+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x72ab8){const _0x2019b5=a229_0x3e8915;let _0x150f1f=0x0;const _0x213edf=()=>{const _0x83e46c=a229_0x241d;while(_0x150f1f<_0x72ab8[_0x83e46c(0x147)]&&/\s/[_0x83e46c(0x137)](_0x72ab8[_0x150f1f]??''))_0x150f1f+=0x1;};_0x213edf();while(_0x150f1f<_0x72ab8[_0x2019b5(0x147)]){if(_0x72ab8[_0x2019b5(0x183)](_0x2019b5(0x13b),_0x150f1f)){const _0x1e1cac=_0x72ab8['indexOf']('-->',_0x150f1f+0x4);if(_0x1e1cac<0x0)return!![];_0x150f1f=_0x1e1cac+0x3,_0x213edf();continue;}if(_0x72ab8['startsWith']('<?',_0x150f1f)){const _0xeb8049=_0x72ab8[_0x2019b5(0x13e)]('?>',_0x150f1f+0x2);if(_0xeb8049<0x0)return!![];_0x150f1f=_0xeb8049+0x2,_0x213edf();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x2019b5(0x137)](_0x72ab8[_0x2019b5(0x143)](_0x150f1f));}function invalidMybatisSource(_0x3f8fac){const _0x5ef5cd=a229_0x3e8915;return{'sql':'','mode':_0x5ef5cd(0x138),'error':_0x3f8fac};}function findXmlTagEnd(_0xc1c894,_0x21ab65){let _0x3eb3d5;for(let _0x2a95cb=_0x21ab65+0x1;_0x2a95cb<_0xc1c894['length'];_0x2a95cb+=0x1){const _0x2e4122=_0xc1c894[_0x2a95cb];if(_0x3eb3d5){if(_0x2e4122===_0x3eb3d5)_0x3eb3d5=undefined;continue;}if(_0x2e4122==='\x22'||_0x2e4122==='\x27'){_0x3eb3d5=_0x2e4122;continue;}if(_0x2e4122==='>')return _0x2a95cb;}return-0x1;}function decodeXmlEntities(_0x559b00){const _0x3cc26b=a229_0x3e8915;let _0x1682f2=![];const _0x487893=_0x559b00[_0x3cc26b(0x171)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x17bd49=>{const _0xdd4725=_0x3cc26b;if(_0x17bd49===_0xdd4725(0x17f))return'<';if(_0x17bd49===_0xdd4725(0x17a))return'>';if(_0x17bd49===_0xdd4725(0x188))return'\x22';if(_0x17bd49==='&apos;')return'\x27';if(_0x17bd49===_0xdd4725(0x18c))return'&';const _0x3d31da=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0xdd4725(0x17c)](_0x17bd49);if(_0x3d31da){const _0x2b1cf4=_0x3d31da[0x1],_0x4daea1=_0x3d31da[0x2],_0x26ea9e=Number[_0xdd4725(0x134)](_0x2b1cf4??_0x4daea1??'',_0x2b1cf4?0x10:0xa);if(isValidXmlCharacter(_0x26ea9e))return String['fromCodePoint'](_0x26ea9e);}return _0x1682f2=!![],'';});return _0x1682f2?null:_0x487893;}function a229_0xb35c(){const _0x5869ce=[']]>','\x20with\x20parameters:\x20','outer','DELETE','7118510iHmseN','has','push','5239304jchPfE','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','insert','tagName','unknown\x20table(s)','split','join','65822ZJPXUt','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','matchAll','Unterminated\x20XML\x20declaration.','reason','trim','bind','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','set','foreach','SELECT','5YzbNVK','623ZwkXJZ','isDangerous','get','Unable\x20to\x20detect\x20SQL\x20type.\x20','string','WITH','add','otherwise','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','\x20WHERE\x20','choose','replace','122190BRbXhH','UPDATE','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','delete','23169245QSwsya','error','\x20SET\x20','rawName','&gt;','pop','exec','toLowerCase','\x20query\x20targeting\x20','&lt;','-->','5112234VzvAUy','18KWSwua','startsWith','sql','from','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','&quot;','DDL','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','Unterminated\x20XML\x20comment.','&amp;','__RABETBASE_MYBATIS_DYNAMIC_START__','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','statementType','replaceAll','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','Invalid\x20MyBatis\x20XML\x20tag.','2uYKOFM','__RABETBASE_MYBATIS_DYNAMIC_END__','type','UNKNOWN','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','parseInt','where','1623452FJwczG','test','mybatisXml','match','keys','<!--','INSERT','include','indexOf',')\x5cb','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','select','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','slice','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','<![CDATA[','when','length','Unterminated\x20MyBatis\x20XML\x20tag.','property','^<\x5cs*(?:','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'];a229_0xb35c=function(){return _0x5869ce;};return a229_0xb35c();}function isValidXmlCharacter(_0x114669){return _0x114669===0x9||_0x114669===0xa||_0x114669===0xd||_0x114669>=0x20&&_0x114669<=0xd7ff||_0x114669>=0xe000&&_0x114669<=0xfffd||_0x114669>=0x10000&&_0x114669<=0x10ffff;}export function detectSqlType(_0x1eeca3){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x1eeca3));}function detectNormalizedSqlType(_0x59511f){const _0x486a8f=a229_0x3e8915;if(_0x59511f['error'])return{'type':_0x486a8f(0x196),'isSelectOnly':![],'isDangerous':![],'reason':_0x59511f[_0x486a8f(0x177)]};if(!_0x59511f['sql'][_0x486a8f(0x15f)]())return{'type':_0x486a8f(0x196),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x58ce68=stripStaticAnalysisMarkers(_0x59511f[_0x486a8f(0x184)])['replace'](/#\{[^}]*\}/g,'?')[_0x486a8f(0x171)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x486a8f(0x15f)](),_0x14c3d5=_0x58ce68[_0x486a8f(0x158)]('\x0a');let _0x4580ff='';for(const _0x12a15a of _0x14c3d5){const _0x22b61c=_0x12a15a[_0x486a8f(0x15f)]();if(!_0x22b61c||_0x22b61c['startsWith']('--')||_0x22b61c[_0x486a8f(0x183)]('/*'))continue;_0x4580ff=_0x22b61c;break;}const _0x3a3634=_0x4580ff['toUpperCase'](),_0x514afe=_0x59511f[_0x486a8f(0x18f)],_0x52074b=maskSqlTextForBlockedKeywordScan(_0x58ce68),_0x3d2c93=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x486a8f(0x137)](_0x52074b);if(_0x514afe===_0x486a8f(0x164)||!_0x514afe&&(_0x3a3634[_0x486a8f(0x183)]('SELECT')||_0x3a3634[_0x486a8f(0x183)](_0x486a8f(0x16b)))){const _0xef0b2a=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x58ce68);return{'type':_0x486a8f(0x164),'isSelectOnly':!_0xef0b2a,'isDangerous':_0xef0b2a,'reason':_0xef0b2a?_0x486a8f(0x133):undefined};}if(_0x514afe===_0x486a8f(0x13c)||!_0x514afe&&_0x3a3634['startsWith'](_0x486a8f(0x13c)))return{'type':_0x486a8f(0x13c),'isSelectOnly':![],'isDangerous':_0x3d2c93,'reason':_0x3d2c93?_0x486a8f(0x16e):undefined};if(_0x514afe===_0x486a8f(0x173)||!_0x514afe&&_0x3a3634['startsWith'](_0x486a8f(0x173)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x3d2c93,'reason':_0x3d2c93?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x514afe===_0x486a8f(0x14f)||!_0x514afe&&_0x3a3634[_0x486a8f(0x183)](_0x486a8f(0x14f)))return{'type':_0x486a8f(0x14f),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x3a3634))return{'type':_0x486a8f(0x189),'isSelectOnly':![],'isDangerous':!![],'reason':_0x486a8f(0x14b)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x3d2af4){const _0x2262fb=a229_0x3e8915;return _0x3d2af4[_0x2262fb(0x190)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x2262fb(0x190)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x2262fb(0x190)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x6d1f7f){const _0x23995b=a229_0x3e8915;return _0x6d1f7f[_0x23995b(0x171)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x23995b(0x171)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x23995b(0x171)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x23995b(0x171)](/--.*$/gm,'\x20')[_0x23995b(0x171)](/#.*$/gm,'\x20')[_0x23995b(0x171)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x285fe0){const _0x5d9ef1=a229_0x3e8915,_0x3d874d=_0x285fe0[_0x5d9ef1(0x171)](/#\{[^}]*\}/g,'?')[_0x5d9ef1(0x171)](/\$\{[^}]*\}/g,'?')[_0x5d9ef1(0x171)](/'[^']*'/g,'\x27\x27')[_0x5d9ef1(0x171)](/--.*$/gm,'')[_0x5d9ef1(0x171)](/\/\*[\s\S]*?\*\//g,''),_0x4ac29e=[],_0x376694=_0x3d874d[_0x5d9ef1(0x139)](/FROM\s+([^\s,)(]+)/i);addTable(_0x4ac29e,_0x376694?.[0x1]);for(const _0x290f79 of _0x3d874d[_0x5d9ef1(0x15c)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x4ac29e,_0x290f79[0x1]);}const _0x123dda=_0x3d874d['match'](/INTO\s+([^\s(]+)/i);addTable(_0x4ac29e,_0x123dda?.[0x1]);const _0x1a1258=_0x3d874d['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x4ac29e,_0x1a1258?.[0x1]),_0x4ac29e;}function addTable(_0x1a0dcd,_0x5efa01){const _0x2ee2d0=a229_0x3e8915,_0x5977cb=_0x5efa01?.[_0x2ee2d0(0x171)](/[`"]/g,'');_0x5977cb&&_0x5977cb!==UNRESOLVED_SQL_FRAGMENT&&!_0x1a0dcd['includes'](_0x5977cb)&&_0x1a0dcd[_0x2ee2d0(0x152)](_0x5977cb);}function extractParameters(_0x416e66){const _0x769fd=a229_0x3e8915,_0x1fa4aa=new Set();for(const _0x20867f of _0x416e66['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x20867f[0x1])_0x1fa4aa[_0x769fd(0x16c)](_0x20867f[0x1]);}return Array[_0x769fd(0x185)](_0x1fa4aa);}export function validateSql(_0x25e935){const _0x511179=a229_0x3e8915,_0x177116=normalizeSqlForStaticAnalysis(_0x25e935),_0x18b60c=detectNormalizedSqlType(_0x177116),_0x15310d=stripStaticAnalysisMarkers(_0x177116[_0x511179(0x184)]),_0x41ccf8=_0x177116[_0x511179(0x177)]?[]:extractTables(_0x15310d),_0x43ee3b=_0x177116[_0x511179(0x177)]?[]:extractParameters(_0x15310d);if(_0x18b60c[_0x511179(0x167)])return{'valid':![],'sqlType':_0x18b60c,'tables':_0x41ccf8,'parameters':_0x43ee3b,'message':_0x18b60c[_0x511179(0x15e)]||_0x18b60c['type']+_0x511179(0x191)};if(_0x18b60c['type']===_0x511179(0x196))return{'valid':![],'sqlType':_0x18b60c,'tables':_0x41ccf8,'parameters':_0x43ee3b,'message':_0x177116['error']?_0x511179(0x169)+_0x177116[_0x511179(0x177)]:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x18b60c,'tables':_0x41ccf8,'parameters':_0x43ee3b,'message':_0x18b60c[_0x511179(0x195)]+_0x511179(0x17e)+(_0x41ccf8['length']?_0x41ccf8[_0x511179(0x159)](',\x20'):_0x511179(0x157))+(_0x43ee3b[_0x511179(0x147)]?_0x511179(0x14d)+_0x43ee3b['join'](',\x20'):'')};}
1
+ const a227_0x377610=a227_0x5739;(function(_0x43c208,_0x1fbd3b){const _0x4572b2=a227_0x5739,_0x10eba2=_0x43c208();while(!![]){try{const _0xdf8e62=-parseInt(_0x4572b2(0x16e))/0x1*(-parseInt(_0x4572b2(0x161))/0x2)+-parseInt(_0x4572b2(0x15f))/0x3*(-parseInt(_0x4572b2(0x14b))/0x4)+parseInt(_0x4572b2(0x131))/0x5+-parseInt(_0x4572b2(0x143))/0x6*(-parseInt(_0x4572b2(0x17d))/0x7)+parseInt(_0x4572b2(0x165))/0x8*(parseInt(_0x4572b2(0x171))/0x9)+-parseInt(_0x4572b2(0x181))/0xa*(parseInt(_0x4572b2(0x182))/0xb)+-parseInt(_0x4572b2(0x183))/0xc*(parseInt(_0x4572b2(0x130))/0xd);if(_0xdf8e62===_0x1fbd3b)break;else _0x10eba2['push'](_0x10eba2['shift']());}catch(_0x1bdaf8){_0x10eba2['push'](_0x10eba2['shift']());}}}(a227_0xc9fb,0xe2565));function a227_0x5739(_0x3cb1b7,_0x483042){_0x3cb1b7=_0x3cb1b7-0x12c;const _0xc9fbc8=a227_0xc9fb();let _0x57399d=_0xc9fbc8[_0x3cb1b7];return _0x57399d;}const MYBATIS_OUTER_TAGS=new Map([['select',a227_0x377610(0x139)],['insert',a227_0x377610(0x13e)],[a227_0x377610(0x162),'UPDATE'],[a227_0x377610(0x13b),a227_0x377610(0x14e)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a227_0x377610(0x16d),'foreach','choose',a227_0x377610(0x156),a227_0x377610(0x17c),a227_0x377610(0x136),a227_0x377610(0x152),a227_0x377610(0x142),'include',a227_0x377610(0x178)]),MYBATIS_BRANCH_TAGS=new Set(['if',a227_0x377610(0x16a),a227_0x377610(0x170),a227_0x377610(0x156),a227_0x377610(0x17c)]);export const MYBATIS_DYNAMIC_START_MARKER=a227_0x377610(0x137);export const MYBATIS_DYNAMIC_END_MARKER=a227_0x377610(0x12d);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a227_0x377610(0x16c)+[...MYBATIS_OUTER_TAGS[a227_0x377610(0x150)]()][a227_0x377610(0x160)]('|')+a227_0x377610(0x167),'i');export function normalizeSqlForStaticAnalysis(_0x46552e){const _0x6e8ae=a227_0x377610,_0x2ab94f=typeof _0x46552e===_0x6e8ae(0x164)?_0x46552e:'';if(!startsWithMybatisStatementWrapper(_0x2ab94f))return{'sql':_0x2ab94f,'mode':_0x6e8ae(0x155)};let _0x248716=0x0,_0x42ebc9='',_0x20efa2,_0x93d5f5=![],_0x5ce42f=![];const _0xeb658f=[];while(_0x248716<_0x2ab94f[_0x6e8ae(0x185)]){if(_0x2ab94f['startsWith'](_0x6e8ae(0x18a),_0x248716)){const _0x5ebb4d=_0x2ab94f[_0x6e8ae(0x166)](_0x6e8ae(0x17b),_0x248716+0x4);if(_0x5ebb4d<0x0)return invalidMybatisSource(_0x6e8ae(0x17a));_0x42ebc9+='\x20',_0x248716=_0x5ebb4d+0x3;continue;}if(_0x2ab94f['startsWith']('<![CDATA[',_0x248716)){if(!_0x93d5f5||_0x5ce42f)return invalidMybatisSource(_0x6e8ae(0x184));const _0x307a9e=_0x2ab94f['indexOf'](_0x6e8ae(0x16f),_0x248716+0x9);if(_0x307a9e<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x42ebc9+=_0x2ab94f[_0x6e8ae(0x18d)](_0x248716+0x9,_0x307a9e),_0x248716=_0x307a9e+0x3;continue;}if(_0x2ab94f[_0x6e8ae(0x180)]('<?',_0x248716)){if(_0x93d5f5)return invalidMybatisSource(_0x6e8ae(0x13a));const _0x209b5c=_0x2ab94f[_0x6e8ae(0x166)]('?>',_0x248716+0x2);if(_0x209b5c<0x0)return invalidMybatisSource(_0x6e8ae(0x18b));_0x42ebc9+='\x20',_0x248716=_0x209b5c+0x2;continue;}if(_0x2ab94f[_0x248716]!=='<'){const _0x4a83a2=_0x2ab94f['indexOf']('<',_0x248716),_0x331e93=_0x4a83a2<0x0?_0x2ab94f['length']:_0x4a83a2,_0xe1a33a=_0x2ab94f[_0x6e8ae(0x18d)](_0x248716,_0x331e93);if((!_0x93d5f5||_0x5ce42f)&&_0xe1a33a[_0x6e8ae(0x136)]())return invalidMybatisSource(_0x6e8ae(0x13d));if(_0x93d5f5&&!_0x5ce42f){const _0x59e0d0=decodeXmlEntities(_0xe1a33a);if(_0x59e0d0===null)return invalidMybatisSource(_0x6e8ae(0x15c));_0x42ebc9+=_0x59e0d0;}else _0x42ebc9+='\x20';_0x248716=_0x331e93;continue;}const _0x2f1bdc=findXmlTagEnd(_0x2ab94f,_0x248716);if(_0x2f1bdc<0x0)return invalidMybatisSource(_0x6e8ae(0x134));const _0x445e02=_0x2ab94f['slice'](_0x248716,_0x2f1bdc+0x1),_0x351d63=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x6e8ae(0x138)](_0x445e02);if(!_0x351d63)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x3fc614=_0x351d63[0x1]==='/',_0x3bd511=_0x351d63[0x2]??'',_0x509560=_0x3bd511['toLowerCase'](),_0x379031=_0x351d63[0x3]??'',_0x1465d1=_0x351d63[0x4]==='/',_0x109764=MYBATIS_OUTER_TAGS[_0x6e8ae(0x177)](_0x509560);if(!_0x109764&&!MYBATIS_DYNAMIC_TAGS[_0x6e8ae(0x146)](_0x509560))return invalidMybatisSource(_0x6e8ae(0x188)+_0x509560+'>.');if(!_0x109764&&_0x3bd511!==_0x509560)return invalidMybatisSource(_0x6e8ae(0x189)+_0x3bd511+'>.');if(_0x3fc614){if(_0x379031[_0x6e8ae(0x136)]()||_0x1465d1)return invalidMybatisSource(_0x6e8ae(0x163)+_0x3bd511+'>.');const _0xa405c6=_0xeb658f['at'](-0x1);if(!_0xa405c6||(_0xa405c6[_0x6e8ae(0x15d)]?_0xa405c6['tagName']!==_0x509560:_0xa405c6['rawName']!==_0x3bd511))return invalidMybatisSource(_0x6e8ae(0x13c)+_0x3bd511+'>.');_0xeb658f[_0x6e8ae(0x174)]();if(_0xa405c6['outer'])_0x5ce42f=!![];_0x42ebc9+=MYBATIS_BRANCH_TAGS['has'](_0x509560)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x379031))return invalidMybatisSource(_0x6e8ae(0x186)+_0x3bd511+'>.');if(_0x509560===_0x6e8ae(0x178)&&(!_0x1465d1||_0xeb658f['at'](-0x1)?.['tagName']!==_0x6e8ae(0x140)))return invalidMybatisSource(_0x6e8ae(0x176));if(_0x109764){if(_0x93d5f5||_0xeb658f['length']>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x93d5f5=!![],_0x5ce42f=_0x1465d1,_0x20efa2=_0x109764;}else{if(!_0x93d5f5||_0x5ce42f)return invalidMybatisSource(_0x6e8ae(0x14a)+_0x3bd511+'>.');}_0x42ebc9+=_0x509560===_0x6e8ae(0x16d)?_0x6e8ae(0x12e):_0x509560===_0x6e8ae(0x152)?_0x6e8ae(0x154):_0x509560==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0x509560)&&!_0x1465d1?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x1465d1&&_0xeb658f[_0x6e8ae(0x132)]({'rawName':_0x3bd511,'tagName':_0x509560,'outer':!!_0x109764});}_0x248716=_0x2f1bdc+0x1;}if(_0xeb658f[_0x6e8ae(0x185)]>0x0)return invalidMybatisSource(_0x6e8ae(0x159)+_0xeb658f['at'](-0x1)?.[_0x6e8ae(0x168)]+'>.');if(!_0x93d5f5||!_0x5ce42f)return invalidMybatisSource(_0x6e8ae(0x187));return{'sql':_0x42ebc9['trim'](),'mode':_0x6e8ae(0x153),..._0x20efa2?{'statementType':_0x20efa2}:{}};}function hasWellFormedXmlAttributes(_0x366c91){const _0x2a3fd1=a227_0x377610;let _0x362cfd=0x0;const _0xa00e09=new Set();while(_0x362cfd<_0x366c91['length']){while(_0x362cfd<_0x366c91[_0x2a3fd1(0x185)]&&/\s/[_0x2a3fd1(0x135)](_0x366c91[_0x362cfd]??''))_0x362cfd+=0x1;if(_0x362cfd>=_0x366c91['length'])return!![];const _0x58c553=/^[A-Za-z_:][\w:.-]*/[_0x2a3fd1(0x138)](_0x366c91[_0x2a3fd1(0x18d)](_0x362cfd)),_0x336a64=_0x58c553?.[0x0];if(!_0x336a64||_0xa00e09[_0x2a3fd1(0x146)](_0x336a64))return![];_0xa00e09[_0x2a3fd1(0x18c)](_0x336a64),_0x362cfd+=_0x336a64[_0x2a3fd1(0x185)];while(_0x362cfd<_0x366c91[_0x2a3fd1(0x185)]&&/\s/['test'](_0x366c91[_0x362cfd]??''))_0x362cfd+=0x1;if(_0x366c91[_0x362cfd]!=='=')return![];_0x362cfd+=0x1;while(_0x362cfd<_0x366c91['length']&&/\s/[_0x2a3fd1(0x135)](_0x366c91[_0x362cfd]??''))_0x362cfd+=0x1;const _0x5b56a4=_0x366c91[_0x362cfd];if(_0x5b56a4!=='\x22'&&_0x5b56a4!=='\x27')return![];_0x362cfd+=0x1;const _0x40be4d=_0x366c91['indexOf'](_0x5b56a4,_0x362cfd);if(_0x40be4d<0x0)return![];if(decodeXmlEntities(_0x366c91[_0x2a3fd1(0x18d)](_0x362cfd,_0x40be4d))===null)return![];_0x362cfd=_0x40be4d+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x411a20){const _0x46c59f=a227_0x377610;let _0x278f86=0x0;const _0x3673ff=()=>{while(_0x278f86<_0x411a20['length']&&/\s/['test'](_0x411a20[_0x278f86]??''))_0x278f86+=0x1;};_0x3673ff();while(_0x278f86<_0x411a20['length']){if(_0x411a20[_0x46c59f(0x180)](_0x46c59f(0x18a),_0x278f86)){const _0x205faf=_0x411a20['indexOf'](_0x46c59f(0x17b),_0x278f86+0x4);if(_0x205faf<0x0)return!![];_0x278f86=_0x205faf+0x3,_0x3673ff();continue;}if(_0x411a20[_0x46c59f(0x180)]('<?',_0x278f86)){const _0x373d07=_0x411a20[_0x46c59f(0x166)]('?>',_0x278f86+0x2);if(_0x373d07<0x0)return!![];_0x278f86=_0x373d07+0x2,_0x3673ff();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x46c59f(0x135)](_0x411a20[_0x46c59f(0x18d)](_0x278f86));}function invalidMybatisSource(_0x4194aa){return{'sql':'','mode':'mybatisXml','error':_0x4194aa};}function findXmlTagEnd(_0xccbaee,_0x47e914){const _0x5ba80f=a227_0x377610;let _0x599ff9;for(let _0x5f12cd=_0x47e914+0x1;_0x5f12cd<_0xccbaee[_0x5ba80f(0x185)];_0x5f12cd+=0x1){const _0x4b0c4e=_0xccbaee[_0x5f12cd];if(_0x599ff9){if(_0x4b0c4e===_0x599ff9)_0x599ff9=undefined;continue;}if(_0x4b0c4e==='\x22'||_0x4b0c4e==='\x27'){_0x599ff9=_0x4b0c4e;continue;}if(_0x4b0c4e==='>')return _0x5f12cd;}return-0x1;}function decodeXmlEntities(_0x3e4377){let _0x389f24=![];const _0x542bef=_0x3e4377['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x26fad6=>{const _0x1db77d=a227_0x5739;if(_0x26fad6===_0x1db77d(0x15b))return'<';if(_0x26fad6===_0x1db77d(0x145))return'>';if(_0x26fad6==='&quot;')return'\x22';if(_0x26fad6==='&apos;')return'\x27';if(_0x26fad6==='&amp;')return'&';const _0x4e8a59=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x1db77d(0x138)](_0x26fad6);if(_0x4e8a59){const _0x140c15=_0x4e8a59[0x1],_0x30a602=_0x4e8a59[0x2],_0x2f1a22=Number[_0x1db77d(0x18e)](_0x140c15??_0x30a602??'',_0x140c15?0x10:0xa);if(isValidXmlCharacter(_0x2f1a22))return String[_0x1db77d(0x148)](_0x2f1a22);}return _0x389f24=!![],'';});return _0x389f24?null:_0x542bef;}function isValidXmlCharacter(_0x2317df){return _0x2317df===0x9||_0x2317df===0xa||_0x2317df===0xd||_0x2317df>=0x20&&_0x2317df<=0xd7ff||_0x2317df>=0xe000&&_0x2317df<=0xfffd||_0x2317df>=0x10000&&_0x2317df<=0x10ffff;}export function detectSqlType(_0x1a2c01){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x1a2c01));}function detectNormalizedSqlType(_0x31d10d){const _0x40b12c=a227_0x377610;if(_0x31d10d[_0x40b12c(0x12c)])return{'type':_0x40b12c(0x18f),'isSelectOnly':![],'isDangerous':![],'reason':_0x31d10d[_0x40b12c(0x12c)]};if(!_0x31d10d[_0x40b12c(0x155)][_0x40b12c(0x136)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x40b12c(0x13f)};const _0x4addc6=stripStaticAnalysisMarkers(_0x31d10d['sql'])['replace'](/#\{[^}]*\}/g,'?')[_0x40b12c(0x144)](/\$\{[^}]*\}/g,'?')[_0x40b12c(0x144)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x40b12c(0x144)](/\/\*[\s\S]*?\*\//g,'')[_0x40b12c(0x136)](),_0x160e4b=_0x4addc6[_0x40b12c(0x169)]('\x0a');let _0x1d3e23='';for(const _0x440586 of _0x160e4b){const _0x4fb335=_0x440586[_0x40b12c(0x136)]();if(!_0x4fb335||_0x4fb335[_0x40b12c(0x180)]('--')||_0x4fb335[_0x40b12c(0x180)]('/*'))continue;_0x1d3e23=_0x4fb335;break;}const _0x1bab6d=_0x1d3e23[_0x40b12c(0x179)](),_0x2e1209=_0x31d10d[_0x40b12c(0x15e)],_0x59e3e6=maskSqlTextForBlockedKeywordScan(_0x4addc6),_0x2f33cd=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x40b12c(0x135)](_0x59e3e6);if(_0x2e1209===_0x40b12c(0x139)||!_0x2e1209&&(_0x1bab6d[_0x40b12c(0x180)]('SELECT')||_0x1bab6d[_0x40b12c(0x180)](_0x40b12c(0x14c)))){const _0x403dcd=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x40b12c(0x135)](_0x4addc6);return{'type':_0x40b12c(0x139),'isSelectOnly':!_0x403dcd,'isDangerous':_0x403dcd,'reason':_0x403dcd?_0x40b12c(0x173):undefined};}if(_0x2e1209===_0x40b12c(0x13e)||!_0x2e1209&&_0x1bab6d[_0x40b12c(0x180)](_0x40b12c(0x13e)))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x2f33cd,'reason':_0x2f33cd?_0x40b12c(0x190):undefined};if(_0x2e1209===_0x40b12c(0x14f)||!_0x2e1209&&_0x1bab6d[_0x40b12c(0x180)](_0x40b12c(0x14f)))return{'type':_0x40b12c(0x14f),'isSelectOnly':![],'isDangerous':_0x2f33cd,'reason':_0x2f33cd?_0x40b12c(0x190):undefined};if(_0x2e1209===_0x40b12c(0x14e)||!_0x2e1209&&_0x1bab6d[_0x40b12c(0x180)](_0x40b12c(0x14e)))return{'type':_0x40b12c(0x14e),'isSelectOnly':![],'isDangerous':!![],'reason':_0x40b12c(0x15a)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x1bab6d))return{'type':_0x40b12c(0x151),'isSelectOnly':![],'isDangerous':!![],'reason':_0x40b12c(0x12f)};return{'type':_0x40b12c(0x18f),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x41636f){const _0x249f9a=a227_0x377610;return _0x41636f[_0x249f9a(0x147)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x249f9a(0x147)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x249f9a(0x147)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x5051a5){const _0x2d8503=a227_0x377610;return _0x5051a5[_0x2d8503(0x144)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x2d8503(0x144)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x2d8503(0x144)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x2d8503(0x144)](/--.*$/gm,'\x20')[_0x2d8503(0x144)](/#.*$/gm,'\x20')[_0x2d8503(0x144)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x5678e8){const _0x401c9b=a227_0x377610,_0x562a79=_0x5678e8[_0x401c9b(0x144)](/#\{[^}]*\}/g,'?')[_0x401c9b(0x144)](/\$\{[^}]*\}/g,'?')[_0x401c9b(0x144)](/'[^']*'/g,'\x27\x27')[_0x401c9b(0x144)](/--.*$/gm,'')[_0x401c9b(0x144)](/\/\*[\s\S]*?\*\//g,''),_0x112930=[],_0x870eea=_0x562a79[_0x401c9b(0x17e)](/FROM\s+([^\s,)(]+)/i);addTable(_0x112930,_0x870eea?.[0x1]);for(const _0x1b80d4 of _0x562a79[_0x401c9b(0x157)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x112930,_0x1b80d4[0x1]);}const _0xd28396=_0x562a79[_0x401c9b(0x17e)](/INTO\s+([^\s(]+)/i);addTable(_0x112930,_0xd28396?.[0x1]);const _0x13a580=_0x562a79[_0x401c9b(0x17e)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x112930,_0x13a580?.[0x1]),_0x112930;}function addTable(_0x3a4026,_0x3675ad){const _0x3898a7=a227_0x377610,_0x5d353e=_0x3675ad?.[_0x3898a7(0x144)](/[`"]/g,'');_0x5d353e&&_0x5d353e!==UNRESOLVED_SQL_FRAGMENT&&!_0x3a4026[_0x3898a7(0x17f)](_0x5d353e)&&_0x3a4026[_0x3898a7(0x132)](_0x5d353e);}function a227_0xc9fb(){const _0x260c9f=['add','slice','parseInt','UNKNOWN','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','error','__RABETBASE_MYBATIS_DYNAMIC_END__','\x20WHERE\x20','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','595673VXJOCW','1108885xggOke','push','\x20query\x20targeting\x20','Unterminated\x20MyBatis\x20XML\x20tag.','test','trim','__RABETBASE_MYBATIS_DYNAMIC_START__','exec','SELECT','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','delete','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','INSERT','SQL\x20content\x20is\x20empty','include','\x20with\x20parameters:\x20','bind','18144pCfeGR','replace','&gt;','has','replaceAll','fromCodePoint','reason','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','4NosoAZ','WITH','type','DELETE','UPDATE','keys','DDL','set','mybatisXml','\x20SET\x20','sql','when','matchAll','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','&lt;','Invalid\x20XML\x20entity\x20reference.','outer','statementType','1630881VRnkKH','join','405556IneukM','update','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','string','16ldkyMW','indexOf',')\x5cb','rawName','split','foreach','unknown\x20table(s)','^<\x5cs*(?:','where','4LbgOwb',']]>','choose','1890657RygPbR','from','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','pop','isDangerous','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','get','property','toUpperCase','Unterminated\x20XML\x20comment.','-->','otherwise','1379Guubkq','match','includes','startsWith','20ZZWZJY','8907206fNXtHm','12gxjqhM','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','length','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','<!--','Unterminated\x20XML\x20declaration.'];a227_0xc9fb=function(){return _0x260c9f;};return a227_0xc9fb();}function extractParameters(_0x52415c){const _0x3ed9bd=a227_0x377610,_0x3eabe4=new Set();for(const _0x20c1dc of _0x52415c[_0x3ed9bd(0x157)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x20c1dc[0x1])_0x3eabe4[_0x3ed9bd(0x18c)](_0x20c1dc[0x1]);}return Array[_0x3ed9bd(0x172)](_0x3eabe4);}export function validateSql(_0x12d61f){const _0x5bbeff=a227_0x377610,_0x51e1d9=normalizeSqlForStaticAnalysis(_0x12d61f),_0x11693f=detectNormalizedSqlType(_0x51e1d9),_0x523d76=stripStaticAnalysisMarkers(_0x51e1d9[_0x5bbeff(0x155)]),_0x2ec484=_0x51e1d9[_0x5bbeff(0x12c)]?[]:extractTables(_0x523d76),_0x7140f2=_0x51e1d9['error']?[]:extractParameters(_0x523d76);if(_0x11693f[_0x5bbeff(0x175)])return{'valid':![],'sqlType':_0x11693f,'tables':_0x2ec484,'parameters':_0x7140f2,'message':_0x11693f[_0x5bbeff(0x149)]||_0x11693f[_0x5bbeff(0x14d)]+'\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.'};if(_0x11693f[_0x5bbeff(0x14d)]===_0x5bbeff(0x18f))return{'valid':![],'sqlType':_0x11693f,'tables':_0x2ec484,'parameters':_0x7140f2,'message':_0x51e1d9[_0x5bbeff(0x12c)]?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x51e1d9[_0x5bbeff(0x12c)]:_0x5bbeff(0x158)};return{'valid':!![],'sqlType':_0x11693f,'tables':_0x2ec484,'parameters':_0x7140f2,'message':_0x11693f['type']+_0x5bbeff(0x133)+(_0x2ec484[_0x5bbeff(0x185)]?_0x2ec484[_0x5bbeff(0x160)](',\x20'):_0x5bbeff(0x16b))+(_0x7140f2[_0x5bbeff(0x185)]?_0x5bbeff(0x141)+_0x7140f2[_0x5bbeff(0x160)](',\x20'):'')};}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- const a230_0x49166c=a230_0x39da;(function(_0x12f1d8,_0x472048){const _0x2bc143=a230_0x39da,_0x2e8145=_0x12f1d8();while(!![]){try{const _0x43dc49=parseInt(_0x2bc143(0xbd))/0x1*(-parseInt(_0x2bc143(0xbb))/0x2)+parseInt(_0x2bc143(0xbe))/0x3+parseInt(_0x2bc143(0xb7))/0x4+-parseInt(_0x2bc143(0xad))/0x5+parseInt(_0x2bc143(0xbc))/0x6*(-parseInt(_0x2bc143(0xb2))/0x7)+parseInt(_0x2bc143(0xb3))/0x8*(-parseInt(_0x2bc143(0xb0))/0x9)+parseInt(_0x2bc143(0xb4))/0xa;if(_0x43dc49===_0x472048)break;else _0x2e8145['push'](_0x2e8145['shift']());}catch(_0x1b7cc5){_0x2e8145['push'](_0x2e8145['shift']());}}}(a230_0x3e43,0xb6f66));function a230_0x39da(_0x376dab,_0x242695){_0x376dab=_0x376dab-0xac;const _0x3e4341=a230_0x3e43();let _0x39da3f=_0x3e4341[_0x376dab];return _0x39da3f;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a230_0x3e43(){const _0x4e088e=['\x0a\x20\x20\x20\x20\x20\x20\x20','Set\x20appcode\x20via\x20`','2BVYKvU','12ObVwTo','850911rNMBFd','3983220kVgBGS','\x20auth`\x20to\x20login\x20first.','5747110sIaBGm','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','4002561XQuGfX','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','1957529eVCoJT','8ZOYPAQ','19351650Kpvldt','Run\x20`','join','1963460Ftyvdk','Tip:\x20`'];a230_0x3e43=function(){return _0x4e088e;};return a230_0x3e43();}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a230_0x49166c(0xb5)+CLI_BIN_NAME+a230_0x49166c(0xac),'configMissingHint':[a230_0x49166c(0xba)+CLI_BIN_NAME+a230_0x49166c(0xb1),a230_0x49166c(0xb8)+CLI_BIN_NAME+a230_0x49166c(0xaf)][a230_0x49166c(0xb6)](a230_0x49166c(0xb9)),'notInProjectHint':a230_0x49166c(0xae)});
1
+ const a228_0x4b7623=a228_0xe6b6;(function(_0x2c2cea,_0x2bb56b){const _0x4f0d7b=a228_0xe6b6,_0x49a41e=_0x2c2cea();while(!![]){try{const _0x332875=parseInt(_0x4f0d7b(0x1f5))/0x1+-parseInt(_0x4f0d7b(0x1f8))/0x2*(parseInt(_0x4f0d7b(0x1ed))/0x3)+parseInt(_0x4f0d7b(0x1f7))/0x4+parseInt(_0x4f0d7b(0x1f0))/0x5+parseInt(_0x4f0d7b(0x1f4))/0x6+parseInt(_0x4f0d7b(0x1e8))/0x7+parseInt(_0x4f0d7b(0x1ee))/0x8*(-parseInt(_0x4f0d7b(0x1ec))/0x9);if(_0x332875===_0x2bb56b)break;else _0x49a41e['push'](_0x49a41e['shift']());}catch(_0xabc21e){_0x49a41e['push'](_0x49a41e['shift']());}}}(a228_0x236f,0x5f539));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a228_0x236f(){const _0x66e1b3=['\x20auth`\x20to\x20login\x20first.','2042860jdaMJH','1868kXFucs','1459374udVuFh','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','join','Tip:\x20`','1021743XDBCrj','1071tLDkEh','72YudWoS','Set\x20appcode\x20via\x20`','495475ovstbR','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','Run\x20`','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','3583434FLbvGo','330107lzVVGq'];a228_0x236f=function(){return _0x66e1b3;};return a228_0x236f();}import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a228_0xe6b6(_0x641b57,_0x8d58f7){_0x641b57=_0x641b57-0x1e8;const _0x236fb7=a228_0x236f();let _0xe6b6e6=_0x236fb7[_0x641b57];return _0xe6b6e6;}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a228_0x4b7623(0x1f2)+CLI_BIN_NAME+a228_0x4b7623(0x1f6),'configMissingHint':[a228_0x4b7623(0x1ef)+CLI_BIN_NAME+a228_0x4b7623(0x1f3),a228_0x4b7623(0x1eb)+CLI_BIN_NAME+a228_0x4b7623(0x1f1)][a228_0x4b7623(0x1ea)]('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':a228_0x4b7623(0x1e9)});
@@ -1 +1 @@
1
- (function(_0x185954,_0x17216f){const _0x2e1a76=a231_0x3e7e,_0x6a3b7f=_0x185954();while(!![]){try{const _0x3a6139=parseInt(_0x2e1a76(0x16a))/0x1+-parseInt(_0x2e1a76(0x169))/0x2*(-parseInt(_0x2e1a76(0x16e))/0x3)+-parseInt(_0x2e1a76(0x167))/0x4*(parseInt(_0x2e1a76(0x16f))/0x5)+parseInt(_0x2e1a76(0x168))/0x6+-parseInt(_0x2e1a76(0x166))/0x7+-parseInt(_0x2e1a76(0x16b))/0x8+-parseInt(_0x2e1a76(0x16c))/0x9*(-parseInt(_0x2e1a76(0x16d))/0xa);if(_0x3a6139===_0x17216f)break;else _0x6a3b7f['push'](_0x6a3b7f['shift']());}catch(_0x443314){_0x6a3b7f['push'](_0x6a3b7f['shift']());}}}(a231_0x1c94,0x8a2f2));function a231_0x1c94(){const _0x3d9dee=['357261LQbeiD','4247280jxlCbL','3714714TNTZGd','20RwdvqB','3CEFpEb','3359245ywvfWQ','map','yes','2443861fZDloE','4SxyUsZ','1026936QMcEug','1527950ZVkHNX'];a231_0x1c94=function(){return _0x3d9dee;};return a231_0x1c94();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a231_0x18792b}from'@lovrabet/cli-framework';function a231_0x3e7e(_0x3ce18d,_0x270d1b){_0x3ce18d=_0x3ce18d-0x165;const _0x1c940f=a231_0x1c94();let _0x3e7e7e=_0x1c940f[_0x3ce18d];return _0x3e7e7e;}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x3acfa0){const _0x4c8eee=a231_0x3e7e,_0xb90950=a231_0x18792b(_0x3acfa0,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x3acfa0))return _0xb90950;return _0xb90950[_0x4c8eee(0x170)](_0x58e17f=>_0x58e17f['name']===_0x4c8eee(0x165)?{..._0x58e17f,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x58e17f);}
1
+ (function(_0x34fc8f,_0x4c3909){const _0x47de89=a229_0x1eef,_0x494288=_0x34fc8f();while(!![]){try{const _0x22f7a2=parseInt(_0x47de89(0x153))/0x1+-parseInt(_0x47de89(0x14c))/0x2+-parseInt(_0x47de89(0x154))/0x3*(parseInt(_0x47de89(0x151))/0x4)+parseInt(_0x47de89(0x14b))/0x5+parseInt(_0x47de89(0x152))/0x6*(parseInt(_0x47de89(0x155))/0x7)+-parseInt(_0x47de89(0x14f))/0x8+-parseInt(_0x47de89(0x157))/0x9*(parseInt(_0x47de89(0x150))/0xa);if(_0x22f7a2===_0x4c3909)break;else _0x494288['push'](_0x494288['shift']());}catch(_0x5b0470){_0x494288['push'](_0x494288['shift']());}}}(a229_0x7111,0x93036));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a229_0x3d9b36}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a229_0x1eef(_0x357df7,_0x2e0ad9){_0x357df7=_0x357df7-0x14b;const _0x711102=a229_0x7111();let _0x1eefe4=_0x711102[_0x357df7];return _0x1eefe4;}export function buildAllFlags(_0x182cff){const _0x4b0c20=a229_0x1eef,_0x2723b5=a229_0x3d9b36(_0x182cff,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x182cff))return _0x2723b5;return _0x2723b5[_0x4b0c20(0x156)](_0x30da72=>_0x30da72[_0x4b0c20(0x14d)]===_0x4b0c20(0x14e)?{..._0x30da72,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x30da72);}function a229_0x7111(){const _0x471aaf=['yes','2802704PinlfZ','4278910gCMlqg','1002372hePZkr','3595524tZrgUu','478955wITLgO','3oZIPKY','14HDooCo','map','9aiXNjK','4740725xcLefT','1989240TQnQFR','name'];a229_0x7111=function(){return _0x471aaf;};return a229_0x7111();}