@treasuredata/tdx 2026.8.1 → 2026.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-campaign-pull-command.js +1 -1
  25. package/dist/commands/engage-campaign-push-command.js +1 -1
  26. package/dist/commands/engage-campaign-validate-command.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/engage-template-pull-command.js +1 -1
  29. package/dist/commands/engage-template-push-command.js +1 -1
  30. package/dist/commands/engage-template-validate-command.js +1 -1
  31. package/dist/commands/job-command.js +1 -1
  32. package/dist/commands/journey-command.js +1 -1
  33. package/dist/commands/journey-validate-command.js +1 -1
  34. package/dist/commands/llm-command.js +1 -1
  35. package/dist/commands/mcp-command.js +1 -1
  36. package/dist/commands/parent-segment-command.js +1 -1
  37. package/dist/commands/policy-command.js +1 -1
  38. package/dist/commands/profile-command.js +1 -1
  39. package/dist/commands/profiles-command.js +1 -1
  40. package/dist/commands/query-command.js +1 -1
  41. package/dist/commands/schedule-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-move-command.js +1 -1
  46. package/dist/commands/segment-pull-command.js +1 -1
  47. package/dist/commands/segment-push-command.js +1 -1
  48. package/dist/commands/segment-update-command.js +1 -1
  49. package/dist/commands/segment-use-command.js +1 -1
  50. package/dist/commands/segment-validate-command.js +1 -1
  51. package/dist/commands/segments.js +1 -1
  52. package/dist/commands/show.js +1 -1
  53. package/dist/commands/status-command.js +1 -1
  54. package/dist/commands/table-deleted.js +1 -1
  55. package/dist/commands/tables.js +1 -1
  56. package/dist/commands/unset-command.js +1 -1
  57. package/dist/commands/upgrade-command.js +1 -1
  58. package/dist/commands/use-command.js +1 -1
  59. package/dist/commands/user-command.js +1 -1
  60. package/dist/commands/work-command.js +1 -1
  61. package/dist/commands/workflow-command.js +1 -1
  62. package/dist/core/auth.js +1 -1
  63. package/dist/core/command-output.js +1 -1
  64. package/dist/core/config.js +1 -1
  65. package/dist/core/connection-cache.js +1 -1
  66. package/dist/core/constants.js +1 -1
  67. package/dist/core/credential-cache.js +1 -1
  68. package/dist/core/global-context.js +1 -1
  69. package/dist/core/keychain.js +1 -1
  70. package/dist/core/oauth-keychain.js +1 -1
  71. package/dist/core/oauth.js +1 -1
  72. package/dist/core/profile.js +1 -1
  73. package/dist/core/project-config.js +1 -1
  74. package/dist/core/session.js +1 -1
  75. package/dist/core/site-mismatch.js +1 -1
  76. package/dist/core/user-cache.js +1 -1
  77. package/dist/core/version.js +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/mcp/server.js +1 -1
  80. package/dist/mcp/tools/index.js +1 -1
  81. package/dist/mcp/tools/tdx-run.js +1 -1
  82. package/dist/mcp/tools/tdx-search.js +1 -1
  83. package/dist/mcp/tools/work-create-item.js +1 -1
  84. package/dist/mcp/utils.js +1 -1
  85. package/dist/proxy/claude-usage-tracker.js +1 -1
  86. package/dist/proxy/passthrough-server.js +1 -1
  87. package/dist/proxy/sse-usage-parser.js +1 -1
  88. package/dist/sdk/agent/agent-config.js +1 -1
  89. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  90. package/dist/sdk/agent/agent-yaml.js +1 -1
  91. package/dist/sdk/agent/test/evaluator.js +1 -1
  92. package/dist/sdk/agent/test/executor.js +1 -1
  93. package/dist/sdk/agent/test/index.js +1 -1
  94. package/dist/sdk/agent/test/output.js +1 -1
  95. package/dist/sdk/agent/test/parser.js +1 -1
  96. package/dist/sdk/agent/tool-target-registry.js +1 -1
  97. package/dist/sdk/api.js +1 -1
  98. package/dist/sdk/auth-token.js +1 -1
  99. package/dist/sdk/cas/cas-api-client.d.ts +9 -3
  100. package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
  101. package/dist/sdk/cas/cas-api-client.js +1 -1
  102. package/dist/sdk/cas/cas-api-client.js.map +1 -1
  103. package/dist/sdk/cas/cas-audience-schema.d.ts +2 -0
  104. package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -1
  105. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  106. package/dist/sdk/cas/cas-audience-schema.js.map +1 -1
  107. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  108. package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
  109. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  110. package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
  111. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  112. package/dist/sdk/cas/index.d.ts +10 -0
  113. package/dist/sdk/cas/index.d.ts.map +1 -1
  114. package/dist/sdk/cas/index.js +1 -1
  115. package/dist/sdk/cas/index.js.map +1 -1
  116. package/dist/sdk/cas/pull-workflow.js +1 -1
  117. package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
  118. package/dist/sdk/cas/push-workflow.js +1 -1
  119. package/dist/sdk/cas/push-workflow.js.map +1 -1
  120. package/dist/sdk/cas/types.d.ts +2 -0
  121. package/dist/sdk/cas/types.d.ts.map +1 -1
  122. package/dist/sdk/cas/validate-files.js +1 -1
  123. package/dist/sdk/client/cdp-api-client.js +1 -1
  124. package/dist/sdk/client/delivery-api-client.js +1 -1
  125. package/dist/sdk/client/endpoints.js +1 -1
  126. package/dist/sdk/client/engage-api-client.js +1 -1
  127. package/dist/sdk/client/http-client.js +1 -1
  128. package/dist/sdk/client/llm-api-client.js +1 -1
  129. package/dist/sdk/client/oauth-refresh.js +1 -1
  130. package/dist/sdk/client/rate-limiter.js +1 -1
  131. package/dist/sdk/client/td-api-client.js +1 -1
  132. package/dist/sdk/client/trino-api-client.js +1 -1
  133. package/dist/sdk/client/workflow-client.js +1 -1
  134. package/dist/sdk/connection-validator.js +1 -1
  135. package/dist/sdk/connection.js +1 -1
  136. package/dist/sdk/delivery.js +1 -1
  137. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  138. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  139. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  140. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  141. package/dist/sdk/engage/campaign-pull.js +1 -1
  142. package/dist/sdk/engage/campaign-push.js +1 -1
  143. package/dist/sdk/engage/campaign-validator.js +1 -1
  144. package/dist/sdk/engage/campaign-yaml.js +1 -1
  145. package/dist/sdk/engage/template-pull.js +1 -1
  146. package/dist/sdk/engage/template-push.js +1 -1
  147. package/dist/sdk/engage/template-validator.js +1 -1
  148. package/dist/sdk/engage/template-yaml.js +1 -1
  149. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  150. package/dist/sdk/engage/types/campaign-def.js +1 -1
  151. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  152. package/dist/sdk/engage/types/template-schema.js +1 -1
  153. package/dist/sdk/engage.js +1 -1
  154. package/dist/sdk/errors.js +1 -1
  155. package/dist/sdk/index.js +1 -1
  156. package/dist/sdk/io/index.js +1 -1
  157. package/dist/sdk/io/node-filesystem.js +1 -1
  158. package/dist/sdk/job.js +1 -1
  159. package/dist/sdk/journey.js +1 -1
  160. package/dist/sdk/llm/chat-cache.js +1 -1
  161. package/dist/sdk/llm/index.js +1 -1
  162. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  163. package/dist/sdk/llm/model-factors.js +1 -1
  164. package/dist/sdk/llm/user-settings.js +1 -1
  165. package/dist/sdk/personalization.js +1 -1
  166. package/dist/sdk/policy.js +1 -1
  167. package/dist/sdk/query/deleted-table-validation.js +1 -1
  168. package/dist/sdk/query/index.js +1 -1
  169. package/dist/sdk/query/sql-parser.js +1 -1
  170. package/dist/sdk/realtime.js +1 -1
  171. package/dist/sdk/schedule.js +1 -1
  172. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  173. package/dist/sdk/segment/fields-display.js +1 -1
  174. package/dist/sdk/segment/file-discovery.js +1 -1
  175. package/dist/sdk/segment/journey-utils.js +1 -1
  176. package/dist/sdk/segment/journey-validator.js +1 -1
  177. package/dist/sdk/segment/journey-yaml.js +1 -1
  178. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  179. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  180. package/dist/sdk/segment/pull-workflow.js +1 -1
  181. package/dist/sdk/segment/push-recovery.js +1 -1
  182. package/dist/sdk/segment/push-workflow.js +1 -1
  183. package/dist/sdk/segment/resolution-context.js +1 -1
  184. package/dist/sdk/segment/segment-path-parser.js +1 -1
  185. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  186. package/dist/sdk/segment/segment-validator.js +1 -1
  187. package/dist/sdk/segment/target-resolution.js +1 -1
  188. package/dist/sdk/segment/tdx-config.js +1 -1
  189. package/dist/sdk/segment/types/activation-schema.js +1 -1
  190. package/dist/sdk/segment/types/journey-def.js +1 -1
  191. package/dist/sdk/segment/types/journey-schema.js +1 -1
  192. package/dist/sdk/segment/types/segment-def.js +1 -1
  193. package/dist/sdk/segment/types/segment-schema.js +1 -1
  194. package/dist/sdk/segment/validate-files.js +1 -1
  195. package/dist/sdk/segment/yaml-validator.js +1 -1
  196. package/dist/sdk/segment.js +1 -1
  197. package/dist/sdk/types/cas.d.ts +4 -0
  198. package/dist/sdk/types/cas.d.ts.map +1 -1
  199. package/dist/sdk/types/index.js +1 -1
  200. package/dist/sdk/types/progress.js +1 -1
  201. package/dist/sdk/types/workspace.js +1 -1
  202. package/dist/sdk/user.js +1 -1
  203. package/dist/sdk/util/format-detector.js +1 -1
  204. package/dist/sdk/util/formatters.js +1 -1
  205. package/dist/sdk/util/index.js +1 -1
  206. package/dist/sdk/util/paginate.js +1 -1
  207. package/dist/sdk/util/tree-formatter.js +1 -1
  208. package/dist/sdk/util/tree-search.js +1 -1
  209. package/dist/sdk/workflow/archive-validation.js +1 -1
  210. package/dist/sdk/workflow/clone-workflow.js +1 -1
  211. package/dist/sdk/workflow/index.js +1 -1
  212. package/dist/sdk/workflow/pull-workflow.js +1 -1
  213. package/dist/sdk/workflow/push-workflow.js +1 -1
  214. package/dist/sdk/workflow/task-graph.js +1 -1
  215. package/dist/sdk/workflow/tdx-config.js +1 -1
  216. package/dist/sdk/workflow/workflow-utils.js +1 -1
  217. package/dist/sdk/workspace/access-tracker.js +1 -1
  218. package/dist/sdk/workspace/frontmatter.js +1 -1
  219. package/dist/sdk/workspace/git.js +1 -1
  220. package/dist/sdk/workspace/index.js +1 -1
  221. package/dist/sdk/workspace/templates.js +1 -1
  222. package/dist/sdk/workspace/weekly.js +1 -1
  223. package/dist/sdk/workspace/wikilinks.js +1 -1
  224. package/dist/test-utils/command-runner.js +1 -1
  225. package/dist/test-utils/factories.js +1 -1
  226. package/dist/test-utils/fixtures.js +1 -1
  227. package/dist/test-utils/http-mock.js +1 -1
  228. package/dist/test-utils/index.js +1 -1
  229. package/dist/utils/async.js +1 -1
  230. package/dist/utils/claude-code-state.js +1 -1
  231. package/dist/utils/colors.js +1 -1
  232. package/dist/utils/diff.js +1 -1
  233. package/dist/utils/file-permissions.js +1 -1
  234. package/dist/utils/file-reader.js +1 -1
  235. package/dist/utils/github-releases.js +1 -1
  236. package/dist/utils/global-cache.js +1 -1
  237. package/dist/utils/json-loader.js +1 -1
  238. package/dist/utils/local-cache.js +1 -1
  239. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  240. package/dist/utils/logger/formatters/index.js +1 -1
  241. package/dist/utils/logger/handlers/console-handler.js +1 -1
  242. package/dist/utils/logger/handlers/file-handler.js +1 -1
  243. package/dist/utils/logger/handlers/index.js +1 -1
  244. package/dist/utils/logger/handlers/null-handler.js +1 -1
  245. package/dist/utils/logger/index.js +1 -1
  246. package/dist/utils/logger/logger.js +1 -1
  247. package/dist/utils/logger/types.js +1 -1
  248. package/dist/utils/option-validation.js +1 -1
  249. package/dist/utils/process.js +1 -1
  250. package/dist/utils/prompt.js +1 -1
  251. package/dist/utils/proxy-fetch.js +1 -1
  252. package/dist/utils/spinner.js +1 -1
  253. package/dist/utils/sse-parser.js +1 -1
  254. package/dist/utils/string-utils.js +1 -1
  255. package/dist/utils/table-ref-parser.js +1 -1
  256. package/dist/utils/tdx-logger.js +1 -1
  257. package/dist/utils/version-check.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- function a149_0x114a(_0x5159cf,_0x4eda84){_0x5159cf=_0x5159cf-0x11a;const _0x37bf3d=a149_0x37bf();let _0x114ab6=_0x37bf3d[_0x5159cf];return _0x114ab6;}(function(_0x5b967b,_0x160b2d){const _0x421ea9=a149_0x114a,_0x360589=_0x5b967b();while(!![]){try{const _0x403b1f=parseInt(_0x421ea9(0x11f))/0x1*(parseInt(_0x421ea9(0x125))/0x2)+parseInt(_0x421ea9(0x127))/0x3+parseInt(_0x421ea9(0x123))/0x4*(parseInt(_0x421ea9(0x11d))/0x5)+-parseInt(_0x421ea9(0x11b))/0x6+parseInt(_0x421ea9(0x126))/0x7+-parseInt(_0x421ea9(0x122))/0x8+parseInt(_0x421ea9(0x121))/0x9*(parseInt(_0x421ea9(0x11c))/0xa);if(_0x403b1f===_0x160b2d)break;else _0x360589['push'](_0x360589['shift']());}catch(_0x10fe26){_0x360589['push'](_0x360589['shift']());}}}(a149_0x37bf,0x1e655));function a149_0x37bf(){const _0xfe1f5a=['149874sCVNOS','473074fnTnjP','36153ygLjNC','map','get','732654QwJHjj','109820fLvmhu','719135QrAqyt','targetKnowledgeBaseId','1nLFhnJ','targetAgentId','135drywHI','1732136slvwCV','4HGhVnu','1.0'];a149_0x37bf=function(){return _0xfe1f5a;};return a149_0x37bf();}export function canCreateAgent(_0xc84f39,_0x3365cf){const _0x2eaf24=a149_0x114a;for(const _0x5819e8 of _0xc84f39['attributes']['tools']){if(_0x5819e8[_0x2eaf24(0x120)]&&!_0x3365cf['has'](_0x5819e8[_0x2eaf24(0x120)]))return![];}return!![];}export function remapToolIds(_0x3028f2,_0x1b6684,_0x2c8244){const _0x171d21=a149_0x114a;return _0x3028f2[_0x171d21(0x128)](_0x3b5a7e=>({..._0x3b5a7e,'targetKnowledgeBaseId':_0x3b5a7e[_0x171d21(0x11e)]?_0x1b6684[_0x171d21(0x11a)](_0x3b5a7e['targetKnowledgeBaseId'])||_0x3b5a7e[_0x171d21(0x11e)]:undefined,'targetAgentId':_0x3b5a7e['targetAgentId']?_0x2c8244[_0x171d21(0x11a)](_0x3b5a7e[_0x171d21(0x120)])||_0x3b5a7e[_0x171d21(0x120)]:undefined}));}export function remapVariableIds(_0x5adfc0,_0x1a4dfd){const _0x1919a3=a149_0x114a;return _0x5adfc0[_0x1919a3(0x128)](_0x2f704e=>({..._0x2f704e,'targetKnowledgeBaseId':_0x1a4dfd[_0x1919a3(0x11a)](_0x2f704e['targetKnowledgeBaseId'])||_0x2f704e['targetKnowledgeBaseId']}));}export function isSupportedBackupVersion(_0x2f72d4){const _0x579612=a149_0x114a;return _0x2f72d4===_0x579612(0x124);}
1
+ (function(_0xf2046d,_0x3ac3a8){const _0x363d92=a149_0x240e,_0x55c8a0=_0xf2046d();while(!![]){try{const _0x211122=-parseInt(_0x363d92(0x1dc))/0x1*(parseInt(_0x363d92(0x1d9))/0x2)+-parseInt(_0x363d92(0x1db))/0x3+parseInt(_0x363d92(0x1d6))/0x4+-parseInt(_0x363d92(0x1d5))/0x5+-parseInt(_0x363d92(0x1e3))/0x6+parseInt(_0x363d92(0x1e2))/0x7+-parseInt(_0x363d92(0x1dd))/0x8*(-parseInt(_0x363d92(0x1d8))/0x9);if(_0x211122===_0x3ac3a8)break;else _0x55c8a0['push'](_0x55c8a0['shift']());}catch(_0xdc06f1){_0x55c8a0['push'](_0x55c8a0['shift']());}}}(a149_0x4899,0xe406c));function a149_0x240e(_0x5a203a,_0x24c19d){_0x5a203a=_0x5a203a-0x1d5;const _0x48998e=a149_0x4899();let _0x240ece=_0x48998e[_0x5a203a];return _0x240ece;}export function canCreateAgent(_0x3e7620,_0x344dca){const _0x1277d3=a149_0x240e;for(const _0x4baca0 of _0x3e7620[_0x1277d3(0x1e1)][_0x1277d3(0x1e0)]){if(_0x4baca0[_0x1277d3(0x1e4)]&&!_0x344dca[_0x1277d3(0x1df)](_0x4baca0[_0x1277d3(0x1e4)]))return![];}return!![];}export function remapToolIds(_0x2b9c54,_0x3d2c58,_0xe734b3){const _0xcd954e=a149_0x240e;return _0x2b9c54[_0xcd954e(0x1de)](_0x5e5d83=>({..._0x5e5d83,'targetKnowledgeBaseId':_0x5e5d83[_0xcd954e(0x1d7)]?_0x3d2c58[_0xcd954e(0x1da)](_0x5e5d83[_0xcd954e(0x1d7)])||_0x5e5d83[_0xcd954e(0x1d7)]:undefined,'targetAgentId':_0x5e5d83[_0xcd954e(0x1e4)]?_0xe734b3[_0xcd954e(0x1da)](_0x5e5d83['targetAgentId'])||_0x5e5d83[_0xcd954e(0x1e4)]:undefined}));}export function remapVariableIds(_0x2f3103,_0xef4b1d){const _0x397f79=a149_0x240e;return _0x2f3103[_0x397f79(0x1de)](_0x23c264=>({..._0x23c264,'targetKnowledgeBaseId':_0xef4b1d['get'](_0x23c264['targetKnowledgeBaseId'])||_0x23c264[_0x397f79(0x1d7)]}));}function a149_0x4899(){const _0xc3de2e=['has','tools','attributes','5240102SqEtrn','3066534CyUiWM','targetAgentId','7588015JbFGGE','2489256DzpeOz','targetKnowledgeBaseId','117kiWprd','772006YxWArs','get','2924325yxAskD','2MmPxgt','2054504FQTRuk','map'];a149_0x4899=function(){return _0xc3de2e;};return a149_0x4899();}export function isSupportedBackupVersion(_0xb41bc0){return _0xb41bc0==='1.0';}
@@ -1 +1 @@
1
- (function(_0x2bcb03,_0x5909e9){const _0x2fa00c=a150_0x11df,_0x4b37bc=_0x2bcb03();while(!![]){try{const _0x3ecd1e=-parseInt(_0x2fa00c(0x1a5))/0x1*(-parseInt(_0x2fa00c(0x1d4))/0x2)+-parseInt(_0x2fa00c(0x1bb))/0x3*(-parseInt(_0x2fa00c(0x1b6))/0x4)+-parseInt(_0x2fa00c(0x1aa))/0x5+parseInt(_0x2fa00c(0x1b3))/0x6+parseInt(_0x2fa00c(0x1a9))/0x7+parseInt(_0x2fa00c(0x1ca))/0x8*(-parseInt(_0x2fa00c(0x1d2))/0x9)+-parseInt(_0x2fa00c(0x1a6))/0xa*(parseInt(_0x2fa00c(0x1c6))/0xb);if(_0x3ecd1e===_0x5909e9)break;else _0x4b37bc['push'](_0x4b37bc['shift']());}catch(_0x3b7058){_0x4b37bc['push'](_0x4b37bc['shift']());}}}(a150_0x145e,0x55c17));export const LONG_CONTEXT_THRESHOLD_TOKENS=0x42680;function a150_0x11df(_0x47544c,_0x5cbd85){_0x47544c=_0x47544c-0x1a0;const _0x145ec2=a150_0x145e();let _0x11dfb3=_0x145ec2[_0x47544c];return _0x11dfb3;}export const MODEL_PRICING={'claude-opus-4-6':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'claude-opus-4-5-20251101':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'opus':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'opus[1m]':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'claude-sonnet-4-5-20250929':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'sonnet':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'sonnet[1m]':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'claude-haiku-4-5-20251001':{'inputPricePerMTok':0x1,'outputPricePerMTok':0x5,'cacheWritePricePerMTok':1.25,'cacheReadPricePerMTok':0.1},'haiku':{'inputPricePerMTok':0x1,'outputPricePerMTok':0x5,'cacheWritePricePerMTok':1.25,'cacheReadPricePerMTok':0.1},'gpt-5.6-sol':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x1e,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'gpt-5.6-terra':{'inputPricePerMTok':0x2,'outputPricePerMTok':0xc,'cacheWritePricePerMTok':2.5,'cacheReadPricePerMTok':0.2},'gpt-5.6-luna':{'inputPricePerMTok':0.2,'outputPricePerMTok':1.2,'cacheWritePricePerMTok':0.25,'cacheReadPricePerMTok':0.02},'gpt-5.5':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x1e,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.5},'gpt-5.5-pro':{'inputPricePerMTok':0x1e,'outputPricePerMTok':0xb4,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x0},'gpt-5.4':{'inputPricePerMTok':2.5,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.25},'gpt-5.4-mini':{'inputPricePerMTok':0.75,'outputPricePerMTok':4.5,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.075},'gpt-5.4-nano':{'inputPricePerMTok':0.2,'outputPricePerMTok':1.25,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.02},'gpt-image-2':{'inputPricePerMTok':0x8,'outputPricePerMTok':0x1e,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x2}};export const LONG_CONTEXT_PRICING={'gpt-5.6-sol':{'inputPricePerMTok':0xa,'outputPricePerMTok':0x2d,'cacheWritePricePerMTok':12.5,'cacheReadPricePerMTok':0x1},'gpt-5.6-terra':{'inputPricePerMTok':0x4,'outputPricePerMTok':0x12,'cacheWritePricePerMTok':0x5,'cacheReadPricePerMTok':0.4},'gpt-5.6-luna':{'inputPricePerMTok':0.4,'outputPricePerMTok':1.8,'cacheWritePricePerMTok':0.5,'cacheReadPricePerMTok':0.04},'gpt-5.5':{'inputPricePerMTok':0xa,'outputPricePerMTok':0x2d,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x1},'gpt-5.5-pro':{'inputPricePerMTok':0x3c,'outputPricePerMTok':0x10e,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x0},'gpt-5.4':{'inputPricePerMTok':0x5,'outputPricePerMTok':22.5,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.5}};export const EXTENDED_CONTEXT_PRICING={'inputPricePerMTok':0x6,'outputPricePerMTok':22.5,'cacheWritePricePerMTok':7.5,'cacheReadPricePerMTok':0.6};export const USD_PER_AI_CREDIT=102.32;export const CONTEXT_LIMITS={'sonnet':0xf4240,'sonnet[1m]':0xf4240,'haiku':0x30d40,'opus':0xf4240,'opus[1m]':0xf4240,'default':0x30d40};export function getModelPricing(_0x12d69a,_0xfc93c5){const _0x1bd9ce=a150_0x11df,_0xc9eae8=_0x12d69a['toLowerCase']();if(_0xfc93c5!==undefined&&_0xfc93c5>LONG_CONTEXT_THRESHOLD_TOKENS){if(LONG_CONTEXT_PRICING[_0xc9eae8])return LONG_CONTEXT_PRICING[_0xc9eae8];if(_0xc9eae8['includes'](_0x1bd9ce(0x1b2)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1b2)];if(_0xc9eae8['includes'](_0x1bd9ce(0x1c8)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1c8)];if(_0xc9eae8['includes'](_0x1bd9ce(0x1c1)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1c1)];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1d1)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1b2)];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1b7)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1b7)];if(_0xc9eae8['includes'](_0x1bd9ce(0x1a8)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1a8)];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1af))&&!_0xc9eae8[_0x1bd9ce(0x1a7)]('mini')&&!_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1ab)))return LONG_CONTEXT_PRICING[_0x1bd9ce(0x1af)];}if(MODEL_PRICING[_0xc9eae8])return MODEL_PRICING[_0xc9eae8];if(_0xc9eae8['includes'](_0x1bd9ce(0x1b2)))return MODEL_PRICING[_0x1bd9ce(0x1b2)];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1c8)))return MODEL_PRICING[_0x1bd9ce(0x1c8)];if(_0xc9eae8[_0x1bd9ce(0x1a7)]('gpt-5.6-luna'))return MODEL_PRICING[_0x1bd9ce(0x1c1)];if(_0xc9eae8[_0x1bd9ce(0x1a7)]('gpt-5.6'))return MODEL_PRICING['gpt-5.6-sol'];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1b7)))return MODEL_PRICING[_0x1bd9ce(0x1b7)];if(_0xc9eae8[_0x1bd9ce(0x1a7)]('gpt-5.5'))return MODEL_PRICING['gpt-5.5'];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1b8)))return MODEL_PRICING['gpt-5.4-nano'];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1b1)))return MODEL_PRICING['gpt-5.4-mini'];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1af)))return MODEL_PRICING[_0x1bd9ce(0x1af)];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1a2)))return MODEL_PRICING['opus'];if(_0xc9eae8[_0x1bd9ce(0x1a7)](_0x1bd9ce(0x1cb)))return MODEL_PRICING[_0x1bd9ce(0x1cb)];if(_0xc9eae8['includes'](_0x1bd9ce(0x1c3)))return MODEL_PRICING[_0x1bd9ce(0x1c3)];return MODEL_PRICING[_0x1bd9ce(0x1cb)];}export function calculateTokenCost(_0x5a5d6d,_0x3175dc,_0x4db713,_0x1bc7a0,_0x1c8d9b){const _0x1be19f=a150_0x11df,_0x25fa68=0xf4240;return _0x5a5d6d*_0x1c8d9b[_0x1be19f(0x1c7)]/_0x25fa68+_0x3175dc*_0x1c8d9b[_0x1be19f(0x1a1)]/_0x25fa68+_0x4db713*_0x1c8d9b[_0x1be19f(0x1c5)]/_0x25fa68+_0x1bc7a0*_0x1c8d9b[_0x1be19f(0x1bf)]/_0x25fa68;}export function usdToAiCredits(_0x28b0aa){return _0x28b0aa/USD_PER_AI_CREDIT;}export function calculateCreditsFromTokens(_0x49070c,_0x65fa9,_0x4f115b,_0x3fd742,_0x589ea1){const _0x3e8b47=_0x49070c+_0x4f115b+_0x3fd742,_0x23c93a=getModelPricing(_0x589ea1,_0x3e8b47),_0x5b03a1=calculateTokenCost(_0x49070c,_0x65fa9,_0x4f115b,_0x3fd742,_0x23c93a);return usdToAiCredits(_0x5b03a1);}export function getContextLimit(_0x2e7837){const _0x370bb5=a150_0x11df;if(CONTEXT_LIMITS[_0x2e7837])return CONTEXT_LIMITS[_0x2e7837];const _0x18032e=_0x2e7837[_0x370bb5(0x1ac)]();if(_0x18032e[_0x370bb5(0x1a7)](_0x370bb5(0x1a2)))return CONTEXT_LIMITS[_0x370bb5(0x1a2)];if(_0x18032e[_0x370bb5(0x1a7)](_0x370bb5(0x1cb)))return CONTEXT_LIMITS[_0x370bb5(0x1cb)];if(_0x18032e[_0x370bb5(0x1a7)](_0x370bb5(0x1c3)))return CONTEXT_LIMITS[_0x370bb5(0x1c3)];return CONTEXT_LIMITS['default'];}function a150_0x145e(){const _0x4917b4=['4-7','Opus\x205','cacheReadPricePerMTok','sonnet-5','gpt-5.6-luna','GPT-5.4','haiku','4-5','cacheWritePricePerMTok','305437giVCbF','inputPricePerMTok','gpt-5.6-terra','4.8','104GEGjhw','sonnet','Sonnet\x204.5','Opus\x204.7','Sonnet\x204','Haiku\x204','en-US','gpt-5.6','339030bDXgMh','toLocaleString','974926OWHtCc','4.5','outputPricePerMTok','opus','Sonnet\x204.6','Haiku\x204.5','1bFISkJ','160wiWeyj','includes','gpt-5.5','3564806kQwcQs','1373695bGoISj','nano','toLowerCase','Opus\x204.8','GPT-5.4\x20nano','gpt-5.4','4.6','gpt-5.4-mini','gpt-5.6-sol','1230846DQJVnw','4-6','4-8','4YwgUiw','gpt-5.5-pro','gpt-5.4-nano','Sonnet\x205','Claude','1074342LPlXzz','4.7'];a150_0x145e=function(){return _0x4917b4;};return a150_0x145e();}export function getModelDisplayName(_0x4636ac){const _0x3803ec=a150_0x11df,_0x76d44b=_0x4636ac[_0x3803ec(0x1ac)]();if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1a8)))return'GPT-5.5';if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1af))){if(_0x76d44b[_0x3803ec(0x1a7)]('nano'))return _0x3803ec(0x1ae);if(_0x76d44b[_0x3803ec(0x1a7)]('mini'))return'GPT-5.4\x20mini';return _0x3803ec(0x1c2);}if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1cb))){if(_0x76d44b['includes'](_0x3803ec(0x1c0)))return _0x3803ec(0x1b9);if(_0x76d44b[_0x3803ec(0x1a7)]('4-6')||_0x76d44b['includes'](_0x3803ec(0x1b0)))return _0x3803ec(0x1a3);if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1c4))||_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1a0)))return _0x3803ec(0x1cc);return _0x3803ec(0x1ce);}if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1c3))){if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1c4))||_0x76d44b[_0x3803ec(0x1a7)]('4.5'))return _0x3803ec(0x1a4);return _0x3803ec(0x1cf);}if(_0x76d44b['includes']('opus')){if(_0x76d44b[_0x3803ec(0x1a7)]('opus-5'))return _0x3803ec(0x1be);if(_0x76d44b['includes'](_0x3803ec(0x1b5))||_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1c9)))return _0x3803ec(0x1ad);if(_0x76d44b['includes'](_0x3803ec(0x1bd))||_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1bc)))return _0x3803ec(0x1cd);if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1b4))||_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1b0)))return'Opus\x204.6';if(_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1c4))||_0x76d44b[_0x3803ec(0x1a7)](_0x3803ec(0x1a0)))return'Opus\x204.5';return'Opus\x204';}return _0x3803ec(0x1ba);}export function formatTokenCount(_0x4283df){const _0x15928a=a150_0x11df;return _0x4283df[_0x15928a(0x1d3)](_0x15928a(0x1d0));}
1
+ (function(_0x191a3b,_0x292b01){const _0x4a03cc=a150_0x5dfb,_0x51fa53=_0x191a3b();while(!![]){try{const _0x46ae6f=-parseInt(_0x4a03cc(0x1bd))/0x1+parseInt(_0x4a03cc(0x19b))/0x2+-parseInt(_0x4a03cc(0x199))/0x3+parseInt(_0x4a03cc(0x197))/0x4+-parseInt(_0x4a03cc(0x1a5))/0x5+-parseInt(_0x4a03cc(0x1a4))/0x6*(parseInt(_0x4a03cc(0x198))/0x7)+-parseInt(_0x4a03cc(0x1b7))/0x8;if(_0x46ae6f===_0x292b01)break;else _0x51fa53['push'](_0x51fa53['shift']());}catch(_0x3bff80){_0x51fa53['push'](_0x51fa53['shift']());}}}(a150_0x3ebb,0x4adc7));function a150_0x3ebb(){const _0x4e9844=['gpt-5.6-luna','Sonnet\x204.5','4.5','Sonnet\x205','gpt-5.4','Haiku\x204','sonnet-5','mini','toLocaleString','includes','inputPricePerMTok','GPT-5.4','gpt-5.6-sol','2545640hlwSMO','4-5','gpt-5.5-pro','sonnet','haiku','cacheWritePricePerMTok','10427EdCYyL','nano','en-US','cacheReadPricePerMTok','Sonnet\x204.6','Opus\x205','Opus\x204.7','outputPricePerMTok','Opus\x204','4.6','opus-5','4-6','gpt-5.4-nano','2439788tEAXCZ','1811243nuvgMj','319968xgsKGe','toLowerCase','1090040URXyjg','opus','gpt-5.4-mini','Claude','Opus\x204.6','GPT-5.4\x20nano','default','4.7','gpt-5.6-terra','6XytSIF','771495EDBFGJ','Opus\x204.8','GPT-5.4\x20mini','gpt-5.6','gpt-5.5'];a150_0x3ebb=function(){return _0x4e9844;};return a150_0x3ebb();}export const LONG_CONTEXT_THRESHOLD_TOKENS=0x42680;export const MODEL_PRICING={'claude-opus-4-6':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'claude-opus-4-5-20251101':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'opus':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'opus[1m]':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'claude-sonnet-4-5-20250929':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'sonnet':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'sonnet[1m]':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'claude-haiku-4-5-20251001':{'inputPricePerMTok':0x1,'outputPricePerMTok':0x5,'cacheWritePricePerMTok':1.25,'cacheReadPricePerMTok':0.1},'haiku':{'inputPricePerMTok':0x1,'outputPricePerMTok':0x5,'cacheWritePricePerMTok':1.25,'cacheReadPricePerMTok':0.1},'gpt-5.6-sol':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x1e,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'gpt-5.6-terra':{'inputPricePerMTok':0x2,'outputPricePerMTok':0xc,'cacheWritePricePerMTok':2.5,'cacheReadPricePerMTok':0.2},'gpt-5.6-luna':{'inputPricePerMTok':0.2,'outputPricePerMTok':1.2,'cacheWritePricePerMTok':0.25,'cacheReadPricePerMTok':0.02},'gpt-5.5':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x1e,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.5},'gpt-5.5-pro':{'inputPricePerMTok':0x1e,'outputPricePerMTok':0xb4,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x0},'gpt-5.4':{'inputPricePerMTok':2.5,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.25},'gpt-5.4-mini':{'inputPricePerMTok':0.75,'outputPricePerMTok':4.5,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.075},'gpt-5.4-nano':{'inputPricePerMTok':0.2,'outputPricePerMTok':1.25,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.02},'gpt-image-2':{'inputPricePerMTok':0x8,'outputPricePerMTok':0x1e,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x2}};export const LONG_CONTEXT_PRICING={'gpt-5.6-sol':{'inputPricePerMTok':0xa,'outputPricePerMTok':0x2d,'cacheWritePricePerMTok':12.5,'cacheReadPricePerMTok':0x1},'gpt-5.6-terra':{'inputPricePerMTok':0x4,'outputPricePerMTok':0x12,'cacheWritePricePerMTok':0x5,'cacheReadPricePerMTok':0.4},'gpt-5.6-luna':{'inputPricePerMTok':0.4,'outputPricePerMTok':1.8,'cacheWritePricePerMTok':0.5,'cacheReadPricePerMTok':0.04},'gpt-5.5':{'inputPricePerMTok':0xa,'outputPricePerMTok':0x2d,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x1},'gpt-5.5-pro':{'inputPricePerMTok':0x3c,'outputPricePerMTok':0x10e,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0x0},'gpt-5.4':{'inputPricePerMTok':0x5,'outputPricePerMTok':22.5,'cacheWritePricePerMTok':0x0,'cacheReadPricePerMTok':0.5}};export const EXTENDED_CONTEXT_PRICING={'inputPricePerMTok':0x6,'outputPricePerMTok':22.5,'cacheWritePricePerMTok':7.5,'cacheReadPricePerMTok':0.6};export const USD_PER_AI_CREDIT=102.32;export const CONTEXT_LIMITS={'sonnet':0xf4240,'sonnet[1m]':0xf4240,'haiku':0x30d40,'opus':0xf4240,'opus[1m]':0xf4240,'default':0x30d40};export function getModelPricing(_0x17411a,_0x41fad2){const _0x4fca21=a150_0x5dfb,_0x24d882=_0x17411a[_0x4fca21(0x19a)]();if(_0x41fad2!==undefined&&_0x41fad2>LONG_CONTEXT_THRESHOLD_TOKENS){if(LONG_CONTEXT_PRICING[_0x24d882])return LONG_CONTEXT_PRICING[_0x24d882];if(_0x24d882[_0x4fca21(0x1b3)]('gpt-5.6-sol'))return LONG_CONTEXT_PRICING[_0x4fca21(0x1b6)];if(_0x24d882[_0x4fca21(0x1b3)]('gpt-5.6-terra'))return LONG_CONTEXT_PRICING[_0x4fca21(0x1a3)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1aa)))return LONG_CONTEXT_PRICING[_0x4fca21(0x1aa)];if(_0x24d882[_0x4fca21(0x1b3)]('gpt-5.6'))return LONG_CONTEXT_PRICING[_0x4fca21(0x1b6)];if(_0x24d882['includes'](_0x4fca21(0x1b9)))return LONG_CONTEXT_PRICING['gpt-5.5-pro'];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1a9)))return LONG_CONTEXT_PRICING[_0x4fca21(0x1a9)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1ae))&&!_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1b1))&&!_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1be)))return LONG_CONTEXT_PRICING[_0x4fca21(0x1ae)];}if(MODEL_PRICING[_0x24d882])return MODEL_PRICING[_0x24d882];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1b6)))return MODEL_PRICING[_0x4fca21(0x1b6)];if(_0x24d882['includes'](_0x4fca21(0x1a3)))return MODEL_PRICING['gpt-5.6-terra'];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1aa)))return MODEL_PRICING[_0x4fca21(0x1aa)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1a8)))return MODEL_PRICING[_0x4fca21(0x1b6)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1b9)))return MODEL_PRICING[_0x4fca21(0x1b9)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1a9)))return MODEL_PRICING[_0x4fca21(0x1a9)];if(_0x24d882['includes'](_0x4fca21(0x196)))return MODEL_PRICING[_0x4fca21(0x196)];if(_0x24d882[_0x4fca21(0x1b3)]('gpt-5.4-mini'))return MODEL_PRICING[_0x4fca21(0x19d)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1ae)))return MODEL_PRICING[_0x4fca21(0x1ae)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x19c)))return MODEL_PRICING[_0x4fca21(0x19c)];if(_0x24d882['includes']('sonnet'))return MODEL_PRICING[_0x4fca21(0x1ba)];if(_0x24d882[_0x4fca21(0x1b3)](_0x4fca21(0x1bb)))return MODEL_PRICING['haiku'];return MODEL_PRICING[_0x4fca21(0x1ba)];}export function calculateTokenCost(_0x1eb839,_0x50435c,_0xac0ff6,_0x36b9ef,_0xe2bd08){const _0x37e888=a150_0x5dfb,_0x117acd=0xf4240;return _0x1eb839*_0xe2bd08[_0x37e888(0x1b4)]/_0x117acd+_0x50435c*_0xe2bd08[_0x37e888(0x191)]/_0x117acd+_0xac0ff6*_0xe2bd08[_0x37e888(0x1bc)]/_0x117acd+_0x36b9ef*_0xe2bd08[_0x37e888(0x1c0)]/_0x117acd;}export function usdToAiCredits(_0x157a1c){return _0x157a1c/USD_PER_AI_CREDIT;}export function calculateCreditsFromTokens(_0x391494,_0x150b95,_0x2950f6,_0x49eaaa,_0x14929a){const _0x57f57c=_0x391494+_0x2950f6+_0x49eaaa,_0x229b36=getModelPricing(_0x14929a,_0x57f57c),_0x15583a=calculateTokenCost(_0x391494,_0x150b95,_0x2950f6,_0x49eaaa,_0x229b36);return usdToAiCredits(_0x15583a);}export function getContextLimit(_0x5c3f29){const _0x27b25b=a150_0x5dfb;if(CONTEXT_LIMITS[_0x5c3f29])return CONTEXT_LIMITS[_0x5c3f29];const _0x18632b=_0x5c3f29['toLowerCase']();if(_0x18632b[_0x27b25b(0x1b3)](_0x27b25b(0x19c)))return CONTEXT_LIMITS[_0x27b25b(0x19c)];if(_0x18632b['includes'](_0x27b25b(0x1ba)))return CONTEXT_LIMITS[_0x27b25b(0x1ba)];if(_0x18632b[_0x27b25b(0x1b3)](_0x27b25b(0x1bb)))return CONTEXT_LIMITS['haiku'];return CONTEXT_LIMITS[_0x27b25b(0x1a1)];}function a150_0x5dfb(_0x479b04,_0x7af64c){_0x479b04=_0x479b04-0x18e;const _0x3ebb61=a150_0x3ebb();let _0x5dfb24=_0x3ebb61[_0x479b04];return _0x5dfb24;}export function getModelDisplayName(_0xa79ae6){const _0x1fd2b5=a150_0x5dfb,_0x3fc868=_0xa79ae6['toLowerCase']();if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1a9)))return'GPT-5.5';if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1ae))){if(_0x3fc868[_0x1fd2b5(0x1b3)]('nano'))return _0x1fd2b5(0x1a0);if(_0x3fc868['includes'](_0x1fd2b5(0x1b1)))return _0x1fd2b5(0x1a7);return _0x1fd2b5(0x1b5);}if(_0x3fc868['includes'](_0x1fd2b5(0x1ba))){if(_0x3fc868['includes'](_0x1fd2b5(0x1b0)))return _0x1fd2b5(0x1ad);if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x195))||_0x3fc868['includes'](_0x1fd2b5(0x193)))return _0x1fd2b5(0x18e);if(_0x3fc868[_0x1fd2b5(0x1b3)]('4-5')||_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1ac)))return _0x1fd2b5(0x1ab);return'Sonnet\x204';}if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1bb))){if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1b8))||_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1ac)))return'Haiku\x204.5';return _0x1fd2b5(0x1af);}if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x19c))){if(_0x3fc868['includes'](_0x1fd2b5(0x194)))return _0x1fd2b5(0x18f);if(_0x3fc868[_0x1fd2b5(0x1b3)]('4-8')||_0x3fc868['includes']('4.8'))return _0x1fd2b5(0x1a6);if(_0x3fc868[_0x1fd2b5(0x1b3)]('4-7')||_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1a2)))return _0x1fd2b5(0x190);if(_0x3fc868['includes'](_0x1fd2b5(0x195))||_0x3fc868['includes']('4.6'))return _0x1fd2b5(0x19f);if(_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1b8))||_0x3fc868[_0x1fd2b5(0x1b3)](_0x1fd2b5(0x1ac)))return'Opus\x204.5';return _0x1fd2b5(0x192);}return _0x1fd2b5(0x19e);}export function formatTokenCount(_0x3c89a1){const _0x48ac15=a150_0x5dfb;return _0x3c89a1[_0x48ac15(0x1b2)](_0x48ac15(0x1bf));}
@@ -1 +1 @@
1
- function a151_0x3994(_0x2ecadb,_0x5c9e78){_0x2ecadb=_0x2ecadb-0xf6;const _0xc2afa2=a151_0xc2af();let _0x3994a2=_0xc2afa2[_0x2ecadb];return _0x3994a2;}function a151_0xc2af(){const _0x44a322=['availableModelNames','214086CfqeSy','50oPoiLg','isArray','2814296JsJSXd','434736qUNOfC','531993kCsAEW','8Dkiwae','displayName','push','9pydjAL','10388928aQMwBX','271103hPEvdG','2934140NcsXxz','9FppMkh','keys'];a151_0xc2af=function(){return _0x44a322;};return a151_0xc2af();}(function(_0x4f05a3,_0x1dba91){const _0x2332c7=a151_0x3994,_0x29ba89=_0x4f05a3();while(!![]){try{const _0x15a68b=parseInt(_0x2332c7(0x101))/0x1+parseInt(_0x2332c7(0xfc))/0x2*(-parseInt(_0x2332c7(0xf9))/0x3)+parseInt(_0x2332c7(0xff))/0x4+parseInt(_0x2332c7(0xfd))/0x5*(parseInt(_0x2332c7(0x100))/0x6)+parseInt(_0x2332c7(0xf7))/0x7*(-parseInt(_0x2332c7(0x102))/0x8)+-parseInt(_0x2332c7(0x105))/0x9*(parseInt(_0x2332c7(0xf8))/0xa)+-parseInt(_0x2332c7(0xf6))/0xb;if(_0x15a68b===_0x1dba91)break;else _0x29ba89['push'](_0x29ba89['shift']());}catch(_0x3fa3fd){_0x29ba89['push'](_0x29ba89['shift']());}}}(a151_0xc2af,0x587a7));export function toModelInfos(_0x1670bd){const _0x56e9d6=a151_0x3994,_0x38c560=_0x1670bd['availableModels']??{},_0x12791e=Array[_0x56e9d6(0xfe)](_0x1670bd[_0x56e9d6(0xfb)])?_0x1670bd[_0x56e9d6(0xfb)]:Object[_0x56e9d6(0xfa)](_0x38c560),_0x138e1e=[];for(const _0x5d579d of _0x12791e){const _0x3131fb=_0x38c560[_0x5d579d];_0x3131fb?.[_0x56e9d6(0x103)]&&_0x138e1e[_0x56e9d6(0x104)]({'name':_0x5d579d,'displayName':_0x3131fb[_0x56e9d6(0x103)]});}return _0x138e1e;}
1
+ (function(_0x71bbbe,_0x54555c){const _0x2155c4=a151_0x1c67,_0x434b35=_0x71bbbe();while(!![]){try{const _0x173e88=-parseInt(_0x2155c4(0xf0))/0x1*(-parseInt(_0x2155c4(0xf6))/0x2)+-parseInt(_0x2155c4(0xf3))/0x3+-parseInt(_0x2155c4(0xe9))/0x4*(-parseInt(_0x2155c4(0xe8))/0x5)+parseInt(_0x2155c4(0xf1))/0x6*(-parseInt(_0x2155c4(0xeb))/0x7)+parseInt(_0x2155c4(0xf5))/0x8*(parseInt(_0x2155c4(0xec))/0x9)+-parseInt(_0x2155c4(0xea))/0xa+-parseInt(_0x2155c4(0xef))/0xb*(parseInt(_0x2155c4(0xee))/0xc);if(_0x173e88===_0x54555c)break;else _0x434b35['push'](_0x434b35['shift']());}catch(_0x533c2b){_0x434b35['push'](_0x434b35['shift']());}}}(a151_0x5f41,0x5eb11));function a151_0x1c67(_0x198d7e,_0x38c1aa){_0x198d7e=_0x198d7e-0xe8;const _0x5f41fe=a151_0x5f41();let _0x1c6742=_0x5f41fe[_0x198d7e];return _0x1c6742;}function a151_0x5f41(){const _0x4345a3=['1179081UFODXH','availableModels','8wSCjRj','692lDJkjc','keys','2990590MvTYSk','4fsYlJf','4085740syfrNw','30541OFyYrw','5093397ANQBuk','isArray','44184iAlvUK','77tKQjjT','1018TzNIDx','414bQfrVV','availableModelNames'];a151_0x5f41=function(){return _0x4345a3;};return a151_0x5f41();}export function toModelInfos(_0x187841){const _0x11fb6d=a151_0x1c67,_0x312028=_0x187841[_0x11fb6d(0xf4)]??{},_0x238471=Array[_0x11fb6d(0xed)](_0x187841['availableModelNames'])?_0x187841[_0x11fb6d(0xf2)]:Object[_0x11fb6d(0xf7)](_0x312028),_0x2c3808=[];for(const _0x27009a of _0x238471){const _0x437eba=_0x312028[_0x27009a];_0x437eba?.['displayName']&&_0x2c3808['push']({'name':_0x27009a,'displayName':_0x437eba['displayName']});}return _0x2c3808;}
@@ -1 +1 @@
1
- const a152_0x4d8fbb=a152_0x2fe9;(function(_0xfc1910,_0x17d206){const _0x5d9941=a152_0x2fe9,_0x2b3b14=_0xfc1910();while(!![]){try{const _0x34a235=parseInt(_0x5d9941(0x148))/0x1*(-parseInt(_0x5d9941(0x170))/0x2)+-parseInt(_0x5d9941(0x15e))/0x3*(-parseInt(_0x5d9941(0x14d))/0x4)+parseInt(_0x5d9941(0x157))/0x5*(parseInt(_0x5d9941(0x16d))/0x6)+-parseInt(_0x5d9941(0x158))/0x7+parseInt(_0x5d9941(0x168))/0x8*(-parseInt(_0x5d9941(0x16f))/0x9)+-parseInt(_0x5d9941(0x15f))/0xa+-parseInt(_0x5d9941(0x15d))/0xb*(-parseInt(_0x5d9941(0x13e))/0xc);if(_0x34a235===_0x17d206)break;else _0x2b3b14['push'](_0x2b3b14['shift']());}catch(_0x176e40){_0x2b3b14['push'](_0x2b3b14['shift']());}}}(a152_0x2026,0x61fbe));import{HTTPClient}from'./client/http-client.js';import{getEndpoint}from'./client/endpoints.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a152_0x2fe9(_0x154507,_0xba04cf){_0x154507=_0x154507-0x13e;const _0x20264b=a152_0x2026();let _0x2fe9c6=_0x20264b[_0x154507];return _0x2fe9c6;}function a152_0x2026(){const _0x5b0024=['2537955ixTNGs','createPersonalization','site','/audiences/','application/vnd.treasuredata.v1+json','3123538gBOLCM','1020jMHLeN','7652950ShoheY','getPersonalization','GET','name','audienceId','cdp','data','sections','createdAt','16hhQDsR','/tokens','/entities/realtime_personalizations/','/entities/parent_segments/','patch','162nqlawJ','proxy','2569329sozVdJ','26862uhsyFY','map','application/json','updatedBy','72kaaTRk','httpClient','request','POST','update','updatedAt','PATCH','parentFolder','description','createdBy','11TmAnNC','list','relationships','attributes','create','4448BWqTjB','deleteToken','PUT','/realtime_personalizations','get','/realtime_personalization_services/','patchPersonalization','listPersonalizations','DELETE','deletePersonalization','30755ScXXDY'];a152_0x2026=function(){return _0x5b0024;};return a152_0x2026();}export class PersonalizationSDK{[a152_0x4d8fbb(0x13f)];constructor(_0x514784){const _0x5b1937=a152_0x4d8fbb,_0x5be0c8=getEndpoint(_0x514784['site'],_0x5b1937(0x164)),_0x337a4b=toHeaderRecord(getAuthHeaders(_0x514784[_0x5b1937(0x15a)],_0x514784['apiKey'],_0x514784['accessToken']));this[_0x5b1937(0x13f)]=new HTTPClient(_0x5be0c8,{..._0x337a4b,'Accept':_0x5b1937(0x15c),'Content-Type':_0x5b1937(0x172)},{'proxy':_0x514784[_0x5b1937(0x16e)],'defaultTimeout':_0x514784['timeout']});}async[a152_0x4d8fbb(0x149)](_0x1ad83c){const _0x286849=a152_0x4d8fbb,_0x968775=await this[_0x286849(0x13f)][_0x286849(0x140)](_0x286849(0x161),_0x286849(0x15b)+_0x1ad83c+'/realtime_personalization_services?page[size]=100');return Array['isArray'](_0x968775)?_0x968775:_0x968775['data']||[];}async[a152_0x4d8fbb(0x151)](_0x3b25f4,_0x5b48f8){const _0x16d683=a152_0x4d8fbb,_0x1e4aa7=await this[_0x16d683(0x13f)][_0x16d683(0x140)](_0x16d683(0x161),_0x16d683(0x15b)+_0x3b25f4+_0x16d683(0x152)+_0x5b48f8);return _0x1e4aa7||{};}async[a152_0x4d8fbb(0x14c)](_0x3a8417,_0x2b3319){const _0x4f826f=a152_0x4d8fbb,_0x2b3732=await this[_0x4f826f(0x13f)]['request'](_0x4f826f(0x141),_0x4f826f(0x15b)+_0x3a8417+'/realtime_personalization_services',{'body':_0x2b3319});return _0x2b3732||{};}async[a152_0x4d8fbb(0x142)](_0x8bf81d,_0x43ee71,_0xc4c638){const _0x34dec8=a152_0x4d8fbb,_0x3ada17=await this[_0x34dec8(0x13f)][_0x34dec8(0x140)](_0x34dec8(0x14f),_0x34dec8(0x15b)+_0x8bf81d+'/realtime_personalization_services/'+_0x43ee71,{'body':_0xc4c638});return _0x3ada17||{};}async[a152_0x4d8fbb(0x16c)](_0x51d245,_0x4b0a63,_0x540aa7){const _0x424a59=a152_0x4d8fbb,_0x3ddb85=await this['httpClient']['request'](_0x424a59(0x144),_0x424a59(0x15b)+_0x51d245+'/realtime_personalization_services/'+_0x4b0a63,{'body':_0x540aa7});return _0x3ddb85||{};}async['delete'](_0x1d6f4b,_0x211cf0){const _0x4a24e7=a152_0x4d8fbb;await this[_0x4a24e7(0x13f)][_0x4a24e7(0x140)]('DELETE',_0x4a24e7(0x15b)+_0x1d6f4b+'/realtime_personalization_services/'+_0x211cf0);}async['createToken'](_0x12a6d3,_0x4af744,_0x34c19c){const _0x284b5c=a152_0x4d8fbb,_0x4eb9c6=await this['httpClient']['request'](_0x284b5c(0x141),_0x284b5c(0x15b)+_0x12a6d3+'/realtime_personalization_services/'+_0x4af744+_0x284b5c(0x169),{'body':_0x34c19c});return _0x4eb9c6||{};}async[a152_0x4d8fbb(0x14e)](_0x2f118b,_0x2b5e33,_0x565a81){const _0x1484c8=a152_0x4d8fbb,_0x5b3b19=await this[_0x1484c8(0x13f)]['request'](_0x1484c8(0x155),_0x1484c8(0x15b)+_0x2f118b+_0x1484c8(0x152)+_0x2b5e33+'/tokens/'+_0x565a81);return _0x5b3b19||{};}async[a152_0x4d8fbb(0x160)](_0x56f23e){const _0x307ccb=a152_0x4d8fbb,_0xc93746=_0x307ccb(0x16a)+_0x56f23e,_0x18dbd5=await this[_0x307ccb(0x13f)][_0x307ccb(0x140)](_0x307ccb(0x161),_0xc93746),_0x3e7060=_0x18dbd5[_0x307ccb(0x165)];return{'id':_0x3e7060['id'],'name':_0x3e7060[_0x307ccb(0x14b)][_0x307ccb(0x162)],'description':_0x3e7060[_0x307ccb(0x14b)]['description'],'audienceId':_0x3e7060[_0x307ccb(0x14b)][_0x307ccb(0x163)],'parentFolderId':_0x3e7060['relationships']?.[_0x307ccb(0x145)]?.[_0x307ccb(0x165)]?.['id'],'sections':_0x3e7060[_0x307ccb(0x14b)]['sections'],'createdAt':_0x3e7060['attributes'][_0x307ccb(0x167)],'updatedAt':_0x3e7060[_0x307ccb(0x14b)][_0x307ccb(0x143)],'createdBy':_0x3e7060[_0x307ccb(0x14a)]?.[_0x307ccb(0x147)],'updatedBy':_0x3e7060[_0x307ccb(0x14a)]?.[_0x307ccb(0x173)]};}async[a152_0x4d8fbb(0x156)](_0x21c98e){const _0x3dc474=a152_0x4d8fbb,_0x50c9c9=_0x3dc474(0x16a)+_0x21c98e;await this[_0x3dc474(0x13f)][_0x3dc474(0x140)](_0x3dc474(0x155),_0x50c9c9);}async[a152_0x4d8fbb(0x154)](_0x38515f){const _0x133142=a152_0x4d8fbb,_0x2f0fea=_0x133142(0x16b)+_0x38515f+_0x133142(0x150),_0x43e154=await this[_0x133142(0x13f)][_0x133142(0x140)](_0x133142(0x161),_0x2f0fea);return _0x43e154[_0x133142(0x165)][_0x133142(0x171)](_0x479fbb=>({'id':_0x479fbb['id'],'name':_0x479fbb[_0x133142(0x14b)][_0x133142(0x162)],'description':_0x479fbb[_0x133142(0x14b)][_0x133142(0x146)],'audienceId':_0x479fbb[_0x133142(0x14b)][_0x133142(0x163)],'parentFolderId':_0x479fbb[_0x133142(0x14a)]?.[_0x133142(0x145)]?.[_0x133142(0x165)]?.['id'],'sections':_0x479fbb['attributes'][_0x133142(0x166)],'createdAt':_0x479fbb[_0x133142(0x14b)]['createdAt'],'updatedAt':_0x479fbb['attributes'][_0x133142(0x143)],'createdBy':_0x479fbb['relationships']?.[_0x133142(0x147)],'updatedBy':_0x479fbb[_0x133142(0x14a)]?.[_0x133142(0x173)]}));}async[a152_0x4d8fbb(0x153)](_0x5dab5,_0x5c02ec){const _0xab287c=a152_0x4d8fbb,_0x28aa66=_0xab287c(0x16a)+_0x5dab5,_0x5c6085=await this[_0xab287c(0x13f)][_0xab287c(0x140)](_0xab287c(0x144),_0x28aa66,{'body':_0x5c02ec}),_0x23e099=_0x5c6085[_0xab287c(0x165)];return{'id':_0x23e099['id'],'name':_0x23e099[_0xab287c(0x14b)][_0xab287c(0x162)],'description':_0x23e099[_0xab287c(0x14b)][_0xab287c(0x146)],'audienceId':_0x23e099[_0xab287c(0x14b)][_0xab287c(0x163)],'parentFolderId':_0x23e099[_0xab287c(0x14a)]?.[_0xab287c(0x145)]?.['data']?.['id'],'sections':_0x23e099[_0xab287c(0x14b)][_0xab287c(0x166)],'createdAt':_0x23e099[_0xab287c(0x14b)][_0xab287c(0x167)],'updatedAt':_0x23e099['attributes'][_0xab287c(0x143)],'createdBy':_0x23e099[_0xab287c(0x14a)]?.[_0xab287c(0x147)],'updatedBy':_0x23e099[_0xab287c(0x14a)]?.[_0xab287c(0x173)]};}async[a152_0x4d8fbb(0x159)](_0x3fc023){const _0x382baa=a152_0x4d8fbb,_0x3d7cc3='/entities/realtime_personalizations',_0x3c2015=await this['httpClient']['request']('POST',_0x3d7cc3,{'body':_0x3fc023}),_0x2c3a56=_0x3c2015[_0x382baa(0x165)];return{'id':_0x2c3a56['id'],'name':_0x2c3a56['attributes'][_0x382baa(0x162)],'description':_0x2c3a56[_0x382baa(0x14b)]['description'],'audienceId':_0x2c3a56[_0x382baa(0x14b)][_0x382baa(0x163)],'parentFolderId':_0x2c3a56[_0x382baa(0x14a)]?.[_0x382baa(0x145)]?.['data']?.['id'],'sections':_0x2c3a56[_0x382baa(0x14b)][_0x382baa(0x166)],'createdAt':_0x2c3a56[_0x382baa(0x14b)][_0x382baa(0x167)],'updatedAt':_0x2c3a56[_0x382baa(0x14b)][_0x382baa(0x143)],'createdBy':_0x2c3a56[_0x382baa(0x14a)]?.['createdBy'],'updatedBy':_0x2c3a56[_0x382baa(0x14a)]?.[_0x382baa(0x173)]};}}
1
+ function a152_0x596b(_0x3b517e,_0x4217bb){_0x3b517e=_0x3b517e-0x15b;const _0x360d5c=a152_0x360d();let _0x596ba6=_0x360d5c[_0x3b517e];return _0x596ba6;}const a152_0x3ab4f1=a152_0x596b;(function(_0x564c67,_0x56521c){const _0x2c409e=a152_0x596b,_0x415694=_0x564c67();while(!![]){try{const _0x44cec9=-parseInt(_0x2c409e(0x17b))/0x1*(-parseInt(_0x2c409e(0x15b))/0x2)+-parseInt(_0x2c409e(0x18a))/0x3+-parseInt(_0x2c409e(0x17c))/0x4+parseInt(_0x2c409e(0x193))/0x5*(-parseInt(_0x2c409e(0x17e))/0x6)+parseInt(_0x2c409e(0x174))/0x7*(-parseInt(_0x2c409e(0x15d))/0x8)+parseInt(_0x2c409e(0x16c))/0x9+parseInt(_0x2c409e(0x15e))/0xa*(parseInt(_0x2c409e(0x15c))/0xb);if(_0x44cec9===_0x56521c)break;else _0x415694['push'](_0x415694['shift']());}catch(_0x54e478){_0x415694['push'](_0x415694['shift']());}}}(a152_0x360d,0xe21c4));import{HTTPClient}from'./client/http-client.js';import{getEndpoint}from'./client/endpoints.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a152_0x360d(){const _0x549e82=['relationships','accessToken','25XHVPMB','2BFLBlS','11auOKpT','8ooahJY','36717100hipTTG','audienceId','name','sections','createdAt','apiKey','POST','updatedBy','map','deleteToken','/entities/realtime_personalizations','updatedAt','create','isArray','3806613GQYScC','update','DELETE','deletePersonalization','/realtime_personalization_services','listPersonalizations','PATCH','/tokens','482643Crwxys','request','list','delete','site','parentFolder','GET','746381JtJGVh','7329300ewVTpP','/entities/parent_segments/','1875324YwZnHi','/realtime_personalizations','application/json','getPersonalization','application/vnd.treasuredata.v1+json','description','/tokens/','/audiences/','/entities/realtime_personalizations/','patch','proxy','/realtime_personalization_services?page[size]=100','1352568sCYwyI','data','createdBy','/realtime_personalization_services/','createToken','httpClient','attributes'];a152_0x360d=function(){return _0x549e82;};return a152_0x360d();}export class PersonalizationSDK{['httpClient'];constructor(_0x49a7af){const _0x876ef3=a152_0x596b,_0x5887fa=getEndpoint(_0x49a7af['site'],'cdp'),_0x2cbfba=toHeaderRecord(getAuthHeaders(_0x49a7af[_0x876ef3(0x178)],_0x49a7af[_0x876ef3(0x163)],_0x49a7af[_0x876ef3(0x192)]));this[_0x876ef3(0x18f)]=new HTTPClient(_0x5887fa,{..._0x2cbfba,'Accept':_0x876ef3(0x182),'Content-Type':_0x876ef3(0x180)},{'proxy':_0x49a7af[_0x876ef3(0x188)],'defaultTimeout':_0x49a7af['timeout']});}async[a152_0x3ab4f1(0x176)](_0x55610d){const _0x19b0cd=a152_0x3ab4f1,_0x3a9ed8=await this[_0x19b0cd(0x18f)][_0x19b0cd(0x175)](_0x19b0cd(0x17a),'/audiences/'+_0x55610d+_0x19b0cd(0x189));return Array[_0x19b0cd(0x16b)](_0x3a9ed8)?_0x3a9ed8:_0x3a9ed8['data']||[];}async['get'](_0x4f8a45,_0x38062d){const _0x455e99=a152_0x3ab4f1,_0x5e5c2f=await this[_0x455e99(0x18f)][_0x455e99(0x175)](_0x455e99(0x17a),_0x455e99(0x185)+_0x4f8a45+_0x455e99(0x18d)+_0x38062d);return _0x5e5c2f||{};}async[a152_0x3ab4f1(0x16a)](_0x5e391b,_0x33b40a){const _0x5b4364=a152_0x3ab4f1,_0x4e74f9=await this[_0x5b4364(0x18f)][_0x5b4364(0x175)](_0x5b4364(0x164),_0x5b4364(0x185)+_0x5e391b+_0x5b4364(0x170),{'body':_0x33b40a});return _0x4e74f9||{};}async[a152_0x3ab4f1(0x16d)](_0x47a812,_0x5d9b07,_0x566bc3){const _0x44084a=a152_0x3ab4f1,_0x2af884=await this[_0x44084a(0x18f)][_0x44084a(0x175)]('PUT',_0x44084a(0x185)+_0x47a812+'/realtime_personalization_services/'+_0x5d9b07,{'body':_0x566bc3});return _0x2af884||{};}async[a152_0x3ab4f1(0x187)](_0x126109,_0x1dcf89,_0x45c981){const _0x6ad14b=a152_0x3ab4f1,_0x1bf0e1=await this[_0x6ad14b(0x18f)][_0x6ad14b(0x175)](_0x6ad14b(0x172),'/audiences/'+_0x126109+_0x6ad14b(0x18d)+_0x1dcf89,{'body':_0x45c981});return _0x1bf0e1||{};}async[a152_0x3ab4f1(0x177)](_0x4f5138,_0xa55e75){const _0x529e08=a152_0x3ab4f1;await this[_0x529e08(0x18f)][_0x529e08(0x175)](_0x529e08(0x16e),_0x529e08(0x185)+_0x4f5138+_0x529e08(0x18d)+_0xa55e75);}async[a152_0x3ab4f1(0x18e)](_0x51e343,_0x3bcc8e,_0x4449e0){const _0x2c6e0a=a152_0x3ab4f1,_0x264c7a=await this[_0x2c6e0a(0x18f)][_0x2c6e0a(0x175)]('POST',_0x2c6e0a(0x185)+_0x51e343+'/realtime_personalization_services/'+_0x3bcc8e+_0x2c6e0a(0x173),{'body':_0x4449e0});return _0x264c7a||{};}async[a152_0x3ab4f1(0x167)](_0x19da9b,_0x38845a,_0x2080a6){const _0x299c1e=a152_0x3ab4f1,_0x143249=await this[_0x299c1e(0x18f)][_0x299c1e(0x175)](_0x299c1e(0x16e),_0x299c1e(0x185)+_0x19da9b+_0x299c1e(0x18d)+_0x38845a+_0x299c1e(0x184)+_0x2080a6);return _0x143249||{};}async[a152_0x3ab4f1(0x181)](_0x597eb7){const _0x115ab4=a152_0x3ab4f1,_0x28b573=_0x115ab4(0x186)+_0x597eb7,_0x54fcbb=await this[_0x115ab4(0x18f)][_0x115ab4(0x175)](_0x115ab4(0x17a),_0x28b573),_0x302b7d=_0x54fcbb[_0x115ab4(0x18b)];return{'id':_0x302b7d['id'],'name':_0x302b7d[_0x115ab4(0x190)]['name'],'description':_0x302b7d['attributes'][_0x115ab4(0x183)],'audienceId':_0x302b7d[_0x115ab4(0x190)]['audienceId'],'parentFolderId':_0x302b7d[_0x115ab4(0x191)]?.['parentFolder']?.[_0x115ab4(0x18b)]?.['id'],'sections':_0x302b7d[_0x115ab4(0x190)][_0x115ab4(0x161)],'createdAt':_0x302b7d[_0x115ab4(0x190)][_0x115ab4(0x162)],'updatedAt':_0x302b7d[_0x115ab4(0x190)][_0x115ab4(0x169)],'createdBy':_0x302b7d['relationships']?.[_0x115ab4(0x18c)],'updatedBy':_0x302b7d[_0x115ab4(0x191)]?.[_0x115ab4(0x165)]};}async[a152_0x3ab4f1(0x16f)](_0x31dd9d){const _0xf5aed=a152_0x3ab4f1,_0x102304=_0xf5aed(0x186)+_0x31dd9d;await this[_0xf5aed(0x18f)][_0xf5aed(0x175)]('DELETE',_0x102304);}async[a152_0x3ab4f1(0x171)](_0x4b6792){const _0x2b9bad=a152_0x3ab4f1,_0x431552=_0x2b9bad(0x17d)+_0x4b6792+_0x2b9bad(0x17f),_0x353c55=await this[_0x2b9bad(0x18f)][_0x2b9bad(0x175)](_0x2b9bad(0x17a),_0x431552);return _0x353c55[_0x2b9bad(0x18b)][_0x2b9bad(0x166)](_0x4aa37f=>({'id':_0x4aa37f['id'],'name':_0x4aa37f['attributes'][_0x2b9bad(0x160)],'description':_0x4aa37f[_0x2b9bad(0x190)][_0x2b9bad(0x183)],'audienceId':_0x4aa37f[_0x2b9bad(0x190)][_0x2b9bad(0x15f)],'parentFolderId':_0x4aa37f[_0x2b9bad(0x191)]?.['parentFolder']?.['data']?.['id'],'sections':_0x4aa37f[_0x2b9bad(0x190)][_0x2b9bad(0x161)],'createdAt':_0x4aa37f[_0x2b9bad(0x190)]['createdAt'],'updatedAt':_0x4aa37f[_0x2b9bad(0x190)][_0x2b9bad(0x169)],'createdBy':_0x4aa37f[_0x2b9bad(0x191)]?.[_0x2b9bad(0x18c)],'updatedBy':_0x4aa37f[_0x2b9bad(0x191)]?.[_0x2b9bad(0x165)]}));}async['patchPersonalization'](_0x31f41a,_0x2b249b){const _0x34c78c=a152_0x3ab4f1,_0xfe896f='/entities/realtime_personalizations/'+_0x31f41a,_0x36b967=await this[_0x34c78c(0x18f)][_0x34c78c(0x175)](_0x34c78c(0x172),_0xfe896f,{'body':_0x2b249b}),_0xf008fd=_0x36b967['data'];return{'id':_0xf008fd['id'],'name':_0xf008fd['attributes'][_0x34c78c(0x160)],'description':_0xf008fd[_0x34c78c(0x190)][_0x34c78c(0x183)],'audienceId':_0xf008fd[_0x34c78c(0x190)][_0x34c78c(0x15f)],'parentFolderId':_0xf008fd['relationships']?.[_0x34c78c(0x179)]?.['data']?.['id'],'sections':_0xf008fd[_0x34c78c(0x190)][_0x34c78c(0x161)],'createdAt':_0xf008fd['attributes']['createdAt'],'updatedAt':_0xf008fd[_0x34c78c(0x190)]['updatedAt'],'createdBy':_0xf008fd[_0x34c78c(0x191)]?.[_0x34c78c(0x18c)],'updatedBy':_0xf008fd[_0x34c78c(0x191)]?.[_0x34c78c(0x165)]};}async['createPersonalization'](_0xb223ad){const _0x5892a1=a152_0x3ab4f1,_0x262615=_0x5892a1(0x168),_0x45284b=await this[_0x5892a1(0x18f)][_0x5892a1(0x175)](_0x5892a1(0x164),_0x262615,{'body':_0xb223ad}),_0x3c98cb=_0x45284b[_0x5892a1(0x18b)];return{'id':_0x3c98cb['id'],'name':_0x3c98cb[_0x5892a1(0x190)][_0x5892a1(0x160)],'description':_0x3c98cb[_0x5892a1(0x190)][_0x5892a1(0x183)],'audienceId':_0x3c98cb[_0x5892a1(0x190)][_0x5892a1(0x15f)],'parentFolderId':_0x3c98cb[_0x5892a1(0x191)]?.[_0x5892a1(0x179)]?.[_0x5892a1(0x18b)]?.['id'],'sections':_0x3c98cb['attributes'][_0x5892a1(0x161)],'createdAt':_0x3c98cb[_0x5892a1(0x190)]['createdAt'],'updatedAt':_0x3c98cb['attributes']['updatedAt'],'createdBy':_0x3c98cb[_0x5892a1(0x191)]?.[_0x5892a1(0x18c)],'updatedBy':_0x3c98cb['relationships']?.['updatedBy']};}}
@@ -1 +1 @@
1
- const a153_0xd0c075=a153_0x3736;function a153_0x3736(_0x474fcb,_0x5f594b){_0x474fcb=_0x474fcb-0xef;const _0x237a0d=a153_0x237a();let _0x373602=_0x237a0d[_0x474fcb];return _0x373602;}(function(_0x4677f6,_0x2b7397){const _0x4f1669=a153_0x3736,_0xe96b50=_0x4677f6();while(!![]){try{const _0x4e6f89=-parseInt(_0x4f1669(0xef))/0x1+-parseInt(_0x4f1669(0xfe))/0x2*(-parseInt(_0x4f1669(0x106))/0x3)+parseInt(_0x4f1669(0xf3))/0x4+parseInt(_0x4f1669(0x10f))/0x5*(-parseInt(_0x4f1669(0xf4))/0x6)+-parseInt(_0x4f1669(0x109))/0x7+-parseInt(_0x4f1669(0xfc))/0x8+parseInt(_0x4f1669(0xfd))/0x9*(parseInt(_0x4f1669(0x103))/0xa);if(_0x4e6f89===_0x2b7397)break;else _0xe96b50['push'](_0xe96b50['shift']());}catch(_0x6b991d){_0xe96b50['push'](_0xe96b50['shift']());}}}(a153_0x237a,0xee2ee));import{HTTPClient}from'./client/http-client.js';import{getEndpoint}from'./client/endpoints.js';function a153_0x237a(){const _0x407247=['3890528lbuTEV','6RyQTWB','listPolicies','NOT_FOUND','/v3/access_control/policies','site','name','find','getPolicy','9595848xOnGgH','18DSBueo','1214948ELJGWt','getMyPermissions','httpClient','/users','/permissions','21597280OMFkvH','toLowerCase','timeout','3ysjnsy','GET','/v3/access_control/policies/','5422053IwvfPO','getPolicyUsers','apiKey','proxy','/v3/access_control/users/','getCurrent','5990735thpoIq','request','1751757wBoOzP','userSDK','getUserPolicies','accessToken'];a153_0x237a=function(){return _0x407247;};return a153_0x237a();}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{UserSDK}from'./user.js';import{SDKError,ErrorCode}from'./errors.js';export class PolicySDK{['httpClient'];[a153_0xd0c075(0xf0)];constructor(_0x34911c){const _0x1d637a=a153_0xd0c075,_0x104729=getEndpoint(_0x34911c[_0x1d637a(0xf8)],'td'),_0x47128e=toHeaderRecord(getAuthHeaders(_0x34911c[_0x1d637a(0xf8)],_0x34911c[_0x1d637a(0x10b)],_0x34911c[_0x1d637a(0xf2)]));this[_0x1d637a(0x100)]=new HTTPClient(_0x104729,_0x47128e,{'proxy':_0x34911c[_0x1d637a(0x10c)],'defaultTimeout':_0x34911c[_0x1d637a(0x105)]}),this[_0x1d637a(0xf0)]=new UserSDK(_0x34911c);}async[a153_0xd0c075(0xff)](){const _0x574611=a153_0xd0c075,_0x1ff713=await this[_0x574611(0xf0)][_0x574611(0x10e)]();return await this[_0x574611(0x100)][_0x574611(0x110)](_0x574611(0x107),_0x574611(0x10d)+_0x1ff713['id']);}async[a153_0xd0c075(0xf1)](_0x1b5259){const _0xf55c9e=a153_0xd0c075;return await this[_0xf55c9e(0x100)][_0xf55c9e(0x110)]('GET',_0xf55c9e(0x10d)+encodeURIComponent(_0x1b5259)+'/policies');}async['listPolicies'](){const _0x495c35=a153_0xd0c075;return await this[_0x495c35(0x100)]['request'](_0x495c35(0x107),_0x495c35(0xf7));}async[a153_0xd0c075(0xfb)](_0x36aca6){const _0x26cb57=a153_0xd0c075,_0x525f56=await this[_0x26cb57(0xf5)](),_0x1ccc15=parseInt(_0x36aca6,0xa),_0xa248fd=!isNaN(_0x1ccc15)?_0x525f56[_0x26cb57(0xfa)](_0x3f705d=>_0x3f705d['id']===_0x1ccc15):_0x525f56[_0x26cb57(0xfa)](_0x99fb16=>_0x99fb16[_0x26cb57(0xf9)][_0x26cb57(0x104)]()===_0x36aca6[_0x26cb57(0x104)]());if(!_0xa248fd)throw new SDKError(ErrorCode[_0x26cb57(0xf6)],'Policy\x20not\x20found:\x20'+_0x36aca6);return _0xa248fd;}async['getPolicyPermissions'](_0x1165b3){const _0x166c55=a153_0xd0c075,_0x22f614=await this[_0x166c55(0x100)][_0x166c55(0x110)](_0x166c55(0x107),_0x166c55(0x108)+encodeURIComponent(_0x1165b3)+_0x166c55(0x102));return{'policy_id':_0x1165b3,'permissions':_0x22f614};}async[a153_0xd0c075(0x10a)](_0x337dad){const _0x21e47e=a153_0xd0c075;return await this[_0x21e47e(0x100)][_0x21e47e(0x110)](_0x21e47e(0x107),_0x21e47e(0x108)+encodeURIComponent(_0x337dad)+_0x21e47e(0x101));}}
1
+ const a153_0x506b85=a153_0x1432;(function(_0x12370e,_0x184c54){const _0x12c08e=a153_0x1432,_0x1ae185=_0x12370e();while(!![]){try{const _0x3a0bbb=-parseInt(_0x12c08e(0x1c8))/0x1+-parseInt(_0x12c08e(0x1c1))/0x2*(parseInt(_0x12c08e(0x1c5))/0x3)+parseInt(_0x12c08e(0x1bb))/0x4*(-parseInt(_0x12c08e(0x1b6))/0x5)+parseInt(_0x12c08e(0x1c7))/0x6*(parseInt(_0x12c08e(0x1be))/0x7)+parseInt(_0x12c08e(0x1c9))/0x8+parseInt(_0x12c08e(0x1ca))/0x9+parseInt(_0x12c08e(0x1c3))/0xa;if(_0x3a0bbb===_0x184c54)break;else _0x1ae185['push'](_0x1ae185['shift']());}catch(_0x2631ec){_0x1ae185['push'](_0x1ae185['shift']());}}}(a153_0x3dec,0x26457));import{HTTPClient}from'./client/http-client.js';function a153_0x3dec(){const _0x1c52d8=['GET','10927cHEPZZ','site','name','2IVxsNA','apiKey','526080IuRaZI','accessToken','426333TjsPVq','getMyPermissions','1008iQBXhc','150987YAqgFC','1695576AfdTMm','1321965HkIrgO','getPolicy','/v3/access_control/users/','toLowerCase','httpClient','request','/users','getPolicyUsers','Policy\x20not\x20found:\x20','getPolicyPermissions','listPolicies','/permissions','5OmCCyI','find','/policies','userSDK','timeout','895324mkEULc','getCurrent'];a153_0x3dec=function(){return _0x1c52d8;};return a153_0x3dec();}function a153_0x1432(_0x390fae,_0x525572){_0x390fae=_0x390fae-0x1ac;const _0x3dec82=a153_0x3dec();let _0x14325b=_0x3dec82[_0x390fae];return _0x14325b;}import{getEndpoint}from'./client/endpoints.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{UserSDK}from'./user.js';import{SDKError,ErrorCode}from'./errors.js';export class PolicySDK{['httpClient'];['userSDK'];constructor(_0x157077){const _0x571a32=a153_0x1432,_0x176d54=getEndpoint(_0x157077['site'],'td'),_0xc93b20=toHeaderRecord(getAuthHeaders(_0x157077[_0x571a32(0x1bf)],_0x157077[_0x571a32(0x1c2)],_0x157077[_0x571a32(0x1c4)]));this[_0x571a32(0x1ae)]=new HTTPClient(_0x176d54,_0xc93b20,{'proxy':_0x157077['proxy'],'defaultTimeout':_0x157077[_0x571a32(0x1ba)]}),this[_0x571a32(0x1b9)]=new UserSDK(_0x157077);}async[a153_0x506b85(0x1c6)](){const _0x44c318=a153_0x506b85,_0x423312=await this[_0x44c318(0x1b9)][_0x44c318(0x1bc)]();return await this[_0x44c318(0x1ae)][_0x44c318(0x1af)](_0x44c318(0x1bd),_0x44c318(0x1ac)+_0x423312['id']);}async['getUserPolicies'](_0x415b97){const _0x3525cd=a153_0x506b85;return await this['httpClient'][_0x3525cd(0x1af)](_0x3525cd(0x1bd),'/v3/access_control/users/'+encodeURIComponent(_0x415b97)+_0x3525cd(0x1b8));}async['listPolicies'](){const _0x55baa3=a153_0x506b85;return await this[_0x55baa3(0x1ae)][_0x55baa3(0x1af)]('GET','/v3/access_control/policies');}async[a153_0x506b85(0x1cb)](_0x19b48c){const _0x8d332c=a153_0x506b85,_0x34d37c=await this[_0x8d332c(0x1b4)](),_0x5c48a4=parseInt(_0x19b48c,0xa),_0x1ebfb9=!isNaN(_0x5c48a4)?_0x34d37c['find'](_0x6b8f1a=>_0x6b8f1a['id']===_0x5c48a4):_0x34d37c[_0x8d332c(0x1b7)](_0x10abde=>_0x10abde[_0x8d332c(0x1c0)][_0x8d332c(0x1ad)]()===_0x19b48c[_0x8d332c(0x1ad)]());if(!_0x1ebfb9)throw new SDKError(ErrorCode['NOT_FOUND'],_0x8d332c(0x1b2)+_0x19b48c);return _0x1ebfb9;}async[a153_0x506b85(0x1b3)](_0x5544c0){const _0x26e275=a153_0x506b85,_0x1c79b8=await this[_0x26e275(0x1ae)]['request'](_0x26e275(0x1bd),'/v3/access_control/policies/'+encodeURIComponent(_0x5544c0)+_0x26e275(0x1b5));return{'policy_id':_0x5544c0,'permissions':_0x1c79b8};}async[a153_0x506b85(0x1b1)](_0xfc77d6){const _0xfd4270=a153_0x506b85;return await this['httpClient'][_0xfd4270(0x1af)](_0xfd4270(0x1bd),'/v3/access_control/policies/'+encodeURIComponent(_0xfc77d6)+_0xfd4270(0x1b0));}}
@@ -1 +1 @@
1
- function a154_0x47a3(_0xb52ad7,_0x42c535){_0xb52ad7=_0xb52ad7-0x133;var _0x5c2b38=a154_0x5c2b();var _0x47a322=_0x5c2b38[_0xb52ad7];return _0x47a322;}(function(_0x4e0237,_0x59824a){var _0x1cff97=a154_0x47a3,_0xd39808=_0x4e0237();while(!![]){try{var _0x52f6af=parseInt(_0x1cff97(0x141))/0x1*(parseInt(_0x1cff97(0x137))/0x2)+-parseInt(_0x1cff97(0x135))/0x3+-parseInt(_0x1cff97(0x13a))/0x4*(parseInt(_0x1cff97(0x136))/0x5)+parseInt(_0x1cff97(0x13f))/0x6+parseInt(_0x1cff97(0x140))/0x7*(parseInt(_0x1cff97(0x13b))/0x8)+-parseInt(_0x1cff97(0x133))/0x9+parseInt(_0x1cff97(0x13e))/0xa*(parseInt(_0x1cff97(0x138))/0xb);if(_0x52f6af===_0x59824a)break;else _0xd39808['push'](_0xd39808['shift']());}catch(_0x33f63d){_0xd39808['push'](_0xd39808['shift']());}}}(a154_0x5c2b,0xb0b32));import{SDKError,ErrorCode}from'../errors.js';export function validatePageSize(_0x578257){var _0x1e752e=a154_0x47a3;if(_0x578257===undefined)return undefined;if(!Number[_0x1e752e(0x13d)](_0x578257)||_0x578257<0x1||_0x578257>0x64)return new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1e752e(0x139)+_0x578257+')');return undefined;}export function validateTableId(_0x3605e2){var _0x227d8d=a154_0x47a3;if(!Number[_0x227d8d(0x13d)](_0x3605e2)||_0x3605e2<=0x0)return new SDKError(ErrorCode[_0x227d8d(0x134)],_0x227d8d(0x13c)+_0x3605e2+')');return undefined;}function a154_0x5c2b(){var _0x54fc8a=['6588624ZnDSso','137858SeLNpH','6979kdUcLB','1317357WGdiDp','INVALID_ARGUMENT','3954594hsSPoi','2965605jSuvSr','128cFcKFh','23342LBdYGq','pageSize\x20must\x20be\x20an\x20integer\x20between\x201\x20and\x20100\x20(got\x20','4KJjxYP','336Gtfxmf','Table\x20id\x20must\x20be\x20a\x20positive\x20integer\x20(got\x20','isInteger','1930yLNIQB'];a154_0x5c2b=function(){return _0x54fc8a;};return a154_0x5c2b();}
1
+ function a154_0x10f5(_0xa94b69,_0x45afb7){_0xa94b69=_0xa94b69-0x185;var _0x23ad11=a154_0x23ad();var _0x10f55c=_0x23ad11[_0xa94b69];return _0x10f55c;}(function(_0xb337f4,_0x2c7401){var _0x26bbc6=a154_0x10f5,_0x1d5ac2=_0xb337f4();while(!![]){try{var _0x4c6871=parseInt(_0x26bbc6(0x18e))/0x1*(-parseInt(_0x26bbc6(0x190))/0x2)+parseInt(_0x26bbc6(0x18b))/0x3*(parseInt(_0x26bbc6(0x18c))/0x4)+-parseInt(_0x26bbc6(0x18f))/0x5+parseInt(_0x26bbc6(0x191))/0x6*(-parseInt(_0x26bbc6(0x192))/0x7)+parseInt(_0x26bbc6(0x188))/0x8*(-parseInt(_0x26bbc6(0x187))/0x9)+parseInt(_0x26bbc6(0x18d))/0xa+parseInt(_0x26bbc6(0x18a))/0xb;if(_0x4c6871===_0x2c7401)break;else _0x1d5ac2['push'](_0x1d5ac2['shift']());}catch(_0x44bc0b){_0x1d5ac2['push'](_0x1d5ac2['shift']());}}}(a154_0x23ad,0x2d2f5));import{SDKError,ErrorCode}from'../errors.js';function a154_0x23ad(){var _0x1f3ef1=['59LOcfcn','1811925HHChir','4364shhCGy','125586DKFskG','70AqrDVb','Table\x20id\x20must\x20be\x20a\x20positive\x20integer\x20(got\x20','isInteger','63ckyNgh','273160QJquWv','INVALID_ARGUMENT','8620491AUzTnb','48YHEGiN','75868cfmzrT','373720GlIQsX'];a154_0x23ad=function(){return _0x1f3ef1;};return a154_0x23ad();}export function validatePageSize(_0x2ce763){var _0x219877=a154_0x10f5;if(_0x2ce763===undefined)return undefined;if(!Number[_0x219877(0x186)](_0x2ce763)||_0x2ce763<0x1||_0x2ce763>0x64)return new SDKError(ErrorCode['INVALID_ARGUMENT'],'pageSize\x20must\x20be\x20an\x20integer\x20between\x201\x20and\x20100\x20(got\x20'+_0x2ce763+')');return undefined;}export function validateTableId(_0x480de8){var _0x1a1fd1=a154_0x10f5;if(!Number['isInteger'](_0x480de8)||_0x480de8<=0x0)return new SDKError(ErrorCode[_0x1a1fd1(0x189)],_0x1a1fd1(0x185)+_0x480de8+')');return undefined;}
@@ -1 +1 @@
1
- const a155_0x517f0f=a155_0x3f26;function a155_0x3f26(_0x502fc2,_0x2c94eb){_0x502fc2=_0x502fc2-0x1d9;const _0x4beaa9=a155_0x4bea();let _0x3f26ab=_0x4beaa9[_0x502fc2];return _0x3f26ab;}(function(_0x5d89e0,_0x20a11a){const _0x2dd729=a155_0x3f26,_0x3be10c=_0x5d89e0();while(!![]){try{const _0x227dfc=parseInt(_0x2dd729(0x1e2))/0x1*(-parseInt(_0x2dd729(0x200))/0x2)+parseInt(_0x2dd729(0x211))/0x3+parseInt(_0x2dd729(0x217))/0x4+parseInt(_0x2dd729(0x1e7))/0x5+-parseInt(_0x2dd729(0x1ea))/0x6*(-parseInt(_0x2dd729(0x210))/0x7)+parseInt(_0x2dd729(0x1e6))/0x8+-parseInt(_0x2dd729(0x1e4))/0x9*(-parseInt(_0x2dd729(0x1dc))/0xa);if(_0x227dfc===_0x20a11a)break;else _0x3be10c['push'](_0x3be10c['shift']());}catch(_0x57c4c5){_0x3be10c['push'](_0x3be10c['shift']());}}}(a155_0x4bea,0x3d3e0));import{TrinoApiClient}from'../client/trino-api-client.js';import{TDApiClient}from'../client/td-api-client.js';import{HTTPClientError}from'../client/http-client.js';import{escapeStringLiteral,buildLikePattern}from'../../utils/string-utils.js';function a155_0x4bea(){const _0x135d5c=['1086152jOUuUn','\x0a\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20column_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data_type,\x0a\x20\x20\x20\x20\x20\x20\x20\x20is_nullable,\x0a\x20\x20\x20\x20\x20\x20\x20\x20comment\x20AS\x20description\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.columns\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','Database\x20name\x20is\x20required','\x20not\x20found:\x20','Either\x20the\x20table\x20is\x20not\x20in\x20a\x20recoverable\x20state,\x20or\x20its\x20parent\x20database\x20is\x20also\x20deleted\x20and\x20you\x20lack\x20Database:manage.\x20In\x20the\x20latter\x20case,\x20contact\x20an\x20administrator.','problemDetails','):\x20','HTTP_REQUEST_FAILURE','\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20','Table\x20name\x20is\x20required','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20schema_name\x20=\x20','9340wYCXuE','\x0aORDER\x20BY\x20table_name\x0aLIMIT\x20','Provide\x20a\x20positive\x20number\x20for\x20limit\x20(e.g.,\x20100).','Recover\x20failed\x20(HTTP\x20','\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20ordinal_position\x0a\x20\x20\x20\x20','Table\x20id\x20','488759JJpNEx','listTables','432dXphGG','SELECT\x20*\x20FROM\x20','758336ymhEQV','41905HeAZbj','trim','INVALID_REQUEST','1842KPjKsk','\x0a\x20\x20AND\x20table_name\x20LIKE\x20','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','List\x20recoverable\x20ids\x20with\x20`tdx\x20table\x20deleted`.','listDatabases','MISSING_ARGUMENT','trinoApiClient','detail','tdApiClient','\x0a\x20\x20AND\x20schema_name\x20LIKE\x20','INVALID_ARGUMENT','message','listDeletedTables','slice','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20to\x20search\x20all\x20databases.','isInteger','Use\x20--limit\x20<number>\x20to\x20specify\x20row\x20limit\x20(must\x20be\x20positive).','Database\x20pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','\x0aORDER\x20BY\x20database_name,\x20table_name\x0aLIMIT\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_schema\x20AS\x20database_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20','PERMISSION_DENIED','2RtDJRB','length','Usage:\x20tdx\x20show\x20<database.table>','Limit\x20must\x20be\x20a\x20positive\x20number','SQL\x20query\x20is\x20required','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22user_*\x22)\x20or\x20omit\x20to\x20list\x20all\x20tables.','executeQuery','\x0a\x20\x20\x20\x20','Pass\x20--name\x20<new-table>\x20and/or\x20--database\x20<new-db>\x20to\x20rename\x20on\x20recovery.','\x20LIMIT\x20','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Limit\x20must\x20be\x20a\x20positive\x20integer','\x20ESCAPE\x20\x27\x5c\x27','Name\x20conflict:\x20','data','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20the\x20pattern\x20to\x20list\x20all\x20databases.','3717aQPYBi','471141iRXkBM','You\x20need\x20Database:edit\x20(Full\x20Access),\x20Database:owner_manage,\x20or\x20Database:manage\x20on\x20the\x20parent\x20database.','validateTable','pageSize','Insufficient\x20permissions\x20on\x20the\x20parent\x20database:\x20','\x0aORDER\x20BY\x20database_name\x0aLIMIT\x20'];a155_0x4bea=function(){return _0x135d5c;};return a155_0x4bea();}import{validatePageSize,validateTableId}from'./deleted-table-validation.js';import{SDKError,ErrorCode}from'../errors.js';import{DEFAULT_LISTING_LIMIT}from'../../core/constants.js';export class QuerySDK{[a155_0x517f0f(0x1f1)];[a155_0x517f0f(0x1f3)];constructor(_0x486a95){const _0x3ea371=a155_0x517f0f;this[_0x3ea371(0x1f1)]=new TrinoApiClient(_0x486a95),this[_0x3ea371(0x1f3)]=new TDApiClient(_0x486a95);}async['execute'](_0xee7a27,_0x12e49d){const _0x4b0157=a155_0x517f0f;if(!_0xee7a27||_0xee7a27[_0x4b0157(0x1e8)]()[_0x4b0157(0x201)]===0x0)throw new SDKError(ErrorCode[_0x4b0157(0x1f0)],_0x4b0157(0x204),undefined,{'helpText':'Provide\x20SQL\x20via\x20argument\x20or\x20use\x20--file\x20option.'});return await this[_0x4b0157(0x1f1)][_0x4b0157(0x206)](_0xee7a27,_0x12e49d);}async[a155_0x517f0f(0x1ef)](_0x4c7c85,_0x299f41=DEFAULT_LISTING_LIMIT){const _0x4418f0=a155_0x517f0f;if(_0x4c7c85!==undefined&&_0x4c7c85[_0x4418f0(0x1e8)]()[_0x4418f0(0x201)]===0x0)throw new SDKError(ErrorCode[_0x4418f0(0x1f5)],_0x4418f0(0x20a),undefined,{'helpText':_0x4418f0(0x20f)});if(_0x299f41<=0x0)throw new SDKError(ErrorCode[_0x4418f0(0x1f5)],'Limit\x20must\x20be\x20a\x20positive\x20number',undefined,{'helpText':_0x4418f0(0x1de)});let _0x577e8b='\x0a\x20\x20\x20\x20\x20\x20SELECT\x20schema_name\x20AS\x20database_name\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20';_0x4c7c85&&(_0x577e8b+=_0x4418f0(0x1f4)+buildLikePattern(_0x4c7c85)+_0x4418f0(0x20c));_0x577e8b+=_0x4418f0(0x216)+_0x299f41;const _0x445bce=await this[_0x4418f0(0x1f1)][_0x4418f0(0x206)](_0x577e8b[_0x4418f0(0x1e8)]());return _0x445bce[_0x4418f0(0x20e)];}async[a155_0x517f0f(0x1e3)](_0x36a862,_0x154875,_0x2e3c62,_0x1e8481=DEFAULT_LISTING_LIMIT){const _0x536f5c=a155_0x517f0f;if(_0x36a862!==undefined&&_0x36a862[_0x536f5c(0x1e8)]()[_0x536f5c(0x201)]===0x0)throw new SDKError(ErrorCode[_0x536f5c(0x1f5)],'Database\x20name\x20cannot\x20be\x20empty\x20or\x20whitespace-only',undefined,{'helpText':'Provide\x20a\x20valid\x20database\x20name\x20or\x20omit\x20to\x20list\x20tables\x20from\x20all\x20databases.'});if(_0x154875!==undefined&&_0x154875[_0x536f5c(0x1e8)]()[_0x536f5c(0x201)]===0x0)throw new SDKError(ErrorCode[_0x536f5c(0x1f5)],_0x536f5c(0x20a),undefined,{'helpText':_0x536f5c(0x205)});if(_0x2e3c62!==undefined&&_0x2e3c62[_0x536f5c(0x1e8)]()[_0x536f5c(0x201)]===0x0)throw new SDKError(ErrorCode[_0x536f5c(0x1f5)],_0x536f5c(0x1fc),undefined,{'helpText':_0x536f5c(0x1f9)});if(_0x1e8481<=0x0)throw new SDKError(ErrorCode[_0x536f5c(0x1f5)],_0x536f5c(0x203),undefined,{'helpText':_0x536f5c(0x1de)});let _0x2e06b9;_0x36a862?(_0x2e06b9=_0x536f5c(0x1ed)+escapeStringLiteral(_0x36a862)+'\x0a\x20\x20\x20\x20\x20\x20',_0x154875&&(_0x2e06b9+=_0x536f5c(0x1eb)+buildLikePattern(_0x154875)+_0x536f5c(0x20c)),_0x2e06b9+=_0x536f5c(0x1dd)+_0x1e8481):(_0x2e06b9=_0x536f5c(0x1fe),_0x2e3c62&&(_0x2e06b9+='\x0a\x20\x20AND\x20table_schema\x20LIKE\x20'+buildLikePattern(_0x2e3c62)+'\x20ESCAPE\x20\x27\x5c\x27'),_0x154875&&(_0x2e06b9+='\x0a\x20\x20AND\x20table_name\x20LIKE\x20'+buildLikePattern(_0x154875)+_0x536f5c(0x20c)),_0x2e06b9+=_0x536f5c(0x1fd)+_0x1e8481);const _0x1f4bc3=await this[_0x536f5c(0x1f1)]['executeQuery'](_0x2e06b9[_0x536f5c(0x1e8)]());return _0x1f4bc3[_0x536f5c(0x20e)];}async['validateDatabase'](_0x5cbf53){const _0x1d7f92=a155_0x517f0f,_0x1226b1=(_0x1d7f92(0x1db)+escapeStringLiteral(_0x5cbf53)+_0x1d7f92(0x207))[_0x1d7f92(0x1e8)](),_0x1a3819=await this[_0x1d7f92(0x1f1)][_0x1d7f92(0x206)](_0x1226b1);return _0x1a3819[_0x1d7f92(0x20e)]['length']>0x0;}async[a155_0x517f0f(0x213)](_0x15239f,_0x44e5f7){const _0x1be757=a155_0x517f0f,_0x1d8240=(_0x1be757(0x1ec)+escapeStringLiteral(_0x15239f)+_0x1be757(0x1d9)+escapeStringLiteral(_0x44e5f7)+_0x1be757(0x207))['trim'](),_0x242b41=await this[_0x1be757(0x1f1)][_0x1be757(0x206)](_0x1d8240);return _0x242b41[_0x1be757(0x20e)][_0x1be757(0x201)]>0x0;}async['describeTable'](_0x10dd0e,_0x39e68f){const _0x22020b=a155_0x517f0f;if(!_0x10dd0e||_0x10dd0e['trim']()['length']===0x0)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x22020b(0x219),undefined,{'helpText':'Usage:\x20tdx\x20describe\x20<database.table>'});if(!_0x39e68f||_0x39e68f[_0x22020b(0x1e8)]()[_0x22020b(0x201)]===0x0)throw new SDKError(ErrorCode[_0x22020b(0x1f0)],_0x22020b(0x1da),undefined,{'helpText':'Usage:\x20tdx\x20describe\x20<database.table>'});const _0x530943=(_0x22020b(0x218)+escapeStringLiteral(_0x10dd0e)+_0x22020b(0x1d9)+escapeStringLiteral(_0x39e68f)+_0x22020b(0x1e0))[_0x22020b(0x1e8)](),_0x181fd8=await this[_0x22020b(0x1f1)][_0x22020b(0x206)](_0x530943);return _0x181fd8[_0x22020b(0x20e)];}async['showTable'](_0x3d3e50,_0x37b849,_0x53276d=0x28,_0x175772){const _0x448f00=a155_0x517f0f;if(!_0x3d3e50||_0x3d3e50[_0x448f00(0x1e8)]()[_0x448f00(0x201)]===0x0)throw new SDKError(ErrorCode[_0x448f00(0x1f0)],_0x448f00(0x219),undefined,{'helpText':_0x448f00(0x202)});if(!_0x37b849||_0x37b849[_0x448f00(0x1e8)]()['length']===0x0)throw new SDKError(ErrorCode[_0x448f00(0x1f0)],_0x448f00(0x1da),undefined,{'helpText':'Usage:\x20tdx\x20show\x20<database.table>'});if(!Number[_0x448f00(0x1fa)](_0x53276d)||_0x53276d<=0x0)throw new SDKError(ErrorCode[_0x448f00(0x1f5)],_0x448f00(0x20b),undefined,{'helpText':_0x448f00(0x1fb)});const _0x312523=escapeStringLiteral(_0x3d3e50)[_0x448f00(0x1f8)](0x1,-0x1)+'.'+escapeStringLiteral(_0x37b849)[_0x448f00(0x1f8)](0x1,-0x1),_0x1b2f97=_0x448f00(0x1e5)+_0x312523+_0x448f00(0x209)+_0x53276d,_0x1444c5=await this[_0x448f00(0x1f1)]['executeQuery'](_0x1b2f97,{'catalog':_0x175772,'schema':_0x3d3e50});return _0x1444c5;}async[a155_0x517f0f(0x1f7)](_0x32ad15){const _0x4dbdf6=a155_0x517f0f,_0x5ca11a=validatePageSize(_0x32ad15?.[_0x4dbdf6(0x214)]);if(_0x5ca11a)throw _0x5ca11a;return await this[_0x4dbdf6(0x1f3)][_0x4dbdf6(0x1f7)](_0x32ad15);}async['recoverTable'](_0x13dbbe,_0x2accf3){const _0x2d8f2a=a155_0x517f0f,_0x4fe1b1=validateTableId(_0x13dbbe);if(_0x4fe1b1)throw _0x4fe1b1;try{return await this[_0x2d8f2a(0x1f3)]['recoverTable'](_0x13dbbe,_0x2accf3);}catch(_0x1d0b05){if(_0x1d0b05 instanceof HTTPClientError)throw mapRecoverHttpError(_0x1d0b05,_0x13dbbe);throw _0x1d0b05;}}}function mapRecoverHttpError(_0x55bcfb,_0x1d2de0){const _0x52208f=a155_0x517f0f,_0x11f5d7=_0x55bcfb[_0x52208f(0x21c)]?.[_0x52208f(0x1f2)]||_0x55bcfb[_0x52208f(0x1f6)];switch(_0x55bcfb['status']){case 0x193:return new SDKError(ErrorCode[_0x52208f(0x1ff)],_0x52208f(0x215)+_0x11f5d7,_0x55bcfb,{'helpText':_0x52208f(0x212)});case 0x194:return new SDKError(ErrorCode['TABLE_NOT_FOUND'],_0x52208f(0x1e1)+_0x1d2de0+_0x52208f(0x21a)+_0x11f5d7,_0x55bcfb,{'helpText':_0x52208f(0x1ee)});case 0x199:return new SDKError(ErrorCode['ALREADY_EXISTS'],_0x52208f(0x20d)+_0x11f5d7,_0x55bcfb,{'helpText':_0x52208f(0x208)});case 0x1a6:return new SDKError(ErrorCode[_0x52208f(0x1e9)],_0x11f5d7,_0x55bcfb,{'helpText':_0x52208f(0x21b)});default:return new SDKError(ErrorCode[_0x52208f(0x21e)],_0x52208f(0x1df)+_0x55bcfb['status']+_0x52208f(0x21d)+_0x11f5d7,_0x55bcfb);}}
1
+ const a155_0x4af45c=a155_0x5437;(function(_0x415be0,_0x43149e){const _0x47b521=a155_0x5437,_0x2bb503=_0x415be0();while(!![]){try{const _0x2aafe9=-parseInt(_0x47b521(0x18f))/0x1*(parseInt(_0x47b521(0x1a9))/0x2)+-parseInt(_0x47b521(0x19e))/0x3*(parseInt(_0x47b521(0x1af))/0x4)+parseInt(_0x47b521(0x189))/0x5*(-parseInt(_0x47b521(0x1ad))/0x6)+parseInt(_0x47b521(0x1ae))/0x7*(parseInt(_0x47b521(0x1b6))/0x8)+-parseInt(_0x47b521(0x1a5))/0x9*(-parseInt(_0x47b521(0x181))/0xa)+-parseInt(_0x47b521(0x184))/0xb+-parseInt(_0x47b521(0x194))/0xc*(-parseInt(_0x47b521(0x1b3))/0xd);if(_0x2aafe9===_0x43149e)break;else _0x2bb503['push'](_0x2bb503['shift']());}catch(_0x31528b){_0x2bb503['push'](_0x2bb503['shift']());}}}(a155_0x2c53,0xb786a));import{TrinoApiClient}from'../client/trino-api-client.js';import{TDApiClient}from'../client/td-api-client.js';import{HTTPClientError}from'../client/http-client.js';function a155_0x5437(_0x221bb3,_0x5e7cf4){_0x221bb3=_0x221bb3-0x172;const _0x2c5376=a155_0x2c53();let _0x54379a=_0x2c5376[_0x221bb3];return _0x54379a;}import{escapeStringLiteral,buildLikePattern}from'../../utils/string-utils.js';import{validatePageSize,validateTableId}from'./deleted-table-validation.js';import{SDKError,ErrorCode}from'../errors.js';import{DEFAULT_LISTING_LIMIT}from'../../core/constants.js';export class QuerySDK{[a155_0x4af45c(0x1a7)];[a155_0x4af45c(0x1b8)];constructor(_0x38a42e){const _0x2c4302=a155_0x4af45c;this['trinoApiClient']=new TrinoApiClient(_0x38a42e),this[_0x2c4302(0x1b8)]=new TDApiClient(_0x38a42e);}async[a155_0x4af45c(0x17f)](_0x19cc22,_0x15cb8a){const _0x1588fe=a155_0x4af45c;if(!_0x19cc22||_0x19cc22[_0x1588fe(0x18c)]()[_0x1588fe(0x185)]===0x0)throw new SDKError(ErrorCode[_0x1588fe(0x180)],'SQL\x20query\x20is\x20required',undefined,{'helpText':_0x1588fe(0x18b)});return await this[_0x1588fe(0x1a7)][_0x1588fe(0x17a)](_0x19cc22,_0x15cb8a);}async[a155_0x4af45c(0x1a8)](_0x1d103b,_0x49eb5d=DEFAULT_LISTING_LIMIT){const _0x57e592=a155_0x4af45c;if(_0x1d103b!==undefined&&_0x1d103b[_0x57e592(0x18c)]()['length']===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only',undefined,{'helpText':_0x57e592(0x195)});if(_0x49eb5d<=0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x57e592(0x1ab),undefined,{'helpText':_0x57e592(0x183)});let _0x4bfa54=_0x57e592(0x19a);_0x1d103b&&(_0x4bfa54+=_0x57e592(0x17e)+buildLikePattern(_0x1d103b)+_0x57e592(0x1a4));_0x4bfa54+=_0x57e592(0x17d)+_0x49eb5d;const _0x50c1d2=await this[_0x57e592(0x1a7)][_0x57e592(0x17a)](_0x4bfa54[_0x57e592(0x18c)]());return _0x50c1d2[_0x57e592(0x1b9)];}async['listTables'](_0x2c9935,_0x396d1e,_0x3db436,_0x53cc5d=DEFAULT_LISTING_LIMIT){const _0x2a430c=a155_0x4af45c;if(_0x2c9935!==undefined&&_0x2c9935[_0x2a430c(0x18c)]()[_0x2a430c(0x185)]===0x0)throw new SDKError(ErrorCode[_0x2a430c(0x1a3)],_0x2a430c(0x186),undefined,{'helpText':'Provide\x20a\x20valid\x20database\x20name\x20or\x20omit\x20to\x20list\x20tables\x20from\x20all\x20databases.'});if(_0x396d1e!==undefined&&_0x396d1e[_0x2a430c(0x18c)]()[_0x2a430c(0x185)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2a430c(0x1b5),undefined,{'helpText':_0x2a430c(0x190)});if(_0x3db436!==undefined&&_0x3db436[_0x2a430c(0x18c)]()[_0x2a430c(0x185)]===0x0)throw new SDKError(ErrorCode[_0x2a430c(0x1a3)],_0x2a430c(0x1b0),undefined,{'helpText':_0x2a430c(0x179)});if(_0x53cc5d<=0x0)throw new SDKError(ErrorCode[_0x2a430c(0x1a3)],'Limit\x20must\x20be\x20a\x20positive\x20number',undefined,{'helpText':'Provide\x20a\x20positive\x20number\x20for\x20limit\x20(e.g.,\x20100).'});let _0x54253f;_0x2c9935?(_0x54253f=_0x2a430c(0x18e)+escapeStringLiteral(_0x2c9935)+'\x0a\x20\x20\x20\x20\x20\x20',_0x396d1e&&(_0x54253f+='\x0a\x20\x20AND\x20table_name\x20LIKE\x20'+buildLikePattern(_0x396d1e)+_0x2a430c(0x1a4)),_0x54253f+='\x0aORDER\x20BY\x20table_name\x0aLIMIT\x20'+_0x53cc5d):(_0x54253f='\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_schema\x20AS\x20database_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20',_0x3db436&&(_0x54253f+=_0x2a430c(0x199)+buildLikePattern(_0x3db436)+_0x2a430c(0x1a4)),_0x396d1e&&(_0x54253f+='\x0a\x20\x20AND\x20table_name\x20LIKE\x20'+buildLikePattern(_0x396d1e)+_0x2a430c(0x1a4)),_0x54253f+=_0x2a430c(0x1a1)+_0x53cc5d);const _0x23f726=await this[_0x2a430c(0x1a7)][_0x2a430c(0x17a)](_0x54253f[_0x2a430c(0x18c)]());return _0x23f726[_0x2a430c(0x1b9)];}async[a155_0x4af45c(0x178)](_0x4b2b1e){const _0x162455=a155_0x4af45c,_0xbb8db0=(_0x162455(0x182)+escapeStringLiteral(_0x4b2b1e)+'\x0a\x20\x20\x20\x20')[_0x162455(0x18c)](),_0x21f4de=await this[_0x162455(0x1a7)][_0x162455(0x17a)](_0xbb8db0);return _0x21f4de[_0x162455(0x1b9)][_0x162455(0x185)]>0x0;}async[a155_0x4af45c(0x196)](_0x48908b,_0xc1c895){const _0x9ec8e8=a155_0x4af45c,_0x2b6619=(_0x9ec8e8(0x18d)+escapeStringLiteral(_0x48908b)+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20'+escapeStringLiteral(_0xc1c895)+_0x9ec8e8(0x19f))['trim'](),_0x1c0305=await this['trinoApiClient'][_0x9ec8e8(0x17a)](_0x2b6619);return _0x1c0305[_0x9ec8e8(0x1b9)]['length']>0x0;}async[a155_0x4af45c(0x197)](_0x56f2db,_0x273c89){const _0x20f8eb=a155_0x4af45c;if(!_0x56f2db||_0x56f2db[_0x20f8eb(0x18c)]()[_0x20f8eb(0x185)]===0x0)throw new SDKError(ErrorCode[_0x20f8eb(0x180)],_0x20f8eb(0x192),undefined,{'helpText':_0x20f8eb(0x176)});if(!_0x273c89||_0x273c89[_0x20f8eb(0x18c)]()['length']===0x0)throw new SDKError(ErrorCode[_0x20f8eb(0x180)],_0x20f8eb(0x198),undefined,{'helpText':_0x20f8eb(0x176)});const _0x3d50e0=(_0x20f8eb(0x173)+escapeStringLiteral(_0x56f2db)+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20'+escapeStringLiteral(_0x273c89)+_0x20f8eb(0x1b4))['trim'](),_0x277717=await this['trinoApiClient'][_0x20f8eb(0x17a)](_0x3d50e0);return _0x277717[_0x20f8eb(0x1b9)];}async[a155_0x4af45c(0x1aa)](_0x425f87,_0x5c7abd,_0x429798=0x28,_0x16d82f){const _0x1f3092=a155_0x4af45c;if(!_0x425f87||_0x425f87['trim']()[_0x1f3092(0x185)]===0x0)throw new SDKError(ErrorCode[_0x1f3092(0x180)],_0x1f3092(0x192),undefined,{'helpText':_0x1f3092(0x1a6)});if(!_0x5c7abd||_0x5c7abd[_0x1f3092(0x18c)]()[_0x1f3092(0x185)]===0x0)throw new SDKError(ErrorCode[_0x1f3092(0x180)],_0x1f3092(0x198),undefined,{'helpText':_0x1f3092(0x1a6)});if(!Number[_0x1f3092(0x1a2)](_0x429798)||_0x429798<=0x0)throw new SDKError(ErrorCode[_0x1f3092(0x1a3)],'Limit\x20must\x20be\x20a\x20positive\x20integer',undefined,{'helpText':'Use\x20--limit\x20<number>\x20to\x20specify\x20row\x20limit\x20(must\x20be\x20positive).'});const _0x4f5b48=escapeStringLiteral(_0x425f87)[_0x1f3092(0x18a)](0x1,-0x1)+'.'+escapeStringLiteral(_0x5c7abd)[_0x1f3092(0x18a)](0x1,-0x1),_0x3d9d1f=_0x1f3092(0x17c)+_0x4f5b48+_0x1f3092(0x187)+_0x429798,_0x67a0ce=await this[_0x1f3092(0x1a7)][_0x1f3092(0x17a)](_0x3d9d1f,{'catalog':_0x16d82f,'schema':_0x425f87});return _0x67a0ce;}async['listDeletedTables'](_0x1d0755){const _0x19a137=a155_0x4af45c,_0x51165b=validatePageSize(_0x1d0755?.[_0x19a137(0x1b7)]);if(_0x51165b)throw _0x51165b;return await this[_0x19a137(0x1b8)][_0x19a137(0x1b1)](_0x1d0755);}async[a155_0x4af45c(0x188)](_0x1c7891,_0x4a8772){const _0x52c807=a155_0x4af45c,_0x3d05ee=validateTableId(_0x1c7891);if(_0x3d05ee)throw _0x3d05ee;try{return await this['tdApiClient'][_0x52c807(0x188)](_0x1c7891,_0x4a8772);}catch(_0x42de91){if(_0x42de91 instanceof HTTPClientError)throw mapRecoverHttpError(_0x42de91,_0x1c7891);throw _0x42de91;}}}function mapRecoverHttpError(_0x4bf3ae,_0x41ac7c){const _0x3fe880=a155_0x4af45c,_0x573501=_0x4bf3ae[_0x3fe880(0x172)]?.[_0x3fe880(0x174)]||_0x4bf3ae[_0x3fe880(0x175)];switch(_0x4bf3ae[_0x3fe880(0x19d)]){case 0x193:return new SDKError(ErrorCode['PERMISSION_DENIED'],_0x3fe880(0x19b)+_0x573501,_0x4bf3ae,{'helpText':_0x3fe880(0x193)});case 0x194:return new SDKError(ErrorCode[_0x3fe880(0x19c)],'Table\x20id\x20'+_0x41ac7c+_0x3fe880(0x191)+_0x573501,_0x4bf3ae,{'helpText':'List\x20recoverable\x20ids\x20with\x20`tdx\x20table\x20deleted`.'});case 0x199:return new SDKError(ErrorCode['ALREADY_EXISTS'],_0x3fe880(0x177)+_0x573501,_0x4bf3ae,{'helpText':_0x3fe880(0x17b)});case 0x1a6:return new SDKError(ErrorCode['INVALID_REQUEST'],_0x573501,_0x4bf3ae,{'helpText':_0x3fe880(0x1ac)});default:return new SDKError(ErrorCode['HTTP_REQUEST_FAILURE'],_0x3fe880(0x1b2)+_0x4bf3ae[_0x3fe880(0x19d)]+_0x3fe880(0x1a0)+_0x573501,_0x4bf3ae);}}function a155_0x2c53(){const _0x14e83c=['Insufficient\x20permissions\x20on\x20the\x20parent\x20database:\x20','TABLE_NOT_FOUND','status','3lxeint','\x0a\x20\x20\x20\x20','):\x20','\x0aORDER\x20BY\x20database_name,\x20table_name\x0aLIMIT\x20','isInteger','INVALID_ARGUMENT','\x20ESCAPE\x20\x27\x5c\x27','10578168WVuywO','Usage:\x20tdx\x20show\x20<database.table>','trinoApiClient','listDatabases','2bRURZn','showTable','Limit\x20must\x20be\x20a\x20positive\x20number','Either\x20the\x20table\x20is\x20not\x20in\x20a\x20recoverable\x20state,\x20or\x20its\x20parent\x20database\x20is\x20also\x20deleted\x20and\x20you\x20lack\x20Database:manage.\x20In\x20the\x20latter\x20case,\x20contact\x20an\x20administrator.','7537890oKUfTR','35LoESJH','4128132pUjdUu','Database\x20pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','listDeletedTables','Recover\x20failed\x20(HTTP\x20','26XqBhgJ','\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20ordinal_position\x0a\x20\x20\x20\x20','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','2050848BDDKjI','pageSize','tdApiClient','data','problemDetails','\x0a\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20column_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data_type,\x0a\x20\x20\x20\x20\x20\x20\x20\x20is_nullable,\x0a\x20\x20\x20\x20\x20\x20\x20\x20comment\x20AS\x20description\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.columns\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','detail','message','Usage:\x20tdx\x20describe\x20<database.table>','Name\x20conflict:\x20','validateDatabase','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20to\x20search\x20all\x20databases.','executeQuery','Pass\x20--name\x20<new-table>\x20and/or\x20--database\x20<new-db>\x20to\x20rename\x20on\x20recovery.','SELECT\x20*\x20FROM\x20','\x0aORDER\x20BY\x20database_name\x0aLIMIT\x20','\x0a\x20\x20AND\x20schema_name\x20LIKE\x20','execute','MISSING_ARGUMENT','10TOvUCe','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20schema_name\x20=\x20','Provide\x20a\x20positive\x20number\x20for\x20limit\x20(e.g.,\x20100).','7516597jPgbrM','length','Database\x20name\x20cannot\x20be\x20empty\x20or\x20whitespace-only','\x20LIMIT\x20','recoverTable','5dgjrgC','slice','Provide\x20SQL\x20via\x20argument\x20or\x20use\x20--file\x20option.','trim','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','966601CSmzBF','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22user_*\x22)\x20or\x20omit\x20to\x20list\x20all\x20tables.','\x20not\x20found:\x20','Database\x20name\x20is\x20required','You\x20need\x20Database:edit\x20(Full\x20Access),\x20Database:owner_manage,\x20or\x20Database:manage\x20on\x20the\x20parent\x20database.','13397196qaZpbB','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20the\x20pattern\x20to\x20list\x20all\x20databases.','validateTable','describeTable','Table\x20name\x20is\x20required','\x0a\x20\x20AND\x20table_schema\x20LIKE\x20','\x0a\x20\x20\x20\x20\x20\x20SELECT\x20schema_name\x20AS\x20database_name\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20'];a155_0x2c53=function(){return _0x14e83c;};return a155_0x2c53();}
@@ -1 +1 @@
1
- (function(_0x2dfb2c,_0x201bd1){const _0x5ae44f=a156_0xb167,_0x5b7019=_0x2dfb2c();while(!![]){try{const _0x2a38c8=-parseInt(_0x5ae44f(0x81))/0x1*(parseInt(_0x5ae44f(0x76))/0x2)+-parseInt(_0x5ae44f(0x7c))/0x3+-parseInt(_0x5ae44f(0x83))/0x4+parseInt(_0x5ae44f(0x79))/0x5*(-parseInt(_0x5ae44f(0x8f))/0x6)+-parseInt(_0x5ae44f(0x84))/0x7*(parseInt(_0x5ae44f(0x7a))/0x8)+parseInt(_0x5ae44f(0x90))/0x9*(-parseInt(_0x5ae44f(0x8e))/0xa)+parseInt(_0x5ae44f(0x86))/0xb;if(_0x2a38c8===_0x201bd1)break;else _0x5b7019['push'](_0x5b7019['shift']());}catch(_0x242741){_0x5b7019['push'](_0x5b7019['shift']());}}}(a156_0x2faf,0xc4d6b));import{createInterface}from'readline';import{readFileContent}from'../../utils/file-reader.js';function a156_0xb167(_0x412dcb,_0x195269){_0x412dcb=_0x412dcb-0x75;const _0x2faf90=a156_0x2faf();let _0xb16785=_0x2faf90[_0x412dcb];return _0xb16785;}function a156_0x2faf(){const _0x10f996=['line','File\x20\x27','error','1610dYHZUV','955386YtNRWy','6723BDzcPq','trim','105474aNKsLw','replace','toLowerCase','5kBwUtm','16BVlWLE','test','2071413bBceeL','stdin\x20','message','push','isTTY','1nafZqT','length','2343344XjGAXi','3310496NluZiH','Error\x20reading\x20from\x20stdin:\x20','36967139yiMFaR','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','close','filter','stdin'];a156_0x2faf=function(){return _0x10f996;};return a156_0x2faf();}export function stripSqlComments(_0x30a292){const _0x38ab4d=a156_0xb167;let _0x5bc987=_0x30a292['replace'](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x5bc987=_0x5bc987[_0x38ab4d(0x77)](/--.*$/gm,''),_0x5bc987[_0x38ab4d(0x75)]();}function isEscaped(_0x23fe76,_0x32ae8e){let _0x121b76=0x0;for(let _0x40405e=_0x32ae8e-0x1;_0x40405e>=0x0&&_0x23fe76[_0x40405e]==='\x5c';_0x40405e--){_0x121b76++;}return _0x121b76%0x2===0x1;}export function splitSqlStatements(_0x180955){const _0x3da912=a156_0xb167,_0x35938a=stripSqlComments(_0x180955);if(!_0x35938a)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');const _0x30b0b2=[];let _0x1baf20='',_0x143576=![],_0x15b36d=![],_0x8826fb=![];for(let _0x2916f0=0x0;_0x2916f0<_0x180955[_0x3da912(0x82)];_0x2916f0++){const _0x52c8e5=_0x180955[_0x2916f0];if(_0x52c8e5==='\x27'&&!isEscaped(_0x180955,_0x2916f0)&&!_0x15b36d&&!_0x8826fb)_0x143576=!_0x143576;else{if(_0x52c8e5==='\x22'&&!isEscaped(_0x180955,_0x2916f0)&&!_0x143576&&!_0x8826fb)_0x15b36d=!_0x15b36d;else _0x52c8e5==='`'&&!isEscaped(_0x180955,_0x2916f0)&&!_0x143576&&!_0x15b36d&&(_0x8826fb=!_0x8826fb);}if(_0x52c8e5===';'&&!_0x143576&&!_0x15b36d&&!_0x8826fb){const _0x22651c=_0x1baf20['trim']();_0x22651c&&_0x30b0b2[_0x3da912(0x7f)](_0x22651c),_0x1baf20='';}else _0x1baf20+=_0x52c8e5;}const _0x129c41=_0x1baf20[_0x3da912(0x75)]();_0x129c41&&_0x30b0b2[_0x3da912(0x7f)](_0x129c41);const _0x280707=_0x30b0b2['map'](_0x24fb24=>_0x24fb24[_0x3da912(0x75)]())[_0x3da912(0x89)](_0xa32f8f=>{const _0x4a21ab=_0x3da912,_0x67371f=stripSqlComments(_0xa32f8f);return _0x67371f[_0x4a21ab(0x82)]>0x0;});if(_0x280707[_0x3da912(0x82)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x280707;}export function readSqlStatementsFromFile(_0x4bfef4){const _0x173bd3=a156_0xb167,_0x357969=readFileContent(_0x4bfef4);try{return splitSqlStatements(_0x357969);}catch(_0x20f390){throw new Error(_0x173bd3(0x8c)+_0x4bfef4+'\x27\x20'+_0x20f390[_0x173bd3(0x7e)]['toLowerCase']());}}export async function readStdinContent(){const _0x3bcfd1=a156_0xb167;if(process[_0x3bcfd1(0x8a)][_0x3bcfd1(0x80)])throw new Error(_0x3bcfd1(0x87));return new Promise((_0x4fd3b1,_0x1a1b34)=>{const _0x2d492c=_0x3bcfd1,_0x3f05db=[],_0x41e5ae=createInterface({'input':process['stdin'],'terminal':![]});_0x41e5ae['on'](_0x2d492c(0x8b),_0x261fa8=>{const _0x39d7de=_0x2d492c;_0x3f05db[_0x39d7de(0x7f)](_0x261fa8);}),_0x41e5ae['on']('close',()=>{_0x4fd3b1(_0x3f05db['join']('\x0a'));}),_0x41e5ae['on'](_0x2d492c(0x8d),_0x38159a=>{const _0x5b5957=_0x2d492c;_0x41e5ae[_0x5b5957(0x88)](),_0x1a1b34(new Error(_0x5b5957(0x85)+_0x38159a['message']));});});}export async function readSqlStatementsFromStdin(){const _0x336378=a156_0xb167,_0x47f0c1=await readStdinContent();try{return splitSqlStatements(_0x47f0c1);}catch(_0x2457e9){throw new Error(_0x336378(0x7d)+_0x2457e9[_0x336378(0x7e)][_0x336378(0x78)]());}}export function isSqlFilePath(_0x119f8c){const _0x553bc9=a156_0xb167;return/\w\.sql$/[_0x553bc9(0x7b)](_0x119f8c);}
1
+ (function(_0x2a5c2e,_0x1d99ed){const _0x52200f=a156_0x39d6,_0x2b43ea=_0x2a5c2e();while(!![]){try{const _0x4f7c0e=-parseInt(_0x52200f(0x148))/0x1*(parseInt(_0x52200f(0x134))/0x2)+-parseInt(_0x52200f(0x12e))/0x3*(-parseInt(_0x52200f(0x146))/0x4)+-parseInt(_0x52200f(0x12f))/0x5+-parseInt(_0x52200f(0x143))/0x6+parseInt(_0x52200f(0x12c))/0x7+-parseInt(_0x52200f(0x137))/0x8+parseInt(_0x52200f(0x132))/0x9*(parseInt(_0x52200f(0x144))/0xa);if(_0x4f7c0e===_0x1d99ed)break;else _0x2b43ea['push'](_0x2b43ea['shift']());}catch(_0x5748d8){_0x2b43ea['push'](_0x2b43ea['shift']());}}}(a156_0x1188,0x562f3));function a156_0x39d6(_0x2a12e7,_0xb0d270){_0x2a12e7=_0x2a12e7-0x12c;const _0x11882a=a156_0x1188();let _0x39d6f3=_0x11882a[_0x2a12e7];return _0x39d6f3;}function a156_0x1188(){const _0x58947f=['toLowerCase','trim','line','close','length','isTTY','Content\x20contains\x20no\x20SQL\x20statements','4158600AXZzKw','20WsAVrn','join','2108DSacWo','push','16bHswng','3373888nWfAbg','error','2961SBEJTn','200370VQoyjf','replace','stdin','4577238JvCVCM','test','61716AogLEE','Error\x20reading\x20from\x20stdin:\x20','stdin\x20','3515072tNSPKq','File\x20\x27','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','message','filter'];a156_0x1188=function(){return _0x58947f;};return a156_0x1188();}import{createInterface}from'readline';import{readFileContent}from'../../utils/file-reader.js';export function stripSqlComments(_0x5c2218){const _0x303c06=a156_0x39d6;let _0x265687=_0x5c2218[_0x303c06(0x130)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x265687=_0x265687[_0x303c06(0x130)](/--.*$/gm,''),_0x265687[_0x303c06(0x13d)]();}function isEscaped(_0x59f6a3,_0xe4c41f){let _0x4aa84b=0x0;for(let _0x500521=_0xe4c41f-0x1;_0x500521>=0x0&&_0x59f6a3[_0x500521]==='\x5c';_0x500521--){_0x4aa84b++;}return _0x4aa84b%0x2===0x1;}export function splitSqlStatements(_0x55f5ef){const _0x44c5f3=a156_0x39d6,_0x3e42b6=stripSqlComments(_0x55f5ef);if(!_0x3e42b6)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');const _0x381fdc=[];let _0x3c2c00='',_0x5b9251=![],_0x23b80d=![],_0x32b945=![];for(let _0x1e21b4=0x0;_0x1e21b4<_0x55f5ef[_0x44c5f3(0x140)];_0x1e21b4++){const _0x44967a=_0x55f5ef[_0x1e21b4];if(_0x44967a==='\x27'&&!isEscaped(_0x55f5ef,_0x1e21b4)&&!_0x23b80d&&!_0x32b945)_0x5b9251=!_0x5b9251;else{if(_0x44967a==='\x22'&&!isEscaped(_0x55f5ef,_0x1e21b4)&&!_0x5b9251&&!_0x32b945)_0x23b80d=!_0x23b80d;else _0x44967a==='`'&&!isEscaped(_0x55f5ef,_0x1e21b4)&&!_0x5b9251&&!_0x23b80d&&(_0x32b945=!_0x32b945);}if(_0x44967a===';'&&!_0x5b9251&&!_0x23b80d&&!_0x32b945){const _0x23f412=_0x3c2c00[_0x44c5f3(0x13d)]();_0x23f412&&_0x381fdc['push'](_0x23f412),_0x3c2c00='';}else _0x3c2c00+=_0x44967a;}const _0x5827d7=_0x3c2c00[_0x44c5f3(0x13d)]();_0x5827d7&&_0x381fdc[_0x44c5f3(0x147)](_0x5827d7);const _0x5d0a92=_0x381fdc['map'](_0x110cc4=>_0x110cc4['trim']())[_0x44c5f3(0x13b)](_0x109e89=>{const _0x3863cb=_0x44c5f3,_0x45235f=stripSqlComments(_0x109e89);return _0x45235f[_0x3863cb(0x140)]>0x0;});if(_0x5d0a92[_0x44c5f3(0x140)]===0x0)throw new Error(_0x44c5f3(0x142));return _0x5d0a92;}export function readSqlStatementsFromFile(_0x4a6d1d){const _0x54dd6c=a156_0x39d6,_0x5852bb=readFileContent(_0x4a6d1d);try{return splitSqlStatements(_0x5852bb);}catch(_0x1c43f4){throw new Error(_0x54dd6c(0x138)+_0x4a6d1d+'\x27\x20'+_0x1c43f4[_0x54dd6c(0x13a)][_0x54dd6c(0x13c)]());}}export async function readStdinContent(){const _0x5a8e86=a156_0x39d6;if(process[_0x5a8e86(0x131)][_0x5a8e86(0x141)])throw new Error(_0x5a8e86(0x139));return new Promise((_0x9d389e,_0x5d23e8)=>{const _0x40a80c=_0x5a8e86,_0x57d8ec=[],_0x3877d7=createInterface({'input':process[_0x40a80c(0x131)],'terminal':![]});_0x3877d7['on'](_0x40a80c(0x13e),_0x128488=>{const _0x36205e=_0x40a80c;_0x57d8ec[_0x36205e(0x147)](_0x128488);}),_0x3877d7['on'](_0x40a80c(0x13f),()=>{const _0x5d49e=_0x40a80c;_0x9d389e(_0x57d8ec[_0x5d49e(0x145)]('\x0a'));}),_0x3877d7['on'](_0x40a80c(0x12d),_0x494194=>{const _0x48f239=_0x40a80c;_0x3877d7[_0x48f239(0x13f)](),_0x5d23e8(new Error(_0x48f239(0x135)+_0x494194[_0x48f239(0x13a)]));});});}export async function readSqlStatementsFromStdin(){const _0x4a58cc=a156_0x39d6,_0x53f115=await readStdinContent();try{return splitSqlStatements(_0x53f115);}catch(_0x4cf6d0){throw new Error(_0x4a58cc(0x136)+_0x4cf6d0[_0x4a58cc(0x13a)][_0x4a58cc(0x13c)]());}}export function isSqlFilePath(_0x5445c1){const _0x317139=a156_0x39d6;return/\w\.sql$/[_0x317139(0x133)](_0x5445c1);}
@@ -1 +1 @@
1
- const a157_0x3f9f34=a157_0x254c;(function(_0x2ed91b,_0x15b6bc){const _0x2260c1=a157_0x254c,_0x355d68=_0x2ed91b();while(!![]){try{const _0xbd5a9c=-parseInt(_0x2260c1(0x107))/0x1+-parseInt(_0x2260c1(0x105))/0x2+-parseInt(_0x2260c1(0xf7))/0x3*(-parseInt(_0x2260c1(0x114))/0x4)+-parseInt(_0x2260c1(0x11b))/0x5*(-parseInt(_0x2260c1(0x10b))/0x6)+parseInt(_0x2260c1(0x101))/0x7+parseInt(_0x2260c1(0xf3))/0x8+parseInt(_0x2260c1(0xff))/0x9;if(_0xbd5a9c===_0x15b6bc)break;else _0x355d68['push'](_0x355d68['shift']());}catch(_0x5d3372){_0x355d68['push'](_0x355d68['shift']());}}}(a157_0x7d0b,0xcd362));import{HTTPClient}from'./client/http-client.js';import{CDPApiClient}from'./client/cdp-api-client.js';import{getEndpoint}from'./client/endpoints.js';function a157_0x254c(_0x38a181,_0x3fa072){_0x38a181=_0x38a181-0xef;const _0x7d0bb0=a157_0x7d0b();let _0x254c62=_0x7d0bb0[_0x38a181];return _0x254c62;}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a157_0x7d0b(){const _0x3373c3=['5zwBhOb','getCurrentRealtimeConfigVersion','object','resumeRealtimeJourney','isEnabled','4346008rjDSjt','enabled','listRealtimeJourneys','request','3fCElla','PUT','attributes','/realtime_setting','map','getStatus','pauseRealtimeJourney','httpClient','5847678dqICLZ','cdpClient','6405518bqbcNL','timeout','application/vnd.treasuredata.v1+json','length','1895694lgNOMm','all','1034060PDyYbV','listParentSegments','updateConfig','getCurrentConfigVersion','2251086lHmkvc','proxy','scheduleType','site','accessToken','/audiences/','listJourneys','list','disabled','1356820xuwISo','updatedAt','name','resumeJourney','GET','getConfig','pauseJourney'];a157_0x7d0b=function(){return _0x3373c3;};return a157_0x7d0b();}export class RealtimeSDK{[a157_0x3f9f34(0xfe)];[a157_0x3f9f34(0x100)];constructor(_0xaa8083){const _0x5f1d20=a157_0x3f9f34,_0x2c8979=getEndpoint(_0xaa8083[_0x5f1d20(0x10e)],'cdp'),_0x2bde78=toHeaderRecord(getAuthHeaders(_0xaa8083['site'],_0xaa8083['apiKey'],_0xaa8083[_0x5f1d20(0x10f)]));this[_0x5f1d20(0xfe)]=new HTTPClient(_0x2c8979,{..._0x2bde78,'Accept':_0x5f1d20(0x103),'Content-Type':'application/json'},{'proxy':_0xaa8083[_0x5f1d20(0x10c)],'defaultTimeout':_0xaa8083[_0x5f1d20(0x102)]}),this[_0x5f1d20(0x100)]=new CDPApiClient(_0xaa8083);}async[a157_0x3f9f34(0xf2)](_0xc19310){const _0x7b528f=a157_0x3f9f34;try{const _0x236d33=await this['httpClient'][_0x7b528f(0xf6)](_0x7b528f(0x118),_0x7b528f(0x110)+_0xc19310+_0x7b528f(0xfa));return _0x236d33!==null;}catch{return![];}}async[a157_0x3f9f34(0xfc)](_0x576412){const _0x1499dd=a157_0x3f9f34,_0x1a6ff5=await this[_0x1499dd(0x100)]['getParentSegment'](_0x576412);let _0x51e5a5=![],_0x2568eb=![];try{const _0x4c80a7=await this[_0x1499dd(0xfe)]['request']('GET',_0x1499dd(0x110)+_0x576412+_0x1499dd(0xfa));_0x51e5a5=!![],_0x2568eb=!!(_0x4c80a7&&typeof _0x4c80a7===_0x1499dd(0xf0)&&Object['keys'](_0x4c80a7)[_0x1499dd(0x104)]>0x0);}catch{_0x51e5a5=![],_0x2568eb=![];}return{'parent_segment_id':_0x576412,'parent_segment_name':_0x1a6ff5['attributes']['name'],'realtime_enabled':_0x51e5a5,'realtime_config_exists':_0x2568eb,'status':_0x51e5a5?_0x1499dd(0xf4):_0x1499dd(0x113)};}async[a157_0x3f9f34(0x119)](_0x316c71){const _0x1c1618=a157_0x3f9f34,_0x5902fb=await this[_0x1c1618(0xfe)][_0x1c1618(0xf6)](_0x1c1618(0x118),_0x1c1618(0x110)+_0x316c71+'/realtime_setting');return _0x5902fb||{};}async[a157_0x3f9f34(0x109)](_0x2f073a,_0x4657db){const _0x27933e=a157_0x3f9f34,_0x260892=await this[_0x27933e(0xfe)]['request'](_0x27933e(0xf8),_0x27933e(0x110)+_0x2f073a+_0x27933e(0xfa),{'body':_0x4657db});return _0x260892||{};}async[a157_0x3f9f34(0x112)](){const _0x2c231f=a157_0x3f9f34,_0x985f6f=await this[_0x2c231f(0x100)][_0x2c231f(0x108)](),_0x166001=await Promise[_0x2c231f(0x106)](_0x985f6f[_0x2c231f(0xfb)](async _0x2f52a8=>{const _0x49f117=_0x2c231f,_0x2f1821=await this['isEnabled'](_0x2f52a8['id']);return{'id':_0x2f52a8['id'],'name':_0x2f52a8['attributes'][_0x49f117(0x116)],'population':_0x2f52a8['attributes']['population'],'realtime_enabled':_0x2f1821,'schedule_type':_0x2f52a8['attributes'][_0x49f117(0x10d)],'updated_at':_0x2f52a8[_0x49f117(0xf9)][_0x49f117(0x115)]};}));return _0x166001;}async[a157_0x3f9f34(0x111)](_0x39a7f0){const _0x2a6e4f=a157_0x3f9f34;return await this[_0x2a6e4f(0x100)][_0x2a6e4f(0xf5)](_0x39a7f0);}async[a157_0x3f9f34(0x11a)](_0xb2ead5){const _0x2f8ebf=a157_0x3f9f34;return await this[_0x2f8ebf(0x100)][_0x2f8ebf(0xfd)](_0xb2ead5);}async[a157_0x3f9f34(0x117)](_0xfa902d){const _0x5c70da=a157_0x3f9f34;return await this[_0x5c70da(0x100)][_0x5c70da(0xf1)](_0xfa902d);}async[a157_0x3f9f34(0x10a)](_0x1b9f97){const _0x26cdb1=a157_0x3f9f34;return await this[_0x26cdb1(0x100)][_0x26cdb1(0xef)](_0x1b9f97);}}
1
+ const a157_0x41d25a=a157_0x2421;function a157_0x38f3(){const _0x35dbba=['attributes','updateConfig','11574sAVNSg','getCurrentRealtimeConfigVersion','listJourneys','6522304JFRHNV','733271GunqrA','pauseRealtimeJourney','1690FfpANk','getConfig','cdpClient','2961008PAdesG','/audiences/','3545790FyFZja','getCurrentConfigVersion','PUT','length','site','listRealtimeJourneys','name','listParentSegments','enabled','timeout','resumeRealtimeJourney','getStatus','186774FGhzwd','request','list','609472sEAXCX','scheduleType','map','httpClient','accessToken','object','36gbnrRr','all','application/vnd.treasuredata.v1+json','pauseJourney','/realtime_setting','GET','14NlHpwc','isEnabled','disabled','keys'];a157_0x38f3=function(){return _0x35dbba;};return a157_0x38f3();}(function(_0x14e7b5,_0x1fe857){const _0x2d1cac=a157_0x2421,_0x596b2b=_0x14e7b5();while(!![]){try{const _0x50ae5a=parseInt(_0x2d1cac(0x169))/0x1+-parseInt(_0x2d1cac(0x149))/0x2*(-parseInt(_0x2d1cac(0x166))/0x3)+parseInt(_0x2d1cac(0x158))/0x4+-parseInt(_0x2d1cac(0x155))/0x5*(parseInt(_0x2d1cac(0x14f))/0x6)+-parseInt(_0x2d1cac(0x153))/0x7+parseInt(_0x2d1cac(0x152))/0x8+parseInt(_0x2d1cac(0x143))/0x9*(-parseInt(_0x2d1cac(0x15a))/0xa);if(_0x50ae5a===_0x1fe857)break;else _0x596b2b['push'](_0x596b2b['shift']());}catch(_0x15dc9f){_0x596b2b['push'](_0x596b2b['shift']());}}}(a157_0x38f3,0x67f13));import{HTTPClient}from'./client/http-client.js';function a157_0x2421(_0x18ae6f,_0x38ffb7){_0x18ae6f=_0x18ae6f-0x143;const _0x38f31a=a157_0x38f3();let _0x242120=_0x38f31a[_0x18ae6f];return _0x242120;}import{CDPApiClient}from'./client/cdp-api-client.js';import{getEndpoint}from'./client/endpoints.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class RealtimeSDK{[a157_0x41d25a(0x16c)];[a157_0x41d25a(0x157)];constructor(_0x539f0b){const _0x670c3=a157_0x41d25a,_0x5ec7c1=getEndpoint(_0x539f0b[_0x670c3(0x15e)],'cdp'),_0x5084b0=toHeaderRecord(getAuthHeaders(_0x539f0b['site'],_0x539f0b['apiKey'],_0x539f0b[_0x670c3(0x16d)]));this[_0x670c3(0x16c)]=new HTTPClient(_0x5ec7c1,{..._0x5084b0,'Accept':_0x670c3(0x145),'Content-Type':'application/json'},{'proxy':_0x539f0b['proxy'],'defaultTimeout':_0x539f0b[_0x670c3(0x163)]}),this[_0x670c3(0x157)]=new CDPApiClient(_0x539f0b);}async[a157_0x41d25a(0x14a)](_0x322821){const _0x2c7c58=a157_0x41d25a;try{const _0x40a6a8=await this[_0x2c7c58(0x16c)][_0x2c7c58(0x167)]('GET','/audiences/'+_0x322821+_0x2c7c58(0x147));return _0x40a6a8!==null;}catch{return![];}}async[a157_0x41d25a(0x165)](_0x3dc6ef){const _0x477c4b=a157_0x41d25a,_0x3f9095=await this[_0x477c4b(0x157)]['getParentSegment'](_0x3dc6ef);let _0x3ee508=![],_0x440ba9=![];try{const _0x2dbaa5=await this[_0x477c4b(0x16c)]['request'](_0x477c4b(0x148),'/audiences/'+_0x3dc6ef+_0x477c4b(0x147));_0x3ee508=!![],_0x440ba9=!!(_0x2dbaa5&&typeof _0x2dbaa5===_0x477c4b(0x16e)&&Object[_0x477c4b(0x14c)](_0x2dbaa5)[_0x477c4b(0x15d)]>0x0);}catch{_0x3ee508=![],_0x440ba9=![];}return{'parent_segment_id':_0x3dc6ef,'parent_segment_name':_0x3f9095[_0x477c4b(0x14d)]['name'],'realtime_enabled':_0x3ee508,'realtime_config_exists':_0x440ba9,'status':_0x3ee508?_0x477c4b(0x162):_0x477c4b(0x14b)};}async[a157_0x41d25a(0x156)](_0x2f5dc1){const _0x2f46df=a157_0x41d25a,_0xc1af5e=await this['httpClient'][_0x2f46df(0x167)]('GET',_0x2f46df(0x159)+_0x2f5dc1+'/realtime_setting');return _0xc1af5e||{};}async[a157_0x41d25a(0x14e)](_0x418ae0,_0x1fe5a9){const _0x1716e1=a157_0x41d25a,_0x1ade80=await this[_0x1716e1(0x16c)][_0x1716e1(0x167)](_0x1716e1(0x15c),_0x1716e1(0x159)+_0x418ae0+'/realtime_setting',{'body':_0x1fe5a9});return _0x1ade80||{};}async[a157_0x41d25a(0x168)](){const _0x3ede7a=a157_0x41d25a,_0x2d5af2=await this['cdpClient'][_0x3ede7a(0x161)](),_0x1c4553=await Promise[_0x3ede7a(0x144)](_0x2d5af2[_0x3ede7a(0x16b)](async _0x3be569=>{const _0x540540=_0x3ede7a,_0x203009=await this['isEnabled'](_0x3be569['id']);return{'id':_0x3be569['id'],'name':_0x3be569[_0x540540(0x14d)][_0x540540(0x160)],'population':_0x3be569[_0x540540(0x14d)]['population'],'realtime_enabled':_0x203009,'schedule_type':_0x3be569[_0x540540(0x14d)][_0x540540(0x16a)],'updated_at':_0x3be569[_0x540540(0x14d)]['updatedAt']};}));return _0x1c4553;}async[a157_0x41d25a(0x151)](_0x82edf7){const _0x4c2e9=a157_0x41d25a;return await this[_0x4c2e9(0x157)][_0x4c2e9(0x15f)](_0x82edf7);}async[a157_0x41d25a(0x146)](_0x1cb59d){const _0x443919=a157_0x41d25a;return await this[_0x443919(0x157)][_0x443919(0x154)](_0x1cb59d);}async['resumeJourney'](_0x2e9bac){const _0x4a9f91=a157_0x41d25a;return await this[_0x4a9f91(0x157)][_0x4a9f91(0x164)](_0x2e9bac);}async[a157_0x41d25a(0x15b)](_0x27860f){const _0x4a82a5=a157_0x41d25a;return await this[_0x4a82a5(0x157)][_0x4a82a5(0x150)](_0x27860f);}}
@@ -1 +1 @@
1
- const a158_0x3dd053=a158_0x4475;function a158_0x22b9(){const _0x215fd6=['length','num\x20must\x20be\x20between\x201\x20and\x2010','scheduled','listQueries','620793jhanNF','update','find','run','query','num','1953lxmupI','limit','start_at','string','queries','map','database','1011186ESUWKQ','\x20UTC','floor','slice','1321715dzigGV','1010328KhyvoJ','filter','deleteSchedule','8yQVGaZ','replace','updated_at','type','21jIXUHT','getTime','now','getScheduleHistory','updateSchedule','INVALID_ARGUMENT','createSchedule','Schedule\x20name\x20is\x20required','Query\x20is\x20required','show','created_at','pattern','list','test','12930ENiokd','name','cron','client','Type\x20is\x20required','listSchedules','31720xlkUCz','history','2567068ZCFWmP','NOT_FOUND','push','runSchedule','pagination','time'];a158_0x22b9=function(){return _0x215fd6;};return a158_0x22b9();}(function(_0xfc1a72,_0xed5e41){const _0x51302d=a158_0x4475,_0x2dad8f=_0xfc1a72();while(!![]){try{const _0x54aa42=-parseInt(_0x51302d(0x149))/0x1*(-parseInt(_0x51302d(0x11e))/0x2)+-parseInt(_0x51302d(0x130))/0x3*(-parseInt(_0x51302d(0x145))/0x4)+-parseInt(_0x51302d(0x141))/0x5+-parseInt(_0x51302d(0x13d))/0x6+-parseInt(_0x51302d(0x126))/0x7+-parseInt(_0x51302d(0x142))/0x8+parseInt(_0x51302d(0x136))/0x9*(parseInt(_0x51302d(0x124))/0xa);if(_0x54aa42===_0xed5e41)break;else _0x2dad8f['push'](_0x2dad8f['shift']());}catch(_0x2e0f04){_0x2dad8f['push'](_0x2dad8f['shift']());}}}(a158_0x22b9,0x4c2fe));import{TDApiClient}from'./client/td-api-client.js';function a158_0x4475(_0x5db202,_0x79cd22){_0x5db202=_0x5db202-0x119;const _0x22b9ec=a158_0x22b9();let _0x4475f3=_0x22b9ec[_0x5db202];return _0x4475f3;}import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x2dab03){const _0x28a2b5=a158_0x4475;if(!_0x2dab03)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x28a2b5(0x11d)](_0x2dab03))return _0x2dab03;return _0x2dab03['replace'](_0x28a2b5(0x13e),'Z')[_0x28a2b5(0x146)]('\x20','T');}export class ScheduleSDK{['client'];constructor(_0x13e5b5){const _0x3056e5=a158_0x4475;this[_0x3056e5(0x121)]=new TDApiClient(_0x13e5b5);}async[a158_0x3dd053(0x11c)](_0x38101a){const _0x3cfd2e=a158_0x3dd053,_0x4fb206=await this[_0x3cfd2e(0x121)]['listSchedules'](),_0x4adf32=_0x4fb206['map'](_0x228ff1=>({..._0x228ff1,'created_at':normalizeTimestamp(_0x228ff1[_0x3cfd2e(0x11a)])??_0x228ff1[_0x3cfd2e(0x11a)]}));if(_0x38101a?.[_0x3cfd2e(0x137)]&&_0x38101a[_0x3cfd2e(0x137)]>0x0)return _0x4adf32[_0x3cfd2e(0x140)](0x0,_0x38101a['limit']);return _0x4adf32;}async[a158_0x3dd053(0x12f)](_0x126d99){const _0x6e62e6=a158_0x3dd053,_0x1f2ae1=0x64,_0x5e1bcb=_0x126d99?.['limit'],_0x5129f6=[];let _0x572340=!![],_0x3b0eb6,_0x153853,_0x2f282d;if(_0x126d99?.[_0x6e62e6(0x11b)]){const _0x19172=_0x126d99[_0x6e62e6(0x11b)][_0x6e62e6(0x146)](/[.+^${}()|[\]\\]/g,'\x5c$&'),_0x2108eb=_0x19172[_0x6e62e6(0x146)](/\*/g,'.*')[_0x6e62e6(0x146)](/\?/g,'.');_0x2f282d=new RegExp('^'+_0x2108eb+'$','i');}while(_0x572340&&(!_0x5e1bcb||_0x5129f6[_0x6e62e6(0x12c)]<_0x5e1bcb)){const _0x5906e4=await this[_0x6e62e6(0x121)][_0x6e62e6(0x12f)]({'anchor_column':_0x6e62e6(0x147),'sort_direction':'desc','page_size':_0x1f2ae1,'anchor_id':_0x3b0eb6,'anchor_value':_0x153853});let _0x575fcb=_0x5906e4['queries'];_0x126d99?.[_0x6e62e6(0x12e)]&&(_0x575fcb=_0x575fcb[_0x6e62e6(0x143)](_0x522e82=>_0x522e82[_0x6e62e6(0x120)]!==null));_0x2f282d&&(_0x575fcb=_0x575fcb[_0x6e62e6(0x143)](_0x14b95d=>_0x14b95d[_0x6e62e6(0x11f)]&&_0x2f282d['test'](_0x14b95d['name'])));_0x5129f6[_0x6e62e6(0x128)](..._0x575fcb),_0x572340=_0x5906e4[_0x6e62e6(0x12a)]['has_next_page'];if(_0x572340&&_0x5906e4['queries']['length']>0x0){const _0x49138a=_0x5906e4[_0x6e62e6(0x13a)][_0x5906e4[_0x6e62e6(0x13a)][_0x6e62e6(0x12c)]-0x1];_0x3b0eb6=_0x49138a['id'],_0x153853=_0x49138a[_0x6e62e6(0x147)];}}const _0x59be59=_0x5e1bcb?_0x5129f6['slice'](0x0,_0x5e1bcb):_0x5129f6;return{'queries':_0x59be59,'pagination':{'has_next_page':_0x572340||(_0x5e1bcb?_0x5129f6[_0x6e62e6(0x12c)]>_0x5e1bcb:![])}};}async[a158_0x3dd053(0x119)](_0x4c0828){const _0x354a61=a158_0x3dd053,_0x135987=await this[_0x354a61(0x121)][_0x354a61(0x123)](),_0x40d653=_0x135987[_0x354a61(0x132)](_0x5019af=>_0x5019af[_0x354a61(0x11f)]===_0x4c0828);if(!_0x40d653)throw new SDKError(ErrorCode[_0x354a61(0x127)],'Schedule\x20not\x20found:\x20'+_0x4c0828);return{..._0x40d653,'created_at':normalizeTimestamp(_0x40d653[_0x354a61(0x11a)])??_0x40d653[_0x354a61(0x11a)]};}async['create'](_0x15e4c,_0xfd6c68){const _0x4ff480=a158_0x3dd053;if(!_0x15e4c)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4ff480(0x150));if(!_0xfd6c68[_0x4ff480(0x13c)])throw new SDKError(ErrorCode[_0x4ff480(0x14e)],'Database\x20is\x20required');if(!_0xfd6c68[_0x4ff480(0x134)])throw new SDKError(ErrorCode[_0x4ff480(0x14e)],_0x4ff480(0x151));if(!_0xfd6c68[_0x4ff480(0x148)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4ff480(0x122));return await this[_0x4ff480(0x121)][_0x4ff480(0x14f)](_0x15e4c,_0xfd6c68);}async[a158_0x3dd053(0x131)](_0x4c0d0c,_0x2035bf){const _0x50dd52=a158_0x3dd053;if(!_0x4c0d0c)throw new SDKError(ErrorCode[_0x50dd52(0x14e)],'Schedule\x20name\x20is\x20required');return await this[_0x50dd52(0x121)][_0x50dd52(0x14d)](_0x4c0d0c,_0x2035bf);}async['delete'](_0x56655e){const _0x7938da=a158_0x3dd053;if(!_0x56655e)throw new SDKError(ErrorCode[_0x7938da(0x14e)],'Schedule\x20name\x20is\x20required');return await this[_0x7938da(0x121)][_0x7938da(0x144)](_0x56655e);}async[a158_0x3dd053(0x133)](_0x57211c,_0x2121df){const _0x10135a=a158_0x3dd053;if(!_0x57211c)throw new SDKError(ErrorCode[_0x10135a(0x14e)],_0x10135a(0x150));let _0x248006;if(_0x2121df?.[_0x10135a(0x12b)]){const _0x46b625=typeof _0x2121df[_0x10135a(0x12b)]===_0x10135a(0x139)?new Date(_0x2121df[_0x10135a(0x12b)]):_0x2121df[_0x10135a(0x12b)];if(isNaN(_0x46b625[_0x10135a(0x14a)]()))throw new SDKError(ErrorCode[_0x10135a(0x14e)],'Invalid\x20time\x20format:\x20'+_0x2121df[_0x10135a(0x12b)]);_0x248006=Math[_0x10135a(0x13f)](_0x46b625[_0x10135a(0x14a)]()/0x3e8);}else _0x248006=Math[_0x10135a(0x13f)](Date[_0x10135a(0x14b)]()/0x3e8);if(_0x2121df?.['num']!==undefined){if(_0x2121df[_0x10135a(0x135)]<0x1||_0x2121df[_0x10135a(0x135)]>0xa)throw new SDKError(ErrorCode[_0x10135a(0x14e)],_0x10135a(0x12d));}return await this[_0x10135a(0x121)][_0x10135a(0x129)](_0x57211c,_0x248006,_0x2121df?.['num']);}async[a158_0x3dd053(0x125)](_0x2a47df,_0x3bc0d3){const _0x5218cb=a158_0x3dd053;if(!_0x2a47df)throw new SDKError(ErrorCode[_0x5218cb(0x14e)],_0x5218cb(0x150));const _0xd0f638=await this['client'][_0x5218cb(0x14c)](_0x2a47df,_0x3bc0d3);return{..._0xd0f638,'history':_0xd0f638['history'][_0x5218cb(0x13b)](_0x2126ef=>({..._0x2126ef,'created_at':normalizeTimestamp(_0x2126ef[_0x5218cb(0x11a)]),'start_at':normalizeTimestamp(_0x2126ef[_0x5218cb(0x138)]),'end_at':normalizeTimestamp(_0x2126ef['end_at'])}))};}}
1
+ function a158_0x5a9a(){const _0x18b31c=['end_at','Invalid\x20time\x20format:\x20','has_next_page','Schedule\x20name\x20is\x20required','queries','updated_at','slice','1254285fwCofn','21274RGOiIS','name','client','history','3655869TcKIlU','getTime','type','update','Database\x20is\x20required','deleteSchedule','\x20UTC','limit','INVALID_ARGUMENT','length','test','time','132168ZOiRmG','num','6EwhkvF','Type\x20is\x20required','880LnAPcb','NOT_FOUND','runSchedule','createSchedule','pattern','floor','514844bqUfjx','list','scheduled','start_at','string','created_at','updateSchedule','now','listQueries','134019UuRcEl','map','query','num\x20must\x20be\x20between\x201\x20and\x2010','filter','desc','create','replace','724285wbRTvu'];a158_0x5a9a=function(){return _0x18b31c;};return a158_0x5a9a();}const a158_0x2cec87=a158_0x7e72;(function(_0x4d4dd5,_0x13dc57){const _0x1befd3=a158_0x7e72,_0x571127=_0x4d4dd5();while(!![]){try{const _0x3ae1cd=-parseInt(_0x1befd3(0x1ad))/0x1+-parseInt(_0x1befd3(0x1d1))/0x2+-parseInt(_0x1befd3(0x1d0))/0x3+-parseInt(_0x1befd3(0x1b7))/0x4+parseInt(_0x1befd3(0x1c8))/0x5*(-parseInt(_0x1befd3(0x1af))/0x6)+-parseInt(_0x1befd3(0x1d5))/0x7+parseInt(_0x1befd3(0x1b1))/0x8*(parseInt(_0x1befd3(0x1c0))/0x9);if(_0x3ae1cd===_0x13dc57)break;else _0x571127['push'](_0x571127['shift']());}catch(_0x49ff64){_0x571127['push'](_0x571127['shift']());}}}(a158_0x5a9a,0x44abb));import{TDApiClient}from'./client/td-api-client.js';function a158_0x7e72(_0xbe7428,_0x139fb4){_0xbe7428=_0xbe7428-0x1ad;const _0x5a9a02=a158_0x5a9a();let _0x7e723=_0x5a9a02[_0xbe7428];return _0x7e723;}import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x2c3dd4){const _0x3945d9=a158_0x7e72;if(!_0x2c3dd4)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x2c3dd4))return _0x2c3dd4;return _0x2c3dd4['replace'](_0x3945d9(0x1db),'Z')[_0x3945d9(0x1c7)]('\x20','T');}export class ScheduleSDK{[a158_0x2cec87(0x1d3)];constructor(_0x30685d){const _0x27ec3e=a158_0x2cec87;this[_0x27ec3e(0x1d3)]=new TDApiClient(_0x30685d);}async[a158_0x2cec87(0x1b8)](_0x1aabdd){const _0x4d4701=a158_0x2cec87,_0x451f04=await this[_0x4d4701(0x1d3)]['listSchedules'](),_0xd2cf98=_0x451f04[_0x4d4701(0x1c1)](_0x40f3f7=>({..._0x40f3f7,'created_at':normalizeTimestamp(_0x40f3f7[_0x4d4701(0x1bc)])??_0x40f3f7[_0x4d4701(0x1bc)]}));if(_0x1aabdd?.['limit']&&_0x1aabdd['limit']>0x0)return _0xd2cf98[_0x4d4701(0x1cf)](0x0,_0x1aabdd[_0x4d4701(0x1dc)]);return _0xd2cf98;}async[a158_0x2cec87(0x1bf)](_0x29a133){const _0x23b54f=a158_0x2cec87,_0x281986=0x64,_0x1f7a06=_0x29a133?.[_0x23b54f(0x1dc)],_0x30d6ab=[];let _0x3e4a86=!![],_0x180aeb,_0x2ee043,_0x3e1b53;if(_0x29a133?.[_0x23b54f(0x1b5)]){const _0x429a87=_0x29a133[_0x23b54f(0x1b5)][_0x23b54f(0x1c7)](/[.+^${}()|[\]\\]/g,'\x5c$&'),_0x4114ca=_0x429a87['replace'](/\*/g,'.*')[_0x23b54f(0x1c7)](/\?/g,'.');_0x3e1b53=new RegExp('^'+_0x4114ca+'$','i');}while(_0x3e4a86&&(!_0x1f7a06||_0x30d6ab['length']<_0x1f7a06)){const _0x497f2d=await this[_0x23b54f(0x1d3)][_0x23b54f(0x1bf)]({'anchor_column':'updated_at','sort_direction':_0x23b54f(0x1c5),'page_size':_0x281986,'anchor_id':_0x180aeb,'anchor_value':_0x2ee043});let _0x263c3c=_0x497f2d[_0x23b54f(0x1cd)];_0x29a133?.[_0x23b54f(0x1b9)]&&(_0x263c3c=_0x263c3c[_0x23b54f(0x1c4)](_0x37a439=>_0x37a439['cron']!==null));_0x3e1b53&&(_0x263c3c=_0x263c3c[_0x23b54f(0x1c4)](_0x4fae84=>_0x4fae84[_0x23b54f(0x1d2)]&&_0x3e1b53[_0x23b54f(0x1df)](_0x4fae84[_0x23b54f(0x1d2)])));_0x30d6ab['push'](..._0x263c3c),_0x3e4a86=_0x497f2d['pagination'][_0x23b54f(0x1cb)];if(_0x3e4a86&&_0x497f2d[_0x23b54f(0x1cd)][_0x23b54f(0x1de)]>0x0){const _0x160b59=_0x497f2d[_0x23b54f(0x1cd)][_0x497f2d[_0x23b54f(0x1cd)][_0x23b54f(0x1de)]-0x1];_0x180aeb=_0x160b59['id'],_0x2ee043=_0x160b59[_0x23b54f(0x1ce)];}}const _0x1bc139=_0x1f7a06?_0x30d6ab['slice'](0x0,_0x1f7a06):_0x30d6ab;return{'queries':_0x1bc139,'pagination':{'has_next_page':_0x3e4a86||(_0x1f7a06?_0x30d6ab[_0x23b54f(0x1de)]>_0x1f7a06:![])}};}async['show'](_0x5e1b58){const _0x45a68b=a158_0x2cec87,_0x2e199c=await this[_0x45a68b(0x1d3)]['listSchedules'](),_0x14ccca=_0x2e199c['find'](_0x2afdcd=>_0x2afdcd['name']===_0x5e1b58);if(!_0x14ccca)throw new SDKError(ErrorCode[_0x45a68b(0x1b2)],'Schedule\x20not\x20found:\x20'+_0x5e1b58);return{..._0x14ccca,'created_at':normalizeTimestamp(_0x14ccca[_0x45a68b(0x1bc)])??_0x14ccca[_0x45a68b(0x1bc)]};}async[a158_0x2cec87(0x1c6)](_0x1c4a96,_0x492efb){const _0x5c7907=a158_0x2cec87;if(!_0x1c4a96)throw new SDKError(ErrorCode[_0x5c7907(0x1dd)],_0x5c7907(0x1cc));if(!_0x492efb['database'])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5c7907(0x1d9));if(!_0x492efb[_0x5c7907(0x1c2)])throw new SDKError(ErrorCode[_0x5c7907(0x1dd)],'Query\x20is\x20required');if(!_0x492efb[_0x5c7907(0x1d7)])throw new SDKError(ErrorCode[_0x5c7907(0x1dd)],_0x5c7907(0x1b0));return await this[_0x5c7907(0x1d3)][_0x5c7907(0x1b4)](_0x1c4a96,_0x492efb);}async[a158_0x2cec87(0x1d8)](_0x32b79a,_0x16f4d3){const _0x555dc9=a158_0x2cec87;if(!_0x32b79a)throw new SDKError(ErrorCode[_0x555dc9(0x1dd)],_0x555dc9(0x1cc));return await this[_0x555dc9(0x1d3)][_0x555dc9(0x1bd)](_0x32b79a,_0x16f4d3);}async['delete'](_0x2fc5c5){const _0x4f3a37=a158_0x2cec87;if(!_0x2fc5c5)throw new SDKError(ErrorCode[_0x4f3a37(0x1dd)],_0x4f3a37(0x1cc));return await this[_0x4f3a37(0x1d3)][_0x4f3a37(0x1da)](_0x2fc5c5);}async['run'](_0x35c646,_0x361833){const _0x46d3de=a158_0x2cec87;if(!_0x35c646)throw new SDKError(ErrorCode[_0x46d3de(0x1dd)],_0x46d3de(0x1cc));let _0x3f9166;if(_0x361833?.[_0x46d3de(0x1e0)]){const _0x138d6b=typeof _0x361833[_0x46d3de(0x1e0)]===_0x46d3de(0x1bb)?new Date(_0x361833[_0x46d3de(0x1e0)]):_0x361833[_0x46d3de(0x1e0)];if(isNaN(_0x138d6b[_0x46d3de(0x1d6)]()))throw new SDKError(ErrorCode[_0x46d3de(0x1dd)],_0x46d3de(0x1ca)+_0x361833['time']);_0x3f9166=Math[_0x46d3de(0x1b6)](_0x138d6b[_0x46d3de(0x1d6)]()/0x3e8);}else _0x3f9166=Math[_0x46d3de(0x1b6)](Date[_0x46d3de(0x1be)]()/0x3e8);if(_0x361833?.['num']!==undefined){if(_0x361833[_0x46d3de(0x1ae)]<0x1||_0x361833[_0x46d3de(0x1ae)]>0xa)throw new SDKError(ErrorCode[_0x46d3de(0x1dd)],_0x46d3de(0x1c3));}return await this['client'][_0x46d3de(0x1b3)](_0x35c646,_0x3f9166,_0x361833?.[_0x46d3de(0x1ae)]);}async[a158_0x2cec87(0x1d4)](_0x503f6e,_0x59bfb1){const _0x558830=a158_0x2cec87;if(!_0x503f6e)throw new SDKError(ErrorCode[_0x558830(0x1dd)],_0x558830(0x1cc));const _0x1950b6=await this[_0x558830(0x1d3)]['getScheduleHistory'](_0x503f6e,_0x59bfb1);return{..._0x1950b6,'history':_0x1950b6[_0x558830(0x1d4)]['map'](_0x274358=>({..._0x274358,'created_at':normalizeTimestamp(_0x274358[_0x558830(0x1bc)]),'start_at':normalizeTimestamp(_0x274358[_0x558830(0x1ba)]),'end_at':normalizeTimestamp(_0x274358[_0x558830(0x1c9)])}))};}}