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

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 (346) hide show
  1. package/README.md +75 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +0 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.d.ts +2 -0
  52. package/lib/commands/common/flags.js +1 -1
  53. package/lib/commands/common/local-file.js +1 -1
  54. package/lib/commands/common/validate.js +1 -1
  55. package/lib/commands/config/delete.js +1 -1
  56. package/lib/commands/config/get.js +1 -1
  57. package/lib/commands/config/index.js +1 -1
  58. package/lib/commands/config/init.d.ts +3 -1
  59. package/lib/commands/config/init.js +1 -1
  60. package/lib/commands/config/list.js +1 -1
  61. package/lib/commands/config/set.js +1 -1
  62. package/lib/commands/config/shared.js +1 -1
  63. package/lib/commands/dataset/business-group-update.js +1 -1
  64. package/lib/commands/dataset/business-groups.js +1 -1
  65. package/lib/commands/dataset/capability.js +1 -1
  66. package/lib/commands/dataset/delete.js +1 -1
  67. package/lib/commands/dataset/detail.js +1 -1
  68. package/lib/commands/dataset/extend-update.js +1 -1
  69. package/lib/commands/dataset/field-restore.js +1 -1
  70. package/lib/commands/dataset/field-update.js +1 -1
  71. package/lib/commands/dataset/generate.js +1 -1
  72. package/lib/commands/dataset/index.js +1 -1
  73. package/lib/commands/dataset/list.js +1 -1
  74. package/lib/commands/dataset/operations.js +1 -1
  75. package/lib/commands/dataset/relation-audit.js +1 -1
  76. package/lib/commands/dataset/relation-create.js +1 -1
  77. package/lib/commands/dataset/relation-delete.js +1 -1
  78. package/lib/commands/dataset/relation-shared.js +1 -1
  79. package/lib/commands/dataset/relation-update.js +1 -1
  80. package/lib/commands/dataset/relations.js +1 -1
  81. package/lib/commands/dataset/rename.js +1 -1
  82. package/lib/commands/dataset/restore.js +1 -1
  83. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/auto-sync.js +1 -1
  103. package/lib/commands/deployment/index.js +1 -1
  104. package/lib/commands/deployment/sync.js +1 -1
  105. package/lib/commands/doctor.js +1 -1
  106. package/lib/commands/file/index.js +1 -1
  107. package/lib/commands/issue/index.js +1 -1
  108. package/lib/commands/issue/nudge.js +1 -1
  109. package/lib/commands/issue/report.js +1 -1
  110. package/lib/commands/issue/shared.js +1 -1
  111. package/lib/commands/kb/create.js +1 -1
  112. package/lib/commands/kb/delete.js +1 -1
  113. package/lib/commands/kb/detail.js +1 -1
  114. package/lib/commands/kb/index.js +1 -1
  115. package/lib/commands/kb/list.js +1 -1
  116. package/lib/commands/kb/search.js +1 -1
  117. package/lib/commands/kb/shared.js +1 -1
  118. package/lib/commands/kb/update.js +1 -1
  119. package/lib/commands/logs/index.js +1 -1
  120. package/lib/commands/menu/asset-update.js +1 -1
  121. package/lib/commands/menu/delete.js +1 -1
  122. package/lib/commands/menu/external-link-create.js +1 -1
  123. package/lib/commands/menu/external-link-update.js +1 -1
  124. package/lib/commands/menu/group-create.js +1 -1
  125. package/lib/commands/menu/group-update.js +1 -1
  126. package/lib/commands/menu/index.js +1 -1
  127. package/lib/commands/menu/list.js +1 -1
  128. package/lib/commands/menu/move.js +1 -1
  129. package/lib/commands/menu/regroup-start.js +1 -1
  130. package/lib/commands/menu/rename.js +1 -1
  131. package/lib/commands/menu/shared/compare-table.js +1 -1
  132. package/lib/commands/menu/shared/delete-plan.js +1 -1
  133. package/lib/commands/menu/shared/facts.js +1 -1
  134. package/lib/commands/menu/shared/index.js +1 -1
  135. package/lib/commands/menu/shared/inquirer.js +1 -1
  136. package/lib/commands/menu/shared/local-pages.js +1 -1
  137. package/lib/commands/menu/shared/logic.js +1 -1
  138. package/lib/commands/menu/shared/mutations.js +1 -1
  139. package/lib/commands/menu/shared/service.js +1 -1
  140. package/lib/commands/menu/shared/sync-core.js +1 -1
  141. package/lib/commands/menu/shared/update-core.js +1 -1
  142. package/lib/commands/menu/shared/valid-url.js +1 -1
  143. package/lib/commands/menu/sync.js +1 -1
  144. package/lib/commands/menu/visibility-update.js +1 -1
  145. package/lib/commands/notification/config-create.js +1 -1
  146. package/lib/commands/notification/config-delete.js +1 -1
  147. package/lib/commands/notification/config-list.js +1 -1
  148. package/lib/commands/notification/config-update.js +1 -1
  149. package/lib/commands/notification/index.js +1 -1
  150. package/lib/commands/notification/shared.js +1 -1
  151. package/lib/commands/ocr/index.js +1 -1
  152. package/lib/commands/page/create.js +1 -1
  153. package/lib/commands/page/custom/detail.js +1 -1
  154. package/lib/commands/page/custom/list.js +1 -1
  155. package/lib/commands/page/custom/publish.js +1 -1
  156. package/lib/commands/page/custom/shared.js +1 -1
  157. package/lib/commands/page/custom/syntax.js +1 -1
  158. package/lib/commands/page/custom/template.js +1 -1
  159. package/lib/commands/page/custom/update.js +1 -1
  160. package/lib/commands/page/data-list-status.js +1 -1
  161. package/lib/commands/page/generate-start.js +1 -1
  162. package/lib/commands/page/generate-status.js +1 -1
  163. package/lib/commands/page/index.js +1 -1
  164. package/lib/commands/page/pull.js +1 -1
  165. package/lib/commands/page/push.js +1 -1
  166. package/lib/commands/page/relation-audit.js +1 -1
  167. package/lib/commands/page/restore.js +1 -1
  168. package/lib/commands/page/shared.js +1 -1
  169. package/lib/commands/page/sync.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.d.ts +1 -0
  173. package/lib/commands/project/create/main.js +1 -1
  174. package/lib/commands/project/create/materialize-project-template.js +1 -1
  175. package/lib/commands/project/create/project-name.js +1 -1
  176. package/lib/commands/project/create/project-template-archive.js +1 -1
  177. package/lib/commands/project/create/project-template-path.js +1 -1
  178. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  179. package/lib/commands/project/create/use-format-code.js +1 -1
  180. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  181. package/lib/commands/project/domain-routing-sync.d.ts +2 -0
  182. package/lib/commands/project/domain-routing-sync.js +1 -0
  183. package/lib/commands/project/index.js +1 -1
  184. package/lib/commands/project/upgrade.js +1 -1
  185. package/lib/commands/registry.js +1 -1
  186. package/lib/commands/role/delete.js +1 -1
  187. package/lib/commands/role/detail.js +1 -1
  188. package/lib/commands/role/index.js +1 -1
  189. package/lib/commands/role/list.js +1 -1
  190. package/lib/commands/role/shared.js +1 -1
  191. package/lib/commands/role/update.js +1 -1
  192. package/lib/commands/role/user-add.js +1 -1
  193. package/lib/commands/role/user-remove.js +1 -1
  194. package/lib/commands/role/user-resolve.js +1 -1
  195. package/lib/commands/rule/get.d.ts +2 -0
  196. package/lib/commands/rule/get.js +1 -0
  197. package/lib/commands/rule/index.d.ts +2 -0
  198. package/lib/commands/rule/index.js +1 -0
  199. package/lib/commands/rule/list.d.ts +2 -0
  200. package/lib/commands/rule/list.js +1 -0
  201. package/lib/commands/rule/set.d.ts +2 -0
  202. package/lib/commands/rule/set.js +1 -0
  203. package/lib/commands/rule/shared.d.ts +43 -0
  204. package/lib/commands/rule/shared.js +1 -0
  205. package/lib/commands/run/index.js +1 -1
  206. package/lib/commands/schema.js +1 -1
  207. package/lib/commands/sql/create.js +1 -1
  208. package/lib/commands/sql/delete.js +1 -1
  209. package/lib/commands/sql/detail.js +1 -1
  210. package/lib/commands/sql/exec.js +1 -1
  211. package/lib/commands/sql/index.js +1 -1
  212. package/lib/commands/sql/list.js +1 -1
  213. package/lib/commands/sql/pull.js +1 -1
  214. package/lib/commands/sql/push.js +1 -1
  215. package/lib/commands/sql/shared.js +1 -1
  216. package/lib/commands/sql/status.js +1 -1
  217. package/lib/commands/sql/validate.js +1 -1
  218. package/lib/commands/task/index.js +1 -1
  219. package/lib/commands/task/status.js +1 -1
  220. package/lib/commands/tenant/index.js +1 -1
  221. package/lib/commands/tenant/members-list.js +1 -1
  222. package/lib/commands/tenant/shared.js +1 -1
  223. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  224. package/lib/commands/user-account/index.js +1 -1
  225. package/lib/commands/workspace/add.js +1 -1
  226. package/lib/commands/workspace/index.js +1 -1
  227. package/lib/commands/workspace/remove.js +1 -1
  228. package/lib/config/deployment-sync.js +1 -1
  229. package/lib/config/domain-config.d.ts +38 -2
  230. package/lib/config/domain-config.js +1 -1
  231. package/lib/config/project-domain-routing.d.ts +27 -0
  232. package/lib/config/project-domain-routing.js +1 -0
  233. package/lib/config/schema.d.ts +1 -1
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.d.ts +10 -6
  239. package/lib/constant/domain.js +1 -1
  240. package/lib/constant/env.js +1 -1
  241. package/lib/constant/output.js +1 -1
  242. package/lib/constant/paths.js +1 -1
  243. package/lib/constant/region.d.ts +4 -1
  244. package/lib/constant/region.js +1 -1
  245. package/lib/constant/risk.js +1 -1
  246. package/lib/constant/routing-profile.d.ts +43 -49
  247. package/lib/constant/routing-profile.js +1 -1
  248. package/lib/context/app-resolver.js +1 -1
  249. package/lib/context/auth-resolver.js +1 -1
  250. package/lib/context/config-loader.js +1 -1
  251. package/lib/context.d.ts +2 -0
  252. package/lib/context.js +1 -1
  253. package/lib/core/alias-resolver.js +1 -1
  254. package/lib/core/api-client.d.ts +37 -0
  255. package/lib/core/api-client.js +1 -1
  256. package/lib/core/bff/config.js +1 -1
  257. package/lib/core/bff/file-system.js +1 -1
  258. package/lib/core/bff/hash.js +1 -1
  259. package/lib/core/bff/lock.js +1 -1
  260. package/lib/core/bff/utils.js +1 -1
  261. package/lib/core/db-resolver.js +1 -1
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/sql-index-auditor.js +1 -1
  266. package/lib/core/sql-sync/config.js +1 -1
  267. package/lib/core/sql-sync/file-system.js +1 -1
  268. package/lib/core/sql-sync/hash.js +1 -1
  269. package/lib/core/sql-sync/lock.js +1 -1
  270. package/lib/core/sql-sync/utils.js +1 -1
  271. package/lib/core/sql-validator.js +1 -1
  272. package/lib/errors.js +1 -1
  273. package/lib/framework/build-all-flags.js +1 -1
  274. package/lib/framework/error-output.js +1 -1
  275. package/lib/framework/explicit-yes.js +1 -1
  276. package/lib/framework/flags.js +1 -1
  277. package/lib/framework/help.js +1 -1
  278. package/lib/framework/index.js +1 -1
  279. package/lib/framework/output.js +1 -1
  280. package/lib/framework/response.js +1 -1
  281. package/lib/framework/runner-alias.js +1 -1
  282. package/lib/framework/runner.js +1 -1
  283. package/lib/framework/schema-export.js +1 -1
  284. package/lib/framework/types.d.ts +0 -1
  285. package/lib/framework/types.js +1 -1
  286. package/lib/generated/build-info.d.ts +4 -4
  287. package/lib/generated/build-info.js +1 -1
  288. package/lib/generated/official-routing.d.ts +83 -0
  289. package/lib/generated/official-routing.js +1 -0
  290. package/lib/generated/routing-contract.d.ts +9 -0
  291. package/lib/generated/routing-contract.js +1 -0
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +0 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.js +1 -1
  317. package/lib/utils/entity-with-id.js +1 -1
  318. package/lib/utils/file-utils.js +1 -1
  319. package/lib/utils/guides-cdn.js +1 -1
  320. package/lib/utils/http-client.js +1 -1
  321. package/lib/utils/is-non-interactive.js +1 -1
  322. package/lib/utils/logger.js +1 -1
  323. package/lib/utils/params.js +1 -1
  324. package/lib/utils/platform.js +1 -1
  325. package/lib/utils/sleep.js +1 -1
  326. package/lib/utils/template-replacer.js +1 -1
  327. package/lib/utils/update-notice.js +1 -1
  328. package/lib/utils/version.js +1 -1
  329. package/lib/utils/with-active-cookie.js +1 -1
  330. package/lib/utils/write-cli-side-channel.js +1 -1
  331. package/package.json +2 -1
  332. package/skills/rabetbase/SKILL.md +16 -13
  333. package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
  334. package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
  335. package/skills/rabetbase/references/rabetbase-config.md +3 -6
  336. package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
  337. package/skills/rabetbase/references/rabetbase-init.md +32 -10
  338. package/skills/rabetbase/references/rabetbase-kb.md +7 -7
  339. package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
  340. package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
  341. package/skills/rabetbase/references/rabetbase-rule.md +49 -0
  342. package/skills/rabetbase.manifest.json +5 -3
  343. package/lib/config/project-routing.d.ts +0 -30
  344. package/lib/config/project-routing.js +0 -1
  345. package/lib/core/kb-search-client.d.ts +0 -30
  346. package/lib/core/kb-search-client.js +0 -1
@@ -1 +1 @@
1
- function a237_0x1bc5(_0x34f91a,_0x1725d3){_0x34f91a=_0x34f91a-0xae;const _0x42bd5e=a237_0x42bd();let _0x1bc53b=_0x42bd5e[_0x34f91a];return _0x1bc53b;}(function(_0x571b3f,_0x80154d){const _0x2f0506=a237_0x1bc5,_0x1af716=_0x571b3f();while(!![]){try{const _0xfad7b9=-parseInt(_0x2f0506(0xb6))/0x1*(-parseInt(_0x2f0506(0xca))/0x2)+parseInt(_0x2f0506(0xc9))/0x3*(parseInt(_0x2f0506(0xb4))/0x4)+parseInt(_0x2f0506(0xba))/0x5*(-parseInt(_0x2f0506(0xb5))/0x6)+parseInt(_0x2f0506(0xb2))/0x7*(parseInt(_0x2f0506(0xbb))/0x8)+parseInt(_0x2f0506(0xc3))/0x9*(-parseInt(_0x2f0506(0xc6))/0xa)+parseInt(_0x2f0506(0xc4))/0xb*(-parseInt(_0x2f0506(0xcc))/0xc)+parseInt(_0x2f0506(0xc0))/0xd*(parseInt(_0x2f0506(0xaf))/0xe);if(_0xfad7b9===_0x80154d)break;else _0x1af716['push'](_0x1af716['shift']());}catch(_0x5880c2){_0x1af716['push'](_0x1af716['shift']());}}}(a237_0x42bd,0x98638));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a237_0x42bd(){const _0x20ef7b=['11197650YSBNtM','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','dbName','123EsLwYm','20468zZrzQZ','\x22\x20matches\x20multiple\x20databases:\x20','12hSnmdU','toLowerCase','98amUDVN','includes','\x22.\x20Available:\x20','1477xyQHaO','\x22\x20under\x20app\x20\x22','25244kBmjIg','2184822njjqKe','11BPfZse','join','map','isNaN','5aGhcPp','10776ZBEvqh','length','set','db-','.\x20Be\x20more\x20specific.','3984747DYXLhL','dbId','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','9HTCgzd','7623979naVAlU','find'];a237_0x42bd=function(){return _0x20ef7b;};return a237_0x42bd();}export async function listDatabases(_0x46ca35){const _0x2880d2=a237_0x1bc5;if(cache['has'](_0x46ca35))return cache['get'](_0x46ca35);const _0x466601=await listDatasets(_0x46ca35),_0x3862fc=new Map();for(const _0x51454e of _0x466601){const _0x4a5aa3=_0x51454e['dbtableConfig'];_0x4a5aa3?.[_0x2880d2(0xc1)]!=null&&_0x3862fc['set'](_0x4a5aa3[_0x2880d2(0xc1)],_0x4a5aa3[_0x2880d2(0xc8)]??_0x2880d2(0xbe)+_0x4a5aa3[_0x2880d2(0xc1)]);}const _0x40886e=[..._0x3862fc['entries']()]['map'](([_0x5e17a1,_0x49fbf4])=>({'dbId':_0x5e17a1,'dbName':_0x49fbf4}));return cache[_0x2880d2(0xbd)](_0x46ca35,_0x40886e),_0x40886e;}export async function resolveDb(_0x47835c,_0x12134e){const _0x69f420=a237_0x1bc5,_0x29496d=await listDatabases(_0x47835c);if(_0x29496d['length']===0x0)return{'resolved':[],'error':_0x69f420(0xc2)+_0x47835c+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x12134e)return{'resolved':_0x29496d};const _0x56530a=Number(_0x12134e);if(!Number[_0x69f420(0xb9)](_0x56530a)){const _0x3f9f1e=_0x29496d[_0x69f420(0xc5)](_0x11e638=>_0x11e638[_0x69f420(0xc1)]===_0x56530a);if(_0x3f9f1e)return{'resolved':[_0x3f9f1e]};}const _0x180fd1=_0x12134e[_0x69f420(0xae)](),_0x2ccd44=_0x29496d['filter'](_0x3a677=>_0x3a677[_0x69f420(0xc8)][_0x69f420(0xae)]()[_0x69f420(0xb0)](_0x180fd1));if(_0x2ccd44[_0x69f420(0xbc)]>0x0)return{'resolved':_0x2ccd44};const _0x244229=_0x29496d[_0x69f420(0xb8)](_0x3fcc1d=>_0x3fcc1d[_0x69f420(0xc8)]+'\x20('+_0x3fcc1d[_0x69f420(0xc1)]+')')[_0x69f420(0xb7)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x12134e+_0x69f420(0xb3)+_0x47835c+_0x69f420(0xb1)+_0x244229+_0x69f420(0xc7)};}export async function resolveOneDb(_0x30270f,_0x38fa45){const _0x3fc810=a237_0x1bc5,{resolved:_0x463dbd,error:_0x59b456}=await resolveDb(_0x30270f,_0x38fa45);if(_0x59b456)return{'db':null,'error':_0x59b456};if(_0x463dbd[_0x3fc810(0xbc)]===0x1)return{'db':_0x463dbd[0x0]};if(!_0x38fa45){const _0x4d2718=_0x463dbd[_0x3fc810(0xb8)](_0xc7e559=>_0xc7e559[_0x3fc810(0xc8)]+'\x20('+_0xc7e559['dbId']+')')['join'](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x4d2718};}const _0x7a06fc=_0x463dbd[_0x3fc810(0xb8)](_0x2cbc50=>_0x2cbc50[_0x3fc810(0xc8)]+'\x20('+_0x2cbc50[_0x3fc810(0xc1)]+')')[_0x3fc810(0xb7)](',\x20');return{'db':null,'error':'\x22'+_0x38fa45+_0x3fc810(0xcb)+_0x7a06fc+_0x3fc810(0xbf)};}export async function getDbName(_0x25f969,_0x33a7b7){const _0xcd47db=a237_0x1bc5,_0x1860da=await listDatabases(_0x25f969);return _0x1860da[_0xcd47db(0xc5)](_0x19298e=>_0x19298e[_0xcd47db(0xc1)]===_0x33a7b7)?.[_0xcd47db(0xc8)];}
1
+ function a243_0x3580(_0x1c8ffd,_0x5c4faa){_0x1c8ffd=_0x1c8ffd-0xac;const _0x5a2450=a243_0x5a24();let _0x3580f9=_0x5a2450[_0x1c8ffd];return _0x3580f9;}(function(_0x15bff8,_0x29913c){const _0x13bec4=a243_0x3580,_0x59ac73=_0x15bff8();while(!![]){try{const _0x544171=parseInt(_0x13bec4(0xc7))/0x1*(-parseInt(_0x13bec4(0xb7))/0x2)+parseInt(_0x13bec4(0xaf))/0x3*(parseInt(_0x13bec4(0xbe))/0x4)+-parseInt(_0x13bec4(0xc4))/0x5*(parseInt(_0x13bec4(0xb6))/0x6)+-parseInt(_0x13bec4(0xbf))/0x7*(-parseInt(_0x13bec4(0xc8))/0x8)+-parseInt(_0x13bec4(0xb8))/0x9+-parseInt(_0x13bec4(0xb9))/0xa+-parseInt(_0x13bec4(0xc6))/0xb*(-parseInt(_0x13bec4(0xc2))/0xc);if(_0x544171===_0x29913c)break;else _0x59ac73['push'](_0x59ac73['shift']());}catch(_0x3b6501){_0x59ac73['push'](_0x59ac73['shift']());}}}(a243_0x5a24,0x8dd41));import{listDatasets}from'../core/api-client.js';function a243_0x5a24(){const _0x52ab1b=['set','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','toLowerCase','entries','length','join','2034rMBWud','4HQbeXW','65916WGMhWt','10321830XyxtkQ','\x22\x20matches\x20multiple\x20databases:\x20','dbId','includes','dbName','1670892AVyjrO','875GIuUbb','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','.\x20Be\x20more\x20specific.','38028WkGuzz','filter','15085kinkPB','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','6094BiOFLn','265624SxRLnu','37336MyMMcb','db-','map','\x22\x20under\x20app\x20\x22','find','6uruFqV'];a243_0x5a24=function(){return _0x52ab1b;};return a243_0x5a24();}const cache=new Map();export async function listDatabases(_0x4bc8ea){const _0x51b583=a243_0x3580;if(cache['has'](_0x4bc8ea))return cache['get'](_0x4bc8ea);const _0x1b0b54=await listDatasets(_0x4bc8ea),_0x2dc08f=new Map();for(const _0x1e2d28 of _0x1b0b54){const _0x394ed9=_0x1e2d28['dbtableConfig'];_0x394ed9?.[_0x51b583(0xbb)]!=null&&_0x2dc08f[_0x51b583(0xb0)](_0x394ed9['dbId'],_0x394ed9[_0x51b583(0xbd)]??_0x51b583(0xc9)+_0x394ed9[_0x51b583(0xbb)]);}const _0xa067d3=[..._0x2dc08f[_0x51b583(0xb3)]()][_0x51b583(0xac)](([_0x29c2d1,_0x3a1d6c])=>({'dbId':_0x29c2d1,'dbName':_0x3a1d6c}));return cache[_0x51b583(0xb0)](_0x4bc8ea,_0xa067d3),_0xa067d3;}export async function resolveDb(_0x5495f0,_0x47904c){const _0x250c36=a243_0x3580,_0x583a86=await listDatabases(_0x5495f0);if(_0x583a86[_0x250c36(0xb4)]===0x0)return{'resolved':[],'error':_0x250c36(0xc0)+_0x5495f0+_0x250c36(0xc5)};if(!_0x47904c)return{'resolved':_0x583a86};const _0x3ecad5=Number(_0x47904c);if(!Number['isNaN'](_0x3ecad5)){const _0xb131c3=_0x583a86[_0x250c36(0xae)](_0xbccdd6=>_0xbccdd6['dbId']===_0x3ecad5);if(_0xb131c3)return{'resolved':[_0xb131c3]};}const _0x16ee0a=_0x47904c[_0x250c36(0xb2)](),_0x267076=_0x583a86[_0x250c36(0xc3)](_0x7f80de=>_0x7f80de[_0x250c36(0xbd)][_0x250c36(0xb2)]()[_0x250c36(0xbc)](_0x16ee0a));if(_0x267076[_0x250c36(0xb4)]>0x0)return{'resolved':_0x267076};const _0x3cb6c8=_0x583a86[_0x250c36(0xac)](_0x4f7da7=>_0x4f7da7[_0x250c36(0xbd)]+'\x20('+_0x4f7da7['dbId']+')')[_0x250c36(0xb5)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x47904c+_0x250c36(0xad)+_0x5495f0+'\x22.\x20Available:\x20'+_0x3cb6c8+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x4668ab,_0x4359fd){const _0x495530=a243_0x3580,{resolved:_0x4758b2,error:_0x5c25e2}=await resolveDb(_0x4668ab,_0x4359fd);if(_0x5c25e2)return{'db':null,'error':_0x5c25e2};if(_0x4758b2['length']===0x1)return{'db':_0x4758b2[0x0]};if(!_0x4359fd){const _0x39365d=_0x4758b2['map'](_0x202ae4=>_0x202ae4[_0x495530(0xbd)]+'\x20('+_0x202ae4['dbId']+')')['join'](',\x20');return{'db':null,'error':_0x495530(0xb1)+_0x39365d};}const _0x462c16=_0x4758b2[_0x495530(0xac)](_0x1e53c9=>_0x1e53c9[_0x495530(0xbd)]+'\x20('+_0x1e53c9[_0x495530(0xbb)]+')')[_0x495530(0xb5)](',\x20');return{'db':null,'error':'\x22'+_0x4359fd+_0x495530(0xba)+_0x462c16+_0x495530(0xc1)};}export async function getDbName(_0x2903f0,_0x5e84bf){const _0x19c573=a243_0x3580,_0x532e91=await listDatabases(_0x2903f0);return _0x532e91[_0x19c573(0xae)](_0x2203d9=>_0x2203d9[_0x19c573(0xbb)]===_0x5e84bf)?.[_0x19c573(0xbd)];}
@@ -1 +1 @@
1
- (function(_0x2b66e6,_0x49cc00){const _0x2589e6=a239_0x3c1e,_0x2d918d=_0x2b66e6();while(!![]){try{const _0x484562=-parseInt(_0x2589e6(0x1eb))/0x1+-parseInt(_0x2589e6(0x1ec))/0x2+-parseInt(_0x2589e6(0x1ef))/0x3*(parseInt(_0x2589e6(0x1f0))/0x4)+parseInt(_0x2589e6(0x1e7))/0x5+parseInt(_0x2589e6(0x1e8))/0x6*(parseInt(_0x2589e6(0x1ea))/0x7)+-parseInt(_0x2589e6(0x1f4))/0x8*(parseInt(_0x2589e6(0x1e9))/0x9)+parseInt(_0x2589e6(0x1f1))/0xa*(parseInt(_0x2589e6(0x1ee))/0xb);if(_0x484562===_0x49cc00)break;else _0x2d918d['push'](_0x2d918d['shift']());}catch(_0x459fdb){_0x2d918d['push'](_0x2d918d['shift']());}}}(a239_0x1dd9,0x69bd0));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x14ce57,_0x391e43=process['cwd']()){const _0xd7e959=a239_0x3c1e,_0x146f87=resolve(_0x391e43),_0x4abd6c=join(_0x146f87,_0xd7e959(0x1e5),_0xd7e959(0x1f3));return{'projectRoot':_0x146f87,'pagesBaseDir':_0x4abd6c,'appPagesDir':join(_0x4abd6c,_0x14ce57),'lockFilePath':join(_0x146f87,_0xd7e959(0x1e5),_0xd7e959(0x1e6))};}export function buildPageFileName(_0x3d5d79,_0x13b4bb){const _0x4c6db7=a239_0x3c1e;return _0x3d5d79+'-'+String(_0x13b4bb)[_0x4c6db7(0x1ed)]()+_0x4c6db7(0x1f5);}function a239_0x1dd9(){const _0x1bffd8=['32eTpeBm','.json','.rabetbase','page.lock.json','2787545EVJHar','378rQHJYj','1509237UKyzTc','56973hSHQWV','160187HhdOfP','644284TZVyFv','toUpperCase','1518000AwClSb','108183kRHUpU','4GVlokV','40cVulUi','appPagesDir','page'];a239_0x1dd9=function(){return _0x1bffd8;};return a239_0x1dd9();}export function resolvePageFilePath(_0x1cb208,_0x46d221,_0x1da9ba){const _0x4e95d5=a239_0x3c1e;return join(_0x1cb208[_0x4e95d5(0x1f2)],buildPageFileName(_0x46d221,_0x1da9ba));}function a239_0x3c1e(_0x797d78,_0x13fe60){_0x797d78=_0x797d78-0x1e5;const _0x1dd9e3=a239_0x1dd9();let _0x3c1e62=_0x1dd9e3[_0x797d78];return _0x3c1e62;}export async function ensureParentDirectory(_0x1dd594){await mkdir(dirname(_0x1dd594),{'recursive':!![]});}export async function fileExists(_0x356f4c){try{return await access(_0x356f4c,constants['F_OK']),!![];}catch{return![];}}
1
+ function a244_0x7567(){const _0x484f98=['cwd','49pQSpHr','286424cvTwXF','1225072kfgqVH','page','18aLZGDB','.rabetbase','26620450JYpNFo','5766444bSFFgP','19576tZyZbc','7849415uzZcNb','F_OK','258DKehKv','5694992kLppIN'];a244_0x7567=function(){return _0x484f98;};return a244_0x7567();}const a244_0x4975c4=a244_0x4f54;(function(_0x18334a,_0x5ab45b){const _0x29e3c4=a244_0x4f54,_0x2ec722=_0x18334a();while(!![]){try{const _0x5b217c=parseInt(_0x29e3c4(0x1c2))/0x1+-parseInt(_0x29e3c4(0x1ba))/0x2*(-parseInt(_0x29e3c4(0x1bd))/0x3)+parseInt(_0x29e3c4(0x1be))/0x4+parseInt(_0x29e3c4(0x1bb))/0x5+parseInt(_0x29e3c4(0x1b9))/0x6+-parseInt(_0x29e3c4(0x1c0))/0x7*(-parseInt(_0x29e3c4(0x1c1))/0x8)+-parseInt(_0x29e3c4(0x1b6))/0x9*(parseInt(_0x29e3c4(0x1b8))/0xa);if(_0x5b217c===_0x5ab45b)break;else _0x2ec722['push'](_0x2ec722['shift']());}catch(_0x130d7c){_0x2ec722['push'](_0x2ec722['shift']());}}}(a244_0x7567,0xe776c));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x243d9b,_0x58dfc3=process[a244_0x4975c4(0x1bf)]()){const _0x55b5b0=a244_0x4975c4,_0x2aec96=resolve(_0x58dfc3),_0x55dcc2=join(_0x2aec96,_0x55b5b0(0x1b7),_0x55b5b0(0x1b5));return{'projectRoot':_0x2aec96,'pagesBaseDir':_0x55dcc2,'appPagesDir':join(_0x55dcc2,_0x243d9b),'lockFilePath':join(_0x2aec96,_0x55b5b0(0x1b7),'page.lock.json')};}export function buildPageFileName(_0x2e7ea2,_0x5725c7){return _0x2e7ea2+'-'+String(_0x5725c7)['toUpperCase']()+'.json';}export function resolvePageFilePath(_0x259a64,_0x2d9555,_0x67b5d6){return join(_0x259a64['appPagesDir'],buildPageFileName(_0x2d9555,_0x67b5d6));}export async function ensureParentDirectory(_0x508fdd){await mkdir(dirname(_0x508fdd),{'recursive':!![]});}function a244_0x4f54(_0x157135,_0x3878d0){_0x157135=_0x157135-0x1b5;const _0x75678f=a244_0x7567();let _0x4f54f0=_0x75678f[_0x157135];return _0x4f54f0;}export async function fileExists(_0x465af7){const _0x1c450d=a244_0x4975c4;try{return await access(_0x465af7,constants[_0x1c450d(0x1bc)]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x58c21d,_0x35af82){const _0x3d6805=a240_0xa15d,_0x146208=_0x58c21d();while(!![]){try{const _0x48c4f1=parseInt(_0x3d6805(0x1d1))/0x1+parseInt(_0x3d6805(0x1d7))/0x2*(parseInt(_0x3d6805(0x1cb))/0x3)+-parseInt(_0x3d6805(0x1cf))/0x4+parseInt(_0x3d6805(0x1ce))/0x5+parseInt(_0x3d6805(0x1ca))/0x6+parseInt(_0x3d6805(0x1d0))/0x7*(-parseInt(_0x3d6805(0x1cd))/0x8)+-parseInt(_0x3d6805(0x1d2))/0x9;if(_0x48c4f1===_0x35af82)break;else _0x146208['push'](_0x146208['shift']());}catch(_0x384d0f){_0x146208['push'](_0x146208['shift']());}}}(a240_0xbf9a,0x654fd));import a240_0x43d66e from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x1d7eff){const _0x874e5f=a240_0xa15d;return JSON['stringify'](JSON[_0x874e5f(0x1d6)](_0x1d7eff),null,0x2)+'\x0a';}function a240_0xbf9a(){const _0x165cc8=['md5','createHash','utf8','parse','503416iGWQrp','734898zMvUoL','3JGWXGB','hex','1856EjWfDA','2183010OLWoOP','888928qjNMxG','13853QuBtiP','326338AzPWbx','367182uEHfyZ'];a240_0xbf9a=function(){return _0x165cc8;};return a240_0xbf9a();}function a240_0xa15d(_0x53afb7,_0xd9ae9){_0x53afb7=_0x53afb7-0x1ca;const _0xbf9ade=a240_0xbf9a();let _0xa15d9b=_0xbf9ade[_0x53afb7];return _0xa15d9b;}export function computePageContentHash(_0x55b098){const _0x28bdbf=a240_0xa15d;return a240_0x43d66e[_0x28bdbf(0x1d4)](_0x28bdbf(0x1d3))['update'](_0x55b098)['digest'](_0x28bdbf(0x1cc));}export function computeSerializedSchemaHash(_0x352c2c){return computePageContentHash(serializePageSchemaForFile(_0x352c2c));}export async function computePageFileHash(_0x49bee7){const _0xdd6148=a240_0xa15d,_0x5294ed=await readFile(_0x49bee7,_0xdd6148(0x1d5));return computePageContentHash(_0x5294ed);}
1
+ function a245_0x17b6(_0x1e25bf,_0x1a254d){_0x1e25bf=_0x1e25bf-0x81;const _0x52df59=a245_0x52df();let _0x17b66b=_0x52df59[_0x1e25bf];return _0x17b66b;}(function(_0x758b65,_0x2318a8){const _0x1d719a=a245_0x17b6,_0x171b76=_0x758b65();while(!![]){try{const _0x1f5784=parseInt(_0x1d719a(0x88))/0x1+-parseInt(_0x1d719a(0x81))/0x2*(parseInt(_0x1d719a(0x85))/0x3)+-parseInt(_0x1d719a(0x8d))/0x4*(parseInt(_0x1d719a(0x8c))/0x5)+parseInt(_0x1d719a(0x8f))/0x6+-parseInt(_0x1d719a(0x82))/0x7+-parseInt(_0x1d719a(0x83))/0x8+parseInt(_0x1d719a(0x8b))/0x9*(parseInt(_0x1d719a(0x8e))/0xa);if(_0x1f5784===_0x2318a8)break;else _0x171b76['push'](_0x171b76['shift']());}catch(_0x3383ec){_0x171b76['push'](_0x171b76['shift']());}}}(a245_0x52df,0x1d250));function a245_0x52df(){const _0x31707a=['861684mOOkre','hex','md5','387902aGXAMA','1439536bEtjRw','507488xgupqC','parse','3OajZkd','stringify','update','14112JWtpEZ','digest','utf8','5424822XUEOZt','5RImTwM','712292LaiYqU','10yNQdKk'];a245_0x52df=function(){return _0x31707a;};return a245_0x52df();}import a245_0x368f47 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x563694){const _0xe2c47a=a245_0x17b6;return JSON[_0xe2c47a(0x86)](JSON[_0xe2c47a(0x84)](_0x563694),null,0x2)+'\x0a';}export function computePageContentHash(_0x1d027a){const _0x3164f6=a245_0x17b6;return a245_0x368f47['createHash'](_0x3164f6(0x91))[_0x3164f6(0x87)](_0x1d027a)[_0x3164f6(0x89)](_0x3164f6(0x90));}export function computeSerializedSchemaHash(_0x49a006){return computePageContentHash(serializePageSchemaForFile(_0x49a006));}export async function computePageFileHash(_0x266db2){const _0x49af95=a245_0x17b6,_0x54256a=await readFile(_0x266db2,_0x49af95(0x8a));return computePageContentHash(_0x54256a);}
@@ -1 +1 @@
1
- (function(_0x192844,_0x129792){const _0x4da365=a241_0x3c2d,_0x20762e=_0x192844();while(!![]){try{const _0x248ebb=-parseInt(_0x4da365(0xd6))/0x1+-parseInt(_0x4da365(0xd3))/0x2+parseInt(_0x4da365(0xda))/0x3*(parseInt(_0x4da365(0xd1))/0x4)+-parseInt(_0x4da365(0xd4))/0x5+-parseInt(_0x4da365(0xdf))/0x6+parseInt(_0x4da365(0xd0))/0x7*(-parseInt(_0x4da365(0xdd))/0x8)+-parseInt(_0x4da365(0xdc))/0x9*(-parseInt(_0x4da365(0xd9))/0xa);if(_0x248ebb===_0x129792)break;else _0x20762e['push'](_0x20762e['shift']());}catch(_0x28ea8e){_0x20762e['push'](_0x20762e['shift']());}}}(a241_0xb9d3,0x75bba));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x5c83c2,_0x4af775){const _0x983b5a=a241_0x3c2d,_0x450ef1={'apps':_0x5c83c2[_0x983b5a(0xce)]&&typeof _0x5c83c2[_0x983b5a(0xce)]===_0x983b5a(0xcf)?_0x5c83c2['apps']:{}};let _0xce75bb=_0x450ef1[_0x983b5a(0xce)][_0x4af775];if(!_0xce75bb)return _0xce75bb={'lastSync':'','pages':{}},_0x450ef1[_0x983b5a(0xce)][_0x4af775]=_0xce75bb,{'lockData':_0x450ef1,'appLock':_0xce75bb};return!_0xce75bb['lastSync']&&(_0xce75bb[_0x983b5a(0xe0)]=''),(!_0xce75bb[_0x983b5a(0xcd)]||typeof _0xce75bb['pages']!==_0x983b5a(0xcf))&&(_0xce75bb[_0x983b5a(0xcd)]={}),{'lockData':_0x450ef1,'appLock':_0xce75bb};}export async function readPageLockFile(_0x2732dc){const _0x193782=a241_0x3c2d;try{const _0x2b50bc=await readFile(_0x2732dc,_0x193782(0xde)),_0x36b4b6=JSON[_0x193782(0xd5)](_0x2b50bc);return{'apps':_0x36b4b6[_0x193782(0xce)]&&typeof _0x36b4b6[_0x193782(0xce)]===_0x193782(0xcf)?_0x36b4b6[_0x193782(0xce)]:{}};}catch(_0x1df702){if(_0x1df702[_0x193782(0xd7)]===_0x193782(0xd8))return null;throw new Error(_0x193782(0xdb)+String(_0x1df702));}}function a241_0x3c2d(_0x51011f,_0x91ea3e){_0x51011f=_0x51011f-0xcd;const _0xb9d323=a241_0xb9d3();let _0x3c2da0=_0xb9d323[_0x51011f];return _0x3c2da0;}export async function writePageLockFile(_0x2502ed,_0x144d31){const _0x254051=a241_0x3c2d;await mkdir(dirname(_0x2502ed),{'recursive':!![]}),await writeFile(_0x2502ed,JSON[_0x254051(0xd2)](_0x144d31,null,0x2),_0x254051(0xde));}function a241_0xb9d3(){const _0x5590ea=['697776TRIPJr','4145990byVMlf','parse','429886xoVLuW','code','ENOENT','7163420ljHeNC','3ucHiRl','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','36EWNsbQ','939160lsuGUU','utf8','5592390xhRnZn','lastSync','pages','apps','object','14bdqhIL','1566772rZKseb','stringify'];a241_0xb9d3=function(){return _0x5590ea;};return a241_0xb9d3();}
1
+ (function(_0x2ce6b1,_0x29bc13){const _0x530162=a246_0x2cf9,_0x37a685=_0x2ce6b1();while(!![]){try{const _0x2ad0df=-parseInt(_0x530162(0x9f))/0x1+parseInt(_0x530162(0x9a))/0x2*(-parseInt(_0x530162(0x92))/0x3)+-parseInt(_0x530162(0x98))/0x4+parseInt(_0x530162(0x9c))/0x5+-parseInt(_0x530162(0x95))/0x6+-parseInt(_0x530162(0xa3))/0x7*(parseInt(_0x530162(0x99))/0x8)+parseInt(_0x530162(0x9d))/0x9*(parseInt(_0x530162(0x94))/0xa);if(_0x2ad0df===_0x29bc13)break;else _0x37a685['push'](_0x37a685['shift']());}catch(_0x2d15bd){_0x37a685['push'](_0x37a685['shift']());}}}(a246_0xf7d1,0x34681));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x1e7938,_0x1275f5){const _0x48966a=a246_0x2cf9,_0x53d359={'apps':_0x1e7938[_0x48966a(0x93)]&&typeof _0x1e7938['apps']==='object'?_0x1e7938['apps']:{}};let _0x2af62b=_0x53d359[_0x48966a(0x93)][_0x1275f5];if(!_0x2af62b)return _0x2af62b={'lastSync':'','pages':{}},_0x53d359[_0x48966a(0x93)][_0x1275f5]=_0x2af62b,{'lockData':_0x53d359,'appLock':_0x2af62b};return!_0x2af62b['lastSync']&&(_0x2af62b[_0x48966a(0xa0)]=''),(!_0x2af62b[_0x48966a(0xa2)]||typeof _0x2af62b['pages']!=='object')&&(_0x2af62b[_0x48966a(0xa2)]={}),{'lockData':_0x53d359,'appLock':_0x2af62b};}export async function readPageLockFile(_0xb40ec4){const _0xdde52a=a246_0x2cf9;try{const _0x529a20=await readFile(_0xb40ec4,_0xdde52a(0x9b)),_0x2e4be0=JSON['parse'](_0x529a20);return{'apps':_0x2e4be0[_0xdde52a(0x93)]&&typeof _0x2e4be0['apps']===_0xdde52a(0xa1)?_0x2e4be0['apps']:{}};}catch(_0x1928e2){if(_0x1928e2[_0xdde52a(0x9e)]===_0xdde52a(0x96))return null;throw new Error(_0xdde52a(0x97)+String(_0x1928e2));}}function a246_0xf7d1(){const _0x4b60c6=['18580igighv','1335060oMhZOR','ENOENT','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','1657248EQNumv','5080OazBiN','527146SgzaaZ','utf8','1773475eiZiuA','4626qCdlXc','code','130520fsNHVU','lastSync','object','pages','707KNZjPa','3OvKTLh','apps'];a246_0xf7d1=function(){return _0x4b60c6;};return a246_0xf7d1();}function a246_0x2cf9(_0x204469,_0x13cf8a){_0x204469=_0x204469-0x92;const _0xf7d16e=a246_0xf7d1();let _0x2cf908=_0xf7d16e[_0x204469];return _0x2cf908;}export async function writePageLockFile(_0x4e6402,_0x4ae39f){const _0x2b9553=a246_0x2cf9;await mkdir(dirname(_0x4e6402),{'recursive':!![]}),await writeFile(_0x4e6402,JSON['stringify'](_0x4ae39f,null,0x2),_0x2b9553(0x9b));}
@@ -1 +1 @@
1
- (function(_0x16ff58,_0x31b65c){const _0xdae029=a243_0xd775,_0x3c3982=_0x16ff58();while(!![]){try{const _0x3bf835=-parseInt(_0xdae029(0xe7))/0x1*(parseInt(_0xdae029(0x128))/0x2)+-parseInt(_0xdae029(0xff))/0x3*(parseInt(_0xdae029(0x11f))/0x4)+parseInt(_0xdae029(0xfe))/0x5+-parseInt(_0xdae029(0x10c))/0x6*(parseInt(_0xdae029(0x11e))/0x7)+parseInt(_0xdae029(0xee))/0x8*(parseInt(_0xdae029(0x119))/0x9)+-parseInt(_0xdae029(0xfc))/0xa*(parseInt(_0xdae029(0x113))/0xb)+parseInt(_0xdae029(0xec))/0xc*(parseInt(_0xdae029(0x109))/0xd);if(_0x3bf835===_0x31b65c)break;else _0x3c3982['push'](_0x3c3982['shift']());}catch(_0xfb34d2){_0x3c3982['push'](_0x3c3982['shift']());}}}(a243_0x18a3,0xe47c4));function a243_0x18a3(){const _0x20a485=['test','error','126ovScyf','split','unsupportedReason','unknown','INDEX_METADATA_UNAVAILABLE','3402567vVxxTp','172204wHNxVe','table','matchedPrefix','slice','startsWith','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','exec','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','1006yCuGYq','position','full','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','matchAll','map','indexes','has','trim','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','push','3595QDvwfY','index','\x5cs*\x5c.\x5cs*[\x5cw$]+','__sq__','from','3288cksqNP','using','571432jGVVHF','replaceAll','toUpperCase','(?:^|[^\x5cw$])','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','warning','alias','replace','filter','min','covered','match','right','30SVjTsT','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','6925310xlFFuF','9FbjhtB','tableName','some','JOIN_PREDICATE_UNSUPPORTED','join','columns','max','unavailable','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','sort','65429ncfJFn','search','length','6JdvcWu','JOIN_INDEX_NOT_USABLE','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','reduce','toLowerCase','indexOf','1483955EpJdYc','includes','cross','JOIN_INDEX_MISSING'];a243_0x18a3=function(){return _0x20a485;};return a243_0x18a3();}import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x5180ef,_0x4a3358){const _0x34c592=a243_0xd775,_0x33e7d8=[],_0xd73dfb=normalizeSqlForStaticAnalysis(_0x5180ef),_0x16a05c=(_0xd73dfb[_0x34c592(0x118)]?[]:extractJoinFacts(_0xd73dfb['sql']))[_0x34c592(0x12d)](_0x281126=>{const _0x253a84=_0x34c592;if(_0x281126['unsupportedPredicate']||_0x281126[_0x253a84(0x104)][_0x253a84(0x10b)]===0x0)return _0x33e7d8[_0x253a84(0xe6)]({'code':_0x253a84(0x102),'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126['alias'],'columns':_0x281126[_0x253a84(0x104)],'reason':_0x281126[_0x253a84(0x11b)]??_0x253a84(0x12b)}),{'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126['alias'],'columns':_0x281126[_0x253a84(0x104)],'status':'unavailable'};const _0x1fe25b=resolveTableMetadata(_0x4a3358,_0x281126['table']),_0xefd331=(_0x1fe25b?.['indexes']??[])[_0x253a84(0x12d)](_0x15f227=>({'index':_0x15f227,'matchedPrefix':findEqualityPrefix(_0x15f227[_0x253a84(0x104)],_0x281126[_0x253a84(0x104)])}))[_0x253a84(0xf7)](_0x12b42e=>_0x12b42e[_0x253a84(0x121)][_0x253a84(0x10b)]>0x0),_0x3aab5b=_0xefd331[_0x253a84(0x110)]((_0x5db9f6,_0x3ecdd1)=>!_0x5db9f6||_0x3ecdd1['matchedPrefix'][_0x253a84(0x10b)]>_0x5db9f6[_0x253a84(0x121)][_0x253a84(0x10b)]?_0x3ecdd1:_0x5db9f6,_0xefd331[0x0]);if(_0x3aab5b)return{'table':_0x281126['table'],'alias':_0x281126[_0x253a84(0xf5)],'columns':_0x281126[_0x253a84(0x104)],'status':_0x253a84(0xf9),'matchedIndex':{..._0x3aab5b['index'],'matchedPrefix':_0x3aab5b[_0x253a84(0x121)]}};const _0x55c5eb=_0x1fe25b?.[_0x253a84(0x12e)][_0x253a84(0xf7)](_0x1912a1=>_0x1912a1[_0x253a84(0x104)]['some'](_0x205760=>_0x281126[_0x253a84(0x104)][_0x253a84(0x101)](_0x18e222=>columnNamesMatch(_0x205760,_0x18e222))))??[];if(_0x55c5eb['length']>0x0)return _0x33e7d8[_0x253a84(0xe6)]({'code':_0x253a84(0x10d),'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126[_0x253a84(0xf5)],'columns':_0x281126[_0x253a84(0x104)],'reason':_0x253a84(0x10e)}),{'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126[_0x253a84(0xf5)],'columns':_0x281126[_0x253a84(0x104)],'status':_0x253a84(0xf4),'candidateIndexes':_0x55c5eb};if(_0x1fe25b&&_0x1fe25b['metadataAvailable']!==![]&&_0x1fe25b[_0x253a84(0x12e)][_0x253a84(0x10b)]>0x0&&_0x281126[_0x253a84(0x104)][_0x253a84(0x10b)]>0x0)return _0x33e7d8['push']({'code':_0x253a84(0x116),'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126['alias'],'columns':_0x281126['columns'],'reason':_0x253a84(0x124)}),{'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126[_0x253a84(0xf5)],'columns':_0x281126[_0x253a84(0x104)],'status':_0x253a84(0xf4)};return _0x33e7d8[_0x253a84(0xe6)]({'code':_0x253a84(0x11d),'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126[_0x253a84(0xf5)],'columns':_0x281126[_0x253a84(0x104)],'reason':_0x1fe25b?_0x253a84(0x125):_0x253a84(0xe5)}),{'table':_0x281126[_0x253a84(0x120)],'alias':_0x281126[_0x253a84(0xf5)],'columns':_0x281126[_0x253a84(0x104)],'status':_0x253a84(0x106)};});return{'checked':_0x16a05c['length']>0x0,'joins':_0x16a05c,'warnings':_0x33e7d8};}function extractJoinFacts(_0x2d0dc4){const _0x239393=a243_0xd775,_0x4a0a5e=maskNestedQueries(stripSqlNoise(_0x2d0dc4)),_0x4b518c=maskQuotedIdentifiers(_0x4a0a5e),_0x58d7f9=[],_0x24da69=new Set(),_0x577278=/\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 _0x226cdf of _0x4a0a5e[_0x239393(0x12c)](_0x577278)){const _0x164d07=_0x226cdf[_0x239393(0xe8)]??0x0,_0x2042f1=_0x226cdf[0x0][_0x239393(0x10a)](/\bJOIN\b/i),_0x6d2fe4=_0x164d07+Math[_0x239393(0x105)](0x0,_0x2042f1);if(!/^JOIN\b/i[_0x239393(0x117)](_0x4b518c['slice'](_0x6d2fe4)))continue;_0x24da69['add'](_0x6d2fe4);const _0x252129=normalizeIdentifier(_0x226cdf[0x1]||'INNER'),_0x1770ed=normalizeIdentifier(_0x226cdf[0x2]??''),_0x3b276b=normalizeIdentifier(_0x226cdf[0x3]||_0x1770ed[_0x239393(0x11a)]('.')['at'](-0x1)||_0x1770ed),_0x240e20=[],_0x2095e0=_0x1770ed===_0x239393(0xea);let _0x1af576=_0x252129===_0x239393(0xfb)||_0x252129===_0x239393(0x12a)||_0x2095e0,_0x4f3481=_0x1af576?_0x2095e0?_0x239393(0xf2):_0x252129[_0x239393(0xf0)]()+_0x239393(0xf3):undefined;const _0x2f91de=stripOuterParentheses(_0x226cdf[0x4]??''),_0x125f53=_0x2f91de[_0x239393(0x114)](MYBATIS_DYNAMIC_START_MARKER)||_0x2f91de[_0x239393(0x114)](MYBATIS_DYNAMIC_END_MARKER),_0x1226fc=_0x2f91de[_0x239393(0x114)](MYBATIS_INCLUDE_MARKER);_0x125f53&&(_0x1af576=!![],_0x4f3481??=_0x239393(0x10f));_0x1226fc&&(_0x1af576=!![],_0x4f3481??=_0x239393(0x127));const _0x43e1be=_0x2f91de['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x239393(0xef)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x239393(0xef)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x43e1be,'OR')&&(_0x1af576=!![],_0x4f3481??=_0x239393(0xfd));for(const _0x5016ed of splitTopLevelAnd(_0x43e1be)){const _0x30bb66=stripOuterParentheses(_0x5016ed);if(hasTopLevelKeyword(_0x30bb66,'OR')){_0x1af576=!![],_0x4f3481??=_0x239393(0xfd);continue;}const _0x5c0377=splitEquality(_0x30bb66);if(!_0x5c0377){containsColumnReference(_0x5016ed,_0x3b276b)&&(_0x1af576=!![]);continue;}const _0x3538e3=parseDirectColumnReference(_0x5c0377[0x0],_0x3b276b),_0x279487=parseDirectColumnReference(_0x5c0377[0x1],_0x3b276b),_0x121904=containsColumnReference(_0x5c0377[0x0],_0x3b276b),_0x247dcb=containsColumnReference(_0x5c0377[0x1],_0x3b276b),_0x120d92=_0x3538e3&&!_0x247dcb?_0x3538e3:_0x279487&&!_0x121904?_0x279487:null;if(_0x120d92&&!_0x240e20[_0x239393(0x114)](_0x120d92))_0x240e20[_0x239393(0xe6)](_0x120d92);else!_0x120d92&&containsColumnReference(_0x5016ed,_0x3b276b)&&(_0x1af576=!![]);}_0x58d7f9[_0x239393(0xe6)]({'table':_0x1770ed,'alias':_0x3b276b,'columns':_0x240e20,'unsupportedPredicate':_0x1af576,'unsupportedReason':_0x4f3481,'containsUnresolvedInclude':_0x1226fc,'position':_0x6d2fe4});}for(const _0x669da4 of _0x4b518c['matchAll'](/\bJOIN\b/gi)){const _0x27603a=_0x669da4[_0x239393(0xe8)]??0x0;if(_0x24da69[_0x239393(0x12f)](_0x27603a))continue;const _0x4eea27=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/['exec'](_0x4a0a5e[_0x239393(0x122)](_0x27603a+_0x669da4[0x0][_0x239393(0x10b)])),_0x3ff825=normalizeIdentifier(_0x4eea27?.[0x1]||_0x239393(0x11c)),_0x18b574=normalizeIdentifier(_0x4eea27?.[0x2]||''),_0x3fc4f7=isSqlClauseKeyword(_0x18b574)?_0x3ff825[_0x239393(0x11a)]('.')['at'](-0x1)||_0x3ff825:_0x18b574||_0x3ff825[_0x239393(0x11a)]('.')['at'](-0x1)||_0x3ff825;_0x58d7f9[_0x239393(0xe6)]({'table':_0x3ff825,'alias':_0x3fc4f7,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x239393(0x107),'position':_0x27603a});}const _0x34b5d0=_0x4b518c[_0x239393(0x112)](MYBATIS_INCLUDE_MARKER);return _0x34b5d0>=0x0&&!_0x58d7f9[_0x239393(0x101)](_0x29b7d6=>_0x29b7d6['containsUnresolvedInclude'])&&_0x58d7f9['push']({'table':_0x239393(0x11c),'alias':_0x239393(0x11c),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0x34b5d0}),_0x58d7f9[_0x239393(0x108)]((_0x190b9d,_0x33df2b)=>_0x190b9d[_0x239393(0x129)]-_0x33df2b[_0x239393(0x129)]);}function stripSqlNoise(_0x406c68){const _0x520dad=a243_0xd775,_0x537bc2=Array['from'](_0x406c68),_0x4c14e1=(_0x13ff6a,_0x4f5658)=>{for(let _0x569dce=_0x13ff6a;_0x569dce<_0x4f5658;_0x569dce+=0x1){_0x537bc2[_0x569dce]!=='\x0a'&&_0x537bc2[_0x569dce]!=='\x0d'&&(_0x537bc2[_0x569dce]='\x20');}};for(let _0x406e6b=0x0;_0x406e6b<_0x537bc2[_0x520dad(0x10b)];_0x406e6b+=0x1){const _0x5de797=_0x537bc2[_0x406e6b],_0x314536=_0x537bc2[_0x406e6b+0x1];if(_0x5de797==='\x27'||_0x5de797==='\x22'||_0x5de797==='`'){const _0x93a250=_0x5de797,_0x5733d4=_0x406e6b;_0x406e6b+=0x1;while(_0x406e6b<_0x537bc2['length']){if(_0x537bc2[_0x406e6b]==='\x5c'&&_0x406e6b+0x1<_0x537bc2['length']){_0x406e6b+=0x2;continue;}if(_0x537bc2[_0x406e6b]!==_0x93a250){_0x406e6b+=0x1;continue;}if(_0x537bc2[_0x406e6b+0x1]===_0x93a250){_0x406e6b+=0x2;continue;}break;}if(_0x93a250==='\x27')_0x4c14e1(_0x5733d4,Math['min'](_0x406e6b+0x1,_0x537bc2[_0x520dad(0x10b)]));continue;}if(_0x5de797==='-'&&_0x314536==='-'){const _0x285f45=_0x406e6b;while(_0x406e6b<_0x537bc2[_0x520dad(0x10b)]&&_0x537bc2[_0x406e6b]!=='\x0a')_0x406e6b+=0x1;_0x4c14e1(_0x285f45,_0x406e6b);continue;}if(_0x5de797==='/'&&_0x314536==='*'){const _0x1bdc4d=_0x406e6b;_0x406e6b+=0x2;while(_0x406e6b<_0x537bc2[_0x520dad(0x10b)]&&!(_0x537bc2[_0x406e6b]==='*'&&_0x537bc2[_0x406e6b+0x1]==='/')){_0x406e6b+=0x1;}_0x406e6b=Math[_0x520dad(0xf8)](_0x406e6b+0x1,_0x537bc2[_0x520dad(0x10b)]-0x1),_0x4c14e1(_0x1bdc4d,_0x406e6b+0x1);continue;}if(_0x5de797==='#'&&_0x314536!=='{'){const _0x4fa1bb=_0x406e6b;while(_0x406e6b<_0x537bc2[_0x520dad(0x10b)]&&_0x537bc2[_0x406e6b]!=='\x0a')_0x406e6b+=0x1;_0x4c14e1(_0x4fa1bb,_0x406e6b);continue;}if((_0x5de797==='#'||_0x5de797==='$')&&_0x314536==='{'){const _0x18d208=_0x406e6b;_0x406e6b+=0x2;while(_0x406e6b<_0x537bc2['length']&&_0x537bc2[_0x406e6b]!=='}')_0x406e6b+=0x1;_0x4c14e1(_0x18d208,Math['min'](_0x406e6b+0x1,_0x537bc2[_0x520dad(0x10b)]));}}return _0x537bc2['join']('');}function maskQuotedIdentifiers(_0x61ecf){const _0x5c41d7=a243_0xd775,_0xef904e=Array[_0x5c41d7(0xeb)](_0x61ecf);for(let _0x3e8ad3=0x0;_0x3e8ad3<_0xef904e[_0x5c41d7(0x10b)];_0x3e8ad3+=0x1){const _0x559971=_0xef904e[_0x3e8ad3];if(_0x559971!=='\x22'&&_0x559971!=='`')continue;_0x3e8ad3+=0x1;while(_0x3e8ad3<_0xef904e[_0x5c41d7(0x10b)]){if(_0xef904e[_0x3e8ad3]===_0x559971){if(_0xef904e[_0x3e8ad3+0x1]===_0x559971){_0xef904e[_0x3e8ad3]='\x20',_0xef904e[_0x3e8ad3+0x1]='\x20',_0x3e8ad3+=0x2;continue;}break;}_0xef904e[_0x3e8ad3]='\x20',_0x3e8ad3+=0x1;}}return _0xef904e[_0x5c41d7(0x103)]('');}function maskNestedQueries(_0x56718d){const _0x4dd1b1=a243_0xd775,_0x252621=Array['from'](_0x56718d);for(let _0x19f739=0x0;_0x19f739<_0x252621[_0x4dd1b1(0x10b)];_0x19f739+=0x1){if(_0x252621[_0x19f739]!=='(')continue;const _0x3e3114=_0x56718d['slice'](_0x19f739+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x4dd1b1(0x117)](_0x3e3114))continue;let _0x25090f=0x1,_0x39cb95=_0x19f739+0x1;for(;_0x39cb95<_0x252621[_0x4dd1b1(0x10b)]&&_0x25090f>0x0;_0x39cb95+=0x1){if(_0x252621[_0x39cb95]==='(')_0x25090f+=0x1;if(_0x252621[_0x39cb95]===')')_0x25090f-=0x1;}if(_0x25090f!==0x0)continue;for(let _0x109da7=_0x19f739;_0x109da7<_0x39cb95;_0x109da7+=0x1){_0x252621[_0x109da7]='\x20';}const _0x3ac452=_0x4dd1b1(0xea);for(let _0x306432=0x0;_0x306432<_0x3ac452[_0x4dd1b1(0x10b)]&&_0x19f739+_0x306432<_0x39cb95;_0x306432+=0x1){_0x252621[_0x19f739+_0x306432]=_0x3ac452[_0x306432];}_0x19f739=_0x39cb95-0x1;}return _0x252621[_0x4dd1b1(0x103)]('');}function splitTopLevelAnd(_0xef0eec){const _0x191045=a243_0xd775,_0x28661e=[];let _0xdfe572=0x0,_0x38678e=0x0;for(let _0x18a37a=0x0;_0x18a37a<_0xef0eec[_0x191045(0x10b)];_0x18a37a+=0x1){const _0x5da903=_0xef0eec[_0x18a37a];if(_0x5da903==='(')_0xdfe572+=0x1;if(_0x5da903===')')_0xdfe572=Math['max'](0x0,_0xdfe572-0x1);_0xdfe572===0x0&&_0xef0eec[_0x191045(0x122)](_0x18a37a)[_0x191045(0xfa)](/^AND\b/i)&&(_0x18a37a===0x0||/\s/[_0x191045(0x117)](_0xef0eec[_0x18a37a-0x1]??''))&&(_0x28661e[_0x191045(0xe6)](_0xef0eec[_0x191045(0x122)](_0x38678e,_0x18a37a)[_0x191045(0xe4)]()),_0x18a37a+=0x2,_0x38678e=_0x18a37a+0x1);}const _0x33b83e=_0xef0eec[_0x191045(0x122)](_0x38678e)['trim']();if(_0x33b83e)_0x28661e[_0x191045(0xe6)](_0x33b83e);return _0x28661e;}function hasTopLevelKeyword(_0x32303f,_0x22fc78){const _0x25491d=a243_0xd775;let _0x1b62b9=0x0;for(let _0x489eb6=0x0;_0x489eb6<_0x32303f[_0x25491d(0x10b)];_0x489eb6+=0x1){const _0x2fb571=_0x32303f[_0x489eb6];if(_0x2fb571==='(')_0x1b62b9+=0x1;if(_0x2fb571===')')_0x1b62b9=Math[_0x25491d(0x105)](0x0,_0x1b62b9-0x1);if(_0x1b62b9!==0x0)continue;const _0x50c139=_0x32303f[_0x25491d(0x122)](_0x489eb6,_0x489eb6+_0x22fc78[_0x25491d(0x10b)]),_0x5dd2ad=_0x32303f[_0x489eb6-0x1]??'\x20',_0x310834=_0x32303f[_0x489eb6+_0x22fc78['length']]??'\x20';if(_0x50c139['toUpperCase']()===_0x22fc78[_0x25491d(0xf0)]()&&!/[\w$]/[_0x25491d(0x117)](_0x5dd2ad)&&!/[\w$]/[_0x25491d(0x117)](_0x310834))return!![];}return![];}function splitEquality(_0x2a5238){const _0x4a397e=a243_0xd775,_0x15e3b9=stripOuterParentheses(_0x2a5238);let _0x5cbaa6=0x0,_0x2d85d2;for(let _0x1726ac=0x0;_0x1726ac<_0x15e3b9[_0x4a397e(0x10b)];_0x1726ac+=0x1){const _0x5977cb=_0x15e3b9[_0x1726ac];if(_0x5977cb==='(')_0x5cbaa6+=0x1;if(_0x5977cb===')')_0x5cbaa6=Math[_0x4a397e(0x105)](0x0,_0x5cbaa6-0x1);const _0x3d5385=_0x15e3b9[_0x1726ac-0x1]??'',_0x2c93ec=_0x15e3b9[_0x1726ac+0x1]??'';if(_0x5977cb==='='&&_0x5cbaa6===0x0&&!/[!<>=:]/[_0x4a397e(0x117)](_0x3d5385)&&_0x2c93ec!=='='){if(_0x2d85d2!==undefined)return null;_0x2d85d2=_0x1726ac;}}return _0x2d85d2===undefined?null:[_0x15e3b9[_0x4a397e(0x122)](0x0,_0x2d85d2)['trim'](),_0x15e3b9[_0x4a397e(0x122)](_0x2d85d2+0x1)[_0x4a397e(0xe4)]()];}function parseDirectColumnReference(_0x4768fe,_0x9e74d2){const _0x550f1d=a243_0xd775,_0x5d9d89=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x550f1d(0x126)](stripOuterParentheses(_0x4768fe));if(!_0x5d9d89)return null;if(normalizeIdentifier(_0x5d9d89[0x1]??'')!==normalizeIdentifier(_0x9e74d2))return null;return normalizeIdentifier(_0x5d9d89[0x2]??'');}function containsColumnReference(_0x1a5261,_0xba67b3){const _0x3b1f9d=a243_0xd775,_0x5cd9a1=_0x1a5261[_0x3b1f9d(0xf6)](/[`"]/g,''),_0x4967a0=_0xba67b3[_0x3b1f9d(0xf6)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x3b1f9d(0xf1)+_0x4967a0+_0x3b1f9d(0xe9),'i')['test'](_0x5cd9a1);}function findEqualityPrefix(_0x18cec4,_0x551812){const _0x1073e1=a243_0xd775,_0x203b18=new Set(_0x551812[_0x1073e1(0x12d)](normalizeIdentifier)),_0x18a0bb=[];for(const _0x557a57 of _0x18cec4){if(!_0x203b18[_0x1073e1(0x12f)](normalizeIdentifier(_0x557a57)))break;_0x18a0bb[_0x1073e1(0xe6)](_0x557a57);}return _0x18a0bb;}function resolveTableMetadata(_0x49775b,_0xd7cab0){const _0x1873bb=a243_0xd775,_0x2798af=normalizeIdentifier(_0xd7cab0),_0x24a09b=_0x49775b['filter'](_0x3cdff8=>normalizeIdentifier(_0x3cdff8['tableName'])===_0x2798af);if(_0x24a09b['length']===0x1)return _0x24a09b[0x0];const _0x36ef02=_0x2798af[_0x1873bb(0x114)]('.'),_0x97f7ca=_0x2798af[_0x1873bb(0x11a)]('.')['at'](-0x1),_0x2e5f9c=_0x49775b['filter'](_0x24d0a3=>{const _0x33e145=_0x1873bb,_0x3a3dd5=normalizeIdentifier(_0x24d0a3[_0x33e145(0x100)]);if(_0x36ef02&&_0x3a3dd5[_0x33e145(0x114)]('.'))return![];return _0x3a3dd5['split']('.')['at'](-0x1)===_0x97f7ca;});return _0x2e5f9c[_0x1873bb(0x10b)]===0x1?_0x2e5f9c[0x0]:undefined;}function columnNamesMatch(_0x311d44,_0x2a80d9){return normalizeIdentifier(_0x311d44)===normalizeIdentifier(_0x2a80d9);}function a243_0xd775(_0x139e3b,_0x3eb4ff){_0x139e3b=_0x139e3b-0xe4;const _0x18a358=a243_0x18a3();let _0xd77593=_0x18a358[_0x139e3b];return _0xd77593;}function normalizeIdentifier(_0x3aa1b7){const _0x2bfc30=a243_0xd775;return _0x3aa1b7[_0x2bfc30(0xf6)](/[`"]/g,'')[_0x2bfc30(0xe4)]()[_0x2bfc30(0x111)]();}function isSqlClauseKeyword(_0x21d650){const _0x5f1145=a243_0xd775;return new Set(['on',_0x5f1145(0xed),'where',_0x5f1145(0x103),'inner','left',_0x5f1145(0xfb),_0x5f1145(0x12a),_0x5f1145(0x115),'natural'])[_0x5f1145(0x12f)](_0x21d650);}function stripOuterParentheses(_0x3f8f18){const _0x5a6efa=a243_0xd775;let _0x5dc3ad=_0x3f8f18[_0x5a6efa(0xe4)]();while(_0x5dc3ad[_0x5a6efa(0x123)]('(')&&_0x5dc3ad['endsWith'](')')){let _0x2b49a3=0x0,_0x4d8faf=!![];for(let _0x413fee=0x0;_0x413fee<_0x5dc3ad['length'];_0x413fee+=0x1){if(_0x5dc3ad[_0x413fee]==='(')_0x2b49a3+=0x1;if(_0x5dc3ad[_0x413fee]===')')_0x2b49a3-=0x1;if(_0x2b49a3===0x0&&_0x413fee<_0x5dc3ad[_0x5a6efa(0x10b)]-0x1){_0x4d8faf=![];break;}}if(!_0x4d8faf||_0x2b49a3!==0x0)break;_0x5dc3ad=_0x5dc3ad['slice'](0x1,-0x1)[_0x5a6efa(0xe4)]();}return _0x5dc3ad;}
1
+ (function(_0x4a9c60,_0x3662aa){const _0x37fda9=a248_0x18e4,_0x289b6f=_0x4a9c60();while(!![]){try{const _0x1fd1c6=parseInt(_0x37fda9(0x1b3))/0x1+parseInt(_0x37fda9(0x1be))/0x2*(-parseInt(_0x37fda9(0x191))/0x3)+parseInt(_0x37fda9(0x180))/0x4+-parseInt(_0x37fda9(0x17c))/0x5*(-parseInt(_0x37fda9(0x1b7))/0x6)+-parseInt(_0x37fda9(0x18e))/0x7+parseInt(_0x37fda9(0x1af))/0x8+parseInt(_0x37fda9(0x190))/0x9*(-parseInt(_0x37fda9(0x198))/0xa);if(_0x1fd1c6===_0x3662aa)break;else _0x289b6f['push'](_0x289b6f['shift']());}catch(_0x58c762){_0x289b6f['push'](_0x289b6f['shift']());}}}(a248_0x436e,0x1cad6));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x13ffc1,_0x2a06bc){const _0x4f998f=a248_0x18e4,_0x58db3a=[],_0xed4bd2=normalizeSqlForStaticAnalysis(_0x13ffc1),_0x4f4060=(_0xed4bd2[_0x4f998f(0x1b4)]?[]:extractJoinFacts(_0xed4bd2[_0x4f998f(0x175)]))[_0x4f998f(0x19d)](_0x4b9df8=>{const _0x368e9b=_0x4f998f;if(_0x4b9df8[_0x368e9b(0x187)]||_0x4b9df8[_0x368e9b(0x1bb)]['length']===0x0)return _0x58db3a[_0x368e9b(0x1a0)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'reason':_0x4b9df8['unsupportedReason']??_0x368e9b(0x17a)}),{'table':_0x4b9df8['table'],'alias':_0x4b9df8['alias'],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'status':'unavailable'};const _0x4bf2fa=resolveTableMetadata(_0x2a06bc,_0x4b9df8['table']),_0xc30f21=(_0x4bf2fa?.[_0x368e9b(0x1ad)]??[])[_0x368e9b(0x19d)](_0xb3f104=>({'index':_0xb3f104,'matchedPrefix':findEqualityPrefix(_0xb3f104[_0x368e9b(0x1bb)],_0x4b9df8[_0x368e9b(0x1bb)])}))[_0x368e9b(0x183)](_0x41027d=>_0x41027d[_0x368e9b(0x1b6)][_0x368e9b(0x1b5)]>0x0),_0x5d778d=_0xc30f21[_0x368e9b(0x199)]((_0x30b276,_0x5ae506)=>!_0x30b276||_0x5ae506[_0x368e9b(0x1b6)][_0x368e9b(0x1b5)]>_0x30b276[_0x368e9b(0x1b6)][_0x368e9b(0x1b5)]?_0x5ae506:_0x30b276,_0xc30f21[0x0]);if(_0x5d778d)return{'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'status':_0x368e9b(0x193),'matchedIndex':{..._0x5d778d[_0x368e9b(0x1bc)],'matchedPrefix':_0x5d778d[_0x368e9b(0x1b6)]}};const _0x2c3128=_0x4bf2fa?.[_0x368e9b(0x1ad)][_0x368e9b(0x183)](_0x176b91=>_0x176b91[_0x368e9b(0x1bb)]['some'](_0x5de360=>_0x4b9df8[_0x368e9b(0x1bb)][_0x368e9b(0x185)](_0x59ea47=>columnNamesMatch(_0x5de360,_0x59ea47))))??[];if(_0x2c3128[_0x368e9b(0x1b5)]>0x0)return _0x58db3a[_0x368e9b(0x1a0)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8['columns'],'status':_0x368e9b(0x1a7),'candidateIndexes':_0x2c3128};if(_0x4bf2fa&&_0x4bf2fa['metadataAvailable']!==![]&&_0x4bf2fa[_0x368e9b(0x1ad)][_0x368e9b(0x1b5)]>0x0&&_0x4b9df8[_0x368e9b(0x1bb)]['length']>0x0)return _0x58db3a[_0x368e9b(0x1a0)]({'code':_0x368e9b(0x184),'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8['alias'],'columns':_0x4b9df8['columns'],'reason':_0x368e9b(0x186)}),{'table':_0x4b9df8['table'],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8['columns'],'status':_0x368e9b(0x1a7)};return _0x58db3a[_0x368e9b(0x1a0)]({'code':_0x368e9b(0x1b2),'table':_0x4b9df8[_0x368e9b(0x19e)],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'reason':_0x4bf2fa?_0x368e9b(0x177):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x4b9df8['table'],'alias':_0x4b9df8[_0x368e9b(0x1a9)],'columns':_0x4b9df8[_0x368e9b(0x1bb)],'status':'unavailable'};});return{'checked':_0x4f4060['length']>0x0,'joins':_0x4f4060,'warnings':_0x58db3a};}function extractJoinFacts(_0x2a248){const _0x51cedb=a248_0x18e4,_0x64666=maskNestedQueries(stripSqlNoise(_0x2a248)),_0x371ec8=maskQuotedIdentifiers(_0x64666),_0x3e794f=[],_0x39b98c=new Set(),_0x3d95ad=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x4ae4a4 of _0x64666[_0x51cedb(0x1b0)](_0x3d95ad)){const _0x45594b=_0x4ae4a4[_0x51cedb(0x1bc)]??0x0,_0x5a48fc=_0x4ae4a4[0x0]['search'](/\bJOIN\b/i),_0x1aab5f=_0x45594b+Math[_0x51cedb(0x1ba)](0x0,_0x5a48fc);if(!/^JOIN\b/i['test'](_0x371ec8[_0x51cedb(0x18a)](_0x1aab5f)))continue;_0x39b98c[_0x51cedb(0x1ab)](_0x1aab5f);const _0x31ac03=normalizeIdentifier(_0x4ae4a4[0x1]||_0x51cedb(0x196)),_0x5bb180=normalizeIdentifier(_0x4ae4a4[0x2]??''),_0x47b8e6=normalizeIdentifier(_0x4ae4a4[0x3]||_0x5bb180[_0x51cedb(0x195)]('.')['at'](-0x1)||_0x5bb180),_0x2dc288=[],_0x19b645=_0x5bb180==='__sq__';let _0x1e3062=_0x31ac03===_0x51cedb(0x1a3)||_0x31ac03===_0x51cedb(0x18d)||_0x19b645,_0x3efed5=_0x1e3062?_0x19b645?_0x51cedb(0x1a5):_0x31ac03[_0x51cedb(0x178)]()+_0x51cedb(0x176):undefined;const _0x192348=stripOuterParentheses(_0x4ae4a4[0x4]??''),_0x224931=_0x192348[_0x51cedb(0x1a6)](MYBATIS_DYNAMIC_START_MARKER)||_0x192348[_0x51cedb(0x1a6)](MYBATIS_DYNAMIC_END_MARKER),_0x36e3b9=_0x192348[_0x51cedb(0x1a6)](MYBATIS_INCLUDE_MARKER);_0x224931&&(_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x188));_0x36e3b9&&(_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x189));const _0x1ec10e=_0x192348['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x51cedb(0x17b)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x1ec10e,'OR')&&(_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x19f));for(const _0x170a5a of splitTopLevelAnd(_0x1ec10e)){const _0x54b819=stripOuterParentheses(_0x170a5a);if(hasTopLevelKeyword(_0x54b819,'OR')){_0x1e3062=!![],_0x3efed5??=_0x51cedb(0x19f);continue;}const _0xbfd441=splitEquality(_0x54b819);if(!_0xbfd441){containsColumnReference(_0x170a5a,_0x47b8e6)&&(_0x1e3062=!![]);continue;}const _0x13c417=parseDirectColumnReference(_0xbfd441[0x0],_0x47b8e6),_0x119970=parseDirectColumnReference(_0xbfd441[0x1],_0x47b8e6),_0x45a508=containsColumnReference(_0xbfd441[0x0],_0x47b8e6),_0x29e500=containsColumnReference(_0xbfd441[0x1],_0x47b8e6),_0x2a8050=_0x13c417&&!_0x29e500?_0x13c417:_0x119970&&!_0x45a508?_0x119970:null;if(_0x2a8050&&!_0x2dc288['includes'](_0x2a8050))_0x2dc288[_0x51cedb(0x1a0)](_0x2a8050);else!_0x2a8050&&containsColumnReference(_0x170a5a,_0x47b8e6)&&(_0x1e3062=!![]);}_0x3e794f[_0x51cedb(0x1a0)]({'table':_0x5bb180,'alias':_0x47b8e6,'columns':_0x2dc288,'unsupportedPredicate':_0x1e3062,'unsupportedReason':_0x3efed5,'containsUnresolvedInclude':_0x36e3b9,'position':_0x1aab5f});}for(const _0x23f662 of _0x371ec8['matchAll'](/\bJOIN\b/gi)){const _0xeb5140=_0x23f662[_0x51cedb(0x1bc)]??0x0;if(_0x39b98c[_0x51cedb(0x182)](_0xeb5140))continue;const _0x5d2b18=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x51cedb(0x181)](_0x64666[_0x51cedb(0x18a)](_0xeb5140+_0x23f662[0x0]['length'])),_0x42d44c=normalizeIdentifier(_0x5d2b18?.[0x1]||_0x51cedb(0x1bd)),_0x5988ff=normalizeIdentifier(_0x5d2b18?.[0x2]||''),_0x232693=isSqlClauseKeyword(_0x5988ff)?_0x42d44c[_0x51cedb(0x195)]('.')['at'](-0x1)||_0x42d44c:_0x5988ff||_0x42d44c[_0x51cedb(0x195)]('.')['at'](-0x1)||_0x42d44c;_0x3e794f[_0x51cedb(0x1a0)]({'table':_0x42d44c,'alias':_0x232693,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x51cedb(0x197),'position':_0xeb5140});}const _0x45b11c=_0x371ec8[_0x51cedb(0x19b)](MYBATIS_INCLUDE_MARKER);return _0x45b11c>=0x0&&!_0x3e794f[_0x51cedb(0x185)](_0x3ec261=>_0x3ec261[_0x51cedb(0x1a8)])&&_0x3e794f['push']({'table':_0x51cedb(0x1bd),'alias':_0x51cedb(0x1bd),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0x45b11c}),_0x3e794f[_0x51cedb(0x1b1)]((_0x23ce74,_0x5a021e)=>_0x23ce74[_0x51cedb(0x192)]-_0x5a021e[_0x51cedb(0x192)]);}function stripSqlNoise(_0x15c3e9){const _0x3a2de5=a248_0x18e4,_0x5c5d4c=Array[_0x3a2de5(0x1a1)](_0x15c3e9),_0x233ee3=(_0x4c913b,_0x3ff1a3)=>{for(let _0x16b88e=_0x4c913b;_0x16b88e<_0x3ff1a3;_0x16b88e+=0x1){_0x5c5d4c[_0x16b88e]!=='\x0a'&&_0x5c5d4c[_0x16b88e]!=='\x0d'&&(_0x5c5d4c[_0x16b88e]='\x20');}};for(let _0x33cc6e=0x0;_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)];_0x33cc6e+=0x1){const _0x165677=_0x5c5d4c[_0x33cc6e],_0x120e87=_0x5c5d4c[_0x33cc6e+0x1];if(_0x165677==='\x27'||_0x165677==='\x22'||_0x165677==='`'){const _0x558342=_0x165677,_0x5121ca=_0x33cc6e;_0x33cc6e+=0x1;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]){if(_0x5c5d4c[_0x33cc6e]==='\x5c'&&_0x33cc6e+0x1<_0x5c5d4c[_0x3a2de5(0x1b5)]){_0x33cc6e+=0x2;continue;}if(_0x5c5d4c[_0x33cc6e]!==_0x558342){_0x33cc6e+=0x1;continue;}if(_0x5c5d4c[_0x33cc6e+0x1]===_0x558342){_0x33cc6e+=0x2;continue;}break;}if(_0x558342==='\x27')_0x233ee3(_0x5121ca,Math[_0x3a2de5(0x194)](_0x33cc6e+0x1,_0x5c5d4c[_0x3a2de5(0x1b5)]));continue;}if(_0x165677==='-'&&_0x120e87==='-'){const _0x1bd2c6=_0x33cc6e;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]&&_0x5c5d4c[_0x33cc6e]!=='\x0a')_0x33cc6e+=0x1;_0x233ee3(_0x1bd2c6,_0x33cc6e);continue;}if(_0x165677==='/'&&_0x120e87==='*'){const _0x129135=_0x33cc6e;_0x33cc6e+=0x2;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]&&!(_0x5c5d4c[_0x33cc6e]==='*'&&_0x5c5d4c[_0x33cc6e+0x1]==='/')){_0x33cc6e+=0x1;}_0x33cc6e=Math[_0x3a2de5(0x194)](_0x33cc6e+0x1,_0x5c5d4c[_0x3a2de5(0x1b5)]-0x1),_0x233ee3(_0x129135,_0x33cc6e+0x1);continue;}if(_0x165677==='#'&&_0x120e87!=='{'){const _0x399194=_0x33cc6e;while(_0x33cc6e<_0x5c5d4c['length']&&_0x5c5d4c[_0x33cc6e]!=='\x0a')_0x33cc6e+=0x1;_0x233ee3(_0x399194,_0x33cc6e);continue;}if((_0x165677==='#'||_0x165677==='$')&&_0x120e87==='{'){const _0x34439f=_0x33cc6e;_0x33cc6e+=0x2;while(_0x33cc6e<_0x5c5d4c[_0x3a2de5(0x1b5)]&&_0x5c5d4c[_0x33cc6e]!=='}')_0x33cc6e+=0x1;_0x233ee3(_0x34439f,Math['min'](_0x33cc6e+0x1,_0x5c5d4c[_0x3a2de5(0x1b5)]));}}return _0x5c5d4c[_0x3a2de5(0x179)]('');}function maskQuotedIdentifiers(_0x52b3f3){const _0x52cc76=a248_0x18e4,_0x591811=Array[_0x52cc76(0x1a1)](_0x52b3f3);for(let _0x254197=0x0;_0x254197<_0x591811[_0x52cc76(0x1b5)];_0x254197+=0x1){const _0x35ce6f=_0x591811[_0x254197];if(_0x35ce6f!=='\x22'&&_0x35ce6f!=='`')continue;_0x254197+=0x1;while(_0x254197<_0x591811['length']){if(_0x591811[_0x254197]===_0x35ce6f){if(_0x591811[_0x254197+0x1]===_0x35ce6f){_0x591811[_0x254197]='\x20',_0x591811[_0x254197+0x1]='\x20',_0x254197+=0x2;continue;}break;}_0x591811[_0x254197]='\x20',_0x254197+=0x1;}}return _0x591811[_0x52cc76(0x179)]('');}function maskNestedQueries(_0x383a01){const _0x182f0a=a248_0x18e4,_0x21232f=Array[_0x182f0a(0x1a1)](_0x383a01);for(let _0x60bf39=0x0;_0x60bf39<_0x21232f[_0x182f0a(0x1b5)];_0x60bf39+=0x1){if(_0x21232f[_0x60bf39]!=='(')continue;const _0x56789b=_0x383a01[_0x182f0a(0x18a)](_0x60bf39+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x56789b))continue;let _0x5a84eb=0x1,_0x46519b=_0x60bf39+0x1;for(;_0x46519b<_0x21232f[_0x182f0a(0x1b5)]&&_0x5a84eb>0x0;_0x46519b+=0x1){if(_0x21232f[_0x46519b]==='(')_0x5a84eb+=0x1;if(_0x21232f[_0x46519b]===')')_0x5a84eb-=0x1;}if(_0x5a84eb!==0x0)continue;for(let _0x3d8946=_0x60bf39;_0x3d8946<_0x46519b;_0x3d8946+=0x1){_0x21232f[_0x3d8946]='\x20';}const _0xd200cf=_0x182f0a(0x1ac);for(let _0x3b701d=0x0;_0x3b701d<_0xd200cf[_0x182f0a(0x1b5)]&&_0x60bf39+_0x3b701d<_0x46519b;_0x3b701d+=0x1){_0x21232f[_0x60bf39+_0x3b701d]=_0xd200cf[_0x3b701d];}_0x60bf39=_0x46519b-0x1;}return _0x21232f['join']('');}function splitTopLevelAnd(_0x2940b3){const _0x5b12b7=a248_0x18e4,_0x32c144=[];let _0x555fdc=0x0,_0x1c3949=0x0;for(let _0x26c737=0x0;_0x26c737<_0x2940b3[_0x5b12b7(0x1b5)];_0x26c737+=0x1){const _0x1969be=_0x2940b3[_0x26c737];if(_0x1969be==='(')_0x555fdc+=0x1;if(_0x1969be===')')_0x555fdc=Math[_0x5b12b7(0x1ba)](0x0,_0x555fdc-0x1);_0x555fdc===0x0&&_0x2940b3[_0x5b12b7(0x18a)](_0x26c737)['match'](/^AND\b/i)&&(_0x26c737===0x0||/\s/[_0x5b12b7(0x17e)](_0x2940b3[_0x26c737-0x1]??''))&&(_0x32c144[_0x5b12b7(0x1a0)](_0x2940b3[_0x5b12b7(0x18a)](_0x1c3949,_0x26c737)[_0x5b12b7(0x17d)]()),_0x26c737+=0x2,_0x1c3949=_0x26c737+0x1);}const _0x22dee4=_0x2940b3[_0x5b12b7(0x18a)](_0x1c3949)['trim']();if(_0x22dee4)_0x32c144['push'](_0x22dee4);return _0x32c144;}function a248_0x18e4(_0x29e141,_0x2c9265){_0x29e141=_0x29e141-0x175;const _0x436e30=a248_0x436e();let _0x18e45f=_0x436e30[_0x29e141];return _0x18e45f;}function hasTopLevelKeyword(_0x18a32d,_0x3e3264){const _0x3b1f2d=a248_0x18e4;let _0x5350a5=0x0;for(let _0x3da165=0x0;_0x3da165<_0x18a32d['length'];_0x3da165+=0x1){const _0x4ae360=_0x18a32d[_0x3da165];if(_0x4ae360==='(')_0x5350a5+=0x1;if(_0x4ae360===')')_0x5350a5=Math['max'](0x0,_0x5350a5-0x1);if(_0x5350a5!==0x0)continue;const _0x2bf0a9=_0x18a32d[_0x3b1f2d(0x18a)](_0x3da165,_0x3da165+_0x3e3264[_0x3b1f2d(0x1b5)]),_0x2cdd91=_0x18a32d[_0x3da165-0x1]??'\x20',_0x343a15=_0x18a32d[_0x3da165+_0x3e3264[_0x3b1f2d(0x1b5)]]??'\x20';if(_0x2bf0a9['toUpperCase']()===_0x3e3264[_0x3b1f2d(0x178)]()&&!/[\w$]/[_0x3b1f2d(0x17e)](_0x2cdd91)&&!/[\w$]/[_0x3b1f2d(0x17e)](_0x343a15))return!![];}return![];}function splitEquality(_0x5e8cfb){const _0x187071=a248_0x18e4,_0x141029=stripOuterParentheses(_0x5e8cfb);let _0x58d676=0x0,_0x669beb;for(let _0xd90466=0x0;_0xd90466<_0x141029[_0x187071(0x1b5)];_0xd90466+=0x1){const _0x8d43e7=_0x141029[_0xd90466];if(_0x8d43e7==='(')_0x58d676+=0x1;if(_0x8d43e7===')')_0x58d676=Math['max'](0x0,_0x58d676-0x1);const _0xf5d4c2=_0x141029[_0xd90466-0x1]??'',_0x5f0b7d=_0x141029[_0xd90466+0x1]??'';if(_0x8d43e7==='='&&_0x58d676===0x0&&!/[!<>=:]/[_0x187071(0x17e)](_0xf5d4c2)&&_0x5f0b7d!=='='){if(_0x669beb!==undefined)return null;_0x669beb=_0xd90466;}}return _0x669beb===undefined?null:[_0x141029[_0x187071(0x18a)](0x0,_0x669beb)[_0x187071(0x17d)](),_0x141029[_0x187071(0x18a)](_0x669beb+0x1)[_0x187071(0x17d)]()];}function a248_0x436e(){const _0x58a6b0=['covered','min','split','INNER','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','353530BodwMW','reduce','toLowerCase','indexOf','cross','map','table','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','push','from','natural','right','where','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','includes','warning','containsUnresolvedInclude','alias','(?:^|[^\x5cw$])','add','__sq__','indexes','\x5cs*\x5c.\x5cs*[\x5cw$]+','1353264koXTtK','matchAll','sort','INDEX_METADATA_UNAVAILABLE','103661NGmXBw','error','length','matchedPrefix','193506ScqbSN','inner','tableName','max','columns','index','unknown','5486CxJwFY','sql','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','toUpperCase','join','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','replaceAll','15PJEfXY','trim','test','using','528332NyBmaP','exec','has','filter','JOIN_INDEX_MISSING','some','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','unsupportedPredicate','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','slice','\x5c$&','replace','full','1048775nrXhuX','left','45XfkKrh','63ogDKPM','position'];a248_0x436e=function(){return _0x58a6b0;};return a248_0x436e();}function parseDirectColumnReference(_0xc25588,_0x3536cc){const _0x1f26ff=a248_0x18e4,_0x255f4b=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x1f26ff(0x181)](stripOuterParentheses(_0xc25588));if(!_0x255f4b)return null;if(normalizeIdentifier(_0x255f4b[0x1]??'')!==normalizeIdentifier(_0x3536cc))return null;return normalizeIdentifier(_0x255f4b[0x2]??'');}function containsColumnReference(_0x29a45c,_0x4ebfa8){const _0x8be37e=a248_0x18e4,_0x403d86=_0x29a45c['replace'](/[`"]/g,''),_0xb700f6=_0x4ebfa8[_0x8be37e(0x18c)](/[.*+?^${}()|[\]\\]/g,_0x8be37e(0x18b));return new RegExp(_0x8be37e(0x1aa)+_0xb700f6+_0x8be37e(0x1ae),'i')['test'](_0x403d86);}function findEqualityPrefix(_0x14a156,_0x150291){const _0x445375=a248_0x18e4,_0x208b23=new Set(_0x150291[_0x445375(0x19d)](normalizeIdentifier)),_0x52139a=[];for(const _0x435862 of _0x14a156){if(!_0x208b23[_0x445375(0x182)](normalizeIdentifier(_0x435862)))break;_0x52139a['push'](_0x435862);}return _0x52139a;}function resolveTableMetadata(_0x34a1e1,_0x48645f){const _0x3e9c9a=a248_0x18e4,_0x1ec03b=normalizeIdentifier(_0x48645f),_0x3c3387=_0x34a1e1[_0x3e9c9a(0x183)](_0x46681b=>normalizeIdentifier(_0x46681b['tableName'])===_0x1ec03b);if(_0x3c3387[_0x3e9c9a(0x1b5)]===0x1)return _0x3c3387[0x0];const _0x5d3244=_0x1ec03b[_0x3e9c9a(0x1a6)]('.'),_0x477606=_0x1ec03b[_0x3e9c9a(0x195)]('.')['at'](-0x1),_0x4dae43=_0x34a1e1[_0x3e9c9a(0x183)](_0x20ef81=>{const _0x4359ec=_0x3e9c9a,_0x81aecf=normalizeIdentifier(_0x20ef81[_0x4359ec(0x1b9)]);if(_0x5d3244&&_0x81aecf[_0x4359ec(0x1a6)]('.'))return![];return _0x81aecf[_0x4359ec(0x195)]('.')['at'](-0x1)===_0x477606;});return _0x4dae43[_0x3e9c9a(0x1b5)]===0x1?_0x4dae43[0x0]:undefined;}function columnNamesMatch(_0x40bb3f,_0x462b3d){return normalizeIdentifier(_0x40bb3f)===normalizeIdentifier(_0x462b3d);}function normalizeIdentifier(_0x509e81){const _0x23add5=a248_0x18e4;return _0x509e81['replace'](/[`"]/g,'')[_0x23add5(0x17d)]()[_0x23add5(0x19a)]();}function isSqlClauseKeyword(_0x5017aa){const _0x52a941=a248_0x18e4;return new Set(['on',_0x52a941(0x17f),_0x52a941(0x1a4),'join',_0x52a941(0x1b8),_0x52a941(0x18f),_0x52a941(0x1a3),_0x52a941(0x18d),_0x52a941(0x19c),_0x52a941(0x1a2)])[_0x52a941(0x182)](_0x5017aa);}function stripOuterParentheses(_0x5c9604){const _0x428250=a248_0x18e4;let _0x144ffc=_0x5c9604['trim']();while(_0x144ffc['startsWith']('(')&&_0x144ffc['endsWith'](')')){let _0x1fae10=0x0,_0x2fde95=!![];for(let _0xacd619=0x0;_0xacd619<_0x144ffc[_0x428250(0x1b5)];_0xacd619+=0x1){if(_0x144ffc[_0xacd619]==='(')_0x1fae10+=0x1;if(_0x144ffc[_0xacd619]===')')_0x1fae10-=0x1;if(_0x1fae10===0x0&&_0xacd619<_0x144ffc[_0x428250(0x1b5)]-0x1){_0x2fde95=![];break;}}if(!_0x2fde95||_0x1fae10!==0x0)break;_0x144ffc=_0x144ffc[_0x428250(0x18a)](0x1,-0x1)[_0x428250(0x17d)]();}return _0x144ffc;}
@@ -1 +1 @@
1
- const a244_0x51f73c=a244_0x42a2;(function(_0xf791d,_0xa52362){const _0x314fab=a244_0x42a2,_0x395765=_0xf791d();while(!![]){try{const _0x5a5f05=parseInt(_0x314fab(0x16e))/0x1+-parseInt(_0x314fab(0x173))/0x2*(-parseInt(_0x314fab(0x178))/0x3)+-parseInt(_0x314fab(0x174))/0x4*(-parseInt(_0x314fab(0x17b))/0x5)+-parseInt(_0x314fab(0x17d))/0x6+parseInt(_0x314fab(0x177))/0x7*(-parseInt(_0x314fab(0x16f))/0x8)+parseInt(_0x314fab(0x172))/0x9*(parseInt(_0x314fab(0x175))/0xa)+-parseInt(_0x314fab(0x176))/0xb*(-parseInt(_0x314fab(0x171))/0xc);if(_0x5a5f05===_0xa52362)break;else _0x395765['push'](_0x395765['shift']());}catch(_0x51c1a7){_0x395765['push'](_0x395765['shift']());}}}(a244_0xd683,0xeb14b));function a244_0x42a2(_0x5c3ceb,_0x5760e7){_0x5c3ceb=_0x5c3ceb-0x16e;const _0xd68329=a244_0xd683();let _0x42a256=_0xd68329[_0x5c3ceb];return _0x42a256;}import{resolve}from'node:path';function a244_0xd683(){const _0x351b73=['4890lhrlwa','11VcIhBm','3342759gDAQUd','3EDOgVc','.rabetbase','sql-trash','2165215cYOttr','sql.lock.json','8097450ipGqeR','164140xRnlDz','8cMjBjo','sql','8101032eeNWGk','3762wGDPlo','28406nJUkHf','16UYvDhH'];a244_0xd683=function(){return _0x351b73;};return a244_0xd683();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a244_0x51f73c(0x179),LOCK_FILE_NAME=a244_0x51f73c(0x17c),TRASH_DIR_NAME=a244_0x51f73c(0x17a);export function loadSqlProjectConfig(_0x54997c,_0x4bfa6b){const _0x4020f1=a244_0x51f73c,_0x4be0bd=resolve(_0x4bfa6b??findProjectRootDirectory()),_0x2b1cd6=DOT_DIR+'/sql',_0x1f004d=_0x2b1cd6+'/'+_0x54997c;return{'projectRoot':_0x4be0bd,'appCode':_0x54997c,'sqlWorkspaceRoot':_0x2b1cd6,'sqlRoot':_0x1f004d,'sqlRootDir':resolve(_0x4be0bd,DOT_DIR,_0x4020f1(0x170),_0x54997c),'lockFilePath':resolve(_0x4be0bd,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4be0bd,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a249_0x467b38=a249_0x4a26;function a249_0x4a26(_0x1b39d3,_0x155798){_0x1b39d3=_0x1b39d3-0x115;const _0x252348=a249_0x2523();let _0x4a2682=_0x252348[_0x1b39d3];return _0x4a2682;}(function(_0x5cc6ed,_0x2c0f77){const _0x5e7b7a=a249_0x4a26,_0x26689a=_0x5cc6ed();while(!![]){try{const _0x39e97d=parseInt(_0x5e7b7a(0x117))/0x1*(-parseInt(_0x5e7b7a(0x120))/0x2)+-parseInt(_0x5e7b7a(0x11b))/0x3*(parseInt(_0x5e7b7a(0x121))/0x4)+-parseInt(_0x5e7b7a(0x11e))/0x5+parseInt(_0x5e7b7a(0x11c))/0x6+-parseInt(_0x5e7b7a(0x11a))/0x7+-parseInt(_0x5e7b7a(0x115))/0x8+parseInt(_0x5e7b7a(0x11f))/0x9;if(_0x39e97d===_0x2c0f77)break;else _0x26689a['push'](_0x26689a['shift']());}catch(_0x1442a9){_0x26689a['push'](_0x26689a['shift']());}}}(a249_0x2523,0x773c5));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a249_0x467b38(0x11d),LOCK_FILE_NAME=a249_0x467b38(0x118),TRASH_DIR_NAME=a249_0x467b38(0x116);export function loadSqlProjectConfig(_0x5204f2,_0x42503d){const _0x2fca33=a249_0x467b38,_0x29e2fd=resolve(_0x42503d??findProjectRootDirectory()),_0x52c546=DOT_DIR+_0x2fca33(0x119),_0x195057=_0x52c546+'/'+_0x5204f2;return{'projectRoot':_0x29e2fd,'appCode':_0x5204f2,'sqlWorkspaceRoot':_0x52c546,'sqlRoot':_0x195057,'sqlRootDir':resolve(_0x29e2fd,DOT_DIR,'sql',_0x5204f2),'lockFilePath':resolve(_0x29e2fd,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x29e2fd,DOT_DIR,TRASH_DIR_NAME)};}function a249_0x2523(){const _0x3f6792=['.rabetbase','3188425WReHvT','22559112vtIQrO','3246TYOLDk','2324vLoNFi','5348904NLaVde','sql-trash','154mBWdnD','sql.lock.json','/sql','5534508IqcHzK','2133SvyUat','4450776xlYBVW'];a249_0x2523=function(){return _0x3f6792;};return a249_0x2523();}
@@ -1 +1 @@
1
- (function(_0x4f9b85,_0x432302){const _0x4edf1d=a245_0x1200,_0x5a3019=_0x4f9b85();while(!![]){try{const _0x3b9ced=-parseInt(_0x4edf1d(0xae))/0x1+parseInt(_0x4edf1d(0xc2))/0x2+parseInt(_0x4edf1d(0xb1))/0x3+parseInt(_0x4edf1d(0xb5))/0x4+parseInt(_0x4edf1d(0xbd))/0x5*(parseInt(_0x4edf1d(0xab))/0x6)+-parseInt(_0x4edf1d(0xb6))/0x7+-parseInt(_0x4edf1d(0xbf))/0x8*(parseInt(_0x4edf1d(0xc0))/0x9);if(_0x3b9ced===_0x432302)break;else _0x5a3019['push'](_0x5a3019['shift']());}catch(_0x360c21){_0x5a3019['push'](_0x5a3019['shift']());}}}(a245_0x17c7,0x2b106));function a245_0x1200(_0x13bc94,_0x26e769){_0x13bc94=_0x13bc94-0xa8;const _0x17c777=a245_0x17c7();let _0x12007f=_0x17c777[_0x13bc94];return _0x12007f;}import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x23dab8){const _0x361976=a245_0x1200;if(_0x23dab8===_0x361976(0xa8))return _0x361976(0xc4);if(_0x23dab8===_0x361976(0xb9))return _0x361976(0xad);return undefined;}async function scanSqlFilesRecursively(_0x2d69c8,_0x1d478c){const _0x476d33=a245_0x1200,_0x229828=[];try{const _0x2cfd4b=await readdir(_0x2d69c8,{'withFileTypes':!![]});for(const _0x1d2567 of _0x2cfd4b){const _0x5f165b=join(_0x2d69c8,_0x1d2567[_0x476d33(0xac)]);if(_0x1d2567[_0x476d33(0xb0)]()){_0x229828['push'](...await scanSqlFilesRecursively(_0x5f165b,_0x1d478c));continue;}if(!_0x1d2567[_0x476d33(0xb2)]())continue;const _0x24b131=extname(_0x1d2567[_0x476d33(0xac)])['toLowerCase'](),_0x4b7248=extensionToMode(_0x24b131);if(!_0x4b7248)continue;const _0x38178c=relative(_0x1d478c,_0x5f165b)[_0x476d33(0xbb)](/\\/g,'/'),_0x14153b=_0x38178c[_0x476d33(0xaa)]('/')['filter'](Boolean),_0x404eaf=parseSqlPath(_0x14153b,_0x1d2567[_0x476d33(0xac)],_0x24b131);if(!_0x404eaf)continue;_0x229828['push']({'sqlCode':_0x404eaf[_0x476d33(0xaf)],'sqlName':_0x404eaf['sqlName'],'dbDirectory':_0x14153b[0x0],'filePath':_0x5f165b,'relativePath':_0x38178c,'lockKey':_0x404eaf[_0x476d33(0xaf)],'mode':_0x4b7248});}}catch(_0x23161a){if(_0x23161a[_0x476d33(0xb7)]!=='ENOENT')throw _0x23161a;}return _0x229828;}export async function scanLocalSqlQueries(_0x2fb98d){const _0x36edd3=a245_0x1200;return scanSqlFilesRecursively(_0x2fb98d[_0x36edd3(0xbe)],_0x2fb98d['sqlRootDir']);}export function resolveLocalSqlFilePath(_0xc87594,_0x5ec9ad,_0x241b1d){const _0x2980a0=a245_0x1200,_0x165463=_0x241b1d?.[_0x2980a0(0xb4)]||(_0x241b1d?.['sqlName']||_0x241b1d?.[_0x2980a0(0xb8)]?buildSqlRelativePath(_0x5ec9ad,_0x241b1d?.[_0x2980a0(0xb3)],_0x241b1d?.['dbName'],_0x241b1d?.[_0x2980a0(0xbc)]||'sql',_0x241b1d?.[_0x2980a0(0xa9)]):buildDefaultSqlFileName(_0x5ec9ad,_0x241b1d?.[_0x2980a0(0xbc)]||'sql'));return join(_0xc87594['sqlRootDir'],_0x165463);}export async function directoryExists(_0x114198){try{const _0x17476a=await stat(_0x114198);return _0x17476a['isDirectory']();}catch{return![];}}function a245_0x17c7(){const _0x5ca208=['isFile','sqlName','path','533788cUboqr','208411imoiki','code','dbName','.xml','slice','replace','mode','75zVOyHg','sqlRootDir','194872QqzXMw','126rBhNpQ','indexOf','147228ynNPAn','length','sql','.sql','dbId','split','94788LKIkwW','name','mybatisXml','10266NktPWC','sqlCode','isDirectory','340272TfaiMm'];a245_0x17c7=function(){return _0x5ca208;};return a245_0x17c7();}function parseSqlPath(_0x4953ff,_0x14823a,_0x4f619e){const _0x2b62f8=a245_0x1200,_0x1f6177=_0x14823a[_0x2b62f8(0xba)](0x0,-_0x4f619e['length']);if(_0x4953ff[_0x2b62f8(0xc3)]<0x2)return null;const _0x41f59e=_0x1f6177[_0x2b62f8(0xc1)]('_');if(_0x41f59e<=0x0||_0x41f59e>=_0x1f6177[_0x2b62f8(0xc3)]-0x1)return null;const _0x23c5a4=_0x1f6177[_0x2b62f8(0xba)](0x0,_0x41f59e);if(!isLikelySqlCode(_0x23c5a4))return null;return{'sqlCode':_0x23c5a4,'sqlName':_0x1f6177[_0x2b62f8(0xba)](_0x41f59e+0x1)};}function isLikelySqlCode(_0xb9209d){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0xb9209d);}
1
+ (function(_0x48e86c,_0x347e5d){const _0x158d5b=a250_0x5877,_0x1b681d=_0x48e86c();while(!![]){try{const _0x43625c=parseInt(_0x158d5b(0x184))/0x1*(-parseInt(_0x158d5b(0x169))/0x2)+parseInt(_0x158d5b(0x17b))/0x3*(parseInt(_0x158d5b(0x185))/0x4)+-parseInt(_0x158d5b(0x171))/0x5*(-parseInt(_0x158d5b(0x186))/0x6)+-parseInt(_0x158d5b(0x16b))/0x7*(-parseInt(_0x158d5b(0x174))/0x8)+-parseInt(_0x158d5b(0x178))/0x9*(-parseInt(_0x158d5b(0x176))/0xa)+-parseInt(_0x158d5b(0x172))/0xb+-parseInt(_0x158d5b(0x17d))/0xc;if(_0x43625c===_0x347e5d)break;else _0x1b681d['push'](_0x1b681d['shift']());}catch(_0x19f6ce){_0x1b681d['push'](_0x1b681d['shift']());}}}(a250_0x3ab5,0x2113a));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';function a250_0x5877(_0x3d1633,_0x5b537f){_0x3d1633=_0x3d1633-0x168;const _0x3ab555=a250_0x3ab5();let _0x5877c1=_0x3ab555[_0x3d1633];return _0x5877c1;}import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x4dc634){const _0x3e76fb=a250_0x5877;if(_0x4dc634===_0x3e76fb(0x17e))return _0x3e76fb(0x16c);if(_0x4dc634===_0x3e76fb(0x168))return'mybatisXml';return undefined;}async function scanSqlFilesRecursively(_0x31e946,_0xa5fa8a){const _0xb24f7e=a250_0x5877,_0x2d72e5=[];try{const _0x50146c=await readdir(_0x31e946,{'withFileTypes':!![]});for(const _0x3b423a of _0x50146c){const _0x23b558=join(_0x31e946,_0x3b423a[_0xb24f7e(0x180)]);if(_0x3b423a['isDirectory']()){_0x2d72e5['push'](...await scanSqlFilesRecursively(_0x23b558,_0xa5fa8a));continue;}if(!_0x3b423a['isFile']())continue;const _0x508cfe=extname(_0x3b423a['name'])[_0xb24f7e(0x189)](),_0x472d3c=extensionToMode(_0x508cfe);if(!_0x472d3c)continue;const _0x1d20ba=relative(_0xa5fa8a,_0x23b558)[_0xb24f7e(0x16d)](/\\/g,'/'),_0x3da126=_0x1d20ba[_0xb24f7e(0x17f)]('/')[_0xb24f7e(0x188)](Boolean),_0xd7dafe=parseSqlPath(_0x3da126,_0x3b423a[_0xb24f7e(0x180)],_0x508cfe);if(!_0xd7dafe)continue;_0x2d72e5[_0xb24f7e(0x179)]({'sqlCode':_0xd7dafe[_0xb24f7e(0x16e)],'sqlName':_0xd7dafe[_0xb24f7e(0x17a)],'dbDirectory':_0x3da126[0x0],'filePath':_0x23b558,'relativePath':_0x1d20ba,'lockKey':_0xd7dafe[_0xb24f7e(0x16e)],'mode':_0x472d3c});}}catch(_0x45301f){if(_0x45301f[_0xb24f7e(0x16f)]!==_0xb24f7e(0x181))throw _0x45301f;}return _0x2d72e5;}export async function scanLocalSqlQueries(_0x56f680){const _0x2338a5=a250_0x5877;return scanSqlFilesRecursively(_0x56f680[_0x2338a5(0x173)],_0x56f680[_0x2338a5(0x173)]);}export function resolveLocalSqlFilePath(_0x1bdda8,_0x22b2ea,_0x2c6cf5){const _0x30b1ff=a250_0x5877,_0x2b342a=_0x2c6cf5?.[_0x30b1ff(0x170)]||(_0x2c6cf5?.[_0x30b1ff(0x17a)]||_0x2c6cf5?.[_0x30b1ff(0x183)]?buildSqlRelativePath(_0x22b2ea,_0x2c6cf5?.[_0x30b1ff(0x17a)],_0x2c6cf5?.['dbName'],_0x2c6cf5?.['mode']||_0x30b1ff(0x16c),_0x2c6cf5?.[_0x30b1ff(0x175)]):buildDefaultSqlFileName(_0x22b2ea,_0x2c6cf5?.[_0x30b1ff(0x182)]||_0x30b1ff(0x16c)));return join(_0x1bdda8[_0x30b1ff(0x173)],_0x2b342a);}function a250_0x3ab5(){const _0x1b28cd=['.sql','split','name','ENOENT','mode','dbName','12mgNcdg','4hIEbPp','9060JYXcPw','length','filter','toLowerCase','.xml','9754jjIPQi','slice','4186IgEgYd','sql','replace','sqlCode','code','path','130FZlOEt','2818706NRgruw','sqlRootDir','2648lViJFh','dbId','370UlOqXT','indexOf','57159tBUgUE','push','sqlName','483213IYCvFf','test','2196048TQmRiz'];a250_0x3ab5=function(){return _0x1b28cd;};return a250_0x3ab5();}export async function directoryExists(_0x347447){try{const _0xfabc28=await stat(_0x347447);return _0xfabc28['isDirectory']();}catch{return![];}}function parseSqlPath(_0x420e76,_0x340717,_0x44bff7){const _0x4e3d8e=a250_0x5877,_0x3d44f9=_0x340717['slice'](0x0,-_0x44bff7[_0x4e3d8e(0x187)]);if(_0x420e76[_0x4e3d8e(0x187)]<0x2)return null;const _0x2019a0=_0x3d44f9[_0x4e3d8e(0x177)]('_');if(_0x2019a0<=0x0||_0x2019a0>=_0x3d44f9[_0x4e3d8e(0x187)]-0x1)return null;const _0x489dd8=_0x3d44f9[_0x4e3d8e(0x16a)](0x0,_0x2019a0);if(!isLikelySqlCode(_0x489dd8))return null;return{'sqlCode':_0x489dd8,'sqlName':_0x3d44f9['slice'](_0x2019a0+0x1)};}function isLikelySqlCode(_0x2c72a6){const _0x3d3245=a250_0x5877;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x3d3245(0x17c)](_0x2c72a6);}
@@ -1 +1 @@
1
- function a246_0x33f4(_0xbe6b14,_0x449e9e){_0xbe6b14=_0xbe6b14-0x15c;const _0x291cc8=a246_0x291c();let _0x33f4d5=_0x291cc8[_0xbe6b14];return _0x33f4d5;}(function(_0x563c72,_0x6fbec0){const _0x4daff0=a246_0x33f4,_0x485232=_0x563c72();while(!![]){try{const _0x4964cc=parseInt(_0x4daff0(0x16a))/0x1+-parseInt(_0x4daff0(0x15e))/0x2+parseInt(_0x4daff0(0x163))/0x3+parseInt(_0x4daff0(0x15f))/0x4*(-parseInt(_0x4daff0(0x161))/0x5)+-parseInt(_0x4daff0(0x165))/0x6*(-parseInt(_0x4daff0(0x160))/0x7)+parseInt(_0x4daff0(0x169))/0x8*(-parseInt(_0x4daff0(0x168))/0x9)+-parseInt(_0x4daff0(0x164))/0xa*(-parseInt(_0x4daff0(0x167))/0xb);if(_0x4964cc===_0x6fbec0)break;else _0x485232['push'](_0x485232['shift']());}catch(_0x1fbf6d){_0x485232['push'](_0x485232['shift']());}}}(a246_0x291c,0xcaa56));import{readFile}from'node:fs/promises';import a246_0xfcc007 from'node:crypto';function a246_0x291c(){const _0x481eb2=['2426168exTMMj','1096072ZuFtAR','digest','createHash','349592GWshZp','4hPLEgs','76909pQGxSl','6284705qGoUKY','md5','2049573DZHXLD','993940OhXZJC','6kQTTaZ','utf8','220EfKZzZ','45eAvyBQ'];a246_0x291c=function(){return _0x481eb2;};return a246_0x291c();}export function computeSqlContentHash(_0x3e370c){const _0x342e1d=a246_0x33f4;return a246_0xfcc007[_0x342e1d(0x15d)](_0x342e1d(0x162))['update'](_0x3e370c)[_0x342e1d(0x15c)]('hex');}export async function computeSqlFileHash(_0x23c033){const _0x5613fa=a246_0x33f4,_0x49005a=await readFile(_0x23c033,_0x5613fa(0x166));return computeSqlContentHash(_0x49005a);}
1
+ (function(_0x427a82,_0xfa218d){const _0x1f747b=a251_0xb1d2,_0x520f9e=_0x427a82();while(!![]){try{const _0x2ded2a=parseInt(_0x1f747b(0xce))/0x1+-parseInt(_0x1f747b(0xca))/0x2+-parseInt(_0x1f747b(0xc9))/0x3+-parseInt(_0x1f747b(0xcd))/0x4*(-parseInt(_0x1f747b(0xc8))/0x5)+-parseInt(_0x1f747b(0xd0))/0x6+-parseInt(_0x1f747b(0xd2))/0x7+parseInt(_0x1f747b(0xcb))/0x8;if(_0x2ded2a===_0xfa218d)break;else _0x520f9e['push'](_0x520f9e['shift']());}catch(_0x50f92b){_0x520f9e['push'](_0x520f9e['shift']());}}}(a251_0x1db8,0x7e37d));function a251_0xb1d2(_0x5dc143,_0xac2fe1){_0x5dc143=_0x5dc143-0xc7;const _0x1db8fd=a251_0x1db8();let _0xb1d2c6=_0x1db8fd[_0x5dc143];return _0xb1d2c6;}import{readFile}from'node:fs/promises';import a251_0x557091 from'node:crypto';export function computeSqlContentHash(_0x393d72){const _0x4aa928=a251_0xb1d2;return a251_0x557091[_0x4aa928(0xc7)]('md5')[_0x4aa928(0xcc)](_0x393d72)['digest'](_0x4aa928(0xcf));}export async function computeSqlFileHash(_0x19503f){const _0x33a7ca=a251_0xb1d2,_0x4c0465=await readFile(_0x19503f,_0x33a7ca(0xd1));return computeSqlContentHash(_0x4c0465);}function a251_0x1db8(){const _0x4383c8=['1447182ZCQwZr','utf8','4360251nhXWrV','createHash','961325nOMcpi','2691051IANyLR','783884RkJset','11122472ehLcMa','update','16UMsnZp','510669VpsDWw','hex'];a251_0x1db8=function(){return _0x4383c8;};return a251_0x1db8();}
@@ -1 +1 @@
1
- (function(_0x56e654,_0x3977f4){const _0x2b3143=a247_0x5e13,_0x2113b6=_0x56e654();while(!![]){try{const _0x4e1530=-parseInt(_0x2b3143(0xa4))/0x1*(parseInt(_0x2b3143(0xac))/0x2)+-parseInt(_0x2b3143(0x99))/0x3*(parseInt(_0x2b3143(0x97))/0x4)+-parseInt(_0x2b3143(0xab))/0x5*(parseInt(_0x2b3143(0xa9))/0x6)+-parseInt(_0x2b3143(0x9e))/0x7*(parseInt(_0x2b3143(0xa0))/0x8)+parseInt(_0x2b3143(0xa1))/0x9*(parseInt(_0x2b3143(0xaa))/0xa)+-parseInt(_0x2b3143(0xa8))/0xb*(parseInt(_0x2b3143(0x9d))/0xc)+parseInt(_0x2b3143(0xa7))/0xd*(parseInt(_0x2b3143(0xad))/0xe);if(_0x4e1530===_0x3977f4)break;else _0x2113b6['push'](_0x2113b6['shift']());}catch(_0x5c9965){_0x2113b6['push'](_0x2113b6['shift']());}}}(a247_0x5871,0x3a737));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x46fa99,_0x451397,_0x4d6b4b,_0x2e6021){const _0x30f2ed=a247_0x5e13,_0x1b71ca=_0x46fa99??createEmptySqlLock();let _0x130911=_0x1b71ca[_0x30f2ed(0x9b)][_0x451397];if(!_0x130911)return _0x130911={'sqlRoot':_0x4d6b4b,'lastSync':'','sqls':{}},_0x1b71ca[_0x30f2ed(0x9b)][_0x451397]=_0x130911,{'lockData':_0x1b71ca,'appLock':_0x130911};if(!_0x130911[_0x30f2ed(0xa2)])_0x130911['sqlRoot']=_0x4d6b4b;else{if(_0x130911[_0x30f2ed(0xa2)]!==_0x4d6b4b)throw new Error(_0x2e6021+_0x30f2ed(0x95)+_0x4d6b4b+'\x22\x20vs\x20lock\x20\x22'+_0x130911[_0x30f2ed(0xa2)]+_0x30f2ed(0xa6)+_0x30f2ed(0x9a));}return!_0x130911[_0x30f2ed(0x9c)]&&(_0x130911[_0x30f2ed(0x9c)]={}),!_0x130911[_0x30f2ed(0x9f)]&&(_0x130911[_0x30f2ed(0x9f)]=''),{'lockData':_0x1b71ca,'appLock':_0x130911};}function a247_0x5e13(_0x4fc517,_0x4c499b){_0x4fc517=_0x4fc517-0x95;const _0x587177=a247_0x5871();let _0x5e1386=_0x587177[_0x4fc517];return _0x5e1386;}function a247_0x5871(){const _0x5d9f43=['13BzNfxL','4334165GcOHgJ','1899696uvzAdi','10BBZqKZ','5ykTDoC','414382EunFxS','13975948FCiuQy','code','ENOENT',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','utf8','1072hodNEZ','stringify','231rYZcir','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','apps','sqls','12GMDMOf','9905ZhWdfh','lastSync','616vPJRyA','2596914hPtCYI','sqlRoot','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','1gTafEX','parse','\x22.\x20'];a247_0x5871=function(){return _0x5d9f43;};return a247_0x5871();}export async function readSqlLockFile(_0x203206){const _0x8b4489=a247_0x5e13;try{const _0x49d640=await readFile(_0x203206,_0x8b4489(0x96));return JSON[_0x8b4489(0xa5)](_0x49d640);}catch(_0x112854){if(_0x112854[_0x8b4489(0xae)]===_0x8b4489(0xaf))return null;throw new Error(_0x8b4489(0xa3)+String(_0x112854));}}export async function writeSqlLockFile(_0x2732a3,_0x335888){const _0x2155ed=a247_0x5e13;await mkdir(dirname(_0x2732a3),{'recursive':!![]}),await writeFile(_0x2732a3,JSON[_0x2155ed(0x98)](_0x335888,null,0x2),'utf8');}
1
+ function a252_0x318e(){const _0x14d6f3=['3104490FmrxnE','927492XZQArY','apps','23154Yhpgff','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','parse',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','243JyXHQu','ENOENT','36104laEAXG','code','6lYtAxx','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','stringify','lastSync','801ixfSaG','\x22.\x20','1324442ZbByca','utf8','710156MVppvH','\x22\x20vs\x20lock\x20\x22','22qKEzcC','sqlRoot','1540470KygFuW'];a252_0x318e=function(){return _0x14d6f3;};return a252_0x318e();}(function(_0x17372d,_0x4ba62b){const _0x3591ac=a252_0x63ab,_0x540761=_0x17372d();while(!![]){try{const _0x237efe=-parseInt(_0x3591ac(0xc1))/0x1+-parseInt(_0x3591ac(0xc9))/0x2*(-parseInt(_0x3591ac(0xcd))/0x3)+-parseInt(_0x3591ac(0xc7))/0x4+parseInt(_0x3591ac(0xc5))/0x5+-parseInt(_0x3591ac(0xd1))/0x6*(-parseInt(_0x3591ac(0xbf))/0x7)+parseInt(_0x3591ac(0xcf))/0x8*(-parseInt(_0x3591ac(0xd5))/0x9)+-parseInt(_0x3591ac(0xc6))/0xa*(-parseInt(_0x3591ac(0xc3))/0xb);if(_0x237efe===_0x4ba62b)break;else _0x540761['push'](_0x540761['shift']());}catch(_0x34c50f){_0x540761['push'](_0x540761['shift']());}}}(a252_0x318e,0xade39));function a252_0x63ab(_0x4161c6,_0x2609b8){_0x4161c6=_0x4161c6-0xbf;const _0x318eb5=a252_0x318e();let _0x63ab6b=_0x318eb5[_0x4161c6];return _0x63ab6b;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0xa0d35e,_0x5117bf,_0x2cf0d8,_0x131079){const _0x2a2724=a252_0x63ab,_0x4a2301=_0xa0d35e??createEmptySqlLock();let _0x218266=_0x4a2301[_0x2a2724(0xc8)][_0x5117bf];if(!_0x218266)return _0x218266={'sqlRoot':_0x2cf0d8,'lastSync':'','sqls':{}},_0x4a2301[_0x2a2724(0xc8)][_0x5117bf]=_0x218266,{'lockData':_0x4a2301,'appLock':_0x218266};if(!_0x218266['sqlRoot'])_0x218266[_0x2a2724(0xc4)]=_0x2cf0d8;else{if(_0x218266[_0x2a2724(0xc4)]!==_0x2cf0d8)throw new Error(_0x131079+_0x2a2724(0xcc)+_0x2cf0d8+_0x2a2724(0xc2)+_0x218266[_0x2a2724(0xc4)]+_0x2a2724(0xd6)+_0x2a2724(0xca));}return!_0x218266['sqls']&&(_0x218266['sqls']={}),!_0x218266[_0x2a2724(0xd4)]&&(_0x218266[_0x2a2724(0xd4)]=''),{'lockData':_0x4a2301,'appLock':_0x218266};}export async function readSqlLockFile(_0x289cae){const _0xe0d22a=a252_0x63ab;try{const _0x3ed61=await readFile(_0x289cae,_0xe0d22a(0xc0));return JSON[_0xe0d22a(0xcb)](_0x3ed61);}catch(_0x666c96){if(_0x666c96[_0xe0d22a(0xd0)]===_0xe0d22a(0xce))return null;throw new Error(_0xe0d22a(0xd2)+String(_0x666c96));}}export async function writeSqlLockFile(_0x29c436,_0x3cfc55){const _0x2e8e9a=a252_0x63ab;await mkdir(dirname(_0x29c436),{'recursive':!![]}),await writeFile(_0x29c436,JSON[_0x2e8e9a(0xd3)](_0x3cfc55,null,0x2),'utf8');}
@@ -1 +1 @@
1
- function a249_0xe583(){const _0x1feb97=['14918780WmqVvT','140496xtGgQf','5715619DhzPls','replace','trim','385YkomJX','3765675CiZHoV','test','.sql','307824PAiMCf','db-','mybatisXml','unknown-db','5330nbKdux','2074932VPlpYs','3qeKXXD','189xdvwBi','.xml'];a249_0xe583=function(){return _0x1feb97;};return a249_0xe583();}(function(_0x51e8d1,_0x1023ec){const _0x5d9ada=a249_0x33b6,_0x59fe72=_0x51e8d1();while(!![]){try{const _0x252b8b=parseInt(_0x5d9ada(0x104))/0x1*(-parseInt(_0x5d9ada(0x10c))/0x2)+-parseInt(_0x5d9ada(0x10e))/0x3*(-parseInt(_0x5d9ada(0x10d))/0x4)+-parseInt(_0x5d9ada(0x105))/0x5+-parseInt(_0x5d9ada(0x108))/0x6+parseInt(_0x5d9ada(0x101))/0x7+-parseInt(_0x5d9ada(0x100))/0x8*(parseInt(_0x5d9ada(0x10f))/0x9)+parseInt(_0x5d9ada(0xff))/0xa;if(_0x252b8b===_0x1023ec)break;else _0x59fe72['push'](_0x59fe72['shift']());}catch(_0x30a7b9){_0x59fe72['push'](_0x59fe72['shift']());}}}(a249_0xe583,0x99496));export function detectSqlMode(_0x302df8){const _0xfda4c=a249_0x33b6,_0x411cb4=_0x302df8['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0xfda4c(0x106)](_0x411cb4))return _0xfda4c(0x10a);return'sql';}export function getSqlFileExtension(_0x4ae707){const _0x3cc14a=a249_0x33b6;return _0x4ae707===_0x3cc14a(0x10a)?_0x3cc14a(0x110):_0x3cc14a(0x107);}function a249_0x33b6(_0x149ce4,_0x9224b){_0x149ce4=_0x149ce4-0xff;const _0xe58313=a249_0xe583();let _0x33b60d=_0xe58313[_0x149ce4];return _0x33b60d;}export function buildDefaultSqlFileName(_0x444104,_0x505b1c){return''+_0x444104+getSqlFileExtension(_0x505b1c);}export function sanitizeSqlPathSegment(_0x3cba85,_0x2eb35f){const _0x271841=a249_0x33b6,_0x3638c4=String(_0x3cba85??'')[_0x271841(0x103)](),_0x41acb1=_0x3638c4[_0x271841(0x102)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x271841(0x102)](/\s+/g,'-')[_0x271841(0x102)](/-+/g,'-')[_0x271841(0x102)](/^\.+/,'')[_0x271841(0x102)](/\.+$/,'')[_0x271841(0x102)](/^-+/,'')[_0x271841(0x102)](/-+$/,'');return _0x41acb1||_0x2eb35f;}export function buildDbDirectoryName(_0x1cf15e,_0x3196c0){const _0x3a866f=a249_0x33b6;return sanitizeSqlPathSegment(_0x1cf15e,_0x3196c0!=null?_0x3a866f(0x109)+_0x3196c0:_0x3a866f(0x10b));}export function buildSqlRelativePath(_0x571f42,_0x1dd722,_0x8caf6,_0x57c7fe,_0xbd0828){const _0x4133f4=buildDbDirectoryName(_0x8caf6,_0xbd0828),_0x245cb8=sanitizeSqlPathSegment(_0x571f42,'unknown-sql'),_0x81a2f0=sanitizeSqlPathSegment(_0x1dd722,_0x245cb8);return _0x4133f4+'/'+_0x245cb8+'_'+_0x81a2f0+getSqlFileExtension(_0x57c7fe);}
1
+ (function(_0x1b4aa2,_0x37194b){const _0x2f4e5c=a254_0x31c0,_0x29bb80=_0x1b4aa2();while(!![]){try{const _0x3e93ab=-parseInt(_0x2f4e5c(0x97))/0x1+-parseInt(_0x2f4e5c(0x91))/0x2*(-parseInt(_0x2f4e5c(0xa1))/0x3)+parseInt(_0x2f4e5c(0x9e))/0x4+parseInt(_0x2f4e5c(0x94))/0x5*(parseInt(_0x2f4e5c(0xa6))/0x6)+parseInt(_0x2f4e5c(0x9a))/0x7*(-parseInt(_0x2f4e5c(0xa3))/0x8)+-parseInt(_0x2f4e5c(0x93))/0x9*(parseInt(_0x2f4e5c(0x92))/0xa)+-parseInt(_0x2f4e5c(0xa4))/0xb*(-parseInt(_0x2f4e5c(0x95))/0xc);if(_0x3e93ab===_0x37194b)break;else _0x29bb80['push'](_0x29bb80['shift']());}catch(_0x22d1dc){_0x29bb80['push'](_0x29bb80['shift']());}}}(a254_0x3e00,0x7af86));export function detectSqlMode(_0x327c82){const _0x42fe9f=a254_0x31c0,_0x2cd2ad=_0x327c82[_0x42fe9f(0x9b)]();if(/^<(select|insert|update|delete)\b/i[_0x42fe9f(0x9d)](_0x2cd2ad))return _0x42fe9f(0xa7);return _0x42fe9f(0xa0);}function a254_0x3e00(){const _0x13575b=['.xml','7JJyggs','trimStart','trim','test','3650080ZhKnfv','unknown-sql','sql','5667ZBUNec','replace','3856304kWWMYt','8456789YpNMYe','unknown-db','624756IcUiyD','mybatisXml','134HzudNX','1102440wJfZub','63VvysDl','40Dbzash','12uoYcDu','.sql','883458PyBOob','db-'];a254_0x3e00=function(){return _0x13575b;};return a254_0x3e00();}export function getSqlFileExtension(_0x480271){const _0x48819d=a254_0x31c0;return _0x480271==='mybatisXml'?_0x48819d(0x99):_0x48819d(0x96);}export function buildDefaultSqlFileName(_0x373d3e,_0x509db3){return''+_0x373d3e+getSqlFileExtension(_0x509db3);}export function sanitizeSqlPathSegment(_0x2d4644,_0x1235f9){const _0x2424ce=a254_0x31c0,_0x44937c=String(_0x2d4644??'')[_0x2424ce(0x9c)](),_0x528af0=_0x44937c[_0x2424ce(0xa2)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2424ce(0xa2)](/\s+/g,'-')[_0x2424ce(0xa2)](/-+/g,'-')[_0x2424ce(0xa2)](/^\.+/,'')[_0x2424ce(0xa2)](/\.+$/,'')['replace'](/^-+/,'')[_0x2424ce(0xa2)](/-+$/,'');return _0x528af0||_0x1235f9;}export function buildDbDirectoryName(_0x1e7ea7,_0x15ee93){const _0x1ec961=a254_0x31c0;return sanitizeSqlPathSegment(_0x1e7ea7,_0x15ee93!=null?_0x1ec961(0x98)+_0x15ee93:_0x1ec961(0xa5));}function a254_0x31c0(_0x5684db,_0x48772a){_0x5684db=_0x5684db-0x91;const _0x3e004a=a254_0x3e00();let _0x31c047=_0x3e004a[_0x5684db];return _0x31c047;}export function buildSqlRelativePath(_0x221fa9,_0x77a4d4,_0x54a5f8,_0x3dd18a,_0xd30604){const _0x44a44b=a254_0x31c0,_0x2ff5e0=buildDbDirectoryName(_0x54a5f8,_0xd30604),_0x2da619=sanitizeSqlPathSegment(_0x221fa9,_0x44a44b(0x9f)),_0x5d7a5a=sanitizeSqlPathSegment(_0x77a4d4,_0x2da619);return _0x2ff5e0+'/'+_0x2da619+'_'+_0x5d7a5a+getSqlFileExtension(_0x3dd18a);}
@@ -1 +1 @@
1
- const a250_0x2268fa=a250_0x23bf;(function(_0x4f74fa,_0x36cc80){const _0x56ecd7=a250_0x23bf,_0x1eef8d=_0x4f74fa();while(!![]){try{const _0x4919f=-parseInt(_0x56ecd7(0x1dc))/0x1+parseInt(_0x56ecd7(0x1ea))/0x2*(parseInt(_0x56ecd7(0x1b3))/0x3)+parseInt(_0x56ecd7(0x204))/0x4*(-parseInt(_0x56ecd7(0x1bc))/0x5)+-parseInt(_0x56ecd7(0x207))/0x6*(-parseInt(_0x56ecd7(0x1d2))/0x7)+-parseInt(_0x56ecd7(0x1b4))/0x8+parseInt(_0x56ecd7(0x1d6))/0x9*(-parseInt(_0x56ecd7(0x1f3))/0xa)+-parseInt(_0x56ecd7(0x1d4))/0xb*(-parseInt(_0x56ecd7(0x1cc))/0xc);if(_0x4919f===_0x36cc80)break;else _0x1eef8d['push'](_0x1eef8d['shift']());}catch(_0xd3e5da){_0x1eef8d['push'](_0x1eef8d['shift']());}}}(a250_0xce11,0x4b2fc));const MYBATIS_OUTER_TAGS=new Map([[a250_0x2268fa(0x1df),a250_0x2268fa(0x1f0)],['insert',a250_0x2268fa(0x1c3)],[a250_0x2268fa(0x208),a250_0x2268fa(0x1b6)],['delete','DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a250_0x2268fa(0x1c7),a250_0x2268fa(0x1ec),a250_0x2268fa(0x209),a250_0x2268fa(0x200),a250_0x2268fa(0x1ff),a250_0x2268fa(0x1e1),'set',a250_0x2268fa(0x1d7),a250_0x2268fa(0x1e2),'property']),MYBATIS_BRANCH_TAGS=new Set(['if',a250_0x2268fa(0x1ec),'choose',a250_0x2268fa(0x200),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER=a250_0x2268fa(0x1d9);export const MYBATIS_DYNAMIC_END_MARKER=a250_0x2268fa(0x1b8);export const MYBATIS_INCLUDE_MARKER=a250_0x2268fa(0x201);function a250_0x23bf(_0x4292b8,_0x5797a9){_0x4292b8=_0x4292b8-0x1ae;const _0xce1180=a250_0xce11();let _0x23bfe9=_0xce1180[_0x4292b8];return _0x23bfe9;}const UNRESOLVED_SQL_FRAGMENT=a250_0x2268fa(0x1c8),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a250_0x2268fa(0x206)+[...MYBATIS_OUTER_TAGS[a250_0x2268fa(0x1ef)]()][a250_0x2268fa(0x1dd)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x79c002){const _0x2c79df=a250_0x2268fa,_0x33cd2c=typeof _0x79c002===_0x2c79df(0x1b0)?_0x79c002:'';if(!startsWithMybatisStatementWrapper(_0x33cd2c))return{'sql':_0x33cd2c,'mode':_0x2c79df(0x202)};let _0x25c2d9=0x0,_0x152193='',_0x4d9ddc,_0x129698=![],_0x25e20c=![];const _0x459e38=[];while(_0x25c2d9<_0x33cd2c[_0x2c79df(0x1f8)]){if(_0x33cd2c[_0x2c79df(0x1af)](_0x2c79df(0x1cb),_0x25c2d9)){const _0x3c74a8=_0x33cd2c['indexOf'](_0x2c79df(0x1e6),_0x25c2d9+0x4);if(_0x3c74a8<0x0)return invalidMybatisSource(_0x2c79df(0x1cf));_0x152193+='\x20',_0x25c2d9=_0x3c74a8+0x3;continue;}if(_0x33cd2c[_0x2c79df(0x1af)](_0x2c79df(0x1ae),_0x25c2d9)){if(!_0x129698||_0x25e20c)return invalidMybatisSource(_0x2c79df(0x1f4));const _0xad9782=_0x33cd2c[_0x2c79df(0x1c1)](']]>',_0x25c2d9+0x9);if(_0xad9782<0x0)return invalidMybatisSource(_0x2c79df(0x1ed));_0x152193+=_0x33cd2c['slice'](_0x25c2d9+0x9,_0xad9782),_0x25c2d9=_0xad9782+0x3;continue;}if(_0x33cd2c[_0x2c79df(0x1af)]('<?',_0x25c2d9)){if(_0x129698)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x4496dd=_0x33cd2c[_0x2c79df(0x1c1)]('?>',_0x25c2d9+0x2);if(_0x4496dd<0x0)return invalidMybatisSource(_0x2c79df(0x1c2));_0x152193+='\x20',_0x25c2d9=_0x4496dd+0x2;continue;}if(_0x33cd2c[_0x25c2d9]!=='<'){const _0x420216=_0x33cd2c[_0x2c79df(0x1c1)]('<',_0x25c2d9),_0x35f6e1=_0x420216<0x0?_0x33cd2c[_0x2c79df(0x1f8)]:_0x420216,_0x5295da=_0x33cd2c[_0x2c79df(0x1bf)](_0x25c2d9,_0x35f6e1);if((!_0x129698||_0x25e20c)&&_0x5295da[_0x2c79df(0x1e1)]())return invalidMybatisSource(_0x2c79df(0x1d8));if(_0x129698&&!_0x25e20c){const _0x31ad2d=decodeXmlEntities(_0x5295da);if(_0x31ad2d===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x152193+=_0x31ad2d;}else _0x152193+='\x20';_0x25c2d9=_0x35f6e1;continue;}const _0x52908a=findXmlTagEnd(_0x33cd2c,_0x25c2d9);if(_0x52908a<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0x8ab179=_0x33cd2c['slice'](_0x25c2d9,_0x52908a+0x1),_0x1d2f04=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x2c79df(0x1da)](_0x8ab179);if(!_0x1d2f04)return invalidMybatisSource(_0x2c79df(0x1f2));const _0x2895e5=_0x1d2f04[0x1]==='/',_0x5ac4ac=_0x1d2f04[0x2]??'',_0x5110c5=_0x5ac4ac['toLowerCase'](),_0x1304f4=_0x1d2f04[0x3]??'',_0xfd844e=_0x1d2f04[0x4]==='/',_0x2f3c57=MYBATIS_OUTER_TAGS[_0x2c79df(0x1e0)](_0x5110c5);if(!_0x2f3c57&&!MYBATIS_DYNAMIC_TAGS['has'](_0x5110c5))return invalidMybatisSource(_0x2c79df(0x205)+_0x5110c5+'>.');if(!_0x2f3c57&&_0x5ac4ac!==_0x5110c5)return invalidMybatisSource(_0x2c79df(0x1c4)+_0x5ac4ac+'>.');if(_0x2895e5){if(_0x1304f4['trim']()||_0xfd844e)return invalidMybatisSource(_0x2c79df(0x1ee)+_0x5ac4ac+'>.');const _0x3e364f=_0x459e38['at'](-0x1);if(!_0x3e364f||(_0x3e364f[_0x2c79df(0x1c0)]?_0x3e364f[_0x2c79df(0x1d3)]!==_0x5110c5:_0x3e364f[_0x2c79df(0x1d5)]!==_0x5ac4ac))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x5ac4ac+'>.');_0x459e38[_0x2c79df(0x1b9)]();if(_0x3e364f[_0x2c79df(0x1c0)])_0x25e20c=!![];_0x152193+=MYBATIS_BRANCH_TAGS[_0x2c79df(0x1e3)](_0x5110c5)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x1304f4))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0x5ac4ac+'>.');if(_0x5110c5==='property'&&(!_0xfd844e||_0x459e38['at'](-0x1)?.['tagName']!==_0x2c79df(0x1e2)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x2f3c57){if(_0x129698||_0x459e38[_0x2c79df(0x1f8)]>0x0)return invalidMybatisSource(_0x2c79df(0x1d1));_0x129698=!![],_0x25e20c=_0xfd844e,_0x4d9ddc=_0x2f3c57;}else{if(!_0x129698||_0x25e20c)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<'+_0x5ac4ac+'>.');}_0x152193+=_0x5110c5===_0x2c79df(0x1c7)?_0x2c79df(0x1f7):_0x5110c5===_0x2c79df(0x1fd)?_0x2c79df(0x1bd):_0x5110c5==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0x5110c5)&&!_0xfd844e?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0xfd844e&&_0x459e38[_0x2c79df(0x1f1)]({'rawName':_0x5ac4ac,'tagName':_0x5110c5,'outer':!!_0x2f3c57});}_0x25c2d9=_0x52908a+0x1;}if(_0x459e38[_0x2c79df(0x1f8)]>0x0)return invalidMybatisSource(_0x2c79df(0x1e4)+_0x459e38['at'](-0x1)?.['rawName']+'>.');if(!_0x129698||!_0x25e20c)return invalidMybatisSource(_0x2c79df(0x1ca));return{'sql':_0x152193[_0x2c79df(0x1e1)](),'mode':'mybatisXml',..._0x4d9ddc?{'statementType':_0x4d9ddc}:{}};}function a250_0xce11(){const _0x98bb89=['Unclosed\x20MyBatis\x20XML\x20tag:\x20<','reason','-->','match','UNKNOWN','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','22dgQpcM','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','foreach','Unterminated\x20CDATA\x20section.','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','keys','SELECT','push','Invalid\x20MyBatis\x20XML\x20tag.','10spGkrU','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','SQL\x20content\x20is\x20empty','replaceAll','\x20WHERE\x20','length','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','parseInt','&lt;','unknown\x20table(s)','set','statementType','otherwise','when','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','sql','Unable\x20to\x20detect\x20SQL\x20type.\x20','36htErcK','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','^<\x5cs*(?:','156Kdeasv','update','choose','<![CDATA[','startsWith','string','mybatisXml','test','121146vMbUeH','1969768kRYzwk','error','UPDATE','fromCodePoint','__RABETBASE_MYBATIS_DYNAMIC_END__','pop','matchAll','WITH','83285aKkiuA','\x20SET\x20','type','slice','outer','indexOf','Unterminated\x20XML\x20declaration.','INSERT','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','isDangerous','where','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','replace','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','<!--','2339088WNaGYm','DELETE','toUpperCase','Unterminated\x20XML\x20comment.','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','163583pHJhgM','tagName','44ZGBGGn','rawName','4792212MzPFjU','bind','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','__RABETBASE_MYBATIS_DYNAMIC_START__','exec','&apos;','594926VLEYgi','join','add','select','get','trim','include','has'];a250_0xce11=function(){return _0x98bb89;};return a250_0xce11();}function hasWellFormedXmlAttributes(_0x4e76a4){const _0x51453e=a250_0x2268fa;let _0x1f7db8=0x0;const _0x554340=new Set();while(_0x1f7db8<_0x4e76a4[_0x51453e(0x1f8)]){while(_0x1f7db8<_0x4e76a4['length']&&/\s/[_0x51453e(0x1b2)](_0x4e76a4[_0x1f7db8]??''))_0x1f7db8+=0x1;if(_0x1f7db8>=_0x4e76a4[_0x51453e(0x1f8)])return!![];const _0x47cf6f=/^[A-Za-z_:][\w:.-]*/['exec'](_0x4e76a4[_0x51453e(0x1bf)](_0x1f7db8)),_0x1aae24=_0x47cf6f?.[0x0];if(!_0x1aae24||_0x554340[_0x51453e(0x1e3)](_0x1aae24))return![];_0x554340[_0x51453e(0x1de)](_0x1aae24),_0x1f7db8+=_0x1aae24[_0x51453e(0x1f8)];while(_0x1f7db8<_0x4e76a4['length']&&/\s/['test'](_0x4e76a4[_0x1f7db8]??''))_0x1f7db8+=0x1;if(_0x4e76a4[_0x1f7db8]!=='=')return![];_0x1f7db8+=0x1;while(_0x1f7db8<_0x4e76a4['length']&&/\s/[_0x51453e(0x1b2)](_0x4e76a4[_0x1f7db8]??''))_0x1f7db8+=0x1;const _0x80a583=_0x4e76a4[_0x1f7db8];if(_0x80a583!=='\x22'&&_0x80a583!=='\x27')return![];_0x1f7db8+=0x1;const _0x33192f=_0x4e76a4[_0x51453e(0x1c1)](_0x80a583,_0x1f7db8);if(_0x33192f<0x0)return![];if(decodeXmlEntities(_0x4e76a4[_0x51453e(0x1bf)](_0x1f7db8,_0x33192f))===null)return![];_0x1f7db8=_0x33192f+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x2e8aa4){const _0x471b85=a250_0x2268fa;let _0x3fd39c=0x0;const _0x1717b5=()=>{const _0x25c228=a250_0x23bf;while(_0x3fd39c<_0x2e8aa4['length']&&/\s/[_0x25c228(0x1b2)](_0x2e8aa4[_0x3fd39c]??''))_0x3fd39c+=0x1;};_0x1717b5();while(_0x3fd39c<_0x2e8aa4[_0x471b85(0x1f8)]){if(_0x2e8aa4[_0x471b85(0x1af)](_0x471b85(0x1cb),_0x3fd39c)){const _0x411d82=_0x2e8aa4['indexOf'](_0x471b85(0x1e6),_0x3fd39c+0x4);if(_0x411d82<0x0)return!![];_0x3fd39c=_0x411d82+0x3,_0x1717b5();continue;}if(_0x2e8aa4[_0x471b85(0x1af)]('<?',_0x3fd39c)){const _0x384c2f=_0x2e8aa4['indexOf']('?>',_0x3fd39c+0x2);if(_0x384c2f<0x0)return!![];_0x3fd39c=_0x384c2f+0x2,_0x1717b5();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x471b85(0x1b2)](_0x2e8aa4[_0x471b85(0x1bf)](_0x3fd39c));}function invalidMybatisSource(_0x5cf836){const _0x34f484=a250_0x2268fa;return{'sql':'','mode':_0x34f484(0x1b1),'error':_0x5cf836};}function findXmlTagEnd(_0xe2ef,_0x18317f){let _0x4c0a07;for(let _0x957da6=_0x18317f+0x1;_0x957da6<_0xe2ef['length'];_0x957da6+=0x1){const _0x353263=_0xe2ef[_0x957da6];if(_0x4c0a07){if(_0x353263===_0x4c0a07)_0x4c0a07=undefined;continue;}if(_0x353263==='\x22'||_0x353263==='\x27'){_0x4c0a07=_0x353263;continue;}if(_0x353263==='>')return _0x957da6;}return-0x1;}function decodeXmlEntities(_0x4cc066){const _0x329d52=a250_0x2268fa;let _0x5b7cbe=![];const _0x4032e5=_0x4cc066[_0x329d52(0x1c9)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x486ad7=>{const _0x357dbe=_0x329d52;if(_0x486ad7===_0x357dbe(0x1fb))return'<';if(_0x486ad7==='&gt;')return'>';if(_0x486ad7==='&quot;')return'\x22';if(_0x486ad7===_0x357dbe(0x1db))return'\x27';if(_0x486ad7==='&amp;')return'&';const _0x5accd9=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x486ad7);if(_0x5accd9){const _0x26e90c=_0x5accd9[0x1],_0x103c23=_0x5accd9[0x2],_0x158bd2=Number[_0x357dbe(0x1fa)](_0x26e90c??_0x103c23??'',_0x26e90c?0x10:0xa);if(isValidXmlCharacter(_0x158bd2))return String[_0x357dbe(0x1b7)](_0x158bd2);}return _0x5b7cbe=!![],'';});return _0x5b7cbe?null:_0x4032e5;}function isValidXmlCharacter(_0x5a22d7){return _0x5a22d7===0x9||_0x5a22d7===0xa||_0x5a22d7===0xd||_0x5a22d7>=0x20&&_0x5a22d7<=0xd7ff||_0x5a22d7>=0xe000&&_0x5a22d7<=0xfffd||_0x5a22d7>=0x10000&&_0x5a22d7<=0x10ffff;}export function detectSqlType(_0x33b9dc){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x33b9dc));}function detectNormalizedSqlType(_0x397d2b){const _0x5423cd=a250_0x2268fa;if(_0x397d2b[_0x5423cd(0x1b5)])return{'type':_0x5423cd(0x1e8),'isSelectOnly':![],'isDangerous':![],'reason':_0x397d2b['error']};if(!_0x397d2b[_0x5423cd(0x202)][_0x5423cd(0x1e1)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x5423cd(0x1f5)};const _0x5b4390=stripStaticAnalysisMarkers(_0x397d2b[_0x5423cd(0x202)])[_0x5423cd(0x1c9)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x5423cd(0x1e1)](),_0x44c147=_0x5b4390['split']('\x0a');let _0x1e96dd='';for(const _0x56121c of _0x44c147){const _0x69d7f0=_0x56121c[_0x5423cd(0x1e1)]();if(!_0x69d7f0||_0x69d7f0['startsWith']('--')||_0x69d7f0[_0x5423cd(0x1af)]('/*'))continue;_0x1e96dd=_0x69d7f0;break;}const _0x5f1950=_0x1e96dd[_0x5423cd(0x1ce)](),_0x2324ec=_0x397d2b[_0x5423cd(0x1fe)],_0x3653f7=maskSqlTextForBlockedKeywordScan(_0x5b4390),_0x49effe=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x5423cd(0x1b2)](_0x3653f7);if(_0x2324ec===_0x5423cd(0x1f0)||!_0x2324ec&&(_0x5f1950['startsWith'](_0x5423cd(0x1f0))||_0x5f1950[_0x5423cd(0x1af)](_0x5423cd(0x1bb)))){const _0x33398b=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x5b4390);return{'type':_0x5423cd(0x1f0),'isSelectOnly':!_0x33398b,'isDangerous':_0x33398b,'reason':_0x33398b?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x2324ec==='INSERT'||!_0x2324ec&&_0x5f1950[_0x5423cd(0x1af)](_0x5423cd(0x1c3)))return{'type':_0x5423cd(0x1c3),'isSelectOnly':![],'isDangerous':_0x49effe,'reason':_0x49effe?_0x5423cd(0x1e9):undefined};if(_0x2324ec===_0x5423cd(0x1b6)||!_0x2324ec&&_0x5f1950['startsWith'](_0x5423cd(0x1b6)))return{'type':_0x5423cd(0x1b6),'isSelectOnly':![],'isDangerous':_0x49effe,'reason':_0x49effe?_0x5423cd(0x1e9):undefined};if(_0x2324ec===_0x5423cd(0x1cd)||!_0x2324ec&&_0x5f1950[_0x5423cd(0x1af)](_0x5423cd(0x1cd)))return{'type':_0x5423cd(0x1cd),'isSelectOnly':![],'isDangerous':!![],'reason':_0x5423cd(0x1c5)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x5423cd(0x1b2)](_0x5f1950))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':_0x5423cd(0x1eb)};return{'type':_0x5423cd(0x1e8),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x4c9312){const _0x1e0e9f=a250_0x2268fa;return _0x4c9312[_0x1e0e9f(0x1f6)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x1e0e9f(0x1f6)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x51862b){const _0x2236ec=a250_0x2268fa;return _0x51862b[_0x2236ec(0x1c9)](/'(?:''|\\.|[^'])*'/g,'\x20')['replace'](/"(?:""|\\.|[^"])*"/g,'\x20')['replace'](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x2236ec(0x1c9)](/--.*$/gm,'\x20')[_0x2236ec(0x1c9)](/#.*$/gm,'\x20')[_0x2236ec(0x1c9)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x30c2ca){const _0x4627e3=a250_0x2268fa,_0x470ba9=_0x30c2ca[_0x4627e3(0x1c9)](/#\{[^}]*\}/g,'?')[_0x4627e3(0x1c9)](/\$\{[^}]*\}/g,'?')[_0x4627e3(0x1c9)](/'[^']*'/g,'\x27\x27')[_0x4627e3(0x1c9)](/--.*$/gm,'')[_0x4627e3(0x1c9)](/\/\*[\s\S]*?\*\//g,''),_0x542304=[],_0x4fcefa=_0x470ba9[_0x4627e3(0x1e7)](/FROM\s+([^\s,)(]+)/i);addTable(_0x542304,_0x4fcefa?.[0x1]);for(const _0x137b33 of _0x470ba9[_0x4627e3(0x1ba)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x542304,_0x137b33[0x1]);}const _0x1f93bf=_0x470ba9[_0x4627e3(0x1e7)](/INTO\s+([^\s(]+)/i);addTable(_0x542304,_0x1f93bf?.[0x1]);const _0x2674dc=_0x470ba9['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x542304,_0x2674dc?.[0x1]),_0x542304;}function addTable(_0x128e51,_0x555452){const _0x240818=a250_0x2268fa,_0x832899=_0x555452?.[_0x240818(0x1c9)](/[`"]/g,'');_0x832899&&_0x832899!==UNRESOLVED_SQL_FRAGMENT&&!_0x128e51['includes'](_0x832899)&&_0x128e51[_0x240818(0x1f1)](_0x832899);}function extractParameters(_0x332625){const _0xd6398a=a250_0x2268fa,_0x448ae7=new Set();for(const _0x1ef28a of _0x332625[_0xd6398a(0x1ba)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x1ef28a[0x1])_0x448ae7[_0xd6398a(0x1de)](_0x1ef28a[0x1]);}return Array['from'](_0x448ae7);}export function validateSql(_0x2f8f22){const _0x2d975e=a250_0x2268fa,_0x39ce99=normalizeSqlForStaticAnalysis(_0x2f8f22),_0x799b2b=detectNormalizedSqlType(_0x39ce99),_0x32e4af=stripStaticAnalysisMarkers(_0x39ce99[_0x2d975e(0x202)]),_0x54f6c6=_0x39ce99['error']?[]:extractTables(_0x32e4af),_0x52dc21=_0x39ce99['error']?[]:extractParameters(_0x32e4af);if(_0x799b2b[_0x2d975e(0x1c6)])return{'valid':![],'sqlType':_0x799b2b,'tables':_0x54f6c6,'parameters':_0x52dc21,'message':_0x799b2b[_0x2d975e(0x1e5)]||_0x799b2b[_0x2d975e(0x1be)]+_0x2d975e(0x1d0)};if(_0x799b2b['type']===_0x2d975e(0x1e8))return{'valid':![],'sqlType':_0x799b2b,'tables':_0x54f6c6,'parameters':_0x52dc21,'message':_0x39ce99['error']?_0x2d975e(0x203)+_0x39ce99[_0x2d975e(0x1b5)]:_0x2d975e(0x1f9)};return{'valid':!![],'sqlType':_0x799b2b,'tables':_0x54f6c6,'parameters':_0x52dc21,'message':_0x799b2b['type']+'\x20query\x20targeting\x20'+(_0x54f6c6['length']?_0x54f6c6[_0x2d975e(0x1dd)](',\x20'):_0x2d975e(0x1fc))+(_0x52dc21[_0x2d975e(0x1f8)]?'\x20with\x20parameters:\x20'+_0x52dc21[_0x2d975e(0x1dd)](',\x20'):'')};}
1
+ const a255_0x4f8516=a255_0x1833;(function(_0x11f183,_0x5af0de){const _0x3e7109=a255_0x1833,_0x1bc5f3=_0x11f183();while(!![]){try{const _0x17c5bb=parseInt(_0x3e7109(0x1a3))/0x1+-parseInt(_0x3e7109(0x1a2))/0x2*(-parseInt(_0x3e7109(0x1dc))/0x3)+-parseInt(_0x3e7109(0x1d3))/0x4+parseInt(_0x3e7109(0x1e1))/0x5*(-parseInt(_0x3e7109(0x1c2))/0x6)+parseInt(_0x3e7109(0x1c0))/0x7*(-parseInt(_0x3e7109(0x1ee))/0x8)+-parseInt(_0x3e7109(0x1e2))/0x9*(parseInt(_0x3e7109(0x1c9))/0xa)+parseInt(_0x3e7109(0x1e3))/0xb;if(_0x17c5bb===_0x5af0de)break;else _0x1bc5f3['push'](_0x1bc5f3['shift']());}catch(_0x4d34fc){_0x1bc5f3['push'](_0x1bc5f3['shift']());}}}(a255_0x5130,0x9b230));const MYBATIS_OUTER_TAGS=new Map([[a255_0x4f8516(0x1e0),'SELECT'],[a255_0x4f8516(0x1cc),'INSERT'],[a255_0x4f8516(0x1c1),'UPDATE'],[a255_0x4f8516(0x1d0),a255_0x4f8516(0x19d)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a255_0x4f8516(0x1b5),a255_0x4f8516(0x1b4),a255_0x4f8516(0x19a),a255_0x4f8516(0x1ea),a255_0x4f8516(0x1a8),a255_0x4f8516(0x1de),a255_0x4f8516(0x1d9),a255_0x4f8516(0x1a9),'include','property']),MYBATIS_BRANCH_TAGS=new Set(['if','foreach','choose',a255_0x4f8516(0x1ea),'otherwise']);function a255_0x5130(){const _0x7859a8=[')\x5cb','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','match','\x20query\x20targeting\x20','error','Unable\x20to\x20detect\x20SQL\x20type.\x20','pop','21PYqZpK','update','293442BOXSSD','&amp;','toUpperCase','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','tagName','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','add','797590cqeEBa','rawName','isDangerous','insert','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','test','statementType','delete','\x20SET\x20','SELECT','1519332amyBgx','INSERT','UNKNOWN','split','exec','sql','set','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','slice','105CSXyOv','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','trim','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','select','20cRmvOD','99bnKPtu','22352132YEhpDh','replace','startsWith','^<\x5cs*(?:','string','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','when','WITH','indexOf','type','2434792kTtJpV','join','replaceAll','\x20with\x20parameters:\x20','SQL\x20content\x20is\x20empty','Unterminated\x20XML\x20comment.','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','choose','push','length','DELETE','-->','from','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','<![CDATA[','28918jhuLVB','463220BWVMoL','outer','includes','\x20WHERE\x20','has','otherwise','bind','matchAll','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','__RABETBASE_MYBATIS_DYNAMIC_START__',']]>','__RABETBASE_MYBATIS_DYNAMIC_END__','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','include','<!--','mybatisXml','DDL','foreach','where','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','&gt;','Invalid\x20MyBatis\x20XML\x20tag.'];a255_0x5130=function(){return _0x7859a8;};return a255_0x5130();}export const MYBATIS_DYNAMIC_START_MARKER=a255_0x4f8516(0x1ac);export const MYBATIS_DYNAMIC_END_MARKER=a255_0x4f8516(0x1ae);function a255_0x1833(_0x53cb7e,_0x1f777f){_0x53cb7e=_0x53cb7e-0x196;const _0x513003=a255_0x5130();let _0x183356=_0x513003[_0x53cb7e];return _0x183356;}export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT=a255_0x4f8516(0x1e9),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a255_0x4f8516(0x1e6)+[...MYBATIS_OUTER_TAGS['keys']()][a255_0x4f8516(0x1ef)]('|')+a255_0x4f8516(0x1b9),'i');export function normalizeSqlForStaticAnalysis(_0x1791ec){const _0x1e84ec=a255_0x4f8516,_0x58fc59=typeof _0x1791ec===_0x1e84ec(0x1e7)?_0x1791ec:'';if(!startsWithMybatisStatementWrapper(_0x58fc59))return{'sql':_0x58fc59,'mode':'sql'};let _0x18fb6c=0x0,_0x23c86d='',_0x44ff9c,_0x7c2092=![],_0x63c482=![];const _0x35739a=[];while(_0x18fb6c<_0x58fc59[_0x1e84ec(0x19c)]){if(_0x58fc59[_0x1e84ec(0x1e5)](_0x1e84ec(0x1b1),_0x18fb6c)){const _0x48f3d6=_0x58fc59[_0x1e84ec(0x1ec)](_0x1e84ec(0x19e),_0x18fb6c+0x4);if(_0x48f3d6<0x0)return invalidMybatisSource(_0x1e84ec(0x198));_0x23c86d+='\x20',_0x18fb6c=_0x48f3d6+0x3;continue;}if(_0x58fc59[_0x1e84ec(0x1e5)](_0x1e84ec(0x1a1),_0x18fb6c)){if(!_0x7c2092||_0x63c482)return invalidMybatisSource(_0x1e84ec(0x1c7));const _0x38e332=_0x58fc59['indexOf'](_0x1e84ec(0x1ad),_0x18fb6c+0x9);if(_0x38e332<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x23c86d+=_0x58fc59[_0x1e84ec(0x1db)](_0x18fb6c+0x9,_0x38e332),_0x18fb6c=_0x38e332+0x3;continue;}if(_0x58fc59[_0x1e84ec(0x1e5)]('<?',_0x18fb6c)){if(_0x7c2092)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x17f5c2=_0x58fc59[_0x1e84ec(0x1ec)]('?>',_0x18fb6c+0x2);if(_0x17f5c2<0x0)return invalidMybatisSource('Unterminated\x20XML\x20declaration.');_0x23c86d+='\x20',_0x18fb6c=_0x17f5c2+0x2;continue;}if(_0x58fc59[_0x18fb6c]!=='<'){const _0x410c5f=_0x58fc59[_0x1e84ec(0x1ec)]('<',_0x18fb6c),_0x33fc0c=_0x410c5f<0x0?_0x58fc59[_0x1e84ec(0x19c)]:_0x410c5f,_0x32a48c=_0x58fc59['slice'](_0x18fb6c,_0x33fc0c);if((!_0x7c2092||_0x63c482)&&_0x32a48c['trim']())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x7c2092&&!_0x63c482){const _0x5a0268=decodeXmlEntities(_0x32a48c);if(_0x5a0268===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x23c86d+=_0x5a0268;}else _0x23c86d+='\x20';_0x18fb6c=_0x33fc0c;continue;}const _0x36f842=findXmlTagEnd(_0x58fc59,_0x18fb6c);if(_0x36f842<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0x37053f=_0x58fc59[_0x1e84ec(0x1db)](_0x18fb6c,_0x36f842+0x1),_0x129b7e=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/['exec'](_0x37053f);if(!_0x129b7e)return invalidMybatisSource(_0x1e84ec(0x1b8));const _0x44b469=_0x129b7e[0x1]==='/',_0x54de7a=_0x129b7e[0x2]??'',_0x153145=_0x54de7a['toLowerCase'](),_0x40f027=_0x129b7e[0x3]??'',_0x11eca7=_0x129b7e[0x4]==='/',_0x578a1f=MYBATIS_OUTER_TAGS['get'](_0x153145);if(!_0x578a1f&&!MYBATIS_DYNAMIC_TAGS[_0x1e84ec(0x1a7)](_0x153145))return invalidMybatisSource(_0x1e84ec(0x1dd)+_0x153145+'>.');if(!_0x578a1f&&_0x54de7a!==_0x153145)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x54de7a+'>.');if(_0x44b469){if(_0x40f027['trim']()||_0x11eca7)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x54de7a+'>.');const _0xd1a9e8=_0x35739a['at'](-0x1);if(!_0xd1a9e8||(_0xd1a9e8[_0x1e84ec(0x1a4)]?_0xd1a9e8[_0x1e84ec(0x1c6)]!==_0x153145:_0xd1a9e8[_0x1e84ec(0x1ca)]!==_0x54de7a))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x54de7a+'>.');_0x35739a[_0x1e84ec(0x1bf)]();if(_0xd1a9e8[_0x1e84ec(0x1a4)])_0x63c482=!![];_0x23c86d+=MYBATIS_BRANCH_TAGS[_0x1e84ec(0x1a7)](_0x153145)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x40f027))return invalidMybatisSource(_0x1e84ec(0x1a0)+_0x54de7a+'>.');if(_0x153145==='property'&&(!_0x11eca7||_0x35739a['at'](-0x1)?.[_0x1e84ec(0x1c6)]!==_0x1e84ec(0x1b0)))return invalidMybatisSource(_0x1e84ec(0x1c5));if(_0x578a1f){if(_0x7c2092||_0x35739a['length']>0x0)return invalidMybatisSource(_0x1e84ec(0x1cd));_0x7c2092=!![],_0x63c482=_0x11eca7,_0x44ff9c=_0x578a1f;}else{if(!_0x7c2092||_0x63c482)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<'+_0x54de7a+'>.');}_0x23c86d+=_0x153145===_0x1e84ec(0x1b5)?_0x1e84ec(0x1a6):_0x153145===_0x1e84ec(0x1d9)?_0x1e84ec(0x1d1):_0x153145==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x1e84ec(0x1a7)](_0x153145)&&!_0x11eca7?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x11eca7&&_0x35739a[_0x1e84ec(0x19b)]({'rawName':_0x54de7a,'tagName':_0x153145,'outer':!!_0x578a1f});}_0x18fb6c=_0x36f842+0x1;}if(_0x35739a[_0x1e84ec(0x19c)]>0x0)return invalidMybatisSource(_0x1e84ec(0x1b6)+_0x35739a['at'](-0x1)?.[_0x1e84ec(0x1ca)]+'>.');if(!_0x7c2092||!_0x63c482)return invalidMybatisSource(_0x1e84ec(0x1da));return{'sql':_0x23c86d[_0x1e84ec(0x1de)](),'mode':_0x1e84ec(0x1b2),..._0x44ff9c?{'statementType':_0x44ff9c}:{}};}function hasWellFormedXmlAttributes(_0x4c43c9){const _0x2968b8=a255_0x4f8516;let _0x5cc31f=0x0;const _0x195467=new Set();while(_0x5cc31f<_0x4c43c9[_0x2968b8(0x19c)]){while(_0x5cc31f<_0x4c43c9[_0x2968b8(0x19c)]&&/\s/[_0x2968b8(0x1ce)](_0x4c43c9[_0x5cc31f]??''))_0x5cc31f+=0x1;if(_0x5cc31f>=_0x4c43c9[_0x2968b8(0x19c)])return!![];const _0xb40e8a=/^[A-Za-z_:][\w:.-]*/['exec'](_0x4c43c9[_0x2968b8(0x1db)](_0x5cc31f)),_0x1f4701=_0xb40e8a?.[0x0];if(!_0x1f4701||_0x195467[_0x2968b8(0x1a7)](_0x1f4701))return![];_0x195467[_0x2968b8(0x1c8)](_0x1f4701),_0x5cc31f+=_0x1f4701[_0x2968b8(0x19c)];while(_0x5cc31f<_0x4c43c9[_0x2968b8(0x19c)]&&/\s/[_0x2968b8(0x1ce)](_0x4c43c9[_0x5cc31f]??''))_0x5cc31f+=0x1;if(_0x4c43c9[_0x5cc31f]!=='=')return![];_0x5cc31f+=0x1;while(_0x5cc31f<_0x4c43c9[_0x2968b8(0x19c)]&&/\s/[_0x2968b8(0x1ce)](_0x4c43c9[_0x5cc31f]??''))_0x5cc31f+=0x1;const _0x61af80=_0x4c43c9[_0x5cc31f];if(_0x61af80!=='\x22'&&_0x61af80!=='\x27')return![];_0x5cc31f+=0x1;const _0x78317=_0x4c43c9['indexOf'](_0x61af80,_0x5cc31f);if(_0x78317<0x0)return![];if(decodeXmlEntities(_0x4c43c9[_0x2968b8(0x1db)](_0x5cc31f,_0x78317))===null)return![];_0x5cc31f=_0x78317+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x2830bc){const _0xe7ca8e=a255_0x4f8516;let _0x32fa5d=0x0;const _0xf90c21=()=>{const _0x485678=a255_0x1833;while(_0x32fa5d<_0x2830bc['length']&&/\s/[_0x485678(0x1ce)](_0x2830bc[_0x32fa5d]??''))_0x32fa5d+=0x1;};_0xf90c21();while(_0x32fa5d<_0x2830bc['length']){if(_0x2830bc['startsWith'](_0xe7ca8e(0x1b1),_0x32fa5d)){const _0x4b0239=_0x2830bc[_0xe7ca8e(0x1ec)](_0xe7ca8e(0x19e),_0x32fa5d+0x4);if(_0x4b0239<0x0)return!![];_0x32fa5d=_0x4b0239+0x3,_0xf90c21();continue;}if(_0x2830bc[_0xe7ca8e(0x1e5)]('<?',_0x32fa5d)){const _0x12bd2b=_0x2830bc['indexOf']('?>',_0x32fa5d+0x2);if(_0x12bd2b<0x0)return!![];_0x32fa5d=_0x12bd2b+0x2,_0xf90c21();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0xe7ca8e(0x1ce)](_0x2830bc[_0xe7ca8e(0x1db)](_0x32fa5d));}function invalidMybatisSource(_0x26e8f9){const _0x59769f=a255_0x4f8516;return{'sql':'','mode':_0x59769f(0x1b2),'error':_0x26e8f9};}function findXmlTagEnd(_0x367369,_0x5ee8aa){const _0x3ea303=a255_0x4f8516;let _0x2f06eb;for(let _0x1033af=_0x5ee8aa+0x1;_0x1033af<_0x367369[_0x3ea303(0x19c)];_0x1033af+=0x1){const _0xf9e32d=_0x367369[_0x1033af];if(_0x2f06eb){if(_0xf9e32d===_0x2f06eb)_0x2f06eb=undefined;continue;}if(_0xf9e32d==='\x22'||_0xf9e32d==='\x27'){_0x2f06eb=_0xf9e32d;continue;}if(_0xf9e32d==='>')return _0x1033af;}return-0x1;}function decodeXmlEntities(_0x492e2a){const _0x2ee577=a255_0x4f8516;let _0xf0696=![];const _0x2c5384=_0x492e2a[_0x2ee577(0x1e4)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x4c348e=>{const _0x50fc64=_0x2ee577;if(_0x4c348e==='&lt;')return'<';if(_0x4c348e===_0x50fc64(0x1b7))return'>';if(_0x4c348e==='&quot;')return'\x22';if(_0x4c348e==='&apos;')return'\x27';if(_0x4c348e===_0x50fc64(0x1c3))return'&';const _0x174ffa=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x50fc64(0x1d7)](_0x4c348e);if(_0x174ffa){const _0xc9ba4a=_0x174ffa[0x1],_0x344860=_0x174ffa[0x2],_0x5156b3=Number['parseInt'](_0xc9ba4a??_0x344860??'',_0xc9ba4a?0x10:0xa);if(isValidXmlCharacter(_0x5156b3))return String['fromCodePoint'](_0x5156b3);}return _0xf0696=!![],'';});return _0xf0696?null:_0x2c5384;}function isValidXmlCharacter(_0x472f5b){return _0x472f5b===0x9||_0x472f5b===0xa||_0x472f5b===0xd||_0x472f5b>=0x20&&_0x472f5b<=0xd7ff||_0x472f5b>=0xe000&&_0x472f5b<=0xfffd||_0x472f5b>=0x10000&&_0x472f5b<=0x10ffff;}export function detectSqlType(_0x3092e7){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x3092e7));}function detectNormalizedSqlType(_0x357196){const _0x134587=a255_0x4f8516;if(_0x357196[_0x134587(0x1bd)])return{'type':_0x134587(0x1d5),'isSelectOnly':![],'isDangerous':![],'reason':_0x357196[_0x134587(0x1bd)]};if(!_0x357196[_0x134587(0x1d8)]['trim']())return{'type':_0x134587(0x1d5),'isSelectOnly':![],'isDangerous':![],'reason':_0x134587(0x197)};const _0x5eff04=stripStaticAnalysisMarkers(_0x357196[_0x134587(0x1d8)])[_0x134587(0x1e4)](/#\{[^}]*\}/g,'?')[_0x134587(0x1e4)](/\$\{[^}]*\}/g,'?')[_0x134587(0x1e4)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x134587(0x1e4)](/\/\*[\s\S]*?\*\//g,'')[_0x134587(0x1de)](),_0x33e083=_0x5eff04[_0x134587(0x1d6)]('\x0a');let _0x6dac1='';for(const _0x35bf76 of _0x33e083){const _0x266214=_0x35bf76[_0x134587(0x1de)]();if(!_0x266214||_0x266214['startsWith']('--')||_0x266214[_0x134587(0x1e5)]('/*'))continue;_0x6dac1=_0x266214;break;}const _0x25dc37=_0x6dac1[_0x134587(0x1c4)](),_0x709c41=_0x357196[_0x134587(0x1cf)],_0x52c6d2=maskSqlTextForBlockedKeywordScan(_0x5eff04),_0x41d524=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x134587(0x1ce)](_0x52c6d2);if(_0x709c41===_0x134587(0x1d2)||!_0x709c41&&(_0x25dc37['startsWith'](_0x134587(0x1d2))||_0x25dc37[_0x134587(0x1e5)](_0x134587(0x1eb)))){const _0xc6d3b9=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x134587(0x1ce)](_0x5eff04);return{'type':_0x134587(0x1d2),'isSelectOnly':!_0xc6d3b9,'isDangerous':_0xc6d3b9,'reason':_0xc6d3b9?_0x134587(0x1e8):undefined};}if(_0x709c41===_0x134587(0x1d4)||!_0x709c41&&_0x25dc37['startsWith'](_0x134587(0x1d4)))return{'type':_0x134587(0x1d4),'isSelectOnly':![],'isDangerous':_0x41d524,'reason':_0x41d524?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x709c41==='UPDATE'||!_0x709c41&&_0x25dc37[_0x134587(0x1e5)]('UPDATE'))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x41d524,'reason':_0x41d524?_0x134587(0x1af):undefined};if(_0x709c41==='DELETE'||!_0x709c41&&_0x25dc37['startsWith']('DELETE'))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x134587(0x1df)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x134587(0x1ce)](_0x25dc37))return{'type':_0x134587(0x1b3),'isSelectOnly':![],'isDangerous':!![],'reason':_0x134587(0x1ab)};return{'type':_0x134587(0x1d5),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x2b8ca1){const _0x84ed27=a255_0x4f8516;return _0x2b8ca1['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x84ed27(0x1f0)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x542846){const _0x45dd24=a255_0x4f8516;return _0x542846[_0x45dd24(0x1e4)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x45dd24(0x1e4)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x45dd24(0x1e4)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x45dd24(0x1e4)](/--.*$/gm,'\x20')['replace'](/#.*$/gm,'\x20')[_0x45dd24(0x1e4)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x385f9c){const _0x48a24e=a255_0x4f8516,_0x57f8e8=_0x385f9c[_0x48a24e(0x1e4)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x48a24e(0x1e4)](/'[^']*'/g,'\x27\x27')[_0x48a24e(0x1e4)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0xae671f=[],_0x576488=_0x57f8e8[_0x48a24e(0x1bb)](/FROM\s+([^\s,)(]+)/i);addTable(_0xae671f,_0x576488?.[0x1]);for(const _0x2d98f7 of _0x57f8e8[_0x48a24e(0x1aa)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0xae671f,_0x2d98f7[0x1]);}const _0x4872d8=_0x57f8e8[_0x48a24e(0x1bb)](/INTO\s+([^\s(]+)/i);addTable(_0xae671f,_0x4872d8?.[0x1]);const _0x2a843e=_0x57f8e8[_0x48a24e(0x1bb)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0xae671f,_0x2a843e?.[0x1]),_0xae671f;}function addTable(_0x4abfe2,_0x5729ff){const _0x73188c=a255_0x4f8516,_0x132a4a=_0x5729ff?.[_0x73188c(0x1e4)](/[`"]/g,'');_0x132a4a&&_0x132a4a!==UNRESOLVED_SQL_FRAGMENT&&!_0x4abfe2[_0x73188c(0x1a5)](_0x132a4a)&&_0x4abfe2['push'](_0x132a4a);}function extractParameters(_0xc79a0c){const _0xb83d56=a255_0x4f8516,_0x4c418a=new Set();for(const _0xf086c8 of _0xc79a0c[_0xb83d56(0x1aa)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0xf086c8[0x1])_0x4c418a[_0xb83d56(0x1c8)](_0xf086c8[0x1]);}return Array[_0xb83d56(0x19f)](_0x4c418a);}export function validateSql(_0x4b3c7c){const _0x31d4e4=a255_0x4f8516,_0x1c56f5=normalizeSqlForStaticAnalysis(_0x4b3c7c),_0xc75693=detectNormalizedSqlType(_0x1c56f5),_0x54b15a=stripStaticAnalysisMarkers(_0x1c56f5[_0x31d4e4(0x1d8)]),_0x18abab=_0x1c56f5[_0x31d4e4(0x1bd)]?[]:extractTables(_0x54b15a),_0x3fa1c2=_0x1c56f5[_0x31d4e4(0x1bd)]?[]:extractParameters(_0x54b15a);if(_0xc75693[_0x31d4e4(0x1cb)])return{'valid':![],'sqlType':_0xc75693,'tables':_0x18abab,'parameters':_0x3fa1c2,'message':_0xc75693['reason']||_0xc75693[_0x31d4e4(0x1ed)]+_0x31d4e4(0x199)};if(_0xc75693[_0x31d4e4(0x1ed)]===_0x31d4e4(0x1d5))return{'valid':![],'sqlType':_0xc75693,'tables':_0x18abab,'parameters':_0x3fa1c2,'message':_0x1c56f5[_0x31d4e4(0x1bd)]?_0x31d4e4(0x1be)+_0x1c56f5[_0x31d4e4(0x1bd)]:_0x31d4e4(0x1ba)};return{'valid':!![],'sqlType':_0xc75693,'tables':_0x18abab,'parameters':_0x3fa1c2,'message':_0xc75693[_0x31d4e4(0x1ed)]+_0x31d4e4(0x1bc)+(_0x18abab['length']?_0x18abab['join'](',\x20'):'unknown\x20table(s)')+(_0x3fa1c2['length']?_0x31d4e4(0x196)+_0x3fa1c2[_0x31d4e4(0x1ef)](',\x20'):'')};}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- const a251_0x17b3b9=a251_0x5df6;(function(_0x22a338,_0x47c825){const _0x26145d=a251_0x5df6,_0x404068=_0x22a338();while(!![]){try{const _0x27981f=parseInt(_0x26145d(0x139))/0x1*(parseInt(_0x26145d(0x143))/0x2)+parseInt(_0x26145d(0x133))/0x3*(parseInt(_0x26145d(0x140))/0x4)+-parseInt(_0x26145d(0x137))/0x5+-parseInt(_0x26145d(0x135))/0x6+-parseInt(_0x26145d(0x13b))/0x7+-parseInt(_0x26145d(0x13c))/0x8*(parseInt(_0x26145d(0x13e))/0x9)+-parseInt(_0x26145d(0x132))/0xa*(-parseInt(_0x26145d(0x131))/0xb);if(_0x27981f===_0x47c825)break;else _0x404068['push'](_0x404068['shift']());}catch(_0x2a954b){_0x404068['push'](_0x404068['shift']());}}}(a251_0x16c6,0xd2992));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a251_0x5df6(_0x386407,_0x1dd2dc){_0x386407=_0x386407-0x131;const _0x16c6ec=a251_0x16c6();let _0x5df6bc=_0x16c6ec[_0x386407];return _0x5df6bc;}const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+a251_0x17b3b9(0x136),'configMissingHint':a251_0x17b3b9(0x13f)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`'+CLI_BIN_NAME+a251_0x17b3b9(0x14a),'notInProjectHint':a251_0x17b3b9(0x146)});function a251_0x16c6(){const _0x59716e=['not_in_project','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','21401171XHdzbJ','10VhgPge','9emeAGX','unknown_command','419082nueeps','\x20auth`\x20to\x20login\x20first.','3780805yhJgFI','cancelled','2UTgSsl','network_error','4442235hpVYrq','16qQrwVF','Configuration\x20file\x20not\x20found','3753657RaToWC','Set\x20appcode\x20via\x20`','316168oXsWtY','apiError','config_missing','974682XwvyTj','\x20--help`\x20to\x20see\x20available\x20commands.','validation','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','auth_required','flag_missing','Run\x20`','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','Missing\x20required\x20flag:\x20--','Unknown\x20command:\x20','Authentication\x20required'];a251_0x16c6=function(){return _0x59716e;};return a251_0x16c6();}export const CliErrors={'authRequired'(_0x3b93a4){const _0x5e626f=a251_0x17b3b9;return new CliError(_0x5e626f(0x147),0x1,_0x5e626f(0x14d),_0x3b93a4??_0x5e626f(0x149)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.');},'configMissing'(_0x1a7c45){const _0xe3559d=a251_0x17b3b9;return new CliError(_0xe3559d(0x142),0x1,_0xe3559d(0x13d),_0x1a7c45??_0xe3559d(0x13f)+CLI_BIN_NAME+_0xe3559d(0x14f)+CLI_BIN_NAME+_0xe3559d(0x14a));},'notInProject'(){const _0x302db3=a251_0x17b3b9;return new CliError(_0x302db3(0x14e),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+'\x20project\x20directory',_0x302db3(0x146));},'apiError'(_0x5cfcbc,_0x34ac2e){const _0x20c051=a251_0x17b3b9;return baseCliErrors[_0x20c051(0x141)](_0x5cfcbc,_0x34ac2e);},'networkError'(_0x46b8c5){const _0x5d33e6=a251_0x17b3b9;return new CliError(_0x5d33e6(0x13a),0x2,'Network\x20error:\x20'+_0x46b8c5,'Check\x20your\x20internet\x20connection\x20and\x20try\x20again.');},'unknownCommand'(_0x3b82b8){const _0x1e0141=a251_0x17b3b9;return new CliError(_0x1e0141(0x134),0x1,_0x1e0141(0x14c)+_0x3b82b8,_0x1e0141(0x149)+CLI_BIN_NAME+_0x1e0141(0x144));},'flagMissing'(_0x329b32,_0x4c4c3b){const _0x491d95=a251_0x17b3b9;return new CliError(_0x491d95(0x148),0x1,_0x491d95(0x14b)+_0x329b32,_0x4c4c3b);},'validation'(_0x28b5c1,_0x1a4db2){const _0x1a48b6=a251_0x17b3b9;return baseCliErrors[_0x1a48b6(0x145)](_0x28b5c1,_0x1a4db2);},'cancelled'(_0x21fc40){const _0x540679=a251_0x17b3b9;return new CliError(_0x540679(0x138),0x0,_0x21fc40??'Operation\x20cancelled.');}};
1
+ function a256_0x5531(_0x39e871,_0xc05719){_0x39e871=_0x39e871-0x19e;const _0x472b74=a256_0x472b();let _0x553106=_0x472b74[_0x39e871];return _0x553106;}const a256_0x5f28c3=a256_0x5531;function a256_0x472b(){const _0xfaacef=['134847OiSjfm','Network\x20error:\x20','375857lguoXe','Operation\x20cancelled.','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','710dxDEwk','not_in_project','Missing\x20required\x20flag:\x20--','387722ElmOaU','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','auth_required','\x20project\x20directory','7OODSwY','unknown_command','Set\x20appcode\x20via\x20`','4263624yPvRIX','apiError','Not\x20in\x20a\x20','\x20auth`\x20to\x20login\x20first.','Run\x20`','cancelled','Unknown\x20command:\x20','1147980BPKLMs','network_error','1163310narXNL','771210UaxAEz','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x20--help`\x20to\x20see\x20available\x20commands.','12YpLifA'];a256_0x472b=function(){return _0xfaacef;};return a256_0x472b();}(function(_0x4b5a96,_0x16acb8){const _0x32e7e3=a256_0x5531,_0x58f8b9=_0x4b5a96();while(!![]){try{const _0x469645=-parseInt(_0x32e7e3(0x1af))/0x1+-parseInt(_0x32e7e3(0x1b5))/0x2+parseInt(_0x32e7e3(0x1a9))/0x3+parseInt(_0x32e7e3(0x1ac))/0x4*(-parseInt(_0x32e7e3(0x1a8))/0x5)+-parseInt(_0x32e7e3(0x1a6))/0x6*(parseInt(_0x32e7e3(0x1ba))/0x7)+parseInt(_0x32e7e3(0x19f))/0x8+-parseInt(_0x32e7e3(0x1ad))/0x9*(-parseInt(_0x32e7e3(0x1b2))/0xa);if(_0x469645===_0x16acb8)break;else _0x58f8b9['push'](_0x58f8b9['shift']());}catch(_0xa85b71){_0x58f8b9['push'](_0x58f8b9['shift']());}}}(a256_0x472b,0x6061e));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':a256_0x5f28c3(0x19e)+CLI_BIN_NAME+a256_0x5f28c3(0x1b6)+CLI_BIN_NAME+a256_0x5f28c3(0x1b7),'notInProjectHint':a256_0x5f28c3(0x1aa)});export const CliErrors={'authRequired'(_0x3d1929){const _0x3402bd=a256_0x5f28c3;return new CliError(_0x3402bd(0x1b8),0x1,'Authentication\x20required',_0x3d1929??'Run\x20`'+CLI_BIN_NAME+_0x3402bd(0x1a2));},'configMissing'(_0x3ee06e){const _0x3c7680=a256_0x5f28c3;return new CliError('config_missing',0x1,'Configuration\x20file\x20not\x20found',_0x3ee06e??_0x3c7680(0x19e)+CLI_BIN_NAME+_0x3c7680(0x1b6)+CLI_BIN_NAME+_0x3c7680(0x1b7));},'notInProject'(){const _0x4346f3=a256_0x5f28c3;return new CliError(_0x4346f3(0x1b3),0x1,_0x4346f3(0x1a1)+CLI_BIN_NAME+_0x4346f3(0x1b9),_0x4346f3(0x1aa));},'apiError'(_0x2ab7ca,_0x362f62){const _0x484f5a=a256_0x5f28c3;return baseCliErrors[_0x484f5a(0x1a0)](_0x2ab7ca,_0x362f62);},'networkError'(_0x56e48f){const _0x3ad3b4=a256_0x5f28c3;return new CliError(_0x3ad3b4(0x1a7),0x2,_0x3ad3b4(0x1ae)+_0x56e48f,_0x3ad3b4(0x1b1));},'unknownCommand'(_0x66c180){const _0x9d5dff=a256_0x5f28c3;return new CliError(_0x9d5dff(0x1bb),0x1,_0x9d5dff(0x1a5)+_0x66c180,_0x9d5dff(0x1a3)+CLI_BIN_NAME+_0x9d5dff(0x1ab));},'flagMissing'(_0x3c5f10,_0x18a9cc){const _0x3fe5be=a256_0x5f28c3;return new CliError('flag_missing',0x1,_0x3fe5be(0x1b4)+_0x3c5f10,_0x18a9cc);},'validation'(_0x1832eb,_0x29beaf){return baseCliErrors['validation'](_0x1832eb,_0x29beaf);},'cancelled'(_0x1240fd){const _0x45c529=a256_0x5f28c3;return new CliError(_0x45c529(0x1a4),0x0,_0x1240fd??_0x45c529(0x1b0));}};
@@ -1 +1 @@
1
- (function(_0x41965d,_0x23230e){const _0x10fcf7=a252_0x14c1,_0x4470bd=_0x41965d();while(!![]){try{const _0x2f6a73=-parseInt(_0x10fcf7(0x89))/0x1*(-parseInt(_0x10fcf7(0x80))/0x2)+parseInt(_0x10fcf7(0x88))/0x3+parseInt(_0x10fcf7(0x7f))/0x4+-parseInt(_0x10fcf7(0x86))/0x5+-parseInt(_0x10fcf7(0x82))/0x6+-parseInt(_0x10fcf7(0x83))/0x7*(-parseInt(_0x10fcf7(0x81))/0x8)+-parseInt(_0x10fcf7(0x85))/0x9;if(_0x2f6a73===_0x23230e)break;else _0x4470bd['push'](_0x4470bd['shift']());}catch(_0x2b8e04){_0x4470bd['push'](_0x4470bd['shift']());}}}(a252_0x1c73,0x63f88));function a252_0x14c1(_0x2bdca0,_0x267fb9){_0x2bdca0=_0x2bdca0-0x7f;const _0x1c737d=a252_0x1c73();let _0x14c16a=_0x1c737d[_0x2bdca0];return _0x14c16a;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a252_0x39b216}from'@lovrabet/cli-framework';function a252_0x1c73(){const _0x6a3d59=['14wHgeQp','name','3355479ZtUBJP','674270GeFLva','yes','679548ijtlrz','1wFfzNY','1984172eDZzgR','1051696zLFKid','256792gGwyct','2372640WWXxdY'];a252_0x1c73=function(){return _0x6a3d59;};return a252_0x1c73();}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x1eb00a){const _0x272da6=a252_0x14c1,_0x4afce5=a252_0x39b216(_0x1eb00a,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x1eb00a))return _0x4afce5;return _0x4afce5['map'](_0x8cbf17=>_0x8cbf17[_0x272da6(0x84)]===_0x272da6(0x87)?{..._0x8cbf17,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x8cbf17);}
1
+ (function(_0x33e7c8,_0x116231){const _0x431912=a257_0x405b,_0x444b2d=_0x33e7c8();while(!![]){try{const _0x3bd944=-parseInt(_0x431912(0x70))/0x1+parseInt(_0x431912(0x67))/0x2*(-parseInt(_0x431912(0x6d))/0x3)+parseInt(_0x431912(0x71))/0x4+parseInt(_0x431912(0x66))/0x5*(parseInt(_0x431912(0x68))/0x6)+-parseInt(_0x431912(0x72))/0x7*(-parseInt(_0x431912(0x6a))/0x8)+-parseInt(_0x431912(0x69))/0x9+parseInt(_0x431912(0x6f))/0xa*(-parseInt(_0x431912(0x6e))/0xb);if(_0x3bd944===_0x116231)break;else _0x444b2d['push'](_0x444b2d['shift']());}catch(_0x2eab76){_0x444b2d['push'](_0x444b2d['shift']());}}}(a257_0x23c5,0xde390));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a257_0x23c5(){const _0x2661f6=['1160043DlDPma','64097bEdCeD','1830ZEFRut','252656yDZXWV','2304496EpLuqh','5481483nRpWpZ','1725935LOGsBu','6MjBnEa','30neJixm','4310397fIGOvX','16XCHeHC','map','yes'];a257_0x23c5=function(){return _0x2661f6;};return a257_0x23c5();}import{buildAllFlags as a257_0x1a1e15}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a257_0x405b(_0xfbdcec,_0x5713ac){_0xfbdcec=_0xfbdcec-0x66;const _0x23c5d3=a257_0x23c5();let _0x405b8a=_0x23c5d3[_0xfbdcec];return _0x405b8a;}export function buildAllFlags(_0x2654ab){const _0x52259e=a257_0x405b,_0x49f039=a257_0x1a1e15(_0x2654ab,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x2654ab))return _0x49f039;return _0x49f039[_0x52259e(0x6b)](_0x4403cd=>_0x4403cd['name']===_0x52259e(0x6c)?{..._0x4403cd,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x4403cd);}
@@ -1 +1 @@
1
- function a253_0x12a9(_0x7fbcfc,_0x3db2ad){_0x7fbcfc=_0x7fbcfc-0x1c7;var _0x5adf2c=a253_0x5adf();var _0x12a999=_0x5adf2c[_0x7fbcfc];return _0x12a999;}(function(_0x146fc9,_0x72f471){var _0x42f3fe=a253_0x12a9,_0x20d772=_0x146fc9();while(!![]){try{var _0x9613e4=parseInt(_0x42f3fe(0x1d2))/0x1*(-parseInt(_0x42f3fe(0x1ce))/0x2)+parseInt(_0x42f3fe(0x1ca))/0x3*(-parseInt(_0x42f3fe(0x1c7))/0x4)+-parseInt(_0x42f3fe(0x1cf))/0x5+-parseInt(_0x42f3fe(0x1cc))/0x6+-parseInt(_0x42f3fe(0x1c8))/0x7*(-parseInt(_0x42f3fe(0x1c9))/0x8)+parseInt(_0x42f3fe(0x1cb))/0x9+parseInt(_0x42f3fe(0x1d0))/0xa*(parseInt(_0x42f3fe(0x1d4))/0xb);if(_0x9613e4===_0x72f471)break;else _0x20d772['push'](_0x20d772['shift']());}catch(_0x5cfd66){_0x20d772['push'](_0x20d772['shift']());}}}(a253_0x5adf,0x1cf61));function a253_0x5adf(){var _0x469142=['1358670tlXIKu','compress','61136cgrVJA','356690HOWELr','233090nrbGSX','defaultFormat','3WarzVo','format','209cUJlmd','structuredErrors','def','905436hcuUyx','4249gxZpIC','3056gGXCiM','3EQuhnE','537534lQuZHr'];a253_0x5adf=function(){return _0x469142;};return a253_0x5adf();}import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x4aaf87){var _0x3231de=a253_0x12a9;return _0x4aaf87?.[_0x3231de(0x1d5)]===!![];}export function resolveErrorOutputFormat(_0x214a4e){var _0x1676c7=a253_0x12a9;if(!_0x214a4e[_0x1676c7(0x1d6)])return _0x214a4e[_0x1676c7(0x1d1)]??_0x1676c7(0x1cd);return resolveOutputConfig({'flags':_0x214a4e['flags']??{},'def':_0x214a4e[_0x1676c7(0x1d6)],'configDefault':_0x214a4e[_0x1676c7(0x1d1)]})[_0x1676c7(0x1d3)];}
1
+ function a258_0x4c37(_0x53b6b0,_0x5e2219){_0x53b6b0=_0x53b6b0-0xe1;var _0x481ee3=a258_0x481e();var _0x4c37c3=_0x481ee3[_0x53b6b0];return _0x4c37c3;}(function(_0x56fec2,_0x5076bf){var _0x16ef13=a258_0x4c37,_0x2adb60=_0x56fec2();while(!![]){try{var _0x58ab3b=parseInt(_0x16ef13(0xeb))/0x1*(parseInt(_0x16ef13(0xe9))/0x2)+parseInt(_0x16ef13(0xea))/0x3+parseInt(_0x16ef13(0xee))/0x4*(-parseInt(_0x16ef13(0xf1))/0x5)+-parseInt(_0x16ef13(0xec))/0x6*(parseInt(_0x16ef13(0xe7))/0x7)+parseInt(_0x16ef13(0xed))/0x8*(-parseInt(_0x16ef13(0xf0))/0x9)+-parseInt(_0x16ef13(0xe4))/0xa*(parseInt(_0x16ef13(0xe8))/0xb)+parseInt(_0x16ef13(0xe3))/0xc;if(_0x58ab3b===_0x5076bf)break;else _0x2adb60['push'](_0x2adb60['shift']());}catch(_0x2e5554){_0x2adb60['push'](_0x2adb60['shift']());}}}(a258_0x481e,0xd55c6));import{resolveOutputConfig}from'@lovrabet/cli-framework';function a258_0x481e(){var _0x47be99=['3919398vepQtp','40xSGadp','159700sYZTQc','compress','2377044vxaqFp','40SXQxCn','defaultFormat','format','43709148uOqUgG','15964190ovxgvb','flags','def','14HHtrTf','11AETdRT','6RKJULi','3949173DmpHSQ','152657dzzmgF'];a258_0x481e=function(){return _0x47be99;};return a258_0x481e();}export function usesStructuredErrorOutput(_0x5c7202){return _0x5c7202?.['structuredErrors']===!![];}export function resolveErrorOutputFormat(_0x46ef4c){var _0x37bcd8=a258_0x4c37;if(!_0x46ef4c[_0x37bcd8(0xe6)])return _0x46ef4c[_0x37bcd8(0xe1)]??_0x37bcd8(0xef);return resolveOutputConfig({'flags':_0x46ef4c[_0x37bcd8(0xe5)]??{},'def':_0x46ef4c[_0x37bcd8(0xe6)],'configDefault':_0x46ef4c[_0x37bcd8(0xe1)]})[_0x37bcd8(0xe2)];}
@@ -1 +1 @@
1
- function a254_0xda98(){const _0x1a1f7d=['378381kYDplx','25ASTjoA','552CGOuvP','5576813AlViii','has','3500586TVqbJy','459804MoQzPJ','service','10YTYuiQ','8OkFcXx','menu\x20delete','5046oJNyaG','1767VxzHYC','notification\x20config-delete','166551LMsFYi'];a254_0xda98=function(){return _0x1a1f7d;};return a254_0xda98();}const a254_0x3a1748=a254_0x4cb9;function a254_0x4cb9(_0x592e05,_0x2fbb0d){_0x592e05=_0x592e05-0x78;const _0xda98e4=a254_0xda98();let _0x4cb937=_0xda98e4[_0x592e05];return _0x4cb937;}(function(_0x5562e7,_0x5a9da5){const _0x398f5c=a254_0x4cb9,_0x55ed94=_0x5562e7();while(!![]){try{const _0x4ae05a=parseInt(_0x398f5c(0x7e))/0x1+parseInt(_0x398f5c(0x80))/0x2*(-parseInt(_0x398f5c(0x7b))/0x3)+-parseInt(_0x398f5c(0x84))/0x4+-parseInt(_0x398f5c(0x7f))/0x5*(-parseInt(_0x398f5c(0x7a))/0x6)+-parseInt(_0x398f5c(0x7d))/0x7+-parseInt(_0x398f5c(0x78))/0x8*(parseInt(_0x398f5c(0x83))/0x9)+-parseInt(_0x398f5c(0x86))/0xa*(-parseInt(_0x398f5c(0x81))/0xb);if(_0x4ae05a===_0x5a9da5)break;else _0x55ed94['push'](_0x55ed94['shift']());}catch(_0xa6ff44){_0x55ed94['push'](_0x55ed94['shift']());}}}(a254_0xda98,0x30a8b));const EXPLICIT_YES_COMMANDS=new Set([a254_0x3a1748(0x79),'kb\x20delete','notification\x20config-update',a254_0x3a1748(0x7c)]);export const EXPLICIT_YES_FLAG_DESCRIPTION='Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan';export function requiresExplicitYes(_0x50099f){const _0x290128=a254_0x3a1748;return EXPLICIT_YES_COMMANDS[_0x290128(0x82)](_0x50099f[_0x290128(0x85)]+'\x20'+_0x50099f['command']);}
1
+ const a259_0x1f2207=a259_0x3a84;function a259_0x5d0b(){const _0x992e6e=['1172283btkfHm','2826612yXCoDo','125PJoAgM','1118364reSVfd','305339gRfRtL','has','40PKPcqx','420978BRucce','14558592JovAwb','menu\x20delete','notification\x20config-delete','603436CFrGAg','15Gbzdlx','command','notification\x20config-update'];a259_0x5d0b=function(){return _0x992e6e;};return a259_0x5d0b();}(function(_0x291fa7,_0x3e9158){const _0x525e20=a259_0x3a84,_0x50ebec=_0x291fa7();while(!![]){try{const _0x1bf6c4=-parseInt(_0x525e20(0xa2))/0x1+-parseInt(_0x525e20(0xa1))/0x2+parseInt(_0x525e20(0x9b))/0x3*(parseInt(_0x525e20(0x9a))/0x4)+-parseInt(_0x525e20(0xa0))/0x5*(-parseInt(_0x525e20(0xa5))/0x6)+-parseInt(_0x525e20(0x9e))/0x7+-parseInt(_0x525e20(0xa6))/0x8+-parseInt(_0x525e20(0x9f))/0x9*(-parseInt(_0x525e20(0xa4))/0xa);if(_0x1bf6c4===_0x3e9158)break;else _0x50ebec['push'](_0x50ebec['shift']());}catch(_0x41599c){_0x50ebec['push'](_0x50ebec['shift']());}}}(a259_0x5d0b,0xdedbc));function a259_0x3a84(_0x379f55,_0x166d7a){_0x379f55=_0x379f55-0x9a;const _0x5d0b55=a259_0x5d0b();let _0x3a8431=_0x5d0b55[_0x379f55];return _0x3a8431;}const EXPLICIT_YES_COMMANDS=new Set([a259_0x1f2207(0xa7),'kb\x20delete',a259_0x1f2207(0x9d),a259_0x1f2207(0xa8)]);export const EXPLICIT_YES_FLAG_DESCRIPTION='Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan';export function requiresExplicitYes(_0x4b8e48){const _0x3f15b3=a259_0x1f2207;return EXPLICIT_YES_COMMANDS[_0x3f15b3(0xa3)](_0x4b8e48['service']+'\x20'+_0x4b8e48[_0x3f15b3(0x9c)]);}
@@ -1 +1 @@
1
- const a255_0x398e78=a255_0x2358;(function(_0x50f291,_0x25e0a3){const _0x118976=a255_0x2358,_0x553825=_0x50f291();while(!![]){try{const _0x283de8=-parseInt(_0x118976(0xb3))/0x1*(-parseInt(_0x118976(0xb2))/0x2)+-parseInt(_0x118976(0xb8))/0x3+-parseInt(_0x118976(0xaf))/0x4+-parseInt(_0x118976(0xb5))/0x5+-parseInt(_0x118976(0xae))/0x6*(parseInt(_0x118976(0xb7))/0x7)+-parseInt(_0x118976(0xb0))/0x8+parseInt(_0x118976(0xb4))/0x9;if(_0x283de8===_0x25e0a3)break;else _0x553825['push'](_0x553825['shift']());}catch(_0x3ebf74){_0x553825['push'](_0x553825['shift']());}}}(a255_0xda56,0x7db15));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a255_0x2358(_0x1eb898,_0x5589df){_0x1eb898=_0x1eb898-0xae;const _0xda56de=a255_0xda56();let _0x2358ff=_0xda56de[_0x1eb898];return _0x2358ff;}export const parseFlags=helpers[a255_0x398e78(0xb1)];function a255_0xda56(){const _0x1c4aba=['21661CsDZNs','38960019vdwGaP','4377595HKcdLf','validateFlags','21KKtAfD','2543706AyIlZo','1967208uxhwAX','4070108hekNCY','889304JSIFhF','parseFlags','2MHiGxs'];a255_0xda56=function(){return _0x1c4aba;};return a255_0xda56();}export const validateFlags=helpers[a255_0x398e78(0xb6)];
1
+ const a260_0xead797=a260_0x60a4;(function(_0x41e41,_0x4697f0){const _0x3e4a72=a260_0x60a4,_0x1d125a=_0x41e41();while(!![]){try{const _0x7ce9c4=-parseInt(_0x3e4a72(0x189))/0x1+parseInt(_0x3e4a72(0x191))/0x2*(parseInt(_0x3e4a72(0x18a))/0x3)+parseInt(_0x3e4a72(0x186))/0x4+-parseInt(_0x3e4a72(0x18e))/0x5+parseInt(_0x3e4a72(0x188))/0x6*(-parseInt(_0x3e4a72(0x18f))/0x7)+-parseInt(_0x3e4a72(0x192))/0x8*(parseInt(_0x3e4a72(0x18b))/0x9)+-parseInt(_0x3e4a72(0x18d))/0xa*(-parseInt(_0x3e4a72(0x187))/0xb);if(_0x7ce9c4===_0x4697f0)break;else _0x1d125a['push'](_0x1d125a['shift']());}catch(_0x9686aa){_0x1d125a['push'](_0x1d125a['shift']());}}}(a260_0xb2f8,0xd2f1a));import{createFlagHelpers}from'@lovrabet/cli-framework';function a260_0x60a4(_0x4b2ae3,_0xcc858b){_0x4b2ae3=_0x4b2ae3-0x186;const _0xb2f831=a260_0xb2f8();let _0x60a40b=_0xb2f831[_0x4b2ae3];return _0x60a40b;}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a260_0xead797(0x190)];function a260_0xb2f8(){const _0x3591f8=['9662StyPFK','4558952dlpXuw','5801708AFXkDq','20647uHZRDs','6zOjtIK','792018rFDCFm','837LbYjhH','27xgzSGE','validateFlags','19070nISfeF','7539490FldEnY','10529162nTlFmJ','parseFlags'];a260_0xb2f8=function(){return _0x3591f8;};return a260_0xb2f8();}export const validateFlags=helpers[a260_0xead797(0x18c)];
@@ -1 +1 @@
1
- (function(_0x336de3,_0x535690){const _0x3d2771=a256_0x4979,_0x462f53=_0x336de3();while(!![]){try{const _0xa11208=-parseInt(_0x3d2771(0x1d6))/0x1+-parseInt(_0x3d2771(0x1db))/0x2+-parseInt(_0x3d2771(0x1d4))/0x3+-parseInt(_0x3d2771(0x1d0))/0x4*(-parseInt(_0x3d2771(0x1dd))/0x5)+parseInt(_0x3d2771(0x1d5))/0x6+parseInt(_0x3d2771(0x1d9))/0x7*(parseInt(_0x3d2771(0x1d7))/0x8)+-parseInt(_0x3d2771(0x1dc))/0x9;if(_0xa11208===_0x535690)break;else _0x462f53['push'](_0x462f53['shift']());}catch(_0x296baf){_0x462f53['push'](_0x462f53['shift']());}}}(a256_0x1c59,0xc8932));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';function a256_0x1c59(){const _0x336b09=['4455576NDLzLj','192118IBzYQH','3448lpysfz','Requires\x20appcode\x20(set\x20via\x20`','21889aPPuZd','generateServiceHelp','828172bBtzIt','637506KccsQe','10BfXMZf','generateCommandHelp','generateFullHelp','get','177724ecYddX','\x20[args]\x20[flags]','replace','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','2041809IzwRLD'];a256_0x1c59=function(){return _0x336b09;};return a256_0x1c59();}function a256_0x4979(_0x1fee26,_0x3d0108){_0x1fee26=_0x1fee26-0x1ce;const _0x1c5966=a256_0x1c59();let _0x49798b=_0x1c5966[_0x1fee26];return _0x49798b;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';function createGenerators(){const _0x592a2b=a256_0x4979;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x35925c=>serviceGroups[_0x592a2b(0x1cf)](_0x35925c),'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x592a2b(0x1d8)+CLI_BIN_NAME+'\x20workspace\x20init`\x20or\x20--appcode).','serviceUsageSuffix':_0x592a2b(0x1d1)});}export function generateCommandHelp(_0x340e07){const _0x5e1b66=a256_0x4979,_0x32c388=createGenerators()[_0x5e1b66(0x1de)](_0x340e07);if(!requiresExplicitYes(_0x340e07))return _0x32c388;return _0x32c388[_0x5e1b66(0x1d2)](_0x5e1b66(0x1d3),'Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.');}export function generateServiceHelp(_0x34118b){const _0x48453a=a256_0x4979;return createGenerators()[_0x48453a(0x1da)](_0x34118b);}export function generateFullHelp(){const _0x108e7e=a256_0x4979;return createGenerators()[_0x108e7e(0x1ce)]();}
1
+ (function(_0x46800b,_0x5770e2){const _0x40fba9=a261_0x3afd,_0xeecb4d=_0x46800b();while(!![]){try{const _0x193074=-parseInt(_0x40fba9(0x7e))/0x1*(-parseInt(_0x40fba9(0x80))/0x2)+parseInt(_0x40fba9(0x76))/0x3*(parseInt(_0x40fba9(0x73))/0x4)+-parseInt(_0x40fba9(0x7a))/0x5*(parseInt(_0x40fba9(0x71))/0x6)+-parseInt(_0x40fba9(0x72))/0x7*(-parseInt(_0x40fba9(0x7c))/0x8)+parseInt(_0x40fba9(0x74))/0x9+parseInt(_0x40fba9(0x7d))/0xa+-parseInt(_0x40fba9(0x77))/0xb*(parseInt(_0x40fba9(0x79))/0xc);if(_0x193074===_0x5770e2)break;else _0xeecb4d['push'](_0xeecb4d['shift']());}catch(_0x15a23b){_0xeecb4d['push'](_0xeecb4d['shift']());}}}(a261_0x1603,0x88b0d));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 createGenerators(){const _0x1e26b9=a261_0x3afd;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x69bc45=>serviceGroups['get'](_0x69bc45),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+'\x20workspace\x20init`\x20or\x20--appcode).','serviceUsageSuffix':_0x1e26b9(0x78)});}function a261_0x3afd(_0x18ca7d,_0xe08498){_0x18ca7d=_0x18ca7d-0x71;const _0x1603ca=a261_0x1603();let _0x3afd01=_0x1603ca[_0x18ca7d];return _0x3afd01;}export function generateCommandHelp(_0x24bbf7){const _0x169408=a261_0x3afd,_0x24dfaf=createGenerators()[_0x169408(0x7b)](_0x24bbf7);if(!requiresExplicitYes(_0x24bbf7))return _0x24dfaf;return _0x24dfaf['replace'](_0x169408(0x75),'Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.');}export function generateServiceHelp(_0x49b685){const _0x21c258=a261_0x3afd;return createGenerators()[_0x21c258(0x7f)](_0x49b685);}function a261_0x1603(){const _0x2d692d=['generateCommandHelp','280KlMOxG','116930adYSWL','1gfPjMY','generateServiceHelp','1711362mNQhxQ','6432306oWpReu','199444oYjaFr','4cxalqA','9712944UeFUdp','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','99087QjqIZC','231WQOjCb','\x20[args]\x20[flags]','768516oVTQPq','5UtUZdw'];a261_0x1603=function(){return _0x2d692d;};return a261_0x1603();}export function generateFullHelp(){return createGenerators()['generateFullHelp']();}
@@ -1 +1 @@
1
- (function(_0x934545,_0xc69aab){var _0xc9ddf6=a257_0x3095,_0x35f0e8=_0x934545();while(!![]){try{var _0x2330ad=parseInt(_0xc9ddf6(0x1de))/0x1+parseInt(_0xc9ddf6(0x1dd))/0x2+-parseInt(_0xc9ddf6(0x1dc))/0x3*(parseInt(_0xc9ddf6(0x1e6))/0x4)+parseInt(_0xc9ddf6(0x1e3))/0x5*(-parseInt(_0xc9ddf6(0x1df))/0x6)+-parseInt(_0xc9ddf6(0x1e2))/0x7+-parseInt(_0xc9ddf6(0x1e5))/0x8*(parseInt(_0xc9ddf6(0x1e1))/0x9)+-parseInt(_0xc9ddf6(0x1e0))/0xa*(-parseInt(_0xc9ddf6(0x1e4))/0xb);if(_0x2330ad===_0xc69aab)break;else _0x35f0e8['push'](_0x35f0e8['shift']());}catch(_0x2ffb9c){_0x35f0e8['push'](_0x35f0e8['shift']());}}}(a257_0x480c,0xf27dd));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';function a257_0x480c(){var _0x1140d9=['8zDntYs','818037rezFnX','492548XRxLJP','464748skqHLX','6NVQbgB','2584490VABPpa','1975473zTEETS','12818631xfemDp','2991910vXkMXB','176eIunnu','32LuXidr'];a257_0x480c=function(){return _0x1140d9;};return a257_0x480c();}function a257_0x3095(_0x1cf654,_0x1be572){_0x1cf654=_0x1cf654-0x1dc;var _0x480c55=a257_0x480c();var _0x3095e0=_0x480c55[_0x1cf654];return _0x3095e0;}export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
1
+ function a262_0x3166(){var _0x4177c9=['963315oztbQQ','1146285nDbtiq','1265QVlgBq','161ELqHBz','6mCSCmU','3639174HwqqQn','7032rdfMqZ','6216488fxDGWM','80XHfRhE','128670uBhNxa','530776NeKQbg'];a262_0x3166=function(){return _0x4177c9;};return a262_0x3166();}function a262_0x1e6b(_0x454778,_0x31a03b){_0x454778=_0x454778-0x1b7;var _0x3166c5=a262_0x3166();var _0x1e6b18=_0x3166c5[_0x454778];return _0x1e6b18;}(function(_0x21b77f,_0x325885){var _0x22791e=a262_0x1e6b,_0x37faa0=_0x21b77f();while(!![]){try{var _0x2630bc=-parseInt(_0x22791e(0x1c1))/0x1+-parseInt(_0x22791e(0x1bb))/0x2*(parseInt(_0x22791e(0x1b7))/0x3)+parseInt(_0x22791e(0x1bd))/0x4*(-parseInt(_0x22791e(0x1b9))/0x5)+-parseInt(_0x22791e(0x1c0))/0x6*(-parseInt(_0x22791e(0x1ba))/0x7)+-parseInt(_0x22791e(0x1be))/0x8+parseInt(_0x22791e(0x1b8))/0x9+parseInt(_0x22791e(0x1bf))/0xa*(parseInt(_0x22791e(0x1bc))/0xb);if(_0x2630bc===_0x325885)break;else _0x37faa0['push'](_0x37faa0['shift']());}catch(_0x25f850){_0x37faa0['push'](_0x37faa0['shift']());}}}(a262_0x3166,0x869b2));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';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(_0x1bffcf,_0xcccf5e){const _0x2eb3fd=a258_0x12d6,_0x25e539=_0x1bffcf();while(!![]){try{const _0x4d7aa4=-parseInt(_0x2eb3fd(0x153))/0x1*(-parseInt(_0x2eb3fd(0x169))/0x2)+-parseInt(_0x2eb3fd(0x156))/0x3*(parseInt(_0x2eb3fd(0x150))/0x4)+parseInt(_0x2eb3fd(0x164))/0x5+-parseInt(_0x2eb3fd(0x166))/0x6*(-parseInt(_0x2eb3fd(0x161))/0x7)+-parseInt(_0x2eb3fd(0x14e))/0x8+parseInt(_0x2eb3fd(0x168))/0x9+parseInt(_0x2eb3fd(0x15e))/0xa;if(_0x4d7aa4===_0xcccf5e)break;else _0x25e539['push'](_0x25e539['shift']());}catch(_0xee51c4){_0x25e539['push'](_0x25e539['shift']());}}}(a258_0x1b1f,0x397df));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a258_0x1b1f(){const _0x24507a=['1495143Ncasiv','6FKYqsZ','3207880ScJrXR','risk','20156XsjJdF','_notice','jqFilter','35253vVgroM','format','stringify','87bXFJsd','pretty','trim','write','hint','command','url','error','729900FOJaOC','message','update','2996cKzlRA','validation','code','814755eTSbuw','json','3852uVCBFW','stdout'];a258_0x1b1f=function(){return _0x24507a;};return a258_0x1b1f();}import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';function a258_0x12d6(_0x1da1e7,_0x577338){_0x1da1e7=_0x1da1e7-0x14e;const _0x1b1fe4=a258_0x1b1f();let _0x12d66=_0x1b1fe4[_0x1da1e7];return _0x12d66;}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x598bde,_0x4988b4){const _0x15c91c=a258_0x12d6,_0x53bd48=_0x598bde[_0x15c91c(0x151)],{_notice:_0x14d3c1,..._0x1cb70a}=_0x598bde;void _0x14d3c1,baseFormatOutput(_0x1cb70a,_0x4988b4),_0x4988b4[_0x15c91c(0x154)]===_0x15c91c(0x157)&&printPrettyNotice(_0x53bd48);}export function formatCliError(_0x2093e6,_0x9ba271){const _0x11d3b7=a258_0x12d6;if(_0x9ba271[_0x11d3b7(0x154)]===_0x11d3b7(0x157))return![];const _0xbf48bd=_0x2093e6['data'],_0x13a366={'ok':![],'command':_0x9ba271[_0x11d3b7(0x15b)],'risk':_0x9ba271[_0x11d3b7(0x14f)],'data':_0xbf48bd??null,'error':{'code':_0x2093e6[_0x11d3b7(0x163)],'message':_0x2093e6[_0x11d3b7(0x15f)],..._0x2093e6[_0x11d3b7(0x15a)]?{'hint':_0x2093e6[_0x11d3b7(0x15a)]}:{}}},_0x4f79c0=_0x9ba271[_0x11d3b7(0x154)]===_0x11d3b7(0x165)?JSON[_0x11d3b7(0x155)](_0x13a366,null,0x2):JSON[_0x11d3b7(0x155)](_0x13a366);let _0x4effeb=_0x4f79c0;if(_0x9ba271[_0x11d3b7(0x152)]?.[_0x11d3b7(0x158)]())try{_0x4effeb=applyJqFilter(_0x4f79c0,_0x9ba271['jqFilter']);}catch(_0x1528c2){const _0x34fe40=_0x1528c2 instanceof CliError?_0x1528c2:CliErrors[_0x11d3b7(0x162)]('jq:\x20'+(_0x1528c2 instanceof Error?_0x1528c2[_0x11d3b7(0x15f)]:String(_0x1528c2))),_0x587a99={..._0x13a366,'error':{'code':_0x34fe40['code'],'message':_0x34fe40[_0x11d3b7(0x15f)],..._0x34fe40[_0x11d3b7(0x15a)]?{'hint':_0x34fe40[_0x11d3b7(0x15a)]}:{},'cause':_0x13a366['error']}};_0x4effeb=_0x9ba271[_0x11d3b7(0x154)]===_0x11d3b7(0x165)?JSON[_0x11d3b7(0x155)](_0x587a99,null,0x2):JSON[_0x11d3b7(0x155)](_0x587a99);}return process[_0x11d3b7(0x167)][_0x11d3b7(0x159)](_0x4effeb['endsWith']('\x0a')?_0x4effeb:_0x4effeb+'\x0a'),!![];}function printPrettyNotice(_0x551d12){const _0x31cb08=a258_0x12d6;if(!_0x551d12?.[_0x31cb08(0x160)])return;console[_0x31cb08(0x15d)](_0x551d12['update'][_0x31cb08(0x15f)]+'\x20('+_0x551d12[_0x31cb08(0x160)][_0x31cb08(0x15c)]+')');}
1
+ function a263_0x3888(_0x3c1f33,_0x441203){_0x3c1f33=_0x3c1f33-0x1d6;const _0x4d0f03=a263_0x4d0f();let _0x3888b9=_0x4d0f03[_0x3c1f33];return _0x3888b9;}(function(_0x1da74d,_0x20dea7){const _0x46c602=a263_0x3888,_0x22792f=_0x1da74d();while(!![]){try{const _0x6dad63=parseInt(_0x46c602(0x1e2))/0x1+parseInt(_0x46c602(0x1e9))/0x2*(parseInt(_0x46c602(0x1e0))/0x3)+parseInt(_0x46c602(0x1e8))/0x4+-parseInt(_0x46c602(0x1db))/0x5+parseInt(_0x46c602(0x1e6))/0x6*(parseInt(_0x46c602(0x1dc))/0x7)+parseInt(_0x46c602(0x1df))/0x8+-parseInt(_0x46c602(0x1d7))/0x9;if(_0x6dad63===_0x20dea7)break;else _0x22792f['push'](_0x22792f['shift']());}catch(_0x2992dd){_0x22792f['push'](_0x22792f['shift']());}}}(a263_0x4d0f,0x5b0a2));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a263_0x4d0f(){const _0x5f2ffb=['322268TixvSN','429316LmNsaM','url','validation','risk','pretty','format','message','jqFilter','hint','trim','10050543ejUNkA','write','command','endsWith','1389785bNpGzz','131145oqywpa','stdout','json','5343736LRoDmE','6fQTvoD','stringify','364912blzFyN','update','_notice','code','72wByenx','error'];a263_0x4d0f=function(){return _0x5f2ffb;};return a263_0x4d0f();}export function formatOutput(_0x378c77,_0x2b4a9c){const _0x2fd834=a263_0x3888,_0x33983f=_0x378c77[_0x2fd834(0x1e4)],{_notice:_0x47d79f,..._0x1c3ead}=_0x378c77;void _0x47d79f,baseFormatOutput(_0x1c3ead,_0x2b4a9c),_0x2b4a9c['format']===_0x2fd834(0x1ed)&&printPrettyNotice(_0x33983f);}export function formatCliError(_0x10ac48,_0x1af71b){const _0x287da7=a263_0x3888;if(_0x1af71b[_0x287da7(0x1ee)]===_0x287da7(0x1ed))return![];const _0x28f489=_0x10ac48['data'],_0x17d87f={'ok':![],'command':_0x1af71b[_0x287da7(0x1d9)],'risk':_0x1af71b[_0x287da7(0x1ec)],'data':_0x28f489??null,'error':{'code':_0x10ac48[_0x287da7(0x1e5)],'message':_0x10ac48['message'],..._0x10ac48[_0x287da7(0x1f1)]?{'hint':_0x10ac48[_0x287da7(0x1f1)]}:{}}},_0x2709af=_0x1af71b[_0x287da7(0x1ee)]===_0x287da7(0x1de)?JSON['stringify'](_0x17d87f,null,0x2):JSON[_0x287da7(0x1e1)](_0x17d87f);let _0xb96922=_0x2709af;if(_0x1af71b['jqFilter']?.[_0x287da7(0x1d6)]())try{_0xb96922=applyJqFilter(_0x2709af,_0x1af71b[_0x287da7(0x1f0)]);}catch(_0x50381b){const _0x2ebef5=_0x50381b instanceof CliError?_0x50381b:CliErrors[_0x287da7(0x1eb)]('jq:\x20'+(_0x50381b instanceof Error?_0x50381b[_0x287da7(0x1ef)]:String(_0x50381b))),_0x51fc51={..._0x17d87f,'error':{'code':_0x2ebef5[_0x287da7(0x1e5)],'message':_0x2ebef5[_0x287da7(0x1ef)],..._0x2ebef5[_0x287da7(0x1f1)]?{'hint':_0x2ebef5[_0x287da7(0x1f1)]}:{},'cause':_0x17d87f[_0x287da7(0x1e7)]}};_0xb96922=_0x1af71b[_0x287da7(0x1ee)]===_0x287da7(0x1de)?JSON['stringify'](_0x51fc51,null,0x2):JSON[_0x287da7(0x1e1)](_0x51fc51);}return process[_0x287da7(0x1dd)][_0x287da7(0x1d8)](_0xb96922[_0x287da7(0x1da)]('\x0a')?_0xb96922:_0xb96922+'\x0a'),!![];}function printPrettyNotice(_0x17b592){const _0x5e0c42=a263_0x3888;if(!_0x17b592?.[_0x5e0c42(0x1e3)])return;console[_0x5e0c42(0x1e7)](_0x17b592[_0x5e0c42(0x1e3)]['message']+'\x20('+_0x17b592[_0x5e0c42(0x1e3)][_0x5e0c42(0x1ea)]+')');}