@lovrabet/rabetbase-cli 2.5.1-beta.5 → 2.5.1

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 (319) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-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/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.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/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/auto-sync.js +1 -1
  99. package/lib/commands/deployment/index.js +1 -1
  100. package/lib/commands/deployment/sync.js +1 -1
  101. package/lib/commands/doctor.js +1 -1
  102. package/lib/commands/file/index.js +1 -1
  103. package/lib/commands/issue/index.js +1 -1
  104. package/lib/commands/issue/nudge.js +1 -1
  105. package/lib/commands/issue/report.js +1 -1
  106. package/lib/commands/issue/shared.js +1 -1
  107. package/lib/commands/kb/create.js +1 -1
  108. package/lib/commands/kb/delete.js +1 -1
  109. package/lib/commands/kb/detail.js +1 -1
  110. package/lib/commands/kb/index.js +1 -1
  111. package/lib/commands/kb/list.js +1 -1
  112. package/lib/commands/kb/search.js +1 -1
  113. package/lib/commands/kb/shared.js +1 -1
  114. package/lib/commands/kb/update.js +1 -1
  115. package/lib/commands/logs/index.js +1 -1
  116. package/lib/commands/menu/asset-update.js +1 -1
  117. package/lib/commands/menu/delete.js +1 -1
  118. package/lib/commands/menu/external-link-create.js +1 -1
  119. package/lib/commands/menu/external-link-update.js +1 -1
  120. package/lib/commands/menu/group-create.js +1 -1
  121. package/lib/commands/menu/group-update.js +1 -1
  122. package/lib/commands/menu/index.js +1 -1
  123. package/lib/commands/menu/list.js +1 -1
  124. package/lib/commands/menu/move.js +1 -1
  125. package/lib/commands/menu/regroup-start.js +1 -1
  126. package/lib/commands/menu/rename.js +1 -1
  127. package/lib/commands/menu/shared/compare-table.js +1 -1
  128. package/lib/commands/menu/shared/delete-plan.js +1 -1
  129. package/lib/commands/menu/shared/facts.js +1 -1
  130. package/lib/commands/menu/shared/index.js +1 -1
  131. package/lib/commands/menu/shared/inquirer.js +1 -1
  132. package/lib/commands/menu/shared/local-pages.js +1 -1
  133. package/lib/commands/menu/shared/logic.js +1 -1
  134. package/lib/commands/menu/shared/mutations.js +1 -1
  135. package/lib/commands/menu/shared/service.js +1 -1
  136. package/lib/commands/menu/shared/sync-core.js +1 -1
  137. package/lib/commands/menu/shared/update-core.js +1 -1
  138. package/lib/commands/menu/shared/valid-url.js +1 -1
  139. package/lib/commands/menu/sync.js +1 -1
  140. package/lib/commands/menu/visibility-update.js +1 -1
  141. package/lib/commands/notification/config-create.js +1 -1
  142. package/lib/commands/notification/config-delete.js +1 -1
  143. package/lib/commands/notification/config-list.js +1 -1
  144. package/lib/commands/notification/config-update.js +1 -1
  145. package/lib/commands/notification/index.js +1 -1
  146. package/lib/commands/notification/shared.js +1 -1
  147. package/lib/commands/ocr/index.js +1 -1
  148. package/lib/commands/page/create.js +1 -1
  149. package/lib/commands/page/custom/detail.js +1 -1
  150. package/lib/commands/page/custom/list.js +1 -1
  151. package/lib/commands/page/custom/publish.js +1 -1
  152. package/lib/commands/page/custom/shared.js +1 -1
  153. package/lib/commands/page/custom/syntax.js +1 -1
  154. package/lib/commands/page/custom/template.js +1 -1
  155. package/lib/commands/page/custom/update.js +1 -1
  156. package/lib/commands/page/data-list-status.js +1 -1
  157. package/lib/commands/page/generate-start.js +1 -1
  158. package/lib/commands/page/generate-status.js +1 -1
  159. package/lib/commands/page/index.js +1 -1
  160. package/lib/commands/page/pull.js +1 -1
  161. package/lib/commands/page/push.js +1 -1
  162. package/lib/commands/page/relation-audit.js +1 -1
  163. package/lib/commands/page/restore.js +1 -1
  164. package/lib/commands/page/shared.js +1 -1
  165. package/lib/commands/page/sync.js +1 -1
  166. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  167. package/lib/commands/project/create/format-elapsed.js +1 -1
  168. package/lib/commands/project/create/main.js +1 -1
  169. package/lib/commands/project/create/materialize-project-template.js +1 -1
  170. package/lib/commands/project/create/project-name.js +1 -1
  171. package/lib/commands/project/create/project-template-archive.js +1 -1
  172. package/lib/commands/project/create/project-template-path.js +1 -1
  173. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  174. package/lib/commands/project/create/use-format-code.js +1 -1
  175. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  176. package/lib/commands/project/domain-routing-sync.js +1 -1
  177. package/lib/commands/project/index.js +1 -1
  178. package/lib/commands/project/upgrade.js +1 -1
  179. package/lib/commands/registry.js +1 -1
  180. package/lib/commands/role/delete.js +1 -1
  181. package/lib/commands/role/detail.js +1 -1
  182. package/lib/commands/role/index.js +1 -1
  183. package/lib/commands/role/list.js +1 -1
  184. package/lib/commands/role/shared.js +1 -1
  185. package/lib/commands/role/update.js +1 -1
  186. package/lib/commands/role/user-add.js +1 -1
  187. package/lib/commands/role/user-remove.js +1 -1
  188. package/lib/commands/role/user-resolve.js +1 -1
  189. package/lib/commands/rule/get.js +1 -1
  190. package/lib/commands/rule/index.js +1 -1
  191. package/lib/commands/rule/list.js +1 -1
  192. package/lib/commands/rule/set.js +1 -1
  193. package/lib/commands/rule/shared.js +1 -1
  194. package/lib/commands/run/index.js +1 -1
  195. package/lib/commands/schema.js +1 -1
  196. package/lib/commands/sql/create.js +1 -1
  197. package/lib/commands/sql/delete.js +1 -1
  198. package/lib/commands/sql/detail.js +1 -1
  199. package/lib/commands/sql/exec.js +1 -1
  200. package/lib/commands/sql/index.js +1 -1
  201. package/lib/commands/sql/list.js +1 -1
  202. package/lib/commands/sql/pull.js +1 -1
  203. package/lib/commands/sql/push.js +1 -1
  204. package/lib/commands/sql/shared.js +1 -1
  205. package/lib/commands/sql/status.js +1 -1
  206. package/lib/commands/sql/validate.js +1 -1
  207. package/lib/commands/task/index.js +1 -1
  208. package/lib/commands/task/status.js +1 -1
  209. package/lib/commands/tenant/index.js +1 -1
  210. package/lib/commands/tenant/members-list.js +1 -1
  211. package/lib/commands/tenant/shared.js +1 -1
  212. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  213. package/lib/commands/user-account/index.js +1 -1
  214. package/lib/commands/workspace/add.js +1 -1
  215. package/lib/commands/workspace/index.js +1 -1
  216. package/lib/commands/workspace/remove.js +1 -1
  217. package/lib/config/deployment-sync.js +1 -1
  218. package/lib/config/domain-config.js +1 -1
  219. package/lib/config/project-domain-routing.js +1 -1
  220. package/lib/config/schema.js +1 -1
  221. package/lib/constant/cdn.js +1 -1
  222. package/lib/constant/cli.js +1 -1
  223. package/lib/constant/defaults.js +1 -1
  224. package/lib/constant/domain.js +1 -1
  225. package/lib/constant/env.js +1 -1
  226. package/lib/constant/output.js +1 -1
  227. package/lib/constant/paths.js +1 -1
  228. package/lib/constant/region.js +1 -1
  229. package/lib/constant/risk.js +1 -1
  230. package/lib/constant/routing-profile.js +1 -1
  231. package/lib/context/app-resolver.js +1 -1
  232. package/lib/context/auth-resolver.js +1 -1
  233. package/lib/context/config-loader.js +1 -1
  234. package/lib/context.js +1 -1
  235. package/lib/core/alias-resolver.js +1 -1
  236. package/lib/core/api-client.d.ts +0 -16
  237. package/lib/core/api-client.js +1 -1
  238. package/lib/core/bff/config.js +1 -1
  239. package/lib/core/bff/file-system.js +1 -1
  240. package/lib/core/bff/hash.js +1 -1
  241. package/lib/core/bff/lock.js +1 -1
  242. package/lib/core/bff/utils.js +1 -1
  243. package/lib/core/db-resolver.js +1 -1
  244. package/lib/core/kb-search-client.d.ts +30 -0
  245. package/lib/core/kb-search-client.js +1 -0
  246. package/lib/core/page/file-system.js +1 -1
  247. package/lib/core/page/hash.js +1 -1
  248. package/lib/core/page/lock.js +1 -1
  249. package/lib/core/sql-index-auditor.js +1 -1
  250. package/lib/core/sql-sync/config.js +1 -1
  251. package/lib/core/sql-sync/file-system.js +1 -1
  252. package/lib/core/sql-sync/hash.js +1 -1
  253. package/lib/core/sql-sync/lock.js +1 -1
  254. package/lib/core/sql-sync/utils.js +1 -1
  255. package/lib/core/sql-validator.js +1 -1
  256. package/lib/errors.js +1 -1
  257. package/lib/framework/build-all-flags.js +1 -1
  258. package/lib/framework/error-output.js +1 -1
  259. package/lib/framework/explicit-yes.js +1 -1
  260. package/lib/framework/flags.js +1 -1
  261. package/lib/framework/help.js +1 -1
  262. package/lib/framework/index.js +1 -1
  263. package/lib/framework/output.js +1 -1
  264. package/lib/framework/response.js +1 -1
  265. package/lib/framework/runner-alias.js +1 -1
  266. package/lib/framework/runner.js +1 -1
  267. package/lib/framework/schema-export.js +1 -1
  268. package/lib/framework/types.d.ts +1 -0
  269. package/lib/framework/types.js +1 -1
  270. package/lib/generated/build-info.d.ts +4 -4
  271. package/lib/generated/build-info.js +1 -1
  272. package/lib/generated/official-routing.js +1 -1
  273. package/lib/generated/routing-contract.js +1 -1
  274. package/lib/help.js +1 -1
  275. package/lib/postinstall.js +1 -1
  276. package/lib/runtime/confirmation.js +1 -1
  277. package/lib/runtime/event.js +1 -1
  278. package/lib/runtime/index.js +1 -1
  279. package/lib/runtime/queue.js +1 -1
  280. package/lib/runtime/resolve.js +1 -1
  281. package/lib/skills/builtin-skill.js +1 -1
  282. package/lib/skills/main.js +1 -1
  283. package/lib/skills/npx-skills-add.js +1 -1
  284. package/lib/skills/skill-presence.js +1 -1
  285. package/lib/telemetry/cli-command-trace.js +1 -1
  286. package/lib/telemetry/cli-help-trace.js +1 -1
  287. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  288. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  289. package/lib/telemetry/send-cli-trace-log.js +1 -1
  290. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  291. package/lib/utils/ai_config.js +1 -1
  292. package/lib/utils/apply-jq-filter.js +1 -1
  293. package/lib/utils/cdn-config.js +1 -1
  294. package/lib/utils/check-sdk-version.js +1 -1
  295. package/lib/utils/cli-version-check.js +1 -1
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/sleep.js +1 -1
  307. package/lib/utils/template-replacer.js +1 -1
  308. package/lib/utils/update-notice.js +1 -1
  309. package/lib/utils/version.js +1 -1
  310. package/lib/utils/with-active-cookie.js +1 -1
  311. package/lib/utils/write-cli-side-channel.js +1 -1
  312. package/package.json +1 -1
  313. package/skills/rabetbase/SKILL.md +3 -3
  314. package/skills/rabetbase/references/rabetbase-config.md +1 -1
  315. package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
  316. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  317. package/skills/rabetbase/references/rabetbase-kb.md +8 -7
  318. package/skills/rabetbase/references/rabetbase-rule.md +15 -0
  319. package/skills/rabetbase.manifest.json +4 -3
@@ -1 +1 @@
1
- const a237_0x49e568=a237_0x5043;(function(_0x2505c0,_0x40f415){const _0x48ab8e=a237_0x5043,_0x4f74d2=_0x2505c0();while(!![]){try{const _0x179386=parseInt(_0x48ab8e(0x143))/0x1*(-parseInt(_0x48ab8e(0x140))/0x2)+-parseInt(_0x48ab8e(0x13c))/0x3*(parseInt(_0x48ab8e(0x146))/0x4)+-parseInt(_0x48ab8e(0x13d))/0x5+parseInt(_0x48ab8e(0x142))/0x6+parseInt(_0x48ab8e(0x13b))/0x7*(parseInt(_0x48ab8e(0x13f))/0x8)+parseInt(_0x48ab8e(0x144))/0x9+parseInt(_0x48ab8e(0x147))/0xa;if(_0x179386===_0x40f415)break;else _0x4f74d2['push'](_0x4f74d2['shift']());}catch(_0x2f8e27){_0x4f74d2['push'](_0x4f74d2['shift']());}}}(a237_0x4b64,0x6200e));import{resolve}from'node:path';function a237_0x4b64(){const _0x5d5e9f=['2477817kSwvcC','bff.lock.json','15744voWyvK','5888750RhlwRd','bff-trash','209601wHwWpA','237iCxHNa','1916425wrNnxL','bff','88qvRIgK','685446mCPJaj','/bff','3525216yJpVtm','2wNBbVM'];a237_0x4b64=function(){return _0x5d5e9f;};return a237_0x4b64();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a237_0x49e568(0x145),TRASH_DIR_NAME=a237_0x49e568(0x148);function a237_0x5043(_0x4cee73,_0x474c25){_0x4cee73=_0x4cee73-0x13b;const _0x4b6485=a237_0x4b64();let _0x504380=_0x4b6485[_0x4cee73];return _0x504380;}export function loadBffProjectConfig(_0x49eb06,_0x505f9d){const _0xc80ba5=a237_0x49e568,_0x4e9e59=resolve(_0x505f9d??findProjectRootDirectory()),_0x14ec06=DOT_DIR+_0xc80ba5(0x141),_0x3d876c=_0x14ec06+'/'+_0x49eb06;return{'projectRoot':_0x4e9e59,'appCode':_0x49eb06,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x14ec06,'scriptsRoot':_0x3d876c,'scriptsRootDir':resolve(_0x4e9e59,DOT_DIR,_0xc80ba5(0x13e),_0x49eb06),'lockFilePath':resolve(_0x4e9e59,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4e9e59,DOT_DIR,TRASH_DIR_NAME)};}
1
+ function a237_0x20ac(_0x201781,_0x30058b){_0x201781=_0x201781-0x1ce;const _0x31659b=a237_0x3165();let _0x20acea=_0x31659b[_0x201781];return _0x20acea;}const a237_0x5c6b59=a237_0x20ac;(function(_0x2a4be1,_0x4cb1c0){const _0x3b5363=a237_0x20ac,_0x415f8e=_0x2a4be1();while(!![]){try{const _0x1f63b2=-parseInt(_0x3b5363(0x1d7))/0x1+parseInt(_0x3b5363(0x1dc))/0x2*(parseInt(_0x3b5363(0x1d5))/0x3)+-parseInt(_0x3b5363(0x1ce))/0x4*(-parseInt(_0x3b5363(0x1d1))/0x5)+-parseInt(_0x3b5363(0x1d3))/0x6+-parseInt(_0x3b5363(0x1cf))/0x7*(parseInt(_0x3b5363(0x1d4))/0x8)+-parseInt(_0x3b5363(0x1d8))/0x9*(parseInt(_0x3b5363(0x1da))/0xa)+parseInt(_0x3b5363(0x1d6))/0xb;if(_0x1f63b2===_0x4cb1c0)break;else _0x415f8e['push'](_0x415f8e['shift']());}catch(_0x3ead0a){_0x415f8e['push'](_0x415f8e['shift']());}}}(a237_0x3165,0xa452b));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a237_0x3165(){const _0x3798fa=['5204676EGbWtJ','107048VYnOaM','2514129AbqWES','20993467JARHYO','48328TKDiAT','68346XXPhew','bff-trash','840rNziSR','.rabetbase','2SMPLGC','144SLZPXF','413CYRiSN','bff','37455jzPVAX','/bff'];a237_0x3165=function(){return _0x3798fa;};return a237_0x3165();}const DOT_DIR=a237_0x5c6b59(0x1db),LOCK_FILE_NAME='bff.lock.json',TRASH_DIR_NAME=a237_0x5c6b59(0x1d9);export function loadBffProjectConfig(_0x3f2f36,_0x4b8b69){const _0x415cea=a237_0x5c6b59,_0x97a44f=resolve(_0x4b8b69??findProjectRootDirectory()),_0x3b763e=DOT_DIR+_0x415cea(0x1d2),_0x632fc3=_0x3b763e+'/'+_0x3f2f36;return{'projectRoot':_0x97a44f,'appCode':_0x3f2f36,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x3b763e,'scriptsRoot':_0x632fc3,'scriptsRootDir':resolve(_0x97a44f,DOT_DIR,_0x415cea(0x1d0),_0x3f2f36),'lockFilePath':resolve(_0x97a44f,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x97a44f,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- const a238_0x11b8b0=a238_0x4eb0;(function(_0x1295c0,_0x36a290){const _0x43ef44=a238_0x4eb0,_0x297ddd=_0x1295c0();while(!![]){try{const _0x650a08=-parseInt(_0x43ef44(0x1fa))/0x1+-parseInt(_0x43ef44(0x1e1))/0x2*(-parseInt(_0x43ef44(0x1e7))/0x3)+parseInt(_0x43ef44(0x1e8))/0x4*(parseInt(_0x43ef44(0x1e3))/0x5)+parseInt(_0x43ef44(0x1ea))/0x6+parseInt(_0x43ef44(0x1ef))/0x7*(parseInt(_0x43ef44(0x1f5))/0x8)+-parseInt(_0x43ef44(0x1d6))/0x9+parseInt(_0x43ef44(0x1fc))/0xa*(-parseInt(_0x43ef44(0x1e2))/0xb);if(_0x650a08===_0x36a290)break;else _0x297ddd['push'](_0x297ddd['shift']());}catch(_0x566865){_0x297ddd['push'](_0x297ddd['shift']());}}}(a238_0x3b9a,0xc84a9));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';function a238_0x3b9a(){const _0x503a3e=['4458798EgspCB','1147412FIzcMl','all','8922402ERHMpi','endsWith','replace','ENOENT','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','56GalYCo','isFile','push','set','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','every','223312BYpYnC','functionNode','split','beforeScriptId','name','1449512rVkcRK','map','6350510pzyJbe','datasetCode','COMMON','operationType','HOOK','toUpperCase','isDirectory','9818127NoHWdk','alias','trim','ENDPOINT','get','code','functionName','includes','.js','HOOK/','before','2CvBwSn','22YYwbBE','25DTHluz','startsWith','scriptsRootDir','afterScriptId'];a238_0x3b9a=function(){return _0x503a3e;};return a238_0x3b9a();}function a238_0x4eb0(_0x555648,_0x3f2198){_0x555648=_0x555648-0x1d1;const _0x3b9af9=a238_0x3b9a();let _0x4eb0bc=_0x3b9af9[_0x555648];return _0x4eb0bc;}export const SUPPORTED_BFF_TYPES=['COMMON',a238_0x11b8b0(0x1d9),a238_0x11b8b0(0x1d3)];export function normalizeBffType(_0x24a0e3){const _0x1628c9=a238_0x11b8b0;if(!_0x24a0e3)return undefined;const _0x42d4f6=_0x24a0e3[_0x1628c9(0x1d8)]()[_0x1628c9(0x1d4)]();return SUPPORTED_BFF_TYPES[_0x1628c9(0x1dd)](_0x42d4f6)?_0x42d4f6:undefined;}async function scanJsFilesRecursively(_0x412b78,_0x7b47f){const _0x1f7a0f=a238_0x11b8b0,_0x1174e3=[];try{const _0x30ff19=await readdir(_0x412b78,{'withFileTypes':!![]});for(const _0x1769eb of _0x30ff19){const _0x348b11=join(_0x412b78,_0x1769eb[_0x1f7a0f(0x1f9)]);if(_0x1769eb[_0x1f7a0f(0x1d5)]())_0x1174e3[_0x1f7a0f(0x1f1)](...await scanJsFilesRecursively(_0x348b11,_0x7b47f+'/'+_0x1769eb[_0x1f7a0f(0x1f9)]));else _0x1769eb[_0x1f7a0f(0x1f0)]()&&_0x1769eb[_0x1f7a0f(0x1f9)][_0x1f7a0f(0x1eb)](_0x1f7a0f(0x1de))&&_0x1174e3[_0x1f7a0f(0x1f1)]({'lockKey':_0x7b47f+'/'+_0x1769eb[_0x1f7a0f(0x1f9)][_0x1f7a0f(0x1ec)](/\.js$/,''),'filePath':_0x348b11});}}catch(_0x1ab9aa){if(_0x1ab9aa[_0x1f7a0f(0x1db)]!==_0x1f7a0f(0x1ed))throw _0x1ab9aa;}return _0x1174e3;}async function scanFlatFunctions(_0x1d371b,_0x390457){const _0x2d0dba=a238_0x11b8b0,_0x20d331=join(_0x1d371b[_0x2d0dba(0x1e5)],_0x390457),_0x32b9cd=await scanJsFilesRecursively(_0x20d331,_0x390457);return _0x32b9cd[_0x2d0dba(0x1fb)](({lockKey:_0x4470f5,filePath:_0x3b8d4d})=>({'type':_0x390457,'name':_0x4470f5[_0x2d0dba(0x1f7)]('/')['at'](-0x1)??'','filePath':_0x3b8d4d,'lockKey':_0x4470f5}));}async function scanHookFunctions(_0x46aed7){const _0x5e55fc=a238_0x11b8b0,_0x4c837b=join(_0x46aed7[_0x5e55fc(0x1e5)],_0x5e55fc(0x1d3)),_0x47e8ed=[];try{const _0x5aafe6=await readdir(_0x4c837b,{'withFileTypes':!![]});for(const _0x8a820f of _0x5aafe6){if(!_0x8a820f[_0x5e55fc(0x1d5)]())continue;const _0x26efa7=_0x8a820f[_0x5e55fc(0x1f9)],_0x28705e=join(_0x4c837b,_0x26efa7),_0xf6c74f=await readdir(_0x28705e,{'withFileTypes':!![]});for(const _0x4e5c31 of _0xf6c74f){if(!_0x4e5c31[_0x5e55fc(0x1d5)]())continue;const _0x17c51d=_0x4e5c31[_0x5e55fc(0x1f9)],_0x43ae56=join(_0x28705e,_0x17c51d),_0x22e422=await readdir(_0x43ae56,{'withFileTypes':!![]});for(const _0x1bb12b of _0x22e422){if(!_0x1bb12b[_0x5e55fc(0x1d5)]())continue;const _0x572bb8=_0x1bb12b['name'],_0x5e6c69=join(_0x43ae56,_0x572bb8),_0x29088e=await readdir(_0x5e6c69,{'withFileTypes':!![]});for(const _0x4be3f5 of _0x29088e){if(!_0x4be3f5[_0x5e55fc(0x1f0)]()||!_0x4be3f5[_0x5e55fc(0x1f9)][_0x5e55fc(0x1eb)](_0x5e55fc(0x1de)))continue;const _0x5bccde=_0x4be3f5['name']['replace'](/\.js$/,'');_0x47e8ed[_0x5e55fc(0x1f1)]({'type':'HOOK','name':_0x5bccde,'filePath':join(_0x5e6c69,_0x4be3f5[_0x5e55fc(0x1f9)]),'lockKey':_0x5e55fc(0x1df)+_0x26efa7+'/'+_0x17c51d+'/'+_0x572bb8+'/'+_0x5bccde,'alias':_0x26efa7,'operationType':_0x17c51d,'functionNode':_0x572bb8});}}}}}catch(_0x23154e){if(_0x23154e[_0x5e55fc(0x1db)]!=='ENOENT')throw _0x23154e;}return _0x47e8ed;}export async function scanLocalBffFunctions(_0x2132b8,_0x525324){const _0x4aa000=a238_0x11b8b0;if(_0x525324===_0x4aa000(0x1d1)||_0x525324===_0x4aa000(0x1d9))return scanFlatFunctions(_0x2132b8,_0x525324);if(_0x525324===_0x4aa000(0x1d3))return scanHookFunctions(_0x2132b8);const [_0x27000e,_0x349a45,_0x54e6e8]=await Promise[_0x4aa000(0x1e9)]([scanFlatFunctions(_0x2132b8,_0x4aa000(0x1d1)),scanFlatFunctions(_0x2132b8,_0x4aa000(0x1d9)),scanHookFunctions(_0x2132b8)]);return[..._0x27000e,..._0x349a45,..._0x54e6e8];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x14ea03){return SAFE_LOCK_KEY_SEGMENT['test'](_0x14ea03)&&_0x14ea03!=='.'&&_0x14ea03!=='..';}export function resolveLocalFilePathFromLockKey(_0x40f47a,_0x4db593){const _0x255445=a238_0x11b8b0,_0x113370=_0x4db593[_0x255445(0x1f7)]('/');if(!_0x113370[_0x255445(0x1f4)](isSafeLockKeySegment))throw new Error(_0x255445(0x1ee)+_0x4db593);const _0x21c9bd=resolve(join(_0x40f47a[_0x255445(0x1e5)],..._0x113370)+_0x255445(0x1de)),_0xdb1eae=resolve(_0x40f47a[_0x255445(0x1e5)]);if(_0x21c9bd!==_0xdb1eae&&!_0x21c9bd[_0x255445(0x1e4)](_0xdb1eae+sep))throw new Error(_0x255445(0x1f3)+_0x21c9bd);return _0x21c9bd;}export function createHookLocationMap(_0x159780){const _0x68288=a238_0x11b8b0,_0x15dcb8=new Map();for(const _0xa23ac4 of _0x159780){_0xa23ac4[_0x68288(0x1f8)]&&_0x15dcb8[_0x68288(0x1f2)](_0xa23ac4[_0x68288(0x1f8)],{'datasetCode':_0xa23ac4[_0x68288(0x1fd)],'operationType':snakeToCamel(_0xa23ac4['operationType']),'functionNode':_0x68288(0x1e0)}),_0xa23ac4[_0x68288(0x1e6)]&&_0x15dcb8[_0x68288(0x1f2)](_0xa23ac4[_0x68288(0x1e6)],{'datasetCode':_0xa23ac4['datasetCode'],'operationType':snakeToCamel(_0xa23ac4[_0x68288(0x1d2)]),'functionNode':'after'});}return _0x15dcb8;}export function resolveRemoteScriptTarget(_0x4049b9,_0x31b4a7,_0x59f4cc,_0x15ab43,_0x59156b){const _0x25d380=a238_0x11b8b0,_0x39fa29=normalizeBffType(_0x31b4a7['scriptType']);if(!_0x39fa29||!_0x31b4a7['functionName'])return null;if(_0x39fa29===_0x25d380(0x1d3)){const _0x340064=(_0x31b4a7['id']?_0x59f4cc[_0x25d380(0x1da)](_0x31b4a7['id']):undefined)??findHookLocationByRemoteId(_0x15ab43,_0x31b4a7['id']);if(!_0x340064)return null;const _0x1e3302=_0x340064[_0x25d380(0x1d7)]||_0x59156b[_0x25d380(0x1da)](_0x340064[_0x25d380(0x1fd)]),_0x48ed3b=_0x1e3302??_0x340064[_0x25d380(0x1fd)],_0x30911f={..._0x340064,'alias':_0x1e3302},_0x4e0900=_0x25d380(0x1df)+_0x48ed3b+'/'+_0x30911f[_0x25d380(0x1d2)]+'/'+_0x30911f[_0x25d380(0x1f6)]+'/'+_0x31b4a7['functionName'];if(!_0x4e0900[_0x25d380(0x1f7)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x4e0900,'filePath':resolveLocalFilePathFromLockKey(_0x4049b9,_0x4e0900),'type':'HOOK','hookLocation':_0x30911f};}const _0x42106c=_0x39fa29+'/'+_0x31b4a7[_0x25d380(0x1dc)];if(!_0x42106c[_0x25d380(0x1f7)]('/')[_0x25d380(0x1f4)](isSafeLockKeySegment))return null;return{'lockKey':_0x42106c,'filePath':resolveLocalFilePathFromLockKey(_0x4049b9,_0x42106c),'type':_0x39fa29};}export async function ensureParentDirectory(_0x3411ed){await mkdir(dirname(_0x3411ed),{'recursive':!![]});}export async function fileExists(_0x1ea72c){try{return await access(_0x1ea72c,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x3a0ffe){const _0x3d4f06=a238_0x11b8b0;try{const _0x1879b9=await stat(_0x3a0ffe);return _0x1879b9[_0x3d4f06(0x1d5)]();}catch{return![];}}
1
+ const a238_0x220cd3=a238_0x3fd7;(function(_0x51be2c,_0x598c06){const _0x1812f4=a238_0x3fd7,_0x341cbb=_0x51be2c();while(!![]){try{const _0x400b08=parseInt(_0x1812f4(0xf0))/0x1*(-parseInt(_0x1812f4(0xf9))/0x2)+parseInt(_0x1812f4(0xf7))/0x3+parseInt(_0x1812f4(0xf1))/0x4*(parseInt(_0x1812f4(0xfe))/0x5)+parseInt(_0x1812f4(0xee))/0x6+parseInt(_0x1812f4(0xd6))/0x7*(parseInt(_0x1812f4(0xea))/0x8)+parseInt(_0x1812f4(0xed))/0x9*(-parseInt(_0x1812f4(0xf8))/0xa)+-parseInt(_0x1812f4(0xfc))/0xb;if(_0x400b08===_0x598c06)break;else _0x341cbb['push'](_0x341cbb['shift']());}catch(_0x5b3536){_0x341cbb['push'](_0x341cbb['shift']());}}}(a238_0x3fbe,0x47861));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a238_0x220cd3(0xe5),a238_0x220cd3(0xf6),a238_0x220cd3(0xd7)];export function normalizeBffType(_0x55714c){const _0x404c07=a238_0x220cd3;if(!_0x55714c)return undefined;const _0x9061=_0x55714c[_0x404c07(0xe7)]()[_0x404c07(0xe4)]();return SUPPORTED_BFF_TYPES[_0x404c07(0xf4)](_0x9061)?_0x9061:undefined;}async function scanJsFilesRecursively(_0x55ffe7,_0x7eb3f2){const _0x1d8e8a=a238_0x220cd3,_0xa8263f=[];try{const _0x544f41=await readdir(_0x55ffe7,{'withFileTypes':!![]});for(const _0x28f008 of _0x544f41){const _0x2d6f15=join(_0x55ffe7,_0x28f008[_0x1d8e8a(0xff)]);if(_0x28f008[_0x1d8e8a(0xf2)]())_0xa8263f[_0x1d8e8a(0xe8)](...await scanJsFilesRecursively(_0x2d6f15,_0x7eb3f2+'/'+_0x28f008['name']));else _0x28f008[_0x1d8e8a(0xeb)]()&&_0x28f008['name'][_0x1d8e8a(0xfa)]('.js')&&_0xa8263f['push']({'lockKey':_0x7eb3f2+'/'+_0x28f008['name'][_0x1d8e8a(0xe6)](/\.js$/,''),'filePath':_0x2d6f15});}}catch(_0xcf91ca){if(_0xcf91ca[_0x1d8e8a(0xe2)]!=='ENOENT')throw _0xcf91ca;}return _0xa8263f;}async function scanFlatFunctions(_0x5e58f2,_0x1526c6){const _0x40d356=a238_0x220cd3,_0x59ccf6=join(_0x5e58f2[_0x40d356(0x100)],_0x1526c6),_0x464705=await scanJsFilesRecursively(_0x59ccf6,_0x1526c6);return _0x464705[_0x40d356(0xef)](({lockKey:_0x370ff9,filePath:_0x45d24d})=>({'type':_0x1526c6,'name':_0x370ff9['split']('/')['at'](-0x1)??'','filePath':_0x45d24d,'lockKey':_0x370ff9}));}async function scanHookFunctions(_0x1e0475){const _0x309870=a238_0x220cd3,_0x2953f8=join(_0x1e0475[_0x309870(0x100)],_0x309870(0xd7)),_0x69ebc2=[];try{const _0x537466=await readdir(_0x2953f8,{'withFileTypes':!![]});for(const _0x5d7d00 of _0x537466){if(!_0x5d7d00[_0x309870(0xf2)]())continue;const _0x62167e=_0x5d7d00['name'],_0x31acb4=join(_0x2953f8,_0x62167e),_0x2e542f=await readdir(_0x31acb4,{'withFileTypes':!![]});for(const _0x1ea9a1 of _0x2e542f){if(!_0x1ea9a1[_0x309870(0xf2)]())continue;const _0x453057=_0x1ea9a1[_0x309870(0xff)],_0xa58273=join(_0x31acb4,_0x453057),_0x469b25=await readdir(_0xa58273,{'withFileTypes':!![]});for(const _0x476ef3 of _0x469b25){if(!_0x476ef3['isDirectory']())continue;const _0x37ca45=_0x476ef3[_0x309870(0xff)],_0x4a319f=join(_0xa58273,_0x37ca45),_0x4f1423=await readdir(_0x4a319f,{'withFileTypes':!![]});for(const _0x46c400 of _0x4f1423){if(!_0x46c400[_0x309870(0xeb)]()||!_0x46c400[_0x309870(0xff)][_0x309870(0xfa)]('.js'))continue;const _0x412ee6=_0x46c400[_0x309870(0xff)][_0x309870(0xe6)](/\.js$/,'');_0x69ebc2['push']({'type':_0x309870(0xd7),'name':_0x412ee6,'filePath':join(_0x4a319f,_0x46c400[_0x309870(0xff)]),'lockKey':_0x309870(0xdc)+_0x62167e+'/'+_0x453057+'/'+_0x37ca45+'/'+_0x412ee6,'alias':_0x62167e,'operationType':_0x453057,'functionNode':_0x37ca45});}}}}}catch(_0x445104){if(_0x445104['code']!==_0x309870(0xec))throw _0x445104;}return _0x69ebc2;}export async function scanLocalBffFunctions(_0x1d9380,_0x5b9242){const _0x2d09a3=a238_0x220cd3;if(_0x5b9242==='COMMON'||_0x5b9242==='ENDPOINT')return scanFlatFunctions(_0x1d9380,_0x5b9242);if(_0x5b9242===_0x2d09a3(0xd7))return scanHookFunctions(_0x1d9380);const [_0x2e1ccd,_0x59cbb1,_0x885a14]=await Promise[_0x2d09a3(0xfd)]([scanFlatFunctions(_0x1d9380,_0x2d09a3(0xe5)),scanFlatFunctions(_0x1d9380,_0x2d09a3(0xf6)),scanHookFunctions(_0x1d9380)]);return[..._0x2e1ccd,..._0x59cbb1,..._0x885a14];}function a238_0x3fbe(){const _0x42a077=['HOOK/','get','beforeScriptId','split','test','scriptType','code','set','toUpperCase','COMMON','replace','trim','push','.js','94856bELbKQ','isFile','ENOENT','17361uTRyht','2590872jTKVMl','map','74446AcmzJz','1305580CbPeYd','isDirectory','startsWith','includes','operationType','ENDPOINT','937302VXnYTJ','2570hHEAPL','6KmCiWx','endsWith','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','1296614hubKQb','all','5NkLIiP','name','scriptsRootDir','datasetCode','35cQZjux','HOOK','afterScriptId','functionNode','alias','every'];a238_0x3fbe=function(){return _0x42a077;};return a238_0x3fbe();}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x37392f){const _0x564be1=a238_0x220cd3;return SAFE_LOCK_KEY_SEGMENT[_0x564be1(0xe0)](_0x37392f)&&_0x37392f!=='.'&&_0x37392f!=='..';}export function resolveLocalFilePathFromLockKey(_0x2a2b5f,_0x55fa16){const _0x3121ed=a238_0x220cd3,_0x3e21a7=_0x55fa16[_0x3121ed(0xdf)]('/');if(!_0x3e21a7[_0x3121ed(0xdb)](isSafeLockKeySegment))throw new Error('Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20'+_0x55fa16);const _0x4ca305=resolve(join(_0x2a2b5f[_0x3121ed(0x100)],..._0x3e21a7)+_0x3121ed(0xe9)),_0x2c1ea1=resolve(_0x2a2b5f[_0x3121ed(0x100)]);if(_0x4ca305!==_0x2c1ea1&&!_0x4ca305[_0x3121ed(0xf3)](_0x2c1ea1+sep))throw new Error(_0x3121ed(0xfb)+_0x4ca305);return _0x4ca305;}export function createHookLocationMap(_0x2bfec8){const _0x3f5d81=a238_0x220cd3,_0xd63a25=new Map();for(const _0x1211c5 of _0x2bfec8){_0x1211c5[_0x3f5d81(0xde)]&&_0xd63a25['set'](_0x1211c5[_0x3f5d81(0xde)],{'datasetCode':_0x1211c5[_0x3f5d81(0xd5)],'operationType':snakeToCamel(_0x1211c5[_0x3f5d81(0xf5)]),'functionNode':'before'}),_0x1211c5['afterScriptId']&&_0xd63a25[_0x3f5d81(0xe3)](_0x1211c5[_0x3f5d81(0xd8)],{'datasetCode':_0x1211c5[_0x3f5d81(0xd5)],'operationType':snakeToCamel(_0x1211c5[_0x3f5d81(0xf5)]),'functionNode':'after'});}return _0xd63a25;}function a238_0x3fd7(_0x5bc663,_0xd35107){_0x5bc663=_0x5bc663-0xd5;const _0x3fbe86=a238_0x3fbe();let _0x3fd71c=_0x3fbe86[_0x5bc663];return _0x3fd71c;}export function resolveRemoteScriptTarget(_0x15c14b,_0x545941,_0x367a0b,_0x4daf48,_0x507428){const _0x40a724=a238_0x220cd3,_0x50eb76=normalizeBffType(_0x545941[_0x40a724(0xe1)]);if(!_0x50eb76||!_0x545941['functionName'])return null;if(_0x50eb76==='HOOK'){const _0x27c8d1=(_0x545941['id']?_0x367a0b[_0x40a724(0xdd)](_0x545941['id']):undefined)??findHookLocationByRemoteId(_0x4daf48,_0x545941['id']);if(!_0x27c8d1)return null;const _0x2480c2=_0x27c8d1[_0x40a724(0xda)]||_0x507428['get'](_0x27c8d1[_0x40a724(0xd5)]),_0x5ac54e=_0x2480c2??_0x27c8d1['datasetCode'],_0x1c7db6={..._0x27c8d1,'alias':_0x2480c2},_0x4f28cd='HOOK/'+_0x5ac54e+'/'+_0x1c7db6[_0x40a724(0xf5)]+'/'+_0x1c7db6[_0x40a724(0xd9)]+'/'+_0x545941['functionName'];if(!_0x4f28cd[_0x40a724(0xdf)]('/')[_0x40a724(0xdb)](isSafeLockKeySegment))return null;return{'lockKey':_0x4f28cd,'filePath':resolveLocalFilePathFromLockKey(_0x15c14b,_0x4f28cd),'type':_0x40a724(0xd7),'hookLocation':_0x1c7db6};}const _0x2be14c=_0x50eb76+'/'+_0x545941['functionName'];if(!_0x2be14c[_0x40a724(0xdf)]('/')[_0x40a724(0xdb)](isSafeLockKeySegment))return null;return{'lockKey':_0x2be14c,'filePath':resolveLocalFilePathFromLockKey(_0x15c14b,_0x2be14c),'type':_0x50eb76};}export async function ensureParentDirectory(_0x3c4569){await mkdir(dirname(_0x3c4569),{'recursive':!![]});}export async function fileExists(_0x2e237b){try{return await access(_0x2e237b,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x1c8eb0){const _0x2d0ef1=a238_0x220cd3;try{const _0x1f65be=await stat(_0x1c8eb0);return _0x1f65be[_0x2d0ef1(0xf2)]();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3942bc,_0x5ea001){const _0x2bc47e=a239_0x5d26,_0x56bbea=_0x3942bc();while(!![]){try{const _0x4e4992=parseInt(_0x2bc47e(0x101))/0x1*(-parseInt(_0x2bc47e(0x104))/0x2)+-parseInt(_0x2bc47e(0x10b))/0x3*(parseInt(_0x2bc47e(0x10a))/0x4)+-parseInt(_0x2bc47e(0x103))/0x5*(-parseInt(_0x2bc47e(0x109))/0x6)+parseInt(_0x2bc47e(0x107))/0x7+-parseInt(_0x2bc47e(0x10c))/0x8+parseInt(_0x2bc47e(0x106))/0x9+parseInt(_0x2bc47e(0x108))/0xa;if(_0x4e4992===_0x5ea001)break;else _0x56bbea['push'](_0x56bbea['shift']());}catch(_0x2ef7ef){_0x56bbea['push'](_0x56bbea['shift']());}}}(a239_0x40ab,0x79cf6));function a239_0x40ab(){const _0x444e90=['12109200fAtqfl','51060Kydofh','4sKdJhO','1937811OpVnZP','1785048WLazGu','39478IfEEHL','hex','460wdoali','40ACXugx','utf8','779202MmnAeM','540008UXUneO'];a239_0x40ab=function(){return _0x444e90;};return a239_0x40ab();}import{readFile}from'node:fs/promises';import a239_0x4677e8 from'node:crypto';function a239_0x5d26(_0x5a7f92,_0x50bfb2){_0x5a7f92=_0x5a7f92-0x101;const _0x40ab46=a239_0x40ab();let _0x5d2623=_0x40ab46[_0x5a7f92];return _0x5d2623;}export function computeContentHash(_0x364bdf){const _0x18619d=a239_0x5d26;return a239_0x4677e8['createHash']('md5')['update'](_0x364bdf)['digest'](_0x18619d(0x102));}export async function computeFileHash(_0x3a6d74){const _0x3f0425=a239_0x5d26,_0x2ca1f2=await readFile(_0x3a6d74,_0x3f0425(0x105));return computeContentHash(_0x2ca1f2);}
1
+ (function(_0x2d4b9e,_0x43e198){const _0x193780=a239_0x22be,_0xf394cf=_0x2d4b9e();while(!![]){try{const _0x4667ee=parseInt(_0x193780(0x196))/0x1*(parseInt(_0x193780(0x197))/0x2)+-parseInt(_0x193780(0x19b))/0x3+parseInt(_0x193780(0x190))/0x4*(parseInt(_0x193780(0x19c))/0x5)+-parseInt(_0x193780(0x193))/0x6+-parseInt(_0x193780(0x18f))/0x7+-parseInt(_0x193780(0x199))/0x8*(parseInt(_0x193780(0x18e))/0x9)+parseInt(_0x193780(0x19a))/0xa*(parseInt(_0x193780(0x192))/0xb);if(_0x4667ee===_0x43e198)break;else _0xf394cf['push'](_0xf394cf['shift']());}catch(_0x448432){_0xf394cf['push'](_0xf394cf['shift']());}}}(a239_0xb421,0x94a6b));import{readFile}from'node:fs/promises';function a239_0x22be(_0x54dfa2,_0x16f133){_0x54dfa2=_0x54dfa2-0x18e;const _0xb421e7=a239_0xb421();let _0x22bef6=_0xb421e7[_0x54dfa2];return _0x22bef6;}import a239_0x5bb2f8 from'node:crypto';export function computeContentHash(_0x828809){const _0x15ba7b=a239_0x22be;return a239_0x5bb2f8['createHash'](_0x15ba7b(0x194))[_0x15ba7b(0x198)](_0x828809)[_0x15ba7b(0x195)](_0x15ba7b(0x191));}function a239_0xb421(){const _0x5afbfb=['580ndXFlI','8001wkJASX','6494257dzfOUc','20164haVtxH','hex','4166052WQSLER','2468754GXRbPB','md5','digest','3907joYFEe','486pIgwCc','update','1632mQarej','40NqUzJT','2758932kTVYCt'];a239_0xb421=function(){return _0x5afbfb;};return a239_0xb421();}export async function computeFileHash(_0x358b64){const _0x42a7fe=await readFile(_0x358b64,'utf8');return computeContentHash(_0x42a7fe);}
@@ -1 +1 @@
1
- function a240_0x1368(_0x160700,_0x3bbe10){_0x160700=_0x160700-0x119;const _0x146735=a240_0x1467();let _0x13686e=_0x146735[_0x160700];return _0x13686e;}(function(_0x269f3b,_0x1b255e){const _0x26f8fa=a240_0x1368,_0x503ef2=_0x269f3b();while(!![]){try{const _0x1a5bcb=parseInt(_0x26f8fa(0x121))/0x1*(parseInt(_0x26f8fa(0x12f))/0x2)+parseInt(_0x26f8fa(0x125))/0x3*(-parseInt(_0x26f8fa(0x120))/0x4)+parseInt(_0x26f8fa(0x124))/0x5*(-parseInt(_0x26f8fa(0x128))/0x6)+-parseInt(_0x26f8fa(0x132))/0x7*(-parseInt(_0x26f8fa(0x11b))/0x8)+-parseInt(_0x26f8fa(0x130))/0x9+-parseInt(_0x26f8fa(0x11c))/0xa*(parseInt(_0x26f8fa(0x12e))/0xb)+parseInt(_0x26f8fa(0x12c))/0xc*(parseInt(_0x26f8fa(0x11f))/0xd);if(_0x1a5bcb===_0x1b255e)break;else _0x503ef2['push'](_0x503ef2['shift']());}catch(_0x2d9b2b){_0x503ef2['push'](_0x503ef2['shift']());}}}(a240_0x1467,0x658b6));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x5f4679,_0x17af17,_0xc7d9b5,_0x1bbecd){const _0x499e76=a240_0x1368,_0x33157e={'apps':_0x5f4679[_0x499e76(0x127)]&&typeof _0x5f4679[_0x499e76(0x127)]===_0x499e76(0x11d)?_0x5f4679[_0x499e76(0x127)]:{}};let _0x4758f1=_0x33157e['apps'][_0x17af17];if(!_0x4758f1)return _0x4758f1={'scriptsRoot':_0xc7d9b5,'lastSync':'','functions':{}},_0x33157e[_0x499e76(0x127)][_0x17af17]=_0x4758f1,{'lockData':_0x33157e,'appLock':_0x4758f1};if(!_0x4758f1[_0x499e76(0x119)])_0x4758f1[_0x499e76(0x119)]=_0xc7d9b5;else{if(_0x4758f1[_0x499e76(0x119)]!==_0xc7d9b5)throw new Error(_0x1bbecd+_0x499e76(0x11e)+(_0x499e76(0x12b)+_0xc7d9b5+_0x499e76(0x11a)+_0x4758f1[_0x499e76(0x119)]+'\x22.\x20')+_0x499e76(0x122));}return!_0x4758f1[_0x499e76(0x131)]&&(_0x4758f1['functions']={}),!_0x4758f1[_0x499e76(0x12a)]&&(_0x4758f1[_0x499e76(0x12a)]=''),{'lockData':_0x33157e,'appLock':_0x4758f1};}export async function readBffLockFile(_0x22bd2b){const _0x226855=a240_0x1368;try{const _0x162583=await readFile(_0x22bd2b,_0x226855(0x126)),_0x347b3b=JSON[_0x226855(0x129)](_0x162583);return{'apps':_0x347b3b[_0x226855(0x127)]&&typeof _0x347b3b['apps']===_0x226855(0x11d)?_0x347b3b[_0x226855(0x127)]:{}};}catch(_0x591888){if(_0x591888['code']==='ENOENT')return null;throw new Error(_0x226855(0x123)+String(_0x591888));}}export async function writeBffLockFile(_0x547cd6,_0x2133cd){const _0x324a41=a240_0x1368;await mkdir(dirname(_0x547cd6),{'recursive':!![]}),await writeFile(_0x547cd6,JSON[_0x324a41(0x12d)](_0x2133cd,null,0x2),_0x324a41(0x126));}function a240_0x1467(){const _0x28245f=['986562hfXvKI','parse','lastSync','current\x20\x22','24pshnIg','stringify','77MaIlxU','6NrBxmn','3438927gqHChb','functions','3580521yaXXWr','scriptsRoot','\x22\x20vs\x20lock\x20\x22','8YrqDfZ','821320ztNDiA','object',':\x20scriptsRoot\x20mismatch\x20—\x20','4741763OcvBDp','164564TPrGPd','235837fOMDkc','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','15nLvmdX','6znadgS','utf8','apps'];a240_0x1467=function(){return _0x28245f;};return a240_0x1467();}
1
+ (function(_0x590dd4,_0x316924){const _0x2a945a=a240_0x225c,_0x1ede76=_0x590dd4();while(!![]){try{const _0x452a49=parseInt(_0x2a945a(0x69))/0x1*(parseInt(_0x2a945a(0x72))/0x2)+-parseInt(_0x2a945a(0x68))/0x3+parseInt(_0x2a945a(0x67))/0x4+parseInt(_0x2a945a(0x75))/0x5*(parseInt(_0x2a945a(0x70))/0x6)+-parseInt(_0x2a945a(0x6a))/0x7+-parseInt(_0x2a945a(0x6e))/0x8*(parseInt(_0x2a945a(0x6b))/0x9)+parseInt(_0x2a945a(0x73))/0xa;if(_0x452a49===_0x316924)break;else _0x1ede76['push'](_0x1ede76['shift']());}catch(_0x440ee7){_0x1ede76['push'](_0x1ede76['shift']());}}}(a240_0x561f,0x716de));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a240_0x225c(_0x2df489,_0x2dd350){_0x2df489=_0x2df489-0x64;const _0x561fbf=a240_0x561f();let _0x225c8f=_0x561fbf[_0x2df489];return _0x225c8f;}function a240_0x561f(){const _0x552be4=['171937wVBfPx','4818905UNKBfd','302301PxjAFG','scriptsRoot','utf8','40WNjqlB','lastSync','42XvAUXR','apps','6emSGks','59880MciYQW',':\x20scriptsRoot\x20mismatch\x20—\x20','612195ARBCQf','object','parse','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','code','\x22.\x20','ENOENT','functions','1299356qWDvEi','1148235dRTpMH'];a240_0x561f=function(){return _0x552be4;};return a240_0x561f();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x595416,_0x232e60,_0x353f1b,_0x30d08d){const _0x254631=a240_0x225c,_0x4cd1a0={'apps':_0x595416[_0x254631(0x71)]&&typeof _0x595416[_0x254631(0x71)]===_0x254631(0x76)?_0x595416[_0x254631(0x71)]:{}};let _0x29f09a=_0x4cd1a0[_0x254631(0x71)][_0x232e60];if(!_0x29f09a)return _0x29f09a={'scriptsRoot':_0x353f1b,'lastSync':'','functions':{}},_0x4cd1a0[_0x254631(0x71)][_0x232e60]=_0x29f09a,{'lockData':_0x4cd1a0,'appLock':_0x29f09a};if(!_0x29f09a[_0x254631(0x6c)])_0x29f09a[_0x254631(0x6c)]=_0x353f1b;else{if(_0x29f09a[_0x254631(0x6c)]!==_0x353f1b)throw new Error(_0x30d08d+_0x254631(0x74)+('current\x20\x22'+_0x353f1b+'\x22\x20vs\x20lock\x20\x22'+_0x29f09a[_0x254631(0x6c)]+_0x254631(0x64))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x29f09a[_0x254631(0x66)]&&(_0x29f09a['functions']={}),!_0x29f09a[_0x254631(0x6f)]&&(_0x29f09a[_0x254631(0x6f)]=''),{'lockData':_0x4cd1a0,'appLock':_0x29f09a};}export async function readBffLockFile(_0x40ad1c){const _0xa9aba2=a240_0x225c;try{const _0x43ef52=await readFile(_0x40ad1c,_0xa9aba2(0x6d)),_0x10cb60=JSON[_0xa9aba2(0x77)](_0x43ef52);return{'apps':_0x10cb60[_0xa9aba2(0x71)]&&typeof _0x10cb60['apps']===_0xa9aba2(0x76)?_0x10cb60['apps']:{}};}catch(_0x1c5dab){if(_0x1c5dab[_0xa9aba2(0x79)]===_0xa9aba2(0x65))return null;throw new Error(_0xa9aba2(0x78)+String(_0x1c5dab));}}export async function writeBffLockFile(_0x2410cd,_0x54ac3c){await mkdir(dirname(_0x2410cd),{'recursive':!![]}),await writeFile(_0x2410cd,JSON['stringify'](_0x54ac3c,null,0x2),'utf8');}
@@ -1 +1 @@
1
- const a242_0x1607fe=a242_0x1e7c;(function(_0x5d957e,_0x4d9327){const _0x47f616=a242_0x1e7c,_0x46cfd3=_0x5d957e();while(!![]){try{const _0x290b08=parseInt(_0x47f616(0x14b))/0x1+parseInt(_0x47f616(0x141))/0x2+-parseInt(_0x47f616(0x14e))/0x3+parseInt(_0x47f616(0x135))/0x4+-parseInt(_0x47f616(0x137))/0x5*(-parseInt(_0x47f616(0x13e))/0x6)+-parseInt(_0x47f616(0x138))/0x7*(-parseInt(_0x47f616(0x139))/0x8)+-parseInt(_0x47f616(0x146))/0x9*(parseInt(_0x47f616(0x13d))/0xa);if(_0x290b08===_0x4d9327)break;else _0x46cfd3['push'](_0x46cfd3['shift']());}catch(_0x163911){_0x46cfd3['push'](_0x46cfd3['shift']());}}}(a242_0x2a70,0x1ce2e));export const DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20补充脚本功能描述';const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a242_0x1607fe(0x147);function a242_0x1e7c(_0x231b33,_0x3d43d9){_0x231b33=_0x231b33-0x135;const _0x2a703f=a242_0x2a70();let _0x1e7c1d=_0x2a703f[_0x231b33];return _0x1e7c1d;}export function snakeToCamel(_0x46e820){const _0x516f8f=a242_0x1607fe;return _0x46e820['toLowerCase']()[_0x516f8f(0x13c)](/_([a-z])/g,(_0x223d9a,_0x51476a)=>_0x51476a['toUpperCase']());}export function findHookLocationByRemoteId(_0x262e1d,_0x530d1c){const _0x526fc4=a242_0x1607fe;if(!_0x530d1c)return undefined;for(const _0x69313 of Object[_0x526fc4(0x13f)](_0x262e1d)){if(_0x69313['remoteId']===_0x530d1c&&_0x69313[_0x526fc4(0x14a)]&&_0x69313[_0x526fc4(0x14d)]&&_0x69313[_0x526fc4(0x143)])return{'datasetCode':_0x69313[_0x526fc4(0x14a)],'operationType':_0x69313[_0x526fc4(0x14d)],'functionNode':_0x69313[_0x526fc4(0x143)]};}return undefined;}function a242_0x2a70(){const _0x352c47=['split','operationType','181671mfLPIc','571380TzrZdj','match','670futGFU','651nhLDGE','13304FXcTXT','map','some','replace','4437190mTdGKu','906sqhJir','values','after','462886jNVmxS','toLowerCase','functionNode','trim','test','9qwOUxC','TODO:\x20add\x20script\x20description','before','startsWith','datasetCode','73413hWopbd'];a242_0x2a70=function(){return _0x352c47;};return a242_0x2a70();}export function extractScriptDescription(_0xe2d895){const _0x1eb18a=a242_0x1607fe,_0x2660bb=_0xe2d895[_0x1eb18a(0x136)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x2660bb?.[0x1])return undefined;const _0x4f097b=_0x2660bb[0x1],_0x2d248c=_0x43ab29=>{const _0x19588c=_0x1eb18a,_0x498d38=_0x43ab29?.[_0x19588c(0x144)]();if(!_0x498d38||_0x498d38===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x498d38===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x498d38;},_0x448e65=_0x4f097b[_0x1eb18a(0x136)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x448e65)return _0x2d248c(_0x448e65[0x1]);const _0xf3ff03=_0x4f097b[_0x1eb18a(0x14c)](/\r?\n/)[_0x1eb18a(0x13a)](_0x320700=>_0x320700[_0x1eb18a(0x13c)](/^\s*\*\s?/,'')[_0x1eb18a(0x144)]()),_0x2d6d32=_0xf3ff03['some'](_0x3a5d71=>/^\[\s*脚本类型\s*]\s*\S+/[_0x1eb18a(0x145)](_0x3a5d71))&&_0xf3ff03[_0x1eb18a(0x13b)](_0x253745=>/^\[\s*脚本名称\s*]\s*\S+/[_0x1eb18a(0x145)](_0x253745));if(!_0x2d6d32)return undefined;for(const _0x2b1ebb of _0xf3ff03){if(!_0x2b1ebb||_0x2b1ebb[_0x1eb18a(0x149)]('@')||/^\[[^\]]+]\s*/[_0x1eb18a(0x145)](_0x2b1ebb))continue;return _0x2d248c(_0x2b1ebb);}return undefined;}export function isValidBffFunctionName(_0x185d12){const _0x121f41=a242_0x1607fe;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x121f41(0x145)](_0x185d12);}export function normalizeHookFunctionNode(_0x5f0b86){const _0xbae597=a242_0x1607fe;if(!_0x5f0b86)return undefined;const _0x382356=_0x5f0b86['trim']()[_0xbae597(0x142)]();if(_0x382356===_0xbae597(0x148)||_0x382356===_0xbae597(0x140))return _0x382356;return undefined;}
1
+ const a242_0x36d792=a242_0x272a;(function(_0x1fd381,_0x747699){const _0x18038e=a242_0x272a,_0x30bec3=_0x1fd381();while(!![]){try{const _0x12a2e9=parseInt(_0x18038e(0x1de))/0x1*(parseInt(_0x18038e(0x1f2))/0x2)+parseInt(_0x18038e(0x1ed))/0x3*(parseInt(_0x18038e(0x1df))/0x4)+parseInt(_0x18038e(0x1f3))/0x5+parseInt(_0x18038e(0x1e1))/0x6+-parseInt(_0x18038e(0x1ec))/0x7+parseInt(_0x18038e(0x1eb))/0x8*(parseInt(_0x18038e(0x1e7))/0x9)+parseInt(_0x18038e(0x1e5))/0xa*(-parseInt(_0x18038e(0x1f4))/0xb);if(_0x12a2e9===_0x747699)break;else _0x30bec3['push'](_0x30bec3['shift']());}catch(_0x4768bd){_0x30bec3['push'](_0x30bec3['shift']());}}}(a242_0x17be,0x462f2));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a242_0x36d792(0x1f8);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION='TODO:\x20add\x20script\x20description';export function snakeToCamel(_0x2829b4){const _0x6fcd12=a242_0x36d792;return _0x2829b4[_0x6fcd12(0x1e4)]()[_0x6fcd12(0x1e0)](/_([a-z])/g,(_0x577192,_0x3f5872)=>_0x3f5872['toUpperCase']());}function a242_0x272a(_0x18b86f,_0x31c122){_0x18b86f=_0x18b86f-0x1de;const _0x17beb6=a242_0x17be();let _0x272a2f=_0x17beb6[_0x18b86f];return _0x272a2f;}export function findHookLocationByRemoteId(_0x3be47a,_0x583a77){const _0x364136=a242_0x36d792;if(!_0x583a77)return undefined;for(const _0x33077b of Object[_0x364136(0x1e9)](_0x3be47a)){if(_0x33077b[_0x364136(0x1ef)]===_0x583a77&&_0x33077b[_0x364136(0x1e3)]&&_0x33077b[_0x364136(0x1ea)]&&_0x33077b['functionNode'])return{'datasetCode':_0x33077b['datasetCode'],'operationType':_0x33077b[_0x364136(0x1ea)],'functionNode':_0x33077b[_0x364136(0x1f0)]};}return undefined;}export function extractScriptDescription(_0x43be2d){const _0x594083=a242_0x36d792,_0x3f48d7=_0x43be2d[_0x594083(0x1f7)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x3f48d7?.[0x1])return undefined;const _0x17731e=_0x3f48d7[0x1],_0x402286=_0x413270=>{const _0xc7729f=_0x594083,_0x39b189=_0x413270?.[_0xc7729f(0x1f1)]();if(!_0x39b189||_0x39b189===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x39b189===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x39b189;},_0x3e3a8a=_0x17731e['match'](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x3e3a8a)return _0x402286(_0x3e3a8a[0x1]);const _0x1fe24d=_0x17731e[_0x594083(0x1ee)](/\r?\n/)[_0x594083(0x1f9)](_0x1f89a4=>_0x1f89a4[_0x594083(0x1e0)](/^\s*\*\s?/,'')[_0x594083(0x1f1)]()),_0x4841f5=_0x1fe24d[_0x594083(0x1e2)](_0x3b080d=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x3b080d))&&_0x1fe24d[_0x594083(0x1e2)](_0x2770ad=>/^\[\s*脚本名称\s*]\s*\S+/[_0x594083(0x1f5)](_0x2770ad));if(!_0x4841f5)return undefined;for(const _0x5666e1 of _0x1fe24d){if(!_0x5666e1||_0x5666e1[_0x594083(0x1f6)]('@')||/^\[[^\]]+]\s*/[_0x594083(0x1f5)](_0x5666e1))continue;return _0x402286(_0x5666e1);}return undefined;}export function isValidBffFunctionName(_0x5359e4){const _0x2f1599=a242_0x36d792;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x2f1599(0x1f5)](_0x5359e4);}export function normalizeHookFunctionNode(_0xb30787){const _0x5ecbcd=a242_0x36d792;if(!_0xb30787)return undefined;const _0x200d31=_0xb30787['trim']()[_0x5ecbcd(0x1e4)]();if(_0x200d31===_0x5ecbcd(0x1e8)||_0x200d31===_0x5ecbcd(0x1e6))return _0x200d31;return undefined;}function a242_0x17be(){const _0x1237f8=['TODO:\x20补充脚本功能描述','map','31sUyuCG','8DWlJTX','replace','1803336OERUvx','some','datasetCode','toLowerCase','1606460tOIlZn','after','29088llMzoC','before','values','operationType','344YSTeCv','1482565aFlKgS','196908rSwOpx','split','remoteId','functionNode','trim','32874kMZOoL','1110740GtMmFC','55yBfOSJ','test','startsWith','match'];a242_0x17be=function(){return _0x1237f8;};return a242_0x17be();}
@@ -1 +1 @@
1
- function a243_0x3580(_0x1c8ffd,_0x5c4faa){_0x1c8ffd=_0x1c8ffd-0xac;const _0x5a2450=a243_0x5a24();let _0x3580f9=_0x5a2450[_0x1c8ffd];return _0x3580f9;}(function(_0x15bff8,_0x29913c){const _0x13bec4=a243_0x3580,_0x59ac73=_0x15bff8();while(!![]){try{const _0x544171=parseInt(_0x13bec4(0xc7))/0x1*(-parseInt(_0x13bec4(0xb7))/0x2)+parseInt(_0x13bec4(0xaf))/0x3*(parseInt(_0x13bec4(0xbe))/0x4)+-parseInt(_0x13bec4(0xc4))/0x5*(parseInt(_0x13bec4(0xb6))/0x6)+-parseInt(_0x13bec4(0xbf))/0x7*(-parseInt(_0x13bec4(0xc8))/0x8)+-parseInt(_0x13bec4(0xb8))/0x9+-parseInt(_0x13bec4(0xb9))/0xa+-parseInt(_0x13bec4(0xc6))/0xb*(-parseInt(_0x13bec4(0xc2))/0xc);if(_0x544171===_0x29913c)break;else _0x59ac73['push'](_0x59ac73['shift']());}catch(_0x3b6501){_0x59ac73['push'](_0x59ac73['shift']());}}}(a243_0x5a24,0x8dd41));import{listDatasets}from'../core/api-client.js';function a243_0x5a24(){const _0x52ab1b=['set','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','toLowerCase','entries','length','join','2034rMBWud','4HQbeXW','65916WGMhWt','10321830XyxtkQ','\x22\x20matches\x20multiple\x20databases:\x20','dbId','includes','dbName','1670892AVyjrO','875GIuUbb','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','.\x20Be\x20more\x20specific.','38028WkGuzz','filter','15085kinkPB','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','6094BiOFLn','265624SxRLnu','37336MyMMcb','db-','map','\x22\x20under\x20app\x20\x22','find','6uruFqV'];a243_0x5a24=function(){return _0x52ab1b;};return a243_0x5a24();}const cache=new Map();export async function listDatabases(_0x4bc8ea){const _0x51b583=a243_0x3580;if(cache['has'](_0x4bc8ea))return cache['get'](_0x4bc8ea);const _0x1b0b54=await listDatasets(_0x4bc8ea),_0x2dc08f=new Map();for(const _0x1e2d28 of _0x1b0b54){const _0x394ed9=_0x1e2d28['dbtableConfig'];_0x394ed9?.[_0x51b583(0xbb)]!=null&&_0x2dc08f[_0x51b583(0xb0)](_0x394ed9['dbId'],_0x394ed9[_0x51b583(0xbd)]??_0x51b583(0xc9)+_0x394ed9[_0x51b583(0xbb)]);}const _0xa067d3=[..._0x2dc08f[_0x51b583(0xb3)]()][_0x51b583(0xac)](([_0x29c2d1,_0x3a1d6c])=>({'dbId':_0x29c2d1,'dbName':_0x3a1d6c}));return cache[_0x51b583(0xb0)](_0x4bc8ea,_0xa067d3),_0xa067d3;}export async function resolveDb(_0x5495f0,_0x47904c){const _0x250c36=a243_0x3580,_0x583a86=await listDatabases(_0x5495f0);if(_0x583a86[_0x250c36(0xb4)]===0x0)return{'resolved':[],'error':_0x250c36(0xc0)+_0x5495f0+_0x250c36(0xc5)};if(!_0x47904c)return{'resolved':_0x583a86};const _0x3ecad5=Number(_0x47904c);if(!Number['isNaN'](_0x3ecad5)){const _0xb131c3=_0x583a86[_0x250c36(0xae)](_0xbccdd6=>_0xbccdd6['dbId']===_0x3ecad5);if(_0xb131c3)return{'resolved':[_0xb131c3]};}const _0x16ee0a=_0x47904c[_0x250c36(0xb2)](),_0x267076=_0x583a86[_0x250c36(0xc3)](_0x7f80de=>_0x7f80de[_0x250c36(0xbd)][_0x250c36(0xb2)]()[_0x250c36(0xbc)](_0x16ee0a));if(_0x267076[_0x250c36(0xb4)]>0x0)return{'resolved':_0x267076};const _0x3cb6c8=_0x583a86[_0x250c36(0xac)](_0x4f7da7=>_0x4f7da7[_0x250c36(0xbd)]+'\x20('+_0x4f7da7['dbId']+')')[_0x250c36(0xb5)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x47904c+_0x250c36(0xad)+_0x5495f0+'\x22.\x20Available:\x20'+_0x3cb6c8+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x4668ab,_0x4359fd){const _0x495530=a243_0x3580,{resolved:_0x4758b2,error:_0x5c25e2}=await resolveDb(_0x4668ab,_0x4359fd);if(_0x5c25e2)return{'db':null,'error':_0x5c25e2};if(_0x4758b2['length']===0x1)return{'db':_0x4758b2[0x0]};if(!_0x4359fd){const _0x39365d=_0x4758b2['map'](_0x202ae4=>_0x202ae4[_0x495530(0xbd)]+'\x20('+_0x202ae4['dbId']+')')['join'](',\x20');return{'db':null,'error':_0x495530(0xb1)+_0x39365d};}const _0x462c16=_0x4758b2[_0x495530(0xac)](_0x1e53c9=>_0x1e53c9[_0x495530(0xbd)]+'\x20('+_0x1e53c9[_0x495530(0xbb)]+')')[_0x495530(0xb5)](',\x20');return{'db':null,'error':'\x22'+_0x4359fd+_0x495530(0xba)+_0x462c16+_0x495530(0xc1)};}export async function getDbName(_0x2903f0,_0x5e84bf){const _0x19c573=a243_0x3580,_0x532e91=await listDatabases(_0x2903f0);return _0x532e91[_0x19c573(0xae)](_0x2203d9=>_0x2203d9[_0x19c573(0xbb)]===_0x5e84bf)?.[_0x19c573(0xbd)];}
1
+ (function(_0x1320a1,_0x1062f4){const _0x58e6b6=a243_0xc260,_0x1c682c=_0x1320a1();while(!![]){try{const _0x4f89e6=parseInt(_0x58e6b6(0x18e))/0x1*(parseInt(_0x58e6b6(0x17c))/0x2)+parseInt(_0x58e6b6(0x177))/0x3*(parseInt(_0x58e6b6(0x18a))/0x4)+parseInt(_0x58e6b6(0x18b))/0x5*(-parseInt(_0x58e6b6(0x185))/0x6)+-parseInt(_0x58e6b6(0x195))/0x7+parseInt(_0x58e6b6(0x186))/0x8+-parseInt(_0x58e6b6(0x183))/0x9+-parseInt(_0x58e6b6(0x190))/0xa*(-parseInt(_0x58e6b6(0x178))/0xb);if(_0x4f89e6===_0x1062f4)break;else _0x1c682c['push'](_0x1c682c['shift']());}catch(_0x5a9833){_0x1c682c['push'](_0x1c682c['shift']());}}}(a243_0x43a6,0x4011d));import{listDatasets}from'../core/api-client.js';function a243_0xc260(_0x539481,_0x4aa3df){_0x539481=_0x539481-0x177;const _0x43a67e=a243_0x43a6();let _0xc26076=_0x43a67e[_0x539481];return _0xc26076;}const cache=new Map();export async function listDatabases(_0xba7fdb){const _0x52d8aa=a243_0xc260;if(cache[_0x52d8aa(0x188)](_0xba7fdb))return cache[_0x52d8aa(0x192)](_0xba7fdb);const _0x513e5b=await listDatasets(_0xba7fdb),_0x5bf875=new Map();for(const _0x582aa9 of _0x513e5b){const _0x22258d=_0x582aa9[_0x52d8aa(0x184)];_0x22258d?.[_0x52d8aa(0x17e)]!=null&&_0x5bf875['set'](_0x22258d[_0x52d8aa(0x17e)],_0x22258d['dbName']??'db-'+_0x22258d[_0x52d8aa(0x17e)]);}const _0x4d59bc=[..._0x5bf875['entries']()][_0x52d8aa(0x18f)](([_0x250f64,_0x5ebfb0])=>({'dbId':_0x250f64,'dbName':_0x5ebfb0}));return cache[_0x52d8aa(0x180)](_0xba7fdb,_0x4d59bc),_0x4d59bc;}function a243_0x43a6(){const _0x97e3ad=['dbId','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','set','find','No\x20database\x20matching\x20\x22','4328658PTlUyX','dbtableConfig','510jGfSch','2589848yLehDA','dbName','has','.\x20Be\x20more\x20specific.','750744KkMKTg','16280CjZvzk','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','includes','15nwoCsg','map','1970IkuFTa','\x22\x20under\x20app\x20\x22','get','\x22.\x20Available:\x20','length','2142371xaxqdE','6VwJKOU','30833TnsLjj','toLowerCase','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','\x22\x20matches\x20multiple\x20databases:\x20','9988LILrmf','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'];a243_0x43a6=function(){return _0x97e3ad;};return a243_0x43a6();}export async function resolveDb(_0x44cbee,_0x48f95e){const _0x20eb20=a243_0xc260,_0x143821=await listDatabases(_0x44cbee);if(_0x143821[_0x20eb20(0x194)]===0x0)return{'resolved':[],'error':_0x20eb20(0x18c)+_0x44cbee+_0x20eb20(0x17d)};if(!_0x48f95e)return{'resolved':_0x143821};const _0x4d9083=Number(_0x48f95e);if(!Number['isNaN'](_0x4d9083)){const _0x7144c1=_0x143821[_0x20eb20(0x181)](_0x2f170e=>_0x2f170e['dbId']===_0x4d9083);if(_0x7144c1)return{'resolved':[_0x7144c1]};}const _0x2f0950=_0x48f95e[_0x20eb20(0x179)](),_0x6eb887=_0x143821['filter'](_0x4202c3=>_0x4202c3[_0x20eb20(0x187)]['toLowerCase']()[_0x20eb20(0x18d)](_0x2f0950));if(_0x6eb887['length']>0x0)return{'resolved':_0x6eb887};const _0x1425ad=_0x143821['map'](_0x28eb8a=>_0x28eb8a[_0x20eb20(0x187)]+'\x20('+_0x28eb8a['dbId']+')')['join'](',\x20');return{'resolved':[],'error':_0x20eb20(0x182)+_0x48f95e+_0x20eb20(0x191)+_0x44cbee+_0x20eb20(0x193)+_0x1425ad+_0x20eb20(0x17f)};}export async function resolveOneDb(_0x4db3cc,_0x13e073){const _0x1e9547=a243_0xc260,{resolved:_0x5cf0f5,error:_0x5d46f8}=await resolveDb(_0x4db3cc,_0x13e073);if(_0x5d46f8)return{'db':null,'error':_0x5d46f8};if(_0x5cf0f5['length']===0x1)return{'db':_0x5cf0f5[0x0]};if(!_0x13e073){const _0x3a4a9b=_0x5cf0f5['map'](_0x39566e=>_0x39566e[_0x1e9547(0x187)]+'\x20('+_0x39566e[_0x1e9547(0x17e)]+')')['join'](',\x20');return{'db':null,'error':_0x1e9547(0x17a)+_0x3a4a9b};}const _0x1f1fa7=_0x5cf0f5[_0x1e9547(0x18f)](_0x3f5fab=>_0x3f5fab[_0x1e9547(0x187)]+'\x20('+_0x3f5fab[_0x1e9547(0x17e)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0x13e073+_0x1e9547(0x17b)+_0x1f1fa7+_0x1e9547(0x189)};}export async function getDbName(_0x4a7f1e,_0x4572de){const _0x44591e=a243_0xc260,_0x243616=await listDatabases(_0x4a7f1e);return _0x243616[_0x44591e(0x181)](_0x323e56=>_0x323e56[_0x44591e(0x17e)]===_0x4572de)?.['dbName'];}
@@ -0,0 +1,30 @@
1
+ export type KnowledgeSearchScope = "public" | "company";
2
+ export interface KnowledgeSearchHit {
3
+ documentId: string;
4
+ revision: number;
5
+ chunkId: string;
6
+ scope: KnowledgeSearchScope;
7
+ title: string;
8
+ text: string;
9
+ tags: string[];
10
+ rank: number;
11
+ rawScore: number;
12
+ finalScore: number;
13
+ scoreKind: string;
14
+ }
15
+ export interface DevelopmentKnowledgeSearchResult {
16
+ schemaVersion: 2;
17
+ profile: "development";
18
+ total: number;
19
+ strategyFingerprint: string;
20
+ timingsMs: Record<string, number>;
21
+ hits: KnowledgeSearchHit[];
22
+ }
23
+ export interface DevelopmentKnowledgeSearchInput {
24
+ appCode: string;
25
+ cookie: string;
26
+ query: string;
27
+ topK?: number;
28
+ signal?: AbortSignal;
29
+ }
30
+ export declare function searchDevelopmentKnowledge(input: DevelopmentKnowledgeSearchInput): Promise<DevelopmentKnowledgeSearchResult>;
@@ -0,0 +1 @@
1
+ function a244_0x3dee(_0x90d2d3,_0x574f12){_0x90d2d3=_0x90d2d3-0x157;const _0x4f9703=a244_0x4f97();let _0x3dee4d=_0x4f9703[_0x90d2d3];return _0x3dee4d;}const a244_0x342bf0=a244_0x3dee;(function(_0x15e339,_0x1bc4fa){const _0x476d56=a244_0x3dee,_0x3711e1=_0x15e339();while(!![]){try{const _0x37e50d=parseInt(_0x476d56(0x16a))/0x1*(parseInt(_0x476d56(0x197))/0x2)+-parseInt(_0x476d56(0x173))/0x3*(-parseInt(_0x476d56(0x175))/0x4)+-parseInt(_0x476d56(0x18c))/0x5+parseInt(_0x476d56(0x19c))/0x6*(-parseInt(_0x476d56(0x157))/0x7)+parseInt(_0x476d56(0x15f))/0x8+parseInt(_0x476d56(0x15c))/0x9+-parseInt(_0x476d56(0x174))/0xa;if(_0x37e50d===_0x1bc4fa)break;else _0x3711e1['push'](_0x3711e1['shift']());}catch(_0x342895){_0x3711e1['push'](_0x3711e1['shift']());}}}(a244_0x4f97,0xa8124));import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=['schemaVersion',a244_0x342bf0(0x159),a244_0x342bf0(0x170),a244_0x342bf0(0x1a1),'strategyFingerprint','timingsMs'],HIT_KEYS=['documentId',a244_0x342bf0(0x18f),a244_0x342bf0(0x17f),a244_0x342bf0(0x16b),a244_0x342bf0(0x16e),a244_0x342bf0(0x16d),a244_0x342bf0(0x182),'rank',a244_0x342bf0(0x180),a244_0x342bf0(0x178),a244_0x342bf0(0x167)];export async function searchDevelopmentKnowledge(_0x306a82){const _0x56a5ac=a244_0x342bf0,_0x19430a=_0x306a82[_0x56a5ac(0x19d)][_0x56a5ac(0x196)](),_0x504c40=_0x306a82[_0x56a5ac(0x15a)]['trim']();if(!_0x19430a)throw CliErrors[_0x56a5ac(0x16c)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0x306a82[_0x56a5ac(0x1a3)][_0x56a5ac(0x196)]())throw CliErrors[_0x56a5ac(0x187)]();if(!_0x504c40)throw CliErrors[_0x56a5ac(0x16c)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x306a82['topK']);const _0x2e0da1=getKbDomain()+_0x56a5ac(0x17d);let _0x15d623;try{_0x15d623=await fetch(_0x2e0da1,{'method':_0x56a5ac(0x163),'headers':{'Content-Type':'application/json','Cookie':_0x306a82[_0x56a5ac(0x1a3)],'X-Invoke-Source':_0x56a5ac(0x15e)},'body':JSON[_0x56a5ac(0x1a2)]({'appCode':_0x19430a,'query':_0x504c40,..._0x306a82['topK']!==undefined?{'topK':_0x306a82['topK']}:{}}),'signal':_0x306a82['signal']});}catch(_0x5ea27c){if(_0x5ea27c instanceof CliError)throw _0x5ea27c;if(_0x5ea27c instanceof Error&&_0x5ea27c[_0x56a5ac(0x172)]===_0x56a5ac(0x18a))throw _0x5ea27c;throw CliErrors[_0x56a5ac(0x189)](_0x56a5ac(0x16f));}if(!hasNoStore(_0x15d623[_0x56a5ac(0x19e)]))throw CliErrors[_0x56a5ac(0x195)](_0x56a5ac(0x171));if(_0x15d623[_0x56a5ac(0x183)]===0x191)throw CliErrors['authRequired']();if(!_0x15d623['ok'])throw CliErrors[_0x56a5ac(0x195)](_0x56a5ac(0x18e)+_0x15d623[_0x56a5ac(0x183)]+').');if(!(_0x15d623[_0x56a5ac(0x19e)][_0x56a5ac(0x15d)](_0x56a5ac(0x179))??'')[_0x56a5ac(0x17e)]()[_0x56a5ac(0x185)](_0x56a5ac(0x199)))throw CliErrors[_0x56a5ac(0x195)](_0x56a5ac(0x165));let _0x5ad694;try{_0x5ad694=await _0x15d623[_0x56a5ac(0x194)]();}catch{throw CliErrors[_0x56a5ac(0x195)](_0x56a5ac(0x1a4));}return parseDevelopmentSearchResponse(readEnvelopeData(_0x5ad694),_0x306a82[_0x56a5ac(0x18b)]);}function a244_0x4f97(){const _0x1845f5=['json','apiError','trim','14772ixuDqM','no-store','application/json','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','isArray','205278sUoxUl','appCode','headers','development','data','hits','stringify','cookie','SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','56BqdyiY','score','profile','query','hits[','10886877tPjEGM','get','cli:rabetbase','443392RYwwIB','length','cache-control','response','POST','sort','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','string','scoreKind','some','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','3dZTvMB','scope','validation','text','title','SmartCode\x20knowledge\x20search\x20request\x20failed.','total','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','name','27ElNvkF','13594250lKbyst','578948jVRYin','public','split','finalScore','content-type','isFinite','schemaVersion','number','/smartapi/knowledge/company-public/search','toLowerCase','chunkId','rawScore','documentId','tags','status','\x20contract.','includes','strategyFingerprint','authRequired','test','networkError','AbortError','topK','1341595FqVAed','response\x20envelope','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','revision','rank','success','isSafeInteger','timingsMs'];a244_0x4f97=function(){return _0x1845f5;};return a244_0x4f97();}function readEnvelopeData(_0x5ea034){const _0x490e5b=a244_0x342bf0,_0x4a9535=requireRecord(_0x5ea034,_0x490e5b(0x18d));if(_0x4a9535[_0x490e5b(0x191)]===![])throw CliErrors[_0x490e5b(0x195)]('SmartCode\x20knowledge\x20search\x20failed.');if(!(_0x490e5b(0x1a0)in _0x4a9535))throw invalidContract(_0x490e5b(0x18d));return _0x4a9535[_0x490e5b(0x1a0)];}function validateTopK(_0x272cf0){const _0x2af225=a244_0x342bf0;if(_0x272cf0!==undefined&&(!Number['isSafeInteger'](_0x272cf0)||_0x272cf0<0x1||_0x272cf0>0x32))throw CliErrors[_0x2af225(0x16c)](_0x2af225(0x19a));}function hasNoStore(_0x112cf7){const _0x22f0b6=a244_0x342bf0;return(_0x112cf7['get'](_0x22f0b6(0x161))??'')[_0x22f0b6(0x177)](',')[_0x22f0b6(0x168)](_0x542890=>_0x542890[_0x22f0b6(0x196)]()[_0x22f0b6(0x17e)]()===_0x22f0b6(0x198));}function parseDevelopmentSearchResponse(_0x1042a2,_0x3b0dd6){const _0x480bc2=a244_0x342bf0,_0x5eb321=requireExactRecord(_0x1042a2,RESPONSE_KEYS,_0x480bc2(0x162));if(_0x5eb321[_0x480bc2(0x17b)]!==0x2||_0x5eb321[_0x480bc2(0x159)]!==_0x480bc2(0x19f))throw invalidContract(_0x480bc2(0x159));if(!Array[_0x480bc2(0x19b)](_0x5eb321[_0x480bc2(0x1a1)])||_0x5eb321[_0x480bc2(0x1a1)][_0x480bc2(0x160)]>(_0x3b0dd6??0x32))throw invalidContract('hits');if(typeof _0x5eb321[_0x480bc2(0x186)]!==_0x480bc2(0x166)||!/^sha256:[0-9a-f]{64}$/[_0x480bc2(0x188)](_0x5eb321['strategyFingerprint']))throw invalidContract(_0x480bc2(0x186));const _0x13d7a1=requireRecord(_0x5eb321[_0x480bc2(0x193)],_0x480bc2(0x193)),_0x136d2f={};for(const [_0x32b596,_0x56debb]of Object['entries'](_0x13d7a1)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x480bc2(0x188)](_0x32b596)||typeof _0x56debb!==_0x480bc2(0x17c)||!Number[_0x480bc2(0x17a)](_0x56debb)||_0x56debb<0x0)throw invalidContract(_0x480bc2(0x193));_0x136d2f[_0x32b596]=_0x56debb;}const _0x1ecc08=_0x5eb321['hits']['map']((_0x2d2ef4,_0x3876ea)=>parseHit(_0x2d2ef4,_0x3876ea));if(!Number[_0x480bc2(0x192)](_0x5eb321[_0x480bc2(0x170)])||_0x5eb321[_0x480bc2(0x170)]!==_0x1ecc08[_0x480bc2(0x160)])throw invalidContract('total');return{'schemaVersion':_0x5eb321[_0x480bc2(0x17b)],'profile':_0x5eb321[_0x480bc2(0x159)],'total':_0x5eb321['total'],'strategyFingerprint':_0x5eb321[_0x480bc2(0x186)],'timingsMs':_0x136d2f,'hits':_0x1ecc08};}function parseHit(_0xe0ed03,_0x265d99){const _0xc5a3bc=a244_0x342bf0,_0x1c0cf9=requireExactRecord(_0xe0ed03,HIT_KEYS,_0xc5a3bc(0x15b)+_0x265d99+']'),_0xd25dcf=_0x3c5f2e=>{const _0x58886a=_0xc5a3bc,_0x179b84=_0x1c0cf9[_0x3c5f2e];if(typeof _0x179b84!==_0x58886a(0x166)||!_0x179b84)throw invalidContract(_0x3c5f2e);return _0x179b84;};if(!Number[_0xc5a3bc(0x192)](_0x1c0cf9[_0xc5a3bc(0x18f)])||_0x1c0cf9['revision']<0x1)throw invalidContract(_0xc5a3bc(0x18f));if(_0x1c0cf9[_0xc5a3bc(0x16b)]!==_0xc5a3bc(0x176)&&_0x1c0cf9[_0xc5a3bc(0x16b)]!=='company')throw invalidContract(_0xc5a3bc(0x16b));if(typeof _0x1c0cf9[_0xc5a3bc(0x16e)]!==_0xc5a3bc(0x166)||typeof _0x1c0cf9[_0xc5a3bc(0x16d)]!==_0xc5a3bc(0x166))throw invalidContract(_0xc5a3bc(0x16d));if(!Array['isArray'](_0x1c0cf9['tags'])||_0x1c0cf9[_0xc5a3bc(0x182)]['some'](_0x3a0d14=>typeof _0x3a0d14!==_0xc5a3bc(0x166)))throw invalidContract(_0xc5a3bc(0x182));if(!Number['isSafeInteger'](_0x1c0cf9[_0xc5a3bc(0x190)])||_0x1c0cf9[_0xc5a3bc(0x190)]!==_0x265d99+0x1)throw invalidContract(_0xc5a3bc(0x190));if(!isFiniteNumber(_0x1c0cf9[_0xc5a3bc(0x180)])||!isFiniteNumber(_0x1c0cf9['finalScore']))throw invalidContract(_0xc5a3bc(0x158));return{'documentId':_0xd25dcf(_0xc5a3bc(0x181)),'revision':_0x1c0cf9['revision'],'chunkId':_0xd25dcf(_0xc5a3bc(0x17f)),'scope':_0x1c0cf9['scope'],'title':_0x1c0cf9['title'],'text':_0x1c0cf9[_0xc5a3bc(0x16d)],'tags':[..._0x1c0cf9[_0xc5a3bc(0x182)]],'rank':_0x1c0cf9[_0xc5a3bc(0x190)],'rawScore':_0x1c0cf9['rawScore'],'finalScore':_0x1c0cf9[_0xc5a3bc(0x178)],'scoreKind':_0xd25dcf('scoreKind')};}function requireExactRecord(_0x3d0383,_0x5470e8,_0x3bb9fc){const _0x250ac7=a244_0x342bf0,_0x3f057e=requireRecord(_0x3d0383,_0x3bb9fc),_0x3ab90e=Object['keys'](_0x3f057e)['sort'](),_0x4b1abc=[..._0x5470e8][_0x250ac7(0x164)]();if(_0x3ab90e['length']!==_0x4b1abc[_0x250ac7(0x160)]||_0x3ab90e[_0x250ac7(0x168)]((_0x4bd664,_0xc8179d)=>_0x4bd664!==_0x4b1abc[_0xc8179d]))throw invalidContract(_0x3bb9fc);return _0x3f057e;}function requireRecord(_0x4f9ef6,_0x2b4b7b){const _0x341d8a=a244_0x342bf0;if(!_0x4f9ef6||typeof _0x4f9ef6!=='object'||Array[_0x341d8a(0x19b)](_0x4f9ef6))throw invalidContract(_0x2b4b7b);return _0x4f9ef6;}function isFiniteNumber(_0x1d06e3){const _0x1a871d=a244_0x342bf0;return typeof _0x1d06e3===_0x1a871d(0x17c)&&Number[_0x1a871d(0x17a)](_0x1d06e3);}function invalidContract(_0x1dfc2d){const _0x2fe88f=a244_0x342bf0;return CliErrors[_0x2fe88f(0x195)](_0x2fe88f(0x169)+_0x1dfc2d+_0x2fe88f(0x184));}
@@ -1 +1 @@
1
- function a244_0x7567(){const _0x484f98=['cwd','49pQSpHr','286424cvTwXF','1225072kfgqVH','page','18aLZGDB','.rabetbase','26620450JYpNFo','5766444bSFFgP','19576tZyZbc','7849415uzZcNb','F_OK','258DKehKv','5694992kLppIN'];a244_0x7567=function(){return _0x484f98;};return a244_0x7567();}const a244_0x4975c4=a244_0x4f54;(function(_0x18334a,_0x5ab45b){const _0x29e3c4=a244_0x4f54,_0x2ec722=_0x18334a();while(!![]){try{const _0x5b217c=parseInt(_0x29e3c4(0x1c2))/0x1+-parseInt(_0x29e3c4(0x1ba))/0x2*(-parseInt(_0x29e3c4(0x1bd))/0x3)+parseInt(_0x29e3c4(0x1be))/0x4+parseInt(_0x29e3c4(0x1bb))/0x5+parseInt(_0x29e3c4(0x1b9))/0x6+-parseInt(_0x29e3c4(0x1c0))/0x7*(-parseInt(_0x29e3c4(0x1c1))/0x8)+-parseInt(_0x29e3c4(0x1b6))/0x9*(parseInt(_0x29e3c4(0x1b8))/0xa);if(_0x5b217c===_0x5ab45b)break;else _0x2ec722['push'](_0x2ec722['shift']());}catch(_0x130d7c){_0x2ec722['push'](_0x2ec722['shift']());}}}(a244_0x7567,0xe776c));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x243d9b,_0x58dfc3=process[a244_0x4975c4(0x1bf)]()){const _0x55b5b0=a244_0x4975c4,_0x2aec96=resolve(_0x58dfc3),_0x55dcc2=join(_0x2aec96,_0x55b5b0(0x1b7),_0x55b5b0(0x1b5));return{'projectRoot':_0x2aec96,'pagesBaseDir':_0x55dcc2,'appPagesDir':join(_0x55dcc2,_0x243d9b),'lockFilePath':join(_0x2aec96,_0x55b5b0(0x1b7),'page.lock.json')};}export function buildPageFileName(_0x2e7ea2,_0x5725c7){return _0x2e7ea2+'-'+String(_0x5725c7)['toUpperCase']()+'.json';}export function resolvePageFilePath(_0x259a64,_0x2d9555,_0x67b5d6){return join(_0x259a64['appPagesDir'],buildPageFileName(_0x2d9555,_0x67b5d6));}export async function ensureParentDirectory(_0x508fdd){await mkdir(dirname(_0x508fdd),{'recursive':!![]});}function a244_0x4f54(_0x157135,_0x3878d0){_0x157135=_0x157135-0x1b5;const _0x75678f=a244_0x7567();let _0x4f54f0=_0x75678f[_0x157135];return _0x4f54f0;}export async function fileExists(_0x465af7){const _0x1c450d=a244_0x4975c4;try{return await access(_0x465af7,constants[_0x1c450d(0x1bc)]),!![];}catch{return![];}}
1
+ const a245_0x1719f3=a245_0x268e;(function(_0x2ec4a8,_0x55de98){const _0x11285a=a245_0x268e,_0x3c4d02=_0x2ec4a8();while(!![]){try{const _0x521ff4=parseInt(_0x11285a(0x77))/0x1*(parseInt(_0x11285a(0x76))/0x2)+-parseInt(_0x11285a(0x80))/0x3*(parseInt(_0x11285a(0x7e))/0x4)+parseInt(_0x11285a(0x74))/0x5*(parseInt(_0x11285a(0x72))/0x6)+parseInt(_0x11285a(0x7f))/0x7+-parseInt(_0x11285a(0x81))/0x8+parseInt(_0x11285a(0x7a))/0x9+-parseInt(_0x11285a(0x73))/0xa*(parseInt(_0x11285a(0x79))/0xb);if(_0x521ff4===_0x55de98)break;else _0x3c4d02['push'](_0x3c4d02['shift']());}catch(_0x5032b1){_0x3c4d02['push'](_0x3c4d02['shift']());}}}(a245_0x4131,0xd85ca));import{constants}from'node:fs';function a245_0x268e(_0x1902d8,_0x4e6a3f){_0x1902d8=_0x1902d8-0x71;const _0x413148=a245_0x4131();let _0x268e08=_0x413148[_0x1902d8];return _0x268e08;}import{access,mkdir}from'node:fs/promises';function a245_0x4131(){const _0x3e2cf6=['2053410ssxqgn','2020pEKinY','10CdkDJs','appPagesDir','34966OjbeUE','58TUdpjK','toUpperCase','125719DpapHQ','15883011xBqPUh','cwd','F_OK','.json','64FnIBJW','3928722ReGEiR','23043VMXaxD','5653896ySwQlV','.rabetbase','page'];a245_0x4131=function(){return _0x3e2cf6;};return a245_0x4131();}import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x4d5b22,_0x33b996=process[a245_0x1719f3(0x7b)]()){const _0x5e55fa=a245_0x1719f3,_0xab958c=resolve(_0x33b996),_0x466b84=join(_0xab958c,'.rabetbase',_0x5e55fa(0x71));return{'projectRoot':_0xab958c,'pagesBaseDir':_0x466b84,'appPagesDir':join(_0x466b84,_0x4d5b22),'lockFilePath':join(_0xab958c,_0x5e55fa(0x82),'page.lock.json')};}export function buildPageFileName(_0x32abf1,_0x18f4f4){const _0x427393=a245_0x1719f3;return _0x32abf1+'-'+String(_0x18f4f4)[_0x427393(0x78)]()+_0x427393(0x7d);}export function resolvePageFilePath(_0x2c8507,_0x29de3c,_0x4a183e){const _0xa4a2f0=a245_0x1719f3;return join(_0x2c8507[_0xa4a2f0(0x75)],buildPageFileName(_0x29de3c,_0x4a183e));}export async function ensureParentDirectory(_0x1427a7){await mkdir(dirname(_0x1427a7),{'recursive':!![]});}export async function fileExists(_0x5a4b1b){const _0x47c0b2=a245_0x1719f3;try{return await access(_0x5a4b1b,constants[_0x47c0b2(0x7c)]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a245_0x17b6(_0x1e25bf,_0x1a254d){_0x1e25bf=_0x1e25bf-0x81;const _0x52df59=a245_0x52df();let _0x17b66b=_0x52df59[_0x1e25bf];return _0x17b66b;}(function(_0x758b65,_0x2318a8){const _0x1d719a=a245_0x17b6,_0x171b76=_0x758b65();while(!![]){try{const _0x1f5784=parseInt(_0x1d719a(0x88))/0x1+-parseInt(_0x1d719a(0x81))/0x2*(parseInt(_0x1d719a(0x85))/0x3)+-parseInt(_0x1d719a(0x8d))/0x4*(parseInt(_0x1d719a(0x8c))/0x5)+parseInt(_0x1d719a(0x8f))/0x6+-parseInt(_0x1d719a(0x82))/0x7+-parseInt(_0x1d719a(0x83))/0x8+parseInt(_0x1d719a(0x8b))/0x9*(parseInt(_0x1d719a(0x8e))/0xa);if(_0x1f5784===_0x2318a8)break;else _0x171b76['push'](_0x171b76['shift']());}catch(_0x3383ec){_0x171b76['push'](_0x171b76['shift']());}}}(a245_0x52df,0x1d250));function a245_0x52df(){const _0x31707a=['861684mOOkre','hex','md5','387902aGXAMA','1439536bEtjRw','507488xgupqC','parse','3OajZkd','stringify','update','14112JWtpEZ','digest','utf8','5424822XUEOZt','5RImTwM','712292LaiYqU','10yNQdKk'];a245_0x52df=function(){return _0x31707a;};return a245_0x52df();}import a245_0x368f47 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x563694){const _0xe2c47a=a245_0x17b6;return JSON[_0xe2c47a(0x86)](JSON[_0xe2c47a(0x84)](_0x563694),null,0x2)+'\x0a';}export function computePageContentHash(_0x1d027a){const _0x3164f6=a245_0x17b6;return a245_0x368f47['createHash'](_0x3164f6(0x91))[_0x3164f6(0x87)](_0x1d027a)[_0x3164f6(0x89)](_0x3164f6(0x90));}export function computeSerializedSchemaHash(_0x49a006){return computePageContentHash(serializePageSchemaForFile(_0x49a006));}export async function computePageFileHash(_0x266db2){const _0x49af95=a245_0x17b6,_0x54256a=await readFile(_0x266db2,_0x49af95(0x8a));return computePageContentHash(_0x54256a);}
1
+ (function(_0x1900e9,_0x1c1e4d){const _0x55e025=a246_0x2fe3,_0x38b783=_0x1900e9();while(!![]){try{const _0xcd3afc=-parseInt(_0x55e025(0x1e6))/0x1*(parseInt(_0x55e025(0x1db))/0x2)+-parseInt(_0x55e025(0x1de))/0x3*(-parseInt(_0x55e025(0x1d7))/0x4)+-parseInt(_0x55e025(0x1dc))/0x5+-parseInt(_0x55e025(0x1e2))/0x6*(-parseInt(_0x55e025(0x1e1))/0x7)+parseInt(_0x55e025(0x1d9))/0x8+-parseInt(_0x55e025(0x1d8))/0x9*(parseInt(_0x55e025(0x1e5))/0xa)+-parseInt(_0x55e025(0x1dd))/0xb;if(_0xcd3afc===_0x1c1e4d)break;else _0x38b783['push'](_0x38b783['shift']());}catch(_0x3fe22c){_0x38b783['push'](_0x38b783['shift']());}}}(a246_0x5761,0x95e0a));function a246_0x2fe3(_0x2844e2,_0x2627b7){_0x2844e2=_0x2844e2-0x1d7;const _0x576187=a246_0x5761();let _0x2fe354=_0x576187[_0x2844e2];return _0x2fe354;}import a246_0x431d38 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x3820a0){const _0x59201d=a246_0x2fe3;return JSON[_0x59201d(0x1e4)](JSON[_0x59201d(0x1df)](_0x3820a0),null,0x2)+'\x0a';}export function computePageContentHash(_0x3bdea6){const _0xe4c2a=a246_0x2fe3;return a246_0x431d38[_0xe4c2a(0x1e3)](_0xe4c2a(0x1e0))[_0xe4c2a(0x1da)](_0x3bdea6)[_0xe4c2a(0x1e8)]('hex');}export function computeSerializedSchemaHash(_0x299def){return computePageContentHash(serializePageSchemaForFile(_0x299def));}function a246_0x5761(){const _0x34127b=['8jfjJtl','801okAeDs','7241672mYlaNu','update','79172SKWviT','2745260bpOOma','998613MpeiOZ','1611618wyNdYz','parse','md5','3514EYIhms','7206xzySOa','createHash','stringify','91480CHpSud','13LJZWIq','utf8','digest'];a246_0x5761=function(){return _0x34127b;};return a246_0x5761();}export async function computePageFileHash(_0x5a0c59){const _0x1b2442=a246_0x2fe3,_0x452846=await readFile(_0x5a0c59,_0x1b2442(0x1e7));return computePageContentHash(_0x452846);}
@@ -1 +1 @@
1
- (function(_0x2ce6b1,_0x29bc13){const _0x530162=a246_0x2cf9,_0x37a685=_0x2ce6b1();while(!![]){try{const _0x2ad0df=-parseInt(_0x530162(0x9f))/0x1+parseInt(_0x530162(0x9a))/0x2*(-parseInt(_0x530162(0x92))/0x3)+-parseInt(_0x530162(0x98))/0x4+parseInt(_0x530162(0x9c))/0x5+-parseInt(_0x530162(0x95))/0x6+-parseInt(_0x530162(0xa3))/0x7*(parseInt(_0x530162(0x99))/0x8)+parseInt(_0x530162(0x9d))/0x9*(parseInt(_0x530162(0x94))/0xa);if(_0x2ad0df===_0x29bc13)break;else _0x37a685['push'](_0x37a685['shift']());}catch(_0x2d15bd){_0x37a685['push'](_0x37a685['shift']());}}}(a246_0xf7d1,0x34681));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x1e7938,_0x1275f5){const _0x48966a=a246_0x2cf9,_0x53d359={'apps':_0x1e7938[_0x48966a(0x93)]&&typeof _0x1e7938['apps']==='object'?_0x1e7938['apps']:{}};let _0x2af62b=_0x53d359[_0x48966a(0x93)][_0x1275f5];if(!_0x2af62b)return _0x2af62b={'lastSync':'','pages':{}},_0x53d359[_0x48966a(0x93)][_0x1275f5]=_0x2af62b,{'lockData':_0x53d359,'appLock':_0x2af62b};return!_0x2af62b['lastSync']&&(_0x2af62b[_0x48966a(0xa0)]=''),(!_0x2af62b[_0x48966a(0xa2)]||typeof _0x2af62b['pages']!=='object')&&(_0x2af62b[_0x48966a(0xa2)]={}),{'lockData':_0x53d359,'appLock':_0x2af62b};}export async function readPageLockFile(_0xb40ec4){const _0xdde52a=a246_0x2cf9;try{const _0x529a20=await readFile(_0xb40ec4,_0xdde52a(0x9b)),_0x2e4be0=JSON['parse'](_0x529a20);return{'apps':_0x2e4be0[_0xdde52a(0x93)]&&typeof _0x2e4be0['apps']===_0xdde52a(0xa1)?_0x2e4be0['apps']:{}};}catch(_0x1928e2){if(_0x1928e2[_0xdde52a(0x9e)]===_0xdde52a(0x96))return null;throw new Error(_0xdde52a(0x97)+String(_0x1928e2));}}function a246_0xf7d1(){const _0x4b60c6=['18580igighv','1335060oMhZOR','ENOENT','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','1657248EQNumv','5080OazBiN','527146SgzaaZ','utf8','1773475eiZiuA','4626qCdlXc','code','130520fsNHVU','lastSync','object','pages','707KNZjPa','3OvKTLh','apps'];a246_0xf7d1=function(){return _0x4b60c6;};return a246_0xf7d1();}function a246_0x2cf9(_0x204469,_0x13cf8a){_0x204469=_0x204469-0x92;const _0xf7d16e=a246_0xf7d1();let _0x2cf908=_0xf7d16e[_0x204469];return _0x2cf908;}export async function writePageLockFile(_0x4e6402,_0x4ae39f){const _0x2b9553=a246_0x2cf9;await mkdir(dirname(_0x4e6402),{'recursive':!![]}),await writeFile(_0x4e6402,JSON['stringify'](_0x4ae39f,null,0x2),_0x2b9553(0x9b));}
1
+ (function(_0x1afbef,_0x3acfe0){const _0x2d04a6=a247_0x13de,_0x1322b9=_0x1afbef();while(!![]){try{const _0x1b68d1=parseInt(_0x2d04a6(0xb7))/0x1+parseInt(_0x2d04a6(0xbd))/0x2*(-parseInt(_0x2d04a6(0xb8))/0x3)+-parseInt(_0x2d04a6(0xc3))/0x4+parseInt(_0x2d04a6(0xb6))/0x5*(parseInt(_0x2d04a6(0xb9))/0x6)+-parseInt(_0x2d04a6(0xbf))/0x7*(-parseInt(_0x2d04a6(0xc6))/0x8)+parseInt(_0x2d04a6(0xc2))/0x9*(-parseInt(_0x2d04a6(0xc7))/0xa)+parseInt(_0x2d04a6(0xbb))/0xb*(parseInt(_0x2d04a6(0xba))/0xc);if(_0x1b68d1===_0x3acfe0)break;else _0x1322b9['push'](_0x1322b9['shift']());}catch(_0x19ba3b){_0x1322b9['push'](_0x1322b9['shift']());}}}(a247_0x5154,0x19a1b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a247_0x5154(){const _0x815014=['302660SyJmIR','parse','pages','382585tajRIz','18864yDMGuV','201AVmYsZ','6sLNwqQ','6192bNmkOW','5401yjGkqy','code','6038YoTjsZ','lastSync','723527dCKPku','object','utf8','27McVeWK','629604GSoRkg','apps','ENOENT','16GGEDIY'];a247_0x5154=function(){return _0x815014;};return a247_0x5154();}function a247_0x13de(_0x9821b5,_0x15967e){_0x9821b5=_0x9821b5-0xb4;const _0x515425=a247_0x5154();let _0x13de56=_0x515425[_0x9821b5];return _0x13de56;}export function ensurePageLockScope(_0x143e1e,_0x449983){const _0x1eca2b=a247_0x13de,_0x5765dd={'apps':_0x143e1e[_0x1eca2b(0xc4)]&&typeof _0x143e1e[_0x1eca2b(0xc4)]==='object'?_0x143e1e['apps']:{}};let _0x9e3c7b=_0x5765dd[_0x1eca2b(0xc4)][_0x449983];if(!_0x9e3c7b)return _0x9e3c7b={'lastSync':'','pages':{}},_0x5765dd[_0x1eca2b(0xc4)][_0x449983]=_0x9e3c7b,{'lockData':_0x5765dd,'appLock':_0x9e3c7b};return!_0x9e3c7b[_0x1eca2b(0xbe)]&&(_0x9e3c7b[_0x1eca2b(0xbe)]=''),(!_0x9e3c7b[_0x1eca2b(0xb5)]||typeof _0x9e3c7b[_0x1eca2b(0xb5)]!==_0x1eca2b(0xc0))&&(_0x9e3c7b[_0x1eca2b(0xb5)]={}),{'lockData':_0x5765dd,'appLock':_0x9e3c7b};}export async function readPageLockFile(_0x2afba2){const _0x2d3965=a247_0x13de;try{const _0x43784f=await readFile(_0x2afba2,_0x2d3965(0xc1)),_0x4c5463=JSON[_0x2d3965(0xb4)](_0x43784f);return{'apps':_0x4c5463[_0x2d3965(0xc4)]&&typeof _0x4c5463['apps']===_0x2d3965(0xc0)?_0x4c5463[_0x2d3965(0xc4)]:{}};}catch(_0x1c3129){if(_0x1c3129[_0x2d3965(0xbc)]===_0x2d3965(0xc5))return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x1c3129));}}export async function writePageLockFile(_0x16c791,_0x20f50b){await mkdir(dirname(_0x16c791),{'recursive':!![]}),await writeFile(_0x16c791,JSON['stringify'](_0x20f50b,null,0x2),'utf8');}
@@ -1 +1 @@
1
- (function(_0x4a9c60,_0x3662aa){const _0x37fda9=a248_0x18e4,_0x289b6f=_0x4a9c60();while(!![]){try{const _0x1fd1c6=parseInt(_0x37fda9(0x1b3))/0x1+parseInt(_0x37fda9(0x1be))/0x2*(-parseInt(_0x37fda9(0x191))/0x3)+parseInt(_0x37fda9(0x180))/0x4+-parseInt(_0x37fda9(0x17c))/0x5*(-parseInt(_0x37fda9(0x1b7))/0x6)+-parseInt(_0x37fda9(0x18e))/0x7+parseInt(_0x37fda9(0x1af))/0x8+parseInt(_0x37fda9(0x190))/0x9*(-parseInt(_0x37fda9(0x198))/0xa);if(_0x1fd1c6===_0x3662aa)break;else _0x289b6f['push'](_0x289b6f['shift']());}catch(_0x58c762){_0x289b6f['push'](_0x289b6f['shift']());}}}(a248_0x436e,0x1cad6));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x13ffc1,_0x2a06bc){const _0x4f998f=a248_0x18e4,_0x58db3a=[],_0xed4bd2=normalizeSqlForStaticAnalysis(_0x13ffc1),_0x4f4060=(_0xed4bd2[_0x4f998f(0x1b4)]?[]:extractJoinFacts(_0xed4bd2[_0x4f998f(0x175)]))[_0x4f998f(0x19d)](_0x4b9df8=>{const _0x368e9b=_0x4f998f;if(_0x4b9df8[_0x368e9b(0x187)]||_0x4b9df8[_0x368e9b(0x1bb)]['length']===0x0)return _0x58db3a[_0x368e9b(0x1a0)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'reason':_0x4b9df8['unsupportedReason']??_0x368e9b(0x17a)}),{'table':_0x4b9df8['table'],'alias':_0x4b9df8['alias'],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'status':'unavailable'};const _0x4bf2fa=resolveTableMetadata(_0x2a06bc,_0x4b9df8['table']),_0xc30f21=(_0x4bf2fa?.[_0x368e9b(0x1ad)]??[])[_0x368e9b(0x19d)](_0xb3f104=>({'index':_0xb3f104,'matchedPrefix':findEqualityPrefix(_0xb3f104[_0x368e9b(0x1bb)],_0x4b9df8[_0x368e9b(0x1bb)])}))[_0x368e9b(0x183)](_0x41027d=>_0x41027d[_0x368e9b(0x1b6)][_0x368e9b(0x1b5)]>0x0),_0x5d778d=_0xc30f21[_0x368e9b(0x199)]((_0x30b276,_0x5ae506)=>!_0x30b276||_0x5ae506[_0x368e9b(0x1b6)][_0x368e9b(0x1b5)]>_0x30b276[_0x368e9b(0x1b6)][_0x368e9b(0x1b5)]?_0x5ae506:_0x30b276,_0xc30f21[0x0]);if(_0x5d778d)return{'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'status':_0x368e9b(0x193),'matchedIndex':{..._0x5d778d[_0x368e9b(0x1bc)],'matchedPrefix':_0x5d778d[_0x368e9b(0x1b6)]}};const _0x2c3128=_0x4bf2fa?.[_0x368e9b(0x1ad)][_0x368e9b(0x183)](_0x176b91=>_0x176b91[_0x368e9b(0x1bb)]['some'](_0x5de360=>_0x4b9df8[_0x368e9b(0x1bb)][_0x368e9b(0x185)](_0x59ea47=>columnNamesMatch(_0x5de360,_0x59ea47))))??[];if(_0x2c3128[_0x368e9b(0x1b5)]>0x0)return _0x58db3a[_0x368e9b(0x1a0)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8['columns'],'status':_0x368e9b(0x1a7),'candidateIndexes':_0x2c3128};if(_0x4bf2fa&&_0x4bf2fa['metadataAvailable']!==![]&&_0x4bf2fa[_0x368e9b(0x1ad)][_0x368e9b(0x1b5)]>0x0&&_0x4b9df8[_0x368e9b(0x1bb)]['length']>0x0)return _0x58db3a[_0x368e9b(0x1a0)]({'code':_0x368e9b(0x184),'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8['alias'],'columns':_0x4b9df8['columns'],'reason':_0x368e9b(0x186)}),{'table':_0x4b9df8['table'],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8['columns'],'status':_0x368e9b(0x1a7)};return _0x58db3a[_0x368e9b(0x1a0)]({'code':_0x368e9b(0x1b2),'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'reason':_0x4bf2fa?_0x368e9b(0x177):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x4b9df8['table'],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'status':'unavailable'};});return{'checked':_0x4f4060['length']>0x0,'joins':_0x4f4060,'warnings':_0x58db3a};}function extractJoinFacts(_0x2a248){const _0x51cedb=a248_0x18e4,_0x64666=maskNestedQueries(stripSqlNoise(_0x2a248)),_0x371ec8=maskQuotedIdentifiers(_0x64666),_0x3e794f=[],_0x39b98c=new Set(),_0x3d95ad=/\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 _0x4ae4a4 of _0x64666[_0x51cedb(0x1b0)](_0x3d95ad)){const _0x45594b=_0x4ae4a4[_0x51cedb(0x1bc)]??0x0,_0x5a48fc=_0x4ae4a4[0x0]['search'](/\bJOIN\b/i),_0x1aab5f=_0x45594b+Math[_0x51cedb(0x1ba)](0x0,_0x5a48fc);if(!/^JOIN\b/i['test'](_0x371ec8[_0x51cedb(0x18a)](_0x1aab5f)))continue;_0x39b98c[_0x51cedb(0x1ab)](_0x1aab5f);const _0x31ac03=normalizeIdentifier(_0x4ae4a4[0x1]||_0x51cedb(0x196)),_0x5bb180=normalizeIdentifier(_0x4ae4a4[0x2]??''),_0x47b8e6=normalizeIdentifier(_0x4ae4a4[0x3]||_0x5bb180[_0x51cedb(0x195)]('.')['at'](-0x1)||_0x5bb180),_0x2dc288=[],_0x19b645=_0x5bb180==='__sq__';let _0x1e3062=_0x31ac03===_0x51cedb(0x1a3)||_0x31ac03===_0x51cedb(0x18d)||_0x19b645,_0x3efed5=_0x1e3062?_0x19b645?_0x51cedb(0x1a5):_0x31ac03[_0x51cedb(0x178)]()+_0x51cedb(0x176):undefined;const _0x192348=stripOuterParentheses(_0x4ae4a4[0x4]??''),_0x224931=_0x192348[_0x51cedb(0x1a6)](MYBATIS_DYNAMIC_START_MARKER)||_0x192348[_0x51cedb(0x1a6)](MYBATIS_DYNAMIC_END_MARKER),_0x36e3b9=_0x192348[_0x51cedb(0x1a6)](MYBATIS_INCLUDE_MARKER);_0x224931&&(_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x188));_0x36e3b9&&(_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x189));const _0x1ec10e=_0x192348['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x51cedb(0x17b)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x1ec10e,'OR')&&(_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x19f));for(const _0x170a5a of splitTopLevelAnd(_0x1ec10e)){const _0x54b819=stripOuterParentheses(_0x170a5a);if(hasTopLevelKeyword(_0x54b819,'OR')){_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x19f);continue;}const _0xbfd441=splitEquality(_0x54b819);if(!_0xbfd441){containsColumnReference(_0x170a5a,_0x47b8e6)&&(_0x1e3062=!![]);continue;}const _0x13c417=parseDirectColumnReference(_0xbfd441[0x0],_0x47b8e6),_0x119970=parseDirectColumnReference(_0xbfd441[0x1],_0x47b8e6),_0x45a508=containsColumnReference(_0xbfd441[0x0],_0x47b8e6),_0x29e500=containsColumnReference(_0xbfd441[0x1],_0x47b8e6),_0x2a8050=_0x13c417&&!_0x29e500?_0x13c417:_0x119970&&!_0x45a508?_0x119970:null;if(_0x2a8050&&!_0x2dc288['includes'](_0x2a8050))_0x2dc288[_0x51cedb(0x1a0)](_0x2a8050);else!_0x2a8050&&containsColumnReference(_0x170a5a,_0x47b8e6)&&(_0x1e3062=!![]);}_0x3e794f[_0x51cedb(0x1a0)]({'table':_0x5bb180,'alias':_0x47b8e6,'columns':_0x2dc288,'unsupportedPredicate':_0x1e3062,'unsupportedReason':_0x3efed5,'containsUnresolvedInclude':_0x36e3b9,'position':_0x1aab5f});}for(const _0x23f662 of _0x371ec8['matchAll'](/\bJOIN\b/gi)){const _0xeb5140=_0x23f662[_0x51cedb(0x1bc)]??0x0;if(_0x39b98c[_0x51cedb(0x182)](_0xeb5140))continue;const _0x5d2b18=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x51cedb(0x181)](_0x64666[_0x51cedb(0x18a)](_0xeb5140+_0x23f662[0x0]['length'])),_0x42d44c=normalizeIdentifier(_0x5d2b18?.[0x1]||_0x51cedb(0x1bd)),_0x5988ff=normalizeIdentifier(_0x5d2b18?.[0x2]||''),_0x232693=isSqlClauseKeyword(_0x5988ff)?_0x42d44c[_0x51cedb(0x195)]('.')['at'](-0x1)||_0x42d44c:_0x5988ff||_0x42d44c[_0x51cedb(0x195)]('.')['at'](-0x1)||_0x42d44c;_0x3e794f[_0x51cedb(0x1a0)]({'table':_0x42d44c,'alias':_0x232693,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x51cedb(0x197),'position':_0xeb5140});}const _0x45b11c=_0x371ec8[_0x51cedb(0x19b)](MYBATIS_INCLUDE_MARKER);return _0x45b11c>=0x0&&!_0x3e794f[_0x51cedb(0x185)](_0x3ec261=>_0x3ec261[_0x51cedb(0x1a8)])&&_0x3e794f['push']({'table':_0x51cedb(0x1bd),'alias':_0x51cedb(0x1bd),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0x45b11c}),_0x3e794f[_0x51cedb(0x1b1)]((_0x23ce74,_0x5a021e)=>_0x23ce74[_0x51cedb(0x192)]-_0x5a021e[_0x51cedb(0x192)]);}function stripSqlNoise(_0x15c3e9){const _0x3a2de5=a248_0x18e4,_0x5c5d4c=Array[_0x3a2de5(0x1a1)](_0x15c3e9),_0x233ee3=(_0x4c913b,_0x3ff1a3)=>{for(let _0x16b88e=_0x4c913b;_0x16b88e<_0x3ff1a3;_0x16b88e+=0x1){_0x5c5d4c[_0x16b88e]!=='\x0a'&&_0x5c5d4c[_0x16b88e]!=='\x0d'&&(_0x5c5d4c[_0x16b88e]='\x20');}};for(let _0x33cc6e=0x0;_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)];_0x33cc6e+=0x1){const _0x165677=_0x5c5d4c[_0x33cc6e],_0x120e87=_0x5c5d4c[_0x33cc6e+0x1];if(_0x165677==='\x27'||_0x165677==='\x22'||_0x165677==='`'){const _0x558342=_0x165677,_0x5121ca=_0x33cc6e;_0x33cc6e+=0x1;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]){if(_0x5c5d4c[_0x33cc6e]==='\x5c'&&_0x33cc6e+0x1<_0x5c5d4c[_0x3a2de5(0x1b5)]){_0x33cc6e+=0x2;continue;}if(_0x5c5d4c[_0x33cc6e]!==_0x558342){_0x33cc6e+=0x1;continue;}if(_0x5c5d4c[_0x33cc6e+0x1]===_0x558342){_0x33cc6e+=0x2;continue;}break;}if(_0x558342==='\x27')_0x233ee3(_0x5121ca,Math[_0x3a2de5(0x194)](_0x33cc6e+0x1,_0x5c5d4c[_0x3a2de5(0x1b5)]));continue;}if(_0x165677==='-'&&_0x120e87==='-'){const _0x1bd2c6=_0x33cc6e;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]&&_0x5c5d4c[_0x33cc6e]!=='\x0a')_0x33cc6e+=0x1;_0x233ee3(_0x1bd2c6,_0x33cc6e);continue;}if(_0x165677==='/'&&_0x120e87==='*'){const _0x129135=_0x33cc6e;_0x33cc6e+=0x2;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]&&!(_0x5c5d4c[_0x33cc6e]==='*'&&_0x5c5d4c[_0x33cc6e+0x1]==='/')){_0x33cc6e+=0x1;}_0x33cc6e=Math[_0x3a2de5(0x194)](_0x33cc6e+0x1,_0x5c5d4c[_0x3a2de5(0x1b5)]-0x1),_0x233ee3(_0x129135,_0x33cc6e+0x1);continue;}if(_0x165677==='#'&&_0x120e87!=='{'){const _0x399194=_0x33cc6e;while(_0x33cc6e<_0x5c5d4c['length']&&_0x5c5d4c[_0x33cc6e]!=='\x0a')_0x33cc6e+=0x1;_0x233ee3(_0x399194,_0x33cc6e);continue;}if((_0x165677==='#'||_0x165677==='$')&&_0x120e87==='{'){const _0x34439f=_0x33cc6e;_0x33cc6e+=0x2;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]&&_0x5c5d4c[_0x33cc6e]!=='}')_0x33cc6e+=0x1;_0x233ee3(_0x34439f,Math['min'](_0x33cc6e+0x1,_0x5c5d4c[_0x3a2de5(0x1b5)]));}}return _0x5c5d4c[_0x3a2de5(0x179)]('');}function maskQuotedIdentifiers(_0x52b3f3){const _0x52cc76=a248_0x18e4,_0x591811=Array[_0x52cc76(0x1a1)](_0x52b3f3);for(let _0x254197=0x0;_0x254197<_0x591811[_0x52cc76(0x1b5)];_0x254197+=0x1){const _0x35ce6f=_0x591811[_0x254197];if(_0x35ce6f!=='\x22'&&_0x35ce6f!=='`')continue;_0x254197+=0x1;while(_0x254197<_0x591811['length']){if(_0x591811[_0x254197]===_0x35ce6f){if(_0x591811[_0x254197+0x1]===_0x35ce6f){_0x591811[_0x254197]='\x20',_0x591811[_0x254197+0x1]='\x20',_0x254197+=0x2;continue;}break;}_0x591811[_0x254197]='\x20',_0x254197+=0x1;}}return _0x591811[_0x52cc76(0x179)]('');}function maskNestedQueries(_0x383a01){const _0x182f0a=a248_0x18e4,_0x21232f=Array[_0x182f0a(0x1a1)](_0x383a01);for(let _0x60bf39=0x0;_0x60bf39<_0x21232f[_0x182f0a(0x1b5)];_0x60bf39+=0x1){if(_0x21232f[_0x60bf39]!=='(')continue;const _0x56789b=_0x383a01[_0x182f0a(0x18a)](_0x60bf39+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x56789b))continue;let _0x5a84eb=0x1,_0x46519b=_0x60bf39+0x1;for(;_0x46519b<_0x21232f[_0x182f0a(0x1b5)]&&_0x5a84eb>0x0;_0x46519b+=0x1){if(_0x21232f[_0x46519b]==='(')_0x5a84eb+=0x1;if(_0x21232f[_0x46519b]===')')_0x5a84eb-=0x1;}if(_0x5a84eb!==0x0)continue;for(let _0x3d8946=_0x60bf39;_0x3d8946<_0x46519b;_0x3d8946+=0x1){_0x21232f[_0x3d8946]='\x20';}const _0xd200cf=_0x182f0a(0x1ac);for(let _0x3b701d=0x0;_0x3b701d<_0xd200cf[_0x182f0a(0x1b5)]&&_0x60bf39+_0x3b701d<_0x46519b;_0x3b701d+=0x1){_0x21232f[_0x60bf39+_0x3b701d]=_0xd200cf[_0x3b701d];}_0x60bf39=_0x46519b-0x1;}return _0x21232f['join']('');}function splitTopLevelAnd(_0x2940b3){const _0x5b12b7=a248_0x18e4,_0x32c144=[];let _0x555fdc=0x0,_0x1c3949=0x0;for(let _0x26c737=0x0;_0x26c737<_0x2940b3[_0x5b12b7(0x1b5)];_0x26c737+=0x1){const _0x1969be=_0x2940b3[_0x26c737];if(_0x1969be==='(')_0x555fdc+=0x1;if(_0x1969be===')')_0x555fdc=Math[_0x5b12b7(0x1ba)](0x0,_0x555fdc-0x1);_0x555fdc===0x0&&_0x2940b3[_0x5b12b7(0x18a)](_0x26c737)['match'](/^AND\b/i)&&(_0x26c737===0x0||/\s/[_0x5b12b7(0x17e)](_0x2940b3[_0x26c737-0x1]??''))&&(_0x32c144[_0x5b12b7(0x1a0)](_0x2940b3[_0x5b12b7(0x18a)](_0x1c3949,_0x26c737)[_0x5b12b7(0x17d)]()),_0x26c737+=0x2,_0x1c3949=_0x26c737+0x1);}const _0x22dee4=_0x2940b3[_0x5b12b7(0x18a)](_0x1c3949)['trim']();if(_0x22dee4)_0x32c144['push'](_0x22dee4);return _0x32c144;}function a248_0x18e4(_0x29e141,_0x2c9265){_0x29e141=_0x29e141-0x175;const _0x436e30=a248_0x436e();let _0x18e45f=_0x436e30[_0x29e141];return _0x18e45f;}function hasTopLevelKeyword(_0x18a32d,_0x3e3264){const _0x3b1f2d=a248_0x18e4;let _0x5350a5=0x0;for(let _0x3da165=0x0;_0x3da165<_0x18a32d['length'];_0x3da165+=0x1){const _0x4ae360=_0x18a32d[_0x3da165];if(_0x4ae360==='(')_0x5350a5+=0x1;if(_0x4ae360===')')_0x5350a5=Math['max'](0x0,_0x5350a5-0x1);if(_0x5350a5!==0x0)continue;const _0x2bf0a9=_0x18a32d[_0x3b1f2d(0x18a)](_0x3da165,_0x3da165+_0x3e3264[_0x3b1f2d(0x1b5)]),_0x2cdd91=_0x18a32d[_0x3da165-0x1]??'\x20',_0x343a15=_0x18a32d[_0x3da165+_0x3e3264[_0x3b1f2d(0x1b5)]]??'\x20';if(_0x2bf0a9['toUpperCase']()===_0x3e3264[_0x3b1f2d(0x178)]()&&!/[\w$]/[_0x3b1f2d(0x17e)](_0x2cdd91)&&!/[\w$]/[_0x3b1f2d(0x17e)](_0x343a15))return!![];}return![];}function splitEquality(_0x5e8cfb){const _0x187071=a248_0x18e4,_0x141029=stripOuterParentheses(_0x5e8cfb);let _0x58d676=0x0,_0x669beb;for(let _0xd90466=0x0;_0xd90466<_0x141029[_0x187071(0x1b5)];_0xd90466+=0x1){const _0x8d43e7=_0x141029[_0xd90466];if(_0x8d43e7==='(')_0x58d676+=0x1;if(_0x8d43e7===')')_0x58d676=Math['max'](0x0,_0x58d676-0x1);const _0xf5d4c2=_0x141029[_0xd90466-0x1]??'',_0x5f0b7d=_0x141029[_0xd90466+0x1]??'';if(_0x8d43e7==='='&&_0x58d676===0x0&&!/[!<>=:]/[_0x187071(0x17e)](_0xf5d4c2)&&_0x5f0b7d!=='='){if(_0x669beb!==undefined)return null;_0x669beb=_0xd90466;}}return _0x669beb===undefined?null:[_0x141029[_0x187071(0x18a)](0x0,_0x669beb)[_0x187071(0x17d)](),_0x141029[_0x187071(0x18a)](_0x669beb+0x1)[_0x187071(0x17d)]()];}function a248_0x436e(){const _0x58a6b0=['covered','min','split','INNER','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','353530BodwMW','reduce','toLowerCase','indexOf','cross','map','table','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','push','from','natural','right','where','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','includes','warning','containsUnresolvedInclude','alias','(?:^|[^\x5cw$])','add','__sq__','indexes','\x5cs*\x5c.\x5cs*[\x5cw$]+','1353264koXTtK','matchAll','sort','INDEX_METADATA_UNAVAILABLE','103661NGmXBw','error','length','matchedPrefix','193506ScqbSN','inner','tableName','max','columns','index','unknown','5486CxJwFY','sql','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','toUpperCase','join','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','replaceAll','15PJEfXY','trim','test','using','528332NyBmaP','exec','has','filter','JOIN_INDEX_MISSING','some','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','unsupportedPredicate','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','slice','\x5c$&','replace','full','1048775nrXhuX','left','45XfkKrh','63ogDKPM','position'];a248_0x436e=function(){return _0x58a6b0;};return a248_0x436e();}function parseDirectColumnReference(_0xc25588,_0x3536cc){const _0x1f26ff=a248_0x18e4,_0x255f4b=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x1f26ff(0x181)](stripOuterParentheses(_0xc25588));if(!_0x255f4b)return null;if(normalizeIdentifier(_0x255f4b[0x1]??'')!==normalizeIdentifier(_0x3536cc))return null;return normalizeIdentifier(_0x255f4b[0x2]??'');}function containsColumnReference(_0x29a45c,_0x4ebfa8){const _0x8be37e=a248_0x18e4,_0x403d86=_0x29a45c['replace'](/[`"]/g,''),_0xb700f6=_0x4ebfa8[_0x8be37e(0x18c)](/[.*+?^${}()|[\]\\]/g,_0x8be37e(0x18b));return new RegExp(_0x8be37e(0x1aa)+_0xb700f6+_0x8be37e(0x1ae),'i')['test'](_0x403d86);}function findEqualityPrefix(_0x14a156,_0x150291){const _0x445375=a248_0x18e4,_0x208b23=new Set(_0x150291[_0x445375(0x19d)](normalizeIdentifier)),_0x52139a=[];for(const _0x435862 of _0x14a156){if(!_0x208b23[_0x445375(0x182)](normalizeIdentifier(_0x435862)))break;_0x52139a['push'](_0x435862);}return _0x52139a;}function resolveTableMetadata(_0x34a1e1,_0x48645f){const _0x3e9c9a=a248_0x18e4,_0x1ec03b=normalizeIdentifier(_0x48645f),_0x3c3387=_0x34a1e1[_0x3e9c9a(0x183)](_0x46681b=>normalizeIdentifier(_0x46681b['tableName'])===_0x1ec03b);if(_0x3c3387[_0x3e9c9a(0x1b5)]===0x1)return _0x3c3387[0x0];const _0x5d3244=_0x1ec03b[_0x3e9c9a(0x1a6)]('.'),_0x477606=_0x1ec03b[_0x3e9c9a(0x195)]('.')['at'](-0x1),_0x4dae43=_0x34a1e1[_0x3e9c9a(0x183)](_0x20ef81=>{const _0x4359ec=_0x3e9c9a,_0x81aecf=normalizeIdentifier(_0x20ef81[_0x4359ec(0x1b9)]);if(_0x5d3244&&_0x81aecf[_0x4359ec(0x1a6)]('.'))return![];return _0x81aecf[_0x4359ec(0x195)]('.')['at'](-0x1)===_0x477606;});return _0x4dae43[_0x3e9c9a(0x1b5)]===0x1?_0x4dae43[0x0]:undefined;}function columnNamesMatch(_0x40bb3f,_0x462b3d){return normalizeIdentifier(_0x40bb3f)===normalizeIdentifier(_0x462b3d);}function normalizeIdentifier(_0x509e81){const _0x23add5=a248_0x18e4;return _0x509e81['replace'](/[`"]/g,'')[_0x23add5(0x17d)]()[_0x23add5(0x19a)]();}function isSqlClauseKeyword(_0x5017aa){const _0x52a941=a248_0x18e4;return new Set(['on',_0x52a941(0x17f),_0x52a941(0x1a4),'join',_0x52a941(0x1b8),_0x52a941(0x18f),_0x52a941(0x1a3),_0x52a941(0x18d),_0x52a941(0x19c),_0x52a941(0x1a2)])[_0x52a941(0x182)](_0x5017aa);}function stripOuterParentheses(_0x5c9604){const _0x428250=a248_0x18e4;let _0x144ffc=_0x5c9604['trim']();while(_0x144ffc['startsWith']('(')&&_0x144ffc['endsWith'](')')){let _0x1fae10=0x0,_0x2fde95=!![];for(let _0xacd619=0x0;_0xacd619<_0x144ffc[_0x428250(0x1b5)];_0xacd619+=0x1){if(_0x144ffc[_0xacd619]==='(')_0x1fae10+=0x1;if(_0x144ffc[_0xacd619]===')')_0x1fae10-=0x1;if(_0x1fae10===0x0&&_0xacd619<_0x144ffc[_0x428250(0x1b5)]-0x1){_0x2fde95=![];break;}}if(!_0x2fde95||_0x1fae10!==0x0)break;_0x144ffc=_0x144ffc[_0x428250(0x18a)](0x1,-0x1)[_0x428250(0x17d)]();}return _0x144ffc;}
1
+ (function(_0x48eb6a,_0x22e5c5){const _0x54326b=a249_0xb228,_0x445038=_0x48eb6a();while(!![]){try{const _0x2701c1=-parseInt(_0x54326b(0x1a3))/0x1*(-parseInt(_0x54326b(0x195))/0x2)+-parseInt(_0x54326b(0x1c0))/0x3*(-parseInt(_0x54326b(0x1ce))/0x4)+parseInt(_0x54326b(0x1d1))/0x5*(-parseInt(_0x54326b(0x1df))/0x6)+-parseInt(_0x54326b(0x1b1))/0x7*(parseInt(_0x54326b(0x1a1))/0x8)+parseInt(_0x54326b(0x1a5))/0x9+-parseInt(_0x54326b(0x19a))/0xa+parseInt(_0x54326b(0x1b2))/0xb*(parseInt(_0x54326b(0x1a6))/0xc);if(_0x2701c1===_0x22e5c5)break;else _0x445038['push'](_0x445038['shift']());}catch(_0x1ce2f7){_0x445038['push'](_0x445038['shift']());}}}(a249_0x30e7,0xb9c1d));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x1ae72e,_0x3f6879){const _0x5d643d=a249_0xb228,_0x5bdc2c=[],_0x45f8ce=normalizeSqlForStaticAnalysis(_0x1ae72e),_0x5cb9f2=(_0x45f8ce[_0x5d643d(0x1bd)]?[]:extractJoinFacts(_0x45f8ce['sql']))[_0x5d643d(0x1c1)](_0x16bd94=>{const _0x1e90b3=_0x5d643d;if(_0x16bd94['unsupportedPredicate']||_0x16bd94[_0x1e90b3(0x19d)][_0x1e90b3(0x1ab)]===0x0)return _0x5bdc2c[_0x1e90b3(0x1cf)]({'code':_0x1e90b3(0x1d0),'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94[_0x1e90b3(0x1da)],'columns':_0x16bd94[_0x1e90b3(0x19d)],'reason':_0x16bd94[_0x1e90b3(0x1b4)]??_0x1e90b3(0x1af)}),{'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94[_0x1e90b3(0x1da)],'columns':_0x16bd94['columns'],'status':_0x1e90b3(0x199)};const _0x3c5843=resolveTableMetadata(_0x3f6879,_0x16bd94[_0x1e90b3(0x1d7)]),_0x169ab=(_0x3c5843?.[_0x1e90b3(0x1ae)]??[])[_0x1e90b3(0x1c1)](_0x3757a8=>({'index':_0x3757a8,'matchedPrefix':findEqualityPrefix(_0x3757a8[_0x1e90b3(0x19d)],_0x16bd94[_0x1e90b3(0x19d)])}))[_0x1e90b3(0x1b5)](_0x11c26b=>_0x11c26b[_0x1e90b3(0x1c9)][_0x1e90b3(0x1ab)]>0x0),_0x1967e3=_0x169ab[_0x1e90b3(0x1b0)]((_0x362981,_0x5ea1ab)=>!_0x362981||_0x5ea1ab[_0x1e90b3(0x1c9)]['length']>_0x362981[_0x1e90b3(0x1c9)][_0x1e90b3(0x1ab)]?_0x5ea1ab:_0x362981,_0x169ab[0x0]);if(_0x1967e3)return{'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94[_0x1e90b3(0x1da)],'columns':_0x16bd94[_0x1e90b3(0x19d)],'status':'covered','matchedIndex':{..._0x1967e3[_0x1e90b3(0x1a2)],'matchedPrefix':_0x1967e3['matchedPrefix']}};const _0x21fbd4=_0x3c5843?.[_0x1e90b3(0x1ae)][_0x1e90b3(0x1b5)](_0x34ab2c=>_0x34ab2c[_0x1e90b3(0x19d)][_0x1e90b3(0x1c8)](_0x2df60b=>_0x16bd94[_0x1e90b3(0x19d)][_0x1e90b3(0x1c8)](_0x369a3d=>columnNamesMatch(_0x2df60b,_0x369a3d))))??[];if(_0x21fbd4['length']>0x0)return _0x5bdc2c[_0x1e90b3(0x1cf)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x16bd94['table'],'alias':_0x16bd94['alias'],'columns':_0x16bd94[_0x1e90b3(0x19d)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94['alias'],'columns':_0x16bd94['columns'],'status':_0x1e90b3(0x194),'candidateIndexes':_0x21fbd4};if(_0x3c5843&&_0x3c5843[_0x1e90b3(0x1dd)]!==![]&&_0x3c5843[_0x1e90b3(0x1ae)][_0x1e90b3(0x1ab)]>0x0&&_0x16bd94['columns']['length']>0x0)return _0x5bdc2c[_0x1e90b3(0x1cf)]({'code':_0x1e90b3(0x197),'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94[_0x1e90b3(0x1da)],'columns':_0x16bd94[_0x1e90b3(0x19d)],'reason':_0x1e90b3(0x1cc)}),{'table':_0x16bd94['table'],'alias':_0x16bd94['alias'],'columns':_0x16bd94['columns'],'status':'warning'};return _0x5bdc2c['push']({'code':_0x1e90b3(0x193),'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94[_0x1e90b3(0x1da)],'columns':_0x16bd94[_0x1e90b3(0x19d)],'reason':_0x3c5843?_0x1e90b3(0x1ba):_0x1e90b3(0x1d5)}),{'table':_0x16bd94[_0x1e90b3(0x1d7)],'alias':_0x16bd94[_0x1e90b3(0x1da)],'columns':_0x16bd94[_0x1e90b3(0x19d)],'status':_0x1e90b3(0x199)};});return{'checked':_0x5cb9f2[_0x5d643d(0x1ab)]>0x0,'joins':_0x5cb9f2,'warnings':_0x5bdc2c};}function extractJoinFacts(_0x3db170){const _0x9c5649=a249_0xb228,_0x4357a8=maskNestedQueries(stripSqlNoise(_0x3db170)),_0x4306ed=maskQuotedIdentifiers(_0x4357a8),_0x45e5d5=[],_0x82654a=new Set(),_0x3fac5c=/\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 _0xdcf0e6 of _0x4357a8[_0x9c5649(0x1aa)](_0x3fac5c)){const _0x3ac268=_0xdcf0e6[_0x9c5649(0x1a2)]??0x0,_0x4ceb4a=_0xdcf0e6[0x0][_0x9c5649(0x1b3)](/\bJOIN\b/i),_0x5d8ab4=_0x3ac268+Math[_0x9c5649(0x1d6)](0x0,_0x4ceb4a);if(!/^JOIN\b/i['test'](_0x4306ed[_0x9c5649(0x1ad)](_0x5d8ab4)))continue;_0x82654a[_0x9c5649(0x1b6)](_0x5d8ab4);const _0x377f89=normalizeIdentifier(_0xdcf0e6[0x1]||_0x9c5649(0x1c6)),_0x38bbdb=normalizeIdentifier(_0xdcf0e6[0x2]??''),_0x439d85=normalizeIdentifier(_0xdcf0e6[0x3]||_0x38bbdb[_0x9c5649(0x1a0)]('.')['at'](-0x1)||_0x38bbdb),_0x570f8b=[],_0x113538=_0x38bbdb===_0x9c5649(0x1c4);let _0x17d7b9=_0x377f89===_0x9c5649(0x198)||_0x377f89==='full'||_0x113538,_0x2f10ac=_0x17d7b9?_0x113538?_0x9c5649(0x1c5):_0x377f89[_0x9c5649(0x1be)]()+_0x9c5649(0x1db):undefined;const _0x6bf4f3=stripOuterParentheses(_0xdcf0e6[0x4]??''),_0xeca0f5=_0x6bf4f3[_0x9c5649(0x1bc)](MYBATIS_DYNAMIC_START_MARKER)||_0x6bf4f3[_0x9c5649(0x1bc)](MYBATIS_DYNAMIC_END_MARKER),_0xe69f7f=_0x6bf4f3[_0x9c5649(0x1bc)](MYBATIS_INCLUDE_MARKER);_0xeca0f5&&(_0x17d7b9=!![],_0x2f10ac??=_0x9c5649(0x1c3));_0xe69f7f&&(_0x17d7b9=!![],_0x2f10ac??='MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.');const _0x570cce=_0x6bf4f3[_0x9c5649(0x1a4)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x9c5649(0x1a4)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x9c5649(0x1a4)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x570cce,'OR')&&(_0x17d7b9=!![],_0x2f10ac??=_0x9c5649(0x19f));for(const _0x2fd723 of splitTopLevelAnd(_0x570cce)){const _0x3dee18=stripOuterParentheses(_0x2fd723);if(hasTopLevelKeyword(_0x3dee18,'OR')){_0x17d7b9=!![],_0x2f10ac??=_0x9c5649(0x19f);continue;}const _0x2c83f7=splitEquality(_0x3dee18);if(!_0x2c83f7){containsColumnReference(_0x2fd723,_0x439d85)&&(_0x17d7b9=!![]);continue;}const _0xb28ea7=parseDirectColumnReference(_0x2c83f7[0x0],_0x439d85),_0x5c32e1=parseDirectColumnReference(_0x2c83f7[0x1],_0x439d85),_0x79a08d=containsColumnReference(_0x2c83f7[0x0],_0x439d85),_0x20127a=containsColumnReference(_0x2c83f7[0x1],_0x439d85),_0x3d7524=_0xb28ea7&&!_0x20127a?_0xb28ea7:_0x5c32e1&&!_0x79a08d?_0x5c32e1:null;if(_0x3d7524&&!_0x570f8b[_0x9c5649(0x1bc)](_0x3d7524))_0x570f8b['push'](_0x3d7524);else!_0x3d7524&&containsColumnReference(_0x2fd723,_0x439d85)&&(_0x17d7b9=!![]);}_0x45e5d5['push']({'table':_0x38bbdb,'alias':_0x439d85,'columns':_0x570f8b,'unsupportedPredicate':_0x17d7b9,'unsupportedReason':_0x2f10ac,'containsUnresolvedInclude':_0xe69f7f,'position':_0x5d8ab4});}for(const _0x7eca42 of _0x4306ed[_0x9c5649(0x1aa)](/\bJOIN\b/gi)){const _0x11b989=_0x7eca42['index']??0x0;if(_0x82654a['has'](_0x11b989))continue;const _0x3d540c=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/['exec'](_0x4357a8[_0x9c5649(0x1ad)](_0x11b989+_0x7eca42[0x0][_0x9c5649(0x1ab)])),_0x5dfffd=normalizeIdentifier(_0x3d540c?.[0x1]||'unknown'),_0x20741f=normalizeIdentifier(_0x3d540c?.[0x2]||''),_0x3eaf31=isSqlClauseKeyword(_0x20741f)?_0x5dfffd[_0x9c5649(0x1a0)]('.')['at'](-0x1)||_0x5dfffd:_0x20741f||_0x5dfffd[_0x9c5649(0x1a0)]('.')['at'](-0x1)||_0x5dfffd;_0x45e5d5[_0x9c5649(0x1cf)]({'table':_0x5dfffd,'alias':_0x3eaf31,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x9c5649(0x1e1),'position':_0x11b989});}const _0x7d7f5a=_0x4306ed[_0x9c5649(0x1ac)](MYBATIS_INCLUDE_MARKER);return _0x7d7f5a>=0x0&&!_0x45e5d5[_0x9c5649(0x1c8)](_0x32041a=>_0x32041a[_0x9c5649(0x1c2)])&&_0x45e5d5[_0x9c5649(0x1cf)]({'table':'unknown','alias':_0x9c5649(0x1a7),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x9c5649(0x1bb),'containsUnresolvedInclude':!![],'position':_0x7d7f5a}),_0x45e5d5[_0x9c5649(0x19e)]((_0x243004,_0x1ff4a3)=>_0x243004[_0x9c5649(0x1d9)]-_0x1ff4a3[_0x9c5649(0x1d9)]);}function stripSqlNoise(_0x30ee55){const _0xea125b=a249_0xb228,_0x1bc5b9=Array[_0xea125b(0x19c)](_0x30ee55),_0x4a0f28=(_0x9048ec,_0x52827e)=>{for(let _0x1c5bd6=_0x9048ec;_0x1c5bd6<_0x52827e;_0x1c5bd6+=0x1){_0x1bc5b9[_0x1c5bd6]!=='\x0a'&&_0x1bc5b9[_0x1c5bd6]!=='\x0d'&&(_0x1bc5b9[_0x1c5bd6]='\x20');}};for(let _0xe5f13d=0x0;_0xe5f13d<_0x1bc5b9[_0xea125b(0x1ab)];_0xe5f13d+=0x1){const _0xf54824=_0x1bc5b9[_0xe5f13d],_0x4c6feb=_0x1bc5b9[_0xe5f13d+0x1];if(_0xf54824==='\x27'||_0xf54824==='\x22'||_0xf54824==='`'){const _0x246dba=_0xf54824,_0x545c89=_0xe5f13d;_0xe5f13d+=0x1;while(_0xe5f13d<_0x1bc5b9['length']){if(_0x1bc5b9[_0xe5f13d]==='\x5c'&&_0xe5f13d+0x1<_0x1bc5b9[_0xea125b(0x1ab)]){_0xe5f13d+=0x2;continue;}if(_0x1bc5b9[_0xe5f13d]!==_0x246dba){_0xe5f13d+=0x1;continue;}if(_0x1bc5b9[_0xe5f13d+0x1]===_0x246dba){_0xe5f13d+=0x2;continue;}break;}if(_0x246dba==='\x27')_0x4a0f28(_0x545c89,Math['min'](_0xe5f13d+0x1,_0x1bc5b9['length']));continue;}if(_0xf54824==='-'&&_0x4c6feb==='-'){const _0x3e0b05=_0xe5f13d;while(_0xe5f13d<_0x1bc5b9[_0xea125b(0x1ab)]&&_0x1bc5b9[_0xe5f13d]!=='\x0a')_0xe5f13d+=0x1;_0x4a0f28(_0x3e0b05,_0xe5f13d);continue;}if(_0xf54824==='/'&&_0x4c6feb==='*'){const _0x29677f=_0xe5f13d;_0xe5f13d+=0x2;while(_0xe5f13d<_0x1bc5b9[_0xea125b(0x1ab)]&&!(_0x1bc5b9[_0xe5f13d]==='*'&&_0x1bc5b9[_0xe5f13d+0x1]==='/')){_0xe5f13d+=0x1;}_0xe5f13d=Math['min'](_0xe5f13d+0x1,_0x1bc5b9[_0xea125b(0x1ab)]-0x1),_0x4a0f28(_0x29677f,_0xe5f13d+0x1);continue;}if(_0xf54824==='#'&&_0x4c6feb!=='{'){const _0xd65124=_0xe5f13d;while(_0xe5f13d<_0x1bc5b9[_0xea125b(0x1ab)]&&_0x1bc5b9[_0xe5f13d]!=='\x0a')_0xe5f13d+=0x1;_0x4a0f28(_0xd65124,_0xe5f13d);continue;}if((_0xf54824==='#'||_0xf54824==='$')&&_0x4c6feb==='{'){const _0x13490a=_0xe5f13d;_0xe5f13d+=0x2;while(_0xe5f13d<_0x1bc5b9[_0xea125b(0x1ab)]&&_0x1bc5b9[_0xe5f13d]!=='}')_0xe5f13d+=0x1;_0x4a0f28(_0x13490a,Math[_0xea125b(0x1c7)](_0xe5f13d+0x1,_0x1bc5b9[_0xea125b(0x1ab)]));}}return _0x1bc5b9[_0xea125b(0x1d2)]('');}function maskQuotedIdentifiers(_0x3b4653){const _0x23270a=a249_0xb228,_0xbaa479=Array[_0x23270a(0x19c)](_0x3b4653);for(let _0x44652c=0x0;_0x44652c<_0xbaa479[_0x23270a(0x1ab)];_0x44652c+=0x1){const _0x76eea1=_0xbaa479[_0x44652c];if(_0x76eea1!=='\x22'&&_0x76eea1!=='`')continue;_0x44652c+=0x1;while(_0x44652c<_0xbaa479['length']){if(_0xbaa479[_0x44652c]===_0x76eea1){if(_0xbaa479[_0x44652c+0x1]===_0x76eea1){_0xbaa479[_0x44652c]='\x20',_0xbaa479[_0x44652c+0x1]='\x20',_0x44652c+=0x2;continue;}break;}_0xbaa479[_0x44652c]='\x20',_0x44652c+=0x1;}}return _0xbaa479[_0x23270a(0x1d2)]('');}function maskNestedQueries(_0x2d1704){const _0x11dc7d=a249_0xb228,_0x4c7633=Array[_0x11dc7d(0x19c)](_0x2d1704);for(let _0x54aada=0x0;_0x54aada<_0x4c7633['length'];_0x54aada+=0x1){if(_0x4c7633[_0x54aada]!=='(')continue;const _0x3face7=_0x2d1704[_0x11dc7d(0x1ad)](_0x54aada+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x11dc7d(0x1b9)](_0x3face7))continue;let _0x309516=0x1,_0x3c92af=_0x54aada+0x1;for(;_0x3c92af<_0x4c7633[_0x11dc7d(0x1ab)]&&_0x309516>0x0;_0x3c92af+=0x1){if(_0x4c7633[_0x3c92af]==='(')_0x309516+=0x1;if(_0x4c7633[_0x3c92af]===')')_0x309516-=0x1;}if(_0x309516!==0x0)continue;for(let _0x101687=_0x54aada;_0x101687<_0x3c92af;_0x101687+=0x1){_0x4c7633[_0x101687]='\x20';}const _0x363a0e=_0x11dc7d(0x1c4);for(let _0x256e5d=0x0;_0x256e5d<_0x363a0e[_0x11dc7d(0x1ab)]&&_0x54aada+_0x256e5d<_0x3c92af;_0x256e5d+=0x1){_0x4c7633[_0x54aada+_0x256e5d]=_0x363a0e[_0x256e5d];}_0x54aada=_0x3c92af-0x1;}return _0x4c7633[_0x11dc7d(0x1d2)]('');}function splitTopLevelAnd(_0x43d581){const _0x2fc231=a249_0xb228,_0x355cc7=[];let _0x3f49d1=0x0,_0x8456d3=0x0;for(let _0x5c08d0=0x0;_0x5c08d0<_0x43d581[_0x2fc231(0x1ab)];_0x5c08d0+=0x1){const _0x208c5c=_0x43d581[_0x5c08d0];if(_0x208c5c==='(')_0x3f49d1+=0x1;if(_0x208c5c===')')_0x3f49d1=Math[_0x2fc231(0x1d6)](0x0,_0x3f49d1-0x1);_0x3f49d1===0x0&&_0x43d581[_0x2fc231(0x1ad)](_0x5c08d0)[_0x2fc231(0x1d8)](/^AND\b/i)&&(_0x5c08d0===0x0||/\s/[_0x2fc231(0x1b9)](_0x43d581[_0x5c08d0-0x1]??''))&&(_0x355cc7[_0x2fc231(0x1cf)](_0x43d581[_0x2fc231(0x1ad)](_0x8456d3,_0x5c08d0)[_0x2fc231(0x1bf)]()),_0x5c08d0+=0x2,_0x8456d3=_0x5c08d0+0x1);}const _0x2e4a75=_0x43d581['slice'](_0x8456d3)[_0x2fc231(0x1bf)]();if(_0x2e4a75)_0x355cc7['push'](_0x2e4a75);return _0x355cc7;}function hasTopLevelKeyword(_0x4a2c4c,_0x213e3d){const _0x1039c5=a249_0xb228;let _0x31e426=0x0;for(let _0x27b8a1=0x0;_0x27b8a1<_0x4a2c4c[_0x1039c5(0x1ab)];_0x27b8a1+=0x1){const _0x560963=_0x4a2c4c[_0x27b8a1];if(_0x560963==='(')_0x31e426+=0x1;if(_0x560963===')')_0x31e426=Math[_0x1039c5(0x1d6)](0x0,_0x31e426-0x1);if(_0x31e426!==0x0)continue;const _0x4c50=_0x4a2c4c[_0x1039c5(0x1ad)](_0x27b8a1,_0x27b8a1+_0x213e3d[_0x1039c5(0x1ab)]),_0x330171=_0x4a2c4c[_0x27b8a1-0x1]??'\x20',_0x3942c0=_0x4a2c4c[_0x27b8a1+_0x213e3d[_0x1039c5(0x1ab)]]??'\x20';if(_0x4c50[_0x1039c5(0x1be)]()===_0x213e3d[_0x1039c5(0x1be)]()&&!/[\w$]/[_0x1039c5(0x1b9)](_0x330171)&&!/[\w$]/['test'](_0x3942c0))return!![];}return![];}function splitEquality(_0x2807e8){const _0x47d753=a249_0xb228,_0x3e1087=stripOuterParentheses(_0x2807e8);let _0x1a02e5=0x0,_0x16e091;for(let _0x2ad4ed=0x0;_0x2ad4ed<_0x3e1087['length'];_0x2ad4ed+=0x1){const _0x417c49=_0x3e1087[_0x2ad4ed];if(_0x417c49==='(')_0x1a02e5+=0x1;if(_0x417c49===')')_0x1a02e5=Math[_0x47d753(0x1d6)](0x0,_0x1a02e5-0x1);const _0x13877e=_0x3e1087[_0x2ad4ed-0x1]??'',_0x1eeac9=_0x3e1087[_0x2ad4ed+0x1]??'';if(_0x417c49==='='&&_0x1a02e5===0x0&&!/[!<>=:]/[_0x47d753(0x1b9)](_0x13877e)&&_0x1eeac9!=='='){if(_0x16e091!==undefined)return null;_0x16e091=_0x2ad4ed;}}return _0x16e091===undefined?null:[_0x3e1087[_0x47d753(0x1ad)](0x0,_0x16e091)[_0x47d753(0x1bf)](),_0x3e1087[_0x47d753(0x1ad)](_0x16e091+0x1)[_0x47d753(0x1bf)]()];}function parseDirectColumnReference(_0x50ab0f,_0x9e80b){const _0x3c6ba7=a249_0xb228,_0x5604c3=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x3c6ba7(0x1a8)](stripOuterParentheses(_0x50ab0f));if(!_0x5604c3)return null;if(normalizeIdentifier(_0x5604c3[0x1]??'')!==normalizeIdentifier(_0x9e80b))return null;return normalizeIdentifier(_0x5604c3[0x2]??'');}function containsColumnReference(_0x11a2f2,_0x1b42b2){const _0x42c046=a249_0xb228,_0x5c410e=_0x11a2f2[_0x42c046(0x1cb)](/[`"]/g,''),_0x18f2b9=_0x1b42b2['replace'](/[.*+?^${}()|[\]\\]/g,_0x42c046(0x196));return new RegExp('(?:^|[^\x5cw$])'+_0x18f2b9+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x42c046(0x1b9)](_0x5c410e);}function a249_0x30e7(){const _0x3badfb=['add','natural','has','test','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','includes','error','toUpperCase','trim','168501VgzGaO','map','containsUnresolvedInclude','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','__sq__','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','INNER','min','some','matchedPrefix','full','replace','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','startsWith','52LlHpHM','push','JOIN_PREDICATE_UNSUPPORTED','85BbpDfS','join','left','inner','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','max','table','match','position','alias','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','toLowerCase','metadataAvailable','cross','397746KLGgbw','where','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','endsWith','INDEX_METADATA_UNAVAILABLE','warning','1916312MOiUWb','\x5c$&','JOIN_INDEX_MISSING','right','unavailable','3308840SBwblj','using','from','columns','sort','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','split','14632SZNkVO','index','1SGBtqB','replaceAll','6245658fpyANd','12uMNqGn','unknown','exec','tableName','matchAll','length','indexOf','slice','indexes','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','reduce','3878jjQyBO','9346359jDwgXw','search','unsupportedReason','filter'];a249_0x30e7=function(){return _0x3badfb;};return a249_0x30e7();}function findEqualityPrefix(_0x25d85b,_0x199c1e){const _0x391038=a249_0xb228,_0x3ca184=new Set(_0x199c1e[_0x391038(0x1c1)](normalizeIdentifier)),_0x4c4683=[];for(const _0x362bb2 of _0x25d85b){if(!_0x3ca184['has'](normalizeIdentifier(_0x362bb2)))break;_0x4c4683[_0x391038(0x1cf)](_0x362bb2);}return _0x4c4683;}function resolveTableMetadata(_0x16f718,_0x28a7ee){const _0x5d27e2=a249_0xb228,_0x429bef=normalizeIdentifier(_0x28a7ee),_0x2f890c=_0x16f718[_0x5d27e2(0x1b5)](_0x4f6f73=>normalizeIdentifier(_0x4f6f73[_0x5d27e2(0x1a9)])===_0x429bef);if(_0x2f890c[_0x5d27e2(0x1ab)]===0x1)return _0x2f890c[0x0];const _0x4c64c6=_0x429bef[_0x5d27e2(0x1bc)]('.'),_0x29bde3=_0x429bef[_0x5d27e2(0x1a0)]('.')['at'](-0x1),_0x2f6fdc=_0x16f718[_0x5d27e2(0x1b5)](_0x438dbb=>{const _0x581771=_0x5d27e2,_0x255205=normalizeIdentifier(_0x438dbb[_0x581771(0x1a9)]);if(_0x4c64c6&&_0x255205[_0x581771(0x1bc)]('.'))return![];return _0x255205[_0x581771(0x1a0)]('.')['at'](-0x1)===_0x29bde3;});return _0x2f6fdc[_0x5d27e2(0x1ab)]===0x1?_0x2f6fdc[0x0]:undefined;}function columnNamesMatch(_0x21a38b,_0x55b146){return normalizeIdentifier(_0x21a38b)===normalizeIdentifier(_0x55b146);}function normalizeIdentifier(_0x557ed7){const _0x1e5451=a249_0xb228;return _0x557ed7[_0x1e5451(0x1cb)](/[`"]/g,'')[_0x1e5451(0x1bf)]()[_0x1e5451(0x1dc)]();}function isSqlClauseKeyword(_0x3ce0b2){const _0x536903=a249_0xb228;return new Set(['on',_0x536903(0x19b),_0x536903(0x1e0),'join',_0x536903(0x1d4),_0x536903(0x1d3),_0x536903(0x198),_0x536903(0x1ca),_0x536903(0x1de),_0x536903(0x1b7)])[_0x536903(0x1b8)](_0x3ce0b2);}function a249_0xb228(_0x453cff,_0x61c91e){_0x453cff=_0x453cff-0x192;const _0x30e759=a249_0x30e7();let _0xb228ab=_0x30e759[_0x453cff];return _0xb228ab;}function stripOuterParentheses(_0x2b7867){const _0x588ed8=a249_0xb228;let _0x54b66e=_0x2b7867['trim']();while(_0x54b66e[_0x588ed8(0x1cd)]('(')&&_0x54b66e[_0x588ed8(0x192)](')')){let _0x4fa5e2=0x0,_0x3999ea=!![];for(let _0x5a6623=0x0;_0x5a6623<_0x54b66e[_0x588ed8(0x1ab)];_0x5a6623+=0x1){if(_0x54b66e[_0x5a6623]==='(')_0x4fa5e2+=0x1;if(_0x54b66e[_0x5a6623]===')')_0x4fa5e2-=0x1;if(_0x4fa5e2===0x0&&_0x5a6623<_0x54b66e[_0x588ed8(0x1ab)]-0x1){_0x3999ea=![];break;}}if(!_0x3999ea||_0x4fa5e2!==0x0)break;_0x54b66e=_0x54b66e[_0x588ed8(0x1ad)](0x1,-0x1)[_0x588ed8(0x1bf)]();}return _0x54b66e;}
@@ -1 +1 @@
1
- const a249_0x467b38=a249_0x4a26;function a249_0x4a26(_0x1b39d3,_0x155798){_0x1b39d3=_0x1b39d3-0x115;const _0x252348=a249_0x2523();let _0x4a2682=_0x252348[_0x1b39d3];return _0x4a2682;}(function(_0x5cc6ed,_0x2c0f77){const _0x5e7b7a=a249_0x4a26,_0x26689a=_0x5cc6ed();while(!![]){try{const _0x39e97d=parseInt(_0x5e7b7a(0x117))/0x1*(-parseInt(_0x5e7b7a(0x120))/0x2)+-parseInt(_0x5e7b7a(0x11b))/0x3*(parseInt(_0x5e7b7a(0x121))/0x4)+-parseInt(_0x5e7b7a(0x11e))/0x5+parseInt(_0x5e7b7a(0x11c))/0x6+-parseInt(_0x5e7b7a(0x11a))/0x7+-parseInt(_0x5e7b7a(0x115))/0x8+parseInt(_0x5e7b7a(0x11f))/0x9;if(_0x39e97d===_0x2c0f77)break;else _0x26689a['push'](_0x26689a['shift']());}catch(_0x1442a9){_0x26689a['push'](_0x26689a['shift']());}}}(a249_0x2523,0x773c5));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a249_0x467b38(0x11d),LOCK_FILE_NAME=a249_0x467b38(0x118),TRASH_DIR_NAME=a249_0x467b38(0x116);export function loadSqlProjectConfig(_0x5204f2,_0x42503d){const _0x2fca33=a249_0x467b38,_0x29e2fd=resolve(_0x42503d??findProjectRootDirectory()),_0x52c546=DOT_DIR+_0x2fca33(0x119),_0x195057=_0x52c546+'/'+_0x5204f2;return{'projectRoot':_0x29e2fd,'appCode':_0x5204f2,'sqlWorkspaceRoot':_0x52c546,'sqlRoot':_0x195057,'sqlRootDir':resolve(_0x29e2fd,DOT_DIR,'sql',_0x5204f2),'lockFilePath':resolve(_0x29e2fd,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x29e2fd,DOT_DIR,TRASH_DIR_NAME)};}function a249_0x2523(){const _0x3f6792=['.rabetbase','3188425WReHvT','22559112vtIQrO','3246TYOLDk','2324vLoNFi','5348904NLaVde','sql-trash','154mBWdnD','sql.lock.json','/sql','5534508IqcHzK','2133SvyUat','4450776xlYBVW'];a249_0x2523=function(){return _0x3f6792;};return a249_0x2523();}
1
+ function a250_0x1419(){const _0xc35dbe=['7832310qoHokz','33551GOlzBI','1224680BWvOZL','4748139ayujhA','2620hUcxFB','2408iRzjVh','.rabetbase','564SEtLnw','6601090kGClCy','sql.lock.json','2851278OLNAiw','3RvaRZX','sql','/sql'];a250_0x1419=function(){return _0xc35dbe;};return a250_0x1419();}function a250_0x4084(_0x107255,_0x56aee9){_0x107255=_0x107255-0xb0;const _0x1419c2=a250_0x1419();let _0x40842b=_0x1419c2[_0x107255];return _0x40842b;}const a250_0x4572a8=a250_0x4084;(function(_0x3e4682,_0x4fc8e7){const _0x9148be=a250_0x4084,_0x11bd41=_0x3e4682();while(!![]){try{const _0x2cd407=-parseInt(_0x9148be(0xb1))/0x1*(parseInt(_0x9148be(0xbc))/0x2)+parseInt(_0x9148be(0xb5))/0x3*(-parseInt(_0x9148be(0xba))/0x4)+parseInt(_0x9148be(0xb2))/0x5+parseInt(_0x9148be(0xb4))/0x6+parseInt(_0x9148be(0xb9))/0x7*(parseInt(_0x9148be(0xbd))/0x8)+-parseInt(_0x9148be(0xbb))/0x9+-parseInt(_0x9148be(0xb8))/0xa;if(_0x2cd407===_0x4fc8e7)break;else _0x11bd41['push'](_0x11bd41['shift']());}catch(_0x38ebe4){_0x11bd41['push'](_0x11bd41['shift']());}}}(a250_0x1419,0xd7688));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a250_0x4572a8(0xb0),LOCK_FILE_NAME=a250_0x4572a8(0xb3),TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x341aec,_0x14aacd){const _0xacd0c9=a250_0x4572a8,_0x429c31=resolve(_0x14aacd??findProjectRootDirectory()),_0x336252=DOT_DIR+_0xacd0c9(0xb7),_0x826e09=_0x336252+'/'+_0x341aec;return{'projectRoot':_0x429c31,'appCode':_0x341aec,'sqlWorkspaceRoot':_0x336252,'sqlRoot':_0x826e09,'sqlRootDir':resolve(_0x429c31,DOT_DIR,_0xacd0c9(0xb6),_0x341aec),'lockFilePath':resolve(_0x429c31,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x429c31,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- (function(_0x48e86c,_0x347e5d){const _0x158d5b=a250_0x5877,_0x1b681d=_0x48e86c();while(!![]){try{const _0x43625c=parseInt(_0x158d5b(0x184))/0x1*(-parseInt(_0x158d5b(0x169))/0x2)+parseInt(_0x158d5b(0x17b))/0x3*(parseInt(_0x158d5b(0x185))/0x4)+-parseInt(_0x158d5b(0x171))/0x5*(-parseInt(_0x158d5b(0x186))/0x6)+-parseInt(_0x158d5b(0x16b))/0x7*(-parseInt(_0x158d5b(0x174))/0x8)+-parseInt(_0x158d5b(0x178))/0x9*(-parseInt(_0x158d5b(0x176))/0xa)+-parseInt(_0x158d5b(0x172))/0xb+-parseInt(_0x158d5b(0x17d))/0xc;if(_0x43625c===_0x347e5d)break;else _0x1b681d['push'](_0x1b681d['shift']());}catch(_0x19f6ce){_0x1b681d['push'](_0x1b681d['shift']());}}}(a250_0x3ab5,0x2113a));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';function a250_0x5877(_0x3d1633,_0x5b537f){_0x3d1633=_0x3d1633-0x168;const _0x3ab555=a250_0x3ab5();let _0x5877c1=_0x3ab555[_0x3d1633];return _0x5877c1;}import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x4dc634){const _0x3e76fb=a250_0x5877;if(_0x4dc634===_0x3e76fb(0x17e))return _0x3e76fb(0x16c);if(_0x4dc634===_0x3e76fb(0x168))return'mybatisXml';return undefined;}async function scanSqlFilesRecursively(_0x31e946,_0xa5fa8a){const _0xb24f7e=a250_0x5877,_0x2d72e5=[];try{const _0x50146c=await readdir(_0x31e946,{'withFileTypes':!![]});for(const _0x3b423a of _0x50146c){const _0x23b558=join(_0x31e946,_0x3b423a[_0xb24f7e(0x180)]);if(_0x3b423a['isDirectory']()){_0x2d72e5['push'](...await scanSqlFilesRecursively(_0x23b558,_0xa5fa8a));continue;}if(!_0x3b423a['isFile']())continue;const _0x508cfe=extname(_0x3b423a['name'])[_0xb24f7e(0x189)](),_0x472d3c=extensionToMode(_0x508cfe);if(!_0x472d3c)continue;const _0x1d20ba=relative(_0xa5fa8a,_0x23b558)[_0xb24f7e(0x16d)](/\\/g,'/'),_0x3da126=_0x1d20ba[_0xb24f7e(0x17f)]('/')[_0xb24f7e(0x188)](Boolean),_0xd7dafe=parseSqlPath(_0x3da126,_0x3b423a[_0xb24f7e(0x180)],_0x508cfe);if(!_0xd7dafe)continue;_0x2d72e5[_0xb24f7e(0x179)]({'sqlCode':_0xd7dafe[_0xb24f7e(0x16e)],'sqlName':_0xd7dafe[_0xb24f7e(0x17a)],'dbDirectory':_0x3da126[0x0],'filePath':_0x23b558,'relativePath':_0x1d20ba,'lockKey':_0xd7dafe[_0xb24f7e(0x16e)],'mode':_0x472d3c});}}catch(_0x45301f){if(_0x45301f[_0xb24f7e(0x16f)]!==_0xb24f7e(0x181))throw _0x45301f;}return _0x2d72e5;}export async function scanLocalSqlQueries(_0x56f680){const _0x2338a5=a250_0x5877;return scanSqlFilesRecursively(_0x56f680[_0x2338a5(0x173)],_0x56f680[_0x2338a5(0x173)]);}export function resolveLocalSqlFilePath(_0x1bdda8,_0x22b2ea,_0x2c6cf5){const _0x30b1ff=a250_0x5877,_0x2b342a=_0x2c6cf5?.[_0x30b1ff(0x170)]||(_0x2c6cf5?.[_0x30b1ff(0x17a)]||_0x2c6cf5?.[_0x30b1ff(0x183)]?buildSqlRelativePath(_0x22b2ea,_0x2c6cf5?.[_0x30b1ff(0x17a)],_0x2c6cf5?.['dbName'],_0x2c6cf5?.['mode']||_0x30b1ff(0x16c),_0x2c6cf5?.[_0x30b1ff(0x175)]):buildDefaultSqlFileName(_0x22b2ea,_0x2c6cf5?.[_0x30b1ff(0x182)]||_0x30b1ff(0x16c)));return join(_0x1bdda8[_0x30b1ff(0x173)],_0x2b342a);}function a250_0x3ab5(){const _0x1b28cd=['.sql','split','name','ENOENT','mode','dbName','12mgNcdg','4hIEbPp','9060JYXcPw','length','filter','toLowerCase','.xml','9754jjIPQi','slice','4186IgEgYd','sql','replace','sqlCode','code','path','130FZlOEt','2818706NRgruw','sqlRootDir','2648lViJFh','dbId','370UlOqXT','indexOf','57159tBUgUE','push','sqlName','483213IYCvFf','test','2196048TQmRiz'];a250_0x3ab5=function(){return _0x1b28cd;};return a250_0x3ab5();}export async function directoryExists(_0x347447){try{const _0xfabc28=await stat(_0x347447);return _0xfabc28['isDirectory']();}catch{return![];}}function parseSqlPath(_0x420e76,_0x340717,_0x44bff7){const _0x4e3d8e=a250_0x5877,_0x3d44f9=_0x340717['slice'](0x0,-_0x44bff7[_0x4e3d8e(0x187)]);if(_0x420e76[_0x4e3d8e(0x187)]<0x2)return null;const _0x2019a0=_0x3d44f9[_0x4e3d8e(0x177)]('_');if(_0x2019a0<=0x0||_0x2019a0>=_0x3d44f9[_0x4e3d8e(0x187)]-0x1)return null;const _0x489dd8=_0x3d44f9[_0x4e3d8e(0x16a)](0x0,_0x2019a0);if(!isLikelySqlCode(_0x489dd8))return null;return{'sqlCode':_0x489dd8,'sqlName':_0x3d44f9['slice'](_0x2019a0+0x1)};}function isLikelySqlCode(_0x2c72a6){const _0x3d3245=a250_0x5877;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x3d3245(0x17c)](_0x2c72a6);}
1
+ (function(_0x214ee6,_0xbff49c){const _0x53f897=a251_0x4166,_0x527095=_0x214ee6();while(!![]){try{const _0x4533d7=parseInt(_0x53f897(0x1ba))/0x1*(parseInt(_0x53f897(0x1c0))/0x2)+-parseInt(_0x53f897(0x1bf))/0x3+parseInt(_0x53f897(0x1a8))/0x4*(-parseInt(_0x53f897(0x1a6))/0x5)+parseInt(_0x53f897(0x1c2))/0x6+parseInt(_0x53f897(0x1b8))/0x7*(-parseInt(_0x53f897(0x1aa))/0x8)+-parseInt(_0x53f897(0x1b2))/0x9*(parseInt(_0x53f897(0x1c4))/0xa)+parseInt(_0x53f897(0x1c6))/0xb*(parseInt(_0x53f897(0x1c3))/0xc);if(_0x4533d7===_0xbff49c)break;else _0x527095['push'](_0x527095['shift']());}catch(_0x1a2d20){_0x527095['push'](_0x527095['shift']());}}}(a251_0xbbb0,0xd1538));function a251_0x4166(_0x20256e,_0x4e9b31){_0x20256e=_0x20256e-0x1a4;const _0xbbb074=a251_0xbbb0();let _0x416668=_0xbbb074[_0x20256e];return _0x416668;}import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a251_0xbbb0(){const _0x112e02=['ENOENT','780397IUTwmn','toLowerCase','indexOf','dbName','length','3193917FAiZLw','2LYZigu','filter','5597658FqzUtC','172212vazzXQ','110dxLxDJ','replace','1837cKlyQN','.xml','sql','825aaOOqG','slice','29308INouWW','mode','2312SlWnLR','mybatisXml','dbId','isFile','sqlCode','sqlRootDir','isDirectory','code','6246ojZVlE','path','name','sqlName','split','push','23527CHUJGo'];a251_0xbbb0=function(){return _0x112e02;};return a251_0xbbb0();}function extensionToMode(_0x58d57f){const _0x14e3e7=a251_0x4166;if(_0x58d57f==='.sql')return _0x14e3e7(0x1a5);if(_0x58d57f===_0x14e3e7(0x1a4))return _0x14e3e7(0x1ab);return undefined;}async function scanSqlFilesRecursively(_0xf5942f,_0x4d8958){const _0x57fa1c=a251_0x4166,_0x51ced4=[];try{const _0x2e3f26=await readdir(_0xf5942f,{'withFileTypes':!![]});for(const _0x5cec58 of _0x2e3f26){const _0x5769ad=join(_0xf5942f,_0x5cec58[_0x57fa1c(0x1b4)]);if(_0x5cec58[_0x57fa1c(0x1b0)]()){_0x51ced4['push'](...await scanSqlFilesRecursively(_0x5769ad,_0x4d8958));continue;}if(!_0x5cec58[_0x57fa1c(0x1ad)]())continue;const _0x129f09=extname(_0x5cec58[_0x57fa1c(0x1b4)])[_0x57fa1c(0x1bb)](),_0x1770de=extensionToMode(_0x129f09);if(!_0x1770de)continue;const _0x4581a7=relative(_0x4d8958,_0x5769ad)[_0x57fa1c(0x1c5)](/\\/g,'/'),_0x5e4d6d=_0x4581a7[_0x57fa1c(0x1b6)]('/')[_0x57fa1c(0x1c1)](Boolean),_0xc8f7a=parseSqlPath(_0x5e4d6d,_0x5cec58[_0x57fa1c(0x1b4)],_0x129f09);if(!_0xc8f7a)continue;_0x51ced4[_0x57fa1c(0x1b7)]({'sqlCode':_0xc8f7a['sqlCode'],'sqlName':_0xc8f7a[_0x57fa1c(0x1b5)],'dbDirectory':_0x5e4d6d[0x0],'filePath':_0x5769ad,'relativePath':_0x4581a7,'lockKey':_0xc8f7a[_0x57fa1c(0x1ae)],'mode':_0x1770de});}}catch(_0x25a4b2){if(_0x25a4b2[_0x57fa1c(0x1b1)]!==_0x57fa1c(0x1b9))throw _0x25a4b2;}return _0x51ced4;}export async function scanLocalSqlQueries(_0x2801df){const _0x3018f9=a251_0x4166;return scanSqlFilesRecursively(_0x2801df[_0x3018f9(0x1af)],_0x2801df['sqlRootDir']);}export function resolveLocalSqlFilePath(_0x59d439,_0x4beacc,_0xca754e){const _0x4758e0=a251_0x4166,_0x598b55=_0xca754e?.[_0x4758e0(0x1b3)]||(_0xca754e?.['sqlName']||_0xca754e?.[_0x4758e0(0x1bd)]?buildSqlRelativePath(_0x4beacc,_0xca754e?.['sqlName'],_0xca754e?.[_0x4758e0(0x1bd)],_0xca754e?.['mode']||_0x4758e0(0x1a5),_0xca754e?.[_0x4758e0(0x1ac)]):buildDefaultSqlFileName(_0x4beacc,_0xca754e?.[_0x4758e0(0x1a9)]||_0x4758e0(0x1a5)));return join(_0x59d439['sqlRootDir'],_0x598b55);}export async function directoryExists(_0x13bb03){const _0x4ecc96=a251_0x4166;try{const _0x30687f=await stat(_0x13bb03);return _0x30687f[_0x4ecc96(0x1b0)]();}catch{return![];}}function parseSqlPath(_0x210cc1,_0x57e155,_0x53ff5d){const _0x7a69c1=a251_0x4166,_0x3e0904=_0x57e155[_0x7a69c1(0x1a7)](0x0,-_0x53ff5d[_0x7a69c1(0x1be)]);if(_0x210cc1[_0x7a69c1(0x1be)]<0x2)return null;const _0x186bfa=_0x3e0904[_0x7a69c1(0x1bc)]('_');if(_0x186bfa<=0x0||_0x186bfa>=_0x3e0904[_0x7a69c1(0x1be)]-0x1)return null;const _0x19d43a=_0x3e0904[_0x7a69c1(0x1a7)](0x0,_0x186bfa);if(!isLikelySqlCode(_0x19d43a))return null;return{'sqlCode':_0x19d43a,'sqlName':_0x3e0904[_0x7a69c1(0x1a7)](_0x186bfa+0x1)};}function isLikelySqlCode(_0x29e133){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0x29e133);}
@@ -1 +1 @@
1
- (function(_0x427a82,_0xfa218d){const _0x1f747b=a251_0xb1d2,_0x520f9e=_0x427a82();while(!![]){try{const _0x2ded2a=parseInt(_0x1f747b(0xce))/0x1+-parseInt(_0x1f747b(0xca))/0x2+-parseInt(_0x1f747b(0xc9))/0x3+-parseInt(_0x1f747b(0xcd))/0x4*(-parseInt(_0x1f747b(0xc8))/0x5)+-parseInt(_0x1f747b(0xd0))/0x6+-parseInt(_0x1f747b(0xd2))/0x7+parseInt(_0x1f747b(0xcb))/0x8;if(_0x2ded2a===_0xfa218d)break;else _0x520f9e['push'](_0x520f9e['shift']());}catch(_0x50f92b){_0x520f9e['push'](_0x520f9e['shift']());}}}(a251_0x1db8,0x7e37d));function a251_0xb1d2(_0x5dc143,_0xac2fe1){_0x5dc143=_0x5dc143-0xc7;const _0x1db8fd=a251_0x1db8();let _0xb1d2c6=_0x1db8fd[_0x5dc143];return _0xb1d2c6;}import{readFile}from'node:fs/promises';import a251_0x557091 from'node:crypto';export function computeSqlContentHash(_0x393d72){const _0x4aa928=a251_0xb1d2;return a251_0x557091[_0x4aa928(0xc7)]('md5')[_0x4aa928(0xcc)](_0x393d72)['digest'](_0x4aa928(0xcf));}export async function computeSqlFileHash(_0x19503f){const _0x33a7ca=a251_0xb1d2,_0x4c0465=await readFile(_0x19503f,_0x33a7ca(0xd1));return computeSqlContentHash(_0x4c0465);}function a251_0x1db8(){const _0x4383c8=['1447182ZCQwZr','utf8','4360251nhXWrV','createHash','961325nOMcpi','2691051IANyLR','783884RkJset','11122472ehLcMa','update','16UMsnZp','510669VpsDWw','hex'];a251_0x1db8=function(){return _0x4383c8;};return a251_0x1db8();}
1
+ (function(_0x37c359,_0x3723f6){const _0x44d3b2=a252_0x34d2,_0x1d0fe9=_0x37c359();while(!![]){try{const _0x4d409e=parseInt(_0x44d3b2(0x1c6))/0x1*(parseInt(_0x44d3b2(0x1cd))/0x2)+parseInt(_0x44d3b2(0x1cb))/0x3*(parseInt(_0x44d3b2(0x1ca))/0x4)+-parseInt(_0x44d3b2(0x1c9))/0x5*(parseInt(_0x44d3b2(0x1c7))/0x6)+parseInt(_0x44d3b2(0x1c3))/0x7+parseInt(_0x44d3b2(0x1ce))/0x8*(-parseInt(_0x44d3b2(0x1cf))/0x9)+parseInt(_0x44d3b2(0x1c5))/0xa+-parseInt(_0x44d3b2(0x1c4))/0xb;if(_0x4d409e===_0x3723f6)break;else _0x1d0fe9['push'](_0x1d0fe9['shift']());}catch(_0x592498){_0x1d0fe9['push'](_0x1d0fe9['shift']());}}}(a252_0x9eef,0x7e584));import{readFile}from'node:fs/promises';function a252_0x9eef(){const _0x54a346=['3167176hGRAMF','18WwHaqH','update','hex','3609319ubJLUD','20053957cTkWzC','10097970aYAzgZ','34568LIQtfU','2154TwWZWr','digest','195TSdXJq','103084mwGUFj','72zNujaI','utf8','58mayAbU'];a252_0x9eef=function(){return _0x54a346;};return a252_0x9eef();}import a252_0x21313d from'node:crypto';function a252_0x34d2(_0x193c79,_0x57d8c8){_0x193c79=_0x193c79-0x1c2;const _0x9eef1b=a252_0x9eef();let _0x34d253=_0x9eef1b[_0x193c79];return _0x34d253;}export function computeSqlContentHash(_0x5c0392){const _0x1e5579=a252_0x34d2;return a252_0x21313d['createHash']('md5')[_0x1e5579(0x1d0)](_0x5c0392)[_0x1e5579(0x1c8)](_0x1e5579(0x1c2));}export async function computeSqlFileHash(_0x2ab221){const _0x57e1f0=a252_0x34d2,_0x5d52e5=await readFile(_0x2ab221,_0x57e1f0(0x1cc));return computeSqlContentHash(_0x5d52e5);}
@@ -1 +1 @@
1
- function a252_0x318e(){const _0x14d6f3=['3104490FmrxnE','927492XZQArY','apps','23154Yhpgff','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','parse',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','243JyXHQu','ENOENT','36104laEAXG','code','6lYtAxx','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','stringify','lastSync','801ixfSaG','\x22.\x20','1324442ZbByca','utf8','710156MVppvH','\x22\x20vs\x20lock\x20\x22','22qKEzcC','sqlRoot','1540470KygFuW'];a252_0x318e=function(){return _0x14d6f3;};return a252_0x318e();}(function(_0x17372d,_0x4ba62b){const _0x3591ac=a252_0x63ab,_0x540761=_0x17372d();while(!![]){try{const _0x237efe=-parseInt(_0x3591ac(0xc1))/0x1+-parseInt(_0x3591ac(0xc9))/0x2*(-parseInt(_0x3591ac(0xcd))/0x3)+-parseInt(_0x3591ac(0xc7))/0x4+parseInt(_0x3591ac(0xc5))/0x5+-parseInt(_0x3591ac(0xd1))/0x6*(-parseInt(_0x3591ac(0xbf))/0x7)+parseInt(_0x3591ac(0xcf))/0x8*(-parseInt(_0x3591ac(0xd5))/0x9)+-parseInt(_0x3591ac(0xc6))/0xa*(-parseInt(_0x3591ac(0xc3))/0xb);if(_0x237efe===_0x4ba62b)break;else _0x540761['push'](_0x540761['shift']());}catch(_0x34c50f){_0x540761['push'](_0x540761['shift']());}}}(a252_0x318e,0xade39));function a252_0x63ab(_0x4161c6,_0x2609b8){_0x4161c6=_0x4161c6-0xbf;const _0x318eb5=a252_0x318e();let _0x63ab6b=_0x318eb5[_0x4161c6];return _0x63ab6b;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0xa0d35e,_0x5117bf,_0x2cf0d8,_0x131079){const _0x2a2724=a252_0x63ab,_0x4a2301=_0xa0d35e??createEmptySqlLock();let _0x218266=_0x4a2301[_0x2a2724(0xc8)][_0x5117bf];if(!_0x218266)return _0x218266={'sqlRoot':_0x2cf0d8,'lastSync':'','sqls':{}},_0x4a2301[_0x2a2724(0xc8)][_0x5117bf]=_0x218266,{'lockData':_0x4a2301,'appLock':_0x218266};if(!_0x218266['sqlRoot'])_0x218266[_0x2a2724(0xc4)]=_0x2cf0d8;else{if(_0x218266[_0x2a2724(0xc4)]!==_0x2cf0d8)throw new Error(_0x131079+_0x2a2724(0xcc)+_0x2cf0d8+_0x2a2724(0xc2)+_0x218266[_0x2a2724(0xc4)]+_0x2a2724(0xd6)+_0x2a2724(0xca));}return!_0x218266['sqls']&&(_0x218266['sqls']={}),!_0x218266[_0x2a2724(0xd4)]&&(_0x218266[_0x2a2724(0xd4)]=''),{'lockData':_0x4a2301,'appLock':_0x218266};}export async function readSqlLockFile(_0x289cae){const _0xe0d22a=a252_0x63ab;try{const _0x3ed61=await readFile(_0x289cae,_0xe0d22a(0xc0));return JSON[_0xe0d22a(0xcb)](_0x3ed61);}catch(_0x666c96){if(_0x666c96[_0xe0d22a(0xd0)]===_0xe0d22a(0xce))return null;throw new Error(_0xe0d22a(0xd2)+String(_0x666c96));}}export async function writeSqlLockFile(_0x29c436,_0x3cfc55){const _0x2e8e9a=a252_0x63ab;await mkdir(dirname(_0x29c436),{'recursive':!![]}),await writeFile(_0x29c436,JSON[_0x2e8e9a(0xd3)](_0x3cfc55,null,0x2),'utf8');}
1
+ (function(_0x68b73b,_0x44d4c8){const _0x25344a=a253_0x4811,_0x1aee32=_0x68b73b();while(!![]){try{const _0x4f9278=-parseInt(_0x25344a(0x169))/0x1+-parseInt(_0x25344a(0x16b))/0x2*(parseInt(_0x25344a(0x168))/0x3)+parseInt(_0x25344a(0x175))/0x4+parseInt(_0x25344a(0x173))/0x5+parseInt(_0x25344a(0x16e))/0x6+parseInt(_0x25344a(0x170))/0x7*(parseInt(_0x25344a(0x178))/0x8)+parseInt(_0x25344a(0x172))/0x9*(-parseInt(_0x25344a(0x167))/0xa);if(_0x4f9278===_0x44d4c8)break;else _0x1aee32['push'](_0x1aee32['shift']());}catch(_0x3881d4){_0x1aee32['push'](_0x1aee32['shift']());}}}(a253_0x4425,0xc96ea));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x167709,_0x25e16b,_0x5897bf,_0x3aba29){const _0x5a1e54=a253_0x4811,_0x46f98f=_0x167709??createEmptySqlLock();let _0x7be57e=_0x46f98f[_0x5a1e54(0x174)][_0x25e16b];if(!_0x7be57e)return _0x7be57e={'sqlRoot':_0x5897bf,'lastSync':'','sqls':{}},_0x46f98f[_0x5a1e54(0x174)][_0x25e16b]=_0x7be57e,{'lockData':_0x46f98f,'appLock':_0x7be57e};if(!_0x7be57e[_0x5a1e54(0x177)])_0x7be57e[_0x5a1e54(0x177)]=_0x5897bf;else{if(_0x7be57e['sqlRoot']!==_0x5897bf)throw new Error(_0x3aba29+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x5897bf+_0x5a1e54(0x16d)+_0x7be57e[_0x5a1e54(0x177)]+_0x5a1e54(0x17a)+_0x5a1e54(0x17b));}return!_0x7be57e[_0x5a1e54(0x171)]&&(_0x7be57e[_0x5a1e54(0x171)]={}),!_0x7be57e[_0x5a1e54(0x17d)]&&(_0x7be57e['lastSync']=''),{'lockData':_0x46f98f,'appLock':_0x7be57e};}export async function readSqlLockFile(_0x411b04){const _0x3078ef=a253_0x4811;try{const _0x3bb598=await readFile(_0x411b04,_0x3078ef(0x16f));return JSON[_0x3078ef(0x179)](_0x3bb598);}catch(_0x511fcd){if(_0x511fcd[_0x3078ef(0x17c)]===_0x3078ef(0x176))return null;throw new Error(_0x3078ef(0x16c)+String(_0x511fcd));}}function a253_0x4811(_0x2c1c3d,_0x42c128){_0x2c1c3d=_0x2c1c3d-0x167;const _0x442578=a253_0x4425();let _0x481116=_0x442578[_0x2c1c3d];return _0x481116;}function a253_0x4425(){const _0x3b8ba6=['\x22.\x20','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','code','lastSync','4540cLqxzL','6Xiivfh','822435qhHRmN','stringify','926708ueuofz','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','\x22\x20vs\x20lock\x20\x22','5712960dxNDaG','utf8','1702351bchDvj','sqls','28206NOftGl','3728255IqSXaX','apps','4333076PsuxTo','ENOENT','sqlRoot','40mgWGUN','parse'];a253_0x4425=function(){return _0x3b8ba6;};return a253_0x4425();}export async function writeSqlLockFile(_0x140ca2,_0x21fa42){const _0x4c1108=a253_0x4811;await mkdir(dirname(_0x140ca2),{'recursive':!![]}),await writeFile(_0x140ca2,JSON[_0x4c1108(0x16a)](_0x21fa42,null,0x2),_0x4c1108(0x16f));}
@@ -1 +1 @@
1
- (function(_0x1b4aa2,_0x37194b){const _0x2f4e5c=a254_0x31c0,_0x29bb80=_0x1b4aa2();while(!![]){try{const _0x3e93ab=-parseInt(_0x2f4e5c(0x97))/0x1+-parseInt(_0x2f4e5c(0x91))/0x2*(-parseInt(_0x2f4e5c(0xa1))/0x3)+parseInt(_0x2f4e5c(0x9e))/0x4+parseInt(_0x2f4e5c(0x94))/0x5*(parseInt(_0x2f4e5c(0xa6))/0x6)+parseInt(_0x2f4e5c(0x9a))/0x7*(-parseInt(_0x2f4e5c(0xa3))/0x8)+-parseInt(_0x2f4e5c(0x93))/0x9*(parseInt(_0x2f4e5c(0x92))/0xa)+-parseInt(_0x2f4e5c(0xa4))/0xb*(-parseInt(_0x2f4e5c(0x95))/0xc);if(_0x3e93ab===_0x37194b)break;else _0x29bb80['push'](_0x29bb80['shift']());}catch(_0x22d1dc){_0x29bb80['push'](_0x29bb80['shift']());}}}(a254_0x3e00,0x7af86));export function detectSqlMode(_0x327c82){const _0x42fe9f=a254_0x31c0,_0x2cd2ad=_0x327c82[_0x42fe9f(0x9b)]();if(/^<(select|insert|update|delete)\b/i[_0x42fe9f(0x9d)](_0x2cd2ad))return _0x42fe9f(0xa7);return _0x42fe9f(0xa0);}function a254_0x3e00(){const _0x13575b=['.xml','7JJyggs','trimStart','trim','test','3650080ZhKnfv','unknown-sql','sql','5667ZBUNec','replace','3856304kWWMYt','8456789YpNMYe','unknown-db','624756IcUiyD','mybatisXml','134HzudNX','1102440wJfZub','63VvysDl','40Dbzash','12uoYcDu','.sql','883458PyBOob','db-'];a254_0x3e00=function(){return _0x13575b;};return a254_0x3e00();}export function getSqlFileExtension(_0x480271){const _0x48819d=a254_0x31c0;return _0x480271==='mybatisXml'?_0x48819d(0x99):_0x48819d(0x96);}export function buildDefaultSqlFileName(_0x373d3e,_0x509db3){return''+_0x373d3e+getSqlFileExtension(_0x509db3);}export function sanitizeSqlPathSegment(_0x2d4644,_0x1235f9){const _0x2424ce=a254_0x31c0,_0x44937c=String(_0x2d4644??'')[_0x2424ce(0x9c)](),_0x528af0=_0x44937c[_0x2424ce(0xa2)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2424ce(0xa2)](/\s+/g,'-')[_0x2424ce(0xa2)](/-+/g,'-')[_0x2424ce(0xa2)](/^\.+/,'')[_0x2424ce(0xa2)](/\.+$/,'')['replace'](/^-+/,'')[_0x2424ce(0xa2)](/-+$/,'');return _0x528af0||_0x1235f9;}export function buildDbDirectoryName(_0x1e7ea7,_0x15ee93){const _0x1ec961=a254_0x31c0;return sanitizeSqlPathSegment(_0x1e7ea7,_0x15ee93!=null?_0x1ec961(0x98)+_0x15ee93:_0x1ec961(0xa5));}function a254_0x31c0(_0x5684db,_0x48772a){_0x5684db=_0x5684db-0x91;const _0x3e004a=a254_0x3e00();let _0x31c047=_0x3e004a[_0x5684db];return _0x31c047;}export function buildSqlRelativePath(_0x221fa9,_0x77a4d4,_0x54a5f8,_0x3dd18a,_0xd30604){const _0x44a44b=a254_0x31c0,_0x2ff5e0=buildDbDirectoryName(_0x54a5f8,_0xd30604),_0x2da619=sanitizeSqlPathSegment(_0x221fa9,_0x44a44b(0x9f)),_0x5d7a5a=sanitizeSqlPathSegment(_0x77a4d4,_0x2da619);return _0x2ff5e0+'/'+_0x2da619+'_'+_0x5d7a5a+getSqlFileExtension(_0x3dd18a);}
1
+ (function(_0x5091b4,_0x439e15){const _0x4eb00c=a255_0x4895,_0x4b9fa4=_0x5091b4();while(!![]){try{const _0x159497=-parseInt(_0x4eb00c(0x18f))/0x1*(parseInt(_0x4eb00c(0x191))/0x2)+parseInt(_0x4eb00c(0x195))/0x3*(-parseInt(_0x4eb00c(0x198))/0x4)+-parseInt(_0x4eb00c(0x19c))/0x5+-parseInt(_0x4eb00c(0x192))/0x6+parseInt(_0x4eb00c(0x193))/0x7+parseInt(_0x4eb00c(0x19b))/0x8+parseInt(_0x4eb00c(0x18c))/0x9*(parseInt(_0x4eb00c(0x197))/0xa);if(_0x159497===_0x439e15)break;else _0x4b9fa4['push'](_0x4b9fa4['shift']());}catch(_0x928f52){_0x4b9fa4['push'](_0x4b9fa4['shift']());}}}(a255_0x3126,0x78dc6));function a255_0x4895(_0xd504cb,_0xf556a){_0xd504cb=_0xd504cb-0x18c;const _0x3126e7=a255_0x3126();let _0x48958d=_0x3126e7[_0xd504cb];return _0x48958d;}function a255_0x3126(){const _0x64e4af=['.sql','764298ZpQacj','3946170dyhcyg','533309Uahqsw','replace','318sdlDFQ','sql','1470KkQUnf','17552WkdvHU','mybatisXml','trim','2872968LAAohe','304080AiYZQu','test','trimStart','99522jeDvES','db-','.xml','1gbErDe'];a255_0x3126=function(){return _0x64e4af;};return a255_0x3126();}export function detectSqlMode(_0x458a17){const _0x1fec47=a255_0x4895,_0x5512e4=_0x458a17[_0x1fec47(0x19e)]();if(/^<(select|insert|update|delete)\b/i[_0x1fec47(0x19d)](_0x5512e4))return'mybatisXml';return _0x1fec47(0x196);}export function getSqlFileExtension(_0x445b77){const _0x11bfcf=a255_0x4895;return _0x445b77===_0x11bfcf(0x199)?_0x11bfcf(0x18e):_0x11bfcf(0x190);}export function buildDefaultSqlFileName(_0xa89ad4,_0x2d190f){return''+_0xa89ad4+getSqlFileExtension(_0x2d190f);}export function sanitizeSqlPathSegment(_0x1ddf76,_0x4704b0){const _0x499e30=a255_0x4895,_0x4de0b9=String(_0x1ddf76??'')[_0x499e30(0x19a)](),_0x5c0be5=_0x4de0b9[_0x499e30(0x194)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x499e30(0x194)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x499e30(0x194)](/^\.+/,'')['replace'](/\.+$/,'')[_0x499e30(0x194)](/^-+/,'')[_0x499e30(0x194)](/-+$/,'');return _0x5c0be5||_0x4704b0;}export function buildDbDirectoryName(_0x4cf7c5,_0x4acd11){const _0x3ce49d=a255_0x4895;return sanitizeSqlPathSegment(_0x4cf7c5,_0x4acd11!=null?_0x3ce49d(0x18d)+_0x4acd11:'unknown-db');}export function buildSqlRelativePath(_0x18acb5,_0x1ad0e7,_0xe3570d,_0x12ad59,_0x56d27c){const _0x59ef28=buildDbDirectoryName(_0xe3570d,_0x56d27c),_0x63984b=sanitizeSqlPathSegment(_0x18acb5,'unknown-sql'),_0x531abb=sanitizeSqlPathSegment(_0x1ad0e7,_0x63984b);return _0x59ef28+'/'+_0x63984b+'_'+_0x531abb+getSqlFileExtension(_0x12ad59);}