@treasuredata/tdx 2026.3.49 → 2026.3.50

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 (221) 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.d.ts +6 -4
  60. package/dist/core/config.d.ts.map +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/config.js.map +1 -1
  63. package/dist/core/connection-cache.js +1 -1
  64. package/dist/core/constants.js +1 -1
  65. package/dist/core/credential-cache.js +1 -1
  66. package/dist/core/global-context.js +1 -1
  67. package/dist/core/keychain.js +1 -1
  68. package/dist/core/oauth-keychain.js +1 -1
  69. package/dist/core/oauth.js +1 -1
  70. package/dist/core/profile.js +1 -1
  71. package/dist/core/project-config.js +1 -1
  72. package/dist/core/session.js +1 -1
  73. package/dist/core/user-cache.js +1 -1
  74. package/dist/core/version.js +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/mcp/server.js +1 -1
  77. package/dist/mcp/tools/index.js +1 -1
  78. package/dist/mcp/tools/tdx-run.js +1 -1
  79. package/dist/mcp/tools/tdx-search.js +1 -1
  80. package/dist/mcp/utils.js +1 -1
  81. package/dist/proxy/claude-usage-tracker.js +1 -1
  82. package/dist/proxy/passthrough-server.js +1 -1
  83. package/dist/proxy/sse-usage-parser.js +1 -1
  84. package/dist/sdk/agent/agent-config.js +1 -1
  85. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  86. package/dist/sdk/agent/agent-yaml.js +1 -1
  87. package/dist/sdk/agent/test/evaluator.js +1 -1
  88. package/dist/sdk/agent/test/executor.js +1 -1
  89. package/dist/sdk/agent/test/index.js +1 -1
  90. package/dist/sdk/agent/test/output.js +1 -1
  91. package/dist/sdk/agent/test/parser.js +1 -1
  92. package/dist/sdk/agent/tool-target-registry.js +1 -1
  93. package/dist/sdk/api.js +1 -1
  94. package/dist/sdk/cas/cas-api-client.js +1 -1
  95. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  96. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  97. package/dist/sdk/cas/index.js +1 -1
  98. package/dist/sdk/cas/pull-workflow.js +1 -1
  99. package/dist/sdk/cas/push-workflow.js +1 -1
  100. package/dist/sdk/client/cdp-api-client.js +1 -1
  101. package/dist/sdk/client/delivery-api-client.js +1 -1
  102. package/dist/sdk/client/endpoints.js +1 -1
  103. package/dist/sdk/client/engage-api-client.js +1 -1
  104. package/dist/sdk/client/http-client.js +1 -1
  105. package/dist/sdk/client/llm-api-client.js +1 -1
  106. package/dist/sdk/client/oauth-refresh.js +1 -1
  107. package/dist/sdk/client/rate-limiter.js +1 -1
  108. package/dist/sdk/client/td-api-client.js +1 -1
  109. package/dist/sdk/client/trino-api-client.js +1 -1
  110. package/dist/sdk/client/workflow-client.js +1 -1
  111. package/dist/sdk/connection-validator.js +1 -1
  112. package/dist/sdk/connection.js +1 -1
  113. package/dist/sdk/delivery.js +1 -1
  114. package/dist/sdk/engage/campaign-pull.js +1 -1
  115. package/dist/sdk/engage/campaign-push.js +1 -1
  116. package/dist/sdk/engage/campaign-validator.js +1 -1
  117. package/dist/sdk/engage/campaign-yaml.js +1 -1
  118. package/dist/sdk/engage/template-pull.js +1 -1
  119. package/dist/sdk/engage/template-push.js +1 -1
  120. package/dist/sdk/engage/template-validator.js +1 -1
  121. package/dist/sdk/engage/template-yaml.js +1 -1
  122. package/dist/sdk/engage/types/campaign-def.js +1 -1
  123. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  124. package/dist/sdk/engage/types/template-schema.js +1 -1
  125. package/dist/sdk/engage.js +1 -1
  126. package/dist/sdk/errors.js +1 -1
  127. package/dist/sdk/index.js +1 -1
  128. package/dist/sdk/io/index.js +1 -1
  129. package/dist/sdk/io/node-filesystem.js +1 -1
  130. package/dist/sdk/job.js +1 -1
  131. package/dist/sdk/journey.js +1 -1
  132. package/dist/sdk/llm/chat-cache.js +1 -1
  133. package/dist/sdk/llm/index.js +1 -1
  134. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  135. package/dist/sdk/llm/model-factors.js +1 -1
  136. package/dist/sdk/personalization.js +1 -1
  137. package/dist/sdk/policy.js +1 -1
  138. package/dist/sdk/query/index.js +1 -1
  139. package/dist/sdk/query/sql-parser.js +1 -1
  140. package/dist/sdk/realtime.js +1 -1
  141. package/dist/sdk/schedule.js +1 -1
  142. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  143. package/dist/sdk/segment/fields-display.js +1 -1
  144. package/dist/sdk/segment/file-discovery.js +1 -1
  145. package/dist/sdk/segment/journey-utils.js +1 -1
  146. package/dist/sdk/segment/journey-validator.js +1 -1
  147. package/dist/sdk/segment/journey-yaml.js +1 -1
  148. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  149. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  150. package/dist/sdk/segment/pull-workflow.js +1 -1
  151. package/dist/sdk/segment/push-recovery.js +1 -1
  152. package/dist/sdk/segment/push-workflow.js +1 -1
  153. package/dist/sdk/segment/resolution-context.js +1 -1
  154. package/dist/sdk/segment/segment-path-parser.js +1 -1
  155. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  156. package/dist/sdk/segment/segment-validator.js +1 -1
  157. package/dist/sdk/segment/target-resolution.js +1 -1
  158. package/dist/sdk/segment/tdx-config.js +1 -1
  159. package/dist/sdk/segment/types/activation-schema.js +1 -1
  160. package/dist/sdk/segment/types/journey-def.js +1 -1
  161. package/dist/sdk/segment/types/journey-schema.js +1 -1
  162. package/dist/sdk/segment/types/segment-def.js +1 -1
  163. package/dist/sdk/segment/types/segment-schema.js +1 -1
  164. package/dist/sdk/segment/validate-files.js +1 -1
  165. package/dist/sdk/segment/yaml-validator.js +1 -1
  166. package/dist/sdk/segment.js +1 -1
  167. package/dist/sdk/types/index.js +1 -1
  168. package/dist/sdk/types/progress.js +1 -1
  169. package/dist/sdk/types/workspace.js +1 -1
  170. package/dist/sdk/user.js +1 -1
  171. package/dist/sdk/util/format-detector.js +1 -1
  172. package/dist/sdk/util/formatters.js +1 -1
  173. package/dist/sdk/util/index.js +1 -1
  174. package/dist/sdk/util/paginate.js +1 -1
  175. package/dist/sdk/util/tree-formatter.js +1 -1
  176. package/dist/sdk/workflow/archive-validation.js +1 -1
  177. package/dist/sdk/workflow/clone-workflow.js +1 -1
  178. package/dist/sdk/workflow/index.js +1 -1
  179. package/dist/sdk/workflow/pull-workflow.js +1 -1
  180. package/dist/sdk/workflow/push-workflow.js +1 -1
  181. package/dist/sdk/workflow/tdx-config.js +1 -1
  182. package/dist/sdk/workflow/workflow-utils.js +1 -1
  183. package/dist/sdk/workspace/frontmatter.js +1 -1
  184. package/dist/sdk/workspace/git.js +1 -1
  185. package/dist/sdk/workspace/index.js +1 -1
  186. package/dist/sdk/workspace/templates.js +1 -1
  187. package/dist/sdk/workspace/weekly.js +1 -1
  188. package/dist/sdk/workspace/wikilinks.js +1 -1
  189. package/dist/test-utils/command-runner.js +1 -1
  190. package/dist/test-utils/factories.js +1 -1
  191. package/dist/test-utils/fixtures.js +1 -1
  192. package/dist/test-utils/http-mock.js +1 -1
  193. package/dist/test-utils/index.js +1 -1
  194. package/dist/utils/async.js +1 -1
  195. package/dist/utils/colors.js +1 -1
  196. package/dist/utils/diff.js +1 -1
  197. package/dist/utils/file-permissions.js +1 -1
  198. package/dist/utils/file-reader.js +1 -1
  199. package/dist/utils/github-releases.js +1 -1
  200. package/dist/utils/global-cache.js +1 -1
  201. package/dist/utils/json-loader.js +1 -1
  202. package/dist/utils/local-cache.js +1 -1
  203. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  204. package/dist/utils/logger/formatters/index.js +1 -1
  205. package/dist/utils/logger/handlers/console-handler.js +1 -1
  206. package/dist/utils/logger/handlers/file-handler.js +1 -1
  207. package/dist/utils/logger/handlers/index.js +1 -1
  208. package/dist/utils/logger/handlers/null-handler.js +1 -1
  209. package/dist/utils/logger/index.js +1 -1
  210. package/dist/utils/logger/logger.js +1 -1
  211. package/dist/utils/logger/types.js +1 -1
  212. package/dist/utils/option-validation.js +1 -1
  213. package/dist/utils/process.js +1 -1
  214. package/dist/utils/prompt.js +1 -1
  215. package/dist/utils/spinner.js +1 -1
  216. package/dist/utils/sse-parser.js +1 -1
  217. package/dist/utils/string-utils.js +1 -1
  218. package/dist/utils/table-ref-parser.js +1 -1
  219. package/dist/utils/tdx-logger.js +1 -1
  220. package/dist/utils/version-check.js +1 -1
  221. package/package.json +1 -1
@@ -1 +1 @@
1
- const a31_0x14f6c9=a31_0x1e7f;(function(_0x5218a2,_0x7ca04f){const _0x152377=a31_0x1e7f,_0x1fe151=_0x5218a2();while(!![]){try{const _0xc3518b=-parseInt(_0x152377(0x1a2))/0x1+-parseInt(_0x152377(0x32c))/0x2+parseInt(_0x152377(0x295))/0x3*(parseInt(_0x152377(0x1e3))/0x4)+-parseInt(_0x152377(0x280))/0x5*(-parseInt(_0x152377(0x1d0))/0x6)+parseInt(_0x152377(0x27b))/0x7+parseInt(_0x152377(0x306))/0x8*(parseInt(_0x152377(0x297))/0x9)+-parseInt(_0x152377(0x142))/0xa*(parseInt(_0x152377(0x274))/0xb);if(_0xc3518b===_0x7ca04f)break;else _0x1fe151['push'](_0x1fe151['shift']());}catch(_0x1ff968){_0x1fe151['push'](_0x1fe151['shift']());}}}(a31_0x3062,0x35706));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x5b26f0 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';function a31_0x3062(){const _0x10e10d=['listFields','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','ps:pz:list','List\x20RT\x20journeys','displaySampleData','\x0a\x20\x20\x20\x20]','attributes','workflowSessionId','allowed\x20IPs:','allValid','\x20--attribute\x20\x22','enabled','Aborted.','segment:parent:view','417145soyrUy','\x20configured','Resume\x20activations\x20in\x20an\x20RT\x20journey','Getting\x20personalization\x20\x27','jsonl','pauseJourney','addBehaviors','Create\x20a\x20realtime\x20personalization\x20entity','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Created','stop','pullParentYaml','segment:parent:fields','\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','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','test','\x20\x20\x20\x20\x20\x20\x20\x20','✔\x20Query\x20completed:\x20Processed\x20','sourceTableValid','schemaValid','Error\x20reading\x20file:\x20','Patching\x20personalization\x20\x27','\x20is\x20already\x20up\x20to\x20date','description','scheduleType','Personalization:','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','ps:pz:show','data','query','formatSchemaJson','Master\x20+\x20Attributes','Creating','\x20No\x20changes\x20-\x20','length','Updating','\x0aUsage:\x20tdx\x20ps\x20preview\x20','Fetching\x20sample\x20data...','toFixed','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','My\x20Service','value','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','rowCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','84ttmHde','\x20parent\x20segment','\x20tdx\x20wf\x20attempt\x20','some','getBehaviorNames','✔\x20Deleted\x20personalization\x20\x27','primaryKey','segment','Deleting\x20token\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','darwin','column','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','/sessions/','toLowerCase','addAttributesFile','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','idStitching','\x20rows)','65964sjHBLV','\x0aNew\x20parent\x20segment\x20\x27','segment:parent:push','\x20personalization','No\x20personalizations\x20configured','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','isDirectory','sections','payload','attribute','✔\x20Created\x20parent\x20segment\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','/attempt/','keyEventId','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','Overwrite\x20\x27','\x27...','\x20kill','displayPreviewHints','Validating\x20configuration...','No\x20parent\x20segments\x20match\x20pattern:\x20','ps:pz:init','Listing\x20RT-enabled\x20parent\x20segments...','\x20\x20\x20\x20','launched','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','\x20\x20\x20\x20\x20\x20','Error\x20parsing\x20YAML:\x20','Status:','file','Found\x20YAML\x20file:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','createPersonalization','getParentSQL','foreignKey','createParent','paused','Validate:','\x0aError:','status','Error:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','log','map','\x20[Job\x20ID:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','\x20parent\x20segment\x20\x27','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','getPersonalization','\x20stage','Join\x20on:','runParent','eventKind:\x20','interval','\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','Error:\x20Parent\x20segment\x20name\x20is\x20required','Listing\x20personalization\x20services\x20for\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','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','timezone','\x20+\x20[','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','displayAttributesStats','👥\x20','Parent\x20segment:\x20','displayPreviewResults','\x20service(s)\x20configured','getOutputDatabaseName','realtime:','segment:parent:create','Show\x20a\x20specific\x20realtime\x20personalization','\x20rows\x20','keys','Creating\x20token\x20\x27','delete','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','user_id','\x20total','updatedAt','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','\x27\x20is\x20already\x20up\x20to\x20date','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','Update\x20a\x20realtime\x20personalization\x20entity','id:\x20','getParentFull','\x20\x20\x20\x20-\x20','Attributes:','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','ps:pz:service:create','behaviors','localeCompare','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','Updating\x20personalization\x20service\x20\x27','Behavior:','ID\x20Stitching:','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','includeSensitive:','segment:parent:update','Options\x20(one\x20required):\x0a','segment:parent:list','parentSegment','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','customersWithEvents','name','\x20Configuration\x20is\x20valid','label','\x20field','\x20\x20Columns:\x20','enriched','getCurrentConfigVersion','Error:\x20Service\x20ID\x20is\x20required','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','collectSchema','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','Error:\x20Token\x20name\x20is\x20required','\x20RT\x20journey','✔\x20Created\x20personalization\x20service\x20\x27','Show\x20personalization\x20service\x20details','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','\x20personalization\x20service','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','Fetching\x20current\x20configuration\x20for\x20\x27','validateParentYaml','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x0aNo\x20sample\x20data\x20available','/\x20directories\x20exist.','column_name','Database:\x20','sections:','segment:parent:validate','ps:rt:jn:list','✔\x20Retrieved\x20RT\x20configuration\x20version','Error:\x20Token\x20\x27','yellow','✔\x20Updated\x20parent\x20segment\x20\x27','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','%)\x20','ps:rt:configuration_versions','information_schema','elapsedTimeMillis','3332637XLroub','\x20true','Preview:','type','true','database','joinKey','2033997tOlfvM','master','Fetching\x20behavior\x20list...','ps:pz:service:list','use','79965znbNEs','\x20--behavior\x20\x22<name>\x22','/\x20→\x20','entryCriteria','Coverage:','-1d','\x20--attribute\x20\x22<name>\x22','Columns:','Behaviors','Resolving\x20parent\x20segment\x20\x27','jobId','Creating\x20parent\x20segment\x20\x27','⚡\x20Not\x20enabled','all','stringify','Error:\x20--database\x20and\x20--table\x20are\x20required','\x0aChanges\x20to\x20apply\x20to\x20\x27','Default','listPersonalizations','Create\x20parent\x20segment\x20\x27','ps:pz:service:delete','57FIxJvV','Error:\x20Service\x20name\x20is\x20required','3486276DoLTaA','/app/dw/parentSegments/','Rows:','created:','cyan','Pause\x20activations\x20in\x20an\x20RT\x20journey','displayBehaviorsStats','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','YAML\x20file:\x20','Executing\x20parent\x20segment\x20query...','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','\x27\x20is\x20up\x20to\x20date','displaySummary','.yml','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','token:','ps:pz:service:token:delete','Finding\x20service\x20for\x20token...','start','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','updated:','Source:','No\x20personalization\x20services\x20configured','td_client_id','attributesFile','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','sort','Enriched:','\x20RT-enabled\x20parent\x20segment','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','message','list','\x20--interval\x20','addAttributes','pushParentYaml','/\x20directory.\x0a','customerGroup','sourceTableError','relationships','bold','join','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Error:\x20--name\x20is\x20required','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','replace','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','text','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','behaviorsFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','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','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','displayColumns','Updating\x20parent\x20segment\x20\x27','Listing\x20fields\x20for\x20\x27','\x20\x20No\x20sample\x20data\x20available','updateParent','Error:\x20--attribute\x20requires\x20a\x20name\x0a','displayRealtimeInfo','split','deletePersonalization','column_type','Get\x20current\x20RT\x20configuration\x20version\x20status','errors','Schema\x20saved\x20to\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','\x0a\x20\x20]\x0a}\x0a','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','List\x20available\x20fields\x20for\x20segmentation','dim','\x20=\x20','Output\x20Database:','Creating\x20personalization\x20\x27','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','RT\x20Journey\x20ID:\x20','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Fetching\x20personalization\x20service\x20\x27','\x5c$&','coveragePercent','Join:','Events:','Fetching\x20customers\x20schema...','customerPercent','⚡\x20Enabled','population','customerGroupFile','format','keyEventCriteria','SQL\x20query:\x0a','\x27\x20with\x20ID:\x20','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','table','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x20\x20\x20','Available\x20attributes:','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','execute','ps:rt:jn:pause','varchar','\x20Opening\x20','personalizationServices','in\x20','\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','displayValidateResults','displayMasterInfo','using\x20the\x20default\x20path:\x20','unref','\x20\x201.\x20Edit\x20','single','8QygYzg','\x20to\x20push\x20the\x20configuration','\x27\x20for\x20service\x20\x27','✔\x20Updated\x20personalization\x20service\x20\x27','\x20--enriched','identifier:\x20','RT\x202.0\x20Validate:','patchPersonalization','/\x20and\x20','\x0aChanges\x20to\x20\x27','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','filter','tdx\x20ps\x20preview\x20','columns','createdAt','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','repeat','personalization','stageCount','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Site:\x20','ps:pz:service:token:create','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','workflowId','Personalization\x20service\x20description','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','events','preview','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','resolveParentId','/app/workflows/','\x20(paused)','Deleting\x20personalization\x20\x27','string','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Output\x20file:\x20','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','552336dHFNmv','Attempt:','listJourneys','payload:','push','json','Master\x20Table','number','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','indexOf','no\x20tokens\x20configured','schemaError','(id:\x20','\x20--behavior\x20\x22','folder-segment','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','keyEventId:','allowedIps','behavior','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','segment:parent:pull','audienceId','utf-8','Fetching\x20SQL\x20for\x20\x27','scheduleOption','\x22\x20}','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','dirname','web','.customers)','listParents','\x20\x202.\x20Run\x20','Error:\x20Personalization\x20ID\x20is\x20required','Validating\x20RT\x20configuration...','✔\x20Found\x20','ps:pz:patch','Options:\x0a','Available\x20behaviors:','Attribute:','create','verbose','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\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','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','open','run','\x20\x20Tables:\x201\x20customers\x20+\x20','Apply\x20changes\x20to\x20\x27','parent_id','endsWith','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','last_page_viewed','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','output','10dXZyxK','ignore','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','tokens','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','\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','\x20\x20Database:\x20','FINISHED','customers','Error:\x20File\x20not\x20found:\x20','✔\x20Renamed\x20directory\x20to\x20','✔\x20No\x20changes\x20-\x20\x27','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','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','To\x20view\x20sample\x20data:','red','folderId','parent_segment','error','any','valid','No\x20RT-enabled\x20parent\x20segments\x20found','realtime','personalization_services','Analyzing\x20changes...','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','match','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Show\x20parent\x20segment\x20details','\x20\x20Note:\x20','parentFolder','sampleData','toLocaleString','platform','✔\x20Deleted\x20personalization\x20service\x20\x27','segment:parent:show','\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}','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','\x27\x20(id:\x20','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Error:\x20Token\x20ID\x20is\x20required','Error:\x20--behavior\x20requires\x20a\x20name\x0a','audienceId:','ps:rt:list','state','totalEvents','ps:pz:create','status:\x20','\x0a⚠️\x20\x20Migrating:\x20','SELECT\x20*\x20FROM\x20','entryCriteria:','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','Errors:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','Customers:','session','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','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','workflowAttemptId','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Listing\x20RT\x20journeys\x20for\x20\x27','stats','green','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','yes','segment:parent:preview','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','Deleting\x20personalization\x20service\x20\x27','trim','matchedCount','/{name}.yml\x0a','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Updated','\x27\x20and\x20run\x20workflow?','site','public:','Audience\x20ID:','public','✔\x20Found\x20personalization\x20\x27','\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'];a31_0x3062=function(){return _0x10e10d;};return a31_0x3062();}import a31_0x34b79e 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='parent_segments',LEGACY_PARENT_SEGMENT_DIR=a31_0x14f6c9(0x154);function openBrowser(_0x578b33){const _0x2c4b44=a31_0x14f6c9,_0x113fb0=process[_0x2c4b44(0x164)],_0x438d72=_0x113fb0===_0x2c4b44(0x1da)?_0x2c4b44(0x358):_0x113fb0==='win32'?_0x2c4b44(0x2a9):'xdg-open';spawn(_0x438d72,[_0x578b33],{'detached':!![],'stdio':_0x2c4b44(0x143)})[_0x2c4b44(0x303)]();}function migrateLegacyDirectory(){const _0x54409a=a31_0x14f6c9;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x4784ab=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x4784ab[_0x54409a(0x1e9)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x54409a(0x155)](a31_0x34b79e['yellow']('\x0a⚠️\x20\x20Both\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x54409a(0x30e)+PARENT_SEGMENT_DIR+_0x54409a(0x265))),console['error'](a31_0x34b79e[_0x54409a(0x2de)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x54409a(0x2ba))),![];console[_0x54409a(0x155)](a31_0x34b79e[_0x54409a(0x26d)](_0x54409a(0x173)+LEGACY_PARENT_SEGMENT_DIR+_0x54409a(0x282)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x54409a(0x155)](a31_0x34b79e[_0x54409a(0x181)](_0x54409a(0x14c)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x2f6c93){const _0x5554c8=_0x2f6c93 instanceof Error?_0x2f6c93[_0x54409a(0x2b5)]:String(_0x2f6c93);return console[_0x54409a(0x155)](a31_0x34b79e[_0x54409a(0x152)]('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x5554c8+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x14f6c9(0x359)](_0x87986d){const _0x40276f=a31_0x14f6c9;return migrateLegacyDirectory(),super[_0x40276f(0x359)](_0x87986d);}}function resolveYamlFile(_0x135bc7){const _0xed8f48=a31_0x14f6c9;if(_0x135bc7[_0xed8f48(0x35d)](_0xed8f48(0x2a4))||_0x135bc7[_0xed8f48(0x35d)]('.yaml'))return _0x135bc7;return a31_0x5b26f0[_0xed8f48(0x2bf)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x135bc7)+'.yml');}function formatProgressMessage(_0x8cda5c){const _0x43d5e4=a31_0x14f6c9,_0x46a934=_0x8cda5c[_0x43d5e4(0x15d)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x46a934){const [,_0x42046c,_0x37e1b7,_0x5c0960='']=_0x46a934;return a31_0x34b79e['dim'](_0x42046c+':')+'\x20'+_0x37e1b7+a31_0x34b79e[_0x43d5e4(0x2de)](_0x5c0960);}return a31_0x34b79e['dim'](_0x8cda5c);}function showFileNotFoundError(_0x2730c2,_0x3d9151){const _0x2b2742=a31_0x14f6c9;console[_0x2b2742(0x155)](a31_0x34b79e[_0x2b2742(0x152)](_0x2b2742(0x14b)+_0x2730c2+'\x0a')),console[_0x2b2742(0x155)](a31_0x34b79e[_0x2b2742(0x29b)](_0x2b2742(0x1c9)+_0x3d9151+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x22181c){const _0x3e639c=a31_0x14f6c9;if(!_0x22181c[_0x3e639c(0x159)])return;const _0x3b7c7d=_0x22181c['realtime'],_0x5637cc=_0x3b7c7d[_0x3e639c(0x19f)]?a31_0x34b79e['green'](_0x3e639c(0x2ec)):a31_0x34b79e[_0x3e639c(0x26d)](_0x3e639c(0x28c));console[_0x3e639c(0x155)]('\x0a'+a31_0x34b79e[_0x3e639c(0x2de)]('RT\x202.0:')+'\x20'+_0x5637cc);if(_0x3b7c7d[_0x3e639c(0x321)]&&_0x3b7c7d[_0x3e639c(0x321)]['length']>0x0){console[_0x3e639c(0x155)]('\x20\x20'+a31_0x34b79e[_0x3e639c(0x2de)](_0x3e639c(0x2e9))+'\x20'+_0x3b7c7d[_0x3e639c(0x321)][_0x3e639c(0x1c4)]+'\x20configured');for(const _0x3453aa of _0x3b7c7d[_0x3e639c(0x321)]){const _0x340af2=_0x3453aa[_0x3e639c(0x1b4)]===![]?a31_0x34b79e[_0x3e639c(0x152)]('✘'):a31_0x34b79e['green']('✔');console[_0x3e639c(0x155)](_0x3e639c(0x1fb)+_0x340af2+'\x20'+_0x3453aa[_0x3e639c(0x24e)]),_0x3453aa[_0x3e639c(0x2bc)]&&console[_0x3e639c(0x155)](_0x3e639c(0x1fe)+a31_0x34b79e[_0x3e639c(0x152)](_0x3453aa[_0x3e639c(0x2bc)]));}}if(_0x3b7c7d[_0x3e639c(0x19a)]&&_0x3b7c7d['attributes'][_0x3e639c(0x1c4)]>0x0){console[_0x3e639c(0x155)]('\x20\x20'+a31_0x34b79e['dim'](_0x3e639c(0x23d))+'\x20'+_0x3b7c7d[_0x3e639c(0x19a)][_0x3e639c(0x1c4)]+_0x3e639c(0x1a3));for(const _0x43e198 of _0x3b7c7d[_0x3e639c(0x19a)]){const _0x31a3a4=_0x43e198[_0x3e639c(0x157)]?a31_0x34b79e[_0x3e639c(0x181)]('✔'):a31_0x34b79e[_0x3e639c(0x152)]('✘');console[_0x3e639c(0x155)]('\x20\x20\x20\x20'+_0x31a3a4+'\x20'+_0x43e198['name']+'\x20'+a31_0x34b79e[_0x3e639c(0x2de)]('('+_0x43e198[_0x3e639c(0x277)]+')'));}}if(_0x3b7c7d[_0x3e639c(0x1e1)]){const _0x1eeef3=_0x3b7c7d[_0x3e639c(0x1e1)]['stitchingKeys']?.[_0x3e639c(0x1c4)]?_0x3e639c(0x222)+_0x3b7c7d[_0x3e639c(0x1e1)]['stitchingKeys']['join'](',\x20')+']':'';console[_0x3e639c(0x155)]('\x20\x20'+a31_0x34b79e[_0x3e639c(0x2de)](_0x3e639c(0x245))+'\x20'+_0x3b7c7d[_0x3e639c(0x1e1)][_0x3e639c(0x1d6)]+_0x1eeef3);}if(_0x3b7c7d[_0x3e639c(0x2fd)]&&_0x3b7c7d['personalizationServices'][_0x3e639c(0x1c4)]>0x0){console['error']('\x20\x20'+a31_0x34b79e['dim'](_0x3e639c(0x1bb))+'\x20'+_0x3b7c7d[_0x3e639c(0x2fd)][_0x3e639c(0x1c4)]+'\x20service'+(_0x3b7c7d[_0x3e639c(0x2fd)]['length']!==0x1?'s':''));for(const _0xf200b9 of _0x3b7c7d[_0x3e639c(0x2fd)]){console[_0x3e639c(0x155)](_0x3e639c(0x23c)+_0xf200b9[_0x3e639c(0x24e)]);}}}function showParentSegmentNotSetError(_0xd21ef9){const _0x42e2bd=a31_0x14f6c9;console[_0x42e2bd(0x155)](a31_0x34b79e[_0x42e2bd(0x26d)](_0x42e2bd(0x33b))),console[_0x42e2bd(0x155)](_0xd21ef9);}export class ParentSegmentListCommand extends BaseCommand{['name']=a31_0x14f6c9(0x24a);['description']='List\x20parent\x20segments';async[a31_0x14f6c9(0x2f9)](_0x5817b8){const _0x4c3ae2=a31_0x14f6c9,{options:_0x1dee0e,args:_0x464ab6,tdx:_0x589998}=_0x5817b8,_0x8100ac=_0x464ab6[0x0];_0x1dee0e['verbose']&&(console['error']('Site:\x20'+_0x1dee0e['site']),_0x8100ac&&console['error']('Pattern:\x20'+_0x8100ac));const _0x296212=await withSpinner(_0x8100ac?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x8100ac+'\x27...':'Listing\x20parent\x20segments...',()=>_0x589998[_0x4c3ae2(0x1d7)][_0x4c3ae2(0x34a)](),{'verbose':_0x1dee0e['verbose']});let _0x331929=_0x296212[_0x4c3ae2(0x1be)];if(_0x8100ac){const _0x321680=_0x8100ac[_0x4c3ae2(0x2c5)](/[.+^${}()|[\]\\]/g,_0x4c3ae2(0x2e6))[_0x4c3ae2(0x2c5)](/\*/g,'.*')[_0x4c3ae2(0x2c5)](/\?/g,'.'),_0x181ef4=new RegExp('^'+_0x321680+'$','i');_0x331929=_0x331929[_0x4c3ae2(0x312)](_0x5a43b8=>_0x181ef4[_0x4c3ae2(0x1b1)](_0x5a43b8['attributes'][_0x4c3ae2(0x24e)]));}_0x331929[_0x4c3ae2(0x2b1)]((_0x875a46,_0xe48287)=>_0x875a46[_0x4c3ae2(0x19a)][_0x4c3ae2(0x24e)][_0x4c3ae2(0x241)](_0xe48287[_0x4c3ae2(0x19a)]['name'])),console[_0x4c3ae2(0x155)](_0x4c3ae2(0x34e)+_0x331929['length']+_0x4c3ae2(0x1d1)+(_0x331929[_0x4c3ae2(0x1c4)]!==0x1?'s':''));const _0x46fac6=_0x38a730=>{const _0xc474f2=_0x4c3ae2;return getConsoleNextUrl(_0x1dee0e[_0xc474f2(0x18e)],_0xc474f2(0x298)+_0x38a730);};if(_0x1dee0e[_0x4c3ae2(0x2ef)]===_0x4c3ae2(0x331)||_0x1dee0e[_0x4c3ae2(0x2ef)]===_0x4c3ae2(0x1a6)){const _0x5cf017=_0x331929[_0x4c3ae2(0x20f)](_0x464939=>({..._0x464939,'url':_0x46fac6(_0x464939['id'])}));await handleSDKOutput(_0x5cf017,_0x1dee0e);}else{if(_0x331929[_0x4c3ae2(0x1c4)]===0x0)_0x8100ac?console[_0x4c3ae2(0x20e)](_0x4c3ae2(0x1f8)+_0x8100ac):console['log']('No\x20parent\x20segments\x20found');else for(const _0x50dabc of _0x331929){const _0x4be033=_0x50dabc[_0x4c3ae2(0x19a)]['population']?a31_0x34b79e[_0x4c3ae2(0x2de)]('\x20('+formatRows(_0x50dabc['attributes'][_0x4c3ae2(0x2ed)])+')'):'',_0x33baaa=hyperlink(_0x50dabc[_0x4c3ae2(0x19a)][_0x4c3ae2(0x24e)],_0x46fac6(_0x50dabc['id']));console['log'](_0x4c3ae2(0x225)+_0x33baaa+_0x4be033);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x22b);[a31_0x14f6c9(0x1b9)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a31_0x14f6c9(0x2f9)](_0x10f95b){const _0x308b7e=a31_0x14f6c9,{options:_0x347ad2,args:_0x41bdd3,tdx:_0x2bcd8d}=_0x10f95b;console['error'](_0x308b7e(0x2c2)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x308b7e(0x21e));const _0x42740d=_0x347ad2;if(_0x41bdd3[_0x308b7e(0x1c4)]===0x0)return console[_0x308b7e(0x155)](a31_0x34b79e[_0x308b7e(0x152)](_0x308b7e(0x21b))),console[_0x308b7e(0x155)](_0x308b7e(0x2b4)),0x1;const _0x192283=_0x41bdd3[0x0];if(!_0x42740d['database']||!_0x42740d[_0x308b7e(0x2f4)])return console[_0x308b7e(0x155)](_0x308b7e(0x28f)),console[_0x308b7e(0x155)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x42740d[_0x308b7e(0x354)]&&(console[_0x308b7e(0x155)]('Site:\x20'+_0x42740d[_0x308b7e(0x18e)]),console['error']('Name:\x20'+_0x192283),console[_0x308b7e(0x155)](_0x308b7e(0x267)+_0x42740d['database']),console[_0x308b7e(0x155)]('Table:\x20'+_0x42740d[_0x308b7e(0x2f4)]));const _0x221a1a=await loadJSONFromOptions(_0x42740d[_0x308b7e(0x19a)],_0x42740d[_0x308b7e(0x2af)]),_0x4eb67c=await loadJSONFromOptions(_0x42740d[_0x308b7e(0x240)],_0x42740d[_0x308b7e(0x2c9)]),_0x1e9503=await loadJSONFromOptions(_0x42740d[_0x308b7e(0x2bb)],_0x42740d[_0x308b7e(0x2ee)]),_0x1053ca={'name':_0x192283,'description':_0x42740d[_0x308b7e(0x1b9)],'scheduleType':_0x42740d[_0x308b7e(0x1ba)],'scheduleOption':_0x42740d[_0x308b7e(0x344)],'timezone':_0x42740d['timezone'],'master':{'parentDatabaseName':_0x42740d[_0x308b7e(0x279)],'parentTableName':_0x42740d[_0x308b7e(0x2f4)]},'attributes':_0x221a1a,'behaviors':_0x4eb67c,'customerGroup':_0x1e9503},_0x2874aa=await withSpinner(_0x308b7e(0x28b)+_0x192283+_0x308b7e(0x1f4),()=>_0x2bcd8d[_0x308b7e(0x1d7)][_0x308b7e(0x207)](_0x1053ca),{'verbose':_0x347ad2[_0x308b7e(0x354)]}),_0x2606b3=_0x2874aa[_0x308b7e(0x1be)];return console[_0x308b7e(0x155)](_0x308b7e(0x1ed)+_0x2606b3[_0x308b7e(0x24e)]+'\x27\x20with\x20ID:\x20'+_0x2606b3['id']),await handleSDKOutput([_0x2606b3],_0x347ad2),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a31_0x14f6c9(0x248);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x21f);async[a31_0x14f6c9(0x2f9)](_0x2a3add){const _0x27b10d=a31_0x14f6c9,{options:_0xbb777a,args:_0x50900b,tdx:_0x3f23b6}=_0x2a3add;console[_0x27b10d(0x155)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x27b10d(0x183)+_0x27b10d(0x21e));const _0x11397b=_0xbb777a;if(_0x50900b['length']===0x0)return console[_0x27b10d(0x155)](a31_0x34b79e[_0x27b10d(0x152)](_0x27b10d(0x21b))),console[_0x27b10d(0x155)](_0x27b10d(0x16a)),0x1;const _0x335bbc=_0x50900b[0x0];_0x11397b[_0x27b10d(0x354)]&&(console[_0x27b10d(0x155)](_0x27b10d(0x31b)+_0x11397b[_0x27b10d(0x18e)]),console[_0x27b10d(0x155)](_0x27b10d(0x226)+_0x335bbc));const _0x3347d2=await withSpinner(_0x27b10d(0x261)+_0x335bbc+_0x27b10d(0x1f4),()=>_0x3f23b6[_0x27b10d(0x1d7)]['getParentFull'](_0x335bbc),{'verbose':_0x11397b[_0x27b10d(0x354)]}),_0x5ad248=_0x3347d2[_0x27b10d(0x1be)],_0x2423d8=await loadJSONFromOptions(_0x11397b[_0x27b10d(0x2b8)],_0x11397b[_0x27b10d(0x1df)]),_0x39820d=await loadJSONFromOptions(_0x11397b[_0x27b10d(0x1a8)],_0x11397b['addBehaviorsFile']),_0x5d0bd7={'name':_0x5ad248['name'],'description':_0x11397b[_0x27b10d(0x1b9)]!==undefined?_0x11397b[_0x27b10d(0x1b9)]:_0x5ad248['description'],'scheduleType':_0x11397b[_0x27b10d(0x1ba)]!==undefined?_0x11397b['scheduleType']:_0x5ad248[_0x27b10d(0x1ba)],'scheduleOption':_0x11397b['scheduleOption']!==undefined?_0x11397b[_0x27b10d(0x344)]:_0x5ad248[_0x27b10d(0x344)],'timezone':_0x11397b[_0x27b10d(0x221)]!==undefined?_0x11397b[_0x27b10d(0x221)]:_0x5ad248[_0x27b10d(0x221)],'master':_0x5ad248[_0x27b10d(0x27c)],'attributes':_0x2423d8?[..._0x5ad248['attributes']||[],..._0x2423d8]:_0x5ad248['attributes'],'behaviors':_0x39820d?[..._0x5ad248['behaviors']||[],..._0x39820d]:_0x5ad248[_0x27b10d(0x240)],'customerGroup':_0x5ad248[_0x27b10d(0x2bb)]},_0x2d2cfa=await withSpinner(_0x27b10d(0x2ce)+_0x335bbc+_0x27b10d(0x1f4),()=>_0x3f23b6[_0x27b10d(0x1d7)][_0x27b10d(0x2d1)](_0x335bbc,_0x5d0bd7),{'verbose':_0x11397b[_0x27b10d(0x354)]}),_0x58f8c8=_0x2d2cfa['data'];return console[_0x27b10d(0x155)](_0x27b10d(0x26e)+_0x58f8c8['name']+'\x27'),await handleSDKOutput([_0x58f8c8],_0x11397b),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x14f6c9(0x340);['description']=a31_0x14f6c9(0x238);async[a31_0x14f6c9(0x2f9)](_0x5ef4d7){const _0x58cb67=a31_0x14f6c9,{options:_0x4a784e,args:_0x151672,tdx:_0x137bb6}=_0x5ef4d7,_0x32a3a9=_0x4a784e,_0x42ada6=_0x151672[0x0]||_0x4a784e[_0x58cb67(0x24b)];if(!_0x42ada6)return showParentSegmentNotSetError(_0x58cb67(0x2e4)+_0x58cb67(0x1ce)),0x1;if(_0x32a3a9[_0x58cb67(0x27f)]&&_0x32a3a9[_0x58cb67(0x141)])return console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x152)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x58cb67(0x155)](a31_0x34b79e['dim']('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console[_0x58cb67(0x155)](a31_0x34b79e['dim'](_0x58cb67(0x302)+PARENT_SEGMENT_DIR+_0x58cb67(0x18a))),console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x29b)]('Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u')),0x1;const _0xbe3563=_0x32a3a9['output']||a31_0x5b26f0[_0x58cb67(0x2bf)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x42ada6)+'.yml');_0x32a3a9[_0x58cb67(0x354)]&&(console['error']('Site:\x20'+_0x32a3a9[_0x58cb67(0x18e)]),console[_0x58cb67(0x155)](_0x58cb67(0x226)+_0x42ada6),console[_0x58cb67(0x155)](_0x58cb67(0x32a)+_0xbe3563));const _0xb2ec89=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x42ada6+_0x58cb67(0x1f4),()=>_0x137bb6[_0x58cb67(0x1d7)][_0x58cb67(0x1ad)](_0x42ada6),{'verbose':_0x32a3a9['verbose']}),_0x416b62=_0xb2ec89['data'];if(existsSync(_0xbe3563)){const _0x5313ae=readFileSync(_0xbe3563,_0x58cb67(0x342)),_0xa91b04=generateDiff(_0x5313ae,_0x416b62);if(!hasChanges(_0xa91b04))console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x181)]('✔')+_0x58cb67(0x1c3)+a31_0x34b79e[_0x58cb67(0x29b)](_0xbe3563)+_0x58cb67(0x1b8));else{console[_0x58cb67(0x155)](_0x58cb67(0x30f)+_0xbe3563+'\x27:'),console[_0x58cb67(0x155)]('─'['repeat'](0x3c)),console[_0x58cb67(0x155)](formatDiffWithColors(_0xa91b04)),console[_0x58cb67(0x155)]('─'[_0x58cb67(0x317)](0x3c));if(!_0x32a3a9[_0x58cb67(0x184)]){if(!isInteractive())return console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x152)]('\x0aError:'),_0x58cb67(0x1f1)),console['error'](a31_0x34b79e['dim'](_0x58cb67(0x195))),0x1;const _0x12c8c5=await confirmKey(_0x58cb67(0x1f3)+_0xbe3563+'\x27?');if(!_0x12c8c5)return console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x26d)](_0x58cb67(0x1a0))),0x1;}writeFileSync(_0xbe3563,_0x416b62,_0x58cb67(0x342)),console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x181)]('✔')+_0x58cb67(0x2da)+a31_0x34b79e['cyan'](_0xbe3563));}}else{const _0xd9e3e1=a31_0x5b26f0[_0x58cb67(0x347)](_0xbe3563);!existsSync(_0xd9e3e1)&&mkdirSync(_0xd9e3e1,{'recursive':!![]}),writeFileSync(_0xbe3563,_0x416b62,_0x58cb67(0x342)),console[_0x58cb67(0x155)](a31_0x34b79e[_0x58cb67(0x181)]('✔')+_0x58cb67(0x2da)+a31_0x34b79e[_0x58cb67(0x29b)](_0xbe3563));}return saveSessionContext({'parent_segment':_0x42ada6},_0x32a3a9[_0x58cb67(0x17a)]),console['error'](a31_0x34b79e['green']('✔')+'\x20Context\x20set:\x20'+a31_0x34b79e['dim']('parent_segment')+_0x58cb67(0x2df)+a31_0x34b79e['cyan'](_0x42ada6)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x1e5);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x33f);async[a31_0x14f6c9(0x2f9)](_0x86df39){const _0x8f195b=a31_0x14f6c9,{options:_0x594216,args:_0x438e69,tdx:_0x6f006e}=_0x86df39,_0x1bd273=_0x594216,_0x3299d8=_0x438e69[0x0]||_0x594216[_0x8f195b(0x24b)];if(!_0x3299d8)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'+_0x8f195b(0x20d)),0x1;const _0x287cd1=resolveYamlFile(_0x3299d8);if(!existsSync(_0x287cd1))return showFileNotFoundError(_0x287cd1,_0x3299d8),0x1;_0x1bd273[_0x8f195b(0x354)]&&(console['error']('Site:\x20'+_0x1bd273['site']),console[_0x8f195b(0x155)]('YAML\x20file:\x20'+_0x287cd1));let _0x167180;try{_0x167180=readFileSync(_0x287cd1,_0x8f195b(0x342));}catch(_0x3704b5){const _0x29efad=_0x3704b5 instanceof Error?_0x3704b5[_0x8f195b(0x2b5)]:String(_0x3704b5);return console[_0x8f195b(0x155)](_0x8f195b(0x1b6)+_0x29efad),0x1;}const _0xa8e12d=await withSpinner('Analyzing\x20changes...',()=>_0x6f006e[_0x8f195b(0x1d7)]['pushParentYaml'](_0x167180),{'verbose':_0x1bd273['verbose']}),_0x3ad9ca=_0xa8e12d[_0x8f195b(0x1be)],{isNew:_0x3dd3d0,name:_0x16aad5,hasChanges:_0x31db77,diffFormatted:_0x1c1440}=_0x3ad9ca;if(!_0x31db77)return console[_0x8f195b(0x155)](_0x8f195b(0x14d)+_0x16aad5+_0x8f195b(0x237)),0x0;_0x3dd3d0?console['error'](_0x8f195b(0x1e4)+_0x16aad5+'\x27:'):console[_0x8f195b(0x155)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x16aad5+'\x27:');console[_0x8f195b(0x155)]('─'[_0x8f195b(0x317)](0x3c)),console[_0x8f195b(0x155)](_0x1c1440),console[_0x8f195b(0x155)]('─'[_0x8f195b(0x317)](0x3c));const _0x247e55=_0x3dd3d0?_0x8f195b(0x293)+_0x16aad5+'\x27?':_0x8f195b(0x35b)+_0x16aad5+'\x27?';if(!_0x1bd273[_0x8f195b(0x184)]){if(!isInteractive())return console[_0x8f195b(0x155)](a31_0x34b79e['red'](_0x8f195b(0x20a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x8f195b(0x155)](a31_0x34b79e[_0x8f195b(0x2de)](_0x8f195b(0x195))),0x1;const _0x7e7d30=await confirmKey(_0x247e55);if(!_0x7e7d30)return console[_0x8f195b(0x155)](a31_0x34b79e['yellow']('Aborted.')),0x1;}const _0x46adeb=_0x3dd3d0?'Creating':_0x8f195b(0x1c5),_0x518b50=await withSpinner(_0x46adeb+_0x8f195b(0x212)+_0x16aad5+_0x8f195b(0x1f4),()=>_0x3ad9ca['apply'](),{'verbose':_0x1bd273['verbose']}),_0x4ecd63=_0x518b50['data'],_0x408a8f=getConsoleNextUrl(_0x1bd273[_0x8f195b(0x18e)],_0x8f195b(0x298)+_0x4ecd63['id']),_0x211570=_0x3dd3d0?_0x8f195b(0x1ab):_0x8f195b(0x18c);return console['error']('✔\x20'+_0x211570+'\x20parent\x20segment\x20\x27'+_0x4ecd63[_0x8f195b(0x24e)]+'\x27'),console[_0x8f195b(0x155)]('\x20\x20'+_0x408a8f),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x269);['description']=a31_0x14f6c9(0x2cc);async[a31_0x14f6c9(0x2f9)](_0x43059f){const _0x3f9da7=a31_0x14f6c9,{options:_0x29d9a0,args:_0x420399,tdx:_0x233b4c}=_0x43059f,_0x41eb8c=_0x29d9a0,_0x189f9c=_0x420399[0x0]||_0x29d9a0['parentSegment'];if(!_0x189f9c)return showParentSegmentNotSetError(_0x3f9da7(0x2f8)+_0x3f9da7(0x21d)+_0x3f9da7(0x350)+_0x3f9da7(0x260)+_0x3f9da7(0x256)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x55bc75=resolveYamlFile(_0x189f9c);if(!existsSync(_0x55bc75))return showFileNotFoundError(_0x55bc75,_0x189f9c),0x1;_0x41eb8c[_0x3f9da7(0x354)]&&(console[_0x3f9da7(0x155)](_0x3f9da7(0x31b)+_0x41eb8c[_0x3f9da7(0x18e)]),console[_0x3f9da7(0x155)](_0x3f9da7(0x29f)+_0x55bc75));let _0xc17802;try{_0xc17802=readFileSync(_0x55bc75,_0x3f9da7(0x342));}catch(_0x1fbbcd){const _0x433746=_0x1fbbcd instanceof Error?_0x1fbbcd[_0x3f9da7(0x2b5)]:String(_0x1fbbcd);return console[_0x3f9da7(0x155)](_0x3f9da7(0x1b6)+_0x433746),0x1;}const _0x4b46a4=createCommandSpinner(a31_0x34b79e[_0x3f9da7(0x2de)](_0x3f9da7(0x1f7)),{'verbose':_0x41eb8c[_0x3f9da7(0x354)]});_0x4b46a4[_0x3f9da7(0x2a9)]();const _0x556d3a={'onProgress':_0x4f9796=>{const _0x359252=_0x3f9da7;_0x4b46a4[_0x359252(0x2c7)]=formatProgressMessage(_0x4f9796);}};if(_0x41eb8c['master'])_0x556d3a[_0x3f9da7(0x27c)]=!![];if(_0x41eb8c['enriched'])_0x556d3a[_0x3f9da7(0x253)]=!![];_0x41eb8c[_0x3f9da7(0x1ec)]&&(_0x556d3a[_0x3f9da7(0x1ec)]=_0x41eb8c[_0x3f9da7(0x1ec)]);_0x41eb8c['behavior']&&(_0x556d3a[_0x3f9da7(0x33e)]=_0x41eb8c[_0x3f9da7(0x33e)]);if(_0x41eb8c[_0x3f9da7(0x219)])_0x556d3a[_0x3f9da7(0x219)]=_0x41eb8c[_0x3f9da7(0x219)];let _0x24e45e;try{_0x24e45e=await _0x233b4c[_0x3f9da7(0x1d7)][_0x3f9da7(0x262)](_0xc17802,_0x556d3a),_0x4b46a4[_0x3f9da7(0x1ac)]();}catch(_0x4a4930){_0x4b46a4[_0x3f9da7(0x1ac)]();throw _0x4a4930;}const _0x5d5378=_0x41eb8c[_0x3f9da7(0x219)]||_0x3f9da7(0x285);return this['displayValidateResults'](_0x24e45e,_0x556d3a,_0x55bc75,_0x5d5378),_0x24e45e[_0x3f9da7(0x19d)]?0x0:0x1;}[a31_0x14f6c9(0x300)](_0x3fc8e7,_0x463d78,_0x3a0df2,_0x3f9dcc){const _0x131abd=a31_0x14f6c9;console[_0x131abd(0x155)]('\x0a'+a31_0x34b79e[_0x131abd(0x2be)](_0x131abd(0x209))+'\x20'+_0x3fc8e7[_0x131abd(0x24e)]),console['error']('═'['repeat'](0x3c)),this[_0x131abd(0x301)](_0x3fc8e7);if(typeof _0x463d78[_0x131abd(0x1ec)]===_0x131abd(0x328)){this[_0x131abd(0x224)](_0x3fc8e7),this[_0x131abd(0x2a3)](_0x3fc8e7),this[_0x131abd(0x1f6)](_0x3a0df2,_0x3f9dcc,'attribute',_0x463d78[_0x131abd(0x1ec)]);return;}if(_0x463d78['attribute']===!![]){this[_0x131abd(0x224)](_0x3fc8e7),this[_0x131abd(0x2a3)](_0x3fc8e7),this[_0x131abd(0x1f6)](_0x3a0df2,_0x3f9dcc,'attributes');return;}if(typeof _0x463d78[_0x131abd(0x33e)]==='string'){this[_0x131abd(0x29d)](_0x3fc8e7,_0x3f9dcc),this['displaySummary'](_0x3fc8e7),this[_0x131abd(0x1f6)](_0x3a0df2,_0x3f9dcc,_0x131abd(0x33e),_0x463d78[_0x131abd(0x33e)]);return;}if(_0x463d78[_0x131abd(0x33e)]===!![]){this[_0x131abd(0x29d)](_0x3fc8e7,_0x3f9dcc),this['displaySummary'](_0x3fc8e7),this[_0x131abd(0x1f6)](_0x3a0df2,_0x3f9dcc,_0x131abd(0x240));return;}this['displayAttributesStats'](_0x3fc8e7),this[_0x131abd(0x29d)](_0x3fc8e7,_0x3f9dcc),this[_0x131abd(0x2d3)](_0x3fc8e7),this[_0x131abd(0x2a3)](_0x3fc8e7),this[_0x131abd(0x1f6)](_0x3a0df2,_0x3f9dcc,_0x131abd(0x28d));}[a31_0x14f6c9(0x2d3)](_0x4b5f24){displayRealtimeValidation(_0x4b5f24);}['displayPreviewHints'](_0x51433a,_0x4a1aae,_0x2c341e,_0x22a9f9){const _0x10e6e3=a31_0x14f6c9;console[_0x10e6e3(0x155)]('\x0a'+a31_0x34b79e[_0x10e6e3(0x2de)](_0x10e6e3(0x151)));const _0x3f64e8=_0x4a1aae!==_0x10e6e3(0x285)?_0x10e6e3(0x2b7)+_0x4a1aae:'';if(_0x2c341e===_0x10e6e3(0x1ec)&&_0x22a9f9)console[_0x10e6e3(0x155)]('\x20\x20'+a31_0x34b79e[_0x10e6e3(0x2de)](_0x10e6e3(0x313)+_0x51433a+'\x20--attribute\x20\x22'+_0x22a9f9+'\x22'+_0x3f64e8));else{if(_0x2c341e===_0x10e6e3(0x33e)&&_0x22a9f9)console[_0x10e6e3(0x155)]('\x20\x20'+a31_0x34b79e['dim'](_0x10e6e3(0x313)+_0x51433a+'\x20--behavior\x20\x22'+_0x22a9f9+'\x22'+_0x3f64e8));else(_0x2c341e===_0x10e6e3(0x19a)||_0x2c341e===_0x10e6e3(0x28d))&&console[_0x10e6e3(0x155)]('\x20\x20'+a31_0x34b79e['dim']('tdx\x20ps\x20preview\x20'+_0x51433a+_0x10e6e3(0x286)+_0x3f64e8));}(_0x2c341e==='behaviors'||_0x2c341e===_0x10e6e3(0x28d))&&console['error']('\x20\x20'+a31_0x34b79e[_0x10e6e3(0x2de)](_0x10e6e3(0x313)+_0x51433a+_0x10e6e3(0x281)+_0x3f64e8)),_0x2c341e==='all'&&console['error']('\x20\x20'+a31_0x34b79e[_0x10e6e3(0x2de)](_0x10e6e3(0x313)+_0x51433a+_0x10e6e3(0x30a)+_0x3f64e8));}[a31_0x14f6c9(0x301)](_0x418006){const _0x148199=a31_0x14f6c9,{master:_0x1f39ba}=_0x418006,_0x40070d=_0x1f39ba['schemaValid']?a31_0x34b79e[_0x148199(0x181)]('✔'):a31_0x34b79e[_0x148199(0x152)]('✘');console['error']('\x0a'+a31_0x34b79e[_0x148199(0x2de)](_0x148199(0x332))),console[_0x148199(0x155)](_0x40070d+'\x20'+a31_0x34b79e[_0x148199(0x2be)](_0x1f39ba[_0x148199(0x279)]+'.'+_0x1f39ba[_0x148199(0x2f4)])),_0x1f39ba[_0x148199(0x1b5)]?_0x1f39ba[_0x148199(0x1cd)]!==undefined&&console[_0x148199(0x155)]('\x20\x20'+a31_0x34b79e['dim'](_0x148199(0x299))+'\x20'+a31_0x34b79e[_0x148199(0x29b)](formatRows(_0x1f39ba[_0x148199(0x1cd)]))):console[_0x148199(0x155)]('\x20\x20'+a31_0x34b79e['red'](_0x148199(0x20c))+'\x20'+_0x1f39ba[_0x148199(0x337)]);}[a31_0x14f6c9(0x224)](_0x243b39){const _0x3982d5=a31_0x14f6c9;if(_0x243b39['attributes']['length']===0x0)return;console['error']('\x0a'+a31_0x34b79e[_0x3982d5(0x2de)]('Attributes'));for(const _0x5e21e8 of _0x243b39[_0x3982d5(0x19a)]){const _0x5f58f9=_0x5e21e8[_0x3982d5(0x1b5)]?a31_0x34b79e[_0x3982d5(0x181)]('✔'):a31_0x34b79e[_0x3982d5(0x152)]('✘');let _0x24069c='';if(_0x5e21e8[_0x3982d5(0x1b5)]&&_0x5e21e8[_0x3982d5(0x189)]!==undefined&&_0x5e21e8[_0x3982d5(0x2e7)]!==undefined){const _0x1e9147=_0x5e21e8['coveragePercent']['toFixed'](0x1),_0x3da01c=_0x5e21e8['coveragePercent']>=0x50?a31_0x34b79e['green']:_0x5e21e8[_0x3982d5(0x2e7)]>=0x32?a31_0x34b79e[_0x3982d5(0x26d)]:a31_0x34b79e[_0x3982d5(0x152)];_0x24069c='\x20'+a31_0x34b79e[_0x3982d5(0x2de)](_0x3982d5(0x284))+'\x20'+_0x3da01c(_0x1e9147+'%')+'\x20('+formatRows(_0x5e21e8[_0x3982d5(0x189)])+_0x3982d5(0x1e2);}console['error'](_0x5f58f9+'\x20'+a31_0x34b79e[_0x3982d5(0x2be)](_0x5e21e8[_0x3982d5(0x24e)])+_0x24069c),console['error']('\x20\x20'+a31_0x34b79e[_0x3982d5(0x2de)](_0x3982d5(0x2ac))+'\x20'+a31_0x34b79e[_0x3982d5(0x2be)](_0x5e21e8[_0x3982d5(0x279)]+'.'+_0x5e21e8[_0x3982d5(0x2f4)]));const _0x514f51=_0x5e21e8[_0x3982d5(0x27a)]===_0x5e21e8[_0x3982d5(0x206)]?a31_0x34b79e[_0x3982d5(0x2de)](_0x3982d5(0x216))+'\x20'+_0x5e21e8[_0x3982d5(0x27a)]:a31_0x34b79e['dim'](_0x3982d5(0x2e8))+'\x20'+_0x5e21e8[_0x3982d5(0x27a)]+'\x20=\x20'+_0x5e21e8[_0x3982d5(0x206)];console[_0x3982d5(0x155)]('\x20\x20'+_0x514f51),console[_0x3982d5(0x155)]('\x20\x20'+a31_0x34b79e[_0x3982d5(0x2de)](_0x3982d5(0x287))),this[_0x3982d5(0x2cd)](_0x5e21e8[_0x3982d5(0x314)]),!_0x5e21e8[_0x3982d5(0x1b5)]&&console[_0x3982d5(0x155)]('\x20\x20'+a31_0x34b79e[_0x3982d5(0x152)](_0x3982d5(0x20c))+'\x20'+_0x5e21e8[_0x3982d5(0x337)]);}}[a31_0x14f6c9(0x29d)](_0x49855b,_0x1e533b){const _0xb02ae1=a31_0x14f6c9;if(_0x49855b[_0xb02ae1(0x240)][_0xb02ae1(0x1c4)]===0x0)return;console[_0xb02ae1(0x155)]('\x0a'+a31_0x34b79e[_0xb02ae1(0x2de)](_0xb02ae1(0x288))+'\x20'+a31_0x34b79e['dim']('('+_0x1e533b+')'));for(const _0xb38167 of _0x49855b[_0xb02ae1(0x240)]){const _0x4c67bf=_0xb38167[_0xb02ae1(0x1b5)]?a31_0x34b79e['green']('✔'):a31_0x34b79e[_0xb02ae1(0x152)]('✘');let _0x36ae79='';if(_0xb38167[_0xb02ae1(0x1b5)]&&_0xb38167['customersWithEvents']!==undefined&&_0xb38167[_0xb02ae1(0x170)]!==undefined){const _0x2b5a89=_0xb38167[_0xb02ae1(0x2eb)]?.[_0xb02ae1(0x1c8)](0x1)||'?',_0x4c6ad3=(_0xb38167[_0xb02ae1(0x2eb)]??0x0)>=0x32?a31_0x34b79e[_0xb02ae1(0x181)]:(_0xb38167[_0xb02ae1(0x2eb)]??0x0)>=0x14?a31_0x34b79e[_0xb02ae1(0x26d)]:a31_0x34b79e[_0xb02ae1(0x152)];_0x36ae79='\x20'+a31_0x34b79e['dim'](_0xb02ae1(0x179))+'\x20'+_0x4c6ad3(formatRows(_0xb38167[_0xb02ae1(0x24d)]))+'\x20('+_0x2b5a89+_0xb02ae1(0x270)+a31_0x34b79e[_0xb02ae1(0x2de)](_0xb02ae1(0x2e9))+'\x20'+a31_0x34b79e['cyan'](formatRows(_0xb38167[_0xb02ae1(0x170)]));}console[_0xb02ae1(0x155)](_0x4c67bf+'\x20'+a31_0x34b79e['bold'](_0xb38167[_0xb02ae1(0x24e)])+_0x36ae79),console[_0xb02ae1(0x155)]('\x20\x20'+a31_0x34b79e[_0xb02ae1(0x2de)](_0xb02ae1(0x2ac))+'\x20'+a31_0x34b79e[_0xb02ae1(0x2be)](_0xb38167[_0xb02ae1(0x279)]+'.'+_0xb38167[_0xb02ae1(0x2f4)]));const _0x1caeab=_0xb38167[_0xb02ae1(0x27a)]===_0xb38167[_0xb02ae1(0x206)]?a31_0x34b79e[_0xb02ae1(0x2de)](_0xb02ae1(0x216))+'\x20'+_0xb38167['joinKey']:a31_0x34b79e[_0xb02ae1(0x2de)](_0xb02ae1(0x2e8))+'\x20'+_0xb38167[_0xb02ae1(0x27a)]+_0xb02ae1(0x2df)+_0xb38167[_0xb02ae1(0x206)];console['error']('\x20\x20'+_0x1caeab),console['error']('\x20\x20'+a31_0x34b79e['dim'](_0xb02ae1(0x287))),this[_0xb02ae1(0x2cd)](_0xb38167['columns']),!_0xb38167[_0xb02ae1(0x1b5)]&&console[_0xb02ae1(0x155)]('\x20\x20'+a31_0x34b79e['red'](_0xb02ae1(0x20c))+'\x20'+_0xb38167[_0xb02ae1(0x337)]);}}[a31_0x14f6c9(0x2cd)](_0x4d0642){const _0x1b9b8f=a31_0x14f6c9;for(const _0x38bc5a of _0x4d0642){_0x38bc5a[_0x1b9b8f(0x250)]===_0x38bc5a[_0x1b9b8f(0x1db)]||_0x38bc5a['column']==='*'?console[_0x1b9b8f(0x155)]('\x20\x20\x20\x20-\x20'+_0x38bc5a['label']):console[_0x1b9b8f(0x155)](_0x1b9b8f(0x23c)+_0x38bc5a[_0x1b9b8f(0x250)]+'\x20'+a31_0x34b79e[_0x1b9b8f(0x2de)]('('+_0x38bc5a['column']+')'));}}['displaySummary'](_0x5bed5f){const _0x4388d5=a31_0x14f6c9;console[_0x4388d5(0x155)]('─'[_0x4388d5(0x317)](0x3c));if(_0x5bed5f['errors'][_0x4388d5(0x1c4)]>0x0){console[_0x4388d5(0x155)]('\x0a'+a31_0x34b79e[_0x4388d5(0x152)](_0x4388d5(0x177)));for(const _0x27cfc2 of _0x5bed5f['errors']){console['error']('\x20\x20'+a31_0x34b79e[_0x4388d5(0x152)]('•')+'\x20'+_0x27cfc2);}}_0x5bed5f['allValid']&&console['error']('\x0a'+a31_0x34b79e['green']('✔')+_0x4388d5(0x24f));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x185);[a31_0x14f6c9(0x1b9)]='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0x14f6c9(0x2f9)](_0x2cea6b){const _0xa5203f=a31_0x14f6c9,{options:_0xb7e892,args:_0xe8d9e4,tdx:_0x832af8}=_0x2cea6b,_0x24d0c1=_0xb7e892,_0x41ddf9=_0xe8d9e4[0x0]||_0xb7e892['parentSegment'];if(!_0x41ddf9)return showParentSegmentNotSetError(_0xa5203f(0x1b0)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0xa5203f(0x249)+_0xa5203f(0x1e0)+_0xa5203f(0x1cc)+_0xa5203f(0x1ee)+_0xa5203f(0x2f5)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x24d0c1[_0xa5203f(0x27c)]&&!_0x24d0c1[_0xa5203f(0x1ec)]&&!_0x24d0c1[_0xa5203f(0x33e)]&&!_0x24d0c1[_0xa5203f(0x253)])return console[_0xa5203f(0x155)](a31_0x34b79e[_0xa5203f(0x152)](_0xa5203f(0x263))),console[_0xa5203f(0x155)](_0xa5203f(0x13d)),console[_0xa5203f(0x155)]('Options:'),console['error']('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0xa5203f(0x155)](_0xa5203f(0x1e8)),console['error'](_0xa5203f(0x32b)),console['error'](_0xa5203f(0x236)),0x1;const _0x1b6028=resolveYamlFile(_0x41ddf9);if(!existsSync(_0x1b6028))return showFileNotFoundError(_0x1b6028,_0x41ddf9),0x1;_0x24d0c1[_0xa5203f(0x354)]&&(console[_0xa5203f(0x155)](_0xa5203f(0x31b)+_0x24d0c1[_0xa5203f(0x18e)]),console['error'](_0xa5203f(0x29f)+_0x1b6028));let _0x6ba5e0;try{_0x6ba5e0=readFileSync(_0x1b6028,'utf-8');}catch(_0x3a327b){const _0x32d61d=_0x3a327b instanceof Error?_0x3a327b[_0xa5203f(0x2b5)]:String(_0x3a327b);return console[_0xa5203f(0x155)](_0xa5203f(0x1b6)+_0x32d61d),0x1;}let _0x398d86;try{_0x398d86=parseDef(_0x6ba5e0);}catch(_0x25b8a4){const _0x3d148d=_0x25b8a4 instanceof Error?_0x25b8a4['message']:String(_0x25b8a4);return console[_0xa5203f(0x155)](a31_0x34b79e[_0xa5203f(0x152)](_0xa5203f(0x1ff)+_0x3d148d)),0x1;}if(_0x24d0c1[_0xa5203f(0x1ec)]===!![]||_0x24d0c1['attribute']===''){const _0xc3e4c0=_0x398d86['attributes']?.['map'](_0x2ee2f2=>_0x2ee2f2[_0xa5203f(0x24e)])||[];if(_0xc3e4c0[_0xa5203f(0x1c4)]===0x0)console[_0xa5203f(0x155)](a31_0x34b79e[_0xa5203f(0x152)](_0xa5203f(0x1fd)));else{console[_0xa5203f(0x155)](a31_0x34b79e[_0xa5203f(0x152)](_0xa5203f(0x2d2))),console[_0xa5203f(0x155)](_0xa5203f(0x2f7));for(const _0x429167 of _0xc3e4c0){console['error']('\x20\x20'+a31_0x34b79e[_0xa5203f(0x29b)](_0x429167));}console[_0xa5203f(0x155)](_0xa5203f(0x1c6)+_0x41ddf9+_0xa5203f(0x19e)+_0xc3e4c0[0x0]+'\x22');}return 0x1;}if(_0x24d0c1['behavior']===!![]||_0x24d0c1[_0xa5203f(0x33e)]===''){const _0x4877cd=_0x398d86[_0xa5203f(0x240)]?.[_0xa5203f(0x20f)](_0x2c6b92=>_0x2c6b92['name'])||[];if(_0x4877cd[_0xa5203f(0x1c4)]===0x0)console[_0xa5203f(0x155)](a31_0x34b79e['red']('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console[_0xa5203f(0x155)](a31_0x34b79e[_0xa5203f(0x152)](_0xa5203f(0x16c))),console[_0xa5203f(0x155)](_0xa5203f(0x351));for(const _0x51e5cb of _0x4877cd){console[_0xa5203f(0x155)]('\x20\x20'+a31_0x34b79e[_0xa5203f(0x29b)](_0x51e5cb));}console[_0xa5203f(0x155)](_0xa5203f(0x1c6)+_0x41ddf9+_0xa5203f(0x339)+_0x4877cd[0x0]+'\x22');}return 0x1;}const _0x508f3c=createCommandSpinner(a31_0x34b79e[_0xa5203f(0x2de)](_0xa5203f(0x1c7)),{'verbose':_0x24d0c1[_0xa5203f(0x354)]});_0x508f3c[_0xa5203f(0x2a9)]();const _0x29b658={'onProgress':_0x134397=>{const _0x2728b4=_0xa5203f;_0x508f3c[_0x2728b4(0x2c7)]=formatProgressMessage(_0x134397);}};if(_0x24d0c1[_0xa5203f(0x27c)])_0x29b658['master']=!![];if(_0x24d0c1[_0xa5203f(0x1ec)]&&typeof _0x24d0c1[_0xa5203f(0x1ec)]===_0xa5203f(0x328))_0x29b658[_0xa5203f(0x1ec)]=_0x24d0c1[_0xa5203f(0x1ec)];if(_0x24d0c1[_0xa5203f(0x33e)]&&typeof _0x24d0c1['behavior']===_0xa5203f(0x328))_0x29b658[_0xa5203f(0x33e)]=_0x24d0c1['behavior'];if(_0x24d0c1[_0xa5203f(0x253)])_0x29b658['enriched']=!![];if(_0x24d0c1[_0xa5203f(0x219)])_0x29b658[_0xa5203f(0x219)]=_0x24d0c1[_0xa5203f(0x219)];let _0x36e349;try{_0x36e349=await _0x832af8[_0xa5203f(0x1d7)]['previewParentYaml'](_0x6ba5e0,_0x29b658),_0x508f3c[_0xa5203f(0x1ac)]();}catch(_0x561e11){_0x508f3c[_0xa5203f(0x1ac)]();throw _0x561e11;}return await this[_0xa5203f(0x227)](_0x36e349,{'master':_0x24d0c1[_0xa5203f(0x27c)],'attribute':typeof _0x24d0c1[_0xa5203f(0x1ec)]===_0xa5203f(0x328)?_0x24d0c1[_0xa5203f(0x1ec)]:undefined,'behavior':typeof _0x24d0c1[_0xa5203f(0x33e)]===_0xa5203f(0x328)?_0x24d0c1[_0xa5203f(0x33e)]:undefined,'enriched':_0x24d0c1[_0xa5203f(0x253)]}),_0x36e349['allValid']?0x0:0x1;}async[a31_0x14f6c9(0x227)](_0x3365b6,_0x26b432){const _0x5a55d2=a31_0x14f6c9;console[_0x5a55d2(0x155)]('\x0a'+a31_0x34b79e[_0x5a55d2(0x2be)](_0x5a55d2(0x276))+'\x20'+_0x3365b6[_0x5a55d2(0x24e)]),console[_0x5a55d2(0x155)]('═'[_0x5a55d2(0x317)](0x3c));if(_0x26b432[_0x5a55d2(0x27c)]&&_0x3365b6[_0x5a55d2(0x162)]){const _0x95f58a=a31_0x34b79e[_0x5a55d2(0x2de)]('Master:')+'\x20'+a31_0x34b79e[_0x5a55d2(0x2be)](_0x3365b6[_0x5a55d2(0x27c)][_0x5a55d2(0x279)]+'.'+_0x3365b6[_0x5a55d2(0x27c)][_0x5a55d2(0x2f4)]);await this[_0x5a55d2(0x198)](_0x95f58a,_0x3365b6[_0x5a55d2(0x162)]);}else{if(_0x26b432['attribute']&&_0x3365b6[_0x5a55d2(0x162)]){const _0x55a322=a31_0x34b79e['dim'](_0x5a55d2(0x352))+'\x20'+a31_0x34b79e[_0x5a55d2(0x2be)](_0x26b432['attribute']);await this['displaySampleData'](_0x55a322,_0x3365b6['sampleData']);}else{if(_0x26b432['behavior']&&_0x3365b6[_0x5a55d2(0x162)]){const _0x30778d=a31_0x34b79e['dim'](_0x5a55d2(0x244))+'\x20'+a31_0x34b79e[_0x5a55d2(0x2be)](_0x26b432[_0x5a55d2(0x33e)]);await this['displaySampleData'](_0x30778d,_0x3365b6[_0x5a55d2(0x162)]);}else{if(_0x26b432['enriched']&&_0x3365b6[_0x5a55d2(0x162)]){const _0x18df4e=a31_0x34b79e[_0x5a55d2(0x2de)](_0x5a55d2(0x2b2))+'\x20'+a31_0x34b79e['bold'](_0x5a55d2(0x1c1));await this['displaySampleData'](_0x18df4e,_0x3365b6[_0x5a55d2(0x162)]);}else!_0x3365b6[_0x5a55d2(0x162)]&&console[_0x5a55d2(0x155)](_0x5a55d2(0x264));}}}if(_0x3365b6['errors']['length']>0x0){console[_0x5a55d2(0x155)]('─'['repeat'](0x3c)),console[_0x5a55d2(0x155)]('\x0a'+a31_0x34b79e[_0x5a55d2(0x152)](_0x5a55d2(0x177)));for(const _0x422edb of _0x3365b6['errors']){console[_0x5a55d2(0x155)]('\x20\x20'+a31_0x34b79e[_0x5a55d2(0x152)]('•')+'\x20'+_0x422edb);}}}async[a31_0x14f6c9(0x198)](_0x9559c8,_0x1a124e){const _0x372970=a31_0x14f6c9;if(_0x1a124e[_0x372970(0x1c4)]===0x0){console[_0x372970(0x155)]('\x0a'+_0x9559c8),console[_0x372970(0x155)](_0x372970(0x2d0));return;}console[_0x372970(0x155)]('\x0a'+_0x9559c8);const _0x33ff32=Object[_0x372970(0x22e)](_0x1a124e[0x0])[_0x372970(0x20f)](_0x4502eb=>({'name':_0x4502eb,'type':typeof _0x1a124e[0x0][_0x4502eb]===_0x372970(0x333)?'double':_0x372970(0x2fb)})),_0x4a81e6={'queryId':_0x372970(0x322),'columns':_0x33ff32,'data':_0x1a124e,'stats':{'state':_0x372970(0x149),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1a124e['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x4f4744=formatAsTable(_0x4a81e6,_0x1a124e[_0x372970(0x1c4)],!![]);await writeOutput(_0x4f4744,undefined,_0x372970(0x2f4));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']='segment:parent:run';[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x246);async[a31_0x14f6c9(0x2f9)](_0x3920c1){const _0xcf52=a31_0x14f6c9,{options:_0xddab74,args:_0x4c656d,tdx:_0x326b5c}=_0x3920c1,_0x1772fb=_0xddab74,_0x19bca0=_0x4c656d[0x0]||_0xddab74[_0xcf52(0x24b)];if(!_0x19bca0)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'+_0xcf52(0x316)),0x1;const _0x34a28d=resolveYamlFile(_0x19bca0);if(existsSync(_0x34a28d)){_0x1772fb[_0xcf52(0x354)]&&console['error'](_0xcf52(0x202)+_0x34a28d);let _0x4000a7;try{_0x4000a7=readFileSync(_0x34a28d,'utf-8');}catch(_0x16874d){const _0x5ea789=_0x16874d instanceof Error?_0x16874d[_0xcf52(0x2b5)]:String(_0x16874d);return console['error'](_0xcf52(0x1b6)+_0x5ea789),0x1;}const _0x4e65ba=await withSpinner(_0xcf52(0x15b),()=>_0x326b5c[_0xcf52(0x1d7)][_0xcf52(0x2b9)](_0x4000a7),{'verbose':_0x1772fb[_0xcf52(0x354)]}),_0x57a6d5=_0x4e65ba[_0xcf52(0x1be)],{isNew:_0x1ce3eb,name:_0x40530a,hasChanges:_0x17d9ea,diffFormatted:_0x340c34}=_0x57a6d5;if(_0x17d9ea){_0x1ce3eb?console[_0xcf52(0x155)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x40530a+'\x27:'):console[_0xcf52(0x155)](_0xcf52(0x290)+_0x40530a+'\x27:');console['error']('─'['repeat'](0x3c)),console[_0xcf52(0x155)](_0x340c34),console[_0xcf52(0x155)]('─'[_0xcf52(0x317)](0x3c));const _0x10d135=_0x1ce3eb?'Create\x20parent\x20segment\x20\x27'+_0x40530a+'\x27\x20and\x20run\x20workflow?':'Apply\x20changes\x20to\x20\x27'+_0x40530a+_0xcf52(0x18d);if(!_0x1772fb[_0xcf52(0x184)]){if(!isInteractive())return console['error'](a31_0x34b79e[_0xcf52(0x152)](_0xcf52(0x20a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xcf52(0x155)](a31_0x34b79e['dim'](_0xcf52(0x195))),0x1;const _0x5d64e9=await confirmKey(_0x10d135);if(!_0x5d64e9)return console[_0xcf52(0x155)](a31_0x34b79e[_0xcf52(0x26d)](_0xcf52(0x1a0))),0x1;}const _0x5efd65=_0x1ce3eb?_0xcf52(0x1c2):_0xcf52(0x1c5);await withSpinner(_0x5efd65+'\x20parent\x20segment\x20\x27'+_0x40530a+'\x27...',()=>_0x57a6d5['apply'](),{'verbose':_0x1772fb[_0xcf52(0x354)]});const _0x36ade2=_0x1ce3eb?_0xcf52(0x1ab):_0xcf52(0x18c);console['error']('✔\x20'+_0x36ade2+'\x20parent\x20segment\x20\x27'+_0x40530a+'\x27');}else console[_0xcf52(0x155)](_0xcf52(0x14d)+_0x40530a+_0xcf52(0x2a2));}const _0x111d21=await withSpinner(_0xcf52(0x182)+_0x19bca0+_0xcf52(0x1f4),()=>_0x326b5c['segment'][_0xcf52(0x217)](_0x19bca0),{'verbose':_0x1772fb[_0xcf52(0x354)]}),_0x416d3d=_0x111d21[_0xcf52(0x1be)],_0x51b49e=getConsoleUrl(_0x1772fb[_0xcf52(0x18e)],_0xcf52(0x325)+_0x416d3d[_0xcf52(0x31e)]+_0xcf52(0x1dd)+_0x416d3d[_0xcf52(0x19b)]+_0xcf52(0x1ef)+_0x416d3d['workflowAttemptId']);return console['error']('\x0a✔\x20Workflow\x20started'),console[_0xcf52(0x155)]('\x20\x20'+a31_0x34b79e[_0xcf52(0x2de)](_0xcf52(0x190))+'\x20'+_0x416d3d[_0xcf52(0x341)]),console[_0xcf52(0x155)]('\x20\x20'+a31_0x34b79e[_0xcf52(0x2de)](_0xcf52(0x200))+'\x20'+_0x416d3d[_0xcf52(0x20b)]),console[_0xcf52(0x155)]('\x20\x20'+a31_0x34b79e['dim']('Session:')+'\x20'+_0x416d3d[_0xcf52(0x19b)]),console[_0xcf52(0x155)]('\x20\x20'+a31_0x34b79e[_0xcf52(0x2de)](_0xcf52(0x32d))+'\x20'+_0x416d3d[_0xcf52(0x17d)]),console[_0xcf52(0x155)]('\x20\x20'+_0x51b49e),console[_0xcf52(0x155)]('\x0a'+a31_0x34b79e['dim']('To\x20cancel:')+_0xcf52(0x1d2)+_0x416d3d[_0xcf52(0x17d)]+_0xcf52(0x1f5)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x1ae);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x2dd);async['execute'](_0x26ed9c){const _0x839c64=a31_0x14f6c9,{options:_0x380c83,args:_0x522f36,tdx:_0x37a275}=_0x26ed9c,_0xc61a89=_0x522f36[0x0]||_0x380c83[_0x839c64(0x24b)];if(!_0xc61a89)return showParentSegmentNotSetError(_0x839c64(0x320)+_0x839c64(0x2ca)),0x1;_0x380c83['verbose']&&(console[_0x839c64(0x155)](_0x839c64(0x31b)+_0x380c83[_0x839c64(0x18e)]),console['error'](_0x839c64(0x226)+_0xc61a89));const _0x566908=await withSpinner(_0x839c64(0x2cf)+_0xc61a89+_0x839c64(0x1f4),()=>_0x37a275[_0x839c64(0x1d7)][_0x839c64(0x194)](_0xc61a89),{'verbose':_0x380c83[_0x839c64(0x354)]}),_0x2b44af=_0x566908[_0x839c64(0x1be)];console[_0x839c64(0x155)](_0x839c64(0x34e)+_0x2b44af['length']+_0x839c64(0x251)+(_0x2b44af[_0x839c64(0x1c4)]!==0x1?'s':''));if(_0x380c83[_0x839c64(0x331)]||_0x380c83[_0x839c64(0x1a6)])return await handleSDKOutput(_0x2b44af,_0x380c83),0x0;return displayFieldsHumanReadable(_0x2b44af,_0xc61a89),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x1a1);['description']=a31_0x14f6c9(0x15f);async[a31_0x14f6c9(0x2f9)](_0x33e16f){const _0x3d094a=a31_0x14f6c9,{options:_0x3fe0f3,args:_0x4f94e4,tdx:_0x5c405c}=_0x33e16f,_0x57af48=_0x3fe0f3,_0x4dd689=_0x4f94e4[0x0]||_0x3fe0f3[_0x3d094a(0x24b)];if(!_0x4dd689)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+_0x3d094a(0x178)+'Options:\x0a'+_0x3d094a(0x18b)),0x1;_0x3fe0f3[_0x3d094a(0x354)]&&(console[_0x3d094a(0x155)](_0x3d094a(0x31b)+_0x3fe0f3[_0x3d094a(0x18e)]),console[_0x3d094a(0x155)](_0x3d094a(0x226)+_0x4dd689));const _0x331b13=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x4dd689+_0x3d094a(0x1f4),()=>_0x5c405c[_0x3d094a(0x1d7)][_0x3d094a(0x23b)](_0x4dd689),{'verbose':_0x3fe0f3[_0x3d094a(0x354)]}),_0x51d3f5=_0x331b13['data'];if(_0x57af48[_0x3d094a(0x348)]){const _0x49b38e=getConsoleNextUrl(_0x57af48[_0x3d094a(0x18e)],_0x3d094a(0x298)+_0x51d3f5['id']);return console[_0x3d094a(0x155)](a31_0x34b79e['green']('✔')+_0x3d094a(0x2fc)+a31_0x34b79e[_0x3d094a(0x29b)](_0x49b38e)),openBrowser(_0x49b38e),0x0;}return await handleSingleObjectOutput(_0x51d3f5,_0x3fe0f3),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]='segment:parent:desc';[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x2c0);async['execute'](_0x5de6e2){const _0x18fadf=a31_0x14f6c9,{options:_0x40c5d3,args:_0x1f1892,tdx:_0x2cd6a4}=_0x5de6e2,_0xdc506e=_0x40c5d3,_0xab68f1=_0x1f1892[0x0]||_0x40c5d3['parentSegment'];if(!_0xab68f1)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'+_0x18fadf(0x21a)+_0x18fadf(0x350)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x40c5d3['verbose']&&(console[_0x18fadf(0x155)]('Site:\x20'+_0x40c5d3[_0x18fadf(0x18e)]),console[_0x18fadf(0x155)]('Parent\x20segment:\x20'+_0xab68f1));const _0x5495b8=await withSpinner(_0x18fadf(0x289)+_0xab68f1+_0x18fadf(0x1f4),()=>_0x2cd6a4['segment']['resolveParentId'](_0xab68f1),{'verbose':_0x40c5d3[_0x18fadf(0x354)]}),_0x1d1cad=_0x5495b8[_0x18fadf(0x1be)],_0x37364f=_0x2cd6a4[_0x18fadf(0x1d7)][_0x18fadf(0x229)](_0x1d1cad);if(_0xdc506e[_0x18fadf(0x141)]){const _0x161ca0=await this[_0x18fadf(0x257)](_0x5de6e2,_0xab68f1,_0x1d1cad,_0x37364f),_0x127f27=this[_0x18fadf(0x1c0)](_0x161ca0);writeFileSync(_0xdc506e[_0x18fadf(0x141)],_0x127f27);const _0x1e7f28=_0x161ca0[_0x18fadf(0x14a)]['columns'][_0x18fadf(0x1c4)]+_0x161ca0['behaviors']['reduce']((_0x203b9d,_0x51a7c9)=>_0x203b9d+_0x51a7c9[_0x18fadf(0x314)]['length'],0x0),_0x1e645e=_0x161ca0[_0x18fadf(0x240)]['filter'](_0x2590b1=>_0x2590b1[_0x18fadf(0x314)][_0x18fadf(0x1c4)]===0x0)[_0x18fadf(0x1c4)];return console[_0x18fadf(0x20e)](_0x18fadf(0x2d9)+_0xdc506e[_0x18fadf(0x141)]),console[_0x18fadf(0x20e)](_0x18fadf(0x148)+_0x37364f),console[_0x18fadf(0x20e)](_0x18fadf(0x35a)+_0x161ca0[_0x18fadf(0x240)][_0x18fadf(0x1c4)]+'\x20behaviors'),console[_0x18fadf(0x20e)](_0x18fadf(0x252)+_0x1e7f28+_0x18fadf(0x233)),_0x1e645e>0x0&&console[_0x18fadf(0x20e)](_0x18fadf(0x160)+_0x1e645e+_0x18fadf(0x140)),0x0;}console[_0x18fadf(0x155)]('\x0a'+a31_0x34b79e['bold'](_0x18fadf(0x2e0))+'\x20'+a31_0x34b79e['cyan'](_0x37364f));const _0x15c663=await withSpinner(_0x18fadf(0x2ea),()=>_0x2cd6a4[_0x18fadf(0x1d7)][_0x18fadf(0x205)](_0x1d1cad),{'verbose':_0x40c5d3[_0x18fadf(0x354)]});console[_0x18fadf(0x155)]('\x0a'+a31_0x34b79e['bold'](_0x18fadf(0x14a))+'\x20'+a31_0x34b79e['dim']('('+_0x37364f+_0x18fadf(0x349)));const _0x531775=await executeSchemaQuery(_0x15c663['data'],_0x2cd6a4,_0x40c5d3);await handleQueryOutput(_0x531775,_0x40c5d3);const _0x4e41e4=await withSpinner(_0x18fadf(0x27d),()=>_0x2cd6a4[_0x18fadf(0x1d7)][_0x18fadf(0x1d4)](_0x1d1cad),{'verbose':_0x40c5d3[_0x18fadf(0x354)]});for(const _0x2e7661 of _0x4e41e4[_0x18fadf(0x1be)]){const _0x46477b='behavior_'+_0x2e7661[_0x18fadf(0x1de)]()[_0x18fadf(0x2c5)](/\s+/g,'_'),_0x4fc185=_0x18fadf(0x174)+_0x37364f+'.'+_0x46477b;console[_0x18fadf(0x155)]('\x0a'+a31_0x34b79e[_0x18fadf(0x2be)](_0x2e7661)+'\x20'+a31_0x34b79e[_0x18fadf(0x2de)]('('+_0x37364f+'.'+_0x46477b+')'));try{const _0x528e24=await executeSchemaQuery(_0x4fc185,_0x2cd6a4,_0x40c5d3);await handleQueryOutput(_0x528e24,_0x40c5d3);}catch{console[_0x18fadf(0x155)](a31_0x34b79e[_0x18fadf(0x26d)](_0x18fadf(0x31d)));}}return 0x0;}async[a31_0x14f6c9(0x257)](_0x335c1d,_0x50d806,_0x4f2b25,_0x58b570){const _0x328f48=a31_0x14f6c9,{options:_0x3e17cb,tdx:_0x15f900}=_0x335c1d,_0x3b85cd=await withSpinner(_0x328f48(0x2ea),()=>_0x15f900[_0x328f48(0x1d7)][_0x328f48(0x205)](_0x4f2b25),{'verbose':_0x3e17cb[_0x328f48(0x354)]}),_0x48f16d=await executeSchemaQuery(_0x3b85cd['data'],_0x15f900,_0x3e17cb),_0x4a70ef=_0x48f16d[_0x328f48(0x1be)]['map'](_0x1c2e9b=>({'name':_0x1c2e9b[_0x328f48(0x266)],'type':_0x1c2e9b['column_type']})),_0x44b26b=await withSpinner(_0x328f48(0x27d),()=>_0x15f900[_0x328f48(0x1d7)][_0x328f48(0x1d4)](_0x4f2b25),{'verbose':_0x3e17cb['verbose']}),_0x2066e1=[];for(const _0x13cc93 of _0x44b26b[_0x328f48(0x1be)]){const _0x3d721f='behavior_'+_0x13cc93[_0x328f48(0x1de)]()[_0x328f48(0x2c5)](/\s+/g,'_'),_0x326f69=_0x328f48(0x174)+_0x58b570+'.'+_0x3d721f;let _0x3e474b=[];try{const _0x1cfd98=await executeSchemaQuery(_0x326f69,_0x15f900,_0x3e17cb);_0x3e474b=_0x1cfd98[_0x328f48(0x1be)][_0x328f48(0x20f)](_0x71cc06=>({'name':_0x71cc06[_0x328f48(0x266)],'type':_0x71cc06[_0x328f48(0x2d6)]}));}catch{}_0x2066e1[_0x328f48(0x330)]({'table':_0x3d721f,'columns':_0x3e474b});}return{'database':_0x58b570,'parent_segment':_0x50d806,'parent_id':_0x4f2b25,'customers':{'table':'customers','columns':_0x4a70ef},'behaviors':_0x2066e1};}[a31_0x14f6c9(0x1c0)](_0x4d1df2){const _0x174b3b=a31_0x14f6c9,_0x1c0bdc=_0x558ec9=>{const _0x4b2564=a31_0x1e7f;if(_0x558ec9[_0x4b2564(0x1c4)]===0x0)return'[]';const _0x152090=_0x558ec9[_0x4b2564(0x20f)](_0x49e3d1=>_0x4b2564(0x258)+_0x49e3d1[_0x4b2564(0x24e)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x49e3d1[_0x4b2564(0x277)]+_0x4b2564(0x345));return'[\x0a'+_0x152090[_0x4b2564(0x2bf)](',\x0a')+_0x4b2564(0x199);},_0x1a5eaf=_0x4d1df2[_0x174b3b(0x240)]['map'](_0x418d36=>{const _0x513b34=_0x174b3b;return _0x513b34(0x1cf)+_0x418d36[_0x513b34(0x2f4)]+_0x513b34(0x2c4)+_0x1c0bdc(_0x418d36[_0x513b34(0x314)])[_0x513b34(0x2c5)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20\x20\x20}';})[_0x174b3b(0x2bf)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x4d1df2[_0x174b3b(0x279)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x4d1df2[_0x174b3b(0x154)]+'\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22'+_0x4d1df2[_0x174b3b(0x35c)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x4d1df2[_0x174b3b(0x14a)][_0x174b3b(0x2f4)]+_0x174b3b(0x2dc)+_0x1c0bdc(_0x4d1df2[_0x174b3b(0x14a)][_0x174b3b(0x314)])[_0x174b3b(0x2c5)](/^/gm,'\x20\x20')[_0x174b3b(0x188)]()+_0x174b3b(0x23e)+_0x1a5eaf+_0x174b3b(0x2db);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]='segment:parent:sql';[a31_0x14f6c9(0x1b9)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async['execute'](_0x3a53da){const _0x19aad3=a31_0x14f6c9,{options:_0x1e525d,args:_0x288df8,tdx:_0x4c83e9}=_0x3a53da,_0x4c9097=_0x288df8[0x0]||_0x1e525d[_0x19aad3(0x24b)];if(!_0x4c9097)return showParentSegmentNotSetError(_0x19aad3(0x310)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment'),0x1;_0x1e525d[_0x19aad3(0x354)]&&(console[_0x19aad3(0x155)](_0x19aad3(0x31b)+_0x1e525d[_0x19aad3(0x18e)]),console[_0x19aad3(0x155)](_0x19aad3(0x226)+_0x4c9097));const _0x463c18=await withSpinner(_0x19aad3(0x289)+_0x4c9097+'\x27...',()=>_0x4c83e9[_0x19aad3(0x1d7)][_0x19aad3(0x324)](_0x4c9097),{'verbose':_0x1e525d[_0x19aad3(0x354)]}),_0x57d3f0=_0x463c18[_0x19aad3(0x1be)],_0x2c7329=await withSpinner(_0x19aad3(0x343)+_0x4c9097+_0x19aad3(0x1f4),()=>_0x4c83e9[_0x19aad3(0x1d7)]['getParentSQL'](_0x57d3f0),{'verbose':_0x1e525d[_0x19aad3(0x354)]}),_0x189b2b=_0x2c7329[_0x19aad3(0x1be)];return _0x1e525d[_0x19aad3(0x2ef)]==='json'||_0x1e525d['format']===_0x19aad3(0x1a6)?await handleSDKOutput([{'sql':_0x189b2b}],_0x1e525d):console[_0x19aad3(0x20e)](_0x189b2b),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x14f6c9(0x166);[a31_0x14f6c9(0x1b9)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x14f6c9(0x2f9)](_0x45c227){const _0x41a156=a31_0x14f6c9,{options:_0x43af53,args:_0x28b73d,tdx:_0x4ff26e}=_0x45c227,_0x3f6fa3=_0x28b73d[0x0]||_0x43af53[_0x41a156(0x24b)];if(!_0x3f6fa3)return showParentSegmentNotSetError(_0x41a156(0x144)+_0x41a156(0x2aa)),0x1;_0x43af53[_0x41a156(0x354)]&&(console['error'](_0x41a156(0x31b)+_0x43af53[_0x41a156(0x18e)]),console['error'](_0x41a156(0x226)+_0x3f6fa3));const _0x124928=await withSpinner(_0x41a156(0x289)+_0x3f6fa3+_0x41a156(0x1f4),()=>_0x4ff26e[_0x41a156(0x1d7)][_0x41a156(0x324)](_0x3f6fa3),{'verbose':_0x43af53[_0x41a156(0x354)]}),_0x38a26a=_0x124928[_0x41a156(0x1be)],_0x4b352e=await withSpinner(_0x41a156(0x343)+_0x3f6fa3+_0x41a156(0x1f4),()=>_0x4ff26e['segment'][_0x41a156(0x205)](_0x38a26a),{'verbose':_0x43af53['verbose']});let _0x544d71=_0x4b352e[_0x41a156(0x1be)];const _0x30a9cb=resolveLimit(_0x43af53['limit'],DEFAULT_DISPLAY_LIMIT),_0x59ab00=/\bLIMIT\s+\d+/i[_0x41a156(0x1b1)](_0x544d71);!_0x59ab00&&(_0x544d71=_0x544d71['trim']()['replace'](/;+$/,''),_0x544d71='SELECT\x20*\x20FROM\x20(\x0a'+_0x544d71+_0x41a156(0x31a)+_0x30a9cb);_0x43af53[_0x41a156(0x354)]&&console[_0x41a156(0x155)](_0x41a156(0x2f1)+_0x544d71);const _0x54a7bd=await withProgressSpinner(_0x41a156(0x2a0),async _0x40412f=>{const _0x134298=_0x41a156,_0xf97f82=await _0x4ff26e[_0x134298(0x1bf)][_0x134298(0x2f9)](_0x544d71,{'catalog':'td','schema':_0x134298(0x272),'onJobId':_0x5bfb43=>{_0x40412f['setJobId'](_0x5bfb43);}});return _0xf97f82;},{'verbose':_0x43af53['verbose']}),_0x2c5770=_0x54a7bd[_0x41a156(0x1be)],_0x320b3b=_0x2c5770[_0x41a156(0x28a)]?_0x41a156(0x210)+_0x2c5770[_0x41a156(0x28a)]+']':'';return console['error'](_0x41a156(0x1b3)+_0x2c5770[_0x41a156(0x180)]['processedRows'][_0x41a156(0x163)]()+_0x41a156(0x22d)+(_0x41a156(0x2fe)+formatElapsed(_0x2c5770[_0x41a156(0x180)][_0x41a156(0x273)])+_0x320b3b)),await handleQueryOutput(_0x2c5770,_0x43af53),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a31_0x14f6c9(0x16e);['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a31_0x14f6c9(0x2f9)](_0x51585a){const _0xe8169b=a31_0x14f6c9,{options:_0x4ff380,args:_0x3d4662,tdx:_0x29d9af}=_0x51585a,_0x863f3=_0x3d4662[0x0],_0x103b10=await withSpinner(_0x863f3?_0xe8169b(0x26f)+_0x863f3+_0xe8169b(0x1f4):_0xe8169b(0x1fa),()=>_0x29d9af[_0xe8169b(0x159)]['list'](),{'verbose':_0x4ff380['verbose']});let _0x1f0777=_0x103b10[_0xe8169b(0x1be)][_0xe8169b(0x312)](_0x5f4c1=>_0x5f4c1['realtime_enabled']);if(_0x863f3){const _0x547c98=_0x863f3[_0xe8169b(0x2c5)](/[.+^${}()|[\]\\]/g,_0xe8169b(0x2e6))[_0xe8169b(0x2c5)](/\*/g,'.*')[_0xe8169b(0x2c5)](/\?/g,'.'),_0x56190d=new RegExp('^'+_0x547c98+'$','i');_0x1f0777=_0x1f0777['filter'](_0x17345a=>_0x56190d[_0xe8169b(0x1b1)](_0x17345a['name']));}_0x1f0777[_0xe8169b(0x2b1)]((_0x2fdccd,_0x27c1a4)=>_0x2fdccd[_0xe8169b(0x24e)]['localeCompare'](_0x27c1a4['name'])),console['error'](_0xe8169b(0x34e)+_0x1f0777[_0xe8169b(0x1c4)]+_0xe8169b(0x2b3)+(_0x1f0777[_0xe8169b(0x1c4)]!==0x1?'s':''));const _0x477de4=_0x5950e1=>{const _0x3b728f=_0xe8169b;return getConsoleNextUrl(_0x4ff380[_0x3b728f(0x18e)],_0x3b728f(0x298)+_0x5950e1);};if(_0x4ff380[_0xe8169b(0x2ef)]===_0xe8169b(0x331)||_0x4ff380[_0xe8169b(0x2ef)]==='jsonl'){const _0x361ab9=_0x1f0777[_0xe8169b(0x20f)](_0x56e59c=>({..._0x56e59c,'url':_0x477de4(_0x56e59c['id'])}));await handleSDKOutput(_0x361ab9,_0x4ff380);}else{if(_0x1f0777[_0xe8169b(0x1c4)]===0x0)console[_0xe8169b(0x20e)](_0xe8169b(0x158));else for(const _0x57d09e of _0x1f0777){const _0x555307=_0x57d09e[_0xe8169b(0x2ed)]?a31_0x34b79e['dim']('\x20('+formatRows(_0x57d09e[_0xe8169b(0x2ed)])+')'):'',_0x42092e=hyperlink(_0x57d09e[_0xe8169b(0x24e)],_0x477de4(_0x57d09e['id']));console[_0xe8169b(0x20e)]('⚡\x20'+_0x42092e+_0x555307);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']='ps:rt:validate';['description']=a31_0x14f6c9(0x213);async[a31_0x14f6c9(0x2f9)](_0x554487){const _0x255a42=a31_0x14f6c9,{options:_0x4e8cfa,args:_0x1b35a2,tdx:_0x45afa2}=_0x554487,_0x348fe0=_0x1b35a2[0x0]||_0x4e8cfa[_0x255a42(0x24b)];if(!_0x348fe0)return showParentSegmentNotSetError(_0x255a42(0x14e)+_0x255a42(0x1af)),0x1;const _0x2055db=resolveYamlFile(_0x348fe0);if(!existsSync(_0x2055db))return showFileNotFoundError(_0x2055db,_0x348fe0),0x1;let _0x25c7a1;try{_0x25c7a1=readFileSync(_0x2055db,_0x255a42(0x342));}catch(_0x2050f3){const _0x209eb2=_0x2050f3 instanceof Error?_0x2050f3[_0x255a42(0x2b5)]:String(_0x2050f3);return console[_0x255a42(0x155)](_0x255a42(0x1b6)+_0x209eb2),0x1;}const _0x1b9355=createCommandSpinner(a31_0x34b79e['dim'](_0x255a42(0x34d)),{'verbose':_0x4e8cfa[_0x255a42(0x354)]});_0x1b9355[_0x255a42(0x2a9)]();const _0x1d5e5f={'realtime':!![],'onProgress':_0x33e68a=>{const _0x25705b=_0x255a42;_0x1b9355[_0x25705b(0x2c7)]=formatProgressMessage(_0x33e68a);}};let _0x2ba096;try{_0x2ba096=await _0x45afa2[_0x255a42(0x1d7)]['validateParentYaml'](_0x25c7a1,_0x1d5e5f),_0x1b9355[_0x255a42(0x1ac)]();}catch(_0x5110bb){_0x1b9355['stop']();throw _0x5110bb;}console[_0x255a42(0x155)]('\x0a'+a31_0x34b79e['bold'](_0x255a42(0x30c))+'\x20'+_0x2ba096[_0x255a42(0x24e)]),console[_0x255a42(0x155)]('═'[_0x255a42(0x317)](0x3c)),displayRealtimeValidation(_0x2ba096),console[_0x255a42(0x155)]('─'[_0x255a42(0x317)](0x3c));if(_0x2ba096[_0x255a42(0x2d8)]['length']>0x0){console[_0x255a42(0x155)]('\x0a'+a31_0x34b79e[_0x255a42(0x152)](_0x255a42(0x177)));for(const _0x2b0da0 of _0x2ba096[_0x255a42(0x2d8)]){console[_0x255a42(0x155)]('\x20\x20'+a31_0x34b79e[_0x255a42(0x152)]('•')+'\x20'+_0x2b0da0);}}return _0x2ba096['allValid']&&console[_0x255a42(0x155)]('\x0a'+a31_0x34b79e['green']('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x2ba096[_0x255a42(0x19d)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x26a);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x197);async['execute'](_0x587f22){const _0xc8e07e=a31_0x14f6c9,{options:_0x3ad97f,args:_0x9cb6c3,tdx:_0x2660bf}=_0x587f22,_0xd8a3ad=_0x9cb6c3[0x0]||_0x3ad97f['parentSegment'];if(!_0xd8a3ad)return showParentSegmentNotSetError(_0xc8e07e(0x1bc)+_0xc8e07e(0x147)),0x1;_0x3ad97f[_0xc8e07e(0x354)]&&(console[_0xc8e07e(0x155)](_0xc8e07e(0x31b)+_0x3ad97f['site']),console[_0xc8e07e(0x155)](_0xc8e07e(0x226)+_0xd8a3ad));const _0x26cbe0=await withSpinner(_0xc8e07e(0x289)+_0xd8a3ad+_0xc8e07e(0x1f4),()=>_0x2660bf[_0xc8e07e(0x1d7)][_0xc8e07e(0x324)](_0xd8a3ad),{'verbose':_0x3ad97f[_0xc8e07e(0x354)]}),_0x4554a5=_0x26cbe0['data'],_0x4a2541=await withSpinner(_0xc8e07e(0x17f)+_0xd8a3ad+'\x27...',()=>_0x2660bf[_0xc8e07e(0x159)][_0xc8e07e(0x32e)](_0x4554a5),{'verbose':_0x3ad97f['verbose']}),_0x2043ae=_0x4a2541[_0xc8e07e(0x1be)];console['error'](_0xc8e07e(0x34e)+_0x2043ae['length']+_0xc8e07e(0x25a)+(_0x2043ae[_0xc8e07e(0x1c4)]!==0x1?'s':''));if(_0x3ad97f[_0xc8e07e(0x2ef)]===_0xc8e07e(0x331)||_0x3ad97f['format']===_0xc8e07e(0x1a6))await handleSDKOutput(_0x2043ae,_0x3ad97f);else{if(_0x2043ae[_0xc8e07e(0x1c4)]===0x0)console['log']('No\x20RT\x20journeys\x20found');else for(const _0x261a99 of _0x2043ae){const _0x1e2638=_0x261a99['state']==='launched'?'🚀':'📝',_0x18c4fe=_0x261a99[_0xc8e07e(0x208)]?a31_0x34b79e['yellow'](_0xc8e07e(0x326)):'',_0x54fe0c=a31_0x34b79e[_0xc8e07e(0x2de)]('\x20('+_0x261a99[_0xc8e07e(0x319)]+_0xc8e07e(0x215)+(_0x261a99[_0xc8e07e(0x319)]!==0x1?'s':'')+')');console['log'](_0x1e2638+'\x20'+_0x261a99['name']+_0x18c4fe+_0x54fe0c);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']=a31_0x14f6c9(0x2fa);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x29c);async[a31_0x14f6c9(0x2f9)](_0x1a7c96){const _0x480437=a31_0x14f6c9,{options:_0x54654b,args:_0x532344,tdx:_0x954999}=_0x1a7c96,_0x11ee9a=_0x532344[0x0];if(!_0x11ee9a)return console[_0x480437(0x155)](a31_0x34b79e['red'](_0x480437(0x2a5))),console['error'](_0x480437(0x25f)),console['error'](a31_0x34b79e[_0x480437(0x2de)]('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x54654b['verbose']&&(console[_0x480437(0x155)]('Site:\x20'+_0x54654b[_0x480437(0x18e)]),console[_0x480437(0x155)](_0x480437(0x2e3)+_0x11ee9a));const _0xafa849=await withSpinner(_0x480437(0x2c3)+_0x11ee9a+_0x480437(0x1f4),()=>_0x954999[_0x480437(0x159)][_0x480437(0x1a7)](_0x11ee9a),{'verbose':_0x54654b['verbose']}),_0x3edad3=_0xafa849[_0x480437(0x1be)];console['error'](_0x480437(0x2e2)+_0x3edad3[_0x480437(0x24e)]+'\x27');if(_0x54654b['format']===_0x480437(0x331)||_0x54654b['format']===_0x480437(0x1a6))await handleSDKOutput([_0x3edad3],_0x54654b);else{const _0x589a30=_0x3edad3[_0x480437(0x16f)]===_0x480437(0x1fc)?'🚀':'📝',_0x3da35b=_0x3edad3['paused']?a31_0x34b79e[_0x480437(0x26d)]('\x20(paused)'):'';console[_0x480437(0x20e)](_0x589a30+'\x20'+_0x3edad3[_0x480437(0x24e)]+_0x3da35b);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]='ps:rt:jn:resume';['description']=a31_0x14f6c9(0x1a4);async[a31_0x14f6c9(0x2f9)](_0x384462){const _0x3f0662=a31_0x14f6c9,{options:_0x3eb965,args:_0x4e8c7e,tdx:_0x424b17}=_0x384462,_0x1d9986=_0x4e8c7e[0x0];if(!_0x1d9986)return console['error'](a31_0x34b79e['red']('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console['error'](_0x3f0662(0x1d9)),console[_0x3f0662(0x155)](a31_0x34b79e[_0x3f0662(0x2de)](_0x3f0662(0x235))),0x1;_0x3eb965[_0x3f0662(0x354)]&&(console[_0x3f0662(0x155)](_0x3f0662(0x31b)+_0x3eb965['site']),console['error'](_0x3f0662(0x2e3)+_0x1d9986));const _0x1fa2bb=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x1d9986+'\x27...',()=>_0x424b17[_0x3f0662(0x159)]['resumeJourney'](_0x1d9986),{'verbose':_0x3eb965[_0x3f0662(0x354)]}),_0x1d0f77=_0x1fa2bb[_0x3f0662(0x1be)];console[_0x3f0662(0x155)](_0x3f0662(0x14f)+_0x1d0f77[_0x3f0662(0x24e)]+'\x27');if(_0x3eb965[_0x3f0662(0x2ef)]===_0x3f0662(0x331)||_0x3eb965[_0x3f0662(0x2ef)]===_0x3f0662(0x1a6))await handleSDKOutput([_0x1d0f77],_0x3eb965);else{const _0x57aaf1=_0x1d0f77[_0x3f0662(0x16f)]===_0x3f0662(0x1fc)?'🚀':'📝',_0x50ddaa=_0x1d0f77[_0x3f0662(0x208)]?a31_0x34b79e['yellow'](_0x3f0662(0x326)):'';console[_0x3f0662(0x20e)](_0x57aaf1+'\x20'+_0x1d0f77[_0x3f0662(0x24e)]+_0x50ddaa);}return 0x0;}}function a31_0x1e7f(_0x22a5cf,_0x489865){_0x22a5cf=_0x22a5cf-0x13d;const _0x306205=a31_0x3062();let _0x1e7f1d=_0x306205[_0x22a5cf];return _0x1e7f1d;}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a31_0x14f6c9(0x271);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x2d7);async['execute'](_0x41be61){const _0x417902=a31_0x14f6c9,{options:_0x31dbca,args:_0x172c48,tdx:_0x4d9ead}=_0x41be61,_0x4bdd3b=_0x172c48[0x0]||_0x31dbca[_0x417902(0x24b)];if(!_0x4bdd3b)return showParentSegmentNotSetError(_0x417902(0x242)+'\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'),0x1;_0x31dbca[_0x417902(0x354)]&&(console[_0x417902(0x155)](_0x417902(0x31b)+_0x31dbca['site']),console['error'](_0x417902(0x226)+_0x4bdd3b));const _0x375d44=await withSpinner(_0x417902(0x289)+_0x4bdd3b+'\x27...',()=>_0x4d9ead[_0x417902(0x1d7)]['resolveParentId'](_0x4bdd3b),{'verbose':_0x31dbca[_0x417902(0x354)]}),_0x522ea3=_0x375d44[_0x417902(0x1be)],_0x2802aa=await withSpinner(_0x417902(0x176)+_0x4bdd3b+_0x417902(0x1f4),()=>_0x4d9ead[_0x417902(0x159)][_0x417902(0x254)](_0x522ea3),{'verbose':_0x31dbca['verbose']}),_0x2e2f23=_0x2802aa['data'];return console[_0x417902(0x155)](_0x417902(0x26b)),_0x31dbca['format']===_0x417902(0x331)||_0x31dbca[_0x417902(0x2ef)]===_0x417902(0x1a6)?await handleSDKOutput([_0x2e2f23],_0x31dbca):(console['log'](_0x417902(0x23a)+_0x2e2f23['id']),console[_0x417902(0x20e)]('audienceId:\x20'+_0x2e2f23[_0x417902(0x341)]),console['log'](_0x417902(0x30b)+_0x2e2f23['identifier']),console[_0x417902(0x20e)](_0x417902(0x218)+_0x2e2f23['eventKind']),console[_0x417902(0x20e)](_0x417902(0x172)+_0x2e2f23[_0x417902(0x20b)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x27e);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x223);async[a31_0x14f6c9(0x2f9)](_0x179352){const _0x4d5499=a31_0x14f6c9,{options:_0x622261,args:_0x2f9cc9,tdx:_0x4ec215}=_0x179352,_0x40a29c=_0x2f9cc9[0x0]||_0x622261[_0x4d5499(0x24b)];if(!_0x40a29c)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'+_0x4d5499(0x356)),0x1;const _0x4ebb49=await withSpinner(_0x4d5499(0x289)+_0x40a29c+_0x4d5499(0x1f4),()=>_0x4ec215[_0x4d5499(0x1d7)]['resolveParentId'](_0x40a29c),{'verbose':_0x622261[_0x4d5499(0x354)]}),_0x21a97e=_0x4ebb49['data'],_0x22b076=await withSpinner(_0x4d5499(0x21c)+_0x40a29c+_0x4d5499(0x1f4),()=>_0x4ec215[_0x4d5499(0x318)][_0x4d5499(0x2b6)](_0x21a97e),{'verbose':_0x622261[_0x4d5499(0x354)]}),_0x1d361c=_0x22b076[_0x4d5499(0x1be)];console[_0x4d5499(0x155)](_0x4d5499(0x34e)+_0x1d361c[_0x4d5499(0x1c4)]+_0x4d5499(0x25e)+(_0x1d361c[_0x4d5499(0x1c4)]!==0x1?'s':''));if(_0x622261['format']===_0x4d5499(0x331)||_0x622261[_0x4d5499(0x2ef)]==='jsonl')await handleSDKOutput(_0x1d361c,_0x622261);else{if(_0x1d361c[_0x4d5499(0x1c4)]===0x0)console['log'](_0x4d5499(0x2ad)),console[_0x4d5499(0x155)](a31_0x34b79e['cyan'](_0x4d5499(0x25d)));else for(const _0x3752a2 of _0x1d361c){console[_0x4d5499(0x20e)](a31_0x34b79e[_0x4d5499(0x2be)](_0x3752a2[_0x4d5499(0x24e)])+'\x20'+a31_0x34b79e[_0x4d5499(0x2de)]('(id:\x20'+_0x3752a2['id']+')'));_0x3752a2[_0x4d5499(0x1b9)]&&console['log']('\x20\x20'+a31_0x34b79e[_0x4d5499(0x2de)](_0x3752a2[_0x4d5499(0x1b9)]));if(_0x3752a2['tokens']&&_0x3752a2[_0x4d5499(0x145)][_0x4d5499(0x1c4)]>0x0)for(const _0x560c5a of _0x3752a2[_0x4d5499(0x145)]){const _0x418bb6=_0x560c5a[_0x4d5499(0x33d)]?.[_0x4d5499(0x1c4)]?_0x560c5a[_0x4d5499(0x33d)]['join'](',\x20'):_0x4d5499(0x156);console[_0x4d5499(0x20e)]('\x20\x20'+a31_0x34b79e[_0x4d5499(0x29b)](_0x4d5499(0x2a6))+'\x20'+_0x560c5a['name']+'\x20'+a31_0x34b79e[_0x4d5499(0x2de)](_0x4d5499(0x338)+_0x560c5a['id']+')')),console[_0x4d5499(0x20e)](_0x4d5499(0x1fb)+a31_0x34b79e[_0x4d5499(0x2de)]('allowed\x20IPs:')+'\x20'+_0x418bb6);}else console[_0x4d5499(0x20e)]('\x20\x20'+a31_0x34b79e[_0x4d5499(0x2de)](_0x4d5499(0x336)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x23f);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x329);async['execute'](_0x361cbc){const _0x437a19=a31_0x14f6c9,{options:_0x155332,args:_0x390081,tdx:_0x5dc386}=_0x361cbc,_0x554f74=_0x155332,_0xb7d52e=_0x390081[0x0],_0x48d9a0=_0x390081[0x1]||_0x155332[_0x437a19(0x24b)];if(!_0xb7d52e)return console[_0x437a19(0x155)](_0x437a19(0x296)),console[_0x437a19(0x155)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]'),console[_0x437a19(0x155)](_0x437a19(0x203)),0x1;if(!_0x48d9a0)return showParentSegmentNotSetError(_0x437a19(0x231)+_0x437a19(0x203)),0x1;const _0x47460b=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x48d9a0+_0x437a19(0x1f4),()=>_0x5dc386[_0x437a19(0x1d7)][_0x437a19(0x324)](_0x48d9a0),{'verbose':_0x155332[_0x437a19(0x354)]}),_0x185555=_0x47460b['data'],_0xd4d813={'name':_0xb7d52e,'description':_0x554f74[_0x437a19(0x1b9)],'public':_0x554f74[_0x437a19(0x191)]},_0x8d9554=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0xb7d52e+_0x437a19(0x1f4),()=>_0x5dc386[_0x437a19(0x318)][_0x437a19(0x353)](_0x185555,_0xd4d813),{'verbose':_0x155332[_0x437a19(0x354)]}),_0x40a37f=_0x8d9554[_0x437a19(0x1be)];return console[_0x437a19(0x155)](_0x437a19(0x25b)+_0x40a37f[_0x437a19(0x24e)]+_0x437a19(0x2f2)+_0x40a37f['id']),await handleSDKOutput([_0x40a37f],_0x155332),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']='ps:pz:service:show';[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x25c);async[a31_0x14f6c9(0x2f9)](_0x9230a2){const _0x111555=a31_0x14f6c9,{options:_0x24fbab,args:_0x6afc4f,tdx:_0x5942f8}=_0x9230a2,_0x415d98=_0x6afc4f[0x0],_0x37c892=_0x6afc4f[0x1]||_0x24fbab['parentSegment'];if(!_0x415d98)return console[_0x111555(0x155)](_0x111555(0x255)),console[_0x111555(0x155)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x111555(0x155)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x37c892)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x111555(0x2a1)),0x1;const _0x5d347f=await withSpinner(_0x111555(0x289)+_0x37c892+_0x111555(0x1f4),()=>_0x5942f8[_0x111555(0x1d7)][_0x111555(0x324)](_0x37c892),{'verbose':_0x24fbab[_0x111555(0x354)]}),_0x43579b=_0x5d347f['data'],_0x3e185c=await withSpinner(_0x111555(0x2e5)+_0x415d98+_0x111555(0x1f4),()=>_0x5942f8[_0x111555(0x318)]['get'](_0x43579b,_0x415d98),{'verbose':_0x24fbab['verbose']}),_0x451937=_0x3e185c[_0x111555(0x1be)];if(_0x24fbab[_0x111555(0x331)]||_0x24fbab[_0x111555(0x1a6)])await handleSDKOutput([_0x451937],_0x24fbab);else{console['log'](a31_0x34b79e['bold'](_0x451937['name'])+'\x20'+a31_0x34b79e[_0x111555(0x2de)](_0x111555(0x338)+_0x451937['id']+')'));_0x451937['description']&&console[_0x111555(0x20e)]('\x20\x20'+a31_0x34b79e[_0x111555(0x2de)](_0x451937[_0x111555(0x1b9)]));console[_0x111555(0x20e)]('\x20\x20'+a31_0x34b79e[_0x111555(0x29b)](_0x111555(0x18f))+'\x20'+(_0x451937[_0x111555(0x191)]?_0x111555(0x184):'no'));if(_0x451937[_0x111555(0x145)]&&_0x451937[_0x111555(0x145)]['length']>0x0)for(const _0x1563fc of _0x451937['tokens']){const _0x433f23=_0x1563fc[_0x111555(0x33d)]?.[_0x111555(0x1c4)]?_0x1563fc[_0x111555(0x33d)][_0x111555(0x2bf)](',\x20'):_0x111555(0x156);console[_0x111555(0x20e)]('\x20\x20'+a31_0x34b79e['cyan'](_0x111555(0x2a6))+'\x20'+_0x1563fc[_0x111555(0x24e)]+'\x20'+a31_0x34b79e[_0x111555(0x2de)]('(id:\x20'+_0x1563fc['id']+')')),console[_0x111555(0x20e)](_0x111555(0x1fb)+a31_0x34b79e[_0x111555(0x2de)](_0x111555(0x19c))+'\x20'+_0x433f23);}else console[_0x111555(0x20e)]('\x20\x20'+a31_0x34b79e[_0x111555(0x2de)](_0x111555(0x336)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{['name']=a31_0x14f6c9(0x294);[a31_0x14f6c9(0x1b9)]='Delete\x20a\x20personalization\x20service';async[a31_0x14f6c9(0x2f9)](_0x2f354f){const _0x12b210=a31_0x14f6c9,{options:_0x4c8e78,args:_0x4c7ab4,tdx:_0x1665fe}=_0x2f354f,_0x6ac2d9=_0x4c7ab4[0x0],_0x7daf53=_0x4c7ab4[0x1]||_0x4c8e78['parentSegment'];if(!_0x6ac2d9)return console['error'](_0x12b210(0x255)),console[_0x12b210(0x155)](_0x12b210(0x334)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x7daf53)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x12b210(0x311)),0x1;const _0x3ca34a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x7daf53+_0x12b210(0x1f4),()=>_0x1665fe[_0x12b210(0x1d7)]['resolveParentId'](_0x7daf53),{'verbose':_0x4c8e78[_0x12b210(0x354)]}),_0x2323c9=_0x3ca34a[_0x12b210(0x1be)];return await withSpinner(_0x12b210(0x187)+_0x6ac2d9+_0x12b210(0x1f4),()=>_0x1665fe['personalization'][_0x12b210(0x230)](_0x2323c9,_0x6ac2d9),{'verbose':_0x4c8e78['verbose']}),console['error'](_0x12b210(0x165)+_0x6ac2d9+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]='ps:pz:service:update';[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x323);async[a31_0x14f6c9(0x2f9)](_0x47d0d6){const _0x15ddc4=a31_0x14f6c9,{options:_0x5612cc,args:_0x406458,tdx:_0x5629a3}=_0x47d0d6,_0x218612=_0x5612cc,_0x17fb71=_0x406458[0x0],_0xaaa9bc=_0x406458[0x1]||_0x5612cc[_0x15ddc4(0x24b)];if(!_0x17fb71)return console[_0x15ddc4(0x155)](_0x15ddc4(0x255)),console[_0x15ddc4(0x155)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),console[_0x15ddc4(0x155)](_0x15ddc4(0x1dc)),0x1;if(!_0x218612[_0x15ddc4(0x24e)])return console['error'](_0x15ddc4(0x2c1)),console[_0x15ddc4(0x155)](_0x15ddc4(0x211)),0x1;if(!_0xaaa9bc)return showParentSegmentNotSetError(_0x15ddc4(0x15e)+_0x15ddc4(0x1dc)),0x1;const _0x1c3b2d=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xaaa9bc+_0x15ddc4(0x1f4),()=>_0x5629a3[_0x15ddc4(0x1d7)][_0x15ddc4(0x324)](_0xaaa9bc),{'verbose':_0x5612cc[_0x15ddc4(0x354)]}),_0x9a9501=_0x1c3b2d[_0x15ddc4(0x1be)],_0x2610eb={'name':_0x218612[_0x15ddc4(0x24e)]};_0x218612[_0x15ddc4(0x1b9)]!==undefined&&(_0x2610eb[_0x15ddc4(0x1b9)]=_0x218612[_0x15ddc4(0x1b9)]);const _0x4e5fc4=await withSpinner(_0x15ddc4(0x243)+_0x17fb71+_0x15ddc4(0x1f4),()=>_0x5629a3[_0x15ddc4(0x318)]['patch'](_0x9a9501,_0x17fb71,_0x2610eb),{'verbose':_0x5612cc[_0x15ddc4(0x354)]}),_0x368c04=_0x4e5fc4['data'];return console['error'](_0x15ddc4(0x309)+_0x368c04[_0x15ddc4(0x24e)]+'\x27'),await handleSDKOutput([_0x368c04],_0x5612cc),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x31c);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x24c);async[a31_0x14f6c9(0x2f9)](_0x529b12){const _0x3ea994=a31_0x14f6c9,{options:_0x195767,args:_0x31eb62,tdx:_0x2d40fc}=_0x529b12,_0x1cb0b3=_0x195767,_0x1634b4=_0x31eb62[0x0],_0x5f0fbf=_0x31eb62[0x1],_0x4649f3=_0x31eb62[0x2]||_0x195767[_0x3ea994(0x24b)];if(!_0x1634b4)return console[_0x3ea994(0x155)](_0x3ea994(0x259)),console[_0x3ea994(0x155)](_0x3ea994(0x355)),console[_0x3ea994(0x155)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5f0fbf)return console[_0x3ea994(0x155)](_0x3ea994(0x255)),console[_0x3ea994(0x155)](_0x3ea994(0x355)),console[_0x3ea994(0x155)](_0x3ea994(0x1f2)),0x1;if(!_0x4649f3)return showParentSegmentNotSetError(_0x3ea994(0x346)+_0x3ea994(0x1f2)),0x1;const _0xf50bbc=await withSpinner(_0x3ea994(0x289)+_0x4649f3+_0x3ea994(0x1f4),()=>_0x2d40fc[_0x3ea994(0x1d7)]['resolveParentId'](_0x4649f3),{'verbose':_0x195767[_0x3ea994(0x354)]}),_0x33fff2=_0xf50bbc[_0x3ea994(0x1be)],_0x5531f4={'name':_0x1634b4};_0x1cb0b3[_0x3ea994(0x33d)]&&(_0x5531f4['allowedIps']=_0x1cb0b3[_0x3ea994(0x33d)][_0x3ea994(0x2d4)](',')[_0x3ea994(0x20f)](_0x30e5ec=>_0x30e5ec[_0x3ea994(0x188)]()));_0x1cb0b3[_0x3ea994(0x1b9)]&&(_0x5531f4[_0x3ea994(0x1b9)]=_0x1cb0b3[_0x3ea994(0x1b9)]);const _0x3ea77a=await withSpinner(_0x3ea994(0x22f)+_0x1634b4+_0x3ea994(0x308)+_0x5f0fbf+_0x3ea994(0x1f4),()=>_0x2d40fc[_0x3ea994(0x318)]['createToken'](_0x33fff2,_0x5f0fbf,_0x5531f4),{'verbose':_0x195767['verbose']}),_0x2c8e93=_0x3ea77a[_0x3ea994(0x1be)];return console[_0x3ea994(0x155)]('✔\x20Created\x20token\x20\x27'+_0x2c8e93[_0x3ea994(0x24e)]+_0x3ea994(0x2f2)+_0x2c8e93['id']),_0x2c8e93[_0x3ea994(0x1cb)]&&(console['error'](a31_0x34b79e['yellow'](_0x3ea994(0x2c8))),console[_0x3ea994(0x155)](a31_0x34b79e[_0x3ea994(0x29b)](_0x2c8e93[_0x3ea994(0x1cb)])),console['error']('')),await handleSDKOutput([_0x2c8e93],_0x195767),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x2a7);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x2f3);async['execute'](_0xfa9570){const _0x478d8b=a31_0x14f6c9,{options:_0x46fcde,args:_0x1dcaa5,tdx:_0x4f527f}=_0xfa9570,_0xf9bfa8=_0x1dcaa5[0x0],_0x35c0d9=_0x1dcaa5[0x1]||_0x46fcde['parentSegment'];if(!_0xf9bfa8)return console[_0x478d8b(0x155)](_0x478d8b(0x16b)),console[_0x478d8b(0x155)](_0x478d8b(0x13e)),console[_0x478d8b(0x155)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x35c0d9)return showParentSegmentNotSetError(_0x478d8b(0x168)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x2f4b90=await withSpinner(_0x478d8b(0x289)+_0x35c0d9+_0x478d8b(0x1f4),()=>_0x4f527f[_0x478d8b(0x1d7)][_0x478d8b(0x324)](_0x35c0d9),{'verbose':_0x46fcde['verbose']}),_0x2dc632=_0x2f4b90[_0x478d8b(0x1be)],_0x2dfc03=await withSpinner(_0x478d8b(0x2a8),()=>_0x4f527f[_0x478d8b(0x318)][_0x478d8b(0x2b6)](_0x2dc632),{'verbose':_0x46fcde['verbose']}),_0x5df875=_0x2dfc03[_0x478d8b(0x1be)];let _0x34ec48;for(const _0x37056f of _0x5df875){if(_0x37056f['tokens']?.[_0x478d8b(0x1d3)](_0x11d255=>_0x11d255['id']===_0xf9bfa8)){_0x34ec48=_0x37056f['id'];break;}}if(!_0x34ec48)return console[_0x478d8b(0x155)](_0x478d8b(0x26c)+_0xf9bfa8+_0x478d8b(0x15c)),0x1;const _0x185b70=await withSpinner(_0x478d8b(0x1d8)+_0xf9bfa8+_0x478d8b(0x1f4),()=>_0x4f527f['personalization']['deleteToken'](_0x2dc632,_0x34ec48,_0xf9bfa8),{'verbose':_0x46fcde['verbose']}),_0x5afb9e=_0x185b70['data'];return console[_0x478d8b(0x155)]('✔\x20Deleted\x20token\x20\x27'+(_0x5afb9e['name']||_0xf9bfa8)+'\x27'),await handleSDKOutput([_0x5afb9e],_0x46fcde),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x196);['description']=a31_0x14f6c9(0x186);async['execute'](_0x5975f8){const _0x217c3c=a31_0x14f6c9,{options:_0x378bc2,args:_0x4c3f6d,tdx:_0x1e37b1}=_0x5975f8,_0x523ca8=_0x4c3f6d[0x0]||_0x378bc2[_0x217c3c(0x24b)];if(!_0x523ca8)return showParentSegmentNotSetError(_0x217c3c(0x2cb)+_0x217c3c(0x193)),0x1;const _0x27e5f7=await withSpinner(_0x217c3c(0x289)+_0x523ca8+_0x217c3c(0x1f4),()=>_0x1e37b1[_0x217c3c(0x1d7)][_0x217c3c(0x324)](_0x523ca8),{'verbose':_0x378bc2[_0x217c3c(0x354)]}),_0x443acd=_0x27e5f7[_0x217c3c(0x1be)],_0x3f599e=await withSpinner('Listing\x20personalizations\x20for\x20\x27'+_0x523ca8+'\x27...',()=>_0x1e37b1['personalization'][_0x217c3c(0x292)](_0x443acd),{'verbose':_0x378bc2['verbose']}),_0x240f29=_0x3f599e['data'];console[_0x217c3c(0x155)](_0x217c3c(0x34e)+_0x240f29[_0x217c3c(0x1c4)]+_0x217c3c(0x1e6)+(_0x240f29[_0x217c3c(0x1c4)]!==0x1?'s':''));if(_0x378bc2[_0x217c3c(0x2ef)]==='json'||_0x378bc2[_0x217c3c(0x2ef)]===_0x217c3c(0x1a6))await handleSDKOutput(_0x240f29,_0x378bc2);else{if(_0x240f29[_0x217c3c(0x1c4)]===0x0)console[_0x217c3c(0x20e)](_0x217c3c(0x1e7));else for(const _0x170f33 of _0x240f29){console[_0x217c3c(0x20e)](a31_0x34b79e[_0x217c3c(0x2be)](_0x170f33[_0x217c3c(0x24e)])+'\x20'+a31_0x34b79e[_0x217c3c(0x2de)](_0x217c3c(0x338)+_0x170f33['id']+')'));_0x170f33['description']&&console['log']('\x20\x20'+a31_0x34b79e[_0x217c3c(0x2de)](_0x170f33['description']));const _0x92446c=_0x170f33[_0x217c3c(0x1ea)]?.[_0x217c3c(0x1c4)]||0x0;console[_0x217c3c(0x20e)]('\x20\x20'+a31_0x34b79e[_0x217c3c(0x29b)]('sections:')+'\x20'+_0x92446c);if(_0x170f33[_0x217c3c(0x1ea)]&&_0x170f33[_0x217c3c(0x1ea)][_0x217c3c(0x1c4)]>0x0)for(const _0x31990b of _0x170f33[_0x217c3c(0x1ea)]){console[_0x217c3c(0x20e)](_0x217c3c(0x23c)+_0x31990b['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x1bd);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x22c);async[a31_0x14f6c9(0x2f9)](_0x2e4c27){const _0x134806=a31_0x14f6c9,{options:_0x127151,args:_0x5b8a2f,tdx:_0x5e8467}=_0x2e4c27,_0x28a8a8=_0x5b8a2f[0x0];if(!_0x28a8a8)return console['error'](_0x134806(0x34c)),console[_0x134806(0x155)](_0x134806(0x2b0)),0x1;const _0x289aa6=await withSpinner(_0x134806(0x1a5)+_0x28a8a8+_0x134806(0x1f4),()=>_0x5e8467[_0x134806(0x318)][_0x134806(0x214)](_0x28a8a8),{'verbose':_0x127151['verbose']}),_0x48364f=_0x289aa6[_0x134806(0x1be)];console[_0x134806(0x155)](_0x134806(0x192)+_0x48364f['name']+'\x27');if(_0x127151['format']===_0x134806(0x331)||_0x127151[_0x134806(0x2ef)]===_0x134806(0x1a6))await handleSDKOutput([_0x48364f],_0x127151);else{console[_0x134806(0x20e)](a31_0x34b79e['bold'](_0x48364f[_0x134806(0x24e)])+'\x20'+a31_0x34b79e['dim'](_0x134806(0x338)+_0x48364f['id']+')'));_0x48364f[_0x134806(0x1b9)]&&console[_0x134806(0x20e)]('\x20\x20'+a31_0x34b79e['dim'](_0x48364f[_0x134806(0x1b9)]));_0x48364f[_0x134806(0x341)]&&console[_0x134806(0x20e)]('\x20\x20'+a31_0x34b79e['cyan'](_0x134806(0x16d))+'\x20'+_0x48364f['audienceId']);console[_0x134806(0x20e)]('\x20\x20'+a31_0x34b79e['cyan'](_0x134806(0x29a))+'\x20'+_0x48364f[_0x134806(0x315)]),console[_0x134806(0x20e)]('\x20\x20'+a31_0x34b79e[_0x134806(0x29b)](_0x134806(0x2ab))+'\x20'+_0x48364f[_0x134806(0x234)]);const _0x15a12f=_0x48364f[_0x134806(0x1ea)]?.[_0x134806(0x1c4)]||0x0;console[_0x134806(0x20e)]('\x20\x20'+a31_0x34b79e[_0x134806(0x29b)](_0x134806(0x268))+'\x20'+_0x15a12f);if(_0x48364f[_0x134806(0x1ea)]&&_0x48364f[_0x134806(0x1ea)][_0x134806(0x1c4)]>0x0)for(const _0x409039 of _0x48364f[_0x134806(0x1ea)]){console[_0x134806(0x20e)]('\x20\x20\x20\x20'+a31_0x34b79e['bold'](_0x409039[_0x134806(0x24e)])+'\x20'+a31_0x34b79e[_0x134806(0x2de)](_0x134806(0x338)+_0x409039['id']+')')),_0x409039[_0x134806(0x283)]&&(console[_0x134806(0x20e)](_0x134806(0x1fe)+a31_0x34b79e[_0x134806(0x29b)](_0x134806(0x175))+'\x20'+_0x409039[_0x134806(0x283)]['name']),_0x409039[_0x134806(0x283)][_0x134806(0x2f0)]?.[_0x134806(0x1f0)]&&console[_0x134806(0x20e)](_0x134806(0x1b2)+a31_0x34b79e[_0x134806(0x29b)](_0x134806(0x33c))+'\x20'+_0x409039[_0x134806(0x283)][_0x134806(0x2f0)]['keyEventId'])),_0x409039[_0x134806(0x1eb)]&&console[_0x134806(0x20e)](_0x134806(0x1fe)+a31_0x34b79e['cyan'](_0x134806(0x32f))+'\x20'+JSON[_0x134806(0x28e)](_0x409039[_0x134806(0x1eb)])),_0x409039['includeSensitive']&&console['log']('\x20\x20\x20\x20\x20\x20'+a31_0x34b79e[_0x134806(0x29b)](_0x134806(0x247))+_0x134806(0x275));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]='ps:pz:delete';['description']='Delete\x20a\x20realtime\x20personalization';async[a31_0x14f6c9(0x2f9)](_0x4118f9){const _0x4844ff=a31_0x14f6c9,{options:_0x33fc0a,args:_0x205e0d,tdx:_0x56e1c2}=_0x4118f9,_0x323841=_0x205e0d[0x0];if(!_0x323841)return console[_0x4844ff(0x155)](_0x4844ff(0x34c)),console[_0x4844ff(0x155)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x4844ff(0x327)+_0x323841+'\x27...',()=>_0x56e1c2[_0x4844ff(0x318)][_0x4844ff(0x2d5)](_0x323841),{'verbose':_0x33fc0a[_0x4844ff(0x354)]}),console[_0x4844ff(0x155)](_0x4844ff(0x1d5)+_0x323841+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x171);['description']=a31_0x14f6c9(0x1a9);async[a31_0x14f6c9(0x2f9)](_0x1da067){const _0x235f55=a31_0x14f6c9,{options:_0x9d837a,tdx:_0xa2c648}=_0x1da067,_0x1529c2=_0x9d837a;let _0x2a9eb4;if(_0x1529c2[_0x235f55(0x201)]){_0x2a9eb4=await loadJSON(_0x1529c2[_0x235f55(0x201)],!![]);if(!_0x2a9eb4[_0x235f55(0x2bd)]?.[_0x235f55(0x161)])return console[_0x235f55(0x155)](_0x235f55(0x150)),console[_0x235f55(0x155)](_0x235f55(0x357)),console[_0x235f55(0x155)](_0x235f55(0x167)),0x1;}else{if(!_0x1529c2[_0x235f55(0x24e)])return console['error'](_0x235f55(0x1aa)),console[_0x235f55(0x155)](_0x235f55(0x29e)),console['error'](_0x235f55(0x220)),0x1;if(_0x1529c2[_0x235f55(0x1b9)]===undefined)return console['error'](_0x235f55(0x17e)),console[_0x235f55(0x155)](_0x235f55(0x29e)),console[_0x235f55(0x155)](_0x235f55(0x220)),0x1;if(_0x1529c2[_0x235f55(0x153)]===undefined)return console[_0x235f55(0x155)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error'](_0x235f55(0x17c)),0x1;let _0xc79bb=_0x1529c2[_0x235f55(0x341)];if(!_0xc79bb&&_0x9d837a[_0x235f55(0x24b)]){const _0x5e7159=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x9d837a[_0x235f55(0x24b)]+_0x235f55(0x1f4),()=>_0xa2c648[_0x235f55(0x1d7)][_0x235f55(0x324)](_0x9d837a[_0x235f55(0x24b)]),{'verbose':_0x9d837a[_0x235f55(0x354)]});_0xc79bb=_0x5e7159['data'];}let _0x282d17;_0x1529c2[_0x235f55(0x1ea)]&&(_0x282d17=await loadJSON(_0x1529c2[_0x235f55(0x1ea)],![]));const _0x33be97=_0x1529c2[_0x235f55(0x153)]==='null'?null:{'id':_0x1529c2['folderId'],'type':_0x235f55(0x33a)};_0x2a9eb4={'attributes':{'name':_0x1529c2[_0x235f55(0x24e)],'description':_0x1529c2[_0x235f55(0x1b9)]||null,..._0xc79bb!==undefined&&{'audienceId':_0xc79bb},..._0x282d17!==undefined&&{'sections':_0x282d17}},'relationships':{'parentFolder':{'data':_0x33be97}}};}const _0x79f0c0=await withSpinner(_0x235f55(0x2e1)+(_0x2a9eb4['attributes']?.[_0x235f55(0x24e)]??'')+_0x235f55(0x1f4),()=>_0xa2c648[_0x235f55(0x318)][_0x235f55(0x204)](_0x2a9eb4),{'verbose':_0x9d837a[_0x235f55(0x354)]}),_0x145527=_0x79f0c0[_0x235f55(0x1be)];return console['error']('✔\x20Created\x20personalization\x20\x27'+_0x145527['name']+_0x235f55(0x2f2)+_0x145527['id']),await handleSDKOutput([_0x145527],_0x9d837a),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x14f6c9(0x34f);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x239);async['execute'](_0x3f14e3){const _0x31e1ca=a31_0x14f6c9,{options:_0x1afd9c,args:_0x45f584}=_0x3f14e3,_0x212766=_0x1afd9c,_0x2baced=_0x45f584[0x0];if(!_0x2baced)return console[_0x31e1ca(0x155)](_0x31e1ca(0x34c)),console[_0x31e1ca(0x155)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x31e1ca(0x155)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>'),0x1;let _0x42a718;if(_0x212766[_0x31e1ca(0x201)])_0x42a718=await loadJSON(_0x212766[_0x31e1ca(0x201)],!![]);else{if(!_0x212766[_0x31e1ca(0x24e)])return console[_0x31e1ca(0x155)](_0x31e1ca(0x1aa)),console[_0x31e1ca(0x155)](_0x31e1ca(0x2c6)),0x1;if(_0x212766[_0x31e1ca(0x1b9)]===undefined)return console[_0x31e1ca(0x155)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0x31e1ca(0x2c6)),0x1;let _0x39307f;_0x212766[_0x31e1ca(0x1ea)]&&(_0x39307f=await loadJSON(_0x212766[_0x31e1ca(0x1ea)],![])),_0x42a718={'attributes':{'name':_0x212766['name'],'description':_0x212766[_0x31e1ca(0x1b9)]||null,..._0x39307f!==undefined&&{'sections':_0x39307f}}};}const {tdx:_0x18ae37}=_0x3f14e3,_0x57242e=await withSpinner(_0x31e1ca(0x1b7)+_0x2baced+_0x31e1ca(0x1f4),()=>_0x18ae37[_0x31e1ca(0x318)][_0x31e1ca(0x30d)](_0x2baced,_0x42a718),{'verbose':_0x1afd9c[_0x31e1ca(0x354)]}),_0x4cb6d0=_0x57242e[_0x31e1ca(0x1be)];return console[_0x31e1ca(0x155)]('✔\x20Updated\x20personalization\x20\x27'+_0x4cb6d0['name']+_0x31e1ca(0x169)+_0x4cb6d0['id']+')'),await handleSDKOutput([_0x4cb6d0],_0x1afd9c),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x14f6c9(0x24e)]=a31_0x14f6c9(0x1f9);[a31_0x14f6c9(0x1b9)]=a31_0x14f6c9(0x146);async[a31_0x14f6c9(0x2f9)](_0x6b088b){const _0x2c99ef=a31_0x14f6c9,{options:_0x230f27,args:_0x427875}=_0x6b088b,_0x43ecd6=_0x427875[0x0]||_0x230f27[_0x2c99ef(0x24b)];if(!_0x43ecd6)return showParentSegmentNotSetError(_0x2c99ef(0x17b)+_0x2c99ef(0x2ff)),0x1;const _0x16ed50=resolveYamlFile(_0x43ecd6);if(!existsSync(_0x16ed50))return showFileNotFoundError(_0x16ed50,_0x43ecd6),0x1;let _0x520b80;try{_0x520b80=readFileSync(_0x16ed50,_0x2c99ef(0x342));}catch(_0x1027ac){const _0x1a5d73=_0x1027ac instanceof Error?_0x1027ac['message']:String(_0x1027ac);return console[_0x2c99ef(0x155)]('Error\x20reading\x20file:\x20'+_0x1a5d73),0x1;}let _0x56f61b;try{_0x56f61b=parseDef(_0x520b80);}catch(_0x150f46){const _0x2f3c2e=_0x150f46 instanceof Error?_0x150f46[_0x2c99ef(0x2b5)]:String(_0x150f46);return console['error'](a31_0x34b79e[_0x2c99ef(0x152)](_0x2c99ef(0x1ff)+_0x2f3c2e)),0x1;}if(_0x56f61b['personalization_services']&&_0x56f61b[_0x2c99ef(0x15a)]['length']>0x0)return console['error'](a31_0x34b79e[_0x2c99ef(0x26d)]('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x16ed50)),console[_0x2c99ef(0x155)](a31_0x34b79e[_0x2c99ef(0x2de)](_0x2c99ef(0x2f6)+_0x56f61b[_0x2c99ef(0x15a)][_0x2c99ef(0x1c4)]+_0x2c99ef(0x228))),0x1;!_0x56f61b[_0x2c99ef(0x159)]&&(_0x56f61b[_0x2c99ef(0x159)]={'events':[{'name':'page_view','source_table':'<database>.<table>'}],'attributes':[{'name':_0x2c99ef(0x13f),'type':_0x2c99ef(0x305)}],'id_stitching':{'primary_key':_0x56f61b[_0x2c99ef(0x27c)][_0x2c99ef(0x2f4)]===_0x2c99ef(0x14a)?_0x2c99ef(0x2ae):_0x2c99ef(0x232)}});_0x56f61b['personalization_services']=[{'name':_0x2c99ef(0x1ca),'description':_0x2c99ef(0x31f),'trigger_event':'page_view','sections':[{'name':_0x2c99ef(0x291),'criteria':_0x2c99ef(0x278),'attributes':[_0x2c99ef(0x13f)]}]}];const _0x2515d1=serializeDef(_0x56f61b);return writeFileSync(_0x16ed50,_0x2515d1,_0x2c99ef(0x342)),console[_0x2c99ef(0x155)](a31_0x34b79e['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x34b79e[_0x2c99ef(0x29b)](_0x16ed50)),(!_0x56f61b[_0x2c99ef(0x159)]||_0x520b80[_0x2c99ef(0x335)](_0x2c99ef(0x22a))===-0x1)&&console['error'](a31_0x34b79e[_0x2c99ef(0x181)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console['error']('\x0a'+a31_0x34b79e[_0x2c99ef(0x2de)]('Next\x20steps:')),console['error'](_0x2c99ef(0x304)+_0x16ed50+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x2c99ef(0x155)](_0x2c99ef(0x34b)+a31_0x34b79e[_0x2c99ef(0x2de)]('tdx\x20ps\x20push\x20'+_0x43ecd6)+_0x2c99ef(0x307)),0x0;}}
1
+ const a31_0x5650b1=a31_0xb690;(function(_0x2e3a49,_0x1ffd8b){const _0x1182a0=a31_0xb690,_0x53c47b=_0x2e3a49();while(!![]){try{const _0xc2cb77=-parseInt(_0x1182a0(0x1b5))/0x1*(parseInt(_0x1182a0(0x194))/0x2)+-parseInt(_0x1182a0(0x35f))/0x3*(parseInt(_0x1182a0(0x15e))/0x4)+-parseInt(_0x1182a0(0x22e))/0x5+-parseInt(_0x1182a0(0x216))/0x6+parseInt(_0x1182a0(0x2e5))/0x7+-parseInt(_0x1182a0(0x19c))/0x8*(-parseInt(_0x1182a0(0x211))/0x9)+parseInt(_0x1182a0(0x221))/0xa*(parseInt(_0x1182a0(0x1cd))/0xb);if(_0xc2cb77===_0x1ffd8b)break;else _0x53c47b['push'](_0x53c47b['shift']());}catch(_0x59d412){_0x53c47b['push'](_0x53c47b['shift']());}}}(a31_0x38b4,0x312d9));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x52b0aa from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';function a31_0x38b4(){const _0x291a95=['win32','Creating\x20token\x20\x27','Fetching\x20sample\x20data...','Creating','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','.customers)','displayRealtimeInfo','log','Aborted.','ps:pz:service:create','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','foreignKey','joinKey','/\x20directory.\x0a','stageCount','Error:\x20Personalization\x20ID\x20is\x20required','totalEvents','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Creating\x20personalization\x20\x27','Creating\x20personalization\x20service\x20\x27','create','cyan','sections:','getCurrentConfigVersion','any','\x20\x202.\x20Run\x20','\x0a\x20\x20\x20\x20]','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','YAML\x20file:\x20','data','utf-8','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','\x20+\x20[','previewParentYaml','\x20stage','✔\x20Renamed\x20directory\x20to\x20','payload','\x20\x20\x20\x20-\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','customerPercent','Master:','createToken','ps:pz:service:list','displayPreviewHints','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','interval','identifier','Create\x20a\x20realtime\x20personalization\x20entity','✔\x20Found\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','green','column_name','in\x20','primaryKey','\x20[Job\x20ID:\x20','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','✔\x20Created\x20token\x20\x27','Attributes','errors','text','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','scheduleType','string','reduce','query','keyEventId','\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','Listing\x20fields\x20for\x20\x27','schemaError','tdx\x20ps\x20preview\x20','value','user_id','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Join:','parentSegment','segment:parent:validate','⚡\x20Not\x20enabled','stitchingKeys','Parent\x20segment:\x20','table','attributes','Show\x20parent\x20segment\x20schema\x20(column\x20types)','SQL\x20query:\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','delete','eventKind:\x20','ps:pz:create','personalization','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','{\x0a\x20\x20\x22database\x22:\x20\x22','sampleData','/\x20→\x20','paused','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','.yml','toLocaleString','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','processedRows','✔\x20Updated\x20parent\x20segment\x20\x27','workflowId','315392yFdouX','Creating\x20parent\x20segment\x20\x27','Getting\x20personalization\x20\x27','format','trim','yes','%)\x20','Validating\x20RT\x20configuration...','\x20\x20\x20\x20\x20\x20\x20\x20','Apply\x20changes\x20to\x20\x27','\x20--attribute\x20\x22','using\x20the\x20default\x20path:\x20','resolveParentId','updatedAt','\x20\x20Columns:\x20','\x20=\x20','ps:rt:list','No\x20personalizations\x20configured','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','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','Pause\x20activations\x20in\x20an\x20RT\x20journey','\x20service(s)\x20configured','start','dim','personalizationServices','-1d','collectSchema','Listing\x20personalization\x20services\x20for\x20\x27','Error:\x20--database\x20and\x20--table\x20are\x20required','audienceId:','Deleting\x20personalization\x20\x27','segment:parent:fields','Available\x20behaviors:','To\x20view\x20sample\x20data:','ps:pz:service:token:delete','type','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','darwin','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','session','Fetching\x20personalization\x20service\x20\x27','information_schema','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Error:\x20Service\x20ID\x20is\x20required','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','FINISHED','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','getBehaviorNames','Join\x20on:','Columns:','allValid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','file','ps:rt:validate','map','Executing\x20parent\x20segment\x20query...','id:\x20','red','\x20(paused)','segment:parent:create','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','ignore','pullParentYaml','parent_id','jobId','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Master\x20+\x20Attributes','Listing\x20personalizations\x20for\x20\x27','null','addBehaviorsFile','eventKind','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Delete\x20a\x20personalization\x20service','json','\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','get','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','\x0aError:','filter','segment:parent:view','listPersonalizations','Attributes:','\x20\x20Database:\x20','parent_segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','\x20--behavior\x20\x22','last_page_viewed','Validate:','status','token:','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Finding\x20service\x20for\x20token...','Error\x20reading\x20file:\x20','Master\x20Table','\x20true','Get\x20SQL\x20query\x20for\x20parent\x20segment','\x20service','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','No\x20RT-enabled\x20parent\x20segments\x20found','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','Personalization:','toFixed','personalization_services','addAttributesFile','customerGroup','validateParentYaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Error:\x20Service\x20name\x20is\x20required','Personalization\x20service\x20description','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','identifier:\x20','Fetching\x20parent\x20segment\x20\x27','\x5c$&','\x0aChanges\x20to\x20\x27','\x20rows\x20','segment:parent:show','ps:pz:delete','addAttributes','\x0a\x20\x20\x20\x20}','parent_segments','keyEventCriteria','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','282JFTsiJ','test','launched','push','✔\x20Retrieved\x20RT\x20configuration\x20version','some','allowed\x20IPs:','\x27\x20for\x20service\x20\x27','\x20\x20\x20\x20','\x20configured','setJobId','segment:parent:update','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','rowCount','created:','column_type','\x0a⚠️\x20\x20Migrating:\x20','\x20\x20Note:\x20','segment:parent:run','displaySummary','/sessions/','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','ps:pz:list','bold','dirname','jsonl','matchedCount','\x20\x20\x20\x20\x20\x20','workflowAttemptId','\x20is\x20already\x20up\x20to\x20date','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','10884LFbRNG','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','state','Listing\x20RT\x20journeys\x20for\x20\x27','\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','realtime_enabled','Errors:','tdx\x20ps\x20push\x20','formatSchemaJson','Default','ps:pz:service:delete','execute','SELECT\x20*\x20FROM\x20','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','ps:rt:jn:pause','displayBehaviorsStats','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','stats','schemaValid','verbose','✔\x20Query\x20completed:\x20Processed\x20','enriched','Error:\x20File\x20not\x20found:\x20','workflowSessionId','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Name:\x20','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','indexOf','\x20RT\x20journey','toLowerCase','name','Pattern:\x20','/app/workflows/','ps:rt:jn:resume','\x20rows)','behaviorsFile','yellow','getParentSQL','No\x20parent\x20segments\x20found','Listing\x20RT-enabled\x20parent\x20segments...','sections','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','<database>.<table>','tokens','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','\x27\x20and\x20run\x20workflow?','✔\x20Deleted\x20token\x20\x27','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','✔\x20Created\x20personalization\x20service\x20\x27','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Create\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','1822VHmwmF','Preview:','segment:parent:sql','Session:','run','\x27...','elapsedTimeMillis','Error:\x20Parent\x20segment\x20name\x20is\x20required','13112qvKPmR','Deleting\x20personalization\x20service\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','includeSensitive:','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','\x20RT-enabled\x20parent\x20segment','column','attribute','parentFolder','no\x20tokens\x20configured','Fetching\x20behavior\x20list...','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','\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','\x27\x20is\x20up\x20to\x20date','allowedIps','No\x20personalization\x20services\x20configured','behavior','Error:','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','Attempt:','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','✔\x20Created\x20personalization\x20\x27','true','Rows:','269QKHpWL','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Analyzing\x20changes...','apply','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x20kill','timezone','site','createPersonalization','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','repeat','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','status:\x20','customersWithEvents','\x27\x20(id:\x20','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','customerGroupFile','Behaviors','output','updated:','\x27\x20with\x20ID:\x20','single','Fetching\x20SQL\x20for\x20\x27','341DrqEOT','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','stop','\x20to\x20configure\x20your\x20personalization\x20service','error','Options\x20(one\x20required):\x0a','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','/\x20directories\x20exist.','segment:parent:list','✔\x20Updated\x20personalization\x20service\x20\x27','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','keys','Resume\x20activations\x20in\x20an\x20RT\x20journey','message','realtime','audienceId','Created','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','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','varchar','displayColumns','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','\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','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','✔\x20Updated\x20personalization\x20\x27','ps:rt:jn:list','getPersonalization','public','platform','open','split','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','Options:','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','/app/dw/parentSegments/','limit','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','`\x20to\x20download\x20the\x20configuration\x20first','Events:','displayPreviewResults','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','displayAttributesStats','sourceTableValid','folderId','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','master','\x20parent\x20segment','Patching\x20personalization\x20\x27','attributesFile','\x22,\x20\x22type\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','/\x20and\x20','Source:','use','Validating\x20configuration...','\x20--behavior\x20\x22<name>\x22','Updating','idStitching','\x0aUsage:\x20tdx\x20ps\x20preview\x20','label','number','keyEventId:','✘\x20Failed\x20to\x20rename\x20directory:\x20','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','relationships','Audience\x20ID:','Error\x20parsing\x20YAML:\x20','SELECT\x20*\x20FROM\x20(\x0a','369wIYJQb','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','(id:\x20','Fetching\x20customers\x20schema...','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','1046640mMvlZS','join','customers','\x0a✔\x20Workflow\x20started','Error:\x20--behavior\x20requires\x20a\x20name\x0a','columns','pushParentYaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','endsWith','segment:parent:desc','displayValidateResults','371390HWKaMG','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','\x20Added\x20personalization\x20template\x20to\x20','runParent','stringify','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Listing\x20parent\x20segments...','Overwrite\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','coveragePercent','Listing\x20parent\x20segments\x20matching\x20\x27','.yaml','RT\x202.0:','1934290taUGuQ','Status:','\x20parent\x20segment\x20\x27','all','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Options:\x0a','My\x20Service','Attribute:','\x20personalization\x20service','List\x20parent\x20segments','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','valid','database','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','localeCompare','createdAt','resumeJourney','RT\x202.0\x20Validate:','description','\x20Added\x20RT\x202.0\x20template\x20section','\x0aChanges\x20to\x20apply\x20to\x20\x27','list','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','sourceTableError','Coverage:','sort','population','listFields','replace','events','Error:\x20Token\x20name\x20is\x20required','includeSensitive','Fetching\x20current\x20configuration\x20for\x20\x27','entryCriteria','\x0a⚠️\x20\x20Both\x20','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','isDirectory','No\x20RT\x20journeys\x20found','RT\x20Journey\x20ID:\x20','Updating\x20personalization\x20service\x20\x27','\x20behaviors','updateParent','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','behaviors','behavior_','payload:','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','page_view','\x27\x20is\x20already\x20up\x20to\x20date','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','patchPersonalization','\x0aNew\x20parent\x20segment\x20\x27','scheduleOption','Updated','List\x20RT\x20journeys','\x20\x201.\x20Edit\x20','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Found\x20YAML\x20file:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','Delete\x20a\x20realtime\x20personalization','displayMasterInfo','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Resolving\x20parent\x20segment\x20\x27','Site:\x20','Error:\x20--name\x20is\x20required','double','displaySampleData','\x0a\x20\x20]\x0a}\x0a','getParentFull','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x20to\x20push\x20the\x20configuration','Updating\x20parent\x20segment\x20\x27','length','segment','Behavior:','\x20\x20No\x20sample\x20data\x20available','Available\x20attributes:'];a31_0x38b4=function(){return _0x291a95;};return a31_0x38b4();}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_0x4baf7b 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_0x5650b1(0x35c),LEGACY_PARENT_SEGMENT_DIR=a31_0x5650b1(0x338);function openBrowser(_0x3e77d4){const _0x2f89de=a31_0x5650b1,_0x3cbc50=process[_0x2f89de(0x1e9)],_0x164c96=_0x3cbc50===_0x2f89de(0x30a)?_0x2f89de(0x1ea):_0x3cbc50===_0x2f89de(0x27d)?'start':'xdg-open';spawn(_0x164c96,[_0x3e77d4],{'detached':!![],'stdio':_0x2f89de(0x322)})['unref']();}function migrateLegacyDirectory(){const _0x50a041=a31_0x5650b1;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x1024ac=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x1024ac[_0x50a041(0x252)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x50a041(0x1d1)](a31_0x4baf7b[_0x50a041(0x184)](_0x50a041(0x250)+LEGACY_PARENT_SEGMENT_DIR+_0x50a041(0x200)+PARENT_SEGMENT_DIR+_0x50a041(0x1d4))),console[_0x50a041(0x1d1)](a31_0x4baf7b[_0x50a041(0x2fc)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x50a041(0x28c))),![];console[_0x50a041(0x1d1)](a31_0x4baf7b[_0x50a041(0x184)](_0x50a041(0x14f)+LEGACY_PARENT_SEGMENT_DIR+_0x50a041(0x2db)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x50a041(0x1d1)](a31_0x4baf7b[_0x50a041(0x2b1)](_0x50a041(0x2a2)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x404a9c){const _0xf21c68=_0x404a9c instanceof Error?_0x404a9c[_0x50a041(0x1da)]:String(_0x404a9c);return console[_0x50a041(0x1d1)](a31_0x4baf7b[_0x50a041(0x31e)](_0x50a041(0x20b)+_0xf21c68+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x14e9b9){const _0x4f861d=a31_0x5650b1;return migrateLegacyDirectory(),super[_0x4f861d(0x198)](_0x14e9b9);}}function resolveYamlFile(_0x578406){const _0x402b62=a31_0x5650b1;if(_0x578406[_0x402b62(0x21e)]('.yml')||_0x578406[_0x402b62(0x21e)](_0x402b62(0x22c)))return _0x578406;return a31_0x52b0aa[_0x402b62(0x217)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x578406)+_0x402b62(0x2de));}function formatProgressMessage(_0xc0c7d8){const _0x596d68=a31_0x5650b1,_0x56a50f=_0xc0c7d8['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x56a50f){const [,_0x400a43,_0x16a231,_0x39f338='']=_0x56a50f;return a31_0x4baf7b[_0x596d68(0x2fc)](_0x400a43+':')+'\x20'+_0x16a231+a31_0x4baf7b[_0x596d68(0x2fc)](_0x39f338);}return a31_0x4baf7b[_0x596d68(0x2fc)](_0xc0c7d8);}function showFileNotFoundError(_0x97461f,_0x47b16f){const _0x5190e0=a31_0x5650b1;console[_0x5190e0(0x1d1)](a31_0x4baf7b[_0x5190e0(0x31e)](_0x5190e0(0x174)+_0x97461f+'\x0a')),console[_0x5190e0(0x1d1)](a31_0x4baf7b[_0x5190e0(0x294)](_0x5190e0(0x238)+_0x47b16f+_0x5190e0(0x1f2)));}function displayRealtimeValidation(_0x265db2){const _0x281b9b=a31_0x5650b1;if(!_0x265db2[_0x281b9b(0x1db)])return;const _0x125595=_0x265db2[_0x281b9b(0x1db)],_0x4e8e41=_0x125595['enabled']?a31_0x4baf7b['green']('⚡\x20Enabled'):a31_0x4baf7b[_0x281b9b(0x184)](_0x281b9b(0x2cc));console['error']('\x0a'+a31_0x4baf7b[_0x281b9b(0x2fc)](_0x281b9b(0x22d))+'\x20'+_0x4e8e41);if(_0x125595[_0x281b9b(0x24b)]&&_0x125595[_0x281b9b(0x24b)][_0x281b9b(0x278)]>0x0){console[_0x281b9b(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x281b9b(0x2fc)](_0x281b9b(0x1f3))+'\x20'+_0x125595[_0x281b9b(0x24b)][_0x281b9b(0x278)]+_0x281b9b(0x147));for(const _0x163d61 of _0x125595[_0x281b9b(0x24b)]){const _0x4ea591=_0x163d61[_0x281b9b(0x1f7)]===![]?a31_0x4baf7b[_0x281b9b(0x31e)]('✘'):a31_0x4baf7b[_0x281b9b(0x2b1)]('✔');console[_0x281b9b(0x1d1)](_0x281b9b(0x146)+_0x4ea591+'\x20'+_0x163d61['name']),_0x163d61[_0x281b9b(0x245)]&&console['error']('\x20\x20\x20\x20\x20\x20'+a31_0x4baf7b[_0x281b9b(0x31e)](_0x163d61['sourceTableError']));}}if(_0x125595['attributes']&&_0x125595[_0x281b9b(0x2d0)][_0x281b9b(0x278)]>0x0){console['error']('\x20\x20'+a31_0x4baf7b[_0x281b9b(0x2fc)](_0x281b9b(0x336))+'\x20'+_0x125595[_0x281b9b(0x2d0)][_0x281b9b(0x278)]+'\x20configured');for(const _0x20142d of _0x125595[_0x281b9b(0x2d0)]){const _0x54b5bd=_0x20142d[_0x281b9b(0x239)]?a31_0x4baf7b[_0x281b9b(0x2b1)]('✔'):a31_0x4baf7b[_0x281b9b(0x31e)]('✘');console[_0x281b9b(0x1d1)](_0x281b9b(0x146)+_0x54b5bd+'\x20'+_0x20142d[_0x281b9b(0x17e)]+'\x20'+a31_0x4baf7b[_0x281b9b(0x2fc)]('('+_0x20142d[_0x281b9b(0x308)]+')'));}}if(_0x125595[_0x281b9b(0x206)]){const _0x499c34=_0x125595[_0x281b9b(0x206)][_0x281b9b(0x2cd)]?.[_0x281b9b(0x278)]?_0x281b9b(0x29f)+_0x125595[_0x281b9b(0x206)][_0x281b9b(0x2cd)][_0x281b9b(0x217)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x4baf7b[_0x281b9b(0x2fc)]('ID\x20Stitching:')+'\x20'+_0x125595[_0x281b9b(0x206)][_0x281b9b(0x2b4)]+_0x499c34);}if(_0x125595[_0x281b9b(0x2fd)]&&_0x125595[_0x281b9b(0x2fd)][_0x281b9b(0x278)]>0x0){console[_0x281b9b(0x1d1)]('\x20\x20'+a31_0x4baf7b['dim'](_0x281b9b(0x349))+'\x20'+_0x125595[_0x281b9b(0x2fd)]['length']+_0x281b9b(0x345)+(_0x125595[_0x281b9b(0x2fd)][_0x281b9b(0x278)]!==0x1?'s':''));for(const _0x2c2062 of _0x125595[_0x281b9b(0x2fd)]){console[_0x281b9b(0x1d1)](_0x281b9b(0x2a4)+_0x2c2062[_0x281b9b(0x17e)]);}}}function showParentSegmentNotSetError(_0x3cf77f){const _0x492a6d=a31_0x5650b1;console['error'](a31_0x4baf7b[_0x492a6d(0x184)](_0x492a6d(0x215))),console[_0x492a6d(0x1d1)](_0x3cf77f);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x1d5);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x237);async[a31_0x5650b1(0x169)](_0x196676){const _0xbc92fb=a31_0x5650b1,{options:_0x4cbff7,args:_0x3cf6e1,tdx:_0x3e7ebb}=_0x196676,_0x5e3d19=_0x3cf6e1[0x0];_0x4cbff7[_0xbc92fb(0x171)]&&(console[_0xbc92fb(0x1d1)](_0xbc92fb(0x26f)+_0x4cbff7[_0xbc92fb(0x1bc)]),_0x5e3d19&&console[_0xbc92fb(0x1d1)](_0xbc92fb(0x17f)+_0x5e3d19));const _0x406ed4=await withSpinner(_0x5e3d19?_0xbc92fb(0x22b)+_0x5e3d19+'\x27...':_0xbc92fb(0x227),()=>_0x3e7ebb[_0xbc92fb(0x279)]['listParents'](),{'verbose':_0x4cbff7[_0xbc92fb(0x171)]});let _0x4abe2a=_0x406ed4[_0xbc92fb(0x29c)];if(_0x5e3d19){const _0x503c66=_0x5e3d19['replace'](/[.+^${}()|[\]\\]/g,_0xbc92fb(0x355))[_0xbc92fb(0x24a)](/\*/g,'.*')[_0xbc92fb(0x24a)](/\?/g,'.'),_0x2ea5d1=new RegExp('^'+_0x503c66+'$','i');_0x4abe2a=_0x4abe2a['filter'](_0x241724=>_0x2ea5d1[_0xbc92fb(0x360)](_0x241724['attributes']['name']));}_0x4abe2a[_0xbc92fb(0x247)]((_0x3a02b9,_0x2948e4)=>_0x3a02b9[_0xbc92fb(0x2d0)][_0xbc92fb(0x17e)][_0xbc92fb(0x23c)](_0x2948e4[_0xbc92fb(0x2d0)][_0xbc92fb(0x17e)])),console[_0xbc92fb(0x1d1)](_0xbc92fb(0x2af)+_0x4abe2a[_0xbc92fb(0x278)]+_0xbc92fb(0x1fb)+(_0x4abe2a[_0xbc92fb(0x278)]!==0x1?'s':''));const _0x57f40f=_0x386ddd=>{const _0xc4e8b7=_0xbc92fb;return getConsoleNextUrl(_0x4cbff7['site'],_0xc4e8b7(0x1ef)+_0x386ddd);};if(_0x4cbff7[_0xbc92fb(0x2e8)]===_0xbc92fb(0x32e)||_0x4cbff7[_0xbc92fb(0x2e8)]==='jsonl'){const _0x22c47d=_0x4abe2a[_0xbc92fb(0x31b)](_0x58ebdc=>({..._0x58ebdc,'url':_0x57f40f(_0x58ebdc['id'])}));await handleSDKOutput(_0x22c47d,_0x4cbff7);}else{if(_0x4abe2a[_0xbc92fb(0x278)]===0x0)_0x5e3d19?console[_0xbc92fb(0x286)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x5e3d19):console['log'](_0xbc92fb(0x186));else for(const _0x530e63 of _0x4abe2a){const _0x5a151a=_0x530e63[_0xbc92fb(0x2d0)]['population']?a31_0x4baf7b['dim']('\x20('+formatRows(_0x530e63['attributes'][_0xbc92fb(0x248)])+')'):'',_0x2ecc80=hyperlink(_0x530e63[_0xbc92fb(0x2d0)]['name'],_0x57f40f(_0x530e63['id']));console['log']('👥\x20'+_0x2ecc80+_0x5a151a);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a31_0x5650b1(0x320);['description']=a31_0x5650b1(0x179);async[a31_0x5650b1(0x169)](_0x21a331){const _0x42070e=a31_0x5650b1,{options:_0x46062a,args:_0x3ba864,tdx:_0x414e79}=_0x21a331;console['error']('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x42070e(0x212));const _0x348fb1=_0x46062a;if(_0x3ba864['length']===0x0)return console['error'](a31_0x4baf7b[_0x42070e(0x31e)](_0x42070e(0x19b))),console['error']('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x4c54e8=_0x3ba864[0x0];if(!_0x348fb1[_0x42070e(0x23a)]||!_0x348fb1['table'])return console['error'](_0x42070e(0x301)),console['error']('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x348fb1[_0x42070e(0x171)]&&(console[_0x42070e(0x1d1)]('Site:\x20'+_0x348fb1[_0x42070e(0x1bc)]),console[_0x42070e(0x1d1)](_0x42070e(0x178)+_0x4c54e8),console[_0x42070e(0x1d1)]('Database:\x20'+_0x348fb1[_0x42070e(0x23a)]),console[_0x42070e(0x1d1)]('Table:\x20'+_0x348fb1[_0x42070e(0x2cf)]));const _0x143bb2=await loadJSONFromOptions(_0x348fb1[_0x42070e(0x2d0)],_0x348fb1[_0x42070e(0x1fd)]),_0x46ccd5=await loadJSONFromOptions(_0x348fb1[_0x42070e(0x259)],_0x348fb1[_0x42070e(0x183)]),_0x1da833=await loadJSONFromOptions(_0x348fb1[_0x42070e(0x34d)],_0x348fb1[_0x42070e(0x1c6)]),_0x35486f={'name':_0x4c54e8,'description':_0x348fb1[_0x42070e(0x240)],'scheduleType':_0x348fb1[_0x42070e(0x2bd)],'scheduleOption':_0x348fb1[_0x42070e(0x262)],'timezone':_0x348fb1['timezone'],'master':{'parentDatabaseName':_0x348fb1['database'],'parentTableName':_0x348fb1['table']},'attributes':_0x143bb2,'behaviors':_0x46ccd5,'customerGroup':_0x1da833},_0x342a30=await withSpinner(_0x42070e(0x2e6)+_0x4c54e8+_0x42070e(0x199),()=>_0x414e79['segment']['createParent'](_0x35486f),{'verbose':_0x46062a[_0x42070e(0x171)]}),_0x1eb60c=_0x342a30[_0x42070e(0x29c)];return console['error']('✔\x20Created\x20parent\x20segment\x20\x27'+_0x1eb60c[_0x42070e(0x17e)]+'\x27\x20with\x20ID:\x20'+_0x1eb60c['id']),await handleSDKOutput([_0x1eb60c],_0x46062a),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x149);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x1b1);async[a31_0x5650b1(0x169)](_0x44f4a4){const _0x4347f3=a31_0x5650b1,{options:_0x28693a,args:_0x595533,tdx:_0x32bf53}=_0x44f4a4;console[_0x4347f3(0x1d1)](_0x4347f3(0x30b)+_0x4347f3(0x1f5)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x17a41e=_0x28693a;if(_0x595533[_0x4347f3(0x278)]===0x0)return console[_0x4347f3(0x1d1)](a31_0x4baf7b[_0x4347f3(0x31e)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x4347f3(0x1d1)](_0x4347f3(0x290)),0x1;const _0x2a4678=_0x595533[0x0];_0x17a41e[_0x4347f3(0x171)]&&(console[_0x4347f3(0x1d1)](_0x4347f3(0x26f)+_0x17a41e[_0x4347f3(0x1bc)]),console[_0x4347f3(0x1d1)](_0x4347f3(0x2ce)+_0x2a4678));const _0x165b6c=await withSpinner(_0x4347f3(0x24e)+_0x2a4678+_0x4347f3(0x199),()=>_0x32bf53['segment'][_0x4347f3(0x274)](_0x2a4678),{'verbose':_0x17a41e[_0x4347f3(0x171)]}),_0x2899de=_0x165b6c[_0x4347f3(0x29c)],_0x29c034=await loadJSONFromOptions(_0x17a41e[_0x4347f3(0x35a)],_0x17a41e[_0x4347f3(0x34c)]),_0x5cded9=await loadJSONFromOptions(_0x17a41e['addBehaviors'],_0x17a41e[_0x4347f3(0x32a)]),_0xcb3b58={'name':_0x2899de[_0x4347f3(0x17e)],'description':_0x17a41e[_0x4347f3(0x240)]!==undefined?_0x17a41e[_0x4347f3(0x240)]:_0x2899de[_0x4347f3(0x240)],'scheduleType':_0x17a41e[_0x4347f3(0x2bd)]!==undefined?_0x17a41e[_0x4347f3(0x2bd)]:_0x2899de[_0x4347f3(0x2bd)],'scheduleOption':_0x17a41e[_0x4347f3(0x262)]!==undefined?_0x17a41e[_0x4347f3(0x262)]:_0x2899de[_0x4347f3(0x262)],'timezone':_0x17a41e['timezone']!==undefined?_0x17a41e[_0x4347f3(0x1bb)]:_0x2899de[_0x4347f3(0x1bb)],'master':_0x2899de[_0x4347f3(0x1fa)],'attributes':_0x29c034?[..._0x2899de[_0x4347f3(0x2d0)]||[],..._0x29c034]:_0x2899de[_0x4347f3(0x2d0)],'behaviors':_0x5cded9?[..._0x2899de['behaviors']||[],..._0x5cded9]:_0x2899de[_0x4347f3(0x259)],'customerGroup':_0x2899de['customerGroup']},_0x3e16a5=await withSpinner(_0x4347f3(0x277)+_0x2a4678+_0x4347f3(0x199),()=>_0x32bf53[_0x4347f3(0x279)][_0x4347f3(0x257)](_0x2a4678,_0xcb3b58),{'verbose':_0x17a41e[_0x4347f3(0x171)]}),_0x4ca2ed=_0x3e16a5[_0x4347f3(0x29c)];return console[_0x4347f3(0x1d1)](_0x4347f3(0x2e3)+_0x4ca2ed[_0x4347f3(0x17e)]+'\x27'),await handleSDKOutput([_0x4ca2ed],_0x17a41e),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x5650b1(0x17e)]='segment:parent:pull';[a31_0x5650b1(0x240)]=a31_0x5650b1(0x29a);async[a31_0x5650b1(0x169)](_0x1654ea){const _0x37e74e=a31_0x5650b1,{options:_0x16d870,args:_0xd77a32,tdx:_0x3bce88}=_0x1654ea,_0x38ef83=_0x16d870,_0x31bff4=_0xd77a32[0x0]||_0x16d870[_0x37e74e(0x2ca)];if(!_0x31bff4)return showParentSegmentNotSetError(_0x37e74e(0x1c5)+_0x37e74e(0x311)),0x1;if(_0x38ef83[_0x37e74e(0x202)]&&_0x38ef83['output'])return console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x31e)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x2fc)]('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x2fc)](_0x37e74e(0x2f0)+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x294)](_0x37e74e(0x2dd))),0x1;const _0x129b45=_0x38ef83[_0x37e74e(0x1c8)]||a31_0x52b0aa[_0x37e74e(0x217)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x31bff4)+'.yml');_0x38ef83[_0x37e74e(0x171)]&&(console['error'](_0x37e74e(0x26f)+_0x38ef83[_0x37e74e(0x1bc)]),console[_0x37e74e(0x1d1)](_0x37e74e(0x2ce)+_0x31bff4),console[_0x37e74e(0x1d1)]('Output\x20file:\x20'+_0x129b45));const _0x3a64a1=await withSpinner(_0x37e74e(0x354)+_0x31bff4+'\x27...',()=>_0x3bce88[_0x37e74e(0x279)][_0x37e74e(0x323)](_0x31bff4),{'verbose':_0x38ef83[_0x37e74e(0x171)]}),_0x2f88e9=_0x3a64a1[_0x37e74e(0x29c)];if(existsSync(_0x129b45)){const _0x386046=readFileSync(_0x129b45,_0x37e74e(0x29d)),_0x341932=generateDiff(_0x386046,_0x2f88e9);if(!hasChanges(_0x341932))console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x2b1)]('✔')+'\x20No\x20changes\x20-\x20'+a31_0x4baf7b[_0x37e74e(0x294)](_0x129b45)+_0x37e74e(0x15c));else{console['error'](_0x37e74e(0x356)+_0x129b45+'\x27:'),console[_0x37e74e(0x1d1)]('─'[_0x37e74e(0x1bf)](0x3c)),console[_0x37e74e(0x1d1)](formatDiffWithColors(_0x341932)),console[_0x37e74e(0x1d1)]('─'[_0x37e74e(0x1bf)](0x3c));if(!_0x38ef83[_0x37e74e(0x2ea)]){if(!isInteractive())return console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x31e)](_0x37e74e(0x332)),_0x37e74e(0x1d3)),console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x2fc)](_0x37e74e(0x176))),0x1;const _0x35f20b=await confirmKey(_0x37e74e(0x228)+_0x129b45+'\x27?');if(!_0x35f20b)return console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x184)](_0x37e74e(0x287))),0x1;}writeFileSync(_0x129b45,_0x2f88e9,_0x37e74e(0x29d)),console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x2b1)]('✔')+_0x37e74e(0x1be)+a31_0x4baf7b[_0x37e74e(0x294)](_0x129b45));}}else{const _0x3c4794=a31_0x52b0aa[_0x37e74e(0x157)](_0x129b45);!existsSync(_0x3c4794)&&mkdirSync(_0x3c4794,{'recursive':!![]}),writeFileSync(_0x129b45,_0x2f88e9,'utf-8'),console[_0x37e74e(0x1d1)](a31_0x4baf7b[_0x37e74e(0x2b1)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x4baf7b[_0x37e74e(0x294)](_0x129b45));}return saveSessionContext({'parent_segment':_0x31bff4},_0x38ef83[_0x37e74e(0x30c)]),console[_0x37e74e(0x1d1)](a31_0x4baf7b['green']('✔')+'\x20Context\x20set:\x20'+a31_0x4baf7b[_0x37e74e(0x2fc)](_0x37e74e(0x338))+_0x37e74e(0x2f4)+a31_0x4baf7b[_0x37e74e(0x294)](_0x31bff4)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x5650b1(0x17e)]='segment:parent:push';['description']=a31_0x5650b1(0x313);async[a31_0x5650b1(0x169)](_0x325136){const _0x38864d=a31_0x5650b1,{options:_0x4cd3a1,args:_0x3c3bb4,tdx:_0x80a1d5}=_0x325136,_0x22bbcf=_0x4cd3a1,_0xd80ccc=_0x3c3bb4[0x0]||_0x4cd3a1[_0x38864d(0x2ca)];if(!_0xd80ccc)return showParentSegmentNotSetError(_0x38864d(0x2d8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x45c193=resolveYamlFile(_0xd80ccc);if(!existsSync(_0x45c193))return showFileNotFoundError(_0x45c193,_0xd80ccc),0x1;_0x22bbcf[_0x38864d(0x171)]&&(console[_0x38864d(0x1d1)](_0x38864d(0x26f)+_0x22bbcf[_0x38864d(0x1bc)]),console[_0x38864d(0x1d1)](_0x38864d(0x29b)+_0x45c193));let _0x400722;try{_0x400722=readFileSync(_0x45c193,_0x38864d(0x29d));}catch(_0x480b16){const _0x43ec12=_0x480b16 instanceof Error?_0x480b16[_0x38864d(0x1da)]:String(_0x480b16);return console[_0x38864d(0x1d1)](_0x38864d(0x341)+_0x43ec12),0x1;}const _0x59cbf6=await withSpinner(_0x38864d(0x1b7),()=>_0x80a1d5['segment'][_0x38864d(0x21c)](_0x400722),{'verbose':_0x22bbcf[_0x38864d(0x171)]}),_0x188235=_0x59cbf6[_0x38864d(0x29c)],{isNew:_0x217ecb,name:_0x3a3813,hasChanges:_0x1f3acd,diffFormatted:_0x75a4ce}=_0x188235;if(!_0x1f3acd)return console[_0x38864d(0x1d1)]('✔\x20No\x20changes\x20-\x20\x27'+_0x3a3813+_0x38864d(0x25e)),0x0;_0x217ecb?console[_0x38864d(0x1d1)](_0x38864d(0x261)+_0x3a3813+'\x27:'):console[_0x38864d(0x1d1)](_0x38864d(0x242)+_0x3a3813+'\x27:');console[_0x38864d(0x1d1)]('─'[_0x38864d(0x1bf)](0x3c)),console[_0x38864d(0x1d1)](_0x75a4ce),console[_0x38864d(0x1d1)]('─'[_0x38864d(0x1bf)](0x3c));const _0x4869fe=_0x217ecb?_0x38864d(0x192)+_0x3a3813+'\x27?':_0x38864d(0x2ee)+_0x3a3813+'\x27?';if(!_0x22bbcf[_0x38864d(0x2ea)]){if(!isInteractive())return console[_0x38864d(0x1d1)](a31_0x4baf7b[_0x38864d(0x31e)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x38864d(0x1d1)](a31_0x4baf7b[_0x38864d(0x2fc)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5c681a=await confirmKey(_0x4869fe);if(!_0x5c681a)return console[_0x38864d(0x1d1)](a31_0x4baf7b[_0x38864d(0x184)](_0x38864d(0x287))),0x1;}const _0x53f413=_0x217ecb?_0x38864d(0x280):'Updating',_0x175e45=await withSpinner(_0x53f413+_0x38864d(0x230)+_0x3a3813+_0x38864d(0x199),()=>_0x188235[_0x38864d(0x1b8)](),{'verbose':_0x22bbcf[_0x38864d(0x171)]}),_0x1db3f8=_0x175e45[_0x38864d(0x29c)],_0x44d2c7=getConsoleNextUrl(_0x22bbcf[_0x38864d(0x1bc)],_0x38864d(0x1ef)+_0x1db3f8['id']),_0x2a9106=_0x217ecb?'Created':_0x38864d(0x263);return console['error']('✔\x20'+_0x2a9106+_0x38864d(0x230)+_0x1db3f8['name']+'\x27'),console[_0x38864d(0x1d1)]('\x20\x20'+_0x44d2c7),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x2cb);['description']=a31_0x5650b1(0x14b);async[a31_0x5650b1(0x169)](_0x922c41){const _0x488cda=a31_0x5650b1,{options:_0x59dc77,args:_0x57c663,tdx:_0x13d156}=_0x922c41,_0x34abac=_0x59dc77,_0x13c029=_0x57c663[0x0]||_0x59dc77[_0x488cda(0x2ca)];if(!_0x13c029)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+_0x488cda(0x2d3)+_0x488cda(0x233)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x488cda(0x26d)+_0x488cda(0x1b9)),0x1;const _0x267c9d=resolveYamlFile(_0x13c029);if(!existsSync(_0x267c9d))return showFileNotFoundError(_0x267c9d,_0x13c029),0x1;_0x34abac[_0x488cda(0x171)]&&(console[_0x488cda(0x1d1)]('Site:\x20'+_0x34abac[_0x488cda(0x1bc)]),console['error']('YAML\x20file:\x20'+_0x267c9d));let _0xab3cff;try{_0xab3cff=readFileSync(_0x267c9d,'utf-8');}catch(_0x178adc){const _0xc89bd0=_0x178adc instanceof Error?_0x178adc[_0x488cda(0x1da)]:String(_0x178adc);return console[_0x488cda(0x1d1)]('Error\x20reading\x20file:\x20'+_0xc89bd0),0x1;}const _0x1632e1=createCommandSpinner(a31_0x4baf7b[_0x488cda(0x2fc)](_0x488cda(0x203)),{'verbose':_0x34abac[_0x488cda(0x171)]});_0x1632e1['start']();const _0x3a6baf={'onProgress':_0x52147b=>{_0x1632e1['text']=formatProgressMessage(_0x52147b);}};if(_0x34abac['master'])_0x3a6baf['master']=!![];if(_0x34abac[_0x488cda(0x173)])_0x3a6baf['enriched']=!![];_0x34abac['attribute']&&(_0x3a6baf[_0x488cda(0x1a3)]=_0x34abac[_0x488cda(0x1a3)]);_0x34abac[_0x488cda(0x1ad)]&&(_0x3a6baf[_0x488cda(0x1ad)]=_0x34abac[_0x488cda(0x1ad)]);if(_0x34abac[_0x488cda(0x2ac)])_0x3a6baf[_0x488cda(0x2ac)]=_0x34abac[_0x488cda(0x2ac)];let _0x51f6ce;try{_0x51f6ce=await _0x13d156[_0x488cda(0x279)][_0x488cda(0x34e)](_0xab3cff,_0x3a6baf),_0x1632e1[_0x488cda(0x1cf)]();}catch(_0x3ee0eb){_0x1632e1[_0x488cda(0x1cf)]();throw _0x3ee0eb;}const _0x565a17=_0x34abac[_0x488cda(0x2ac)]||_0x488cda(0x2fe);return this[_0x488cda(0x220)](_0x51f6ce,_0x3a6baf,_0x267c9d,_0x565a17),_0x51f6ce[_0x488cda(0x317)]?0x0:0x1;}['displayValidateResults'](_0x11ec0a,_0xbfe569,_0x127576,_0x1c0b17){const _0x133274=a31_0x5650b1;console[_0x133274(0x1d1)]('\x0a'+a31_0x4baf7b[_0x133274(0x156)](_0x133274(0x33c))+'\x20'+_0x11ec0a['name']),console[_0x133274(0x1d1)]('═'[_0x133274(0x1bf)](0x3c)),this[_0x133274(0x26c)](_0x11ec0a);if(typeof _0xbfe569[_0x133274(0x1a3)]===_0x133274(0x2be)){this[_0x133274(0x1f6)](_0x11ec0a),this[_0x133274(0x152)](_0x11ec0a),this[_0x133274(0x2aa)](_0x127576,_0x1c0b17,_0x133274(0x1a3),_0xbfe569[_0x133274(0x1a3)]);return;}if(_0xbfe569[_0x133274(0x1a3)]===!![]){this[_0x133274(0x1f6)](_0x11ec0a),this[_0x133274(0x152)](_0x11ec0a),this[_0x133274(0x2aa)](_0x127576,_0x1c0b17,_0x133274(0x2d0));return;}if(typeof _0xbfe569['behavior']==='string'){this[_0x133274(0x16d)](_0x11ec0a,_0x1c0b17),this[_0x133274(0x152)](_0x11ec0a),this['displayPreviewHints'](_0x127576,_0x1c0b17,'behavior',_0xbfe569[_0x133274(0x1ad)]);return;}if(_0xbfe569[_0x133274(0x1ad)]===!![]){this[_0x133274(0x16d)](_0x11ec0a,_0x1c0b17),this[_0x133274(0x152)](_0x11ec0a),this[_0x133274(0x2aa)](_0x127576,_0x1c0b17,_0x133274(0x259));return;}this[_0x133274(0x1f6)](_0x11ec0a),this[_0x133274(0x16d)](_0x11ec0a,_0x1c0b17),this[_0x133274(0x285)](_0x11ec0a),this[_0x133274(0x152)](_0x11ec0a),this[_0x133274(0x2aa)](_0x127576,_0x1c0b17,_0x133274(0x231));}[a31_0x5650b1(0x285)](_0x3e6555){displayRealtimeValidation(_0x3e6555);}[a31_0x5650b1(0x2aa)](_0x1585d8,_0x3e66cd,_0x5061cf,_0x238ad2){const _0x3fb3bd=a31_0x5650b1;console['error']('\x0a'+a31_0x4baf7b['dim'](_0x3fb3bd(0x306)));const _0x53b095=_0x3e66cd!=='-1d'?'\x20--interval\x20'+_0x3e66cd:'';if(_0x5061cf===_0x3fb3bd(0x1a3)&&_0x238ad2)console[_0x3fb3bd(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x3fb3bd(0x2fc)](_0x3fb3bd(0x2c5)+_0x1585d8+_0x3fb3bd(0x2ef)+_0x238ad2+'\x22'+_0x53b095));else{if(_0x5061cf===_0x3fb3bd(0x1ad)&&_0x238ad2)console[_0x3fb3bd(0x1d1)]('\x20\x20'+a31_0x4baf7b['dim'](_0x3fb3bd(0x2c5)+_0x1585d8+_0x3fb3bd(0x33a)+_0x238ad2+'\x22'+_0x53b095));else(_0x5061cf===_0x3fb3bd(0x2d0)||_0x5061cf===_0x3fb3bd(0x231))&&console[_0x3fb3bd(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x3fb3bd(0x2fc)](_0x3fb3bd(0x2c5)+_0x1585d8+'\x20--attribute\x20\x22<name>\x22'+_0x53b095));}(_0x5061cf===_0x3fb3bd(0x259)||_0x5061cf===_0x3fb3bd(0x231))&&console[_0x3fb3bd(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x3fb3bd(0x2fc)]('tdx\x20ps\x20preview\x20'+_0x1585d8+_0x3fb3bd(0x204)+_0x53b095)),_0x5061cf===_0x3fb3bd(0x231)&&console['error']('\x20\x20'+a31_0x4baf7b['dim'](_0x3fb3bd(0x2c5)+_0x1585d8+'\x20--enriched'+_0x53b095));}[a31_0x5650b1(0x26c)](_0x4fc2ed){const _0x1efb9a=a31_0x5650b1,{master:_0x14e2e7}=_0x4fc2ed,_0x1cc73f=_0x14e2e7['schemaValid']?a31_0x4baf7b[_0x1efb9a(0x2b1)]('✔'):a31_0x4baf7b[_0x1efb9a(0x31e)]('✘');console[_0x1efb9a(0x1d1)]('\x0a'+a31_0x4baf7b['dim'](_0x1efb9a(0x342))),console[_0x1efb9a(0x1d1)](_0x1cc73f+'\x20'+a31_0x4baf7b[_0x1efb9a(0x156)](_0x14e2e7[_0x1efb9a(0x23a)]+'.'+_0x14e2e7[_0x1efb9a(0x2cf)])),_0x14e2e7[_0x1efb9a(0x170)]?_0x14e2e7[_0x1efb9a(0x14c)]!==undefined&&console[_0x1efb9a(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x1efb9a(0x2fc)](_0x1efb9a(0x1b4))+'\x20'+a31_0x4baf7b[_0x1efb9a(0x294)](formatRows(_0x14e2e7[_0x1efb9a(0x14c)]))):console[_0x1efb9a(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x1efb9a(0x31e)](_0x1efb9a(0x1ae))+'\x20'+_0x14e2e7[_0x1efb9a(0x2c4)]);}[a31_0x5650b1(0x1f6)](_0x432dab){const _0x3902b7=a31_0x5650b1;if(_0x432dab['attributes'][_0x3902b7(0x278)]===0x0)return;console[_0x3902b7(0x1d1)]('\x0a'+a31_0x4baf7b[_0x3902b7(0x2fc)](_0x3902b7(0x2b9)));for(const _0x17f794 of _0x432dab[_0x3902b7(0x2d0)]){const _0xf8263a=_0x17f794[_0x3902b7(0x170)]?a31_0x4baf7b[_0x3902b7(0x2b1)]('✔'):a31_0x4baf7b[_0x3902b7(0x31e)]('✘');let _0xa68bd7='';if(_0x17f794[_0x3902b7(0x170)]&&_0x17f794['matchedCount']!==undefined&&_0x17f794['coveragePercent']!==undefined){const _0x2a95ad=_0x17f794[_0x3902b7(0x22a)][_0x3902b7(0x34a)](0x1),_0x362519=_0x17f794[_0x3902b7(0x22a)]>=0x50?a31_0x4baf7b[_0x3902b7(0x2b1)]:_0x17f794[_0x3902b7(0x22a)]>=0x32?a31_0x4baf7b['yellow']:a31_0x4baf7b[_0x3902b7(0x31e)];_0xa68bd7='\x20'+a31_0x4baf7b[_0x3902b7(0x2fc)](_0x3902b7(0x246))+'\x20'+_0x362519(_0x2a95ad+'%')+'\x20('+formatRows(_0x17f794[_0x3902b7(0x159)])+_0x3902b7(0x182);}console[_0x3902b7(0x1d1)](_0xf8263a+'\x20'+a31_0x4baf7b[_0x3902b7(0x156)](_0x17f794['name'])+_0xa68bd7),console[_0x3902b7(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x3902b7(0x2fc)](_0x3902b7(0x201))+'\x20'+a31_0x4baf7b[_0x3902b7(0x156)](_0x17f794[_0x3902b7(0x23a)]+'.'+_0x17f794['table']));const _0x5187de=_0x17f794[_0x3902b7(0x28b)]===_0x17f794['foreignKey']?a31_0x4baf7b[_0x3902b7(0x2fc)]('Join\x20on:')+'\x20'+_0x17f794[_0x3902b7(0x28b)]:a31_0x4baf7b[_0x3902b7(0x2fc)](_0x3902b7(0x2c9))+'\x20'+_0x17f794[_0x3902b7(0x28b)]+_0x3902b7(0x2f4)+_0x17f794[_0x3902b7(0x28a)];console[_0x3902b7(0x1d1)]('\x20\x20'+_0x5187de),console[_0x3902b7(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x3902b7(0x2fc)](_0x3902b7(0x316))),this[_0x3902b7(0x1e1)](_0x17f794[_0x3902b7(0x21b)]),!_0x17f794[_0x3902b7(0x170)]&&console['error']('\x20\x20'+a31_0x4baf7b[_0x3902b7(0x31e)]('Error:')+'\x20'+_0x17f794[_0x3902b7(0x2c4)]);}}[a31_0x5650b1(0x16d)](_0x3b1904,_0x36f55d){const _0x6e8e6c=a31_0x5650b1;if(_0x3b1904[_0x6e8e6c(0x259)][_0x6e8e6c(0x278)]===0x0)return;console[_0x6e8e6c(0x1d1)]('\x0a'+a31_0x4baf7b[_0x6e8e6c(0x2fc)](_0x6e8e6c(0x1c7))+'\x20'+a31_0x4baf7b['dim']('('+_0x36f55d+')'));for(const _0x2a0879 of _0x3b1904['behaviors']){const _0x52878a=_0x2a0879[_0x6e8e6c(0x170)]?a31_0x4baf7b[_0x6e8e6c(0x2b1)]('✔'):a31_0x4baf7b[_0x6e8e6c(0x31e)]('✘');let _0x166614='';if(_0x2a0879[_0x6e8e6c(0x170)]&&_0x2a0879[_0x6e8e6c(0x1c2)]!==undefined&&_0x2a0879[_0x6e8e6c(0x28f)]!==undefined){const _0x3a9042=_0x2a0879['customerPercent']?.[_0x6e8e6c(0x34a)](0x1)||'?',_0x5c4ef4=(_0x2a0879[_0x6e8e6c(0x2a6)]??0x0)>=0x32?a31_0x4baf7b['green']:(_0x2a0879[_0x6e8e6c(0x2a6)]??0x0)>=0x14?a31_0x4baf7b[_0x6e8e6c(0x184)]:a31_0x4baf7b[_0x6e8e6c(0x31e)];_0x166614='\x20'+a31_0x4baf7b[_0x6e8e6c(0x2fc)]('Customers:')+'\x20'+_0x5c4ef4(formatRows(_0x2a0879['customersWithEvents']))+'\x20('+_0x3a9042+_0x6e8e6c(0x2eb)+a31_0x4baf7b['dim'](_0x6e8e6c(0x1f3))+'\x20'+a31_0x4baf7b[_0x6e8e6c(0x294)](formatRows(_0x2a0879[_0x6e8e6c(0x28f)]));}console[_0x6e8e6c(0x1d1)](_0x52878a+'\x20'+a31_0x4baf7b['bold'](_0x2a0879[_0x6e8e6c(0x17e)])+_0x166614),console[_0x6e8e6c(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x6e8e6c(0x2fc)](_0x6e8e6c(0x201))+'\x20'+a31_0x4baf7b[_0x6e8e6c(0x156)](_0x2a0879[_0x6e8e6c(0x23a)]+'.'+_0x2a0879['table']));const _0x33fd30=_0x2a0879[_0x6e8e6c(0x28b)]===_0x2a0879['foreignKey']?a31_0x4baf7b[_0x6e8e6c(0x2fc)](_0x6e8e6c(0x315))+'\x20'+_0x2a0879[_0x6e8e6c(0x28b)]:a31_0x4baf7b[_0x6e8e6c(0x2fc)](_0x6e8e6c(0x2c9))+'\x20'+_0x2a0879[_0x6e8e6c(0x28b)]+'\x20=\x20'+_0x2a0879['foreignKey'];console[_0x6e8e6c(0x1d1)]('\x20\x20'+_0x33fd30),console[_0x6e8e6c(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x6e8e6c(0x2fc)](_0x6e8e6c(0x316))),this[_0x6e8e6c(0x1e1)](_0x2a0879[_0x6e8e6c(0x21b)]),!_0x2a0879[_0x6e8e6c(0x170)]&&console['error']('\x20\x20'+a31_0x4baf7b[_0x6e8e6c(0x31e)](_0x6e8e6c(0x1ae))+'\x20'+_0x2a0879[_0x6e8e6c(0x2c4)]);}}[a31_0x5650b1(0x1e1)](_0x280d04){const _0x16f4c6=a31_0x5650b1;for(const _0x4c62fe of _0x280d04){_0x4c62fe[_0x16f4c6(0x208)]===_0x4c62fe[_0x16f4c6(0x1a2)]||_0x4c62fe[_0x16f4c6(0x1a2)]==='*'?console[_0x16f4c6(0x1d1)](_0x16f4c6(0x2a4)+_0x4c62fe[_0x16f4c6(0x208)]):console[_0x16f4c6(0x1d1)](_0x16f4c6(0x2a4)+_0x4c62fe['label']+'\x20'+a31_0x4baf7b[_0x16f4c6(0x2fc)]('('+_0x4c62fe[_0x16f4c6(0x1a2)]+')'));}}[a31_0x5650b1(0x152)](_0x20d011){const _0x27048d=a31_0x5650b1;console[_0x27048d(0x1d1)]('─'['repeat'](0x3c));if(_0x20d011[_0x27048d(0x2ba)][_0x27048d(0x278)]>0x0){console[_0x27048d(0x1d1)]('\x0a'+a31_0x4baf7b[_0x27048d(0x31e)](_0x27048d(0x164)));for(const _0x34a483 of _0x20d011[_0x27048d(0x2ba)]){console[_0x27048d(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x27048d(0x31e)]('•')+'\x20'+_0x34a483);}}_0x20d011['allValid']&&console[_0x27048d(0x1d1)]('\x0a'+a31_0x4baf7b[_0x27048d(0x2b1)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']='segment:parent:preview';[a31_0x5650b1(0x240)]=a31_0x5650b1(0x18c);async[a31_0x5650b1(0x169)](_0x2b8bc1){const _0x11609a=a31_0x5650b1,{options:_0x20e784,args:_0x142e85,tdx:_0x4bb7b7}=_0x2b8bc1,_0x578373=_0x20e784,_0x274568=_0x142e85[0x0]||_0x20e784[_0x11609a(0x2ca)];if(!_0x274568)return showParentSegmentNotSetError(_0x11609a(0x2f7)+_0x11609a(0x1c0)+_0x11609a(0x1d2)+_0x11609a(0x1ee)+_0x11609a(0x348)+_0x11609a(0x154)+_0x11609a(0x23b)+_0x11609a(0x1b9)),0x1;if(!_0x578373[_0x11609a(0x1fa)]&&!_0x578373[_0x11609a(0x1a3)]&&!_0x578373['behavior']&&!_0x578373[_0x11609a(0x173)])return console['error'](a31_0x4baf7b[_0x11609a(0x31e)](_0x11609a(0x33f))),console[_0x11609a(0x1d1)](_0x11609a(0x25c)),console[_0x11609a(0x1d1)](_0x11609a(0x1ed)),console[_0x11609a(0x1d1)](_0x11609a(0x281)),console[_0x11609a(0x1d1)](_0x11609a(0x1f9)),console[_0x11609a(0x1d1)](_0x11609a(0x352)),console[_0x11609a(0x1d1)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x3e8908=resolveYamlFile(_0x274568);if(!existsSync(_0x3e8908))return showFileNotFoundError(_0x3e8908,_0x274568),0x1;_0x578373['verbose']&&(console[_0x11609a(0x1d1)]('Site:\x20'+_0x578373['site']),console[_0x11609a(0x1d1)](_0x11609a(0x29b)+_0x3e8908));let _0x2d97c0;try{_0x2d97c0=readFileSync(_0x3e8908,_0x11609a(0x29d));}catch(_0xf6539c){const _0x3f532e=_0xf6539c instanceof Error?_0xf6539c['message']:String(_0xf6539c);return console[_0x11609a(0x1d1)](_0x11609a(0x341)+_0x3f532e),0x1;}let _0x3e89a1;try{_0x3e89a1=parseDef(_0x2d97c0);}catch(_0x4e0ba2){const _0x4ecb33=_0x4e0ba2 instanceof Error?_0x4e0ba2['message']:String(_0x4e0ba2);return console[_0x11609a(0x1d1)](a31_0x4baf7b[_0x11609a(0x31e)](_0x11609a(0x20f)+_0x4ecb33)),0x1;}if(_0x578373[_0x11609a(0x1a3)]===!![]||_0x578373['attribute']===''){const _0x308259=_0x3e89a1['attributes']?.['map'](_0x5d9612=>_0x5d9612[_0x11609a(0x17e)])||[];if(_0x308259[_0x11609a(0x278)]===0x0)console[_0x11609a(0x1d1)](a31_0x4baf7b[_0x11609a(0x31e)]('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console[_0x11609a(0x1d1)](a31_0x4baf7b[_0x11609a(0x31e)](_0x11609a(0x191))),console['error'](_0x11609a(0x27c));for(const _0x3ead64 of _0x308259){console[_0x11609a(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x11609a(0x294)](_0x3ead64));}console[_0x11609a(0x1d1)](_0x11609a(0x207)+_0x274568+'\x20--attribute\x20\x22'+_0x308259[0x0]+'\x22');}return 0x1;}if(_0x578373[_0x11609a(0x1ad)]===!![]||_0x578373['behavior']===''){const _0x23fa58=_0x3e89a1['behaviors']?.[_0x11609a(0x31b)](_0x2a0815=>_0x2a0815['name'])||[];if(_0x23fa58[_0x11609a(0x278)]===0x0)console['error'](a31_0x4baf7b['red'](_0x11609a(0x266)));else{console[_0x11609a(0x1d1)](a31_0x4baf7b[_0x11609a(0x31e)](_0x11609a(0x21a))),console[_0x11609a(0x1d1)](_0x11609a(0x305));for(const _0x1be140 of _0x23fa58){console[_0x11609a(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x11609a(0x294)](_0x1be140));}console['error']('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x274568+_0x11609a(0x33a)+_0x23fa58[0x0]+'\x22');}return 0x1;}const _0x889a72=createCommandSpinner(a31_0x4baf7b[_0x11609a(0x2fc)](_0x11609a(0x27f)),{'verbose':_0x578373[_0x11609a(0x171)]});_0x889a72['start']();const _0x5628bb={'onProgress':_0x40565e=>{const _0x2ba114=_0x11609a;_0x889a72[_0x2ba114(0x2bb)]=formatProgressMessage(_0x40565e);}};if(_0x578373[_0x11609a(0x1fa)])_0x5628bb[_0x11609a(0x1fa)]=!![];if(_0x578373[_0x11609a(0x1a3)]&&typeof _0x578373[_0x11609a(0x1a3)]===_0x11609a(0x2be))_0x5628bb[_0x11609a(0x1a3)]=_0x578373[_0x11609a(0x1a3)];if(_0x578373['behavior']&&typeof _0x578373[_0x11609a(0x1ad)]==='string')_0x5628bb[_0x11609a(0x1ad)]=_0x578373['behavior'];if(_0x578373[_0x11609a(0x173)])_0x5628bb[_0x11609a(0x173)]=!![];if(_0x578373[_0x11609a(0x2ac)])_0x5628bb[_0x11609a(0x2ac)]=_0x578373['interval'];let _0x5ced6e;try{_0x5ced6e=await _0x4bb7b7[_0x11609a(0x279)][_0x11609a(0x2a0)](_0x2d97c0,_0x5628bb),_0x889a72['stop']();}catch(_0x5a0069){_0x889a72[_0x11609a(0x1cf)]();throw _0x5a0069;}return await this[_0x11609a(0x1f4)](_0x5ced6e,{'master':_0x578373['master'],'attribute':typeof _0x578373['attribute']===_0x11609a(0x2be)?_0x578373[_0x11609a(0x1a3)]:undefined,'behavior':typeof _0x578373[_0x11609a(0x1ad)]===_0x11609a(0x2be)?_0x578373[_0x11609a(0x1ad)]:undefined,'enriched':_0x578373[_0x11609a(0x173)]}),_0x5ced6e[_0x11609a(0x317)]?0x0:0x1;}async[a31_0x5650b1(0x1f4)](_0x5d8e60,_0x1d2b9f){const _0x35efeb=a31_0x5650b1;console['error']('\x0a'+a31_0x4baf7b[_0x35efeb(0x156)](_0x35efeb(0x195))+'\x20'+_0x5d8e60[_0x35efeb(0x17e)]),console[_0x35efeb(0x1d1)]('═'[_0x35efeb(0x1bf)](0x3c));if(_0x1d2b9f['master']&&_0x5d8e60[_0x35efeb(0x2da)]){const _0x2cd0a8=a31_0x4baf7b[_0x35efeb(0x2fc)](_0x35efeb(0x2a7))+'\x20'+a31_0x4baf7b['bold'](_0x5d8e60[_0x35efeb(0x1fa)][_0x35efeb(0x23a)]+'.'+_0x5d8e60['master']['table']);await this[_0x35efeb(0x272)](_0x2cd0a8,_0x5d8e60[_0x35efeb(0x2da)]);}else{if(_0x1d2b9f[_0x35efeb(0x1a3)]&&_0x5d8e60[_0x35efeb(0x2da)]){const _0x44400c=a31_0x4baf7b['dim'](_0x35efeb(0x235))+'\x20'+a31_0x4baf7b[_0x35efeb(0x156)](_0x1d2b9f[_0x35efeb(0x1a3)]);await this[_0x35efeb(0x272)](_0x44400c,_0x5d8e60['sampleData']);}else{if(_0x1d2b9f[_0x35efeb(0x1ad)]&&_0x5d8e60[_0x35efeb(0x2da)]){const _0x12afca=a31_0x4baf7b[_0x35efeb(0x2fc)](_0x35efeb(0x27a))+'\x20'+a31_0x4baf7b[_0x35efeb(0x156)](_0x1d2b9f[_0x35efeb(0x1ad)]);await this['displaySampleData'](_0x12afca,_0x5d8e60['sampleData']);}else{if(_0x1d2b9f[_0x35efeb(0x173)]&&_0x5d8e60['sampleData']){const _0x361805=a31_0x4baf7b[_0x35efeb(0x2fc)]('Enriched:')+'\x20'+a31_0x4baf7b[_0x35efeb(0x156)](_0x35efeb(0x327));await this[_0x35efeb(0x272)](_0x361805,_0x5d8e60[_0x35efeb(0x2da)]);}else!_0x5d8e60[_0x35efeb(0x2da)]&&console[_0x35efeb(0x1d1)]('\x0aNo\x20sample\x20data\x20available');}}}if(_0x5d8e60[_0x35efeb(0x2ba)][_0x35efeb(0x278)]>0x0){console['error']('─'[_0x35efeb(0x1bf)](0x3c)),console['error']('\x0a'+a31_0x4baf7b[_0x35efeb(0x31e)](_0x35efeb(0x164)));for(const _0x1df874 of _0x5d8e60[_0x35efeb(0x2ba)]){console[_0x35efeb(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x35efeb(0x31e)]('•')+'\x20'+_0x1df874);}}}async[a31_0x5650b1(0x272)](_0x542250,_0x2bbefd){const _0x2d2228=a31_0x5650b1;if(_0x2bbefd[_0x2d2228(0x278)]===0x0){console['error']('\x0a'+_0x542250),console[_0x2d2228(0x1d1)](_0x2d2228(0x27b));return;}console[_0x2d2228(0x1d1)]('\x0a'+_0x542250);const _0x184d79=Object[_0x2d2228(0x1d8)](_0x2bbefd[0x0])['map'](_0x133ee5=>({'name':_0x133ee5,'type':typeof _0x2bbefd[0x0][_0x133ee5]===_0x2d2228(0x209)?_0x2d2228(0x271):_0x2d2228(0x1e0)})),_0x1191d9={'queryId':'preview','columns':_0x184d79,'data':_0x2bbefd,'stats':{'state':_0x2d2228(0x312),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2bbefd['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x3a5d2a=formatAsTable(_0x1191d9,_0x2bbefd[_0x2d2228(0x278)],!![]);await writeOutput(_0x3a5d2a,undefined,_0x2d2228(0x2cf));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x151);['description']=a31_0x5650b1(0x321);async['execute'](_0x57bf82){const _0x52970c=a31_0x5650b1,{options:_0x49a5b7,args:_0x5bddfa,tdx:_0x4d45cf}=_0x57bf82,_0x2f5d85=_0x49a5b7,_0x10a6a5=_0x5bddfa[0x0]||_0x49a5b7[_0x52970c(0x2ca)];if(!_0x10a6a5)return showParentSegmentNotSetError(_0x52970c(0x193)+_0x52970c(0x2b7)),0x1;const _0x106586=resolveYamlFile(_0x10a6a5);if(existsSync(_0x106586)){_0x2f5d85[_0x52970c(0x171)]&&console[_0x52970c(0x1d1)](_0x52970c(0x267)+_0x106586);let _0x2e4f5d;try{_0x2e4f5d=readFileSync(_0x106586,'utf-8');}catch(_0x373b77){const _0x17852c=_0x373b77 instanceof Error?_0x373b77[_0x52970c(0x1da)]:String(_0x373b77);return console[_0x52970c(0x1d1)](_0x52970c(0x341)+_0x17852c),0x1;}const _0x1de0b6=await withSpinner('Analyzing\x20changes...',()=>_0x4d45cf['segment'][_0x52970c(0x21c)](_0x2e4f5d),{'verbose':_0x2f5d85[_0x52970c(0x171)]}),_0x3cde78=_0x1de0b6[_0x52970c(0x29c)],{isNew:_0x5b25be,name:_0x162292,hasChanges:_0x541b2d,diffFormatted:_0x4e38c4}=_0x3cde78;if(_0x541b2d){_0x5b25be?console['error'](_0x52970c(0x261)+_0x162292+'\x27:'):console[_0x52970c(0x1d1)](_0x52970c(0x242)+_0x162292+'\x27:');console[_0x52970c(0x1d1)]('─'[_0x52970c(0x1bf)](0x3c)),console[_0x52970c(0x1d1)](_0x4e38c4),console[_0x52970c(0x1d1)]('─'['repeat'](0x3c));const _0x17f143=_0x5b25be?_0x52970c(0x192)+_0x162292+_0x52970c(0x18d):_0x52970c(0x2ee)+_0x162292+_0x52970c(0x18d);if(!_0x2f5d85[_0x52970c(0x2ea)]){if(!isInteractive())return console['error'](a31_0x4baf7b[_0x52970c(0x31e)](_0x52970c(0x332)),_0x52970c(0x1d3)),console[_0x52970c(0x1d1)](a31_0x4baf7b[_0x52970c(0x2fc)](_0x52970c(0x176))),0x1;const _0x4b0ded=await confirmKey(_0x17f143);if(!_0x4b0ded)return console['error'](a31_0x4baf7b[_0x52970c(0x184)](_0x52970c(0x287))),0x1;}const _0x30e55e=_0x5b25be?'Creating':_0x52970c(0x205);await withSpinner(_0x30e55e+'\x20parent\x20segment\x20\x27'+_0x162292+_0x52970c(0x199),()=>_0x3cde78[_0x52970c(0x1b8)](),{'verbose':_0x2f5d85['verbose']});const _0x832619=_0x5b25be?_0x52970c(0x1dd):'Updated';console[_0x52970c(0x1d1)]('✔\x20'+_0x832619+'\x20parent\x20segment\x20\x27'+_0x162292+'\x27');}else console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x162292+_0x52970c(0x1aa));}const _0x7a06e3=await withSpinner(_0x52970c(0x32c)+_0x10a6a5+'\x27...',()=>_0x4d45cf[_0x52970c(0x279)][_0x52970c(0x224)](_0x10a6a5),{'verbose':_0x2f5d85['verbose']}),_0x320c20=_0x7a06e3[_0x52970c(0x29c)],_0x5e902c=getConsoleUrl(_0x2f5d85[_0x52970c(0x1bc)],_0x52970c(0x180)+_0x320c20[_0x52970c(0x2e4)]+_0x52970c(0x153)+_0x320c20[_0x52970c(0x175)]+'/attempt/'+_0x320c20[_0x52970c(0x15b)]);return console[_0x52970c(0x1d1)](_0x52970c(0x219)),console[_0x52970c(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x52970c(0x2fc)](_0x52970c(0x20e))+'\x20'+_0x320c20[_0x52970c(0x1dc)]),console[_0x52970c(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x52970c(0x2fc)](_0x52970c(0x22f))+'\x20'+_0x320c20[_0x52970c(0x33d)]),console[_0x52970c(0x1d1)]('\x20\x20'+a31_0x4baf7b['dim'](_0x52970c(0x197))+'\x20'+_0x320c20[_0x52970c(0x175)]),console[_0x52970c(0x1d1)]('\x20\x20'+a31_0x4baf7b['dim'](_0x52970c(0x1b0))+'\x20'+_0x320c20[_0x52970c(0x15b)]),console[_0x52970c(0x1d1)]('\x20\x20'+_0x5e902c),console[_0x52970c(0x1d1)]('\x0a'+a31_0x4baf7b['dim']('To\x20cancel:')+'\x20tdx\x20wf\x20attempt\x20'+_0x320c20[_0x52970c(0x15b)]+_0x52970c(0x1ba)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x304);[a31_0x5650b1(0x240)]='List\x20available\x20fields\x20for\x20segmentation';async[a31_0x5650b1(0x169)](_0x350191){const _0xdd5108=a31_0x5650b1,{options:_0x37a160,args:_0xf6eb14,tdx:_0x35387a}=_0x350191,_0x3d8b5d=_0xf6eb14[0x0]||_0x37a160[_0xdd5108(0x2ca)];if(!_0x3d8b5d)return showParentSegmentNotSetError(_0xdd5108(0x1af)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x37a160[_0xdd5108(0x171)]&&(console[_0xdd5108(0x1d1)]('Site:\x20'+_0x37a160['site']),console[_0xdd5108(0x1d1)]('Parent\x20segment:\x20'+_0x3d8b5d));const _0x16f662=await withSpinner(_0xdd5108(0x2c3)+_0x3d8b5d+'\x27...',()=>_0x35387a['segment'][_0xdd5108(0x249)](_0x3d8b5d),{'verbose':_0x37a160[_0xdd5108(0x171)]}),_0x23ff34=_0x16f662[_0xdd5108(0x29c)];console['error'](_0xdd5108(0x2af)+_0x23ff34[_0xdd5108(0x278)]+'\x20field'+(_0x23ff34['length']!==0x1?'s':''));if(_0x37a160['json']||_0x37a160[_0xdd5108(0x158)])return await handleSDKOutput(_0x23ff34,_0x37a160),0x0;return displayFieldsHumanReadable(_0x23ff34,_0x3d8b5d),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x334);['description']='Show\x20parent\x20segment\x20details';async[a31_0x5650b1(0x169)](_0x5eea4a){const _0x19b4cb=a31_0x5650b1,{options:_0x575d75,args:_0x6bda7f,tdx:_0x759bf9}=_0x5eea4a,_0x5e0964=_0x575d75,_0x5ea309=_0x6bda7f[0x0]||_0x575d75[_0x19b4cb(0x2ca)];if(!_0x5ea309)return showParentSegmentNotSetError(_0x19b4cb(0x189)+_0x19b4cb(0x318)+_0x19b4cb(0x233)+_0x19b4cb(0x1d7)),0x1;_0x575d75[_0x19b4cb(0x171)]&&(console[_0x19b4cb(0x1d1)](_0x19b4cb(0x26f)+_0x575d75[_0x19b4cb(0x1bc)]),console[_0x19b4cb(0x1d1)]('Parent\x20segment:\x20'+_0x5ea309));const _0x7c8ad0=await withSpinner(_0x19b4cb(0x354)+_0x5ea309+'\x27...',()=>_0x759bf9[_0x19b4cb(0x279)]['getParentFull'](_0x5ea309),{'verbose':_0x575d75[_0x19b4cb(0x171)]}),_0x572627=_0x7c8ad0['data'];if(_0x5e0964['web']){const _0x6f8896=getConsoleNextUrl(_0x5e0964[_0x19b4cb(0x1bc)],_0x19b4cb(0x1ef)+_0x572627['id']);return console[_0x19b4cb(0x1d1)](a31_0x4baf7b[_0x19b4cb(0x2b1)]('✔')+'\x20Opening\x20'+a31_0x4baf7b['cyan'](_0x6f8896)),openBrowser(_0x6f8896),0x0;}return await handleSingleObjectOutput(_0x572627,_0x575d75),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x21f);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x2d1);async[a31_0x5650b1(0x169)](_0xe33d87){const _0x1332b8=a31_0x5650b1,{options:_0x473266,args:_0x282550,tdx:_0x4fb9a4}=_0xe33d87,_0x46fc32=_0x473266,_0x21dccf=_0x282550[0x0]||_0x473266[_0x1332b8(0x2ca)];if(!_0x21dccf)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'+_0x1332b8(0x2c2)+_0x1332b8(0x233)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x473266[_0x1332b8(0x171)]&&(console[_0x1332b8(0x1d1)]('Site:\x20'+_0x473266[_0x1332b8(0x1bc)]),console[_0x1332b8(0x1d1)](_0x1332b8(0x2ce)+_0x21dccf));const _0xc2a059=await withSpinner(_0x1332b8(0x26e)+_0x21dccf+_0x1332b8(0x199),()=>_0x4fb9a4[_0x1332b8(0x279)]['resolveParentId'](_0x21dccf),{'verbose':_0x473266[_0x1332b8(0x171)]}),_0x56b3d5=_0xc2a059[_0x1332b8(0x29c)],_0x334581=_0x4fb9a4[_0x1332b8(0x279)]['getOutputDatabaseName'](_0x56b3d5);if(_0x46fc32[_0x1332b8(0x1c8)]){const _0x2181cf=await this[_0x1332b8(0x2ff)](_0xe33d87,_0x21dccf,_0x56b3d5,_0x334581),_0x4b5808=this[_0x1332b8(0x166)](_0x2181cf);writeFileSync(_0x46fc32['output'],_0x4b5808);const _0x433c20=_0x2181cf['customers'][_0x1332b8(0x21b)][_0x1332b8(0x278)]+_0x2181cf[_0x1332b8(0x259)][_0x1332b8(0x2bf)]((_0xa1656d,_0x218b79)=>_0xa1656d+_0x218b79[_0x1332b8(0x21b)][_0x1332b8(0x278)],0x0),_0x2ff249=_0x2181cf[_0x1332b8(0x259)][_0x1332b8(0x333)](_0x5c867b=>_0x5c867b[_0x1332b8(0x21b)][_0x1332b8(0x278)]===0x0)[_0x1332b8(0x278)];return console[_0x1332b8(0x286)]('Schema\x20saved\x20to\x20'+_0x46fc32[_0x1332b8(0x1c8)]),console[_0x1332b8(0x286)](_0x1332b8(0x337)+_0x334581),console['log']('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x2181cf[_0x1332b8(0x259)][_0x1332b8(0x278)]+_0x1332b8(0x256)),console[_0x1332b8(0x286)](_0x1332b8(0x2f3)+_0x433c20+'\x20total'),_0x2ff249>0x0&&console[_0x1332b8(0x286)](_0x1332b8(0x150)+_0x2ff249+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x1332b8(0x1d1)]('\x0a'+a31_0x4baf7b[_0x1332b8(0x156)]('Output\x20Database:')+'\x20'+a31_0x4baf7b[_0x1332b8(0x294)](_0x334581));const _0x2fac41=await withSpinner(_0x1332b8(0x214),()=>_0x4fb9a4[_0x1332b8(0x279)][_0x1332b8(0x185)](_0x56b3d5),{'verbose':_0x473266[_0x1332b8(0x171)]});console['error']('\x0a'+a31_0x4baf7b[_0x1332b8(0x156)](_0x1332b8(0x218))+'\x20'+a31_0x4baf7b[_0x1332b8(0x2fc)]('('+_0x334581+_0x1332b8(0x284)));const _0x2cf603=await executeSchemaQuery(_0x2fac41[_0x1332b8(0x29c)],_0x4fb9a4,_0x473266);await handleQueryOutput(_0x2cf603,_0x473266);const _0x184664=await withSpinner(_0x1332b8(0x1a6),()=>_0x4fb9a4['segment'][_0x1332b8(0x314)](_0x56b3d5),{'verbose':_0x473266[_0x1332b8(0x171)]});for(const _0x27f24f of _0x184664[_0x1332b8(0x29c)]){const _0x276e19='behavior_'+_0x27f24f[_0x1332b8(0x17d)]()[_0x1332b8(0x24a)](/\s+/g,'_'),_0x1cf655='SELECT\x20*\x20FROM\x20'+_0x334581+'.'+_0x276e19;console['error']('\x0a'+a31_0x4baf7b['bold'](_0x27f24f)+'\x20'+a31_0x4baf7b[_0x1332b8(0x2fc)]('('+_0x334581+'.'+_0x276e19+')'));try{const _0x43a1e8=await executeSchemaQuery(_0x1cf655,_0x4fb9a4,_0x473266);await handleQueryOutput(_0x43a1e8,_0x473266);}catch{console[_0x1332b8(0x1d1)](a31_0x4baf7b[_0x1332b8(0x184)]('\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)'));}}return 0x0;}async['collectSchema'](_0x23aff5,_0x2c0797,_0x20e2a3,_0x1d233b){const _0x52c1bd=a31_0x5650b1,{options:_0x2c29fb,tdx:_0x37fc7e}=_0x23aff5,_0x565919=await withSpinner(_0x52c1bd(0x214),()=>_0x37fc7e['segment'][_0x52c1bd(0x185)](_0x20e2a3),{'verbose':_0x2c29fb['verbose']}),_0xd53a00=await executeSchemaQuery(_0x565919['data'],_0x37fc7e,_0x2c29fb),_0x1ff47a=_0xd53a00[_0x52c1bd(0x29c)][_0x52c1bd(0x31b)](_0x725ef9=>({'name':_0x725ef9[_0x52c1bd(0x2b2)],'type':_0x725ef9[_0x52c1bd(0x14e)]})),_0xb75975=await withSpinner(_0x52c1bd(0x1a6),()=>_0x37fc7e[_0x52c1bd(0x279)][_0x52c1bd(0x314)](_0x20e2a3),{'verbose':_0x2c29fb[_0x52c1bd(0x171)]}),_0xe5beba=[];for(const _0x4fc1a8 of _0xb75975[_0x52c1bd(0x29c)]){const _0x31f18c=_0x52c1bd(0x25a)+_0x4fc1a8[_0x52c1bd(0x17d)]()['replace'](/\s+/g,'_'),_0x16b89c=_0x52c1bd(0x16a)+_0x1d233b+'.'+_0x31f18c;let _0xbed99=[];try{const _0x453806=await executeSchemaQuery(_0x16b89c,_0x37fc7e,_0x2c29fb);_0xbed99=_0x453806['data'][_0x52c1bd(0x31b)](_0x19a10c=>({'name':_0x19a10c[_0x52c1bd(0x2b2)],'type':_0x19a10c[_0x52c1bd(0x14e)]}));}catch{}_0xe5beba[_0x52c1bd(0x141)]({'table':_0x31f18c,'columns':_0xbed99});}return{'database':_0x1d233b,'parent_segment':_0x2c0797,'parent_id':_0x20e2a3,'customers':{'table':_0x52c1bd(0x218),'columns':_0x1ff47a},'behaviors':_0xe5beba};}[a31_0x5650b1(0x166)](_0x5f414c){const _0x23ae80=a31_0x5650b1,_0x51a88d=_0x4f57a1=>{const _0x150662=a31_0xb690;if(_0x4f57a1[_0x150662(0x278)]===0x0)return'[]';const _0x369973=_0x4f57a1[_0x150662(0x31b)](_0xd6a2e2=>_0x150662(0x1ec)+_0xd6a2e2[_0x150662(0x17e)]+_0x150662(0x1fe)+_0xd6a2e2[_0x150662(0x308)]+'\x22\x20}');return'[\x0a'+_0x369973[_0x150662(0x217)](',\x0a')+_0x150662(0x299);},_0x2e717f=_0x5f414c['behaviors']['map'](_0x326301=>{const _0x488f20=a31_0xb690;return _0x488f20(0x331)+_0x326301[_0x488f20(0x2cf)]+_0x488f20(0x283)+_0x51a88d(_0x326301[_0x488f20(0x21b)])['replace'](/^/gm,'\x20\x20')[_0x488f20(0x2e9)]()+_0x488f20(0x35b);})[_0x23ae80(0x217)](',\x0a');return _0x23ae80(0x2d9)+_0x5f414c['database']+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x5f414c[_0x23ae80(0x338)]+_0x23ae80(0x14a)+_0x5f414c[_0x23ae80(0x324)]+_0x23ae80(0x2b6)+_0x5f414c[_0x23ae80(0x218)][_0x23ae80(0x2cf)]+_0x23ae80(0x25f)+_0x51a88d(_0x5f414c[_0x23ae80(0x218)][_0x23ae80(0x21b)])['replace'](/^/gm,'\x20\x20')[_0x23ae80(0x2e9)]()+_0x23ae80(0x222)+_0x2e717f+_0x23ae80(0x273);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x196);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x344);async[a31_0x5650b1(0x169)](_0x3e8ff0){const _0x4c3ce5=a31_0x5650b1,{options:_0xe0e579,args:_0x12e6ef,tdx:_0x2d67ac}=_0x3e8ff0,_0x54d0c7=_0x12e6ef[0x0]||_0xe0e579['parentSegment'];if(!_0x54d0c7)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x4c3ce5(0x17a)),0x1;_0xe0e579[_0x4c3ce5(0x171)]&&(console[_0x4c3ce5(0x1d1)](_0x4c3ce5(0x26f)+_0xe0e579[_0x4c3ce5(0x1bc)]),console[_0x4c3ce5(0x1d1)]('Parent\x20segment:\x20'+_0x54d0c7));const _0xc6e5aa=await withSpinner(_0x4c3ce5(0x26e)+_0x54d0c7+_0x4c3ce5(0x199),()=>_0x2d67ac[_0x4c3ce5(0x279)]['resolveParentId'](_0x54d0c7),{'verbose':_0xe0e579['verbose']}),_0x2acd37=_0xc6e5aa[_0x4c3ce5(0x29c)],_0x54c967=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x54d0c7+'\x27...',()=>_0x2d67ac['segment']['getParentSQL'](_0x2acd37),{'verbose':_0xe0e579[_0x4c3ce5(0x171)]}),_0x569eba=_0x54c967['data'];return _0xe0e579[_0x4c3ce5(0x2e8)]==='json'||_0xe0e579[_0x4c3ce5(0x2e8)]===_0x4c3ce5(0x158)?await handleSDKOutput([{'sql':_0x569eba}],_0xe0e579):console[_0x4c3ce5(0x286)](_0x569eba),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x5650b1(0x358);[a31_0x5650b1(0x240)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x5650b1(0x169)](_0x18205f){const _0x54b0ef=a31_0x5650b1,{options:_0x267843,args:_0x24e977,tdx:_0x3c76d6}=_0x18205f,_0x5bb088=_0x24e977[0x0]||_0x267843[_0x54b0ef(0x2ca)];if(!_0x5bb088)return showParentSegmentNotSetError(_0x54b0ef(0x275)+_0x54b0ef(0x244)),0x1;_0x267843[_0x54b0ef(0x171)]&&(console[_0x54b0ef(0x1d1)]('Site:\x20'+_0x267843['site']),console['error'](_0x54b0ef(0x2ce)+_0x5bb088));const _0x53c5f7=await withSpinner(_0x54b0ef(0x26e)+_0x5bb088+_0x54b0ef(0x199),()=>_0x3c76d6['segment'][_0x54b0ef(0x2f1)](_0x5bb088),{'verbose':_0x267843[_0x54b0ef(0x171)]}),_0x1cc4a1=_0x53c5f7[_0x54b0ef(0x29c)],_0x15114c=await withSpinner(_0x54b0ef(0x1cc)+_0x5bb088+'\x27...',()=>_0x3c76d6['segment'][_0x54b0ef(0x185)](_0x1cc4a1),{'verbose':_0x267843[_0x54b0ef(0x171)]});let _0x3cc6f5=_0x15114c[_0x54b0ef(0x29c)];const _0x13c541=resolveLimit(_0x267843[_0x54b0ef(0x1f0)],DEFAULT_DISPLAY_LIMIT),_0x60a6e5=/\bLIMIT\s+\d+/i['test'](_0x3cc6f5);!_0x60a6e5&&(_0x3cc6f5=_0x3cc6f5[_0x54b0ef(0x2e9)]()[_0x54b0ef(0x24a)](/;+$/,''),_0x3cc6f5=_0x54b0ef(0x210)+_0x3cc6f5+_0x54b0ef(0x16e)+_0x13c541);_0x267843[_0x54b0ef(0x171)]&&console[_0x54b0ef(0x1d1)](_0x54b0ef(0x2d2)+_0x3cc6f5);const _0x80545c=await withProgressSpinner(_0x54b0ef(0x31c),async _0x5c2fa7=>{const _0x52e264=_0x54b0ef,_0x4a71be=await _0x3c76d6[_0x52e264(0x2c0)]['execute'](_0x3cc6f5,{'catalog':'td','schema':_0x52e264(0x30e),'onJobId':_0x3b7e12=>{const _0x11e3d8=_0x52e264;_0x5c2fa7[_0x11e3d8(0x148)](_0x3b7e12);}});return _0x4a71be;},{'verbose':_0x267843['verbose']}),_0x1a437b=_0x80545c[_0x54b0ef(0x29c)],_0x2ce1fe=_0x1a437b[_0x54b0ef(0x325)]?_0x54b0ef(0x2b5)+_0x1a437b[_0x54b0ef(0x325)]+']':'';return console['error'](_0x54b0ef(0x172)+_0x1a437b[_0x54b0ef(0x16f)][_0x54b0ef(0x2e2)][_0x54b0ef(0x2df)]()+_0x54b0ef(0x357)+(_0x54b0ef(0x2b3)+formatElapsed(_0x1a437b[_0x54b0ef(0x16f)][_0x54b0ef(0x19a)])+_0x2ce1fe)),await handleQueryOutput(_0x1a437b,_0x267843),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a31_0x5650b1(0x2f5);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x1a0);async['execute'](_0x20bf4e){const _0x215663=a31_0x5650b1,{options:_0x11aa6e,args:_0x39fc52,tdx:_0x3fd9fb}=_0x20bf4e,_0xf0569b=_0x39fc52[0x0],_0x431515=await withSpinner(_0xf0569b?_0x215663(0x26a)+_0xf0569b+_0x215663(0x199):_0x215663(0x187),()=>_0x3fd9fb[_0x215663(0x1db)][_0x215663(0x243)](),{'verbose':_0x11aa6e[_0x215663(0x171)]});let _0xef4e7=_0x431515[_0x215663(0x29c)]['filter'](_0x57c9b8=>_0x57c9b8[_0x215663(0x163)]);if(_0xf0569b){const _0x330e91=_0xf0569b[_0x215663(0x24a)](/[.+^${}()|[\]\\]/g,_0x215663(0x355))['replace'](/\*/g,'.*')[_0x215663(0x24a)](/\?/g,'.'),_0x5727ef=new RegExp('^'+_0x330e91+'$','i');_0xef4e7=_0xef4e7[_0x215663(0x333)](_0x39699b=>_0x5727ef[_0x215663(0x360)](_0x39699b[_0x215663(0x17e)]));}_0xef4e7[_0x215663(0x247)]((_0x3370f2,_0x4ff4ae)=>_0x3370f2[_0x215663(0x17e)][_0x215663(0x23c)](_0x4ff4ae[_0x215663(0x17e)])),console['error'](_0x215663(0x2af)+_0xef4e7[_0x215663(0x278)]+_0x215663(0x1a1)+(_0xef4e7[_0x215663(0x278)]!==0x1?'s':''));const _0x85acd8=_0x51f7c6=>{const _0x58e5dc=_0x215663;return getConsoleNextUrl(_0x11aa6e[_0x58e5dc(0x1bc)],'/app/dw/parentSegments/'+_0x51f7c6);};if(_0x11aa6e[_0x215663(0x2e8)]===_0x215663(0x32e)||_0x11aa6e['format']==='jsonl'){const _0x277a8e=_0xef4e7[_0x215663(0x31b)](_0x33c426=>({..._0x33c426,'url':_0x85acd8(_0x33c426['id'])}));await handleSDKOutput(_0x277a8e,_0x11aa6e);}else{if(_0xef4e7[_0x215663(0x278)]===0x0)console['log'](_0x215663(0x347));else for(const _0x56d659 of _0xef4e7){const _0x3e64d4=_0x56d659[_0x215663(0x248)]?a31_0x4baf7b[_0x215663(0x2fc)]('\x20('+formatRows(_0x56d659[_0x215663(0x248)])+')'):'',_0x1cf83b=hyperlink(_0x56d659['name'],_0x85acd8(_0x56d659['id']));console[_0x215663(0x286)]('⚡\x20'+_0x1cf83b+_0x3e64d4);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x31a);[a31_0x5650b1(0x240)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a31_0x5650b1(0x169)](_0x3570e0){const _0x492db3=a31_0x5650b1,{options:_0x23676d,args:_0x8b6ce0,tdx:_0x4c05d8}=_0x3570e0,_0x5edc88=_0x8b6ce0[0x0]||_0x23676d['parentSegment'];if(!_0x5edc88)return showParentSegmentNotSetError('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\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment'),0x1;const _0x16439d=resolveYamlFile(_0x5edc88);if(!existsSync(_0x16439d))return showFileNotFoundError(_0x16439d,_0x5edc88),0x1;let _0x4b8074;try{_0x4b8074=readFileSync(_0x16439d,_0x492db3(0x29d));}catch(_0xa12b76){const _0x4a54f0=_0xa12b76 instanceof Error?_0xa12b76['message']:String(_0xa12b76);return console[_0x492db3(0x1d1)](_0x492db3(0x341)+_0x4a54f0),0x1;}const _0x3acc0c=createCommandSpinner(a31_0x4baf7b[_0x492db3(0x2fc)](_0x492db3(0x2ec)),{'verbose':_0x23676d[_0x492db3(0x171)]});_0x3acc0c[_0x492db3(0x2fb)]();const _0x3e5cb0={'realtime':!![],'onProgress':_0x59f903=>{_0x3acc0c['text']=formatProgressMessage(_0x59f903);}};let _0x37bb8c;try{_0x37bb8c=await _0x4c05d8[_0x492db3(0x279)][_0x492db3(0x34e)](_0x4b8074,_0x3e5cb0),_0x3acc0c[_0x492db3(0x1cf)]();}catch(_0x261358){_0x3acc0c[_0x492db3(0x1cf)]();throw _0x261358;}console['error']('\x0a'+a31_0x4baf7b['bold'](_0x492db3(0x23f))+'\x20'+_0x37bb8c[_0x492db3(0x17e)]),console[_0x492db3(0x1d1)]('═'[_0x492db3(0x1bf)](0x3c)),displayRealtimeValidation(_0x37bb8c),console[_0x492db3(0x1d1)]('─'[_0x492db3(0x1bf)](0x3c));if(_0x37bb8c[_0x492db3(0x2ba)][_0x492db3(0x278)]>0x0){console[_0x492db3(0x1d1)]('\x0a'+a31_0x4baf7b[_0x492db3(0x31e)](_0x492db3(0x164)));for(const _0x4e705c of _0x37bb8c[_0x492db3(0x2ba)]){console[_0x492db3(0x1d1)]('\x20\x20'+a31_0x4baf7b[_0x492db3(0x31e)]('•')+'\x20'+_0x4e705c);}}return _0x37bb8c['allValid']&&console[_0x492db3(0x1d1)]('\x0a'+a31_0x4baf7b[_0x492db3(0x2b1)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x37bb8c[_0x492db3(0x317)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x1e6);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x264);async['execute'](_0x5a3368){const _0x37353a=a31_0x5650b1,{options:_0x48dc03,args:_0x18b0cf,tdx:_0x10f2e6}=_0x5a3368,_0x5adad4=_0x18b0cf[0x0]||_0x48dc03[_0x37353a(0x2ca)];if(!_0x5adad4)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'+_0x37353a(0x1e3)),0x1;_0x48dc03[_0x37353a(0x171)]&&(console[_0x37353a(0x1d1)](_0x37353a(0x26f)+_0x48dc03[_0x37353a(0x1bc)]),console[_0x37353a(0x1d1)](_0x37353a(0x2ce)+_0x5adad4));const _0x10c621=await withSpinner(_0x37353a(0x26e)+_0x5adad4+_0x37353a(0x199),()=>_0x10f2e6[_0x37353a(0x279)]['resolveParentId'](_0x5adad4),{'verbose':_0x48dc03[_0x37353a(0x171)]}),_0x2f7177=_0x10c621[_0x37353a(0x29c)],_0x4b0db8=await withSpinner(_0x37353a(0x161)+_0x5adad4+_0x37353a(0x199),()=>_0x10f2e6[_0x37353a(0x1db)]['listJourneys'](_0x2f7177),{'verbose':_0x48dc03[_0x37353a(0x171)]}),_0x10590a=_0x4b0db8['data'];console[_0x37353a(0x1d1)](_0x37353a(0x2af)+_0x10590a['length']+_0x37353a(0x17c)+(_0x10590a[_0x37353a(0x278)]!==0x1?'s':''));if(_0x48dc03[_0x37353a(0x2e8)]===_0x37353a(0x32e)||_0x48dc03[_0x37353a(0x2e8)]===_0x37353a(0x158))await handleSDKOutput(_0x10590a,_0x48dc03);else{if(_0x10590a[_0x37353a(0x278)]===0x0)console[_0x37353a(0x286)](_0x37353a(0x253));else for(const _0x412cbc of _0x10590a){const _0x30efe3=_0x412cbc[_0x37353a(0x160)]===_0x37353a(0x361)?'🚀':'📝',_0x287273=_0x412cbc[_0x37353a(0x2dc)]?a31_0x4baf7b[_0x37353a(0x184)](_0x37353a(0x31f)):'',_0x5a8b89=a31_0x4baf7b[_0x37353a(0x2fc)]('\x20('+_0x412cbc[_0x37353a(0x28d)]+_0x37353a(0x2a1)+(_0x412cbc[_0x37353a(0x28d)]!==0x1?'s':'')+')');console[_0x37353a(0x286)](_0x30efe3+'\x20'+_0x412cbc[_0x37353a(0x17e)]+_0x287273+_0x5a8b89);}}return 0x0;}}function a31_0xb690(_0x3a140b,_0x59b9c9){_0x3a140b=_0x3a140b-0x141;const _0x38b418=a31_0x38b4();let _0xb6904a=_0x38b418[_0x3a140b];return _0xb6904a;}export class PSRtJnPauseCommand extends BaseCommand{['name']=a31_0x5650b1(0x16c);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x2f9);async[a31_0x5650b1(0x169)](_0x280667){const _0x1563b6=a31_0x5650b1,{options:_0x424294,args:_0xf03c07,tdx:_0x3c75a4}=_0x280667,_0x3cfbbc=_0xf03c07[0x0];if(!_0x3cfbbc)return console[_0x1563b6(0x1d1)](a31_0x4baf7b[_0x1563b6(0x31e)](_0x1563b6(0x326))),console[_0x1563b6(0x1d1)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console[_0x1563b6(0x1d1)](a31_0x4baf7b[_0x1563b6(0x2fc)](_0x1563b6(0x15f))),0x1;_0x424294['verbose']&&(console[_0x1563b6(0x1d1)](_0x1563b6(0x26f)+_0x424294[_0x1563b6(0x1bc)]),console[_0x1563b6(0x1d1)]('RT\x20Journey\x20ID:\x20'+_0x3cfbbc));const _0x1fceba=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3cfbbc+_0x1563b6(0x199),()=>_0x3c75a4[_0x1563b6(0x1db)]['pauseJourney'](_0x3cfbbc),{'verbose':_0x424294[_0x1563b6(0x171)]}),_0x54be79=_0x1fceba['data'];console[_0x1563b6(0x1d1)](_0x1563b6(0x282)+_0x54be79[_0x1563b6(0x17e)]+'\x27');if(_0x424294[_0x1563b6(0x2e8)]==='json'||_0x424294[_0x1563b6(0x2e8)]===_0x1563b6(0x158))await handleSDKOutput([_0x54be79],_0x424294);else{const _0x18f45b=_0x54be79['state']===_0x1563b6(0x361)?'🚀':'📝',_0x214099=_0x54be79[_0x1563b6(0x2dc)]?a31_0x4baf7b[_0x1563b6(0x184)](_0x1563b6(0x31f)):'';console[_0x1563b6(0x286)](_0x18f45b+'\x20'+_0x54be79['name']+_0x214099);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x181);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x1d9);async['execute'](_0x473e53){const _0x1a1bbe=a31_0x5650b1,{options:_0xc840a8,args:_0x2af6bd,tdx:_0x4535f7}=_0x473e53,_0x24777c=_0x2af6bd[0x0];if(!_0x24777c)return console[_0x1a1bbe(0x1d1)](a31_0x4baf7b[_0x1a1bbe(0x31e)](_0x1a1bbe(0x326))),console[_0x1a1bbe(0x1d1)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console[_0x1a1bbe(0x1d1)](a31_0x4baf7b[_0x1a1bbe(0x2fc)](_0x1a1bbe(0x15f))),0x1;_0xc840a8['verbose']&&(console[_0x1a1bbe(0x1d1)](_0x1a1bbe(0x26f)+_0xc840a8[_0x1a1bbe(0x1bc)]),console[_0x1a1bbe(0x1d1)](_0x1a1bbe(0x254)+_0x24777c));const _0x3fe3e9=await withSpinner(_0x1a1bbe(0x20c)+_0x24777c+_0x1a1bbe(0x199),()=>_0x4535f7[_0x1a1bbe(0x1db)][_0x1a1bbe(0x23e)](_0x24777c),{'verbose':_0xc840a8[_0x1a1bbe(0x171)]}),_0x558e3f=_0x3fe3e9['data'];console[_0x1a1bbe(0x1d1)](_0x1a1bbe(0x1b6)+_0x558e3f[_0x1a1bbe(0x17e)]+'\x27');if(_0xc840a8[_0x1a1bbe(0x2e8)]===_0x1a1bbe(0x32e)||_0xc840a8[_0x1a1bbe(0x2e8)]===_0x1a1bbe(0x158))await handleSDKOutput([_0x558e3f],_0xc840a8);else{const _0x1349e1=_0x558e3f['state']==='launched'?'🚀':'📝',_0x37d5e9=_0x558e3f[_0x1a1bbe(0x2dc)]?a31_0x4baf7b[_0x1a1bbe(0x184)]('\x20(paused)'):'';console[_0x1a1bbe(0x286)](_0x1349e1+'\x20'+_0x558e3f[_0x1a1bbe(0x17e)]+_0x37d5e9);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']='ps:rt:configuration_versions';[a31_0x5650b1(0x240)]='Get\x20current\x20RT\x20configuration\x20version\x20status';async[a31_0x5650b1(0x169)](_0x22f3c5){const _0x211bb1=a31_0x5650b1,{options:_0x302d02,args:_0x3c58d6,tdx:_0x4e174a}=_0x22f3c5,_0x3939b4=_0x3c58d6[0x0]||_0x302d02['parentSegment'];if(!_0x3939b4)return showParentSegmentNotSetError(_0x211bb1(0x2f8)+'\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'),0x1;_0x302d02[_0x211bb1(0x171)]&&(console['error']('Site:\x20'+_0x302d02['site']),console['error'](_0x211bb1(0x2ce)+_0x3939b4));const _0x4b519f=await withSpinner(_0x211bb1(0x26e)+_0x3939b4+_0x211bb1(0x199),()=>_0x4e174a['segment'][_0x211bb1(0x2f1)](_0x3939b4),{'verbose':_0x302d02[_0x211bb1(0x171)]}),_0x449c8f=_0x4b519f['data'],_0x5e04fa=await withSpinner(_0x211bb1(0x1a8)+_0x3939b4+'\x27...',()=>_0x4e174a[_0x211bb1(0x1db)][_0x211bb1(0x296)](_0x449c8f),{'verbose':_0x302d02[_0x211bb1(0x171)]}),_0x3c4bc2=_0x5e04fa[_0x211bb1(0x29c)];return console[_0x211bb1(0x1d1)](_0x211bb1(0x142)),_0x302d02[_0x211bb1(0x2e8)]===_0x211bb1(0x32e)||_0x302d02[_0x211bb1(0x2e8)]===_0x211bb1(0x158)?await handleSDKOutput([_0x3c4bc2],_0x302d02):(console[_0x211bb1(0x286)](_0x211bb1(0x31d)+_0x3c4bc2['id']),console[_0x211bb1(0x286)]('audienceId:\x20'+_0x3c4bc2[_0x211bb1(0x1dc)]),console[_0x211bb1(0x286)](_0x211bb1(0x353)+_0x3c4bc2[_0x211bb1(0x2ad)]),console[_0x211bb1(0x286)](_0x211bb1(0x2d5)+_0x3c4bc2[_0x211bb1(0x32b)]),console['log'](_0x211bb1(0x1c1)+_0x3c4bc2[_0x211bb1(0x33d)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x2a9);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x1c4);async[a31_0x5650b1(0x169)](_0x51702b){const _0x5e2a08=a31_0x5650b1,{options:_0x52b448,args:_0x4c9063,tdx:_0x2d7df4}=_0x51702b,_0x55d17c=_0x4c9063[0x0]||_0x52b448[_0x5e2a08(0x2ca)];if(!_0x55d17c)return showParentSegmentNotSetError(_0x5e2a08(0x1df)+_0x5e2a08(0x1a9)),0x1;const _0x56bc37=await withSpinner(_0x5e2a08(0x26e)+_0x55d17c+'\x27...',()=>_0x2d7df4[_0x5e2a08(0x279)][_0x5e2a08(0x2f1)](_0x55d17c),{'verbose':_0x52b448[_0x5e2a08(0x171)]}),_0x48aa8d=_0x56bc37[_0x5e2a08(0x29c)],_0x396c8d=await withSpinner(_0x5e2a08(0x300)+_0x55d17c+_0x5e2a08(0x199),()=>_0x2d7df4[_0x5e2a08(0x2d7)][_0x5e2a08(0x243)](_0x48aa8d),{'verbose':_0x52b448[_0x5e2a08(0x171)]}),_0x55aa95=_0x396c8d[_0x5e2a08(0x29c)];console[_0x5e2a08(0x1d1)](_0x5e2a08(0x2af)+_0x55aa95['length']+_0x5e2a08(0x236)+(_0x55aa95[_0x5e2a08(0x278)]!==0x1?'s':''));if(_0x52b448['format']===_0x5e2a08(0x32e)||_0x52b448[_0x5e2a08(0x2e8)]==='jsonl')await handleSDKOutput(_0x55aa95,_0x52b448);else{if(_0x55aa95[_0x5e2a08(0x278)]===0x0)console[_0x5e2a08(0x286)](_0x5e2a08(0x1ac)),console[_0x5e2a08(0x1d1)](a31_0x4baf7b['cyan']('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0x564333 of _0x55aa95){console[_0x5e2a08(0x286)](a31_0x4baf7b[_0x5e2a08(0x156)](_0x564333[_0x5e2a08(0x17e)])+'\x20'+a31_0x4baf7b[_0x5e2a08(0x2fc)]('(id:\x20'+_0x564333['id']+')'));_0x564333[_0x5e2a08(0x240)]&&console[_0x5e2a08(0x286)]('\x20\x20'+a31_0x4baf7b['dim'](_0x564333[_0x5e2a08(0x240)]));if(_0x564333[_0x5e2a08(0x18b)]&&_0x564333[_0x5e2a08(0x18b)][_0x5e2a08(0x278)]>0x0)for(const _0x1140ec of _0x564333[_0x5e2a08(0x18b)]){const _0x10abc6=_0x1140ec[_0x5e2a08(0x1ab)]?.[_0x5e2a08(0x278)]?_0x1140ec[_0x5e2a08(0x1ab)][_0x5e2a08(0x217)](',\x20'):_0x5e2a08(0x297);console[_0x5e2a08(0x286)]('\x20\x20'+a31_0x4baf7b[_0x5e2a08(0x294)](_0x5e2a08(0x33e))+'\x20'+_0x1140ec[_0x5e2a08(0x17e)]+'\x20'+a31_0x4baf7b[_0x5e2a08(0x2fc)](_0x5e2a08(0x213)+_0x1140ec['id']+')')),console[_0x5e2a08(0x286)](_0x5e2a08(0x146)+a31_0x4baf7b[_0x5e2a08(0x2fc)](_0x5e2a08(0x144))+'\x20'+_0x10abc6);}else console[_0x5e2a08(0x286)]('\x20\x20'+a31_0x4baf7b['dim'](_0x5e2a08(0x1a5)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x288);['description']=a31_0x5650b1(0x2e0);async[a31_0x5650b1(0x169)](_0x33e1f1){const _0x407479=a31_0x5650b1,{options:_0xb6ad7d,args:_0x201890,tdx:_0xed4c39}=_0x33e1f1,_0xcbc37=_0xb6ad7d,_0x28dfa2=_0x201890[0x0],_0x575538=_0x201890[0x1]||_0xb6ad7d[_0x407479(0x2ca)];if(!_0x28dfa2)return console[_0x407479(0x1d1)](_0x407479(0x350)),console[_0x407479(0x1d1)](_0x407479(0x2bc)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x575538)return showParentSegmentNotSetError(_0x407479(0x339)+_0x407479(0x2b0)),0x1;const _0x223b97=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x575538+'\x27...',()=>_0xed4c39[_0x407479(0x279)]['resolveParentId'](_0x575538),{'verbose':_0xb6ad7d[_0x407479(0x171)]}),_0x3ca30c=_0x223b97[_0x407479(0x29c)],_0x3e8458={'name':_0x28dfa2,'description':_0xcbc37[_0x407479(0x240)],'public':_0xcbc37[_0x407479(0x1e8)]},_0x2b3d5a=await withSpinner(_0x407479(0x292)+_0x28dfa2+'\x27...',()=>_0xed4c39[_0x407479(0x2d7)][_0x407479(0x293)](_0x3ca30c,_0x3e8458),{'verbose':_0xb6ad7d[_0x407479(0x171)]}),_0x52ed58=_0x2b3d5a[_0x407479(0x29c)];return console['error'](_0x407479(0x190)+_0x52ed58[_0x407479(0x17e)]+_0x407479(0x1ca)+_0x52ed58['id']),await handleSDKOutput([_0x52ed58],_0xb6ad7d),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x5650b1(0x17e)]='ps:pz:service:show';['description']='Show\x20personalization\x20service\x20details';async[a31_0x5650b1(0x169)](_0x16e115){const _0x518be3=a31_0x5650b1,{options:_0x1adeb6,args:_0x2852db,tdx:_0xefa1e5}=_0x16e115,_0x4e6e53=_0x2852db[0x0],_0x52131f=_0x2852db[0x1]||_0x1adeb6[_0x518be3(0x2ca)];if(!_0x4e6e53)return console[_0x518be3(0x1d1)](_0x518be3(0x310)),console[_0x518be3(0x1d1)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x518be3(0x1d1)](_0x518be3(0x21d)),0x1;if(!_0x52131f)return showParentSegmentNotSetError(_0x518be3(0x232)+_0x518be3(0x21d)),0x1;const _0x4b737d=await withSpinner(_0x518be3(0x26e)+_0x52131f+_0x518be3(0x199),()=>_0xefa1e5['segment'][_0x518be3(0x2f1)](_0x52131f),{'verbose':_0x1adeb6['verbose']}),_0x4719c2=_0x4b737d[_0x518be3(0x29c)],_0x5d1176=await withSpinner(_0x518be3(0x30d)+_0x4e6e53+'\x27...',()=>_0xefa1e5[_0x518be3(0x2d7)][_0x518be3(0x330)](_0x4719c2,_0x4e6e53),{'verbose':_0x1adeb6[_0x518be3(0x171)]}),_0x1ccd78=_0x5d1176[_0x518be3(0x29c)];if(_0x1adeb6[_0x518be3(0x32e)]||_0x1adeb6[_0x518be3(0x158)])await handleSDKOutput([_0x1ccd78],_0x1adeb6);else{console[_0x518be3(0x286)](a31_0x4baf7b['bold'](_0x1ccd78['name'])+'\x20'+a31_0x4baf7b['dim'](_0x518be3(0x213)+_0x1ccd78['id']+')'));_0x1ccd78[_0x518be3(0x240)]&&console[_0x518be3(0x286)]('\x20\x20'+a31_0x4baf7b['dim'](_0x1ccd78[_0x518be3(0x240)]));console['log']('\x20\x20'+a31_0x4baf7b[_0x518be3(0x294)]('public:')+'\x20'+(_0x1ccd78[_0x518be3(0x1e8)]?_0x518be3(0x2ea):'no'));if(_0x1ccd78[_0x518be3(0x18b)]&&_0x1ccd78['tokens']['length']>0x0)for(const _0x2fb472 of _0x1ccd78[_0x518be3(0x18b)]){const _0xbedc2c=_0x2fb472[_0x518be3(0x1ab)]?.['length']?_0x2fb472[_0x518be3(0x1ab)]['join'](',\x20'):_0x518be3(0x297);console[_0x518be3(0x286)]('\x20\x20'+a31_0x4baf7b[_0x518be3(0x294)]('token:')+'\x20'+_0x2fb472[_0x518be3(0x17e)]+'\x20'+a31_0x4baf7b[_0x518be3(0x2fc)](_0x518be3(0x213)+_0x2fb472['id']+')')),console[_0x518be3(0x286)](_0x518be3(0x146)+a31_0x4baf7b[_0x518be3(0x2fc)](_0x518be3(0x144))+'\x20'+_0xbedc2c);}else console['log']('\x20\x20'+a31_0x4baf7b[_0x518be3(0x2fc)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x168);[a31_0x5650b1(0x240)]=a31_0x5650b1(0x32d);async[a31_0x5650b1(0x169)](_0x31f01a){const _0x270a5=a31_0x5650b1,{options:_0x17d7f3,args:_0x4b33f1,tdx:_0x2d64d4}=_0x31f01a,_0x323a68=_0x4b33f1[0x0],_0x3ae8a7=_0x4b33f1[0x1]||_0x17d7f3[_0x270a5(0x2ca)];if(!_0x323a68)return console[_0x270a5(0x1d1)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x270a5(0x1d1)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0x270a5(0x1d1)](_0x270a5(0x1ff)),0x1;if(!_0x3ae8a7)return showParentSegmentNotSetError(_0x270a5(0x2e1)+_0x270a5(0x1ff)),0x1;const _0x5dfe37=await withSpinner(_0x270a5(0x26e)+_0x3ae8a7+'\x27...',()=>_0x2d64d4[_0x270a5(0x279)]['resolveParentId'](_0x3ae8a7),{'verbose':_0x17d7f3[_0x270a5(0x171)]}),_0x229438=_0x5dfe37[_0x270a5(0x29c)];return await withSpinner(_0x270a5(0x19d)+_0x323a68+_0x270a5(0x199),()=>_0x2d64d4[_0x270a5(0x2d7)][_0x270a5(0x2d4)](_0x229438,_0x323a68),{'verbose':_0x17d7f3['verbose']}),console[_0x270a5(0x1d1)]('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x323a68+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']='ps:pz:service:update';[a31_0x5650b1(0x240)]=a31_0x5650b1(0x18f);async[a31_0x5650b1(0x169)](_0x546449){const _0x4af5a1=a31_0x5650b1,{options:_0x5cc354,args:_0x4b0c5b,tdx:_0x18ca8e}=_0x546449,_0x487194=_0x5cc354,_0x3d3914=_0x4b0c5b[0x0],_0x5977b4=_0x4b0c5b[0x1]||_0x5cc354['parentSegment'];if(!_0x3d3914)return console[_0x4af5a1(0x1d1)](_0x4af5a1(0x310)),console[_0x4af5a1(0x1d1)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),console[_0x4af5a1(0x1d1)](_0x4af5a1(0x34f)),0x1;if(!_0x487194['name'])return console[_0x4af5a1(0x1d1)](_0x4af5a1(0x270)),console[_0x4af5a1(0x1d1)](_0x4af5a1(0x1f1)),0x1;if(!_0x5977b4)return showParentSegmentNotSetError(_0x4af5a1(0x2c8)+_0x4af5a1(0x34f)),0x1;const _0x246a54=await withSpinner(_0x4af5a1(0x26e)+_0x5977b4+'\x27...',()=>_0x18ca8e['segment'][_0x4af5a1(0x2f1)](_0x5977b4),{'verbose':_0x5cc354['verbose']}),_0x4eea0d=_0x246a54[_0x4af5a1(0x29c)],_0x4b42bb={'name':_0x487194[_0x4af5a1(0x17e)]};_0x487194[_0x4af5a1(0x240)]!==undefined&&(_0x4b42bb[_0x4af5a1(0x240)]=_0x487194[_0x4af5a1(0x240)]);const _0x2e59dd=await withSpinner(_0x4af5a1(0x255)+_0x3d3914+'\x27...',()=>_0x18ca8e['personalization']['patch'](_0x4eea0d,_0x3d3914,_0x4b42bb),{'verbose':_0x5cc354[_0x4af5a1(0x171)]}),_0x1b7f26=_0x2e59dd[_0x4af5a1(0x29c)];return console[_0x4af5a1(0x1d1)](_0x4af5a1(0x1d6)+_0x1b7f26[_0x4af5a1(0x17e)]+'\x27'),await handleSDKOutput([_0x1b7f26],_0x5cc354),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x5650b1(0x17e)]='ps:pz:service:token:create';['description']=a31_0x5650b1(0x346);async[a31_0x5650b1(0x169)](_0x532276){const _0x25255c=a31_0x5650b1,{options:_0x5cf526,args:_0x25de1c,tdx:_0x948f1c}=_0x532276,_0x88f70a=_0x5cf526,_0x371254=_0x25de1c[0x0],_0x3ec96d=_0x25de1c[0x1],_0x4c1583=_0x25de1c[0x2]||_0x5cf526[_0x25255c(0x2ca)];if(!_0x371254)return console['error'](_0x25255c(0x24c)),console['error'](_0x25255c(0x226)),console[_0x25255c(0x1d1)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x3ec96d)return console[_0x25255c(0x1d1)]('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0x25255c(0x226)),console[_0x25255c(0x1d1)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4c1583)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+_0x25255c(0x268)),0x1;const _0x2a301a=await withSpinner(_0x25255c(0x26e)+_0x4c1583+_0x25255c(0x199),()=>_0x948f1c[_0x25255c(0x279)]['resolveParentId'](_0x4c1583),{'verbose':_0x5cf526['verbose']}),_0xebedd4=_0x2a301a['data'],_0x12d690={'name':_0x371254};_0x88f70a['allowedIps']&&(_0x12d690['allowedIps']=_0x88f70a[_0x25255c(0x1ab)][_0x25255c(0x1eb)](',')['map'](_0x5b9462=>_0x5b9462[_0x25255c(0x2e9)]()));_0x88f70a[_0x25255c(0x240)]&&(_0x12d690[_0x25255c(0x240)]=_0x88f70a['description']);const _0x2a161b=await withSpinner(_0x25255c(0x27e)+_0x371254+_0x25255c(0x145)+_0x3ec96d+_0x25255c(0x199),()=>_0x948f1c[_0x25255c(0x2d7)][_0x25255c(0x2a8)](_0xebedd4,_0x3ec96d,_0x12d690),{'verbose':_0x5cf526[_0x25255c(0x171)]}),_0x27bf35=_0x2a161b['data'];return console[_0x25255c(0x1d1)](_0x25255c(0x2b8)+_0x27bf35[_0x25255c(0x17e)]+_0x25255c(0x1ca)+_0x27bf35['id']),_0x27bf35[_0x25255c(0x2c6)]&&(console[_0x25255c(0x1d1)](a31_0x4baf7b[_0x25255c(0x184)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console['error'](a31_0x4baf7b[_0x25255c(0x294)](_0x27bf35[_0x25255c(0x2c6)])),console[_0x25255c(0x1d1)]('')),await handleSDKOutput([_0x27bf35],_0x5cf526),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x307);['description']=a31_0x5650b1(0x2ab);async['execute'](_0x12b2d1){const _0x4f9e47=a31_0x5650b1,{options:_0x3c5f65,args:_0x44cbdc,tdx:_0x51a0ac}=_0x12b2d1,_0x441cfc=_0x44cbdc[0x0],_0x24ebcb=_0x44cbdc[0x1]||_0x3c5f65['parentSegment'];if(!_0x441cfc)return console['error']('Error:\x20Token\x20ID\x20is\x20required'),console[_0x4f9e47(0x1d1)](_0x4f9e47(0x1de)),console[_0x4f9e47(0x1d1)](_0x4f9e47(0x2a5)),0x1;if(!_0x24ebcb)return showParentSegmentNotSetError(_0x4f9e47(0x309)+_0x4f9e47(0x2a5)),0x1;const _0x46b487=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x24ebcb+'\x27...',()=>_0x51a0ac[_0x4f9e47(0x279)]['resolveParentId'](_0x24ebcb),{'verbose':_0x3c5f65[_0x4f9e47(0x171)]}),_0x2d9f45=_0x46b487[_0x4f9e47(0x29c)],_0x22ebbb=await withSpinner(_0x4f9e47(0x340),()=>_0x51a0ac[_0x4f9e47(0x2d7)][_0x4f9e47(0x243)](_0x2d9f45),{'verbose':_0x3c5f65[_0x4f9e47(0x171)]}),_0x3a3847=_0x22ebbb['data'];let _0x49d9ee;for(const _0xae949d of _0x3a3847){if(_0xae949d['tokens']?.[_0x4f9e47(0x143)](_0x1e1e08=>_0x1e1e08['id']===_0x441cfc)){_0x49d9ee=_0xae949d['id'];break;}}if(!_0x49d9ee)return console[_0x4f9e47(0x1d1)]('Error:\x20Token\x20\x27'+_0x441cfc+_0x4f9e47(0x1a7)),0x1;const _0x5ceb64=await withSpinner('Deleting\x20token\x20\x27'+_0x441cfc+_0x4f9e47(0x199),()=>_0x51a0ac['personalization']['deleteToken'](_0x2d9f45,_0x49d9ee,_0x441cfc),{'verbose':_0x3c5f65[_0x4f9e47(0x171)]}),_0x19fafb=_0x5ceb64[_0x4f9e47(0x29c)];return console[_0x4f9e47(0x1d1)](_0x4f9e47(0x18e)+(_0x19fafb[_0x4f9e47(0x17e)]||_0x441cfc)+'\x27'),await handleSDKOutput([_0x19fafb],_0x3c5f65),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x155);['description']=a31_0x5650b1(0x1e4);async['execute'](_0x30dd18){const _0x162c87=a31_0x5650b1,{options:_0x491900,args:_0xebd0dd,tdx:_0x456890}=_0x30dd18,_0x1362b9=_0xebd0dd[0x0]||_0x491900[_0x162c87(0x2ca)];if(!_0x1362b9)return showParentSegmentNotSetError(_0x162c87(0x19e)+_0x162c87(0x162)),0x1;const _0x9dbd7b=await withSpinner(_0x162c87(0x26e)+_0x1362b9+_0x162c87(0x199),()=>_0x456890['segment'][_0x162c87(0x2f1)](_0x1362b9),{'verbose':_0x491900['verbose']}),_0x2d0928=_0x9dbd7b[_0x162c87(0x29c)],_0x56b5c8=await withSpinner(_0x162c87(0x328)+_0x1362b9+_0x162c87(0x199),()=>_0x456890[_0x162c87(0x2d7)][_0x162c87(0x335)](_0x2d0928),{'verbose':_0x491900[_0x162c87(0x171)]}),_0x151ced=_0x56b5c8[_0x162c87(0x29c)];console[_0x162c87(0x1d1)](_0x162c87(0x2af)+_0x151ced[_0x162c87(0x278)]+'\x20personalization'+(_0x151ced['length']!==0x1?'s':''));if(_0x491900[_0x162c87(0x2e8)]==='json'||_0x491900[_0x162c87(0x2e8)]==='jsonl')await handleSDKOutput(_0x151ced,_0x491900);else{if(_0x151ced[_0x162c87(0x278)]===0x0)console['log'](_0x162c87(0x2f6));else for(const _0x2d25f4 of _0x151ced){console[_0x162c87(0x286)](a31_0x4baf7b['bold'](_0x2d25f4[_0x162c87(0x17e)])+'\x20'+a31_0x4baf7b[_0x162c87(0x2fc)](_0x162c87(0x213)+_0x2d25f4['id']+')'));_0x2d25f4[_0x162c87(0x240)]&&console[_0x162c87(0x286)]('\x20\x20'+a31_0x4baf7b[_0x162c87(0x2fc)](_0x2d25f4['description']));const _0x47ef8a=_0x2d25f4['sections']?.[_0x162c87(0x278)]||0x0;console['log']('\x20\x20'+a31_0x4baf7b[_0x162c87(0x294)](_0x162c87(0x295))+'\x20'+_0x47ef8a);if(_0x2d25f4[_0x162c87(0x188)]&&_0x2d25f4[_0x162c87(0x188)][_0x162c87(0x278)]>0x0)for(const _0x15fe40 of _0x2d25f4[_0x162c87(0x188)]){console['log']('\x20\x20\x20\x20-\x20'+_0x15fe40[_0x162c87(0x17e)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']='ps:pz:show';[a31_0x5650b1(0x240)]='Show\x20a\x20specific\x20realtime\x20personalization';async['execute'](_0x5659a2){const _0xe65721=a31_0x5650b1,{options:_0x59f454,args:_0x2f358b,tdx:_0x126594}=_0x5659a2,_0x4c0305=_0x2f358b[0x0];if(!_0x4c0305)return console[_0xe65721(0x1d1)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0xe65721(0x1d1)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x4347af=await withSpinner(_0xe65721(0x2e7)+_0x4c0305+_0xe65721(0x199),()=>_0x126594[_0xe65721(0x2d7)][_0xe65721(0x1e7)](_0x4c0305),{'verbose':_0x59f454[_0xe65721(0x171)]}),_0x385b4c=_0x4347af[_0xe65721(0x29c)];console[_0xe65721(0x1d1)]('✔\x20Found\x20personalization\x20\x27'+_0x385b4c[_0xe65721(0x17e)]+'\x27');if(_0x59f454[_0xe65721(0x2e8)]===_0xe65721(0x32e)||_0x59f454[_0xe65721(0x2e8)]===_0xe65721(0x158))await handleSDKOutput([_0x385b4c],_0x59f454);else{console[_0xe65721(0x286)](a31_0x4baf7b['bold'](_0x385b4c[_0xe65721(0x17e)])+'\x20'+a31_0x4baf7b['dim'](_0xe65721(0x213)+_0x385b4c['id']+')'));_0x385b4c[_0xe65721(0x240)]&&console['log']('\x20\x20'+a31_0x4baf7b[_0xe65721(0x2fc)](_0x385b4c[_0xe65721(0x240)]));_0x385b4c[_0xe65721(0x1dc)]&&console[_0xe65721(0x286)]('\x20\x20'+a31_0x4baf7b[_0xe65721(0x294)](_0xe65721(0x302))+'\x20'+_0x385b4c[_0xe65721(0x1dc)]);console[_0xe65721(0x286)]('\x20\x20'+a31_0x4baf7b['cyan'](_0xe65721(0x14d))+'\x20'+_0x385b4c[_0xe65721(0x23d)]),console[_0xe65721(0x286)]('\x20\x20'+a31_0x4baf7b['cyan'](_0xe65721(0x1c9))+'\x20'+_0x385b4c[_0xe65721(0x2f2)]);const _0x10e991=_0x385b4c['sections']?.[_0xe65721(0x278)]||0x0;console['log']('\x20\x20'+a31_0x4baf7b[_0xe65721(0x294)](_0xe65721(0x295))+'\x20'+_0x10e991);if(_0x385b4c[_0xe65721(0x188)]&&_0x385b4c['sections'][_0xe65721(0x278)]>0x0)for(const _0x3f5e90 of _0x385b4c[_0xe65721(0x188)]){console[_0xe65721(0x286)](_0xe65721(0x146)+a31_0x4baf7b[_0xe65721(0x156)](_0x3f5e90[_0xe65721(0x17e)])+'\x20'+a31_0x4baf7b[_0xe65721(0x2fc)](_0xe65721(0x213)+_0x3f5e90['id']+')')),_0x3f5e90[_0xe65721(0x24f)]&&(console[_0xe65721(0x286)](_0xe65721(0x15a)+a31_0x4baf7b[_0xe65721(0x294)]('entryCriteria:')+'\x20'+_0x3f5e90['entryCriteria'][_0xe65721(0x17e)]),_0x3f5e90[_0xe65721(0x24f)][_0xe65721(0x35d)]?.[_0xe65721(0x2c1)]&&console[_0xe65721(0x286)](_0xe65721(0x2ed)+a31_0x4baf7b[_0xe65721(0x294)](_0xe65721(0x20a))+'\x20'+_0x3f5e90[_0xe65721(0x24f)]['keyEventCriteria'][_0xe65721(0x2c1)])),_0x3f5e90[_0xe65721(0x2a3)]&&console['log'](_0xe65721(0x15a)+a31_0x4baf7b[_0xe65721(0x294)](_0xe65721(0x25b))+'\x20'+JSON[_0xe65721(0x225)](_0x3f5e90[_0xe65721(0x2a3)])),_0x3f5e90[_0xe65721(0x24d)]&&console['log'](_0xe65721(0x15a)+a31_0x4baf7b[_0xe65721(0x294)](_0xe65721(0x19f))+_0xe65721(0x343));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x359);['description']=a31_0x5650b1(0x26b);async['execute'](_0x136835){const _0x1849eb=a31_0x5650b1,{options:_0x3a686d,args:_0x3f8d5a,tdx:_0x1216e1}=_0x136835,_0x2b6834=_0x3f8d5a[0x0];if(!_0x2b6834)return console[_0x1849eb(0x1d1)](_0x1849eb(0x28e)),console['error'](_0x1849eb(0x177)),0x1;return await withSpinner(_0x1849eb(0x303)+_0x2b6834+_0x1849eb(0x199),()=>_0x1216e1[_0x1849eb(0x2d7)]['deletePersonalization'](_0x2b6834),{'verbose':_0x3a686d[_0x1849eb(0x171)]}),console[_0x1849eb(0x1d1)]('✔\x20Deleted\x20personalization\x20\x27'+_0x2b6834+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x5650b1(0x17e)]=a31_0x5650b1(0x2d6);['description']=a31_0x5650b1(0x2ae);async[a31_0x5650b1(0x169)](_0xc37b7c){const _0x124272=a31_0x5650b1,{options:_0x524000,tdx:_0x187285}=_0xc37b7c,_0x39e9b5=_0x524000;let _0x282274;if(_0x39e9b5[_0x124272(0x319)]){_0x282274=await loadJSON(_0x39e9b5[_0x124272(0x319)],!![]);if(!_0x282274[_0x124272(0x20d)]?.[_0x124272(0x1a4)])return console[_0x124272(0x1d1)](_0x124272(0x289)),console[_0x124272(0x1d1)](_0x124272(0x1e2)),console['error']('\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}'),0x1;}else{if(!_0x39e9b5[_0x124272(0x17e)])return console[_0x124272(0x1d1)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x124272(0x1d1)](_0x124272(0x251)),console[_0x124272(0x1d1)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x39e9b5['description']===undefined)return console[_0x124272(0x1d1)](_0x124272(0x1ce)),console[_0x124272(0x1d1)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0x124272(0x229)),0x1;if(_0x39e9b5[_0x124272(0x1f8)]===undefined)return console[_0x124272(0x1d1)](_0x124272(0x15d)),console['error']('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x28e296=_0x39e9b5['audienceId'];if(!_0x28e296&&_0x524000['parentSegment']){const _0x450f2f=await withSpinner(_0x124272(0x26e)+_0x524000[_0x124272(0x2ca)]+'\x27...',()=>_0x187285[_0x124272(0x279)][_0x124272(0x2f1)](_0x524000['parentSegment']),{'verbose':_0x524000['verbose']});_0x28e296=_0x450f2f['data'];}let _0x92fd04;_0x39e9b5['sections']&&(_0x92fd04=await loadJSON(_0x39e9b5[_0x124272(0x188)],![]));const _0x443cb1=_0x39e9b5[_0x124272(0x1f8)]===_0x124272(0x329)?null:{'id':_0x39e9b5['folderId'],'type':'folder-segment'};_0x282274={'attributes':{'name':_0x39e9b5[_0x124272(0x17e)],'description':_0x39e9b5[_0x124272(0x240)]||null,..._0x28e296!==undefined&&{'audienceId':_0x28e296},..._0x92fd04!==undefined&&{'sections':_0x92fd04}},'relationships':{'parentFolder':{'data':_0x443cb1}}};}const _0x4b0dc5=await withSpinner(_0x124272(0x291)+(_0x282274[_0x124272(0x2d0)]?.['name']??'')+_0x124272(0x199),()=>_0x187285[_0x124272(0x2d7)][_0x124272(0x1bd)](_0x282274),{'verbose':_0x524000[_0x124272(0x171)]}),_0xb61fd1=_0x4b0dc5[_0x124272(0x29c)];return console[_0x124272(0x1d1)](_0x124272(0x1b2)+_0xb61fd1[_0x124272(0x17e)]+_0x124272(0x1ca)+_0xb61fd1['id']),await handleSDKOutput([_0xb61fd1],_0x524000),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x5650b1(0x17e)]='ps:pz:patch';[a31_0x5650b1(0x240)]='Update\x20a\x20realtime\x20personalization\x20entity';async[a31_0x5650b1(0x169)](_0x367966){const _0x3f2933=a31_0x5650b1,{options:_0x45709c,args:_0x474dc6}=_0x367966,_0xa0ba04=_0x45709c,_0x279b9a=_0x474dc6[0x0];if(!_0x279b9a)return console['error'](_0x3f2933(0x28e)),console['error'](_0x3f2933(0x258)),console[_0x3f2933(0x1d1)](_0x3f2933(0x269)),0x1;let _0x350ddc;if(_0xa0ba04['file'])_0x350ddc=await loadJSON(_0xa0ba04[_0x3f2933(0x319)],!![]);else{if(!_0xa0ba04['name'])return console[_0x3f2933(0x1d1)](_0x3f2933(0x30f)),console[_0x3f2933(0x1d1)](_0x3f2933(0x258)),0x1;if(_0xa0ba04[_0x3f2933(0x240)]===undefined)return console['error'](_0x3f2933(0x1ce)),console[_0x3f2933(0x1d1)](_0x3f2933(0x258)),0x1;let _0x5ab53b;_0xa0ba04[_0x3f2933(0x188)]&&(_0x5ab53b=await loadJSON(_0xa0ba04[_0x3f2933(0x188)],![])),_0x350ddc={'attributes':{'name':_0xa0ba04[_0x3f2933(0x17e)],'description':_0xa0ba04[_0x3f2933(0x240)]||null,..._0x5ab53b!==undefined&&{'sections':_0x5ab53b}}};}const {tdx:_0x55e15b}=_0x367966,_0x18a767=await withSpinner(_0x3f2933(0x1fc)+_0x279b9a+_0x3f2933(0x199),()=>_0x55e15b[_0x3f2933(0x2d7)][_0x3f2933(0x260)](_0x279b9a,_0x350ddc),{'verbose':_0x45709c['verbose']}),_0x556141=_0x18a767[_0x3f2933(0x29c)];return console['error'](_0x3f2933(0x1e5)+_0x556141[_0x3f2933(0x17e)]+_0x3f2933(0x1c3)+_0x556141['id']+')'),await handleSDKOutput([_0x556141],_0x45709c),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x5650b1(0x17e)]='ps:pz:init';[a31_0x5650b1(0x240)]=a31_0x5650b1(0x35e);async[a31_0x5650b1(0x169)](_0x4e1bb0){const _0x2cc35b=a31_0x5650b1,{options:_0xb05901,args:_0x31b186}=_0x4e1bb0,_0x159b24=_0x31b186[0x0]||_0xb05901['parentSegment'];if(!_0x159b24)return showParentSegmentNotSetError(_0x2cc35b(0x16b)+_0x2cc35b(0x32f)),0x1;const _0x3a41a7=resolveYamlFile(_0x159b24);if(!existsSync(_0x3a41a7))return showFileNotFoundError(_0x3a41a7,_0x159b24),0x1;let _0x16eb47;try{_0x16eb47=readFileSync(_0x3a41a7,_0x2cc35b(0x29d));}catch(_0x4687c1){const _0x95ef39=_0x4687c1 instanceof Error?_0x4687c1['message']:String(_0x4687c1);return console[_0x2cc35b(0x1d1)](_0x2cc35b(0x341)+_0x95ef39),0x1;}let _0x5002cd;try{_0x5002cd=parseDef(_0x16eb47);}catch(_0x2ed1f6){const _0x279161=_0x2ed1f6 instanceof Error?_0x2ed1f6[_0x2cc35b(0x1da)]:String(_0x2ed1f6);return console[_0x2cc35b(0x1d1)](a31_0x4baf7b[_0x2cc35b(0x31e)](_0x2cc35b(0x20f)+_0x279161)),0x1;}if(_0x5002cd[_0x2cc35b(0x34b)]&&_0x5002cd[_0x2cc35b(0x34b)][_0x2cc35b(0x278)]>0x0)return console[_0x2cc35b(0x1d1)](a31_0x4baf7b['yellow'](_0x2cc35b(0x29e)+_0x3a41a7)),console[_0x2cc35b(0x1d1)](a31_0x4baf7b['dim']('\x20\x20\x20'+_0x5002cd[_0x2cc35b(0x34b)][_0x2cc35b(0x278)]+_0x2cc35b(0x2fa))),0x1;!_0x5002cd['realtime']&&(_0x5002cd[_0x2cc35b(0x1db)]={'events':[{'name':_0x2cc35b(0x25d),'source_table':_0x2cc35b(0x18a)}],'attributes':[{'name':_0x2cc35b(0x33b),'type':_0x2cc35b(0x1cb)}],'id_stitching':{'primary_key':_0x5002cd['master']['table']===_0x2cc35b(0x218)?'td_client_id':_0x2cc35b(0x2c7)}});_0x5002cd[_0x2cc35b(0x34b)]=[{'name':_0x2cc35b(0x234),'description':_0x2cc35b(0x351),'trigger_event':_0x2cc35b(0x25d),'sections':[{'name':_0x2cc35b(0x167),'criteria':_0x2cc35b(0x1b3),'attributes':[_0x2cc35b(0x33b)]}]}];const _0x35ad6d=serializeDef(_0x5002cd);return writeFileSync(_0x3a41a7,_0x35ad6d,'utf-8'),console[_0x2cc35b(0x1d1)](a31_0x4baf7b[_0x2cc35b(0x2b1)]('✔')+_0x2cc35b(0x223)+a31_0x4baf7b[_0x2cc35b(0x294)](_0x3a41a7)),(!_0x5002cd[_0x2cc35b(0x1db)]||_0x16eb47[_0x2cc35b(0x17b)]('realtime:')===-0x1)&&console['error'](a31_0x4baf7b[_0x2cc35b(0x2b1)]('✔')+_0x2cc35b(0x241)),console[_0x2cc35b(0x1d1)]('\x0a'+a31_0x4baf7b[_0x2cc35b(0x2fc)]('Next\x20steps:')),console['error'](_0x2cc35b(0x265)+_0x3a41a7+_0x2cc35b(0x1d0)),console[_0x2cc35b(0x1d1)](_0x2cc35b(0x298)+a31_0x4baf7b[_0x2cc35b(0x2fc)](_0x2cc35b(0x165)+_0x159b24)+_0x2cc35b(0x276)),0x0;}}