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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/index.js +1 -1
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/restore.js +1 -1
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- const a190_0x2bb7b1=a190_0x1d8e;(function(_0x37e0d0,_0x5b9a66){const _0x201149=a190_0x1d8e,_0x1eb60f=_0x37e0d0();while(!![]){try{const _0x2f1d4a=-parseInt(_0x201149(0x8d))/0x1+parseInt(_0x201149(0x89))/0x2+parseInt(_0x201149(0x8e))/0x3+-parseInt(_0x201149(0x81))/0x4*(parseInt(_0x201149(0x90))/0x5)+-parseInt(_0x201149(0x8b))/0x6*(parseInt(_0x201149(0x84))/0x7)+parseInt(_0x201149(0x91))/0x8+-parseInt(_0x201149(0x88))/0x9*(parseInt(_0x201149(0x82))/0xa);if(_0x2f1d4a===_0x5b9a66)break;else _0x1eb60f['push'](_0x1eb60f['shift']());}catch(_0x5c8dd5){_0x1eb60f['push'](_0x1eb60f['shift']());}}}(a190_0xecaa,0x58cec));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x49d09a){const _0x321d91=a190_0x1d8e;customApiDomain=_0x49d09a?.[_0x321d91(0x85)],customUserDomain=_0x49d09a?.['userDomain'],customRuntimeDomain=_0x49d09a?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a190_0x2bb7b1(0x8c):'https://user-daily.lovrabet.com');function a190_0xecaa(){const _0x4815e4=['155kqoPjN','5541448pCarIV','/web-app/app/','https://api.lovrabet.com','91700gDsMOB','12010qJoaBM','https://runtime.lovrabet.com','287pQbsNp','apiDomain','/app/','https://daily.lovrabet.com','234GDlSCh','1394386XqwZMe','https://app.lovrabet.com','19662lldomy','https://user.lovrabet.com','317477uVEPlh','502851NtXhHh','https://daily-api.lovrabet.com'];a190_0xecaa=function(){return _0x4815e4;};return a190_0xecaa();}function a190_0x1d8e(_0x33beee,_0x2d6a38){_0x33beee=_0x33beee-0x81;const _0xecaa47=a190_0xecaa();let _0x1d8ecc=_0xecaa47[_0x33beee];return _0x1d8ecc;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a190_0x2bb7b1(0x93):a190_0x2bb7b1(0x8f));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a190_0x2bb7b1(0x83):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a190_0x2bb7b1(0x8a):a190_0x2bb7b1(0x87);export const getAppBaseUrl=_0x5c31d8=>{const _0x5dab41=a190_0x2bb7b1,_0x41546f=encodeURIComponent(_0x5c31d8['trim']());return isProduction(getEnv())?getAppDomain()+_0x5dab41(0x86)+_0x41546f:getAppDomain()+_0x5dab41(0x92)+_0x41546f;};
1
+ const a190_0x1888d6=a190_0x5747;function a190_0x5747(_0x2b92d7,_0x1b0c26){_0x2b92d7=_0x2b92d7-0x72;const _0x2fbe94=a190_0x2fbe();let _0x5747e5=_0x2fbe94[_0x2b92d7];return _0x5747e5;}(function(_0x5dafcb,_0xcedbe3){const _0x5b98b2=a190_0x5747,_0x2a77d8=_0x5dafcb();while(!![]){try{const _0x19b515=-parseInt(_0x5b98b2(0x84))/0x1*(-parseInt(_0x5b98b2(0x77))/0x2)+-parseInt(_0x5b98b2(0x81))/0x3*(-parseInt(_0x5b98b2(0x7d))/0x4)+parseInt(_0x5b98b2(0x83))/0x5*(parseInt(_0x5b98b2(0x86))/0x6)+-parseInt(_0x5b98b2(0x87))/0x7*(-parseInt(_0x5b98b2(0x7c))/0x8)+parseInt(_0x5b98b2(0x80))/0x9*(-parseInt(_0x5b98b2(0x74))/0xa)+-parseInt(_0x5b98b2(0x73))/0xb+-parseInt(_0x5b98b2(0x82))/0xc*(parseInt(_0x5b98b2(0x72))/0xd);if(_0x19b515===_0xcedbe3)break;else _0x2a77d8['push'](_0x2a77d8['shift']());}catch(_0x29f452){_0x2a77d8['push'](_0x2a77d8['shift']());}}}(a190_0x2fbe,0x84ab6));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x401ef6){const _0x1093aa=a190_0x5747;customApiDomain=_0x401ef6?.['apiDomain'],customUserDomain=_0x401ef6?.[_0x1093aa(0x88)],customRuntimeDomain=_0x401ef6?.['runtimeDomain'];}function a190_0x2fbe(){const _0x27bd4b=['6dbmtLx','48GQxskq','315wqfktN','59oTUvsw','https://daily.lovrabet.com','6126AHzSVa','21lUrJad','userDomain','https://user-daily.lovrabet.com','3244033kwDZKj','8435207sIyIbO','300UDhGzo','trim','https://user.lovrabet.com','27582qrjJmz','https://runtime.lovrabet.com','https://app.lovrabet.com','https://api.lovrabet.com','/app/','1940552uJULry','1676572KWKzpB','https://daily-api.lovrabet.com','/web-app/app/','40671DjUuUb'];a190_0x2fbe=function(){return _0x27bd4b;};return a190_0x2fbe();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a190_0x1888d6(0x76):a190_0x1888d6(0x89));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a190_0x1888d6(0x7a):a190_0x1888d6(0x7e));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a190_0x1888d6(0x78):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a190_0x1888d6(0x79):a190_0x1888d6(0x85);export const getAppBaseUrl=_0x345f17=>{const _0xa41e65=a190_0x1888d6,_0x2f430c=encodeURIComponent(_0x345f17[_0xa41e65(0x75)]());return isProduction(getEnv())?getAppDomain()+_0xa41e65(0x7b)+_0x2f430c:getAppDomain()+_0xa41e65(0x7f)+_0x2f430c;};
@@ -1 +1 @@
1
- function a191_0x3175(_0x191661,_0xeea93c){_0x191661=_0x191661-0x1b9;const _0x3f2d7d=a191_0x3f2d();let _0x317580=_0x3f2d7d[_0x191661];return _0x317580;}const a191_0x5a1a54=a191_0x3175;(function(_0x44e3c3,_0x5bc208){const _0x58f143=a191_0x3175,_0x404ab0=_0x44e3c3();while(!![]){try{const _0x2e4adc=-parseInt(_0x58f143(0x1ba))/0x1+-parseInt(_0x58f143(0x1bf))/0x2+-parseInt(_0x58f143(0x1bb))/0x3*(-parseInt(_0x58f143(0x1bc))/0x4)+parseInt(_0x58f143(0x1c5))/0x5+-parseInt(_0x58f143(0x1c6))/0x6*(-parseInt(_0x58f143(0x1c1))/0x7)+-parseInt(_0x58f143(0x1be))/0x8*(parseInt(_0x58f143(0x1b9))/0x9)+parseInt(_0x58f143(0x1c7))/0xa;if(_0x2e4adc===_0x5bc208)break;else _0x404ab0['push'](_0x404ab0['shift']());}catch(_0x4ddd7f){_0x404ab0['push'](_0x404ab0['shift']());}}}(a191_0x3f2d,0x74b51));export const RABETBASE_ENV_VALUES=[a191_0x5a1a54(0x1c0),'daily'];export function normalizeEnv(_0x1bee6f){const _0x152f40=a191_0x5a1a54;return _0x1bee6f===_0x152f40(0x1c2)?_0x152f40(0x1c0):_0x1bee6f;}export function isProduction(_0x1e4300){const _0xe7e304=a191_0x5a1a54;return normalizeEnv(_0x1e4300)===_0xe7e304(0x1c0);}export function isDaily(_0x25a233){const _0x24c8b3=a191_0x5a1a54;return normalizeEnv(_0x25a233)===_0x24c8b3(0x1c4);}export function isDev(_0x1e80bc){const _0x3c41e7=a191_0x5a1a54,_0x25f539=normalizeEnv(_0x1e80bc);return _0x25f539===_0x3c41e7(0x1bd)||_0x25f539===_0x3c41e7(0x1c3);}function a191_0x3f2d(){const _0x1bdfcb=['3479384uNWjtc','894236rVaZsb','production','91LEPBwl','online','dev','daily','1340105xgIpnB','406254GJqyCn','2173650epeIRp','9uYrnKB','906063dvocTO','9sAizCN','1200712EpkIiV','development'];a191_0x3f2d=function(){return _0x1bdfcb;};return a191_0x3f2d();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a191_0x5a1a54(0x1c0));export function getEnv(){return env;}export function initEnv(_0x11d3e7){env=normalizeEnv(_0x11d3e7);}
1
+ const a191_0x3896ca=a191_0x3819;function a191_0x3819(_0x38c91d,_0x320de0){_0x38c91d=_0x38c91d-0x72;const _0x336c1a=a191_0x336c();let _0x3819ee=_0x336c1a[_0x38c91d];return _0x3819ee;}(function(_0x4a6c05,_0x421792){const _0x549448=a191_0x3819,_0x241778=_0x4a6c05();while(!![]){try{const _0x565ccb=parseInt(_0x549448(0x78))/0x1+-parseInt(_0x549448(0x7e))/0x2+parseInt(_0x549448(0x79))/0x3+-parseInt(_0x549448(0x72))/0x4*(parseInt(_0x549448(0x73))/0x5)+parseInt(_0x549448(0x77))/0x6*(-parseInt(_0x549448(0x7d))/0x7)+parseInt(_0x549448(0x7b))/0x8+parseInt(_0x549448(0x74))/0x9*(parseInt(_0x549448(0x7c))/0xa);if(_0x565ccb===_0x421792)break;else _0x241778['push'](_0x241778['shift']());}catch(_0x2fb67b){_0x241778['push'](_0x241778['shift']());}}}(a191_0x336c,0x82912));export const RABETBASE_ENV_VALUES=[a191_0x3896ca(0x75),a191_0x3896ca(0x7a)];export function normalizeEnv(_0x4d7001){const _0x275bb2=a191_0x3896ca;return _0x4d7001==='online'?_0x275bb2(0x75):_0x4d7001;}export function isProduction(_0x3bd0f5){return normalizeEnv(_0x3bd0f5)==='production';}export function isDaily(_0x390ad2){const _0x1c3428=a191_0x3896ca;return normalizeEnv(_0x390ad2)===_0x1c3428(0x7a);}export function isDev(_0x187b91){const _0x56dfd6=a191_0x3896ca,_0x416337=normalizeEnv(_0x187b91);return _0x416337==='development'||_0x416337===_0x56dfd6(0x76);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a191_0x3896ca(0x75));export function getEnv(){return env;}export function initEnv(_0x3e0310){env=normalizeEnv(_0x3e0310);}function a191_0x336c(){const _0x49c451=['908848BCAgek','45822zxXhBE','daily','2604576fvBciY','9062110QeLxmh','3694334GynHLW','282676iKYnnk','4HCrmKE','2121205bFuFZB','9VBXwRe','production','dev','12vQaPRQ'];a191_0x336c=function(){return _0x49c451;};return a191_0x336c();}
@@ -1 +1 @@
1
- const a192_0x542973=a192_0x57bf;function a192_0x57bf(_0x3eaa43,_0x4837b9){_0x3eaa43=_0x3eaa43-0x157;const _0x21f850=a192_0x21f8();let _0x57bfd7=_0x21f850[_0x3eaa43];return _0x57bfd7;}function a192_0x21f8(){const _0x4e7002=['24UHVEJc','2405ysehbY','343064FuyHLW','27748EdwhQc','36xFikWI','pretty','json','349783AWVsUC','118550ZMDoxX','104oDQIMS','171ZhYIVW','49287MIuHDO','7442556TbClBc'];a192_0x21f8=function(){return _0x4e7002;};return a192_0x21f8();}(function(_0x38c76f,_0x55baaf){const _0x2f5023=a192_0x57bf,_0x16bbef=_0x38c76f();while(!![]){try{const _0x41e0dd=parseInt(_0x2f5023(0x15f))/0x1*(parseInt(_0x2f5023(0x15c))/0x2)+parseInt(_0x2f5023(0x15a))/0x3+-parseInt(_0x2f5023(0x158))/0x4*(-parseInt(_0x2f5023(0x15d))/0x5)+parseInt(_0x2f5023(0x160))/0x6*(parseInt(_0x2f5023(0x163))/0x7)+-parseInt(_0x2f5023(0x15e))/0x8+-parseInt(_0x2f5023(0x159))/0x9*(-parseInt(_0x2f5023(0x157))/0xa)+-parseInt(_0x2f5023(0x15b))/0xb;if(_0x41e0dd===_0x55baaf)break;else _0x16bbef['push'](_0x16bbef['shift']());}catch(_0x4ceb67){_0x16bbef['push'](_0x16bbef['shift']());}}}(a192_0x21f8,0x28e43));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a192_0x542973(0x162),a192_0x542973(0x161),'compress'];
1
+ function a192_0x2688(_0x4a8964,_0x1e2005){_0x4a8964=_0x4a8964-0x1ee;const _0x5bbed5=a192_0x5bbe();let _0x26880f=_0x5bbed5[_0x4a8964];return _0x26880f;}const a192_0x10367a=a192_0x2688;function a192_0x5bbe(){const _0x572373=['6YZKZOs','2072488rGBeKX','652888FGJFzT','6sRNHIZ','570836tYubPR','138590FNCPJl','3152MkEQKe','compress','pretty','159XLGpXJ','7756790GyWcPh','1379538dHkxnl'];a192_0x5bbe=function(){return _0x572373;};return a192_0x5bbe();}(function(_0x372f28,_0x21cef3){const _0x4a6d92=a192_0x2688,_0x609ed6=_0x372f28();while(!![]){try{const _0x427d9e=-parseInt(_0x4a6d92(0x1f4))/0x1*(-parseInt(_0x4a6d92(0x1f1))/0x2)+-parseInt(_0x4a6d92(0x1f7))/0x3*(parseInt(_0x4a6d92(0x1f9))/0x4)+parseInt(_0x4a6d92(0x1f0))/0x5+-parseInt(_0x4a6d92(0x1ee))/0x6*(parseInt(_0x4a6d92(0x1ef))/0x7)+-parseInt(_0x4a6d92(0x1f8))/0x8+-parseInt(_0x4a6d92(0x1f6))/0x9+parseInt(_0x4a6d92(0x1f5))/0xa;if(_0x427d9e===_0x21cef3)break;else _0x609ed6['push'](_0x609ed6['shift']());}catch(_0xc8c0c2){_0x609ed6['push'](_0x609ed6['shift']());}}}(a192_0x5bbe,0x390ae));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a192_0x10367a(0x1f3),a192_0x10367a(0x1f2)];
@@ -1 +1 @@
1
- const a193_0x3cea73=a193_0x4e35;(function(_0x565489,_0x395a8f){const _0x4fbd8e=a193_0x4e35,_0x5ad83f=_0x565489();while(!![]){try{const _0x544969=parseInt(_0x4fbd8e(0x1c6))/0x1+-parseInt(_0x4fbd8e(0x1ca))/0x2*(-parseInt(_0x4fbd8e(0x1c2))/0x3)+parseInt(_0x4fbd8e(0x1c7))/0x4+-parseInt(_0x4fbd8e(0x1c1))/0x5+parseInt(_0x4fbd8e(0x1c5))/0x6+parseInt(_0x4fbd8e(0x1c4))/0x7+-parseInt(_0x4fbd8e(0x1c8))/0x8*(parseInt(_0x4fbd8e(0x1c3))/0x9);if(_0x544969===_0x395a8f)break;else _0x5ad83f['push'](_0x5ad83f['shift']());}catch(_0x466269){_0x5ad83f['push'](_0x5ad83f['shift']());}}}(a193_0x3b1f,0xdd167));function a193_0x3b1f(){const _0x200e11=['18621600ojzNqT','./src/api','323732GTEwDn','5965420glWAMp','15YDkZou','9HYNyJn','4236337YJhuxC','7068540uUpskQ','825916hgTMDe','4031328jWuenq'];a193_0x3b1f=function(){return _0x200e11;};return a193_0x3b1f();}function a193_0x4e35(_0x478bae,_0x288c81){_0x478bae=_0x478bae-0x1c1;const _0x3b1fd1=a193_0x3b1f();let _0x4e35af=_0x3b1fd1[_0x478bae];return _0x4e35af;}export const DEFAULT_API_DIR=a193_0x3cea73(0x1c9);
1
+ const a193_0x50c24e=a193_0x44b0;function a193_0x5e04(){const _0x24eb85=['7dVNKFD','1060fojXPN','3530ZXYdmE','./src/api','10XYDtEm','1269300WRfvaH','20313381LpTYpX','2420646WLmzUS','943288uhHjOE','285394fwyhiU','970146kvYMyg','36vmVJTB'];a193_0x5e04=function(){return _0x24eb85;};return a193_0x5e04();}(function(_0x4abb6f,_0x1752a0){const _0x4aa09a=a193_0x44b0,_0x579b2d=_0x4abb6f();while(!![]){try{const _0x327c04=-parseInt(_0x4aa09a(0xe2))/0x1+-parseInt(_0x4aa09a(0xde))/0x2+-parseInt(_0x4aa09a(0xe3))/0x3+parseInt(_0x4aa09a(0xda))/0x4*(-parseInt(_0x4aa09a(0xdb))/0x5)+parseInt(_0x4aa09a(0xe0))/0x6*(parseInt(_0x4aa09a(0xd9))/0x7)+parseInt(_0x4aa09a(0xe1))/0x8*(-parseInt(_0x4aa09a(0xd8))/0x9)+parseInt(_0x4aa09a(0xdd))/0xa*(parseInt(_0x4aa09a(0xdf))/0xb);if(_0x327c04===_0x1752a0)break;else _0x579b2d['push'](_0x579b2d['shift']());}catch(_0x5cffcd){_0x579b2d['push'](_0x579b2d['shift']());}}}(a193_0x5e04,0x54f30));function a193_0x44b0(_0x3303bf,_0x4082ac){_0x3303bf=_0x3303bf-0xd8;const _0x5e0438=a193_0x5e04();let _0x44b05c=_0x5e0438[_0x3303bf];return _0x44b05c;}export const DEFAULT_API_DIR=a193_0x50c24e(0xdc);
@@ -1 +1 @@
1
- const a194_0x46533b=a194_0x3d73;(function(_0x228c79,_0xb6db55){const _0x3f3369=a194_0x3d73,_0x5c3f09=_0x228c79();while(!![]){try{const _0x43f0e5=parseInt(_0x3f3369(0x13f))/0x1+-parseInt(_0x3f3369(0x146))/0x2*(-parseInt(_0x3f3369(0x148))/0x3)+-parseInt(_0x3f3369(0x149))/0x4*(parseInt(_0x3f3369(0x142))/0x5)+-parseInt(_0x3f3369(0x147))/0x6+parseInt(_0x3f3369(0x144))/0x7*(-parseInt(_0x3f3369(0x140))/0x8)+parseInt(_0x3f3369(0x141))/0x9+-parseInt(_0x3f3369(0x143))/0xa*(parseInt(_0x3f3369(0x13d))/0xb);if(_0x43f0e5===_0xb6db55)break;else _0x5c3f09['push'](_0x5c3f09['shift']());}catch(_0x23bb6f){_0x5c3f09['push'](_0x5c3f09['shift']());}}}(a194_0x4658,0x2b85c));export const RISK_LEVEL_VALUES=[a194_0x46533b(0x145),'write',a194_0x46533b(0x13e)];function a194_0x3d73(_0x4a4d82,_0x38f2ed){_0x4a4d82=_0x4a4d82-0x13d;const _0x465870=a194_0x4658();let _0x3d7332=_0x465870[_0x4a4d82];return _0x3d7332;}function a194_0x4658(){const _0x1a722c=['11368IGBfnu','2671308vqAkBq','395ayUkRj','30eosmGG','889NjxAIk','read','550uPdeHi','81546oJzWWc','2181ccSdWN','3360GskNFE','547921qoJGHU','high-risk-write','91382jmvmhv'];a194_0x4658=function(){return _0x1a722c;};return a194_0x4658();}
1
+ const a194_0x2dfc2f=a194_0x298b;function a194_0x298b(_0x4c9e1c,_0x513d1f){_0x4c9e1c=_0x4c9e1c-0x74;const _0x4c0950=a194_0x4c09();let _0x298b19=_0x4c0950[_0x4c9e1c];return _0x298b19;}(function(_0x3c893c,_0x202d76){const _0x51b7ae=a194_0x298b,_0x9d717e=_0x3c893c();while(!![]){try{const _0x4f7b18=-parseInt(_0x51b7ae(0x76))/0x1+parseInt(_0x51b7ae(0x7a))/0x2+-parseInt(_0x51b7ae(0x74))/0x3+-parseInt(_0x51b7ae(0x75))/0x4+-parseInt(_0x51b7ae(0x7b))/0x5*(-parseInt(_0x51b7ae(0x79))/0x6)+parseInt(_0x51b7ae(0x78))/0x7+parseInt(_0x51b7ae(0x7c))/0x8;if(_0x4f7b18===_0x202d76)break;else _0x9d717e['push'](_0x9d717e['shift']());}catch(_0x3ee812){_0x9d717e['push'](_0x9d717e['shift']());}}}(a194_0x4c09,0x27ed5));export const RISK_LEVEL_VALUES=[a194_0x2dfc2f(0x77),a194_0x2dfc2f(0x7d),'high-risk-write'];function a194_0x4c09(){const _0x282655=['447656Jxawiv','4215nmKfxM','1043880zDQGMr','write','465102TYJDQp','413952LvxbMl','274999ccKFTS','read','1756034ncaEsW','654DngYur'];a194_0x4c09=function(){return _0x282655;};return a194_0x4c09();}
@@ -1 +1 @@
1
- (function(_0x1fbddd,_0x53a77e){const _0x10ac95=a195_0x2575,_0x4ff196=_0x1fbddd();while(!![]){try{const _0x4abf8c=parseInt(_0x10ac95(0x156))/0x1+parseInt(_0x10ac95(0x16e))/0x2*(-parseInt(_0x10ac95(0x14e))/0x3)+-parseInt(_0x10ac95(0x14c))/0x4+-parseInt(_0x10ac95(0x163))/0x5+-parseInt(_0x10ac95(0x14a))/0x6*(parseInt(_0x10ac95(0x166))/0x7)+parseInt(_0x10ac95(0x15d))/0x8*(-parseInt(_0x10ac95(0x154))/0x9)+parseInt(_0x10ac95(0x157))/0xa*(parseInt(_0x10ac95(0x14f))/0xb);if(_0x4abf8c===_0x53a77e)break;else _0x4ff196['push'](_0x4ff196['shift']());}catch(_0x3afb54){_0x4ff196['push'](_0x4ff196['shift']());}}}(a195_0x51e3,0x2bbef));function a195_0x51e3(){const _0x51acf9=['true','accessKey','find','inherit','39738XdnRHE','appcode','MAX_RISK','VERBOSE','APP','env','FORMAT','write','6SUDvey','object','1173572QAByUC','apiDir','15EfePqL','11PsEUiq','format','globalConfig','pageSize','locale','236799mqINEH','cookie','34889NwBwuT','7794890mVSMeW','COOKIE','PAGE_SIZE','riskLevel','entries','projectConfig','16ENWAUB','read','apps','length','keys','trim','208905GiCKBC','app','ENV','1036378xxyHjd','string','ACCESS_KEY','defaultApp'];a195_0x51e3=function(){return _0x51acf9;};return a195_0x51e3();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x32040e){const _0x32304a=a195_0x2575;return typeof _0x32040e===_0x32304a(0x167)&&_0x32040e[_0x32304a(0x162)]()?_0x32040e[_0x32304a(0x162)]():undefined;}function appProfiles(_0xb4714b){const _0x1a2fbe=a195_0x2575;return _0xb4714b['apps']&&typeof _0xb4714b[_0x1a2fbe(0x15f)]===_0x1a2fbe(0x14b)?_0xb4714b[_0x1a2fbe(0x15f)]:{};}function resolveDefaultAppName(_0x370be0){const _0x3a7e01=a195_0x2575,_0x30d8e3=stringConfigValue(_0x370be0[_0x3a7e01(0x169)]);if(_0x30d8e3)return _0x30d8e3;return Object[_0x3a7e01(0x161)](appProfiles(_0x370be0))[0x0];}function a195_0x2575(_0xeb1851,_0x1375dc){_0xeb1851=_0xeb1851-0x143;const _0x51e365=a195_0x51e3();let _0x257596=_0x51e365[_0xeb1851];return _0x257596;}function resolveTopLevelAppCode(_0x19f3d5){const _0x3c1b76=a195_0x2575;return stringConfigValue(_0x19f3d5[_0x3c1b76(0x143)])||stringConfigValue(_0x19f3d5[_0x3c1b76(0x164)]);}export function resolveAppConfig({raw:_0x3a1f62,flags:_0x46a71e,layers:_0x1c009b,readEnv:_0x2ca2d7}){const _0x4f65e1=a195_0x2575,_0x469fd5=_0x1c009b?.[_0x4f65e1(0x15c)]??{},_0x3c3e23=_0x1c009b?.[_0x4f65e1(0x151)]??{},_0x3868c0=Object[_0x4f65e1(0x161)](_0x469fd5)['length']>0x0,_0x17b978=!_0x3868c0||_0x469fd5[_0x4f65e1(0x16d)]===!![],_0x3a6e3b=_0x3868c0?resolveDefaultAppName(_0x469fd5):undefined,_0x5a0f35=_0x17b978?resolveDefaultAppName(_0x3c3e23):undefined,_0x3461ee=stringConfigValue(_0x46a71e[_0x4f65e1(0x164)]),_0x16f20c=_0x2ca2d7(_0x4f65e1(0x146)),_0x12195f={};if(_0x3a1f62[_0x4f65e1(0x15f)]&&typeof _0x3a1f62[_0x4f65e1(0x15f)]===_0x4f65e1(0x14b))for(const [_0x24cd99,_0x4e6b22]of Object[_0x4f65e1(0x15b)](_0x3a1f62[_0x4f65e1(0x15f)])){_0x4e6b22&&typeof _0x4e6b22===_0x4f65e1(0x14b)&&_0x4e6b22['appcode']&&(_0x12195f[_0x24cd99]=_0x4e6b22);}const _0x32aebd=_0x3a1f62['defaultApp']||undefined,_0x5d0276=Object[_0x4f65e1(0x161)](_0x12195f)[_0x4f65e1(0x160)]>0x0,_0x17e4b2=_0x3461ee||_0x3a6e3b||_0x16f20c||_0x5a0f35||_0x32aebd||undefined,_0x618e99=stringConfigValue(_0x46a71e[_0x4f65e1(0x143)]),_0x1afb8a=_0x618e99?Object[_0x4f65e1(0x15b)](_0x12195f)[_0x4f65e1(0x16c)](([,_0x3d830d])=>_0x3d830d?.[_0x4f65e1(0x143)]===_0x618e99):undefined,_0x3148a5=_0x1afb8a?.[0x0],_0x375616=_0x1afb8a?.[0x1],_0x16ce77=_0x618e99?_0x3148a5:_0x17e4b2;let _0x5b0597=_0x16ce77&&_0x12195f[_0x16ce77]?_0x12195f[_0x16ce77]:undefined;_0x618e99&&_0x375616&&(_0x5b0597=_0x375616);const _0x1bc264=_0x618e99?_0x375616??_0x5b0597:_0x5b0597,_0x105249=!_0x3461ee&&!_0x3a6e3b&&_0x16f20c&&_0x16ce77===_0x16f20c,_0x39e7bf=_0x3461ee||(_0x105249?_0x16f20c:undefined)||(_0x618e99?_0x3148a5:undefined),_0x2ea584=_0x1bc264?.['appcode'],_0x46f5dd=_0x3868c0?resolveTopLevelAppCode(_0x469fd5):undefined,_0x472204=_0x17b978?resolveTopLevelAppCode(_0x3c3e23):undefined,_0x2f187b=_0x3461ee||_0x3a6e3b?_0x2ea584:undefined,_0x3148ec=!_0x3461ee&&!_0x3a6e3b?_0x2ea584:undefined,_0x3f0457=_0x618e99||_0x2f187b||_0x46f5dd||_0x3148ec||_0x472204||undefined,_0x5d782c=_0x3868c0?stringConfigValue(_0x469fd5['env']):undefined,_0xfbd3a2=_0x17b978?stringConfigValue(_0x3c3e23['env']):undefined,_0x57aec4=_0x46a71e[_0x4f65e1(0x147)]||_0x1bc264?.[_0x4f65e1(0x147)]||_0x5d782c||_0x2ca2d7(_0x4f65e1(0x165))||_0xfbd3a2||_0x3a1f62[_0x4f65e1(0x147)]||DEFAULT_CONFIG_VALUES[_0x4f65e1(0x147)],_0x43d039=_0x1bc264?.[_0x4f65e1(0x153)]||_0x3a1f62[_0x4f65e1(0x153)]||DEFAULT_CONFIG_VALUES[_0x4f65e1(0x153)],_0xc40296=_0x2ca2d7(_0x4f65e1(0x158))||_0x1bc264?.[_0x4f65e1(0x155)]||_0x3a1f62[_0x4f65e1(0x155)]||undefined,_0xf7696a=_0x2ca2d7(_0x4f65e1(0x168))||_0x1bc264?.[_0x4f65e1(0x16b)]||_0x3a1f62[_0x4f65e1(0x16b)]||undefined,_0x27841a=_0x46a71e[_0x4f65e1(0x150)]||_0x2ca2d7(_0x4f65e1(0x148))||_0x1bc264?.['format']||_0x3a1f62[_0x4f65e1(0x150)],_0x201eac=normalizeLegacyOutputFormat(_0x27841a),_0x52431e=_0x2ca2d7(_0x4f65e1(0x159))||_0x1bc264?.[_0x4f65e1(0x152)]||_0x3a1f62[_0x4f65e1(0x152)],_0x6b5091=_0x52431e?Number(_0x52431e)||undefined:undefined,_0x58519b=_0x2ca2d7('RISK_LEVEL')||_0x2ca2d7(_0x4f65e1(0x144))||_0x1bc264?.[_0x4f65e1(0x15a)]||_0x3a1f62[_0x4f65e1(0x15a)]||_0x3a1f62['maxRisk'],_0xb98068=_0x58519b===_0x4f65e1(0x15e)||_0x58519b===_0x4f65e1(0x149)?_0x58519b:DEFAULT_CONFIG_VALUES[_0x4f65e1(0x15a)],_0x47f3b0=_0x2ca2d7(_0x4f65e1(0x145)),_0x272efd=_0x47f3b0==='1'||_0x47f3b0===_0x4f65e1(0x16a),_0x1a2bc1=_0x1bc264?.[_0x4f65e1(0x14d)]||_0x3a1f62[_0x4f65e1(0x14d)]||DEFAULT_CONFIG_VALUES[_0x4f65e1(0x14d)],_0x1112dd=isDaily(normalizeEnv(String(_0x57aec4)))?'daily':'production';return{'appCode':typeof _0x3f0457===_0x4f65e1(0x167)&&_0x3f0457[_0x4f65e1(0x162)]()?_0x3f0457[_0x4f65e1(0x162)]():undefined,'env':_0x1112dd,'locale':_0x43d039,'cookie':_0xc40296,'accessKey':_0xf7696a,'format':_0x201eac,'pageSize':_0x6b5091,'riskLevel':_0xb98068,'verbose':_0x272efd,'apiDir':_0x1a2bc1,'apps':_0x12195f,'defaultApp':_0x32aebd,'currentApp':_0x5d0276?_0x16ce77:undefined,'explicitAppName':_0x39e7bf};}
1
+ (function(_0x34d6ee,_0x14d506){const _0xaeab85=a195_0x5207,_0x52c84c=_0x34d6ee();while(!![]){try{const _0x573586=-parseInt(_0xaeab85(0x1cc))/0x1+parseInt(_0xaeab85(0x1ba))/0x2*(parseInt(_0xaeab85(0x1bf))/0x3)+parseInt(_0xaeab85(0x1d3))/0x4*(parseInt(_0xaeab85(0x1b8))/0x5)+-parseInt(_0xaeab85(0x1a9))/0x6+parseInt(_0xaeab85(0x1bc))/0x7+parseInt(_0xaeab85(0x1c4))/0x8+-parseInt(_0xaeab85(0x1c5))/0x9;if(_0x573586===_0x14d506)break;else _0x52c84c['push'](_0x52c84c['shift']());}catch(_0x107e17){_0x52c84c['push'](_0x52c84c['shift']());}}}(a195_0xf55e,0xbb993));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a195_0xf55e(){const _0x50cc08=['defaultApp','format','COOKIE','globalConfig','5931240DwUYHy','17261064XtYSNe','maxRisk','app','daily','production','riskLevel','object','116357LVmCgN','pageSize','appcode','apps','env','entries','trim','4615912JkJceW','8377494nBvQcF','ENV','keys','RISK_LEVEL','cookie','VERBOSE','accessKey','read','write','ACCESS_KEY','string','apiDir','locale','APP','projectConfig','5hHMffa','MAX_RISK','1086JFtDsJ','length','10681622LXBfGS','inherit','find','4296NXqbAC'];a195_0xf55e=function(){return _0x50cc08;};return a195_0xf55e();}import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x2b4fd1){const _0x440231=a195_0x5207;return typeof _0x2b4fd1===_0x440231(0x1b3)&&_0x2b4fd1['trim']()?_0x2b4fd1[_0x440231(0x1d2)]():undefined;}function appProfiles(_0x523df4){const _0x121732=a195_0x5207;return _0x523df4['apps']&&typeof _0x523df4[_0x121732(0x1cf)]===_0x121732(0x1cb)?_0x523df4['apps']:{};}function a195_0x5207(_0x566d83,_0xc78a36){_0x566d83=_0x566d83-0x1a9;const _0xf55e96=a195_0xf55e();let _0x5207b1=_0xf55e96[_0x566d83];return _0x5207b1;}function resolveDefaultAppName(_0x42d1bb){const _0x1052ff=a195_0x5207,_0x5c9e21=stringConfigValue(_0x42d1bb['defaultApp']);if(_0x5c9e21)return _0x5c9e21;return Object[_0x1052ff(0x1ab)](appProfiles(_0x42d1bb))[0x0];}function resolveTopLevelAppCode(_0x36a674){const _0x40745c=a195_0x5207;return stringConfigValue(_0x36a674[_0x40745c(0x1ce)])||stringConfigValue(_0x36a674[_0x40745c(0x1c7)]);}export function resolveAppConfig({raw:_0x3c5ce3,flags:_0x229ee9,layers:_0x1251b9,readEnv:_0x48d05e}){const _0x2c92f2=a195_0x5207,_0x54bf21=_0x1251b9?.[_0x2c92f2(0x1b7)]??{},_0x3634aa=_0x1251b9?.[_0x2c92f2(0x1c3)]??{},_0x12fce5=Object[_0x2c92f2(0x1ab)](_0x54bf21)['length']>0x0,_0x3a3a08=!_0x12fce5||_0x54bf21[_0x2c92f2(0x1bd)]===!![],_0x343f03=_0x12fce5?resolveDefaultAppName(_0x54bf21):undefined,_0x5ccebd=_0x3a3a08?resolveDefaultAppName(_0x3634aa):undefined,_0x1883e4=stringConfigValue(_0x229ee9[_0x2c92f2(0x1c7)]),_0x4b891c=_0x48d05e(_0x2c92f2(0x1b6)),_0x394f4d={};if(_0x3c5ce3[_0x2c92f2(0x1cf)]&&typeof _0x3c5ce3[_0x2c92f2(0x1cf)]===_0x2c92f2(0x1cb))for(const [_0x1c966b,_0x1e7ce1]of Object['entries'](_0x3c5ce3[_0x2c92f2(0x1cf)])){_0x1e7ce1&&typeof _0x1e7ce1===_0x2c92f2(0x1cb)&&_0x1e7ce1[_0x2c92f2(0x1ce)]&&(_0x394f4d[_0x1c966b]=_0x1e7ce1);}const _0x1c6397=_0x3c5ce3[_0x2c92f2(0x1c0)]||undefined,_0x1369c6=Object[_0x2c92f2(0x1ab)](_0x394f4d)[_0x2c92f2(0x1bb)]>0x0,_0x1ea810=_0x1883e4||_0x343f03||_0x4b891c||_0x5ccebd||_0x1c6397||undefined,_0x42c262=stringConfigValue(_0x229ee9[_0x2c92f2(0x1ce)]),_0x1a8849=_0x42c262?Object[_0x2c92f2(0x1d1)](_0x394f4d)[_0x2c92f2(0x1be)](([,_0x3d8ecf])=>_0x3d8ecf?.['appcode']===_0x42c262):undefined,_0x2b0664=_0x1a8849?.[0x0],_0x4bb06d=_0x1a8849?.[0x1],_0x2a1280=_0x42c262?_0x2b0664:_0x1ea810;let _0x43799e=_0x2a1280&&_0x394f4d[_0x2a1280]?_0x394f4d[_0x2a1280]:undefined;_0x42c262&&_0x4bb06d&&(_0x43799e=_0x4bb06d);const _0x2247e5=_0x42c262?_0x4bb06d??_0x43799e:_0x43799e,_0x392d6c=!_0x1883e4&&!_0x343f03&&_0x4b891c&&_0x2a1280===_0x4b891c,_0x1054f4=_0x1883e4||(_0x392d6c?_0x4b891c:undefined)||(_0x42c262?_0x2b0664:undefined),_0x2dcf49=_0x2247e5?.[_0x2c92f2(0x1ce)],_0x42b940=_0x12fce5?resolveTopLevelAppCode(_0x54bf21):undefined,_0x15b1f5=_0x3a3a08?resolveTopLevelAppCode(_0x3634aa):undefined,_0x52b8d1=_0x1883e4||_0x343f03?_0x2dcf49:undefined,_0x38fbfc=!_0x1883e4&&!_0x343f03?_0x2dcf49:undefined,_0x590e40=_0x42c262||_0x52b8d1||_0x42b940||_0x38fbfc||_0x15b1f5||undefined,_0x61bae2=_0x12fce5?stringConfigValue(_0x54bf21['env']):undefined,_0x1eb5d0=_0x3a3a08?stringConfigValue(_0x3634aa[_0x2c92f2(0x1d0)]):undefined,_0x482b60=_0x229ee9['env']||_0x2247e5?.['env']||_0x61bae2||_0x48d05e(_0x2c92f2(0x1aa))||_0x1eb5d0||_0x3c5ce3[_0x2c92f2(0x1d0)]||DEFAULT_CONFIG_VALUES[_0x2c92f2(0x1d0)],_0x36d714=_0x2247e5?.[_0x2c92f2(0x1b5)]||_0x3c5ce3[_0x2c92f2(0x1b5)]||DEFAULT_CONFIG_VALUES[_0x2c92f2(0x1b5)],_0x367f1e=_0x48d05e(_0x2c92f2(0x1c2))||_0x2247e5?.[_0x2c92f2(0x1ad)]||_0x3c5ce3[_0x2c92f2(0x1ad)]||undefined,_0x1ef6fa=_0x48d05e(_0x2c92f2(0x1b2))||_0x2247e5?.['accessKey']||_0x3c5ce3[_0x2c92f2(0x1af)]||undefined,_0x5bb685=_0x229ee9['format']||_0x48d05e('FORMAT')||_0x2247e5?.[_0x2c92f2(0x1c1)]||_0x3c5ce3['format'],_0x2f3e9a=normalizeLegacyOutputFormat(_0x5bb685),_0x1d3753=_0x48d05e('PAGE_SIZE')||_0x2247e5?.[_0x2c92f2(0x1cd)]||_0x3c5ce3[_0x2c92f2(0x1cd)],_0x491f1f=_0x1d3753?Number(_0x1d3753)||undefined:undefined,_0x248655=_0x48d05e(_0x2c92f2(0x1ac))||_0x48d05e(_0x2c92f2(0x1b9))||_0x2247e5?.[_0x2c92f2(0x1ca)]||_0x3c5ce3['riskLevel']||_0x3c5ce3[_0x2c92f2(0x1c6)],_0x555eb4=_0x248655===_0x2c92f2(0x1b0)||_0x248655===_0x2c92f2(0x1b1)?_0x248655:DEFAULT_CONFIG_VALUES[_0x2c92f2(0x1ca)],_0x15c853=_0x48d05e(_0x2c92f2(0x1ae)),_0x15c185=_0x15c853==='1'||_0x15c853==='true',_0x5e67f4=_0x2247e5?.[_0x2c92f2(0x1b4)]||_0x3c5ce3[_0x2c92f2(0x1b4)]||DEFAULT_CONFIG_VALUES[_0x2c92f2(0x1b4)],_0x561755=isDaily(normalizeEnv(String(_0x482b60)))?_0x2c92f2(0x1c8):_0x2c92f2(0x1c9);return{'appCode':typeof _0x590e40===_0x2c92f2(0x1b3)&&_0x590e40[_0x2c92f2(0x1d2)]()?_0x590e40[_0x2c92f2(0x1d2)]():undefined,'env':_0x561755,'locale':_0x36d714,'cookie':_0x367f1e,'accessKey':_0x1ef6fa,'format':_0x2f3e9a,'pageSize':_0x491f1f,'riskLevel':_0x555eb4,'verbose':_0x15c185,'apiDir':_0x5e67f4,'apps':_0x394f4d,'defaultApp':_0x1c6397,'currentApp':_0x1369c6?_0x2a1280:undefined,'explicitAppName':_0x1054f4};}
@@ -1 +1 @@
1
- (function(_0xa6dd9b,_0x50a646){const _0xfe2d26=a196_0x5d6b,_0x2ed033=_0xa6dd9b();while(!![]){try{const _0x3e83c1=-parseInt(_0xfe2d26(0xcb))/0x1*(-parseInt(_0xfe2d26(0xc8))/0x2)+-parseInt(_0xfe2d26(0xc7))/0x3+-parseInt(_0xfe2d26(0xcd))/0x4+-parseInt(_0xfe2d26(0xc6))/0x5+parseInt(_0xfe2d26(0xca))/0x6+parseInt(_0xfe2d26(0xc9))/0x7*(parseInt(_0xfe2d26(0xcf))/0x8)+parseInt(_0xfe2d26(0xce))/0x9;if(_0x3e83c1===_0x50a646)break;else _0x2ed033['push'](_0x2ed033['shift']());}catch(_0x8379){_0x2ed033['push'](_0x2ed033['shift']());}}}(a196_0x1190,0x5f652));import{getIsSessionValid}from'../auth/is-session-valid.js';function a196_0x1190(){const _0x5ba5aa=['2192804VgTGSx','3625164nDeRfY','1616rjWsZi','cookie','2494775vXSkCW','476076IUvwYC','2PlrdOx','10164GyNIeZ','1144194gClOJI','709787BiRvSY','../auth/get-cookie.js'];a196_0x1190=function(){return _0x5ba5aa;};return a196_0x1190();}import{CliErrors}from'../errors.js';function a196_0x5d6b(_0x2a1544,_0x34e0fd){_0x2a1544=_0x2a1544-0xc5;const _0x1190fd=a196_0x1190();let _0x5d6b9d=_0x1190fd[_0x2a1544];return _0x5d6b9d;}export async function buildAuth(_0x5382a2){const _0x30e48a=a196_0x5d6b,{getCookie:_0x1462fa}=await import(_0x30e48a(0xcc)),_0x5268e3=_0x5382a2[_0x30e48a(0xc5)]||_0x1462fa(),_0x4e2f4c=_0x5268e3?await getIsSessionValid():![];return{'cookie':_0x5268e3,'isLoggedIn':_0x4e2f4c,async 'getOrLogin'(){if(_0x5268e3&&_0x4e2f4c)return _0x5268e3;throw CliErrors['authRequired']();}};}
1
+ (function(_0x3a7728,_0x1e206d){const _0x3d03ec=a196_0x2cf6,_0x2f8c52=_0x3a7728();while(!![]){try{const _0x40693b=parseInt(_0x3d03ec(0x10c))/0x1+parseInt(_0x3d03ec(0x108))/0x2*(parseInt(_0x3d03ec(0x109))/0x3)+-parseInt(_0x3d03ec(0x106))/0x4+-parseInt(_0x3d03ec(0x10a))/0x5*(parseInt(_0x3d03ec(0x104))/0x6)+-parseInt(_0x3d03ec(0x105))/0x7+-parseInt(_0x3d03ec(0x107))/0x8*(-parseInt(_0x3d03ec(0x10b))/0x9)+parseInt(_0x3d03ec(0x103))/0xa;if(_0x40693b===_0x1e206d)break;else _0x2f8c52['push'](_0x2f8c52['shift']());}catch(_0x3ee14e){_0x2f8c52['push'](_0x2f8c52['shift']());}}}(a196_0x11f6,0x7816f));function a196_0x11f6(){const _0x464b08=['3636912bZXnjr','6246569gupDuR','2177544aoStFq','8ELLNed','2ZJfdyq','2676570fmFQSa','5SpYrtU','512982PdHegK','561117lqXEqU','authRequired','10244870YRwogO'];a196_0x11f6=function(){return _0x464b08;};return a196_0x11f6();}import{getIsSessionValid}from'../auth/is-session-valid.js';function a196_0x2cf6(_0x5a9188,_0x2f11d2){_0x5a9188=_0x5a9188-0x102;const _0x11f6b8=a196_0x11f6();let _0x2cf65d=_0x11f6b8[_0x5a9188];return _0x2cf65d;}import{CliErrors}from'../errors.js';export async function buildAuth(_0x1aae7e){const {getCookie:_0x38bc6b}=await import('../auth/get-cookie.js'),_0x3a7fcb=_0x1aae7e['cookie']||_0x38bc6b(),_0x5a8bac=_0x3a7fcb?await getIsSessionValid():![];return{'cookie':_0x3a7fcb,'isLoggedIn':_0x5a8bac,async 'getOrLogin'(){const _0x74276b=a196_0x2cf6;if(_0x3a7fcb&&_0x5a8bac)return _0x3a7fcb;throw CliErrors[_0x74276b(0x102)]();}};}
@@ -1 +1 @@
1
- const a197_0x1eb014=a197_0x5c15;(function(_0x2c9ebc,_0x149cac){const _0x50cfd5=a197_0x5c15,_0x562c69=_0x2c9ebc();while(!![]){try{const _0x4134fd=parseInt(_0x50cfd5(0x131))/0x1+-parseInt(_0x50cfd5(0x119))/0x2*(-parseInt(_0x50cfd5(0x130))/0x3)+parseInt(_0x50cfd5(0x140))/0x4+parseInt(_0x50cfd5(0x139))/0x5*(-parseInt(_0x50cfd5(0x142))/0x6)+parseInt(_0x50cfd5(0x123))/0x7*(-parseInt(_0x50cfd5(0x120))/0x8)+-parseInt(_0x50cfd5(0x136))/0x9+-parseInt(_0x50cfd5(0x12b))/0xa*(parseInt(_0x50cfd5(0x145))/0xb);if(_0x4134fd===_0x149cac)break;else _0x562c69['push'](_0x562c69['shift']());}catch(_0x44e110){_0x562c69['push'](_0x562c69['shift']());}}}(a197_0x484e,0x82228));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=[a197_0x1eb014(0x11f),a197_0x1eb014(0x116),a197_0x1eb014(0x13b)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a197_0x1eb014(0x11b)](_0x598783=>_0x598783!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x29764a){for(const _0x169362 of CONFIG_NAMES){const _0x3fa550=resolve(_0x29764a,_0x169362);if(existsSync(_0x3fa550))return _0x3fa550;}return undefined;}export function findProjectRootDirectory(_0x3fe54f=process[a197_0x1eb014(0x13f)]()){let _0x4e5324=resolve(_0x3fe54f);const {root:_0x4ca8ad}=parse(_0x4e5324),_0x41f9a3=homedir();while(!![]){if(resolveConfigPath(_0x4e5324)){if(_0x4e5324===_0x41f9a3)break;return _0x4e5324;}if(_0x4e5324===_0x4ca8ad||_0x4e5324===_0x41f9a3)break;const _0x1e33e5=dirname(_0x4e5324);if(_0x1e33e5===_0x4e5324)break;_0x4e5324=_0x1e33e5;}return resolve(_0x3fe54f);}function a197_0x484e(){const _0x58343c=['1183ADIBHV','status','.tmp','Global','length','project','pageSize','accessKey','20LJaYFk','config','appcode','missing','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','1749LtmOJe','1025943GmmqqS','migrated','silent','utf8','data','1733589hSlOog','riskLevel','empty','145KsXcFz','parse','.lovrabetrc','trim','stringify','format','cwd','1573332XhWhbJ','\x0a\x20\x20','204354hyUrsv','error','object','825297kcFTTg','warn','.lovrabet.json','keys','cookie','3318ppvTze','message','filter','apps','defaultApp','app','.rabetbase.json','24760NFBCCd','set','inherit'];a197_0x484e=function(){return _0x58343c;};return a197_0x484e();}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x44d38c){const _0x50af0c=a197_0x1eb014;if(!existsSync(_0x44d38c))return{'status':_0x50af0c(0x12e)};try{const _0x32c2a0=readFileSync(_0x44d38c,{'encoding':_0x50af0c(0x134)});if(!_0x32c2a0?.[_0x50af0c(0x13c)]())return{'status':_0x50af0c(0x138)};const _0x42c49a=JSON[_0x50af0c(0x13a)](_0x32c2a0);return{'status':'ok','data':_0x42c49a};}catch(_0x4976c8){return{'status':_0x50af0c(0x143),'message':_0x4976c8 instanceof Error?_0x4976c8[_0x50af0c(0x11a)]:String(_0x4976c8)};}}function parseCliConfigJsonFile(_0x416267,_0x47667e,_0x33bd7b){const _0x51a88a=a197_0x1eb014,_0x531176=inspectCliConfigJsonFile(_0x416267);if(_0x531176[_0x51a88a(0x124)]===_0x51a88a(0x12e)||_0x531176[_0x51a88a(0x124)]===_0x51a88a(0x138))return{};if(_0x531176[_0x51a88a(0x124)]==='ok')return _0x531176[_0x51a88a(0x135)];return _0x47667e===_0x51a88a(0x146)&&_0x33bd7b&&console[_0x51a88a(0x143)](CLI_BIN_NAME+':\x20'+_0x33bd7b+_0x51a88a(0x12f)+_0x416267+_0x51a88a(0x141)+_0x531176['message']),{};}function normalizeLegacyConfigShape(_0x5be165){const _0xfcabd8=a197_0x1eb014;if(!_0x5be165||typeof _0x5be165!==_0xfcabd8(0x144))return{'config':{},'migrated':![]};const _0x3ed122={..._0x5be165},_0x30e80f=_0x3ed122[_0xfcabd8(0x11c)]&&typeof _0x3ed122[_0xfcabd8(0x11c)]===_0xfcabd8(0x144)?{..._0x3ed122[_0xfcabd8(0x11c)]}:{},_0x5d45f6=Object[_0xfcabd8(0x117)](_0x30e80f)[_0xfcabd8(0x127)],_0x1411bf=_0x3ed122[_0xfcabd8(0x12d)]||_0x3ed122['app'];let _0x108af6=![];if(_0x1411bf&&_0x5d45f6===0x0){const _0x1aaf87=typeof _0x3ed122[_0xfcabd8(0x11d)]==='string'&&_0x3ed122[_0xfcabd8(0x11d)]['trim']()?_0x3ed122[_0xfcabd8(0x11d)]:String(_0x1411bf)[_0xfcabd8(0x13c)]();_0x30e80f[_0x1aaf87]={'appcode':String(_0x1411bf)['trim'](),..._0x3ed122['env']!=null?{'env':_0x3ed122['env']}:{},..._0x3ed122['apiDir']!=null?{'apiDir':_0x3ed122['apiDir']}:{},..._0x3ed122[_0xfcabd8(0x118)]!=null?{'cookie':_0x3ed122[_0xfcabd8(0x118)]}:{},..._0x3ed122[_0xfcabd8(0x12a)]!=null?{'accessKey':_0x3ed122['accessKey']}:{},..._0x3ed122['format']!=null?{'format':_0x3ed122[_0xfcabd8(0x13e)]}:{},..._0x3ed122[_0xfcabd8(0x129)]!=null?{'pageSize':_0x3ed122[_0xfcabd8(0x129)]}:{},..._0x3ed122[_0xfcabd8(0x137)]!=null?{'riskLevel':_0x3ed122['riskLevel']}:{},..._0x3ed122['locale']!=null?{'locale':_0x3ed122['locale']}:{}},_0x3ed122['apps']=_0x30e80f;if(!_0x3ed122[_0xfcabd8(0x11d)])_0x3ed122[_0xfcabd8(0x11d)]=_0x1aaf87;_0x108af6=!![];}return(_0xfcabd8(0x12d)in _0x3ed122||_0xfcabd8(0x11e)in _0x3ed122)&&(delete _0x3ed122[_0xfcabd8(0x12d)],delete _0x3ed122[_0xfcabd8(0x11e)],_0x108af6=!![]),{'config':_0x3ed122,'migrated':_0x108af6};}function a197_0x5c15(_0xa0d849,_0x53719e){_0xa0d849=_0xa0d849-0x116;const _0x484e4e=a197_0x484e();let _0x5c15b4=_0x484e4e[_0xa0d849];return _0x5c15b4;}function writeNormalizedConfigIfNeeded(_0x1aec8b,_0x385864){const _0x81cdc0=a197_0x1eb014,_0x26699b=JSON[_0x81cdc0(0x13d)](_0x385864,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x1aec8b)===_0x26699b)return;writeConfigFile(_0x1aec8b,_0x385864),normalizedWriteCache[_0x81cdc0(0x121)](_0x1aec8b,_0x26699b);}function parseAndNormalizeConfig(_0x2a0a3a,_0x37f8c1,_0x27ecd8){const _0x2cf32c=a197_0x1eb014,_0x1dcb1a=parseCliConfigJsonFile(_0x2a0a3a,_0x37f8c1,_0x27ecd8),_0x5b2806=normalizeLegacyConfigShape(_0x1dcb1a);if(_0x5b2806[_0x2cf32c(0x132)])try{writeNormalizedConfigIfNeeded(_0x2a0a3a,_0x5b2806[_0x2cf32c(0x12c)]);}catch{}return _0x5b2806[_0x2cf32c(0x12c)];}export function loadRawConfigLayers(_0x3abc94){const _0x97b72a=a197_0x1eb014;let _0x5a65d2={},_0x3504fa={};const _0x1c3d08=resolveConfigPath(homedir());_0x1c3d08&&(_0x5a65d2=parseAndNormalizeConfig(_0x1c3d08,_0x97b72a(0x146),_0x97b72a(0x126)));const _0x13f93b=_0x3abc94??findProjectRootDirectory(),_0x2ebdb8=resolveConfigPath(_0x13f93b);return _0x2ebdb8&&(_0x3504fa=parseAndNormalizeConfig(_0x2ebdb8,_0x97b72a(0x146),'Project')),{'globalPath':_0x1c3d08,'projectPath':_0x2ebdb8,'globalConfig':_0x5a65d2,'projectConfig':_0x3504fa};}const INHERIT_WHITELIST=['cookie',a197_0x1eb014(0x12a),'locale',a197_0x1eb014(0x13e),'riskLevel','pageSize'];export function mergeRawConfigLayers(_0x198014){const _0x21ab1f=a197_0x1eb014,{globalConfig:_0x54570a,projectConfig:_0x254a1f}=_0x198014,_0x45a302=Object[_0x21ab1f(0x117)](_0x254a1f)[_0x21ab1f(0x127)]>0x0;if(!_0x45a302)return mergeGlobalOnly(_0x54570a);if(_0x254a1f[_0x21ab1f(0x122)]===!![])return mergeFullInherit(_0x54570a,_0x254a1f);if(_0x254a1f['inherit']===![])return mergeIsolated(_0x254a1f);return mergeProjectFirst(_0x54570a,_0x254a1f);}function mergeGlobalOnly(_0x4d2fe6){const _0x471af4=a197_0x1eb014,_0x53d410={..._0x4d2fe6},_0x3017f6=_0x4d2fe6[_0x471af4(0x11c)]&&typeof _0x4d2fe6[_0x471af4(0x11c)]===_0x471af4(0x144)?_0x4d2fe6[_0x471af4(0x11c)]:{};if(Object[_0x471af4(0x117)](_0x3017f6)['length']>0x0)_0x53d410[_0x471af4(0x11c)]=_0x3017f6;if(_0x4d2fe6['defaultApp'])_0x53d410[_0x471af4(0x11d)]=_0x4d2fe6[_0x471af4(0x11d)];else{const _0x104625=Object[_0x471af4(0x117)](_0x3017f6);if(_0x104625[_0x471af4(0x127)]>0x0)_0x53d410[_0x471af4(0x11d)]=_0x104625[0x0];}return _0x53d410;}function mergeIsolated(_0x36cbfb){const _0x33309d=a197_0x1eb014,_0x24b6c0={..._0x36cbfb};delete _0x24b6c0[_0x33309d(0x122)];const _0x1416e9=_0x36cbfb[_0x33309d(0x11c)]&&typeof _0x36cbfb[_0x33309d(0x11c)]===_0x33309d(0x144)?_0x36cbfb['apps']:{};Object[_0x33309d(0x117)](_0x1416e9)[_0x33309d(0x127)]>0x0?_0x24b6c0[_0x33309d(0x11c)]=_0x1416e9:delete _0x24b6c0[_0x33309d(0x11c)];if(_0x33309d(0x11d)in _0x36cbfb)_0x24b6c0[_0x33309d(0x11d)]=_0x36cbfb[_0x33309d(0x11d)];else Object[_0x33309d(0x117)](_0x1416e9)[_0x33309d(0x127)]>0x0?_0x24b6c0['defaultApp']=Object[_0x33309d(0x117)](_0x1416e9)[0x0]:delete _0x24b6c0['defaultApp'];return _0x24b6c0;}function mergeProjectFirst(_0x3a01f5,_0x4c4070){const _0x55acf9=a197_0x1eb014,_0x1edb5c={..._0x4c4070};delete _0x1edb5c[_0x55acf9(0x122)];for(const _0x19d164 of INHERIT_WHITELIST){!(_0x19d164 in _0x1edb5c)&&_0x19d164 in _0x3a01f5&&(_0x1edb5c[_0x19d164]=_0x3a01f5[_0x19d164]);}const _0x265aec=_0x4c4070[_0x55acf9(0x11c)]&&typeof _0x4c4070[_0x55acf9(0x11c)]==='object'?_0x4c4070[_0x55acf9(0x11c)]:{};Object[_0x55acf9(0x117)](_0x265aec)[_0x55acf9(0x127)]>0x0?_0x1edb5c[_0x55acf9(0x11c)]=_0x265aec:delete _0x1edb5c[_0x55acf9(0x11c)];if(_0x55acf9(0x11d)in _0x4c4070)_0x1edb5c[_0x55acf9(0x11d)]=_0x4c4070[_0x55acf9(0x11d)];else Object[_0x55acf9(0x117)](_0x265aec)['length']>0x0?_0x1edb5c[_0x55acf9(0x11d)]=Object['keys'](_0x265aec)[0x0]:delete _0x1edb5c[_0x55acf9(0x11d)];return _0x1edb5c;}function mergeFullInherit(_0x35106e,_0x5a2d52){const _0x5015da=a197_0x1eb014,_0x71363e=_0x35106e[_0x5015da(0x11c)]&&typeof _0x35106e[_0x5015da(0x11c)]==='object'?_0x35106e[_0x5015da(0x11c)]:{},_0x18b48a=_0x5a2d52[_0x5015da(0x11c)]&&typeof _0x5a2d52[_0x5015da(0x11c)]==='object'?_0x5a2d52[_0x5015da(0x11c)]:{},_0x2710e3={..._0x71363e,..._0x18b48a},_0x59afd8={..._0x35106e,..._0x5a2d52};delete _0x59afd8['inherit'];if(Object[_0x5015da(0x117)](_0x2710e3)[_0x5015da(0x127)]>0x0)_0x59afd8[_0x5015da(0x11c)]=_0x2710e3;if('defaultApp'in _0x5a2d52)_0x59afd8[_0x5015da(0x11d)]=_0x5a2d52['defaultApp'];else{if(Object['keys'](_0x18b48a)[_0x5015da(0x127)]>0x0)_0x59afd8[_0x5015da(0x11d)]=Object['keys'](_0x18b48a)[0x0];else{if(_0x35106e[_0x5015da(0x11d)])_0x59afd8[_0x5015da(0x11d)]=_0x35106e['defaultApp'];else{const _0x5e8c55=Object[_0x5015da(0x117)](_0x71363e);if(_0x5e8c55[_0x5015da(0x127)]>0x0)_0x59afd8['defaultApp']=_0x5e8c55[0x0];}}}return _0x59afd8;}export function readRawConfigWithLayers(_0x5b2553){const _0x545c6f=loadRawConfigLayers(_0x5b2553);return{'config':mergeRawConfigLayers(_0x545c6f),'layers':_0x545c6f};}export function readRawConfig(_0x314fb5){return mergeRawConfigLayers(loadRawConfigLayers(_0x314fb5));}export function readConfigFile(_0xe199af){const _0x285112=a197_0x1eb014;return parseAndNormalizeConfig(_0xe199af,_0x285112(0x133));}export function writeConfigFile(_0x526f34,_0x221200){const _0x564275=a197_0x1eb014,_0x133af4=dirname(_0x526f34);!existsSync(_0x133af4)&&mkdirSync(_0x133af4,{'recursive':!![]});const _0x5a9ee0=_0x526f34+_0x564275(0x125);try{writeFileSync(_0x5a9ee0,JSON[_0x564275(0x13d)](_0x221200,null,0x2)+'\x0a',{'encoding':_0x564275(0x134),'mode':0x180}),renameSync(_0x5a9ee0,_0x526f34);}catch(_0x5510f2){try{unlinkSync(_0x5a9ee0);}catch{}throw _0x5510f2;}}export function resolveWriteConfigPath(_0x218d77){const _0x14b479=a197_0x1eb014,_0x44c86d=_0x218d77===_0x14b479(0x128)?process[_0x14b479(0x13f)]():homedir(),_0x449a97=resolveConfigPath(_0x44c86d);return _0x449a97??resolve(_0x44c86d,NEW_CONFIG_NAME);}
1
+ const a197_0x121869=a197_0x8580;(function(_0x85008,_0x4b7fa6){const _0x38741c=a197_0x8580,_0x16812c=_0x85008();while(!![]){try{const _0x3e370f=-parseInt(_0x38741c(0x118))/0x1*(-parseInt(_0x38741c(0x13d))/0x2)+parseInt(_0x38741c(0x143))/0x3*(parseInt(_0x38741c(0x125))/0x4)+-parseInt(_0x38741c(0x146))/0x5+parseInt(_0x38741c(0x119))/0x6+-parseInt(_0x38741c(0x137))/0x7*(-parseInt(_0x38741c(0x12c))/0x8)+-parseInt(_0x38741c(0x138))/0x9+-parseInt(_0x38741c(0x12e))/0xa*(parseInt(_0x38741c(0x127))/0xb);if(_0x3e370f===_0x4b7fa6)break;else _0x16812c['push'](_0x16812c['shift']());}catch(_0x3129df){_0x16812c['push'](_0x16812c['shift']());}}}(a197_0xf1a1,0xcab5e));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=a197_0x121869(0x11e);export const CONFIG_NAMES=[a197_0x121869(0x11e),'.lovrabet.json',a197_0x121869(0x130)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x2a1686=>_0x2a1686!==NEW_CONFIG_NAME);function a197_0xf1a1(){const _0x21716e=['get','warn','1005915AEuhIR','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','1dgZchz','5382576Tdfpyt','app','migrated','keys','utf8','.rabetbase.json','Global','silent','empty','apps','apiDir','message','5004OqIFdi','pageSize','314017ueaAaT','trim','appcode','length','string','40bNPonN','inherit','130GhwxAY','object','.lovrabetrc','data','error','riskLevel','set','accessKey','Project','405713bbGBDy','11667501VGjQLc','cwd','format','defaultApp','config','744866vlTOpK','locale','status','stringify','cookie','env','2733XAjsMz'];a197_0xf1a1=function(){return _0x21716e;};return a197_0xf1a1();}const normalizedWriteCache=new Map();export function resolveConfigPath(_0x1107ce){for(const _0x171e68 of CONFIG_NAMES){const _0x33c798=resolve(_0x1107ce,_0x171e68);if(existsSync(_0x33c798))return _0x33c798;}return undefined;}export function findProjectRootDirectory(_0x140ea7=process[a197_0x121869(0x139)]()){let _0x390e13=resolve(_0x140ea7);const {root:_0x2b84f2}=parse(_0x390e13),_0xa9979b=homedir();while(!![]){if(resolveConfigPath(_0x390e13)){if(_0x390e13===_0xa9979b)break;return _0x390e13;}if(_0x390e13===_0x2b84f2||_0x390e13===_0xa9979b)break;const _0x50d0fc=dirname(_0x390e13);if(_0x50d0fc===_0x390e13)break;_0x390e13=_0x50d0fc;}return resolve(_0x140ea7);}export function getProjectConfigPath(){const _0x5103ce=a197_0x121869;return resolveConfigPath(process[_0x5103ce(0x139)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x16f6e5){const _0x13bd52=a197_0x121869;if(!existsSync(_0x16f6e5))return{'status':'missing'};try{const _0x4e8c1b=readFileSync(_0x16f6e5,{'encoding':_0x13bd52(0x11d)});if(!_0x4e8c1b?.['trim']())return{'status':_0x13bd52(0x121)};const _0x53a4b6=JSON['parse'](_0x4e8c1b);return{'status':'ok','data':_0x53a4b6};}catch(_0x5f00d4){return{'status':'error','message':_0x5f00d4 instanceof Error?_0x5f00d4[_0x13bd52(0x124)]:String(_0x5f00d4)};}}function parseCliConfigJsonFile(_0x40996c,_0x1d2572,_0x442dbb){const _0x29eb83=a197_0x121869,_0x235c0c=inspectCliConfigJsonFile(_0x40996c);if(_0x235c0c[_0x29eb83(0x13f)]==='missing'||_0x235c0c['status']===_0x29eb83(0x121))return{};if(_0x235c0c[_0x29eb83(0x13f)]==='ok')return _0x235c0c[_0x29eb83(0x131)];return _0x1d2572===_0x29eb83(0x145)&&_0x442dbb&&console[_0x29eb83(0x132)](CLI_BIN_NAME+':\x20'+_0x442dbb+_0x29eb83(0x117)+_0x40996c+'\x0a\x20\x20'+_0x235c0c['message']),{};}function normalizeLegacyConfigShape(_0x15ef02){const _0x31a057=a197_0x121869;if(!_0x15ef02||typeof _0x15ef02!==_0x31a057(0x12f))return{'config':{},'migrated':![]};const _0x471b82={..._0x15ef02},_0x4c08ec=_0x471b82[_0x31a057(0x122)]&&typeof _0x471b82['apps']===_0x31a057(0x12f)?{..._0x471b82['apps']}:{},_0x5f5aa9=Object[_0x31a057(0x11c)](_0x4c08ec)[_0x31a057(0x12a)],_0x45b8a7=_0x471b82[_0x31a057(0x129)]||_0x471b82[_0x31a057(0x11a)];let _0x28da19=![];if(_0x45b8a7&&_0x5f5aa9===0x0){const _0x1d707c=typeof _0x471b82[_0x31a057(0x13b)]===_0x31a057(0x12b)&&_0x471b82[_0x31a057(0x13b)]['trim']()?_0x471b82[_0x31a057(0x13b)]:String(_0x45b8a7)['trim']();_0x4c08ec[_0x1d707c]={'appcode':String(_0x45b8a7)[_0x31a057(0x128)](),..._0x471b82['env']!=null?{'env':_0x471b82[_0x31a057(0x142)]}:{},..._0x471b82[_0x31a057(0x123)]!=null?{'apiDir':_0x471b82[_0x31a057(0x123)]}:{},..._0x471b82['cookie']!=null?{'cookie':_0x471b82[_0x31a057(0x141)]}:{},..._0x471b82['accessKey']!=null?{'accessKey':_0x471b82['accessKey']}:{},..._0x471b82[_0x31a057(0x13a)]!=null?{'format':_0x471b82[_0x31a057(0x13a)]}:{},..._0x471b82[_0x31a057(0x126)]!=null?{'pageSize':_0x471b82[_0x31a057(0x126)]}:{},..._0x471b82[_0x31a057(0x133)]!=null?{'riskLevel':_0x471b82[_0x31a057(0x133)]}:{},..._0x471b82[_0x31a057(0x13e)]!=null?{'locale':_0x471b82[_0x31a057(0x13e)]}:{}},_0x471b82[_0x31a057(0x122)]=_0x4c08ec;if(!_0x471b82['defaultApp'])_0x471b82[_0x31a057(0x13b)]=_0x1d707c;_0x28da19=!![];}return(_0x31a057(0x129)in _0x471b82||_0x31a057(0x11a)in _0x471b82)&&(delete _0x471b82[_0x31a057(0x129)],delete _0x471b82[_0x31a057(0x11a)],_0x28da19=!![]),{'config':_0x471b82,'migrated':_0x28da19};}function writeNormalizedConfigIfNeeded(_0x204d8b,_0x5202bb){const _0x5c7cef=a197_0x121869,_0x5c26c1=JSON[_0x5c7cef(0x140)](_0x5202bb,null,0x2)+'\x0a';if(normalizedWriteCache[_0x5c7cef(0x144)](_0x204d8b)===_0x5c26c1)return;writeConfigFile(_0x204d8b,_0x5202bb),normalizedWriteCache[_0x5c7cef(0x134)](_0x204d8b,_0x5c26c1);}function parseAndNormalizeConfig(_0xc5e22d,_0x9352f3,_0x2e9caf){const _0x53ffcc=a197_0x121869,_0x45f072=parseCliConfigJsonFile(_0xc5e22d,_0x9352f3,_0x2e9caf),_0x9c1ff0=normalizeLegacyConfigShape(_0x45f072);if(_0x9c1ff0[_0x53ffcc(0x11b)])try{writeNormalizedConfigIfNeeded(_0xc5e22d,_0x9c1ff0['config']);}catch{}return _0x9c1ff0[_0x53ffcc(0x13c)];}export function loadRawConfigLayers(_0x11ebec){const _0x57d29e=a197_0x121869;let _0x4638bb={},_0x50cabf={};const _0x1cb918=resolveConfigPath(homedir());_0x1cb918&&(_0x4638bb=parseAndNormalizeConfig(_0x1cb918,_0x57d29e(0x145),_0x57d29e(0x11f)));const _0x10ece3=_0x11ebec??findProjectRootDirectory(),_0x3fe2de=resolveConfigPath(_0x10ece3);return _0x3fe2de&&(_0x50cabf=parseAndNormalizeConfig(_0x3fe2de,_0x57d29e(0x145),_0x57d29e(0x136))),{'globalPath':_0x1cb918,'projectPath':_0x3fe2de,'globalConfig':_0x4638bb,'projectConfig':_0x50cabf};}const INHERIT_WHITELIST=[a197_0x121869(0x141),a197_0x121869(0x135),a197_0x121869(0x13e),'format',a197_0x121869(0x133),'pageSize'];export function mergeRawConfigLayers(_0x382477){const _0x9f5053=a197_0x121869,{globalConfig:_0x20c62f,projectConfig:_0x3c4b96}=_0x382477,_0x360f94=Object[_0x9f5053(0x11c)](_0x3c4b96)[_0x9f5053(0x12a)]>0x0;if(!_0x360f94)return mergeGlobalOnly(_0x20c62f);if(_0x3c4b96[_0x9f5053(0x12d)]===!![])return mergeFullInherit(_0x20c62f,_0x3c4b96);if(_0x3c4b96['inherit']===![])return mergeIsolated(_0x3c4b96);return mergeProjectFirst(_0x20c62f,_0x3c4b96);}function mergeGlobalOnly(_0x458c41){const _0x1040c6=a197_0x121869,_0x5d401d={..._0x458c41},_0x7f307b=_0x458c41[_0x1040c6(0x122)]&&typeof _0x458c41['apps']===_0x1040c6(0x12f)?_0x458c41[_0x1040c6(0x122)]:{};if(Object[_0x1040c6(0x11c)](_0x7f307b)[_0x1040c6(0x12a)]>0x0)_0x5d401d[_0x1040c6(0x122)]=_0x7f307b;if(_0x458c41[_0x1040c6(0x13b)])_0x5d401d[_0x1040c6(0x13b)]=_0x458c41['defaultApp'];else{const _0xea208f=Object['keys'](_0x7f307b);if(_0xea208f[_0x1040c6(0x12a)]>0x0)_0x5d401d[_0x1040c6(0x13b)]=_0xea208f[0x0];}return _0x5d401d;}function mergeIsolated(_0x1642a6){const _0x11ea86=a197_0x121869,_0x46de3e={..._0x1642a6};delete _0x46de3e['inherit'];const _0x2a6254=_0x1642a6['apps']&&typeof _0x1642a6[_0x11ea86(0x122)]===_0x11ea86(0x12f)?_0x1642a6[_0x11ea86(0x122)]:{};Object[_0x11ea86(0x11c)](_0x2a6254)[_0x11ea86(0x12a)]>0x0?_0x46de3e[_0x11ea86(0x122)]=_0x2a6254:delete _0x46de3e[_0x11ea86(0x122)];if(_0x11ea86(0x13b)in _0x1642a6)_0x46de3e[_0x11ea86(0x13b)]=_0x1642a6['defaultApp'];else Object['keys'](_0x2a6254)[_0x11ea86(0x12a)]>0x0?_0x46de3e['defaultApp']=Object[_0x11ea86(0x11c)](_0x2a6254)[0x0]:delete _0x46de3e[_0x11ea86(0x13b)];return _0x46de3e;}function mergeProjectFirst(_0x5aa03c,_0x1ac7d0){const _0x13692e=a197_0x121869,_0x998cab={..._0x1ac7d0};delete _0x998cab[_0x13692e(0x12d)];for(const _0x35dfc1 of INHERIT_WHITELIST){!(_0x35dfc1 in _0x998cab)&&_0x35dfc1 in _0x5aa03c&&(_0x998cab[_0x35dfc1]=_0x5aa03c[_0x35dfc1]);}const _0x47f215=_0x1ac7d0[_0x13692e(0x122)]&&typeof _0x1ac7d0[_0x13692e(0x122)]===_0x13692e(0x12f)?_0x1ac7d0[_0x13692e(0x122)]:{};Object['keys'](_0x47f215)['length']>0x0?_0x998cab[_0x13692e(0x122)]=_0x47f215:delete _0x998cab[_0x13692e(0x122)];if('defaultApp'in _0x1ac7d0)_0x998cab[_0x13692e(0x13b)]=_0x1ac7d0['defaultApp'];else Object[_0x13692e(0x11c)](_0x47f215)[_0x13692e(0x12a)]>0x0?_0x998cab['defaultApp']=Object[_0x13692e(0x11c)](_0x47f215)[0x0]:delete _0x998cab['defaultApp'];return _0x998cab;}function mergeFullInherit(_0x13b1ec,_0x36c85e){const _0x47561f=a197_0x121869,_0x61fb6c=_0x13b1ec[_0x47561f(0x122)]&&typeof _0x13b1ec[_0x47561f(0x122)]===_0x47561f(0x12f)?_0x13b1ec['apps']:{},_0xc978b0=_0x36c85e['apps']&&typeof _0x36c85e[_0x47561f(0x122)]==='object'?_0x36c85e['apps']:{},_0x12e624={..._0x61fb6c,..._0xc978b0},_0x163d75={..._0x13b1ec,..._0x36c85e};delete _0x163d75[_0x47561f(0x12d)];if(Object['keys'](_0x12e624)['length']>0x0)_0x163d75[_0x47561f(0x122)]=_0x12e624;if(_0x47561f(0x13b)in _0x36c85e)_0x163d75['defaultApp']=_0x36c85e[_0x47561f(0x13b)];else{if(Object['keys'](_0xc978b0)[_0x47561f(0x12a)]>0x0)_0x163d75[_0x47561f(0x13b)]=Object[_0x47561f(0x11c)](_0xc978b0)[0x0];else{if(_0x13b1ec[_0x47561f(0x13b)])_0x163d75[_0x47561f(0x13b)]=_0x13b1ec[_0x47561f(0x13b)];else{const _0x26e784=Object[_0x47561f(0x11c)](_0x61fb6c);if(_0x26e784[_0x47561f(0x12a)]>0x0)_0x163d75['defaultApp']=_0x26e784[0x0];}}}return _0x163d75;}export function readRawConfigWithLayers(_0x5dca95){const _0x3cb633=loadRawConfigLayers(_0x5dca95);return{'config':mergeRawConfigLayers(_0x3cb633),'layers':_0x3cb633};}export function readRawConfig(_0x5adb3a){return mergeRawConfigLayers(loadRawConfigLayers(_0x5adb3a));}function a197_0x8580(_0x59ca40,_0x19de43){_0x59ca40=_0x59ca40-0x117;const _0xf1a1e0=a197_0xf1a1();let _0x858002=_0xf1a1e0[_0x59ca40];return _0x858002;}export function readConfigFile(_0x38b543){const _0x5ab1f4=a197_0x121869;return parseAndNormalizeConfig(_0x38b543,_0x5ab1f4(0x120));}export function writeConfigFile(_0x5af5cc,_0x10d282){const _0x10c2bf=a197_0x121869,_0x425a5a=dirname(_0x5af5cc);!existsSync(_0x425a5a)&&mkdirSync(_0x425a5a,{'recursive':!![]});const _0x4d240b=_0x5af5cc+'.tmp';try{writeFileSync(_0x4d240b,JSON[_0x10c2bf(0x140)](_0x10d282,null,0x2)+'\x0a',{'encoding':_0x10c2bf(0x11d),'mode':0x180}),renameSync(_0x4d240b,_0x5af5cc);}catch(_0x42808c){try{unlinkSync(_0x4d240b);}catch{}throw _0x42808c;}}export function resolveWriteConfigPath(_0x50dcfb){const _0x5a1934=a197_0x121869,_0x3e9200=_0x50dcfb==='project'?process[_0x5a1934(0x139)]():homedir(),_0x8d6a9d=resolveConfigPath(_0x3e9200);return _0x8d6a9d??resolve(_0x3e9200,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5e0cc9,_0x51cf77){const _0xce25bd=a198_0x5523,_0x34924c=_0x5e0cc9();while(!![]){try{const _0x1e3fcd=parseInt(_0xce25bd(0x16e))/0x1*(parseInt(_0xce25bd(0x15d))/0x2)+-parseInt(_0xce25bd(0x167))/0x3*(parseInt(_0xce25bd(0x16b))/0x4)+-parseInt(_0xce25bd(0x176))/0x5+parseInt(_0xce25bd(0x17a))/0x6+parseInt(_0xce25bd(0x170))/0x7+-parseInt(_0xce25bd(0x17e))/0x8*(parseInt(_0xce25bd(0x175))/0x9)+parseInt(_0xce25bd(0x17d))/0xa*(parseInt(_0xce25bd(0x15a))/0xb);if(_0x1e3fcd===_0x51cf77)break;else _0x34924c['push'](_0x34924c['shift']());}catch(_0x241628){_0x34924c['push'](_0x34924c['shift']());}}}(a198_0x44ae,0x279d6));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';function a198_0x5523(_0xcaa12b,_0x1aeaae){_0xcaa12b=_0xcaa12b-0x15a;const _0x44ae8e=a198_0x44ae();let _0x552385=_0x44ae8e[_0xcaa12b];return _0x552385;}import{logger}from'./utils/logger.js';function a198_0x44ae(){const _0x16630e=['104cGLQnr','merged','trim','slice','-api.ts','globalConfig','values','userDomain','44tQpVHd','setRawCommand','filter','46DbgoJE','runtimeDomain','keys','cookie','length','cwd','object','defaultApp','https://g.lovrabet.com/dist/lovrabet-skill','find','178197JJntuC','join','./constant/domain.js','apiDomain','12nTlDLs','api.ts','string','348GdKEkx','./constant/env.js','955815xRoiyD','setLogPath','appcode','replace','apps','47007NlXdsw','1444575vKynwK','entries','projectConfig','argv','1415376RbNkZs','env','map','792070ucqaEb'];a198_0x44ae=function(){return _0x16630e;};return a198_0x44ae();}export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x39c20e){return process.env[`RABETBASE_${_0x39c20e}`]||process.env[`LOVRABET_${_0x39c20e}`]||undefined;}export async function createContext(_0x4f654a){const _0x9d8abe=a198_0x5523,{config:_0x2cd502,layers:_0xd28e52}=readRawConfigWithLayers(),_0x46677e=buildConfig(_0x2cd502,_0x4f654a,_0xd28e52),{initEnv:_0x3a2715}=await import(_0x9d8abe(0x16f));if(_0x46677e[_0x9d8abe(0x17b)])_0x3a2715(_0x46677e[_0x9d8abe(0x17b)]);else _0x4f654a['env']&&typeof _0x4f654a[_0x9d8abe(0x17b)]===_0x9d8abe(0x16d)&&_0x3a2715(_0x4f654a[_0x9d8abe(0x17b)]);const {initDomains:_0x364dd0,getUserDomain:_0x38946c,getApiDomain:_0x26b89f}=await import(_0x9d8abe(0x169));_0x364dd0({'apiDomain':_0x2cd502[_0x9d8abe(0x16a)]||undefined,'userDomain':_0x2cd502[_0x9d8abe(0x185)]||undefined,'runtimeDomain':_0x2cd502[_0x9d8abe(0x15e)]||undefined});const _0x1585a5={'apiDomain':_0x26b89f(),'userDomain':_0x38946c()},_0x2bdffb=await buildAuth(_0x46677e);logger[_0x9d8abe(0x171)](process[_0x9d8abe(0x162)]());const _0x483d10=(CLI_BIN_NAME+'\x20'+process[_0x9d8abe(0x179)][_0x9d8abe(0x181)](0x2)[_0x9d8abe(0x168)]('\x20'))[_0x9d8abe(0x180)]();logger[_0x9d8abe(0x15b)](_0x483d10);const {isNonInteractive:_0x17e313}=await import('./utils/is-non-interactive.js'),_0x1b4832=_0x17e313(_0x4f654a);return{'config':_0x46677e,'auth':_0x2bdffb,'logger':logger,'env':_0x1585a5,'nonInteractive':_0x1b4832};}export function buildConfigFromFlags(_0x4e150b){const {config:_0x1d94b1,layers:_0x178e22}=readRawConfigWithLayers();return buildConfig(_0x1d94b1,_0x4e150b,_0x178e22);}export function getConfigAppCode(_0xc6f7e0){const _0x5351f1=a198_0x5523,_0x27d956=readRawConfig(_0xc6f7e0);if(_0x27d956[_0x5351f1(0x174)]&&typeof _0x27d956[_0x5351f1(0x174)]===_0x5351f1(0x163)){const _0x58b0f=_0x27d956[_0x5351f1(0x164)];if(_0x58b0f&&_0x27d956[_0x5351f1(0x174)][_0x58b0f]?.[_0x5351f1(0x172)])return String(_0x27d956['apps'][_0x58b0f]['appcode'])[_0x5351f1(0x180)]();const _0x5ed551=Object[_0x5351f1(0x184)](_0x27d956[_0x5351f1(0x174)])[0x0];if(_0x5ed551?.['appcode'])return String(_0x5ed551['appcode'])[_0x5351f1(0x180)]();}const _0x5201bc=_0x27d956['appcode']||_0x27d956['app'];if(typeof _0x5201bc!==_0x5351f1(0x16d)||_0x5201bc[_0x5351f1(0x180)]()==='')return undefined;return _0x5201bc[_0x5351f1(0x180)]();}export function getMultiAppConfigs(_0x459a14='project',_0x61c385){const _0x4e04cb=a198_0x5523,_0x3e27b2=loadRawConfigLayers(_0x61c385);let _0xcbbdc7,_0x586f71;if(_0x459a14===_0x4e04cb(0x17f)){const _0x29954d=_0x3e27b2['globalConfig'][_0x4e04cb(0x174)]&&typeof _0x3e27b2[_0x4e04cb(0x183)][_0x4e04cb(0x174)]==='object'?_0x3e27b2['globalConfig'][_0x4e04cb(0x174)]:{},_0x2a6785=_0x3e27b2[_0x4e04cb(0x178)][_0x4e04cb(0x174)]&&typeof _0x3e27b2[_0x4e04cb(0x178)][_0x4e04cb(0x174)]===_0x4e04cb(0x163)?_0x3e27b2[_0x4e04cb(0x178)]['apps']:{};_0xcbbdc7={..._0x29954d,..._0x2a6785};const _0x4fa69b=readRawConfig(_0x61c385);_0x586f71=_0x4fa69b[_0x4e04cb(0x164)];}else _0xcbbdc7=_0x3e27b2[_0x4e04cb(0x178)][_0x4e04cb(0x174)],_0x586f71=_0x3e27b2[_0x4e04cb(0x178)]['defaultApp'];if(!_0xcbbdc7||typeof _0xcbbdc7!==_0x4e04cb(0x163)||Object[_0x4e04cb(0x15f)](_0xcbbdc7)[_0x4e04cb(0x161)]===0x0)return null;return Object[_0x4e04cb(0x177)](_0xcbbdc7)[_0x4e04cb(0x17c)](([_0x15ed08,_0x583f6a])=>({'name':_0x15ed08,'appcode':_0x583f6a?.['appcode']||'','isDefault':_0x15ed08===_0x586f71,'env':_0x583f6a?.[_0x4e04cb(0x17b)],'apiDir':_0x583f6a?.['apiDir'],'cookie':_0x583f6a?.[_0x4e04cb(0x160)]||undefined}))[_0x4e04cb(0x15c)](_0x24b0ca=>_0x24b0ca[_0x4e04cb(0x172)]);}export function getTemplateBaseUrl(_0x5ec304){const _0x447dd0=a198_0x5523,_0x2bc814=readRawConfig(_0x5ec304);if(_0x2bc814['template_base_url']&&typeof _0x2bc814['template_base_url']===_0x447dd0(0x16d))return _0x2bc814['template_base_url'][_0x447dd0(0x173)](/\/$/,'');return _0x447dd0(0x165);}function buildConfig(_0x264e21,_0x285d7b,_0x365721){return{...resolveAppConfig({'raw':_0x264e21,'flags':_0x285d7b,'layers':_0x365721,'readEnv':env}),'raw':_0x264e21};}export function resolveApiFilePath(_0x634fa5,_0x75ff3){const _0x2c23f0=a198_0x5523,_0x4a1311=resolve(process[_0x2c23f0(0x162)](),_0x634fa5),_0x42956b=resolve(_0x4a1311,_0x2c23f0(0x16c));if(!_0x75ff3)return _0x42956b;const _0x3cf4e0=readRawConfig(),_0x3f6b2d=_0x3cf4e0[_0x2c23f0(0x174)]&&typeof _0x3cf4e0['apps']==='object'?_0x3cf4e0['apps']:{},_0x4a9fd2=Object['entries'](_0x3f6b2d)[_0x2c23f0(0x166)](([,_0x10b537])=>_0x10b537?.[_0x2c23f0(0x172)]===_0x75ff3);if(!_0x4a9fd2)return _0x42956b;const [_0x284ab8,_0x51e7f7]=_0x4a9fd2,_0x1d24bf=typeof _0x3cf4e0[_0x2c23f0(0x164)]===_0x2c23f0(0x16d)?_0x3cf4e0['defaultApp']:undefined;if(_0x51e7f7?.['apiDir'])return _0x42956b;if(_0x1d24bf&&_0x284ab8!==_0x1d24bf)return resolve(_0x4a1311,_0x284ab8+_0x2c23f0(0x182));return _0x42956b;}
1
+ const a198_0x1b3e35=a198_0x90e8;(function(_0x7d3ba7,_0x1fa8d0){const _0x3b0cea=a198_0x90e8,_0x2bfe93=_0x7d3ba7();while(!![]){try{const _0x2dd350=-parseInt(_0x3b0cea(0x1d7))/0x1+-parseInt(_0x3b0cea(0x1cf))/0x2*(parseInt(_0x3b0cea(0x1db))/0x3)+parseInt(_0x3b0cea(0x1cc))/0x4*(parseInt(_0x3b0cea(0x1cb))/0x5)+parseInt(_0x3b0cea(0x1c3))/0x6*(-parseInt(_0x3b0cea(0x1d2))/0x7)+-parseInt(_0x3b0cea(0x1bf))/0x8*(parseInt(_0x3b0cea(0x1dc))/0x9)+-parseInt(_0x3b0cea(0x1b5))/0xa*(parseInt(_0x3b0cea(0x1c9))/0xb)+parseInt(_0x3b0cea(0x1b4))/0xc*(parseInt(_0x3b0cea(0x1d3))/0xd);if(_0x2dd350===_0x1fa8d0)break;else _0x2bfe93['push'](_0x2bfe93['shift']());}catch(_0x1c3457){_0x2bfe93['push'](_0x2bfe93['shift']());}}}(a198_0x57fc,0x74928));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';function a198_0x90e8(_0xe36517,_0x579ecb){_0xe36517=_0xe36517-0x1b1;const _0x57fc18=a198_0x57fc();let _0x90e812=_0x57fc18[_0xe36517];return _0x90e812;}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(_0x4ec373){return process.env[`RABETBASE_${_0x4ec373}`]||process.env[`LOVRABET_${_0x4ec373}`]||undefined;}export async function createContext(_0x8eb953){const _0x160b0c=a198_0x90e8,{config:_0x582139,layers:_0x4241b5}=readRawConfigWithLayers(),_0x3b3938=buildConfig(_0x582139,_0x8eb953,_0x4241b5),{initEnv:_0x3c0bad}=await import(_0x160b0c(0x1c5));if(_0x3b3938[_0x160b0c(0x1d1)])_0x3c0bad(_0x3b3938['env']);else _0x8eb953['env']&&typeof _0x8eb953[_0x160b0c(0x1d1)]==='string'&&_0x3c0bad(_0x8eb953[_0x160b0c(0x1d1)]);const {initDomains:_0x259d69,getUserDomain:_0x1f9612,getApiDomain:_0xb4ca2}=await import(_0x160b0c(0x1ba));_0x259d69({'apiDomain':_0x582139[_0x160b0c(0x1c4)]||undefined,'userDomain':_0x582139[_0x160b0c(0x1d4)]||undefined,'runtimeDomain':_0x582139[_0x160b0c(0x1b1)]||undefined});const _0x4136a0={'apiDomain':_0xb4ca2(),'userDomain':_0x1f9612()},_0x2f6733=await buildAuth(_0x3b3938);logger[_0x160b0c(0x1c7)](process[_0x160b0c(0x1d5)]());const _0x2fc576=(CLI_BIN_NAME+'\x20'+process[_0x160b0c(0x1bb)][_0x160b0c(0x1b6)](0x2)[_0x160b0c(0x1ce)]('\x20'))[_0x160b0c(0x1ca)]();logger['setRawCommand'](_0x2fc576);const {isNonInteractive:_0x27ffd9}=await import('./utils/is-non-interactive.js'),_0x2f5044=_0x27ffd9(_0x8eb953);return{'config':_0x3b3938,'auth':_0x2f6733,'logger':logger,'env':_0x4136a0,'nonInteractive':_0x2f5044};}export function buildConfigFromFlags(_0x534d59){const {config:_0x1a22bb,layers:_0x2fdda2}=readRawConfigWithLayers();return buildConfig(_0x1a22bb,_0x534d59,_0x2fdda2);}function a198_0x57fc(){const _0x4641c9=['env','74830LUDTQx','1269814NmZXav','userDomain','cwd','defaultApp','60940KeRTLm','apiDir','appcode','find','6cWhorn','693gLCQLM','runtimeDomain','replace','globalConfig','204kOsFjE','40kTKhfw','slice','projectConfig','apps','https://g.lovrabet.com/dist/lovrabet-skill','./constant/domain.js','argv','cookie','string','template_base_url','27776HaDYfr','map','object','app','54FUdXzC','apiDomain','./constant/env.js','values','setLogPath','project','1743115jhngNZ','trim','125emMkFk','86072RWfsfU','length','join','662642NAhmpQ','entries'];a198_0x57fc=function(){return _0x4641c9;};return a198_0x57fc();}export function getConfigAppCode(_0xd3d7dd){const _0x512749=a198_0x90e8,_0x50a13f=readRawConfig(_0xd3d7dd);if(_0x50a13f[_0x512749(0x1b8)]&&typeof _0x50a13f[_0x512749(0x1b8)]===_0x512749(0x1c1)){const _0xd15126=_0x50a13f[_0x512749(0x1d6)];if(_0xd15126&&_0x50a13f[_0x512749(0x1b8)][_0xd15126]?.[_0x512749(0x1d9)])return String(_0x50a13f['apps'][_0xd15126][_0x512749(0x1d9)])[_0x512749(0x1ca)]();const _0x336c10=Object[_0x512749(0x1c6)](_0x50a13f[_0x512749(0x1b8)])[0x0];if(_0x336c10?.[_0x512749(0x1d9)])return String(_0x336c10[_0x512749(0x1d9)])['trim']();}const _0x2b5c9c=_0x50a13f[_0x512749(0x1d9)]||_0x50a13f[_0x512749(0x1c2)];if(typeof _0x2b5c9c!=='string'||_0x2b5c9c[_0x512749(0x1ca)]()==='')return undefined;return _0x2b5c9c['trim']();}export function getMultiAppConfigs(_0x34fae4=a198_0x1b3e35(0x1c8),_0x4fc223){const _0x5b290e=a198_0x1b3e35,_0x5ac66d=loadRawConfigLayers(_0x4fc223);let _0x11c523,_0x1e1f58;if(_0x34fae4==='merged'){const _0x3a4c30=_0x5ac66d[_0x5b290e(0x1b3)][_0x5b290e(0x1b8)]&&typeof _0x5ac66d[_0x5b290e(0x1b3)][_0x5b290e(0x1b8)]===_0x5b290e(0x1c1)?_0x5ac66d['globalConfig'][_0x5b290e(0x1b8)]:{},_0x4f05ef=_0x5ac66d[_0x5b290e(0x1b7)][_0x5b290e(0x1b8)]&&typeof _0x5ac66d[_0x5b290e(0x1b7)][_0x5b290e(0x1b8)]===_0x5b290e(0x1c1)?_0x5ac66d['projectConfig'][_0x5b290e(0x1b8)]:{};_0x11c523={..._0x3a4c30,..._0x4f05ef};const _0x181aba=readRawConfig(_0x4fc223);_0x1e1f58=_0x181aba[_0x5b290e(0x1d6)];}else _0x11c523=_0x5ac66d[_0x5b290e(0x1b7)][_0x5b290e(0x1b8)],_0x1e1f58=_0x5ac66d[_0x5b290e(0x1b7)][_0x5b290e(0x1d6)];if(!_0x11c523||typeof _0x11c523!==_0x5b290e(0x1c1)||Object['keys'](_0x11c523)[_0x5b290e(0x1cd)]===0x0)return null;return Object[_0x5b290e(0x1d0)](_0x11c523)[_0x5b290e(0x1c0)](([_0x39d7bd,_0x5bca97])=>({'name':_0x39d7bd,'appcode':_0x5bca97?.['appcode']||'','isDefault':_0x39d7bd===_0x1e1f58,'env':_0x5bca97?.[_0x5b290e(0x1d1)],'apiDir':_0x5bca97?.[_0x5b290e(0x1d8)],'cookie':_0x5bca97?.[_0x5b290e(0x1bc)]||undefined}))['filter'](_0x1e7784=>_0x1e7784['appcode']);}export function getTemplateBaseUrl(_0x27c6ea){const _0x97a493=a198_0x1b3e35,_0x4493f3=readRawConfig(_0x27c6ea);if(_0x4493f3[_0x97a493(0x1be)]&&typeof _0x4493f3[_0x97a493(0x1be)]===_0x97a493(0x1bd))return _0x4493f3[_0x97a493(0x1be)][_0x97a493(0x1b2)](/\/$/,'');return _0x97a493(0x1b9);}function buildConfig(_0x267c71,_0x3bc3f8,_0x37b14a){return{...resolveAppConfig({'raw':_0x267c71,'flags':_0x3bc3f8,'layers':_0x37b14a,'readEnv':env}),'raw':_0x267c71};}export function resolveApiFilePath(_0xdef28,_0x15e706){const _0x51ee89=a198_0x1b3e35,_0x32c005=resolve(process[_0x51ee89(0x1d5)](),_0xdef28),_0x39cb0d=resolve(_0x32c005,'api.ts');if(!_0x15e706)return _0x39cb0d;const _0x48a918=readRawConfig(),_0x2237b2=_0x48a918[_0x51ee89(0x1b8)]&&typeof _0x48a918['apps']===_0x51ee89(0x1c1)?_0x48a918[_0x51ee89(0x1b8)]:{},_0x393ffd=Object[_0x51ee89(0x1d0)](_0x2237b2)[_0x51ee89(0x1da)](([,_0x2f888a])=>_0x2f888a?.[_0x51ee89(0x1d9)]===_0x15e706);if(!_0x393ffd)return _0x39cb0d;const [_0x2ba982,_0x4ac71d]=_0x393ffd,_0x326ae2=typeof _0x48a918['defaultApp']===_0x51ee89(0x1bd)?_0x48a918[_0x51ee89(0x1d6)]:undefined;if(_0x4ac71d?.['apiDir'])return _0x39cb0d;if(_0x326ae2&&_0x2ba982!==_0x326ae2)return resolve(_0x32c005,_0x2ba982+'-api.ts');return _0x39cb0d;}
@@ -1 +1 @@
1
- (function(_0x128530,_0x862d9){const _0x3f3288=a199_0x1a5b,_0x6fc090=_0x128530();while(!![]){try{const _0x3c73c3=parseInt(_0x3f3288(0x1dd))/0x1+-parseInt(_0x3f3288(0x1d8))/0x2+-parseInt(_0x3f3288(0x1dc))/0x3*(parseInt(_0x3f3288(0x1d1))/0x4)+-parseInt(_0x3f3288(0x1da))/0x5*(parseInt(_0x3f3288(0x1d5))/0x6)+-parseInt(_0x3f3288(0x1d6))/0x7+parseInt(_0x3f3288(0x1d9))/0x8+parseInt(_0x3f3288(0x1db))/0x9;if(_0x3c73c3===_0x862d9)break;else _0x6fc090['push'](_0x6fc090['shift']());}catch(_0x57c34e){_0x6fc090['push'](_0x6fc090['shift']());}}}(a199_0x29ac,0xeb9f2));import{readFileSync,existsSync}from'node:fs';function a199_0x29ac(){const _0x4b9fe3=['utf-8','160yGOssY','alias','datasetCode','has','114738nptkjW','1977731eKuBtX','find','1298488bRjFVV','165776VogKBj','465PfAwfC','36535545OHoPms','55302QnSRow','332455yUDDxG','set','cwd'];a199_0x29ac=function(){return _0x4b9fe3;};return a199_0x29ac();}import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x4e87e4){const _0x3340af=[],_0x46e3c0=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x36370e;while((_0x36370e=_0x46e3c0['exec'](_0x4e87e4))!==null){_0x3340af['push']({'datasetCode':_0x36370e[0x1],'tableName':_0x36370e[0x2],'name':_0x36370e[0x3],'alias':_0x36370e[0x4]});}return _0x3340af;}function a199_0x1a5b(_0x349f56,_0x13e3c8){_0x349f56=_0x349f56-0x1d1;const _0x29acc9=a199_0x29ac();let _0x1a5b1e=_0x29acc9[_0x349f56];return _0x1a5b1e;}export function loadAliasMap(_0xac3f90,_0x81f0ca,_0x53b3b5){const _0xa99076=a199_0x1a5b,_0x2ed9e5=_0x53b3b5??resolve(process[_0xa99076(0x1df)](),_0xac3f90,'api.ts');if(cache[_0xa99076(0x1d4)](_0x2ed9e5))return cache['get'](_0x2ed9e5);if(!existsSync(_0x2ed9e5))return cache[_0xa99076(0x1de)](_0x2ed9e5,[]),[];try{const _0x5e2ed0=readFileSync(_0x2ed9e5,_0xa99076(0x1e0)),_0x3862fe=parseApiFile(_0x5e2ed0);return cache['set'](_0x2ed9e5,_0x3862fe),_0x3862fe;}catch{return cache[_0xa99076(0x1de)](_0x2ed9e5,[]),[];}}export function resolveAlias(_0x23f59e,_0x373714,_0x1facd7,_0x1068ae){const _0x1aa3c0=a199_0x1a5b;if(!_0x373714)return undefined;const _0xe28d99=loadAliasMap(_0x23f59e,_0x1facd7,_0x1068ae),_0x236574=_0xe28d99[_0x1aa3c0(0x1d7)](_0x209ba0=>_0x209ba0[_0x1aa3c0(0x1d2)]===_0x373714);return _0x236574?.[_0x1aa3c0(0x1d3)];}export function listAliases(_0x1d693b,_0x3a9342,_0x13c753){return loadAliasMap(_0x1d693b,_0x3a9342,_0x13c753);}
1
+ (function(_0xa1ff93,_0x136efe){const _0x17a09=a199_0x36fa,_0x2e5fa5=_0xa1ff93();while(!![]){try{const _0x4dad20=parseInt(_0x17a09(0x87))/0x1+parseInt(_0x17a09(0x8f))/0x2+parseInt(_0x17a09(0x80))/0x3*(parseInt(_0x17a09(0x7f))/0x4)+-parseInt(_0x17a09(0x86))/0x5*(parseInt(_0x17a09(0x8b))/0x6)+parseInt(_0x17a09(0x84))/0x7*(parseInt(_0x17a09(0x7d))/0x8)+-parseInt(_0x17a09(0x82))/0x9*(-parseInt(_0x17a09(0x8e))/0xa)+parseInt(_0x17a09(0x89))/0xb*(-parseInt(_0x17a09(0x83))/0xc);if(_0x4dad20===_0x136efe)break;else _0x2e5fa5['push'](_0x2e5fa5['shift']());}catch(_0x1b539a){_0x2e5fa5['push'](_0x2e5fa5['shift']());}}}(a199_0x38c5,0xbb2bd));import{readFileSync,existsSync}from'node:fs';function a199_0x36fa(_0x559737,_0x2ccd3c){_0x559737=_0x559737-0x7c;const _0x38c54e=a199_0x38c5();let _0x36faa5=_0x38c54e[_0x559737];return _0x36faa5;}import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x1d2543){const _0x2adb08=a199_0x36fa,_0x1fc100=[],_0x2a8329=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x35eee3;while((_0x35eee3=_0x2a8329[_0x2adb08(0x85)](_0x1d2543))!==null){_0x1fc100['push']({'datasetCode':_0x35eee3[0x1],'tableName':_0x35eee3[0x2],'name':_0x35eee3[0x3],'alias':_0x35eee3[0x4]});}return _0x1fc100;}export function loadAliasMap(_0x9ef911,_0x5c6c97,_0x3fe55d){const _0x49a859=a199_0x36fa,_0x2e52b7=_0x3fe55d??resolve(process[_0x49a859(0x7e)](),_0x9ef911,_0x49a859(0x88));if(cache[_0x49a859(0x8c)](_0x2e52b7))return cache[_0x49a859(0x81)](_0x2e52b7);if(!existsSync(_0x2e52b7))return cache[_0x49a859(0x8d)](_0x2e52b7,[]),[];try{const _0xd15d6e=readFileSync(_0x2e52b7,'utf-8'),_0x456164=parseApiFile(_0xd15d6e);return cache[_0x49a859(0x8d)](_0x2e52b7,_0x456164),_0x456164;}catch{return cache['set'](_0x2e52b7,[]),[];}}export function resolveAlias(_0x5cc72c,_0x1f9c9c,_0x1da696,_0x2f6edc){const _0x3c14f0=a199_0x36fa;if(!_0x1f9c9c)return undefined;const _0x1cba9d=loadAliasMap(_0x5cc72c,_0x1da696,_0x2f6edc),_0x22b91f=_0x1cba9d[_0x3c14f0(0x8a)](_0xfc468a=>_0xfc468a[_0x3c14f0(0x90)]===_0x1f9c9c);return _0x22b91f?.[_0x3c14f0(0x7c)];}function a199_0x38c5(){const _0x30e30a=['find','6IUfuNB','has','set','3964130PaTSXF','1653586NVeTkm','alias','datasetCode','8LRKbpr','cwd','688usYliH','2682LjFjFI','get','9rCmwvL','2651604HvUOLY','820911QvyoIA','exec','5851070oyaWdg','1105521fKfCVB','api.ts','33zjHXdh'];a199_0x38c5=function(){return _0x30e30a;};return a199_0x38c5();}export function listAliases(_0x4c4e39,_0x578ac4,_0x23b54c){return loadAliasMap(_0x4c4e39,_0x578ac4,_0x23b54c);}
@@ -1 +1 @@
1
- (function(_0x1e5006,_0x5413f5){const _0x202554=a200_0x589f,_0x83587c=_0x1e5006();while(!![]){try{const _0xe78801=parseInt(_0x202554(0x12d))/0x1+parseInt(_0x202554(0x142))/0x2+-parseInt(_0x202554(0x105))/0x3+parseInt(_0x202554(0x147))/0x4*(-parseInt(_0x202554(0x160))/0x5)+parseInt(_0x202554(0x97))/0x6+-parseInt(_0x202554(0xcd))/0x7*(parseInt(_0x202554(0x104))/0x8)+parseInt(_0x202554(0x13a))/0x9*(parseInt(_0x202554(0xb2))/0xa);if(_0xe78801===_0x5413f5)break;else _0x83587c['push'](_0x83587c['shift']());}catch(_0x508da6){_0x83587c['push'](_0x83587c['shift']());}}}(a200_0x46a6,0xb4cf5));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x121725){_activeCookie=_0x121725||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(_0x403d97,_0xa96cac){const _0x3a819c=a200_0x589f,_0x46f4ba=_0xa96cac instanceof Error?_0xa96cac[_0x3a819c(0x9c)]:String(_0xa96cac);return CliErrors[_0x3a819c(0x121)]('Request\x20failed:\x20'+_0x403d97+(_0x46f4ba?'\x20('+_0x46f4ba+')':''),_0x3a819c(0x17a));}async function apiRequest(_0x40e461,_0x9c86bd={}){const _0x926439=a200_0x589f,{method:method='GET',body:_0x67c545,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x9c86bd,_0x58de84=useRuntime?getRuntimeDomain():getApiDomain(),_0xea24cc=_activeCookie||getCookie(),_0x384d74=''+_0x58de84+_0x40e461,_0x582610=new AbortController(),_0x3d3b33=setTimeout(()=>_0x582610[_0x926439(0x154)](),timeout);try{const _0xdaf16b=await fetch(_0x384d74,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0xea24cc,'X-Invoke-Source':_0x926439(0x14d),...headers},'body':_0x67c545?JSON['stringify'](_0x67c545):undefined,'signal':_0x582610[_0x926439(0xd7)]});let _0x5ddd09;try{_0x5ddd09=await _0xdaf16b[_0x926439(0x132)]();}catch(_0x5c111e){if(_0x5c111e instanceof Error&&_0x5c111e['name']===_0x926439(0xe6))throw CliErrors[_0x926439(0x121)](_0x926439(0x145)+_0x384d74);if(_0xdaf16b['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x926439(0x121)](_0x926439(0xc4)+_0xdaf16b[_0x926439(0xf0)]+')',_0xdaf16b['status']>=0x190?_0x926439(0x12f):undefined);}if(!_0xdaf16b['ok']||_0x5ddd09['success']===![])throw CliErrors['apiError'](_0x5ddd09[_0x926439(0x108)]||_0x5ddd09[_0x926439(0x9c)]||'API\x20error:\x20'+_0xdaf16b[_0x926439(0xf0)],_0x5ddd09[_0x926439(0x157)]?_0x926439(0x15a)+_0x5ddd09['errorCode']:undefined);return _0x5ddd09;}catch(_0x3bc676){if(_0x3bc676 instanceof CliError)throw _0x3bc676;if(_0x3bc676 instanceof Error&&_0x3bc676['name']===_0x926439(0xe6))throw CliErrors[_0x926439(0x121)](_0x926439(0x145)+_0x384d74);throw createFetchFailureError(_0x384d74,_0x3bc676);}finally{clearTimeout(_0x3d3b33);}}async function apiFormRequest(_0x220905,_0x39b920,_0xee9094={}){const _0x4f0a9f=a200_0x589f,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0xee9094,_0x133dc8=_activeCookie||getCookie(),_0x1ed005=''+getApiDomain()+_0x220905,_0x1fdd47=new AbortController(),_0x2cde20=setTimeout(()=>_0x1fdd47['abort'](),timeout);try{const _0x80c603=await fetch(_0x1ed005,{'method':_0x4f0a9f(0xf7),'headers':{'Cookie':_0x133dc8,'X-Invoke-Source':_0x4f0a9f(0x14d)},'body':_0x39b920,'signal':_0x1fdd47[_0x4f0a9f(0xd7)]});let _0x186d7f;try{_0x186d7f=await _0x80c603[_0x4f0a9f(0x132)]();}catch(_0x3f20da){if(_0x3f20da instanceof Error&&_0x3f20da[_0x4f0a9f(0xb0)]==='AbortError')throw CliErrors[_0x4f0a9f(0x121)](_0x4f0a9f(0x145)+_0x1ed005);throw CliErrors[_0x4f0a9f(0x121)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x80c603[_0x4f0a9f(0xf0)]+')',_0x80c603[_0x4f0a9f(0xf0)]>=0x190?_0x4f0a9f(0x12f):undefined);}if(!_0x80c603['ok']||_0x186d7f['success']===![])throw CliErrors[_0x4f0a9f(0x121)](_0x186d7f[_0x4f0a9f(0x108)]||_0x186d7f[_0x4f0a9f(0x9c)]||_0x4f0a9f(0x13e)+_0x80c603[_0x4f0a9f(0xf0)],_0x186d7f[_0x4f0a9f(0x157)]?_0x4f0a9f(0x15a)+_0x186d7f['errorCode']:undefined);return _0x186d7f;}catch(_0x24d3d4){if(_0x24d3d4 instanceof CliError)throw _0x24d3d4;if(_0x24d3d4 instanceof Error&&_0x24d3d4[_0x4f0a9f(0xb0)]===_0x4f0a9f(0xe6))throw CliErrors[_0x4f0a9f(0x121)]('Request\x20timeout:\x20'+_0x1ed005);throw createFetchFailureError(_0x1ed005,_0x24d3d4);}finally{clearTimeout(_0x2cde20);}}export async function uploadDevelopmentFile(_0x48d7ef,_0x56053a){const _0x239654=a200_0x589f,_0xf9eaeb=await readFile(_0x56053a),_0x1c0032=new FormData();_0x1c0032['append'](_0x239654(0x155),_0x48d7ef),_0x1c0032[_0x239654(0xcb)](_0x239654(0xef),new Blob([new Uint8Array(_0xf9eaeb)]),basename(_0x56053a));const _0x13bd5d=await apiFormRequest(_0x239654(0xc7),_0x1c0032);return _0x13bd5d[_0x239654(0xd9)];}export async function queryDevelopmentFileUrl(_0x596c40,_0x9f074={}){const _0x41220d=a200_0x589f,_0x405087=await apiRequest(_0x41220d(0x117),{'method':'POST','body':{'filePath':_0x596c40,'downloadFlag':_0x9f074['download']??![],..._0x9f074[_0x41220d(0xed)]?{'longTerm':!![]}:{}}});return _0x405087[_0x41220d(0xd9)];}export async function recognizeDevelopmentOcr(_0x608607,_0x591ae6){const _0xba44bf=a200_0x589f,_0x4d479c=new URLSearchParams({'url':_0x591ae6['url'],'type':_0x591ae6[_0xba44bf(0xa4)],'appCode':_0x608607}),_0x317839=await apiRequest(_0xba44bf(0x134)+_0x4d479c[_0xba44bf(0x188)](),{'method':_0xba44bf(0xf2)});return _0x317839[_0xba44bf(0xd9)];}function isAuthFailure(_0x2ad17a){const _0x2caa21=a200_0x589f,_0x8dca10=_0x2ad17a['errorMsg']||_0x2ad17a[_0x2caa21(0x9c)]||_0x2ad17a[_0x2caa21(0xd9)]?.['message']||_0x2ad17a[_0x2caa21(0xbf)]||_0x2ad17a[_0x2caa21(0xf3)]||'';return _0x2ad17a[_0x2caa21(0x157)]===_0x2caa21(0x149)||_0x2ad17a[_0x2caa21(0xd5)]===0x191||_0x2ad17a['code']===_0x2caa21(0x163)||_0x8dca10['includes']('401')||_0x8dca10['includes'](_0x2caa21(0xe0))||_0x8dca10[_0x2caa21(0x181)]('登录')||_0x8dca10[_0x2caa21(0x181)]('认证');}export async function platformFetch(_0x50b5e1,_0x3a26f8){const _0x5a1830=a200_0x589f;let _0x37b4f6;try{_0x37b4f6=await fetch(_0x50b5e1,{'method':_0x3a26f8['method']??_0x5a1830(0xf2),'headers':{'Content-Type':_0x5a1830(0x127),'Cookie':_0x3a26f8[_0x5a1830(0x135)],'X-Invoke-Source':_0x5a1830(0x14d)},..._0x3a26f8['body']&&{'body':JSON[_0x5a1830(0x16e)](_0x3a26f8[_0x5a1830(0x170)])}});}catch(_0x4838f2){throw createFetchFailureError(_0x50b5e1,_0x4838f2);}if(!_0x37b4f6['ok']){if(_0x37b4f6[_0x5a1830(0xf0)]===0x191)throw CliErrors[_0x5a1830(0x11f)]();throw CliErrors[_0x5a1830(0x121)](_0x3a26f8[_0x5a1830(0x159)]+_0x5a1830(0x165)+_0x37b4f6[_0x5a1830(0xf0)]);}const _0xee59e2=await _0x37b4f6[_0x5a1830(0x132)]();if(_0xee59e2[_0x5a1830(0x180)]===![]){if(isAuthFailure(_0xee59e2))throw CliErrors['authRequired']();throw CliErrors[_0x5a1830(0x121)](_0xee59e2[_0x5a1830(0x108)]||_0xee59e2[_0x5a1830(0x9c)]||_0x3a26f8[_0x5a1830(0x159)]+'\x20failed');}return _0xee59e2['data'];}export async function platformRequest(_0x498e6c,_0x54af41){const _0x530e24=a200_0x589f;if(/^https?:\/\//i[_0x530e24(0xb5)](_0x498e6c))throw CliErrors[_0x530e24(0xa5)](_0x530e24(0x17f)+_0x498e6c,_0x530e24(0x139));const _0x2b6732=_0x498e6c[_0x530e24(0x130)]('/')?_0x498e6c:'/'+_0x498e6c;return platformFetch(''+getApiDomain()+_0x2b6732,_0x54af41);}function cleanNewlines(_0x2ec26c){const _0x55247d=a200_0x589f;return _0x2ec26c[_0x55247d(0x15b)](/[\r\n]+/g,'\x20')[_0x55247d(0x14a)]();}function cleanDatasetName(_0x22e62d){const _0x54a314=a200_0x589f;if(!_0x22e62d[_0x54a314(0xb0)])return _0x22e62d;return{..._0x22e62d,'name':cleanNewlines(_0x22e62d[_0x54a314(0xb0)])};}export async function fetchModelList(_0x31700d,_0x404773){const _0x43843f=a200_0x589f,_0x12486e=getEnv(),_0x1e9ddf=new URLSearchParams({'appcode':_0x31700d,'otype':'array'}),_0x3aa600=_0x43843f(0x13b)+_0x1e9ddf[_0x43843f(0x188)]();logger[_0x43843f(0x96)]('fetch-model-list',_0x43843f(0x133)+_0x12486e+')',{'apiPath':_0x3aa600});const _0x28002b=await platformRequest(_0x3aa600,{'cookie':_0x404773,'label':_0x43843f(0x15e)}),_0x3ecd03=(_0x28002b['configArray']??[])[_0x43843f(0xac)](cleanDatasetName);return{'configArray':_0x3ecd03,'count':_0x3ecd03[_0x43843f(0x11e)]};}export async function fetchDatasetDoc(_0x515f04){const _0x2eac3e=a200_0x589f,{appCode:_0x736231,cookie:_0x4b833b,datasetCode:_0x2a64d6,datasetId:_0x4055eb,extraParams:_0x2d6226}=_0x515f04,_0x4b7e8a=await platformRequest(_0x2eac3e(0xe9),{'method':'POST','body':{'appCode':_0x736231,'datasetCode':_0x2a64d6,'datasetId':_0x4055eb,..._0x2d6226||{}},'cookie':_0x4b833b,'label':'Fetch\x20doc\x20('+_0x2a64d6+')'});if(!_0x4b7e8a||typeof _0x4b7e8a['markdown']!==_0x2eac3e(0x15f))throw new Error(_0x2eac3e(0x106)+_0x2a64d6+_0x2eac3e(0x146));return _0x4b7e8a[_0x2eac3e(0x169)];}export async function getMenuTree(_0x53dc04,_0x25c45b){const _0x50d0b2=a200_0x589f,_0x103760=new URLSearchParams({'appCode':_0x53dc04});return platformRequest('/smartapi/menu/find?'+_0x103760[_0x50d0b2(0x188)](),{'cookie':_0x25c45b,'label':'Fetch\x20menu\x20list'});}export async function createMenuRecord(_0x38e7e8,_0x138d8a,_0x245cb0){const _0x53bedd=a200_0x589f;return platformRequest(_0x53bedd(0x152),{'method':_0x53bedd(0xf7),'body':_0x38e7e8,'cookie':_0x138d8a,'label':_0x245cb0});}export async function updateMenuRecord(_0x47698b,_0x33006c,_0x551c6d){const _0xbd4cbf=a200_0x589f;return platformRequest(_0xbd4cbf(0x15d),{'method':'POST','body':_0x47698b,'cookie':_0x33006c,'label':_0x551c6d});}export async function deleteMenuRecord(_0x116159,_0xefbceb,_0x5179df){const _0x5d76b3=a200_0x589f;return platformRequest(_0x5d76b3(0x17c),{'method':_0x5d76b3(0xf7),'body':{'id':_0x116159},'cookie':_0xefbceb,'label':_0x5179df});}export async function batchDeleteMenuRecords(_0x274428,_0x74d071,_0x27e21a){const _0x34a4c8=a200_0x589f;return platformRequest(_0x34a4c8(0xad),{'method':_0x34a4c8(0xf7),'body':{'idList':_0x274428},'cookie':_0x74d071,'label':_0x27e21a});}export async function startMenuRegroup(_0x36ffb4,_0x7a4b8e,_0x1da3c8){const _0xe8448b=a200_0x589f;return platformRequest(_0xe8448b(0x178),{'method':_0xe8448b(0xf7),'body':_0x36ffb4,'cookie':_0x7a4b8e,'label':_0x1da3c8});}export async function getAsyncTaskStatus(_0x2a2820,_0x4d31fd,_0x9fdb44){const _0x38ad11=a200_0x589f,_0x1afd87=new URLSearchParams({'appCode':_0x4d31fd});return platformRequest(_0x38ad11(0x184)+encodeURIComponent(_0x2a2820)+'?'+_0x1afd87['toString'](),{'cookie':_0x9fdb44,'label':_0x38ad11(0xff)+_0x2a2820});}export async function listBffScripts(_0x32600b,_0x367207,_0x3715d8){const _0x502e19=a200_0x589f;let _0x21cc9a='/api/management/library/scripts/list?appCode='+_0x32600b;if(_0x367207)_0x21cc9a+=_0x502e19(0x122)+_0x367207;const _0x15820e=await apiRequest(_0x21cc9a);let _0x1d7e95=extractList(_0x15820e[_0x502e19(0xd9)]);if(_0x3715d8?.[_0x502e19(0x14b)]){const _0x42db09=_0x3715d8[_0x502e19(0x14b)][_0x502e19(0x90)]();_0x1d7e95=_0x1d7e95['filter'](_0x3559ef=>_0x3559ef[_0x502e19(0x126)]?.['toLowerCase']()[_0x502e19(0x181)](_0x42db09)||_0x3559ef[_0x502e19(0x107)]?.[_0x502e19(0x90)]()['includes'](_0x42db09));}return _0x1d7e95;}export async function getBffScriptInfo(_0x2fd770){const _0x2c26e1=a200_0x589f,_0x3db32e=await apiRequest(_0x2c26e1(0xb6)+_0x2fd770);if(!_0x3db32e['data'])throw CliErrors[_0x2c26e1(0xa5)](_0x2c26e1(0xdf)+_0x2fd770);return _0x3db32e[_0x2c26e1(0xd9)];}export async function saveBffScript(_0x5900c8){const _0x3b9249=a200_0x589f,_0x14622a=await apiRequest(_0x3b9249(0xbc),{'method':'POST','body':_0x5900c8}),{id:_0x251aa2,entity:_0x504b7b}=normalizeEntityWithIdResponse(_0x14622a['data']);if(_0x251aa2!==undefined){const _0x189db1=typeof _0x504b7b['functionName']===_0x3b9249(0x15f)||typeof _0x504b7b[_0x3b9249(0xbe)]==='string'?_0x504b7b:undefined;return{'id':_0x251aa2,'script':_0x189db1};}throw CliErrors[_0x3b9249(0x121)](_0x3b9249(0xa3));}export async function deleteBffScript(_0x552d3b){const _0x21c7ea=a200_0x589f;await apiRequest(_0x21c7ea(0x148),{'method':_0x21c7ea(0xf7),'body':{'id':_0x552d3b}});}export async function getBffScriptStatistics(_0x407196){const _0x262837=a200_0x589f,_0x434df3=await apiRequest(_0x262837(0x173)+_0x407196);return extractList(_0x434df3[_0x262837(0xd9)]);}export async function clearBffScriptCache(){const _0x287396=a200_0x589f,_0x27917d=await apiRequest('/api/management/script/cache/clear',{'method':_0x287396(0xf7),'useRuntime':!![]});return typeof _0x27917d[_0x287396(0xd9)]===_0x287396(0x15f)?_0x27917d[_0x287396(0xd9)]:'';}export async function listBffDatasetOperations(_0x51052e,_0x57bb27){const _0x5c756d=a200_0x589f,_0x599aa9=await apiRequest(_0x5c756d(0xf8),{'method':_0x5c756d(0xf7),'body':{'appCode':_0x51052e,'datasetId':_0x57bb27}});return _0x599aa9['data'];}export async function listSqlQueries(_0x3b1095,_0x15229f){const _0x3b786a=a200_0x589f,_0x34e159=await apiRequest(_0x3b786a(0x119),{'method':_0x3b786a(0xf7),'body':{'appCode':_0x3b1095,'currentPage':_0x15229f?.[_0x3b786a(0x11c)]??0x1,'pageSize':_0x15229f?.['pageSize']??0x32,'sqlCode':_0x15229f?.[_0x3b786a(0x17b)],'sqlName':_0x15229f?.[_0x3b786a(0xa9)]}});return _0x34e159['data'];}export async function getSqlQueryInfo(_0x67aac0,_0x332c4c){const _0x2f4f22=a200_0x589f,_0x2ce3c4=await listSqlQueries(_0x67aac0,{'sqlCode':_0x332c4c}),_0x1084cf=_0x2ce3c4[_0x2f4f22(0x11a)]?.[0x0];if(!_0x1084cf)throw CliErrors[_0x2f4f22(0xa5)](_0x2f4f22(0x12c)+_0x332c4c);return _0x1084cf;}export async function getSqlQueryDetail(_0x31b367){const _0x350345=a200_0x589f,_0x1e34b1=await apiRequest(_0x350345(0x131)+(_0x350345(0x176)+encodeURIComponent(_0x31b367)));if(!_0x1e34b1[_0x350345(0xd9)])throw CliErrors[_0x350345(0xa5)](_0x350345(0x12c)+_0x31b367);return _0x1e34b1[_0x350345(0xd9)];}export async function getSqlQueryDetailById(_0x1bd506){const _0x4a14be=a200_0x589f,_0x220222=await apiRequest(_0x4a14be(0xda)+_0x1bd506);if(!_0x220222[_0x4a14be(0xd9)])throw CliErrors[_0x4a14be(0xa5)](_0x4a14be(0xfd)+_0x1bd506);return _0x220222[_0x4a14be(0xd9)];}export async function createSqlQuery(_0x516827){const _0x223fe5=a200_0x589f,_0x440724=await apiRequest(_0x223fe5(0xc0),{'method':_0x223fe5(0xf7),'body':_0x516827}),{id:_0x14db5f,entity:_0x13bfcd}=normalizeEntityWithIdResponse(_0x440724['data']);if(!(_0x223fe5(0x17b)in _0x13bfcd)&&_0x14db5f)return getSqlQueryDetailById(_0x14db5f);return normalizeSqlQueryEntity(_0x13bfcd);}export async function updateSqlQuery(_0x3348af){const _0xc80b67=a200_0x589f,_0xb526f1=await apiRequest(_0xc80b67(0x175),{'method':_0xc80b67(0xf7),'body':_0x3348af}),{id:_0x4dd466,entity:_0x33345b}=normalizeEntityWithIdResponse(_0xb526f1[_0xc80b67(0xd9)]);if(!('sqlCode'in _0x33345b)){if(_0x3348af[_0xc80b67(0x17b)])return getSqlQueryDetail(_0x3348af[_0xc80b67(0x17b)]);if(_0x4dd466)return getSqlQueryDetailById(_0x4dd466);}return normalizeSqlQueryEntity(_0x33345b);}export async function deleteSqlQuery(_0x7998a4){const _0x358776=a200_0x589f;await apiRequest(_0x358776(0x144),{'method':'POST','body':_0x7998a4});}export async function saveSqlQuery(_0x3f23f0){const _0x4e8066=a200_0x589f,_0x32859a=await apiRequest(_0x4e8066(0x10f),{'method':'POST','body':_0x3f23f0});return _0x32859a[_0x4e8066(0xd9)];}function normalizeSqlQueryEntity(_0xb4c63b){const _0x1c5451=a200_0x589f;return{..._0xb4c63b,'id':Number(_0xb4c63b['id']),'dbId':_0xb4c63b['dbId']==null?undefined:Number(_0xb4c63b['dbId']),'version':_0xb4c63b[_0x1c5451(0xfa)]==null?undefined:Number(_0xb4c63b[_0x1c5451(0xfa)])};}export async function executeSql(_0x98e7f6,_0x3013c0,_0x46c41f){const _0x2dff0a=a200_0x589f,_0x3dafbd=await apiRequest(_0x2dff0a(0xa8),{'method':'POST','body':{'appCode':_0x98e7f6,'sqlCode':_0x3013c0,..._0x46c41f&&{'params':_0x46c41f}},'useRuntime':!![]});return _0x3dafbd['data'];}export async function executeDatasetDataOperation(_0x1b0041,_0x4d8ea5,_0x2b679d,_0x5d8bea={}){const _0x3bb8f0=a200_0x589f;try{const _0x403192=await apiRequest(_0x3bb8f0(0xf4)+_0x1b0041+'/'+_0x4d8ea5+'/'+_0x2b679d,{'method':_0x3bb8f0(0xf7),'body':_0x5d8bea,'useRuntime':!![]});return _0x403192[_0x3bb8f0(0xd9)];}catch(_0x49f395){if(_0x2b679d===_0x3bb8f0(0x177)&&_0x49f395 instanceof CliError&&_0x49f395['code']===_0x3bb8f0(0xee)&&_0x5d8bea['id']!==undefined&&_0x5d8bea['id']!==null&&_0x5d8bea['id']!==''){const _0x3b595d=await apiRequest(_0x3bb8f0(0xf4)+_0x1b0041+'/'+_0x4d8ea5+_0x3bb8f0(0x109),{'method':_0x3bb8f0(0xf7),'body':{'where':{'id':{'$eq':_0x5d8bea['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x532ef5=Array['isArray'](_0x3b595d[_0x3bb8f0(0xd9)]?.[_0x3bb8f0(0x11a)])?_0x3b595d[_0x3bb8f0(0xd9)]['tableData']:[];return _0x532ef5[0x0]??null;}throw _0x49f395;}}export async function listDatasets(_0x41de89,_0x5b405a){const _0x275b92=a200_0x589f,_0x5cc394={'appCode':_0x41de89,'deleted':_0x5b405a?.[_0x275b92(0xe4)]??![]};if(_0x5b405a?.[_0x275b92(0xd5)])_0x5cc394[_0x275b92(0xd5)]=_0x5b405a[_0x275b92(0xd5)];if(_0x5b405a?.[_0x275b92(0xb0)])_0x5cc394['name']=_0x5b405a[_0x275b92(0xb0)];const _0x442afa=await apiRequest(_0x275b92(0x10a),{'method':_0x275b92(0xf7),'body':_0x5cc394});return extractList(_0x442afa[_0x275b92(0xd9)]);}export async function deleteDataset(_0x4cf44c,_0x7826ab){const _0x37532e=a200_0x589f;await apiRequest(_0x37532e(0x8d),{'method':_0x37532e(0xf7),'body':{'appCode':_0x4cf44c,'datasetId':_0x7826ab}});}export async function restoreDataset(_0x3fd854,_0x35179c){const _0x28aa61=a200_0x589f;await apiRequest(_0x28aa61(0x9a),{'method':_0x28aa61(0xf7),'body':{'appCode':_0x3fd854,'datasetId':_0x35179c}});}export async function previewTextGeneratedDataset(_0x4a41c0,_0x1ac3a2){const _0x805d66=a200_0x589f,_0x223c18=await apiRequest(_0x805d66(0xf5),{'method':_0x805d66(0xf7),'body':{'appCode':_0x4a41c0,'datasetName':_0x1ac3a2[_0x805d66(0xeb)],'requirementDescription':_0x1ac3a2[_0x805d66(0x8e)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x223c18[_0x805d66(0xd9)];}export async function startTextGeneratedDataset(_0xc4bf57,_0x1c4d16,_0x44d5c9){const _0x84a857=a200_0x589f,_0x12910f=await apiRequest(_0x84a857(0x156),{'method':_0x84a857(0xf7),'body':{'appCode':_0xc4bf57,..._0x44d5c9?.[_0x84a857(0xec)]?{'clientOperationId':_0x44d5c9['clientOperationId']}:{},'design':_0x1c4d16},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x12910f[_0x84a857(0xd9)];}export async function getTextGeneratedDatasetStatus(_0x2efd23,_0x3dbea6){const _0x123172=a200_0x589f,_0x480443=new URLSearchParams({'appCode':_0x2efd23});_0x3dbea6['operationId']&&_0x480443['set'](_0x123172(0x158),_0x3dbea6[_0x123172(0x158)]);_0x3dbea6['clientOperationId']&&_0x480443[_0x123172(0x91)](_0x123172(0xec),_0x3dbea6[_0x123172(0xec)]);const _0x3578a7=await apiRequest(_0x123172(0x14c)+_0x480443['toString']());return _0x3578a7['data'];}export async function searchDatasets(_0x7ce83,_0x43d4d3){const _0x2290ca=a200_0x589f,_0x1b3798=await listDatasets(_0x7ce83,{'name':_0x43d4d3}),_0x4bad07=_0x43d4d3[_0x2290ca(0x90)](),_0x31c0fa=new Set(_0x1b3798[_0x2290ca(0xac)](_0x240603=>_0x240603['id'])),_0x5a2352=_0x1b3798[_0x2290ca(0x10e)](_0xb726d7=>_0xb726d7['dbtableConfig']?.['tableName']?.[_0x2290ca(0x90)]()[_0x2290ca(0x181)](_0x4bad07)||_0xb726d7[_0x2290ca(0x107)]?.[_0x2290ca(0x90)]()[_0x2290ca(0x181)](_0x4bad07)),_0x2562cc=await listDatasets(_0x7ce83,{'code':_0x43d4d3});for(const _0x5e0c10 of _0x2562cc){!_0x31c0fa[_0x2290ca(0xaf)](_0x5e0c10['id'])&&(_0x1b3798['push'](_0x5e0c10),_0x31c0fa[_0x2290ca(0xfe)](_0x5e0c10['id']));}return _0x1b3798;}export function normalizeDatasetOperations(_0x42bb4d){const _0xc6ac5a=a200_0x589f;if(Array[_0xc6ac5a(0xc5)](_0x42bb4d))return _0x42bb4d[_0xc6ac5a(0x10e)](_0xe72f96=>_0xe72f96!=null&&typeof _0xe72f96===_0xc6ac5a(0x129));if(_0x42bb4d&&typeof _0x42bb4d==='object')return Object[_0xc6ac5a(0xfc)](_0x42bb4d)[_0xc6ac5a(0x10e)](([,_0x39374f])=>_0x39374f!=null&&typeof _0x39374f===_0xc6ac5a(0x129))[_0xc6ac5a(0xac)](([_0x756f3d,_0x473a64])=>({..._0x473a64,'name':_0x473a64[_0xc6ac5a(0xb0)]??_0x473a64[_0xc6ac5a(0x113)]??_0x756f3d}));return[];}export async function getDatasetDetail(_0x5d19c4){const _0x47e43d=a200_0x589f,_0x45803d=/^\d+$/[_0x47e43d(0xb5)](_0x5d19c4)?'id':_0x47e43d(0xd5),_0x3e10c1=await apiRequest(_0x47e43d(0x123)+_0x45803d+'='+_0x5d19c4);return _0x3e10c1[_0x47e43d(0xd9)];}export async function updateDrivenData(_0x58e994){const _0x1ef66f=a200_0x589f,_0x450f3a=await apiRequest(_0x1ef66f(0x186),{'method':_0x1ef66f(0xf7),'body':_0x58e994});return _0x450f3a[_0x1ef66f(0xd9)];}export async function getDatasetOperations(_0x2f670f){const _0x324bfe=a200_0x589f,_0x451f8a=await getDatasetDetail(_0x2f670f),_0xbc0fe=normalizeDatasetOperations(_0x451f8a[_0x324bfe(0x9e)])[_0x324bfe(0xac)](_0x437e2e=>({'name':_0x437e2e[_0x324bfe(0xb0)]||_0x437e2e['operationName'],'displayName':_0x437e2e[_0x324bfe(0xe2)]||_0x437e2e[_0x324bfe(0xb0)],'type':_0x437e2e[_0x324bfe(0xa4)],'method':_0x437e2e[_0x324bfe(0xcf)],'path':_0x437e2e[_0x324bfe(0xaa)],'enabled':_0x437e2e[_0x324bfe(0x114)]??!![],'requestFields':_0x437e2e[_0x324bfe(0x171)],'responseFields':_0x437e2e[_0x324bfe(0x103)]}));return{'dataset':{'id':_0x451f8a['id']??_0x451f8a['modelId'],'name':_0x451f8a['name'],'code':_0x451f8a[_0x324bfe(0xd5)]||_0x451f8a[_0x324bfe(0x115)],'tableName':_0x451f8a['tableName']||_0x451f8a[_0x324bfe(0x8f)]?.[_0x324bfe(0xa0)]},'operations':_0xbc0fe};}export async function getOperationDetail(_0x718a5d,_0x3a77a1,_0x2b770c){const _0x4fce70=a200_0x589f;let _0x111a6f=_0x3a77a1;if(!/^\d+$/[_0x4fce70(0xb5)](_0x3a77a1)){const _0x703fb7=await listDatasets(_0x718a5d,{'code':_0x3a77a1}),_0x26dc1a=_0x703fb7[_0x4fce70(0xd6)](_0x155e57=>_0x155e57[_0x4fce70(0xd5)]===_0x3a77a1||String(_0x155e57['id'])===_0x3a77a1);if(!_0x26dc1a)throw CliErrors[_0x4fce70(0xa5)](_0x4fce70(0x16a)+_0x3a77a1);_0x111a6f=String(_0x26dc1a['id']);}const _0x367f73=await getDatasetDetail(_0x111a6f),_0x32b608=normalizeDatasetOperations(_0x367f73[_0x4fce70(0x9e)])[_0x4fce70(0xd6)](_0x3e791f=>(_0x3e791f[_0x4fce70(0xb0)]||_0x3e791f[_0x4fce70(0x113)])===_0x2b770c);if(!_0x32b608)throw CliErrors[_0x4fce70(0xa5)](_0x4fce70(0x141)+_0x2b770c+_0x4fce70(0xcc)+_0x3a77a1);return{'dataset':{'id':_0x367f73['id']??_0x367f73[_0x4fce70(0xc3)],'name':_0x367f73['name'],'code':_0x367f73[_0x4fce70(0xd5)]||_0x367f73['modelCode'],'tableName':_0x367f73[_0x4fce70(0xa0)]||_0x367f73[_0x4fce70(0x8f)]?.[_0x4fce70(0xa0)]},'operation':_0x32b608};}export async function startGenerateStandardPages(_0x24d79f,_0x4abb18,_0x4b824d){const _0x2cf486=a200_0x589f,_0x1aa33d=await apiRequest(_0x2cf486(0xdc)+_0x4abb18+_0x2cf486(0xf9),{'method':_0x2cf486(0xf7),'body':{'appCode':_0x24d79f,..._0x4b824d?.[_0x2cf486(0xec)]?{'clientOperationId':_0x4b824d[_0x2cf486(0xec)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x1aa33d[_0x2cf486(0xd9)];}export async function getGenerateStandardPagesStatus(_0x2f77f8,_0x5980d0,_0x15bc0f){const _0x7f30b2=a200_0x589f,_0x2cbf4d=new URLSearchParams({'appCode':_0x2f77f8});_0x15bc0f[_0x7f30b2(0x158)]&&_0x2cbf4d[_0x7f30b2(0x91)]('operationId',_0x15bc0f[_0x7f30b2(0x158)]);_0x15bc0f[_0x7f30b2(0xec)]&&_0x2cbf4d[_0x7f30b2(0x91)]('clientOperationId',_0x15bc0f[_0x7f30b2(0xec)]);const _0x385096=await apiRequest('/smartapi/lovrabet/dataset/'+_0x5980d0+'/generate-standard-pages/status?'+_0x2cbf4d['toString']());return _0x385096[_0x7f30b2(0xd9)];}export async function getStandardPageStatus(_0x4d6a27,_0x525ef8){const _0x1ce33b=a200_0x589f,_0x480f26=await apiRequest(_0x1ce33b(0xdc)+_0x525ef8+'/standard-page-status?appCode='+encodeURIComponent(_0x4d6a27));return _0x480f26[_0x1ce33b(0xd9)];}export async function tryGetStandardPageStatus(_0x5c8573,_0x384c6d){const _0x3230b0=a200_0x589f;try{return await getStandardPageStatus(_0x5c8573,_0x384c6d);}catch(_0x1edeac){if(_0x1edeac instanceof CliError&&_0x1edeac[_0x3230b0(0xd5)]===_0x3230b0(0xee)&&/404|not found|non-json response/i[_0x3230b0(0xb5)](_0x1edeac['message']))return null;throw _0x1edeac;}}export async function syncStandardPages(_0x2459e0,_0x343200){const _0x17ee8a=a200_0x589f,_0x22dbee=await apiRequest('/smartapi/lovrabet/dataset/'+_0x343200+_0x17ee8a(0xc6),{'method':_0x17ee8a(0xf7),'body':{'appCode':_0x2459e0}});return _0x22dbee[_0x17ee8a(0xd9)];}export async function getPageDetail(_0x45ca8e){const _0xa73112=a200_0x589f,_0xce1f35=await apiRequest(_0xa73112(0xd1)+_0x45ca8e);if(!_0xce1f35[_0xa73112(0xd9)])throw CliErrors[_0xa73112(0xa5)](_0xa73112(0x98)+_0x45ca8e);return _0xce1f35[_0xa73112(0xd9)];}export async function listDeletedPages(_0x317364,_0x596a4d,_0x51fcef){const _0x1f2ab2=a200_0x589f,_0x3febfa=new URLSearchParams({'appCode':_0x317364,'type':_0x596a4d,'currentPage':String(_0x51fcef[_0x1f2ab2(0x11c)]),'pageSize':String(_0x51fcef['pageSize'])}),_0x222e9b=await apiRequest(_0x1f2ab2(0x151)+_0x3febfa['toString']());return _0x222e9b[_0x1f2ab2(0xd9)];}export async function restoreStandardPage(_0x448af9){const _0x1642e7=a200_0x589f;await apiRequest(_0x1642e7(0x143),{'method':_0x1642e7(0xf7),'body':{'id':_0x448af9}});}export async function restoreJsxPage(_0x5526bc,_0x3cd11f){const _0x11928a=a200_0x589f,_0x246a7c=await apiRequest(_0x11928a(0x10d),{'method':'POST','body':{'appCode':_0x5526bc,'id':_0x3cd11f}});return _0x246a7c[_0x11928a(0xd9)];}export async function updatePage(_0x1a2689,_0x2abd28,_0xdb09d8,_0xfdf383){const _0x550441=a200_0x589f,_0x5c8611=await apiRequest(_0x550441(0x128),{'method':_0x550441(0xf7),'body':{'appCode':_0x1a2689,'pageId':_0x2abd28,'code':_0xdb09d8,'datasetIds':_0xfdf383}});return _0x5c8611[_0x550441(0xd9)];}export function generateSdkCode(_0x5cddc8,_0x44e308,_0x5981c7){const _0xbd274=a200_0x589f,_0x5e0e78=_0x5981c7?.[_0xbd274(0xa2)]??!![],_0x92cb8b=_0xbd274(0x102)+_0x5cddc8['code']?.[_0xbd274(0x15b)](/-/g,'_'),_0x3a496a=_0x44e308[_0xbd274(0xb0)]||_0x44e308[_0xbd274(0x113)]||'filter',_0x57d970=[];_0x5e0e78&&_0x57d970[_0xbd274(0x187)](_0xbd274(0x9d),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x57d970['push'](_0xbd274(0xe8)+_0x5cddc8[_0xbd274(0xb0)]+'\x20('+(_0x5cddc8['tableName']||_0xbd274(0xb7))+')');if(_0x3a496a===_0xbd274(0x10e))_0x57d970[_0xbd274(0x187)](_0xbd274(0x140)+_0x92cb8b+_0xbd274(0xb4),_0xbd274(0x13c),'\x20\x20pageSize:\x2020,','\x20\x20currentPage:\x201,',_0xbd274(0xe5));else{if(_0x3a496a==='getOne')_0x57d970['push']('const\x20result\x20=\x20await\x20client.models.'+_0x92cb8b+_0xbd274(0xbd));else{if(_0x3a496a===_0xbd274(0x11d))_0x57d970[_0xbd274(0x187)]('const\x20result\x20=\x20await\x20client.models.'+_0x92cb8b+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x3a496a==='update')_0x57d970['push'](_0xbd274(0x140)+_0x92cb8b+_0xbd274(0xd8));else _0x3a496a===_0xbd274(0x16f)||_0x3a496a===_0xbd274(0x99)?_0x57d970[_0xbd274(0x187)](_0xbd274(0x140)+_0x92cb8b+_0xbd274(0xe1)):_0x57d970[_0xbd274(0x187)](_0xbd274(0x140)+_0x92cb8b+'.'+_0x3a496a+_0xbd274(0x17d));}}}return _0x57d970[_0xbd274(0x124)]('\x0a');}export function generateSqlCodeTemplate(_0x571117,_0xfca93e){const _0x4c3712=a200_0x589f,_0x1dcd58=_0xfca93e?.[_0x4c3712(0x153)]??_0x4c3712(0x17e),_0x30a158=_0xfca93e?.[_0x4c3712(0xa2)]??!![],_0x473d93=[];return _0x473d93[_0x4c3712(0x187)]('//\x20SQL:\x20'+_0x571117[_0x4c3712(0xa9)]+'\x20('+_0x571117[_0x4c3712(0x17b)]+')'),_0x1dcd58===_0x4c3712(0x17e)?(_0x30a158&&_0x473d93[_0x4c3712(0x187)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x4c3712(0x100),''),_0x473d93['push']('const\x20data\x20=\x20await\x20client.sql.execute({','\x20\x20sqlCode:\x20\x27'+_0x571117[_0x4c3712(0x17b)]+'\x27,',_0x4c3712(0x162),_0x4c3712(0xe5),_0x4c3712(0x138),_0x4c3712(0xd2))):_0x473d93[_0x4c3712(0x187)](_0x4c3712(0x182),_0x4c3712(0xb3),_0x4c3712(0x12e),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x571117[_0x4c3712(0x17b)]+'\x27,',_0x4c3712(0x101),_0x4c3712(0x183),_0x4c3712(0xae),'}'),_0x473d93[_0x4c3712(0x124)]('\x0a');}export async function getErConfig(_0x56bb24,_0x90b3fc){const _0x43b27b=a200_0x589f,_0x39826e=await apiRequest(_0x43b27b(0x13d),{'method':'POST','body':{'appCode':_0x56bb24,'dblinkId':_0x90b3fc},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x39826e[_0x43b27b(0xd9)];}export async function getErRelationDetail(_0x4cdf8d,_0xdc2d82){const _0x22c8e8=a200_0x589f,_0x507750=new URLSearchParams({'appCode':_0x4cdf8d,'relationId':String(_0xdc2d82)});try{const _0x220842=await apiRequest('/smartapi/question/er-config/cli/detail?'+_0x507750[_0x22c8e8(0x188)]());return _0x220842[_0x22c8e8(0xd9)]?.[_0x22c8e8(0xbb)]??null;}catch(_0x5eee9c){if(_0x5eee9c instanceof CliError&&_0x5eee9c[_0x22c8e8(0xd5)]===_0x22c8e8(0xee)&&(_0x5eee9c[_0x22c8e8(0xf1)]?.[_0x22c8e8(0x181)](_0x22c8e8(0x136))||_0x5eee9c[_0x22c8e8(0xf1)]===_0x22c8e8(0xa1)&&_0x5eee9c[_0x22c8e8(0x9c)]===_0x22c8e8(0xce)))return null;throw _0x5eee9c;}}export async function createErRelation(_0x5469e0){const _0x4c595c=a200_0x589f,_0x5985aa=await apiRequest(_0x4c595c(0x120),{'method':'POST','body':_0x5469e0,'allowNonJsonSuccess':!![]});return _0x5985aa[_0x4c595c(0xd9)];}export async function updateErRelation(_0x51e881){const _0x33f9c5=a200_0x589f,_0x1f4100=await apiRequest(_0x33f9c5(0xb9),{'method':'POST','body':_0x51e881,'allowNonJsonSuccess':!![]});return _0x1f4100[_0x33f9c5(0xd9)];}export async function deleteErRelation(_0x1c9ea8){const _0x489c7f=a200_0x589f,_0x554e5a=await apiRequest(_0x489c7f(0x161),{'method':_0x489c7f(0xf7),'body':_0x1c9ea8,'allowNonJsonSuccess':!![]});return _0x554e5a[_0x489c7f(0xd9)];}export async function updateErBusinessGroup(_0x1668f7){const _0x522cc9=a200_0x589f,_0x4e1d89=await apiRequest(_0x522cc9(0x116),{'method':_0x522cc9(0xf7),'body':_0x1668f7,'allowNonJsonSuccess':!![]});return _0x4e1d89[_0x522cc9(0xd9)];}function buildQuery(_0x8c986){const _0x2238a1=a200_0x589f,_0x475e47=new URLSearchParams();for(const [_0x3efd2a,_0x315a26]of Object[_0x2238a1(0xfc)](_0x8c986)){if(_0x315a26===undefined||_0x315a26==='')continue;_0x475e47[_0x2238a1(0x91)](_0x3efd2a,String(_0x315a26));}const _0x5833c3=_0x475e47['toString']();return _0x5833c3?'?'+_0x5833c3:'';}export async function listNotificationChannelConfigs(_0x4cfabc,_0x31cca1){const _0x3d266b=a200_0x589f,_0x3a93ff=await apiRequest(_0x3d266b(0x14e)+buildQuery({'appCode':_0x4cfabc,'channelType':_0x31cca1}));return Array[_0x3d266b(0xc5)](_0x3a93ff[_0x3d266b(0xd9)])?_0x3a93ff[_0x3d266b(0xd9)]:[];}export async function listAppConfigs(_0x22abc6,_0x1540f0){const _0x67e54c=a200_0x589f,_0x1c4c4a=await apiRequest(_0x67e54c(0x16b),{'method':_0x67e54c(0xf7),'body':{'appCode':_0x22abc6,..._0x1540f0?.[_0x67e54c(0x174)]?{'key':_0x1540f0[_0x67e54c(0x174)]}:{},..._0x1540f0?.[_0x67e54c(0xa7)]?{'tags':_0x1540f0[_0x67e54c(0xa7)]}:{}}});return extractAppConfigList(_0x1c4c4a[_0x67e54c(0xd9)]);}export async function getAppConfigByKey(_0x4c8ea6,_0x41a6c6){const _0x541247=a200_0x589f,_0x20a361=await apiRequest(_0x541247(0xdd)+buildQuery({'appCode':_0x4c8ea6,'key':_0x41a6c6}));return _0x20a361['data']??null;}function a200_0x589f(_0x2162be,_0x5043ba){_0x2162be=_0x2162be-0x8d;const _0x46a605=a200_0x46a6();let _0x589fc7=_0x46a605[_0x2162be];return _0x589fc7;}export async function createAppConfig(_0x3aa875){const _0x484b7d=a200_0x589f,_0x53bc13=await apiRequest('/smartapi/app-config/create',{'method':_0x484b7d(0xf7),'body':{'appCode':_0x3aa875[_0x484b7d(0x155)],'key':_0x3aa875[_0x484b7d(0x174)],'value':_0x3aa875['value'],..._0x3aa875[_0x484b7d(0xa7)]?{'tags':_0x3aa875[_0x484b7d(0xa7)]}:{}}});return _0x53bc13[_0x484b7d(0xd9)];}export async function updateAppConfig(_0x1d0f58){const _0x491920=a200_0x589f;await apiRequest('/smartapi/app-config/update',{'method':'POST','body':{'id':_0x1d0f58['id'],'appCode':_0x1d0f58[_0x491920(0x155)],'key':_0x1d0f58[_0x491920(0x174)],'value':_0x1d0f58[_0x491920(0xc1)],..._0x1d0f58[_0x491920(0xa7)]?{'tags':_0x1d0f58[_0x491920(0xa7)]}:{}}});}export async function deleteAppConfig(_0x2d53fa){const _0xbe44f8=a200_0x589f;await apiRequest(_0xbe44f8(0x13f),{'method':'POST','body':_0x2d53fa});}function extractAppConfigList(_0x31e68f){const _0x39135f=a200_0x589f;if(Array[_0x39135f(0xc5)](_0x31e68f))return _0x31e68f;if(_0x31e68f&&typeof _0x31e68f===_0x39135f(0x129)&&Array[_0x39135f(0xc5)](_0x31e68f[_0x39135f(0x93)]))return _0x31e68f[_0x39135f(0x93)];return extractList(_0x31e68f);}export async function listDbLinks(_0x3e861a,_0x6fa370){const _0x4200f5=a200_0x589f,_0x51a4bf=await apiRequest(_0x4200f5(0xe7),{'method':'POST','body':{'appCode':_0x3e861a,'currentPage':_0x6fa370?.['currentPage']??0x1,'pageSize':_0x6fa370?.[_0x4200f5(0xd3)]??0x64}});return{'items':extractList(_0x51a4bf[_0x4200f5(0xd9)]),'paging':extractPaging(_0x51a4bf[_0x4200f5(0xd9)])};}export async function getDbLinkInfo(_0x24e7e0){const _0x19cb07=a200_0x589f,_0x536252=await apiRequest(_0x19cb07(0xb8)+buildQuery({'id':_0x24e7e0}));return _0x536252[_0x19cb07(0xd9)];}export async function createDbLink(_0x10f3b0){const _0x5c9743=a200_0x589f,_0x39f9d0=await apiRequest(_0x5c9743(0xc2),{'method':_0x5c9743(0xf7),'body':_0x10f3b0});return _0x39f9d0[_0x5c9743(0xd9)];}export async function updateDbLink(_0x3d3b42){const _0x1498dd=a200_0x589f,_0x3ed9f6=await apiRequest(_0x1498dd(0x14f),{'method':_0x1498dd(0xf7),'body':_0x3d3b42});return _0x3ed9f6[_0x1498dd(0xd9)];}export async function deleteDbLink(_0x589203){const _0x41605a=a200_0x589f;await apiRequest(_0x41605a(0xd4),{'method':_0x41605a(0xf7),'body':{'id':_0x589203}});}export async function testDbLinkConnect(_0xde0b6e){const _0x23600c=a200_0x589f,_0x5a6d4d=await apiRequest(_0x23600c(0x9b)+buildQuery({'id':_0xde0b6e}));return _0x5a6d4d[_0x23600c(0xd9)];}export async function startDbAnalysis(_0x23b003,_0x52b8fa){const _0x43a7ab=a200_0x589f,_0x58743b=await apiRequest('/smartapi/db-analysis/start',{'method':_0x43a7ab(0xf7),'body':{'dbLinkId':_0x23b003,..._0x52b8fa&&_0x52b8fa['length']>0x0?{'tableNames':_0x52b8fa}:{}}});return _0x58743b[_0x43a7ab(0xd9)];}export async function cancelDbAnalysis(_0x3ed904){const _0x28725d=a200_0x589f;await apiRequest(_0x28725d(0x185)+buildQuery({'planId':_0x3ed904}),{'method':'POST'});}export async function getDbAnalysisStatus(_0xbc6d66){const _0x284dbf=a200_0x589f,_0x17606d=await apiRequest(_0x284dbf(0x12a)+encodeURIComponent(_0xbc6d66));return _0x17606d[_0x284dbf(0xd9)];}export async function getDbAllTableList(_0x19cf16,_0x25a6c9){const _0x577789=a200_0x589f,_0x123d7e=await apiRequest(_0x577789(0xde)+buildQuery({'appCode':_0x19cf16,'dbLinkId':_0x25a6c9})),_0x56a57b=_0x123d7e[_0x577789(0xd9)];if(Array[_0x577789(0xc5)](_0x56a57b))return _0x56a57b;return extractList(_0x56a57b);}export async function getDbTableDiff(_0x24d168,_0xdb983b,_0x512603){const _0x4917f6=a200_0x589f,_0xad7609=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x24d168,'dbLinkId':_0xdb983b,'pageIndex':_0x512603?.[_0x4917f6(0x189)]??0x1,'pageSize':_0x512603?.['pageSize']??0x14,'tableName':_0x512603?.[_0x4917f6(0xa0)]})),_0xde404b=_0xad7609['data'];return{'totalCount':_0xde404b?.[_0x4917f6(0x164)]??0x0,'physicalTableCount':_0xde404b?.[_0x4917f6(0x172)]??0x0,'datasetTableCount':_0xde404b?.[_0x4917f6(0xdb)]??0x0,..._0xde404b?.['summary']?{'summary':_0xde404b[_0x4917f6(0xc9)]}:{},'tableList':Array[_0x4917f6(0xc5)](_0xde404b?.[_0x4917f6(0x168)])?_0xde404b[_0x4917f6(0x168)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x4c5f1d=a200_0x589f,_0x265c03=await apiRequest(_0x4c5f1d(0xe3),{'method':_0x4c5f1d(0xf7),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x2630a0=extractList(_0x265c03[_0x4c5f1d(0xd9)]),_0x149d3a=extractPaging(_0x265c03[_0x4c5f1d(0xd9)]);return _0x149d3a&&_0x149d3a[_0x4c5f1d(0x164)]>REMOTE_APP_PAGE_SIZE&&console[_0x4c5f1d(0xba)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+_0x4c5f1d(0x137)+_0x149d3a['totalCount']+'\x20apps.\x20'+_0x4c5f1d(0xd0)),_0x2630a0;}const APP_ROLE_PAGE_SIZE_MAX=0x64;function a200_0x46a6(){const _0x332db8=['cookie','DATA_NOT_EXIST','\x20of\x20','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','9JNUBrL','/api/node-toolbox/dataset/model-list?','\x20\x20where:\x20{},','/smartapi/question/er-config','API\x20error:\x20','/smartapi/app-config/delete','const\x20result\x20=\x20await\x20client.models.','Operation\x20\x22','1981558GOSoXi','/smartapi/page/restore','/smartapi/custom/deleteUserCustomSql','Request\x20timeout:\x20','):\x20missing\x20data.markdown\x20field','12jYWjLK','/api/management/library/scripts/delete','UNAUTHORIZED','trim','scriptName','/smartapi/dataset/text-generate/status?','cli:rabetbase','/notification/channel-config/list','/smartapi/dblink/update','min','/smartapi/page/getDeletedPageList?','/smartapi/menu/create','target','abort','appCode','/smartapi/dataset/text-generate/start','errorCode','operationId','label','API\x20error\x20code:\x20','replace','userTenantRelationList','/smartapi/menu/update','Fetch\x20datasets','string','1880140lDKGZq','/smartapi/question/er-config/cli/delete-single','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','401','totalCount','\x20failed,\x20HTTP\x20','/smartapi/permit/resource/get-menu-list','CUSTOM','tableList','markdown','Dataset\x20not\x20found:\x20','/smartapi/app-config/list','remark','/smartapi/permit/role/delete','stringify','delete','body','requestFields','physicalTableCount','/api/management/library/scripts/statistics?appCode=','key','/smartapi/custom/updateUserCustomSql','?sqlCode=','getOne','/smartapi/menu/regroup','roleType','Check\x20network\x20connectivity\x20and\x20try\x20again.','sqlCode','/smartapi/menu/delete','(/*\x20params\x20*/);','sdk','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','success','includes','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','\x20\x20});','/smartapi/tasks/','/smartapi/db-analysis/jobs/cancel','/smartapi/dataset/update-driven-data','push','toString','pageIndex','/smartapi/dataset/delete-dataset','requirementDescription','dbtableConfig','toLowerCase','set','ENABLE','list','/smartapi/permit/role/get-one','userId','info','1217676VORFkb','Page\x20not\x20found:\x20','remove','/smartapi/dataset/restore-dataset','/smartapi/dblink/testConnect','message','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','operations','needPublic','tableName','API\x20error\x20code:\x20306','includeImports','BFF\x20save\x20returned\x20no\x20valid\x20id','type','validation','avatar','tags','/api/custom/executeSql','sqlName','path','/smartapi/permit/page/get-one','map','/smartapi/menu/batchDelete','\x20\x20return\x20rows;','has','name','permits','24427090eKWpTX','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','.filter({','test','/api/management/library/scripts/info?id=','table','/smartapi/dblink/getOne','/smartapi/question/er-config/cli/update-single','warn','relation','/api/management/library/scripts/save','.getOne(id);','scriptType','errorMessage','/smartapi/custom/saveUserCustomSql','value','/smartapi/dblink/create','modelId','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','isArray','/sync-to-pages','/smartapi/common/uploadFile','roleName','summary','/smartapi/permit/role/get-permit-list','append','\x22\x20not\x20found\x20in\x20dataset\x20','7DArplZ','ER\x20relation\x20does\x20not\x20exist','method','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','/smartapi/lovrabet/detail?pageId=','const\x20results\x20=\x20data.execResult\x20||\x20[];','pageSize','/smartapi/dblink/delete','code','find','signal','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','data','/smartapi/custom/getUserCustomSql?id=','datasetTableCount','/smartapi/lovrabet/dataset/','/smartapi/app-config/getByKey','/smartapi/dblink/getAllTableList','BFF\x20script\x20not\x20found:\x20id=','Unauthorized','.remove(id);','displayName','/smartapi/app/getList','deleted','});','AbortError','/smartapi/dblink/getList','//\x20','/api/node-toolbox/api-doc-generator','needSelf','datasetName','clientOperationId','longTerm','api_error','file','status','hint','GET','error','/api/','/smartapi/dataset/text-generate/preview','/smartapi/permit/resource/get-api-list','POST','/smartapi/dataset/get-dataset-operation','/generate-standard-pages/start','version','/smartapi/permit/user-role/update-user-list','entries','SQL\x20query\x20not\x20found:\x20id=','add','Fetch\x20async\x20task\x20','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','dataset_','responseFields','9204904HnEfNJ','4270767OtNldm','Invalid\x20response\x20format\x20(','description','errorMsg','/filter','/smartapi/dataset/get-dataset-list','email','/smartapi/permit/page/save','/smartapi/webcode/page/restore','filter','/api/node-toolbox/sql/save','nickname','isFinite','/userTenant/getByTenantCode','operationName','enabled','modelCode','/smartapi/question/er-config/business-group/edit','/smartapi/common/queryFileUrl','/smartapi/permit/role/get-list','/smartapi/custom/queryUserCustomSqlList','tableData','/smartapi/permit/user-role/get-user-list','currentPage','create','length','authRequired','/smartapi/question/er-config/cli/erCreate','apiError','&type=','/smartapi/dataset/get-driven-data?','join','/smartapi/permit/role/update','functionName','application/json','/smartapi/lovrabet/update-page','object','/smartapi/db-analysis/status/','max','SQL\x20query\x20not\x20found:\x20','806449MpGEfZ','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','startsWith','/smartapi/custom/getUserCustomSql','json','正在从服务器拉取模型列表...\x20(环境:\x20','/smartapi/ocr/recognize-text?'];a200_0x46a6=function(){return _0x332db8;};return a200_0x46a6();}export async function listAppRoles(_0x555180,_0x535d2a){const _0x274638=a200_0x589f,_0x372ce4=Math[_0x274638(0x150)](Math[_0x274638(0x12b)](_0x535d2a?.['pageSize']??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x3476fd=await apiRequest(_0x274638(0x118),{'method':_0x274638(0xf7),'body':{'appCode':_0x555180,'currentPage':_0x535d2a?.[_0x274638(0x11c)]??0x1,'pageSize':_0x372ce4}});return{'items':extractList(_0x3476fd[_0x274638(0xd9)]),'paging':extractPaging(_0x3476fd[_0x274638(0xd9)])};}export async function getAppRole(_0x152e26){const _0x4c9b0a=a200_0x589f,_0x4e6290=await apiRequest(_0x4c9b0a(0x94)+buildQuery({'id':_0x152e26}));return _0x4e6290['data'];}export async function createAppRole(_0x484f88){const _0x12b98c=a200_0x589f,_0x138a02=await apiRequest('/smartapi/permit/role/create',{'method':_0x12b98c(0xf7),'body':{'appCode':_0x484f88['appCode'],'roleName':_0x484f88[_0x12b98c(0xc8)],'roleType':_0x12b98c(0x167),..._0x484f88[_0x12b98c(0x16c)]?{'remark':_0x484f88['remark']}:{}}});return _0x138a02[_0x12b98c(0xd9)];}export async function updateAppRole(_0x7ba694){const _0x3e3933=a200_0x589f,_0x549853=await apiRequest(_0x3e3933(0x125),{'method':_0x3e3933(0xf7),'body':{'id':_0x7ba694['id'],'appCode':_0x7ba694[_0x3e3933(0x155)],..._0x7ba694[_0x3e3933(0x179)]?{'roleType':_0x7ba694['roleType']}:{},..._0x7ba694[_0x3e3933(0xc8)]!==undefined?{'roleName':_0x7ba694['roleName']}:{},..._0x7ba694['remark']!==undefined?{'remark':_0x7ba694[_0x3e3933(0x16c)]}:{},..._0x7ba694['permits']?{'permits':_0x7ba694[_0x3e3933(0xb1)]}:{}}});return _0x549853[_0x3e3933(0xd9)];}export async function deleteAppRole(_0x389843){const _0x224a41=a200_0x589f;await apiRequest(_0x224a41(0x16d),{'method':_0x224a41(0xf7),'body':{'id':_0x389843}});}export async function listPermitRoles(_0x1b23d6,_0x2dcb10){const _0x32c22f=a200_0x589f,_0x245e5e=await apiRequest(_0x32c22f(0xca),{'method':_0x32c22f(0xf7),'body':{'appCode':_0x1b23d6,..._0x2dcb10?.[_0x32c22f(0xea)]!==undefined?{'needSelf':_0x2dcb10[_0x32c22f(0xea)]}:{},..._0x2dcb10?.['needPublic']!==undefined?{'needPublic':_0x2dcb10[_0x32c22f(0x9f)]}:{}}});return extractList(_0x245e5e[_0x32c22f(0xd9)]);}export async function getRoleMenuResources(_0xb225aa,_0xfd7fac){const _0x5f12c6=a200_0x589f,_0x1a7dde=await apiRequest(_0x5f12c6(0x166),{'method':_0x5f12c6(0xf7),'body':{'appCode':_0xb225aa,'roleId':_0xfd7fac}});return extractList(_0x1a7dde[_0x5f12c6(0xd9)]);}export async function getRoleApiResources(_0x184fbc,_0x2dd7b0){const _0x3c1759=a200_0x589f,_0x5a19d7=await apiRequest(_0x3c1759(0xf6),{'method':'POST','body':{'appCode':_0x184fbc,'roleId':_0x2dd7b0}});return extractList(_0x5a19d7[_0x3c1759(0xd9)]);}export async function listRoleUsers(_0x3ce1bd){const _0x581113=a200_0x589f,_0x328acc=await apiRequest(_0x581113(0x11b),{'method':'POST','body':{'appCode':_0x3ce1bd}});return extractList(_0x328acc[_0x581113(0xd9)]);}export async function updateRoleUsers(_0x28531a,_0x5c0e47){const _0x3fd41b=a200_0x589f;await apiRequest(_0x3fd41b(0xfb),{'method':'POST','body':{'appCode':_0x28531a,'roleList':_0x5c0e47}});}export async function getPagePermit(_0x162a7f){const _0x4bb264=a200_0x589f,_0x3aaaa9=await apiRequest(_0x4bb264(0xab)+buildQuery({'menuId':_0x162a7f}));return _0x3aaaa9[_0x4bb264(0xd9)];}export async function savePagePermit(_0x1e38ac){const _0x12e0d0=a200_0x589f,_0x4829c4=await apiRequest(_0x12e0d0(0x10c),{'method':'POST','body':_0x1e38ac});return _0x4829c4[_0x12e0d0(0xd9)];}export async function getTenantMembers(_0x486928){const _0x50a93c=a200_0x589f,_0x23ec8b=await apiRequest(_0x50a93c(0x112)+buildQuery({'code':_0x486928})),_0x38899b=_0x23ec8b['data']??{},_0x296b78=Array[_0x50a93c(0xc5)](_0x38899b?.[_0x50a93c(0x15c)])?_0x38899b['userTenantRelationList']:[];return _0x296b78[_0x50a93c(0x10e)](_0x85ad75=>_0x85ad75?.['status']===_0x50a93c(0x92)||_0x85ad75?.['status']===undefined)[_0x50a93c(0xac)](_0x3e65eb=>({'userId':Number(_0x3e65eb['userId']??_0x3e65eb['id']),'username':_0x3e65eb['username'],'nickname':_0x3e65eb[_0x50a93c(0x110)],'status':_0x3e65eb[_0x50a93c(0xf0)],'email':_0x3e65eb[_0x50a93c(0x10b)],'mobile':_0x3e65eb['mobile'],'avatar':_0x3e65eb[_0x50a93c(0xa6)]}))[_0x50a93c(0x10e)](_0x27f56a=>Number[_0x50a93c(0x111)](_0x27f56a[_0x50a93c(0x95)])&&_0x27f56a['userId']>0x0);}
1
+ (function(_0x285d57,_0x2af93b){const _0x41d26d=a200_0x325f,_0x28099a=_0x285d57();while(!![]){try{const _0xee13fd=-parseInt(_0x41d26d(0x1b4))/0x1+parseInt(_0x41d26d(0x1e0))/0x2*(parseInt(_0x41d26d(0x1be))/0x3)+parseInt(_0x41d26d(0x213))/0x4+-parseInt(_0x41d26d(0x215))/0x5*(-parseInt(_0x41d26d(0x1fa))/0x6)+parseInt(_0x41d26d(0x22d))/0x7+-parseInt(_0x41d26d(0x1b6))/0x8+-parseInt(_0x41d26d(0x1c8))/0x9*(parseInt(_0x41d26d(0x1fb))/0xa);if(_0xee13fd===_0x2af93b)break;else _0x28099a['push'](_0x28099a['shift']());}catch(_0x3285e2){_0x28099a['push'](_0x28099a['shift']());}}}(a200_0x1cff,0x1cd6e));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x5f2610){_activeCookie=_0x5f2610||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(_0x265694,_0x4b73aa){const _0x27402d=a200_0x325f,_0x3e7e7f=_0x4b73aa instanceof Error?_0x4b73aa[_0x27402d(0x1ad)]:String(_0x4b73aa);return CliErrors[_0x27402d(0x1e5)](_0x27402d(0x25c)+_0x265694+(_0x3e7e7f?'\x20('+_0x3e7e7f+')':''),_0x27402d(0x1db));}async function apiRequest(_0x5b0aa4,_0x351601={}){const _0x59d424=a200_0x325f,{method:method='GET',body:_0x59d047,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x351601,_0x11a651=useRuntime?getRuntimeDomain():getApiDomain(),_0x593319=_activeCookie||getCookie(),_0x52901d=''+_0x11a651+_0x5b0aa4,_0x43dd87=new AbortController(),_0x4afcec=setTimeout(()=>_0x43dd87[_0x59d424(0x1d5)](),timeout);try{const _0x495d85=await fetch(_0x52901d,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x593319,'X-Invoke-Source':_0x59d424(0x246),...headers},'body':_0x59d047?JSON[_0x59d424(0x1c6)](_0x59d047):undefined,'signal':_0x43dd87[_0x59d424(0x1f1)]});let _0x11c866;try{_0x11c866=await _0x495d85[_0x59d424(0x1ee)]();}catch(_0x407cf6){if(_0x407cf6 instanceof Error&&_0x407cf6[_0x59d424(0x197)]===_0x59d424(0x245))throw CliErrors[_0x59d424(0x1e5)](_0x59d424(0x184)+_0x52901d);if(_0x495d85['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x59d424(0x1e5)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x495d85[_0x59d424(0x171)]+')',_0x495d85[_0x59d424(0x171)]>=0x190?_0x59d424(0x1b9):undefined);}if(!_0x495d85['ok']||_0x11c866[_0x59d424(0x1a9)]===![])throw CliErrors[_0x59d424(0x1e5)](_0x11c866[_0x59d424(0x1bd)]||_0x11c866['message']||_0x59d424(0x230)+_0x495d85['status'],_0x11c866[_0x59d424(0x1c5)]?'API\x20error\x20code:\x20'+_0x11c866[_0x59d424(0x1c5)]:undefined);return _0x11c866;}catch(_0x42702e){if(_0x42702e instanceof CliError)throw _0x42702e;if(_0x42702e instanceof Error&&_0x42702e[_0x59d424(0x197)]==='AbortError')throw CliErrors['apiError'](_0x59d424(0x184)+_0x52901d);throw createFetchFailureError(_0x52901d,_0x42702e);}finally{clearTimeout(_0x4afcec);}}async function apiFormRequest(_0x356156,_0x1e9916,_0x8dd757={}){const _0x5d8da5=a200_0x325f,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x8dd757,_0x483f4d=_activeCookie||getCookie(),_0x215dae=''+getApiDomain()+_0x356156,_0x8f2ada=new AbortController(),_0x56ef4b=setTimeout(()=>_0x8f2ada[_0x5d8da5(0x1d5)](),timeout);try{const _0x3d472b=await fetch(_0x215dae,{'method':'POST','headers':{'Cookie':_0x483f4d,'X-Invoke-Source':_0x5d8da5(0x246)},'body':_0x1e9916,'signal':_0x8f2ada[_0x5d8da5(0x1f1)]});let _0x50d2a9;try{_0x50d2a9=await _0x3d472b[_0x5d8da5(0x1ee)]();}catch(_0x3f89a7){if(_0x3f89a7 instanceof Error&&_0x3f89a7['name']===_0x5d8da5(0x245))throw CliErrors[_0x5d8da5(0x1e5)](_0x5d8da5(0x184)+_0x215dae);throw CliErrors[_0x5d8da5(0x1e5)](_0x5d8da5(0x1ed)+_0x3d472b[_0x5d8da5(0x171)]+')',_0x3d472b[_0x5d8da5(0x171)]>=0x190?_0x5d8da5(0x1b9):undefined);}if(!_0x3d472b['ok']||_0x50d2a9[_0x5d8da5(0x1a9)]===![])throw CliErrors[_0x5d8da5(0x1e5)](_0x50d2a9[_0x5d8da5(0x1bd)]||_0x50d2a9['message']||_0x5d8da5(0x230)+_0x3d472b[_0x5d8da5(0x171)],_0x50d2a9[_0x5d8da5(0x1c5)]?'API\x20error\x20code:\x20'+_0x50d2a9[_0x5d8da5(0x1c5)]:undefined);return _0x50d2a9;}catch(_0x65d215){if(_0x65d215 instanceof CliError)throw _0x65d215;if(_0x65d215 instanceof Error&&_0x65d215['name']===_0x5d8da5(0x245))throw CliErrors[_0x5d8da5(0x1e5)](_0x5d8da5(0x184)+_0x215dae);throw createFetchFailureError(_0x215dae,_0x65d215);}finally{clearTimeout(_0x56ef4b);}}export async function uploadDevelopmentFile(_0x11230f,_0x43c812){const _0x5df1b4=a200_0x325f,_0x33e710=await readFile(_0x43c812),_0x280426=new FormData();_0x280426[_0x5df1b4(0x1d6)](_0x5df1b4(0x212),_0x11230f),_0x280426['append'](_0x5df1b4(0x174),new Blob([new Uint8Array(_0x33e710)]),basename(_0x43c812));const _0x2de61d=await apiFormRequest('/smartapi/common/uploadFile',_0x280426);return _0x2de61d['data'];}export async function queryDevelopmentFileUrl(_0x2899cb,_0x51b8a4={}){const _0x535471=a200_0x325f,_0x25a728=await apiRequest(_0x535471(0x240),{'method':_0x535471(0x248),'body':{'filePath':_0x2899cb,'downloadFlag':_0x51b8a4[_0x535471(0x22f)]??![],..._0x51b8a4[_0x535471(0x1bc)]?{'longTerm':!![]}:{}}});return _0x25a728[_0x535471(0x1ec)];}export async function recognizeDevelopmentOcr(_0x2c87a8,_0x484956){const _0x4a1b1a=a200_0x325f,_0x50a61c=new URLSearchParams({'url':_0x484956['url'],'type':_0x484956[_0x4a1b1a(0x23e)],'appCode':_0x2c87a8}),_0xe69016=await apiRequest(_0x4a1b1a(0x204)+_0x50a61c['toString'](),{'method':_0x4a1b1a(0x1bb)});return _0xe69016[_0x4a1b1a(0x1ec)];}function isAuthFailure(_0x2b5f06){const _0x351d7f=a200_0x325f,_0x4c04ba=_0x2b5f06[_0x351d7f(0x1bd)]||_0x2b5f06[_0x351d7f(0x1ad)]||_0x2b5f06[_0x351d7f(0x1ec)]?.[_0x351d7f(0x1ad)]||_0x2b5f06['errorMessage']||_0x2b5f06[_0x351d7f(0x201)]||'';return _0x2b5f06[_0x351d7f(0x1c5)]===_0x351d7f(0x20c)||_0x2b5f06[_0x351d7f(0x190)]===0x191||_0x2b5f06[_0x351d7f(0x190)]==='401'||_0x4c04ba['includes'](_0x351d7f(0x220))||_0x4c04ba[_0x351d7f(0x1d9)]('Unauthorized')||_0x4c04ba[_0x351d7f(0x1d9)]('登录')||_0x4c04ba['includes']('认证');}export async function platformFetch(_0x2da2b9,_0x408d62){const _0x375e42=a200_0x325f;let _0x5c8dd5;try{_0x5c8dd5=await fetch(_0x2da2b9,{'method':_0x408d62[_0x375e42(0x1af)]??_0x375e42(0x1bb),'headers':{'Content-Type':'application/json','Cookie':_0x408d62[_0x375e42(0x25d)],'X-Invoke-Source':_0x375e42(0x246)},..._0x408d62[_0x375e42(0x192)]&&{'body':JSON[_0x375e42(0x1c6)](_0x408d62[_0x375e42(0x192)])}});}catch(_0xa38b1a){throw createFetchFailureError(_0x2da2b9,_0xa38b1a);}if(!_0x5c8dd5['ok']){if(_0x5c8dd5[_0x375e42(0x171)]===0x191)throw CliErrors[_0x375e42(0x1f2)]();throw CliErrors[_0x375e42(0x1e5)](_0x408d62[_0x375e42(0x258)]+_0x375e42(0x21a)+_0x5c8dd5['status']);}const _0x26ee6d=await _0x5c8dd5['json']();if(_0x26ee6d[_0x375e42(0x1a9)]===![]){if(isAuthFailure(_0x26ee6d))throw CliErrors[_0x375e42(0x1f2)]();throw CliErrors[_0x375e42(0x1e5)](_0x26ee6d[_0x375e42(0x1bd)]||_0x26ee6d['message']||_0x408d62[_0x375e42(0x258)]+'\x20failed');}return _0x26ee6d[_0x375e42(0x1ec)];}export async function platformRequest(_0x1cb462,_0x3f8b3d){const _0xc22505=a200_0x325f;if(/^https?:\/\//i['test'](_0x1cb462))throw CliErrors[_0xc22505(0x1e3)](_0xc22505(0x1aa)+_0x1cb462,_0xc22505(0x1b0));const _0x285ed7=_0x1cb462[_0xc22505(0x260)]('/')?_0x1cb462:'/'+_0x1cb462;return platformFetch(''+getApiDomain()+_0x285ed7,_0x3f8b3d);}function cleanNewlines(_0x182283){const _0x2966d7=a200_0x325f;return _0x182283[_0x2966d7(0x202)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x42744c){const _0x55e2cf=a200_0x325f;if(!_0x42744c[_0x55e2cf(0x197)])return _0x42744c;return{..._0x42744c,'name':cleanNewlines(_0x42744c[_0x55e2cf(0x197)])};}export async function fetchModelList(_0x1031af,_0x128c39){const _0x28b4f7=a200_0x325f,_0x3745e6=getEnv(),_0x4fce33=new URLSearchParams({'appcode':_0x1031af,'otype':_0x28b4f7(0x19b)}),_0x4a2712=_0x28b4f7(0x1f7)+_0x4fce33[_0x28b4f7(0x21d)]();logger[_0x28b4f7(0x185)](_0x28b4f7(0x196),_0x28b4f7(0x183)+_0x3745e6+')',{'apiPath':_0x4a2712});const _0x44d4f5=await platformRequest(_0x4a2712,{'cookie':_0x128c39,'label':_0x28b4f7(0x234)}),_0x32a3d9=(_0x44d4f5[_0x28b4f7(0x1ba)]??[])[_0x28b4f7(0x25e)](cleanDatasetName);return{'configArray':_0x32a3d9,'count':_0x32a3d9[_0x28b4f7(0x1a7)]};}export async function fetchDatasetDoc(_0x31e2e4){const _0x63210a=a200_0x325f,{appCode:_0xfd5b03,cookie:_0x21cbcb,datasetCode:_0x473833,datasetId:_0x463adc,extraParams:_0x3494ee}=_0x31e2e4,_0xfa3baf=await platformRequest(_0x63210a(0x218),{'method':_0x63210a(0x248),'body':{'appCode':_0xfd5b03,'datasetCode':_0x473833,'datasetId':_0x463adc,..._0x3494ee||{}},'cookie':_0x21cbcb,'label':'Fetch\x20doc\x20('+_0x473833+')'});if(!_0xfa3baf||typeof _0xfa3baf[_0x63210a(0x1cd)]!==_0x63210a(0x1ce))throw new Error(_0x63210a(0x1f4)+_0x473833+'):\x20missing\x20data.markdown\x20field');return _0xfa3baf[_0x63210a(0x1cd)];}export async function getMenuTree(_0x4fcfed,_0x29a03c){const _0x65e240=a200_0x325f,_0x3e2ce6=new URLSearchParams({'appCode':_0x4fcfed});return platformRequest('/smartapi/menu/find?'+_0x3e2ce6[_0x65e240(0x21d)](),{'cookie':_0x29a03c,'label':_0x65e240(0x24b)});}export async function createMenuRecord(_0x58f1be,_0x39c9bf,_0x8d713a){const _0x9a21e6=a200_0x325f;return platformRequest(_0x9a21e6(0x232),{'method':'POST','body':_0x58f1be,'cookie':_0x39c9bf,'label':_0x8d713a});}export async function updateMenuRecord(_0x1edee0,_0x5f5a14,_0x54ac8b){const _0x4cb92d=a200_0x325f;return platformRequest(_0x4cb92d(0x19e),{'method':_0x4cb92d(0x248),'body':_0x1edee0,'cookie':_0x5f5a14,'label':_0x54ac8b});}export async function deleteMenuRecord(_0x5e4ba3,_0x1c1610,_0x1cf9b3){const _0x5f4f70=a200_0x325f;return platformRequest(_0x5f4f70(0x238),{'method':'POST','body':{'id':_0x5e4ba3},'cookie':_0x1c1610,'label':_0x1cf9b3});}export async function batchDeleteMenuRecords(_0x461d4b,_0x4b7133,_0x3262fe){const _0x4246f9=a200_0x325f;return platformRequest(_0x4246f9(0x20f),{'method':_0x4246f9(0x248),'body':{'idList':_0x461d4b},'cookie':_0x4b7133,'label':_0x3262fe});}export async function startMenuRegroup(_0x44bbb4,_0x1341a8,_0x21ad47){const _0x5560c7=a200_0x325f;return platformRequest('/smartapi/menu/regroup',{'method':_0x5560c7(0x248),'body':_0x44bbb4,'cookie':_0x1341a8,'label':_0x21ad47});}export async function getAsyncTaskStatus(_0x384606,_0x16d970,_0x31c422){const _0x13b686=a200_0x325f,_0x4cd3c4=new URLSearchParams({'appCode':_0x16d970});return platformRequest(_0x13b686(0x1ac)+encodeURIComponent(_0x384606)+'?'+_0x4cd3c4[_0x13b686(0x21d)](),{'cookie':_0x31c422,'label':_0x13b686(0x1d3)+_0x384606});}export async function listBffScripts(_0x4b8275,_0x13ddd9,_0x30ed41){const _0x3848d3=a200_0x325f;let _0x4ada9e=_0x3848d3(0x25a)+_0x4b8275;if(_0x13ddd9)_0x4ada9e+=_0x3848d3(0x231)+_0x13ddd9;const _0x5c24a1=await apiRequest(_0x4ada9e);let _0x360093=extractList(_0x5c24a1[_0x3848d3(0x1ec)]);if(_0x30ed41?.[_0x3848d3(0x1a6)]){const _0x5bf34f=_0x30ed41[_0x3848d3(0x1a6)][_0x3848d3(0x255)]();_0x360093=_0x360093['filter'](_0x35ba50=>_0x35ba50[_0x3848d3(0x211)]?.[_0x3848d3(0x255)]()['includes'](_0x5bf34f)||_0x35ba50[_0x3848d3(0x1ef)]?.['toLowerCase']()['includes'](_0x5bf34f));}return _0x360093;}export async function getBffScriptInfo(_0x543547){const _0x4a9f18=a200_0x325f,_0x41ebe5=await apiRequest(_0x4a9f18(0x17d)+_0x543547);if(!_0x41ebe5[_0x4a9f18(0x1ec)])throw CliErrors[_0x4a9f18(0x1e3)](_0x4a9f18(0x17b)+_0x543547);return _0x41ebe5['data'];}export async function saveBffScript(_0x20cbc0){const _0x45ae0e=a200_0x325f,_0x4fc0f2=await apiRequest('/api/management/library/scripts/save',{'method':_0x45ae0e(0x248),'body':_0x20cbc0}),{id:_0xb63c79,entity:_0x16a906}=normalizeEntityWithIdResponse(_0x4fc0f2[_0x45ae0e(0x1ec)]);if(_0xb63c79!==undefined){const _0x5e321f=typeof _0x16a906['functionName']===_0x45ae0e(0x1ce)||typeof _0x16a906['scriptType']===_0x45ae0e(0x1ce)?_0x16a906:undefined;return{'id':_0xb63c79,'script':_0x5e321f};}throw CliErrors[_0x45ae0e(0x1e5)](_0x45ae0e(0x1bf));}export async function deleteBffScript(_0x5d4744){const _0x3c46f6=a200_0x325f;await apiRequest(_0x3c46f6(0x24f),{'method':_0x3c46f6(0x248),'body':{'id':_0x5d4744}});}export async function getBffScriptStatistics(_0x7c4fdb){const _0x186d66=a200_0x325f,_0x46111e=await apiRequest(_0x186d66(0x193)+_0x7c4fdb);return extractList(_0x46111e['data']);}export async function clearBffScriptCache(){const _0x2bc52b=a200_0x325f,_0xec57ea=await apiRequest('/api/management/script/cache/clear',{'method':'POST','useRuntime':!![]});return typeof _0xec57ea[_0x2bc52b(0x1ec)]==='string'?_0xec57ea[_0x2bc52b(0x1ec)]:'';}export async function listBffDatasetOperations(_0x33ef2b,_0x1ba2c0){const _0xc677be=a200_0x325f,_0x4424e9=await apiRequest('/smartapi/dataset/get-dataset-operation',{'method':_0xc677be(0x248),'body':{'appCode':_0x33ef2b,'datasetId':_0x1ba2c0}});return _0x4424e9[_0xc677be(0x1ec)];}export async function listSqlQueries(_0x4961ca,_0x113aff){const _0x28410f=a200_0x325f,_0x37b450=await apiRequest(_0x28410f(0x223),{'method':_0x28410f(0x248),'body':{'appCode':_0x4961ca,'currentPage':_0x113aff?.[_0x28410f(0x173)]??0x1,'pageSize':_0x113aff?.[_0x28410f(0x19f)]??0x32,'sqlCode':_0x113aff?.[_0x28410f(0x1b2)],'sqlName':_0x113aff?.['sqlName']}});return _0x37b450[_0x28410f(0x1ec)];}export async function getSqlQueryInfo(_0x5e7d2b,_0x261b6f){const _0x2eb43c=a200_0x325f,_0x1f9aa1=await listSqlQueries(_0x5e7d2b,{'sqlCode':_0x261b6f}),_0x3ac016=_0x1f9aa1[_0x2eb43c(0x1ea)]?.[0x0];if(!_0x3ac016)throw CliErrors['validation'](_0x2eb43c(0x1df)+_0x261b6f);return _0x3ac016;}export async function getSqlQueryDetail(_0x46967e){const _0x47ebe7=a200_0x325f,_0x102ddf=await apiRequest(_0x47ebe7(0x22c)+(_0x47ebe7(0x208)+encodeURIComponent(_0x46967e)));if(!_0x102ddf[_0x47ebe7(0x1ec)])throw CliErrors['validation'](_0x47ebe7(0x1df)+_0x46967e);return _0x102ddf['data'];}export async function getSqlQueryDetailById(_0xf38177){const _0x1d5698=a200_0x325f,_0x295104=await apiRequest('/smartapi/custom/getUserCustomSql?id='+_0xf38177);if(!_0x295104['data'])throw CliErrors[_0x1d5698(0x1e3)](_0x1d5698(0x1d4)+_0xf38177);return _0x295104[_0x1d5698(0x1ec)];}export async function createSqlQuery(_0x29ebb3){const _0x47ce9d=a200_0x325f,_0x3c9128=await apiRequest(_0x47ce9d(0x1b3),{'method':_0x47ce9d(0x248),'body':_0x29ebb3}),{id:_0x335011,entity:_0x114b93}=normalizeEntityWithIdResponse(_0x3c9128[_0x47ce9d(0x1ec)]);if(!('sqlCode'in _0x114b93)&&_0x335011)return getSqlQueryDetailById(_0x335011);return normalizeSqlQueryEntity(_0x114b93);}export async function updateSqlQuery(_0x1930f0){const _0x218afd=a200_0x325f,_0x3d200b=await apiRequest(_0x218afd(0x1e6),{'method':_0x218afd(0x248),'body':_0x1930f0}),{id:_0x1f7347,entity:_0x9ca283}=normalizeEntityWithIdResponse(_0x3d200b['data']);if(!('sqlCode'in _0x9ca283)){if(_0x1930f0['sqlCode'])return getSqlQueryDetail(_0x1930f0['sqlCode']);if(_0x1f7347)return getSqlQueryDetailById(_0x1f7347);}return normalizeSqlQueryEntity(_0x9ca283);}export async function deleteSqlQuery(_0x222fd4){const _0x110fdb=a200_0x325f;await apiRequest(_0x110fdb(0x233),{'method':_0x110fdb(0x248),'body':_0x222fd4});}export async function saveSqlQuery(_0x36fe8d){const _0x2e4135=a200_0x325f,_0x5357e9=await apiRequest(_0x2e4135(0x186),{'method':_0x2e4135(0x248),'body':_0x36fe8d});return _0x5357e9[_0x2e4135(0x1ec)];}function normalizeSqlQueryEntity(_0x259398){const _0x511049=a200_0x325f;return{..._0x259398,'id':Number(_0x259398['id']),'dbId':_0x259398[_0x511049(0x17a)]==null?undefined:Number(_0x259398['dbId']),'version':_0x259398[_0x511049(0x23c)]==null?undefined:Number(_0x259398[_0x511049(0x23c)])};}export async function executeSql(_0x482b5d,_0x1be95b,_0x3f9767){const _0xd7fdc5=a200_0x325f,_0x48e1f9=await apiRequest(_0xd7fdc5(0x1e9),{'method':_0xd7fdc5(0x248),'body':{'appCode':_0x482b5d,'sqlCode':_0x1be95b,..._0x3f9767&&{'params':_0x3f9767}},'useRuntime':!![]});return _0x48e1f9['data'];}export async function executeDatasetDataOperation(_0xac73c2,_0x31cad1,_0x2930a9,_0x4b6d74={}){const _0x4bbd78=a200_0x325f;try{const _0x56c56d=await apiRequest(_0x4bbd78(0x1e7)+_0xac73c2+'/'+_0x31cad1+'/'+_0x2930a9,{'method':'POST','body':_0x4b6d74,'useRuntime':!![]});return _0x56c56d['data'];}catch(_0x280bca){if(_0x2930a9==='getOne'&&_0x280bca instanceof CliError&&_0x280bca[_0x4bbd78(0x190)]==='api_error'&&_0x4b6d74['id']!==undefined&&_0x4b6d74['id']!==null&&_0x4b6d74['id']!==''){const _0x1ccf56=await apiRequest(_0x4bbd78(0x1e7)+_0xac73c2+'/'+_0x31cad1+_0x4bbd78(0x20a),{'method':_0x4bbd78(0x248),'body':{'where':{'id':{'$eq':_0x4b6d74['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0xcf75b9=Array[_0x4bbd78(0x1c2)](_0x1ccf56[_0x4bbd78(0x1ec)]?.[_0x4bbd78(0x1ea)])?_0x1ccf56['data'][_0x4bbd78(0x1ea)]:[];return _0xcf75b9[0x0]??null;}throw _0x280bca;}}export async function listDatasets(_0xd255b8,_0x4ad7b3){const _0x5e5006=a200_0x325f,_0x5dc93f={'appCode':_0xd255b8,'deleted':_0x4ad7b3?.[_0x5e5006(0x25f)]??![]};if(_0x4ad7b3?.['code'])_0x5dc93f[_0x5e5006(0x190)]=_0x4ad7b3[_0x5e5006(0x190)];if(_0x4ad7b3?.[_0x5e5006(0x197)])_0x5dc93f[_0x5e5006(0x197)]=_0x4ad7b3[_0x5e5006(0x197)];const _0x34ee59=await apiRequest(_0x5e5006(0x209),{'method':_0x5e5006(0x248),'body':_0x5dc93f});return extractList(_0x34ee59[_0x5e5006(0x1ec)]);}export async function deleteDataset(_0x3f4a84,_0x1ea74b){const _0x253063=a200_0x325f;await apiRequest(_0x253063(0x1f0),{'method':_0x253063(0x248),'body':{'appCode':_0x3f4a84,'datasetId':_0x1ea74b}});}export async function restoreDataset(_0x56318a,_0x7298d9){const _0x285f75=a200_0x325f;await apiRequest(_0x285f75(0x172),{'method':_0x285f75(0x248),'body':{'appCode':_0x56318a,'datasetId':_0x7298d9}});}export async function previewTextGeneratedDataset(_0x311822,_0x313188){const _0x12ba57=a200_0x325f,_0x54eb29=await apiRequest('/smartapi/dataset/text-generate/preview',{'method':_0x12ba57(0x248),'body':{'appCode':_0x311822,'datasetName':_0x313188['datasetName'],'requirementDescription':_0x313188['requirementDescription']},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x54eb29['data'];}export async function startTextGeneratedDataset(_0x2b4dfc,_0x14b2ae,_0x3f2ce4){const _0x4a1075=a200_0x325f,_0x4f6115=await apiRequest(_0x4a1075(0x18d),{'method':'POST','body':{'appCode':_0x2b4dfc,..._0x3f2ce4?.['clientOperationId']?{'clientOperationId':_0x3f2ce4[_0x4a1075(0x199)]}:{},'design':_0x14b2ae},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x4f6115[_0x4a1075(0x1ec)];}export async function getTextGeneratedDatasetStatus(_0x6c6827,_0x10e2b2){const _0x48cdb0=a200_0x325f,_0x554e7d=new URLSearchParams({'appCode':_0x6c6827});_0x10e2b2['operationId']&&_0x554e7d['set'](_0x48cdb0(0x23a),_0x10e2b2[_0x48cdb0(0x23a)]);_0x10e2b2['clientOperationId']&&_0x554e7d['set']('clientOperationId',_0x10e2b2[_0x48cdb0(0x199)]);const _0x153cce=await apiRequest('/smartapi/dataset/text-generate/status?'+_0x554e7d['toString']());return _0x153cce[_0x48cdb0(0x1ec)];}export async function searchDatasets(_0x330590,_0x25e391){const _0x3bc396=a200_0x325f,_0x383a98=await listDatasets(_0x330590,{'name':_0x25e391}),_0x3936bd=_0x25e391[_0x3bc396(0x255)](),_0x69cd24=new Set(_0x383a98['map'](_0x5588da=>_0x5588da['id'])),_0x5cdc5d=_0x383a98['filter'](_0x366ebe=>_0x366ebe[_0x3bc396(0x203)]?.[_0x3bc396(0x1ab)]?.[_0x3bc396(0x255)]()[_0x3bc396(0x1d9)](_0x3936bd)||_0x366ebe[_0x3bc396(0x1ef)]?.[_0x3bc396(0x255)]()[_0x3bc396(0x1d9)](_0x3936bd)),_0x4cbf5a=await listDatasets(_0x330590,{'code':_0x25e391});for(const _0x2180e3 of _0x4cbf5a){!_0x69cd24['has'](_0x2180e3['id'])&&(_0x383a98['push'](_0x2180e3),_0x69cd24[_0x3bc396(0x19d)](_0x2180e3['id']));}return _0x383a98;}function a200_0x325f(_0x105a8c,_0x4f28dd){_0x105a8c=_0x105a8c-0x171;const _0x1cfffd=a200_0x1cff();let _0x325f35=_0x1cfffd[_0x105a8c];return _0x325f35;}export function normalizeDatasetOperations(_0x4b33ad){const _0x4c48f6=a200_0x325f;if(Array[_0x4c48f6(0x1c2)](_0x4b33ad))return _0x4b33ad[_0x4c48f6(0x217)](_0x125c15=>_0x125c15!=null&&typeof _0x125c15===_0x4c48f6(0x1fe));if(_0x4b33ad&&typeof _0x4b33ad===_0x4c48f6(0x1fe))return Object[_0x4c48f6(0x178)](_0x4b33ad)[_0x4c48f6(0x217)](([,_0x527dbe])=>_0x527dbe!=null&&typeof _0x527dbe===_0x4c48f6(0x1fe))[_0x4c48f6(0x25e)](([_0x3b09fe,_0x141d00])=>({..._0x141d00,'name':_0x141d00[_0x4c48f6(0x197)]??_0x141d00[_0x4c48f6(0x17e)]??_0x3b09fe}));return[];}export async function getDatasetDetail(_0x3fb87a){const _0x4191a3=a200_0x325f,_0x3965c5=/^\d+$/[_0x4191a3(0x1d0)](_0x3fb87a)?'id':_0x4191a3(0x190),_0x1c85a6=await apiRequest(_0x4191a3(0x221)+_0x3965c5+'='+_0x3fb87a);return _0x1c85a6[_0x4191a3(0x1ec)];}function a200_0x1cff(){const _0x237f7b=['update','relation','\x20of\x20','Page\x20not\x20found:\x20','/smartapi/custom/getUserCustomSql','360080osWBHq','/smartapi/app-config/list','download','API\x20error:\x20','&type=','/smartapi/menu/create','/smartapi/custom/deleteUserCustomSql','Fetch\x20datasets','find','Dataset\x20not\x20found:\x20','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','/smartapi/menu/delete','/smartapi/page/getDeletedPageList?','operationId','table','version','});','type','modelId','/smartapi/common/queryFileUrl','enabled','path','list','\x20apps.\x20','AbortError','cli:rabetbase','/smartapi/permit/user-role/get-user-list','POST','needPublic','/smartapi/question/er-config/cli/erCreate','Fetch\x20menu\x20list','max','operations','//\x20SQL:\x20','/api/management/library/scripts/delete','Warning:\x20showing\x20first\x20','/smartapi/db-analysis/jobs/cancel','nickname','/smartapi/permit/role/delete','/smartapi/permit/role/create','toLowerCase','roleType','summary','label','/smartapi/app-config/delete','/api/management/library/scripts/list?appCode=','roleName','Request\x20failed:\x20','cookie','map','deleted','startsWith','/smartapi/question/er-config/cli/detail?','status','/smartapi/dataset/restore-dataset','currentPage','file','datasetTableCount','/smartapi/dblink/delete','getOne','entries','/smartapi/dblink/getTableDiffV2ByPage','dbId','BFF\x20script\x20not\x20found:\x20id=','/sync-to-pages','/api/management/library/scripts/info?id=','operationName','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/dblink/getAllTableList','/generate-standard-pages/status?','/smartapi/app/getList','正在从服务器拉取模型列表...\x20(环境:\x20','Request\x20timeout:\x20','info','/api/node-toolbox/sql/save','/smartapi/permit/role/update','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','API\x20error\x20code:\x20306','includeImports','/notification/channel-config/list','/smartapi/app-config/update','/smartapi/dataset/text-generate/start','email','api_error','code','userId','body','/api/management/library/scripts/statistics?appCode=','\x20\x20sqlCode:\x20\x27','/smartapi/question/er-config/business-group/edit','fetch-model-list','name','/smartapi/db-analysis/status/','clientOperationId','\x20\x20});','array','needSelf','add','/smartapi/menu/update','pageSize','\x20\x20pageSize:\x2020,','push','displayName','pageIndex','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','\x20\x20currentPage:\x201,','scriptName','length','mobile','success','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','tableName','/smartapi/tasks/','message','/generate-standard-pages/start','method','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','hint','sqlCode','/smartapi/custom/saveUserCustomSql','60768WTRXks','.filter({','976952reOcOw','/smartapi/question/er-config/cli/delete-single','/userTenant/getByTenantCode','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','configArray','GET','longTerm','errorMsg','18kbsVAT','BFF\x20save\x20returned\x20no\x20valid\x20id','.getOne(id);','delete','isArray','ER\x20relation\x20does\x20not\x20exist','/smartapi/lovrabet/detail?pageId=','errorCode','stringify','warn','639IoostS','/smartapi/permit/role/get-permit-list','remark','target','ENABLE','markdown','string','/smartapi/dblink/update','test','/smartapi/permit/page/save','username','Fetch\x20async\x20task\x20','SQL\x20query\x20not\x20found:\x20id=','abort','append','tableList','/smartapi/lovrabet/update-page','includes','/smartapi/webcode/page/restore','Check\x20network\x20connectivity\x20and\x20try\x20again.','key','/standard-page-status?appCode=','/smartapi/permit/resource/get-api-list','SQL\x20query\x20not\x20found:\x20','55436FCUdBx','const\x20data\x20=\x20await\x20client.sql.execute({','/smartapi/db-analysis/start','validation','join','apiError','/smartapi/custom/updateUserCustomSql','/api/','(/*\x20params\x20*/);','/api/custom/executeSql','tableData','modelCode','data','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','json','description','/smartapi/dataset/delete-dataset','signal','authRequired','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','Invalid\x20response\x20format\x20(','/smartapi/dblink/testConnect','set','/api/node-toolbox/dataset/model-list?','tags','isFinite','1644jvAKFa','44900lGIEMU','/smartapi/permit/resource/get-menu-list','remove','object','/smartapi/permit/page/get-one','requestFields','error','replace','dbtableConfig','/smartapi/ocr/recognize-text?','permits','DATA_NOT_EXIST','/smartapi/dataset/update-driven-data','?sqlCode=','/smartapi/dataset/get-dataset-list','/filter','/smartapi/question/er-config/cli/update-single','UNAUTHORIZED','/smartapi/permit/user-role/update-user-list','/smartapi/lovrabet/dataset/','/smartapi/menu/batchDelete','create','functionName','appCode','722652WFDNJI','totalCount','4040cZQmUI','const\x20result\x20=\x20await\x20client.models.','filter','/api/node-toolbox/api-doc-generator','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','\x20failed,\x20HTTP\x20','CUSTOM','\x22\x20not\x20found\x20in\x20dataset\x20','toString','userTenantRelationList','value','401','/smartapi/dataset/get-driven-data?','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/custom/queryUserCustomSqlList','//\x20','/smartapi/dblink/getList','sdk','min'];a200_0x1cff=function(){return _0x237f7b;};return a200_0x1cff();}export async function updateDrivenData(_0x2dc9fa){const _0x4f1247=a200_0x325f,_0xf5390c=await apiRequest(_0x4f1247(0x207),{'method':'POST','body':_0x2dc9fa});return _0xf5390c[_0x4f1247(0x1ec)];}export async function getDatasetOperations(_0x2cb761){const _0x266f46=a200_0x325f,_0x5645bc=await getDatasetDetail(_0x2cb761),_0x7d40a1=normalizeDatasetOperations(_0x5645bc[_0x266f46(0x24d)])[_0x266f46(0x25e)](_0x40238f=>({'name':_0x40238f[_0x266f46(0x197)]||_0x40238f[_0x266f46(0x17e)],'displayName':_0x40238f[_0x266f46(0x1a2)]||_0x40238f[_0x266f46(0x197)],'type':_0x40238f[_0x266f46(0x23e)],'method':_0x40238f[_0x266f46(0x1af)],'path':_0x40238f[_0x266f46(0x242)],'enabled':_0x40238f[_0x266f46(0x241)]??!![],'requestFields':_0x40238f[_0x266f46(0x200)],'responseFields':_0x40238f['responseFields']}));return{'dataset':{'id':_0x5645bc['id']??_0x5645bc[_0x266f46(0x23f)],'name':_0x5645bc[_0x266f46(0x197)],'code':_0x5645bc[_0x266f46(0x190)]||_0x5645bc[_0x266f46(0x1eb)],'tableName':_0x5645bc[_0x266f46(0x1ab)]||_0x5645bc['dbtableConfig']?.[_0x266f46(0x1ab)]},'operations':_0x7d40a1};}export async function getOperationDetail(_0x496614,_0x27663f,_0x4133d2){const _0x115ff2=a200_0x325f;let _0x33a654=_0x27663f;if(!/^\d+$/['test'](_0x27663f)){const _0x26e6ba=await listDatasets(_0x496614,{'code':_0x27663f}),_0x59da57=_0x26e6ba[_0x115ff2(0x235)](_0x24e217=>_0x24e217['code']===_0x27663f||String(_0x24e217['id'])===_0x27663f);if(!_0x59da57)throw CliErrors['validation'](_0x115ff2(0x236)+_0x27663f);_0x33a654=String(_0x59da57['id']);}const _0x32490d=await getDatasetDetail(_0x33a654),_0x52a165=normalizeDatasetOperations(_0x32490d[_0x115ff2(0x24d)])[_0x115ff2(0x235)](_0x16c147=>(_0x16c147[_0x115ff2(0x197)]||_0x16c147[_0x115ff2(0x17e)])===_0x4133d2);if(!_0x52a165)throw CliErrors[_0x115ff2(0x1e3)]('Operation\x20\x22'+_0x4133d2+_0x115ff2(0x21c)+_0x27663f);return{'dataset':{'id':_0x32490d['id']??_0x32490d[_0x115ff2(0x23f)],'name':_0x32490d['name'],'code':_0x32490d[_0x115ff2(0x190)]||_0x32490d['modelCode'],'tableName':_0x32490d['tableName']||_0x32490d['dbtableConfig']?.[_0x115ff2(0x1ab)]},'operation':_0x52a165};}export async function startGenerateStandardPages(_0x1a056d,_0x123b50,_0x24c659){const _0x156160=a200_0x325f,_0xdff824=await apiRequest(_0x156160(0x20e)+_0x123b50+_0x156160(0x1ae),{'method':_0x156160(0x248),'body':{'appCode':_0x1a056d,..._0x24c659?.[_0x156160(0x199)]?{'clientOperationId':_0x24c659['clientOperationId']}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0xdff824['data'];}export async function getGenerateStandardPagesStatus(_0x3a1380,_0x148940,_0x300dc8){const _0x520379=a200_0x325f,_0x2e249a=new URLSearchParams({'appCode':_0x3a1380});_0x300dc8[_0x520379(0x23a)]&&_0x2e249a[_0x520379(0x1f6)](_0x520379(0x23a),_0x300dc8[_0x520379(0x23a)]);_0x300dc8[_0x520379(0x199)]&&_0x2e249a[_0x520379(0x1f6)]('clientOperationId',_0x300dc8[_0x520379(0x199)]);const _0x5335f7=await apiRequest(_0x520379(0x20e)+_0x148940+_0x520379(0x181)+_0x2e249a['toString']());return _0x5335f7[_0x520379(0x1ec)];}export async function getStandardPageStatus(_0x1e110d,_0x2ceb58){const _0x43d73c=a200_0x325f,_0x57fb07=await apiRequest(_0x43d73c(0x20e)+_0x2ceb58+_0x43d73c(0x1dd)+encodeURIComponent(_0x1e110d));return _0x57fb07[_0x43d73c(0x1ec)];}export async function tryGetStandardPageStatus(_0x5c2549,_0xd71b9e){const _0x17995c=a200_0x325f;try{return await getStandardPageStatus(_0x5c2549,_0xd71b9e);}catch(_0x3b0fcd){if(_0x3b0fcd instanceof CliError&&_0x3b0fcd[_0x17995c(0x190)]===_0x17995c(0x18f)&&/404|not found|non-json response/i[_0x17995c(0x1d0)](_0x3b0fcd['message']))return null;throw _0x3b0fcd;}}export async function syncStandardPages(_0x4e0feb,_0x5761f4){const _0x3a0ce9=a200_0x325f,_0x209a14=await apiRequest(_0x3a0ce9(0x20e)+_0x5761f4+_0x3a0ce9(0x17c),{'method':_0x3a0ce9(0x248),'body':{'appCode':_0x4e0feb}});return _0x209a14['data'];}export async function getPageDetail(_0x3fd2ef){const _0x293419=a200_0x325f,_0x6c2044=await apiRequest(_0x293419(0x1c4)+_0x3fd2ef);if(!_0x6c2044[_0x293419(0x1ec)])throw CliErrors[_0x293419(0x1e3)](_0x293419(0x22b)+_0x3fd2ef);return _0x6c2044[_0x293419(0x1ec)];}export async function listDeletedPages(_0x5747bd,_0x3fe8f0,_0xb8642a){const _0x4bd34d=a200_0x325f,_0x556b9e=new URLSearchParams({'appCode':_0x5747bd,'type':_0x3fe8f0,'currentPage':String(_0xb8642a[_0x4bd34d(0x173)]),'pageSize':String(_0xb8642a[_0x4bd34d(0x19f)])}),_0x31f7bf=await apiRequest(_0x4bd34d(0x239)+_0x556b9e['toString']());return _0x31f7bf['data'];}export async function restoreStandardPage(_0x2cae76){const _0x24e812=a200_0x325f;await apiRequest('/smartapi/page/restore',{'method':_0x24e812(0x248),'body':{'id':_0x2cae76}});}export async function restoreJsxPage(_0x3f6e20,_0x41393c){const _0x53a43a=a200_0x325f,_0x19be84=await apiRequest(_0x53a43a(0x1da),{'method':_0x53a43a(0x248),'body':{'appCode':_0x3f6e20,'id':_0x41393c}});return _0x19be84[_0x53a43a(0x1ec)];}export async function updatePage(_0x50d5be,_0x2c58e3,_0x115a4b,_0x3191e1){const _0xc1aa20=a200_0x325f,_0x1f865b=await apiRequest(_0xc1aa20(0x1d8),{'method':_0xc1aa20(0x248),'body':{'appCode':_0x50d5be,'pageId':_0x2c58e3,'code':_0x115a4b,'datasetIds':_0x3191e1}});return _0x1f865b['data'];}export function generateSdkCode(_0x3d5333,_0x3cc35b,_0x2a3392){const _0x4fa37c=a200_0x325f,_0x59ae93=_0x2a3392?.[_0x4fa37c(0x18a)]??!![],_0x4bbe76='dataset_'+_0x3d5333[_0x4fa37c(0x190)]?.[_0x4fa37c(0x202)](/-/g,'_'),_0x4b15b1=_0x3cc35b[_0x4fa37c(0x197)]||_0x3cc35b[_0x4fa37c(0x17e)]||_0x4fa37c(0x217),_0x1ed7f0=[];_0x59ae93&&_0x1ed7f0['push'](_0x4fa37c(0x222),'',_0x4fa37c(0x1a4),'');_0x1ed7f0['push'](_0x4fa37c(0x224)+_0x3d5333[_0x4fa37c(0x197)]+'\x20('+(_0x3d5333[_0x4fa37c(0x1ab)]||_0x4fa37c(0x23b))+')');if(_0x4b15b1===_0x4fa37c(0x217))_0x1ed7f0['push']('const\x20result\x20=\x20await\x20client.models.'+_0x4bbe76+_0x4fa37c(0x1b5),'\x20\x20where:\x20{},',_0x4fa37c(0x1a0),_0x4fa37c(0x1a5),_0x4fa37c(0x23d));else{if(_0x4b15b1===_0x4fa37c(0x177))_0x1ed7f0[_0x4fa37c(0x1a1)](_0x4fa37c(0x216)+_0x4bbe76+_0x4fa37c(0x1c0));else{if(_0x4b15b1===_0x4fa37c(0x210))_0x1ed7f0['push'](_0x4fa37c(0x216)+_0x4bbe76+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x4b15b1===_0x4fa37c(0x228))_0x1ed7f0[_0x4fa37c(0x1a1)](_0x4fa37c(0x216)+_0x4bbe76+_0x4fa37c(0x188));else _0x4b15b1===_0x4fa37c(0x1c1)||_0x4b15b1===_0x4fa37c(0x1fd)?_0x1ed7f0[_0x4fa37c(0x1a1)](_0x4fa37c(0x216)+_0x4bbe76+'.remove(id);'):_0x1ed7f0[_0x4fa37c(0x1a1)](_0x4fa37c(0x216)+_0x4bbe76+'.'+_0x4b15b1+_0x4fa37c(0x1e8));}}}return _0x1ed7f0[_0x4fa37c(0x1e4)]('\x0a');}export function generateSqlCodeTemplate(_0x54de34,_0x3ff9f4){const _0x15f770=a200_0x325f,_0x330fab=_0x3ff9f4?.[_0x15f770(0x1cb)]??_0x15f770(0x226),_0x46927b=_0x3ff9f4?.['includeImports']??!![],_0x5a9cc0=[];return _0x5a9cc0[_0x15f770(0x1a1)](_0x15f770(0x24e)+_0x54de34['sqlName']+'\x20('+_0x54de34[_0x15f770(0x1b2)]+')'),_0x330fab===_0x15f770(0x226)?(_0x46927b&&_0x5a9cc0[_0x15f770(0x1a1)](_0x15f770(0x222),'',_0x15f770(0x1a4),''),_0x5a9cc0['push'](_0x15f770(0x1e1),_0x15f770(0x194)+_0x54de34[_0x15f770(0x1b2)]+'\x27,',_0x15f770(0x17f),_0x15f770(0x23d),'if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x5a9cc0['push'](_0x15f770(0x1f3),_0x15f770(0x219),_0x15f770(0x237),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x54de34[_0x15f770(0x1b2)]+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x15f770(0x19a),'\x20\x20return\x20rows;','}'),_0x5a9cc0[_0x15f770(0x1e4)]('\x0a');}export async function getErConfig(_0x11ef17,_0x38bc31){const _0x2b99e6=a200_0x325f,_0x5f07c1=await apiRequest('/smartapi/question/er-config',{'method':_0x2b99e6(0x248),'body':{'appCode':_0x11ef17,'dblinkId':_0x38bc31},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x5f07c1['data'];}export async function getErRelationDetail(_0x301366,_0x2a2a45){const _0x564dcc=a200_0x325f,_0x261d55=new URLSearchParams({'appCode':_0x301366,'relationId':String(_0x2a2a45)});try{const _0x470077=await apiRequest(_0x564dcc(0x261)+_0x261d55['toString']());return _0x470077[_0x564dcc(0x1ec)]?.[_0x564dcc(0x229)]??null;}catch(_0x66fb5f){if(_0x66fb5f instanceof CliError&&_0x66fb5f[_0x564dcc(0x190)]===_0x564dcc(0x18f)&&(_0x66fb5f[_0x564dcc(0x1b1)]?.[_0x564dcc(0x1d9)](_0x564dcc(0x206))||_0x66fb5f[_0x564dcc(0x1b1)]===_0x564dcc(0x189)&&_0x66fb5f[_0x564dcc(0x1ad)]===_0x564dcc(0x1c3)))return null;throw _0x66fb5f;}}export async function createErRelation(_0x127c23){const _0x2fdd7f=a200_0x325f,_0xaa4685=await apiRequest(_0x2fdd7f(0x24a),{'method':'POST','body':_0x127c23,'allowNonJsonSuccess':!![]});return _0xaa4685[_0x2fdd7f(0x1ec)];}export async function updateErRelation(_0x26a79a){const _0x49056f=a200_0x325f,_0x543052=await apiRequest(_0x49056f(0x20b),{'method':_0x49056f(0x248),'body':_0x26a79a,'allowNonJsonSuccess':!![]});return _0x543052[_0x49056f(0x1ec)];}export async function deleteErRelation(_0x506638){const _0x562e01=a200_0x325f,_0x360e13=await apiRequest(_0x562e01(0x1b7),{'method':_0x562e01(0x248),'body':_0x506638,'allowNonJsonSuccess':!![]});return _0x360e13[_0x562e01(0x1ec)];}export async function updateErBusinessGroup(_0x2c4731){const _0x696085=a200_0x325f,_0x4cd157=await apiRequest(_0x696085(0x195),{'method':_0x696085(0x248),'body':_0x2c4731,'allowNonJsonSuccess':!![]});return _0x4cd157[_0x696085(0x1ec)];}function buildQuery(_0x39f16c){const _0x2d89ac=a200_0x325f,_0x3a35aa=new URLSearchParams();for(const [_0x493d29,_0x1a5c2c]of Object['entries'](_0x39f16c)){if(_0x1a5c2c===undefined||_0x1a5c2c==='')continue;_0x3a35aa['set'](_0x493d29,String(_0x1a5c2c));}const _0x36731d=_0x3a35aa[_0x2d89ac(0x21d)]();return _0x36731d?'?'+_0x36731d:'';}export async function listNotificationChannelConfigs(_0x24b261,_0x27a037){const _0x1484a9=a200_0x325f,_0x3a8711=await apiRequest(_0x1484a9(0x18b)+buildQuery({'appCode':_0x24b261,'channelType':_0x27a037}));return Array[_0x1484a9(0x1c2)](_0x3a8711['data'])?_0x3a8711[_0x1484a9(0x1ec)]:[];}export async function listAppConfigs(_0x4e3e84,_0x2fbafa){const _0x119a00=a200_0x325f,_0x430110=await apiRequest(_0x119a00(0x22e),{'method':'POST','body':{'appCode':_0x4e3e84,..._0x2fbafa?.[_0x119a00(0x1dc)]?{'key':_0x2fbafa[_0x119a00(0x1dc)]}:{},..._0x2fbafa?.[_0x119a00(0x1f8)]?{'tags':_0x2fbafa[_0x119a00(0x1f8)]}:{}}});return extractAppConfigList(_0x430110[_0x119a00(0x1ec)]);}export async function getAppConfigByKey(_0x9a01be,_0x4bd490){const _0x522633=a200_0x325f,_0x278f87=await apiRequest('/smartapi/app-config/getByKey'+buildQuery({'appCode':_0x9a01be,'key':_0x4bd490}));return _0x278f87[_0x522633(0x1ec)]??null;}export async function createAppConfig(_0x3b853f){const _0x10c967=a200_0x325f,_0x3323a0=await apiRequest('/smartapi/app-config/create',{'method':'POST','body':{'appCode':_0x3b853f[_0x10c967(0x212)],'key':_0x3b853f[_0x10c967(0x1dc)],'value':_0x3b853f[_0x10c967(0x21f)],..._0x3b853f[_0x10c967(0x1f8)]?{'tags':_0x3b853f['tags']}:{}}});return _0x3323a0['data'];}export async function updateAppConfig(_0x383819){const _0x167647=a200_0x325f;await apiRequest(_0x167647(0x18c),{'method':_0x167647(0x248),'body':{'id':_0x383819['id'],'appCode':_0x383819[_0x167647(0x212)],'key':_0x383819[_0x167647(0x1dc)],'value':_0x383819[_0x167647(0x21f)],..._0x383819[_0x167647(0x1f8)]?{'tags':_0x383819[_0x167647(0x1f8)]}:{}}});}export async function deleteAppConfig(_0x277beb){const _0x45bd5e=a200_0x325f;await apiRequest(_0x45bd5e(0x259),{'method':'POST','body':_0x277beb});}function extractAppConfigList(_0x3e23f1){const _0x30a023=a200_0x325f;if(Array[_0x30a023(0x1c2)](_0x3e23f1))return _0x3e23f1;if(_0x3e23f1&&typeof _0x3e23f1===_0x30a023(0x1fe)&&Array[_0x30a023(0x1c2)](_0x3e23f1[_0x30a023(0x243)]))return _0x3e23f1[_0x30a023(0x243)];return extractList(_0x3e23f1);}export async function listDbLinks(_0x5ceea1,_0x537ac2){const _0x1cff87=a200_0x325f,_0x47511f=await apiRequest(_0x1cff87(0x225),{'method':_0x1cff87(0x248),'body':{'appCode':_0x5ceea1,'currentPage':_0x537ac2?.[_0x1cff87(0x173)]??0x1,'pageSize':_0x537ac2?.['pageSize']??0x64}});return{'items':extractList(_0x47511f[_0x1cff87(0x1ec)]),'paging':extractPaging(_0x47511f[_0x1cff87(0x1ec)])};}export async function getDbLinkInfo(_0x534cf4){const _0x1c758c=a200_0x325f,_0x2a6f66=await apiRequest('/smartapi/dblink/getOne'+buildQuery({'id':_0x534cf4}));return _0x2a6f66[_0x1c758c(0x1ec)];}export async function createDbLink(_0x3296ac){const _0x3f37d1=a200_0x325f,_0x2dfae5=await apiRequest('/smartapi/dblink/create',{'method':_0x3f37d1(0x248),'body':_0x3296ac});return _0x2dfae5[_0x3f37d1(0x1ec)];}export async function updateDbLink(_0x320fec){const _0x551a49=a200_0x325f,_0x2ccb58=await apiRequest(_0x551a49(0x1cf),{'method':_0x551a49(0x248),'body':_0x320fec});return _0x2ccb58[_0x551a49(0x1ec)];}export async function deleteDbLink(_0x2f6a1b){const _0x1771c5=a200_0x325f;await apiRequest(_0x1771c5(0x176),{'method':'POST','body':{'id':_0x2f6a1b}});}export async function testDbLinkConnect(_0x1a9fb4){const _0x20d26b=a200_0x325f,_0x39379a=await apiRequest(_0x20d26b(0x1f5)+buildQuery({'id':_0x1a9fb4}));return _0x39379a[_0x20d26b(0x1ec)];}export async function startDbAnalysis(_0x1d7498,_0x6ac2d6){const _0x3f60ea=a200_0x325f,_0x45422c=await apiRequest(_0x3f60ea(0x1e2),{'method':_0x3f60ea(0x248),'body':{'dbLinkId':_0x1d7498,..._0x6ac2d6&&_0x6ac2d6[_0x3f60ea(0x1a7)]>0x0?{'tableNames':_0x6ac2d6}:{}}});return _0x45422c[_0x3f60ea(0x1ec)];}export async function cancelDbAnalysis(_0x200968){const _0x254f9c=a200_0x325f;await apiRequest(_0x254f9c(0x251)+buildQuery({'planId':_0x200968}),{'method':'POST'});}export async function getDbAnalysisStatus(_0x142b65){const _0xff0aa9=a200_0x325f,_0x1c23a1=await apiRequest(_0xff0aa9(0x198)+encodeURIComponent(_0x142b65));return _0x1c23a1['data'];}export async function getDbAllTableList(_0x276a15,_0x51d637){const _0x5e2db6=a200_0x325f,_0x3a292c=await apiRequest(_0x5e2db6(0x180)+buildQuery({'appCode':_0x276a15,'dbLinkId':_0x51d637})),_0x5097df=_0x3a292c[_0x5e2db6(0x1ec)];if(Array[_0x5e2db6(0x1c2)](_0x5097df))return _0x5097df;return extractList(_0x5097df);}export async function getDbTableDiff(_0x97bebc,_0x3cf9cb,_0x1c9943){const _0x4fc395=a200_0x325f,_0x50f74e=await apiRequest(_0x4fc395(0x179)+buildQuery({'appCode':_0x97bebc,'dbLinkId':_0x3cf9cb,'pageIndex':_0x1c9943?.[_0x4fc395(0x1a3)]??0x1,'pageSize':_0x1c9943?.[_0x4fc395(0x19f)]??0x14,'tableName':_0x1c9943?.['tableName']})),_0x1be1c5=_0x50f74e['data'];return{'totalCount':_0x1be1c5?.[_0x4fc395(0x214)]??0x0,'physicalTableCount':_0x1be1c5?.['physicalTableCount']??0x0,'datasetTableCount':_0x1be1c5?.[_0x4fc395(0x175)]??0x0,..._0x1be1c5?.[_0x4fc395(0x257)]?{'summary':_0x1be1c5[_0x4fc395(0x257)]}:{},'tableList':Array[_0x4fc395(0x1c2)](_0x1be1c5?.[_0x4fc395(0x1d7)])?_0x1be1c5[_0x4fc395(0x1d7)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x38c76f=a200_0x325f,_0x4f9fc6=await apiRequest(_0x38c76f(0x182),{'method':'POST','body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x2b7cd0=extractList(_0x4f9fc6[_0x38c76f(0x1ec)]),_0x48326b=extractPaging(_0x4f9fc6[_0x38c76f(0x1ec)]);return _0x48326b&&_0x48326b[_0x38c76f(0x214)]>REMOTE_APP_PAGE_SIZE&&console[_0x38c76f(0x1c7)](_0x38c76f(0x250)+REMOTE_APP_PAGE_SIZE+_0x38c76f(0x22a)+_0x48326b[_0x38c76f(0x214)]+_0x38c76f(0x244)+'Use\x20the\x20platform\x20console\x20to\x20see\x20all.'),_0x2b7cd0;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x1edec7,_0x15eefe){const _0x3e43cd=a200_0x325f,_0x1d84e5=Math[_0x3e43cd(0x227)](Math[_0x3e43cd(0x24c)](_0x15eefe?.['pageSize']??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x15e1b3=await apiRequest('/smartapi/permit/role/get-list',{'method':_0x3e43cd(0x248),'body':{'appCode':_0x1edec7,'currentPage':_0x15eefe?.['currentPage']??0x1,'pageSize':_0x1d84e5}});return{'items':extractList(_0x15e1b3[_0x3e43cd(0x1ec)]),'paging':extractPaging(_0x15e1b3[_0x3e43cd(0x1ec)])};}export async function getAppRole(_0x57f5c3){const _0x44442b=await apiRequest('/smartapi/permit/role/get-one'+buildQuery({'id':_0x57f5c3}));return _0x44442b['data'];}export async function createAppRole(_0x1c3836){const _0x42688c=a200_0x325f,_0xa1e1b4=await apiRequest(_0x42688c(0x254),{'method':'POST','body':{'appCode':_0x1c3836[_0x42688c(0x212)],'roleName':_0x1c3836[_0x42688c(0x25b)],'roleType':_0x42688c(0x21b),..._0x1c3836['remark']?{'remark':_0x1c3836['remark']}:{}}});return _0xa1e1b4[_0x42688c(0x1ec)];}export async function updateAppRole(_0x33a041){const _0x2d4e97=a200_0x325f,_0x1376d1=await apiRequest(_0x2d4e97(0x187),{'method':'POST','body':{'id':_0x33a041['id'],'appCode':_0x33a041[_0x2d4e97(0x212)],..._0x33a041[_0x2d4e97(0x256)]?{'roleType':_0x33a041[_0x2d4e97(0x256)]}:{},..._0x33a041[_0x2d4e97(0x25b)]!==undefined?{'roleName':_0x33a041[_0x2d4e97(0x25b)]}:{},..._0x33a041[_0x2d4e97(0x1ca)]!==undefined?{'remark':_0x33a041[_0x2d4e97(0x1ca)]}:{},..._0x33a041[_0x2d4e97(0x205)]?{'permits':_0x33a041['permits']}:{}}});return _0x1376d1['data'];}export async function deleteAppRole(_0x173a5c){const _0x4c3aed=a200_0x325f;await apiRequest(_0x4c3aed(0x253),{'method':_0x4c3aed(0x248),'body':{'id':_0x173a5c}});}export async function listPermitRoles(_0x22f945,_0x1fc3f0){const _0x2cae05=a200_0x325f,_0x2cc4d0=await apiRequest(_0x2cae05(0x1c9),{'method':_0x2cae05(0x248),'body':{'appCode':_0x22f945,..._0x1fc3f0?.['needSelf']!==undefined?{'needSelf':_0x1fc3f0[_0x2cae05(0x19c)]}:{},..._0x1fc3f0?.[_0x2cae05(0x249)]!==undefined?{'needPublic':_0x1fc3f0['needPublic']}:{}}});return extractList(_0x2cc4d0[_0x2cae05(0x1ec)]);}export async function getRoleMenuResources(_0x5c97a9,_0x25e849){const _0xf93336=a200_0x325f,_0x20c8f3=await apiRequest(_0xf93336(0x1fc),{'method':_0xf93336(0x248),'body':{'appCode':_0x5c97a9,'roleId':_0x25e849}});return extractList(_0x20c8f3[_0xf93336(0x1ec)]);}export async function getRoleApiResources(_0x3e309d,_0x404fd1){const _0x48b524=a200_0x325f,_0x4def7f=await apiRequest(_0x48b524(0x1de),{'method':_0x48b524(0x248),'body':{'appCode':_0x3e309d,'roleId':_0x404fd1}});return extractList(_0x4def7f[_0x48b524(0x1ec)]);}export async function listRoleUsers(_0x4bd7f2){const _0x29cc4e=a200_0x325f,_0x4d1b17=await apiRequest(_0x29cc4e(0x247),{'method':'POST','body':{'appCode':_0x4bd7f2}});return extractList(_0x4d1b17[_0x29cc4e(0x1ec)]);}export async function updateRoleUsers(_0x209605,_0x32c7ca){const _0x3af186=a200_0x325f;await apiRequest(_0x3af186(0x20d),{'method':_0x3af186(0x248),'body':{'appCode':_0x209605,'roleList':_0x32c7ca}});}export async function getPagePermit(_0x59c6c6){const _0x38f784=a200_0x325f,_0xd1391d=await apiRequest(_0x38f784(0x1ff)+buildQuery({'menuId':_0x59c6c6}));return _0xd1391d[_0x38f784(0x1ec)];}export async function savePagePermit(_0x11ce0e){const _0x5ed09e=a200_0x325f,_0xf62bbc=await apiRequest(_0x5ed09e(0x1d1),{'method':'POST','body':_0x11ce0e});return _0xf62bbc[_0x5ed09e(0x1ec)];}export async function getTenantMembers(_0x138535){const _0x5a750b=a200_0x325f,_0x4974cc=await apiRequest(_0x5a750b(0x1b8)+buildQuery({'code':_0x138535})),_0x510cc5=_0x4974cc[_0x5a750b(0x1ec)]??{},_0x3b799d=Array['isArray'](_0x510cc5?.[_0x5a750b(0x21e)])?_0x510cc5[_0x5a750b(0x21e)]:[];return _0x3b799d['filter'](_0xc604e0=>_0xc604e0?.['status']===_0x5a750b(0x1cc)||_0xc604e0?.[_0x5a750b(0x171)]===undefined)[_0x5a750b(0x25e)](_0x12a041=>({'userId':Number(_0x12a041[_0x5a750b(0x191)]??_0x12a041['id']),'username':_0x12a041[_0x5a750b(0x1d2)],'nickname':_0x12a041[_0x5a750b(0x252)],'status':_0x12a041['status'],'email':_0x12a041[_0x5a750b(0x18e)],'mobile':_0x12a041[_0x5a750b(0x1a8)],'avatar':_0x12a041['avatar']}))['filter'](_0x52c648=>Number[_0x5a750b(0x1f9)](_0x52c648[_0x5a750b(0x191)])&&_0x52c648[_0x5a750b(0x191)]>0x0);}
@@ -1 +1 @@
1
- const a201_0x176e20=a201_0x166b;(function(_0x40b9fb,_0x466398){const _0x484955=a201_0x166b,_0x55eb36=_0x40b9fb();while(!![]){try{const _0x3f47f4=-parseInt(_0x484955(0x9d))/0x1+-parseInt(_0x484955(0xa2))/0x2*(-parseInt(_0x484955(0x9a))/0x3)+-parseInt(_0x484955(0xa5))/0x4*(parseInt(_0x484955(0xa4))/0x5)+-parseInt(_0x484955(0xa1))/0x6+parseInt(_0x484955(0x9b))/0x7+parseInt(_0x484955(0xa7))/0x8*(-parseInt(_0x484955(0xa0))/0x9)+parseInt(_0x484955(0x9c))/0xa;if(_0x3f47f4===_0x466398)break;else _0x55eb36['push'](_0x55eb36['shift']());}catch(_0x1932bd){_0x55eb36['push'](_0x55eb36['shift']());}}}(a201_0x2e64,0x49d76));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a201_0x166b(_0x674778,_0x1bce51){_0x674778=_0x674778-0x9a;const _0x2e64c0=a201_0x2e64();let _0x166ba8=_0x2e64c0[_0x674778];return _0x166ba8;}const DOT_DIR=a201_0x176e20(0x9f),LOCK_FILE_NAME=a201_0x176e20(0xa3),TRASH_DIR_NAME=a201_0x176e20(0xa6);export function loadBffProjectConfig(_0xe14fd,_0x5c0583){const _0x40facb=a201_0x176e20,_0x5ad0cf=resolve(_0x5c0583??findProjectRootDirectory()),_0x549d1b=DOT_DIR+_0x40facb(0xa8),_0x17a2df=_0x549d1b+'/'+_0xe14fd;return{'projectRoot':_0x5ad0cf,'appCode':_0xe14fd,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x549d1b,'scriptsRoot':_0x17a2df,'scriptsRootDir':resolve(_0x5ad0cf,DOT_DIR,_0x40facb(0x9e),_0xe14fd),'lockFilePath':resolve(_0x5ad0cf,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x5ad0cf,DOT_DIR,TRASH_DIR_NAME)};}function a201_0x2e64(){const _0x5dfd72=['bff-trash','168392fCkQdv','/bff','12GBwOQh','1151220jgVdsD','4643270UtkkWx','137616ZaakfU','bff','.rabetbase','135bFJnyR','2440146NIGHdj','268538EvHtzf','bff.lock.json','185TVyqJE','364fuGdWd'];a201_0x2e64=function(){return _0x5dfd72;};return a201_0x2e64();}
1
+ function a201_0x5227(){const _0x541a0a=['167802mjlaGG','15553620ZlovMH','10CSOjot','809768rdkJqd','bff','6uejWcr','66968kfGGCm','279VUsdsK','25528ZkKdOA','1526215YIHmIa','bff.lock.json','58UzUIRU','8182kRfYNb','.rabetbase','49SxXqcA','bff-trash','/bff'];a201_0x5227=function(){return _0x541a0a;};return a201_0x5227();}const a201_0xb4d37a=a201_0x44eb;(function(_0x86d6b5,_0x52602b){const _0x45917d=a201_0x44eb,_0x5aa370=_0x86d6b5();while(!![]){try{const _0x15d3e9=-parseInt(_0x45917d(0x105))/0x1*(parseInt(_0x45917d(0x104))/0x2)+parseInt(_0x45917d(0xfe))/0x3*(-parseInt(_0x45917d(0xfc))/0x4)+-parseInt(_0x45917d(0x102))/0x5+parseInt(_0x45917d(0x10a))/0x6*(-parseInt(_0x45917d(0x107))/0x7)+-parseInt(_0x45917d(0x101))/0x8*(-parseInt(_0x45917d(0x100))/0x9)+-parseInt(_0x45917d(0xfb))/0xa*(parseInt(_0x45917d(0xff))/0xb)+parseInt(_0x45917d(0xfa))/0xc;if(_0x15d3e9===_0x52602b)break;else _0x5aa370['push'](_0x5aa370['shift']());}catch(_0x463c51){_0x5aa370['push'](_0x5aa370['shift']());}}}(a201_0x5227,0x3c022));import{resolve}from'node:path';function a201_0x44eb(_0x30d7d0,_0x5b969f){_0x30d7d0=_0x30d7d0-0xfa;const _0x5227b2=a201_0x5227();let _0x44eb92=_0x5227b2[_0x30d7d0];return _0x44eb92;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a201_0xb4d37a(0x106),LOCK_FILE_NAME=a201_0xb4d37a(0x103),TRASH_DIR_NAME=a201_0xb4d37a(0x108);export function loadBffProjectConfig(_0x4286d6,_0x176967){const _0x53925b=a201_0xb4d37a,_0x18dd4a=resolve(_0x176967??findProjectRootDirectory()),_0x1d1ae0=DOT_DIR+_0x53925b(0x109),_0x4d59da=_0x1d1ae0+'/'+_0x4286d6;return{'projectRoot':_0x18dd4a,'appCode':_0x4286d6,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x1d1ae0,'scriptsRoot':_0x4d59da,'scriptsRootDir':resolve(_0x18dd4a,DOT_DIR,_0x53925b(0xfd),_0x4286d6),'lockFilePath':resolve(_0x18dd4a,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x18dd4a,DOT_DIR,TRASH_DIR_NAME)};}