@treasuredata/tdx 2026.3.53 → 2026.3.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/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-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a31_0x2d63b8=a31_0x5a47;(function(_0x1d035a,_0xda3790){const _0xeefeea=a31_0x5a47,_0x222d5f=_0x1d035a();while(!![]){try{const _0x5de228=-parseInt(_0xeefeea(0xf7))/0x1*(-parseInt(_0xeefeea(0x240))/0x2)+parseInt(_0xeefeea(0x1a4))/0x3+parseInt(_0xeefeea(0x1ac))/0x4+-parseInt(_0xeefeea(0x133))/0x5*(parseInt(_0xeefeea(0x117))/0x6)+-parseInt(_0xeefeea(0x1f8))/0x7+-parseInt(_0xeefeea(0x1ee))/0x8*(-parseInt(_0xeefeea(0xf8))/0x9)+-parseInt(_0xeefeea(0x14c))/0xa;if(_0x5de228===_0xda3790)break;else _0x222d5f['push'](_0x222d5f['shift']());}catch(_0x51d646){_0x222d5f['push'](_0x222d5f['shift']());}}}(a31_0x3692,0x22ed1));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x141e1c from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x1fbc7e from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x2d63b8(0x21b),LEGACY_PARENT_SEGMENT_DIR=a31_0x2d63b8(0x236);function openBrowser(_0x50856c){const _0x14e4ff=a31_0x2d63b8,_0x3b3ad0=process[_0x14e4ff(0x25a)],_0x37726c=_0x3b3ad0===_0x14e4ff(0xb6)?_0x14e4ff(0x10f):_0x3b3ad0==='win32'?_0x14e4ff(0xe5):_0x14e4ff(0x1c3);spawn(_0x37726c,[_0x50856c],{'detached':!![],'stdio':_0x14e4ff(0x289)})[_0x14e4ff(0x254)]();}function migrateLegacyDirectory(){const _0x3a72b8=a31_0x2d63b8;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x4cea3b=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x4cea3b[_0x3a72b8(0x2b4)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x1fbc7e[_0x3a72b8(0x29a)](_0x3a72b8(0x27d)+LEGACY_PARENT_SEGMENT_DIR+_0x3a72b8(0x275)+PARENT_SEGMENT_DIR+_0x3a72b8(0x233))),console['error'](a31_0x1fbc7e['dim'](_0x3a72b8(0x169)+LEGACY_PARENT_SEGMENT_DIR+_0x3a72b8(0x1ae))),![];console[_0x3a72b8(0x17a)](a31_0x1fbc7e[_0x3a72b8(0x29a)](_0x3a72b8(0x1b8)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3a72b8(0x17a)](a31_0x1fbc7e[_0x3a72b8(0xb5)](_0x3a72b8(0x20e)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x183512){const _0x3d9a34=_0x183512 instanceof Error?_0x183512[_0x3a72b8(0x1b6)]:String(_0x183512);return console['error'](a31_0x1fbc7e[_0x3a72b8(0x1d8)](_0x3a72b8(0x14d)+_0x3d9a34+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x2d63b8(0x271)](_0x4a4e3f){const _0x5998fb=a31_0x2d63b8;return migrateLegacyDirectory(),super[_0x5998fb(0x271)](_0x4a4e3f);}}function resolveYamlFile(_0x54cdde){const _0x325361=a31_0x2d63b8;if(_0x54cdde[_0x325361(0x1db)](_0x325361(0x194))||_0x54cdde[_0x325361(0x1db)](_0x325361(0x226)))return _0x54cdde;return a31_0x141e1c[_0x325361(0x19d)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x54cdde)+_0x325361(0x194));}function formatProgressMessage(_0x5bd35d){const _0x3254b9=a31_0x2d63b8,_0x4cd20c=_0x5bd35d[_0x3254b9(0x19b)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x4cd20c){const [,_0x16aaf0,_0xbf0c4d,_0x1f4de3='']=_0x4cd20c;return a31_0x1fbc7e[_0x3254b9(0x1a0)](_0x16aaf0+':')+'\x20'+_0xbf0c4d+a31_0x1fbc7e['dim'](_0x1f4de3);}return a31_0x1fbc7e[_0x3254b9(0x1a0)](_0x5bd35d);}function showFileNotFoundError(_0x5541b2,_0xd8327b){const _0x42f76e=a31_0x2d63b8;console[_0x42f76e(0x17a)](a31_0x1fbc7e[_0x42f76e(0x1d8)](_0x42f76e(0x205)+_0x5541b2+'\x0a')),console[_0x42f76e(0x17a)](a31_0x1fbc7e[_0x42f76e(0x26d)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0xd8327b+_0x42f76e(0x1b3)));}function displayRealtimeValidation(_0x376c1c){const _0x3d0d05=a31_0x2d63b8;if(!_0x376c1c['realtime'])return;const _0x5e871c=_0x376c1c[_0x3d0d05(0x27e)],_0x1ba166=_0x5e871c[_0x3d0d05(0xb7)]?a31_0x1fbc7e[_0x3d0d05(0xb5)](_0x3d0d05(0x1fc)):a31_0x1fbc7e[_0x3d0d05(0x29a)](_0x3d0d05(0x2b5));console[_0x3d0d05(0x17a)]('\x0a'+a31_0x1fbc7e[_0x3d0d05(0x1a0)](_0x3d0d05(0x116))+'\x20'+_0x1ba166);if(_0x5e871c[_0x3d0d05(0x18e)]&&_0x5e871c[_0x3d0d05(0x18e)][_0x3d0d05(0x1ba)]>0x0){console[_0x3d0d05(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x3d0d05(0x1a0)](_0x3d0d05(0x283))+'\x20'+_0x5e871c[_0x3d0d05(0x18e)][_0x3d0d05(0x1ba)]+_0x3d0d05(0x16f));for(const _0x4f350e of _0x5e871c['events']){const _0x35e486=_0x4f350e[_0x3d0d05(0x1e1)]===![]?a31_0x1fbc7e['red']('✘'):a31_0x1fbc7e[_0x3d0d05(0xb5)]('✔');console[_0x3d0d05(0x17a)](_0x3d0d05(0x25d)+_0x35e486+'\x20'+_0x4f350e[_0x3d0d05(0x105)]),_0x4f350e[_0x3d0d05(0x20d)]&&console['error'](_0x3d0d05(0x212)+a31_0x1fbc7e[_0x3d0d05(0x1d8)](_0x4f350e[_0x3d0d05(0x20d)]));}}if(_0x5e871c[_0x3d0d05(0x17d)]&&_0x5e871c[_0x3d0d05(0x17d)][_0x3d0d05(0x1ba)]>0x0){console[_0x3d0d05(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x3d0d05(0x1a0)](_0x3d0d05(0x195))+'\x20'+_0x5e871c['attributes'][_0x3d0d05(0x1ba)]+'\x20configured');for(const _0x39be07 of _0x5e871c[_0x3d0d05(0x17d)]){const _0x40a699=_0x39be07[_0x3d0d05(0x1f4)]?a31_0x1fbc7e[_0x3d0d05(0xb5)]('✔'):a31_0x1fbc7e['red']('✘');console[_0x3d0d05(0x17a)](_0x3d0d05(0x25d)+_0x40a699+'\x20'+_0x39be07['name']+'\x20'+a31_0x1fbc7e['dim']('('+_0x39be07[_0x3d0d05(0xa3)]+')'));}}if(_0x5e871c[_0x3d0d05(0x172)]){const _0x2a9907=_0x5e871c[_0x3d0d05(0x172)][_0x3d0d05(0x149)]?.[_0x3d0d05(0x1ba)]?'\x20+\x20['+_0x5e871c['idStitching'][_0x3d0d05(0x149)][_0x3d0d05(0x19d)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x1fbc7e[_0x3d0d05(0x1a0)](_0x3d0d05(0xd1))+'\x20'+_0x5e871c[_0x3d0d05(0x172)][_0x3d0d05(0x15d)]+_0x2a9907);}if(_0x5e871c[_0x3d0d05(0x12b)]&&_0x5e871c[_0x3d0d05(0x12b)][_0x3d0d05(0x1ba)]>0x0){console[_0x3d0d05(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x3d0d05(0x1a0)](_0x3d0d05(0x24a))+'\x20'+_0x5e871c[_0x3d0d05(0x12b)][_0x3d0d05(0x1ba)]+_0x3d0d05(0xfe)+(_0x5e871c[_0x3d0d05(0x12b)][_0x3d0d05(0x1ba)]!==0x1?'s':''));for(const _0x238a65 of _0x5e871c['personalizationServices']){console['error']('\x20\x20\x20\x20-\x20'+_0x238a65[_0x3d0d05(0x105)]);}}}function showParentSegmentNotSetError(_0x303562){const _0xfc80ed=a31_0x2d63b8;console[_0xfc80ed(0x17a)](a31_0x1fbc7e['yellow'](_0xfc80ed(0x12a))),console[_0xfc80ed(0x17a)](_0x303562);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='segment:parent:list';[a31_0x2d63b8(0x2ad)]='List\x20parent\x20segments';async['execute'](_0xcc8179){const _0x39cd55=a31_0x2d63b8,{options:_0x102a59,args:_0x56c44c,tdx:_0x5dfdfe}=_0xcc8179,_0x5a576b=_0x56c44c[0x0];_0x102a59['verbose']&&(console['error'](_0x39cd55(0x26b)+_0x102a59[_0x39cd55(0xe0)]),_0x5a576b&&console[_0x39cd55(0x17a)]('Pattern:\x20'+_0x5a576b));const _0x5904d7=await withSpinner(_0x5a576b?_0x39cd55(0x183)+_0x5a576b+'\x27...':'Listing\x20parent\x20segments...',()=>_0x5dfdfe[_0x39cd55(0xc6)][_0x39cd55(0x2b1)](),{'verbose':_0x102a59[_0x39cd55(0xfa)]});let _0x473323=_0x5904d7[_0x39cd55(0x244)];if(_0x5a576b){const _0x186abe=_0x5a576b[_0x39cd55(0x204)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x39cd55(0x204)](/\*/g,'.*')[_0x39cd55(0x204)](/\?/g,'.'),_0x45cc36=new RegExp('^'+_0x186abe+'$','i');_0x473323=_0x473323['filter'](_0x1b025a=>_0x45cc36[_0x39cd55(0xc8)](_0x1b025a[_0x39cd55(0x17d)]['name']));}_0x473323[_0x39cd55(0x248)]((_0x3c2bb2,_0x5706aa)=>_0x3c2bb2[_0x39cd55(0x17d)][_0x39cd55(0x105)][_0x39cd55(0xbd)](_0x5706aa[_0x39cd55(0x17d)][_0x39cd55(0x105)])),console[_0x39cd55(0x17a)](_0x39cd55(0x2b6)+_0x473323['length']+_0x39cd55(0x219)+(_0x473323[_0x39cd55(0x1ba)]!==0x1?'s':''));const _0x254632=_0x29ad69=>{const _0x1fe0f6=_0x39cd55;return getConsoleNextUrl(_0x102a59[_0x1fe0f6(0xe0)],_0x1fe0f6(0x132)+_0x29ad69);};if(_0x102a59['format']===_0x39cd55(0xeb)||_0x102a59[_0x39cd55(0xab)]===_0x39cd55(0xfd)){const _0x331f66=_0x473323[_0x39cd55(0x10b)](_0x34f855=>({..._0x34f855,'url':_0x254632(_0x34f855['id'])}));await handleSDKOutput(_0x331f66,_0x102a59);}else{if(_0x473323['length']===0x0)_0x5a576b?console[_0x39cd55(0x113)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x5a576b):console[_0x39cd55(0x113)](_0x39cd55(0x217));else for(const _0x3d8912 of _0x473323){const _0x5984e0=_0x3d8912[_0x39cd55(0x17d)][_0x39cd55(0x29d)]?a31_0x1fbc7e[_0x39cd55(0x1a0)]('\x20('+formatRows(_0x3d8912[_0x39cd55(0x17d)][_0x39cd55(0x29d)])+')'):'',_0x1a0ce8=hyperlink(_0x3d8912[_0x39cd55(0x17d)][_0x39cd55(0x105)],_0x254632(_0x3d8912['id']));console[_0x39cd55(0x113)]('👥\x20'+_0x1a0ce8+_0x5984e0);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x175);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x177);async[a31_0x2d63b8(0x25f)](_0x27e1cb){const _0x1a2e95=a31_0x2d63b8,{options:_0x13965f,args:_0x224b87,tdx:_0x45133f}=_0x27e1cb;console['error'](_0x1a2e95(0x24c)+_0x1a2e95(0x1c7)+_0x1a2e95(0x29b));const _0x334500=_0x13965f;if(_0x224b87[_0x1a2e95(0x1ba)]===0x0)return console[_0x1a2e95(0x17a)](a31_0x1fbc7e['red'](_0x1a2e95(0x288))),console[_0x1a2e95(0x17a)](_0x1a2e95(0xa8)),0x1;const _0x40a153=_0x224b87[0x0];if(!_0x334500['database']||!_0x334500[_0x1a2e95(0xca)])return console[_0x1a2e95(0x17a)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x1a2e95(0x17a)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x334500[_0x1a2e95(0xfa)]&&(console['error'](_0x1a2e95(0x26b)+_0x334500[_0x1a2e95(0xe0)]),console[_0x1a2e95(0x17a)]('Name:\x20'+_0x40a153),console[_0x1a2e95(0x17a)]('Database:\x20'+_0x334500[_0x1a2e95(0x139)]),console[_0x1a2e95(0x17a)](_0x1a2e95(0x2b0)+_0x334500[_0x1a2e95(0xca)]));const _0x24a790=await loadJSONFromOptions(_0x334500[_0x1a2e95(0x17d)],_0x334500[_0x1a2e95(0x196)]),_0x180e05=await loadJSONFromOptions(_0x334500[_0x1a2e95(0xda)],_0x334500['behaviorsFile']),_0x4fd2ef=await loadJSONFromOptions(_0x334500[_0x1a2e95(0x1af)],_0x334500[_0x1a2e95(0x1d7)]),_0x3ff590={'name':_0x40a153,'description':_0x334500[_0x1a2e95(0x2ad)],'scheduleType':_0x334500['scheduleType'],'scheduleOption':_0x334500['scheduleOption'],'timezone':_0x334500[_0x1a2e95(0x2b8)],'master':{'parentDatabaseName':_0x334500[_0x1a2e95(0x139)],'parentTableName':_0x334500['table']},'attributes':_0x24a790,'behaviors':_0x180e05,'customerGroup':_0x4fd2ef},_0xe8ba07=await withSpinner(_0x1a2e95(0x19e)+_0x40a153+_0x1a2e95(0x1ca),()=>_0x45133f[_0x1a2e95(0xc6)]['createParent'](_0x3ff590),{'verbose':_0x13965f['verbose']}),_0x3d0e20=_0xe8ba07[_0x1a2e95(0x244)];return console['error'](_0x1a2e95(0x253)+_0x3d0e20['name']+'\x27\x20with\x20ID:\x20'+_0x3d0e20['id']),await handleSDKOutput([_0x3d0e20],_0x13965f),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x148);['description']=a31_0x2d63b8(0xfb);async[a31_0x2d63b8(0x25f)](_0x196811){const _0x96e19e=a31_0x2d63b8,{options:_0x1f3dd1,args:_0x1d1e74,tdx:_0x450adc}=_0x196811;console[_0x96e19e(0x17a)](_0x96e19e(0x185)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x96e19e(0x29b));const _0x5782c6=_0x1f3dd1;if(_0x1d1e74[_0x96e19e(0x1ba)]===0x0)return console[_0x96e19e(0x17a)](a31_0x1fbc7e['red']('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x96e19e(0x17a)](_0x96e19e(0x1d3)),0x1;const _0x3b6355=_0x1d1e74[0x0];_0x5782c6[_0x96e19e(0xfa)]&&(console[_0x96e19e(0x17a)]('Site:\x20'+_0x5782c6['site']),console[_0x96e19e(0x17a)](_0x96e19e(0x119)+_0x3b6355));const _0x6187f7=await withSpinner(_0x96e19e(0x1d5)+_0x3b6355+_0x96e19e(0x1ca),()=>_0x450adc['segment']['getParentFull'](_0x3b6355),{'verbose':_0x5782c6[_0x96e19e(0xfa)]}),_0x34fab9=_0x6187f7[_0x96e19e(0x244)],_0x2c042e=await loadJSONFromOptions(_0x5782c6[_0x96e19e(0x297)],_0x5782c6[_0x96e19e(0xaf)]),_0x5f5101=await loadJSONFromOptions(_0x5782c6[_0x96e19e(0xe4)],_0x5782c6[_0x96e19e(0x11c)]),_0x55ef85={'name':_0x34fab9[_0x96e19e(0x105)],'description':_0x5782c6['description']!==undefined?_0x5782c6['description']:_0x34fab9[_0x96e19e(0x2ad)],'scheduleType':_0x5782c6[_0x96e19e(0x1be)]!==undefined?_0x5782c6[_0x96e19e(0x1be)]:_0x34fab9[_0x96e19e(0x1be)],'scheduleOption':_0x5782c6[_0x96e19e(0x20f)]!==undefined?_0x5782c6['scheduleOption']:_0x34fab9[_0x96e19e(0x20f)],'timezone':_0x5782c6['timezone']!==undefined?_0x5782c6['timezone']:_0x34fab9[_0x96e19e(0x2b8)],'master':_0x34fab9['master'],'attributes':_0x2c042e?[..._0x34fab9['attributes']||[],..._0x2c042e]:_0x34fab9[_0x96e19e(0x17d)],'behaviors':_0x5f5101?[..._0x34fab9[_0x96e19e(0xda)]||[],..._0x5f5101]:_0x34fab9[_0x96e19e(0xda)],'customerGroup':_0x34fab9[_0x96e19e(0x1af)]},_0xbf9870=await withSpinner(_0x96e19e(0x261)+_0x3b6355+_0x96e19e(0x1ca),()=>_0x450adc[_0x96e19e(0xc6)][_0x96e19e(0x12e)](_0x3b6355,_0x55ef85),{'verbose':_0x5782c6[_0x96e19e(0xfa)]}),_0x1de722=_0xbf9870[_0x96e19e(0x244)];return console[_0x96e19e(0x17a)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x1de722[_0x96e19e(0x105)]+'\x27'),await handleSDKOutput([_0x1de722],_0x5782c6),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x1e3);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x112);async[a31_0x2d63b8(0x25f)](_0x1c41da){const _0x585dda=a31_0x2d63b8,{options:_0x1a7022,args:_0x183831,tdx:_0x3c3069}=_0x1c41da,_0x4fcda3=_0x1a7022,_0x563de3=_0x183831[0x0]||_0x1a7022['parentSegment'];if(!_0x563de3)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+_0x585dda(0x251)),0x1;if(_0x4fcda3['use']&&_0x4fcda3['output'])return console['error'](a31_0x1fbc7e[_0x585dda(0x1d8)](_0x585dda(0x1d2))),console['error'](a31_0x1fbc7e[_0x585dda(0x1a0)](_0x585dda(0xc0))),console[_0x585dda(0x17a)](a31_0x1fbc7e[_0x585dda(0x1a0)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+_0x585dda(0x28b))),console[_0x585dda(0x17a)](a31_0x1fbc7e[_0x585dda(0x26d)](_0x585dda(0xbf))),0x1;const _0x38fe13=_0x4fcda3[_0x585dda(0x2ae)]||a31_0x141e1c[_0x585dda(0x19d)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x563de3)+_0x585dda(0x194));_0x4fcda3[_0x585dda(0xfa)]&&(console[_0x585dda(0x17a)](_0x585dda(0x26b)+_0x4fcda3[_0x585dda(0xe0)]),console['error'](_0x585dda(0x119)+_0x563de3),console[_0x585dda(0x17a)](_0x585dda(0x286)+_0x38fe13));const _0xb04746=await withSpinner(_0x585dda(0x104)+_0x563de3+'\x27...',()=>_0x3c3069['segment'][_0x585dda(0x23f)](_0x563de3),{'verbose':_0x4fcda3[_0x585dda(0xfa)]}),_0x1dc5b2=_0xb04746[_0x585dda(0x244)];if(existsSync(_0x38fe13)){const _0x3a821e=readFileSync(_0x38fe13,_0x585dda(0x28e)),_0x1adf4f=generateDiff(_0x3a821e,_0x1dc5b2);if(!hasChanges(_0x1adf4f))console[_0x585dda(0x17a)](a31_0x1fbc7e[_0x585dda(0xb5)]('✔')+_0x585dda(0x28d)+a31_0x1fbc7e[_0x585dda(0x26d)](_0x38fe13)+_0x585dda(0x127));else{console[_0x585dda(0x17a)](_0x585dda(0x241)+_0x38fe13+'\x27:'),console['error']('─'['repeat'](0x3c)),console[_0x585dda(0x17a)](formatDiffWithColors(_0x1adf4f)),console[_0x585dda(0x17a)]('─'[_0x585dda(0x2bb)](0x3c));if(!_0x4fcda3[_0x585dda(0x1dd)]){if(!isInteractive())return console[_0x585dda(0x17a)](a31_0x1fbc7e[_0x585dda(0x1d8)](_0x585dda(0x1a7)),_0x585dda(0xe3)),console[_0x585dda(0x17a)](a31_0x1fbc7e[_0x585dda(0x1a0)](_0x585dda(0xe6))),0x1;const _0x432789=await confirmKey(_0x585dda(0x159)+_0x38fe13+'\x27?');if(!_0x432789)return console[_0x585dda(0x17a)](a31_0x1fbc7e['yellow']('Aborted.')),0x1;}writeFileSync(_0x38fe13,_0x1dc5b2,_0x585dda(0x28e)),console[_0x585dda(0x17a)](a31_0x1fbc7e[_0x585dda(0xb5)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x1fbc7e[_0x585dda(0x26d)](_0x38fe13));}}else{const _0x48ef4b=a31_0x141e1c['dirname'](_0x38fe13);!existsSync(_0x48ef4b)&&mkdirSync(_0x48ef4b,{'recursive':!![]}),writeFileSync(_0x38fe13,_0x1dc5b2,_0x585dda(0x28e)),console[_0x585dda(0x17a)](a31_0x1fbc7e['green']('✔')+_0x585dda(0x107)+a31_0x1fbc7e[_0x585dda(0x26d)](_0x38fe13));}return saveSessionContext({'parent_segment':_0x563de3},_0x4fcda3[_0x585dda(0x201)]),console['error'](a31_0x1fbc7e['green']('✔')+'\x20Context\x20set:\x20'+a31_0x1fbc7e[_0x585dda(0x1a0)](_0x585dda(0x236))+'\x20=\x20'+a31_0x1fbc7e['cyan'](_0x563de3)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']='segment:parent:push';['description']='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async[a31_0x2d63b8(0x25f)](_0x8915f7){const _0x4925d6=a31_0x2d63b8,{options:_0x1d3851,args:_0x2c96be,tdx:_0x4c2f82}=_0x8915f7,_0x26e470=_0x1d3851,_0x5d0f3e=_0x2c96be[0x0]||_0x1d3851[_0x4925d6(0x1b7)];if(!_0x5d0f3e)return showParentSegmentNotSetError(_0x4925d6(0x178)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x231d17=resolveYamlFile(_0x5d0f3e);if(!existsSync(_0x231d17))return showFileNotFoundError(_0x231d17,_0x5d0f3e),0x1;_0x26e470['verbose']&&(console[_0x4925d6(0x17a)](_0x4925d6(0x26b)+_0x26e470[_0x4925d6(0xe0)]),console[_0x4925d6(0x17a)](_0x4925d6(0x192)+_0x231d17));let _0x1d946f;try{_0x1d946f=readFileSync(_0x231d17,'utf-8');}catch(_0x4f5a03){const _0x25ca0d=_0x4f5a03 instanceof Error?_0x4f5a03[_0x4925d6(0x1b6)]:String(_0x4f5a03);return console[_0x4925d6(0x17a)](_0x4925d6(0x162)+_0x25ca0d),0x1;}const _0x4a60ec=await withSpinner(_0x4925d6(0x17e),()=>_0x4c2f82[_0x4925d6(0xc6)]['pushParentYaml'](_0x1d946f),{'verbose':_0x26e470[_0x4925d6(0xfa)]}),_0x20ad12=_0x4a60ec['data'],{isNew:_0x2fb064,name:_0x2285b7,hasChanges:_0x39bf4e,diffFormatted:_0x4ef74c}=_0x20ad12;if(!_0x39bf4e)return console[_0x4925d6(0x17a)](_0x4925d6(0x292)+_0x2285b7+_0x4925d6(0x277)),0x0;_0x2fb064?console[_0x4925d6(0x17a)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x2285b7+'\x27:'):console[_0x4925d6(0x17a)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x2285b7+'\x27:');console[_0x4925d6(0x17a)]('─'[_0x4925d6(0x2bb)](0x3c)),console[_0x4925d6(0x17a)](_0x4ef74c),console[_0x4925d6(0x17a)]('─'[_0x4925d6(0x2bb)](0x3c));const _0x3eb6d5=_0x2fb064?_0x4925d6(0x276)+_0x2285b7+'\x27?':_0x4925d6(0x130)+_0x2285b7+'\x27?';if(!_0x26e470[_0x4925d6(0x1dd)]){if(!isInteractive())return console['error'](a31_0x1fbc7e[_0x4925d6(0x1d8)](_0x4925d6(0x1a7)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4925d6(0x17a)](a31_0x1fbc7e['dim'](_0x4925d6(0xe6))),0x1;const _0x490afc=await confirmKey(_0x3eb6d5);if(!_0x490afc)return console[_0x4925d6(0x17a)](a31_0x1fbc7e[_0x4925d6(0x29a)](_0x4925d6(0x22d))),0x1;}const _0x147b17=_0x2fb064?'Creating':_0x4925d6(0x1c4),_0x49183a=await withSpinner(_0x147b17+'\x20parent\x20segment\x20\x27'+_0x2285b7+_0x4925d6(0x1ca),()=>_0x20ad12[_0x4925d6(0x189)](),{'verbose':_0x26e470[_0x4925d6(0xfa)]}),_0x2cea49=_0x49183a['data'],_0x493835=getConsoleNextUrl(_0x26e470['site'],_0x4925d6(0x132)+_0x2cea49['id']),_0x17b236=_0x2fb064?_0x4925d6(0xde):_0x4925d6(0x100);return console[_0x4925d6(0x17a)]('✔\x20'+_0x17b236+_0x4925d6(0x268)+_0x2cea49[_0x4925d6(0x105)]+'\x27'),console[_0x4925d6(0x17a)]('\x20\x20'+_0x493835),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x17f);[a31_0x2d63b8(0x2ad)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async['execute'](_0x12563b){const _0x24bb49=a31_0x2d63b8,{options:_0x1ae7ea,args:_0x3acd1a,tdx:_0xbfeb69}=_0x12563b,_0x1431b7=_0x1ae7ea,_0x2ef54d=_0x3acd1a[0x0]||_0x1ae7ea[_0x24bb49(0x1b7)];if(!_0x2ef54d)return showParentSegmentNotSetError(_0x24bb49(0x1c8)+_0x24bb49(0x176)+'Options:\x0a'+_0x24bb49(0x27a)+_0x24bb49(0x28a)+_0x24bb49(0x249)),0x1;const _0x330a09=resolveYamlFile(_0x2ef54d);if(!existsSync(_0x330a09))return showFileNotFoundError(_0x330a09,_0x2ef54d),0x1;_0x1431b7['verbose']&&(console['error'](_0x24bb49(0x26b)+_0x1431b7[_0x24bb49(0xe0)]),console['error'](_0x24bb49(0x192)+_0x330a09));let _0x486765;try{_0x486765=readFileSync(_0x330a09,_0x24bb49(0x28e));}catch(_0x515d3e){const _0x5ee8e0=_0x515d3e instanceof Error?_0x515d3e[_0x24bb49(0x1b6)]:String(_0x515d3e);return console['error'](_0x24bb49(0x162)+_0x5ee8e0),0x1;}const _0x2f3208=createCommandSpinner(a31_0x1fbc7e[_0x24bb49(0x1a0)]('Validating\x20configuration...'),{'verbose':_0x1431b7['verbose']});_0x2f3208[_0x24bb49(0xe5)]();const _0x11842e={'onProgress':_0x312392=>{_0x2f3208['text']=formatProgressMessage(_0x312392);}};if(_0x1431b7[_0x24bb49(0x22b)])_0x11842e[_0x24bb49(0x22b)]=!![];if(_0x1431b7[_0x24bb49(0x16b)])_0x11842e[_0x24bb49(0x16b)]=!![];_0x1431b7['attribute']&&(_0x11842e['attribute']=_0x1431b7[_0x24bb49(0x279)]);_0x1431b7[_0x24bb49(0x168)]&&(_0x11842e[_0x24bb49(0x168)]=_0x1431b7[_0x24bb49(0x168)]);if(_0x1431b7['interval'])_0x11842e['interval']=_0x1431b7[_0x24bb49(0x299)];let _0x1c7695;try{_0x1c7695=await _0xbfeb69['segment'][_0x24bb49(0x1fe)](_0x486765,_0x11842e),_0x2f3208[_0x24bb49(0xaa)]();}catch(_0xbd05b9){_0x2f3208[_0x24bb49(0xaa)]();throw _0xbd05b9;}const _0x399081=_0x1431b7[_0x24bb49(0x299)]||'-1d';return this['displayValidateResults'](_0x1c7695,_0x11842e,_0x330a09,_0x399081),_0x1c7695[_0x24bb49(0x264)]?0x0:0x1;}[a31_0x2d63b8(0x273)](_0x3ef3f0,_0xee57d5,_0x440798,_0x3a26a4){const _0x3b5121=a31_0x2d63b8;console[_0x3b5121(0x17a)]('\x0a'+a31_0x1fbc7e[_0x3b5121(0x1f6)](_0x3b5121(0x12f))+'\x20'+_0x3ef3f0[_0x3b5121(0x105)]),console[_0x3b5121(0x17a)]('═'['repeat'](0x3c)),this['displayMasterInfo'](_0x3ef3f0);if(typeof _0xee57d5[_0x3b5121(0x279)]===_0x3b5121(0x171)){this[_0x3b5121(0x145)](_0x3ef3f0),this[_0x3b5121(0x23c)](_0x3ef3f0),this[_0x3b5121(0x2b3)](_0x440798,_0x3a26a4,'attribute',_0xee57d5['attribute']);return;}if(_0xee57d5[_0x3b5121(0x279)]===!![]){this[_0x3b5121(0x145)](_0x3ef3f0),this[_0x3b5121(0x23c)](_0x3ef3f0),this['displayPreviewHints'](_0x440798,_0x3a26a4,_0x3b5121(0x17d));return;}if(typeof _0xee57d5[_0x3b5121(0x168)]===_0x3b5121(0x171)){this[_0x3b5121(0x11a)](_0x3ef3f0,_0x3a26a4),this[_0x3b5121(0x23c)](_0x3ef3f0),this[_0x3b5121(0x2b3)](_0x440798,_0x3a26a4,_0x3b5121(0x168),_0xee57d5[_0x3b5121(0x168)]);return;}if(_0xee57d5[_0x3b5121(0x168)]===!![]){this['displayBehaviorsStats'](_0x3ef3f0,_0x3a26a4),this['displaySummary'](_0x3ef3f0),this[_0x3b5121(0x2b3)](_0x440798,_0x3a26a4,_0x3b5121(0xda));return;}this['displayAttributesStats'](_0x3ef3f0),this['displayBehaviorsStats'](_0x3ef3f0,_0x3a26a4),this['displayRealtimeInfo'](_0x3ef3f0),this[_0x3b5121(0x23c)](_0x3ef3f0),this['displayPreviewHints'](_0x440798,_0x3a26a4,'all');}[a31_0x2d63b8(0x1f9)](_0x2363aa){displayRealtimeValidation(_0x2363aa);}[a31_0x2d63b8(0x2b3)](_0x56da05,_0x361e8e,_0x535a6e,_0x38f0a8){const _0x406842=a31_0x2d63b8;console[_0x406842(0x17a)]('\x0a'+a31_0x1fbc7e[_0x406842(0x1a0)](_0x406842(0x15a)));const _0x28f966=_0x361e8e!==_0x406842(0x242)?_0x406842(0x10a)+_0x361e8e:'';if(_0x535a6e===_0x406842(0x279)&&_0x38f0a8)console[_0x406842(0x17a)]('\x20\x20'+a31_0x1fbc7e['dim'](_0x406842(0x13d)+_0x56da05+_0x406842(0x154)+_0x38f0a8+'\x22'+_0x28f966));else{if(_0x535a6e===_0x406842(0x168)&&_0x38f0a8)console['error']('\x20\x20'+a31_0x1fbc7e[_0x406842(0x1a0)](_0x406842(0x13d)+_0x56da05+_0x406842(0x260)+_0x38f0a8+'\x22'+_0x28f966));else(_0x535a6e===_0x406842(0x17d)||_0x535a6e===_0x406842(0x1eb))&&console['error']('\x20\x20'+a31_0x1fbc7e['dim']('tdx\x20ps\x20preview\x20'+_0x56da05+'\x20--attribute\x20\x22<name>\x22'+_0x28f966));}(_0x535a6e===_0x406842(0xda)||_0x535a6e===_0x406842(0x1eb))&&console[_0x406842(0x17a)]('\x20\x20'+a31_0x1fbc7e['dim'](_0x406842(0x13d)+_0x56da05+'\x20--behavior\x20\x22<name>\x22'+_0x28f966)),_0x535a6e===_0x406842(0x1eb)&&console[_0x406842(0x17a)]('\x20\x20'+a31_0x1fbc7e['dim'](_0x406842(0x13d)+_0x56da05+_0x406842(0x140)+_0x28f966));}['displayMasterInfo'](_0x14fc84){const _0x548b60=a31_0x2d63b8,{master:_0x18d77f}=_0x14fc84,_0x210911=_0x18d77f[_0x548b60(0x284)]?a31_0x1fbc7e[_0x548b60(0xb5)]('✔'):a31_0x1fbc7e[_0x548b60(0x1d8)]('✘');console[_0x548b60(0x17a)]('\x0a'+a31_0x1fbc7e[_0x548b60(0x1a0)](_0x548b60(0x1ab))),console['error'](_0x210911+'\x20'+a31_0x1fbc7e[_0x548b60(0x1f6)](_0x18d77f[_0x548b60(0x139)]+'.'+_0x18d77f[_0x548b60(0xca)])),_0x18d77f[_0x548b60(0x284)]?_0x18d77f[_0x548b60(0x222)]!==undefined&&console[_0x548b60(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x548b60(0x1a0)](_0x548b60(0x2ba))+'\x20'+a31_0x1fbc7e[_0x548b60(0x26d)](formatRows(_0x18d77f[_0x548b60(0x222)]))):console['error']('\x20\x20'+a31_0x1fbc7e[_0x548b60(0x1d8)](_0x548b60(0xdd))+'\x20'+_0x18d77f['schemaError']);}[a31_0x2d63b8(0x145)](_0x14814f){const _0x261327=a31_0x2d63b8;if(_0x14814f['attributes']['length']===0x0)return;console[_0x261327(0x17a)]('\x0a'+a31_0x1fbc7e[_0x261327(0x1a0)](_0x261327(0x227)));for(const _0xdbfecc of _0x14814f[_0x261327(0x17d)]){const _0x237019=_0xdbfecc['schemaValid']?a31_0x1fbc7e[_0x261327(0xb5)]('✔'):a31_0x1fbc7e[_0x261327(0x1d8)]('✘');let _0x300f55='';if(_0xdbfecc[_0x261327(0x284)]&&_0xdbfecc['matchedCount']!==undefined&&_0xdbfecc[_0x261327(0x1e2)]!==undefined){const _0x2f017e=_0xdbfecc[_0x261327(0x1e2)][_0x261327(0x26e)](0x1),_0x3f7fa6=_0xdbfecc[_0x261327(0x1e2)]>=0x50?a31_0x1fbc7e['green']:_0xdbfecc[_0x261327(0x1e2)]>=0x32?a31_0x1fbc7e['yellow']:a31_0x1fbc7e[_0x261327(0x1d8)];_0x300f55='\x20'+a31_0x1fbc7e[_0x261327(0x1a0)](_0x261327(0x2a0))+'\x20'+_0x3f7fa6(_0x2f017e+'%')+'\x20('+formatRows(_0xdbfecc[_0x261327(0x287)])+_0x261327(0x291);}console[_0x261327(0x17a)](_0x237019+'\x20'+a31_0x1fbc7e[_0x261327(0x1f6)](_0xdbfecc[_0x261327(0x105)])+_0x300f55),console[_0x261327(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x261327(0x1a0)](_0x261327(0xf6))+'\x20'+a31_0x1fbc7e['bold'](_0xdbfecc['database']+'.'+_0xdbfecc[_0x261327(0xca)]));const _0x590ed8=_0xdbfecc['joinKey']===_0xdbfecc[_0x261327(0x165)]?a31_0x1fbc7e[_0x261327(0x1a0)](_0x261327(0xb0))+'\x20'+_0xdbfecc[_0x261327(0x1cf)]:a31_0x1fbc7e[_0x261327(0x1a0)]('Join:')+'\x20'+_0xdbfecc['joinKey']+'\x20=\x20'+_0xdbfecc[_0x261327(0x165)];console[_0x261327(0x17a)]('\x20\x20'+_0x590ed8),console[_0x261327(0x17a)]('\x20\x20'+a31_0x1fbc7e['dim'](_0x261327(0x20c))),this[_0x261327(0x1c1)](_0xdbfecc[_0x261327(0x247)]),!_0xdbfecc[_0x261327(0x284)]&&console[_0x261327(0x17a)]('\x20\x20'+a31_0x1fbc7e['red']('Error:')+'\x20'+_0xdbfecc[_0x261327(0x265)]);}}[a31_0x2d63b8(0x11a)](_0x5ab28a,_0x2386c2){const _0x4877f4=a31_0x2d63b8;if(_0x5ab28a[_0x4877f4(0xda)][_0x4877f4(0x1ba)]===0x0)return;console[_0x4877f4(0x17a)]('\x0a'+a31_0x1fbc7e[_0x4877f4(0x1a0)](_0x4877f4(0x124))+'\x20'+a31_0x1fbc7e[_0x4877f4(0x1a0)]('('+_0x2386c2+')'));for(const _0x2891ed of _0x5ab28a[_0x4877f4(0xda)]){const _0x140918=_0x2891ed['schemaValid']?a31_0x1fbc7e[_0x4877f4(0xb5)]('✔'):a31_0x1fbc7e['red']('✘');let _0x455291='';if(_0x2891ed[_0x4877f4(0x284)]&&_0x2891ed['customersWithEvents']!==undefined&&_0x2891ed[_0x4877f4(0x18c)]!==undefined){const _0x1310aa=_0x2891ed[_0x4877f4(0x186)]?.['toFixed'](0x1)||'?',_0x17f3cb=(_0x2891ed[_0x4877f4(0x186)]??0x0)>=0x32?a31_0x1fbc7e[_0x4877f4(0xb5)]:(_0x2891ed[_0x4877f4(0x186)]??0x0)>=0x14?a31_0x1fbc7e[_0x4877f4(0x29a)]:a31_0x1fbc7e[_0x4877f4(0x1d8)];_0x455291='\x20'+a31_0x1fbc7e['dim'](_0x4877f4(0x136))+'\x20'+_0x17f3cb(formatRows(_0x2891ed[_0x4877f4(0xbc)]))+'\x20('+_0x1310aa+'%)\x20'+a31_0x1fbc7e['dim'](_0x4877f4(0x283))+'\x20'+a31_0x1fbc7e[_0x4877f4(0x26d)](formatRows(_0x2891ed['totalEvents']));}console['error'](_0x140918+'\x20'+a31_0x1fbc7e[_0x4877f4(0x1f6)](_0x2891ed[_0x4877f4(0x105)])+_0x455291),console['error']('\x20\x20'+a31_0x1fbc7e[_0x4877f4(0x1a0)](_0x4877f4(0xf6))+'\x20'+a31_0x1fbc7e[_0x4877f4(0x1f6)](_0x2891ed[_0x4877f4(0x139)]+'.'+_0x2891ed[_0x4877f4(0xca)]));const _0x345cdd=_0x2891ed['joinKey']===_0x2891ed[_0x4877f4(0x165)]?a31_0x1fbc7e[_0x4877f4(0x1a0)](_0x4877f4(0xb0))+'\x20'+_0x2891ed['joinKey']:a31_0x1fbc7e[_0x4877f4(0x1a0)]('Join:')+'\x20'+_0x2891ed['joinKey']+_0x4877f4(0x15c)+_0x2891ed[_0x4877f4(0x165)];console['error']('\x20\x20'+_0x345cdd),console[_0x4877f4(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x4877f4(0x1a0)](_0x4877f4(0x20c))),this[_0x4877f4(0x1c1)](_0x2891ed[_0x4877f4(0x247)]),!_0x2891ed['schemaValid']&&console[_0x4877f4(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x4877f4(0x1d8)](_0x4877f4(0xdd))+'\x20'+_0x2891ed['schemaError']);}}[a31_0x2d63b8(0x1c1)](_0xc9b137){const _0x2c8ba4=a31_0x2d63b8;for(const _0x52a4c6 of _0xc9b137){_0x52a4c6[_0x2c8ba4(0x190)]===_0x52a4c6[_0x2c8ba4(0x1ea)]||_0x52a4c6['column']==='*'?console['error'](_0x2c8ba4(0x150)+_0x52a4c6[_0x2c8ba4(0x190)]):console[_0x2c8ba4(0x17a)]('\x20\x20\x20\x20-\x20'+_0x52a4c6[_0x2c8ba4(0x190)]+'\x20'+a31_0x1fbc7e['dim']('('+_0x52a4c6[_0x2c8ba4(0x1ea)]+')'));}}['displaySummary'](_0x2dd087){const _0x2dec86=a31_0x2d63b8;console[_0x2dec86(0x17a)]('─'[_0x2dec86(0x2bb)](0x3c));if(_0x2dd087['errors'][_0x2dec86(0x1ba)]>0x0){console['error']('\x0a'+a31_0x1fbc7e[_0x2dec86(0x1d8)](_0x2dec86(0x2a7)));for(const _0xcf5b6c of _0x2dd087[_0x2dec86(0xff)]){console['error']('\x20\x20'+a31_0x1fbc7e['red']('•')+'\x20'+_0xcf5b6c);}}_0x2dd087[_0x2dec86(0x264)]&&console['error']('\x0a'+a31_0x1fbc7e[_0x2dec86(0xb5)]('✔')+_0x2dec86(0xa9));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xbe);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0xf1);async[a31_0x2d63b8(0x25f)](_0x595802){const _0x25a6a1=a31_0x2d63b8,{options:_0x57236e,args:_0x5b3c70,tdx:_0x136887}=_0x595802,_0x12f7be=_0x57236e,_0x3579dc=_0x5b3c70[0x0]||_0x57236e[_0x25a6a1(0x1b7)];if(!_0x3579dc)return showParentSegmentNotSetError(_0x25a6a1(0x1a5)+_0x25a6a1(0x1a9)+_0x25a6a1(0x13a)+_0x25a6a1(0x1b2)+_0x25a6a1(0x1fa)+_0x25a6a1(0x229)+_0x25a6a1(0x167)+_0x25a6a1(0x249)),0x1;if(!_0x12f7be[_0x25a6a1(0x22b)]&&!_0x12f7be[_0x25a6a1(0x279)]&&!_0x12f7be['behavior']&&!_0x12f7be[_0x25a6a1(0x16b)])return console[_0x25a6a1(0x17a)](a31_0x1fbc7e['red']('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console['error'](_0x25a6a1(0xf5)),console[_0x25a6a1(0x17a)]('Options:'),console[_0x25a6a1(0x17a)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x25a6a1(0x17a)](_0x25a6a1(0x223)),console['error'](_0x25a6a1(0x20a)),console['error'](_0x25a6a1(0xd0)),0x1;const _0x44822b=resolveYamlFile(_0x3579dc);if(!existsSync(_0x44822b))return showFileNotFoundError(_0x44822b,_0x3579dc),0x1;_0x12f7be[_0x25a6a1(0xfa)]&&(console[_0x25a6a1(0x17a)](_0x25a6a1(0x26b)+_0x12f7be[_0x25a6a1(0xe0)]),console[_0x25a6a1(0x17a)](_0x25a6a1(0x192)+_0x44822b));let _0x15b5b9;try{_0x15b5b9=readFileSync(_0x44822b,_0x25a6a1(0x28e));}catch(_0x24cbf0){const _0x51f560=_0x24cbf0 instanceof Error?_0x24cbf0[_0x25a6a1(0x1b6)]:String(_0x24cbf0);return console[_0x25a6a1(0x17a)]('Error\x20reading\x20file:\x20'+_0x51f560),0x1;}let _0x1c984b;try{_0x1c984b=parseDef(_0x15b5b9);}catch(_0x571513){const _0x2b19ac=_0x571513 instanceof Error?_0x571513[_0x25a6a1(0x1b6)]:String(_0x571513);return console[_0x25a6a1(0x17a)](a31_0x1fbc7e[_0x25a6a1(0x1d8)](_0x25a6a1(0xc1)+_0x2b19ac)),0x1;}if(_0x12f7be[_0x25a6a1(0x279)]===!![]||_0x12f7be[_0x25a6a1(0x279)]===''){const _0x5047bd=_0x1c984b[_0x25a6a1(0x17d)]?.['map'](_0x5131fa=>_0x5131fa[_0x25a6a1(0x105)])||[];if(_0x5047bd['length']===0x0)console[_0x25a6a1(0x17a)](a31_0x1fbc7e[_0x25a6a1(0x1d8)](_0x25a6a1(0x108)));else{console[_0x25a6a1(0x17a)](a31_0x1fbc7e[_0x25a6a1(0x1d8)](_0x25a6a1(0x1e9))),console[_0x25a6a1(0x17a)]('Available\x20attributes:');for(const _0x4b0f53 of _0x5047bd){console[_0x25a6a1(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x25a6a1(0x26d)](_0x4b0f53));}console[_0x25a6a1(0x17a)](_0x25a6a1(0x24e)+_0x3579dc+'\x20--attribute\x20\x22'+_0x5047bd[0x0]+'\x22');}return 0x1;}if(_0x12f7be['behavior']===!![]||_0x12f7be[_0x25a6a1(0x168)]===''){const _0x5918dd=_0x1c984b[_0x25a6a1(0xda)]?.[_0x25a6a1(0x10b)](_0xc2fa6b=>_0xc2fa6b[_0x25a6a1(0x105)])||[];if(_0x5918dd[_0x25a6a1(0x1ba)]===0x0)console[_0x25a6a1(0x17a)](a31_0x1fbc7e[_0x25a6a1(0x1d8)](_0x25a6a1(0x166)));else{console[_0x25a6a1(0x17a)](a31_0x1fbc7e[_0x25a6a1(0x1d8)](_0x25a6a1(0x28c))),console[_0x25a6a1(0x17a)]('Available\x20behaviors:');for(const _0x5ec022 of _0x5918dd){console[_0x25a6a1(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x25a6a1(0x26d)](_0x5ec022));}console[_0x25a6a1(0x17a)](_0x25a6a1(0x24e)+_0x3579dc+_0x25a6a1(0x260)+_0x5918dd[0x0]+'\x22');}return 0x1;}const _0x230f43=createCommandSpinner(a31_0x1fbc7e[_0x25a6a1(0x1a0)](_0x25a6a1(0x1a3)),{'verbose':_0x12f7be[_0x25a6a1(0xfa)]});_0x230f43[_0x25a6a1(0xe5)]();const _0x439e31={'onProgress':_0x114d66=>{const _0x305ff7=_0x25a6a1;_0x230f43[_0x305ff7(0x252)]=formatProgressMessage(_0x114d66);}};if(_0x12f7be[_0x25a6a1(0x22b)])_0x439e31[_0x25a6a1(0x22b)]=!![];if(_0x12f7be[_0x25a6a1(0x279)]&&typeof _0x12f7be[_0x25a6a1(0x279)]===_0x25a6a1(0x171))_0x439e31['attribute']=_0x12f7be['attribute'];if(_0x12f7be[_0x25a6a1(0x168)]&&typeof _0x12f7be[_0x25a6a1(0x168)]===_0x25a6a1(0x171))_0x439e31[_0x25a6a1(0x168)]=_0x12f7be[_0x25a6a1(0x168)];if(_0x12f7be['enriched'])_0x439e31[_0x25a6a1(0x16b)]=!![];if(_0x12f7be[_0x25a6a1(0x299)])_0x439e31[_0x25a6a1(0x299)]=_0x12f7be[_0x25a6a1(0x299)];let _0x12c94c;try{_0x12c94c=await _0x136887[_0x25a6a1(0xc6)][_0x25a6a1(0x22e)](_0x15b5b9,_0x439e31),_0x230f43[_0x25a6a1(0xaa)]();}catch(_0xee2761){_0x230f43['stop']();throw _0xee2761;}return await this[_0x25a6a1(0x2b7)](_0x12c94c,{'master':_0x12f7be[_0x25a6a1(0x22b)],'attribute':typeof _0x12f7be[_0x25a6a1(0x279)]===_0x25a6a1(0x171)?_0x12f7be[_0x25a6a1(0x279)]:undefined,'behavior':typeof _0x12f7be[_0x25a6a1(0x168)]==='string'?_0x12f7be['behavior']:undefined,'enriched':_0x12f7be[_0x25a6a1(0x16b)]}),_0x12c94c[_0x25a6a1(0x264)]?0x0:0x1;}async[a31_0x2d63b8(0x2b7)](_0x2bfee1,_0x5ebcc4){const _0x46e902=a31_0x2d63b8;console[_0x46e902(0x17a)]('\x0a'+a31_0x1fbc7e[_0x46e902(0x1f6)](_0x46e902(0x238))+'\x20'+_0x2bfee1['name']),console['error']('═'[_0x46e902(0x2bb)](0x3c));if(_0x5ebcc4['master']&&_0x2bfee1[_0x46e902(0x198)]){const _0x520af0=a31_0x1fbc7e['dim'](_0x46e902(0x1bc))+'\x20'+a31_0x1fbc7e[_0x46e902(0x1f6)](_0x2bfee1['master'][_0x46e902(0x139)]+'.'+_0x2bfee1[_0x46e902(0x22b)][_0x46e902(0xca)]);await this[_0x46e902(0x207)](_0x520af0,_0x2bfee1[_0x46e902(0x198)]);}else{if(_0x5ebcc4[_0x46e902(0x279)]&&_0x2bfee1[_0x46e902(0x198)]){const _0x28f634=a31_0x1fbc7e[_0x46e902(0x1a0)](_0x46e902(0x1b9))+'\x20'+a31_0x1fbc7e[_0x46e902(0x1f6)](_0x5ebcc4[_0x46e902(0x279)]);await this['displaySampleData'](_0x28f634,_0x2bfee1['sampleData']);}else{if(_0x5ebcc4[_0x46e902(0x168)]&&_0x2bfee1[_0x46e902(0x198)]){const _0x5a9a21=a31_0x1fbc7e[_0x46e902(0x1a0)](_0x46e902(0x143))+'\x20'+a31_0x1fbc7e[_0x46e902(0x1f6)](_0x5ebcc4[_0x46e902(0x168)]);await this['displaySampleData'](_0x5a9a21,_0x2bfee1[_0x46e902(0x198)]);}else{if(_0x5ebcc4['enriched']&&_0x2bfee1[_0x46e902(0x198)]){const _0x247b9c=a31_0x1fbc7e[_0x46e902(0x1a0)]('Enriched:')+'\x20'+a31_0x1fbc7e[_0x46e902(0x1f6)]('Master\x20+\x20Attributes');await this[_0x46e902(0x207)](_0x247b9c,_0x2bfee1['sampleData']);}else!_0x2bfee1[_0x46e902(0x198)]&&console[_0x46e902(0x17a)](_0x46e902(0x1c0));}}}if(_0x2bfee1[_0x46e902(0xff)]['length']>0x0){console['error']('─'['repeat'](0x3c)),console[_0x46e902(0x17a)]('\x0a'+a31_0x1fbc7e['red'](_0x46e902(0x2a7)));for(const _0x53b0da of _0x2bfee1['errors']){console[_0x46e902(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x46e902(0x1d8)]('•')+'\x20'+_0x53b0da);}}}async[a31_0x2d63b8(0x207)](_0x507476,_0x2eccf5){const _0x3dc61e=a31_0x2d63b8;if(_0x2eccf5[_0x3dc61e(0x1ba)]===0x0){console['error']('\x0a'+_0x507476),console[_0x3dc61e(0x17a)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x3dc61e(0x17a)]('\x0a'+_0x507476);const _0x2792fd=Object[_0x3dc61e(0x131)](_0x2eccf5[0x0])[_0x3dc61e(0x10b)](_0xa7693b=>({'name':_0xa7693b,'type':typeof _0x2eccf5[0x0][_0xa7693b]===_0x3dc61e(0x28f)?_0x3dc61e(0x259):_0x3dc61e(0x1f2)})),_0x285639={'queryId':'preview','columns':_0x2792fd,'data':_0x2eccf5,'stats':{'state':_0x3dc61e(0x122),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2eccf5['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x41e507=formatAsTable(_0x285639,_0x2eccf5[_0x3dc61e(0x1ba)],!![]);await writeOutput(_0x41e507,undefined,_0x3dc61e(0xca));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x272);[a31_0x2d63b8(0x2ad)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a31_0x2d63b8(0x25f)](_0x5f43ef){const _0x1221cd=a31_0x2d63b8,{options:_0x165d64,args:_0x166d33,tdx:_0x1e9e49}=_0x5f43ef,_0x4ea396=_0x165d64,_0x78b6e2=_0x166d33[0x0]||_0x165d64['parentSegment'];if(!_0x78b6e2)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x563bb6=resolveYamlFile(_0x78b6e2);if(existsSync(_0x563bb6)){_0x4ea396[_0x1221cd(0xfa)]&&console[_0x1221cd(0x17a)](_0x1221cd(0xed)+_0x563bb6);let _0xb81149;try{_0xb81149=readFileSync(_0x563bb6,_0x1221cd(0x28e));}catch(_0x5f4417){const _0x9e29ed=_0x5f4417 instanceof Error?_0x5f4417[_0x1221cd(0x1b6)]:String(_0x5f4417);return console[_0x1221cd(0x17a)]('Error\x20reading\x20file:\x20'+_0x9e29ed),0x1;}const _0x26b4b6=await withSpinner('Analyzing\x20changes...',()=>_0x1e9e49[_0x1221cd(0xc6)][_0x1221cd(0xce)](_0xb81149),{'verbose':_0x4ea396[_0x1221cd(0xfa)]}),_0x5b1956=_0x26b4b6[_0x1221cd(0x244)],{isNew:_0x9de6c1,name:_0x27d4e7,hasChanges:_0xcc7e,diffFormatted:_0x5c05c8}=_0x5b1956;if(_0xcc7e){_0x9de6c1?console[_0x1221cd(0x17a)](_0x1221cd(0x2b2)+_0x27d4e7+'\x27:'):console['error'](_0x1221cd(0x1b1)+_0x27d4e7+'\x27:');console[_0x1221cd(0x17a)]('─'[_0x1221cd(0x2bb)](0x3c)),console['error'](_0x5c05c8),console[_0x1221cd(0x17a)]('─'[_0x1221cd(0x2bb)](0x3c));const _0xf6c3f3=_0x9de6c1?_0x1221cd(0x276)+_0x27d4e7+_0x1221cd(0x1a1):_0x1221cd(0x130)+_0x27d4e7+_0x1221cd(0x1a1);if(!_0x4ea396[_0x1221cd(0x1dd)]){if(!isInteractive())return console['error'](a31_0x1fbc7e['red']('\x0aError:'),_0x1221cd(0xe3)),console[_0x1221cd(0x17a)](a31_0x1fbc7e[_0x1221cd(0x1a0)](_0x1221cd(0xe6))),0x1;const _0x2d9ff2=await confirmKey(_0xf6c3f3);if(!_0x2d9ff2)return console[_0x1221cd(0x17a)](a31_0x1fbc7e[_0x1221cd(0x29a)](_0x1221cd(0x22d))),0x1;}const _0x131768=_0x9de6c1?_0x1221cd(0x155):'Updating';await withSpinner(_0x131768+_0x1221cd(0x268)+_0x27d4e7+'\x27...',()=>_0x5b1956[_0x1221cd(0x189)](),{'verbose':_0x4ea396['verbose']});const _0x1090d3=_0x9de6c1?'Created':'Updated';console[_0x1221cd(0x17a)]('✔\x20'+_0x1090d3+_0x1221cd(0x268)+_0x27d4e7+'\x27');}else console[_0x1221cd(0x17a)]('✔\x20No\x20changes\x20-\x20\x27'+_0x27d4e7+'\x27\x20is\x20up\x20to\x20date');}const _0x1b2e32=await withSpinner(_0x1221cd(0x278)+_0x78b6e2+_0x1221cd(0x1ca),()=>_0x1e9e49[_0x1221cd(0xc6)][_0x1221cd(0x274)](_0x78b6e2),{'verbose':_0x4ea396[_0x1221cd(0xfa)]}),_0x3ae05a=_0x1b2e32[_0x1221cd(0x244)],_0x3b9f98=getConsoleUrl(_0x4ea396[_0x1221cd(0xe0)],_0x1221cd(0xa7)+_0x3ae05a[_0x1221cd(0x2a8)]+_0x1221cd(0x21a)+_0x3ae05a[_0x1221cd(0xb3)]+_0x1221cd(0x1de)+_0x3ae05a['workflowAttemptId']);return console['error'](_0x1221cd(0x163)),console[_0x1221cd(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x1221cd(0x1a0)]('Audience\x20ID:')+'\x20'+_0x3ae05a[_0x1221cd(0x281)]),console['error']('\x20\x20'+a31_0x1fbc7e[_0x1221cd(0x1a0)](_0x1221cd(0x214))+'\x20'+_0x3ae05a[_0x1221cd(0x1ed)]),console['error']('\x20\x20'+a31_0x1fbc7e['dim'](_0x1221cd(0xb8))+'\x20'+_0x3ae05a['workflowSessionId']),console[_0x1221cd(0x17a)]('\x20\x20'+a31_0x1fbc7e[_0x1221cd(0x1a0)](_0x1221cd(0x1b5))+'\x20'+_0x3ae05a[_0x1221cd(0x10e)]),console[_0x1221cd(0x17a)]('\x20\x20'+_0x3b9f98),console[_0x1221cd(0x17a)]('\x0a'+a31_0x1fbc7e[_0x1221cd(0x1a0)](_0x1221cd(0x16c))+_0x1221cd(0xc4)+_0x3ae05a[_0x1221cd(0x10e)]+_0x1221cd(0xf3)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x164);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x24f);async[a31_0x2d63b8(0x25f)](_0x4416b1){const _0x4468f0=a31_0x2d63b8,{options:_0x55243d,args:_0x3ce510,tdx:_0x4abffb}=_0x4416b1,_0x3566f2=_0x3ce510[0x0]||_0x55243d[_0x4468f0(0x1b7)];if(!_0x3566f2)return showParentSegmentNotSetError(_0x4468f0(0x232)+_0x4468f0(0x25b)),0x1;_0x55243d[_0x4468f0(0xfa)]&&(console['error'](_0x4468f0(0x26b)+_0x55243d['site']),console[_0x4468f0(0x17a)](_0x4468f0(0x119)+_0x3566f2));const _0x282755=await withSpinner(_0x4468f0(0xdb)+_0x3566f2+_0x4468f0(0x1ca),()=>_0x4abffb[_0x4468f0(0xc6)]['listFields'](_0x3566f2),{'verbose':_0x55243d[_0x4468f0(0xfa)]}),_0x40ceeb=_0x282755[_0x4468f0(0x244)];console[_0x4468f0(0x17a)](_0x4468f0(0x2b6)+_0x40ceeb['length']+_0x4468f0(0x14a)+(_0x40ceeb[_0x4468f0(0x1ba)]!==0x1?'s':''));if(_0x55243d[_0x4468f0(0xeb)]||_0x55243d[_0x4468f0(0xfd)])return await handleSDKOutput(_0x40ceeb,_0x55243d),0x0;return displayFieldsHumanReadable(_0x40ceeb,_0x3566f2),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{['name']=a31_0x2d63b8(0x13e);[a31_0x2d63b8(0x2ad)]='Show\x20parent\x20segment\x20details';async[a31_0x2d63b8(0x25f)](_0x5a3131){const _0x215dac=a31_0x2d63b8,{options:_0x15d7fa,args:_0x3216b4,tdx:_0x49dca6}=_0x5a3131,_0x1edfe3=_0x15d7fa,_0x3bbb20=_0x3216b4[0x0]||_0x15d7fa['parentSegment'];if(!_0x3bbb20)return showParentSegmentNotSetError(_0x215dac(0x294)+_0x215dac(0x1e5)+_0x215dac(0x2b9)+_0x215dac(0x182)),0x1;_0x15d7fa[_0x215dac(0xfa)]&&(console[_0x215dac(0x17a)](_0x215dac(0x26b)+_0x15d7fa[_0x215dac(0xe0)]),console[_0x215dac(0x17a)]('Parent\x20segment:\x20'+_0x3bbb20));const _0x4c2ad6=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x3bbb20+_0x215dac(0x1ca),()=>_0x49dca6[_0x215dac(0xc6)][_0x215dac(0x224)](_0x3bbb20),{'verbose':_0x15d7fa[_0x215dac(0xfa)]}),_0x225ad3=_0x4c2ad6[_0x215dac(0x244)];if(_0x1edfe3[_0x215dac(0x1df)]){const _0x325cb3=getConsoleNextUrl(_0x1edfe3['site'],_0x215dac(0x132)+_0x225ad3['id']);return console[_0x215dac(0x17a)](a31_0x1fbc7e[_0x215dac(0xb5)]('✔')+'\x20Opening\x20'+a31_0x1fbc7e[_0x215dac(0x26d)](_0x325cb3)),openBrowser(_0x325cb3),0x0;}return await handleSingleObjectOutput(_0x225ad3,_0x15d7fa),0x0;}}function a31_0x5a47(_0x4c66de,_0x303a6b){_0x4c66de=_0x4c66de-0xa3;const _0x3692d4=a31_0x3692();let _0x5a4745=_0x3692d4[_0x4c66de];return _0x5a4745;}export class ParentSegmentDescCommand extends BaseCommand{['name']=a31_0x2d63b8(0x11b);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0xcf);async[a31_0x2d63b8(0x25f)](_0x1fba06){const _0x4b1145=a31_0x2d63b8,{options:_0x300523,args:_0x4bedc2,tdx:_0x40daa8}=_0x1fba06,_0x41590c=_0x300523,_0x382a88=_0x4bedc2[0x0]||_0x300523[_0x4b1145(0x1b7)];if(!_0x382a88)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a'+_0x4b1145(0x2b9)+_0x4b1145(0xd7)),0x1;_0x300523[_0x4b1145(0xfa)]&&(console[_0x4b1145(0x17a)](_0x4b1145(0x26b)+_0x300523['site']),console[_0x4b1145(0x17a)](_0x4b1145(0x119)+_0x382a88));const _0x6ce945=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x382a88+_0x4b1145(0x1ca),()=>_0x40daa8[_0x4b1145(0xc6)][_0x4b1145(0x11e)](_0x382a88),{'verbose':_0x300523[_0x4b1145(0xfa)]}),_0x4168d6=_0x6ce945[_0x4b1145(0x244)],_0x14a2cc=_0x40daa8[_0x4b1145(0xc6)]['getOutputDatabaseName'](_0x4168d6);if(_0x41590c[_0x4b1145(0x2ae)]){const _0x5e5272=await this[_0x4b1145(0x19a)](_0x1fba06,_0x382a88,_0x4168d6,_0x14a2cc),_0x57c53e=this[_0x4b1145(0x262)](_0x5e5272);writeFileSync(_0x41590c[_0x4b1145(0x2ae)],_0x57c53e);const _0x57fbf9=_0x5e5272[_0x4b1145(0x16a)][_0x4b1145(0x247)]['length']+_0x5e5272[_0x4b1145(0xda)][_0x4b1145(0x1e4)]((_0x435c8f,_0x42e262)=>_0x435c8f+_0x42e262[_0x4b1145(0x247)][_0x4b1145(0x1ba)],0x0),_0x13ff0d=_0x5e5272[_0x4b1145(0xda)]['filter'](_0x120f82=>_0x120f82['columns'][_0x4b1145(0x1ba)]===0x0)[_0x4b1145(0x1ba)];return console[_0x4b1145(0x113)](_0x4b1145(0x258)+_0x41590c['output']),console['log']('\x20\x20Database:\x20'+_0x14a2cc),console['log']('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x5e5272[_0x4b1145(0xda)][_0x4b1145(0x1ba)]+_0x4b1145(0x267)),console[_0x4b1145(0x113)](_0x4b1145(0x285)+_0x57fbf9+_0x4b1145(0x121)),_0x13ff0d>0x0&&console[_0x4b1145(0x113)](_0x4b1145(0x158)+_0x13ff0d+_0x4b1145(0x161)),0x0;}console[_0x4b1145(0x17a)]('\x0a'+a31_0x1fbc7e['bold']('Output\x20Database:')+'\x20'+a31_0x1fbc7e['cyan'](_0x14a2cc));const _0x527863=await withSpinner(_0x4b1145(0x142),()=>_0x40daa8[_0x4b1145(0xc6)][_0x4b1145(0x14f)](_0x4168d6),{'verbose':_0x300523[_0x4b1145(0xfa)]});console[_0x4b1145(0x17a)]('\x0a'+a31_0x1fbc7e[_0x4b1145(0x1f6)](_0x4b1145(0x16a))+'\x20'+a31_0x1fbc7e['dim']('('+_0x14a2cc+'.customers)'));const _0x265548=await executeSchemaQuery(_0x527863[_0x4b1145(0x244)],_0x40daa8,_0x300523);await handleQueryOutput(_0x265548,_0x300523);const _0x4e385c=await withSpinner(_0x4b1145(0x298),()=>_0x40daa8[_0x4b1145(0xc6)][_0x4b1145(0x225)](_0x4168d6),{'verbose':_0x300523[_0x4b1145(0xfa)]});for(const _0x462bbe of _0x4e385c['data']){const _0x2f204c=_0x4b1145(0x2a5)+_0x462bbe['toLowerCase']()[_0x4b1145(0x204)](/\s+/g,'_'),_0x65e84f=_0x4b1145(0x203)+_0x14a2cc+'.'+_0x2f204c;console[_0x4b1145(0x17a)]('\x0a'+a31_0x1fbc7e[_0x4b1145(0x1f6)](_0x462bbe)+'\x20'+a31_0x1fbc7e['dim']('('+_0x14a2cc+'.'+_0x2f204c+')'));try{const _0x1213ca=await executeSchemaQuery(_0x65e84f,_0x40daa8,_0x300523);await handleQueryOutput(_0x1213ca,_0x300523);}catch{console[_0x4b1145(0x17a)](a31_0x1fbc7e[_0x4b1145(0x29a)](_0x4b1145(0xc9)));}}return 0x0;}async['collectSchema'](_0x5b695e,_0x1f5083,_0x5eaf6f,_0x445d02){const _0x58720e=a31_0x2d63b8,{options:_0x3d88ab,tdx:_0x1fdc05}=_0x5b695e,_0x3c9419=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x1fdc05[_0x58720e(0xc6)][_0x58720e(0x14f)](_0x5eaf6f),{'verbose':_0x3d88ab['verbose']}),_0x558a03=await executeSchemaQuery(_0x3c9419[_0x58720e(0x244)],_0x1fdc05,_0x3d88ab),_0x3955b0=_0x558a03[_0x58720e(0x244)][_0x58720e(0x10b)](_0x827598=>({'name':_0x827598[_0x58720e(0x237)],'type':_0x827598[_0x58720e(0x181)]})),_0x7b3fb9=await withSpinner(_0x58720e(0x298),()=>_0x1fdc05[_0x58720e(0xc6)]['getBehaviorNames'](_0x5eaf6f),{'verbose':_0x3d88ab[_0x58720e(0xfa)]}),_0x2ede0b=[];for(const _0xdd81ca of _0x7b3fb9[_0x58720e(0x244)]){const _0x550cc0=_0x58720e(0x2a5)+_0xdd81ca[_0x58720e(0x188)]()[_0x58720e(0x204)](/\s+/g,'_'),_0x380a7a=_0x58720e(0x203)+_0x445d02+'.'+_0x550cc0;let _0x123796=[];try{const _0x2933df=await executeSchemaQuery(_0x380a7a,_0x1fdc05,_0x3d88ab);_0x123796=_0x2933df[_0x58720e(0x244)]['map'](_0x4ad2ab=>({'name':_0x4ad2ab['column_name'],'type':_0x4ad2ab[_0x58720e(0x181)]}));}catch{}_0x2ede0b['push']({'table':_0x550cc0,'columns':_0x123796});}return{'database':_0x445d02,'parent_segment':_0x1f5083,'parent_id':_0x5eaf6f,'customers':{'table':'customers','columns':_0x3955b0},'behaviors':_0x2ede0b};}['formatSchemaJson'](_0x1fb24c){const _0x4014f5=a31_0x2d63b8,_0x58713c=_0x183ec1=>{const _0x5d929a=a31_0x5a47;if(_0x183ec1[_0x5d929a(0x1ba)]===0x0)return'[]';const _0x2f346b=_0x183ec1[_0x5d929a(0x10b)](_0x36148a=>_0x5d929a(0x152)+_0x36148a[_0x5d929a(0x105)]+_0x5d929a(0x1fd)+_0x36148a[_0x5d929a(0xa3)]+_0x5d929a(0x1ad));return'[\x0a'+_0x2f346b['join'](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x4c1789=_0x1fb24c['behaviors'][_0x4014f5(0x10b)](_0x3e2326=>{const _0x333abb=_0x4014f5;return _0x333abb(0xd4)+_0x3e2326[_0x333abb(0xca)]+_0x333abb(0x1a8)+_0x58713c(_0x3e2326['columns'])[_0x333abb(0x204)](/^/gm,'\x20\x20')[_0x333abb(0x2bc)]()+_0x333abb(0x14e);})['join'](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x1fb24c[_0x4014f5(0x139)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x1fb24c['parent_segment']+_0x4014f5(0x22f)+_0x1fb24c['parent_id']+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x1fb24c[_0x4014f5(0x16a)]['table']+_0x4014f5(0x102)+_0x58713c(_0x1fb24c[_0x4014f5(0x16a)][_0x4014f5(0x247)])[_0x4014f5(0x204)](/^/gm,'\x20\x20')[_0x4014f5(0x2bc)]()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x4c1789+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x125);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x146);async[a31_0x2d63b8(0x25f)](_0x241f21){const _0x5e2d1c=a31_0x2d63b8,{options:_0x2e8aa3,args:_0x4102cd,tdx:_0xd879fd}=_0x241f21,_0x19dbec=_0x4102cd[0x0]||_0x2e8aa3[_0x5e2d1c(0x1b7)];if(!_0x19dbec)return showParentSegmentNotSetError(_0x5e2d1c(0x221)+_0x5e2d1c(0x120)),0x1;_0x2e8aa3[_0x5e2d1c(0xfa)]&&(console[_0x5e2d1c(0x17a)]('Site:\x20'+_0x2e8aa3[_0x5e2d1c(0xe0)]),console['error'](_0x5e2d1c(0x119)+_0x19dbec));const _0x3c5d49=await withSpinner(_0x5e2d1c(0x208)+_0x19dbec+'\x27...',()=>_0xd879fd[_0x5e2d1c(0xc6)][_0x5e2d1c(0x11e)](_0x19dbec),{'verbose':_0x2e8aa3[_0x5e2d1c(0xfa)]}),_0x5ca5de=_0x3c5d49[_0x5e2d1c(0x244)],_0x746cab=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x19dbec+_0x5e2d1c(0x1ca),()=>_0xd879fd[_0x5e2d1c(0xc6)]['getParentSQL'](_0x5ca5de),{'verbose':_0x2e8aa3[_0x5e2d1c(0xfa)]}),_0x2d7848=_0x746cab[_0x5e2d1c(0x244)];return _0x2e8aa3[_0x5e2d1c(0xab)]===_0x5e2d1c(0xeb)||_0x2e8aa3['format']===_0x5e2d1c(0xfd)?await handleSDKOutput([{'sql':_0x2d7848}],_0x2e8aa3):console[_0x5e2d1c(0x113)](_0x2d7848),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xdc);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x191);async[a31_0x2d63b8(0x25f)](_0x223a85){const _0x496253=a31_0x2d63b8,{options:_0x162615,args:_0x44bdc0,tdx:_0x4d7dc6}=_0x223a85,_0x773ba1=_0x44bdc0[0x0]||_0x162615[_0x496253(0x1b7)];if(!_0x773ba1)return showParentSegmentNotSetError(_0x496253(0x220)+_0x496253(0x26c)),0x1;_0x162615[_0x496253(0xfa)]&&(console[_0x496253(0x17a)](_0x496253(0x26b)+_0x162615['site']),console['error'](_0x496253(0x119)+_0x773ba1));const _0x246b33=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x773ba1+'\x27...',()=>_0x4d7dc6[_0x496253(0xc6)][_0x496253(0x11e)](_0x773ba1),{'verbose':_0x162615[_0x496253(0xfa)]}),_0x4ae083=_0x246b33['data'],_0x345da3=await withSpinner(_0x496253(0xc7)+_0x773ba1+_0x496253(0x1ca),()=>_0x4d7dc6['segment'][_0x496253(0x14f)](_0x4ae083),{'verbose':_0x162615[_0x496253(0xfa)]});let _0x261aec=_0x345da3[_0x496253(0x244)];const _0x1092a0=resolveLimit(_0x162615['limit'],DEFAULT_DISPLAY_LIMIT),_0xb1b46c=/\bLIMIT\s+\d+/i[_0x496253(0xc8)](_0x261aec);!_0xb1b46c&&(_0x261aec=_0x261aec['trim']()[_0x496253(0x204)](/;+$/,''),_0x261aec=_0x496253(0x246)+_0x261aec+_0x496253(0x135)+_0x1092a0);_0x162615[_0x496253(0xfa)]&&console[_0x496253(0x17a)](_0x496253(0x1ec)+_0x261aec);const _0x84431b=await withProgressSpinner(_0x496253(0xe1),async _0x16c41d=>{const _0x42305b=_0x496253,_0x152a0c=await _0x4d7dc6[_0x42305b(0x1b0)][_0x42305b(0x25f)](_0x261aec,{'catalog':'td','schema':_0x42305b(0x101),'onJobId':_0x30a191=>{const _0x33c133=_0x42305b;_0x16c41d[_0x33c133(0x1f5)](_0x30a191);}});return _0x152a0c;},{'verbose':_0x162615['verbose']}),_0x4995a7=_0x84431b[_0x496253(0x244)],_0x519e10=_0x4995a7[_0x496253(0x138)]?_0x496253(0x1f3)+_0x4995a7[_0x496253(0x138)]+']':'';return console['error'](_0x496253(0x1cc)+_0x4995a7[_0x496253(0x250)][_0x496253(0x209)]['toLocaleString']()+_0x496253(0x293)+(_0x496253(0x266)+formatElapsed(_0x4995a7[_0x496253(0x250)]['elapsedTimeMillis'])+_0x519e10)),await handleQueryOutput(_0x4995a7,_0x162615),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x1f1);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x231);async[a31_0x2d63b8(0x25f)](_0x1b534a){const _0x118f27=a31_0x2d63b8,{options:_0x497237,args:_0x5803b3,tdx:_0x385af8}=_0x1b534a,_0x47788c=_0x5803b3[0x0],_0x3c9c40=await withSpinner(_0x47788c?_0x118f27(0xad)+_0x47788c+'\x27...':_0x118f27(0x2a2),()=>_0x385af8[_0x118f27(0x27e)]['list'](),{'verbose':_0x497237['verbose']});let _0x45af2b=_0x3c9c40[_0x118f27(0x244)][_0x118f27(0x2a1)](_0x80b3b9=>_0x80b3b9['realtime_enabled']);if(_0x47788c){const _0x33f383=_0x47788c[_0x118f27(0x204)](/[.+^${}()|[\]\\]/g,_0x118f27(0xe8))[_0x118f27(0x204)](/\*/g,'.*')[_0x118f27(0x204)](/\?/g,'.'),_0x2415a5=new RegExp('^'+_0x33f383+'$','i');_0x45af2b=_0x45af2b[_0x118f27(0x2a1)](_0x5cb449=>_0x2415a5[_0x118f27(0xc8)](_0x5cb449['name']));}_0x45af2b[_0x118f27(0x248)]((_0x1daab6,_0x165e1e)=>_0x1daab6[_0x118f27(0x105)][_0x118f27(0xbd)](_0x165e1e['name'])),console['error'](_0x118f27(0x2b6)+_0x45af2b[_0x118f27(0x1ba)]+_0x118f27(0x23b)+(_0x45af2b[_0x118f27(0x1ba)]!==0x1?'s':''));const _0x55b17b=_0x2bdd78=>{const _0x3c4138=_0x118f27;return getConsoleNextUrl(_0x497237[_0x3c4138(0xe0)],_0x3c4138(0x132)+_0x2bdd78);};if(_0x497237['format']===_0x118f27(0xeb)||_0x497237['format']===_0x118f27(0xfd)){const _0x4c3f22=_0x45af2b[_0x118f27(0x10b)](_0x17dee7=>({..._0x17dee7,'url':_0x55b17b(_0x17dee7['id'])}));await handleSDKOutput(_0x4c3f22,_0x497237);}else{if(_0x45af2b[_0x118f27(0x1ba)]===0x0)console[_0x118f27(0x113)](_0x118f27(0x245));else for(const _0x11e9e1 of _0x45af2b){const _0x2ef2f6=_0x11e9e1[_0x118f27(0x29d)]?a31_0x1fbc7e[_0x118f27(0x1a0)]('\x20('+formatRows(_0x11e9e1[_0x118f27(0x29d)])+')'):'',_0x30efd2=hyperlink(_0x11e9e1[_0x118f27(0x105)],_0x55b17b(_0x11e9e1['id']));console[_0x118f27(0x113)]('⚡\x20'+_0x30efd2+_0x2ef2f6);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x18d);['description']='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async['execute'](_0x4c7cdd){const _0x2bb5d9=a31_0x2d63b8,{options:_0xacc708,args:_0x137e24,tdx:_0x4d090e}=_0x4c7cdd,_0x33dd04=_0x137e24[0x0]||_0xacc708[_0x2bb5d9(0x1b7)];if(!_0x33dd04)return showParentSegmentNotSetError(_0x2bb5d9(0xb2)+_0x2bb5d9(0x1bb)),0x1;const _0x4e3b70=resolveYamlFile(_0x33dd04);if(!existsSync(_0x4e3b70))return showFileNotFoundError(_0x4e3b70,_0x33dd04),0x1;let _0x257d78;try{_0x257d78=readFileSync(_0x4e3b70,_0x2bb5d9(0x28e));}catch(_0x392269){const _0x2deaf9=_0x392269 instanceof Error?_0x392269[_0x2bb5d9(0x1b6)]:String(_0x392269);return console[_0x2bb5d9(0x17a)](_0x2bb5d9(0x162)+_0x2deaf9),0x1;}const _0x29ad83=createCommandSpinner(a31_0x1fbc7e[_0x2bb5d9(0x1a0)]('Validating\x20RT\x20configuration...'),{'verbose':_0xacc708[_0x2bb5d9(0xfa)]});_0x29ad83[_0x2bb5d9(0xe5)]();const _0x468114={'realtime':!![],'onProgress':_0x58b28d=>{const _0x123d9f=_0x2bb5d9;_0x29ad83[_0x123d9f(0x252)]=formatProgressMessage(_0x58b28d);}};let _0x126600;try{_0x126600=await _0x4d090e['segment'][_0x2bb5d9(0x1fe)](_0x257d78,_0x468114),_0x29ad83['stop']();}catch(_0x5e8f5d){_0x29ad83[_0x2bb5d9(0xaa)]();throw _0x5e8f5d;}console[_0x2bb5d9(0x17a)]('\x0a'+a31_0x1fbc7e['bold'](_0x2bb5d9(0x103))+'\x20'+_0x126600[_0x2bb5d9(0x105)]),console[_0x2bb5d9(0x17a)]('═'[_0x2bb5d9(0x2bb)](0x3c)),displayRealtimeValidation(_0x126600),console[_0x2bb5d9(0x17a)]('─'[_0x2bb5d9(0x2bb)](0x3c));if(_0x126600['errors']['length']>0x0){console[_0x2bb5d9(0x17a)]('\x0a'+a31_0x1fbc7e[_0x2bb5d9(0x1d8)](_0x2bb5d9(0x2a7)));for(const _0x4c07ff of _0x126600[_0x2bb5d9(0xff)]){console['error']('\x20\x20'+a31_0x1fbc7e[_0x2bb5d9(0x1d8)]('•')+'\x20'+_0x4c07ff);}}return _0x126600[_0x2bb5d9(0x264)]&&console['error']('\x0a'+a31_0x1fbc7e[_0x2bb5d9(0xb5)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x126600[_0x2bb5d9(0x264)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='ps:rt:jn:list';[a31_0x2d63b8(0x2ad)]='List\x20RT\x20journeys';async[a31_0x2d63b8(0x25f)](_0xf63dae){const _0x388fca=a31_0x2d63b8,{options:_0x50ab63,args:_0x2541bb,tdx:_0xa0af4d}=_0xf63dae,_0x566988=_0x2541bb[0x0]||_0x50ab63[_0x388fca(0x1b7)];if(!_0x566988)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment'),0x1;_0x50ab63[_0x388fca(0xfa)]&&(console[_0x388fca(0x17a)](_0x388fca(0x26b)+_0x50ab63['site']),console[_0x388fca(0x17a)](_0x388fca(0x119)+_0x566988));const _0x501c9c=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x566988+_0x388fca(0x1ca),()=>_0xa0af4d['segment'][_0x388fca(0x11e)](_0x566988),{'verbose':_0x50ab63['verbose']}),_0x3bd6a5=_0x501c9c['data'],_0xb46591=await withSpinner(_0x388fca(0x269)+_0x566988+_0x388fca(0x1ca),()=>_0xa0af4d[_0x388fca(0x27e)][_0x388fca(0x1dc)](_0x3bd6a5),{'verbose':_0x50ab63[_0x388fca(0xfa)]}),_0x195ff4=_0xb46591['data'];console['error'](_0x388fca(0x2b6)+_0x195ff4[_0x388fca(0x1ba)]+_0x388fca(0x106)+(_0x195ff4['length']!==0x1?'s':''));if(_0x50ab63[_0x388fca(0xab)]===_0x388fca(0xeb)||_0x50ab63['format']===_0x388fca(0xfd))await handleSDKOutput(_0x195ff4,_0x50ab63);else{if(_0x195ff4['length']===0x0)console['log'](_0x388fca(0x2aa));else for(const _0x22d70e of _0x195ff4){const _0x343875=_0x22d70e[_0x388fca(0x1d1)]===_0x388fca(0x1f7)?'🚀':'📝',_0x3b4643=_0x22d70e[_0x388fca(0x16d)]?a31_0x1fbc7e[_0x388fca(0x29a)](_0x388fca(0x14b)):'',_0x4431a6=a31_0x1fbc7e['dim']('\x20('+_0x22d70e[_0x388fca(0x11f)]+_0x388fca(0x1cb)+(_0x22d70e[_0x388fca(0x11f)]!==0x1?'s':'')+')');console[_0x388fca(0x113)](_0x343875+'\x20'+_0x22d70e['name']+_0x3b4643+_0x4431a6);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='ps:rt:jn:pause';[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0xc3);async['execute'](_0x4e4e58){const _0x327b81=a31_0x2d63b8,{options:_0x1e453d,args:_0x57d91b,tdx:_0x322a71}=_0x4e4e58,_0x1455dc=_0x57d91b[0x0];if(!_0x1455dc)return console['error'](a31_0x1fbc7e[_0x327b81(0x1d8)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console['error']('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console['error'](a31_0x1fbc7e[_0x327b81(0x1a0)](_0x327b81(0x234))),0x1;_0x1e453d[_0x327b81(0xfa)]&&(console['error'](_0x327b81(0x26b)+_0x1e453d['site']),console[_0x327b81(0x17a)]('RT\x20Journey\x20ID:\x20'+_0x1455dc));const _0x227acd=await withSpinner(_0x327b81(0x1fb)+_0x1455dc+_0x327b81(0x1ca),()=>_0x322a71[_0x327b81(0x27e)]['pauseJourney'](_0x1455dc),{'verbose':_0x1e453d[_0x327b81(0xfa)]}),_0x4cebc9=_0x227acd['data'];console[_0x327b81(0x17a)](_0x327b81(0x151)+_0x4cebc9['name']+'\x27');if(_0x1e453d[_0x327b81(0xab)]===_0x327b81(0xeb)||_0x1e453d[_0x327b81(0xab)]==='jsonl')await handleSDKOutput([_0x4cebc9],_0x1e453d);else{const _0x4ff414=_0x4cebc9['state']===_0x327b81(0x1f7)?'🚀':'📝',_0x1ea22f=_0x4cebc9['paused']?a31_0x1fbc7e[_0x327b81(0x29a)]('\x20(paused)'):'';console[_0x327b81(0x113)](_0x4ff414+'\x20'+_0x4cebc9['name']+_0x1ea22f);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xf9);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x2af);async[a31_0x2d63b8(0x25f)](_0x1ac1f5){const _0x4eaaf7=a31_0x2d63b8,{options:_0x4c6f9c,args:_0x489c94,tdx:_0x286d48}=_0x1ac1f5,_0x1cd79a=_0x489c94[0x0];if(!_0x1cd79a)return console['error'](a31_0x1fbc7e[_0x4eaaf7(0x1d8)](_0x4eaaf7(0xd5))),console[_0x4eaaf7(0x17a)](_0x4eaaf7(0x137)),console[_0x4eaaf7(0x17a)](a31_0x1fbc7e[_0x4eaaf7(0x1a0)](_0x4eaaf7(0x234))),0x1;_0x4c6f9c['verbose']&&(console[_0x4eaaf7(0x17a)](_0x4eaaf7(0x26b)+_0x4c6f9c['site']),console[_0x4eaaf7(0x17a)](_0x4eaaf7(0x114)+_0x1cd79a));const _0x79c81c=await withSpinner(_0x4eaaf7(0x19c)+_0x1cd79a+_0x4eaaf7(0x1ca),()=>_0x286d48[_0x4eaaf7(0x27e)]['resumeJourney'](_0x1cd79a),{'verbose':_0x4c6f9c[_0x4eaaf7(0xfa)]}),_0x47e265=_0x79c81c[_0x4eaaf7(0x244)];console[_0x4eaaf7(0x17a)](_0x4eaaf7(0x144)+_0x47e265[_0x4eaaf7(0x105)]+'\x27');if(_0x4c6f9c[_0x4eaaf7(0xab)]===_0x4eaaf7(0xeb)||_0x4c6f9c[_0x4eaaf7(0xab)]===_0x4eaaf7(0xfd))await handleSDKOutput([_0x47e265],_0x4c6f9c);else{const _0x37c4f4=_0x47e265[_0x4eaaf7(0x1d1)]===_0x4eaaf7(0x1f7)?'🚀':'📝',_0x38f405=_0x47e265[_0x4eaaf7(0x16d)]?a31_0x1fbc7e['yellow'](_0x4eaaf7(0x14b)):'';console['log'](_0x37c4f4+'\x20'+_0x47e265[_0x4eaaf7(0x105)]+_0x38f405);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x2a4);['description']=a31_0x2d63b8(0xcb);async[a31_0x2d63b8(0x25f)](_0x412ec1){const _0x21b7dc=a31_0x2d63b8,{options:_0x1e4c5d,args:_0x53da4a,tdx:_0x27cdb2}=_0x412ec1,_0x559d2c=_0x53da4a[0x0]||_0x1e4c5d[_0x21b7dc(0x1b7)];if(!_0x559d2c)return showParentSegmentNotSetError(_0x21b7dc(0xb1)+_0x21b7dc(0x170)),0x1;_0x1e4c5d['verbose']&&(console[_0x21b7dc(0x17a)](_0x21b7dc(0x26b)+_0x1e4c5d[_0x21b7dc(0xe0)]),console[_0x21b7dc(0x17a)]('Parent\x20segment:\x20'+_0x559d2c));const _0x1ab630=await withSpinner(_0x21b7dc(0x208)+_0x559d2c+_0x21b7dc(0x1ca),()=>_0x27cdb2[_0x21b7dc(0xc6)][_0x21b7dc(0x11e)](_0x559d2c),{'verbose':_0x1e4c5d[_0x21b7dc(0xfa)]}),_0x2704da=_0x1ab630[_0x21b7dc(0x244)],_0x452393=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x559d2c+_0x21b7dc(0x1ca),()=>_0x27cdb2[_0x21b7dc(0x27e)][_0x21b7dc(0x141)](_0x2704da),{'verbose':_0x1e4c5d[_0x21b7dc(0xfa)]}),_0x42f9d2=_0x452393['data'];return console[_0x21b7dc(0x17a)](_0x21b7dc(0x263)),_0x1e4c5d[_0x21b7dc(0xab)]===_0x21b7dc(0xeb)||_0x1e4c5d['format']===_0x21b7dc(0xfd)?await handleSDKOutput([_0x42f9d2],_0x1e4c5d):(console[_0x21b7dc(0x113)](_0x21b7dc(0x255)+_0x42f9d2['id']),console[_0x21b7dc(0x113)]('audienceId:\x20'+_0x42f9d2[_0x21b7dc(0x281)]),console['log'](_0x21b7dc(0xac)+_0x42f9d2[_0x21b7dc(0xba)]),console[_0x21b7dc(0x113)](_0x21b7dc(0x17c)+_0x42f9d2[_0x21b7dc(0x180)]),console[_0x21b7dc(0x113)](_0x21b7dc(0x256)+_0x42f9d2[_0x21b7dc(0x1ed)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xf2);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x257);async[a31_0x2d63b8(0x25f)](_0x38ea1f){const _0x6de875=a31_0x2d63b8,{options:_0x41289a,args:_0x35e621,tdx:_0x28a522}=_0x38ea1f,_0x4feff0=_0x35e621[0x0]||_0x41289a['parentSegment'];if(!_0x4feff0)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a'+_0x6de875(0x26f)),0x1;const _0x4693d9=await withSpinner(_0x6de875(0x208)+_0x4feff0+_0x6de875(0x1ca),()=>_0x28a522[_0x6de875(0xc6)][_0x6de875(0x11e)](_0x4feff0),{'verbose':_0x41289a[_0x6de875(0xfa)]}),_0x17c185=_0x4693d9[_0x6de875(0x244)],_0x1cd77d=await withSpinner(_0x6de875(0x13c)+_0x4feff0+_0x6de875(0x1ca),()=>_0x28a522['personalization'][_0x6de875(0x128)](_0x17c185),{'verbose':_0x41289a[_0x6de875(0xfa)]}),_0xb905d1=_0x1cd77d['data'];console[_0x6de875(0x17a)](_0x6de875(0x2b6)+_0xb905d1[_0x6de875(0x1ba)]+'\x20personalization\x20service'+(_0xb905d1[_0x6de875(0x1ba)]!==0x1?'s':''));if(_0x41289a[_0x6de875(0xab)]===_0x6de875(0xeb)||_0x41289a['format']==='jsonl')await handleSDKOutput(_0xb905d1,_0x41289a);else{if(_0xb905d1[_0x6de875(0x1ba)]===0x0)console[_0x6de875(0x113)](_0x6de875(0x18b)),console['error'](a31_0x1fbc7e['cyan'](_0x6de875(0x1aa)));else for(const _0x366d0e of _0xb905d1){console[_0x6de875(0x113)](a31_0x1fbc7e[_0x6de875(0x1f6)](_0x366d0e[_0x6de875(0x105)])+'\x20'+a31_0x1fbc7e[_0x6de875(0x1a0)](_0x6de875(0x129)+_0x366d0e['id']+')'));_0x366d0e[_0x6de875(0x2ad)]&&console[_0x6de875(0x113)]('\x20\x20'+a31_0x1fbc7e[_0x6de875(0x1a0)](_0x366d0e[_0x6de875(0x2ad)]));if(_0x366d0e[_0x6de875(0x290)]&&_0x366d0e[_0x6de875(0x290)][_0x6de875(0x1ba)]>0x0)for(const _0x20412e of _0x366d0e[_0x6de875(0x290)]){const _0x425f0b=_0x20412e['allowedIps']?.[_0x6de875(0x1ba)]?_0x20412e[_0x6de875(0x24d)][_0x6de875(0x19d)](',\x20'):_0x6de875(0x18a);console[_0x6de875(0x113)]('\x20\x20'+a31_0x1fbc7e['cyan'](_0x6de875(0x211))+'\x20'+_0x20412e[_0x6de875(0x105)]+'\x20'+a31_0x1fbc7e[_0x6de875(0x1a0)](_0x6de875(0x129)+_0x20412e['id']+')')),console[_0x6de875(0x113)](_0x6de875(0x25d)+a31_0x1fbc7e[_0x6de875(0x1a0)](_0x6de875(0x16e))+'\x20'+_0x425f0b);}else console['log']('\x20\x20'+a31_0x1fbc7e[_0x6de875(0x1a0)](_0x6de875(0x1d4)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x2a6);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x10d);async['execute'](_0x168b17){const _0x3ea8db=a31_0x2d63b8,{options:_0x39894f,args:_0x38a3db,tdx:_0x3b3dbe}=_0x168b17,_0x3ef330=_0x39894f,_0x40f8f7=_0x38a3db[0x0],_0x397bbf=_0x38a3db[0x1]||_0x39894f[_0x3ea8db(0x1b7)];if(!_0x40f8f7)return console[_0x3ea8db(0x17a)](_0x3ea8db(0x21c)),console[_0x3ea8db(0x17a)](_0x3ea8db(0x210)),console['error'](_0x3ea8db(0x24b)),0x1;if(!_0x397bbf)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0x3ea8db(0x24b)),0x1;const _0x2540f6=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x397bbf+'\x27...',()=>_0x3b3dbe['segment'][_0x3ea8db(0x11e)](_0x397bbf),{'verbose':_0x39894f[_0x3ea8db(0xfa)]}),_0x308bd2=_0x2540f6[_0x3ea8db(0x244)],_0x607865={'name':_0x40f8f7,'description':_0x3ef330[_0x3ea8db(0x2ad)],'public':_0x3ef330['public']},_0x332c8d=await withSpinner(_0x3ea8db(0x13b)+_0x40f8f7+_0x3ea8db(0x1ca),()=>_0x3b3dbe[_0x3ea8db(0x199)][_0x3ea8db(0x2a3)](_0x308bd2,_0x607865),{'verbose':_0x39894f['verbose']}),_0x232931=_0x332c8d[_0x3ea8db(0x244)];return console['error'](_0x3ea8db(0x12c)+_0x232931[_0x3ea8db(0x105)]+_0x3ea8db(0x187)+_0x232931['id']),await handleSDKOutput([_0x232931],_0x39894f),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xe7);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x193);async[a31_0x2d63b8(0x25f)](_0x36cad8){const _0x22bef7=a31_0x2d63b8,{options:_0x3f9cf8,args:_0x1756d5,tdx:_0x129aef}=_0x36cad8,_0x4d0c9d=_0x1756d5[0x0],_0x539c40=_0x1756d5[0x1]||_0x3f9cf8[_0x22bef7(0x1b7)];if(!_0x4d0c9d)return console[_0x22bef7(0x17a)](_0x22bef7(0xfc)),console[_0x22bef7(0x17a)](_0x22bef7(0x179)),console[_0x22bef7(0x17a)](_0x22bef7(0x1e7)),0x1;if(!_0x539c40)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x22bef7(0x1e7)),0x1;const _0x4db08c=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x539c40+'\x27...',()=>_0x129aef[_0x22bef7(0xc6)][_0x22bef7(0x11e)](_0x539c40),{'verbose':_0x3f9cf8[_0x22bef7(0xfa)]}),_0x48451b=_0x4db08c[_0x22bef7(0x244)],_0x15d739=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x4d0c9d+_0x22bef7(0x1ca),()=>_0x129aef[_0x22bef7(0x199)]['get'](_0x48451b,_0x4d0c9d),{'verbose':_0x3f9cf8[_0x22bef7(0xfa)]}),_0x4c1534=_0x15d739[_0x22bef7(0x244)];if(_0x3f9cf8[_0x22bef7(0xeb)]||_0x3f9cf8[_0x22bef7(0xfd)])await handleSDKOutput([_0x4c1534],_0x3f9cf8);else{console['log'](a31_0x1fbc7e[_0x22bef7(0x1f6)](_0x4c1534['name'])+'\x20'+a31_0x1fbc7e[_0x22bef7(0x1a0)](_0x22bef7(0x129)+_0x4c1534['id']+')'));_0x4c1534[_0x22bef7(0x2ad)]&&console[_0x22bef7(0x113)]('\x20\x20'+a31_0x1fbc7e['dim'](_0x4c1534[_0x22bef7(0x2ad)]));console[_0x22bef7(0x113)]('\x20\x20'+a31_0x1fbc7e['cyan'](_0x22bef7(0x29e))+'\x20'+(_0x4c1534[_0x22bef7(0x1c9)]?_0x22bef7(0x1dd):'no'));if(_0x4c1534['tokens']&&_0x4c1534['tokens']['length']>0x0)for(const _0x5dc4dd of _0x4c1534[_0x22bef7(0x290)]){const _0x3c86db=_0x5dc4dd['allowedIps']?.[_0x22bef7(0x1ba)]?_0x5dc4dd[_0x22bef7(0x24d)]['join'](',\x20'):_0x22bef7(0x18a);console['log']('\x20\x20'+a31_0x1fbc7e[_0x22bef7(0x26d)]('token:')+'\x20'+_0x5dc4dd[_0x22bef7(0x105)]+'\x20'+a31_0x1fbc7e[_0x22bef7(0x1a0)](_0x22bef7(0x129)+_0x5dc4dd['id']+')')),console[_0x22bef7(0x113)](_0x22bef7(0x25d)+a31_0x1fbc7e['dim'](_0x22bef7(0x16e))+'\x20'+_0x3c86db);}else console[_0x22bef7(0x113)]('\x20\x20'+a31_0x1fbc7e[_0x22bef7(0x1a0)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xd2);['description']=a31_0x2d63b8(0x1ef);async[a31_0x2d63b8(0x25f)](_0x2afb0a){const _0x47fd10=a31_0x2d63b8,{options:_0x822b13,args:_0x538539,tdx:_0x190181}=_0x2afb0a,_0x29a57c=_0x538539[0x0],_0x47d70b=_0x538539[0x1]||_0x822b13[_0x47fd10(0x1b7)];if(!_0x29a57c)return console[_0x47fd10(0x17a)]('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0x47fd10(0x200)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x47d70b)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x47fd10(0x25e)),0x1;const _0x2460ae=await withSpinner(_0x47fd10(0x208)+_0x47d70b+'\x27...',()=>_0x190181[_0x47fd10(0xc6)][_0x47fd10(0x11e)](_0x47d70b),{'verbose':_0x822b13['verbose']}),_0x203926=_0x2460ae[_0x47fd10(0x244)];return await withSpinner(_0x47fd10(0x213)+_0x29a57c+'\x27...',()=>_0x190181[_0x47fd10(0x199)][_0x47fd10(0x29f)](_0x203926,_0x29a57c),{'verbose':_0x822b13[_0x47fd10(0xfa)]}),console['error'](_0x47fd10(0xae)+_0x29a57c+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0x134);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0x2d63b8(0x25f)](_0xedb1a0){const _0x990501=a31_0x2d63b8,{options:_0xe83d8,args:_0x130808,tdx:_0x3b645f}=_0xedb1a0,_0x2629ac=_0xe83d8,_0x10cdcf=_0x130808[0x0],_0x1f3c3f=_0x130808[0x1]||_0xe83d8['parentSegment'];if(!_0x10cdcf)return console[_0x990501(0x17a)](_0x990501(0xfc)),console[_0x990501(0x17a)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),console[_0x990501(0x17a)](_0x990501(0x21e)),0x1;if(!_0x2629ac['name'])return console[_0x990501(0x17a)](_0x990501(0xea)),console[_0x990501(0x17a)](_0x990501(0x1d9)),0x1;if(!_0x1f3c3f)return showParentSegmentNotSetError(_0x990501(0x215)+_0x990501(0x21e)),0x1;const _0x1009dc=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1f3c3f+'\x27...',()=>_0x3b645f['segment'][_0x990501(0x11e)](_0x1f3c3f),{'verbose':_0xe83d8[_0x990501(0xfa)]}),_0x1e8127=_0x1009dc['data'],_0x505ef9={'name':_0x2629ac[_0x990501(0x105)]};_0x2629ac[_0x990501(0x2ad)]!==undefined&&(_0x505ef9[_0x990501(0x2ad)]=_0x2629ac['description']);const _0x58711d=await withSpinner(_0x990501(0x1e8)+_0x10cdcf+'\x27...',()=>_0x3b645f[_0x990501(0x199)][_0x990501(0x2a9)](_0x1e8127,_0x10cdcf,_0x505ef9),{'verbose':_0xe83d8[_0x990501(0xfa)]}),_0x1b1790=_0x58711d[_0x990501(0x244)];return console[_0x990501(0x17a)]('✔\x20Updated\x20personalization\x20service\x20\x27'+_0x1b1790[_0x990501(0x105)]+'\x27'),await handleSDKOutput([_0x1b1790],_0xe83d8),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='ps:pz:service:token:create';[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0xc2);async[a31_0x2d63b8(0x25f)](_0x36e9c7){const _0x2bb471=a31_0x2d63b8,{options:_0x3cf6d5,args:_0x32854c,tdx:_0x1089cf}=_0x36e9c7,_0x4d4201=_0x3cf6d5,_0x5e4f75=_0x32854c[0x0],_0x151be8=_0x32854c[0x1],_0x4c4f0b=_0x32854c[0x2]||_0x3cf6d5[_0x2bb471(0x1b7)];if(!_0x5e4f75)return console[_0x2bb471(0x17a)](_0x2bb471(0x23e)),console['error'](_0x2bb471(0xd9)),console['error'](_0x2bb471(0x29c)),0x1;if(!_0x151be8)return console['error'](_0x2bb471(0xfc)),console['error'](_0x2bb471(0xd9)),console[_0x2bb471(0x17a)](_0x2bb471(0x29c)),0x1;if(!_0x4c4f0b)return showParentSegmentNotSetError(_0x2bb471(0xc5)+_0x2bb471(0x29c)),0x1;const _0x4ef425=await withSpinner(_0x2bb471(0x208)+_0x4c4f0b+_0x2bb471(0x1ca),()=>_0x1089cf['segment'][_0x2bb471(0x11e)](_0x4c4f0b),{'verbose':_0x3cf6d5[_0x2bb471(0xfa)]}),_0x5499a5=_0x4ef425[_0x2bb471(0x244)],_0x5cfb3f={'name':_0x5e4f75};_0x4d4201['allowedIps']&&(_0x5cfb3f[_0x2bb471(0x24d)]=_0x4d4201[_0x2bb471(0x24d)]['split'](',')[_0x2bb471(0x10b)](_0x2e7ec1=>_0x2e7ec1['trim']()));_0x4d4201[_0x2bb471(0x2ad)]&&(_0x5cfb3f[_0x2bb471(0x2ad)]=_0x4d4201['description']);const _0x30cdc1=await withSpinner(_0x2bb471(0x15f)+_0x5e4f75+_0x2bb471(0x230)+_0x151be8+_0x2bb471(0x1ca),()=>_0x1089cf[_0x2bb471(0x199)]['createToken'](_0x5499a5,_0x151be8,_0x5cfb3f),{'verbose':_0x3cf6d5[_0x2bb471(0xfa)]}),_0x5793c7=_0x30cdc1[_0x2bb471(0x244)];return console['error'](_0x2bb471(0x1c2)+_0x5793c7['name']+'\x27\x20with\x20ID:\x20'+_0x5793c7['id']),_0x5793c7['value']&&(console[_0x2bb471(0x17a)](a31_0x1fbc7e[_0x2bb471(0x29a)](_0x2bb471(0xb9))),console[_0x2bb471(0x17a)](a31_0x1fbc7e['cyan'](_0x5793c7[_0x2bb471(0x1d6)])),console[_0x2bb471(0x17a)]('')),await handleSDKOutput([_0x5793c7],_0x3cf6d5),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='ps:pz:service:token:delete';['description']=a31_0x2d63b8(0x118);async[a31_0x2d63b8(0x25f)](_0x13cece){const _0x42f491=a31_0x2d63b8,{options:_0x55a738,args:_0x5bf33e,tdx:_0x4b5f1d}=_0x13cece,_0x3eb644=_0x5bf33e[0x0],_0x14576e=_0x5bf33e[0x1]||_0x55a738[_0x42f491(0x1b7)];if(!_0x3eb644)return console[_0x42f491(0x17a)](_0x42f491(0x1bd)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x42f491(0x17a)](_0x42f491(0x202)),0x1;if(!_0x14576e)return showParentSegmentNotSetError(_0x42f491(0xbb)+_0x42f491(0x202)),0x1;const _0x35292e=await withSpinner(_0x42f491(0x208)+_0x14576e+'\x27...',()=>_0x4b5f1d[_0x42f491(0xc6)][_0x42f491(0x11e)](_0x14576e),{'verbose':_0x55a738[_0x42f491(0xfa)]}),_0x392248=_0x35292e[_0x42f491(0x244)],_0x338719=await withSpinner(_0x42f491(0x1a2),()=>_0x4b5f1d[_0x42f491(0x199)][_0x42f491(0x128)](_0x392248),{'verbose':_0x55a738[_0x42f491(0xfa)]}),_0x38bbbb=_0x338719[_0x42f491(0x244)];let _0x3b3578;for(const _0x4f5a3a of _0x38bbbb){if(_0x4f5a3a[_0x42f491(0x290)]?.[_0x42f491(0x10c)](_0x325a0e=>_0x325a0e['id']===_0x3eb644)){_0x3b3578=_0x4f5a3a['id'];break;}}if(!_0x3b3578)return console[_0x42f491(0x17a)](_0x42f491(0x13f)+_0x3eb644+'\x27\x20not\x20found\x20in\x20any\x20personalization\x20service'),0x1;const _0x42d39c=await withSpinner(_0x42f491(0xd8)+_0x3eb644+_0x42f491(0x1ca),()=>_0x4b5f1d[_0x42f491(0x199)]['deleteToken'](_0x392248,_0x3b3578,_0x3eb644),{'verbose':_0x55a738[_0x42f491(0xfa)]}),_0x34f63c=_0x42d39c[_0x42f491(0x244)];return console['error'](_0x42f491(0x197)+(_0x34f63c[_0x42f491(0x105)]||_0x3eb644)+'\x27'),await handleSDKOutput([_0x34f63c],_0x55a738),0x0;}}export class PSPzListCommand extends BaseCommand{['name']='ps:pz:list';[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x15b);async['execute'](_0x2850dd){const _0x164894=a31_0x2d63b8,{options:_0x43e767,args:_0x45fbb4,tdx:_0x252755}=_0x2850dd,_0x2745a4=_0x45fbb4[0x0]||_0x43e767[_0x164894(0x1b7)];if(!_0x2745a4)return showParentSegmentNotSetError(_0x164894(0x26a)+_0x164894(0x1f0)),0x1;const _0x363417=await withSpinner(_0x164894(0x208)+_0x2745a4+_0x164894(0x1ca),()=>_0x252755['segment'][_0x164894(0x11e)](_0x2745a4),{'verbose':_0x43e767['verbose']}),_0x3c8012=_0x363417[_0x164894(0x244)],_0x4111f5=await withSpinner(_0x164894(0xd3)+_0x2745a4+_0x164894(0x1ca),()=>_0x252755[_0x164894(0x199)][_0x164894(0x19f)](_0x3c8012),{'verbose':_0x43e767[_0x164894(0xfa)]}),_0x216b37=_0x4111f5[_0x164894(0x244)];console[_0x164894(0x17a)]('✔\x20Found\x20'+_0x216b37[_0x164894(0x1ba)]+_0x164894(0x2ac)+(_0x216b37[_0x164894(0x1ba)]!==0x1?'s':''));if(_0x43e767['format']===_0x164894(0xeb)||_0x43e767[_0x164894(0xab)]===_0x164894(0xfd))await handleSDKOutput(_0x216b37,_0x43e767);else{if(_0x216b37['length']===0x0)console[_0x164894(0x113)]('No\x20personalizations\x20configured');else for(const _0x488413 of _0x216b37){console[_0x164894(0x113)](a31_0x1fbc7e[_0x164894(0x1f6)](_0x488413[_0x164894(0x105)])+'\x20'+a31_0x1fbc7e[_0x164894(0x1a0)](_0x164894(0x129)+_0x488413['id']+')'));_0x488413[_0x164894(0x2ad)]&&console[_0x164894(0x113)]('\x20\x20'+a31_0x1fbc7e[_0x164894(0x1a0)](_0x488413[_0x164894(0x2ad)]));const _0x14a339=_0x488413['sections']?.[_0x164894(0x1ba)]||0x0;console[_0x164894(0x113)]('\x20\x20'+a31_0x1fbc7e[_0x164894(0x26d)](_0x164894(0x296))+'\x20'+_0x14a339);if(_0x488413[_0x164894(0x11d)]&&_0x488413['sections'][_0x164894(0x1ba)]>0x0)for(const _0x280ed6 of _0x488413[_0x164894(0x11d)]){console[_0x164894(0x113)](_0x164894(0x150)+_0x280ed6[_0x164894(0x105)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a31_0x2d63b8(0x12d);['description']=a31_0x2d63b8(0x1ff);async['execute'](_0x51f96a){const _0x2be565=a31_0x2d63b8,{options:_0x430df8,args:_0x22f17b,tdx:_0x36bc1c}=_0x51f96a,_0x241422=_0x22f17b[0x0];if(!_0x241422)return console['error']('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x2be565(0x17a)](_0x2be565(0x22c)),0x1;const _0x10b75b=await withSpinner(_0x2be565(0x109)+_0x241422+_0x2be565(0x1ca),()=>_0x36bc1c[_0x2be565(0x199)][_0x2be565(0x1bf)](_0x241422),{'verbose':_0x430df8[_0x2be565(0xfa)]}),_0x3baa5e=_0x10b75b[_0x2be565(0x244)];console[_0x2be565(0x17a)](_0x2be565(0x23d)+_0x3baa5e[_0x2be565(0x105)]+'\x27');if(_0x430df8[_0x2be565(0xab)]==='json'||_0x430df8['format']===_0x2be565(0xfd))await handleSDKOutput([_0x3baa5e],_0x430df8);else{console[_0x2be565(0x113)](a31_0x1fbc7e[_0x2be565(0x1f6)](_0x3baa5e[_0x2be565(0x105)])+'\x20'+a31_0x1fbc7e[_0x2be565(0x1a0)](_0x2be565(0x129)+_0x3baa5e['id']+')'));_0x3baa5e[_0x2be565(0x2ad)]&&console['log']('\x20\x20'+a31_0x1fbc7e[_0x2be565(0x1a0)](_0x3baa5e[_0x2be565(0x2ad)]));_0x3baa5e[_0x2be565(0x281)]&&console[_0x2be565(0x113)]('\x20\x20'+a31_0x1fbc7e['cyan'](_0x2be565(0x174))+'\x20'+_0x3baa5e[_0x2be565(0x281)]);console[_0x2be565(0x113)]('\x20\x20'+a31_0x1fbc7e[_0x2be565(0x26d)](_0x2be565(0x157))+'\x20'+_0x3baa5e[_0x2be565(0x1b4)]),console[_0x2be565(0x113)]('\x20\x20'+a31_0x1fbc7e[_0x2be565(0x26d)](_0x2be565(0x23a))+'\x20'+_0x3baa5e[_0x2be565(0x21d)]);const _0x402c66=_0x3baa5e[_0x2be565(0x11d)]?.[_0x2be565(0x1ba)]||0x0;console['log']('\x20\x20'+a31_0x1fbc7e[_0x2be565(0x26d)](_0x2be565(0x296))+'\x20'+_0x402c66);if(_0x3baa5e[_0x2be565(0x11d)]&&_0x3baa5e[_0x2be565(0x11d)][_0x2be565(0x1ba)]>0x0)for(const _0x2a866f of _0x3baa5e['sections']){console[_0x2be565(0x113)](_0x2be565(0x25d)+a31_0x1fbc7e['bold'](_0x2a866f['name'])+'\x20'+a31_0x1fbc7e[_0x2be565(0x1a0)](_0x2be565(0x129)+_0x2a866f['id']+')')),_0x2a866f[_0x2be565(0x243)]&&(console[_0x2be565(0x113)](_0x2be565(0x212)+a31_0x1fbc7e[_0x2be565(0x26d)]('entryCriteria:')+'\x20'+_0x2a866f[_0x2be565(0x243)]['name']),_0x2a866f[_0x2be565(0x243)][_0x2be565(0x2ab)]?.[_0x2be565(0x111)]&&console[_0x2be565(0x113)](_0x2be565(0x27b)+a31_0x1fbc7e[_0x2be565(0x26d)]('keyEventId:')+'\x20'+_0x2a866f[_0x2be565(0x243)][_0x2be565(0x2ab)][_0x2be565(0x111)])),_0x2a866f[_0x2be565(0xcc)]&&console[_0x2be565(0x113)](_0x2be565(0x212)+a31_0x1fbc7e[_0x2be565(0x26d)](_0x2be565(0x17b))+'\x20'+JSON[_0x2be565(0x1c6)](_0x2a866f[_0x2be565(0xcc)])),_0x2a866f[_0x2be565(0x160)]&&console[_0x2be565(0x113)](_0x2be565(0x212)+a31_0x1fbc7e[_0x2be565(0x26d)]('includeSensitive:')+_0x2be565(0x1d0));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x2d63b8(0x105)]=a31_0x2d63b8(0xa5);[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x239);async[a31_0x2d63b8(0x25f)](_0x3becd4){const _0x39b0a5=a31_0x2d63b8,{options:_0x165978,args:_0x1b1644,tdx:_0x31d69c}=_0x3becd4,_0x5091ea=_0x1b1644[0x0];if(!_0x5091ea)return console[_0x39b0a5(0x17a)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x39b0a5(0x17a)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x39b0a5(0x21f)+_0x5091ea+_0x39b0a5(0x1ca),()=>_0x31d69c[_0x39b0a5(0x199)]['deletePersonalization'](_0x5091ea),{'verbose':_0x165978['verbose']}),console[_0x39b0a5(0x17a)](_0x39b0a5(0xe9)+_0x5091ea+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='ps:pz:create';['description']=a31_0x2d63b8(0x18f);async['execute'](_0x97715d){const _0x2c6e77=a31_0x2d63b8,{options:_0x47d8ff,tdx:_0x2bf312}=_0x97715d,_0x3bb138=_0x47d8ff;let _0x17f2f6;if(_0x3bb138[_0x2c6e77(0x110)]){_0x17f2f6=await loadJSON(_0x3bb138[_0x2c6e77(0x110)],!![]);if(!_0x17f2f6[_0x2c6e77(0x184)]?.[_0x2c6e77(0x123)])return console[_0x2c6e77(0x17a)](_0x2c6e77(0x1e6)),console[_0x2c6e77(0x17a)](_0x2c6e77(0x20b)),console[_0x2c6e77(0x17a)](_0x2c6e77(0xd6)),0x1;}else{if(!_0x3bb138[_0x2c6e77(0x105)])return console[_0x2c6e77(0x17a)](_0x2c6e77(0x126)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x2c6e77(0x17a)](_0x2c6e77(0x1cd)),0x1;if(_0x3bb138[_0x2c6e77(0x2ad)]===undefined)return console['error'](_0x2c6e77(0x206)),console[_0x2c6e77(0x17a)](_0x2c6e77(0x1da)),console[_0x2c6e77(0x17a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x3bb138[_0x2c6e77(0x216)]===undefined)return console[_0x2c6e77(0x17a)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error']('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x5239b5=_0x3bb138[_0x2c6e77(0x281)];if(!_0x5239b5&&_0x47d8ff[_0x2c6e77(0x1b7)]){const _0x78ec60=await withSpinner(_0x2c6e77(0x208)+_0x47d8ff['parentSegment']+_0x2c6e77(0x1ca),()=>_0x2bf312[_0x2c6e77(0xc6)]['resolveParentId'](_0x47d8ff['parentSegment']),{'verbose':_0x47d8ff[_0x2c6e77(0xfa)]});_0x5239b5=_0x78ec60['data'];}let _0x1b4f74;_0x3bb138[_0x2c6e77(0x11d)]&&(_0x1b4f74=await loadJSON(_0x3bb138[_0x2c6e77(0x11d)],![]));const _0x1f2da6=_0x3bb138[_0x2c6e77(0x216)]===_0x2c6e77(0xec)?null:{'id':_0x3bb138['folderId'],'type':'folder-segment'};_0x17f2f6={'attributes':{'name':_0x3bb138[_0x2c6e77(0x105)],'description':_0x3bb138[_0x2c6e77(0x2ad)]||null,..._0x5239b5!==undefined&&{'audienceId':_0x5239b5},..._0x1b4f74!==undefined&&{'sections':_0x1b4f74}},'relationships':{'parentFolder':{'data':_0x1f2da6}}};}const _0x129ada=await withSpinner(_0x2c6e77(0x173)+(_0x17f2f6[_0x2c6e77(0x17d)]?.[_0x2c6e77(0x105)]??'')+_0x2c6e77(0x1ca),()=>_0x2bf312[_0x2c6e77(0x199)][_0x2c6e77(0x27f)](_0x17f2f6),{'verbose':_0x47d8ff[_0x2c6e77(0xfa)]}),_0x54bf05=_0x129ada[_0x2c6e77(0x244)];return console['error'](_0x2c6e77(0xf4)+_0x54bf05[_0x2c6e77(0x105)]+_0x2c6e77(0x187)+_0x54bf05['id']),await handleSDKOutput([_0x54bf05],_0x47d8ff),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x2d63b8(0x105)]='ps:pz:patch';[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x15e);async[a31_0x2d63b8(0x25f)](_0x15e482){const _0xd81c92=a31_0x2d63b8,{options:_0x3fab72,args:_0x24533e}=_0x15e482,_0x34887d=_0x3fab72,_0x5b87ca=_0x24533e[0x0];if(!_0x5b87ca)return console[_0xd81c92(0x17a)](_0xd81c92(0xa6)),console[_0xd81c92(0x17a)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0xd81c92(0x17a)](_0xd81c92(0x282)),0x1;let _0x1d242b;if(_0x34887d['file'])_0x1d242b=await loadJSON(_0x34887d['file'],!![]);else{if(!_0x34887d[_0xd81c92(0x105)])return console[_0xd81c92(0x17a)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0xd81c92(0xa4)),0x1;if(_0x34887d[_0xd81c92(0x2ad)]===undefined)return console['error'](_0xd81c92(0x206)),console[_0xd81c92(0x17a)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x20d998;_0x34887d['sections']&&(_0x20d998=await loadJSON(_0x34887d[_0xd81c92(0x11d)],![])),_0x1d242b={'attributes':{'name':_0x34887d['name'],'description':_0x34887d[_0xd81c92(0x2ad)]||null,..._0x20d998!==undefined&&{'sections':_0x20d998}}};}const {tdx:_0x56c699}=_0x15e482,_0x3e3264=await withSpinner('Patching\x20personalization\x20\x27'+_0x5b87ca+_0xd81c92(0x1ca),()=>_0x56c699['personalization'][_0xd81c92(0x1e0)](_0x5b87ca,_0x1d242b),{'verbose':_0x3fab72[_0xd81c92(0xfa)]}),_0x5d9dd3=_0x3e3264[_0xd81c92(0x244)];return console[_0xd81c92(0x17a)](_0xd81c92(0x270)+_0x5d9dd3[_0xd81c92(0x105)]+_0xd81c92(0xf0)+_0x5d9dd3['id']+')'),await handleSDKOutput([_0x5d9dd3],_0x3fab72),0x0;}}function a31_0x3692(){const _0x187784=['totalEvents','ps:rt:validate','events','Create\x20a\x20realtime\x20personalization\x20entity','label','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','YAML\x20file:\x20','Show\x20personalization\x20service\x20details','.yml','Attributes:','attributesFile','✔\x20Deleted\x20token\x20\x27','sampleData','personalization','collectSchema','match','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','join','Creating\x20parent\x20segment\x20\x27','listPersonalizations','dim','\x27\x20and\x20run\x20workflow?','Finding\x20service\x20for\x20token...','Fetching\x20sample\x20data...','754623RnpzqC','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','indexOf','\x0aError:','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Master\x20Table','784156cFcDBF','\x22\x20}','/\x20directory.\x0a','customerGroup','query','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','`\x20to\x20download\x20the\x20configuration\x20first','createdAt','Attempt:','message','parentSegment','\x0a⚠️\x20\x20Migrating:\x20','Attribute:','length','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','Master:','Error:\x20Token\x20ID\x20is\x20required','scheduleType','getPersonalization','\x0aNo\x20sample\x20data\x20available','displayColumns','✔\x20Created\x20token\x20\x27','xdg-open','Updating','\x20Added\x20RT\x202.0\x20template\x20section','stringify','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','public','\x27...','\x20stage','✔\x20Query\x20completed:\x20Processed\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','true','joinKey','\x20true','state','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','no\x20tokens\x20configured','Fetching\x20current\x20configuration\x20for\x20\x27','value','customerGroupFile','red','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','endsWith','listJourneys','yes','/attempt/','web','patchPersonalization','sourceTableValid','coveragePercent','segment:parent:pull','reduce','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Updating\x20personalization\x20service\x20\x27','Error:\x20--attribute\x20requires\x20a\x20name\x0a','column','all','SQL\x20query:\x0a','status','880YjsjBK','Delete\x20a\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','ps:rt:list','varchar','\x20[Job\x20ID:\x20','valid','setJobId','bold','launched','453537ZhVzUX','displayRealtimeInfo','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','⚡\x20Enabled','\x22,\x20\x22type\x22:\x20\x22','validateParentYaml','Show\x20a\x20specific\x20realtime\x20personalization','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','SELECT\x20*\x20FROM\x20','replace','Error:\x20File\x20not\x20found:\x20','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','displaySampleData','Resolving\x20parent\x20segment\x20\x27','processedRows','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Columns:','sourceTableError','✔\x20Renamed\x20directory\x20to\x20','scheduleOption','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','token:','\x20\x20\x20\x20\x20\x20','Deleting\x20personalization\x20service\x20\x27','Status:','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','folderId','No\x20parent\x20segments\x20found','single','\x20parent\x20segment','/sessions/','parent_segments','Error:\x20Service\x20name\x20is\x20required','updatedAt','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Deleting\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','rowCount','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','getParentFull','getBehaviorNames','.yaml','Attributes','personalization_services','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','page_view','master','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','Aborted.','previewParentYaml','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x27\x20for\x20service\x20\x27','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','/\x20directories\x20exist.','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Next\x20steps:','parent_segment','column_name','Preview:','Delete\x20a\x20realtime\x20personalization','updated:','\x20RT-enabled\x20parent\x20segment','displaySummary','✔\x20Found\x20personalization\x20\x27','Error:\x20Token\x20name\x20is\x20required','pullParentYaml','58MkhxhP','\x0aChanges\x20to\x20\x27','-1d','entryCriteria','data','No\x20RT-enabled\x20parent\x20segments\x20found','SELECT\x20*\x20FROM\x20(\x0a','columns','sort','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Personalization:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','allowedIps','\x0aUsage:\x20tdx\x20ps\x20preview\x20','List\x20available\x20fields\x20for\x20segmentation','stats','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','text','✔\x20Created\x20parent\x20segment\x20\x27','unref','id:\x20','status:\x20','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Schema\x20saved\x20to\x20','double','platform','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','My\x20Service','\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','execute','\x20--behavior\x20\x22','Updating\x20parent\x20segment\x20\x27','formatSchemaJson','✔\x20Retrieved\x20RT\x20configuration\x20version','allValid','schemaError','in\x20','\x20behaviors','\x20parent\x20segment\x20\x27','Listing\x20RT\x20journeys\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','Site:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','cyan','toFixed','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment','✔\x20Updated\x20personalization\x20\x27','run','segment:parent:run','displayValidateResults','runParent','/\x20and\x20','Create\x20parent\x20segment\x20\x27','\x27\x20is\x20already\x20up\x20to\x20date','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','attribute','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20','Personalization\x20service\x20description','\x0a⚠️\x20\x20Both\x20','realtime','createPersonalization','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','audienceId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Events:','schemaValid','\x20\x20Columns:\x20','Output\x20file:\x20','matchedCount','Error:\x20Parent\x20segment\x20name\x20is\x20required','ignore','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','/{name}.yml\x0a','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x20No\x20changes\x20-\x20','utf-8','number','tokens','\x20rows)','✔\x20No\x20changes\x20-\x20\x27','\x20rows\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','\x20\x202.\x20Run\x20','sections:','addAttributes','Fetching\x20behavior\x20list...','interval','yellow','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','population','public:','delete','Coverage:','filter','Listing\x20RT-enabled\x20parent\x20segments...','create','ps:rt:configuration_versions','behavior_','ps:pz:service:create','Errors:','workflowId','patch','No\x20RT\x20journeys\x20found','keyEventCriteria','\x20personalization','description','output','Resume\x20activations\x20in\x20an\x20RT\x20journey','Table:\x20','listParents','\x0aNew\x20parent\x20segment\x20\x27','displayPreviewHints','isDirectory','⚡\x20Not\x20enabled','✔\x20Found\x20','displayPreviewResults','timezone','Options:\x0a','Rows:','repeat','trim','type','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','ps:pz:delete','Error:\x20Personalization\x20ID\x20is\x20required','/app/workflows/','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','\x20Configuration\x20is\x20valid','stop','format','identifier:\x20','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','✔\x20Deleted\x20personalization\x20service\x20\x27','addAttributesFile','Join\x20on:','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','workflowSessionId','td_client_id','green','darwin','enabled','Session:','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','identifier','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','customersWithEvents','localeCompare','segment:parent:preview','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Error\x20parsing\x20YAML:\x20','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Pause\x20activations\x20in\x20an\x20RT\x20journey','\x20tdx\x20wf\x20attempt\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','segment','Fetching\x20SQL\x20for\x20\x27','test','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','table','Get\x20current\x20RT\x20configuration\x20version\x20status','payload','last_page_viewed','pushParentYaml','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','ID\x20Stitching:','ps:pz:service:delete','Listing\x20personalizations\x20for\x20\x27','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Deleting\x20token\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','behaviors','Listing\x20fields\x20for\x20\x27','segment:parent:show','Error:','Created','\x20to\x20configure\x20your\x20personalization\x20service','site','Executing\x20parent\x20segment\x20query...','user_id','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','addBehaviors','start','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','ps:pz:service:show','\x5c$&','✔\x20Deleted\x20personalization\x20\x27','Error:\x20--name\x20is\x20required','json','null','Found\x20YAML\x20file:\x20','realtime:','Default','\x27\x20(id:\x20','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','ps:pz:service:list','\x20kill','✔\x20Created\x20personalization\x20\x27','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Source:','1763WQjRsY','10179rOnBbS','ps:rt:jn:resume','verbose','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Error:\x20Service\x20ID\x20is\x20required','jsonl','\x20service','errors','Updated','information_schema','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','RT\x202.0\x20Validate:','Fetching\x20parent\x20segment\x20\x27','name','\x20RT\x20journey','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Getting\x20personalization\x20\x27','\x20--interval\x20','map','some','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','workflowAttemptId','open','file','keyEventId','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','log','RT\x20Journey\x20ID:\x20','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','RT\x202.0:','23340IuJmeA','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','Parent\x20segment:\x20','displayBehaviorsStats','segment:parent:desc','addBehaviorsFile','sections','resolveParentId','stageCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','\x20total','FINISHED','parentFolder','Behaviors','segment:parent:sql','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20is\x20already\x20up\x20to\x20date','list','(id:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','personalizationServices','✔\x20Created\x20personalization\x20service\x20\x27','ps:pz:show','updateParent','Validate:','Apply\x20changes\x20to\x20\x27','keys','/app/dw/parentSegments/','230spECwQ','ps:pz:service:update','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Customers:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','jobId','database','Options\x20(one\x20required):\x0a','Creating\x20personalization\x20service\x20\x27','Listing\x20personalization\x20services\x20for\x20\x27','tdx\x20ps\x20preview\x20','segment:parent:view','Error:\x20Token\x20\x27','\x20--enriched','getCurrentConfigVersion','Fetching\x20customers\x20schema...','Behavior:','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','displayAttributesStats','Get\x20SQL\x20query\x20for\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment','segment:parent:update','stitchingKeys','\x20field','\x20(paused)','2363290dWtaCm','✘\x20Failed\x20to\x20rename\x20directory:\x20','\x0a\x20\x20\x20\x20}','getParentSQL','\x20\x20\x20\x20-\x20','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20service(s)\x20configured','\x20--attribute\x20\x22','Creating','\x20\x201.\x20Edit\x20','created:','\x20\x20Note:\x20','Overwrite\x20\x27','To\x20view\x20sample\x20data:','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20=\x20','primaryKey','Update\x20a\x20realtime\x20personalization\x20entity','Creating\x20token\x20\x27','includeSensitive','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Error\x20reading\x20file:\x20','\x0a✔\x20Workflow\x20started','segment:parent:fields','foreignKey','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','behavior','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','customers','enriched','To\x20cancel:','paused','allowed\x20IPs:','\x20configured','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','string','idStitching','Creating\x20personalization\x20\x27','audienceId:','segment:parent:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','error','payload:','eventKind:\x20','attributes','Analyzing\x20changes...','segment:parent:validate','eventKind','column_type','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Listing\x20parent\x20segments\x20matching\x20\x27','relationships','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','customerPercent','\x27\x20with\x20ID:\x20','toLowerCase','apply','any','No\x20personalization\x20services\x20configured'];a31_0x3692=function(){return _0x187784;};return a31_0x3692();}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x2d63b8(0x105)]='ps:pz:init';[a31_0x2d63b8(0x2ad)]=a31_0x2d63b8(0x280);async['execute'](_0x377fec){const _0x3cb99b=a31_0x2d63b8,{options:_0x5c153b,args:_0x1c25fc}=_0x377fec,_0x57f529=_0x1c25fc[0x0]||_0x5c153b[_0x3cb99b(0x1b7)];if(!_0x57f529)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a'+_0x3cb99b(0x147)),0x1;const _0x4b6e8d=resolveYamlFile(_0x57f529);if(!existsSync(_0x4b6e8d))return showFileNotFoundError(_0x4b6e8d,_0x57f529),0x1;let _0x4eddad;try{_0x4eddad=readFileSync(_0x4b6e8d,_0x3cb99b(0x28e));}catch(_0x23c4f4){const _0x4c64a4=_0x23c4f4 instanceof Error?_0x23c4f4[_0x3cb99b(0x1b6)]:String(_0x23c4f4);return console[_0x3cb99b(0x17a)](_0x3cb99b(0x162)+_0x4c64a4),0x1;}let _0x2f92d1;try{_0x2f92d1=parseDef(_0x4eddad);}catch(_0x246659){const _0x2deac8=_0x246659 instanceof Error?_0x246659[_0x3cb99b(0x1b6)]:String(_0x246659);return console['error'](a31_0x1fbc7e[_0x3cb99b(0x1d8)](_0x3cb99b(0xc1)+_0x2deac8)),0x1;}if(_0x2f92d1[_0x3cb99b(0x228)]&&_0x2f92d1[_0x3cb99b(0x228)][_0x3cb99b(0x1ba)]>0x0)return console[_0x3cb99b(0x17a)](a31_0x1fbc7e[_0x3cb99b(0x29a)](_0x3cb99b(0x115)+_0x4b6e8d)),console['error'](a31_0x1fbc7e[_0x3cb99b(0x1a0)]('\x20\x20\x20'+_0x2f92d1[_0x3cb99b(0x228)][_0x3cb99b(0x1ba)]+_0x3cb99b(0x153))),0x1;!_0x2f92d1[_0x3cb99b(0x27e)]&&(_0x2f92d1[_0x3cb99b(0x27e)]={'events':[{'name':_0x3cb99b(0x22a),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x3cb99b(0xcd),'type':_0x3cb99b(0x218)}],'id_stitching':{'primary_key':_0x2f92d1[_0x3cb99b(0x22b)][_0x3cb99b(0xca)]===_0x3cb99b(0x16a)?_0x3cb99b(0xb4):_0x3cb99b(0xe2)}});_0x2f92d1[_0x3cb99b(0x228)]=[{'name':_0x3cb99b(0x25c),'description':_0x3cb99b(0x27c),'trigger_event':_0x3cb99b(0x22a),'sections':[{'name':_0x3cb99b(0xef),'criteria':_0x3cb99b(0x1ce),'attributes':['last_page_viewed']}]}];const _0x16737f=serializeDef(_0x2f92d1);return writeFileSync(_0x4b6e8d,_0x16737f,_0x3cb99b(0x28e)),console[_0x3cb99b(0x17a)](a31_0x1fbc7e[_0x3cb99b(0xb5)]('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x1fbc7e[_0x3cb99b(0x26d)](_0x4b6e8d)),(!_0x2f92d1['realtime']||_0x4eddad[_0x3cb99b(0x1a6)](_0x3cb99b(0xee))===-0x1)&&console[_0x3cb99b(0x17a)](a31_0x1fbc7e[_0x3cb99b(0xb5)]('✔')+_0x3cb99b(0x1c5)),console[_0x3cb99b(0x17a)]('\x0a'+a31_0x1fbc7e[_0x3cb99b(0x1a0)](_0x3cb99b(0x235))),console['error'](_0x3cb99b(0x156)+_0x4b6e8d+_0x3cb99b(0xdf)),console['error'](_0x3cb99b(0x295)+a31_0x1fbc7e[_0x3cb99b(0x1a0)]('tdx\x20ps\x20push\x20'+_0x57f529)+'\x20to\x20push\x20the\x20configuration'),0x0;}}
1
+ const a31_0x3334a4=a31_0x2bf9;(function(_0x143ef9,_0x4f18eb){const _0xa868ff=a31_0x2bf9,_0x1f71eb=_0x143ef9();while(!![]){try{const _0x3891f2=-parseInt(_0xa868ff(0x12c))/0x1+parseInt(_0xa868ff(0x1df))/0x2+parseInt(_0xa868ff(0x28f))/0x3*(parseInt(_0xa868ff(0x2b7))/0x4)+-parseInt(_0xa868ff(0x22d))/0x5*(-parseInt(_0xa868ff(0x2c1))/0x6)+-parseInt(_0xa868ff(0x225))/0x7+parseInt(_0xa868ff(0x1a9))/0x8*(parseInt(_0xa868ff(0x2d7))/0x9)+-parseInt(_0xa868ff(0x294))/0xa*(parseInt(_0xa868ff(0x130))/0xb);if(_0x3891f2===_0x4f18eb)break;else _0x1f71eb['push'](_0x1f71eb['shift']());}catch(_0x15313c){_0x1f71eb['push'](_0x1f71eb['shift']());}}}(a31_0x5870,0x71b58));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x45b635 from'path';import{BaseCommand}from'./command.js';function a31_0x5870(){const _0x11838e=['Creating','ps:rt:jn:resume','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','getPersonalization','\x20\x20\x20\x20\x20\x20\x20\x20','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','Apply\x20changes\x20to\x20\x27','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','tokens','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20--behavior\x20\x22','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Creating\x20parent\x20segment\x20\x27','ps:rt:list','segment:parent:pull','user_id','single','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','ps:pz:patch','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','yellow','status','list','getParentSQL','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','segment:parent:validate','\x20tdx\x20wf\x20attempt\x20','createPersonalization','get','\x20total','\x20Added\x20personalization\x20template\x20to\x20','type','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','displayMasterInfo','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','deleteToken','\x27...','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','FINISHED','/attempt/','segment:parent:show','displaySummary','Listing\x20personalization\x20services\x20for\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','\x20\x20No\x20sample\x20data\x20available','Deleting\x20personalization\x20\x27','<database>.<table>','schemaError','Schema\x20saved\x20to\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','in\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','sourceTableValid','Errors:','\x20\x20\x20\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','information_schema','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Options\x20(one\x20required):\x0a','columns','displaySampleData','folderId','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','replace','\x20Context\x20set:\x20','jsonl','patchPersonalization','Events:','sections:','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','displayAttributesStats','customerGroup','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','payload:','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','Preview:','Listing\x20fields\x20for\x20\x27','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Create\x20a\x20realtime\x20personalization\x20entity','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x20--enriched','/sessions/','\x20parent\x20segment','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','36390XLQilv','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','label','red','8540xsHpNG','\x20--interval\x20','json','segment:parent:run','To\x20view\x20sample\x20data:','No\x20RT\x20journeys\x20found','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20\x201.\x20Edit\x20','{\x0a\x20\x20\x22database\x22:\x20\x22','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','✔\x20Deleted\x20personalization\x20\x27','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','✔\x20Created\x20token\x20\x27','site','green','\x20+\x20[','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Listing\x20parent\x20segments...','parentFolder','Show\x20personalization\x20service\x20details','parentSegment','push','file','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Creating\x20token\x20\x27','formatSchemaJson','updateParent','identifier','toFixed','enriched','Columns:','eventKind','172MeZerF','Options:','ps:pz:list','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','limit','map','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','getOutputDatabaseName','Updated','6tLKXjH','workflowId','ps:pz:service:create','\x0a\x20\x20\x20\x20}','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','state','Show\x20parent\x20segment\x20details','Attributes','keyEventCriteria','listParents','resolveParentId','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Personalization\x20service\x20description','Created','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','allowedIps','bold','Listing\x20parent\x20segments\x20matching\x20\x27','/{name}.yml\x0a','\x27\x20is\x20already\x20up\x20to\x20date','updatedAt','59589GwGeoN','\x20=\x20','Join\x20on:','resumeJourney','Attributes:','\x20RT\x20configuration\x20is\x20valid','displayRealtimeInfo','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','No\x20personalizations\x20configured','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','start','Aborted.','\x27\x20(id:\x20','\x27\x20with\x20ID:\x20','jobId','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Error:\x20Personalization\x20ID\x20is\x20required','Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a','Master\x20+\x20Attributes','getParentFull','\x20Added\x20RT\x202.0\x20template\x20section','\x0aChanges\x20to\x20\x27','using\x20the\x20default\x20path:\x20','joinKey','\x20\x20\x20\x20\x20\x20','public:','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x27\x20and\x20run\x20workflow?','dim','Error:','eventKind:\x20','\x20[Job\x20ID:\x20','error','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','length','Error:\x20--behavior\x20requires\x20a\x20name\x0a','workflowSessionId','Default','filter','parent_segment','createToken','✔\x20Updated\x20personalization\x20service\x20\x27','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','ps:pz:create','stageCount','deletePersonalization','Enriched:','allowed\x20IPs:','/\x20directories\x20exist.','\x0a⚠️\x20\x20Both\x20','timezone','launched','customers','Table:\x20','\x20\x20Columns:\x20','ps:pz:show','✔\x20Found\x20','Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a','\x20true','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','No\x20RT-enabled\x20parent\x20segments\x20found','run','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Validate:','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Error:\x20Token\x20\x27','primaryKey','segment:parent:sql','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','createParent','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','👥\x20','entryCriteria:','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','sampleData','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','displayPreviewHints','ps:pz:service:update','stop','Fetching\x20sample\x20data...','getBehaviorNames','Patching\x20personalization\x20\x27','audienceId:\x20','\x20Opening\x20','RT\x202.0\x20Validate:','join','value','Error:\x20Service\x20name\x20is\x20required','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','localeCompare','repeat','✔\x20Deleted\x20personalization\x20service\x20\x27','keyEventId','Behavior:','folder-segment','validateParentYaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','Fetching\x20personalization\x20service\x20\x27','ps:rt:jn:list','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Finding\x20service\x20for\x20token...','platform','behavior_','pullParentYaml','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','status:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','ps:pz:init','foreignKey','324883cNQZxK','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Create\x20parent\x20segment\x20\x27','10791KyLgCd','Source:','ID\x20Stitching:','name','Error\x20reading\x20file:\x20','column_name','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x20service(s)\x20configured','tdx\x20ps\x20push\x20','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','segment:parent:create','Attribute:','.yml','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','identifier:\x20','updated:','unref','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','\x20configured','\x0aNew\x20parent\x20segment\x20\x27','RT\x20Journey\x20ID:\x20','sourceTableError','public','\x20--attribute\x20\x22','idStitching','schemaValid','Pause\x20activations\x20in\x20an\x20RT\x20journey','population','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','any','Updating','\x22\x20}','%)\x20','attributesFile','darwin','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','delete','\x20personalization','personalization_services','yes','apply','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','audienceId','number','Status:','interval','web','scheduleType','execute','utf-8','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','SELECT\x20*\x20FROM\x20','Fetching\x20behavior\x20list...','workflowAttemptId','YAML\x20file:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Error:\x20--name\x20is\x20required','/\x20and\x20','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Error:\x20Service\x20ID\x20is\x20required','To\x20cancel:','\x20\x20Tables:\x201\x20customers\x20+\x20','\x20--attribute\x20\x22<name>\x22','Pattern:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x0aNo\x20sample\x20data\x20available','personalization','No\x20personalization\x20services\x20configured','\x5c$&','paused','realtime','Master\x20Table','Overwrite\x20\x27','\x20RT-enabled\x20parent\x20segment','behaviorsFile','\x20\x20Note:\x20','ps:pz:service:show','valid','isDirectory','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20--behavior\x20\x22<name>\x22','\x0a\x20\x20]\x0a}\x0a','Master:','xdg-open','Deleting\x20personalization\x20service\x20\x27','customerGroupFile','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','all','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','behavior','No\x20parent\x20segments\x20match\x20pattern:\x20','Behaviors','listFields','Fetching\x20current\x20configuration\x20for\x20\x27','column_type','.customers)','Fetching\x20SQL\x20for\x20\x27','Resume\x20activations\x20in\x20an\x20RT\x20journey','/app/dw/parentSegments/','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','some','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x20No\x20changes\x20-\x20','trim','setJobId','⚡\x20Enabled','pushParentYaml','format','last_page_viewed','personalizationServices','Join:','tdx\x20ps\x20preview\x20','\x27\x20for\x20service\x20\x27','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','\x20\x202.\x20Run\x20','344BofAwL','✔\x20Updated\x20personalization\x20\x27','Fetching\x20customers\x20schema...','.yaml','column','endsWith','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Fetching\x20parent\x20segment\x20\x27','Error:\x20Token\x20name\x20is\x20required','Available\x20behaviors:','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','includeSensitive','segment','\x20stage','\x27\x20is\x20up\x20to\x20date','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20\x20','\x20\x20\x20\x20-\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','Updating\x20personalization\x20service\x20\x27','\x20(paused)','ps:rt:validate','parent_segments','RT\x202.0:','Analyzing\x20changes...','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','match','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment','description','Show\x20parent\x20segment\x20schema\x20(column\x20types)','displayBehaviorsStats','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','getCurrentConfigVersion','dirname','Validating\x20configuration...','behaviors','Personalization:','Next\x20steps:','errors','Attempt:','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','rowCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','page_view','log','double','Listing\x20RT-enabled\x20parent\x20segments...','\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Update\x20a\x20realtime\x20personalization\x20entity','ignore','cyan','1556966yNtjWL','customerPercent','entryCriteria','✔\x20Retrieved\x20RT\x20configuration\x20version','varchar','verbose','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','true','List\x20available\x20fields\x20for\x20segmentation','payload','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','displayValidateResults','displayColumns','\x0aUsage:\x20tdx\x20ps\x20preview\x20','master','\x0a⚠️\x20\x20Migrating:\x20','Customers:','Options:\x0a','Parent\x20segment:\x20','segment:parent:view','Listing\x20personalizations\x20for\x20\x27','Get\x20current\x20RT\x20configuration\x20version\x20status','ps:pz:service:delete','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','sections','Validating\x20RT\x20configuration...','\x20is\x20already\x20up\x20to\x20date','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','message','attribute','parent_id','Error:\x20Token\x20ID\x20is\x20required','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','null','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','\x20field','toLocaleString','✔\x20Created\x20personalization\x20service\x20\x27','\x20to\x20push\x20the\x20configuration','\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}','database','attributes','test','(id:\x20','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x20RT\x20journey','\x20Configuration\x20is\x20valid','table','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Executing\x20parent\x20segment\x20query...','string','No\x20parent\x20segments\x20found','data','✔\x20Created\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','ps:pz:service:list','realtime_enabled','coveragePercent','\x0aError:','scheduleOption','pauseJourney','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','events','split','matchedCount','processedRows','text','1115016NupXxF','Site:\x20','elapsedTimeMillis','output','toLowerCase','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','stats','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','1014605urqCSG','Resolving\x20parent\x20segment\x20\x27','Database:\x20','✔\x20No\x20changes\x20-\x20\x27','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','allValid','segment:parent:update','stitchingKeys','Creating\x20personalization\x20service\x20\x27','\x22,\x20\x22type\x22:\x20\x22'];a31_0x5870=function(){return _0x11838e;};return a31_0x5870();}import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';function a31_0x2bf9(_0xd5b598,_0x528af2){_0xd5b598=_0xd5b598-0xef;const _0x5870ee=a31_0x5870();let _0x2bf9a2=_0x5870ee[_0xd5b598];return _0x2bf9a2;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x47c070 from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x3334a4(0x1bf),LEGACY_PARENT_SEGMENT_DIR=a31_0x3334a4(0x2fe);function openBrowser(_0x13d708){const _0x15971e=a31_0x3334a4,_0x2c74d5=process[_0x15971e(0x124)],_0x40d8e3=_0x2c74d5===_0x15971e(0x154)?'open':_0x2c74d5==='win32'?_0x15971e(0x2e1):_0x15971e(0x188);spawn(_0x40d8e3,[_0x13d708],{'detached':!![],'stdio':_0x15971e(0x1dd)})[_0x15971e(0x140)]();}function migrateLegacyDirectory(){const _0x158f58=a31_0x3334a4;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x55ff7c=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x55ff7c[_0x158f58(0x183)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x47c070[_0x158f58(0x24c)](_0x158f58(0xef)+LEGACY_PARENT_SEGMENT_DIR+_0x158f58(0x16e)+PARENT_SEGMENT_DIR+_0x158f58(0x307))),console[_0x158f58(0x2f7)](a31_0x47c070[_0x158f58(0x2f3)](_0x158f58(0x28e)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x158f58(0x2f7)](a31_0x47c070[_0x158f58(0x24c)](_0x158f58(0x1ee)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x158f58(0x2f7)](a31_0x47c070['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x583a2f){const _0x55d43a=_0x583a2f instanceof Error?_0x583a2f[_0x158f58(0x1fc)]:String(_0x583a2f);return console[_0x158f58(0x2f7)](a31_0x47c070['red']('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x55d43a+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x5274c8){const _0x504d89=a31_0x3334a4;return migrateLegacyDirectory(),super[_0x504d89(0xfb)](_0x5274c8);}}function resolveYamlFile(_0x45040c){const _0x4d3edf=a31_0x3334a4;if(_0x45040c[_0x4d3edf(0x1ae)](_0x4d3edf(0x13c))||_0x45040c[_0x4d3edf(0x1ae)](_0x4d3edf(0x1ac)))return _0x45040c;return a31_0x45b635[_0x4d3edf(0x114)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x45040c)+_0x4d3edf(0x13c));}function formatProgressMessage(_0x2b2226){const _0x1f3208=a31_0x3334a4,_0x1d8ba5=_0x2b2226[_0x1f3208(0x1c3)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x1d8ba5){const [,_0x1f3edd,_0x333a3e,_0x148549='']=_0x1d8ba5;return a31_0x47c070['dim'](_0x1f3edd+':')+'\x20'+_0x333a3e+a31_0x47c070[_0x1f3208(0x2f3)](_0x148549);}return a31_0x47c070[_0x1f3208(0x2f3)](_0x2b2226);}function showFileNotFoundError(_0x4e5456,_0x4d22c3){const _0x4f3ef6=a31_0x3334a4;console['error'](a31_0x47c070[_0x4f3ef6(0x293)]('Error:\x20File\x20not\x20found:\x20'+_0x4e5456+'\x0a')),console['error'](a31_0x47c070['cyan'](_0x4f3ef6(0x19a)+_0x4d22c3+_0x4f3ef6(0x266)));}function displayRealtimeValidation(_0x124e72){const _0x244085=a31_0x3334a4;if(!_0x124e72['realtime'])return;const _0x37aba7=_0x124e72[_0x244085(0x17b)],_0x278f87=_0x37aba7['enabled']?a31_0x47c070[_0x244085(0x2a3)](_0x244085(0x19e)):a31_0x47c070[_0x244085(0x24c)]('⚡\x20Not\x20enabled');console[_0x244085(0x2f7)]('\x0a'+a31_0x47c070[_0x244085(0x2f3)](_0x244085(0x1c0))+'\x20'+_0x278f87);if(_0x37aba7[_0x244085(0x220)]&&_0x37aba7[_0x244085(0x220)][_0x244085(0x2f9)]>0x0){console[_0x244085(0x2f7)]('\x20\x20'+a31_0x47c070['dim'](_0x244085(0x27e))+'\x20'+_0x37aba7[_0x244085(0x220)][_0x244085(0x2f9)]+_0x244085(0x144));for(const _0x31e49e of _0x37aba7[_0x244085(0x220)]){const _0xff7b25=_0x31e49e[_0x244085(0x26f)]===![]?a31_0x47c070[_0x244085(0x293)]('✘'):a31_0x47c070['green']('✔');console[_0x244085(0x2f7)](_0x244085(0x271)+_0xff7b25+'\x20'+_0x31e49e[_0x244085(0x133)]),_0x31e49e[_0x244085(0x147)]&&console[_0x244085(0x2f7)]('\x20\x20\x20\x20\x20\x20'+a31_0x47c070['red'](_0x31e49e[_0x244085(0x147)]));}}if(_0x37aba7[_0x244085(0x20b)]&&_0x37aba7[_0x244085(0x20b)][_0x244085(0x2f9)]>0x0){console[_0x244085(0x2f7)]('\x20\x20'+a31_0x47c070[_0x244085(0x2f3)](_0x244085(0x2db))+'\x20'+_0x37aba7[_0x244085(0x20b)]['length']+_0x244085(0x144));for(const _0x2aac54 of _0x37aba7[_0x244085(0x20b)]){const _0x1d4ffc=_0x2aac54[_0x244085(0x182)]?a31_0x47c070[_0x244085(0x2a3)]('✔'):a31_0x47c070[_0x244085(0x293)]('✘');console['error'](_0x244085(0x271)+_0x1d4ffc+'\x20'+_0x2aac54[_0x244085(0x133)]+'\x20'+a31_0x47c070[_0x244085(0x2f3)]('('+_0x2aac54[_0x244085(0x257)]+')'));}}if(_0x37aba7[_0x244085(0x14a)]){const _0x4c9785=_0x37aba7[_0x244085(0x14a)][_0x244085(0x234)]?.[_0x244085(0x2f9)]?_0x244085(0x2a4)+_0x37aba7['idStitching'][_0x244085(0x234)][_0x244085(0x114)](',\x20')+']':'';console[_0x244085(0x2f7)]('\x20\x20'+a31_0x47c070['dim'](_0x244085(0x132))+'\x20'+_0x37aba7[_0x244085(0x14a)][_0x244085(0x100)]+_0x4c9785);}if(_0x37aba7['personalizationServices']&&_0x37aba7[_0x244085(0x1a2)][_0x244085(0x2f9)]>0x0){console['error']('\x20\x20'+a31_0x47c070['dim'](_0x244085(0x1ce))+'\x20'+_0x37aba7[_0x244085(0x1a2)]['length']+'\x20service'+(_0x37aba7[_0x244085(0x1a2)][_0x244085(0x2f9)]!==0x1?'s':''));for(const _0x104f43 of _0x37aba7[_0x244085(0x1a2)]){console['error']('\x20\x20\x20\x20-\x20'+_0x104f43[_0x244085(0x133)]);}}}function showParentSegmentNotSetError(_0x462e24){const _0x161697=a31_0x3334a4;console[_0x161697(0x2f7)](a31_0x47c070['yellow'](_0x161697(0x231))),console[_0x161697(0x2f7)](_0x462e24);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x3334a4(0x133)]='segment:parent:list';['description']='List\x20parent\x20segments';async['execute'](_0x43a60f){const _0x375358=a31_0x3334a4,{options:_0xaa70e6,args:_0x35a9b9,tdx:_0x41e2ec}=_0x43a60f,_0x565116=_0x35a9b9[0x0];_0xaa70e6[_0x375358(0x1e4)]&&(console[_0x375358(0x2f7)](_0x375358(0x226)+_0xaa70e6[_0x375358(0x2a2)]),_0x565116&&console[_0x375358(0x2f7)](_0x375358(0x174)+_0x565116));const _0x48e25c=await withSpinner(_0x565116?_0x375358(0x2d3)+_0x565116+_0x375358(0x25e):_0x375358(0x2a7),()=>_0x41e2ec['segment'][_0x375358(0x2ca)](),{'verbose':_0xaa70e6[_0x375358(0x1e4)]});let _0x1a459f=_0x48e25c[_0x375358(0x216)];if(_0x565116){const _0x4eef10=_0x565116[_0x375358(0x27a)](/[.+^${}()|[\]\\]/g,_0x375358(0x179))[_0x375358(0x27a)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x1b6dda=new RegExp('^'+_0x4eef10+'$','i');_0x1a459f=_0x1a459f[_0x375358(0x2fd)](_0x19c4dc=>_0x1b6dda[_0x375358(0x20c)](_0x19c4dc[_0x375358(0x20b)][_0x375358(0x133)]));}_0x1a459f['sort']((_0xfa3ed1,_0x590927)=>_0xfa3ed1[_0x375358(0x20b)][_0x375358(0x133)][_0x375358(0x118)](_0x590927['attributes']['name'])),console[_0x375358(0x2f7)](_0x375358(0xf6)+_0x1a459f[_0x375358(0x2f9)]+_0x375358(0x28d)+(_0x1a459f[_0x375358(0x2f9)]!==0x1?'s':''));const _0x549bf1=_0x2b57c7=>{const _0x27dd7d=_0x375358;return getConsoleNextUrl(_0xaa70e6[_0x27dd7d(0x2a2)],_0x27dd7d(0x197)+_0x2b57c7);};if(_0xaa70e6[_0x375358(0x1a0)]===_0x375358(0x296)||_0xaa70e6[_0x375358(0x1a0)]===_0x375358(0x27c)){const _0xd0db43=_0x1a459f['map'](_0x1df848=>({..._0x1df848,'url':_0x549bf1(_0x1df848['id'])}));await handleSDKOutput(_0xd0db43,_0xaa70e6);}else{if(_0x1a459f['length']===0x0)_0x565116?console[_0x375358(0x1d7)](_0x375358(0x18f)+_0x565116):console['log'](_0x375358(0x215));else for(const _0x27e939 of _0x1a459f){const _0x2ea536=_0x27e939[_0x375358(0x20b)][_0x375358(0x14d)]?a31_0x47c070[_0x375358(0x2f3)]('\x20('+formatRows(_0x27e939[_0x375358(0x20b)]['population'])+')'):'',_0x32ae2c=hyperlink(_0x27e939[_0x375358(0x20b)][_0x375358(0x133)],_0x549bf1(_0x27e939['id']));console[_0x375358(0x1d7)](_0x375358(0x105)+_0x32ae2c+_0x2ea536);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x13a);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x2f1);async['execute'](_0xab241f){const _0x335220=a31_0x3334a4,{options:_0x2b114a,args:_0x481d92,tdx:_0x1c5ee5}=_0xab241f;console['error'](_0x335220(0x1d3)+_0x335220(0x200)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x157c36=_0x2b114a;if(_0x481d92['length']===0x0)return console[_0x335220(0x2f7)](a31_0x47c070[_0x335220(0x293)](_0x335220(0x26c))),console[_0x335220(0x2f7)](_0x335220(0x109)),0x1;const _0x36154e=_0x481d92[0x0];if(!_0x157c36['database']||!_0x157c36[_0x335220(0x211)])return console[_0x335220(0x2f7)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x335220(0x2f7)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x157c36[_0x335220(0x1e4)]&&(console['error'](_0x335220(0x226)+_0x157c36[_0x335220(0x2a2)]),console[_0x335220(0x2f7)]('Name:\x20'+_0x36154e),console[_0x335220(0x2f7)](_0x335220(0x22f)+_0x157c36[_0x335220(0x20a)]),console[_0x335220(0x2f7)](_0x335220(0xf3)+_0x157c36['table']));const _0x1a961a=await loadJSONFromOptions(_0x157c36[_0x335220(0x20b)],_0x157c36[_0x335220(0x153)]),_0x36f505=await loadJSONFromOptions(_0x157c36[_0x335220(0x1cd)],_0x157c36[_0x335220(0x17f)]),_0x4c0c75=await loadJSONFromOptions(_0x157c36[_0x335220(0x282)],_0x157c36[_0x335220(0x18a)]),_0x2bb053={'name':_0x36154e,'description':_0x157c36[_0x335220(0x1c6)],'scheduleType':_0x157c36[_0x335220(0x164)],'scheduleOption':_0x157c36['scheduleOption'],'timezone':_0x157c36[_0x335220(0xf0)],'master':{'parentDatabaseName':_0x157c36[_0x335220(0x20a)],'parentTableName':_0x157c36[_0x335220(0x211)]},'attributes':_0x1a961a,'behaviors':_0x36f505,'customerGroup':_0x4c0c75},_0x39ae5b=await withSpinner(_0x335220(0x244)+_0x36154e+'\x27...',()=>_0x1c5ee5[_0x335220(0x1b5)][_0x335220(0x103)](_0x2bb053),{'verbose':_0x2b114a[_0x335220(0x1e4)]}),_0x42385c=_0x39ae5b[_0x335220(0x216)];return console[_0x335220(0x2f7)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x42385c[_0x335220(0x133)]+_0x335220(0x2e4)+_0x42385c['id']),await handleSDKOutput([_0x42385c],_0x2b114a),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x233);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x243);async['execute'](_0x269593){const _0x50f1b4=a31_0x3334a4,{options:_0x4d01e5,args:_0x4eeac5,tdx:_0x2d189b}=_0x269593;console[_0x50f1b4(0x2f7)](_0x50f1b4(0x29f)+_0x50f1b4(0x200)+_0x50f1b4(0x203));const _0x496299=_0x4d01e5;if(_0x4eeac5[_0x50f1b4(0x2f9)]===0x0)return console[_0x50f1b4(0x2f7)](a31_0x47c070[_0x50f1b4(0x293)](_0x50f1b4(0x26c))),console[_0x50f1b4(0x2f7)](_0x50f1b4(0x198)),0x1;const _0x52de4a=_0x4eeac5[0x0];_0x496299['verbose']&&(console[_0x50f1b4(0x2f7)]('Site:\x20'+_0x496299[_0x50f1b4(0x2a2)]),console[_0x50f1b4(0x2f7)](_0x50f1b4(0x1f1)+_0x52de4a));const _0x416cd7=await withSpinner(_0x50f1b4(0x192)+_0x52de4a+_0x50f1b4(0x25e),()=>_0x2d189b[_0x50f1b4(0x1b5)]['getParentFull'](_0x52de4a),{'verbose':_0x496299['verbose']}),_0x40f212=_0x416cd7[_0x50f1b4(0x216)],_0x5a3f1a=await loadJSONFromOptions(_0x496299['addAttributes'],_0x496299['addAttributesFile']),_0x221ebe=await loadJSONFromOptions(_0x496299['addBehaviors'],_0x496299['addBehaviorsFile']),_0x29ed38={'name':_0x40f212[_0x50f1b4(0x133)],'description':_0x496299[_0x50f1b4(0x1c6)]!==undefined?_0x496299[_0x50f1b4(0x1c6)]:_0x40f212[_0x50f1b4(0x1c6)],'scheduleType':_0x496299[_0x50f1b4(0x164)]!==undefined?_0x496299[_0x50f1b4(0x164)]:_0x40f212[_0x50f1b4(0x164)],'scheduleOption':_0x496299[_0x50f1b4(0x21d)]!==undefined?_0x496299[_0x50f1b4(0x21d)]:_0x40f212['scheduleOption'],'timezone':_0x496299[_0x50f1b4(0xf0)]!==undefined?_0x496299[_0x50f1b4(0xf0)]:_0x40f212[_0x50f1b4(0xf0)],'master':_0x40f212[_0x50f1b4(0x1ed)],'attributes':_0x5a3f1a?[..._0x40f212['attributes']||[],..._0x5a3f1a]:_0x40f212[_0x50f1b4(0x20b)],'behaviors':_0x221ebe?[..._0x40f212[_0x50f1b4(0x1cd)]||[],..._0x221ebe]:_0x40f212[_0x50f1b4(0x1cd)],'customerGroup':_0x40f212[_0x50f1b4(0x282)]},_0x5a24d2=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x52de4a+_0x50f1b4(0x25e),()=>_0x2d189b[_0x50f1b4(0x1b5)][_0x50f1b4(0x2b1)](_0x52de4a,_0x29ed38),{'verbose':_0x496299[_0x50f1b4(0x1e4)]}),_0x16f598=_0x5a24d2[_0x50f1b4(0x216)];return console[_0x50f1b4(0x2f7)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x16f598[_0x50f1b4(0x133)]+'\x27'),await handleSDKOutput([_0x16f598],_0x496299),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x246);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x280);async[a31_0x3334a4(0x165)](_0x3d5b76){const _0x57015e=a31_0x3334a4,{options:_0x3c55f1,args:_0x3bc0d3,tdx:_0x30884c}=_0x3d5b76,_0x3ece0c=_0x3c55f1,_0x444d07=_0x3bc0d3[0x0]||_0x3c55f1[_0x57015e(0x2aa)];if(!_0x444d07)return showParentSegmentNotSetError(_0x57015e(0x10a)+_0x57015e(0x1d5)),0x1;if(_0x3ece0c['use']&&_0x3ece0c['output'])return console['error'](a31_0x47c070['red'](_0x57015e(0x212))),console['error'](a31_0x47c070[_0x57015e(0x2f3)](_0x57015e(0x2ba))),console['error'](a31_0x47c070[_0x57015e(0x2f3)](_0x57015e(0x2ed)+PARENT_SEGMENT_DIR+_0x57015e(0x2d4))),console[_0x57015e(0x2f7)](a31_0x47c070[_0x57015e(0x1de)](_0x57015e(0x127))),0x1;const _0x2277b2=_0x3ece0c[_0x57015e(0x228)]||a31_0x45b635[_0x57015e(0x114)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x444d07)+_0x57015e(0x13c));_0x3ece0c[_0x57015e(0x1e4)]&&(console['error'](_0x57015e(0x226)+_0x3ece0c[_0x57015e(0x2a2)]),console['error']('Parent\x20segment:\x20'+_0x444d07),console['error']('Output\x20file:\x20'+_0x2277b2));const _0x3313a6=await withSpinner(_0x57015e(0x1b0)+_0x444d07+'\x27...',()=>_0x30884c['segment'][_0x57015e(0x126)](_0x444d07),{'verbose':_0x3ece0c[_0x57015e(0x1e4)]}),_0x268243=_0x3313a6['data'];if(existsSync(_0x2277b2)){const _0x31b082=readFileSync(_0x2277b2,'utf-8'),_0x2c3740=generateDiff(_0x31b082,_0x268243);if(!hasChanges(_0x2c3740))console[_0x57015e(0x2f7)](a31_0x47c070[_0x57015e(0x2a3)]('✔')+_0x57015e(0x19b)+a31_0x47c070[_0x57015e(0x1de)](_0x2277b2)+_0x57015e(0x1f9));else{console[_0x57015e(0x2f7)](_0x57015e(0x2ec)+_0x2277b2+'\x27:'),console['error']('─'['repeat'](0x3c)),console[_0x57015e(0x2f7)](formatDiffWithColors(_0x2c3740)),console[_0x57015e(0x2f7)]('─'['repeat'](0x3c));if(!_0x3ece0c[_0x57015e(0x15b)]){if(!isInteractive())return console[_0x57015e(0x2f7)](a31_0x47c070[_0x57015e(0x293)]('\x0aError:'),_0x57015e(0x16c)),console[_0x57015e(0x2f7)](a31_0x47c070[_0x57015e(0x2f3)](_0x57015e(0x122))),0x1;const _0x34ac8e=await confirmKey(_0x57015e(0x17d)+_0x2277b2+'\x27?');if(!_0x34ac8e)return console[_0x57015e(0x2f7)](a31_0x47c070[_0x57015e(0x24c)](_0x57015e(0x2e2))),0x1;}writeFileSync(_0x2277b2,_0x268243,_0x57015e(0x166)),console[_0x57015e(0x2f7)](a31_0x47c070['green']('✔')+_0x57015e(0x274)+a31_0x47c070[_0x57015e(0x1de)](_0x2277b2));}}else{const _0x232052=a31_0x45b635[_0x57015e(0x1cb)](_0x2277b2);!existsSync(_0x232052)&&mkdirSync(_0x232052,{'recursive':!![]}),writeFileSync(_0x2277b2,_0x268243,_0x57015e(0x166)),console['error'](a31_0x47c070['green']('✔')+_0x57015e(0x274)+a31_0x47c070[_0x57015e(0x1de)](_0x2277b2));}return saveSessionContext({'parent_segment':_0x444d07},_0x3ece0c['session']),console['error'](a31_0x47c070[_0x57015e(0x2a3)]('✔')+_0x57015e(0x27b)+a31_0x47c070[_0x57015e(0x2f3)](_0x57015e(0x2fe))+_0x57015e(0x2d8)+a31_0x47c070['cyan'](_0x444d07)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']='segment:parent:push';[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x141);async['execute'](_0x4c3221){const _0x1f11ce=a31_0x3334a4,{options:_0x8c9fd6,args:_0x481040,tdx:_0x28edad}=_0x4c3221,_0x5ee36e=_0x8c9fd6,_0x247e39=_0x481040[0x0]||_0x8c9fd6[_0x1f11ce(0x2aa)];if(!_0x247e39)return showParentSegmentNotSetError(_0x1f11ce(0x12e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x284636=resolveYamlFile(_0x247e39);if(!existsSync(_0x284636))return showFileNotFoundError(_0x284636,_0x247e39),0x1;_0x5ee36e['verbose']&&(console['error'](_0x1f11ce(0x226)+_0x5ee36e[_0x1f11ce(0x2a2)]),console[_0x1f11ce(0x2f7)](_0x1f11ce(0x16b)+_0x284636));let _0x2c8b67;try{_0x2c8b67=readFileSync(_0x284636,_0x1f11ce(0x166));}catch(_0x138ce2){const _0x548be3=_0x138ce2 instanceof Error?_0x138ce2['message']:String(_0x138ce2);return console['error'](_0x1f11ce(0x134)+_0x548be3),0x1;}const _0x383292=await withSpinner('Analyzing\x20changes...',()=>_0x28edad[_0x1f11ce(0x1b5)][_0x1f11ce(0x19f)](_0x2c8b67),{'verbose':_0x5ee36e[_0x1f11ce(0x1e4)]}),_0x512306=_0x383292[_0x1f11ce(0x216)],{isNew:_0xc678ef,name:_0x3300be,hasChanges:_0xe5220e,diffFormatted:_0x276d06}=_0x512306;if(!_0xe5220e)return console[_0x1f11ce(0x2f7)](_0x1f11ce(0x230)+_0x3300be+_0x1f11ce(0x2d5)),0x0;_0xc678ef?console[_0x1f11ce(0x2f7)](_0x1f11ce(0x145)+_0x3300be+'\x27:'):console['error'](_0x1f11ce(0x23e)+_0x3300be+'\x27:');console[_0x1f11ce(0x2f7)]('─'['repeat'](0x3c)),console[_0x1f11ce(0x2f7)](_0x276d06),console[_0x1f11ce(0x2f7)]('─'[_0x1f11ce(0x119)](0x3c));const _0x43925b=_0xc678ef?_0x1f11ce(0x12f)+_0x3300be+'\x27?':_0x1f11ce(0x23d)+_0x3300be+'\x27?';if(!_0x5ee36e[_0x1f11ce(0x15b)]){if(!isInteractive())return console[_0x1f11ce(0x2f7)](a31_0x47c070['red'](_0x1f11ce(0x21c)),_0x1f11ce(0x16c)),console[_0x1f11ce(0x2f7)](a31_0x47c070[_0x1f11ce(0x2f3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4f12fb=await confirmKey(_0x43925b);if(!_0x4f12fb)return console[_0x1f11ce(0x2f7)](a31_0x47c070[_0x1f11ce(0x24c)](_0x1f11ce(0x2e2))),0x1;}const _0x54056b=_0xc678ef?_0x1f11ce(0x237):_0x1f11ce(0x150),_0x57e7db=await withSpinner(_0x54056b+_0x1f11ce(0x1da)+_0x3300be+_0x1f11ce(0x25e),()=>_0x512306[_0x1f11ce(0x15c)](),{'verbose':_0x5ee36e[_0x1f11ce(0x1e4)]}),_0x4f2a97=_0x57e7db[_0x1f11ce(0x216)],_0x1e9c27=getConsoleNextUrl(_0x5ee36e['site'],_0x1f11ce(0x197)+_0x4f2a97['id']),_0x3f30ef=_0xc678ef?_0x1f11ce(0x2ce):_0x1f11ce(0x2c0);return console[_0x1f11ce(0x2f7)]('✔\x20'+_0x3f30ef+_0x1f11ce(0x1da)+_0x4f2a97[_0x1f11ce(0x133)]+'\x27'),console[_0x1f11ce(0x2f7)]('\x20\x20'+_0x1e9c27),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x251);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x23c);async[a31_0x3334a4(0x165)](_0x58f49e){const _0x101082=a31_0x3334a4,{options:_0x5e2587,args:_0x5cdbf9,tdx:_0x34d82f}=_0x58f49e,_0x52fee8=_0x5e2587,_0xbb977c=_0x5cdbf9[0x0]||_0x5e2587[_0x101082(0x2aa)];if(!_0xbb977c)return showParentSegmentNotSetError(_0x101082(0x107)+_0x101082(0x1db)+_0x101082(0x1f0)+_0x101082(0x23f)+_0x101082(0x184)+_0x101082(0x156)),0x1;const _0x426e4c=resolveYamlFile(_0xbb977c);if(!existsSync(_0x426e4c))return showFileNotFoundError(_0x426e4c,_0xbb977c),0x1;_0x52fee8[_0x101082(0x1e4)]&&(console['error'](_0x101082(0x226)+_0x52fee8[_0x101082(0x2a2)]),console[_0x101082(0x2f7)](_0x101082(0x16b)+_0x426e4c));let _0x49bec9;try{_0x49bec9=readFileSync(_0x426e4c,_0x101082(0x166));}catch(_0x14c85f){const _0x27562e=_0x14c85f instanceof Error?_0x14c85f['message']:String(_0x14c85f);return console[_0x101082(0x2f7)](_0x101082(0x134)+_0x27562e),0x1;}const _0x500815=createCommandSpinner(a31_0x47c070[_0x101082(0x2f3)](_0x101082(0x1cc)),{'verbose':_0x52fee8[_0x101082(0x1e4)]});_0x500815[_0x101082(0x2e1)]();const _0x4545cd={'onProgress':_0x1d4a07=>{const _0x664481=_0x101082;_0x500815[_0x664481(0x224)]=formatProgressMessage(_0x1d4a07);}};if(_0x52fee8[_0x101082(0x1ed)])_0x4545cd[_0x101082(0x1ed)]=!![];if(_0x52fee8['enriched'])_0x4545cd[_0x101082(0x2b4)]=!![];_0x52fee8['attribute']&&(_0x4545cd[_0x101082(0x1fd)]=_0x52fee8['attribute']);_0x52fee8[_0x101082(0x18e)]&&(_0x4545cd[_0x101082(0x18e)]=_0x52fee8['behavior']);if(_0x52fee8[_0x101082(0x162)])_0x4545cd[_0x101082(0x162)]=_0x52fee8[_0x101082(0x162)];let _0xec8414;try{_0xec8414=await _0x34d82f['segment'][_0x101082(0x11e)](_0x49bec9,_0x4545cd),_0x500815[_0x101082(0x10d)]();}catch(_0x14950b){_0x500815[_0x101082(0x10d)]();throw _0x14950b;}const _0x586ca7=_0x52fee8[_0x101082(0x162)]||'-1d';return this['displayValidateResults'](_0xec8414,_0x4545cd,_0x426e4c,_0x586ca7),_0xec8414['allValid']?0x0:0x1;}[a31_0x3334a4(0x1ea)](_0x4be97c,_0x1de6a0,_0x1b5654,_0x4ac1ec){const _0x3c91d8=a31_0x3334a4;console[_0x3c91d8(0x2f7)]('\x0a'+a31_0x47c070['bold'](_0x3c91d8(0xfd))+'\x20'+_0x4be97c[_0x3c91d8(0x133)]),console[_0x3c91d8(0x2f7)]('═'[_0x3c91d8(0x119)](0x3c)),this[_0x3c91d8(0x259)](_0x4be97c);if(typeof _0x1de6a0[_0x3c91d8(0x1fd)]==='string'){this['displayAttributesStats'](_0x4be97c),this[_0x3c91d8(0x264)](_0x4be97c),this[_0x3c91d8(0x10b)](_0x1b5654,_0x4ac1ec,_0x3c91d8(0x1fd),_0x1de6a0[_0x3c91d8(0x1fd)]);return;}if(_0x1de6a0[_0x3c91d8(0x1fd)]===!![]){this[_0x3c91d8(0x281)](_0x4be97c),this[_0x3c91d8(0x264)](_0x4be97c),this[_0x3c91d8(0x10b)](_0x1b5654,_0x4ac1ec,_0x3c91d8(0x20b));return;}if(typeof _0x1de6a0['behavior']===_0x3c91d8(0x214)){this['displayBehaviorsStats'](_0x4be97c,_0x4ac1ec),this[_0x3c91d8(0x264)](_0x4be97c),this['displayPreviewHints'](_0x1b5654,_0x4ac1ec,_0x3c91d8(0x18e),_0x1de6a0[_0x3c91d8(0x18e)]);return;}if(_0x1de6a0[_0x3c91d8(0x18e)]===!![]){this['displayBehaviorsStats'](_0x4be97c,_0x4ac1ec),this[_0x3c91d8(0x264)](_0x4be97c),this[_0x3c91d8(0x10b)](_0x1b5654,_0x4ac1ec,_0x3c91d8(0x1cd));return;}this[_0x3c91d8(0x281)](_0x4be97c),this[_0x3c91d8(0x1c8)](_0x4be97c,_0x4ac1ec),this[_0x3c91d8(0x2dd)](_0x4be97c),this[_0x3c91d8(0x264)](_0x4be97c),this[_0x3c91d8(0x10b)](_0x1b5654,_0x4ac1ec,'all');}[a31_0x3334a4(0x2dd)](_0x322a1a){displayRealtimeValidation(_0x322a1a);}[a31_0x3334a4(0x10b)](_0x270c44,_0x164c97,_0x542dc8,_0x2d4d23){const _0xb6a4d8=a31_0x3334a4;console[_0xb6a4d8(0x2f7)]('\x0a'+a31_0x47c070['dim'](_0xb6a4d8(0x298)));const _0x5b5ea1=_0x164c97!=='-1d'?_0xb6a4d8(0x295)+_0x164c97:'';if(_0x542dc8===_0xb6a4d8(0x1fd)&&_0x2d4d23)console[_0xb6a4d8(0x2f7)]('\x20\x20'+a31_0x47c070[_0xb6a4d8(0x2f3)](_0xb6a4d8(0x1a4)+_0x270c44+_0xb6a4d8(0x149)+_0x2d4d23+'\x22'+_0x5b5ea1));else{if(_0x542dc8===_0xb6a4d8(0x18e)&&_0x2d4d23)console[_0xb6a4d8(0x2f7)]('\x20\x20'+a31_0x47c070[_0xb6a4d8(0x2f3)](_0xb6a4d8(0x1a4)+_0x270c44+_0xb6a4d8(0x242)+_0x2d4d23+'\x22'+_0x5b5ea1));else(_0x542dc8===_0xb6a4d8(0x20b)||_0x542dc8===_0xb6a4d8(0x18c))&&console[_0xb6a4d8(0x2f7)]('\x20\x20'+a31_0x47c070[_0xb6a4d8(0x2f3)]('tdx\x20ps\x20preview\x20'+_0x270c44+_0xb6a4d8(0x173)+_0x5b5ea1));}(_0x542dc8===_0xb6a4d8(0x1cd)||_0x542dc8==='all')&&console[_0xb6a4d8(0x2f7)]('\x20\x20'+a31_0x47c070['dim'](_0xb6a4d8(0x1a4)+_0x270c44+_0xb6a4d8(0x185)+_0x5b5ea1)),_0x542dc8==='all'&&console[_0xb6a4d8(0x2f7)]('\x20\x20'+a31_0x47c070['dim'](_0xb6a4d8(0x1a4)+_0x270c44+_0xb6a4d8(0x28b)+_0x5b5ea1));}[a31_0x3334a4(0x259)](_0x34ff95){const _0xb2e33=a31_0x3334a4,{master:_0x132dda}=_0x34ff95,_0x14e794=_0x132dda['schemaValid']?a31_0x47c070[_0xb2e33(0x2a3)]('✔'):a31_0x47c070['red']('✘');console[_0xb2e33(0x2f7)]('\x0a'+a31_0x47c070[_0xb2e33(0x2f3)](_0xb2e33(0x17c))),console[_0xb2e33(0x2f7)](_0x14e794+'\x20'+a31_0x47c070['bold'](_0x132dda[_0xb2e33(0x20a)]+'.'+_0x132dda[_0xb2e33(0x211)])),_0x132dda[_0xb2e33(0x14b)]?_0x132dda[_0xb2e33(0x1d4)]!==undefined&&console[_0xb2e33(0x2f7)]('\x20\x20'+a31_0x47c070[_0xb2e33(0x2f3)]('Rows:')+'\x20'+a31_0x47c070[_0xb2e33(0x1de)](formatRows(_0x132dda[_0xb2e33(0x1d4)]))):console['error']('\x20\x20'+a31_0x47c070[_0xb2e33(0x293)]('Error:')+'\x20'+_0x132dda['schemaError']);}[a31_0x3334a4(0x281)](_0x2cd699){const _0x2d7829=a31_0x3334a4;if(_0x2cd699[_0x2d7829(0x20b)][_0x2d7829(0x2f9)]===0x0)return;console['error']('\x0a'+a31_0x47c070[_0x2d7829(0x2f3)](_0x2d7829(0x2c8)));for(const _0x2c2924 of _0x2cd699[_0x2d7829(0x20b)]){const _0x2ebfdd=_0x2c2924[_0x2d7829(0x14b)]?a31_0x47c070[_0x2d7829(0x2a3)]('✔'):a31_0x47c070[_0x2d7829(0x293)]('✘');let _0x573eff='';if(_0x2c2924[_0x2d7829(0x14b)]&&_0x2c2924[_0x2d7829(0x222)]!==undefined&&_0x2c2924[_0x2d7829(0x21b)]!==undefined){const _0x2b98fc=_0x2c2924[_0x2d7829(0x21b)][_0x2d7829(0x2b3)](0x1),_0x24a04a=_0x2c2924['coveragePercent']>=0x50?a31_0x47c070[_0x2d7829(0x2a3)]:_0x2c2924['coveragePercent']>=0x32?a31_0x47c070[_0x2d7829(0x24c)]:a31_0x47c070[_0x2d7829(0x293)];_0x573eff='\x20'+a31_0x47c070[_0x2d7829(0x2f3)]('Coverage:')+'\x20'+_0x24a04a(_0x2b98fc+'%')+'\x20('+formatRows(_0x2c2924[_0x2d7829(0x222)])+'\x20rows)';}console[_0x2d7829(0x2f7)](_0x2ebfdd+'\x20'+a31_0x47c070['bold'](_0x2c2924[_0x2d7829(0x133)])+_0x573eff),console[_0x2d7829(0x2f7)]('\x20\x20'+a31_0x47c070['dim'](_0x2d7829(0x131))+'\x20'+a31_0x47c070['bold'](_0x2c2924[_0x2d7829(0x20a)]+'.'+_0x2c2924['table']));const _0x1ae772=_0x2c2924[_0x2d7829(0x2ee)]===_0x2c2924[_0x2d7829(0x12b)]?a31_0x47c070[_0x2d7829(0x2f3)]('Join\x20on:')+'\x20'+_0x2c2924['joinKey']:a31_0x47c070[_0x2d7829(0x2f3)]('Join:')+'\x20'+_0x2c2924[_0x2d7829(0x2ee)]+_0x2d7829(0x2d8)+_0x2c2924[_0x2d7829(0x12b)];console[_0x2d7829(0x2f7)]('\x20\x20'+_0x1ae772),console[_0x2d7829(0x2f7)]('\x20\x20'+a31_0x47c070[_0x2d7829(0x2f3)](_0x2d7829(0x2b5))),this[_0x2d7829(0x1eb)](_0x2c2924[_0x2d7829(0x276)]),!_0x2c2924['schemaValid']&&console[_0x2d7829(0x2f7)]('\x20\x20'+a31_0x47c070[_0x2d7829(0x293)](_0x2d7829(0x2f4))+'\x20'+_0x2c2924[_0x2d7829(0x26a)]);}}['displayBehaviorsStats'](_0x12ca43,_0x5f4c81){const _0x2bb1f4=a31_0x3334a4;if(_0x12ca43[_0x2bb1f4(0x1cd)][_0x2bb1f4(0x2f9)]===0x0)return;console[_0x2bb1f4(0x2f7)]('\x0a'+a31_0x47c070[_0x2bb1f4(0x2f3)](_0x2bb1f4(0x190))+'\x20'+a31_0x47c070[_0x2bb1f4(0x2f3)]('('+_0x5f4c81+')'));for(const _0x1537ea of _0x12ca43[_0x2bb1f4(0x1cd)]){const _0x26d345=_0x1537ea[_0x2bb1f4(0x14b)]?a31_0x47c070[_0x2bb1f4(0x2a3)]('✔'):a31_0x47c070[_0x2bb1f4(0x293)]('✘');let _0xf44832='';if(_0x1537ea[_0x2bb1f4(0x14b)]&&_0x1537ea['customersWithEvents']!==undefined&&_0x1537ea['totalEvents']!==undefined){const _0x5b3994=_0x1537ea[_0x2bb1f4(0x1e0)]?.['toFixed'](0x1)||'?',_0x31be78=(_0x1537ea[_0x2bb1f4(0x1e0)]??0x0)>=0x32?a31_0x47c070[_0x2bb1f4(0x2a3)]:(_0x1537ea['customerPercent']??0x0)>=0x14?a31_0x47c070[_0x2bb1f4(0x24c)]:a31_0x47c070[_0x2bb1f4(0x293)];_0xf44832='\x20'+a31_0x47c070[_0x2bb1f4(0x2f3)](_0x2bb1f4(0x1ef))+'\x20'+_0x31be78(formatRows(_0x1537ea['customersWithEvents']))+'\x20('+_0x5b3994+_0x2bb1f4(0x152)+a31_0x47c070['dim'](_0x2bb1f4(0x27e))+'\x20'+a31_0x47c070[_0x2bb1f4(0x1de)](formatRows(_0x1537ea['totalEvents']));}console['error'](_0x26d345+'\x20'+a31_0x47c070[_0x2bb1f4(0x2d2)](_0x1537ea[_0x2bb1f4(0x133)])+_0xf44832),console['error']('\x20\x20'+a31_0x47c070[_0x2bb1f4(0x2f3)](_0x2bb1f4(0x131))+'\x20'+a31_0x47c070[_0x2bb1f4(0x2d2)](_0x1537ea['database']+'.'+_0x1537ea[_0x2bb1f4(0x211)]));const _0x5b46be=_0x1537ea['joinKey']===_0x1537ea[_0x2bb1f4(0x12b)]?a31_0x47c070[_0x2bb1f4(0x2f3)](_0x2bb1f4(0x2d9))+'\x20'+_0x1537ea['joinKey']:a31_0x47c070['dim'](_0x2bb1f4(0x1a3))+'\x20'+_0x1537ea[_0x2bb1f4(0x2ee)]+_0x2bb1f4(0x2d8)+_0x1537ea[_0x2bb1f4(0x12b)];console[_0x2bb1f4(0x2f7)]('\x20\x20'+_0x5b46be),console['error']('\x20\x20'+a31_0x47c070[_0x2bb1f4(0x2f3)](_0x2bb1f4(0x2b5))),this[_0x2bb1f4(0x1eb)](_0x1537ea[_0x2bb1f4(0x276)]),!_0x1537ea[_0x2bb1f4(0x14b)]&&console[_0x2bb1f4(0x2f7)]('\x20\x20'+a31_0x47c070[_0x2bb1f4(0x293)](_0x2bb1f4(0x2f4))+'\x20'+_0x1537ea['schemaError']);}}[a31_0x3334a4(0x1eb)](_0x18b502){const _0x5d6e52=a31_0x3334a4;for(const _0x5540f6 of _0x18b502){_0x5540f6[_0x5d6e52(0x292)]===_0x5540f6[_0x5d6e52(0x1ad)]||_0x5540f6['column']==='*'?console[_0x5d6e52(0x2f7)](_0x5d6e52(0x1ba)+_0x5540f6['label']):console[_0x5d6e52(0x2f7)](_0x5d6e52(0x1ba)+_0x5540f6[_0x5d6e52(0x292)]+'\x20'+a31_0x47c070['dim']('('+_0x5540f6['column']+')'));}}[a31_0x3334a4(0x264)](_0x2fab52){const _0x4b8ef6=a31_0x3334a4;console[_0x4b8ef6(0x2f7)]('─'[_0x4b8ef6(0x119)](0x3c));if(_0x2fab52['errors']['length']>0x0){console[_0x4b8ef6(0x2f7)]('\x0a'+a31_0x47c070[_0x4b8ef6(0x293)](_0x4b8ef6(0x270)));for(const _0x449964 of _0x2fab52[_0x4b8ef6(0x1d0)]){console[_0x4b8ef6(0x2f7)]('\x20\x20'+a31_0x47c070[_0x4b8ef6(0x293)]('•')+'\x20'+_0x449964);}}_0x2fab52[_0x4b8ef6(0x232)]&&console[_0x4b8ef6(0x2f7)]('\x0a'+a31_0x47c070[_0x4b8ef6(0x2a3)]('✔')+_0x4b8ef6(0x210));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x3334a4(0x133)]='segment:parent:preview';[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x1e9);async['execute'](_0x2092a2){const _0x50fce1=a31_0x3334a4,{options:_0x43f13b,args:_0x1532ea,tdx:_0x5b8fbc}=_0x2092a2,_0x43d9bf=_0x43f13b,_0x1354cf=_0x1532ea[0x0]||_0x43f13b['parentSegment'];if(!_0x1354cf)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x50fce1(0x275)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+_0x50fce1(0x239)+_0x50fce1(0x2d0)+_0x50fce1(0x2a0)+_0x50fce1(0x156)),0x1;if(!_0x43d9bf['master']&&!_0x43d9bf[_0x50fce1(0x1fd)]&&!_0x43d9bf['behavior']&&!_0x43d9bf[_0x50fce1(0x2b4)])return console[_0x50fce1(0x2f7)](a31_0x47c070[_0x50fce1(0x293)](_0x50fce1(0x260))),console[_0x50fce1(0x2f7)](_0x50fce1(0x2cc)),console[_0x50fce1(0x2f7)](_0x50fce1(0x2b8)),console[_0x50fce1(0x2f7)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x50fce1(0x2f7)](_0x50fce1(0x1a6)),console[_0x50fce1(0x2f7)]('\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior'),console[_0x50fce1(0x2f7)](_0x50fce1(0x24b)),0x1;const _0x3158bb=resolveYamlFile(_0x1354cf);if(!existsSync(_0x3158bb))return showFileNotFoundError(_0x3158bb,_0x1354cf),0x1;_0x43d9bf[_0x50fce1(0x1e4)]&&(console['error'](_0x50fce1(0x226)+_0x43d9bf[_0x50fce1(0x2a2)]),console[_0x50fce1(0x2f7)]('YAML\x20file:\x20'+_0x3158bb));let _0x3381bd;try{_0x3381bd=readFileSync(_0x3158bb,_0x50fce1(0x166));}catch(_0x246c11){const _0x5d4c4e=_0x246c11 instanceof Error?_0x246c11[_0x50fce1(0x1fc)]:String(_0x246c11);return console['error'](_0x50fce1(0x134)+_0x5d4c4e),0x1;}let _0x4d1f5b;try{_0x4d1f5b=parseDef(_0x3381bd);}catch(_0x5ea06d){const _0x541e4d=_0x5ea06d instanceof Error?_0x5ea06d[_0x50fce1(0x1fc)]:String(_0x5ea06d);return console[_0x50fce1(0x2f7)](a31_0x47c070[_0x50fce1(0x293)]('Error\x20parsing\x20YAML:\x20'+_0x541e4d)),0x1;}if(_0x43d9bf[_0x50fce1(0x1fd)]===!![]||_0x43d9bf[_0x50fce1(0x1fd)]===''){const _0x483139=_0x4d1f5b[_0x50fce1(0x20b)]?.[_0x50fce1(0x2bd)](_0x16cd05=>_0x16cd05[_0x50fce1(0x133)])||[];if(_0x483139[_0x50fce1(0x2f9)]===0x0)console[_0x50fce1(0x2f7)](a31_0x47c070[_0x50fce1(0x293)](_0x50fce1(0x272)));else{console[_0x50fce1(0x2f7)](a31_0x47c070[_0x50fce1(0x293)](_0x50fce1(0x2e6))),console['error']('Available\x20attributes:');for(const _0x374b8c of _0x483139){console[_0x50fce1(0x2f7)]('\x20\x20'+a31_0x47c070[_0x50fce1(0x1de)](_0x374b8c));}console[_0x50fce1(0x2f7)](_0x50fce1(0x1ec)+_0x1354cf+_0x50fce1(0x149)+_0x483139[0x0]+'\x22');}return 0x1;}if(_0x43d9bf[_0x50fce1(0x18e)]===!![]||_0x43d9bf[_0x50fce1(0x18e)]===''){const _0xbf6d9=_0x4d1f5b[_0x50fce1(0x1cd)]?.[_0x50fce1(0x2bd)](_0x493dc7=>_0x493dc7[_0x50fce1(0x133)])||[];if(_0xbf6d9[_0x50fce1(0x2f9)]===0x0)console[_0x50fce1(0x2f7)](a31_0x47c070[_0x50fce1(0x293)](_0x50fce1(0x25a)));else{console[_0x50fce1(0x2f7)](a31_0x47c070['red'](_0x50fce1(0x2fa))),console[_0x50fce1(0x2f7)](_0x50fce1(0x1b2));for(const _0x4166b9 of _0xbf6d9){console['error']('\x20\x20'+a31_0x47c070['cyan'](_0x4166b9));}console[_0x50fce1(0x2f7)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x1354cf+_0x50fce1(0x242)+_0xbf6d9[0x0]+'\x22');}return 0x1;}const _0x62f1f6=createCommandSpinner(a31_0x47c070[_0x50fce1(0x2f3)](_0x50fce1(0x10e)),{'verbose':_0x43d9bf[_0x50fce1(0x1e4)]});_0x62f1f6[_0x50fce1(0x2e1)]();const _0x263121={'onProgress':_0x2be498=>{const _0x102164=_0x50fce1;_0x62f1f6[_0x102164(0x224)]=formatProgressMessage(_0x2be498);}};if(_0x43d9bf[_0x50fce1(0x1ed)])_0x263121['master']=!![];if(_0x43d9bf['attribute']&&typeof _0x43d9bf['attribute']==='string')_0x263121[_0x50fce1(0x1fd)]=_0x43d9bf[_0x50fce1(0x1fd)];if(_0x43d9bf[_0x50fce1(0x18e)]&&typeof _0x43d9bf[_0x50fce1(0x18e)]===_0x50fce1(0x214))_0x263121['behavior']=_0x43d9bf['behavior'];if(_0x43d9bf['enriched'])_0x263121['enriched']=!![];if(_0x43d9bf[_0x50fce1(0x162)])_0x263121['interval']=_0x43d9bf[_0x50fce1(0x162)];let _0x2df122;try{_0x2df122=await _0x5b8fbc[_0x50fce1(0x1b5)]['previewParentYaml'](_0x3381bd,_0x263121),_0x62f1f6[_0x50fce1(0x10d)]();}catch(_0x5325d5){_0x62f1f6['stop']();throw _0x5325d5;}return await this['displayPreviewResults'](_0x2df122,{'master':_0x43d9bf[_0x50fce1(0x1ed)],'attribute':typeof _0x43d9bf[_0x50fce1(0x1fd)]===_0x50fce1(0x214)?_0x43d9bf[_0x50fce1(0x1fd)]:undefined,'behavior':typeof _0x43d9bf[_0x50fce1(0x18e)]===_0x50fce1(0x214)?_0x43d9bf[_0x50fce1(0x18e)]:undefined,'enriched':_0x43d9bf[_0x50fce1(0x2b4)]}),_0x2df122['allValid']?0x0:0x1;}async['displayPreviewResults'](_0x975e2e,_0x283c50){const _0x11ab41=a31_0x3334a4;console[_0x11ab41(0x2f7)]('\x0a'+a31_0x47c070[_0x11ab41(0x2d2)](_0x11ab41(0x286))+'\x20'+_0x975e2e[_0x11ab41(0x133)]),console['error']('═'[_0x11ab41(0x119)](0x3c));if(_0x283c50[_0x11ab41(0x1ed)]&&_0x975e2e[_0x11ab41(0x108)]){const _0xbdfbf3=a31_0x47c070[_0x11ab41(0x2f3)](_0x11ab41(0x187))+'\x20'+a31_0x47c070[_0x11ab41(0x2d2)](_0x975e2e[_0x11ab41(0x1ed)][_0x11ab41(0x20a)]+'.'+_0x975e2e[_0x11ab41(0x1ed)][_0x11ab41(0x211)]);await this[_0x11ab41(0x277)](_0xbdfbf3,_0x975e2e[_0x11ab41(0x108)]);}else{if(_0x283c50[_0x11ab41(0x1fd)]&&_0x975e2e['sampleData']){const _0x5eb69a=a31_0x47c070['dim'](_0x11ab41(0x13b))+'\x20'+a31_0x47c070[_0x11ab41(0x2d2)](_0x283c50['attribute']);await this['displaySampleData'](_0x5eb69a,_0x975e2e['sampleData']);}else{if(_0x283c50['behavior']&&_0x975e2e[_0x11ab41(0x108)]){const _0x341e22=a31_0x47c070['dim'](_0x11ab41(0x11c))+'\x20'+a31_0x47c070['bold'](_0x283c50[_0x11ab41(0x18e)]);await this[_0x11ab41(0x277)](_0x341e22,_0x975e2e[_0x11ab41(0x108)]);}else{if(_0x283c50[_0x11ab41(0x2b4)]&&_0x975e2e[_0x11ab41(0x108)]){const _0x31fa7d=a31_0x47c070['dim'](_0x11ab41(0x305))+'\x20'+a31_0x47c070[_0x11ab41(0x2d2)](_0x11ab41(0x2e9));await this[_0x11ab41(0x277)](_0x31fa7d,_0x975e2e[_0x11ab41(0x108)]);}else!_0x975e2e[_0x11ab41(0x108)]&&console[_0x11ab41(0x2f7)](_0x11ab41(0x176));}}}if(_0x975e2e[_0x11ab41(0x1d0)][_0x11ab41(0x2f9)]>0x0){console[_0x11ab41(0x2f7)]('─'[_0x11ab41(0x119)](0x3c)),console[_0x11ab41(0x2f7)]('\x0a'+a31_0x47c070['red'](_0x11ab41(0x270)));for(const _0x211703 of _0x975e2e[_0x11ab41(0x1d0)]){console['error']('\x20\x20'+a31_0x47c070[_0x11ab41(0x293)]('•')+'\x20'+_0x211703);}}}async[a31_0x3334a4(0x277)](_0x1c1865,_0x40af3b){const _0x33312d=a31_0x3334a4;if(_0x40af3b[_0x33312d(0x2f9)]===0x0){console[_0x33312d(0x2f7)]('\x0a'+_0x1c1865),console[_0x33312d(0x2f7)](_0x33312d(0x267));return;}console[_0x33312d(0x2f7)]('\x0a'+_0x1c1865);const _0x1f28ee=Object['keys'](_0x40af3b[0x0])[_0x33312d(0x2bd)](_0x127b53=>({'name':_0x127b53,'type':typeof _0x40af3b[0x0][_0x127b53]===_0x33312d(0x160)?_0x33312d(0x1d8):_0x33312d(0x1e3)})),_0x3a2939={'queryId':'preview','columns':_0x1f28ee,'data':_0x40af3b,'stats':{'state':_0x33312d(0x261),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x40af3b[_0x33312d(0x2f9)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x783bba=formatAsTable(_0x3a2939,_0x40af3b[_0x33312d(0x2f9)],!![]);await writeOutput(_0x783bba,undefined,_0x33312d(0x211));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']=a31_0x3334a4(0x297);[a31_0x3334a4(0x1c6)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async['execute'](_0x525845){const _0x825208=a31_0x3334a4,{options:_0x7f2bc1,args:_0x5846a0,tdx:_0x8a22da}=_0x525845,_0x559212=_0x7f2bc1,_0x4faee6=_0x5846a0[0x0]||_0x7f2bc1[_0x825208(0x2aa)];if(!_0x4faee6)return showParentSegmentNotSetError(_0x825208(0x29d)+_0x825208(0x22a)),0x1;const _0x486d76=resolveYamlFile(_0x4faee6);if(existsSync(_0x486d76)){_0x559212['verbose']&&console['error']('Found\x20YAML\x20file:\x20'+_0x486d76);let _0x1e56de;try{_0x1e56de=readFileSync(_0x486d76,'utf-8');}catch(_0x3f5709){const _0x164136=_0x3f5709 instanceof Error?_0x3f5709[_0x825208(0x1fc)]:String(_0x3f5709);return console[_0x825208(0x2f7)]('Error\x20reading\x20file:\x20'+_0x164136),0x1;}const _0x280f45=await withSpinner(_0x825208(0x1c1),()=>_0x8a22da['segment']['pushParentYaml'](_0x1e56de),{'verbose':_0x559212[_0x825208(0x1e4)]}),_0x2e34d9=_0x280f45[_0x825208(0x216)],{isNew:_0x30a18a,name:_0x4f5ac0,hasChanges:_0x45c9de,diffFormatted:_0x3c9b32}=_0x2e34d9;if(_0x45c9de){_0x30a18a?console[_0x825208(0x2f7)](_0x825208(0x145)+_0x4f5ac0+'\x27:'):console[_0x825208(0x2f7)](_0x825208(0x23e)+_0x4f5ac0+'\x27:');console[_0x825208(0x2f7)]('─'[_0x825208(0x119)](0x3c)),console[_0x825208(0x2f7)](_0x3c9b32),console[_0x825208(0x2f7)]('─'[_0x825208(0x119)](0x3c));const _0x4d0c1e=_0x30a18a?_0x825208(0x12f)+_0x4f5ac0+_0x825208(0x2f2):'Apply\x20changes\x20to\x20\x27'+_0x4f5ac0+_0x825208(0x2f2);if(!_0x559212[_0x825208(0x15b)]){if(!isInteractive())return console[_0x825208(0x2f7)](a31_0x47c070['red'](_0x825208(0x21c)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x825208(0x2f7)](a31_0x47c070[_0x825208(0x2f3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5c06a7=await confirmKey(_0x4d0c1e);if(!_0x5c06a7)return console[_0x825208(0x2f7)](a31_0x47c070[_0x825208(0x24c)](_0x825208(0x2e2))),0x1;}const _0x3503cc=_0x30a18a?_0x825208(0x237):'Updating';await withSpinner(_0x3503cc+_0x825208(0x1da)+_0x4f5ac0+_0x825208(0x25e),()=>_0x2e34d9[_0x825208(0x15c)](),{'verbose':_0x559212['verbose']});const _0x5161be=_0x30a18a?_0x825208(0x2ce):_0x825208(0x2c0);console[_0x825208(0x2f7)]('✔\x20'+_0x5161be+_0x825208(0x1da)+_0x4f5ac0+'\x27');}else console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x4f5ac0+_0x825208(0x1b7));}const _0xb76ce7=await withSpinner(_0x825208(0x1af)+_0x4faee6+_0x825208(0x25e),()=>_0x8a22da[_0x825208(0x1b5)]['runParent'](_0x4faee6),{'verbose':_0x559212['verbose']}),_0x2313e4=_0xb76ce7[_0x825208(0x216)],_0x5df240=getConsoleUrl(_0x559212[_0x825208(0x2a2)],'/app/workflows/'+_0x2313e4[_0x825208(0x2c2)]+_0x825208(0x28c)+_0x2313e4[_0x825208(0x2fb)]+_0x825208(0x262)+_0x2313e4[_0x825208(0x16a)]);return console['error']('\x0a✔\x20Workflow\x20started'),console[_0x825208(0x2f7)]('\x20\x20'+a31_0x47c070[_0x825208(0x2f3)]('Audience\x20ID:')+'\x20'+_0x2313e4[_0x825208(0x15f)]),console[_0x825208(0x2f7)]('\x20\x20'+a31_0x47c070[_0x825208(0x2f3)](_0x825208(0x161))+'\x20'+_0x2313e4[_0x825208(0x24d)]),console[_0x825208(0x2f7)]('\x20\x20'+a31_0x47c070['dim']('Session:')+'\x20'+_0x2313e4['workflowSessionId']),console[_0x825208(0x2f7)]('\x20\x20'+a31_0x47c070[_0x825208(0x2f3)](_0x825208(0x1d1))+'\x20'+_0x2313e4[_0x825208(0x16a)]),console[_0x825208(0x2f7)]('\x20\x20'+_0x5df240),console['error']('\x0a'+a31_0x47c070[_0x825208(0x2f3)](_0x825208(0x171))+_0x825208(0x252)+_0x2313e4[_0x825208(0x16a)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']='segment:parent:fields';[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x1e7);async[a31_0x3334a4(0x165)](_0x67505d){const _0x32a0fb=a31_0x3334a4,{options:_0x41ca19,args:_0x5688bb,tdx:_0x4962c9}=_0x67505d,_0x3fe4b4=_0x5688bb[0x0]||_0x41ca19[_0x32a0fb(0x2aa)];if(!_0x3fe4b4)return showParentSegmentNotSetError(_0x32a0fb(0x29a)+_0x32a0fb(0x21f)),0x1;_0x41ca19[_0x32a0fb(0x1e4)]&&(console[_0x32a0fb(0x2f7)](_0x32a0fb(0x226)+_0x41ca19[_0x32a0fb(0x2a2)]),console['error'](_0x32a0fb(0x1f1)+_0x3fe4b4));const _0x504943=await withSpinner(_0x32a0fb(0x287)+_0x3fe4b4+_0x32a0fb(0x25e),()=>_0x4962c9[_0x32a0fb(0x1b5)][_0x32a0fb(0x191)](_0x3fe4b4),{'verbose':_0x41ca19[_0x32a0fb(0x1e4)]}),_0x2fb776=_0x504943['data'];console[_0x32a0fb(0x2f7)](_0x32a0fb(0xf6)+_0x2fb776[_0x32a0fb(0x2f9)]+_0x32a0fb(0x205)+(_0x2fb776[_0x32a0fb(0x2f9)]!==0x1?'s':''));if(_0x41ca19[_0x32a0fb(0x296)]||_0x41ca19[_0x32a0fb(0x27c)])return await handleSDKOutput(_0x2fb776,_0x41ca19),0x0;return displayFieldsHumanReadable(_0x2fb776,_0x3fe4b4),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x1f2);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x2c7);async[a31_0x3334a4(0x165)](_0x3dae44){const _0x1a67b6=a31_0x3334a4,{options:_0x10d2e9,args:_0x486ac6,tdx:_0x2548a8}=_0x3dae44,_0x5f1342=_0x10d2e9,_0x2a8673=_0x486ac6[0x0]||_0x10d2e9['parentSegment'];if(!_0x2a8673)return showParentSegmentNotSetError(_0x1a67b6(0x1bb)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a'+_0x1a67b6(0x1f0)+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x10d2e9[_0x1a67b6(0x1e4)]&&(console[_0x1a67b6(0x2f7)](_0x1a67b6(0x226)+_0x10d2e9[_0x1a67b6(0x2a2)]),console[_0x1a67b6(0x2f7)](_0x1a67b6(0x1f1)+_0x2a8673));const _0x574970=await withSpinner(_0x1a67b6(0x1b0)+_0x2a8673+_0x1a67b6(0x25e),()=>_0x2548a8['segment'][_0x1a67b6(0x2ea)](_0x2a8673),{'verbose':_0x10d2e9[_0x1a67b6(0x1e4)]}),_0x7201a2=_0x574970['data'];if(_0x5f1342[_0x1a67b6(0x163)]){const _0x329b56=getConsoleNextUrl(_0x5f1342[_0x1a67b6(0x2a2)],_0x1a67b6(0x197)+_0x7201a2['id']);return console['error'](a31_0x47c070[_0x1a67b6(0x2a3)]('✔')+_0x1a67b6(0x112)+a31_0x47c070[_0x1a67b6(0x1de)](_0x329b56)),openBrowser(_0x329b56),0x0;}return await handleSingleObjectOutput(_0x7201a2,_0x10d2e9),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x3334a4(0x133)]='segment:parent:desc';['description']=a31_0x3334a4(0x1c7);async[a31_0x3334a4(0x165)](_0x101028){const _0x35e711=a31_0x3334a4,{options:_0x1aae4f,args:_0x7d1921,tdx:_0x5b5229}=_0x101028,_0x447010=_0x1aae4f,_0x544282=_0x7d1921[0x0]||_0x1aae4f[_0x35e711(0x2aa)];if(!_0x544282)return showParentSegmentNotSetError(_0x35e711(0xf7)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a'+_0x35e711(0x1f0)+_0x35e711(0x301)),0x1;_0x1aae4f['verbose']&&(console['error']('Site:\x20'+_0x1aae4f['site']),console[_0x35e711(0x2f7)](_0x35e711(0x1f1)+_0x544282));const _0x556279=await withSpinner(_0x35e711(0x22e)+_0x544282+_0x35e711(0x25e),()=>_0x5b5229['segment'][_0x35e711(0x2cb)](_0x544282),{'verbose':_0x1aae4f[_0x35e711(0x1e4)]}),_0x59b505=_0x556279[_0x35e711(0x216)],_0xc9574=_0x5b5229[_0x35e711(0x1b5)][_0x35e711(0x2bf)](_0x59b505);if(_0x447010[_0x35e711(0x228)]){const _0x3d2126=await this['collectSchema'](_0x101028,_0x544282,_0x59b505,_0xc9574),_0x2f5bc4=this[_0x35e711(0x2b0)](_0x3d2126);writeFileSync(_0x447010[_0x35e711(0x228)],_0x2f5bc4);const _0x77a072=_0x3d2126[_0x35e711(0xf2)][_0x35e711(0x276)][_0x35e711(0x2f9)]+_0x3d2126[_0x35e711(0x1cd)]['reduce']((_0x374dfe,_0x422339)=>_0x374dfe+_0x422339[_0x35e711(0x276)][_0x35e711(0x2f9)],0x0),_0xd83e95=_0x3d2126[_0x35e711(0x1cd)][_0x35e711(0x2fd)](_0x3bf4c2=>_0x3bf4c2[_0x35e711(0x276)][_0x35e711(0x2f9)]===0x0)['length'];return console[_0x35e711(0x1d7)](_0x35e711(0x26b)+_0x447010[_0x35e711(0x228)]),console['log']('\x20\x20Database:\x20'+_0xc9574),console[_0x35e711(0x1d7)](_0x35e711(0x172)+_0x3d2126['behaviors'][_0x35e711(0x2f9)]+'\x20behaviors'),console['log'](_0x35e711(0xf4)+_0x77a072+_0x35e711(0x255)),_0xd83e95>0x0&&console[_0x35e711(0x1d7)](_0x35e711(0x180)+_0xd83e95+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x35e711(0x2f7)]('\x0a'+a31_0x47c070['bold']('Output\x20Database:')+'\x20'+a31_0x47c070[_0x35e711(0x1de)](_0xc9574));const _0x35ea54=await withSpinner(_0x35e711(0x1ab),()=>_0x5b5229[_0x35e711(0x1b5)][_0x35e711(0x24f)](_0x59b505),{'verbose':_0x1aae4f[_0x35e711(0x1e4)]});console['error']('\x0a'+a31_0x47c070[_0x35e711(0x2d2)](_0x35e711(0xf2))+'\x20'+a31_0x47c070[_0x35e711(0x2f3)]('('+_0xc9574+_0x35e711(0x194)));const _0x1f7a55=await executeSchemaQuery(_0x35ea54[_0x35e711(0x216)],_0x5b5229,_0x1aae4f);await handleQueryOutput(_0x1f7a55,_0x1aae4f);const _0x276aa1=await withSpinner(_0x35e711(0x169),()=>_0x5b5229[_0x35e711(0x1b5)][_0x35e711(0x10f)](_0x59b505),{'verbose':_0x1aae4f[_0x35e711(0x1e4)]});for(const _0x58bc8a of _0x276aa1[_0x35e711(0x216)]){const _0x5cf32a='behavior_'+_0x58bc8a[_0x35e711(0x229)]()[_0x35e711(0x27a)](/\s+/g,'_'),_0xad37cb=_0x35e711(0x168)+_0xc9574+'.'+_0x5cf32a;console['error']('\x0a'+a31_0x47c070[_0x35e711(0x2d2)](_0x58bc8a)+'\x20'+a31_0x47c070['dim']('('+_0xc9574+'.'+_0x5cf32a+')'));try{const _0x37c481=await executeSchemaQuery(_0xad37cb,_0x5b5229,_0x1aae4f);await handleQueryOutput(_0x37c481,_0x1aae4f);}catch{console['error'](a31_0x47c070[_0x35e711(0x24c)](_0x35e711(0x279)));}}return 0x0;}async['collectSchema'](_0x27b38c,_0x1a2c80,_0x1bd2f5,_0x5964d9){const _0x357bdd=a31_0x3334a4,{options:_0x5c3f72,tdx:_0xa13b9e}=_0x27b38c,_0x4be783=await withSpinner(_0x357bdd(0x1ab),()=>_0xa13b9e[_0x357bdd(0x1b5)][_0x357bdd(0x24f)](_0x1bd2f5),{'verbose':_0x5c3f72[_0x357bdd(0x1e4)]}),_0xebdd2f=await executeSchemaQuery(_0x4be783[_0x357bdd(0x216)],_0xa13b9e,_0x5c3f72),_0x510c03=_0xebdd2f[_0x357bdd(0x216)][_0x357bdd(0x2bd)](_0x33f403=>({'name':_0x33f403[_0x357bdd(0x135)],'type':_0x33f403[_0x357bdd(0x193)]})),_0x410281=await withSpinner(_0x357bdd(0x169),()=>_0xa13b9e[_0x357bdd(0x1b5)]['getBehaviorNames'](_0x1bd2f5),{'verbose':_0x5c3f72[_0x357bdd(0x1e4)]}),_0x29c4e3=[];for(const _0xbd7c96 of _0x410281[_0x357bdd(0x216)]){const _0x24dffb=_0x357bdd(0x125)+_0xbd7c96[_0x357bdd(0x229)]()['replace'](/\s+/g,'_'),_0x5e2131='SELECT\x20*\x20FROM\x20'+_0x5964d9+'.'+_0x24dffb;let _0x4998f4=[];try{const _0x9d6f34=await executeSchemaQuery(_0x5e2131,_0xa13b9e,_0x5c3f72);_0x4998f4=_0x9d6f34[_0x357bdd(0x216)][_0x357bdd(0x2bd)](_0x2a66f9=>({'name':_0x2a66f9[_0x357bdd(0x135)],'type':_0x2a66f9[_0x357bdd(0x193)]}));}catch{}_0x29c4e3[_0x357bdd(0x2ab)]({'table':_0x24dffb,'columns':_0x4998f4});}return{'database':_0x5964d9,'parent_segment':_0x1a2c80,'parent_id':_0x1bd2f5,'customers':{'table':_0x357bdd(0xf2),'columns':_0x510c03},'behaviors':_0x29c4e3};}['formatSchemaJson'](_0x51fc40){const _0x1f3a10=a31_0x3334a4,_0x251651=_0x5b2966=>{const _0x3a3f2a=a31_0x2bf9;if(_0x5b2966['length']===0x0)return'[]';const _0x2454e2=_0x5b2966[_0x3a3f2a(0x2bd)](_0x41ffdb=>_0x3a3f2a(0x18b)+_0x41ffdb[_0x3a3f2a(0x133)]+_0x3a3f2a(0x236)+_0x41ffdb[_0x3a3f2a(0x257)]+_0x3a3f2a(0x151));return'[\x0a'+_0x2454e2[_0x3a3f2a(0x114)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x4f503c=_0x51fc40[_0x1f3a10(0x1cd)][_0x1f3a10(0x2bd)](_0x268160=>{const _0x9a6f49=_0x1f3a10;return _0x9a6f49(0x13d)+_0x268160[_0x9a6f49(0x211)]+_0x9a6f49(0x167)+_0x251651(_0x268160[_0x9a6f49(0x276)])[_0x9a6f49(0x27a)](/^/gm,'\x20\x20')[_0x9a6f49(0x19c)]()+_0x9a6f49(0x2c4);})[_0x1f3a10(0x114)](',\x0a');return _0x1f3a10(0x29c)+_0x51fc40[_0x1f3a10(0x20a)]+_0x1f3a10(0x1fa)+_0x51fc40[_0x1f3a10(0x2fe)]+_0x1f3a10(0x1c2)+_0x51fc40[_0x1f3a10(0x1fe)]+_0x1f3a10(0x1f6)+_0x51fc40['customers'][_0x1f3a10(0x211)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x251651(_0x51fc40['customers']['columns'])[_0x1f3a10(0x27a)](/^/gm,'\x20\x20')[_0x1f3a10(0x19c)]()+_0x1f3a10(0x12d)+_0x4f503c+_0x1f3a10(0x186);}}export class ParentSegmentSQLCommand extends BaseCommand{['name']=a31_0x3334a4(0x101);[a31_0x3334a4(0x1c6)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a31_0x3334a4(0x165)](_0x437081){const _0x526297=a31_0x3334a4,{options:_0x2463b5,args:_0x4f3dff,tdx:_0x1ce8a8}=_0x437081,_0x42f449=_0x4f3dff[0x0]||_0x2463b5[_0x526297(0x2aa)];if(!_0x42f449)return showParentSegmentNotSetError(_0x526297(0x1d2)+_0x526297(0x2c5)),0x1;_0x2463b5[_0x526297(0x1e4)]&&(console[_0x526297(0x2f7)]('Site:\x20'+_0x2463b5[_0x526297(0x2a2)]),console[_0x526297(0x2f7)](_0x526297(0x1f1)+_0x42f449));const _0xfc269=await withSpinner(_0x526297(0x22e)+_0x42f449+_0x526297(0x25e),()=>_0x1ce8a8[_0x526297(0x1b5)][_0x526297(0x2cb)](_0x42f449),{'verbose':_0x2463b5[_0x526297(0x1e4)]}),_0x306815=_0xfc269[_0x526297(0x216)],_0xc8752a=await withSpinner(_0x526297(0x195)+_0x42f449+_0x526297(0x25e),()=>_0x1ce8a8[_0x526297(0x1b5)][_0x526297(0x24f)](_0x306815),{'verbose':_0x2463b5['verbose']}),_0x57a5db=_0xc8752a['data'];return _0x2463b5[_0x526297(0x1a0)]===_0x526297(0x296)||_0x2463b5[_0x526297(0x1a0)]===_0x526297(0x27c)?await handleSDKOutput([{'sql':_0x57a5db}],_0x2463b5):console['log'](_0x57a5db),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x263);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x2ad);async[a31_0x3334a4(0x165)](_0x40d660){const _0x31748f=a31_0x3334a4,{options:_0x51b148,args:_0x1a9fec,tdx:_0x4b6145}=_0x40d660,_0x498bc9=_0x1a9fec[0x0]||_0x51b148['parentSegment'];if(!_0x498bc9)return showParentSegmentNotSetError(_0x31748f(0x20e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment'),0x1;_0x51b148[_0x31748f(0x1e4)]&&(console[_0x31748f(0x2f7)](_0x31748f(0x226)+_0x51b148[_0x31748f(0x2a2)]),console[_0x31748f(0x2f7)]('Parent\x20segment:\x20'+_0x498bc9));const _0x39338b=await withSpinner(_0x31748f(0x22e)+_0x498bc9+_0x31748f(0x25e),()=>_0x4b6145[_0x31748f(0x1b5)]['resolveParentId'](_0x498bc9),{'verbose':_0x51b148['verbose']}),_0x3abafd=_0x39338b['data'],_0x1d5830=await withSpinner(_0x31748f(0x195)+_0x498bc9+_0x31748f(0x25e),()=>_0x4b6145[_0x31748f(0x1b5)]['getParentSQL'](_0x3abafd),{'verbose':_0x51b148[_0x31748f(0x1e4)]});let _0x16f79d=_0x1d5830[_0x31748f(0x216)];const _0x43861e=resolveLimit(_0x51b148[_0x31748f(0x2bc)],DEFAULT_DISPLAY_LIMIT),_0x57047c=/\bLIMIT\s+\d+/i[_0x31748f(0x20c)](_0x16f79d);!_0x57047c&&(_0x16f79d=_0x16f79d[_0x31748f(0x19c)]()[_0x31748f(0x27a)](/;+$/,''),_0x16f79d='SELECT\x20*\x20FROM\x20(\x0a'+_0x16f79d+_0x31748f(0x2bb)+_0x43861e);_0x51b148['verbose']&&console['error']('SQL\x20query:\x0a'+_0x16f79d);const _0x2483b5=await withProgressSpinner(_0x31748f(0x213),async _0x2a66ea=>{const _0x19e245=_0x31748f,_0x375ea0=await _0x4b6145['query'][_0x19e245(0x165)](_0x16f79d,{'catalog':'td','schema':_0x19e245(0x273),'onJobId':_0x455372=>{const _0x22b372=_0x19e245;_0x2a66ea[_0x22b372(0x19d)](_0x455372);}});return _0x375ea0;},{'verbose':_0x51b148[_0x31748f(0x1e4)]}),_0x43609a=_0x2483b5[_0x31748f(0x216)],_0x17be29=_0x43609a[_0x31748f(0x2e5)]?_0x31748f(0x2f6)+_0x43609a['jobId']+']':'';return console[_0x31748f(0x2f7)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x43609a['stats'][_0x31748f(0x223)][_0x31748f(0x206)]()+'\x20rows\x20'+(_0x31748f(0x26d)+formatElapsed(_0x43609a[_0x31748f(0x22b)][_0x31748f(0x227)])+_0x17be29)),await handleQueryOutput(_0x43609a,_0x51b148),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x245);['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a31_0x3334a4(0x165)](_0x149d95){const _0x4788c0=a31_0x3334a4,{options:_0x1ed3a5,args:_0x2248dd,tdx:_0x11bb32}=_0x149d95,_0x16b604=_0x2248dd[0x0],_0x2e15c8=await withSpinner(_0x16b604?_0x4788c0(0x283)+_0x16b604+_0x4788c0(0x25e):_0x4788c0(0x1d9),()=>_0x11bb32[_0x4788c0(0x17b)][_0x4788c0(0x24e)](),{'verbose':_0x1ed3a5[_0x4788c0(0x1e4)]});let _0x442d50=_0x2e15c8[_0x4788c0(0x216)][_0x4788c0(0x2fd)](_0x26933a=>_0x26933a[_0x4788c0(0x21a)]);if(_0x16b604){const _0x2308f4=_0x16b604[_0x4788c0(0x27a)](/[.+^${}()|[\]\\]/g,_0x4788c0(0x179))[_0x4788c0(0x27a)](/\*/g,'.*')[_0x4788c0(0x27a)](/\?/g,'.'),_0x2ee49a=new RegExp('^'+_0x2308f4+'$','i');_0x442d50=_0x442d50[_0x4788c0(0x2fd)](_0x420a9d=>_0x2ee49a[_0x4788c0(0x20c)](_0x420a9d['name']));}_0x442d50['sort']((_0xb5d176,_0x4253c4)=>_0xb5d176[_0x4788c0(0x133)][_0x4788c0(0x118)](_0x4253c4['name'])),console[_0x4788c0(0x2f7)](_0x4788c0(0xf6)+_0x442d50[_0x4788c0(0x2f9)]+_0x4788c0(0x17e)+(_0x442d50[_0x4788c0(0x2f9)]!==0x1?'s':''));const _0x870f08=_0x1f7c49=>{return getConsoleNextUrl(_0x1ed3a5['site'],'/app/dw/parentSegments/'+_0x1f7c49);};if(_0x1ed3a5[_0x4788c0(0x1a0)]===_0x4788c0(0x296)||_0x1ed3a5[_0x4788c0(0x1a0)]===_0x4788c0(0x27c)){const _0x41a8f3=_0x442d50['map'](_0x38230d=>({..._0x38230d,'url':_0x870f08(_0x38230d['id'])}));await handleSDKOutput(_0x41a8f3,_0x1ed3a5);}else{if(_0x442d50[_0x4788c0(0x2f9)]===0x0)console[_0x4788c0(0x1d7)](_0x4788c0(0xfa));else for(const _0x3b5314 of _0x442d50){const _0x4b985c=_0x3b5314[_0x4788c0(0x14d)]?a31_0x47c070[_0x4788c0(0x2f3)]('\x20('+formatRows(_0x3b5314[_0x4788c0(0x14d)])+')'):'',_0xdb65b1=hyperlink(_0x3b5314[_0x4788c0(0x133)],_0x870f08(_0x3b5314['id']));console['log']('⚡\x20'+_0xdb65b1+_0x4b985c);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x1be);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x288);async['execute'](_0x1087de){const _0x426b60=a31_0x3334a4,{options:_0x49df23,args:_0x294914,tdx:_0x1381e4}=_0x1087de,_0x29e70b=_0x294914[0x0]||_0x49df23['parentSegment'];if(!_0x29e70b)return showParentSegmentNotSetError(_0x426b60(0x2cf)+_0x426b60(0x25c)),0x1;const _0x51a0f7=resolveYamlFile(_0x29e70b);if(!existsSync(_0x51a0f7))return showFileNotFoundError(_0x51a0f7,_0x29e70b),0x1;let _0xaf5342;try{_0xaf5342=readFileSync(_0x51a0f7,_0x426b60(0x166));}catch(_0x55b2c0){const _0x43f448=_0x55b2c0 instanceof Error?_0x55b2c0[_0x426b60(0x1fc)]:String(_0x55b2c0);return console[_0x426b60(0x2f7)](_0x426b60(0x134)+_0x43f448),0x1;}const _0x34d444=createCommandSpinner(a31_0x47c070[_0x426b60(0x2f3)](_0x426b60(0x1f8)),{'verbose':_0x49df23['verbose']});_0x34d444[_0x426b60(0x2e1)]();const _0x3d4378={'realtime':!![],'onProgress':_0x1ce72f=>{const _0x404ed8=_0x426b60;_0x34d444[_0x404ed8(0x224)]=formatProgressMessage(_0x1ce72f);}};let _0x151632;try{_0x151632=await _0x1381e4[_0x426b60(0x1b5)]['validateParentYaml'](_0xaf5342,_0x3d4378),_0x34d444[_0x426b60(0x10d)]();}catch(_0x578b1b){_0x34d444[_0x426b60(0x10d)]();throw _0x578b1b;}console[_0x426b60(0x2f7)]('\x0a'+a31_0x47c070[_0x426b60(0x2d2)](_0x426b60(0x113))+'\x20'+_0x151632['name']),console[_0x426b60(0x2f7)]('═'[_0x426b60(0x119)](0x3c)),displayRealtimeValidation(_0x151632),console[_0x426b60(0x2f7)]('─'[_0x426b60(0x119)](0x3c));if(_0x151632[_0x426b60(0x1d0)][_0x426b60(0x2f9)]>0x0){console[_0x426b60(0x2f7)]('\x0a'+a31_0x47c070[_0x426b60(0x293)](_0x426b60(0x270)));for(const _0x42323f of _0x151632[_0x426b60(0x1d0)]){console[_0x426b60(0x2f7)]('\x20\x20'+a31_0x47c070['red']('•')+'\x20'+_0x42323f);}}return _0x151632[_0x426b60(0x232)]&&console[_0x426b60(0x2f7)]('\x0a'+a31_0x47c070[_0x426b60(0x2a3)]('✔')+_0x426b60(0x2dc)),_0x151632[_0x426b60(0x232)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x3334a4(0x121);[a31_0x3334a4(0x1c6)]='List\x20RT\x20journeys';async['execute'](_0x245d72){const _0x5b1ed9=a31_0x3334a4,{options:_0x437e0c,args:_0x511863,tdx:_0x1119ce}=_0x245d72,_0x5788ff=_0x511863[0x0]||_0x437e0c[_0x5b1ed9(0x2aa)];if(!_0x5788ff)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a'+_0x5b1ed9(0x136)),0x1;_0x437e0c[_0x5b1ed9(0x1e4)]&&(console[_0x5b1ed9(0x2f7)](_0x5b1ed9(0x226)+_0x437e0c[_0x5b1ed9(0x2a2)]),console[_0x5b1ed9(0x2f7)](_0x5b1ed9(0x1f1)+_0x5788ff));const _0x46cb4d=await withSpinner(_0x5b1ed9(0x22e)+_0x5788ff+_0x5b1ed9(0x25e),()=>_0x1119ce[_0x5b1ed9(0x1b5)][_0x5b1ed9(0x2cb)](_0x5788ff),{'verbose':_0x437e0c['verbose']}),_0x4735f6=_0x46cb4d[_0x5b1ed9(0x216)],_0x45756f=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x5788ff+_0x5b1ed9(0x25e),()=>_0x1119ce['realtime']['listJourneys'](_0x4735f6),{'verbose':_0x437e0c['verbose']}),_0x1fb5ac=_0x45756f[_0x5b1ed9(0x216)];console[_0x5b1ed9(0x2f7)](_0x5b1ed9(0xf6)+_0x1fb5ac[_0x5b1ed9(0x2f9)]+_0x5b1ed9(0x20f)+(_0x1fb5ac[_0x5b1ed9(0x2f9)]!==0x1?'s':''));if(_0x437e0c['format']===_0x5b1ed9(0x296)||_0x437e0c[_0x5b1ed9(0x1a0)]===_0x5b1ed9(0x27c))await handleSDKOutput(_0x1fb5ac,_0x437e0c);else{if(_0x1fb5ac['length']===0x0)console[_0x5b1ed9(0x1d7)](_0x5b1ed9(0x299));else for(const _0x5b08e9 of _0x1fb5ac){const _0x2c1377=_0x5b08e9['state']===_0x5b1ed9(0xf1)?'🚀':'📝',_0x45a96d=_0x5b08e9[_0x5b1ed9(0x17a)]?a31_0x47c070[_0x5b1ed9(0x24c)]('\x20(paused)'):'',_0x6e3e99=a31_0x47c070[_0x5b1ed9(0x2f3)]('\x20('+_0x5b08e9[_0x5b1ed9(0x303)]+_0x5b1ed9(0x1b6)+(_0x5b08e9['stageCount']!==0x1?'s':'')+')');console['log'](_0x2c1377+'\x20'+_0x5b08e9['name']+_0x45a96d+_0x6e3e99);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x3334a4(0x133)]='ps:rt:jn:pause';['description']=a31_0x3334a4(0x14c);async[a31_0x3334a4(0x165)](_0x41385b){const _0xc70afe=a31_0x3334a4,{options:_0x24bbf3,args:_0x3fd351,tdx:_0x3a67c9}=_0x41385b,_0x3f37f7=_0x3fd351[0x0];if(!_0x3f37f7)return console[_0xc70afe(0x2f7)](a31_0x47c070['red']('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0xc70afe(0x2f7)](_0xc70afe(0x25f)),console[_0xc70afe(0x2f7)](a31_0x47c070[_0xc70afe(0x2f3)](_0xc70afe(0x104))),0x1;_0x24bbf3[_0xc70afe(0x1e4)]&&(console['error'](_0xc70afe(0x226)+_0x24bbf3[_0xc70afe(0x2a2)]),console[_0xc70afe(0x2f7)]('RT\x20Journey\x20ID:\x20'+_0x3f37f7));const _0x3ec1e1=await withSpinner(_0xc70afe(0x143)+_0x3f37f7+_0xc70afe(0x25e),()=>_0x3a67c9['realtime'][_0xc70afe(0x21e)](_0x3f37f7),{'verbose':_0x24bbf3[_0xc70afe(0x1e4)]}),_0x1f1364=_0x3ec1e1[_0xc70afe(0x216)];console[_0xc70afe(0x2f7)](_0xc70afe(0x1b8)+_0x1f1364['name']+'\x27');if(_0x24bbf3['format']===_0xc70afe(0x296)||_0x24bbf3[_0xc70afe(0x1a0)]===_0xc70afe(0x27c))await handleSDKOutput([_0x1f1364],_0x24bbf3);else{const _0x3f1c80=_0x1f1364[_0xc70afe(0x2c6)]===_0xc70afe(0xf1)?'🚀':'📝',_0x40481b=_0x1f1364[_0xc70afe(0x17a)]?a31_0x47c070['yellow'](_0xc70afe(0x1bd)):'';console['log'](_0x3f1c80+'\x20'+_0x1f1364[_0xc70afe(0x133)]+_0x40481b);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a31_0x3334a4(0x238);['description']=a31_0x3334a4(0x196);async['execute'](_0x5b566d){const _0x572757=a31_0x3334a4,{options:_0x19a520,args:_0x4a8a8b,tdx:_0x3df46e}=_0x5b566d,_0x1988ae=_0x4a8a8b[0x0];if(!_0x1988ae)return console[_0x572757(0x2f7)](a31_0x47c070[_0x572757(0x293)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x572757(0x2f7)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console[_0x572757(0x2f7)](a31_0x47c070['dim'](_0x572757(0x104))),0x1;_0x19a520[_0x572757(0x1e4)]&&(console[_0x572757(0x2f7)](_0x572757(0x226)+_0x19a520[_0x572757(0x2a2)]),console['error'](_0x572757(0x146)+_0x1988ae));const _0x2a04d0=await withSpinner(_0x572757(0x204)+_0x1988ae+_0x572757(0x25e),()=>_0x3df46e[_0x572757(0x17b)][_0x572757(0x2da)](_0x1988ae),{'verbose':_0x19a520[_0x572757(0x1e4)]}),_0x4a6d71=_0x2a04d0[_0x572757(0x216)];console[_0x572757(0x2f7)](_0x572757(0x16f)+_0x4a6d71[_0x572757(0x133)]+'\x27');if(_0x19a520['format']===_0x572757(0x296)||_0x19a520['format']===_0x572757(0x27c))await handleSDKOutput([_0x4a6d71],_0x19a520);else{const _0x1feb68=_0x4a6d71[_0x572757(0x2c6)]===_0x572757(0xf1)?'🚀':'📝',_0xecbbf4=_0x4a6d71['paused']?a31_0x47c070['yellow'](_0x572757(0x1bd)):'';console[_0x572757(0x1d7)](_0x1feb68+'\x20'+_0x4a6d71['name']+_0xecbbf4);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']='ps:rt:configuration_versions';[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x1f4);async[a31_0x3334a4(0x165)](_0x57e9cc){const _0x51b14e=a31_0x3334a4,{options:_0x4f71d1,args:_0x3156a1,tdx:_0x1ebec6}=_0x57e9cc,_0x2226f1=_0x3156a1[0x0]||_0x4f71d1[_0x51b14e(0x2aa)];if(!_0x2226f1)return showParentSegmentNotSetError(_0x51b14e(0x102)+_0x51b14e(0x290)),0x1;_0x4f71d1[_0x51b14e(0x1e4)]&&(console[_0x51b14e(0x2f7)](_0x51b14e(0x226)+_0x4f71d1[_0x51b14e(0x2a2)]),console[_0x51b14e(0x2f7)](_0x51b14e(0x1f1)+_0x2226f1));const _0x1ebabb=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2226f1+_0x51b14e(0x25e),()=>_0x1ebec6['segment']['resolveParentId'](_0x2226f1),{'verbose':_0x4f71d1[_0x51b14e(0x1e4)]}),_0x2d14ba=_0x1ebabb[_0x51b14e(0x216)],_0x535ec2=await withSpinner(_0x51b14e(0x2a5)+_0x2226f1+_0x51b14e(0x25e),()=>_0x1ebec6[_0x51b14e(0x17b)][_0x51b14e(0x1ca)](_0x2d14ba),{'verbose':_0x4f71d1[_0x51b14e(0x1e4)]}),_0x2d3021=_0x535ec2['data'];return console[_0x51b14e(0x2f7)](_0x51b14e(0x1e2)),_0x4f71d1[_0x51b14e(0x1a0)]===_0x51b14e(0x296)||_0x4f71d1[_0x51b14e(0x1a0)]===_0x51b14e(0x27c)?await handleSDKOutput([_0x2d3021],_0x4f71d1):(console[_0x51b14e(0x1d7)]('id:\x20'+_0x2d3021['id']),console['log'](_0x51b14e(0x111)+_0x2d3021[_0x51b14e(0x15f)]),console[_0x51b14e(0x1d7)](_0x51b14e(0x13e)+_0x2d3021[_0x51b14e(0x2b2)]),console['log'](_0x51b14e(0x2f5)+_0x2d3021[_0x51b14e(0x2b6)]),console[_0x51b14e(0x1d7)](_0x51b14e(0x128)+_0x2d3021['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x219);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x142);async[a31_0x3334a4(0x165)](_0x3a3b2e){const _0x571035=a31_0x3334a4,{options:_0x40413a,args:_0x1997a5,tdx:_0x191168}=_0x3a3b2e,_0x48f8f5=_0x1997a5[0x0]||_0x40413a[_0x571035(0x2aa)];if(!_0x48f8f5)return showParentSegmentNotSetError(_0x571035(0x15d)+_0x571035(0x1c5)),0x1;const _0x410fbd=await withSpinner(_0x571035(0x22e)+_0x48f8f5+_0x571035(0x25e),()=>_0x191168[_0x571035(0x1b5)][_0x571035(0x2cb)](_0x48f8f5),{'verbose':_0x40413a[_0x571035(0x1e4)]}),_0x96abf3=_0x410fbd['data'],_0x26cf1d=await withSpinner(_0x571035(0x265)+_0x48f8f5+_0x571035(0x25e),()=>_0x191168[_0x571035(0x177)]['list'](_0x96abf3),{'verbose':_0x40413a[_0x571035(0x1e4)]}),_0x93cd82=_0x26cf1d[_0x571035(0x216)];console['error'](_0x571035(0xf6)+_0x93cd82['length']+'\x20personalization\x20service'+(_0x93cd82[_0x571035(0x2f9)]!==0x1?'s':''));if(_0x40413a[_0x571035(0x1a0)]==='json'||_0x40413a[_0x571035(0x1a0)]===_0x571035(0x27c))await handleSDKOutput(_0x93cd82,_0x40413a);else{if(_0x93cd82[_0x571035(0x2f9)]===0x0)console[_0x571035(0x1d7)](_0x571035(0x178)),console[_0x571035(0x2f7)](a31_0x47c070[_0x571035(0x1de)](_0x571035(0x117)));else for(const _0x70e39d of _0x93cd82){console[_0x571035(0x1d7)](a31_0x47c070[_0x571035(0x2d2)](_0x70e39d[_0x571035(0x133)])+'\x20'+a31_0x47c070['dim'](_0x571035(0x20d)+_0x70e39d['id']+')'));_0x70e39d[_0x571035(0x1c6)]&&console[_0x571035(0x1d7)]('\x20\x20'+a31_0x47c070[_0x571035(0x2f3)](_0x70e39d[_0x571035(0x1c6)]));if(_0x70e39d[_0x571035(0x240)]&&_0x70e39d['tokens'][_0x571035(0x2f9)]>0x0)for(const _0x946341 of _0x70e39d[_0x571035(0x240)]){const _0x3f5df5=_0x946341[_0x571035(0x2d1)]?.[_0x571035(0x2f9)]?_0x946341['allowedIps'][_0x571035(0x114)](',\x20'):'any';console[_0x571035(0x1d7)]('\x20\x20'+a31_0x47c070[_0x571035(0x1de)]('token:')+'\x20'+_0x946341['name']+'\x20'+a31_0x47c070['dim'](_0x571035(0x20d)+_0x946341['id']+')')),console[_0x571035(0x1d7)]('\x20\x20\x20\x20'+a31_0x47c070[_0x571035(0x2f3)](_0x571035(0x306))+'\x20'+_0x3f5df5);}else console[_0x571035(0x1d7)]('\x20\x20'+a31_0x47c070[_0x571035(0x2f3)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x2c3);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x1b3);async['execute'](_0x2da732){const _0x2b17a1=a31_0x3334a4,{options:_0x4cb567,args:_0x42a85e,tdx:_0xccdc1a}=_0x2da732,_0x24b507=_0x4cb567,_0x4ca951=_0x42a85e[0x0],_0x200c3d=_0x42a85e[0x1]||_0x4cb567[_0x2b17a1(0x2aa)];if(!_0x4ca951)return console[_0x2b17a1(0x2f7)](_0x2b17a1(0x116)),console['error'](_0x2b17a1(0x157)),console['error'](_0x2b17a1(0x15e)),0x1;if(!_0x200c3d)return showParentSegmentNotSetError(_0x2b17a1(0x26e)+_0x2b17a1(0x15e)),0x1;const _0x9336bd=await withSpinner(_0x2b17a1(0x22e)+_0x200c3d+_0x2b17a1(0x25e),()=>_0xccdc1a[_0x2b17a1(0x1b5)][_0x2b17a1(0x2cb)](_0x200c3d),{'verbose':_0x4cb567[_0x2b17a1(0x1e4)]}),_0x331aa7=_0x9336bd[_0x2b17a1(0x216)],_0x4d9b47={'name':_0x4ca951,'description':_0x24b507[_0x2b17a1(0x1c6)],'public':_0x24b507[_0x2b17a1(0x148)]},_0x2aea62=await withSpinner(_0x2b17a1(0x235)+_0x4ca951+_0x2b17a1(0x25e),()=>_0xccdc1a['personalization']['create'](_0x331aa7,_0x4d9b47),{'verbose':_0x4cb567[_0x2b17a1(0x1e4)]}),_0x1d0c27=_0x2aea62['data'];return console[_0x2b17a1(0x2f7)](_0x2b17a1(0x207)+_0x1d0c27[_0x2b17a1(0x133)]+_0x2b17a1(0x2e4)+_0x1d0c27['id']),await handleSDKOutput([_0x1d0c27],_0x4cb567),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x181);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x2a9);async[a31_0x3334a4(0x165)](_0x271ba1){const _0x17ec6e=a31_0x3334a4,{options:_0xb829f2,args:_0x1f4189,tdx:_0x54c05c}=_0x271ba1,_0x3189f6=_0x1f4189[0x0],_0xc1e6e1=_0x1f4189[0x1]||_0xb829f2['parentSegment'];if(!_0x3189f6)return console[_0x17ec6e(0x2f7)](_0x17ec6e(0x170)),console[_0x17ec6e(0x2f7)](_0x17ec6e(0x1e5)),console[_0x17ec6e(0x2f7)](_0x17ec6e(0x2de)),0x1;if(!_0xc1e6e1)return showParentSegmentNotSetError(_0x17ec6e(0x2be)+_0x17ec6e(0x2de)),0x1;const _0x2daf46=await withSpinner(_0x17ec6e(0x22e)+_0xc1e6e1+_0x17ec6e(0x25e),()=>_0x54c05c[_0x17ec6e(0x1b5)][_0x17ec6e(0x2cb)](_0xc1e6e1),{'verbose':_0xb829f2[_0x17ec6e(0x1e4)]}),_0x7fec04=_0x2daf46[_0x17ec6e(0x216)],_0x41338a=await withSpinner(_0x17ec6e(0x120)+_0x3189f6+'\x27...',()=>_0x54c05c[_0x17ec6e(0x177)][_0x17ec6e(0x254)](_0x7fec04,_0x3189f6),{'verbose':_0xb829f2['verbose']}),_0x189d3a=_0x41338a['data'];if(_0xb829f2['json']||_0xb829f2['jsonl'])await handleSDKOutput([_0x189d3a],_0xb829f2);else{console['log'](a31_0x47c070['bold'](_0x189d3a[_0x17ec6e(0x133)])+'\x20'+a31_0x47c070[_0x17ec6e(0x2f3)](_0x17ec6e(0x20d)+_0x189d3a['id']+')'));_0x189d3a[_0x17ec6e(0x1c6)]&&console['log']('\x20\x20'+a31_0x47c070[_0x17ec6e(0x2f3)](_0x189d3a[_0x17ec6e(0x1c6)]));console['log']('\x20\x20'+a31_0x47c070[_0x17ec6e(0x1de)](_0x17ec6e(0x2f0))+'\x20'+(_0x189d3a[_0x17ec6e(0x148)]?'yes':'no'));if(_0x189d3a['tokens']&&_0x189d3a[_0x17ec6e(0x240)][_0x17ec6e(0x2f9)]>0x0)for(const _0xe9a729 of _0x189d3a[_0x17ec6e(0x240)]){const _0x27efe8=_0xe9a729['allowedIps']?.['length']?_0xe9a729[_0x17ec6e(0x2d1)][_0x17ec6e(0x114)](',\x20'):_0x17ec6e(0x14f);console[_0x17ec6e(0x1d7)]('\x20\x20'+a31_0x47c070[_0x17ec6e(0x1de)]('token:')+'\x20'+_0xe9a729['name']+'\x20'+a31_0x47c070['dim']('(id:\x20'+_0xe9a729['id']+')')),console[_0x17ec6e(0x1d7)](_0x17ec6e(0x271)+a31_0x47c070[_0x17ec6e(0x2f3)](_0x17ec6e(0x306))+'\x20'+_0x27efe8);}else console[_0x17ec6e(0x1d7)]('\x20\x20'+a31_0x47c070[_0x17ec6e(0x2f3)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x1f5);[a31_0x3334a4(0x1c6)]='Delete\x20a\x20personalization\x20service';async['execute'](_0x5d1c21){const _0x47be4a=a31_0x3334a4,{options:_0x737bb,args:_0x569ab6,tdx:_0x3388fb}=_0x5d1c21,_0x582f90=_0x569ab6[0x0],_0x5a0aa9=_0x569ab6[0x1]||_0x737bb[_0x47be4a(0x2aa)];if(!_0x582f90)return console[_0x47be4a(0x2f7)](_0x47be4a(0x170)),console['error'](_0x47be4a(0x129)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5a0aa9)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x2c9edd=await withSpinner(_0x47be4a(0x22e)+_0x5a0aa9+_0x47be4a(0x25e),()=>_0x3388fb[_0x47be4a(0x1b5)][_0x47be4a(0x2cb)](_0x5a0aa9),{'verbose':_0x737bb[_0x47be4a(0x1e4)]}),_0x28687c=_0x2c9edd[_0x47be4a(0x216)];return await withSpinner(_0x47be4a(0x189)+_0x582f90+'\x27...',()=>_0x3388fb['personalization'][_0x47be4a(0x158)](_0x28687c,_0x582f90),{'verbose':_0x737bb['verbose']}),console[_0x47be4a(0x2f7)](_0x47be4a(0x11a)+_0x582f90+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a31_0x3334a4(0x10c);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x2f8);async['execute'](_0x3565e1){const _0x237181=a31_0x3334a4,{options:_0x238ef7,args:_0xa18026,tdx:_0x15762f}=_0x3565e1,_0x11eeef=_0x238ef7,_0xa58af3=_0xa18026[0x0],_0x47cd2f=_0xa18026[0x1]||_0x238ef7[_0x237181(0x2aa)];if(!_0xa58af3)return console[_0x237181(0x2f7)](_0x237181(0x170)),console[_0x237181(0x2f7)](_0x237181(0xf9)),console['error'](_0x237181(0x249)),0x1;if(!_0x11eeef[_0x237181(0x133)])return console[_0x237181(0x2f7)](_0x237181(0x16d)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x47cd2f)return showParentSegmentNotSetError(_0x237181(0x2e0)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x1f5721=await withSpinner(_0x237181(0x22e)+_0x47cd2f+_0x237181(0x25e),()=>_0x15762f['segment'][_0x237181(0x2cb)](_0x47cd2f),{'verbose':_0x238ef7[_0x237181(0x1e4)]}),_0x178b57=_0x1f5721[_0x237181(0x216)],_0x4e8143={'name':_0x11eeef[_0x237181(0x133)]};_0x11eeef[_0x237181(0x1c6)]!==undefined&&(_0x4e8143[_0x237181(0x1c6)]=_0x11eeef[_0x237181(0x1c6)]);const _0x1783cb=await withSpinner(_0x237181(0x1bc)+_0xa58af3+_0x237181(0x25e),()=>_0x15762f[_0x237181(0x177)]['patch'](_0x178b57,_0xa58af3,_0x4e8143),{'verbose':_0x238ef7[_0x237181(0x1e4)]}),_0x150e78=_0x1783cb[_0x237181(0x216)];return console[_0x237181(0x2f7)](_0x237181(0x300)+_0x150e78[_0x237181(0x133)]+'\x27'),await handleSDKOutput([_0x150e78],_0x238ef7),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']='ps:pz:service:token:create';[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x18d);async[a31_0x3334a4(0x165)](_0x41e0b0){const _0x5bb9f0=a31_0x3334a4,{options:_0x1108d1,args:_0x31831e,tdx:_0x16a0aa}=_0x41e0b0,_0x58cc50=_0x1108d1,_0x34542d=_0x31831e[0x0],_0x77dd44=_0x31831e[0x1],_0x658309=_0x31831e[0x2]||_0x1108d1[_0x5bb9f0(0x2aa)];if(!_0x34542d)return console['error'](_0x5bb9f0(0x1b1)),console[_0x5bb9f0(0x2f7)](_0x5bb9f0(0x25b)),console['error'](_0x5bb9f0(0x11f)),0x1;if(!_0x77dd44)return console[_0x5bb9f0(0x2f7)](_0x5bb9f0(0x170)),console[_0x5bb9f0(0x2f7)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x5bb9f0(0x2f7)](_0x5bb9f0(0x11f)),0x1;if(!_0x658309)return showParentSegmentNotSetError(_0x5bb9f0(0x2ae)+_0x5bb9f0(0x11f)),0x1;const _0x1910a6=await withSpinner(_0x5bb9f0(0x22e)+_0x658309+_0x5bb9f0(0x25e),()=>_0x16a0aa[_0x5bb9f0(0x1b5)]['resolveParentId'](_0x658309),{'verbose':_0x1108d1[_0x5bb9f0(0x1e4)]}),_0x435864=_0x1910a6[_0x5bb9f0(0x216)],_0x4911ec={'name':_0x34542d};_0x58cc50[_0x5bb9f0(0x2d1)]&&(_0x4911ec[_0x5bb9f0(0x2d1)]=_0x58cc50[_0x5bb9f0(0x2d1)][_0x5bb9f0(0x221)](',')[_0x5bb9f0(0x2bd)](_0x4cfc59=>_0x4cfc59[_0x5bb9f0(0x19c)]()));_0x58cc50[_0x5bb9f0(0x1c6)]&&(_0x4911ec[_0x5bb9f0(0x1c6)]=_0x58cc50['description']);const _0x457550=await withSpinner(_0x5bb9f0(0x2af)+_0x34542d+_0x5bb9f0(0x1a5)+_0x77dd44+'\x27...',()=>_0x16a0aa[_0x5bb9f0(0x177)][_0x5bb9f0(0x2ff)](_0x435864,_0x77dd44,_0x4911ec),{'verbose':_0x1108d1['verbose']}),_0x372b49=_0x457550[_0x5bb9f0(0x216)];return console['error'](_0x5bb9f0(0x2a1)+_0x372b49[_0x5bb9f0(0x133)]+_0x5bb9f0(0x2e4)+_0x372b49['id']),_0x372b49['value']&&(console[_0x5bb9f0(0x2f7)](a31_0x47c070['yellow'](_0x5bb9f0(0x1a7))),console[_0x5bb9f0(0x2f7)](a31_0x47c070[_0x5bb9f0(0x1de)](_0x372b49[_0x5bb9f0(0x115)])),console[_0x5bb9f0(0x2f7)]('')),await handleSDKOutput([_0x372b49],_0x1108d1),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{['name']='ps:pz:service:token:delete';[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x139);async[a31_0x3334a4(0x165)](_0x3f19fe){const _0xae8428=a31_0x3334a4,{options:_0x5e6d0f,args:_0x2ec510,tdx:_0x45b478}=_0x3f19fe,_0xf9e716=_0x2ec510[0x0],_0x5aab7d=_0x2ec510[0x1]||_0x5e6d0f[_0xae8428(0x2aa)];if(!_0xf9e716)return console[_0xae8428(0x2f7)](_0xae8428(0x1ff)),console[_0xae8428(0x2f7)](_0xae8428(0x285)),console['error'](_0xae8428(0x2a6)),0x1;if(!_0x5aab7d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x195fc8=await withSpinner(_0xae8428(0x22e)+_0x5aab7d+_0xae8428(0x25e),()=>_0x45b478[_0xae8428(0x1b5)][_0xae8428(0x2cb)](_0x5aab7d),{'verbose':_0x5e6d0f[_0xae8428(0x1e4)]}),_0x79805e=_0x195fc8[_0xae8428(0x216)],_0x21cbb4=await withSpinner(_0xae8428(0x123),()=>_0x45b478[_0xae8428(0x177)][_0xae8428(0x24e)](_0x79805e),{'verbose':_0x5e6d0f['verbose']}),_0x191fe5=_0x21cbb4[_0xae8428(0x216)];let _0x4cc804;for(const _0x3b4a09 of _0x191fe5){if(_0x3b4a09[_0xae8428(0x240)]?.[_0xae8428(0x199)](_0x3edc5c=>_0x3edc5c['id']===_0xf9e716)){_0x4cc804=_0x3b4a09['id'];break;}}if(!_0x4cc804)return console[_0xae8428(0x2f7)](_0xae8428(0xff)+_0xf9e716+_0xae8428(0x250)),0x1;const _0x1117cb=await withSpinner('Deleting\x20token\x20\x27'+_0xf9e716+_0xae8428(0x25e),()=>_0x45b478[_0xae8428(0x177)][_0xae8428(0x25d)](_0x79805e,_0x4cc804,_0xf9e716),{'verbose':_0x5e6d0f[_0xae8428(0x1e4)]}),_0x567904=_0x1117cb[_0xae8428(0x216)];return console[_0xae8428(0x2f7)]('✔\x20Deleted\x20token\x20\x27'+(_0x567904[_0xae8428(0x133)]||_0xf9e716)+'\x27'),await handleSDKOutput([_0x567904],_0x5e6d0f),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x2b9);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x1c9);async[a31_0x3334a4(0x165)](_0x3d4002){const _0x253160=a31_0x3334a4,{options:_0x25de08,args:_0x31d446,tdx:_0x2c9845}=_0x3d4002,_0x4d5d2a=_0x31d446[0x0]||_0x25de08[_0x253160(0x2aa)];if(!_0x4d5d2a)return showParentSegmentNotSetError(_0x253160(0x218)+_0x253160(0x201)),0x1;const _0x8fa7c1=await withSpinner(_0x253160(0x22e)+_0x4d5d2a+'\x27...',()=>_0x2c9845[_0x253160(0x1b5)][_0x253160(0x2cb)](_0x4d5d2a),{'verbose':_0x25de08['verbose']}),_0x14528c=_0x8fa7c1[_0x253160(0x216)],_0x1aeedc=await withSpinner(_0x253160(0x1f3)+_0x4d5d2a+_0x253160(0x25e),()=>_0x2c9845[_0x253160(0x177)]['listPersonalizations'](_0x14528c),{'verbose':_0x25de08[_0x253160(0x1e4)]}),_0x125ecf=_0x1aeedc['data'];console[_0x253160(0x2f7)](_0x253160(0xf6)+_0x125ecf[_0x253160(0x2f9)]+_0x253160(0x159)+(_0x125ecf['length']!==0x1?'s':''));if(_0x25de08[_0x253160(0x1a0)]==='json'||_0x25de08[_0x253160(0x1a0)]===_0x253160(0x27c))await handleSDKOutput(_0x125ecf,_0x25de08);else{if(_0x125ecf[_0x253160(0x2f9)]===0x0)console[_0x253160(0x1d7)](_0x253160(0x2df));else for(const _0x3c0d16 of _0x125ecf){console['log'](a31_0x47c070[_0x253160(0x2d2)](_0x3c0d16[_0x253160(0x133)])+'\x20'+a31_0x47c070['dim'](_0x253160(0x20d)+_0x3c0d16['id']+')'));_0x3c0d16['description']&&console[_0x253160(0x1d7)]('\x20\x20'+a31_0x47c070[_0x253160(0x2f3)](_0x3c0d16[_0x253160(0x1c6)]));const _0x2145fb=_0x3c0d16[_0x253160(0x1f7)]?.[_0x253160(0x2f9)]||0x0;console[_0x253160(0x1d7)]('\x20\x20'+a31_0x47c070['cyan'](_0x253160(0x27f))+'\x20'+_0x2145fb);if(_0x3c0d16[_0x253160(0x1f7)]&&_0x3c0d16[_0x253160(0x1f7)]['length']>0x0)for(const _0xdc6cca of _0x3c0d16['sections']){console['log'](_0x253160(0x1ba)+_0xdc6cca[_0x253160(0x133)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0xf5);[a31_0x3334a4(0x1c6)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a31_0x3334a4(0x165)](_0xba5c1b){const _0x309459=a31_0x3334a4,{options:_0x44c226,args:_0x4b14b6,tdx:_0x218372}=_0xba5c1b,_0x29c229=_0x4b14b6[0x0];if(!_0x29c229)return console['error'](_0x309459(0x2e7)),console[_0x309459(0x2f7)](_0x309459(0x1c4)),0x1;const _0x227d0a=await withSpinner('Getting\x20personalization\x20\x27'+_0x29c229+_0x309459(0x25e),()=>_0x218372['personalization'][_0x309459(0x23a)](_0x29c229),{'verbose':_0x44c226[_0x309459(0x1e4)]}),_0x32f5ab=_0x227d0a[_0x309459(0x216)];console['error']('✔\x20Found\x20personalization\x20\x27'+_0x32f5ab[_0x309459(0x133)]+'\x27');if(_0x44c226[_0x309459(0x1a0)]===_0x309459(0x296)||_0x44c226['format']==='jsonl')await handleSDKOutput([_0x32f5ab],_0x44c226);else{console[_0x309459(0x1d7)](a31_0x47c070['bold'](_0x32f5ab[_0x309459(0x133)])+'\x20'+a31_0x47c070[_0x309459(0x2f3)](_0x309459(0x20d)+_0x32f5ab['id']+')'));_0x32f5ab[_0x309459(0x1c6)]&&console['log']('\x20\x20'+a31_0x47c070[_0x309459(0x2f3)](_0x32f5ab[_0x309459(0x1c6)]));_0x32f5ab[_0x309459(0x15f)]&&console[_0x309459(0x1d7)]('\x20\x20'+a31_0x47c070['cyan']('audienceId:')+'\x20'+_0x32f5ab[_0x309459(0x15f)]);console[_0x309459(0x1d7)]('\x20\x20'+a31_0x47c070[_0x309459(0x1de)]('created:')+'\x20'+_0x32f5ab['createdAt']),console[_0x309459(0x1d7)]('\x20\x20'+a31_0x47c070[_0x309459(0x1de)](_0x309459(0x13f))+'\x20'+_0x32f5ab[_0x309459(0x2d6)]);const _0x51fd1e=_0x32f5ab['sections']?.[_0x309459(0x2f9)]||0x0;console[_0x309459(0x1d7)]('\x20\x20'+a31_0x47c070[_0x309459(0x1de)](_0x309459(0x27f))+'\x20'+_0x51fd1e);if(_0x32f5ab[_0x309459(0x1f7)]&&_0x32f5ab['sections'][_0x309459(0x2f9)]>0x0)for(const _0x7ba165 of _0x32f5ab[_0x309459(0x1f7)]){console[_0x309459(0x1d7)](_0x309459(0x271)+a31_0x47c070[_0x309459(0x2d2)](_0x7ba165[_0x309459(0x133)])+'\x20'+a31_0x47c070['dim'](_0x309459(0x20d)+_0x7ba165['id']+')')),_0x7ba165[_0x309459(0x1e1)]&&(console['log']('\x20\x20\x20\x20\x20\x20'+a31_0x47c070[_0x309459(0x1de)](_0x309459(0x106))+'\x20'+_0x7ba165[_0x309459(0x1e1)]['name']),_0x7ba165[_0x309459(0x1e1)]['keyEventCriteria']?.[_0x309459(0x11b)]&&console[_0x309459(0x1d7)](_0x309459(0x23b)+a31_0x47c070[_0x309459(0x1de)]('keyEventId:')+'\x20'+_0x7ba165['entryCriteria'][_0x309459(0x2c9)]['keyEventId'])),_0x7ba165['payload']&&console[_0x309459(0x1d7)](_0x309459(0x2ef)+a31_0x47c070[_0x309459(0x1de)](_0x309459(0x284))+'\x20'+JSON['stringify'](_0x7ba165[_0x309459(0x1e8)])),_0x7ba165[_0x309459(0x1b4)]&&console[_0x309459(0x1d7)](_0x309459(0x2ef)+a31_0x47c070[_0x309459(0x1de)]('includeSensitive:')+_0x309459(0xf8));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x3334a4(0x133)]='ps:pz:delete';[a31_0x3334a4(0x1c6)]='Delete\x20a\x20realtime\x20personalization';async['execute'](_0x153a0e){const _0x20b46d=a31_0x3334a4,{options:_0xc0bf3f,args:_0x53a92f,tdx:_0x27f16c}=_0x153a0e,_0x562eb7=_0x53a92f[0x0];if(!_0x562eb7)return console[_0x20b46d(0x2f7)](_0x20b46d(0x2e7)),console[_0x20b46d(0x2f7)](_0x20b46d(0x258)),0x1;return await withSpinner(_0x20b46d(0x268)+_0x562eb7+_0x20b46d(0x25e),()=>_0x27f16c[_0x20b46d(0x177)][_0x20b46d(0x304)](_0x562eb7),{'verbose':_0xc0bf3f[_0x20b46d(0x1e4)]}),console[_0x20b46d(0x2f7)](_0x20b46d(0x29e)+_0x562eb7+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x302);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x289);async[a31_0x3334a4(0x165)](_0x46612f){const _0x4d7bc5=a31_0x3334a4,{options:_0x2c5c5b,tdx:_0x1a80fa}=_0x46612f,_0x56c735=_0x2c5c5b;let _0x28ffd9;if(_0x56c735[_0x4d7bc5(0x2ac)]){_0x28ffd9=await loadJSON(_0x56c735[_0x4d7bc5(0x2ac)],!![]);if(!_0x28ffd9['relationships']?.[_0x4d7bc5(0x2a8)])return console[_0x4d7bc5(0x2f7)](_0x4d7bc5(0x28a)),console[_0x4d7bc5(0x2f7)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x4d7bc5(0x2f7)](_0x4d7bc5(0x209)),0x1;}else{if(!_0x56c735[_0x4d7bc5(0x133)])return console[_0x4d7bc5(0x2f7)](_0x4d7bc5(0xfe)),console[_0x4d7bc5(0x2f7)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x4d7bc5(0x2f7)](_0x4d7bc5(0x175)),0x1;if(_0x56c735[_0x4d7bc5(0x1c6)]===undefined)return console['error'](_0x4d7bc5(0x241)),console['error'](_0x4d7bc5(0xfc)),console[_0x4d7bc5(0x2f7)](_0x4d7bc5(0x175)),0x1;if(_0x56c735[_0x4d7bc5(0x278)]===undefined)return console[_0x4d7bc5(0x2f7)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console[_0x4d7bc5(0x2f7)](_0x4d7bc5(0x22c)),0x1;let _0x3af4f2=_0x56c735['audienceId'];if(!_0x3af4f2&&_0x2c5c5b[_0x4d7bc5(0x2aa)]){const _0x38aee0=await withSpinner(_0x4d7bc5(0x22e)+_0x2c5c5b[_0x4d7bc5(0x2aa)]+_0x4d7bc5(0x25e),()=>_0x1a80fa[_0x4d7bc5(0x1b5)][_0x4d7bc5(0x2cb)](_0x2c5c5b[_0x4d7bc5(0x2aa)]),{'verbose':_0x2c5c5b[_0x4d7bc5(0x1e4)]});_0x3af4f2=_0x38aee0[_0x4d7bc5(0x216)];}let _0x213aa3;_0x56c735[_0x4d7bc5(0x1f7)]&&(_0x213aa3=await loadJSON(_0x56c735[_0x4d7bc5(0x1f7)],![]));const _0x10a025=_0x56c735[_0x4d7bc5(0x278)]===_0x4d7bc5(0x202)?null:{'id':_0x56c735[_0x4d7bc5(0x278)],'type':_0x4d7bc5(0x11d)};_0x28ffd9={'attributes':{'name':_0x56c735[_0x4d7bc5(0x133)],'description':_0x56c735[_0x4d7bc5(0x1c6)]||null,..._0x3af4f2!==undefined&&{'audienceId':_0x3af4f2},..._0x213aa3!==undefined&&{'sections':_0x213aa3}},'relationships':{'parentFolder':{'data':_0x10a025}}};}const _0x149e23=await withSpinner('Creating\x20personalization\x20\x27'+(_0x28ffd9[_0x4d7bc5(0x20b)]?.[_0x4d7bc5(0x133)]??'')+_0x4d7bc5(0x25e),()=>_0x1a80fa[_0x4d7bc5(0x177)][_0x4d7bc5(0x253)](_0x28ffd9),{'verbose':_0x2c5c5b['verbose']}),_0x442655=_0x149e23['data'];return console['error'](_0x4d7bc5(0x217)+_0x442655['name']+_0x4d7bc5(0x2e4)+_0x442655['id']),await handleSDKOutput([_0x442655],_0x2c5c5b),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x24a);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x1dc);async[a31_0x3334a4(0x165)](_0x28b905){const _0x34692d=a31_0x3334a4,{options:_0x4ed834,args:_0x8a388d}=_0x28b905,_0x5f5c2c=_0x4ed834,_0xb44259=_0x8a388d[0x0];if(!_0xb44259)return console[_0x34692d(0x2f7)](_0x34692d(0x2e7)),console[_0x34692d(0x2f7)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x34692d(0x2f7)](_0x34692d(0x1fb)),0x1;let _0x430b7a;if(_0x5f5c2c[_0x34692d(0x2ac)])_0x430b7a=await loadJSON(_0x5f5c2c[_0x34692d(0x2ac)],!![]);else{if(!_0x5f5c2c[_0x34692d(0x133)])return console[_0x34692d(0x2f7)](_0x34692d(0xfe)),console[_0x34692d(0x2f7)](_0x34692d(0x155)),0x1;if(_0x5f5c2c['description']===undefined)return console[_0x34692d(0x2f7)](_0x34692d(0x241)),console[_0x34692d(0x2f7)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x5c1a8b;_0x5f5c2c[_0x34692d(0x1f7)]&&(_0x5c1a8b=await loadJSON(_0x5f5c2c[_0x34692d(0x1f7)],![])),_0x430b7a={'attributes':{'name':_0x5f5c2c[_0x34692d(0x133)],'description':_0x5f5c2c[_0x34692d(0x1c6)]||null,..._0x5c1a8b!==undefined&&{'sections':_0x5c1a8b}}};}const {tdx:_0xdce757}=_0x28b905,_0x5eb034=await withSpinner(_0x34692d(0x110)+_0xb44259+'\x27...',()=>_0xdce757[_0x34692d(0x177)][_0x34692d(0x27d)](_0xb44259,_0x430b7a),{'verbose':_0x4ed834[_0x34692d(0x1e4)]}),_0x151e02=_0x5eb034[_0x34692d(0x216)];return console['error'](_0x34692d(0x1aa)+_0x151e02['name']+_0x34692d(0x2e3)+_0x151e02['id']+')'),await handleSDKOutput([_0x151e02],_0x4ed834),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x3334a4(0x133)]=a31_0x3334a4(0x12a);[a31_0x3334a4(0x1c6)]=a31_0x3334a4(0x14e);async[a31_0x3334a4(0x165)](_0x4dd887){const _0x12995f=a31_0x3334a4,{options:_0xb83ce0,args:_0x34b26d}=_0x4dd887,_0x575674=_0x34b26d[0x0]||_0xb83ce0[_0x12995f(0x2aa)];if(!_0x575674)return showParentSegmentNotSetError(_0x12995f(0x2e8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment'),0x1;const _0x42c7c7=resolveYamlFile(_0x575674);if(!existsSync(_0x42c7c7))return showFileNotFoundError(_0x42c7c7,_0x575674),0x1;let _0x4cba1c;try{_0x4cba1c=readFileSync(_0x42c7c7,_0x12995f(0x166));}catch(_0x46256b){const _0x15b0f5=_0x46256b instanceof Error?_0x46256b[_0x12995f(0x1fc)]:String(_0x46256b);return console[_0x12995f(0x2f7)](_0x12995f(0x134)+_0x15b0f5),0x1;}let _0x57676e;try{_0x57676e=parseDef(_0x4cba1c);}catch(_0x147f21){const _0x4bc080=_0x147f21 instanceof Error?_0x147f21[_0x12995f(0x1fc)]:String(_0x147f21);return console['error'](a31_0x47c070[_0x12995f(0x293)]('Error\x20parsing\x20YAML:\x20'+_0x4bc080)),0x1;}if(_0x57676e['personalization_services']&&_0x57676e[_0x12995f(0x15a)][_0x12995f(0x2f9)]>0x0)return console[_0x12995f(0x2f7)](a31_0x47c070['yellow'](_0x12995f(0x291)+_0x42c7c7)),console['error'](a31_0x47c070['dim'](_0x12995f(0x1b9)+_0x57676e[_0x12995f(0x15a)][_0x12995f(0x2f9)]+_0x12995f(0x137))),0x1;!_0x57676e['realtime']&&(_0x57676e[_0x12995f(0x17b)]={'events':[{'name':_0x12995f(0x1d6),'source_table':_0x12995f(0x269)}],'attributes':[{'name':_0x12995f(0x1a1),'type':_0x12995f(0x248)}],'id_stitching':{'primary_key':_0x57676e[_0x12995f(0x1ed)][_0x12995f(0x211)]===_0x12995f(0xf2)?'td_client_id':_0x12995f(0x247)}});_0x57676e[_0x12995f(0x15a)]=[{'name':'My\x20Service','description':_0x12995f(0x2cd),'trigger_event':_0x12995f(0x1d6),'sections':[{'name':_0x12995f(0x2fc),'criteria':_0x12995f(0x1e6),'attributes':[_0x12995f(0x1a1)]}]}];const _0xda1d1d=serializeDef(_0x57676e);return writeFileSync(_0x42c7c7,_0xda1d1d,_0x12995f(0x166)),console[_0x12995f(0x2f7)](a31_0x47c070[_0x12995f(0x2a3)]('✔')+_0x12995f(0x256)+a31_0x47c070[_0x12995f(0x1de)](_0x42c7c7)),(!_0x57676e[_0x12995f(0x17b)]||_0x4cba1c['indexOf']('realtime:')===-0x1)&&console[_0x12995f(0x2f7)](a31_0x47c070['green']('✔')+_0x12995f(0x2eb)),console[_0x12995f(0x2f7)]('\x0a'+a31_0x47c070[_0x12995f(0x2f3)](_0x12995f(0x1cf))),console[_0x12995f(0x2f7)](_0x12995f(0x29b)+_0x42c7c7+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x12995f(0x2f7)](_0x12995f(0x1a8)+a31_0x47c070[_0x12995f(0x2f3)](_0x12995f(0x138)+_0x575674)+_0x12995f(0x208)),0x0;}}