@lovrabet/rabetbase-cli 2.3.14 → 2.3.15-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/index.js +1 -1
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/restore.js +1 -1
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- const a202_0x2951c3=a202_0x170c;(function(_0x1a2e33,_0x46e2cf){const _0x3ce0bd=a202_0x170c,_0x21b850=_0x1a2e33();while(!![]){try{const _0x4a2c8b=-parseInt(_0x3ce0bd(0x90))/0x1+-parseInt(_0x3ce0bd(0x8d))/0x2+-parseInt(_0x3ce0bd(0x8f))/0x3*(-parseInt(_0x3ce0bd(0x8e))/0x4)+parseInt(_0x3ce0bd(0x8c))/0x5+parseInt(_0x3ce0bd(0x9b))/0x6*(parseInt(_0x3ce0bd(0xa0))/0x7)+parseInt(_0x3ce0bd(0x87))/0x8*(parseInt(_0x3ce0bd(0x81))/0x9)+-parseInt(_0x3ce0bd(0x8a))/0xa;if(_0x4a2c8b===_0x46e2cf)break;else _0x21b850['push'](_0x21b850['shift']());}catch(_0x165f49){_0x21b850['push'](_0x21b850['shift']());}}}(a202_0x2278,0xf08d9));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a202_0x2951c3(0x9a),a202_0x2951c3(0x89),'HOOK'];export function normalizeBffType(_0x4e8e1c){const _0x1910cc=a202_0x2951c3;if(!_0x4e8e1c)return undefined;const _0x48d45e=_0x4e8e1c[_0x1910cc(0x98)]()['toUpperCase']();return SUPPORTED_BFF_TYPES['includes'](_0x48d45e)?_0x48d45e:undefined;}async function scanJsFilesRecursively(_0xfe6137,_0x457f0e){const _0x47c428=a202_0x2951c3,_0x2ff8dd=[];try{const _0x555db1=await readdir(_0xfe6137,{'withFileTypes':!![]});for(const _0x3e8d41 of _0x555db1){const _0x45c843=join(_0xfe6137,_0x3e8d41[_0x47c428(0x85)]);if(_0x3e8d41[_0x47c428(0x8b)]())_0x2ff8dd[_0x47c428(0x95)](...await scanJsFilesRecursively(_0x45c843,_0x457f0e+'/'+_0x3e8d41[_0x47c428(0x85)]));else _0x3e8d41[_0x47c428(0x94)]()&&_0x3e8d41['name']['endsWith'](_0x47c428(0x88))&&_0x2ff8dd[_0x47c428(0x95)]({'lockKey':_0x457f0e+'/'+_0x3e8d41[_0x47c428(0x85)][_0x47c428(0x9e)](/\.js$/,''),'filePath':_0x45c843});}}catch(_0x2c89f4){if(_0x2c89f4[_0x47c428(0xa5)]!==_0x47c428(0x91))throw _0x2c89f4;}return _0x2ff8dd;}async function scanFlatFunctions(_0x10849e,_0xfb7dec){const _0x2e5d9d=a202_0x2951c3,_0x436fe3=join(_0x10849e[_0x2e5d9d(0xa2)],_0xfb7dec),_0x5e9dc9=await scanJsFilesRecursively(_0x436fe3,_0xfb7dec);return _0x5e9dc9[_0x2e5d9d(0x9c)](({lockKey:_0x39f2ee,filePath:_0x2f2d2c})=>({'type':_0xfb7dec,'name':_0x39f2ee[_0x2e5d9d(0x9f)]('/')['at'](-0x1)??'','filePath':_0x2f2d2c,'lockKey':_0x39f2ee}));}async function scanHookFunctions(_0x323cc6){const _0x318660=a202_0x2951c3,_0x998e27=join(_0x323cc6[_0x318660(0xa2)],'HOOK'),_0x14b25b=[];try{const _0x45a6ec=await readdir(_0x998e27,{'withFileTypes':!![]});for(const _0x239ea6 of _0x45a6ec){if(!_0x239ea6[_0x318660(0x8b)]())continue;const _0x2254a0=_0x239ea6[_0x318660(0x85)],_0x2b336a=join(_0x998e27,_0x2254a0),_0xbe8abd=await readdir(_0x2b336a,{'withFileTypes':!![]});for(const _0x11c551 of _0xbe8abd){if(!_0x11c551[_0x318660(0x8b)]())continue;const _0x1f7eae=_0x11c551[_0x318660(0x85)],_0x12d2ba=join(_0x2b336a,_0x1f7eae),_0x86c198=await readdir(_0x12d2ba,{'withFileTypes':!![]});for(const _0xe81ffa of _0x86c198){if(!_0xe81ffa[_0x318660(0x8b)]())continue;const _0x3816d6=_0xe81ffa[_0x318660(0x85)],_0x49f5d3=join(_0x12d2ba,_0x3816d6),_0x27f61e=await readdir(_0x49f5d3,{'withFileTypes':!![]});for(const _0x40d187 of _0x27f61e){if(!_0x40d187[_0x318660(0x94)]()||!_0x40d187[_0x318660(0x85)]['endsWith'](_0x318660(0x88)))continue;const _0x3b3757=_0x40d187[_0x318660(0x85)]['replace'](/\.js$/,'');_0x14b25b[_0x318660(0x95)]({'type':_0x318660(0x92),'name':_0x3b3757,'filePath':join(_0x49f5d3,_0x40d187[_0x318660(0x85)]),'lockKey':_0x318660(0xa3)+_0x2254a0+'/'+_0x1f7eae+'/'+_0x3816d6+'/'+_0x3b3757,'alias':_0x2254a0,'operationType':_0x1f7eae,'functionNode':_0x3816d6});}}}}}catch(_0x335280){if(_0x335280[_0x318660(0xa5)]!==_0x318660(0x91))throw _0x335280;}return _0x14b25b;}export async function scanLocalBffFunctions(_0xd9e67b,_0x102615){const _0x162780=a202_0x2951c3;if(_0x102615===_0x162780(0x9a)||_0x102615===_0x162780(0x89))return scanFlatFunctions(_0xd9e67b,_0x102615);if(_0x102615===_0x162780(0x92))return scanHookFunctions(_0xd9e67b);const [_0xe8cdce,_0xf9ac3,_0x1f32a5]=await Promise[_0x162780(0x80)]([scanFlatFunctions(_0xd9e67b,_0x162780(0x9a)),scanFlatFunctions(_0xd9e67b,_0x162780(0x89)),scanHookFunctions(_0xd9e67b)]);return[..._0xe8cdce,..._0xf9ac3,..._0x1f32a5];}export function resolveLocalFilePathFromLockKey(_0x29cecd,_0x32bb1d){const _0x4022eb=a202_0x2951c3;return join(_0x29cecd[_0x4022eb(0xa2)],..._0x32bb1d[_0x4022eb(0x9f)]('/'))+'.js';}export function createHookLocationMap(_0x1c3d9e){const _0x3d98c3=a202_0x2951c3,_0x172775=new Map();for(const _0x1ca229 of _0x1c3d9e){_0x1ca229[_0x3d98c3(0x97)]&&_0x172775['set'](_0x1ca229[_0x3d98c3(0x97)],{'datasetCode':_0x1ca229[_0x3d98c3(0x82)],'operationType':snakeToCamel(_0x1ca229['operationType']),'functionNode':_0x3d98c3(0x83)}),_0x1ca229['afterScriptId']&&_0x172775['set'](_0x1ca229['afterScriptId'],{'datasetCode':_0x1ca229['datasetCode'],'operationType':snakeToCamel(_0x1ca229[_0x3d98c3(0x93)]),'functionNode':_0x3d98c3(0x86)});}return _0x172775;}function a202_0x2278(){const _0x158f03=['after','8ljknGO','.js','ENDPOINT','7180140MnDkEc','isDirectory','2604725xHmGEK','524910qaqyPB','275020FDBxTz','21rqeLoK','846342eyPIdo','ENOENT','HOOK','operationType','isFile','push','F_OK','beforeScriptId','trim','alias','COMMON','21738bSxEKs','map','get','replace','split','217xZEZab','functionName','scriptsRootDir','HOOK/','scriptType','code','all','15278157iBlisN','datasetCode','before','functionNode','name'];a202_0x2278=function(){return _0x158f03;};return a202_0x2278();}function a202_0x170c(_0x174b00,_0x2070f5){_0x174b00=_0x174b00-0x80;const _0x227835=a202_0x2278();let _0x170c93=_0x227835[_0x174b00];return _0x170c93;}export function resolveRemoteScriptTarget(_0x340d58,_0x1d1ee4,_0x533086,_0x4cdf33,_0x34ad4b){const _0x12c625=a202_0x2951c3,_0x103a4a=normalizeBffType(_0x1d1ee4[_0x12c625(0xa4)]);if(!_0x103a4a||!_0x1d1ee4[_0x12c625(0xa1)])return null;if(_0x103a4a===_0x12c625(0x92)){const _0x1efe59=(_0x1d1ee4['id']?_0x533086[_0x12c625(0x9d)](_0x1d1ee4['id']):undefined)??findHookLocationByRemoteId(_0x4cdf33,_0x1d1ee4['id']);if(!_0x1efe59)return null;const _0x1bf9ad=_0x1efe59[_0x12c625(0x99)]||_0x34ad4b[_0x12c625(0x9d)](_0x1efe59['datasetCode']),_0x489ea5=_0x1bf9ad??_0x1efe59[_0x12c625(0x82)],_0x3109cd={..._0x1efe59,'alias':_0x1bf9ad},_0x5554c9='HOOK/'+_0x489ea5+'/'+_0x3109cd[_0x12c625(0x93)]+'/'+_0x3109cd[_0x12c625(0x84)]+'/'+_0x1d1ee4[_0x12c625(0xa1)];return{'lockKey':_0x5554c9,'filePath':resolveLocalFilePathFromLockKey(_0x340d58,_0x5554c9),'type':'HOOK','hookLocation':_0x3109cd};}const _0x477b73=_0x103a4a+'/'+_0x1d1ee4[_0x12c625(0xa1)];return{'lockKey':_0x477b73,'filePath':resolveLocalFilePathFromLockKey(_0x340d58,_0x477b73),'type':_0x103a4a};}export async function ensureParentDirectory(_0x20d283){await mkdir(dirname(_0x20d283),{'recursive':!![]});}export async function fileExists(_0xddb2c6){const _0x201220=a202_0x2951c3;try{return await access(_0xddb2c6,constants[_0x201220(0x96)]),!![];}catch{return![];}}export async function directoryExists(_0x2a51fd){const _0x3660bc=a202_0x2951c3;try{const _0x47ceb3=await stat(_0x2a51fd);return _0x47ceb3[_0x3660bc(0x8b)]();}catch{return![];}}
1
+ const a202_0x38b2fa=a202_0x4a27;(function(_0xc9428a,_0x2b7a6f){const _0x6cceda=a202_0x4a27,_0x28f394=_0xc9428a();while(!![]){try{const _0x2c44df=parseInt(_0x6cceda(0x1a0))/0x1*(-parseInt(_0x6cceda(0x194))/0x2)+parseInt(_0x6cceda(0x191))/0x3+-parseInt(_0x6cceda(0x192))/0x4+parseInt(_0x6cceda(0x1a6))/0x5*(-parseInt(_0x6cceda(0x1a2))/0x6)+-parseInt(_0x6cceda(0x196))/0x7+-parseInt(_0x6cceda(0x18f))/0x8+parseInt(_0x6cceda(0x1a9))/0x9*(parseInt(_0x6cceda(0x19a))/0xa);if(_0x2c44df===_0x2b7a6f)break;else _0x28f394['push'](_0x28f394['shift']());}catch(_0x338cbb){_0x28f394['push'](_0x28f394['shift']());}}}(a202_0x50d7,0x35c95));function a202_0x50d7(){const _0xf3b1c1=['260322REsAsH','push','COMMON','trim','25IwcUEP','toUpperCase','split','108URdugF','get','afterScriptId','isFile','.js','HOOK/','functionName','scriptType','HOOK','datasetCode','isDirectory','ENOENT','202824FhwIvC','operationType','72204sFBNRi','75736QQRxAQ','name','8niVQRB','replace','863443xmDvRz','before','set','scriptsRootDir','713560UirdjQ','ENDPOINT','functionNode','all','endsWith','beforeScriptId','68865azbuvC','code'];a202_0x50d7=function(){return _0xf3b1c1;};return a202_0x50d7();}import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a202_0x38b2fa(0x1a4),a202_0x38b2fa(0x19b),'HOOK'];export function normalizeBffType(_0x31e923){const _0xdba48d=a202_0x38b2fa;if(!_0x31e923)return undefined;const _0x49bf73=_0x31e923[_0xdba48d(0x1a5)]()[_0xdba48d(0x1a7)]();return SUPPORTED_BFF_TYPES['includes'](_0x49bf73)?_0x49bf73:undefined;}async function scanJsFilesRecursively(_0x4c9925,_0x4036f6){const _0x5a158d=a202_0x38b2fa,_0x1174b3=[];try{const _0x30523d=await readdir(_0x4c9925,{'withFileTypes':!![]});for(const _0x657fc8 of _0x30523d){const _0x3a41b3=join(_0x4c9925,_0x657fc8[_0x5a158d(0x193)]);if(_0x657fc8[_0x5a158d(0x1b3)]())_0x1174b3[_0x5a158d(0x1a3)](...await scanJsFilesRecursively(_0x3a41b3,_0x4036f6+'/'+_0x657fc8[_0x5a158d(0x193)]));else _0x657fc8[_0x5a158d(0x1ac)]()&&_0x657fc8[_0x5a158d(0x193)][_0x5a158d(0x19e)](_0x5a158d(0x1ad))&&_0x1174b3[_0x5a158d(0x1a3)]({'lockKey':_0x4036f6+'/'+_0x657fc8['name'][_0x5a158d(0x195)](/\.js$/,''),'filePath':_0x3a41b3});}}catch(_0x30d3f5){if(_0x30d3f5[_0x5a158d(0x1a1)]!==_0x5a158d(0x1b4))throw _0x30d3f5;}return _0x1174b3;}async function scanFlatFunctions(_0x58016b,_0x1a199b){const _0xcb7fa0=a202_0x38b2fa,_0x206416=join(_0x58016b[_0xcb7fa0(0x199)],_0x1a199b),_0x12cc16=await scanJsFilesRecursively(_0x206416,_0x1a199b);return _0x12cc16['map'](({lockKey:_0x3bbfc5,filePath:_0x5630f8})=>({'type':_0x1a199b,'name':_0x3bbfc5['split']('/')['at'](-0x1)??'','filePath':_0x5630f8,'lockKey':_0x3bbfc5}));}async function scanHookFunctions(_0x50e46c){const _0x3d3046=a202_0x38b2fa,_0x2bf167=join(_0x50e46c[_0x3d3046(0x199)],_0x3d3046(0x1b1)),_0x3808d9=[];try{const _0x177e19=await readdir(_0x2bf167,{'withFileTypes':!![]});for(const _0x422f3f of _0x177e19){if(!_0x422f3f[_0x3d3046(0x1b3)]())continue;const _0x11519d=_0x422f3f[_0x3d3046(0x193)],_0xed00d6=join(_0x2bf167,_0x11519d),_0x13126d=await readdir(_0xed00d6,{'withFileTypes':!![]});for(const _0x3ff6dd of _0x13126d){if(!_0x3ff6dd[_0x3d3046(0x1b3)]())continue;const _0x1daa92=_0x3ff6dd['name'],_0x4a5e69=join(_0xed00d6,_0x1daa92),_0x11885d=await readdir(_0x4a5e69,{'withFileTypes':!![]});for(const _0x310b3a of _0x11885d){if(!_0x310b3a[_0x3d3046(0x1b3)]())continue;const _0x4789a7=_0x310b3a[_0x3d3046(0x193)],_0x45a3ab=join(_0x4a5e69,_0x4789a7),_0x4376de=await readdir(_0x45a3ab,{'withFileTypes':!![]});for(const _0x2424cb of _0x4376de){if(!_0x2424cb['isFile']()||!_0x2424cb['name'][_0x3d3046(0x19e)](_0x3d3046(0x1ad)))continue;const _0x2c86d6=_0x2424cb[_0x3d3046(0x193)]['replace'](/\.js$/,'');_0x3808d9[_0x3d3046(0x1a3)]({'type':_0x3d3046(0x1b1),'name':_0x2c86d6,'filePath':join(_0x45a3ab,_0x2424cb[_0x3d3046(0x193)]),'lockKey':_0x3d3046(0x1ae)+_0x11519d+'/'+_0x1daa92+'/'+_0x4789a7+'/'+_0x2c86d6,'alias':_0x11519d,'operationType':_0x1daa92,'functionNode':_0x4789a7});}}}}}catch(_0x4bb1cb){if(_0x4bb1cb[_0x3d3046(0x1a1)]!=='ENOENT')throw _0x4bb1cb;}return _0x3808d9;}export async function scanLocalBffFunctions(_0x2c7b98,_0x5c6a35){const _0x131cb8=a202_0x38b2fa;if(_0x5c6a35===_0x131cb8(0x1a4)||_0x5c6a35===_0x131cb8(0x19b))return scanFlatFunctions(_0x2c7b98,_0x5c6a35);if(_0x5c6a35===_0x131cb8(0x1b1))return scanHookFunctions(_0x2c7b98);const [_0xe238ff,_0x31e4ff,_0x91bc6]=await Promise[_0x131cb8(0x19d)]([scanFlatFunctions(_0x2c7b98,_0x131cb8(0x1a4)),scanFlatFunctions(_0x2c7b98,_0x131cb8(0x19b)),scanHookFunctions(_0x2c7b98)]);return[..._0xe238ff,..._0x31e4ff,..._0x91bc6];}export function resolveLocalFilePathFromLockKey(_0x113a5f,_0x2bade4){const _0x1681f9=a202_0x38b2fa;return join(_0x113a5f[_0x1681f9(0x199)],..._0x2bade4[_0x1681f9(0x1a8)]('/'))+_0x1681f9(0x1ad);}export function createHookLocationMap(_0x16613f){const _0x30e298=a202_0x38b2fa,_0x210f49=new Map();for(const _0x1677f5 of _0x16613f){_0x1677f5['beforeScriptId']&&_0x210f49[_0x30e298(0x198)](_0x1677f5[_0x30e298(0x19f)],{'datasetCode':_0x1677f5[_0x30e298(0x1b2)],'operationType':snakeToCamel(_0x1677f5['operationType']),'functionNode':_0x30e298(0x197)}),_0x1677f5[_0x30e298(0x1ab)]&&_0x210f49[_0x30e298(0x198)](_0x1677f5['afterScriptId'],{'datasetCode':_0x1677f5[_0x30e298(0x1b2)],'operationType':snakeToCamel(_0x1677f5[_0x30e298(0x190)]),'functionNode':'after'});}return _0x210f49;}export function resolveRemoteScriptTarget(_0x452e5f,_0x4da4e6,_0x5a31e6,_0x469529,_0x36329d){const _0x12af33=a202_0x38b2fa,_0x3d2712=normalizeBffType(_0x4da4e6[_0x12af33(0x1b0)]);if(!_0x3d2712||!_0x4da4e6['functionName'])return null;if(_0x3d2712===_0x12af33(0x1b1)){const _0x2b9ca7=(_0x4da4e6['id']?_0x5a31e6[_0x12af33(0x1aa)](_0x4da4e6['id']):undefined)??findHookLocationByRemoteId(_0x469529,_0x4da4e6['id']);if(!_0x2b9ca7)return null;const _0x1e307b=_0x2b9ca7['alias']||_0x36329d[_0x12af33(0x1aa)](_0x2b9ca7['datasetCode']),_0x583137=_0x1e307b??_0x2b9ca7['datasetCode'],_0xea9ec={..._0x2b9ca7,'alias':_0x1e307b},_0x457838='HOOK/'+_0x583137+'/'+_0xea9ec['operationType']+'/'+_0xea9ec[_0x12af33(0x19c)]+'/'+_0x4da4e6[_0x12af33(0x1af)];return{'lockKey':_0x457838,'filePath':resolveLocalFilePathFromLockKey(_0x452e5f,_0x457838),'type':_0x12af33(0x1b1),'hookLocation':_0xea9ec};}const _0x8de2f5=_0x3d2712+'/'+_0x4da4e6['functionName'];return{'lockKey':_0x8de2f5,'filePath':resolveLocalFilePathFromLockKey(_0x452e5f,_0x8de2f5),'type':_0x3d2712};}export async function ensureParentDirectory(_0x2aff49){await mkdir(dirname(_0x2aff49),{'recursive':!![]});}function a202_0x4a27(_0x2799ee,_0x4735be){_0x2799ee=_0x2799ee-0x18f;const _0x50d7d4=a202_0x50d7();let _0x4a2716=_0x50d7d4[_0x2799ee];return _0x4a2716;}export async function fileExists(_0x55bae4){try{return await access(_0x55bae4,constants['F_OK']),!![];}catch{return![];}}export async function directoryExists(_0x203beb){const _0x2a95c1=a202_0x38b2fa;try{const _0x45846d=await stat(_0x203beb);return _0x45846d[_0x2a95c1(0x1b3)]();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x441bef,_0x4063ce){const _0x10731a=a203_0x4fe6,_0x8949fe=_0x441bef();while(!![]){try{const _0x328804=-parseInt(_0x10731a(0x18b))/0x1*(parseInt(_0x10731a(0x185))/0x2)+parseInt(_0x10731a(0x188))/0x3+parseInt(_0x10731a(0x186))/0x4*(parseInt(_0x10731a(0x18f))/0x5)+-parseInt(_0x10731a(0x18e))/0x6*(-parseInt(_0x10731a(0x191))/0x7)+parseInt(_0x10731a(0x189))/0x8+-parseInt(_0x10731a(0x190))/0x9*(parseInt(_0x10731a(0x182))/0xa)+-parseInt(_0x10731a(0x184))/0xb;if(_0x328804===_0x4063ce)break;else _0x8949fe['push'](_0x8949fe['shift']());}catch(_0x2de03c){_0x8949fe['push'](_0x8949fe['shift']());}}}(a203_0x4e69,0xc92cd));import{readFile}from'node:fs/promises';import a203_0x655d36 from'node:crypto';export function computeContentHash(_0x30106d){const _0x216101=a203_0x4fe6;return a203_0x655d36[_0x216101(0x183)](_0x216101(0x18a))[_0x216101(0x18d)](_0x30106d)[_0x216101(0x187)](_0x216101(0x18c));}export async function computeFileHash(_0x1a1b65){const _0x7e3d61=await readFile(_0x1a1b65,'utf8');return computeContentHash(_0x7e3d61);}function a203_0x4fe6(_0x4e35ee,_0x26ab6d){_0x4e35ee=_0x4e35ee-0x182;const _0x4e69c4=a203_0x4e69();let _0x4fe63d=_0x4e69c4[_0x4e35ee];return _0x4fe63d;}function a203_0x4e69(){const _0x4660c1=['9028248zOmKot','md5','427gapznV','hex','update','3377244Hmsdrv','55GcdZHk','396DGASNL','7ASuFIT','367440VxilKT','createHash','536723UWvuDK','5296YIPxsk','563692nkYDSX','digest','1136040Lcwxal'];a203_0x4e69=function(){return _0x4660c1;};return a203_0x4e69();}
1
+ (function(_0x314fc3,_0x5ba9a2){const _0x35fa61=a203_0x348e,_0x15834e=_0x314fc3();while(!![]){try{const _0x6794f6=-parseInt(_0x35fa61(0x1ab))/0x1*(parseInt(_0x35fa61(0x1b1))/0x2)+-parseInt(_0x35fa61(0x1b7))/0x3*(parseInt(_0x35fa61(0x1af))/0x4)+-parseInt(_0x35fa61(0x1b0))/0x5+parseInt(_0x35fa61(0x1b3))/0x6+parseInt(_0x35fa61(0x1b5))/0x7+-parseInt(_0x35fa61(0x1b6))/0x8+parseInt(_0x35fa61(0x1ae))/0x9;if(_0x6794f6===_0x5ba9a2)break;else _0x15834e['push'](_0x15834e['shift']());}catch(_0x399e51){_0x15834e['push'](_0x15834e['shift']());}}}(a203_0x800f,0xdecf8));function a203_0x800f(){const _0x1fc6bb=['utf8','digest','29366802VOVOpz','56GijTfZ','6653615YxhlDQ','3074cQXfEI','update','7935906fNRtSq','hex','6549606VVuXdK','4951280hYCkNO','379422MzfRTp','578zQhdNW'];a203_0x800f=function(){return _0x1fc6bb;};return a203_0x800f();}import{readFile}from'node:fs/promises';import a203_0x1c8c2c from'node:crypto';export function computeContentHash(_0x1c0659){const _0x3a760d=a203_0x348e;return a203_0x1c8c2c['createHash']('md5')[_0x3a760d(0x1b2)](_0x1c0659)[_0x3a760d(0x1ad)](_0x3a760d(0x1b4));}function a203_0x348e(_0x40839b,_0x1a5084){_0x40839b=_0x40839b-0x1ab;const _0x800f15=a203_0x800f();let _0x348ef5=_0x800f15[_0x40839b];return _0x348ef5;}export async function computeFileHash(_0x207040){const _0x24f441=a203_0x348e,_0x370055=await readFile(_0x207040,_0x24f441(0x1ac));return computeContentHash(_0x370055);}
@@ -1 +1 @@
1
- (function(_0x3fbc6d,_0x2f53f3){const _0x4d1e59=a204_0xe9c0,_0x515b86=_0x3fbc6d();while(!![]){try{const _0xe93e6d=parseInt(_0x4d1e59(0x15e))/0x1*(parseInt(_0x4d1e59(0x157))/0x2)+-parseInt(_0x4d1e59(0x16c))/0x3+parseInt(_0x4d1e59(0x15a))/0x4+-parseInt(_0x4d1e59(0x158))/0x5*(-parseInt(_0x4d1e59(0x162))/0x6)+parseInt(_0x4d1e59(0x16b))/0x7+-parseInt(_0x4d1e59(0x167))/0x8+parseInt(_0x4d1e59(0x15c))/0x9;if(_0xe93e6d===_0x2f53f3)break;else _0x515b86['push'](_0x515b86['shift']());}catch(_0x583a42){_0x515b86['push'](_0x515b86['shift']());}}}(a204_0x3942,0xb2472));import{mkdir,readFile,writeFile}from'node:fs/promises';function a204_0x3942(){const _0x4a3a77=['1409972BEsWWI','scriptsRoot','6254694TMHFnM','ENOENT','8901CQRMBB','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','apps','lastSync','12NtmSzi','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','\x22\x20vs\x20lock\x20\x22','object',':\x20scriptsRoot\x20mismatch\x20—\x20','11647152XUuJNl','\x22.\x20','parse','stringify','3302446jxFXLe','2965440FDQVkN','current\x20\x22','utf8','functions','118aOmXTp','2825510Caccnp','code'];a204_0x3942=function(){return _0x4a3a77;};return a204_0x3942();}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x5c591b,_0x22a863,_0x328577,_0x1144b1){const _0x13bce8=a204_0xe9c0,_0x4a9dcb={'apps':_0x5c591b['apps']&&typeof _0x5c591b[_0x13bce8(0x160)]===_0x13bce8(0x165)?_0x5c591b[_0x13bce8(0x160)]:{}};let _0x1524cc=_0x4a9dcb[_0x13bce8(0x160)][_0x22a863];if(!_0x1524cc)return _0x1524cc={'scriptsRoot':_0x328577,'lastSync':'','functions':{}},_0x4a9dcb[_0x13bce8(0x160)][_0x22a863]=_0x1524cc,{'lockData':_0x4a9dcb,'appLock':_0x1524cc};if(!_0x1524cc[_0x13bce8(0x15b)])_0x1524cc[_0x13bce8(0x15b)]=_0x328577;else{if(_0x1524cc[_0x13bce8(0x15b)]!==_0x328577)throw new Error(_0x1144b1+_0x13bce8(0x166)+(_0x13bce8(0x16d)+_0x328577+_0x13bce8(0x164)+_0x1524cc[_0x13bce8(0x15b)]+_0x13bce8(0x168))+_0x13bce8(0x163));}return!_0x1524cc[_0x13bce8(0x16f)]&&(_0x1524cc[_0x13bce8(0x16f)]={}),!_0x1524cc[_0x13bce8(0x161)]&&(_0x1524cc['lastSync']=''),{'lockData':_0x4a9dcb,'appLock':_0x1524cc};}export async function readBffLockFile(_0x5e113b){const _0x26ddd8=a204_0xe9c0;try{const _0x3ca356=await readFile(_0x5e113b,_0x26ddd8(0x16e)),_0x200ff1=JSON[_0x26ddd8(0x169)](_0x3ca356);return{'apps':_0x200ff1[_0x26ddd8(0x160)]&&typeof _0x200ff1[_0x26ddd8(0x160)]===_0x26ddd8(0x165)?_0x200ff1['apps']:{}};}catch(_0x15417a){if(_0x15417a[_0x26ddd8(0x159)]===_0x26ddd8(0x15d))return null;throw new Error(_0x26ddd8(0x15f)+String(_0x15417a));}}function a204_0xe9c0(_0x19fa16,_0x407bb9){_0x19fa16=_0x19fa16-0x157;const _0x39420e=a204_0x3942();let _0xe9c042=_0x39420e[_0x19fa16];return _0xe9c042;}export async function writeBffLockFile(_0x536d4c,_0x1e0e8c){const _0x5a6995=a204_0xe9c0;await mkdir(dirname(_0x536d4c),{'recursive':!![]}),await writeFile(_0x536d4c,JSON[_0x5a6995(0x16a)](_0x1e0e8c,null,0x2),_0x5a6995(0x16e));}
1
+ (function(_0x3a3d4a,_0xcb7287){const _0x4e7adf=a204_0x527c,_0x50ccb9=_0x3a3d4a();while(!![]){try{const _0x1920a9=-parseInt(_0x4e7adf(0x6e))/0x1*(-parseInt(_0x4e7adf(0x6c))/0x2)+parseInt(_0x4e7adf(0x73))/0x3+parseInt(_0x4e7adf(0x66))/0x4+-parseInt(_0x4e7adf(0x6f))/0x5*(parseInt(_0x4e7adf(0x70))/0x6)+-parseInt(_0x4e7adf(0x72))/0x7+-parseInt(_0x4e7adf(0x75))/0x8+parseInt(_0x4e7adf(0x74))/0x9;if(_0x1920a9===_0xcb7287)break;else _0x50ccb9['push'](_0x50ccb9['shift']());}catch(_0x440f02){_0x50ccb9['push'](_0x50ccb9['shift']());}}}(a204_0x40b3,0x29251));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a204_0x40b3(){const _0x3bb811=['Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','functions','16pdAjPL',':\x20scriptsRoot\x20mismatch\x20—\x20','2728dzfhuF','300eZIsHG','1758kzznnO','parse','1592171zwvcFQ','804921jKQqFk','3246579PZLYFT','2268416xYFPLP','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','\x22.\x20','code','scriptsRoot','apps','object','185008oAesfA','utf8','lastSync','stringify'];a204_0x40b3=function(){return _0x3bb811;};return a204_0x40b3();}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x179a71,_0xe7d4a4,_0x2ba706,_0xea472e){const _0x3c09ad=a204_0x527c,_0x5bd76a={'apps':_0x179a71[_0x3c09ad(0x7a)]&&typeof _0x179a71[_0x3c09ad(0x7a)]===_0x3c09ad(0x7b)?_0x179a71[_0x3c09ad(0x7a)]:{}};let _0x34a918=_0x5bd76a[_0x3c09ad(0x7a)][_0xe7d4a4];if(!_0x34a918)return _0x34a918={'scriptsRoot':_0x2ba706,'lastSync':'','functions':{}},_0x5bd76a[_0x3c09ad(0x7a)][_0xe7d4a4]=_0x34a918,{'lockData':_0x5bd76a,'appLock':_0x34a918};if(!_0x34a918[_0x3c09ad(0x79)])_0x34a918[_0x3c09ad(0x79)]=_0x2ba706;else{if(_0x34a918[_0x3c09ad(0x79)]!==_0x2ba706)throw new Error(_0xea472e+_0x3c09ad(0x6d)+('current\x20\x22'+_0x2ba706+'\x22\x20vs\x20lock\x20\x22'+_0x34a918['scriptsRoot']+_0x3c09ad(0x77))+_0x3c09ad(0x6a));}return!_0x34a918[_0x3c09ad(0x6b)]&&(_0x34a918[_0x3c09ad(0x6b)]={}),!_0x34a918['lastSync']&&(_0x34a918[_0x3c09ad(0x68)]=''),{'lockData':_0x5bd76a,'appLock':_0x34a918};}export async function readBffLockFile(_0x3ed3d0){const _0xe51f64=a204_0x527c;try{const _0x55e290=await readFile(_0x3ed3d0,'utf8'),_0x506701=JSON[_0xe51f64(0x71)](_0x55e290);return{'apps':_0x506701['apps']&&typeof _0x506701[_0xe51f64(0x7a)]===_0xe51f64(0x7b)?_0x506701[_0xe51f64(0x7a)]:{}};}catch(_0x3c25c6){if(_0x3c25c6[_0xe51f64(0x78)]==='ENOENT')return null;throw new Error(_0xe51f64(0x76)+String(_0x3c25c6));}}function a204_0x527c(_0x5d2fb5,_0x5ad8d8){_0x5d2fb5=_0x5d2fb5-0x66;const _0x40b30a=a204_0x40b3();let _0x527c80=_0x40b30a[_0x5d2fb5];return _0x527c80;}export async function writeBffLockFile(_0x4c5424,_0x194714){const _0xce74b7=a204_0x527c;await mkdir(dirname(_0x4c5424),{'recursive':!![]}),await writeFile(_0x4c5424,JSON[_0xce74b7(0x69)](_0x194714,null,0x2),_0xce74b7(0x67));}
@@ -1 +1 @@
1
- (function(_0x9b4f32,_0x37a705){const _0x5bb77b=a206_0x4739,_0xef0d0d=_0x9b4f32();while(!![]){try{const _0x4b861b=parseInt(_0x5bb77b(0xff))/0x1*(-parseInt(_0x5bb77b(0x103))/0x2)+parseInt(_0x5bb77b(0xfd))/0x3+parseInt(_0x5bb77b(0x10a))/0x4*(-parseInt(_0x5bb77b(0x113))/0x5)+-parseInt(_0x5bb77b(0x10b))/0x6*(parseInt(_0x5bb77b(0x102))/0x7)+parseInt(_0x5bb77b(0xfe))/0x8*(-parseInt(_0x5bb77b(0x108))/0x9)+-parseInt(_0x5bb77b(0x112))/0xa+-parseInt(_0x5bb77b(0x104))/0xb*(-parseInt(_0x5bb77b(0x10e))/0xc);if(_0x4b861b===_0x37a705)break;else _0xef0d0d['push'](_0xef0d0d['shift']());}catch(_0x45a830){_0xef0d0d['push'](_0xef0d0d['shift']());}}}(a206_0x3326,0x62e2a));function a206_0x3326(){const _0x23c1a5=['1107279LukHXQ','test','4QKOTEf','50856zkgsgF','toUpperCase','match','12cTcmDq','before','trim','operationType','18390rxtIjO','2070895FGKOjd','after','267675GPhPyG','16TsnpWN','6PgfclI','values','remoteId','602WsgzYz','198126cfgOIH','25313233KGveqn','replace','functionNode','datasetCode'];a206_0x3326=function(){return _0x23c1a5;};return a206_0x3326();}export function snakeToCamel(_0x55264a){const _0x25c91f=a206_0x4739;return _0x55264a['toLowerCase']()[_0x25c91f(0x105)](/_([a-z])/g,(_0x2f51b0,_0x5f492f)=>_0x5f492f[_0x25c91f(0x10c)]());}export function findHookLocationByRemoteId(_0x33c44f,_0xd1db58){const _0x28df02=a206_0x4739;if(!_0xd1db58)return undefined;for(const _0x3ded70 of Object[_0x28df02(0x100)](_0x33c44f)){if(_0x3ded70[_0x28df02(0x101)]===_0xd1db58&&_0x3ded70[_0x28df02(0x107)]&&_0x3ded70[_0x28df02(0x111)]&&_0x3ded70[_0x28df02(0x106)])return{'datasetCode':_0x3ded70[_0x28df02(0x107)],'operationType':_0x3ded70[_0x28df02(0x111)],'functionNode':_0x3ded70[_0x28df02(0x106)]};}return undefined;}export function extractScriptDescription(_0x32269d){const _0x5003c3=a206_0x4739,_0x259c54=_0x32269d[_0x5003c3(0x10d)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x259c54?.[0x1]?.[_0x5003c3(0x110)]()||undefined;}export function isValidBffFunctionName(_0x28fc67){const _0x284490=a206_0x4739;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x284490(0x109)](_0x28fc67);}function a206_0x4739(_0x498f68,_0x288d25){_0x498f68=_0x498f68-0xfd;const _0x3326de=a206_0x3326();let _0x47399b=_0x3326de[_0x498f68];return _0x47399b;}export function normalizeHookFunctionNode(_0x20b384){const _0xa56744=a206_0x4739;if(!_0x20b384)return undefined;const _0x23220e=_0x20b384[_0xa56744(0x110)]()['toLowerCase']();if(_0x23220e===_0xa56744(0x10f)||_0x23220e===_0xa56744(0x114))return _0x23220e;return undefined;}
1
+ function a206_0x5c3a(_0x419706,_0x37d009){_0x419706=_0x419706-0x193;const _0x3fca17=a206_0x3fca();let _0x5c3ac6=_0x3fca17[_0x419706];return _0x5c3ac6;}function a206_0x3fca(){const _0x35f638=['3VtCRpr','12522560WMEkvI','3262694OjyezX','18nHyaYr','replace','16121870zxPWEl','values','1493354HwEuFy','datasetCode','5SIPmrG','9661482odSdGI','match','4243169DDAIVv','remoteId','trim','toLowerCase','4980884LWHdsN','functionNode','toUpperCase','operationType','before'];a206_0x3fca=function(){return _0x35f638;};return a206_0x3fca();}(function(_0x5f1827,_0x560b69){const _0xe40efb=a206_0x5c3a,_0x1a387b=_0x5f1827();while(!![]){try{const _0xe5e7b0=-parseInt(_0xe40efb(0x19d))/0x1+parseInt(_0xe40efb(0x198))/0x2+parseInt(_0xe40efb(0x196))/0x3*(parseInt(_0xe40efb(0x1a6))/0x4)+parseInt(_0xe40efb(0x19f))/0x5*(-parseInt(_0xe40efb(0x1a0))/0x6)+-parseInt(_0xe40efb(0x1a2))/0x7+-parseInt(_0xe40efb(0x197))/0x8+-parseInt(_0xe40efb(0x199))/0x9*(-parseInt(_0xe40efb(0x19b))/0xa);if(_0xe5e7b0===_0x560b69)break;else _0x1a387b['push'](_0x1a387b['shift']());}catch(_0x4146de){_0x1a387b['push'](_0x1a387b['shift']());}}}(a206_0x3fca,0xc99fe));export function snakeToCamel(_0x18d85d){const _0x4bac14=a206_0x5c3a;return _0x18d85d[_0x4bac14(0x1a5)]()[_0x4bac14(0x19a)](/_([a-z])/g,(_0x372fe1,_0x524acf)=>_0x524acf[_0x4bac14(0x193)]());}export function findHookLocationByRemoteId(_0x16fee7,_0x5f07aa){const _0x330f5b=a206_0x5c3a;if(!_0x5f07aa)return undefined;for(const _0x5c0e56 of Object[_0x330f5b(0x19c)](_0x16fee7)){if(_0x5c0e56[_0x330f5b(0x1a3)]===_0x5f07aa&&_0x5c0e56['datasetCode']&&_0x5c0e56[_0x330f5b(0x194)]&&_0x5c0e56['functionNode'])return{'datasetCode':_0x5c0e56[_0x330f5b(0x19e)],'operationType':_0x5c0e56[_0x330f5b(0x194)],'functionNode':_0x5c0e56[_0x330f5b(0x1a7)]};}return undefined;}export function extractScriptDescription(_0x37e5c6){const _0x3ac5d2=a206_0x5c3a,_0x4af56e=_0x37e5c6[_0x3ac5d2(0x1a1)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x4af56e?.[0x1]?.[_0x3ac5d2(0x1a4)]()||undefined;}export function isValidBffFunctionName(_0x4b16fe){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x4b16fe);}export function normalizeHookFunctionNode(_0x7643ed){const _0x5908fc=a206_0x5c3a;if(!_0x7643ed)return undefined;const _0x4adb9e=_0x7643ed[_0x5908fc(0x1a4)]()[_0x5908fc(0x1a5)]();if(_0x4adb9e===_0x5908fc(0x195)||_0x4adb9e==='after')return _0x4adb9e;return undefined;}
@@ -1 +1 @@
1
- function a207_0x273e(){const _0x2f60f7=['set','includes','931558zubghR','148864BOVekJ','2618526zJZvAx','.\x20Be\x20more\x20specific.','toLowerCase','dbtableConfig','get','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','has','\x22.\x20Available:\x20','join','333ZCYGNk','95052QTDaLu','db-','find','1354737UZmyqe','No\x20database\x20matching\x20\x22','39350iyxzwm','length','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','96935mDCGQN','isNaN','dbName','\x22\x20matches\x20multiple\x20databases:\x20','112YeBBhg','40yHpGkH','dbId','map'];a207_0x273e=function(){return _0x2f60f7;};return a207_0x273e();}(function(_0x2712a6,_0x5abae3){const _0x2f8e5b=a207_0x413c,_0x3c60fa=_0x2712a6();while(!![]){try{const _0x2c4060=-parseInt(_0x2f8e5b(0x18e))/0x1+-parseInt(_0x2f8e5b(0x181))/0x2+parseInt(_0x2f8e5b(0x191))/0x3+parseInt(_0x2f8e5b(0x17c))/0x4*(-parseInt(_0x2f8e5b(0x177))/0x5)+parseInt(_0x2f8e5b(0x183))/0x6+-parseInt(_0x2f8e5b(0x17b))/0x7*(-parseInt(_0x2f8e5b(0x182))/0x8)+-parseInt(_0x2f8e5b(0x18d))/0x9*(parseInt(_0x2f8e5b(0x193))/0xa);if(_0x2c4060===_0x5abae3)break;else _0x3c60fa['push'](_0x3c60fa['shift']());}catch(_0x3b7119){_0x3c60fa['push'](_0x3c60fa['shift']());}}}(a207_0x273e,0x45af8));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x5bfb8){const _0x227bc0=a207_0x413c;if(cache[_0x227bc0(0x18a)](_0x5bfb8))return cache[_0x227bc0(0x187)](_0x5bfb8);const _0x483126=await listDatasets(_0x5bfb8),_0x31c655=new Map();for(const _0x32e405 of _0x483126){const _0x1dc64d=_0x32e405[_0x227bc0(0x186)];_0x1dc64d?.[_0x227bc0(0x17d)]!=null&&_0x31c655[_0x227bc0(0x17f)](_0x1dc64d[_0x227bc0(0x17d)],_0x1dc64d[_0x227bc0(0x179)]??_0x227bc0(0x18f)+_0x1dc64d[_0x227bc0(0x17d)]);}const _0x3961a9=[..._0x31c655['entries']()]['map'](([_0x29b912,_0x159c71])=>({'dbId':_0x29b912,'dbName':_0x159c71}));return cache[_0x227bc0(0x17f)](_0x5bfb8,_0x3961a9),_0x3961a9;}export async function resolveDb(_0x1a3177,_0x3dee40){const _0x3ec3ac=a207_0x413c,_0x563f8a=await listDatabases(_0x1a3177);if(_0x563f8a['length']===0x0)return{'resolved':[],'error':_0x3ec3ac(0x189)+_0x1a3177+_0x3ec3ac(0x188)};if(!_0x3dee40)return{'resolved':_0x563f8a};const _0x18d8f0=Number(_0x3dee40);if(!Number[_0x3ec3ac(0x178)](_0x18d8f0)){const _0x563b32=_0x563f8a[_0x3ec3ac(0x190)](_0x16585b=>_0x16585b['dbId']===_0x18d8f0);if(_0x563b32)return{'resolved':[_0x563b32]};}const _0x18849d=_0x3dee40[_0x3ec3ac(0x185)](),_0x5cfb67=_0x563f8a['filter'](_0x120ef0=>_0x120ef0[_0x3ec3ac(0x179)][_0x3ec3ac(0x185)]()[_0x3ec3ac(0x180)](_0x18849d));if(_0x5cfb67[_0x3ec3ac(0x194)]>0x0)return{'resolved':_0x5cfb67};const _0x2af7bc=_0x563f8a['map'](_0x45daa5=>_0x45daa5[_0x3ec3ac(0x179)]+'\x20('+_0x45daa5[_0x3ec3ac(0x17d)]+')')[_0x3ec3ac(0x18c)](',\x20');return{'resolved':[],'error':_0x3ec3ac(0x192)+_0x3dee40+'\x22\x20under\x20app\x20\x22'+_0x1a3177+_0x3ec3ac(0x18b)+_0x2af7bc+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}function a207_0x413c(_0x58792f,_0x21b688){_0x58792f=_0x58792f-0x176;const _0x273ea4=a207_0x273e();let _0x413c34=_0x273ea4[_0x58792f];return _0x413c34;}export async function resolveOneDb(_0x4d3962,_0xc4d948){const _0x13dd5d=a207_0x413c,{resolved:_0x10c27c,error:_0x583892}=await resolveDb(_0x4d3962,_0xc4d948);if(_0x583892)return{'db':null,'error':_0x583892};if(_0x10c27c[_0x13dd5d(0x194)]===0x1)return{'db':_0x10c27c[0x0]};if(!_0xc4d948){const _0x5e7185=_0x10c27c[_0x13dd5d(0x17e)](_0x3b5b2d=>_0x3b5b2d[_0x13dd5d(0x179)]+'\x20('+_0x3b5b2d[_0x13dd5d(0x17d)]+')')[_0x13dd5d(0x18c)](',\x20');return{'db':null,'error':_0x13dd5d(0x176)+_0x5e7185};}const _0xecad96=_0x10c27c[_0x13dd5d(0x17e)](_0x3aa1ab=>_0x3aa1ab[_0x13dd5d(0x179)]+'\x20('+_0x3aa1ab['dbId']+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0xc4d948+_0x13dd5d(0x17a)+_0xecad96+_0x13dd5d(0x184)};}export async function getDbName(_0x3404ac,_0x2d84fa){const _0x2ef711=a207_0x413c,_0x42e2d2=await listDatabases(_0x3404ac);return _0x42e2d2[_0x2ef711(0x190)](_0x34991c=>_0x34991c[_0x2ef711(0x17d)]===_0x2d84fa)?.['dbName'];}
1
+ (function(_0x123a16,_0x1e40c1){const _0x143017=a207_0x3b06,_0x419010=_0x123a16();while(!![]){try{const _0x2e9c20=parseInt(_0x143017(0x155))/0x1+parseInt(_0x143017(0x13c))/0x2+-parseInt(_0x143017(0x13e))/0x3*(-parseInt(_0x143017(0x13b))/0x4)+parseInt(_0x143017(0x151))/0x5+parseInt(_0x143017(0x153))/0x6+parseInt(_0x143017(0x14d))/0x7+-parseInt(_0x143017(0x150))/0x8*(parseInt(_0x143017(0x148))/0x9);if(_0x2e9c20===_0x1e40c1)break;else _0x419010['push'](_0x419010['shift']());}catch(_0x238696){_0x419010['push'](_0x419010['shift']());}}}(a207_0x4365,0x84742));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0xa187a1){const _0x36e434=a207_0x3b06;if(cache[_0x36e434(0x13a)](_0xa187a1))return cache[_0x36e434(0x149)](_0xa187a1);const _0x55b5d4=await listDatasets(_0xa187a1),_0x26979d=new Map();for(const _0x2947ee of _0x55b5d4){const _0x22c936=_0x2947ee[_0x36e434(0x142)];_0x22c936?.['dbId']!=null&&_0x26979d[_0x36e434(0x13f)](_0x22c936[_0x36e434(0x14b)],_0x22c936['dbName']??_0x36e434(0x146)+_0x22c936['dbId']);}const _0x168cf8=[..._0x26979d[_0x36e434(0x139)]()][_0x36e434(0x140)](([_0x1d69d9,_0x47fe56])=>({'dbId':_0x1d69d9,'dbName':_0x47fe56}));return cache[_0x36e434(0x13f)](_0xa187a1,_0x168cf8),_0x168cf8;}export async function resolveDb(_0xfd8933,_0x4c6d3b){const _0x18a4ea=a207_0x3b06,_0x236332=await listDatabases(_0xfd8933);if(_0x236332[_0x18a4ea(0x13d)]===0x0)return{'resolved':[],'error':'No\x20linked\x20databases\x20found\x20under\x20app\x20\x22'+_0xfd8933+_0x18a4ea(0x14e)};if(!_0x4c6d3b)return{'resolved':_0x236332};const _0x265cf2=Number(_0x4c6d3b);if(!Number[_0x18a4ea(0x152)](_0x265cf2)){const _0x2b6f63=_0x236332['find'](_0x5411e7=>_0x5411e7[_0x18a4ea(0x14b)]===_0x265cf2);if(_0x2b6f63)return{'resolved':[_0x2b6f63]};}const _0x1b75fe=_0x4c6d3b[_0x18a4ea(0x14c)](),_0x4b9978=_0x236332[_0x18a4ea(0x154)](_0x7ee802=>_0x7ee802[_0x18a4ea(0x147)]['toLowerCase']()[_0x18a4ea(0x14f)](_0x1b75fe));if(_0x4b9978[_0x18a4ea(0x13d)]>0x0)return{'resolved':_0x4b9978};const _0x753c29=_0x236332[_0x18a4ea(0x140)](_0xacbc21=>_0xacbc21[_0x18a4ea(0x147)]+'\x20('+_0xacbc21['dbId']+')')[_0x18a4ea(0x143)](',\x20');return{'resolved':[],'error':_0x18a4ea(0x144)+_0x4c6d3b+_0x18a4ea(0x14a)+_0xfd8933+_0x18a4ea(0x138)+_0x753c29+_0x18a4ea(0x145)};}export async function resolveOneDb(_0x4761d1,_0x437421){const _0x2fba75=a207_0x3b06,{resolved:_0x4f26fb,error:_0xd3d4a}=await resolveDb(_0x4761d1,_0x437421);if(_0xd3d4a)return{'db':null,'error':_0xd3d4a};if(_0x4f26fb[_0x2fba75(0x13d)]===0x1)return{'db':_0x4f26fb[0x0]};if(!_0x437421){const _0x318b6a=_0x4f26fb['map'](_0x448c69=>_0x448c69['dbName']+'\x20('+_0x448c69[_0x2fba75(0x14b)]+')')[_0x2fba75(0x143)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x318b6a};}const _0x5187ca=_0x4f26fb[_0x2fba75(0x140)](_0x3fb7cd=>_0x3fb7cd['dbName']+'\x20('+_0x3fb7cd['dbId']+')')[_0x2fba75(0x143)](',\x20');return{'db':null,'error':'\x22'+_0x437421+_0x2fba75(0x141)+_0x5187ca+'.\x20Be\x20more\x20specific.'};}function a207_0x3b06(_0x36dd52,_0x17a1e5){_0x36dd52=_0x36dd52-0x137;const _0x436577=a207_0x4365();let _0x3b06e4=_0x436577[_0x36dd52];return _0x3b06e4;}function a207_0x4365(){const _0x3f555d=['\x22\x20matches\x20multiple\x20databases:\x20','dbtableConfig','join','No\x20database\x20matching\x20\x22','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','db-','dbName','1268451mSzSaq','get','\x22\x20under\x20app\x20\x22','dbId','toLowerCase','6723234TbSZUI','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','includes','104oHkxkd','1789380sjrSCj','isNaN','410760MWoWiS','filter','283815EQngTM','find','\x22.\x20Available:\x20','entries','has','7836ynBoEV','1071300SSKrSe','length','258zxhVug','set','map'];a207_0x4365=function(){return _0x3f555d;};return a207_0x4365();}export async function getDbName(_0x4a857a,_0x28ffa2){const _0x114d49=a207_0x3b06,_0x4fede6=await listDatabases(_0x4a857a);return _0x4fede6[_0x114d49(0x137)](_0x8f552a=>_0x8f552a[_0x114d49(0x14b)]===_0x28ffa2)?.[_0x114d49(0x147)];}
@@ -1 +1 @@
1
- const a208_0x191517=a208_0x8ba6;(function(_0x664224,_0x3f4633){const _0x402e16=a208_0x8ba6,_0x472689=_0x664224();while(!![]){try{const _0x5af5ac=parseInt(_0x402e16(0x198))/0x1*(-parseInt(_0x402e16(0x196))/0x2)+-parseInt(_0x402e16(0x19a))/0x3*(-parseInt(_0x402e16(0x18b))/0x4)+-parseInt(_0x402e16(0x18c))/0x5*(-parseInt(_0x402e16(0x190))/0x6)+-parseInt(_0x402e16(0x199))/0x7*(-parseInt(_0x402e16(0x193))/0x8)+parseInt(_0x402e16(0x18f))/0x9*(-parseInt(_0x402e16(0x18d))/0xa)+parseInt(_0x402e16(0x18e))/0xb*(parseInt(_0x402e16(0x195))/0xc)+-parseInt(_0x402e16(0x18a))/0xd;if(_0x5af5ac===_0x3f4633)break;else _0x472689['push'](_0x472689['shift']());}catch(_0x22ee4d){_0x472689['push'](_0x472689['shift']());}}}(a208_0x4545,0x73288));import{constants}from'node:fs';function a208_0x8ba6(_0x3583cd,_0x7e2e32){_0x3583cd=_0x3583cd-0x189;const _0x454512=a208_0x4545();let _0x8ba690=_0x454512[_0x3583cd];return _0x8ba690;}function a208_0x4545(){const _0x27c0e1=['22329Ghdxlg','468eArUYK','.rabetbase','page.lock.json','16TufWvc','page','36LpKBzq','1142QtWGJM','.json','83TPtFxK','812707fpEpqm','528852JqgIrh','cwd','10883470pMYjjw','8jAeXfn','46885uyyhRO','280fmhZxp','401731roLCXV'];a208_0x4545=function(){return _0x27c0e1;};return a208_0x4545();}import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x12ce15,_0x3d9403=process[a208_0x191517(0x189)]()){const _0x1dfdcd=a208_0x191517,_0x580047=resolve(_0x3d9403),_0x375af9=join(_0x580047,_0x1dfdcd(0x191),_0x1dfdcd(0x194));return{'projectRoot':_0x580047,'pagesBaseDir':_0x375af9,'appPagesDir':join(_0x375af9,_0x12ce15),'lockFilePath':join(_0x580047,'.rabetbase',_0x1dfdcd(0x192))};}export function buildPageFileName(_0x17f0dc,_0x35343a){const _0x2fd014=a208_0x191517;return _0x17f0dc+'-'+String(_0x35343a)['toUpperCase']()+_0x2fd014(0x197);}export function resolvePageFilePath(_0x1c19b5,_0x52643f,_0x3e13d7){return join(_0x1c19b5['appPagesDir'],buildPageFileName(_0x52643f,_0x3e13d7));}export async function ensureParentDirectory(_0x4c98a3){await mkdir(dirname(_0x4c98a3),{'recursive':!![]});}export async function fileExists(_0x19e866){try{return await access(_0x19e866,constants['F_OK']),!![];}catch{return![];}}
1
+ function a208_0x275a(_0x5a2178,_0x3c6363){_0x5a2178=_0x5a2178-0x8a;const _0x4373d0=a208_0x4373();let _0x275ab2=_0x4373d0[_0x5a2178];return _0x275ab2;}(function(_0x214f50,_0x438cfc){const _0x3cc209=a208_0x275a,_0x40e6f3=_0x214f50();while(!![]){try{const _0x5ec716=parseInt(_0x3cc209(0x91))/0x1+-parseInt(_0x3cc209(0x97))/0x2+-parseInt(_0x3cc209(0x94))/0x3*(-parseInt(_0x3cc209(0x90))/0x4)+-parseInt(_0x3cc209(0x8c))/0x5*(-parseInt(_0x3cc209(0x8e))/0x6)+parseInt(_0x3cc209(0x95))/0x7*(parseInt(_0x3cc209(0x92))/0x8)+parseInt(_0x3cc209(0x8b))/0x9*(-parseInt(_0x3cc209(0x99))/0xa)+-parseInt(_0x3cc209(0x96))/0xb;if(_0x5ec716===_0x438cfc)break;else _0x40e6f3['push'](_0x40e6f3['shift']());}catch(_0x3c80cd){_0x40e6f3['push'](_0x40e6f3['shift']());}}}(a208_0x4373,0xc842d));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x11a7ac,_0x12bba1=process['cwd']()){const _0x2ec1c3=a208_0x275a,_0x596ae6=resolve(_0x12bba1),_0x47c34f=join(_0x596ae6,_0x2ec1c3(0x98),'page');return{'projectRoot':_0x596ae6,'pagesBaseDir':_0x47c34f,'appPagesDir':join(_0x47c34f,_0x11a7ac),'lockFilePath':join(_0x596ae6,_0x2ec1c3(0x98),_0x2ec1c3(0x8a))};}export function buildPageFileName(_0x5c83dc,_0x4b2987){const _0x274d0a=a208_0x275a;return _0x5c83dc+'-'+String(_0x4b2987)[_0x274d0a(0x8d)]()+_0x274d0a(0x93);}export function resolvePageFilePath(_0x80de2,_0x1db648,_0x4612bd){return join(_0x80de2['appPagesDir'],buildPageFileName(_0x1db648,_0x4612bd));}export async function ensureParentDirectory(_0x461921){await mkdir(dirname(_0x461921),{'recursive':!![]});}function a208_0x4373(){const _0x3927f4=['F_OK','32yTvseb','291732FvRmyN','90616NTxKpp','.json','490821JqxOae','385PSsWLP','1358918RgNOia','2836688pCwqWJ','.rabetbase','10630elkdAf','page.lock.json','6966whwXGL','3550IVOpLm','toUpperCase','8124MeGwGZ'];a208_0x4373=function(){return _0x3927f4;};return a208_0x4373();}export async function fileExists(_0x4efd6b){const _0x3b38aa=a208_0x275a;try{return await access(_0x4efd6b,constants[_0x3b38aa(0x8f)]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a209_0x103d(){const _0x350996=['1002LwZLGa','3154350QpWapJ','2617047bZuCyT','5KutcfV','digest','32AaEdKg','3967368KJkrnk','hex','utf8','2115qWAqkp','update','stringify','6521154VlTlDR','createHash','3388720SAVuGY','md5','parse','44IDhHFr','1660442SzzcwO'];a209_0x103d=function(){return _0x350996;};return a209_0x103d();}(function(_0x24450d,_0x5d2669){const _0x277b28=a209_0x4612,_0x421302=_0x24450d();while(!![]){try{const _0x52dbbc=-parseInt(_0x277b28(0x14c))/0x1*(parseInt(_0x277b28(0x156))/0x2)+-parseInt(_0x277b28(0x157))/0x3+-parseInt(_0x277b28(0x15c))/0x4+-parseInt(_0x277b28(0x159))/0x5*(-parseInt(_0x277b28(0x14f))/0x6)+-parseInt(_0x277b28(0x155))/0x7*(-parseInt(_0x277b28(0x15b))/0x8)+parseInt(_0x277b28(0x158))/0x9+-parseInt(_0x277b28(0x151))/0xa*(-parseInt(_0x277b28(0x154))/0xb);if(_0x52dbbc===_0x5d2669)break;else _0x421302['push'](_0x421302['shift']());}catch(_0x6bf172){_0x421302['push'](_0x421302['shift']());}}}(a209_0x103d,0x8d5e7));import a209_0x32ddbe from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x18afcc){const _0xf852d4=a209_0x4612;return JSON[_0xf852d4(0x14e)](JSON[_0xf852d4(0x153)](_0x18afcc),null,0x2)+'\x0a';}export function computePageContentHash(_0x55c7fd){const _0x53275b=a209_0x4612;return a209_0x32ddbe[_0x53275b(0x150)](_0x53275b(0x152))[_0x53275b(0x14d)](_0x55c7fd)[_0x53275b(0x15a)](_0x53275b(0x15d));}function a209_0x4612(_0x175e59,_0x4ea3d9){_0x175e59=_0x175e59-0x14c;const _0x103d2f=a209_0x103d();let _0x461223=_0x103d2f[_0x175e59];return _0x461223;}export function computeSerializedSchemaHash(_0x191005){return computePageContentHash(serializePageSchemaForFile(_0x191005));}export async function computePageFileHash(_0x50a9fe){const _0x4c77f7=a209_0x4612,_0xca81ef=await readFile(_0x50a9fe,_0x4c77f7(0x15e));return computePageContentHash(_0xca81ef);}
1
+ (function(_0xa3dd34,_0x1cab74){const _0x1b8519=a209_0x1bef,_0x5e9d5e=_0xa3dd34();while(!![]){try{const _0x8e3f5f=parseInt(_0x1b8519(0x12f))/0x1+-parseInt(_0x1b8519(0x136))/0x2*(-parseInt(_0x1b8519(0x131))/0x3)+parseInt(_0x1b8519(0x13a))/0x4*(parseInt(_0x1b8519(0x13c))/0x5)+parseInt(_0x1b8519(0x132))/0x6+parseInt(_0x1b8519(0x137))/0x7+-parseInt(_0x1b8519(0x13b))/0x8+-parseInt(_0x1b8519(0x13d))/0x9*(parseInt(_0x1b8519(0x12e))/0xa);if(_0x8e3f5f===_0x1cab74)break;else _0x5e9d5e['push'](_0x5e9d5e['shift']());}catch(_0x64bb64){_0x5e9d5e['push'](_0x5e9d5e['shift']());}}}(a209_0x2c24,0xe98f3));import a209_0x1df2ad from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x3ca230){return JSON['stringify'](JSON['parse'](_0x3ca230),null,0x2)+'\x0a';}export function computePageContentHash(_0x57b47f){const _0x145ff1=a209_0x1bef;return a209_0x1df2ad[_0x145ff1(0x133)](_0x145ff1(0x138))[_0x145ff1(0x130)](_0x57b47f)[_0x145ff1(0x139)](_0x145ff1(0x135));}export function computeSerializedSchemaHash(_0x308aa4){return computePageContentHash(serializePageSchemaForFile(_0x308aa4));}export async function computePageFileHash(_0x110c71){const _0x3e43a5=a209_0x1bef,_0x5d3921=await readFile(_0x110c71,_0x3e43a5(0x134));return computePageContentHash(_0x5d3921);}function a209_0x1bef(_0x424bcc,_0x26e31c){_0x424bcc=_0x424bcc-0x12e;const _0x2c24d1=a209_0x2c24();let _0x1bef5e=_0x2c24d1[_0x424bcc];return _0x1bef5e;}function a209_0x2c24(){const _0x14367b=['createHash','utf8','hex','4AOKUMC','9559284aJOhRJ','md5','digest','653404OagGxH','6842560FjdjEW','5mmxbqt','28813023WZxJdy','10rUXQWp','411815UyqacU','update','2842305UFxRAa','7066668EWYFkA'];a209_0x2c24=function(){return _0x14367b;};return a209_0x2c24();}
@@ -1 +1 @@
1
- (function(_0x44ce12,_0x1e38ab){const _0x53e142=a210_0x7a53,_0x184a58=_0x44ce12();while(!![]){try{const _0x149e2e=parseInt(_0x53e142(0x1aa))/0x1+parseInt(_0x53e142(0x1b3))/0x2+-parseInt(_0x53e142(0x1b4))/0x3+parseInt(_0x53e142(0x1b5))/0x4*(parseInt(_0x53e142(0x1af))/0x5)+-parseInt(_0x53e142(0x1ab))/0x6*(parseInt(_0x53e142(0x1b0))/0x7)+parseInt(_0x53e142(0x1ae))/0x8+-parseInt(_0x53e142(0x1b1))/0x9;if(_0x149e2e===_0x1e38ab)break;else _0x184a58['push'](_0x184a58['shift']());}catch(_0x5a5724){_0x184a58['push'](_0x184a58['shift']());}}}(a210_0x3df1,0xccd0a));import{mkdir,readFile,writeFile}from'node:fs/promises';function a210_0x7a53(_0x12683d,_0x33fb9b){_0x12683d=_0x12683d-0x1aa;const _0x3df193=a210_0x3df1();let _0x7a53f5=_0x3df193[_0x12683d];return _0x7a53f5;}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x41ec0a,_0x29b744){const _0x1980df=a210_0x7a53,_0x5f4f46={'apps':_0x41ec0a[_0x1980df(0x1b8)]&&typeof _0x41ec0a[_0x1980df(0x1b8)]===_0x1980df(0x1b9)?_0x41ec0a[_0x1980df(0x1b8)]:{}};let _0x159547=_0x5f4f46[_0x1980df(0x1b8)][_0x29b744];if(!_0x159547)return _0x159547={'lastSync':'','pages':{}},_0x5f4f46[_0x1980df(0x1b8)][_0x29b744]=_0x159547,{'lockData':_0x5f4f46,'appLock':_0x159547};return!_0x159547['lastSync']&&(_0x159547['lastSync']=''),(!_0x159547[_0x1980df(0x1b7)]||typeof _0x159547[_0x1980df(0x1b7)]!==_0x1980df(0x1b9))&&(_0x159547[_0x1980df(0x1b7)]={}),{'lockData':_0x5f4f46,'appLock':_0x159547};}export async function readPageLockFile(_0x53d795){const _0x3fafa2=a210_0x7a53;try{const _0x4c26aa=await readFile(_0x53d795,'utf8'),_0x5def3f=JSON[_0x3fafa2(0x1b6)](_0x4c26aa);return{'apps':_0x5def3f[_0x3fafa2(0x1b8)]&&typeof _0x5def3f[_0x3fafa2(0x1b8)]===_0x3fafa2(0x1b9)?_0x5def3f[_0x3fafa2(0x1b8)]:{}};}catch(_0x14a8c0){if(_0x14a8c0[_0x3fafa2(0x1ad)]===_0x3fafa2(0x1b2))return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x14a8c0));}}export async function writePageLockFile(_0x5c090a,_0x6b7f2b){const _0xfc045b=a210_0x7a53;await mkdir(dirname(_0x5c090a),{'recursive':!![]}),await writeFile(_0x5c090a,JSON[_0xfc045b(0x1ac)](_0x6b7f2b,null,0x2),'utf8');}function a210_0x3df1(){const _0xec4d8c=['ENOENT','2394174aScKSy','878208AAfdXX','8BGckJD','parse','pages','apps','object','265765ASsRoo','12102RaXuqt','stringify','code','9308856hNKVhN','1780520shPGFL','5397mJDlHJ','5867118LmMulx'];a210_0x3df1=function(){return _0xec4d8c;};return a210_0x3df1();}
1
+ (function(_0xa0c36b,_0x48e3e5){const _0x82c5c6=a210_0x1636,_0x1185b7=_0xa0c36b();while(!![]){try{const _0x346b40=-parseInt(_0x82c5c6(0xd4))/0x1*(parseInt(_0x82c5c6(0xd5))/0x2)+-parseInt(_0x82c5c6(0xd3))/0x3*(-parseInt(_0x82c5c6(0xcc))/0x4)+parseInt(_0x82c5c6(0xd7))/0x5+-parseInt(_0x82c5c6(0xcd))/0x6+parseInt(_0x82c5c6(0xce))/0x7+-parseInt(_0x82c5c6(0xd6))/0x8+-parseInt(_0x82c5c6(0xd0))/0x9*(-parseInt(_0x82c5c6(0xd1))/0xa);if(_0x346b40===_0x48e3e5)break;else _0x1185b7['push'](_0x1185b7['shift']());}catch(_0x17b77d){_0x1185b7['push'](_0x1185b7['shift']());}}}(a210_0x273a,0xd2333));import{mkdir,readFile,writeFile}from'node:fs/promises';function a210_0x1636(_0x4a819c,_0x48ca02){_0x4a819c=_0x4a819c-0xcc;const _0x273aa9=a210_0x273a();let _0x1636d8=_0x273aa9[_0x4a819c];return _0x1636d8;}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x47038a,_0x3477ef){const _0x4961b4=a210_0x1636,_0x3575a9={'apps':_0x47038a[_0x4961b4(0xd2)]&&typeof _0x47038a[_0x4961b4(0xd2)]===_0x4961b4(0xd9)?_0x47038a[_0x4961b4(0xd2)]:{}};let _0x168174=_0x3575a9['apps'][_0x3477ef];if(!_0x168174)return _0x168174={'lastSync':'','pages':{}},_0x3575a9['apps'][_0x3477ef]=_0x168174,{'lockData':_0x3575a9,'appLock':_0x168174};return!_0x168174['lastSync']&&(_0x168174['lastSync']=''),(!_0x168174[_0x4961b4(0xcf)]||typeof _0x168174['pages']!=='object')&&(_0x168174[_0x4961b4(0xcf)]={}),{'lockData':_0x3575a9,'appLock':_0x168174};}function a210_0x273a(){const _0xdc46f9=['4silozk','628698nlWzmE','4286499Cdgfoa','pages','1458819AlTDFu','10VyyYFA','apps','4983705WJnueF','1604419MQyGYT','2oNysKN','4333840RJyFxH','3381140NtMNdK','utf8','object'];a210_0x273a=function(){return _0xdc46f9;};return a210_0x273a();}export async function readPageLockFile(_0x1eaa13){const _0x5acee4=a210_0x1636;try{const _0xaef8af=await readFile(_0x1eaa13,'utf8'),_0x35d60c=JSON['parse'](_0xaef8af);return{'apps':_0x35d60c[_0x5acee4(0xd2)]&&typeof _0x35d60c['apps']==='object'?_0x35d60c[_0x5acee4(0xd2)]:{}};}catch(_0x3e6954){if(_0x3e6954['code']==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x3e6954));}}export async function writePageLockFile(_0x33ba4c,_0x5f15a1){const _0x1ca88f=a210_0x1636;await mkdir(dirname(_0x33ba4c),{'recursive':!![]}),await writeFile(_0x33ba4c,JSON['stringify'](_0x5f15a1,null,0x2),_0x1ca88f(0xd8));}
@@ -1 +1 @@
1
- (function(_0xcdb2c9,_0x577f5d){const _0x41d0db=a212_0x1582,_0x3f5490=_0xcdb2c9();while(!![]){try{const _0x2adcf0=-parseInt(_0x41d0db(0x205))/0x1*(-parseInt(_0x41d0db(0x20e))/0x2)+parseInt(_0x41d0db(0x1dc))/0x3+parseInt(_0x41d0db(0x1e6))/0x4*(-parseInt(_0x41d0db(0x216))/0x5)+-parseInt(_0x41d0db(0x219))/0x6*(-parseInt(_0x41d0db(0x1eb))/0x7)+-parseInt(_0x41d0db(0x202))/0x8+-parseInt(_0x41d0db(0x200))/0x9+parseInt(_0x41d0db(0x1e8))/0xa;if(_0x2adcf0===_0x577f5d)break;else _0x3f5490['push'](_0x3f5490['shift']());}catch(_0x2b542f){_0x3f5490['push'](_0x3f5490['shift']());}}}(a212_0x5998,0xf3200));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x466956,_0x375f23){const _0x51ec8d=a212_0x1582,_0x35dc61=[],_0xbf6768=normalizeSqlForStaticAnalysis(_0x466956),_0x31a405=(_0xbf6768[_0x51ec8d(0x21d)]?[]:extractJoinFacts(_0xbf6768[_0x51ec8d(0x1e3)]))[_0x51ec8d(0x1f2)](_0x397426=>{const _0x313241=_0x51ec8d;if(_0x397426[_0x313241(0x207)]||_0x397426[_0x313241(0x221)][_0x313241(0x214)]===0x0)return _0x35dc61[_0x313241(0x1fe)]({'code':_0x313241(0x1f3),'table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426[_0x313241(0x1f1)],'columns':_0x397426['columns'],'reason':_0x397426[_0x313241(0x1e4)]??_0x313241(0x1fa)}),{'table':_0x397426['table'],'alias':_0x397426[_0x313241(0x1f1)],'columns':_0x397426[_0x313241(0x221)],'status':'unavailable'};const _0x2b5a10=resolveTableMetadata(_0x375f23,_0x397426[_0x313241(0x1ee)]),_0x590dd7=(_0x2b5a10?.['indexes']??[])['map'](_0xdca050=>({'index':_0xdca050,'matchedPrefix':findEqualityPrefix(_0xdca050['columns'],_0x397426[_0x313241(0x221)])}))[_0x313241(0x20a)](_0x3b5ede=>_0x3b5ede[_0x313241(0x1db)][_0x313241(0x214)]>0x0),_0x54392e=_0x590dd7[_0x313241(0x21c)]((_0x152e65,_0x4ebe80)=>!_0x152e65||_0x4ebe80[_0x313241(0x1db)][_0x313241(0x214)]>_0x152e65[_0x313241(0x1db)][_0x313241(0x214)]?_0x4ebe80:_0x152e65,_0x590dd7[0x0]);if(_0x54392e)return{'table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426[_0x313241(0x1f1)],'columns':_0x397426['columns'],'status':'covered','matchedIndex':{..._0x54392e[_0x313241(0x206)],'matchedPrefix':_0x54392e[_0x313241(0x1db)]}};const _0x516a34=_0x2b5a10?.['indexes']['filter'](_0x478e2a=>_0x478e2a[_0x313241(0x221)][_0x313241(0x218)](_0x5ace36=>_0x397426[_0x313241(0x221)][_0x313241(0x218)](_0x30afde=>columnNamesMatch(_0x5ace36,_0x30afde))))??[];if(_0x516a34[_0x313241(0x214)]>0x0)return _0x35dc61[_0x313241(0x1fe)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426['alias'],'columns':_0x397426[_0x313241(0x221)],'reason':_0x313241(0x1f8)}),{'table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426[_0x313241(0x1f1)],'columns':_0x397426[_0x313241(0x221)],'status':_0x313241(0x1da),'candidateIndexes':_0x516a34};if(_0x2b5a10&&_0x2b5a10[_0x313241(0x1ed)]!==![]&&_0x2b5a10[_0x313241(0x208)][_0x313241(0x214)]>0x0&&_0x397426[_0x313241(0x221)][_0x313241(0x214)]>0x0)return _0x35dc61['push']({'code':'JOIN_INDEX_MISSING','table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426['alias'],'columns':_0x397426[_0x313241(0x221)],'reason':_0x313241(0x1f9)}),{'table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426[_0x313241(0x1f1)],'columns':_0x397426[_0x313241(0x221)],'status':'warning'};return _0x35dc61[_0x313241(0x1fe)]({'code':_0x313241(0x220),'table':_0x397426[_0x313241(0x1ee)],'alias':_0x397426[_0x313241(0x1f1)],'columns':_0x397426['columns'],'reason':_0x2b5a10?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':_0x313241(0x1fc)}),{'table':_0x397426['table'],'alias':_0x397426['alias'],'columns':_0x397426[_0x313241(0x221)],'status':_0x313241(0x1fd)};});return{'checked':_0x31a405['length']>0x0,'joins':_0x31a405,'warnings':_0x35dc61};}function extractJoinFacts(_0x4a30b1){const _0x2137ae=a212_0x1582,_0xa79ef0=maskNestedQueries(stripSqlNoise(_0x4a30b1)),_0x8836aa=maskQuotedIdentifiers(_0xa79ef0),_0xc7424e=[],_0x1b5ffd=new Set(),_0x18f19b=/\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 _0x2b98fc of _0xa79ef0[_0x2137ae(0x1f5)](_0x18f19b)){const _0x5c5847=_0x2b98fc[_0x2137ae(0x206)]??0x0,_0x5c3ca6=_0x2b98fc[0x0][_0x2137ae(0x1df)](/\bJOIN\b/i),_0x2e122a=_0x5c5847+Math[_0x2137ae(0x1ec)](0x0,_0x5c3ca6);if(!/^JOIN\b/i[_0x2137ae(0x1e9)](_0x8836aa[_0x2137ae(0x21a)](_0x2e122a)))continue;_0x1b5ffd['add'](_0x2e122a);const _0x44d00a=normalizeIdentifier(_0x2b98fc[0x1]||_0x2137ae(0x21f)),_0x4882f1=normalizeIdentifier(_0x2b98fc[0x2]??''),_0x4cf742=normalizeIdentifier(_0x2b98fc[0x3]||_0x4882f1[_0x2137ae(0x1dd)]('.')['at'](-0x1)||_0x4882f1),_0x132962=[],_0x4369c9=_0x4882f1===_0x2137ae(0x211);let _0x17b536=_0x44d00a===_0x2137ae(0x1d8)||_0x44d00a===_0x2137ae(0x1ff)||_0x4369c9,_0x461dea=_0x17b536?_0x4369c9?_0x2137ae(0x212):_0x44d00a[_0x2137ae(0x204)]()+_0x2137ae(0x20d):undefined;const _0xbeed85=stripOuterParentheses(_0x2b98fc[0x4]??''),_0x1cde52=_0xbeed85[_0x2137ae(0x1ef)](MYBATIS_DYNAMIC_START_MARKER)||_0xbeed85['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x5dbea0=_0xbeed85[_0x2137ae(0x1ef)](MYBATIS_INCLUDE_MARKER);_0x1cde52&&(_0x17b536=!![],_0x461dea??=_0x2137ae(0x20c));_0x5dbea0&&(_0x17b536=!![],_0x461dea??=_0x2137ae(0x1f0));const _0x3ea818=_0xbeed85[_0x2137ae(0x1f6)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x2137ae(0x1f6)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x2137ae(0x1f6)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x3ea818,'OR')&&(_0x17b536=!![],_0x461dea??=_0x2137ae(0x1fb));for(const _0x54c65c of splitTopLevelAnd(_0x3ea818)){const _0x586534=stripOuterParentheses(_0x54c65c);if(hasTopLevelKeyword(_0x586534,'OR')){_0x17b536=!![],_0x461dea??=_0x2137ae(0x1fb);continue;}const _0x34e8db=splitEquality(_0x586534);if(!_0x34e8db){containsColumnReference(_0x54c65c,_0x4cf742)&&(_0x17b536=!![]);continue;}const _0x1401e7=parseDirectColumnReference(_0x34e8db[0x0],_0x4cf742),_0x2b09f9=parseDirectColumnReference(_0x34e8db[0x1],_0x4cf742),_0x5633f5=containsColumnReference(_0x34e8db[0x0],_0x4cf742),_0x382b70=containsColumnReference(_0x34e8db[0x1],_0x4cf742),_0x1509e7=_0x1401e7&&!_0x382b70?_0x1401e7:_0x2b09f9&&!_0x5633f5?_0x2b09f9:null;if(_0x1509e7&&!_0x132962[_0x2137ae(0x1ef)](_0x1509e7))_0x132962[_0x2137ae(0x1fe)](_0x1509e7);else!_0x1509e7&&containsColumnReference(_0x54c65c,_0x4cf742)&&(_0x17b536=!![]);}_0xc7424e['push']({'table':_0x4882f1,'alias':_0x4cf742,'columns':_0x132962,'unsupportedPredicate':_0x17b536,'unsupportedReason':_0x461dea,'containsUnresolvedInclude':_0x5dbea0,'position':_0x2e122a});}for(const _0x4af3d5 of _0x8836aa[_0x2137ae(0x1f5)](/\bJOIN\b/gi)){const _0x2389a6=_0x4af3d5[_0x2137ae(0x206)]??0x0;if(_0x1b5ffd[_0x2137ae(0x1f7)](_0x2389a6))continue;const _0x1cd481=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x2137ae(0x1e1)](_0xa79ef0[_0x2137ae(0x21a)](_0x2389a6+_0x4af3d5[0x0][_0x2137ae(0x214)])),_0x517b26=normalizeIdentifier(_0x1cd481?.[0x1]||_0x2137ae(0x1e5)),_0x224f3c=normalizeIdentifier(_0x1cd481?.[0x2]||''),_0x4889dd=isSqlClauseKeyword(_0x224f3c)?_0x517b26[_0x2137ae(0x1dd)]('.')['at'](-0x1)||_0x517b26:_0x224f3c||_0x517b26[_0x2137ae(0x1dd)]('.')['at'](-0x1)||_0x517b26;_0xc7424e[_0x2137ae(0x1fe)]({'table':_0x517b26,'alias':_0x4889dd,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x2389a6});}const _0x504b96=_0x8836aa[_0x2137ae(0x209)](MYBATIS_INCLUDE_MARKER);return _0x504b96>=0x0&&!_0xc7424e[_0x2137ae(0x218)](_0x2e8ebc=>_0x2e8ebc[_0x2137ae(0x1f4)])&&_0xc7424e[_0x2137ae(0x1fe)]({'table':_0x2137ae(0x1e5),'alias':_0x2137ae(0x1e5),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x2137ae(0x1e2),'containsUnresolvedInclude':!![],'position':_0x504b96}),_0xc7424e[_0x2137ae(0x201)]((_0x23f0c6,_0x34f56a)=>_0x23f0c6['position']-_0x34f56a[_0x2137ae(0x223)]);}function stripSqlNoise(_0x12b9b0){const _0x46db7b=a212_0x1582,_0x28e489=Array['from'](_0x12b9b0),_0x58054a=(_0x3c64c7,_0x28fd96)=>{for(let _0xfd3c17=_0x3c64c7;_0xfd3c17<_0x28fd96;_0xfd3c17+=0x1){_0x28e489[_0xfd3c17]!=='\x0a'&&_0x28e489[_0xfd3c17]!=='\x0d'&&(_0x28e489[_0xfd3c17]='\x20');}};for(let _0x29fce1=0x0;_0x29fce1<_0x28e489[_0x46db7b(0x214)];_0x29fce1+=0x1){const _0x12e03f=_0x28e489[_0x29fce1],_0xb8099c=_0x28e489[_0x29fce1+0x1];if(_0x12e03f==='\x27'||_0x12e03f==='\x22'||_0x12e03f==='`'){const _0x2cec5c=_0x12e03f,_0x3b25c2=_0x29fce1;_0x29fce1+=0x1;while(_0x29fce1<_0x28e489[_0x46db7b(0x214)]){if(_0x28e489[_0x29fce1]==='\x5c'&&_0x29fce1+0x1<_0x28e489[_0x46db7b(0x214)]){_0x29fce1+=0x2;continue;}if(_0x28e489[_0x29fce1]!==_0x2cec5c){_0x29fce1+=0x1;continue;}if(_0x28e489[_0x29fce1+0x1]===_0x2cec5c){_0x29fce1+=0x2;continue;}break;}if(_0x2cec5c==='\x27')_0x58054a(_0x3b25c2,Math[_0x46db7b(0x222)](_0x29fce1+0x1,_0x28e489[_0x46db7b(0x214)]));continue;}if(_0x12e03f==='-'&&_0xb8099c==='-'){const _0x29eb1d=_0x29fce1;while(_0x29fce1<_0x28e489[_0x46db7b(0x214)]&&_0x28e489[_0x29fce1]!=='\x0a')_0x29fce1+=0x1;_0x58054a(_0x29eb1d,_0x29fce1);continue;}if(_0x12e03f==='/'&&_0xb8099c==='*'){const _0x126cc4=_0x29fce1;_0x29fce1+=0x2;while(_0x29fce1<_0x28e489[_0x46db7b(0x214)]&&!(_0x28e489[_0x29fce1]==='*'&&_0x28e489[_0x29fce1+0x1]==='/')){_0x29fce1+=0x1;}_0x29fce1=Math[_0x46db7b(0x222)](_0x29fce1+0x1,_0x28e489['length']-0x1),_0x58054a(_0x126cc4,_0x29fce1+0x1);continue;}if(_0x12e03f==='#'&&_0xb8099c!=='{'){const _0x1ea65=_0x29fce1;while(_0x29fce1<_0x28e489[_0x46db7b(0x214)]&&_0x28e489[_0x29fce1]!=='\x0a')_0x29fce1+=0x1;_0x58054a(_0x1ea65,_0x29fce1);continue;}if((_0x12e03f==='#'||_0x12e03f==='$')&&_0xb8099c==='{'){const _0x2c62be=_0x29fce1;_0x29fce1+=0x2;while(_0x29fce1<_0x28e489[_0x46db7b(0x214)]&&_0x28e489[_0x29fce1]!=='}')_0x29fce1+=0x1;_0x58054a(_0x2c62be,Math[_0x46db7b(0x222)](_0x29fce1+0x1,_0x28e489[_0x46db7b(0x214)]));}}return _0x28e489[_0x46db7b(0x1de)]('');}function maskQuotedIdentifiers(_0x13d0f4){const _0x2cd687=a212_0x1582,_0x36617e=Array['from'](_0x13d0f4);for(let _0x4626d3=0x0;_0x4626d3<_0x36617e[_0x2cd687(0x214)];_0x4626d3+=0x1){const _0x113220=_0x36617e[_0x4626d3];if(_0x113220!=='\x22'&&_0x113220!=='`')continue;_0x4626d3+=0x1;while(_0x4626d3<_0x36617e[_0x2cd687(0x214)]){if(_0x36617e[_0x4626d3]===_0x113220){if(_0x36617e[_0x4626d3+0x1]===_0x113220){_0x36617e[_0x4626d3]='\x20',_0x36617e[_0x4626d3+0x1]='\x20',_0x4626d3+=0x2;continue;}break;}_0x36617e[_0x4626d3]='\x20',_0x4626d3+=0x1;}}return _0x36617e['join']('');}function maskNestedQueries(_0x55eb1d){const _0x10c034=a212_0x1582,_0x25c8ea=Array[_0x10c034(0x1ea)](_0x55eb1d);for(let _0x2af6d8=0x0;_0x2af6d8<_0x25c8ea['length'];_0x2af6d8+=0x1){if(_0x25c8ea[_0x2af6d8]!=='(')continue;const _0x873816=_0x55eb1d[_0x10c034(0x21a)](_0x2af6d8+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x10c034(0x1e9)](_0x873816))continue;let _0x1d85e6=0x1,_0x660c60=_0x2af6d8+0x1;for(;_0x660c60<_0x25c8ea[_0x10c034(0x214)]&&_0x1d85e6>0x0;_0x660c60+=0x1){if(_0x25c8ea[_0x660c60]==='(')_0x1d85e6+=0x1;if(_0x25c8ea[_0x660c60]===')')_0x1d85e6-=0x1;}if(_0x1d85e6!==0x0)continue;for(let _0x5d22d0=_0x2af6d8;_0x5d22d0<_0x660c60;_0x5d22d0+=0x1){_0x25c8ea[_0x5d22d0]='\x20';}const _0x2b525d=_0x10c034(0x211);for(let _0x66e6e1=0x0;_0x66e6e1<_0x2b525d[_0x10c034(0x214)]&&_0x2af6d8+_0x66e6e1<_0x660c60;_0x66e6e1+=0x1){_0x25c8ea[_0x2af6d8+_0x66e6e1]=_0x2b525d[_0x66e6e1];}_0x2af6d8=_0x660c60-0x1;}return _0x25c8ea[_0x10c034(0x1de)]('');}function a212_0x1582(_0x4c2cad,_0x1a7bc0){_0x4c2cad=_0x4c2cad-0x1d7;const _0x599869=a212_0x5998();let _0x158207=_0x599869[_0x4c2cad];return _0x158207;}function splitTopLevelAnd(_0x2930b2){const _0x352402=a212_0x1582,_0x282d5c=[];let _0x444914=0x0,_0x4c4bd5=0x0;for(let _0x39e893=0x0;_0x39e893<_0x2930b2[_0x352402(0x214)];_0x39e893+=0x1){const _0x4fadba=_0x2930b2[_0x39e893];if(_0x4fadba==='(')_0x444914+=0x1;if(_0x4fadba===')')_0x444914=Math[_0x352402(0x1ec)](0x0,_0x444914-0x1);_0x444914===0x0&&_0x2930b2[_0x352402(0x21a)](_0x39e893)[_0x352402(0x21b)](/^AND\b/i)&&(_0x39e893===0x0||/\s/[_0x352402(0x1e9)](_0x2930b2[_0x39e893-0x1]??''))&&(_0x282d5c[_0x352402(0x1fe)](_0x2930b2['slice'](_0x4c4bd5,_0x39e893)[_0x352402(0x213)]()),_0x39e893+=0x2,_0x4c4bd5=_0x39e893+0x1);}const _0x408a21=_0x2930b2[_0x352402(0x21a)](_0x4c4bd5)[_0x352402(0x213)]();if(_0x408a21)_0x282d5c[_0x352402(0x1fe)](_0x408a21);return _0x282d5c;}function hasTopLevelKeyword(_0x8bc123,_0x1c234f){const _0x2cefda=a212_0x1582;let _0x28142f=0x0;for(let _0x4decc3=0x0;_0x4decc3<_0x8bc123[_0x2cefda(0x214)];_0x4decc3+=0x1){const _0x4ac4a5=_0x8bc123[_0x4decc3];if(_0x4ac4a5==='(')_0x28142f+=0x1;if(_0x4ac4a5===')')_0x28142f=Math['max'](0x0,_0x28142f-0x1);if(_0x28142f!==0x0)continue;const _0xfba5b9=_0x8bc123['slice'](_0x4decc3,_0x4decc3+_0x1c234f[_0x2cefda(0x214)]),_0x288cb7=_0x8bc123[_0x4decc3-0x1]??'\x20',_0x18328f=_0x8bc123[_0x4decc3+_0x1c234f[_0x2cefda(0x214)]]??'\x20';if(_0xfba5b9['toUpperCase']()===_0x1c234f['toUpperCase']()&&!/[\w$]/[_0x2cefda(0x1e9)](_0x288cb7)&&!/[\w$]/['test'](_0x18328f))return!![];}return![];}function splitEquality(_0x5ada8f){const _0x5071b7=a212_0x1582,_0x2c0005=stripOuterParentheses(_0x5ada8f);let _0x4ec852=0x0,_0x4246cc;for(let _0x29abfe=0x0;_0x29abfe<_0x2c0005[_0x5071b7(0x214)];_0x29abfe+=0x1){const _0x3e271c=_0x2c0005[_0x29abfe];if(_0x3e271c==='(')_0x4ec852+=0x1;if(_0x3e271c===')')_0x4ec852=Math[_0x5071b7(0x1ec)](0x0,_0x4ec852-0x1);const _0x5d3d3e=_0x2c0005[_0x29abfe-0x1]??'',_0x4ba145=_0x2c0005[_0x29abfe+0x1]??'';if(_0x3e271c==='='&&_0x4ec852===0x0&&!/[!<>=:]/[_0x5071b7(0x1e9)](_0x5d3d3e)&&_0x4ba145!=='='){if(_0x4246cc!==undefined)return null;_0x4246cc=_0x29abfe;}}return _0x4246cc===undefined?null:[_0x2c0005['slice'](0x0,_0x4246cc)['trim'](),_0x2c0005['slice'](_0x4246cc+0x1)[_0x5071b7(0x213)]()];}function parseDirectColumnReference(_0x5a17aa,_0x5d979f){const _0x348f24=a212_0x1582,_0x31933d=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x348f24(0x1e1)](stripOuterParentheses(_0x5a17aa));if(!_0x31933d)return null;if(normalizeIdentifier(_0x31933d[0x1]??'')!==normalizeIdentifier(_0x5d979f))return null;return normalizeIdentifier(_0x31933d[0x2]??'');}function containsColumnReference(_0x44711c,_0x5cb6b3){const _0x29dcbf=a212_0x1582,_0x407ffb=_0x44711c[_0x29dcbf(0x215)](/[`"]/g,''),_0x3d2004=_0x5cb6b3['replace'](/[.*+?^${}()|[\]\\]/g,_0x29dcbf(0x21e));return new RegExp(_0x29dcbf(0x1d7)+_0x3d2004+_0x29dcbf(0x210),'i')[_0x29dcbf(0x1e9)](_0x407ffb);}function findEqualityPrefix(_0x53fac3,_0x3893bc){const _0x643d45=a212_0x1582,_0x2d74ea=new Set(_0x3893bc[_0x643d45(0x1f2)](normalizeIdentifier)),_0x3bb74b=[];for(const _0x10d2e0 of _0x53fac3){if(!_0x2d74ea['has'](normalizeIdentifier(_0x10d2e0)))break;_0x3bb74b[_0x643d45(0x1fe)](_0x10d2e0);}return _0x3bb74b;}function a212_0x5998(){const _0x3f0574=['unsupportedReason','unknown','56492zBPmsA','left','6221760LVjDKk','test','from','860412eLeIhq','max','metadataAvailable','table','includes','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','alias','map','JOIN_PREDICATE_UNSUPPORTED','containsUnresolvedInclude','matchAll','replaceAll','has','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','unavailable','push','full','15217056jxPhDq','sort','4527384ibTNWc','toLowerCase','toUpperCase','703YgoUfM','index','unsupportedPredicate','indexes','indexOf','filter','tableName','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','2514ukMRAu','natural','\x5cs*\x5c.\x5cs*[\x5cw$]+','__sq__','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','trim','length','replace','20xsExpT','startsWith','some','24WuCdus','slice','match','reduce','error','\x5c$&','INNER','INDEX_METADATA_UNAVAILABLE','columns','min','position','(?:^|[^\x5cw$])','right','inner','warning','matchedPrefix','3934584dxfcWx','split','join','search','endsWith','exec','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','sql'];a212_0x5998=function(){return _0x3f0574;};return a212_0x5998();}function resolveTableMetadata(_0x180bd8,_0xc79a04){const _0x524f00=a212_0x1582,_0x2c5826=normalizeIdentifier(_0xc79a04),_0x13b1de=_0x180bd8[_0x524f00(0x20a)](_0x51dafc=>normalizeIdentifier(_0x51dafc[_0x524f00(0x20b)])===_0x2c5826);if(_0x13b1de[_0x524f00(0x214)]===0x1)return _0x13b1de[0x0];const _0x5ecfee=_0x2c5826['includes']('.'),_0x277bd3=_0x2c5826[_0x524f00(0x1dd)]('.')['at'](-0x1),_0x212cf9=_0x180bd8['filter'](_0x112423=>{const _0x20e648=_0x524f00,_0xf01bd8=normalizeIdentifier(_0x112423[_0x20e648(0x20b)]);if(_0x5ecfee&&_0xf01bd8[_0x20e648(0x1ef)]('.'))return![];return _0xf01bd8[_0x20e648(0x1dd)]('.')['at'](-0x1)===_0x277bd3;});return _0x212cf9[_0x524f00(0x214)]===0x1?_0x212cf9[0x0]:undefined;}function columnNamesMatch(_0x2efc15,_0x5dab9){return normalizeIdentifier(_0x2efc15)===normalizeIdentifier(_0x5dab9);}function normalizeIdentifier(_0x391ea2){const _0x5b2a7a=a212_0x1582;return _0x391ea2[_0x5b2a7a(0x215)](/[`"]/g,'')[_0x5b2a7a(0x213)]()[_0x5b2a7a(0x203)]();}function isSqlClauseKeyword(_0x520274){const _0x54562f=a212_0x1582;return new Set(['on','using','where',_0x54562f(0x1de),_0x54562f(0x1d9),_0x54562f(0x1e7),_0x54562f(0x1d8),_0x54562f(0x1ff),'cross',_0x54562f(0x20f)])[_0x54562f(0x1f7)](_0x520274);}function stripOuterParentheses(_0x3ccff6){const _0x405272=a212_0x1582;let _0xb486df=_0x3ccff6[_0x405272(0x213)]();while(_0xb486df[_0x405272(0x217)]('(')&&_0xb486df[_0x405272(0x1e0)](')')){let _0x1afd1e=0x0,_0x126b53=!![];for(let _0x2d9e25=0x0;_0x2d9e25<_0xb486df[_0x405272(0x214)];_0x2d9e25+=0x1){if(_0xb486df[_0x2d9e25]==='(')_0x1afd1e+=0x1;if(_0xb486df[_0x2d9e25]===')')_0x1afd1e-=0x1;if(_0x1afd1e===0x0&&_0x2d9e25<_0xb486df['length']-0x1){_0x126b53=![];break;}}if(!_0x126b53||_0x1afd1e!==0x0)break;_0xb486df=_0xb486df['slice'](0x1,-0x1)[_0x405272(0x213)]();}return _0xb486df;}
1
+ (function(_0x33d84a,_0x130e7f){const _0x982f92=a212_0x5a84,_0x402841=_0x33d84a();while(!![]){try{const _0x55ddfa=parseInt(_0x982f92(0xfd))/0x1+-parseInt(_0x982f92(0xf0))/0x2*(parseInt(_0x982f92(0xd3))/0x3)+-parseInt(_0x982f92(0xde))/0x4*(parseInt(_0x982f92(0xc8))/0x5)+-parseInt(_0x982f92(0xd5))/0x6*(parseInt(_0x982f92(0xc1))/0x7)+-parseInt(_0x982f92(0xda))/0x8+-parseInt(_0x982f92(0xcd))/0x9+parseInt(_0x982f92(0xf2))/0xa;if(_0x55ddfa===_0x130e7f)break;else _0x402841['push'](_0x402841['shift']());}catch(_0x148958){_0x402841['push'](_0x402841['shift']());}}}(a212_0x534c,0x818eb));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';function a212_0x534c(){const _0x38cbdf=['where','containsUnresolvedInclude','unknown','join','warning','\x5cs*\x5c.\x5cs*[\x5cw$]+','matchAll','327426pWkRKj','INDEX_METADATA_UNAVAILABLE','some','search','JOIN_PREDICATE_UNSUPPORTED','\x5c$&','alias','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','length','test','includes','has','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','JOIN_INDEX_NOT_USABLE','6433DGxsKz','toUpperCase','toLowerCase','columns','replace','max','full','382165BcEiwP','metadataAvailable','min','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','INNER','5458734owofTm','index','right','JOIN_INDEX_MISSING','tableName','trim','476001OSlDHN','sql','1278ZvCNMr','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','add','from','unavailable','4877648HRmvcQ','table','__sq__','indexOf','4ySgLFM','replaceAll','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','push','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','left','matchedPrefix','startsWith','filter','map','using','slice','position','endsWith','error','split','4dGGnYX','indexes','20089870auILuE','(?:^|[^\x5cw$])','inner','exec'];a212_0x534c=function(){return _0x38cbdf;};return a212_0x534c();}export function auditSqlJoinIndexes(_0x74516c,_0x584d0d){const _0x2f2693=a212_0x5a84,_0x3e6cd1=[],_0x39b40d=normalizeSqlForStaticAnalysis(_0x74516c),_0x550015=(_0x39b40d[_0x2f2693(0xee)]?[]:extractJoinFacts(_0x39b40d[_0x2f2693(0xd4)]))['map'](_0x447596=>{const _0x56c9dc=_0x2f2693;if(_0x447596['unsupportedPredicate']||_0x447596[_0x56c9dc(0xc4)]['length']===0x0)return _0x3e6cd1['push']({'code':_0x56c9dc(0xb7),'table':_0x447596['table'],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596['columns'],'reason':_0x447596['unsupportedReason']??_0x56c9dc(0xe0)}),{'table':_0x447596['table'],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596[_0x56c9dc(0xc4)],'status':'unavailable'};const _0x46cbaf=resolveTableMetadata(_0x584d0d,_0x447596['table']),_0x501764=(_0x46cbaf?.[_0x56c9dc(0xf1)]??[])[_0x56c9dc(0xe9)](_0x38a0f7=>({'index':_0x38a0f7,'matchedPrefix':findEqualityPrefix(_0x38a0f7['columns'],_0x447596[_0x56c9dc(0xc4)])}))['filter'](_0x376240=>_0x376240['matchedPrefix'][_0x56c9dc(0xbb)]>0x0),_0x516826=_0x501764['reduce']((_0x51cf79,_0x253f2f)=>!_0x51cf79||_0x253f2f[_0x56c9dc(0xe6)]['length']>_0x51cf79[_0x56c9dc(0xe6)]['length']?_0x253f2f:_0x51cf79,_0x501764[0x0]);if(_0x516826)return{'table':_0x447596[_0x56c9dc(0xdb)],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596[_0x56c9dc(0xc4)],'status':'covered','matchedIndex':{..._0x516826[_0x56c9dc(0xce)],'matchedPrefix':_0x516826[_0x56c9dc(0xe6)]}};const _0x1d7146=_0x46cbaf?.[_0x56c9dc(0xf1)][_0x56c9dc(0xe8)](_0x4d9378=>_0x4d9378[_0x56c9dc(0xc4)][_0x56c9dc(0xff)](_0x409682=>_0x447596[_0x56c9dc(0xc4)]['some'](_0x32dfc4=>columnNamesMatch(_0x409682,_0x32dfc4))))??[];if(_0x1d7146['length']>0x0)return _0x3e6cd1['push']({'code':_0x56c9dc(0xc0),'table':_0x447596[_0x56c9dc(0xdb)],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596['columns'],'reason':_0x56c9dc(0xd6)}),{'table':_0x447596[_0x56c9dc(0xdb)],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596[_0x56c9dc(0xc4)],'status':_0x56c9dc(0xfa),'candidateIndexes':_0x1d7146};if(_0x46cbaf&&_0x46cbaf[_0x56c9dc(0xc9)]!==![]&&_0x46cbaf['indexes'][_0x56c9dc(0xbb)]>0x0&&_0x447596[_0x56c9dc(0xc4)][_0x56c9dc(0xbb)]>0x0)return _0x3e6cd1[_0x56c9dc(0xe1)]({'code':_0x56c9dc(0xd0),'table':_0x447596[_0x56c9dc(0xdb)],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596[_0x56c9dc(0xc4)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x447596[_0x56c9dc(0xdb)],'alias':_0x447596['alias'],'columns':_0x447596[_0x56c9dc(0xc4)],'status':_0x56c9dc(0xfa)};return _0x3e6cd1[_0x56c9dc(0xe1)]({'code':_0x56c9dc(0xfe),'table':_0x447596[_0x56c9dc(0xdb)],'alias':_0x447596[_0x56c9dc(0xb9)],'columns':_0x447596[_0x56c9dc(0xc4)],'reason':_0x46cbaf?_0x56c9dc(0xe2):_0x56c9dc(0xe4)}),{'table':_0x447596['table'],'alias':_0x447596['alias'],'columns':_0x447596[_0x56c9dc(0xc4)],'status':_0x56c9dc(0xd9)};});return{'checked':_0x550015['length']>0x0,'joins':_0x550015,'warnings':_0x3e6cd1};}function extractJoinFacts(_0x3a1fe0){const _0x15e740=a212_0x5a84,_0x3f2790=maskNestedQueries(stripSqlNoise(_0x3a1fe0)),_0x3873b8=maskQuotedIdentifiers(_0x3f2790),_0x3f84c7=[],_0x4747c3=new Set(),_0x593992=/\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 _0x579cd9 of _0x3f2790['matchAll'](_0x593992)){const _0x5cb7bb=_0x579cd9[_0x15e740(0xce)]??0x0,_0x453f5e=_0x579cd9[0x0][_0x15e740(0x100)](/\bJOIN\b/i),_0x523bcd=_0x5cb7bb+Math[_0x15e740(0xc6)](0x0,_0x453f5e);if(!/^JOIN\b/i[_0x15e740(0xbc)](_0x3873b8[_0x15e740(0xeb)](_0x523bcd)))continue;_0x4747c3[_0x15e740(0xd7)](_0x523bcd);const _0xe06927=normalizeIdentifier(_0x579cd9[0x1]||_0x15e740(0xcc)),_0x19bcf6=normalizeIdentifier(_0x579cd9[0x2]??''),_0x230f84=normalizeIdentifier(_0x579cd9[0x3]||_0x19bcf6['split']('.')['at'](-0x1)||_0x19bcf6),_0x57e6f4=[],_0x2807c8=_0x19bcf6===_0x15e740(0xdc);let _0x486588=_0xe06927===_0x15e740(0xcf)||_0xe06927===_0x15e740(0xc7)||_0x2807c8,_0x2de099=_0x486588?_0x2807c8?_0x15e740(0xbf):_0xe06927['toUpperCase']()+'\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.':undefined;const _0x4193d3=stripOuterParentheses(_0x579cd9[0x4]??''),_0x1281d7=_0x4193d3[_0x15e740(0xbd)](MYBATIS_DYNAMIC_START_MARKER)||_0x4193d3[_0x15e740(0xbd)](MYBATIS_DYNAMIC_END_MARKER),_0x2db9c0=_0x4193d3[_0x15e740(0xbd)](MYBATIS_INCLUDE_MARKER);_0x1281d7&&(_0x486588=!![],_0x2de099??=_0x15e740(0xe3));_0x2db9c0&&(_0x486588=!![],_0x2de099??=_0x15e740(0xba));const _0x221582=_0x4193d3[_0x15e740(0xdf)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x15e740(0xdf)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x221582,'OR')&&(_0x486588=!![],_0x2de099??=_0x15e740(0xcb));for(const _0xfe6f0e of splitTopLevelAnd(_0x221582)){const _0x5f58f4=stripOuterParentheses(_0xfe6f0e);if(hasTopLevelKeyword(_0x5f58f4,'OR')){_0x486588=!![],_0x2de099??=_0x15e740(0xcb);continue;}const _0x50a4e7=splitEquality(_0x5f58f4);if(!_0x50a4e7){containsColumnReference(_0xfe6f0e,_0x230f84)&&(_0x486588=!![]);continue;}const _0x4dba71=parseDirectColumnReference(_0x50a4e7[0x0],_0x230f84),_0x4c0abf=parseDirectColumnReference(_0x50a4e7[0x1],_0x230f84),_0x3e261e=containsColumnReference(_0x50a4e7[0x0],_0x230f84),_0x1e3c78=containsColumnReference(_0x50a4e7[0x1],_0x230f84),_0xda9fc9=_0x4dba71&&!_0x1e3c78?_0x4dba71:_0x4c0abf&&!_0x3e261e?_0x4c0abf:null;if(_0xda9fc9&&!_0x57e6f4['includes'](_0xda9fc9))_0x57e6f4[_0x15e740(0xe1)](_0xda9fc9);else!_0xda9fc9&&containsColumnReference(_0xfe6f0e,_0x230f84)&&(_0x486588=!![]);}_0x3f84c7['push']({'table':_0x19bcf6,'alias':_0x230f84,'columns':_0x57e6f4,'unsupportedPredicate':_0x486588,'unsupportedReason':_0x2de099,'containsUnresolvedInclude':_0x2db9c0,'position':_0x523bcd});}for(const _0x463d75 of _0x3873b8[_0x15e740(0xfc)](/\bJOIN\b/gi)){const _0x3fb092=_0x463d75[_0x15e740(0xce)]??0x0;if(_0x4747c3[_0x15e740(0xbe)](_0x3fb092))continue;const _0x369ef9=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x15e740(0xf5)](_0x3f2790[_0x15e740(0xeb)](_0x3fb092+_0x463d75[0x0][_0x15e740(0xbb)])),_0x42ac59=normalizeIdentifier(_0x369ef9?.[0x1]||_0x15e740(0xf8)),_0x5e799f=normalizeIdentifier(_0x369ef9?.[0x2]||''),_0x4ba2ac=isSqlClauseKeyword(_0x5e799f)?_0x42ac59[_0x15e740(0xef)]('.')['at'](-0x1)||_0x42ac59:_0x5e799f||_0x42ac59['split']('.')['at'](-0x1)||_0x42ac59;_0x3f84c7['push']({'table':_0x42ac59,'alias':_0x4ba2ac,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x3fb092});}const _0x47fd98=_0x3873b8[_0x15e740(0xdd)](MYBATIS_INCLUDE_MARKER);return _0x47fd98>=0x0&&!_0x3f84c7[_0x15e740(0xff)](_0x1db715=>_0x1db715[_0x15e740(0xf7)])&&_0x3f84c7[_0x15e740(0xe1)]({'table':'unknown','alias':_0x15e740(0xf8),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0x47fd98}),_0x3f84c7['sort']((_0x18d5c9,_0xd2290d)=>_0x18d5c9[_0x15e740(0xec)]-_0xd2290d[_0x15e740(0xec)]);}function stripSqlNoise(_0x4defb4){const _0x4b11ba=a212_0x5a84,_0x8c8914=Array[_0x4b11ba(0xd8)](_0x4defb4),_0x3bd45d=(_0x247848,_0x44e6b1)=>{for(let _0x41f070=_0x247848;_0x41f070<_0x44e6b1;_0x41f070+=0x1){_0x8c8914[_0x41f070]!=='\x0a'&&_0x8c8914[_0x41f070]!=='\x0d'&&(_0x8c8914[_0x41f070]='\x20');}};for(let _0x5371f3=0x0;_0x5371f3<_0x8c8914[_0x4b11ba(0xbb)];_0x5371f3+=0x1){const _0x2ebc32=_0x8c8914[_0x5371f3],_0x1c9acf=_0x8c8914[_0x5371f3+0x1];if(_0x2ebc32==='\x27'||_0x2ebc32==='\x22'||_0x2ebc32==='`'){const _0x21dd3c=_0x2ebc32,_0x317e73=_0x5371f3;_0x5371f3+=0x1;while(_0x5371f3<_0x8c8914[_0x4b11ba(0xbb)]){if(_0x8c8914[_0x5371f3]==='\x5c'&&_0x5371f3+0x1<_0x8c8914['length']){_0x5371f3+=0x2;continue;}if(_0x8c8914[_0x5371f3]!==_0x21dd3c){_0x5371f3+=0x1;continue;}if(_0x8c8914[_0x5371f3+0x1]===_0x21dd3c){_0x5371f3+=0x2;continue;}break;}if(_0x21dd3c==='\x27')_0x3bd45d(_0x317e73,Math['min'](_0x5371f3+0x1,_0x8c8914[_0x4b11ba(0xbb)]));continue;}if(_0x2ebc32==='-'&&_0x1c9acf==='-'){const _0x1332ee=_0x5371f3;while(_0x5371f3<_0x8c8914[_0x4b11ba(0xbb)]&&_0x8c8914[_0x5371f3]!=='\x0a')_0x5371f3+=0x1;_0x3bd45d(_0x1332ee,_0x5371f3);continue;}if(_0x2ebc32==='/'&&_0x1c9acf==='*'){const _0x365f83=_0x5371f3;_0x5371f3+=0x2;while(_0x5371f3<_0x8c8914['length']&&!(_0x8c8914[_0x5371f3]==='*'&&_0x8c8914[_0x5371f3+0x1]==='/')){_0x5371f3+=0x1;}_0x5371f3=Math['min'](_0x5371f3+0x1,_0x8c8914[_0x4b11ba(0xbb)]-0x1),_0x3bd45d(_0x365f83,_0x5371f3+0x1);continue;}if(_0x2ebc32==='#'&&_0x1c9acf!=='{'){const _0x2c271c=_0x5371f3;while(_0x5371f3<_0x8c8914[_0x4b11ba(0xbb)]&&_0x8c8914[_0x5371f3]!=='\x0a')_0x5371f3+=0x1;_0x3bd45d(_0x2c271c,_0x5371f3);continue;}if((_0x2ebc32==='#'||_0x2ebc32==='$')&&_0x1c9acf==='{'){const _0x25361a=_0x5371f3;_0x5371f3+=0x2;while(_0x5371f3<_0x8c8914[_0x4b11ba(0xbb)]&&_0x8c8914[_0x5371f3]!=='}')_0x5371f3+=0x1;_0x3bd45d(_0x25361a,Math[_0x4b11ba(0xca)](_0x5371f3+0x1,_0x8c8914[_0x4b11ba(0xbb)]));}}return _0x8c8914[_0x4b11ba(0xf9)]('');}function maskQuotedIdentifiers(_0x2a8457){const _0x5ab771=a212_0x5a84,_0x4cf538=Array['from'](_0x2a8457);for(let _0x1da362=0x0;_0x1da362<_0x4cf538['length'];_0x1da362+=0x1){const _0x1e8c58=_0x4cf538[_0x1da362];if(_0x1e8c58!=='\x22'&&_0x1e8c58!=='`')continue;_0x1da362+=0x1;while(_0x1da362<_0x4cf538[_0x5ab771(0xbb)]){if(_0x4cf538[_0x1da362]===_0x1e8c58){if(_0x4cf538[_0x1da362+0x1]===_0x1e8c58){_0x4cf538[_0x1da362]='\x20',_0x4cf538[_0x1da362+0x1]='\x20',_0x1da362+=0x2;continue;}break;}_0x4cf538[_0x1da362]='\x20',_0x1da362+=0x1;}}return _0x4cf538['join']('');}function maskNestedQueries(_0x263565){const _0x950a76=a212_0x5a84,_0x32522a=Array[_0x950a76(0xd8)](_0x263565);for(let _0x2c1400=0x0;_0x2c1400<_0x32522a[_0x950a76(0xbb)];_0x2c1400+=0x1){if(_0x32522a[_0x2c1400]!=='(')continue;const _0x1d5e99=_0x263565[_0x950a76(0xeb)](_0x2c1400+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x1d5e99))continue;let _0x3b8e78=0x1,_0x2a1040=_0x2c1400+0x1;for(;_0x2a1040<_0x32522a[_0x950a76(0xbb)]&&_0x3b8e78>0x0;_0x2a1040+=0x1){if(_0x32522a[_0x2a1040]==='(')_0x3b8e78+=0x1;if(_0x32522a[_0x2a1040]===')')_0x3b8e78-=0x1;}if(_0x3b8e78!==0x0)continue;for(let _0x3d3ef1=_0x2c1400;_0x3d3ef1<_0x2a1040;_0x3d3ef1+=0x1){_0x32522a[_0x3d3ef1]='\x20';}const _0x44d7b8='__sq__';for(let _0x116c81=0x0;_0x116c81<_0x44d7b8[_0x950a76(0xbb)]&&_0x2c1400+_0x116c81<_0x2a1040;_0x116c81+=0x1){_0x32522a[_0x2c1400+_0x116c81]=_0x44d7b8[_0x116c81];}_0x2c1400=_0x2a1040-0x1;}return _0x32522a['join']('');}function splitTopLevelAnd(_0x1b3317){const _0xd8d9ac=a212_0x5a84,_0x557728=[];let _0x75bd4f=0x0,_0x22d6a5=0x0;for(let _0x4ccf2c=0x0;_0x4ccf2c<_0x1b3317[_0xd8d9ac(0xbb)];_0x4ccf2c+=0x1){const _0x48451a=_0x1b3317[_0x4ccf2c];if(_0x48451a==='(')_0x75bd4f+=0x1;if(_0x48451a===')')_0x75bd4f=Math[_0xd8d9ac(0xc6)](0x0,_0x75bd4f-0x1);_0x75bd4f===0x0&&_0x1b3317[_0xd8d9ac(0xeb)](_0x4ccf2c)['match'](/^AND\b/i)&&(_0x4ccf2c===0x0||/\s/['test'](_0x1b3317[_0x4ccf2c-0x1]??''))&&(_0x557728[_0xd8d9ac(0xe1)](_0x1b3317['slice'](_0x22d6a5,_0x4ccf2c)[_0xd8d9ac(0xd2)]()),_0x4ccf2c+=0x2,_0x22d6a5=_0x4ccf2c+0x1);}const _0x3a482e=_0x1b3317[_0xd8d9ac(0xeb)](_0x22d6a5)[_0xd8d9ac(0xd2)]();if(_0x3a482e)_0x557728[_0xd8d9ac(0xe1)](_0x3a482e);return _0x557728;}function hasTopLevelKeyword(_0x1f2fef,_0x5638de){const _0x40082e=a212_0x5a84;let _0x4a0cfd=0x0;for(let _0xcdf210=0x0;_0xcdf210<_0x1f2fef[_0x40082e(0xbb)];_0xcdf210+=0x1){const _0x46a69f=_0x1f2fef[_0xcdf210];if(_0x46a69f==='(')_0x4a0cfd+=0x1;if(_0x46a69f===')')_0x4a0cfd=Math['max'](0x0,_0x4a0cfd-0x1);if(_0x4a0cfd!==0x0)continue;const _0x3a8064=_0x1f2fef[_0x40082e(0xeb)](_0xcdf210,_0xcdf210+_0x5638de['length']),_0x191455=_0x1f2fef[_0xcdf210-0x1]??'\x20',_0x499449=_0x1f2fef[_0xcdf210+_0x5638de[_0x40082e(0xbb)]]??'\x20';if(_0x3a8064[_0x40082e(0xc2)]()===_0x5638de[_0x40082e(0xc2)]()&&!/[\w$]/['test'](_0x191455)&&!/[\w$]/[_0x40082e(0xbc)](_0x499449))return!![];}return![];}function a212_0x5a84(_0x567d15,_0x582340){_0x567d15=_0x567d15-0xb7;const _0x534cbf=a212_0x534c();let _0x5a8419=_0x534cbf[_0x567d15];return _0x5a8419;}function splitEquality(_0x42f684){const _0x1e0239=a212_0x5a84,_0x5c446d=stripOuterParentheses(_0x42f684);let _0x3ad657=0x0,_0x387b19;for(let _0x508ef4=0x0;_0x508ef4<_0x5c446d['length'];_0x508ef4+=0x1){const _0x36f9db=_0x5c446d[_0x508ef4];if(_0x36f9db==='(')_0x3ad657+=0x1;if(_0x36f9db===')')_0x3ad657=Math[_0x1e0239(0xc6)](0x0,_0x3ad657-0x1);const _0x5b615b=_0x5c446d[_0x508ef4-0x1]??'',_0x3e1aad=_0x5c446d[_0x508ef4+0x1]??'';if(_0x36f9db==='='&&_0x3ad657===0x0&&!/[!<>=:]/['test'](_0x5b615b)&&_0x3e1aad!=='='){if(_0x387b19!==undefined)return null;_0x387b19=_0x508ef4;}}return _0x387b19===undefined?null:[_0x5c446d[_0x1e0239(0xeb)](0x0,_0x387b19)['trim'](),_0x5c446d[_0x1e0239(0xeb)](_0x387b19+0x1)[_0x1e0239(0xd2)]()];}function parseDirectColumnReference(_0x783e25,_0x155edf){const _0x3cb44e=a212_0x5a84,_0x16290d=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x3cb44e(0xf5)](stripOuterParentheses(_0x783e25));if(!_0x16290d)return null;if(normalizeIdentifier(_0x16290d[0x1]??'')!==normalizeIdentifier(_0x155edf))return null;return normalizeIdentifier(_0x16290d[0x2]??'');}function containsColumnReference(_0x316c95,_0xcef8af){const _0x5c04db=a212_0x5a84,_0x11647e=_0x316c95[_0x5c04db(0xc5)](/[`"]/g,''),_0x1ac561=_0xcef8af[_0x5c04db(0xc5)](/[.*+?^${}()|[\]\\]/g,_0x5c04db(0xb8));return new RegExp(_0x5c04db(0xf3)+_0x1ac561+_0x5c04db(0xfb),'i')[_0x5c04db(0xbc)](_0x11647e);}function findEqualityPrefix(_0x2e54e4,_0x397f10){const _0x4cf3c1=a212_0x5a84,_0xd923b9=new Set(_0x397f10[_0x4cf3c1(0xe9)](normalizeIdentifier)),_0x1a0199=[];for(const _0x18154a of _0x2e54e4){if(!_0xd923b9[_0x4cf3c1(0xbe)](normalizeIdentifier(_0x18154a)))break;_0x1a0199[_0x4cf3c1(0xe1)](_0x18154a);}return _0x1a0199;}function resolveTableMetadata(_0x3378dc,_0x361512){const _0x296be5=a212_0x5a84,_0xabee7f=normalizeIdentifier(_0x361512),_0x395c56=_0x3378dc['filter'](_0x3ba301=>normalizeIdentifier(_0x3ba301[_0x296be5(0xd1)])===_0xabee7f);if(_0x395c56[_0x296be5(0xbb)]===0x1)return _0x395c56[0x0];const _0x4db7ae=_0xabee7f[_0x296be5(0xbd)]('.'),_0x35afa3=_0xabee7f[_0x296be5(0xef)]('.')['at'](-0x1),_0x196156=_0x3378dc['filter'](_0x54680f=>{const _0x557938=_0x296be5,_0x4aee57=normalizeIdentifier(_0x54680f[_0x557938(0xd1)]);if(_0x4db7ae&&_0x4aee57[_0x557938(0xbd)]('.'))return![];return _0x4aee57[_0x557938(0xef)]('.')['at'](-0x1)===_0x35afa3;});return _0x196156[_0x296be5(0xbb)]===0x1?_0x196156[0x0]:undefined;}function columnNamesMatch(_0x803e9d,_0xcada0e){return normalizeIdentifier(_0x803e9d)===normalizeIdentifier(_0xcada0e);}function normalizeIdentifier(_0x1e8f4a){const _0x304a1c=a212_0x5a84;return _0x1e8f4a[_0x304a1c(0xc5)](/[`"]/g,'')[_0x304a1c(0xd2)]()[_0x304a1c(0xc3)]();}function isSqlClauseKeyword(_0x19a57b){const _0x20fe93=a212_0x5a84;return new Set(['on',_0x20fe93(0xea),_0x20fe93(0xf6),_0x20fe93(0xf9),_0x20fe93(0xf4),_0x20fe93(0xe5),_0x20fe93(0xcf),'full','cross','natural'])[_0x20fe93(0xbe)](_0x19a57b);}function stripOuterParentheses(_0xffc6e8){const _0x5c1d18=a212_0x5a84;let _0x25b27b=_0xffc6e8[_0x5c1d18(0xd2)]();while(_0x25b27b[_0x5c1d18(0xe7)]('(')&&_0x25b27b[_0x5c1d18(0xed)](')')){let _0x4d387e=0x0,_0x2b6bd1=!![];for(let _0x58c188=0x0;_0x58c188<_0x25b27b[_0x5c1d18(0xbb)];_0x58c188+=0x1){if(_0x25b27b[_0x58c188]==='(')_0x4d387e+=0x1;if(_0x25b27b[_0x58c188]===')')_0x4d387e-=0x1;if(_0x4d387e===0x0&&_0x58c188<_0x25b27b['length']-0x1){_0x2b6bd1=![];break;}}if(!_0x2b6bd1||_0x4d387e!==0x0)break;_0x25b27b=_0x25b27b[_0x5c1d18(0xeb)](0x1,-0x1)['trim']();}return _0x25b27b;}
@@ -1 +1 @@
1
- function a213_0x9d2e(){const _0x573ff5=['9YiHXvg','sql','60750ZxjJrb','8rzlrko','168jROuiH','64463KrefpN','138TRNJcp','12048AQLoLs','152zExsSC','1358860jHarDk','204089MFNkhL','44545ehZrIV','147444nBKbiA','sql-trash','/sql','sql.lock.json'];a213_0x9d2e=function(){return _0x573ff5;};return a213_0x9d2e();}const a213_0x23088e=a213_0x2510;(function(_0x32d48b,_0x3f3003){const _0x4356cc=a213_0x2510,_0x34628e=_0x32d48b();while(!![]){try{const _0x393897=-parseInt(_0x4356cc(0x1cc))/0x1+parseInt(_0x4356cc(0x1d4))/0x2+parseInt(_0x4356cc(0x1c9))/0x3*(-parseInt(_0x4356cc(0x1d5))/0x4)+parseInt(_0x4356cc(0x1cd))/0x5*(-parseInt(_0x4356cc(0x1c8))/0x6)+-parseInt(_0x4356cc(0x1c7))/0x7*(-parseInt(_0x4356cc(0x1ca))/0x8)+-parseInt(_0x4356cc(0x1d2))/0x9*(-parseInt(_0x4356cc(0x1cb))/0xa)+parseInt(_0x4356cc(0x1ce))/0xb*(parseInt(_0x4356cc(0x1d6))/0xc);if(_0x393897===_0x3f3003)break;else _0x34628e['push'](_0x34628e['shift']());}catch(_0x2182dc){_0x34628e['push'](_0x34628e['shift']());}}}(a213_0x9d2e,0x1b4f4));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a213_0x23088e(0x1d1),TRASH_DIR_NAME=a213_0x23088e(0x1cf);function a213_0x2510(_0x473531,_0x4a2f30){_0x473531=_0x473531-0x1c7;const _0x9d2e12=a213_0x9d2e();let _0x251040=_0x9d2e12[_0x473531];return _0x251040;}export function loadSqlProjectConfig(_0x290cb6,_0x3428ff){const _0x383c42=a213_0x23088e,_0x2abc15=resolve(_0x3428ff??findProjectRootDirectory()),_0x100b4e=DOT_DIR+_0x383c42(0x1d0),_0x3f5dc6=_0x100b4e+'/'+_0x290cb6;return{'projectRoot':_0x2abc15,'appCode':_0x290cb6,'sqlWorkspaceRoot':_0x100b4e,'sqlRoot':_0x3f5dc6,'sqlRootDir':resolve(_0x2abc15,DOT_DIR,_0x383c42(0x1d3),_0x290cb6),'lockFilePath':resolve(_0x2abc15,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2abc15,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a213_0x4a491a=a213_0x4848;(function(_0x3757d5,_0x555958){const _0x8762c1=a213_0x4848,_0x2dd580=_0x3757d5();while(!![]){try{const _0x1d8740=-parseInt(_0x8762c1(0x10c))/0x1+parseInt(_0x8762c1(0x113))/0x2+parseInt(_0x8762c1(0x115))/0x3*(-parseInt(_0x8762c1(0x111))/0x4)+-parseInt(_0x8762c1(0x10f))/0x5+parseInt(_0x8762c1(0x10d))/0x6*(parseInt(_0x8762c1(0x116))/0x7)+-parseInt(_0x8762c1(0x117))/0x8+parseInt(_0x8762c1(0x114))/0x9;if(_0x1d8740===_0x555958)break;else _0x2dd580['push'](_0x2dd580['shift']());}catch(_0x705f7){_0x2dd580['push'](_0x2dd580['shift']());}}}(a213_0x3651,0xc9a72));function a213_0x4848(_0x5edaee,_0x5b074e){_0x5edaee=_0x5edaee-0x10c;const _0x36518a=a213_0x3651();let _0x484877=_0x36518a[_0x5edaee];return _0x484877;}import{resolve}from'node:path';function a213_0x3651(){const _0x400d80=['28aPgaMG','sql-trash','223840taAagg','37181286PpuxsM','549255FfHSdQ','217ijrwyp','6989944irarzC','sql.lock.json','1193447BvROXc','28470rWHeRy','.rabetbase','1077570OtYbUa','/sql'];a213_0x3651=function(){return _0x400d80;};return a213_0x3651();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a213_0x4a491a(0x10e),LOCK_FILE_NAME=a213_0x4a491a(0x118),TRASH_DIR_NAME=a213_0x4a491a(0x112);export function loadSqlProjectConfig(_0x5aa5a6,_0x50e107){const _0x3d4d1c=a213_0x4a491a,_0x57ac06=resolve(_0x50e107??findProjectRootDirectory()),_0x12b880=DOT_DIR+_0x3d4d1c(0x110),_0xfe56df=_0x12b880+'/'+_0x5aa5a6;return{'projectRoot':_0x57ac06,'appCode':_0x5aa5a6,'sqlWorkspaceRoot':_0x12b880,'sqlRoot':_0xfe56df,'sqlRootDir':resolve(_0x57ac06,DOT_DIR,'sql',_0x5aa5a6),'lockFilePath':resolve(_0x57ac06,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x57ac06,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- (function(_0x3d7279,_0x34b191){const _0x5ee3d7=a214_0x5d7b,_0x2ab878=_0x3d7279();while(!![]){try{const _0x548bbd=-parseInt(_0x5ee3d7(0x129))/0x1*(-parseInt(_0x5ee3d7(0x13a))/0x2)+-parseInt(_0x5ee3d7(0x12e))/0x3+parseInt(_0x5ee3d7(0x142))/0x4*(parseInt(_0x5ee3d7(0x12d))/0x5)+-parseInt(_0x5ee3d7(0x132))/0x6+parseInt(_0x5ee3d7(0x134))/0x7+parseInt(_0x5ee3d7(0x12f))/0x8+parseInt(_0x5ee3d7(0x133))/0x9*(-parseInt(_0x5ee3d7(0x131))/0xa);if(_0x548bbd===_0x34b191)break;else _0x2ab878['push'](_0x2ab878['shift']());}catch(_0x458cdd){_0x2ab878['push'](_0x2ab878['shift']());}}}(a214_0x976a,0x3eb04));import{readdir,stat}from'node:fs/promises';function a214_0x5d7b(_0x1090fd,_0xb408cf){_0x1090fd=_0x1090fd-0x127;const _0x976a78=a214_0x976a();let _0x5d7b91=_0x976a78[_0x1090fd];return _0x5d7b91;}import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x55c1e0){const _0x8916fa=a214_0x5d7b;if(_0x55c1e0===_0x8916fa(0x127))return'sql';if(_0x55c1e0===_0x8916fa(0x13d))return _0x8916fa(0x12b);return undefined;}async function scanSqlFilesRecursively(_0x5c5807,_0x41ee64){const _0x5341c5=a214_0x5d7b,_0x13cdc4=[];try{const _0x1472d9=await readdir(_0x5c5807,{'withFileTypes':!![]});for(const _0x1e4eff of _0x1472d9){const _0x315f71=join(_0x5c5807,_0x1e4eff[_0x5341c5(0x140)]);if(_0x1e4eff[_0x5341c5(0x13b)]()){_0x13cdc4[_0x5341c5(0x13e)](...await scanSqlFilesRecursively(_0x315f71,_0x41ee64));continue;}if(!_0x1e4eff['isFile']())continue;const _0x188572=extname(_0x1e4eff[_0x5341c5(0x140)])['toLowerCase'](),_0x1b7160=extensionToMode(_0x188572);if(!_0x1b7160)continue;const _0x3076d3=relative(_0x41ee64,_0x315f71)[_0x5341c5(0x137)](/\\/g,'/'),_0x369eff=_0x3076d3['split']('/')[_0x5341c5(0x128)](Boolean),_0x2675b7=parseSqlPath(_0x369eff,_0x1e4eff['name'],_0x188572);if(!_0x2675b7)continue;_0x13cdc4[_0x5341c5(0x13e)]({'sqlCode':_0x2675b7['sqlCode'],'sqlName':_0x2675b7['sqlName'],'dbDirectory':_0x369eff[0x0],'filePath':_0x315f71,'relativePath':_0x3076d3,'lockKey':_0x2675b7[_0x5341c5(0x135)],'mode':_0x1b7160});}}catch(_0x2eb499){if(_0x2eb499[_0x5341c5(0x139)]!=='ENOENT')throw _0x2eb499;}return _0x13cdc4;}function a214_0x976a(){const _0x80c51b=['.xml','push','slice','name','sqlRootDir','1988372oaAjqT','test','length','.sql','filter','1aRupxd','path','mybatisXml','sql','5mPcMJF','1143285HQFpxK','2118192VJMNKi','indexOf','173170DETIuP','1461498kYFiUf','9uXgLwW','555212NWaJFc','sqlCode','dbName','replace','mode','code','115168XzqVTR','isDirectory','dbId'];a214_0x976a=function(){return _0x80c51b;};return a214_0x976a();}export async function scanLocalSqlQueries(_0x3c67fd){const _0x1ba12f=a214_0x5d7b;return scanSqlFilesRecursively(_0x3c67fd[_0x1ba12f(0x141)],_0x3c67fd[_0x1ba12f(0x141)]);}export function resolveLocalSqlFilePath(_0x2b4089,_0x2b8546,_0x541a77){const _0x49c05a=a214_0x5d7b,_0x3bfea6=_0x541a77?.[_0x49c05a(0x12a)]||(_0x541a77?.['sqlName']||_0x541a77?.['dbName']?buildSqlRelativePath(_0x2b8546,_0x541a77?.['sqlName'],_0x541a77?.[_0x49c05a(0x136)],_0x541a77?.[_0x49c05a(0x138)]||_0x49c05a(0x12c),_0x541a77?.[_0x49c05a(0x13c)]):buildDefaultSqlFileName(_0x2b8546,_0x541a77?.[_0x49c05a(0x138)]||_0x49c05a(0x12c)));return join(_0x2b4089[_0x49c05a(0x141)],_0x3bfea6);}export async function directoryExists(_0x287313){const _0x496815=a214_0x5d7b;try{const _0xe67528=await stat(_0x287313);return _0xe67528[_0x496815(0x13b)]();}catch{return![];}}function parseSqlPath(_0x5e6d75,_0x25d810,_0x1a519f){const _0x469af5=a214_0x5d7b,_0x40c2be=_0x25d810[_0x469af5(0x13f)](0x0,-_0x1a519f[_0x469af5(0x144)]);if(_0x5e6d75[_0x469af5(0x144)]<0x2)return null;const _0x559089=_0x40c2be[_0x469af5(0x130)]('_');if(_0x559089<=0x0||_0x559089>=_0x40c2be['length']-0x1)return null;const _0x5de323=_0x40c2be[_0x469af5(0x13f)](0x0,_0x559089);if(!isLikelySqlCode(_0x5de323))return null;return{'sqlCode':_0x5de323,'sqlName':_0x40c2be[_0x469af5(0x13f)](_0x559089+0x1)};}function isLikelySqlCode(_0x747162){const _0x28ad3e=a214_0x5d7b;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x28ad3e(0x143)](_0x747162);}
1
+ function a214_0x58b4(_0x137bba,_0x4e9e1a){_0x137bba=_0x137bba-0xed;const _0x9a070c=a214_0x9a07();let _0x58b465=_0x9a070c[_0x137bba];return _0x58b465;}(function(_0x4e5a09,_0x15d618){const _0x1dc46c=a214_0x58b4,_0x24ee66=_0x4e5a09();while(!![]){try{const _0x3e0ca2=parseInt(_0x1dc46c(0x102))/0x1*(-parseInt(_0x1dc46c(0xfd))/0x2)+parseInt(_0x1dc46c(0x109))/0x3+-parseInt(_0x1dc46c(0xf3))/0x4*(-parseInt(_0x1dc46c(0x106))/0x5)+-parseInt(_0x1dc46c(0xfb))/0x6*(-parseInt(_0x1dc46c(0xef))/0x7)+-parseInt(_0x1dc46c(0xf9))/0x8+parseInt(_0x1dc46c(0xf4))/0x9*(-parseInt(_0x1dc46c(0x105))/0xa)+-parseInt(_0x1dc46c(0x101))/0xb*(-parseInt(_0x1dc46c(0x107))/0xc);if(_0x3e0ca2===_0x15d618)break;else _0x24ee66['push'](_0x24ee66['shift']());}catch(_0x26d91a){_0x24ee66['push'](_0x24ee66['shift']());}}}(a214_0x9a07,0xf3299));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x13631c){const _0x3acbf4=a214_0x58b4;if(_0x13631c==='.sql')return'sql';if(_0x13631c===_0x3acbf4(0xf1))return'mybatisXml';return undefined;}async function scanSqlFilesRecursively(_0x214150,_0x222b1c){const _0xab5315=a214_0x58b4,_0x3c89e1=[];try{const _0x20bf71=await readdir(_0x214150,{'withFileTypes':!![]});for(const _0x459358 of _0x20bf71){const _0x4fe501=join(_0x214150,_0x459358[_0xab5315(0xf2)]);if(_0x459358['isDirectory']()){_0x3c89e1[_0xab5315(0xed)](...await scanSqlFilesRecursively(_0x4fe501,_0x222b1c));continue;}if(!_0x459358['isFile']())continue;const _0x2de40b=extname(_0x459358[_0xab5315(0xf2)])[_0xab5315(0x108)](),_0x481bf8=extensionToMode(_0x2de40b);if(!_0x481bf8)continue;const _0x458e30=relative(_0x222b1c,_0x4fe501)[_0xab5315(0x10e)](/\\/g,'/'),_0x149ab3=_0x458e30[_0xab5315(0x10d)]('/')[_0xab5315(0x10c)](Boolean),_0x5711d0=parseSqlPath(_0x149ab3,_0x459358[_0xab5315(0xf2)],_0x2de40b);if(!_0x5711d0)continue;_0x3c89e1[_0xab5315(0xed)]({'sqlCode':_0x5711d0[_0xab5315(0x10b)],'sqlName':_0x5711d0[_0xab5315(0xf0)],'dbDirectory':_0x149ab3[0x0],'filePath':_0x4fe501,'relativePath':_0x458e30,'lockKey':_0x5711d0['sqlCode'],'mode':_0x481bf8});}}catch(_0x28139f){if(_0x28139f[_0xab5315(0xfe)]!==_0xab5315(0xf6))throw _0x28139f;}return _0x3c89e1;}export async function scanLocalSqlQueries(_0x5d60c8){const _0x40c443=a214_0x58b4;return scanSqlFilesRecursively(_0x5d60c8['sqlRootDir'],_0x5d60c8[_0x40c443(0x104)]);}export function resolveLocalSqlFilePath(_0x410868,_0x272c49,_0xf6701a){const _0x231129=a214_0x58b4,_0x5a7b36=_0xf6701a?.[_0x231129(0xfa)]||(_0xf6701a?.[_0x231129(0xf0)]||_0xf6701a?.[_0x231129(0xff)]?buildSqlRelativePath(_0x272c49,_0xf6701a?.[_0x231129(0xf0)],_0xf6701a?.[_0x231129(0xff)],_0xf6701a?.['mode']||_0x231129(0xf7),_0xf6701a?.[_0x231129(0xf5)]):buildDefaultSqlFileName(_0x272c49,_0xf6701a?.[_0x231129(0xfc)]||_0x231129(0xf7)));return join(_0x410868['sqlRootDir'],_0x5a7b36);}export async function directoryExists(_0x561771){const _0x8a5037=a214_0x58b4;try{const _0x579e6c=await stat(_0x561771);return _0x579e6c[_0x8a5037(0x103)]();}catch{return![];}}function parseSqlPath(_0x4fb1a5,_0x19d661,_0x48fa94){const _0x2f9ee9=a214_0x58b4,_0x38932c=_0x19d661[_0x2f9ee9(0xf8)](0x0,-_0x48fa94['length']);if(_0x4fb1a5['length']<0x2)return null;const _0x24ab92=_0x38932c[_0x2f9ee9(0xee)]('_');if(_0x24ab92<=0x0||_0x24ab92>=_0x38932c[_0x2f9ee9(0x10a)]-0x1)return null;const _0x32a4e7=_0x38932c['slice'](0x0,_0x24ab92);if(!isLikelySqlCode(_0x32a4e7))return null;return{'sqlCode':_0x32a4e7,'sqlName':_0x38932c[_0x2f9ee9(0xf8)](_0x24ab92+0x1)};}function a214_0x9a07(){const _0x58a02c=['sql','slice','10525680tMIrGb','path','9326736yRPGMv','mode','14gjeHOm','code','dbName','test','3254075NXvKko','241931KTGlFb','isDirectory','sqlRootDir','7656710lKSQIB','5CuRwCk','72mMVCbs','toLowerCase','4714092AxkOse','length','sqlCode','filter','split','replace','push','indexOf','7tlQkkY','sqlName','.xml','name','2543168LFKOoE','18mZQHgE','dbId','ENOENT'];a214_0x9a07=function(){return _0x58a02c;};return a214_0x9a07();}function isLikelySqlCode(_0x4bf955){const _0x1aff5a=a214_0x58b4;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x1aff5a(0x100)](_0x4bf955);}
@@ -1 +1 @@
1
- function a215_0x13e1(_0x108746,_0x35763e){_0x108746=_0x108746-0x14b;const _0x1ddca9=a215_0x1ddc();let _0x13e12f=_0x1ddca9[_0x108746];return _0x13e12f;}(function(_0x6b4b12,_0x1730dc){const _0xef4286=a215_0x13e1,_0x213771=_0x6b4b12();while(!![]){try{const _0x1523bd=-parseInt(_0xef4286(0x14f))/0x1*(parseInt(_0xef4286(0x156))/0x2)+parseInt(_0xef4286(0x157))/0x3+-parseInt(_0xef4286(0x14d))/0x4+parseInt(_0xef4286(0x154))/0x5*(parseInt(_0xef4286(0x14e))/0x6)+-parseInt(_0xef4286(0x150))/0x7*(parseInt(_0xef4286(0x152))/0x8)+parseInt(_0xef4286(0x158))/0x9*(-parseInt(_0xef4286(0x155))/0xa)+parseInt(_0xef4286(0x153))/0xb;if(_0x1523bd===_0x1730dc)break;else _0x213771['push'](_0x213771['shift']());}catch(_0x41a412){_0x213771['push'](_0x213771['shift']());}}}(a215_0x1ddc,0x2ef05));import{readFile}from'node:fs/promises';import a215_0x15ad75 from'node:crypto';export function computeSqlContentHash(_0x35be4f){const _0x2eaf45=a215_0x13e1;return a215_0x15ad75[_0x2eaf45(0x151)]('md5')['update'](_0x35be4f)[_0x2eaf45(0x14b)](_0x2eaf45(0x14c));}export async function computeSqlFileHash(_0x2910e4){const _0xbc1029=await readFile(_0x2910e4,'utf8');return computeSqlContentHash(_0xbc1029);}function a215_0x1ddc(){const _0x301eaf=['6fwMkrh','7BkMrRB','1022GhbXJr','createHash','11416YWitur','12696321KVXtrW','841835QRAbne','794450SBXsYN','107246hEorWk','334647Rzdvmz','36JmJNLZ','digest','hex','1361532JGzkAo'];a215_0x1ddc=function(){return _0x301eaf;};return a215_0x1ddc();}
1
+ (function(_0x5bb7f3,_0x16f683){const _0xbfb8ff=a215_0x58c4,_0xc47ae5=_0x5bb7f3();while(!![]){try{const _0x2d6072=parseInt(_0xbfb8ff(0x1a5))/0x1+parseInt(_0xbfb8ff(0x1aa))/0x2+-parseInt(_0xbfb8ff(0x1ad))/0x3*(-parseInt(_0xbfb8ff(0x1a6))/0x4)+-parseInt(_0xbfb8ff(0x1a1))/0x5+parseInt(_0xbfb8ff(0x1a0))/0x6*(-parseInt(_0xbfb8ff(0x1ab))/0x7)+-parseInt(_0xbfb8ff(0x1a4))/0x8+parseInt(_0xbfb8ff(0x1a7))/0x9;if(_0x2d6072===_0x16f683)break;else _0xc47ae5['push'](_0xc47ae5['shift']());}catch(_0x4e2fba){_0xc47ae5['push'](_0xc47ae5['shift']());}}}(a215_0xdad2,0xa66c9));function a215_0xdad2(){const _0x3b5c3d=['81bLIrOA','5496rvuQTM','5801645HOMUVx','update','hex','2400664tUGrKT','1288481EmcSFy','160764bmdXwg','2353491UQTbEE','utf8','md5','1186648vPeLYw','8302tXbYuP','createHash'];a215_0xdad2=function(){return _0x3b5c3d;};return a215_0xdad2();}function a215_0x58c4(_0x2fe7fd,_0x3df4ac){_0x2fe7fd=_0x2fe7fd-0x1a0;const _0xdad2f5=a215_0xdad2();let _0x58c4cd=_0xdad2f5[_0x2fe7fd];return _0x58c4cd;}import{readFile}from'node:fs/promises';import a215_0x29776f from'node:crypto';export function computeSqlContentHash(_0x27298e){const _0x40e176=a215_0x58c4;return a215_0x29776f[_0x40e176(0x1ac)](_0x40e176(0x1a9))[_0x40e176(0x1a2)](_0x27298e)['digest'](_0x40e176(0x1a3));}export async function computeSqlFileHash(_0x9ab4d6){const _0x3e93b5=a215_0x58c4,_0x551ecc=await readFile(_0x9ab4d6,_0x3e93b5(0x1a8));return computeSqlContentHash(_0x551ecc);}
@@ -1 +1 @@
1
- function a216_0x2695(){const _0x1c4044=['189915JqMDye','3313120GiwhRz','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','7556850mNebPS','175XJPkUU','utf8','\x22.\x20','12724821xmqYFJ','904188EcGZVu','111616EhpgUS','sqlRoot','parse','sqls',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','lastSync','2cHLZgO','code','628307CDXBgm','apps','stringify'];a216_0x2695=function(){return _0x1c4044;};return a216_0x2695();}(function(_0x1cff01,_0x59f18e){const _0x2fcd7a=a216_0x22cb,_0x565a7f=_0x1cff01();while(!![]){try{const _0x5c1128=parseInt(_0x2fcd7a(0x172))/0x1*(parseInt(_0x2fcd7a(0x170))/0x2)+parseInt(_0x2fcd7a(0x169))/0x3+-parseInt(_0x2fcd7a(0x176))/0x4+parseInt(_0x2fcd7a(0x175))/0x5+-parseInt(_0x2fcd7a(0x164))/0x6+-parseInt(_0x2fcd7a(0x165))/0x7*(-parseInt(_0x2fcd7a(0x16a))/0x8)+parseInt(_0x2fcd7a(0x168))/0x9;if(_0x5c1128===_0x59f18e)break;else _0x565a7f['push'](_0x565a7f['shift']());}catch(_0x7eb3e8){_0x565a7f['push'](_0x565a7f['shift']());}}}(a216_0x2695,0x9ce28));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x308a71,_0x4b229b,_0x238b3d,_0xe1d5e){const _0x18af22=a216_0x22cb,_0x1189df=_0x308a71??createEmptySqlLock();let _0x53f2c1=_0x1189df[_0x18af22(0x173)][_0x4b229b];if(!_0x53f2c1)return _0x53f2c1={'sqlRoot':_0x238b3d,'lastSync':'','sqls':{}},_0x1189df['apps'][_0x4b229b]=_0x53f2c1,{'lockData':_0x1189df,'appLock':_0x53f2c1};if(!_0x53f2c1[_0x18af22(0x16b)])_0x53f2c1[_0x18af22(0x16b)]=_0x238b3d;else{if(_0x53f2c1[_0x18af22(0x16b)]!==_0x238b3d)throw new Error(_0xe1d5e+_0x18af22(0x16e)+_0x238b3d+'\x22\x20vs\x20lock\x20\x22'+_0x53f2c1[_0x18af22(0x16b)]+_0x18af22(0x167)+_0x18af22(0x163));}return!_0x53f2c1[_0x18af22(0x16d)]&&(_0x53f2c1[_0x18af22(0x16d)]={}),!_0x53f2c1[_0x18af22(0x16f)]&&(_0x53f2c1['lastSync']=''),{'lockData':_0x1189df,'appLock':_0x53f2c1};}function a216_0x22cb(_0x5d3bb0,_0x547af6){_0x5d3bb0=_0x5d3bb0-0x163;const _0x2695ed=a216_0x2695();let _0x22cb0d=_0x2695ed[_0x5d3bb0];return _0x22cb0d;}export async function readSqlLockFile(_0x193eaf){const _0x5a96bd=a216_0x22cb;try{const _0x51fed6=await readFile(_0x193eaf,_0x5a96bd(0x166));return JSON[_0x5a96bd(0x16c)](_0x51fed6);}catch(_0x3a25cb){if(_0x3a25cb[_0x5a96bd(0x171)]==='ENOENT')return null;throw new Error(_0x5a96bd(0x177)+String(_0x3a25cb));}}export async function writeSqlLockFile(_0x4abada,_0x178b0e){const _0x41f418=a216_0x22cb;await mkdir(dirname(_0x4abada),{'recursive':!![]}),await writeFile(_0x4abada,JSON[_0x41f418(0x174)](_0x178b0e,null,0x2),'utf8');}
1
+ (function(_0x1ce298,_0x511cc5){const _0x5330b5=a216_0x5668,_0x1f13a1=_0x1ce298();while(!![]){try{const _0x4abeb4=parseInt(_0x5330b5(0x132))/0x1+-parseInt(_0x5330b5(0x138))/0x2+-parseInt(_0x5330b5(0x134))/0x3*(parseInt(_0x5330b5(0x140))/0x4)+parseInt(_0x5330b5(0x136))/0x5*(parseInt(_0x5330b5(0x139))/0x6)+parseInt(_0x5330b5(0x13b))/0x7*(-parseInt(_0x5330b5(0x146))/0x8)+parseInt(_0x5330b5(0x145))/0x9*(-parseInt(_0x5330b5(0x137))/0xa)+parseInt(_0x5330b5(0x147))/0xb;if(_0x4abeb4===_0x511cc5)break;else _0x1f13a1['push'](_0x1f13a1['shift']());}catch(_0x250328){_0x1f13a1['push'](_0x1f13a1['shift']());}}}(a216_0x4969,0x6ddaf));function a216_0x5668(_0x3098ea,_0x477b8d){_0x3098ea=_0x3098ea-0x132;const _0x4969b4=a216_0x4969();let _0x566812=_0x4969b4[_0x3098ea];return _0x566812;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a216_0x4969(){const _0x5af64d=['1615400BDYaiR','1169240WEYFll','4800IioPaV','parse','8995VHrjZG','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','ENOENT','sqls','lastSync','116392irTuqU','\x22.\x20','sqlRoot','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','utf8','45lyTodj','688NOtYbr','19429344XgSxMR','106791cleWPY',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','3mJvpPp','apps','680IncRTZ'];a216_0x4969=function(){return _0x5af64d;};return a216_0x4969();}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x207bf3,_0xd95c12,_0x1d2798,_0x1158cf){const _0x577662=a216_0x5668,_0x2b18f3=_0x207bf3??createEmptySqlLock();let _0x4ed0e4=_0x2b18f3[_0x577662(0x135)][_0xd95c12];if(!_0x4ed0e4)return _0x4ed0e4={'sqlRoot':_0x1d2798,'lastSync':'','sqls':{}},_0x2b18f3[_0x577662(0x135)][_0xd95c12]=_0x4ed0e4,{'lockData':_0x2b18f3,'appLock':_0x4ed0e4};if(!_0x4ed0e4[_0x577662(0x142)])_0x4ed0e4[_0x577662(0x142)]=_0x1d2798;else{if(_0x4ed0e4[_0x577662(0x142)]!==_0x1d2798)throw new Error(_0x1158cf+_0x577662(0x133)+_0x1d2798+'\x22\x20vs\x20lock\x20\x22'+_0x4ed0e4[_0x577662(0x142)]+_0x577662(0x141)+_0x577662(0x143));}return!_0x4ed0e4[_0x577662(0x13e)]&&(_0x4ed0e4['sqls']={}),!_0x4ed0e4[_0x577662(0x13f)]&&(_0x4ed0e4['lastSync']=''),{'lockData':_0x2b18f3,'appLock':_0x4ed0e4};}export async function readSqlLockFile(_0xe74f71){const _0x47e62d=a216_0x5668;try{const _0x150d9f=await readFile(_0xe74f71,'utf8');return JSON[_0x47e62d(0x13a)](_0x150d9f);}catch(_0x5cd76b){if(_0x5cd76b['code']===_0x47e62d(0x13d))return null;throw new Error(_0x47e62d(0x13c)+String(_0x5cd76b));}}export async function writeSqlLockFile(_0x4d2b30,_0x43e6f0){const _0x11a977=a216_0x5668;await mkdir(dirname(_0x4d2b30),{'recursive':!![]}),await writeFile(_0x4d2b30,JSON['stringify'](_0x43e6f0,null,0x2),_0x11a977(0x144));}
@@ -1 +1 @@
1
- (function(_0x3500bf,_0x132fc){const _0x1304aa=a218_0x1f57,_0x257b35=_0x3500bf();while(!![]){try{const _0x173fe7=-parseInt(_0x1304aa(0x175))/0x1*(-parseInt(_0x1304aa(0x179))/0x2)+parseInt(_0x1304aa(0x16a))/0x3*(parseInt(_0x1304aa(0x169))/0x4)+-parseInt(_0x1304aa(0x16c))/0x5+-parseInt(_0x1304aa(0x17a))/0x6*(-parseInt(_0x1304aa(0x173))/0x7)+parseInt(_0x1304aa(0x168))/0x8*(parseInt(_0x1304aa(0x16d))/0x9)+parseInt(_0x1304aa(0x16b))/0xa+-parseInt(_0x1304aa(0x166))/0xb*(parseInt(_0x1304aa(0x170))/0xc);if(_0x173fe7===_0x132fc)break;else _0x257b35['push'](_0x257b35['shift']());}catch(_0x2c8a9a){_0x257b35['push'](_0x257b35['shift']());}}}(a218_0x1e92,0xdc347));export function detectSqlMode(_0x4ba910){const _0x1dbb87=a218_0x1f57,_0x56c184=_0x4ba910[_0x1dbb87(0x167)]();if(/^<(select|insert|update|delete)\b/i[_0x1dbb87(0x165)](_0x56c184))return _0x1dbb87(0x16f);return _0x1dbb87(0x172);}export function getSqlFileExtension(_0x3d6071){const _0xc6678f=a218_0x1f57;return _0x3d6071===_0xc6678f(0x16f)?'.xml':_0xc6678f(0x178);}export function buildDefaultSqlFileName(_0x2f107f,_0x1f6ecf){return''+_0x2f107f+getSqlFileExtension(_0x1f6ecf);}export function sanitizeSqlPathSegment(_0x50418b,_0x13a48c){const _0x1b8810=a218_0x1f57,_0x40dd37=String(_0x50418b??'')[_0x1b8810(0x176)](),_0xefcea6=_0x40dd37[_0x1b8810(0x177)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x1b8810(0x177)](/\s+/g,'-')[_0x1b8810(0x177)](/-+/g,'-')[_0x1b8810(0x177)](/^\.+/,'')['replace'](/\.+$/,'')[_0x1b8810(0x177)](/^-+/,'')[_0x1b8810(0x177)](/-+$/,'');return _0xefcea6||_0x13a48c;}export function buildDbDirectoryName(_0x16f021,_0x27216c){const _0x4be8ad=a218_0x1f57;return sanitizeSqlPathSegment(_0x16f021,_0x27216c!=null?_0x4be8ad(0x171)+_0x27216c:_0x4be8ad(0x16e));}function a218_0x1e92(){const _0x418511=['3lmKecQ','trim','replace','.sql','469334LDUxHg','3798JFteKb','test','22623689ezQjDo','trimStart','9533752nQGpnp','2012WGzdFu','51ORJScb','9208650jhMtBN','7700650lUgUSC','9HrsKTm','unknown-db','mybatisXml','12utklOM','db-','sql','18508tgurVC','unknown-sql'];a218_0x1e92=function(){return _0x418511;};return a218_0x1e92();}function a218_0x1f57(_0x251e91,_0x2d1903){_0x251e91=_0x251e91-0x165;const _0x1e9236=a218_0x1e92();let _0x1f576f=_0x1e9236[_0x251e91];return _0x1f576f;}export function buildSqlRelativePath(_0x4dc281,_0x3b89e0,_0x1bf427,_0x1fad5c,_0x5c1900){const _0x2b9c66=a218_0x1f57,_0x2c84d3=buildDbDirectoryName(_0x1bf427,_0x5c1900),_0x547698=sanitizeSqlPathSegment(_0x4dc281,_0x2b9c66(0x174)),_0xf5de15=sanitizeSqlPathSegment(_0x3b89e0,_0x547698);return _0x2c84d3+'/'+_0x547698+'_'+_0xf5de15+getSqlFileExtension(_0x1fad5c);}
1
+ (function(_0x51eef9,_0x2d05ea){const _0x5c8ee3=a218_0x3c08,_0x53c82d=_0x51eef9();while(!![]){try{const _0x17d47e=parseInt(_0x5c8ee3(0x9d))/0x1*(parseInt(_0x5c8ee3(0xa1))/0x2)+parseInt(_0x5c8ee3(0x9f))/0x3+-parseInt(_0x5c8ee3(0xaa))/0x4+-parseInt(_0x5c8ee3(0xab))/0x5*(-parseInt(_0x5c8ee3(0xad))/0x6)+parseInt(_0x5c8ee3(0xa0))/0x7*(parseInt(_0x5c8ee3(0xa4))/0x8)+-parseInt(_0x5c8ee3(0xa6))/0x9+-parseInt(_0x5c8ee3(0x9c))/0xa*(parseInt(_0x5c8ee3(0x9b))/0xb);if(_0x17d47e===_0x2d05ea)break;else _0x53c82d['push'](_0x53c82d['shift']());}catch(_0x549f16){_0x53c82d['push'](_0x53c82d['shift']());}}}(a218_0x7f8d,0xb689c));function a218_0x3c08(_0x5c9932,_0x5010ae){_0x5c9932=_0x5c9932-0x9b;const _0x7f8d07=a218_0x7f8d();let _0x3c08d6=_0x7f8d07[_0x5c9932];return _0x3c08d6;}export function detectSqlMode(_0x5bd99){const _0x3a4c56=a218_0x3c08,_0x3e724f=_0x5bd99[_0x3a4c56(0xa7)]();if(/^<(select|insert|update|delete)\b/i['test'](_0x3e724f))return _0x3a4c56(0xa3);return _0x3a4c56(0xa5);}export function getSqlFileExtension(_0x34ea95){const _0x1ccee2=a218_0x3c08;return _0x34ea95===_0x1ccee2(0xa3)?_0x1ccee2(0xa2):_0x1ccee2(0xac);}export function buildDefaultSqlFileName(_0x44eecf,_0x199623){return''+_0x44eecf+getSqlFileExtension(_0x199623);}export function sanitizeSqlPathSegment(_0x43c96d,_0x5c3a3a){const _0x4511d2=a218_0x3c08,_0x2d4671=String(_0x43c96d??'')[_0x4511d2(0xa9)](),_0x3dd74c=_0x2d4671[_0x4511d2(0xa8)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x4511d2(0xa8)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x4511d2(0xa8)](/^\.+/,'')['replace'](/\.+$/,'')[_0x4511d2(0xa8)](/^-+/,'')[_0x4511d2(0xa8)](/-+$/,'');return _0x3dd74c||_0x5c3a3a;}function a218_0x7f8d(){const _0x3c8333=['.xml','mybatisXml','136JoVqRg','sql','11458602lDyTOH','trimStart','replace','trim','2231764EEiYDf','573845yTuoAJ','.sql','24SNHFwY','db-','unknown-sql','55sKpfIY','569650LPihwb','6911mzpbBf','unknown-db','2973609blHDrK','78274UAgupJ','354AfshnL'];a218_0x7f8d=function(){return _0x3c8333;};return a218_0x7f8d();}export function buildDbDirectoryName(_0x4b5499,_0x301ad6){const _0x6eb82=a218_0x3c08;return sanitizeSqlPathSegment(_0x4b5499,_0x301ad6!=null?_0x6eb82(0xae)+_0x301ad6:_0x6eb82(0x9e));}export function buildSqlRelativePath(_0xbf76d3,_0x181099,_0x47f4ca,_0x580594,_0x3fc13f){const _0x3df454=a218_0x3c08,_0x331e39=buildDbDirectoryName(_0x47f4ca,_0x3fc13f),_0x20d47d=sanitizeSqlPathSegment(_0xbf76d3,_0x3df454(0xaf)),_0x53fa4b=sanitizeSqlPathSegment(_0x181099,_0x20d47d);return _0x331e39+'/'+_0x20d47d+'_'+_0x53fa4b+getSqlFileExtension(_0x580594);}
@@ -1 +1 @@
1
- const a219_0x54bf2e=a219_0xc30d;(function(_0x48ccb5,_0x1fec71){const _0x138c9e=a219_0xc30d,_0x22e0be=_0x48ccb5();while(!![]){try{const _0x20349f=-parseInt(_0x138c9e(0x1e1))/0x1*(parseInt(_0x138c9e(0x1fd))/0x2)+-parseInt(_0x138c9e(0x1f1))/0x3+parseInt(_0x138c9e(0x1df))/0x4+parseInt(_0x138c9e(0x21f))/0x5*(parseInt(_0x138c9e(0x21c))/0x6)+-parseInt(_0x138c9e(0x207))/0x7*(parseInt(_0x138c9e(0x1dc))/0x8)+-parseInt(_0x138c9e(0x1f9))/0x9*(-parseInt(_0x138c9e(0x216))/0xa)+parseInt(_0x138c9e(0x1fb))/0xb*(parseInt(_0x138c9e(0x1e2))/0xc);if(_0x20349f===_0x1fec71)break;else _0x22e0be['push'](_0x22e0be['shift']());}catch(_0x4c392b){_0x22e0be['push'](_0x22e0be['shift']());}}}(a219_0x25a9,0x90665));function a219_0xc30d(_0x160e28,_0x272372){_0x160e28=_0x160e28-0x1d9;const _0x25a941=a219_0x25a9();let _0xc30d87=_0x25a941[_0x160e28];return _0xc30d87;}const MYBATIS_OUTER_TAGS=new Map([['select',a219_0x54bf2e(0x23c)],['insert','INSERT'],[a219_0x54bf2e(0x23a),a219_0x54bf2e(0x20a)],[a219_0x54bf2e(0x1ed),a219_0x54bf2e(0x1e0)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a219_0x54bf2e(0x218),a219_0x54bf2e(0x231),a219_0x54bf2e(0x212),a219_0x54bf2e(0x1f0),a219_0x54bf2e(0x1e3),a219_0x54bf2e(0x210),a219_0x54bf2e(0x234),a219_0x54bf2e(0x22b),a219_0x54bf2e(0x21a),a219_0x54bf2e(0x203)]),MYBATIS_BRANCH_TAGS=new Set(['if',a219_0x54bf2e(0x231),a219_0x54bf2e(0x212),a219_0x54bf2e(0x1f0),a219_0x54bf2e(0x1e3)]);export const MYBATIS_DYNAMIC_START_MARKER=a219_0x54bf2e(0x1f5);export const MYBATIS_DYNAMIC_END_MARKER=a219_0x54bf2e(0x20d);export const MYBATIS_INCLUDE_MARKER=a219_0x54bf2e(0x230);const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a219_0x54bf2e(0x22f)+[...MYBATIS_OUTER_TAGS['keys']()][a219_0x54bf2e(0x233)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x4b8fa3){const _0x14d66e=a219_0x54bf2e,_0x5c0a0c=typeof _0x4b8fa3==='string'?_0x4b8fa3:'';if(!startsWithMybatisStatementWrapper(_0x5c0a0c))return{'sql':_0x5c0a0c,'mode':_0x14d66e(0x202)};let _0x131b33=0x0,_0x362bec='',_0x19646f,_0x1a0c8f=![],_0x1613e4=![];const _0x56d79b=[];while(_0x131b33<_0x5c0a0c[_0x14d66e(0x224)]){if(_0x5c0a0c['startsWith'](_0x14d66e(0x1da),_0x131b33)){const _0x582aea=_0x5c0a0c[_0x14d66e(0x209)]('-->',_0x131b33+0x4);if(_0x582aea<0x0)return invalidMybatisSource(_0x14d66e(0x20f));_0x362bec+='\x20',_0x131b33=_0x582aea+0x3;continue;}if(_0x5c0a0c[_0x14d66e(0x1e7)](_0x14d66e(0x1ff),_0x131b33)){if(!_0x1a0c8f||_0x1613e4)return invalidMybatisSource(_0x14d66e(0x221));const _0x4a8304=_0x5c0a0c['indexOf'](_0x14d66e(0x1fa),_0x131b33+0x9);if(_0x4a8304<0x0)return invalidMybatisSource(_0x14d66e(0x1d9));_0x362bec+=_0x5c0a0c[_0x14d66e(0x21d)](_0x131b33+0x9,_0x4a8304),_0x131b33=_0x4a8304+0x3;continue;}if(_0x5c0a0c[_0x14d66e(0x1e7)]('<?',_0x131b33)){if(_0x1a0c8f)return invalidMybatisSource(_0x14d66e(0x227));const _0x424d5d=_0x5c0a0c['indexOf']('?>',_0x131b33+0x2);if(_0x424d5d<0x0)return invalidMybatisSource('Unterminated\x20XML\x20declaration.');_0x362bec+='\x20',_0x131b33=_0x424d5d+0x2;continue;}if(_0x5c0a0c[_0x131b33]!=='<'){const _0x1d183b=_0x5c0a0c[_0x14d66e(0x209)]('<',_0x131b33),_0x65f47f=_0x1d183b<0x0?_0x5c0a0c['length']:_0x1d183b,_0x524884=_0x5c0a0c[_0x14d66e(0x21d)](_0x131b33,_0x65f47f);if((!_0x1a0c8f||_0x1613e4)&&_0x524884[_0x14d66e(0x210)]())return invalidMybatisSource(_0x14d66e(0x22c));if(_0x1a0c8f&&!_0x1613e4){const _0x247c52=decodeXmlEntities(_0x524884);if(_0x247c52===null)return invalidMybatisSource(_0x14d66e(0x21e));_0x362bec+=_0x247c52;}else _0x362bec+='\x20';_0x131b33=_0x65f47f;continue;}const _0x54c933=findXmlTagEnd(_0x5c0a0c,_0x131b33);if(_0x54c933<0x0)return invalidMybatisSource(_0x14d66e(0x1eb));const _0x3ad9a4=_0x5c0a0c['slice'](_0x131b33,_0x54c933+0x1),_0x32e7d6=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x14d66e(0x20e)](_0x3ad9a4);if(!_0x32e7d6)return invalidMybatisSource(_0x14d66e(0x1f6));const _0x5f0235=_0x32e7d6[0x1]==='/',_0x48a4d3=_0x32e7d6[0x2]??'',_0xe1fb97=_0x48a4d3[_0x14d66e(0x1f2)](),_0x346987=_0x32e7d6[0x3]??'',_0x559062=_0x32e7d6[0x4]==='/',_0x2dcd89=MYBATIS_OUTER_TAGS[_0x14d66e(0x22e)](_0xe1fb97);if(!_0x2dcd89&&!MYBATIS_DYNAMIC_TAGS[_0x14d66e(0x1e5)](_0xe1fb97))return invalidMybatisSource(_0x14d66e(0x206)+_0xe1fb97+'>.');if(!_0x2dcd89&&_0x48a4d3!==_0xe1fb97)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x48a4d3+'>.');if(_0x5f0235){if(_0x346987[_0x14d66e(0x210)]()||_0x559062)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x48a4d3+'>.');const _0x4457c0=_0x56d79b['at'](-0x1);if(!_0x4457c0||(_0x4457c0[_0x14d66e(0x1ef)]?_0x4457c0['tagName']!==_0xe1fb97:_0x4457c0['rawName']!==_0x48a4d3))return invalidMybatisSource(_0x14d66e(0x237)+_0x48a4d3+'>.');_0x56d79b[_0x14d66e(0x1db)]();if(_0x4457c0[_0x14d66e(0x1ef)])_0x1613e4=!![];_0x362bec+=MYBATIS_BRANCH_TAGS[_0x14d66e(0x1e5)](_0xe1fb97)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x346987))return invalidMybatisSource(_0x14d66e(0x20b)+_0x48a4d3+'>.');if(_0xe1fb97===_0x14d66e(0x203)&&(!_0x559062||_0x56d79b['at'](-0x1)?.[_0x14d66e(0x1ee)]!==_0x14d66e(0x21a)))return invalidMybatisSource(_0x14d66e(0x200));if(_0x2dcd89){if(_0x1a0c8f||_0x56d79b[_0x14d66e(0x224)]>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x1a0c8f=!![],_0x1613e4=_0x559062,_0x19646f=_0x2dcd89;}else{if(!_0x1a0c8f||_0x1613e4)return invalidMybatisSource(_0x14d66e(0x22d)+_0x48a4d3+'>.');}_0x362bec+=_0xe1fb97==='where'?'\x20WHERE\x20':_0xe1fb97===_0x14d66e(0x234)?_0x14d66e(0x22a):_0xe1fb97===_0x14d66e(0x21a)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0xe1fb97)&&!_0x559062?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x559062&&_0x56d79b[_0x14d66e(0x239)]({'rawName':_0x48a4d3,'tagName':_0xe1fb97,'outer':!!_0x2dcd89});}_0x131b33=_0x54c933+0x1;}if(_0x56d79b[_0x14d66e(0x224)]>0x0)return invalidMybatisSource(_0x14d66e(0x21b)+_0x56d79b['at'](-0x1)?.[_0x14d66e(0x223)]+'>.');if(!_0x1a0c8f||!_0x1613e4)return invalidMybatisSource(_0x14d66e(0x213));return{'sql':_0x362bec[_0x14d66e(0x210)](),'mode':'mybatisXml',..._0x19646f?{'statementType':_0x19646f}:{}};}function hasWellFormedXmlAttributes(_0x519b26){const _0x242ac0=a219_0x54bf2e;let _0x59e570=0x0;const _0x458921=new Set();while(_0x59e570<_0x519b26[_0x242ac0(0x224)]){while(_0x59e570<_0x519b26[_0x242ac0(0x224)]&&/\s/[_0x242ac0(0x1f3)](_0x519b26[_0x59e570]??''))_0x59e570+=0x1;if(_0x59e570>=_0x519b26['length'])return!![];const _0x4a49a4=/^[A-Za-z_:][\w:.-]*/[_0x242ac0(0x20e)](_0x519b26['slice'](_0x59e570)),_0x3cf8f0=_0x4a49a4?.[0x0];if(!_0x3cf8f0||_0x458921[_0x242ac0(0x1e5)](_0x3cf8f0))return![];_0x458921[_0x242ac0(0x220)](_0x3cf8f0),_0x59e570+=_0x3cf8f0[_0x242ac0(0x224)];while(_0x59e570<_0x519b26['length']&&/\s/[_0x242ac0(0x1f3)](_0x519b26[_0x59e570]??''))_0x59e570+=0x1;if(_0x519b26[_0x59e570]!=='=')return![];_0x59e570+=0x1;while(_0x59e570<_0x519b26[_0x242ac0(0x224)]&&/\s/[_0x242ac0(0x1f3)](_0x519b26[_0x59e570]??''))_0x59e570+=0x1;const _0x44b74f=_0x519b26[_0x59e570];if(_0x44b74f!=='\x22'&&_0x44b74f!=='\x27')return![];_0x59e570+=0x1;const _0x522fcb=_0x519b26[_0x242ac0(0x209)](_0x44b74f,_0x59e570);if(_0x522fcb<0x0)return![];if(decodeXmlEntities(_0x519b26[_0x242ac0(0x21d)](_0x59e570,_0x522fcb))===null)return![];_0x59e570=_0x522fcb+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x3becb6){const _0x3b5403=a219_0x54bf2e;let _0x15ae40=0x0;const _0x265bf0=()=>{const _0x31969d=a219_0xc30d;while(_0x15ae40<_0x3becb6[_0x31969d(0x224)]&&/\s/[_0x31969d(0x1f3)](_0x3becb6[_0x15ae40]??''))_0x15ae40+=0x1;};_0x265bf0();while(_0x15ae40<_0x3becb6[_0x3b5403(0x224)]){if(_0x3becb6['startsWith'](_0x3b5403(0x1da),_0x15ae40)){const _0x95efd=_0x3becb6[_0x3b5403(0x209)](_0x3b5403(0x1f7),_0x15ae40+0x4);if(_0x95efd<0x0)return!![];_0x15ae40=_0x95efd+0x3,_0x265bf0();continue;}if(_0x3becb6[_0x3b5403(0x1e7)]('<?',_0x15ae40)){const _0x574fec=_0x3becb6[_0x3b5403(0x209)]('?>',_0x15ae40+0x2);if(_0x574fec<0x0)return!![];_0x15ae40=_0x574fec+0x2,_0x265bf0();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x3b5403(0x1f3)](_0x3becb6['slice'](_0x15ae40));}function invalidMybatisSource(_0x4c217d){const _0xc7626f=a219_0x54bf2e;return{'sql':'','mode':_0xc7626f(0x1fe),'error':_0x4c217d};}function a219_0x25a9(){const _0xe808ec=['include','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','12qOncNH','slice','Invalid\x20XML\x20entity\x20reference.','47335eMipaG','add','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','rawName','length','includes','DDL','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','SQL\x20content\x20is\x20empty','Unable\x20to\x20detect\x20SQL\x20type.\x20','\x20SET\x20','bind','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','get','^<\x5cs*(?:','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','foreach','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','join','set','&apos;','INSERT','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','unknown\x20table(s)','push','update','\x20query\x20targeting\x20','SELECT','error','Unterminated\x20CDATA\x20section.','<!--','pop','8FmyHzV','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','UNKNOWN','956532noKvHf','DELETE','5XFVDNQ','260724TediCL','otherwise','reason','has','replace','startsWith','parseInt','\x20with\x20parameters:\x20','replaceAll','Unterminated\x20MyBatis\x20XML\x20tag.','&lt;','delete','tagName','outer','when','1214184WKyBwJ','toLowerCase','test','type','__RABETBASE_MYBATIS_DYNAMIC_START__','Invalid\x20MyBatis\x20XML\x20tag.','-->','toUpperCase','3835827fGfaUF',']]>','770bTfWoA','fromCodePoint','258526dUTXvR','mybatisXml','<![CDATA[','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','sql','property','match','matchAll','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','6922013WoRtkK','&quot;','indexOf','UPDATE','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','__RABETBASE_MYBATIS_DYNAMIC_END__','exec','Unterminated\x20XML\x20comment.','trim','&amp;','choose','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','WITH','from','20YEKOLE','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','where','split'];a219_0x25a9=function(){return _0xe808ec;};return a219_0x25a9();}function findXmlTagEnd(_0x40b35c,_0x1dce00){const _0xc17ee0=a219_0x54bf2e;let _0x152991;for(let _0x857cd7=_0x1dce00+0x1;_0x857cd7<_0x40b35c[_0xc17ee0(0x224)];_0x857cd7+=0x1){const _0x5f48d6=_0x40b35c[_0x857cd7];if(_0x152991){if(_0x5f48d6===_0x152991)_0x152991=undefined;continue;}if(_0x5f48d6==='\x22'||_0x5f48d6==='\x27'){_0x152991=_0x5f48d6;continue;}if(_0x5f48d6==='>')return _0x857cd7;}return-0x1;}function decodeXmlEntities(_0xb33ebb){const _0x20bd78=a219_0x54bf2e;let _0x14d81e=![];const _0x4cccc1=_0xb33ebb[_0x20bd78(0x1e6)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x2f560b=>{const _0x15d189=_0x20bd78;if(_0x2f560b===_0x15d189(0x1ec))return'<';if(_0x2f560b==='&gt;')return'>';if(_0x2f560b===_0x15d189(0x208))return'\x22';if(_0x2f560b===_0x15d189(0x235))return'\x27';if(_0x2f560b===_0x15d189(0x211))return'&';const _0x189bf1=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x15d189(0x20e)](_0x2f560b);if(_0x189bf1){const _0xf26453=_0x189bf1[0x1],_0x109457=_0x189bf1[0x2],_0x2d092a=Number[_0x15d189(0x1e8)](_0xf26453??_0x109457??'',_0xf26453?0x10:0xa);if(isValidXmlCharacter(_0x2d092a))return String[_0x15d189(0x1fc)](_0x2d092a);}return _0x14d81e=!![],'';});return _0x14d81e?null:_0x4cccc1;}function isValidXmlCharacter(_0x53aa4d){return _0x53aa4d===0x9||_0x53aa4d===0xa||_0x53aa4d===0xd||_0x53aa4d>=0x20&&_0x53aa4d<=0xd7ff||_0x53aa4d>=0xe000&&_0x53aa4d<=0xfffd||_0x53aa4d>=0x10000&&_0x53aa4d<=0x10ffff;}export function detectSqlType(_0x5f4cc2){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x5f4cc2));}function detectNormalizedSqlType(_0x2473e7){const _0x3decc0=a219_0x54bf2e;if(_0x2473e7['error'])return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x2473e7[_0x3decc0(0x23d)]};if(!_0x2473e7[_0x3decc0(0x202)][_0x3decc0(0x210)]())return{'type':_0x3decc0(0x1de),'isSelectOnly':![],'isDangerous':![],'reason':_0x3decc0(0x228)};const _0x5a52b2=stripStaticAnalysisMarkers(_0x2473e7[_0x3decc0(0x202)])[_0x3decc0(0x1e6)](/#\{[^}]*\}/g,'?')[_0x3decc0(0x1e6)](/\$\{[^}]*\}/g,'?')[_0x3decc0(0x1e6)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x3decc0(0x1e6)](/\/\*[\s\S]*?\*\//g,'')[_0x3decc0(0x210)](),_0x522bcb=_0x5a52b2[_0x3decc0(0x219)]('\x0a');let _0x6ad931='';for(const _0x5ac850 of _0x522bcb){const _0x8cf7c4=_0x5ac850[_0x3decc0(0x210)]();if(!_0x8cf7c4||_0x8cf7c4[_0x3decc0(0x1e7)]('--')||_0x8cf7c4[_0x3decc0(0x1e7)]('/*'))continue;_0x6ad931=_0x8cf7c4;break;}const _0xaecd7e=_0x6ad931[_0x3decc0(0x1f8)](),_0x3a4b3c=_0x2473e7['statementType'],_0x5d7579=maskSqlTextForBlockedKeywordScan(_0x5a52b2),_0x5d4734=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x5d7579);if(_0x3a4b3c===_0x3decc0(0x23c)||!_0x3a4b3c&&(_0xaecd7e[_0x3decc0(0x1e7)](_0x3decc0(0x23c))||_0xaecd7e[_0x3decc0(0x1e7)](_0x3decc0(0x214)))){const _0x833be8=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x3decc0(0x1f3)](_0x5a52b2);return{'type':_0x3decc0(0x23c),'isSelectOnly':!_0x833be8,'isDangerous':_0x833be8,'reason':_0x833be8?_0x3decc0(0x222):undefined};}if(_0x3a4b3c===_0x3decc0(0x236)||!_0x3a4b3c&&_0xaecd7e[_0x3decc0(0x1e7)](_0x3decc0(0x236)))return{'type':_0x3decc0(0x236),'isSelectOnly':![],'isDangerous':_0x5d4734,'reason':_0x5d4734?_0x3decc0(0x1dd):undefined};if(_0x3a4b3c===_0x3decc0(0x20a)||!_0x3a4b3c&&_0xaecd7e[_0x3decc0(0x1e7)](_0x3decc0(0x20a)))return{'type':_0x3decc0(0x20a),'isSelectOnly':![],'isDangerous':_0x5d4734,'reason':_0x5d4734?_0x3decc0(0x1dd):undefined};if(_0x3a4b3c===_0x3decc0(0x1e0)||!_0x3a4b3c&&_0xaecd7e[_0x3decc0(0x1e7)](_0x3decc0(0x1e0)))return{'type':_0x3decc0(0x1e0),'isSelectOnly':![],'isDangerous':!![],'reason':_0x3decc0(0x232)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0xaecd7e))return{'type':_0x3decc0(0x226),'isSelectOnly':![],'isDangerous':!![],'reason':_0x3decc0(0x201)};return{'type':_0x3decc0(0x1de),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x32ae93){const _0x36a3e0=a219_0x54bf2e;return _0x32ae93['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x36a3e0(0x1ea)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x36a3e0(0x1ea)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x339ffd){const _0x1b8143=a219_0x54bf2e;return _0x339ffd[_0x1b8143(0x1e6)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x1b8143(0x1e6)](/"(?:""|\\.|[^"])*"/g,'\x20')['replace'](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x1b8143(0x1e6)](/--.*$/gm,'\x20')[_0x1b8143(0x1e6)](/#.*$/gm,'\x20')[_0x1b8143(0x1e6)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x179660){const _0x5d4402=a219_0x54bf2e,_0x46f7d6=_0x179660[_0x5d4402(0x1e6)](/#\{[^}]*\}/g,'?')[_0x5d4402(0x1e6)](/\$\{[^}]*\}/g,'?')['replace'](/'[^']*'/g,'\x27\x27')[_0x5d4402(0x1e6)](/--.*$/gm,'')[_0x5d4402(0x1e6)](/\/\*[\s\S]*?\*\//g,''),_0x5914b1=[],_0x2a6b5a=_0x46f7d6[_0x5d4402(0x204)](/FROM\s+([^\s,)(]+)/i);addTable(_0x5914b1,_0x2a6b5a?.[0x1]);for(const _0x30087c of _0x46f7d6[_0x5d4402(0x205)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x5914b1,_0x30087c[0x1]);}const _0x2ede03=_0x46f7d6[_0x5d4402(0x204)](/INTO\s+([^\s(]+)/i);addTable(_0x5914b1,_0x2ede03?.[0x1]);const _0x486928=_0x46f7d6[_0x5d4402(0x204)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x5914b1,_0x486928?.[0x1]),_0x5914b1;}function addTable(_0x3e30a0,_0x9421b8){const _0x2aab44=a219_0x54bf2e,_0x49baa4=_0x9421b8?.[_0x2aab44(0x1e6)](/[`"]/g,'');_0x49baa4&&_0x49baa4!==UNRESOLVED_SQL_FRAGMENT&&!_0x3e30a0[_0x2aab44(0x225)](_0x49baa4)&&_0x3e30a0[_0x2aab44(0x239)](_0x49baa4);}function extractParameters(_0x1916bc){const _0x154634=a219_0x54bf2e,_0x213de6=new Set();for(const _0x1d7dbb of _0x1916bc[_0x154634(0x205)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x1d7dbb[0x1])_0x213de6[_0x154634(0x220)](_0x1d7dbb[0x1]);}return Array[_0x154634(0x215)](_0x213de6);}export function validateSql(_0x4bac8c){const _0x362f7f=a219_0x54bf2e,_0xeec472=normalizeSqlForStaticAnalysis(_0x4bac8c),_0x2c9fc4=detectNormalizedSqlType(_0xeec472),_0x12b785=stripStaticAnalysisMarkers(_0xeec472['sql']),_0x55ebea=_0xeec472[_0x362f7f(0x23d)]?[]:extractTables(_0x12b785),_0x425269=_0xeec472[_0x362f7f(0x23d)]?[]:extractParameters(_0x12b785);if(_0x2c9fc4['isDangerous'])return{'valid':![],'sqlType':_0x2c9fc4,'tables':_0x55ebea,'parameters':_0x425269,'message':_0x2c9fc4[_0x362f7f(0x1e4)]||_0x2c9fc4[_0x362f7f(0x1f4)]+_0x362f7f(0x217)};if(_0x2c9fc4[_0x362f7f(0x1f4)]==='UNKNOWN')return{'valid':![],'sqlType':_0x2c9fc4,'tables':_0x55ebea,'parameters':_0x425269,'message':_0xeec472[_0x362f7f(0x23d)]?_0x362f7f(0x229)+_0xeec472[_0x362f7f(0x23d)]:_0x362f7f(0x20c)};return{'valid':!![],'sqlType':_0x2c9fc4,'tables':_0x55ebea,'parameters':_0x425269,'message':_0x2c9fc4['type']+_0x362f7f(0x23b)+(_0x55ebea[_0x362f7f(0x224)]?_0x55ebea['join'](',\x20'):_0x362f7f(0x238))+(_0x425269[_0x362f7f(0x224)]?_0x362f7f(0x1e9)+_0x425269[_0x362f7f(0x233)](',\x20'):'')};}
1
+ const a219_0x135778=a219_0x2b02;(function(_0xba8341,_0x275d9a){const _0x3675c2=a219_0x2b02,_0x51bac9=_0xba8341();while(!![]){try{const _0x4557fd=parseInt(_0x3675c2(0xe6))/0x1+-parseInt(_0x3675c2(0xe4))/0x2*(-parseInt(_0x3675c2(0xeb))/0x3)+parseInt(_0x3675c2(0xd1))/0x4*(parseInt(_0x3675c2(0xa4))/0x5)+parseInt(_0x3675c2(0xdb))/0x6*(parseInt(_0x3675c2(0xd5))/0x7)+parseInt(_0x3675c2(0xee))/0x8*(-parseInt(_0x3675c2(0xe2))/0x9)+parseInt(_0x3675c2(0xbe))/0xa+-parseInt(_0x3675c2(0xe7))/0xb;if(_0x4557fd===_0x275d9a)break;else _0x51bac9['push'](_0x51bac9['shift']());}catch(_0x4851c1){_0x51bac9['push'](_0x51bac9['shift']());}}}(a219_0x5dad,0xd73da));const MYBATIS_OUTER_TAGS=new Map([[a219_0x135778(0xc5),a219_0x135778(0xaf)],[a219_0x135778(0xcc),a219_0x135778(0xbc)],['update',a219_0x135778(0xe9)],[a219_0x135778(0xb2),'DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if','where',a219_0x135778(0xa0),a219_0x135778(0xb3),a219_0x135778(0xdf),a219_0x135778(0xdd),a219_0x135778(0xed),a219_0x135778(0xb0),a219_0x135778(0xb1),'include','property']),MYBATIS_BRANCH_TAGS=new Set(['if',a219_0x135778(0xa0),a219_0x135778(0xb3),a219_0x135778(0xdf),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER='__RABETBASE_MYBATIS_DYNAMIC_START__';export const MYBATIS_DYNAMIC_END_MARKER=a219_0x135778(0xaa);export const MYBATIS_INCLUDE_MARKER=a219_0x135778(0xa7);const UNRESOLVED_SQL_FRAGMENT=a219_0x135778(0xec),MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS[a219_0x135778(0xa2)]()][a219_0x135778(0xa5)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x4d38e5){const _0x5809f3=a219_0x135778,_0x5cf739=typeof _0x4d38e5===_0x5809f3(0x96)?_0x4d38e5:'';if(!startsWithMybatisStatementWrapper(_0x5cf739))return{'sql':_0x5cf739,'mode':'sql'};let _0x16de29=0x0,_0x2085d5='',_0x4ea9ee,_0x408044=![],_0x50b236=![];const _0x1f10af=[];while(_0x16de29<_0x5cf739[_0x5809f3(0x9e)]){if(_0x5cf739[_0x5809f3(0xc4)]('<!--',_0x16de29)){const _0x3423cb=_0x5cf739[_0x5809f3(0x9d)]('-->',_0x16de29+0x4);if(_0x3423cb<0x0)return invalidMybatisSource('Unterminated\x20XML\x20comment.');_0x2085d5+='\x20',_0x16de29=_0x3423cb+0x3;continue;}if(_0x5cf739[_0x5809f3(0xc4)](_0x5809f3(0xd6),_0x16de29)){if(!_0x408044||_0x50b236)return invalidMybatisSource(_0x5809f3(0xe1));const _0xf780a6=_0x5cf739[_0x5809f3(0x9d)](']]>',_0x16de29+0x9);if(_0xf780a6<0x0)return invalidMybatisSource(_0x5809f3(0x9b));_0x2085d5+=_0x5cf739[_0x5809f3(0xd7)](_0x16de29+0x9,_0xf780a6),_0x16de29=_0xf780a6+0x3;continue;}if(_0x5cf739[_0x5809f3(0xc4)]('<?',_0x16de29)){if(_0x408044)return invalidMybatisSource(_0x5809f3(0xab));const _0xe5cf34=_0x5cf739[_0x5809f3(0x9d)]('?>',_0x16de29+0x2);if(_0xe5cf34<0x0)return invalidMybatisSource('Unterminated\x20XML\x20declaration.');_0x2085d5+='\x20',_0x16de29=_0xe5cf34+0x2;continue;}if(_0x5cf739[_0x16de29]!=='<'){const _0x26a99f=_0x5cf739['indexOf']('<',_0x16de29),_0x1128cb=_0x26a99f<0x0?_0x5cf739[_0x5809f3(0x9e)]:_0x26a99f,_0x262f20=_0x5cf739[_0x5809f3(0xd7)](_0x16de29,_0x1128cb);if((!_0x408044||_0x50b236)&&_0x262f20['trim']())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x408044&&!_0x50b236){const _0x400ba5=decodeXmlEntities(_0x262f20);if(_0x400ba5===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x2085d5+=_0x400ba5;}else _0x2085d5+='\x20';_0x16de29=_0x1128cb;continue;}const _0x2f8e15=findXmlTagEnd(_0x5cf739,_0x16de29);if(_0x2f8e15<0x0)return invalidMybatisSource(_0x5809f3(0xd8));const _0x2f3e16=_0x5cf739[_0x5809f3(0xd7)](_0x16de29,_0x2f8e15+0x1),_0x18c938=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/['exec'](_0x2f3e16);if(!_0x18c938)return invalidMybatisSource(_0x5809f3(0xcd));const _0x41ab71=_0x18c938[0x1]==='/',_0x336599=_0x18c938[0x2]??'',_0x3a3ee4=_0x336599[_0x5809f3(0xb5)](),_0x1847b3=_0x18c938[0x3]??'',_0x98769c=_0x18c938[0x4]==='/',_0x464056=MYBATIS_OUTER_TAGS[_0x5809f3(0xd4)](_0x3a3ee4);if(!_0x464056&&!MYBATIS_DYNAMIC_TAGS[_0x5809f3(0xe3)](_0x3a3ee4))return invalidMybatisSource(_0x5809f3(0xe5)+_0x3a3ee4+'>.');if(!_0x464056&&_0x336599!==_0x3a3ee4)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x336599+'>.');if(_0x41ab71){if(_0x1847b3[_0x5809f3(0xed)]()||_0x98769c)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x336599+'>.');const _0x468dae=_0x1f10af['at'](-0x1);if(!_0x468dae||(_0x468dae['outer']?_0x468dae['tagName']!==_0x3a3ee4:_0x468dae[_0x5809f3(0xca)]!==_0x336599))return invalidMybatisSource(_0x5809f3(0xef)+_0x336599+'>.');_0x1f10af[_0x5809f3(0xb8)]();if(_0x468dae[_0x5809f3(0xea)])_0x50b236=!![];_0x2085d5+=MYBATIS_BRANCH_TAGS[_0x5809f3(0xe3)](_0x3a3ee4)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x1847b3))return invalidMybatisSource(_0x5809f3(0x95)+_0x336599+'>.');if(_0x3a3ee4===_0x5809f3(0xc2)&&(!_0x98769c||_0x1f10af['at'](-0x1)?.[_0x5809f3(0xda)]!==_0x5809f3(0xdc)))return invalidMybatisSource(_0x5809f3(0xc8));if(_0x464056){if(_0x408044||_0x1f10af[_0x5809f3(0x9e)]>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x408044=!![],_0x50b236=_0x98769c,_0x4ea9ee=_0x464056;}else{if(!_0x408044||_0x50b236)return invalidMybatisSource(_0x5809f3(0xe8)+_0x336599+'>.');}_0x2085d5+=_0x3a3ee4===_0x5809f3(0xd3)?_0x5809f3(0xcf):_0x3a3ee4===_0x5809f3(0xb0)?'\x20SET\x20':_0x3a3ee4===_0x5809f3(0xdc)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x5809f3(0xe3)](_0x3a3ee4)&&!_0x98769c?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x98769c&&_0x1f10af[_0x5809f3(0xc6)]({'rawName':_0x336599,'tagName':_0x3a3ee4,'outer':!!_0x464056});}_0x16de29=_0x2f8e15+0x1;}if(_0x1f10af['length']>0x0)return invalidMybatisSource(_0x5809f3(0xbb)+_0x1f10af['at'](-0x1)?.[_0x5809f3(0xca)]+'>.');if(!_0x408044||!_0x50b236)return invalidMybatisSource(_0x5809f3(0xc1));return{'sql':_0x2085d5[_0x5809f3(0xed)](),'mode':_0x5809f3(0x9c),..._0x4ea9ee?{'statementType':_0x4ea9ee}:{}};}function hasWellFormedXmlAttributes(_0x53d565){const _0x33d083=a219_0x135778;let _0x5c60e9=0x0;const _0x4c8ffe=new Set();while(_0x5c60e9<_0x53d565[_0x33d083(0x9e)]){while(_0x5c60e9<_0x53d565[_0x33d083(0x9e)]&&/\s/[_0x33d083(0x98)](_0x53d565[_0x5c60e9]??''))_0x5c60e9+=0x1;if(_0x5c60e9>=_0x53d565[_0x33d083(0x9e)])return!![];const _0x2c4324=/^[A-Za-z_:][\w:.-]*/[_0x33d083(0x9f)](_0x53d565['slice'](_0x5c60e9)),_0x334756=_0x2c4324?.[0x0];if(!_0x334756||_0x4c8ffe[_0x33d083(0xe3)](_0x334756))return![];_0x4c8ffe[_0x33d083(0xf0)](_0x334756),_0x5c60e9+=_0x334756[_0x33d083(0x9e)];while(_0x5c60e9<_0x53d565['length']&&/\s/[_0x33d083(0x98)](_0x53d565[_0x5c60e9]??''))_0x5c60e9+=0x1;if(_0x53d565[_0x5c60e9]!=='=')return![];_0x5c60e9+=0x1;while(_0x5c60e9<_0x53d565['length']&&/\s/['test'](_0x53d565[_0x5c60e9]??''))_0x5c60e9+=0x1;const _0x22a64e=_0x53d565[_0x5c60e9];if(_0x22a64e!=='\x22'&&_0x22a64e!=='\x27')return![];_0x5c60e9+=0x1;const _0x16367c=_0x53d565[_0x33d083(0x9d)](_0x22a64e,_0x5c60e9);if(_0x16367c<0x0)return![];if(decodeXmlEntities(_0x53d565[_0x33d083(0xd7)](_0x5c60e9,_0x16367c))===null)return![];_0x5c60e9=_0x16367c+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x4d0a50){const _0x3066b5=a219_0x135778;let _0x1b21db=0x0;const _0x10bc6b=()=>{const _0x5bcec7=a219_0x2b02;while(_0x1b21db<_0x4d0a50[_0x5bcec7(0x9e)]&&/\s/[_0x5bcec7(0x98)](_0x4d0a50[_0x1b21db]??''))_0x1b21db+=0x1;};_0x10bc6b();while(_0x1b21db<_0x4d0a50[_0x3066b5(0x9e)]){if(_0x4d0a50[_0x3066b5(0xc4)](_0x3066b5(0x99),_0x1b21db)){const _0x56b6c9=_0x4d0a50[_0x3066b5(0x9d)](_0x3066b5(0xc7),_0x1b21db+0x4);if(_0x56b6c9<0x0)return!![];_0x1b21db=_0x56b6c9+0x3,_0x10bc6b();continue;}if(_0x4d0a50[_0x3066b5(0xc4)]('<?',_0x1b21db)){const _0x12574b=_0x4d0a50[_0x3066b5(0x9d)]('?>',_0x1b21db+0x2);if(_0x12574b<0x0)return!![];_0x1b21db=_0x12574b+0x2,_0x10bc6b();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x3066b5(0x98)](_0x4d0a50[_0x3066b5(0xd7)](_0x1b21db));}function invalidMybatisSource(_0x50b3c2){const _0x32ac9f=a219_0x135778;return{'sql':'','mode':_0x32ac9f(0x9c),'error':_0x50b3c2};}function findXmlTagEnd(_0x24b3a2,_0x43d3ba){const _0x5e2b88=a219_0x135778;let _0x5e15a7;for(let _0x3e5e0a=_0x43d3ba+0x1;_0x3e5e0a<_0x24b3a2[_0x5e2b88(0x9e)];_0x3e5e0a+=0x1){const _0x5e4246=_0x24b3a2[_0x3e5e0a];if(_0x5e15a7){if(_0x5e4246===_0x5e15a7)_0x5e15a7=undefined;continue;}if(_0x5e4246==='\x22'||_0x5e4246==='\x27'){_0x5e15a7=_0x5e4246;continue;}if(_0x5e4246==='>')return _0x3e5e0a;}return-0x1;}function decodeXmlEntities(_0x1e10af){const _0x1e0645=a219_0x135778;let _0x1b1f49=![];const _0x1dc828=_0x1e10af[_0x1e0645(0xc9)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x53c1b7=>{const _0x5eba26=_0x1e0645;if(_0x53c1b7===_0x5eba26(0xbf))return'<';if(_0x53c1b7===_0x5eba26(0xcb))return'>';if(_0x53c1b7===_0x5eba26(0xce))return'\x22';if(_0x53c1b7===_0x5eba26(0xa9))return'\x27';if(_0x53c1b7===_0x5eba26(0xba))return'&';const _0x59d27c=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x5eba26(0x9f)](_0x53c1b7);if(_0x59d27c){const _0x1b9ccb=_0x59d27c[0x1],_0x2fdd34=_0x59d27c[0x2],_0x40b07d=Number[_0x5eba26(0xb4)](_0x1b9ccb??_0x2fdd34??'',_0x1b9ccb?0x10:0xa);if(isValidXmlCharacter(_0x40b07d))return String['fromCodePoint'](_0x40b07d);}return _0x1b1f49=!![],'';});return _0x1b1f49?null:_0x1dc828;}function isValidXmlCharacter(_0x3ccc06){return _0x3ccc06===0x9||_0x3ccc06===0xa||_0x3ccc06===0xd||_0x3ccc06>=0x20&&_0x3ccc06<=0xd7ff||_0x3ccc06>=0xe000&&_0x3ccc06<=0xfffd||_0x3ccc06>=0x10000&&_0x3ccc06<=0x10ffff;}export function detectSqlType(_0x35d973){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x35d973));}function detectNormalizedSqlType(_0x56c0ed){const _0x3eaa6f=a219_0x135778;if(_0x56c0ed[_0x3eaa6f(0xc0)])return{'type':_0x3eaa6f(0xbd),'isSelectOnly':![],'isDangerous':![],'reason':_0x56c0ed[_0x3eaa6f(0xc0)]};if(!_0x56c0ed[_0x3eaa6f(0xb7)][_0x3eaa6f(0xed)]())return{'type':_0x3eaa6f(0xbd),'isSelectOnly':![],'isDangerous':![],'reason':_0x3eaa6f(0x9a)};const _0x148948=stripStaticAnalysisMarkers(_0x56c0ed[_0x3eaa6f(0xb7)])[_0x3eaa6f(0xc9)](/#\{[^}]*\}/g,'?')[_0x3eaa6f(0xc9)](/\$\{[^}]*\}/g,'?')[_0x3eaa6f(0xc9)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x3eaa6f(0xc9)](/\/\*[\s\S]*?\*\//g,'')[_0x3eaa6f(0xed)](),_0x4b6e78=_0x148948[_0x3eaa6f(0xe0)]('\x0a');let _0xf0b1e0='';for(const _0x18cc3c of _0x4b6e78){const _0x47936a=_0x18cc3c['trim']();if(!_0x47936a||_0x47936a['startsWith']('--')||_0x47936a[_0x3eaa6f(0xc4)]('/*'))continue;_0xf0b1e0=_0x47936a;break;}const _0x50928a=_0xf0b1e0[_0x3eaa6f(0xa8)](),_0x5cef96=_0x56c0ed[_0x3eaa6f(0xd2)],_0x3a2393=maskSqlTextForBlockedKeywordScan(_0x148948),_0x3ff125=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x3eaa6f(0x98)](_0x3a2393);if(_0x5cef96==='SELECT'||!_0x5cef96&&(_0x50928a[_0x3eaa6f(0xc4)](_0x3eaa6f(0xaf))||_0x50928a[_0x3eaa6f(0xc4)](_0x3eaa6f(0xde)))){const _0x257b00=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x3eaa6f(0x98)](_0x148948);return{'type':'SELECT','isSelectOnly':!_0x257b00,'isDangerous':_0x257b00,'reason':_0x257b00?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x5cef96==='INSERT'||!_0x5cef96&&_0x50928a['startsWith'](_0x3eaa6f(0xbc)))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x3ff125,'reason':_0x3ff125?_0x3eaa6f(0xb6):undefined};if(_0x5cef96==='UPDATE'||!_0x5cef96&&_0x50928a[_0x3eaa6f(0xc4)](_0x3eaa6f(0xe9)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x3ff125,'reason':_0x3ff125?_0x3eaa6f(0xb6):undefined};if(_0x5cef96===_0x3eaa6f(0xc3)||!_0x5cef96&&_0x50928a[_0x3eaa6f(0xc4)](_0x3eaa6f(0xc3)))return{'type':_0x3eaa6f(0xc3),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x3eaa6f(0x98)](_0x50928a))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'};return{'type':_0x3eaa6f(0xbd),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x77b614){const _0x8c6942=a219_0x135778;return _0x77b614[_0x8c6942(0xad)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function a219_0x2b02(_0x4ae99d,_0x5888d6){_0x4ae99d=_0x4ae99d-0x94;const _0x5dadbb=a219_0x5dad();let _0x2b0275=_0x5dadbb[_0x4ae99d];return _0x2b0275;}function maskSqlTextForBlockedKeywordScan(_0x58381d){const _0xa7bfc9=a219_0x135778;return _0x58381d[_0xa7bfc9(0xc9)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0xa7bfc9(0xc9)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0xa7bfc9(0xc9)](/`(?:``|\\.|[^`])*`/g,'\x20')['replace'](/--.*$/gm,'\x20')[_0xa7bfc9(0xc9)](/#.*$/gm,'\x20')[_0xa7bfc9(0xc9)](/\/\*[\s\S]*?\*\//g,'\x20');}function a219_0x5dad(){const _0x59a415=['split','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','9HHaEvE','has','6jaanuY','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','535636yhCEMq','22639144VcrdMk','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','UPDATE','outer','343650ESsRrD','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','trim','1791248SbhSFx','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','add','isDangerous','Unable\x20to\x20detect\x20SQL\x20type.\x20','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','string','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','test','<!--','SQL\x20content\x20is\x20empty','Unterminated\x20CDATA\x20section.','mybatisXml','indexOf','length','exec','foreach','includes','keys','reason','3455405edHIYj','join','from','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','toUpperCase','&apos;','__RABETBASE_MYBATIS_DYNAMIC_END__','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','unknown\x20table(s)','replaceAll','match','SELECT','set','bind','delete','choose','parseInt','toLowerCase','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','sql','pop','\x20query\x20targeting\x20','&amp;','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','INSERT','UNKNOWN','4221520rZwLbf','&lt;','error','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','property','DELETE','startsWith','select','push','-->','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','replace','rawName','&gt;','insert','Invalid\x20MyBatis\x20XML\x20tag.','&quot;','\x20WHERE\x20','matchAll','8nCsySf','statementType','where','get','1680126swhiEz','<![CDATA[','slice','Unterminated\x20MyBatis\x20XML\x20tag.','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','tagName','12rfEqKx','include','otherwise','WITH','when'];a219_0x5dad=function(){return _0x59a415;};return a219_0x5dad();}function extractTables(_0x5182e8){const _0x5beab7=a219_0x135778,_0x1e1f45=_0x5182e8[_0x5beab7(0xc9)](/#\{[^}]*\}/g,'?')[_0x5beab7(0xc9)](/\$\{[^}]*\}/g,'?')[_0x5beab7(0xc9)](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x42093d=[],_0x20c7a2=_0x1e1f45[_0x5beab7(0xae)](/FROM\s+([^\s,)(]+)/i);addTable(_0x42093d,_0x20c7a2?.[0x1]);for(const _0xb62b01 of _0x1e1f45['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x42093d,_0xb62b01[0x1]);}const _0x4d5685=_0x1e1f45['match'](/INTO\s+([^\s(]+)/i);addTable(_0x42093d,_0x4d5685?.[0x1]);const _0x1f8a7d=_0x1e1f45['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x42093d,_0x1f8a7d?.[0x1]),_0x42093d;}function addTable(_0x27894b,_0x4de887){const _0x209aba=a219_0x135778,_0xa9a0b2=_0x4de887?.[_0x209aba(0xc9)](/[`"]/g,'');_0xa9a0b2&&_0xa9a0b2!==UNRESOLVED_SQL_FRAGMENT&&!_0x27894b[_0x209aba(0xa1)](_0xa9a0b2)&&_0x27894b[_0x209aba(0xc6)](_0xa9a0b2);}function extractParameters(_0x3e16d3){const _0x517604=a219_0x135778,_0x3e47dc=new Set();for(const _0xf094ce of _0x3e16d3[_0x517604(0xd0)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0xf094ce[0x1])_0x3e47dc[_0x517604(0xf0)](_0xf094ce[0x1]);}return Array[_0x517604(0xa6)](_0x3e47dc);}export function validateSql(_0x399544){const _0x46a4fa=a219_0x135778,_0x2704f9=normalizeSqlForStaticAnalysis(_0x399544),_0x53f7ba=detectNormalizedSqlType(_0x2704f9),_0x2fa547=stripStaticAnalysisMarkers(_0x2704f9[_0x46a4fa(0xb7)]),_0x2954de=_0x2704f9[_0x46a4fa(0xc0)]?[]:extractTables(_0x2fa547),_0x554900=_0x2704f9[_0x46a4fa(0xc0)]?[]:extractParameters(_0x2fa547);if(_0x53f7ba[_0x46a4fa(0xf1)])return{'valid':![],'sqlType':_0x53f7ba,'tables':_0x2954de,'parameters':_0x554900,'message':_0x53f7ba[_0x46a4fa(0xa3)]||_0x53f7ba['type']+_0x46a4fa(0x97)};if(_0x53f7ba['type']==='UNKNOWN')return{'valid':![],'sqlType':_0x53f7ba,'tables':_0x2954de,'parameters':_0x554900,'message':_0x2704f9[_0x46a4fa(0xc0)]?_0x46a4fa(0x94)+_0x2704f9[_0x46a4fa(0xc0)]:_0x46a4fa(0xd9)};return{'valid':!![],'sqlType':_0x53f7ba,'tables':_0x2954de,'parameters':_0x554900,'message':_0x53f7ba['type']+_0x46a4fa(0xb9)+(_0x2954de[_0x46a4fa(0x9e)]?_0x2954de[_0x46a4fa(0xa5)](',\x20'):_0x46a4fa(0xac))+(_0x554900[_0x46a4fa(0x9e)]?'\x20with\x20parameters:\x20'+_0x554900[_0x46a4fa(0xa5)](',\x20'):'')};}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- const a220_0xc86f59=a220_0x586e;(function(_0x1b2561,_0x1d4fb3){const _0x1b98bd=a220_0x586e,_0x4edec0=_0x1b2561();while(!![]){try{const _0x3b4dc6=parseInt(_0x1b98bd(0x1d9))/0x1+-parseInt(_0x1b98bd(0x1d2))/0x2+parseInt(_0x1b98bd(0x1d4))/0x3*(-parseInt(_0x1b98bd(0x1cd))/0x4)+-parseInt(_0x1b98bd(0x1da))/0x5*(parseInt(_0x1b98bd(0x1d3))/0x6)+-parseInt(_0x1b98bd(0x1d1))/0x7*(-parseInt(_0x1b98bd(0x1d7))/0x8)+-parseInt(_0x1b98bd(0x1cc))/0x9*(-parseInt(_0x1b98bd(0x1d8))/0xa)+parseInt(_0x1b98bd(0x1ce))/0xb;if(_0x3b4dc6===_0x1d4fb3)break;else _0x4edec0['push'](_0x4edec0['shift']());}catch(_0x559612){_0x4edec0['push'](_0x4edec0['shift']());}}}(a220_0x38c7,0x96418));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a220_0x38c7(){const _0x43e949=['\x0a\x20\x20\x20\x20\x20\x20\x20','1177112fATeIZ','8458790pkloal','258645zvLPMC','5367265DmclLE','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','Run\x20`','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','9TBbgtM','298036LPWdkz','12286131lmBckX','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','\x20auth`\x20to\x20login\x20first.','28RKTJMj','155948zIehoZ','6EXtfHI','42mOtoan','Set\x20appcode\x20via\x20`'];a220_0x38c7=function(){return _0x43e949;};return a220_0x38c7();}import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a220_0x586e(_0x55178b,_0x38ddb9){_0x55178b=_0x55178b-0x1cc;const _0x38c786=a220_0x38c7();let _0x586ea1=_0x38c786[_0x55178b];return _0x586ea1;}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a220_0xc86f59(0x1dc)+CLI_BIN_NAME+a220_0xc86f59(0x1d0),'configMissingHint':[a220_0xc86f59(0x1d5)+CLI_BIN_NAME+a220_0xc86f59(0x1cf),'Tip:\x20`'+CLI_BIN_NAME+a220_0xc86f59(0x1db)]['join'](a220_0xc86f59(0x1d6)),'notInProjectHint':a220_0xc86f59(0x1dd)});
1
+ function a220_0x1872(_0xc25b32,_0x51f4ef){_0xc25b32=_0xc25b32-0x1c5;const _0x1fa721=a220_0x1fa7();let _0x1872f3=_0x1fa721[_0xc25b32];return _0x1872f3;}const a220_0x41bf46=a220_0x1872;(function(_0x3a7cb4,_0x3d6b12){const _0x141c7a=a220_0x1872,_0x219b16=_0x3a7cb4();while(!![]){try{const _0x5d243c=-parseInt(_0x141c7a(0x1c7))/0x1+-parseInt(_0x141c7a(0x1cf))/0x2*(parseInt(_0x141c7a(0x1c9))/0x3)+parseInt(_0x141c7a(0x1ce))/0x4+-parseInt(_0x141c7a(0x1ca))/0x5*(parseInt(_0x141c7a(0x1cd))/0x6)+parseInt(_0x141c7a(0x1d2))/0x7+parseInt(_0x141c7a(0x1cc))/0x8*(parseInt(_0x141c7a(0x1c5))/0x9)+-parseInt(_0x141c7a(0x1d3))/0xa;if(_0x5d243c===_0x3d6b12)break;else _0x219b16['push'](_0x219b16['shift']());}catch(_0x35983e){_0x219b16['push'](_0x219b16['shift']());}}}(a220_0x1fa7,0x6b467));function a220_0x1fa7(){const _0x27a140=['Set\x20appcode\x20via\x20`','1719RPcnMs','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','385126cARVSn','\x0a\x20\x20\x20\x20\x20\x20\x20','81861cfwEIu','180jxXcxz','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','31952PeZJrG','23844KlRzqy','3317892vyqSrr','14IIMKEK','join','Tip:\x20`','2561482TODRWK','7996550mBdbgb'];a220_0x1fa7=function(){return _0x27a140;};return a220_0x1fa7();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':[a220_0x41bf46(0x1d4)+CLI_BIN_NAME+a220_0x41bf46(0x1cb),a220_0x41bf46(0x1d1)+CLI_BIN_NAME+a220_0x41bf46(0x1c6)][a220_0x41bf46(0x1d0)](a220_0x41bf46(0x1c8)),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});
@@ -1 +1 @@
1
- (function(_0xb49065,_0x31f3a8){const _0xa3adf3=a221_0x107d,_0x2e7cfe=_0xb49065();while(!![]){try{const _0x28e9ef=-parseInt(_0xa3adf3(0x1da))/0x1*(-parseInt(_0xa3adf3(0x1d8))/0x2)+parseInt(_0xa3adf3(0x1d6))/0x3*(parseInt(_0xa3adf3(0x1d3))/0x4)+-parseInt(_0xa3adf3(0x1dc))/0x5+parseInt(_0xa3adf3(0x1dd))/0x6+-parseInt(_0xa3adf3(0x1d4))/0x7+-parseInt(_0xa3adf3(0x1d7))/0x8+parseInt(_0xa3adf3(0x1db))/0x9;if(_0x28e9ef===_0x31f3a8)break;else _0x2e7cfe['push'](_0x2e7cfe['shift']());}catch(_0x1cc768){_0x2e7cfe['push'](_0x2e7cfe['shift']());}}}(a221_0x32b4,0xbcaf1));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a221_0x101cc6}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x36eb21){const _0x394fc0=a221_0x107d,_0x54b546=a221_0x101cc6(_0x36eb21,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x36eb21))return _0x54b546;return _0x54b546[_0x394fc0(0x1d5)](_0x5d42a0=>_0x5d42a0[_0x394fc0(0x1de)]===_0x394fc0(0x1d9)?{..._0x5d42a0,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x5d42a0);}function a221_0x107d(_0x1a83f9,_0x3e742d){_0x1a83f9=_0x1a83f9-0x1d3;const _0x32b463=a221_0x32b4();let _0x107dbd=_0x32b463[_0x1a83f9];return _0x107dbd;}function a221_0x32b4(){const _0x3c323d=['map','3DvbLOw','9066344HPDIxj','543098pMuIUu','yes','3qDfaBf','15208092TFLLrQ','7127150vhNQhB','1109172abxVCy','name','3271132FeKLtj','1228556dULXWN'];a221_0x32b4=function(){return _0x3c323d;};return a221_0x32b4();}
1
+ (function(_0x2dfbe5,_0x31b96e){const _0x5517ce=a221_0x5c01,_0x1b653f=_0x2dfbe5();while(!![]){try{const _0x42e292=parseInt(_0x5517ce(0x72))/0x1*(-parseInt(_0x5517ce(0x6a))/0x2)+parseInt(_0x5517ce(0x6c))/0x3*(-parseInt(_0x5517ce(0x71))/0x4)+-parseInt(_0x5517ce(0x6b))/0x5*(-parseInt(_0x5517ce(0x76))/0x6)+parseInt(_0x5517ce(0x67))/0x7*(parseInt(_0x5517ce(0x70))/0x8)+-parseInt(_0x5517ce(0x68))/0x9*(parseInt(_0x5517ce(0x73))/0xa)+-parseInt(_0x5517ce(0x6d))/0xb*(parseInt(_0x5517ce(0x75))/0xc)+parseInt(_0x5517ce(0x69))/0xd;if(_0x42e292===_0x31b96e)break;else _0x1b653f['push'](_0x1b653f['shift']());}catch(_0x24be92){_0x1b653f['push'](_0x1b653f['shift']());}}}(a221_0x4cd6,0xa7ebf));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a221_0x28092d}from'@lovrabet/cli-framework';function a221_0x4cd6(){const _0x492dc3=['8724MrqeXS','155947Sbxoxl','name','yes','2886424ZuENiE','292gAzNOs','15671rQSxmD','10OejyTW','map','948sgdhCm','42WirOba','14KGbNjC','8702973szrtpH','24170107HOUmXu','86DAtDsb','771485dtCCzc'];a221_0x4cd6=function(){return _0x492dc3;};return a221_0x4cd6();}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a221_0x5c01(_0x482cfd,_0x33e086){_0x482cfd=_0x482cfd-0x67;const _0x4cd673=a221_0x4cd6();let _0x5c01fd=_0x4cd673[_0x482cfd];return _0x5c01fd;}export function buildAllFlags(_0x48ba21){const _0x239b3b=a221_0x5c01,_0x1fdb7d=a221_0x28092d(_0x48ba21,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x48ba21))return _0x1fdb7d;return _0x1fdb7d[_0x239b3b(0x74)](_0x23dec2=>_0x23dec2[_0x239b3b(0x6e)]===_0x239b3b(0x6f)?{..._0x23dec2,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x23dec2);}