@lovrabet/lovrabet-cli 2.3.8-beta.7 → 2.3.8
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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x554369=a96_0x3b4c;function a96_0x55d4(){const _0xab8564=['1587618MnecTr','161465fiZdOR','11295wDaCKR','48mcINNl','7bYjPFL','14CRZMda','30992484pWmoil','3828945KRtBmU','11apBIBC','12530530vQurvw','1064tBmSaK','ClientAk','client-ak','213054vhfMid'];a96_0x55d4=function(){return _0xab8564;};return a96_0x55d4();}(function(_0xbc458d,_0x56ce3c){const _0x45bf0a=a96_0x3b4c,_0x2261f5=_0xbc458d();while(!![]){try{const _0x41fbe6=-parseInt(_0x45bf0a(0x98))/0x1*(parseInt(_0x45bf0a(0x9c))/0x2)+parseInt(_0x45bf0a(0x96))/0x3*(-parseInt(_0x45bf0a(0x9a))/0x4)+-parseInt(_0x45bf0a(0x9e))/0x5+-parseInt(_0x45bf0a(0x97))/0x6*(parseInt(_0x45bf0a(0x9b))/0x7)+-parseInt(_0x45bf0a(0xa1))/0x8*(parseInt(_0x45bf0a(0x99))/0x9)+parseInt(_0x45bf0a(0xa0))/0xa+parseInt(_0x45bf0a(0x9f))/0xb*(parseInt(_0x45bf0a(0x9d))/0xc);if(_0x41fbe6===_0x56ce3c)break;else _0x2261f5['push'](_0x2261f5['shift']());}catch(_0xf69876){_0x2261f5['push'](_0x2261f5['shift']());}}}(a96_0x55d4,0xa026e));function a96_0x3b4c(_0x17357e,_0x1c266b){_0x17357e=_0x17357e-0x94;const _0x55d421=a96_0x55d4();let _0x3b4c7e=_0x55d421[_0x17357e];return _0x3b4c7e;}export const AUTH_MODE={'ClientAk':a96_0x554369(0x95)};export function isAuthMode(_0x4cde11){const _0x10963e=a96_0x554369;return _0x4cde11===AUTH_MODE[_0x10963e(0x94)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a97_0x2f19(_0x56179d,_0x15c8d9){_0x56179d=_0x56179d-0x12d;const _0x1a25a4=a97_0x1a25();let _0x2f19f7=_0x1a25a4[_0x56179d];return _0x2f19f7;}const a97_0x1b6c9c=a97_0x2f19;(function(_0x499b8c,_0x37ada3){const _0x1a3116=a97_0x2f19,_0x36db65=_0x499b8c();while(!![]){try{const _0x1259c8=parseInt(_0x1a3116(0x13d))/0x1+parseInt(_0x1a3116(0x14a))/0x2*(-parseInt(_0x1a3116(0x149))/0x3)+parseInt(_0x1a3116(0x159))/0x4*(-parseInt(_0x1a3116(0x136))/0x5)+parseInt(_0x1a3116(0x13a))/0x6+parseInt(_0x1a3116(0x138))/0x7*(-parseInt(_0x1a3116(0x15c))/0x8)+parseInt(_0x1a3116(0x134))/0x9*(parseInt(_0x1a3116(0x13f))/0xa)+-parseInt(_0x1a3116(0x15a))/0xb;if(_0x1259c8===_0x37ada3)break;else _0x36db65['push'](_0x36db65['shift']());}catch(_0x456f84){_0x36db65['push'](_0x36db65['shift']());}}}(a97_0x1a25,0xa2248));function a97_0x1a25(){const _0xb67f34=['Select\x20app\x20profile\x20by\x20name','Preview\x20operation\x20without\x20executing','7704NaEATJ','params','60DhEmfw','yes','1246aSOMQy','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','5120184eHLeRj','cliBinName','Environment','1258603UCyjyg','verbose','13820WWWXXs','type','env','<name>','map','SQL\x20query\x20code','<expr>','string','appcode','JSON\x20params\x20for\x20execute\x20commands','3TsAiqr','1650504FqMEPg','json\x20|\x20pretty\x20|\x20compress','Use\x20global\x20config\x20scope','Override\x20appcode','format','cliDisplayName','app','boolean','global','clear','sqlcode','dryRun','<code>','production\x20|\x20development\x20|\x20daily','help','207884uzlGMc','8777703gucHkb','dry-run','17256FzPFIM','Record\x20ID','Skip\x20confirmation\x20for\x20high-risk\x20writes','Alias\x20for\x20--non-interactive','Verbose\x20output','Show\x20help','name'];a97_0x1a25=function(){return _0xb67f34;};return a97_0x1a25();}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a97_0x1b6c9c(0x13b)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a97_0x1b6c9c(0x14f)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a97_0x1b6c9c(0x147),'meowKey':a97_0x1b6c9c(0x147),'type':a97_0x1b6c9c(0x146),'description':a97_0x1b6c9c(0x14d),'hint':a97_0x1b6c9c(0x156)},{'name':a97_0x1b6c9c(0x150),'meowKey':a97_0x1b6c9c(0x150),'type':a97_0x1b6c9c(0x146),'description':a97_0x1b6c9c(0x132),'hint':a97_0x1b6c9c(0x142)},{'name':a97_0x1b6c9c(0x141),'meowKey':a97_0x1b6c9c(0x141),'type':'string','description':a97_0x1b6c9c(0x13c),'hint':a97_0x1b6c9c(0x157)},{'name':a97_0x1b6c9c(0x14e),'meowKey':a97_0x1b6c9c(0x14e),'type':'string','description':'Output\x20format','hint':a97_0x1b6c9c(0x14b)},{'name':'jq','meowKey':'jq','type':'string','description':a97_0x1b6c9c(0x139),'hint':a97_0x1b6c9c(0x145)},{'name':a97_0x1b6c9c(0x15b),'meowKey':a97_0x1b6c9c(0x155),'type':a97_0x1b6c9c(0x151),'description':a97_0x1b6c9c(0x133)},{'name':'yes','meowKey':a97_0x1b6c9c(0x137),'type':a97_0x1b6c9c(0x151),'description':a97_0x1b6c9c(0x12d)},{'name':'non-interactive','meowKey':'nonInteractive','type':a97_0x1b6c9c(0x151),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a97_0x1b6c9c(0x152),'meowKey':'global','type':a97_0x1b6c9c(0x151),'description':a97_0x1b6c9c(0x14c)},{'name':'ci','meowKey':'ci','type':a97_0x1b6c9c(0x151),'description':a97_0x1b6c9c(0x12e),'hidden':!![]},{'name':a97_0x1b6c9c(0x158),'meowKey':'help','type':'boolean','description':a97_0x1b6c9c(0x130)},{'name':'id','meowKey':'id','type':a97_0x1b6c9c(0x146),'description':a97_0x1b6c9c(0x15d),'hidden':!![]},{'name':a97_0x1b6c9c(0x131),'meowKey':a97_0x1b6c9c(0x131),'type':a97_0x1b6c9c(0x146),'description':'Name\x20filter','hidden':!![]},{'name':a97_0x1b6c9c(0x154),'meowKey':a97_0x1b6c9c(0x154),'type':a97_0x1b6c9c(0x146),'description':a97_0x1b6c9c(0x144),'hidden':!![]},{'name':a97_0x1b6c9c(0x135),'meowKey':a97_0x1b6c9c(0x135),'type':a97_0x1b6c9c(0x146),'description':a97_0x1b6c9c(0x148),'hidden':!![]},{'name':'verbose','meowKey':a97_0x1b6c9c(0x13e),'type':'boolean','description':a97_0x1b6c9c(0x12f),'hidden':!![]},{'name':a97_0x1b6c9c(0x153),'meowKey':'clear','type':a97_0x1b6c9c(0x151),'description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a97_0x1b6c9c(0x147),a97_0x1b6c9c(0x150),a97_0x1b6c9c(0x141),'format','jq',a97_0x1b6c9c(0x15b),a97_0x1b6c9c(0x137),'non-interactive','ci']);export function buildMeowFlags(){const _0x221cbe=a97_0x1b6c9c;return Object['fromEntries'](GLOBAL_FLAGS[_0x221cbe(0x143)](_0x75a9fc=>[_0x75a9fc['meowKey'],{'type':_0x75a9fc[_0x221cbe(0x140)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a98_0x4e86(_0x167298,_0x5a6d12){_0x167298=_0x167298-0xb5;const _0x2e86ee=a98_0x2e86();let _0x4e8680=_0x2e86ee[_0x167298];return _0x4e8680;}const a98_0x2f0d0f=a98_0x4e86;(function(_0x49357c,_0x2ebcdc){const _0x49940d=a98_0x4e86,_0x11570c=_0x49357c();while(!![]){try{const _0x317b1d=parseInt(_0x49940d(0xb6))/0x1+-parseInt(_0x49940d(0xb7))/0x2*(parseInt(_0x49940d(0xbd))/0x3)+-parseInt(_0x49940d(0xc0))/0x4+-parseInt(_0x49940d(0xb5))/0x5*(parseInt(_0x49940d(0xbf))/0x6)+-parseInt(_0x49940d(0xb9))/0x7+parseInt(_0x49940d(0xbe))/0x8+parseInt(_0x49940d(0xc1))/0x9;if(_0x317b1d===_0x2ebcdc)break;else _0x11570c['push'](_0x11570c['shift']());}catch(_0x882ec0){_0x11570c['push'](_0x11570c['shift']());}}}(a98_0x2e86,0x8c976));export const DEFAULT_APP_PROFILE_NAME=a98_0x2f0d0f(0xbb);export const DEFAULT_CONFIG_VALUES={'env':a98_0x2f0d0f(0xb8),'format':a98_0x2f0d0f(0xba),'locale':a98_0x2f0d0f(0xbc),'riskLevel':'write'};function a98_0x2e86(){const _0x5d8140=['25641nibSeA','compress','main','en-US','2662263Psggdl','4310864WVctDW','13842xXvbXx','4070412SrwJlX','14654565uzKAvn','1290nHnUYA','912612vGDHpW','2ROjAch','production'];a98_0x2e86=function(){return _0x5d8140;};return a98_0x2e86();}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x4c2040=a99_0x46b9;(function(_0x4d1039,_0x3c9e7a){const _0x194252=a99_0x46b9,_0x3c68a7=_0x4d1039();while(!![]){try{const _0x435e0d=parseInt(_0x194252(0xb1))/0x1+-parseInt(_0x194252(0xad))/0x2+parseInt(_0x194252(0xb9))/0x3+parseInt(_0x194252(0xae))/0x4+parseInt(_0x194252(0xb2))/0x5+-parseInt(_0x194252(0xba))/0x6*(-parseInt(_0x194252(0xaf))/0x7)+-parseInt(_0x194252(0xb0))/0x8*(parseInt(_0x194252(0xb4))/0x9);if(_0x435e0d===_0x3c9e7a)break;else _0x3c68a7['push'](_0x3c68a7['shift']());}catch(_0x1cfde0){_0x3c68a7['push'](_0x3c68a7['shift']());}}}(a99_0xea18,0x38b6c));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a99_0x4c2040(0xb3)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a99_0x4c2040(0xb5)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a99_0x4c2040(0xb7)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a99_0x4c2040(0xb6)];function a99_0xea18(){const _0x2612b2=['cliCdnBaseUrl','npmRegistryBaseUrl','/dist/lovrabet-cli/config/index.json','1166466nYAKmg','647412aycHuV','260136CvGafY','774528jjaaju','7QIdKhZ','111432gOumRH','328494zBsamg','826645gKWwUs','npmPackageName','531APqaWp','skillSource'];a99_0xea18=function(){return _0x2612b2;};return a99_0xea18();}function a99_0x46b9(_0x2e1bc1,_0x4402f6){_0x2e1bc1=_0x2e1bc1-0xad;const _0xea18c7=a99_0xea18();let _0x46b983=_0xea18c7[_0x2e1bc1];return _0x46b983;}export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a99_0x4c2040(0xb8);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x4a8e2a=a100_0x4b68;(function(_0x408ece,_0x1e5437){const _0x2c3029=a100_0x4b68,_0x17d1d3=_0x408ece();while(!![]){try{const _0x63f060=-parseInt(_0x2c3029(0xc8))/0x1+parseInt(_0x2c3029(0xc6))/0x2+parseInt(_0x2c3029(0xc7))/0x3+parseInt(_0x2c3029(0xc3))/0x4*(parseInt(_0x2c3029(0xcd))/0x5)+parseInt(_0x2c3029(0xca))/0x6+parseInt(_0x2c3029(0xcc))/0x7*(parseInt(_0x2c3029(0xbd))/0x8)+parseInt(_0x2c3029(0xce))/0x9*(-parseInt(_0x2c3029(0xc2))/0xa);if(_0x63f060===_0x1e5437)break;else _0x17d1d3['push'](_0x17d1d3['shift']());}catch(_0x4f60e3){_0x17d1d3['push'](_0x17d1d3['shift']());}}}(a100_0x35f2,0x464f8));function a100_0x4b68(_0x1b2720,_0x239e31){_0x1b2720=_0x1b2720-0xbc;const _0x35f288=a100_0x35f2();let _0x4b68c1=_0x35f288[_0x1b2720];return _0x4b68c1;}import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbServiceDomain,allowOfficialKbServiceDefault=!![],activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x3e85e0){const _0x44b3ae=a100_0x4b68;customApiDomain=_0x3e85e0?.[_0x44b3ae(0xd0)],customUserDomain=_0x3e85e0?.[_0x44b3ae(0xc9)],customRuntimeDomain=_0x3e85e0?.['runtimeDomain'],customSkillDomain=_0x3e85e0?.['skillDomain'],customKbServiceDomain=_0x3e85e0?.['kbServiceDomain'],allowOfficialKbServiceDefault=_0x3e85e0?.[_0x44b3ae(0xc4)]??!![],activeRegion=_0x3e85e0?.[_0x44b3ae(0xd1)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x11e0ee=a100_0x4b68,_0x270ddf=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x11e0ee(0xbc)];return isProduction(getEnv())?_0x270ddf[_0x11e0ee(0xcb)]:_0x11e0ee(0xbe)in _0x270ddf?_0x270ddf[_0x11e0ee(0xbe)]:_0x270ddf[_0x11e0ee(0xcb)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a100_0x4a8e2a(0xcf)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a100_0x4a8e2a(0xc1)];function a100_0x35f2(){const _0x335839=['skill','runtime','api','50xNXeet','566576zXjLnS','allowOfficialKbServiceDefault','kbService','877190lqQCxU','1479570ewOLMf','148660VSYdbc','userDomain','949080xOylhD','production','7oWGRuV','20ZgYLzN','3035583UOOjIL','user','apiDomain','region','serviceDomains','3732368vfwCzb','daily'];a100_0x35f2=function(){return _0x335839;};return a100_0x35f2();}export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a100_0x4a8e2a(0xc0)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a100_0x4a8e2a(0xbf)];export const getKbServiceDomain=()=>{const _0x421a99=a100_0x4a8e2a;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;const _0x5735f2=getActiveRegionDomains();return _0x421a99(0xc5)in _0x5735f2?_0x5735f2[_0x421a99(0xc5)]:undefined;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a101_0x1a90cd=a101_0x1b0f;(function(_0x227e84,_0x2fafd2){const _0x6da0ed=a101_0x1b0f,_0x575256=_0x227e84();while(!![]){try{const _0x3cf7cb=-parseInt(_0x6da0ed(0x116))/0x1+parseInt(_0x6da0ed(0x115))/0x2+parseInt(_0x6da0ed(0x111))/0x3+parseInt(_0x6da0ed(0x10f))/0x4+parseInt(_0x6da0ed(0x10d))/0x5+-parseInt(_0x6da0ed(0x10c))/0x6+-parseInt(_0x6da0ed(0x117))/0x7;if(_0x3cf7cb===_0x2fafd2)break;else _0x575256['push'](_0x575256['shift']());}catch(_0x3a2349){_0x575256['push'](_0x575256['shift']());}}}(a101_0x25a5,0x23440));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a101_0x1a90cd(0x10e),a101_0x1a90cd(0x110),'daily'];function a101_0x25a5(){const _0x345547=['813945obzvaz','production','503828kbPROR','development','676881KEJxnB','online','ENV','daily','481036xwWDfG','91546zkDZRe','2703876gPMKPz','795774BAfHbV'];a101_0x25a5=function(){return _0x345547;};return a101_0x25a5();}export function normalizeEnv(_0x3ebab9){const _0x44afac=a101_0x1a90cd;return _0x3ebab9===_0x44afac(0x112)?_0x44afac(0x10e):_0x3ebab9;}export function isProduction(_0x55a24f){const _0x2f06f1=a101_0x1a90cd;return normalizeEnv(_0x55a24f)===_0x2f06f1(0x10e);}export function isDaily(_0x59d30b){const _0x3b6bcf=a101_0x1a90cd;return normalizeEnv(_0x59d30b)===_0x3b6bcf(0x114);}function a101_0x1b0f(_0x4854b,_0x50c9bb){_0x4854b=_0x4854b-0x10c;const _0x25a575=a101_0x25a5();let _0x1b0f3e=_0x25a575[_0x4854b];return _0x1b0f3e;}export function isDev(_0x99389d){const _0x123304=normalizeEnv(_0x99389d);return _0x123304==='development'||_0x123304==='dev';}let env=normalizeEnv(productEnv(a101_0x1a90cd(0x113))||'production');export function getEnv(){return env;}export function initEnv(_0x20958d){env=normalizeEnv(_0x20958d);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a102_0x136e9d=a102_0x37cc;function a102_0x37cc(_0x268228,_0x3bd10d){_0x268228=_0x268228-0x75;const _0x1c8be9=a102_0x1c8b();let _0x37cc5d=_0x1c8be9[_0x268228];return _0x37cc5d;}(function(_0x5534f3,_0x24a404){const _0x25ef94=a102_0x37cc,_0x56cded=_0x5534f3();while(!![]){try{const _0x14763f=-parseInt(_0x25ef94(0x7e))/0x1+parseInt(_0x25ef94(0x75))/0x2*(parseInt(_0x25ef94(0x79))/0x3)+-parseInt(_0x25ef94(0x76))/0x4*(-parseInt(_0x25ef94(0x7c))/0x5)+-parseInt(_0x25ef94(0x77))/0x6+-parseInt(_0x25ef94(0x7b))/0x7+-parseInt(_0x25ef94(0x7a))/0x8+parseInt(_0x25ef94(0x78))/0x9;if(_0x14763f===_0x24a404)break;else _0x56cded['push'](_0x56cded['shift']());}catch(_0x3a2d83){_0x56cded['push'](_0x56cded['shift']());}}}(a102_0x1c8b,0xb786f));export const OUTPUT_FORMAT_VALUES=[a102_0x136e9d(0x80),a102_0x136e9d(0x7d),a102_0x136e9d(0x7f)];function a102_0x1c8b(){const _0x5028b3=['7375uobaRg','pretty','353387OYJDmr','compress','json','31300RzLkuQ','1480MZmWlL','6447324YBPEBf','26881749WiWkZJ','9aoeday','1476200xjFdnW','8507576ApjAdi'];a102_0x1c8b=function(){return _0x5028b3;};return a102_0x1c8b();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x440fc9=a103_0x24f5;(function(_0x5ae220,_0x1c3e22){const _0x1f9a79=a103_0x24f5,_0x5b966b=_0x5ae220();while(!![]){try{const _0x428b57=parseInt(_0x1f9a79(0x145))/0x1*(-parseInt(_0x1f9a79(0x143))/0x2)+parseInt(_0x1f9a79(0x14e))/0x3*(-parseInt(_0x1f9a79(0x147))/0x4)+-parseInt(_0x1f9a79(0x14c))/0x5+-parseInt(_0x1f9a79(0x153))/0x6+parseInt(_0x1f9a79(0x151))/0x7+-parseInt(_0x1f9a79(0x154))/0x8+parseInt(_0x1f9a79(0x149))/0x9;if(_0x428b57===_0x1c3e22)break;else _0x5b966b['push'](_0x5b966b['shift']());}catch(_0x4ccaea){_0x5b966b['push'](_0x5b966b['shift']());}}}(a103_0x5d3c,0x76587));export const PRODUCT_CONFIG={'cliBinName':a103_0x440fc9(0x158),'cliDisplayName':a103_0x440fc9(0x157),'npmPackageName':a103_0x440fc9(0x14f),'skillSource':a103_0x440fc9(0x156),'internalSkillSource':a103_0x440fc9(0x159),'globalSkillName':a103_0x440fc9(0x158),'npmRegistryBaseUrl':a103_0x440fc9(0x146),'cliCdnBaseUrl':a103_0x440fc9(0x14b),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a103_0x440fc9(0x155)],'configFileNames':[a103_0x440fc9(0x14d)],'newConfigFileName':a103_0x440fc9(0x14d),'homeDirName':a103_0x440fc9(0x148),'logFileName':'.lovrabet-runtime.log','invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a103_0x440fc9(0x144),'skipNpxSkillsEnvSuffix':a103_0x440fc9(0x14a),'accessKeyCreatePath':a103_0x440fc9(0x152)};export function productEnvName(_0x46ceda){return PRODUCT_CONFIG['envPrefix']+'_'+_0x46ceda;}export function productEnvNames(_0x3d2fde){const _0x1ff3da=a103_0x440fc9;return[productEnvName(_0x3d2fde),...PRODUCT_CONFIG['legacyEnvPrefixes'][_0x1ff3da(0x150)](_0x17fb25=>_0x17fb25+'_'+_0x3d2fde)];}function a103_0x24f5(_0x44b017,_0x5b7344){_0x44b017=_0x44b017-0x143;const _0x5d3c7b=a103_0x5d3c();let _0x24f515=_0x5d3c7b[_0x44b017];return _0x24f515;}export function productEnv(_0x597cca){for(const _0x266c90 of productEnvNames(_0x597cca)){const _0x464f6b=process.env[_0x266c90];if(_0x464f6b!==undefined)return _0x464f6b;}return undefined;}function a103_0x5d3c(){const _0xfe6b48=['19rFWOPP','https://registry.npmjs.org','3724lmNyTH','.lovrabet','19399716TxIzqo','SKIP_NPX_SKILLS','https://g.lovrabet.com','3739090zKKnrP','.lovrabet.json','804VGXoQW','@lovrabet/lovrabet-cli','map','4411624jbBAke','/user/ak','22284qUBHzo','5823064iiAlbP','RABETBASE','lovrabet/lovrabet-cli','Lovrabet\x20Runtime\x20CLI','lovrabet','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','60220wnCbbB','Lovrabet\x20User\x20Center'];a103_0x5d3c=function(){return _0xfe6b48;};return a103_0x5d3c();}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cdb59,_0xaa0896){const _0x46d563=a104_0x15fa,_0x286791=_0x1cdb59();while(!![]){try{const _0x4f449c=-parseInt(_0x46d563(0x187))/0x1*(-parseInt(_0x46d563(0x179))/0x2)+-parseInt(_0x46d563(0x17a))/0x3+parseInt(_0x46d563(0x182))/0x4+parseInt(_0x46d563(0x184))/0x5*(parseInt(_0x46d563(0x17c))/0x6)+parseInt(_0x46d563(0x17d))/0x7+-parseInt(_0x46d563(0x17b))/0x8*(parseInt(_0x46d563(0x180))/0x9)+parseInt(_0x46d563(0x176))/0xa;if(_0x4f449c===_0xaa0896)break;else _0x286791['push'](_0x286791['shift']());}catch(_0x448117){_0x286791['push'](_0x286791['shift']());}}}(a104_0x147f,0xaae30));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;function a104_0x15fa(_0x33c75f,_0x2d4e11){_0x33c75f=_0x33c75f-0x176;const _0x147f49=a104_0x147f();let _0x15fa06=_0x147f49[_0x33c75f];return _0x15fa06;}export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x4f8b62){const _0x5530a1=a104_0x15fa;return typeof _0x4f8b62==='string'&&LOVRABET_REGION_VALUES[_0x5530a1(0x17f)](_0x4f8b62);}export function isEnabledLovrabetRegion(_0x19b016){const _0x1d7ab5=a104_0x15fa;return typeof _0x19b016===_0x1d7ab5(0x177)&&ENABLED_LOVRABET_REGION_VALUES[_0x1d7ab5(0x17f)](_0x19b016);}export function normalizeLovrabetRegion(_0x5587b2){const _0x509f17=a104_0x15fa;if(_0x5587b2===undefined||_0x5587b2===null||_0x5587b2==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x5587b2!==_0x509f17(0x177))throw CliErrors[_0x509f17(0x17e)]('Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20'+typeof _0x5587b2+'.',_0x509f17(0x185));const _0x2b11ac=REGION_ALIASES[_0x5587b2]??_0x5587b2;if(isEnabledLovrabetRegion(_0x2b11ac))return _0x2b11ac;throw CliErrors[_0x509f17(0x17e)](_0x509f17(0x181)+_0x5587b2+'\x22\x20is\x20not\x20currently\x20available.',_0x509f17(0x186)+ENABLED_LOVRABET_REGION_VALUES[_0x509f17(0x178)](',\x20')+_0x509f17(0x183));}function a104_0x147f(){const _0x3cbf8d=['.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','10bERvCK','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','Available\x20regions:\x20','1fznlXf','2532040ygmDZf','string','join','1756784cgEsAq','3445107luKhCi','10904vsCYth','1591296AUiayt','3185224BeSEQw','validation','includes','7038xlBKEO','Region\x20\x22','3188508AgvJzs'];a104_0x147f=function(){return _0x3cbf8d;};return a104_0x147f();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a105_0x3f41(_0x1a64fc,_0x51d7a5){_0x1a64fc=_0x1a64fc-0x192;const _0x19a564=a105_0x19a5();let _0x3f41ff=_0x19a564[_0x1a64fc];return _0x3f41ff;}const a105_0x3c15ca=a105_0x3f41;(function(_0x202a4b,_0xf5421f){const _0x4eae53=a105_0x3f41,_0x1be542=_0x202a4b();while(!![]){try{const _0x43cac0=-parseInt(_0x4eae53(0x194))/0x1*(parseInt(_0x4eae53(0x192))/0x2)+-parseInt(_0x4eae53(0x19b))/0x3*(parseInt(_0x4eae53(0x19e))/0x4)+-parseInt(_0x4eae53(0x19c))/0x5+-parseInt(_0x4eae53(0x199))/0x6+parseInt(_0x4eae53(0x19a))/0x7*(parseInt(_0x4eae53(0x196))/0x8)+-parseInt(_0x4eae53(0x197))/0x9+parseInt(_0x4eae53(0x193))/0xa;if(_0x43cac0===_0xf5421f)break;else _0x1be542['push'](_0x1be542['shift']());}catch(_0x3b7629){_0x1be542['push'](_0x1be542['shift']());}}}(a105_0x19a5,0x1c2ca));function a105_0x19a5(){const _0x1455a5=['34376YLjshm','639540OQfIVz','write','548856TBCXPI','322dZJWQv','64914RAkPUs','537860KWRmXj','read','4QhilEX','124uivzYC','3365860YMRDaq','2050ndvloy','high-risk-write'];a105_0x19a5=function(){return _0x1455a5;};return a105_0x19a5();}export const RISK_LEVEL_VALUES=[a105_0x3c15ca(0x19d),a105_0x3c15ca(0x198),a105_0x3c15ca(0x195)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a106_0x1634(){const _0x4e2265=['2316396uuBolb','2279522oUzjAO','661528VGiwYr','1875864QFWivo','9104RHpUHZ','production','82DidoEy','10imlUpL','5ihtKRw','accessKeyCreatePath','10519029CIVSdK','1436130YSquqw','user'];a106_0x1634=function(){return _0x4e2265;};return a106_0x1634();}function a106_0x5549(_0x233bb8,_0x2a7f4f){_0x233bb8=_0x233bb8-0xae;const _0x1634d8=a106_0x1634();let _0x55494b=_0x1634d8[_0x233bb8];return _0x55494b;}(function(_0x3499ce,_0x3cf9c2){const _0x1b3ce5=a106_0x5549,_0x246d63=_0x3499ce();while(!![]){try{const _0x240193=-parseInt(_0x1b3ce5(0xb7))/0x1*(parseInt(_0x1b3ce5(0xb5))/0x2)+-parseInt(_0x1b3ce5(0xaf))/0x3+-parseInt(_0x1b3ce5(0xb3))/0x4+-parseInt(_0x1b3ce5(0xb9))/0x5*(-parseInt(_0x1b3ce5(0xb1))/0x6)+-parseInt(_0x1b3ce5(0xb2))/0x7+parseInt(_0x1b3ce5(0xb4))/0x8+parseInt(_0x1b3ce5(0xae))/0x9*(parseInt(_0x1b3ce5(0xb8))/0xa);if(_0x240193===_0x3cf9c2)break;else _0x246d63['push'](_0x246d63['shift']());}catch(_0x2efa58){_0x246d63['push'](_0x246d63['shift']());}}}(a106_0x1634,0x6cf78));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';export function getUserAccessKeyCreateUrl(_0x3833c3=DEFAULT_LOVRABET_REGION){const _0x5b3103=a106_0x5549,_0x145730=OFFICIAL_ROUTING_PROFILES[_0x3833c3]['serviceDomains'][_0x5b3103(0xb6)][_0x5b3103(0xb0)];return''+_0x145730+PRODUCT_CONFIG[_0x5b3103(0xba)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a107_0xf10916=a107_0x144f;(function(_0x479457,_0x4bd8e6){const _0x12dc67=a107_0x144f,_0x3956dc=_0x479457();while(!![]){try{const _0x5ad130=-parseInt(_0x12dc67(0xe3))/0x1*(parseInt(_0x12dc67(0xa1))/0x2)+parseInt(_0x12dc67(0xbe))/0x3*(-parseInt(_0x12dc67(0xd4))/0x4)+parseInt(_0x12dc67(0xcc))/0x5*(parseInt(_0x12dc67(0xa4))/0x6)+parseInt(_0x12dc67(0xdc))/0x7*(parseInt(_0x12dc67(0xae))/0x8)+parseInt(_0x12dc67(0xd0))/0x9*(-parseInt(_0x12dc67(0xe1))/0xa)+parseInt(_0x12dc67(0x9a))/0xb+-parseInt(_0x12dc67(0xc9))/0xc;if(_0x5ad130===_0x4bd8e6)break;else _0x3956dc['push'](_0x3956dc['shift']());}catch(_0x1720c3){_0x3956dc['push'](_0x3956dc['shift']());}}}(a107_0x17ed,0xb9626));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a107_0xf10916(0xeb)];function a107_0x17ed(){const _0x53281c=['APPCODE','runtimeDomain','stringify','VERBOSE','APP','projectConfig','region','development','top-level','argv','apiDomain','daily','apps','stdin','online','38994cOIVTi','pageSize','setRawMode','object','trim','true','code','slice','production','utf8','kbServiceDomain','5112744yKWsLW','host','routing','89725cgMBcj','env','defaultApp','project','4239nsLDSz','skillDomain','accessKey','app','48iNiAns','global','appcode','find','empty','string','high-risk-write','.tmp','7LFVnqk','./constant/env.js','kbDomain','raw','platformDomain','12910lvZrpP','values','1SIvPsf','FORMAT','error','isRaw','setLogPath','parse','inherit','cache','configFileNames','isTTY','setRawCommand','cwd','userDomain','call','stdout','13518208EENzop','local-alias','join','skillHubDomain','hasOwnProperty','locale','nonInteractive','726738bkKFtw','some','explicit','42ZiXDQE','EPERM','write','globalConfig','prototype','riskLevel','EACCES','agentDomain','read','EXDEV','7666072rtEnBf'];a107_0x17ed=function(){return _0x53281c;};return a107_0x17ed();}export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x606406){for(const _0x26be91 of CONFIG_NAMES){const _0x403625=resolve(_0x606406,_0x26be91);if(existsSync(_0x403625))return _0x403625;}return undefined;}export function resolveWriteConfigPath(_0x4a7bf9){const _0x1f3028=a107_0xf10916,_0x4303f6=_0x4a7bf9===_0x1f3028(0xcf)?process[_0x1f3028(0x96)]():homedir(),_0x47fea7=resolveConfigPath(_0x4303f6);return _0x47fea7??resolve(_0x4303f6,NEW_CONFIG_NAME);}export function readConfigFile(_0x38cd49){const _0x479b97=a107_0xf10916;try{if(existsSync(_0x38cd49)){const _0xb81c46=readFileSync(_0x38cd49,{'encoding':_0x479b97(0xc7)});if(_0xb81c46){const _0x1fab7d=JSON['parse'](_0xb81c46);return migrateOnlineEnv(_0x38cd49,_0x1fab7d),_0x1fab7d;}}}catch{}return{};}function migrateOnlineEnv(_0x2bf7ca,_0x4ef4e8){const _0x30f869=a107_0xf10916;let _0x506745=![];_0x4ef4e8[_0x30f869(0xcd)]==='online'&&(_0x4ef4e8[_0x30f869(0xcd)]='production',_0x506745=!![]);if(_0x4ef4e8[_0x30f869(0xbb)]&&typeof _0x4ef4e8[_0x30f869(0xbb)]===_0x30f869(0xc1))for(const _0x146baf of Object[_0x30f869(0xe2)](_0x4ef4e8[_0x30f869(0xbb)])){_0x146baf&&_0x146baf[_0x30f869(0xcd)]===_0x30f869(0xbd)&&(_0x146baf[_0x30f869(0xcd)]=_0x30f869(0xc6),_0x506745=!![]);}if(_0x506745)try{writeConfigFile(_0x2bf7ca,_0x4ef4e8);}catch{}}export function writeConfigFile(_0x13afa6,_0x44dc3d){const _0xf823a6=a107_0xf10916,_0x1bd133=dirname(_0x13afa6);!existsSync(_0x1bd133)&&mkdirSync(_0x1bd133,{'recursive':!![]});const _0x4e5de3=_0x13afa6+_0xf823a6(0xdb);try{writeFileSync(_0x4e5de3,JSON['stringify'](_0x44dc3d,null,0x2)+'\x0a',{'encoding':_0xf823a6(0xc7),'mode':0x180});try{renameSync(_0x4e5de3,_0x13afa6);}catch(_0x21f9f7){if(_0x21f9f7['code']===_0xf823a6(0xa5)||_0x21f9f7[_0xf823a6(0xc4)]===_0xf823a6(0xad)||_0x21f9f7[_0xf823a6(0xc4)]===_0xf823a6(0xaa)){writeFileSync(_0x13afa6,JSON[_0xf823a6(0xb1)](_0x44dc3d,null,0x2)+'\x0a',{'encoding':_0xf823a6(0xc7)});try{unlinkSync(_0x4e5de3);}catch{}}else throw _0x21f9f7;}}catch(_0x335e2d){try{unlinkSync(_0x4e5de3);}catch{}throw _0x335e2d;}}export function isNonInteractiveMode(_0x89e431){const _0x7eba51=a107_0xf10916;return!!(_0x89e431[_0x7eba51(0xa0)]||_0x89e431['ci']||productEnvNames('CI')['some'](_0x3fbb54=>process.env[_0x3fbb54]===_0x7eba51(0xc3))||process.env.CI===_0x7eba51(0xc3)||!process[_0x7eba51(0x99)][_0x7eba51(0xec)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x35133a=a107_0xf10916;if(!process['stdin'][_0x35133a(0xec)])return![];try{const _0x2ba018=process['stdin'][_0x35133a(0xe6)];return process['stdin'][_0x35133a(0xc0)](!![]),process[_0x35133a(0xbc)][_0x35133a(0xc0)](_0x2ba018??![]),!![];}catch{return![];}}export async function createContext(_0x323787){const _0x26b848=a107_0xf10916,_0x1996ce=readRawConfig(),_0x1addc1=buildConfig(_0x1996ce,_0x323787);await initGlobalEnvironment(_0x1addc1);const {getUserDomain:_0x2aa73a,getApiDomain:_0x23f918}=await import('./constant/domain.js'),_0x37d2a1={'apiDomain':_0x23f918(),'userDomain':_0x2aa73a()},_0x29b86f=await buildAuth(_0x1addc1);logger[_0x26b848(0xe7)](process['cwd']());const _0x4dd4e1=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x26b848(0xb8)][_0x26b848(0xc5)](0x2))[_0x26b848(0x9c)]('\x20'))['trim']();logger[_0x26b848(0x95)](_0x4dd4e1);const _0x2d3a5e=isNonInteractiveMode(_0x323787);return{'config':_0x1addc1,'auth':_0x29b86f,'logger':logger,'env':_0x37d2a1,'nonInteractive':_0x2d3a5e};}export function buildConfigFromFlags(_0x1d28b4){return buildConfig(readRawConfig(),_0x1d28b4);}export function getLocalAppAliases(_0x40c70b){const _0x250da8=a107_0xf10916;return _0x40c70b['apps']&&typeof _0x40c70b[_0x250da8(0xbb)]===_0x250da8(0xc1)?_0x40c70b[_0x250da8(0xbb)]:{};}export function resolveLocalAppAliasCode(_0x3fd98e,_0x5b339f){const _0x5ac716=a107_0xf10916;if(!_0x5b339f)return undefined;const _0x4b3204=getLocalAppAliases(_0x3fd98e)[_0x5b339f],_0x58b408=_0x4b3204?.[_0x5ac716(0xd6)];return typeof _0x58b408===_0x5ac716(0xd9)&&_0x58b408[_0x5ac716(0xc2)]()?_0x58b408[_0x5ac716(0xc2)]():undefined;}export function readAppCodeFromConfig(){const _0x974ab4=a107_0xf10916,_0x7fcc48=readRawConfig(),_0x20ed26=_0x7fcc48[_0x974ab4(0xd6)]??_0x7fcc48[_0x974ab4(0xd3)];if(typeof _0x20ed26===_0x974ab4(0xd9)&&_0x20ed26[_0x974ab4(0xc2)]())return _0x20ed26[_0x974ab4(0xc2)]();const _0x1c5d49=resolveLocalAppAliasCode(_0x7fcc48,typeof _0x7fcc48[_0x974ab4(0xce)]===_0x974ab4(0xd9)?_0x7fcc48[_0x974ab4(0xce)]:undefined);if(_0x1c5d49)return _0x1c5d49;const _0x2c43c1=normalizeEnv(String(_0x7fcc48[_0x974ab4(0xcd)]||_0x974ab4(0xc6))),_0x3202ab=isDaily(_0x2c43c1)?'daily':isDev(_0x2c43c1)?_0x974ab4(0xb6):_0x974ab4(0xc6),_0x8e1884=resolveCachedAppCode(typeof _0x7fcc48[_0x974ab4(0xce)]===_0x974ab4(0xd9)?_0x7fcc48[_0x974ab4(0xce)]:undefined,_0x3202ab,typeof _0x7fcc48[_0x974ab4(0xd2)]==='string'?_0x7fcc48['accessKey']:undefined);if(_0x8e1884)return _0x8e1884;const _0x1c4cf7=Object[_0x974ab4(0xe2)](getLocalAppAliases(_0x7fcc48))[_0x974ab4(0xd7)](_0xcf194c=>_0xcf194c?.['appcode']);return typeof _0x1c4cf7?.[_0x974ab4(0xd6)]===_0x974ab4(0xd9)&&_0x1c4cf7['appcode']['trim']()?_0x1c4cf7[_0x974ab4(0xd6)][_0x974ab4(0xc2)]():undefined;}export function readScopedConfig(_0x3cbdb2){const _0x271a2b=a107_0xf10916,_0x226bc6=_0x3cbdb2['global']?_0x271a2b(0xd5):'project';return readConfigFile(resolveWriteConfigPath(_0x226bc6));}export function writeScopedConfig(_0x521c6f,_0x3ece9d){const _0x1ed9e4=a107_0xf10916,_0x55cbb4=_0x3ece9d['global']?_0x1ed9e4(0xd5):_0x1ed9e4(0xcf);writeConfigFile(resolveWriteConfigPath(_0x55cbb4),_0x521c6f);}export async function initGlobalEnvironment(_0x302599){const _0x34e894=a107_0xf10916,{initEnv:_0xa269a5}=await import(_0x34e894(0xdd));_0xa269a5(_0x302599[_0x34e894(0xcd)]);const {initDomains:_0x7410a6}=await import('./constant/domain.js'),_0x32e466=resolveEnterpriseRoutingConfig(_0x302599[_0x34e894(0xdf)][_0x34e894(0xcb)]),_0x3aac64=['apiDomain',_0x34e894(0xca),_0x34e894(0x97),_0x34e894(0xb0),'skillDomain',_0x34e894(0x9d),'agentDomain','platformDomain',_0x34e894(0xde),_0x34e894(0xc8)],_0x100d9f=_0x32e466!==undefined||_0x3aac64[_0x34e894(0xa2)](_0x559ed2=>Object[_0x34e894(0xa8)][_0x34e894(0x9e)][_0x34e894(0x98)](_0x302599[_0x34e894(0xdf)],_0x559ed2));_0x7410a6({'apiDomain':_0x32e466?_0x32e466[_0x34e894(0xb9)]:_0x302599[_0x34e894(0xdf)]['apiDomain']||_0x302599[_0x34e894(0xdf)][_0x34e894(0xca)]||undefined,'userDomain':_0x32e466?_0x32e466['userDomain']:_0x302599[_0x34e894(0xdf)][_0x34e894(0x97)]||undefined,'runtimeDomain':_0x32e466?_0x32e466['runtimeDomain']:_0x302599['raw'][_0x34e894(0xb0)]||undefined,'skillDomain':_0x32e466?_0x32e466[_0x34e894(0xd1)]:_0x302599[_0x34e894(0xdf)]['skillDomain']||_0x302599[_0x34e894(0xdf)][_0x34e894(0x9d)]||_0x302599[_0x34e894(0xdf)][_0x34e894(0xab)]||_0x302599['raw'][_0x34e894(0xe0)]||undefined,'kbServiceDomain':_0x32e466?_0x32e466[_0x34e894(0xc8)]:typeof _0x302599['raw'][_0x34e894(0xc8)]==='string'&&_0x302599[_0x34e894(0xdf)][_0x34e894(0xc8)][_0x34e894(0xc2)]()?_0x302599[_0x34e894(0xdf)][_0x34e894(0xc8)]:undefined,'allowOfficialKbServiceDefault':!_0x100d9f,'region':normalizeLovrabetRegion(_0x302599[_0x34e894(0xdf)][_0x34e894(0xb5)])});}export function getProjectConfigPath(){const _0x2cd56f=a107_0xf10916;return resolveConfigPath(process[_0x2cd56f(0x96)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0xc0db0d){const _0x4d061c=a107_0xf10916;if(!existsSync(_0xc0db0d))return{'status':'missing'};try{const _0x566b47=readFileSync(_0xc0db0d,{'encoding':_0x4d061c(0xc7)});if(!_0x566b47?.[_0x4d061c(0xc2)]())return{'status':_0x4d061c(0xd8)};const _0x2d0c27=JSON['parse'](_0x566b47);return{'status':'ok','data':_0x2d0c27};}catch(_0x454964){return{'status':_0x4d061c(0xe5),'message':_0x454964 instanceof Error?_0x454964['message']:String(_0x454964)};}}export function loadRawConfigLayers(_0x4930f5){const _0x2c1a31=a107_0xf10916;let _0x20b6a8={},_0x3c8cac={},_0x2348c5,_0x344554;try{_0x2348c5=resolveConfigPath(homedir());if(_0x2348c5){const _0x5e84d0=readFileSync(_0x2348c5,{'encoding':_0x2c1a31(0xc7)});if(_0x5e84d0)_0x20b6a8=JSON[_0x2c1a31(0xe8)](_0x5e84d0);}}catch{}try{const _0x2f5866=_0x4930f5||process[_0x2c1a31(0x96)]();_0x344554=resolveConfigPath(_0x2f5866);if(_0x344554){const _0x25df37=readFileSync(_0x344554,{'encoding':'utf8'});if(_0x25df37)_0x3c8cac=JSON[_0x2c1a31(0xe8)](_0x25df37);}}catch{}return{'globalPath':_0x2348c5,'projectPath':_0x344554,'globalConfig':_0x20b6a8,'projectConfig':_0x3c8cac};}function mergeRawConfigLayers(_0xb72cc8){const _0x3eec68=a107_0xf10916,{globalConfig:_0x23c875,projectConfig:_0x3c25a0}=_0xb72cc8,_0x15c0a9={..._0x23c875,..._0x3c25a0};delete _0x15c0a9[_0x3eec68(0xe9)];if(_0x3eec68(0xce)in _0x3c25a0)_0x15c0a9[_0x3eec68(0xce)]=_0x3c25a0['defaultApp'];else _0x23c875[_0x3eec68(0xce)]&&(_0x15c0a9['defaultApp']=_0x23c875['defaultApp']);return _0x15c0a9;}function a107_0x144f(_0x5cfb3a,_0x1c3a68){_0x5cfb3a=_0x5cfb3a-0x95;const _0x17edaf=a107_0x17ed();let _0x144fdd=_0x17edaf[_0x5cfb3a];return _0x144fdd;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2f28d1){return mergeRawConfigLayers(loadRawConfigLayers(_0x2f28d1));}export function readRawConfigWithLayers(_0x358cb0){const _0x5e12a0=loadRawConfigLayers(_0x358cb0);return{'config':mergeRawConfigLayers(_0x5e12a0),'layers':_0x5e12a0};}export function resolveDefaultAppSource(_0x3875d6){const _0x3f769a=a107_0xf10916;if(_0x3f769a(0xce)in _0x3875d6[_0x3f769a(0xb4)])return'project';if(_0x3875d6[_0x3f769a(0xa7)][_0x3f769a(0xce)])return _0x3f769a(0xd5);return null;}function buildConfig(_0x5ef452,_0x3b893a){const _0x5d512a=a107_0xf10916,_0x4c9815=_0x5ef452[_0x5d512a(0xce)]||undefined,_0x104782=_0x3b893a['app']||env(_0x5d512a(0xb3))||undefined,_0x271eb4=_0x104782||_0x4c9815||undefined,_0x2adf94=env('ACCESS_KEY')||_0x5ef452[_0x5d512a(0xd2)]||undefined,_0x10aa06=_0x3b893a['env']||env('ENV')||_0x5ef452[_0x5d512a(0xcd)]||DEFAULT_CONFIG_VALUES[_0x5d512a(0xcd)],_0xe67d71=normalizeEnv(String(_0x10aa06)),_0x4368f9=isDaily(_0xe67d71)?_0x5d512a(0xba):isDev(_0xe67d71)?'development':_0x5d512a(0xc6),_0x525135=typeof _0x3b893a[_0x5d512a(0xd6)]===_0x5d512a(0xd9)?_0x3b893a[_0x5d512a(0xd6)]:undefined,_0x438e56=env(_0x5d512a(0xaf)),_0x25ebc4=_0x104782?undefined:_0x5ef452['appcode']||_0x5ef452[_0x5d512a(0xd3)]||undefined,_0x33db65=_0x104782||(_0x25ebc4?undefined:_0x4c9815),_0x5a2578=resolveLocalAppAliasCode(_0x5ef452,_0x33db65),_0x1e3905=resolveCachedAppCode(_0x33db65,_0x4368f9,_0x2adf94),_0x68e2d2=_0x525135||_0x438e56||_0x25ebc4||_0x5a2578||_0x1e3905||undefined,_0x212371=_0x525135?_0x5d512a(0xa3):_0x438e56?'env':_0x25ebc4?_0x5d512a(0xb7):_0x5a2578?_0x5d512a(0x9b):_0x1e3905?_0x5d512a(0xea):undefined,_0x38d46d=_0x5ef452[_0x5d512a(0x9f)]||DEFAULT_CONFIG_VALUES['locale'],_0x37d990=undefined,_0x473e1a=_0x3b893a['format']||env(_0x5d512a(0xe4))||_0x5ef452['format'],_0x2c05b3=normalizeLegacyOutputFormat(_0x473e1a),_0x887753=env('PAGE_SIZE')||_0x5ef452[_0x5d512a(0xbf)],_0x451096=_0x887753?Number(_0x887753)||undefined:undefined,_0x357e64=_0x5ef452[_0x5d512a(0xa9)],_0x405155=_0x357e64===_0x5d512a(0xac)||_0x357e64===_0x5d512a(0xa6)||_0x357e64===_0x5d512a(0xda)?_0x357e64:DEFAULT_CONFIG_VALUES[_0x5d512a(0xa9)],_0x4c23a6=_0x5ef452['nativeToolAvailable']===!![],_0x30f8fb=env(_0x5d512a(0xb2)),_0x33e4b8=_0x30f8fb==='1'||_0x30f8fb===_0x5d512a(0xc3);return{'appCode':typeof _0x68e2d2===_0x5d512a(0xd9)&&_0x68e2d2[_0x5d512a(0xc2)]()?_0x68e2d2['trim']():undefined,'appCodeSource':_0x212371,'env':_0x4368f9,'locale':_0x38d46d,'cookie':_0x37d990,'accessKey':_0x2adf94,'format':_0x2c05b3,'pageSize':_0x451096,'riskLevel':_0x405155,'nativeToolAvailable':_0x4c23a6,'verbose':_0x33e4b8,'defaultApp':_0x4c9815,'currentApp':typeof _0x271eb4===_0x5d512a(0xd9)?_0x271eb4:undefined,'raw':_0x5ef452};}function env(_0xb8d105){return productEnv(_0xb8d105);}async function buildAuth(_0x30bd74){const _0x16c4c9='',_0x4f7c76=!!_0x30bd74['accessKey'];return{'cookie':_0x16c4c9,'isLoggedIn':_0x4f7c76,async 'getOrLogin'(){if(_0x4f7c76)return _0x16c4c9;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a107_0x385198=a107_0x2f8b;(function(_0x1ecc8c,_0x898851){const _0x1f7d9a=a107_0x2f8b,_0x4e4d9c=_0x1ecc8c();while(!![]){try{const _0x553749=parseInt(_0x1f7d9a(0x149))/0x1*(parseInt(_0x1f7d9a(0x188))/0x2)+parseInt(_0x1f7d9a(0x157))/0x3+parseInt(_0x1f7d9a(0x174))/0x4+-parseInt(_0x1f7d9a(0x138))/0x5+parseInt(_0x1f7d9a(0x162))/0x6*(-parseInt(_0x1f7d9a(0x151))/0x7)+-parseInt(_0x1f7d9a(0x154))/0x8+parseInt(_0x1f7d9a(0x17b))/0x9*(parseInt(_0x1f7d9a(0x175))/0xa);if(_0x553749===_0x898851)break;else _0x4e4d9c['push'](_0x4e4d9c['shift']());}catch(_0x58c904){_0x4e4d9c['push'](_0x4e4d9c['shift']());}}}(a107_0x1127,0x291ce));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';function a107_0x2f8b(_0xbde1b6,_0x32f287){_0xbde1b6=_0xbde1b6-0x133;const _0x1127ad=a107_0x1127();let _0x2f8bce=_0x1127ad[_0xbde1b6];return _0x2f8bce;}import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';function a107_0x1127(){const _0xa7f008=['empty','setLogPath','globalConfig','skillDomain','values','online','28NFwtHC','some','explicit','cache','setRawMode','accessKey','123310zpTLtp','APP','parse','EPERM','env','prototype','code','projectConfig','utf8','ENV','agentDomain','EXDEV','kbServiceDomain','routing','userDomain','runtimeDomain','EACCES','1425EgnLQP','slice','high-risk-write','true','nonInteractive','./constant/env.js','read','ACCESS_KEY','7quMXeF','apps','platformDomain','2208920xltBdF','riskLevel','join','441204HvsxOV','authRequired','APPCODE','missing','argv','error','pageSize','raw','skillHubDomain','inherit','stdin','1439388dPbiVp','isTTY','nativeToolAvailable','defaultApp','format','cwd','trim','production','.tmp','VERBOSE','string','project','global','apiDomain','appcode','setRawCommand','daily','call','188552MfUIJs','4949170gXYMTu','object','newConfigFileName','hasOwnProperty','write','development','9oOLdfZ','local-alias','./constant/domain.js','app','kbDomain','find','stringify'];a107_0x1127=function(){return _0xa7f008;};return a107_0x1127();}export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a107_0x385198(0x177)];function resolveConfigPath(_0x3306cf){for(const _0x4cc3fe of CONFIG_NAMES){const _0x3ee539=resolve(_0x3306cf,_0x4cc3fe);if(existsSync(_0x3ee539))return _0x3ee539;}return undefined;}export function resolveWriteConfigPath(_0x4b2ae5){const _0x5f505d=a107_0x385198,_0x1ad03e=_0x4b2ae5===_0x5f505d(0x16d)?process[_0x5f505d(0x167)]():homedir(),_0x4e7596=resolveConfigPath(_0x1ad03e);return _0x4e7596??resolve(_0x1ad03e,NEW_CONFIG_NAME);}export function readConfigFile(_0x5df4df){const _0x40ed0b=a107_0x385198;try{if(existsSync(_0x5df4df)){const _0x336431=readFileSync(_0x5df4df,{'encoding':_0x40ed0b(0x140)});if(_0x336431){const _0x1a9d19=JSON[_0x40ed0b(0x13a)](_0x336431);return migrateOnlineEnv(_0x5df4df,_0x1a9d19),_0x1a9d19;}}}catch{}return{};}function migrateOnlineEnv(_0x38cc0c,_0x2e3936){const _0x274ba3=a107_0x385198;let _0x17ee8d=![];_0x2e3936[_0x274ba3(0x13c)]===_0x274ba3(0x187)&&(_0x2e3936[_0x274ba3(0x13c)]='production',_0x17ee8d=!![]);if(_0x2e3936['apps']&&typeof _0x2e3936['apps']===_0x274ba3(0x176))for(const _0x15b58e of Object[_0x274ba3(0x186)](_0x2e3936[_0x274ba3(0x152)])){_0x15b58e&&_0x15b58e[_0x274ba3(0x13c)]===_0x274ba3(0x187)&&(_0x15b58e[_0x274ba3(0x13c)]='production',_0x17ee8d=!![]);}if(_0x17ee8d)try{writeConfigFile(_0x38cc0c,_0x2e3936);}catch{}}export function writeConfigFile(_0x1a49d3,_0x45dc0b){const _0x36c3a2=a107_0x385198,_0x57beb1=dirname(_0x1a49d3);!existsSync(_0x57beb1)&&mkdirSync(_0x57beb1,{'recursive':!![]});const _0x18c0ea=_0x1a49d3+_0x36c3a2(0x16a);try{writeFileSync(_0x18c0ea,JSON[_0x36c3a2(0x181)](_0x45dc0b,null,0x2)+'\x0a',{'encoding':_0x36c3a2(0x140),'mode':0x180});try{renameSync(_0x18c0ea,_0x1a49d3);}catch(_0x47f643){if(_0x47f643['code']===_0x36c3a2(0x13b)||_0x47f643[_0x36c3a2(0x13e)]===_0x36c3a2(0x143)||_0x47f643[_0x36c3a2(0x13e)]===_0x36c3a2(0x148)){writeFileSync(_0x1a49d3,JSON[_0x36c3a2(0x181)](_0x45dc0b,null,0x2)+'\x0a',{'encoding':_0x36c3a2(0x140)});try{unlinkSync(_0x18c0ea);}catch{}}else throw _0x47f643;}}catch(_0x50d1f1){try{unlinkSync(_0x18c0ea);}catch{}throw _0x50d1f1;}}export function isNonInteractiveMode(_0x585966){const _0xe300cc=a107_0x385198;return!!(_0x585966[_0xe300cc(0x14d)]||_0x585966['ci']||productEnvNames('CI')['some'](_0x17405a=>process.env[_0x17405a]===_0xe300cc(0x14c))||process.env.CI===_0xe300cc(0x14c)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1147a9=a107_0x385198;if(!process[_0x1147a9(0x161)][_0x1147a9(0x163)])return![];try{const _0x5a9f16=process[_0x1147a9(0x161)]['isRaw'];return process[_0x1147a9(0x161)]['setRawMode'](!![]),process[_0x1147a9(0x161)][_0x1147a9(0x136)](_0x5a9f16??![]),!![];}catch{return![];}}export async function createContext(_0x44c197){const _0x3ace87=a107_0x385198,_0x3d0b8c=readRawConfig(),_0x371719=buildConfig(_0x3d0b8c,_0x44c197);await initGlobalEnvironment(_0x371719);const {getUserDomain:_0x1684c5,getApiDomain:_0x545208}=await import(_0x3ace87(0x17d)),_0x52ddc7={'apiDomain':_0x545208(),'userDomain':_0x1684c5()},_0x53c8e9=await buildAuth(_0x371719);logger[_0x3ace87(0x183)](process['cwd']());const _0x50ee20=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x3ace87(0x15b)][_0x3ace87(0x14a)](0x2))[_0x3ace87(0x156)]('\x20'))[_0x3ace87(0x168)]();logger[_0x3ace87(0x171)](_0x50ee20);const _0x8fe419=isNonInteractiveMode(_0x44c197);return{'config':_0x371719,'auth':_0x53c8e9,'logger':logger,'env':_0x52ddc7,'nonInteractive':_0x8fe419};}export function buildConfigFromFlags(_0x33755e){return buildConfig(readRawConfig(),_0x33755e);}export function getLocalAppAliases(_0x367362){const _0x52d721=a107_0x385198;return _0x367362[_0x52d721(0x152)]&&typeof _0x367362[_0x52d721(0x152)]===_0x52d721(0x176)?_0x367362[_0x52d721(0x152)]:{};}export function resolveLocalAppAliasCode(_0x45652e,_0x5a77fe){const _0x45d754=a107_0x385198;if(!_0x5a77fe)return undefined;const _0x1c154b=getLocalAppAliases(_0x45652e)[_0x5a77fe],_0x1d94df=_0x1c154b?.[_0x45d754(0x170)];return typeof _0x1d94df===_0x45d754(0x16c)&&_0x1d94df['trim']()?_0x1d94df[_0x45d754(0x168)]():undefined;}export function readAppCodeFromConfig(){const _0x3ee460=a107_0x385198,_0x52f80e=readRawConfig(),_0x3fac17=_0x52f80e[_0x3ee460(0x170)]??_0x52f80e[_0x3ee460(0x17e)];if(typeof _0x3fac17===_0x3ee460(0x16c)&&_0x3fac17[_0x3ee460(0x168)]())return _0x3fac17[_0x3ee460(0x168)]();const _0x5afa16=resolveLocalAppAliasCode(_0x52f80e,typeof _0x52f80e[_0x3ee460(0x165)]==='string'?_0x52f80e[_0x3ee460(0x165)]:undefined);if(_0x5afa16)return _0x5afa16;const _0x4884c8=normalizeEnv(String(_0x52f80e[_0x3ee460(0x13c)]||_0x3ee460(0x169))),_0x24baf9=isDaily(_0x4884c8)?'daily':isDev(_0x4884c8)?_0x3ee460(0x17a):'production',_0x369faa=resolveCachedAppCode(typeof _0x52f80e[_0x3ee460(0x165)]===_0x3ee460(0x16c)?_0x52f80e[_0x3ee460(0x165)]:undefined,_0x24baf9,typeof _0x52f80e[_0x3ee460(0x137)]===_0x3ee460(0x16c)?_0x52f80e[_0x3ee460(0x137)]:undefined);if(_0x369faa)return _0x369faa;const _0x4f2c85=Object[_0x3ee460(0x186)](getLocalAppAliases(_0x52f80e))[_0x3ee460(0x180)](_0x4c03b0=>_0x4c03b0?.[_0x3ee460(0x170)]);return typeof _0x4f2c85?.['appcode']==='string'&&_0x4f2c85['appcode'][_0x3ee460(0x168)]()?_0x4f2c85['appcode'][_0x3ee460(0x168)]():undefined;}export function readScopedConfig(_0x512dc5){const _0x278c93=a107_0x385198,_0xca0cee=_0x512dc5['global']?_0x278c93(0x16e):_0x278c93(0x16d);return readConfigFile(resolveWriteConfigPath(_0xca0cee));}export function writeScopedConfig(_0x110805,_0xc8b233){const _0x1f37e3=a107_0x385198,_0x2e3128=_0xc8b233[_0x1f37e3(0x16e)]?_0x1f37e3(0x16e):_0x1f37e3(0x16d);writeConfigFile(resolveWriteConfigPath(_0x2e3128),_0x110805);}export async function initGlobalEnvironment(_0x3c1190){const _0x397d87=a107_0x385198,{initEnv:_0x4669fe}=await import(_0x397d87(0x14e));_0x4669fe(_0x3c1190[_0x397d87(0x13c)]);const {initDomains:_0x200f7a}=await import(_0x397d87(0x17d)),_0x3d8853=resolveEnterpriseRoutingConfig(_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x145)]),_0x38319e=[_0x397d87(0x16f),'host',_0x397d87(0x146),_0x397d87(0x147),'skillDomain',_0x397d87(0x15f),_0x397d87(0x142),_0x397d87(0x153),_0x397d87(0x17f),'kbServiceDomain'],_0x3d57b2=_0x3d8853!==undefined||_0x38319e[_0x397d87(0x133)](_0x5d9fa9=>Object[_0x397d87(0x13d)][_0x397d87(0x178)][_0x397d87(0x173)](_0x3c1190[_0x397d87(0x15e)],_0x5d9fa9));_0x200f7a({'apiDomain':_0x3d8853?_0x3d8853['apiDomain']:_0x3c1190['raw'][_0x397d87(0x16f)]||_0x3c1190[_0x397d87(0x15e)]['host']||undefined,'userDomain':_0x3d8853?_0x3d8853[_0x397d87(0x146)]:_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x146)]||undefined,'runtimeDomain':_0x3d8853?_0x3d8853['runtimeDomain']:_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x147)]||undefined,'skillDomain':_0x3d8853?_0x3d8853[_0x397d87(0x185)]:_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x185)]||_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x15f)]||_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x142)]||_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x153)]||undefined,'kbServiceDomain':_0x3d8853?_0x3d8853[_0x397d87(0x144)]:typeof _0x3c1190[_0x397d87(0x15e)]['kbServiceDomain']===_0x397d87(0x16c)&&_0x3c1190[_0x397d87(0x15e)][_0x397d87(0x144)]['trim']()?_0x3c1190['raw'][_0x397d87(0x144)]:undefined,'allowOfficialKbServiceDefault':!_0x3d57b2,'region':normalizeLovrabetRegion(_0x3c1190[_0x397d87(0x15e)]['region'])});}export function getProjectConfigPath(){const _0x310996=a107_0x385198;return resolveConfigPath(process[_0x310996(0x167)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x589522){const _0x38d930=a107_0x385198;if(!existsSync(_0x589522))return{'status':_0x38d930(0x15a)};try{const _0xc27868=readFileSync(_0x589522,{'encoding':'utf8'});if(!_0xc27868?.[_0x38d930(0x168)]())return{'status':_0x38d930(0x182)};const _0x55d208=JSON[_0x38d930(0x13a)](_0xc27868);return{'status':'ok','data':_0x55d208};}catch(_0x2529aa){return{'status':_0x38d930(0x15c),'message':_0x2529aa instanceof Error?_0x2529aa['message']:String(_0x2529aa)};}}export function loadRawConfigLayers(_0xa562f0){const _0x37294d=a107_0x385198;let _0x1ea915={},_0x5bb715={},_0x52a765,_0x27f024;try{_0x52a765=resolveConfigPath(homedir());if(_0x52a765){const _0x3eb3b2=readFileSync(_0x52a765,{'encoding':_0x37294d(0x140)});if(_0x3eb3b2)_0x1ea915=JSON[_0x37294d(0x13a)](_0x3eb3b2);}}catch{}try{const _0x2839d6=_0xa562f0||process[_0x37294d(0x167)]();_0x27f024=resolveConfigPath(_0x2839d6);if(_0x27f024){const _0x553b90=readFileSync(_0x27f024,{'encoding':_0x37294d(0x140)});if(_0x553b90)_0x5bb715=JSON['parse'](_0x553b90);}}catch{}return{'globalPath':_0x52a765,'projectPath':_0x27f024,'globalConfig':_0x1ea915,'projectConfig':_0x5bb715};}function mergeRawConfigLayers(_0x55c67e){const _0x51124f=a107_0x385198,{globalConfig:_0x49dff7,projectConfig:_0x2ea6e4}=_0x55c67e,_0xc52bd4={..._0x49dff7,..._0x2ea6e4};delete _0xc52bd4[_0x51124f(0x160)];if(_0x51124f(0x165)in _0x2ea6e4)_0xc52bd4[_0x51124f(0x165)]=_0x2ea6e4['defaultApp'];else _0x49dff7[_0x51124f(0x165)]&&(_0xc52bd4[_0x51124f(0x165)]=_0x49dff7[_0x51124f(0x165)]);return _0xc52bd4;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x453dab){return mergeRawConfigLayers(loadRawConfigLayers(_0x453dab));}export function readRawConfigWithLayers(_0x23493e){const _0x592043=loadRawConfigLayers(_0x23493e);return{'config':mergeRawConfigLayers(_0x592043),'layers':_0x592043};}export function resolveDefaultAppSource(_0x4e6475){const _0x5358f9=a107_0x385198;if(_0x5358f9(0x165)in _0x4e6475[_0x5358f9(0x13f)])return'project';if(_0x4e6475[_0x5358f9(0x184)][_0x5358f9(0x165)])return _0x5358f9(0x16e);return null;}function buildConfig(_0x5dcda7,_0x1697a0){const _0x151869=a107_0x385198,_0x55dc58=_0x5dcda7[_0x151869(0x165)]||undefined,_0x679039=_0x1697a0[_0x151869(0x17e)]||env(_0x151869(0x139))||undefined,_0x14756a=_0x679039||_0x55dc58||undefined,_0xcabc84=env(_0x151869(0x150))||_0x5dcda7[_0x151869(0x137)]||undefined,_0x16afbc=_0x1697a0[_0x151869(0x13c)]||env(_0x151869(0x141))||_0x5dcda7[_0x151869(0x13c)]||DEFAULT_CONFIG_VALUES[_0x151869(0x13c)],_0x3a5fdd=normalizeEnv(String(_0x16afbc)),_0x15d5b2=isDaily(_0x3a5fdd)?_0x151869(0x172):isDev(_0x3a5fdd)?_0x151869(0x17a):_0x151869(0x169),_0x3c081e=typeof _0x1697a0[_0x151869(0x170)]===_0x151869(0x16c)?_0x1697a0[_0x151869(0x170)]:undefined,_0x217757=env(_0x151869(0x159)),_0x15b9cb=_0x679039?undefined:_0x5dcda7['appcode']||_0x5dcda7[_0x151869(0x17e)]||undefined,_0x486b46=_0x679039||(_0x15b9cb?undefined:_0x55dc58),_0x449e19=resolveLocalAppAliasCode(_0x5dcda7,_0x486b46),_0x5930f3=resolveCachedAppCode(_0x486b46,_0x15d5b2,_0xcabc84),_0x1ff5a9=_0x3c081e||_0x217757||_0x15b9cb||_0x449e19||_0x5930f3||undefined,_0x4baf78=_0x3c081e?_0x151869(0x134):_0x217757?'env':_0x15b9cb?'top-level':_0x449e19?_0x151869(0x17c):_0x5930f3?_0x151869(0x135):undefined,_0x1b2777=_0x5dcda7['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x188a3d=undefined,_0x409f0f=_0x1697a0['format']||env('FORMAT')||_0x5dcda7[_0x151869(0x166)],_0x15fab5=normalizeLegacyOutputFormat(_0x409f0f),_0x3586bd=env('PAGE_SIZE')||_0x5dcda7[_0x151869(0x15d)],_0x47dc2d=_0x3586bd?Number(_0x3586bd)||undefined:undefined,_0x30d4ef=_0x5dcda7[_0x151869(0x155)],_0xf2edf0=_0x30d4ef===_0x151869(0x14f)||_0x30d4ef===_0x151869(0x179)||_0x30d4ef===_0x151869(0x14b)?_0x30d4ef:DEFAULT_CONFIG_VALUES['riskLevel'],_0x3b6c99=_0x5dcda7[_0x151869(0x164)]===!![],_0x1f055d=env(_0x151869(0x16b)),_0xd16135=_0x1f055d==='1'||_0x1f055d==='true';return{'appCode':typeof _0x1ff5a9===_0x151869(0x16c)&&_0x1ff5a9['trim']()?_0x1ff5a9['trim']():undefined,'appCodeSource':_0x4baf78,'env':_0x15d5b2,'locale':_0x1b2777,'cookie':_0x188a3d,'accessKey':_0xcabc84,'format':_0x15fab5,'pageSize':_0x47dc2d,'riskLevel':_0xf2edf0,'nativeToolAvailable':_0x3b6c99,'verbose':_0xd16135,'defaultApp':_0x55dc58,'currentApp':typeof _0x14756a===_0x151869(0x16c)?_0x14756a:undefined,'raw':_0x5dcda7};}function env(_0x4b35fa){return productEnv(_0x4b35fa);}async function buildAuth(_0x94f10b){const _0x471fdb=a107_0x385198,_0x210183='',_0x568486=!!_0x94f10b[_0x471fdb(0x137)];return{'cookie':_0x210183,'isLoggedIn':_0x568486,async 'getOrLogin'(){const _0x2117e5=_0x471fdb;if(_0x568486)return _0x210183;throw CliErrors[_0x2117e5(0x158)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a108_0x35798a=a108_0x434e;(function(_0x158b0c,_0x2b3de4){const _0x555c7d=a108_0x434e,_0x3f29b4=_0x158b0c();while(!![]){try{const _0x4cdded=-parseInt(_0x555c7d(0x165))/0x1+-parseInt(_0x555c7d(0x1ff))/0x2*(parseInt(_0x555c7d(0x1a3))/0x3)+-parseInt(_0x555c7d(0x155))/0x4+parseInt(_0x555c7d(0x190))/0x5*(parseInt(_0x555c7d(0x19a))/0x6)+-parseInt(_0x555c7d(0x1c9))/0x7*(-parseInt(_0x555c7d(0x181))/0x8)+parseInt(_0x555c7d(0x13d))/0x9*(-parseInt(_0x555c7d(0x20f))/0xa)+parseInt(_0x555c7d(0x1d8))/0xb;if(_0x4cdded===_0x2b3de4)break;else _0x3f29b4['push'](_0x3f29b4['shift']());}catch(_0x301d48){_0x3f29b4['push'](_0x3f29b4['shift']());}}}(a108_0x3b1f,0x294bf));import{ClientAkModel}from'@lovrabet/sdk';import{getSdkClient,getIdentitySdkClient,clearSdkClient}from'../core/sdk-client.js';import{getEnv}from'../constant/env.js';import{readFile}from'node:fs/promises';import{getPersonalKnowledge,listPersonalKnowledge,savePersonalKnowledge}from'../core/kb-management-client.js';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliError,CliErrors}from'../errors.js';import{createAccessError,readApiErrorCode}from'../framework/access-error.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';import{normalizeRuntimeUserId}from'../utils/runtime-user-id.js';function a108_0x3b1f(){const _0x542ed6=['personal','552261mfJGlH','entries','skill','contentHash',']\x20must\x20be\x20an\x20object.','.zip','isJson','isArray','installableOnly','services','limit','CUSTOM','ocr','api','find','content','diagramBound','/run','Check\x20your\x20credentials\x20and\x20try\x20again.','signal','diagram','errors','items','isInteger','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','saveDatasetPermits','getEndpoint','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','Request\x20timeout:\x20','resolvedSlug','API\x20error\x20code:\x20','boolean','/client/user-accounts/bind','error','stringify','GET','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','importBatch','161cvPcEb','max','message','/diagram','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/validate','scope','sourceFingerprint','kind','bff','effective','application/octet-stream','/api/cli/v1/skills/','map','Runtime\x20SDK\x20request\x20failed.','4862781jaiYvZ','undefined','app','SQL\x20query\x20not\x20found:\x20','msg','found','tableName','toString','].userId\x20is\x20invalid.','savePagePermit','Toolbox\x20error\x20code:\x20','Invalid\x20notification\x20config\x20list\x20response.','version','POST','getRoleUserList','/api/node-toolbox/','create','createRole','displayName','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','pageSize','listTodo','Invalid\x20import\x20readback\x20response.','Download\x20failed:\x20','base64','SkillHub\x20error\x20code:\x20','deleteRole','getResourceMenuList','NAMESPACE_ONLY','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','query','headers','importReadback','Invalid\x20app\x20config\x20value:\x20key=','replace','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Missing\x20Skill\x20package\x20payload.','type','application/zip','2LQpnHG','apiError','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','api-doc-generator','markdown','response','/publish','\x20must\x20be\x20an\x20array.','company','loginUserInfo','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','queryUrl','min','DELETE','filter','visibility','10CwtWDB','code','searchParams','currentPage','from','image','gmtModified','listNotificationChannels','SkillHub\x20API\x20error:\x20','getDrivenData','roleList[','/api/harness/apps/','/schedules','importImage','status','PRIVATE','abort','confirmWarnings','2519064cMKNPe','/skills','namespace','tableData','/versions/','upload','text','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','/download','warnings','roleName','size','execute','getDatasetPermitList','runtime','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','PUBLISHED','name','retryAfter','sql','success','diagramValidated','permit','saveMenuPermits','576168FcOrJW','errorMsg','SQL\x20metadata\x20requires\x20Client\x20AK.','cursor','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','skillCode','tags','Dataset\x20import\x20requires\x20Client\x20AK.','trim','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','all','permitList','application/json','slug','userList','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','145839gSHeqF','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','arrayBuffer','bytes','newConfigFileName','applyUserList','updateRole','packageBase64','sqlCode','getRoleList','join','skillName','Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.','Invalid\x20runtime\x20role\x20members\x20response:\x20','transfer','publishedVersion','approval','values','updateRoleUserList','list','myApps','approve','object','number','getMenuPermitList','importImageReadback','summary','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','80200lIuYDy','authRequired','validation','appCode','invokeSource','update','dataset_','getDatasetPermitMeta','test','functionName','file','/api/v1/skills/','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','resolvedVersion','getModel','1251845YecRSF','Configure\x20accessKey\x20in\x20','description','set','AbortError','getPagePermit','client-ak','errorCode','].applyUserList','artifact','6KlXtSF','Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.','isSafeInteger','string','datasetMeta','headlineVersion','get','data'];a108_0x3b1f=function(){return _0x542ed6;};return a108_0x3b1f();}let _activeAK;export function setActiveAK(_0xcb40ef){if(_activeAK!==(_0xcb40ef||undefined))clearSdkClient();_activeAK=_0xcb40ef||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x143ba1,_0x2b2d97){const _0x2d1fa8=a108_0x434e;if(!_activeAK)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x513817=_0x143ba1?getSdkClient({'appCode':_0x143ba1,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':_0x2d1fa8(0x196),'accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x2b2d97(_0x513817));}async function identitySdkRequest(_0x430bf4){const _0x3f2f4e=a108_0x434e,_0xa0a665=_activeAK;if(!_0xa0a665)throw CliErrors[_0x3f2f4e(0x182)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x3f2f4e(0x169)]+'.');return withSdkErrors(()=>_0x430bf4(getIdentitySdkClient(_0xa0a665,getRuntimeDomain())));}async function withSdkErrors(_0x2d43d2){const _0x40844f=a108_0x434e;try{return await _0x2d43d2();}catch(_0x16e5f2){if(_0x16e5f2 instanceof CliError)throw _0x16e5f2;if(!_0x16e5f2||typeof _0x16e5f2!=='object')throw _0x16e5f2;const _0x48b078=_0x16e5f2,_0x4a6e27=_0x48b078[_0x40844f(0x204)]&&typeof _0x48b078[_0x40844f(0x204)]===_0x40844f(0x17b)?_0x48b078[_0x40844f(0x204)]:{},_0x1d60e0=firstString(_0x4a6e27['errorMsg'],_0x4a6e27[_0x40844f(0x1cb)],_0x4a6e27[_0x40844f(0x1dc)],_0x48b078[_0x40844f(0x1cb)]),_0x88da6d=createRateLimitError({'status':[_0x48b078['status'],_0x4a6e27[_0x40844f(0x139)],_0x4a6e27[_0x40844f(0x12c)]][_0x40844f(0x1b1)](_0x1f947a=>Number(_0x1f947a)===0x1ad)??_0x48b078[_0x40844f(0x139)],'errorCode':firstString(_0x4a6e27[_0x40844f(0x197)],typeof _0x4a6e27['code']===_0x40844f(0x19d)?_0x4a6e27[_0x40844f(0x12c)]:undefined,_0x48b078[_0x40844f(0x12c)]),'message':_0x1d60e0,'retryAfter':_0x48b078[_0x40844f(0x14f)]??readRetryAfterSeconds(_0x48b078[_0x40844f(0x204)])});if(_0x88da6d)throw _0x88da6d;const _0x9ad1f2=createAccessError(_0x48b078[_0x40844f(0x204)],_0x48b078[_0x40844f(0x12c)]);if(_0x9ad1f2)throw _0x9ad1f2;throw CliErrors[_0x40844f(0x200)](_0x1d60e0||_0x40844f(0x1d7),_0x48b078['code']?_0x40844f(0x1c1)+_0x48b078[_0x40844f(0x12c)]:undefined);}}function firstString(..._0x1cc939){const _0x1b2ad6=a108_0x434e;for(const _0x32c796 of _0x1cc939){if(typeof _0x32c796==='string'&&_0x32c796['trim']())return _0x32c796[_0x1b2ad6(0x15d)]();}return undefined;}async function decodeResponseBody(_0x22fe6a){const _0x404324=a108_0x434e;if(typeof _0x22fe6a[_0x404324(0x143)]==='function')try{const _0x1d0d5b=await _0x22fe6a[_0x404324(0x143)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x1d0d5b),'text':_0x1d0d5b};}catch{return{'isJson':![],'text':_0x1d0d5b[_0x404324(0x15d)]()||undefined};}}catch(_0x19b40c){if(_0x19b40c instanceof Error&&_0x19b40c[_0x404324(0x14e)]===_0x404324(0x194))throw _0x19b40c;}try{return{'isJson':!![],'data':await _0x22fe6a['json']()};}catch(_0xbeee31){if(_0xbeee31 instanceof Error&&_0xbeee31[_0x404324(0x14e)]===_0x404324(0x194))throw _0xbeee31;return{'isJson':![]};}}function throwIfRateLimited(_0x2f6064,_0x3984fd,_0xe21f7f){const _0x489209=a108_0x434e,_0x45b8f4=_0x3984fd&&typeof _0x3984fd===_0x489209(0x17b)?_0x3984fd:{},_0x6cc618=[_0x45b8f4[_0x489209(0x139)],_0x45b8f4['code']]['find'](_0x477cdb=>Number(_0x477cdb)===0x1ad),_0x2c25eb=createRateLimitError({'status':_0x2f6064['status']===0x1ad?_0x2f6064['status']:_0x6cc618??_0x2f6064[_0x489209(0x139)],'errorCode':firstString(_0x45b8f4['errorCode'],typeof _0x45b8f4[_0x489209(0x12c)]===_0x489209(0x19d)?_0x45b8f4[_0x489209(0x12c)]:undefined),'message':firstString(_0x45b8f4['errorMsg'],_0x45b8f4[_0x489209(0x1cb)],_0x45b8f4[_0x489209(0x1dc)],_0xe21f7f),'retryAfter':readRetryAfter(_0x2f6064[_0x489209(0x1f7)])??readRetryAfterSeconds(_0x3984fd)});if(_0x2c25eb)throw _0x2c25eb;}async function apiRequest(_0x2b1f6e,_0xa0dbf0={}){const _0x30868c=a108_0x434e,{method:method=_0x30868c(0x1c6),body:_0x1d9e43,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x30868c(0x14b),rejectRedirects:rejectRedirects=![]}=_0xa0dbf0,_0x4af318=_activeAK,_0x20afa1=domain===_0x30868c(0x1b0)?getApiDomain():getRuntimeDomain();if(!_0x4af318)throw CliErrors[_0x30868c(0x182)](_0x30868c(0x191)+PRODUCT_CONFIG[_0x30868c(0x169)]+'.');const _0x1afe7d=''+_0x20afa1+_0x2b1f6e,_0x4a129e={'X-User-AK':_0x4af318},_0x297380=new AbortController(),_0x1e3063=setTimeout(()=>_0x297380[_0x30868c(0x13b)](),timeout);try{const _0x5c1be9=await fetch(_0x1afe7d,{'method':method,...rejectRedirects?{'redirect':'error'}:{},'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x4a129e,...headers},'body':_0x1d9e43?JSON['stringify'](_0x1d9e43):undefined,'signal':_0x297380[_0x30868c(0x1b6)]});return await readApiResponse(_0x5c1be9);}catch(_0x1fdbe2){if(_0x1fdbe2 instanceof Error&&_0x1fdbe2[_0x30868c(0x14e)]==='AbortError')throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x1afe7d);throw _0x1fdbe2;}finally{clearTimeout(_0x1e3063);}}async function readApiResponse(_0x2d8f52){const _0x4399c9=a108_0x434e,_0x3ccbf2=await decodeResponseBody(_0x2d8f52);if(!_0x3ccbf2[_0x4399c9(0x1a9)]){throwIfRateLimited(_0x2d8f52,undefined,_0x3ccbf2[_0x4399c9(0x143)]);throw CliErrors[_0x4399c9(0x200)](_0x4399c9(0x1fb)+_0x2d8f52[_0x4399c9(0x139)]+')',_0x2d8f52[_0x4399c9(0x139)]>=0x190?_0x4399c9(0x1b5):undefined);}const _0x17df6f=_0x3ccbf2[_0x4399c9(0x1a1)];throwIfRateLimited(_0x2d8f52,_0x17df6f);if(!_0x2d8f52['ok']||_0x17df6f[_0x4399c9(0x151)]===![]){const _0x49a37f=createAccessError(_0x17df6f);if(_0x49a37f)throw _0x49a37f;throw CliErrors['apiError'](_0x17df6f[_0x4399c9(0x156)]||_0x17df6f[_0x4399c9(0x1cb)]||_0x17df6f['msg']||'API\x20error:\x20'+_0x2d8f52[_0x4399c9(0x139)],readApiErrorCode(_0x17df6f)?_0x4399c9(0x1c1)+readApiErrorCode(_0x17df6f):undefined);}return _0x17df6f;}async function apiBinaryRequest(_0x1f773b,_0x78c399={}){const _0x15bceb=a108_0x434e,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x78c399,_0xc6c380=_activeAK,_0x22c30d=getRuntimeDomain();if(!_0xc6c380)throw CliErrors[_0x15bceb(0x182)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x15bceb(0x169)]+'.');const _0x3dabc3=''+_0x22c30d+_0x1f773b,_0x1d255b=new AbortController(),_0x42b4ba=setTimeout(()=>_0x1d255b['abort'](),timeout);try{const _0x18dd9a=await fetch(_0x3dabc3,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x15bceb(0x185)],'X-User-AK':_0xc6c380,...headers},'signal':_0x1d255b['signal']});if(!_0x18dd9a['ok']){const _0x54afb9=await decodeResponseBody(_0x18dd9a),_0x32054d=_0x54afb9['data']&&typeof _0x54afb9[_0x15bceb(0x1a1)]==='object'?_0x54afb9[_0x15bceb(0x1a1)]:{},_0xc8cfe1=firstString(_0x32054d['errorMsg'],_0x32054d[_0x15bceb(0x1cb)],_0x32054d['errorCode'],_0x54afb9[_0x15bceb(0x143)]);throwIfRateLimited(_0x18dd9a,_0x54afb9[_0x15bceb(0x1a1)],_0xc8cfe1);const _0x42f66c=createAccessError(_0x54afb9[_0x15bceb(0x1a1)]);if(_0x42f66c)throw _0x42f66c;throw CliErrors[_0x15bceb(0x200)](_0xc8cfe1||'API\x20error:\x20'+_0x18dd9a[_0x15bceb(0x139)],_0x15bceb(0x1ef)+_0x3dabc3);}return Buffer[_0x15bceb(0x12f)](await _0x18dd9a['arrayBuffer']());}catch(_0x4a243c){if(_0x4a243c instanceof Error&&_0x4a243c[_0x15bceb(0x14e)]===_0x15bceb(0x194))throw CliErrors[_0x15bceb(0x200)]('Request\x20timeout:\x20'+_0x3dabc3);throw _0x4a243c;}finally{clearTimeout(_0x42b4ba);}}async function toolboxRequest(_0x260892,_0x12ca77,_0x215236={}){const _0x4cafb4=a108_0x434e,{method:method=_0x4cafb4(0x1c6),headers:headers={},timeout:timeout=0x7530}=_0x215236,_0x5bf60b=_activeAK;if(!_0x5bf60b)throw CliErrors[_0x4cafb4(0x182)](_0x4cafb4(0x191)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x1ad6eb=getApiDomain()[_0x4cafb4(0x1fa)](/\/$/,''),_0x517536=new URL(_0x260892,_0x1ad6eb+_0x4cafb4(0x1e7));if(_0x12ca77)for(const [_0x53dd53,_0x4b4f29]of Object[_0x4cafb4(0x1a4)](_0x12ca77)){_0x4b4f29!==undefined&&_0x4b4f29!==null&&_0x517536[_0x4cafb4(0x12d)]['set'](_0x53dd53,String(_0x4b4f29));}const _0x4d0902=new AbortController(),_0x7971b8=setTimeout(()=>_0x4d0902[_0x4cafb4(0x13b)](),timeout);try{const _0x5c3e58=await fetch(_0x517536,{'method':method,'headers':{'Content-Type':_0x4cafb4(0x161),'X-Invoke-Source':PRODUCT_CONFIG[_0x4cafb4(0x185)],'X-User-AK':_0x5bf60b,...headers},'signal':_0x4d0902[_0x4cafb4(0x1b6)]}),_0x42f042=await decodeResponseBody(_0x5c3e58);if(!_0x42f042[_0x4cafb4(0x1a9)]){throwIfRateLimited(_0x5c3e58,undefined,_0x42f042[_0x4cafb4(0x143)]);throw CliErrors['apiError'](_0x4cafb4(0x1cd)+_0x5c3e58['status']+')',_0x5c3e58[_0x4cafb4(0x139)]>=0x190?_0x4cafb4(0x1b5):undefined);}const _0x18390d=_0x42f042['data'];throwIfRateLimited(_0x5c3e58,_0x18390d);if(!_0x5c3e58['ok']){const _0x15de35=_0x18390d&&typeof _0x18390d===_0x4cafb4(0x17b)?_0x18390d:{};throw CliErrors[_0x4cafb4(0x200)](_0x15de35[_0x4cafb4(0x156)]||_0x15de35[_0x4cafb4(0x1cb)]||'Toolbox\x20API\x20error:\x20'+_0x5c3e58[_0x4cafb4(0x139)],_0x15de35[_0x4cafb4(0x197)]?'Toolbox\x20error\x20code:\x20'+_0x15de35[_0x4cafb4(0x197)]:undefined);}if(_0x18390d&&typeof _0x18390d===_0x4cafb4(0x17b)&&_0x4cafb4(0x151)in _0x18390d&&typeof _0x18390d['success']===_0x4cafb4(0x1c2)){const _0x37a4d0=_0x18390d;if(!_0x37a4d0['success'])throw CliErrors[_0x4cafb4(0x200)](_0x37a4d0['errorMsg']||_0x37a4d0[_0x4cafb4(0x1cb)]||'Toolbox\x20API\x20error',_0x37a4d0['errorCode']?_0x4cafb4(0x1e2)+_0x37a4d0['errorCode']:undefined);return _0x37a4d0[_0x4cafb4(0x1a1)];}return _0x18390d;}catch(_0x4064e7){if(_0x4064e7 instanceof Error&&_0x4064e7[_0x4cafb4(0x14e)]===_0x4cafb4(0x194))throw CliErrors[_0x4cafb4(0x200)]('Request\x20timeout:\x20'+_0x517536[_0x4cafb4(0x1df)]());throw _0x4064e7;}finally{clearTimeout(_0x7971b8);}}async function skillHubJsonRequest(_0x33c9df,_0x2cf54d={}){const _0x506140=a108_0x434e,{method:method=_0x506140(0x1c6),query:_0x5b7bf1,body:_0x4ba2a1,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x2cf54d,_0x42ad0b=_activeAK;if(!_0x42ad0b)throw CliErrors[_0x506140(0x182)](_0x506140(0x191)+PRODUCT_CONFIG[_0x506140(0x169)]+'.');const _0x2adcea=getSkillDomain()['replace'](/\/$/,''),_0x1513cb=new URL(_0x33c9df,_0x2adcea+'/');if(_0x5b7bf1)for(const [_0x2bb34d,_0x498bfd]of Object['entries'](_0x5b7bf1)){_0x498bfd!==undefined&&_0x498bfd!==null&&_0x1513cb[_0x506140(0x12d)][_0x506140(0x193)](_0x2bb34d,String(_0x498bfd));}const _0x3bb06f=new AbortController(),_0x1c01fc=setTimeout(()=>_0x3bb06f[_0x506140(0x13b)](),timeout);try{const _0x391b28=await fetch(_0x1513cb[_0x506140(0x1df)](),{'method':method,'headers':{'Accept':_0x506140(0x161),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x42ad0b,...headers},'body':_0x4ba2a1,'signal':_0x3bb06f[_0x506140(0x1b6)]}),_0x3c2b61=await decodeResponseBody(_0x391b28);if(!_0x3c2b61[_0x506140(0x1a9)]){if(allowNotFound&&_0x391b28[_0x506140(0x139)]===0x194)return undefined;throwIfRateLimited(_0x391b28,undefined,_0x3c2b61[_0x506140(0x143)]);throw CliErrors[_0x506140(0x200)](_0x506140(0x1f5)+_0x391b28[_0x506140(0x139)]+')',_0x391b28[_0x506140(0x139)]>=0x190?_0x506140(0x1b5):undefined);}const _0x4a0f38=_0x3c2b61[_0x506140(0x1a1)];throwIfRateLimited(_0x391b28,_0x4a0f38);if(allowNotFound&&isSkillHubNotFoundResponse(_0x391b28['status'],_0x4a0f38))return undefined;const _0x2d71dd=!_0x391b28['ok']||_0x4a0f38?.[_0x506140(0x151)]===![]||typeof _0x4a0f38?.[_0x506140(0x12c)]==='number'&&_0x4a0f38['code']>=0x190;if(_0x2d71dd)throw CliErrors[_0x506140(0x200)](_0x4a0f38?.[_0x506140(0x156)]||_0x4a0f38?.['message']||_0x4a0f38?.['msg']||_0x506140(0x133)+_0x391b28[_0x506140(0x139)],_0x4a0f38?.[_0x506140(0x197)]?_0x506140(0x1f1)+_0x4a0f38[_0x506140(0x197)]:undefined);return _0x4a0f38?.['data']??_0x4a0f38;}catch(_0x4545da){if(_0x4545da instanceof Error&&_0x4545da['name']===_0x506140(0x194))throw CliErrors[_0x506140(0x200)]('Request\x20timeout:\x20'+_0x1513cb[_0x506140(0x1df)]());throw _0x4545da;}finally{clearTimeout(_0x1c01fc);}}function isSkillHubNotFoundResponse(_0x58f712,_0x1693fb){const _0x24d46c=a108_0x434e;if(_0x58f712===0x194||_0x1693fb?.[_0x24d46c(0x12c)]===0x194)return!![];if(_0x58f712!==0x190&&_0x1693fb?.[_0x24d46c(0x12c)]!==0x190)return![];const _0x143077=[_0x1693fb?.[_0x24d46c(0x1dc)],_0x1693fb?.[_0x24d46c(0x1cb)],_0x1693fb?.[_0x24d46c(0x156)],_0x1693fb?.[_0x24d46c(0x1c4)]][_0x24d46c(0x20d)](_0x19590e=>typeof _0x19590e==='string')[_0x24d46c(0x16f)]('\x20');return/skill not found\b/i[_0x24d46c(0x189)](_0x143077);}async function skillHubBinaryRequest(_0x6ae600,_0x5a2c1e={}){const _0x43120e=a108_0x434e,{query:_0x6d1db,headers:headers={},timeout:timeout=0x7530}=_0x5a2c1e,_0x3c8e43=_activeAK;if(!_0x3c8e43)throw CliErrors[_0x43120e(0x182)](_0x43120e(0x191)+PRODUCT_CONFIG[_0x43120e(0x169)]+'.');const _0x48234d=getSkillDomain()['replace'](/\/$/,''),_0x3844dc=new URL(_0x6ae600,_0x48234d+'/');if(_0x6d1db)for(const [_0x5a270e,_0x1c3521]of Object[_0x43120e(0x1a4)](_0x6d1db)){_0x1c3521!==undefined&&_0x1c3521!==null&&_0x3844dc['searchParams'][_0x43120e(0x193)](_0x5a270e,String(_0x1c3521));}const _0x3f9326=new AbortController(),_0x5e2751=setTimeout(()=>_0x3f9326[_0x43120e(0x13b)](),timeout);try{const _0x4c1360=await fetch(_0x3844dc['toString'](),{'method':'GET','headers':{'Accept':_0x43120e(0x1d4),'X-Invoke-Source':PRODUCT_CONFIG[_0x43120e(0x185)],'X-User-AK':_0x3c8e43,...headers},'signal':_0x3f9326['signal']});if(!_0x4c1360['ok']){const _0x4ce94b=await decodeResponseBody(_0x4c1360),_0x2fe2a0=_0x4ce94b[_0x43120e(0x1a1)]&&typeof _0x4ce94b['data']===_0x43120e(0x17b)?_0x4ce94b[_0x43120e(0x1a1)]:{},_0x3e659d=firstString(_0x2fe2a0[_0x43120e(0x156)],_0x2fe2a0[_0x43120e(0x1cb)],_0x2fe2a0[_0x43120e(0x1dc)],_0x2fe2a0[_0x43120e(0x197)],_0x4ce94b[_0x43120e(0x143)]);throwIfRateLimited(_0x4c1360,_0x4ce94b[_0x43120e(0x1a1)],_0x3e659d);throw CliErrors[_0x43120e(0x200)](_0x3e659d||_0x43120e(0x133)+_0x4c1360[_0x43120e(0x139)],'Download\x20failed:\x20'+_0x3844dc[_0x43120e(0x1df)]());}return Buffer[_0x43120e(0x12f)](await _0x4c1360[_0x43120e(0x167)]());}catch(_0x1a0fbb){if(_0x1a0fbb instanceof Error&&_0x1a0fbb[_0x43120e(0x14e)]===_0x43120e(0x194))throw CliErrors[_0x43120e(0x200)](_0x43120e(0x1bf)+_0x3844dc[_0x43120e(0x1df)]());throw _0x1a0fbb;}finally{clearTimeout(_0x5e2751);}}export async function getBffEndpointContract(_0x253400,_0x507ec2){const _0x250f00=a108_0x434e;if(encodeURIComponent(_0x253400)!==_0x253400||_0x253400==='.'||_0x253400==='..')throw CliErrors['validation']('Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.');if(_0x507ec2==='functions')throw CliErrors[_0x250f00(0x183)](_0x250f00(0x18d)+_0x253400+',\x20name='+_0x507ec2);const _0x4a3477=await sdkRequest(_0x253400,_0x259d3b=>{const _0x2ee36a=_0x250f00;if(!(_0x2ee36a(0x1bd)in _0x259d3b[_0x2ee36a(0x1d2)]))throw CliErrors[_0x2ee36a(0x183)](_0x2ee36a(0x19b));return _0x259d3b[_0x2ee36a(0x1d2)][_0x2ee36a(0x1bd)](_0x507ec2);});if(!_0x4a3477||typeof _0x4a3477!==_0x250f00(0x17b)||Array[_0x250f00(0x1aa)](_0x4a3477)||_0x4a3477[_0x250f00(0x184)]!==_0x253400||_0x4a3477[_0x250f00(0x18a)]!==_0x507ec2)throw CliErrors['validation']('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x253400+',\x20name='+_0x507ec2);const _0x59597a=_0x4a3477[_0x250f00(0x131)];if(_0x59597a!=null&&(typeof _0x59597a!==_0x250f00(0x17c)||!Number[_0x250f00(0x19c)](_0x59597a)))throw CliErrors[_0x250f00(0x200)](_0x250f00(0x171));return{'appCode':_0x4a3477[_0x250f00(0x184)],'functionName':_0x4a3477[_0x250f00(0x18a)],'description':_0x4a3477[_0x250f00(0x192)],'version':_0x4a3477[_0x250f00(0x1e4)],'gmtModified':_0x59597a};}export async function getSqlQueryInfo(_0x40b384,_0x14bcd7){const _0x261f17=a108_0x434e,_0x188028=await sdkRequest(_0x40b384,_0x3db0b7=>{const _0x2a89c3=a108_0x434e;if(!('query'in _0x3db0b7[_0x2a89c3(0x150)]))throw CliErrors[_0x2a89c3(0x183)](_0x2a89c3(0x157));return _0x3db0b7[_0x2a89c3(0x150)][_0x2a89c3(0x1f6)]({'appCode':_0x40b384,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x14bcd7});}),_0x1e9d7b=_0x188028&&typeof _0x188028==='object'&&_0x261f17(0x140)in _0x188028?_0x188028[_0x261f17(0x140)]?.[0x0]:_0x188028&&typeof _0x188028===_0x261f17(0x17b)&&_0x261f17(0x16d)in _0x188028?_0x188028:undefined;if(!_0x1e9d7b)throw CliErrors[_0x261f17(0x183)](_0x261f17(0x1db)+_0x14bcd7);return _0x1e9d7b;}export async function listApprovalTodo(_0x95a42e,_0x1fba04=0x1,_0x5b0ea7=0x14){const _0x3c90af=a108_0x434e,_0x21b1ad=await sdkRequest(_0x95a42e,_0x1d3c97=>_0x1d3c97['approval'][_0x3c90af(0x1ed)]({'currentPage':_0x1fba04,'pageSize':_0x5b0ea7}));if(!_0x21b1ad||typeof _0x21b1ad!=='object'||!Array[_0x3c90af(0x1aa)](_0x21b1ad['records']))throw CliErrors['apiError'](_0x3c90af(0x180));return _0x21b1ad;}export async function getApprovalTaskDetail(_0x5d346d,_0x3d7ae6){const _0x278ae1=a108_0x434e,_0xdf12d7=await sdkRequest(_0x3d7ae6,_0x199063=>_0x199063[_0x278ae1(0x175)]['getTask'](_0x5d346d));if(!_0xdf12d7||typeof _0xdf12d7!==_0x278ae1(0x17b)||Array[_0x278ae1(0x1aa)](_0xdf12d7))throw CliErrors[_0x278ae1(0x200)]('Invalid\x20approval\x20task\x20detail\x20response.');return _0xdf12d7;}export async function approveApprovalTask(_0x37e4b5){const _0x54c04a=a108_0x434e;return await sdkRequest(_0x37e4b5[_0x54c04a(0x184)],_0x59eb15=>_0x59eb15['approval'][_0x54c04a(0x17a)](_0x37e4b5)),null;}export async function transferApprovalTask(_0x59992f){const _0x4be6c3=a108_0x434e;return await sdkRequest(_0x59992f[_0x4be6c3(0x184)],_0x2ed659=>_0x2ed659[_0x4be6c3(0x175)][_0x4be6c3(0x173)](_0x59992f)),null;}function isRemoteAppItem(_0x7d4824){const _0x56b01d=a108_0x434e;return!!_0x7d4824&&typeof _0x7d4824==='object'&&typeof _0x7d4824[_0x56b01d(0x184)]==='string'&&typeof _0x7d4824['appName']===_0x56b01d(0x19d);}function extractRemoteAppItems(_0x40bb9c){const _0x27dbaa=a108_0x434e;if(Array[_0x27dbaa(0x1aa)](_0x40bb9c))return _0x40bb9c['filter'](isRemoteAppItem);if(!_0x40bb9c||typeof _0x40bb9c!=='object')throw CliErrors['apiError'](_0x27dbaa(0x159));const _0x3ad413=_0x40bb9c;if(Array[_0x27dbaa(0x1aa)](_0x3ad413[_0x27dbaa(0x140)]))return _0x3ad413[_0x27dbaa(0x140)][_0x27dbaa(0x20d)](isRemoteAppItem);if(_0x3ad413[_0x27dbaa(0x1a1)]&&typeof _0x3ad413[_0x27dbaa(0x1a1)]===_0x27dbaa(0x17b)){const _0x1e14e2=_0x3ad413[_0x27dbaa(0x1a1)];if(Array[_0x27dbaa(0x1aa)](_0x1e14e2[_0x27dbaa(0x140)]))return _0x1e14e2[_0x27dbaa(0x140)]['filter'](isRemoteAppItem);}throw CliErrors[_0x27dbaa(0x200)](_0x27dbaa(0x1bb));}export async function getMyApps(){const _0x276293=a108_0x434e;return extractRemoteAppItems(await identitySdkRequest(_0x112302=>_0x112302[_0x276293(0x179)]()));}export async function getLoginUserInfo(){const _0x22dac1=a108_0x434e,_0x163585=await identitySdkRequest(_0x49eb20=>_0x49eb20[_0x22dac1(0x208)]());if(!_0x163585||typeof _0x163585!==_0x22dac1(0x17b)||Array[_0x22dac1(0x1aa)](_0x163585))throw CliErrors['apiError'](_0x22dac1(0x15e));return _0x163585;}export const USER_ACCOUNT_BIND_PATH=a108_0x35798a(0x1c3);export async function bindExternalUserAccount(_0x5efccb,_0x47bb37){return identitySdkRequest(_0x3333a1=>_0x3333a1['bindAccount']({'provider':_0x5efccb,'accountId':_0x47bb37}));}function runtimeSchedulePath(_0x5ee7ed,_0x4a126a=''){const _0x2eb104=a108_0x35798a;return _0x2eb104(0x136)+encodeURIComponent(_0x5ee7ed)+_0x2eb104(0x137)+_0x4a126a;}export async function validateRuntimeSchedule(_0x36e43e,_0x11f7c3){const _0x658584=a108_0x35798a,_0x3c7a6b=await apiRequest(runtimeSchedulePath(_0x36e43e,_0x658584(0x1ce)),{'method':'POST','body':_0x11f7c3});return _0x3c7a6b[_0x658584(0x1a1)];}export async function createRuntimeSchedule(_0x3c93d6,_0xaa5b86){const _0x3cf81b=a108_0x35798a,_0xa4aa37=await apiRequest(runtimeSchedulePath(_0x3c93d6),{'method':_0x3cf81b(0x1e5),'body':_0xaa5b86});return _0xa4aa37[_0x3cf81b(0x1a1)];}export async function listRuntimeSchedules(_0x1160ee,_0x3bcef1){const _0x10e9a4=a108_0x35798a,_0x20ecf3=new URLSearchParams();_0x20ecf3[_0x10e9a4(0x193)](_0x10e9a4(0x1d1),_0x3bcef1['kind']);if(_0x3bcef1[_0x10e9a4(0x1ad)]!==undefined)_0x20ecf3['set'](_0x10e9a4(0x1ad),String(_0x3bcef1['limit']));if(_0x3bcef1[_0x10e9a4(0x158)])_0x20ecf3[_0x10e9a4(0x193)]('cursor',_0x3bcef1[_0x10e9a4(0x158)]);const _0x1add8e=_0x20ecf3[_0x10e9a4(0x148)]>0x0?'?'+_0x20ecf3['toString']():'',_0x30707a=await apiRequest(''+runtimeSchedulePath(_0x1160ee)+_0x1add8e);return _0x30707a[_0x10e9a4(0x1a1)];}export async function getRuntimeSchedule(_0x2f33e8,_0x80d77e){const _0x36031a=a108_0x35798a,_0x5ca4c3=await apiRequest(runtimeSchedulePath(_0x2f33e8,'/'+encodeURIComponent(_0x80d77e)));return _0x5ca4c3[_0x36031a(0x1a1)];}export async function deleteRuntimeSchedule(_0x4bc8cf,_0x4fac64){const _0x412a85=a108_0x35798a,_0x5e7476=await apiRequest(runtimeSchedulePath(_0x4bc8cf,'/'+encodeURIComponent(_0x4fac64)),{'method':_0x412a85(0x20c)});return _0x5e7476[_0x412a85(0x1a1)];}export async function runRuntimeSchedule(_0x3738e5,_0x3ecaf9){const _0x3479c1=a108_0x35798a,_0x1011fe=await apiRequest(runtimeSchedulePath(_0x3738e5,'/'+encodeURIComponent(_0x3ecaf9)+_0x3479c1(0x1b4)),{'method':_0x3479c1(0x1e5)});return _0x1011fe[_0x3479c1(0x1a1)];}export async function listDatasets(_0x49a3e1,_0x4944a7){const _0x49b418=a108_0x35798a,_0x5ed9e9=await sdkRequest(_0x49a3e1,_0x5e6f30=>_0x5e6f30[_0x49b418(0x19e)]['list']({..._0x4944a7?.[_0x49b418(0x12c)]&&{'code':_0x4944a7[_0x49b418(0x12c)]},..._0x4944a7?.[_0x49b418(0x14e)]&&{'name':_0x4944a7['name']},..._0x4944a7?.[_0x49b418(0x1de)]&&{'tableName':_0x4944a7['tableName']}}));return extractList(_0x5ed9e9);}export async function getDatasetDetail(_0x2cfed3){const _0x40338=a108_0x35798a;return sdkRequest(undefined,_0xc6264c=>_0xc6264c[_0x40338(0x19e)][_0x40338(0x134)]({'code':_0x2cfed3}));}function importSdkRequest(_0x4758cc,_0x5037f5,_0x356520){return sdkRequest(_0x4758cc,_0x3948fd=>{const _0x385db9=a108_0x434e,_0x233c4a=_0x3948fd[_0x385db9(0x18f)](_0x385db9(0x187)+_0x5037f5);if(!(_0x233c4a instanceof ClientAkModel))throw CliErrors['validation'](_0x385db9(0x15c));return _0x356520(_0x233c4a);});}export async function getDatasetImportContract(_0x4aaf79,_0x1660d5){return importSdkRequest(_0x4aaf79,_0x1660d5,_0x1ba83e=>_0x1ba83e['importContract']());}export async function createDatasetImportBatch(_0x3b6ceb,_0x271e3c,_0x2e600a){const _0x22ab18=a108_0x35798a;return importSdkRequest(_0x3b6ceb,_0x271e3c,_0x3f1f48=>_0x3f1f48[_0x22ab18(0x1c8)](_0x2e600a));}export async function readDatasetImportRows(_0x4017c1,_0x498b04,_0x3d2f92){const _0x56247d=a108_0x35798a,_0x30fc87=await importSdkRequest(_0x4017c1,_0x498b04,_0x4d623f=>_0x4d623f[_0x56247d(0x1f8)]({'ids':_0x3d2f92}));if(!_0x30fc87||!Array[_0x56247d(0x1aa)](_0x30fc87[_0x56247d(0x1b9)]))throw CliErrors[_0x56247d(0x200)](_0x56247d(0x1ee));return _0x30fc87[_0x56247d(0x1b9)];}export async function readDatasetImportTaskRows(_0x431ded,_0x3a2a82,_0xe23f19){const _0x1f887d=a108_0x35798a,_0xbaeb44=await importSdkRequest(_0x431ded,_0x3a2a82,_0x1b3c53=>_0x1b3c53[_0x1f887d(0x1f8)]({'taskId':_0xe23f19}));if(!_0xbaeb44||!Array[_0x1f887d(0x1aa)](_0xbaeb44[_0x1f887d(0x1b9)]))throw CliErrors[_0x1f887d(0x200)]('Invalid\x20import\x20task\x20readback\x20response.');return _0xbaeb44[_0x1f887d(0x1b9)];}export async function uploadDatasetImportImage(_0x1eb0dd,_0x575909,_0x166e61,_0x255abe){const _0x35369d=a108_0x35798a;return importSdkRequest(_0x1eb0dd,_0x575909,_0x1b8ae5=>_0x1b8ae5[_0x35369d(0x138)]({'importId':_0x166e61,'contentHash':_0x255abe['contentHash'],'file':new Blob([new Uint8Array(_0x255abe[_0x35369d(0x168)])],{'type':_0x255abe[_0x35369d(0x1fd)]}),'fileName':_0x35369d(0x130)}));}export async function readDatasetImportImage(_0x170005,_0x1fc6c7,_0x33abd8,_0x177ce2){const _0x3543a3=a108_0x35798a;return importSdkRequest(_0x170005,_0x1fc6c7,_0x418637=>_0x418637[_0x3543a3(0x17e)]({'importId':_0x33abd8,'contentHash':_0x177ce2[_0x3543a3(0x1a6)],'type':_0x177ce2[_0x3543a3(0x1fd)],'size':_0x177ce2[_0x3543a3(0x148)]}));}export async function getDatasetSdkUsageDoc(_0x4340da,_0x32154a){const _0x191698=a108_0x35798a,_0xee9a9e=await toolboxRequest(_0x191698(0x202),{'datasetCode':_0x4340da,'appCode':_0x32154a});return typeof _0xee9a9e?.['markdown']===_0x191698(0x19d)?_0xee9a9e[_0x191698(0x203)]:'';}export async function uploadRuntimeFile(_0x2065be,_0x4606b6){const _0x35404e=a108_0x35798a,_0x5cdc61=await readFile(_0x4606b6);return sdkRequest(_0x2065be,_0x544835=>_0x544835[_0x35404e(0x1ac)]['file'][_0x35404e(0x142)]({'file':new Blob([new Uint8Array(_0x5cdc61)]),'fileName':basename(_0x4606b6)}));}export async function queryRuntimeFileUrl(_0x18b6be,_0x3fe1ef={}){const _0x16a819=a108_0x35798a;return sdkRequest(undefined,_0x5cae73=>_0x5cae73[_0x16a819(0x1ac)][_0x16a819(0x18b)][_0x16a819(0x20a)]({'filePath':_0x18b6be,..._0x3fe1ef}));}function a108_0x434e(_0x4eeb50,_0x3d6bed){_0x4eeb50=_0x4eeb50-0x12c;const _0x3b1f6f=a108_0x3b1f();let _0x434e66=_0x3b1f6f[_0x4eeb50];return _0x434e66;}export async function recognizeRuntimeOcr(_0xcf58b8,_0x3d393d){const _0x395954=a108_0x35798a;return sdkRequest(_0xcf58b8,_0x1d3b3c=>_0x1d3b3c[_0x395954(0x1ac)][_0x395954(0x1af)]['recognize'](_0x3d393d));}export async function getRuntimeAppConfigByKey(_0x4b886a,_0x5b6c16){const _0x2fd7e4=a108_0x35798a,_0x485690=await sdkRequest(_0x4b886a,_0xf5d264=>_0xf5d264[_0x2fd7e4(0x1da)]['getConfigByKey'](_0x5b6c16));if(typeof _0x485690!==_0x2fd7e4(0x19d))throw CliErrors[_0x2fd7e4(0x183)](_0x2fd7e4(0x1f9)+_0x5b6c16);return _0x485690;}export async function listNotificationChannelConfigs(_0x75b094,_0x45f8b8){const _0x1cd978=a108_0x35798a,_0x109edc=await sdkRequest(_0x75b094,_0x6535ec=>_0x6535ec['app'][_0x1cd978(0x132)](_0x45f8b8));if(!Array['isArray'](_0x109edc))throw CliErrors[_0x1cd978(0x200)](_0x1cd978(0x1e3),_0x1cd978(0x14c));return _0x109edc;}export async function listRuntimeArtifacts(_0x38acdb,_0x352d5f){const _0x59b5fe=a108_0x35798a,_0x169da4=await sdkRequest(_0x38acdb,_0x4f50db=>_0x4f50db[_0x59b5fe(0x199)][_0x59b5fe(0x178)](_0x352d5f));return Array[_0x59b5fe(0x1aa)](_0x169da4)?_0x169da4:[];}export async function getRuntimeArtifact(_0x1da4f5,_0x5dd134){const _0x5c046b=a108_0x35798a,_0x59274e=await sdkRequest(_0x5dd134,_0x4c4544=>_0x4c4544['artifact'][_0x5c046b(0x1a0)](_0x1da4f5));if(!_0x59274e)throw CliErrors[_0x5c046b(0x183)]('Artifact\x20not\x20found:\x20id='+_0x1da4f5);return _0x59274e;}export async function createRuntimeArtifact(_0x3ad1fc,_0x25512d){const _0x2aef3c=a108_0x35798a;return sdkRequest(_0x3ad1fc,_0x43db63=>_0x43db63[_0x2aef3c(0x199)][_0x2aef3c(0x1e8)](_0x25512d));}export async function updateRuntimeArtifact(_0x30cb91,_0x5f3352,_0x2f16b3){const _0xeccae8=a108_0x35798a;return sdkRequest(_0x5f3352,_0x325331=>_0x325331['artifact'][_0xeccae8(0x186)](_0x30cb91,_0x2f16b3));}export async function listPersonalBffs(_0x3b6747){const _0x2fbde5=a108_0x35798a,_0x1e7312=await sdkRequest(_0x3b6747,_0x5699af=>_0x5699af[_0x2fbde5(0x1a2)][_0x2fbde5(0x1d2)][_0x2fbde5(0x178)]());return Array[_0x2fbde5(0x1aa)](_0x1e7312)?_0x1e7312:[];}export async function getPersonalBff(_0x243617,_0x2f875b){const _0x57e603=a108_0x35798a,_0x34be32=await sdkRequest(_0x2f875b,_0x36f194=>_0x36f194[_0x57e603(0x1a2)][_0x57e603(0x1d2)][_0x57e603(0x1a0)](_0x243617));if(!_0x34be32)throw CliErrors[_0x57e603(0x183)]('Personal\x20Backend\x20Function\x20not\x20found:\x20id='+_0x243617);return _0x34be32;}export async function createPersonalBff(_0x21fdfa,_0x33cd9a){const _0x577c72=a108_0x35798a;return sdkRequest(_0x21fdfa,_0x3c1d6c=>_0x3c1d6c[_0x577c72(0x1a2)][_0x577c72(0x1d2)][_0x577c72(0x1e8)](_0x33cd9a));}export async function updatePersonalBff(_0x303871,_0x5e4feb,_0x510bfd){const _0x4acf10=a108_0x35798a;return sdkRequest(_0x5e4feb,_0x57219c=>_0x57219c[_0x4acf10(0x1a2)][_0x4acf10(0x1d2)][_0x4acf10(0x186)](_0x303871,_0x510bfd));}export async function executePersonalBff(_0x55ad0b,_0x135d9c,_0x36fa50){const _0x2c4ab1=a108_0x35798a;return sdkRequest(_0x135d9c,_0x1de000=>_0x1de000[_0x2c4ab1(0x1a2)]['bff'][_0x2c4ab1(0x149)]({'scriptId':_0x55ad0b,'params':_0x36fa50}));}export async function listPersonalKnowledgeBaseItems(_0x40c5c1,_0x3bf2f6){return listPersonalKnowledge({'appCode':_0x40c5c1,'accessKey':_activeAK,'signal':_0x3bf2f6});}export async function getPersonalKnowledgeBaseItem(_0x52233a,_0x28704a,_0x461f65){return getPersonalKnowledge({'appCode':_0x28704a,'accessKey':_activeAK,'signal':_0x461f65},_0x52233a);}export async function createPersonalKnowledgeBaseItem(_0x27718b,_0x4ed35a,_0x42a4a8){return savePersonalKnowledge({'appCode':_0x27718b,'accessKey':_activeAK,'signal':_0x42a4a8},_0x4ed35a);}export async function updatePersonalKnowledgeBaseItem(_0x3fae54,_0x195ada,_0x17789f,_0x15c401){return savePersonalKnowledge({'appCode':_0x195ada,'accessKey':_activeAK,'signal':_0x15c401},_0x17789f,_0x3fae54);}export async function getRuntimeSkillByCode(_0x321475,_0xd02c85){const _0xc06cfe=a108_0x35798a,_0xcfa88c=await skillHubJsonRequest(_0xc06cfe(0x18c)+encodeURIComponent(_0x321475)+'/'+encodeURIComponent(_0xd02c85),{'allowNotFound':!![]});return _0xcfa88c?skillHubRuntimeDetailToRuntimeSkill(_0xcfa88c):undefined;}export async function listRuntimeSkills(_0x56801){const _0x62e40=a108_0x35798a,_0x567c4d=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x56801[_0x62e40(0x184)])+_0x62e40(0x13e),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x56801[_0x62e40(0x184)],_0x567c4d,_0x56801['scope']??'all',_0x56801['code'],_0x56801[_0x62e40(0x1ab)]);}export async function listPersonalRuntimeSkills(_0x5ecd37){const _0x4e7b04=a108_0x35798a;return(await listRuntimeSkills({'appCode':_0x5ecd37,'scope':_0x4e7b04(0x1a2)}))[_0x4e7b04(0x1a2)];}export async function listCompanyRuntimeSkills(_0x55bbc5){const _0x15649e=a108_0x35798a;return(await listRuntimeSkills({'appCode':_0x55bbc5,'scope':_0x15649e(0x207)}))[_0x15649e(0x207)];}export async function listVisibleRuntimeSkills(_0x7f2079){const _0x8f95aa=a108_0x35798a;return(await listRuntimeSkills({'appCode':_0x7f2079,'scope':_0x8f95aa(0x15f)}))[_0x8f95aa(0x1d3)];}export async function createPersonalRuntimeSkill(_0x2603cd,_0x39cf0c,_0x2e8a02={}){const _0x5a4002=a108_0x35798a;return publishRuntimeSkill(_0x2603cd,_0x39cf0c,{'visibility':_0x5a4002(0x13a),'confirmWarnings':_0x2e8a02[_0x5a4002(0x13c)]});}export async function updatePersonalRuntimeSkill(_0x10607b,_0x21aa57,_0xb945e9,_0x2cee4d={}){const _0x3b134d=a108_0x35798a;return publishRuntimeSkill(_0x21aa57,{..._0xb945e9,'skillCode':_0xb945e9['skillCode']??_0x10607b},{'visibility':_0x3b134d(0x13a),'confirmWarnings':_0x2cee4d[_0x3b134d(0x13c)]});}export async function publishCompanyRuntimeSkill(_0x57b38a,_0x5c2a25,_0x2a9e12={}){const _0x299dd2=a108_0x35798a;return publishRuntimeSkill(_0x57b38a,_0x5c2a25,{'visibility':_0x299dd2(0x1f4),'confirmWarnings':_0x2a9e12[_0x299dd2(0x13c)]});}export async function validateRuntimeSkillPublish(_0xf49626,_0x327705,_0x21bf8d){const _0x105fd3=a108_0x35798a,_0x4bc4eb=buildRuntimeSkillPublishForm(_0x327705,_0x21bf8d[_0x105fd3(0x20e)]),_0x238502=await skillHubJsonRequest(_0x105fd3(0x1d5)+encodeURIComponent(_0xf49626)+'/publish/validate',{'method':'POST','body':_0x4bc4eb});return assertJointDiagramAcknowledged(_0x327705[_0x105fd3(0x1b7)],_0x238502[_0x105fd3(0x152)],_0x105fd3(0x183)),{'valid':_0x238502['valid']===!![],'errors':Array['isArray'](_0x238502[_0x105fd3(0x1b8)])?_0x238502['errors']:[],'warnings':Array[_0x105fd3(0x1aa)](_0x238502[_0x105fd3(0x146)])?_0x238502[_0x105fd3(0x146)]:[],'resolvedSlug':_0x238502[_0x105fd3(0x1c0)],'resolvedVersion':_0x238502[_0x105fd3(0x18e)],'diagramValidated':_0x238502[_0x105fd3(0x152)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x187d30,_0x58d4da,_0x14b691,_0x5120c6,_0x5689c3){const _0x2910c3=a108_0x35798a;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x187d30,_0x58d4da,_0x14b691,'/validate'),{'method':_0x2910c3(0x1e5),'query':{'scope':_0x5120c6},'headers':{'Content-Type':_0x2910c3(0x161)},'body':JSON['stringify'](_0x5689c3)});}export async function putRuntimeSkillVersionDiagram(_0x82fb23,_0x23e6cd,_0x553113,_0x125160,_0x1e0258){const _0x176e0d=a108_0x35798a;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x82fb23,_0x23e6cd,_0x553113),{'method':'PUT','query':{'scope':_0x125160},'headers':{'Content-Type':_0x176e0d(0x161)},'body':JSON[_0x176e0d(0x1c5)](_0x1e0258)});}export async function getRuntimeSkillVersionDiagram(_0x432cb3,_0x2dbc71,_0x1ae9e7,_0x6ba519){const _0x44bcae=a108_0x35798a,_0x20d061=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x432cb3,_0x2dbc71,_0x1ae9e7),{'query':{'scope':_0x6ba519}});if(typeof _0x20d061[_0x44bcae(0x1dd)]!==_0x44bcae(0x1c2))throw CliErrors['apiError'](_0x44bcae(0x144));const _0x1af3a4=_0x20d061[_0x44bcae(0x1d0)];if(typeof _0x1af3a4!==_0x44bcae(0x19d)||!/^sha256:[0-9a-f]{64}$/[_0x44bcae(0x189)](_0x1af3a4))throw CliErrors[_0x44bcae(0x200)](_0x44bcae(0x209),_0x44bcae(0x1be));const _0x1ab6d2=_0x20d061['diagramRevision'];if(_0x20d061[_0x44bcae(0x1dd)]&&(!Number[_0x44bcae(0x1ba)](_0x1ab6d2)||Number(_0x1ab6d2)<0x1))throw CliErrors[_0x44bcae(0x200)](_0x44bcae(0x1eb));if(!_0x20d061[_0x44bcae(0x1dd)]&&_0x1ab6d2!==undefined&&_0x1ab6d2!==null)throw CliErrors[_0x44bcae(0x200)](_0x44bcae(0x166));const _0x50e6ea=_0x20d061[_0x44bcae(0x1dd)]?Number(_0x1ab6d2):null;return{..._0x20d061,'sourceFingerprint':_0x1af3a4,'diagramRevision':_0x50e6ea,'expectedDiagramRevision':_0x50e6ea??0x0};}export async function downloadRuntimeSkillPackage(_0x3b522c,_0x41777c,_0x2db262,_0x4e1bf0){const _0x98470d=a108_0x35798a;void _0x3b522c;const _0x3e45dd=_0x4e1bf0?'/api/cli/v1/skills/'+encodeURIComponent(_0x2db262)+'/'+encodeURIComponent(_0x41777c)+_0x98470d(0x141)+encodeURIComponent(_0x4e1bf0)+_0x98470d(0x145):'/api/cli/v1/skills/'+encodeURIComponent(_0x2db262)+'/'+encodeURIComponent(_0x41777c)+_0x98470d(0x145);return skillHubBinaryRequest(_0x3e45dd);}async function publishRuntimeSkill(_0x1bfa13,_0x51550f,_0x5eae8c){const _0x205eae=a108_0x35798a,_0x55cb4c=buildRuntimeSkillPublishForm(_0x51550f,_0x5eae8c[_0x205eae(0x20e)]),_0x137041=await skillHubJsonRequest(_0x205eae(0x1d5)+encodeURIComponent(_0x1bfa13)+_0x205eae(0x205),{'method':_0x205eae(0x1e5),'query':{'confirmWarnings':_0x5eae8c[_0x205eae(0x13c)]===!![]?!![]:undefined},'body':_0x55cb4c});return assertJointDiagramAcknowledged(_0x51550f[_0x205eae(0x1b7)],_0x137041[_0x205eae(0x1b3)],'publish'),{'appCode':_0x137041[_0x205eae(0x13f)]??_0x1bfa13,'skillCode':_0x137041['slug']??_0x51550f['skillCode']??'','skillName':_0x51550f[_0x205eae(0x170)]??_0x137041[_0x205eae(0x162)]??_0x51550f[_0x205eae(0x15a)],'description':_0x51550f['description'],'scope':skillHubVisibilityToScope(_0x137041[_0x205eae(0x20e)]??_0x5eae8c[_0x205eae(0x20e)])??_0x205eae(0x1a2),'version':_0x137041[_0x205eae(0x1e4)]??_0x51550f[_0x205eae(0x1e4)],'tags':_0x51550f[_0x205eae(0x15b)],'content':_0x51550f[_0x205eae(0x1b2)],'diagramBound':_0x137041[_0x205eae(0x1b3)]===!![]};}function assertJointDiagramAcknowledged(_0x3c492d,_0x46770e,_0x1159f2){const _0x1a8523=a108_0x35798a;if(!_0x3c492d||_0x46770e===!![])return;throw CliErrors[_0x1a8523(0x200)](_0x1a8523(0x201)+_0x1159f2+'.',_0x1a8523(0x164));}function buildRuntimeSkillPublishForm(_0x4a7b79,_0x2cf7f2){const _0x43ca14=a108_0x35798a,_0x2b7e90=new FormData();return _0x2b7e90[_0x43ca14(0x193)](_0x43ca14(0x18b),runtimeSkillPackageFile(_0x4a7b79)),_0x4a7b79[_0x43ca14(0x170)]?.[_0x43ca14(0x15d)]()&&_0x2b7e90[_0x43ca14(0x193)](_0x43ca14(0x1ea),_0x4a7b79['skillName'][_0x43ca14(0x15d)]()),_0x2b7e90[_0x43ca14(0x193)](_0x43ca14(0x20e),_0x2cf7f2),_0x4a7b79[_0x43ca14(0x1b7)]&&_0x2b7e90[_0x43ca14(0x193)](_0x43ca14(0x1b7),new Blob([JSON[_0x43ca14(0x1c5)](_0x4a7b79[_0x43ca14(0x1b7)])],{'type':_0x43ca14(0x161)})),_0x2b7e90;}function runtimeSkillVersionDiagramPath(_0x314ce7,_0x32fe49,_0x230bcc,_0x380e73=''){const _0x1eadcf=a108_0x35798a;return _0x1eadcf(0x1d5)+encodeURIComponent(_0x314ce7)+'/'+encodeURIComponent(_0x32fe49)+_0x1eadcf(0x141)+encodeURIComponent(_0x230bcc)+_0x1eadcf(0x1cc)+_0x380e73;}function runtimeSkillPackageFile(_0x3cdc2a){const _0x36cd81=a108_0x35798a;if(!_0x3cdc2a[_0x36cd81(0x16c)])throw CliErrors[_0x36cd81(0x183)](_0x36cd81(0x1fc));const _0x4fb0f0=Buffer[_0x36cd81(0x12f)](_0x3cdc2a[_0x36cd81(0x16c)],_0x36cd81(0x1f0)),_0x3a9bf1=new Blob([_0x4fb0f0],{'type':_0x36cd81(0x1fe)}),_0x456d0d=(_0x3cdc2a[_0x36cd81(0x15a)]||_0x36cd81(0x1a5))+_0x36cd81(0x1a8);if(typeof File!==_0x36cd81(0x1d9))return new File([_0x3a9bf1],_0x456d0d,{'type':_0x36cd81(0x1fe)});return _0x3a9bf1;}function normalizeSkillHubRuntimeListResponse(_0x55b9a0,_0x38ab83,_0x104f02,_0xded993,_0x2e169b=![]){const _0x366b0d=a108_0x35798a,_0x4d2d8d=Array[_0x366b0d(0x1aa)](_0x38ab83)?_0x38ab83:Array['isArray'](_0x38ab83?.[_0x366b0d(0x1b9)])?_0x38ab83['items']:[],_0x44bd2b=_0xded993?.[_0x366b0d(0x15d)](),_0x16ac1f=_0x4d2d8d[_0x366b0d(0x20d)](_0x2c38bd=>!_0x44bd2b||_0x2c38bd[_0x366b0d(0x162)]===_0x44bd2b)[_0x366b0d(0x20d)](_0x578c12=>!_0x2e169b||_0x578c12[_0x366b0d(0x174)]?.[_0x366b0d(0x139)]===_0x366b0d(0x14d)&&Boolean(_0x578c12['publishedVersion']['version']?.['trim']()))[_0x366b0d(0x1d6)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x323e8c=>Boolean(_0x323e8c)),_0xb32e20=_0x16ac1f[_0x366b0d(0x20d)](_0x2e80a9=>_0x2e80a9[_0x366b0d(0x1cf)]===_0x366b0d(0x1a2)),_0x368ddc=_0x16ac1f[_0x366b0d(0x20d)](_0x554413=>_0x554413[_0x366b0d(0x1cf)]===_0x366b0d(0x207));return{'appCode':_0x55b9a0,'personal':_0x104f02===_0x366b0d(0x207)?[]:_0xb32e20,'company':_0x104f02===_0x366b0d(0x1a2)?[]:_0x368ddc,'effective':buildEffectiveRuntimeSkills(_0xb32e20,_0x368ddc,_0x104f02)};}function skillHubRuntimeItemToRuntimeSkill(_0x41547a){const _0x469f61=a108_0x35798a,_0x17f70d=_0x41547a['slug']?.[_0x469f61(0x15d)](),_0x46d994=skillHubVisibilityToScope(_0x41547a[_0x469f61(0x20e)]);if(!_0x17f70d||!_0x46d994)return undefined;return{'id':_0x41547a['id'],'appCode':_0x41547a[_0x469f61(0x13f)],'skillCode':_0x17f70d,'skillName':_0x41547a[_0x469f61(0x1ea)]??_0x17f70d,'description':_0x41547a[_0x469f61(0x17f)],'example':_0x41547a['example'],'scope':_0x46d994,'version':skillHubRuntimeItemVersion(_0x41547a),'status':_0x41547a[_0x469f61(0x139)]};}function skillHubRuntimeDetailToRuntimeSkill(_0xd0ce1c){const _0x4b9fee=a108_0x35798a,_0x259a68=_0xd0ce1c[_0x4b9fee(0x162)]?.['trim']();if(!_0x259a68)return undefined;return{'id':_0xd0ce1c['id'],'appCode':_0xd0ce1c[_0x4b9fee(0x13f)],'skillCode':_0x259a68,'skillName':_0xd0ce1c[_0x4b9fee(0x1ea)]??_0x259a68,'description':_0xd0ce1c[_0x4b9fee(0x17f)],'example':_0xd0ce1c['example'],'scope':skillHubVisibilityToScope(_0xd0ce1c[_0x4b9fee(0x20e)])??_0xd0ce1c[_0x4b9fee(0x20e)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0xd0ce1c),'status':_0xd0ce1c['status']};}function skillHubVisibilityToScope(_0x35ff7a){const _0x4d0b0e=a108_0x35798a;if(_0x35ff7a===_0x4d0b0e(0x13a))return _0x4d0b0e(0x1a2);if(_0x35ff7a===_0x4d0b0e(0x1f4))return _0x4d0b0e(0x207);return undefined;}function skillHubRuntimeItemVersion(_0x32d3b1){const _0x512984=a108_0x35798a;return _0x32d3b1[_0x512984(0x174)]?.[_0x512984(0x1e4)]??_0x32d3b1[_0x512984(0x19f)]?.[_0x512984(0x1e4)]??_0x32d3b1['ownerPreviewVersion']?.[_0x512984(0x1e4)];}function buildEffectiveRuntimeSkills(_0xc10f52,_0x4965a4,_0x29621c){const _0x4c7a72=a108_0x35798a;if(_0x29621c===_0x4c7a72(0x1a2))return _0xc10f52;if(_0x29621c===_0x4c7a72(0x207))return _0x4965a4;const _0xbf0975=new Map();for(const _0x4d5e1d of _0x4965a4){_0xbf0975[_0x4c7a72(0x193)](_0x4d5e1d[_0x4c7a72(0x15a)],_0x4d5e1d);}for(const _0x5e1ce2 of _0xc10f52){_0xbf0975['set'](_0x5e1ce2[_0x4c7a72(0x15a)],_0x5e1ce2);}return Array[_0x4c7a72(0x12f)](_0xbf0975[_0x4c7a72(0x176)]());}function normalizeRuntimeSkillListResponse(_0x157fdb,_0x324040){const _0x3b89d5=a108_0x35798a;if(Array['isArray'](_0x324040)){const _0x32f2bf=_0x324040[_0x3b89d5(0x20d)](_0x129678=>_0x129678[_0x3b89d5(0x1cf)]===_0x3b89d5(0x1a2)),_0x28a1aa=_0x324040['filter'](_0x33631b=>_0x33631b[_0x3b89d5(0x1cf)]==='company');return{'appCode':_0x157fdb,'personal':_0x32f2bf,'company':_0x28a1aa,'effective':[..._0x28a1aa,..._0x32f2bf]};}return{'appCode':_0x324040?.[_0x3b89d5(0x184)]??_0x157fdb,'personal':Array[_0x3b89d5(0x1aa)](_0x324040?.['personal'])?_0x324040[_0x3b89d5(0x1a2)]:[],'company':Array[_0x3b89d5(0x1aa)](_0x324040?.[_0x3b89d5(0x207)])?_0x324040[_0x3b89d5(0x207)]:[],'effective':Array[_0x3b89d5(0x1aa)](_0x324040?.[_0x3b89d5(0x1d3)])?_0x324040[_0x3b89d5(0x1d3)]:[]};}function normalizeRuntimeRoleUserList(_0x10d1e7,_0x31e871){const _0x160c95=a108_0x35798a;if(!Array['isArray'](_0x10d1e7))throw CliErrors[_0x160c95(0x200)](_0x160c95(0x172)+_0x31e871+_0x160c95(0x206));return _0x10d1e7['map']((_0x11fa8d,_0x2e13cf)=>{const _0x45212e=_0x160c95;if(!_0x11fa8d||typeof _0x11fa8d!==_0x45212e(0x17b)||Array['isArray'](_0x11fa8d))throw CliErrors['apiError'](_0x45212e(0x172)+_0x31e871+'['+_0x2e13cf+_0x45212e(0x1a7));const _0x3ef93f=_0x11fa8d,_0x2c8c3b=normalizeRuntimeUserId(_0x3ef93f['userId']);if(_0x2c8c3b===undefined)throw CliErrors[_0x45212e(0x200)](_0x45212e(0x172)+_0x31e871+'['+_0x2e13cf+_0x45212e(0x1e0));return{..._0x3ef93f,'userId':_0x2c8c3b};});}function normalizeRuntimeRoleUsersResponse(_0x17d553){const _0xe189b5=a108_0x35798a;return extractList(_0x17d553)[_0xe189b5(0x1d6)]((_0x3d6b60,_0xe6a32f)=>{const _0x14951c=_0xe189b5;if(!_0x3d6b60||typeof _0x3d6b60!==_0x14951c(0x17b)||Array['isArray'](_0x3d6b60))throw CliErrors[_0x14951c(0x200)](_0x14951c(0x1c7)+_0xe6a32f+_0x14951c(0x1a7));const _0x478f53=_0x3d6b60;return{..._0x478f53,'userList':normalizeRuntimeRoleUserList(_0x478f53[_0x14951c(0x163)],_0x14951c(0x135)+_0xe6a32f+'].userList'),..._0x478f53[_0x14951c(0x16a)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x478f53[_0x14951c(0x16a)],_0x14951c(0x135)+_0xe6a32f+_0x14951c(0x198))}};});}export async function listRuntimeAppRoles(_0x1032c2,_0xe38737={}){const _0x2e75c0=a108_0x35798a,_0x4ce9be=_0xe38737[_0x2e75c0(0x12e)]??0x1,_0x53efd4=Math[_0x2e75c0(0x20b)](Math[_0x2e75c0(0x1ca)](_0xe38737[_0x2e75c0(0x1ec)]??0x64,0x1),0x64),_0x5aa545=await sdkRequest(_0x1032c2,_0x10babe=>_0x10babe[_0x2e75c0(0x153)][_0x2e75c0(0x16e)]({..._0xe38737[_0x2e75c0(0x147)]?{'roleName':_0xe38737[_0x2e75c0(0x147)]}:{},'currentPage':_0x4ce9be,'pageSize':_0x53efd4}));return{'items':extractList(_0x5aa545),'paging':extractPaging(_0x5aa545)};}export async function createRuntimeAppRole(_0x1ee877){const _0x416904=a108_0x35798a;return sdkRequest(_0x1ee877[_0x416904(0x184)],_0x34c5d9=>_0x34c5d9['permit'][_0x416904(0x1e9)]({'roleType':_0x416904(0x1ae),..._0x1ee877}));}export async function updateRuntimeAppRole(_0x1ec478){const _0x1e00bd=a108_0x35798a;return sdkRequest(_0x1ec478['appCode'],_0x2ab238=>_0x2ab238[_0x1e00bd(0x153)][_0x1e00bd(0x16b)](_0x1ec478));}export async function deleteRuntimeAppRole(_0x286aea){const _0x34e70a=a108_0x35798a;return sdkRequest(undefined,_0x33cb55=>_0x33cb55['permit'][_0x34e70a(0x1f2)](_0x286aea));}export async function listRuntimeRoleUsers(_0xef55ff){const _0x315d13=a108_0x35798a,_0x2015b2=await sdkRequest(_0xef55ff,_0x4c4b34=>_0x4c4b34[_0x315d13(0x153)][_0x315d13(0x1e6)]());return normalizeRuntimeRoleUsersResponse(_0x2015b2);}export async function updateRuntimeRoleUsers(_0x4fa1d4,_0x154a9b){const _0x2a12a4=a108_0x35798a;return sdkRequest(_0x4fa1d4,_0x795aff=>_0x795aff[_0x2a12a4(0x153)][_0x2a12a4(0x177)]({'roleList':_0x154a9b}));}export async function listRuntimeAppUsers(_0xdf19a7){const _0x8d5dcd=a108_0x35798a,_0x19e189=await sdkRequest(_0xdf19a7,_0x1dbdee=>_0x1dbdee[_0x8d5dcd(0x153)]['queryAppUsers']());return extractList(_0x19e189);}export async function listRuntimePermitRoles(_0x424007,_0x39ef18={}){const _0x54d813=await sdkRequest(_0x424007,_0xfb0deb=>_0xfb0deb['permit']['getRolePermitList'](_0x39ef18));return extractList(_0x54d813);}export async function getRuntimePagePermit(_0x54164e){const _0x5d03ae=a108_0x35798a;return sdkRequest(undefined,_0x1c8c90=>_0x1c8c90['permit'][_0x5d03ae(0x195)](_0x54164e));}export async function saveRuntimePagePermit(_0x5e05f8){const _0x2511e9=a108_0x35798a;return sdkRequest(_0x5e05f8[_0x2511e9(0x184)],_0x47b44b=>_0x47b44b[_0x2511e9(0x153)][_0x2511e9(0x1e1)](_0x5e05f8));}export async function getRuntimeRoleMenuResources(_0x5728c2,_0x3b9932){const _0x10d0aa=a108_0x35798a,_0x19832b=await sdkRequest(_0x5728c2,_0x137c0a=>_0x137c0a['permit'][_0x10d0aa(0x1f3)]({'roleId':_0x3b9932}));return extractList(_0x19832b);}export async function listRuntimeMenuRolePermits(_0xc73d40){const _0x3424a9=a108_0x35798a,_0x11d530=await sdkRequest(_0xc73d40,_0x35a3ab=>_0x35a3ab[_0x3424a9(0x153)][_0x3424a9(0x17d)]());return Array['isArray'](_0x11d530?.[_0x3424a9(0x160)])?_0x11d530['permitList']:[];}export async function saveRuntimeMenuRolePermits(_0x185f9f,_0xed990d){const _0x2452fe=a108_0x35798a;return sdkRequest(_0x185f9f,_0x586a64=>_0x586a64[_0x2452fe(0x153)][_0x2452fe(0x154)]({'permitList':_0xed990d}));}export async function listRuntimeDatasetPermits(_0x577cc1,_0x4ed69e){const _0x49623c=a108_0x35798a,_0x494277=await sdkRequest(_0x577cc1,_0x28b9d8=>_0x28b9d8[_0x49623c(0x153)][_0x49623c(0x14a)](_0x4ed69e));return Array[_0x49623c(0x1aa)](_0x494277?.['permitList'])?_0x494277['permitList']:[];}export async function listRuntimeDatasetRolePermits(_0x59a1f6){const _0x2084db=a108_0x35798a,_0x473e43=await sdkRequest(_0x59a1f6,_0x520884=>_0x520884['permit'][_0x2084db(0x188)]());return Array[_0x2084db(0x1aa)](_0x473e43?.[_0x2084db(0x160)])?_0x473e43['permitList']:[];}export async function saveRuntimeDatasetRolePermits(_0x35e51f,_0x59f5d8){const _0xc6c38c=a108_0x35798a;return sdkRequest(_0x35e51f,_0x4e9dd7=>_0x4e9dd7['permit'][_0xc6c38c(0x1bc)]({'permitList':_0x59f5d8}));}
|
|
1
|
+
const a108_0x57c787=a108_0x57fd;(function(_0x4393a9,_0x2e15f9){const _0x2175aa=a108_0x57fd,_0x43ad3a=_0x4393a9();while(!![]){try{const _0x28fcb9=-parseInt(_0x2175aa(0xb2))/0x1+parseInt(_0x2175aa(0x13e))/0x2*(-parseInt(_0x2175aa(0x11d))/0x3)+parseInt(_0x2175aa(0xa6))/0x4*(-parseInt(_0x2175aa(0x133))/0x5)+-parseInt(_0x2175aa(0xbf))/0x6+parseInt(_0x2175aa(0x14d))/0x7+parseInt(_0x2175aa(0x100))/0x8*(parseInt(_0x2175aa(0x14e))/0x9)+parseInt(_0x2175aa(0x132))/0xa*(parseInt(_0x2175aa(0x139))/0xb);if(_0x28fcb9===_0x2e15f9)break;else _0x43ad3a['push'](_0x43ad3a['shift']());}catch(_0x1973c4){_0x43ad3a['push'](_0x43ad3a['shift']());}}}(a108_0x2276,0xf2b66));import{ClientAkModel}from'@lovrabet/sdk';import{getSdkClient,getIdentitySdkClient,clearSdkClient}from'../core/sdk-client.js';import{getEnv}from'../constant/env.js';import{readFile}from'node:fs/promises';import{getPersonalKnowledge,listPersonalKnowledge,savePersonalKnowledge}from'../core/kb-management-client.js';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliError,CliErrors}from'../errors.js';import{createAccessError,readApiErrorCode}from'../framework/access-error.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';import{normalizeRuntimeUserId}from'../utils/runtime-user-id.js';let _activeAK;export function setActiveAK(_0x254095){if(_activeAK!==(_0x254095||undefined))clearSdkClient();_activeAK=_0x254095||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x5b9c17,_0x522819){const _0x50efe0=a108_0x57fd;if(!_activeAK)throw CliErrors[_0x50efe0(0x145)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x50efe0(0x10e)]+'.');const _0x27ab48=_0x5b9c17?getSdkClient({'appCode':_0x5b9c17,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':'client-ak','accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x522819(_0x27ab48));}async function identitySdkRequest(_0x3b11bd){const _0x502b31=a108_0x57fd,_0x1a9f60=_activeAK;if(!_0x1a9f60)throw CliErrors[_0x502b31(0x145)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x502b31(0x10e)]+'.');return withSdkErrors(()=>_0x3b11bd(getIdentitySdkClient(_0x1a9f60,getRuntimeDomain())));}async function withSdkErrors(_0x7d317a){const _0x47e0b1=a108_0x57fd;try{return await _0x7d317a();}catch(_0x2cb153){if(_0x2cb153 instanceof CliError)throw _0x2cb153;if(!_0x2cb153||typeof _0x2cb153!==_0x47e0b1(0x147))throw _0x2cb153;const _0x51199e=_0x2cb153,_0x13fdda=_0x51199e[_0x47e0b1(0x16a)]&&typeof _0x51199e['response']===_0x47e0b1(0x147)?_0x51199e[_0x47e0b1(0x16a)]:{},_0x22abae=firstString(_0x13fdda['errorMsg'],_0x13fdda['message'],_0x13fdda[_0x47e0b1(0xce)],_0x51199e[_0x47e0b1(0x156)]),_0x32ac54=createRateLimitError({'status':[_0x51199e[_0x47e0b1(0x97)],_0x13fdda[_0x47e0b1(0x97)],_0x13fdda[_0x47e0b1(0xc5)]][_0x47e0b1(0xf0)](_0x2836a5=>Number(_0x2836a5)===0x1ad)??_0x51199e[_0x47e0b1(0x97)],'errorCode':firstString(_0x13fdda[_0x47e0b1(0xd3)],typeof _0x13fdda[_0x47e0b1(0xc5)]==='string'?_0x13fdda['code']:undefined,_0x51199e[_0x47e0b1(0xc5)]),'message':_0x22abae,'retryAfter':_0x51199e[_0x47e0b1(0xcb)]??readRetryAfterSeconds(_0x51199e[_0x47e0b1(0x16a)])});if(_0x32ac54)throw _0x32ac54;const _0x25335b=createAccessError(_0x51199e[_0x47e0b1(0x16a)],_0x51199e[_0x47e0b1(0xc5)]);if(_0x25335b)throw _0x25335b;throw CliErrors['apiError'](_0x22abae||'Runtime\x20SDK\x20request\x20failed.',_0x51199e[_0x47e0b1(0xc5)]?_0x47e0b1(0xaf)+_0x51199e[_0x47e0b1(0xc5)]:undefined);}}function firstString(..._0x2614fa){for(const _0x17e873 of _0x2614fa){if(typeof _0x17e873==='string'&&_0x17e873['trim']())return _0x17e873['trim']();}return undefined;}async function decodeResponseBody(_0x3e93c3){const _0x199ee1=a108_0x57fd;if(typeof _0x3e93c3[_0x199ee1(0x10a)]==='function')try{const _0x5a11f0=await _0x3e93c3[_0x199ee1(0x10a)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x5a11f0),'text':_0x5a11f0};}catch{return{'isJson':![],'text':_0x5a11f0[_0x199ee1(0x167)]()||undefined};}}catch(_0x2424c9){if(_0x2424c9 instanceof Error&&_0x2424c9['name']===_0x199ee1(0x14b))throw _0x2424c9;}try{return{'isJson':!![],'data':await _0x3e93c3[_0x199ee1(0x160)]()};}catch(_0x3b0371){if(_0x3b0371 instanceof Error&&_0x3b0371[_0x199ee1(0x129)]===_0x199ee1(0x14b))throw _0x3b0371;return{'isJson':![]};}}function throwIfRateLimited(_0x54d5b3,_0x3f767b,_0x371346){const _0x13d7ab=a108_0x57fd,_0x4edf72=_0x3f767b&&typeof _0x3f767b===_0x13d7ab(0x147)?_0x3f767b:{},_0x2791d9=[_0x4edf72['status'],_0x4edf72[_0x13d7ab(0xc5)]][_0x13d7ab(0xf0)](_0x90989f=>Number(_0x90989f)===0x1ad),_0x1238b3=createRateLimitError({'status':_0x54d5b3['status']===0x1ad?_0x54d5b3['status']:_0x2791d9??_0x54d5b3[_0x13d7ab(0x97)],'errorCode':firstString(_0x4edf72[_0x13d7ab(0xd3)],typeof _0x4edf72['code']===_0x13d7ab(0x93)?_0x4edf72[_0x13d7ab(0xc5)]:undefined),'message':firstString(_0x4edf72[_0x13d7ab(0xde)],_0x4edf72[_0x13d7ab(0x156)],_0x4edf72[_0x13d7ab(0xce)],_0x371346),'retryAfter':readRetryAfter(_0x54d5b3[_0x13d7ab(0x12e)])??readRetryAfterSeconds(_0x3f767b)});if(_0x1238b3)throw _0x1238b3;}async function apiRequest(_0x2eb8c4,_0x58c237={}){const _0x264125=a108_0x57fd,{method:method=_0x264125(0x115),body:_0x388ee4,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x264125(0xca),rejectRedirects:rejectRedirects=![]}=_0x58c237,_0x2f9547=_activeAK,_0x136c34=domain===_0x264125(0x8b)?getApiDomain():getRuntimeDomain();if(!_0x2f9547)throw CliErrors['authRequired'](_0x264125(0xd0)+PRODUCT_CONFIG[_0x264125(0x10e)]+'.');const _0x187abe=''+_0x136c34+_0x2eb8c4,_0x5b6ae4={'X-User-AK':_0x2f9547},_0x351446=new AbortController(),_0x8f253e=setTimeout(()=>_0x351446['abort'](),timeout);try{const _0x33e51e=await fetch(_0x187abe,{'method':method,...rejectRedirects?{'redirect':_0x264125(0x9c)}:{},'headers':{'Content-Type':_0x264125(0xdc),'X-Invoke-Source':PRODUCT_CONFIG[_0x264125(0xee)],..._0x5b6ae4,...headers},'body':_0x388ee4?JSON[_0x264125(0x11e)](_0x388ee4):undefined,'signal':_0x351446['signal']});return await readApiResponse(_0x33e51e);}catch(_0x4b66d8){if(_0x4b66d8 instanceof Error&&_0x4b66d8[_0x264125(0x129)]==='AbortError')throw CliErrors[_0x264125(0xf2)](_0x264125(0xec)+_0x187abe);throw _0x4b66d8;}finally{clearTimeout(_0x8f253e);}}async function readApiResponse(_0x454dec){const _0x27f529=a108_0x57fd,_0x5ecb5e=await decodeResponseBody(_0x454dec);if(!_0x5ecb5e[_0x27f529(0x105)]){throwIfRateLimited(_0x454dec,undefined,_0x5ecb5e['text']);throw CliErrors[_0x27f529(0xf2)](_0x27f529(0x12b)+_0x454dec[_0x27f529(0x97)]+')',_0x454dec[_0x27f529(0x97)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3952b0=_0x5ecb5e[_0x27f529(0x16d)];throwIfRateLimited(_0x454dec,_0x3952b0);if(!_0x454dec['ok']||_0x3952b0[_0x27f529(0x163)]===![]){const _0x27c640=createAccessError(_0x3952b0);if(_0x27c640)throw _0x27c640;throw CliErrors[_0x27f529(0xf2)](_0x3952b0[_0x27f529(0xde)]||_0x3952b0[_0x27f529(0x156)]||_0x3952b0['msg']||_0x27f529(0x9b)+_0x454dec[_0x27f529(0x97)],readApiErrorCode(_0x3952b0)?_0x27f529(0xaf)+readApiErrorCode(_0x3952b0):undefined);}return _0x3952b0;}async function apiBinaryRequest(_0x1e0612,_0x126169={}){const _0x16fbb8=a108_0x57fd,{method:method=_0x16fbb8(0x115),headers:headers={},timeout:timeout=0x7530}=_0x126169,_0x1ae5c3=_activeAK,_0x5120fa=getRuntimeDomain();if(!_0x1ae5c3)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x16fbb8(0x10e)]+'.');const _0x487318=''+_0x5120fa+_0x1e0612,_0x2a8ba5=new AbortController(),_0xf560c6=setTimeout(()=>_0x2a8ba5[_0x16fbb8(0xd5)](),timeout);try{const _0x247c79=await fetch(_0x487318,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x16fbb8(0xee)],'X-User-AK':_0x1ae5c3,...headers},'signal':_0x2a8ba5[_0x16fbb8(0x99)]});if(!_0x247c79['ok']){const _0x5b97b6=await decodeResponseBody(_0x247c79),_0x53f24a=_0x5b97b6[_0x16fbb8(0x16d)]&&typeof _0x5b97b6[_0x16fbb8(0x16d)]===_0x16fbb8(0x147)?_0x5b97b6[_0x16fbb8(0x16d)]:{},_0x3da95d=firstString(_0x53f24a['errorMsg'],_0x53f24a[_0x16fbb8(0x156)],_0x53f24a[_0x16fbb8(0xd3)],_0x5b97b6[_0x16fbb8(0x10a)]);throwIfRateLimited(_0x247c79,_0x5b97b6[_0x16fbb8(0x16d)],_0x3da95d);const _0x51f002=createAccessError(_0x5b97b6[_0x16fbb8(0x16d)]);if(_0x51f002)throw _0x51f002;throw CliErrors[_0x16fbb8(0xf2)](_0x3da95d||_0x16fbb8(0x9b)+_0x247c79[_0x16fbb8(0x97)],_0x16fbb8(0x92)+_0x487318);}return Buffer[_0x16fbb8(0x130)](await _0x247c79[_0x16fbb8(0x164)]());}catch(_0x387c0e){if(_0x387c0e instanceof Error&&_0x387c0e[_0x16fbb8(0x129)]===_0x16fbb8(0x14b))throw CliErrors['apiError'](_0x16fbb8(0xec)+_0x487318);throw _0x387c0e;}finally{clearTimeout(_0xf560c6);}}async function toolboxRequest(_0x557e7d,_0x57440c,_0x290e9b={}){const _0x5e59e1=a108_0x57fd,{method:method=_0x5e59e1(0x115),headers:headers={},timeout:timeout=0x7530}=_0x290e9b,_0x59ca12=_activeAK;if(!_0x59ca12)throw CliErrors[_0x5e59e1(0x145)](_0x5e59e1(0xd0)+PRODUCT_CONFIG[_0x5e59e1(0x10e)]+'.');const _0x4f15cb=getApiDomain()[_0x5e59e1(0x122)](/\/$/,''),_0x42f2ad=new URL(_0x557e7d,_0x4f15cb+'/api/node-toolbox/');if(_0x57440c)for(const [_0x82a4f,_0x36ea43]of Object[_0x5e59e1(0x8c)](_0x57440c)){_0x36ea43!==undefined&&_0x36ea43!==null&&_0x42f2ad['searchParams'][_0x5e59e1(0x14a)](_0x82a4f,String(_0x36ea43));}const _0x42a8c6=new AbortController(),_0x38e64e=setTimeout(()=>_0x42a8c6[_0x5e59e1(0xd5)](),timeout);try{const _0x2f2fcd=await fetch(_0x42f2ad,{'method':method,'headers':{'Content-Type':_0x5e59e1(0xdc),'X-Invoke-Source':PRODUCT_CONFIG[_0x5e59e1(0xee)],'X-User-AK':_0x59ca12,...headers},'signal':_0x42a8c6['signal']}),_0x165156=await decodeResponseBody(_0x2f2fcd);if(!_0x165156['isJson']){throwIfRateLimited(_0x2f2fcd,undefined,_0x165156[_0x5e59e1(0x10a)]);throw CliErrors[_0x5e59e1(0xf2)](_0x5e59e1(0x117)+_0x2f2fcd[_0x5e59e1(0x97)]+')',_0x2f2fcd['status']>=0x190?_0x5e59e1(0x13a):undefined);}const _0x3050fa=_0x165156[_0x5e59e1(0x16d)];throwIfRateLimited(_0x2f2fcd,_0x3050fa);if(!_0x2f2fcd['ok']){const _0x1e6dbd=_0x3050fa&&typeof _0x3050fa===_0x5e59e1(0x147)?_0x3050fa:{};throw CliErrors[_0x5e59e1(0xf2)](_0x1e6dbd[_0x5e59e1(0xde)]||_0x1e6dbd['message']||_0x5e59e1(0xf5)+_0x2f2fcd['status'],_0x1e6dbd[_0x5e59e1(0xd3)]?_0x5e59e1(0xfc)+_0x1e6dbd[_0x5e59e1(0xd3)]:undefined);}if(_0x3050fa&&typeof _0x3050fa===_0x5e59e1(0x147)&&'success'in _0x3050fa&&typeof _0x3050fa['success']===_0x5e59e1(0x15d)){const _0x46f6ed=_0x3050fa;if(!_0x46f6ed[_0x5e59e1(0x163)])throw CliErrors[_0x5e59e1(0xf2)](_0x46f6ed[_0x5e59e1(0xde)]||_0x46f6ed['message']||_0x5e59e1(0x153),_0x46f6ed[_0x5e59e1(0xd3)]?'Toolbox\x20error\x20code:\x20'+_0x46f6ed[_0x5e59e1(0xd3)]:undefined);return _0x46f6ed[_0x5e59e1(0x16d)];}return _0x3050fa;}catch(_0x1a694f){if(_0x1a694f instanceof Error&&_0x1a694f[_0x5e59e1(0x129)]===_0x5e59e1(0x14b))throw CliErrors[_0x5e59e1(0xf2)](_0x5e59e1(0xec)+_0x42f2ad[_0x5e59e1(0x146)]());throw _0x1a694f;}finally{clearTimeout(_0x38e64e);}}async function skillHubJsonRequest(_0x103be1,_0x33cea0={}){const _0x4aeb63=a108_0x57fd,{method:method=_0x4aeb63(0x115),query:_0x2fafb5,body:_0x1f840b,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x33cea0,_0x39a867=_activeAK;if(!_0x39a867)throw CliErrors[_0x4aeb63(0x145)](_0x4aeb63(0xd0)+PRODUCT_CONFIG[_0x4aeb63(0x10e)]+'.');const _0x14bf02=getSkillDomain()[_0x4aeb63(0x122)](/\/$/,''),_0x4c2aa5=new URL(_0x103be1,_0x14bf02+'/');if(_0x2fafb5)for(const [_0x475048,_0x2253c5]of Object[_0x4aeb63(0x8c)](_0x2fafb5)){_0x2253c5!==undefined&&_0x2253c5!==null&&_0x4c2aa5['searchParams']['set'](_0x475048,String(_0x2253c5));}const _0x4b0c6e=new AbortController(),_0xd01a21=setTimeout(()=>_0x4b0c6e[_0x4aeb63(0xd5)](),timeout);try{const _0x232f33=await fetch(_0x4c2aa5['toString'](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x4aeb63(0xee)],'X-User-AK':_0x39a867,...headers},'body':_0x1f840b,'signal':_0x4b0c6e[_0x4aeb63(0x99)]}),_0xd89a2c=await decodeResponseBody(_0x232f33);if(!_0xd89a2c[_0x4aeb63(0x105)]){if(allowNotFound&&_0x232f33[_0x4aeb63(0x97)]===0x194)return undefined;throwIfRateLimited(_0x232f33,undefined,_0xd89a2c[_0x4aeb63(0x10a)]);throw CliErrors[_0x4aeb63(0xf2)](_0x4aeb63(0xc3)+_0x232f33[_0x4aeb63(0x97)]+')',_0x232f33[_0x4aeb63(0x97)]>=0x190?_0x4aeb63(0x13a):undefined);}const _0x1204a1=_0xd89a2c['data'];throwIfRateLimited(_0x232f33,_0x1204a1);if(allowNotFound&&isSkillHubNotFoundResponse(_0x232f33[_0x4aeb63(0x97)],_0x1204a1))return undefined;const _0x299b21=!_0x232f33['ok']||_0x1204a1?.['success']===![]||typeof _0x1204a1?.[_0x4aeb63(0xc5)]===_0x4aeb63(0x14f)&&_0x1204a1[_0x4aeb63(0xc5)]>=0x190;if(_0x299b21)throw CliErrors[_0x4aeb63(0xf2)](_0x1204a1?.[_0x4aeb63(0xde)]||_0x1204a1?.[_0x4aeb63(0x156)]||_0x1204a1?.[_0x4aeb63(0xce)]||_0x4aeb63(0x88)+_0x232f33[_0x4aeb63(0x97)],_0x1204a1?.[_0x4aeb63(0xd3)]?_0x4aeb63(0xc1)+_0x1204a1['errorCode']:undefined);return _0x1204a1?.[_0x4aeb63(0x16d)]??_0x1204a1;}catch(_0x59d2a5){if(_0x59d2a5 instanceof Error&&_0x59d2a5[_0x4aeb63(0x129)]===_0x4aeb63(0x14b))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x4c2aa5[_0x4aeb63(0x146)]());throw _0x59d2a5;}finally{clearTimeout(_0xd01a21);}}function isSkillHubNotFoundResponse(_0x23f94f,_0x4b60e6){const _0x2349dc=a108_0x57fd;if(_0x23f94f===0x194||_0x4b60e6?.['code']===0x194)return!![];if(_0x23f94f!==0x190&&_0x4b60e6?.['code']!==0x190)return![];const _0x1e1a31=[_0x4b60e6?.[_0x2349dc(0xce)],_0x4b60e6?.[_0x2349dc(0x156)],_0x4b60e6?.[_0x2349dc(0xde)],_0x4b60e6?.[_0x2349dc(0x9c)]][_0x2349dc(0xc6)](_0x2f33a5=>typeof _0x2f33a5==='string')[_0x2349dc(0x116)]('\x20');return/skill not found\b/i[_0x2349dc(0xb8)](_0x1e1a31);}async function skillHubBinaryRequest(_0x44f811,_0x43f518={}){const _0x3179f2=a108_0x57fd,{query:_0x13ef2d,headers:headers={},timeout:timeout=0x7530}=_0x43f518,_0x1296a9=_activeAK;if(!_0x1296a9)throw CliErrors['authRequired'](_0x3179f2(0xd0)+PRODUCT_CONFIG[_0x3179f2(0x10e)]+'.');const _0x1c280a=getSkillDomain()['replace'](/\/$/,''),_0x154709=new URL(_0x44f811,_0x1c280a+'/');if(_0x13ef2d)for(const [_0x29bccc,_0x3dc6b6]of Object['entries'](_0x13ef2d)){_0x3dc6b6!==undefined&&_0x3dc6b6!==null&&_0x154709['searchParams'][_0x3179f2(0x14a)](_0x29bccc,String(_0x3dc6b6));}const _0x2d5102=new AbortController(),_0x47f8d2=setTimeout(()=>_0x2d5102[_0x3179f2(0xd5)](),timeout);try{const _0x26c427=await fetch(_0x154709[_0x3179f2(0x146)](),{'method':'GET','headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x3179f2(0xee)],'X-User-AK':_0x1296a9,...headers},'signal':_0x2d5102[_0x3179f2(0x99)]});if(!_0x26c427['ok']){const _0x168824=await decodeResponseBody(_0x26c427),_0x2622a7=_0x168824[_0x3179f2(0x16d)]&&typeof _0x168824[_0x3179f2(0x16d)]===_0x3179f2(0x147)?_0x168824['data']:{},_0x16ce44=firstString(_0x2622a7[_0x3179f2(0xde)],_0x2622a7[_0x3179f2(0x156)],_0x2622a7[_0x3179f2(0xce)],_0x2622a7[_0x3179f2(0xd3)],_0x168824['text']);throwIfRateLimited(_0x26c427,_0x168824[_0x3179f2(0x16d)],_0x16ce44);throw CliErrors[_0x3179f2(0xf2)](_0x16ce44||_0x3179f2(0x88)+_0x26c427[_0x3179f2(0x97)],_0x3179f2(0x92)+_0x154709[_0x3179f2(0x146)]());}return Buffer['from'](await _0x26c427[_0x3179f2(0x164)]());}catch(_0x54d585){if(_0x54d585 instanceof Error&&_0x54d585[_0x3179f2(0x129)]==='AbortError')throw CliErrors[_0x3179f2(0xf2)](_0x3179f2(0xec)+_0x154709[_0x3179f2(0x146)]());throw _0x54d585;}finally{clearTimeout(_0x47f8d2);}}export async function getBffEndpointContract(_0x32dfe0,_0x402139){const _0x3af8a8=a108_0x57fd;if(encodeURIComponent(_0x32dfe0)!==_0x32dfe0||_0x32dfe0==='.'||_0x32dfe0==='..')throw CliErrors[_0x3af8a8(0xa5)](_0x3af8a8(0x111));if(_0x402139===_0x3af8a8(0x12a))throw CliErrors[_0x3af8a8(0xa5)](_0x3af8a8(0x11a)+_0x32dfe0+',\x20name='+_0x402139);const _0x276f04=await sdkRequest(_0x32dfe0,_0xe7e71=>{const _0x4c725a=_0x3af8a8;if(!(_0x4c725a(0x11c)in _0xe7e71[_0x4c725a(0x149)]))throw CliErrors['validation'](_0x4c725a(0xed));return _0xe7e71[_0x4c725a(0x149)][_0x4c725a(0x11c)](_0x402139);});if(!_0x276f04||typeof _0x276f04!==_0x3af8a8(0x147)||Array[_0x3af8a8(0x104)](_0x276f04)||_0x276f04[_0x3af8a8(0xeb)]!==_0x32dfe0||_0x276f04[_0x3af8a8(0x10f)]!==_0x402139)throw CliErrors['validation'](_0x3af8a8(0x11a)+_0x32dfe0+',\x20name='+_0x402139);const _0x30e173=_0x276f04[_0x3af8a8(0x138)];if(_0x30e173!=null&&(typeof _0x30e173!=='number'||!Number[_0x3af8a8(0xdf)](_0x30e173)))throw CliErrors[_0x3af8a8(0xf2)](_0x3af8a8(0xa3));return{'appCode':_0x276f04[_0x3af8a8(0xeb)],'functionName':_0x276f04[_0x3af8a8(0x10f)],'description':_0x276f04['description'],'version':_0x276f04['version'],'gmtModified':_0x30e173};}export async function getSqlQueryInfo(_0x484132,_0x312170){const _0x4ce1d2=a108_0x57fd,_0xf3bab1=await sdkRequest(_0x484132,_0x461102=>{const _0x5143a4=a108_0x57fd;if(!(_0x5143a4(0xbc)in _0x461102['sql']))throw CliErrors['validation'](_0x5143a4(0xf3));return _0x461102[_0x5143a4(0x15c)]['query']({'appCode':_0x484132,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x312170});}),_0x1837a7=_0xf3bab1&&typeof _0xf3bab1===_0x4ce1d2(0x147)&&_0x4ce1d2(0x128)in _0xf3bab1?_0xf3bab1['tableData']?.[0x0]:_0xf3bab1&&typeof _0xf3bab1===_0x4ce1d2(0x147)&&_0x4ce1d2(0xef)in _0xf3bab1?_0xf3bab1:undefined;if(!_0x1837a7)throw CliErrors[_0x4ce1d2(0xa5)](_0x4ce1d2(0x8f)+_0x312170);return _0x1837a7;}export async function listApprovalTodo(_0xfb83f8,_0x151875=0x1,_0x3e5d6f=0x14){const _0x2903af=a108_0x57fd,_0x32e0e8=await sdkRequest(_0xfb83f8,_0x21960e=>_0x21960e['approval'][_0x2903af(0x137)]({'currentPage':_0x151875,'pageSize':_0x3e5d6f}));if(!_0x32e0e8||typeof _0x32e0e8!=='object'||!Array[_0x2903af(0x104)](_0x32e0e8[_0x2903af(0xb6)]))throw CliErrors[_0x2903af(0xf2)](_0x2903af(0xd6));return _0x32e0e8;}export async function getApprovalTaskDetail(_0x392047,_0x200187){const _0x134037=a108_0x57fd,_0x33c83b=await sdkRequest(_0x200187,_0x3121dd=>_0x3121dd[_0x134037(0x126)][_0x134037(0xc8)](_0x392047));if(!_0x33c83b||typeof _0x33c83b!=='object'||Array['isArray'](_0x33c83b))throw CliErrors['apiError'](_0x134037(0xb7));return _0x33c83b;}export async function approveApprovalTask(_0x906886){const _0x5c5644=a108_0x57fd;return await sdkRequest(_0x906886[_0x5c5644(0xeb)],_0xbe8c78=>_0xbe8c78[_0x5c5644(0x126)][_0x5c5644(0x8d)](_0x906886)),null;}export async function transferApprovalTask(_0x5f12d1){const _0x32cb0a=a108_0x57fd;return await sdkRequest(_0x5f12d1['appCode'],_0x148c67=>_0x148c67[_0x32cb0a(0x126)][_0x32cb0a(0xe1)](_0x5f12d1)),null;}function isRemoteAppItem(_0x1e73cc){const _0x4f6325=a108_0x57fd;return!!_0x1e73cc&&typeof _0x1e73cc===_0x4f6325(0x147)&&typeof _0x1e73cc[_0x4f6325(0xeb)]===_0x4f6325(0x93)&&typeof _0x1e73cc[_0x4f6325(0xcc)]==='string';}function extractRemoteAppItems(_0x552c32){const _0x1c4e5c=a108_0x57fd;if(Array[_0x1c4e5c(0x104)](_0x552c32))return _0x552c32[_0x1c4e5c(0xc6)](isRemoteAppItem);if(!_0x552c32||typeof _0x552c32!==_0x1c4e5c(0x147))throw CliErrors[_0x1c4e5c(0xf2)](_0x1c4e5c(0x15e));const _0x2cd61e=_0x552c32;if(Array[_0x1c4e5c(0x104)](_0x2cd61e['tableData']))return _0x2cd61e[_0x1c4e5c(0x128)]['filter'](isRemoteAppItem);if(_0x2cd61e[_0x1c4e5c(0x16d)]&&typeof _0x2cd61e[_0x1c4e5c(0x16d)]===_0x1c4e5c(0x147)){const _0x918655=_0x2cd61e[_0x1c4e5c(0x16d)];if(Array['isArray'](_0x918655[_0x1c4e5c(0x128)]))return _0x918655[_0x1c4e5c(0x128)]['filter'](isRemoteAppItem);}throw CliErrors[_0x1c4e5c(0xf2)](_0x1c4e5c(0x155));}export async function getMyApps(){return extractRemoteAppItems(await identitySdkRequest(_0x2a7646=>_0x2a7646['myApps']()));}export async function getLoginUserInfo(){const _0x5041b5=a108_0x57fd,_0x8b4335=await identitySdkRequest(_0x1aeda4=>_0x1aeda4[_0x5041b5(0x157)]());if(!_0x8b4335||typeof _0x8b4335!==_0x5041b5(0x147)||Array[_0x5041b5(0x104)](_0x8b4335))throw CliErrors[_0x5041b5(0xf2)](_0x5041b5(0x10c));return _0x8b4335;}export const USER_ACCOUNT_BIND_PATH=a108_0x57c787(0xfe);export async function bindExternalUserAccount(_0x53081d,_0xeff96f){const _0x3b541f=a108_0x57c787;return identitySdkRequest(_0x4f42d6=>_0x4f42d6[_0x3b541f(0x169)]({'provider':_0x53081d,'accountId':_0xeff96f}));}function runtimeSchedulePath(_0x3bedbf,_0x3fad3f=''){const _0x4aeede=a108_0x57c787;return _0x4aeede(0x121)+encodeURIComponent(_0x3bedbf)+_0x4aeede(0x106)+_0x3fad3f;}export async function validateRuntimeSchedule(_0x31d674,_0x4c3a79){const _0x528f7e=a108_0x57c787,_0x1ceba5=await apiRequest(runtimeSchedulePath(_0x31d674,'/validate'),{'method':_0x528f7e(0xf6),'body':_0x4c3a79});return _0x1ceba5[_0x528f7e(0x16d)];}export async function createRuntimeSchedule(_0x56b41e,_0x31e0b4){const _0x2b04cb=a108_0x57c787,_0x1534ca=await apiRequest(runtimeSchedulePath(_0x56b41e),{'method':_0x2b04cb(0xf6),'body':_0x31e0b4});return _0x1534ca[_0x2b04cb(0x16d)];}export async function listRuntimeSchedules(_0x3884d4,_0x5506f9){const _0x5548a8=a108_0x57c787,_0x55a8e7=new URLSearchParams();_0x55a8e7[_0x5548a8(0x14a)]('kind',_0x5506f9[_0x5548a8(0xa7)]);if(_0x5506f9[_0x5548a8(0x131)]!==undefined)_0x55a8e7['set'](_0x5548a8(0x131),String(_0x5506f9['limit']));if(_0x5506f9[_0x5548a8(0x102)])_0x55a8e7[_0x5548a8(0x14a)](_0x5548a8(0x102),_0x5506f9[_0x5548a8(0x102)]);const _0x3de45b=_0x55a8e7[_0x5548a8(0xa1)]>0x0?'?'+_0x55a8e7[_0x5548a8(0x146)]():'',_0x427d68=await apiRequest(''+runtimeSchedulePath(_0x3884d4)+_0x3de45b);return _0x427d68['data'];}export async function getRuntimeSchedule(_0x9c9b,_0x5b3445){const _0x5b0486=a108_0x57c787,_0x16e74a=await apiRequest(runtimeSchedulePath(_0x9c9b,'/'+encodeURIComponent(_0x5b3445)));return _0x16e74a[_0x5b0486(0x16d)];}export async function deleteRuntimeSchedule(_0x426769,_0x54028b){const _0x21fc0e=a108_0x57c787,_0x3a5ee0=await apiRequest(runtimeSchedulePath(_0x426769,'/'+encodeURIComponent(_0x54028b)),{'method':_0x21fc0e(0xf4)});return _0x3a5ee0[_0x21fc0e(0x16d)];}export async function runRuntimeSchedule(_0xc4f895,_0xa1a77a){const _0x55547e=a108_0x57c787,_0xc34650=await apiRequest(runtimeSchedulePath(_0xc4f895,'/'+encodeURIComponent(_0xa1a77a)+_0x55547e(0x12c)),{'method':_0x55547e(0xf6)});return _0xc34650[_0x55547e(0x16d)];}export async function listDatasets(_0x8e6638,_0x4c817e){const _0x44da85=a108_0x57c787,_0x55e50b=await sdkRequest(_0x8e6638,_0x2719e3=>_0x2719e3[_0x44da85(0xe7)][_0x44da85(0xe4)]({..._0x4c817e?.[_0x44da85(0xc5)]&&{'code':_0x4c817e[_0x44da85(0xc5)]},..._0x4c817e?.[_0x44da85(0x129)]&&{'name':_0x4c817e[_0x44da85(0x129)]},..._0x4c817e?.[_0x44da85(0x159)]&&{'tableName':_0x4c817e['tableName']}}));return extractList(_0x55e50b);}export async function getDatasetDetail(_0x54c8c1){const _0x3f2baa=a108_0x57c787;return sdkRequest(undefined,_0x13a65b=>_0x13a65b['datasetMeta'][_0x3f2baa(0xba)]({'code':_0x54c8c1}));}function importSdkRequest(_0x4c5f63,_0x100e15,_0x298d80){return sdkRequest(_0x4c5f63,_0x2bf6b3=>{const _0x3f368a=a108_0x57fd,_0x57dc3c=_0x2bf6b3['getModel'](_0x3f368a(0x162)+_0x100e15);if(!(_0x57dc3c instanceof ClientAkModel))throw CliErrors[_0x3f368a(0xa5)](_0x3f368a(0xc0));return _0x298d80(_0x57dc3c);});}export async function getDatasetImportContract(_0x4ddac8,_0x35dded){return importSdkRequest(_0x4ddac8,_0x35dded,_0x474d08=>_0x474d08['importContract']());}export async function createDatasetImportBatch(_0x308025,_0x20df1b,_0x555aa2){const _0x877721=a108_0x57c787;return importSdkRequest(_0x308025,_0x20df1b,_0x1d2fc0=>_0x1d2fc0[_0x877721(0x151)](_0x555aa2));}export async function readDatasetImportRows(_0x31f832,_0x2ef3e9,_0x43c915){const _0xc5db30=a108_0x57c787,_0x32e0f9=await importSdkRequest(_0x31f832,_0x2ef3e9,_0x28a970=>_0x28a970[_0xc5db30(0x15f)]({'ids':_0x43c915}));if(!_0x32e0f9||!Array['isArray'](_0x32e0f9[_0xc5db30(0xc4)]))throw CliErrors[_0xc5db30(0xf2)](_0xc5db30(0x152));return _0x32e0f9[_0xc5db30(0xc4)];}function a108_0x2276(){const _0x4ee764=['application/zip','/api/v1/skills/','applyUserList','/publish','/api/cli/v1/skills/','Toolbox\x20error\x20code:\x20','publishedVersion','/client/user-accounts/bind','tags','352UYgpaq','summary','cursor','recognize','isArray','isJson','/schedules','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','savePagePermit','skillCode','text',']\x20must\x20be\x20an\x20object.','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','newConfigFileName','functionName','PUBLISHED','Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.','deleteRole','ocr','found','GET','join','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Missing\x20Skill\x20package\x20payload.','saveMenuPermits','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','skill','getEndpoint','270867LckbSO','stringify','importImageReadback','userId','/api/harness/apps/','replace','get','description','create','approval','api-doc-generator','tableData','name','functions','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/run','warnings','headers','.zip','from','limit','12964710zcDIkf','30320jgmaEu','packageBase64','importImage','min','listTodo','gmtModified','22BafeyX','Check\x20your\x20credentials\x20and\x20try\x20again.','getRoleUserList','content','effective','38vrOGnT','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','roleName','getRoleList','execute','visibility','pageSize','authRequired','toString','object','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','bff','set','AbortError','scope','4982222LnVCyG','120069FwuzLS','number','userList','importBatch','Invalid\x20import\x20readback\x20response.','Toolbox\x20API\x20error','headlineVersion','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','message','loginUserInfo','/download','tableName','contentHash','company','sql','boolean','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','importReadback','json','diagramValidated','dataset_','success','arrayBuffer','].applyUserList','getRolePermitList','trim','bytes','bindAccount','response','getConfigByKey','namespace','data','services','undefined','SkillHub\x20API\x20error:\x20','permitList','Invalid\x20app\x20config\x20value:\x20key=','api','entries','approve','ownerPreviewVersion','SQL\x20query\x20not\x20found:\x20','sourceFingerprint','updateRole','Download\x20failed:\x20','string','getMenuPermitList','queryUrl','/validate','status','isInteger','signal','toLowerCase','API\x20error:\x20','error','saveDatasetPermits','diagramBound','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','type','size','permit','Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.','example','validation','68WgpDur','kind','version','CUSTOM','all','\x20must\x20be\x20an\x20array.','queryAppUsers','currentPage','getDatasetPermitMeta','API\x20error\x20code:\x20','artifact','/versions/','55676yhuuWi','getDatasetPermitList','diagramRevision','map','records','Invalid\x20approval\x20task\x20detail\x20response.','test','NAMESPACE_ONLY','getDrivenData','Invalid\x20runtime\x20role\x20members\x20response:\x20','query','resolvedVersion','].userId\x20is\x20invalid.','6139722yOgaRE','Dataset\x20import\x20requires\x20Client\x20AK.','SkillHub\x20error\x20code:\x20','base64','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','items','code','filter','slug','getTask','].userList','runtime','retryAfter','appName','file','msg','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','Configure\x20accessKey\x20in\x20','upload','roleList[','errorCode','/publish/validate','abort','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','errors','/diagram','confirmWarnings','diagram','Invalid\x20notification\x20config\x20list\x20response.','application/json','personal','errorMsg','isSafeInteger','displayName','transfer','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','list','publish','valid','datasetMeta','PRIVATE','resolvedSlug','/skills','appCode','Request\x20timeout:\x20','Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.','invokeSource','sqlCode','find','app','apiError','SQL\x20metadata\x20requires\x20Client\x20AK.','DELETE','Toolbox\x20API\x20error:\x20','POST'];a108_0x2276=function(){return _0x4ee764;};return a108_0x2276();}export async function readDatasetImportTaskRows(_0x1411b6,_0x231f8a,_0xf97ed9){const _0x3dde3e=a108_0x57c787,_0x3f449a=await importSdkRequest(_0x1411b6,_0x231f8a,_0x4eefd8=>_0x4eefd8[_0x3dde3e(0x15f)]({'taskId':_0xf97ed9}));if(!_0x3f449a||!Array[_0x3dde3e(0x104)](_0x3f449a[_0x3dde3e(0xc4)]))throw CliErrors[_0x3dde3e(0xf2)]('Invalid\x20import\x20task\x20readback\x20response.');return _0x3f449a[_0x3dde3e(0xc4)];}export async function uploadDatasetImportImage(_0xb7129c,_0x232abf,_0x5a89ae,_0x4d4193){const _0x5ac209=a108_0x57c787;return importSdkRequest(_0xb7129c,_0x232abf,_0x5a3f64=>_0x5a3f64[_0x5ac209(0x135)]({'importId':_0x5a89ae,'contentHash':_0x4d4193[_0x5ac209(0x15a)],'file':new Blob([new Uint8Array(_0x4d4193[_0x5ac209(0x168)])],{'type':_0x4d4193[_0x5ac209(0xa0)]}),'fileName':'image'}));}export async function readDatasetImportImage(_0xa37e8a,_0x2ed45b,_0x5f4127,_0x168c8a){const _0x18eedb=a108_0x57c787;return importSdkRequest(_0xa37e8a,_0x2ed45b,_0x4a6c98=>_0x4a6c98[_0x18eedb(0x11f)]({'importId':_0x5f4127,'contentHash':_0x168c8a[_0x18eedb(0x15a)],'type':_0x168c8a[_0x18eedb(0xa0)],'size':_0x168c8a['size']}));}export async function getDatasetSdkUsageDoc(_0x197763,_0x53058e){const _0x2c04ed=a108_0x57c787,_0xdddaeb=await toolboxRequest(_0x2c04ed(0x127),{'datasetCode':_0x197763,'appCode':_0x53058e});return typeof _0xdddaeb?.['markdown']==='string'?_0xdddaeb['markdown']:'';}export async function uploadRuntimeFile(_0x1ae56a,_0x2924f7){const _0x1c745c=a108_0x57c787,_0x49bcfd=await readFile(_0x2924f7);return sdkRequest(_0x1ae56a,_0x96edc8=>_0x96edc8[_0x1c745c(0x16e)][_0x1c745c(0xcd)][_0x1c745c(0xd1)]({'file':new Blob([new Uint8Array(_0x49bcfd)]),'fileName':basename(_0x2924f7)}));}export async function queryRuntimeFileUrl(_0x2f50a3,_0xf7669a={}){const _0x5d86e3=a108_0x57c787;return sdkRequest(undefined,_0x150521=>_0x150521[_0x5d86e3(0x16e)][_0x5d86e3(0xcd)][_0x5d86e3(0x95)]({'filePath':_0x2f50a3,..._0xf7669a}));}export async function recognizeRuntimeOcr(_0x2cc6d2,_0x53bba2){const _0x4983d1=a108_0x57c787;return sdkRequest(_0x2cc6d2,_0x4777bf=>_0x4777bf[_0x4983d1(0x16e)][_0x4983d1(0x113)][_0x4983d1(0x103)](_0x53bba2));}export async function getRuntimeAppConfigByKey(_0x16bd5d,_0xce68ca){const _0x3bf23a=a108_0x57c787,_0x498cdd=await sdkRequest(_0x16bd5d,_0x3599d5=>_0x3599d5[_0x3bf23a(0xf1)][_0x3bf23a(0x16b)](_0xce68ca));if(typeof _0x498cdd!==_0x3bf23a(0x93))throw CliErrors[_0x3bf23a(0xa5)](_0x3bf23a(0x8a)+_0xce68ca);return _0x498cdd;}export async function listNotificationChannelConfigs(_0x51d569,_0x1f4770){const _0x55154c=a108_0x57c787,_0x267f12=await sdkRequest(_0x51d569,_0x129f55=>_0x129f55[_0x55154c(0xf1)]['listNotificationChannels'](_0x1f4770));if(!Array[_0x55154c(0x104)](_0x267f12))throw CliErrors[_0x55154c(0xf2)](_0x55154c(0xdb),_0x55154c(0xe3));return _0x267f12;}export async function listRuntimeArtifacts(_0x4afaba,_0x17da26){const _0x4c955d=a108_0x57c787,_0x3ff707=await sdkRequest(_0x4afaba,_0x2d5c53=>_0x2d5c53[_0x4c955d(0xb0)]['list'](_0x17da26));return Array['isArray'](_0x3ff707)?_0x3ff707:[];}export async function getRuntimeArtifact(_0x5c4930,_0x57960e){const _0x8f4bf0=a108_0x57c787,_0x2a9b6a=await sdkRequest(_0x57960e,_0x43bbf0=>_0x43bbf0[_0x8f4bf0(0xb0)][_0x8f4bf0(0x123)](_0x5c4930));if(!_0x2a9b6a)throw CliErrors[_0x8f4bf0(0xa5)]('Artifact\x20not\x20found:\x20id='+_0x5c4930);return _0x2a9b6a;}export async function createRuntimeArtifact(_0xea6595,_0x51cab6){const _0x1cd322=a108_0x57c787;return sdkRequest(_0xea6595,_0x1b8804=>_0x1b8804[_0x1cd322(0xb0)]['create'](_0x51cab6));}export async function updateRuntimeArtifact(_0x29dea5,_0x2a621c,_0x1bcae7){return sdkRequest(_0x2a621c,_0x55dc2b=>_0x55dc2b['artifact']['update'](_0x29dea5,_0x1bcae7));}export async function listPersonalBffs(_0x497eb6){const _0x4c700c=a108_0x57c787,_0x50dd67=await sdkRequest(_0x497eb6,_0x296ea0=>_0x296ea0['personal'][_0x4c700c(0x149)][_0x4c700c(0xe4)]());return Array[_0x4c700c(0x104)](_0x50dd67)?_0x50dd67:[];}export async function getPersonalBff(_0x158f20,_0x168c75){const _0x23f30b=a108_0x57c787,_0x6c3d3e=await sdkRequest(_0x168c75,_0x248a8d=>_0x248a8d[_0x23f30b(0xdd)][_0x23f30b(0x149)][_0x23f30b(0x123)](_0x158f20));if(!_0x6c3d3e)throw CliErrors[_0x23f30b(0xa5)](_0x23f30b(0x10d)+_0x158f20);return _0x6c3d3e;}export async function createPersonalBff(_0x5024ba,_0x234c5a){const _0x3b09c7=a108_0x57c787;return sdkRequest(_0x5024ba,_0x402125=>_0x402125[_0x3b09c7(0xdd)][_0x3b09c7(0x149)][_0x3b09c7(0x125)](_0x234c5a));}export async function updatePersonalBff(_0x1368dc,_0x1242d5,_0x39192e){const _0xdf41c4=a108_0x57c787;return sdkRequest(_0x1242d5,_0x271a74=>_0x271a74[_0xdf41c4(0xdd)][_0xdf41c4(0x149)]['update'](_0x1368dc,_0x39192e));}export async function executePersonalBff(_0x5d848f,_0x3d7576,_0x84e71b){const _0xaf6ee1=a108_0x57c787;return sdkRequest(_0x3d7576,_0x25cb2d=>_0x25cb2d['personal'][_0xaf6ee1(0x149)][_0xaf6ee1(0x142)]({'scriptId':_0x5d848f,'params':_0x84e71b}));}export async function listPersonalKnowledgeBaseItems(_0x488348,_0x51d91e){return listPersonalKnowledge({'appCode':_0x488348,'accessKey':_activeAK,'signal':_0x51d91e});}export async function getPersonalKnowledgeBaseItem(_0x4c5cd9,_0x135bd5,_0x287667){return getPersonalKnowledge({'appCode':_0x135bd5,'accessKey':_activeAK,'signal':_0x287667},_0x4c5cd9);}export async function createPersonalKnowledgeBaseItem(_0x14a32d,_0x17dff8,_0x27ef80){return savePersonalKnowledge({'appCode':_0x14a32d,'accessKey':_activeAK,'signal':_0x27ef80},_0x17dff8);}export async function updatePersonalKnowledgeBaseItem(_0x205464,_0x1a678d,_0x56d863,_0xce95c4){return savePersonalKnowledge({'appCode':_0x1a678d,'accessKey':_activeAK,'signal':_0xce95c4},_0x56d863,_0x205464);}export async function getRuntimeSkillByCode(_0x1579be,_0x1fd0c0){const _0x9144e9=a108_0x57c787,_0x1878cf=await skillHubJsonRequest(_0x9144e9(0xf8)+encodeURIComponent(_0x1579be)+'/'+encodeURIComponent(_0x1fd0c0),{'allowNotFound':!![]});return _0x1878cf?skillHubRuntimeDetailToRuntimeSkill(_0x1878cf):undefined;}export async function listRuntimeSkills(_0x195e27){const _0x4937ae=a108_0x57c787,_0x3bdc73=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x195e27['appCode'])+_0x4937ae(0xea),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x195e27[_0x4937ae(0xeb)],_0x3bdc73,_0x195e27['scope']??_0x4937ae(0xaa),_0x195e27['code'],_0x195e27['installableOnly']);}export async function listPersonalRuntimeSkills(_0x190083){const _0x1e6dae=a108_0x57c787;return(await listRuntimeSkills({'appCode':_0x190083,'scope':_0x1e6dae(0xdd)}))[_0x1e6dae(0xdd)];}export async function listCompanyRuntimeSkills(_0x152509){const _0x2e0f05=a108_0x57c787;return(await listRuntimeSkills({'appCode':_0x152509,'scope':'company'}))[_0x2e0f05(0x15b)];}export async function listVisibleRuntimeSkills(_0x3e1db3){const _0x1a83b9=a108_0x57c787;return(await listRuntimeSkills({'appCode':_0x3e1db3,'scope':_0x1a83b9(0xaa)}))['effective'];}export async function createPersonalRuntimeSkill(_0x4cd0d2,_0x7bd29f,_0x4e56e6={}){const _0x5c82ef=a108_0x57c787;return publishRuntimeSkill(_0x4cd0d2,_0x7bd29f,{'visibility':_0x5c82ef(0xe8),'confirmWarnings':_0x4e56e6[_0x5c82ef(0xd9)]});}export async function updatePersonalRuntimeSkill(_0x3f16a9,_0x3b7d8e,_0x19afa3,_0x5a785e={}){const _0x17778f=a108_0x57c787;return publishRuntimeSkill(_0x3b7d8e,{..._0x19afa3,'skillCode':_0x19afa3[_0x17778f(0x109)]??_0x3f16a9},{'visibility':_0x17778f(0xe8),'confirmWarnings':_0x5a785e[_0x17778f(0xd9)]});}export async function publishCompanyRuntimeSkill(_0x2a76f8,_0x53d5aa,_0x44ac10={}){const _0x2d1be1=a108_0x57c787;return publishRuntimeSkill(_0x2a76f8,_0x53d5aa,{'visibility':_0x2d1be1(0xb9),'confirmWarnings':_0x44ac10[_0x2d1be1(0xd9)]});}export async function validateRuntimeSkillPublish(_0x1df9e8,_0x1cbe79,_0xd67d5c){const _0x3b5d56=a108_0x57c787,_0x515ef2=buildRuntimeSkillPublishForm(_0x1cbe79,_0xd67d5c['visibility']),_0x1661b9=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x1df9e8)+_0x3b5d56(0xd4),{'method':_0x3b5d56(0xf6),'body':_0x515ef2});return assertJointDiagramAcknowledged(_0x1cbe79[_0x3b5d56(0xda)],_0x1661b9['diagramValidated'],_0x3b5d56(0xa5)),{'valid':_0x1661b9[_0x3b5d56(0xe6)]===!![],'errors':Array[_0x3b5d56(0x104)](_0x1661b9[_0x3b5d56(0xd7)])?_0x1661b9[_0x3b5d56(0xd7)]:[],'warnings':Array[_0x3b5d56(0x104)](_0x1661b9[_0x3b5d56(0x12d)])?_0x1661b9[_0x3b5d56(0x12d)]:[],'resolvedSlug':_0x1661b9[_0x3b5d56(0xe9)],'resolvedVersion':_0x1661b9[_0x3b5d56(0xbd)],'diagramValidated':_0x1661b9[_0x3b5d56(0x161)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x2c3578,_0x12b718,_0x293fe5,_0x8dd3a4,_0x2dda9f){const _0x1d4ba3=a108_0x57c787;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x2c3578,_0x12b718,_0x293fe5,_0x1d4ba3(0x96)),{'method':_0x1d4ba3(0xf6),'query':{'scope':_0x8dd3a4},'headers':{'Content-Type':'application/json'},'body':JSON[_0x1d4ba3(0x11e)](_0x2dda9f)});}export async function putRuntimeSkillVersionDiagram(_0x4d4591,_0x11581e,_0x268a9e,_0x57149d,_0x33f432){const _0x2fb9d9=a108_0x57c787;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x4d4591,_0x11581e,_0x268a9e),{'method':'PUT','query':{'scope':_0x57149d},'headers':{'Content-Type':'application/json'},'body':JSON[_0x2fb9d9(0x11e)](_0x33f432)});}export async function getRuntimeSkillVersionDiagram(_0x39b9cd,_0x5cda72,_0x533f78,_0xeb2e22){const _0x39b551=a108_0x57c787,_0x283a89=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x39b9cd,_0x5cda72,_0x533f78),{'query':{'scope':_0xeb2e22}});if(typeof _0x283a89[_0x39b551(0x114)]!==_0x39b551(0x15d))throw CliErrors[_0x39b551(0xf2)](_0x39b551(0x107));const _0x2a15ae=_0x283a89[_0x39b551(0x90)];if(typeof _0x2a15ae!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x39b551(0xb8)](_0x2a15ae))throw CliErrors[_0x39b551(0xf2)](_0x39b551(0x9f),'SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.');const _0x309c8e=_0x283a89[_0x39b551(0xb4)];if(_0x283a89[_0x39b551(0x114)]&&(!Number[_0x39b551(0x98)](_0x309c8e)||Number(_0x309c8e)<0x1))throw CliErrors[_0x39b551(0xf2)](_0x39b551(0xcf));if(!_0x283a89[_0x39b551(0x114)]&&_0x309c8e!==undefined&&_0x309c8e!==null)throw CliErrors[_0x39b551(0xf2)](_0x39b551(0x13f));const _0x2088a8=_0x283a89[_0x39b551(0x114)]?Number(_0x309c8e):null;return{..._0x283a89,'sourceFingerprint':_0x2a15ae,'diagramRevision':_0x2088a8,'expectedDiagramRevision':_0x2088a8??0x0};}export async function downloadRuntimeSkillPackage(_0xf4456e,_0x207f48,_0x21a0cb,_0x3d9e80){const _0x5085e3=a108_0x57c787;void _0xf4456e;const _0x1cb53a=_0x3d9e80?_0x5085e3(0xfb)+encodeURIComponent(_0x21a0cb)+'/'+encodeURIComponent(_0x207f48)+'/versions/'+encodeURIComponent(_0x3d9e80)+_0x5085e3(0x158):'/api/cli/v1/skills/'+encodeURIComponent(_0x21a0cb)+'/'+encodeURIComponent(_0x207f48)+_0x5085e3(0x158);return skillHubBinaryRequest(_0x1cb53a);}async function publishRuntimeSkill(_0x1ea0ee,_0x3e31c4,_0x470db4){const _0x1203a6=a108_0x57c787,_0x3b6554=buildRuntimeSkillPublishForm(_0x3e31c4,_0x470db4[_0x1203a6(0x143)]),_0x42819f=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x1ea0ee)+_0x1203a6(0xfa),{'method':_0x1203a6(0xf6),'query':{'confirmWarnings':_0x470db4[_0x1203a6(0xd9)]===!![]?!![]:undefined},'body':_0x3b6554});return assertJointDiagramAcknowledged(_0x3e31c4[_0x1203a6(0xda)],_0x42819f[_0x1203a6(0x9e)],_0x1203a6(0xe5)),{'appCode':_0x42819f[_0x1203a6(0x16c)]??_0x1ea0ee,'skillCode':_0x42819f['slug']??_0x3e31c4[_0x1203a6(0x109)]??'','skillName':_0x3e31c4['skillName']??_0x42819f['slug']??_0x3e31c4[_0x1203a6(0x109)],'description':_0x3e31c4[_0x1203a6(0x124)],'scope':skillHubVisibilityToScope(_0x42819f[_0x1203a6(0x143)]??_0x470db4['visibility'])??'personal','version':_0x42819f[_0x1203a6(0xa8)]??_0x3e31c4[_0x1203a6(0xa8)],'tags':_0x3e31c4[_0x1203a6(0xff)],'content':_0x3e31c4[_0x1203a6(0x13c)],'diagramBound':_0x42819f[_0x1203a6(0x9e)]===!![]};}function assertJointDiagramAcknowledged(_0x2bd701,_0x1e0a2d,_0x172f44){const _0x3b8014=a108_0x57c787;if(!_0x2bd701||_0x1e0a2d===!![])return;throw CliErrors[_0x3b8014(0xf2)](_0x3b8014(0xe2)+_0x172f44+'.',_0x3b8014(0x148));}function buildRuntimeSkillPublishForm(_0x4ec4f9,_0x311ee1){const _0x1ba16e=a108_0x57c787,_0x3aafe9=new FormData();return _0x3aafe9[_0x1ba16e(0x14a)](_0x1ba16e(0xcd),runtimeSkillPackageFile(_0x4ec4f9)),_0x4ec4f9['skillName']?.[_0x1ba16e(0x167)]()&&_0x3aafe9['set']('displayName',_0x4ec4f9['skillName'][_0x1ba16e(0x167)]()),_0x3aafe9[_0x1ba16e(0x14a)](_0x1ba16e(0x143),_0x311ee1),_0x4ec4f9[_0x1ba16e(0xda)]&&_0x3aafe9[_0x1ba16e(0x14a)](_0x1ba16e(0xda),new Blob([JSON[_0x1ba16e(0x11e)](_0x4ec4f9[_0x1ba16e(0xda)])],{'type':_0x1ba16e(0xdc)})),_0x3aafe9;}function runtimeSkillVersionDiagramPath(_0x54551c,_0x30ed1d,_0xadb722,_0x2557b8=''){const _0x51f7cc=a108_0x57c787;return _0x51f7cc(0xfb)+encodeURIComponent(_0x54551c)+'/'+encodeURIComponent(_0x30ed1d)+_0x51f7cc(0xb1)+encodeURIComponent(_0xadb722)+_0x51f7cc(0xd8)+_0x2557b8;}function a108_0x57fd(_0x48585e,_0x111845){_0x48585e=_0x48585e-0x87;const _0x22767a=a108_0x2276();let _0x57fd27=_0x22767a[_0x48585e];return _0x57fd27;}function runtimeSkillPackageFile(_0x22fef9){const _0x190a42=a108_0x57c787;if(!_0x22fef9[_0x190a42(0x134)])throw CliErrors[_0x190a42(0xa5)](_0x190a42(0x118));const _0x3df876=Buffer[_0x190a42(0x130)](_0x22fef9[_0x190a42(0x134)],_0x190a42(0xc2)),_0x1973a4=new Blob([_0x3df876],{'type':_0x190a42(0xf7)}),_0x1f0e34=(_0x22fef9[_0x190a42(0x109)]||_0x190a42(0x11b))+_0x190a42(0x12f);if(typeof File!==_0x190a42(0x87))return new File([_0x1973a4],_0x1f0e34,{'type':_0x190a42(0xf7)});return _0x1973a4;}function normalizeSkillHubRuntimeListResponse(_0x8c97ea,_0x2a1dff,_0x2e2036,_0x41777d,_0x35a085=![]){const _0x2f645e=a108_0x57c787,_0x9dcf1a=Array[_0x2f645e(0x104)](_0x2a1dff)?_0x2a1dff:Array[_0x2f645e(0x104)](_0x2a1dff?.[_0x2f645e(0xc4)])?_0x2a1dff[_0x2f645e(0xc4)]:[],_0x52e49b=_0x41777d?.[_0x2f645e(0x167)](),_0x19ea76=_0x9dcf1a['filter'](_0x34d978=>!_0x52e49b||_0x34d978[_0x2f645e(0xc7)]===_0x52e49b)['filter'](_0x5e3003=>!_0x35a085||_0x5e3003['publishedVersion']?.[_0x2f645e(0x97)]===_0x2f645e(0x110)&&Boolean(_0x5e3003[_0x2f645e(0xfd)][_0x2f645e(0xa8)]?.[_0x2f645e(0x167)]()))['map'](skillHubRuntimeItemToRuntimeSkill)[_0x2f645e(0xc6)](_0x26b54a=>Boolean(_0x26b54a)),_0x785394=_0x19ea76['filter'](_0x389d1a=>_0x389d1a['scope']===_0x2f645e(0xdd)),_0x3bce4f=_0x19ea76['filter'](_0x39f236=>_0x39f236[_0x2f645e(0x14c)]===_0x2f645e(0x15b));return{'appCode':_0x8c97ea,'personal':_0x2e2036==='company'?[]:_0x785394,'company':_0x2e2036===_0x2f645e(0xdd)?[]:_0x3bce4f,'effective':buildEffectiveRuntimeSkills(_0x785394,_0x3bce4f,_0x2e2036)};}function skillHubRuntimeItemToRuntimeSkill(_0x5c36a0){const _0x4184f5=a108_0x57c787,_0x30bd71=_0x5c36a0[_0x4184f5(0xc7)]?.[_0x4184f5(0x167)](),_0x933832=skillHubVisibilityToScope(_0x5c36a0[_0x4184f5(0x143)]);if(!_0x30bd71||!_0x933832)return undefined;return{'id':_0x5c36a0['id'],'appCode':_0x5c36a0[_0x4184f5(0x16c)],'skillCode':_0x30bd71,'skillName':_0x5c36a0['displayName']??_0x30bd71,'description':_0x5c36a0['summary'],'example':_0x5c36a0[_0x4184f5(0xa4)],'scope':_0x933832,'version':skillHubRuntimeItemVersion(_0x5c36a0),'status':_0x5c36a0['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x5f1156){const _0x369b6d=a108_0x57c787,_0x4ce7be=_0x5f1156[_0x369b6d(0xc7)]?.[_0x369b6d(0x167)]();if(!_0x4ce7be)return undefined;return{'id':_0x5f1156['id'],'appCode':_0x5f1156[_0x369b6d(0x16c)],'skillCode':_0x4ce7be,'skillName':_0x5f1156[_0x369b6d(0xe0)]??_0x4ce7be,'description':_0x5f1156[_0x369b6d(0x101)],'example':_0x5f1156['example'],'scope':skillHubVisibilityToScope(_0x5f1156['visibility'])??_0x5f1156['visibility']?.[_0x369b6d(0x9a)](),'version':skillHubRuntimeItemVersion(_0x5f1156),'status':_0x5f1156['status']};}function skillHubVisibilityToScope(_0x59fd63){const _0x48cb08=a108_0x57c787;if(_0x59fd63===_0x48cb08(0xe8))return _0x48cb08(0xdd);if(_0x59fd63===_0x48cb08(0xb9))return'company';return undefined;}function skillHubRuntimeItemVersion(_0x5a527e){const _0x332455=a108_0x57c787;return _0x5a527e[_0x332455(0xfd)]?.[_0x332455(0xa8)]??_0x5a527e[_0x332455(0x154)]?.['version']??_0x5a527e[_0x332455(0x8e)]?.['version'];}function buildEffectiveRuntimeSkills(_0x16f9ba,_0xfe9826,_0x139c40){const _0x50924b=a108_0x57c787;if(_0x139c40==='personal')return _0x16f9ba;if(_0x139c40===_0x50924b(0x15b))return _0xfe9826;const _0x23fffd=new Map();for(const _0x53dc0b of _0xfe9826){_0x23fffd[_0x50924b(0x14a)](_0x53dc0b['skillCode'],_0x53dc0b);}for(const _0x5ea815 of _0x16f9ba){_0x23fffd[_0x50924b(0x14a)](_0x5ea815['skillCode'],_0x5ea815);}return Array['from'](_0x23fffd['values']());}function normalizeRuntimeSkillListResponse(_0x28722a,_0x23ebac){const _0x13d1f8=a108_0x57c787;if(Array[_0x13d1f8(0x104)](_0x23ebac)){const _0x2844c8=_0x23ebac[_0x13d1f8(0xc6)](_0x53a235=>_0x53a235['scope']===_0x13d1f8(0xdd)),_0x472a28=_0x23ebac['filter'](_0x3be8e4=>_0x3be8e4[_0x13d1f8(0x14c)]==='company');return{'appCode':_0x28722a,'personal':_0x2844c8,'company':_0x472a28,'effective':[..._0x472a28,..._0x2844c8]};}return{'appCode':_0x23ebac?.['appCode']??_0x28722a,'personal':Array[_0x13d1f8(0x104)](_0x23ebac?.['personal'])?_0x23ebac['personal']:[],'company':Array[_0x13d1f8(0x104)](_0x23ebac?.[_0x13d1f8(0x15b)])?_0x23ebac[_0x13d1f8(0x15b)]:[],'effective':Array[_0x13d1f8(0x104)](_0x23ebac?.[_0x13d1f8(0x13d)])?_0x23ebac[_0x13d1f8(0x13d)]:[]};}function normalizeRuntimeRoleUserList(_0x11af4c,_0x20f2eb){const _0x197a64=a108_0x57c787;if(!Array[_0x197a64(0x104)](_0x11af4c))throw CliErrors[_0x197a64(0xf2)](_0x197a64(0xbb)+_0x20f2eb+_0x197a64(0xab));return _0x11af4c[_0x197a64(0xb5)]((_0x110c21,_0x4e99da)=>{const _0x3bd0a1=_0x197a64;if(!_0x110c21||typeof _0x110c21!=='object'||Array[_0x3bd0a1(0x104)](_0x110c21))throw CliErrors[_0x3bd0a1(0xf2)](_0x3bd0a1(0xbb)+_0x20f2eb+'['+_0x4e99da+_0x3bd0a1(0x10b));const _0x3d1cf9=_0x110c21,_0xe1a4b7=normalizeRuntimeUserId(_0x3d1cf9[_0x3bd0a1(0x120)]);if(_0xe1a4b7===undefined)throw CliErrors[_0x3bd0a1(0xf2)](_0x3bd0a1(0xbb)+_0x20f2eb+'['+_0x4e99da+_0x3bd0a1(0xbe));return{..._0x3d1cf9,'userId':_0xe1a4b7};});}function normalizeRuntimeRoleUsersResponse(_0x47754a){const _0x3dbe4d=a108_0x57c787;return extractList(_0x47754a)[_0x3dbe4d(0xb5)]((_0xed3dc3,_0x1df019)=>{const _0x3bbda7=_0x3dbe4d;if(!_0xed3dc3||typeof _0xed3dc3!==_0x3bbda7(0x147)||Array[_0x3bbda7(0x104)](_0xed3dc3))throw CliErrors[_0x3bbda7(0xf2)]('Invalid\x20runtime\x20role\x20members\x20response:\x20roleList['+_0x1df019+_0x3bbda7(0x10b));const _0x8b0502=_0xed3dc3;return{..._0x8b0502,'userList':normalizeRuntimeRoleUserList(_0x8b0502[_0x3bbda7(0x150)],_0x3bbda7(0xd2)+_0x1df019+_0x3bbda7(0xc9)),..._0x8b0502[_0x3bbda7(0xf9)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x8b0502['applyUserList'],_0x3bbda7(0xd2)+_0x1df019+_0x3bbda7(0x165))}};});}export async function listRuntimeAppRoles(_0xb8089f,_0x561fb3={}){const _0xe5f10b=a108_0x57c787,_0x4a4708=_0x561fb3[_0xe5f10b(0xad)]??0x1,_0x17aece=Math[_0xe5f10b(0x136)](Math['max'](_0x561fb3[_0xe5f10b(0x144)]??0x64,0x1),0x64),_0x199133=await sdkRequest(_0xb8089f,_0xdaeed1=>_0xdaeed1['permit'][_0xe5f10b(0x141)]({..._0x561fb3[_0xe5f10b(0x140)]?{'roleName':_0x561fb3[_0xe5f10b(0x140)]}:{},'currentPage':_0x4a4708,'pageSize':_0x17aece}));return{'items':extractList(_0x199133),'paging':extractPaging(_0x199133)};}export async function createRuntimeAppRole(_0x20f17f){const _0x4b207f=a108_0x57c787;return sdkRequest(_0x20f17f['appCode'],_0x574eb0=>_0x574eb0['permit']['createRole']({'roleType':_0x4b207f(0xa9),..._0x20f17f}));}export async function updateRuntimeAppRole(_0x8755fc){const _0x25dfed=a108_0x57c787;return sdkRequest(_0x8755fc['appCode'],_0x11eea6=>_0x11eea6[_0x25dfed(0xa2)][_0x25dfed(0x91)](_0x8755fc));}export async function deleteRuntimeAppRole(_0x495dcc){const _0x117ba5=a108_0x57c787;return sdkRequest(undefined,_0x598109=>_0x598109[_0x117ba5(0xa2)][_0x117ba5(0x112)](_0x495dcc));}export async function listRuntimeRoleUsers(_0x58d6ad){const _0x4b422a=a108_0x57c787,_0x921c6b=await sdkRequest(_0x58d6ad,_0x337518=>_0x337518['permit'][_0x4b422a(0x13b)]());return normalizeRuntimeRoleUsersResponse(_0x921c6b);}export async function updateRuntimeRoleUsers(_0x26ee7b,_0x588e3b){const _0x3bd6d6=a108_0x57c787;return sdkRequest(_0x26ee7b,_0x43f254=>_0x43f254[_0x3bd6d6(0xa2)]['updateRoleUserList']({'roleList':_0x588e3b}));}export async function listRuntimeAppUsers(_0x4f0356){const _0x17ffe1=a108_0x57c787,_0x2a080c=await sdkRequest(_0x4f0356,_0x3888ef=>_0x3888ef[_0x17ffe1(0xa2)][_0x17ffe1(0xac)]());return extractList(_0x2a080c);}export async function listRuntimePermitRoles(_0x5ce105,_0x14b717={}){const _0x7577a4=a108_0x57c787,_0x5caae8=await sdkRequest(_0x5ce105,_0x825274=>_0x825274['permit'][_0x7577a4(0x166)](_0x14b717));return extractList(_0x5caae8);}export async function getRuntimePagePermit(_0x3649e9){return sdkRequest(undefined,_0x5c961f=>_0x5c961f['permit']['getPagePermit'](_0x3649e9));}export async function saveRuntimePagePermit(_0x44590f){const _0x2e1943=a108_0x57c787;return sdkRequest(_0x44590f['appCode'],_0x4fb121=>_0x4fb121[_0x2e1943(0xa2)][_0x2e1943(0x108)](_0x44590f));}export async function getRuntimeRoleMenuResources(_0x40092d,_0x3ae777){const _0x16de69=a108_0x57c787,_0x2fe710=await sdkRequest(_0x40092d,_0x27fc12=>_0x27fc12[_0x16de69(0xa2)]['getResourceMenuList']({'roleId':_0x3ae777}));return extractList(_0x2fe710);}export async function listRuntimeMenuRolePermits(_0x4edc3d){const _0x5a3dc7=a108_0x57c787,_0x3ced5e=await sdkRequest(_0x4edc3d,_0x150de4=>_0x150de4[_0x5a3dc7(0xa2)][_0x5a3dc7(0x94)]());return Array['isArray'](_0x3ced5e?.[_0x5a3dc7(0x89)])?_0x3ced5e[_0x5a3dc7(0x89)]:[];}export async function saveRuntimeMenuRolePermits(_0x145f25,_0x635db7){const _0x38cc83=a108_0x57c787;return sdkRequest(_0x145f25,_0x25baa7=>_0x25baa7[_0x38cc83(0xa2)][_0x38cc83(0x119)]({'permitList':_0x635db7}));}export async function listRuntimeDatasetPermits(_0x20fbee,_0x45ecdf){const _0x190520=a108_0x57c787,_0x5e42e7=await sdkRequest(_0x20fbee,_0x510f5e=>_0x510f5e[_0x190520(0xa2)][_0x190520(0xb3)](_0x45ecdf));return Array[_0x190520(0x104)](_0x5e42e7?.[_0x190520(0x89)])?_0x5e42e7[_0x190520(0x89)]:[];}export async function listRuntimeDatasetRolePermits(_0x3544dd){const _0x4f4911=a108_0x57c787,_0x2c271a=await sdkRequest(_0x3544dd,_0x44a9d6=>_0x44a9d6['permit'][_0x4f4911(0xae)]());return Array[_0x4f4911(0x104)](_0x2c271a?.[_0x4f4911(0x89)])?_0x2c271a[_0x4f4911(0x89)]:[];}export async function saveRuntimeDatasetRolePermits(_0x4fb21d,_0x1888c4){const _0x29beb1=a108_0x57c787;return sdkRequest(_0x4fb21d,_0x32a9a4=>_0x32a9a4['permit'][_0x29beb1(0x9d)]({'permitList':_0x1888c4}));}
|