@lovrabet/rabetbase-cli 2.3.6-beta.1 → 2.3.7-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 (241) 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/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -0
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analyze-cancel.js +1 -1
  79. package/lib/commands/db/analyze-start.js +1 -1
  80. package/lib/commands/db/analyze-status.js +1 -1
  81. package/lib/commands/db/create.js +1 -1
  82. package/lib/commands/db/delete.js +1 -1
  83. package/lib/commands/db/detail.js +1 -1
  84. package/lib/commands/db/diff.js +1 -1
  85. package/lib/commands/db/index.js +1 -1
  86. package/lib/commands/db/list.js +1 -1
  87. package/lib/commands/db/shared.js +1 -1
  88. package/lib/commands/db/tables.js +1 -1
  89. package/lib/commands/db/test.js +1 -1
  90. package/lib/commands/db/update.js +1 -1
  91. package/lib/commands/doctor.js +1 -1
  92. package/lib/commands/file/index.js +1 -0
  93. package/lib/commands/init/index.js +1 -1
  94. package/lib/commands/issue/index.js +1 -1
  95. package/lib/commands/issue/nudge.js +1 -1
  96. package/lib/commands/issue/report.js +1 -1
  97. package/lib/commands/issue/shared.js +1 -1
  98. package/lib/commands/logs/index.js +1 -1
  99. package/lib/commands/menu/index.js +1 -1
  100. package/lib/commands/menu/list.js +1 -1
  101. package/lib/commands/menu/shared/compare-table.js +1 -1
  102. package/lib/commands/menu/shared/index.js +1 -1
  103. package/lib/commands/menu/shared/inquirer.js +1 -1
  104. package/lib/commands/menu/shared/local-pages.js +1 -1
  105. package/lib/commands/menu/shared/logic.js +1 -1
  106. package/lib/commands/menu/shared/service.js +1 -1
  107. package/lib/commands/menu/shared/sync-core.js +1 -1
  108. package/lib/commands/menu/shared/update-core.js +1 -1
  109. package/lib/commands/menu/shared/valid-url.js +1 -1
  110. package/lib/commands/menu/sync.js +1 -1
  111. package/lib/commands/menu/update.js +1 -1
  112. package/lib/commands/page/generate-start.js +1 -1
  113. package/lib/commands/page/generate-status.js +1 -1
  114. package/lib/commands/page/index.js +1 -1
  115. package/lib/commands/page/pull.js +1 -1
  116. package/lib/commands/page/push.js +1 -1
  117. package/lib/commands/page/relation-audit.js +1 -1
  118. package/lib/commands/page/shared.js +1 -1
  119. package/lib/commands/page/standard-page-status.js +1 -1
  120. package/lib/commands/page/sync.js +1 -1
  121. package/lib/commands/permit/index.js +1 -1
  122. package/lib/commands/permit/page-get.js +1 -1
  123. package/lib/commands/permit/page-set.js +1 -1
  124. package/lib/commands/permit/role-apis-set.js +1 -1
  125. package/lib/commands/permit/role-menus-set.js +1 -1
  126. package/lib/commands/permit/role-menus.js +1 -1
  127. package/lib/commands/permit/shared.js +1 -1
  128. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  129. package/lib/commands/project/create/format-elapsed.js +1 -1
  130. package/lib/commands/project/create/main.js +1 -1
  131. package/lib/commands/project/create/non-interactive.js +1 -1
  132. package/lib/commands/project/create/project-template-path.js +1 -1
  133. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  134. package/lib/commands/project/create/use-format-code.js +1 -1
  135. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  136. package/lib/commands/project/index.js +1 -1
  137. package/lib/commands/project/init.js +1 -1
  138. package/lib/commands/project/upgrade.js +1 -1
  139. package/lib/commands/registry.js +1 -1
  140. package/lib/commands/role/create.js +1 -1
  141. package/lib/commands/role/delete.js +1 -1
  142. package/lib/commands/role/detail.js +1 -1
  143. package/lib/commands/role/index.js +1 -1
  144. package/lib/commands/role/list.js +1 -1
  145. package/lib/commands/role/shared.js +1 -1
  146. package/lib/commands/role/update.js +1 -1
  147. package/lib/commands/role/user-add.js +1 -1
  148. package/lib/commands/role/user-remove.js +1 -1
  149. package/lib/commands/role/user-resolve.js +1 -1
  150. package/lib/commands/run/index.js +1 -1
  151. package/lib/commands/schema.js +1 -1
  152. package/lib/commands/sql/create.js +1 -1
  153. package/lib/commands/sql/delete.js +1 -1
  154. package/lib/commands/sql/detail.js +1 -1
  155. package/lib/commands/sql/exec.js +1 -1
  156. package/lib/commands/sql/index.js +1 -1
  157. package/lib/commands/sql/list.js +1 -1
  158. package/lib/commands/sql/pull.js +1 -1
  159. package/lib/commands/sql/push.js +1 -1
  160. package/lib/commands/sql/save.js +1 -1
  161. package/lib/commands/sql/shared.js +1 -1
  162. package/lib/commands/sql/status.js +1 -1
  163. package/lib/commands/sql/validate.js +1 -1
  164. package/lib/commands/workspace/add.js +1 -1
  165. package/lib/commands/workspace/index.js +1 -1
  166. package/lib/commands/workspace/remove.js +1 -1
  167. package/lib/config/schema.js +1 -1
  168. package/lib/constant/cdn.js +1 -1
  169. package/lib/constant/cli.js +1 -1
  170. package/lib/constant/defaults.js +1 -1
  171. package/lib/constant/domain.js +1 -1
  172. package/lib/constant/env.js +1 -1
  173. package/lib/constant/output.js +1 -1
  174. package/lib/constant/paths.js +1 -1
  175. package/lib/constant/risk.js +1 -1
  176. package/lib/context/app-resolver.js +1 -1
  177. package/lib/context/auth-resolver.js +1 -1
  178. package/lib/context/config-loader.js +1 -1
  179. package/lib/context.js +1 -1
  180. package/lib/core/alias-resolver.js +1 -1
  181. package/lib/core/api-client.js +1 -1
  182. package/lib/core/bff/config.js +1 -1
  183. package/lib/core/bff/file-system.js +1 -1
  184. package/lib/core/bff/hash.js +1 -1
  185. package/lib/core/bff/lock.js +1 -1
  186. package/lib/core/bff/utils.js +1 -1
  187. package/lib/core/db-resolver.js +1 -1
  188. package/lib/core/page/file-system.js +1 -1
  189. package/lib/core/page/hash.js +1 -1
  190. package/lib/core/page/lock.js +1 -1
  191. package/lib/core/sql-sync/config.js +1 -1
  192. package/lib/core/sql-sync/file-system.js +1 -1
  193. package/lib/core/sql-sync/hash.js +1 -1
  194. package/lib/core/sql-sync/lock.js +1 -1
  195. package/lib/core/sql-sync/utils.js +1 -1
  196. package/lib/core/sql-validator.js +1 -1
  197. package/lib/errors.js +1 -1
  198. package/lib/framework/build-all-flags.js +1 -1
  199. package/lib/framework/flags.js +1 -1
  200. package/lib/framework/help.js +1 -1
  201. package/lib/framework/index.js +1 -1
  202. package/lib/framework/output.js +1 -1
  203. package/lib/framework/response.js +1 -1
  204. package/lib/framework/runner-alias.js +1 -1
  205. package/lib/framework/runner.js +1 -1
  206. package/lib/framework/schema-export.js +1 -1
  207. package/lib/framework/types.js +1 -1
  208. package/lib/generated/build-info.js +1 -1
  209. package/lib/help.js +1 -1
  210. package/lib/skills/main.js +1 -1
  211. package/lib/skills/npx-skills-add.js +1 -1
  212. package/lib/telemetry/cli-command-trace.js +1 -1
  213. package/lib/telemetry/cli-help-trace.js +1 -1
  214. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  215. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  216. package/lib/telemetry/send-cli-trace-log.js +1 -1
  217. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  218. package/lib/utils/ai_config.js +1 -1
  219. package/lib/utils/apply-jq-filter.js +1 -1
  220. package/lib/utils/cdn-config.js +1 -1
  221. package/lib/utils/check-sdk-version.js +1 -1
  222. package/lib/utils/cli-version-check.js +1 -1
  223. package/lib/utils/cli-version-policy.js +1 -1
  224. package/lib/utils/config.js +1 -1
  225. package/lib/utils/copy-directory.js +1 -1
  226. package/lib/utils/entity-with-id.js +1 -1
  227. package/lib/utils/file-utils.js +1 -1
  228. package/lib/utils/guides-cdn.js +1 -1
  229. package/lib/utils/http-client.js +1 -1
  230. package/lib/utils/is-non-interactive.js +1 -1
  231. package/lib/utils/logger.js +1 -1
  232. package/lib/utils/params.js +1 -1
  233. package/lib/utils/platform.js +1 -1
  234. package/lib/utils/rules-cdn.js +1 -1
  235. package/lib/utils/sleep.js +1 -1
  236. package/lib/utils/template-replacer.js +1 -1
  237. package/lib/utils/update-notice.js +1 -1
  238. package/lib/utils/version.js +1 -1
  239. package/lib/utils/with-active-cookie.js +1 -1
  240. package/lib/utils/write-cli-side-channel.js +1 -1
  241. package/package.json +1 -1
@@ -1 +1 @@
1
- const a169_0x1ea750=a169_0x4941;(function(_0x2aa1f0,_0x407d29){const _0x38fbd8=a169_0x4941,_0x553aba=_0x2aa1f0();while(!![]){try{const _0xfdd820=parseInt(_0x38fbd8(0x115))/0x1+parseInt(_0x38fbd8(0x10d))/0x2+-parseInt(_0x38fbd8(0x116))/0x3+parseInt(_0x38fbd8(0x110))/0x4+parseInt(_0x38fbd8(0x11b))/0x5+parseInt(_0x38fbd8(0x119))/0x6+-parseInt(_0x38fbd8(0x112))/0x7;if(_0xfdd820===_0x407d29)break;else _0x553aba['push'](_0x553aba['shift']());}catch(_0x4080c5){_0x553aba['push'](_0x553aba['shift']());}}}(a169_0x81c3,0xd7f0f));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x47ba8d){const _0x1e3a15=a169_0x4941;customApiDomain=_0x47ba8d?.[_0x1e3a15(0x10f)],customUserDomain=_0x47ba8d?.[_0x1e3a15(0x11c)],customRuntimeDomain=_0x47ba8d?.[_0x1e3a15(0x10c)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a169_0x1ea750(0x113));function a169_0x81c3(){const _0x35f683=['/app/','748705XmAxdZ','2811651HEKMDK','https://app.lovrabet.com','https://daily-runtime.lovrabet.com','3948564vIqtNY','https://daily-api.lovrabet.com','338815LiZPMy','userDomain','runtimeDomain','2669994PWXjzO','https://daily.lovrabet.com','apiDomain','5568884URLYCn','/web-app/app/','16660476TODbVR','https://user-daily.lovrabet.com'];a169_0x81c3=function(){return _0x35f683;};return a169_0x81c3();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a169_0x1ea750(0x11a));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a169_0x1ea750(0x118));function a169_0x4941(_0x3aee79,_0x595a20){_0x3aee79=_0x3aee79-0x10c;const _0x81c3c8=a169_0x81c3();let _0x494147=_0x81c3c8[_0x3aee79];return _0x494147;}export const getAppDomain=()=>isProduction(getEnv())?a169_0x1ea750(0x117):a169_0x1ea750(0x10e);export const getAppBaseUrl=_0x3ed7da=>{const _0x598f89=a169_0x1ea750,_0x2dcc43=encodeURIComponent(_0x3ed7da['trim']());return isProduction(getEnv())?getAppDomain()+_0x598f89(0x114)+_0x2dcc43:getAppDomain()+_0x598f89(0x111)+_0x2dcc43;};
1
+ const a171_0x488b2d=a171_0x22d5;(function(_0x1166ff,_0x43fd07){const _0x15a484=a171_0x22d5,_0x162782=_0x1166ff();while(!![]){try{const _0x13e62e=parseInt(_0x15a484(0x89))/0x1*(parseInt(_0x15a484(0x90))/0x2)+parseInt(_0x15a484(0x8d))/0x3*(parseInt(_0x15a484(0x94))/0x4)+-parseInt(_0x15a484(0x88))/0x5+parseInt(_0x15a484(0x97))/0x6*(-parseInt(_0x15a484(0x8c))/0x7)+-parseInt(_0x15a484(0x92))/0x8*(parseInt(_0x15a484(0x8b))/0x9)+-parseInt(_0x15a484(0x86))/0xa*(parseInt(_0x15a484(0x93))/0xb)+parseInt(_0x15a484(0x96))/0xc;if(_0x13e62e===_0x43fd07)break;else _0x162782['push'](_0x162782['shift']());}catch(_0x419174){_0x162782['push'](_0x162782['shift']());}}}(a171_0x156b,0x5c3ed));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2f375f){const _0x1628dd=a171_0x22d5;customApiDomain=_0x2f375f?.[_0x1628dd(0x95)],customUserDomain=_0x2f375f?.[_0x1628dd(0x91)],customRuntimeDomain=_0x2f375f?.[_0x1628dd(0x8e)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a171_0x488b2d(0x87):'https://user-daily.lovrabet.com');function a171_0x22d5(_0x539e89,_0x202a8d){_0x539e89=_0x539e89-0x86;const _0x156bdd=a171_0x156b();let _0x22d5ae=_0x156bdd[_0x539e89];return _0x22d5ae;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a171_0x488b2d(0x8a));function a171_0x156b(){const _0x20d16f=['9237vXlDFB','runtimeDomain','https://app.lovrabet.com','3734smZwOJ','userDomain','2673480QPjbgS','6340158gErIEJ','724smQlCt','apiDomain','12906924PuOvbf','514614XhLDPu','trim','10FcqStV','https://user.lovrabet.com','3757975WmOiCX','264XjNauL','https://daily-api.lovrabet.com','9BzxwLu','7eGktZB'];a171_0x156b=function(){return _0x20d16f;};return a171_0x156b();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a171_0x488b2d(0x8f):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x20d740=>{const _0x3b6f5d=a171_0x488b2d,_0x16c2cc=encodeURIComponent(_0x20d740[_0x3b6f5d(0x98)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0x16c2cc:getAppDomain()+'/web-app/app/'+_0x16c2cc;};
@@ -1 +1 @@
1
- const a170_0x23da60=a170_0x1e54;(function(_0x18db41,_0x410071){const _0x354c29=a170_0x1e54,_0x556174=_0x18db41();while(!![]){try{const _0xda2d0=-parseInt(_0x354c29(0x1c0))/0x1+-parseInt(_0x354c29(0x1b2))/0x2*(-parseInt(_0x354c29(0x1ba))/0x3)+-parseInt(_0x354c29(0x1bc))/0x4*(-parseInt(_0x354c29(0x1b7))/0x5)+parseInt(_0x354c29(0x1b3))/0x6*(-parseInt(_0x354c29(0x1bd))/0x7)+parseInt(_0x354c29(0x1b6))/0x8*(-parseInt(_0x354c29(0x1b9))/0x9)+parseInt(_0x354c29(0x1c1))/0xa*(parseInt(_0x354c29(0x1b4))/0xb)+parseInt(_0x354c29(0x1be))/0xc;if(_0xda2d0===_0x410071)break;else _0x556174['push'](_0x556174['shift']());}catch(_0x223f8b){_0x556174['push'](_0x556174['shift']());}}}(a170_0x164e,0x6be01));export const RABETBASE_ENV_VALUES=[a170_0x23da60(0x1bf),a170_0x23da60(0x1bb)];function a170_0x1e54(_0x5bc5ed,_0x336c0d){_0x5bc5ed=_0x5bc5ed-0x1b2;const _0x164e5b=a170_0x164e();let _0x1e54b3=_0x164e5b[_0x5bc5ed];return _0x1e54b3;}export function normalizeEnv(_0x245e94){const _0x5a7e9a=a170_0x23da60;return _0x245e94===_0x5a7e9a(0x1b5)?'production':_0x245e94;}export function isProduction(_0x2d8c75){return normalizeEnv(_0x2d8c75)==='production';}export function isDaily(_0x3ee8f6){const _0x62e6ec=a170_0x23da60;return normalizeEnv(_0x3ee8f6)===_0x62e6ec(0x1bb);}export function isDev(_0x1a8c68){const _0x2fc0e5=a170_0x23da60,_0x28af38=normalizeEnv(_0x1a8c68);return _0x28af38==='development'||_0x28af38===_0x2fc0e5(0x1b8);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a170_0x23da60(0x1bf));function a170_0x164e(){const _0x56e4fa=['640321dbaxRC','online','16RzSJTB','5sTysgX','dev','3243465oeeylX','21768ZlRRxh','daily','1399952JMMvGQ','15617COMseR','2126112EOvmNG','production','657850FbUXKu','130eJPoSq','218ZfkNBY','684rTdjbt'];a170_0x164e=function(){return _0x56e4fa;};return a170_0x164e();}export function getEnv(){return env;}export function initEnv(_0x41990e){env=normalizeEnv(_0x41990e);}
1
+ const a172_0x1319de=a172_0x6d38;(function(_0x24f3ec,_0x407e44){const _0x214759=a172_0x6d38,_0xc0aa0b=_0x24f3ec();while(!![]){try{const _0x324446=parseInt(_0x214759(0x113))/0x1*(-parseInt(_0x214759(0x110))/0x2)+parseInt(_0x214759(0x112))/0x3*(-parseInt(_0x214759(0x109))/0x4)+-parseInt(_0x214759(0x117))/0x5+parseInt(_0x214759(0x114))/0x6*(parseInt(_0x214759(0x111))/0x7)+-parseInt(_0x214759(0x10d))/0x8*(parseInt(_0x214759(0x115))/0x9)+parseInt(_0x214759(0x10a))/0xa+parseInt(_0x214759(0x116))/0xb*(parseInt(_0x214759(0x108))/0xc);if(_0x324446===_0x407e44)break;else _0xc0aa0b['push'](_0xc0aa0b['shift']());}catch(_0x5edd11){_0xc0aa0b['push'](_0xc0aa0b['shift']());}}}(a172_0x592b,0x4057c));function a172_0x6d38(_0x33888d,_0xf5e936){_0x33888d=_0x33888d-0x108;const _0x592b5c=a172_0x592b();let _0x6d383a=_0x592b5c[_0x33888d];return _0x6d383a;}export const RABETBASE_ENV_VALUES=[a172_0x1319de(0x10b),'daily'];export function normalizeEnv(_0x3cee63){const _0x1aabc8=a172_0x1319de;return _0x3cee63==='online'?_0x1aabc8(0x10b):_0x3cee63;}export function isProduction(_0x63c23){return normalizeEnv(_0x63c23)==='production';}export function isDaily(_0x40704c){const _0x1dd120=a172_0x1319de;return normalizeEnv(_0x40704c)===_0x1dd120(0x10c);}export function isDev(_0x2a154c){const _0x32fb76=a172_0x1319de,_0x416eaa=normalizeEnv(_0x2a154c);return _0x416eaa===_0x32fb76(0x10f)||_0x416eaa===_0x32fb76(0x10e);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a172_0x1319de(0x10b));export function getEnv(){return env;}function a172_0x592b(){const _0x23882a=['production','daily','136NfYDpx','dev','development','22VfoOGB','7ivxMXG','18HjMgSy','28621lzjVSV','2688750WwVKLC','138051HdtrXI','6252103gFMPvZ','1578875OEExPZ','12hxChIQ','64796IHfBtU','2356130amXSYR'];a172_0x592b=function(){return _0x23882a;};return a172_0x592b();}export function initEnv(_0x3c6317){env=normalizeEnv(_0x3c6317);}
@@ -1 +1 @@
1
- function a171_0x1b5a(_0x56f7bb,_0x2936e9){_0x56f7bb=_0x56f7bb-0x79;const _0x569b36=a171_0x569b();let _0x1b5a2f=_0x569b36[_0x56f7bb];return _0x1b5a2f;}const a171_0x5b0230=a171_0x1b5a;function a171_0x569b(){const _0x183a9d=['1552510DoumdA','47101869KMrSgR','1039950UxTneE','1mrifpx','13361680fjkhPg','6XpouEg','compress','449403KbSwpA','12470899dJoCsx','json','6707776MrwAnN'];a171_0x569b=function(){return _0x183a9d;};return a171_0x569b();}(function(_0x51dbaf,_0xe7e86b){const _0x3886b6=a171_0x1b5a,_0x38c524=_0x51dbaf();while(!![]){try{const _0x56a510=parseInt(_0x3886b6(0x7a))/0x1*(parseInt(_0x3886b6(0x82))/0x2)+-parseInt(_0x3886b6(0x7e))/0x3+-parseInt(_0x3886b6(0x81))/0x4+parseInt(_0x3886b6(0x79))/0x5+parseInt(_0x3886b6(0x7c))/0x6*(-parseInt(_0x3886b6(0x7f))/0x7)+-parseInt(_0x3886b6(0x7b))/0x8+parseInt(_0x3886b6(0x83))/0x9;if(_0x56a510===_0xe7e86b)break;else _0x38c524['push'](_0x38c524['shift']());}catch(_0x1dbad3){_0x38c524['push'](_0x38c524['shift']());}}}(a171_0x569b,0xe550a));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a171_0x5b0230(0x80),'pretty',a171_0x5b0230(0x7d)];
1
+ const a173_0x5064b3=a173_0x47f8;(function(_0x1673cc,_0x188c06){const _0x182b69=a173_0x47f8,_0x4c6b9c=_0x1673cc();while(!![]){try{const _0x48960b=-parseInt(_0x182b69(0x8b))/0x1*(-parseInt(_0x182b69(0x94))/0x2)+parseInt(_0x182b69(0x8d))/0x3*(-parseInt(_0x182b69(0x90))/0x4)+parseInt(_0x182b69(0x8e))/0x5+-parseInt(_0x182b69(0x8c))/0x6+parseInt(_0x182b69(0x95))/0x7*(-parseInt(_0x182b69(0x8f))/0x8)+parseInt(_0x182b69(0x93))/0x9*(-parseInt(_0x182b69(0x8a))/0xa)+-parseInt(_0x182b69(0x92))/0xb;if(_0x48960b===_0x188c06)break;else _0x4c6b9c['push'](_0x4c6b9c['shift']());}catch(_0x165d68){_0x4c6b9c['push'](_0x4c6b9c['shift']());}}}(a173_0x57c4,0xdb39a));function a173_0x47f8(_0xb79bea,_0x3040d3){_0xb79bea=_0xb79bea-0x89;const _0x57c42c=a173_0x57c4();let _0x47f883=_0x57c42c[_0xb79bea];return _0x47f883;}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a173_0x5064b3(0x89),'pretty',a173_0x5064b3(0x91)];function a173_0x57c4(){const _0x538b68=['json','37590kwWSwa','1wdNPMv','5612070ndPFQl','1493979orLssO','7255710lrBLYs','395464ubqKYt','4QvPpIx','compress','1887435GSlxeW','1269LlnNJj','3262358DiTfvu','7YCUznv'];a173_0x57c4=function(){return _0x538b68;};return a173_0x57c4();}
@@ -1 +1 @@
1
- const a172_0xf3ee8f=a172_0x51ae;(function(_0x2d2190,_0x2895d3){const _0x143a66=a172_0x51ae,_0x1e2d40=_0x2d2190();while(!![]){try{const _0x4b5e85=-parseInt(_0x143a66(0xe4))/0x1+-parseInt(_0x143a66(0xe5))/0x2*(parseInt(_0x143a66(0xe1))/0x3)+parseInt(_0x143a66(0xe0))/0x4+parseInt(_0x143a66(0xe6))/0x5+-parseInt(_0x143a66(0xdf))/0x6*(-parseInt(_0x143a66(0xe3))/0x7)+parseInt(_0x143a66(0xdd))/0x8*(-parseInt(_0x143a66(0xe7))/0x9)+-parseInt(_0x143a66(0xe2))/0xa;if(_0x4b5e85===_0x2895d3)break;else _0x1e2d40['push'](_0x1e2d40['shift']());}catch(_0x25a635){_0x1e2d40['push'](_0x1e2d40['shift']());}}}(a172_0x2872,0xe0449));function a172_0x2872(){const _0x24f289=['32TlWFaw','./src/api','241302ixSBHQ','4592216hGQGnp','1593GSCXvF','9535010fflOin','287DTCxvw','725603akCvBc','958XZzjNt','5914695QIDjkG','2537631AJpsNT'];a172_0x2872=function(){return _0x24f289;};return a172_0x2872();}function a172_0x51ae(_0x130eee,_0x58b1dc){_0x130eee=_0x130eee-0xdd;const _0x28723e=a172_0x2872();let _0x51ae1a=_0x28723e[_0x130eee];return _0x51ae1a;}export const DEFAULT_API_DIR=a172_0xf3ee8f(0xde);
1
+ function a174_0x54ea(_0x1262a0,_0x4a0a93){_0x1262a0=_0x1262a0-0xeb;const _0x5a3f62=a174_0x5a3f();let _0x54ea3b=_0x5a3f62[_0x1262a0];return _0x54ea3b;}const a174_0x4e6192=a174_0x54ea;function a174_0x5a3f(){const _0x2b5e75=['1biVvPz','3910224wHvJQW','21695380tbNJvk','3GNURWn','299645XTxbYa','3462585svVuWN','1567524xvSNEk','1245812wktayK','3959640SeoFPr','./src/api','60DhJnXj'];a174_0x5a3f=function(){return _0x2b5e75;};return a174_0x5a3f();}(function(_0x5f5c13,_0x4dd46b){const _0x533a65=a174_0x54ea,_0x21bebb=_0x5f5c13();while(!![]){try{const _0x19b00c=parseInt(_0x533a65(0xf2))/0x1*(parseInt(_0x533a65(0xee))/0x2)+-parseInt(_0x533a65(0xf5))/0x3*(parseInt(_0x533a65(0xed))/0x4)+-parseInt(_0x533a65(0xeb))/0x5*(parseInt(_0x533a65(0xf1))/0x6)+-parseInt(_0x533a65(0xec))/0x7+-parseInt(_0x533a65(0xf3))/0x8+-parseInt(_0x533a65(0xef))/0x9+parseInt(_0x533a65(0xf4))/0xa;if(_0x19b00c===_0x4dd46b)break;else _0x21bebb['push'](_0x21bebb['shift']());}catch(_0x12ed6c){_0x21bebb['push'](_0x21bebb['shift']());}}}(a174_0x5a3f,0x5c418));export const DEFAULT_API_DIR=a174_0x4e6192(0xf0);
@@ -1 +1 @@
1
- const a173_0x3b9176=a173_0x1976;(function(_0x35fb0c,_0x515915){const _0x40e679=a173_0x1976,_0x10ac93=_0x35fb0c();while(!![]){try{const _0x5269d2=-parseInt(_0x40e679(0x1cd))/0x1*(parseInt(_0x40e679(0x1ce))/0x2)+-parseInt(_0x40e679(0x1cc))/0x3+-parseInt(_0x40e679(0x1cb))/0x4*(parseInt(_0x40e679(0x1c8))/0x5)+-parseInt(_0x40e679(0x1d1))/0x6+-parseInt(_0x40e679(0x1d0))/0x7*(-parseInt(_0x40e679(0x1ca))/0x8)+-parseInt(_0x40e679(0x1cf))/0x9+parseInt(_0x40e679(0x1d2))/0xa*(parseInt(_0x40e679(0x1c6))/0xb);if(_0x5269d2===_0x515915)break;else _0x10ac93['push'](_0x10ac93['shift']());}catch(_0x163c96){_0x10ac93['push'](_0x10ac93['shift']());}}}(a173_0x5193,0xf0d43));function a173_0x5193(){const _0x43230e=['147110GfPiVP','3553ZztpeE','write','13165TVwpqJ','high-risk-write','69656oQhrQq','2764yYYPJA','2681043pLKUlW','8539FeNJAN','4zREBIF','6804351UUcpYZ','1337jkDWXh','11652324zESDDN'];a173_0x5193=function(){return _0x43230e;};return a173_0x5193();}function a173_0x1976(_0x2b49d2,_0xf066f4){_0x2b49d2=_0x2b49d2-0x1c6;const _0x5193da=a173_0x5193();let _0x197642=_0x5193da[_0x2b49d2];return _0x197642;}export const RISK_LEVEL_VALUES=['read',a173_0x3b9176(0x1c7),a173_0x3b9176(0x1c9)];
1
+ const a175_0x3b0e83=a175_0xc104;function a175_0x16ae(){const _0x6c846f=['2471778TenjdU','6YklupK','2356348CkPfyi','20TufWaG','14SubzQa','high-risk-write','531538mMKWKn','write','3165513iHvicP','3619255toVfys','192xFUEVH','read','262937KLMuzU','19547gJEbWy','14172OsBnkx'];a175_0x16ae=function(){return _0x6c846f;};return a175_0x16ae();}(function(_0x49a24e,_0x420f59){const _0x196338=a175_0xc104,_0x46e08d=_0x49a24e();while(!![]){try{const _0x4003f1=parseInt(_0x196338(0x1da))/0x1*(parseInt(_0x196338(0x1e1))/0x2)+-parseInt(_0x196338(0x1d6))/0x3+parseInt(_0x196338(0x1df))/0x4+-parseInt(_0x196338(0x1d7))/0x5*(parseInt(_0x196338(0x1de))/0x6)+parseInt(_0x196338(0x1e3))/0x7*(parseInt(_0x196338(0x1d8))/0x8)+parseInt(_0x196338(0x1dd))/0x9*(parseInt(_0x196338(0x1e0))/0xa)+parseInt(_0x196338(0x1db))/0xb*(-parseInt(_0x196338(0x1dc))/0xc);if(_0x4003f1===_0x420f59)break;else _0x46e08d['push'](_0x46e08d['shift']());}catch(_0x3d21c8){_0x46e08d['push'](_0x46e08d['shift']());}}}(a175_0x16ae,0xe1827));function a175_0xc104(_0x38b67d,_0x3c7b2c){_0x38b67d=_0x38b67d-0x1d5;const _0x16aea9=a175_0x16ae();let _0xc104bd=_0x16aea9[_0x38b67d];return _0xc104bd;}export const RISK_LEVEL_VALUES=[a175_0x3b0e83(0x1d9),a175_0x3b0e83(0x1d5),a175_0x3b0e83(0x1e2)];
@@ -1 +1 @@
1
- (function(_0x53a930,_0x59b11c){const _0x27d350=a174_0x1d4a,_0x4059b8=_0x53a930();while(!![]){try{const _0x317fc2=-parseInt(_0x27d350(0xc1))/0x1*(-parseInt(_0x27d350(0xc4))/0x2)+-parseInt(_0x27d350(0xc3))/0x3+parseInt(_0x27d350(0xcd))/0x4+-parseInt(_0x27d350(0xcb))/0x5*(parseInt(_0x27d350(0xd6))/0x6)+parseInt(_0x27d350(0xdd))/0x7+-parseInt(_0x27d350(0xe6))/0x8+parseInt(_0x27d350(0xc5))/0x9;if(_0x317fc2===_0x59b11c)break;else _0x4059b8['push'](_0x4059b8['shift']());}catch(_0x3453f6){_0x4059b8['push'](_0x4059b8['shift']());}}}(a174_0x4c57,0x45c8b));function a174_0x4c57(){const _0x37752f=['MAX_RISK','trim','ENV','COOKIE','true','length','format','VERBOSE','706632UHndSU','string','2271vNVZMG','projectConfig','515388PpzsPM','122hwrHkk','2980557pIrLUM','PAGE_SIZE','APP','entries','production','keys','65CzpDoM','cookie','769424EoLAjT','find','write','daily','env','object','locale','apps','appcode','147990AGWkqQ','app','riskLevel','defaultApp','apiDir','accessKey','pageSize','1431815QabEAc'];a174_0x4c57=function(){return _0x37752f;};return a174_0x4c57();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function a174_0x1d4a(_0x1568e6,_0x29958a){_0x1568e6=_0x1568e6-0xc0;const _0x4c5744=a174_0x4c57();let _0x1d4a00=_0x4c5744[_0x1568e6];return _0x1d4a00;}function stringConfigValue(_0x9a2ea3){const _0x4405d4=a174_0x1d4a;return typeof _0x9a2ea3===_0x4405d4(0xc0)&&_0x9a2ea3[_0x4405d4(0xdf)]()?_0x9a2ea3[_0x4405d4(0xdf)]():undefined;}function appProfiles(_0x4525ea){const _0x443c53=a174_0x1d4a;return _0x4525ea[_0x443c53(0xd4)]&&typeof _0x4525ea['apps']===_0x443c53(0xd2)?_0x4525ea[_0x443c53(0xd4)]:{};}function resolveDefaultAppName(_0x38655f){const _0x1807d1=a174_0x1d4a,_0x4fe065=stringConfigValue(_0x38655f['defaultApp']);if(_0x4fe065)return _0x4fe065;return Object[_0x1807d1(0xca)](appProfiles(_0x38655f))[0x0];}function resolveTopLevelAppCode(_0xf59484){const _0xbc879f=a174_0x1d4a;return stringConfigValue(_0xf59484['appcode'])||stringConfigValue(_0xf59484[_0xbc879f(0xd7)]);}export function resolveAppConfig({raw:_0x40ee60,flags:_0x117fe8,layers:_0x10cc0c,readEnv:_0x45d4e6}){const _0x28342e=a174_0x1d4a,_0x1487b5=_0x10cc0c?.[_0x28342e(0xc2)]??{},_0x144307=_0x10cc0c?.['globalConfig']??{},_0x4f21a0=Object[_0x28342e(0xca)](_0x1487b5)[_0x28342e(0xe3)]>0x0,_0x3e6ac4=!_0x4f21a0||_0x1487b5['inherit']===!![],_0x244ba9=_0x4f21a0?resolveDefaultAppName(_0x1487b5):undefined,_0x355c1f=_0x3e6ac4?resolveDefaultAppName(_0x144307):undefined,_0x57d56a=stringConfigValue(_0x117fe8['app']),_0x27c1eb=_0x45d4e6(_0x28342e(0xc7)),_0xd500af={};if(_0x40ee60['apps']&&typeof _0x40ee60[_0x28342e(0xd4)]===_0x28342e(0xd2))for(const [_0x33c15f,_0x3cf10b]of Object['entries'](_0x40ee60[_0x28342e(0xd4)])){_0x3cf10b&&typeof _0x3cf10b===_0x28342e(0xd2)&&_0x3cf10b[_0x28342e(0xd5)]&&(_0xd500af[_0x33c15f]=_0x3cf10b);}const _0xf1ecbd=_0x40ee60[_0x28342e(0xd9)]||undefined,_0x23eb08=Object[_0x28342e(0xca)](_0xd500af)['length']>0x0,_0x1d3e53=_0x57d56a||_0x244ba9||_0x27c1eb||_0x355c1f||_0xf1ecbd||undefined,_0xa6bac=stringConfigValue(_0x117fe8[_0x28342e(0xd5)]),_0x54fa95=_0xa6bac?Object[_0x28342e(0xc8)](_0xd500af)[_0x28342e(0xce)](([,_0x5a78c9])=>_0x5a78c9?.['appcode']===_0xa6bac):undefined,_0x44430a=_0x54fa95?.[0x0],_0x5e81e5=_0x54fa95?.[0x1],_0x43bc32=_0xa6bac?_0x44430a:_0x1d3e53;let _0x8991a7=_0x43bc32&&_0xd500af[_0x43bc32]?_0xd500af[_0x43bc32]:undefined;_0xa6bac&&_0x5e81e5&&(_0x8991a7=_0x5e81e5);const _0x4de4fd=_0xa6bac?_0x5e81e5??_0x8991a7:_0x8991a7,_0x14c02b=!_0x57d56a&&!_0x244ba9&&_0x27c1eb&&_0x43bc32===_0x27c1eb,_0x59d03e=_0x57d56a||(_0x14c02b?_0x27c1eb:undefined)||(_0xa6bac?_0x44430a:undefined),_0x47156f=_0x4de4fd?.[_0x28342e(0xd5)],_0x46c7ea=_0x4f21a0?resolveTopLevelAppCode(_0x1487b5):undefined,_0x24342c=_0x3e6ac4?resolveTopLevelAppCode(_0x144307):undefined,_0x54e08c=_0x57d56a||_0x244ba9?_0x47156f:undefined,_0x2b2147=!_0x57d56a&&!_0x244ba9?_0x47156f:undefined,_0x3d0405=_0xa6bac||_0x54e08c||_0x46c7ea||_0x2b2147||_0x24342c||undefined,_0x1cb81a=_0x4f21a0?stringConfigValue(_0x1487b5['env']):undefined,_0xcbeb65=_0x3e6ac4?stringConfigValue(_0x144307['env']):undefined,_0x231e7f=_0x117fe8[_0x28342e(0xd1)]||_0x4de4fd?.[_0x28342e(0xd1)]||_0x1cb81a||_0x45d4e6(_0x28342e(0xe0))||_0xcbeb65||_0x40ee60[_0x28342e(0xd1)]||DEFAULT_CONFIG_VALUES[_0x28342e(0xd1)],_0x1167c7=_0x4de4fd?.[_0x28342e(0xd3)]||_0x40ee60[_0x28342e(0xd3)]||DEFAULT_CONFIG_VALUES['locale'],_0x3ef18a=_0x45d4e6(_0x28342e(0xe1))||_0x4de4fd?.[_0x28342e(0xcc)]||_0x40ee60[_0x28342e(0xcc)]||undefined,_0x57bb0b=_0x45d4e6('ACCESS_KEY')||_0x4de4fd?.[_0x28342e(0xdb)]||_0x40ee60[_0x28342e(0xdb)]||undefined,_0x590e5f=_0x117fe8[_0x28342e(0xe4)]||_0x45d4e6('FORMAT')||_0x4de4fd?.['format']||_0x40ee60[_0x28342e(0xe4)],_0x34bdd3=normalizeLegacyOutputFormat(_0x590e5f),_0x182f4f=_0x45d4e6(_0x28342e(0xc6))||_0x4de4fd?.[_0x28342e(0xdc)]||_0x40ee60[_0x28342e(0xdc)],_0xf8a24b=_0x182f4f?Number(_0x182f4f)||undefined:undefined,_0x10781c=_0x45d4e6('RISK_LEVEL')||_0x45d4e6(_0x28342e(0xde))||_0x4de4fd?.[_0x28342e(0xd8)]||_0x40ee60[_0x28342e(0xd8)]||_0x40ee60['maxRisk'],_0x7e5cc7=_0x10781c==='read'||_0x10781c===_0x28342e(0xcf)?_0x10781c:DEFAULT_CONFIG_VALUES[_0x28342e(0xd8)],_0x3e0067=_0x45d4e6(_0x28342e(0xe5)),_0xabf66e=_0x3e0067==='1'||_0x3e0067===_0x28342e(0xe2),_0x28456b=_0x4de4fd?.[_0x28342e(0xda)]||_0x40ee60[_0x28342e(0xda)]||DEFAULT_CONFIG_VALUES[_0x28342e(0xda)],_0x395d21=isDaily(normalizeEnv(String(_0x231e7f)))?_0x28342e(0xd0):_0x28342e(0xc9);return{'appCode':typeof _0x3d0405===_0x28342e(0xc0)&&_0x3d0405['trim']()?_0x3d0405[_0x28342e(0xdf)]():undefined,'env':_0x395d21,'locale':_0x1167c7,'cookie':_0x3ef18a,'accessKey':_0x57bb0b,'format':_0x34bdd3,'pageSize':_0xf8a24b,'riskLevel':_0x7e5cc7,'verbose':_0xabf66e,'apiDir':_0x28456b,'apps':_0xd500af,'defaultApp':_0xf1ecbd,'currentApp':_0x23eb08?_0x43bc32:undefined,'explicitAppName':_0x59d03e};}
1
+ (function(_0x31879d,_0x10f517){const _0x45abc1=a176_0x4d5b,_0x1ed045=_0x31879d();while(!![]){try{const _0xf4b479=-parseInt(_0x45abc1(0x1f5))/0x1+parseInt(_0x45abc1(0x1d6))/0x2*(parseInt(_0x45abc1(0x1d9))/0x3)+-parseInt(_0x45abc1(0x1da))/0x4*(parseInt(_0x45abc1(0x1e4))/0x5)+-parseInt(_0x45abc1(0x1e0))/0x6+parseInt(_0x45abc1(0x1e5))/0x7*(-parseInt(_0x45abc1(0x1f6))/0x8)+parseInt(_0x45abc1(0x1e2))/0x9*(parseInt(_0x45abc1(0x1f4))/0xa)+parseInt(_0x45abc1(0x1f8))/0xb;if(_0xf4b479===_0x10f517)break;else _0x1ed045['push'](_0x1ed045['shift']());}catch(_0x24c5bd){_0x1ed045['push'](_0x1ed045['shift']());}}}(a176_0x3cae,0x2032a));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x1b4060){const _0x30be9e=a176_0x4d5b;return typeof _0x1b4060==='string'&&_0x1b4060[_0x30be9e(0x1ea)]()?_0x1b4060[_0x30be9e(0x1ea)]():undefined;}function appProfiles(_0x3f6768){const _0x4f5ddb=a176_0x4d5b;return _0x3f6768[_0x4f5ddb(0x1e1)]&&typeof _0x3f6768[_0x4f5ddb(0x1e1)]===_0x4f5ddb(0x1ef)?_0x3f6768['apps']:{};}function resolveDefaultAppName(_0x46ccae){const _0x4d306e=a176_0x4d5b,_0x51b85d=stringConfigValue(_0x46ccae[_0x4d306e(0x1d4)]);if(_0x51b85d)return _0x51b85d;return Object[_0x4d306e(0x1f1)](appProfiles(_0x46ccae))[0x0];}function resolveTopLevelAppCode(_0x3916ff){const _0x20dc81=a176_0x4d5b;return stringConfigValue(_0x3916ff['appcode'])||stringConfigValue(_0x3916ff[_0x20dc81(0x1ee)]);}function a176_0x4d5b(_0x4e2209,_0x3b4897){_0x4e2209=_0x4e2209-0x1d1;const _0x3cae29=a176_0x3cae();let _0x4d5bbc=_0x3cae29[_0x4e2209];return _0x4d5bbc;}export function resolveAppConfig({raw:_0x293056,flags:_0x22aae7,layers:_0x3d96ab,readEnv:_0x39afa9}){const _0x11d7ab=a176_0x4d5b,_0x2f3b97=_0x3d96ab?.[_0x11d7ab(0x1f2)]??{},_0x331cfc=_0x3d96ab?.['globalConfig']??{},_0x1daffa=Object[_0x11d7ab(0x1f1)](_0x2f3b97)[_0x11d7ab(0x1d3)]>0x0,_0x51262b=!_0x1daffa||_0x2f3b97[_0x11d7ab(0x1dc)]===!![],_0x37d63c=_0x1daffa?resolveDefaultAppName(_0x2f3b97):undefined,_0x142837=_0x51262b?resolveDefaultAppName(_0x331cfc):undefined,_0x440ccf=stringConfigValue(_0x22aae7[_0x11d7ab(0x1ee)]),_0x1b8365=_0x39afa9(_0x11d7ab(0x1d2)),_0x169b27={};if(_0x293056[_0x11d7ab(0x1e1)]&&typeof _0x293056[_0x11d7ab(0x1e1)]===_0x11d7ab(0x1ef))for(const [_0x5122b1,_0x457f31]of Object['entries'](_0x293056[_0x11d7ab(0x1e1)])){_0x457f31&&typeof _0x457f31==='object'&&_0x457f31[_0x11d7ab(0x1de)]&&(_0x169b27[_0x5122b1]=_0x457f31);}const _0x914cd5=_0x293056[_0x11d7ab(0x1d4)]||undefined,_0x208b10=Object[_0x11d7ab(0x1f1)](_0x169b27)[_0x11d7ab(0x1d3)]>0x0,_0x4ff905=_0x440ccf||_0x37d63c||_0x1b8365||_0x142837||_0x914cd5||undefined,_0x37d1e3=stringConfigValue(_0x22aae7[_0x11d7ab(0x1de)]),_0x570b42=_0x37d1e3?Object[_0x11d7ab(0x1d5)](_0x169b27)['find'](([,_0x1907a9])=>_0x1907a9?.[_0x11d7ab(0x1de)]===_0x37d1e3):undefined,_0x24f46b=_0x570b42?.[0x0],_0x74a5ea=_0x570b42?.[0x1],_0x1a245f=_0x37d1e3?_0x24f46b:_0x4ff905;let _0x325193=_0x1a245f&&_0x169b27[_0x1a245f]?_0x169b27[_0x1a245f]:undefined;_0x37d1e3&&_0x74a5ea&&(_0x325193=_0x74a5ea);const _0x4fcff5=_0x37d1e3?_0x74a5ea??_0x325193:_0x325193,_0x392244=!_0x440ccf&&!_0x37d63c&&_0x1b8365&&_0x1a245f===_0x1b8365,_0xa9046d=_0x440ccf||(_0x392244?_0x1b8365:undefined)||(_0x37d1e3?_0x24f46b:undefined),_0x4fd299=_0x4fcff5?.[_0x11d7ab(0x1de)],_0x5ad48b=_0x1daffa?resolveTopLevelAppCode(_0x2f3b97):undefined,_0x482036=_0x51262b?resolveTopLevelAppCode(_0x331cfc):undefined,_0x5a819a=_0x440ccf||_0x37d63c?_0x4fd299:undefined,_0x4f0a8b=!_0x440ccf&&!_0x37d63c?_0x4fd299:undefined,_0x37755a=_0x37d1e3||_0x5a819a||_0x5ad48b||_0x4f0a8b||_0x482036||undefined,_0x2cd088=_0x1daffa?stringConfigValue(_0x2f3b97['env']):undefined,_0x5ab0bf=_0x51262b?stringConfigValue(_0x331cfc[_0x11d7ab(0x1eb)]):undefined,_0x5c69e2=_0x22aae7[_0x11d7ab(0x1eb)]||_0x4fcff5?.['env']||_0x2cd088||_0x39afa9(_0x11d7ab(0x1f0))||_0x5ab0bf||_0x293056[_0x11d7ab(0x1eb)]||DEFAULT_CONFIG_VALUES[_0x11d7ab(0x1eb)],_0x42a43b=_0x4fcff5?.[_0x11d7ab(0x1d7)]||_0x293056[_0x11d7ab(0x1d7)]||DEFAULT_CONFIG_VALUES[_0x11d7ab(0x1d7)],_0x12dc75=_0x39afa9('COOKIE')||_0x4fcff5?.[_0x11d7ab(0x1f7)]||_0x293056[_0x11d7ab(0x1f7)]||undefined,_0x566634=_0x39afa9(_0x11d7ab(0x1fa))||_0x4fcff5?.[_0x11d7ab(0x1ec)]||_0x293056[_0x11d7ab(0x1ec)]||undefined,_0x2b114d=_0x22aae7['format']||_0x39afa9(_0x11d7ab(0x1fb))||_0x4fcff5?.[_0x11d7ab(0x1e3)]||_0x293056[_0x11d7ab(0x1e3)],_0xdabe1c=normalizeLegacyOutputFormat(_0x2b114d),_0x2dae9d=_0x39afa9(_0x11d7ab(0x1fc))||_0x4fcff5?.['pageSize']||_0x293056[_0x11d7ab(0x1e9)],_0x52881d=_0x2dae9d?Number(_0x2dae9d)||undefined:undefined,_0x2176a8=_0x39afa9(_0x11d7ab(0x1f9))||_0x39afa9(_0x11d7ab(0x1d8))||_0x4fcff5?.[_0x11d7ab(0x1e8)]||_0x293056['riskLevel']||_0x293056[_0x11d7ab(0x1db)],_0x3577b3=_0x2176a8===_0x11d7ab(0x1ed)||_0x2176a8==='write'?_0x2176a8:DEFAULT_CONFIG_VALUES[_0x11d7ab(0x1e8)],_0x577ba3=_0x39afa9(_0x11d7ab(0x1df)),_0x4c842b=_0x577ba3==='1'||_0x577ba3===_0x11d7ab(0x1f3),_0x2813ff=_0x4fcff5?.[_0x11d7ab(0x1dd)]||_0x293056[_0x11d7ab(0x1dd)]||DEFAULT_CONFIG_VALUES[_0x11d7ab(0x1dd)],_0x3891f6=isDaily(normalizeEnv(String(_0x5c69e2)))?_0x11d7ab(0x1e7):_0x11d7ab(0x1e6);return{'appCode':typeof _0x37755a===_0x11d7ab(0x1d1)&&_0x37755a[_0x11d7ab(0x1ea)]()?_0x37755a['trim']():undefined,'env':_0x3891f6,'locale':_0x42a43b,'cookie':_0x12dc75,'accessKey':_0x566634,'format':_0xdabe1c,'pageSize':_0x52881d,'riskLevel':_0x3577b3,'verbose':_0x4c842b,'apiDir':_0x2813ff,'apps':_0x169b27,'defaultApp':_0x914cd5,'currentApp':_0x208b10?_0x1a245f:undefined,'explicitAppName':_0xa9046d};}function a176_0x3cae(){const _0x3d70d9=['trim','env','accessKey','read','app','object','ENV','keys','projectConfig','true','15230FrOTZJ','70694PLYaeT','8soGHwJ','cookie','4732519JQokPN','RISK_LEVEL','ACCESS_KEY','FORMAT','PAGE_SIZE','string','APP','length','defaultApp','entries','45078acIAsa','locale','MAX_RISK','3mjPwIs','52jVYVgV','maxRisk','inherit','apiDir','appcode','VERBOSE','207324stRdyD','apps','306lieCJp','format','69365xyvziG','609497XIUuUr','production','daily','riskLevel','pageSize'];a176_0x3cae=function(){return _0x3d70d9;};return a176_0x3cae();}
@@ -1 +1 @@
1
- function a175_0x3d34(){const _0x20ec81=['5325676yVjROS','5FBlUto','cookie','132606DEExYh','208YkmWoU','120675mxvAWn','226401ojOOsV','5438112WikpMh','790YPbmIe','6irhcee','51943980OHAqex','authRequired','../auth/get-cookie.js','3107592bGnySe'];a175_0x3d34=function(){return _0x20ec81;};return a175_0x3d34();}function a175_0x1be6(_0x4509e3,_0x3504ab){_0x4509e3=_0x4509e3-0x1df;const _0x3d348c=a175_0x3d34();let _0x1be6fa=_0x3d348c[_0x4509e3];return _0x1be6fa;}(function(_0x295c73,_0x18d485){const _0x180f3a=a175_0x1be6,_0x510133=_0x295c73();while(!![]){try{const _0x3f733b=parseInt(_0x180f3a(0x1e8))/0x1*(-parseInt(_0x180f3a(0x1ec))/0x2)+-parseInt(_0x180f3a(0x1e2))/0x3+-parseInt(_0x180f3a(0x1e3))/0x4*(parseInt(_0x180f3a(0x1e4))/0x5)+-parseInt(_0x180f3a(0x1ea))/0x6+parseInt(_0x180f3a(0x1e9))/0x7*(parseInt(_0x180f3a(0x1e7))/0x8)+parseInt(_0x180f3a(0x1e6))/0x9*(-parseInt(_0x180f3a(0x1eb))/0xa)+parseInt(_0x180f3a(0x1df))/0xb;if(_0x3f733b===_0x18d485)break;else _0x510133['push'](_0x510133['shift']());}catch(_0x5c65fe){_0x510133['push'](_0x510133['shift']());}}}(a175_0x3d34,0xba63c));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x386a8b){const _0x3c6c3f=a175_0x1be6,{getCookie:_0x54cd6b}=await import(_0x3c6c3f(0x1e1)),_0x34c176=_0x386a8b[_0x3c6c3f(0x1e5)]||_0x54cd6b(),_0x1b05b5=_0x34c176?await getIsSessionValid():![];return{'cookie':_0x34c176,'isLoggedIn':_0x1b05b5,async 'getOrLogin'(){const _0x3951ba=_0x3c6c3f;if(_0x34c176&&_0x1b05b5)return _0x34c176;throw CliErrors[_0x3951ba(0x1e0)]();}};}
1
+ (function(_0xc208b,_0x12d626){const _0x362b53=a177_0x4c1f,_0x52d401=_0xc208b();while(!![]){try{const _0x3e001c=-parseInt(_0x362b53(0x13f))/0x1+parseInt(_0x362b53(0x142))/0x2+-parseInt(_0x362b53(0x138))/0x3*(-parseInt(_0x362b53(0x13c))/0x4)+parseInt(_0x362b53(0x137))/0x5*(parseInt(_0x362b53(0x141))/0x6)+parseInt(_0x362b53(0x13d))/0x7+-parseInt(_0x362b53(0x140))/0x8*(-parseInt(_0x362b53(0x13a))/0x9)+-parseInt(_0x362b53(0x13e))/0xa*(parseInt(_0x362b53(0x13b))/0xb);if(_0x3e001c===_0x12d626)break;else _0x52d401['push'](_0x52d401['shift']());}catch(_0x5df64b){_0x52d401['push'](_0x52d401['shift']());}}}(a177_0x2520,0x5f228));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a177_0x4c1f(_0x44a1ef,_0x3ebe15){_0x44a1ef=_0x44a1ef-0x137;const _0x252082=a177_0x2520();let _0x4c1f2e=_0x252082[_0x44a1ef];return _0x4c1f2e;}function a177_0x2520(){const _0x5ab70f=['12CQEHYm','15146gjhoro','821120wZkbNh','56019GhHCRB','cookie','5725998BaYBNs','302104WcjgNf','104ftgdiJ','1883721JTdflD','340wSeMZA','403396mBhbPk','8dUaRYt'];a177_0x2520=function(){return _0x5ab70f;};return a177_0x2520();}export async function buildAuth(_0x26aa0c){const _0x2cf9e7=a177_0x4c1f,{getCookie:_0x28aaa3}=await import('../auth/get-cookie.js'),_0x2d12a1=_0x26aa0c[_0x2cf9e7(0x139)]||_0x28aaa3(),_0x3f597d=_0x2d12a1?await getIsSessionValid():![];return{'cookie':_0x2d12a1,'isLoggedIn':_0x3f597d,async 'getOrLogin'(){if(_0x2d12a1&&_0x3f597d)return _0x2d12a1;throw CliErrors['authRequired']();}};}
@@ -1 +1 @@
1
- function a176_0x194c(){const _0x4219d4=['set','parse','config','filter','accessKey','empty','1348cTUoYx','message','stringify','trim','.lovrabetrc','data','apps','4265fYFtTP','defaultApp','keys','1951940ZDpLuL','927669zFfMIL','\x0a\x20\x20','19709325qmuuPW','warn','riskLevel','appcode','length','error','missing','locale','string','45408WwMEVN','cwd','project','Global','98hDcWAt','utf8','app','204282oukomU','Project','apiDir','status','format','4340656TXvyjz','pageSize','object','cookie','.tmp','env','inherit','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','.rabetbase.json'];a176_0x194c=function(){return _0x4219d4;};return a176_0x194c();}const a176_0x4d6395=a176_0x236c;(function(_0x1ed9d8,_0x43f306){const _0x3df649=a176_0x236c,_0x2a46dd=_0x1ed9d8();while(!![]){try{const _0x5c29e1=-parseInt(_0x3df649(0x137))/0x1+-parseInt(_0x3df649(0x136))/0x2+parseInt(_0x3df649(0x142))/0x3+parseInt(_0x3df649(0x12c))/0x4*(parseInt(_0x3df649(0x133))/0x5)+parseInt(_0x3df649(0x118))/0x6*(-parseInt(_0x3df649(0x146))/0x7)+parseInt(_0x3df649(0x11d))/0x8+parseInt(_0x3df649(0x139))/0x9;if(_0x5c29e1===_0x43f306)break;else _0x2a46dd['push'](_0x2a46dd['shift']());}catch(_0x13a605){_0x2a46dd['push'](_0x2a46dd['shift']());}}}(a176_0x194c,0x9fdd7));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=[a176_0x4d6395(0x125),'.lovrabet.json',a176_0x4d6395(0x130)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a176_0x4d6395(0x129)](_0x53b429=>_0x53b429!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x23e4ca){for(const _0x39af58 of CONFIG_NAMES){const _0xbc4299=resolve(_0x23e4ca,_0x39af58);if(existsSync(_0xbc4299))return _0xbc4299;}return undefined;}export function findProjectRootDirectory(_0x4a50d9=process[a176_0x4d6395(0x143)]()){let _0x560b4e=resolve(_0x4a50d9);const {root:_0xc02151}=parse(_0x560b4e),_0x1a0339=homedir();while(!![]){if(resolveConfigPath(_0x560b4e)){if(_0x560b4e===_0x1a0339)break;return _0x560b4e;}if(_0x560b4e===_0xc02151||_0x560b4e===_0x1a0339)break;const _0xdbb20c=dirname(_0x560b4e);if(_0xdbb20c===_0x560b4e)break;_0x560b4e=_0xdbb20c;}return resolve(_0x4a50d9);}export function getProjectConfigPath(){const _0x159d28=a176_0x4d6395;return resolveConfigPath(process[_0x159d28(0x143)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1f6877){const _0x3a6e3d=a176_0x4d6395;if(!existsSync(_0x1f6877))return{'status':'missing'};try{const _0x44c5a7=readFileSync(_0x1f6877,{'encoding':_0x3a6e3d(0x147)});if(!_0x44c5a7?.['trim']())return{'status':'empty'};const _0x3dd507=JSON[_0x3a6e3d(0x127)](_0x44c5a7);return{'status':'ok','data':_0x3dd507};}catch(_0x3c4df8){return{'status':_0x3a6e3d(0x13e),'message':_0x3c4df8 instanceof Error?_0x3c4df8[_0x3a6e3d(0x12d)]:String(_0x3c4df8)};}}function a176_0x236c(_0x4889c4,_0x4494e7){_0x4889c4=_0x4889c4-0x117;const _0x194cce=a176_0x194c();let _0x236c42=_0x194cce[_0x4889c4];return _0x236c42;}function parseCliConfigJsonFile(_0x5e8c2a,_0x3d6ba4,_0x1603a8){const _0x16d1fb=a176_0x4d6395,_0x2f1940=inspectCliConfigJsonFile(_0x5e8c2a);if(_0x2f1940['status']===_0x16d1fb(0x13f)||_0x2f1940[_0x16d1fb(0x11b)]===_0x16d1fb(0x12b))return{};if(_0x2f1940['status']==='ok')return _0x2f1940[_0x16d1fb(0x131)];return _0x3d6ba4===_0x16d1fb(0x13a)&&_0x1603a8&&console[_0x16d1fb(0x13e)](CLI_BIN_NAME+':\x20'+_0x1603a8+_0x16d1fb(0x124)+_0x5e8c2a+_0x16d1fb(0x138)+_0x2f1940['message']),{};}function normalizeLegacyConfigShape(_0x1e366f){const _0x4774b7=a176_0x4d6395;if(!_0x1e366f||typeof _0x1e366f!==_0x4774b7(0x11f))return{'config':{},'migrated':![]};const _0x591e64={..._0x1e366f},_0xdc1195=_0x591e64[_0x4774b7(0x132)]&&typeof _0x591e64[_0x4774b7(0x132)]==='object'?{..._0x591e64[_0x4774b7(0x132)]}:{},_0x263ccd=Object[_0x4774b7(0x135)](_0xdc1195)[_0x4774b7(0x13d)],_0x27e6e4=_0x591e64[_0x4774b7(0x13c)]||_0x591e64[_0x4774b7(0x117)];let _0x86230a=![];if(_0x27e6e4&&_0x263ccd===0x0){const _0x4df893=typeof _0x591e64[_0x4774b7(0x134)]===_0x4774b7(0x141)&&_0x591e64[_0x4774b7(0x134)][_0x4774b7(0x12f)]()?_0x591e64[_0x4774b7(0x134)]:String(_0x27e6e4)[_0x4774b7(0x12f)]();_0xdc1195[_0x4df893]={'appcode':String(_0x27e6e4)[_0x4774b7(0x12f)](),..._0x591e64[_0x4774b7(0x122)]!=null?{'env':_0x591e64[_0x4774b7(0x122)]}:{},..._0x591e64[_0x4774b7(0x11a)]!=null?{'apiDir':_0x591e64[_0x4774b7(0x11a)]}:{},..._0x591e64['cookie']!=null?{'cookie':_0x591e64['cookie']}:{},..._0x591e64[_0x4774b7(0x12a)]!=null?{'accessKey':_0x591e64[_0x4774b7(0x12a)]}:{},..._0x591e64['format']!=null?{'format':_0x591e64[_0x4774b7(0x11c)]}:{},..._0x591e64[_0x4774b7(0x11e)]!=null?{'pageSize':_0x591e64[_0x4774b7(0x11e)]}:{},..._0x591e64[_0x4774b7(0x13b)]!=null?{'riskLevel':_0x591e64[_0x4774b7(0x13b)]}:{},..._0x591e64['locale']!=null?{'locale':_0x591e64[_0x4774b7(0x140)]}:{}},_0x591e64['apps']=_0xdc1195;if(!_0x591e64[_0x4774b7(0x134)])_0x591e64[_0x4774b7(0x134)]=_0x4df893;_0x86230a=!![];}return('appcode'in _0x591e64||'app'in _0x591e64)&&(delete _0x591e64[_0x4774b7(0x13c)],delete _0x591e64['app'],_0x86230a=!![]),{'config':_0x591e64,'migrated':_0x86230a};}function writeNormalizedConfigIfNeeded(_0x276367,_0x274353){const _0xa0a558=a176_0x4d6395,_0x5a567e=JSON[_0xa0a558(0x12e)](_0x274353,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x276367)===_0x5a567e)return;writeConfigFile(_0x276367,_0x274353),normalizedWriteCache[_0xa0a558(0x126)](_0x276367,_0x5a567e);}function parseAndNormalizeConfig(_0x556f31,_0x2f617b,_0x267715){const _0x39e8c4=a176_0x4d6395,_0x2e52f9=parseCliConfigJsonFile(_0x556f31,_0x2f617b,_0x267715),_0x543c37=normalizeLegacyConfigShape(_0x2e52f9);if(_0x543c37['migrated'])try{writeNormalizedConfigIfNeeded(_0x556f31,_0x543c37[_0x39e8c4(0x128)]);}catch{}return _0x543c37[_0x39e8c4(0x128)];}export function loadRawConfigLayers(_0x1f6b45){const _0x278725=a176_0x4d6395;let _0x3444bb={},_0xff1c34={};const _0x21c5e3=resolveConfigPath(homedir());_0x21c5e3&&(_0x3444bb=parseAndNormalizeConfig(_0x21c5e3,_0x278725(0x13a),_0x278725(0x145)));const _0x52a948=_0x1f6b45??findProjectRootDirectory(),_0x3c7c35=resolveConfigPath(_0x52a948);return _0x3c7c35&&(_0xff1c34=parseAndNormalizeConfig(_0x3c7c35,_0x278725(0x13a),_0x278725(0x119))),{'globalPath':_0x21c5e3,'projectPath':_0x3c7c35,'globalConfig':_0x3444bb,'projectConfig':_0xff1c34};}const INHERIT_WHITELIST=[a176_0x4d6395(0x120),a176_0x4d6395(0x12a),'locale','format',a176_0x4d6395(0x13b),a176_0x4d6395(0x11e)];export function mergeRawConfigLayers(_0x359890){const _0x307f39=a176_0x4d6395,{globalConfig:_0x2eb5de,projectConfig:_0xc790d8}=_0x359890,_0x3141b5=Object[_0x307f39(0x135)](_0xc790d8)[_0x307f39(0x13d)]>0x0;if(!_0x3141b5)return mergeGlobalOnly(_0x2eb5de);if(_0xc790d8[_0x307f39(0x123)]===!![])return mergeFullInherit(_0x2eb5de,_0xc790d8);if(_0xc790d8[_0x307f39(0x123)]===![])return mergeIsolated(_0xc790d8);return mergeProjectFirst(_0x2eb5de,_0xc790d8);}function mergeGlobalOnly(_0x5b17d4){const _0x82069=a176_0x4d6395,_0x3d9260={..._0x5b17d4},_0x1bdcf7=_0x5b17d4['apps']&&typeof _0x5b17d4[_0x82069(0x132)]===_0x82069(0x11f)?_0x5b17d4[_0x82069(0x132)]:{};if(Object[_0x82069(0x135)](_0x1bdcf7)[_0x82069(0x13d)]>0x0)_0x3d9260['apps']=_0x1bdcf7;if(_0x5b17d4[_0x82069(0x134)])_0x3d9260['defaultApp']=_0x5b17d4['defaultApp'];else{const _0x2183a9=Object[_0x82069(0x135)](_0x1bdcf7);if(_0x2183a9['length']>0x0)_0x3d9260[_0x82069(0x134)]=_0x2183a9[0x0];}return _0x3d9260;}function mergeIsolated(_0x3d6758){const _0x149fc9=a176_0x4d6395,_0x5a1a3a={..._0x3d6758};delete _0x5a1a3a[_0x149fc9(0x123)];const _0x307eb8=_0x3d6758[_0x149fc9(0x132)]&&typeof _0x3d6758['apps']==='object'?_0x3d6758[_0x149fc9(0x132)]:{};Object[_0x149fc9(0x135)](_0x307eb8)[_0x149fc9(0x13d)]>0x0?_0x5a1a3a[_0x149fc9(0x132)]=_0x307eb8:delete _0x5a1a3a[_0x149fc9(0x132)];if(_0x149fc9(0x134)in _0x3d6758)_0x5a1a3a[_0x149fc9(0x134)]=_0x3d6758['defaultApp'];else Object[_0x149fc9(0x135)](_0x307eb8)[_0x149fc9(0x13d)]>0x0?_0x5a1a3a[_0x149fc9(0x134)]=Object['keys'](_0x307eb8)[0x0]:delete _0x5a1a3a['defaultApp'];return _0x5a1a3a;}function mergeProjectFirst(_0x43e989,_0x5d700b){const _0x2c3979=a176_0x4d6395,_0x3e51f2={..._0x5d700b};delete _0x3e51f2[_0x2c3979(0x123)];for(const _0x14ffb0 of INHERIT_WHITELIST){!(_0x14ffb0 in _0x3e51f2)&&_0x14ffb0 in _0x43e989&&(_0x3e51f2[_0x14ffb0]=_0x43e989[_0x14ffb0]);}const _0x4e5afa=_0x5d700b['apps']&&typeof _0x5d700b[_0x2c3979(0x132)]===_0x2c3979(0x11f)?_0x5d700b[_0x2c3979(0x132)]:{};Object[_0x2c3979(0x135)](_0x4e5afa)['length']>0x0?_0x3e51f2[_0x2c3979(0x132)]=_0x4e5afa:delete _0x3e51f2['apps'];if(_0x2c3979(0x134)in _0x5d700b)_0x3e51f2[_0x2c3979(0x134)]=_0x5d700b[_0x2c3979(0x134)];else Object[_0x2c3979(0x135)](_0x4e5afa)[_0x2c3979(0x13d)]>0x0?_0x3e51f2[_0x2c3979(0x134)]=Object[_0x2c3979(0x135)](_0x4e5afa)[0x0]:delete _0x3e51f2[_0x2c3979(0x134)];return _0x3e51f2;}function mergeFullInherit(_0x94ac69,_0xe0be8b){const _0x238d33=a176_0x4d6395,_0x1c81c8=_0x94ac69[_0x238d33(0x132)]&&typeof _0x94ac69['apps']===_0x238d33(0x11f)?_0x94ac69[_0x238d33(0x132)]:{},_0x3da23c=_0xe0be8b[_0x238d33(0x132)]&&typeof _0xe0be8b['apps']===_0x238d33(0x11f)?_0xe0be8b[_0x238d33(0x132)]:{},_0x53227={..._0x1c81c8,..._0x3da23c},_0x4c5d62={..._0x94ac69,..._0xe0be8b};delete _0x4c5d62[_0x238d33(0x123)];if(Object['keys'](_0x53227)[_0x238d33(0x13d)]>0x0)_0x4c5d62['apps']=_0x53227;if(_0x238d33(0x134)in _0xe0be8b)_0x4c5d62[_0x238d33(0x134)]=_0xe0be8b[_0x238d33(0x134)];else{if(Object[_0x238d33(0x135)](_0x3da23c)[_0x238d33(0x13d)]>0x0)_0x4c5d62['defaultApp']=Object[_0x238d33(0x135)](_0x3da23c)[0x0];else{if(_0x94ac69[_0x238d33(0x134)])_0x4c5d62['defaultApp']=_0x94ac69[_0x238d33(0x134)];else{const _0x461bb7=Object['keys'](_0x1c81c8);if(_0x461bb7[_0x238d33(0x13d)]>0x0)_0x4c5d62[_0x238d33(0x134)]=_0x461bb7[0x0];}}}return _0x4c5d62;}export function readRawConfigWithLayers(_0x1ac5ec){const _0x534689=loadRawConfigLayers(_0x1ac5ec);return{'config':mergeRawConfigLayers(_0x534689),'layers':_0x534689};}export function readRawConfig(_0x25a160){return mergeRawConfigLayers(loadRawConfigLayers(_0x25a160));}export function readConfigFile(_0x41a8ff){return parseAndNormalizeConfig(_0x41a8ff,'silent');}export function writeConfigFile(_0x4531c5,_0x1e68f6){const _0x3fcb1f=a176_0x4d6395,_0x485c02=dirname(_0x4531c5);!existsSync(_0x485c02)&&mkdirSync(_0x485c02,{'recursive':!![]});const _0x2ad807=_0x4531c5+_0x3fcb1f(0x121);try{writeFileSync(_0x2ad807,JSON[_0x3fcb1f(0x12e)](_0x1e68f6,null,0x2)+'\x0a',{'encoding':_0x3fcb1f(0x147),'mode':0x180}),renameSync(_0x2ad807,_0x4531c5);}catch(_0xbdb309){try{unlinkSync(_0x2ad807);}catch{}throw _0xbdb309;}}export function resolveWriteConfigPath(_0x46fead){const _0x2e74c2=a176_0x4d6395,_0x47352d=_0x46fead===_0x2e74c2(0x144)?process['cwd']():homedir(),_0x97d5a0=resolveConfigPath(_0x47352d);return _0x97d5a0??resolve(_0x47352d,NEW_CONFIG_NAME);}
1
+ const a178_0x392d5b=a178_0x1e9b;(function(_0xfe31e,_0x146961){const _0x51d922=a178_0x1e9b,_0x5573ab=_0xfe31e();while(!![]){try{const _0x4e3214=-parseInt(_0x51d922(0xfb))/0x1*(parseInt(_0x51d922(0xe5))/0x2)+-parseInt(_0x51d922(0xdf))/0x3*(parseInt(_0x51d922(0xe7))/0x4)+parseInt(_0x51d922(0x107))/0x5+-parseInt(_0x51d922(0xdb))/0x6*(parseInt(_0x51d922(0xf0))/0x7)+parseInt(_0x51d922(0x101))/0x8*(parseInt(_0x51d922(0xee))/0x9)+-parseInt(_0x51d922(0xda))/0xa*(parseInt(_0x51d922(0xd8))/0xb)+-parseInt(_0x51d922(0xeb))/0xc*(-parseInt(_0x51d922(0x102))/0xd);if(_0x4e3214===_0x146961)break;else _0x5573ab['push'](_0x5573ab['shift']());}catch(_0x39add6){_0x5573ab['push'](_0x5573ab['shift']());}}}(a178_0x136a,0x83458));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a178_0x392d5b(0xf5);export const CONFIG_NAMES=[a178_0x392d5b(0xf5),a178_0x392d5b(0xfa),a178_0x392d5b(0xfe)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a178_0x392d5b(0xef)](_0x1bd415=>_0x1bd415!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x4ab306){for(const _0x5ae9e1 of CONFIG_NAMES){const _0xd5490=resolve(_0x4ab306,_0x5ae9e1);if(existsSync(_0xd5490))return _0xd5490;}return undefined;}export function findProjectRootDirectory(_0x20201c=process[a178_0x392d5b(0xf8)]()){let _0x5cd327=resolve(_0x20201c);const {root:_0x3e8953}=parse(_0x5cd327),_0x33a5f4=homedir();while(!![]){if(resolveConfigPath(_0x5cd327)){if(_0x5cd327===_0x33a5f4)break;return _0x5cd327;}if(_0x5cd327===_0x3e8953||_0x5cd327===_0x33a5f4)break;const _0x267205=dirname(_0x5cd327);if(_0x267205===_0x5cd327)break;_0x5cd327=_0x267205;}return resolve(_0x20201c);}export function getProjectConfigPath(){const _0x25b84b=a178_0x392d5b;return resolveConfigPath(process[_0x25b84b(0xf8)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x21a545){const _0x534682=a178_0x392d5b;if(!existsSync(_0x21a545))return{'status':_0x534682(0xe4)};try{const _0x44e30d=readFileSync(_0x21a545,{'encoding':'utf8'});if(!_0x44e30d?.[_0x534682(0x108)]())return{'status':'empty'};const _0x390803=JSON['parse'](_0x44e30d);return{'status':'ok','data':_0x390803};}catch(_0x5ca06e){return{'status':_0x534682(0xe3),'message':_0x5ca06e instanceof Error?_0x5ca06e['message']:String(_0x5ca06e)};}}function parseCliConfigJsonFile(_0x174358,_0x423070,_0x1fe348){const _0x491f13=a178_0x392d5b,_0x1d4a62=inspectCliConfigJsonFile(_0x174358);if(_0x1d4a62[_0x491f13(0x100)]===_0x491f13(0xe4)||_0x1d4a62[_0x491f13(0x100)]==='empty')return{};if(_0x1d4a62['status']==='ok')return _0x1d4a62['data'];return _0x423070==='warn'&&_0x1fe348&&console[_0x491f13(0xe3)](CLI_BIN_NAME+':\x20'+_0x1fe348+_0x491f13(0xed)+_0x174358+_0x491f13(0x103)+_0x1d4a62['message']),{};}function normalizeLegacyConfigShape(_0x555292){const _0x432384=a178_0x392d5b;if(!_0x555292||typeof _0x555292!=='object')return{'config':{},'migrated':![]};const _0x48ed18={..._0x555292},_0x4464ba=_0x48ed18[_0x432384(0x104)]&&typeof _0x48ed18[_0x432384(0x104)]===_0x432384(0xfd)?{..._0x48ed18[_0x432384(0x104)]}:{},_0x3ec012=Object['keys'](_0x4464ba)[_0x432384(0xdd)],_0x446a43=_0x48ed18[_0x432384(0xf4)]||_0x48ed18['app'];let _0x25f12f=![];if(_0x446a43&&_0x3ec012===0x0){const _0x5e8e22=typeof _0x48ed18[_0x432384(0xe9)]==='string'&&_0x48ed18['defaultApp'][_0x432384(0x108)]()?_0x48ed18[_0x432384(0xe9)]:String(_0x446a43)[_0x432384(0x108)]();_0x4464ba[_0x5e8e22]={'appcode':String(_0x446a43)[_0x432384(0x108)](),..._0x48ed18['env']!=null?{'env':_0x48ed18[_0x432384(0x106)]}:{},..._0x48ed18[_0x432384(0xe8)]!=null?{'apiDir':_0x48ed18[_0x432384(0xe8)]}:{},..._0x48ed18[_0x432384(0xe2)]!=null?{'cookie':_0x48ed18[_0x432384(0xe2)]}:{},..._0x48ed18[_0x432384(0xfc)]!=null?{'accessKey':_0x48ed18['accessKey']}:{},..._0x48ed18[_0x432384(0xea)]!=null?{'format':_0x48ed18['format']}:{},..._0x48ed18[_0x432384(0xdc)]!=null?{'pageSize':_0x48ed18[_0x432384(0xdc)]}:{},..._0x48ed18[_0x432384(0xf3)]!=null?{'riskLevel':_0x48ed18[_0x432384(0xf3)]}:{},..._0x48ed18[_0x432384(0xf2)]!=null?{'locale':_0x48ed18[_0x432384(0xf2)]}:{}},_0x48ed18['apps']=_0x4464ba;if(!_0x48ed18[_0x432384(0xe9)])_0x48ed18[_0x432384(0xe9)]=_0x5e8e22;_0x25f12f=!![];}return(_0x432384(0xf4)in _0x48ed18||_0x432384(0xe0)in _0x48ed18)&&(delete _0x48ed18[_0x432384(0xf4)],delete _0x48ed18[_0x432384(0xe0)],_0x25f12f=!![]),{'config':_0x48ed18,'migrated':_0x25f12f};}function writeNormalizedConfigIfNeeded(_0x441c0f,_0x823de){const _0x107ad2=a178_0x392d5b,_0x334d8b=JSON[_0x107ad2(0xd9)](_0x823de,null,0x2)+'\x0a';if(normalizedWriteCache[_0x107ad2(0xf7)](_0x441c0f)===_0x334d8b)return;writeConfigFile(_0x441c0f,_0x823de),normalizedWriteCache[_0x107ad2(0xf6)](_0x441c0f,_0x334d8b);}function parseAndNormalizeConfig(_0x3127e0,_0x2afd6e,_0x14a4f9){const _0x34622b=a178_0x392d5b,_0xb772cd=parseCliConfigJsonFile(_0x3127e0,_0x2afd6e,_0x14a4f9),_0x2972c7=normalizeLegacyConfigShape(_0xb772cd);if(_0x2972c7['migrated'])try{writeNormalizedConfigIfNeeded(_0x3127e0,_0x2972c7[_0x34622b(0xff)]);}catch{}return _0x2972c7[_0x34622b(0xff)];}export function loadRawConfigLayers(_0x5b0c8d){const _0x118d9e=a178_0x392d5b;let _0x219b9d={},_0x4d39c2={};const _0x57e450=resolveConfigPath(homedir());_0x57e450&&(_0x219b9d=parseAndNormalizeConfig(_0x57e450,_0x118d9e(0x105),_0x118d9e(0xec)));const _0x1e4adb=_0x5b0c8d??findProjectRootDirectory(),_0x386f20=resolveConfigPath(_0x1e4adb);return _0x386f20&&(_0x4d39c2=parseAndNormalizeConfig(_0x386f20,_0x118d9e(0x105),'Project')),{'globalPath':_0x57e450,'projectPath':_0x386f20,'globalConfig':_0x219b9d,'projectConfig':_0x4d39c2};}const INHERIT_WHITELIST=[a178_0x392d5b(0xe2),a178_0x392d5b(0xfc),a178_0x392d5b(0xf2),a178_0x392d5b(0xea),'riskLevel',a178_0x392d5b(0xdc)];export function mergeRawConfigLayers(_0x186c28){const _0x3a321a=a178_0x392d5b,{globalConfig:_0x3b9792,projectConfig:_0x3589f3}=_0x186c28,_0x4c1def=Object[_0x3a321a(0xde)](_0x3589f3)[_0x3a321a(0xdd)]>0x0;if(!_0x4c1def)return mergeGlobalOnly(_0x3b9792);if(_0x3589f3[_0x3a321a(0xe1)]===!![])return mergeFullInherit(_0x3b9792,_0x3589f3);if(_0x3589f3[_0x3a321a(0xe1)]===![])return mergeIsolated(_0x3589f3);return mergeProjectFirst(_0x3b9792,_0x3589f3);}function mergeGlobalOnly(_0x4c18c1){const _0xc6ceba=a178_0x392d5b,_0x11a2b6={..._0x4c18c1},_0x305313=_0x4c18c1[_0xc6ceba(0x104)]&&typeof _0x4c18c1[_0xc6ceba(0x104)]==='object'?_0x4c18c1[_0xc6ceba(0x104)]:{};if(Object[_0xc6ceba(0xde)](_0x305313)[_0xc6ceba(0xdd)]>0x0)_0x11a2b6[_0xc6ceba(0x104)]=_0x305313;if(_0x4c18c1[_0xc6ceba(0xe9)])_0x11a2b6[_0xc6ceba(0xe9)]=_0x4c18c1[_0xc6ceba(0xe9)];else{const _0x597c58=Object[_0xc6ceba(0xde)](_0x305313);if(_0x597c58[_0xc6ceba(0xdd)]>0x0)_0x11a2b6[_0xc6ceba(0xe9)]=_0x597c58[0x0];}return _0x11a2b6;}function mergeIsolated(_0x307a90){const _0x32f779=a178_0x392d5b,_0xfaaba={..._0x307a90};delete _0xfaaba[_0x32f779(0xe1)];const _0x51b807=_0x307a90[_0x32f779(0x104)]&&typeof _0x307a90[_0x32f779(0x104)]===_0x32f779(0xfd)?_0x307a90[_0x32f779(0x104)]:{};Object['keys'](_0x51b807)[_0x32f779(0xdd)]>0x0?_0xfaaba[_0x32f779(0x104)]=_0x51b807:delete _0xfaaba[_0x32f779(0x104)];if(_0x32f779(0xe9)in _0x307a90)_0xfaaba['defaultApp']=_0x307a90[_0x32f779(0xe9)];else Object[_0x32f779(0xde)](_0x51b807)[_0x32f779(0xdd)]>0x0?_0xfaaba['defaultApp']=Object['keys'](_0x51b807)[0x0]:delete _0xfaaba[_0x32f779(0xe9)];return _0xfaaba;}function mergeProjectFirst(_0x23c4c3,_0x550ec0){const _0x2e4afe=a178_0x392d5b,_0x54abe3={..._0x550ec0};delete _0x54abe3[_0x2e4afe(0xe1)];for(const _0x3a5704 of INHERIT_WHITELIST){!(_0x3a5704 in _0x54abe3)&&_0x3a5704 in _0x23c4c3&&(_0x54abe3[_0x3a5704]=_0x23c4c3[_0x3a5704]);}const _0x3757cf=_0x550ec0[_0x2e4afe(0x104)]&&typeof _0x550ec0['apps']===_0x2e4afe(0xfd)?_0x550ec0[_0x2e4afe(0x104)]:{};Object[_0x2e4afe(0xde)](_0x3757cf)[_0x2e4afe(0xdd)]>0x0?_0x54abe3[_0x2e4afe(0x104)]=_0x3757cf:delete _0x54abe3[_0x2e4afe(0x104)];if('defaultApp'in _0x550ec0)_0x54abe3['defaultApp']=_0x550ec0[_0x2e4afe(0xe9)];else Object[_0x2e4afe(0xde)](_0x3757cf)[_0x2e4afe(0xdd)]>0x0?_0x54abe3[_0x2e4afe(0xe9)]=Object[_0x2e4afe(0xde)](_0x3757cf)[0x0]:delete _0x54abe3[_0x2e4afe(0xe9)];return _0x54abe3;}function mergeFullInherit(_0x25d5d6,_0x1666fb){const _0x1bca28=a178_0x392d5b,_0x10911d=_0x25d5d6[_0x1bca28(0x104)]&&typeof _0x25d5d6[_0x1bca28(0x104)]==='object'?_0x25d5d6[_0x1bca28(0x104)]:{},_0x4d3d14=_0x1666fb[_0x1bca28(0x104)]&&typeof _0x1666fb[_0x1bca28(0x104)]===_0x1bca28(0xfd)?_0x1666fb[_0x1bca28(0x104)]:{},_0x1d8786={..._0x10911d,..._0x4d3d14},_0x38f14f={..._0x25d5d6,..._0x1666fb};delete _0x38f14f[_0x1bca28(0xe1)];if(Object[_0x1bca28(0xde)](_0x1d8786)[_0x1bca28(0xdd)]>0x0)_0x38f14f[_0x1bca28(0x104)]=_0x1d8786;if('defaultApp'in _0x1666fb)_0x38f14f['defaultApp']=_0x1666fb['defaultApp'];else{if(Object[_0x1bca28(0xde)](_0x4d3d14)[_0x1bca28(0xdd)]>0x0)_0x38f14f[_0x1bca28(0xe9)]=Object[_0x1bca28(0xde)](_0x4d3d14)[0x0];else{if(_0x25d5d6[_0x1bca28(0xe9)])_0x38f14f[_0x1bca28(0xe9)]=_0x25d5d6[_0x1bca28(0xe9)];else{const _0x116bc1=Object['keys'](_0x10911d);if(_0x116bc1['length']>0x0)_0x38f14f[_0x1bca28(0xe9)]=_0x116bc1[0x0];}}}return _0x38f14f;}export function readRawConfigWithLayers(_0x4b1deb){const _0x59d4d2=loadRawConfigLayers(_0x4b1deb);return{'config':mergeRawConfigLayers(_0x59d4d2),'layers':_0x59d4d2};}function a178_0x1e9b(_0x40a2f3,_0x438cea){_0x40a2f3=_0x40a2f3-0xd8;const _0x136aec=a178_0x136a();let _0x1e9ba2=_0x136aec[_0x40a2f3];return _0x1e9ba2;}function a178_0x136a(){const _0x3f98c5=['28743996bRGCJX','Global','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','1142658YrzIBl','filter','7bHsQDL','silent','locale','riskLevel','appcode','.rabetbase.json','set','get','cwd','utf8','.lovrabet.json','1bLKDhP','accessKey','object','.lovrabetrc','config','status','48nzypSb','13syRuZM','\x0a\x20\x20','apps','warn','env','386335WXUOpv','trim','11lqbIqp','stringify','5151820SVXxUE','5414712mItQja','pageSize','length','keys','154911KdRIml','app','inherit','cookie','error','missing','1215538QHWGRY','.tmp','52ylAwPt','apiDir','defaultApp','format'];a178_0x136a=function(){return _0x3f98c5;};return a178_0x136a();}export function readRawConfig(_0x5ab1b2){return mergeRawConfigLayers(loadRawConfigLayers(_0x5ab1b2));}export function readConfigFile(_0x4b5584){const _0x4f7638=a178_0x392d5b;return parseAndNormalizeConfig(_0x4b5584,_0x4f7638(0xf1));}export function writeConfigFile(_0x431f48,_0x5e86d3){const _0x568b27=a178_0x392d5b,_0x2356d8=dirname(_0x431f48);!existsSync(_0x2356d8)&&mkdirSync(_0x2356d8,{'recursive':!![]});const _0x47372a=_0x431f48+_0x568b27(0xe6);try{writeFileSync(_0x47372a,JSON[_0x568b27(0xd9)](_0x5e86d3,null,0x2)+'\x0a',{'encoding':_0x568b27(0xf9),'mode':0x180}),renameSync(_0x47372a,_0x431f48);}catch(_0x4dd07c){try{unlinkSync(_0x47372a);}catch{}throw _0x4dd07c;}}export function resolveWriteConfigPath(_0x369bd4){const _0x13fbeb=a178_0x392d5b,_0xe28972=_0x369bd4==='project'?process[_0x13fbeb(0xf8)]():homedir(),_0x4b8417=resolveConfigPath(_0xe28972);return _0x4b8417??resolve(_0xe28972,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a177_0x202bef=a177_0x4471;(function(_0x272762,_0x46fdf0){const _0x54f60b=a177_0x4471,_0x5ef0a0=_0x272762();while(!![]){try{const _0x28bc29=parseInt(_0x54f60b(0xbc))/0x1+parseInt(_0x54f60b(0xab))/0x2*(-parseInt(_0x54f60b(0xc8))/0x3)+parseInt(_0x54f60b(0xb7))/0x4*(-parseInt(_0x54f60b(0xc4))/0x5)+parseInt(_0x54f60b(0xb6))/0x6*(parseInt(_0x54f60b(0xb4))/0x7)+parseInt(_0x54f60b(0xbd))/0x8*(parseInt(_0x54f60b(0xcc))/0x9)+-parseInt(_0x54f60b(0xb3))/0xa+-parseInt(_0x54f60b(0xc6))/0xb;if(_0x28bc29===_0x46fdf0)break;else _0x5ef0a0['push'](_0x5ef0a0['shift']());}catch(_0x401321){_0x5ef0a0['push'](_0x5ef0a0['shift']());}}}(a177_0x5786,0x63f6c));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';function a177_0x5786(){const _0x32a2d1=['app','replace','-api.ts','filter','cwd','3492940wGbRHi','119gKLTjd','env','283326tCcgMN','157836ciJmam','apiDomain','length','object','argv','673672ZdsItm','4360Vqxwlw','projectConfig','runtimeDomain','./utils/is-non-interactive.js','defaultApp','apps','string','65BtfSfG','setRawCommand','3496724JYgDbD','https://g.lovrabet.com/dist/lovrabet-skill','3939EFaxLj','./constant/domain.js','globalConfig','entries','10737DtNtWy','values','join','project','map','trim','./constant/env.js','cookie','keys','818SWSTlG','template_base_url','appcode'];a177_0x5786=function(){return _0x32a2d1;};return a177_0x5786();}import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function a177_0x4471(_0x5c2007,_0x42db7c){_0x5c2007=_0x5c2007-0xaa;const _0x578640=a177_0x5786();let _0x447170=_0x578640[_0x5c2007];return _0x447170;}function env(_0x38bcc8){return process.env[`RABETBASE_${_0x38bcc8}`]||process.env[`LOVRABET_${_0x38bcc8}`]||undefined;}export async function createContext(_0x18f42c){const _0xf6df6e=a177_0x4471,{config:_0x4ba0c7,layers:_0x469c45}=readRawConfigWithLayers(),_0x14d271=buildConfig(_0x4ba0c7,_0x18f42c,_0x469c45),{initEnv:_0x357347}=await import(_0xf6df6e(0xd2));if(_0x14d271[_0xf6df6e(0xb5)])_0x357347(_0x14d271[_0xf6df6e(0xb5)]);else _0x18f42c[_0xf6df6e(0xb5)]&&typeof _0x18f42c['env']===_0xf6df6e(0xc3)&&_0x357347(_0x18f42c[_0xf6df6e(0xb5)]);const {initDomains:_0x25572e,getUserDomain:_0x4354cd,getApiDomain:_0x48b19e}=await import(_0xf6df6e(0xc9));_0x25572e({'apiDomain':_0x4ba0c7[_0xf6df6e(0xb8)]||undefined,'userDomain':_0x4ba0c7['userDomain']||undefined,'runtimeDomain':_0x4ba0c7[_0xf6df6e(0xbf)]||undefined});const _0xa80fbb={'apiDomain':_0x48b19e(),'userDomain':_0x4354cd()},_0x376f1d=await buildAuth(_0x14d271);logger['setLogPath'](process[_0xf6df6e(0xb2)]());const _0x1645d3=(CLI_BIN_NAME+'\x20'+process[_0xf6df6e(0xbb)]['slice'](0x2)[_0xf6df6e(0xce)]('\x20'))['trim']();logger[_0xf6df6e(0xc5)](_0x1645d3);const {isNonInteractive:_0x413fb8}=await import(_0xf6df6e(0xc0)),_0x25d4af=_0x413fb8(_0x18f42c);return{'config':_0x14d271,'auth':_0x376f1d,'logger':logger,'env':_0xa80fbb,'nonInteractive':_0x25d4af};}export function buildConfigFromFlags(_0x3f456f){const {config:_0xd00a7f,layers:_0x3cbbeb}=readRawConfigWithLayers();return buildConfig(_0xd00a7f,_0x3f456f,_0x3cbbeb);}export function getConfigAppCode(_0x3f0618){const _0x25fcba=a177_0x4471,_0xebdc5b=readRawConfig(_0x3f0618);if(_0xebdc5b[_0x25fcba(0xc2)]&&typeof _0xebdc5b[_0x25fcba(0xc2)]===_0x25fcba(0xba)){const _0x46e460=_0xebdc5b[_0x25fcba(0xc1)];if(_0x46e460&&_0xebdc5b[_0x25fcba(0xc2)][_0x46e460]?.['appcode'])return String(_0xebdc5b[_0x25fcba(0xc2)][_0x46e460][_0x25fcba(0xad)])[_0x25fcba(0xd1)]();const _0x15364a=Object[_0x25fcba(0xcd)](_0xebdc5b[_0x25fcba(0xc2)])[0x0];if(_0x15364a?.[_0x25fcba(0xad)])return String(_0x15364a[_0x25fcba(0xad)])[_0x25fcba(0xd1)]();}const _0x7fd8cd=_0xebdc5b[_0x25fcba(0xad)]||_0xebdc5b[_0x25fcba(0xae)];if(typeof _0x7fd8cd!==_0x25fcba(0xc3)||_0x7fd8cd[_0x25fcba(0xd1)]()==='')return undefined;return _0x7fd8cd[_0x25fcba(0xd1)]();}export function getMultiAppConfigs(_0x59894e=a177_0x202bef(0xcf),_0x56822b){const _0xb21455=a177_0x202bef,_0x514277=loadRawConfigLayers(_0x56822b);let _0x3e4b9a,_0xae9d64;if(_0x59894e==='merged'){const _0x1bfdf4=_0x514277[_0xb21455(0xca)][_0xb21455(0xc2)]&&typeof _0x514277[_0xb21455(0xca)]['apps']===_0xb21455(0xba)?_0x514277[_0xb21455(0xca)][_0xb21455(0xc2)]:{},_0x5348fe=_0x514277[_0xb21455(0xbe)][_0xb21455(0xc2)]&&typeof _0x514277[_0xb21455(0xbe)]['apps']===_0xb21455(0xba)?_0x514277[_0xb21455(0xbe)]['apps']:{};_0x3e4b9a={..._0x1bfdf4,..._0x5348fe};const _0x52cdb8=readRawConfig(_0x56822b);_0xae9d64=_0x52cdb8[_0xb21455(0xc1)];}else _0x3e4b9a=_0x514277[_0xb21455(0xbe)]['apps'],_0xae9d64=_0x514277[_0xb21455(0xbe)][_0xb21455(0xc1)];if(!_0x3e4b9a||typeof _0x3e4b9a!==_0xb21455(0xba)||Object[_0xb21455(0xaa)](_0x3e4b9a)[_0xb21455(0xb9)]===0x0)return null;return Object[_0xb21455(0xcb)](_0x3e4b9a)[_0xb21455(0xd0)](([_0x1113b0,_0xd762a3])=>({'name':_0x1113b0,'appcode':_0xd762a3?.['appcode']||'','isDefault':_0x1113b0===_0xae9d64,'env':_0xd762a3?.[_0xb21455(0xb5)],'apiDir':_0xd762a3?.['apiDir'],'cookie':_0xd762a3?.[_0xb21455(0xd3)]||undefined}))[_0xb21455(0xb1)](_0x3aba6f=>_0x3aba6f[_0xb21455(0xad)]);}export function getTemplateBaseUrl(_0x375b02){const _0x1f42be=a177_0x202bef,_0x19e151=readRawConfig(_0x375b02);if(_0x19e151[_0x1f42be(0xac)]&&typeof _0x19e151['template_base_url']===_0x1f42be(0xc3))return _0x19e151[_0x1f42be(0xac)][_0x1f42be(0xaf)](/\/$/,'');return _0x1f42be(0xc7);}function buildConfig(_0x1544cf,_0xa0f370,_0x3c3785){return{...resolveAppConfig({'raw':_0x1544cf,'flags':_0xa0f370,'layers':_0x3c3785,'readEnv':env}),'raw':_0x1544cf};}export function resolveApiFilePath(_0x40641c,_0x4aba37){const _0x294712=a177_0x202bef,_0x1d3559=resolve(process['cwd'](),_0x40641c),_0x104f0f=resolve(_0x1d3559,'api.ts');if(!_0x4aba37)return _0x104f0f;const _0x441c86=readRawConfig(),_0x43e73c=_0x441c86[_0x294712(0xc2)]&&typeof _0x441c86[_0x294712(0xc2)]===_0x294712(0xba)?_0x441c86['apps']:{},_0x12f2a1=Object[_0x294712(0xcb)](_0x43e73c)['find'](([,_0x13e3a1])=>_0x13e3a1?.[_0x294712(0xad)]===_0x4aba37);if(!_0x12f2a1)return _0x104f0f;const [_0x1e7e30,_0x189722]=_0x12f2a1,_0x3b1918=typeof _0x441c86[_0x294712(0xc1)]==='string'?_0x441c86[_0x294712(0xc1)]:undefined;if(_0x189722?.['apiDir'])return _0x104f0f;if(_0x3b1918&&_0x1e7e30!==_0x3b1918)return resolve(_0x1d3559,_0x1e7e30+_0x294712(0xb0));return _0x104f0f;}
1
+ const a179_0x53072c=a179_0x426c;(function(_0x4ba375,_0xb11c27){const _0x5ef8c8=a179_0x426c,_0x3650fb=_0x4ba375();while(!![]){try{const _0x126634=-parseInt(_0x5ef8c8(0x130))/0x1*(-parseInt(_0x5ef8c8(0x131))/0x2)+-parseInt(_0x5ef8c8(0x132))/0x3*(parseInt(_0x5ef8c8(0x152))/0x4)+parseInt(_0x5ef8c8(0x133))/0x5*(parseInt(_0x5ef8c8(0x151))/0x6)+parseInt(_0x5ef8c8(0x14e))/0x7+-parseInt(_0x5ef8c8(0x14c))/0x8*(parseInt(_0x5ef8c8(0x14d))/0x9)+parseInt(_0x5ef8c8(0x147))/0xa*(-parseInt(_0x5ef8c8(0x145))/0xb)+parseInt(_0x5ef8c8(0x13c))/0xc*(parseInt(_0x5ef8c8(0x150))/0xd);if(_0x126634===_0xb11c27)break;else _0x3650fb['push'](_0x3650fb['shift']());}catch(_0x19fb7c){_0x3650fb['push'](_0x3650fb['shift']());}}}(a179_0x41b6,0xdbbe1));import{resolve}from'node:path';function a179_0x426c(_0x51ee40,_0x5d1856){_0x51ee40=_0x51ee40-0x12c;const _0x41b603=a179_0x41b6();let _0x426c2e=_0x41b603[_0x51ee40];return _0x426c2e;}import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';function a179_0x41b6(){const _0x47f771=['355473UhbrhR','6aSZiLA','3IRQHhQ','5GQaUwX','entries','https://g.lovrabet.com/dist/lovrabet-skill','apiDomain','defaultApp','projectConfig','object','apps','slice','36RvAkaQ','./constant/env.js','appcode','cwd','map','trim','setRawCommand','argv','replace','12324741KUlLfd','setLogPath','10RlUuYa','app','template_base_url','project','string','16SzuSBT','7887357dGhuGN','7599774GXnwfm','merged','9871004Lmfjas','4399896thbhPR','5560396ULiUQW','./constant/domain.js','find','cookie','env','length','-api.ts','apiDir','globalConfig'];a179_0x41b6=function(){return _0x47f771;};return a179_0x41b6();}import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x32dcc4){return process.env[`RABETBASE_${_0x32dcc4}`]||process.env[`LOVRABET_${_0x32dcc4}`]||undefined;}export async function createContext(_0x1a6ec9){const _0x59988d=a179_0x426c,{config:_0x32bc3b,layers:_0x2c4a9b}=readRawConfigWithLayers(),_0x2a28c7=buildConfig(_0x32bc3b,_0x1a6ec9,_0x2c4a9b),{initEnv:_0x533a3f}=await import(_0x59988d(0x13d));if(_0x2a28c7[_0x59988d(0x156)])_0x533a3f(_0x2a28c7[_0x59988d(0x156)]);else _0x1a6ec9[_0x59988d(0x156)]&&typeof _0x1a6ec9[_0x59988d(0x156)]===_0x59988d(0x14b)&&_0x533a3f(_0x1a6ec9[_0x59988d(0x156)]);const {initDomains:_0x2b70de,getUserDomain:_0xf76800,getApiDomain:_0x2cbe35}=await import(_0x59988d(0x153));_0x2b70de({'apiDomain':_0x32bc3b[_0x59988d(0x136)]||undefined,'userDomain':_0x32bc3b['userDomain']||undefined,'runtimeDomain':_0x32bc3b['runtimeDomain']||undefined});const _0x52fab2={'apiDomain':_0x2cbe35(),'userDomain':_0xf76800()},_0x1d92d4=await buildAuth(_0x2a28c7);logger[_0x59988d(0x146)](process[_0x59988d(0x13f)]());const _0x4b1d8a=(CLI_BIN_NAME+'\x20'+process[_0x59988d(0x143)][_0x59988d(0x13b)](0x2)['join']('\x20'))['trim']();logger[_0x59988d(0x142)](_0x4b1d8a);const {isNonInteractive:_0x55c76d}=await import('./utils/is-non-interactive.js'),_0x332b1f=_0x55c76d(_0x1a6ec9);return{'config':_0x2a28c7,'auth':_0x1d92d4,'logger':logger,'env':_0x52fab2,'nonInteractive':_0x332b1f};}export function buildConfigFromFlags(_0x1af9a7){const {config:_0x544f2a,layers:_0x32bb62}=readRawConfigWithLayers();return buildConfig(_0x544f2a,_0x1af9a7,_0x32bb62);}export function getConfigAppCode(_0x173e87){const _0x3430f5=a179_0x426c,_0x13baa8=readRawConfig(_0x173e87);if(_0x13baa8[_0x3430f5(0x13a)]&&typeof _0x13baa8[_0x3430f5(0x13a)]===_0x3430f5(0x139)){const _0xa00fad=_0x13baa8['defaultApp'];if(_0xa00fad&&_0x13baa8[_0x3430f5(0x13a)][_0xa00fad]?.[_0x3430f5(0x13e)])return String(_0x13baa8['apps'][_0xa00fad][_0x3430f5(0x13e)])[_0x3430f5(0x141)]();const _0x2465bf=Object['values'](_0x13baa8[_0x3430f5(0x13a)])[0x0];if(_0x2465bf?.[_0x3430f5(0x13e)])return String(_0x2465bf[_0x3430f5(0x13e)])[_0x3430f5(0x141)]();}const _0x400a84=_0x13baa8['appcode']||_0x13baa8[_0x3430f5(0x148)];if(typeof _0x400a84!=='string'||_0x400a84[_0x3430f5(0x141)]()==='')return undefined;return _0x400a84[_0x3430f5(0x141)]();}export function getMultiAppConfigs(_0x53f516=a179_0x53072c(0x14a),_0x2c58eb){const _0x2dfe29=a179_0x53072c,_0x16152d=loadRawConfigLayers(_0x2c58eb);let _0x247a32,_0x3a8626;if(_0x53f516===_0x2dfe29(0x14f)){const _0x353c0d=_0x16152d[_0x2dfe29(0x12f)][_0x2dfe29(0x13a)]&&typeof _0x16152d[_0x2dfe29(0x12f)][_0x2dfe29(0x13a)]===_0x2dfe29(0x139)?_0x16152d[_0x2dfe29(0x12f)][_0x2dfe29(0x13a)]:{},_0x35348d=_0x16152d[_0x2dfe29(0x138)][_0x2dfe29(0x13a)]&&typeof _0x16152d[_0x2dfe29(0x138)][_0x2dfe29(0x13a)]==='object'?_0x16152d[_0x2dfe29(0x138)][_0x2dfe29(0x13a)]:{};_0x247a32={..._0x353c0d,..._0x35348d};const _0x5d9b9e=readRawConfig(_0x2c58eb);_0x3a8626=_0x5d9b9e[_0x2dfe29(0x137)];}else _0x247a32=_0x16152d[_0x2dfe29(0x138)][_0x2dfe29(0x13a)],_0x3a8626=_0x16152d['projectConfig'][_0x2dfe29(0x137)];if(!_0x247a32||typeof _0x247a32!=='object'||Object['keys'](_0x247a32)[_0x2dfe29(0x12c)]===0x0)return null;return Object['entries'](_0x247a32)[_0x2dfe29(0x140)](([_0x1a2581,_0xeac683])=>({'name':_0x1a2581,'appcode':_0xeac683?.[_0x2dfe29(0x13e)]||'','isDefault':_0x1a2581===_0x3a8626,'env':_0xeac683?.['env'],'apiDir':_0xeac683?.[_0x2dfe29(0x12e)],'cookie':_0xeac683?.[_0x2dfe29(0x155)]||undefined}))['filter'](_0x41c58d=>_0x41c58d[_0x2dfe29(0x13e)]);}export function getTemplateBaseUrl(_0x3bc2fe){const _0x1ce335=a179_0x53072c,_0x5c1c14=readRawConfig(_0x3bc2fe);if(_0x5c1c14[_0x1ce335(0x149)]&&typeof _0x5c1c14[_0x1ce335(0x149)]===_0x1ce335(0x14b))return _0x5c1c14['template_base_url'][_0x1ce335(0x144)](/\/$/,'');return _0x1ce335(0x135);}function buildConfig(_0x2d5936,_0x72d2b9,_0x153bb1){return{...resolveAppConfig({'raw':_0x2d5936,'flags':_0x72d2b9,'layers':_0x153bb1,'readEnv':env}),'raw':_0x2d5936};}export function resolveApiFilePath(_0x4286a7,_0x5d81cc){const _0x5549c3=a179_0x53072c,_0x361b89=resolve(process[_0x5549c3(0x13f)](),_0x4286a7),_0x34457b=resolve(_0x361b89,'api.ts');if(!_0x5d81cc)return _0x34457b;const _0x2c3806=readRawConfig(),_0x3d3a15=_0x2c3806[_0x5549c3(0x13a)]&&typeof _0x2c3806['apps']===_0x5549c3(0x139)?_0x2c3806[_0x5549c3(0x13a)]:{},_0x5db1c9=Object[_0x5549c3(0x134)](_0x3d3a15)[_0x5549c3(0x154)](([,_0x298dfc])=>_0x298dfc?.['appcode']===_0x5d81cc);if(!_0x5db1c9)return _0x34457b;const [_0x531943,_0x648eb9]=_0x5db1c9,_0x1a9ea2=typeof _0x2c3806['defaultApp']==='string'?_0x2c3806['defaultApp']:undefined;if(_0x648eb9?.['apiDir'])return _0x34457b;if(_0x1a9ea2&&_0x531943!==_0x1a9ea2)return resolve(_0x361b89,_0x531943+_0x5549c3(0x12d));return _0x34457b;}
@@ -1 +1 @@
1
- function a178_0x3d8e(_0x20f151,_0xed29f6){_0x20f151=_0x20f151-0x1be;const _0x269346=a178_0x2693();let _0x3d8eea=_0x269346[_0x20f151];return _0x3d8eea;}function a178_0x2693(){const _0x37b2c6=['4527nBbWUC','exec','alias','14168TUCDYc','4006023JCgxVZ','866235eTFNAW','datasetCode','push','cwd','610678waJkEr','set','get','28PEEOJy','api.ts','8524422oqtqJN','35887050OIRFFT','5uUhNPO','3749790XnNXZX','utf-8'];a178_0x2693=function(){return _0x37b2c6;};return a178_0x2693();}(function(_0x29272b,_0x31609b){const _0x370999=a178_0x3d8e,_0x13dd99=_0x29272b();while(!![]){try{const _0x553ae5=parseInt(_0x370999(0x1c4))/0x1*(parseInt(_0x370999(0x1d0))/0x2)+-parseInt(_0x370999(0x1c5))/0x3+-parseInt(_0x370999(0x1c0))/0x4*(-parseInt(_0x370999(0x1cc))/0x5)+parseInt(_0x370999(0x1c2))/0x6+parseInt(_0x370999(0x1cb))/0x7+parseInt(_0x370999(0x1ca))/0x8*(parseInt(_0x370999(0x1c7))/0x9)+-parseInt(_0x370999(0x1c3))/0xa;if(_0x553ae5===_0x31609b)break;else _0x13dd99['push'](_0x13dd99['shift']());}catch(_0x32a6d9){_0x13dd99['push'](_0x13dd99['shift']());}}}(a178_0x2693,0xbf8f4));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x3d2df5){const _0x3dce23=a178_0x3d8e,_0x43538c=[],_0x3d15a0=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3a54f7;while((_0x3a54f7=_0x3d15a0[_0x3dce23(0x1c8)](_0x3d2df5))!==null){_0x43538c[_0x3dce23(0x1ce)]({'datasetCode':_0x3a54f7[0x1],'tableName':_0x3a54f7[0x2],'name':_0x3a54f7[0x3],'alias':_0x3a54f7[0x4]});}return _0x43538c;}export function loadAliasMap(_0x3a6f90,_0x4806c1,_0x5e9324){const _0x364557=a178_0x3d8e,_0x10fed8=_0x5e9324??resolve(process[_0x364557(0x1cf)](),_0x3a6f90,_0x364557(0x1c1));if(cache['has'](_0x10fed8))return cache[_0x364557(0x1bf)](_0x10fed8);if(!existsSync(_0x10fed8))return cache[_0x364557(0x1be)](_0x10fed8,[]),[];try{const _0x39e60e=readFileSync(_0x10fed8,_0x364557(0x1c6)),_0x14dfbf=parseApiFile(_0x39e60e);return cache[_0x364557(0x1be)](_0x10fed8,_0x14dfbf),_0x14dfbf;}catch{return cache[_0x364557(0x1be)](_0x10fed8,[]),[];}}export function resolveAlias(_0x490101,_0x1c88fe,_0x321c4a,_0x5b7c87){const _0x10fe34=a178_0x3d8e;if(!_0x1c88fe)return undefined;const _0x5e04e1=loadAliasMap(_0x490101,_0x321c4a,_0x5b7c87),_0x42c18c=_0x5e04e1['find'](_0x380a5d=>_0x380a5d[_0x10fe34(0x1c9)]===_0x1c88fe);return _0x42c18c?.[_0x10fe34(0x1cd)];}export function listAliases(_0x3bf6f8,_0x4de4a1,_0x189731){return loadAliasMap(_0x3bf6f8,_0x4de4a1,_0x189731);}
1
+ (function(_0x892c75,_0x5c3859){const _0x2f4f04=a180_0x29e9,_0x38726e=_0x892c75();while(!![]){try{const _0x37f68f=parseInt(_0x2f4f04(0xf7))/0x1*(parseInt(_0x2f4f04(0xff))/0x2)+-parseInt(_0x2f4f04(0xec))/0x3+-parseInt(_0x2f4f04(0xee))/0x4+-parseInt(_0x2f4f04(0xfc))/0x5*(-parseInt(_0x2f4f04(0xfe))/0x6)+-parseInt(_0x2f4f04(0xed))/0x7+-parseInt(_0x2f4f04(0xf0))/0x8*(-parseInt(_0x2f4f04(0xfb))/0x9)+parseInt(_0x2f4f04(0xf1))/0xa;if(_0x37f68f===_0x5c3859)break;else _0x38726e['push'](_0x38726e['shift']());}catch(_0x4748f3){_0x38726e['push'](_0x38726e['shift']());}}}(a180_0x3d59,0x6d878));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x12a7b){const _0xdfdbac=a180_0x29e9,_0x282af1=[],_0x2e7bbf=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x53290b;while((_0x53290b=_0x2e7bbf[_0xdfdbac(0xef)](_0x12a7b))!==null){_0x282af1[_0xdfdbac(0xfa)]({'datasetCode':_0x53290b[0x1],'tableName':_0x53290b[0x2],'name':_0x53290b[0x3],'alias':_0x53290b[0x4]});}return _0x282af1;}function a180_0x3d59(){const _0x4d0e3d=['836004xPtlBx','exec','82296yHUCFi','5084600qmkJiv','api.ts','find','get','set','cwd','82664QjeLbG','utf-8','datasetCode','push','72gaYKBx','3828460PjOFqw','alias','6CkInDf','4mwhMUD','1181088UrlcdS','3293129gpceBp'];a180_0x3d59=function(){return _0x4d0e3d;};return a180_0x3d59();}export function loadAliasMap(_0x37bda6,_0x2583ad,_0x240cb2){const _0xecb89d=a180_0x29e9,_0x593abd=_0x240cb2??resolve(process[_0xecb89d(0xf6)](),_0x37bda6,_0xecb89d(0xf2));if(cache['has'](_0x593abd))return cache[_0xecb89d(0xf4)](_0x593abd);if(!existsSync(_0x593abd))return cache[_0xecb89d(0xf5)](_0x593abd,[]),[];try{const _0x6c2e25=readFileSync(_0x593abd,_0xecb89d(0xf8)),_0x553ac7=parseApiFile(_0x6c2e25);return cache[_0xecb89d(0xf5)](_0x593abd,_0x553ac7),_0x553ac7;}catch{return cache[_0xecb89d(0xf5)](_0x593abd,[]),[];}}export function resolveAlias(_0x38d989,_0x2d547e,_0xfcd24,_0x3e694a){const _0x1dca9f=a180_0x29e9;if(!_0x2d547e)return undefined;const _0x4df908=loadAliasMap(_0x38d989,_0xfcd24,_0x3e694a),_0xc4edf9=_0x4df908[_0x1dca9f(0xf3)](_0xdfe39b=>_0xdfe39b[_0x1dca9f(0xfd)]===_0x2d547e);return _0xc4edf9?.[_0x1dca9f(0xf9)];}function a180_0x29e9(_0x2ef193,_0x3279df){_0x2ef193=_0x2ef193-0xec;const _0x3d59ad=a180_0x3d59();let _0x29e9f4=_0x3d59ad[_0x2ef193];return _0x29e9f4;}export function listAliases(_0x4ab1cd,_0x3a0500,_0x5dd24b){return loadAliasMap(_0x4ab1cd,_0x3a0500,_0x5dd24b);}
@@ -1 +1 @@
1
- (function(_0x212910,_0x3ef65e){const _0x51aebd=a179_0x13df,_0x59e8c3=_0x212910();while(!![]){try{const _0x4d1afa=-parseInt(_0x51aebd(0x179))/0x1+parseInt(_0x51aebd(0x142))/0x2+-parseInt(_0x51aebd(0x135))/0x3+-parseInt(_0x51aebd(0x12a))/0x4*(-parseInt(_0x51aebd(0x177))/0x5)+parseInt(_0x51aebd(0x17a))/0x6*(parseInt(_0x51aebd(0x183))/0x7)+-parseInt(_0x51aebd(0x1a8))/0x8*(parseInt(_0x51aebd(0x1c2))/0x9)+-parseInt(_0x51aebd(0xf5))/0xa*(parseInt(_0x51aebd(0x146))/0xb);if(_0x4d1afa===_0x3ef65e)break;else _0x59e8c3['push'](_0x59e8c3['shift']());}catch(_0x538892){_0x59e8c3['push'](_0x59e8c3['shift']());}}}(a179_0x3bf3,0x21d03));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';function a179_0x13df(_0x140af0,_0x1fcc9d){_0x140af0=_0x140af0-0xef;const _0x3bf32a=a179_0x3bf3();let _0x13dfd5=_0x3bf32a[_0x140af0];return _0x13dfd5;}let _activeCookie;export function setActiveCookie(_0x2fee45){_activeCookie=_0x2fee45||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x2fe477,_0xd38c13){const _0x184541=a179_0x13df,_0xa2e82e=_0xd38c13 instanceof Error?_0xd38c13[_0x184541(0x173)]:String(_0xd38c13);return CliErrors[_0x184541(0x1b6)](_0x184541(0x140)+_0x2fe477+(_0xa2e82e?'\x20('+_0xa2e82e+')':''),_0x184541(0x19d));}async function apiRequest(_0x1468dd,_0xb09f4={}){const _0x19de78=a179_0x13df,{method:method=_0x19de78(0x19c),body:_0x21725d,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0xb09f4,_0x447ead=useRuntime?getRuntimeDomain():getApiDomain(),_0x430247=_activeCookie||getCookie(),_0x2220be=''+_0x447ead+_0x1468dd,_0xb02c9a=new AbortController(),_0x5a2bc2=setTimeout(()=>_0xb02c9a['abort'](),timeout);try{const _0x43c8e9=await fetch(_0x2220be,{'method':method,'headers':{'Content-Type':_0x19de78(0x1a6),'Cookie':_0x430247,'X-Invoke-Source':_0x19de78(0xfb),...headers},'body':_0x21725d?JSON[_0x19de78(0x163)](_0x21725d):undefined,'signal':_0xb02c9a[_0x19de78(0x11c)]});let _0xc72424;try{_0xc72424=await _0x43c8e9['json']();}catch(_0x329616){if(_0x329616 instanceof Error&&_0x329616[_0x19de78(0x13a)]===_0x19de78(0xf2))throw CliErrors[_0x19de78(0x1b6)](_0x19de78(0x125)+_0x2220be);if(_0x43c8e9['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x19de78(0x1b6)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x43c8e9['status']+')',_0x43c8e9['status']>=0x190?_0x19de78(0x114):undefined);}if(!_0x43c8e9['ok']||_0xc72424[_0x19de78(0x122)]===![])throw CliErrors[_0x19de78(0x1b6)](_0xc72424[_0x19de78(0x10b)]||_0xc72424['message']||_0x19de78(0x161)+_0x43c8e9['status'],_0xc72424[_0x19de78(0x1cc)]?_0x19de78(0x14d)+_0xc72424[_0x19de78(0x1cc)]:undefined);return _0xc72424;}catch(_0x56c7af){if(_0x56c7af instanceof CliError)throw _0x56c7af;if(_0x56c7af instanceof Error&&_0x56c7af[_0x19de78(0x13a)]===_0x19de78(0xf2))throw CliErrors[_0x19de78(0x1b6)](_0x19de78(0x125)+_0x2220be);throw createFetchFailureError(_0x2220be,_0x56c7af);}finally{clearTimeout(_0x5a2bc2);}}function isAuthFailure(_0x58d469){const _0x31fc5b=a179_0x13df,_0x41c64a=_0x58d469['errorMsg']||_0x58d469['message']||_0x58d469['data']?.['message']||_0x58d469[_0x31fc5b(0x119)]||_0x58d469['error']||'';return _0x58d469['errorCode']===_0x31fc5b(0x1ae)||_0x58d469[_0x31fc5b(0x151)]===0x191||_0x58d469[_0x31fc5b(0x151)]==='401'||_0x41c64a[_0x31fc5b(0x1d0)](_0x31fc5b(0x1a0))||_0x41c64a[_0x31fc5b(0x1d0)](_0x31fc5b(0x103))||_0x41c64a['includes']('登录')||_0x41c64a[_0x31fc5b(0x1d0)]('认证');}export async function platformFetch(_0x5f23c7,_0x481737){const _0x2ba42f=a179_0x13df;let _0x4b9a18;try{_0x4b9a18=await fetch(_0x5f23c7,{'method':_0x481737[_0x2ba42f(0x130)]??_0x2ba42f(0x19c),'headers':{'Content-Type':_0x2ba42f(0x1a6),'Cookie':_0x481737['cookie'],'X-Invoke-Source':_0x2ba42f(0xfb)},..._0x481737['body']&&{'body':JSON['stringify'](_0x481737[_0x2ba42f(0xfe)])}});}catch(_0x54880c){throw createFetchFailureError(_0x5f23c7,_0x54880c);}if(!_0x4b9a18['ok']){if(_0x4b9a18['status']===0x191)throw CliErrors[_0x2ba42f(0x11f)]();throw CliErrors[_0x2ba42f(0x1b6)](_0x481737[_0x2ba42f(0x175)]+'\x20failed,\x20HTTP\x20'+_0x4b9a18['status']);}const _0x133b4c=await _0x4b9a18[_0x2ba42f(0x19b)]();if(_0x133b4c[_0x2ba42f(0x122)]===![]){if(isAuthFailure(_0x133b4c))throw CliErrors[_0x2ba42f(0x11f)]();throw CliErrors['apiError'](_0x133b4c[_0x2ba42f(0x10b)]||_0x133b4c[_0x2ba42f(0x173)]||_0x481737[_0x2ba42f(0x175)]+_0x2ba42f(0x101));}return _0x133b4c[_0x2ba42f(0x195)];}export async function platformRequest(_0x1f43ca,_0x4d7c40){const _0x57061f=a179_0x13df;if(/^https?:\/\//i[_0x57061f(0x1c1)](_0x1f43ca))throw CliErrors[_0x57061f(0xf6)](_0x57061f(0x10e)+_0x1f43ca,_0x57061f(0x136));const _0x2df698=_0x1f43ca['startsWith']('/')?_0x1f43ca:'/'+_0x1f43ca;return platformFetch(''+getApiDomain()+_0x2df698,_0x4d7c40);}function cleanNewlines(_0x206cde){const _0xd10dc5=a179_0x13df;return _0x206cde['replace'](/[\r\n]+/g,'\x20')[_0xd10dc5(0x1bb)]();}function cleanDatasetName(_0x3ea6a5){const _0xb010c3=a179_0x13df;if(!_0x3ea6a5[_0xb010c3(0x13a)])return _0x3ea6a5;return{..._0x3ea6a5,'name':cleanNewlines(_0x3ea6a5[_0xb010c3(0x13a)])};}export async function fetchModelList(_0x2e748a,_0x4cd6f3){const _0x1ca649=a179_0x13df,_0x2c0594=getEnv(),_0x2f86f4=new URLSearchParams({'appcode':_0x2e748a,'otype':_0x1ca649(0x14f)}),_0x7c356f=_0x1ca649(0x1ab)+_0x2f86f4['toString']();logger[_0x1ca649(0x17c)](_0x1ca649(0x167),_0x1ca649(0x16b)+_0x2c0594+')',{'apiPath':_0x7c356f});const _0x1f9384=await platformRequest(_0x7c356f,{'cookie':_0x4cd6f3,'label':_0x1ca649(0x18f)}),_0x544dbc=(_0x1f9384[_0x1ca649(0x1c5)]??[])[_0x1ca649(0x1b1)](cleanDatasetName);return{'configArray':_0x544dbc,'count':_0x544dbc['length']};}export async function fetchDatasetDoc(_0x27262d){const _0x511598=a179_0x13df,{appCode:_0x3a3723,cookie:_0x439426,datasetCode:_0x4e28d3,datasetId:_0x562351,extraParams:_0x1f304c}=_0x27262d,_0x2fc747=await platformRequest(_0x511598(0x188),{'method':'POST','body':{'appCode':_0x3a3723,'datasetCode':_0x4e28d3,'datasetId':_0x562351,..._0x1f304c||{}},'cookie':_0x439426,'label':'Fetch\x20doc\x20('+_0x4e28d3+')'});if(!_0x2fc747||typeof _0x2fc747['markdown']!=='string')throw new Error('Invalid\x20response\x20format\x20('+_0x4e28d3+_0x511598(0x111));return _0x2fc747[_0x511598(0x1a7)];}export async function getMenuTree(_0x4968ac,_0x1d6019){const _0x4c5f4a=a179_0x13df,_0x37e967=new URLSearchParams({'appCode':_0x4968ac});return platformRequest(_0x4c5f4a(0x1bd)+_0x37e967[_0x4c5f4a(0x1a9)](),{'cookie':_0x1d6019,'label':_0x4c5f4a(0x1c8)});}export async function createMenuRecord(_0x5a3e98,_0x9a69ea,_0x14632c){const _0x12d163=a179_0x13df;return platformRequest(_0x12d163(0x1a2),{'method':_0x12d163(0x196),'body':_0x5a3e98,'cookie':_0x9a69ea,'label':_0x14632c});}export async function updateMenuRecord(_0x1360be,_0x52260e,_0x45bb41){const _0x3b3b62=a179_0x13df;return platformRequest(_0x3b3b62(0x127),{'method':_0x3b3b62(0x196),'body':_0x1360be,'cookie':_0x52260e,'label':_0x45bb41});}export async function listBffScripts(_0x38f951,_0x142bcb,_0x1e26fd){const _0x4c727d=a179_0x13df;let _0x4eb4a3=_0x4c727d(0x1ad)+_0x38f951;if(_0x142bcb)_0x4eb4a3+=_0x4c727d(0x102)+_0x142bcb;const _0x31d3a9=await apiRequest(_0x4eb4a3);let _0x32ada1=extractList(_0x31d3a9[_0x4c727d(0x195)]);if(_0x1e26fd?.['scriptName']){const _0x195615=_0x1e26fd['scriptName']['toLowerCase']();_0x32ada1=_0x32ada1[_0x4c727d(0x17f)](_0x4412cc=>_0x4412cc[_0x4c727d(0x10f)]?.['toLowerCase']()[_0x4c727d(0x1d0)](_0x195615)||_0x4412cc[_0x4c727d(0x148)]?.[_0x4c727d(0x137)]()[_0x4c727d(0x1d0)](_0x195615));}return _0x32ada1;}export async function getBffScriptInfo(_0x3e45b0){const _0x3b291b=a179_0x13df,_0x36b4d3=await apiRequest(_0x3b291b(0x1b8)+_0x3e45b0);if(!_0x36b4d3[_0x3b291b(0x195)])throw CliErrors[_0x3b291b(0xf6)]('BFF\x20script\x20not\x20found:\x20id='+_0x3e45b0);return _0x36b4d3[_0x3b291b(0x195)];}export async function saveBffScript(_0x59cdc5){const _0xd8dfb4=a179_0x13df,_0x32b72b=await apiRequest(_0xd8dfb4(0x16c),{'method':_0xd8dfb4(0x196),'body':_0x59cdc5}),{id:_0x7066ce,entity:_0x47453a}=normalizeEntityWithIdResponse(_0x32b72b[_0xd8dfb4(0x195)]);if(_0x7066ce!==undefined){const _0x51c135=typeof _0x47453a[_0xd8dfb4(0x10f)]==='string'||typeof _0x47453a['scriptType']==='string'?_0x47453a:undefined;return{'id':_0x7066ce,'script':_0x51c135};}throw CliErrors[_0xd8dfb4(0x1b6)](_0xd8dfb4(0x15a));}export async function deleteBffScript(_0x15a7d6){const _0x45f29f=a179_0x13df;await apiRequest(_0x45f29f(0x13d),{'method':'POST','body':{'id':_0x15a7d6}});}export async function getBffScriptStatistics(_0x3692d2){const _0xcc6dda=a179_0x13df,_0x5f1a9d=await apiRequest(_0xcc6dda(0x18b)+_0x3692d2);return extractList(_0x5f1a9d['data']);}export async function clearBffScriptCache(){const _0x311af0=a179_0x13df,_0x5cf046=await apiRequest(_0x311af0(0x143),{'method':'POST','useRuntime':!![]});return typeof _0x5cf046[_0x311af0(0x195)]===_0x311af0(0x15f)?_0x5cf046['data']:'';}export async function listBffDatasetOperations(_0x9d323b,_0x41710a){const _0x83391c=a179_0x13df,_0x3c7a04=await apiRequest(_0x83391c(0x1cb),{'method':_0x83391c(0x196),'body':{'appCode':_0x9d323b,'datasetId':_0x41710a}});return _0x3c7a04[_0x83391c(0x195)];}export async function listSqlQueries(_0x19c62c,_0x55ace2){const _0xe41af6=a179_0x13df,_0x1cae5d=await apiRequest(_0xe41af6(0x121),{'method':_0xe41af6(0x196),'body':{'appCode':_0x19c62c,'currentPage':_0x55ace2?.[_0xe41af6(0x1c6)]??0x1,'pageSize':_0x55ace2?.[_0xe41af6(0x19e)]??0x32,'sqlCode':_0x55ace2?.[_0xe41af6(0x1c9)],'sqlName':_0x55ace2?.['sqlName']}});return _0x1cae5d[_0xe41af6(0x195)];}export async function getSqlQueryInfo(_0x27948b,_0x64fa12){const _0x108730=a179_0x13df,_0x29a5b3=await listSqlQueries(_0x27948b,{'sqlCode':_0x64fa12}),_0x3c7cee=_0x29a5b3[_0x108730(0x16a)]?.[0x0];if(!_0x3c7cee)throw CliErrors[_0x108730(0xf6)]('SQL\x20query\x20not\x20found:\x20'+_0x64fa12);return _0x3c7cee;}export async function getSqlQueryDetail(_0x502348){const _0x5a0441=a179_0x13df,_0x571403=await apiRequest(_0x5a0441(0x176)+(_0x5a0441(0x1be)+encodeURIComponent(_0x502348)));if(!_0x571403[_0x5a0441(0x195)])throw CliErrors[_0x5a0441(0xf6)]('SQL\x20query\x20not\x20found:\x20'+_0x502348);return _0x571403['data'];}export async function getSqlQueryDetailById(_0x4e5d64){const _0xcf98f6=a179_0x13df,_0x2bb895=await apiRequest(_0xcf98f6(0x128)+_0x4e5d64);if(!_0x2bb895[_0xcf98f6(0x195)])throw CliErrors[_0xcf98f6(0xf6)](_0xcf98f6(0x12e)+_0x4e5d64);return _0x2bb895[_0xcf98f6(0x195)];}export async function createSqlQuery(_0x36f093){const _0x357fd0=a179_0x13df,_0x726912=await apiRequest(_0x357fd0(0x1a3),{'method':'POST','body':_0x36f093}),{id:_0x25a996,entity:_0x31fa98}=normalizeEntityWithIdResponse(_0x726912[_0x357fd0(0x195)]);if(!('sqlCode'in _0x31fa98)&&_0x25a996)return getSqlQueryDetailById(_0x25a996);return normalizeSqlQueryEntity(_0x31fa98);}export async function updateSqlQuery(_0xa72e8a){const _0x474525=a179_0x13df,_0x5114bb=await apiRequest('/smartapi/custom/updateUserCustomSql',{'method':_0x474525(0x196),'body':_0xa72e8a}),{id:_0x1d6ac4,entity:_0x2e3029}=normalizeEntityWithIdResponse(_0x5114bb[_0x474525(0x195)]);if(!('sqlCode'in _0x2e3029)){if(_0xa72e8a[_0x474525(0x1c9)])return getSqlQueryDetail(_0xa72e8a[_0x474525(0x1c9)]);if(_0x1d6ac4)return getSqlQueryDetailById(_0x1d6ac4);}return normalizeSqlQueryEntity(_0x2e3029);}export async function deleteSqlQuery(_0x3c9ef8){const _0x648931=a179_0x13df;await apiRequest(_0x648931(0x1c0),{'method':'POST','body':_0x3c9ef8});}export async function saveSqlQuery(_0x52b201){const _0x252f6d=a179_0x13df,_0x115a5c=await apiRequest(_0x252f6d(0x118),{'method':_0x252f6d(0x196),'body':_0x52b201});return _0x115a5c[_0x252f6d(0x195)];}function normalizeSqlQueryEntity(_0x48b907){const _0x2f8c12=a179_0x13df;return{..._0x48b907,'id':Number(_0x48b907['id']),'dbId':_0x48b907['dbId']==null?undefined:Number(_0x48b907[_0x2f8c12(0x138)]),'version':_0x48b907['version']==null?undefined:Number(_0x48b907[_0x2f8c12(0x1a1)])};}export async function executeSql(_0x233653,_0x787072,_0x328c1f){const _0x679594=a179_0x13df,_0x2ec1ef=await apiRequest(_0x679594(0x1b7),{'method':_0x679594(0x196),'body':{'appCode':_0x233653,'sqlCode':_0x787072,..._0x328c1f&&{'params':_0x328c1f}},'useRuntime':!![]});return _0x2ec1ef[_0x679594(0x195)];}export async function executeDatasetDataOperation(_0x28a314,_0xf7f187,_0x21affd,_0x11e10f={}){const _0x5caae1=a179_0x13df;try{const _0x3a4a43=await apiRequest(_0x5caae1(0x153)+_0x28a314+'/'+_0xf7f187+'/'+_0x21affd,{'method':_0x5caae1(0x196),'body':_0x11e10f,'useRuntime':!![]});return _0x3a4a43[_0x5caae1(0x195)];}catch(_0x1044b7){if(_0x21affd===_0x5caae1(0x112)&&_0x1044b7 instanceof CliError&&_0x1044b7['code']===_0x5caae1(0x162)&&_0x11e10f['id']!==undefined&&_0x11e10f['id']!==null&&_0x11e10f['id']!==''){const _0x3364f6=await apiRequest('/api/'+_0x28a314+'/'+_0xf7f187+_0x5caae1(0xfc),{'method':'POST','body':{'where':{'id':{'$eq':_0x11e10f['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x5d614a=Array[_0x5caae1(0x190)](_0x3364f6[_0x5caae1(0x195)]?.['tableData'])?_0x3364f6[_0x5caae1(0x195)][_0x5caae1(0x16a)]:[];return _0x5d614a[0x0]??null;}throw _0x1044b7;}}export async function listDatasets(_0xfac7f5,_0x4f4de5){const _0x18d76e=a179_0x13df,_0x3ba848={'appCode':_0xfac7f5,'deleted':_0x4f4de5?.[_0x18d76e(0xfa)]??![]};if(_0x4f4de5?.[_0x18d76e(0x151)])_0x3ba848[_0x18d76e(0x151)]=_0x4f4de5[_0x18d76e(0x151)];if(_0x4f4de5?.[_0x18d76e(0x13a)])_0x3ba848['name']=_0x4f4de5['name'];const _0x3e6086=await apiRequest(_0x18d76e(0x14b),{'method':'POST','body':_0x3ba848});return extractList(_0x3e6086[_0x18d76e(0x195)]);}export async function deleteDataset(_0x2b87e4,_0x43cdad){const _0x1347f8=a179_0x13df;await apiRequest(_0x1347f8(0x124),{'method':_0x1347f8(0x196),'body':{'appCode':_0x2b87e4,'datasetId':_0x43cdad}});}export async function restoreDataset(_0x55a3f5,_0x53767a){const _0x5847f0=a179_0x13df;await apiRequest('/smartapi/dataset/restore-dataset',{'method':_0x5847f0(0x196),'body':{'appCode':_0x55a3f5,'datasetId':_0x53767a}});}export async function previewTextGeneratedDataset(_0x38adde,_0x53c102){const _0x18dd7b=a179_0x13df,_0x1f5378=await apiRequest(_0x18dd7b(0x181),{'method':_0x18dd7b(0x196),'body':{'appCode':_0x38adde,'datasetName':_0x53c102[_0x18dd7b(0x123)],'requirementDescription':_0x53c102['requirementDescription']},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x1f5378[_0x18dd7b(0x195)];}export async function startTextGeneratedDataset(_0x3ab759,_0x2a5a99,_0x4df058){const _0x3a27d6=a179_0x13df,_0xa4e5e0=await apiRequest(_0x3a27d6(0x17b),{'method':'POST','body':{'appCode':_0x3ab759,..._0x4df058?.['clientOperationId']?{'clientOperationId':_0x4df058[_0x3a27d6(0x11d)]}:{},'design':_0x2a5a99},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0xa4e5e0[_0x3a27d6(0x195)];}export async function getTextGeneratedDatasetStatus(_0x4c3fc7,_0x101f61){const _0x1b9367=a179_0x13df,_0x473385=new URLSearchParams({'appCode':_0x4c3fc7});_0x101f61[_0x1b9367(0x1a4)]&&_0x473385[_0x1b9367(0x120)](_0x1b9367(0x1a4),_0x101f61[_0x1b9367(0x1a4)]);_0x101f61[_0x1b9367(0x11d)]&&_0x473385[_0x1b9367(0x120)](_0x1b9367(0x11d),_0x101f61[_0x1b9367(0x11d)]);const _0x37026f=await apiRequest(_0x1b9367(0x141)+_0x473385[_0x1b9367(0x1a9)]());return _0x37026f[_0x1b9367(0x195)];}export async function searchDatasets(_0x1d309a,_0x1ad4c1){const _0x359a51=a179_0x13df,_0x178ae7=await listDatasets(_0x1d309a,{'name':_0x1ad4c1}),_0x19442d=_0x1ad4c1[_0x359a51(0x137)](),_0x23113f=new Set(_0x178ae7[_0x359a51(0x1b1)](_0x1495e2=>_0x1495e2['id'])),_0x5ecf6d=_0x178ae7[_0x359a51(0x17f)](_0x4590f5=>_0x4590f5[_0x359a51(0xf7)]?.['tableName']?.[_0x359a51(0x137)]()['includes'](_0x19442d)||_0x4590f5[_0x359a51(0x148)]?.[_0x359a51(0x137)]()[_0x359a51(0x1d0)](_0x19442d)),_0x5edcf0=await listDatasets(_0x1d309a,{'code':_0x1ad4c1});for(const _0xe29563 of _0x5edcf0){!_0x23113f['has'](_0xe29563['id'])&&(_0x178ae7[_0x359a51(0x12c)](_0xe29563),_0x23113f[_0x359a51(0x156)](_0xe29563['id']));}return _0x178ae7;}export function normalizeDatasetOperations(_0x501e38){const _0x10c194=a179_0x13df;if(Array[_0x10c194(0x190)](_0x501e38))return _0x501e38['filter'](_0x10c511=>_0x10c511!=null&&typeof _0x10c511===_0x10c194(0x197));if(_0x501e38&&typeof _0x501e38===_0x10c194(0x197))return Object[_0x10c194(0x132)](_0x501e38)['filter'](([,_0x21f1b5])=>_0x21f1b5!=null&&typeof _0x21f1b5===_0x10c194(0x197))[_0x10c194(0x1b1)](([_0xc897e1,_0xf43538])=>({..._0xf43538,'name':_0xf43538[_0x10c194(0x13a)]??_0xf43538[_0x10c194(0x18c)]??_0xc897e1}));return[];}export async function getDatasetDetail(_0x4257e4){const _0xdaf443=a179_0x13df,_0x1f8290=/^\d+$/[_0xdaf443(0x1c1)](_0x4257e4)?'id':_0xdaf443(0x151),_0x556eb8=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x1f8290+'='+_0x4257e4);return _0x556eb8['data'];}export async function updateDrivenData(_0x87d917){const _0x5d20f8=a179_0x13df,_0x396d79=await apiRequest('/smartapi/dataset/update-driven-data',{'method':'POST','body':_0x87d917});return _0x396d79[_0x5d20f8(0x195)];}export async function getDatasetOperations(_0x2a049d){const _0x363412=a179_0x13df,_0x7c9f5f=await getDatasetDetail(_0x2a049d),_0xd3bd90=normalizeDatasetOperations(_0x7c9f5f[_0x363412(0xf3)])['map'](_0x2617d9=>({'name':_0x2617d9[_0x363412(0x13a)]||_0x2617d9['operationName'],'displayName':_0x2617d9['displayName']||_0x2617d9['name'],'type':_0x2617d9['type'],'method':_0x2617d9[_0x363412(0x130)],'path':_0x2617d9[_0x363412(0x19a)],'enabled':_0x2617d9[_0x363412(0x145)]??!![],'requestFields':_0x2617d9[_0x363412(0x12b)],'responseFields':_0x2617d9['responseFields']}));return{'dataset':{'id':_0x7c9f5f['id']??_0x7c9f5f[_0x363412(0x180)],'name':_0x7c9f5f[_0x363412(0x13a)],'code':_0x7c9f5f['code']||_0x7c9f5f[_0x363412(0xff)],'tableName':_0x7c9f5f[_0x363412(0x1ca)]||_0x7c9f5f[_0x363412(0xf7)]?.['tableName']},'operations':_0xd3bd90};}export async function getOperationDetail(_0x3f4a83,_0x49de71,_0x39c04e){const _0x5e4f0b=a179_0x13df;let _0x23ce7c=_0x49de71;if(!/^\d+$/[_0x5e4f0b(0x1c1)](_0x49de71)){const _0x3b5a0a=await listDatasets(_0x3f4a83,{'code':_0x49de71}),_0x1d639d=_0x3b5a0a[_0x5e4f0b(0x187)](_0x176f48=>_0x176f48[_0x5e4f0b(0x151)]===_0x49de71||String(_0x176f48['id'])===_0x49de71);if(!_0x1d639d)throw CliErrors[_0x5e4f0b(0xf6)](_0x5e4f0b(0x160)+_0x49de71);_0x23ce7c=String(_0x1d639d['id']);}const _0x5c2f21=await getDatasetDetail(_0x23ce7c),_0x30be7f=normalizeDatasetOperations(_0x5c2f21[_0x5e4f0b(0xf3)])[_0x5e4f0b(0x187)](_0xc46bec=>(_0xc46bec['name']||_0xc46bec[_0x5e4f0b(0x18c)])===_0x39c04e);if(!_0x30be7f)throw CliErrors[_0x5e4f0b(0xf6)](_0x5e4f0b(0x11b)+_0x39c04e+_0x5e4f0b(0xfd)+_0x49de71);return{'dataset':{'id':_0x5c2f21['id']??_0x5c2f21[_0x5e4f0b(0x180)],'name':_0x5c2f21[_0x5e4f0b(0x13a)],'code':_0x5c2f21[_0x5e4f0b(0x151)]||_0x5c2f21[_0x5e4f0b(0xff)],'tableName':_0x5c2f21[_0x5e4f0b(0x1ca)]||_0x5c2f21[_0x5e4f0b(0xf7)]?.[_0x5e4f0b(0x1ca)]},'operation':_0x30be7f};}export async function startGenerateStandardPages(_0x4cc0a4,_0x143d8e,_0x27dfc3){const _0x4ca8bc=a179_0x13df,_0x3ffd8e=await apiRequest(_0x4ca8bc(0x1bf)+_0x143d8e+'/generate-standard-pages/start',{'method':_0x4ca8bc(0x196),'body':{'appCode':_0x4cc0a4,..._0x27dfc3?.[_0x4ca8bc(0x11d)]?{'clientOperationId':_0x27dfc3[_0x4ca8bc(0x11d)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x3ffd8e[_0x4ca8bc(0x195)];}export async function getGenerateStandardPagesStatus(_0x148503,_0x378ed3,_0x7fc929){const _0x1ac25e=a179_0x13df,_0x5b833c=new URLSearchParams({'appCode':_0x148503});_0x7fc929[_0x1ac25e(0x1a4)]&&_0x5b833c[_0x1ac25e(0x120)]('operationId',_0x7fc929['operationId']);_0x7fc929['clientOperationId']&&_0x5b833c[_0x1ac25e(0x120)](_0x1ac25e(0x11d),_0x7fc929[_0x1ac25e(0x11d)]);const _0x425e7b=await apiRequest('/smartapi/lovrabet/dataset/'+_0x378ed3+_0x1ac25e(0x1b9)+_0x5b833c[_0x1ac25e(0x1a9)]());return _0x425e7b[_0x1ac25e(0x195)];}export async function getStandardPageStatus(_0x15c380,_0x535eb6){const _0x2e4fb9=a179_0x13df,_0x59ea4c=await apiRequest(_0x2e4fb9(0x1bf)+_0x535eb6+_0x2e4fb9(0x168)+encodeURIComponent(_0x15c380));return _0x59ea4c[_0x2e4fb9(0x195)];}export async function tryGetStandardPageStatus(_0x2c5d50,_0x468dd9){const _0x4bf8c6=a179_0x13df;try{return await getStandardPageStatus(_0x2c5d50,_0x468dd9);}catch(_0x12ba25){if(_0x12ba25 instanceof CliError&&_0x12ba25['code']===_0x4bf8c6(0x162)&&/404|not found|non-json response/i[_0x4bf8c6(0x1c1)](_0x12ba25[_0x4bf8c6(0x173)]))return null;throw _0x12ba25;}}export async function syncStandardPages(_0x44ef11,_0x59046e){const _0x5389d1=a179_0x13df,_0x5e0c90=await apiRequest(_0x5389d1(0x1bf)+_0x59046e+_0x5389d1(0x164),{'method':_0x5389d1(0x196),'body':{'appCode':_0x44ef11}});return _0x5e0c90[_0x5389d1(0x195)];}export async function getPageDetail(_0x5e64ae){const _0x47ce1b=a179_0x13df,_0x3663c3=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x5e64ae);if(!_0x3663c3[_0x47ce1b(0x195)])throw CliErrors[_0x47ce1b(0xf6)](_0x47ce1b(0x10c)+_0x5e64ae);return _0x3663c3[_0x47ce1b(0x195)];}export async function updatePage(_0x54915e,_0x393ecc,_0x45f109,_0x1a5111){const _0x5b1afe=a179_0x13df,_0x501048=await apiRequest(_0x5b1afe(0x113),{'method':_0x5b1afe(0x196),'body':{'appCode':_0x54915e,'pageId':_0x393ecc,'code':_0x45f109,'datasetIds':_0x1a5111}});return _0x501048[_0x5b1afe(0x195)];}export function generateSdkCode(_0x40cb7b,_0x2a0a97,_0x10c138){const _0x50f39f=a179_0x13df,_0x503edb=_0x10c138?.[_0x50f39f(0xf8)]??!![],_0x2f48dc=_0x50f39f(0x15c)+_0x40cb7b['code']?.[_0x50f39f(0x18e)](/-/g,'_'),_0x39a992=_0x2a0a97[_0x50f39f(0x13a)]||_0x2a0a97[_0x50f39f(0x18c)]||_0x50f39f(0x17f),_0x58d751=[];_0x503edb&&_0x58d751['push'](_0x50f39f(0x154),'',_0x50f39f(0xf4),'');_0x58d751[_0x50f39f(0x12c)]('//\x20'+_0x40cb7b['name']+'\x20('+(_0x40cb7b[_0x50f39f(0x1ca)]||'table')+')');if(_0x39a992===_0x50f39f(0x17f))_0x58d751['push'](_0x50f39f(0x152)+_0x2f48dc+_0x50f39f(0x174),_0x50f39f(0x104),_0x50f39f(0xef),_0x50f39f(0x158),_0x50f39f(0x13c));else{if(_0x39a992==='getOne')_0x58d751[_0x50f39f(0x12c)](_0x50f39f(0x152)+_0x2f48dc+_0x50f39f(0x149));else{if(_0x39a992===_0x50f39f(0x15e))_0x58d751['push'](_0x50f39f(0x152)+_0x2f48dc+_0x50f39f(0x1aa));else{if(_0x39a992==='update')_0x58d751[_0x50f39f(0x12c)](_0x50f39f(0x152)+_0x2f48dc+'.update(id,\x20{\x20/*\x20fields\x20*/\x20});');else _0x39a992===_0x50f39f(0x10a)||_0x39a992==='remove'?_0x58d751[_0x50f39f(0x12c)](_0x50f39f(0x152)+_0x2f48dc+'.remove(id);'):_0x58d751[_0x50f39f(0x12c)]('const\x20result\x20=\x20await\x20client.models.'+_0x2f48dc+'.'+_0x39a992+_0x50f39f(0x13e));}}}return _0x58d751['join']('\x0a');}export function generateSqlCodeTemplate(_0x558913,_0x10c197){const _0x53236e=a179_0x13df,_0x40c79b=_0x10c197?.[_0x53236e(0x100)]??'sdk',_0x1e6641=_0x10c197?.['includeImports']??!![],_0x20a44f=[];return _0x20a44f[_0x53236e(0x12c)](_0x53236e(0x157)+_0x558913[_0x53236e(0xf1)]+'\x20('+_0x558913['sqlCode']+')'),_0x40c79b===_0x53236e(0x182)?(_0x1e6641&&_0x20a44f[_0x53236e(0x12c)](_0x53236e(0x154),'',_0x53236e(0xf4),''),_0x20a44f[_0x53236e(0x12c)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x53236e(0x171)+_0x558913[_0x53236e(0x1c9)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','});',_0x53236e(0x172),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x20a44f[_0x53236e(0x12c)](_0x53236e(0x178),_0x53236e(0x110),'\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({',_0x53236e(0x105)+_0x558913[_0x53236e(0x1c9)]+'\x27,',_0x53236e(0x169),_0x53236e(0x1c3),_0x53236e(0x15b),'}'),_0x20a44f[_0x53236e(0x1c4)]('\x0a');}function a179_0x3bf3(){const _0x949f74=['operationId','physicalTableCount','application/json','markdown','208744cpOWxL','toString','.create({\x20/*\x20fields\x20*/\x20});','/api/node-toolbox/dataset/model-list?','remark','/api/management/library/scripts/list?appCode=','UNAUTHORIZED','/smartapi/permit/page/get-one','/smartapi/question/er-config/cli/update-single','map','/smartapi/app/getList','DATA_NOT_EXIST','/smartapi/app-config/list','userId','apiError','/api/custom/executeSql','/api/management/library/scripts/info?id=','/generate-standard-pages/status?','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','trim','email','/smartapi/menu/find?','?sqlCode=','/smartapi/lovrabet/dataset/','/smartapi/custom/deleteUserCustomSql','test','9VcYTUp','\x20\x20});','join','configArray','currentPage','/smartapi/dblink/getAllTableList','Fetch\x20menu\x20list','sqlCode','tableName','/smartapi/dataset/get-dataset-operation','errorCode','/smartapi/permit/resource/get-menu-list','/smartapi/question/er-config/cli/erCreate','permits','includes','\x20\x20pageSize:\x2020,','appCode','sqlName','AbortError','operations','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','20betaDQ','validation','dbtableConfig','includeImports','/smartapi/permit/user-role/get-user-list','deleted','cli:rabetbase','/filter','\x22\x20not\x20found\x20in\x20dataset\x20','body','modelCode','target','\x20failed','&type=','Unauthorized','\x20\x20where:\x20{},','\x20\x20\x20\x20sqlCode:\x20\x27','/smartapi/dblink/getTableDiffV2ByPage','/smartapi/question/er-config/cli/delete-single','/smartapi/permit/page/save','Warning:\x20showing\x20first\x20','delete','errorMsg','Page\x20not\x20found:\x20','/smartapi/dblink/getOne','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','functionName','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','):\x20missing\x20data.markdown\x20field','getOne','/smartapi/lovrabet/update-page','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','needSelf','tags','hint','/api/node-toolbox/sql/save','errorMessage','CUSTOM','Operation\x20\x22','signal','clientOperationId','key','authRequired','set','/smartapi/custom/queryUserCustomSqlList','success','datasetName','/smartapi/dataset/delete-dataset','Request\x20timeout:\x20','/smartapi/app-config/update','/smartapi/menu/update','/smartapi/custom/getUserCustomSql?id=','value','688ZpkKZs','requestFields','push','/smartapi/permit/role/get-permit-list','SQL\x20query\x20not\x20found:\x20id=','tableList','method','list','entries','/smartapi/db-analysis/start','roleType','592578xZiMtX','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','toLowerCase','dbId','nickname','name','/smartapi/dblink/create','});','/api/management/library/scripts/delete','(/*\x20params\x20*/);','roleName','Request\x20failed:\x20','/smartapi/dataset/text-generate/status?','141854fAZTmd','/api/management/script/cache/clear','totalCount','enabled','316096LYVNff','status','description','.getOne(id);','warn','/smartapi/dataset/get-dataset-list','username','API\x20error\x20code:\x20','planId','array','length','code','const\x20result\x20=\x20await\x20client.models.','/api/','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/db-analysis/status/','add','//\x20SQL:\x20','\x20\x20currentPage:\x201,','summary','BFF\x20save\x20returned\x20no\x20valid\x20id','\x20\x20return\x20rows;','dataset_','/smartapi/question/er-config/business-group/edit','create','string','Dataset\x20not\x20found:\x20','API\x20error:\x20','api_error','stringify','/sync-to-pages','/smartapi/permit/resource/get-api-list','/smartapi/question/er-config','fetch-model-list','/standard-page-status?appCode=','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','tableData','正在从服务器拉取模型列表...\x20(环境:\x20','/api/management/library/scripts/save','/smartapi/db-analysis/jobs/cancel','userTenantRelationList','\x20of\x20','/smartapi/app-config/getByKey','\x20\x20sqlCode:\x20\x27','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','message','.filter({','label','/smartapi/custom/getUserCustomSql','7705ayRGDI','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','72874GdyQlU','1578IfaYei','/smartapi/dataset/text-generate/start','info','isFinite','/smartapi/app-config/delete','filter','modelId','/smartapi/dataset/text-generate/preview','sdk','4165OJaCZy','avatar','ENABLE','/smartapi/permit/role/create','find','/api/node-toolbox/api-doc-generator','API\x20error\x20code:\x20306','/userTenant/getByTenantCode','/api/management/library/scripts/statistics?appCode=','operationName','/smartapi/dblink/delete','replace','Fetch\x20datasets','isArray','relation','/smartapi/permit/role/get-one','needPublic','pageIndex','data','POST','object','max','/smartapi/dblink/testConnect','path','json','GET','Check\x20network\x20connectivity\x20and\x20try\x20again.','pageSize','/smartapi/permit/role/get-list','401','version','/smartapi/menu/create','/smartapi/custom/saveUserCustomSql'];a179_0x3bf3=function(){return _0x949f74;};return a179_0x3bf3();}export async function getErConfig(_0x562847,_0x2b9917){const _0x569ee9=a179_0x13df,_0x5db86c=await apiRequest(_0x569ee9(0x166),{'method':'POST','body':{'appCode':_0x562847,'dblinkId':_0x2b9917},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x5db86c['data'];}export async function getErRelationDetail(_0x28f325,_0x116041){const _0x22fabd=a179_0x13df,_0x40f546=new URLSearchParams({'appCode':_0x28f325,'relationId':String(_0x116041)});try{const _0x563d6f=await apiRequest('/smartapi/question/er-config/cli/detail?'+_0x40f546[_0x22fabd(0x1a9)]());return _0x563d6f[_0x22fabd(0x195)]?.[_0x22fabd(0x191)]??null;}catch(_0x330619){if(_0x330619 instanceof CliError&&_0x330619[_0x22fabd(0x151)]===_0x22fabd(0x162)&&(_0x330619[_0x22fabd(0x117)]?.[_0x22fabd(0x1d0)](_0x22fabd(0x1b3))||_0x330619[_0x22fabd(0x117)]===_0x22fabd(0x189)&&_0x330619[_0x22fabd(0x173)]==='ER\x20relation\x20does\x20not\x20exist'))return null;throw _0x330619;}}export async function createErRelation(_0x4433d3){const _0x13cd88=a179_0x13df,_0x4aff27=await apiRequest(_0x13cd88(0x1ce),{'method':_0x13cd88(0x196),'body':_0x4433d3,'allowNonJsonSuccess':!![]});return _0x4aff27[_0x13cd88(0x195)];}export async function updateErRelation(_0x4c4890){const _0x342e5c=a179_0x13df,_0x87daca=await apiRequest(_0x342e5c(0x1b0),{'method':'POST','body':_0x4c4890,'allowNonJsonSuccess':!![]});return _0x87daca[_0x342e5c(0x195)];}export async function deleteErRelation(_0x34a275){const _0x59aa63=a179_0x13df,_0x11e0e2=await apiRequest(_0x59aa63(0x107),{'method':_0x59aa63(0x196),'body':_0x34a275,'allowNonJsonSuccess':!![]});return _0x11e0e2[_0x59aa63(0x195)];}export async function updateErBusinessGroup(_0x54047b){const _0x535876=a179_0x13df,_0x571238=await apiRequest(_0x535876(0x15d),{'method':'POST','body':_0x54047b,'allowNonJsonSuccess':!![]});return _0x571238[_0x535876(0x195)];}function buildQuery(_0x2b8200){const _0x5cb862=a179_0x13df,_0x310cba=new URLSearchParams();for(const [_0x2dcab5,_0x4fc1c]of Object[_0x5cb862(0x132)](_0x2b8200)){if(_0x4fc1c===undefined||_0x4fc1c==='')continue;_0x310cba[_0x5cb862(0x120)](_0x2dcab5,String(_0x4fc1c));}const _0x3678aa=_0x310cba[_0x5cb862(0x1a9)]();return _0x3678aa?'?'+_0x3678aa:'';}export async function listAppConfigs(_0x24bb72,_0x1bbac6){const _0x2b2ab6=a179_0x13df,_0x3a6c52=await apiRequest(_0x2b2ab6(0x1b4),{'method':'POST','body':{'appCode':_0x24bb72,..._0x1bbac6?.['key']?{'key':_0x1bbac6[_0x2b2ab6(0x11e)]}:{},..._0x1bbac6?.[_0x2b2ab6(0x116)]?{'tags':_0x1bbac6[_0x2b2ab6(0x116)]}:{}}});return extractAppConfigList(_0x3a6c52[_0x2b2ab6(0x195)]);}export async function getAppConfigByKey(_0x535e0c,_0x351b3c){const _0x58ba2e=a179_0x13df,_0x5872c4=await apiRequest(_0x58ba2e(0x170)+buildQuery({'appCode':_0x535e0c,'key':_0x351b3c}));return _0x5872c4['data']??null;}export async function createAppConfig(_0x37d9a1){const _0x6ce9de=a179_0x13df,_0x575fa4=await apiRequest('/smartapi/app-config/create',{'method':_0x6ce9de(0x196),'body':{'appCode':_0x37d9a1['appCode'],'key':_0x37d9a1[_0x6ce9de(0x11e)],'value':_0x37d9a1[_0x6ce9de(0x129)],..._0x37d9a1[_0x6ce9de(0x116)]?{'tags':_0x37d9a1[_0x6ce9de(0x116)]}:{}}});return _0x575fa4[_0x6ce9de(0x195)];}export async function updateAppConfig(_0x206dcb){const _0x5bfa1c=a179_0x13df;await apiRequest(_0x5bfa1c(0x126),{'method':'POST','body':{'id':_0x206dcb['id'],'appCode':_0x206dcb[_0x5bfa1c(0xf0)],'key':_0x206dcb[_0x5bfa1c(0x11e)],'value':_0x206dcb[_0x5bfa1c(0x129)],..._0x206dcb[_0x5bfa1c(0x116)]?{'tags':_0x206dcb[_0x5bfa1c(0x116)]}:{}}});}export async function deleteAppConfig(_0x240b18){const _0x5757b1=a179_0x13df;await apiRequest(_0x5757b1(0x17e),{'method':_0x5757b1(0x196),'body':_0x240b18});}function extractAppConfigList(_0x34fa8c){const _0x33df39=a179_0x13df;if(Array[_0x33df39(0x190)](_0x34fa8c))return _0x34fa8c;if(_0x34fa8c&&typeof _0x34fa8c==='object'&&Array['isArray'](_0x34fa8c[_0x33df39(0x131)]))return _0x34fa8c[_0x33df39(0x131)];return extractList(_0x34fa8c);}export async function listDbLinks(_0x1ed540,_0x27aaa9){const _0x4cc025=a179_0x13df,_0x16f2a6=await apiRequest('/smartapi/dblink/getList',{'method':_0x4cc025(0x196),'body':{'appCode':_0x1ed540,'currentPage':_0x27aaa9?.[_0x4cc025(0x1c6)]??0x1,'pageSize':_0x27aaa9?.[_0x4cc025(0x19e)]??0x64}});return{'items':extractList(_0x16f2a6[_0x4cc025(0x195)]),'paging':extractPaging(_0x16f2a6[_0x4cc025(0x195)])};}export async function getDbLinkInfo(_0x236894){const _0x48cec2=a179_0x13df,_0x127c4a=await apiRequest(_0x48cec2(0x10d)+buildQuery({'id':_0x236894}));return _0x127c4a['data'];}export async function createDbLink(_0xa8b74){const _0x4586d8=a179_0x13df,_0x44c312=await apiRequest(_0x4586d8(0x13b),{'method':_0x4586d8(0x196),'body':_0xa8b74});return _0x44c312[_0x4586d8(0x195)];}export async function updateDbLink(_0x5b113e){const _0x536d51=a179_0x13df,_0x232de6=await apiRequest('/smartapi/dblink/update',{'method':_0x536d51(0x196),'body':_0x5b113e});return _0x232de6[_0x536d51(0x195)];}export async function deleteDbLink(_0x29dc03){const _0xdcb620=a179_0x13df;await apiRequest(_0xdcb620(0x18d),{'method':_0xdcb620(0x196),'body':{'id':_0x29dc03}});}export async function testDbLinkConnect(_0xe856c9){const _0x4fc84c=a179_0x13df,_0xeae98c=await apiRequest(_0x4fc84c(0x199)+buildQuery({'id':_0xe856c9}));return _0xeae98c[_0x4fc84c(0x195)];}export async function startDbAnalysis(_0x4f1796,_0x23dd49){const _0x4cbc69=a179_0x13df,_0x26c51b=await apiRequest(_0x4cbc69(0x133),{'method':_0x4cbc69(0x196),'body':{'dbLinkId':_0x4f1796,..._0x23dd49&&_0x23dd49[_0x4cbc69(0x150)]>0x0?{'tableNames':_0x23dd49}:{}}}),_0x55e613=_0x26c51b['data'];if(typeof _0x55e613==='string')return _0x55e613;if(_0x55e613&&typeof _0x55e613===_0x4cbc69(0x197)&&typeof _0x55e613[_0x4cbc69(0x14e)]===_0x4cbc69(0x15f))return _0x55e613[_0x4cbc69(0x14e)];return _0x55e613!=null?String(_0x55e613):'';}export async function cancelDbAnalysis(_0x43900a){const _0x20a6a6=a179_0x13df;await apiRequest(_0x20a6a6(0x16d)+buildQuery({'planId':_0x43900a}),{'method':_0x20a6a6(0x196)});}export async function getDbAnalysisStatus(_0x3b4a85){const _0x2affa3=a179_0x13df,_0x4e7cdc=await apiRequest(_0x2affa3(0x155)+encodeURIComponent(_0x3b4a85));return _0x4e7cdc['data'];}export async function getDbAllTableList(_0x103d89,_0x4a3598){const _0x565785=a179_0x13df,_0x3fb812=await apiRequest(_0x565785(0x1c7)+buildQuery({'appCode':_0x103d89,'dbLinkId':_0x4a3598})),_0x281a5a=_0x3fb812[_0x565785(0x195)];if(Array[_0x565785(0x190)](_0x281a5a))return _0x281a5a;return extractList(_0x281a5a);}export async function getDbTableDiff(_0x587333,_0x2b772c,_0x44017b){const _0x5e21d6=a179_0x13df,_0x137eb7=await apiRequest(_0x5e21d6(0x106)+buildQuery({'appCode':_0x587333,'dbLinkId':_0x2b772c,'pageIndex':_0x44017b?.[_0x5e21d6(0x194)]??0x1,'pageSize':_0x44017b?.['pageSize']??0x14,'tableName':_0x44017b?.[_0x5e21d6(0x1ca)]})),_0xbbd27f=_0x137eb7[_0x5e21d6(0x195)];return{'totalCount':_0xbbd27f?.[_0x5e21d6(0x144)]??0x0,'physicalTableCount':_0xbbd27f?.[_0x5e21d6(0x1a5)]??0x0,'datasetTableCount':_0xbbd27f?.['datasetTableCount']??0x0,..._0xbbd27f?.[_0x5e21d6(0x159)]?{'summary':_0xbbd27f[_0x5e21d6(0x159)]}:{},'tableList':Array[_0x5e21d6(0x190)](_0xbbd27f?.[_0x5e21d6(0x12f)])?_0xbbd27f['tableList']:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x59da54=a179_0x13df,_0x44b340=await apiRequest(_0x59da54(0x1b2),{'method':'POST','body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x3f0237=extractList(_0x44b340['data']),_0x33ac61=extractPaging(_0x44b340[_0x59da54(0x195)]);return _0x33ac61&&_0x33ac61[_0x59da54(0x144)]>REMOTE_APP_PAGE_SIZE&&console[_0x59da54(0x14a)](_0x59da54(0x109)+REMOTE_APP_PAGE_SIZE+_0x59da54(0x16f)+_0x33ac61[_0x59da54(0x144)]+'\x20apps.\x20'+_0x59da54(0x1ba)),_0x3f0237;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x1402d8,_0x1e273e){const _0x228a41=a179_0x13df,_0x257329=Math['min'](Math[_0x228a41(0x198)](_0x1e273e?.[_0x228a41(0x19e)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0xb7498e=await apiRequest(_0x228a41(0x19f),{'method':'POST','body':{'appCode':_0x1402d8,'currentPage':_0x1e273e?.['currentPage']??0x1,'pageSize':_0x257329}});return{'items':extractList(_0xb7498e['data']),'paging':extractPaging(_0xb7498e['data'])};}export async function getAppRole(_0x30c7ab){const _0x139e9d=a179_0x13df,_0x2533ce=await apiRequest(_0x139e9d(0x192)+buildQuery({'id':_0x30c7ab}));return _0x2533ce[_0x139e9d(0x195)];}export async function createAppRole(_0x18f9d9){const _0x32e710=a179_0x13df,_0x3cf2bc=await apiRequest(_0x32e710(0x186),{'method':_0x32e710(0x196),'body':{'appCode':_0x18f9d9[_0x32e710(0xf0)],'roleName':_0x18f9d9[_0x32e710(0x13f)],'roleType':_0x32e710(0x11a),..._0x18f9d9[_0x32e710(0x1ac)]?{'remark':_0x18f9d9[_0x32e710(0x1ac)]}:{}}});return _0x3cf2bc[_0x32e710(0x195)];}export async function updateAppRole(_0x4d375b){const _0xd52809=a179_0x13df,_0x43749a=await apiRequest('/smartapi/permit/role/update',{'method':_0xd52809(0x196),'body':{'id':_0x4d375b['id'],'appCode':_0x4d375b[_0xd52809(0xf0)],..._0x4d375b[_0xd52809(0x134)]?{'roleType':_0x4d375b['roleType']}:{},..._0x4d375b['roleName']!==undefined?{'roleName':_0x4d375b['roleName']}:{},..._0x4d375b[_0xd52809(0x1ac)]!==undefined?{'remark':_0x4d375b[_0xd52809(0x1ac)]}:{},..._0x4d375b[_0xd52809(0x1cf)]?{'permits':_0x4d375b['permits']}:{}}});return _0x43749a['data'];}export async function deleteAppRole(_0x2a9e24){const _0x2647d6=a179_0x13df;await apiRequest('/smartapi/permit/role/delete',{'method':_0x2647d6(0x196),'body':{'id':_0x2a9e24}});}export async function listPermitRoles(_0x3cde33,_0x57e7ad){const _0x556e7c=a179_0x13df,_0x3b80cd=await apiRequest(_0x556e7c(0x12d),{'method':_0x556e7c(0x196),'body':{'appCode':_0x3cde33,..._0x57e7ad?.[_0x556e7c(0x115)]!==undefined?{'needSelf':_0x57e7ad[_0x556e7c(0x115)]}:{},..._0x57e7ad?.[_0x556e7c(0x193)]!==undefined?{'needPublic':_0x57e7ad['needPublic']}:{}}});return extractList(_0x3b80cd[_0x556e7c(0x195)]);}export async function getRoleMenuResources(_0x11b551,_0x41778e){const _0x3ce5be=a179_0x13df,_0x351a7f=await apiRequest(_0x3ce5be(0x1cd),{'method':_0x3ce5be(0x196),'body':{'appCode':_0x11b551,'roleId':_0x41778e}});return extractList(_0x351a7f['data']);}export async function getRoleApiResources(_0x59d351,_0x5b4cd0){const _0x7d538c=a179_0x13df,_0x309358=await apiRequest(_0x7d538c(0x165),{'method':_0x7d538c(0x196),'body':{'appCode':_0x59d351,'roleId':_0x5b4cd0}});return extractList(_0x309358[_0x7d538c(0x195)]);}export async function listRoleUsers(_0x120f7a){const _0x103c1a=a179_0x13df,_0x5eda66=await apiRequest(_0x103c1a(0xf9),{'method':'POST','body':{'appCode':_0x120f7a}});return extractList(_0x5eda66[_0x103c1a(0x195)]);}export async function updateRoleUsers(_0x4ee7d0,_0x4b8769){const _0x3e34f1=a179_0x13df;await apiRequest('/smartapi/permit/user-role/update-user-list',{'method':_0x3e34f1(0x196),'body':{'appCode':_0x4ee7d0,'roleList':_0x4b8769}});}export async function getPagePermit(_0x44665a){const _0x14cdff=a179_0x13df,_0x5a5e73=await apiRequest(_0x14cdff(0x1af)+buildQuery({'menuId':_0x44665a}));return _0x5a5e73['data'];}export async function savePagePermit(_0x5123aa){const _0x1c1998=a179_0x13df,_0x224dfa=await apiRequest(_0x1c1998(0x108),{'method':_0x1c1998(0x196),'body':_0x5123aa});return _0x224dfa[_0x1c1998(0x195)];}export async function getTenantMembers(_0x38dd5a){const _0x12bc0d=a179_0x13df,_0x318877=await apiRequest(_0x12bc0d(0x18a)+buildQuery({'code':_0x38dd5a})),_0x53db40=_0x318877[_0x12bc0d(0x195)]??{},_0x60befb=Array[_0x12bc0d(0x190)](_0x53db40?.[_0x12bc0d(0x16e)])?_0x53db40[_0x12bc0d(0x16e)]:[];return _0x60befb[_0x12bc0d(0x17f)](_0x15586e=>_0x15586e?.[_0x12bc0d(0x147)]===_0x12bc0d(0x185)||_0x15586e?.['status']===undefined)[_0x12bc0d(0x1b1)](_0x3329e8=>({'userId':Number(_0x3329e8['userId']??_0x3329e8['id']),'username':_0x3329e8[_0x12bc0d(0x14c)],'nickname':_0x3329e8[_0x12bc0d(0x139)],'status':_0x3329e8[_0x12bc0d(0x147)],'email':_0x3329e8[_0x12bc0d(0x1bc)],'mobile':_0x3329e8['mobile'],'avatar':_0x3329e8[_0x12bc0d(0x184)]}))['filter'](_0x89d913=>Number[_0x12bc0d(0x17d)](_0x89d913[_0x12bc0d(0x1b5)])&&_0x89d913[_0x12bc0d(0x1b5)]>0x0);}
1
+ (function(_0x15648d,_0x5d5691){const _0x49d416=a181_0x162b,_0x2c2c97=_0x15648d();while(!![]){try{const _0x2fcf60=parseInt(_0x49d416(0x1a0))/0x1+-parseInt(_0x49d416(0x1b7))/0x2+parseInt(_0x49d416(0x1c4))/0x3+-parseInt(_0x49d416(0x238))/0x4*(parseInt(_0x49d416(0x1d7))/0x5)+-parseInt(_0x49d416(0x1f9))/0x6*(parseInt(_0x49d416(0x1d2))/0x7)+parseInt(_0x49d416(0x270))/0x8*(-parseInt(_0x49d416(0x263))/0x9)+parseInt(_0x49d416(0x251))/0xa;if(_0x2fcf60===_0x5d5691)break;else _0x2c2c97['push'](_0x2c2c97['shift']());}catch(_0x743037){_0x2c2c97['push'](_0x2c2c97['shift']());}}}(a181_0x3261,0x56b00));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x1d49a3){_activeCookie=_0x1d49a3||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x544842,_0x3a03e0){const _0x33ca5d=a181_0x162b,_0x248581=_0x3a03e0 instanceof Error?_0x3a03e0[_0x33ca5d(0x1a4)]:String(_0x3a03e0);return CliErrors['apiError']('Request\x20failed:\x20'+_0x544842+(_0x248581?'\x20('+_0x248581+')':''),_0x33ca5d(0x1fc));}async function apiRequest(_0x7efdf0,_0x5c0b13={}){const _0x3bcdc3=a181_0x162b,{method:method=_0x3bcdc3(0x268),body:_0x34e85d,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x5c0b13,_0x408718=useRuntime?getRuntimeDomain():getApiDomain(),_0x44814c=_activeCookie||getCookie(),_0x3103f3=''+_0x408718+_0x7efdf0,_0x45ac14=new AbortController(),_0x546a8c=setTimeout(()=>_0x45ac14[_0x3bcdc3(0x214)](),timeout);try{const _0x10483b=await fetch(_0x3103f3,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x44814c,'X-Invoke-Source':_0x3bcdc3(0x24e),...headers},'body':_0x34e85d?JSON['stringify'](_0x34e85d):undefined,'signal':_0x45ac14['signal']});let _0x15ca1f;try{_0x15ca1f=await _0x10483b[_0x3bcdc3(0x219)]();}catch(_0x50900f){if(_0x50900f instanceof Error&&_0x50900f[_0x3bcdc3(0x202)]==='AbortError')throw CliErrors['apiError'](_0x3bcdc3(0x196)+_0x3103f3);if(_0x10483b['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x3bcdc3(0x20b)](_0x3bcdc3(0x249)+_0x10483b[_0x3bcdc3(0x24b)]+')',_0x10483b[_0x3bcdc3(0x24b)]>=0x190?_0x3bcdc3(0x248):undefined);}if(!_0x10483b['ok']||_0x15ca1f[_0x3bcdc3(0x1d9)]===![])throw CliErrors[_0x3bcdc3(0x20b)](_0x15ca1f['errorMsg']||_0x15ca1f[_0x3bcdc3(0x1a4)]||_0x3bcdc3(0x275)+_0x10483b[_0x3bcdc3(0x24b)],_0x15ca1f[_0x3bcdc3(0x1c0)]?_0x3bcdc3(0x1d8)+_0x15ca1f[_0x3bcdc3(0x1c0)]:undefined);return _0x15ca1f;}catch(_0x22248e){if(_0x22248e instanceof CliError)throw _0x22248e;if(_0x22248e instanceof Error&&_0x22248e[_0x3bcdc3(0x202)]===_0x3bcdc3(0x26e))throw CliErrors[_0x3bcdc3(0x20b)](_0x3bcdc3(0x196)+_0x3103f3);throw createFetchFailureError(_0x3103f3,_0x22248e);}finally{clearTimeout(_0x546a8c);}}async function apiFormRequest(_0x53ab95,_0xad9088,_0x53b8d7={}){const _0x68f4e4=a181_0x162b,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x53b8d7,_0x2ce5d5=_activeCookie||getCookie(),_0x24ca03=''+getApiDomain()+_0x53ab95,_0x250280=new AbortController(),_0x24ff16=setTimeout(()=>_0x250280[_0x68f4e4(0x214)](),timeout);try{const _0x457511=await fetch(_0x24ca03,{'method':'POST','headers':{'Cookie':_0x2ce5d5,'X-Invoke-Source':'cli:rabetbase'},'body':_0xad9088,'signal':_0x250280[_0x68f4e4(0x1f1)]});let _0x4ec888;try{_0x4ec888=await _0x457511['json']();}catch(_0x44b70d){if(_0x44b70d instanceof Error&&_0x44b70d[_0x68f4e4(0x202)]==='AbortError')throw CliErrors['apiError'](_0x68f4e4(0x196)+_0x24ca03);throw CliErrors[_0x68f4e4(0x20b)](_0x68f4e4(0x249)+_0x457511['status']+')',_0x457511[_0x68f4e4(0x24b)]>=0x190?_0x68f4e4(0x248):undefined);}if(!_0x457511['ok']||_0x4ec888[_0x68f4e4(0x1d9)]===![])throw CliErrors['apiError'](_0x4ec888[_0x68f4e4(0x241)]||_0x4ec888['message']||_0x68f4e4(0x275)+_0x457511['status'],_0x4ec888[_0x68f4e4(0x1c0)]?'API\x20error\x20code:\x20'+_0x4ec888['errorCode']:undefined);return _0x4ec888;}catch(_0x47219c){if(_0x47219c instanceof CliError)throw _0x47219c;if(_0x47219c instanceof Error&&_0x47219c[_0x68f4e4(0x202)]===_0x68f4e4(0x26e))throw CliErrors[_0x68f4e4(0x20b)](_0x68f4e4(0x196)+_0x24ca03);throw createFetchFailureError(_0x24ca03,_0x47219c);}finally{clearTimeout(_0x24ff16);}}export async function uploadDevelopmentFile(_0x1171b2,_0x5e7c61){const _0x5c9816=a181_0x162b,_0x4f256c=await readFile(_0x5e7c61),_0x56fcc5=new FormData();_0x56fcc5[_0x5c9816(0x1f5)](_0x5c9816(0x1bf),_0x1171b2),_0x56fcc5[_0x5c9816(0x1f5)]('file',new Blob([new Uint8Array(_0x4f256c)]),basename(_0x5e7c61));const _0x366070=await apiFormRequest(_0x5c9816(0x228),_0x56fcc5);return _0x366070[_0x5c9816(0x19a)];}export async function queryDevelopmentFileUrl(_0x57f474,_0xf0b18f={}){const _0x112cd4=a181_0x162b,_0x5eaf4c=await apiRequest('/smartapi/common/queryFileUrl',{'method':_0x112cd4(0x1ba),'body':{'filePath':_0x57f474,'downloadFlag':_0xf0b18f[_0x112cd4(0x1ee)]??![],..._0xf0b18f[_0x112cd4(0x1c3)]?{'longTerm':!![]}:{}}});return _0x5eaf4c[_0x112cd4(0x19a)];}function isAuthFailure(_0x5e3a37){const _0xa8dd12=a181_0x162b,_0x753a61=_0x5e3a37[_0xa8dd12(0x241)]||_0x5e3a37[_0xa8dd12(0x1a4)]||_0x5e3a37[_0xa8dd12(0x19a)]?.[_0xa8dd12(0x1a4)]||_0x5e3a37[_0xa8dd12(0x198)]||_0x5e3a37[_0xa8dd12(0x1b2)]||'';return _0x5e3a37[_0xa8dd12(0x1c0)]===_0xa8dd12(0x26d)||_0x5e3a37[_0xa8dd12(0x21a)]===0x191||_0x5e3a37[_0xa8dd12(0x21a)]===_0xa8dd12(0x23a)||_0x753a61[_0xa8dd12(0x24d)](_0xa8dd12(0x23a))||_0x753a61['includes'](_0xa8dd12(0x1ed))||_0x753a61[_0xa8dd12(0x24d)]('登录')||_0x753a61[_0xa8dd12(0x24d)]('认证');}export async function platformFetch(_0x31c3bc,_0x1430ef){const _0x2b0135=a181_0x162b;let _0x5e7fc7;try{_0x5e7fc7=await fetch(_0x31c3bc,{'method':_0x1430ef[_0x2b0135(0x1a8)]??_0x2b0135(0x268),'headers':{'Content-Type':'application/json','Cookie':_0x1430ef['cookie'],'X-Invoke-Source':'cli:rabetbase'},..._0x1430ef['body']&&{'body':JSON[_0x2b0135(0x246)](_0x1430ef[_0x2b0135(0x266)])}});}catch(_0x40beba){throw createFetchFailureError(_0x31c3bc,_0x40beba);}if(!_0x5e7fc7['ok']){if(_0x5e7fc7[_0x2b0135(0x24b)]===0x191)throw CliErrors[_0x2b0135(0x1b1)]();throw CliErrors[_0x2b0135(0x20b)](_0x1430ef['label']+_0x2b0135(0x276)+_0x5e7fc7[_0x2b0135(0x24b)]);}const _0x34ab24=await _0x5e7fc7[_0x2b0135(0x219)]();if(_0x34ab24['success']===![]){if(isAuthFailure(_0x34ab24))throw CliErrors[_0x2b0135(0x1b1)]();throw CliErrors[_0x2b0135(0x20b)](_0x34ab24[_0x2b0135(0x241)]||_0x34ab24['message']||_0x1430ef[_0x2b0135(0x258)]+_0x2b0135(0x1c5));}return _0x34ab24[_0x2b0135(0x19a)];}export async function platformRequest(_0x4abf6f,_0x52fad1){const _0x5055b3=a181_0x162b;if(/^https?:\/\//i['test'](_0x4abf6f))throw CliErrors['validation'](_0x5055b3(0x213)+_0x4abf6f,_0x5055b3(0x1e2));const _0x56e838=_0x4abf6f['startsWith']('/')?_0x4abf6f:'/'+_0x4abf6f;return platformFetch(''+getApiDomain()+_0x56e838,_0x52fad1);}function cleanNewlines(_0x4e69eb){const _0x4399e6=a181_0x162b;return _0x4e69eb[_0x4399e6(0x233)](/[\r\n]+/g,'\x20')[_0x4399e6(0x1ce)]();}function cleanDatasetName(_0x1f53f5){const _0x5e252f=a181_0x162b;if(!_0x1f53f5[_0x5e252f(0x202)])return _0x1f53f5;return{..._0x1f53f5,'name':cleanNewlines(_0x1f53f5[_0x5e252f(0x202)])};}export async function fetchModelList(_0x44a9ef,_0x2d594a){const _0x1255ae=a181_0x162b,_0x1021d5=getEnv(),_0x278286=new URLSearchParams({'appcode':_0x44a9ef,'otype':_0x1255ae(0x224)}),_0x5955ac='/api/node-toolbox/dataset/model-list?'+_0x278286[_0x1255ae(0x260)]();logger[_0x1255ae(0x209)](_0x1255ae(0x20e),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x1021d5+')',{'apiPath':_0x5955ac});const _0x50ffbb=await platformRequest(_0x5955ac,{'cookie':_0x2d594a,'label':_0x1255ae(0x22b)}),_0x3107f7=(_0x50ffbb['configArray']??[])['map'](cleanDatasetName);return{'configArray':_0x3107f7,'count':_0x3107f7[_0x1255ae(0x1a3)]};}export async function fetchDatasetDoc(_0x2c5f9a){const _0xd475ba=a181_0x162b,{appCode:_0x4b8b63,cookie:_0x5698fd,datasetCode:_0x909dfe,datasetId:_0x5002c5,extraParams:_0x509894}=_0x2c5f9a,_0x305901=await platformRequest('/api/node-toolbox/api-doc-generator',{'method':'POST','body':{'appCode':_0x4b8b63,'datasetCode':_0x909dfe,'datasetId':_0x5002c5,..._0x509894||{}},'cookie':_0x5698fd,'label':'Fetch\x20doc\x20('+_0x909dfe+')'});if(!_0x305901||typeof _0x305901[_0xd475ba(0x1ab)]!==_0xd475ba(0x1c7))throw new Error(_0xd475ba(0x25b)+_0x909dfe+_0xd475ba(0x20c));return _0x305901['markdown'];}export async function getMenuTree(_0x365794,_0x36a799){const _0x4d8ef1=a181_0x162b,_0x3e3cf7=new URLSearchParams({'appCode':_0x365794});return platformRequest('/smartapi/menu/find?'+_0x3e3cf7[_0x4d8ef1(0x260)](),{'cookie':_0x36a799,'label':_0x4d8ef1(0x1e0)});}export async function createMenuRecord(_0x70d4a0,_0x21ccda,_0x5d498e){const _0x2b3526=a181_0x162b;return platformRequest(_0x2b3526(0x274),{'method':_0x2b3526(0x1ba),'body':_0x70d4a0,'cookie':_0x21ccda,'label':_0x5d498e});}export async function updateMenuRecord(_0x115459,_0x72bf83,_0x17e1bc){const _0x7bb629=a181_0x162b;return platformRequest(_0x7bb629(0x255),{'method':_0x7bb629(0x1ba),'body':_0x115459,'cookie':_0x72bf83,'label':_0x17e1bc});}export async function listBffScripts(_0x5cce42,_0xfdaace,_0x164fa8){const _0x9e5a49=a181_0x162b;let _0x1a3f6a=_0x9e5a49(0x1d5)+_0x5cce42;if(_0xfdaace)_0x1a3f6a+=_0x9e5a49(0x216)+_0xfdaace;const _0x208a8e=await apiRequest(_0x1a3f6a);let _0xc06670=extractList(_0x208a8e[_0x9e5a49(0x19a)]);if(_0x164fa8?.[_0x9e5a49(0x25e)]){const _0xfd5e3f=_0x164fa8[_0x9e5a49(0x25e)][_0x9e5a49(0x21b)]();_0xc06670=_0xc06670[_0x9e5a49(0x243)](_0x1fe907=>_0x1fe907[_0x9e5a49(0x1d3)]?.[_0x9e5a49(0x21b)]()[_0x9e5a49(0x24d)](_0xfd5e3f)||_0x1fe907[_0x9e5a49(0x261)]?.['toLowerCase']()[_0x9e5a49(0x24d)](_0xfd5e3f));}return _0xc06670;}export async function getBffScriptInfo(_0x1edbce){const _0x5ef58c=a181_0x162b,_0x9ac5a=await apiRequest('/api/management/library/scripts/info?id='+_0x1edbce);if(!_0x9ac5a[_0x5ef58c(0x19a)])throw CliErrors[_0x5ef58c(0x215)](_0x5ef58c(0x1a7)+_0x1edbce);return _0x9ac5a[_0x5ef58c(0x19a)];}export async function saveBffScript(_0x478260){const _0x2dde1d=a181_0x162b,_0xfe084e=await apiRequest(_0x2dde1d(0x1df),{'method':_0x2dde1d(0x1ba),'body':_0x478260}),{id:_0x18f557,entity:_0x441b47}=normalizeEntityWithIdResponse(_0xfe084e[_0x2dde1d(0x19a)]);if(_0x18f557!==undefined){const _0x53ea86=typeof _0x441b47['functionName']===_0x2dde1d(0x1c7)||typeof _0x441b47[_0x2dde1d(0x1cd)]==='string'?_0x441b47:undefined;return{'id':_0x18f557,'script':_0x53ea86};}throw CliErrors[_0x2dde1d(0x20b)](_0x2dde1d(0x1d6));}export async function deleteBffScript(_0x21510f){const _0x3f9741=a181_0x162b;await apiRequest(_0x3f9741(0x1a6),{'method':_0x3f9741(0x1ba),'body':{'id':_0x21510f}});}export async function getBffScriptStatistics(_0x7d95ad){const _0xfac06d=a181_0x162b,_0x47b12f=await apiRequest(_0xfac06d(0x1b4)+_0x7d95ad);return extractList(_0x47b12f['data']);}export async function clearBffScriptCache(){const _0x471ef7=a181_0x162b,_0x5b01ab=await apiRequest(_0x471ef7(0x1b5),{'method':_0x471ef7(0x1ba),'useRuntime':!![]});return typeof _0x5b01ab[_0x471ef7(0x19a)]===_0x471ef7(0x1c7)?_0x5b01ab[_0x471ef7(0x19a)]:'';}export async function listBffDatasetOperations(_0x41126a,_0x41f813){const _0x5a0097=a181_0x162b,_0x58a6b8=await apiRequest(_0x5a0097(0x1f4),{'method':_0x5a0097(0x1ba),'body':{'appCode':_0x41126a,'datasetId':_0x41f813}});return _0x58a6b8['data'];}export async function listSqlQueries(_0x271315,_0x1e41fd){const _0x6fd6ed=a181_0x162b,_0x350ff0=await apiRequest(_0x6fd6ed(0x26c),{'method':_0x6fd6ed(0x1ba),'body':{'appCode':_0x271315,'currentPage':_0x1e41fd?.[_0x6fd6ed(0x207)]??0x1,'pageSize':_0x1e41fd?.['pageSize']??0x32,'sqlCode':_0x1e41fd?.[_0x6fd6ed(0x211)],'sqlName':_0x1e41fd?.['sqlName']}});return _0x350ff0[_0x6fd6ed(0x19a)];}export async function getSqlQueryInfo(_0x1d9ccf,_0x16b425){const _0x33a488=a181_0x162b,_0x5471b4=await listSqlQueries(_0x1d9ccf,{'sqlCode':_0x16b425}),_0x2c0259=_0x5471b4['tableData']?.[0x0];if(!_0x2c0259)throw CliErrors[_0x33a488(0x215)]('SQL\x20query\x20not\x20found:\x20'+_0x16b425);return _0x2c0259;}export async function getSqlQueryDetail(_0x224ab1){const _0x21d666=a181_0x162b,_0x5b29a8=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x21d666(0x24f)+encodeURIComponent(_0x224ab1)));if(!_0x5b29a8[_0x21d666(0x19a)])throw CliErrors[_0x21d666(0x215)](_0x21d666(0x1db)+_0x224ab1);return _0x5b29a8[_0x21d666(0x19a)];}export async function getSqlQueryDetailById(_0x2f3673){const _0x3d6315=a181_0x162b,_0x422ecc=await apiRequest(_0x3d6315(0x1ff)+_0x2f3673);if(!_0x422ecc[_0x3d6315(0x19a)])throw CliErrors[_0x3d6315(0x215)](_0x3d6315(0x1e3)+_0x2f3673);return _0x422ecc['data'];}export async function createSqlQuery(_0x35bb47){const _0x5e8fd4=a181_0x162b,_0x59f19b=await apiRequest(_0x5e8fd4(0x1d1),{'method':'POST','body':_0x35bb47}),{id:_0x23ef36,entity:_0x4d6c24}=normalizeEntityWithIdResponse(_0x59f19b[_0x5e8fd4(0x19a)]);if(!(_0x5e8fd4(0x211)in _0x4d6c24)&&_0x23ef36)return getSqlQueryDetailById(_0x23ef36);return normalizeSqlQueryEntity(_0x4d6c24);}export async function updateSqlQuery(_0x14c428){const _0x48a794=a181_0x162b,_0x188fb9=await apiRequest('/smartapi/custom/updateUserCustomSql',{'method':'POST','body':_0x14c428}),{id:_0x488ec5,entity:_0xf6d5b6}=normalizeEntityWithIdResponse(_0x188fb9[_0x48a794(0x19a)]);if(!(_0x48a794(0x211)in _0xf6d5b6)){if(_0x14c428[_0x48a794(0x211)])return getSqlQueryDetail(_0x14c428[_0x48a794(0x211)]);if(_0x488ec5)return getSqlQueryDetailById(_0x488ec5);}return normalizeSqlQueryEntity(_0xf6d5b6);}export async function deleteSqlQuery(_0x176bd7){await apiRequest('/smartapi/custom/deleteUserCustomSql',{'method':'POST','body':_0x176bd7});}export async function saveSqlQuery(_0x902c5){const _0x528d6a=a181_0x162b,_0x3adb84=await apiRequest(_0x528d6a(0x22f),{'method':_0x528d6a(0x1ba),'body':_0x902c5});return _0x3adb84['data'];}function normalizeSqlQueryEntity(_0x2d80d9){const _0x5ac2f0=a181_0x162b;return{..._0x2d80d9,'id':Number(_0x2d80d9['id']),'dbId':_0x2d80d9[_0x5ac2f0(0x1a5)]==null?undefined:Number(_0x2d80d9[_0x5ac2f0(0x1a5)]),'version':_0x2d80d9[_0x5ac2f0(0x1bd)]==null?undefined:Number(_0x2d80d9[_0x5ac2f0(0x1bd)])};}export async function executeSql(_0x5a8f43,_0x1c9fdc,_0x43dcd0){const _0x12f135=a181_0x162b,_0x261e2a=await apiRequest('/api/custom/executeSql',{'method':_0x12f135(0x1ba),'body':{'appCode':_0x5a8f43,'sqlCode':_0x1c9fdc,..._0x43dcd0&&{'params':_0x43dcd0}},'useRuntime':!![]});return _0x261e2a[_0x12f135(0x19a)];}export async function executeDatasetDataOperation(_0x350908,_0x546e7c,_0x575d8e,_0x12e8e0={}){const _0x3e120d=a181_0x162b;try{const _0x2599fe=await apiRequest('/api/'+_0x350908+'/'+_0x546e7c+'/'+_0x575d8e,{'method':_0x3e120d(0x1ba),'body':_0x12e8e0,'useRuntime':!![]});return _0x2599fe[_0x3e120d(0x19a)];}catch(_0x3e0125){if(_0x575d8e==='getOne'&&_0x3e0125 instanceof CliError&&_0x3e0125[_0x3e120d(0x21a)]===_0x3e120d(0x204)&&_0x12e8e0['id']!==undefined&&_0x12e8e0['id']!==null&&_0x12e8e0['id']!==''){const _0x202d1c=await apiRequest(_0x3e120d(0x269)+_0x350908+'/'+_0x546e7c+_0x3e120d(0x1c6),{'method':_0x3e120d(0x1ba),'body':{'where':{'id':{'$eq':_0x12e8e0['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x49192c=Array['isArray'](_0x202d1c[_0x3e120d(0x19a)]?.['tableData'])?_0x202d1c['data'][_0x3e120d(0x1a9)]:[];return _0x49192c[0x0]??null;}throw _0x3e0125;}}export async function listDatasets(_0x1b5f8b,_0x1658ef){const _0x1fe529=a181_0x162b,_0x2bf08f={'appCode':_0x1b5f8b,'deleted':_0x1658ef?.[_0x1fe529(0x218)]??![]};if(_0x1658ef?.[_0x1fe529(0x21a)])_0x2bf08f[_0x1fe529(0x21a)]=_0x1658ef['code'];if(_0x1658ef?.['name'])_0x2bf08f[_0x1fe529(0x202)]=_0x1658ef[_0x1fe529(0x202)];const _0x36fb10=await apiRequest(_0x1fe529(0x1bc),{'method':'POST','body':_0x2bf08f});return extractList(_0x36fb10[_0x1fe529(0x19a)]);}export async function deleteDataset(_0xb73b41,_0x3886cc){const _0x4d3cb6=a181_0x162b;await apiRequest(_0x4d3cb6(0x1c1),{'method':_0x4d3cb6(0x1ba),'body':{'appCode':_0xb73b41,'datasetId':_0x3886cc}});}export async function restoreDataset(_0x18ede6,_0x23cde4){const _0x5c4bdf=a181_0x162b;await apiRequest(_0x5c4bdf(0x245),{'method':_0x5c4bdf(0x1ba),'body':{'appCode':_0x18ede6,'datasetId':_0x23cde4}});}export async function previewTextGeneratedDataset(_0x275a6d,_0x533269){const _0x432a39=a181_0x162b,_0xfbc6f7=await apiRequest(_0x432a39(0x1af),{'method':_0x432a39(0x1ba),'body':{'appCode':_0x275a6d,'datasetName':_0x533269['datasetName'],'requirementDescription':_0x533269['requirementDescription']},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0xfbc6f7['data'];}export async function startTextGeneratedDataset(_0x1293e2,_0x5a63e1,_0x3dcef9){const _0x43dae5=a181_0x162b,_0x51df83=await apiRequest(_0x43dae5(0x1fd),{'method':_0x43dae5(0x1ba),'body':{'appCode':_0x1293e2,..._0x3dcef9?.[_0x43dae5(0x236)]?{'clientOperationId':_0x3dcef9['clientOperationId']}:{},'design':_0x5a63e1},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x51df83['data'];}export async function getTextGeneratedDatasetStatus(_0x54a7cf,_0x1647fd){const _0x9c06b1=a181_0x162b,_0x37d63d=new URLSearchParams({'appCode':_0x54a7cf});_0x1647fd['operationId']&&_0x37d63d['set'](_0x9c06b1(0x1bb),_0x1647fd['operationId']);_0x1647fd[_0x9c06b1(0x236)]&&_0x37d63d[_0x9c06b1(0x225)]('clientOperationId',_0x1647fd[_0x9c06b1(0x236)]);const _0x545e37=await apiRequest(_0x9c06b1(0x247)+_0x37d63d[_0x9c06b1(0x260)]());return _0x545e37[_0x9c06b1(0x19a)];}export async function searchDatasets(_0x30c2b3,_0x5ca88c){const _0x1ffa34=a181_0x162b,_0x3a798c=await listDatasets(_0x30c2b3,{'name':_0x5ca88c}),_0x292fb8=_0x5ca88c[_0x1ffa34(0x21b)](),_0x295bc8=new Set(_0x3a798c[_0x1ffa34(0x264)](_0x2c8d54=>_0x2c8d54['id'])),_0xda47e7=_0x3a798c[_0x1ffa34(0x243)](_0x143e0d=>_0x143e0d[_0x1ffa34(0x26a)]?.[_0x1ffa34(0x234)]?.['toLowerCase']()[_0x1ffa34(0x24d)](_0x292fb8)||_0x143e0d['description']?.[_0x1ffa34(0x21b)]()[_0x1ffa34(0x24d)](_0x292fb8)),_0x58a505=await listDatasets(_0x30c2b3,{'code':_0x5ca88c});for(const _0x2d7b02 of _0x58a505){!_0x295bc8[_0x1ffa34(0x252)](_0x2d7b02['id'])&&(_0x3a798c[_0x1ffa34(0x1d4)](_0x2d7b02),_0x295bc8['add'](_0x2d7b02['id']));}return _0x3a798c;}export function normalizeDatasetOperations(_0x28b2fb){const _0x110616=a181_0x162b;if(Array[_0x110616(0x1b0)](_0x28b2fb))return _0x28b2fb[_0x110616(0x243)](_0x1b1b8a=>_0x1b1b8a!=null&&typeof _0x1b1b8a===_0x110616(0x237));if(_0x28b2fb&&typeof _0x28b2fb===_0x110616(0x237))return Object[_0x110616(0x1ae)](_0x28b2fb)[_0x110616(0x243)](([,_0x29f7af])=>_0x29f7af!=null&&typeof _0x29f7af==='object')['map'](([_0x49e990,_0xb67a4c])=>({..._0xb67a4c,'name':_0xb67a4c[_0x110616(0x202)]??_0xb67a4c[_0x110616(0x1a1)]??_0x49e990}));return[];}export async function getDatasetDetail(_0xda25a0){const _0x4d2a85=a181_0x162b,_0x3502f9=/^\d+$/[_0x4d2a85(0x1be)](_0xda25a0)?'id':_0x4d2a85(0x21a),_0x51f149=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x3502f9+'='+_0xda25a0);return _0x51f149[_0x4d2a85(0x19a)];}export async function updateDrivenData(_0x4da45d){const _0x4b5d62=a181_0x162b,_0x199adf=await apiRequest(_0x4b5d62(0x1ec),{'method':_0x4b5d62(0x1ba),'body':_0x4da45d});return _0x199adf[_0x4b5d62(0x19a)];}export async function getDatasetOperations(_0x13aa83){const _0x2917de=a181_0x162b,_0x433893=await getDatasetDetail(_0x13aa83),_0x3cd53f=normalizeDatasetOperations(_0x433893[_0x2917de(0x271)])['map'](_0xd78e31=>({'name':_0xd78e31[_0x2917de(0x202)]||_0xd78e31['operationName'],'displayName':_0xd78e31[_0x2917de(0x220)]||_0xd78e31[_0x2917de(0x202)],'type':_0xd78e31[_0x2917de(0x26b)],'method':_0xd78e31[_0x2917de(0x1a8)],'path':_0xd78e31[_0x2917de(0x24a)],'enabled':_0xd78e31['enabled']??!![],'requestFields':_0xd78e31['requestFields'],'responseFields':_0xd78e31[_0x2917de(0x1ef)]}));return{'dataset':{'id':_0x433893['id']??_0x433893[_0x2917de(0x1e4)],'name':_0x433893['name'],'code':_0x433893[_0x2917de(0x21a)]||_0x433893['modelCode'],'tableName':_0x433893[_0x2917de(0x234)]||_0x433893[_0x2917de(0x26a)]?.[_0x2917de(0x234)]},'operations':_0x3cd53f};}export async function getOperationDetail(_0x20ba40,_0x3b6305,_0x53e8a5){const _0x2c30b7=a181_0x162b;let _0x59f94b=_0x3b6305;if(!/^\d+$/[_0x2c30b7(0x1be)](_0x3b6305)){const _0x34fb0e=await listDatasets(_0x20ba40,{'code':_0x3b6305}),_0x1540ed=_0x34fb0e['find'](_0x4d2e7f=>_0x4d2e7f['code']===_0x3b6305||String(_0x4d2e7f['id'])===_0x3b6305);if(!_0x1540ed)throw CliErrors['validation'](_0x2c30b7(0x25a)+_0x3b6305);_0x59f94b=String(_0x1540ed['id']);}const _0x1b7c26=await getDatasetDetail(_0x59f94b),_0x40ac4f=normalizeDatasetOperations(_0x1b7c26[_0x2c30b7(0x271)])[_0x2c30b7(0x20a)](_0x527529=>(_0x527529[_0x2c30b7(0x202)]||_0x527529[_0x2c30b7(0x1a1)])===_0x53e8a5);if(!_0x40ac4f)throw CliErrors[_0x2c30b7(0x215)](_0x2c30b7(0x23e)+_0x53e8a5+_0x2c30b7(0x197)+_0x3b6305);return{'dataset':{'id':_0x1b7c26['id']??_0x1b7c26['modelId'],'name':_0x1b7c26['name'],'code':_0x1b7c26['code']||_0x1b7c26[_0x2c30b7(0x22a)],'tableName':_0x1b7c26[_0x2c30b7(0x234)]||_0x1b7c26[_0x2c30b7(0x26a)]?.[_0x2c30b7(0x234)]},'operation':_0x40ac4f};}export async function startGenerateStandardPages(_0x197b18,_0x46bbd9,_0x47d0ee){const _0x5aef42=a181_0x162b,_0x308775=await apiRequest(_0x5aef42(0x272)+_0x46bbd9+_0x5aef42(0x1f6),{'method':_0x5aef42(0x1ba),'body':{'appCode':_0x197b18,..._0x47d0ee?.['clientOperationId']?{'clientOperationId':_0x47d0ee['clientOperationId']}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x308775[_0x5aef42(0x19a)];}export async function getGenerateStandardPagesStatus(_0x192d3a,_0x5d4bf7,_0xf623a5){const _0x3d483a=a181_0x162b,_0x5f2166=new URLSearchParams({'appCode':_0x192d3a});_0xf623a5['operationId']&&_0x5f2166[_0x3d483a(0x225)](_0x3d483a(0x1bb),_0xf623a5['operationId']);_0xf623a5[_0x3d483a(0x236)]&&_0x5f2166['set'](_0x3d483a(0x236),_0xf623a5['clientOperationId']);const _0x3a6d87=await apiRequest('/smartapi/lovrabet/dataset/'+_0x5d4bf7+_0x3d483a(0x1a2)+_0x5f2166['toString']());return _0x3a6d87[_0x3d483a(0x19a)];}export async function getStandardPageStatus(_0x5932e0,_0x402fe0){const _0x3686d1=a181_0x162b,_0x4c6a0e=await apiRequest(_0x3686d1(0x272)+_0x402fe0+_0x3686d1(0x1cf)+encodeURIComponent(_0x5932e0));return _0x4c6a0e[_0x3686d1(0x19a)];}export async function tryGetStandardPageStatus(_0x5d9610,_0x5e8bff){const _0x580fdc=a181_0x162b;try{return await getStandardPageStatus(_0x5d9610,_0x5e8bff);}catch(_0x2c1fbd){if(_0x2c1fbd instanceof CliError&&_0x2c1fbd[_0x580fdc(0x21a)]===_0x580fdc(0x204)&&/404|not found|non-json response/i[_0x580fdc(0x1be)](_0x2c1fbd[_0x580fdc(0x1a4)]))return null;throw _0x2c1fbd;}}export async function syncStandardPages(_0x1492d7,_0x510bd2){const _0x2b4012=a181_0x162b,_0x465851=await apiRequest('/smartapi/lovrabet/dataset/'+_0x510bd2+'/sync-to-pages',{'method':'POST','body':{'appCode':_0x1492d7}});return _0x465851[_0x2b4012(0x19a)];}export async function getPageDetail(_0x56baf2){const _0x4b2053=a181_0x162b,_0x369613=await apiRequest(_0x4b2053(0x1eb)+_0x56baf2);if(!_0x369613['data'])throw CliErrors['validation'](_0x4b2053(0x21f)+_0x56baf2);return _0x369613[_0x4b2053(0x19a)];}export async function updatePage(_0x17ff75,_0x13cbf6,_0x3e88d4,_0x14c191){const _0x4abaca=a181_0x162b,_0x4e5288=await apiRequest(_0x4abaca(0x250),{'method':_0x4abaca(0x1ba),'body':{'appCode':_0x17ff75,'pageId':_0x13cbf6,'code':_0x3e88d4,'datasetIds':_0x14c191}});return _0x4e5288[_0x4abaca(0x19a)];}function a181_0x162b(_0x2a2512,_0x35c8a5){_0x2a2512=_0x2a2512-0x193;const _0x32618e=a181_0x3261();let _0x162bda=_0x32618e[_0x2a2512];return _0x162bda;}export function generateSdkCode(_0x38ec65,_0x100568,_0x391298){const _0x431c62=a181_0x162b,_0x1eba4f=_0x391298?.[_0x431c62(0x23d)]??!![],_0x37af23='dataset_'+_0x38ec65[_0x431c62(0x21a)]?.[_0x431c62(0x233)](/-/g,'_'),_0x1a0b8d=_0x100568['name']||_0x100568[_0x431c62(0x1a1)]||_0x431c62(0x243),_0x419003=[];_0x1eba4f&&_0x419003[_0x431c62(0x1d4)](_0x431c62(0x259),'',_0x431c62(0x24c),'');_0x419003[_0x431c62(0x1d4)](_0x431c62(0x1c8)+_0x38ec65[_0x431c62(0x202)]+'\x20('+(_0x38ec65[_0x431c62(0x234)]||'table')+')');if(_0x1a0b8d===_0x431c62(0x243))_0x419003['push'](_0x431c62(0x26f)+_0x37af23+_0x431c62(0x1de),_0x431c62(0x267),'\x20\x20pageSize:\x2020,',_0x431c62(0x1ac),'});');else{if(_0x1a0b8d===_0x431c62(0x230))_0x419003['push'](_0x431c62(0x26f)+_0x37af23+'.getOne(id);');else{if(_0x1a0b8d===_0x431c62(0x273))_0x419003[_0x431c62(0x1d4)](_0x431c62(0x26f)+_0x37af23+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x1a0b8d===_0x431c62(0x19c))_0x419003[_0x431c62(0x1d4)]('const\x20result\x20=\x20await\x20client.models.'+_0x37af23+'.update(id,\x20{\x20/*\x20fields\x20*/\x20});');else _0x1a0b8d===_0x431c62(0x195)||_0x1a0b8d===_0x431c62(0x244)?_0x419003[_0x431c62(0x1d4)](_0x431c62(0x26f)+_0x37af23+'.remove(id);'):_0x419003[_0x431c62(0x1d4)]('const\x20result\x20=\x20await\x20client.models.'+_0x37af23+'.'+_0x1a0b8d+_0x431c62(0x239));}}}return _0x419003['join']('\x0a');}export function generateSqlCodeTemplate(_0x2991fb,_0x14a6d5){const _0xb66ee=a181_0x162b,_0xf82367=_0x14a6d5?.[_0xb66ee(0x1e6)]??'sdk',_0x23670e=_0x14a6d5?.['includeImports']??!![],_0x1cb2fe=[];return _0x1cb2fe['push'](_0xb66ee(0x235)+_0x2991fb[_0xb66ee(0x199)]+'\x20('+_0x2991fb[_0xb66ee(0x211)]+')'),_0xf82367===_0xb66ee(0x1dc)?(_0x23670e&&_0x1cb2fe[_0xb66ee(0x1d4)](_0xb66ee(0x259),'',_0xb66ee(0x24c),''),_0x1cb2fe[_0xb66ee(0x1d4)]('const\x20data\x20=\x20await\x20client.sql.execute({','\x20\x20sqlCode:\x20\x27'+_0x2991fb[_0xb66ee(0x211)]+'\x27,',_0xb66ee(0x226),_0xb66ee(0x1f2),'if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);',_0xb66ee(0x1e7))):_0x1cb2fe[_0xb66ee(0x1d4)](_0xb66ee(0x242),_0xb66ee(0x194),_0xb66ee(0x1b3),_0xb66ee(0x21c)+_0x2991fb[_0xb66ee(0x211)]+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0xb66ee(0x203),_0xb66ee(0x200),'}'),_0x1cb2fe[_0xb66ee(0x25f)]('\x0a');}export async function getErConfig(_0x552b9a,_0x2e0a13){const _0x1964eb=a181_0x162b,_0x298ebd=await apiRequest(_0x1964eb(0x1ea),{'method':_0x1964eb(0x1ba),'body':{'appCode':_0x552b9a,'dblinkId':_0x2e0a13},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x298ebd[_0x1964eb(0x19a)];}export async function getErRelationDetail(_0x2bf378,_0x1ff534){const _0x50feef=a181_0x162b,_0x364020=new URLSearchParams({'appCode':_0x2bf378,'relationId':String(_0x1ff534)});try{const _0x513022=await apiRequest(_0x50feef(0x221)+_0x364020[_0x50feef(0x260)]());return _0x513022[_0x50feef(0x19a)]?.[_0x50feef(0x253)]??null;}catch(_0xc3783f){if(_0xc3783f instanceof CliError&&_0xc3783f[_0x50feef(0x21a)]===_0x50feef(0x204)&&(_0xc3783f[_0x50feef(0x229)]?.[_0x50feef(0x24d)](_0x50feef(0x1dd))||_0xc3783f[_0x50feef(0x229)]===_0x50feef(0x1fa)&&_0xc3783f[_0x50feef(0x1a4)]===_0x50feef(0x25d)))return null;throw _0xc3783f;}}export async function createErRelation(_0x3a3b56){const _0x455d44=a181_0x162b,_0x2a8288=await apiRequest(_0x455d44(0x206),{'method':_0x455d44(0x1ba),'body':_0x3a3b56,'allowNonJsonSuccess':!![]});return _0x2a8288['data'];}export async function updateErRelation(_0x4a6640){const _0x4475e7=a181_0x162b,_0x5b6ec4=await apiRequest(_0x4475e7(0x201),{'method':'POST','body':_0x4a6640,'allowNonJsonSuccess':!![]});return _0x5b6ec4[_0x4475e7(0x19a)];}export async function deleteErRelation(_0xf041f2){const _0x3a8d1d=a181_0x162b,_0x3025bb=await apiRequest(_0x3a8d1d(0x1fb),{'method':'POST','body':_0xf041f2,'allowNonJsonSuccess':!![]});return _0x3025bb[_0x3a8d1d(0x19a)];}export async function updateErBusinessGroup(_0x493f4d){const _0x4cceb0=a181_0x162b,_0x558d6a=await apiRequest(_0x4cceb0(0x256),{'method':_0x4cceb0(0x1ba),'body':_0x493f4d,'allowNonJsonSuccess':!![]});return _0x558d6a[_0x4cceb0(0x19a)];}function buildQuery(_0x1c69e7){const _0xc6fca5=a181_0x162b,_0x56a5cf=new URLSearchParams();for(const [_0x5a618e,_0xf65f66]of Object[_0xc6fca5(0x1ae)](_0x1c69e7)){if(_0xf65f66===undefined||_0xf65f66==='')continue;_0x56a5cf[_0xc6fca5(0x225)](_0x5a618e,String(_0xf65f66));}const _0x565c6d=_0x56a5cf['toString']();return _0x565c6d?'?'+_0x565c6d:'';}export async function listAppConfigs(_0x567760,_0xa1249e){const _0x238796=a181_0x162b,_0x20674d=await apiRequest('/smartapi/app-config/list',{'method':'POST','body':{'appCode':_0x567760,..._0xa1249e?.[_0x238796(0x1e9)]?{'key':_0xa1249e[_0x238796(0x1e9)]}:{},..._0xa1249e?.[_0x238796(0x205)]?{'tags':_0xa1249e[_0x238796(0x205)]}:{}}});return extractAppConfigList(_0x20674d[_0x238796(0x19a)]);}export async function getAppConfigByKey(_0x52ba64,_0xac2550){const _0x48802c=a181_0x162b,_0x328c56=await apiRequest(_0x48802c(0x1cc)+buildQuery({'appCode':_0x52ba64,'key':_0xac2550}));return _0x328c56[_0x48802c(0x19a)]??null;}export async function createAppConfig(_0x4650c0){const _0x25d094=a181_0x162b,_0x4ba09c=await apiRequest(_0x25d094(0x210),{'method':_0x25d094(0x1ba),'body':{'appCode':_0x4650c0[_0x25d094(0x1bf)],'key':_0x4650c0[_0x25d094(0x1e9)],'value':_0x4650c0[_0x25d094(0x232)],..._0x4650c0[_0x25d094(0x205)]?{'tags':_0x4650c0[_0x25d094(0x205)]}:{}}});return _0x4ba09c['data'];}export async function updateAppConfig(_0xda9b33){const _0x1ef289=a181_0x162b;await apiRequest(_0x1ef289(0x217),{'method':_0x1ef289(0x1ba),'body':{'id':_0xda9b33['id'],'appCode':_0xda9b33[_0x1ef289(0x1bf)],'key':_0xda9b33[_0x1ef289(0x1e9)],'value':_0xda9b33[_0x1ef289(0x232)],..._0xda9b33[_0x1ef289(0x205)]?{'tags':_0xda9b33[_0x1ef289(0x205)]}:{}}});}export async function deleteAppConfig(_0x42559e){const _0x66d3e8=a181_0x162b;await apiRequest(_0x66d3e8(0x1da),{'method':'POST','body':_0x42559e});}function extractAppConfigList(_0x872291){const _0x32e6e7=a181_0x162b;if(Array[_0x32e6e7(0x1b0)](_0x872291))return _0x872291;if(_0x872291&&typeof _0x872291===_0x32e6e7(0x237)&&Array[_0x32e6e7(0x1b0)](_0x872291[_0x32e6e7(0x21e)]))return _0x872291['list'];return extractList(_0x872291);}function a181_0x3261(){const _0x25980f=['/smartapi/dataset/delete-dataset','min','longTerm','147183oXhixe','\x20failed','/filter','string','//\x20','userTenantRelationList','/smartapi/dblink/delete','username','/smartapi/app-config/getByKey','scriptType','trim','/standard-page-status?appCode=','/smartapi/dblink/testConnect','/smartapi/custom/saveUserCustomSql','4843986mYRpql','functionName','push','/api/management/library/scripts/list?appCode=','BFF\x20save\x20returned\x20no\x20valid\x20id','292015GopIUY','API\x20error\x20code:\x20','success','/smartapi/app-config/delete','SQL\x20query\x20not\x20found:\x20','sdk','DATA_NOT_EXIST','.filter({','/api/management/library/scripts/save','Fetch\x20menu\x20list','remark','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','SQL\x20query\x20not\x20found:\x20id=','modelId','\x20of\x20','target','const\x20results\x20=\x20data.execResult\x20||\x20[];','roleName','key','/smartapi/question/er-config','/smartapi/lovrabet/detail?pageId=','/smartapi/dataset/update-driven-data','Unauthorized','download','responseFields','physicalTableCount','signal','});','/smartapi/permit/resource/get-menu-list','/smartapi/dataset/get-dataset-operation','append','/generate-standard-pages/start','/smartapi/app/getList','needPublic','6vhrXYm','API\x20error\x20code:\x20306','/smartapi/question/er-config/cli/delete-single','Check\x20network\x20connectivity\x20and\x20try\x20again.','/smartapi/dataset/text-generate/start','warn','/smartapi/custom/getUserCustomSql?id=','\x20\x20return\x20rows;','/smartapi/question/er-config/cli/update-single','name','\x20\x20});','api_error','tags','/smartapi/question/er-config/cli/erCreate','currentPage','planId','info','find','apiError','):\x20missing\x20data.markdown\x20field','needSelf','fetch-model-list','mobile','/smartapi/app-config/create','sqlCode','nickname','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','abort','validation','&type=','/smartapi/app-config/update','deleted','json','code','toLowerCase','\x20\x20\x20\x20sqlCode:\x20\x27','email','list','Page\x20not\x20found:\x20','displayName','/smartapi/question/er-config/cli/detail?','CUSTOM','isFinite','array','set','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','/smartapi/common/uploadFile','hint','modelCode','Fetch\x20datasets','/smartapi/permit/role/create','\x20apps.\x20','/smartapi/dblink/getTableDiffV2ByPage','/api/node-toolbox/sql/save','getOne','pageSize','value','replace','tableName','//\x20SQL:\x20','clientOperationId','object','16SZXcCY','(/*\x20params\x20*/);','401','/smartapi/permit/page/get-one','/smartapi/permit/page/save','includeImports','Operation\x20\x22','/smartapi/dblink/getOne','pageIndex','errorMsg','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','filter','remove','/smartapi/dataset/restore-dataset','stringify','/smartapi/dataset/text-generate/status?','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','path','status','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','includes','cli:rabetbase','?sqlCode=','/smartapi/lovrabet/update-page','12619930FfhbGj','has','relation','/smartapi/permit/resource/get-api-list','/smartapi/menu/update','/smartapi/question/er-config/business-group/edit','/smartapi/dblink/create','label','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','Dataset\x20not\x20found:\x20','Invalid\x20response\x20format\x20(','/smartapi/permit/role/update','ER\x20relation\x20does\x20not\x20exist','scriptName','join','toString','description','/smartapi/db-analysis/status/','2607597wTTANH','map','/smartapi/permit/user-role/update-user-list','body','\x20\x20where:\x20{},','GET','/api/','dbtableConfig','type','/smartapi/custom/queryUserCustomSqlList','UNAUTHORIZED','AbortError','const\x20result\x20=\x20await\x20client.models.','8eBzLen','operations','/smartapi/lovrabet/dataset/','create','/smartapi/menu/create','API\x20error:\x20','\x20failed,\x20HTTP\x20','summary','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','delete','Request\x20timeout:\x20','\x22\x20not\x20found\x20in\x20dataset\x20','errorMessage','sqlName','data','Warning:\x20showing\x20first\x20','update','roleType','datasetTableCount','/smartapi/dblink/getAllTableList','660868cSjnGM','operationName','/generate-standard-pages/status?','length','message','dbId','/api/management/library/scripts/delete','BFF\x20script\x20not\x20found:\x20id=','method','tableData','permits','markdown','\x20\x20currentPage:\x201,','/smartapi/dblink/update','entries','/smartapi/dataset/text-generate/preview','isArray','authRequired','error','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','/api/management/library/scripts/statistics?appCode=','/api/management/script/cache/clear','/smartapi/db-analysis/start','803014pCXgxJ','userId','/smartapi/permit/role/get-one','POST','operationId','/smartapi/dataset/get-dataset-list','version','test','appCode','errorCode'];a181_0x3261=function(){return _0x25980f;};return a181_0x3261();}export async function listDbLinks(_0x303767,_0x4c9d49){const _0xf15dc1=a181_0x162b,_0x3b7449=await apiRequest('/smartapi/dblink/getList',{'method':_0xf15dc1(0x1ba),'body':{'appCode':_0x303767,'currentPage':_0x4c9d49?.[_0xf15dc1(0x207)]??0x1,'pageSize':_0x4c9d49?.[_0xf15dc1(0x231)]??0x64}});return{'items':extractList(_0x3b7449[_0xf15dc1(0x19a)]),'paging':extractPaging(_0x3b7449['data'])};}export async function getDbLinkInfo(_0x4c3351){const _0x59bbcb=a181_0x162b,_0x3c0077=await apiRequest(_0x59bbcb(0x23f)+buildQuery({'id':_0x4c3351}));return _0x3c0077[_0x59bbcb(0x19a)];}export async function createDbLink(_0x12ca36){const _0xa8a21f=a181_0x162b,_0x5d2cb9=await apiRequest(_0xa8a21f(0x257),{'method':_0xa8a21f(0x1ba),'body':_0x12ca36});return _0x5d2cb9[_0xa8a21f(0x19a)];}export async function updateDbLink(_0x4588cc){const _0x3feb2e=a181_0x162b,_0x51f040=await apiRequest(_0x3feb2e(0x1ad),{'method':_0x3feb2e(0x1ba),'body':_0x4588cc});return _0x51f040[_0x3feb2e(0x19a)];}export async function deleteDbLink(_0x4a735a){const _0x51b909=a181_0x162b;await apiRequest(_0x51b909(0x1ca),{'method':_0x51b909(0x1ba),'body':{'id':_0x4a735a}});}export async function testDbLinkConnect(_0x18fd2a){const _0x490406=a181_0x162b,_0x2a1dee=await apiRequest(_0x490406(0x1d0)+buildQuery({'id':_0x18fd2a}));return _0x2a1dee[_0x490406(0x19a)];}export async function startDbAnalysis(_0x26f8bb,_0x1a7433){const _0x22a6de=a181_0x162b,_0x49ba15=await apiRequest(_0x22a6de(0x1b6),{'method':'POST','body':{'dbLinkId':_0x26f8bb,..._0x1a7433&&_0x1a7433[_0x22a6de(0x1a3)]>0x0?{'tableNames':_0x1a7433}:{}}}),_0x195aed=_0x49ba15['data'];if(typeof _0x195aed===_0x22a6de(0x1c7))return _0x195aed;if(_0x195aed&&typeof _0x195aed===_0x22a6de(0x237)&&typeof _0x195aed[_0x22a6de(0x208)]===_0x22a6de(0x1c7))return _0x195aed[_0x22a6de(0x208)];return _0x195aed!=null?String(_0x195aed):'';}export async function cancelDbAnalysis(_0x21fcd8){const _0x56fb3a=a181_0x162b;await apiRequest('/smartapi/db-analysis/jobs/cancel'+buildQuery({'planId':_0x21fcd8}),{'method':_0x56fb3a(0x1ba)});}export async function getDbAnalysisStatus(_0x2d7ae6){const _0x3da219=a181_0x162b,_0x23ca48=await apiRequest(_0x3da219(0x262)+encodeURIComponent(_0x2d7ae6));return _0x23ca48[_0x3da219(0x19a)];}export async function getDbAllTableList(_0x3b4c3d,_0x6a3645){const _0x3a1e8f=a181_0x162b,_0x3da39a=await apiRequest(_0x3a1e8f(0x19f)+buildQuery({'appCode':_0x3b4c3d,'dbLinkId':_0x6a3645})),_0x497097=_0x3da39a[_0x3a1e8f(0x19a)];if(Array[_0x3a1e8f(0x1b0)](_0x497097))return _0x497097;return extractList(_0x497097);}export async function getDbTableDiff(_0x686902,_0x5541d5,_0x52fc14){const _0x46e708=a181_0x162b,_0x423ab4=await apiRequest(_0x46e708(0x22e)+buildQuery({'appCode':_0x686902,'dbLinkId':_0x5541d5,'pageIndex':_0x52fc14?.[_0x46e708(0x240)]??0x1,'pageSize':_0x52fc14?.[_0x46e708(0x231)]??0x14,'tableName':_0x52fc14?.[_0x46e708(0x234)]})),_0x1665e9=_0x423ab4[_0x46e708(0x19a)];return{'totalCount':_0x1665e9?.['totalCount']??0x0,'physicalTableCount':_0x1665e9?.[_0x46e708(0x1f0)]??0x0,'datasetTableCount':_0x1665e9?.[_0x46e708(0x19e)]??0x0,..._0x1665e9?.[_0x46e708(0x193)]?{'summary':_0x1665e9[_0x46e708(0x193)]}:{},'tableList':Array[_0x46e708(0x1b0)](_0x1665e9?.['tableList'])?_0x1665e9['tableList']:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x44b3ed=a181_0x162b,_0x3f4e4d=await apiRequest(_0x44b3ed(0x1f7),{'method':_0x44b3ed(0x1ba),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x5b5ae3=extractList(_0x3f4e4d[_0x44b3ed(0x19a)]),_0x2de8b4=extractPaging(_0x3f4e4d[_0x44b3ed(0x19a)]);return _0x2de8b4&&_0x2de8b4['totalCount']>REMOTE_APP_PAGE_SIZE&&console[_0x44b3ed(0x1fe)](_0x44b3ed(0x19b)+REMOTE_APP_PAGE_SIZE+_0x44b3ed(0x1e5)+_0x2de8b4['totalCount']+_0x44b3ed(0x22d)+_0x44b3ed(0x227)),_0x5b5ae3;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x3847f8,_0x98da18){const _0x3961ba=a181_0x162b,_0x27f913=Math[_0x3961ba(0x1c2)](Math['max'](_0x98da18?.[_0x3961ba(0x231)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x17b163=await apiRequest('/smartapi/permit/role/get-list',{'method':_0x3961ba(0x1ba),'body':{'appCode':_0x3847f8,'currentPage':_0x98da18?.['currentPage']??0x1,'pageSize':_0x27f913}});return{'items':extractList(_0x17b163[_0x3961ba(0x19a)]),'paging':extractPaging(_0x17b163[_0x3961ba(0x19a)])};}export async function getAppRole(_0x5ea138){const _0x17f70d=a181_0x162b,_0x200c52=await apiRequest(_0x17f70d(0x1b9)+buildQuery({'id':_0x5ea138}));return _0x200c52[_0x17f70d(0x19a)];}export async function createAppRole(_0x48cd64){const _0x521001=a181_0x162b,_0x2abd8a=await apiRequest(_0x521001(0x22c),{'method':'POST','body':{'appCode':_0x48cd64[_0x521001(0x1bf)],'roleName':_0x48cd64[_0x521001(0x1e8)],'roleType':_0x521001(0x222),..._0x48cd64[_0x521001(0x1e1)]?{'remark':_0x48cd64[_0x521001(0x1e1)]}:{}}});return _0x2abd8a['data'];}export async function updateAppRole(_0x4f9338){const _0x3f879f=a181_0x162b,_0x47ee4b=await apiRequest(_0x3f879f(0x25c),{'method':_0x3f879f(0x1ba),'body':{'id':_0x4f9338['id'],'appCode':_0x4f9338['appCode'],..._0x4f9338[_0x3f879f(0x19d)]?{'roleType':_0x4f9338[_0x3f879f(0x19d)]}:{},..._0x4f9338[_0x3f879f(0x1e8)]!==undefined?{'roleName':_0x4f9338['roleName']}:{},..._0x4f9338[_0x3f879f(0x1e1)]!==undefined?{'remark':_0x4f9338[_0x3f879f(0x1e1)]}:{},..._0x4f9338[_0x3f879f(0x1aa)]?{'permits':_0x4f9338[_0x3f879f(0x1aa)]}:{}}});return _0x47ee4b[_0x3f879f(0x19a)];}export async function deleteAppRole(_0x2a797a){const _0x2b9208=a181_0x162b;await apiRequest('/smartapi/permit/role/delete',{'method':_0x2b9208(0x1ba),'body':{'id':_0x2a797a}});}export async function listPermitRoles(_0x16d43b,_0xdcc943){const _0x38668f=a181_0x162b,_0xed7a=await apiRequest('/smartapi/permit/role/get-permit-list',{'method':_0x38668f(0x1ba),'body':{'appCode':_0x16d43b,..._0xdcc943?.[_0x38668f(0x20d)]!==undefined?{'needSelf':_0xdcc943['needSelf']}:{},..._0xdcc943?.['needPublic']!==undefined?{'needPublic':_0xdcc943[_0x38668f(0x1f8)]}:{}}});return extractList(_0xed7a['data']);}export async function getRoleMenuResources(_0x10833e,_0x4f73b0){const _0x2c847d=a181_0x162b,_0x5a002d=await apiRequest(_0x2c847d(0x1f3),{'method':'POST','body':{'appCode':_0x10833e,'roleId':_0x4f73b0}});return extractList(_0x5a002d[_0x2c847d(0x19a)]);}export async function getRoleApiResources(_0x17be73,_0x4f316a){const _0x3893b4=a181_0x162b,_0x420cbe=await apiRequest(_0x3893b4(0x254),{'method':_0x3893b4(0x1ba),'body':{'appCode':_0x17be73,'roleId':_0x4f316a}});return extractList(_0x420cbe[_0x3893b4(0x19a)]);}export async function listRoleUsers(_0x551cc7){const _0x158dd2=a181_0x162b,_0x2014f7=await apiRequest('/smartapi/permit/user-role/get-user-list',{'method':'POST','body':{'appCode':_0x551cc7}});return extractList(_0x2014f7[_0x158dd2(0x19a)]);}export async function updateRoleUsers(_0x541f6b,_0x2d02a3){const _0x22f041=a181_0x162b;await apiRequest(_0x22f041(0x265),{'method':_0x22f041(0x1ba),'body':{'appCode':_0x541f6b,'roleList':_0x2d02a3}});}export async function getPagePermit(_0xf08043){const _0x5319d0=a181_0x162b,_0x1a521d=await apiRequest(_0x5319d0(0x23b)+buildQuery({'menuId':_0xf08043}));return _0x1a521d[_0x5319d0(0x19a)];}export async function savePagePermit(_0x4a62e5){const _0x369993=a181_0x162b,_0x5d91b6=await apiRequest(_0x369993(0x23c),{'method':_0x369993(0x1ba),'body':_0x4a62e5});return _0x5d91b6[_0x369993(0x19a)];}export async function getTenantMembers(_0x335119){const _0x48de1e=a181_0x162b,_0x5d10e4=await apiRequest('/userTenant/getByTenantCode'+buildQuery({'code':_0x335119})),_0x643a84=_0x5d10e4[_0x48de1e(0x19a)]??{},_0x332f49=Array['isArray'](_0x643a84?.[_0x48de1e(0x1c9)])?_0x643a84[_0x48de1e(0x1c9)]:[];return _0x332f49[_0x48de1e(0x243)](_0x5f00e9=>_0x5f00e9?.[_0x48de1e(0x24b)]==='ENABLE'||_0x5f00e9?.[_0x48de1e(0x24b)]===undefined)[_0x48de1e(0x264)](_0xa3739e=>({'userId':Number(_0xa3739e[_0x48de1e(0x1b8)]??_0xa3739e['id']),'username':_0xa3739e[_0x48de1e(0x1cb)],'nickname':_0xa3739e[_0x48de1e(0x212)],'status':_0xa3739e[_0x48de1e(0x24b)],'email':_0xa3739e[_0x48de1e(0x21d)],'mobile':_0xa3739e[_0x48de1e(0x20f)],'avatar':_0xa3739e['avatar']}))[_0x48de1e(0x243)](_0x56ca97=>Number[_0x48de1e(0x223)](_0x56ca97[_0x48de1e(0x1b8)])&&_0x56ca97[_0x48de1e(0x1b8)]>0x0);}
@@ -1 +1 @@
1
- const a180_0x4b288a=a180_0x2a35;(function(_0x45085d,_0x1db00d){const _0x3e8b0c=a180_0x2a35,_0x442551=_0x45085d();while(!![]){try{const _0x22207e=parseInt(_0x3e8b0c(0x15f))/0x1+parseInt(_0x3e8b0c(0x154))/0x2+parseInt(_0x3e8b0c(0x15c))/0x3+parseInt(_0x3e8b0c(0x155))/0x4+-parseInt(_0x3e8b0c(0x153))/0x5*(parseInt(_0x3e8b0c(0x15a))/0x6)+-parseInt(_0x3e8b0c(0x159))/0x7*(-parseInt(_0x3e8b0c(0x15d))/0x8)+parseInt(_0x3e8b0c(0x160))/0x9*(-parseInt(_0x3e8b0c(0x15b))/0xa);if(_0x22207e===_0x1db00d)break;else _0x442551['push'](_0x442551['shift']());}catch(_0x5ab333){_0x442551['push'](_0x442551['shift']());}}}(a180_0x88ff,0xa6bfe));import{resolve}from'node:path';function a180_0x2a35(_0x2ac630,_0x51e2b0){_0x2ac630=_0x2ac630-0x153;const _0x88ff71=a180_0x88ff();let _0x2a357f=_0x88ff71[_0x2ac630];return _0x2a357f;}function a180_0x88ff(){const _0x260c86=['266CoABEG','288UgftWB','3696410wWcUWh','3979446UrjvcP','74024LPrlAk','/bff','55157tlYwEZ','9PCzkdI','103080GuxbQS','527732WBkiNg','180384itNnnX','bff-trash','bff.lock.json','bff'];a180_0x88ff=function(){return _0x260c86;};return a180_0x88ff();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a180_0x4b288a(0x157),TRASH_DIR_NAME=a180_0x4b288a(0x156);export function loadBffProjectConfig(_0x4589b0,_0x58afac){const _0x441e10=a180_0x4b288a,_0x44b6d2=resolve(_0x58afac??findProjectRootDirectory()),_0x4ecf96=DOT_DIR+_0x441e10(0x15e),_0x4bbbf7=_0x4ecf96+'/'+_0x4589b0;return{'projectRoot':_0x44b6d2,'appCode':_0x4589b0,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x4ecf96,'scriptsRoot':_0x4bbbf7,'scriptsRootDir':resolve(_0x44b6d2,DOT_DIR,_0x441e10(0x158),_0x4589b0),'lockFilePath':resolve(_0x44b6d2,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x44b6d2,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a182_0x9ef8c3=a182_0x1bef;function a182_0x4824(){const _0x44bf58=['971000xocgAZ','.rabetbase','110AdMOuN','4667193Fiuwtw','bff.lock.json','125923YyJYzP','93xyaEVK','61300iZDtrG','1822378pKAgMQ','13870ZCAKGu','252uaeWlf','/bff','16oLEoXE','30743436pOvrSk','bff','1oPzLiK'];a182_0x4824=function(){return _0x44bf58;};return a182_0x4824();}(function(_0x282638,_0x3e2d29){const _0x159e90=a182_0x1bef,_0xae2989=_0x282638();while(!![]){try{const _0x20feab=parseInt(_0x159e90(0x19d))/0x1*(-parseInt(_0x159e90(0x1a6))/0x2)+-parseInt(_0x159e90(0x1a4))/0x3*(-parseInt(_0x159e90(0x1a5))/0x4)+parseInt(_0x159e90(0x19e))/0x5+parseInt(_0x159e90(0x1a8))/0x6*(-parseInt(_0x159e90(0x1a3))/0x7)+-parseInt(_0x159e90(0x1aa))/0x8*(parseInt(_0x159e90(0x1a1))/0x9)+-parseInt(_0x159e90(0x1a7))/0xa*(-parseInt(_0x159e90(0x1a0))/0xb)+parseInt(_0x159e90(0x1ab))/0xc;if(_0x20feab===_0x3e2d29)break;else _0xae2989['push'](_0xae2989['shift']());}catch(_0x1d07a3){_0xae2989['push'](_0xae2989['shift']());}}}(a182_0x4824,0x84221));import{resolve}from'node:path';function a182_0x1bef(_0xb616f8,_0x4c0dff){_0xb616f8=_0xb616f8-0x19c;const _0x48245f=a182_0x4824();let _0x1bef2e=_0x48245f[_0xb616f8];return _0x1bef2e;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a182_0x9ef8c3(0x19f),LOCK_FILE_NAME=a182_0x9ef8c3(0x1a2),TRASH_DIR_NAME='bff-trash';export function loadBffProjectConfig(_0x7971d7,_0x28688f){const _0x58fd41=a182_0x9ef8c3,_0x3c9d27=resolve(_0x28688f??findProjectRootDirectory()),_0x52fe41=DOT_DIR+_0x58fd41(0x1a9),_0x31e2e7=_0x52fe41+'/'+_0x7971d7;return{'projectRoot':_0x3c9d27,'appCode':_0x7971d7,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x52fe41,'scriptsRoot':_0x31e2e7,'scriptsRootDir':resolve(_0x3c9d27,DOT_DIR,_0x58fd41(0x19c),_0x7971d7),'lockFilePath':resolve(_0x3c9d27,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x3c9d27,DOT_DIR,TRASH_DIR_NAME)};}