@lovrabet/rabetbase-cli 2.4.6-beta.1 → 2.4.6-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.d.ts +8 -7
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/types.d.ts +17 -2
  134. package/lib/commands/menu/shared/update-core.js +1 -1
  135. package/lib/commands/menu/shared/valid-url.js +1 -1
  136. package/lib/commands/menu/sync.js +1 -1
  137. package/lib/commands/menu/visibility-update.d.ts +2 -0
  138. package/lib/commands/menu/visibility-update.js +1 -0
  139. package/lib/commands/notification/config-create.js +1 -1
  140. package/lib/commands/notification/config-delete.js +1 -1
  141. package/lib/commands/notification/config-list.js +1 -1
  142. package/lib/commands/notification/config-update.js +1 -1
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.js +1 -1
  145. package/lib/commands/ocr/index.js +1 -1
  146. package/lib/commands/page/create.js +1 -1
  147. package/lib/commands/page/custom/detail.js +1 -1
  148. package/lib/commands/page/custom/list.js +1 -1
  149. package/lib/commands/page/custom/publish.js +1 -1
  150. package/lib/commands/page/custom/shared.js +1 -1
  151. package/lib/commands/page/custom/syntax.js +1 -1
  152. package/lib/commands/page/custom/template.js +1 -1
  153. package/lib/commands/page/custom/update.js +1 -1
  154. package/lib/commands/page/data-list-status.js +1 -1
  155. package/lib/commands/page/generate-start.js +1 -1
  156. package/lib/commands/page/generate-status.js +1 -1
  157. package/lib/commands/page/index.js +1 -1
  158. package/lib/commands/page/pull.js +1 -1
  159. package/lib/commands/page/push.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/sync.js +1 -1
  164. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  165. package/lib/commands/project/create/format-elapsed.js +1 -1
  166. package/lib/commands/project/create/main.js +1 -1
  167. package/lib/commands/project/create/materialize-project-template.js +1 -1
  168. package/lib/commands/project/create/project-name.js +1 -1
  169. package/lib/commands/project/create/project-template-archive.js +1 -1
  170. package/lib/commands/project/create/project-template-path.js +1 -1
  171. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  172. package/lib/commands/project/create/use-format-code.js +1 -1
  173. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  174. package/lib/commands/project/index.js +1 -1
  175. package/lib/commands/project/upgrade.js +1 -1
  176. package/lib/commands/registry.js +1 -1
  177. package/lib/commands/role/delete.js +1 -1
  178. package/lib/commands/role/detail.js +1 -1
  179. package/lib/commands/role/index.js +1 -1
  180. package/lib/commands/role/list.js +1 -1
  181. package/lib/commands/role/shared.js +1 -1
  182. package/lib/commands/role/update.js +1 -1
  183. package/lib/commands/role/user-add.js +1 -1
  184. package/lib/commands/role/user-remove.js +1 -1
  185. package/lib/commands/role/user-resolve.js +1 -1
  186. package/lib/commands/run/index.js +1 -1
  187. package/lib/commands/schema.js +1 -1
  188. package/lib/commands/sql/create.js +1 -1
  189. package/lib/commands/sql/delete.js +1 -1
  190. package/lib/commands/sql/detail.js +1 -1
  191. package/lib/commands/sql/exec.js +1 -1
  192. package/lib/commands/sql/index.js +1 -1
  193. package/lib/commands/sql/list.js +1 -1
  194. package/lib/commands/sql/pull.js +1 -1
  195. package/lib/commands/sql/push.js +1 -1
  196. package/lib/commands/sql/shared.js +1 -1
  197. package/lib/commands/sql/status.js +1 -1
  198. package/lib/commands/sql/validate.js +1 -1
  199. package/lib/commands/task/index.js +1 -1
  200. package/lib/commands/task/status.js +1 -1
  201. package/lib/commands/tenant/index.js +1 -1
  202. package/lib/commands/tenant/members-list.js +1 -1
  203. package/lib/commands/tenant/shared.js +1 -1
  204. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  205. package/lib/commands/user-account/index.js +1 -1
  206. package/lib/commands/workspace/add.js +1 -1
  207. package/lib/commands/workspace/index.js +1 -1
  208. package/lib/commands/workspace/remove.js +1 -1
  209. package/lib/config/schema.js +1 -1
  210. package/lib/constant/cdn.js +1 -1
  211. package/lib/constant/cli.js +1 -1
  212. package/lib/constant/defaults.js +1 -1
  213. package/lib/constant/domain.js +1 -1
  214. package/lib/constant/env.js +1 -1
  215. package/lib/constant/output.js +1 -1
  216. package/lib/constant/paths.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.js +1 -1
  224. package/lib/core/bff/config.js +1 -1
  225. package/lib/core/bff/file-system.js +1 -1
  226. package/lib/core/bff/hash.js +1 -1
  227. package/lib/core/bff/lock.js +1 -1
  228. package/lib/core/bff/utils.js +1 -1
  229. package/lib/core/db-resolver.js +1 -1
  230. package/lib/core/page/file-system.js +1 -1
  231. package/lib/core/page/hash.js +1 -1
  232. package/lib/core/page/lock.js +1 -1
  233. package/lib/core/sql-index-auditor.js +1 -1
  234. package/lib/core/sql-sync/config.js +1 -1
  235. package/lib/core/sql-sync/file-system.js +1 -1
  236. package/lib/core/sql-sync/hash.js +1 -1
  237. package/lib/core/sql-sync/lock.js +1 -1
  238. package/lib/core/sql-sync/utils.js +1 -1
  239. package/lib/core/sql-validator.js +1 -1
  240. package/lib/errors.js +1 -1
  241. package/lib/framework/build-all-flags.js +1 -1
  242. package/lib/framework/error-output.js +1 -1
  243. package/lib/framework/explicit-yes.js +1 -1
  244. package/lib/framework/flags.js +1 -1
  245. package/lib/framework/help.js +1 -1
  246. package/lib/framework/index.js +1 -1
  247. package/lib/framework/output.js +1 -1
  248. package/lib/framework/response.js +1 -1
  249. package/lib/framework/runner-alias.js +1 -1
  250. package/lib/framework/runner.js +1 -1
  251. package/lib/framework/schema-export.js +1 -1
  252. package/lib/framework/types.js +1 -1
  253. package/lib/generated/build-info.d.ts +4 -4
  254. package/lib/generated/build-info.js +1 -1
  255. package/lib/help.js +1 -1
  256. package/lib/postinstall.js +1 -1
  257. package/lib/runtime/confirmation.js +1 -1
  258. package/lib/runtime/event.js +1 -1
  259. package/lib/runtime/index.js +1 -1
  260. package/lib/runtime/queue.js +1 -1
  261. package/lib/runtime/resolve.js +1 -1
  262. package/lib/skills/builtin-skill.js +1 -1
  263. package/lib/skills/main.js +1 -1
  264. package/lib/skills/npx-skills-add.js +1 -1
  265. package/lib/skills/skill-presence.js +1 -1
  266. package/lib/telemetry/cli-command-trace.js +1 -1
  267. package/lib/telemetry/cli-help-trace.js +1 -1
  268. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  269. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  270. package/lib/telemetry/send-cli-trace-log.js +1 -1
  271. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  272. package/lib/utils/ai_config.js +1 -1
  273. package/lib/utils/apply-jq-filter.js +1 -1
  274. package/lib/utils/cdn-config.js +1 -1
  275. package/lib/utils/check-sdk-version.js +1 -1
  276. package/lib/utils/cli-version-check.js +1 -1
  277. package/lib/utils/cli-version-policy.js +1 -1
  278. package/lib/utils/config.js +1 -1
  279. package/lib/utils/entity-with-id.js +1 -1
  280. package/lib/utils/file-utils.js +1 -1
  281. package/lib/utils/guides-cdn.js +1 -1
  282. package/lib/utils/http-client.js +1 -1
  283. package/lib/utils/is-non-interactive.js +1 -1
  284. package/lib/utils/logger.js +1 -1
  285. package/lib/utils/params.js +1 -1
  286. package/lib/utils/platform.js +1 -1
  287. package/lib/utils/rules-cdn.js +1 -1
  288. package/lib/utils/sleep.js +1 -1
  289. package/lib/utils/template-replacer.js +1 -1
  290. package/lib/utils/update-notice.js +1 -1
  291. package/lib/utils/version.js +1 -1
  292. package/lib/utils/with-active-cookie.js +1 -1
  293. package/lib/utils/write-cli-side-channel.js +1 -1
  294. package/package.json +1 -1
  295. package/skills/rabetbase/SKILL.md +3 -2
  296. package/skills/rabetbase/references/rabetbase-menu-list.md +3 -1
  297. package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +59 -0
  298. package/skills/rabetbase.manifest.json +4 -3
@@ -1 +1 @@
1
- function a229_0x1481(_0x1805db,_0x290398){_0x1805db=_0x1805db-0xc4;const _0x59f145=a229_0x59f1();let _0x14816d=_0x59f145[_0x1805db];return _0x14816d;}(function(_0x3d9c60,_0x456c6f){const _0x12bb50=a229_0x1481,_0x458fdf=_0x3d9c60();while(!![]){try{const _0x4f2ab0=-parseInt(_0x12bb50(0xd5))/0x1*(-parseInt(_0x12bb50(0xc5))/0x2)+parseInt(_0x12bb50(0xc8))/0x3*(parseInt(_0x12bb50(0xd3))/0x4)+parseInt(_0x12bb50(0xd0))/0x5*(-parseInt(_0x12bb50(0xd6))/0x6)+parseInt(_0x12bb50(0xd2))/0x7+parseInt(_0x12bb50(0xce))/0x8+parseInt(_0x12bb50(0xd7))/0x9*(-parseInt(_0x12bb50(0xcb))/0xa)+parseInt(_0x12bb50(0xca))/0xb;if(_0x4f2ab0===_0x456c6f)break;else _0x458fdf['push'](_0x458fdf['shift']());}catch(_0x52bd4e){_0x458fdf['push'](_0x458fdf['shift']());}}}(a229_0x59f1,0x22614));import{mkdir,readFile,writeFile}from'node:fs/promises';function a229_0x59f1(){const _0x38357e=['object','6wZfEMM','894ytNdHC','9yBCUFa','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','9906nbYnSH','ENOENT','apps','164445rBvABP','lastSync','1491622KTRXpC','1409600OqkUgJ','stringify','pages','395552CHcAKU','utf8','4955zNRnaL','code','1119020KSKana','4SlGbVQ'];a229_0x59f1=function(){return _0x38357e;};return a229_0x59f1();}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x57c24c,_0x29fd96){const _0x498c54=a229_0x1481,_0x57e598={'apps':_0x57c24c[_0x498c54(0xc7)]&&typeof _0x57c24c[_0x498c54(0xc7)]===_0x498c54(0xd4)?_0x57c24c[_0x498c54(0xc7)]:{}};let _0x19cc2d=_0x57e598[_0x498c54(0xc7)][_0x29fd96];if(!_0x19cc2d)return _0x19cc2d={'lastSync':'','pages':{}},_0x57e598['apps'][_0x29fd96]=_0x19cc2d,{'lockData':_0x57e598,'appLock':_0x19cc2d};return!_0x19cc2d[_0x498c54(0xc9)]&&(_0x19cc2d[_0x498c54(0xc9)]=''),(!_0x19cc2d[_0x498c54(0xcd)]||typeof _0x19cc2d[_0x498c54(0xcd)]!==_0x498c54(0xd4))&&(_0x19cc2d['pages']={}),{'lockData':_0x57e598,'appLock':_0x19cc2d};}export async function readPageLockFile(_0x3102a1){const _0x3e1f7b=a229_0x1481;try{const _0x35742f=await readFile(_0x3102a1,'utf8'),_0x2b9e69=JSON['parse'](_0x35742f);return{'apps':_0x2b9e69[_0x3e1f7b(0xc7)]&&typeof _0x2b9e69[_0x3e1f7b(0xc7)]==='object'?_0x2b9e69[_0x3e1f7b(0xc7)]:{}};}catch(_0x27307e){if(_0x27307e[_0x3e1f7b(0xd1)]===_0x3e1f7b(0xc6))return null;throw new Error(_0x3e1f7b(0xc4)+String(_0x27307e));}}export async function writePageLockFile(_0x362d69,_0x43615a){const _0x9a6ce8=a229_0x1481;await mkdir(dirname(_0x362d69),{'recursive':!![]}),await writeFile(_0x362d69,JSON[_0x9a6ce8(0xcc)](_0x43615a,null,0x2),_0x9a6ce8(0xcf));}
1
+ (function(_0x3d6bb4,_0x32839d){const _0x121e28=a230_0x1fc3,_0x257f7e=_0x3d6bb4();while(!![]){try{const _0x2b1757=parseInt(_0x121e28(0x153))/0x1+parseInt(_0x121e28(0x14f))/0x2+parseInt(_0x121e28(0x155))/0x3*(-parseInt(_0x121e28(0x14c))/0x4)+parseInt(_0x121e28(0x149))/0x5+parseInt(_0x121e28(0x156))/0x6*(parseInt(_0x121e28(0x157))/0x7)+parseInt(_0x121e28(0x14a))/0x8*(parseInt(_0x121e28(0x151))/0x9)+-parseInt(_0x121e28(0x145))/0xa;if(_0x2b1757===_0x32839d)break;else _0x257f7e['push'](_0x257f7e['shift']());}catch(_0x18b96c){_0x257f7e['push'](_0x257f7e['shift']());}}}(a230_0x173b,0x9d8ef));function a230_0x1fc3(_0x3fad92,_0x9419f9){_0x3fad92=_0x3fad92-0x145;const _0x173bf1=a230_0x173b();let _0x1fc38c=_0x173bf1[_0x3fad92];return _0x1fc38c;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a230_0x173b(){const _0x458967=['5466770BZJLbg','76280jQEedM','parse','878392YYEkwk','lastSync','ENOENT','455704FJqZng','object','27sLuFRj','apps','808699nyrZOW','stringify','12eqgihn','36PhLyXD','247079qsQqMJ','utf8','8465410nzgvTJ','code','pages','Failed\x20to\x20read\x20page\x20lock\x20file:\x20'];a230_0x173b=function(){return _0x458967;};return a230_0x173b();}export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x68df6e,_0x356c68){const _0x3add4c=a230_0x1fc3,_0x52bebd={'apps':_0x68df6e[_0x3add4c(0x152)]&&typeof _0x68df6e[_0x3add4c(0x152)]===_0x3add4c(0x150)?_0x68df6e[_0x3add4c(0x152)]:{}};let _0x5fe4c=_0x52bebd['apps'][_0x356c68];if(!_0x5fe4c)return _0x5fe4c={'lastSync':'','pages':{}},_0x52bebd[_0x3add4c(0x152)][_0x356c68]=_0x5fe4c,{'lockData':_0x52bebd,'appLock':_0x5fe4c};return!_0x5fe4c[_0x3add4c(0x14d)]&&(_0x5fe4c[_0x3add4c(0x14d)]=''),(!_0x5fe4c[_0x3add4c(0x147)]||typeof _0x5fe4c['pages']!==_0x3add4c(0x150))&&(_0x5fe4c['pages']={}),{'lockData':_0x52bebd,'appLock':_0x5fe4c};}export async function readPageLockFile(_0x5a2e74){const _0x23a445=a230_0x1fc3;try{const _0x4a612b=await readFile(_0x5a2e74,_0x23a445(0x158)),_0x49ea17=JSON[_0x23a445(0x14b)](_0x4a612b);return{'apps':_0x49ea17[_0x23a445(0x152)]&&typeof _0x49ea17[_0x23a445(0x152)]==='object'?_0x49ea17[_0x23a445(0x152)]:{}};}catch(_0x33c58c){if(_0x33c58c[_0x23a445(0x146)]===_0x23a445(0x14e))return null;throw new Error(_0x23a445(0x148)+String(_0x33c58c));}}export async function writePageLockFile(_0x406be3,_0xfa3862){const _0x17af52=a230_0x1fc3;await mkdir(dirname(_0x406be3),{'recursive':!![]}),await writeFile(_0x406be3,JSON[_0x17af52(0x154)](_0xfa3862,null,0x2),'utf8');}
@@ -1 +1 @@
1
- (function(_0x389553,_0x479f2c){const _0x3af878=a231_0x430a,_0x13fb40=_0x389553();while(!![]){try{const _0x3eb30d=-parseInt(_0x3af878(0xc0))/0x1*(-parseInt(_0x3af878(0xb7))/0x2)+parseInt(_0x3af878(0xd2))/0x3+-parseInt(_0x3af878(0xbe))/0x4+-parseInt(_0x3af878(0xd6))/0x5*(parseInt(_0x3af878(0xe5))/0x6)+parseInt(_0x3af878(0xb6))/0x7*(-parseInt(_0x3af878(0xe1))/0x8)+-parseInt(_0x3af878(0xe8))/0x9+parseInt(_0x3af878(0xf2))/0xa;if(_0x3eb30d===_0x479f2c)break;else _0x13fb40['push'](_0x13fb40['shift']());}catch(_0x5e082e){_0x13fb40['push'](_0x13fb40['shift']());}}}(a231_0x4c78,0xc76e5));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x4e0f6a,_0x1a5cf1){const _0x9bb2a8=a231_0x430a,_0x123e88=[],_0x3b04cb=normalizeSqlForStaticAnalysis(_0x4e0f6a),_0x21657c=(_0x3b04cb[_0x9bb2a8(0xcb)]?[]:extractJoinFacts(_0x3b04cb[_0x9bb2a8(0xd7)]))[_0x9bb2a8(0xf8)](_0x25a1f3=>{const _0x22ccce=_0x9bb2a8;if(_0x25a1f3[_0x22ccce(0xfe)]||_0x25a1f3[_0x22ccce(0xd5)][_0x22ccce(0xf6)]===0x0)return _0x123e88['push']({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3[_0x22ccce(0xd5)],'reason':_0x25a1f3['unsupportedReason']??_0x22ccce(0xe7)}),{'table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3[_0x22ccce(0xd5)],'status':'unavailable'};const _0x3e4c65=resolveTableMetadata(_0x1a5cf1,_0x25a1f3['table']),_0x53106b=(_0x3e4c65?.[_0x22ccce(0xc4)]??[])[_0x22ccce(0xf8)](_0xa4292=>({'index':_0xa4292,'matchedPrefix':findEqualityPrefix(_0xa4292[_0x22ccce(0xd5)],_0x25a1f3[_0x22ccce(0xd5)])}))[_0x22ccce(0xb9)](_0x2722d0=>_0x2722d0[_0x22ccce(0xfc)][_0x22ccce(0xf6)]>0x0),_0x16979d=_0x53106b[_0x22ccce(0xc7)]((_0x5c96a0,_0x348ca3)=>!_0x5c96a0||_0x348ca3[_0x22ccce(0xfc)][_0x22ccce(0xf6)]>_0x5c96a0[_0x22ccce(0xfc)][_0x22ccce(0xf6)]?_0x348ca3:_0x5c96a0,_0x53106b[0x0]);if(_0x16979d)return{'table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3[_0x22ccce(0xd5)],'status':'covered','matchedIndex':{..._0x16979d['index'],'matchedPrefix':_0x16979d[_0x22ccce(0xfc)]}};const _0x9f01d6=_0x3e4c65?.['indexes'][_0x22ccce(0xb9)](_0x3219db=>_0x3219db[_0x22ccce(0xd5)]['some'](_0x4c9f72=>_0x25a1f3[_0x22ccce(0xd5)]['some'](_0x5a94dd=>columnNamesMatch(_0x4c9f72,_0x5a94dd))))??[];if(_0x9f01d6[_0x22ccce(0xf6)]>0x0)return _0x123e88[_0x22ccce(0xd3)]({'code':_0x22ccce(0xe2),'table':_0x25a1f3['table'],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3[_0x22ccce(0xd5)],'reason':_0x22ccce(0xe9)}),{'table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3['alias'],'columns':_0x25a1f3[_0x22ccce(0xd5)],'status':_0x22ccce(0xd0),'candidateIndexes':_0x9f01d6};if(_0x3e4c65&&_0x3e4c65[_0x22ccce(0xb5)]!==![]&&_0x3e4c65[_0x22ccce(0xc4)]['length']>0x0&&_0x25a1f3[_0x22ccce(0xd5)][_0x22ccce(0xf6)]>0x0)return _0x123e88[_0x22ccce(0xd3)]({'code':_0x22ccce(0xf5),'table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3[_0x22ccce(0xd5)],'reason':_0x22ccce(0xbd)}),{'table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3['columns'],'status':'warning'};return _0x123e88['push']({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3[_0x22ccce(0xf4)],'columns':_0x25a1f3[_0x22ccce(0xd5)],'reason':_0x3e4c65?_0x22ccce(0xc9):_0x22ccce(0xc1)}),{'table':_0x25a1f3[_0x22ccce(0xf0)],'alias':_0x25a1f3['alias'],'columns':_0x25a1f3[_0x22ccce(0xd5)],'status':_0x22ccce(0xfb)};});return{'checked':_0x21657c[_0x9bb2a8(0xf6)]>0x0,'joins':_0x21657c,'warnings':_0x123e88};}function extractJoinFacts(_0x17c099){const _0x384862=a231_0x430a,_0x20bc3a=maskNestedQueries(stripSqlNoise(_0x17c099)),_0x3ce8ae=maskQuotedIdentifiers(_0x20bc3a),_0x4ca9aa=[],_0x287f71=new Set(),_0x454b50=/\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 _0xd48868 of _0x20bc3a[_0x384862(0xe3)](_0x454b50)){const _0x3330ca=_0xd48868[_0x384862(0xca)]??0x0,_0x3a0ff4=_0xd48868[0x0]['search'](/\bJOIN\b/i),_0x868293=_0x3330ca+Math['max'](0x0,_0x3a0ff4);if(!/^JOIN\b/i[_0x384862(0xda)](_0x3ce8ae[_0x384862(0xcd)](_0x868293)))continue;_0x287f71[_0x384862(0xf1)](_0x868293);const _0x585711=normalizeIdentifier(_0xd48868[0x1]||_0x384862(0xe4)),_0x244414=normalizeIdentifier(_0xd48868[0x2]??''),_0x4b15a=normalizeIdentifier(_0xd48868[0x3]||_0x244414[_0x384862(0xef)]('.')['at'](-0x1)||_0x244414),_0x562889=[],_0x29dc2e=_0x244414===_0x384862(0xe0);let _0x57ef0b=_0x585711===_0x384862(0xc6)||_0x585711===_0x384862(0xc8)||_0x29dc2e,_0x5981a0=_0x57ef0b?_0x29dc2e?_0x384862(0xba):_0x585711['toUpperCase']()+_0x384862(0xcc):undefined;const _0x4a4961=stripOuterParentheses(_0xd48868[0x4]??''),_0xbd0737=_0x4a4961[_0x384862(0xdc)](MYBATIS_DYNAMIC_START_MARKER)||_0x4a4961[_0x384862(0xdc)](MYBATIS_DYNAMIC_END_MARKER),_0x24891e=_0x4a4961[_0x384862(0xdc)](MYBATIS_INCLUDE_MARKER);_0xbd0737&&(_0x57ef0b=!![],_0x5981a0??=_0x384862(0xc3));_0x24891e&&(_0x57ef0b=!![],_0x5981a0??=_0x384862(0xea));const _0x3a27fa=_0x4a4961[_0x384862(0xff)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x384862(0xff)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x3a27fa,'OR')&&(_0x57ef0b=!![],_0x5981a0??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x5725bf of splitTopLevelAnd(_0x3a27fa)){const _0x3b80d2=stripOuterParentheses(_0x5725bf);if(hasTopLevelKeyword(_0x3b80d2,'OR')){_0x57ef0b=!![],_0x5981a0??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x569b75=splitEquality(_0x3b80d2);if(!_0x569b75){containsColumnReference(_0x5725bf,_0x4b15a)&&(_0x57ef0b=!![]);continue;}const _0x5505bb=parseDirectColumnReference(_0x569b75[0x0],_0x4b15a),_0x3b2d4e=parseDirectColumnReference(_0x569b75[0x1],_0x4b15a),_0x4e8a9a=containsColumnReference(_0x569b75[0x0],_0x4b15a),_0x5cee3e=containsColumnReference(_0x569b75[0x1],_0x4b15a),_0x59bcb4=_0x5505bb&&!_0x5cee3e?_0x5505bb:_0x3b2d4e&&!_0x4e8a9a?_0x3b2d4e:null;if(_0x59bcb4&&!_0x562889[_0x384862(0xdc)](_0x59bcb4))_0x562889['push'](_0x59bcb4);else!_0x59bcb4&&containsColumnReference(_0x5725bf,_0x4b15a)&&(_0x57ef0b=!![]);}_0x4ca9aa[_0x384862(0xd3)]({'table':_0x244414,'alias':_0x4b15a,'columns':_0x562889,'unsupportedPredicate':_0x57ef0b,'unsupportedReason':_0x5981a0,'containsUnresolvedInclude':_0x24891e,'position':_0x868293});}for(const _0x3ce8c8 of _0x3ce8ae[_0x384862(0xe3)](/\bJOIN\b/gi)){const _0x2a6cf7=_0x3ce8c8[_0x384862(0xca)]??0x0;if(_0x287f71[_0x384862(0xf7)](_0x2a6cf7))continue;const _0x3f3a8c=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x384862(0xce)](_0x20bc3a['slice'](_0x2a6cf7+_0x3ce8c8[0x0][_0x384862(0xf6)])),_0xf7555a=normalizeIdentifier(_0x3f3a8c?.[0x1]||_0x384862(0xc5)),_0x5f25b4=normalizeIdentifier(_0x3f3a8c?.[0x2]||''),_0x4b237d=isSqlClauseKeyword(_0x5f25b4)?_0xf7555a[_0x384862(0xef)]('.')['at'](-0x1)||_0xf7555a:_0x5f25b4||_0xf7555a[_0x384862(0xef)]('.')['at'](-0x1)||_0xf7555a;_0x4ca9aa['push']({'table':_0xf7555a,'alias':_0x4b237d,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x384862(0xd1),'position':_0x2a6cf7});}const _0x21db5d=_0x3ce8ae[_0x384862(0xfd)](MYBATIS_INCLUDE_MARKER);return _0x21db5d>=0x0&&!_0x4ca9aa[_0x384862(0xed)](_0x20d501=>_0x20d501[_0x384862(0xe6)])&&_0x4ca9aa[_0x384862(0xd3)]({'table':'unknown','alias':_0x384862(0xc5),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x384862(0xb8),'containsUnresolvedInclude':!![],'position':_0x21db5d}),_0x4ca9aa[_0x384862(0xc2)]((_0x1693e5,_0x53a28b)=>_0x1693e5[_0x384862(0xdb)]-_0x53a28b[_0x384862(0xdb)]);}function stripSqlNoise(_0x30a966){const _0x1591d9=a231_0x430a,_0x2b217a=Array[_0x1591d9(0xbc)](_0x30a966),_0x2e1056=(_0x1a4659,_0x48c01e)=>{for(let _0x47ad82=_0x1a4659;_0x47ad82<_0x48c01e;_0x47ad82+=0x1){_0x2b217a[_0x47ad82]!=='\x0a'&&_0x2b217a[_0x47ad82]!=='\x0d'&&(_0x2b217a[_0x47ad82]='\x20');}};for(let _0xe29261=0x0;_0xe29261<_0x2b217a[_0x1591d9(0xf6)];_0xe29261+=0x1){const _0x2e2364=_0x2b217a[_0xe29261],_0xb38abf=_0x2b217a[_0xe29261+0x1];if(_0x2e2364==='\x27'||_0x2e2364==='\x22'||_0x2e2364==='`'){const _0x4a2ec6=_0x2e2364,_0x9ba08f=_0xe29261;_0xe29261+=0x1;while(_0xe29261<_0x2b217a[_0x1591d9(0xf6)]){if(_0x2b217a[_0xe29261]==='\x5c'&&_0xe29261+0x1<_0x2b217a['length']){_0xe29261+=0x2;continue;}if(_0x2b217a[_0xe29261]!==_0x4a2ec6){_0xe29261+=0x1;continue;}if(_0x2b217a[_0xe29261+0x1]===_0x4a2ec6){_0xe29261+=0x2;continue;}break;}if(_0x4a2ec6==='\x27')_0x2e1056(_0x9ba08f,Math[_0x1591d9(0xdf)](_0xe29261+0x1,_0x2b217a[_0x1591d9(0xf6)]));continue;}if(_0x2e2364==='-'&&_0xb38abf==='-'){const _0x43a55b=_0xe29261;while(_0xe29261<_0x2b217a[_0x1591d9(0xf6)]&&_0x2b217a[_0xe29261]!=='\x0a')_0xe29261+=0x1;_0x2e1056(_0x43a55b,_0xe29261);continue;}if(_0x2e2364==='/'&&_0xb38abf==='*'){const _0x2adeab=_0xe29261;_0xe29261+=0x2;while(_0xe29261<_0x2b217a[_0x1591d9(0xf6)]&&!(_0x2b217a[_0xe29261]==='*'&&_0x2b217a[_0xe29261+0x1]==='/')){_0xe29261+=0x1;}_0xe29261=Math['min'](_0xe29261+0x1,_0x2b217a[_0x1591d9(0xf6)]-0x1),_0x2e1056(_0x2adeab,_0xe29261+0x1);continue;}if(_0x2e2364==='#'&&_0xb38abf!=='{'){const _0x30dc8=_0xe29261;while(_0xe29261<_0x2b217a[_0x1591d9(0xf6)]&&_0x2b217a[_0xe29261]!=='\x0a')_0xe29261+=0x1;_0x2e1056(_0x30dc8,_0xe29261);continue;}if((_0x2e2364==='#'||_0x2e2364==='$')&&_0xb38abf==='{'){const _0x303259=_0xe29261;_0xe29261+=0x2;while(_0xe29261<_0x2b217a['length']&&_0x2b217a[_0xe29261]!=='}')_0xe29261+=0x1;_0x2e1056(_0x303259,Math[_0x1591d9(0xdf)](_0xe29261+0x1,_0x2b217a['length']));}}return _0x2b217a[_0x1591d9(0xfa)]('');}function a231_0x4c78(){const _0x498d6d=['The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','index','error','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','slice','exec','trim','warning','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','2973858sRNPPe','push','\x5c$&','columns','15iJSskd','sql','match','startsWith','test','position','includes','toUpperCase','max','min','__sq__','104uGkLVj','JOIN_INDEX_NOT_USABLE','matchAll','INNER','1233126VJeICJ','containsUnresolvedInclude','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','8045262RlwicN','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','endsWith','where','some','replace','split','table','add','33973100MxBvHX','inner','alias','JOIN_INDEX_MISSING','length','has','map','using','join','unavailable','matchedPrefix','indexOf','unsupportedPredicate','replaceAll','metadataAvailable','639478BwpSXa','62XPZhtS','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','filter','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','cross','from','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','6246880uDoTQq','(?:^|[^\x5cw$])','22196qPdhfn','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','sort','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','indexes','unknown','right','reduce','full'];a231_0x4c78=function(){return _0x498d6d;};return a231_0x4c78();}function maskQuotedIdentifiers(_0x437f0f){const _0x201119=a231_0x430a,_0x13ae3c=Array['from'](_0x437f0f);for(let _0x129045=0x0;_0x129045<_0x13ae3c[_0x201119(0xf6)];_0x129045+=0x1){const _0x468f3c=_0x13ae3c[_0x129045];if(_0x468f3c!=='\x22'&&_0x468f3c!=='`')continue;_0x129045+=0x1;while(_0x129045<_0x13ae3c['length']){if(_0x13ae3c[_0x129045]===_0x468f3c){if(_0x13ae3c[_0x129045+0x1]===_0x468f3c){_0x13ae3c[_0x129045]='\x20',_0x13ae3c[_0x129045+0x1]='\x20',_0x129045+=0x2;continue;}break;}_0x13ae3c[_0x129045]='\x20',_0x129045+=0x1;}}return _0x13ae3c[_0x201119(0xfa)]('');}function maskNestedQueries(_0x202547){const _0x4ce457=a231_0x430a,_0x327458=Array[_0x4ce457(0xbc)](_0x202547);for(let _0x2f9831=0x0;_0x2f9831<_0x327458[_0x4ce457(0xf6)];_0x2f9831+=0x1){if(_0x327458[_0x2f9831]!=='(')continue;const _0x4f4beb=_0x202547[_0x4ce457(0xcd)](_0x2f9831+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x4ce457(0xda)](_0x4f4beb))continue;let _0x270469=0x1,_0x15c179=_0x2f9831+0x1;for(;_0x15c179<_0x327458['length']&&_0x270469>0x0;_0x15c179+=0x1){if(_0x327458[_0x15c179]==='(')_0x270469+=0x1;if(_0x327458[_0x15c179]===')')_0x270469-=0x1;}if(_0x270469!==0x0)continue;for(let _0x3a7fab=_0x2f9831;_0x3a7fab<_0x15c179;_0x3a7fab+=0x1){_0x327458[_0x3a7fab]='\x20';}const _0x256013=_0x4ce457(0xe0);for(let _0x31bfd9=0x0;_0x31bfd9<_0x256013[_0x4ce457(0xf6)]&&_0x2f9831+_0x31bfd9<_0x15c179;_0x31bfd9+=0x1){_0x327458[_0x2f9831+_0x31bfd9]=_0x256013[_0x31bfd9];}_0x2f9831=_0x15c179-0x1;}return _0x327458[_0x4ce457(0xfa)]('');}function splitTopLevelAnd(_0x4c1179){const _0x4b332c=a231_0x430a,_0x21096e=[];let _0x5d4b49=0x0,_0x1defff=0x0;for(let _0x5b08a3=0x0;_0x5b08a3<_0x4c1179[_0x4b332c(0xf6)];_0x5b08a3+=0x1){const _0x3ed53d=_0x4c1179[_0x5b08a3];if(_0x3ed53d==='(')_0x5d4b49+=0x1;if(_0x3ed53d===')')_0x5d4b49=Math[_0x4b332c(0xde)](0x0,_0x5d4b49-0x1);_0x5d4b49===0x0&&_0x4c1179[_0x4b332c(0xcd)](_0x5b08a3)[_0x4b332c(0xd8)](/^AND\b/i)&&(_0x5b08a3===0x0||/\s/[_0x4b332c(0xda)](_0x4c1179[_0x5b08a3-0x1]??''))&&(_0x21096e[_0x4b332c(0xd3)](_0x4c1179['slice'](_0x1defff,_0x5b08a3)[_0x4b332c(0xcf)]()),_0x5b08a3+=0x2,_0x1defff=_0x5b08a3+0x1);}const _0x295bc6=_0x4c1179['slice'](_0x1defff)[_0x4b332c(0xcf)]();if(_0x295bc6)_0x21096e['push'](_0x295bc6);return _0x21096e;}function hasTopLevelKeyword(_0x2e56bb,_0x5e64c1){const _0x37a971=a231_0x430a;let _0xf847e0=0x0;for(let _0x1999ca=0x0;_0x1999ca<_0x2e56bb['length'];_0x1999ca+=0x1){const _0x473259=_0x2e56bb[_0x1999ca];if(_0x473259==='(')_0xf847e0+=0x1;if(_0x473259===')')_0xf847e0=Math[_0x37a971(0xde)](0x0,_0xf847e0-0x1);if(_0xf847e0!==0x0)continue;const _0x131b1f=_0x2e56bb[_0x37a971(0xcd)](_0x1999ca,_0x1999ca+_0x5e64c1['length']),_0x280bcd=_0x2e56bb[_0x1999ca-0x1]??'\x20',_0x47cb1f=_0x2e56bb[_0x1999ca+_0x5e64c1[_0x37a971(0xf6)]]??'\x20';if(_0x131b1f[_0x37a971(0xdd)]()===_0x5e64c1[_0x37a971(0xdd)]()&&!/[\w$]/['test'](_0x280bcd)&&!/[\w$]/[_0x37a971(0xda)](_0x47cb1f))return!![];}return![];}function splitEquality(_0x5355db){const _0x239f8d=a231_0x430a,_0x4544fe=stripOuterParentheses(_0x5355db);let _0x4d158c=0x0,_0x513304;for(let _0x5c17c2=0x0;_0x5c17c2<_0x4544fe[_0x239f8d(0xf6)];_0x5c17c2+=0x1){const _0x2004dc=_0x4544fe[_0x5c17c2];if(_0x2004dc==='(')_0x4d158c+=0x1;if(_0x2004dc===')')_0x4d158c=Math['max'](0x0,_0x4d158c-0x1);const _0x244080=_0x4544fe[_0x5c17c2-0x1]??'',_0xf76cc3=_0x4544fe[_0x5c17c2+0x1]??'';if(_0x2004dc==='='&&_0x4d158c===0x0&&!/[!<>=:]/[_0x239f8d(0xda)](_0x244080)&&_0xf76cc3!=='='){if(_0x513304!==undefined)return null;_0x513304=_0x5c17c2;}}return _0x513304===undefined?null:[_0x4544fe[_0x239f8d(0xcd)](0x0,_0x513304)[_0x239f8d(0xcf)](),_0x4544fe[_0x239f8d(0xcd)](_0x513304+0x1)[_0x239f8d(0xcf)]()];}function parseDirectColumnReference(_0x1e7428,_0x4fb7a2){const _0x29a7eb=a231_0x430a,_0x2f6663=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x29a7eb(0xce)](stripOuterParentheses(_0x1e7428));if(!_0x2f6663)return null;if(normalizeIdentifier(_0x2f6663[0x1]??'')!==normalizeIdentifier(_0x4fb7a2))return null;return normalizeIdentifier(_0x2f6663[0x2]??'');}function containsColumnReference(_0x387778,_0x2e5e99){const _0x170da8=a231_0x430a,_0x980e41=_0x387778[_0x170da8(0xee)](/[`"]/g,''),_0x4a2e6c=_0x2e5e99[_0x170da8(0xee)](/[.*+?^${}()|[\]\\]/g,_0x170da8(0xd4));return new RegExp(_0x170da8(0xbf)+_0x4a2e6c+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x170da8(0xda)](_0x980e41);}function findEqualityPrefix(_0x2ec3d5,_0x3c3169){const _0x5b0e43=a231_0x430a,_0x5d5c1f=new Set(_0x3c3169[_0x5b0e43(0xf8)](normalizeIdentifier)),_0x1d3478=[];for(const _0x4dd011 of _0x2ec3d5){if(!_0x5d5c1f[_0x5b0e43(0xf7)](normalizeIdentifier(_0x4dd011)))break;_0x1d3478['push'](_0x4dd011);}return _0x1d3478;}function resolveTableMetadata(_0x2f11ef,_0x42dcf5){const _0x536aad=a231_0x430a,_0x5843a3=normalizeIdentifier(_0x42dcf5),_0x5472cd=_0x2f11ef['filter'](_0xe8dbef=>normalizeIdentifier(_0xe8dbef['tableName'])===_0x5843a3);if(_0x5472cd[_0x536aad(0xf6)]===0x1)return _0x5472cd[0x0];const _0x433b51=_0x5843a3[_0x536aad(0xdc)]('.'),_0x5c2c32=_0x5843a3[_0x536aad(0xef)]('.')['at'](-0x1),_0x217768=_0x2f11ef[_0x536aad(0xb9)](_0x41560b=>{const _0x242981=_0x536aad,_0x1f979f=normalizeIdentifier(_0x41560b['tableName']);if(_0x433b51&&_0x1f979f[_0x242981(0xdc)]('.'))return![];return _0x1f979f[_0x242981(0xef)]('.')['at'](-0x1)===_0x5c2c32;});return _0x217768[_0x536aad(0xf6)]===0x1?_0x217768[0x0]:undefined;}function columnNamesMatch(_0x5b4efc,_0x4589a1){return normalizeIdentifier(_0x5b4efc)===normalizeIdentifier(_0x4589a1);}function normalizeIdentifier(_0x3018e8){const _0x262a72=a231_0x430a;return _0x3018e8['replace'](/[`"]/g,'')[_0x262a72(0xcf)]()['toLowerCase']();}function isSqlClauseKeyword(_0x31bc37){const _0x1035f6=a231_0x430a;return new Set(['on',_0x1035f6(0xf9),_0x1035f6(0xec),_0x1035f6(0xfa),_0x1035f6(0xf3),'left',_0x1035f6(0xc6),_0x1035f6(0xc8),_0x1035f6(0xbb),'natural'])[_0x1035f6(0xf7)](_0x31bc37);}function a231_0x430a(_0x55781d,_0x43628a){_0x55781d=_0x55781d-0xb5;const _0x4c7801=a231_0x4c78();let _0x430a68=_0x4c7801[_0x55781d];return _0x430a68;}function stripOuterParentheses(_0x405653){const _0x46e29a=a231_0x430a;let _0x29388e=_0x405653[_0x46e29a(0xcf)]();while(_0x29388e[_0x46e29a(0xd9)]('(')&&_0x29388e[_0x46e29a(0xeb)](')')){let _0x207538=0x0,_0x1b9f44=!![];for(let _0x591a20=0x0;_0x591a20<_0x29388e[_0x46e29a(0xf6)];_0x591a20+=0x1){if(_0x29388e[_0x591a20]==='(')_0x207538+=0x1;if(_0x29388e[_0x591a20]===')')_0x207538-=0x1;if(_0x207538===0x0&&_0x591a20<_0x29388e[_0x46e29a(0xf6)]-0x1){_0x1b9f44=![];break;}}if(!_0x1b9f44||_0x207538!==0x0)break;_0x29388e=_0x29388e['slice'](0x1,-0x1)[_0x46e29a(0xcf)]();}return _0x29388e;}
1
+ (function(_0x4125d4,_0x5919e0){const _0x2705d8=a232_0x4379,_0x1bf5b6=_0x4125d4();while(!![]){try{const _0x5ce036=-parseInt(_0x2705d8(0xd2))/0x1*(parseInt(_0x2705d8(0x103))/0x2)+parseInt(_0x2705d8(0xd3))/0x3+parseInt(_0x2705d8(0x107))/0x4*(parseInt(_0x2705d8(0xfa))/0x5)+parseInt(_0x2705d8(0xc2))/0x6*(parseInt(_0x2705d8(0xdf))/0x7)+-parseInt(_0x2705d8(0xc8))/0x8+parseInt(_0x2705d8(0x104))/0x9*(parseInt(_0x2705d8(0xf7))/0xa)+parseInt(_0x2705d8(0xbe))/0xb;if(_0x5ce036===_0x5919e0)break;else _0x1bf5b6['push'](_0x1bf5b6['shift']());}catch(_0x3b95c3){_0x1bf5b6['push'](_0x1bf5b6['shift']());}}}(a232_0x4029,0x50964));function a232_0x4029(){const _0x360b52=['exec','map','some','metadataAvailable','1990Pdsthk','indexes','endsWith','5CLuTey','includes','table','matchedPrefix','startsWith','length','INDEX_METADATA_UNAVAILABLE','matchAll','trim','1036202dAAPvc','3123xbwsuC','index','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','1091788qMdedW','match','5132512nwtBgW','unknown','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','2224158Oyrcon','alias','containsUnresolvedInclude','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','toLowerCase','covered','3800752WSTSAP','replaceAll','filter','toUpperCase','\x5cs*\x5c.\x5cs*[\x5cw$]+','(?:^|[^\x5cw$])','min','position','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','max','1TpMbtz','431982FRCQbW','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','tableName','split','has','warning','replace','right','unavailable','INNER','sql','slice','7lBTQLY','add','test','indexOf','JOIN_INDEX_MISSING','error','from','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','push','full','sort','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','join','left','using','unsupportedPredicate','natural','columns','__sq__'];a232_0x4029=function(){return _0x360b52;};return a232_0x4029();}import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x641525,_0x168bcb){const _0xf1449c=a232_0x4379,_0x59d2f4=[],_0x5b5cd2=normalizeSqlForStaticAnalysis(_0x641525),_0x509e8d=(_0x5b5cd2[_0xf1449c(0xe4)]?[]:extractJoinFacts(_0x5b5cd2[_0xf1449c(0xdd)]))[_0xf1449c(0xf4)](_0x50d0fc=>{const _0x24c4a0=_0xf1449c;if(_0x50d0fc[_0x24c4a0(0xef)]||_0x50d0fc['columns']['length']===0x0)return _0x59d2f4[_0x24c4a0(0xe7)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x50d0fc[_0x24c4a0(0xfc)],'alias':_0x50d0fc['alias'],'columns':_0x50d0fc['columns'],'reason':_0x50d0fc['unsupportedReason']??'Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.'}),{'table':_0x50d0fc['table'],'alias':_0x50d0fc['alias'],'columns':_0x50d0fc[_0x24c4a0(0xf1)],'status':_0x24c4a0(0xdb)};const _0x3550da=resolveTableMetadata(_0x168bcb,_0x50d0fc[_0x24c4a0(0xfc)]),_0xd9a0aa=(_0x3550da?.[_0x24c4a0(0xf8)]??[])['map'](_0x5f4732=>({'index':_0x5f4732,'matchedPrefix':findEqualityPrefix(_0x5f4732[_0x24c4a0(0xf1)],_0x50d0fc[_0x24c4a0(0xf1)])}))[_0x24c4a0(0xca)](_0x284e21=>_0x284e21[_0x24c4a0(0xfd)]['length']>0x0),_0x4e443b=_0xd9a0aa['reduce']((_0x5056a6,_0x1f7670)=>!_0x5056a6||_0x1f7670[_0x24c4a0(0xfd)][_0x24c4a0(0xff)]>_0x5056a6[_0x24c4a0(0xfd)]['length']?_0x1f7670:_0x5056a6,_0xd9a0aa[0x0]);if(_0x4e443b)return{'table':_0x50d0fc[_0x24c4a0(0xfc)],'alias':_0x50d0fc[_0x24c4a0(0xc3)],'columns':_0x50d0fc['columns'],'status':_0x24c4a0(0xc7),'matchedIndex':{..._0x4e443b[_0x24c4a0(0x105)],'matchedPrefix':_0x4e443b[_0x24c4a0(0xfd)]}};const _0x312f73=_0x3550da?.['indexes'][_0x24c4a0(0xca)](_0x31f82d=>_0x31f82d[_0x24c4a0(0xf1)][_0x24c4a0(0xf5)](_0x3e826c=>_0x50d0fc['columns'][_0x24c4a0(0xf5)](_0x2a0636=>columnNamesMatch(_0x3e826c,_0x2a0636))))??[];if(_0x312f73['length']>0x0)return _0x59d2f4['push']({'code':'JOIN_INDEX_NOT_USABLE','table':_0x50d0fc[_0x24c4a0(0xfc)],'alias':_0x50d0fc[_0x24c4a0(0xc3)],'columns':_0x50d0fc['columns'],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x50d0fc[_0x24c4a0(0xfc)],'alias':_0x50d0fc[_0x24c4a0(0xc3)],'columns':_0x50d0fc['columns'],'status':_0x24c4a0(0xd8),'candidateIndexes':_0x312f73};if(_0x3550da&&_0x3550da[_0x24c4a0(0xf6)]!==![]&&_0x3550da[_0x24c4a0(0xf8)][_0x24c4a0(0xff)]>0x0&&_0x50d0fc[_0x24c4a0(0xf1)][_0x24c4a0(0xff)]>0x0)return _0x59d2f4[_0x24c4a0(0xe7)]({'code':_0x24c4a0(0xe3),'table':_0x50d0fc[_0x24c4a0(0xfc)],'alias':_0x50d0fc[_0x24c4a0(0xc3)],'columns':_0x50d0fc[_0x24c4a0(0xf1)],'reason':_0x24c4a0(0xea)}),{'table':_0x50d0fc[_0x24c4a0(0xfc)],'alias':_0x50d0fc[_0x24c4a0(0xc3)],'columns':_0x50d0fc[_0x24c4a0(0xf1)],'status':'warning'};return _0x59d2f4['push']({'code':_0x24c4a0(0x100),'table':_0x50d0fc['table'],'alias':_0x50d0fc[_0x24c4a0(0xc3)],'columns':_0x50d0fc[_0x24c4a0(0xf1)],'reason':_0x3550da?_0x24c4a0(0xd0):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x50d0fc['table'],'alias':_0x50d0fc['alias'],'columns':_0x50d0fc[_0x24c4a0(0xf1)],'status':_0x24c4a0(0xdb)};});return{'checked':_0x509e8d[_0xf1449c(0xff)]>0x0,'joins':_0x509e8d,'warnings':_0x59d2f4};}function extractJoinFacts(_0x5a2dd1){const _0x27383e=a232_0x4379,_0x3c50f7=maskNestedQueries(stripSqlNoise(_0x5a2dd1)),_0x463f10=maskQuotedIdentifiers(_0x3c50f7),_0x77d5f3=[],_0x1b05dc=new Set(),_0x261076=/\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 _0xdebed of _0x3c50f7[_0x27383e(0x101)](_0x261076)){const _0x5198e9=_0xdebed[_0x27383e(0x105)]??0x0,_0x29051d=_0xdebed[0x0]['search'](/\bJOIN\b/i),_0x3044f8=_0x5198e9+Math[_0x27383e(0xd1)](0x0,_0x29051d);if(!/^JOIN\b/i[_0x27383e(0xe1)](_0x463f10['slice'](_0x3044f8)))continue;_0x1b05dc[_0x27383e(0xe0)](_0x3044f8);const _0x72c552=normalizeIdentifier(_0xdebed[0x1]||_0x27383e(0xdc)),_0x40250b=normalizeIdentifier(_0xdebed[0x2]??''),_0x1e4e1c=normalizeIdentifier(_0xdebed[0x3]||_0x40250b['split']('.')['at'](-0x1)||_0x40250b),_0x8ff933=[],_0x1eac48=_0x40250b===_0x27383e(0xf2);let _0xd081fc=_0x72c552===_0x27383e(0xda)||_0x72c552===_0x27383e(0xe8)||_0x1eac48,_0x34a533=_0xd081fc?_0x1eac48?_0x27383e(0x106):_0x72c552[_0x27383e(0xcb)]()+_0x27383e(0xe6):undefined;const _0x223c01=stripOuterParentheses(_0xdebed[0x4]??''),_0x3e614a=_0x223c01['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x223c01['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x3b73af=_0x223c01[_0x27383e(0xfb)](MYBATIS_INCLUDE_MARKER);_0x3e614a&&(_0xd081fc=!![],_0x34a533??=_0x27383e(0xeb));_0x3b73af&&(_0xd081fc=!![],_0x34a533??=_0x27383e(0xc1));const _0x3c581e=_0x223c01[_0x27383e(0xc9)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x27383e(0xc9)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x27383e(0xc9)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x3c581e,'OR')&&(_0xd081fc=!![],_0x34a533??=_0x27383e(0xd4));for(const _0x25baeb of splitTopLevelAnd(_0x3c581e)){const _0x3a4228=stripOuterParentheses(_0x25baeb);if(hasTopLevelKeyword(_0x3a4228,'OR')){_0xd081fc=!![],_0x34a533??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x2c12c6=splitEquality(_0x3a4228);if(!_0x2c12c6){containsColumnReference(_0x25baeb,_0x1e4e1c)&&(_0xd081fc=!![]);continue;}const _0x577f72=parseDirectColumnReference(_0x2c12c6[0x0],_0x1e4e1c),_0x5369d7=parseDirectColumnReference(_0x2c12c6[0x1],_0x1e4e1c),_0x3be536=containsColumnReference(_0x2c12c6[0x0],_0x1e4e1c),_0x544527=containsColumnReference(_0x2c12c6[0x1],_0x1e4e1c),_0x403439=_0x577f72&&!_0x544527?_0x577f72:_0x5369d7&&!_0x3be536?_0x5369d7:null;if(_0x403439&&!_0x8ff933[_0x27383e(0xfb)](_0x403439))_0x8ff933[_0x27383e(0xe7)](_0x403439);else!_0x403439&&containsColumnReference(_0x25baeb,_0x1e4e1c)&&(_0xd081fc=!![]);}_0x77d5f3[_0x27383e(0xe7)]({'table':_0x40250b,'alias':_0x1e4e1c,'columns':_0x8ff933,'unsupportedPredicate':_0xd081fc,'unsupportedReason':_0x34a533,'containsUnresolvedInclude':_0x3b73af,'position':_0x3044f8});}for(const _0x3d0be6 of _0x463f10[_0x27383e(0x101)](/\bJOIN\b/gi)){const _0x15d77f=_0x3d0be6[_0x27383e(0x105)]??0x0;if(_0x1b05dc[_0x27383e(0xd7)](_0x15d77f))continue;const _0x4d82cc=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x27383e(0xf3)](_0x3c50f7[_0x27383e(0xde)](_0x15d77f+_0x3d0be6[0x0][_0x27383e(0xff)])),_0x53bbe5=normalizeIdentifier(_0x4d82cc?.[0x1]||'unknown'),_0x1802ad=normalizeIdentifier(_0x4d82cc?.[0x2]||''),_0x4c940d=isSqlClauseKeyword(_0x1802ad)?_0x53bbe5[_0x27383e(0xd6)]('.')['at'](-0x1)||_0x53bbe5:_0x1802ad||_0x53bbe5[_0x27383e(0xd6)]('.')['at'](-0x1)||_0x53bbe5;_0x77d5f3[_0x27383e(0xe7)]({'table':_0x53bbe5,'alias':_0x4c940d,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x27383e(0xc0),'position':_0x15d77f});}const _0x3804ad=_0x463f10[_0x27383e(0xe2)](MYBATIS_INCLUDE_MARKER);return _0x3804ad>=0x0&&!_0x77d5f3[_0x27383e(0xf5)](_0x2322e9=>_0x2322e9[_0x27383e(0xc4)])&&_0x77d5f3[_0x27383e(0xe7)]({'table':_0x27383e(0xbf),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x27383e(0xc5),'containsUnresolvedInclude':!![],'position':_0x3804ad}),_0x77d5f3[_0x27383e(0xe9)]((_0x2ebb53,_0x1acc0b)=>_0x2ebb53[_0x27383e(0xcf)]-_0x1acc0b['position']);}function stripSqlNoise(_0x566059){const _0x4f1d6e=a232_0x4379,_0x379656=Array[_0x4f1d6e(0xe5)](_0x566059),_0xcaa617=(_0x1e249d,_0x206002)=>{for(let _0xa5a0bd=_0x1e249d;_0xa5a0bd<_0x206002;_0xa5a0bd+=0x1){_0x379656[_0xa5a0bd]!=='\x0a'&&_0x379656[_0xa5a0bd]!=='\x0d'&&(_0x379656[_0xa5a0bd]='\x20');}};for(let _0x400009=0x0;_0x400009<_0x379656['length'];_0x400009+=0x1){const _0x448779=_0x379656[_0x400009],_0x2515c2=_0x379656[_0x400009+0x1];if(_0x448779==='\x27'||_0x448779==='\x22'||_0x448779==='`'){const _0x2884cd=_0x448779,_0x3ba2a7=_0x400009;_0x400009+=0x1;while(_0x400009<_0x379656['length']){if(_0x379656[_0x400009]==='\x5c'&&_0x400009+0x1<_0x379656['length']){_0x400009+=0x2;continue;}if(_0x379656[_0x400009]!==_0x2884cd){_0x400009+=0x1;continue;}if(_0x379656[_0x400009+0x1]===_0x2884cd){_0x400009+=0x2;continue;}break;}if(_0x2884cd==='\x27')_0xcaa617(_0x3ba2a7,Math[_0x4f1d6e(0xce)](_0x400009+0x1,_0x379656[_0x4f1d6e(0xff)]));continue;}if(_0x448779==='-'&&_0x2515c2==='-'){const _0x18eb7b=_0x400009;while(_0x400009<_0x379656[_0x4f1d6e(0xff)]&&_0x379656[_0x400009]!=='\x0a')_0x400009+=0x1;_0xcaa617(_0x18eb7b,_0x400009);continue;}if(_0x448779==='/'&&_0x2515c2==='*'){const _0x1f07be=_0x400009;_0x400009+=0x2;while(_0x400009<_0x379656[_0x4f1d6e(0xff)]&&!(_0x379656[_0x400009]==='*'&&_0x379656[_0x400009+0x1]==='/')){_0x400009+=0x1;}_0x400009=Math[_0x4f1d6e(0xce)](_0x400009+0x1,_0x379656[_0x4f1d6e(0xff)]-0x1),_0xcaa617(_0x1f07be,_0x400009+0x1);continue;}if(_0x448779==='#'&&_0x2515c2!=='{'){const _0xb2b827=_0x400009;while(_0x400009<_0x379656['length']&&_0x379656[_0x400009]!=='\x0a')_0x400009+=0x1;_0xcaa617(_0xb2b827,_0x400009);continue;}if((_0x448779==='#'||_0x448779==='$')&&_0x2515c2==='{'){const _0x58bc83=_0x400009;_0x400009+=0x2;while(_0x400009<_0x379656['length']&&_0x379656[_0x400009]!=='}')_0x400009+=0x1;_0xcaa617(_0x58bc83,Math[_0x4f1d6e(0xce)](_0x400009+0x1,_0x379656[_0x4f1d6e(0xff)]));}}return _0x379656['join']('');}function maskQuotedIdentifiers(_0x3f6939){const _0x108b39=a232_0x4379,_0x3bf02d=Array[_0x108b39(0xe5)](_0x3f6939);for(let _0x149758=0x0;_0x149758<_0x3bf02d[_0x108b39(0xff)];_0x149758+=0x1){const _0xab1332=_0x3bf02d[_0x149758];if(_0xab1332!=='\x22'&&_0xab1332!=='`')continue;_0x149758+=0x1;while(_0x149758<_0x3bf02d['length']){if(_0x3bf02d[_0x149758]===_0xab1332){if(_0x3bf02d[_0x149758+0x1]===_0xab1332){_0x3bf02d[_0x149758]='\x20',_0x3bf02d[_0x149758+0x1]='\x20',_0x149758+=0x2;continue;}break;}_0x3bf02d[_0x149758]='\x20',_0x149758+=0x1;}}return _0x3bf02d[_0x108b39(0xec)]('');}function maskNestedQueries(_0x23a2d2){const _0x2c37d7=a232_0x4379,_0x382fdd=Array[_0x2c37d7(0xe5)](_0x23a2d2);for(let _0x294612=0x0;_0x294612<_0x382fdd[_0x2c37d7(0xff)];_0x294612+=0x1){if(_0x382fdd[_0x294612]!=='(')continue;const _0x116719=_0x23a2d2[_0x2c37d7(0xde)](_0x294612+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x2c37d7(0xe1)](_0x116719))continue;let _0x22f273=0x1,_0x3c47b6=_0x294612+0x1;for(;_0x3c47b6<_0x382fdd[_0x2c37d7(0xff)]&&_0x22f273>0x0;_0x3c47b6+=0x1){if(_0x382fdd[_0x3c47b6]==='(')_0x22f273+=0x1;if(_0x382fdd[_0x3c47b6]===')')_0x22f273-=0x1;}if(_0x22f273!==0x0)continue;for(let _0x16be34=_0x294612;_0x16be34<_0x3c47b6;_0x16be34+=0x1){_0x382fdd[_0x16be34]='\x20';}const _0x12251b=_0x2c37d7(0xf2);for(let _0x5bda88=0x0;_0x5bda88<_0x12251b[_0x2c37d7(0xff)]&&_0x294612+_0x5bda88<_0x3c47b6;_0x5bda88+=0x1){_0x382fdd[_0x294612+_0x5bda88]=_0x12251b[_0x5bda88];}_0x294612=_0x3c47b6-0x1;}return _0x382fdd[_0x2c37d7(0xec)]('');}function splitTopLevelAnd(_0x3f8801){const _0x52f915=a232_0x4379,_0x382152=[];let _0x2d6add=0x0,_0x2151d9=0x0;for(let _0x5a7a8c=0x0;_0x5a7a8c<_0x3f8801['length'];_0x5a7a8c+=0x1){const _0x318069=_0x3f8801[_0x5a7a8c];if(_0x318069==='(')_0x2d6add+=0x1;if(_0x318069===')')_0x2d6add=Math[_0x52f915(0xd1)](0x0,_0x2d6add-0x1);_0x2d6add===0x0&&_0x3f8801[_0x52f915(0xde)](_0x5a7a8c)[_0x52f915(0xbd)](/^AND\b/i)&&(_0x5a7a8c===0x0||/\s/[_0x52f915(0xe1)](_0x3f8801[_0x5a7a8c-0x1]??''))&&(_0x382152[_0x52f915(0xe7)](_0x3f8801['slice'](_0x2151d9,_0x5a7a8c)[_0x52f915(0x102)]()),_0x5a7a8c+=0x2,_0x2151d9=_0x5a7a8c+0x1);}const _0x44ee7c=_0x3f8801['slice'](_0x2151d9)[_0x52f915(0x102)]();if(_0x44ee7c)_0x382152[_0x52f915(0xe7)](_0x44ee7c);return _0x382152;}function hasTopLevelKeyword(_0x3afd01,_0x2a5ae4){const _0x129546=a232_0x4379;let _0x4956ad=0x0;for(let _0xa89cbd=0x0;_0xa89cbd<_0x3afd01[_0x129546(0xff)];_0xa89cbd+=0x1){const _0x137b50=_0x3afd01[_0xa89cbd];if(_0x137b50==='(')_0x4956ad+=0x1;if(_0x137b50===')')_0x4956ad=Math['max'](0x0,_0x4956ad-0x1);if(_0x4956ad!==0x0)continue;const _0x240aa9=_0x3afd01[_0x129546(0xde)](_0xa89cbd,_0xa89cbd+_0x2a5ae4[_0x129546(0xff)]),_0xa731c4=_0x3afd01[_0xa89cbd-0x1]??'\x20',_0xca0727=_0x3afd01[_0xa89cbd+_0x2a5ae4['length']]??'\x20';if(_0x240aa9[_0x129546(0xcb)]()===_0x2a5ae4[_0x129546(0xcb)]()&&!/[\w$]/[_0x129546(0xe1)](_0xa731c4)&&!/[\w$]/[_0x129546(0xe1)](_0xca0727))return!![];}return![];}function splitEquality(_0x437edf){const _0x3650f0=a232_0x4379,_0x832e6a=stripOuterParentheses(_0x437edf);let _0x3e578b=0x0,_0x41ee65;for(let _0x2006fd=0x0;_0x2006fd<_0x832e6a[_0x3650f0(0xff)];_0x2006fd+=0x1){const _0x267b35=_0x832e6a[_0x2006fd];if(_0x267b35==='(')_0x3e578b+=0x1;if(_0x267b35===')')_0x3e578b=Math[_0x3650f0(0xd1)](0x0,_0x3e578b-0x1);const _0x32e7f2=_0x832e6a[_0x2006fd-0x1]??'',_0x25f0d9=_0x832e6a[_0x2006fd+0x1]??'';if(_0x267b35==='='&&_0x3e578b===0x0&&!/[!<>=:]/[_0x3650f0(0xe1)](_0x32e7f2)&&_0x25f0d9!=='='){if(_0x41ee65!==undefined)return null;_0x41ee65=_0x2006fd;}}return _0x41ee65===undefined?null:[_0x832e6a[_0x3650f0(0xde)](0x0,_0x41ee65)['trim'](),_0x832e6a[_0x3650f0(0xde)](_0x41ee65+0x1)[_0x3650f0(0x102)]()];}function parseDirectColumnReference(_0x1fb9a3,_0x3a12b6){const _0x39a9d5=a232_0x4379,_0x2bbfb8=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x39a9d5(0xf3)](stripOuterParentheses(_0x1fb9a3));if(!_0x2bbfb8)return null;if(normalizeIdentifier(_0x2bbfb8[0x1]??'')!==normalizeIdentifier(_0x3a12b6))return null;return normalizeIdentifier(_0x2bbfb8[0x2]??'');}function a232_0x4379(_0x9a60af,_0xbc9072){_0x9a60af=_0x9a60af-0xbd;const _0x40298b=a232_0x4029();let _0x43790e=_0x40298b[_0x9a60af];return _0x43790e;}function containsColumnReference(_0x13a4d7,_0x3adaf4){const _0x349038=a232_0x4379,_0x364270=_0x13a4d7[_0x349038(0xd9)](/[`"]/g,''),_0x245781=_0x3adaf4['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x349038(0xcd)+_0x245781+_0x349038(0xcc),'i')[_0x349038(0xe1)](_0x364270);}function findEqualityPrefix(_0x1b8922,_0x496705){const _0x471bc3=a232_0x4379,_0xd70136=new Set(_0x496705[_0x471bc3(0xf4)](normalizeIdentifier)),_0x496fc4=[];for(const _0x211872 of _0x1b8922){if(!_0xd70136[_0x471bc3(0xd7)](normalizeIdentifier(_0x211872)))break;_0x496fc4[_0x471bc3(0xe7)](_0x211872);}return _0x496fc4;}function resolveTableMetadata(_0x266eff,_0x28c4c9){const _0x53d48f=a232_0x4379,_0x1c29a9=normalizeIdentifier(_0x28c4c9),_0x419e92=_0x266eff['filter'](_0x33379c=>normalizeIdentifier(_0x33379c[_0x53d48f(0xd5)])===_0x1c29a9);if(_0x419e92[_0x53d48f(0xff)]===0x1)return _0x419e92[0x0];const _0x56e362=_0x1c29a9[_0x53d48f(0xfb)]('.'),_0x3e24f6=_0x1c29a9['split']('.')['at'](-0x1),_0x1a26b7=_0x266eff[_0x53d48f(0xca)](_0x4d1581=>{const _0x2717ba=_0x53d48f,_0x2a667a=normalizeIdentifier(_0x4d1581['tableName']);if(_0x56e362&&_0x2a667a[_0x2717ba(0xfb)]('.'))return![];return _0x2a667a[_0x2717ba(0xd6)]('.')['at'](-0x1)===_0x3e24f6;});return _0x1a26b7['length']===0x1?_0x1a26b7[0x0]:undefined;}function columnNamesMatch(_0x3cf725,_0x457639){return normalizeIdentifier(_0x3cf725)===normalizeIdentifier(_0x457639);}function normalizeIdentifier(_0x1e2fc9){const _0x3c108e=a232_0x4379;return _0x1e2fc9[_0x3c108e(0xd9)](/[`"]/g,'')[_0x3c108e(0x102)]()[_0x3c108e(0xc6)]();}function isSqlClauseKeyword(_0x2022dc){const _0x5bf0cb=a232_0x4379;return new Set(['on',_0x5bf0cb(0xee),'where',_0x5bf0cb(0xec),'inner',_0x5bf0cb(0xed),'right',_0x5bf0cb(0xe8),'cross',_0x5bf0cb(0xf0)])['has'](_0x2022dc);}function stripOuterParentheses(_0x59c4a1){const _0x13556d=a232_0x4379;let _0x4aedda=_0x59c4a1[_0x13556d(0x102)]();while(_0x4aedda[_0x13556d(0xfe)]('(')&&_0x4aedda[_0x13556d(0xf9)](')')){let _0x329fc8=0x0,_0x4033c9=!![];for(let _0x2d8d83=0x0;_0x2d8d83<_0x4aedda['length'];_0x2d8d83+=0x1){if(_0x4aedda[_0x2d8d83]==='(')_0x329fc8+=0x1;if(_0x4aedda[_0x2d8d83]===')')_0x329fc8-=0x1;if(_0x329fc8===0x0&&_0x2d8d83<_0x4aedda[_0x13556d(0xff)]-0x1){_0x4033c9=![];break;}}if(!_0x4033c9||_0x329fc8!==0x0)break;_0x4aedda=_0x4aedda[_0x13556d(0xde)](0x1,-0x1)[_0x13556d(0x102)]();}return _0x4aedda;}
@@ -1 +1 @@
1
- const a232_0x24630b=a232_0x3c89;(function(_0x355c5a,_0x202a3e){const _0x2e6331=a232_0x3c89,_0x27a621=_0x355c5a();while(!![]){try{const _0x1049be=parseInt(_0x2e6331(0x161))/0x1*(parseInt(_0x2e6331(0x16c))/0x2)+-parseInt(_0x2e6331(0x16b))/0x3+-parseInt(_0x2e6331(0x167))/0x4+-parseInt(_0x2e6331(0x165))/0x5+parseInt(_0x2e6331(0x163))/0x6+-parseInt(_0x2e6331(0x162))/0x7+parseInt(_0x2e6331(0x168))/0x8;if(_0x1049be===_0x202a3e)break;else _0x27a621['push'](_0x27a621['shift']());}catch(_0x239f27){_0x27a621['push'](_0x27a621['shift']());}}}(a232_0x58be,0x5d3d2));import{resolve}from'node:path';function a232_0x58be(){const _0x417112=['.rabetbase','3020400SOnCJV','10381408rRjxMu','sql','sql.lock.json','1035900CYGgDX','7196aaGPSf','174RghOoS','3616823NUmcKl','1859238rXVMsP','/sql','1173030LviwXJ'];a232_0x58be=function(){return _0x417112;};return a232_0x58be();}function a232_0x3c89(_0xbb11d4,_0x464c5f){_0xbb11d4=_0xbb11d4-0x161;const _0x58be8c=a232_0x58be();let _0x3c896d=_0x58be8c[_0xbb11d4];return _0x3c896d;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a232_0x24630b(0x166),LOCK_FILE_NAME=a232_0x24630b(0x16a),TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x306984,_0x48eb7e){const _0x4f44bb=a232_0x24630b,_0xac4469=resolve(_0x48eb7e??findProjectRootDirectory()),_0x538d78=DOT_DIR+_0x4f44bb(0x164),_0x56a8db=_0x538d78+'/'+_0x306984;return{'projectRoot':_0xac4469,'appCode':_0x306984,'sqlWorkspaceRoot':_0x538d78,'sqlRoot':_0x56a8db,'sqlRootDir':resolve(_0xac4469,DOT_DIR,_0x4f44bb(0x169),_0x306984),'lockFilePath':resolve(_0xac4469,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0xac4469,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a233_0x47d3f0=a233_0x14d0;(function(_0x34f763,_0x1f9cb0){const _0x3492a5=a233_0x14d0,_0xcf8aab=_0x34f763();while(!![]){try{const _0x327644=parseInt(_0x3492a5(0x1be))/0x1*(parseInt(_0x3492a5(0x1b1))/0x2)+-parseInt(_0x3492a5(0x1b5))/0x3*(-parseInt(_0x3492a5(0x1bf))/0x4)+parseInt(_0x3492a5(0x1b0))/0x5*(-parseInt(_0x3492a5(0x1bd))/0x6)+-parseInt(_0x3492a5(0x1b9))/0x7+-parseInt(_0x3492a5(0x1b3))/0x8*(-parseInt(_0x3492a5(0x1bb))/0x9)+-parseInt(_0x3492a5(0x1b6))/0xa*(parseInt(_0x3492a5(0x1b7))/0xb)+-parseInt(_0x3492a5(0x1ae))/0xc*(parseInt(_0x3492a5(0x1bc))/0xd);if(_0x327644===_0x1f9cb0)break;else _0xcf8aab['push'](_0xcf8aab['shift']());}catch(_0x36378f){_0xcf8aab['push'](_0xcf8aab['shift']());}}}(a233_0x247a,0xefe11));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a233_0x14d0(_0x416a50,_0x1a586c){_0x416a50=_0x416a50-0x1ae;const _0x247a5a=a233_0x247a();let _0x14d058=_0x247a5a[_0x416a50];return _0x14d058;}const DOT_DIR=a233_0x47d3f0(0x1b8),LOCK_FILE_NAME=a233_0x47d3f0(0x1ba),TRASH_DIR_NAME=a233_0x47d3f0(0x1af);export function loadSqlProjectConfig(_0x1676e0,_0x272361){const _0xfc217c=a233_0x47d3f0,_0xcb925e=resolve(_0x272361??findProjectRootDirectory()),_0x4cf3e1=DOT_DIR+_0xfc217c(0x1b4),_0x5be888=_0x4cf3e1+'/'+_0x1676e0;return{'projectRoot':_0xcb925e,'appCode':_0x1676e0,'sqlWorkspaceRoot':_0x4cf3e1,'sqlRoot':_0x5be888,'sqlRootDir':resolve(_0xcb925e,DOT_DIR,_0xfc217c(0x1b2),_0x1676e0),'lockFilePath':resolve(_0xcb925e,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0xcb925e,DOT_DIR,TRASH_DIR_NAME)};}function a233_0x247a(){const _0x35966b=['11185112UNelrR','/sql','63FWYfji','2990HWaTaI','29007lIZvqX','.rabetbase','7825888PoKhTb','sql.lock.json','9yvlpjx','3056469hcacFg','18moVqud','124681UnOcgk','274776SUZqXK','12eTeePB','sql-trash','1397895JxRFxf','18PzIXvL','sql'];a233_0x247a=function(){return _0x35966b;};return a233_0x247a();}
@@ -1 +1 @@
1
- (function(_0x3868d3,_0x20cbbb){const _0x36c814=a233_0x7f49,_0x4ad5c2=_0x3868d3();while(!![]){try{const _0x1b4105=parseInt(_0x36c814(0x13b))/0x1+-parseInt(_0x36c814(0x134))/0x2*(-parseInt(_0x36c814(0x147))/0x3)+-parseInt(_0x36c814(0x142))/0x4*(-parseInt(_0x36c814(0x135))/0x5)+parseInt(_0x36c814(0x151))/0x6+-parseInt(_0x36c814(0x14e))/0x7+-parseInt(_0x36c814(0x149))/0x8+-parseInt(_0x36c814(0x138))/0x9*(parseInt(_0x36c814(0x143))/0xa);if(_0x1b4105===_0x20cbbb)break;else _0x4ad5c2['push'](_0x4ad5c2['shift']());}catch(_0x3e9aae){_0x4ad5c2['push'](_0x4ad5c2['shift']());}}}(a233_0x9483,0xaf31b));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x48ecc6){const _0x576749=a233_0x7f49;if(_0x48ecc6===_0x576749(0x150))return _0x576749(0x14f);if(_0x48ecc6===_0x576749(0x139))return _0x576749(0x13c);return undefined;}async function scanSqlFilesRecursively(_0xb9f57,_0x39f402){const _0x53ad40=a233_0x7f49,_0x31abbf=[];try{const _0x4667e3=await readdir(_0xb9f57,{'withFileTypes':!![]});for(const _0xe6a85d of _0x4667e3){const _0x356f00=join(_0xb9f57,_0xe6a85d[_0x53ad40(0x141)]);if(_0xe6a85d[_0x53ad40(0x13d)]()){_0x31abbf[_0x53ad40(0x13e)](...await scanSqlFilesRecursively(_0x356f00,_0x39f402));continue;}if(!_0xe6a85d[_0x53ad40(0x137)]())continue;const _0x474c11=extname(_0xe6a85d['name'])[_0x53ad40(0x148)](),_0x461f68=extensionToMode(_0x474c11);if(!_0x461f68)continue;const _0x2549b3=relative(_0x39f402,_0x356f00)[_0x53ad40(0x14d)](/\\/g,'/'),_0x21f71d=_0x2549b3['split']('/')['filter'](Boolean),_0xff76e=parseSqlPath(_0x21f71d,_0xe6a85d['name'],_0x474c11);if(!_0xff76e)continue;_0x31abbf[_0x53ad40(0x13e)]({'sqlCode':_0xff76e['sqlCode'],'sqlName':_0xff76e[_0x53ad40(0x144)],'dbDirectory':_0x21f71d[0x0],'filePath':_0x356f00,'relativePath':_0x2549b3,'lockKey':_0xff76e[_0x53ad40(0x145)],'mode':_0x461f68});}}catch(_0x2fe508){if(_0x2fe508[_0x53ad40(0x14a)]!==_0x53ad40(0x146))throw _0x2fe508;}return _0x31abbf;}export async function scanLocalSqlQueries(_0x56ea0a){const _0x4a37d8=a233_0x7f49;return scanSqlFilesRecursively(_0x56ea0a[_0x4a37d8(0x140)],_0x56ea0a[_0x4a37d8(0x140)]);}export function resolveLocalSqlFilePath(_0x2e8210,_0x4ecc75,_0x407ef6){const _0x21eb7f=a233_0x7f49,_0x515e28=_0x407ef6?.['path']||(_0x407ef6?.[_0x21eb7f(0x144)]||_0x407ef6?.[_0x21eb7f(0x136)]?buildSqlRelativePath(_0x4ecc75,_0x407ef6?.['sqlName'],_0x407ef6?.[_0x21eb7f(0x136)],_0x407ef6?.[_0x21eb7f(0x133)]||_0x21eb7f(0x14f),_0x407ef6?.[_0x21eb7f(0x13a)]):buildDefaultSqlFileName(_0x4ecc75,_0x407ef6?.[_0x21eb7f(0x133)]||_0x21eb7f(0x14f)));return join(_0x2e8210[_0x21eb7f(0x140)],_0x515e28);}export async function directoryExists(_0x4d2cfb){const _0x3e2c46=a233_0x7f49;try{const _0x156345=await stat(_0x4d2cfb);return _0x156345[_0x3e2c46(0x13d)]();}catch{return![];}}function a233_0x7f49(_0x5b9045,_0x108d92){_0x5b9045=_0x5b9045-0x133;const _0x94832e=a233_0x9483();let _0x7f498e=_0x94832e[_0x5b9045];return _0x7f498e;}function a233_0x9483(){const _0xa3689f=['sqlName','sqlCode','ENOENT','981987whgDDx','toLowerCase','1151160UZHZIi','code','length','slice','replace','5600847XpzdBv','sql','.sql','2119272brmTPV','mode','2pDDpaJ','2365KIFAok','dbName','isFile','195633HBlETO','.xml','dbId','1387420uGbrBY','mybatisXml','isDirectory','push','indexOf','sqlRootDir','name','4468PWlxFX','430wcIHuV'];a233_0x9483=function(){return _0xa3689f;};return a233_0x9483();}function parseSqlPath(_0x248c49,_0x1c9995,_0x9f8f6e){const _0x9e6b98=a233_0x7f49,_0x30eea5=_0x1c9995['slice'](0x0,-_0x9f8f6e['length']);if(_0x248c49['length']<0x2)return null;const _0x5ec3ee=_0x30eea5[_0x9e6b98(0x13f)]('_');if(_0x5ec3ee<=0x0||_0x5ec3ee>=_0x30eea5[_0x9e6b98(0x14b)]-0x1)return null;const _0x3b063d=_0x30eea5[_0x9e6b98(0x14c)](0x0,_0x5ec3ee);if(!isLikelySqlCode(_0x3b063d))return null;return{'sqlCode':_0x3b063d,'sqlName':_0x30eea5[_0x9e6b98(0x14c)](_0x5ec3ee+0x1)};}function isLikelySqlCode(_0x1be6cd){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0x1be6cd);}
1
+ (function(_0x570e5a,_0x76b8f1){const _0x57383d=a234_0x4fb0,_0x32d0a1=_0x570e5a();while(!![]){try{const _0x5618be=parseInt(_0x57383d(0x1f2))/0x1+-parseInt(_0x57383d(0x1ef))/0x2+-parseInt(_0x57383d(0x1fc))/0x3*(-parseInt(_0x57383d(0x1fe))/0x4)+-parseInt(_0x57383d(0x1f4))/0x5+parseInt(_0x57383d(0x20d))/0x6*(-parseInt(_0x57383d(0x1f9))/0x7)+-parseInt(_0x57383d(0x206))/0x8*(-parseInt(_0x57383d(0x1fa))/0x9)+parseInt(_0x57383d(0x201))/0xa*(parseInt(_0x57383d(0x1f0))/0xb);if(_0x5618be===_0x76b8f1)break;else _0x32d0a1['push'](_0x32d0a1['shift']());}catch(_0x2eea11){_0x32d0a1['push'](_0x32d0a1['shift']());}}}(a234_0x763f,0x4f25f));import{readdir,stat}from'node:fs/promises';function a234_0x4fb0(_0x11f75c,_0x4e4389){_0x11f75c=_0x11f75c-0x1ec;const _0x763f94=a234_0x763f();let _0x4fb0c4=_0x763f94[_0x11f75c];return _0x4fb0c4;}import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x52c773){const _0xdaa486=a234_0x4fb0;if(_0x52c773==='.sql')return _0xdaa486(0x20a);if(_0x52c773===_0xdaa486(0x1ff))return _0xdaa486(0x209);return undefined;}async function scanSqlFilesRecursively(_0x813f55,_0x45f580){const _0x1d42d0=a234_0x4fb0,_0xeb030c=[];try{const _0x557518=await readdir(_0x813f55,{'withFileTypes':!![]});for(const _0x5bda4a of _0x557518){const _0x3eb8f2=join(_0x813f55,_0x5bda4a[_0x1d42d0(0x1ed)]);if(_0x5bda4a[_0x1d42d0(0x20c)]()){_0xeb030c[_0x1d42d0(0x20b)](...await scanSqlFilesRecursively(_0x3eb8f2,_0x45f580));continue;}if(!_0x5bda4a[_0x1d42d0(0x1ec)]())continue;const _0x3df301=extname(_0x5bda4a[_0x1d42d0(0x1ed)])[_0x1d42d0(0x204)](),_0xa3f829=extensionToMode(_0x3df301);if(!_0xa3f829)continue;const _0x47948e=relative(_0x45f580,_0x3eb8f2)[_0x1d42d0(0x203)](/\\/g,'/'),_0xd7c3fe=_0x47948e[_0x1d42d0(0x205)]('/')[_0x1d42d0(0x1ee)](Boolean),_0x5794e7=parseSqlPath(_0xd7c3fe,_0x5bda4a[_0x1d42d0(0x1ed)],_0x3df301);if(!_0x5794e7)continue;_0xeb030c[_0x1d42d0(0x20b)]({'sqlCode':_0x5794e7[_0x1d42d0(0x1f1)],'sqlName':_0x5794e7[_0x1d42d0(0x1fd)],'dbDirectory':_0xd7c3fe[0x0],'filePath':_0x3eb8f2,'relativePath':_0x47948e,'lockKey':_0x5794e7['sqlCode'],'mode':_0xa3f829});}}catch(_0x2a7c20){if(_0x2a7c20['code']!==_0x1d42d0(0x1f5))throw _0x2a7c20;}return _0xeb030c;}function a234_0x763f(){const _0x118434=['sqlRootDir','indexOf','dbId','3908009EgSVij','90jtqjKJ','test','6qcCirT','sqlName','838456ttiHRx','.xml','path','5215030lwEfCW','slice','replace','toLowerCase','split','477488RaWZNx','dbName','mode','mybatisXml','sql','push','isDirectory','6pGLPCl','isFile','name','filter','1247210XKMMzB','22rwOVfS','sqlCode','47960QDecBx','length','3004855Efanxl','ENOENT'];a234_0x763f=function(){return _0x118434;};return a234_0x763f();}export async function scanLocalSqlQueries(_0x4d6db0){const _0x3ea70a=a234_0x4fb0;return scanSqlFilesRecursively(_0x4d6db0[_0x3ea70a(0x1f6)],_0x4d6db0[_0x3ea70a(0x1f6)]);}export function resolveLocalSqlFilePath(_0x191825,_0x3a7f50,_0x2297c7){const _0x56a9a9=a234_0x4fb0,_0x5d94e1=_0x2297c7?.[_0x56a9a9(0x200)]||(_0x2297c7?.[_0x56a9a9(0x1fd)]||_0x2297c7?.[_0x56a9a9(0x207)]?buildSqlRelativePath(_0x3a7f50,_0x2297c7?.[_0x56a9a9(0x1fd)],_0x2297c7?.[_0x56a9a9(0x207)],_0x2297c7?.[_0x56a9a9(0x208)]||'sql',_0x2297c7?.[_0x56a9a9(0x1f8)]):buildDefaultSqlFileName(_0x3a7f50,_0x2297c7?.['mode']||'sql'));return join(_0x191825[_0x56a9a9(0x1f6)],_0x5d94e1);}export async function directoryExists(_0x2ff866){const _0x3f7e9=a234_0x4fb0;try{const _0x2c5c03=await stat(_0x2ff866);return _0x2c5c03[_0x3f7e9(0x20c)]();}catch{return![];}}function parseSqlPath(_0x309d7d,_0xf4538e,_0x452452){const _0x243670=a234_0x4fb0,_0x45c26c=_0xf4538e[_0x243670(0x202)](0x0,-_0x452452[_0x243670(0x1f3)]);if(_0x309d7d[_0x243670(0x1f3)]<0x2)return null;const _0x4ce375=_0x45c26c[_0x243670(0x1f7)]('_');if(_0x4ce375<=0x0||_0x4ce375>=_0x45c26c[_0x243670(0x1f3)]-0x1)return null;const _0x154005=_0x45c26c[_0x243670(0x202)](0x0,_0x4ce375);if(!isLikelySqlCode(_0x154005))return null;return{'sqlCode':_0x154005,'sqlName':_0x45c26c[_0x243670(0x202)](_0x4ce375+0x1)};}function isLikelySqlCode(_0x3e27ba){const _0x5d1887=a234_0x4fb0;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x5d1887(0x1fb)](_0x3e27ba);}
@@ -1 +1 @@
1
- function a234_0x5bba(){const _0x74be68=['6562088HTCADS','md5','utf8','createHash','33131mSrnEj','update','8330YGqLPj','4587936pYakCa','371YtNkrX','3746586OcptUd','hex','5930060LIAQXu','5639610NXicaW','45lpdwSN','digest','1624gCZXja'];a234_0x5bba=function(){return _0x74be68;};return a234_0x5bba();}(function(_0x17057d,_0x5e4c37){const _0xe82adf=a234_0x2861,_0xe6edd0=_0x17057d();while(!![]){try{const _0x4daad2=-parseInt(_0xe82adf(0x74))/0x1*(parseInt(_0xe82adf(0x72))/0x2)+-parseInt(_0xe82adf(0x73))/0x3+-parseInt(_0xe82adf(0x6c))/0x4+parseInt(_0xe82adf(0x77))/0x5+parseInt(_0xe82adf(0x75))/0x6+parseInt(_0xe82adf(0x70))/0x7*(parseInt(_0xe82adf(0x6b))/0x8)+parseInt(_0xe82adf(0x79))/0x9*(parseInt(_0xe82adf(0x78))/0xa);if(_0x4daad2===_0x5e4c37)break;else _0xe6edd0['push'](_0xe6edd0['shift']());}catch(_0x212869){_0xe6edd0['push'](_0xe6edd0['shift']());}}}(a234_0x5bba,0xd5dde));import{readFile}from'node:fs/promises';import a234_0x59b994 from'node:crypto';function a234_0x2861(_0x24d1f4,_0x39c96a){_0x24d1f4=_0x24d1f4-0x6a;const _0x5bba2c=a234_0x5bba();let _0x286181=_0x5bba2c[_0x24d1f4];return _0x286181;}export function computeSqlContentHash(_0xc1840b){const _0x5055db=a234_0x2861;return a234_0x59b994[_0x5055db(0x6f)](_0x5055db(0x6d))[_0x5055db(0x71)](_0xc1840b)[_0x5055db(0x6a)](_0x5055db(0x76));}export async function computeSqlFileHash(_0x593450){const _0x1d1c3e=a234_0x2861,_0x48b6fb=await readFile(_0x593450,_0x1d1c3e(0x6e));return computeSqlContentHash(_0x48b6fb);}
1
+ (function(_0x587a8d,_0x1c1736){const _0x5caeed=a235_0x97e7,_0xd99ab7=_0x587a8d();while(!![]){try{const _0x2933ec=-parseInt(_0x5caeed(0xdd))/0x1+parseInt(_0x5caeed(0xe3))/0x2+parseInt(_0x5caeed(0xd8))/0x3*(parseInt(_0x5caeed(0xda))/0x4)+parseInt(_0x5caeed(0xe2))/0x5+-parseInt(_0x5caeed(0xd6))/0x6*(-parseInt(_0x5caeed(0xd9))/0x7)+-parseInt(_0x5caeed(0xdb))/0x8*(parseInt(_0x5caeed(0xdc))/0x9)+-parseInt(_0x5caeed(0xde))/0xa;if(_0x2933ec===_0x1c1736)break;else _0xd99ab7['push'](_0xd99ab7['shift']());}catch(_0x354580){_0xd99ab7['push'](_0xd99ab7['shift']());}}}(a235_0x5396,0x241bf));import{readFile}from'node:fs/promises';function a235_0x5396(){const _0x17ba24=['79862ULYdNI','3720850IgzfIA','md5','update','hex','1212670dpkqOb','479276JBurlQ','digest','createHash','6738jAZFLq','utf8','33yZhrab','98npBEvQ','84252IqowpA','1037896hhRZum','9vOIdHF'];a235_0x5396=function(){return _0x17ba24;};return a235_0x5396();}function a235_0x97e7(_0x19c314,_0x3b7a00){_0x19c314=_0x19c314-0xd6;const _0x539637=a235_0x5396();let _0x97e761=_0x539637[_0x19c314];return _0x97e761;}import a235_0x4890a4 from'node:crypto';export function computeSqlContentHash(_0x169e14){const _0x34a99b=a235_0x97e7;return a235_0x4890a4[_0x34a99b(0xe5)](_0x34a99b(0xdf))[_0x34a99b(0xe0)](_0x169e14)[_0x34a99b(0xe4)](_0x34a99b(0xe1));}export async function computeSqlFileHash(_0x1ed7ba){const _0x1eb71a=a235_0x97e7,_0x1c8339=await readFile(_0x1ed7ba,_0x1eb71a(0xd7));return computeSqlContentHash(_0x1c8339);}
@@ -1 +1 @@
1
- (function(_0x50f541,_0xdb177){const _0x2fe521=a235_0x3dce,_0x2b41ab=_0x50f541();while(!![]){try{const _0x1473e0=-parseInt(_0x2fe521(0xb8))/0x1+-parseInt(_0x2fe521(0xb5))/0x2*(parseInt(_0x2fe521(0xba))/0x3)+parseInt(_0x2fe521(0xb7))/0x4+-parseInt(_0x2fe521(0xab))/0x5+-parseInt(_0x2fe521(0xb0))/0x6+-parseInt(_0x2fe521(0xb3))/0x7+parseInt(_0x2fe521(0xbc))/0x8*(parseInt(_0x2fe521(0xbd))/0x9);if(_0x1473e0===_0xdb177)break;else _0x2b41ab['push'](_0x2b41ab['shift']());}catch(_0x5a7216){_0x2b41ab['push'](_0x2b41ab['shift']());}}}(a235_0x33dd,0x51735));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a235_0x3dce(_0x392398,_0x2d1fc1){_0x392398=_0x392398-0xa9;const _0x33ddd3=a235_0x33dd();let _0x3dce8b=_0x33ddd3[_0x392398];return _0x3dce8b;}export function ensureSqlLockScope(_0x235c78,_0x5ea53e,_0x58dc95,_0x1c7a27){const _0x475ab5=a235_0x3dce,_0x59ee5c=_0x235c78??createEmptySqlLock();let _0x586844=_0x59ee5c[_0x475ab5(0xb6)][_0x5ea53e];if(!_0x586844)return _0x586844={'sqlRoot':_0x58dc95,'lastSync':'','sqls':{}},_0x59ee5c[_0x475ab5(0xb6)][_0x5ea53e]=_0x586844,{'lockData':_0x59ee5c,'appLock':_0x586844};if(!_0x586844[_0x475ab5(0xb2)])_0x586844['sqlRoot']=_0x58dc95;else{if(_0x586844[_0x475ab5(0xb2)]!==_0x58dc95)throw new Error(_0x1c7a27+_0x475ab5(0xad)+_0x58dc95+_0x475ab5(0xa9)+_0x586844[_0x475ab5(0xb2)]+_0x475ab5(0xac)+_0x475ab5(0xbb));}return!_0x586844[_0x475ab5(0xaa)]&&(_0x586844[_0x475ab5(0xaa)]={}),!_0x586844[_0x475ab5(0xae)]&&(_0x586844[_0x475ab5(0xae)]=''),{'lockData':_0x59ee5c,'appLock':_0x586844};}function a235_0x33dd(){const _0x361063=['2940295GbRpSh','\x22.\x20',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','lastSync','stringify','3238476RlvvIG','code','sqlRoot','1564094RXzpdA','utf8','2RdpIRs','apps','1158748xXqBqR','444070gmDpOX','ENOENT','1191129LQzDCS','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','16nRusFY','10063323BLuhQb','\x22\x20vs\x20lock\x20\x22','sqls'];a235_0x33dd=function(){return _0x361063;};return a235_0x33dd();}export async function readSqlLockFile(_0x555e56){const _0x5881ff=a235_0x3dce;try{const _0xcfa349=await readFile(_0x555e56,'utf8');return JSON['parse'](_0xcfa349);}catch(_0x3455e9){if(_0x3455e9[_0x5881ff(0xb1)]===_0x5881ff(0xb9))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x3455e9));}}export async function writeSqlLockFile(_0x266c59,_0x40e01f){const _0x34480e=a235_0x3dce;await mkdir(dirname(_0x266c59),{'recursive':!![]}),await writeFile(_0x266c59,JSON[_0x34480e(0xaf)](_0x40e01f,null,0x2),_0x34480e(0xb4));}
1
+ function a236_0x46e6(){const _0x1abbfc=['2944858ybAzyH','parse','code','apps','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','\x22.\x20','\x22\x20vs\x20lock\x20\x22','1nltQTE','612573BZZwyn','811570yPpUzR','1604038MEvJhI','3297648pDIkId','4360338AtWwDI','605Jddmpp','sqls','15348ONlkmf','lastSync','stringify','utf8','sqlRoot','8SRZtzm','253kgVfgC'];a236_0x46e6=function(){return _0x1abbfc;};return a236_0x46e6();}function a236_0x1501(_0x1e4533,_0x54241e){_0x1e4533=_0x1e4533-0xef;const _0x46e6e9=a236_0x46e6();let _0x150135=_0x46e6e9[_0x1e4533];return _0x150135;}(function(_0x3a913d,_0x2da125){const _0x352f8e=a236_0x1501,_0x3884ca=_0x3a913d();while(!![]){try{const _0x20b71c=-parseInt(_0x352f8e(0x103))/0x1*(parseInt(_0x352f8e(0xef))/0x2)+-parseInt(_0x352f8e(0x104))/0x3+parseInt(_0x352f8e(0xf0))/0x4+-parseInt(_0x352f8e(0xf2))/0x5*(parseInt(_0x352f8e(0xf4))/0x6)+-parseInt(_0x352f8e(0xfb))/0x7+-parseInt(_0x352f8e(0xf9))/0x8*(parseInt(_0x352f8e(0xf1))/0x9)+parseInt(_0x352f8e(0x105))/0xa*(parseInt(_0x352f8e(0xfa))/0xb);if(_0x20b71c===_0x2da125)break;else _0x3884ca['push'](_0x3884ca['shift']());}catch(_0x1436a3){_0x3884ca['push'](_0x3884ca['shift']());}}}(a236_0x46e6,0x72c67));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0xc8a411,_0x3289cf,_0x233fe2,_0x174a17){const _0x5251c6=a236_0x1501,_0x167911=_0xc8a411??createEmptySqlLock();let _0x24e2f6=_0x167911[_0x5251c6(0xfe)][_0x3289cf];if(!_0x24e2f6)return _0x24e2f6={'sqlRoot':_0x233fe2,'lastSync':'','sqls':{}},_0x167911[_0x5251c6(0xfe)][_0x3289cf]=_0x24e2f6,{'lockData':_0x167911,'appLock':_0x24e2f6};if(!_0x24e2f6[_0x5251c6(0xf8)])_0x24e2f6['sqlRoot']=_0x233fe2;else{if(_0x24e2f6[_0x5251c6(0xf8)]!==_0x233fe2)throw new Error(_0x174a17+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x233fe2+_0x5251c6(0x102)+_0x24e2f6[_0x5251c6(0xf8)]+_0x5251c6(0x101)+_0x5251c6(0xff));}return!_0x24e2f6[_0x5251c6(0xf3)]&&(_0x24e2f6[_0x5251c6(0xf3)]={}),!_0x24e2f6['lastSync']&&(_0x24e2f6[_0x5251c6(0xf5)]=''),{'lockData':_0x167911,'appLock':_0x24e2f6};}export async function readSqlLockFile(_0x34a179){const _0x3fe1b8=a236_0x1501;try{const _0x584d58=await readFile(_0x34a179,_0x3fe1b8(0xf7));return JSON[_0x3fe1b8(0xfc)](_0x584d58);}catch(_0x123882){if(_0x123882[_0x3fe1b8(0xfd)]==='ENOENT')return null;throw new Error(_0x3fe1b8(0x100)+String(_0x123882));}}export async function writeSqlLockFile(_0xfde406,_0x2461bc){const _0xb432ec=a236_0x1501;await mkdir(dirname(_0xfde406),{'recursive':!![]}),await writeFile(_0xfde406,JSON[_0xb432ec(0xf6)](_0x2461bc,null,0x2),'utf8');}
@@ -1 +1 @@
1
- (function(_0x2339f6,_0x12e5e7){const _0x44f23e=a237_0x1fd0,_0x543ae6=_0x2339f6();while(!![]){try{const _0x3d45cd=-parseInt(_0x44f23e(0xe1))/0x1*(parseInt(_0x44f23e(0xdc))/0x2)+parseInt(_0x44f23e(0xd2))/0x3+-parseInt(_0x44f23e(0xdf))/0x4*(-parseInt(_0x44f23e(0xd6))/0x5)+-parseInt(_0x44f23e(0xd4))/0x6+parseInt(_0x44f23e(0xdb))/0x7*(parseInt(_0x44f23e(0xd3))/0x8)+-parseInt(_0x44f23e(0xe2))/0x9*(parseInt(_0x44f23e(0xe3))/0xa)+-parseInt(_0x44f23e(0xcf))/0xb*(-parseInt(_0x44f23e(0xe0))/0xc);if(_0x3d45cd===_0x12e5e7)break;else _0x543ae6['push'](_0x543ae6['shift']());}catch(_0x4cb1f4){_0x543ae6['push'](_0x543ae6['shift']());}}}(a237_0x2347,0x82f75));function a237_0x1fd0(_0x540b72,_0x1f7c23){_0x540b72=_0x540b72-0xcf;const _0x234735=a237_0x2347();let _0x1fd0a1=_0x234735[_0x540b72];return _0x1fd0a1;}export function detectSqlMode(_0xeaec08){const _0x1ff8ba=a237_0x1fd0,_0x20b7a6=_0xeaec08[_0x1ff8ba(0xda)]();if(/^<(select|insert|update|delete)\b/i[_0x1ff8ba(0xdd)](_0x20b7a6))return _0x1ff8ba(0xd8);return'sql';}export function getSqlFileExtension(_0x26dda5){const _0x5a6462=a237_0x1fd0;return _0x26dda5==='mybatisXml'?_0x5a6462(0xd7):_0x5a6462(0xd1);}function a237_0x2347(){const _0x57637b=['28BUOLxz','8qEaSAF','test','replace','632uRsZYH','125424EwMHWG','212552pcJqZi','6084yFoBrA','9970fEhFZI','209jfvHJu','trim','.sql','2970945GmekMa','744688RrkQJd','785352bgZPEs','db-','19945xkDXed','.xml','mybatisXml','unknown-db','trimStart'];a237_0x2347=function(){return _0x57637b;};return a237_0x2347();}export function buildDefaultSqlFileName(_0x1a74d0,_0x8cd519){return''+_0x1a74d0+getSqlFileExtension(_0x8cd519);}export function sanitizeSqlPathSegment(_0x15d6a6,_0x1ed0fd){const _0xbbb396=a237_0x1fd0,_0x4bbe35=String(_0x15d6a6??'')[_0xbbb396(0xd0)](),_0x299b9e=_0x4bbe35['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0xbbb396(0xde)](/\s+/g,'-')[_0xbbb396(0xde)](/-+/g,'-')[_0xbbb396(0xde)](/^\.+/,'')['replace'](/\.+$/,'')[_0xbbb396(0xde)](/^-+/,'')['replace'](/-+$/,'');return _0x299b9e||_0x1ed0fd;}export function buildDbDirectoryName(_0x19449c,_0xc1055){const _0x3277b5=a237_0x1fd0;return sanitizeSqlPathSegment(_0x19449c,_0xc1055!=null?_0x3277b5(0xd5)+_0xc1055:_0x3277b5(0xd9));}export function buildSqlRelativePath(_0xf8361b,_0xdfd52b,_0x45b80d,_0x655050,_0xa91a79){const _0x1ad49d=buildDbDirectoryName(_0x45b80d,_0xa91a79),_0x5ebda2=sanitizeSqlPathSegment(_0xf8361b,'unknown-sql'),_0x1eab30=sanitizeSqlPathSegment(_0xdfd52b,_0x5ebda2);return _0x1ad49d+'/'+_0x5ebda2+'_'+_0x1eab30+getSqlFileExtension(_0x655050);}
1
+ (function(_0x522d15,_0x4c11ef){const _0x2e1bd3=a238_0x1063,_0x1b3f58=_0x522d15();while(!![]){try{const _0x465890=parseInt(_0x2e1bd3(0xe5))/0x1+-parseInt(_0x2e1bd3(0xde))/0x2+parseInt(_0x2e1bd3(0xdd))/0x3*(-parseInt(_0x2e1bd3(0xe6))/0x4)+parseInt(_0x2e1bd3(0xdc))/0x5*(parseInt(_0x2e1bd3(0xe7))/0x6)+parseInt(_0x2e1bd3(0xdf))/0x7+parseInt(_0x2e1bd3(0xe2))/0x8+parseInt(_0x2e1bd3(0xe1))/0x9*(parseInt(_0x2e1bd3(0xe4))/0xa);if(_0x465890===_0x4c11ef)break;else _0x1b3f58['push'](_0x1b3f58['shift']());}catch(_0x2386e0){_0x1b3f58['push'](_0x1b3f58['shift']());}}}(a238_0x4751,0xcd049));export function detectSqlMode(_0x1e6c88){const _0x2632ae=a238_0x1063,_0x34dbb5=_0x1e6c88[_0x2632ae(0xe9)]();if(/^<(select|insert|update|delete)\b/i[_0x2632ae(0xe0)](_0x34dbb5))return _0x2632ae(0xe8);return'sql';}export function getSqlFileExtension(_0x40fae7){const _0x56bbe5=a238_0x1063;return _0x40fae7===_0x56bbe5(0xe8)?'.xml':_0x56bbe5(0xe3);}export function buildDefaultSqlFileName(_0x4bf016,_0x5605ab){return''+_0x4bf016+getSqlFileExtension(_0x5605ab);}export function sanitizeSqlPathSegment(_0x2315c7,_0x54c798){const _0x3621e3=a238_0x1063,_0x2dbd37=String(_0x2315c7??'')[_0x3621e3(0xeb)](),_0x13c8b7=_0x2dbd37['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x3621e3(0xec)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x3621e3(0xec)](/^\.+/,'')[_0x3621e3(0xec)](/\.+$/,'')[_0x3621e3(0xec)](/^-+/,'')[_0x3621e3(0xec)](/-+$/,'');return _0x13c8b7||_0x54c798;}export function buildDbDirectoryName(_0x16ce86,_0x54e00b){const _0x3da5d9=a238_0x1063;return sanitizeSqlPathSegment(_0x16ce86,_0x54e00b!=null?'db-'+_0x54e00b:_0x3da5d9(0xed));}function a238_0x4751(){const _0x11a165=['unknown-db','466285ySJLgB','21MyitXC','3343028JXNhIW','3367609IoNtMv','test','2858589mUUMyG','4502064ICmtqb','.sql','10TsrtTe','161943tHVsKS','128276BupQek','78OjtgrV','mybatisXml','trimStart','unknown-sql','trim','replace'];a238_0x4751=function(){return _0x11a165;};return a238_0x4751();}function a238_0x1063(_0x5b1ed9,_0xb276a9){_0x5b1ed9=_0x5b1ed9-0xdc;const _0x4751fc=a238_0x4751();let _0x10635a=_0x4751fc[_0x5b1ed9];return _0x10635a;}export function buildSqlRelativePath(_0x16326a,_0x53dfc7,_0x739772,_0x1c1210,_0x157f02){const _0x2148bc=a238_0x1063,_0xf4a7e6=buildDbDirectoryName(_0x739772,_0x157f02),_0x43d672=sanitizeSqlPathSegment(_0x16326a,_0x2148bc(0xea)),_0xafc448=sanitizeSqlPathSegment(_0x53dfc7,_0x43d672);return _0xf4a7e6+'/'+_0x43d672+'_'+_0xafc448+getSqlFileExtension(_0x1c1210);}
@@ -1 +1 @@
1
- const a238_0x46258c=a238_0x42e4;(function(_0x25faa3,_0x30b0da){const _0x453653=a238_0x42e4,_0x1d313e=_0x25faa3();while(!![]){try{const _0x42f058=-parseInt(_0x453653(0x1d4))/0x1*(parseInt(_0x453653(0x1cd))/0x2)+parseInt(_0x453653(0x1d3))/0x3+parseInt(_0x453653(0x1e5))/0x4*(-parseInt(_0x453653(0x1f3))/0x5)+parseInt(_0x453653(0x1d7))/0x6*(parseInt(_0x453653(0x1af))/0x7)+parseInt(_0x453653(0x19b))/0x8+-parseInt(_0x453653(0x1e2))/0x9*(parseInt(_0x453653(0x1a9))/0xa)+-parseInt(_0x453653(0x1ea))/0xb*(parseInt(_0x453653(0x1d1))/0xc);if(_0x42f058===_0x30b0da)break;else _0x1d313e['push'](_0x1d313e['shift']());}catch(_0x2e1a20){_0x1d313e['push'](_0x1d313e['shift']());}}}(a238_0x2fc2,0x840f6));const MYBATIS_OUTER_TAGS=new Map([[a238_0x46258c(0x1b1),a238_0x46258c(0x1a0)],[a238_0x46258c(0x1f9),a238_0x46258c(0x1b0)],[a238_0x46258c(0x1b6),a238_0x46258c(0x1f1)],[a238_0x46258c(0x1b4),a238_0x46258c(0x1fc)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a238_0x46258c(0x1ad),a238_0x46258c(0x1bc),'choose',a238_0x46258c(0x1b2),a238_0x46258c(0x1e0),'trim',a238_0x46258c(0x1e6),'bind',a238_0x46258c(0x19c),a238_0x46258c(0x1dc)]),MYBATIS_BRANCH_TAGS=new Set(['if',a238_0x46258c(0x1bc),a238_0x46258c(0x1c4),a238_0x46258c(0x1b2),a238_0x46258c(0x1e0)]);export const MYBATIS_DYNAMIC_START_MARKER='__RABETBASE_MYBATIS_DYNAMIC_START__';export const MYBATIS_DYNAMIC_END_MARKER=a238_0x46258c(0x1f0);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a238_0x46258c(0x1f7)+[...MYBATIS_OUTER_TAGS[a238_0x46258c(0x1ba)]()][a238_0x46258c(0x1be)]('|')+a238_0x46258c(0x1f5),'i');export function normalizeSqlForStaticAnalysis(_0x142994){const _0xf44a14=a238_0x46258c,_0x418a9f=typeof _0x142994==='string'?_0x142994:'';if(!startsWithMybatisStatementWrapper(_0x418a9f))return{'sql':_0x418a9f,'mode':_0xf44a14(0x1ac)};let _0x2c5d79=0x0,_0x16a1e4='',_0x5b2435,_0x271979=![],_0x19573a=![];const _0x2c8607=[];while(_0x2c5d79<_0x418a9f['length']){if(_0x418a9f[_0xf44a14(0x19e)](_0xf44a14(0x1ef),_0x2c5d79)){const _0x18e93a=_0x418a9f[_0xf44a14(0x1d6)](_0xf44a14(0x1bf),_0x2c5d79+0x4);if(_0x18e93a<0x0)return invalidMybatisSource(_0xf44a14(0x1e8));_0x16a1e4+='\x20',_0x2c5d79=_0x18e93a+0x3;continue;}if(_0x418a9f[_0xf44a14(0x19e)]('<![CDATA[',_0x2c5d79)){if(!_0x271979||_0x19573a)return invalidMybatisSource(_0xf44a14(0x1c3));const _0x51f805=_0x418a9f['indexOf'](']]>',_0x2c5d79+0x9);if(_0x51f805<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x16a1e4+=_0x418a9f['slice'](_0x2c5d79+0x9,_0x51f805),_0x2c5d79=_0x51f805+0x3;continue;}if(_0x418a9f[_0xf44a14(0x19e)]('<?',_0x2c5d79)){if(_0x271979)return invalidMybatisSource(_0xf44a14(0x1a3));const _0x48fe77=_0x418a9f[_0xf44a14(0x1d6)]('?>',_0x2c5d79+0x2);if(_0x48fe77<0x0)return invalidMybatisSource(_0xf44a14(0x1ca));_0x16a1e4+='\x20',_0x2c5d79=_0x48fe77+0x2;continue;}if(_0x418a9f[_0x2c5d79]!=='<'){const _0x1f4d54=_0x418a9f['indexOf']('<',_0x2c5d79),_0x2dd604=_0x1f4d54<0x0?_0x418a9f[_0xf44a14(0x1c0)]:_0x1f4d54,_0x174501=_0x418a9f[_0xf44a14(0x1d9)](_0x2c5d79,_0x2dd604);if((!_0x271979||_0x19573a)&&_0x174501[_0xf44a14(0x1c5)]())return invalidMybatisSource(_0xf44a14(0x1ee));if(_0x271979&&!_0x19573a){const _0x18f7d7=decodeXmlEntities(_0x174501);if(_0x18f7d7===null)return invalidMybatisSource(_0xf44a14(0x1fb));_0x16a1e4+=_0x18f7d7;}else _0x16a1e4+='\x20';_0x2c5d79=_0x2dd604;continue;}const _0x35afce=findXmlTagEnd(_0x418a9f,_0x2c5d79);if(_0x35afce<0x0)return invalidMybatisSource(_0xf44a14(0x19d));const _0x424a14=_0x418a9f[_0xf44a14(0x1d9)](_0x2c5d79,_0x35afce+0x1),_0x4248a6=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0xf44a14(0x1b9)](_0x424a14);if(!_0x4248a6)return invalidMybatisSource(_0xf44a14(0x1ec));const _0x1da2bf=_0x4248a6[0x1]==='/',_0x3ffc64=_0x4248a6[0x2]??'',_0xaacbcb=_0x3ffc64[_0xf44a14(0x1ab)](),_0x189b4a=_0x4248a6[0x3]??'',_0x22bb6d=_0x4248a6[0x4]==='/',_0x2bdd59=MYBATIS_OUTER_TAGS[_0xf44a14(0x1cc)](_0xaacbcb);if(!_0x2bdd59&&!MYBATIS_DYNAMIC_TAGS[_0xf44a14(0x1cf)](_0xaacbcb))return invalidMybatisSource('Unsupported\x20MyBatis\x20XML\x20tag:\x20<'+_0xaacbcb+'>.');if(!_0x2bdd59&&_0x3ffc64!==_0xaacbcb)return invalidMybatisSource(_0xf44a14(0x1e3)+_0x3ffc64+'>.');if(_0x1da2bf){if(_0x189b4a[_0xf44a14(0x1c5)]()||_0x22bb6d)return invalidMybatisSource(_0xf44a14(0x1aa)+_0x3ffc64+'>.');const _0x30acc1=_0x2c8607['at'](-0x1);if(!_0x30acc1||(_0x30acc1[_0xf44a14(0x1c6)]?_0x30acc1['tagName']!==_0xaacbcb:_0x30acc1[_0xf44a14(0x1da)]!==_0x3ffc64))return invalidMybatisSource(_0xf44a14(0x1e7)+_0x3ffc64+'>.');_0x2c8607[_0xf44a14(0x1a4)]();if(_0x30acc1[_0xf44a14(0x1c6)])_0x19573a=!![];_0x16a1e4+=MYBATIS_BRANCH_TAGS[_0xf44a14(0x1cf)](_0xaacbcb)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x189b4a))return invalidMybatisSource(_0xf44a14(0x1ce)+_0x3ffc64+'>.');if(_0xaacbcb===_0xf44a14(0x1dc)&&(!_0x22bb6d||_0x2c8607['at'](-0x1)?.[_0xf44a14(0x1b8)]!==_0xf44a14(0x19c)))return invalidMybatisSource(_0xf44a14(0x1f6));if(_0x2bdd59){if(_0x271979||_0x2c8607[_0xf44a14(0x1c0)]>0x0)return invalidMybatisSource(_0xf44a14(0x1dd));_0x271979=!![],_0x19573a=_0x22bb6d,_0x5b2435=_0x2bdd59;}else{if(!_0x271979||_0x19573a)return invalidMybatisSource(_0xf44a14(0x1b3)+_0x3ffc64+'>.');}_0x16a1e4+=_0xaacbcb===_0xf44a14(0x1ad)?'\x20WHERE\x20':_0xaacbcb===_0xf44a14(0x1e6)?_0xf44a14(0x1c7):_0xaacbcb===_0xf44a14(0x19c)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0xaacbcb)&&!_0x22bb6d?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x22bb6d&&_0x2c8607['push']({'rawName':_0x3ffc64,'tagName':_0xaacbcb,'outer':!!_0x2bdd59});}_0x2c5d79=_0x35afce+0x1;}if(_0x2c8607[_0xf44a14(0x1c0)]>0x0)return invalidMybatisSource(_0xf44a14(0x1d0)+_0x2c8607['at'](-0x1)?.['rawName']+'>.');if(!_0x271979||!_0x19573a)return invalidMybatisSource(_0xf44a14(0x1ed));return{'sql':_0x16a1e4[_0xf44a14(0x1c5)](),'mode':_0xf44a14(0x1c1),..._0x5b2435?{'statementType':_0x5b2435}:{}};}function hasWellFormedXmlAttributes(_0x3ff8dc){const _0x515b52=a238_0x46258c;let _0x49c2e7=0x0;const _0x43ad9f=new Set();while(_0x49c2e7<_0x3ff8dc[_0x515b52(0x1c0)]){while(_0x49c2e7<_0x3ff8dc['length']&&/\s/[_0x515b52(0x1a5)](_0x3ff8dc[_0x49c2e7]??''))_0x49c2e7+=0x1;if(_0x49c2e7>=_0x3ff8dc['length'])return!![];const _0x5d3d63=/^[A-Za-z_:][\w:.-]*/[_0x515b52(0x1b9)](_0x3ff8dc[_0x515b52(0x1d9)](_0x49c2e7)),_0x3fc0e0=_0x5d3d63?.[0x0];if(!_0x3fc0e0||_0x43ad9f[_0x515b52(0x1cf)](_0x3fc0e0))return![];_0x43ad9f['add'](_0x3fc0e0),_0x49c2e7+=_0x3fc0e0[_0x515b52(0x1c0)];while(_0x49c2e7<_0x3ff8dc[_0x515b52(0x1c0)]&&/\s/[_0x515b52(0x1a5)](_0x3ff8dc[_0x49c2e7]??''))_0x49c2e7+=0x1;if(_0x3ff8dc[_0x49c2e7]!=='=')return![];_0x49c2e7+=0x1;while(_0x49c2e7<_0x3ff8dc['length']&&/\s/[_0x515b52(0x1a5)](_0x3ff8dc[_0x49c2e7]??''))_0x49c2e7+=0x1;const _0x18a6d1=_0x3ff8dc[_0x49c2e7];if(_0x18a6d1!=='\x22'&&_0x18a6d1!=='\x27')return![];_0x49c2e7+=0x1;const _0x2184cc=_0x3ff8dc[_0x515b52(0x1d6)](_0x18a6d1,_0x49c2e7);if(_0x2184cc<0x0)return![];if(decodeXmlEntities(_0x3ff8dc[_0x515b52(0x1d9)](_0x49c2e7,_0x2184cc))===null)return![];_0x49c2e7=_0x2184cc+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x5ca0be){const _0x5f1ce1=a238_0x46258c;let _0x4bee6f=0x0;const _0x48c723=()=>{const _0x32ef32=a238_0x42e4;while(_0x4bee6f<_0x5ca0be[_0x32ef32(0x1c0)]&&/\s/['test'](_0x5ca0be[_0x4bee6f]??''))_0x4bee6f+=0x1;};_0x48c723();while(_0x4bee6f<_0x5ca0be[_0x5f1ce1(0x1c0)]){if(_0x5ca0be[_0x5f1ce1(0x19e)](_0x5f1ce1(0x1ef),_0x4bee6f)){const _0xa2f631=_0x5ca0be[_0x5f1ce1(0x1d6)]('-->',_0x4bee6f+0x4);if(_0xa2f631<0x0)return!![];_0x4bee6f=_0xa2f631+0x3,_0x48c723();continue;}if(_0x5ca0be['startsWith']('<?',_0x4bee6f)){const _0x32dab0=_0x5ca0be['indexOf']('?>',_0x4bee6f+0x2);if(_0x32dab0<0x0)return!![];_0x4bee6f=_0x32dab0+0x2,_0x48c723();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x5f1ce1(0x1a5)](_0x5ca0be[_0x5f1ce1(0x1d9)](_0x4bee6f));}function invalidMybatisSource(_0x31b538){const _0x3aca9b=a238_0x46258c;return{'sql':'','mode':_0x3aca9b(0x1c1),'error':_0x31b538};}function findXmlTagEnd(_0x4b0b49,_0x9525fe){let _0x343315;for(let _0x1dee49=_0x9525fe+0x1;_0x1dee49<_0x4b0b49['length'];_0x1dee49+=0x1){const _0x43638f=_0x4b0b49[_0x1dee49];if(_0x343315){if(_0x43638f===_0x343315)_0x343315=undefined;continue;}if(_0x43638f==='\x22'||_0x43638f==='\x27'){_0x343315=_0x43638f;continue;}if(_0x43638f==='>')return _0x1dee49;}return-0x1;}function decodeXmlEntities(_0x52fe3b){let _0x598d33=![];const _0x556cca=_0x52fe3b['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x37fe85=>{const _0x79a0db=a238_0x42e4;if(_0x37fe85==='&lt;')return'<';if(_0x37fe85==='&gt;')return'>';if(_0x37fe85===_0x79a0db(0x1cb))return'\x22';if(_0x37fe85===_0x79a0db(0x1f4))return'\x27';if(_0x37fe85===_0x79a0db(0x1f8))return'&';const _0x5de7fc=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x37fe85);if(_0x5de7fc){const _0x25211e=_0x5de7fc[0x1],_0xbd7d15=_0x5de7fc[0x2],_0x3a1561=Number[_0x79a0db(0x1bb)](_0x25211e??_0xbd7d15??'',_0x25211e?0x10:0xa);if(isValidXmlCharacter(_0x3a1561))return String[_0x79a0db(0x1ae)](_0x3a1561);}return _0x598d33=!![],'';});return _0x598d33?null:_0x556cca;}function isValidXmlCharacter(_0x35d460){return _0x35d460===0x9||_0x35d460===0xa||_0x35d460===0xd||_0x35d460>=0x20&&_0x35d460<=0xd7ff||_0x35d460>=0xe000&&_0x35d460<=0xfffd||_0x35d460>=0x10000&&_0x35d460<=0x10ffff;}export function detectSqlType(_0x3d7b88){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x3d7b88));}function a238_0x2fc2(){const _0xef42c7=['where','fromCodePoint','7pQsxfd','INSERT','select','when','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','delete','unknown\x20table(s)','update','DDL','tagName','exec','keys','parseInt','foreach','error','join','-->','length','mybatisXml','isDangerous','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','choose','trim','outer','\x20SET\x20','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','replace','Unterminated\x20XML\x20declaration.','&quot;','get','2TpBdST','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','has','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','7872JmAseN','match','2420415KTkqPj','443419yMwfNZ','type','indexOf','4928748ubdqGE','split','slice','rawName','replaceAll','property','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','SQL\x20content\x20is\x20empty','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','otherwise','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','268425MyKtkC','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','4QdeNGf','set','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','Unterminated\x20XML\x20comment.','\x20query\x20targeting\x20','8899mOHqjB','Unable\x20to\x20detect\x20SQL\x20type.\x20','Invalid\x20MyBatis\x20XML\x20tag.','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','<!--','__RABETBASE_MYBATIS_DYNAMIC_END__','UPDATE','WITH','4947475egNFgR','&apos;',')\x5cb','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','^<\x5cs*(?:','&amp;','insert','reason','Invalid\x20XML\x20entity\x20reference.','DELETE','7725984SdwUQc','include','Unterminated\x20MyBatis\x20XML\x20tag.','startsWith','push','SELECT','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','matchAll','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','pop','test','UNKNOWN','toUpperCase','add','30NRoROe','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','toLowerCase','sql'];a238_0x2fc2=function(){return _0xef42c7;};return a238_0x2fc2();}function detectNormalizedSqlType(_0x2fdc9a){const _0x98c45d=a238_0x46258c;if(_0x2fdc9a['error'])return{'type':_0x98c45d(0x1a6),'isSelectOnly':![],'isDangerous':![],'reason':_0x2fdc9a[_0x98c45d(0x1bd)]};if(!_0x2fdc9a['sql'][_0x98c45d(0x1c5)]())return{'type':_0x98c45d(0x1a6),'isSelectOnly':![],'isDangerous':![],'reason':_0x98c45d(0x1de)};const _0x11e7e3=stripStaticAnalysisMarkers(_0x2fdc9a[_0x98c45d(0x1ac)])[_0x98c45d(0x1c9)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x98c45d(0x1c9)](/\/\*[\s\S]*?\*\//g,'')[_0x98c45d(0x1c5)](),_0x2e6f15=_0x11e7e3[_0x98c45d(0x1d8)]('\x0a');let _0x39cd98='';for(const _0x30f89d of _0x2e6f15){const _0x28bf04=_0x30f89d[_0x98c45d(0x1c5)]();if(!_0x28bf04||_0x28bf04[_0x98c45d(0x19e)]('--')||_0x28bf04[_0x98c45d(0x19e)]('/*'))continue;_0x39cd98=_0x28bf04;break;}const _0x1c3182=_0x39cd98[_0x98c45d(0x1a7)](),_0x572155=_0x2fdc9a['statementType'],_0x4a780a=maskSqlTextForBlockedKeywordScan(_0x11e7e3),_0x3c4215=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x98c45d(0x1a5)](_0x4a780a);if(_0x572155==='SELECT'||!_0x572155&&(_0x1c3182['startsWith'](_0x98c45d(0x1a0))||_0x1c3182[_0x98c45d(0x19e)](_0x98c45d(0x1f2)))){const _0x4732e8=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x98c45d(0x1a5)](_0x11e7e3);return{'type':_0x98c45d(0x1a0),'isSelectOnly':!_0x4732e8,'isDangerous':_0x4732e8,'reason':_0x4732e8?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x572155===_0x98c45d(0x1b0)||!_0x572155&&_0x1c3182[_0x98c45d(0x19e)](_0x98c45d(0x1b0)))return{'type':_0x98c45d(0x1b0),'isSelectOnly':![],'isDangerous':_0x3c4215,'reason':_0x3c4215?_0x98c45d(0x1df):undefined};if(_0x572155===_0x98c45d(0x1f1)||!_0x572155&&_0x1c3182[_0x98c45d(0x19e)](_0x98c45d(0x1f1)))return{'type':_0x98c45d(0x1f1),'isSelectOnly':![],'isDangerous':_0x3c4215,'reason':_0x3c4215?_0x98c45d(0x1df):undefined};if(_0x572155===_0x98c45d(0x1fc)||!_0x572155&&_0x1c3182[_0x98c45d(0x19e)](_0x98c45d(0x1fc)))return{'type':_0x98c45d(0x1fc),'isSelectOnly':![],'isDangerous':!![],'reason':_0x98c45d(0x1e1)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x98c45d(0x1a5)](_0x1c3182))return{'type':_0x98c45d(0x1b7),'isSelectOnly':![],'isDangerous':!![],'reason':_0x98c45d(0x1c8)};return{'type':_0x98c45d(0x1a6),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x61fdf){const _0x27da02=a238_0x46258c;return _0x61fdf[_0x27da02(0x1db)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x27da02(0x1db)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x27da02(0x1db)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x1e12da){const _0x126274=a238_0x46258c;return _0x1e12da[_0x126274(0x1c9)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x126274(0x1c9)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x126274(0x1c9)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x126274(0x1c9)](/--.*$/gm,'\x20')[_0x126274(0x1c9)](/#.*$/gm,'\x20')[_0x126274(0x1c9)](/\/\*[\s\S]*?\*\//g,'\x20');}function a238_0x42e4(_0x3e10f0,_0x4a6baa){_0x3e10f0=_0x3e10f0-0x19b;const _0x2fc2b8=a238_0x2fc2();let _0x42e484=_0x2fc2b8[_0x3e10f0];return _0x42e484;}function extractTables(_0x51f308){const _0x15c788=a238_0x46258c,_0x4de6c3=_0x51f308[_0x15c788(0x1c9)](/#\{[^}]*\}/g,'?')[_0x15c788(0x1c9)](/\$\{[^}]*\}/g,'?')[_0x15c788(0x1c9)](/'[^']*'/g,'\x27\x27')[_0x15c788(0x1c9)](/--.*$/gm,'')[_0x15c788(0x1c9)](/\/\*[\s\S]*?\*\//g,''),_0x2965b9=[],_0x56aa16=_0x4de6c3['match'](/FROM\s+([^\s,)(]+)/i);addTable(_0x2965b9,_0x56aa16?.[0x1]);for(const _0x422da1 of _0x4de6c3['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x2965b9,_0x422da1[0x1]);}const _0x33a596=_0x4de6c3[_0x15c788(0x1d2)](/INTO\s+([^\s(]+)/i);addTable(_0x2965b9,_0x33a596?.[0x1]);const _0x1da26c=_0x4de6c3['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x2965b9,_0x1da26c?.[0x1]),_0x2965b9;}function addTable(_0x5c0c7b,_0x3bca4e){const _0x87d004=a238_0x46258c,_0x39acf1=_0x3bca4e?.['replace'](/[`"]/g,'');_0x39acf1&&_0x39acf1!==UNRESOLVED_SQL_FRAGMENT&&!_0x5c0c7b['includes'](_0x39acf1)&&_0x5c0c7b[_0x87d004(0x19f)](_0x39acf1);}function extractParameters(_0x101204){const _0x54c8ab=a238_0x46258c,_0x19bd64=new Set();for(const _0x4c2715 of _0x101204[_0x54c8ab(0x1a2)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x4c2715[0x1])_0x19bd64[_0x54c8ab(0x1a8)](_0x4c2715[0x1]);}return Array['from'](_0x19bd64);}export function validateSql(_0x4f92a5){const _0x5a217b=a238_0x46258c,_0x1407bd=normalizeSqlForStaticAnalysis(_0x4f92a5),_0x215f0e=detectNormalizedSqlType(_0x1407bd),_0x45238e=stripStaticAnalysisMarkers(_0x1407bd[_0x5a217b(0x1ac)]),_0x27f702=_0x1407bd['error']?[]:extractTables(_0x45238e),_0x434353=_0x1407bd[_0x5a217b(0x1bd)]?[]:extractParameters(_0x45238e);if(_0x215f0e[_0x5a217b(0x1c2)])return{'valid':![],'sqlType':_0x215f0e,'tables':_0x27f702,'parameters':_0x434353,'message':_0x215f0e[_0x5a217b(0x1fa)]||_0x215f0e['type']+_0x5a217b(0x1e4)};if(_0x215f0e['type']===_0x5a217b(0x1a6))return{'valid':![],'sqlType':_0x215f0e,'tables':_0x27f702,'parameters':_0x434353,'message':_0x1407bd[_0x5a217b(0x1bd)]?_0x5a217b(0x1eb)+_0x1407bd[_0x5a217b(0x1bd)]:_0x5a217b(0x1a1)};return{'valid':!![],'sqlType':_0x215f0e,'tables':_0x27f702,'parameters':_0x434353,'message':_0x215f0e[_0x5a217b(0x1d5)]+_0x5a217b(0x1e9)+(_0x27f702[_0x5a217b(0x1c0)]?_0x27f702['join'](',\x20'):_0x5a217b(0x1b5))+(_0x434353[_0x5a217b(0x1c0)]?'\x20with\x20parameters:\x20'+_0x434353[_0x5a217b(0x1be)](',\x20'):'')};}
1
+ const a239_0x75d061=a239_0x5e99;(function(_0x22f5e4,_0x4f2ac6){const _0x5adb21=a239_0x5e99,_0x5a2f8d=_0x22f5e4();while(!![]){try{const _0x39ed1d=parseInt(_0x5adb21(0x14d))/0x1*(-parseInt(_0x5adb21(0x12d))/0x2)+-parseInt(_0x5adb21(0x16a))/0x3+parseInt(_0x5adb21(0x130))/0x4*(parseInt(_0x5adb21(0x125))/0x5)+parseInt(_0x5adb21(0x111))/0x6*(parseInt(_0x5adb21(0x135))/0x7)+-parseInt(_0x5adb21(0x128))/0x8+-parseInt(_0x5adb21(0x144))/0x9+-parseInt(_0x5adb21(0x159))/0xa*(-parseInt(_0x5adb21(0x115))/0xb);if(_0x39ed1d===_0x4f2ac6)break;else _0x5a2f8d['push'](_0x5a2f8d['shift']());}catch(_0x47b07d){_0x5a2f8d['push'](_0x5a2f8d['shift']());}}}(a239_0x4bb3,0x99bd3));const MYBATIS_OUTER_TAGS=new Map([[a239_0x75d061(0x138),'SELECT'],[a239_0x75d061(0x117),'INSERT'],['update',a239_0x75d061(0x15b)],[a239_0x75d061(0x165),'DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a239_0x75d061(0x134),a239_0x75d061(0x123),a239_0x75d061(0x156),a239_0x75d061(0x12e),a239_0x75d061(0x139),a239_0x75d061(0x10e),a239_0x75d061(0x16e),a239_0x75d061(0x150),a239_0x75d061(0x155),'property']),MYBATIS_BRANCH_TAGS=new Set(['if',a239_0x75d061(0x123),a239_0x75d061(0x156),a239_0x75d061(0x12e),a239_0x75d061(0x139)]);export const MYBATIS_DYNAMIC_START_MARKER=a239_0x75d061(0x16f);export const MYBATIS_DYNAMIC_END_MARKER=a239_0x75d061(0x122);export const MYBATIS_INCLUDE_MARKER=a239_0x75d061(0x13b);const UNRESOLVED_SQL_FRAGMENT=a239_0x75d061(0x157),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a239_0x75d061(0x160)+[...MYBATIS_OUTER_TAGS[a239_0x75d061(0x152)]()][a239_0x75d061(0x137)]('|')+a239_0x75d061(0x140),'i');export function normalizeSqlForStaticAnalysis(_0xa5a506){const _0x9970a8=a239_0x75d061,_0x420c75=typeof _0xa5a506===_0x9970a8(0x116)?_0xa5a506:'';if(!startsWithMybatisStatementWrapper(_0x420c75))return{'sql':_0x420c75,'mode':'sql'};let _0x24e86a=0x0,_0x34949f='',_0x32849e,_0xaaa2f5=![],_0x583673=![];const _0x35598a=[];while(_0x24e86a<_0x420c75['length']){if(_0x420c75['startsWith'](_0x9970a8(0x120),_0x24e86a)){const _0x571db1=_0x420c75['indexOf'](_0x9970a8(0x119),_0x24e86a+0x4);if(_0x571db1<0x0)return invalidMybatisSource(_0x9970a8(0x162));_0x34949f+='\x20',_0x24e86a=_0x571db1+0x3;continue;}if(_0x420c75[_0x9970a8(0x10f)](_0x9970a8(0x146),_0x24e86a)){if(!_0xaaa2f5||_0x583673)return invalidMybatisSource(_0x9970a8(0x151));const _0x5d48e5=_0x420c75[_0x9970a8(0x16c)](_0x9970a8(0x11f),_0x24e86a+0x9);if(_0x5d48e5<0x0)return invalidMybatisSource(_0x9970a8(0x13a));_0x34949f+=_0x420c75['slice'](_0x24e86a+0x9,_0x5d48e5),_0x24e86a=_0x5d48e5+0x3;continue;}if(_0x420c75[_0x9970a8(0x10f)]('<?',_0x24e86a)){if(_0xaaa2f5)return invalidMybatisSource(_0x9970a8(0x15f));const _0x56f54b=_0x420c75[_0x9970a8(0x16c)]('?>',_0x24e86a+0x2);if(_0x56f54b<0x0)return invalidMybatisSource(_0x9970a8(0x14b));_0x34949f+='\x20',_0x24e86a=_0x56f54b+0x2;continue;}if(_0x420c75[_0x24e86a]!=='<'){const _0x490028=_0x420c75[_0x9970a8(0x16c)]('<',_0x24e86a),_0x25b20c=_0x490028<0x0?_0x420c75[_0x9970a8(0x118)]:_0x490028,_0x3cd6cd=_0x420c75[_0x9970a8(0x16b)](_0x24e86a,_0x25b20c);if((!_0xaaa2f5||_0x583673)&&_0x3cd6cd['trim']())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0xaaa2f5&&!_0x583673){const _0x840dcb=decodeXmlEntities(_0x3cd6cd);if(_0x840dcb===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x34949f+=_0x840dcb;}else _0x34949f+='\x20';_0x24e86a=_0x25b20c;continue;}const _0x4b6f01=findXmlTagEnd(_0x420c75,_0x24e86a);if(_0x4b6f01<0x0)return invalidMybatisSource(_0x9970a8(0x163));const _0xb6945b=_0x420c75[_0x9970a8(0x16b)](_0x24e86a,_0x4b6f01+0x1),_0x456f36=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/['exec'](_0xb6945b);if(!_0x456f36)return invalidMybatisSource(_0x9970a8(0x13f));const _0x46bb03=_0x456f36[0x1]==='/',_0x14a4dc=_0x456f36[0x2]??'',_0x1f8802=_0x14a4dc[_0x9970a8(0x126)](),_0x516197=_0x456f36[0x3]??'',_0x3d40f4=_0x456f36[0x4]==='/',_0x2f8c98=MYBATIS_OUTER_TAGS[_0x9970a8(0x168)](_0x1f8802);if(!_0x2f8c98&&!MYBATIS_DYNAMIC_TAGS['has'](_0x1f8802))return invalidMybatisSource(_0x9970a8(0x147)+_0x1f8802+'>.');if(!_0x2f8c98&&_0x14a4dc!==_0x1f8802)return invalidMybatisSource(_0x9970a8(0x15a)+_0x14a4dc+'>.');if(_0x46bb03){if(_0x516197['trim']()||_0x3d40f4)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x14a4dc+'>.');const _0x48153b=_0x35598a['at'](-0x1);if(!_0x48153b||(_0x48153b[_0x9970a8(0x10d)]?_0x48153b[_0x9970a8(0x132)]!==_0x1f8802:_0x48153b[_0x9970a8(0x15d)]!==_0x14a4dc))return invalidMybatisSource(_0x9970a8(0x129)+_0x14a4dc+'>.');_0x35598a['pop']();if(_0x48153b[_0x9970a8(0x10d)])_0x583673=!![];_0x34949f+=MYBATIS_BRANCH_TAGS['has'](_0x1f8802)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x516197))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0x14a4dc+'>.');if(_0x1f8802===_0x9970a8(0x11c)&&(!_0x3d40f4||_0x35598a['at'](-0x1)?.[_0x9970a8(0x132)]!=='include'))return invalidMybatisSource(_0x9970a8(0x158));if(_0x2f8c98){if(_0xaaa2f5||_0x35598a['length']>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0xaaa2f5=!![],_0x583673=_0x3d40f4,_0x32849e=_0x2f8c98;}else{if(!_0xaaa2f5||_0x583673)return invalidMybatisSource(_0x9970a8(0x14e)+_0x14a4dc+'>.');}_0x34949f+=_0x1f8802===_0x9970a8(0x134)?'\x20WHERE\x20':_0x1f8802===_0x9970a8(0x16e)?'\x20SET\x20':_0x1f8802==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x9970a8(0x141)](_0x1f8802)&&!_0x3d40f4?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x3d40f4&&_0x35598a[_0x9970a8(0x15e)]({'rawName':_0x14a4dc,'tagName':_0x1f8802,'outer':!!_0x2f8c98});}_0x24e86a=_0x4b6f01+0x1;}if(_0x35598a[_0x9970a8(0x118)]>0x0)return invalidMybatisSource(_0x9970a8(0x124)+_0x35598a['at'](-0x1)?.[_0x9970a8(0x15d)]+'>.');if(!_0xaaa2f5||!_0x583673)return invalidMybatisSource(_0x9970a8(0x12c));return{'sql':_0x34949f[_0x9970a8(0x10e)](),'mode':_0x9970a8(0x114),..._0x32849e?{'statementType':_0x32849e}:{}};}function hasWellFormedXmlAttributes(_0x4e999c){const _0xeb6eca=a239_0x75d061;let _0x411f76=0x0;const _0x26fb2c=new Set();while(_0x411f76<_0x4e999c[_0xeb6eca(0x118)]){while(_0x411f76<_0x4e999c[_0xeb6eca(0x118)]&&/\s/[_0xeb6eca(0x14a)](_0x4e999c[_0x411f76]??''))_0x411f76+=0x1;if(_0x411f76>=_0x4e999c[_0xeb6eca(0x118)])return!![];const _0x2ef9be=/^[A-Za-z_:][\w:.-]*/[_0xeb6eca(0x153)](_0x4e999c[_0xeb6eca(0x16b)](_0x411f76)),_0x57e4dc=_0x2ef9be?.[0x0];if(!_0x57e4dc||_0x26fb2c['has'](_0x57e4dc))return![];_0x26fb2c[_0xeb6eca(0x12b)](_0x57e4dc),_0x411f76+=_0x57e4dc[_0xeb6eca(0x118)];while(_0x411f76<_0x4e999c[_0xeb6eca(0x118)]&&/\s/[_0xeb6eca(0x14a)](_0x4e999c[_0x411f76]??''))_0x411f76+=0x1;if(_0x4e999c[_0x411f76]!=='=')return![];_0x411f76+=0x1;while(_0x411f76<_0x4e999c['length']&&/\s/['test'](_0x4e999c[_0x411f76]??''))_0x411f76+=0x1;const _0x145b27=_0x4e999c[_0x411f76];if(_0x145b27!=='\x22'&&_0x145b27!=='\x27')return![];_0x411f76+=0x1;const _0x460533=_0x4e999c[_0xeb6eca(0x16c)](_0x145b27,_0x411f76);if(_0x460533<0x0)return![];if(decodeXmlEntities(_0x4e999c[_0xeb6eca(0x16b)](_0x411f76,_0x460533))===null)return![];_0x411f76=_0x460533+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0xdb8e35){const _0x5f3c09=a239_0x75d061;let _0x4f4368=0x0;const _0x17229f=()=>{const _0x107a00=a239_0x5e99;while(_0x4f4368<_0xdb8e35[_0x107a00(0x118)]&&/\s/[_0x107a00(0x14a)](_0xdb8e35[_0x4f4368]??''))_0x4f4368+=0x1;};_0x17229f();while(_0x4f4368<_0xdb8e35[_0x5f3c09(0x118)]){if(_0xdb8e35[_0x5f3c09(0x10f)](_0x5f3c09(0x120),_0x4f4368)){const _0x4e61d2=_0xdb8e35[_0x5f3c09(0x16c)]('-->',_0x4f4368+0x4);if(_0x4e61d2<0x0)return!![];_0x4f4368=_0x4e61d2+0x3,_0x17229f();continue;}if(_0xdb8e35[_0x5f3c09(0x10f)]('<?',_0x4f4368)){const _0x5de1d3=_0xdb8e35['indexOf']('?>',_0x4f4368+0x2);if(_0x5de1d3<0x0)return!![];_0x4f4368=_0x5de1d3+0x2,_0x17229f();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x5f3c09(0x14a)](_0xdb8e35[_0x5f3c09(0x16b)](_0x4f4368));}function a239_0x5e99(_0x459d06,_0x59969d){_0x459d06=_0x459d06-0x10d;const _0x4bb391=a239_0x4bb3();let _0x5e9984=_0x4bb391[_0x459d06];return _0x5e9984;}function invalidMybatisSource(_0x1c7725){return{'sql':'','mode':'mybatisXml','error':_0x1c7725};}function a239_0x4bb3(){const _0x495d32=['28KRkQsR','when','&lt;','48PBCCZi','isDangerous','tagName','type','where','1106KXhATl','replaceAll','join','select','otherwise','Unterminated\x20CDATA\x20section.','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','&apos;','SELECT','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','Invalid\x20MyBatis\x20XML\x20tag.',')\x5cb','has','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','split','593541gMFydJ','Unable\x20to\x20detect\x20SQL\x20type.\x20','<![CDATA[','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','sql','unknown\x20table(s)','test','Unterminated\x20XML\x20declaration.','error','88301NaUigx','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','statementType','bind','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','keys','exec','DELETE','include','choose','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','430NCCnRM','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','UPDATE','replace','rawName','push','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','^<\x5cs*(?:','match','Unterminated\x20XML\x20comment.','Unterminated\x20MyBatis\x20XML\x20tag.','SQL\x20content\x20is\x20empty','delete','&quot;','from','get','reason','468519loApPB','slice','indexOf','parseInt','set','__RABETBASE_MYBATIS_DYNAMIC_START__','outer','trim','startsWith','&amp;','37644PTZZqS','INSERT','&gt;','mybatisXml','318670ypeXpx','string','insert','length','-->','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','toUpperCase','property','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','UNKNOWN',']]>','<!--','includes','__RABETBASE_MYBATIS_DYNAMIC_END__','foreach','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','41880Zursmq','toLowerCase','\x20query\x20targeting\x20','1995704WLfUpX','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','matchAll','add','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.'];a239_0x4bb3=function(){return _0x495d32;};return a239_0x4bb3();}function findXmlTagEnd(_0x1385cb,_0x31ccf4){let _0x5d4a00;for(let _0x5c1685=_0x31ccf4+0x1;_0x5c1685<_0x1385cb['length'];_0x5c1685+=0x1){const _0xfba18a=_0x1385cb[_0x5c1685];if(_0x5d4a00){if(_0xfba18a===_0x5d4a00)_0x5d4a00=undefined;continue;}if(_0xfba18a==='\x22'||_0xfba18a==='\x27'){_0x5d4a00=_0xfba18a;continue;}if(_0xfba18a==='>')return _0x5c1685;}return-0x1;}function decodeXmlEntities(_0xc27918){const _0x1a4e0f=a239_0x75d061;let _0x4ff4b8=![];const _0x2784c1=_0xc27918[_0x1a4e0f(0x15c)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x33d015=>{const _0x35fc78=_0x1a4e0f;if(_0x33d015===_0x35fc78(0x12f))return'<';if(_0x33d015===_0x35fc78(0x113))return'>';if(_0x33d015===_0x35fc78(0x166))return'\x22';if(_0x33d015===_0x35fc78(0x13c))return'\x27';if(_0x33d015===_0x35fc78(0x110))return'&';const _0x49ec63=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x35fc78(0x153)](_0x33d015);if(_0x49ec63){const _0x5f12d8=_0x49ec63[0x1],_0x4d3d09=_0x49ec63[0x2],_0x52f860=Number[_0x35fc78(0x16d)](_0x5f12d8??_0x4d3d09??'',_0x5f12d8?0x10:0xa);if(isValidXmlCharacter(_0x52f860))return String['fromCodePoint'](_0x52f860);}return _0x4ff4b8=!![],'';});return _0x4ff4b8?null:_0x2784c1;}function isValidXmlCharacter(_0x518beb){return _0x518beb===0x9||_0x518beb===0xa||_0x518beb===0xd||_0x518beb>=0x20&&_0x518beb<=0xd7ff||_0x518beb>=0xe000&&_0x518beb<=0xfffd||_0x518beb>=0x10000&&_0x518beb<=0x10ffff;}export function detectSqlType(_0x259ed2){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x259ed2));}function detectNormalizedSqlType(_0x1c8988){const _0x55d218=a239_0x75d061;if(_0x1c8988[_0x55d218(0x14c)])return{'type':_0x55d218(0x11e),'isSelectOnly':![],'isDangerous':![],'reason':_0x1c8988[_0x55d218(0x14c)]};if(!_0x1c8988[_0x55d218(0x148)][_0x55d218(0x10e)]())return{'type':_0x55d218(0x11e),'isSelectOnly':![],'isDangerous':![],'reason':_0x55d218(0x164)};const _0x3cb9de=stripStaticAnalysisMarkers(_0x1c8988['sql'])[_0x55d218(0x15c)](/#\{[^}]*\}/g,'?')[_0x55d218(0x15c)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x55d218(0x15c)](/\/\*[\s\S]*?\*\//g,'')[_0x55d218(0x10e)](),_0x220ccd=_0x3cb9de[_0x55d218(0x143)]('\x0a');let _0x3767a0='';for(const _0x33173d of _0x220ccd){const _0x1a5661=_0x33173d['trim']();if(!_0x1a5661||_0x1a5661['startsWith']('--')||_0x1a5661['startsWith']('/*'))continue;_0x3767a0=_0x1a5661;break;}const _0x3dc5a2=_0x3767a0[_0x55d218(0x11b)](),_0x32e693=_0x1c8988[_0x55d218(0x14f)],_0x419fc6=maskSqlTextForBlockedKeywordScan(_0x3cb9de),_0x56dedf=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x55d218(0x14a)](_0x419fc6);if(_0x32e693==='SELECT'||!_0x32e693&&(_0x3dc5a2[_0x55d218(0x10f)](_0x55d218(0x13d))||_0x3dc5a2[_0x55d218(0x10f)]('WITH'))){const _0x55695a=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x55d218(0x14a)](_0x3cb9de);return{'type':_0x55d218(0x13d),'isSelectOnly':!_0x55695a,'isDangerous':_0x55695a,'reason':_0x55695a?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x32e693===_0x55d218(0x112)||!_0x32e693&&_0x3dc5a2[_0x55d218(0x10f)](_0x55d218(0x112)))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x56dedf,'reason':_0x56dedf?_0x55d218(0x11d):undefined};if(_0x32e693==='UPDATE'||!_0x32e693&&_0x3dc5a2[_0x55d218(0x10f)]('UPDATE'))return{'type':_0x55d218(0x15b),'isSelectOnly':![],'isDangerous':_0x56dedf,'reason':_0x56dedf?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x32e693===_0x55d218(0x154)||!_0x32e693&&_0x3dc5a2[_0x55d218(0x10f)](_0x55d218(0x154)))return{'type':_0x55d218(0x154),'isSelectOnly':![],'isDangerous':!![],'reason':_0x55d218(0x11a)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x55d218(0x14a)](_0x3dc5a2))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x4420bb){const _0xa71780=a239_0x75d061;return _0x4420bb[_0xa71780(0x136)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0xa71780(0x136)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x19d8cb){const _0x2f910e=a239_0x75d061;return _0x19d8cb[_0x2f910e(0x15c)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x2f910e(0x15c)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x2f910e(0x15c)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x2f910e(0x15c)](/--.*$/gm,'\x20')['replace'](/#.*$/gm,'\x20')[_0x2f910e(0x15c)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x3c2d3d){const _0x571e02=a239_0x75d061,_0x1efef7=_0x3c2d3d[_0x571e02(0x15c)](/#\{[^}]*\}/g,'?')[_0x571e02(0x15c)](/\$\{[^}]*\}/g,'?')[_0x571e02(0x15c)](/'[^']*'/g,'\x27\x27')[_0x571e02(0x15c)](/--.*$/gm,'')[_0x571e02(0x15c)](/\/\*[\s\S]*?\*\//g,''),_0x5c85d4=[],_0x1bfffa=_0x1efef7[_0x571e02(0x161)](/FROM\s+([^\s,)(]+)/i);addTable(_0x5c85d4,_0x1bfffa?.[0x1]);for(const _0x3aae8b of _0x1efef7[_0x571e02(0x12a)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x5c85d4,_0x3aae8b[0x1]);}const _0x3e0950=_0x1efef7['match'](/INTO\s+([^\s(]+)/i);addTable(_0x5c85d4,_0x3e0950?.[0x1]);const _0x59eac1=_0x1efef7['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x5c85d4,_0x59eac1?.[0x1]),_0x5c85d4;}function addTable(_0x4c3233,_0x195ef5){const _0xce8f8b=a239_0x75d061,_0x5c9225=_0x195ef5?.[_0xce8f8b(0x15c)](/[`"]/g,'');_0x5c9225&&_0x5c9225!==UNRESOLVED_SQL_FRAGMENT&&!_0x4c3233[_0xce8f8b(0x121)](_0x5c9225)&&_0x4c3233[_0xce8f8b(0x15e)](_0x5c9225);}function extractParameters(_0x13a774){const _0x7e2144=a239_0x75d061,_0x4ed7a7=new Set();for(const _0x40d912 of _0x13a774[_0x7e2144(0x12a)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x40d912[0x1])_0x4ed7a7[_0x7e2144(0x12b)](_0x40d912[0x1]);}return Array[_0x7e2144(0x167)](_0x4ed7a7);}export function validateSql(_0x432383){const _0x26277f=a239_0x75d061,_0x82e833=normalizeSqlForStaticAnalysis(_0x432383),_0x472d77=detectNormalizedSqlType(_0x82e833),_0x4720b0=stripStaticAnalysisMarkers(_0x82e833['sql']),_0x550398=_0x82e833[_0x26277f(0x14c)]?[]:extractTables(_0x4720b0),_0x134f13=_0x82e833[_0x26277f(0x14c)]?[]:extractParameters(_0x4720b0);if(_0x472d77[_0x26277f(0x131)])return{'valid':![],'sqlType':_0x472d77,'tables':_0x550398,'parameters':_0x134f13,'message':_0x472d77[_0x26277f(0x169)]||_0x472d77['type']+_0x26277f(0x13e)};if(_0x472d77[_0x26277f(0x133)]===_0x26277f(0x11e))return{'valid':![],'sqlType':_0x472d77,'tables':_0x550398,'parameters':_0x134f13,'message':_0x82e833[_0x26277f(0x14c)]?_0x26277f(0x145)+_0x82e833[_0x26277f(0x14c)]:_0x26277f(0x142)};return{'valid':!![],'sqlType':_0x472d77,'tables':_0x550398,'parameters':_0x134f13,'message':_0x472d77[_0x26277f(0x133)]+_0x26277f(0x127)+(_0x550398['length']?_0x550398[_0x26277f(0x137)](',\x20'):_0x26277f(0x149))+(_0x134f13['length']?'\x20with\x20parameters:\x20'+_0x134f13[_0x26277f(0x137)](',\x20'):'')};}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- const a239_0x350c2e=a239_0x4dcb;(function(_0x8ec669,_0x34255d){const _0x3cf8ba=a239_0x4dcb,_0x434df7=_0x8ec669();while(!![]){try{const _0x5a3baa=parseInt(_0x3cf8ba(0x18c))/0x1+-parseInt(_0x3cf8ba(0x18b))/0x2*(-parseInt(_0x3cf8ba(0x193))/0x3)+-parseInt(_0x3cf8ba(0x191))/0x4+-parseInt(_0x3cf8ba(0x18f))/0x5*(-parseInt(_0x3cf8ba(0x18d))/0x6)+parseInt(_0x3cf8ba(0x185))/0x7*(-parseInt(_0x3cf8ba(0x194))/0x8)+-parseInt(_0x3cf8ba(0x188))/0x9+parseInt(_0x3cf8ba(0x186))/0xa*(-parseInt(_0x3cf8ba(0x192))/0xb);if(_0x5a3baa===_0x34255d)break;else _0x434df7['push'](_0x434df7['shift']());}catch(_0xa5a9fa){_0x434df7['push'](_0x434df7['shift']());}}}(a239_0xd6f4,0x297c5));function a239_0x4dcb(_0x5129c3,_0x39f5ac){_0x5129c3=_0x5129c3-0x185;const _0xd6f468=a239_0xd6f4();let _0x4dcbb4=_0xd6f468[_0x5129c3];return _0x4dcbb4;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a239_0xd6f4(){const _0x45763e=['4870cKUWpI','Set\x20appcode\x20via\x20`','895608SRSPMo','Run\x20`','\x20auth`\x20to\x20login\x20first.','2UptGRb','322580vUdDSj','348sOaSIp','join','11330VNFttd','Tip:\x20`','1024796TEcepP','253wKBFSr','325761bpzqYe','432PRFfwt','\x0a\x20\x20\x20\x20\x20\x20\x20','3339vhhqcg'];a239_0xd6f4=function(){return _0x45763e;};return a239_0xd6f4();}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a239_0x350c2e(0x189)+CLI_BIN_NAME+a239_0x350c2e(0x18a),'configMissingHint':[a239_0x350c2e(0x187)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.',a239_0x350c2e(0x190)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a239_0x350c2e(0x18e)](a239_0x350c2e(0x195)),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});
1
+ function a240_0x1212(){const _0x4326a8=['432740ImjeGN','12UdqnSv','4NxgHHH','1458672HAamZP','Run\x20`','\x0a\x20\x20\x20\x20\x20\x20\x20','479385pryKNO','2849580wJCRWt','Set\x20appcode\x20via\x20`','1140771GTaIPS','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','join','642582WdSgAb','7721fVhYoc','15qnywEy','7wZUPJO','\x20auth`\x20to\x20login\x20first.','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'];a240_0x1212=function(){return _0x4326a8;};return a240_0x1212();}const a240_0x597810=a240_0x54ee;function a240_0x54ee(_0x265e35,_0x1213ad){_0x265e35=_0x265e35-0x110;const _0x1212a2=a240_0x1212();let _0x54ee58=_0x1212a2[_0x265e35];return _0x54ee58;}(function(_0x343187,_0x29a949){const _0xba5f41=a240_0x54ee,_0x564fc6=_0x343187();while(!![]){try{const _0x200138=-parseInt(_0xba5f41(0x114))/0x1*(-parseInt(_0xba5f41(0x11a))/0x2)+parseInt(_0xba5f41(0x110))/0x3*(parseInt(_0xba5f41(0x11b))/0x4)+parseInt(_0xba5f41(0x115))/0x5*(-parseInt(_0xba5f41(0x113))/0x6)+parseInt(_0xba5f41(0x116))/0x7*(-parseInt(_0xba5f41(0x11c))/0x8)+-parseInt(_0xba5f41(0x11f))/0x9+parseInt(_0xba5f41(0x120))/0xa+parseInt(_0xba5f41(0x119))/0xb;if(_0x200138===_0x29a949)break;else _0x564fc6['push'](_0x564fc6['shift']());}catch(_0xe8f846){_0x564fc6['push'](_0x564fc6['shift']());}}}(a240_0x1212,0x2f5c7));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a240_0x597810(0x11d)+CLI_BIN_NAME+a240_0x597810(0x117),'configMissingHint':[a240_0x597810(0x121)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','Tip:\x20`'+CLI_BIN_NAME+a240_0x597810(0x118)][a240_0x597810(0x112)](a240_0x597810(0x11e)),'notInProjectHint':a240_0x597810(0x111)});
@@ -1 +1 @@
1
- function a240_0x4dd4(){const _0x39aa29=['1791lnmPqA','map','1213860ccrqdl','5584AFmunj','name','3361638XsBOrp','1763nxuCGM','1176948ojizrv','229120pJMgRj','yes','1843203hIxXSh','648mjMKKk'];a240_0x4dd4=function(){return _0x39aa29;};return a240_0x4dd4();}(function(_0x23a4f8,_0x3a85eb){const _0x1ef92e=a240_0x37e6,_0x4c2965=_0x23a4f8();while(!![]){try{const _0x537ea9=parseInt(_0x1ef92e(0xd7))/0x1*(parseInt(_0x1ef92e(0xdc))/0x2)+-parseInt(_0x1ef92e(0xdb))/0x3+parseInt(_0x1ef92e(0xd9))/0x4+-parseInt(_0x1ef92e(0xdf))/0x5+parseInt(_0x1ef92e(0xd8))/0x6+parseInt(_0x1ef92e(0xd6))/0x7+-parseInt(_0x1ef92e(0xe0))/0x8*(parseInt(_0x1ef92e(0xdd))/0x9);if(_0x537ea9===_0x3a85eb)break;else _0x4c2965['push'](_0x4c2965['shift']());}catch(_0x20b083){_0x4c2965['push'](_0x4c2965['shift']());}}}(a240_0x4dd4,0x4b649));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a240_0xc8cd8c}from'@lovrabet/cli-framework';function a240_0x37e6(_0x2e9b25,_0x9faf4e){_0x2e9b25=_0x2e9b25-0xd5;const _0x4dd42b=a240_0x4dd4();let _0x37e6b6=_0x4dd42b[_0x2e9b25];return _0x37e6b6;}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x1719f4){const _0x17076b=a240_0x37e6,_0x5d5e2b=a240_0xc8cd8c(_0x1719f4,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x1719f4))return _0x5d5e2b;return _0x5d5e2b[_0x17076b(0xde)](_0x17cfe7=>_0x17cfe7[_0x17076b(0xd5)]===_0x17076b(0xda)?{..._0x17cfe7,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x17cfe7);}
1
+ (function(_0x4d7c0b,_0x4a708d){const _0x611cfa=a241_0x25df,_0x1c03e2=_0x4d7c0b();while(!![]){try{const _0x54e867=parseInt(_0x611cfa(0x162))/0x1+parseInt(_0x611cfa(0x167))/0x2*(-parseInt(_0x611cfa(0x166))/0x3)+parseInt(_0x611cfa(0x16a))/0x4+-parseInt(_0x611cfa(0x164))/0x5+-parseInt(_0x611cfa(0x16b))/0x6+-parseInt(_0x611cfa(0x168))/0x7+parseInt(_0x611cfa(0x163))/0x8;if(_0x54e867===_0x4a708d)break;else _0x1c03e2['push'](_0x1c03e2['shift']());}catch(_0x1b114a){_0x1c03e2['push'](_0x1c03e2['shift']());}}}(a241_0x31ae,0xb8c60));function a241_0x25df(_0xc15727,_0x59ff19){_0xc15727=_0xc15727-0x162;const _0x31ae54=a241_0x31ae();let _0x25dfde=_0x31ae54[_0xc15727];return _0x25dfde;}function a241_0x31ae(){const _0xb8c074=['map','5971004CVUPgd','6488952GmTinq','341763mPqrqF','15142056dWuyWI','4766760DemJLa','yes','13821TQcBpf','10NPVnZK','6387920BkFadD'];a241_0x31ae=function(){return _0xb8c074;};return a241_0x31ae();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a241_0x306c80}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x3cde80){const _0x2ffa92=a241_0x25df,_0x20902b=a241_0x306c80(_0x3cde80,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x3cde80))return _0x20902b;return _0x20902b[_0x2ffa92(0x169)](_0x2389bc=>_0x2389bc['name']===_0x2ffa92(0x165)?{..._0x2389bc,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x2389bc);}
@@ -1 +1 @@
1
- (function(_0x291ebb,_0x529a48){var _0xecc87a=a241_0x12be,_0x4e568d=_0x291ebb();while(!![]){try{var _0x4be15b=parseInt(_0xecc87a(0x15c))/0x1+parseInt(_0xecc87a(0x15d))/0x2*(-parseInt(_0xecc87a(0x161))/0x3)+-parseInt(_0xecc87a(0x15f))/0x4+-parseInt(_0xecc87a(0x15e))/0x5+parseInt(_0xecc87a(0x15b))/0x6*(parseInt(_0xecc87a(0x160))/0x7)+parseInt(_0xecc87a(0x162))/0x8+-parseInt(_0xecc87a(0x158))/0x9;if(_0x4be15b===_0x529a48)break;else _0x4e568d['push'](_0x4e568d['shift']());}catch(_0xab752e){_0x4e568d['push'](_0x4e568d['shift']());}}}(a241_0x51cb,0x467a7));function a241_0x12be(_0x40de8e,_0x5adba2){_0x40de8e=_0x40de8e-0x158;var _0x51cbbd=a241_0x51cb();var _0x12bee9=_0x51cbbd[_0x40de8e];return _0x12bee9;}import{resolveOutputConfig}from'@lovrabet/cli-framework';function a241_0x51cb(){var _0x31f7=['798140jRZfDc','1026676mDiDOB','315XoztAa','1072551xZfpzD','3606576RQRqkM','234234tCRGIC','defaultFormat','def','27150cogHSF','434072hFnqdt','2rNtlVU'];a241_0x51cb=function(){return _0x31f7;};return a241_0x51cb();}export function usesStructuredErrorOutput(_0x33010d){return _0x33010d?.['structuredErrors']===!![];}export function resolveErrorOutputFormat(_0x3a4fff){var _0x4b2d6f=a241_0x12be;if(!_0x3a4fff[_0x4b2d6f(0x15a)])return _0x3a4fff[_0x4b2d6f(0x159)]??'compress';return resolveOutputConfig({'flags':_0x3a4fff['flags']??{},'def':_0x3a4fff['def'],'configDefault':_0x3a4fff['defaultFormat']})['format'];}
1
+ function a242_0x24b0(){var _0x1ae71b=['def','77980BokVhB','defaultFormat','4432ZGEvwR','5UhIbsH','16767hfIWYo','13295928GONzbN','format','3422188PQVphd','3hHqvio','40tYADVB','12IrPMKE','structuredErrors','1722133tVxkyM','627442ewbepH','13725iNiIRF'];a242_0x24b0=function(){return _0x1ae71b;};return a242_0x24b0();}function a242_0x18c9(_0x24ff59,_0x3ad1d1){_0x24ff59=_0x24ff59-0x1a3;var _0x24b0db=a242_0x24b0();var _0x18c9b0=_0x24b0db[_0x24ff59];return _0x18c9b0;}(function(_0x2ff785,_0x299f8c){var _0x34c3c1=a242_0x18c9,_0x26a716=_0x2ff785();while(!![]){try{var _0xe5a24f=-parseInt(_0x34c3c1(0x1ab))/0x1*(parseInt(_0x34c3c1(0x1b0))/0x2)+parseInt(_0x34c3c1(0x1b1))/0x3+-parseInt(_0x34c3c1(0x1a3))/0x4*(parseInt(_0x34c3c1(0x1a6))/0x5)+-parseInt(_0x34c3c1(0x1ad))/0x6*(-parseInt(_0x34c3c1(0x1af))/0x7)+parseInt(_0x34c3c1(0x1a5))/0x8*(parseInt(_0x34c3c1(0x1a7))/0x9)+-parseInt(_0x34c3c1(0x1ac))/0xa*(-parseInt(_0x34c3c1(0x1aa))/0xb)+-parseInt(_0x34c3c1(0x1a8))/0xc;if(_0xe5a24f===_0x299f8c)break;else _0x26a716['push'](_0x26a716['shift']());}catch(_0x2e41b5){_0x26a716['push'](_0x26a716['shift']());}}}(a242_0x24b0,0xabfef));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x44e93){var _0x32bc82=a242_0x18c9;return _0x44e93?.[_0x32bc82(0x1ae)]===!![];}export function resolveErrorOutputFormat(_0x170814){var _0x2743d9=a242_0x18c9;if(!_0x170814[_0x2743d9(0x1b2)])return _0x170814['defaultFormat']??'compress';return resolveOutputConfig({'flags':_0x170814['flags']??{},'def':_0x170814[_0x2743d9(0x1b2)],'configDefault':_0x170814[_0x2743d9(0x1a4)]})[_0x2743d9(0x1a9)];}
@@ -1 +1 @@
1
- const a242_0x210098=a242_0x25e5;(function(_0x388724,_0x2bb9bd){const _0x14d860=a242_0x25e5,_0x53b0a5=_0x388724();while(!![]){try{const _0x5eaced=parseInt(_0x14d860(0x1fe))/0x1+parseInt(_0x14d860(0x1f7))/0x2*(parseInt(_0x14d860(0x1ff))/0x3)+-parseInt(_0x14d860(0x1f5))/0x4*(-parseInt(_0x14d860(0x1fc))/0x5)+-parseInt(_0x14d860(0x1f9))/0x6+parseInt(_0x14d860(0x1fb))/0x7*(-parseInt(_0x14d860(0x1f6))/0x8)+parseInt(_0x14d860(0x1fa))/0x9+-parseInt(_0x14d860(0x1f8))/0xa;if(_0x5eaced===_0x2bb9bd)break;else _0x53b0a5['push'](_0x53b0a5['shift']());}catch(_0x5162da){_0x53b0a5['push'](_0x53b0a5['shift']());}}}(a242_0x8987,0x4608c));const EXPLICIT_YES_COMMANDS=new Set(['menu\x20delete',a242_0x210098(0x1f2),a242_0x210098(0x1fd),a242_0x210098(0x1f4)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a242_0x210098(0x1f1);export function requiresExplicitYes(_0x501bcf){const _0x1db411=a242_0x210098;return EXPLICIT_YES_COMMANDS['has'](_0x501bcf['service']+'\x20'+_0x501bcf[_0x1db411(0x1f3)]);}function a242_0x25e5(_0x56bca9,_0x3d5d95){_0x56bca9=_0x56bca9-0x1f1;const _0x898725=a242_0x8987();let _0x25e5be=_0x898725[_0x56bca9];return _0x25e5be;}function a242_0x8987(){const _0x3ce1c8=['kb\x20delete','command','notification\x20config-delete','12NdAHnZ','272gmqjCz','541642rJnNuz','6851540QccuQP','748224uuORit','4441455GJXazk','36904eXYiWJ','132370nbQkzX','notification\x20config-update','432228sUBnSD','3AfojbT','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan'];a242_0x8987=function(){return _0x3ce1c8;};return a242_0x8987();}
1
+ const a243_0x152bb3=a243_0x42d3;(function(_0xef1ea0,_0x25c011){const _0x28a3c8=a243_0x42d3,_0x2070cd=_0xef1ea0();while(!![]){try{const _0x5d095e=parseInt(_0x28a3c8(0xad))/0x1*(-parseInt(_0x28a3c8(0xb7))/0x2)+parseInt(_0x28a3c8(0xa7))/0x3+parseInt(_0x28a3c8(0xac))/0x4+-parseInt(_0x28a3c8(0xb0))/0x5+parseInt(_0x28a3c8(0xb5))/0x6*(parseInt(_0x28a3c8(0xaf))/0x7)+-parseInt(_0x28a3c8(0xaa))/0x8*(-parseInt(_0x28a3c8(0xab))/0x9)+parseInt(_0x28a3c8(0xb1))/0xa;if(_0x5d095e===_0x25c011)break;else _0x2070cd['push'](_0x2070cd['shift']());}catch(_0x302cc1){_0x2070cd['push'](_0x2070cd['shift']());}}}(a243_0xb8fd,0x342a6));const EXPLICIT_YES_COMMANDS=new Set(['menu\x20delete',a243_0x152bb3(0xa8),a243_0x152bb3(0xb6),a243_0x152bb3(0xb4)]);function a243_0x42d3(_0x2415a2,_0x327a0d){_0x2415a2=_0x2415a2-0xa7;const _0xb8fd71=a243_0xb8fd();let _0x42d3ed=_0xb8fd71[_0x2415a2];return _0x42d3ed;}export const EXPLICIT_YES_FLAG_DESCRIPTION=a243_0x152bb3(0xa9);export function requiresExplicitYes(_0x13345f){const _0x29092e=a243_0x152bb3;return EXPLICIT_YES_COMMANDS[_0x29092e(0xae)](_0x13345f[_0x29092e(0xb3)]+'\x20'+_0x13345f[_0x29092e(0xb2)]);}function a243_0xb8fd(){const _0x319906=['kb\x20delete','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','375352rZmxza','18dDZIhz','1273260jBmfOr','17qHIVeI','has','14KWHamx','2035890azFzZJ','449970nIHUqT','command','service','notification\x20config-delete','1026930UmUjEn','notification\x20config-update','29220pnBxXf','209274FIyZvq'];a243_0xb8fd=function(){return _0x319906;};return a243_0xb8fd();}
@@ -1 +1 @@
1
- function a243_0x1afa(_0x326e60,_0x107725){_0x326e60=_0x326e60-0x1bf;const _0x2a746b=a243_0x2a74();let _0x1afa57=_0x2a746b[_0x326e60];return _0x1afa57;}function a243_0x2a74(){const _0x16120a=['860073yrHJvA','1432881TYlIRp','5320315PKWXde','6vHthFM','5hnyjWX','validateFlags','5547944OAWxoX','2GDFQDi','24eKdpcH','600kOJVwO','379907wyKILr','9852980eoMibW','168360BjzRmy'];a243_0x2a74=function(){return _0x16120a;};return a243_0x2a74();}const a243_0x1ba1ab=a243_0x1afa;(function(_0x59204a,_0x331b98){const _0x5c0926=a243_0x1afa,_0x5fa0aa=_0x59204a();while(!![]){try{const _0x11be0d=parseInt(_0x5c0926(0x1c0))/0x1+parseInt(_0x5c0926(0x1c8))/0x2*(-parseInt(_0x5c0926(0x1c1))/0x3)+-parseInt(_0x5c0926(0x1c7))/0x4*(-parseInt(_0x5c0926(0x1c5))/0x5)+parseInt(_0x5c0926(0x1c4))/0x6*(-parseInt(_0x5c0926(0x1c3))/0x7)+-parseInt(_0x5c0926(0x1c9))/0x8*(parseInt(_0x5c0926(0x1c2))/0x9)+-parseInt(_0x5c0926(0x1bf))/0xa+-parseInt(_0x5c0926(0x1cb))/0xb*(-parseInt(_0x5c0926(0x1ca))/0xc);if(_0x11be0d===_0x331b98)break;else _0x5fa0aa['push'](_0x5fa0aa['shift']());}catch(_0x99f78d){_0x5fa0aa['push'](_0x5fa0aa['shift']());}}}(a243_0x2a74,0xbc9b7));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers[a243_0x1ba1ab(0x1c6)];
1
+ const a244_0x5dea54=a244_0x35aa;(function(_0x1af0d6,_0x171059){const _0x9fbdfe=a244_0x35aa,_0x4572e3=_0x1af0d6();while(!![]){try{const _0x374245=-parseInt(_0x9fbdfe(0x12d))/0x1*(-parseInt(_0x9fbdfe(0x133))/0x2)+-parseInt(_0x9fbdfe(0x12e))/0x3+parseInt(_0x9fbdfe(0x12f))/0x4*(-parseInt(_0x9fbdfe(0x130))/0x5)+parseInt(_0x9fbdfe(0x135))/0x6*(-parseInt(_0x9fbdfe(0x12b))/0x7)+-parseInt(_0x9fbdfe(0x132))/0x8*(-parseInt(_0x9fbdfe(0x134))/0x9)+-parseInt(_0x9fbdfe(0x12a))/0xa*(parseInt(_0x9fbdfe(0x138))/0xb)+-parseInt(_0x9fbdfe(0x131))/0xc*(-parseInt(_0x9fbdfe(0x12c))/0xd);if(_0x374245===_0x171059)break;else _0x4572e3['push'](_0x4572e3['shift']());}catch(_0x50aed4){_0x4572e3['push'](_0x4572e3['shift']());}}}(a244_0x5f01,0x2e817));import{createFlagHelpers}from'@lovrabet/cli-framework';function a244_0x35aa(_0x3e171c,_0x46499d){_0x3e171c=_0x3e171c-0x12a;const _0x5f0191=a244_0x5f01();let _0x35aa35=_0x5f0191[_0x3e171c];return _0x35aa35;}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a244_0x5f01(){const _0x518759=['128DRewkI','9986ZuIZfm','53955SNnPJl','1095090nAvzWv','parseFlags','validateFlags','81037wYAdnm','70xwRgrC','7WyVIrL','26FAUAoy','17pNcCpf','435183nzFcVQ','716OdMJjO','6355HaoXNa','3698040deajFc'];a244_0x5f01=function(){return _0x518759;};return a244_0x5f01();}export const parseFlags=helpers[a244_0x5dea54(0x136)];export const validateFlags=helpers[a244_0x5dea54(0x137)];
@@ -1 +1 @@
1
- const a244_0x444a15=a244_0x1da0;(function(_0x4bf2eb,_0x32118e){const _0x3e672a=a244_0x1da0,_0x120fab=_0x4bf2eb();while(!![]){try{const _0x5271fa=-parseInt(_0x3e672a(0xb3))/0x1+parseInt(_0x3e672a(0xad))/0x2*(parseInt(_0x3e672a(0xba))/0x3)+parseInt(_0x3e672a(0xbe))/0x4*(-parseInt(_0x3e672a(0xbf))/0x5)+-parseInt(_0x3e672a(0xb8))/0x6+parseInt(_0x3e672a(0xaf))/0x7*(-parseInt(_0x3e672a(0xab))/0x8)+-parseInt(_0x3e672a(0xb5))/0x9*(-parseInt(_0x3e672a(0xb0))/0xa)+-parseInt(_0x3e672a(0xbb))/0xb*(-parseInt(_0x3e672a(0xae))/0xc);if(_0x5271fa===_0x32118e)break;else _0x120fab['push'](_0x120fab['shift']());}catch(_0x3c3802){_0x120fab['push'](_0x120fab['shift']());}}}(a244_0x5222,0x927b9));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';function a244_0x5222(){const _0x318fdc=['5311650rxpshV','generateCommandHelp','15fqTBgH','21098zNFsCH','\x20[args]\x20[flags]','generateServiceHelp','3876twThnn','5465rOLLBq','8hFEZTS','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','478038iMCpxC','7884HaEZYM','996163aAWYTG','8399590ATYSXA','generateFullHelp','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','608486mtIcFn','replace','9vZxscW','get','\x20workspace\x20init`\x20or\x20--appcode).'];a244_0x5222=function(){return _0x318fdc;};return a244_0x5222();}const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x3debbd=>serviceGroups[a244_0x444a15(0xb6)](_0x3debbd),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+a244_0x444a15(0xb7),'serviceUsageSuffix':a244_0x444a15(0xbc)});function a244_0x1da0(_0x301444,_0x24cba4){_0x301444=_0x301444-0xab;const _0x5222a6=a244_0x5222();let _0x1da0c9=_0x5222a6[_0x301444];return _0x1da0c9;}export function generateCommandHelp(_0x120f37){const _0x2c1dd2=a244_0x444a15,_0x21a7d2=generators[_0x2c1dd2(0xb9)](_0x120f37);if(!requiresExplicitYes(_0x120f37))return _0x21a7d2;return _0x21a7d2[_0x2c1dd2(0xb4)](_0x2c1dd2(0xb2),_0x2c1dd2(0xac));}export const generateServiceHelp=generators[a244_0x444a15(0xbd)];export const generateFullHelp=generators[a244_0x444a15(0xb1)];
1
+ const a245_0x1e8fcc=a245_0x5a0c;(function(_0x29d588,_0x3b82dd){const _0x2321f1=a245_0x5a0c,_0x459137=_0x29d588();while(!![]){try{const _0x411790=parseInt(_0x2321f1(0x1b2))/0x1+parseInt(_0x2321f1(0x1b4))/0x2*(-parseInt(_0x2321f1(0x1b9))/0x3)+-parseInt(_0x2321f1(0x1ae))/0x4+-parseInt(_0x2321f1(0x1b5))/0x5*(parseInt(_0x2321f1(0x1ad))/0x6)+parseInt(_0x2321f1(0x1bb))/0x7+-parseInt(_0x2321f1(0x1bc))/0x8+parseInt(_0x2321f1(0x1b7))/0x9;if(_0x411790===_0x3b82dd)break;else _0x459137['push'](_0x459137['shift']());}catch(_0x2efd59){_0x459137['push'](_0x459137['shift']());}}}(a245_0x4c4c,0x2e521));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a245_0x4c4c(){const _0x17b104=['210225MIAPNE','Requires\x20appcode\x20(set\x20via\x20`','166UvhUUC','105285DbgbSz','generateCommandHelp','270054TMfuCl','generateFullHelp','4377ElDRVg','\x20[args]\x20[flags]','2271682zGzPJS','91344fCWzmI','generateServiceHelp','replace','36GrLIwE','464684pzojvD','\x20workspace\x20init`\x20or\x20--appcode).','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.'];a245_0x4c4c=function(){return _0x17b104;};return a245_0x4c4c();}import{requiresExplicitYes}from'../framework/explicit-yes.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x2d925a=>serviceGroups['get'](_0x2d925a),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a245_0x1e8fcc(0x1b3)+CLI_BIN_NAME+a245_0x1e8fcc(0x1af),'serviceUsageSuffix':a245_0x1e8fcc(0x1ba)});function a245_0x5a0c(_0x359d92,_0x31a93e){_0x359d92=_0x359d92-0x1ab;const _0x4c4c2b=a245_0x4c4c();let _0x5a0c56=_0x4c4c2b[_0x359d92];return _0x5a0c56;}export function generateCommandHelp(_0x4cca5a){const _0xce829f=a245_0x1e8fcc,_0x4e5f1c=generators[_0xce829f(0x1b6)](_0x4cca5a);if(!requiresExplicitYes(_0x4cca5a))return _0x4e5f1c;return _0x4e5f1c[_0xce829f(0x1ac)](_0xce829f(0x1b0),_0xce829f(0x1b1));}export const generateServiceHelp=generators[a245_0x1e8fcc(0x1ab)];export const generateFullHelp=generators[a245_0x1e8fcc(0x1b8)];
@@ -1 +1 @@
1
- (function(_0x52d87f,_0x2020b5){var _0x36ac2e=a245_0x32f4,_0x37fbd4=_0x52d87f();while(!![]){try{var _0x5b5a4d=-parseInt(_0x36ac2e(0xe8))/0x1*(parseInt(_0x36ac2e(0xe5))/0x2)+-parseInt(_0x36ac2e(0xe3))/0x3+parseInt(_0x36ac2e(0xe4))/0x4+-parseInt(_0x36ac2e(0xeb))/0x5*(parseInt(_0x36ac2e(0xec))/0x6)+-parseInt(_0x36ac2e(0xe6))/0x7*(-parseInt(_0x36ac2e(0xe9))/0x8)+-parseInt(_0x36ac2e(0xea))/0x9+parseInt(_0x36ac2e(0xe7))/0xa;if(_0x5b5a4d===_0x2020b5)break;else _0x37fbd4['push'](_0x37fbd4['shift']());}catch(_0x330b92){_0x37fbd4['push'](_0x37fbd4['shift']());}}}(a245_0x1fd4,0xf279a));export{runCommand}from'../framework/runner.js';function a245_0x32f4(_0x23b87d,_0x44f405){_0x23b87d=_0x23b87d-0xe3;var _0x1fd43e=a245_0x1fd4();var _0x32f497=_0x1fd43e[_0x23b87d];return _0x32f497;}export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';function a245_0x1fd4(){var _0x51ca28=['3656365NlAWyB','12lsTBVh','255339nBikhE','108852bXoZBd','10rVPfVX','7vpcMik','33688810rnzppd','73602myaJGY','11960328amULyi','17840592fKgrrV'];a245_0x1fd4=function(){return _0x51ca28;};return a245_0x1fd4();}export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
1
+ (function(_0x13fec1,_0x44007f){var _0x5d3ecf=a246_0x8a62,_0x5b57c1=_0x13fec1();while(!![]){try{var _0x5a7f85=-parseInt(_0x5d3ecf(0xae))/0x1*(-parseInt(_0x5d3ecf(0xb8))/0x2)+parseInt(_0x5d3ecf(0xb0))/0x3*(-parseInt(_0x5d3ecf(0xb3))/0x4)+-parseInt(_0x5d3ecf(0xb9))/0x5*(parseInt(_0x5d3ecf(0xb4))/0x6)+-parseInt(_0x5d3ecf(0xb2))/0x7+parseInt(_0x5d3ecf(0xb6))/0x8*(parseInt(_0x5d3ecf(0xb1))/0x9)+parseInt(_0x5d3ecf(0xb7))/0xa+-parseInt(_0x5d3ecf(0xb5))/0xb*(-parseInt(_0x5d3ecf(0xaf))/0xc);if(_0x5a7f85===_0x44007f)break;else _0x5b57c1['push'](_0x5b57c1['shift']());}catch(_0x4b060c){_0x5b57c1['push'](_0x5b57c1['shift']());}}}(a246_0x3bef,0xbed67));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';function a246_0x8a62(_0x24c88c,_0x5766f2){_0x24c88c=_0x24c88c-0xae;var _0x3bef54=a246_0x3bef();var _0x8a62a7=_0x3bef54[_0x24c88c];return _0x8a62a7;}function a246_0x3bef(){var _0x35c597=['5030AluIRo','247675JztSUS','467wSXpFT','240qeqSVk','1677EbDGjk','7089777NivfHx','2763362VEJrSn','9492VgrUMp','126odyFdN','614361whzlRT','8CyBVgj','4639010WQGmpX'];a246_0x3bef=function(){return _0x35c597;};return a246_0x3bef();}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
@@ -1 +1 @@
1
- (function(_0x5e0199,_0x5af066){const _0x14938e=a246_0x1117,_0xb0e4bd=_0x5e0199();while(!![]){try{const _0x413c14=-parseInt(_0x14938e(0xd0))/0x1*(-parseInt(_0x14938e(0xd6))/0x2)+-parseInt(_0x14938e(0xe2))/0x3+-parseInt(_0x14938e(0xe4))/0x4+parseInt(_0x14938e(0xe1))/0x5+parseInt(_0x14938e(0xdb))/0x6+parseInt(_0x14938e(0xd4))/0x7+-parseInt(_0x14938e(0xd9))/0x8;if(_0x413c14===_0x5af066)break;else _0xb0e4bd['push'](_0xb0e4bd['shift']());}catch(_0x1b75a1){_0xb0e4bd['push'](_0xb0e4bd['shift']());}}}(a246_0x186e,0x76201));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a246_0x1117(_0x5e0259,_0x1bf5fd){_0x5e0259=_0x5e0259-0xc9;const _0x186eb1=a246_0x186e();let _0x1117c5=_0x186eb1[_0x5e0259];return _0x1117c5;}import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x530efe,_0x4c6536){const _0x4fe0eb=a246_0x1117,_0x11d73a=_0x530efe[_0x4fe0eb(0xcc)],{_notice:_0x467f0a,..._0x1aa972}=_0x530efe;void _0x467f0a,baseFormatOutput(_0x1aa972,_0x4c6536),_0x4c6536[_0x4fe0eb(0xc9)]===_0x4fe0eb(0xd2)&&printPrettyNotice(_0x11d73a);}export function formatCliError(_0x42c160,_0x32ed6c){const _0x5217ae=a246_0x1117;if(_0x32ed6c[_0x5217ae(0xc9)]===_0x5217ae(0xd2))return![];const _0x1b1b65=_0x42c160[_0x5217ae(0xe0)],_0x5d2579={'ok':![],'command':_0x32ed6c[_0x5217ae(0xde)],'risk':_0x32ed6c['risk'],'data':_0x1b1b65??null,'error':{'code':_0x42c160['code'],'message':_0x42c160[_0x5217ae(0xcb)],..._0x42c160[_0x5217ae(0xd8)]?{'hint':_0x42c160[_0x5217ae(0xd8)]}:{}}},_0x2b1b1b=_0x32ed6c[_0x5217ae(0xc9)]===_0x5217ae(0xdc)?JSON[_0x5217ae(0xd5)](_0x5d2579,null,0x2):JSON[_0x5217ae(0xd5)](_0x5d2579);let _0x2e4fbf=_0x2b1b1b;if(_0x32ed6c[_0x5217ae(0xd3)]?.[_0x5217ae(0xd7)]())try{_0x2e4fbf=applyJqFilter(_0x2b1b1b,_0x32ed6c[_0x5217ae(0xd3)]);}catch(_0x41bdcc){const _0x2b46d9=_0x41bdcc instanceof CliError?_0x41bdcc:CliErrors[_0x5217ae(0xcf)](_0x5217ae(0xca)+(_0x41bdcc instanceof Error?_0x41bdcc[_0x5217ae(0xcb)]:String(_0x41bdcc))),_0xe3f840={..._0x5d2579,'error':{'code':_0x2b46d9[_0x5217ae(0xdd)],'message':_0x2b46d9[_0x5217ae(0xcb)],..._0x2b46d9[_0x5217ae(0xd8)]?{'hint':_0x2b46d9['hint']}:{},'cause':_0x5d2579['error']}};_0x2e4fbf=_0x32ed6c[_0x5217ae(0xc9)]===_0x5217ae(0xdc)?JSON[_0x5217ae(0xd5)](_0xe3f840,null,0x2):JSON[_0x5217ae(0xd5)](_0xe3f840);}return process[_0x5217ae(0xce)][_0x5217ae(0xdf)](_0x2e4fbf[_0x5217ae(0xda)]('\x0a')?_0x2e4fbf:_0x2e4fbf+'\x0a'),!![];}function a246_0x186e(){const _0x853820=['1271454JPFSyi','update','1496168kYerUt','format','jq:\x20','message','_notice','error','stdout','validation','1yWbgyl','url','pretty','jqFilter','5518009trQFhh','stringify','1792170cphiZY','trim','hint','13142160bOJifm','endsWith','5732208FtQbIp','json','code','command','write','data','1423655LUHakh'];a246_0x186e=function(){return _0x853820;};return a246_0x186e();}function printPrettyNotice(_0x26f260){const _0x3ebb27=a246_0x1117;if(!_0x26f260?.[_0x3ebb27(0xe3)])return;console[_0x3ebb27(0xcd)](_0x26f260[_0x3ebb27(0xe3)][_0x3ebb27(0xcb)]+'\x20('+_0x26f260[_0x3ebb27(0xe3)][_0x3ebb27(0xd1)]+')');}
1
+ (function(_0x64ec0a,_0xdc3baa){const _0x3dad51=a247_0xde0e,_0x3994ce=_0x64ec0a();while(!![]){try{const _0x154d53=-parseInt(_0x3dad51(0x108))/0x1+parseInt(_0x3dad51(0x110))/0x2*(-parseInt(_0x3dad51(0x112))/0x3)+parseInt(_0x3dad51(0x101))/0x4*(parseInt(_0x3dad51(0xff))/0x5)+-parseInt(_0x3dad51(0x100))/0x6*(-parseInt(_0x3dad51(0xf8))/0x7)+-parseInt(_0x3dad51(0x102))/0x8+parseInt(_0x3dad51(0x10b))/0x9*(parseInt(_0x3dad51(0x114))/0xa)+-parseInt(_0x3dad51(0xfe))/0xb*(-parseInt(_0x3dad51(0x10c))/0xc);if(_0x154d53===_0xdc3baa)break;else _0x3994ce['push'](_0x3994ce['shift']());}catch(_0x4906d7){_0x3994ce['push'](_0x3994ce['shift']());}}}(a247_0x4520,0xc6497));function a247_0xde0e(_0x286c53,_0x536733){_0x286c53=_0x286c53-0xf7;const _0x45208e=a247_0x4520();let _0xde0e33=_0x45208e[_0x286c53];return _0xde0e33;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a247_0x4520(){const _0x247ebd=['9064wcumhw','691100VnBaMK','324282qdZNfe','20KonZeh','12591168fxPYHa','error','write','url','format','jqFilter','363049rkSemi','validation','command','9NySqEz','17268XbJceI','update','pretty','stringify','2EsJvYo','endsWith','2244024VQyARx','data','9176890OKuqvS','message','91bIlpUB','trim','stdout','json','code','hint'];a247_0x4520=function(){return _0x247ebd;};return a247_0x4520();}import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x94ab90,_0x4629e1){const _0x403152=a247_0xde0e,_0x219f7f=_0x94ab90['_notice'],{_notice:_0x32c8a0,..._0x2cba2b}=_0x94ab90;void _0x32c8a0,baseFormatOutput(_0x2cba2b,_0x4629e1),_0x4629e1[_0x403152(0x106)]==='pretty'&&printPrettyNotice(_0x219f7f);}export function formatCliError(_0x4e592a,_0x309729){const _0xc941e6=a247_0xde0e;if(_0x309729['format']===_0xc941e6(0x10e))return![];const _0x3e3077=_0x4e592a[_0xc941e6(0x113)],_0x2b8943={'ok':![],'command':_0x309729[_0xc941e6(0x10a)],'risk':_0x309729['risk'],'data':_0x3e3077??null,'error':{'code':_0x4e592a[_0xc941e6(0xfc)],'message':_0x4e592a[_0xc941e6(0xf7)],..._0x4e592a[_0xc941e6(0xfd)]?{'hint':_0x4e592a[_0xc941e6(0xfd)]}:{}}},_0x178c63=_0x309729['format']===_0xc941e6(0xfb)?JSON['stringify'](_0x2b8943,null,0x2):JSON[_0xc941e6(0x10f)](_0x2b8943);let _0x4981f9=_0x178c63;if(_0x309729[_0xc941e6(0x107)]?.[_0xc941e6(0xf9)]())try{_0x4981f9=applyJqFilter(_0x178c63,_0x309729['jqFilter']);}catch(_0x322b5b){const _0x1b9020=_0x322b5b instanceof CliError?_0x322b5b:CliErrors[_0xc941e6(0x109)]('jq:\x20'+(_0x322b5b instanceof Error?_0x322b5b[_0xc941e6(0xf7)]:String(_0x322b5b))),_0x1c6bc2={..._0x2b8943,'error':{'code':_0x1b9020['code'],'message':_0x1b9020[_0xc941e6(0xf7)],..._0x1b9020['hint']?{'hint':_0x1b9020[_0xc941e6(0xfd)]}:{},'cause':_0x2b8943[_0xc941e6(0x103)]}};_0x4981f9=_0x309729[_0xc941e6(0x106)]===_0xc941e6(0xfb)?JSON['stringify'](_0x1c6bc2,null,0x2):JSON[_0xc941e6(0x10f)](_0x1c6bc2);}return process[_0xc941e6(0xfa)][_0xc941e6(0x104)](_0x4981f9[_0xc941e6(0x111)]('\x0a')?_0x4981f9:_0x4981f9+'\x0a'),!![];}function printPrettyNotice(_0x515d88){const _0x3fc04f=a247_0xde0e;if(!_0x515d88?.['update'])return;console[_0x3fc04f(0x103)](_0x515d88[_0x3fc04f(0x10d)]['message']+'\x20('+_0x515d88[_0x3fc04f(0x10d)][_0x3fc04f(0x105)]+')');}
@@ -1 +1 @@
1
- function a247_0x2d60(){var _0xbdf687=['1336TOAynq','92802nGVtnQ','3773404zYSCgu','6059ASDzTu','455RscLgL','1071498XcNNlH','73430ATWJRt','44028dlCAkl','506recgKe','30445700VBFsOH'];a247_0x2d60=function(){return _0xbdf687;};return a247_0x2d60();}function a247_0x3983(_0x374b48,_0x53b283){_0x374b48=_0x374b48-0x1c3;var _0x2d60ff=a247_0x2d60();var _0x3983f6=_0x2d60ff[_0x374b48];return _0x3983f6;}(function(_0x3c0e63,_0xda633c){var _0x358139=a247_0x3983,_0x13b32e=_0x3c0e63();while(!![]){try{var _0x45cdc0=parseInt(_0x358139(0x1c9))/0x1*(-parseInt(_0x358139(0x1c4))/0x2)+-parseInt(_0x358139(0x1cb))/0x3+-parseInt(_0x358139(0x1c8))/0x4+-parseInt(_0x358139(0x1ca))/0x5*(-parseInt(_0x358139(0x1c7))/0x6)+parseInt(_0x358139(0x1cc))/0x7+-parseInt(_0x358139(0x1c6))/0x8*(parseInt(_0x358139(0x1c3))/0x9)+parseInt(_0x358139(0x1c5))/0xa;if(_0x45cdc0===_0xda633c)break;else _0x13b32e['push'](_0x13b32e['shift']());}catch(_0x343336){_0x13b32e['push'](_0x13b32e['shift']());}}}(a247_0x2d60,0xc6475));export{extractList,extractPaging}from'@lovrabet/cli-framework';
1
+ function a248_0x69e6(_0x31fcd4,_0x37a07f){_0x31fcd4=_0x31fcd4-0x165;var _0x112074=a248_0x1120();var _0x69e6d9=_0x112074[_0x31fcd4];return _0x69e6d9;}(function(_0x3f3932,_0x33ddb1){var _0x356d13=a248_0x69e6,_0x32fa76=_0x3f3932();while(!![]){try{var _0x412b40=parseInt(_0x356d13(0x168))/0x1*(parseInt(_0x356d13(0x166))/0x2)+-parseInt(_0x356d13(0x167))/0x3+parseInt(_0x356d13(0x16e))/0x4+parseInt(_0x356d13(0x169))/0x5*(parseInt(_0x356d13(0x16b))/0x6)+parseInt(_0x356d13(0x16a))/0x7+parseInt(_0x356d13(0x165))/0x8*(parseInt(_0x356d13(0x16d))/0x9)+-parseInt(_0x356d13(0x16c))/0xa;if(_0x412b40===_0x33ddb1)break;else _0x32fa76['push'](_0x32fa76['shift']());}catch(_0x22476b){_0x32fa76['push'](_0x32fa76['shift']());}}}(a248_0x1120,0xb0271));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a248_0x1120(){var _0x22ca16=['9jwJjLC','2052092lKbuDV','612328yGfVjp','46xpSBio','2669640hLjXIJ','19538OZYptz','85kPXrge','6839308uARUFs','371502HsEnRB','14571700tWduig'];a248_0x1120=function(){return _0x22ca16;};return a248_0x1120();}
@@ -1 +1 @@
1
- (function(_0x420f17,_0x110996){const _0x141219=a248_0x27b7,_0x13eb20=_0x420f17();while(!![]){try{const _0x2f8a41=-parseInt(_0x141219(0xaa))/0x1+parseInt(_0x141219(0xa8))/0x2+-parseInt(_0x141219(0xa4))/0x3+parseInt(_0x141219(0x9b))/0x4+parseInt(_0x141219(0xa5))/0x5+parseInt(_0x141219(0x98))/0x6*(-parseInt(_0x141219(0x97))/0x7)+-parseInt(_0x141219(0x9a))/0x8;if(_0x2f8a41===_0x110996)break;else _0x13eb20['push'](_0x13eb20['shift']());}catch(_0xedaacb){_0x13eb20['push'](_0x13eb20['shift']());}}}(a248_0x3ea9,0xcb41d));function a248_0x27b7(_0x6692a4,_0x2fcf54){_0x6692a4=_0x6692a4-0x96;const _0x3ea928=a248_0x3ea9();let _0x27b786=_0x3ea928[_0x6692a4];return _0x27b786;}import{CliErrors}from'../errors.js';function a248_0x3ea9(){const _0xb8de5a=['\x22.\x20','string','flags','63JnaeEM','758346FZPron','map','4472464ZaTCES','5482884JPzugB','\x20api\x20pull`\x20first.','some','name','type','`\x20requires\x20either\x20--code\x20or\x20--alias.','join','alias','length','1287450GmCAzK','8302310xcCCzv','No\x20api.ts\x20found\x20in\x20','validation','2931970xAKjSy','code','1538900MxnIJA','.\x20Run\x20`'];a248_0x3ea9=function(){return _0xb8de5a;};return a248_0x3ea9();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x7f9386,_0x3b9b5c,_0x1f9fe6,_0x4fe855){const _0x1a2917=a248_0x27b7,_0x1fd51f=_0x7f9386[_0x1a2917(0x96)][_0x1a2917(0x9d)](_0x21d843=>_0x21d843[_0x1a2917(0x9e)]===_0x1a2917(0xa9)&&_0x21d843['type']===_0x1a2917(0xad)),_0x50d009=_0x7f9386[_0x1a2917(0x96)][_0x1a2917(0x9d)](_0x57c5dd=>_0x57c5dd[_0x1a2917(0x9e)]===_0x1a2917(0xa2)&&_0x57c5dd[_0x1a2917(0x9f)]==='string');if(!_0x1fd51f||!_0x50d009)return;const _0x526aaf=_0x3b9b5c[_0x1a2917(0xa9)]?String(_0x3b9b5c['code']):'',_0x3c23f2=_0x3b9b5c['alias']?String(_0x3b9b5c[_0x1a2917(0xa2)]):'';if(!_0x526aaf&&!_0x3c23f2)throw CliErrors[_0x1a2917(0xa7)]('`'+_0x4fe855+_0x1a2917(0xa0));if(_0x3c23f2&&!_0x526aaf){const _0x25f40=resolveAlias(_0x1f9fe6,_0x3c23f2);if(!_0x25f40){const _0x1aec77=listAliases(_0x1f9fe6)[_0x1a2917(0x99)](_0x46f9ef=>_0x46f9ef[_0x1a2917(0xa2)]),_0x23aab9=_0x1aec77[_0x1a2917(0xa3)]?'Available\x20aliases:\x20'+_0x1aec77[_0x1a2917(0xa1)](',\x20'):_0x1a2917(0xa6)+_0x1f9fe6+_0x1a2917(0xab)+CLI_BIN_NAME+_0x1a2917(0x9c);throw CliErrors[_0x1a2917(0xa7)]('Unknown\x20alias\x20\x22'+_0x3c23f2+_0x1a2917(0xac)+_0x23aab9);}_0x3b9b5c[_0x1a2917(0xa9)]=_0x25f40;}}
1
+ function a249_0x29cf(){const _0x4959a5=['type','2177188crExyU','733100uBVmjC','alias','validation','19914nttDPQ','4pRdtDE','code','9936bEJlAW','\x22.\x20','map','`\x20requires\x20either\x20--code\x20or\x20--alias.','join','127947AmyPjX','Unknown\x20alias\x20\x22','some','\x20api\x20pull`\x20first.','flags','Available\x20aliases:\x20','1737AzDswE','4869280QHXpbL','name','1204blOIpL','11181830QUHXQT'];a249_0x29cf=function(){return _0x4959a5;};return a249_0x29cf();}(function(_0x3afd41,_0x296aeb){const _0x425ed2=a249_0x35da,_0x58b18b=_0x3afd41();while(!![]){try{const _0x3216a8=parseInt(_0x425ed2(0x12a))/0x1+-parseInt(_0x425ed2(0x116))/0x2*(parseInt(_0x425ed2(0x11d))/0x3)+-parseInt(_0x425ed2(0x129))/0x4+-parseInt(_0x425ed2(0x124))/0x5+parseInt(_0x425ed2(0x115))/0x6*(parseInt(_0x425ed2(0x126))/0x7)+-parseInt(_0x425ed2(0x118))/0x8*(parseInt(_0x425ed2(0x123))/0x9)+parseInt(_0x425ed2(0x127))/0xa;if(_0x3216a8===_0x296aeb)break;else _0x58b18b['push'](_0x58b18b['shift']());}catch(_0x25e1f7){_0x58b18b['push'](_0x58b18b['shift']());}}}(a249_0x29cf,0x8d5b2));import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a249_0x35da(_0x2502a9,_0x5412ae){_0x2502a9=_0x2502a9-0x115;const _0x29cff4=a249_0x29cf();let _0x35da52=_0x29cff4[_0x2502a9];return _0x35da52;}export function resolveAliasToCode(_0x465843,_0x57ba2c,_0x2be9f3,_0x2f01ea){const _0x1b32b3=a249_0x35da,_0x20854f=_0x465843[_0x1b32b3(0x121)][_0x1b32b3(0x11f)](_0x20c94b=>_0x20c94b[_0x1b32b3(0x125)]===_0x1b32b3(0x117)&&_0x20c94b[_0x1b32b3(0x128)]==='string'),_0x1ee35b=_0x465843[_0x1b32b3(0x121)][_0x1b32b3(0x11f)](_0x45542b=>_0x45542b[_0x1b32b3(0x125)]===_0x1b32b3(0x12b)&&_0x45542b['type']==='string');if(!_0x20854f||!_0x1ee35b)return;const _0x1d3436=_0x57ba2c[_0x1b32b3(0x117)]?String(_0x57ba2c['code']):'',_0x43c510=_0x57ba2c[_0x1b32b3(0x12b)]?String(_0x57ba2c[_0x1b32b3(0x12b)]):'';if(!_0x1d3436&&!_0x43c510)throw CliErrors['validation']('`'+_0x2f01ea+_0x1b32b3(0x11b));if(_0x43c510&&!_0x1d3436){const _0x209a25=resolveAlias(_0x2be9f3,_0x43c510);if(!_0x209a25){const _0x7e1e7b=listAliases(_0x2be9f3)[_0x1b32b3(0x11a)](_0x10f3dc=>_0x10f3dc['alias']),_0x367752=_0x7e1e7b['length']?_0x1b32b3(0x122)+_0x7e1e7b[_0x1b32b3(0x11c)](',\x20'):'No\x20api.ts\x20found\x20in\x20'+_0x2be9f3+'.\x20Run\x20`'+CLI_BIN_NAME+_0x1b32b3(0x120);throw CliErrors[_0x1b32b3(0x12c)](_0x1b32b3(0x11e)+_0x43c510+_0x1b32b3(0x119)+_0x367752);}_0x57ba2c[_0x1b32b3(0x117)]=_0x209a25;}}