@lovrabet/rabetbase-cli 2.3.3-beta.4 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) 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/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.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/use.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/generate.js +1 -1
  65. package/lib/commands/dataset/index.js +1 -1
  66. package/lib/commands/dataset/list.js +1 -1
  67. package/lib/commands/dataset/operations.js +1 -1
  68. package/lib/commands/dataset/relation-audit.js +1 -1
  69. package/lib/commands/dataset/relation-create.js +1 -1
  70. package/lib/commands/dataset/relation-delete.js +1 -1
  71. package/lib/commands/dataset/relation-shared.js +1 -1
  72. package/lib/commands/dataset/relation-update.js +1 -1
  73. package/lib/commands/dataset/relations.js +1 -1
  74. package/lib/commands/dataset/rename.js +1 -1
  75. package/lib/commands/dataset/restore.js +1 -1
  76. package/lib/commands/db/analyze-cancel.js +1 -1
  77. package/lib/commands/db/analyze-start.js +1 -1
  78. package/lib/commands/db/analyze-status.js +1 -1
  79. package/lib/commands/db/create.js +1 -1
  80. package/lib/commands/db/delete.js +1 -1
  81. package/lib/commands/db/detail.js +1 -1
  82. package/lib/commands/db/diff.js +1 -1
  83. package/lib/commands/db/index.js +1 -1
  84. package/lib/commands/db/list.js +1 -1
  85. package/lib/commands/db/shared.js +1 -1
  86. package/lib/commands/db/tables.js +1 -1
  87. package/lib/commands/db/test.js +1 -1
  88. package/lib/commands/db/update.js +1 -1
  89. package/lib/commands/doctor.js +1 -1
  90. package/lib/commands/init/index.js +1 -1
  91. package/lib/commands/issue/index.js +1 -1
  92. package/lib/commands/issue/nudge.js +1 -1
  93. package/lib/commands/issue/report.js +1 -1
  94. package/lib/commands/issue/shared.js +1 -1
  95. package/lib/commands/logs/index.js +1 -1
  96. package/lib/commands/menu/index.js +1 -1
  97. package/lib/commands/menu/list.js +1 -1
  98. package/lib/commands/menu/shared/compare-table.js +1 -1
  99. package/lib/commands/menu/shared/index.js +1 -1
  100. package/lib/commands/menu/shared/inquirer.js +1 -1
  101. package/lib/commands/menu/shared/local-pages.js +1 -1
  102. package/lib/commands/menu/shared/logic.js +1 -1
  103. package/lib/commands/menu/shared/service.js +1 -1
  104. package/lib/commands/menu/shared/sync-core.js +1 -1
  105. package/lib/commands/menu/shared/update-core.js +1 -1
  106. package/lib/commands/menu/shared/valid-url.js +1 -1
  107. package/lib/commands/menu/sync.js +1 -1
  108. package/lib/commands/menu/update.js +1 -1
  109. package/lib/commands/page/generate-start.js +1 -1
  110. package/lib/commands/page/generate-status.js +1 -1
  111. package/lib/commands/page/index.js +1 -1
  112. package/lib/commands/page/pull.js +1 -1
  113. package/lib/commands/page/push.js +1 -1
  114. package/lib/commands/page/relation-audit.js +1 -1
  115. package/lib/commands/page/shared.js +1 -1
  116. package/lib/commands/page/standard-page-status.js +1 -1
  117. package/lib/commands/page/sync.js +1 -1
  118. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  119. package/lib/commands/project/create/format-elapsed.js +1 -1
  120. package/lib/commands/project/create/main.js +1 -1
  121. package/lib/commands/project/create/non-interactive.js +1 -1
  122. package/lib/commands/project/create/project-template-path.js +1 -1
  123. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  124. package/lib/commands/project/create/use-format-code.js +1 -1
  125. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  126. package/lib/commands/project/index.js +1 -1
  127. package/lib/commands/project/init.js +1 -1
  128. package/lib/commands/project/upgrade.js +1 -1
  129. package/lib/commands/registry.js +1 -1
  130. package/lib/commands/run/index.js +1 -1
  131. package/lib/commands/schema.js +1 -1
  132. package/lib/commands/sql/create.js +1 -1
  133. package/lib/commands/sql/delete.js +1 -1
  134. package/lib/commands/sql/detail.js +1 -1
  135. package/lib/commands/sql/exec.js +1 -1
  136. package/lib/commands/sql/index.js +1 -1
  137. package/lib/commands/sql/list.js +1 -1
  138. package/lib/commands/sql/pull.js +1 -1
  139. package/lib/commands/sql/push.js +1 -1
  140. package/lib/commands/sql/save.js +1 -1
  141. package/lib/commands/sql/shared.js +1 -1
  142. package/lib/commands/sql/status.js +1 -1
  143. package/lib/commands/sql/validate.js +1 -1
  144. package/lib/commands/workspace/index.js +1 -1
  145. package/lib/config/schema.js +1 -1
  146. package/lib/constant/cdn.js +1 -1
  147. package/lib/constant/cli.js +1 -1
  148. package/lib/constant/defaults.js +1 -1
  149. package/lib/constant/domain.js +1 -1
  150. package/lib/constant/env.js +1 -1
  151. package/lib/constant/output.js +1 -1
  152. package/lib/constant/paths.js +1 -1
  153. package/lib/constant/risk.js +1 -1
  154. package/lib/context/app-resolver.js +1 -1
  155. package/lib/context/auth-resolver.js +1 -1
  156. package/lib/context/config-loader.js +1 -1
  157. package/lib/context.js +1 -1
  158. package/lib/core/alias-resolver.js +1 -1
  159. package/lib/core/api-client.js +1 -1
  160. package/lib/core/bff/config.js +1 -1
  161. package/lib/core/bff/file-system.js +1 -1
  162. package/lib/core/bff/hash.js +1 -1
  163. package/lib/core/bff/lock.js +1 -1
  164. package/lib/core/bff/utils.js +1 -1
  165. package/lib/core/db-resolver.js +1 -1
  166. package/lib/core/page/file-system.js +1 -1
  167. package/lib/core/page/hash.js +1 -1
  168. package/lib/core/page/lock.js +1 -1
  169. package/lib/core/sql-sync/config.js +1 -1
  170. package/lib/core/sql-sync/file-system.js +1 -1
  171. package/lib/core/sql-sync/hash.js +1 -1
  172. package/lib/core/sql-sync/lock.js +1 -1
  173. package/lib/core/sql-sync/utils.js +1 -1
  174. package/lib/core/sql-validator.js +1 -1
  175. package/lib/errors.js +1 -1
  176. package/lib/framework/build-all-flags.js +1 -1
  177. package/lib/framework/flags.js +1 -1
  178. package/lib/framework/help.js +1 -1
  179. package/lib/framework/index.js +1 -1
  180. package/lib/framework/output.js +1 -1
  181. package/lib/framework/response.js +1 -1
  182. package/lib/framework/runner-alias.js +1 -1
  183. package/lib/framework/runner.js +1 -1
  184. package/lib/framework/schema-export.js +1 -1
  185. package/lib/framework/types.js +1 -1
  186. package/lib/generated/build-info.js +1 -1
  187. package/lib/help.js +1 -1
  188. package/lib/skills/main.js +1 -1
  189. package/lib/skills/npx-skills-add.js +1 -1
  190. package/lib/telemetry/cli-command-trace.js +1 -1
  191. package/lib/telemetry/cli-help-trace.js +1 -1
  192. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  193. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  194. package/lib/telemetry/send-cli-trace-log.js +1 -1
  195. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  196. package/lib/utils/ai_config.js +1 -1
  197. package/lib/utils/apply-jq-filter.js +1 -1
  198. package/lib/utils/cdn-config.js +1 -1
  199. package/lib/utils/check-sdk-version.js +1 -1
  200. package/lib/utils/cli-version-check.js +1 -1
  201. package/lib/utils/cli-version-policy.js +1 -1
  202. package/lib/utils/config.js +1 -1
  203. package/lib/utils/copy-directory.js +1 -1
  204. package/lib/utils/entity-with-id.js +1 -1
  205. package/lib/utils/file-utils.js +1 -1
  206. package/lib/utils/guides-cdn.js +1 -1
  207. package/lib/utils/http-client.js +1 -1
  208. package/lib/utils/is-non-interactive.js +1 -1
  209. package/lib/utils/logger.js +1 -1
  210. package/lib/utils/params.js +1 -1
  211. package/lib/utils/platform.js +1 -1
  212. package/lib/utils/rules-cdn.js +1 -1
  213. package/lib/utils/sleep.js +1 -1
  214. package/lib/utils/template-replacer.js +1 -1
  215. package/lib/utils/update-notice.js +1 -1
  216. package/lib/utils/version.js +1 -1
  217. package/lib/utils/with-active-cookie.js +1 -1
  218. package/lib/utils/write-cli-side-channel.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a148_0x4eb3cd=a148_0x4b82;function a148_0x4b82(_0x4641b7,_0x5c7134){_0x4641b7=_0x4641b7-0x166;const _0x4a4e6c=a148_0x4a4e();let _0x4b82ca=_0x4a4e6c[_0x4641b7];return _0x4b82ca;}(function(_0x11a085,_0x324052){const _0x509437=a148_0x4b82,_0x325396=_0x11a085();while(!![]){try{const _0x5e2411=-parseInt(_0x509437(0x16c))/0x1+-parseInt(_0x509437(0x167))/0x2+parseInt(_0x509437(0x171))/0x3*(-parseInt(_0x509437(0x16a))/0x4)+parseInt(_0x509437(0x16d))/0x5+parseInt(_0x509437(0x166))/0x6*(parseInt(_0x509437(0x168))/0x7)+parseInt(_0x509437(0x16b))/0x8+parseInt(_0x509437(0x16f))/0x9*(-parseInt(_0x509437(0x170))/0xa);if(_0x5e2411===_0x324052)break;else _0x325396['push'](_0x325396['shift']());}catch(_0x56a673){_0x325396['push'](_0x325396['shift']());}}}(a148_0x4a4e,0x71769));import{DEFAULT_API_DIR}from'../constant/paths.js';function a148_0x4a4e(){const _0x36d821=['142186yPGTRT','3607980Iofuth','compress','296559rDMJbl','90EycZhI','27KXExDA','19476TchAiw','98822YOZnvr','630DvHYCV','production','32080FaBCoK','90760YHORAl'];a148_0x4a4e=function(){return _0x36d821;};return a148_0x4a4e();}export const DEFAULT_CONFIG_VALUES={'env':a148_0x4eb3cd(0x169),'format':a148_0x4eb3cd(0x16e),'locale':'en-US','riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a148_0x4eb3cd(0x16e);
1
+ const a148_0x5ec45e=a148_0x3d1b;(function(_0x10a215,_0x5764b1){const _0x5aadd0=a148_0x3d1b,_0x363e63=_0x10a215();while(!![]){try{const _0x47e1a5=parseInt(_0x5aadd0(0xf9))/0x1*(parseInt(_0x5aadd0(0xfd))/0x2)+-parseInt(_0x5aadd0(0xff))/0x3*(-parseInt(_0x5aadd0(0xf6))/0x4)+parseInt(_0x5aadd0(0xf7))/0x5+-parseInt(_0x5aadd0(0x100))/0x6+parseInt(_0x5aadd0(0xfa))/0x7+-parseInt(_0x5aadd0(0xf5))/0x8+parseInt(_0x5aadd0(0xf8))/0x9;if(_0x47e1a5===_0x5764b1)break;else _0x363e63['push'](_0x363e63['shift']());}catch(_0x447ec2){_0x363e63['push'](_0x363e63['shift']());}}}(a148_0x4a3b,0xda8c4));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a148_0x5ec45e(0xfc),'format':a148_0x5ec45e(0xfb),'locale':a148_0x5ec45e(0x101),'riskLevel':a148_0x5ec45e(0xfe),'apiDir':DEFAULT_API_DIR};function a148_0x3d1b(_0x10b499,_0x1d4de2){_0x10b499=_0x10b499-0xf5;const _0x4a3b08=a148_0x4a3b();let _0x3d1bc9=_0x4a3b08[_0x10b499];return _0x3d1bc9;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';function a148_0x4a3b(){const _0x1a0483=['1631470HfxwNm','4100184tIAKwC','9dQfMDe','6632710yNAhbe','compress','production','115052tWupIj','high-risk-write','3GMzoJJ','4717260hezAoP','en-US','10431632bjkXqL','2952808CAjRvo'];a148_0x4a3b=function(){return _0x1a0483;};return a148_0x4a3b();}
@@ -1 +1 @@
1
- const a149_0x56055a=a149_0x18ba;(function(_0x18c433,_0x2ba294){const _0x55b581=a149_0x18ba,_0x45b2e0=_0x18c433();while(!![]){try{const _0x3d58f9=-parseInt(_0x55b581(0x1e1))/0x1+parseInt(_0x55b581(0x1ea))/0x2*(-parseInt(_0x55b581(0x1dc))/0x3)+parseInt(_0x55b581(0x1e4))/0x4*(-parseInt(_0x55b581(0x1ef))/0x5)+parseInt(_0x55b581(0x1ee))/0x6*(parseInt(_0x55b581(0x1de))/0x7)+-parseInt(_0x55b581(0x1eb))/0x8*(parseInt(_0x55b581(0x1e0))/0x9)+-parseInt(_0x55b581(0x1e2))/0xa+parseInt(_0x55b581(0x1e9))/0xb;if(_0x3d58f9===_0x2ba294)break;else _0x45b2e0['push'](_0x45b2e0['shift']());}catch(_0xa96322){_0x45b2e0['push'](_0x45b2e0['shift']());}}}(a149_0x338a,0xb7cd6));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xa471d0){const _0xcf030a=a149_0x18ba;customApiDomain=_0xa471d0?.[_0xcf030a(0x1e3)],customUserDomain=_0xa471d0?.['userDomain'],customRuntimeDomain=_0xa471d0?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a149_0x56055a(0x1e8));function a149_0x338a(){const _0x2a3ede=['https://user-daily.lovrabet.com','63016074IRuaMn','417454OatuNk','8bdwtBf','https://runtime.lovrabet.com','https://daily-api.lovrabet.com','24AUiURh','45065cFIqzq','/app/','3asmZAx','/web-app/app/','340592UlEToq','https://api.lovrabet.com','12487842UXAfKH','1184842wRUayL','11456030IFbqMm','apiDomain','552GVKFVm','trim','https://daily-runtime.lovrabet.com','https://app.lovrabet.com'];a149_0x338a=function(){return _0x2a3ede;};return a149_0x338a();}function a149_0x18ba(_0x25dd70,_0x11f110){_0x25dd70=_0x25dd70-0x1dc;const _0x338a5a=a149_0x338a();let _0x18bab9=_0x338a5a[_0x25dd70];return _0x18bab9;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a149_0x56055a(0x1df):a149_0x56055a(0x1ed));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a149_0x56055a(0x1ec):a149_0x56055a(0x1e6));export const getAppDomain=()=>isProduction(getEnv())?a149_0x56055a(0x1e7):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x31cce0=>{const _0x31d209=a149_0x56055a,_0x459f0a=encodeURIComponent(_0x31cce0[_0x31d209(0x1e5)]());return isProduction(getEnv())?getAppDomain()+_0x31d209(0x1f0)+_0x459f0a:getAppDomain()+_0x31d209(0x1dd)+_0x459f0a;};
1
+ const a149_0x2b0313=a149_0x51e5;(function(_0x453d40,_0x2dd25c){const _0x44a88e=a149_0x51e5,_0x2fe5e5=_0x453d40();while(!![]){try{const _0x1e24a9=-parseInt(_0x44a88e(0x129))/0x1*(parseInt(_0x44a88e(0x12d))/0x2)+-parseInt(_0x44a88e(0x128))/0x3*(-parseInt(_0x44a88e(0x116))/0x4)+-parseInt(_0x44a88e(0x120))/0x5*(parseInt(_0x44a88e(0x11d))/0x6)+-parseInt(_0x44a88e(0x122))/0x7*(parseInt(_0x44a88e(0x12a))/0x8)+-parseInt(_0x44a88e(0x11e))/0x9*(-parseInt(_0x44a88e(0x126))/0xa)+-parseInt(_0x44a88e(0x124))/0xb*(parseInt(_0x44a88e(0x11f))/0xc)+parseInt(_0x44a88e(0x119))/0xd*(parseInt(_0x44a88e(0x117))/0xe);if(_0x1e24a9===_0x2dd25c)break;else _0x2fe5e5['push'](_0x2fe5e5['shift']());}catch(_0x1da313){_0x2fe5e5['push'](_0x2fe5e5['shift']());}}}(a149_0x2149,0x6d488));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xa1de2){const _0x1314ff=a149_0x51e5;customApiDomain=_0xa1de2?.['apiDomain'],customUserDomain=_0xa1de2?.[_0x1314ff(0x12c)],customRuntimeDomain=_0xa1de2?.[_0x1314ff(0x11a)];}function a149_0x51e5(_0x20abb3,_0x3c2a4c){_0x20abb3=_0x20abb3-0x116;const _0x2149ab=a149_0x2149();let _0x51e570=_0x2149ab[_0x20abb3];return _0x51e570;}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a149_0x2b0313(0x12e));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a149_0x2b0313(0x125):a149_0x2b0313(0x127));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a149_0x2b0313(0x11c):a149_0x2b0313(0x123));export const getAppDomain=()=>isProduction(getEnv())?a149_0x2b0313(0x11b):'https://daily.lovrabet.com';function a149_0x2149(){const _0x327404=['/web-app/app/','3523NMeZBE','runtimeDomain','https://app.lovrabet.com','https://runtime.lovrabet.com','6HoHBvP','369UcBxIz','396hlawpl','1341215XTQfCy','trim','20804qgXBEj','https://daily-runtime.lovrabet.com','46156GzFmkh','https://api.lovrabet.com','172390HTSBUm','https://daily-api.lovrabet.com','771eruNKJ','443IiCeKo','1760kDtyLF','/app/','userDomain','1706RmTRYa','https://user-daily.lovrabet.com','11576cLAGms','22498lclVZE'];a149_0x2149=function(){return _0x327404;};return a149_0x2149();}export const getAppBaseUrl=_0x337e29=>{const _0x45df13=a149_0x2b0313,_0x2af585=encodeURIComponent(_0x337e29[_0x45df13(0x121)]());return isProduction(getEnv())?getAppDomain()+_0x45df13(0x12b)+_0x2af585:getAppDomain()+_0x45df13(0x118)+_0x2af585;};
@@ -1 +1 @@
1
- const a150_0x48a9a9=a150_0x1fbd;(function(_0x371369,_0x5d872e){const _0x39d94f=a150_0x1fbd,_0xe95999=_0x371369();while(!![]){try{const _0x4c6733=-parseInt(_0x39d94f(0xca))/0x1+parseInt(_0x39d94f(0xc5))/0x2*(-parseInt(_0x39d94f(0xcd))/0x3)+-parseInt(_0x39d94f(0xc7))/0x4*(parseInt(_0x39d94f(0xce))/0x5)+parseInt(_0x39d94f(0xc8))/0x6+parseInt(_0x39d94f(0xc6))/0x7+parseInt(_0x39d94f(0xcf))/0x8*(parseInt(_0x39d94f(0xcc))/0x9)+-parseInt(_0x39d94f(0xc9))/0xa;if(_0x4c6733===_0x5d872e)break;else _0xe95999['push'](_0xe95999['shift']());}catch(_0x34cabf){_0xe95999['push'](_0xe95999['shift']());}}}(a150_0x1872,0x5e52c));export const RABETBASE_ENV_VALUES=['production','daily'];export function normalizeEnv(_0x5fe13e){const _0x4c9e29=a150_0x1fbd;return _0x5fe13e===_0x4c9e29(0xcb)?_0x4c9e29(0xc4):_0x5fe13e;}function a150_0x1fbd(_0x31f08a,_0x3157a6){_0x31f08a=_0x31f08a-0xc1;const _0x18723d=a150_0x1872();let _0x1fbdf4=_0x18723d[_0x31f08a];return _0x1fbdf4;}export function isProduction(_0x3674f8){const _0x40a9f7=a150_0x1fbd;return normalizeEnv(_0x3674f8)===_0x40a9f7(0xc4);}function a150_0x1872(){const _0xce2a30=['652ATEIGf','4657016ifwzXy','445988XlsXdR','771810VEuDBs','49000NtppSb','435253YETxKG','online','63TwHwqp','3333wtDToz','5weMtJz','578584ovKrPj','daily','dev','development','production'];a150_0x1872=function(){return _0xce2a30;};return a150_0x1872();}export function isDaily(_0x3ac029){const _0x2ff5e4=a150_0x1fbd;return normalizeEnv(_0x3ac029)===_0x2ff5e4(0xc1);}export function isDev(_0x503ef2){const _0x2bbdee=a150_0x1fbd,_0x1cd9d8=normalizeEnv(_0x503ef2);return _0x1cd9d8===_0x2bbdee(0xc3)||_0x1cd9d8===_0x2bbdee(0xc2);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a150_0x48a9a9(0xc4));export function getEnv(){return env;}export function initEnv(_0x52725c){env=normalizeEnv(_0x52725c);}
1
+ const a150_0x30658b=a150_0x386c;(function(_0x215ccf,_0x5149ba){const _0x628331=a150_0x386c,_0x3fb8cf=_0x215ccf();while(!![]){try{const _0x5f3686=-parseInt(_0x628331(0xaa))/0x1+parseInt(_0x628331(0xa4))/0x2*(parseInt(_0x628331(0xa5))/0x3)+-parseInt(_0x628331(0xa7))/0x4+parseInt(_0x628331(0xad))/0x5*(-parseInt(_0x628331(0xa8))/0x6)+parseInt(_0x628331(0xb0))/0x7+parseInt(_0x628331(0xae))/0x8+parseInt(_0x628331(0xac))/0x9;if(_0x5f3686===_0x5149ba)break;else _0x3fb8cf['push'](_0x3fb8cf['shift']());}catch(_0x2b4999){_0x3fb8cf['push'](_0x3fb8cf['shift']());}}}(a150_0x1ed2,0xe0358));export const RABETBASE_ENV_VALUES=['production',a150_0x30658b(0xa9)];function a150_0x386c(_0x4ea040,_0x4fa6b7){_0x4ea040=_0x4ea040-0xa4;const _0x1ed211=a150_0x1ed2();let _0x386c27=_0x1ed211[_0x4ea040];return _0x386c27;}export function normalizeEnv(_0x547bfb){return _0x547bfb==='online'?'production':_0x547bfb;}export function isProduction(_0x85d79c){return normalizeEnv(_0x85d79c)==='production';}export function isDaily(_0x342263){const _0x9964a1=a150_0x30658b;return normalizeEnv(_0x342263)===_0x9964a1(0xa9);}export function isDev(_0x118b98){const _0x29ae99=a150_0x30658b,_0x50c777=normalizeEnv(_0x118b98);return _0x50c777===_0x29ae99(0xaf)||_0x50c777===_0x29ae99(0xab);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a150_0x30658b(0xa6));export function getEnv(){return env;}export function initEnv(_0x56b0bd){env=normalizeEnv(_0x56b0bd);}function a150_0x1ed2(){const _0x407102=['development','1763097wJtAMg','2FuUNCI','4091775ECMxHL','production','3929092fYlWyu','890658fYukFN','daily','282868whEvcU','dev','12083211oOsJli','45WtJTTx','4488904ADWUGd'];a150_0x1ed2=function(){return _0x407102;};return a150_0x1ed2();}
@@ -1 +1 @@
1
- const a151_0x295019=a151_0x404b;function a151_0x404b(_0x8d48de,_0x351593){_0x8d48de=_0x8d48de-0x1bd;const _0x2fed40=a151_0x2fed();let _0x404b8b=_0x2fed40[_0x8d48de];return _0x404b8b;}function a151_0x2fed(){const _0x25a4d5=['compress','59442Miyrna','3689112DErblA','145xjwysK','457856ErXxlU','pretty','970335RbmEaC','38687YuPBIF','8TTaBXr','15698tXyTfw','86GzLrMd','18970pfjhIH','2142ByvQcH','1428dplqvF'];a151_0x2fed=function(){return _0x25a4d5;};return a151_0x2fed();}(function(_0x720286,_0x275f73){const _0x4ee28b=a151_0x404b,_0x3ca7f2=_0x720286();while(!![]){try{const _0x2a1d8c=parseInt(_0x4ee28b(0x1c2))/0x1*(-parseInt(_0x4ee28b(0x1c1))/0x2)+parseInt(_0x4ee28b(0x1be))/0x3+parseInt(_0x4ee28b(0x1ca))/0x4+-parseInt(_0x4ee28b(0x1c9))/0x5*(-parseInt(_0x4ee28b(0x1c7))/0x6)+-parseInt(_0x4ee28b(0x1c8))/0x7*(parseInt(_0x4ee28b(0x1c0))/0x8)+-parseInt(_0x4ee28b(0x1c4))/0x9*(-parseInt(_0x4ee28b(0x1c3))/0xa)+parseInt(_0x4ee28b(0x1bf))/0xb*(parseInt(_0x4ee28b(0x1c5))/0xc);if(_0x2a1d8c===_0x275f73)break;else _0x3ca7f2['push'](_0x3ca7f2['shift']());}catch(_0x281050){_0x3ca7f2['push'](_0x3ca7f2['shift']());}}}(a151_0x2fed,0x5ffe7));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a151_0x295019(0x1bd),a151_0x295019(0x1c6)];
1
+ (function(_0x317eca,_0x2a5381){const _0x164ec1=a151_0x313b,_0x49a8ff=_0x317eca();while(!![]){try{const _0x4d54c0=-parseInt(_0x164ec1(0x17c))/0x1*(-parseInt(_0x164ec1(0x17a))/0x2)+parseInt(_0x164ec1(0x17d))/0x3*(parseInt(_0x164ec1(0x17b))/0x4)+-parseInt(_0x164ec1(0x174))/0x5*(-parseInt(_0x164ec1(0x175))/0x6)+parseInt(_0x164ec1(0x176))/0x7+parseInt(_0x164ec1(0x177))/0x8*(parseInt(_0x164ec1(0x178))/0x9)+parseInt(_0x164ec1(0x179))/0xa+-parseInt(_0x164ec1(0x173))/0xb;if(_0x4d54c0===_0x2a5381)break;else _0x49a8ff['push'](_0x49a8ff['shift']());}catch(_0x249814){_0x49a8ff['push'](_0x49a8ff['shift']());}}}(a151_0x5a67,0x40caa));function a151_0x313b(_0x5db5f8,_0x4d88d5){_0x5db5f8=_0x5db5f8-0x173;const _0x5a67d0=a151_0x5a67();let _0x313bd3=_0x5a67d0[_0x5db5f8];return _0x313bd3;}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json','pretty','compress'];function a151_0x5a67(){const _0xdaed73=['51321FWPODp','12966250sdpsvR','5QQTtgv','1143918NVupOa','1817949aDKJgw','224EryvEU','67131ZpMfeo','320920vWEzOD','114XHgDnK','84YvefVz','6905mxQAJz'];a151_0x5a67=function(){return _0xdaed73;};return a151_0x5a67();}
@@ -1 +1 @@
1
- function a152_0x519e(_0x49ec65,_0x3a3381){_0x49ec65=_0x49ec65-0x180;const _0x25b222=a152_0x25b2();let _0x519e98=_0x25b222[_0x49ec65];return _0x519e98;}function a152_0x25b2(){const _0x540577=['289233nJqTly','2147692tuUQhP','1161587yXrtjT','1714923IuBuut','782IXwqaQ','337FKlKvn','687678MHTWsO','24ObaSOZ','693625fjVXDW','./src/api'];a152_0x25b2=function(){return _0x540577;};return a152_0x25b2();}const a152_0x276d92=a152_0x519e;(function(_0x4bd387,_0x169522){const _0x66a8ba=a152_0x519e,_0x5b5706=_0x4bd387();while(!![]){try{const _0xb2aa0e=parseInt(_0x66a8ba(0x188))/0x1*(-parseInt(_0x66a8ba(0x187))/0x2)+-parseInt(_0x66a8ba(0x186))/0x3+parseInt(_0x66a8ba(0x184))/0x4+parseInt(_0x66a8ba(0x181))/0x5+-parseInt(_0x66a8ba(0x189))/0x6+parseInt(_0x66a8ba(0x185))/0x7*(parseInt(_0x66a8ba(0x180))/0x8)+parseInt(_0x66a8ba(0x183))/0x9;if(_0xb2aa0e===_0x169522)break;else _0x5b5706['push'](_0x5b5706['shift']());}catch(_0x96fa5){_0x5b5706['push'](_0x5b5706['shift']());}}}(a152_0x25b2,0x5ea03));export const DEFAULT_API_DIR=a152_0x276d92(0x182);
1
+ function a152_0x93ff(){const _0x4ba444=['3622416QPRPvJ','228067ntcBHv','20JpvrAV','7119279twFAlQ','5044204PCUTIe','44vxFkti','8xnAGkU','126XagsFI','49011kftmAQ','984880EbkJDr','69vGhUPI','29790vlbIRE','26zovsdl'];a152_0x93ff=function(){return _0x4ba444;};return a152_0x93ff();}(function(_0x35e47b,_0x5e15de){const _0x41285b=a152_0x4875,_0x4fdd3a=_0x35e47b();while(!![]){try{const _0x5d4928=parseInt(_0x41285b(0x11b))/0x1*(parseInt(_0x41285b(0x11c))/0x2)+parseInt(_0x41285b(0x119))/0x3*(parseInt(_0x41285b(0x116))/0x4)+-parseInt(_0x41285b(0x11a))/0x5+parseInt(_0x41285b(0x118))/0x6*(parseInt(_0x41285b(0x112))/0x7)+-parseInt(_0x41285b(0x117))/0x8*(parseInt(_0x41285b(0x114))/0x9)+parseInt(_0x41285b(0x113))/0xa*(-parseInt(_0x41285b(0x115))/0xb)+parseInt(_0x41285b(0x111))/0xc*(parseInt(_0x41285b(0x11d))/0xd);if(_0x5d4928===_0x5e15de)break;else _0x4fdd3a['push'](_0x4fdd3a['shift']());}catch(_0x17f547){_0x4fdd3a['push'](_0x4fdd3a['shift']());}}}(a152_0x93ff,0x901b8));function a152_0x4875(_0x16b904,_0x1515c6){_0x16b904=_0x16b904-0x111;const _0x93ffc8=a152_0x93ff();let _0x4875f6=_0x93ffc8[_0x16b904];return _0x4875f6;}export const DEFAULT_API_DIR='./src/api';
@@ -1 +1 @@
1
- const a153_0x4b3b20=a153_0x26ec;function a153_0x5cf1(){const _0x465a3d=['80022usUvXi','132141cTewwd','38VGMKlZ','35230coipFy','40qVwtRJ','265836wNVnWe','48235zrykZw','1631754iCbTjZ','read','42YJOegI','8AOKdGa','13554VduvzC','11GeZogk'];a153_0x5cf1=function(){return _0x465a3d;};return a153_0x5cf1();}(function(_0x1df98f,_0x13a496){const _0x496e99=a153_0x26ec,_0x143846=_0x1df98f();while(!![]){try{const _0x1da4fe=-parseInt(_0x496e99(0x1e7))/0x1+-parseInt(_0x496e99(0x1db))/0x2*(-parseInt(_0x496e99(0x1e4))/0x3)+parseInt(_0x496e99(0x1dd))/0x4*(parseInt(_0x496e99(0x1df))/0x5)+-parseInt(_0x496e99(0x1e6))/0x6*(parseInt(_0x496e99(0x1e2))/0x7)+-parseInt(_0x496e99(0x1e3))/0x8*(-parseInt(_0x496e99(0x1e0))/0x9)+parseInt(_0x496e99(0x1dc))/0xa+-parseInt(_0x496e99(0x1e5))/0xb*(-parseInt(_0x496e99(0x1de))/0xc);if(_0x1da4fe===_0x13a496)break;else _0x143846['push'](_0x143846['shift']());}catch(_0x1ebc85){_0x143846['push'](_0x143846['shift']());}}}(a153_0x5cf1,0x2b3eb));function a153_0x26ec(_0x4a836b,_0x4cef4e){_0x4a836b=_0x4a836b-0x1db;const _0x5cf1ca=a153_0x5cf1();let _0x26ec13=_0x5cf1ca[_0x4a836b];return _0x26ec13;}export const RISK_LEVEL_VALUES=[a153_0x4b3b20(0x1e1),'write','high-risk-write'];
1
+ const a153_0xc2808f=a153_0xb536;function a153_0xb536(_0x58c77a,_0x49f37d){_0x58c77a=_0x58c77a-0x1c9;const _0x40e420=a153_0x40e4();let _0xb536ea=_0x40e420[_0x58c77a];return _0xb536ea;}function a153_0x40e4(){const _0x5f08b7=['read','4034240txbVcx','840759QozKDR','3284Ufooiu','9yHjOlG','4195UExXrJ','304048fJEEMd','4075368wOxMvU','2443360jFvmwB','2futkLX','5397644VZeAfH'];a153_0x40e4=function(){return _0x5f08b7;};return a153_0x40e4();}(function(_0x379b15,_0x3ff3d7){const _0x7663bc=a153_0xb536,_0x36d5d5=_0x379b15();while(!![]){try{const _0x2a944a=parseInt(_0x7663bc(0x1d2))/0x1+-parseInt(_0x7663bc(0x1ca))/0x2*(-parseInt(_0x7663bc(0x1ce))/0x3)+parseInt(_0x7663bc(0x1cf))/0x4*(parseInt(_0x7663bc(0x1d1))/0x5)+parseInt(_0x7663bc(0x1d3))/0x6+-parseInt(_0x7663bc(0x1cb))/0x7+-parseInt(_0x7663bc(0x1cd))/0x8*(parseInt(_0x7663bc(0x1d0))/0x9)+-parseInt(_0x7663bc(0x1c9))/0xa;if(_0x2a944a===_0x3ff3d7)break;else _0x36d5d5['push'](_0x36d5d5['shift']());}catch(_0x4130e3){_0x36d5d5['push'](_0x36d5d5['shift']());}}}(a153_0x40e4,0x69a00));export const RISK_LEVEL_VALUES=[a153_0xc2808f(0x1cc),'write','high-risk-write'];
@@ -1 +1 @@
1
- (function(_0x1f1728,_0x14240b){const _0x51cbf5=a154_0x81e6,_0x24e0f6=_0x1f1728();while(!![]){try{const _0x1fa9d7=-parseInt(_0x51cbf5(0x157))/0x1*(-parseInt(_0x51cbf5(0x13e))/0x2)+parseInt(_0x51cbf5(0x155))/0x3+-parseInt(_0x51cbf5(0x158))/0x4+parseInt(_0x51cbf5(0x147))/0x5*(parseInt(_0x51cbf5(0x13f))/0x6)+parseInt(_0x51cbf5(0x140))/0x7*(parseInt(_0x51cbf5(0x151))/0x8)+parseInt(_0x51cbf5(0x148))/0x9*(parseInt(_0x51cbf5(0x14f))/0xa)+-parseInt(_0x51cbf5(0x14c))/0xb;if(_0x1fa9d7===_0x14240b)break;else _0x24e0f6['push'](_0x24e0f6['shift']());}catch(_0xf5f21e){_0x24e0f6['push'](_0x24e0f6['shift']());}}}(a154_0x4194,0x5e7ae));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';function a154_0x81e6(_0x283f43,_0x214929){_0x283f43=_0x283f43-0x138;const _0x419467=a154_0x4194();let _0x81e629=_0x419467[_0x283f43];return _0x81e629;}import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x185bcf){const _0x3e55ed=a154_0x81e6;return typeof _0x185bcf===_0x3e55ed(0x159)&&_0x185bcf['trim']()?_0x185bcf[_0x3e55ed(0x15f)]():undefined;}function a154_0x4194(){const _0x1ddcde=['20652720qbejAY','cookie','FORMAT','8420vcTmuN','keys','8TyXpnZ','ENV','read','RISK_LEVEL','2074206NFGuoz','maxRisk','625uBeuLZ','2512876PXziEj','string','locale','riskLevel','length','COOKIE','PAGE_SIZE','trim','production','MAX_RISK','accessKey','APP','ACCESS_KEY','env','globalConfig','object','appcode','app','2298msLqBX','68766IeKOSj','4261299aIGMFY','VERBOSE','true','inherit','projectConfig','defaultApp','format','315wXfDnX','1629qpSYwa','apps','entries','apiDir'];a154_0x4194=function(){return _0x1ddcde;};return a154_0x4194();}function appProfiles(_0x543c9b){const _0x5e0ecd=a154_0x81e6;return _0x543c9b[_0x5e0ecd(0x149)]&&typeof _0x543c9b[_0x5e0ecd(0x149)]===_0x5e0ecd(0x13b)?_0x543c9b[_0x5e0ecd(0x149)]:{};}function resolveDefaultAppName(_0x42684b){const _0x4141f1=a154_0x81e6,_0x13179a=stringConfigValue(_0x42684b[_0x4141f1(0x145)]);if(_0x13179a)return _0x13179a;return Object[_0x4141f1(0x150)](appProfiles(_0x42684b))[0x0];}function resolveTopLevelAppCode(_0x503983){const _0x290c0a=a154_0x81e6;return stringConfigValue(_0x503983[_0x290c0a(0x13c)])||stringConfigValue(_0x503983[_0x290c0a(0x13d)]);}export function resolveAppConfig({raw:_0x5304f9,flags:_0x425475,layers:_0x4e1c92,readEnv:_0x49a130}){const _0x16218c=a154_0x81e6,_0x29847e=_0x4e1c92?.[_0x16218c(0x144)]??{},_0x342c64=_0x4e1c92?.[_0x16218c(0x13a)]??{},_0x4c4943=Object[_0x16218c(0x150)](_0x29847e)[_0x16218c(0x15c)]>0x0,_0x170490=!_0x4c4943||_0x29847e[_0x16218c(0x143)]===!![],_0x4df915=_0x4c4943?resolveDefaultAppName(_0x29847e):undefined,_0x3ad21a=_0x170490?resolveDefaultAppName(_0x342c64):undefined,_0x4db9fe=stringConfigValue(_0x425475[_0x16218c(0x13d)]),_0x46ef2d=_0x49a130(_0x16218c(0x163)),_0x7e0fa5={};if(_0x5304f9[_0x16218c(0x149)]&&typeof _0x5304f9[_0x16218c(0x149)]===_0x16218c(0x13b))for(const [_0x44385e,_0x4c838b]of Object[_0x16218c(0x14a)](_0x5304f9[_0x16218c(0x149)])){_0x4c838b&&typeof _0x4c838b===_0x16218c(0x13b)&&_0x4c838b[_0x16218c(0x13c)]&&(_0x7e0fa5[_0x44385e]=_0x4c838b);}const _0x3d8eb3=_0x5304f9['defaultApp']||undefined,_0x403a6e=Object['keys'](_0x7e0fa5)[_0x16218c(0x15c)]>0x0,_0x52574d=_0x4db9fe||_0x4df915||_0x46ef2d||_0x3ad21a||_0x3d8eb3||undefined,_0x181695=stringConfigValue(_0x425475[_0x16218c(0x13c)]),_0x4e9795=_0x181695?Object[_0x16218c(0x14a)](_0x7e0fa5)['find'](([,_0xd218c1])=>_0xd218c1?.[_0x16218c(0x13c)]===_0x181695):undefined,_0xdc9eae=_0x4e9795?.[0x0],_0x421f3b=_0x4e9795?.[0x1],_0x14df99=_0x181695?_0xdc9eae:_0x52574d;let _0x56b253=_0x14df99&&_0x7e0fa5[_0x14df99]?_0x7e0fa5[_0x14df99]:undefined;_0x181695&&_0x421f3b&&(_0x56b253=_0x421f3b);const _0x45952e=_0x181695?_0x421f3b??_0x56b253:_0x56b253,_0x261cc8=!_0x4db9fe&&!_0x4df915&&_0x46ef2d&&_0x14df99===_0x46ef2d,_0x613268=_0x4db9fe||(_0x261cc8?_0x46ef2d:undefined)||(_0x181695?_0xdc9eae:undefined),_0x217789=_0x45952e?.['appcode'],_0x38316a=_0x4c4943?resolveTopLevelAppCode(_0x29847e):undefined,_0x464532=_0x170490?resolveTopLevelAppCode(_0x342c64):undefined,_0x586804=_0x4db9fe||_0x4df915?_0x217789:undefined,_0x22e338=!_0x4db9fe&&!_0x4df915?_0x217789:undefined,_0x194907=_0x181695||_0x586804||_0x38316a||_0x22e338||_0x464532||undefined,_0x37c8b7=_0x4c4943?stringConfigValue(_0x29847e['env']):undefined,_0xade2fb=_0x170490?stringConfigValue(_0x342c64[_0x16218c(0x139)]):undefined,_0x477ebd=_0x425475['env']||_0x45952e?.[_0x16218c(0x139)]||_0x37c8b7||_0x49a130(_0x16218c(0x152))||_0xade2fb||_0x5304f9[_0x16218c(0x139)]||DEFAULT_CONFIG_VALUES[_0x16218c(0x139)],_0x1e02eb=_0x45952e?.[_0x16218c(0x15a)]||_0x5304f9[_0x16218c(0x15a)]||DEFAULT_CONFIG_VALUES[_0x16218c(0x15a)],_0x2a2077=_0x49a130(_0x16218c(0x15d))||_0x45952e?.[_0x16218c(0x14d)]||_0x5304f9[_0x16218c(0x14d)]||undefined,_0x81b059=_0x49a130(_0x16218c(0x138))||_0x45952e?.[_0x16218c(0x162)]||_0x5304f9[_0x16218c(0x162)]||undefined,_0x428273=_0x425475['format']||_0x49a130(_0x16218c(0x14e))||_0x45952e?.[_0x16218c(0x146)]||_0x5304f9[_0x16218c(0x146)],_0x58dbad=normalizeLegacyOutputFormat(_0x428273),_0x5507ed=_0x49a130(_0x16218c(0x15e))||_0x45952e?.['pageSize']||_0x5304f9['pageSize'],_0x45b8ba=_0x5507ed?Number(_0x5507ed)||undefined:undefined,_0x22c29c=_0x49a130(_0x16218c(0x154))||_0x49a130(_0x16218c(0x161))||_0x45952e?.[_0x16218c(0x15b)]||_0x5304f9[_0x16218c(0x15b)]||_0x5304f9[_0x16218c(0x156)],_0x542e9b=_0x22c29c===_0x16218c(0x153)||_0x22c29c==='write'?_0x22c29c:DEFAULT_CONFIG_VALUES[_0x16218c(0x15b)],_0x1fce76=_0x49a130(_0x16218c(0x141)),_0x236123=_0x1fce76==='1'||_0x1fce76===_0x16218c(0x142),_0x5b43b5=_0x45952e?.[_0x16218c(0x14b)]||_0x5304f9['apiDir']||DEFAULT_CONFIG_VALUES[_0x16218c(0x14b)],_0x4a0de9=isDaily(normalizeEnv(String(_0x477ebd)))?'daily':_0x16218c(0x160);return{'appCode':typeof _0x194907===_0x16218c(0x159)&&_0x194907[_0x16218c(0x15f)]()?_0x194907['trim']():undefined,'env':_0x4a0de9,'locale':_0x1e02eb,'cookie':_0x2a2077,'accessKey':_0x81b059,'format':_0x58dbad,'pageSize':_0x45b8ba,'riskLevel':_0x542e9b,'verbose':_0x236123,'apiDir':_0x5b43b5,'apps':_0x7e0fa5,'defaultApp':_0x3d8eb3,'currentApp':_0x403a6e?_0x14df99:undefined,'explicitAppName':_0x613268};}
1
+ (function(_0x4359d0,_0x514dca){const _0x2e1b71=a154_0x3ef1,_0x1fcb75=_0x4359d0();while(!![]){try{const _0x2e2a5c=parseInt(_0x2e1b71(0x126))/0x1+-parseInt(_0x2e1b71(0x13d))/0x2+-parseInt(_0x2e1b71(0x14a))/0x3+parseInt(_0x2e1b71(0x149))/0x4*(parseInt(_0x2e1b71(0x143))/0x5)+parseInt(_0x2e1b71(0x12f))/0x6*(parseInt(_0x2e1b71(0x140))/0x7)+parseInt(_0x2e1b71(0x133))/0x8+-parseInt(_0x2e1b71(0x135))/0x9;if(_0x2e2a5c===_0x514dca)break;else _0x1fcb75['push'](_0x1fcb75['shift']());}catch(_0x2032aa){_0x1fcb75['push'](_0x1fcb75['shift']());}}}(a154_0x3821,0x448e1));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function a154_0x3821(){const _0x382068=['1970712IdOEGk','PAGE_SIZE','1424700YwLuVT','true','RISK_LEVEL','pageSize','string','read','FORMAT','find','483548iICFIi','defaultApp','appcode','345317HeDEob','trim','apps','120jRmWMp','maxRisk','object','keys','APP','apiDir','3444DRiJkM','328539KMdpss','cookie','env','write','format','riskLevel','375392tVwrBn','entries','locale','inherit','app','MAX_RISK','VERBOSE','length','accessKey','18wMJJsV','COOKIE','ACCESS_KEY','globalConfig'];a154_0x3821=function(){return _0x382068;};return a154_0x3821();}function stringConfigValue(_0x39cd41){const _0x41e5ba=a154_0x3ef1;return typeof _0x39cd41==='string'&&_0x39cd41['trim']()?_0x39cd41[_0x41e5ba(0x141)]():undefined;}function appProfiles(_0x535f56){const _0x5a27e0=a154_0x3ef1;return _0x535f56[_0x5a27e0(0x142)]&&typeof _0x535f56['apps']===_0x5a27e0(0x145)?_0x535f56['apps']:{};}function resolveDefaultAppName(_0x20eee3){const _0x35de88=a154_0x3ef1,_0x5c1381=stringConfigValue(_0x20eee3[_0x35de88(0x13e)]);if(_0x5c1381)return _0x5c1381;return Object[_0x35de88(0x146)](appProfiles(_0x20eee3))[0x0];}function a154_0x3ef1(_0x42a9f4,_0x127859){_0x42a9f4=_0x42a9f4-0x121;const _0x382197=a154_0x3821();let _0x3ef128=_0x382197[_0x42a9f4];return _0x3ef128;}function resolveTopLevelAppCode(_0x7ad20b){const _0x3951b3=a154_0x3ef1;return stringConfigValue(_0x7ad20b[_0x3951b3(0x13f)])||stringConfigValue(_0x7ad20b[_0x3951b3(0x12a)]);}export function resolveAppConfig({raw:_0x67e5b8,flags:_0x5e4968,layers:_0xc30ac3,readEnv:_0x77b1be}){const _0x361978=a154_0x3ef1,_0x296fba=_0xc30ac3?.['projectConfig']??{},_0x5b0b43=_0xc30ac3?.[_0x361978(0x132)]??{},_0x364d35=Object[_0x361978(0x146)](_0x296fba)['length']>0x0,_0x3dd9ab=!_0x364d35||_0x296fba[_0x361978(0x129)]===!![],_0x31373a=_0x364d35?resolveDefaultAppName(_0x296fba):undefined,_0xb02c46=_0x3dd9ab?resolveDefaultAppName(_0x5b0b43):undefined,_0x178e32=stringConfigValue(_0x5e4968[_0x361978(0x12a)]),_0x4dbeb8=_0x77b1be(_0x361978(0x147)),_0xd95d8={};if(_0x67e5b8[_0x361978(0x142)]&&typeof _0x67e5b8[_0x361978(0x142)]==='object')for(const [_0x344edb,_0x33d5e9]of Object['entries'](_0x67e5b8['apps'])){_0x33d5e9&&typeof _0x33d5e9===_0x361978(0x145)&&_0x33d5e9[_0x361978(0x13f)]&&(_0xd95d8[_0x344edb]=_0x33d5e9);}const _0x3743c5=_0x67e5b8[_0x361978(0x13e)]||undefined,_0x2dfb89=Object[_0x361978(0x146)](_0xd95d8)[_0x361978(0x12d)]>0x0,_0x29ea5c=_0x178e32||_0x31373a||_0x4dbeb8||_0xb02c46||_0x3743c5||undefined,_0x4263d7=stringConfigValue(_0x5e4968[_0x361978(0x13f)]),_0x5287ce=_0x4263d7?Object[_0x361978(0x127)](_0xd95d8)[_0x361978(0x13c)](([,_0xa1dc9f])=>_0xa1dc9f?.['appcode']===_0x4263d7):undefined,_0x6ffa9d=_0x5287ce?.[0x0],_0x13d914=_0x5287ce?.[0x1],_0x206c01=_0x4263d7?_0x6ffa9d:_0x29ea5c;let _0x2fe634=_0x206c01&&_0xd95d8[_0x206c01]?_0xd95d8[_0x206c01]:undefined;_0x4263d7&&_0x13d914&&(_0x2fe634=_0x13d914);const _0x2cae82=_0x4263d7?_0x13d914??_0x2fe634:_0x2fe634,_0x2e2d89=!_0x178e32&&!_0x31373a&&_0x4dbeb8&&_0x206c01===_0x4dbeb8,_0x80e2dc=_0x178e32||(_0x2e2d89?_0x4dbeb8:undefined)||(_0x4263d7?_0x6ffa9d:undefined),_0x1044df=_0x2cae82?.[_0x361978(0x13f)],_0x2d0c4e=_0x364d35?resolveTopLevelAppCode(_0x296fba):undefined,_0x71b081=_0x3dd9ab?resolveTopLevelAppCode(_0x5b0b43):undefined,_0x41259e=_0x178e32||_0x31373a?_0x1044df:undefined,_0x3ba536=!_0x178e32&&!_0x31373a?_0x1044df:undefined,_0xb48af6=_0x4263d7||_0x41259e||_0x2d0c4e||_0x3ba536||_0x71b081||undefined,_0x4b73ba=_0x364d35?stringConfigValue(_0x296fba[_0x361978(0x122)]):undefined,_0x7e175a=_0x3dd9ab?stringConfigValue(_0x5b0b43[_0x361978(0x122)]):undefined,_0x194e79=_0x5e4968['env']||_0x2cae82?.[_0x361978(0x122)]||_0x4b73ba||_0x77b1be('ENV')||_0x7e175a||_0x67e5b8[_0x361978(0x122)]||DEFAULT_CONFIG_VALUES[_0x361978(0x122)],_0x4caf8d=_0x2cae82?.[_0x361978(0x128)]||_0x67e5b8[_0x361978(0x128)]||DEFAULT_CONFIG_VALUES[_0x361978(0x128)],_0x7a9f5a=_0x77b1be(_0x361978(0x130))||_0x2cae82?.[_0x361978(0x121)]||_0x67e5b8['cookie']||undefined,_0x40b181=_0x77b1be(_0x361978(0x131))||_0x2cae82?.[_0x361978(0x12e)]||_0x67e5b8[_0x361978(0x12e)]||undefined,_0x2b1d65=_0x5e4968['format']||_0x77b1be(_0x361978(0x13b))||_0x2cae82?.[_0x361978(0x124)]||_0x67e5b8['format'],_0x2c2331=normalizeLegacyOutputFormat(_0x2b1d65),_0x330525=_0x77b1be(_0x361978(0x134))||_0x2cae82?.[_0x361978(0x138)]||_0x67e5b8[_0x361978(0x138)],_0x48fd59=_0x330525?Number(_0x330525)||undefined:undefined,_0x5abb7a=_0x77b1be(_0x361978(0x137))||_0x77b1be(_0x361978(0x12b))||_0x2cae82?.['riskLevel']||_0x67e5b8[_0x361978(0x125)]||_0x67e5b8[_0x361978(0x144)],_0x153399=_0x5abb7a===_0x361978(0x13a)||_0x5abb7a===_0x361978(0x123)?_0x5abb7a:DEFAULT_CONFIG_VALUES[_0x361978(0x125)],_0x4d1af6=_0x77b1be(_0x361978(0x12c)),_0x3c76ca=_0x4d1af6==='1'||_0x4d1af6===_0x361978(0x136),_0x206ef4=_0x2cae82?.[_0x361978(0x148)]||_0x67e5b8[_0x361978(0x148)]||DEFAULT_CONFIG_VALUES[_0x361978(0x148)],_0x1060b5=isDaily(normalizeEnv(String(_0x194e79)))?'daily':'production';return{'appCode':typeof _0xb48af6===_0x361978(0x139)&&_0xb48af6[_0x361978(0x141)]()?_0xb48af6['trim']():undefined,'env':_0x1060b5,'locale':_0x4caf8d,'cookie':_0x7a9f5a,'accessKey':_0x40b181,'format':_0x2c2331,'pageSize':_0x48fd59,'riskLevel':_0x153399,'verbose':_0x3c76ca,'apiDir':_0x206ef4,'apps':_0xd95d8,'defaultApp':_0x3743c5,'currentApp':_0x2dfb89?_0x206c01:undefined,'explicitAppName':_0x80e2dc};}
@@ -1 +1 @@
1
- function a155_0x367c(){const _0x32444c=['authRequired','203570CeujqG','847HBYlPu','1877670cWgjrt','3135879DFcKYC','../auth/get-cookie.js','11984lydZwd','778917mKFvIg','138737RRxJbe','2SNYnus','1111836qNOdTV','cookie'];a155_0x367c=function(){return _0x32444c;};return a155_0x367c();}(function(_0x2249ef,_0x4cb62a){const _0x5b177c=a155_0x3c98,_0x649d01=_0x2249ef();while(!![]){try{const _0x4ed99f=-parseInt(_0x5b177c(0x127))/0x1*(parseInt(_0x5b177c(0x128))/0x2)+parseInt(_0x5b177c(0x126))/0x3+parseInt(_0x5b177c(0x129))/0x4+parseInt(_0x5b177c(0x12c))/0x5+parseInt(_0x5b177c(0x12e))/0x6+-parseInt(_0x5b177c(0x12d))/0x7*(parseInt(_0x5b177c(0x125))/0x8)+-parseInt(_0x5b177c(0x12f))/0x9;if(_0x4ed99f===_0x4cb62a)break;else _0x649d01['push'](_0x649d01['shift']());}catch(_0x30a362){_0x649d01['push'](_0x649d01['shift']());}}}(a155_0x367c,0x3666f));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a155_0x3c98(_0x457154,_0x32e2db){_0x457154=_0x457154-0x125;const _0x367c84=a155_0x367c();let _0x3c98c2=_0x367c84[_0x457154];return _0x3c98c2;}export async function buildAuth(_0x24efe1){const _0x12d14b=a155_0x3c98,{getCookie:_0x1f821c}=await import(_0x12d14b(0x130)),_0x31d735=_0x24efe1[_0x12d14b(0x12a)]||_0x1f821c(),_0x187bc1=_0x31d735?await getIsSessionValid():![];return{'cookie':_0x31d735,'isLoggedIn':_0x187bc1,async 'getOrLogin'(){const _0x60e5df=_0x12d14b;if(_0x31d735&&_0x187bc1)return _0x31d735;throw CliErrors[_0x60e5df(0x12b)]();}};}
1
+ function a155_0x50aa(_0x2d33e7,_0x30e330){_0x2d33e7=_0x2d33e7-0xa4;const _0x40de4a=a155_0x40de();let _0x50aa23=_0x40de4a[_0x2d33e7];return _0x50aa23;}(function(_0x76fd14,_0x2ab340){const _0x1d4d55=a155_0x50aa,_0x411bff=_0x76fd14();while(!![]){try{const _0x13d66c=parseInt(_0x1d4d55(0xa5))/0x1*(parseInt(_0x1d4d55(0xab))/0x2)+parseInt(_0x1d4d55(0xa8))/0x3+-parseInt(_0x1d4d55(0xa7))/0x4*(parseInt(_0x1d4d55(0xa9))/0x5)+parseInt(_0x1d4d55(0xa4))/0x6*(parseInt(_0x1d4d55(0xae))/0x7)+-parseInt(_0x1d4d55(0xb1))/0x8*(-parseInt(_0x1d4d55(0xa6))/0x9)+parseInt(_0x1d4d55(0xac))/0xa+-parseInt(_0x1d4d55(0xaf))/0xb*(parseInt(_0x1d4d55(0xaa))/0xc);if(_0x13d66c===_0x2ab340)break;else _0x411bff['push'](_0x411bff['shift']());}catch(_0x5bdc80){_0x411bff['push'](_0x411bff['shift']());}}}(a155_0x40de,0x4d54a));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x3f07a1){const _0x2e52d8=a155_0x50aa,{getCookie:_0x201e26}=await import(_0x2e52d8(0xad)),_0x104b89=_0x3f07a1[_0x2e52d8(0xb2)]||_0x201e26(),_0x18c8f3=_0x104b89?await getIsSessionValid():![];return{'cookie':_0x104b89,'isLoggedIn':_0x18c8f3,async 'getOrLogin'(){const _0x56d6d5=_0x2e52d8;if(_0x104b89&&_0x18c8f3)return _0x104b89;throw CliErrors[_0x56d6d5(0xb0)]();}};}function a155_0x40de(){const _0x5485fa=['7105tmghWP','12KquPdf','2gsaxiC','2428150mwLSVM','../auth/get-cookie.js','4267893xNWLQy','15727327IkYpJo','authRequired','24NEHadB','cookie','6FwLoWf','295603MEJWmS','1278441BOYXdf','820DBwAoX','1390632GzOEGM'];a155_0x40de=function(){return _0x5485fa;};return a155_0x40de();}
@@ -1 +1 @@
1
- const a156_0x285e9f=a156_0x2aad;(function(_0xdbeb0a,_0x584ab2){const _0x5a3016=a156_0x2aad,_0x1edabf=_0xdbeb0a();while(!![]){try{const _0xf7f0d8=parseInt(_0x5a3016(0x154))/0x1+parseInt(_0x5a3016(0x17b))/0x2+-parseInt(_0x5a3016(0x151))/0x3+parseInt(_0x5a3016(0x16c))/0x4*(-parseInt(_0x5a3016(0x167))/0x5)+-parseInt(_0x5a3016(0x16f))/0x6+-parseInt(_0x5a3016(0x174))/0x7*(parseInt(_0x5a3016(0x17d))/0x8)+-parseInt(_0x5a3016(0x152))/0x9*(-parseInt(_0x5a3016(0x16e))/0xa);if(_0xf7f0d8===_0x584ab2)break;else _0x1edabf['push'](_0x1edabf['shift']());}catch(_0x51f032){_0x1edabf['push'](_0x1edabf['shift']());}}}(a156_0x7e9c,0xc27de));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=a156_0x285e9f(0x153);export const CONFIG_NAMES=[a156_0x285e9f(0x153),a156_0x285e9f(0x164),a156_0x285e9f(0x166)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a156_0x285e9f(0x17a)](_0x1b4dc0=>_0x1b4dc0!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x381d1e){for(const _0x21854d of CONFIG_NAMES){const _0x4187dd=resolve(_0x381d1e,_0x21854d);if(existsSync(_0x4187dd))return _0x4187dd;}return undefined;}export function findProjectRootDirectory(_0x520b7d=process[a156_0x285e9f(0x158)]()){let _0x243da3=resolve(_0x520b7d);const {root:_0x17e1f9}=parse(_0x243da3),_0x6164d5=homedir();while(!![]){if(resolveConfigPath(_0x243da3)){if(_0x243da3===_0x6164d5)break;return _0x243da3;}if(_0x243da3===_0x17e1f9||_0x243da3===_0x6164d5)break;const _0x286556=dirname(_0x243da3);if(_0x286556===_0x243da3)break;_0x243da3=_0x286556;}return resolve(_0x520b7d);}export function getProjectConfigPath(){const _0x4cd80b=a156_0x285e9f;return resolveConfigPath(process[_0x4cd80b(0x158)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a156_0x2aad(_0xf63468,_0x2b48f9){_0xf63468=_0xf63468-0x14f;const _0x7e9cd7=a156_0x7e9c();let _0x2aad2c=_0x7e9cd7[_0xf63468];return _0x2aad2c;}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x3660a3){const _0x2da605=a156_0x285e9f;if(!existsSync(_0x3660a3))return{'status':'missing'};try{const _0x74869e=readFileSync(_0x3660a3,{'encoding':'utf8'});if(!_0x74869e?.[_0x2da605(0x165)]())return{'status':'empty'};const _0x3d3ebd=JSON['parse'](_0x74869e);return{'status':'ok','data':_0x3d3ebd};}catch(_0x3c87a3){return{'status':_0x2da605(0x168),'message':_0x3c87a3 instanceof Error?_0x3c87a3[_0x2da605(0x162)]:String(_0x3c87a3)};}}function parseCliConfigJsonFile(_0x1b39ed,_0x380960,_0x2db4ca){const _0x567927=a156_0x285e9f,_0x21f55b=inspectCliConfigJsonFile(_0x1b39ed);if(_0x21f55b[_0x567927(0x15f)]===_0x567927(0x157)||_0x21f55b[_0x567927(0x15f)]==='empty')return{};if(_0x21f55b[_0x567927(0x15f)]==='ok')return _0x21f55b[_0x567927(0x178)];return _0x380960===_0x567927(0x15e)&&_0x2db4ca&&console['error'](CLI_BIN_NAME+':\x20'+_0x2db4ca+_0x567927(0x15b)+_0x1b39ed+_0x567927(0x169)+_0x21f55b[_0x567927(0x162)]),{};}function normalizeLegacyConfigShape(_0x5f5d1b){const _0x53ff42=a156_0x285e9f;if(!_0x5f5d1b||typeof _0x5f5d1b!==_0x53ff42(0x14f))return{'config':{},'migrated':![]};const _0x3bb723={..._0x5f5d1b},_0x24d4a1=_0x3bb723[_0x53ff42(0x175)]&&typeof _0x3bb723[_0x53ff42(0x175)]===_0x53ff42(0x14f)?{..._0x3bb723[_0x53ff42(0x175)]}:{},_0x265713=Object[_0x53ff42(0x171)](_0x24d4a1)[_0x53ff42(0x161)],_0x5b06d2=_0x3bb723['appcode']||_0x3bb723[_0x53ff42(0x17e)];let _0x28baa5=![];if(_0x5b06d2&&_0x265713===0x0){const _0x4b9d4a=typeof _0x3bb723[_0x53ff42(0x15a)]==='string'&&_0x3bb723['defaultApp'][_0x53ff42(0x165)]()?_0x3bb723[_0x53ff42(0x15a)]:String(_0x5b06d2)[_0x53ff42(0x165)]();_0x24d4a1[_0x4b9d4a]={'appcode':String(_0x5b06d2)[_0x53ff42(0x165)](),..._0x3bb723[_0x53ff42(0x173)]!=null?{'env':_0x3bb723[_0x53ff42(0x173)]}:{},..._0x3bb723['apiDir']!=null?{'apiDir':_0x3bb723[_0x53ff42(0x159)]}:{},..._0x3bb723['cookie']!=null?{'cookie':_0x3bb723[_0x53ff42(0x16b)]}:{},..._0x3bb723[_0x53ff42(0x16a)]!=null?{'accessKey':_0x3bb723[_0x53ff42(0x16a)]}:{},..._0x3bb723[_0x53ff42(0x172)]!=null?{'format':_0x3bb723[_0x53ff42(0x172)]}:{},..._0x3bb723[_0x53ff42(0x17c)]!=null?{'pageSize':_0x3bb723[_0x53ff42(0x17c)]}:{},..._0x3bb723[_0x53ff42(0x156)]!=null?{'riskLevel':_0x3bb723['riskLevel']}:{},..._0x3bb723[_0x53ff42(0x150)]!=null?{'locale':_0x3bb723[_0x53ff42(0x150)]}:{}},_0x3bb723[_0x53ff42(0x175)]=_0x24d4a1;if(!_0x3bb723['defaultApp'])_0x3bb723[_0x53ff42(0x15a)]=_0x4b9d4a;_0x28baa5=!![];}return(_0x53ff42(0x16d)in _0x3bb723||_0x53ff42(0x17e)in _0x3bb723)&&(delete _0x3bb723[_0x53ff42(0x16d)],delete _0x3bb723['app'],_0x28baa5=!![]),{'config':_0x3bb723,'migrated':_0x28baa5};}function writeNormalizedConfigIfNeeded(_0xc75f5c,_0x4acd68){const _0x41bc33=a156_0x285e9f,_0x1186c8=JSON[_0x41bc33(0x15c)](_0x4acd68,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0xc75f5c)===_0x1186c8)return;writeConfigFile(_0xc75f5c,_0x4acd68),normalizedWriteCache['set'](_0xc75f5c,_0x1186c8);}function parseAndNormalizeConfig(_0x24e5ab,_0x408dc8,_0x2b3a1a){const _0x77b851=a156_0x285e9f,_0x390504=parseCliConfigJsonFile(_0x24e5ab,_0x408dc8,_0x2b3a1a),_0x3be3b7=normalizeLegacyConfigShape(_0x390504);if(_0x3be3b7[_0x77b851(0x160)])try{writeNormalizedConfigIfNeeded(_0x24e5ab,_0x3be3b7[_0x77b851(0x15d)]);}catch{}return _0x3be3b7[_0x77b851(0x15d)];}export function loadRawConfigLayers(_0x39ec25){const _0x1df90c=a156_0x285e9f;let _0x120e07={},_0x387274={};const _0x198a89=resolveConfigPath(homedir());_0x198a89&&(_0x120e07=parseAndNormalizeConfig(_0x198a89,_0x1df90c(0x15e),_0x1df90c(0x163)));const _0x243782=_0x39ec25??findProjectRootDirectory(),_0x308244=resolveConfigPath(_0x243782);return _0x308244&&(_0x387274=parseAndNormalizeConfig(_0x308244,_0x1df90c(0x15e),_0x1df90c(0x176))),{'globalPath':_0x198a89,'projectPath':_0x308244,'globalConfig':_0x120e07,'projectConfig':_0x387274};}const INHERIT_WHITELIST=[a156_0x285e9f(0x16b),a156_0x285e9f(0x16a),'locale',a156_0x285e9f(0x172),'riskLevel',a156_0x285e9f(0x17c)];export function mergeRawConfigLayers(_0x2504e7){const _0x2c916a=a156_0x285e9f,{globalConfig:_0x398978,projectConfig:_0x33bf10}=_0x2504e7,_0x64940b=Object[_0x2c916a(0x171)](_0x33bf10)[_0x2c916a(0x161)]>0x0;if(!_0x64940b)return mergeGlobalOnly(_0x398978);if(_0x33bf10[_0x2c916a(0x177)]===!![])return mergeFullInherit(_0x398978,_0x33bf10);if(_0x33bf10[_0x2c916a(0x177)]===![])return mergeIsolated(_0x33bf10);return mergeProjectFirst(_0x398978,_0x33bf10);}function mergeGlobalOnly(_0x120d2d){const _0x5af2c8=a156_0x285e9f,_0x227e0a={..._0x120d2d},_0x352952=_0x120d2d[_0x5af2c8(0x175)]&&typeof _0x120d2d[_0x5af2c8(0x175)]===_0x5af2c8(0x14f)?_0x120d2d[_0x5af2c8(0x175)]:{};if(Object['keys'](_0x352952)['length']>0x0)_0x227e0a['apps']=_0x352952;if(_0x120d2d[_0x5af2c8(0x15a)])_0x227e0a[_0x5af2c8(0x15a)]=_0x120d2d['defaultApp'];else{const _0x4d01b8=Object[_0x5af2c8(0x171)](_0x352952);if(_0x4d01b8['length']>0x0)_0x227e0a[_0x5af2c8(0x15a)]=_0x4d01b8[0x0];}return _0x227e0a;}function mergeIsolated(_0x5b40f6){const _0x5e622a=a156_0x285e9f,_0x50c999={..._0x5b40f6};delete _0x50c999[_0x5e622a(0x177)];const _0x3b8d9e=_0x5b40f6['apps']&&typeof _0x5b40f6[_0x5e622a(0x175)]===_0x5e622a(0x14f)?_0x5b40f6[_0x5e622a(0x175)]:{};Object[_0x5e622a(0x171)](_0x3b8d9e)[_0x5e622a(0x161)]>0x0?_0x50c999[_0x5e622a(0x175)]=_0x3b8d9e:delete _0x50c999['apps'];if(_0x5e622a(0x15a)in _0x5b40f6)_0x50c999[_0x5e622a(0x15a)]=_0x5b40f6[_0x5e622a(0x15a)];else Object['keys'](_0x3b8d9e)[_0x5e622a(0x161)]>0x0?_0x50c999[_0x5e622a(0x15a)]=Object[_0x5e622a(0x171)](_0x3b8d9e)[0x0]:delete _0x50c999[_0x5e622a(0x15a)];return _0x50c999;}function a156_0x7e9c(){const _0x30ebf=['.tmp','riskLevel','missing','cwd','apiDir','defaultApp','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','stringify','config','warn','status','migrated','length','message','Global','.lovrabet.json','trim','.lovrabetrc','10NSaZDd','error','\x0a\x20\x20','accessKey','cookie','1182388MVIbxc','appcode','6620TSnrye','306276SGnsWm','silent','keys','format','env','9867053SrAuRP','apps','Project','inherit','data','project','filter','2881936SCyeAl','pageSize','8sjBfMk','app','object','locale','2045439HkZycU','13995MTueak','.rabetbase.json','1059892wAVnhG'];a156_0x7e9c=function(){return _0x30ebf;};return a156_0x7e9c();}function mergeProjectFirst(_0x238f9f,_0x2cbf18){const _0x4b9b93=a156_0x285e9f,_0x2294dc={..._0x2cbf18};delete _0x2294dc[_0x4b9b93(0x177)];for(const _0x1a4765 of INHERIT_WHITELIST){!(_0x1a4765 in _0x2294dc)&&_0x1a4765 in _0x238f9f&&(_0x2294dc[_0x1a4765]=_0x238f9f[_0x1a4765]);}const _0x55c686=_0x2cbf18[_0x4b9b93(0x175)]&&typeof _0x2cbf18[_0x4b9b93(0x175)]===_0x4b9b93(0x14f)?_0x2cbf18['apps']:{};Object[_0x4b9b93(0x171)](_0x55c686)['length']>0x0?_0x2294dc[_0x4b9b93(0x175)]=_0x55c686:delete _0x2294dc[_0x4b9b93(0x175)];if(_0x4b9b93(0x15a)in _0x2cbf18)_0x2294dc['defaultApp']=_0x2cbf18['defaultApp'];else Object[_0x4b9b93(0x171)](_0x55c686)[_0x4b9b93(0x161)]>0x0?_0x2294dc[_0x4b9b93(0x15a)]=Object[_0x4b9b93(0x171)](_0x55c686)[0x0]:delete _0x2294dc[_0x4b9b93(0x15a)];return _0x2294dc;}function mergeFullInherit(_0x37d4c0,_0x5eba30){const _0x1bfaf4=a156_0x285e9f,_0x517759=_0x37d4c0[_0x1bfaf4(0x175)]&&typeof _0x37d4c0[_0x1bfaf4(0x175)]===_0x1bfaf4(0x14f)?_0x37d4c0[_0x1bfaf4(0x175)]:{},_0xc628f0=_0x5eba30['apps']&&typeof _0x5eba30[_0x1bfaf4(0x175)]==='object'?_0x5eba30[_0x1bfaf4(0x175)]:{},_0x56d71e={..._0x517759,..._0xc628f0},_0x496634={..._0x37d4c0,..._0x5eba30};delete _0x496634[_0x1bfaf4(0x177)];if(Object['keys'](_0x56d71e)[_0x1bfaf4(0x161)]>0x0)_0x496634['apps']=_0x56d71e;if(_0x1bfaf4(0x15a)in _0x5eba30)_0x496634[_0x1bfaf4(0x15a)]=_0x5eba30[_0x1bfaf4(0x15a)];else{if(Object[_0x1bfaf4(0x171)](_0xc628f0)[_0x1bfaf4(0x161)]>0x0)_0x496634['defaultApp']=Object['keys'](_0xc628f0)[0x0];else{if(_0x37d4c0[_0x1bfaf4(0x15a)])_0x496634[_0x1bfaf4(0x15a)]=_0x37d4c0['defaultApp'];else{const _0x4b39c0=Object[_0x1bfaf4(0x171)](_0x517759);if(_0x4b39c0[_0x1bfaf4(0x161)]>0x0)_0x496634[_0x1bfaf4(0x15a)]=_0x4b39c0[0x0];}}}return _0x496634;}export function readRawConfigWithLayers(_0x529460){const _0x4637e1=loadRawConfigLayers(_0x529460);return{'config':mergeRawConfigLayers(_0x4637e1),'layers':_0x4637e1};}export function readRawConfig(_0x21761e){return mergeRawConfigLayers(loadRawConfigLayers(_0x21761e));}export function readConfigFile(_0x45229e){const _0x2b975c=a156_0x285e9f;return parseAndNormalizeConfig(_0x45229e,_0x2b975c(0x170));}export function writeConfigFile(_0x43b557,_0x3571cf){const _0x4f7fcc=a156_0x285e9f,_0x5a7aa0=dirname(_0x43b557);!existsSync(_0x5a7aa0)&&mkdirSync(_0x5a7aa0,{'recursive':!![]});const _0x5894b5=_0x43b557+_0x4f7fcc(0x155);try{writeFileSync(_0x5894b5,JSON[_0x4f7fcc(0x15c)](_0x3571cf,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x5894b5,_0x43b557);}catch(_0x4e4a94){try{unlinkSync(_0x5894b5);}catch{}throw _0x4e4a94;}}export function resolveWriteConfigPath(_0x1eb2b7){const _0x4669a4=a156_0x285e9f,_0x4ff3ec=_0x1eb2b7===_0x4669a4(0x179)?process[_0x4669a4(0x158)]():homedir(),_0x2745b4=resolveConfigPath(_0x4ff3ec);return _0x2745b4??resolve(_0x4ff3ec,NEW_CONFIG_NAME);}
1
+ const a156_0x34a2b3=a156_0x2af4;(function(_0x36afb7,_0x26d40f){const _0x39f3c3=a156_0x2af4,_0xf534e8=_0x36afb7();while(!![]){try{const _0x51a9f5=-parseInt(_0x39f3c3(0x1ca))/0x1*(-parseInt(_0x39f3c3(0x1d8))/0x2)+-parseInt(_0x39f3c3(0x1e3))/0x3*(parseInt(_0x39f3c3(0x1d2))/0x4)+parseInt(_0x39f3c3(0x1f6))/0x5+-parseInt(_0x39f3c3(0x1f4))/0x6+-parseInt(_0x39f3c3(0x1d7))/0x7*(-parseInt(_0x39f3c3(0x1e1))/0x8)+-parseInt(_0x39f3c3(0x1f8))/0x9*(parseInt(_0x39f3c3(0x1f1))/0xa)+-parseInt(_0x39f3c3(0x1db))/0xb*(-parseInt(_0x39f3c3(0x1d4))/0xc);if(_0x51a9f5===_0x26d40f)break;else _0xf534e8['push'](_0xf534e8['shift']());}catch(_0x572a9b){_0xf534e8['push'](_0xf534e8['shift']());}}}(a156_0x558e,0x6dd1c));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a156_0x2af4(_0x30fb6f,_0x5add9f){_0x30fb6f=_0x30fb6f-0x1c9;const _0x558ee3=a156_0x558e();let _0x2af40e=_0x558ee3[_0x30fb6f];return _0x2af40e;}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=a156_0x34a2b3(0x1d0);export const CONFIG_NAMES=[a156_0x34a2b3(0x1d0),a156_0x34a2b3(0x1f3),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a156_0x34a2b3(0x1df)](_0x44456f=>_0x44456f!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x54a050){for(const _0x1685d1 of CONFIG_NAMES){const _0xe67600=resolve(_0x54a050,_0x1685d1);if(existsSync(_0xe67600))return _0xe67600;}return undefined;}export function findProjectRootDirectory(_0x115634=process['cwd']()){let _0x2db166=resolve(_0x115634);const {root:_0x219d66}=parse(_0x2db166),_0x3a7f37=homedir();while(!![]){if(resolveConfigPath(_0x2db166)){if(_0x2db166===_0x3a7f37)break;return _0x2db166;}if(_0x2db166===_0x219d66||_0x2db166===_0x3a7f37)break;const _0x1ff3c0=dirname(_0x2db166);if(_0x1ff3c0===_0x2db166)break;_0x2db166=_0x1ff3c0;}return resolve(_0x115634);}export function getProjectConfigPath(){const _0x58a16d=a156_0x34a2b3;return resolveConfigPath(process[_0x58a16d(0x1ef)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x5b65c1){const _0x3cb603=a156_0x34a2b3;if(!existsSync(_0x5b65c1))return{'status':'missing'};try{const _0x206a82=readFileSync(_0x5b65c1,{'encoding':_0x3cb603(0x1dd)});if(!_0x206a82?.[_0x3cb603(0x1f0)]())return{'status':_0x3cb603(0x1e9)};const _0x5ebcaa=JSON[_0x3cb603(0x1cc)](_0x206a82);return{'status':'ok','data':_0x5ebcaa};}catch(_0x58e29e){return{'status':_0x3cb603(0x1ea),'message':_0x58e29e instanceof Error?_0x58e29e['message']:String(_0x58e29e)};}}function parseCliConfigJsonFile(_0x589beb,_0x28d4b7,_0x44de1a){const _0x5a190a=a156_0x34a2b3,_0x4144d7=inspectCliConfigJsonFile(_0x589beb);if(_0x4144d7[_0x5a190a(0x1e2)]===_0x5a190a(0x1e5)||_0x4144d7[_0x5a190a(0x1e2)]===_0x5a190a(0x1e9))return{};if(_0x4144d7[_0x5a190a(0x1e2)]==='ok')return _0x4144d7[_0x5a190a(0x1f5)];return _0x28d4b7===_0x5a190a(0x1e0)&&_0x44de1a&&console[_0x5a190a(0x1ea)](CLI_BIN_NAME+':\x20'+_0x44de1a+_0x5a190a(0x1e4)+_0x589beb+_0x5a190a(0x1e8)+_0x4144d7['message']),{};}function normalizeLegacyConfigShape(_0x4cd759){const _0x1bab61=a156_0x34a2b3;if(!_0x4cd759||typeof _0x4cd759!=='object')return{'config':{},'migrated':![]};const _0x16a9c4={..._0x4cd759},_0xfb574e=_0x16a9c4['apps']&&typeof _0x16a9c4['apps']===_0x1bab61(0x1c9)?{..._0x16a9c4[_0x1bab61(0x1e6)]}:{},_0x540323=Object[_0x1bab61(0x1ec)](_0xfb574e)[_0x1bab61(0x1ce)],_0x959390=_0x16a9c4[_0x1bab61(0x1d6)]||_0x16a9c4[_0x1bab61(0x1d9)];let _0x4e718f=![];if(_0x959390&&_0x540323===0x0){const _0x166ee7=typeof _0x16a9c4['defaultApp']==='string'&&_0x16a9c4[_0x1bab61(0x1e7)][_0x1bab61(0x1f0)]()?_0x16a9c4[_0x1bab61(0x1e7)]:String(_0x959390)[_0x1bab61(0x1f0)]();_0xfb574e[_0x166ee7]={'appcode':String(_0x959390)[_0x1bab61(0x1f0)](),..._0x16a9c4['env']!=null?{'env':_0x16a9c4['env']}:{},..._0x16a9c4['apiDir']!=null?{'apiDir':_0x16a9c4['apiDir']}:{},..._0x16a9c4[_0x1bab61(0x1eb)]!=null?{'cookie':_0x16a9c4[_0x1bab61(0x1eb)]}:{},..._0x16a9c4[_0x1bab61(0x1dc)]!=null?{'accessKey':_0x16a9c4['accessKey']}:{},..._0x16a9c4[_0x1bab61(0x1cb)]!=null?{'format':_0x16a9c4[_0x1bab61(0x1cb)]}:{},..._0x16a9c4[_0x1bab61(0x1d1)]!=null?{'pageSize':_0x16a9c4[_0x1bab61(0x1d1)]}:{},..._0x16a9c4[_0x1bab61(0x1f7)]!=null?{'riskLevel':_0x16a9c4['riskLevel']}:{},..._0x16a9c4[_0x1bab61(0x1f2)]!=null?{'locale':_0x16a9c4[_0x1bab61(0x1f2)]}:{}},_0x16a9c4['apps']=_0xfb574e;if(!_0x16a9c4['defaultApp'])_0x16a9c4[_0x1bab61(0x1e7)]=_0x166ee7;_0x4e718f=!![];}return(_0x1bab61(0x1d6)in _0x16a9c4||_0x1bab61(0x1d9)in _0x16a9c4)&&(delete _0x16a9c4['appcode'],delete _0x16a9c4['app'],_0x4e718f=!![]),{'config':_0x16a9c4,'migrated':_0x4e718f};}function writeNormalizedConfigIfNeeded(_0x5704ef,_0x350ebe){const _0x4914e4=a156_0x34a2b3,_0x333046=JSON[_0x4914e4(0x1ee)](_0x350ebe,null,0x2)+'\x0a';if(normalizedWriteCache[_0x4914e4(0x1d3)](_0x5704ef)===_0x333046)return;writeConfigFile(_0x5704ef,_0x350ebe),normalizedWriteCache['set'](_0x5704ef,_0x333046);}function parseAndNormalizeConfig(_0x32d002,_0x30fdb4,_0x700a18){const _0x134505=a156_0x34a2b3,_0x1d84be=parseCliConfigJsonFile(_0x32d002,_0x30fdb4,_0x700a18),_0x346d74=normalizeLegacyConfigShape(_0x1d84be);if(_0x346d74[_0x134505(0x1d5)])try{writeNormalizedConfigIfNeeded(_0x32d002,_0x346d74[_0x134505(0x1ed)]);}catch{}return _0x346d74[_0x134505(0x1ed)];}export function loadRawConfigLayers(_0x2d5e9a){const _0x43952f=a156_0x34a2b3;let _0xa49d39={},_0x29cf54={};const _0x21b697=resolveConfigPath(homedir());_0x21b697&&(_0xa49d39=parseAndNormalizeConfig(_0x21b697,_0x43952f(0x1e0),'Global'));const _0x32209c=_0x2d5e9a??findProjectRootDirectory(),_0x26263d=resolveConfigPath(_0x32209c);return _0x26263d&&(_0x29cf54=parseAndNormalizeConfig(_0x26263d,_0x43952f(0x1e0),_0x43952f(0x1cd))),{'globalPath':_0x21b697,'projectPath':_0x26263d,'globalConfig':_0xa49d39,'projectConfig':_0x29cf54};}const INHERIT_WHITELIST=[a156_0x34a2b3(0x1eb),a156_0x34a2b3(0x1dc),a156_0x34a2b3(0x1f2),'format','riskLevel',a156_0x34a2b3(0x1d1)];export function mergeRawConfigLayers(_0x4af6e9){const _0x42f1d4=a156_0x34a2b3,{globalConfig:_0x59be1a,projectConfig:_0x4b332e}=_0x4af6e9,_0x1d4c0d=Object[_0x42f1d4(0x1ec)](_0x4b332e)[_0x42f1d4(0x1ce)]>0x0;if(!_0x1d4c0d)return mergeGlobalOnly(_0x59be1a);if(_0x4b332e['inherit']===!![])return mergeFullInherit(_0x59be1a,_0x4b332e);if(_0x4b332e[_0x42f1d4(0x1cf)]===![])return mergeIsolated(_0x4b332e);return mergeProjectFirst(_0x59be1a,_0x4b332e);}function mergeGlobalOnly(_0x282f05){const _0x365dc8=a156_0x34a2b3,_0x279e91={..._0x282f05},_0x245724=_0x282f05[_0x365dc8(0x1e6)]&&typeof _0x282f05[_0x365dc8(0x1e6)]===_0x365dc8(0x1c9)?_0x282f05[_0x365dc8(0x1e6)]:{};if(Object[_0x365dc8(0x1ec)](_0x245724)['length']>0x0)_0x279e91[_0x365dc8(0x1e6)]=_0x245724;if(_0x282f05[_0x365dc8(0x1e7)])_0x279e91['defaultApp']=_0x282f05['defaultApp'];else{const _0x5842f4=Object[_0x365dc8(0x1ec)](_0x245724);if(_0x5842f4[_0x365dc8(0x1ce)]>0x0)_0x279e91[_0x365dc8(0x1e7)]=_0x5842f4[0x0];}return _0x279e91;}function mergeIsolated(_0x1f52d4){const _0x19ca9b=a156_0x34a2b3,_0xd81aaa={..._0x1f52d4};delete _0xd81aaa['inherit'];const _0x28ab05=_0x1f52d4['apps']&&typeof _0x1f52d4[_0x19ca9b(0x1e6)]===_0x19ca9b(0x1c9)?_0x1f52d4[_0x19ca9b(0x1e6)]:{};Object['keys'](_0x28ab05)[_0x19ca9b(0x1ce)]>0x0?_0xd81aaa[_0x19ca9b(0x1e6)]=_0x28ab05:delete _0xd81aaa[_0x19ca9b(0x1e6)];if(_0x19ca9b(0x1e7)in _0x1f52d4)_0xd81aaa[_0x19ca9b(0x1e7)]=_0x1f52d4['defaultApp'];else Object['keys'](_0x28ab05)[_0x19ca9b(0x1ce)]>0x0?_0xd81aaa[_0x19ca9b(0x1e7)]=Object[_0x19ca9b(0x1ec)](_0x28ab05)[0x0]:delete _0xd81aaa[_0x19ca9b(0x1e7)];return _0xd81aaa;}function mergeProjectFirst(_0x58ce75,_0x17733e){const _0x3b7fa4=a156_0x34a2b3,_0x8d30e2={..._0x17733e};delete _0x8d30e2['inherit'];for(const _0xc4b64a of INHERIT_WHITELIST){!(_0xc4b64a in _0x8d30e2)&&_0xc4b64a in _0x58ce75&&(_0x8d30e2[_0xc4b64a]=_0x58ce75[_0xc4b64a]);}const _0x40f924=_0x17733e[_0x3b7fa4(0x1e6)]&&typeof _0x17733e[_0x3b7fa4(0x1e6)]===_0x3b7fa4(0x1c9)?_0x17733e[_0x3b7fa4(0x1e6)]:{};Object[_0x3b7fa4(0x1ec)](_0x40f924)[_0x3b7fa4(0x1ce)]>0x0?_0x8d30e2[_0x3b7fa4(0x1e6)]=_0x40f924:delete _0x8d30e2['apps'];if(_0x3b7fa4(0x1e7)in _0x17733e)_0x8d30e2[_0x3b7fa4(0x1e7)]=_0x17733e['defaultApp'];else Object[_0x3b7fa4(0x1ec)](_0x40f924)[_0x3b7fa4(0x1ce)]>0x0?_0x8d30e2['defaultApp']=Object[_0x3b7fa4(0x1ec)](_0x40f924)[0x0]:delete _0x8d30e2['defaultApp'];return _0x8d30e2;}function mergeFullInherit(_0xa142c4,_0x4b8bf1){const _0x37319a=a156_0x34a2b3,_0x446a1c=_0xa142c4[_0x37319a(0x1e6)]&&typeof _0xa142c4['apps']===_0x37319a(0x1c9)?_0xa142c4[_0x37319a(0x1e6)]:{},_0x3eff20=_0x4b8bf1[_0x37319a(0x1e6)]&&typeof _0x4b8bf1[_0x37319a(0x1e6)]===_0x37319a(0x1c9)?_0x4b8bf1[_0x37319a(0x1e6)]:{},_0xd1f044={..._0x446a1c,..._0x3eff20},_0xe9622d={..._0xa142c4,..._0x4b8bf1};delete _0xe9622d[_0x37319a(0x1cf)];if(Object['keys'](_0xd1f044)[_0x37319a(0x1ce)]>0x0)_0xe9622d[_0x37319a(0x1e6)]=_0xd1f044;if(_0x37319a(0x1e7)in _0x4b8bf1)_0xe9622d[_0x37319a(0x1e7)]=_0x4b8bf1[_0x37319a(0x1e7)];else{if(Object['keys'](_0x3eff20)['length']>0x0)_0xe9622d[_0x37319a(0x1e7)]=Object[_0x37319a(0x1ec)](_0x3eff20)[0x0];else{if(_0xa142c4[_0x37319a(0x1e7)])_0xe9622d[_0x37319a(0x1e7)]=_0xa142c4[_0x37319a(0x1e7)];else{const _0x49d3c6=Object[_0x37319a(0x1ec)](_0x446a1c);if(_0x49d3c6[_0x37319a(0x1ce)]>0x0)_0xe9622d['defaultApp']=_0x49d3c6[0x0];}}}return _0xe9622d;}export function readRawConfigWithLayers(_0x197ebe){const _0x3ebfc8=loadRawConfigLayers(_0x197ebe);return{'config':mergeRawConfigLayers(_0x3ebfc8),'layers':_0x3ebfc8};}export function readRawConfig(_0x47a081){return mergeRawConfigLayers(loadRawConfigLayers(_0x47a081));}export function readConfigFile(_0x174f6b){const _0xd08b95=a156_0x34a2b3;return parseAndNormalizeConfig(_0x174f6b,_0xd08b95(0x1da));}export function writeConfigFile(_0x62c54,_0x46320c){const _0x461cc0=a156_0x34a2b3,_0x39ad5e=dirname(_0x62c54);!existsSync(_0x39ad5e)&&mkdirSync(_0x39ad5e,{'recursive':!![]});const _0xd9f64a=_0x62c54+_0x461cc0(0x1de);try{writeFileSync(_0xd9f64a,JSON[_0x461cc0(0x1ee)](_0x46320c,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0xd9f64a,_0x62c54);}catch(_0x1cd982){try{unlinkSync(_0xd9f64a);}catch{}throw _0x1cd982;}}function a156_0x558e(){const _0x22f298=['app','silent','82412UwWKtX','accessKey','utf8','.tmp','filter','warn','8tDJolx','status','40659DWQWLH','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','missing','apps','defaultApp','\x0a\x20\x20','empty','error','cookie','keys','config','stringify','cwd','trim','10iVbHno','locale','.lovrabet.json','3233778WxzcnS','data','352955cpJlEw','riskLevel','4716567YEPHts','object','9959AhakPr','format','parse','Project','length','inherit','.rabetbase.json','pageSize','28euZmZX','get','708RkQMIB','migrated','appcode','4668027LUJsLa','86UaeUZg'];a156_0x558e=function(){return _0x22f298;};return a156_0x558e();}export function resolveWriteConfigPath(_0x536372){const _0x527418=a156_0x34a2b3,_0x1b21e9=_0x536372==='project'?process[_0x527418(0x1ef)]():homedir(),_0x1305ef=resolveConfigPath(_0x1b21e9);return _0x1305ef??resolve(_0x1b21e9,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- function a157_0x2ebe(_0x533422,_0xb01b34){_0x533422=_0x533422-0xbb;const _0x448c71=a157_0x448c();let _0x2ebecb=_0x448c71[_0x533422];return _0x2ebecb;}function a157_0x448c(){const _0x35f544=['string','5964ljTqZm','object','apiDir','225LhEnla','apps','100DPzdzg','api.ts','10XSoZOk','setRawCommand','cwd','20858qIAQbn','env','defaultApp','48068YEnIQh','appcode','132282wWwJHm','14AWVOXW','template_base_url','entries','merged','slice','trim','length','runtimeDomain','57kOHwqQ','globalConfig','keys','10442740LQExVo','7129768GvomLm','argv','userDomain','10595ZxsHoO','./constant/env.js','setLogPath','16775568ahjvUl','projectConfig','join','apiDomain','map','./utils/is-non-interactive.js','app','filter'];a157_0x448c=function(){return _0x35f544;};return a157_0x448c();}(function(_0x8cb83f,_0x1d3125){const _0x1857ed=a157_0x2ebe,_0x3d6ddb=_0x8cb83f();while(!![]){try{const _0x39a43b=parseInt(_0x1857ed(0xc7))/0x1*(-parseInt(_0x1857ed(0xc2))/0x2)+parseInt(_0x1857ed(0xd5))/0x3*(-parseInt(_0x1857ed(0xca))/0x4)+-parseInt(_0x1857ed(0xc0))/0x5*(-parseInt(_0x1857ed(0xcc))/0x6)+-parseInt(_0x1857ed(0xcd))/0x7*(-parseInt(_0x1857ed(0xd9))/0x8)+-parseInt(_0x1857ed(0xdf))/0x9+parseInt(_0x1857ed(0xc4))/0xa*(parseInt(_0x1857ed(0xd8))/0xb)+-parseInt(_0x1857ed(0xbd))/0xc*(-parseInt(_0x1857ed(0xdc))/0xd);if(_0x39a43b===_0x1d3125)break;else _0x3d6ddb['push'](_0x3d6ddb['shift']());}catch(_0x35cf7e){_0x3d6ddb['push'](_0x3d6ddb['shift']());}}}(a157_0x448c,0xf29f1));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';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(_0xa363ef){return process.env[`RABETBASE_${_0xa363ef}`]||process.env[`LOVRABET_${_0xa363ef}`]||undefined;}export async function createContext(_0x481aad){const _0x2e2035=a157_0x2ebe,{config:_0x2d2ef8,layers:_0x1e8a1e}=readRawConfigWithLayers(),_0x481a64=buildConfig(_0x2d2ef8,_0x481aad,_0x1e8a1e),{initEnv:_0x42ba08}=await import(_0x2e2035(0xdd));if(_0x481a64[_0x2e2035(0xc8)])_0x42ba08(_0x481a64[_0x2e2035(0xc8)]);else _0x481aad[_0x2e2035(0xc8)]&&typeof _0x481aad['env']===_0x2e2035(0xbc)&&_0x42ba08(_0x481aad[_0x2e2035(0xc8)]);const {initDomains:_0x22951f,getUserDomain:_0x319f5c,getApiDomain:_0x2ccf41}=await import('./constant/domain.js');_0x22951f({'apiDomain':_0x2d2ef8[_0x2e2035(0xe2)]||undefined,'userDomain':_0x2d2ef8[_0x2e2035(0xdb)]||undefined,'runtimeDomain':_0x2d2ef8[_0x2e2035(0xd4)]||undefined});const _0x25ad0a={'apiDomain':_0x2ccf41(),'userDomain':_0x319f5c()},_0x58224c=await buildAuth(_0x481a64);logger[_0x2e2035(0xde)](process[_0x2e2035(0xc6)]());const _0x18eac2=(CLI_BIN_NAME+'\x20'+process[_0x2e2035(0xda)][_0x2e2035(0xd1)](0x2)[_0x2e2035(0xe1)]('\x20'))[_0x2e2035(0xd2)]();logger[_0x2e2035(0xc5)](_0x18eac2);const {isNonInteractive:_0x42f6b0}=await import(_0x2e2035(0xe4)),_0x3e3028=_0x42f6b0(_0x481aad);return{'config':_0x481a64,'auth':_0x58224c,'logger':logger,'env':_0x25ad0a,'nonInteractive':_0x3e3028};}export function buildConfigFromFlags(_0x344b84){const {config:_0x36cb8c,layers:_0x17c04c}=readRawConfigWithLayers();return buildConfig(_0x36cb8c,_0x344b84,_0x17c04c);}export function getConfigAppCode(_0x467f4){const _0x329b0c=a157_0x2ebe,_0x24c222=readRawConfig(_0x467f4);if(_0x24c222[_0x329b0c(0xc1)]&&typeof _0x24c222[_0x329b0c(0xc1)]==='object'){const _0x4a434d=_0x24c222[_0x329b0c(0xc9)];if(_0x4a434d&&_0x24c222['apps'][_0x4a434d]?.[_0x329b0c(0xcb)])return String(_0x24c222['apps'][_0x4a434d][_0x329b0c(0xcb)])['trim']();const _0x5c21a2=Object['values'](_0x24c222[_0x329b0c(0xc1)])[0x0];if(_0x5c21a2?.[_0x329b0c(0xcb)])return String(_0x5c21a2[_0x329b0c(0xcb)])[_0x329b0c(0xd2)]();}const _0x2bef58=_0x24c222[_0x329b0c(0xcb)]||_0x24c222[_0x329b0c(0xe5)];if(typeof _0x2bef58!==_0x329b0c(0xbc)||_0x2bef58[_0x329b0c(0xd2)]()==='')return undefined;return _0x2bef58[_0x329b0c(0xd2)]();}export function getMultiAppConfigs(_0x324812='project',_0x1a2983){const _0x23923c=a157_0x2ebe,_0x3a6dca=loadRawConfigLayers(_0x1a2983);let _0xca0c23,_0x29bd1b;if(_0x324812===_0x23923c(0xd0)){const _0x915727=_0x3a6dca[_0x23923c(0xd6)][_0x23923c(0xc1)]&&typeof _0x3a6dca[_0x23923c(0xd6)][_0x23923c(0xc1)]==='object'?_0x3a6dca[_0x23923c(0xd6)][_0x23923c(0xc1)]:{},_0x3e1f43=_0x3a6dca['projectConfig'][_0x23923c(0xc1)]&&typeof _0x3a6dca[_0x23923c(0xe0)][_0x23923c(0xc1)]==='object'?_0x3a6dca['projectConfig']['apps']:{};_0xca0c23={..._0x915727,..._0x3e1f43};const _0xdd5d24=readRawConfig(_0x1a2983);_0x29bd1b=_0xdd5d24[_0x23923c(0xc9)];}else _0xca0c23=_0x3a6dca[_0x23923c(0xe0)][_0x23923c(0xc1)],_0x29bd1b=_0x3a6dca[_0x23923c(0xe0)]['defaultApp'];if(!_0xca0c23||typeof _0xca0c23!==_0x23923c(0xbe)||Object[_0x23923c(0xd7)](_0xca0c23)[_0x23923c(0xd3)]===0x0)return null;return Object[_0x23923c(0xcf)](_0xca0c23)[_0x23923c(0xe3)](([_0x3e9436,_0x2c4f0f])=>({'name':_0x3e9436,'appcode':_0x2c4f0f?.[_0x23923c(0xcb)]||'','isDefault':_0x3e9436===_0x29bd1b,'env':_0x2c4f0f?.[_0x23923c(0xc8)],'apiDir':_0x2c4f0f?.['apiDir'],'cookie':_0x2c4f0f?.['cookie']||undefined}))[_0x23923c(0xbb)](_0x125502=>_0x125502[_0x23923c(0xcb)]);}export function getTemplateBaseUrl(_0x228316){const _0xe80c83=a157_0x2ebe,_0x1f9b33=readRawConfig(_0x228316);if(_0x1f9b33['template_base_url']&&typeof _0x1f9b33[_0xe80c83(0xce)]==='string')return _0x1f9b33[_0xe80c83(0xce)]['replace'](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}function buildConfig(_0x587972,_0x4d40e9,_0x1f6066){return{...resolveAppConfig({'raw':_0x587972,'flags':_0x4d40e9,'layers':_0x1f6066,'readEnv':env}),'raw':_0x587972};}export function resolveApiFilePath(_0x451d18,_0xcea757){const _0x1be7c7=a157_0x2ebe,_0x2630d5=resolve(process[_0x1be7c7(0xc6)](),_0x451d18),_0x14bfcc=resolve(_0x2630d5,_0x1be7c7(0xc3));if(!_0xcea757)return _0x14bfcc;const _0x21f347=readRawConfig(),_0x501490=_0x21f347[_0x1be7c7(0xc1)]&&typeof _0x21f347['apps']===_0x1be7c7(0xbe)?_0x21f347[_0x1be7c7(0xc1)]:{},_0x31b76f=Object[_0x1be7c7(0xcf)](_0x501490)['find'](([,_0x5c69d4])=>_0x5c69d4?.[_0x1be7c7(0xcb)]===_0xcea757);if(!_0x31b76f)return _0x14bfcc;const [_0x45ffd1,_0x20a225]=_0x31b76f,_0x47deb2=typeof _0x21f347[_0x1be7c7(0xc9)]===_0x1be7c7(0xbc)?_0x21f347[_0x1be7c7(0xc9)]:undefined;if(_0x20a225?.[_0x1be7c7(0xbf)])return _0x14bfcc;if(_0x47deb2&&_0x45ffd1!==_0x47deb2)return resolve(_0x2630d5,_0x45ffd1+'-api.ts');return _0x14bfcc;}
1
+ const a157_0x22e57d=a157_0x524a;(function(_0x4816bb,_0x2e98b5){const _0xbc10ab=a157_0x524a,_0x5067bd=_0x4816bb();while(!![]){try{const _0x5e01e3=parseInt(_0xbc10ab(0x166))/0x1*(parseInt(_0xbc10ab(0x188))/0x2)+-parseInt(_0xbc10ab(0x183))/0x3*(parseInt(_0xbc10ab(0x163))/0x4)+parseInt(_0xbc10ab(0x16c))/0x5*(-parseInt(_0xbc10ab(0x162))/0x6)+parseInt(_0xbc10ab(0x161))/0x7*(parseInt(_0xbc10ab(0x169))/0x8)+-parseInt(_0xbc10ab(0x181))/0x9*(-parseInt(_0xbc10ab(0x187))/0xa)+-parseInt(_0xbc10ab(0x16b))/0xb+-parseInt(_0xbc10ab(0x16a))/0xc*(-parseInt(_0xbc10ab(0x165))/0xd);if(_0x5e01e3===_0x2e98b5)break;else _0x5067bd['push'](_0x5067bd['shift']());}catch(_0x4c5b44){_0x5067bd['push'](_0x5067bd['shift']());}}}(a157_0x90a5,0xe810b));import{resolve}from'node:path';function a157_0x524a(_0x539e1f,_0x5c9517){_0x539e1f=_0x539e1f-0x160;const _0x90a55a=a157_0x90a5();let _0x524a31=_0x90a55a[_0x539e1f];return _0x524a31;}import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';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(_0x2b78f){return process.env[`RABETBASE_${_0x2b78f}`]||process.env[`LOVRABET_${_0x2b78f}`]||undefined;}export async function createContext(_0x21d8f1){const _0x2106cc=a157_0x524a,{config:_0xba3df4,layers:_0x1e226a}=readRawConfigWithLayers(),_0x30c162=buildConfig(_0xba3df4,_0x21d8f1,_0x1e226a),{initEnv:_0x24a29e}=await import(_0x2106cc(0x174));if(_0x30c162['env'])_0x24a29e(_0x30c162[_0x2106cc(0x160)]);else _0x21d8f1[_0x2106cc(0x160)]&&typeof _0x21d8f1['env']===_0x2106cc(0x175)&&_0x24a29e(_0x21d8f1[_0x2106cc(0x160)]);const {initDomains:_0x164551,getUserDomain:_0x2a18d2,getApiDomain:_0x433315}=await import('./constant/domain.js');_0x164551({'apiDomain':_0xba3df4[_0x2106cc(0x182)]||undefined,'userDomain':_0xba3df4['userDomain']||undefined,'runtimeDomain':_0xba3df4[_0x2106cc(0x17d)]||undefined});const _0x41a991={'apiDomain':_0x433315(),'userDomain':_0x2a18d2()},_0x3d73f9=await buildAuth(_0x30c162);logger[_0x2106cc(0x17a)](process[_0x2106cc(0x170)]());const _0x1a921b=(CLI_BIN_NAME+'\x20'+process[_0x2106cc(0x184)]['slice'](0x2)[_0x2106cc(0x17e)]('\x20'))[_0x2106cc(0x17f)]();logger[_0x2106cc(0x17b)](_0x1a921b);const {isNonInteractive:_0x504056}=await import('./utils/is-non-interactive.js'),_0x8fc47a=_0x504056(_0x21d8f1);return{'config':_0x30c162,'auth':_0x3d73f9,'logger':logger,'env':_0x41a991,'nonInteractive':_0x8fc47a};}function a157_0x90a5(){const _0x55463a=['entries','merged','2236488mECcao','12AOWhzH','16345670jUkvBE','13015BzitrE','api.ts','defaultApp','object','cwd','projectConfig','https://g.lovrabet.com/dist/lovrabet-skill','length','./constant/env.js','string','apiDir','keys','template_base_url','appcode','setLogPath','setRawCommand','cookie','runtimeDomain','join','trim','-api.ts','387UCgbDu','apiDomain','5193072BTUVRT','argv','apps','values','14360ZsqUMV','2427772PdVWvZ','project','filter','map','globalConfig','env','35ibJiAy','1278NXherE','4zHNNtN','find','26630929Tsowud','1lcuEYT'];a157_0x90a5=function(){return _0x55463a;};return a157_0x90a5();}export function buildConfigFromFlags(_0x16e572){const {config:_0x436641,layers:_0x42c274}=readRawConfigWithLayers();return buildConfig(_0x436641,_0x16e572,_0x42c274);}export function getConfigAppCode(_0x1d2c92){const _0x5b6852=a157_0x524a,_0x28957e=readRawConfig(_0x1d2c92);if(_0x28957e[_0x5b6852(0x185)]&&typeof _0x28957e['apps']===_0x5b6852(0x16f)){const _0x139fc3=_0x28957e['defaultApp'];if(_0x139fc3&&_0x28957e[_0x5b6852(0x185)][_0x139fc3]?.[_0x5b6852(0x179)])return String(_0x28957e['apps'][_0x139fc3][_0x5b6852(0x179)])['trim']();const _0xabbdeb=Object[_0x5b6852(0x186)](_0x28957e[_0x5b6852(0x185)])[0x0];if(_0xabbdeb?.['appcode'])return String(_0xabbdeb[_0x5b6852(0x179)])[_0x5b6852(0x17f)]();}const _0x3f9b55=_0x28957e[_0x5b6852(0x179)]||_0x28957e['app'];if(typeof _0x3f9b55!==_0x5b6852(0x175)||_0x3f9b55[_0x5b6852(0x17f)]()==='')return undefined;return _0x3f9b55['trim']();}export function getMultiAppConfigs(_0x420583=a157_0x22e57d(0x189),_0x1e0e92){const _0x3dd5ed=a157_0x22e57d,_0x29b8a2=loadRawConfigLayers(_0x1e0e92);let _0x4c4eac,_0x5377bc;if(_0x420583===_0x3dd5ed(0x168)){const _0x3a1008=_0x29b8a2[_0x3dd5ed(0x18c)]['apps']&&typeof _0x29b8a2[_0x3dd5ed(0x18c)][_0x3dd5ed(0x185)]===_0x3dd5ed(0x16f)?_0x29b8a2[_0x3dd5ed(0x18c)][_0x3dd5ed(0x185)]:{},_0x4275f8=_0x29b8a2[_0x3dd5ed(0x171)][_0x3dd5ed(0x185)]&&typeof _0x29b8a2[_0x3dd5ed(0x171)]['apps']===_0x3dd5ed(0x16f)?_0x29b8a2['projectConfig'][_0x3dd5ed(0x185)]:{};_0x4c4eac={..._0x3a1008,..._0x4275f8};const _0x4356ae=readRawConfig(_0x1e0e92);_0x5377bc=_0x4356ae[_0x3dd5ed(0x16e)];}else _0x4c4eac=_0x29b8a2[_0x3dd5ed(0x171)]['apps'],_0x5377bc=_0x29b8a2['projectConfig'][_0x3dd5ed(0x16e)];if(!_0x4c4eac||typeof _0x4c4eac!==_0x3dd5ed(0x16f)||Object[_0x3dd5ed(0x177)](_0x4c4eac)[_0x3dd5ed(0x173)]===0x0)return null;return Object[_0x3dd5ed(0x167)](_0x4c4eac)[_0x3dd5ed(0x18b)](([_0x5a8c96,_0x27cc28])=>({'name':_0x5a8c96,'appcode':_0x27cc28?.[_0x3dd5ed(0x179)]||'','isDefault':_0x5a8c96===_0x5377bc,'env':_0x27cc28?.[_0x3dd5ed(0x160)],'apiDir':_0x27cc28?.[_0x3dd5ed(0x176)],'cookie':_0x27cc28?.[_0x3dd5ed(0x17c)]||undefined}))[_0x3dd5ed(0x18a)](_0x5269c8=>_0x5269c8[_0x3dd5ed(0x179)]);}export function getTemplateBaseUrl(_0x10b76b){const _0x3cc6e7=a157_0x22e57d,_0x350965=readRawConfig(_0x10b76b);if(_0x350965[_0x3cc6e7(0x178)]&&typeof _0x350965[_0x3cc6e7(0x178)]===_0x3cc6e7(0x175))return _0x350965['template_base_url']['replace'](/\/$/,'');return _0x3cc6e7(0x172);}function buildConfig(_0x4bdab5,_0x1db358,_0x256050){return{...resolveAppConfig({'raw':_0x4bdab5,'flags':_0x1db358,'layers':_0x256050,'readEnv':env}),'raw':_0x4bdab5};}export function resolveApiFilePath(_0x1abf35,_0x374a00){const _0x5d1907=a157_0x22e57d,_0x14c0f7=resolve(process[_0x5d1907(0x170)](),_0x1abf35),_0x42a16d=resolve(_0x14c0f7,_0x5d1907(0x16d));if(!_0x374a00)return _0x42a16d;const _0xfb3e24=readRawConfig(),_0x375cb1=_0xfb3e24[_0x5d1907(0x185)]&&typeof _0xfb3e24[_0x5d1907(0x185)]==='object'?_0xfb3e24[_0x5d1907(0x185)]:{},_0x45d8e1=Object[_0x5d1907(0x167)](_0x375cb1)[_0x5d1907(0x164)](([,_0x38b95e])=>_0x38b95e?.[_0x5d1907(0x179)]===_0x374a00);if(!_0x45d8e1)return _0x42a16d;const [_0x314ded,_0x5a1dac]=_0x45d8e1,_0x5d881e=typeof _0xfb3e24[_0x5d1907(0x16e)]===_0x5d1907(0x175)?_0xfb3e24[_0x5d1907(0x16e)]:undefined;if(_0x5a1dac?.[_0x5d1907(0x176)])return _0x42a16d;if(_0x5d881e&&_0x314ded!==_0x5d881e)return resolve(_0x14c0f7,_0x314ded+_0x5d1907(0x180));return _0x42a16d;}
@@ -1 +1 @@
1
- function a158_0x5cf3(_0x497123,_0x348bf0){_0x497123=_0x497123-0x16e;const _0x44f2cd=a158_0x44f2();let _0x5cf30d=_0x44f2cd[_0x497123];return _0x5cf30d;}(function(_0x2a49e9,_0x46c1ba){const _0x2c90c3=a158_0x5cf3,_0x5cf142=_0x2a49e9();while(!![]){try{const _0x2c7985=parseInt(_0x2c90c3(0x177))/0x1+parseInt(_0x2c90c3(0x173))/0x2*(parseInt(_0x2c90c3(0x17a))/0x3)+parseInt(_0x2c90c3(0x178))/0x4*(parseInt(_0x2c90c3(0x171))/0x5)+-parseInt(_0x2c90c3(0x176))/0x6+-parseInt(_0x2c90c3(0x172))/0x7+-parseInt(_0x2c90c3(0x175))/0x8+parseInt(_0x2c90c3(0x17d))/0x9*(-parseInt(_0x2c90c3(0x170))/0xa);if(_0x2c7985===_0x46c1ba)break;else _0x5cf142['push'](_0x5cf142['shift']());}catch(_0x5a3b64){_0x5cf142['push'](_0x5cf142['shift']());}}}(a158_0x44f2,0xd3665));function a158_0x44f2(){const _0x5c41fc=['push','4248900NANCAQ','exec','set','6336243prAwfD','cwd','api.ts','has','alias','10bmVHRF','10FbJtQm','8204518ERpToR','2KjyViS','datasetCode','1779632DTuRPL','1079430HRsecV','1568897JWSMPN','318312EstJEH'];a158_0x44f2=function(){return _0x5c41fc;};return a158_0x44f2();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x117f4b){const _0x19bd87=a158_0x5cf3,_0x52d02c=[],_0x5503c0=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x19bab3;while((_0x19bab3=_0x5503c0[_0x19bd87(0x17b)](_0x117f4b))!==null){_0x52d02c[_0x19bd87(0x179)]({'datasetCode':_0x19bab3[0x1],'tableName':_0x19bab3[0x2],'name':_0x19bab3[0x3],'alias':_0x19bab3[0x4]});}return _0x52d02c;}export function loadAliasMap(_0x3483bd,_0x3be2c6,_0x2afe73){const _0x30d242=a158_0x5cf3,_0x232e00=_0x2afe73??resolve(process[_0x30d242(0x17e)](),_0x3483bd,_0x30d242(0x17f));if(cache[_0x30d242(0x16e)](_0x232e00))return cache['get'](_0x232e00);if(!existsSync(_0x232e00))return cache[_0x30d242(0x17c)](_0x232e00,[]),[];try{const _0x595d46=readFileSync(_0x232e00,'utf-8'),_0x5e9c97=parseApiFile(_0x595d46);return cache[_0x30d242(0x17c)](_0x232e00,_0x5e9c97),_0x5e9c97;}catch{return cache[_0x30d242(0x17c)](_0x232e00,[]),[];}}export function resolveAlias(_0xef8095,_0x31d2d6,_0x4aa446,_0x255c86){const _0xbf4c36=a158_0x5cf3;if(!_0x31d2d6)return undefined;const _0x51962b=loadAliasMap(_0xef8095,_0x4aa446,_0x255c86),_0x3982d1=_0x51962b['find'](_0x37fd2c=>_0x37fd2c[_0xbf4c36(0x16f)]===_0x31d2d6);return _0x3982d1?.[_0xbf4c36(0x174)];}export function listAliases(_0x26b298,_0x3a62d8,_0xe142f1){return loadAliasMap(_0x26b298,_0x3a62d8,_0xe142f1);}
1
+ (function(_0x217c9d,_0x37bec7){const _0x3554a5=a158_0x44dd,_0x499f88=_0x217c9d();while(!![]){try{const _0x3108e5=-parseInt(_0x3554a5(0xba))/0x1+parseInt(_0x3554a5(0xc2))/0x2+parseInt(_0x3554a5(0xb6))/0x3*(parseInt(_0x3554a5(0xc1))/0x4)+-parseInt(_0x3554a5(0xc4))/0x5+parseInt(_0x3554a5(0xbe))/0x6*(parseInt(_0x3554a5(0xb5))/0x7)+-parseInt(_0x3554a5(0xbb))/0x8*(-parseInt(_0x3554a5(0xbf))/0x9)+-parseInt(_0x3554a5(0xc0))/0xa;if(_0x3108e5===_0x37bec7)break;else _0x499f88['push'](_0x499f88['shift']());}catch(_0x3f8ba4){_0x499f88['push'](_0x499f88['shift']());}}}(a158_0x5b4f,0x558c4));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a158_0x5b4f(){const _0x54c969=['has','utf-8','14TiFNxD','15AiywGW','set','exec','find','113622kSKTSS','8vNsthJ','alias','get','1046136ykoHpB','519795ttgiWj','10811800gqOVoW','545668CrzBWl','1228370uacqtg','cwd','787655ucDaWn'];a158_0x5b4f=function(){return _0x54c969;};return a158_0x5b4f();}const cache=new Map();function parseApiFile(_0x280da8){const _0x59a651=a158_0x44dd,_0x3fa132=[],_0x2e2e55=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2517e8;while((_0x2517e8=_0x2e2e55[_0x59a651(0xb8)](_0x280da8))!==null){_0x3fa132['push']({'datasetCode':_0x2517e8[0x1],'tableName':_0x2517e8[0x2],'name':_0x2517e8[0x3],'alias':_0x2517e8[0x4]});}return _0x3fa132;}export function loadAliasMap(_0x1e495e,_0xe101f2,_0xa5f14d){const _0x3def29=a158_0x44dd,_0x1d05d7=_0xa5f14d??resolve(process[_0x3def29(0xc3)](),_0x1e495e,'api.ts');if(cache[_0x3def29(0xc5)](_0x1d05d7))return cache[_0x3def29(0xbd)](_0x1d05d7);if(!existsSync(_0x1d05d7))return cache['set'](_0x1d05d7,[]),[];try{const _0x5a1524=readFileSync(_0x1d05d7,_0x3def29(0xb4)),_0x4c3cfc=parseApiFile(_0x5a1524);return cache['set'](_0x1d05d7,_0x4c3cfc),_0x4c3cfc;}catch{return cache[_0x3def29(0xb7)](_0x1d05d7,[]),[];}}export function resolveAlias(_0x4a498c,_0x48c456,_0x392a04,_0x174cad){const _0x339ad2=a158_0x44dd;if(!_0x48c456)return undefined;const _0x259653=loadAliasMap(_0x4a498c,_0x392a04,_0x174cad),_0x1ac83d=_0x259653[_0x339ad2(0xb9)](_0x40fc83=>_0x40fc83[_0x339ad2(0xbc)]===_0x48c456);return _0x1ac83d?.['datasetCode'];}function a158_0x44dd(_0x251958,_0x3dced8){_0x251958=_0x251958-0xb4;const _0x5b4f71=a158_0x5b4f();let _0x44dd2f=_0x5b4f71[_0x251958];return _0x44dd2f;}export function listAliases(_0x547948,_0x53e243,_0x1f5a83){return loadAliasMap(_0x547948,_0x53e243,_0x1f5a83);}
@@ -1 +1 @@
1
- (function(_0x595820,_0x53cc9f){const _0x2b8cb9=a159_0x29a9,_0x255a46=_0x595820();while(!![]){try{const _0x46a8a0=-parseInt(_0x2b8cb9(0xf5))/0x1+-parseInt(_0x2b8cb9(0x86))/0x2+-parseInt(_0x2b8cb9(0xbf))/0x3+parseInt(_0x2b8cb9(0xae))/0x4+parseInt(_0x2b8cb9(0x102))/0x5+parseInt(_0x2b8cb9(0x116))/0x6+parseInt(_0x2b8cb9(0x84))/0x7*(parseInt(_0x2b8cb9(0xe2))/0x8);if(_0x46a8a0===_0x53cc9f)break;else _0x255a46['push'](_0x255a46['shift']());}catch(_0x481ff8){_0x255a46['push'](_0x255a46['shift']());}}}(a159_0x382b,0x60a5f));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x5fba35){_activeCookie=_0x5fba35||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 a159_0x382b(){const _0x129265=['.remove(id);','type','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','tableName','replace','getOne','length','cli:rabetbase','list','data','enabled','/api/','toString','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','Operation\x20\x22','/smartapi/custom/updateUserCustomSql','api_error','includes','scriptName','path','\x20\x20pageSize:\x2020,','const\x20result\x20=\x20await\x20client.models.','description','sdk','clientOperationId','set','push','object','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','body','/smartapi/dblink/create','/api/management/library/scripts/info?id=','719512bVmEGS','.filter({','//\x20','tags','add','API\x20error\x20code:\x20','summary','AbortError','\x20apps.\x20','error','/smartapi/app-config/getByKey','includeImports','/smartapi/app-config/delete','table','//\x20SQL:\x20','responseFields','/smartapi/dblink/delete','/smartapi/dblink/testConnect','dbId','218090Hpcrfk','/smartapi/app-config/list','code','/smartapi/dataset/get-driven-data?','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','/smartapi/db-analysis/start','/smartapi/question/er-config/business-group/edit','/smartapi/question/er-config/erCreate','modelCode','401','Page\x20not\x20found:\x20','/smartapi/lovrabet/dataset/','\x20\x20return\x20rows;','245825VjAGMo','/smartapi/dataset/update-driven-data','version','\x20of\x20','application/json','success','datasetTableCount','/api/management/library/scripts/save','target','dbtableConfig','pageSize','/api/management/library/scripts/statistics?appCode=','warn','SQL\x20query\x20not\x20found:\x20','/smartapi/lovrabet/detail?pageId=','errorMessage','/smartapi/dblink/getAllTableList','status','Unauthorized','planId','4641612ieSxAK','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/dblink/getList','const\x20data\x20=\x20await\x20client.sql.execute({','operationId','entries','/smartapi/dataset/text-generate/status?','\x20failed,\x20HTTP\x20','currentPage','/smartapi/app-config/create','/api/management/library/scripts/list?appCode=','appCode','GET','/standard-page-status?appCode=','signal','validation','modelId','\x20\x20sqlCode:\x20\x27','/smartapi/dataset/get-dataset-list','json','Request\x20timeout:\x20','/smartapi/dblink/update','isArray','filter','apiError','BFF\x20script\x20not\x20found:\x20id=','.create({\x20/*\x20fields\x20*/\x20});','has','Request\x20failed:\x20','requirementDescription','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','abort','?sqlCode=','/smartapi/dataset/text-generate/preview','sqlName','find','functionName','value','/sync-to-pages','7MGCFPA','tableList','750504YMZHiU','});','displayName','label','/smartapi/custom/queryUserCustomSqlList','/smartapi/db-analysis/jobs/cancel','/api/custom/executeSql','key','errorCode','/generate-standard-pages/start','test','.getOne(id);','operations','/smartapi/custom/getUserCustomSql?id=','POST','/smartapi/custom/deleteUserCustomSql','Dataset\x20not\x20found:\x20','errorMsg','scriptType','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','toLowerCase','/smartapi/lovrabet/update-page','/smartapi/question/er-config/update-single','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','sqlCode','tableData','/smartapi/dblink/getTableDiffV2ByPage','/smartapi/dblink/getOne','/filter','operationName','/smartapi/dataset/text-generate/start','join','stringify','name','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','\x20failed','cookie','/api/management/library/scripts/delete','datasetName','\x22\x20not\x20found\x20in\x20dataset\x20','1729136fJsSjh','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','&type=','/smartapi/dataset/get-dataset-operation','map','message','/smartapi/dataset/restore-dataset','requestFields','totalCount','/smartapi/app/getList','/generate-standard-pages/status?','method','\x20\x20currentPage:\x201,','deleted','delete','\x20\x20});','string','1067331pRaiuv','\x20\x20\x20\x20sqlCode:\x20\x27','/smartapi/app-config/update'];a159_0x382b=function(){return _0x129265;};return a159_0x382b();}function a159_0x29a9(_0x5dd3db,_0x3cd2e3){_0x5dd3db=_0x5dd3db-0x6e;const _0x382b72=a159_0x382b();let _0x29a9fd=_0x382b72[_0x5dd3db];return _0x29a9fd;}function createFetchFailureError(_0x4f0c7b,_0x3b23fe){const _0x46bcb3=a159_0x29a9,_0x51225c=_0x3b23fe instanceof Error?_0x3b23fe[_0x46bcb3(0xb3)]:String(_0x3b23fe);return CliErrors['apiError'](_0x46bcb3(0x79)+_0x4f0c7b+(_0x51225c?'\x20('+_0x51225c+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}async function apiRequest(_0x5bf720,_0x4a3a0={}){const _0x18b7ca=a159_0x29a9,{method:method=_0x18b7ca(0x122),body:_0x10e694,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x4a3a0,_0x4e235f=useRuntime?getRuntimeDomain():getApiDomain(),_0x18f52e=_activeCookie||getCookie(),_0x8ed02c=''+_0x4e235f+_0x5bf720,_0x501fbc=new AbortController(),_0x5bf9b7=setTimeout(()=>_0x501fbc[_0x18b7ca(0x7c)](),timeout);try{const _0x95a0b9=await fetch(_0x8ed02c,{'method':method,'headers':{'Content-Type':_0x18b7ca(0x106),'Cookie':_0x18f52e,'X-Invoke-Source':_0x18b7ca(0xc9),...headers},'body':_0x10e694?JSON[_0x18b7ca(0xa6)](_0x10e694):undefined,'signal':_0x501fbc[_0x18b7ca(0x124)]});let _0x59adda;try{_0x59adda=await _0x95a0b9[_0x18b7ca(0x70)]();}catch(_0x415f23){if(_0x415f23 instanceof Error&&_0x415f23['name']===_0x18b7ca(0xe9))throw CliErrors[_0x18b7ca(0x75)](_0x18b7ca(0x71)+_0x8ed02c);if(_0x95a0b9['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x18b7ca(0x75)](_0x18b7ca(0xaf)+_0x95a0b9[_0x18b7ca(0x113)]+')',_0x95a0b9[_0x18b7ca(0x113)]>=0x190?_0x18b7ca(0x9d):undefined);}if(!_0x95a0b9['ok']||_0x59adda[_0x18b7ca(0x107)]===![])throw CliErrors[_0x18b7ca(0x75)](_0x59adda[_0x18b7ca(0x97)]||_0x59adda[_0x18b7ca(0xb3)]||'API\x20error:\x20'+_0x95a0b9[_0x18b7ca(0x113)],_0x59adda[_0x18b7ca(0x8e)]?_0x18b7ca(0xe7)+_0x59adda[_0x18b7ca(0x8e)]:undefined);return _0x59adda;}catch(_0xc0f74f){if(_0xc0f74f instanceof CliError)throw _0xc0f74f;if(_0xc0f74f instanceof Error&&_0xc0f74f[_0x18b7ca(0xa7)]===_0x18b7ca(0xe9))throw CliErrors[_0x18b7ca(0x75)](_0x18b7ca(0x71)+_0x8ed02c);throw createFetchFailureError(_0x8ed02c,_0xc0f74f);}finally{clearTimeout(_0x5bf9b7);}}function isAuthFailure(_0xcdda27){const _0x1c0a52=a159_0x29a9,_0x4b4db8=_0xcdda27['errorMsg']||_0xcdda27[_0x1c0a52(0xb3)]||_0xcdda27[_0x1c0a52(0xcb)]?.[_0x1c0a52(0xb3)]||_0xcdda27[_0x1c0a52(0x111)]||_0xcdda27[_0x1c0a52(0xeb)]||'';return _0xcdda27['errorCode']==='UNAUTHORIZED'||_0xcdda27[_0x1c0a52(0xf7)]===0x191||_0xcdda27[_0x1c0a52(0xf7)]===_0x1c0a52(0xfe)||_0x4b4db8[_0x1c0a52(0xd3)](_0x1c0a52(0xfe))||_0x4b4db8[_0x1c0a52(0xd3)](_0x1c0a52(0x114))||_0x4b4db8[_0x1c0a52(0xd3)]('登录')||_0x4b4db8[_0x1c0a52(0xd3)]('认证');}export async function platformFetch(_0x3073af,_0x21ed83){const _0x3a7d69=a159_0x29a9;let _0x4b43e7;try{_0x4b43e7=await fetch(_0x3073af,{'method':_0x21ed83['method']??_0x3a7d69(0x122),'headers':{'Content-Type':_0x3a7d69(0x106),'Cookie':_0x21ed83[_0x3a7d69(0xaa)],'X-Invoke-Source':_0x3a7d69(0xc9)},..._0x21ed83[_0x3a7d69(0xdf)]&&{'body':JSON[_0x3a7d69(0xa6)](_0x21ed83[_0x3a7d69(0xdf)])}});}catch(_0xea2878){throw createFetchFailureError(_0x3073af,_0xea2878);}if(!_0x4b43e7['ok']){if(_0x4b43e7[_0x3a7d69(0x113)]===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x3a7d69(0x75)](_0x21ed83[_0x3a7d69(0x89)]+_0x3a7d69(0x11d)+_0x4b43e7[_0x3a7d69(0x113)]);}const _0x4e5132=await _0x4b43e7[_0x3a7d69(0x70)]();if(_0x4e5132[_0x3a7d69(0x107)]===![]){if(isAuthFailure(_0x4e5132))throw CliErrors['authRequired']();throw CliErrors[_0x3a7d69(0x75)](_0x4e5132[_0x3a7d69(0x97)]||_0x4e5132[_0x3a7d69(0xb3)]||_0x21ed83[_0x3a7d69(0x89)]+_0x3a7d69(0xa9));}return _0x4e5132[_0x3a7d69(0xcb)];}export async function listBffScripts(_0x24801c,_0x3b25da,_0x380e98){const _0xe8334f=a159_0x29a9;let _0x468235=_0xe8334f(0x120)+_0x24801c;if(_0x3b25da)_0x468235+=_0xe8334f(0xb0)+_0x3b25da;const _0x306b36=await apiRequest(_0x468235);let _0xd0ad9d=extractList(_0x306b36[_0xe8334f(0xcb)]);if(_0x380e98?.[_0xe8334f(0xd4)]){const _0x1d7ee1=_0x380e98['scriptName'][_0xe8334f(0x9a)]();_0xd0ad9d=_0xd0ad9d[_0xe8334f(0x74)](_0x4086f8=>_0x4086f8[_0xe8334f(0x81)]?.[_0xe8334f(0x9a)]()['includes'](_0x1d7ee1)||_0x4086f8[_0xe8334f(0xd8)]?.[_0xe8334f(0x9a)]()[_0xe8334f(0xd3)](_0x1d7ee1));}return _0xd0ad9d;}export async function getBffScriptInfo(_0x590f0b){const _0x424b37=a159_0x29a9,_0x937847=await apiRequest(_0x424b37(0xe1)+_0x590f0b);if(!_0x937847[_0x424b37(0xcb)])throw CliErrors[_0x424b37(0x125)](_0x424b37(0x76)+_0x590f0b);return _0x937847[_0x424b37(0xcb)];}export async function saveBffScript(_0x3456da){const _0x1b2091=a159_0x29a9,_0x44608f=await apiRequest(_0x1b2091(0x109),{'method':_0x1b2091(0x94),'body':_0x3456da}),{id:_0x43fde8,entity:_0x21bf2f}=normalizeEntityWithIdResponse(_0x44608f[_0x1b2091(0xcb)]);if(_0x43fde8!==undefined){const _0x48d509=typeof _0x21bf2f[_0x1b2091(0x81)]===_0x1b2091(0xbe)||typeof _0x21bf2f[_0x1b2091(0x98)]===_0x1b2091(0xbe)?_0x21bf2f:undefined;return{'id':_0x43fde8,'script':_0x48d509};}throw CliErrors['apiError']('BFF\x20save\x20returned\x20no\x20valid\x20id');}export async function deleteBffScript(_0x328be1){const _0x5c1b14=a159_0x29a9;await apiRequest(_0x5c1b14(0xab),{'method':_0x5c1b14(0x94),'body':{'id':_0x328be1}});}export async function getBffScriptStatistics(_0x29bb7c){const _0x585a04=a159_0x29a9,_0x14e7be=await apiRequest(_0x585a04(0x10d)+_0x29bb7c);return extractList(_0x14e7be[_0x585a04(0xcb)]);}export async function clearBffScriptCache(){const _0x3d4402=a159_0x29a9,_0x5901a1=await apiRequest('/api/management/script/cache/clear',{'method':'POST','useRuntime':!![]});return typeof _0x5901a1[_0x3d4402(0xcb)]===_0x3d4402(0xbe)?_0x5901a1[_0x3d4402(0xcb)]:'';}export async function listBffDatasetOperations(_0x29039a,_0x368a79){const _0x434c5f=a159_0x29a9,_0x6168b2=await apiRequest(_0x434c5f(0xb1),{'method':_0x434c5f(0x94),'body':{'appCode':_0x29039a,'datasetId':_0x368a79}});return _0x6168b2['data'];}export async function listSqlQueries(_0x30a098,_0x559a02){const _0x4b0891=a159_0x29a9,_0x135dcb=await apiRequest(_0x4b0891(0x8a),{'method':'POST','body':{'appCode':_0x30a098,'currentPage':_0x559a02?.[_0x4b0891(0x11e)]??0x1,'pageSize':_0x559a02?.['pageSize']??0x32,'sqlCode':_0x559a02?.[_0x4b0891(0x9e)],'sqlName':_0x559a02?.[_0x4b0891(0x7f)]}});return _0x135dcb[_0x4b0891(0xcb)];}export async function getSqlQueryInfo(_0x9e804a,_0x18c425){const _0x15376c=a159_0x29a9,_0x5b335b=await listSqlQueries(_0x9e804a,{'sqlCode':_0x18c425}),_0x556416=_0x5b335b['tableData']?.[0x0];if(!_0x556416)throw CliErrors['validation'](_0x15376c(0x10f)+_0x18c425);return _0x556416;}export async function getSqlQueryDetail(_0x161fce){const _0x3c4438=a159_0x29a9,_0x59ec2d=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x3c4438(0x7d)+encodeURIComponent(_0x161fce)));if(!_0x59ec2d['data'])throw CliErrors[_0x3c4438(0x125)](_0x3c4438(0x10f)+_0x161fce);return _0x59ec2d['data'];}export async function getSqlQueryDetailById(_0x5512fe){const _0x412e6b=a159_0x29a9,_0x2f1cf6=await apiRequest(_0x412e6b(0x93)+_0x5512fe);if(!_0x2f1cf6[_0x412e6b(0xcb)])throw CliErrors[_0x412e6b(0x125)]('SQL\x20query\x20not\x20found:\x20id='+_0x5512fe);return _0x2f1cf6['data'];}export async function createSqlQuery(_0xf9479){const _0x32a133=a159_0x29a9,_0xde521e=await apiRequest('/smartapi/custom/saveUserCustomSql',{'method':'POST','body':_0xf9479}),{id:_0x2e41c7,entity:_0x5841cf}=normalizeEntityWithIdResponse(_0xde521e[_0x32a133(0xcb)]);if(!(_0x32a133(0x9e)in _0x5841cf)&&_0x2e41c7)return getSqlQueryDetailById(_0x2e41c7);return normalizeSqlQueryEntity(_0x5841cf);}export async function updateSqlQuery(_0xfd8284){const _0x558014=a159_0x29a9,_0x4670b7=await apiRequest(_0x558014(0xd1),{'method':_0x558014(0x94),'body':_0xfd8284}),{id:_0x40ce51,entity:_0xb85b8d}=normalizeEntityWithIdResponse(_0x4670b7['data']);if(!(_0x558014(0x9e)in _0xb85b8d)){if(_0xfd8284[_0x558014(0x9e)])return getSqlQueryDetail(_0xfd8284[_0x558014(0x9e)]);if(_0x40ce51)return getSqlQueryDetailById(_0x40ce51);}return normalizeSqlQueryEntity(_0xb85b8d);}export async function deleteSqlQuery(_0x4b7b31){const _0x574a35=a159_0x29a9;await apiRequest(_0x574a35(0x95),{'method':_0x574a35(0x94),'body':_0x4b7b31});}export async function saveSqlQuery(_0x5d7522){const _0x521ffd=a159_0x29a9,_0x156db5=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x521ffd(0x94),'body':_0x5d7522});return _0x156db5[_0x521ffd(0xcb)];}function normalizeSqlQueryEntity(_0x11e16a){const _0x3c0573=a159_0x29a9;return{..._0x11e16a,'id':Number(_0x11e16a['id']),'dbId':_0x11e16a[_0x3c0573(0xf4)]==null?undefined:Number(_0x11e16a[_0x3c0573(0xf4)]),'version':_0x11e16a['version']==null?undefined:Number(_0x11e16a[_0x3c0573(0x104)])};}export async function executeSql(_0x35e501,_0x21f261,_0x528f1f){const _0x58fce7=a159_0x29a9,_0x1751ff=await apiRequest(_0x58fce7(0x8c),{'method':_0x58fce7(0x94),'body':{'appCode':_0x35e501,'sqlCode':_0x21f261,..._0x528f1f&&{'params':_0x528f1f}},'useRuntime':!![]});return _0x1751ff[_0x58fce7(0xcb)];}export async function executeDatasetDataOperation(_0x217f2c,_0x2644eb,_0x5354f6,_0x293208={}){const _0x225da5=a159_0x29a9;try{const _0x56e933=await apiRequest(_0x225da5(0xcd)+_0x217f2c+'/'+_0x2644eb+'/'+_0x5354f6,{'method':'POST','body':_0x293208,'useRuntime':!![]});return _0x56e933['data'];}catch(_0x18af25){if(_0x5354f6===_0x225da5(0xc7)&&_0x18af25 instanceof CliError&&_0x18af25[_0x225da5(0xf7)]===_0x225da5(0xd2)&&_0x293208['id']!==undefined&&_0x293208['id']!==null&&_0x293208['id']!==''){const _0x4d4a52=await apiRequest('/api/'+_0x217f2c+'/'+_0x2644eb+_0x225da5(0xa2),{'method':'POST','body':{'where':{'id':{'$eq':_0x293208['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x50abce=Array['isArray'](_0x4d4a52['data']?.[_0x225da5(0x9f)])?_0x4d4a52[_0x225da5(0xcb)][_0x225da5(0x9f)]:[];return _0x50abce[0x0]??null;}throw _0x18af25;}}export async function listDatasets(_0x847511,_0x27dfd3){const _0x2a0701=a159_0x29a9,_0x879cb0={'appCode':_0x847511,'deleted':_0x27dfd3?.[_0x2a0701(0xbb)]??![]};if(_0x27dfd3?.[_0x2a0701(0xf7)])_0x879cb0[_0x2a0701(0xf7)]=_0x27dfd3[_0x2a0701(0xf7)];if(_0x27dfd3?.[_0x2a0701(0xa7)])_0x879cb0['name']=_0x27dfd3[_0x2a0701(0xa7)];const _0x5993df=await apiRequest(_0x2a0701(0x6f),{'method':'POST','body':_0x879cb0});return extractList(_0x5993df[_0x2a0701(0xcb)]);}export async function deleteDataset(_0x1933f4,_0x2e5f31){const _0x4f20a4=a159_0x29a9;await apiRequest('/smartapi/dataset/delete-dataset',{'method':_0x4f20a4(0x94),'body':{'appCode':_0x1933f4,'datasetId':_0x2e5f31}});}export async function restoreDataset(_0xb92bfe,_0x1e8b3e){const _0x1fbfa1=a159_0x29a9;await apiRequest(_0x1fbfa1(0xb4),{'method':_0x1fbfa1(0x94),'body':{'appCode':_0xb92bfe,'datasetId':_0x1e8b3e}});}export async function previewTextGeneratedDataset(_0x5d7080,_0xf140da){const _0x30a07f=a159_0x29a9,_0xb5d8b2=await apiRequest(_0x30a07f(0x7e),{'method':'POST','body':{'appCode':_0x5d7080,'datasetName':_0xf140da[_0x30a07f(0xac)],'requirementDescription':_0xf140da[_0x30a07f(0x7a)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0xb5d8b2[_0x30a07f(0xcb)];}export async function startTextGeneratedDataset(_0x4d964d,_0x565627,_0xad0a00){const _0x4c434f=a159_0x29a9,_0xc5d76=await apiRequest(_0x4c434f(0xa4),{'method':_0x4c434f(0x94),'body':{'appCode':_0x4d964d,..._0xad0a00?.['clientOperationId']?{'clientOperationId':_0xad0a00[_0x4c434f(0xda)]}:{},'design':_0x565627},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0xc5d76[_0x4c434f(0xcb)];}export async function getTextGeneratedDatasetStatus(_0x481c3f,_0x47a264){const _0x2922ba=a159_0x29a9,_0x42a03a=new URLSearchParams({'appCode':_0x481c3f});_0x47a264[_0x2922ba(0x11a)]&&_0x42a03a['set'](_0x2922ba(0x11a),_0x47a264[_0x2922ba(0x11a)]);_0x47a264[_0x2922ba(0xda)]&&_0x42a03a[_0x2922ba(0xdb)](_0x2922ba(0xda),_0x47a264[_0x2922ba(0xda)]);const _0x74b2c1=await apiRequest(_0x2922ba(0x11c)+_0x42a03a[_0x2922ba(0xce)]());return _0x74b2c1[_0x2922ba(0xcb)];}export async function searchDatasets(_0x3945b6,_0x577548){const _0x1f0125=a159_0x29a9,_0x2cc62d=await listDatasets(_0x3945b6,{'name':_0x577548}),_0x5e21b2=_0x577548[_0x1f0125(0x9a)](),_0x49ac14=new Set(_0x2cc62d[_0x1f0125(0xb2)](_0x499e98=>_0x499e98['id'])),_0x41339d=_0x2cc62d['filter'](_0x5b63e9=>_0x5b63e9[_0x1f0125(0x10b)]?.[_0x1f0125(0xc5)]?.[_0x1f0125(0x9a)]()[_0x1f0125(0xd3)](_0x5e21b2)||_0x5b63e9[_0x1f0125(0xd8)]?.[_0x1f0125(0x9a)]()[_0x1f0125(0xd3)](_0x5e21b2)),_0x407126=await listDatasets(_0x3945b6,{'code':_0x577548});for(const _0x5a8e32 of _0x407126){!_0x49ac14[_0x1f0125(0x78)](_0x5a8e32['id'])&&(_0x2cc62d[_0x1f0125(0xdc)](_0x5a8e32),_0x49ac14[_0x1f0125(0xe6)](_0x5a8e32['id']));}return _0x2cc62d;}export function normalizeDatasetOperations(_0x30908a){const _0x654a6e=a159_0x29a9;if(Array['isArray'](_0x30908a))return _0x30908a[_0x654a6e(0x74)](_0x28340f=>_0x28340f!=null&&typeof _0x28340f===_0x654a6e(0xdd));if(_0x30908a&&typeof _0x30908a===_0x654a6e(0xdd))return Object[_0x654a6e(0x11b)](_0x30908a)[_0x654a6e(0x74)](([,_0x243280])=>_0x243280!=null&&typeof _0x243280==='object')['map'](([_0x23168c,_0x55e754])=>({..._0x55e754,'name':_0x55e754['name']??_0x55e754[_0x654a6e(0xa3)]??_0x23168c}));return[];}export async function getDatasetDetail(_0x43e370){const _0x17a8cd=a159_0x29a9,_0x1b1b6a=/^\d+$/[_0x17a8cd(0x90)](_0x43e370)?'id':'code',_0x40f084=await apiRequest(_0x17a8cd(0xf8)+_0x1b1b6a+'='+_0x43e370);return _0x40f084['data'];}export async function updateDrivenData(_0x5b30b3){const _0x5dc61f=a159_0x29a9,_0x431d2c=await apiRequest(_0x5dc61f(0x103),{'method':_0x5dc61f(0x94),'body':_0x5b30b3});return _0x431d2c[_0x5dc61f(0xcb)];}export async function getDatasetOperations(_0x489014){const _0x375481=a159_0x29a9,_0x1d98b4=await getDatasetDetail(_0x489014),_0x284d36=normalizeDatasetOperations(_0x1d98b4[_0x375481(0x92)])['map'](_0x7ebc=>({'name':_0x7ebc[_0x375481(0xa7)]||_0x7ebc[_0x375481(0xa3)],'displayName':_0x7ebc[_0x375481(0x88)]||_0x7ebc[_0x375481(0xa7)],'type':_0x7ebc[_0x375481(0xc3)],'method':_0x7ebc[_0x375481(0xb9)],'path':_0x7ebc[_0x375481(0xd5)],'enabled':_0x7ebc[_0x375481(0xcc)]??!![],'requestFields':_0x7ebc[_0x375481(0xb5)],'responseFields':_0x7ebc[_0x375481(0xf1)]}));return{'dataset':{'id':_0x1d98b4['id']??_0x1d98b4['modelId'],'name':_0x1d98b4['name'],'code':_0x1d98b4[_0x375481(0xf7)]||_0x1d98b4[_0x375481(0xfd)],'tableName':_0x1d98b4['tableName']||_0x1d98b4['dbtableConfig']?.[_0x375481(0xc5)]},'operations':_0x284d36};}export async function getOperationDetail(_0x513510,_0x5a49e3,_0x34d251){const _0x24dfba=a159_0x29a9;let _0x23bf71=_0x5a49e3;if(!/^\d+$/['test'](_0x5a49e3)){const _0x5524c5=await listDatasets(_0x513510,{'code':_0x5a49e3}),_0x25233f=_0x5524c5[_0x24dfba(0x80)](_0x34f375=>_0x34f375['code']===_0x5a49e3||String(_0x34f375['id'])===_0x5a49e3);if(!_0x25233f)throw CliErrors[_0x24dfba(0x125)](_0x24dfba(0x96)+_0x5a49e3);_0x23bf71=String(_0x25233f['id']);}const _0x269099=await getDatasetDetail(_0x23bf71),_0x1c1449=normalizeDatasetOperations(_0x269099[_0x24dfba(0x92)])[_0x24dfba(0x80)](_0x581796=>(_0x581796[_0x24dfba(0xa7)]||_0x581796['operationName'])===_0x34d251);if(!_0x1c1449)throw CliErrors['validation'](_0x24dfba(0xd0)+_0x34d251+_0x24dfba(0xad)+_0x5a49e3);return{'dataset':{'id':_0x269099['id']??_0x269099[_0x24dfba(0x126)],'name':_0x269099[_0x24dfba(0xa7)],'code':_0x269099['code']||_0x269099[_0x24dfba(0xfd)],'tableName':_0x269099[_0x24dfba(0xc5)]||_0x269099['dbtableConfig']?.['tableName']},'operation':_0x1c1449};}export async function startGenerateStandardPages(_0x24082b,_0x1c4799,_0x1a0fc6){const _0x3687b7=a159_0x29a9,_0x5f17c7=await apiRequest(_0x3687b7(0x100)+_0x1c4799+_0x3687b7(0x8f),{'method':_0x3687b7(0x94),'body':{'appCode':_0x24082b,..._0x1a0fc6?.[_0x3687b7(0xda)]?{'clientOperationId':_0x1a0fc6[_0x3687b7(0xda)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x5f17c7[_0x3687b7(0xcb)];}export async function getGenerateStandardPagesStatus(_0x33496e,_0x52d948,_0x576085){const _0x37b9c8=a159_0x29a9,_0x5ccad1=new URLSearchParams({'appCode':_0x33496e});_0x576085[_0x37b9c8(0x11a)]&&_0x5ccad1[_0x37b9c8(0xdb)](_0x37b9c8(0x11a),_0x576085['operationId']);_0x576085[_0x37b9c8(0xda)]&&_0x5ccad1[_0x37b9c8(0xdb)]('clientOperationId',_0x576085['clientOperationId']);const _0x88e6bd=await apiRequest(_0x37b9c8(0x100)+_0x52d948+_0x37b9c8(0xb8)+_0x5ccad1['toString']());return _0x88e6bd[_0x37b9c8(0xcb)];}export async function getStandardPageStatus(_0x4edca3,_0x546a3e){const _0xe1eccf=a159_0x29a9,_0x23dcca=await apiRequest('/smartapi/lovrabet/dataset/'+_0x546a3e+_0xe1eccf(0x123)+encodeURIComponent(_0x4edca3));return _0x23dcca[_0xe1eccf(0xcb)];}export async function tryGetStandardPageStatus(_0x395d12,_0x153fec){const _0x33092a=a159_0x29a9;try{return await getStandardPageStatus(_0x395d12,_0x153fec);}catch(_0x39522f){if(_0x39522f instanceof CliError&&_0x39522f[_0x33092a(0xf7)]===_0x33092a(0xd2)&&/404|not found|non-json response/i[_0x33092a(0x90)](_0x39522f[_0x33092a(0xb3)]))return null;throw _0x39522f;}}export async function syncStandardPages(_0x3b2a9f,_0x3b7a37){const _0x501821=a159_0x29a9,_0x4e0662=await apiRequest(_0x501821(0x100)+_0x3b7a37+_0x501821(0x83),{'method':_0x501821(0x94),'body':{'appCode':_0x3b2a9f}});return _0x4e0662[_0x501821(0xcb)];}export async function getPageDetail(_0x3b4b34){const _0x324d12=a159_0x29a9,_0x225aab=await apiRequest(_0x324d12(0x110)+_0x3b4b34);if(!_0x225aab[_0x324d12(0xcb)])throw CliErrors[_0x324d12(0x125)](_0x324d12(0xff)+_0x3b4b34);return _0x225aab[_0x324d12(0xcb)];}export async function updatePage(_0x19a820,_0x8e2129,_0x22096c,_0x242790){const _0x3b8cdc=a159_0x29a9,_0xd3d9e2=await apiRequest(_0x3b8cdc(0x9b),{'method':_0x3b8cdc(0x94),'body':{'appCode':_0x19a820,'pageId':_0x8e2129,'code':_0x22096c,'datasetIds':_0x242790}});return _0xd3d9e2[_0x3b8cdc(0xcb)];}export function generateSdkCode(_0x5517e9,_0x5d0e3a,_0x546301){const _0x5ce1ad=a159_0x29a9,_0x111be5=_0x546301?.[_0x5ce1ad(0xed)]??!![],_0x1c0d02='dataset_'+_0x5517e9[_0x5ce1ad(0xf7)]?.[_0x5ce1ad(0xc6)](/-/g,'_'),_0x397641=_0x5d0e3a['name']||_0x5d0e3a[_0x5ce1ad(0xa3)]||_0x5ce1ad(0x74),_0x57a466=[];_0x111be5&&_0x57a466[_0x5ce1ad(0xdc)](_0x5ce1ad(0x117),'',_0x5ce1ad(0x7b),'');_0x57a466['push'](_0x5ce1ad(0xe4)+_0x5517e9['name']+'\x20('+(_0x5517e9['tableName']||_0x5ce1ad(0xef))+')');if(_0x397641===_0x5ce1ad(0x74))_0x57a466[_0x5ce1ad(0xdc)](_0x5ce1ad(0xd7)+_0x1c0d02+_0x5ce1ad(0xe3),'\x20\x20where:\x20{},',_0x5ce1ad(0xd6),_0x5ce1ad(0xba),'});');else{if(_0x397641===_0x5ce1ad(0xc7))_0x57a466[_0x5ce1ad(0xdc)]('const\x20result\x20=\x20await\x20client.models.'+_0x1c0d02+_0x5ce1ad(0x91));else{if(_0x397641==='create')_0x57a466[_0x5ce1ad(0xdc)](_0x5ce1ad(0xd7)+_0x1c0d02+_0x5ce1ad(0x77));else{if(_0x397641==='update')_0x57a466[_0x5ce1ad(0xdc)](_0x5ce1ad(0xd7)+_0x1c0d02+_0x5ce1ad(0xde));else _0x397641===_0x5ce1ad(0xbc)||_0x397641==='remove'?_0x57a466[_0x5ce1ad(0xdc)](_0x5ce1ad(0xd7)+_0x1c0d02+_0x5ce1ad(0xc2)):_0x57a466[_0x5ce1ad(0xdc)](_0x5ce1ad(0xd7)+_0x1c0d02+'.'+_0x397641+'(/*\x20params\x20*/);');}}}return _0x57a466[_0x5ce1ad(0xa5)]('\x0a');}export function generateSqlCodeTemplate(_0x4531c4,_0x1b7b2e){const _0x3ee8c5=a159_0x29a9,_0x366683=_0x1b7b2e?.[_0x3ee8c5(0x10a)]??_0x3ee8c5(0xd9),_0x1dd1fe=_0x1b7b2e?.[_0x3ee8c5(0xed)]??!![],_0x1a19cb=[];return _0x1a19cb[_0x3ee8c5(0xdc)](_0x3ee8c5(0xf0)+_0x4531c4[_0x3ee8c5(0x7f)]+'\x20('+_0x4531c4[_0x3ee8c5(0x9e)]+')'),_0x366683===_0x3ee8c5(0xd9)?(_0x1dd1fe&&_0x1a19cb[_0x3ee8c5(0xdc)](_0x3ee8c5(0x117),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});',''),_0x1a19cb['push'](_0x3ee8c5(0x119),_0x3ee8c5(0x6e)+_0x4531c4[_0x3ee8c5(0x9e)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x3ee8c5(0x87),_0x3ee8c5(0xcf),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x1a19cb[_0x3ee8c5(0xdc)](_0x3ee8c5(0x99),'export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{',_0x3ee8c5(0xa8),_0x3ee8c5(0xc0)+_0x4531c4['sqlCode']+'\x27,',_0x3ee8c5(0xc4),_0x3ee8c5(0xbd),_0x3ee8c5(0x101),'}'),_0x1a19cb[_0x3ee8c5(0xa5)]('\x0a');}export async function getErConfig(_0x4eff3d,_0x59ce7b){const _0x1c02e6=a159_0x29a9,_0x123863=await apiRequest('/smartapi/question/er-config',{'method':_0x1c02e6(0x94),'body':{'appCode':_0x4eff3d,'dblinkId':_0x59ce7b},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x123863['data'];}export async function createErRelation(_0x36250f){const _0x2de9b9=a159_0x29a9,_0x3237ff=await apiRequest(_0x2de9b9(0xfc),{'method':'POST','body':_0x36250f,'allowNonJsonSuccess':!![]});return _0x3237ff[_0x2de9b9(0xcb)];}export async function updateErRelation(_0x428fcd){const _0x594e6d=a159_0x29a9,_0x3f6395=await apiRequest(_0x594e6d(0x9c),{'method':_0x594e6d(0x94),'body':_0x428fcd,'allowNonJsonSuccess':!![]});return _0x3f6395[_0x594e6d(0xcb)];}export async function deleteErRelation(_0x238fae){const _0xc85b15=a159_0x29a9,_0x336bc3=await apiRequest('/smartapi/question/er-config/erDelete',{'method':_0xc85b15(0x94),'body':_0x238fae,'allowNonJsonSuccess':!![]});return _0x336bc3[_0xc85b15(0xcb)];}export async function updateErBusinessGroup(_0x29398d){const _0x5c9eab=a159_0x29a9,_0xcd79bd=await apiRequest(_0x5c9eab(0xfb),{'method':_0x5c9eab(0x94),'body':_0x29398d,'allowNonJsonSuccess':!![]});return _0xcd79bd[_0x5c9eab(0xcb)];}function buildQuery(_0x81608b){const _0x5ef106=a159_0x29a9,_0xc6794b=new URLSearchParams();for(const [_0x240fc5,_0x5b58d0]of Object[_0x5ef106(0x11b)](_0x81608b)){if(_0x5b58d0===undefined||_0x5b58d0==='')continue;_0xc6794b[_0x5ef106(0xdb)](_0x240fc5,String(_0x5b58d0));}const _0x264481=_0xc6794b['toString']();return _0x264481?'?'+_0x264481:'';}export async function listAppConfigs(_0x4a0556,_0x58b20c){const _0x21c841=a159_0x29a9,_0x1b47bb=await apiRequest(_0x21c841(0xf6),{'method':_0x21c841(0x94),'body':{'appCode':_0x4a0556,..._0x58b20c?.[_0x21c841(0x8d)]?{'key':_0x58b20c[_0x21c841(0x8d)]}:{},..._0x58b20c?.[_0x21c841(0xe5)]?{'tags':_0x58b20c[_0x21c841(0xe5)]}:{}}});return extractAppConfigList(_0x1b47bb['data']);}export async function getAppConfigByKey(_0x46a1fc,_0x2defa9){const _0x2e2fec=a159_0x29a9,_0xf2f260=await apiRequest(_0x2e2fec(0xec)+buildQuery({'appCode':_0x46a1fc,'key':_0x2defa9}));return _0xf2f260[_0x2e2fec(0xcb)]??null;}export async function createAppConfig(_0x314566){const _0x50c690=a159_0x29a9,_0x1f4970=await apiRequest(_0x50c690(0x11f),{'method':_0x50c690(0x94),'body':{'appCode':_0x314566[_0x50c690(0x121)],'key':_0x314566[_0x50c690(0x8d)],'value':_0x314566[_0x50c690(0x82)],..._0x314566['tags']?{'tags':_0x314566['tags']}:{}}});return _0x1f4970[_0x50c690(0xcb)];}export async function updateAppConfig(_0x21baff){const _0xeffa77=a159_0x29a9;await apiRequest(_0xeffa77(0xc1),{'method':_0xeffa77(0x94),'body':{'id':_0x21baff['id'],'appCode':_0x21baff[_0xeffa77(0x121)],'key':_0x21baff[_0xeffa77(0x8d)],'value':_0x21baff[_0xeffa77(0x82)],..._0x21baff[_0xeffa77(0xe5)]?{'tags':_0x21baff[_0xeffa77(0xe5)]}:{}}});}export async function deleteAppConfig(_0x17796f){const _0x190e82=a159_0x29a9;await apiRequest(_0x190e82(0xee),{'method':_0x190e82(0x94),'body':_0x17796f});}function extractAppConfigList(_0x2c806c){const _0x3b7a95=a159_0x29a9;if(Array['isArray'](_0x2c806c))return _0x2c806c;if(_0x2c806c&&typeof _0x2c806c==='object'&&Array[_0x3b7a95(0x73)](_0x2c806c[_0x3b7a95(0xca)]))return _0x2c806c[_0x3b7a95(0xca)];return extractList(_0x2c806c);}export async function listDbLinks(_0x4a2348,_0x4883cc){const _0x23df97=a159_0x29a9,_0x2aab3e=await apiRequest(_0x23df97(0x118),{'method':_0x23df97(0x94),'body':{'appCode':_0x4a2348,'currentPage':_0x4883cc?.[_0x23df97(0x11e)]??0x1,'pageSize':_0x4883cc?.['pageSize']??0x64}});return{'items':extractList(_0x2aab3e['data']),'paging':extractPaging(_0x2aab3e[_0x23df97(0xcb)])};}export async function getDbLinkInfo(_0x5551a6){const _0x59afef=a159_0x29a9,_0x48f6f1=await apiRequest(_0x59afef(0xa1)+buildQuery({'id':_0x5551a6}));return _0x48f6f1[_0x59afef(0xcb)];}export async function createDbLink(_0xb9aeb6){const _0x3661cc=a159_0x29a9,_0x35b3a7=await apiRequest(_0x3661cc(0xe0),{'method':_0x3661cc(0x94),'body':_0xb9aeb6});return _0x35b3a7[_0x3661cc(0xcb)];}export async function updateDbLink(_0x41f3f8){const _0x3069a3=a159_0x29a9,_0x10ea23=await apiRequest(_0x3069a3(0x72),{'method':_0x3069a3(0x94),'body':_0x41f3f8});return _0x10ea23[_0x3069a3(0xcb)];}export async function deleteDbLink(_0x13c7ff){const _0x3a46a7=a159_0x29a9;await apiRequest(_0x3a46a7(0xf2),{'method':_0x3a46a7(0x94),'body':{'id':_0x13c7ff}});}export async function testDbLinkConnect(_0x23da4e){const _0x5723d9=a159_0x29a9,_0x1623f1=await apiRequest(_0x5723d9(0xf3)+buildQuery({'id':_0x23da4e}));return _0x1623f1[_0x5723d9(0xcb)];}export async function startDbAnalysis(_0x3e8372,_0x2680a2){const _0xe1964c=a159_0x29a9,_0x59802f=await apiRequest(_0xe1964c(0xfa),{'method':_0xe1964c(0x94),'body':{'dbLinkId':_0x3e8372,..._0x2680a2&&_0x2680a2[_0xe1964c(0xc8)]>0x0?{'tableNames':_0x2680a2}:{}}}),_0x2ae953=_0x59802f[_0xe1964c(0xcb)];if(typeof _0x2ae953==='string')return _0x2ae953;if(_0x2ae953&&typeof _0x2ae953===_0xe1964c(0xdd)&&typeof _0x2ae953[_0xe1964c(0x115)]===_0xe1964c(0xbe))return _0x2ae953[_0xe1964c(0x115)];return _0x2ae953!=null?String(_0x2ae953):'';}export async function cancelDbAnalysis(_0x404979){const _0x2bcbcd=a159_0x29a9;await apiRequest(_0x2bcbcd(0x8b)+buildQuery({'planId':_0x404979}),{'method':_0x2bcbcd(0x94)});}export async function getDbAnalysisStatus(_0x46b4f0){const _0x1d8813=a159_0x29a9,_0x1338dc=await apiRequest('/smartapi/db-analysis/status/'+encodeURIComponent(_0x46b4f0));return _0x1338dc[_0x1d8813(0xcb)];}export async function getDbAllTableList(_0x12c12e,_0x1c7d52){const _0x3cbab3=a159_0x29a9,_0x34c003=await apiRequest(_0x3cbab3(0x112)+buildQuery({'appCode':_0x12c12e,'dbLinkId':_0x1c7d52})),_0x12a1f8=_0x34c003[_0x3cbab3(0xcb)];if(Array[_0x3cbab3(0x73)](_0x12a1f8))return _0x12a1f8;return extractList(_0x12a1f8);}export async function getDbTableDiff(_0x1ea95f,_0x191aee,_0x545a9d){const _0x57d403=a159_0x29a9,_0x3055d7=await apiRequest(_0x57d403(0xa0)+buildQuery({'appCode':_0x1ea95f,'dbLinkId':_0x191aee,'pageIndex':_0x545a9d?.['pageIndex']??0x1,'pageSize':_0x545a9d?.[_0x57d403(0x10c)]??0x14,'tableName':_0x545a9d?.['tableName']})),_0x20b3fb=_0x3055d7[_0x57d403(0xcb)];return{'totalCount':_0x20b3fb?.[_0x57d403(0xb6)]??0x0,'physicalTableCount':_0x20b3fb?.['physicalTableCount']??0x0,'datasetTableCount':_0x20b3fb?.[_0x57d403(0x108)]??0x0,..._0x20b3fb?.[_0x57d403(0xe8)]?{'summary':_0x20b3fb[_0x57d403(0xe8)]}:{},'tableList':Array[_0x57d403(0x73)](_0x20b3fb?.[_0x57d403(0x85)])?_0x20b3fb[_0x57d403(0x85)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x3df36b=a159_0x29a9,_0x31d6=await apiRequest(_0x3df36b(0xb7),{'method':_0x3df36b(0x94),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x6cb5e=extractList(_0x31d6[_0x3df36b(0xcb)]),_0x3a1bfb=extractPaging(_0x31d6['data']);return _0x3a1bfb&&_0x3a1bfb['totalCount']>REMOTE_APP_PAGE_SIZE&&console[_0x3df36b(0x10e)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+_0x3df36b(0x105)+_0x3a1bfb[_0x3df36b(0xb6)]+_0x3df36b(0xea)+_0x3df36b(0xf9)),_0x6cb5e;}
1
+ (function(_0x243fcf,_0x42d593){const _0x4df91b=a159_0x1483,_0x327bca=_0x243fcf();while(!![]){try{const _0x4030cb=parseInt(_0x4df91b(0x292))/0x1*(parseInt(_0x4df91b(0x286))/0x2)+-parseInt(_0x4df91b(0x295))/0x3+parseInt(_0x4df91b(0x273))/0x4+-parseInt(_0x4df91b(0x22c))/0x5+parseInt(_0x4df91b(0x276))/0x6*(-parseInt(_0x4df91b(0x282))/0x7)+parseInt(_0x4df91b(0x279))/0x8*(parseInt(_0x4df91b(0x20e))/0x9)+parseInt(_0x4df91b(0x23c))/0xa*(parseInt(_0x4df91b(0x207))/0xb);if(_0x4030cb===_0x42d593)break;else _0x327bca['push'](_0x327bca['shift']());}catch(_0x260d92){_0x327bca['push'](_0x327bca['shift']());}}}(a159_0x22dc,0x3f9af));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x632d6){_activeCookie=_0x632d6||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(_0xa457fe,_0x3833ad){const _0x376074=a159_0x1483,_0x439751=_0x3833ad instanceof Error?_0x3833ad[_0x376074(0x247)]:String(_0x3833ad);return CliErrors[_0x376074(0x249)](_0x376074(0x1f7)+_0xa457fe+(_0x439751?'\x20('+_0x439751+')':''),_0x376074(0x27e));}function a159_0x22dc(){const _0x323465=['/smartapi/dblink/getList','/smartapi/lovrabet/update-page','/smartapi/dataset/get-dataset-operation','tableName','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','tableData','sdk','displayName','/generate-standard-pages/start','find','create','summary','signal','success','/smartapi/dblink/delete','has','enabled','toString','operations','tableList','push','stringify','SQL\x20query\x20not\x20found:\x20','481040rAqRoP','/api/custom/executeSql','includes','.remove(id);','modelCode','//\x20SQL:\x20','string','dbtableConfig','cli:rabetbase','getOne','cookie','/smartapi/dataset/text-generate/preview','sqlCode','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/custom/saveUserCustomSql','modelId','739490RZmXqL','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','authRequired','key','SQL\x20query\x20not\x20found:\x20id=','/smartapi/dblink/getAllTableList','warn','.create({\x20/*\x20fields\x20*/\x20});','/api/management/library/scripts/delete','/smartapi/db-analysis/status/','\x20apps.\x20','message','isArray','apiError','/smartapi/dataset/update-driven-data','tags','/smartapi/lovrabet/dataset/','/smartapi/question/er-config/update-single','version','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','toLowerCase','/smartapi/app-config/delete','API\x20error:\x20','includeImports','set','method','operationName','/smartapi/dblink/create','name','type','clientOperationId','/smartapi/dataset/get-driven-data?','scriptName','/smartapi/app-config/update','/smartapi/lovrabet/detail?pageId=','&type=','/smartapi/dataset/delete-dataset','/smartapi/dblink/testConnect','pageIndex','/smartapi/custom/updateUserCustomSql','\x20failed','/api/management/library/scripts/info?id=','errorMsg','filter','path','/smartapi/custom/queryUserCustomSqlList','map','delete','/smartapi/dblink/getOne','remove','/api/','object','json','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','abort','1939028lYLkWR','test','401','6ijXwtj','status','totalCount','16JepGYX','?sqlCode=','AbortError','pageSize','/smartapi/db-analysis/start','Check\x20network\x20connectivity\x20and\x20try\x20again.','/smartapi/dataset/get-dataset-list','code','BFF\x20save\x20returned\x20no\x20valid\x20id','2106146aOWzzQ','update','Request\x20timeout:\x20','\x20\x20sqlCode:\x20\x27','154EyPZEp','dbId','Unauthorized','const\x20data\x20=\x20await\x20client.sql.execute({','table','validation','/api/management/script/cache/clear','/sync-to-pages','errorCode','/smartapi/question/er-config/erCreate','});','\x20\x20pageSize:\x2020,','2287UYKWah','const\x20results\x20=\x20data.execResult\x20||\x20[];','target','595656YnNNww','/api/management/library/scripts/list?appCode=','/filter','/smartapi/app/getList','deleted','sqlName','body','data','application/json','\x20of\x20','description','Request\x20failed:\x20','currentPage','planId','responseFields','\x22\x20not\x20found\x20in\x20dataset\x20','list','api_error','appCode','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/smartapi/dataset/text-generate/status?','operationId','entries','BFF\x20script\x20not\x20found:\x20id=','join','UNAUTHORIZED','/smartapi/custom/getUserCustomSql','11DtRVal','functionName','const\x20result\x20=\x20await\x20client.models.','POST','/smartapi/dataset/text-generate/start','/api/management/library/scripts/statistics?appCode=','/smartapi/custom/deleteUserCustomSql','546120aMqSIl','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','label','errorMessage','.filter({','GET','/smartapi/app-config/list'];a159_0x22dc=function(){return _0x323465;};return a159_0x22dc();}async function apiRequest(_0x1a2abd,_0x4db249={}){const _0x63fa15=a159_0x1483,{method:method='GET',body:_0x9b6e2a,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x4db249,_0x50a471=useRuntime?getRuntimeDomain():getApiDomain(),_0x557cd9=_activeCookie||getCookie(),_0x57de31=''+_0x50a471+_0x1a2abd,_0x798460=new AbortController(),_0x36cb61=setTimeout(()=>_0x798460[_0x63fa15(0x272)](),timeout);try{const _0x5eb7eb=await fetch(_0x57de31,{'method':method,'headers':{'Content-Type':_0x63fa15(0x1f4),'Cookie':_0x557cd9,'X-Invoke-Source':_0x63fa15(0x234),...headers},'body':_0x9b6e2a?JSON[_0x63fa15(0x22a)](_0x9b6e2a):undefined,'signal':_0x798460[_0x63fa15(0x221)]});let _0x22184c;try{_0x22184c=await _0x5eb7eb['json']();}catch(_0x14b2f1){if(_0x14b2f1 instanceof Error&&_0x14b2f1['name']===_0x63fa15(0x27b))throw CliErrors[_0x63fa15(0x249)](_0x63fa15(0x284)+_0x57de31);if(_0x5eb7eb['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x63fa15(0x249)](_0x63fa15(0x1ff)+_0x5eb7eb[_0x63fa15(0x277)]+')',_0x5eb7eb[_0x63fa15(0x277)]>=0x190?_0x63fa15(0x219):undefined);}if(!_0x5eb7eb['ok']||_0x22184c['success']===![])throw CliErrors[_0x63fa15(0x249)](_0x22184c[_0x63fa15(0x266)]||_0x22184c[_0x63fa15(0x247)]||_0x63fa15(0x252)+_0x5eb7eb[_0x63fa15(0x277)],_0x22184c[_0x63fa15(0x28e)]?'API\x20error\x20code:\x20'+_0x22184c[_0x63fa15(0x28e)]:undefined);return _0x22184c;}catch(_0x3b8f69){if(_0x3b8f69 instanceof CliError)throw _0x3b8f69;if(_0x3b8f69 instanceof Error&&_0x3b8f69[_0x63fa15(0x258)]==='AbortError')throw CliErrors[_0x63fa15(0x249)](_0x63fa15(0x284)+_0x57de31);throw createFetchFailureError(_0x57de31,_0x3b8f69);}finally{clearTimeout(_0x36cb61);}}function isAuthFailure(_0x58e616){const _0x9a97f1=a159_0x1483,_0x4b683b=_0x58e616['errorMsg']||_0x58e616[_0x9a97f1(0x247)]||_0x58e616[_0x9a97f1(0x1f3)]?.['message']||_0x58e616[_0x9a97f1(0x211)]||_0x58e616['error']||'';return _0x58e616[_0x9a97f1(0x28e)]===_0x9a97f1(0x205)||_0x58e616[_0x9a97f1(0x280)]===0x191||_0x58e616[_0x9a97f1(0x280)]===_0x9a97f1(0x275)||_0x4b683b[_0x9a97f1(0x22e)](_0x9a97f1(0x275))||_0x4b683b[_0x9a97f1(0x22e)](_0x9a97f1(0x288))||_0x4b683b['includes']('登录')||_0x4b683b[_0x9a97f1(0x22e)]('认证');}export async function platformFetch(_0x3edffc,_0x27ffed){const _0x5122ed=a159_0x1483;let _0x8b6014;try{_0x8b6014=await fetch(_0x3edffc,{'method':_0x27ffed[_0x5122ed(0x255)]??_0x5122ed(0x213),'headers':{'Content-Type':_0x5122ed(0x1f4),'Cookie':_0x27ffed[_0x5122ed(0x236)],'X-Invoke-Source':_0x5122ed(0x234)},..._0x27ffed[_0x5122ed(0x1f2)]&&{'body':JSON[_0x5122ed(0x22a)](_0x27ffed[_0x5122ed(0x1f2)])}});}catch(_0xe2ac35){throw createFetchFailureError(_0x3edffc,_0xe2ac35);}if(!_0x8b6014['ok']){if(_0x8b6014[_0x5122ed(0x277)]===0x191)throw CliErrors[_0x5122ed(0x23e)]();throw CliErrors['apiError'](_0x27ffed[_0x5122ed(0x210)]+'\x20failed,\x20HTTP\x20'+_0x8b6014[_0x5122ed(0x277)]);}const _0x558920=await _0x8b6014[_0x5122ed(0x270)]();if(_0x558920[_0x5122ed(0x222)]===![]){if(isAuthFailure(_0x558920))throw CliErrors[_0x5122ed(0x23e)]();throw CliErrors[_0x5122ed(0x249)](_0x558920['errorMsg']||_0x558920[_0x5122ed(0x247)]||_0x27ffed['label']+_0x5122ed(0x264));}return _0x558920[_0x5122ed(0x1f3)];}export async function listBffScripts(_0x4909fb,_0x1be26d,_0xef9451){const _0x5c2acc=a159_0x1483;let _0xb17bb1=_0x5c2acc(0x296)+_0x4909fb;if(_0x1be26d)_0xb17bb1+=_0x5c2acc(0x25f)+_0x1be26d;const _0x72384c=await apiRequest(_0xb17bb1);let _0x4b0ae3=extractList(_0x72384c['data']);if(_0xef9451?.[_0x5c2acc(0x25c)]){const _0x20020a=_0xef9451[_0x5c2acc(0x25c)][_0x5c2acc(0x250)]();_0x4b0ae3=_0x4b0ae3[_0x5c2acc(0x267)](_0x4f99ba=>_0x4f99ba[_0x5c2acc(0x208)]?.['toLowerCase']()['includes'](_0x20020a)||_0x4f99ba[_0x5c2acc(0x1f6)]?.[_0x5c2acc(0x250)]()['includes'](_0x20020a));}return _0x4b0ae3;}export async function getBffScriptInfo(_0x52dd82){const _0x52b068=a159_0x1483,_0x1b3c04=await apiRequest(_0x52b068(0x265)+_0x52dd82);if(!_0x1b3c04['data'])throw CliErrors[_0x52b068(0x28b)](_0x52b068(0x203)+_0x52dd82);return _0x1b3c04[_0x52b068(0x1f3)];}export async function saveBffScript(_0x2ce528){const _0x4b623c=a159_0x1483,_0x17e22b=await apiRequest('/api/management/library/scripts/save',{'method':_0x4b623c(0x20a),'body':_0x2ce528}),{id:_0x1b00f8,entity:_0x372bb3}=normalizeEntityWithIdResponse(_0x17e22b[_0x4b623c(0x1f3)]);if(_0x1b00f8!==undefined){const _0x4eec2c=typeof _0x372bb3[_0x4b623c(0x208)]===_0x4b623c(0x232)||typeof _0x372bb3['scriptType']===_0x4b623c(0x232)?_0x372bb3:undefined;return{'id':_0x1b00f8,'script':_0x4eec2c};}throw CliErrors[_0x4b623c(0x249)](_0x4b623c(0x281));}export async function deleteBffScript(_0x2358a2){const _0x2ba81f=a159_0x1483;await apiRequest(_0x2ba81f(0x244),{'method':_0x2ba81f(0x20a),'body':{'id':_0x2358a2}});}export async function getBffScriptStatistics(_0x2dd72c){const _0x3261be=a159_0x1483,_0x341943=await apiRequest(_0x3261be(0x20c)+_0x2dd72c);return extractList(_0x341943[_0x3261be(0x1f3)]);}export async function clearBffScriptCache(){const _0x32c868=a159_0x1483,_0x55d7d9=await apiRequest(_0x32c868(0x28c),{'method':_0x32c868(0x20a),'useRuntime':!![]});return typeof _0x55d7d9[_0x32c868(0x1f3)]===_0x32c868(0x232)?_0x55d7d9['data']:'';}export async function listBffDatasetOperations(_0x25db06,_0x5d8144){const _0xea1479=a159_0x1483,_0x11cc0a=await apiRequest(_0xea1479(0x217),{'method':_0xea1479(0x20a),'body':{'appCode':_0x25db06,'datasetId':_0x5d8144}});return _0x11cc0a[_0xea1479(0x1f3)];}export async function listSqlQueries(_0x3a9773,_0x2daad8){const _0x294d02=a159_0x1483,_0x49188e=await apiRequest(_0x294d02(0x269),{'method':'POST','body':{'appCode':_0x3a9773,'currentPage':_0x2daad8?.[_0x294d02(0x1f8)]??0x1,'pageSize':_0x2daad8?.[_0x294d02(0x27c)]??0x32,'sqlCode':_0x2daad8?.[_0x294d02(0x238)],'sqlName':_0x2daad8?.[_0x294d02(0x29a)]}});return _0x49188e[_0x294d02(0x1f3)];}export async function getSqlQueryInfo(_0xc6f764,_0x40270e){const _0xd3980a=a159_0x1483,_0x3b4275=await listSqlQueries(_0xc6f764,{'sqlCode':_0x40270e}),_0x18c643=_0x3b4275[_0xd3980a(0x21a)]?.[0x0];if(!_0x18c643)throw CliErrors[_0xd3980a(0x28b)](_0xd3980a(0x22b)+_0x40270e);return _0x18c643;}export async function getSqlQueryDetail(_0x5ba557){const _0x369e26=a159_0x1483,_0x30c020=await apiRequest(_0x369e26(0x206)+(_0x369e26(0x27a)+encodeURIComponent(_0x5ba557)));if(!_0x30c020['data'])throw CliErrors[_0x369e26(0x28b)](_0x369e26(0x22b)+_0x5ba557);return _0x30c020[_0x369e26(0x1f3)];}export async function getSqlQueryDetailById(_0x3c4600){const _0x40af1e=a159_0x1483,_0x1236d1=await apiRequest('/smartapi/custom/getUserCustomSql?id='+_0x3c4600);if(!_0x1236d1[_0x40af1e(0x1f3)])throw CliErrors[_0x40af1e(0x28b)](_0x40af1e(0x240)+_0x3c4600);return _0x1236d1[_0x40af1e(0x1f3)];}export async function createSqlQuery(_0x3fc097){const _0x208948=a159_0x1483,_0x149c22=await apiRequest(_0x208948(0x23a),{'method':_0x208948(0x20a),'body':_0x3fc097}),{id:_0x6d93e9,entity:_0x32578e}=normalizeEntityWithIdResponse(_0x149c22[_0x208948(0x1f3)]);if(!(_0x208948(0x238)in _0x32578e)&&_0x6d93e9)return getSqlQueryDetailById(_0x6d93e9);return normalizeSqlQueryEntity(_0x32578e);}export async function updateSqlQuery(_0x448a64){const _0x175775=a159_0x1483,_0x269d2f=await apiRequest(_0x175775(0x263),{'method':_0x175775(0x20a),'body':_0x448a64}),{id:_0x48fea4,entity:_0x434123}=normalizeEntityWithIdResponse(_0x269d2f[_0x175775(0x1f3)]);if(!(_0x175775(0x238)in _0x434123)){if(_0x448a64[_0x175775(0x238)])return getSqlQueryDetail(_0x448a64['sqlCode']);if(_0x48fea4)return getSqlQueryDetailById(_0x48fea4);}return normalizeSqlQueryEntity(_0x434123);}export async function deleteSqlQuery(_0x4a4b95){const _0x524398=a159_0x1483;await apiRequest(_0x524398(0x20d),{'method':_0x524398(0x20a),'body':_0x4a4b95});}export async function saveSqlQuery(_0x554e36){const _0x46e05d=a159_0x1483,_0x4ea4d3=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x46e05d(0x20a),'body':_0x554e36});return _0x4ea4d3[_0x46e05d(0x1f3)];}function normalizeSqlQueryEntity(_0x7d0ae9){const _0x260356=a159_0x1483;return{..._0x7d0ae9,'id':Number(_0x7d0ae9['id']),'dbId':_0x7d0ae9[_0x260356(0x287)]==null?undefined:Number(_0x7d0ae9['dbId']),'version':_0x7d0ae9[_0x260356(0x24e)]==null?undefined:Number(_0x7d0ae9[_0x260356(0x24e)])};}export async function executeSql(_0x52c8ca,_0xf60d23,_0x12fa76){const _0x9e586e=a159_0x1483,_0x564f99=await apiRequest(_0x9e586e(0x22d),{'method':'POST','body':{'appCode':_0x52c8ca,'sqlCode':_0xf60d23,..._0x12fa76&&{'params':_0x12fa76}},'useRuntime':!![]});return _0x564f99[_0x9e586e(0x1f3)];}export async function executeDatasetDataOperation(_0x43cd78,_0x4e9d95,_0x5c57b2,_0x43fdf8={}){const _0x4425b8=a159_0x1483;try{const _0x268248=await apiRequest('/api/'+_0x43cd78+'/'+_0x4e9d95+'/'+_0x5c57b2,{'method':'POST','body':_0x43fdf8,'useRuntime':!![]});return _0x268248[_0x4425b8(0x1f3)];}catch(_0x102f7e){if(_0x5c57b2===_0x4425b8(0x235)&&_0x102f7e instanceof CliError&&_0x102f7e[_0x4425b8(0x280)]==='api_error'&&_0x43fdf8['id']!==undefined&&_0x43fdf8['id']!==null&&_0x43fdf8['id']!==''){const _0x3041f2=await apiRequest(_0x4425b8(0x26e)+_0x43cd78+'/'+_0x4e9d95+_0x4425b8(0x297),{'method':_0x4425b8(0x20a),'body':{'where':{'id':{'$eq':_0x43fdf8['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x53ae67=Array['isArray'](_0x3041f2['data']?.['tableData'])?_0x3041f2[_0x4425b8(0x1f3)][_0x4425b8(0x21a)]:[];return _0x53ae67[0x0]??null;}throw _0x102f7e;}}export async function listDatasets(_0x39eeb3,_0x48ef4e){const _0x392e4d=a159_0x1483,_0x430c48={'appCode':_0x39eeb3,'deleted':_0x48ef4e?.[_0x392e4d(0x299)]??![]};if(_0x48ef4e?.[_0x392e4d(0x280)])_0x430c48[_0x392e4d(0x280)]=_0x48ef4e[_0x392e4d(0x280)];if(_0x48ef4e?.[_0x392e4d(0x258)])_0x430c48[_0x392e4d(0x258)]=_0x48ef4e[_0x392e4d(0x258)];const _0x3d531d=await apiRequest(_0x392e4d(0x27f),{'method':_0x392e4d(0x20a),'body':_0x430c48});return extractList(_0x3d531d[_0x392e4d(0x1f3)]);}export async function deleteDataset(_0x1c8ee0,_0x538dda){const _0x50ad5a=a159_0x1483;await apiRequest(_0x50ad5a(0x260),{'method':_0x50ad5a(0x20a),'body':{'appCode':_0x1c8ee0,'datasetId':_0x538dda}});}export async function restoreDataset(_0x3e14db,_0x16bf31){const _0x5b46db=a159_0x1483;await apiRequest('/smartapi/dataset/restore-dataset',{'method':_0x5b46db(0x20a),'body':{'appCode':_0x3e14db,'datasetId':_0x16bf31}});}export async function previewTextGeneratedDataset(_0x2cd504,_0x27542b){const _0xf2fe13=a159_0x1483,_0x3d8e7c=await apiRequest(_0xf2fe13(0x237),{'method':_0xf2fe13(0x20a),'body':{'appCode':_0x2cd504,'datasetName':_0x27542b['datasetName'],'requirementDescription':_0x27542b['requirementDescription']},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x3d8e7c[_0xf2fe13(0x1f3)];}export async function startTextGeneratedDataset(_0x427954,_0x146fd3,_0x15a680){const _0x530993=a159_0x1483,_0x4b335f=await apiRequest(_0x530993(0x20b),{'method':_0x530993(0x20a),'body':{'appCode':_0x427954,..._0x15a680?.[_0x530993(0x25a)]?{'clientOperationId':_0x15a680[_0x530993(0x25a)]}:{},'design':_0x146fd3},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x4b335f['data'];}export async function getTextGeneratedDatasetStatus(_0x40957c,_0x14a955){const _0x54bc5c=a159_0x1483,_0x46c204=new URLSearchParams({'appCode':_0x40957c});_0x14a955[_0x54bc5c(0x201)]&&_0x46c204['set'](_0x54bc5c(0x201),_0x14a955[_0x54bc5c(0x201)]);_0x14a955[_0x54bc5c(0x25a)]&&_0x46c204['set'](_0x54bc5c(0x25a),_0x14a955[_0x54bc5c(0x25a)]);const _0x461a74=await apiRequest(_0x54bc5c(0x200)+_0x46c204[_0x54bc5c(0x226)]());return _0x461a74['data'];}export async function searchDatasets(_0x11791f,_0x321142){const _0x5e2bf6=a159_0x1483,_0x595311=await listDatasets(_0x11791f,{'name':_0x321142}),_0x151bd0=_0x321142['toLowerCase'](),_0x82a3d6=new Set(_0x595311[_0x5e2bf6(0x26a)](_0x3cdb65=>_0x3cdb65['id'])),_0x896649=_0x595311[_0x5e2bf6(0x267)](_0xe4861=>_0xe4861[_0x5e2bf6(0x233)]?.[_0x5e2bf6(0x218)]?.['toLowerCase']()['includes'](_0x151bd0)||_0xe4861[_0x5e2bf6(0x1f6)]?.[_0x5e2bf6(0x250)]()[_0x5e2bf6(0x22e)](_0x151bd0)),_0x5138d1=await listDatasets(_0x11791f,{'code':_0x321142});for(const _0x2e3a97 of _0x5138d1){!_0x82a3d6[_0x5e2bf6(0x224)](_0x2e3a97['id'])&&(_0x595311[_0x5e2bf6(0x229)](_0x2e3a97),_0x82a3d6['add'](_0x2e3a97['id']));}return _0x595311;}export function normalizeDatasetOperations(_0x3247d0){const _0x48c6aa=a159_0x1483;if(Array['isArray'](_0x3247d0))return _0x3247d0[_0x48c6aa(0x267)](_0x4d41e7=>_0x4d41e7!=null&&typeof _0x4d41e7===_0x48c6aa(0x26f));if(_0x3247d0&&typeof _0x3247d0===_0x48c6aa(0x26f))return Object[_0x48c6aa(0x202)](_0x3247d0)[_0x48c6aa(0x267)](([,_0x2b033e])=>_0x2b033e!=null&&typeof _0x2b033e===_0x48c6aa(0x26f))[_0x48c6aa(0x26a)](([_0x12c71e,_0x413a1e])=>({..._0x413a1e,'name':_0x413a1e['name']??_0x413a1e[_0x48c6aa(0x256)]??_0x12c71e}));return[];}export async function getDatasetDetail(_0x1913a5){const _0x409686=a159_0x1483,_0x43adbf=/^\d+$/[_0x409686(0x274)](_0x1913a5)?'id':_0x409686(0x280),_0xa08b6b=await apiRequest(_0x409686(0x25b)+_0x43adbf+'='+_0x1913a5);return _0xa08b6b[_0x409686(0x1f3)];}export async function updateDrivenData(_0x322d41){const _0x398214=a159_0x1483,_0x3e0c84=await apiRequest(_0x398214(0x24a),{'method':_0x398214(0x20a),'body':_0x322d41});return _0x3e0c84[_0x398214(0x1f3)];}export async function getDatasetOperations(_0x48dd21){const _0x35abf0=a159_0x1483,_0x100700=await getDatasetDetail(_0x48dd21),_0x259945=normalizeDatasetOperations(_0x100700[_0x35abf0(0x227)])['map'](_0x462757=>({'name':_0x462757[_0x35abf0(0x258)]||_0x462757['operationName'],'displayName':_0x462757[_0x35abf0(0x21c)]||_0x462757[_0x35abf0(0x258)],'type':_0x462757[_0x35abf0(0x259)],'method':_0x462757[_0x35abf0(0x255)],'path':_0x462757[_0x35abf0(0x268)],'enabled':_0x462757[_0x35abf0(0x225)]??!![],'requestFields':_0x462757['requestFields'],'responseFields':_0x462757[_0x35abf0(0x1fa)]}));return{'dataset':{'id':_0x100700['id']??_0x100700[_0x35abf0(0x23b)],'name':_0x100700[_0x35abf0(0x258)],'code':_0x100700[_0x35abf0(0x280)]||_0x100700[_0x35abf0(0x230)],'tableName':_0x100700['tableName']||_0x100700[_0x35abf0(0x233)]?.['tableName']},'operations':_0x259945};}export async function getOperationDetail(_0x5837f8,_0x172d39,_0x209844){const _0x140eb0=a159_0x1483;let _0x161029=_0x172d39;if(!/^\d+$/[_0x140eb0(0x274)](_0x172d39)){const _0x5f4621=await listDatasets(_0x5837f8,{'code':_0x172d39}),_0x22cc4b=_0x5f4621[_0x140eb0(0x21e)](_0x3a0c6a=>_0x3a0c6a['code']===_0x172d39||String(_0x3a0c6a['id'])===_0x172d39);if(!_0x22cc4b)throw CliErrors[_0x140eb0(0x28b)]('Dataset\x20not\x20found:\x20'+_0x172d39);_0x161029=String(_0x22cc4b['id']);}const _0x242502=await getDatasetDetail(_0x161029),_0x36fbd5=normalizeDatasetOperations(_0x242502[_0x140eb0(0x227)])['find'](_0x162a0b=>(_0x162a0b[_0x140eb0(0x258)]||_0x162a0b[_0x140eb0(0x256)])===_0x209844);if(!_0x36fbd5)throw CliErrors[_0x140eb0(0x28b)]('Operation\x20\x22'+_0x209844+_0x140eb0(0x1fb)+_0x172d39);return{'dataset':{'id':_0x242502['id']??_0x242502[_0x140eb0(0x23b)],'name':_0x242502['name'],'code':_0x242502[_0x140eb0(0x280)]||_0x242502['modelCode'],'tableName':_0x242502[_0x140eb0(0x218)]||_0x242502[_0x140eb0(0x233)]?.['tableName']},'operation':_0x36fbd5};}export async function startGenerateStandardPages(_0x4d7a01,_0x2bbd25,_0x40fdf3){const _0x481db0=a159_0x1483,_0x1b0bae=await apiRequest(_0x481db0(0x24c)+_0x2bbd25+_0x481db0(0x21d),{'method':_0x481db0(0x20a),'body':{'appCode':_0x4d7a01,..._0x40fdf3?.['clientOperationId']?{'clientOperationId':_0x40fdf3[_0x481db0(0x25a)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x1b0bae[_0x481db0(0x1f3)];}export async function getGenerateStandardPagesStatus(_0x5cbfe7,_0x5de268,_0x5cc5c3){const _0x4cf8e3=a159_0x1483,_0x415ea9=new URLSearchParams({'appCode':_0x5cbfe7});_0x5cc5c3[_0x4cf8e3(0x201)]&&_0x415ea9[_0x4cf8e3(0x254)](_0x4cf8e3(0x201),_0x5cc5c3[_0x4cf8e3(0x201)]);_0x5cc5c3[_0x4cf8e3(0x25a)]&&_0x415ea9[_0x4cf8e3(0x254)](_0x4cf8e3(0x25a),_0x5cc5c3[_0x4cf8e3(0x25a)]);const _0x3a7517=await apiRequest('/smartapi/lovrabet/dataset/'+_0x5de268+'/generate-standard-pages/status?'+_0x415ea9[_0x4cf8e3(0x226)]());return _0x3a7517['data'];}export async function getStandardPageStatus(_0x159c06,_0x1b87c6){const _0x15d193=a159_0x1483,_0x5d20ff=await apiRequest(_0x15d193(0x24c)+_0x1b87c6+'/standard-page-status?appCode='+encodeURIComponent(_0x159c06));return _0x5d20ff['data'];}export async function tryGetStandardPageStatus(_0x1da943,_0x41fa08){const _0x3bdb70=a159_0x1483;try{return await getStandardPageStatus(_0x1da943,_0x41fa08);}catch(_0x16e863){if(_0x16e863 instanceof CliError&&_0x16e863[_0x3bdb70(0x280)]===_0x3bdb70(0x1fd)&&/404|not found|non-json response/i[_0x3bdb70(0x274)](_0x16e863[_0x3bdb70(0x247)]))return null;throw _0x16e863;}}export async function syncStandardPages(_0x137b0,_0x27674b){const _0x460dda=a159_0x1483,_0x1e33e3=await apiRequest(_0x460dda(0x24c)+_0x27674b+_0x460dda(0x28d),{'method':_0x460dda(0x20a),'body':{'appCode':_0x137b0}});return _0x1e33e3[_0x460dda(0x1f3)];}export async function getPageDetail(_0x5299f5){const _0x527d24=a159_0x1483,_0x1234c9=await apiRequest(_0x527d24(0x25e)+_0x5299f5);if(!_0x1234c9[_0x527d24(0x1f3)])throw CliErrors[_0x527d24(0x28b)]('Page\x20not\x20found:\x20'+_0x5299f5);return _0x1234c9['data'];}export async function updatePage(_0x191caa,_0x38488b,_0x2bebb8,_0x4dba8a){const _0x144ecb=a159_0x1483,_0x29234f=await apiRequest(_0x144ecb(0x216),{'method':_0x144ecb(0x20a),'body':{'appCode':_0x191caa,'pageId':_0x38488b,'code':_0x2bebb8,'datasetIds':_0x4dba8a}});return _0x29234f[_0x144ecb(0x1f3)];}function a159_0x1483(_0x387edd,_0x46e928){_0x387edd=_0x387edd-0x1f2;const _0x22dc96=a159_0x22dc();let _0x1483d6=_0x22dc96[_0x387edd];return _0x1483d6;}export function generateSdkCode(_0x1bf3cf,_0x35268e,_0x3a9d97){const _0x5d2898=a159_0x1483,_0xfb311e=_0x3a9d97?.[_0x5d2898(0x253)]??!![],_0x2e6d97='dataset_'+_0x1bf3cf[_0x5d2898(0x280)]?.['replace'](/-/g,'_'),_0x3c65d5=_0x35268e[_0x5d2898(0x258)]||_0x35268e[_0x5d2898(0x256)]||'filter',_0x6e0ca7=[];_0xfb311e&&_0x6e0ca7[_0x5d2898(0x229)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x5d2898(0x271),'');_0x6e0ca7[_0x5d2898(0x229)]('//\x20'+_0x1bf3cf[_0x5d2898(0x258)]+'\x20('+(_0x1bf3cf['tableName']||_0x5d2898(0x28a))+')');if(_0x3c65d5===_0x5d2898(0x267))_0x6e0ca7['push'](_0x5d2898(0x209)+_0x2e6d97+_0x5d2898(0x212),'\x20\x20where:\x20{},',_0x5d2898(0x291),'\x20\x20currentPage:\x201,',_0x5d2898(0x290));else{if(_0x3c65d5===_0x5d2898(0x235))_0x6e0ca7[_0x5d2898(0x229)]('const\x20result\x20=\x20await\x20client.models.'+_0x2e6d97+'.getOne(id);');else{if(_0x3c65d5===_0x5d2898(0x21f))_0x6e0ca7[_0x5d2898(0x229)](_0x5d2898(0x209)+_0x2e6d97+_0x5d2898(0x243));else{if(_0x3c65d5===_0x5d2898(0x283))_0x6e0ca7[_0x5d2898(0x229)]('const\x20result\x20=\x20await\x20client.models.'+_0x2e6d97+'.update(id,\x20{\x20/*\x20fields\x20*/\x20});');else _0x3c65d5===_0x5d2898(0x26b)||_0x3c65d5===_0x5d2898(0x26d)?_0x6e0ca7['push']('const\x20result\x20=\x20await\x20client.models.'+_0x2e6d97+_0x5d2898(0x22f)):_0x6e0ca7[_0x5d2898(0x229)](_0x5d2898(0x209)+_0x2e6d97+'.'+_0x3c65d5+'(/*\x20params\x20*/);');}}}return _0x6e0ca7['join']('\x0a');}export function generateSqlCodeTemplate(_0x17bdc9,_0x46fee7){const _0x57ec69=a159_0x1483,_0x32418a=_0x46fee7?.[_0x57ec69(0x294)]??_0x57ec69(0x21b),_0x208129=_0x46fee7?.['includeImports']??!![],_0x59b966=[];return _0x59b966[_0x57ec69(0x229)](_0x57ec69(0x231)+_0x17bdc9[_0x57ec69(0x29a)]+'\x20('+_0x17bdc9['sqlCode']+')'),_0x32418a===_0x57ec69(0x21b)?(_0x208129&&_0x59b966[_0x57ec69(0x229)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});',''),_0x59b966[_0x57ec69(0x229)](_0x57ec69(0x289),_0x57ec69(0x285)+_0x17bdc9[_0x57ec69(0x238)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x57ec69(0x290),_0x57ec69(0x20f),_0x57ec69(0x293))):_0x59b966[_0x57ec69(0x229)]('//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly',_0x57ec69(0x23d),_0x57ec69(0x24f),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x17bdc9['sqlCode']+'\x27,',_0x57ec69(0x239),'\x20\x20});','\x20\x20return\x20rows;','}'),_0x59b966[_0x57ec69(0x204)]('\x0a');}export async function getErConfig(_0x4cb139,_0x3024ae){const _0x5b64c3=a159_0x1483,_0x1a5e35=await apiRequest('/smartapi/question/er-config',{'method':_0x5b64c3(0x20a),'body':{'appCode':_0x4cb139,'dblinkId':_0x3024ae},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x1a5e35['data'];}export async function createErRelation(_0x52de51){const _0x16b28e=a159_0x1483,_0x57b70e=await apiRequest(_0x16b28e(0x28f),{'method':_0x16b28e(0x20a),'body':_0x52de51,'allowNonJsonSuccess':!![]});return _0x57b70e['data'];}export async function updateErRelation(_0x57731c){const _0xb9090c=a159_0x1483,_0x9d7c02=await apiRequest(_0xb9090c(0x24d),{'method':'POST','body':_0x57731c,'allowNonJsonSuccess':!![]});return _0x9d7c02[_0xb9090c(0x1f3)];}export async function deleteErRelation(_0x1a9db3){const _0x148f9b=a159_0x1483,_0x530123=await apiRequest('/smartapi/question/er-config/erDelete',{'method':_0x148f9b(0x20a),'body':_0x1a9db3,'allowNonJsonSuccess':!![]});return _0x530123[_0x148f9b(0x1f3)];}export async function updateErBusinessGroup(_0x5b90cc){const _0x41ca6e=a159_0x1483,_0xc6aad1=await apiRequest('/smartapi/question/er-config/business-group/edit',{'method':_0x41ca6e(0x20a),'body':_0x5b90cc,'allowNonJsonSuccess':!![]});return _0xc6aad1[_0x41ca6e(0x1f3)];}function buildQuery(_0x3e4fb3){const _0x26d6e9=a159_0x1483,_0x575e81=new URLSearchParams();for(const [_0x132785,_0x4d6486]of Object[_0x26d6e9(0x202)](_0x3e4fb3)){if(_0x4d6486===undefined||_0x4d6486==='')continue;_0x575e81[_0x26d6e9(0x254)](_0x132785,String(_0x4d6486));}const _0x2ae7c2=_0x575e81[_0x26d6e9(0x226)]();return _0x2ae7c2?'?'+_0x2ae7c2:'';}export async function listAppConfigs(_0xf57a37,_0x349841){const _0x40a0a7=a159_0x1483,_0x2b103b=await apiRequest(_0x40a0a7(0x214),{'method':_0x40a0a7(0x20a),'body':{'appCode':_0xf57a37,..._0x349841?.['key']?{'key':_0x349841[_0x40a0a7(0x23f)]}:{},..._0x349841?.['tags']?{'tags':_0x349841['tags']}:{}}});return extractAppConfigList(_0x2b103b['data']);}export async function getAppConfigByKey(_0x50c68c,_0x356c4e){const _0x5f151b=await apiRequest('/smartapi/app-config/getByKey'+buildQuery({'appCode':_0x50c68c,'key':_0x356c4e}));return _0x5f151b['data']??null;}export async function createAppConfig(_0x18f1f6){const _0xa6e71d=a159_0x1483,_0xce6479=await apiRequest('/smartapi/app-config/create',{'method':'POST','body':{'appCode':_0x18f1f6[_0xa6e71d(0x1fe)],'key':_0x18f1f6[_0xa6e71d(0x23f)],'value':_0x18f1f6['value'],..._0x18f1f6[_0xa6e71d(0x24b)]?{'tags':_0x18f1f6[_0xa6e71d(0x24b)]}:{}}});return _0xce6479[_0xa6e71d(0x1f3)];}export async function updateAppConfig(_0x3973c1){const _0x49961d=a159_0x1483;await apiRequest(_0x49961d(0x25d),{'method':'POST','body':{'id':_0x3973c1['id'],'appCode':_0x3973c1[_0x49961d(0x1fe)],'key':_0x3973c1[_0x49961d(0x23f)],'value':_0x3973c1['value'],..._0x3973c1[_0x49961d(0x24b)]?{'tags':_0x3973c1[_0x49961d(0x24b)]}:{}}});}export async function deleteAppConfig(_0x5dcd55){const _0x42ccad=a159_0x1483;await apiRequest(_0x42ccad(0x251),{'method':_0x42ccad(0x20a),'body':_0x5dcd55});}function extractAppConfigList(_0x129e57){const _0x46ad09=a159_0x1483;if(Array[_0x46ad09(0x248)](_0x129e57))return _0x129e57;if(_0x129e57&&typeof _0x129e57===_0x46ad09(0x26f)&&Array['isArray'](_0x129e57[_0x46ad09(0x1fc)]))return _0x129e57[_0x46ad09(0x1fc)];return extractList(_0x129e57);}export async function listDbLinks(_0x2b3207,_0x221ba8){const _0xb4d4dd=a159_0x1483,_0x1dbc94=await apiRequest(_0xb4d4dd(0x215),{'method':'POST','body':{'appCode':_0x2b3207,'currentPage':_0x221ba8?.['currentPage']??0x1,'pageSize':_0x221ba8?.['pageSize']??0x64}});return{'items':extractList(_0x1dbc94[_0xb4d4dd(0x1f3)]),'paging':extractPaging(_0x1dbc94[_0xb4d4dd(0x1f3)])};}export async function getDbLinkInfo(_0x169d6b){const _0x1132f6=a159_0x1483,_0x410884=await apiRequest(_0x1132f6(0x26c)+buildQuery({'id':_0x169d6b}));return _0x410884[_0x1132f6(0x1f3)];}export async function createDbLink(_0x38fe76){const _0x475aa6=a159_0x1483,_0x33b8f9=await apiRequest(_0x475aa6(0x257),{'method':_0x475aa6(0x20a),'body':_0x38fe76});return _0x33b8f9[_0x475aa6(0x1f3)];}export async function updateDbLink(_0x516207){const _0x48425c=a159_0x1483,_0x1178a3=await apiRequest('/smartapi/dblink/update',{'method':_0x48425c(0x20a),'body':_0x516207});return _0x1178a3[_0x48425c(0x1f3)];}export async function deleteDbLink(_0x1a5c7e){const _0x3490c2=a159_0x1483;await apiRequest(_0x3490c2(0x223),{'method':_0x3490c2(0x20a),'body':{'id':_0x1a5c7e}});}export async function testDbLinkConnect(_0x382b4b){const _0x2c6906=a159_0x1483,_0x1cad93=await apiRequest(_0x2c6906(0x261)+buildQuery({'id':_0x382b4b}));return _0x1cad93[_0x2c6906(0x1f3)];}export async function startDbAnalysis(_0x57da7c,_0x3e6595){const _0x2b4141=a159_0x1483,_0x4a3e14=await apiRequest(_0x2b4141(0x27d),{'method':_0x2b4141(0x20a),'body':{'dbLinkId':_0x57da7c,..._0x3e6595&&_0x3e6595['length']>0x0?{'tableNames':_0x3e6595}:{}}}),_0x4b61bc=_0x4a3e14[_0x2b4141(0x1f3)];if(typeof _0x4b61bc===_0x2b4141(0x232))return _0x4b61bc;if(_0x4b61bc&&typeof _0x4b61bc==='object'&&typeof _0x4b61bc[_0x2b4141(0x1f9)]==='string')return _0x4b61bc[_0x2b4141(0x1f9)];return _0x4b61bc!=null?String(_0x4b61bc):'';}export async function cancelDbAnalysis(_0x5431fd){const _0x1100d6=a159_0x1483;await apiRequest('/smartapi/db-analysis/jobs/cancel'+buildQuery({'planId':_0x5431fd}),{'method':_0x1100d6(0x20a)});}export async function getDbAnalysisStatus(_0x246530){const _0x5ae14c=a159_0x1483,_0xe91c8e=await apiRequest(_0x5ae14c(0x245)+encodeURIComponent(_0x246530));return _0xe91c8e['data'];}export async function getDbAllTableList(_0x24190e,_0x350620){const _0x3d0e6c=a159_0x1483,_0x376f6f=await apiRequest(_0x3d0e6c(0x241)+buildQuery({'appCode':_0x24190e,'dbLinkId':_0x350620})),_0x574d9b=_0x376f6f[_0x3d0e6c(0x1f3)];if(Array['isArray'](_0x574d9b))return _0x574d9b;return extractList(_0x574d9b);}export async function getDbTableDiff(_0x5b8bda,_0x61cd6f,_0x4f78fb){const _0x3b6b55=a159_0x1483,_0x5939fe=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x5b8bda,'dbLinkId':_0x61cd6f,'pageIndex':_0x4f78fb?.[_0x3b6b55(0x262)]??0x1,'pageSize':_0x4f78fb?.[_0x3b6b55(0x27c)]??0x14,'tableName':_0x4f78fb?.['tableName']})),_0x536d8f=_0x5939fe[_0x3b6b55(0x1f3)];return{'totalCount':_0x536d8f?.[_0x3b6b55(0x278)]??0x0,'physicalTableCount':_0x536d8f?.['physicalTableCount']??0x0,'datasetTableCount':_0x536d8f?.['datasetTableCount']??0x0,..._0x536d8f?.[_0x3b6b55(0x220)]?{'summary':_0x536d8f[_0x3b6b55(0x220)]}:{},'tableList':Array[_0x3b6b55(0x248)](_0x536d8f?.[_0x3b6b55(0x228)])?_0x536d8f[_0x3b6b55(0x228)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x52ad11=a159_0x1483,_0x1219ee=await apiRequest(_0x52ad11(0x298),{'method':_0x52ad11(0x20a),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x5abe6f=extractList(_0x1219ee['data']),_0xc538b2=extractPaging(_0x1219ee[_0x52ad11(0x1f3)]);return _0xc538b2&&_0xc538b2[_0x52ad11(0x278)]>REMOTE_APP_PAGE_SIZE&&console[_0x52ad11(0x242)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+_0x52ad11(0x1f5)+_0xc538b2[_0x52ad11(0x278)]+_0x52ad11(0x246)+'Use\x20the\x20platform\x20console\x20to\x20see\x20all.'),_0x5abe6f;}
@@ -1 +1 @@
1
- const a160_0xb01192=a160_0x4b46;(function(_0x3ae713,_0x242650){const _0x42fcc5=a160_0x4b46,_0x50ef00=_0x3ae713();while(!![]){try{const _0x46112b=parseInt(_0x42fcc5(0x1f0))/0x1+parseInt(_0x42fcc5(0x1fb))/0x2+-parseInt(_0x42fcc5(0x1f3))/0x3*(parseInt(_0x42fcc5(0x1fa))/0x4)+parseInt(_0x42fcc5(0x1f5))/0x5+parseInt(_0x42fcc5(0x1fd))/0x6+-parseInt(_0x42fcc5(0x1f7))/0x7*(-parseInt(_0x42fcc5(0x1f4))/0x8)+-parseInt(_0x42fcc5(0x1f2))/0x9;if(_0x46112b===_0x242650)break;else _0x50ef00['push'](_0x50ef00['shift']());}catch(_0x38c638){_0x50ef00['push'](_0x50ef00['shift']());}}}(a160_0x5f62,0x85486));function a160_0x4b46(_0x94a87d,_0x1da32f){_0x94a87d=_0x94a87d-0x1f0;const _0x5f621e=a160_0x5f62();let _0x4b46ce=_0x5f621e[_0x94a87d];return _0x4b46ce;}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a160_0x5f62(){const _0x21e057=['bff-trash','.rabetbase','17852FBaXRU','1071370CPZPKY','bff','5784822UXFtyf','1058902YCfHJx','bff.lock.json','16872705WnlGeP','729QrmPxU','3704ciEfTB','2801570acnByv','/bff','5838XteMUG'];a160_0x5f62=function(){return _0x21e057;};return a160_0x5f62();}const DOT_DIR=a160_0xb01192(0x1f9),LOCK_FILE_NAME=a160_0xb01192(0x1f1),TRASH_DIR_NAME=a160_0xb01192(0x1f8);export function loadBffProjectConfig(_0x36e7d3,_0x371b59){const _0x437aed=a160_0xb01192,_0x3415c0=resolve(_0x371b59??findProjectRootDirectory()),_0x45a277=DOT_DIR+_0x437aed(0x1f6),_0x425223=_0x45a277+'/'+_0x36e7d3;return{'projectRoot':_0x3415c0,'appCode':_0x36e7d3,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x45a277,'scriptsRoot':_0x425223,'scriptsRootDir':resolve(_0x3415c0,DOT_DIR,_0x437aed(0x1fc),_0x36e7d3),'lockFilePath':resolve(_0x3415c0,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x3415c0,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a160_0x200b10=a160_0x33d4;(function(_0x735047,_0x142036){const _0x3be5b8=a160_0x33d4,_0xf6d6a0=_0x735047();while(!![]){try{const _0xb88a98=-parseInt(_0x3be5b8(0xbf))/0x1*(parseInt(_0x3be5b8(0xbc))/0x2)+-parseInt(_0x3be5b8(0xba))/0x3*(-parseInt(_0x3be5b8(0xb5))/0x4)+parseInt(_0x3be5b8(0xbb))/0x5*(-parseInt(_0x3be5b8(0xc0))/0x6)+parseInt(_0x3be5b8(0xbe))/0x7*(-parseInt(_0x3be5b8(0xb6))/0x8)+-parseInt(_0x3be5b8(0xb7))/0x9*(parseInt(_0x3be5b8(0xbd))/0xa)+-parseInt(_0x3be5b8(0xc3))/0xb+parseInt(_0x3be5b8(0xc1))/0xc;if(_0xb88a98===_0x142036)break;else _0xf6d6a0['push'](_0xf6d6a0['shift']());}catch(_0x41acda){_0xf6d6a0['push'](_0xf6d6a0['shift']());}}}(a160_0x60c4,0xb5b73));import{resolve}from'node:path';function a160_0x33d4(_0x33794d,_0x15c6f7){_0x33794d=_0x33794d-0xb5;const _0x60c4b7=a160_0x60c4();let _0x33d4cc=_0x60c4b7[_0x33794d];return _0x33d4cc;}function a160_0x60c4(){const _0x5573b9=['14854ulZtkS','2481Ximvyu','6QEWhAO','55237764uUbCNV','bff.lock.json','4862638NcDleS','.rabetbase','1075100wowlaM','1456pWwXRR','11798937RtqSyU','bff-trash','/bff','3uADEUt','6418780FwSBPU','568hMvGkv','10wecpxT'];a160_0x60c4=function(){return _0x5573b9;};return a160_0x60c4();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a160_0x200b10(0xc4),LOCK_FILE_NAME=a160_0x200b10(0xc2),TRASH_DIR_NAME=a160_0x200b10(0xb8);export function loadBffProjectConfig(_0xeb1c68,_0x2a069a){const _0x554ca2=a160_0x200b10,_0x1420e7=resolve(_0x2a069a??findProjectRootDirectory()),_0x56d089=DOT_DIR+_0x554ca2(0xb9),_0x59a7c9=_0x56d089+'/'+_0xeb1c68;return{'projectRoot':_0x1420e7,'appCode':_0xeb1c68,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x56d089,'scriptsRoot':_0x59a7c9,'scriptsRootDir':resolve(_0x1420e7,DOT_DIR,'bff',_0xeb1c68),'lockFilePath':resolve(_0x1420e7,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x1420e7,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- const a161_0x5b96e3=a161_0x2791;(function(_0xdf1223,_0x16d3c8){const _0x2472bb=a161_0x2791,_0x495fb9=_0xdf1223();while(!![]){try{const _0x1c70eb=parseInt(_0x2472bb(0xb7))/0x1*(-parseInt(_0x2472bb(0x95))/0x2)+parseInt(_0x2472bb(0xb9))/0x3*(-parseInt(_0x2472bb(0xa2))/0x4)+parseInt(_0x2472bb(0x9f))/0x5*(-parseInt(_0x2472bb(0xa1))/0x6)+parseInt(_0x2472bb(0xb4))/0x7+-parseInt(_0x2472bb(0xb1))/0x8*(-parseInt(_0x2472bb(0xb2))/0x9)+-parseInt(_0x2472bb(0x9c))/0xa+parseInt(_0x2472bb(0x94))/0xb;if(_0x1c70eb===_0x16d3c8)break;else _0x495fb9['push'](_0x495fb9['shift']());}catch(_0x1387bc){_0x495fb9['push'](_0x495fb9['shift']());}}}(a161_0x219f,0x4c965));import{access,mkdir,readdir,stat}from'node:fs/promises';function a161_0x219f(){const _0x3b8a88=['push','alias','ENOENT','replace','scriptType','F_OK','3890420FeuRHE','map','before','55975QtKOzw','after','336eSZXmY','322732arRgVp','HOOK/','code','afterScriptId','HOOK','operationType','ENDPOINT','includes','isDirectory','split','datasetCode','COMMON','scriptsRootDir','.js','isFile','4766232lIyECt','9ufEknu','get','1641948FXSztR','name','beforeScriptId','101kELsUG','set','6arZUCM','endsWith','10131704qxTeXl','5156BaUZFS'];a161_0x219f=function(){return _0x3b8a88;};return a161_0x219f();}import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a161_0x5b96e3(0xad),a161_0x5b96e3(0xa8),'HOOK'];export function normalizeBffType(_0x2814f8){const _0x26f7b8=a161_0x5b96e3;if(!_0x2814f8)return undefined;const _0x15de9c=_0x2814f8['trim']()['toUpperCase']();return SUPPORTED_BFF_TYPES[_0x26f7b8(0xa9)](_0x15de9c)?_0x15de9c:undefined;}async function scanJsFilesRecursively(_0x33de6d,_0x40fc7c){const _0x130586=a161_0x5b96e3,_0x176722=[];try{const _0xe9f2a1=await readdir(_0x33de6d,{'withFileTypes':!![]});for(const _0x5a24d2 of _0xe9f2a1){const _0x3e6418=join(_0x33de6d,_0x5a24d2[_0x130586(0xb5)]);if(_0x5a24d2[_0x130586(0xaa)]())_0x176722[_0x130586(0x96)](...await scanJsFilesRecursively(_0x3e6418,_0x40fc7c+'/'+_0x5a24d2[_0x130586(0xb5)]));else _0x5a24d2[_0x130586(0xb0)]()&&_0x5a24d2[_0x130586(0xb5)][_0x130586(0xba)](_0x130586(0xaf))&&_0x176722[_0x130586(0x96)]({'lockKey':_0x40fc7c+'/'+_0x5a24d2['name'][_0x130586(0x99)](/\.js$/,''),'filePath':_0x3e6418});}}catch(_0x1d9f01){if(_0x1d9f01['code']!==_0x130586(0x98))throw _0x1d9f01;}return _0x176722;}function a161_0x2791(_0x4ed7ae,_0x4f5e25){_0x4ed7ae=_0x4ed7ae-0x94;const _0x219f13=a161_0x219f();let _0x279128=_0x219f13[_0x4ed7ae];return _0x279128;}async function scanFlatFunctions(_0x1373ae,_0x109434){const _0x386f01=a161_0x5b96e3,_0x25288b=join(_0x1373ae['scriptsRootDir'],_0x109434),_0x45dd8d=await scanJsFilesRecursively(_0x25288b,_0x109434);return _0x45dd8d[_0x386f01(0x9d)](({lockKey:_0x3a2fab,filePath:_0x4d50ef})=>({'type':_0x109434,'name':_0x3a2fab[_0x386f01(0xab)]('/')['at'](-0x1)??'','filePath':_0x4d50ef,'lockKey':_0x3a2fab}));}async function scanHookFunctions(_0x484153){const _0x5a2c53=a161_0x5b96e3,_0xdb7472=join(_0x484153['scriptsRootDir'],'HOOK'),_0x95abf5=[];try{const _0x21e341=await readdir(_0xdb7472,{'withFileTypes':!![]});for(const _0x445084 of _0x21e341){if(!_0x445084[_0x5a2c53(0xaa)]())continue;const _0x320e43=_0x445084['name'],_0x1cd03e=join(_0xdb7472,_0x320e43),_0x31c198=await readdir(_0x1cd03e,{'withFileTypes':!![]});for(const _0x49d56b of _0x31c198){if(!_0x49d56b[_0x5a2c53(0xaa)]())continue;const _0x487813=_0x49d56b[_0x5a2c53(0xb5)],_0xfdb34b=join(_0x1cd03e,_0x487813),_0x2df590=await readdir(_0xfdb34b,{'withFileTypes':!![]});for(const _0x178d4f of _0x2df590){if(!_0x178d4f[_0x5a2c53(0xaa)]())continue;const _0x10f662=_0x178d4f['name'],_0x93c942=join(_0xfdb34b,_0x10f662),_0x8ad306=await readdir(_0x93c942,{'withFileTypes':!![]});for(const _0x1d3e7c of _0x8ad306){if(!_0x1d3e7c['isFile']()||!_0x1d3e7c[_0x5a2c53(0xb5)][_0x5a2c53(0xba)](_0x5a2c53(0xaf)))continue;const _0x4edfb2=_0x1d3e7c[_0x5a2c53(0xb5)][_0x5a2c53(0x99)](/\.js$/,'');_0x95abf5['push']({'type':_0x5a2c53(0xa6),'name':_0x4edfb2,'filePath':join(_0x93c942,_0x1d3e7c[_0x5a2c53(0xb5)]),'lockKey':'HOOK/'+_0x320e43+'/'+_0x487813+'/'+_0x10f662+'/'+_0x4edfb2,'alias':_0x320e43,'operationType':_0x487813,'functionNode':_0x10f662});}}}}}catch(_0x30f995){if(_0x30f995[_0x5a2c53(0xa4)]!==_0x5a2c53(0x98))throw _0x30f995;}return _0x95abf5;}export async function scanLocalBffFunctions(_0x8a3eba,_0x294311){const _0x130f49=a161_0x5b96e3;if(_0x294311===_0x130f49(0xad)||_0x294311===_0x130f49(0xa8))return scanFlatFunctions(_0x8a3eba,_0x294311);if(_0x294311==='HOOK')return scanHookFunctions(_0x8a3eba);const [_0x89f622,_0x4a7285,_0x7abf9f]=await Promise['all']([scanFlatFunctions(_0x8a3eba,_0x130f49(0xad)),scanFlatFunctions(_0x8a3eba,_0x130f49(0xa8)),scanHookFunctions(_0x8a3eba)]);return[..._0x89f622,..._0x4a7285,..._0x7abf9f];}export function resolveLocalFilePathFromLockKey(_0x3889a1,_0xd9b28b){const _0x7889d9=a161_0x5b96e3;return join(_0x3889a1[_0x7889d9(0xae)],..._0xd9b28b['split']('/'))+_0x7889d9(0xaf);}export function createHookLocationMap(_0x3c1d94){const _0x3ebfc4=a161_0x5b96e3,_0xf8504e=new Map();for(const _0x518e20 of _0x3c1d94){_0x518e20[_0x3ebfc4(0xb6)]&&_0xf8504e[_0x3ebfc4(0xb8)](_0x518e20[_0x3ebfc4(0xb6)],{'datasetCode':_0x518e20[_0x3ebfc4(0xac)],'operationType':snakeToCamel(_0x518e20[_0x3ebfc4(0xa7)]),'functionNode':_0x3ebfc4(0x9e)}),_0x518e20[_0x3ebfc4(0xa5)]&&_0xf8504e[_0x3ebfc4(0xb8)](_0x518e20[_0x3ebfc4(0xa5)],{'datasetCode':_0x518e20[_0x3ebfc4(0xac)],'operationType':snakeToCamel(_0x518e20[_0x3ebfc4(0xa7)]),'functionNode':_0x3ebfc4(0xa0)});}return _0xf8504e;}export function resolveRemoteScriptTarget(_0x502d8b,_0x16646b,_0x6bb373,_0x132cdc,_0x1a9b39){const _0x278a50=a161_0x5b96e3,_0x55c734=normalizeBffType(_0x16646b[_0x278a50(0x9a)]);if(!_0x55c734||!_0x16646b['functionName'])return null;if(_0x55c734===_0x278a50(0xa6)){const _0x1dbe61=(_0x16646b['id']?_0x6bb373[_0x278a50(0xb3)](_0x16646b['id']):undefined)??findHookLocationByRemoteId(_0x132cdc,_0x16646b['id']);if(!_0x1dbe61)return null;const _0x2c5768=_0x1dbe61[_0x278a50(0x97)]||_0x1a9b39['get'](_0x1dbe61[_0x278a50(0xac)]),_0x5488f2=_0x2c5768??_0x1dbe61[_0x278a50(0xac)],_0x239a82={..._0x1dbe61,'alias':_0x2c5768},_0x4edcec=_0x278a50(0xa3)+_0x5488f2+'/'+_0x239a82[_0x278a50(0xa7)]+'/'+_0x239a82['functionNode']+'/'+_0x16646b['functionName'];return{'lockKey':_0x4edcec,'filePath':resolveLocalFilePathFromLockKey(_0x502d8b,_0x4edcec),'type':_0x278a50(0xa6),'hookLocation':_0x239a82};}const _0x11addd=_0x55c734+'/'+_0x16646b['functionName'];return{'lockKey':_0x11addd,'filePath':resolveLocalFilePathFromLockKey(_0x502d8b,_0x11addd),'type':_0x55c734};}export async function ensureParentDirectory(_0x1ea142){await mkdir(dirname(_0x1ea142),{'recursive':!![]});}export async function fileExists(_0xf6ba26){const _0x2a2364=a161_0x5b96e3;try{return await access(_0xf6ba26,constants[_0x2a2364(0x9b)]),!![];}catch{return![];}}export async function directoryExists(_0x5e5843){const _0x5b77b3=a161_0x5b96e3;try{const _0x21cf5d=await stat(_0x5e5843);return _0x21cf5d[_0x5b77b3(0xaa)]();}catch{return![];}}
1
+ const a161_0x5f19d8=a161_0x4b07;(function(_0x5f40ba,_0x5c5436){const _0x516d74=a161_0x4b07,_0x366694=_0x5f40ba();while(!![]){try{const _0x2b590b=-parseInt(_0x516d74(0xbb))/0x1+parseInt(_0x516d74(0xc8))/0x2*(-parseInt(_0x516d74(0xcb))/0x3)+-parseInt(_0x516d74(0xbe))/0x4*(-parseInt(_0x516d74(0xbf))/0x5)+parseInt(_0x516d74(0xbd))/0x6+-parseInt(_0x516d74(0xc5))/0x7+parseInt(_0x516d74(0xd1))/0x8*(-parseInt(_0x516d74(0xca))/0x9)+-parseInt(_0x516d74(0xdc))/0xa*(-parseInt(_0x516d74(0xba))/0xb);if(_0x2b590b===_0x5c5436)break;else _0x366694['push'](_0x366694['shift']());}catch(_0x38d176){_0x366694['push'](_0x366694['shift']());}}}(a161_0x2c5a,0xee442));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a161_0x5f19d8(0xd9),a161_0x5f19d8(0xd0),'HOOK'];export function normalizeBffType(_0x3c9aba){const _0x669969=a161_0x5f19d8;if(!_0x3c9aba)return undefined;const _0x1e01cb=_0x3c9aba[_0x669969(0xc1)]()[_0x669969(0xc9)]();return SUPPORTED_BFF_TYPES[_0x669969(0xd4)](_0x1e01cb)?_0x1e01cb:undefined;}function a161_0x4b07(_0x261ef5,_0x134027){_0x261ef5=_0x261ef5-0xba;const _0x2c5a10=a161_0x2c5a();let _0x4b07cf=_0x2c5a10[_0x261ef5];return _0x4b07cf;}async function scanJsFilesRecursively(_0x2afd6e,_0x200c80){const _0x2e2492=a161_0x5f19d8,_0xa4ba74=[];try{const _0x4acc22=await readdir(_0x2afd6e,{'withFileTypes':!![]});for(const _0x4df893 of _0x4acc22){const _0xa4efe1=join(_0x2afd6e,_0x4df893['name']);if(_0x4df893[_0x2e2492(0xd5)]())_0xa4ba74[_0x2e2492(0xd8)](...await scanJsFilesRecursively(_0xa4efe1,_0x200c80+'/'+_0x4df893[_0x2e2492(0xc6)]));else _0x4df893[_0x2e2492(0xcf)]()&&_0x4df893[_0x2e2492(0xc6)]['endsWith']('.js')&&_0xa4ba74[_0x2e2492(0xd8)]({'lockKey':_0x200c80+'/'+_0x4df893[_0x2e2492(0xc6)][_0x2e2492(0xe1)](/\.js$/,''),'filePath':_0xa4efe1});}}catch(_0x3e0c09){if(_0x3e0c09['code']!==_0x2e2492(0xd2))throw _0x3e0c09;}return _0xa4ba74;}async function scanFlatFunctions(_0x5edaf6,_0x526d13){const _0x5b438c=a161_0x5f19d8,_0x5c565b=join(_0x5edaf6[_0x5b438c(0xcc)],_0x526d13),_0x3e9f5c=await scanJsFilesRecursively(_0x5c565b,_0x526d13);return _0x3e9f5c[_0x5b438c(0xde)](({lockKey:_0x5a5d2a,filePath:_0x1aabe9})=>({'type':_0x526d13,'name':_0x5a5d2a[_0x5b438c(0xc0)]('/')['at'](-0x1)??'','filePath':_0x1aabe9,'lockKey':_0x5a5d2a}));}async function scanHookFunctions(_0x39a631){const _0x74b11d=a161_0x5f19d8,_0x1235c1=join(_0x39a631[_0x74b11d(0xcc)],_0x74b11d(0xce)),_0x39cbec=[];try{const _0x106209=await readdir(_0x1235c1,{'withFileTypes':!![]});for(const _0x2306e0 of _0x106209){if(!_0x2306e0[_0x74b11d(0xd5)]())continue;const _0x445b11=_0x2306e0['name'],_0xef6a7=join(_0x1235c1,_0x445b11),_0x431cbc=await readdir(_0xef6a7,{'withFileTypes':!![]});for(const _0x250149 of _0x431cbc){if(!_0x250149[_0x74b11d(0xd5)]())continue;const _0xbd8b58=_0x250149[_0x74b11d(0xc6)],_0x33c2d3=join(_0xef6a7,_0xbd8b58),_0x521063=await readdir(_0x33c2d3,{'withFileTypes':!![]});for(const _0x989a96 of _0x521063){if(!_0x989a96['isDirectory']())continue;const _0x5ae485=_0x989a96[_0x74b11d(0xc6)],_0x2e6532=join(_0x33c2d3,_0x5ae485),_0x31062a=await readdir(_0x2e6532,{'withFileTypes':!![]});for(const _0x4b92a6 of _0x31062a){if(!_0x4b92a6[_0x74b11d(0xcf)]()||!_0x4b92a6[_0x74b11d(0xc6)][_0x74b11d(0xdf)](_0x74b11d(0xc4)))continue;const _0x25c856=_0x4b92a6[_0x74b11d(0xc6)][_0x74b11d(0xe1)](/\.js$/,'');_0x39cbec[_0x74b11d(0xd8)]({'type':_0x74b11d(0xce),'name':_0x25c856,'filePath':join(_0x2e6532,_0x4b92a6[_0x74b11d(0xc6)]),'lockKey':_0x74b11d(0xbc)+_0x445b11+'/'+_0xbd8b58+'/'+_0x5ae485+'/'+_0x25c856,'alias':_0x445b11,'operationType':_0xbd8b58,'functionNode':_0x5ae485});}}}}}catch(_0x575a8e){if(_0x575a8e['code']!==_0x74b11d(0xd2))throw _0x575a8e;}return _0x39cbec;}export async function scanLocalBffFunctions(_0x33169d,_0x3d78bd){const _0x301986=a161_0x5f19d8;if(_0x3d78bd==='COMMON'||_0x3d78bd==='ENDPOINT')return scanFlatFunctions(_0x33169d,_0x3d78bd);if(_0x3d78bd===_0x301986(0xce))return scanHookFunctions(_0x33169d);const [_0x13808f,_0x4af98c,_0x4623f4]=await Promise[_0x301986(0xd3)]([scanFlatFunctions(_0x33169d,_0x301986(0xd9)),scanFlatFunctions(_0x33169d,'ENDPOINT'),scanHookFunctions(_0x33169d)]);return[..._0x13808f,..._0x4af98c,..._0x4623f4];}export function resolveLocalFilePathFromLockKey(_0x5be66d,_0x4dcddd){const _0x34d1e4=a161_0x5f19d8;return join(_0x5be66d[_0x34d1e4(0xcc)],..._0x4dcddd[_0x34d1e4(0xc0)]('/'))+_0x34d1e4(0xc4);}export function createHookLocationMap(_0x1a1eac){const _0x56e1e9=a161_0x5f19d8,_0x421d29=new Map();for(const _0x36e2b4 of _0x1a1eac){_0x36e2b4[_0x56e1e9(0xd7)]&&_0x421d29['set'](_0x36e2b4[_0x56e1e9(0xd7)],{'datasetCode':_0x36e2b4[_0x56e1e9(0xc2)],'operationType':snakeToCamel(_0x36e2b4[_0x56e1e9(0xcd)]),'functionNode':'before'}),_0x36e2b4[_0x56e1e9(0xe2)]&&_0x421d29[_0x56e1e9(0xc3)](_0x36e2b4[_0x56e1e9(0xe2)],{'datasetCode':_0x36e2b4[_0x56e1e9(0xc2)],'operationType':snakeToCamel(_0x36e2b4[_0x56e1e9(0xcd)]),'functionNode':'after'});}return _0x421d29;}export function resolveRemoteScriptTarget(_0x47d46d,_0x59f2e5,_0x559973,_0x125609,_0xbef30f){const _0x4fa8a9=a161_0x5f19d8,_0x568050=normalizeBffType(_0x59f2e5[_0x4fa8a9(0xda)]);if(!_0x568050||!_0x59f2e5[_0x4fa8a9(0xdb)])return null;if(_0x568050===_0x4fa8a9(0xce)){const _0x15e07d=(_0x59f2e5['id']?_0x559973[_0x4fa8a9(0xc7)](_0x59f2e5['id']):undefined)??findHookLocationByRemoteId(_0x125609,_0x59f2e5['id']);if(!_0x15e07d)return null;const _0x5575d0=_0x15e07d[_0x4fa8a9(0xd6)]||_0xbef30f[_0x4fa8a9(0xc7)](_0x15e07d['datasetCode']),_0x1bb6d0=_0x5575d0??_0x15e07d[_0x4fa8a9(0xc2)],_0x2d6ade={..._0x15e07d,'alias':_0x5575d0},_0x2bd3df=_0x4fa8a9(0xbc)+_0x1bb6d0+'/'+_0x2d6ade['operationType']+'/'+_0x2d6ade[_0x4fa8a9(0xe0)]+'/'+_0x59f2e5[_0x4fa8a9(0xdb)];return{'lockKey':_0x2bd3df,'filePath':resolveLocalFilePathFromLockKey(_0x47d46d,_0x2bd3df),'type':_0x4fa8a9(0xce),'hookLocation':_0x2d6ade};}const _0x2890f8=_0x568050+'/'+_0x59f2e5[_0x4fa8a9(0xdb)];return{'lockKey':_0x2890f8,'filePath':resolveLocalFilePathFromLockKey(_0x47d46d,_0x2890f8),'type':_0x568050};}export async function ensureParentDirectory(_0x143b60){await mkdir(dirname(_0x143b60),{'recursive':!![]});}export async function fileExists(_0x2c6d46){const _0x35aec1=a161_0x5f19d8;try{return await access(_0x2c6d46,constants[_0x35aec1(0xdd)]),!![];}catch{return![];}}export async function directoryExists(_0x2b3a2a){try{const _0x2102fa=await stat(_0x2b3a2a);return _0x2102fa['isDirectory']();}catch{return![];}}function a161_0x2c5a(){const _0x5ed77a=['F_OK','map','endsWith','functionNode','replace','afterScriptId','154wRyqSq','1624301glKPGR','HOOK/','2934072AUdJWK','2670044hDFnqF','5zlmJfP','split','trim','datasetCode','set','.js','8499841PVKDZV','name','get','8AvVGdQ','toUpperCase','2290923SVvqWd','381306jntZDu','scriptsRootDir','operationType','HOOK','isFile','ENDPOINT','56YCSJum','ENOENT','all','includes','isDirectory','alias','beforeScriptId','push','COMMON','scriptType','functionName','3534440IlUyMY'];a161_0x2c5a=function(){return _0x5ed77a;};return a161_0x2c5a();}