@treasuredata/tdx 2026.8.2 → 2026.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/auth-token.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +9 -3
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.d.ts +10 -0
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0xe3eda6=a34_0xff01;(function(_0x1dc2e4,_0x2dec79){const _0x4973e3=a34_0xff01,_0x4546c5=_0x1dc2e4();while(!![]){try{const _0xee8b7d=-parseInt(_0x4973e3(0x2d8))/0x1*(parseInt(_0x4973e3(0x2a3))/0x2)+-parseInt(_0x4973e3(0x227))/0x3+-parseInt(_0x4973e3(0x141))/0x4*(-parseInt(_0x4973e3(0x18e))/0x5)+parseInt(_0x4973e3(0x280))/0x6*(parseInt(_0x4973e3(0x19e))/0x7)+parseInt(_0x4973e3(0x183))/0x8+parseInt(_0x4973e3(0x1e5))/0x9+parseInt(_0x4973e3(0x287))/0xa;if(_0xee8b7d===_0x2dec79)break;else _0x4546c5['push'](_0x4546c5['shift']());}catch(_0x16c2b7){_0x4546c5['push'](_0x4546c5['shift']());}}}(a34_0x5674,0x3735a));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a34_0x1183fe 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';function a34_0xff01(_0x27bd76,_0x96457c){_0x27bd76=_0x27bd76-0xf9;const _0x5674e5=a34_0x5674();let _0xff014a=_0x5674e5[_0x27bd76];return _0xff014a;}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 a34_0x427111 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=a34_0xe3eda6(0x136),LEGACY_PARENT_SEGMENT_DIR=a34_0xe3eda6(0x2cc);function openBrowser(_0x30698a){const _0x29b10c=a34_0xe3eda6,_0x222c85=process['platform'],_0x2d22ed=_0x222c85===_0x29b10c(0x2b1)?_0x29b10c(0x2d3):_0x222c85===_0x29b10c(0x115)?'start':_0x29b10c(0x182);spawn(_0x2d22ed,[_0x30698a],{'detached':!![],'stdio':_0x29b10c(0x2ba)})[_0x29b10c(0x158)]();}function migrateLegacyDirectory(){const _0x4ebe8e=a34_0xe3eda6;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x48f897=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x48f897['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a34_0x427111['yellow'](_0x4ebe8e(0x301)+LEGACY_PARENT_SEGMENT_DIR+_0x4ebe8e(0x281)+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console['error'](a34_0x427111[_0x4ebe8e(0x18c)](_0x4ebe8e(0x28e)+LEGACY_PARENT_SEGMENT_DIR+_0x4ebe8e(0x140))),![];console[_0x4ebe8e(0x113)](a34_0x427111[_0x4ebe8e(0x1ce)](_0x4ebe8e(0x2c0)+LEGACY_PARENT_SEGMENT_DIR+_0x4ebe8e(0x1ee)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x4ebe8e(0x113)](a34_0x427111['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x33dc91){const _0x43e6e6=_0x33dc91 instanceof Error?_0x33dc91[_0x4ebe8e(0x23b)]:String(_0x33dc91);return console['error'](a34_0x427111['red']('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x43e6e6+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a34_0xe3eda6(0x240)](_0x328edd){return migrateLegacyDirectory(),super['run'](_0x328edd);}}function resolveYamlFile(_0x277521){const _0x24fba1=a34_0xe3eda6;if(_0x277521[_0x24fba1(0x147)](_0x24fba1(0x1ca))||_0x277521[_0x24fba1(0x147)](_0x24fba1(0x1ba)))return _0x277521;return a34_0x1183fe[_0x24fba1(0x14a)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x277521)+_0x24fba1(0x1ca));}function formatProgressMessage(_0x17700c){const _0x3f2a2e=a34_0xe3eda6,_0x9cd2cd=_0x17700c[_0x3f2a2e(0x296)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x9cd2cd){const [,_0x373ade,_0x478215,_0x4f040a='']=_0x9cd2cd;return a34_0x427111[_0x3f2a2e(0x18c)](_0x373ade+':')+'\x20'+_0x478215+a34_0x427111[_0x3f2a2e(0x18c)](_0x4f040a);}return a34_0x427111[_0x3f2a2e(0x18c)](_0x17700c);}function showFileNotFoundError(_0x4c30a6,_0x41521c){const _0x4fa354=a34_0xe3eda6;console[_0x4fa354(0x113)](a34_0x427111[_0x4fa354(0x129)](_0x4fa354(0x171)+_0x4c30a6+'\x0a')),console[_0x4fa354(0x113)](a34_0x427111['cyan'](_0x4fa354(0x20e)+_0x41521c+_0x4fa354(0x1d1)));}function displayRealtimeValidation(_0x5ef34d){const _0x4cccd4=a34_0xe3eda6;if(!_0x5ef34d[_0x4cccd4(0x2d6)])return;const _0x59540e=_0x5ef34d[_0x4cccd4(0x2d6)],_0x30b99e=_0x59540e[_0x4cccd4(0x2fa)]?a34_0x427111[_0x4cccd4(0x276)](_0x4cccd4(0x192)):a34_0x427111['yellow'](_0x4cccd4(0x126));console[_0x4cccd4(0x113)]('\x0a'+a34_0x427111[_0x4cccd4(0x18c)]('RT\x202.0:')+'\x20'+_0x30b99e);if(_0x59540e[_0x4cccd4(0x2dc)]&&_0x59540e[_0x4cccd4(0x2dc)][_0x4cccd4(0x13f)]>0x0){console['error']('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)](_0x4cccd4(0x236))+'\x20'+_0x59540e[_0x4cccd4(0x2dc)][_0x4cccd4(0x13f)]+_0x4cccd4(0x1c1));for(const _0x4e9056 of _0x59540e[_0x4cccd4(0x2dc)]){const _0x40ef46=_0x4e9056[_0x4cccd4(0x27b)]===![]?a34_0x427111[_0x4cccd4(0x129)]('✘'):a34_0x427111['green']('✔');console['error'](_0x4cccd4(0x10b)+_0x40ef46+'\x20'+_0x4e9056[_0x4cccd4(0x205)]),_0x4e9056['sourceTableError']&&console[_0x4cccd4(0x113)](_0x4cccd4(0x16f)+a34_0x427111['red'](_0x4e9056[_0x4cccd4(0x12c)]));}}if(_0x59540e[_0x4cccd4(0x2ec)]&&_0x59540e['attributes'][_0x4cccd4(0x13f)]>0x0){console['error']('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)](_0x4cccd4(0x2f7))+'\x20'+_0x59540e[_0x4cccd4(0x2ec)][_0x4cccd4(0x13f)]+_0x4cccd4(0x1c1));for(const _0x39872a of _0x59540e[_0x4cccd4(0x2ec)]){const _0x586391=_0x39872a[_0x4cccd4(0x283)]?a34_0x427111[_0x4cccd4(0x276)]('✔'):a34_0x427111['red']('✘');console[_0x4cccd4(0x113)](_0x4cccd4(0x10b)+_0x586391+'\x20'+_0x39872a[_0x4cccd4(0x205)]+'\x20'+a34_0x427111[_0x4cccd4(0x18c)]('('+_0x39872a[_0x4cccd4(0x2bd)]+')'));}}if(_0x59540e[_0x4cccd4(0x2c4)]){const _0x35192e=_0x59540e['idStitching'][_0x4cccd4(0x202)]?.[_0x4cccd4(0x13f)]?_0x4cccd4(0x111)+_0x59540e[_0x4cccd4(0x2c4)][_0x4cccd4(0x202)]['join'](',\x20')+']':'';console[_0x4cccd4(0x113)]('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)]('ID\x20Stitching:')+'\x20'+_0x59540e[_0x4cccd4(0x2c4)]['primaryKey']+_0x35192e);}if(_0x59540e['personalizationServices']&&_0x59540e[_0x4cccd4(0x304)][_0x4cccd4(0x13f)]>0x0){console[_0x4cccd4(0x113)]('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)](_0x4cccd4(0x103))+'\x20'+_0x59540e['personalizationServices']['length']+_0x4cccd4(0x181)+(_0x59540e[_0x4cccd4(0x304)]['length']!==0x1?'s':''));for(const _0x4cb54a of _0x59540e[_0x4cccd4(0x304)]){console[_0x4cccd4(0x113)]('\x20\x20\x20\x20-\x20'+_0x4cb54a[_0x4cccd4(0x205)]);}}}function showParentSegmentNotSetError(_0x23e689){const _0x49b6e7=a34_0xe3eda6;console[_0x49b6e7(0x113)](a34_0x427111['yellow'](_0x49b6e7(0xfc))),console[_0x49b6e7(0x113)](_0x23e689);}export class ParentSegmentListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='segment:parent:list';['description']=a34_0xe3eda6(0x290);async[a34_0xe3eda6(0x116)](_0x3485c6){const _0x4e0397=a34_0xe3eda6,{options:_0x5813a2,args:_0x4d65d4,tdx:_0x2f3840}=_0x3485c6,_0xff2e21=_0x4d65d4[0x0];_0x5813a2['verbose']&&(console[_0x4e0397(0x113)](_0x4e0397(0x1f7)+_0x5813a2[_0x4e0397(0x28f)]),_0xff2e21&&console['error'](_0x4e0397(0x155)+_0xff2e21));const _0x125df3=await withSpinner(_0xff2e21?_0x4e0397(0xff)+_0xff2e21+_0x4e0397(0x217):_0x4e0397(0x101),()=>_0x2f3840[_0x4e0397(0x159)][_0x4e0397(0x1b0)](),{'verbose':_0x5813a2[_0x4e0397(0x235)]});let _0x19a195=_0x125df3['data'];if(_0xff2e21){const _0x4cbf8e=_0xff2e21['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x4e0397(0x195)](/\*/g,'.*')[_0x4e0397(0x195)](/\?/g,'.'),_0x203c47=new RegExp('^'+_0x4cbf8e+'$','i');_0x19a195=_0x19a195[_0x4e0397(0x21c)](_0x976311=>_0x203c47[_0x4e0397(0x100)](_0x976311[_0x4e0397(0x2ec)][_0x4e0397(0x205)]));}_0x19a195[_0x4e0397(0x299)]((_0x1e9802,_0x16c660)=>_0x1e9802[_0x4e0397(0x2ec)][_0x4e0397(0x205)][_0x4e0397(0x2cb)](_0x16c660['attributes'][_0x4e0397(0x205)])),console[_0x4e0397(0x113)]('✔\x20Found\x20'+_0x19a195[_0x4e0397(0x13f)]+_0x4e0397(0x2fb)+(_0x19a195['length']!==0x1?'s':''));const _0x3f2f9b=_0x10bcf7=>{const _0x66b6de=_0x4e0397;return getConsoleNextUrl(_0x5813a2[_0x66b6de(0x28f)],_0x66b6de(0x17d)+_0x10bcf7);};if(_0x5813a2[_0x4e0397(0x19d)]===_0x4e0397(0x273)||_0x5813a2[_0x4e0397(0x19d)]===_0x4e0397(0x131)){const _0x35d484=_0x19a195[_0x4e0397(0x269)](_0x478d5e=>({..._0x478d5e,'url':_0x3f2f9b(_0x478d5e['id'])}));await handleSDKOutput(_0x35d484,_0x5813a2);}else{if(_0x19a195[_0x4e0397(0x13f)]===0x0)_0xff2e21?console[_0x4e0397(0x17c)](_0x4e0397(0x2d1)+_0xff2e21):console['log']('No\x20parent\x20segments\x20found');else for(const _0x47f62f of _0x19a195){const _0x2b8a46=_0x47f62f[_0x4e0397(0x2ec)][_0x4e0397(0x23e)]?a34_0x427111[_0x4e0397(0x18c)]('\x20('+formatRows(_0x47f62f[_0x4e0397(0x2ec)]['population'])+')'):'',_0x538c69=hyperlink(_0x47f62f[_0x4e0397(0x2ec)][_0x4e0397(0x205)],_0x3f2f9b(_0x47f62f['id']));console[_0x4e0397(0x17c)]('👥\x20'+_0x538c69+_0x2b8a46);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x145);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2df);async[a34_0xe3eda6(0x116)](_0x4d1857){const _0x173878=a34_0xe3eda6,{options:_0x16373b,args:_0x17aa5f,tdx:_0x2d24ad}=_0x4d1857;console[_0x173878(0x113)](_0x173878(0x21f)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x173878(0x22e));const _0x2cef4e=_0x16373b;if(_0x17aa5f[_0x173878(0x13f)]===0x0)return console[_0x173878(0x113)](a34_0x427111[_0x173878(0x129)](_0x173878(0x208))),console[_0x173878(0x113)](_0x173878(0x29b)),0x1;const _0xdc3d24=_0x17aa5f[0x0];if(!_0x2cef4e[_0x173878(0x2a7)]||!_0x2cef4e[_0x173878(0x152)])return console[_0x173878(0x113)](_0x173878(0x2f8)),console[_0x173878(0x113)](_0x173878(0x29b)),0x1;_0x2cef4e[_0x173878(0x235)]&&(console[_0x173878(0x113)](_0x173878(0x1f7)+_0x2cef4e[_0x173878(0x28f)]),console[_0x173878(0x113)]('Name:\x20'+_0xdc3d24),console[_0x173878(0x113)](_0x173878(0x15b)+_0x2cef4e['database']),console[_0x173878(0x113)]('Table:\x20'+_0x2cef4e[_0x173878(0x152)]));const _0x57aa59=await loadJSONFromOptions(_0x2cef4e[_0x173878(0x2ec)],_0x2cef4e[_0x173878(0x1ac)]),_0x56e107=await loadJSONFromOptions(_0x2cef4e[_0x173878(0x2c9)],_0x2cef4e[_0x173878(0x245)]),_0x471b3e=await loadJSONFromOptions(_0x2cef4e[_0x173878(0x1d8)],_0x2cef4e[_0x173878(0x25e)]),_0x2d292d={'name':_0xdc3d24,'description':_0x2cef4e['description'],'scheduleType':_0x2cef4e[_0x173878(0x221)],'scheduleOption':_0x2cef4e[_0x173878(0x197)],'timezone':_0x2cef4e[_0x173878(0x190)],'master':{'parentDatabaseName':_0x2cef4e[_0x173878(0x2a7)],'parentTableName':_0x2cef4e[_0x173878(0x152)]},'attributes':_0x57aa59,'behaviors':_0x56e107,'customerGroup':_0x471b3e},_0x5b28a2=await withSpinner(_0x173878(0x2ee)+_0xdc3d24+_0x173878(0x217),()=>_0x2d24ad[_0x173878(0x159)][_0x173878(0x2e3)](_0x2d292d),{'verbose':_0x16373b['verbose']}),_0x1c686f=_0x5b28a2['data'];return console['error'](_0x173878(0x2d9)+_0x1c686f[_0x173878(0x205)]+_0x173878(0x14d)+_0x1c686f['id']),await handleSDKOutput([_0x1c686f],_0x16373b),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a34_0xe3eda6(0x177);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x239);async[a34_0xe3eda6(0x116)](_0x25733b){const _0x5ef5e7=a34_0xe3eda6,{options:_0x4708ba,args:_0xd45873,tdx:_0x44397a}=_0x25733b;console[_0x5ef5e7(0x113)](_0x5ef5e7(0x133)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x5ef5e7(0x22e));const _0x3f6cd2=_0x4708ba;if(_0xd45873[_0x5ef5e7(0x13f)]===0x0)return console['error'](a34_0x427111[_0x5ef5e7(0x129)](_0x5ef5e7(0x208))),console['error'](_0x5ef5e7(0x303)),0x1;const _0x2f0bc6=_0xd45873[0x0];_0x3f6cd2[_0x5ef5e7(0x235)]&&(console[_0x5ef5e7(0x113)](_0x5ef5e7(0x1f7)+_0x3f6cd2[_0x5ef5e7(0x28f)]),console[_0x5ef5e7(0x113)](_0x5ef5e7(0x2f5)+_0x2f0bc6));const _0x39a553=await withSpinner(_0x5ef5e7(0x167)+_0x2f0bc6+_0x5ef5e7(0x217),()=>_0x44397a['segment'][_0x5ef5e7(0x2ed)](_0x2f0bc6),{'verbose':_0x3f6cd2['verbose']}),_0x2311b5=_0x39a553[_0x5ef5e7(0x209)],_0x188b75=await loadJSONFromOptions(_0x3f6cd2[_0x5ef5e7(0x1fa)],_0x3f6cd2['addAttributesFile']),_0xf68fb7=await loadJSONFromOptions(_0x3f6cd2[_0x5ef5e7(0x305)],_0x3f6cd2[_0x5ef5e7(0x157)]),_0x46e37e={'name':_0x2311b5['name'],'description':_0x3f6cd2[_0x5ef5e7(0x16d)]!==undefined?_0x3f6cd2['description']:_0x2311b5[_0x5ef5e7(0x16d)],'scheduleType':_0x3f6cd2[_0x5ef5e7(0x221)]!==undefined?_0x3f6cd2[_0x5ef5e7(0x221)]:_0x2311b5['scheduleType'],'scheduleOption':_0x3f6cd2[_0x5ef5e7(0x197)]!==undefined?_0x3f6cd2[_0x5ef5e7(0x197)]:_0x2311b5['scheduleOption'],'timezone':_0x3f6cd2[_0x5ef5e7(0x190)]!==undefined?_0x3f6cd2['timezone']:_0x2311b5[_0x5ef5e7(0x190)],'master':_0x2311b5['master'],'attributes':_0x188b75?[..._0x2311b5[_0x5ef5e7(0x2ec)]||[],..._0x188b75]:_0x2311b5[_0x5ef5e7(0x2ec)],'behaviors':_0xf68fb7?[..._0x2311b5['behaviors']||[],..._0xf68fb7]:_0x2311b5['behaviors'],'customerGroup':_0x2311b5[_0x5ef5e7(0x1d8)]},_0x579389=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x2f0bc6+_0x5ef5e7(0x217),()=>_0x44397a[_0x5ef5e7(0x159)][_0x5ef5e7(0x1e7)](_0x2f0bc6,_0x46e37e),{'verbose':_0x3f6cd2['verbose']}),_0x2c24b5=_0x579389[_0x5ef5e7(0x209)];return console[_0x5ef5e7(0x113)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x2c24b5[_0x5ef5e7(0x205)]+'\x27'),await handleSDKOutput([_0x2c24b5],_0x3f6cd2),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x1a0);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x151);async['execute'](_0x579434){const _0x557ccc=a34_0xe3eda6,{options:_0x465ad8,args:_0x5b66e7,tdx:_0x104776}=_0x579434,_0x1e874f=_0x465ad8,_0x213a12=_0x5b66e7[0x0]||_0x465ad8['parentSegment'];if(!_0x213a12)return showParentSegmentNotSetError(_0x557ccc(0x2bb)+_0x557ccc(0x2ab)),0x1;if(_0x1e874f[_0x557ccc(0xfe)]&&_0x1e874f[_0x557ccc(0x27c)])return console['error'](a34_0x427111[_0x557ccc(0x129)](_0x557ccc(0x176))),console[_0x557ccc(0x113)](a34_0x427111['dim']('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console['error'](a34_0x427111['dim'](_0x557ccc(0x308)+PARENT_SEGMENT_DIR+_0x557ccc(0x1d3))),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x23f)](_0x557ccc(0x275))),0x1;const _0x4d9095=_0x1e874f[_0x557ccc(0x27c)]||a34_0x1183fe[_0x557ccc(0x14a)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x213a12)+_0x557ccc(0x1ca));_0x1e874f[_0x557ccc(0x235)]&&(console['error'](_0x557ccc(0x1f7)+_0x1e874f['site']),console[_0x557ccc(0x113)](_0x557ccc(0x2f5)+_0x213a12),console[_0x557ccc(0x113)](_0x557ccc(0x2c5)+_0x4d9095));const _0x165494=await withSpinner(_0x557ccc(0x259)+_0x213a12+_0x557ccc(0x217),()=>_0x104776[_0x557ccc(0x159)][_0x557ccc(0x2d2)](_0x213a12),{'verbose':_0x1e874f[_0x557ccc(0x235)]}),_0x2b9a40=_0x165494[_0x557ccc(0x209)];if(existsSync(_0x4d9095)){const _0x1085af=readFileSync(_0x4d9095,_0x557ccc(0x2e4)),_0x224fcd=generateDiff(_0x1085af,_0x2b9a40);if(!hasChanges(_0x224fcd))console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x276)]('✔')+'\x20No\x20changes\x20-\x20'+a34_0x427111[_0x557ccc(0x23f)](_0x4d9095)+_0x557ccc(0x29d));else{console['error'](_0x557ccc(0xfa)+_0x4d9095+'\x27:'),console[_0x557ccc(0x113)]('─'[_0x557ccc(0x2fe)](0x3c)),console[_0x557ccc(0x113)](formatDiffWithColors(_0x224fcd)),console[_0x557ccc(0x113)]('─'[_0x557ccc(0x2fe)](0x3c));if(!_0x1e874f['yes']){if(!isInteractive())return console['error'](a34_0x427111[_0x557ccc(0x129)](_0x557ccc(0x1cb)),_0x557ccc(0x186)),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x18c)](_0x557ccc(0x241))),0x1;const _0x121f2b=await confirmKey(_0x557ccc(0x237)+_0x4d9095+'\x27?');if(!_0x121f2b)return console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x1ce)](_0x557ccc(0x104))),0x1;}writeFileSync(_0x4d9095,_0x2b9a40,'utf-8'),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x276)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a34_0x427111['cyan'](_0x4d9095));}}else{const _0x25fffb=a34_0x1183fe['dirname'](_0x4d9095);!existsSync(_0x25fffb)&&mkdirSync(_0x25fffb,{'recursive':!![]}),writeFileSync(_0x4d9095,_0x2b9a40,_0x557ccc(0x2e4)),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x276)]('✔')+_0x557ccc(0x253)+a34_0x427111[_0x557ccc(0x23f)](_0x4d9095));}return saveSessionContext({'parent_segment':_0x213a12},_0x1e874f[_0x557ccc(0x112)]),console[_0x557ccc(0x113)](a34_0x427111['green']('✔')+'\x20Context\x20set:\x20'+a34_0x427111[_0x557ccc(0x18c)]('parent_segment')+_0x557ccc(0x27d)+a34_0x427111['cyan'](_0x213a12)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x225);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x13d);async['execute'](_0x1f29fe){const _0x12cd9c=a34_0xe3eda6,{options:_0x59b7ee,args:_0x4a9fcd,tdx:_0x158483}=_0x1f29fe,_0x1181c7=_0x59b7ee,_0x1141a1=_0x4a9fcd[0x0]||_0x59b7ee[_0x12cd9c(0x119)];if(!_0x1141a1)return showParentSegmentNotSetError(_0x12cd9c(0x2a4)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x2602ca=resolveYamlFile(_0x1141a1);if(!existsSync(_0x2602ca))return showFileNotFoundError(_0x2602ca,_0x1141a1),0x1;_0x1181c7['verbose']&&(console[_0x12cd9c(0x113)](_0x12cd9c(0x1f7)+_0x1181c7['site']),console['error'](_0x12cd9c(0x29f)+_0x2602ca));let _0xb1bd95;try{_0xb1bd95=readFileSync(_0x2602ca,_0x12cd9c(0x2e4));}catch(_0x483648){const _0xa74716=_0x483648 instanceof Error?_0x483648['message']:String(_0x483648);return console[_0x12cd9c(0x113)]('Error\x20reading\x20file:\x20'+_0xa74716),0x1;}const _0x51d197=await withSpinner(_0x12cd9c(0x1e9),()=>_0x158483['segment']['pushParentYaml'](_0xb1bd95),{'verbose':_0x1181c7['verbose']}),_0x35761e=_0x51d197['data'],{isNew:_0x14949c,name:_0x13675f,hasChanges:_0x1eb2e1,diffFormatted:_0x5d21f7}=_0x35761e;if(!_0x1eb2e1)return console['error'](_0x12cd9c(0x10d)+_0x13675f+_0x12cd9c(0x1f4)),0x0;_0x14949c?console[_0x12cd9c(0x113)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x13675f+'\x27:'):console['error'](_0x12cd9c(0x180)+_0x13675f+'\x27:');console[_0x12cd9c(0x113)]('─'['repeat'](0x3c)),console['error'](_0x5d21f7),console[_0x12cd9c(0x113)]('─'[_0x12cd9c(0x2fe)](0x3c));const _0x436ffc=_0x14949c?_0x12cd9c(0x250)+_0x13675f+'\x27?':_0x12cd9c(0x163)+_0x13675f+'\x27?';if(!_0x1181c7[_0x12cd9c(0x15c)]){if(!isInteractive())return console['error'](a34_0x427111[_0x12cd9c(0x129)](_0x12cd9c(0x1cb)),_0x12cd9c(0x186)),console[_0x12cd9c(0x113)](a34_0x427111[_0x12cd9c(0x18c)](_0x12cd9c(0x241))),0x1;const _0x491370=await confirmKey(_0x436ffc);if(!_0x491370)return console[_0x12cd9c(0x113)](a34_0x427111[_0x12cd9c(0x1ce)]('Aborted.')),0x1;}const _0x3836fa=_0x14949c?_0x12cd9c(0x2ea):_0x12cd9c(0x224),_0x2fc555=await withSpinner(_0x3836fa+_0x12cd9c(0x161)+_0x13675f+_0x12cd9c(0x217),()=>_0x35761e[_0x12cd9c(0x11b)](),{'verbose':_0x1181c7[_0x12cd9c(0x235)]}),_0x40cd8a=_0x2fc555['data'],_0x403f92=getConsoleNextUrl(_0x1181c7[_0x12cd9c(0x28f)],_0x12cd9c(0x17d)+_0x40cd8a['id']),_0xc130b5=_0x14949c?_0x12cd9c(0x2f3):'Updated';return console['error']('✔\x20'+_0xc130b5+_0x12cd9c(0x161)+_0x40cd8a[_0x12cd9c(0x205)]+'\x27'),console[_0x12cd9c(0x113)]('\x20\x20'+_0x403f92),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x14b);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2c8);async['execute'](_0x435725){const _0x2150cc=a34_0xe3eda6,{options:_0xc9d864,args:_0x1fffe5,tdx:_0x3d750c}=_0x435725,_0xfe5536=_0xc9d864,_0x4a4485=_0x1fffe5[0x0]||_0xc9d864['parentSegment'];if(!_0x4a4485)return showParentSegmentNotSetError(_0x2150cc(0x12a)+_0x2150cc(0x1a5)+_0x2150cc(0x207)+_0x2150cc(0x1fe)+_0x2150cc(0x110)+_0x2150cc(0x30b)),0x1;const _0x449829=resolveYamlFile(_0x4a4485);if(!existsSync(_0x449829))return showFileNotFoundError(_0x449829,_0x4a4485),0x1;_0xfe5536[_0x2150cc(0x235)]&&(console[_0x2150cc(0x113)](_0x2150cc(0x1f7)+_0xfe5536['site']),console[_0x2150cc(0x113)](_0x2150cc(0x29f)+_0x449829));let _0x468217;try{_0x468217=readFileSync(_0x449829,_0x2150cc(0x2e4));}catch(_0x206322){const _0x310644=_0x206322 instanceof Error?_0x206322[_0x2150cc(0x23b)]:String(_0x206322);return console['error'](_0x2150cc(0x10f)+_0x310644),0x1;}const _0x50ebff=createCommandSpinner(a34_0x427111[_0x2150cc(0x18c)](_0x2150cc(0x1a1)),{'verbose':_0xfe5536['verbose']});_0x50ebff[_0x2150cc(0x1d6)]();const _0x41447c={'onProgress':_0x303490=>{const _0x20a387=_0x2150cc;_0x50ebff[_0x20a387(0x2f0)]=formatProgressMessage(_0x303490);}};if(_0xfe5536[_0x2150cc(0x2ff)])_0x41447c[_0x2150cc(0x2ff)]=!![];if(_0xfe5536['enriched'])_0x41447c[_0x2150cc(0x2c7)]=!![];_0xfe5536[_0x2150cc(0x2a9)]&&(_0x41447c[_0x2150cc(0x2a9)]=_0xfe5536[_0x2150cc(0x2a9)]);_0xfe5536[_0x2150cc(0x22a)]&&(_0x41447c[_0x2150cc(0x22a)]=_0xfe5536[_0x2150cc(0x22a)]);if(_0xfe5536[_0x2150cc(0x210)])_0x41447c[_0x2150cc(0x210)]=_0xfe5536[_0x2150cc(0x210)];let _0x47d822;try{_0x47d822=await _0x3d750c['segment']['validateParentYaml'](_0x468217,_0x41447c),_0x50ebff[_0x2150cc(0x154)]();}catch(_0x4429fc){_0x50ebff[_0x2150cc(0x154)]();throw _0x4429fc;}const _0x22f65a=_0xfe5536[_0x2150cc(0x210)]||'-1d';return this[_0x2150cc(0x302)](_0x47d822,_0x41447c,_0x449829,_0x22f65a),_0x47d822[_0x2150cc(0x2cf)]?0x0:0x1;}[a34_0xe3eda6(0x302)](_0x1903e0,_0x9c74bf,_0x17698e,_0x364ead){const _0x427134=a34_0xe3eda6;console[_0x427134(0x113)]('\x0a'+a34_0x427111[_0x427134(0x260)](_0x427134(0x21d))+'\x20'+_0x1903e0[_0x427134(0x205)]),console[_0x427134(0x113)]('═'[_0x427134(0x2fe)](0x3c)),this[_0x427134(0x2d4)](_0x1903e0);if(typeof _0x9c74bf[_0x427134(0x2a9)]===_0x427134(0x150)){this[_0x427134(0x199)](_0x1903e0),this[_0x427134(0x106)](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x2a9),_0x9c74bf['attribute']);return;}if(_0x9c74bf[_0x427134(0x2a9)]===!![]){this[_0x427134(0x199)](_0x1903e0),this['displaySummary'](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x2ec));return;}if(typeof _0x9c74bf[_0x427134(0x22a)]===_0x427134(0x150)){this[_0x427134(0x203)](_0x1903e0,_0x364ead),this['displaySummary'](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,'behavior',_0x9c74bf[_0x427134(0x22a)]);return;}if(_0x9c74bf[_0x427134(0x22a)]===!![]){this[_0x427134(0x203)](_0x1903e0,_0x364ead),this[_0x427134(0x106)](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x2c9));return;}this['displayAttributesStats'](_0x1903e0),this[_0x427134(0x203)](_0x1903e0,_0x364ead),this[_0x427134(0x1c7)](_0x1903e0),this[_0x427134(0x106)](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x114));}['displayRealtimeInfo'](_0x711522){displayRealtimeValidation(_0x711522);}[a34_0xe3eda6(0x1e3)](_0x292329,_0x434fef,_0x5caa86,_0x450577){const _0x4539e5=a34_0xe3eda6;console[_0x4539e5(0x113)]('\x0a'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x1c5)));const _0x264688=_0x434fef!=='-1d'?_0x4539e5(0x228)+_0x434fef:'';if(_0x5caa86===_0x4539e5(0x2a9)&&_0x450577)console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x1be)+_0x450577+'\x22'+_0x264688));else{if(_0x5caa86==='behavior'&&_0x450577)console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x2dd)+_0x450577+'\x22'+_0x264688));else(_0x5caa86==='attributes'||_0x5caa86===_0x4539e5(0x114))&&console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x25b)+_0x264688));}(_0x5caa86===_0x4539e5(0x2c9)||_0x5caa86===_0x4539e5(0x114))&&console['error']('\x20\x20'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x2b5)+_0x264688)),_0x5caa86===_0x4539e5(0x114)&&console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x1e4)+_0x264688));}['displayMasterInfo'](_0x9741a9){const _0x46cc6b=a34_0xe3eda6,{master:_0x1db52e}=_0x9741a9,_0x3705ab=_0x1db52e['schemaValid']?a34_0x427111[_0x46cc6b(0x276)]('✔'):a34_0x427111[_0x46cc6b(0x129)]('✘');console[_0x46cc6b(0x113)]('\x0a'+a34_0x427111[_0x46cc6b(0x18c)]('Master\x20Table')),console[_0x46cc6b(0x113)](_0x3705ab+'\x20'+a34_0x427111[_0x46cc6b(0x260)](_0x1db52e[_0x46cc6b(0x2a7)]+'.'+_0x1db52e[_0x46cc6b(0x152)])),_0x1db52e[_0x46cc6b(0x2ac)]?_0x1db52e[_0x46cc6b(0x173)]!==undefined&&console[_0x46cc6b(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x46cc6b(0x27f))+'\x20'+a34_0x427111[_0x46cc6b(0x23f)](formatRows(_0x1db52e[_0x46cc6b(0x173)]))):console['error']('\x20\x20'+a34_0x427111[_0x46cc6b(0x129)]('Error:')+'\x20'+_0x1db52e[_0x46cc6b(0x2d0)]);}[a34_0xe3eda6(0x199)](_0x20d825){const _0x3d461b=a34_0xe3eda6;if(_0x20d825[_0x3d461b(0x2ec)]['length']===0x0)return;console[_0x3d461b(0x113)]('\x0a'+a34_0x427111[_0x3d461b(0x18c)]('Attributes'));for(const _0x39c2ad of _0x20d825[_0x3d461b(0x2ec)]){const _0x33c50b=_0x39c2ad['schemaValid']?a34_0x427111[_0x3d461b(0x276)]('✔'):a34_0x427111[_0x3d461b(0x129)]('✘');let _0x4a8310='';if(_0x39c2ad[_0x3d461b(0x2ac)]&&_0x39c2ad[_0x3d461b(0x1bb)]!==undefined&&_0x39c2ad[_0x3d461b(0x20a)]!==undefined){const _0x1ee5e3=_0x39c2ad['coveragePercent'][_0x3d461b(0x22c)](0x1),_0x59bd6c=_0x39c2ad['coveragePercent']>=0x50?a34_0x427111['green']:_0x39c2ad[_0x3d461b(0x20a)]>=0x32?a34_0x427111[_0x3d461b(0x1ce)]:a34_0x427111[_0x3d461b(0x129)];_0x4a8310='\x20'+a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x2b3))+'\x20'+_0x59bd6c(_0x1ee5e3+'%')+'\x20('+formatRows(_0x39c2ad[_0x3d461b(0x1bb)])+_0x3d461b(0x174);}console[_0x3d461b(0x113)](_0x33c50b+'\x20'+a34_0x427111[_0x3d461b(0x260)](_0x39c2ad[_0x3d461b(0x205)])+_0x4a8310),console['error']('\x20\x20'+a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x27a))+'\x20'+a34_0x427111[_0x3d461b(0x260)](_0x39c2ad[_0x3d461b(0x2a7)]+'.'+_0x39c2ad[_0x3d461b(0x152)]));const _0x338a37=_0x39c2ad[_0x3d461b(0x22f)]===_0x39c2ad[_0x3d461b(0x307)]?a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x21b))+'\x20'+_0x39c2ad[_0x3d461b(0x22f)]:a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x26b))+'\x20'+_0x39c2ad['joinKey']+_0x3d461b(0x27d)+_0x39c2ad[_0x3d461b(0x307)];console[_0x3d461b(0x113)]('\x20\x20'+_0x338a37),console[_0x3d461b(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x3d461b(0x15f))),this['displayColumns'](_0x39c2ad[_0x3d461b(0x12d)]),!_0x39c2ad['schemaValid']&&console[_0x3d461b(0x113)]('\x20\x20'+a34_0x427111[_0x3d461b(0x129)](_0x3d461b(0x17f))+'\x20'+_0x39c2ad[_0x3d461b(0x2d0)]);}}[a34_0xe3eda6(0x203)](_0x40428e,_0x4ce863){const _0x7e1bf3=a34_0xe3eda6;if(_0x40428e[_0x7e1bf3(0x2c9)]['length']===0x0)return;console[_0x7e1bf3(0x113)]('\x0a'+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x153))+'\x20'+a34_0x427111['dim']('('+_0x4ce863+')'));for(const _0x35154d of _0x40428e[_0x7e1bf3(0x2c9)]){const _0x3a1f4a=_0x35154d['schemaValid']?a34_0x427111['green']('✔'):a34_0x427111[_0x7e1bf3(0x129)]('✘');let _0x4ecd5e='';if(_0x35154d['schemaValid']&&_0x35154d[_0x7e1bf3(0x21a)]!==undefined&&_0x35154d[_0x7e1bf3(0x294)]!==undefined){const _0x2f243f=_0x35154d['customerPercent']?.['toFixed'](0x1)||'?',_0x3a6574=(_0x35154d[_0x7e1bf3(0x15a)]??0x0)>=0x32?a34_0x427111['green']:(_0x35154d[_0x7e1bf3(0x15a)]??0x0)>=0x14?a34_0x427111[_0x7e1bf3(0x1ce)]:a34_0x427111[_0x7e1bf3(0x129)];_0x4ecd5e='\x20'+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x204))+'\x20'+_0x3a6574(formatRows(_0x35154d[_0x7e1bf3(0x21a)]))+'\x20('+_0x2f243f+_0x7e1bf3(0x23d)+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x236))+'\x20'+a34_0x427111[_0x7e1bf3(0x23f)](formatRows(_0x35154d[_0x7e1bf3(0x294)]));}console[_0x7e1bf3(0x113)](_0x3a1f4a+'\x20'+a34_0x427111['bold'](_0x35154d[_0x7e1bf3(0x205)])+_0x4ecd5e),console[_0x7e1bf3(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x7e1bf3(0x27a))+'\x20'+a34_0x427111[_0x7e1bf3(0x260)](_0x35154d[_0x7e1bf3(0x2a7)]+'.'+_0x35154d[_0x7e1bf3(0x152)]));const _0xdf4d=_0x35154d[_0x7e1bf3(0x22f)]===_0x35154d[_0x7e1bf3(0x307)]?a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x21b))+'\x20'+_0x35154d[_0x7e1bf3(0x22f)]:a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x26b))+'\x20'+_0x35154d[_0x7e1bf3(0x22f)]+_0x7e1bf3(0x27d)+_0x35154d[_0x7e1bf3(0x307)];console[_0x7e1bf3(0x113)]('\x20\x20'+_0xdf4d),console[_0x7e1bf3(0x113)]('\x20\x20'+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x15f))),this[_0x7e1bf3(0x194)](_0x35154d[_0x7e1bf3(0x12d)]),!_0x35154d[_0x7e1bf3(0x2ac)]&&console[_0x7e1bf3(0x113)]('\x20\x20'+a34_0x427111['red'](_0x7e1bf3(0x17f))+'\x20'+_0x35154d[_0x7e1bf3(0x2d0)]);}}[a34_0xe3eda6(0x194)](_0x41d6a4){const _0x4b5d39=a34_0xe3eda6;for(const _0x3df97c of _0x41d6a4){_0x3df97c[_0x4b5d39(0x285)]===_0x3df97c[_0x4b5d39(0x28c)]||_0x3df97c[_0x4b5d39(0x28c)]==='*'?console[_0x4b5d39(0x113)](_0x4b5d39(0x189)+_0x3df97c[_0x4b5d39(0x285)]):console[_0x4b5d39(0x113)](_0x4b5d39(0x189)+_0x3df97c[_0x4b5d39(0x285)]+'\x20'+a34_0x427111[_0x4b5d39(0x18c)]('('+_0x3df97c['column']+')'));}}[a34_0xe3eda6(0x106)](_0xde6f67){const _0x969517=a34_0xe3eda6;console[_0x969517(0x113)]('─'[_0x969517(0x2fe)](0x3c));if(_0xde6f67[_0x969517(0x2ca)][_0x969517(0x13f)]>0x0){console[_0x969517(0x113)]('\x0a'+a34_0x427111[_0x969517(0x129)]('Errors:'));for(const _0x4dbb5c of _0xde6f67[_0x969517(0x2ca)]){console[_0x969517(0x113)]('\x20\x20'+a34_0x427111[_0x969517(0x129)]('•')+'\x20'+_0x4dbb5c);}}_0xde6f67[_0x969517(0x2cf)]&&console['error']('\x0a'+a34_0x427111['green']('✔')+_0x969517(0x271));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x1a2);['description']=a34_0xe3eda6(0x268);async[a34_0xe3eda6(0x116)](_0x4768d1){const _0x6d20c6=a34_0xe3eda6,{options:_0x5adf45,args:_0x316383,tdx:_0x31a470}=_0x4768d1,_0x3f434a=_0x5adf45,_0x23dfd6=_0x316383[0x0]||_0x5adf45[_0x6d20c6(0x119)];if(!_0x23dfd6)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x6d20c6(0x25f)+_0x6d20c6(0x26e)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+_0x6d20c6(0x149)+_0x6d20c6(0x30b)),0x1;if(!_0x3f434a[_0x6d20c6(0x2ff)]&&!_0x3f434a[_0x6d20c6(0x2a9)]&&!_0x3f434a[_0x6d20c6(0x22a)]&&!_0x3f434a[_0x6d20c6(0x2c7)])return console[_0x6d20c6(0x113)](a34_0x427111['red']('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console[_0x6d20c6(0x113)](_0x6d20c6(0x2af)),console[_0x6d20c6(0x113)]('Options:'),console[_0x6d20c6(0x113)](_0x6d20c6(0x1c6)),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x6d20c6(0x113)](_0x6d20c6(0x165)),console[_0x6d20c6(0x113)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0xf3afa7=resolveYamlFile(_0x23dfd6);if(!existsSync(_0xf3afa7))return showFileNotFoundError(_0xf3afa7,_0x23dfd6),0x1;_0x3f434a[_0x6d20c6(0x235)]&&(console['error'](_0x6d20c6(0x1f7)+_0x3f434a[_0x6d20c6(0x28f)]),console[_0x6d20c6(0x113)]('YAML\x20file:\x20'+_0xf3afa7));let _0x4b4791;try{_0x4b4791=readFileSync(_0xf3afa7,_0x6d20c6(0x2e4));}catch(_0x42832a){const _0x363153=_0x42832a instanceof Error?_0x42832a['message']:String(_0x42832a);return console[_0x6d20c6(0x113)](_0x6d20c6(0x10f)+_0x363153),0x1;}let _0x2157fe;try{_0x2157fe=parseDef(_0x4b4791);}catch(_0x41cfdc){const _0x5d4508=_0x41cfdc instanceof Error?_0x41cfdc[_0x6d20c6(0x23b)]:String(_0x41cfdc);return console[_0x6d20c6(0x113)](a34_0x427111[_0x6d20c6(0x129)]('Error\x20parsing\x20YAML:\x20'+_0x5d4508)),0x1;}if(_0x3f434a[_0x6d20c6(0x2a9)]===!![]||_0x3f434a['attribute']===''){const _0x56a480=_0x2157fe[_0x6d20c6(0x2ec)]?.['map'](_0x55c313=>_0x55c313['name'])||[];if(_0x56a480[_0x6d20c6(0x13f)]===0x0)console[_0x6d20c6(0x113)](a34_0x427111[_0x6d20c6(0x129)](_0x6d20c6(0x2e2)));else{console[_0x6d20c6(0x113)](a34_0x427111['red']('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x6d20c6(0x113)](_0x6d20c6(0x24a));for(const _0x251c6d of _0x56a480){console[_0x6d20c6(0x113)]('\x20\x20'+a34_0x427111['cyan'](_0x251c6d));}console['error'](_0x6d20c6(0x12f)+_0x23dfd6+_0x6d20c6(0x1be)+_0x56a480[0x0]+'\x22');}return 0x1;}if(_0x3f434a[_0x6d20c6(0x22a)]===!![]||_0x3f434a[_0x6d20c6(0x22a)]===''){const _0x226433=_0x2157fe[_0x6d20c6(0x2c9)]?.[_0x6d20c6(0x269)](_0x1fddaa=>_0x1fddaa[_0x6d20c6(0x205)])||[];if(_0x226433[_0x6d20c6(0x13f)]===0x0)console[_0x6d20c6(0x113)](a34_0x427111['red'](_0x6d20c6(0x2e7)));else{console['error'](a34_0x427111[_0x6d20c6(0x129)](_0x6d20c6(0x19f))),console[_0x6d20c6(0x113)](_0x6d20c6(0x231));for(const _0x5c9897 of _0x226433){console[_0x6d20c6(0x113)]('\x20\x20'+a34_0x427111[_0x6d20c6(0x23f)](_0x5c9897));}console[_0x6d20c6(0x113)](_0x6d20c6(0x12f)+_0x23dfd6+_0x6d20c6(0x2dd)+_0x226433[0x0]+'\x22');}return 0x1;}const _0x231ed3=createCommandSpinner(a34_0x427111['dim'](_0x6d20c6(0x144)),{'verbose':_0x3f434a['verbose']});_0x231ed3[_0x6d20c6(0x1d6)]();const _0x35c9a9={'onProgress':_0x219818=>{const _0x8bc523=_0x6d20c6;_0x231ed3[_0x8bc523(0x2f0)]=formatProgressMessage(_0x219818);}};if(_0x3f434a['master'])_0x35c9a9[_0x6d20c6(0x2ff)]=!![];if(_0x3f434a[_0x6d20c6(0x2a9)]&&typeof _0x3f434a[_0x6d20c6(0x2a9)]===_0x6d20c6(0x150))_0x35c9a9[_0x6d20c6(0x2a9)]=_0x3f434a[_0x6d20c6(0x2a9)];if(_0x3f434a['behavior']&&typeof _0x3f434a[_0x6d20c6(0x22a)]===_0x6d20c6(0x150))_0x35c9a9[_0x6d20c6(0x22a)]=_0x3f434a['behavior'];if(_0x3f434a['enriched'])_0x35c9a9['enriched']=!![];if(_0x3f434a[_0x6d20c6(0x210)])_0x35c9a9['interval']=_0x3f434a[_0x6d20c6(0x210)];let _0x407c0b;try{_0x407c0b=await _0x31a470[_0x6d20c6(0x159)]['previewParentYaml'](_0x4b4791,_0x35c9a9),_0x231ed3[_0x6d20c6(0x154)]();}catch(_0x23821e){_0x231ed3[_0x6d20c6(0x154)]();throw _0x23821e;}return await this[_0x6d20c6(0x223)](_0x407c0b,{'master':_0x3f434a['master'],'attribute':typeof _0x3f434a[_0x6d20c6(0x2a9)]===_0x6d20c6(0x150)?_0x3f434a[_0x6d20c6(0x2a9)]:undefined,'behavior':typeof _0x3f434a[_0x6d20c6(0x22a)]==='string'?_0x3f434a[_0x6d20c6(0x22a)]:undefined,'enriched':_0x3f434a['enriched']}),_0x407c0b[_0x6d20c6(0x2cf)]?0x0:0x1;}async[a34_0xe3eda6(0x223)](_0x2be7ef,_0x1ba72a){const _0x192e68=a34_0xe3eda6;console[_0x192e68(0x113)]('\x0a'+a34_0x427111['bold'](_0x192e68(0x1b2))+'\x20'+_0x2be7ef[_0x192e68(0x205)]),console[_0x192e68(0x113)]('═'[_0x192e68(0x2fe)](0x3c));if(_0x1ba72a[_0x192e68(0x2ff)]&&_0x2be7ef[_0x192e68(0x266)]){const _0x4aba6d=a34_0x427111['dim'](_0x192e68(0x20c))+'\x20'+a34_0x427111[_0x192e68(0x260)](_0x2be7ef['master'][_0x192e68(0x2a7)]+'.'+_0x2be7ef[_0x192e68(0x2ff)][_0x192e68(0x152)]);await this[_0x192e68(0x1de)](_0x4aba6d,_0x2be7ef[_0x192e68(0x266)]);}else{if(_0x1ba72a[_0x192e68(0x2a9)]&&_0x2be7ef['sampleData']){const _0x419d25=a34_0x427111['dim'](_0x192e68(0x20b))+'\x20'+a34_0x427111['bold'](_0x1ba72a[_0x192e68(0x2a9)]);await this[_0x192e68(0x1de)](_0x419d25,_0x2be7ef['sampleData']);}else{if(_0x1ba72a[_0x192e68(0x22a)]&&_0x2be7ef[_0x192e68(0x266)]){const _0x2156cb=a34_0x427111[_0x192e68(0x18c)]('Behavior:')+'\x20'+a34_0x427111[_0x192e68(0x260)](_0x1ba72a[_0x192e68(0x22a)]);await this[_0x192e68(0x1de)](_0x2156cb,_0x2be7ef[_0x192e68(0x266)]);}else{if(_0x1ba72a[_0x192e68(0x2c7)]&&_0x2be7ef[_0x192e68(0x266)]){const _0x4325ba=a34_0x427111['dim'](_0x192e68(0x211))+'\x20'+a34_0x427111[_0x192e68(0x260)]('Master\x20+\x20Attributes');await this[_0x192e68(0x1de)](_0x4325ba,_0x2be7ef[_0x192e68(0x266)]);}else!_0x2be7ef[_0x192e68(0x266)]&&console[_0x192e68(0x113)]('\x0aNo\x20sample\x20data\x20available');}}}if(_0x2be7ef[_0x192e68(0x2ca)]['length']>0x0){console[_0x192e68(0x113)]('─'[_0x192e68(0x2fe)](0x3c)),console['error']('\x0a'+a34_0x427111[_0x192e68(0x129)](_0x192e68(0x2b0)));for(const _0x162397 of _0x2be7ef[_0x192e68(0x2ca)]){console[_0x192e68(0x113)]('\x20\x20'+a34_0x427111['red']('•')+'\x20'+_0x162397);}}}async[a34_0xe3eda6(0x1de)](_0x54b753,_0x1a1bca){const _0x3a7ca8=a34_0xe3eda6;if(_0x1a1bca[_0x3a7ca8(0x13f)]===0x0){console['error']('\x0a'+_0x54b753),console['error'](_0x3a7ca8(0x28a));return;}console[_0x3a7ca8(0x113)]('\x0a'+_0x54b753);const _0xe76c7a=Object[_0x3a7ca8(0x200)](_0x1a1bca[0x0])[_0x3a7ca8(0x269)](_0x5539ac=>({'name':_0x5539ac,'type':typeof _0x1a1bca[0x0][_0x5539ac]===_0x3a7ca8(0x19b)?_0x3a7ca8(0x185):_0x3a7ca8(0x212)})),_0x3ddf53={'queryId':'preview','columns':_0xe76c7a,'data':_0x1a1bca,'stats':{'state':_0x3a7ca8(0x29e),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1a1bca['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x2509b4=formatAsTable(_0x3ddf53,_0x1a1bca[_0x3a7ca8(0x13f)],!![]);await writeOutput(_0x2509b4,undefined,_0x3a7ca8(0x152));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x10c);[a34_0xe3eda6(0x16d)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a34_0xe3eda6(0x116)](_0x3b3dd5){const _0x4364e4=a34_0xe3eda6,{options:_0x21185e,args:_0x547427,tdx:_0x5d1d7d}=_0x3b3dd5,_0x5db585=_0x21185e,_0x4176fa=_0x547427[0x0]||_0x21185e[_0x4364e4(0x119)];if(!_0x4176fa)return showParentSegmentNotSetError(_0x4364e4(0x1a8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x45c3bb=resolveYamlFile(_0x4176fa);if(existsSync(_0x45c3bb)){_0x5db585[_0x4364e4(0x235)]&&console[_0x4364e4(0x113)](_0x4364e4(0x274)+_0x45c3bb);let _0x2edad2;try{_0x2edad2=readFileSync(_0x45c3bb,'utf-8');}catch(_0x3641a4){const _0x37bdc9=_0x3641a4 instanceof Error?_0x3641a4[_0x4364e4(0x23b)]:String(_0x3641a4);return console[_0x4364e4(0x113)]('Error\x20reading\x20file:\x20'+_0x37bdc9),0x1;}const _0x5257e8=await withSpinner(_0x4364e4(0x1e9),()=>_0x5d1d7d['segment'][_0x4364e4(0x142)](_0x2edad2),{'verbose':_0x5db585['verbose']}),_0x41f5c3=_0x5257e8['data'],{isNew:_0x4e58e0,name:_0x19573c,hasChanges:_0x3a815a,diffFormatted:_0x258a05}=_0x41f5c3;if(_0x3a815a){_0x4e58e0?console[_0x4364e4(0x113)](_0x4364e4(0x20f)+_0x19573c+'\x27:'):console[_0x4364e4(0x113)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x19573c+'\x27:');console[_0x4364e4(0x113)]('─'[_0x4364e4(0x2fe)](0x3c)),console[_0x4364e4(0x113)](_0x258a05),console[_0x4364e4(0x113)]('─'[_0x4364e4(0x2fe)](0x3c));const _0x321435=_0x4e58e0?_0x4364e4(0x250)+_0x19573c+_0x4364e4(0x249):_0x4364e4(0x163)+_0x19573c+_0x4364e4(0x249);if(!_0x5db585[_0x4364e4(0x15c)]){if(!isInteractive())return console[_0x4364e4(0x113)](a34_0x427111[_0x4364e4(0x129)](_0x4364e4(0x1cb)),_0x4364e4(0x186)),console[_0x4364e4(0x113)](a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x241))),0x1;const _0x5e7434=await confirmKey(_0x321435);if(!_0x5e7434)return console[_0x4364e4(0x113)](a34_0x427111[_0x4364e4(0x1ce)](_0x4364e4(0x104))),0x1;}const _0x49ec71=_0x4e58e0?_0x4364e4(0x2ea):_0x4364e4(0x224);await withSpinner(_0x49ec71+_0x4364e4(0x161)+_0x19573c+_0x4364e4(0x217),()=>_0x41f5c3[_0x4364e4(0x11b)](),{'verbose':_0x5db585['verbose']});const _0x2e27f2=_0x4e58e0?'Created':_0x4364e4(0x306);console['error']('✔\x20'+_0x2e27f2+_0x4364e4(0x161)+_0x19573c+'\x27');}else console[_0x4364e4(0x113)](_0x4364e4(0x10d)+_0x19573c+_0x4364e4(0x1cc));}const _0x12b537=await withSpinner(_0x4364e4(0x18d)+_0x4176fa+_0x4364e4(0x217),()=>_0x5d1d7d[_0x4364e4(0x159)][_0x4364e4(0x30a)](_0x4176fa),{'verbose':_0x5db585['verbose']}),_0x29e682=_0x12b537[_0x4364e4(0x209)],_0x156186=getConsoleUrl(_0x5db585['site'],_0x4364e4(0x1aa)+_0x29e682['workflowId']+'/sessions/'+_0x29e682['workflowSessionId']+_0x4364e4(0x22b)+_0x29e682[_0x4364e4(0x30c)]);return console[_0x4364e4(0x113)](_0x4364e4(0x178)),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x13a))+'\x20'+_0x29e682[_0x4364e4(0x13b)]),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x191))+'\x20'+_0x29e682[_0x4364e4(0x10a)]),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)]('Session:')+'\x20'+_0x29e682['workflowSessionId']),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x263))+'\x20'+_0x29e682[_0x4364e4(0x30c)]),console['error']('\x20\x20'+_0x156186),console[_0x4364e4(0x113)]('\x0a'+a34_0x427111[_0x4364e4(0x18c)]('To\x20cancel:')+_0x4364e4(0x15d)+_0x29e682[_0x4364e4(0x30c)]+_0x4364e4(0x2e9)),0x0;}}function a34_0x5674(){const _0x42677c=['ps:rt:jn:list','relationships','database','Get\x20current\x20RT\x20configuration\x20version\x20status','attribute','sections:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','schemaValid','sections','allowed\x20IPs:','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Errors:','darwin','Error:\x20Personalization\x20ID\x20is\x20required','Coverage:','keyEventId:','\x20--behavior\x20\x22<name>\x22','null','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Error:\x20Service\x20name\x20is\x20required','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','ignore','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x20personalization','type','segment:parent:show','segment:parent:desc','\x0a⚠️\x20\x20Migrating:\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x20Tables:\x201\x20customers\x20+\x20','✔\x20Retrieved\x20RT\x20configuration\x20version','idStitching','Output\x20file:\x20','ps:rt:jn:pause','enriched','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','behaviors','errors','localeCompare','parent_segment','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Output\x20Database:','allValid','schemaError','No\x20parent\x20segments\x20match\x20pattern:\x20','pullParentYaml','open','displayMasterInfo','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','realtime','RT\x202.0\x20Validate:','26xUIlPh','✔\x20Created\x20parent\x20segment\x20\x27','Error:\x20Token\x20name\x20is\x20required','ps:pz:init','events','\x20--behavior\x20\x22','No\x20RT-enabled\x20parent\x20segments\x20found','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','jobId','\x20\x20\x20\x20\x20\x20\x20\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','createParent','utf-8','\x20(paused)','Error:\x20Token\x20ID\x20is\x20required','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','getPersonalization','\x20kill','Creating','toLocaleString','attributes','getParentFull','Creating\x20parent\x20segment\x20\x27','stringify','text','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Created','✔\x20Created\x20personalization\x20\x27','Parent\x20segment:\x20','No\x20personalization\x20services\x20configured','Attributes:','Error:\x20--database\x20and\x20--table\x20are\x20required','collectSchema','enabled','\x20parent\x20segment','ps:pz:service:token:create','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','repeat','master','ps:pz:service:list','\x0a⚠️\x20\x20Both\x20','displayValidateResults','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','personalizationServices','addBehaviors','Updated','foreignKey','using\x20the\x20default\x20path:\x20','Get\x20SQL\x20query\x20for\x20parent\x20segment','runParent','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','workflowAttemptId','RT\x20Journey\x20ID:\x20','\x0aChanges\x20to\x20\x27','launched','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','segment:parent:view','use','Listing\x20parent\x20segments\x20matching\x20\x27','test','Listing\x20parent\x20segments...','✔\x20Deleted\x20personalization\x20service\x20\x27','Personalization:','Aborted.','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','displaySummary','value','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','toLowerCase','status','\x20\x20\x20\x20','segment:parent:run','✔\x20No\x20changes\x20-\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Error\x20reading\x20file:\x20','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20+\x20[','session','error','all','win32','execute','Listing\x20personalization\x20services\x20for\x20\x27','processedRows','parentSegment','entryCriteria','apply','\x20rows\x20','personalization','Getting\x20personalization\x20\x27','Create\x20a\x20realtime\x20personalization\x20entity','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','SELECT\x20*\x20FROM\x20','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','tdx\x20ps\x20push\x20','Next\x20steps:','⚡\x20Not\x20enabled','\x20[Job\x20ID:\x20','\x22\x20}','red','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','formatSchemaJson','sourceTableError','columns','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x0aUsage:\x20tdx\x20ps\x20preview\x20','createToken','jsonl','deleteToken','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','parent_segments','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','payload','\x20\x20\x20','Audience\x20ID:','audienceId','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','Listing\x20RT-enabled\x20parent\x20segments...','length','/\x20directory.\x0a','450348YjQunR','pushParentYaml','ps:pz:service:update','Fetching\x20sample\x20data...','segment:parent:create','Listing\x20personalizations\x20for\x20\x27','endsWith','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','join','segment:parent:validate','(id:\x20','\x27\x20with\x20ID:\x20','\x22,\x20\x22type\x22:\x20\x22','✔\x20Query\x20completed:\x20Processed\x20','string','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','table','Behaviors','stop','Pattern:\x20','deletePersonalization','addBehaviorsFile','unref','segment','customerPercent','Database:\x20','yes','\x20tdx\x20wf\x20attempt\x20','getParentSQL','Columns:','token:','\x20parent\x20segment\x20\x27','Error:\x20Service\x20ID\x20is\x20required','Apply\x20changes\x20to\x20\x27','Listing\x20RT\x20journeys\x20for\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','list','Fetching\x20current\x20configuration\x20for\x20\x27','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','getOutputDatabaseName','reduce','\x20Opening\x20','description','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20','audienceId:','Error:\x20File\x20not\x20found:\x20','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','rowCount','\x20rows)','tokens','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','segment:parent:update','\x0a✔\x20Workflow\x20started','\x0a\x20\x20]\x0a}\x0a','updated:','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','log','/app/dw/parentSegments/','Finding\x20service\x20for\x20token...','Error:','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20service','xdg-open','684960aQXtUp','allowedIps','double','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Show\x20a\x20specific\x20realtime\x20personalization','\x20\x20\x20\x20-\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','dim','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','5JPPFWa','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','timezone','Status:','⚡\x20Enabled','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','displayColumns','replace','\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','scheduleOption','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','displayAttributesStats','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','number','tdx\x20ps\x20preview\x20','format','7aBeKYA','Error:\x20--behavior\x20requires\x20a\x20name\x0a','segment:parent:pull','Validating\x20configuration...','segment:parent:preview','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','push','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','ps:rt:configuration_versions','Fetching\x20customers\x20schema...','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Error:\x20--name\x20is\x20required','/app/workflows/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','attributesFile','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','✔\x20Updated\x20personalization\x20\x27','ps:pz:service:token:delete','listParents','Listing\x20fields\x20for\x20\x27','Preview:','getBehaviorNames','ps:rt:validate','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','some','Creating\x20token\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','.yaml','matchedCount','behavior_','personalization_services','\x20--attribute\x20\x22','\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','realtime_enabled','\x20configured','Deleting\x20personalization\x20service\x20\x27','includeSensitive','file','To\x20view\x20sample\x20data:','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','displayRealtimeInfo','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','.yml','\x0aError:','\x27\x20is\x20up\x20to\x20date','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','yellow','folderId','Deleting\x20token\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','\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','/{name}.yml\x0a','\x20total','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','start','✔\x20Created\x20token\x20\x27','customerGroup','paused','no\x20tokens\x20configured','ps:rt:jn:resume','Creating\x20personalization\x20service\x20\x27','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','displaySampleData','\x20true','status:\x20','keyEventCriteria','ps:pz:service:delete','displayPreviewHints','\x20--enriched','2071008wbeKMb','last_page_viewed','updateParent','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Analyzing\x20changes...','\x20Added\x20RT\x202.0\x20template\x20section','identifier','\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','web','/\x20→\x20','eventKind','single','Patching\x20personalization\x20\x27','identifier:\x20','Schema\x20saved\x20to\x20','\x27\x20is\x20already\x20up\x20to\x20date','created:','Delete\x20a\x20realtime\x20personalization','Site:\x20','eventKind:\x20','create','addAttributes','\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','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','elapsedTimeMillis','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','stageCount','keys','split','stitchingKeys','displayBehaviorsStats','Customers:','name','public:','Options:\x0a','Error:\x20Parent\x20segment\x20name\x20is\x20required','data','coveragePercent','Attribute:','Master:','page_view','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x0aNew\x20parent\x20segment\x20\x27','interval','Enriched:','varchar','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','updatedAt','{\x0a\x20\x20\x22database\x22:\x20\x22','Fetching\x20SQL\x20for\x20\x27','\x27...','\x20\x20Columns:\x20','customers','customersWithEvents','Join\x20on:','filter','Validate:','✔\x20Found\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','✔\x20Updated\x20personalization\x20service\x20\x27','scheduleType','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','displayPreviewResults','Updating','segment:parent:push','Default','308616yNNfbr','\x20--interval\x20','Delete\x20a\x20personalization\x20service','behavior','/attempt/','toFixed','any','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','joinKey','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','Available\x20behaviors:','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Validating\x20RT\x20configuration...','parent_id','verbose','Events:','Overwrite\x20\x27','✔\x20Deleted\x20personalization\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x27\x20for\x20service\x20\x27','message','td_client_id','%)\x20','population','cyan','run','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','column_type','\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','segment:parent:sql','behaviorsFile','Fetching\x20behavior\x20list...','delete','\x20stage','\x27\x20and\x20run\x20workflow?','Available\x20attributes:','Show\x20parent\x20segment\x20details','public','Update\x20a\x20realtime\x20personalization\x20entity','Pause\x20activations\x20in\x20an\x20RT\x20journey','listJourneys','Create\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x202.\x20Run\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','segment:parent:fields','Resolving\x20parent\x20segment\x20\x27','payload:','get','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Fetching\x20parent\x20segment\x20\x27','\x20behaviors','\x20--attribute\x20\x22<name>\x22','ps:pz:list','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','customerGroupFile','Options\x20(one\x20required):\x0a','bold','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','No\x20RT\x20journeys\x20found','Attempt:','.customers)','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','sampleData','resolveParentId','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','map','\x20\x20Database:\x20','Join:','Creating\x20personalization\x20\x27','trim','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','\x20Configuration\x20is\x20valid','user_id','json','Found\x20YAML\x20file:\x20','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','green','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','column_name','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','Source:','sourceTableValid','output','\x20=\x20','true','Rows:','62904AbDvOG','/\x20and\x20','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','valid','id:\x20','label','folder-segment','2995770bIfqqj','<database>.<table>','validateParentYaml','\x20\x20No\x20sample\x20data\x20available','List\x20available\x20fields\x20for\x20segmentation','column','✔\x20Deleted\x20token\x20\x27','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','site','List\x20parent\x20segments','SELECT\x20*\x20FROM\x20(\x0a','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','state','totalEvents','Error:\x20Token\x20\x27','match','\x5c$&','\x20Added\x20personalization\x20template\x20to\x20','sort','ps:pz:service:show','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','\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','\x20is\x20already\x20up\x20to\x20date','FINISHED','YAML\x20file:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','parentFolder','keyEventId','31490VMskbJ','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'];a34_0x5674=function(){return _0x42677c;};return a34_0x5674();}export class ParentSegmentFieldsCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x254);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x28b);async[a34_0xe3eda6(0x116)](_0x33e20e){const _0x319b61=a34_0xe3eda6,{options:_0x3d81d6,args:_0x3644e8,tdx:_0x5617ce}=_0x33e20e,_0x2e46ee=_0x3644e8[0x0]||_0x3d81d6[_0x319b61(0x119)];if(!_0x2e46ee)return showParentSegmentNotSetError(_0x319b61(0x282)+_0x319b61(0x134)),0x1;_0x3d81d6['verbose']&&(console['error'](_0x319b61(0x1f7)+_0x3d81d6[_0x319b61(0x28f)]),console[_0x319b61(0x113)](_0x319b61(0x2f5)+_0x2e46ee));const _0x4a354c=await withSpinner(_0x319b61(0x1b1)+_0x2e46ee+_0x319b61(0x217),()=>_0x5617ce[_0x319b61(0x159)]['listFields'](_0x2e46ee),{'verbose':_0x3d81d6[_0x319b61(0x235)]}),_0x1e544d=_0x4a354c[_0x319b61(0x209)];console[_0x319b61(0x113)](_0x319b61(0x21e)+_0x1e544d[_0x319b61(0x13f)]+'\x20field'+(_0x1e544d[_0x319b61(0x13f)]!==0x1?'s':''));if(_0x3d81d6[_0x319b61(0x273)]||_0x3d81d6[_0x319b61(0x131)])return await handleSDKOutput(_0x1e544d,_0x3d81d6),0x0;return displayFieldsHumanReadable(_0x1e544d,_0x2e46ee),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0xfd);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x24b);async['execute'](_0x4cf8e6){const _0x2cfaa4=a34_0xe3eda6,{options:_0xe886d5,args:_0x1d9f73,tdx:_0x36ea36}=_0x4cf8e6,_0x4159d3=_0xe886d5,_0x470083=_0x1d9f73[0x0]||_0xe886d5[_0x2cfaa4(0x119)];if(!_0x470083)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'+_0x2cfaa4(0x18a)+_0x2cfaa4(0x207)+_0x2cfaa4(0x18b)),0x1;_0xe886d5[_0x2cfaa4(0x235)]&&(console['error'](_0x2cfaa4(0x1f7)+_0xe886d5[_0x2cfaa4(0x28f)]),console[_0x2cfaa4(0x113)](_0x2cfaa4(0x2f5)+_0x470083));const _0x3cb1d5=await withSpinner(_0x2cfaa4(0x259)+_0x470083+_0x2cfaa4(0x217),()=>_0x36ea36[_0x2cfaa4(0x159)][_0x2cfaa4(0x2ed)](_0x470083),{'verbose':_0xe886d5[_0x2cfaa4(0x235)]}),_0x580456=_0x3cb1d5[_0x2cfaa4(0x209)];if(_0x4159d3[_0x2cfaa4(0x1ed)]){const _0x3995bb=getConsoleNextUrl(_0x4159d3['site'],'/app/dw/parentSegments/'+_0x580456['id']);return console[_0x2cfaa4(0x113)](a34_0x427111[_0x2cfaa4(0x276)]('✔')+_0x2cfaa4(0x16c)+a34_0x427111['cyan'](_0x3995bb)),openBrowser(_0x3995bb),0x0;}return await handleSingleObjectOutput(_0x580456,_0xe886d5),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2bf);[a34_0xe3eda6(0x16d)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a34_0xe3eda6(0x116)](_0x5743d5){const _0x1606e8=a34_0xe3eda6,{options:_0x493378,args:_0x40ee45,tdx:_0x1d611a}=_0x5743d5,_0x67e97a=_0x493378,_0x27fe0b=_0x40ee45[0x0]||_0x493378['parentSegment'];if(!_0x27fe0b)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'+_0x1606e8(0x1d2)+_0x1606e8(0x207)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x493378[_0x1606e8(0x235)]&&(console[_0x1606e8(0x113)]('Site:\x20'+_0x493378[_0x1606e8(0x28f)]),console[_0x1606e8(0x113)]('Parent\x20segment:\x20'+_0x27fe0b));const _0x54bda6=await withSpinner(_0x1606e8(0x255)+_0x27fe0b+_0x1606e8(0x217),()=>_0x1d611a[_0x1606e8(0x159)][_0x1606e8(0x267)](_0x27fe0b),{'verbose':_0x493378[_0x1606e8(0x235)]}),_0x1721e8=_0x54bda6[_0x1606e8(0x209)],_0x5e4522=_0x1d611a[_0x1606e8(0x159)][_0x1606e8(0x16a)](_0x1721e8);if(_0x67e97a[_0x1606e8(0x27c)]){const _0x3d655d=await this[_0x1606e8(0x2f9)](_0x5743d5,_0x27fe0b,_0x1721e8,_0x5e4522),_0x2da307=this[_0x1606e8(0x12b)](_0x3d655d);writeFileSync(_0x67e97a[_0x1606e8(0x27c)],_0x2da307);const _0x5b38b5=_0x3d655d[_0x1606e8(0x219)]['columns'][_0x1606e8(0x13f)]+_0x3d655d[_0x1606e8(0x2c9)][_0x1606e8(0x16b)]((_0x1e9063,_0x1b05cd)=>_0x1e9063+_0x1b05cd[_0x1606e8(0x12d)][_0x1606e8(0x13f)],0x0),_0x16f2bb=_0x3d655d[_0x1606e8(0x2c9)][_0x1606e8(0x21c)](_0x4bab45=>_0x4bab45[_0x1606e8(0x12d)]['length']===0x0)['length'];return console['log'](_0x1606e8(0x1f3)+_0x67e97a['output']),console[_0x1606e8(0x17c)](_0x1606e8(0x26a)+_0x5e4522),console[_0x1606e8(0x17c)](_0x1606e8(0x2c2)+_0x3d655d['behaviors']['length']+_0x1606e8(0x25a)),console[_0x1606e8(0x17c)](_0x1606e8(0x218)+_0x5b38b5+_0x1606e8(0x1d4)),_0x16f2bb>0x0&&console[_0x1606e8(0x17c)]('\x20\x20Note:\x20'+_0x16f2bb+_0x1606e8(0x277)),0x0;}console[_0x1606e8(0x113)]('\x0a'+a34_0x427111[_0x1606e8(0x260)](_0x1606e8(0x2ce))+'\x20'+a34_0x427111[_0x1606e8(0x23f)](_0x5e4522));const _0x3e5c58=await withSpinner(_0x1606e8(0x1a7),()=>_0x1d611a[_0x1606e8(0x159)][_0x1606e8(0x15e)](_0x1721e8),{'verbose':_0x493378[_0x1606e8(0x235)]});console['error']('\x0a'+a34_0x427111[_0x1606e8(0x260)](_0x1606e8(0x219))+'\x20'+a34_0x427111['dim']('('+_0x5e4522+_0x1606e8(0x264)));const _0x1f1fc1=await executeSchemaQuery(_0x3e5c58[_0x1606e8(0x209)],_0x1d611a,_0x493378);await handleQueryOutput(_0x1f1fc1,_0x493378);const _0x41ca42=await withSpinner(_0x1606e8(0x246),()=>_0x1d611a['segment'][_0x1606e8(0x1b3)](_0x1721e8),{'verbose':_0x493378[_0x1606e8(0x235)]});for(const _0x1df34b of _0x41ca42[_0x1606e8(0x209)]){const _0x1974c0='behavior_'+_0x1df34b[_0x1606e8(0x109)]()[_0x1606e8(0x195)](/\s+/g,'_'),_0x13457b=_0x1606e8(0x122)+_0x5e4522+'.'+_0x1974c0;console[_0x1606e8(0x113)]('\x0a'+a34_0x427111['bold'](_0x1df34b)+'\x20'+a34_0x427111[_0x1606e8(0x18c)]('('+_0x5e4522+'.'+_0x1974c0+')'));try{const _0x5aab2b=await executeSchemaQuery(_0x13457b,_0x1d611a,_0x493378);await handleQueryOutput(_0x5aab2b,_0x493378);}catch{console['error'](a34_0x427111[_0x1606e8(0x1ce)](_0x1606e8(0x26f)));}}return 0x0;}async[a34_0xe3eda6(0x2f9)](_0x554494,_0x44de02,_0x4cdcba,_0x59b41d){const _0x16acb9=a34_0xe3eda6,{options:_0x1a26cd,tdx:_0x2ca079}=_0x554494,_0x1ba682=await withSpinner(_0x16acb9(0x1a7),()=>_0x2ca079['segment'][_0x16acb9(0x15e)](_0x4cdcba),{'verbose':_0x1a26cd['verbose']}),_0x4cf711=await executeSchemaQuery(_0x1ba682[_0x16acb9(0x209)],_0x2ca079,_0x1a26cd),_0x361bd2=_0x4cf711[_0x16acb9(0x209)][_0x16acb9(0x269)](_0x4392c6=>({'name':_0x4392c6['column_name'],'type':_0x4392c6[_0x16acb9(0x242)]})),_0x390434=await withSpinner(_0x16acb9(0x246),()=>_0x2ca079[_0x16acb9(0x159)]['getBehaviorNames'](_0x4cdcba),{'verbose':_0x1a26cd[_0x16acb9(0x235)]}),_0x415093=[];for(const _0x4a75b1 of _0x390434[_0x16acb9(0x209)]){const _0x1e62bb=_0x16acb9(0x1bc)+_0x4a75b1[_0x16acb9(0x109)]()['replace'](/\s+/g,'_'),_0x424478=_0x16acb9(0x122)+_0x59b41d+'.'+_0x1e62bb;let _0x2fab86=[];try{const _0x561074=await executeSchemaQuery(_0x424478,_0x2ca079,_0x1a26cd);_0x2fab86=_0x561074[_0x16acb9(0x209)][_0x16acb9(0x269)](_0x72f392=>({'name':_0x72f392[_0x16acb9(0x278)],'type':_0x72f392['column_type']}));}catch{}_0x415093[_0x16acb9(0x1a4)]({'table':_0x1e62bb,'columns':_0x2fab86});}return{'database':_0x59b41d,'parent_segment':_0x44de02,'parent_id':_0x4cdcba,'customers':{'table':_0x16acb9(0x219),'columns':_0x361bd2},'behaviors':_0x415093};}['formatSchemaJson'](_0xcaa501){const _0x5b4064=a34_0xe3eda6,_0x12ee54=_0x44a0b3=>{const _0x34d400=a34_0xff01;if(_0x44a0b3['length']===0x0)return'[]';const _0x45f148=_0x44a0b3[_0x34d400(0x269)](_0x17e589=>_0x34d400(0x123)+_0x17e589[_0x34d400(0x205)]+_0x34d400(0x14e)+_0x17e589['type']+_0x34d400(0x128));return'[\x0a'+_0x45f148[_0x34d400(0x14a)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x1c8b2e=_0xcaa501['behaviors'][_0x5b4064(0x269)](_0x4da69f=>{const _0x5eeb9a=_0x5b4064;return _0x5eeb9a(0x198)+_0x4da69f['table']+_0x5eeb9a(0x213)+_0x12ee54(_0x4da69f[_0x5eeb9a(0x12d)])['replace'](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20\x20\x20}';})[_0x5b4064(0x14a)](',\x0a');return _0x5b4064(0x215)+_0xcaa501[_0x5b4064(0x2a7)]+_0x5b4064(0x169)+_0xcaa501['parent_segment']+_0x5b4064(0x137)+_0xcaa501[_0x5b4064(0x234)]+_0x5b4064(0x1e8)+_0xcaa501[_0x5b4064(0x219)][_0x5b4064(0x152)]+_0x5b4064(0x1a3)+_0x12ee54(_0xcaa501['customers'][_0x5b4064(0x12d)])['replace'](/^/gm,'\x20\x20')[_0x5b4064(0x26d)]()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x1c8b2e+_0x5b4064(0x179);}}export class ParentSegmentSQLCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x244);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x309);async[a34_0xe3eda6(0x116)](_0x135ad7){const _0x106002=a34_0xe3eda6,{options:_0x23d8a4,args:_0x98a0fb,tdx:_0x5541c7}=_0x135ad7,_0x1f3491=_0x98a0fb[0x0]||_0x23d8a4[_0x106002(0x119)];if(!_0x1f3491)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'+_0x106002(0x1ab)),0x1;_0x23d8a4['verbose']&&(console['error'](_0x106002(0x1f7)+_0x23d8a4[_0x106002(0x28f)]),console[_0x106002(0x113)]('Parent\x20segment:\x20'+_0x1f3491));const _0x3811c9=await withSpinner(_0x106002(0x255)+_0x1f3491+_0x106002(0x217),()=>_0x5541c7['segment'][_0x106002(0x267)](_0x1f3491),{'verbose':_0x23d8a4[_0x106002(0x235)]}),_0x392f24=_0x3811c9[_0x106002(0x209)],_0x416526=await withSpinner(_0x106002(0x216)+_0x1f3491+_0x106002(0x217),()=>_0x5541c7[_0x106002(0x159)]['getParentSQL'](_0x392f24),{'verbose':_0x23d8a4[_0x106002(0x235)]}),_0x32327e=_0x416526['data'];return _0x23d8a4[_0x106002(0x19d)]===_0x106002(0x273)||_0x23d8a4[_0x106002(0x19d)]===_0x106002(0x131)?await handleSDKOutput([{'sql':_0x32327e}],_0x23d8a4):console[_0x106002(0x17c)](_0x32327e),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2be);['description']=a34_0xe3eda6(0x1fc);async[a34_0xe3eda6(0x116)](_0xcd93d3){const _0x1b0a9e=a34_0xe3eda6,{options:_0xa15367,args:_0x9089e2,tdx:_0x1136c7}=_0xcd93d3,_0x255126=_0x9089e2[0x0]||_0xa15367['parentSegment'];if(!_0x255126)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a'+_0x1b0a9e(0x1c8)),0x1;_0xa15367[_0x1b0a9e(0x235)]&&(console[_0x1b0a9e(0x113)](_0x1b0a9e(0x1f7)+_0xa15367['site']),console[_0x1b0a9e(0x113)](_0x1b0a9e(0x2f5)+_0x255126));const _0x4be923=await withSpinner(_0x1b0a9e(0x255)+_0x255126+_0x1b0a9e(0x217),()=>_0x1136c7[_0x1b0a9e(0x159)]['resolveParentId'](_0x255126),{'verbose':_0xa15367[_0x1b0a9e(0x235)]}),_0x42a416=_0x4be923[_0x1b0a9e(0x209)],_0x3f9947=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x255126+_0x1b0a9e(0x217),()=>_0x1136c7[_0x1b0a9e(0x159)]['getParentSQL'](_0x42a416),{'verbose':_0xa15367[_0x1b0a9e(0x235)]});let _0x1faab0=_0x3f9947[_0x1b0a9e(0x209)];const _0x49b58b=resolveLimit(_0xa15367['limit'],DEFAULT_DISPLAY_LIMIT),_0x3ccb4d=/\bLIMIT\s+\d+/i['test'](_0x1faab0);!_0x3ccb4d&&(_0x1faab0=_0x1faab0['trim']()[_0x1b0a9e(0x195)](/;+$/,''),_0x1faab0=_0x1b0a9e(0x291)+_0x1faab0+_0x1b0a9e(0x1d5)+_0x49b58b);_0xa15367['verbose']&&console['error']('SQL\x20query:\x0a'+_0x1faab0);const _0x250087=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x44f35a=>{const _0x3f5ff1=_0x1b0a9e,_0x44fff6=await _0x1136c7['query'][_0x3f5ff1(0x116)](_0x1faab0,{'catalog':'td','schema':'information_schema','onJobId':_0x2d6f4d=>{_0x44f35a['setJobId'](_0x2d6f4d);}});return _0x44fff6;},{'verbose':_0xa15367[_0x1b0a9e(0x235)]}),_0xf416bf=_0x250087[_0x1b0a9e(0x209)],_0x1bc1f9=_0xf416bf[_0x1b0a9e(0x2e0)]?_0x1b0a9e(0x127)+_0xf416bf['jobId']+']':'';return console['error'](_0x1b0a9e(0x14f)+_0xf416bf['stats'][_0x1b0a9e(0x118)][_0x1b0a9e(0x2eb)]()+_0x1b0a9e(0x11c)+('in\x20'+formatElapsed(_0xf416bf['stats'][_0x1b0a9e(0x1fd)])+_0x1bc1f9)),await handleQueryOutput(_0xf416bf,_0xa15367),0x0;}}export class PSRtListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:rt:list';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x168);async[a34_0xe3eda6(0x116)](_0x372896){const _0xd403fa=a34_0xe3eda6,{options:_0x1bbb5a,args:_0x152af1,tdx:_0x4fd7ef}=_0x372896,_0xad390f=_0x152af1[0x0],_0x2fbb92=await withSpinner(_0xad390f?_0xd403fa(0x105)+_0xad390f+_0xd403fa(0x217):_0xd403fa(0x13e),()=>_0x4fd7ef[_0xd403fa(0x2d6)][_0xd403fa(0x166)](),{'verbose':_0x1bbb5a[_0xd403fa(0x235)]});let _0xca9077=_0x2fbb92[_0xd403fa(0x209)]['filter'](_0x4a849f=>_0x4a849f[_0xd403fa(0x1c0)]);if(_0xad390f){const _0x3e954c=_0xad390f[_0xd403fa(0x195)](/[.+^${}()|[\]\\]/g,_0xd403fa(0x297))[_0xd403fa(0x195)](/\*/g,'.*')[_0xd403fa(0x195)](/\?/g,'.'),_0xad3285=new RegExp('^'+_0x3e954c+'$','i');_0xca9077=_0xca9077[_0xd403fa(0x21c)](_0x2d7c33=>_0xad3285[_0xd403fa(0x100)](_0x2d7c33[_0xd403fa(0x205)]));}_0xca9077[_0xd403fa(0x299)]((_0x23607e,_0x778d4d)=>_0x23607e[_0xd403fa(0x205)][_0xd403fa(0x2cb)](_0x778d4d[_0xd403fa(0x205)])),console[_0xd403fa(0x113)](_0xd403fa(0x21e)+_0xca9077[_0xd403fa(0x13f)]+'\x20RT-enabled\x20parent\x20segment'+(_0xca9077[_0xd403fa(0x13f)]!==0x1?'s':''));const _0x3cd487=_0x422ef3=>{const _0xa7750c=_0xd403fa;return getConsoleNextUrl(_0x1bbb5a[_0xa7750c(0x28f)],_0xa7750c(0x17d)+_0x422ef3);};if(_0x1bbb5a['format']==='json'||_0x1bbb5a[_0xd403fa(0x19d)]==='jsonl'){const _0x1f1438=_0xca9077[_0xd403fa(0x269)](_0x375853=>({..._0x375853,'url':_0x3cd487(_0x375853['id'])}));await handleSDKOutput(_0x1f1438,_0x1bbb5a);}else{if(_0xca9077['length']===0x0)console[_0xd403fa(0x17c)](_0xd403fa(0x2de));else for(const _0x475e03 of _0xca9077){const _0x4b873d=_0x475e03[_0xd403fa(0x23e)]?a34_0x427111['dim']('\x20('+formatRows(_0x475e03[_0xd403fa(0x23e)])+')'):'',_0x6b8528=hyperlink(_0x475e03[_0xd403fa(0x205)],_0x3cd487(_0x475e03['id']));console['log']('⚡\x20'+_0x6b8528+_0x4b873d);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a34_0xe3eda6(0x1b4);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x13c);async[a34_0xe3eda6(0x116)](_0x20880){const _0x393d90=a34_0xe3eda6,{options:_0x523c40,args:_0x1302f0,tdx:_0x3f193f}=_0x20880,_0x8c87c8=_0x1302f0[0x0]||_0x523c40[_0x393d90(0x119)];if(!_0x8c87c8)return showParentSegmentNotSetError(_0x393d90(0x108)+_0x393d90(0x1fb)),0x1;const _0x53ffb5=resolveYamlFile(_0x8c87c8);if(!existsSync(_0x53ffb5))return showFileNotFoundError(_0x53ffb5,_0x8c87c8),0x1;let _0x29265f;try{_0x29265f=readFileSync(_0x53ffb5,'utf-8');}catch(_0x144a54){const _0x5425ea=_0x144a54 instanceof Error?_0x144a54[_0x393d90(0x23b)]:String(_0x144a54);return console[_0x393d90(0x113)](_0x393d90(0x10f)+_0x5425ea),0x1;}const _0x52e1e9=createCommandSpinner(a34_0x427111[_0x393d90(0x18c)](_0x393d90(0x233)),{'verbose':_0x523c40[_0x393d90(0x235)]});_0x52e1e9['start']();const _0x2c2497={'realtime':!![],'onProgress':_0x432d8d=>{const _0xb21012=_0x393d90;_0x52e1e9[_0xb21012(0x2f0)]=formatProgressMessage(_0x432d8d);}};let _0x232880;try{_0x232880=await _0x3f193f[_0x393d90(0x159)][_0x393d90(0x289)](_0x29265f,_0x2c2497),_0x52e1e9['stop']();}catch(_0x155e80){_0x52e1e9[_0x393d90(0x154)]();throw _0x155e80;}console[_0x393d90(0x113)]('\x0a'+a34_0x427111[_0x393d90(0x260)](_0x393d90(0x2d7))+'\x20'+_0x232880[_0x393d90(0x205)]),console['error']('═'['repeat'](0x3c)),displayRealtimeValidation(_0x232880),console[_0x393d90(0x113)]('─'['repeat'](0x3c));if(_0x232880[_0x393d90(0x2ca)]['length']>0x0){console[_0x393d90(0x113)]('\x0a'+a34_0x427111[_0x393d90(0x129)](_0x393d90(0x2b0)));for(const _0x9e47af of _0x232880[_0x393d90(0x2ca)]){console['error']('\x20\x20'+a34_0x427111[_0x393d90(0x129)]('•')+'\x20'+_0x9e47af);}}return _0x232880['allValid']&&console[_0x393d90(0x113)]('\x0a'+a34_0x427111[_0x393d90(0x276)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x232880[_0x393d90(0x2cf)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2a5);['description']='List\x20RT\x20journeys';async['execute'](_0x544e9b){const _0x232add=a34_0xe3eda6,{options:_0xd30073,args:_0x1bee13,tdx:_0x297949}=_0x544e9b,_0x41d68d=_0x1bee13[0x0]||_0xd30073[_0x232add(0x119)];if(!_0x41d68d)return showParentSegmentNotSetError(_0x232add(0x172)+_0x232add(0x29c)),0x1;_0xd30073[_0x232add(0x235)]&&(console[_0x232add(0x113)](_0x232add(0x1f7)+_0xd30073[_0x232add(0x28f)]),console[_0x232add(0x113)]('Parent\x20segment:\x20'+_0x41d68d));const _0x4fe0b1=await withSpinner(_0x232add(0x255)+_0x41d68d+_0x232add(0x217),()=>_0x297949[_0x232add(0x159)][_0x232add(0x267)](_0x41d68d),{'verbose':_0xd30073[_0x232add(0x235)]}),_0x3141e6=_0x4fe0b1['data'],_0x4b73e3=await withSpinner(_0x232add(0x164)+_0x41d68d+_0x232add(0x217),()=>_0x297949[_0x232add(0x2d6)][_0x232add(0x24f)](_0x3141e6),{'verbose':_0xd30073['verbose']}),_0x2eb7a9=_0x4b73e3['data'];console[_0x232add(0x113)](_0x232add(0x21e)+_0x2eb7a9[_0x232add(0x13f)]+'\x20RT\x20journey'+(_0x2eb7a9['length']!==0x1?'s':''));if(_0xd30073[_0x232add(0x19d)]===_0x232add(0x273)||_0xd30073[_0x232add(0x19d)]===_0x232add(0x131))await handleSDKOutput(_0x2eb7a9,_0xd30073);else{if(_0x2eb7a9[_0x232add(0x13f)]===0x0)console[_0x232add(0x17c)](_0x232add(0x262));else for(const _0x21db9b of _0x2eb7a9){const _0x1625d3=_0x21db9b[_0x232add(0x293)]===_0x232add(0xfb)?'🚀':'📝',_0x1a707a=_0x21db9b[_0x232add(0x1d9)]?a34_0x427111['yellow'](_0x232add(0x2e5)):'',_0x526c05=a34_0x427111[_0x232add(0x18c)]('\x20('+_0x21db9b[_0x232add(0x1ff)]+_0x232add(0x248)+(_0x21db9b[_0x232add(0x1ff)]!==0x1?'s':'')+')');console[_0x232add(0x17c)](_0x1625d3+'\x20'+_0x21db9b[_0x232add(0x205)]+_0x1a707a+_0x526c05);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2c6);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x24e);async[a34_0xe3eda6(0x116)](_0x25cba5){const _0x1fdf2a=a34_0xe3eda6,{options:_0x566859,args:_0xf3113f,tdx:_0x47c258}=_0x25cba5,_0x159f88=_0xf3113f[0x0];if(!_0x159f88)return console[_0x1fdf2a(0x113)](a34_0x427111['red'](_0x1fdf2a(0x1c9))),console[_0x1fdf2a(0x113)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console['error'](a34_0x427111['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x566859[_0x1fdf2a(0x235)]&&(console[_0x1fdf2a(0x113)]('Site:\x20'+_0x566859[_0x1fdf2a(0x28f)]),console[_0x1fdf2a(0x113)](_0x1fdf2a(0xf9)+_0x159f88));const _0x333999=await withSpinner(_0x1fdf2a(0x292)+_0x159f88+'\x27...',()=>_0x47c258['realtime']['pauseJourney'](_0x159f88),{'verbose':_0x566859[_0x1fdf2a(0x235)]}),_0x1a1a66=_0x333999['data'];console[_0x1fdf2a(0x113)](_0x1fdf2a(0x2b9)+_0x1a1a66[_0x1fdf2a(0x205)]+'\x27');if(_0x566859[_0x1fdf2a(0x19d)]===_0x1fdf2a(0x273)||_0x566859['format']===_0x1fdf2a(0x131))await handleSDKOutput([_0x1a1a66],_0x566859);else{const _0x1378e9=_0x1a1a66[_0x1fdf2a(0x293)]===_0x1fdf2a(0xfb)?'🚀':'📝',_0x543b57=_0x1a1a66[_0x1fdf2a(0x1d9)]?a34_0x427111[_0x1fdf2a(0x1ce)](_0x1fdf2a(0x2e5)):'';console[_0x1fdf2a(0x17c)](_0x1378e9+'\x20'+_0x1a1a66[_0x1fdf2a(0x205)]+_0x543b57);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a34_0xe3eda6(0x1db);[a34_0xe3eda6(0x16d)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a34_0xe3eda6(0x116)](_0x4f4a2e){const _0x5301e6=a34_0xe3eda6,{options:_0xb12cb0,args:_0x5ac7fa,tdx:_0x14b928}=_0x4f4a2e,_0x13030e=_0x5ac7fa[0x0];if(!_0x13030e)return console['error'](a34_0x427111['red'](_0x5301e6(0x1c9))),console[_0x5301e6(0x113)](_0x5301e6(0x1b9)),console[_0x5301e6(0x113)](a34_0x427111[_0x5301e6(0x18c)](_0x5301e6(0x1ad))),0x1;_0xb12cb0[_0x5301e6(0x235)]&&(console['error'](_0x5301e6(0x1f7)+_0xb12cb0[_0x5301e6(0x28f)]),console[_0x5301e6(0x113)](_0x5301e6(0xf9)+_0x13030e));const _0x3fc7de=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x13030e+_0x5301e6(0x217),()=>_0x14b928[_0x5301e6(0x2d6)]['resumeJourney'](_0x13030e),{'verbose':_0xb12cb0['verbose']}),_0x3beaf7=_0x3fc7de[_0x5301e6(0x209)];console[_0x5301e6(0x113)](_0x5301e6(0x222)+_0x3beaf7[_0x5301e6(0x205)]+'\x27');if(_0xb12cb0[_0x5301e6(0x19d)]===_0x5301e6(0x273)||_0xb12cb0[_0x5301e6(0x19d)]==='jsonl')await handleSDKOutput([_0x3beaf7],_0xb12cb0);else{const _0x5a8ca7=_0x3beaf7[_0x5301e6(0x293)]===_0x5301e6(0xfb)?'🚀':'📝',_0x5657ce=_0x3beaf7[_0x5301e6(0x1d9)]?a34_0x427111[_0x5301e6(0x1ce)](_0x5301e6(0x2e5)):'';console[_0x5301e6(0x17c)](_0x5a8ca7+'\x20'+_0x3beaf7[_0x5301e6(0x205)]+_0x5657ce);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a34_0xe3eda6(0x1a6);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2a8);async[a34_0xe3eda6(0x116)](_0x5e87fa){const _0x1297a1=a34_0xe3eda6,{options:_0x1848e8,args:_0x413c25,tdx:_0x23980a}=_0x5e87fa,_0x46bcb9=_0x413c25[0x0]||_0x1848e8[_0x1297a1(0x119)];if(!_0x46bcb9)return showParentSegmentNotSetError(_0x1297a1(0x279)+_0x1297a1(0x243)),0x1;_0x1848e8[_0x1297a1(0x235)]&&(console[_0x1297a1(0x113)](_0x1297a1(0x1f7)+_0x1848e8[_0x1297a1(0x28f)]),console[_0x1297a1(0x113)](_0x1297a1(0x2f5)+_0x46bcb9));const _0x3b504c=await withSpinner(_0x1297a1(0x255)+_0x46bcb9+_0x1297a1(0x217),()=>_0x23980a[_0x1297a1(0x159)][_0x1297a1(0x267)](_0x46bcb9),{'verbose':_0x1848e8[_0x1297a1(0x235)]}),_0x15de0d=_0x3b504c[_0x1297a1(0x209)],_0x579536=await withSpinner(_0x1297a1(0x18f)+_0x46bcb9+_0x1297a1(0x217),()=>_0x23980a['realtime']['getCurrentConfigVersion'](_0x15de0d),{'verbose':_0x1848e8[_0x1297a1(0x235)]}),_0x1d6a54=_0x579536['data'];return console['error'](_0x1297a1(0x2c3)),_0x1848e8['format']==='json'||_0x1848e8[_0x1297a1(0x19d)]===_0x1297a1(0x131)?await handleSDKOutput([_0x1d6a54],_0x1848e8):(console[_0x1297a1(0x17c)](_0x1297a1(0x284)+_0x1d6a54['id']),console['log']('audienceId:\x20'+_0x1d6a54['audienceId']),console[_0x1297a1(0x17c)](_0x1297a1(0x1f2)+_0x1d6a54[_0x1297a1(0x1eb)]),console[_0x1297a1(0x17c)](_0x1297a1(0x1f8)+_0x1d6a54[_0x1297a1(0x1ef)]),console[_0x1297a1(0x17c)](_0x1297a1(0x1e0)+_0x1d6a54[_0x1297a1(0x10a)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x300);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2cd);async['execute'](_0xbbc8cb){const _0x571e68=a34_0xe3eda6,{options:_0x1af48a,args:_0x2a381d,tdx:_0xa88d5}=_0xbbc8cb,_0x558b6c=_0x2a381d[0x0]||_0x1af48a[_0x571e68(0x119)];if(!_0x558b6c)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'+_0x571e68(0x1bf)),0x1;const _0x13ada1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x558b6c+'\x27...',()=>_0xa88d5[_0x571e68(0x159)][_0x571e68(0x267)](_0x558b6c),{'verbose':_0x1af48a['verbose']}),_0xb0ec24=_0x13ada1['data'],_0x3fcd6b=await withSpinner(_0x571e68(0x117)+_0x558b6c+'\x27...',()=>_0xa88d5[_0x571e68(0x11d)][_0x571e68(0x166)](_0xb0ec24),{'verbose':_0x1af48a[_0x571e68(0x235)]}),_0x3e9d67=_0x3fcd6b[_0x571e68(0x209)];console[_0x571e68(0x113)](_0x571e68(0x21e)+_0x3e9d67[_0x571e68(0x13f)]+'\x20personalization\x20service'+(_0x3e9d67[_0x571e68(0x13f)]!==0x1?'s':''));if(_0x1af48a[_0x571e68(0x19d)]===_0x571e68(0x273)||_0x1af48a[_0x571e68(0x19d)]===_0x571e68(0x131))await handleSDKOutput(_0x3e9d67,_0x1af48a);else{if(_0x3e9d67[_0x571e68(0x13f)]===0x0)console[_0x571e68(0x17c)](_0x571e68(0x2f6)),console['error'](a34_0x427111[_0x571e68(0x23f)]('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0xba45a2 of _0x3e9d67){console['log'](a34_0x427111['bold'](_0xba45a2['name'])+'\x20'+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x14c)+_0xba45a2['id']+')'));_0xba45a2[_0x571e68(0x16d)]&&console['log']('\x20\x20'+a34_0x427111['dim'](_0xba45a2[_0x571e68(0x16d)]));if(_0xba45a2[_0x571e68(0x175)]&&_0xba45a2['tokens'][_0x571e68(0x13f)]>0x0)for(const _0x329b1a of _0xba45a2['tokens']){const _0x1817b6=_0x329b1a['allowedIps']?.[_0x571e68(0x13f)]?_0x329b1a[_0x571e68(0x184)]['join'](',\x20'):_0x571e68(0x22d);console['log']('\x20\x20'+a34_0x427111[_0x571e68(0x23f)](_0x571e68(0x160))+'\x20'+_0x329b1a[_0x571e68(0x205)]+'\x20'+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x14c)+_0x329b1a['id']+')')),console[_0x571e68(0x17c)](_0x571e68(0x10b)+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x2ae))+'\x20'+_0x1817b6);}else console[_0x571e68(0x17c)]('\x20\x20'+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x1da)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:service:create';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x1dd);async[a34_0xe3eda6(0x116)](_0x1152de){const _0x1f6fd7=a34_0xe3eda6,{options:_0x6851b8,args:_0x41b95f,tdx:_0x454fbf}=_0x1152de,_0x466260=_0x6851b8,_0x4c8e16=_0x41b95f[0x0],_0x2956ac=_0x41b95f[0x1]||_0x6851b8[_0x1f6fd7(0x119)];if(!_0x4c8e16)return console[_0x1f6fd7(0x113)](_0x1f6fd7(0x2b8)),console[_0x1f6fd7(0x113)](_0x1f6fd7(0x120)),console[_0x1f6fd7(0x113)](_0x1f6fd7(0x2f2)),0x1;if(!_0x2956ac)return showParentSegmentNotSetError(_0x1f6fd7(0x2a0)+_0x1f6fd7(0x2f2)),0x1;const _0x5969d3=await withSpinner(_0x1f6fd7(0x255)+_0x2956ac+_0x1f6fd7(0x217),()=>_0x454fbf[_0x1f6fd7(0x159)]['resolveParentId'](_0x2956ac),{'verbose':_0x6851b8[_0x1f6fd7(0x235)]}),_0x29378f=_0x5969d3['data'],_0x45c3e8={'name':_0x4c8e16,'description':_0x466260[_0x1f6fd7(0x16d)],'public':_0x466260[_0x1f6fd7(0x24c)]},_0x3c3cc9=await withSpinner(_0x1f6fd7(0x1dc)+_0x4c8e16+'\x27...',()=>_0x454fbf['personalization'][_0x1f6fd7(0x1f9)](_0x29378f,_0x45c3e8),{'verbose':_0x6851b8[_0x1f6fd7(0x235)]}),_0x5c1088=_0x3c3cc9[_0x1f6fd7(0x209)];return console[_0x1f6fd7(0x113)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x5c1088[_0x1f6fd7(0x205)]+'\x27\x20with\x20ID:\x20'+_0x5c1088['id']),await handleSDKOutput([_0x5c1088],_0x6851b8),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x29a);[a34_0xe3eda6(0x16d)]='Show\x20personalization\x20service\x20details';async[a34_0xe3eda6(0x116)](_0x5dd798){const _0x299254=a34_0xe3eda6,{options:_0x2d5d3c,args:_0x42a5b5,tdx:_0x51d88f}=_0x5dd798,_0x5bae75=_0x42a5b5[0x0],_0x5de407=_0x42a5b5[0x1]||_0x2d5d3c['parentSegment'];if(!_0x5bae75)return console['error'](_0x299254(0x162)),console[_0x299254(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x299254(0x113)](_0x299254(0x148)),0x1;if(!_0x5de407)return showParentSegmentNotSetError(_0x299254(0x232)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1b2190=await withSpinner(_0x299254(0x255)+_0x5de407+'\x27...',()=>_0x51d88f['segment'][_0x299254(0x267)](_0x5de407),{'verbose':_0x2d5d3c[_0x299254(0x235)]}),_0x5eb408=_0x1b2190[_0x299254(0x209)],_0x2f4b95=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x5bae75+_0x299254(0x217),()=>_0x51d88f[_0x299254(0x11d)][_0x299254(0x257)](_0x5eb408,_0x5bae75),{'verbose':_0x2d5d3c[_0x299254(0x235)]}),_0x1794e5=_0x2f4b95['data'];if(_0x2d5d3c['json']||_0x2d5d3c[_0x299254(0x131)])await handleSDKOutput([_0x1794e5],_0x2d5d3c);else{console[_0x299254(0x17c)](a34_0x427111[_0x299254(0x260)](_0x1794e5[_0x299254(0x205)])+'\x20'+a34_0x427111[_0x299254(0x18c)](_0x299254(0x14c)+_0x1794e5['id']+')'));_0x1794e5[_0x299254(0x16d)]&&console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111['dim'](_0x1794e5['description']));console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111[_0x299254(0x23f)](_0x299254(0x206))+'\x20'+(_0x1794e5[_0x299254(0x24c)]?_0x299254(0x15c):'no'));if(_0x1794e5[_0x299254(0x175)]&&_0x1794e5[_0x299254(0x175)]['length']>0x0)for(const _0x231126 of _0x1794e5[_0x299254(0x175)]){const _0x5696b3=_0x231126[_0x299254(0x184)]?.[_0x299254(0x13f)]?_0x231126['allowedIps'][_0x299254(0x14a)](',\x20'):'any';console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111[_0x299254(0x23f)]('token:')+'\x20'+_0x231126[_0x299254(0x205)]+'\x20'+a34_0x427111[_0x299254(0x18c)](_0x299254(0x14c)+_0x231126['id']+')')),console[_0x299254(0x17c)]('\x20\x20\x20\x20'+a34_0x427111[_0x299254(0x18c)](_0x299254(0x2ae))+'\x20'+_0x5696b3);}else console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111[_0x299254(0x18c)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x1e2);['description']=a34_0xe3eda6(0x229);async[a34_0xe3eda6(0x116)](_0x5621c9){const _0x2cbeaf=a34_0xe3eda6,{options:_0x25641d,args:_0x2e6fd2,tdx:_0x2b6dcb}=_0x5621c9,_0x39b5d7=_0x2e6fd2[0x0],_0x47d641=_0x2e6fd2[0x1]||_0x25641d[_0x2cbeaf(0x119)];if(!_0x39b5d7)return console['error']('Error:\x20Service\x20ID\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0x2cbeaf(0x113)](_0x2cbeaf(0x261)),0x1;if(!_0x47d641)return showParentSegmentNotSetError(_0x2cbeaf(0x2fd)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x39e1c6=await withSpinner(_0x2cbeaf(0x255)+_0x47d641+_0x2cbeaf(0x217),()=>_0x2b6dcb[_0x2cbeaf(0x159)][_0x2cbeaf(0x267)](_0x47d641),{'verbose':_0x25641d[_0x2cbeaf(0x235)]}),_0x2c4dad=_0x39e1c6['data'];return await withSpinner(_0x2cbeaf(0x1c2)+_0x39b5d7+_0x2cbeaf(0x217),()=>_0x2b6dcb[_0x2cbeaf(0x11d)][_0x2cbeaf(0x247)](_0x2c4dad,_0x39b5d7),{'verbose':_0x25641d['verbose']}),console[_0x2cbeaf(0x113)](_0x2cbeaf(0x102)+_0x39b5d7+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x143);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a34_0xe3eda6(0x116)](_0x47606e){const _0x346a4d=a34_0xe3eda6,{options:_0x5c2ad7,args:_0x4ac5a6,tdx:_0x45289d}=_0x47606e,_0x28dac1=_0x5c2ad7,_0x9bae12=_0x4ac5a6[0x0],_0x5ad1d1=_0x4ac5a6[0x1]||_0x5c2ad7[_0x346a4d(0x119)];if(!_0x9bae12)return console[_0x346a4d(0x113)](_0x346a4d(0x162)),console[_0x346a4d(0x113)](_0x346a4d(0x1b5)),console[_0x346a4d(0x113)](_0x346a4d(0x1cd)),0x1;if(!_0x28dac1[_0x346a4d(0x205)])return console[_0x346a4d(0x113)](_0x346a4d(0x1a9)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x5ad1d1)return showParentSegmentNotSetError(_0x346a4d(0x258)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x8ac946=await withSpinner(_0x346a4d(0x255)+_0x5ad1d1+_0x346a4d(0x217),()=>_0x45289d['segment'][_0x346a4d(0x267)](_0x5ad1d1),{'verbose':_0x5c2ad7['verbose']}),_0x2d3ab7=_0x8ac946['data'],_0x3686a4={'name':_0x28dac1[_0x346a4d(0x205)]};_0x28dac1[_0x346a4d(0x16d)]!==undefined&&(_0x3686a4['description']=_0x28dac1[_0x346a4d(0x16d)]);const _0x2858fc=await withSpinner('Updating\x20personalization\x20service\x20\x27'+_0x9bae12+'\x27...',()=>_0x45289d[_0x346a4d(0x11d)]['patch'](_0x2d3ab7,_0x9bae12,_0x3686a4),{'verbose':_0x5c2ad7[_0x346a4d(0x235)]}),_0x3601ef=_0x2858fc[_0x346a4d(0x209)];return console[_0x346a4d(0x113)](_0x346a4d(0x220)+_0x3601ef[_0x346a4d(0x205)]+'\x27'),await handleSDKOutput([_0x3601ef],_0x5c2ad7),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2fc);[a34_0xe3eda6(0x16d)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a34_0xe3eda6(0x116)](_0xd1760a){const _0x37d84e=a34_0xe3eda6,{options:_0x5b6db8,args:_0x145dcb,tdx:_0x29e4bf}=_0xd1760a,_0x311f23=_0x5b6db8,_0x4de745=_0x145dcb[0x0],_0x4f4eef=_0x145dcb[0x1],_0x1fd070=_0x145dcb[0x2]||_0x5b6db8[_0x37d84e(0x119)];if(!_0x4de745)return console['error'](_0x37d84e(0x2da)),console[_0x37d84e(0x113)](_0x37d84e(0x10e)),console['error'](_0x37d84e(0x251)),0x1;if(!_0x4f4eef)return console[_0x37d84e(0x113)](_0x37d84e(0x162)),console[_0x37d84e(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x37d84e(0x113)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x1fd070)return showParentSegmentNotSetError(_0x37d84e(0x16e)+_0x37d84e(0x251)),0x1;const _0x5196a0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1fd070+'\x27...',()=>_0x29e4bf['segment'][_0x37d84e(0x267)](_0x1fd070),{'verbose':_0x5b6db8['verbose']}),_0x20b3e7=_0x5196a0[_0x37d84e(0x209)],_0x29914f={'name':_0x4de745};_0x311f23['allowedIps']&&(_0x29914f[_0x37d84e(0x184)]=_0x311f23[_0x37d84e(0x184)][_0x37d84e(0x201)](',')[_0x37d84e(0x269)](_0x2415bf=>_0x2415bf[_0x37d84e(0x26d)]()));_0x311f23['description']&&(_0x29914f['description']=_0x311f23[_0x37d84e(0x16d)]);const _0x13bd5b=await withSpinner(_0x37d84e(0x1b8)+_0x4de745+_0x37d84e(0x23a)+_0x4f4eef+_0x37d84e(0x217),()=>_0x29e4bf[_0x37d84e(0x11d)][_0x37d84e(0x130)](_0x20b3e7,_0x4f4eef,_0x29914f),{'verbose':_0x5b6db8[_0x37d84e(0x235)]}),_0x3f9ddd=_0x13bd5b[_0x37d84e(0x209)];return console['error'](_0x37d84e(0x1d7)+_0x3f9ddd[_0x37d84e(0x205)]+'\x27\x20with\x20ID:\x20'+_0x3f9ddd['id']),_0x3f9ddd['value']&&(console[_0x37d84e(0x113)](a34_0x427111[_0x37d84e(0x1ce)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x37d84e(0x113)](a34_0x427111[_0x37d84e(0x23f)](_0x3f9ddd[_0x37d84e(0x107)])),console[_0x37d84e(0x113)]('')),await handleSDKOutput([_0x3f9ddd],_0x5b6db8),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{['name']=a34_0xe3eda6(0x1af);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x19a);async[a34_0xe3eda6(0x116)](_0x103975){const _0x5307f4=a34_0xe3eda6,{options:_0x2d6276,args:_0x352173,tdx:_0x71d2d8}=_0x103975,_0x1429ea=_0x352173[0x0],_0x104ec0=_0x352173[0x1]||_0x2d6276['parentSegment'];if(!_0x1429ea)return console['error'](_0x5307f4(0x2e6)),console[_0x5307f4(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x5307f4(0x113)](_0x5307f4(0x135)),0x1;if(!_0x104ec0)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x5307f4(0x135)),0x1;const _0xcc6c7=await withSpinner(_0x5307f4(0x255)+_0x104ec0+_0x5307f4(0x217),()=>_0x71d2d8[_0x5307f4(0x159)]['resolveParentId'](_0x104ec0),{'verbose':_0x2d6276[_0x5307f4(0x235)]}),_0x330a06=_0xcc6c7['data'],_0x43af43=await withSpinner(_0x5307f4(0x17e),()=>_0x71d2d8[_0x5307f4(0x11d)]['list'](_0x330a06),{'verbose':_0x2d6276[_0x5307f4(0x235)]}),_0x5a0ff9=_0x43af43['data'];let _0x21c9c6;for(const _0x3946b6 of _0x5a0ff9){if(_0x3946b6['tokens']?.[_0x5307f4(0x1b7)](_0x137863=>_0x137863['id']===_0x1429ea)){_0x21c9c6=_0x3946b6['id'];break;}}if(!_0x21c9c6)return console[_0x5307f4(0x113)](_0x5307f4(0x295)+_0x1429ea+_0x5307f4(0x121)),0x1;const _0x50ba82=await withSpinner(_0x5307f4(0x1d0)+_0x1429ea+_0x5307f4(0x217),()=>_0x71d2d8[_0x5307f4(0x11d)][_0x5307f4(0x132)](_0x330a06,_0x21c9c6,_0x1429ea),{'verbose':_0x2d6276[_0x5307f4(0x235)]}),_0xa111=_0x50ba82['data'];return console[_0x5307f4(0x113)](_0x5307f4(0x28d)+(_0xa111[_0x5307f4(0x205)]||_0x1429ea)+'\x27'),await handleSDKOutput([_0xa111],_0x2d6276),0x0;}}export class PSPzListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x25c);['description']=a34_0xe3eda6(0x2c1);async['execute'](_0x4a4693){const _0x16769a=a34_0xe3eda6,{options:_0x5a6e16,args:_0x4fdd68,tdx:_0xf9535b}=_0x4a4693,_0x5ee8b3=_0x4fdd68[0x0]||_0x5a6e16[_0x16769a(0x119)];if(!_0x5ee8b3)return showParentSegmentNotSetError('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'+_0x16769a(0x1ec)),0x1;const _0x1d108e=await withSpinner(_0x16769a(0x255)+_0x5ee8b3+_0x16769a(0x217),()=>_0xf9535b[_0x16769a(0x159)][_0x16769a(0x267)](_0x5ee8b3),{'verbose':_0x5a6e16[_0x16769a(0x235)]}),_0x2e06fe=_0x1d108e[_0x16769a(0x209)],_0x36c118=await withSpinner(_0x16769a(0x146)+_0x5ee8b3+_0x16769a(0x217),()=>_0xf9535b[_0x16769a(0x11d)]['listPersonalizations'](_0x2e06fe),{'verbose':_0x5a6e16['verbose']}),_0x57925c=_0x36c118[_0x16769a(0x209)];console[_0x16769a(0x113)](_0x16769a(0x21e)+_0x57925c['length']+_0x16769a(0x2bc)+(_0x57925c['length']!==0x1?'s':''));if(_0x5a6e16[_0x16769a(0x19d)]===_0x16769a(0x273)||_0x5a6e16[_0x16769a(0x19d)]==='jsonl')await handleSDKOutput(_0x57925c,_0x5a6e16);else{if(_0x57925c[_0x16769a(0x13f)]===0x0)console['log']('No\x20personalizations\x20configured');else for(const _0x41782c of _0x57925c){console[_0x16769a(0x17c)](a34_0x427111[_0x16769a(0x260)](_0x41782c[_0x16769a(0x205)])+'\x20'+a34_0x427111[_0x16769a(0x18c)](_0x16769a(0x14c)+_0x41782c['id']+')'));_0x41782c['description']&&console['log']('\x20\x20'+a34_0x427111[_0x16769a(0x18c)](_0x41782c[_0x16769a(0x16d)]));const _0x5477c4=_0x41782c[_0x16769a(0x2ad)]?.[_0x16769a(0x13f)]||0x0;console[_0x16769a(0x17c)]('\x20\x20'+a34_0x427111[_0x16769a(0x23f)](_0x16769a(0x2aa))+'\x20'+_0x5477c4);if(_0x41782c[_0x16769a(0x2ad)]&&_0x41782c[_0x16769a(0x2ad)]['length']>0x0)for(const _0xc78a08 of _0x41782c[_0x16769a(0x2ad)]){console[_0x16769a(0x17c)](_0x16769a(0x189)+_0xc78a08[_0x16769a(0x205)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:show';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x188);async[a34_0xe3eda6(0x116)](_0xd80a68){const _0x36aa2f=a34_0xe3eda6,{options:_0x36a785,args:_0x5d7871,tdx:_0x336fa3}=_0xd80a68,_0x1283de=_0x5d7871[0x0];if(!_0x1283de)return console['error'](_0x36aa2f(0x2b2)),console[_0x36aa2f(0x113)](_0x36aa2f(0x2d5)),0x1;const _0x2981f9=await withSpinner(_0x36aa2f(0x11e)+_0x1283de+_0x36aa2f(0x217),()=>_0x336fa3[_0x36aa2f(0x11d)][_0x36aa2f(0x2e8)](_0x1283de),{'verbose':_0x36a785[_0x36aa2f(0x235)]}),_0x4af6bc=_0x2981f9[_0x36aa2f(0x209)];console[_0x36aa2f(0x113)]('✔\x20Found\x20personalization\x20\x27'+_0x4af6bc[_0x36aa2f(0x205)]+'\x27');if(_0x36a785['format']===_0x36aa2f(0x273)||_0x36a785[_0x36aa2f(0x19d)]===_0x36aa2f(0x131))await handleSDKOutput([_0x4af6bc],_0x36a785);else{console[_0x36aa2f(0x17c)](a34_0x427111[_0x36aa2f(0x260)](_0x4af6bc['name'])+'\x20'+a34_0x427111[_0x36aa2f(0x18c)](_0x36aa2f(0x14c)+_0x4af6bc['id']+')'));_0x4af6bc[_0x36aa2f(0x16d)]&&console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x18c)](_0x4af6bc[_0x36aa2f(0x16d)]));_0x4af6bc[_0x36aa2f(0x13b)]&&console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x170))+'\x20'+_0x4af6bc[_0x36aa2f(0x13b)]);console['log']('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x1f5))+'\x20'+_0x4af6bc['createdAt']),console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x17a))+'\x20'+_0x4af6bc[_0x36aa2f(0x214)]);const _0x5f3c47=_0x4af6bc[_0x36aa2f(0x2ad)]?.[_0x36aa2f(0x13f)]||0x0;console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)]('sections:')+'\x20'+_0x5f3c47);if(_0x4af6bc[_0x36aa2f(0x2ad)]&&_0x4af6bc['sections'][_0x36aa2f(0x13f)]>0x0)for(const _0x514d6c of _0x4af6bc['sections']){console['log'](_0x36aa2f(0x10b)+a34_0x427111['bold'](_0x514d6c[_0x36aa2f(0x205)])+'\x20'+a34_0x427111[_0x36aa2f(0x18c)]('(id:\x20'+_0x514d6c['id']+')')),_0x514d6c[_0x36aa2f(0x11a)]&&(console[_0x36aa2f(0x17c)](_0x36aa2f(0x16f)+a34_0x427111[_0x36aa2f(0x23f)]('entryCriteria:')+'\x20'+_0x514d6c[_0x36aa2f(0x11a)][_0x36aa2f(0x205)]),_0x514d6c[_0x36aa2f(0x11a)][_0x36aa2f(0x1e1)]?.[_0x36aa2f(0x2a2)]&&console[_0x36aa2f(0x17c)](_0x36aa2f(0x2e1)+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x2b4))+'\x20'+_0x514d6c[_0x36aa2f(0x11a)][_0x36aa2f(0x1e1)][_0x36aa2f(0x2a2)])),_0x514d6c[_0x36aa2f(0x138)]&&console[_0x36aa2f(0x17c)](_0x36aa2f(0x16f)+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x256))+'\x20'+JSON[_0x36aa2f(0x2ef)](_0x514d6c[_0x36aa2f(0x138)])),_0x514d6c[_0x36aa2f(0x1c3)]&&console[_0x36aa2f(0x17c)](_0x36aa2f(0x16f)+a34_0x427111['cyan']('includeSensitive:')+_0x36aa2f(0x1df));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:delete';['description']=a34_0xe3eda6(0x1f6);async[a34_0xe3eda6(0x116)](_0x4904c3){const _0x4b8565=a34_0xe3eda6,{options:_0x52b003,args:_0x570b45,tdx:_0x141c90}=_0x4904c3,_0x17b463=_0x570b45[0x0];if(!_0x17b463)return console['error'](_0x4b8565(0x2b2)),console[_0x4b8565(0x113)](_0x4b8565(0x265)),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0x17b463+_0x4b8565(0x217),()=>_0x141c90['personalization'][_0x4b8565(0x156)](_0x17b463),{'verbose':_0x52b003[_0x4b8565(0x235)]}),console[_0x4b8565(0x113)](_0x4b8565(0x238)+_0x17b463+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:create';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x11f);async[a34_0xe3eda6(0x116)](_0x24f7af){const _0x4786b1=a34_0xe3eda6,{options:_0x4ab5d0,tdx:_0xd89b67}=_0x24f7af,_0x4b12ad=_0x4ab5d0;let _0x3b30e3;if(_0x4b12ad[_0x4786b1(0x1c4)]){_0x3b30e3=await loadJSON(_0x4b12ad['file'],!![]);if(!_0x3b30e3[_0x4786b1(0x2a6)]?.[_0x4786b1(0x2a1)])return console[_0x4786b1(0x113)](_0x4786b1(0x12e)),console[_0x4786b1(0x113)](_0x4786b1(0x193)),console[_0x4786b1(0x113)]('\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(!_0x4b12ad[_0x4786b1(0x205)])return console['error'](_0x4786b1(0x2f1)),console[_0x4786b1(0x113)](_0x4786b1(0x17b)),console['error'](_0x4786b1(0x187)),0x1;if(_0x4b12ad[_0x4786b1(0x16d)]===undefined)return console[_0x4786b1(0x113)](_0x4786b1(0x2b7)),console[_0x4786b1(0x113)](_0x4786b1(0x17b)),console[_0x4786b1(0x113)](_0x4786b1(0x187)),0x1;if(_0x4b12ad[_0x4786b1(0x1cf)]===undefined)return console[_0x4786b1(0x113)](_0x4786b1(0x270)),console[_0x4786b1(0x113)]('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x1052bb=_0x4b12ad[_0x4786b1(0x13b)];if(!_0x1052bb&&_0x4ab5d0[_0x4786b1(0x119)]){const _0x50acc4=await withSpinner(_0x4786b1(0x255)+_0x4ab5d0['parentSegment']+_0x4786b1(0x217),()=>_0xd89b67['segment'][_0x4786b1(0x267)](_0x4ab5d0[_0x4786b1(0x119)]),{'verbose':_0x4ab5d0[_0x4786b1(0x235)]});_0x1052bb=_0x50acc4['data'];}let _0x2f5096;_0x4b12ad[_0x4786b1(0x2ad)]&&(_0x2f5096=await loadJSON(_0x4b12ad[_0x4786b1(0x2ad)],![]));const _0x6c8f07=_0x4b12ad[_0x4786b1(0x1cf)]===_0x4786b1(0x2b6)?null:{'id':_0x4b12ad[_0x4786b1(0x1cf)],'type':_0x4786b1(0x286)};_0x3b30e3={'attributes':{'name':_0x4b12ad['name'],'description':_0x4b12ad[_0x4786b1(0x16d)]||null,..._0x1052bb!==undefined&&{'audienceId':_0x1052bb},..._0x2f5096!==undefined&&{'sections':_0x2f5096}},'relationships':{'parentFolder':{'data':_0x6c8f07}}};}const _0x14fcc6=await withSpinner(_0x4786b1(0x26c)+(_0x3b30e3[_0x4786b1(0x2ec)]?.[_0x4786b1(0x205)]??'')+_0x4786b1(0x217),()=>_0xd89b67[_0x4786b1(0x11d)]['createPersonalization'](_0x3b30e3),{'verbose':_0x4ab5d0[_0x4786b1(0x235)]}),_0x8a2ee0=_0x14fcc6[_0x4786b1(0x209)];return console[_0x4786b1(0x113)](_0x4786b1(0x2f4)+_0x8a2ee0[_0x4786b1(0x205)]+_0x4786b1(0x14d)+_0x8a2ee0['id']),await handleSDKOutput([_0x8a2ee0],_0x4ab5d0),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:patch';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x24d);async[a34_0xe3eda6(0x116)](_0x23e969){const _0x5f392f=a34_0xe3eda6,{options:_0x519a46,args:_0x4dbb83}=_0x23e969,_0x2f69f1=_0x519a46,_0x36d26b=_0x4dbb83[0x0];if(!_0x36d26b)return console[_0x5f392f(0x113)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x5f392f(0x113)](_0x5f392f(0x1b6)),console[_0x5f392f(0x113)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>'),0x1;let _0x2db3e6;if(_0x2f69f1[_0x5f392f(0x1c4)])_0x2db3e6=await loadJSON(_0x2f69f1[_0x5f392f(0x1c4)],!![]);else{if(!_0x2f69f1[_0x5f392f(0x205)])return console[_0x5f392f(0x113)](_0x5f392f(0x2f1)),console[_0x5f392f(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x2f69f1[_0x5f392f(0x16d)]===undefined)return console['error']('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x5f392f(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x1f7e9c;_0x2f69f1['sections']&&(_0x1f7e9c=await loadJSON(_0x2f69f1[_0x5f392f(0x2ad)],![])),_0x2db3e6={'attributes':{'name':_0x2f69f1[_0x5f392f(0x205)],'description':_0x2f69f1[_0x5f392f(0x16d)]||null,..._0x1f7e9c!==undefined&&{'sections':_0x1f7e9c}}};}const {tdx:_0x1abffb}=_0x23e969,_0x3d551e=await withSpinner(_0x5f392f(0x1f1)+_0x36d26b+_0x5f392f(0x217),()=>_0x1abffb[_0x5f392f(0x11d)]['patchPersonalization'](_0x36d26b,_0x2db3e6),{'verbose':_0x519a46[_0x5f392f(0x235)]}),_0x39bea4=_0x3d551e['data'];return console[_0x5f392f(0x113)](_0x5f392f(0x1ae)+_0x39bea4['name']+'\x27\x20(id:\x20'+_0x39bea4['id']+')'),await handleSDKOutput([_0x39bea4],_0x519a46),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2db);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x25d);async['execute'](_0x1e5351){const _0x4d382e=a34_0xe3eda6,{options:_0xe36990,args:_0x2b2f7c}=_0x1e5351,_0xe9d589=_0x2b2f7c[0x0]||_0xe36990['parentSegment'];if(!_0xe9d589)return showParentSegmentNotSetError(_0x4d382e(0x230)+_0x4d382e(0x196)),0x1;const _0x5273d9=resolveYamlFile(_0xe9d589);if(!existsSync(_0x5273d9))return showFileNotFoundError(_0x5273d9,_0xe9d589),0x1;let _0x1fa78d;try{_0x1fa78d=readFileSync(_0x5273d9,_0x4d382e(0x2e4));}catch(_0x410ae4){const _0xc94053=_0x410ae4 instanceof Error?_0x410ae4[_0x4d382e(0x23b)]:String(_0x410ae4);return console[_0x4d382e(0x113)]('Error\x20reading\x20file:\x20'+_0xc94053),0x1;}let _0x3b15f3;try{_0x3b15f3=parseDef(_0x1fa78d);}catch(_0x25eed8){const _0x1fbff7=_0x25eed8 instanceof Error?_0x25eed8['message']:String(_0x25eed8);return console[_0x4d382e(0x113)](a34_0x427111[_0x4d382e(0x129)]('Error\x20parsing\x20YAML:\x20'+_0x1fbff7)),0x1;}if(_0x3b15f3[_0x4d382e(0x1bd)]&&_0x3b15f3['personalization_services'][_0x4d382e(0x13f)]>0x0)return console['error'](a34_0x427111[_0x4d382e(0x1ce)]('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x5273d9)),console[_0x4d382e(0x113)](a34_0x427111['dim'](_0x4d382e(0x139)+_0x3b15f3[_0x4d382e(0x1bd)][_0x4d382e(0x13f)]+'\x20service(s)\x20configured')),0x1;!_0x3b15f3['realtime']&&(_0x3b15f3[_0x4d382e(0x2d6)]={'events':[{'name':_0x4d382e(0x20d),'source_table':_0x4d382e(0x288)}],'attributes':[{'name':_0x4d382e(0x1e6),'type':_0x4d382e(0x1f0)}],'id_stitching':{'primary_key':_0x3b15f3[_0x4d382e(0x2ff)]['table']===_0x4d382e(0x219)?_0x4d382e(0x23c):_0x4d382e(0x272)}});_0x3b15f3[_0x4d382e(0x1bd)]=[{'name':'My\x20Service','description':'Personalization\x20service\x20description','trigger_event':_0x4d382e(0x20d),'sections':[{'name':_0x4d382e(0x226),'criteria':_0x4d382e(0x27e),'attributes':[_0x4d382e(0x1e6)]}]}];const _0xfca570=serializeDef(_0x3b15f3);return writeFileSync(_0x5273d9,_0xfca570,_0x4d382e(0x2e4)),console[_0x4d382e(0x113)](a34_0x427111[_0x4d382e(0x276)]('✔')+_0x4d382e(0x298)+a34_0x427111[_0x4d382e(0x23f)](_0x5273d9)),(!_0x3b15f3['realtime']||_0x1fa78d['indexOf']('realtime:')===-0x1)&&console['error'](a34_0x427111[_0x4d382e(0x276)]('✔')+_0x4d382e(0x1ea)),console[_0x4d382e(0x113)]('\x0a'+a34_0x427111[_0x4d382e(0x18c)](_0x4d382e(0x125))),console[_0x4d382e(0x113)]('\x20\x201.\x20Edit\x20'+_0x5273d9+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x4d382e(0x113)](_0x4d382e(0x252)+a34_0x427111['dim'](_0x4d382e(0x124)+_0xe9d589)+'\x20to\x20push\x20the\x20configuration'),0x0;}}
|
|
1
|
+
const a34_0x2fb84d=a34_0xd65f;(function(_0x3685fe,_0x190e1c){const _0x5a73ab=a34_0xd65f,_0x4c5db3=_0x3685fe();while(!![]){try{const _0x4219cd=-parseInt(_0x5a73ab(0x21b))/0x1+parseInt(_0x5a73ab(0x36d))/0x2*(parseInt(_0x5a73ab(0x23c))/0x3)+parseInt(_0x5a73ab(0x28c))/0x4*(-parseInt(_0x5a73ab(0x21a))/0x5)+parseInt(_0x5a73ab(0x29b))/0x6*(-parseInt(_0x5a73ab(0x189))/0x7)+-parseInt(_0x5a73ab(0x31b))/0x8+-parseInt(_0x5a73ab(0x20c))/0x9+parseInt(_0x5a73ab(0x366))/0xa;if(_0x4219cd===_0x190e1c)break;else _0x4c5db3['push'](_0x4c5db3['shift']());}catch(_0x86a946){_0x4c5db3['push'](_0x4c5db3['shift']());}}}(a34_0x2634,0x5a545));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a34_0x53d68d from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a34_0x2463e0 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=a34_0x2fb84d(0x31e),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x25ea78){const _0x4d5cfa=a34_0x2fb84d,_0xc6ef5c=process[_0x4d5cfa(0x1d0)],_0xb21820=_0xc6ef5c===_0x4d5cfa(0x21f)?_0x4d5cfa(0x346):_0xc6ef5c==='win32'?_0x4d5cfa(0x2dc):_0x4d5cfa(0x336);spawn(_0xb21820,[_0x25ea78],{'detached':!![],'stdio':_0x4d5cfa(0x23b)})[_0x4d5cfa(0x37b)]();}function migrateLegacyDirectory(){const _0x1b6fe3=a34_0x2fb84d;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x13f8ff=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x13f8ff[_0x1b6fe3(0x2f5)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x1b6fe3(0x22f)](a34_0x2463e0[_0x1b6fe3(0x2c8)]('\x0a⚠️\x20\x20Both\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x1b6fe3(0x1e5)+PARENT_SEGMENT_DIR+_0x1b6fe3(0x1be))),console[_0x1b6fe3(0x22f)](a34_0x2463e0[_0x1b6fe3(0x241)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x1b6fe3(0x26e))),![];console[_0x1b6fe3(0x22f)](a34_0x2463e0[_0x1b6fe3(0x2c8)](_0x1b6fe3(0x2ca)+LEGACY_PARENT_SEGMENT_DIR+_0x1b6fe3(0x28f)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a34_0x2463e0[_0x1b6fe3(0x2f0)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x140dd7){const _0x3f2394=_0x140dd7 instanceof Error?_0x140dd7['message']:String(_0x140dd7);return console[_0x1b6fe3(0x22f)](a34_0x2463e0[_0x1b6fe3(0x1b1)](_0x1b6fe3(0x334)+_0x3f2394+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a34_0x2fb84d(0x24e)](_0x104092){const _0x4c3847=a34_0x2fb84d;return migrateLegacyDirectory(),super[_0x4c3847(0x24e)](_0x104092);}}function resolveYamlFile(_0x4fdd03){const _0x219abb=a34_0x2fb84d;if(_0x4fdd03[_0x219abb(0x300)](_0x219abb(0x324))||_0x4fdd03[_0x219abb(0x300)](_0x219abb(0x1b4)))return _0x4fdd03;return a34_0x53d68d[_0x219abb(0x31f)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x4fdd03)+_0x219abb(0x324));}function formatProgressMessage(_0x2ddbd6){const _0x2bebbb=a34_0x2fb84d,_0x2fd436=_0x2ddbd6[_0x2bebbb(0x236)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2fd436){const [,_0x3a3d84,_0x133daa,_0x145bd7='']=_0x2fd436;return a34_0x2463e0['dim'](_0x3a3d84+':')+'\x20'+_0x133daa+a34_0x2463e0[_0x2bebbb(0x241)](_0x145bd7);}return a34_0x2463e0['dim'](_0x2ddbd6);}function showFileNotFoundError(_0x105f4e,_0x49d729){const _0x584519=a34_0x2fb84d;console[_0x584519(0x22f)](a34_0x2463e0[_0x584519(0x1b1)](_0x584519(0x250)+_0x105f4e+'\x0a')),console[_0x584519(0x22f)](a34_0x2463e0[_0x584519(0x2ea)](_0x584519(0x25b)+_0x49d729+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x524333){const _0xcea265=a34_0x2fb84d;if(!_0x524333[_0xcea265(0x1e4)])return;const _0x4d755e=_0x524333[_0xcea265(0x1e4)],_0x4c1a1d=_0x4d755e[_0xcea265(0x2e1)]?a34_0x2463e0[_0xcea265(0x2f0)](_0xcea265(0x333)):a34_0x2463e0[_0xcea265(0x2c8)](_0xcea265(0x39c));console[_0xcea265(0x22f)]('\x0a'+a34_0x2463e0[_0xcea265(0x241)]('RT\x202.0:')+'\x20'+_0x4c1a1d);if(_0x4d755e[_0xcea265(0x265)]&&_0x4d755e[_0xcea265(0x265)][_0xcea265(0x2e8)]>0x0){console[_0xcea265(0x22f)]('\x20\x20'+a34_0x2463e0[_0xcea265(0x241)]('Events:')+'\x20'+_0x4d755e[_0xcea265(0x265)][_0xcea265(0x2e8)]+_0xcea265(0x392));for(const _0x48df2e of _0x4d755e[_0xcea265(0x265)]){const _0x312aed=_0x48df2e[_0xcea265(0x1ea)]===![]?a34_0x2463e0[_0xcea265(0x1b1)]('✘'):a34_0x2463e0[_0xcea265(0x2f0)]('✔');console[_0xcea265(0x22f)](_0xcea265(0x20f)+_0x312aed+'\x20'+_0x48df2e[_0xcea265(0x323)]),_0x48df2e['sourceTableError']&&console['error'](_0xcea265(0x2c6)+a34_0x2463e0[_0xcea265(0x1b1)](_0x48df2e[_0xcea265(0x2a7)]));}}if(_0x4d755e[_0xcea265(0x205)]&&_0x4d755e['attributes'][_0xcea265(0x2e8)]>0x0){console[_0xcea265(0x22f)]('\x20\x20'+a34_0x2463e0['dim']('Attributes:')+'\x20'+_0x4d755e[_0xcea265(0x205)][_0xcea265(0x2e8)]+_0xcea265(0x392));for(const _0x546700 of _0x4d755e[_0xcea265(0x205)]){const _0x4ad9a7=_0x546700[_0xcea265(0x387)]?a34_0x2463e0[_0xcea265(0x2f0)]('✔'):a34_0x2463e0[_0xcea265(0x1b1)]('✘');console[_0xcea265(0x22f)]('\x20\x20\x20\x20'+_0x4ad9a7+'\x20'+_0x546700[_0xcea265(0x323)]+'\x20'+a34_0x2463e0['dim']('('+_0x546700[_0xcea265(0x3a3)]+')'));}}if(_0x4d755e[_0xcea265(0x37a)]){const _0x29f854=_0x4d755e[_0xcea265(0x37a)][_0xcea265(0x32c)]?.[_0xcea265(0x2e8)]?_0xcea265(0x2bb)+_0x4d755e['idStitching'][_0xcea265(0x32c)]['join'](',\x20')+']':'';console[_0xcea265(0x22f)]('\x20\x20'+a34_0x2463e0[_0xcea265(0x241)](_0xcea265(0x221))+'\x20'+_0x4d755e['idStitching'][_0xcea265(0x29c)]+_0x29f854);}if(_0x4d755e[_0xcea265(0x317)]&&_0x4d755e[_0xcea265(0x317)][_0xcea265(0x2e8)]>0x0){console[_0xcea265(0x22f)]('\x20\x20'+a34_0x2463e0[_0xcea265(0x241)]('Personalization:')+'\x20'+_0x4d755e['personalizationServices'][_0xcea265(0x2e8)]+_0xcea265(0x1d5)+(_0x4d755e[_0xcea265(0x317)][_0xcea265(0x2e8)]!==0x1?'s':''));for(const _0x4610df of _0x4d755e['personalizationServices']){console[_0xcea265(0x22f)](_0xcea265(0x2ee)+_0x4610df[_0xcea265(0x323)]);}}}function showParentSegmentNotSetError(_0x264bb2){const _0x3a000f=a34_0x2fb84d;console[_0x3a000f(0x22f)](a34_0x2463e0['yellow']('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x3a000f(0x22f)](_0x264bb2);}export class ParentSegmentListCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x1ae);[a34_0x2fb84d(0x34e)]='List\x20parent\x20segments';async[a34_0x2fb84d(0x209)](_0x584f84){const _0x4c09c6=a34_0x2fb84d,{options:_0x4b7fcb,args:_0x25b7b1,tdx:_0x191b08}=_0x584f84,_0x3981d6=_0x25b7b1[0x0];_0x4b7fcb[_0x4c09c6(0x36f)]&&(console[_0x4c09c6(0x22f)](_0x4c09c6(0x301)+_0x4b7fcb[_0x4c09c6(0x1a1)]),_0x3981d6&&console[_0x4c09c6(0x22f)](_0x4c09c6(0x271)+_0x3981d6));const _0x40d96f=await withSpinner(_0x3981d6?_0x4c09c6(0x266)+_0x3981d6+_0x4c09c6(0x246):_0x4c09c6(0x2c3),()=>_0x191b08[_0x4c09c6(0x372)]['listParents'](),{'verbose':_0x4b7fcb[_0x4c09c6(0x36f)]});let _0x5f34bc=_0x40d96f[_0x4c09c6(0x24f)];if(_0x3981d6){const _0x4d2781=_0x3981d6[_0x4c09c6(0x2aa)](/[.+^${}()|[\]\\]/g,_0x4c09c6(0x2f3))[_0x4c09c6(0x2aa)](/\*/g,'.*')[_0x4c09c6(0x2aa)](/\?/g,'.'),_0x345555=new RegExp('^'+_0x4d2781+'$','i');_0x5f34bc=_0x5f34bc[_0x4c09c6(0x2f4)](_0xb56b52=>_0x345555[_0x4c09c6(0x385)](_0xb56b52[_0x4c09c6(0x205)][_0x4c09c6(0x323)]));}_0x5f34bc['sort']((_0x42ee44,_0x155f76)=>_0x42ee44[_0x4c09c6(0x205)]['name'][_0x4c09c6(0x2bc)](_0x155f76[_0x4c09c6(0x205)][_0x4c09c6(0x323)])),console[_0x4c09c6(0x22f)](_0x4c09c6(0x2d2)+_0x5f34bc[_0x4c09c6(0x2e8)]+'\x20parent\x20segment'+(_0x5f34bc['length']!==0x1?'s':''));const _0x22468f=_0x53fdb6=>{const _0x3e5d50=_0x4c09c6;return getConsoleNextUrl(_0x4b7fcb['site'],_0x3e5d50(0x394)+_0x53fdb6);};if(_0x4b7fcb[_0x4c09c6(0x249)]===_0x4c09c6(0x288)||_0x4b7fcb[_0x4c09c6(0x249)]==='jsonl'){const _0x398a62=_0x5f34bc['map'](_0x4edfc3=>({..._0x4edfc3,'url':_0x22468f(_0x4edfc3['id'])}));await handleSDKOutput(_0x398a62,_0x4b7fcb);}else{if(_0x5f34bc[_0x4c09c6(0x2e8)]===0x0)_0x3981d6?console[_0x4c09c6(0x2a3)](_0x4c09c6(0x291)+_0x3981d6):console[_0x4c09c6(0x2a3)](_0x4c09c6(0x2d7));else for(const _0xdef1a5 of _0x5f34bc){const _0x55ff77=_0xdef1a5['attributes'][_0x4c09c6(0x304)]?a34_0x2463e0[_0x4c09c6(0x241)]('\x20('+formatRows(_0xdef1a5['attributes']['population'])+')'):'',_0x33c2b7=hyperlink(_0xdef1a5[_0x4c09c6(0x205)][_0x4c09c6(0x323)],_0x22468f(_0xdef1a5['id']));console['log'](_0x4c09c6(0x39e)+_0x33c2b7+_0x55ff77);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a34_0x2fb84d(0x2d1);['description']='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a34_0x2fb84d(0x209)](_0x27fde2){const _0x52eb62=a34_0x2fb84d,{options:_0x521459,args:_0x3a4926,tdx:_0x2c1040}=_0x27fde2;console['error'](_0x52eb62(0x235)+_0x52eb62(0x393)+_0x52eb62(0x1eb));const _0x554bf0=_0x521459;if(_0x3a4926['length']===0x0)return console[_0x52eb62(0x22f)](a34_0x2463e0[_0x52eb62(0x1b1)](_0x52eb62(0x2b3))),console['error']('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x5eede4=_0x3a4926[0x0];if(!_0x554bf0[_0x52eb62(0x2a4)]||!_0x554bf0[_0x52eb62(0x30f)])return console[_0x52eb62(0x22f)](_0x52eb62(0x1a3)),console[_0x52eb62(0x22f)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x554bf0['verbose']&&(console['error'](_0x52eb62(0x301)+_0x554bf0[_0x52eb62(0x1a1)]),console[_0x52eb62(0x22f)](_0x52eb62(0x254)+_0x5eede4),console[_0x52eb62(0x22f)](_0x52eb62(0x38c)+_0x554bf0['database']),console[_0x52eb62(0x22f)]('Table:\x20'+_0x554bf0[_0x52eb62(0x30f)]));const _0x120f1f=await loadJSONFromOptions(_0x554bf0[_0x52eb62(0x205)],_0x554bf0['attributesFile']),_0x3f9f63=await loadJSONFromOptions(_0x554bf0['behaviors'],_0x554bf0['behaviorsFile']),_0xd3ce22=await loadJSONFromOptions(_0x554bf0[_0x52eb62(0x1f9)],_0x554bf0[_0x52eb62(0x26d)]),_0x335b13={'name':_0x5eede4,'description':_0x554bf0[_0x52eb62(0x34e)],'scheduleType':_0x554bf0[_0x52eb62(0x252)],'scheduleOption':_0x554bf0[_0x52eb62(0x232)],'timezone':_0x554bf0[_0x52eb62(0x2c0)],'master':{'parentDatabaseName':_0x554bf0[_0x52eb62(0x2a4)],'parentTableName':_0x554bf0[_0x52eb62(0x30f)]},'attributes':_0x120f1f,'behaviors':_0x3f9f63,'customerGroup':_0xd3ce22},_0x449f4e=await withSpinner(_0x52eb62(0x327)+_0x5eede4+_0x52eb62(0x246),()=>_0x2c1040['segment'][_0x52eb62(0x260)](_0x335b13),{'verbose':_0x521459[_0x52eb62(0x36f)]}),_0x51158f=_0x449f4e[_0x52eb62(0x24f)];return console[_0x52eb62(0x22f)](_0x52eb62(0x244)+_0x51158f['name']+_0x52eb62(0x270)+_0x51158f['id']),await handleSDKOutput([_0x51158f],_0x521459),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a34_0x2fb84d(0x397);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x238);async[a34_0x2fb84d(0x209)](_0x2f091e){const _0x53214b=a34_0x2fb84d,{options:_0x4cffbd,args:_0x459170,tdx:_0x3940b6}=_0x2f091e;console[_0x53214b(0x22f)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x53214b(0x393)+_0x53214b(0x1eb));const _0x1776db=_0x4cffbd;if(_0x459170[_0x53214b(0x2e8)]===0x0)return console['error'](a34_0x2463e0[_0x53214b(0x1b1)](_0x53214b(0x2b3))),console['error'](_0x53214b(0x1f1)),0x1;const _0x448421=_0x459170[0x0];_0x1776db[_0x53214b(0x36f)]&&(console['error'](_0x53214b(0x301)+_0x1776db[_0x53214b(0x1a1)]),console['error'](_0x53214b(0x287)+_0x448421));const _0x40d03f=await withSpinner(_0x53214b(0x32b)+_0x448421+_0x53214b(0x246),()=>_0x3940b6['segment'][_0x53214b(0x2f9)](_0x448421),{'verbose':_0x1776db[_0x53214b(0x36f)]}),_0x398153=_0x40d03f[_0x53214b(0x24f)],_0xa5c39f=await loadJSONFromOptions(_0x1776db[_0x53214b(0x293)],_0x1776db[_0x53214b(0x26f)]),_0x59b169=await loadJSONFromOptions(_0x1776db['addBehaviors'],_0x1776db['addBehaviorsFile']),_0xd54fcf={'name':_0x398153[_0x53214b(0x323)],'description':_0x1776db[_0x53214b(0x34e)]!==undefined?_0x1776db['description']:_0x398153[_0x53214b(0x34e)],'scheduleType':_0x1776db[_0x53214b(0x252)]!==undefined?_0x1776db[_0x53214b(0x252)]:_0x398153[_0x53214b(0x252)],'scheduleOption':_0x1776db[_0x53214b(0x232)]!==undefined?_0x1776db[_0x53214b(0x232)]:_0x398153['scheduleOption'],'timezone':_0x1776db[_0x53214b(0x2c0)]!==undefined?_0x1776db[_0x53214b(0x2c0)]:_0x398153[_0x53214b(0x2c0)],'master':_0x398153[_0x53214b(0x28e)],'attributes':_0xa5c39f?[..._0x398153[_0x53214b(0x205)]||[],..._0xa5c39f]:_0x398153[_0x53214b(0x205)],'behaviors':_0x59b169?[..._0x398153['behaviors']||[],..._0x59b169]:_0x398153['behaviors'],'customerGroup':_0x398153[_0x53214b(0x1f9)]},_0x1ff501=await withSpinner(_0x53214b(0x351)+_0x448421+_0x53214b(0x246),()=>_0x3940b6['segment']['updateParent'](_0x448421,_0xd54fcf),{'verbose':_0x1776db[_0x53214b(0x36f)]}),_0x5db822=_0x1ff501[_0x53214b(0x24f)];return console['error']('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x5db822[_0x53214b(0x323)]+'\x27'),await handleSDKOutput([_0x5db822],_0x1776db),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x303);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x1a8);async[a34_0x2fb84d(0x209)](_0x57c60a){const _0x2b3097=a34_0x2fb84d,{options:_0x17b5db,args:_0x16ddb5,tdx:_0x5ee6e4}=_0x57c60a,_0x57dc37=_0x17b5db,_0x20d896=_0x16ddb5[0x0]||_0x17b5db[_0x2b3097(0x2cb)];if(!_0x20d896)return showParentSegmentNotSetError(_0x2b3097(0x369)+_0x2b3097(0x2f6)),0x1;if(_0x57dc37[_0x2b3097(0x2c5)]&&_0x57dc37[_0x2b3097(0x1ee)])return console['error'](a34_0x2463e0['red'](_0x2b3097(0x1c7))),console[_0x2b3097(0x22f)](a34_0x2463e0[_0x2b3097(0x241)]('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console[_0x2b3097(0x22f)](a34_0x2463e0[_0x2b3097(0x241)](_0x2b3097(0x1bb)+PARENT_SEGMENT_DIR+_0x2b3097(0x1ca))),console[_0x2b3097(0x22f)](a34_0x2463e0[_0x2b3097(0x2ea)](_0x2b3097(0x2c4))),0x1;const _0x3998ac=_0x57dc37['output']||a34_0x53d68d[_0x2b3097(0x31f)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x20d896)+_0x2b3097(0x324));_0x57dc37[_0x2b3097(0x36f)]&&(console[_0x2b3097(0x22f)]('Site:\x20'+_0x57dc37[_0x2b3097(0x1a1)]),console[_0x2b3097(0x22f)](_0x2b3097(0x287)+_0x20d896),console[_0x2b3097(0x22f)]('Output\x20file:\x20'+_0x3998ac));const _0x1afea1=await withSpinner(_0x2b3097(0x33a)+_0x20d896+_0x2b3097(0x246),()=>_0x5ee6e4[_0x2b3097(0x372)][_0x2b3097(0x237)](_0x20d896),{'verbose':_0x57dc37['verbose']}),_0x1b8465=_0x1afea1['data'];if(existsSync(_0x3998ac)){const _0x5bd2fe=readFileSync(_0x3998ac,_0x2b3097(0x353)),_0x474aff=generateDiff(_0x5bd2fe,_0x1b8465);if(!hasChanges(_0x474aff))console[_0x2b3097(0x22f)](a34_0x2463e0['green']('✔')+_0x2b3097(0x285)+a34_0x2463e0['cyan'](_0x3998ac)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x2b3097(0x22f)](_0x2b3097(0x2df)+_0x3998ac+'\x27:'),console[_0x2b3097(0x22f)]('─'['repeat'](0x3c)),console[_0x2b3097(0x22f)](formatDiffWithColors(_0x474aff)),console[_0x2b3097(0x22f)]('─'[_0x2b3097(0x195)](0x3c));if(!_0x57dc37[_0x2b3097(0x38d)]){if(!isInteractive())return console['error'](a34_0x2463e0['red'](_0x2b3097(0x338)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2b3097(0x22f)](a34_0x2463e0[_0x2b3097(0x241)](_0x2b3097(0x214))),0x1;const _0x344d89=await confirmKey(_0x2b3097(0x2cd)+_0x3998ac+'\x27?');if(!_0x344d89)return console[_0x2b3097(0x22f)](a34_0x2463e0[_0x2b3097(0x2c8)](_0x2b3097(0x2db))),0x1;}writeFileSync(_0x3998ac,_0x1b8465,_0x2b3097(0x353)),console['error'](a34_0x2463e0[_0x2b3097(0x2f0)]('✔')+_0x2b3097(0x1cc)+a34_0x2463e0['cyan'](_0x3998ac));}}else{const _0x379fd6=a34_0x53d68d['dirname'](_0x3998ac);!existsSync(_0x379fd6)&&mkdirSync(_0x379fd6,{'recursive':!![]}),writeFileSync(_0x3998ac,_0x1b8465,_0x2b3097(0x353)),console['error'](a34_0x2463e0['green']('✔')+_0x2b3097(0x1cc)+a34_0x2463e0[_0x2b3097(0x2ea)](_0x3998ac));}return saveSessionContext({'parent_segment':_0x20d896},_0x57dc37[_0x2b3097(0x203)]),console[_0x2b3097(0x22f)](a34_0x2463e0[_0x2b3097(0x2f0)]('✔')+_0x2b3097(0x1e7)+a34_0x2463e0[_0x2b3097(0x241)]('parent_segment')+_0x2b3097(0x357)+a34_0x2463e0[_0x2b3097(0x2ea)](_0x20d896)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a34_0x2fb84d(0x323)]='segment:parent:push';[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x2de);async['execute'](_0x512948){const _0xac9d6=a34_0x2fb84d,{options:_0x33f229,args:_0x583b68,tdx:_0x3aa239}=_0x512948,_0x33801c=_0x33f229,_0x111484=_0x583b68[0x0]||_0x33f229[_0xac9d6(0x2cb)];if(!_0x111484)return showParentSegmentNotSetError(_0xac9d6(0x1d2)+_0xac9d6(0x289)),0x1;const _0x15e28d=resolveYamlFile(_0x111484);if(!existsSync(_0x15e28d))return showFileNotFoundError(_0x15e28d,_0x111484),0x1;_0x33801c[_0xac9d6(0x36f)]&&(console[_0xac9d6(0x22f)]('Site:\x20'+_0x33801c['site']),console[_0xac9d6(0x22f)](_0xac9d6(0x213)+_0x15e28d));let _0xbc2a4f;try{_0xbc2a4f=readFileSync(_0x15e28d,_0xac9d6(0x353));}catch(_0x5bcb26){const _0x3ef0f4=_0x5bcb26 instanceof Error?_0x5bcb26[_0xac9d6(0x299)]:String(_0x5bcb26);return console[_0xac9d6(0x22f)](_0xac9d6(0x2b5)+_0x3ef0f4),0x1;}const _0x3a6296=await withSpinner(_0xac9d6(0x1db),()=>_0x3aa239[_0xac9d6(0x372)][_0xac9d6(0x28a)](_0xbc2a4f),{'verbose':_0x33801c['verbose']}),_0x3bd604=_0x3a6296['data'],{isNew:_0x59ac56,name:_0x18be75,hasChanges:_0x2444ec,diffFormatted:_0x23ae69}=_0x3bd604;if(!_0x2444ec)return console[_0xac9d6(0x22f)](_0xac9d6(0x295)+_0x18be75+_0xac9d6(0x19f)),0x0;_0x59ac56?console['error'](_0xac9d6(0x1c9)+_0x18be75+'\x27:'):console[_0xac9d6(0x22f)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x18be75+'\x27:');console['error']('─'['repeat'](0x3c)),console['error'](_0x23ae69),console[_0xac9d6(0x22f)]('─'[_0xac9d6(0x195)](0x3c));const _0x3a9f97=_0x59ac56?'Create\x20parent\x20segment\x20\x27'+_0x18be75+'\x27?':_0xac9d6(0x1fd)+_0x18be75+'\x27?';if(!_0x33801c['yes']){if(!isInteractive())return console[_0xac9d6(0x22f)](a34_0x2463e0[_0xac9d6(0x1b1)]('\x0aError:'),_0xac9d6(0x2be)),console['error'](a34_0x2463e0['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2a19a5=await confirmKey(_0x3a9f97);if(!_0x2a19a5)return console[_0xac9d6(0x22f)](a34_0x2463e0[_0xac9d6(0x2c8)](_0xac9d6(0x2db))),0x1;}const _0x355efd=_0x59ac56?_0xac9d6(0x36e):_0xac9d6(0x2d9),_0x1a79b9=await withSpinner(_0x355efd+_0xac9d6(0x2eb)+_0x18be75+_0xac9d6(0x246),()=>_0x3bd604[_0xac9d6(0x1ce)](),{'verbose':_0x33801c['verbose']}),_0x574a82=_0x1a79b9['data'],_0x19946a=getConsoleNextUrl(_0x33801c[_0xac9d6(0x1a1)],_0xac9d6(0x394)+_0x574a82['id']),_0x5b45c4=_0x59ac56?'Created':'Updated';return console[_0xac9d6(0x22f)]('✔\x20'+_0x5b45c4+_0xac9d6(0x2eb)+_0x574a82[_0xac9d6(0x323)]+'\x27'),console[_0xac9d6(0x22f)]('\x20\x20'+_0x19946a),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x2a5);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x24d);async[a34_0x2fb84d(0x209)](_0x7f0642){const _0x3e3a6a=a34_0x2fb84d,{options:_0x4ba5ec,args:_0x1bfd9a,tdx:_0x5a03fe}=_0x7f0642,_0x547d72=_0x4ba5ec,_0x115472=_0x1bfd9a[0x0]||_0x4ba5ec[_0x3e3a6a(0x2cb)];if(!_0x115472)return showParentSegmentNotSetError(_0x3e3a6a(0x364)+_0x3e3a6a(0x1e3)+_0x3e3a6a(0x27d)+_0x3e3a6a(0x2a8)+_0x3e3a6a(0x18b)+_0x3e3a6a(0x2bf)),0x1;const _0x39dd9d=resolveYamlFile(_0x115472);if(!existsSync(_0x39dd9d))return showFileNotFoundError(_0x39dd9d,_0x115472),0x1;_0x547d72[_0x3e3a6a(0x36f)]&&(console[_0x3e3a6a(0x22f)](_0x3e3a6a(0x301)+_0x547d72[_0x3e3a6a(0x1a1)]),console[_0x3e3a6a(0x22f)](_0x3e3a6a(0x213)+_0x39dd9d));let _0x30ebe7;try{_0x30ebe7=readFileSync(_0x39dd9d,'utf-8');}catch(_0x5e2e3f){const _0x464263=_0x5e2e3f instanceof Error?_0x5e2e3f['message']:String(_0x5e2e3f);return console['error']('Error\x20reading\x20file:\x20'+_0x464263),0x1;}const _0x36f33a=createCommandSpinner(a34_0x2463e0['dim'](_0x3e3a6a(0x396)),{'verbose':_0x547d72[_0x3e3a6a(0x36f)]});_0x36f33a['start']();const _0xa3eaaa={'onProgress':_0x5db835=>{const _0x258c06=_0x3e3a6a;_0x36f33a[_0x258c06(0x1ed)]=formatProgressMessage(_0x5db835);}};if(_0x547d72[_0x3e3a6a(0x28e)])_0xa3eaaa['master']=!![];if(_0x547d72[_0x3e3a6a(0x37f)])_0xa3eaaa[_0x3e3a6a(0x37f)]=!![];_0x547d72[_0x3e3a6a(0x25a)]&&(_0xa3eaaa[_0x3e3a6a(0x25a)]=_0x547d72[_0x3e3a6a(0x25a)]);_0x547d72['behavior']&&(_0xa3eaaa['behavior']=_0x547d72[_0x3e3a6a(0x330)]);if(_0x547d72[_0x3e3a6a(0x199)])_0xa3eaaa[_0x3e3a6a(0x199)]=_0x547d72[_0x3e3a6a(0x199)];let _0x4f51be;try{_0x4f51be=await _0x5a03fe[_0x3e3a6a(0x372)][_0x3e3a6a(0x1a2)](_0x30ebe7,_0xa3eaaa),_0x36f33a[_0x3e3a6a(0x257)]();}catch(_0x40ffa8){_0x36f33a[_0x3e3a6a(0x257)]();throw _0x40ffa8;}const _0xd9e1ee=_0x547d72[_0x3e3a6a(0x199)]||_0x3e3a6a(0x340);return this[_0x3e3a6a(0x220)](_0x4f51be,_0xa3eaaa,_0x39dd9d,_0xd9e1ee),_0x4f51be[_0x3e3a6a(0x240)]?0x0:0x1;}['displayValidateResults'](_0x47c55a,_0x235e46,_0x3c09be,_0x36a182){const _0x37c9c8=a34_0x2fb84d;console[_0x37c9c8(0x22f)]('\x0a'+a34_0x2463e0['bold'](_0x37c9c8(0x377))+'\x20'+_0x47c55a[_0x37c9c8(0x323)]),console[_0x37c9c8(0x22f)]('═'[_0x37c9c8(0x195)](0x3c)),this['displayMasterInfo'](_0x47c55a);if(typeof _0x235e46[_0x37c9c8(0x25a)]===_0x37c9c8(0x30b)){this['displayAttributesStats'](_0x47c55a),this['displaySummary'](_0x47c55a),this['displayPreviewHints'](_0x3c09be,_0x36a182,'attribute',_0x235e46['attribute']);return;}if(_0x235e46['attribute']===!![]){this['displayAttributesStats'](_0x47c55a),this[_0x37c9c8(0x1c5)](_0x47c55a),this[_0x37c9c8(0x370)](_0x3c09be,_0x36a182,_0x37c9c8(0x205));return;}if(typeof _0x235e46[_0x37c9c8(0x330)]===_0x37c9c8(0x30b)){this['displayBehaviorsStats'](_0x47c55a,_0x36a182),this[_0x37c9c8(0x1c5)](_0x47c55a),this[_0x37c9c8(0x370)](_0x3c09be,_0x36a182,'behavior',_0x235e46[_0x37c9c8(0x330)]);return;}if(_0x235e46[_0x37c9c8(0x330)]===!![]){this[_0x37c9c8(0x193)](_0x47c55a,_0x36a182),this['displaySummary'](_0x47c55a),this[_0x37c9c8(0x370)](_0x3c09be,_0x36a182,_0x37c9c8(0x188));return;}this[_0x37c9c8(0x322)](_0x47c55a),this['displayBehaviorsStats'](_0x47c55a,_0x36a182),this[_0x37c9c8(0x371)](_0x47c55a),this['displaySummary'](_0x47c55a),this[_0x37c9c8(0x370)](_0x3c09be,_0x36a182,'all');}['displayRealtimeInfo'](_0x596759){displayRealtimeValidation(_0x596759);}['displayPreviewHints'](_0x234a21,_0x26a37d,_0x4c8837,_0x2093f1){const _0xa11836=a34_0x2fb84d;console[_0xa11836(0x22f)]('\x0a'+a34_0x2463e0['dim'](_0xa11836(0x2f1)));const _0x502acc=_0x26a37d!==_0xa11836(0x340)?_0xa11836(0x390)+_0x26a37d:'';if(_0x4c8837==='attribute'&&_0x2093f1)console[_0xa11836(0x22f)]('\x20\x20'+a34_0x2463e0[_0xa11836(0x241)]('tdx\x20ps\x20preview\x20'+_0x234a21+_0xa11836(0x263)+_0x2093f1+'\x22'+_0x502acc));else{if(_0x4c8837==='behavior'&&_0x2093f1)console[_0xa11836(0x22f)]('\x20\x20'+a34_0x2463e0[_0xa11836(0x241)](_0xa11836(0x35d)+_0x234a21+'\x20--behavior\x20\x22'+_0x2093f1+'\x22'+_0x502acc));else(_0x4c8837==='attributes'||_0x4c8837==='all')&&console[_0xa11836(0x22f)]('\x20\x20'+a34_0x2463e0['dim'](_0xa11836(0x35d)+_0x234a21+_0xa11836(0x325)+_0x502acc));}(_0x4c8837===_0xa11836(0x188)||_0x4c8837===_0xa11836(0x368))&&console[_0xa11836(0x22f)]('\x20\x20'+a34_0x2463e0[_0xa11836(0x241)](_0xa11836(0x35d)+_0x234a21+_0xa11836(0x29e)+_0x502acc)),_0x4c8837==='all'&&console['error']('\x20\x20'+a34_0x2463e0['dim'](_0xa11836(0x35d)+_0x234a21+'\x20--enriched'+_0x502acc));}[a34_0x2fb84d(0x279)](_0x3f4d9b){const _0x13d6b5=a34_0x2fb84d,{master:_0x31531f}=_0x3f4d9b,_0x368ad0=_0x31531f[_0x13d6b5(0x33f)]?a34_0x2463e0[_0x13d6b5(0x2f0)]('✔'):a34_0x2463e0['red']('✘');console['error']('\x0a'+a34_0x2463e0[_0x13d6b5(0x241)]('Master\x20Table')),console['error'](_0x368ad0+'\x20'+a34_0x2463e0[_0x13d6b5(0x376)](_0x31531f[_0x13d6b5(0x2a4)]+'.'+_0x31531f[_0x13d6b5(0x30f)])),_0x31531f[_0x13d6b5(0x33f)]?_0x31531f[_0x13d6b5(0x228)]!==undefined&&console[_0x13d6b5(0x22f)]('\x20\x20'+a34_0x2463e0[_0x13d6b5(0x241)](_0x13d6b5(0x197))+'\x20'+a34_0x2463e0[_0x13d6b5(0x2ea)](formatRows(_0x31531f[_0x13d6b5(0x228)]))):console[_0x13d6b5(0x22f)]('\x20\x20'+a34_0x2463e0[_0x13d6b5(0x1b1)](_0x13d6b5(0x362))+'\x20'+_0x31531f[_0x13d6b5(0x23e)]);}[a34_0x2fb84d(0x322)](_0x1686bd){const _0x4ae148=a34_0x2fb84d;if(_0x1686bd[_0x4ae148(0x205)][_0x4ae148(0x2e8)]===0x0)return;console[_0x4ae148(0x22f)]('\x0a'+a34_0x2463e0[_0x4ae148(0x241)]('Attributes'));for(const _0x44db84 of _0x1686bd['attributes']){const _0x2b577f=_0x44db84[_0x4ae148(0x33f)]?a34_0x2463e0['green']('✔'):a34_0x2463e0[_0x4ae148(0x1b1)]('✘');let _0x4ea378='';if(_0x44db84[_0x4ae148(0x33f)]&&_0x44db84[_0x4ae148(0x26c)]!==undefined&&_0x44db84[_0x4ae148(0x384)]!==undefined){const _0x43e01b=_0x44db84[_0x4ae148(0x384)][_0x4ae148(0x22b)](0x1),_0x560b1e=_0x44db84['coveragePercent']>=0x50?a34_0x2463e0[_0x4ae148(0x2f0)]:_0x44db84['coveragePercent']>=0x32?a34_0x2463e0[_0x4ae148(0x2c8)]:a34_0x2463e0['red'];_0x4ea378='\x20'+a34_0x2463e0[_0x4ae148(0x241)](_0x4ae148(0x19c))+'\x20'+_0x560b1e(_0x43e01b+'%')+'\x20('+formatRows(_0x44db84['matchedCount'])+_0x4ae148(0x267);}console[_0x4ae148(0x22f)](_0x2b577f+'\x20'+a34_0x2463e0[_0x4ae148(0x376)](_0x44db84['name'])+_0x4ea378),console[_0x4ae148(0x22f)]('\x20\x20'+a34_0x2463e0['dim'](_0x4ae148(0x1d6))+'\x20'+a34_0x2463e0[_0x4ae148(0x376)](_0x44db84[_0x4ae148(0x2a4)]+'.'+_0x44db84['table']));const _0x288522=_0x44db84[_0x4ae148(0x2bd)]===_0x44db84['foreignKey']?a34_0x2463e0[_0x4ae148(0x241)](_0x4ae148(0x191))+'\x20'+_0x44db84[_0x4ae148(0x2bd)]:a34_0x2463e0[_0x4ae148(0x241)]('Join:')+'\x20'+_0x44db84[_0x4ae148(0x2bd)]+_0x4ae148(0x357)+_0x44db84['foreignKey'];console[_0x4ae148(0x22f)]('\x20\x20'+_0x288522),console[_0x4ae148(0x22f)]('\x20\x20'+a34_0x2463e0['dim'](_0x4ae148(0x18c))),this[_0x4ae148(0x32e)](_0x44db84['columns']),!_0x44db84[_0x4ae148(0x33f)]&&console['error']('\x20\x20'+a34_0x2463e0[_0x4ae148(0x1b1)](_0x4ae148(0x362))+'\x20'+_0x44db84[_0x4ae148(0x23e)]);}}[a34_0x2fb84d(0x193)](_0x27bcee,_0x44b0d5){const _0x4a11f4=a34_0x2fb84d;if(_0x27bcee['behaviors'][_0x4a11f4(0x2e8)]===0x0)return;console['error']('\x0a'+a34_0x2463e0[_0x4a11f4(0x241)](_0x4a11f4(0x229))+'\x20'+a34_0x2463e0[_0x4a11f4(0x241)]('('+_0x44b0d5+')'));for(const _0x504d42 of _0x27bcee['behaviors']){const _0x3850f7=_0x504d42[_0x4a11f4(0x33f)]?a34_0x2463e0['green']('✔'):a34_0x2463e0[_0x4a11f4(0x1b1)]('✘');let _0x5c7fe4='';if(_0x504d42[_0x4a11f4(0x33f)]&&_0x504d42[_0x4a11f4(0x223)]!==undefined&&_0x504d42[_0x4a11f4(0x225)]!==undefined){const _0x5ee6da=_0x504d42[_0x4a11f4(0x305)]?.[_0x4a11f4(0x22b)](0x1)||'?',_0x2ccac5=(_0x504d42[_0x4a11f4(0x305)]??0x0)>=0x32?a34_0x2463e0[_0x4a11f4(0x2f0)]:(_0x504d42['customerPercent']??0x0)>=0x14?a34_0x2463e0[_0x4a11f4(0x2c8)]:a34_0x2463e0[_0x4a11f4(0x1b1)];_0x5c7fe4='\x20'+a34_0x2463e0[_0x4a11f4(0x241)](_0x4a11f4(0x36a))+'\x20'+_0x2ccac5(formatRows(_0x504d42['customersWithEvents']))+'\x20('+_0x5ee6da+'%)\x20'+a34_0x2463e0['dim']('Events:')+'\x20'+a34_0x2463e0[_0x4a11f4(0x2ea)](formatRows(_0x504d42[_0x4a11f4(0x225)]));}console[_0x4a11f4(0x22f)](_0x3850f7+'\x20'+a34_0x2463e0[_0x4a11f4(0x376)](_0x504d42[_0x4a11f4(0x323)])+_0x5c7fe4),console[_0x4a11f4(0x22f)]('\x20\x20'+a34_0x2463e0[_0x4a11f4(0x241)](_0x4a11f4(0x1d6))+'\x20'+a34_0x2463e0['bold'](_0x504d42[_0x4a11f4(0x2a4)]+'.'+_0x504d42[_0x4a11f4(0x30f)]));const _0x1d2e1f=_0x504d42[_0x4a11f4(0x2bd)]===_0x504d42[_0x4a11f4(0x1d4)]?a34_0x2463e0[_0x4a11f4(0x241)](_0x4a11f4(0x191))+'\x20'+_0x504d42['joinKey']:a34_0x2463e0['dim'](_0x4a11f4(0x1aa))+'\x20'+_0x504d42[_0x4a11f4(0x2bd)]+_0x4a11f4(0x357)+_0x504d42[_0x4a11f4(0x1d4)];console[_0x4a11f4(0x22f)]('\x20\x20'+_0x1d2e1f),console['error']('\x20\x20'+a34_0x2463e0['dim'](_0x4a11f4(0x18c))),this[_0x4a11f4(0x32e)](_0x504d42['columns']),!_0x504d42['schemaValid']&&console['error']('\x20\x20'+a34_0x2463e0['red'](_0x4a11f4(0x362))+'\x20'+_0x504d42[_0x4a11f4(0x23e)]);}}[a34_0x2fb84d(0x32e)](_0x540bc8){const _0x26c81f=a34_0x2fb84d;for(const _0xe6fd72 of _0x540bc8){_0xe6fd72[_0x26c81f(0x388)]===_0xe6fd72[_0x26c81f(0x27b)]||_0xe6fd72[_0x26c81f(0x27b)]==='*'?console[_0x26c81f(0x22f)](_0x26c81f(0x2ee)+_0xe6fd72[_0x26c81f(0x388)]):console[_0x26c81f(0x22f)](_0x26c81f(0x2ee)+_0xe6fd72[_0x26c81f(0x388)]+'\x20'+a34_0x2463e0['dim']('('+_0xe6fd72[_0x26c81f(0x27b)]+')'));}}[a34_0x2fb84d(0x1c5)](_0x554b02){const _0x5c7f24=a34_0x2fb84d;console['error']('─'['repeat'](0x3c));if(_0x554b02[_0x5c7f24(0x3a6)][_0x5c7f24(0x2e8)]>0x0){console[_0x5c7f24(0x22f)]('\x0a'+a34_0x2463e0[_0x5c7f24(0x1b1)](_0x5c7f24(0x3a5)));for(const _0x3e6fbd of _0x554b02['errors']){console['error']('\x20\x20'+a34_0x2463e0[_0x5c7f24(0x1b1)]('•')+'\x20'+_0x3e6fbd);}}_0x554b02[_0x5c7f24(0x240)]&&console[_0x5c7f24(0x22f)]('\x0a'+a34_0x2463e0[_0x5c7f24(0x2f0)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a34_0x2fb84d(0x323)]='segment:parent:preview';[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x206);async['execute'](_0x1465a9){const _0x367955=a34_0x2fb84d,{options:_0x971ed2,args:_0x3a083d,tdx:_0x15e56c}=_0x1465a9,_0x4d959b=_0x971ed2,_0x3b64bf=_0x3a083d[0x0]||_0x971ed2[_0x367955(0x2cb)];if(!_0x3b64bf)return showParentSegmentNotSetError(_0x367955(0x318)+_0x367955(0x2a2)+_0x367955(0x354)+_0x367955(0x1b8)+_0x367955(0x226)+_0x367955(0x2e9)+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x4d959b[_0x367955(0x28e)]&&!_0x4d959b['attribute']&&!_0x4d959b[_0x367955(0x330)]&&!_0x4d959b[_0x367955(0x37f)])return console['error'](a34_0x2463e0[_0x367955(0x1b1)](_0x367955(0x2b2))),console['error'](_0x367955(0x38e)),console[_0x367955(0x22f)](_0x367955(0x190)),console[_0x367955(0x22f)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console['error'](_0x367955(0x2fd)),console[_0x367955(0x22f)](_0x367955(0x25f)),console[_0x367955(0x22f)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x14cdc7=resolveYamlFile(_0x3b64bf);if(!existsSync(_0x14cdc7))return showFileNotFoundError(_0x14cdc7,_0x3b64bf),0x1;_0x4d959b[_0x367955(0x36f)]&&(console[_0x367955(0x22f)](_0x367955(0x301)+_0x4d959b[_0x367955(0x1a1)]),console[_0x367955(0x22f)]('YAML\x20file:\x20'+_0x14cdc7));let _0x24969e;try{_0x24969e=readFileSync(_0x14cdc7,_0x367955(0x353));}catch(_0x2dd0b9){const _0xc693f4=_0x2dd0b9 instanceof Error?_0x2dd0b9['message']:String(_0x2dd0b9);return console[_0x367955(0x22f)](_0x367955(0x2b5)+_0xc693f4),0x1;}let _0x24b0c0;try{_0x24b0c0=parseDef(_0x24969e);}catch(_0x2c34c3){const _0x9462a=_0x2c34c3 instanceof Error?_0x2c34c3[_0x367955(0x299)]:String(_0x2c34c3);return console[_0x367955(0x22f)](a34_0x2463e0[_0x367955(0x1b1)](_0x367955(0x1dd)+_0x9462a)),0x1;}if(_0x4d959b[_0x367955(0x25a)]===!![]||_0x4d959b[_0x367955(0x25a)]===''){const _0x390122=_0x24b0c0['attributes']?.[_0x367955(0x2b6)](_0x357d5c=>_0x357d5c[_0x367955(0x323)])||[];if(_0x390122[_0x367955(0x2e8)]===0x0)console[_0x367955(0x22f)](a34_0x2463e0[_0x367955(0x1b1)](_0x367955(0x1bf)));else{console[_0x367955(0x22f)](a34_0x2463e0['red'](_0x367955(0x2b1))),console[_0x367955(0x22f)]('Available\x20attributes:');for(const _0x55588c of _0x390122){console[_0x367955(0x22f)]('\x20\x20'+a34_0x2463e0[_0x367955(0x2ea)](_0x55588c));}console[_0x367955(0x22f)](_0x367955(0x20a)+_0x3b64bf+_0x367955(0x263)+_0x390122[0x0]+'\x22');}return 0x1;}if(_0x4d959b[_0x367955(0x330)]===!![]||_0x4d959b['behavior']===''){const _0x11206d=_0x24b0c0[_0x367955(0x188)]?.[_0x367955(0x2b6)](_0x2a2cde=>_0x2a2cde[_0x367955(0x323)])||[];if(_0x11206d[_0x367955(0x2e8)]===0x0)console[_0x367955(0x22f)](a34_0x2463e0['red'](_0x367955(0x3a4)));else{console[_0x367955(0x22f)](a34_0x2463e0[_0x367955(0x1b1)](_0x367955(0x23d))),console[_0x367955(0x22f)](_0x367955(0x1c0));for(const _0x1a4468 of _0x11206d){console[_0x367955(0x22f)]('\x20\x20'+a34_0x2463e0[_0x367955(0x2ea)](_0x1a4468));}console['error'](_0x367955(0x20a)+_0x3b64bf+'\x20--behavior\x20\x22'+_0x11206d[0x0]+'\x22');}return 0x1;}const _0x111198=createCommandSpinner(a34_0x2463e0[_0x367955(0x241)](_0x367955(0x25e)),{'verbose':_0x4d959b[_0x367955(0x36f)]});_0x111198['start']();const _0x5536d0={'onProgress':_0x2d6f5b=>{const _0x8324bc=_0x367955;_0x111198[_0x8324bc(0x1ed)]=formatProgressMessage(_0x2d6f5b);}};if(_0x4d959b[_0x367955(0x28e)])_0x5536d0[_0x367955(0x28e)]=!![];if(_0x4d959b[_0x367955(0x25a)]&&typeof _0x4d959b[_0x367955(0x25a)]===_0x367955(0x30b))_0x5536d0[_0x367955(0x25a)]=_0x4d959b[_0x367955(0x25a)];if(_0x4d959b[_0x367955(0x330)]&&typeof _0x4d959b[_0x367955(0x330)]==='string')_0x5536d0['behavior']=_0x4d959b['behavior'];if(_0x4d959b[_0x367955(0x37f)])_0x5536d0[_0x367955(0x37f)]=!![];if(_0x4d959b[_0x367955(0x199)])_0x5536d0[_0x367955(0x199)]=_0x4d959b[_0x367955(0x199)];let _0x5aaa03;try{_0x5aaa03=await _0x15e56c[_0x367955(0x372)][_0x367955(0x1d9)](_0x24969e,_0x5536d0),_0x111198[_0x367955(0x257)]();}catch(_0x5d026c){_0x111198[_0x367955(0x257)]();throw _0x5d026c;}return await this[_0x367955(0x294)](_0x5aaa03,{'master':_0x4d959b[_0x367955(0x28e)],'attribute':typeof _0x4d959b[_0x367955(0x25a)]===_0x367955(0x30b)?_0x4d959b[_0x367955(0x25a)]:undefined,'behavior':typeof _0x4d959b[_0x367955(0x330)]===_0x367955(0x30b)?_0x4d959b[_0x367955(0x330)]:undefined,'enriched':_0x4d959b[_0x367955(0x37f)]}),_0x5aaa03[_0x367955(0x240)]?0x0:0x1;}async['displayPreviewResults'](_0x2642d4,_0x29cf7f){const _0xebce68=a34_0x2fb84d;console[_0xebce68(0x22f)]('\x0a'+a34_0x2463e0[_0xebce68(0x376)]('Preview:')+'\x20'+_0x2642d4[_0xebce68(0x323)]),console[_0xebce68(0x22f)]('═'[_0xebce68(0x195)](0x3c));if(_0x29cf7f['master']&&_0x2642d4['sampleData']){const _0x17f45c=a34_0x2463e0['dim'](_0xebce68(0x36b))+'\x20'+a34_0x2463e0[_0xebce68(0x376)](_0x2642d4[_0xebce68(0x28e)]['database']+'.'+_0x2642d4[_0xebce68(0x28e)][_0xebce68(0x30f)]);await this[_0xebce68(0x2fe)](_0x17f45c,_0x2642d4[_0xebce68(0x286)]);}else{if(_0x29cf7f[_0xebce68(0x25a)]&&_0x2642d4['sampleData']){const _0x3485ab=a34_0x2463e0['dim']('Attribute:')+'\x20'+a34_0x2463e0[_0xebce68(0x376)](_0x29cf7f[_0xebce68(0x25a)]);await this[_0xebce68(0x2fe)](_0x3485ab,_0x2642d4[_0xebce68(0x286)]);}else{if(_0x29cf7f['behavior']&&_0x2642d4[_0xebce68(0x286)]){const _0xf88919=a34_0x2463e0[_0xebce68(0x241)](_0xebce68(0x2ba))+'\x20'+a34_0x2463e0[_0xebce68(0x376)](_0x29cf7f['behavior']);await this[_0xebce68(0x2fe)](_0xf88919,_0x2642d4[_0xebce68(0x286)]);}else{if(_0x29cf7f['enriched']&&_0x2642d4[_0xebce68(0x286)]){const _0x3bda21=a34_0x2463e0[_0xebce68(0x241)](_0xebce68(0x31c))+'\x20'+a34_0x2463e0[_0xebce68(0x376)]('Master\x20+\x20Attributes');await this['displaySampleData'](_0x3bda21,_0x2642d4['sampleData']);}else!_0x2642d4[_0xebce68(0x286)]&&console[_0xebce68(0x22f)](_0xebce68(0x33d));}}}if(_0x2642d4[_0xebce68(0x3a6)][_0xebce68(0x2e8)]>0x0){console['error']('─'[_0xebce68(0x195)](0x3c)),console[_0xebce68(0x22f)]('\x0a'+a34_0x2463e0[_0xebce68(0x1b1)]('Errors:'));for(const _0x539c36 of _0x2642d4[_0xebce68(0x3a6)]){console['error']('\x20\x20'+a34_0x2463e0['red']('•')+'\x20'+_0x539c36);}}}async[a34_0x2fb84d(0x2fe)](_0xd7bbb3,_0x1517a2){const _0x433605=a34_0x2fb84d;if(_0x1517a2[_0x433605(0x2e8)]===0x0){console[_0x433605(0x22f)]('\x0a'+_0xd7bbb3),console[_0x433605(0x22f)](_0x433605(0x1a0));return;}console[_0x433605(0x22f)]('\x0a'+_0xd7bbb3);const _0x5ed3c2=Object[_0x433605(0x1a7)](_0x1517a2[0x0])['map'](_0x301537=>({'name':_0x301537,'type':typeof _0x1517a2[0x0][_0x301537]==='number'?_0x433605(0x1c1):'varchar'})),_0xf938d9={'queryId':'preview','columns':_0x5ed3c2,'data':_0x1517a2,'stats':{'state':_0x433605(0x1f8),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1517a2[_0x433605(0x2e8)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x4892d8=formatAsTable(_0xf938d9,_0x1517a2[_0x433605(0x2e8)],!![]);await writeOutput(_0x4892d8,undefined,_0x433605(0x30f));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']='segment:parent:run';[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x355);async[a34_0x2fb84d(0x209)](_0x1f4a69){const _0x154f29=a34_0x2fb84d,{options:_0x11f010,args:_0x256171,tdx:_0x51f37b}=_0x1f4a69,_0x3510e3=_0x11f010,_0x33d62c=_0x256171[0x0]||_0x11f010[_0x154f29(0x2cb)];if(!_0x33d62c)return showParentSegmentNotSetError(_0x154f29(0x326)+_0x154f29(0x1c6)),0x1;const _0x34e5e5=resolveYamlFile(_0x33d62c);if(existsSync(_0x34e5e5)){_0x3510e3['verbose']&&console[_0x154f29(0x22f)](_0x154f29(0x378)+_0x34e5e5);let _0x36423b;try{_0x36423b=readFileSync(_0x34e5e5,_0x154f29(0x353));}catch(_0x66932e){const _0x1eacbd=_0x66932e instanceof Error?_0x66932e['message']:String(_0x66932e);return console[_0x154f29(0x22f)](_0x154f29(0x2b5)+_0x1eacbd),0x1;}const _0xed77f6=await withSpinner('Analyzing\x20changes...',()=>_0x51f37b['segment'][_0x154f29(0x28a)](_0x36423b),{'verbose':_0x3510e3[_0x154f29(0x36f)]}),_0x5d0788=_0xed77f6[_0x154f29(0x24f)],{isNew:_0x225d52,name:_0x4067bb,hasChanges:_0x3daf34,diffFormatted:_0x495efe}=_0x5d0788;if(_0x3daf34){_0x225d52?console['error'](_0x154f29(0x1c9)+_0x4067bb+'\x27:'):console[_0x154f29(0x22f)](_0x154f29(0x233)+_0x4067bb+'\x27:');console[_0x154f29(0x22f)]('─'[_0x154f29(0x195)](0x3c)),console[_0x154f29(0x22f)](_0x495efe),console[_0x154f29(0x22f)]('─'[_0x154f29(0x195)](0x3c));const _0x41f2d=_0x225d52?_0x154f29(0x1d7)+_0x4067bb+'\x27\x20and\x20run\x20workflow?':_0x154f29(0x1fd)+_0x4067bb+_0x154f29(0x1df);if(!_0x3510e3[_0x154f29(0x38d)]){if(!isInteractive())return console[_0x154f29(0x22f)](a34_0x2463e0['red']('\x0aError:'),_0x154f29(0x2be)),console[_0x154f29(0x22f)](a34_0x2463e0[_0x154f29(0x241)](_0x154f29(0x214))),0x1;const _0x153527=await confirmKey(_0x41f2d);if(!_0x153527)return console[_0x154f29(0x22f)](a34_0x2463e0[_0x154f29(0x2c8)](_0x154f29(0x2db))),0x1;}const _0x39e700=_0x225d52?_0x154f29(0x36e):'Updating';await withSpinner(_0x39e700+_0x154f29(0x2eb)+_0x4067bb+'\x27...',()=>_0x5d0788[_0x154f29(0x1ce)](),{'verbose':_0x3510e3[_0x154f29(0x36f)]});const _0x1d5880=_0x225d52?_0x154f29(0x375):_0x154f29(0x192);console[_0x154f29(0x22f)]('✔\x20'+_0x1d5880+'\x20parent\x20segment\x20\x27'+_0x4067bb+'\x27');}else console['error'](_0x154f29(0x295)+_0x4067bb+_0x154f29(0x1ef));}const _0x298004=await withSpinner(_0x154f29(0x311)+_0x33d62c+_0x154f29(0x246),()=>_0x51f37b[_0x154f29(0x372)]['runParent'](_0x33d62c),{'verbose':_0x3510e3[_0x154f29(0x36f)]}),_0x6ebdad=_0x298004[_0x154f29(0x24f)],_0x4765d6=getConsoleUrl(_0x3510e3[_0x154f29(0x1a1)],_0x154f29(0x22c)+_0x6ebdad['workflowId']+_0x154f29(0x26b)+_0x6ebdad['workflowSessionId']+_0x154f29(0x2c7)+_0x6ebdad['workflowAttemptId']);return console[_0x154f29(0x22f)](_0x154f29(0x1b2)),console[_0x154f29(0x22f)]('\x20\x20'+a34_0x2463e0[_0x154f29(0x241)](_0x154f29(0x23f))+'\x20'+_0x6ebdad['audienceId']),console[_0x154f29(0x22f)]('\x20\x20'+a34_0x2463e0[_0x154f29(0x241)](_0x154f29(0x259))+'\x20'+_0x6ebdad['status']),console[_0x154f29(0x22f)]('\x20\x20'+a34_0x2463e0['dim'](_0x154f29(0x321))+'\x20'+_0x6ebdad[_0x154f29(0x1f7)]),console[_0x154f29(0x22f)]('\x20\x20'+a34_0x2463e0['dim']('Attempt:')+'\x20'+_0x6ebdad[_0x154f29(0x32d)]),console[_0x154f29(0x22f)]('\x20\x20'+_0x4765d6),console[_0x154f29(0x22f)]('\x0a'+a34_0x2463e0[_0x154f29(0x241)]('To\x20cancel:')+_0x154f29(0x2c1)+_0x6ebdad['workflowAttemptId']+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a34_0x2fb84d(0x323)]='segment:parent:fields';[a34_0x2fb84d(0x34e)]='List\x20available\x20fields\x20for\x20segmentation';async[a34_0x2fb84d(0x209)](_0xbc2a9c){const _0x2f5651=a34_0x2fb84d,{options:_0x2c6f5b,args:_0x3377cf,tdx:_0x469d9f}=_0xbc2a9c,_0x35b9bd=_0x3377cf[0x0]||_0x2c6f5b[_0x2f5651(0x2cb)];if(!_0x35b9bd)return showParentSegmentNotSetError(_0x2f5651(0x331)+_0x2f5651(0x360)),0x1;_0x2c6f5b['verbose']&&(console[_0x2f5651(0x22f)](_0x2f5651(0x301)+_0x2c6f5b['site']),console[_0x2f5651(0x22f)](_0x2f5651(0x287)+_0x35b9bd));const _0x52f5f2=await withSpinner(_0x2f5651(0x1ba)+_0x35b9bd+_0x2f5651(0x246),()=>_0x469d9f[_0x2f5651(0x372)]['listFields'](_0x35b9bd),{'verbose':_0x2c6f5b[_0x2f5651(0x36f)]}),_0x25fee6=_0x52f5f2[_0x2f5651(0x24f)];console[_0x2f5651(0x22f)](_0x2f5651(0x2d2)+_0x25fee6[_0x2f5651(0x2e8)]+_0x2f5651(0x2f7)+(_0x25fee6['length']!==0x1?'s':''));if(_0x2c6f5b[_0x2f5651(0x288)]||_0x2c6f5b['jsonl'])return await handleSDKOutput(_0x25fee6,_0x2c6f5b),0x0;return displayFieldsHumanReadable(_0x25fee6,_0x35b9bd),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x38f);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x381);async[a34_0x2fb84d(0x209)](_0x2f200e){const _0x2e6edd=a34_0x2fb84d,{options:_0x2c942e,args:_0x5ba3eb,tdx:_0x306bbf}=_0x2f200e,_0x1af772=_0x2c942e,_0xbb4a63=_0x5ba3eb[0x0]||_0x2c942e['parentSegment'];if(!_0xbb4a63)return showParentSegmentNotSetError(_0x2e6edd(0x391)+_0x2e6edd(0x341)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x2c942e[_0x2e6edd(0x36f)]&&(console['error'](_0x2e6edd(0x301)+_0x2c942e[_0x2e6edd(0x1a1)]),console[_0x2e6edd(0x22f)](_0x2e6edd(0x287)+_0xbb4a63));const _0x4d7c5b=await withSpinner(_0x2e6edd(0x33a)+_0xbb4a63+_0x2e6edd(0x246),()=>_0x306bbf[_0x2e6edd(0x372)]['getParentFull'](_0xbb4a63),{'verbose':_0x2c942e['verbose']}),_0x1b99e0=_0x4d7c5b[_0x2e6edd(0x24f)];if(_0x1af772[_0x2e6edd(0x373)]){const _0x194bd9=getConsoleNextUrl(_0x1af772['site'],_0x2e6edd(0x394)+_0x1b99e0['id']);return console[_0x2e6edd(0x22f)](a34_0x2463e0[_0x2e6edd(0x2f0)]('✔')+_0x2e6edd(0x261)+a34_0x2463e0[_0x2e6edd(0x2ea)](_0x194bd9)),openBrowser(_0x194bd9),0x0;}return await handleSingleObjectOutput(_0x1b99e0,_0x2c942e),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x30e);['description']=a34_0x2fb84d(0x22e);async[a34_0x2fb84d(0x209)](_0x386901){const _0x4cc754=a34_0x2fb84d,{options:_0x2d4f3c,args:_0x495b73,tdx:_0x11a1a4}=_0x386901,_0x3f6c6b=_0x2d4f3c,_0x4ff3f5=_0x495b73[0x0]||_0x2d4f3c[_0x4cc754(0x2cb)];if(!_0x4ff3f5)return showParentSegmentNotSetError(_0x4cc754(0x382)+_0x4cc754(0x34a)+_0x4cc754(0x27d)+_0x4cc754(0x33c)),0x1;_0x2d4f3c[_0x4cc754(0x36f)]&&(console[_0x4cc754(0x22f)](_0x4cc754(0x301)+_0x2d4f3c[_0x4cc754(0x1a1)]),console['error'](_0x4cc754(0x287)+_0x4ff3f5));const _0x563924=await withSpinner(_0x4cc754(0x1a5)+_0x4ff3f5+_0x4cc754(0x246),()=>_0x11a1a4['segment']['resolveParentId'](_0x4ff3f5),{'verbose':_0x2d4f3c[_0x4cc754(0x36f)]}),_0x271103=_0x563924[_0x4cc754(0x24f)],_0x3f7c17=_0x11a1a4[_0x4cc754(0x372)][_0x4cc754(0x234)](_0x271103);if(_0x3f6c6b[_0x4cc754(0x1ee)]){const _0x4e962d=await this[_0x4cc754(0x20b)](_0x386901,_0x4ff3f5,_0x271103,_0x3f7c17),_0x3dcb05=this[_0x4cc754(0x1f2)](_0x4e962d);writeFileSync(_0x3f6c6b[_0x4cc754(0x1ee)],_0x3dcb05);const _0xe6f23c=_0x4e962d['customers'][_0x4cc754(0x253)][_0x4cc754(0x2e8)]+_0x4e962d[_0x4cc754(0x188)]['reduce']((_0x3ae420,_0x4ea8cc)=>_0x3ae420+_0x4ea8cc[_0x4cc754(0x253)]['length'],0x0),_0xf79a33=_0x4e962d[_0x4cc754(0x188)][_0x4cc754(0x2f4)](_0x58a14e=>_0x58a14e['columns'][_0x4cc754(0x2e8)]===0x0)[_0x4cc754(0x2e8)];return console[_0x4cc754(0x2a3)]('Schema\x20saved\x20to\x20'+_0x3f6c6b[_0x4cc754(0x1ee)]),console[_0x4cc754(0x2a3)](_0x4cc754(0x398)+_0x3f7c17),console[_0x4cc754(0x2a3)](_0x4cc754(0x1f5)+_0x4e962d[_0x4cc754(0x188)][_0x4cc754(0x2e8)]+_0x4cc754(0x1f3)),console['log'](_0x4cc754(0x365)+_0xe6f23c+_0x4cc754(0x19b)),_0xf79a33>0x0&&console[_0x4cc754(0x2a3)](_0x4cc754(0x18f)+_0xf79a33+_0x4cc754(0x345)),0x0;}console[_0x4cc754(0x22f)]('\x0a'+a34_0x2463e0[_0x4cc754(0x376)](_0x4cc754(0x39f))+'\x20'+a34_0x2463e0[_0x4cc754(0x2ea)](_0x3f7c17));const _0x382889=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x11a1a4[_0x4cc754(0x372)][_0x4cc754(0x2d4)](_0x271103),{'verbose':_0x2d4f3c[_0x4cc754(0x36f)]});console[_0x4cc754(0x22f)]('\x0a'+a34_0x2463e0[_0x4cc754(0x376)](_0x4cc754(0x307))+'\x20'+a34_0x2463e0[_0x4cc754(0x241)]('('+_0x3f7c17+_0x4cc754(0x2f8)));const _0x4af19e=await executeSchemaQuery(_0x382889[_0x4cc754(0x24f)],_0x11a1a4,_0x2d4f3c);await handleQueryOutput(_0x4af19e,_0x2d4f3c);const _0x110ba3=await withSpinner(_0x4cc754(0x337),()=>_0x11a1a4[_0x4cc754(0x372)][_0x4cc754(0x255)](_0x271103),{'verbose':_0x2d4f3c[_0x4cc754(0x36f)]});for(const _0xc876e8 of _0x110ba3[_0x4cc754(0x24f)]){const _0x1cb2f3=_0x4cc754(0x1f4)+_0xc876e8[_0x4cc754(0x2a6)]()[_0x4cc754(0x2aa)](/\s+/g,'_'),_0x35d412=_0x4cc754(0x268)+_0x3f7c17+'.'+_0x1cb2f3;console[_0x4cc754(0x22f)]('\x0a'+a34_0x2463e0[_0x4cc754(0x376)](_0xc876e8)+'\x20'+a34_0x2463e0[_0x4cc754(0x241)]('('+_0x3f7c17+'.'+_0x1cb2f3+')'));try{const _0x1255c5=await executeSchemaQuery(_0x35d412,_0x11a1a4,_0x2d4f3c);await handleQueryOutput(_0x1255c5,_0x2d4f3c);}catch{console[_0x4cc754(0x22f)](a34_0x2463e0[_0x4cc754(0x2c8)](_0x4cc754(0x1cb)));}}return 0x0;}async[a34_0x2fb84d(0x20b)](_0x596a70,_0x2642a1,_0x48f54d,_0xdf3eb9){const _0xb07c4f=a34_0x2fb84d,{options:_0x31aac4,tdx:_0x24b729}=_0x596a70,_0x24baaf=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x24b729[_0xb07c4f(0x372)]['getParentSQL'](_0x48f54d),{'verbose':_0x31aac4[_0xb07c4f(0x36f)]}),_0x58ef64=await executeSchemaQuery(_0x24baaf[_0xb07c4f(0x24f)],_0x24b729,_0x31aac4),_0x503812=_0x58ef64['data'][_0xb07c4f(0x2b6)](_0x32873b=>({'name':_0x32873b[_0xb07c4f(0x280)],'type':_0x32873b[_0xb07c4f(0x29f)]})),_0x4d39b6=await withSpinner(_0xb07c4f(0x337),()=>_0x24b729[_0xb07c4f(0x372)][_0xb07c4f(0x255)](_0x48f54d),{'verbose':_0x31aac4['verbose']}),_0x26015a=[];for(const _0x1c3e96 of _0x4d39b6['data']){const _0x24217b=_0xb07c4f(0x1f4)+_0x1c3e96[_0xb07c4f(0x2a6)]()[_0xb07c4f(0x2aa)](/\s+/g,'_'),_0x55cc32=_0xb07c4f(0x268)+_0xdf3eb9+'.'+_0x24217b;let _0x11e804=[];try{const _0x38f898=await executeSchemaQuery(_0x55cc32,_0x24b729,_0x31aac4);_0x11e804=_0x38f898['data']['map'](_0x14368b=>({'name':_0x14368b[_0xb07c4f(0x280)],'type':_0x14368b[_0xb07c4f(0x29f)]}));}catch{}_0x26015a[_0xb07c4f(0x2c9)]({'table':_0x24217b,'columns':_0x11e804});}return{'database':_0xdf3eb9,'parent_segment':_0x2642a1,'parent_id':_0x48f54d,'customers':{'table':'customers','columns':_0x503812},'behaviors':_0x26015a};}['formatSchemaJson'](_0x3dc70c){const _0x687b91=a34_0x2fb84d,_0x4048c8=_0x4b14bf=>{const _0x1dda3e=a34_0xd65f;if(_0x4b14bf['length']===0x0)return'[]';const _0x54599e=_0x4b14bf['map'](_0x8bbfb=>_0x1dda3e(0x2e3)+_0x8bbfb[_0x1dda3e(0x323)]+_0x1dda3e(0x211)+_0x8bbfb[_0x1dda3e(0x3a3)]+_0x1dda3e(0x1ad));return'[\x0a'+_0x54599e[_0x1dda3e(0x31f)](',\x0a')+_0x1dda3e(0x20d);},_0x9f2442=_0x3dc70c[_0x687b91(0x188)][_0x687b91(0x2b6)](_0x120ed7=>{const _0x3f07e9=_0x687b91;return _0x3f07e9(0x379)+_0x120ed7[_0x3f07e9(0x30f)]+_0x3f07e9(0x2b9)+_0x4048c8(_0x120ed7[_0x3f07e9(0x253)])[_0x3f07e9(0x2aa)](/^/gm,'\x20\x20')[_0x3f07e9(0x31a)]()+_0x3f07e9(0x19a);})[_0x687b91(0x31f)](',\x0a');return _0x687b91(0x1c2)+_0x3dc70c['database']+_0x687b91(0x281)+_0x3dc70c[_0x687b91(0x1dc)]+_0x687b91(0x2e0)+_0x3dc70c['parent_id']+_0x687b91(0x218)+_0x3dc70c[_0x687b91(0x307)][_0x687b91(0x30f)]+_0x687b91(0x26a)+_0x4048c8(_0x3dc70c[_0x687b91(0x307)][_0x687b91(0x253)])[_0x687b91(0x2aa)](/^/gm,'\x20\x20')['trim']()+_0x687b91(0x208)+_0x9f2442+_0x687b91(0x1fc);}}export class ParentSegmentSQLCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x219);[a34_0x2fb84d(0x34e)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a34_0x2fb84d(0x209)](_0x1bfcfe){const _0x1faddd=a34_0x2fb84d,{options:_0xd7f4fe,args:_0x101421,tdx:_0x6e6f2f}=_0x1bfcfe,_0x12fe79=_0x101421[0x0]||_0xd7f4fe['parentSegment'];if(!_0x12fe79)return showParentSegmentNotSetError(_0x1faddd(0x380)+'\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;_0xd7f4fe['verbose']&&(console[_0x1faddd(0x22f)](_0x1faddd(0x301)+_0xd7f4fe[_0x1faddd(0x1a1)]),console[_0x1faddd(0x22f)](_0x1faddd(0x287)+_0x12fe79));const _0x23c7b8=await withSpinner(_0x1faddd(0x1a5)+_0x12fe79+_0x1faddd(0x246),()=>_0x6e6f2f[_0x1faddd(0x372)][_0x1faddd(0x21c)](_0x12fe79),{'verbose':_0xd7f4fe['verbose']}),_0x204310=_0x23c7b8[_0x1faddd(0x24f)],_0x3b9c6b=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x12fe79+_0x1faddd(0x246),()=>_0x6e6f2f[_0x1faddd(0x372)][_0x1faddd(0x2d4)](_0x204310),{'verbose':_0xd7f4fe[_0x1faddd(0x36f)]}),_0x15ed68=_0x3b9c6b[_0x1faddd(0x24f)];return _0xd7f4fe['format']==='json'||_0xd7f4fe['format']===_0x1faddd(0x1a6)?await handleSDKOutput([{'sql':_0x15ed68}],_0xd7f4fe):console['log'](_0x15ed68),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x2cf);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x1c3);async[a34_0x2fb84d(0x209)](_0x338f30){const _0x1a0823=a34_0x2fb84d,{options:_0x4e7c41,args:_0x3204d0,tdx:_0x5db762}=_0x338f30,_0x30a9d6=_0x3204d0[0x0]||_0x4e7c41[_0x1a0823(0x2cb)];if(!_0x30a9d6)return showParentSegmentNotSetError(_0x1a0823(0x339)+_0x1a0823(0x25c)),0x1;_0x4e7c41[_0x1a0823(0x36f)]&&(console[_0x1a0823(0x22f)](_0x1a0823(0x301)+_0x4e7c41[_0x1a0823(0x1a1)]),console['error'](_0x1a0823(0x287)+_0x30a9d6));const _0x4cea4f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x30a9d6+'\x27...',()=>_0x5db762[_0x1a0823(0x372)][_0x1a0823(0x21c)](_0x30a9d6),{'verbose':_0x4e7c41['verbose']}),_0xe96d0=_0x4cea4f[_0x1a0823(0x24f)],_0x3d9b39=await withSpinner(_0x1a0823(0x30a)+_0x30a9d6+_0x1a0823(0x246),()=>_0x5db762[_0x1a0823(0x372)][_0x1a0823(0x2d4)](_0xe96d0),{'verbose':_0x4e7c41[_0x1a0823(0x36f)]});let _0x3fe431=_0x3d9b39[_0x1a0823(0x24f)];const _0x35b03a=resolveLimit(_0x4e7c41['limit'],DEFAULT_DISPLAY_LIMIT),_0x2b95a4=/\bLIMIT\s+\d+/i[_0x1a0823(0x385)](_0x3fe431);!_0x2b95a4&&(_0x3fe431=_0x3fe431[_0x1a0823(0x31a)]()[_0x1a0823(0x2aa)](/;+$/,''),_0x3fe431='SELECT\x20*\x20FROM\x20(\x0a'+_0x3fe431+_0x1a0823(0x37e)+_0x35b03a);_0x4e7c41[_0x1a0823(0x36f)]&&console['error'](_0x1a0823(0x19e)+_0x3fe431);const _0x1808ad=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x256ce8=>{const _0x35c722=_0x1a0823,_0x1a31ef=await _0x5db762[_0x35c722(0x2c2)][_0x35c722(0x209)](_0x3fe431,{'catalog':'td','schema':'information_schema','onJobId':_0xf66e85=>{_0x256ce8['setJobId'](_0xf66e85);}});return _0x1a31ef;},{'verbose':_0x4e7c41[_0x1a0823(0x36f)]}),_0x4a4691=_0x1808ad[_0x1a0823(0x24f)],_0x52bbed=_0x4a4691[_0x1a0823(0x2d8)]?'\x20[Job\x20ID:\x20'+_0x4a4691[_0x1a0823(0x2d8)]+']':'';return console['error']('✔\x20Query\x20completed:\x20Processed\x20'+_0x4a4691['stats'][_0x1a0823(0x283)][_0x1a0823(0x28d)]()+_0x1a0823(0x204)+('in\x20'+formatElapsed(_0x4a4691['stats']['elapsedTimeMillis'])+_0x52bbed)),await handleQueryOutput(_0x4a4691,_0x4e7c41),0x0;}}function a34_0x2634(){const _0x50cd4a=['stringify','sourceTableValid','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','allowedIps','text','output','\x27\x20is\x20up\x20to\x20date','ps:pz:service:list','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','formatSchemaJson','\x20behaviors','behavior_','\x20\x20Tables:\x201\x20customers\x20+\x20','(id:\x20','workflowSessionId','FINISHED','customerGroup','No\x20personalizations\x20configured','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x0a\x20\x20]\x0a}\x0a','Apply\x20changes\x20to\x20\x27','list','Create\x20a\x20realtime\x20personalization\x20entity','ps:pz:patch','\x20personalization\x20service','patch','session','\x20rows\x20','attributes','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','\x20RT\x20journey','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','execute','\x0aUsage:\x20tdx\x20ps\x20preview\x20','collectSchema','3485331SgRtoG','\x0a\x20\x20\x20\x20]','listPersonalizations','\x20\x20\x20\x20','Getting\x20personalization\x20\x27','\x22,\x20\x22type\x22:\x20\x22','List\x20RT\x20journeys','YAML\x20file:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','value','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','segment:parent:sql','153290WRIToj','611760yZHuTq','resolveParentId','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','some','darwin','displayValidateResults','ID\x20Stitching:','identifier:\x20','customersWithEvents','✔\x20Created\x20personalization\x20\x27','totalEvents','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','\x20true','rowCount','Behaviors','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','toFixed','/app/workflows/','eventKind','Show\x20parent\x20segment\x20schema\x20(column\x20types)','error','RT\x202.0\x20Validate:','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','scheduleOption','\x0aChanges\x20to\x20apply\x20to\x20\x27','getOutputDatabaseName','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','match','pullParentYaml','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','ignore','3YjrWHV','Error:\x20--behavior\x20requires\x20a\x20name\x0a','schemaError','Audience\x20ID:','allValid','dim','user_id','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','✔\x20Created\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','\x27...','\x20\x202.\x20Run\x20','ps:pz:service:show','format','Resume\x20activations\x20in\x20an\x20RT\x20journey','entryCriteria:','eventKind:\x20','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','run','data','Error:\x20File\x20not\x20found:\x20','Deleting\x20personalization\x20\x27','scheduleType','columns','Name:\x20','getBehaviorNames','td_client_id','stop','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Status:','attribute','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','id:\x20','Fetching\x20sample\x20data...','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','createParent','\x20Opening\x20','Show\x20a\x20specific\x20realtime\x20personalization','\x20--attribute\x20\x22','status','events','Listing\x20parent\x20segments\x20matching\x20\x27','\x20rows)','SELECT\x20*\x20FROM\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','/sessions/','matchedCount','customerGroupFile','/\x20directory.\x0a','addAttributesFile','\x27\x20with\x20ID:\x20','Pattern:\x20','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','patchPersonalization','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Listing\x20RT-enabled\x20parent\x20segments...','Delete\x20a\x20realtime\x20personalization','resumeJourney','split','displayMasterInfo','Get\x20current\x20RT\x20configuration\x20version\x20status','column','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Options:\x0a','\x20RT\x20configuration\x20is\x20valid','✔\x20Created\x20token\x20\x27','column_name','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','listJourneys','processedRows','✔\x20Created\x20personalization\x20service\x20\x27','\x20No\x20changes\x20-\x20','sampleData','Parent\x20segment:\x20','json','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','pushParentYaml','Creating\x20personalization\x20\x27','28iuhHTc','toLocaleString','master','/\x20→\x20','Deleting\x20personalization\x20service\x20\x27','No\x20parent\x20segments\x20match\x20pattern:\x20','\x20to\x20configure\x20your\x20personalization\x20service','addAttributes','displayPreviewResults','✔\x20No\x20changes\x20-\x20\x27','\x27\x20(id:\x20','Error:\x20Personalization\x20ID\x20is\x20required','ps:rt:configuration_versions','message','No\x20RT-enabled\x20parent\x20segments\x20found','78psWetW','primaryKey','last_page_viewed','\x20--behavior\x20\x22<name>\x22','column_type','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','log','database','segment:parent:validate','toLowerCase','sourceTableError','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','replace','Error:\x20Token\x20ID\x20is\x20required','\x20personalization','My\x20Service','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','personalization','tdx\x20ps\x20push\x20','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Error:\x20Parent\x20segment\x20name\x20is\x20required','keyEventId','Error\x20reading\x20file:\x20','map','sections','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','Behavior:','\x20+\x20[','localeCompare','joinKey','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','timezone','\x20tdx\x20wf\x20attempt\x20','query','Listing\x20parent\x20segments...','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','use','\x20\x20\x20\x20\x20\x20','/attempt/','yellow','push','\x0a⚠️\x20\x20Migrating:\x20','parentSegment','\x20stage','Overwrite\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','segment:parent:show','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','segment:parent:create','✔\x20Found\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','getParentSQL','includeSensitive:','Pause\x20activations\x20in\x20an\x20RT\x20journey','No\x20parent\x20segments\x20found','jobId','Updating','Error:\x20Service\x20ID\x20is\x20required','Aborted.','start','ps:pz:delete','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\x0aChanges\x20to\x20\x27','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','enabled','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\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','no\x20tokens\x20configured','ps:pz:service:token:create','\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','cyan','\x20parent\x20segment\x20\x27','Listing\x20personalization\x20services\x20for\x20\x27','personalization_services','\x20\x20\x20\x20-\x20','\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','green','To\x20view\x20sample\x20data:','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','\x5c$&','filter','isDirectory','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x20field','.customers)','getParentFull','✔\x20Updated\x20personalization\x20service\x20\x27','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','displaySampleData','ps:rt:list','endsWith','Site:\x20','indexOf','segment:parent:pull','population','customerPercent','delete','customers','sort','create','Fetching\x20SQL\x20for\x20\x27','string','\x20(paused)','created:','segment:parent:desc','table','get','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','launched','Personalization\x20service\x20description','keyEventCriteria','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20\x201.\x20Edit\x20','personalizationServices','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\x20jn\x20pause_activations\x20<journeyId>\x0a','trim','3050528wkivHe','Enriched:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','parent_segments','join','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','Session:','displayAttributesStats','name','.yml','\x20--attribute\x20\x22<name>\x22','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Creating\x20parent\x20segment\x20\x27','Updating\x20personalization\x20service\x20\x27','Validating\x20RT\x20configuration...','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Fetching\x20current\x20configuration\x20for\x20\x27','stitchingKeys','workflowAttemptId','displayColumns','ps:rt:jn:list','behavior','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','deleteToken','⚡\x20Enabled','✘\x20Failed\x20to\x20rename\x20directory:\x20','ps:pz:create','xdg-open','Fetching\x20behavior\x20list...','\x0aError:','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Fetching\x20parent\x20segment\x20\x27','token:','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','\x0aNo\x20sample\x20data\x20available','identifier','schemaValid','-1d','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','Update\x20a\x20realtime\x20personalization\x20entity','Creating\x20token\x20\x27','stageCount','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','open','page_view','Error:\x20Service\x20name\x20is\x20required','parentFolder','\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','✔\x20Updated\x20personalization\x20\x27','single','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','description','Next\x20steps:','getPersonalization','Updating\x20parent\x20segment\x20\x27','createToken','utf-8','Options\x20(one\x20required):\x0a','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','realtime_enabled','\x20=\x20','No\x20RT\x20journeys\x20found','public','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','ps:pz:service:update','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','tdx\x20ps\x20preview\x20','\x20service(s)\x20configured','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Default','Error:','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','\x20\x20Columns:\x20','21102900FZDuyw','Finding\x20service\x20for\x20token...','all','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Customers:','Master:','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','264302fUTSlw','Creating','verbose','displayPreviewHints','displayRealtimeInfo','segment','web','paused','Created','bold','Validate:','Found\x20YAML\x20file:\x20','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','idStitching','unref','updatedAt','ps:pz:show','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','enriched','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Show\x20parent\x20segment\x20details','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','RT\x20Journey\x20ID:\x20','coveragePercent','test','ps:pz:list','valid','label','payload','ps:rt:validate','keyEventId:','Database:\x20','yes','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','segment:parent:view','\x20--interval\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','\x20configured','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','/app/dw/parentSegments/','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','Validating\x20configuration...','segment:parent:update','\x20\x20Database:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Creating\x20personalization\x20service\x20\x27','⚡\x20Not\x20enabled','<database>.<table>','👥\x20','Output\x20Database:','Patching\x20personalization\x20\x27','ps:pz:service:token:delete','✔\x20Deleted\x20personalization\x20service\x20\x27','type','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Errors:','errors','Error:\x20Token\x20\x27','behaviors','149429tlwMgb','audienceId:','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Columns:','ps:pz:service:delete','createPersonalization','\x20\x20Note:\x20','Options:','Join\x20on:','Updated','displayBehaviorsStats','realtime:','repeat','tokens','Rows:','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','interval','\x0a\x20\x20\x20\x20}','\x20total','Coverage:','No\x20personalization\x20services\x20configured','SQL\x20query:\x0a','\x27\x20is\x20already\x20up\x20to\x20date','\x20\x20No\x20sample\x20data\x20available','site','validateParentYaml','Error:\x20--database\x20and\x20--table\x20are\x20required','\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','Resolving\x20parent\x20segment\x20\x27','jsonl','keys','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','state','Join:','folderId','includeSensitive','\x22\x20}','segment:parent:list','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Error:\x20Token\x20name\x20is\x20required','red','\x0a✔\x20Workflow\x20started','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','.yaml','\x27\x20for\x20service\x20\x27','\x20Added\x20RT\x202.0\x20template\x20section','allowed\x20IPs:','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Listing\x20fields\x20for\x20\x27','using\x20the\x20default\x20path:\x20','audienceId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','/\x20directories\x20exist.','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Available\x20behaviors:','double','{\x0a\x20\x20\x22database\x22:\x20\x22','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','sections:','displaySummary','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\x0aNew\x20parent\x20segment\x20\x27','/{name}.yml\x0a','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Delete\x20a\x20personalization\x20service','apply','entryCriteria','platform','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','null','foreignKey','\x20service','Source:','Create\x20parent\x20segment\x20\x27','ps:rt:jn:resume','previewParentYaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Analyzing\x20changes...','parent_segment','Error\x20parsing\x20YAML:\x20','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','\x27\x20and\x20run\x20workflow?','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','getCurrentConfigVersion','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','realtime','/\x20and\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20Context\x20set:\x20','file'];a34_0x2634=function(){return _0x50cd4a;};return a34_0x2634();}export class PSRtListCommand extends BaseCommand{['name']=a34_0x2fb84d(0x2ff);['description']=a34_0x2fb84d(0x2ae);async[a34_0x2fb84d(0x209)](_0xc61418){const _0x1fbc90=a34_0x2fb84d,{options:_0x557f10,args:_0x31316d,tdx:_0x59ba8f}=_0xc61418,_0x55bb8=_0x31316d[0x0],_0x17d1f1=await withSpinner(_0x55bb8?_0x1fbc90(0x2fb)+_0x55bb8+_0x1fbc90(0x246):_0x1fbc90(0x275),()=>_0x59ba8f[_0x1fbc90(0x1e4)]['list'](),{'verbose':_0x557f10[_0x1fbc90(0x36f)]});let _0x1953c3=_0x17d1f1[_0x1fbc90(0x24f)]['filter'](_0x166f1e=>_0x166f1e[_0x1fbc90(0x356)]);if(_0x55bb8){const _0x5b5a1c=_0x55bb8['replace'](/[.+^${}()|[\]\\]/g,_0x1fbc90(0x2f3))[_0x1fbc90(0x2aa)](/\*/g,'.*')[_0x1fbc90(0x2aa)](/\?/g,'.'),_0x20f2a5=new RegExp('^'+_0x5b5a1c+'$','i');_0x1953c3=_0x1953c3[_0x1fbc90(0x2f4)](_0x2a1155=>_0x20f2a5[_0x1fbc90(0x385)](_0x2a1155['name']));}_0x1953c3[_0x1fbc90(0x308)]((_0x3fd5d5,_0x5e24da)=>_0x3fd5d5['name'][_0x1fbc90(0x2bc)](_0x5e24da[_0x1fbc90(0x323)])),console['error'](_0x1fbc90(0x2d2)+_0x1953c3['length']+'\x20RT-enabled\x20parent\x20segment'+(_0x1953c3[_0x1fbc90(0x2e8)]!==0x1?'s':''));const _0x314069=_0x3d38c2=>{const _0x398b28=_0x1fbc90;return getConsoleNextUrl(_0x557f10[_0x398b28(0x1a1)],_0x398b28(0x394)+_0x3d38c2);};if(_0x557f10[_0x1fbc90(0x249)]===_0x1fbc90(0x288)||_0x557f10[_0x1fbc90(0x249)]===_0x1fbc90(0x1a6)){const _0x285a7=_0x1953c3[_0x1fbc90(0x2b6)](_0x55f6e7=>({..._0x55f6e7,'url':_0x314069(_0x55f6e7['id'])}));await handleSDKOutput(_0x285a7,_0x557f10);}else{if(_0x1953c3[_0x1fbc90(0x2e8)]===0x0)console['log'](_0x1fbc90(0x29a));else for(const _0x4b996d of _0x1953c3){const _0x4347e4=_0x4b996d[_0x1fbc90(0x304)]?a34_0x2463e0[_0x1fbc90(0x241)]('\x20('+formatRows(_0x4b996d['population'])+')'):'',_0x500d1=hyperlink(_0x4b996d['name'],_0x314069(_0x4b996d['id']));console['log']('⚡\x20'+_0x500d1+_0x4347e4);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x38a);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x1b9);async[a34_0x2fb84d(0x209)](_0x4db9c5){const _0x10e2c7=a34_0x2fb84d,{options:_0x3b6b5f,args:_0x4d444b,tdx:_0x3dbad6}=_0x4db9c5,_0x3f8aad=_0x4d444b[0x0]||_0x3b6b5f[_0x10e2c7(0x2cb)];if(!_0x3f8aad)return showParentSegmentNotSetError(_0x10e2c7(0x198)+_0x10e2c7(0x1a4)),0x1;const _0xec5f44=resolveYamlFile(_0x3f8aad);if(!existsSync(_0xec5f44))return showFileNotFoundError(_0xec5f44,_0x3f8aad),0x1;let _0x3fdb67;try{_0x3fdb67=readFileSync(_0xec5f44,_0x10e2c7(0x353));}catch(_0x1e24e5){const _0x7947ad=_0x1e24e5 instanceof Error?_0x1e24e5['message']:String(_0x1e24e5);return console[_0x10e2c7(0x22f)](_0x10e2c7(0x2b5)+_0x7947ad),0x1;}const _0x419bc9=createCommandSpinner(a34_0x2463e0['dim'](_0x10e2c7(0x329)),{'verbose':_0x3b6b5f[_0x10e2c7(0x36f)]});_0x419bc9['start']();const _0x38d9b4={'realtime':!![],'onProgress':_0x11a22c=>{const _0x52e303=_0x10e2c7;_0x419bc9[_0x52e303(0x1ed)]=formatProgressMessage(_0x11a22c);}};let _0x4ebbf3;try{_0x4ebbf3=await _0x3dbad6[_0x10e2c7(0x372)][_0x10e2c7(0x1a2)](_0x3fdb67,_0x38d9b4),_0x419bc9[_0x10e2c7(0x257)]();}catch(_0x4f04c2){_0x419bc9['stop']();throw _0x4f04c2;}console[_0x10e2c7(0x22f)]('\x0a'+a34_0x2463e0[_0x10e2c7(0x376)](_0x10e2c7(0x230))+'\x20'+_0x4ebbf3[_0x10e2c7(0x323)]),console[_0x10e2c7(0x22f)]('═'[_0x10e2c7(0x195)](0x3c)),displayRealtimeValidation(_0x4ebbf3),console['error']('─'[_0x10e2c7(0x195)](0x3c));if(_0x4ebbf3[_0x10e2c7(0x3a6)]['length']>0x0){console['error']('\x0a'+a34_0x2463e0[_0x10e2c7(0x1b1)]('Errors:'));for(const _0xee892a of _0x4ebbf3[_0x10e2c7(0x3a6)]){console[_0x10e2c7(0x22f)]('\x20\x20'+a34_0x2463e0[_0x10e2c7(0x1b1)]('•')+'\x20'+_0xee892a);}}return _0x4ebbf3[_0x10e2c7(0x240)]&&console['error']('\x0a'+a34_0x2463e0[_0x10e2c7(0x2f0)]('✔')+_0x10e2c7(0x27e)),_0x4ebbf3[_0x10e2c7(0x240)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x32f);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x212);async[a34_0x2fb84d(0x209)](_0x5bd755){const _0x883d00=a34_0x2fb84d,{options:_0x1f84d2,args:_0x32781e,tdx:_0x43da6a}=_0x5bd755,_0x53c709=_0x32781e[0x0]||_0x1f84d2[_0x883d00(0x2cb)];if(!_0x53c709)return showParentSegmentNotSetError(_0x883d00(0x2e2)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment'),0x1;_0x1f84d2[_0x883d00(0x36f)]&&(console[_0x883d00(0x22f)](_0x883d00(0x301)+_0x1f84d2[_0x883d00(0x1a1)]),console[_0x883d00(0x22f)](_0x883d00(0x287)+_0x53c709));const _0x1fc23e=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x53c709+'\x27...',()=>_0x43da6a['segment'][_0x883d00(0x21c)](_0x53c709),{'verbose':_0x1f84d2[_0x883d00(0x36f)]}),_0x39366e=_0x1fc23e['data'],_0x3ead41=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x53c709+_0x883d00(0x246),()=>_0x43da6a[_0x883d00(0x1e4)][_0x883d00(0x282)](_0x39366e),{'verbose':_0x1f84d2[_0x883d00(0x36f)]}),_0x4e12c5=_0x3ead41['data'];console[_0x883d00(0x22f)](_0x883d00(0x2d2)+_0x4e12c5['length']+_0x883d00(0x207)+(_0x4e12c5[_0x883d00(0x2e8)]!==0x1?'s':''));if(_0x1f84d2[_0x883d00(0x249)]==='json'||_0x1f84d2['format']===_0x883d00(0x1a6))await handleSDKOutput(_0x4e12c5,_0x1f84d2);else{if(_0x4e12c5['length']===0x0)console[_0x883d00(0x2a3)](_0x883d00(0x358));else for(const _0x15b846 of _0x4e12c5){const _0x360bf5=_0x15b846[_0x883d00(0x1a9)]===_0x883d00(0x312)?'🚀':'📝',_0x57a406=_0x15b846['paused']?a34_0x2463e0['yellow'](_0x883d00(0x30c)):'',_0x539108=a34_0x2463e0[_0x883d00(0x241)]('\x20('+_0x15b846[_0x883d00(0x344)]+_0x883d00(0x2cc)+(_0x15b846['stageCount']!==0x1?'s':'')+')');console['log'](_0x360bf5+'\x20'+_0x15b846[_0x883d00(0x323)]+_0x57a406+_0x539108);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a34_0x2fb84d(0x323)]='ps:rt:jn:pause';['description']=a34_0x2fb84d(0x2d6);async[a34_0x2fb84d(0x209)](_0x1368a3){const _0x13dd0c=a34_0x2fb84d,{options:_0x2d3a62,args:_0x320bef,tdx:_0x153891}=_0x1368a3,_0x1c0c39=_0x320bef[0x0];if(!_0x1c0c39)return console[_0x13dd0c(0x22f)](a34_0x2463e0[_0x13dd0c(0x1b1)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x13dd0c(0x22f)](_0x13dd0c(0x319)),console[_0x13dd0c(0x22f)](a34_0x2463e0[_0x13dd0c(0x241)](_0x13dd0c(0x2a0))),0x1;_0x2d3a62['verbose']&&(console[_0x13dd0c(0x22f)]('Site:\x20'+_0x2d3a62['site']),console[_0x13dd0c(0x22f)](_0x13dd0c(0x383)+_0x1c0c39));const _0x2b9368=await withSpinner(_0x13dd0c(0x1de)+_0x1c0c39+_0x13dd0c(0x246),()=>_0x153891[_0x13dd0c(0x1e4)]['pauseJourney'](_0x1c0c39),{'verbose':_0x2d3a62[_0x13dd0c(0x36f)]}),_0x2c9109=_0x2b9368[_0x13dd0c(0x24f)];console['error']('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2c9109[_0x13dd0c(0x323)]+'\x27');if(_0x2d3a62[_0x13dd0c(0x249)]===_0x13dd0c(0x288)||_0x2d3a62[_0x13dd0c(0x249)]===_0x13dd0c(0x1a6))await handleSDKOutput([_0x2c9109],_0x2d3a62);else{const _0x3eff50=_0x2c9109[_0x13dd0c(0x1a9)]===_0x13dd0c(0x312)?'🚀':'📝',_0x3403d7=_0x2c9109[_0x13dd0c(0x374)]?a34_0x2463e0['yellow'](_0x13dd0c(0x30c)):'';console[_0x13dd0c(0x2a3)](_0x3eff50+'\x20'+_0x2c9109[_0x13dd0c(0x323)]+_0x3403d7);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x1d8);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x24a);async['execute'](_0x162695){const _0x11f9fe=a34_0x2fb84d,{options:_0x166ab1,args:_0x3aca8e,tdx:_0x50cb2e}=_0x162695,_0x24eeaa=_0x3aca8e[0x0];if(!_0x24eeaa)return console[_0x11f9fe(0x22f)](a34_0x2463e0[_0x11f9fe(0x1b1)](_0x11f9fe(0x1af))),console['error'](_0x11f9fe(0x35c)),console['error'](a34_0x2463e0[_0x11f9fe(0x241)]('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x166ab1[_0x11f9fe(0x36f)]&&(console[_0x11f9fe(0x22f)](_0x11f9fe(0x301)+_0x166ab1[_0x11f9fe(0x1a1)]),console[_0x11f9fe(0x22f)]('RT\x20Journey\x20ID:\x20'+_0x24eeaa));const _0x58dd82=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x24eeaa+_0x11f9fe(0x246),()=>_0x50cb2e[_0x11f9fe(0x1e4)][_0x11f9fe(0x277)](_0x24eeaa),{'verbose':_0x166ab1[_0x11f9fe(0x36f)]}),_0x2c705c=_0x58dd82['data'];console[_0x11f9fe(0x22f)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2c705c[_0x11f9fe(0x323)]+'\x27');if(_0x166ab1[_0x11f9fe(0x249)]==='json'||_0x166ab1[_0x11f9fe(0x249)]==='jsonl')await handleSDKOutput([_0x2c705c],_0x166ab1);else{const _0x1ba2eb=_0x2c705c['state']===_0x11f9fe(0x312)?'🚀':'📝',_0x360ba3=_0x2c705c[_0x11f9fe(0x374)]?a34_0x2463e0['yellow'](_0x11f9fe(0x30c)):'';console[_0x11f9fe(0x2a3)](_0x1ba2eb+'\x20'+_0x2c705c[_0x11f9fe(0x323)]+_0x360ba3);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x298);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x27a);async[a34_0x2fb84d(0x209)](_0x10937c){const _0x1136b3=a34_0x2fb84d,{options:_0x4f38d6,args:_0x2ff88a,tdx:_0x47a990}=_0x10937c,_0x5a237f=_0x2ff88a[0x0]||_0x4f38d6['parentSegment'];if(!_0x5a237f)return showParentSegmentNotSetError(_0x1136b3(0x395)+_0x1136b3(0x2e4)),0x1;_0x4f38d6['verbose']&&(console[_0x1136b3(0x22f)](_0x1136b3(0x301)+_0x4f38d6[_0x1136b3(0x1a1)]),console['error'](_0x1136b3(0x287)+_0x5a237f));const _0x5aeacf=await withSpinner(_0x1136b3(0x1a5)+_0x5a237f+_0x1136b3(0x246),()=>_0x47a990[_0x1136b3(0x372)][_0x1136b3(0x21c)](_0x5a237f),{'verbose':_0x4f38d6[_0x1136b3(0x36f)]}),_0x2178c9=_0x5aeacf[_0x1136b3(0x24f)],_0x42623a=await withSpinner(_0x1136b3(0x272)+_0x5a237f+_0x1136b3(0x246),()=>_0x47a990[_0x1136b3(0x1e4)][_0x1136b3(0x1e2)](_0x2178c9),{'verbose':_0x4f38d6[_0x1136b3(0x36f)]}),_0x2b6d28=_0x42623a[_0x1136b3(0x24f)];return console[_0x1136b3(0x22f)]('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x4f38d6[_0x1136b3(0x249)]==='json'||_0x4f38d6[_0x1136b3(0x249)]===_0x1136b3(0x1a6)?await handleSDKOutput([_0x2b6d28],_0x4f38d6):(console[_0x1136b3(0x2a3)](_0x1136b3(0x25d)+_0x2b6d28['id']),console[_0x1136b3(0x2a3)]('audienceId:\x20'+_0x2b6d28['audienceId']),console['log'](_0x1136b3(0x222)+_0x2b6d28[_0x1136b3(0x33e)]),console[_0x1136b3(0x2a3)](_0x1136b3(0x24c)+_0x2b6d28[_0x1136b3(0x22d)]),console['log']('status:\x20'+_0x2b6d28[_0x1136b3(0x264)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x1f0);[a34_0x2fb84d(0x34e)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async[a34_0x2fb84d(0x209)](_0x25f51e){const _0x17e1f6=a34_0x2fb84d,{options:_0x1c8130,args:_0x309f6d,tdx:_0x353f2c}=_0x25f51e,_0x180dc5=_0x309f6d[0x0]||_0x1c8130[_0x17e1f6(0x2cb)];if(!_0x180dc5)return showParentSegmentNotSetError(_0x17e1f6(0x1b3)+_0x17e1f6(0x2ef)),0x1;const _0x2b55cd=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x180dc5+_0x17e1f6(0x246),()=>_0x353f2c[_0x17e1f6(0x372)][_0x17e1f6(0x21c)](_0x180dc5),{'verbose':_0x1c8130[_0x17e1f6(0x36f)]}),_0x142159=_0x2b55cd['data'],_0x5dc8f5=await withSpinner(_0x17e1f6(0x2ec)+_0x180dc5+_0x17e1f6(0x246),()=>_0x353f2c[_0x17e1f6(0x2af)]['list'](_0x142159),{'verbose':_0x1c8130[_0x17e1f6(0x36f)]}),_0x35cbda=_0x5dc8f5[_0x17e1f6(0x24f)];console[_0x17e1f6(0x22f)](_0x17e1f6(0x2d2)+_0x35cbda['length']+_0x17e1f6(0x201)+(_0x35cbda['length']!==0x1?'s':''));if(_0x1c8130[_0x17e1f6(0x249)]===_0x17e1f6(0x288)||_0x1c8130[_0x17e1f6(0x249)]===_0x17e1f6(0x1a6))await handleSDKOutput(_0x35cbda,_0x1c8130);else{if(_0x35cbda[_0x17e1f6(0x2e8)]===0x0)console['log'](_0x17e1f6(0x19d)),console[_0x17e1f6(0x22f)](a34_0x2463e0['cyan'](_0x17e1f6(0x39a)));else for(const _0x515943 of _0x35cbda){console[_0x17e1f6(0x2a3)](a34_0x2463e0[_0x17e1f6(0x376)](_0x515943[_0x17e1f6(0x323)])+'\x20'+a34_0x2463e0[_0x17e1f6(0x241)](_0x17e1f6(0x1f6)+_0x515943['id']+')'));_0x515943[_0x17e1f6(0x34e)]&&console[_0x17e1f6(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x17e1f6(0x241)](_0x515943[_0x17e1f6(0x34e)]));if(_0x515943[_0x17e1f6(0x196)]&&_0x515943[_0x17e1f6(0x196)][_0x17e1f6(0x2e8)]>0x0)for(const _0x5a2254 of _0x515943[_0x17e1f6(0x196)]){const _0x234bd9=_0x5a2254['allowedIps']?.['length']?_0x5a2254[_0x17e1f6(0x1ec)][_0x17e1f6(0x31f)](',\x20'):'any';console[_0x17e1f6(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x17e1f6(0x2ea)](_0x17e1f6(0x33b))+'\x20'+_0x5a2254['name']+'\x20'+a34_0x2463e0['dim']('(id:\x20'+_0x5a2254['id']+')')),console[_0x17e1f6(0x2a3)](_0x17e1f6(0x20f)+a34_0x2463e0[_0x17e1f6(0x241)](_0x17e1f6(0x1b7))+'\x20'+_0x234bd9);}else console[_0x17e1f6(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x17e1f6(0x241)](_0x17e1f6(0x2e5)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a34_0x2fb84d(0x323)]='ps:pz:service:create';['description']=a34_0x2fb84d(0x21d);async[a34_0x2fb84d(0x209)](_0x4d9e42){const _0xf8081c=a34_0x2fb84d,{options:_0x2ff015,args:_0x50cb46,tdx:_0x2f0474}=_0x4d9e42,_0x1f3ea7=_0x2ff015,_0x2bf4c5=_0x50cb46[0x0],_0x10c1ef=_0x50cb46[0x1]||_0x2ff015[_0xf8081c(0x2cb)];if(!_0x2bf4c5)return console['error'](_0xf8081c(0x348)),console[_0xf8081c(0x22f)](_0xf8081c(0x1e1)),console[_0xf8081c(0x22f)](_0xf8081c(0x269)),0x1;if(!_0x10c1ef)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0xf8081c(0x269)),0x1;const _0xc60673=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x10c1ef+'\x27...',()=>_0x2f0474['segment']['resolveParentId'](_0x10c1ef),{'verbose':_0x2ff015['verbose']}),_0x39146d=_0xc60673[_0xf8081c(0x24f)],_0x4db373={'name':_0x2bf4c5,'description':_0x1f3ea7['description'],'public':_0x1f3ea7[_0xf8081c(0x359)]},_0x2feed1=await withSpinner(_0xf8081c(0x39b)+_0x2bf4c5+_0xf8081c(0x246),()=>_0x2f0474[_0xf8081c(0x2af)][_0xf8081c(0x309)](_0x39146d,_0x4db373),{'verbose':_0x2ff015['verbose']}),_0x8068ef=_0x2feed1[_0xf8081c(0x24f)];return console['error'](_0xf8081c(0x284)+_0x8068ef[_0xf8081c(0x323)]+_0xf8081c(0x270)+_0x8068ef['id']),await handleSDKOutput([_0x8068ef],_0x2ff015),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']=a34_0x2fb84d(0x248);[a34_0x2fb84d(0x34e)]='Show\x20personalization\x20service\x20details';async['execute'](_0x399b6e){const _0x1ae660=a34_0x2fb84d,{options:_0x22d51e,args:_0x1a75de,tdx:_0x35b1e6}=_0x399b6e,_0xfd2d3=_0x1a75de[0x0],_0x3a4d50=_0x1a75de[0x1]||_0x22d51e[_0x1ae660(0x2cb)];if(!_0xfd2d3)return console[_0x1ae660(0x22f)](_0x1ae660(0x2da)),console[_0x1ae660(0x22f)](_0x1ae660(0x216)),console[_0x1ae660(0x22f)](_0x1ae660(0x1da)),0x1;if(!_0x3a4d50)return showParentSegmentNotSetError(_0x1ae660(0x245)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x238c0b=await withSpinner(_0x1ae660(0x1a5)+_0x3a4d50+_0x1ae660(0x246),()=>_0x35b1e6[_0x1ae660(0x372)][_0x1ae660(0x21c)](_0x3a4d50),{'verbose':_0x22d51e[_0x1ae660(0x36f)]}),_0x1a6df3=_0x238c0b['data'],_0x4ded93=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0xfd2d3+_0x1ae660(0x246),()=>_0x35b1e6[_0x1ae660(0x2af)][_0x1ae660(0x310)](_0x1a6df3,_0xfd2d3),{'verbose':_0x22d51e[_0x1ae660(0x36f)]}),_0x4f2040=_0x4ded93['data'];if(_0x22d51e[_0x1ae660(0x288)]||_0x22d51e['jsonl'])await handleSDKOutput([_0x4f2040],_0x22d51e);else{console[_0x1ae660(0x2a3)](a34_0x2463e0[_0x1ae660(0x376)](_0x4f2040[_0x1ae660(0x323)])+'\x20'+a34_0x2463e0[_0x1ae660(0x241)]('(id:\x20'+_0x4f2040['id']+')'));_0x4f2040[_0x1ae660(0x34e)]&&console['log']('\x20\x20'+a34_0x2463e0['dim'](_0x4f2040['description']));console[_0x1ae660(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x1ae660(0x2ea)]('public:')+'\x20'+(_0x4f2040['public']?_0x1ae660(0x38d):'no'));if(_0x4f2040[_0x1ae660(0x196)]&&_0x4f2040['tokens'][_0x1ae660(0x2e8)]>0x0)for(const _0x39ef5f of _0x4f2040['tokens']){const _0x11870d=_0x39ef5f[_0x1ae660(0x1ec)]?.['length']?_0x39ef5f[_0x1ae660(0x1ec)][_0x1ae660(0x31f)](',\x20'):'any';console[_0x1ae660(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x1ae660(0x2ea)](_0x1ae660(0x33b))+'\x20'+_0x39ef5f[_0x1ae660(0x323)]+'\x20'+a34_0x2463e0[_0x1ae660(0x241)](_0x1ae660(0x1f6)+_0x39ef5f['id']+')')),console[_0x1ae660(0x2a3)](_0x1ae660(0x20f)+a34_0x2463e0[_0x1ae660(0x241)](_0x1ae660(0x1b7))+'\x20'+_0x11870d);}else console[_0x1ae660(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x1ae660(0x241)](_0x1ae660(0x2e5)));}return 0x0;}}function a34_0xd65f(_0x35c41c,_0x59b417){_0x35c41c=_0x35c41c-0x187;const _0x263419=a34_0x2634();let _0xd65f65=_0x263419[_0x35c41c];return _0xd65f65;}export class PSPzServiceDeleteCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x18d);['description']=a34_0x2fb84d(0x1cd);async[a34_0x2fb84d(0x209)](_0x4fb416){const _0x1882a0=a34_0x2fb84d,{options:_0x300afc,args:_0x3c9d89,tdx:_0x4aed3e}=_0x4fb416,_0x526784=_0x3c9d89[0x0],_0x24f9b3=_0x3c9d89[0x1]||_0x300afc['parentSegment'];if(!_0x526784)return console[_0x1882a0(0x22f)](_0x1882a0(0x2da)),console[_0x1882a0(0x22f)](_0x1882a0(0x315)),console[_0x1882a0(0x22f)](_0x1882a0(0x1fb)),0x1;if(!_0x24f9b3)return showParentSegmentNotSetError(_0x1882a0(0x1d1)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1d4d24=await withSpinner(_0x1882a0(0x1a5)+_0x24f9b3+_0x1882a0(0x246),()=>_0x4aed3e[_0x1882a0(0x372)][_0x1882a0(0x21c)](_0x24f9b3),{'verbose':_0x300afc['verbose']}),_0x21a5be=_0x1d4d24[_0x1882a0(0x24f)];return await withSpinner(_0x1882a0(0x290)+_0x526784+_0x1882a0(0x246),()=>_0x4aed3e['personalization'][_0x1882a0(0x306)](_0x21a5be,_0x526784),{'verbose':_0x300afc[_0x1882a0(0x36f)]}),console[_0x1882a0(0x22f)](_0x1882a0(0x3a2)+_0x526784+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x35b);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x23a);async['execute'](_0x3ce44c){const _0x3e9e99=a34_0x2fb84d,{options:_0x10dd13,args:_0x996b5f,tdx:_0x2aada8}=_0x3ce44c,_0x59bf27=_0x10dd13,_0x21951a=_0x996b5f[0x0],_0x2f89ea=_0x996b5f[0x1]||_0x10dd13[_0x3e9e99(0x2cb)];if(!_0x21951a)return console[_0x3e9e99(0x22f)](_0x3e9e99(0x2da)),console[_0x3e9e99(0x22f)](_0x3e9e99(0x215)),console[_0x3e9e99(0x22f)](_0x3e9e99(0x32a)),0x1;if(!_0x59bf27['name'])return console[_0x3e9e99(0x22f)]('Error:\x20--name\x20is\x20required'),console[_0x3e9e99(0x22f)](_0x3e9e99(0x215)),0x1;if(!_0x2f89ea)return showParentSegmentNotSetError(_0x3e9e99(0x27c)+_0x3e9e99(0x32a)),0x1;const _0x43debd=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2f89ea+_0x3e9e99(0x246),()=>_0x2aada8[_0x3e9e99(0x372)][_0x3e9e99(0x21c)](_0x2f89ea),{'verbose':_0x10dd13[_0x3e9e99(0x36f)]}),_0x2994fe=_0x43debd[_0x3e9e99(0x24f)],_0x4129f5={'name':_0x59bf27[_0x3e9e99(0x323)]};_0x59bf27[_0x3e9e99(0x34e)]!==undefined&&(_0x4129f5[_0x3e9e99(0x34e)]=_0x59bf27['description']);const _0xcf2ae6=await withSpinner(_0x3e9e99(0x328)+_0x21951a+'\x27...',()=>_0x2aada8[_0x3e9e99(0x2af)][_0x3e9e99(0x202)](_0x2994fe,_0x21951a,_0x4129f5),{'verbose':_0x10dd13['verbose']}),_0x157734=_0xcf2ae6['data'];return console[_0x3e9e99(0x22f)](_0x3e9e99(0x2fa)+_0x157734[_0x3e9e99(0x323)]+'\x27'),await handleSDKOutput([_0x157734],_0x10dd13),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a34_0x2fb84d(0x2e6);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x258);async[a34_0x2fb84d(0x209)](_0x397652){const _0x402fd9=a34_0x2fb84d,{options:_0x48cdb1,args:_0x11d295,tdx:_0x173913}=_0x397652,_0x541b72=_0x48cdb1,_0x29eae9=_0x11d295[0x0],_0x5892bf=_0x11d295[0x1],_0x5956f6=_0x11d295[0x2]||_0x48cdb1[_0x402fd9(0x2cb)];if(!_0x29eae9)return console['error'](_0x402fd9(0x1b0)),console[_0x402fd9(0x22f)](_0x402fd9(0x22a)),console['error'](_0x402fd9(0x1bd)),0x1;if(!_0x5892bf)return console['error']('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0x402fd9(0x22a)),console[_0x402fd9(0x22f)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5956f6)return showParentSegmentNotSetError(_0x402fd9(0x2a1)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x309bf7=await withSpinner(_0x402fd9(0x1a5)+_0x5956f6+_0x402fd9(0x246),()=>_0x173913[_0x402fd9(0x372)][_0x402fd9(0x21c)](_0x5956f6),{'verbose':_0x48cdb1[_0x402fd9(0x36f)]}),_0x63b328=_0x309bf7['data'],_0x50cfc7={'name':_0x29eae9};_0x541b72[_0x402fd9(0x1ec)]&&(_0x50cfc7[_0x402fd9(0x1ec)]=_0x541b72[_0x402fd9(0x1ec)][_0x402fd9(0x278)](',')[_0x402fd9(0x2b6)](_0x1b97a6=>_0x1b97a6['trim']()));_0x541b72[_0x402fd9(0x34e)]&&(_0x50cfc7['description']=_0x541b72['description']);const _0x2ddb2d=await withSpinner(_0x402fd9(0x343)+_0x29eae9+_0x402fd9(0x1b5)+_0x5892bf+_0x402fd9(0x246),()=>_0x173913[_0x402fd9(0x2af)][_0x402fd9(0x352)](_0x63b328,_0x5892bf,_0x50cfc7),{'verbose':_0x48cdb1[_0x402fd9(0x36f)]}),_0x1eff6b=_0x2ddb2d[_0x402fd9(0x24f)];return console['error'](_0x402fd9(0x27f)+_0x1eff6b[_0x402fd9(0x323)]+_0x402fd9(0x270)+_0x1eff6b['id']),_0x1eff6b[_0x402fd9(0x217)]&&(console[_0x402fd9(0x22f)](a34_0x2463e0['yellow'](_0x402fd9(0x243))),console['error'](a34_0x2463e0[_0x402fd9(0x2ea)](_0x1eff6b[_0x402fd9(0x217)])),console['error']('')),await handleSDKOutput([_0x1eff6b],_0x48cdb1),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{['name']=a34_0x2fb84d(0x3a1);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x2fc);async[a34_0x2fb84d(0x209)](_0x18466c){const _0x128440=a34_0x2fb84d,{options:_0x27f16e,args:_0x4fcdc0,tdx:_0x478a4d}=_0x18466c,_0x36c3de=_0x4fcdc0[0x0],_0x5e1a68=_0x4fcdc0[0x1]||_0x27f16e[_0x128440(0x2cb)];if(!_0x36c3de)return console[_0x128440(0x22f)](_0x128440(0x2ab)),console[_0x128440(0x22f)](_0x128440(0x35f)),console[_0x128440(0x22f)](_0x128440(0x31d)),0x1;if(!_0x5e1a68)return showParentSegmentNotSetError(_0x128440(0x239)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x5009b4=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5e1a68+_0x128440(0x246),()=>_0x478a4d[_0x128440(0x372)][_0x128440(0x21c)](_0x5e1a68),{'verbose':_0x27f16e[_0x128440(0x36f)]}),_0x1f4a62=_0x5009b4[_0x128440(0x24f)],_0x1e0992=await withSpinner(_0x128440(0x367),()=>_0x478a4d[_0x128440(0x2af)][_0x128440(0x1fe)](_0x1f4a62),{'verbose':_0x27f16e[_0x128440(0x36f)]}),_0x458adb=_0x1e0992[_0x128440(0x24f)];let _0x29691c;for(const _0x4eae4b of _0x458adb){if(_0x4eae4b[_0x128440(0x196)]?.[_0x128440(0x21e)](_0x204db5=>_0x204db5['id']===_0x36c3de)){_0x29691c=_0x4eae4b['id'];break;}}if(!_0x29691c)return console[_0x128440(0x22f)](_0x128440(0x187)+_0x36c3de+_0x128440(0x36c)),0x1;const _0x58e78c=await withSpinner('Deleting\x20token\x20\x27'+_0x36c3de+'\x27...',()=>_0x478a4d['personalization'][_0x128440(0x332)](_0x1f4a62,_0x29691c,_0x36c3de),{'verbose':_0x27f16e[_0x128440(0x36f)]}),_0x35be17=_0x58e78c['data'];return console[_0x128440(0x22f)]('✔\x20Deleted\x20token\x20\x27'+(_0x35be17[_0x128440(0x323)]||_0x36c3de)+'\x27'),await handleSDKOutput([_0x35be17],_0x27f16e),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a34_0x2fb84d(0x386);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x1e6);async[a34_0x2fb84d(0x209)](_0x1fdd9e){const _0x45cb43=a34_0x2fb84d,{options:_0x4f194d,args:_0x15e4ba,tdx:_0x5823c0}=_0x1fdd9e,_0x303be3=_0x15e4ba[0x0]||_0x4f194d[_0x45cb43(0x2cb)];if(!_0x303be3)return showParentSegmentNotSetError('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'+_0x45cb43(0x2ce)),0x1;const _0x48a35f=await withSpinner(_0x45cb43(0x1a5)+_0x303be3+_0x45cb43(0x246),()=>_0x5823c0[_0x45cb43(0x372)][_0x45cb43(0x21c)](_0x303be3),{'verbose':_0x4f194d[_0x45cb43(0x36f)]}),_0x31903b=_0x48a35f[_0x45cb43(0x24f)],_0x2f45a5=await withSpinner('Listing\x20personalizations\x20for\x20\x27'+_0x303be3+_0x45cb43(0x246),()=>_0x5823c0['personalization'][_0x45cb43(0x20e)](_0x31903b),{'verbose':_0x4f194d[_0x45cb43(0x36f)]}),_0x9e3776=_0x2f45a5[_0x45cb43(0x24f)];console[_0x45cb43(0x22f)]('✔\x20Found\x20'+_0x9e3776['length']+_0x45cb43(0x2ac)+(_0x9e3776['length']!==0x1?'s':''));if(_0x4f194d[_0x45cb43(0x249)]===_0x45cb43(0x288)||_0x4f194d['format']==='jsonl')await handleSDKOutput(_0x9e3776,_0x4f194d);else{if(_0x9e3776[_0x45cb43(0x2e8)]===0x0)console[_0x45cb43(0x2a3)](_0x45cb43(0x1fa));else for(const _0x131e4e of _0x9e3776){console[_0x45cb43(0x2a3)](a34_0x2463e0[_0x45cb43(0x376)](_0x131e4e['name'])+'\x20'+a34_0x2463e0['dim'](_0x45cb43(0x1f6)+_0x131e4e['id']+')'));_0x131e4e[_0x45cb43(0x34e)]&&console['log']('\x20\x20'+a34_0x2463e0[_0x45cb43(0x241)](_0x131e4e[_0x45cb43(0x34e)]));const _0x27dd10=_0x131e4e['sections']?.[_0x45cb43(0x2e8)]||0x0;console[_0x45cb43(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x45cb43(0x2ea)]('sections:')+'\x20'+_0x27dd10);if(_0x131e4e[_0x45cb43(0x2b7)]&&_0x131e4e['sections']['length']>0x0)for(const _0x155680 of _0x131e4e[_0x45cb43(0x2b7)]){console[_0x45cb43(0x2a3)](_0x45cb43(0x2ee)+_0x155680[_0x45cb43(0x323)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a34_0x2fb84d(0x37d);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x262);async[a34_0x2fb84d(0x209)](_0x431fda){const _0x11646f=a34_0x2fb84d,{options:_0x203055,args:_0x41e70a,tdx:_0x46b3d4}=_0x431fda,_0x184b4f=_0x41e70a[0x0];if(!_0x184b4f)return console['error'](_0x11646f(0x297)),console[_0x11646f(0x22f)](_0x11646f(0x34d)),0x1;const _0x4cebb1=await withSpinner(_0x11646f(0x210)+_0x184b4f+_0x11646f(0x246),()=>_0x46b3d4[_0x11646f(0x2af)][_0x11646f(0x350)](_0x184b4f),{'verbose':_0x203055['verbose']}),_0x3e76f9=_0x4cebb1[_0x11646f(0x24f)];console[_0x11646f(0x22f)]('✔\x20Found\x20personalization\x20\x27'+_0x3e76f9['name']+'\x27');if(_0x203055[_0x11646f(0x249)]===_0x11646f(0x288)||_0x203055[_0x11646f(0x249)]===_0x11646f(0x1a6))await handleSDKOutput([_0x3e76f9],_0x203055);else{console[_0x11646f(0x2a3)](a34_0x2463e0['bold'](_0x3e76f9['name'])+'\x20'+a34_0x2463e0[_0x11646f(0x241)](_0x11646f(0x1f6)+_0x3e76f9['id']+')'));_0x3e76f9[_0x11646f(0x34e)]&&console[_0x11646f(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x11646f(0x241)](_0x3e76f9[_0x11646f(0x34e)]));_0x3e76f9[_0x11646f(0x1bc)]&&console[_0x11646f(0x2a3)]('\x20\x20'+a34_0x2463e0['cyan'](_0x11646f(0x18a))+'\x20'+_0x3e76f9[_0x11646f(0x1bc)]);console[_0x11646f(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x11646f(0x2ea)](_0x11646f(0x30d))+'\x20'+_0x3e76f9['createdAt']),console['log']('\x20\x20'+a34_0x2463e0[_0x11646f(0x2ea)]('updated:')+'\x20'+_0x3e76f9[_0x11646f(0x37c)]);const _0x5a8c7b=_0x3e76f9['sections']?.[_0x11646f(0x2e8)]||0x0;console[_0x11646f(0x2a3)]('\x20\x20'+a34_0x2463e0[_0x11646f(0x2ea)](_0x11646f(0x1c4))+'\x20'+_0x5a8c7b);if(_0x3e76f9['sections']&&_0x3e76f9[_0x11646f(0x2b7)][_0x11646f(0x2e8)]>0x0)for(const _0x2a31c7 of _0x3e76f9['sections']){console[_0x11646f(0x2a3)]('\x20\x20\x20\x20'+a34_0x2463e0[_0x11646f(0x376)](_0x2a31c7[_0x11646f(0x323)])+'\x20'+a34_0x2463e0['dim'](_0x11646f(0x1f6)+_0x2a31c7['id']+')')),_0x2a31c7[_0x11646f(0x1cf)]&&(console[_0x11646f(0x2a3)]('\x20\x20\x20\x20\x20\x20'+a34_0x2463e0['cyan'](_0x11646f(0x24b))+'\x20'+_0x2a31c7[_0x11646f(0x1cf)]['name']),_0x2a31c7['entryCriteria'][_0x11646f(0x314)]?.[_0x11646f(0x2b4)]&&console[_0x11646f(0x2a3)](_0x11646f(0x2e7)+a34_0x2463e0[_0x11646f(0x2ea)](_0x11646f(0x38b))+'\x20'+_0x2a31c7[_0x11646f(0x1cf)][_0x11646f(0x314)][_0x11646f(0x2b4)])),_0x2a31c7[_0x11646f(0x389)]&&console[_0x11646f(0x2a3)](_0x11646f(0x2c6)+a34_0x2463e0['cyan']('payload:')+'\x20'+JSON[_0x11646f(0x1e9)](_0x2a31c7[_0x11646f(0x389)])),_0x2a31c7[_0x11646f(0x1ac)]&&console[_0x11646f(0x2a3)](_0x11646f(0x2c6)+a34_0x2463e0[_0x11646f(0x2ea)](_0x11646f(0x2d5))+_0x11646f(0x227));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x2dd);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x276);async[a34_0x2fb84d(0x209)](_0x6e6b58){const _0xb25bb8=a34_0x2fb84d,{options:_0x1fcf0e,args:_0x46dbb1,tdx:_0x47dba1}=_0x6e6b58,_0x7733fb=_0x46dbb1[0x0];if(!_0x7733fb)return console[_0xb25bb8(0x22f)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0xb25bb8(0x22f)](_0xb25bb8(0x1c8)),0x1;return await withSpinner(_0xb25bb8(0x251)+_0x7733fb+'\x27...',()=>_0x47dba1[_0xb25bb8(0x2af)]['deletePersonalization'](_0x7733fb),{'verbose':_0x1fcf0e[_0xb25bb8(0x36f)]}),console[_0xb25bb8(0x22f)]('✔\x20Deleted\x20personalization\x20\x27'+_0x7733fb+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x335);[a34_0x2fb84d(0x34e)]=a34_0x2fb84d(0x1ff);async[a34_0x2fb84d(0x209)](_0x4458fe){const _0x8b43d5=a34_0x2fb84d,{options:_0x31b125,tdx:_0x37027f}=_0x4458fe,_0x2bcade=_0x31b125;let _0x17b9df;if(_0x2bcade['file']){_0x17b9df=await loadJSON(_0x2bcade[_0x8b43d5(0x1e8)],!![]);if(!_0x17b9df['relationships']?.[_0x8b43d5(0x349)])return console[_0x8b43d5(0x22f)]('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console[_0x8b43d5(0x22f)](_0x8b43d5(0x2d0)),console[_0x8b43d5(0x22f)]('\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(!_0x2bcade[_0x8b43d5(0x323)])return console[_0x8b43d5(0x22f)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0x8b43d5(0x1e0)),console[_0x8b43d5(0x22f)](_0x8b43d5(0x399)),0x1;if(_0x2bcade[_0x8b43d5(0x34e)]===undefined)return console[_0x8b43d5(0x22f)](_0x8b43d5(0x363)),console[_0x8b43d5(0x22f)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x2bcade[_0x8b43d5(0x1ab)]===undefined)return console[_0x8b43d5(0x22f)](_0x8b43d5(0x2b8)),console[_0x8b43d5(0x22f)](_0x8b43d5(0x274)),0x1;let _0x1c077f=_0x2bcade[_0x8b43d5(0x1bc)];if(!_0x1c077f&&_0x31b125[_0x8b43d5(0x2cb)]){const _0x1abfcb=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x31b125[_0x8b43d5(0x2cb)]+'\x27...',()=>_0x37027f[_0x8b43d5(0x372)]['resolveParentId'](_0x31b125[_0x8b43d5(0x2cb)]),{'verbose':_0x31b125[_0x8b43d5(0x36f)]});_0x1c077f=_0x1abfcb[_0x8b43d5(0x24f)];}let _0x49a571;_0x2bcade[_0x8b43d5(0x2b7)]&&(_0x49a571=await loadJSON(_0x2bcade['sections'],![]));const _0x3b5af4=_0x2bcade['folderId']===_0x8b43d5(0x1d3)?null:{'id':_0x2bcade[_0x8b43d5(0x1ab)],'type':'folder-segment'};_0x17b9df={'attributes':{'name':_0x2bcade['name'],'description':_0x2bcade[_0x8b43d5(0x34e)]||null,..._0x1c077f!==undefined&&{'audienceId':_0x1c077f},..._0x49a571!==undefined&&{'sections':_0x49a571}},'relationships':{'parentFolder':{'data':_0x3b5af4}}};}const _0xbc2e96=await withSpinner(_0x8b43d5(0x28b)+(_0x17b9df[_0x8b43d5(0x205)]?.[_0x8b43d5(0x323)]??'')+_0x8b43d5(0x246),()=>_0x37027f[_0x8b43d5(0x2af)][_0x8b43d5(0x18e)](_0x17b9df),{'verbose':_0x31b125[_0x8b43d5(0x36f)]}),_0x5ea617=_0xbc2e96['data'];return console[_0x8b43d5(0x22f)](_0x8b43d5(0x224)+_0x5ea617['name']+_0x8b43d5(0x270)+_0x5ea617['id']),await handleSDKOutput([_0x5ea617],_0x31b125),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a34_0x2fb84d(0x323)]=a34_0x2fb84d(0x200);['description']=a34_0x2fb84d(0x342);async[a34_0x2fb84d(0x209)](_0x312e80){const _0x128661=a34_0x2fb84d,{options:_0x1657f1,args:_0x598bfc}=_0x312e80,_0x3f5132=_0x1657f1,_0x3f545c=_0x598bfc[0x0];if(!_0x3f545c)return console[_0x128661(0x22f)](_0x128661(0x297)),console[_0x128661(0x22f)](_0x128661(0x320)),console[_0x128661(0x22f)](_0x128661(0x2d3)),0x1;let _0x4c5fd9;if(_0x3f5132['file'])_0x4c5fd9=await loadJSON(_0x3f5132[_0x128661(0x1e8)],!![]);else{if(!_0x3f5132[_0x128661(0x323)])return console[_0x128661(0x22f)](_0x128661(0x35a)),console[_0x128661(0x22f)](_0x128661(0x320)),0x1;if(_0x3f5132[_0x128661(0x34e)]===undefined)return console[_0x128661(0x22f)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x128661(0x22f)](_0x128661(0x320)),0x1;let _0x3c50db;_0x3f5132[_0x128661(0x2b7)]&&(_0x3c50db=await loadJSON(_0x3f5132[_0x128661(0x2b7)],![])),_0x4c5fd9={'attributes':{'name':_0x3f5132[_0x128661(0x323)],'description':_0x3f5132[_0x128661(0x34e)]||null,..._0x3c50db!==undefined&&{'sections':_0x3c50db}}};}const {tdx:_0x444da3}=_0x312e80,_0x2d4691=await withSpinner(_0x128661(0x3a0)+_0x3f545c+_0x128661(0x246),()=>_0x444da3['personalization'][_0x128661(0x273)](_0x3f545c,_0x4c5fd9),{'verbose':_0x1657f1['verbose']}),_0x15be23=_0x2d4691[_0x128661(0x24f)];return console[_0x128661(0x22f)](_0x128661(0x34b)+_0x15be23[_0x128661(0x323)]+_0x128661(0x296)+_0x15be23['id']+')'),await handleSDKOutput([_0x15be23],_0x1657f1),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a34_0x2fb84d(0x323)]='ps:pz:init';['description']=a34_0x2fb84d(0x2f2);async[a34_0x2fb84d(0x209)](_0x5394d2){const _0x5e3d49=a34_0x2fb84d,{options:_0x389d87,args:_0x371790}=_0x5394d2,_0xf48271=_0x371790[0x0]||_0x389d87['parentSegment'];if(!_0xf48271)return showParentSegmentNotSetError(_0x5e3d49(0x231)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment'),0x1;const _0x252b56=resolveYamlFile(_0xf48271);if(!existsSync(_0x252b56))return showFileNotFoundError(_0x252b56,_0xf48271),0x1;let _0x2f21dd;try{_0x2f21dd=readFileSync(_0x252b56,_0x5e3d49(0x353));}catch(_0x457e86){const _0x1d3fa6=_0x457e86 instanceof Error?_0x457e86[_0x5e3d49(0x299)]:String(_0x457e86);return console[_0x5e3d49(0x22f)]('Error\x20reading\x20file:\x20'+_0x1d3fa6),0x1;}let _0xaf914;try{_0xaf914=parseDef(_0x2f21dd);}catch(_0x558e0c){const _0xa7d662=_0x558e0c instanceof Error?_0x558e0c[_0x5e3d49(0x299)]:String(_0x558e0c);return console['error'](a34_0x2463e0[_0x5e3d49(0x1b1)](_0x5e3d49(0x1dd)+_0xa7d662)),0x1;}if(_0xaf914['personalization_services']&&_0xaf914['personalization_services'][_0x5e3d49(0x2e8)]>0x0)return console['error'](a34_0x2463e0['yellow'](_0x5e3d49(0x2a9)+_0x252b56)),console[_0x5e3d49(0x22f)](a34_0x2463e0[_0x5e3d49(0x241)]('\x20\x20\x20'+_0xaf914['personalization_services'][_0x5e3d49(0x2e8)]+_0x5e3d49(0x35e))),0x1;!_0xaf914[_0x5e3d49(0x1e4)]&&(_0xaf914[_0x5e3d49(0x1e4)]={'events':[{'name':_0x5e3d49(0x347),'source_table':_0x5e3d49(0x39d)}],'attributes':[{'name':_0x5e3d49(0x29d),'type':_0x5e3d49(0x34c)}],'id_stitching':{'primary_key':_0xaf914['master'][_0x5e3d49(0x30f)]===_0x5e3d49(0x307)?_0x5e3d49(0x256):_0x5e3d49(0x242)}});_0xaf914[_0x5e3d49(0x2ed)]=[{'name':_0x5e3d49(0x2ad),'description':_0x5e3d49(0x313),'trigger_event':_0x5e3d49(0x347),'sections':[{'name':_0x5e3d49(0x361),'criteria':'true','attributes':[_0x5e3d49(0x29d)]}]}];const _0x311ddb=serializeDef(_0xaf914);return writeFileSync(_0x252b56,_0x311ddb,_0x5e3d49(0x353)),console['error'](a34_0x2463e0[_0x5e3d49(0x2f0)]('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a34_0x2463e0[_0x5e3d49(0x2ea)](_0x252b56)),(!_0xaf914['realtime']||_0x2f21dd[_0x5e3d49(0x302)](_0x5e3d49(0x194))===-0x1)&&console[_0x5e3d49(0x22f)](a34_0x2463e0['green']('✔')+_0x5e3d49(0x1b6)),console[_0x5e3d49(0x22f)]('\x0a'+a34_0x2463e0['dim'](_0x5e3d49(0x34f))),console[_0x5e3d49(0x22f)](_0x5e3d49(0x316)+_0x252b56+_0x5e3d49(0x292)),console[_0x5e3d49(0x22f)](_0x5e3d49(0x247)+a34_0x2463e0[_0x5e3d49(0x241)](_0x5e3d49(0x2b0)+_0xf48271)+'\x20to\x20push\x20the\x20configuration'),0x0;}}
|