@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-beta.3

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 (389) hide show
  1. package/README.md +10 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +2 -2
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.js +1 -1
  18. package/lib/auth/login-success-html.js +1 -1
  19. package/lib/auth/logout.js +1 -1
  20. package/lib/cli-flags.js +1 -1
  21. package/lib/cli.js +1 -1
  22. package/lib/commands/api/generate.js +1 -1
  23. package/lib/commands/api/index.js +1 -1
  24. package/lib/commands/api/list.js +1 -1
  25. package/lib/commands/api/pull.js +1 -1
  26. package/lib/commands/api/shared.js +1 -1
  27. package/lib/commands/app/detail.js +1 -1
  28. package/lib/commands/app/index.js +1 -1
  29. package/lib/commands/app/list.js +1 -1
  30. package/lib/commands/app/members-list.js +1 -1
  31. package/lib/commands/app/remote-directory.js +1 -1
  32. package/lib/commands/app/shared.js +1 -1
  33. package/lib/commands/app-config/delete.js +1 -1
  34. package/lib/commands/app-config/get.js +1 -1
  35. package/lib/commands/app-config/index.js +1 -1
  36. package/lib/commands/app-config/list.js +1 -1
  37. package/lib/commands/app-config/set.js +1 -1
  38. package/lib/commands/app-config/shared.js +1 -1
  39. package/lib/commands/auth/index.js +1 -1
  40. package/lib/commands/bff/create.js +1 -1
  41. package/lib/commands/bff/delete.js +1 -1
  42. package/lib/commands/bff/detail.js +1 -1
  43. package/lib/commands/bff/index.js +1 -1
  44. package/lib/commands/bff/list.js +1 -1
  45. package/lib/commands/bff/logs.js +1 -1
  46. package/lib/commands/bff/pull.js +1 -1
  47. package/lib/commands/bff/push.js +1 -1
  48. package/lib/commands/bff/status.js +1 -1
  49. package/lib/commands/cli-skill/index.js +1 -1
  50. package/lib/commands/cli-update.js +1 -1
  51. package/lib/commands/codegen/index.js +1 -1
  52. package/lib/commands/codegen/sdk.js +1 -1
  53. package/lib/commands/codegen/sql.js +1 -1
  54. package/lib/commands/common/app-registry.js +1 -1
  55. package/lib/commands/common/app-selector.js +1 -1
  56. package/lib/commands/common/async-task.js +1 -1
  57. package/lib/commands/common/dry-run.js +1 -1
  58. package/lib/commands/common/flags.js +1 -1
  59. package/lib/commands/common/local-file.js +1 -1
  60. package/lib/commands/common/validate.js +1 -1
  61. package/lib/commands/config/delete.js +1 -1
  62. package/lib/commands/config/get.js +1 -1
  63. package/lib/commands/config/index.js +1 -1
  64. package/lib/commands/config/init.js +1 -1
  65. package/lib/commands/config/list.js +1 -1
  66. package/lib/commands/config/set.js +1 -1
  67. package/lib/commands/config/shared.js +1 -1
  68. package/lib/commands/dataset/batch-design.js +1 -1
  69. package/lib/commands/dataset/business-group-update.js +1 -1
  70. package/lib/commands/dataset/business-groups.js +1 -1
  71. package/lib/commands/dataset/capability.js +1 -1
  72. package/lib/commands/dataset/cross-relation-create.js +1 -1
  73. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  74. package/lib/commands/dataset/cross-relation-list.js +1 -1
  75. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  76. package/lib/commands/dataset/cross-relation-update.js +1 -1
  77. package/lib/commands/dataset/delete.js +1 -1
  78. package/lib/commands/dataset/design-context.js +1 -1
  79. package/lib/commands/dataset/design-start.js +1 -1
  80. package/lib/commands/dataset/design-status.js +1 -1
  81. package/lib/commands/dataset/design-sync-retry.js +1 -1
  82. package/lib/commands/dataset/design-sync-status.js +1 -1
  83. package/lib/commands/dataset/design-validate.js +1 -1
  84. package/lib/commands/dataset/detail.js +1 -1
  85. package/lib/commands/dataset/extend-update.js +1 -1
  86. package/lib/commands/dataset/field-restore.js +1 -1
  87. package/lib/commands/dataset/field-update.js +1 -1
  88. package/lib/commands/dataset/generate.js +1 -1
  89. package/lib/commands/dataset/index.js +1 -1
  90. package/lib/commands/dataset/list.js +1 -1
  91. package/lib/commands/dataset/operations.js +1 -1
  92. package/lib/commands/dataset/relation-audit.js +1 -1
  93. package/lib/commands/dataset/relation-create.js +1 -1
  94. package/lib/commands/dataset/relation-delete.js +1 -1
  95. package/lib/commands/dataset/relation-shared.js +1 -1
  96. package/lib/commands/dataset/relation-update.js +1 -1
  97. package/lib/commands/dataset/relations.js +1 -1
  98. package/lib/commands/dataset/rename.js +1 -1
  99. package/lib/commands/dataset/restore.js +1 -1
  100. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  101. package/lib/commands/db/analysis-batching.js +1 -1
  102. package/lib/commands/db/analyze-batch-plan.js +1 -1
  103. package/lib/commands/db/analyze-cancel.js +1 -1
  104. package/lib/commands/db/analyze-start.js +1 -1
  105. package/lib/commands/db/analyze-status.js +1 -1
  106. package/lib/commands/db/create.js +1 -1
  107. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  110. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  111. package/lib/commands/db/delete.js +1 -1
  112. package/lib/commands/db/detail.js +1 -1
  113. package/lib/commands/db/diff-refresh-start.js +1 -1
  114. package/lib/commands/db/diff-refresh-status.js +1 -1
  115. package/lib/commands/db/diff.js +1 -1
  116. package/lib/commands/db/index.js +1 -1
  117. package/lib/commands/db/list.js +1 -1
  118. package/lib/commands/db/shared.js +1 -1
  119. package/lib/commands/db/table-diff-shared.js +1 -1
  120. package/lib/commands/db/tables.js +1 -1
  121. package/lib/commands/db/test.js +1 -1
  122. package/lib/commands/db/update.js +1 -1
  123. package/lib/commands/deployment/index.js +1 -1
  124. package/lib/commands/deployment/sync-all.js +1 -1
  125. package/lib/commands/deployment/sync-jobs.js +1 -1
  126. package/lib/commands/deployment/sync-status.js +1 -1
  127. package/lib/commands/doctor.js +1 -1
  128. package/lib/commands/file/index.js +1 -1
  129. package/lib/commands/flow/create.js +1 -1
  130. package/lib/commands/flow/detail.js +1 -1
  131. package/lib/commands/flow/index.js +1 -1
  132. package/lib/commands/flow/list.js +1 -1
  133. package/lib/commands/flow/page-list.js +1 -1
  134. package/lib/commands/flow/publish.js +1 -1
  135. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  136. package/lib/commands/flow/runtime-role-list.js +1 -1
  137. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  138. package/lib/commands/flow/runtime-user-search.js +1 -1
  139. package/lib/commands/flow/shared.js +1 -1
  140. package/lib/commands/flow/update.js +1 -1
  141. package/lib/commands/flow/validate.js +1 -1
  142. package/lib/commands/instant-api-policy/current.js +1 -1
  143. package/lib/commands/instant-api-policy/index.js +1 -1
  144. package/lib/commands/instant-api-policy/init.js +1 -1
  145. package/lib/commands/instant-api-policy/publish.js +1 -1
  146. package/lib/commands/instant-api-policy/pull.js +1 -1
  147. package/lib/commands/instant-api-policy/revision.js +1 -1
  148. package/lib/commands/instant-api-policy/revisions.js +1 -1
  149. package/lib/commands/instant-api-policy/rollback.js +1 -1
  150. package/lib/commands/instant-api-policy/shared.d.ts +1 -1
  151. package/lib/commands/instant-api-policy/shared.js +1 -1
  152. package/lib/commands/instant-api-policy/validate.js +1 -1
  153. package/lib/commands/issue/context.d.ts +3 -0
  154. package/lib/commands/issue/context.js +1 -0
  155. package/lib/commands/issue/index.js +1 -1
  156. package/lib/commands/issue/nudge.js +1 -1
  157. package/lib/commands/issue/report.js +1 -1
  158. package/lib/commands/kb/create.js +1 -1
  159. package/lib/commands/kb/delete.js +1 -1
  160. package/lib/commands/kb/detail.js +1 -1
  161. package/lib/commands/kb/index.js +1 -1
  162. package/lib/commands/kb/list.js +1 -1
  163. package/lib/commands/kb/search.js +1 -1
  164. package/lib/commands/kb/shared.js +1 -1
  165. package/lib/commands/kb/update.js +1 -1
  166. package/lib/commands/logs/index.js +1 -1
  167. package/lib/commands/menu/asset-update.js +1 -1
  168. package/lib/commands/menu/delete.js +1 -1
  169. package/lib/commands/menu/external-link-create.js +1 -1
  170. package/lib/commands/menu/external-link-update.js +1 -1
  171. package/lib/commands/menu/group-create.js +1 -1
  172. package/lib/commands/menu/group-update.js +1 -1
  173. package/lib/commands/menu/index.js +1 -1
  174. package/lib/commands/menu/list.js +1 -1
  175. package/lib/commands/menu/move.js +1 -1
  176. package/lib/commands/menu/regroup-start.js +1 -1
  177. package/lib/commands/menu/rename.js +1 -1
  178. package/lib/commands/menu/shared/compare-table.js +1 -1
  179. package/lib/commands/menu/shared/delete-plan.js +1 -1
  180. package/lib/commands/menu/shared/facts.js +1 -1
  181. package/lib/commands/menu/shared/index.js +1 -1
  182. package/lib/commands/menu/shared/inquirer.js +1 -1
  183. package/lib/commands/menu/shared/local-pages.js +1 -1
  184. package/lib/commands/menu/shared/logic.js +1 -1
  185. package/lib/commands/menu/shared/mutations.js +1 -1
  186. package/lib/commands/menu/shared/path.js +1 -1
  187. package/lib/commands/menu/shared/service.js +1 -1
  188. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  189. package/lib/commands/menu/shared/sync-core.js +1 -1
  190. package/lib/commands/menu/shared/update-core.js +1 -1
  191. package/lib/commands/menu/shared/valid-url.js +1 -1
  192. package/lib/commands/menu/subapp-assets-status.js +1 -1
  193. package/lib/commands/menu/subapp-assets-update.js +1 -1
  194. package/lib/commands/menu/sync.js +1 -1
  195. package/lib/commands/menu/visibility-update.js +1 -1
  196. package/lib/commands/notification/config-create.js +1 -1
  197. package/lib/commands/notification/config-delete.js +1 -1
  198. package/lib/commands/notification/config-list.js +1 -1
  199. package/lib/commands/notification/config-update.js +1 -1
  200. package/lib/commands/notification/index.js +1 -1
  201. package/lib/commands/notification/shared.js +1 -1
  202. package/lib/commands/ocr/index.js +1 -1
  203. package/lib/commands/page/create.js +1 -1
  204. package/lib/commands/page/custom/detail.js +1 -1
  205. package/lib/commands/page/custom/list.js +1 -1
  206. package/lib/commands/page/custom/publish.js +1 -1
  207. package/lib/commands/page/custom/shared.js +1 -1
  208. package/lib/commands/page/custom/syntax.js +1 -1
  209. package/lib/commands/page/custom/update.js +1 -1
  210. package/lib/commands/page/data-list-status.js +1 -1
  211. package/lib/commands/page/generate-start.js +1 -1
  212. package/lib/commands/page/generate-status.js +1 -1
  213. package/lib/commands/page/index.js +1 -1
  214. package/lib/commands/page/pull.js +1 -1
  215. package/lib/commands/page/push.js +1 -1
  216. package/lib/commands/page/relation-audit.js +1 -1
  217. package/lib/commands/page/restore.js +1 -1
  218. package/lib/commands/page/shared.js +1 -1
  219. package/lib/commands/page/sync.js +1 -1
  220. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  221. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  222. package/lib/commands/project/create/format-elapsed.js +1 -1
  223. package/lib/commands/project/create/main.js +1 -1
  224. package/lib/commands/project/create/materialize-project-template.js +1 -1
  225. package/lib/commands/project/create/project-name.js +1 -1
  226. package/lib/commands/project/create/project-template-archive.js +1 -1
  227. package/lib/commands/project/create/project-template-path.js +1 -1
  228. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  229. package/lib/commands/project/create/use-format-code.js +1 -1
  230. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  231. package/lib/commands/project/domain-routing-sync.js +1 -1
  232. package/lib/commands/project/index.js +1 -1
  233. package/lib/commands/project/upgrade.js +1 -1
  234. package/lib/commands/registry.js +1 -1
  235. package/lib/commands/role/delete.js +1 -1
  236. package/lib/commands/role/detail.js +1 -1
  237. package/lib/commands/role/index.js +1 -1
  238. package/lib/commands/role/list.js +1 -1
  239. package/lib/commands/role/shared.js +1 -1
  240. package/lib/commands/role/update.js +1 -1
  241. package/lib/commands/role/user-add.js +1 -1
  242. package/lib/commands/role/user-remove.js +1 -1
  243. package/lib/commands/role/user-resolve.js +1 -1
  244. package/lib/commands/rule/get.js +1 -1
  245. package/lib/commands/rule/index.js +1 -1
  246. package/lib/commands/rule/list.js +1 -1
  247. package/lib/commands/rule/set.js +1 -1
  248. package/lib/commands/rule/shared.js +1 -1
  249. package/lib/commands/run/index.js +1 -1
  250. package/lib/commands/schema.js +1 -1
  251. package/lib/commands/sql/create.js +1 -1
  252. package/lib/commands/sql/delete.js +1 -1
  253. package/lib/commands/sql/detail.js +1 -1
  254. package/lib/commands/sql/exec.js +1 -1
  255. package/lib/commands/sql/index.js +1 -1
  256. package/lib/commands/sql/list.js +1 -1
  257. package/lib/commands/sql/pull.js +1 -1
  258. package/lib/commands/sql/push.js +1 -1
  259. package/lib/commands/sql/shared.js +1 -1
  260. package/lib/commands/sql/status.js +1 -1
  261. package/lib/commands/sql/validate.js +1 -1
  262. package/lib/commands/task/index.js +1 -1
  263. package/lib/commands/task/status.js +1 -1
  264. package/lib/commands/tenant/index.js +1 -1
  265. package/lib/commands/tenant/members-list.js +1 -1
  266. package/lib/commands/tenant/shared.js +1 -1
  267. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  268. package/lib/commands/user-account/feishu-bind.js +1 -1
  269. package/lib/commands/user-account/index.js +1 -1
  270. package/lib/commands/workspace/add.js +1 -1
  271. package/lib/commands/workspace/index.js +1 -1
  272. package/lib/commands/workspace/remove.js +1 -1
  273. package/lib/config/domain-config.js +1 -1
  274. package/lib/config/project-domain-routing.js +1 -1
  275. package/lib/config/region-config.js +1 -1
  276. package/lib/config/schema.js +1 -1
  277. package/lib/constant/cdn.js +1 -1
  278. package/lib/constant/cli.js +1 -1
  279. package/lib/constant/defaults.js +1 -1
  280. package/lib/constant/domain.js +1 -1
  281. package/lib/constant/env.js +1 -1
  282. package/lib/constant/output.js +1 -1
  283. package/lib/constant/paths.js +1 -1
  284. package/lib/constant/region.js +1 -1
  285. package/lib/constant/risk.js +1 -1
  286. package/lib/constant/routing-profile.js +1 -1
  287. package/lib/context/app-resolver.js +1 -1
  288. package/lib/context/auth-resolver.js +1 -1
  289. package/lib/context/config-loader.js +1 -1
  290. package/lib/context.js +1 -1
  291. package/lib/core/alias-resolver.js +1 -1
  292. package/lib/core/api-client.d.ts +0 -28
  293. package/lib/core/api-client.js +1 -1
  294. package/lib/core/bff/config.js +1 -1
  295. package/lib/core/bff/file-system.js +1 -1
  296. package/lib/core/bff/hash.js +1 -1
  297. package/lib/core/bff/hook-directory.js +1 -1
  298. package/lib/core/bff/lock.js +1 -1
  299. package/lib/core/bff/utils.js +1 -1
  300. package/lib/core/cross-db-analysis.js +1 -1
  301. package/lib/core/cross-db-relation.js +1 -1
  302. package/lib/core/db-resolver.js +1 -1
  303. package/lib/core/flow-config.js +1 -1
  304. package/lib/core/instant-api-policy/config.js +1 -1
  305. package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
  306. package/lib/core/instant-api-policy/endpoints.js +1 -0
  307. package/lib/core/kb-management-client.d.ts +3 -9
  308. package/lib/core/kb-management-client.js +1 -1
  309. package/lib/core/kb-search-client.d.ts +1 -4
  310. package/lib/core/kb-search-client.js +1 -1
  311. package/lib/core/page/file-system.js +1 -1
  312. package/lib/core/page/hash.js +1 -1
  313. package/lib/core/page/lock.js +1 -1
  314. package/lib/core/page/lr-smart-jsx.js +1 -1
  315. package/lib/core/sql-index-auditor.js +1 -1
  316. package/lib/core/sql-sync/config.js +1 -1
  317. package/lib/core/sql-sync/file-system.js +1 -1
  318. package/lib/core/sql-sync/hash.js +1 -1
  319. package/lib/core/sql-sync/lock.js +1 -1
  320. package/lib/core/sql-sync/utils.js +1 -1
  321. package/lib/core/sql-validator.js +1 -1
  322. package/lib/errors.js +1 -1
  323. package/lib/framework/build-all-flags.js +1 -1
  324. package/lib/framework/error-output.js +1 -1
  325. package/lib/framework/explicit-yes.js +1 -1
  326. package/lib/framework/flags.js +1 -1
  327. package/lib/framework/help.js +1 -1
  328. package/lib/framework/index.js +1 -1
  329. package/lib/framework/output.js +1 -1
  330. package/lib/framework/response.js +1 -1
  331. package/lib/framework/runner-alias.js +1 -1
  332. package/lib/framework/runner.js +1 -1
  333. package/lib/framework/schema-export.js +1 -1
  334. package/lib/framework/supported-flags.js +1 -1
  335. package/lib/framework/types.js +1 -1
  336. package/lib/generated/build-info.d.ts +4 -4
  337. package/lib/generated/build-info.js +1 -1
  338. package/lib/generated/official-routing.js +1 -1
  339. package/lib/generated/routing-contract.js +1 -1
  340. package/lib/help.js +1 -1
  341. package/lib/postinstall.js +1 -1
  342. package/lib/runtime/confirmation.js +1 -1
  343. package/lib/runtime/event.js +1 -1
  344. package/lib/runtime/index.js +1 -1
  345. package/lib/runtime/queue.js +1 -1
  346. package/lib/runtime/resolve.js +1 -1
  347. package/lib/services/dataset-design/checkpoint.js +1 -1
  348. package/lib/services/dataset-design/commands.js +1 -1
  349. package/lib/services/dataset-design/contract.js +1 -1
  350. package/lib/skills/builtin-skill.js +1 -1
  351. package/lib/skills/main.js +1 -1
  352. package/lib/skills/npx-skills-add.js +1 -1
  353. package/lib/skills/skill-presence.js +1 -1
  354. package/lib/telemetry/cli-command-trace.js +1 -1
  355. package/lib/telemetry/cli-help-trace.js +1 -1
  356. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  357. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  358. package/lib/telemetry/send-cli-trace-log.js +1 -1
  359. package/lib/utils/ai_config.js +1 -1
  360. package/lib/utils/apply-jq-filter.js +1 -1
  361. package/lib/utils/cdn-config.js +1 -1
  362. package/lib/utils/check-sdk-version.js +1 -1
  363. package/lib/utils/cli-version-check.js +1 -1
  364. package/lib/utils/cli-version-policy.js +1 -1
  365. package/lib/utils/config.js +1 -1
  366. package/lib/utils/entity-with-id.js +1 -1
  367. package/lib/utils/file-utils.js +1 -1
  368. package/lib/utils/guides-cdn.js +1 -1
  369. package/lib/utils/http-client.js +1 -1
  370. package/lib/utils/is-non-interactive.js +1 -1
  371. package/lib/utils/logger.js +1 -1
  372. package/lib/utils/params.js +1 -1
  373. package/lib/utils/platform.js +1 -1
  374. package/lib/utils/sleep.js +1 -1
  375. package/lib/utils/template-replacer.js +1 -1
  376. package/lib/utils/update-notice.js +1 -1
  377. package/lib/utils/version.js +1 -1
  378. package/lib/utils/with-active-cookie.js +1 -1
  379. package/lib/utils/write-cli-side-channel.js +1 -1
  380. package/package.json +3 -2
  381. package/skills/rabetbase/SKILL.md +2 -2
  382. package/skills/rabetbase/references/rabetbase-issue-report.md +4 -1
  383. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  384. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  385. package/skills/rabetbase.manifest.json +3 -3
  386. package/lib/commands/issue/shared.d.ts +0 -32
  387. package/lib/commands/issue/shared.js +0 -1
  388. package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
  389. package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
@@ -1 +1 @@
1
- const a302_0x39c162=a302_0x50e7;(function(_0xb96a51,_0x4cc037){const _0x1e7bea=a302_0x50e7,_0x3fa43b=_0xb96a51();while(!![]){try{const _0x1af363=parseInt(_0x1e7bea(0x210))/0x1*(parseInt(_0x1e7bea(0x247))/0x2)+parseInt(_0x1e7bea(0x20a))/0x3+-parseInt(_0x1e7bea(0x235))/0x4*(-parseInt(_0x1e7bea(0x20c))/0x5)+-parseInt(_0x1e7bea(0x1eb))/0x6*(parseInt(_0x1e7bea(0x1ec))/0x7)+-parseInt(_0x1e7bea(0x21f))/0x8+parseInt(_0x1e7bea(0x243))/0x9*(parseInt(_0x1e7bea(0x216))/0xa)+-parseInt(_0x1e7bea(0x204))/0xb;if(_0x1af363===_0x4cc037)break;else _0x3fa43b['push'](_0x3fa43b['shift']());}catch(_0x50aca1){_0x3fa43b['push'](_0x3fa43b['shift']());}}}(a302_0x1cf7,0x40c95));function a302_0x50e7(_0x347645,_0x40557b){_0x347645=_0x347645-0x1ea;const _0x1cf715=a302_0x1cf7();let _0x50e79=_0x1cf715[_0x347645];return _0x50e79;}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a302_0x39c162(0x1ed),'profile',a302_0x39c162(0x21c),'hits',a302_0x39c162(0x1f7),a302_0x39c162(0x213)],HIT_KEYS=[a302_0x39c162(0x229),a302_0x39c162(0x207),a302_0x39c162(0x23a),a302_0x39c162(0x1ef),'title',a302_0x39c162(0x245),a302_0x39c162(0x24f),a302_0x39c162(0x234),a302_0x39c162(0x219),'finalScore','scoreKind'];export function parseKnowledgeJson(_0x593d80){const _0xe46563=a302_0x39c162,_0x121e14=new Set(['id','documentId',_0xe46563(0x224),'ownerUserId',_0xe46563(0x206),_0xe46563(0x22f)]);return JSON[_0xe46563(0x236)](_0x593d80,(_0x4a0982,_0x5a5a45,_0x429007)=>{const _0x25ab67=_0xe46563;if(!_0x121e14['has'](_0x4a0982)||typeof _0x5a5a45!==_0x25ab67(0x1f9))return _0x5a5a45;if(_0x429007?.['source']!==undefined){if(!/^-?\d+$/[_0x25ab67(0x218)](_0x429007['source']))throw CliErrors[_0x25ab67(0x1f6)](_0x25ab67(0x217));return _0x429007[_0x25ab67(0x220)];}if(!Number[_0x25ab67(0x1fb)](_0x5a5a45))throw CliErrors['apiError'](_0x25ab67(0x23c));return String(_0x5a5a45);});}export function normalizeKbServiceOrigin(_0x1f0dbd){const _0x5c6d16=a302_0x39c162,_0x149d69=()=>CliErrors['validation']('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.'),_0xe24f04=_0x1f0dbd?.[_0x5c6d16(0x238)]();if(!_0xe24f04||/[\u0000-\u0020\u007f]/[_0x5c6d16(0x218)](_0xe24f04)||!/^https:\/\/[^/?#@\\]+\/?$/i['test'](_0xe24f04))throw _0x149d69();let _0x4511fd;try{_0x4511fd=new URL(_0xe24f04);}catch{throw _0x149d69();}if(_0x4511fd[_0x5c6d16(0x240)]!==_0x5c6d16(0x23e)||!_0x4511fd['hostname']||_0x4511fd[_0x5c6d16(0x239)]||_0x4511fd[_0x5c6d16(0x215)]||_0x4511fd['pathname']!=='/'||_0x4511fd[_0x5c6d16(0x1fd)]||_0x4511fd[_0x5c6d16(0x1fa)])throw _0x149d69();return _0x4511fd[_0x5c6d16(0x208)];}export async function searchDirectKnowledge(_0x2777a0){const _0x5599bd=a302_0x39c162,_0x184ceb=_0x2777a0[_0x5599bd(0x20f)]['trim'](),_0x219f6a=_0x2777a0[_0x5599bd(0x211)][_0x5599bd(0x238)]();if(!_0x184ceb)throw CliErrors[_0x5599bd(0x230)](_0x5599bd(0x1fc));if(!_0x2777a0['cookie']['trim']())throw CliErrors['authRequired']();if(!_0x219f6a)throw CliErrors[_0x5599bd(0x230)](_0x5599bd(0x1f8));validateTopK(_0x2777a0[_0x5599bd(0x203)]);const _0x44390a=normalizeKbServiceOrigin(_0x2777a0[_0x5599bd(0x1f0)]),_0xb361ea=AbortSignal['timeout'](0xea60),_0x2f3533=_0x2777a0[_0x5599bd(0x22d)]?AbortSignal[_0x5599bd(0x241)]([_0x2777a0[_0x5599bd(0x22d)],_0xb361ea]):_0xb361ea;let _0x5a2e2f;try{_0x5a2e2f=await fetch(_0x44390a+'/api/knowledge-base/search',{'method':_0x5599bd(0x225),'redirect':_0x5599bd(0x22b),'headers':{'Content-Type':_0x5599bd(0x250),'Cookie':_0x2777a0[_0x5599bd(0x248)],'X-Invoke-Source':_0x5599bd(0x21e)},'body':JSON[_0x5599bd(0x222)]({'appCode':_0x184ceb,'query':_0x219f6a,'scopes':[_0x5599bd(0x221),_0x5599bd(0x242)],..._0x2777a0['topK']!==undefined?{'topK':_0x2777a0[_0x5599bd(0x203)]}:{}}),'signal':_0x2f3533});}catch(_0x1caaf1){if(_0x2777a0[_0x5599bd(0x22d)]?.[_0x5599bd(0x24e)])throw new DOMException(_0x5599bd(0x21a),_0x5599bd(0x249));if(_0x1caaf1 instanceof Error&&_0x1caaf1[_0x5599bd(0x1ff)]==='TimeoutError')throw CliErrors['networkError'](_0x5599bd(0x22a));throw CliErrors['networkError']('KB\x20Service\x20knowledge\x20search\x20request\x20failed.');}if(_0x5a2e2f[_0x5599bd(0x24b)]===0x191)throw CliErrors[_0x5599bd(0x246)]();if(_0x5a2e2f[_0x5599bd(0x24b)]===0x1ad)throw CliErrors[_0x5599bd(0x1f6)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x5a2e2f['ok']){const _0x32d40d=CliErrors[_0x5599bd(0x1f6)](_0x5599bd(0x1f1)+_0x5a2e2f['status']+').');if((_0x5a2e2f[_0x5599bd(0x237)]['get'](_0x5599bd(0x23f))??'')[_0x5599bd(0x205)]()[_0x5599bd(0x24d)](_0x5599bd(0x250)))try{const _0x2ffe7a=await _0x5a2e2f['json']();_0x2ffe7a&&_0x2ffe7a[_0x5599bd(0x233)]===![]&&typeof _0x2ffe7a[_0x5599bd(0x24a)]===_0x5599bd(0x1fe)&&/^\d{1,8}$/[_0x5599bd(0x218)](_0x2ffe7a['errorCode'])&&Object['defineProperty'](_0x32d40d,_0x5599bd(0x24c),{'value':{'remoteErrorCode':_0x2ffe7a[_0x5599bd(0x24a)]},'enumerable':![]});}catch{}throw _0x32d40d;}if(!hasNoStore(_0x5a2e2f[_0x5599bd(0x237)]))throw CliErrors[_0x5599bd(0x1f6)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x5a2e2f['headers'][_0x5599bd(0x231)](_0x5599bd(0x23f))??'')[_0x5599bd(0x205)]()['includes']('application/json'))throw CliErrors[_0x5599bd(0x1f6)](_0x5599bd(0x20e));let _0x22e4c4;try{_0x22e4c4=parseKnowledgeJson(await _0x5a2e2f[_0x5599bd(0x245)]());}catch(_0x3011d5){if(_0x2777a0[_0x5599bd(0x22d)]?.[_0x5599bd(0x24e)])throw new DOMException(_0x5599bd(0x21a),_0x5599bd(0x249));if(_0xb361ea[_0x5599bd(0x24e)]||_0x3011d5 instanceof Error&&_0x3011d5['name']==='TimeoutError')throw CliErrors[_0x5599bd(0x232)](_0x5599bd(0x22a));throw CliErrors[_0x5599bd(0x1f6)]('KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}try{const _0x5a2cb6=requireRecord(_0x22e4c4,_0x5599bd(0x226));if(_0x5a2cb6[_0x5599bd(0x233)]!==!![]||_0x5a2cb6['errorCode']!=='0000'||!Object['hasOwn'](_0x5a2cb6,_0x5599bd(0x24c)))throw invalidContract(_0x5599bd(0x201));const _0x227993=requireExactRecord(_0x5a2cb6[_0x5599bd(0x24c)],[_0x5599bd(0x21d),'strategyFingerprint',_0x5599bd(0x213)],'response');if(!Array[_0x5599bd(0x22e)](_0x227993[_0x5599bd(0x21d)]))throw invalidContract(_0x5599bd(0x21d));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x5599bd(0x23b),'total':_0x227993[_0x5599bd(0x21d)][_0x5599bd(0x21b)],'hits':_0x227993[_0x5599bd(0x21d)],'strategyFingerprint':_0x227993['strategyFingerprint'],'timingsMs':_0x227993['timingsMs']},_0x2777a0[_0x5599bd(0x203)]??0xa);}catch(_0x1f7307){if(_0x1f7307 instanceof CliError)throw CliErrors[_0x5599bd(0x1f6)](_0x5599bd(0x209));throw _0x1f7307;}}function a302_0x1cf7(){const _0x499cc7=['POST','response','score','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','documentId','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','error','split','signal','isArray','updateUserId','validation','get','networkError','success','rank','1252DMfoRV','parse','headers','trim','username','chunkId','development','This\x20Node.js\x20runtime\x20cannot\x20decode\x20the\x20knowledge\x20identifier\x20losslessly.','\x20contract.','https:','content-type','protocol','any','company','3296493CIaKLm','sort','text','authRequired','118914haBluL','cookie','AbortError','errorCode','status','data','includes','aborted','tags','application/json','cache-control','18zyXsAo','262997UvdpIr','schemaVersion','profile','scope','serviceUrl','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','scoreKind','some','title','hits[','apiError','strategyFingerprint','Knowledge\x20search\x20query\x20is\x20required.','number','hash','isSafeInteger','Knowledge\x20search\x20appCode\x20is\x20required.','search','string','name','isFinite','Result','keys','topK','4524124ASjuhp','toLowerCase','createUserId','revision','origin','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','82545gaHEUL','map','1340xRIKGi','object','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','appCode','7KWTVbB','query','entries','timingsMs','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','password','10TNrxPR','Knowledge\x20API\x20returned\x20an\x20invalid\x20identifier.','test','rawScore','Knowledge\x20search\x20cancelled.','length','total','hits','cli:rabetbase','836104tOcoks','source','public','stringify','finalScore','userId'];a302_0x1cf7=function(){return _0x499cc7;};return a302_0x1cf7();}function validateTopK(_0x4833f6){const _0x1c804e=a302_0x39c162;if(_0x4833f6!==undefined&&(!Number[_0x1c804e(0x1fb)](_0x4833f6)||_0x4833f6<0x1||_0x4833f6>0x32))throw CliErrors[_0x1c804e(0x230)](_0x1c804e(0x228));}function hasNoStore(_0x518a0f){const _0x165cf4=a302_0x39c162;return(_0x518a0f[_0x165cf4(0x231)](_0x165cf4(0x1ea))??'')[_0x165cf4(0x22c)](',')['some'](_0x1a4363=>_0x1a4363[_0x165cf4(0x238)]()[_0x165cf4(0x205)]()==='no-store');}function parseDevelopmentSearchResponse(_0x495020,_0x4381c6){const _0x29dc0e=a302_0x39c162,_0x249f7a=requireExactRecord(_0x495020,RESPONSE_KEYS,_0x29dc0e(0x226));if(_0x249f7a[_0x29dc0e(0x1ed)]!==0x2||_0x249f7a[_0x29dc0e(0x1ee)]!==_0x29dc0e(0x23b))throw invalidContract(_0x29dc0e(0x1ee));if(!Array[_0x29dc0e(0x22e)](_0x249f7a[_0x29dc0e(0x21d)])||_0x249f7a[_0x29dc0e(0x21d)][_0x29dc0e(0x21b)]>(_0x4381c6??0x32))throw invalidContract('hits');if(typeof _0x249f7a['strategyFingerprint']!==_0x29dc0e(0x1fe)||!/^sha256:[0-9a-f]{64}$/[_0x29dc0e(0x218)](_0x249f7a[_0x29dc0e(0x1f7)]))throw invalidContract(_0x29dc0e(0x1f7));const _0x46d3d9=requireRecord(_0x249f7a[_0x29dc0e(0x213)],'timingsMs'),_0x3b6ce5={};for(const [_0x1851f2,_0x5db359]of Object[_0x29dc0e(0x212)](_0x46d3d9)){if(!/^[A-Za-z][A-Za-z0-9]*$/['test'](_0x1851f2)||typeof _0x5db359!=='number'||!Number['isFinite'](_0x5db359)||_0x5db359<0x0)throw invalidContract('timingsMs');_0x3b6ce5[_0x1851f2]=_0x5db359;}const _0x5c99cd=_0x249f7a[_0x29dc0e(0x21d)][_0x29dc0e(0x20b)]((_0xb0ac45,_0x2710af)=>parseHit(_0xb0ac45,_0x2710af));if(!Number[_0x29dc0e(0x1fb)](_0x249f7a['total'])||_0x249f7a['total']!==_0x5c99cd['length'])throw invalidContract('total');return{'schemaVersion':_0x249f7a[_0x29dc0e(0x1ed)],'profile':_0x249f7a[_0x29dc0e(0x1ee)],'total':_0x249f7a[_0x29dc0e(0x21c)],'strategyFingerprint':_0x249f7a[_0x29dc0e(0x1f7)],'timingsMs':_0x3b6ce5,'hits':_0x5c99cd};}function parseHit(_0x24ab11,_0x3386df){const _0x3ecc8b=a302_0x39c162,_0x459cb8=requireExactRecord(_0x24ab11,HIT_KEYS,_0x3ecc8b(0x1f5)+_0x3386df+']'),_0x26a00e=_0x41e1ac=>{const _0x1be46c=_0x3ecc8b,_0x59cedf=_0x459cb8[_0x41e1ac];if(typeof _0x59cedf!==_0x1be46c(0x1fe)||!_0x59cedf)throw invalidContract(_0x41e1ac);return _0x59cedf;};if(!Number[_0x3ecc8b(0x1fb)](_0x459cb8[_0x3ecc8b(0x207)])||_0x459cb8[_0x3ecc8b(0x207)]<0x1)throw invalidContract('revision');if(_0x459cb8[_0x3ecc8b(0x1ef)]!==_0x3ecc8b(0x221)&&_0x459cb8[_0x3ecc8b(0x1ef)]!=='company')throw invalidContract(_0x3ecc8b(0x1ef));if(typeof _0x459cb8[_0x3ecc8b(0x1f4)]!=='string'||typeof _0x459cb8[_0x3ecc8b(0x245)]!==_0x3ecc8b(0x1fe))throw invalidContract('text');if(!Array[_0x3ecc8b(0x22e)](_0x459cb8['tags'])||_0x459cb8[_0x3ecc8b(0x24f)][_0x3ecc8b(0x1f3)](_0x466296=>typeof _0x466296!==_0x3ecc8b(0x1fe)))throw invalidContract(_0x3ecc8b(0x24f));if(!Number['isSafeInteger'](_0x459cb8[_0x3ecc8b(0x234)])||_0x459cb8['rank']!==_0x3386df+0x1)throw invalidContract(_0x3ecc8b(0x234));if(!isFiniteNumber(_0x459cb8[_0x3ecc8b(0x219)])||!isFiniteNumber(_0x459cb8[_0x3ecc8b(0x223)]))throw invalidContract(_0x3ecc8b(0x227));return{'documentId':_0x26a00e(_0x3ecc8b(0x229)),'revision':_0x459cb8[_0x3ecc8b(0x207)],'chunkId':_0x26a00e(_0x3ecc8b(0x23a)),'scope':_0x459cb8[_0x3ecc8b(0x1ef)],'title':_0x459cb8[_0x3ecc8b(0x1f4)],'text':_0x459cb8['text'],'tags':[..._0x459cb8['tags']],'rank':_0x459cb8['rank'],'rawScore':_0x459cb8[_0x3ecc8b(0x219)],'finalScore':_0x459cb8[_0x3ecc8b(0x223)],'scoreKind':_0x26a00e(_0x3ecc8b(0x1f2))};}function requireExactRecord(_0x26736a,_0x1050b9,_0xad5485){const _0x32cfb0=a302_0x39c162,_0x14cd28=requireRecord(_0x26736a,_0xad5485),_0x44e1b7=Object[_0x32cfb0(0x202)](_0x14cd28)['sort'](),_0x287660=[..._0x1050b9][_0x32cfb0(0x244)]();if(_0x44e1b7[_0x32cfb0(0x21b)]!==_0x287660['length']||_0x44e1b7[_0x32cfb0(0x1f3)]((_0x389218,_0x20a69e)=>_0x389218!==_0x287660[_0x20a69e]))throw invalidContract(_0xad5485);return _0x14cd28;}function requireRecord(_0x989b1c,_0x37be54){const _0x936d9c=a302_0x39c162;if(!_0x989b1c||typeof _0x989b1c!==_0x936d9c(0x20d)||Array[_0x936d9c(0x22e)](_0x989b1c))throw invalidContract(_0x37be54);return _0x989b1c;}function isFiniteNumber(_0x13e907){const _0xfc88e4=a302_0x39c162;return typeof _0x13e907===_0xfc88e4(0x1f9)&&Number[_0xfc88e4(0x200)](_0x13e907);}function invalidContract(_0x136790){const _0xc4670b=a302_0x39c162;return CliErrors['apiError'](_0xc4670b(0x214)+_0x136790+_0xc4670b(0x23d));}
1
+ (function(_0x14f5fa,_0xb7c922){const _0x4993d8=a303_0x506c,_0x2a2d25=_0x14f5fa();while(!![]){try{const _0x172135=-parseInt(_0x4993d8(0x164))/0x1+parseInt(_0x4993d8(0x153))/0x2*(parseInt(_0x4993d8(0x14f))/0x3)+parseInt(_0x4993d8(0x149))/0x4*(parseInt(_0x4993d8(0x15f))/0x5)+parseInt(_0x4993d8(0x14d))/0x6+parseInt(_0x4993d8(0x16b))/0x7*(parseInt(_0x4993d8(0x152))/0x8)+parseInt(_0x4993d8(0x156))/0x9+-parseInt(_0x4993d8(0x166))/0xa*(parseInt(_0x4993d8(0x14b))/0xb);if(_0x172135===_0xb7c922)break;else _0x2a2d25['push'](_0x2a2d25['shift']());}catch(_0x2a189b){_0x2a2d25['push'](_0x2a2d25['shift']());}}}(a303_0x5958,0xe7f23));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x5a4b33){const _0xe797b5=a303_0x506c;try{return normalizeKnowledgeServiceOrigin(_0x5a4b33);}catch{throw CliErrors[_0xe797b5(0x170)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export async function searchDirectKnowledge(_0x2dcc0c){const _0x12674b=a303_0x506c,_0x32b013=_0x2dcc0c[_0x12674b(0x163)][_0x12674b(0x16c)](),_0x20a42f=_0x2dcc0c[_0x12674b(0x165)][_0x12674b(0x16c)]();if(!_0x32b013)throw CliErrors[_0x12674b(0x170)](_0x12674b(0x169));if(!_0x20a42f)throw CliErrors['validation'](_0x12674b(0x159));if(!_0x2dcc0c[_0x12674b(0x150)][_0x12674b(0x16c)]())throw CliErrors[_0x12674b(0x173)]();const _0x3ae30c=normalizeKbServiceOrigin(_0x2dcc0c[_0x12674b(0x15a)]);try{const _0xbc1c87=createKnowledgeClient({'kbServiceDomain':_0x3ae30c,'authMode':_0x12674b(0x150),'cookie':_0x2dcc0c['cookie'],'invokeSource':'cli:rabetbase'}),_0x2347f9=await _0xbc1c87['search']({'appCode':_0x32b013,'query':_0x20a42f,'scopes':[_0x12674b(0x160),'company'],..._0x2dcc0c['topK']!==undefined?{'topK':_0x2dcc0c[_0x12674b(0x14a)]}:{}},{'signal':_0x2dcc0c[_0x12674b(0x16f)]});return{..._0x2347f9,'hits':_0x2347f9[_0x12674b(0x167)],'schemaVersion':0x2,'profile':_0x12674b(0x157),'total':_0x2347f9[_0x12674b(0x167)][_0x12674b(0x161)]};}catch(_0x291fa7){if(!(_0x291fa7 instanceof KnowledgeServiceError))throw _0x291fa7;if(_0x291fa7[_0x12674b(0x14e)]===_0x12674b(0x154))throw CliErrors[_0x12674b(0x173)]();if(_0x291fa7[_0x12674b(0x14e)]===_0x12674b(0x170))throw CliErrors[_0x12674b(0x170)](_0x291fa7[_0x12674b(0x151)]);if(_0x291fa7[_0x12674b(0x14e)]==='cancelled')throw new DOMException('Knowledge\x20search\x20cancelled.','AbortError');if(_0x291fa7['kind']===_0x12674b(0x172)||_0x291fa7[_0x12674b(0x14e)]===_0x12674b(0x158))throw CliErrors[_0x12674b(0x15c)](_0x291fa7[_0x12674b(0x14e)]===_0x12674b(0x158)?_0x12674b(0x168):'KB\x20Service\x20knowledge\x20search\x20request\x20failed.');const _0x41152e=_0x291fa7['kind']==='contract'&&_0x291fa7[_0x12674b(0x151)][_0x12674b(0x155)](_0x12674b(0x14c))?_0x12674b(0x148):_0x291fa7[_0x12674b(0x151)],_0x54117e=CliErrors[_0x12674b(0x16e)](_0x291fa7[_0x12674b(0x162)]!==undefined&&_0x291fa7[_0x12674b(0x162)]!==0xc8&&!_0x41152e[_0x12674b(0x155)](_0x12674b(0x15e)+_0x291fa7[_0x12674b(0x162)])?_0x41152e+_0x12674b(0x16a)+_0x291fa7[_0x12674b(0x162)]+')':_0x41152e);if(/^\d+$/[_0x12674b(0x15d)](_0x291fa7[_0x12674b(0x15b)]??''))Object[_0x12674b(0x171)](_0x54117e,_0x12674b(0x16d),{'value':{'remoteErrorCode':_0x291fa7[_0x12674b(0x15b)]},'enumerable':![]});throw _0x54117e;}}function a303_0x506c(_0x8d3f6,_0x4c3ad4){_0x8d3f6=_0x8d3f6-0x148;const _0x59589c=a303_0x5958();let _0x506c29=_0x59589c[_0x8d3f6];return _0x506c29;}function a303_0x5958(){const _0x3b08e7=['616380ETmNvR','cookie','message','209128Bxdgsm','16xZdtjQ','auth','includes','8878716yeOTHz','development','timeout','Knowledge\x20search\x20query\x20is\x20required.','serviceUrl','code','networkError','test','HTTP\x20','71555OjSPrf','public','length','status','appCode','1089314GsDyfn','query','10PaIXCZ','hits','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','Knowledge\x20search\x20appCode\x20is\x20required.','\x20(HTTP\x20','42ARuvcX','trim','data','apiError','signal','validation','defineProperty','network','authRequired','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','92REkZVi','topK','25840111NMumXt','out-of-scope','7633578rPZwCq','kind'];a303_0x5958=function(){return _0x3b08e7;};return a303_0x5958();}
@@ -1 +1 @@
1
- function a303_0x2a1d(_0x4a904b,_0x1101ab){_0x4a904b=_0x4a904b-0x1bd;const _0x127206=a303_0x1272();let _0x2a1d4=_0x127206[_0x4a904b];return _0x2a1d4;}(function(_0x5f1c8d,_0x1a9d84){const _0x104637=a303_0x2a1d,_0x32a029=_0x5f1c8d();while(!![]){try{const _0x1135ef=-parseInt(_0x104637(0x1d6))/0x1*(-parseInt(_0x104637(0x1c0))/0x2)+parseInt(_0x104637(0x1cf))/0x3+parseInt(_0x104637(0x1d7))/0x4+-parseInt(_0x104637(0x1d3))/0x5*(-parseInt(_0x104637(0x1be))/0x6)+parseInt(_0x104637(0x1c5))/0x7*(parseInt(_0x104637(0x1da))/0x8)+-parseInt(_0x104637(0x1c7))/0x9*(parseInt(_0x104637(0x1bf))/0xa)+parseInt(_0x104637(0x1c6))/0xb*(-parseInt(_0x104637(0x1ce))/0xc);if(_0x1135ef===_0x1a9d84)break;else _0x32a029['push'](_0x32a029['shift']());}catch(_0x1d9ca4){_0x32a029['push'](_0x32a029['shift']());}}}(a303_0x1272,0x6cca8));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a303_0x1272(){const _0x2dab9f=['Page\x20directory\x20is\x20not\x20a\x20directory:\x20','48036hfJIfY','1710687fmNEeK','sort','Page\x20directory\x20not\x20found:\x20','name','266905rYwNwY','appPagesDir','split','9OqHnLl','2713904IYWCBY','Unsupported\x20file\x20in\x20page\x20directory:\x20','.json','8uvLtcA','page.lock.json','18SMGAhE','150340GtCjcW','182372ozGZgk','page-dir','join','flagMissing','localeCompare','3289699cGwQbI','5863URRPzU','72plqZNq','trim','isDirectory','toUpperCase','validation','.rabetbase'];a303_0x1272=function(){return _0x2dab9f;};return a303_0x1272();}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x274637,_0x27aef6=process['cwd']()){const _0x3a3079=a303_0x2a1d,_0x36f30e=resolve(_0x27aef6),_0x3c1e77=join(_0x36f30e,_0x3a3079(0x1cc),'page');return{'projectRoot':_0x36f30e,'pagesBaseDir':_0x3c1e77,'appPagesDir':join(_0x3c1e77,_0x274637),'lockFilePath':join(_0x36f30e,'.rabetbase',_0x3a3079(0x1bd))};}export function buildPageFileName(_0xdb25ad,_0x53aac0){const _0x10a9bf=a303_0x2a1d;return _0xdb25ad+'-'+_0x53aac0[_0x10a9bf(0x1ca)]()+_0x10a9bf(0x1d9);}export function resolvePageFilePath(_0x2cc9d8,_0x29cf9f,_0x26177b){const _0xe41dc5=a303_0x2a1d;return join(_0x2cc9d8[_0xe41dc5(0x1d4)],buildPageFileName(_0x29cf9f,_0x26177b));}export async function ensureParentDirectory(_0x36a65a){await mkdir(dirname(_0x36a65a),{'recursive':!![]});}export async function fileExists(_0x42cf85){try{return await access(_0x42cf85,constants['F_OK']),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x5770ee){const _0x1b5b24=a303_0x2a1d,_0x48247c=_0x5770ee[_0x1b5b24(0x1c8)]();if(!_0x48247c)throw CliErrors[_0x1b5b24(0x1c3)](_0x1b5b24(0x1c1));const _0x548eed=resolve(_0x48247c);let _0x37f398;try{_0x37f398=await lstat(_0x548eed);}catch{throw CliErrors[_0x1b5b24(0x1cb)](_0x1b5b24(0x1d1)+_0x48247c);}if(!_0x37f398[_0x1b5b24(0x1c9)]())throw CliErrors[_0x1b5b24(0x1cb)](_0x1b5b24(0x1cd)+_0x48247c);const _0x258a84={};return await readDirectory(_0x548eed,_0x548eed,_0x258a84),_0x258a84;}async function readDirectory(_0xeb66b1,_0x3eb98d,_0x46e959){const _0x3e124e=a303_0x2a1d,_0x1e5c9d=await readdir(_0x3eb98d,{'withFileTypes':!![]});for(const _0x170db8 of _0x1e5c9d[_0x3e124e(0x1d0)]((_0x1699e5,_0x332b79)=>_0x1699e5[_0x3e124e(0x1d2)][_0x3e124e(0x1c4)](_0x332b79[_0x3e124e(0x1d2)]))){const _0x70957c=join(_0x3eb98d,_0x170db8[_0x3e124e(0x1d2)]);if(_0x170db8[_0x3e124e(0x1c9)]()){await readDirectory(_0xeb66b1,_0x70957c,_0x46e959);continue;}if(!_0x170db8['isFile']())throw CliErrors['validation'](_0x3e124e(0x1d8)+_0x70957c);_0x46e959[relative(_0xeb66b1,_0x70957c)[_0x3e124e(0x1d5)](sep)[_0x3e124e(0x1c2)]('/')]=await readFile(_0x70957c,'utf8');}}
1
+ const a304_0x491447=a304_0x4615;(function(_0x4d07ce,_0x2c98a6){const _0x48c407=a304_0x4615,_0xde68f7=_0x4d07ce();while(!![]){try{const _0x520562=-parseInt(_0x48c407(0x1f5))/0x1+-parseInt(_0x48c407(0x1f0))/0x2*(-parseInt(_0x48c407(0x202))/0x3)+parseInt(_0x48c407(0x209))/0x4*(parseInt(_0x48c407(0x1fc))/0x5)+parseInt(_0x48c407(0x20a))/0x6*(-parseInt(_0x48c407(0x206))/0x7)+parseInt(_0x48c407(0x200))/0x8*(parseInt(_0x48c407(0x1fb))/0x9)+parseInt(_0x48c407(0x1f6))/0xa*(-parseInt(_0x48c407(0x207))/0xb)+-parseInt(_0x48c407(0x1ff))/0xc;if(_0x520562===_0x2c98a6)break;else _0xde68f7['push'](_0xde68f7['shift']());}catch(_0x3d7557){_0xde68f7['push'](_0xde68f7['shift']());}}}(a304_0x37d0,0x3e9eb));function a304_0x37d0(){const _0x2c8e0c=['sort','7KQdjIm','951511DHqsjN','isDirectory','16676IEJqxq','869358bLcRKv','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','split','cwd','39986IfHeAF','name','.rabetbase','validation','utf8','174776ATSoDg','50oEmmpU','isFile','Unsupported\x20file\x20in\x20page\x20directory:\x20','page','Page\x20directory\x20not\x20found:\x20','742725CRALOD','545LyWeqz','page.lock.json','localeCompare','398544ItHlpC','24asbPUB','.json','51JqSHLq','F_OK','flagMissing'];a304_0x37d0=function(){return _0x2c8e0c;};return a304_0x37d0();}import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';function a304_0x4615(_0x45a67c,_0x3e0ab0){_0x45a67c=_0x45a67c-0x1f0;const _0x37d0ad=a304_0x37d0();let _0x4615a2=_0x37d0ad[_0x45a67c];return _0x4615a2;}import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x6a05d6,_0xf3812a=process[a304_0x491447(0x20d)]()){const _0x373382=a304_0x491447,_0x194381=resolve(_0xf3812a),_0x22fa8c=join(_0x194381,'.rabetbase',_0x373382(0x1f9));return{'projectRoot':_0x194381,'pagesBaseDir':_0x22fa8c,'appPagesDir':join(_0x22fa8c,_0x6a05d6),'lockFilePath':join(_0x194381,_0x373382(0x1f2),_0x373382(0x1fd))};}export function buildPageFileName(_0x47189f,_0x2c6d03){const _0x3d5489=a304_0x491447;return _0x47189f+'-'+_0x2c6d03['toUpperCase']()+_0x3d5489(0x201);}export function resolvePageFilePath(_0x2661df,_0x14326f,_0x5115ed){return join(_0x2661df['appPagesDir'],buildPageFileName(_0x14326f,_0x5115ed));}export async function ensureParentDirectory(_0x4e8932){await mkdir(dirname(_0x4e8932),{'recursive':!![]});}export async function fileExists(_0x3d1702){const _0x294176=a304_0x491447;try{return await access(_0x3d1702,constants[_0x294176(0x203)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x42b500){const _0x402db9=a304_0x491447,_0x493037=_0x42b500['trim']();if(!_0x493037)throw CliErrors[_0x402db9(0x204)]('page-dir');const _0x50d507=resolve(_0x493037);let _0xc9dee9;try{_0xc9dee9=await lstat(_0x50d507);}catch{throw CliErrors[_0x402db9(0x1f3)](_0x402db9(0x1fa)+_0x493037);}if(!_0xc9dee9['isDirectory']())throw CliErrors[_0x402db9(0x1f3)](_0x402db9(0x20b)+_0x493037);const _0x4e4f01={};return await readDirectory(_0x50d507,_0x50d507,_0x4e4f01),_0x4e4f01;}async function readDirectory(_0x410d4b,_0x494410,_0x1e7db4){const _0x361781=a304_0x491447,_0x108af5=await readdir(_0x494410,{'withFileTypes':!![]});for(const _0x18d00f of _0x108af5[_0x361781(0x205)]((_0x2e7f32,_0x105e91)=>_0x2e7f32[_0x361781(0x1f1)][_0x361781(0x1fe)](_0x105e91['name']))){const _0xd073e1=join(_0x494410,_0x18d00f[_0x361781(0x1f1)]);if(_0x18d00f[_0x361781(0x208)]()){await readDirectory(_0x410d4b,_0xd073e1,_0x1e7db4);continue;}if(!_0x18d00f[_0x361781(0x1f7)]())throw CliErrors[_0x361781(0x1f3)](_0x361781(0x1f8)+_0xd073e1);_0x1e7db4[relative(_0x410d4b,_0xd073e1)[_0x361781(0x20c)](sep)['join']('/')]=await readFile(_0xd073e1,_0x361781(0x1f4));}}
@@ -1 +1 @@
1
- function a304_0x328a(_0x10b7ac,_0x349e65){_0x10b7ac=_0x10b7ac-0x120;const _0x2d1894=a304_0x2d18();let _0x328a9d=_0x2d1894[_0x10b7ac];return _0x328a9d;}(function(_0x5ec854,_0x5cf006){const _0x459d56=a304_0x328a,_0x30dd83=_0x5ec854();while(!![]){try{const _0x5dcc8f=parseInt(_0x459d56(0x130))/0x1*(-parseInt(_0x459d56(0x123))/0x2)+-parseInt(_0x459d56(0x121))/0x3+-parseInt(_0x459d56(0x127))/0x4+parseInt(_0x459d56(0x122))/0x5*(parseInt(_0x459d56(0x126))/0x6)+parseInt(_0x459d56(0x12c))/0x7*(parseInt(_0x459d56(0x120))/0x8)+-parseInt(_0x459d56(0x129))/0x9*(-parseInt(_0x459d56(0x124))/0xa)+-parseInt(_0x459d56(0x128))/0xb;if(_0x5dcc8f===_0x5cf006)break;else _0x30dd83['push'](_0x30dd83['shift']());}catch(_0x40df7f){_0x30dd83['push'](_0x30dd83['shift']());}}}(a304_0x2d18,0x4b87b));function a304_0x2d18(){const _0x359500=['digest','15557sfZWYc','update','8sWUspe','923634WbHDrd','1163420GwxAJl','52HZjmwm','40MuXzhW','md5','6FfaxfQ','605872GgefWk','1508870UlEJnK','1280637FcXZss','stringify','createHash','3559591Xnosgc','utf8','parse'];a304_0x2d18=function(){return _0x359500;};return a304_0x2d18();}import a304_0x58d906 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x3d0794){const _0x3210d8=a304_0x328a;return JSON[_0x3210d8(0x12a)](JSON[_0x3210d8(0x12e)](_0x3d0794),null,0x2)+'\x0a';}export function computePageContentHash(_0x4a7a7d){const _0x5ad4a7=a304_0x328a;return a304_0x58d906[_0x5ad4a7(0x12b)](_0x5ad4a7(0x125))[_0x5ad4a7(0x131)](_0x4a7a7d)[_0x5ad4a7(0x12f)]('hex');}export function computeSerializedSchemaHash(_0x148c9c){return computePageContentHash(serializePageSchemaForFile(_0x148c9c));}export async function computePageFileHash(_0x373cc2){const _0x538bea=a304_0x328a,_0x2ff73e=await readFile(_0x373cc2,_0x538bea(0x12d));return computePageContentHash(_0x2ff73e);}
1
+ (function(_0x15a70a,_0x1baa9f){const _0x5069db=a305_0x2b45,_0x5b2758=_0x15a70a();while(!![]){try{const _0x50a3f6=-parseInt(_0x5069db(0x1a8))/0x1+parseInt(_0x5069db(0x1b1))/0x2+parseInt(_0x5069db(0x1a7))/0x3+parseInt(_0x5069db(0x1a9))/0x4+-parseInt(_0x5069db(0x1af))/0x5+parseInt(_0x5069db(0x1b0))/0x6*(-parseInt(_0x5069db(0x1a3))/0x7)+parseInt(_0x5069db(0x1a6))/0x8*(parseInt(_0x5069db(0x1ac))/0x9);if(_0x50a3f6===_0x1baa9f)break;else _0x5b2758['push'](_0x5b2758['shift']());}catch(_0x25d0fd){_0x5b2758['push'](_0x5b2758['shift']());}}}(a305_0xe1f8,0x444e0));import a305_0x507aa9 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x13aa6d){const _0x5b4bd0=a305_0x2b45;return JSON[_0x5b4bd0(0x1ae)](JSON[_0x5b4bd0(0x1ab)](_0x13aa6d),null,0x2)+'\x0a';}function a305_0xe1f8(){const _0x3719dc=['md5','12296BDdJQt','863721GAqdJK','428084DkcxQv','248620RvsMGe','update','parse','4689DxhChp','digest','stringify','1666365ZtHLUI','6uyjviI','703558KYKcFf','hex','3230395SWREGN','createHash'];a305_0xe1f8=function(){return _0x3719dc;};return a305_0xe1f8();}export function computePageContentHash(_0x5db2ed){const _0x10ce08=a305_0x2b45;return a305_0x507aa9[_0x10ce08(0x1a4)](_0x10ce08(0x1a5))[_0x10ce08(0x1aa)](_0x5db2ed)[_0x10ce08(0x1ad)](_0x10ce08(0x1b2));}function a305_0x2b45(_0x3e1290,_0x527791){_0x3e1290=_0x3e1290-0x1a3;const _0xe1f825=a305_0xe1f8();let _0x2b4593=_0xe1f825[_0x3e1290];return _0x2b4593;}export function computeSerializedSchemaHash(_0x4c051a){return computePageContentHash(serializePageSchemaForFile(_0x4c051a));}export async function computePageFileHash(_0xab7195){const _0x4ec18d=await readFile(_0xab7195,'utf8');return computePageContentHash(_0x4ec18d);}
@@ -1 +1 @@
1
- (function(_0x42be2a,_0x3ee2d5){const _0x289803=a305_0x242f,_0x44de18=_0x42be2a();while(!![]){try{const _0x48d5e7=parseInt(_0x289803(0x12b))/0x1*(-parseInt(_0x289803(0x130))/0x2)+-parseInt(_0x289803(0x124))/0x3*(-parseInt(_0x289803(0x11f))/0x4)+-parseInt(_0x289803(0x12a))/0x5*(parseInt(_0x289803(0x121))/0x6)+-parseInt(_0x289803(0x128))/0x7+-parseInt(_0x289803(0x12c))/0x8+parseInt(_0x289803(0x125))/0x9*(parseInt(_0x289803(0x129))/0xa)+parseInt(_0x289803(0x11d))/0xb;if(_0x48d5e7===_0x3ee2d5)break;else _0x44de18['push'](_0x44de18['shift']());}catch(_0x502dcb){_0x44de18['push'](_0x44de18['shift']());}}}(a305_0x2930,0x21288));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x16667a,_0x452e34){const _0xee297d=a305_0x242f,_0xb108d5={'apps':_0x16667a['apps']&&typeof _0x16667a['apps']===_0xee297d(0x12e)?_0x16667a[_0xee297d(0x122)]:{}};let _0x18b837=_0xb108d5[_0xee297d(0x122)][_0x452e34];if(!_0x18b837)return _0x18b837={'lastSync':'','pages':{}},_0xb108d5[_0xee297d(0x122)][_0x452e34]=_0x18b837,{'lockData':_0xb108d5,'appLock':_0x18b837};return!_0x18b837[_0xee297d(0x123)]&&(_0x18b837[_0xee297d(0x123)]=''),(!_0x18b837[_0xee297d(0x12d)]||typeof _0x18b837[_0xee297d(0x12d)]!=='object')&&(_0x18b837[_0xee297d(0x12d)]={}),{'lockData':_0xb108d5,'appLock':_0x18b837};}function a305_0x242f(_0x1ba735,_0x59bec9){_0x1ba735=_0x1ba735-0x11d;const _0x29303b=a305_0x2930();let _0x242fc6=_0x29303b[_0x1ba735];return _0x242fc6;}function a305_0x2930(){const _0x14d30c=['65yyJlMe','2lwMbSq','181344DBUUbs','pages','object','parse','90502pxgAeH','904871mDdHXJ','code','7552AyuGfP','stringify','45678fcjAuF','apps','lastSync','213mDYbqU','1692549cCfWQE','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','utf8','394905SOheUR','10XXbjKB'];a305_0x2930=function(){return _0x14d30c;};return a305_0x2930();}export async function readPageLockFile(_0x28f1a4){const _0x4f0eec=a305_0x242f;try{const _0x43b621=await readFile(_0x28f1a4,_0x4f0eec(0x127)),_0xbbe4da=JSON[_0x4f0eec(0x12f)](_0x43b621);return{'apps':_0xbbe4da[_0x4f0eec(0x122)]&&typeof _0xbbe4da[_0x4f0eec(0x122)]==='object'?_0xbbe4da[_0x4f0eec(0x122)]:{}};}catch(_0x3d16af){if(_0x3d16af[_0x4f0eec(0x11e)]==='ENOENT')return null;throw new Error(_0x4f0eec(0x126)+String(_0x3d16af));}}export async function writePageLockFile(_0x1f7561,_0x20fc86){const _0x25a8ff=a305_0x242f;await mkdir(dirname(_0x1f7561),{'recursive':!![]}),await writeFile(_0x1f7561,JSON[_0x25a8ff(0x120)](_0x20fc86,null,0x2),'utf8');}
1
+ (function(_0x5745cb,_0x16c47f){const _0x54458e=a306_0x4f60,_0x4e4a06=_0x5745cb();while(!![]){try{const _0x46ca79=-parseInt(_0x54458e(0x1a5))/0x1*(-parseInt(_0x54458e(0x1ac))/0x2)+parseInt(_0x54458e(0x1a7))/0x3+parseInt(_0x54458e(0x1a0))/0x4+parseInt(_0x54458e(0x1a1))/0x5*(-parseInt(_0x54458e(0x1ad))/0x6)+-parseInt(_0x54458e(0x19e))/0x7*(parseInt(_0x54458e(0x1a4))/0x8)+parseInt(_0x54458e(0x19c))/0x9*(parseInt(_0x54458e(0x199))/0xa)+-parseInt(_0x54458e(0x1a6))/0xb*(parseInt(_0x54458e(0x19a))/0xc);if(_0x46ca79===_0x16c47f)break;else _0x4e4a06['push'](_0x4e4a06['shift']());}catch(_0x5066a5){_0x4e4a06['push'](_0x4e4a06['shift']());}}}(a306_0x50c9,0xaccb5));function a306_0x4f60(_0x207498,_0x2c0eec){_0x207498=_0x207498-0x199;const _0x50c98c=a306_0x50c9();let _0x4f60e9=_0x50c98c[_0x207498];return _0x4f60e9;}function a306_0x50c9(){const _0x16f87e=['612808IPhHmH','28955465ZBSCvG','2022921UEAmcc','code','apps','ENOENT','stringify','4UiANwi','4584lhmDea','960590jbFHWN','12RaDTCJ','object','81ZZPxBy','utf8','7eTirlu','lastSync','5514076dQprUx','1640ayPDQq','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','pages','4418408VHzZJH'];a306_0x50c9=function(){return _0x16f87e;};return a306_0x50c9();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x543997,_0x15f2a9){const _0x3d9e54=a306_0x4f60,_0x564b20={'apps':_0x543997[_0x3d9e54(0x1a9)]&&typeof _0x543997[_0x3d9e54(0x1a9)]===_0x3d9e54(0x19b)?_0x543997[_0x3d9e54(0x1a9)]:{}};let _0xb32458=_0x564b20[_0x3d9e54(0x1a9)][_0x15f2a9];if(!_0xb32458)return _0xb32458={'lastSync':'','pages':{}},_0x564b20['apps'][_0x15f2a9]=_0xb32458,{'lockData':_0x564b20,'appLock':_0xb32458};return!_0xb32458[_0x3d9e54(0x19f)]&&(_0xb32458[_0x3d9e54(0x19f)]=''),(!_0xb32458[_0x3d9e54(0x1a3)]||typeof _0xb32458['pages']!==_0x3d9e54(0x19b))&&(_0xb32458['pages']={}),{'lockData':_0x564b20,'appLock':_0xb32458};}export async function readPageLockFile(_0x3b3fb6){const _0x9c9a82=a306_0x4f60;try{const _0x23ff67=await readFile(_0x3b3fb6,_0x9c9a82(0x19d)),_0xea9ebd=JSON['parse'](_0x23ff67);return{'apps':_0xea9ebd[_0x9c9a82(0x1a9)]&&typeof _0xea9ebd['apps']===_0x9c9a82(0x19b)?_0xea9ebd['apps']:{}};}catch(_0x293f12){if(_0x293f12[_0x9c9a82(0x1a8)]===_0x9c9a82(0x1aa))return null;throw new Error(_0x9c9a82(0x1a2)+String(_0x293f12));}}export async function writePageLockFile(_0x298d12,_0x531e07){const _0x2c0821=a306_0x4f60;await mkdir(dirname(_0x298d12),{'recursive':!![]}),await writeFile(_0x298d12,JSON[_0x2c0821(0x1ab)](_0x531e07,null,0x2),_0x2c0821(0x19d));}
@@ -1 +1 @@
1
- (function(_0x4cc12c,_0x527b24){const _0x1ffa1d=a306_0x193e,_0x170a7b=_0x4cc12c();while(!![]){try{const _0x5b8d86=-parseInt(_0x1ffa1d(0x116))/0x1*(-parseInt(_0x1ffa1d(0x10d))/0x2)+parseInt(_0x1ffa1d(0x123))/0x3*(-parseInt(_0x1ffa1d(0x127))/0x4)+parseInt(_0x1ffa1d(0x110))/0x5*(parseInt(_0x1ffa1d(0x115))/0x6)+parseInt(_0x1ffa1d(0x10c))/0x7*(-parseInt(_0x1ffa1d(0x104))/0x8)+parseInt(_0x1ffa1d(0x125))/0x9*(-parseInt(_0x1ffa1d(0x10a))/0xa)+parseInt(_0x1ffa1d(0x113))/0xb*(-parseInt(_0x1ffa1d(0x133))/0xc)+parseInt(_0x1ffa1d(0x118))/0xd;if(_0x5b8d86===_0x527b24)break;else _0x170a7b['push'](_0x170a7b['shift']());}catch(_0x8bd923){_0x170a7b['push'](_0x170a7b['shift']());}}}(a306_0x160c,0x578db));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x2bef76,_0x139839,_0x4e55bf){const _0x51d911=a306_0x193e,_0x2ad093=parseSchema(_0x2bef76,_0x51d911(0x102)),_0x2f6143=parseSchema(_0x139839,'remote'),_0x5cd9a6=collectLrSmartJsx(_0x2ad093,!![]);if(_0x5cd9a6[_0x51d911(0x111)]===0x0)return{'content':_0x2bef76,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x147b7c=new Map(collectLrSmartJsx(_0x2f6143)[_0x51d911(0x108)](_0x477d8f=>[_0x477d8f[_0x51d911(0x11a)],_0x477d8f]));let _0x4693e9=0x0,_0x34765b=0x0;for(const _0x5e6814 of _0x5cd9a6){const _0x3011b8=readNonEmptyString(_0x5e6814[_0x51d911(0x114)][_0x51d911(0x105)]),_0x40356f=readNonEmptyString(_0x5e6814[_0x51d911(0x114)][_0x51d911(0x103)]),_0x38a88b=_0x147b7c[_0x51d911(0x12f)](_0x5e6814[_0x51d911(0x11a)]),_0x597e1d=readNonEmptyString(_0x38a88b?.[_0x51d911(0x114)][_0x51d911(0x105)]),_0x130038=readNonEmptyString(_0x38a88b?.['render'][_0x51d911(0x103)]);let _0x3195e6=![];_0x5e6814[_0x51d911(0x114)]['type']!==_0x51d911(0x106)&&(_0x5e6814[_0x51d911(0x114)][_0x51d911(0x10e)]='JSFunction',_0x3195e6=!![]);!isPageContextExpression(_0x5e6814['props'][_0x51d911(0x100)])&&(_0x5e6814[_0x51d911(0x11d)][_0x51d911(0x100)]={'type':_0x51d911(0x12e),'value':_0x51d911(0x109)},_0x3195e6=!![]);if(!_0x3011b8){if(!_0x40356f)throw CliErrors[_0x51d911(0x112)](_0x51d911(0x129)+_0x5e6814[_0x51d911(0x121)]+_0x51d911(0x124),_0x51d911(0x12b));if(_0x3195e6)_0x34765b+=0x1;continue;}const _0x546fd0=!_0x38a88b||_0x3011b8!==_0x597e1d,_0x24f756=!_0x40356f;if(!_0x546fd0&&_0x40356f&&_0x130038&&_0x40356f!==_0x130038)throw CliErrors[_0x51d911(0x112)](_0x51d911(0x129)+_0x5e6814[_0x51d911(0x121)]+_0x51d911(0x10f),_0x51d911(0x130));if(_0x546fd0||_0x24f756||!_0x130038){const _0x28f90e=readNonEmptyString(await _0x4e55bf(_0x3011b8));if(!_0x28f90e)throw CliErrors[_0x51d911(0x107)](_0x51d911(0x11f)+_0x5e6814[_0x51d911(0x121)]+'\x22.');_0x5e6814[_0x51d911(0x114)][_0x51d911(0x103)]=_0x28f90e,_0x4693e9+=0x1,_0x3195e6=!![];}if(_0x3195e6)_0x34765b+=0x1;}if(_0x34765b===0x0)return{'content':_0x2bef76,'compiledNodes':_0x4693e9,'normalizedNodes':_0x34765b};return{'content':JSON['stringify'](_0x2ad093),'compiledNodes':_0x4693e9,'normalizedNodes':_0x34765b};}function a306_0x193e(_0x2f5455,_0x38efe4){_0x2f5455=_0x2f5455-0x100;const _0x160c40=a306_0x160c();let _0x193e5a=_0x160c40[_0x2f5455];return _0x193e5a;}function parseSchema(_0x1eb3e1,_0x367932){const _0x68e4fb=a306_0x193e;try{return JSON[_0x68e4fb(0x12c)](_0x1eb3e1);}catch{throw CliErrors[_0x68e4fb(0x112)](_0x68e4fb(0x12a)+_0x367932+_0x68e4fb(0x131));}}function a306_0x160c(){const _0xbe7acf=['get','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','\x20page\x20schema.','LrSmartJsx','12QfrIYw','_context','id:','local','value','896744dJNPwH','source','JSFunction','apiError','map','this','4180qNzUeq','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','35gNjAGc','2RSdpyR','type','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','473395DPgsfs','length','validation','3049453utbOjv','render','42ifjGRi','113494mKNfmS','isArray','14016522aEmvEH','string','key','push','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','props','entries','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','path:','label','forEach','273rjoTTv','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','14139tcorSB','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','64ohHOaH','componentName','LrSmartJsx\x20node\x20\x22','Invalid\x20JSON\x20in\x20','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','parse','trim','JSExpression'];a306_0x160c=function(){return _0xbe7acf;};return a306_0x160c();}function collectLrSmartJsx(_0x4c57c8,_0x36cb59=![]){const _0x198181=[],_0x15a099=(_0x2811a2,_0x6154eb)=>{const _0x54df32=a306_0x193e;if(Array[_0x54df32(0x117)](_0x2811a2)){_0x2811a2[_0x54df32(0x122)]((_0x29aec3,_0x1cfda7)=>_0x15a099(_0x29aec3,_0x6154eb+'['+_0x1cfda7+']'));return;}if(!isObject(_0x2811a2))return;if(_0x2811a2[_0x54df32(0x128)]===_0x54df32(0x132)){const _0x47db16=readNonEmptyString(_0x2811a2['id']),_0x3c9b4f=_0x47db16||_0x6154eb,_0x2b3fea=isObject(_0x2811a2[_0x54df32(0x11d)])?_0x2811a2[_0x54df32(0x11d)]:undefined;if(!_0x2b3fea){if(_0x36cb59)throw CliErrors['validation'](_0x54df32(0x129)+_0x3c9b4f+'\x22\x20has\x20missing\x20or\x20invalid\x20props.',_0x54df32(0x126));return;}const _0x42d53a=isObject(_0x2b3fea[_0x54df32(0x114)])?_0x2b3fea[_0x54df32(0x114)]:undefined;if(!_0x42d53a){if(_0x36cb59)throw CliErrors['validation'](_0x54df32(0x129)+_0x3c9b4f+_0x54df32(0x10b),_0x54df32(0x11c));return;}_0x198181[_0x54df32(0x11b)]({'key':_0x47db16?_0x54df32(0x101)+_0x47db16:_0x54df32(0x120)+_0x6154eb,'label':_0x3c9b4f,'props':_0x2b3fea,'render':_0x42d53a});}for(const [_0x228064,_0xcafb80]of Object[_0x54df32(0x11e)](_0x2811a2)){if(_0x228064===_0x54df32(0x11d)&&_0x2811a2[_0x54df32(0x128)]===_0x54df32(0x132))continue;_0x15a099(_0xcafb80,_0x6154eb+'.'+_0x228064);}};return _0x15a099(_0x4c57c8,'$'),_0x198181;}function isObject(_0x42470c){const _0x251e7a=a306_0x193e;return Boolean(_0x42470c)&&typeof _0x42470c==='object'&&!Array[_0x251e7a(0x117)](_0x42470c);}function readNonEmptyString(_0x86a9be){const _0x8c98b1=a306_0x193e;return typeof _0x86a9be===_0x8c98b1(0x119)&&_0x86a9be[_0x8c98b1(0x12d)]()?_0x86a9be:undefined;}function isPageContextExpression(_0x27d514){const _0xb87615=a306_0x193e;return isObject(_0x27d514)&&_0x27d514[_0xb87615(0x10e)]==='JSExpression'&&_0x27d514['value']==='this';}
1
+ (function(_0x1dbce3,_0x3f43f8){const _0x110a77=a307_0x5e59,_0x515020=_0x1dbce3();while(!![]){try{const _0x2c32ca=-parseInt(_0x110a77(0x15b))/0x1+-parseInt(_0x110a77(0x13c))/0x2*(parseInt(_0x110a77(0x131))/0x3)+parseInt(_0x110a77(0x15a))/0x4+-parseInt(_0x110a77(0x144))/0x5*(-parseInt(_0x110a77(0x149))/0x6)+-parseInt(_0x110a77(0x13f))/0x7*(parseInt(_0x110a77(0x159))/0x8)+parseInt(_0x110a77(0x14e))/0x9+-parseInt(_0x110a77(0x13e))/0xa*(parseInt(_0x110a77(0x139))/0xb);if(_0x2c32ca===_0x3f43f8)break;else _0x515020['push'](_0x515020['shift']());}catch(_0xf198be){_0x515020['push'](_0x515020['shift']());}}}(a307_0x49de,0xd9715));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x27655b,_0x4fdb0b,_0x56a173){const _0xfabcf1=a307_0x5e59,_0x3867ca=parseSchema(_0x27655b,_0xfabcf1(0x14a)),_0x4e6ae7=parseSchema(_0x4fdb0b,_0xfabcf1(0x141)),_0x4c64be=collectLrSmartJsx(_0x3867ca,!![]);if(_0x4c64be['length']===0x0)return{'content':_0x27655b,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x50497c=new Map(collectLrSmartJsx(_0x4e6ae7)['map'](_0x4be4ef=>[_0x4be4ef[_0xfabcf1(0x14d)],_0x4be4ef]));let _0x474644=0x0,_0x4f7310=0x0;for(const _0x1fa038 of _0x4c64be){const _0x580d27=readNonEmptyString(_0x1fa038['render']['source']),_0x56a5ba=readNonEmptyString(_0x1fa038[_0xfabcf1(0x15c)]['value']),_0x5d76bd=_0x50497c[_0xfabcf1(0x138)](_0x1fa038['key']),_0x160900=readNonEmptyString(_0x5d76bd?.[_0xfabcf1(0x15c)]['source']),_0x436eb4=readNonEmptyString(_0x5d76bd?.[_0xfabcf1(0x15c)]['value']);let _0x10122b=![];_0x1fa038[_0xfabcf1(0x15c)][_0xfabcf1(0x152)]!==_0xfabcf1(0x13b)&&(_0x1fa038[_0xfabcf1(0x15c)]['type']=_0xfabcf1(0x13b),_0x10122b=!![]);!isPageContextExpression(_0x1fa038[_0xfabcf1(0x154)]['_context'])&&(_0x1fa038['props'][_0xfabcf1(0x153)]={'type':_0xfabcf1(0x147),'value':'this'},_0x10122b=!![]);if(!_0x580d27){if(!_0x56a5ba)throw CliErrors[_0xfabcf1(0x157)](_0xfabcf1(0x14b)+_0x1fa038[_0xfabcf1(0x132)]+_0xfabcf1(0x143),'Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.');if(_0x10122b)_0x4f7310+=0x1;continue;}const _0x28fa28=!_0x5d76bd||_0x580d27!==_0x160900,_0x547450=!_0x56a5ba;if(!_0x28fa28&&_0x56a5ba&&_0x436eb4&&_0x56a5ba!==_0x436eb4)throw CliErrors[_0xfabcf1(0x157)](_0xfabcf1(0x14b)+_0x1fa038[_0xfabcf1(0x132)]+_0xfabcf1(0x135),_0xfabcf1(0x137));if(_0x28fa28||_0x547450||!_0x436eb4){const _0x1805ad=readNonEmptyString(await _0x56a173(_0x580d27));if(!_0x1805ad)throw CliErrors[_0xfabcf1(0x151)](_0xfabcf1(0x140)+_0x1fa038[_0xfabcf1(0x132)]+'\x22.');_0x1fa038['render']['value']=_0x1805ad,_0x474644+=0x1,_0x10122b=!![];}if(_0x10122b)_0x4f7310+=0x1;}if(_0x4f7310===0x0)return{'content':_0x27655b,'compiledNodes':_0x474644,'normalizedNodes':_0x4f7310};return{'content':JSON['stringify'](_0x3867ca),'compiledNodes':_0x474644,'normalizedNodes':_0x4f7310};}function parseSchema(_0x188ef3,_0xbe4f6){const _0x19213d=a307_0x5e59;try{return JSON[_0x19213d(0x14c)](_0x188ef3);}catch{throw CliErrors[_0x19213d(0x157)]('Invalid\x20JSON\x20in\x20'+_0xbe4f6+_0x19213d(0x13a));}}function collectLrSmartJsx(_0x4475c4,_0x599f1a=![]){const _0x22a4ef=[],_0x1af38=(_0x23a564,_0x5ef65b)=>{const _0x98f39c=a307_0x5e59;if(Array[_0x98f39c(0x158)](_0x23a564)){_0x23a564[_0x98f39c(0x133)]((_0x4f5fb2,_0x52c248)=>_0x1af38(_0x4f5fb2,_0x5ef65b+'['+_0x52c248+']'));return;}if(!isObject(_0x23a564))return;if(_0x23a564[_0x98f39c(0x156)]===_0x98f39c(0x13d)){const _0x2f295c=readNonEmptyString(_0x23a564['id']),_0x48174b=_0x2f295c||_0x5ef65b,_0x5f1061=isObject(_0x23a564[_0x98f39c(0x154)])?_0x23a564['props']:undefined;if(!_0x5f1061){if(_0x599f1a)throw CliErrors[_0x98f39c(0x157)](_0x98f39c(0x14b)+_0x48174b+_0x98f39c(0x145),_0x98f39c(0x155));return;}const _0x2c67d9=isObject(_0x5f1061[_0x98f39c(0x15c)])?_0x5f1061['render']:undefined;if(!_0x2c67d9){if(_0x599f1a)throw CliErrors['validation']('LrSmartJsx\x20node\x20\x22'+_0x48174b+_0x98f39c(0x14f),'Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.');return;}_0x22a4ef[_0x98f39c(0x146)]({'key':_0x2f295c?_0x98f39c(0x136)+_0x2f295c:'path:'+_0x5ef65b,'label':_0x48174b,'props':_0x5f1061,'render':_0x2c67d9});}for(const [_0x2bf2ac,_0x1fe682]of Object[_0x98f39c(0x134)](_0x23a564)){if(_0x2bf2ac==='props'&&_0x23a564['componentName']===_0x98f39c(0x13d))continue;_0x1af38(_0x1fe682,_0x5ef65b+'.'+_0x2bf2ac);}};return _0x1af38(_0x4475c4,'$'),_0x22a4ef;}function isObject(_0x429ab9){return Boolean(_0x429ab9)&&typeof _0x429ab9==='object'&&!Array['isArray'](_0x429ab9);}function readNonEmptyString(_0x335574){const _0x32b03=a307_0x5e59;return typeof _0x335574===_0x32b03(0x150)&&_0x335574[_0x32b03(0x148)]()?_0x335574:undefined;}function a307_0x5e59(_0x1c00ee,_0xaf3948){_0x1c00ee=_0x1c00ee-0x131;const _0x49dea2=a307_0x49de();let _0x5e5915=_0x49dea2[_0x1c00ee];return _0x5e5915;}function isPageContextExpression(_0x82da23){const _0x4394e0=a307_0x5e59;return isObject(_0x82da23)&&_0x82da23[_0x4394e0(0x152)]===_0x4394e0(0x147)&&_0x82da23['value']===_0x4394e0(0x142);}function a307_0x49de(){const _0xdc4cd6=['221826aJEcjc','LrSmartJsx','7760tzCPRt','26215rKvOfY','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','remote','this','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','9535jmWYSD','\x22\x20has\x20missing\x20or\x20invalid\x20props.','push','JSExpression','trim','5490ziKfpk','local','LrSmartJsx\x20node\x20\x22','parse','key','11704248TIqRNL','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','string','apiError','type','_context','props','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','componentName','validation','isArray','2104dMlEvT','5144516cYteww','381287TdHPAa','render','21BSSDMN','label','forEach','entries','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','id:','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','get','18403fueWCG','\x20page\x20schema.','JSFunction'];a307_0x49de=function(){return _0xdc4cd6;};return a307_0x49de();}
@@ -1 +1 @@
1
- function a308_0x4d12(){const _0x1dbd62=['sort','tableName','search','matchedPrefix','full','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','inner','unsupportedReason','columns','JOIN_INDEX_NOT_USABLE','max','unavailable','some','min','toLowerCase','sql','replaceAll','slice','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','includes','right','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','alias','(?:^|[^\x5cw$])','startsWith','reduce','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','96190EZHLaz','warning','natural','cross','indexes','push','unknown','matchAll','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','index','8WPtbRB','using','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','covered','\x5c$&','\x5cs*\x5c.\x5cs*[\x5cw$]+','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','metadataAvailable','split','table','3981782SimmyN','has','__sq__','INNER','toUpperCase','match','filter','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','map','from','JOIN_PREDICATE_UNSUPPORTED','968884CECgnz','join','66qKDCuq','820251HsMPlG','6EUlbqz','JOIN_INDEX_MISSING','add','exec','8uJpvtH','8802FSbTTC','test','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','trim','unsupportedPredicate','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','3240645XARTBh','where','212088cGFOsO','replace','length'];a308_0x4d12=function(){return _0x1dbd62;};return a308_0x4d12();}(function(_0x98c7a,_0x5e3c16){const _0x40040b=a308_0x16e4,_0x3a7bdd=_0x98c7a();while(!![]){try{const _0x20809=parseInt(_0x40040b(0x118))/0x1+-parseInt(_0x40040b(0x107))/0x2+parseInt(_0x40040b(0x10a))/0x3*(-parseInt(_0x40040b(0x10f))/0x4)+-parseInt(_0x40040b(0x116))/0x5*(-parseInt(_0x40040b(0x10b))/0x6)+parseInt(_0x40040b(0x14a))/0x7*(parseInt(_0x40040b(0x140))/0x8)+-parseInt(_0x40040b(0x110))/0x9+-parseInt(_0x40040b(0x136))/0xa*(parseInt(_0x40040b(0x109))/0xb);if(_0x20809===_0x5e3c16)break;else _0x3a7bdd['push'](_0x3a7bdd['shift']());}catch(_0x2c12ef){_0x3a7bdd['push'](_0x3a7bdd['shift']());}}}(a308_0x4d12,0x52c83));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x42f7aa,_0x4fbdd5){const _0x1585f0=a308_0x16e4,_0x6783c2=[],_0x31cc7c=normalizeSqlForStaticAnalysis(_0x42f7aa),_0x5d255d=(_0x31cc7c['error']?[]:extractJoinFacts(_0x31cc7c[_0x1585f0(0x12a)]))[_0x1585f0(0x104)](_0x31f1ce=>{const _0x57fad9=_0x1585f0;if(_0x31f1ce[_0x57fad9(0x114)]||_0x31f1ce[_0x57fad9(0x123)]['length']===0x0)return _0x6783c2['push']({'code':_0x57fad9(0x106),'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce['alias'],'columns':_0x31f1ce['columns'],'reason':_0x31f1ce[_0x57fad9(0x122)]??_0x57fad9(0x135)}),{'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce[_0x57fad9(0x131)],'columns':_0x31f1ce[_0x57fad9(0x123)],'status':_0x57fad9(0x126)};const _0x1b2bb8=resolveTableMetadata(_0x4fbdd5,_0x31f1ce[_0x57fad9(0x149)]),_0xf8160b=(_0x1b2bb8?.['indexes']??[])[_0x57fad9(0x104)](_0x1ad1c1=>({'index':_0x1ad1c1,'matchedPrefix':findEqualityPrefix(_0x1ad1c1[_0x57fad9(0x123)],_0x31f1ce[_0x57fad9(0x123)])}))[_0x57fad9(0x102)](_0x27bd86=>_0x27bd86[_0x57fad9(0x11e)][_0x57fad9(0x11a)]>0x0),_0x360a44=_0xf8160b[_0x57fad9(0x134)]((_0x132b4c,_0x100f5d)=>!_0x132b4c||_0x100f5d[_0x57fad9(0x11e)][_0x57fad9(0x11a)]>_0x132b4c[_0x57fad9(0x11e)][_0x57fad9(0x11a)]?_0x100f5d:_0x132b4c,_0xf8160b[0x0]);if(_0x360a44)return{'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce['alias'],'columns':_0x31f1ce[_0x57fad9(0x123)],'status':_0x57fad9(0x143),'matchedIndex':{..._0x360a44['index'],'matchedPrefix':_0x360a44[_0x57fad9(0x11e)]}};const _0x4ab2cd=_0x1b2bb8?.[_0x57fad9(0x13a)][_0x57fad9(0x102)](_0x49ca4a=>_0x49ca4a['columns'][_0x57fad9(0x127)](_0x5304ca=>_0x31f1ce[_0x57fad9(0x123)][_0x57fad9(0x127)](_0x211432=>columnNamesMatch(_0x5304ca,_0x211432))))??[];if(_0x4ab2cd['length']>0x0)return _0x6783c2[_0x57fad9(0x13b)]({'code':_0x57fad9(0x124),'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce['alias'],'columns':_0x31f1ce[_0x57fad9(0x123)],'reason':_0x57fad9(0x103)}),{'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce[_0x57fad9(0x131)],'columns':_0x31f1ce['columns'],'status':'warning','candidateIndexes':_0x4ab2cd};if(_0x1b2bb8&&_0x1b2bb8[_0x57fad9(0x147)]!==![]&&_0x1b2bb8[_0x57fad9(0x13a)]['length']>0x0&&_0x31f1ce['columns']['length']>0x0)return _0x6783c2[_0x57fad9(0x13b)]({'code':_0x57fad9(0x10c),'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce[_0x57fad9(0x131)],'columns':_0x31f1ce[_0x57fad9(0x123)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce[_0x57fad9(0x131)],'columns':_0x31f1ce['columns'],'status':_0x57fad9(0x137)};return _0x6783c2[_0x57fad9(0x13b)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce[_0x57fad9(0x131)],'columns':_0x31f1ce['columns'],'reason':_0x1b2bb8?_0x57fad9(0x112):_0x57fad9(0x120)}),{'table':_0x31f1ce[_0x57fad9(0x149)],'alias':_0x31f1ce[_0x57fad9(0x131)],'columns':_0x31f1ce['columns'],'status':_0x57fad9(0x126)};});return{'checked':_0x5d255d[_0x1585f0(0x11a)]>0x0,'joins':_0x5d255d,'warnings':_0x6783c2};}function extractJoinFacts(_0x582e4e){const _0x506776=a308_0x16e4,_0x3d0a9f=maskNestedQueries(stripSqlNoise(_0x582e4e)),_0xf95bb8=maskQuotedIdentifiers(_0x3d0a9f),_0x1de9b5=[],_0x26865c=new Set(),_0x2903e4=/\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 _0x5c601f of _0x3d0a9f[_0x506776(0x13d)](_0x2903e4)){const _0x47012d=_0x5c601f[_0x506776(0x13f)]??0x0,_0x478d8a=_0x5c601f[0x0][_0x506776(0x11d)](/\bJOIN\b/i),_0x33c17f=_0x47012d+Math['max'](0x0,_0x478d8a);if(!/^JOIN\b/i[_0x506776(0x111)](_0xf95bb8[_0x506776(0x12c)](_0x33c17f)))continue;_0x26865c[_0x506776(0x10d)](_0x33c17f);const _0x1929e=normalizeIdentifier(_0x5c601f[0x1]||_0x506776(0x14d)),_0x302b8f=normalizeIdentifier(_0x5c601f[0x2]??''),_0x3696a0=normalizeIdentifier(_0x5c601f[0x3]||_0x302b8f[_0x506776(0x148)]('.')['at'](-0x1)||_0x302b8f),_0x348f39=[],_0x416dff=_0x302b8f===_0x506776(0x14c);let _0x65c27a=_0x1929e===_0x506776(0x12f)||_0x1929e==='full'||_0x416dff,_0x44c597=_0x65c27a?_0x416dff?'Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.':_0x1929e[_0x506776(0x100)]()+_0x506776(0x115):undefined;const _0x37b894=stripOuterParentheses(_0x5c601f[0x4]??''),_0x44e2f4=_0x37b894['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x37b894[_0x506776(0x12e)](MYBATIS_DYNAMIC_END_MARKER),_0x1cac01=_0x37b894[_0x506776(0x12e)](MYBATIS_INCLUDE_MARKER);_0x44e2f4&&(_0x65c27a=!![],_0x44c597??=_0x506776(0x13e));_0x1cac01&&(_0x65c27a=!![],_0x44c597??=_0x506776(0x146));const _0x394af1=_0x37b894['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x506776(0x12b)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x394af1,'OR')&&(_0x65c27a=!![],_0x44c597??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0xaf12fc of splitTopLevelAnd(_0x394af1)){const _0xc126c8=stripOuterParentheses(_0xaf12fc);if(hasTopLevelKeyword(_0xc126c8,'OR')){_0x65c27a=!![],_0x44c597??=_0x506776(0x142);continue;}const _0x154db5=splitEquality(_0xc126c8);if(!_0x154db5){containsColumnReference(_0xaf12fc,_0x3696a0)&&(_0x65c27a=!![]);continue;}const _0x2c7f7d=parseDirectColumnReference(_0x154db5[0x0],_0x3696a0),_0x4926b1=parseDirectColumnReference(_0x154db5[0x1],_0x3696a0),_0x1ab305=containsColumnReference(_0x154db5[0x0],_0x3696a0),_0x112db9=containsColumnReference(_0x154db5[0x1],_0x3696a0),_0x4839de=_0x2c7f7d&&!_0x112db9?_0x2c7f7d:_0x4926b1&&!_0x1ab305?_0x4926b1:null;if(_0x4839de&&!_0x348f39[_0x506776(0x12e)](_0x4839de))_0x348f39[_0x506776(0x13b)](_0x4839de);else!_0x4839de&&containsColumnReference(_0xaf12fc,_0x3696a0)&&(_0x65c27a=!![]);}_0x1de9b5[_0x506776(0x13b)]({'table':_0x302b8f,'alias':_0x3696a0,'columns':_0x348f39,'unsupportedPredicate':_0x65c27a,'unsupportedReason':_0x44c597,'containsUnresolvedInclude':_0x1cac01,'position':_0x33c17f});}for(const _0xe5aa78 of _0xf95bb8[_0x506776(0x13d)](/\bJOIN\b/gi)){const _0x252f84=_0xe5aa78['index']??0x0;if(_0x26865c[_0x506776(0x14b)](_0x252f84))continue;const _0x32d4d4=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x506776(0x10e)](_0x3d0a9f[_0x506776(0x12c)](_0x252f84+_0xe5aa78[0x0][_0x506776(0x11a)])),_0x1ab2b2=normalizeIdentifier(_0x32d4d4?.[0x1]||_0x506776(0x13c)),_0x54b086=normalizeIdentifier(_0x32d4d4?.[0x2]||''),_0xb1c4f4=isSqlClauseKeyword(_0x54b086)?_0x1ab2b2['split']('.')['at'](-0x1)||_0x1ab2b2:_0x54b086||_0x1ab2b2[_0x506776(0x148)]('.')['at'](-0x1)||_0x1ab2b2;_0x1de9b5[_0x506776(0x13b)]({'table':_0x1ab2b2,'alias':_0xb1c4f4,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x506776(0x130),'position':_0x252f84});}const _0x52807c=_0xf95bb8['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x52807c>=0x0&&!_0x1de9b5['some'](_0x500c9e=>_0x500c9e['containsUnresolvedInclude'])&&_0x1de9b5[_0x506776(0x13b)]({'table':'unknown','alias':_0x506776(0x13c),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x506776(0x12d),'containsUnresolvedInclude':!![],'position':_0x52807c}),_0x1de9b5[_0x506776(0x11b)]((_0x35007f,_0x2af3d4)=>_0x35007f['position']-_0x2af3d4['position']);}function stripSqlNoise(_0x2a39b6){const _0x3f76a1=a308_0x16e4,_0x22da11=Array[_0x3f76a1(0x105)](_0x2a39b6),_0x365916=(_0xb9f83b,_0x365ab6)=>{for(let _0x30e635=_0xb9f83b;_0x30e635<_0x365ab6;_0x30e635+=0x1){_0x22da11[_0x30e635]!=='\x0a'&&_0x22da11[_0x30e635]!=='\x0d'&&(_0x22da11[_0x30e635]='\x20');}};for(let _0xf63033=0x0;_0xf63033<_0x22da11['length'];_0xf63033+=0x1){const _0x3d4888=_0x22da11[_0xf63033],_0x1f7383=_0x22da11[_0xf63033+0x1];if(_0x3d4888==='\x27'||_0x3d4888==='\x22'||_0x3d4888==='`'){const _0x4ed8ab=_0x3d4888,_0xaec284=_0xf63033;_0xf63033+=0x1;while(_0xf63033<_0x22da11[_0x3f76a1(0x11a)]){if(_0x22da11[_0xf63033]==='\x5c'&&_0xf63033+0x1<_0x22da11[_0x3f76a1(0x11a)]){_0xf63033+=0x2;continue;}if(_0x22da11[_0xf63033]!==_0x4ed8ab){_0xf63033+=0x1;continue;}if(_0x22da11[_0xf63033+0x1]===_0x4ed8ab){_0xf63033+=0x2;continue;}break;}if(_0x4ed8ab==='\x27')_0x365916(_0xaec284,Math[_0x3f76a1(0x128)](_0xf63033+0x1,_0x22da11[_0x3f76a1(0x11a)]));continue;}if(_0x3d4888==='-'&&_0x1f7383==='-'){const _0x3e80b0=_0xf63033;while(_0xf63033<_0x22da11['length']&&_0x22da11[_0xf63033]!=='\x0a')_0xf63033+=0x1;_0x365916(_0x3e80b0,_0xf63033);continue;}if(_0x3d4888==='/'&&_0x1f7383==='*'){const _0xc10d53=_0xf63033;_0xf63033+=0x2;while(_0xf63033<_0x22da11[_0x3f76a1(0x11a)]&&!(_0x22da11[_0xf63033]==='*'&&_0x22da11[_0xf63033+0x1]==='/')){_0xf63033+=0x1;}_0xf63033=Math[_0x3f76a1(0x128)](_0xf63033+0x1,_0x22da11[_0x3f76a1(0x11a)]-0x1),_0x365916(_0xc10d53,_0xf63033+0x1);continue;}if(_0x3d4888==='#'&&_0x1f7383!=='{'){const _0x2328ba=_0xf63033;while(_0xf63033<_0x22da11['length']&&_0x22da11[_0xf63033]!=='\x0a')_0xf63033+=0x1;_0x365916(_0x2328ba,_0xf63033);continue;}if((_0x3d4888==='#'||_0x3d4888==='$')&&_0x1f7383==='{'){const _0x1c73ac=_0xf63033;_0xf63033+=0x2;while(_0xf63033<_0x22da11[_0x3f76a1(0x11a)]&&_0x22da11[_0xf63033]!=='}')_0xf63033+=0x1;_0x365916(_0x1c73ac,Math[_0x3f76a1(0x128)](_0xf63033+0x1,_0x22da11[_0x3f76a1(0x11a)]));}}return _0x22da11[_0x3f76a1(0x108)]('');}function maskQuotedIdentifiers(_0x3326a5){const _0x48963a=a308_0x16e4,_0x15149a=Array[_0x48963a(0x105)](_0x3326a5);for(let _0x313061=0x0;_0x313061<_0x15149a['length'];_0x313061+=0x1){const _0x405fbe=_0x15149a[_0x313061];if(_0x405fbe!=='\x22'&&_0x405fbe!=='`')continue;_0x313061+=0x1;while(_0x313061<_0x15149a[_0x48963a(0x11a)]){if(_0x15149a[_0x313061]===_0x405fbe){if(_0x15149a[_0x313061+0x1]===_0x405fbe){_0x15149a[_0x313061]='\x20',_0x15149a[_0x313061+0x1]='\x20',_0x313061+=0x2;continue;}break;}_0x15149a[_0x313061]='\x20',_0x313061+=0x1;}}return _0x15149a[_0x48963a(0x108)]('');}function maskNestedQueries(_0x33cf37){const _0x54a804=a308_0x16e4,_0x1c3935=Array['from'](_0x33cf37);for(let _0x227148=0x0;_0x227148<_0x1c3935[_0x54a804(0x11a)];_0x227148+=0x1){if(_0x1c3935[_0x227148]!=='(')continue;const _0x552f85=_0x33cf37[_0x54a804(0x12c)](_0x227148+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x54a804(0x111)](_0x552f85))continue;let _0x52b223=0x1,_0x1fdf82=_0x227148+0x1;for(;_0x1fdf82<_0x1c3935[_0x54a804(0x11a)]&&_0x52b223>0x0;_0x1fdf82+=0x1){if(_0x1c3935[_0x1fdf82]==='(')_0x52b223+=0x1;if(_0x1c3935[_0x1fdf82]===')')_0x52b223-=0x1;}if(_0x52b223!==0x0)continue;for(let _0x377865=_0x227148;_0x377865<_0x1fdf82;_0x377865+=0x1){_0x1c3935[_0x377865]='\x20';}const _0x3ed8c2='__sq__';for(let _0x1fb590=0x0;_0x1fb590<_0x3ed8c2[_0x54a804(0x11a)]&&_0x227148+_0x1fb590<_0x1fdf82;_0x1fb590+=0x1){_0x1c3935[_0x227148+_0x1fb590]=_0x3ed8c2[_0x1fb590];}_0x227148=_0x1fdf82-0x1;}return _0x1c3935[_0x54a804(0x108)]('');}function splitTopLevelAnd(_0x282d53){const _0x4df4da=a308_0x16e4,_0x23e8e2=[];let _0x586ec2=0x0,_0x120263=0x0;for(let _0xf7f448=0x0;_0xf7f448<_0x282d53[_0x4df4da(0x11a)];_0xf7f448+=0x1){const _0x5d5d15=_0x282d53[_0xf7f448];if(_0x5d5d15==='(')_0x586ec2+=0x1;if(_0x5d5d15===')')_0x586ec2=Math[_0x4df4da(0x125)](0x0,_0x586ec2-0x1);_0x586ec2===0x0&&_0x282d53[_0x4df4da(0x12c)](_0xf7f448)[_0x4df4da(0x101)](/^AND\b/i)&&(_0xf7f448===0x0||/\s/['test'](_0x282d53[_0xf7f448-0x1]??''))&&(_0x23e8e2['push'](_0x282d53[_0x4df4da(0x12c)](_0x120263,_0xf7f448)[_0x4df4da(0x113)]()),_0xf7f448+=0x2,_0x120263=_0xf7f448+0x1);}const _0x59ad15=_0x282d53[_0x4df4da(0x12c)](_0x120263)['trim']();if(_0x59ad15)_0x23e8e2[_0x4df4da(0x13b)](_0x59ad15);return _0x23e8e2;}function hasTopLevelKeyword(_0x56f426,_0x2b2de6){const _0x406299=a308_0x16e4;let _0x1c7455=0x0;for(let _0x50cbe6=0x0;_0x50cbe6<_0x56f426['length'];_0x50cbe6+=0x1){const _0x19156e=_0x56f426[_0x50cbe6];if(_0x19156e==='(')_0x1c7455+=0x1;if(_0x19156e===')')_0x1c7455=Math[_0x406299(0x125)](0x0,_0x1c7455-0x1);if(_0x1c7455!==0x0)continue;const _0x30dad3=_0x56f426[_0x406299(0x12c)](_0x50cbe6,_0x50cbe6+_0x2b2de6[_0x406299(0x11a)]),_0x2fb66d=_0x56f426[_0x50cbe6-0x1]??'\x20',_0x33432a=_0x56f426[_0x50cbe6+_0x2b2de6['length']]??'\x20';if(_0x30dad3[_0x406299(0x100)]()===_0x2b2de6['toUpperCase']()&&!/[\w$]/[_0x406299(0x111)](_0x2fb66d)&&!/[\w$]/[_0x406299(0x111)](_0x33432a))return!![];}return![];}function splitEquality(_0x40bc6d){const _0x175839=a308_0x16e4,_0x257c16=stripOuterParentheses(_0x40bc6d);let _0x244a05=0x0,_0x1bc9f0;for(let _0x100a7e=0x0;_0x100a7e<_0x257c16[_0x175839(0x11a)];_0x100a7e+=0x1){const _0x7666fa=_0x257c16[_0x100a7e];if(_0x7666fa==='(')_0x244a05+=0x1;if(_0x7666fa===')')_0x244a05=Math[_0x175839(0x125)](0x0,_0x244a05-0x1);const _0x1c52cf=_0x257c16[_0x100a7e-0x1]??'',_0x2e9c76=_0x257c16[_0x100a7e+0x1]??'';if(_0x7666fa==='='&&_0x244a05===0x0&&!/[!<>=:]/[_0x175839(0x111)](_0x1c52cf)&&_0x2e9c76!=='='){if(_0x1bc9f0!==undefined)return null;_0x1bc9f0=_0x100a7e;}}return _0x1bc9f0===undefined?null:[_0x257c16['slice'](0x0,_0x1bc9f0)[_0x175839(0x113)](),_0x257c16[_0x175839(0x12c)](_0x1bc9f0+0x1)[_0x175839(0x113)]()];}function parseDirectColumnReference(_0x2c26aa,_0x4c222d){const _0x59157d=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x2c26aa));if(!_0x59157d)return null;if(normalizeIdentifier(_0x59157d[0x1]??'')!==normalizeIdentifier(_0x4c222d))return null;return normalizeIdentifier(_0x59157d[0x2]??'');}function containsColumnReference(_0x5921fb,_0x267665){const _0x551a63=a308_0x16e4,_0x3553d5=_0x5921fb['replace'](/[`"]/g,''),_0xd1b0aa=_0x267665[_0x551a63(0x119)](/[.*+?^${}()|[\]\\]/g,_0x551a63(0x144));return new RegExp(_0x551a63(0x132)+_0xd1b0aa+_0x551a63(0x145),'i')[_0x551a63(0x111)](_0x3553d5);}function findEqualityPrefix(_0x343248,_0xa3f34a){const _0x2ee12d=a308_0x16e4,_0x423354=new Set(_0xa3f34a[_0x2ee12d(0x104)](normalizeIdentifier)),_0x3a7ac9=[];for(const _0x3280fa of _0x343248){if(!_0x423354['has'](normalizeIdentifier(_0x3280fa)))break;_0x3a7ac9['push'](_0x3280fa);}return _0x3a7ac9;}function resolveTableMetadata(_0x2bec37,_0x5635dd){const _0x216ae7=a308_0x16e4,_0x5d4859=normalizeIdentifier(_0x5635dd),_0x425a36=_0x2bec37[_0x216ae7(0x102)](_0x5da994=>normalizeIdentifier(_0x5da994[_0x216ae7(0x11c)])===_0x5d4859);if(_0x425a36[_0x216ae7(0x11a)]===0x1)return _0x425a36[0x0];const _0x607248=_0x5d4859['includes']('.'),_0x4acdb2=_0x5d4859[_0x216ae7(0x148)]('.')['at'](-0x1),_0x13192a=_0x2bec37[_0x216ae7(0x102)](_0x4c3387=>{const _0x1ea4b8=_0x216ae7,_0x12e20c=normalizeIdentifier(_0x4c3387[_0x1ea4b8(0x11c)]);if(_0x607248&&_0x12e20c[_0x1ea4b8(0x12e)]('.'))return![];return _0x12e20c['split']('.')['at'](-0x1)===_0x4acdb2;});return _0x13192a[_0x216ae7(0x11a)]===0x1?_0x13192a[0x0]:undefined;}function columnNamesMatch(_0x5293eb,_0x4ed21a){return normalizeIdentifier(_0x5293eb)===normalizeIdentifier(_0x4ed21a);}function normalizeIdentifier(_0x448ca9){const _0x37b85f=a308_0x16e4;return _0x448ca9[_0x37b85f(0x119)](/[`"]/g,'')['trim']()[_0x37b85f(0x129)]();}function a308_0x16e4(_0x2152d5,_0x454538){_0x2152d5=_0x2152d5-0x100;const _0x4d1285=a308_0x4d12();let _0x16e432=_0x4d1285[_0x2152d5];return _0x16e432;}function isSqlClauseKeyword(_0x4350f0){const _0x2e3e94=a308_0x16e4;return new Set(['on',_0x2e3e94(0x141),_0x2e3e94(0x117),'join',_0x2e3e94(0x121),'left','right',_0x2e3e94(0x11f),_0x2e3e94(0x139),_0x2e3e94(0x138)])[_0x2e3e94(0x14b)](_0x4350f0);}function stripOuterParentheses(_0x33e862){const _0x5656c8=a308_0x16e4;let _0xdae6e2=_0x33e862[_0x5656c8(0x113)]();while(_0xdae6e2[_0x5656c8(0x133)]('(')&&_0xdae6e2['endsWith'](')')){let _0x4c2550=0x0,_0x3b2bd7=!![];for(let _0x5c193a=0x0;_0x5c193a<_0xdae6e2[_0x5656c8(0x11a)];_0x5c193a+=0x1){if(_0xdae6e2[_0x5c193a]==='(')_0x4c2550+=0x1;if(_0xdae6e2[_0x5c193a]===')')_0x4c2550-=0x1;if(_0x4c2550===0x0&&_0x5c193a<_0xdae6e2[_0x5656c8(0x11a)]-0x1){_0x3b2bd7=![];break;}}if(!_0x3b2bd7||_0x4c2550!==0x0)break;_0xdae6e2=_0xdae6e2['slice'](0x1,-0x1)['trim']();}return _0xdae6e2;}
1
+ (function(_0x2e3ccb,_0x4dbf08){const _0x78c829=a309_0x1989,_0x49e2e6=_0x2e3ccb();while(!![]){try{const _0x5724f1=parseInt(_0x78c829(0xd6))/0x1*(parseInt(_0x78c829(0x100))/0x2)+parseInt(_0x78c829(0xcf))/0x3*(-parseInt(_0x78c829(0xc9))/0x4)+parseInt(_0x78c829(0xfa))/0x5*(-parseInt(_0x78c829(0xe1))/0x6)+parseInt(_0x78c829(0xce))/0x7*(-parseInt(_0x78c829(0xbf))/0x8)+-parseInt(_0x78c829(0xf0))/0x9+-parseInt(_0x78c829(0xb6))/0xa+parseInt(_0x78c829(0xc2))/0xb*(parseInt(_0x78c829(0xbc))/0xc);if(_0x5724f1===_0x4dbf08)break;else _0x49e2e6['push'](_0x49e2e6['shift']());}catch(_0x33900e){_0x49e2e6['push'](_0x49e2e6['shift']());}}}(a309_0x340f,0x35ca5));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x173398,_0x31a7e7){const _0xbfc5cf=a309_0x1989,_0x18d91f=[],_0x3c87d7=normalizeSqlForStaticAnalysis(_0x173398),_0x54b52f=(_0x3c87d7[_0xbfc5cf(0xc3)]?[]:extractJoinFacts(_0x3c87d7[_0xbfc5cf(0xc7)]))[_0xbfc5cf(0xdc)](_0x1b0c7f=>{const _0x44955f=_0xbfc5cf;if(_0x1b0c7f[_0x44955f(0xca)]||_0x1b0c7f[_0x44955f(0xc0)][_0x44955f(0xe3)]===0x0)return _0x18d91f['push']({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f['columns'],'reason':_0x1b0c7f[_0x44955f(0xde)]??_0x44955f(0xfb)}),{'table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f[_0x44955f(0xc0)],'status':_0x44955f(0xb8)};const _0x31e313=resolveTableMetadata(_0x31a7e7,_0x1b0c7f[_0x44955f(0xc6)]),_0x53bf09=(_0x31e313?.[_0x44955f(0xf6)]??[])[_0x44955f(0xdc)](_0x1b1601=>({'index':_0x1b1601,'matchedPrefix':findEqualityPrefix(_0x1b1601[_0x44955f(0xc0)],_0x1b0c7f['columns'])}))['filter'](_0x488ad1=>_0x488ad1[_0x44955f(0xf2)]['length']>0x0),_0x29b2f1=_0x53bf09[_0x44955f(0xc4)]((_0x48aed3,_0x228273)=>!_0x48aed3||_0x228273[_0x44955f(0xf2)][_0x44955f(0xe3)]>_0x48aed3[_0x44955f(0xf2)]['length']?_0x228273:_0x48aed3,_0x53bf09[0x0]);if(_0x29b2f1)return{'table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f[_0x44955f(0xc0)],'status':'covered','matchedIndex':{..._0x29b2f1[_0x44955f(0xed)],'matchedPrefix':_0x29b2f1['matchedPrefix']}};const _0x5cf63c=_0x31e313?.[_0x44955f(0xf6)][_0x44955f(0xee)](_0x52ead3=>_0x52ead3['columns'][_0x44955f(0xba)](_0x1f2ed9=>_0x1b0c7f['columns'][_0x44955f(0xba)](_0x1b78f7=>columnNamesMatch(_0x1f2ed9,_0x1b78f7))))??[];if(_0x5cf63c[_0x44955f(0xe3)]>0x0)return _0x18d91f[_0x44955f(0xe5)]({'code':_0x44955f(0xd1),'table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f[_0x44955f(0xc0)],'reason':_0x44955f(0xf3)}),{'table':_0x1b0c7f['table'],'alias':_0x1b0c7f['alias'],'columns':_0x1b0c7f[_0x44955f(0xc0)],'status':'warning','candidateIndexes':_0x5cf63c};if(_0x31e313&&_0x31e313['metadataAvailable']!==![]&&_0x31e313[_0x44955f(0xf6)][_0x44955f(0xe3)]>0x0&&_0x1b0c7f[_0x44955f(0xc0)][_0x44955f(0xe3)]>0x0)return _0x18d91f['push']({'code':_0x44955f(0xd0),'table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f['columns'],'reason':_0x44955f(0xd9)}),{'table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f['alias'],'columns':_0x1b0c7f[_0x44955f(0xc0)],'status':_0x44955f(0xe6)};return _0x18d91f[_0x44955f(0xe5)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f[_0x44955f(0xc0)],'reason':_0x31e313?_0x44955f(0xb5):_0x44955f(0xdf)}),{'table':_0x1b0c7f[_0x44955f(0xc6)],'alias':_0x1b0c7f[_0x44955f(0xc8)],'columns':_0x1b0c7f[_0x44955f(0xc0)],'status':_0x44955f(0xb8)};});return{'checked':_0x54b52f['length']>0x0,'joins':_0x54b52f,'warnings':_0x18d91f};}function extractJoinFacts(_0x32c981){const _0x50235c=a309_0x1989,_0x1f1dc4=maskNestedQueries(stripSqlNoise(_0x32c981)),_0x1f0ff7=maskQuotedIdentifiers(_0x1f1dc4),_0x14c49b=[],_0x35cbed=new Set(),_0x4543e4=/\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 _0x40f3d0 of _0x1f1dc4[_0x50235c(0xd2)](_0x4543e4)){const _0x4bb3c5=_0x40f3d0[_0x50235c(0xed)]??0x0,_0x24826e=_0x40f3d0[0x0][_0x50235c(0xf4)](/\bJOIN\b/i),_0xaaaa66=_0x4bb3c5+Math[_0x50235c(0xfd)](0x0,_0x24826e);if(!/^JOIN\b/i[_0x50235c(0xbd)](_0x1f0ff7['slice'](_0xaaaa66)))continue;_0x35cbed[_0x50235c(0xf5)](_0xaaaa66);const _0x20473e=normalizeIdentifier(_0x40f3d0[0x1]||_0x50235c(0xef)),_0x12c7fa=normalizeIdentifier(_0x40f3d0[0x2]??''),_0x1af5c6=normalizeIdentifier(_0x40f3d0[0x3]||_0x12c7fa[_0x50235c(0xe0)]('.')['at'](-0x1)||_0x12c7fa),_0x5f2605=[],_0x3d6ec6=_0x12c7fa===_0x50235c(0xb7);let _0x2df324=_0x20473e===_0x50235c(0xf9)||_0x20473e===_0x50235c(0xe9)||_0x3d6ec6,_0x14a193=_0x2df324?_0x3d6ec6?'Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.':_0x20473e[_0x50235c(0xd7)]()+_0x50235c(0xe4):undefined;const _0x30693a=stripOuterParentheses(_0x40f3d0[0x4]??''),_0x9accd6=_0x30693a['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x30693a[_0x50235c(0xc5)](MYBATIS_DYNAMIC_END_MARKER),_0x4c63cf=_0x30693a[_0x50235c(0xc5)](MYBATIS_INCLUDE_MARKER);_0x9accd6&&(_0x2df324=!![],_0x14a193??=_0x50235c(0xd3));_0x4c63cf&&(_0x2df324=!![],_0x14a193??=_0x50235c(0xb9));const _0x6d15d8=_0x30693a[_0x50235c(0xcd)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x50235c(0xcd)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x50235c(0xcd)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x6d15d8,'OR')&&(_0x2df324=!![],_0x14a193??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x2ad809 of splitTopLevelAnd(_0x6d15d8)){const _0x28da03=stripOuterParentheses(_0x2ad809);if(hasTopLevelKeyword(_0x28da03,'OR')){_0x2df324=!![],_0x14a193??=_0x50235c(0xf1);continue;}const _0x27d028=splitEquality(_0x28da03);if(!_0x27d028){containsColumnReference(_0x2ad809,_0x1af5c6)&&(_0x2df324=!![]);continue;}const _0x3b0377=parseDirectColumnReference(_0x27d028[0x0],_0x1af5c6),_0x18abd2=parseDirectColumnReference(_0x27d028[0x1],_0x1af5c6),_0xadaa9d=containsColumnReference(_0x27d028[0x0],_0x1af5c6),_0xd48fb2=containsColumnReference(_0x27d028[0x1],_0x1af5c6),_0x183480=_0x3b0377&&!_0xd48fb2?_0x3b0377:_0x18abd2&&!_0xadaa9d?_0x18abd2:null;if(_0x183480&&!_0x5f2605[_0x50235c(0xc5)](_0x183480))_0x5f2605[_0x50235c(0xe5)](_0x183480);else!_0x183480&&containsColumnReference(_0x2ad809,_0x1af5c6)&&(_0x2df324=!![]);}_0x14c49b[_0x50235c(0xe5)]({'table':_0x12c7fa,'alias':_0x1af5c6,'columns':_0x5f2605,'unsupportedPredicate':_0x2df324,'unsupportedReason':_0x14a193,'containsUnresolvedInclude':_0x4c63cf,'position':_0xaaaa66});}for(const _0x4386f1 of _0x1f0ff7[_0x50235c(0xd2)](/\bJOIN\b/gi)){const _0xdcd16=_0x4386f1['index']??0x0;if(_0x35cbed[_0x50235c(0xfc)](_0xdcd16))continue;const _0x407b89=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x50235c(0xdd)](_0x1f1dc4[_0x50235c(0xe8)](_0xdcd16+_0x4386f1[0x0][_0x50235c(0xe3)])),_0x32bd5f=normalizeIdentifier(_0x407b89?.[0x1]||_0x50235c(0xbb)),_0x56fd0c=normalizeIdentifier(_0x407b89?.[0x2]||''),_0x195696=isSqlClauseKeyword(_0x56fd0c)?_0x32bd5f[_0x50235c(0xe0)]('.')['at'](-0x1)||_0x32bd5f:_0x56fd0c||_0x32bd5f[_0x50235c(0xe0)]('.')['at'](-0x1)||_0x32bd5f;_0x14c49b[_0x50235c(0xe5)]({'table':_0x32bd5f,'alias':_0x195696,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0xdcd16});}const _0x20c286=_0x1f0ff7[_0x50235c(0xcc)](MYBATIS_INCLUDE_MARKER);return _0x20c286>=0x0&&!_0x14c49b[_0x50235c(0xba)](_0x3f97aa=>_0x3f97aa[_0x50235c(0xec)])&&_0x14c49b[_0x50235c(0xe5)]({'table':_0x50235c(0xbb),'alias':_0x50235c(0xbb),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x50235c(0xe2),'containsUnresolvedInclude':!![],'position':_0x20c286}),_0x14c49b['sort']((_0x308c4d,_0x304fc2)=>_0x308c4d[_0x50235c(0xc1)]-_0x304fc2['position']);}function stripSqlNoise(_0x3b2b3b){const _0x3e51bf=a309_0x1989,_0x5e4e9d=Array[_0x3e51bf(0xdb)](_0x3b2b3b),_0x486f2d=(_0x3f1056,_0x49a758)=>{for(let _0x2b9112=_0x3f1056;_0x2b9112<_0x49a758;_0x2b9112+=0x1){_0x5e4e9d[_0x2b9112]!=='\x0a'&&_0x5e4e9d[_0x2b9112]!=='\x0d'&&(_0x5e4e9d[_0x2b9112]='\x20');}};for(let _0x1932a6=0x0;_0x1932a6<_0x5e4e9d['length'];_0x1932a6+=0x1){const _0x2d010e=_0x5e4e9d[_0x1932a6],_0x3ca627=_0x5e4e9d[_0x1932a6+0x1];if(_0x2d010e==='\x27'||_0x2d010e==='\x22'||_0x2d010e==='`'){const _0x3c9c75=_0x2d010e,_0x4d8aa9=_0x1932a6;_0x1932a6+=0x1;while(_0x1932a6<_0x5e4e9d['length']){if(_0x5e4e9d[_0x1932a6]==='\x5c'&&_0x1932a6+0x1<_0x5e4e9d[_0x3e51bf(0xe3)]){_0x1932a6+=0x2;continue;}if(_0x5e4e9d[_0x1932a6]!==_0x3c9c75){_0x1932a6+=0x1;continue;}if(_0x5e4e9d[_0x1932a6+0x1]===_0x3c9c75){_0x1932a6+=0x2;continue;}break;}if(_0x3c9c75==='\x27')_0x486f2d(_0x4d8aa9,Math[_0x3e51bf(0xf7)](_0x1932a6+0x1,_0x5e4e9d[_0x3e51bf(0xe3)]));continue;}if(_0x2d010e==='-'&&_0x3ca627==='-'){const _0x15ddf3=_0x1932a6;while(_0x1932a6<_0x5e4e9d[_0x3e51bf(0xe3)]&&_0x5e4e9d[_0x1932a6]!=='\x0a')_0x1932a6+=0x1;_0x486f2d(_0x15ddf3,_0x1932a6);continue;}if(_0x2d010e==='/'&&_0x3ca627==='*'){const _0x5d5d9e=_0x1932a6;_0x1932a6+=0x2;while(_0x1932a6<_0x5e4e9d['length']&&!(_0x5e4e9d[_0x1932a6]==='*'&&_0x5e4e9d[_0x1932a6+0x1]==='/')){_0x1932a6+=0x1;}_0x1932a6=Math[_0x3e51bf(0xf7)](_0x1932a6+0x1,_0x5e4e9d[_0x3e51bf(0xe3)]-0x1),_0x486f2d(_0x5d5d9e,_0x1932a6+0x1);continue;}if(_0x2d010e==='#'&&_0x3ca627!=='{'){const _0x3a606a=_0x1932a6;while(_0x1932a6<_0x5e4e9d[_0x3e51bf(0xe3)]&&_0x5e4e9d[_0x1932a6]!=='\x0a')_0x1932a6+=0x1;_0x486f2d(_0x3a606a,_0x1932a6);continue;}if((_0x2d010e==='#'||_0x2d010e==='$')&&_0x3ca627==='{'){const _0x1f94bc=_0x1932a6;_0x1932a6+=0x2;while(_0x1932a6<_0x5e4e9d[_0x3e51bf(0xe3)]&&_0x5e4e9d[_0x1932a6]!=='}')_0x1932a6+=0x1;_0x486f2d(_0x1f94bc,Math['min'](_0x1932a6+0x1,_0x5e4e9d[_0x3e51bf(0xe3)]));}}return _0x5e4e9d[_0x3e51bf(0xe7)]('');}function maskQuotedIdentifiers(_0x10715e){const _0x38c7a8=a309_0x1989,_0x5cff5d=Array[_0x38c7a8(0xdb)](_0x10715e);for(let _0xfb2353=0x0;_0xfb2353<_0x5cff5d[_0x38c7a8(0xe3)];_0xfb2353+=0x1){const _0x1695c4=_0x5cff5d[_0xfb2353];if(_0x1695c4!=='\x22'&&_0x1695c4!=='`')continue;_0xfb2353+=0x1;while(_0xfb2353<_0x5cff5d['length']){if(_0x5cff5d[_0xfb2353]===_0x1695c4){if(_0x5cff5d[_0xfb2353+0x1]===_0x1695c4){_0x5cff5d[_0xfb2353]='\x20',_0x5cff5d[_0xfb2353+0x1]='\x20',_0xfb2353+=0x2;continue;}break;}_0x5cff5d[_0xfb2353]='\x20',_0xfb2353+=0x1;}}return _0x5cff5d[_0x38c7a8(0xe7)]('');}function maskNestedQueries(_0x3bdbd4){const _0xd28e3a=a309_0x1989,_0x2eff05=Array[_0xd28e3a(0xdb)](_0x3bdbd4);for(let _0x2bfa3f=0x0;_0x2bfa3f<_0x2eff05[_0xd28e3a(0xe3)];_0x2bfa3f+=0x1){if(_0x2eff05[_0x2bfa3f]!=='(')continue;const _0x18f8fa=_0x3bdbd4['slice'](_0x2bfa3f+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0xd28e3a(0xbd)](_0x18f8fa))continue;let _0x4ae0af=0x1,_0x40a393=_0x2bfa3f+0x1;for(;_0x40a393<_0x2eff05[_0xd28e3a(0xe3)]&&_0x4ae0af>0x0;_0x40a393+=0x1){if(_0x2eff05[_0x40a393]==='(')_0x4ae0af+=0x1;if(_0x2eff05[_0x40a393]===')')_0x4ae0af-=0x1;}if(_0x4ae0af!==0x0)continue;for(let _0x46f29d=_0x2bfa3f;_0x46f29d<_0x40a393;_0x46f29d+=0x1){_0x2eff05[_0x46f29d]='\x20';}const _0x15d423=_0xd28e3a(0xb7);for(let _0x1ce5d1=0x0;_0x1ce5d1<_0x15d423[_0xd28e3a(0xe3)]&&_0x2bfa3f+_0x1ce5d1<_0x40a393;_0x1ce5d1+=0x1){_0x2eff05[_0x2bfa3f+_0x1ce5d1]=_0x15d423[_0x1ce5d1];}_0x2bfa3f=_0x40a393-0x1;}return _0x2eff05[_0xd28e3a(0xe7)]('');}function a309_0x1989(_0x186967,_0x1e0d11){_0x186967=_0x186967-0xb5;const _0x340f98=a309_0x340f();let _0x198906=_0x340f98[_0x186967];return _0x198906;}function splitTopLevelAnd(_0x3ea346){const _0x376b65=a309_0x1989,_0x206381=[];let _0x54df28=0x0,_0x1d3542=0x0;for(let _0x2d080c=0x0;_0x2d080c<_0x3ea346['length'];_0x2d080c+=0x1){const _0x4ce633=_0x3ea346[_0x2d080c];if(_0x4ce633==='(')_0x54df28+=0x1;if(_0x4ce633===')')_0x54df28=Math[_0x376b65(0xfd)](0x0,_0x54df28-0x1);_0x54df28===0x0&&_0x3ea346[_0x376b65(0xe8)](_0x2d080c)[_0x376b65(0xea)](/^AND\b/i)&&(_0x2d080c===0x0||/\s/[_0x376b65(0xbd)](_0x3ea346[_0x2d080c-0x1]??''))&&(_0x206381[_0x376b65(0xe5)](_0x3ea346[_0x376b65(0xe8)](_0x1d3542,_0x2d080c)[_0x376b65(0xcb)]()),_0x2d080c+=0x2,_0x1d3542=_0x2d080c+0x1);}const _0x37f610=_0x3ea346[_0x376b65(0xe8)](_0x1d3542)[_0x376b65(0xcb)]();if(_0x37f610)_0x206381[_0x376b65(0xe5)](_0x37f610);return _0x206381;}function hasTopLevelKeyword(_0x296a74,_0x1ea43c){const _0x31a7ef=a309_0x1989;let _0x2f7cf3=0x0;for(let _0x23b453=0x0;_0x23b453<_0x296a74[_0x31a7ef(0xe3)];_0x23b453+=0x1){const _0x419579=_0x296a74[_0x23b453];if(_0x419579==='(')_0x2f7cf3+=0x1;if(_0x419579===')')_0x2f7cf3=Math[_0x31a7ef(0xfd)](0x0,_0x2f7cf3-0x1);if(_0x2f7cf3!==0x0)continue;const _0x43d142=_0x296a74[_0x31a7ef(0xe8)](_0x23b453,_0x23b453+_0x1ea43c[_0x31a7ef(0xe3)]),_0x4c3176=_0x296a74[_0x23b453-0x1]??'\x20',_0x202ebf=_0x296a74[_0x23b453+_0x1ea43c[_0x31a7ef(0xe3)]]??'\x20';if(_0x43d142[_0x31a7ef(0xd7)]()===_0x1ea43c['toUpperCase']()&&!/[\w$]/['test'](_0x4c3176)&&!/[\w$]/[_0x31a7ef(0xbd)](_0x202ebf))return!![];}return![];}function splitEquality(_0x5ef507){const _0x4c1c68=a309_0x1989,_0x3c0f5f=stripOuterParentheses(_0x5ef507);let _0x575267=0x0,_0x13b531;for(let _0xbf8b56=0x0;_0xbf8b56<_0x3c0f5f[_0x4c1c68(0xe3)];_0xbf8b56+=0x1){const _0x115448=_0x3c0f5f[_0xbf8b56];if(_0x115448==='(')_0x575267+=0x1;if(_0x115448===')')_0x575267=Math[_0x4c1c68(0xfd)](0x0,_0x575267-0x1);const _0x4748e5=_0x3c0f5f[_0xbf8b56-0x1]??'',_0x46755d=_0x3c0f5f[_0xbf8b56+0x1]??'';if(_0x115448==='='&&_0x575267===0x0&&!/[!<>=:]/[_0x4c1c68(0xbd)](_0x4748e5)&&_0x46755d!=='='){if(_0x13b531!==undefined)return null;_0x13b531=_0xbf8b56;}}return _0x13b531===undefined?null:[_0x3c0f5f[_0x4c1c68(0xe8)](0x0,_0x13b531)['trim'](),_0x3c0f5f[_0x4c1c68(0xe8)](_0x13b531+0x1)[_0x4c1c68(0xcb)]()];}function parseDirectColumnReference(_0x27d0a9,_0x127cdf){const _0x43b401=a309_0x1989,_0x497650=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x43b401(0xdd)](stripOuterParentheses(_0x27d0a9));if(!_0x497650)return null;if(normalizeIdentifier(_0x497650[0x1]??'')!==normalizeIdentifier(_0x127cdf))return null;return normalizeIdentifier(_0x497650[0x2]??'');}function containsColumnReference(_0x623fc8,_0x2e2e35){const _0x3c0dff=a309_0x1989,_0x1adc5e=_0x623fc8[_0x3c0dff(0xd5)](/[`"]/g,''),_0x18bda1=_0x2e2e35[_0x3c0dff(0xd5)](/[.*+?^${}()|[\]\\]/g,_0x3c0dff(0x101));return new RegExp(_0x3c0dff(0xf8)+_0x18bda1+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')['test'](_0x1adc5e);}function findEqualityPrefix(_0x57539a,_0x235c12){const _0x4e57fc=a309_0x1989,_0x1bf761=new Set(_0x235c12[_0x4e57fc(0xdc)](normalizeIdentifier)),_0x30c879=[];for(const _0x9bf847 of _0x57539a){if(!_0x1bf761[_0x4e57fc(0xfc)](normalizeIdentifier(_0x9bf847)))break;_0x30c879['push'](_0x9bf847);}return _0x30c879;}function resolveTableMetadata(_0x538715,_0x5c0ab9){const _0x5cc702=a309_0x1989,_0xa88217=normalizeIdentifier(_0x5c0ab9),_0x53e752=_0x538715[_0x5cc702(0xee)](_0x4068b5=>normalizeIdentifier(_0x4068b5[_0x5cc702(0xfe)])===_0xa88217);if(_0x53e752['length']===0x1)return _0x53e752[0x0];const _0x3c0aa7=_0xa88217[_0x5cc702(0xc5)]('.'),_0x47c2c4=_0xa88217[_0x5cc702(0xe0)]('.')['at'](-0x1),_0x1bd3a3=_0x538715['filter'](_0x5a58af=>{const _0x1d2d34=_0x5cc702,_0x3dc134=normalizeIdentifier(_0x5a58af[_0x1d2d34(0xfe)]);if(_0x3c0aa7&&_0x3dc134[_0x1d2d34(0xc5)]('.'))return![];return _0x3dc134['split']('.')['at'](-0x1)===_0x47c2c4;});return _0x1bd3a3['length']===0x1?_0x1bd3a3[0x0]:undefined;}function columnNamesMatch(_0x524ee5,_0x5a0c24){return normalizeIdentifier(_0x524ee5)===normalizeIdentifier(_0x5a0c24);}function normalizeIdentifier(_0x11efe3){const _0x37cb68=a309_0x1989;return _0x11efe3['replace'](/[`"]/g,'')[_0x37cb68(0xcb)]()['toLowerCase']();}function a309_0x340f(){const _0x58edbc=['unsupportedPredicate','trim','indexOf','replaceAll','3199fQCKJV','12RfgRlk','JOIN_INDEX_MISSING','JOIN_INDEX_NOT_USABLE','matchAll','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','endsWith','replace','22495jIuhOD','toUpperCase','where','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','using','from','map','exec','unsupportedReason','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','split','84198cpyvkL','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','length','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','push','warning','join','slice','full','match','cross','containsUnresolvedInclude','index','filter','INNER','2457738FACurf','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','matchedPrefix','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','search','add','indexes','min','(?:^|[^\x5cw$])','right','85jNwMaV','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','has','max','tableName','left','34FEljJV','\x5c$&','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','500280ioZnbk','__sq__','unavailable','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','some','unknown','612bUGzbq','test','inner','352FgtxHI','columns','position','93577xdgfLM','error','reduce','includes','table','sql','alias','14168PUCzGW'];a309_0x340f=function(){return _0x58edbc;};return a309_0x340f();}function isSqlClauseKeyword(_0xee3253){const _0x2352aa=a309_0x1989;return new Set(['on',_0x2352aa(0xda),_0x2352aa(0xd8),'join',_0x2352aa(0xbe),_0x2352aa(0xff),_0x2352aa(0xf9),'full',_0x2352aa(0xeb),'natural'])[_0x2352aa(0xfc)](_0xee3253);}function stripOuterParentheses(_0x49233d){const _0x118914=a309_0x1989;let _0x3984db=_0x49233d[_0x118914(0xcb)]();while(_0x3984db['startsWith']('(')&&_0x3984db[_0x118914(0xd4)](')')){let _0x42a43f=0x0,_0x290396=!![];for(let _0x3c15b6=0x0;_0x3c15b6<_0x3984db[_0x118914(0xe3)];_0x3c15b6+=0x1){if(_0x3984db[_0x3c15b6]==='(')_0x42a43f+=0x1;if(_0x3984db[_0x3c15b6]===')')_0x42a43f-=0x1;if(_0x42a43f===0x0&&_0x3c15b6<_0x3984db[_0x118914(0xe3)]-0x1){_0x290396=![];break;}}if(!_0x290396||_0x42a43f!==0x0)break;_0x3984db=_0x3984db['slice'](0x1,-0x1)[_0x118914(0xcb)]();}return _0x3984db;}
@@ -1 +1 @@
1
- const a309_0x151127=a309_0x59e6;(function(_0x11ce11,_0x3ce6f6){const _0x481414=a309_0x59e6,_0x44d8e1=_0x11ce11();while(!![]){try{const _0x4c1109=-parseInt(_0x481414(0x113))/0x1*(parseInt(_0x481414(0x110))/0x2)+parseInt(_0x481414(0x118))/0x3*(parseInt(_0x481414(0x115))/0x4)+-parseInt(_0x481414(0x10f))/0x5*(parseInt(_0x481414(0x111))/0x6)+parseInt(_0x481414(0x10e))/0x7*(parseInt(_0x481414(0x10c))/0x8)+-parseInt(_0x481414(0x117))/0x9*(-parseInt(_0x481414(0x109))/0xa)+parseInt(_0x481414(0x10a))/0xb*(parseInt(_0x481414(0x11a))/0xc)+-parseInt(_0x481414(0x116))/0xd;if(_0x4c1109===_0x3ce6f6)break;else _0x44d8e1['push'](_0x44d8e1['shift']());}catch(_0x19117){_0x44d8e1['push'](_0x44d8e1['shift']());}}}(a309_0x24b1,0x86132));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a309_0x151127(0x10d),LOCK_FILE_NAME=a309_0x151127(0x114),TRASH_DIR_NAME=a309_0x151127(0x119);function a309_0x59e6(_0x2fe0d6,_0x4e7c20){_0x2fe0d6=_0x2fe0d6-0x109;const _0x24b1a9=a309_0x24b1();let _0x59e6de=_0x24b1a9[_0x2fe0d6];return _0x59e6de;}export function loadSqlProjectConfig(_0x2e2eee,_0x64a0c2){const _0x50cef1=a309_0x151127,_0x1584eb=resolve(_0x64a0c2??findProjectRootDirectory()),_0x13b830=DOT_DIR+_0x50cef1(0x112),_0x234a4c=_0x13b830+'/'+_0x2e2eee;return{'projectRoot':_0x1584eb,'appCode':_0x2e2eee,'sqlWorkspaceRoot':_0x13b830,'sqlRoot':_0x234a4c,'sqlRootDir':resolve(_0x1584eb,DOT_DIR,_0x50cef1(0x10b),_0x2e2eee),'lockFilePath':resolve(_0x1584eb,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x1584eb,DOT_DIR,TRASH_DIR_NAME)};}function a309_0x24b1(){const _0x44c4cd=['6418sGdtnr','924ghMBeF','/sql','9sDYVRc','sql.lock.json','12vjDrJz','13637000bUERoZ','558rEwSea','801897JIoSvF','sql-trash','216180TnZnMo','102730DiHHxg','176nvnDcp','sql','1402984UnvkiU','.rabetbase','14Morqfp','14635LEZEDg'];a309_0x24b1=function(){return _0x44c4cd;};return a309_0x24b1();}
1
+ const a310_0x1fb705=a310_0x2ac8;(function(_0x258057,_0x1e39ae){const _0x31dc8a=a310_0x2ac8,_0x2e9f71=_0x258057();while(!![]){try{const _0x380cfe=-parseInt(_0x31dc8a(0xb1))/0x1+parseInt(_0x31dc8a(0xa9))/0x2+parseInt(_0x31dc8a(0xab))/0x3+-parseInt(_0x31dc8a(0xae))/0x4*(-parseInt(_0x31dc8a(0xb3))/0x5)+-parseInt(_0x31dc8a(0xad))/0x6+parseInt(_0x31dc8a(0xb6))/0x7+-parseInt(_0x31dc8a(0xaa))/0x8*(parseInt(_0x31dc8a(0xb4))/0x9);if(_0x380cfe===_0x1e39ae)break;else _0x2e9f71['push'](_0x2e9f71['shift']());}catch(_0x3ef274){_0x2e9f71['push'](_0x2e9f71['shift']());}}}(a310_0x4b94,0xe2725));function a310_0x2ac8(_0x3f2539,_0x11b1f8){_0x3f2539=_0x3f2539-0xa9;const _0x4b94ab=a310_0x4b94();let _0x2ac879=_0x4b94ab[_0x3f2539];return _0x2ac879;}import{resolve}from'node:path';function a310_0x4b94(){const _0x29a41=['sql.lock.json','332508BgdsqQ','sql','3505qOesrH','27sUQrzB','sql-trash','1653232FTBxKu','3133544SOdJNt','6951544PnBaCV','4114215FcYhWw','/sql','4900464jgrERC','8612EpZZNR','.rabetbase'];a310_0x4b94=function(){return _0x29a41;};return a310_0x4b94();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a310_0x1fb705(0xaf),LOCK_FILE_NAME=a310_0x1fb705(0xb0),TRASH_DIR_NAME=a310_0x1fb705(0xb5);export function loadSqlProjectConfig(_0xf08895,_0x40e4b7){const _0x2f30ba=a310_0x1fb705,_0x2a8e2b=resolve(_0x40e4b7??findProjectRootDirectory()),_0x2e0f15=DOT_DIR+_0x2f30ba(0xac),_0x1aed40=_0x2e0f15+'/'+_0xf08895;return{'projectRoot':_0x2a8e2b,'appCode':_0xf08895,'sqlWorkspaceRoot':_0x2e0f15,'sqlRoot':_0x1aed40,'sqlRootDir':resolve(_0x2a8e2b,DOT_DIR,_0x2f30ba(0xb2),_0xf08895),'lockFilePath':resolve(_0x2a8e2b,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2a8e2b,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- (function(_0x58b5a9,_0x1a39e7){const _0x614bec=a310_0x5bb5,_0x25d3c9=_0x58b5a9();while(!![]){try{const _0x351616=parseInt(_0x614bec(0x131))/0x1+-parseInt(_0x614bec(0x13f))/0x2+parseInt(_0x614bec(0x128))/0x3*(parseInt(_0x614bec(0x130))/0x4)+parseInt(_0x614bec(0x141))/0x5+-parseInt(_0x614bec(0x126))/0x6+parseInt(_0x614bec(0x127))/0x7*(parseInt(_0x614bec(0x136))/0x8)+-parseInt(_0x614bec(0x13a))/0x9;if(_0x351616===_0x1a39e7)break;else _0x25d3c9['push'](_0x25d3c9['shift']());}catch(_0x44ee6b){_0x25d3c9['push'](_0x25d3c9['shift']());}}}(a310_0x1e74,0x4e686));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x1a6e71){const _0x48c5c4=a310_0x5bb5;if(_0x1a6e71===_0x48c5c4(0x140))return _0x48c5c4(0x12e);if(_0x1a6e71===_0x48c5c4(0x142))return _0x48c5c4(0x12b);return undefined;}async function scanSqlFilesRecursively(_0x45acd7,_0x1e3d5c){const _0x2f9433=a310_0x5bb5,_0x34e2de=[];try{const _0x37049f=await readdir(_0x45acd7,{'withFileTypes':!![]});for(const _0x373f56 of _0x37049f){const _0x244130=join(_0x45acd7,_0x373f56['name']);if(_0x373f56[_0x2f9433(0x13e)]()){_0x34e2de[_0x2f9433(0x13c)](...await scanSqlFilesRecursively(_0x244130,_0x1e3d5c));continue;}if(!_0x373f56[_0x2f9433(0x12f)]())continue;const _0x520156=extname(_0x373f56[_0x2f9433(0x133)])[_0x2f9433(0x138)](),_0x2ebde2=extensionToMode(_0x520156);if(!_0x2ebde2)continue;const _0x2ebb50=relative(_0x1e3d5c,_0x244130)['replace'](/\\/g,'/'),_0x5893e4=_0x2ebb50['split']('/')[_0x2f9433(0x12c)](Boolean),_0x2b665a=parseSqlPath(_0x5893e4,_0x373f56[_0x2f9433(0x133)],_0x520156);if(!_0x2b665a)continue;_0x34e2de[_0x2f9433(0x13c)]({'sqlCode':_0x2b665a[_0x2f9433(0x12a)],'sqlName':_0x2b665a['sqlName'],'dbDirectory':_0x5893e4[0x0],'filePath':_0x244130,'relativePath':_0x2ebb50,'lockKey':_0x2b665a[_0x2f9433(0x12a)],'mode':_0x2ebde2});}}catch(_0x4afe00){if(_0x4afe00[_0x2f9433(0x135)]!==_0x2f9433(0x137))throw _0x4afe00;}return _0x34e2de;}function a310_0x1e74(){const _0x270095=['sql','isFile','1663796yjqTkw','523901OlUIzh','path','name','indexOf','code','112QaZNNd','ENOENT','toLowerCase','mode','4305753gTgfER','test','push','slice','isDirectory','1119724sMTSdp','.sql','1595150mwgZlT','.xml','sqlRootDir','997866MQDSoi','133434aJIHfn','3QTJaQJ','dbName','sqlCode','mybatisXml','filter','length'];a310_0x1e74=function(){return _0x270095;};return a310_0x1e74();}export async function scanLocalSqlQueries(_0x2b59ad){const _0x25b326=a310_0x5bb5;return scanSqlFilesRecursively(_0x2b59ad[_0x25b326(0x125)],_0x2b59ad[_0x25b326(0x125)]);}function a310_0x5bb5(_0x219c4b,_0x48c8b6){_0x219c4b=_0x219c4b-0x125;const _0x1e744b=a310_0x1e74();let _0x5bb5c6=_0x1e744b[_0x219c4b];return _0x5bb5c6;}export function resolveLocalSqlFilePath(_0x4c566d,_0x3c30c5,_0x572af1){const _0x2565cd=a310_0x5bb5,_0x3d3490=_0x572af1?.[_0x2565cd(0x132)]||(_0x572af1?.['sqlName']||_0x572af1?.[_0x2565cd(0x129)]?buildSqlRelativePath(_0x3c30c5,_0x572af1?.['sqlName'],_0x572af1?.[_0x2565cd(0x129)],_0x572af1?.[_0x2565cd(0x139)]||_0x2565cd(0x12e),_0x572af1?.['dbId']):buildDefaultSqlFileName(_0x3c30c5,_0x572af1?.[_0x2565cd(0x139)]||_0x2565cd(0x12e)));return join(_0x4c566d[_0x2565cd(0x125)],_0x3d3490);}export async function directoryExists(_0x297212){try{const _0x5cbd05=await stat(_0x297212);return _0x5cbd05['isDirectory']();}catch{return![];}}function parseSqlPath(_0x99a94d,_0xed53cf,_0x427530){const _0x45cb59=a310_0x5bb5,_0x4b6670=_0xed53cf[_0x45cb59(0x13d)](0x0,-_0x427530[_0x45cb59(0x12d)]);if(_0x99a94d[_0x45cb59(0x12d)]<0x2)return null;const _0x4a18da=_0x4b6670[_0x45cb59(0x134)]('_');if(_0x4a18da<=0x0||_0x4a18da>=_0x4b6670['length']-0x1)return null;const _0x383690=_0x4b6670[_0x45cb59(0x13d)](0x0,_0x4a18da);if(!isLikelySqlCode(_0x383690))return null;return{'sqlCode':_0x383690,'sqlName':_0x4b6670[_0x45cb59(0x13d)](_0x4a18da+0x1)};}function isLikelySqlCode(_0x4d79e9){const _0x131625=a310_0x5bb5;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x131625(0x13b)](_0x4d79e9);}
1
+ (function(_0x59144d,_0x47f719){const _0x167f38=a311_0x9813,_0x34ce40=_0x59144d();while(!![]){try{const _0x5aeb57=-parseInt(_0x167f38(0x15d))/0x1*(parseInt(_0x167f38(0x157))/0x2)+parseInt(_0x167f38(0x172))/0x3+parseInt(_0x167f38(0x158))/0x4+parseInt(_0x167f38(0x161))/0x5+parseInt(_0x167f38(0x176))/0x6+-parseInt(_0x167f38(0x16d))/0x7*(-parseInt(_0x167f38(0x15c))/0x8)+-parseInt(_0x167f38(0x16f))/0x9;if(_0x5aeb57===_0x47f719)break;else _0x34ce40['push'](_0x34ce40['shift']());}catch(_0x3c8b5b){_0x34ce40['push'](_0x34ce40['shift']());}}}(a311_0x299f,0xd0fca));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a311_0x299f(){const _0x4dbd84=['5088800ZRcrit','split','sqlName','indexOf','10872obEBgb','1dPIhiq','code','.sql','sqlCode','1063540oEhEzA','dbId','slice','length','replace','push','sqlRootDir','path','sql','filter','dbName','test','1092ApkYMl','toLowerCase','15911559WUtbgL','isDirectory','name','4340121lTGoJu','ENOENT','.xml','mode','3142950zAWtht','2086966SjQwAS'];a311_0x299f=function(){return _0x4dbd84;};return a311_0x299f();}function a311_0x9813(_0x14869f,_0x2b5e10){_0x14869f=_0x14869f-0x157;const _0x299f00=a311_0x299f();let _0x98133f=_0x299f00[_0x14869f];return _0x98133f;}function extensionToMode(_0x583afd){const _0x123091=a311_0x9813;if(_0x583afd===_0x123091(0x15f))return _0x123091(0x169);if(_0x583afd===_0x123091(0x174))return'mybatisXml';return undefined;}async function scanSqlFilesRecursively(_0x418a06,_0x33608b){const _0x29fc6b=a311_0x9813,_0x332256=[];try{const _0xfd6428=await readdir(_0x418a06,{'withFileTypes':!![]});for(const _0x570cad of _0xfd6428){const _0x33575c=join(_0x418a06,_0x570cad[_0x29fc6b(0x171)]);if(_0x570cad[_0x29fc6b(0x170)]()){_0x332256[_0x29fc6b(0x166)](...await scanSqlFilesRecursively(_0x33575c,_0x33608b));continue;}if(!_0x570cad['isFile']())continue;const _0x10a751=extname(_0x570cad[_0x29fc6b(0x171)])[_0x29fc6b(0x16e)](),_0x3174c4=extensionToMode(_0x10a751);if(!_0x3174c4)continue;const _0x158ace=relative(_0x33608b,_0x33575c)[_0x29fc6b(0x165)](/\\/g,'/'),_0x2e237b=_0x158ace[_0x29fc6b(0x159)]('/')[_0x29fc6b(0x16a)](Boolean),_0x54ed75=parseSqlPath(_0x2e237b,_0x570cad[_0x29fc6b(0x171)],_0x10a751);if(!_0x54ed75)continue;_0x332256['push']({'sqlCode':_0x54ed75[_0x29fc6b(0x160)],'sqlName':_0x54ed75[_0x29fc6b(0x15a)],'dbDirectory':_0x2e237b[0x0],'filePath':_0x33575c,'relativePath':_0x158ace,'lockKey':_0x54ed75['sqlCode'],'mode':_0x3174c4});}}catch(_0x20df9e){if(_0x20df9e[_0x29fc6b(0x15e)]!==_0x29fc6b(0x173))throw _0x20df9e;}return _0x332256;}export async function scanLocalSqlQueries(_0x85fed3){const _0x448f70=a311_0x9813;return scanSqlFilesRecursively(_0x85fed3['sqlRootDir'],_0x85fed3[_0x448f70(0x167)]);}export function resolveLocalSqlFilePath(_0x1ecbd4,_0x1c5a01,_0xf30a66){const _0x39a977=a311_0x9813,_0x325c51=_0xf30a66?.[_0x39a977(0x168)]||(_0xf30a66?.[_0x39a977(0x15a)]||_0xf30a66?.['dbName']?buildSqlRelativePath(_0x1c5a01,_0xf30a66?.[_0x39a977(0x15a)],_0xf30a66?.[_0x39a977(0x16b)],_0xf30a66?.[_0x39a977(0x175)]||_0x39a977(0x169),_0xf30a66?.[_0x39a977(0x162)]):buildDefaultSqlFileName(_0x1c5a01,_0xf30a66?.[_0x39a977(0x175)]||_0x39a977(0x169)));return join(_0x1ecbd4[_0x39a977(0x167)],_0x325c51);}export async function directoryExists(_0x475cee){try{const _0x4cd0e2=await stat(_0x475cee);return _0x4cd0e2['isDirectory']();}catch{return![];}}function parseSqlPath(_0x33aa18,_0x4ff311,_0x56d3aa){const _0xff4685=a311_0x9813,_0x495c3c=_0x4ff311['slice'](0x0,-_0x56d3aa['length']);if(_0x33aa18[_0xff4685(0x164)]<0x2)return null;const _0x47ee4a=_0x495c3c[_0xff4685(0x15b)]('_');if(_0x47ee4a<=0x0||_0x47ee4a>=_0x495c3c[_0xff4685(0x164)]-0x1)return null;const _0x2d6560=_0x495c3c[_0xff4685(0x163)](0x0,_0x47ee4a);if(!isLikelySqlCode(_0x2d6560))return null;return{'sqlCode':_0x2d6560,'sqlName':_0x495c3c['slice'](_0x47ee4a+0x1)};}function isLikelySqlCode(_0x2a6a3b){const _0x440360=a311_0x9813;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x440360(0x16c)](_0x2a6a3b);}
@@ -1 +1 @@
1
- (function(_0x211662,_0x45f5c1){const _0x3834fc=a311_0x3320,_0x573140=_0x211662();while(!![]){try{const _0x3adb74=parseInt(_0x3834fc(0xb3))/0x1+-parseInt(_0x3834fc(0xae))/0x2*(-parseInt(_0x3834fc(0xb9))/0x3)+-parseInt(_0x3834fc(0xb4))/0x4*(parseInt(_0x3834fc(0xb0))/0x5)+-parseInt(_0x3834fc(0xba))/0x6+-parseInt(_0x3834fc(0xb7))/0x7*(-parseInt(_0x3834fc(0xb2))/0x8)+-parseInt(_0x3834fc(0xb8))/0x9+parseInt(_0x3834fc(0xb1))/0xa;if(_0x3adb74===_0x45f5c1)break;else _0x573140['push'](_0x573140['shift']());}catch(_0x5e39cc){_0x573140['push'](_0x573140['shift']());}}}(a311_0x378b,0x93c0a));import{readFile}from'node:fs/promises';function a311_0x378b(){const _0x461067=['213435CwtCjV','196SOkOyx','digest','md5','28ebNloa','1622826YfjTBi','454698ERcFzD','6758844sLuWlC','update','4IbkcHd','utf8','26065BRArWk','15087880dQZqAD','284128wyAPHK'];a311_0x378b=function(){return _0x461067;};return a311_0x378b();}function a311_0x3320(_0x5e4bac,_0xe74af5){_0x5e4bac=_0x5e4bac-0xad;const _0x378b2b=a311_0x378b();let _0x33204b=_0x378b2b[_0x5e4bac];return _0x33204b;}import a311_0x2d6f26 from'node:crypto';export function computeSqlContentHash(_0x5bcd13){const _0xff34dc=a311_0x3320;return a311_0x2d6f26['createHash'](_0xff34dc(0xb6))[_0xff34dc(0xad)](_0x5bcd13)[_0xff34dc(0xb5)]('hex');}export async function computeSqlFileHash(_0x460c25){const _0x2633b5=a311_0x3320,_0x2e732a=await readFile(_0x460c25,_0x2633b5(0xaf));return computeSqlContentHash(_0x2e732a);}
1
+ (function(_0x1542f2,_0x391c01){const _0x39bcd5=a312_0x4ae0,_0x67b7b9=_0x1542f2();while(!![]){try{const _0x4b3227=parseInt(_0x39bcd5(0x13c))/0x1+-parseInt(_0x39bcd5(0x13d))/0x2+parseInt(_0x39bcd5(0x13b))/0x3*(parseInt(_0x39bcd5(0x131))/0x4)+parseInt(_0x39bcd5(0x133))/0x5*(-parseInt(_0x39bcd5(0x137))/0x6)+-parseInt(_0x39bcd5(0x134))/0x7*(-parseInt(_0x39bcd5(0x132))/0x8)+-parseInt(_0x39bcd5(0x136))/0x9*(parseInt(_0x39bcd5(0x139))/0xa)+-parseInt(_0x39bcd5(0x135))/0xb;if(_0x4b3227===_0x391c01)break;else _0x67b7b9['push'](_0x67b7b9['shift']());}catch(_0x12e07b){_0x67b7b9['push'](_0x67b7b9['shift']());}}}(a312_0x464f,0x6a570));function a312_0x4ae0(_0x3e346c,_0x4f919e){_0x3e346c=_0x3e346c-0x130;const _0x464f33=a312_0x464f();let _0x4ae0fe=_0x464f33[_0x3e346c];return _0x4ae0fe;}import{readFile}from'node:fs/promises';import a312_0x2d977e from'node:crypto';function a312_0x464f(){const _0x35d961=['hex','10KYUtsM','digest','3xqkZMM','254121ChAhlk','224216ODXJuY','createHash','1465572HIWmqR','24hdxoCq','65GnnQte','1176847evvmIe','4132777uZMSfM','722421FPTGPd','55950Qlgiwp'];a312_0x464f=function(){return _0x35d961;};return a312_0x464f();}export function computeSqlContentHash(_0x191f07){const _0x386f0f=a312_0x4ae0;return a312_0x2d977e[_0x386f0f(0x130)]('md5')['update'](_0x191f07)[_0x386f0f(0x13a)](_0x386f0f(0x138));}export async function computeSqlFileHash(_0x4a8fce){const _0x580f6a=await readFile(_0x4a8fce,'utf8');return computeSqlContentHash(_0x580f6a);}
@@ -1 +1 @@
1
- (function(_0x23ade6,_0x5e7cdf){const _0x17fa47=a312_0x6023,_0x468b15=_0x23ade6();while(!![]){try{const _0x2a36dd=-parseInt(_0x17fa47(0x99))/0x1*(-parseInt(_0x17fa47(0x94))/0x2)+parseInt(_0x17fa47(0x96))/0x3+-parseInt(_0x17fa47(0x92))/0x4+parseInt(_0x17fa47(0x97))/0x5+parseInt(_0x17fa47(0x89))/0x6+-parseInt(_0x17fa47(0x93))/0x7*(parseInt(_0x17fa47(0x8d))/0x8)+parseInt(_0x17fa47(0x8e))/0x9*(-parseInt(_0x17fa47(0x9a))/0xa);if(_0x2a36dd===_0x5e7cdf)break;else _0x468b15['push'](_0x468b15['shift']());}catch(_0x32931e){_0x468b15['push'](_0x468b15['shift']());}}}(a312_0x2ef4,0xf0162));function a312_0x6023(_0x161958,_0x50a644){_0x161958=_0x161958-0x86;const _0x2ef496=a312_0x2ef4();let _0x60230f=_0x2ef496[_0x161958];return _0x60230f;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x93a99c,_0x148f7c,_0x189295,_0x42caf3){const _0x33257b=a312_0x6023,_0x230d11=_0x93a99c??createEmptySqlLock();let _0x5a507b=_0x230d11[_0x33257b(0x87)][_0x148f7c];if(!_0x5a507b)return _0x5a507b={'sqlRoot':_0x189295,'lastSync':'','sqls':{}},_0x230d11[_0x33257b(0x87)][_0x148f7c]=_0x5a507b,{'lockData':_0x230d11,'appLock':_0x5a507b};if(!_0x5a507b[_0x33257b(0x8c)])_0x5a507b['sqlRoot']=_0x189295;else{if(_0x5a507b[_0x33257b(0x8c)]!==_0x189295)throw new Error(_0x42caf3+_0x33257b(0x8a)+_0x189295+_0x33257b(0x95)+_0x5a507b[_0x33257b(0x8c)]+_0x33257b(0x98)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x5a507b[_0x33257b(0x8f)]&&(_0x5a507b[_0x33257b(0x8f)]={}),!_0x5a507b[_0x33257b(0x88)]&&(_0x5a507b[_0x33257b(0x88)]=''),{'lockData':_0x230d11,'appLock':_0x5a507b};}export async function readSqlLockFile(_0x361e9f){const _0x396116=a312_0x6023;try{const _0x2a6a04=await readFile(_0x361e9f,'utf8');return JSON['parse'](_0x2a6a04);}catch(_0x297768){if(_0x297768[_0x396116(0x9b)]===_0x396116(0x90))return null;throw new Error(_0x396116(0x91)+String(_0x297768));}}export async function writeSqlLockFile(_0x1b0013,_0x21003c){const _0x3deb87=a312_0x6023;await mkdir(dirname(_0x1b0013),{'recursive':!![]}),await writeFile(_0x1b0013,JSON[_0x3deb87(0x86)](_0x21003c,null,0x2),_0x3deb87(0x8b));}function a312_0x2ef4(){const _0x9621fb=['7110492LRYGhp',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','utf8','sqlRoot','8cNBzSc','288zxFOmE','sqls','ENOENT','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','5030916jeuuiO','10474037nDGkyj','2IqRYgl','\x22\x20vs\x20lock\x20\x22','3427179LlxpLO','1153995IDGGrA','\x22.\x20','1433572NvLRzK','79510kMcDvD','code','stringify','apps','lastSync'];a312_0x2ef4=function(){return _0x9621fb;};return a312_0x2ef4();}
1
+ function a313_0x55e7(_0x292186,_0x5d2a56){_0x292186=_0x292186-0xe4;const _0x217824=a313_0x2178();let _0x55e790=_0x217824[_0x292186];return _0x55e790;}(function(_0x20bae0,_0xf745e){const _0x224f70=a313_0x55e7,_0x21a02d=_0x20bae0();while(!![]){try{const _0x1afa12=-parseInt(_0x224f70(0xeb))/0x1*(-parseInt(_0x224f70(0xea))/0x2)+-parseInt(_0x224f70(0xed))/0x3+-parseInt(_0x224f70(0xef))/0x4+-parseInt(_0x224f70(0xe9))/0x5+-parseInt(_0x224f70(0xe8))/0x6+parseInt(_0x224f70(0xee))/0x7*(parseInt(_0x224f70(0xf5))/0x8)+parseInt(_0x224f70(0xe4))/0x9;if(_0x1afa12===_0xf745e)break;else _0x21a02d['push'](_0x21a02d['shift']());}catch(_0x4e113a){_0x21a02d['push'](_0x21a02d['shift']());}}}(a313_0x2178,0x31e2c));function a313_0x2178(){const _0x398b4a=['1272924NppnfH','sqls','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','utf8',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','\x22\x20vs\x20lock\x20\x22','50536LdvTSf','lastSync','stringify','7186491TsuSRn','apps','code','\x22.\x20','1529664HyTADF','372410ozUfyV','1126LuBDFA','239YfzEgk','sqlRoot','451662ppwCuD','77HhtQyB'];a313_0x2178=function(){return _0x398b4a;};return a313_0x2178();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x24f02f,_0x2a0eab,_0x120a0d,_0x1174e6){const _0x299155=a313_0x55e7,_0x45bd7e=_0x24f02f??createEmptySqlLock();let _0x12e366=_0x45bd7e[_0x299155(0xe5)][_0x2a0eab];if(!_0x12e366)return _0x12e366={'sqlRoot':_0x120a0d,'lastSync':'','sqls':{}},_0x45bd7e['apps'][_0x2a0eab]=_0x12e366,{'lockData':_0x45bd7e,'appLock':_0x12e366};if(!_0x12e366['sqlRoot'])_0x12e366[_0x299155(0xec)]=_0x120a0d;else{if(_0x12e366['sqlRoot']!==_0x120a0d)throw new Error(_0x1174e6+_0x299155(0xf3)+_0x120a0d+_0x299155(0xf4)+_0x12e366['sqlRoot']+_0x299155(0xe7)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x12e366[_0x299155(0xf0)]&&(_0x12e366['sqls']={}),!_0x12e366[_0x299155(0xf6)]&&(_0x12e366[_0x299155(0xf6)]=''),{'lockData':_0x45bd7e,'appLock':_0x12e366};}export async function readSqlLockFile(_0x268958){const _0x5079fd=a313_0x55e7;try{const _0xd2d4a2=await readFile(_0x268958,_0x5079fd(0xf2));return JSON['parse'](_0xd2d4a2);}catch(_0x4c0bf9){if(_0x4c0bf9[_0x5079fd(0xe6)]==='ENOENT')return null;throw new Error(_0x5079fd(0xf1)+String(_0x4c0bf9));}}export async function writeSqlLockFile(_0x4b5c4a,_0x4c6c4c){const _0x609480=a313_0x55e7;await mkdir(dirname(_0x4b5c4a),{'recursive':!![]}),await writeFile(_0x4b5c4a,JSON[_0x609480(0xf7)](_0x4c6c4c,null,0x2),_0x609480(0xf2));}
@@ -1 +1 @@
1
- (function(_0x45247d,_0x393a30){const _0x144ed2=a314_0x3e4d,_0x17f562=_0x45247d();while(!![]){try{const _0x492af8=parseInt(_0x144ed2(0x10a))/0x1+parseInt(_0x144ed2(0x114))/0x2+parseInt(_0x144ed2(0x10f))/0x3+parseInt(_0x144ed2(0x111))/0x4+-parseInt(_0x144ed2(0x109))/0x5+-parseInt(_0x144ed2(0x113))/0x6+-parseInt(_0x144ed2(0x10b))/0x7*(-parseInt(_0x144ed2(0x110))/0x8);if(_0x492af8===_0x393a30)break;else _0x17f562['push'](_0x17f562['shift']());}catch(_0x1f48e7){_0x17f562['push'](_0x17f562['shift']());}}}(a314_0x5247,0x56002));import{detectSqlSourceMode}from'../../core/sql-validator.js';function a314_0x5247(){const _0x1dbf7a=['2098564PIBxEM','.sql','3635664tlRtPj','605848yOKGFI','unknown-db','3135200vQDiYS','130432nbDdxQ','5789FXFurv','replace','trim','.xml','1601382ClQgbY','904YNdMmP'];a314_0x5247=function(){return _0x1dbf7a;};return a314_0x5247();}export function detectSqlMode(_0x2c6b4b){return detectSqlSourceMode(_0x2c6b4b);}export function getSqlFileExtension(_0x48528a){const _0x396405=a314_0x3e4d;return _0x48528a==='mybatisXml'?_0x396405(0x10e):_0x396405(0x112);}export function buildDefaultSqlFileName(_0x4c0d81,_0x2e1bd7){return''+_0x4c0d81+getSqlFileExtension(_0x2e1bd7);}export function sanitizeSqlPathSegment(_0xcac8b3,_0x527dd9){const _0x2a14c4=a314_0x3e4d,_0x2795d6=String(_0xcac8b3??'')[_0x2a14c4(0x10d)](),_0x52394c=_0x2795d6['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2a14c4(0x10c)](/\s+/g,'-')[_0x2a14c4(0x10c)](/-+/g,'-')['replace'](/^\.+/,'')[_0x2a14c4(0x10c)](/\.+$/,'')['replace'](/^-+/,'')['replace'](/-+$/,'');return _0x52394c||_0x527dd9;}export function buildDbDirectoryName(_0x59c45b,_0x54c3c7){const _0x166077=a314_0x3e4d;return sanitizeSqlPathSegment(_0x59c45b,_0x54c3c7!=null?'db-'+_0x54c3c7:_0x166077(0x108));}function a314_0x3e4d(_0x360886,_0xd45037){_0x360886=_0x360886-0x108;const _0x524720=a314_0x5247();let _0x3e4dfc=_0x524720[_0x360886];return _0x3e4dfc;}export function buildSqlRelativePath(_0x5d3544,_0x1b61ea,_0x397555,_0x33d9c5,_0x5c4afc){const _0x5b2a4b=buildDbDirectoryName(_0x397555,_0x5c4afc),_0x5871f8=sanitizeSqlPathSegment(_0x5d3544,'unknown-sql'),_0x1b42b7=sanitizeSqlPathSegment(_0x1b61ea,_0x5871f8);return _0x5b2a4b+'/'+_0x5871f8+'_'+_0x1b42b7+getSqlFileExtension(_0x33d9c5);}
1
+ (function(_0x2c761c,_0x2a1e1d){const _0x4d4c77=a315_0x3fc1,_0x47206e=_0x2c761c();while(!![]){try{const _0x1a7838=-parseInt(_0x4d4c77(0x191))/0x1*(parseInt(_0x4d4c77(0x18d))/0x2)+parseInt(_0x4d4c77(0x187))/0x3+parseInt(_0x4d4c77(0x192))/0x4*(-parseInt(_0x4d4c77(0x18e))/0x5)+-parseInt(_0x4d4c77(0x193))/0x6*(parseInt(_0x4d4c77(0x185))/0x7)+-parseInt(_0x4d4c77(0x18c))/0x8*(parseInt(_0x4d4c77(0x189))/0x9)+-parseInt(_0x4d4c77(0x18a))/0xa+-parseInt(_0x4d4c77(0x18f))/0xb*(-parseInt(_0x4d4c77(0x186))/0xc);if(_0x1a7838===_0x2a1e1d)break;else _0x47206e['push'](_0x47206e['shift']());}catch(_0x1a6018){_0x47206e['push'](_0x47206e['shift']());}}}(a315_0x555c,0x9464a));import{detectSqlSourceMode}from'../../core/sql-validator.js';function a315_0x3fc1(_0x1c4846,_0x26b513){_0x1c4846=_0x1c4846-0x184;const _0x555ca6=a315_0x555c();let _0x3fc14e=_0x555ca6[_0x1c4846];return _0x3fc14e;}function a315_0x555c(){const _0x4039dd=['4124155rxkkDa','84YYQhde','2853432esiBeN','.xml','85923sirvFK','9263710szpera','.sql','656EPkmiZ','2hYekdy','66490PZXPZq','4355098cDZOYj','unknown-db','54323BJPyfV','52GTLfOe','12KxRYOc','db-','replace'];a315_0x555c=function(){return _0x4039dd;};return a315_0x555c();}export function detectSqlMode(_0x3a5bf3){return detectSqlSourceMode(_0x3a5bf3);}export function getSqlFileExtension(_0x1ac094){const _0xd6fe98=a315_0x3fc1;return _0x1ac094==='mybatisXml'?_0xd6fe98(0x188):_0xd6fe98(0x18b);}export function buildDefaultSqlFileName(_0x4d8bdc,_0x11db63){return''+_0x4d8bdc+getSqlFileExtension(_0x11db63);}export function sanitizeSqlPathSegment(_0x45a21b,_0x568ebf){const _0x3b2221=a315_0x3fc1,_0x46488c=String(_0x45a21b??'')['trim'](),_0x1e625a=_0x46488c[_0x3b2221(0x184)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x3b2221(0x184)](/\s+/g,'-')[_0x3b2221(0x184)](/-+/g,'-')[_0x3b2221(0x184)](/^\.+/,'')['replace'](/\.+$/,'')['replace'](/^-+/,'')['replace'](/-+$/,'');return _0x1e625a||_0x568ebf;}export function buildDbDirectoryName(_0x5609ef,_0xd918cc){const _0x28d8d3=a315_0x3fc1;return sanitizeSqlPathSegment(_0x5609ef,_0xd918cc!=null?_0x28d8d3(0x194)+_0xd918cc:_0x28d8d3(0x190));}export function buildSqlRelativePath(_0x11af9a,_0x217b68,_0x2924d9,_0x3b1e2d,_0x5e0543){const _0x5728e1=buildDbDirectoryName(_0x2924d9,_0x5e0543),_0x44b010=sanitizeSqlPathSegment(_0x11af9a,'unknown-sql'),_0x5e4a9c=sanitizeSqlPathSegment(_0x217b68,_0x44b010);return _0x5728e1+'/'+_0x44b010+'_'+_0x5e4a9c+getSqlFileExtension(_0x3b1e2d);}
@@ -1 +1 @@
1
- const a315_0x5022f3=a315_0x5433;(function(_0xa6ce40,_0x397975){const _0x1e0447=a315_0x5433,_0x458a50=_0xa6ce40();while(!![]){try{const _0x44d010=parseInt(_0x1e0447(0x180))/0x1*(-parseInt(_0x1e0447(0x1dd))/0x2)+parseInt(_0x1e0447(0x1d6))/0x3+-parseInt(_0x1e0447(0x1ba))/0x4+-parseInt(_0x1e0447(0x1ac))/0x5+-parseInt(_0x1e0447(0x1b7))/0x6*(-parseInt(_0x1e0447(0x1dc))/0x7)+-parseInt(_0x1e0447(0x184))/0x8+parseInt(_0x1e0447(0x1ca))/0x9*(parseInt(_0x1e0447(0x1bb))/0xa);if(_0x44d010===_0x397975)break;else _0x458a50['push'](_0x458a50['shift']());}catch(_0x3030e7){_0x458a50['push'](_0x458a50['shift']());}}}(a315_0x49f2,0x941aa));const MYBATIS_OUTER_TAGS=new Map([[a315_0x5022f3(0x1c2),'SELECT'],[a315_0x5022f3(0x188),a315_0x5022f3(0x1b9)],['update',a315_0x5022f3(0x1d7)],[a315_0x5022f3(0x1bd),a315_0x5022f3(0x1a9)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a315_0x5022f3(0x1c0),a315_0x5022f3(0x1c9),a315_0x5022f3(0x19d),a315_0x5022f3(0x1bc),a315_0x5022f3(0x1d9),a315_0x5022f3(0x1d5),a315_0x5022f3(0x193),'bind',a315_0x5022f3(0x194),a315_0x5022f3(0x1bf)]),MYBATIS_BRANCH_TAGS=new Set(['if',a315_0x5022f3(0x1c9),a315_0x5022f3(0x19d),'when',a315_0x5022f3(0x1d9)]);export const MYBATIS_DYNAMIC_START_MARKER=a315_0x5022f3(0x1a3);export const MYBATIS_DYNAMIC_END_MARKER=a315_0x5022f3(0x1d1);export const MYBATIS_INCLUDE_MARKER=a315_0x5022f3(0x1af);const UNRESOLVED_SQL_FRAGMENT=a315_0x5022f3(0x1c1),MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS[a315_0x5022f3(0x1c4)]()][a315_0x5022f3(0x1ce)]('|')+a315_0x5022f3(0x1d0),'i');export function normalizeSqlForStaticAnalysis(_0x59ac91){const _0x1185ac=a315_0x5022f3,_0x340769=typeof _0x59ac91==='string'?_0x59ac91:'';if(detectSqlSourceMode(_0x340769)===_0x1185ac(0x1b4))return{'sql':_0x340769,'mode':_0x1185ac(0x1b4)};let _0x1b4aaf=0x0,_0xd6728b='',_0x1503d3,_0xf3f24e=![],_0x159feb=![];const _0x43240e=[];while(_0x1b4aaf<_0x340769[_0x1185ac(0x1c8)]){if(_0x340769[_0x1185ac(0x1a1)](_0x1185ac(0x199),_0x1b4aaf)){const _0x246704=_0x340769[_0x1185ac(0x1c6)](_0x1185ac(0x18e),_0x1b4aaf+0x4);if(_0x246704<0x0)return invalidMybatisSource('Unterminated\x20XML\x20comment.');_0xd6728b+='\x20',_0x1b4aaf=_0x246704+0x3;continue;}if(_0x340769['startsWith'](_0x1185ac(0x1be),_0x1b4aaf)){if(!_0xf3f24e||_0x159feb)return invalidMybatisSource(_0x1185ac(0x1ad));const _0x26b053=_0x340769[_0x1185ac(0x1c6)](_0x1185ac(0x1c7),_0x1b4aaf+0x9);if(_0x26b053<0x0)return invalidMybatisSource(_0x1185ac(0x1db));_0xd6728b+=_0x340769[_0x1185ac(0x1b1)](_0x1b4aaf+0x9,_0x26b053),_0x1b4aaf=_0x26b053+0x3;continue;}if(_0x340769[_0x1185ac(0x1a1)]('<?',_0x1b4aaf)){if(_0xf3f24e)return invalidMybatisSource(_0x1185ac(0x1a0));const _0x25ff3c=_0x340769[_0x1185ac(0x1c6)]('?>',_0x1b4aaf+0x2);if(_0x25ff3c<0x0)return invalidMybatisSource(_0x1185ac(0x19e));_0xd6728b+='\x20',_0x1b4aaf=_0x25ff3c+0x2;continue;}if(_0x340769[_0x1b4aaf]!=='<'){const _0x34f203=_0x340769[_0x1185ac(0x1c6)]('<',_0x1b4aaf),_0x449a83=_0x34f203<0x0?_0x340769[_0x1185ac(0x1c8)]:_0x34f203,_0x5843f0=_0x340769[_0x1185ac(0x1b1)](_0x1b4aaf,_0x449a83);if((!_0xf3f24e||_0x159feb)&&_0x5843f0[_0x1185ac(0x1d5)]())return invalidMybatisSource(_0x1185ac(0x19a));if(_0xf3f24e&&!_0x159feb){const _0x1524a8=decodeXmlEntities(_0x5843f0);if(_0x1524a8===null)return invalidMybatisSource(_0x1185ac(0x1cc));_0xd6728b+=_0x1524a8;}else _0xd6728b+='\x20';_0x1b4aaf=_0x449a83;continue;}const _0x56dc71=findXmlTagEnd(_0x340769,_0x1b4aaf);if(_0x56dc71<0x0)return invalidMybatisSource(_0x1185ac(0x17e));const _0x50dfb9=_0x340769[_0x1185ac(0x1b1)](_0x1b4aaf,_0x56dc71+0x1),_0x14da8b=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x1185ac(0x1ab)](_0x50dfb9);if(!_0x14da8b)return invalidMybatisSource(_0x1185ac(0x1b6));const _0x11b63a=_0x14da8b[0x1]==='/',_0x9c42c6=_0x14da8b[0x2]??'',_0x41e077=_0x9c42c6[_0x1185ac(0x18a)](),_0x48ba57=_0x14da8b[0x3]??'',_0x20ca2b=_0x14da8b[0x4]==='/',_0x33a0a8=MYBATIS_OUTER_TAGS[_0x1185ac(0x18f)](_0x41e077);if(!_0x33a0a8&&!MYBATIS_DYNAMIC_TAGS[_0x1185ac(0x185)](_0x41e077))return invalidMybatisSource(_0x1185ac(0x1d8)+_0x41e077+'>.');if(!_0x33a0a8&&_0x9c42c6!==_0x41e077)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x9c42c6+'>.');if(_0x11b63a){if(_0x48ba57[_0x1185ac(0x1d5)]()||_0x20ca2b)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x9c42c6+'>.');const _0x1eae17=_0x43240e['at'](-0x1);if(!_0x1eae17||(_0x1eae17['outer']?_0x1eae17[_0x1185ac(0x1ae)]!==_0x41e077:_0x1eae17['rawName']!==_0x9c42c6))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x9c42c6+'>.');_0x43240e[_0x1185ac(0x1cd)]();if(_0x1eae17[_0x1185ac(0x1b3)])_0x159feb=!![];_0xd6728b+=MYBATIS_BRANCH_TAGS[_0x1185ac(0x185)](_0x41e077)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x48ba57))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0x9c42c6+'>.');if(_0x41e077==='property'&&(!_0x20ca2b||_0x43240e['at'](-0x1)?.[_0x1185ac(0x1ae)]!==_0x1185ac(0x194)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x33a0a8){if(_0xf3f24e||_0x43240e[_0x1185ac(0x1c8)]>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0xf3f24e=!![],_0x159feb=_0x20ca2b,_0x1503d3=_0x33a0a8;}else{if(!_0xf3f24e||_0x159feb)return invalidMybatisSource(_0x1185ac(0x198)+_0x9c42c6+'>.');}_0xd6728b+=_0x41e077===_0x1185ac(0x1c0)?'\x20WHERE\x20':_0x41e077===_0x1185ac(0x193)?'\x20SET\x20':_0x41e077===_0x1185ac(0x194)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x1185ac(0x185)](_0x41e077)&&!_0x20ca2b?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x20ca2b&&_0x43240e[_0x1185ac(0x190)]({'rawName':_0x9c42c6,'tagName':_0x41e077,'outer':!!_0x33a0a8});}_0x1b4aaf=_0x56dc71+0x1;}if(_0x43240e[_0x1185ac(0x1c8)]>0x0)return invalidMybatisSource(_0x1185ac(0x1df)+_0x43240e['at'](-0x1)?.[_0x1185ac(0x1a6)]+'>.');if(!_0xf3f24e||!_0x159feb)return invalidMybatisSource(_0x1185ac(0x19b));return{'sql':_0xd6728b[_0x1185ac(0x1d5)](),'mode':_0x1185ac(0x1cb),..._0x1503d3?{'statementType':_0x1503d3}:{}};}function hasWellFormedXmlAttributes(_0x5eb592){const _0x1b99a6=a315_0x5022f3;let _0x489514=0x0;const _0x5b5e5c=new Set();while(_0x489514<_0x5eb592[_0x1b99a6(0x1c8)]){while(_0x489514<_0x5eb592['length']&&/\s/[_0x1b99a6(0x1c3)](_0x5eb592[_0x489514]??''))_0x489514+=0x1;if(_0x489514>=_0x5eb592[_0x1b99a6(0x1c8)])return!![];const _0x2ea708=/^[A-Za-z_:][\w:.-]*/[_0x1b99a6(0x1ab)](_0x5eb592[_0x1b99a6(0x1b1)](_0x489514)),_0x477ceb=_0x2ea708?.[0x0];if(!_0x477ceb||_0x5b5e5c[_0x1b99a6(0x185)](_0x477ceb))return![];_0x5b5e5c['add'](_0x477ceb),_0x489514+=_0x477ceb[_0x1b99a6(0x1c8)];while(_0x489514<_0x5eb592[_0x1b99a6(0x1c8)]&&/\s/[_0x1b99a6(0x1c3)](_0x5eb592[_0x489514]??''))_0x489514+=0x1;if(_0x5eb592[_0x489514]!=='=')return![];_0x489514+=0x1;while(_0x489514<_0x5eb592[_0x1b99a6(0x1c8)]&&/\s/['test'](_0x5eb592[_0x489514]??''))_0x489514+=0x1;const _0xc4eeba=_0x5eb592[_0x489514];if(_0xc4eeba!=='\x22'&&_0xc4eeba!=='\x27')return![];_0x489514+=0x1;const _0x38730e=_0x5eb592[_0x1b99a6(0x1c6)](_0xc4eeba,_0x489514);if(_0x38730e<0x0)return![];if(decodeXmlEntities(_0x5eb592['slice'](_0x489514,_0x38730e))===null)return![];_0x489514=_0x38730e+0x1;}return!![];}export function detectSqlSourceMode(_0x4908ab){const _0x3a7a24=a315_0x5022f3;let _0x8d7124=0x0;const _0x291353=()=>{const _0x5241d5=a315_0x5433;while(_0x8d7124<_0x4908ab[_0x5241d5(0x1c8)]&&/\s/[_0x5241d5(0x1c3)](_0x4908ab[_0x8d7124]??''))_0x8d7124+=0x1;};_0x291353();while(_0x8d7124<_0x4908ab[_0x3a7a24(0x1c8)]){if(_0x4908ab['startsWith'](_0x3a7a24(0x199),_0x8d7124)){const _0x1ca243=_0x4908ab[_0x3a7a24(0x1c6)](_0x3a7a24(0x18e),_0x8d7124+0x4);if(_0x1ca243<0x0)return'mybatisXml';_0x8d7124=_0x1ca243+0x3,_0x291353();continue;}if(_0x4908ab[_0x3a7a24(0x1a1)]('<?',_0x8d7124)){const _0x4cdddb=_0x4908ab[_0x3a7a24(0x1c6)]('?>',_0x8d7124+0x2);if(_0x4cdddb<0x0)return'mybatisXml';_0x8d7124=_0x4cdddb+0x2,_0x291353();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN['test'](_0x4908ab['slice'](_0x8d7124))?_0x3a7a24(0x1cb):_0x3a7a24(0x1b4);}function invalidMybatisSource(_0x15db8d){const _0x17da1e=a315_0x5022f3;return{'sql':'','mode':_0x17da1e(0x1cb),'error':_0x15db8d};}function findXmlTagEnd(_0x50a3c9,_0x4638a3){const _0x52bbc7=a315_0x5022f3;let _0x559d60;for(let _0x59c6cb=_0x4638a3+0x1;_0x59c6cb<_0x50a3c9[_0x52bbc7(0x1c8)];_0x59c6cb+=0x1){const _0x2d862a=_0x50a3c9[_0x59c6cb];if(_0x559d60){if(_0x2d862a===_0x559d60)_0x559d60=undefined;continue;}if(_0x2d862a==='\x22'||_0x2d862a==='\x27'){_0x559d60=_0x2d862a;continue;}if(_0x2d862a==='>')return _0x59c6cb;}return-0x1;}function decodeXmlEntities(_0x105747){const _0x157668=a315_0x5022f3;let _0xe3a374=![];const _0x201e2b=_0x105747[_0x157668(0x1a4)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0xa6f5c=>{const _0x225552=_0x157668;if(_0xa6f5c===_0x225552(0x18d))return'<';if(_0xa6f5c===_0x225552(0x189))return'>';if(_0xa6f5c===_0x225552(0x182))return'\x22';if(_0xa6f5c===_0x225552(0x186))return'\x27';if(_0xa6f5c===_0x225552(0x17c))return'&';const _0x197981=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0xa6f5c);if(_0x197981){const _0x346075=_0x197981[0x1],_0x3ace85=_0x197981[0x2],_0x397ead=Number[_0x225552(0x18b)](_0x346075??_0x3ace85??'',_0x346075?0x10:0xa);if(isValidXmlCharacter(_0x397ead))return String[_0x225552(0x197)](_0x397ead);}return _0xe3a374=!![],'';});return _0xe3a374?null:_0x201e2b;}function isValidXmlCharacter(_0x23b01b){return _0x23b01b===0x9||_0x23b01b===0xa||_0x23b01b===0xd||_0x23b01b>=0x20&&_0x23b01b<=0xd7ff||_0x23b01b>=0xe000&&_0x23b01b<=0xfffd||_0x23b01b>=0x10000&&_0x23b01b<=0x10ffff;}export function detectSqlType(_0x2bb0f7){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x2bb0f7));}function a315_0x49f2(){const _0x4aee4c=['exec','762830IcBVbh','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','tagName','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','reason','slice','UNKNOWN','outer','sql','DELETE\x20statements\x20require\x20explicit\x20review','Invalid\x20MyBatis\x20XML\x20tag.','42FnQkON','matchAll','INSERT','2896904jPFKwD','40wxEXgq','when','delete','<![CDATA[','property','where','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','select','test','keys','WITH','indexOf',']]>','length','foreach','4656978AiuQBp','mybatisXml','Invalid\x20XML\x20entity\x20reference.','pop','join','RECURSIVE',')\x5cb','__RABETBASE_MYBATIS_DYNAMIC_END__','isDangerous','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','KEY','trim','2258853rYKMee','UPDATE','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','otherwise','DDL\x20statements\x20require\x20explicit\x20review','Unterminated\x20CDATA\x20section.','368137PuygRF','110vFuHjv','statementType','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','add','&amp;','FOR','Unterminated\x20MyBatis\x20XML\x20tag.','MATERIALIZED','12671DZsMVu','Unable\x20to\x20detect\x20SQL\x20type.\x20','&quot;','SHARE','8084200lBVPAs','has','&apos;','error','insert','&gt;','toLowerCase','parseInt','toUpperCase','&lt;','-->','get','push','unknown\x20table(s)','\x20with\x20parameters:\x20','set','include','includes','match','fromCodePoint','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','<!--','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','SELECT','choose','Unterminated\x20XML\x20declaration.','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','startsWith','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','__RABETBASE_MYBATIS_DYNAMIC_START__','replace','SQL\x20content\x20is\x20empty','rawName','replaceAll','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','DELETE','type'];a315_0x49f2=function(){return _0x4aee4c;};return a315_0x49f2();}function detectNormalizedSqlType(_0x38b8d1){const _0x5658b3=a315_0x5022f3;if(_0x38b8d1[_0x5658b3(0x187)])return{'type':_0x5658b3(0x1b2),'isSelectOnly':![],'isDangerous':![],'reason':_0x38b8d1['error']};if(!_0x38b8d1[_0x5658b3(0x1b4)]['trim']())return{'type':_0x5658b3(0x1b2),'isSelectOnly':![],'isDangerous':![],'reason':_0x5658b3(0x1a5)};const _0x1971a4=tokenizeSqlForTypeAnalysis(_0x38b8d1[_0x5658b3(0x1b4)]),_0x453810=_0x1971a4['filter'](_0x5b5fe4=>_0x5b5fe4!==MYBATIS_DYNAMIC_START_MARKER&&_0x5b5fe4!==MYBATIS_DYNAMIC_END_MARKER),_0x5ca6da=findMainStatementIndex(_0x453810);if(_0x5ca6da<0x0)return{'type':_0x5658b3(0x1b2),'isSelectOnly':![],'isDangerous':![],'reason':_0x5658b3(0x1a2)};const _0x207466=_0x453810[_0x5ca6da]??'',_0x184828=_0x38b8d1[_0x5658b3(0x1de)]??_0x207466,_0x26e99e=_0x1971a4['some'](_0x1fb6bd=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x5658b3(0x1c3)](_0x1fb6bd)),_0x3e7d27=new Set();let _0x1b8342=![];for(let _0x204fa3=0x0;_0x204fa3<_0x1971a4[_0x5658b3(0x1c8)];_0x204fa3+=0x1){const _0xdec679=_0x1971a4[_0x204fa3];(_0xdec679===_0x5658b3(0x1d7)||_0xdec679===_0x5658b3(0x183))&&isLockingClauseKeyword(_0x1971a4,_0x204fa3)&&(_0x3e7d27[_0x5658b3(0x17b)](_0x204fa3),_0x1b8342=!![]);if(_0x1971a4[_0x5658b3(0x1b1)](_0x204fa3,_0x204fa3+0x4)[_0x5658b3(0x1ce)]('\x20')==='LOCK\x20IN\x20SHARE\x20MODE')_0x1b8342=!![];}if(_0x184828===_0x5658b3(0x19c)){const _0x2d1c8c=_0x1971a4['some']((_0x480e62,_0x1748b6)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x5658b3(0x1c3)](_0x480e62)&&!_0x3e7d27[_0x5658b3(0x185)](_0x1748b6));return{'type':_0x5658b3(0x19c),'isSelectOnly':!_0x2d1c8c&&!_0x1b8342,'isLockingRead':_0x1b8342,'isDangerous':_0x2d1c8c,'reason':_0x2d1c8c?_0x5658b3(0x19f):undefined};}if(_0x184828===_0x5658b3(0x1b9))return{'type':_0x5658b3(0x1b9),'isSelectOnly':![],'isDangerous':_0x26e99e,'reason':_0x26e99e?_0x5658b3(0x1d3):undefined};if(_0x184828==='UPDATE')return{'type':_0x5658b3(0x1d7),'isSelectOnly':![],'isDangerous':_0x26e99e,'reason':_0x26e99e?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x184828===_0x5658b3(0x1a9))return{'type':_0x5658b3(0x1a9),'isSelectOnly':![],'isDangerous':!![],'reason':_0x5658b3(0x1b5)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x207466))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':_0x5658b3(0x1da)};return{'type':_0x5658b3(0x1b2),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x599f68,_0x35097c){const _0x147380=a315_0x5022f3,_0x4cf2a8=_0x599f68[_0x35097c]===_0x147380(0x1d7)?[[_0x147380(0x17d)],[_0x147380(0x17d),'NO','KEY']]:[['FOR'],[_0x147380(0x17d),_0x147380(0x1d4)]],_0x2a8b12=_0x4cf2a8['some'](_0x5bbced=>{const _0x2bf177=_0x147380,_0x51d5e4=_0x35097c-_0x5bbced[_0x2bf177(0x1c8)];return _0x51d5e4>=0x0&&_0x599f68[_0x2bf177(0x1b1)](_0x51d5e4,_0x35097c)[_0x2bf177(0x1ce)]('\x20')===_0x5bbced[_0x2bf177(0x1ce)]('\x20');});if(!_0x2a8b12)return![];return!_0x599f68[_0x147380(0x1b1)](_0x35097c+0x1,_0x35097c+0x5)['includes']('SET');}function findMainStatementIndex(_0x170f32){const _0x38d978=a315_0x5022f3;if(_0x170f32[0x0]!==_0x38d978(0x1c5))return 0x0;let _0x56444e=_0x170f32[0x1]===_0x38d978(0x1cf)?0x2:0x1;while(_0x56444e<_0x170f32['length']){const _0x4c457f=_0x170f32[_0x56444e];if(!_0x4c457f||!(/^[A-Z_][\w$]*$/[_0x38d978(0x1c3)](_0x4c457f)||/^[`"]/['test'](_0x4c457f)))return-0x1;_0x56444e+=0x1;if(_0x170f32[_0x56444e]==='('){_0x56444e=skipSqlParentheses(_0x170f32,_0x56444e);if(_0x56444e<0x0)return-0x1;}if(_0x170f32[_0x56444e]!=='AS')return-0x1;_0x56444e+=0x1;if(_0x170f32[_0x56444e]==='NOT'&&_0x170f32[_0x56444e+0x1]===_0x38d978(0x17f))_0x56444e+=0x2;else{if(_0x170f32[_0x56444e]==='MATERIALIZED')_0x56444e+=0x1;}_0x56444e=skipSqlParentheses(_0x170f32,_0x56444e);if(_0x56444e<0x0)return-0x1;if(_0x170f32[_0x56444e]!==','){const _0x30f1a3=_0x170f32[_0x56444e]==='('?_0x56444e+0x1:_0x56444e;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x38d978(0x1c3)](_0x170f32[_0x30f1a3]??'')?_0x30f1a3:-0x1;}_0x56444e+=0x1;}return-0x1;}function a315_0x5433(_0x3f239d,_0x4043ca){_0x3f239d=_0x3f239d-0x17b;const _0x49f2c2=a315_0x49f2();let _0x5433ca=_0x49f2c2[_0x3f239d];return _0x5433ca;}function skipSqlParentheses(_0x225a6f,_0x5448d5){const _0x13e417=a315_0x5022f3;if(_0x225a6f[_0x5448d5]!=='(')return-0x1;let _0x4613ff=0x0;for(let _0x2735fd=_0x5448d5;_0x2735fd<_0x225a6f[_0x13e417(0x1c8)];_0x2735fd+=0x1){const _0x4a1bca=_0x225a6f[_0x2735fd];if(_0x4a1bca===';')return-0x1;if(_0x4a1bca==='(')_0x4613ff+=0x1;if(_0x4a1bca===')'&&--_0x4613ff===0x0)return _0x2735fd+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x111da6){const _0x39b176=a315_0x5022f3;return _0x111da6[_0x39b176(0x1a7)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x39b176(0x1a7)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x29c862){const _0x1cc1f1=a315_0x5022f3,_0x2f299c=[],_0x243676=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x298878 of _0x29c862[_0x1cc1f1(0x1b8)](_0x243676)){const _0x48eeb0=_0x298878[0x0];if(_0x48eeb0['startsWith']('/*')||_0x48eeb0[_0x1cc1f1(0x1a1)]('--')||_0x48eeb0[_0x1cc1f1(0x1a1)]('#')&&!_0x48eeb0[_0x1cc1f1(0x1a1)]('#{'))continue;_0x2f299c[_0x1cc1f1(0x190)](/^["`]/['test'](_0x48eeb0)?_0x48eeb0:/^[\x27@#$]/[_0x1cc1f1(0x1c3)](_0x48eeb0)?'?':_0x48eeb0[_0x1cc1f1(0x18c)]());}return _0x2f299c;}function extractTables(_0x23beb3,_0x5e2860){const _0x3e6034=a315_0x5022f3,_0x11ac21=_0x23beb3[_0x3e6034(0x1a4)](/#\{[^}]*\}/g,'?')[_0x3e6034(0x1a4)](/\$\{[^}]*\}/g,'?')['replace'](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')[_0x3e6034(0x1a4)](/\/\*[\s\S]*?\*\//g,''),_0x1737e8=[],_0x31d140=_0x11ac21[_0x3e6034(0x196)](/FROM\s+([^\s,)(]+)/i);addTable(_0x1737e8,_0x31d140?.[0x1]);for(const _0x30c52a of _0x11ac21[_0x3e6034(0x1b8)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x1737e8,_0x30c52a[0x1]);}const _0xed4176=_0x11ac21[_0x3e6034(0x196)](/INTO\s+([^\s(]+)/i);addTable(_0x1737e8,_0xed4176?.[0x1]);if(_0x5e2860===_0x3e6034(0x1d7)){const _0x1a5d11=_0x11ac21[_0x3e6034(0x196)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x1737e8,_0x1a5d11?.[0x1]);}return _0x1737e8;}function addTable(_0x54d66c,_0x280152){const _0x564de7=a315_0x5022f3,_0x1c30c9=_0x280152?.[_0x564de7(0x1a4)](/[`"]/g,'');_0x1c30c9&&_0x1c30c9!==UNRESOLVED_SQL_FRAGMENT&&!_0x54d66c[_0x564de7(0x195)](_0x1c30c9)&&_0x54d66c[_0x564de7(0x190)](_0x1c30c9);}function extractParameters(_0x35f684){const _0x1fca88=a315_0x5022f3,_0x46e284=new Set();for(const _0x317dc8 of _0x35f684[_0x1fca88(0x1b8)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x317dc8[0x1])_0x46e284[_0x1fca88(0x17b)](_0x317dc8[0x1]);}return Array['from'](_0x46e284);}export function validateSql(_0x5c6e6b){const _0x475fa1=a315_0x5022f3,_0x1eda8=normalizeSqlForStaticAnalysis(_0x5c6e6b),_0xf6f803=detectNormalizedSqlType(_0x1eda8),_0x4727c8=stripStaticAnalysisMarkers(_0x1eda8[_0x475fa1(0x1b4)]),_0x25c900=_0x1eda8[_0x475fa1(0x187)]?[]:extractTables(_0x4727c8,_0xf6f803[_0x475fa1(0x1aa)]),_0x24b08c=_0x1eda8[_0x475fa1(0x187)]?[]:extractParameters(_0x4727c8);if(_0xf6f803[_0x475fa1(0x1d2)])return{'valid':![],'sqlType':_0xf6f803,'tables':_0x25c900,'parameters':_0x24b08c,'message':_0xf6f803['reason']||_0xf6f803['type']+_0x475fa1(0x1a8)};if(_0xf6f803[_0x475fa1(0x1aa)]===_0x475fa1(0x1b2))return{'valid':![],'sqlType':_0xf6f803,'tables':_0x25c900,'parameters':_0x24b08c,'message':_0x1eda8[_0x475fa1(0x187)]?_0x475fa1(0x181)+_0x1eda8['error']:_0xf6f803['reason']?_0x475fa1(0x181)+_0xf6f803[_0x475fa1(0x1b0)]:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0xf6f803,'tables':_0x25c900,'parameters':_0x24b08c,'message':_0xf6f803['type']+'\x20query\x20targeting\x20'+(_0x25c900[_0x475fa1(0x1c8)]?_0x25c900[_0x475fa1(0x1ce)](',\x20'):_0x475fa1(0x191))+(_0x24b08c[_0x475fa1(0x1c8)]?_0x475fa1(0x192)+_0x24b08c[_0x475fa1(0x1ce)](',\x20'):'')};}
1
+ const a316_0x513f98=a316_0x2815;function a316_0xf91e(){const _0x461609=['MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','tagName','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','rawName','join','when','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','&gt;','unknown\x20table(s)','10QgMKrg','exec','7054qWrMNK','KEY','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','replaceAll','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','error','336261zcMcYS','Unable\x20to\x20detect\x20SQL\x20type.\x20','get','Unterminated\x20MyBatis\x20XML\x20tag.','Invalid\x20XML\x20entity\x20reference.','&amp;','<!--','delete','\x20SET\x20','4MBWnSI','\x20with\x20parameters:\x20','RECURSIVE','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','match','UNKNOWN','replace','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','3sVHOCw','pop','-->','type','has','push','\x20WHERE\x20','bind','isDangerous','startsWith','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','FOR','statementType','from','__RABETBASE_MYBATIS_DYNAMIC_START__','314945KSprBr',']]>','DELETE\x20statements\x20require\x20explicit\x20review','1094046EHgbhK','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','<![CDATA[','trim','1285417lAjxrW','reason','Unterminated\x20XML\x20comment.','&quot;','indexOf','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','DELETE','sql','add','SET','foreach','set','SELECT','choose','&apos;','slice','INSERT','DDL','otherwise','length','LOCK\x20IN\x20SHARE\x20MODE','matchAll','127176yRjsLh','test','includes','toLowerCase','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','where','include','UPDATE','mybatisXml','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','3829905bJLfGW','MATERIALIZED','Invalid\x20MyBatis\x20XML\x20tag.','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','outer','^<\x5cs*(?:','NOT','Unterminated\x20CDATA\x20section.'];a316_0xf91e=function(){return _0x461609;};return a316_0xf91e();}(function(_0x219ff0,_0xa245fc){const _0x508463=a316_0x2815,_0xcc7988=_0x219ff0();while(!![]){try{const _0x58c184=parseInt(_0x508463(0x19a))/0x1*(parseInt(_0x508463(0x181))/0x2)+-parseInt(_0x508463(0x187))/0x3*(-parseInt(_0x508463(0x190))/0x4)+-parseInt(_0x508463(0x145))/0x5+-parseInt(_0x508463(0x148))/0x6+-parseInt(_0x508463(0x14c))/0x7+-parseInt(_0x508463(0x163))/0x8+-parseInt(_0x508463(0x16e))/0x9*(-parseInt(_0x508463(0x17f))/0xa);if(_0x58c184===_0xa245fc)break;else _0xcc7988['push'](_0xcc7988['shift']());}catch(_0x164289){_0xcc7988['push'](_0xcc7988['shift']());}}}(a316_0xf91e,0x193bb));const MYBATIS_OUTER_TAGS=new Map([['select',a316_0x513f98(0x159)],['insert',a316_0x513f98(0x15d)],['update',a316_0x513f98(0x16b)],[a316_0x513f98(0x18e),a316_0x513f98(0x153)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a316_0x513f98(0x169),a316_0x513f98(0x157),a316_0x513f98(0x15a),a316_0x513f98(0x17b),a316_0x513f98(0x15f),a316_0x513f98(0x14b),a316_0x513f98(0x158),a316_0x513f98(0x1a1),a316_0x513f98(0x16a),'property']),MYBATIS_BRANCH_TAGS=new Set(['if',a316_0x513f98(0x157),a316_0x513f98(0x15a),a316_0x513f98(0x17b),a316_0x513f98(0x15f)]);export const MYBATIS_DYNAMIC_START_MARKER=a316_0x513f98(0x1a8);export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';export const MYBATIS_INCLUDE_MARKER=a316_0x513f98(0x1a4);const UNRESOLVED_SQL_FRAGMENT=a316_0x513f98(0x152),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a316_0x513f98(0x173)+[...MYBATIS_OUTER_TAGS['keys']()][a316_0x513f98(0x17a)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x518f34){const _0x3802ca=a316_0x513f98,_0x1dceda=typeof _0x518f34==='string'?_0x518f34:'';if(detectSqlSourceMode(_0x1dceda)==='sql')return{'sql':_0x1dceda,'mode':_0x3802ca(0x154)};let _0x589dba=0x0,_0x3f9a45='',_0x31be6e,_0x1994d9=![],_0x173fa3=![];const _0x3aab4a=[];while(_0x589dba<_0x1dceda['length']){if(_0x1dceda[_0x3802ca(0x1a3)]('<!--',_0x589dba)){const _0x25a3f4=_0x1dceda[_0x3802ca(0x150)](_0x3802ca(0x19c),_0x589dba+0x4);if(_0x25a3f4<0x0)return invalidMybatisSource(_0x3802ca(0x14e));_0x3f9a45+='\x20',_0x589dba=_0x25a3f4+0x3;continue;}if(_0x1dceda[_0x3802ca(0x1a3)](_0x3802ca(0x14a),_0x589dba)){if(!_0x1994d9||_0x173fa3)return invalidMybatisSource(_0x3802ca(0x183));const _0x4dfd3d=_0x1dceda[_0x3802ca(0x150)](_0x3802ca(0x146),_0x589dba+0x9);if(_0x4dfd3d<0x0)return invalidMybatisSource(_0x3802ca(0x175));_0x3f9a45+=_0x1dceda['slice'](_0x589dba+0x9,_0x4dfd3d),_0x589dba=_0x4dfd3d+0x3;continue;}if(_0x1dceda[_0x3802ca(0x1a3)]('<?',_0x589dba)){if(_0x1994d9)return invalidMybatisSource(_0x3802ca(0x151));const _0x4c9c92=_0x1dceda[_0x3802ca(0x150)]('?>',_0x589dba+0x2);if(_0x4c9c92<0x0)return invalidMybatisSource('Unterminated\x20XML\x20declaration.');_0x3f9a45+='\x20',_0x589dba=_0x4c9c92+0x2;continue;}if(_0x1dceda[_0x589dba]!=='<'){const _0x21ecb0=_0x1dceda[_0x3802ca(0x150)]('<',_0x589dba),_0x55c82a=_0x21ecb0<0x0?_0x1dceda['length']:_0x21ecb0,_0xca7f3c=_0x1dceda[_0x3802ca(0x15c)](_0x589dba,_0x55c82a);if((!_0x1994d9||_0x173fa3)&&_0xca7f3c[_0x3802ca(0x14b)]())return invalidMybatisSource(_0x3802ca(0x197));if(_0x1994d9&&!_0x173fa3){const _0xe44a3c=decodeXmlEntities(_0xca7f3c);if(_0xe44a3c===null)return invalidMybatisSource(_0x3802ca(0x18b));_0x3f9a45+=_0xe44a3c;}else _0x3f9a45+='\x20';_0x589dba=_0x55c82a;continue;}const _0x384350=findXmlTagEnd(_0x1dceda,_0x589dba);if(_0x384350<0x0)return invalidMybatisSource(_0x3802ca(0x18a));const _0x268b2c=_0x1dceda[_0x3802ca(0x15c)](_0x589dba,_0x384350+0x1),_0x1da608=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x3802ca(0x180)](_0x268b2c);if(!_0x1da608)return invalidMybatisSource(_0x3802ca(0x170));const _0x50c78c=_0x1da608[0x1]==='/',_0x30fbbb=_0x1da608[0x2]??'',_0x17f25b=_0x30fbbb[_0x3802ca(0x166)](),_0x837298=_0x1da608[0x3]??'',_0x64cdac=_0x1da608[0x4]==='/',_0x2cc7b4=MYBATIS_OUTER_TAGS[_0x3802ca(0x189)](_0x17f25b);if(!_0x2cc7b4&&!MYBATIS_DYNAMIC_TAGS[_0x3802ca(0x19e)](_0x17f25b))return invalidMybatisSource(_0x3802ca(0x185)+_0x17f25b+'>.');if(!_0x2cc7b4&&_0x30fbbb!==_0x17f25b)return invalidMybatisSource(_0x3802ca(0x176)+_0x30fbbb+'>.');if(_0x50c78c){if(_0x837298[_0x3802ca(0x14b)]()||_0x64cdac)return invalidMybatisSource(_0x3802ca(0x149)+_0x30fbbb+'>.');const _0x5a5b61=_0x3aab4a['at'](-0x1);if(!_0x5a5b61||(_0x5a5b61[_0x3802ca(0x172)]?_0x5a5b61[_0x3802ca(0x177)]!==_0x17f25b:_0x5a5b61[_0x3802ca(0x179)]!==_0x30fbbb))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x30fbbb+'>.');_0x3aab4a[_0x3802ca(0x19b)]();if(_0x5a5b61[_0x3802ca(0x172)])_0x173fa3=!![];_0x3f9a45+=MYBATIS_BRANCH_TAGS['has'](_0x17f25b)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x837298))return invalidMybatisSource(_0x3802ca(0x168)+_0x30fbbb+'>.');if(_0x17f25b==='property'&&(!_0x64cdac||_0x3aab4a['at'](-0x1)?.[_0x3802ca(0x177)]!==_0x3802ca(0x16a)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x2cc7b4){if(_0x1994d9||_0x3aab4a[_0x3802ca(0x160)]>0x0)return invalidMybatisSource(_0x3802ca(0x193));_0x1994d9=!![],_0x173fa3=_0x64cdac,_0x31be6e=_0x2cc7b4;}else{if(!_0x1994d9||_0x173fa3)return invalidMybatisSource(_0x3802ca(0x178)+_0x30fbbb+'>.');}_0x3f9a45+=_0x17f25b===_0x3802ca(0x169)?_0x3802ca(0x1a0):_0x17f25b===_0x3802ca(0x158)?_0x3802ca(0x18f):_0x17f25b==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x3802ca(0x19e)](_0x17f25b)&&!_0x64cdac?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x64cdac&&_0x3aab4a['push']({'rawName':_0x30fbbb,'tagName':_0x17f25b,'outer':!!_0x2cc7b4});}_0x589dba=_0x384350+0x1;}if(_0x3aab4a[_0x3802ca(0x160)]>0x0)return invalidMybatisSource(_0x3802ca(0x171)+_0x3aab4a['at'](-0x1)?.[_0x3802ca(0x179)]+'>.');if(!_0x1994d9||!_0x173fa3)return invalidMybatisSource(_0x3802ca(0x17c));return{'sql':_0x3f9a45[_0x3802ca(0x14b)](),'mode':'mybatisXml',..._0x31be6e?{'statementType':_0x31be6e}:{}};}function hasWellFormedXmlAttributes(_0x5f40ee){const _0x54dd51=a316_0x513f98;let _0x5f423f=0x0;const _0x1050d2=new Set();while(_0x5f423f<_0x5f40ee[_0x54dd51(0x160)]){while(_0x5f423f<_0x5f40ee[_0x54dd51(0x160)]&&/\s/[_0x54dd51(0x164)](_0x5f40ee[_0x5f423f]??''))_0x5f423f+=0x1;if(_0x5f423f>=_0x5f40ee['length'])return!![];const _0x20d414=/^[A-Za-z_:][\w:.-]*/[_0x54dd51(0x180)](_0x5f40ee[_0x54dd51(0x15c)](_0x5f423f)),_0x57a3c9=_0x20d414?.[0x0];if(!_0x57a3c9||_0x1050d2['has'](_0x57a3c9))return![];_0x1050d2[_0x54dd51(0x155)](_0x57a3c9),_0x5f423f+=_0x57a3c9[_0x54dd51(0x160)];while(_0x5f423f<_0x5f40ee['length']&&/\s/[_0x54dd51(0x164)](_0x5f40ee[_0x5f423f]??''))_0x5f423f+=0x1;if(_0x5f40ee[_0x5f423f]!=='=')return![];_0x5f423f+=0x1;while(_0x5f423f<_0x5f40ee[_0x54dd51(0x160)]&&/\s/[_0x54dd51(0x164)](_0x5f40ee[_0x5f423f]??''))_0x5f423f+=0x1;const _0x498f92=_0x5f40ee[_0x5f423f];if(_0x498f92!=='\x22'&&_0x498f92!=='\x27')return![];_0x5f423f+=0x1;const _0x552723=_0x5f40ee[_0x54dd51(0x150)](_0x498f92,_0x5f423f);if(_0x552723<0x0)return![];if(decodeXmlEntities(_0x5f40ee[_0x54dd51(0x15c)](_0x5f423f,_0x552723))===null)return![];_0x5f423f=_0x552723+0x1;}return!![];}export function detectSqlSourceMode(_0x5366ed){const _0x4b5f12=a316_0x513f98;let _0xcac94a=0x0;const _0x5c9cd5=()=>{const _0x4a93ba=a316_0x2815;while(_0xcac94a<_0x5366ed[_0x4a93ba(0x160)]&&/\s/['test'](_0x5366ed[_0xcac94a]??''))_0xcac94a+=0x1;};_0x5c9cd5();while(_0xcac94a<_0x5366ed[_0x4b5f12(0x160)]){if(_0x5366ed[_0x4b5f12(0x1a3)](_0x4b5f12(0x18d),_0xcac94a)){const _0x149592=_0x5366ed[_0x4b5f12(0x150)]('-->',_0xcac94a+0x4);if(_0x149592<0x0)return _0x4b5f12(0x16c);_0xcac94a=_0x149592+0x3,_0x5c9cd5();continue;}if(_0x5366ed[_0x4b5f12(0x1a3)]('<?',_0xcac94a)){const _0x2565af=_0x5366ed[_0x4b5f12(0x150)]('?>',_0xcac94a+0x2);if(_0x2565af<0x0)return _0x4b5f12(0x16c);_0xcac94a=_0x2565af+0x2,_0x5c9cd5();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN['test'](_0x5366ed['slice'](_0xcac94a))?_0x4b5f12(0x16c):_0x4b5f12(0x154);}function invalidMybatisSource(_0x20f2ba){const _0x1e20a4=a316_0x513f98;return{'sql':'','mode':_0x1e20a4(0x16c),'error':_0x20f2ba};}function findXmlTagEnd(_0xd34b79,_0xc27c98){const _0x3daf49=a316_0x513f98;let _0x51f9de;for(let _0x369a5f=_0xc27c98+0x1;_0x369a5f<_0xd34b79[_0x3daf49(0x160)];_0x369a5f+=0x1){const _0x2ae1a1=_0xd34b79[_0x369a5f];if(_0x51f9de){if(_0x2ae1a1===_0x51f9de)_0x51f9de=undefined;continue;}if(_0x2ae1a1==='\x22'||_0x2ae1a1==='\x27'){_0x51f9de=_0x2ae1a1;continue;}if(_0x2ae1a1==='>')return _0x369a5f;}return-0x1;}function decodeXmlEntities(_0x24be6a){const _0x43ac08=a316_0x513f98;let _0x78637a=![];const _0x1f1ad4=_0x24be6a[_0x43ac08(0x196)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x859caf=>{const _0xa473cc=_0x43ac08;if(_0x859caf==='&lt;')return'<';if(_0x859caf===_0xa473cc(0x17d))return'>';if(_0x859caf===_0xa473cc(0x14f))return'\x22';if(_0x859caf===_0xa473cc(0x15b))return'\x27';if(_0x859caf===_0xa473cc(0x18c))return'&';const _0x5be4bc=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x859caf);if(_0x5be4bc){const _0x25204e=_0x5be4bc[0x1],_0x4b771e=_0x5be4bc[0x2],_0x1fc215=Number['parseInt'](_0x25204e??_0x4b771e??'',_0x25204e?0x10:0xa);if(isValidXmlCharacter(_0x1fc215))return String['fromCodePoint'](_0x1fc215);}return _0x78637a=!![],'';});return _0x78637a?null:_0x1f1ad4;}function isValidXmlCharacter(_0x17e448){return _0x17e448===0x9||_0x17e448===0xa||_0x17e448===0xd||_0x17e448>=0x20&&_0x17e448<=0xd7ff||_0x17e448>=0xe000&&_0x17e448<=0xfffd||_0x17e448>=0x10000&&_0x17e448<=0x10ffff;}export function detectSqlType(_0x5a9c74){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x5a9c74));}function detectNormalizedSqlType(_0x284935){const _0x53dd32=a316_0x513f98;if(_0x284935[_0x53dd32(0x186)])return{'type':_0x53dd32(0x195),'isSelectOnly':![],'isDangerous':![],'reason':_0x284935['error']};if(!_0x284935[_0x53dd32(0x154)][_0x53dd32(0x14b)]())return{'type':_0x53dd32(0x195),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x5897cc=tokenizeSqlForTypeAnalysis(_0x284935[_0x53dd32(0x154)]),_0x1b21ba=_0x5897cc['filter'](_0x5ad306=>_0x5ad306!==MYBATIS_DYNAMIC_START_MARKER&&_0x5ad306!==MYBATIS_DYNAMIC_END_MARKER),_0x2c09f0=findMainStatementIndex(_0x1b21ba);if(_0x2c09f0<0x0)return{'type':_0x53dd32(0x195),'isSelectOnly':![],'isDangerous':![],'reason':_0x53dd32(0x167)};const _0x4c1cca=_0x1b21ba[_0x2c09f0]??'',_0x778b74=_0x284935[_0x53dd32(0x1a6)]??_0x4c1cca,_0xc4491=_0x5897cc['some'](_0xe6f4e8=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x53dd32(0x164)](_0xe6f4e8)),_0x66c239=new Set();let _0x5840f8=![];for(let _0x9224f8=0x0;_0x9224f8<_0x5897cc['length'];_0x9224f8+=0x1){const _0x46bcdd=_0x5897cc[_0x9224f8];(_0x46bcdd===_0x53dd32(0x16b)||_0x46bcdd==='SHARE')&&isLockingClauseKeyword(_0x5897cc,_0x9224f8)&&(_0x66c239[_0x53dd32(0x155)](_0x9224f8),_0x5840f8=!![]);if(_0x5897cc[_0x53dd32(0x15c)](_0x9224f8,_0x9224f8+0x4)[_0x53dd32(0x17a)]('\x20')===_0x53dd32(0x161))_0x5840f8=!![];}if(_0x778b74===_0x53dd32(0x159)){const _0x4dc8fd=_0x5897cc['some']((_0x56165d,_0x391b8f)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x53dd32(0x164)](_0x56165d)&&!_0x66c239['has'](_0x391b8f));return{'type':_0x53dd32(0x159),'isSelectOnly':!_0x4dc8fd&&!_0x5840f8,'isLockingRead':_0x5840f8,'isDangerous':_0x4dc8fd,'reason':_0x4dc8fd?_0x53dd32(0x199):undefined};}if(_0x778b74===_0x53dd32(0x15d))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0xc4491,'reason':_0xc4491?_0x53dd32(0x16d):undefined};if(_0x778b74===_0x53dd32(0x16b))return{'type':_0x53dd32(0x16b),'isSelectOnly':![],'isDangerous':_0xc4491,'reason':_0xc4491?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x778b74===_0x53dd32(0x153))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x53dd32(0x147)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x53dd32(0x164)](_0x4c1cca))return{'type':_0x53dd32(0x15e),'isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20require\x20explicit\x20review'};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x5be385,_0x4a6444){const _0xed0594=a316_0x513f98,_0x395d0b=_0x5be385[_0x4a6444]===_0xed0594(0x16b)?[[_0xed0594(0x1a5)],['FOR','NO',_0xed0594(0x182)]]:[[_0xed0594(0x1a5)],[_0xed0594(0x1a5),'KEY']],_0x4f2b09=_0x395d0b['some'](_0x750863=>{const _0x2f748f=_0xed0594,_0x1b94a1=_0x4a6444-_0x750863['length'];return _0x1b94a1>=0x0&&_0x5be385[_0x2f748f(0x15c)](_0x1b94a1,_0x4a6444)[_0x2f748f(0x17a)]('\x20')===_0x750863[_0x2f748f(0x17a)]('\x20');});if(!_0x4f2b09)return![];return!_0x5be385[_0xed0594(0x15c)](_0x4a6444+0x1,_0x4a6444+0x5)[_0xed0594(0x165)](_0xed0594(0x156));}function findMainStatementIndex(_0x16ccb8){const _0x4f3486=a316_0x513f98;if(_0x16ccb8[0x0]!=='WITH')return 0x0;let _0x4df86b=_0x16ccb8[0x1]===_0x4f3486(0x192)?0x2:0x1;while(_0x4df86b<_0x16ccb8[_0x4f3486(0x160)]){const _0x14bc39=_0x16ccb8[_0x4df86b];if(!_0x14bc39||!(/^[A-Z_][\w$]*$/[_0x4f3486(0x164)](_0x14bc39)||/^[`"]/[_0x4f3486(0x164)](_0x14bc39)))return-0x1;_0x4df86b+=0x1;if(_0x16ccb8[_0x4df86b]==='('){_0x4df86b=skipSqlParentheses(_0x16ccb8,_0x4df86b);if(_0x4df86b<0x0)return-0x1;}if(_0x16ccb8[_0x4df86b]!=='AS')return-0x1;_0x4df86b+=0x1;if(_0x16ccb8[_0x4df86b]===_0x4f3486(0x174)&&_0x16ccb8[_0x4df86b+0x1]===_0x4f3486(0x16f))_0x4df86b+=0x2;else{if(_0x16ccb8[_0x4df86b]==='MATERIALIZED')_0x4df86b+=0x1;}_0x4df86b=skipSqlParentheses(_0x16ccb8,_0x4df86b);if(_0x4df86b<0x0)return-0x1;if(_0x16ccb8[_0x4df86b]!==','){const _0xa8b23=_0x16ccb8[_0x4df86b]==='('?_0x4df86b+0x1:_0x4df86b;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x4f3486(0x164)](_0x16ccb8[_0xa8b23]??'')?_0xa8b23:-0x1;}_0x4df86b+=0x1;}return-0x1;}function skipSqlParentheses(_0x1eef2b,_0x4dbc81){const _0x4491b9=a316_0x513f98;if(_0x1eef2b[_0x4dbc81]!=='(')return-0x1;let _0x40b0bf=0x0;for(let _0x3409c9=_0x4dbc81;_0x3409c9<_0x1eef2b[_0x4491b9(0x160)];_0x3409c9+=0x1){const _0x159016=_0x1eef2b[_0x3409c9];if(_0x159016===';')return-0x1;if(_0x159016==='(')_0x40b0bf+=0x1;if(_0x159016===')'&&--_0x40b0bf===0x0)return _0x3409c9+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x26b4fb){const _0x545ba9=a316_0x513f98;return _0x26b4fb[_0x545ba9(0x184)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x545ba9(0x184)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x545ba9(0x184)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x52d8a6){const _0x2e1d87=a316_0x513f98,_0x3656b2=[],_0x2387b2=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x4fe3ef of _0x52d8a6[_0x2e1d87(0x162)](_0x2387b2)){const _0x2d79de=_0x4fe3ef[0x0];if(_0x2d79de[_0x2e1d87(0x1a3)]('/*')||_0x2d79de[_0x2e1d87(0x1a3)]('--')||_0x2d79de['startsWith']('#')&&!_0x2d79de['startsWith']('#{'))continue;_0x3656b2[_0x2e1d87(0x19f)](/^["`]/['test'](_0x2d79de)?_0x2d79de:/^[\x27@#$]/[_0x2e1d87(0x164)](_0x2d79de)?'?':_0x2d79de['toUpperCase']());}return _0x3656b2;}function extractTables(_0x2cf423,_0x537c4e){const _0x29d235=a316_0x513f98,_0x213009=_0x2cf423[_0x29d235(0x196)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x29d235(0x196)](/'[^']*'/g,'\x27\x27')[_0x29d235(0x196)](/--.*$/gm,'')[_0x29d235(0x196)](/\/\*[\s\S]*?\*\//g,''),_0x2177a1=[],_0x153f2e=_0x213009[_0x29d235(0x194)](/FROM\s+([^\s,)(]+)/i);addTable(_0x2177a1,_0x153f2e?.[0x1]);for(const _0x1c4153 of _0x213009[_0x29d235(0x162)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x2177a1,_0x1c4153[0x1]);}const _0x1aa642=_0x213009[_0x29d235(0x194)](/INTO\s+([^\s(]+)/i);addTable(_0x2177a1,_0x1aa642?.[0x1]);if(_0x537c4e===_0x29d235(0x16b)){const _0x421238=_0x213009['match'](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x2177a1,_0x421238?.[0x1]);}return _0x2177a1;}function addTable(_0x4b02d2,_0x24c05d){const _0x1b7e59=a316_0x513f98,_0x15c1e2=_0x24c05d?.[_0x1b7e59(0x196)](/[`"]/g,'');_0x15c1e2&&_0x15c1e2!==UNRESOLVED_SQL_FRAGMENT&&!_0x4b02d2[_0x1b7e59(0x165)](_0x15c1e2)&&_0x4b02d2[_0x1b7e59(0x19f)](_0x15c1e2);}function extractParameters(_0x4813cb){const _0x456f97=a316_0x513f98,_0x53ddb8=new Set();for(const _0x4bd2a5 of _0x4813cb['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x4bd2a5[0x1])_0x53ddb8[_0x456f97(0x155)](_0x4bd2a5[0x1]);}return Array[_0x456f97(0x1a7)](_0x53ddb8);}function a316_0x2815(_0x34f6fd,_0x399b59){_0x34f6fd=_0x34f6fd-0x145;const _0xf91ed0=a316_0xf91e();let _0x28152b=_0xf91ed0[_0x34f6fd];return _0x28152b;}export function validateSql(_0x4d8433){const _0x58b6df=a316_0x513f98,_0x182f0a=normalizeSqlForStaticAnalysis(_0x4d8433),_0x3babe5=detectNormalizedSqlType(_0x182f0a),_0x432531=stripStaticAnalysisMarkers(_0x182f0a['sql']),_0x22bdca=_0x182f0a[_0x58b6df(0x186)]?[]:extractTables(_0x432531,_0x3babe5[_0x58b6df(0x19d)]),_0x110ecb=_0x182f0a[_0x58b6df(0x186)]?[]:extractParameters(_0x432531);if(_0x3babe5[_0x58b6df(0x1a2)])return{'valid':![],'sqlType':_0x3babe5,'tables':_0x22bdca,'parameters':_0x110ecb,'message':_0x3babe5[_0x58b6df(0x14d)]||_0x3babe5[_0x58b6df(0x19d)]+'\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.'};if(_0x3babe5[_0x58b6df(0x19d)]===_0x58b6df(0x195))return{'valid':![],'sqlType':_0x3babe5,'tables':_0x22bdca,'parameters':_0x110ecb,'message':_0x182f0a[_0x58b6df(0x186)]?_0x58b6df(0x188)+_0x182f0a['error']:_0x3babe5[_0x58b6df(0x14d)]?_0x58b6df(0x188)+_0x3babe5[_0x58b6df(0x14d)]:_0x58b6df(0x198)};return{'valid':!![],'sqlType':_0x3babe5,'tables':_0x22bdca,'parameters':_0x110ecb,'message':_0x3babe5[_0x58b6df(0x19d)]+'\x20query\x20targeting\x20'+(_0x22bdca[_0x58b6df(0x160)]?_0x22bdca[_0x58b6df(0x17a)](',\x20'):_0x58b6df(0x17e))+(_0x110ecb[_0x58b6df(0x160)]?_0x58b6df(0x191)+_0x110ecb[_0x58b6df(0x17a)](',\x20'):'')};}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- const a316_0x3c73f6=a316_0x598e;(function(_0x302903,_0x4b16d2){const _0x9918c6=a316_0x598e,_0x54ab2c=_0x302903();while(!![]){try{const _0x40c70b=parseInt(_0x9918c6(0x202))/0x1+parseInt(_0x9918c6(0x203))/0x2*(-parseInt(_0x9918c6(0x207))/0x3)+parseInt(_0x9918c6(0x1f3))/0x4*(parseInt(_0x9918c6(0x206))/0x5)+-parseInt(_0x9918c6(0x1fa))/0x6*(-parseInt(_0x9918c6(0x1fe))/0x7)+-parseInt(_0x9918c6(0x1ee))/0x8*(parseInt(_0x9918c6(0x1fd))/0x9)+-parseInt(_0x9918c6(0x1f4))/0xa+parseInt(_0x9918c6(0x1f9))/0xb;if(_0x40c70b===_0x4b16d2)break;else _0x54ab2c['push'](_0x54ab2c['shift']());}catch(_0x467651){_0x54ab2c['push'](_0x54ab2c['shift']());}}}(a316_0x5281,0x82434));function a316_0x5281(){const _0x577914=['Missing\x20required\x20flag:\x20--','Configuration\x20file\x20not\x20found','unknown_command','\x20--help`\x20to\x20see\x20available\x20commands.','Run\x20`','16HIpTUG','flag_missing','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','\x20auth`\x20to\x20login\x20first.','Set\x20appcode\x20via\x20`','4dSKwWA','9215580kxEfvB','Operation\x20cancelled.','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','Not\x20in\x20a\x20','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','12725955osBNfq','345666NKPqIw','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','not_in_project','1810359uuEzMl','98EexXJx','\x20project\x20directory','apiError','Authentication\x20required','597809MLsfPg','794DJGZgo','validation','auth_required','470590mVmhav','6030IXYHJu','Network\x20error:\x20','config_missing'];a316_0x5281=function(){return _0x577914;};return a316_0x5281();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a316_0x598e(_0x539af9,_0x37533f){_0x539af9=_0x539af9-0x1eb;const _0x5281a8=a316_0x5281();let _0x598eed=_0x5281a8[_0x539af9];return _0x598eed;}export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+a316_0x3c73f6(0x1f1),'configMissingHint':a316_0x3c73f6(0x1f2)+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+a316_0x3c73f6(0x1f6),'notInProjectHint':a316_0x3c73f6(0x1f8)});export const CliErrors={'authRequired'(_0x5bbd68){const _0x3a2f69=a316_0x3c73f6;return new CliError(_0x3a2f69(0x205),0x1,_0x3a2f69(0x201),_0x5bbd68??_0x3a2f69(0x1ed)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.');},'configMissing'(_0x5dc1e3){const _0x555df7=a316_0x3c73f6;return new CliError(_0x555df7(0x209),0x1,_0x555df7(0x20b),_0x5dc1e3??_0x555df7(0x1f2)+CLI_BIN_NAME+_0x555df7(0x1fb)+CLI_BIN_NAME+_0x555df7(0x1f6));},'notInProject'(){const _0x15a048=a316_0x3c73f6;return new CliError(_0x15a048(0x1fc),0x1,_0x15a048(0x1f7)+CLI_BIN_NAME+_0x15a048(0x1ff),_0x15a048(0x1f8));},'apiError'(_0x3617a5,_0x2cb3ae){const _0x5ca9fc=a316_0x3c73f6;return baseCliErrors[_0x5ca9fc(0x200)](_0x3617a5,_0x2cb3ae);},'networkError'(_0x58dcf2){const _0x4c269c=a316_0x3c73f6;return new CliError('network_error',0x2,_0x4c269c(0x208)+_0x58dcf2,_0x4c269c(0x1f0));},'unknownCommand'(_0x2e9819){const _0x38e555=a316_0x3c73f6;return new CliError(_0x38e555(0x1eb),0x1,'Unknown\x20command:\x20'+_0x2e9819,_0x38e555(0x1ed)+CLI_BIN_NAME+_0x38e555(0x1ec));},'flagMissing'(_0x7d6034,_0x59ebc0){const _0x4ad9a4=a316_0x3c73f6;return new CliError(_0x4ad9a4(0x1ef),0x1,_0x4ad9a4(0x20a)+_0x7d6034,_0x59ebc0);},'validation'(_0xfbf9c0,_0x3af97d){const _0x427a7a=a316_0x3c73f6;return baseCliErrors[_0x427a7a(0x204)](_0xfbf9c0,_0x3af97d);},'cancelled'(_0x594c26){const _0x2d633b=a316_0x3c73f6;return new CliError('cancelled',0x0,_0x594c26??_0x2d633b(0x1f5));}};
1
+ const a317_0x659db1=a317_0x52a5;(function(_0x545a65,_0x3e2c3e){const _0x1f5fec=a317_0x52a5,_0x39533c=_0x545a65();while(!![]){try{const _0xd91b9f=-parseInt(_0x1f5fec(0x1d0))/0x1+-parseInt(_0x1f5fec(0x1de))/0x2*(-parseInt(_0x1f5fec(0x1dd))/0x3)+parseInt(_0x1f5fec(0x1c9))/0x4+parseInt(_0x1f5fec(0x1cf))/0x5+-parseInt(_0x1f5fec(0x1ce))/0x6*(parseInt(_0x1f5fec(0x1db))/0x7)+-parseInt(_0x1f5fec(0x1d9))/0x8*(-parseInt(_0x1f5fec(0x1df))/0x9)+parseInt(_0x1f5fec(0x1cb))/0xa*(-parseInt(_0x1f5fec(0x1c8))/0xb);if(_0xd91b9f===_0x3e2c3e)break;else _0x39533c['push'](_0x39533c['shift']());}catch(_0x40c2ab){_0x39533c['push'](_0x39533c['shift']());}}}(a317_0x3c09,0xd41fa));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':a317_0x659db1(0x1d3)+CLI_BIN_NAME+a317_0x659db1(0x1e0),'configMissingHint':'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+a317_0x659db1(0x1dc)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','notInProjectHint':a317_0x659db1(0x1ca)});function a317_0x52a5(_0x1d311e,_0x4b2bc8){_0x1d311e=_0x1d311e-0x1c6;const _0x3c097b=a317_0x3c09();let _0x52a5a3=_0x3c097b[_0x1d311e];return _0x52a5a3;}export const CliErrors={'authRequired'(_0x4cb25a){const _0x2643c9=a317_0x659db1;return new CliError(_0x2643c9(0x1c7),0x1,_0x2643c9(0x1d8),_0x4cb25a??_0x2643c9(0x1d3)+CLI_BIN_NAME+_0x2643c9(0x1e0));},'configMissing'(_0x12fceb){const _0x18665d=a317_0x659db1;return new CliError(_0x18665d(0x1cd),0x1,_0x18665d(0x1d4),_0x12fceb??_0x18665d(0x1e3)+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+_0x18665d(0x1d5));},'notInProject'(){const _0x4f2ea2=a317_0x659db1;return new CliError(_0x4f2ea2(0x1cc),0x1,_0x4f2ea2(0x1e2)+CLI_BIN_NAME+_0x4f2ea2(0x1d6),_0x4f2ea2(0x1ca));},'apiError'(_0x2b328d,_0x29dbdd){const _0x3c98d6=a317_0x659db1;return baseCliErrors[_0x3c98d6(0x1d2)](_0x2b328d,_0x29dbdd);},'networkError'(_0x1b3c82){const _0x6f7c1a=a317_0x659db1;return new CliError(_0x6f7c1a(0x1e1),0x2,_0x6f7c1a(0x1d7)+_0x1b3c82,'Check\x20your\x20internet\x20connection\x20and\x20try\x20again.');},'unknownCommand'(_0x5efc4c){const _0xe43c78=a317_0x659db1;return new CliError('unknown_command',0x1,_0xe43c78(0x1d1)+_0x5efc4c,_0xe43c78(0x1d3)+CLI_BIN_NAME+'\x20--help`\x20to\x20see\x20available\x20commands.');},'flagMissing'(_0x302d75,_0x55a904){const _0x44a792=a317_0x659db1;return new CliError('flag_missing',0x1,_0x44a792(0x1e4)+_0x302d75,_0x55a904);},'validation'(_0x28da2c,_0x243ecb){const _0x63e6c6=a317_0x659db1;return baseCliErrors[_0x63e6c6(0x1da)](_0x28da2c,_0x243ecb);},'cancelled'(_0x21ddeb){const _0x62a6f3=a317_0x659db1;return new CliError(_0x62a6f3(0x1c6),0x0,_0x21ddeb??'Operation\x20cancelled.');}};function a317_0x3c09(){const _0x35bd23=['1388613Mvadfo','Unknown\x20command:\x20','apiError','Run\x20`','Configuration\x20file\x20not\x20found','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','\x20project\x20directory','Network\x20error:\x20','Authentication\x20required','8pHvGbi','validation','7nlTVsN','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','39cmTfXJ','209512XqVoaC','9450252aqNTuj','\x20auth`\x20to\x20login\x20first.','network_error','Not\x20in\x20a\x20','Set\x20appcode\x20via\x20`','Missing\x20required\x20flag:\x20--','cancelled','auth_required','231QMVGRd','4628772QUSgsh','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','711730jsWVfu','not_in_project','config_missing','8369742ZTYAoZ','7890060rnJiCG'];a317_0x3c09=function(){return _0x35bd23;};return a317_0x3c09();}
@@ -1 +1 @@
1
- (function(_0x17bb91,_0x4026df){const _0xd2c576=a317_0x1dc4,_0x562f18=_0x17bb91();while(!![]){try{const _0x274772=parseInt(_0xd2c576(0x76))/0x1+parseInt(_0xd2c576(0x7a))/0x2*(-parseInt(_0xd2c576(0x77))/0x3)+parseInt(_0xd2c576(0x75))/0x4*(parseInt(_0xd2c576(0x79))/0x5)+-parseInt(_0xd2c576(0x7b))/0x6*(-parseInt(_0xd2c576(0x74))/0x7)+-parseInt(_0xd2c576(0x78))/0x8+-parseInt(_0xd2c576(0x73))/0x9*(parseInt(_0xd2c576(0x72))/0xa)+parseInt(_0xd2c576(0x7c))/0xb;if(_0x274772===_0x4026df)break;else _0x562f18['push'](_0x562f18['shift']());}catch(_0x82c655){_0x562f18['push'](_0x562f18['shift']());}}}(a317_0x2965,0x1b405));function a317_0x2965(){const _0x202a8f=['1446GTvTAT','1455080wInhJx','5NPLWKE','244yRYKGL','138fykhgv','3169650gnywns','yes','name','67450sIkTVN','279zUQWvC','8323RFUkUa','421856rRibaz','140444sYQaXs'];a317_0x2965=function(){return _0x202a8f;};return a317_0x2965();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a317_0x348632}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a317_0x1dc4(_0x1804ac,_0x12db20){_0x1804ac=_0x1804ac-0x71;const _0x296524=a317_0x2965();let _0x1dc4bc=_0x296524[_0x1804ac];return _0x1dc4bc;}export function buildAllFlags(_0x1471c6){const _0x4a3ef2=a317_0x1dc4,_0x29787c=a317_0x348632(_0x1471c6,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x1471c6))return _0x29787c;return _0x29787c['map'](_0x53c6c8=>_0x53c6c8[_0x4a3ef2(0x71)]===_0x4a3ef2(0x7d)?{..._0x53c6c8,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x53c6c8);}
1
+ function a318_0x16b9(){const _0x42122a=['3276102Iqrxoj','449088jLnZie','242rtIYsx','8OkBTBk','387988mmhQhK','yes','660VEKFUt','1276584QbizzE','23607gEInsA','217SGCqNH','5MoTamV','name','2110423hsUIet','map','7034MFnQFg'];a318_0x16b9=function(){return _0x42122a;};return a318_0x16b9();}(function(_0x2c54b4,_0x247fab){const _0x4e83ac=a318_0x5088,_0x2fa6db=_0x2c54b4();while(!![]){try{const _0x4d8bff=parseInt(_0x4e83ac(0x8c))/0x1*(parseInt(_0x4e83ac(0x82))/0x2)+parseInt(_0x4e83ac(0x8a))/0x3+parseInt(_0x4e83ac(0x87))/0x4+parseInt(_0x4e83ac(0x8d))/0x5*(parseInt(_0x4e83ac(0x83))/0x6)+parseInt(_0x4e83ac(0x80))/0x7*(-parseInt(_0x4e83ac(0x86))/0x8)+-parseInt(_0x4e83ac(0x8b))/0x9*(parseInt(_0x4e83ac(0x89))/0xa)+parseInt(_0x4e83ac(0x85))/0xb*(-parseInt(_0x4e83ac(0x84))/0xc);if(_0x4d8bff===_0x247fab)break;else _0x2fa6db['push'](_0x2fa6db['shift']());}catch(_0xe5b683){_0x2fa6db['push'](_0x2fa6db['shift']());}}}(a318_0x16b9,0x82524));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a318_0x259e78}from'@lovrabet/cli-framework';function a318_0x5088(_0x1149f0,_0x30c9ee){_0x1149f0=_0x1149f0-0x7f;const _0x16b9ad=a318_0x16b9();let _0x508859=_0x16b9ad[_0x1149f0];return _0x508859;}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0xba81e5){const _0x4febfd=a318_0x5088,_0x559dd5=a318_0x259e78(_0xba81e5,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0xba81e5))return _0x559dd5;return _0x559dd5[_0x4febfd(0x81)](_0x12899f=>_0x12899f[_0x4febfd(0x7f)]===_0x4febfd(0x88)?{..._0x12899f,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x12899f);}
@@ -1 +1 @@
1
- (function(_0x53bbdf,_0x8423ec){var _0x1aa056=a318_0x5d2a,_0x434ba9=_0x53bbdf();while(!![]){try{var _0x27d62b=-parseInt(_0x1aa056(0x197))/0x1*(parseInt(_0x1aa056(0x195))/0x2)+parseInt(_0x1aa056(0x194))/0x3*(-parseInt(_0x1aa056(0x18c))/0x4)+parseInt(_0x1aa056(0x18d))/0x5+-parseInt(_0x1aa056(0x196))/0x6*(-parseInt(_0x1aa056(0x191))/0x7)+-parseInt(_0x1aa056(0x18f))/0x8*(parseInt(_0x1aa056(0x18b))/0x9)+parseInt(_0x1aa056(0x190))/0xa*(parseInt(_0x1aa056(0x19b))/0xb)+-parseInt(_0x1aa056(0x19a))/0xc;if(_0x27d62b===_0x8423ec)break;else _0x434ba9['push'](_0x434ba9['shift']());}catch(_0x239a12){_0x434ba9['push'](_0x434ba9['shift']());}}}(a318_0x6a17,0x8ab51));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x52d76a){var _0xec4e50=a318_0x5d2a;return _0x52d76a?.[_0xec4e50(0x19c)]===!![];}function a318_0x5d2a(_0x1a7216,_0x488f08){_0x1a7216=_0x1a7216-0x18b;var _0x6a17e3=a318_0x6a17();var _0x5d2a0a=_0x6a17e3[_0x1a7216];return _0x5d2a0a;}function a318_0x6a17(){var _0x250425=['8iyTCDo','5860OPSRHV','1834665TVFHym','format','defaultFormat','2393949Vdsqth','3774lNbqEa','18tXJFex','119VzVqbS','def','compress','393276bbXXGH','11077yWkYWu','structuredErrors','7009857YDauBI','4GKVkOu','5129700wcqSnU','flags'];a318_0x6a17=function(){return _0x250425;};return a318_0x6a17();}export function resolveErrorOutputFormat(_0x1b1b4f){var _0x2b4516=a318_0x5d2a;if(!_0x1b1b4f[_0x2b4516(0x198)])return _0x1b1b4f[_0x2b4516(0x193)]??_0x2b4516(0x199);return resolveOutputConfig({'flags':_0x1b1b4f[_0x2b4516(0x18e)]??{},'def':_0x1b1b4f[_0x2b4516(0x198)],'configDefault':_0x1b1b4f['defaultFormat']})[_0x2b4516(0x192)];}
1
+ (function(_0x26379c,_0x48ee03){var _0x3c8ae7=a319_0x2011,_0x50d9e9=_0x26379c();while(!![]){try{var _0x46c91c=-parseInt(_0x3c8ae7(0x1a7))/0x1*(-parseInt(_0x3c8ae7(0x1b3))/0x2)+-parseInt(_0x3c8ae7(0x1b4))/0x3+-parseInt(_0x3c8ae7(0x1b0))/0x4+-parseInt(_0x3c8ae7(0x1a9))/0x5*(parseInt(_0x3c8ae7(0x1ab))/0x6)+-parseInt(_0x3c8ae7(0x1b2))/0x7+-parseInt(_0x3c8ae7(0x1af))/0x8+parseInt(_0x3c8ae7(0x1ac))/0x9*(parseInt(_0x3c8ae7(0x1a6))/0xa);if(_0x46c91c===_0x48ee03)break;else _0x50d9e9['push'](_0x50d9e9['shift']());}catch(_0x35e89e){_0x50d9e9['push'](_0x50d9e9['shift']());}}}(a319_0x3240,0x55db7));function a319_0x3240(){var _0x15073f=['985590fqXElY','6754330CEnzTO','1393YXRsMM','defaultFormat','360VNoUqP','compress','438fJNLII','27voMImp','format','def','5328720AGxFej','1311752VwRVLe','flags','3022509zRJrsz','122uZMnyT'];a319_0x3240=function(){return _0x15073f;};return a319_0x3240();}import{resolveOutputConfig}from'@lovrabet/cli-framework';function a319_0x2011(_0x4caf7f,_0x483c98){_0x4caf7f=_0x4caf7f-0x1a6;var _0x32400b=a319_0x3240();var _0x20110e=_0x32400b[_0x4caf7f];return _0x20110e;}export function usesStructuredErrorOutput(_0x49d961){return _0x49d961?.['structuredErrors']===!![];}export function resolveErrorOutputFormat(_0x2f6b6b){var _0x2a6636=a319_0x2011;if(!_0x2f6b6b[_0x2a6636(0x1ae)])return _0x2f6b6b[_0x2a6636(0x1a8)]??_0x2a6636(0x1aa);return resolveOutputConfig({'flags':_0x2f6b6b[_0x2a6636(0x1b1)]??{},'def':_0x2f6b6b['def'],'configDefault':_0x2f6b6b[_0x2a6636(0x1a8)]})[_0x2a6636(0x1ad)];}