@treasuredata/tdx 2026.8.3 → 2026.8.4
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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/p13n-command.d.ts +11 -0
- package/dist/commands/p13n-command.d.ts.map +1 -0
- package/dist/commands/p13n-command.js +1 -0
- package/dist/commands/p13n-command.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +9 -1
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +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.d.ts +42 -6
- package/dist/sdk/auth-token.d.ts.map +1 -1
- package/dist/sdk/auth-token.js +1 -1
- package/dist/sdk/auth-token.js.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +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.js +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.d.ts +6 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +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.d.ts +11 -2
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/oauth-refresh.js.map +1 -1
- package/dist/sdk/client/p13n-studio-api-client.d.ts +19 -0
- package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -0
- package/dist/sdk/client/p13n-studio-api-client.js +1 -0
- package/dist/sdk/client/p13n-studio-api-client.js.map +1 -0
- 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.d.ts +6 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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/p13n-studio.d.ts +13 -0
- package/dist/sdk/p13n-studio.d.ts.map +1 -0
- package/dist/sdk/p13n-studio.js +1 -0
- package/dist/sdk/p13n-studio.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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.d.ts.map +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js.map +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.d.ts +2 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/p13n-studio.d.ts +18 -0
- package/dist/sdk/types/p13n-studio.d.ts.map +1 -0
- package/dist/sdk/types/p13n-studio.js +1 -0
- package/dist/sdk/types/p13n-studio.js.map +1 -0
- 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_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;}}
|
|
1
|
+
const a35_0x2f1715=a35_0x2a6d;(function(_0x59c09f,_0x1fa12a){const _0xb89ec=a35_0x2a6d,_0x222031=_0x59c09f();while(!![]){try{const _0x90a5c3=-parseInt(_0xb89ec(0x2b7))/0x1+parseInt(_0xb89ec(0x18a))/0x2+parseInt(_0xb89ec(0x139))/0x3+parseInt(_0xb89ec(0x1dd))/0x4*(parseInt(_0xb89ec(0xbe))/0x5)+-parseInt(_0xb89ec(0xcd))/0x6*(parseInt(_0xb89ec(0x193))/0x7)+parseInt(_0xb89ec(0x1b9))/0x8+parseInt(_0xb89ec(0x1a4))/0x9*(parseInt(_0xb89ec(0x120))/0xa);if(_0x90a5c3===_0x1fa12a)break;else _0x222031['push'](_0x222031['shift']());}catch(_0x1338d6){_0x222031['push'](_0x222031['shift']());}}}(a35_0x5bfd,0xa942c));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';function a35_0x5bfd(){const _0x1abe5c=['Rows:','value','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','realtime:','ps:rt:jn:resume','addBehaviors','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','displayValidateResults','valid','\x20[Job\x20ID:\x20','Default','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','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','Found\x20YAML\x20file:\x20','using\x20the\x20default\x20path:\x20','Listing\x20personalizations\x20for\x20\x27','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','folder-segment','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','/\x20→\x20','limit','parent_segment','Errors:','foreignKey','Fetching\x20parent\x20segment\x20\x27','column','\x0aUsage:\x20tdx\x20ps\x20preview\x20','sections','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','updatedAt','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','\x20\x20Tables:\x201\x20customers\x20+\x20','\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','Status:','events','addAttributesFile','Validate:','segment:parent:desc','output','ps:rt:list','\x0a\x20\x20\x20\x20]','population','\x20parent\x20segment\x20\x27','open','query','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','✔\x20Deleted\x20personalization\x20\x27','green','schemaError','✔\x20Found\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','\x20Added\x20personalization\x20template\x20to\x20','customerGroup','\x20personalization','Error:\x20Token\x20name\x20is\x20required','audienceId:','✔\x20Created\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','Finding\x20service\x20for\x20token...','\x20\x20Columns:\x20','Options:\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','89094QmxMhJ','behavior','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x20\x20\x20\x20\x20\x20','Name:\x20','\x20rows)','segment:parent:push','red','119CyiLwI','FINISHED','Error:\x20--attribute\x20requires\x20a\x20name\x0a','ps:pz:list','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','sampleData','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Session:','joinKey','test','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','workflowId','\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','ps:pz:service:list','\x20Configuration\x20is\x20valid','\x20\x202.\x20Run\x20','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','9ygynqu','in\x20','patchPersonalization','match','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','idStitching','Next\x20steps:','listParents','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Error:\x20Parent\x20segment\x20name\x20is\x20required','Getting\x20personalization\x20\x27','segment','null','audienceId','primaryKey','user_id','utf-8','behaviors','segment:parent:preview','Deleting\x20personalization\x20\x27','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','5941864AWSkfF','Error:\x20File\x20not\x20found:\x20','ps:pz:service:create','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','validateParentYaml','indexOf','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','✔\x20Updated\x20personalization\x20service\x20\x27','\x27\x20(id:\x20','✔\x20Updated\x20personalization\x20\x27','coveragePercent','dim','deleteToken','status:\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','true','Coverage:','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','✔\x20No\x20changes\x20-\x20\x27','.yml','stageCount','Validating\x20RT\x20configuration...','behaviorsFile','Overwrite\x20\x27','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','customerPercent','segment:parent:view','token:','bold','audienceId:\x20','string','allValid','createToken','endsWith','yellow','Available\x20attributes:','598004ueXqyn','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','\x20\x201.\x20Edit\x20','\x0aError:','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','trim','-1d','\x20tdx\x20wf\x20attempt\x20','Fetching\x20customers\x20schema...','parent_id','List\x20RT\x20journeys','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Preview:','No\x20parent\x20segments\x20found','created:','description','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Get\x20SQL\x20query\x20for\x20parent\x20segment','✔\x20Deleted\x20token\x20\x27','sourceTableError','master','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','parentSegment','/app/dw/parentSegments/','listJourneys','Source:','/sessions/','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','Error:','sort','Master\x20Table','id:\x20','Resolving\x20parent\x20segment\x20\x27','dirname','%)\x20','eventKind','timezone','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','interval','state','Error:\x20--behavior\x20requires\x20a\x20name\x0a','list','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','segment:parent:fields','displayMasterInfo','Show\x20a\x20specific\x20realtime\x20personalization','realtime_enabled','\x0aChanges\x20to\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','repeat','\x20Context\x20set:\x20','No\x20personalization\x20services\x20configured','\x20parent\x20segment','✔\x20Renamed\x20directory\x20to\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','processedRows','last_page_viewed','`\x20to\x20download\x20the\x20configuration\x20first','\x27\x20for\x20service\x20\x27','column_type','displaySummary','type','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','entryCriteria','segment:parent:update','realtime','workflowAttemptId','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','scheduleType','\x22,\x20\x22type\x22:\x20\x22','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','pushParentYaml','Listing\x20RT\x20journeys\x20for\x20\x27','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','Enriched:','customers','Deleting\x20token\x20\x27','file','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20kill','allowedIps','\x20\x20No\x20sample\x20data\x20available','createdAt','\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','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','ps:pz:service:delete','Master:','List\x20available\x20fields\x20for\x20segmentation','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Error:\x20Service\x20ID\x20is\x20required','\x20to\x20push\x20the\x20configuration','preview','Output\x20Database:','identifier','some','Fetching\x20SQL\x20for\x20\x27','yes','Behavior:','errors','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','getPersonalization','Attributes:','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Aborted.','segment:parent:list','updated:','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','displayAttributesStats','Audience\x20ID:','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Error:\x20Token\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','number','patch','\x20--behavior\x20\x22<name>\x22','Fetching\x20behavior\x20list...','\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\x20Note:\x20','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','\x27\x20with\x20ID:\x20','\x0aNo\x20sample\x20data\x20available','ps:pz:service:token:create','columns','rowCount','\x20stage','Updated','\x20--behavior\x20\x22','displayPreviewResults','✔\x20Found\x20personalization\x20\x27','ps:pz:init','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','column_name','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Attribute:','No\x20RT-enabled\x20parent\x20segments\x20found','ps:pz:service:update','.yaml','Error:\x20--database\x20and\x20--table\x20are\x20required','Parent\x20segment:\x20','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Create\x20parent\x20segment\x20\x27','YAML\x20file:\x20','ignore','.customers)','public','Updating','site','totalEvents','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','tokens','displayBehaviorsStats','displaySampleData','segment:parent:pull','enriched','identifier:\x20','launched','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Error\x20parsing\x20YAML:\x20','\x20total','reduce','Updating\x20personalization\x20service\x20\x27','segment:parent:create','✔\x20Updated\x20parent\x20segment\x20\x27','Creating','Customers:','Create\x20a\x20realtime\x20personalization\x20entity','\x20No\x20changes\x20-\x20','RT\x202.0\x20Validate:','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','/\x20directories\x20exist.','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','label','SELECT\x20*\x20FROM\x20','data','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','\x20\x20\x20\x20-\x20','apply','schemaValid','paused','Join\x20on:','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','use','displayPreviewHints','json','/attempt/','ps:pz:service:show','createPersonalization','attribute','/{name}.yml\x0a','No\x20parent\x20segments\x20match\x20pattern:\x20','tdx\x20ps\x20preview\x20','cyan','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Creating\x20token\x20\x27','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Schema\x20saved\x20to\x20','Personalization:','getParentFull','\x20\x20Database:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','/app/workflows/','session','Attributes','filter','ps:rt:validate','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','workflowSessionId','toFixed','getCurrentConfigVersion','\x0a\x20\x20\x20\x20}','\x27...','isDirectory','behavior_','RT\x20Journey\x20ID:\x20','listPersonalizations','1232164OPKWgx','keyEventId:','Fetching\x20sample\x20data...','✔\x20Created\x20parent\x20segment\x20\x27','getParentSQL','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','ps:rt:jn:pause','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Validating\x20configuration...','Updating\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20','\x20--attribute\x20\x22','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','replace','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','tdx\x20ps\x20push\x20','\x20(paused)','\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','keyEventCriteria','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','includeSensitive:','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','payload','displayRealtimeInfo','any','message','jobId','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','collectSchema','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','/\x20directory.\x0a','resolveParentId','Events:','10LiUbQc','SQL\x20query:\x0a','verbose','keyEventId','setJobId','\x27\x20is\x20up\x20to\x20date','No\x20personalizations\x20configured','ps:pz:service:token:delete','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','all','Error\x20reading\x20file:\x20','execute','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','unref','double','226986eLeJNI','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','darwin','allowed\x20IPs:','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','\x0aNew\x20parent\x20segment\x20\x27','Listing\x20personalization\x20services\x20for\x20\x27','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','ps:pz:delete','\x20configured','log','text','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','table','\x27\x20and\x20run\x20workflow?','previewParentYaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','getOutputDatabaseName','ps:pz:show','keys','Analyzing\x20changes...','toLowerCase','matchedCount','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Columns:','\x20service','name','Join:','/\x20and\x20','td_client_id','\x20=\x20','get','✔\x20Query\x20completed:\x20Processed\x20','\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','displayColumns','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x27\x20is\x20already\x20up\x20to\x20date','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','platform','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\x20+\x20[','start','error','includeSensitive','personalization_services','\x20\x20\x20\x20','personalizationServices','Listing\x20fields\x20for\x20\x27','Fetching\x20personalization\x20service\x20\x27','jsonl','win32','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','addBehaviorsFile','length','stop','stitchingKeys','ID\x20Stitching:','✔\x20Retrieved\x20RT\x20configuration\x20version','Site:\x20','\x20RT-enabled\x20parent\x20segment','Created','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x5c$&','no\x20tokens\x20configured','create','map','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','localeCompare','List\x20parent\x20segments','Options:','(id:\x20','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','sourceTableValid','segment:parent:validate','database','personalization','Apply\x20changes\x20to\x20\x27','⚡\x20Enabled','Pattern:\x20','attributes','Available\x20behaviors:','1380040tilxiS','ps:rt:configuration_versions','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','folderId','\x20Opening\x20','customersWithEvents','single','formatSchemaJson','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','getBehaviorNames','Fetching\x20current\x20configuration\x20for\x20\x27','Personalization\x20service\x20description','\x20to\x20configure\x20your\x20personalization\x20service','\x0a⚠️\x20\x20Migrating:\x20','\x20is\x20already\x20up\x20to\x20date','ps:pz:create','relationships','sections:','format','scheduleOption','Delete\x20a\x20personalization\x20service','stats','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Behaviors','parent_segments','4032891rlXQCI','pauseJourney','Deleting\x20personalization\x20service\x20\x27','✔\x20Created\x20token\x20\x27','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','resumeJourney','Pause\x20activations\x20in\x20an\x20RT\x20journey','page_view','✔\x20Deleted\x20personalization\x20service\x20\x27','Error:\x20Personalization\x20ID\x20is\x20required','Update\x20a\x20realtime\x20personalization\x20entity','\x0a⚠️\x20\x20Both\x20','join','Database:\x20','\x20--enriched','Error:\x20Service\x20name\x20is\x20required','Options\x20(one\x20required):\x0a'];a35_0x5bfd=function(){return _0x1abe5c;};return a35_0x5bfd();}import a35_0x49f875 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 a35_0x2bfa77 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=a35_0x2f1715(0x138),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x44c89d){const _0x1ebff0=a35_0x2f1715,_0x5ef9a6=process[_0x1ebff0(0xf5)],_0x5edabe=_0x5ef9a6===_0x1ebff0(0xcf)?_0x1ebff0(0x177):_0x5ef9a6===_0x1ebff0(0x101)?_0x1ebff0(0xf8):'xdg-open';spawn(_0x5edabe,[_0x44c89d],{'detached':!![],'stdio':_0x1ebff0(0x26e)})[_0x1ebff0(0xcb)]();}function migrateLegacyDirectory(){const _0x16b2ac=a35_0x2f1715;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x283d35=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x283d35[_0x16b2ac(0x2b3)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x16b2ac(0xf9)](a35_0x2bfa77[_0x16b2ac(0x1db)](_0x16b2ac(0x144)+LEGACY_PARENT_SEGMENT_DIR+_0x16b2ac(0xea)+PARENT_SEGMENT_DIR+_0x16b2ac(0x289))),console['error'](a35_0x2bfa77[_0x16b2ac(0x1c4)](_0x16b2ac(0x2c6)+LEGACY_PARENT_SEGMENT_DIR+_0x16b2ac(0xbb))),![];console[_0x16b2ac(0xf9)](a35_0x2bfa77['yellow'](_0x16b2ac(0x12d)+LEGACY_PARENT_SEGMENT_DIR+_0x16b2ac(0x15f)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a35_0x2bfa77[_0x16b2ac(0x17b)](_0x16b2ac(0x212)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x4b9fe7){const _0x691a1d=_0x4b9fe7 instanceof Error?_0x4b9fe7[_0x16b2ac(0xb5)]:String(_0x4b9fe7);return console[_0x16b2ac(0xf9)](a35_0x2bfa77[_0x16b2ac(0x192)]('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x691a1d+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0xf1ac19){return migrateLegacyDirectory(),super['run'](_0xf1ac19);}}function resolveYamlFile(_0x172619){const _0x38de6a=a35_0x2f1715;if(_0x172619[_0x38de6a(0x1da)](_0x38de6a(0x1cc))||_0x172619['endsWith'](_0x38de6a(0x268)))return _0x172619;return a35_0x49f875['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x172619)+_0x38de6a(0x1cc));}function formatProgressMessage(_0x13ca3a){const _0x16e9a9=a35_0x2f1715,_0x240599=_0x13ca3a[_0x16e9a9(0x1a7)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x240599){const [,_0x4abd58,_0x19c212,_0x25bd93='']=_0x240599;return a35_0x2bfa77[_0x16e9a9(0x1c4)](_0x4abd58+':')+'\x20'+_0x19c212+a35_0x2bfa77[_0x16e9a9(0x1c4)](_0x25bd93);}return a35_0x2bfa77[_0x16e9a9(0x1c4)](_0x13ca3a);}function showFileNotFoundError(_0x56a9fc,_0x5381e3){const _0x526272=a35_0x2f1715;console['error'](a35_0x2bfa77[_0x526272(0x192)](_0x526272(0x1ba)+_0x56a9fc+'\x0a')),console[_0x526272(0xf9)](a35_0x2bfa77[_0x526272(0x29f)](_0x526272(0x2a2)+_0x5381e3+_0x526272(0x216)));}function displayRealtimeValidation(_0x366a35){const _0x68672e=a35_0x2f1715;if(!_0x366a35[_0x68672e(0x21e)])return;const _0xd9104f=_0x366a35[_0x68672e(0x21e)],_0x468dfb=_0xd9104f['enabled']?a35_0x2bfa77['green'](_0x68672e(0x11c)):a35_0x2bfa77[_0x68672e(0x1db)]('⚡\x20Not\x20enabled');console[_0x68672e(0xf9)]('\x0a'+a35_0x2bfa77['dim']('RT\x202.0:')+'\x20'+_0x468dfb);if(_0xd9104f[_0x68672e(0x16e)]&&_0xd9104f['events'][_0x68672e(0x104)]>0x0){console['error']('\x20\x20'+a35_0x2bfa77[_0x68672e(0x1c4)](_0x68672e(0xbd))+'\x20'+_0xd9104f['events'][_0x68672e(0x104)]+'\x20configured');for(const _0x270dc0 of _0xd9104f[_0x68672e(0x16e)]){const _0xa3be62=_0x270dc0[_0x68672e(0x117)]===![]?a35_0x2bfa77[_0x68672e(0x192)]('✘'):a35_0x2bfa77[_0x68672e(0x17b)]('✔');console[_0x68672e(0xf9)](_0x68672e(0xfc)+_0xa3be62+'\x20'+_0x270dc0[_0x68672e(0xe8)]),_0x270dc0[_0x68672e(0x1f0)]&&console[_0x68672e(0xf9)]('\x20\x20\x20\x20\x20\x20'+a35_0x2bfa77['red'](_0x270dc0[_0x68672e(0x1f0)]));}}if(_0xd9104f[_0x68672e(0x11e)]&&_0xd9104f[_0x68672e(0x11e)][_0x68672e(0x104)]>0x0){console['error']('\x20\x20'+a35_0x2bfa77['dim'](_0x68672e(0x244))+'\x20'+_0xd9104f[_0x68672e(0x11e)]['length']+_0x68672e(0xd7));for(const _0x27e4a0 of _0xd9104f[_0x68672e(0x11e)]){const _0x444612=_0x27e4a0[_0x68672e(0x153)]?a35_0x2bfa77[_0x68672e(0x17b)]('✔'):a35_0x2bfa77['red']('✘');console[_0x68672e(0xf9)](_0x68672e(0xfc)+_0x444612+'\x20'+_0x27e4a0[_0x68672e(0xe8)]+'\x20'+a35_0x2bfa77[_0x68672e(0x1c4)]('('+_0x27e4a0[_0x68672e(0x21a)]+')'));}}if(_0xd9104f[_0x68672e(0x1a9)]){const _0x193a0c=_0xd9104f[_0x68672e(0x1a9)][_0x68672e(0x106)]?.[_0x68672e(0x104)]?_0x68672e(0xf7)+_0xd9104f[_0x68672e(0x1a9)][_0x68672e(0x106)]['join'](',\x20')+']':'';console[_0x68672e(0xf9)]('\x20\x20'+a35_0x2bfa77['dim'](_0x68672e(0x107))+'\x20'+_0xd9104f[_0x68672e(0x1a9)][_0x68672e(0x1b2)]+_0x193a0c);}if(_0xd9104f['personalizationServices']&&_0xd9104f[_0x68672e(0xfd)][_0x68672e(0x104)]>0x0){console[_0x68672e(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x68672e(0x1c4)](_0x68672e(0x2a4))+'\x20'+_0xd9104f[_0x68672e(0xfd)][_0x68672e(0x104)]+_0x68672e(0xe7)+(_0xd9104f[_0x68672e(0xfd)][_0x68672e(0x104)]!==0x1?'s':''));for(const _0x59caba of _0xd9104f[_0x68672e(0xfd)]){console[_0x68672e(0xf9)]('\x20\x20\x20\x20-\x20'+_0x59caba['name']);}}}function showParentSegmentNotSetError(_0x34dade){const _0x5def84=a35_0x2f1715;console['error'](a35_0x2bfa77['yellow'](_0x5def84(0x2a7))),console[_0x5def84(0xf9)](_0x34dade);}export class ParentSegmentListCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x247);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x113);async[a35_0x2f1715(0xc9)](_0x3d1a1a){const _0x4e58a7=a35_0x2f1715,{options:_0x321b2d,args:_0xe4da65,tdx:_0x31bae4}=_0x3d1a1a,_0x1b503d=_0xe4da65[0x0];_0x321b2d['verbose']&&(console[_0x4e58a7(0xf9)](_0x4e58a7(0x109)+_0x321b2d['site']),_0x1b503d&&console[_0x4e58a7(0xf9)](_0x4e58a7(0x11d)+_0x1b503d));const _0x51cf56=await withSpinner(_0x1b503d?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x1b503d+_0x4e58a7(0x2b2):'Listing\x20parent\x20segments...',()=>_0x31bae4[_0x4e58a7(0x1af)][_0x4e58a7(0x1ab)](),{'verbose':_0x321b2d[_0x4e58a7(0xc0)]});let _0x376e81=_0x51cf56[_0x4e58a7(0x28d)];if(_0x1b503d){const _0x3f4b36=_0x1b503d[_0x4e58a7(0x2c5)](/[.+^${}()|[\]\\]/g,_0x4e58a7(0x10d))[_0x4e58a7(0x2c5)](/\*/g,'.*')[_0x4e58a7(0x2c5)](/\?/g,'.'),_0x243bc1=new RegExp('^'+_0x3f4b36+'$','i');_0x376e81=_0x376e81[_0x4e58a7(0x2ab)](_0x1ab772=>_0x243bc1[_0x4e58a7(0x19c)](_0x1ab772[_0x4e58a7(0x11e)][_0x4e58a7(0xe8)]));}_0x376e81[_0x4e58a7(0x1fa)]((_0x2bb907,_0x5b6536)=>_0x2bb907[_0x4e58a7(0x11e)]['name'][_0x4e58a7(0x112)](_0x5b6536[_0x4e58a7(0x11e)][_0x4e58a7(0xe8)])),console['error']('✔\x20Found\x20'+_0x376e81['length']+_0x4e58a7(0x211)+(_0x376e81[_0x4e58a7(0x104)]!==0x1?'s':''));const _0x17389a=_0x14dc13=>{const _0x50427d=_0x4e58a7;return getConsoleNextUrl(_0x321b2d[_0x50427d(0x272)],_0x50427d(0x1f4)+_0x14dc13);};if(_0x321b2d['format']===_0x4e58a7(0x297)||_0x321b2d[_0x4e58a7(0x132)]==='jsonl'){const _0x47a9db=_0x376e81[_0x4e58a7(0x110)](_0x116ba9=>({..._0x116ba9,'url':_0x17389a(_0x116ba9['id'])}));await handleSDKOutput(_0x47a9db,_0x321b2d);}else{if(_0x376e81[_0x4e58a7(0x104)]===0x0)_0x1b503d?console['log'](_0x4e58a7(0x29d)+_0x1b503d):console[_0x4e58a7(0xd8)](_0x4e58a7(0x1ea));else for(const _0xbc01c8 of _0x376e81){const _0x3c021b=_0xbc01c8[_0x4e58a7(0x11e)][_0x4e58a7(0x175)]?a35_0x2bfa77[_0x4e58a7(0x1c4)]('\x20('+formatRows(_0xbc01c8[_0x4e58a7(0x11e)][_0x4e58a7(0x175)])+')'):'',_0x16e080=hyperlink(_0xbc01c8[_0x4e58a7(0x11e)][_0x4e58a7(0xe8)],_0x17389a(_0xbc01c8['id']));console[_0x4e58a7(0xd8)]('👥\x20'+_0x16e080+_0x3c021b);}}return 0x0;}}function a35_0x2a6d(_0x5894ec,_0x313831){_0x5894ec=_0x5894ec-0xac;const _0x5bfd24=a35_0x5bfd();let _0x2a6db8=_0x5bfd24[_0x5894ec];return _0x2a6db8;}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a35_0x2f1715(0x281);['description']='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a35_0x2f1715(0xc9)](_0x187e26){const _0xa79e20=a35_0x2f1715,{options:_0xa2d0,args:_0x41942f,tdx:_0x1ad41b}=_0x187e26;console[_0xa79e20(0xf9)](_0xa79e20(0x1c7)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0xa79e20(0x228));const _0x28edc3=_0xa2d0;if(_0x41942f[_0xa79e20(0x104)]===0x0)return console[_0xa79e20(0xf9)](a35_0x2bfa77[_0xa79e20(0x192)](_0xa79e20(0x1ad))),console['error'](_0xa79e20(0x237)),0x1;const _0x2a2c9a=_0x41942f[0x0];if(!_0x28edc3['database']||!_0x28edc3[_0xa79e20(0xdb)])return console['error'](_0xa79e20(0x269)),console[_0xa79e20(0xf9)](_0xa79e20(0x237)),0x1;_0x28edc3[_0xa79e20(0xc0)]&&(console[_0xa79e20(0xf9)](_0xa79e20(0x109)+_0x28edc3[_0xa79e20(0x272)]),console[_0xa79e20(0xf9)](_0xa79e20(0x18f)+_0x2a2c9a),console[_0xa79e20(0xf9)](_0xa79e20(0x146)+_0x28edc3[_0xa79e20(0x119)]),console['error']('Table:\x20'+_0x28edc3[_0xa79e20(0xdb)]));const _0x18aa0d=await loadJSONFromOptions(_0x28edc3[_0xa79e20(0x11e)],_0x28edc3['attributesFile']),_0xb0b271=await loadJSONFromOptions(_0x28edc3['behaviors'],_0x28edc3[_0xa79e20(0x1cf)]),_0x1dae42=await loadJSONFromOptions(_0x28edc3[_0xa79e20(0x180)],_0x28edc3['customerGroupFile']),_0x56ef5e={'name':_0x2a2c9a,'description':_0x28edc3[_0xa79e20(0x1ec)],'scheduleType':_0x28edc3[_0xa79e20(0x221)],'scheduleOption':_0x28edc3[_0xa79e20(0x133)],'timezone':_0x28edc3[_0xa79e20(0x201)],'master':{'parentDatabaseName':_0x28edc3[_0xa79e20(0x119)],'parentTableName':_0x28edc3[_0xa79e20(0xdb)]},'attributes':_0x18aa0d,'behaviors':_0xb0b271,'customerGroup':_0x1dae42},_0x1c2a29=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x2a2c9a+_0xa79e20(0x2b2),()=>_0x1ad41b[_0xa79e20(0x1af)]['createParent'](_0x56ef5e),{'verbose':_0xa2d0[_0xa79e20(0xc0)]}),_0x580e3f=_0x1c2a29[_0xa79e20(0x28d)];return console['error'](_0xa79e20(0x2ba)+_0x580e3f['name']+_0xa79e20(0x257)+_0x580e3f['id']),await handleSDKOutput([_0x580e3f],_0xa2d0),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a35_0x2f1715(0x21d);['description']=a35_0x2f1715(0x233);async[a35_0x2f1715(0xc9)](_0x1e7930){const _0x2dd979=a35_0x2f1715,{options:_0x1efd76,args:_0x27db42,tdx:_0xc23305}=_0x1e7930;console['error']('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x2dd979(0x224)+_0x2dd979(0x228));const _0x244549=_0x1efd76;if(_0x27db42['length']===0x0)return console[_0x2dd979(0xf9)](a35_0x2bfa77[_0x2dd979(0x192)](_0x2dd979(0x1ad))),console['error'](_0x2dd979(0x116)),0x1;const _0x19c08b=_0x27db42[0x0];_0x244549[_0x2dd979(0xc0)]&&(console[_0x2dd979(0xf9)](_0x2dd979(0x109)+_0x244549['site']),console['error'](_0x2dd979(0x26a)+_0x19c08b));const _0x52b8a8=await withSpinner(_0x2dd979(0x12a)+_0x19c08b+_0x2dd979(0x2b2),()=>_0xc23305[_0x2dd979(0x1af)][_0x2dd979(0x2a5)](_0x19c08b),{'verbose':_0x244549[_0x2dd979(0xc0)]}),_0xf0d6fd=_0x52b8a8[_0x2dd979(0x28d)],_0x3765e8=await loadJSONFromOptions(_0x244549['addAttributes'],_0x244549[_0x2dd979(0x16f)]),_0x39c125=await loadJSONFromOptions(_0x244549[_0x2dd979(0x150)],_0x244549[_0x2dd979(0x103)]),_0x127e33={'name':_0xf0d6fd[_0x2dd979(0xe8)],'description':_0x244549['description']!==undefined?_0x244549[_0x2dd979(0x1ec)]:_0xf0d6fd['description'],'scheduleType':_0x244549[_0x2dd979(0x221)]!==undefined?_0x244549[_0x2dd979(0x221)]:_0xf0d6fd[_0x2dd979(0x221)],'scheduleOption':_0x244549[_0x2dd979(0x133)]!==undefined?_0x244549[_0x2dd979(0x133)]:_0xf0d6fd[_0x2dd979(0x133)],'timezone':_0x244549[_0x2dd979(0x201)]!==undefined?_0x244549['timezone']:_0xf0d6fd[_0x2dd979(0x201)],'master':_0xf0d6fd['master'],'attributes':_0x3765e8?[..._0xf0d6fd[_0x2dd979(0x11e)]||[],..._0x3765e8]:_0xf0d6fd[_0x2dd979(0x11e)],'behaviors':_0x39c125?[..._0xf0d6fd['behaviors']||[],..._0x39c125]:_0xf0d6fd['behaviors'],'customerGroup':_0xf0d6fd[_0x2dd979(0x180)]},_0x19d9dc=await withSpinner(_0x2dd979(0x2c1)+_0x19c08b+_0x2dd979(0x2b2),()=>_0xc23305['segment']['updateParent'](_0x19c08b,_0x127e33),{'verbose':_0x244549[_0x2dd979(0xc0)]}),_0x1a9eb7=_0x19d9dc[_0x2dd979(0x28d)];return console[_0x2dd979(0xf9)](_0x2dd979(0x282)+_0x1a9eb7[_0x2dd979(0xe8)]+'\x27'),await handleSDKOutput([_0x1a9eb7],_0x244549),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x278);['description']=a35_0x2f1715(0xba);async[a35_0x2f1715(0xc9)](_0x481c21){const _0x2ef816=a35_0x2f1715,{options:_0x3c5234,args:_0x68c721,tdx:_0x52ed4f}=_0x481c21,_0xc99be9=_0x3c5234,_0x30fc29=_0x68c721[0x0]||_0x3c5234[_0x2ef816(0x1f3)];if(!_0x30fc29)return showParentSegmentNotSetError(_0x2ef816(0xaf)+_0x2ef816(0x18d)),0x1;if(_0xc99be9[_0x2ef816(0x295)]&&_0xc99be9['output'])return console[_0x2ef816(0xf9)](a35_0x2bfa77[_0x2ef816(0x192)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console['error'](a35_0x2bfa77['dim'](_0x2ef816(0x28a))),console[_0x2ef816(0xf9)](a35_0x2bfa77[_0x2ef816(0x1c4)](_0x2ef816(0x159)+PARENT_SEGMENT_DIR+_0x2ef816(0x29c))),console['error'](a35_0x2bfa77[_0x2ef816(0x29f)]('Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u')),0x1;const _0x21ca33=_0xc99be9[_0x2ef816(0x172)]||a35_0x49f875[_0x2ef816(0x145)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x30fc29)+_0x2ef816(0x1cc));_0xc99be9[_0x2ef816(0xc0)]&&(console[_0x2ef816(0xf9)]('Site:\x20'+_0xc99be9[_0x2ef816(0x272)]),console[_0x2ef816(0xf9)](_0x2ef816(0x26a)+_0x30fc29),console[_0x2ef816(0xf9)]('Output\x20file:\x20'+_0x21ca33));const _0x177d06=await withSpinner(_0x2ef816(0x164)+_0x30fc29+'\x27...',()=>_0x52ed4f[_0x2ef816(0x1af)]['pullParentYaml'](_0x30fc29),{'verbose':_0xc99be9[_0x2ef816(0xc0)]}),_0xcd484b=_0x177d06[_0x2ef816(0x28d)];if(existsSync(_0x21ca33)){const _0x4c7d88=readFileSync(_0x21ca33,_0x2ef816(0x1b4)),_0x490fcb=generateDiff(_0x4c7d88,_0xcd484b);if(!hasChanges(_0x490fcb))console[_0x2ef816(0xf9)](a35_0x2bfa77[_0x2ef816(0x17b)]('✔')+_0x2ef816(0x286)+a35_0x2bfa77[_0x2ef816(0x29f)](_0x21ca33)+_0x2ef816(0x12e));else{console[_0x2ef816(0xf9)](_0x2ef816(0x20c)+_0x21ca33+'\x27:'),console[_0x2ef816(0xf9)]('─'[_0x2ef816(0x20e)](0x3c)),console[_0x2ef816(0xf9)](formatDiffWithColors(_0x490fcb)),console['error']('─'[_0x2ef816(0x20e)](0x3c));if(!_0xc99be9[_0x2ef816(0x23f)]){if(!isInteractive())return console[_0x2ef816(0xf9)](a35_0x2bfa77[_0x2ef816(0x192)](_0x2ef816(0x1e0)),_0x2ef816(0xf2)),console['error'](a35_0x2bfa77[_0x2ef816(0x1c4)](_0x2ef816(0x13d))),0x1;const _0x39c36f=await confirmKey(_0x2ef816(0x1d0)+_0x21ca33+'\x27?');if(!_0x39c36f)return console[_0x2ef816(0xf9)](a35_0x2bfa77[_0x2ef816(0x1db)]('Aborted.')),0x1;}writeFileSync(_0x21ca33,_0xcd484b,'utf-8'),console['error'](a35_0x2bfa77[_0x2ef816(0x17b)]('✔')+_0x2ef816(0xb7)+a35_0x2bfa77[_0x2ef816(0x29f)](_0x21ca33));}}else{const _0x591db6=a35_0x49f875[_0x2ef816(0x1fe)](_0x21ca33);!existsSync(_0x591db6)&&mkdirSync(_0x591db6,{'recursive':!![]}),writeFileSync(_0x21ca33,_0xcd484b,_0x2ef816(0x1b4)),console[_0x2ef816(0xf9)](a35_0x2bfa77[_0x2ef816(0x17b)]('✔')+_0x2ef816(0xb7)+a35_0x2bfa77[_0x2ef816(0x29f)](_0x21ca33));}return saveSessionContext({'parent_segment':_0x30fc29},_0xc99be9[_0x2ef816(0x2a9)]),console[_0x2ef816(0xf9)](a35_0x2bfa77['green']('✔')+_0x2ef816(0x20f)+a35_0x2bfa77[_0x2ef816(0x1c4)](_0x2ef816(0x161))+_0x2ef816(0xec)+a35_0x2bfa77[_0x2ef816(0x29f)](_0x30fc29)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x191);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0xf6);async['execute'](_0x545238){const _0x2e3f65=a35_0x2f1715,{options:_0x111b45,args:_0x18e8fa,tdx:_0x5ee898}=_0x545238,_0x1165ee=_0x111b45,_0x39c23f=_0x18e8fa[0x0]||_0x111b45[_0x2e3f65(0x1f3)];if(!_0x39c23f)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'+_0x2e3f65(0xde)),0x1;const _0x502fc5=resolveYamlFile(_0x39c23f);if(!existsSync(_0x502fc5))return showFileNotFoundError(_0x502fc5,_0x39c23f),0x1;_0x1165ee[_0x2e3f65(0xc0)]&&(console[_0x2e3f65(0xf9)](_0x2e3f65(0x109)+_0x1165ee[_0x2e3f65(0x272)]),console[_0x2e3f65(0xf9)](_0x2e3f65(0x26d)+_0x502fc5));let _0x45d18d;try{_0x45d18d=readFileSync(_0x502fc5,'utf-8');}catch(_0x2004f4){const _0x20546c=_0x2004f4 instanceof Error?_0x2004f4[_0x2e3f65(0xb5)]:String(_0x2004f4);return console[_0x2e3f65(0xf9)]('Error\x20reading\x20file:\x20'+_0x20546c),0x1;}const _0x992c3=await withSpinner(_0x2e3f65(0xe2),()=>_0x5ee898[_0x2e3f65(0x1af)][_0x2e3f65(0x225)](_0x45d18d),{'verbose':_0x1165ee[_0x2e3f65(0xc0)]}),_0xbcffda=_0x992c3[_0x2e3f65(0x28d)],{isNew:_0x12e0a5,name:_0x443fa7,hasChanges:_0x3a07b7,diffFormatted:_0x59e2ef}=_0xbcffda;if(!_0x3a07b7)return console['error'](_0x2e3f65(0x1cb)+_0x443fa7+_0x2e3f65(0xf3)),0x0;_0x12e0a5?console[_0x2e3f65(0xf9)](_0x2e3f65(0xd2)+_0x443fa7+'\x27:'):console[_0x2e3f65(0xf9)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x443fa7+'\x27:');console[_0x2e3f65(0xf9)]('─'[_0x2e3f65(0x20e)](0x3c)),console[_0x2e3f65(0xf9)](_0x59e2ef),console[_0x2e3f65(0xf9)]('─'[_0x2e3f65(0x20e)](0x3c));const _0x3f70d7=_0x12e0a5?_0x2e3f65(0x26c)+_0x443fa7+'\x27?':_0x2e3f65(0x11b)+_0x443fa7+'\x27?';if(!_0x1165ee['yes']){if(!isInteractive())return console[_0x2e3f65(0xf9)](a35_0x2bfa77[_0x2e3f65(0x192)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a35_0x2bfa77['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4ed8e9=await confirmKey(_0x3f70d7);if(!_0x4ed8e9)return console['error'](a35_0x2bfa77[_0x2e3f65(0x1db)]('Aborted.')),0x1;}const _0x545ef7=_0x12e0a5?_0x2e3f65(0x283):_0x2e3f65(0x271),_0x30b0a1=await withSpinner(_0x545ef7+_0x2e3f65(0x176)+_0x443fa7+'\x27...',()=>_0xbcffda[_0x2e3f65(0x290)](),{'verbose':_0x1165ee[_0x2e3f65(0xc0)]}),_0x335de6=_0x30b0a1[_0x2e3f65(0x28d)],_0x428d93=getConsoleNextUrl(_0x1165ee[_0x2e3f65(0x272)],_0x2e3f65(0x1f4)+_0x335de6['id']),_0x4a5f7c=_0x12e0a5?_0x2e3f65(0x10b):_0x2e3f65(0x25d);return console[_0x2e3f65(0xf9)]('✔\x20'+_0x4a5f7c+_0x2e3f65(0x176)+_0x335de6[_0x2e3f65(0xe8)]+'\x27'),console[_0x2e3f65(0xf9)]('\x20\x20'+_0x428d93),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x118);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x249);async[a35_0x2f1715(0xc9)](_0x112fac){const _0x16d757=a35_0x2f1715,{options:_0x10ce3,args:_0x582232,tdx:_0x2a5133}=_0x112fac,_0x57fd90=_0x10ce3,_0x5a469a=_0x582232[0x0]||_0x10ce3[_0x16d757(0x1f3)];if(!_0x5a469a)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+_0x16d757(0x188)+_0x16d757(0x15b)+_0x16d757(0x1b8)+_0x16d757(0xf4)),0x1;const _0x432f73=resolveYamlFile(_0x5a469a);if(!existsSync(_0x432f73))return showFileNotFoundError(_0x432f73,_0x5a469a),0x1;_0x57fd90['verbose']&&(console[_0x16d757(0xf9)]('Site:\x20'+_0x57fd90[_0x16d757(0x272)]),console[_0x16d757(0xf9)]('YAML\x20file:\x20'+_0x432f73));let _0x52e421;try{_0x52e421=readFileSync(_0x432f73,_0x16d757(0x1b4));}catch(_0x5a0183){const _0xb83409=_0x5a0183 instanceof Error?_0x5a0183[_0x16d757(0xb5)]:String(_0x5a0183);return console['error'](_0x16d757(0xc8)+_0xb83409),0x1;}const _0x13d7b2=createCommandSpinner(a35_0x2bfa77[_0x16d757(0x1c4)](_0x16d757(0x2c0)),{'verbose':_0x57fd90[_0x16d757(0xc0)]});_0x13d7b2[_0x16d757(0xf8)]();const _0x116e6b={'onProgress':_0x484968=>{const _0xf6afdb=_0x16d757;_0x13d7b2[_0xf6afdb(0xd9)]=formatProgressMessage(_0x484968);}};if(_0x57fd90[_0x16d757(0x1f1)])_0x116e6b[_0x16d757(0x1f1)]=!![];if(_0x57fd90[_0x16d757(0x279)])_0x116e6b[_0x16d757(0x279)]=!![];_0x57fd90[_0x16d757(0x29b)]&&(_0x116e6b[_0x16d757(0x29b)]=_0x57fd90[_0x16d757(0x29b)]);_0x57fd90[_0x16d757(0x18b)]&&(_0x116e6b[_0x16d757(0x18b)]=_0x57fd90[_0x16d757(0x18b)]);if(_0x57fd90[_0x16d757(0x203)])_0x116e6b[_0x16d757(0x203)]=_0x57fd90[_0x16d757(0x203)];let _0x1b9a7f;try{_0x1b9a7f=await _0x2a5133[_0x16d757(0x1af)][_0x16d757(0x1bd)](_0x52e421,_0x116e6b),_0x13d7b2[_0x16d757(0x105)]();}catch(_0x54ed43){_0x13d7b2['stop']();throw _0x54ed43;}const _0x53668c=_0x57fd90[_0x16d757(0x203)]||_0x16d757(0x1e3);return this[_0x16d757(0x152)](_0x1b9a7f,_0x116e6b,_0x432f73,_0x53668c),_0x1b9a7f['allValid']?0x0:0x1;}[a35_0x2f1715(0x152)](_0x185b8b,_0x55b60d,_0x487662,_0x54b606){const _0x49db5f=a35_0x2f1715;console['error']('\x0a'+a35_0x2bfa77[_0x49db5f(0x1d5)](_0x49db5f(0x170))+'\x20'+_0x185b8b[_0x49db5f(0xe8)]),console[_0x49db5f(0xf9)]('═'[_0x49db5f(0x20e)](0x3c)),this[_0x49db5f(0x209)](_0x185b8b);if(typeof _0x55b60d[_0x49db5f(0x29b)]===_0x49db5f(0x1d7)){this[_0x49db5f(0x24a)](_0x185b8b),this[_0x49db5f(0x219)](_0x185b8b),this[_0x49db5f(0x296)](_0x487662,_0x54b606,_0x49db5f(0x29b),_0x55b60d[_0x49db5f(0x29b)]);return;}if(_0x55b60d[_0x49db5f(0x29b)]===!![]){this[_0x49db5f(0x24a)](_0x185b8b),this[_0x49db5f(0x219)](_0x185b8b),this[_0x49db5f(0x296)](_0x487662,_0x54b606,_0x49db5f(0x11e));return;}if(typeof _0x55b60d[_0x49db5f(0x18b)]==='string'){this[_0x49db5f(0x276)](_0x185b8b,_0x54b606),this[_0x49db5f(0x219)](_0x185b8b),this['displayPreviewHints'](_0x487662,_0x54b606,'behavior',_0x55b60d[_0x49db5f(0x18b)]);return;}if(_0x55b60d[_0x49db5f(0x18b)]===!![]){this[_0x49db5f(0x276)](_0x185b8b,_0x54b606),this[_0x49db5f(0x219)](_0x185b8b),this[_0x49db5f(0x296)](_0x487662,_0x54b606,_0x49db5f(0x1b5));return;}this['displayAttributesStats'](_0x185b8b),this[_0x49db5f(0x276)](_0x185b8b,_0x54b606),this[_0x49db5f(0xb3)](_0x185b8b),this[_0x49db5f(0x219)](_0x185b8b),this[_0x49db5f(0x296)](_0x487662,_0x54b606,'all');}[a35_0x2f1715(0xb3)](_0x1f1444){displayRealtimeValidation(_0x1f1444);}[a35_0x2f1715(0x296)](_0x571ca8,_0x345763,_0x39b9d9,_0x10a563){const _0x5d6aea=a35_0x2f1715;console[_0x5d6aea(0xf9)]('\x0a'+a35_0x2bfa77[_0x5d6aea(0x1c4)]('To\x20view\x20sample\x20data:'));const _0x3eaf3d=_0x345763!==_0x5d6aea(0x1e3)?'\x20--interval\x20'+_0x345763:'';if(_0x39b9d9===_0x5d6aea(0x29b)&&_0x10a563)console['error']('\x20\x20'+a35_0x2bfa77[_0x5d6aea(0x1c4)](_0x5d6aea(0x29e)+_0x571ca8+_0x5d6aea(0x2c3)+_0x10a563+'\x22'+_0x3eaf3d));else{if(_0x39b9d9===_0x5d6aea(0x18b)&&_0x10a563)console['error']('\x20\x20'+a35_0x2bfa77[_0x5d6aea(0x1c4)]('tdx\x20ps\x20preview\x20'+_0x571ca8+_0x5d6aea(0x25e)+_0x10a563+'\x22'+_0x3eaf3d));else(_0x39b9d9===_0x5d6aea(0x11e)||_0x39b9d9===_0x5d6aea(0xc7))&&console[_0x5d6aea(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x5d6aea(0x1c4)](_0x5d6aea(0x29e)+_0x571ca8+'\x20--attribute\x20\x22<name>\x22'+_0x3eaf3d));}(_0x39b9d9==='behaviors'||_0x39b9d9===_0x5d6aea(0xc7))&&console[_0x5d6aea(0xf9)]('\x20\x20'+a35_0x2bfa77['dim'](_0x5d6aea(0x29e)+_0x571ca8+_0x5d6aea(0x251)+_0x3eaf3d)),_0x39b9d9===_0x5d6aea(0xc7)&&console[_0x5d6aea(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x5d6aea(0x1c4)](_0x5d6aea(0x29e)+_0x571ca8+_0x5d6aea(0x147)+_0x3eaf3d));}[a35_0x2f1715(0x209)](_0x271790){const _0x2ed65a=a35_0x2f1715,{master:_0x4c459e}=_0x271790,_0x2947e0=_0x4c459e[_0x2ed65a(0x291)]?a35_0x2bfa77[_0x2ed65a(0x17b)]('✔'):a35_0x2bfa77['red']('✘');console['error']('\x0a'+a35_0x2bfa77[_0x2ed65a(0x1c4)](_0x2ed65a(0x1fb))),console['error'](_0x2947e0+'\x20'+a35_0x2bfa77[_0x2ed65a(0x1d5)](_0x4c459e[_0x2ed65a(0x119)]+'.'+_0x4c459e[_0x2ed65a(0xdb)])),_0x4c459e[_0x2ed65a(0x291)]?_0x4c459e[_0x2ed65a(0x25b)]!==undefined&&console['error']('\x20\x20'+a35_0x2bfa77['dim'](_0x2ed65a(0x14a))+'\x20'+a35_0x2bfa77[_0x2ed65a(0x29f)](formatRows(_0x4c459e['rowCount']))):console[_0x2ed65a(0xf9)]('\x20\x20'+a35_0x2bfa77['red'](_0x2ed65a(0x1f9))+'\x20'+_0x4c459e['schemaError']);}[a35_0x2f1715(0x24a)](_0x256d73){const _0x53fe4f=a35_0x2f1715;if(_0x256d73[_0x53fe4f(0x11e)][_0x53fe4f(0x104)]===0x0)return;console['error']('\x0a'+a35_0x2bfa77[_0x53fe4f(0x1c4)](_0x53fe4f(0x2aa)));for(const _0x100739 of _0x256d73[_0x53fe4f(0x11e)]){const _0x500599=_0x100739['schemaValid']?a35_0x2bfa77['green']('✔'):a35_0x2bfa77[_0x53fe4f(0x192)]('✘');let _0x1056ea='';if(_0x100739[_0x53fe4f(0x291)]&&_0x100739[_0x53fe4f(0xe4)]!==undefined&&_0x100739[_0x53fe4f(0x1c3)]!==undefined){const _0x11e01c=_0x100739[_0x53fe4f(0x1c3)][_0x53fe4f(0x2af)](0x1),_0xa48489=_0x100739[_0x53fe4f(0x1c3)]>=0x50?a35_0x2bfa77[_0x53fe4f(0x17b)]:_0x100739[_0x53fe4f(0x1c3)]>=0x32?a35_0x2bfa77['yellow']:a35_0x2bfa77[_0x53fe4f(0x192)];_0x1056ea='\x20'+a35_0x2bfa77[_0x53fe4f(0x1c4)](_0x53fe4f(0x1c9))+'\x20'+_0xa48489(_0x11e01c+'%')+'\x20('+formatRows(_0x100739['matchedCount'])+_0x53fe4f(0x190);}console[_0x53fe4f(0xf9)](_0x500599+'\x20'+a35_0x2bfa77[_0x53fe4f(0x1d5)](_0x100739['name'])+_0x1056ea),console[_0x53fe4f(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x53fe4f(0x1c4)](_0x53fe4f(0x1f6))+'\x20'+a35_0x2bfa77[_0x53fe4f(0x1d5)](_0x100739['database']+'.'+_0x100739[_0x53fe4f(0xdb)]));const _0x273afd=_0x100739[_0x53fe4f(0x19b)]===_0x100739[_0x53fe4f(0x163)]?a35_0x2bfa77['dim'](_0x53fe4f(0x293))+'\x20'+_0x100739[_0x53fe4f(0x19b)]:a35_0x2bfa77[_0x53fe4f(0x1c4)](_0x53fe4f(0xe9))+'\x20'+_0x100739[_0x53fe4f(0x19b)]+'\x20=\x20'+_0x100739['foreignKey'];console['error']('\x20\x20'+_0x273afd),console[_0x53fe4f(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x53fe4f(0x1c4)](_0x53fe4f(0xe6))),this[_0x53fe4f(0xf0)](_0x100739[_0x53fe4f(0x25a)]),!_0x100739[_0x53fe4f(0x291)]&&console['error']('\x20\x20'+a35_0x2bfa77[_0x53fe4f(0x192)](_0x53fe4f(0x1f9))+'\x20'+_0x100739[_0x53fe4f(0x17c)]);}}[a35_0x2f1715(0x276)](_0x372b4e,_0x1e042c){const _0x478edb=a35_0x2f1715;if(_0x372b4e[_0x478edb(0x1b5)][_0x478edb(0x104)]===0x0)return;console[_0x478edb(0xf9)]('\x0a'+a35_0x2bfa77[_0x478edb(0x1c4)](_0x478edb(0x137))+'\x20'+a35_0x2bfa77[_0x478edb(0x1c4)]('('+_0x1e042c+')'));for(const _0x3dd194 of _0x372b4e[_0x478edb(0x1b5)]){const _0xf8bb48=_0x3dd194[_0x478edb(0x291)]?a35_0x2bfa77['green']('✔'):a35_0x2bfa77['red']('✘');let _0x4711b6='';if(_0x3dd194[_0x478edb(0x291)]&&_0x3dd194[_0x478edb(0x125)]!==undefined&&_0x3dd194[_0x478edb(0x273)]!==undefined){const _0x46e41d=_0x3dd194[_0x478edb(0x1d2)]?.[_0x478edb(0x2af)](0x1)||'?',_0x5f0408=(_0x3dd194[_0x478edb(0x1d2)]??0x0)>=0x32?a35_0x2bfa77[_0x478edb(0x17b)]:(_0x3dd194[_0x478edb(0x1d2)]??0x0)>=0x14?a35_0x2bfa77[_0x478edb(0x1db)]:a35_0x2bfa77[_0x478edb(0x192)];_0x4711b6='\x20'+a35_0x2bfa77[_0x478edb(0x1c4)](_0x478edb(0x284))+'\x20'+_0x5f0408(formatRows(_0x3dd194[_0x478edb(0x125)]))+'\x20('+_0x46e41d+_0x478edb(0x1ff)+a35_0x2bfa77['dim'](_0x478edb(0xbd))+'\x20'+a35_0x2bfa77[_0x478edb(0x29f)](formatRows(_0x3dd194[_0x478edb(0x273)]));}console['error'](_0xf8bb48+'\x20'+a35_0x2bfa77['bold'](_0x3dd194['name'])+_0x4711b6),console[_0x478edb(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x478edb(0x1c4)](_0x478edb(0x1f6))+'\x20'+a35_0x2bfa77['bold'](_0x3dd194[_0x478edb(0x119)]+'.'+_0x3dd194[_0x478edb(0xdb)]));const _0x29b70c=_0x3dd194[_0x478edb(0x19b)]===_0x3dd194[_0x478edb(0x163)]?a35_0x2bfa77[_0x478edb(0x1c4)]('Join\x20on:')+'\x20'+_0x3dd194['joinKey']:a35_0x2bfa77[_0x478edb(0x1c4)](_0x478edb(0xe9))+'\x20'+_0x3dd194[_0x478edb(0x19b)]+'\x20=\x20'+_0x3dd194[_0x478edb(0x163)];console['error']('\x20\x20'+_0x29b70c),console[_0x478edb(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x478edb(0x1c4)]('Columns:')),this[_0x478edb(0xf0)](_0x3dd194[_0x478edb(0x25a)]),!_0x3dd194[_0x478edb(0x291)]&&console[_0x478edb(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x478edb(0x192)](_0x478edb(0x1f9))+'\x20'+_0x3dd194[_0x478edb(0x17c)]);}}['displayColumns'](_0x1fe5a3){const _0x3c29e9=a35_0x2f1715;for(const _0x228077 of _0x1fe5a3){_0x228077['label']===_0x228077[_0x3c29e9(0x165)]||_0x228077['column']==='*'?console[_0x3c29e9(0xf9)](_0x3c29e9(0x28f)+_0x228077['label']):console['error'](_0x3c29e9(0x28f)+_0x228077[_0x3c29e9(0x28b)]+'\x20'+a35_0x2bfa77[_0x3c29e9(0x1c4)]('('+_0x228077[_0x3c29e9(0x165)]+')'));}}[a35_0x2f1715(0x219)](_0x2865d8){const _0x249527=a35_0x2f1715;console[_0x249527(0xf9)]('─'[_0x249527(0x20e)](0x3c));if(_0x2865d8['errors'][_0x249527(0x104)]>0x0){console[_0x249527(0xf9)]('\x0a'+a35_0x2bfa77['red']('Errors:'));for(const _0x22911c of _0x2865d8[_0x249527(0x241)]){console[_0x249527(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x249527(0x192)]('•')+'\x20'+_0x22911c);}}_0x2865d8[_0x249527(0x1d8)]&&console[_0x249527(0xf9)]('\x0a'+a35_0x2bfa77[_0x249527(0x17b)]('✔')+_0x249527(0x1a1));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x1b6);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x21b);async[a35_0x2f1715(0xc9)](_0x9cced5){const _0x8b51e1=a35_0x2f1715,{options:_0x276c54,args:_0x50bcd5,tdx:_0x479c05}=_0x9cced5,_0x59fb09=_0x276c54,_0x3fb04d=_0x50bcd5[0x0]||_0x276c54[_0x8b51e1(0x1f3)];if(!_0x3fb04d)return showParentSegmentNotSetError(_0x8b51e1(0xda)+_0x8b51e1(0x151)+_0x8b51e1(0x149)+_0x8b51e1(0x15c)+_0x8b51e1(0x1de)+_0x8b51e1(0x264)+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+_0x8b51e1(0xf4)),0x1;if(!_0x59fb09[_0x8b51e1(0x1f1)]&&!_0x59fb09[_0x8b51e1(0x29b)]&&!_0x59fb09[_0x8b51e1(0x18b)]&&!_0x59fb09[_0x8b51e1(0x279)])return console['error'](a35_0x2bfa77['red'](_0x8b51e1(0xce))),console[_0x8b51e1(0xf9)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console['error'](_0x8b51e1(0x114)),console[_0x8b51e1(0xf9)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x8b51e1(0xf9)](_0x8b51e1(0x20d)),console[_0x8b51e1(0xf9)](_0x8b51e1(0xf1)),0x1;const _0x35d93c=resolveYamlFile(_0x3fb04d);if(!existsSync(_0x35d93c))return showFileNotFoundError(_0x35d93c,_0x3fb04d),0x1;_0x59fb09[_0x8b51e1(0xc0)]&&(console['error']('Site:\x20'+_0x59fb09[_0x8b51e1(0x272)]),console['error'](_0x8b51e1(0x26d)+_0x35d93c));let _0x5b044e;try{_0x5b044e=readFileSync(_0x35d93c,'utf-8');}catch(_0x1ab5a2){const _0x56bac0=_0x1ab5a2 instanceof Error?_0x1ab5a2[_0x8b51e1(0xb5)]:String(_0x1ab5a2);return console[_0x8b51e1(0xf9)](_0x8b51e1(0xc8)+_0x56bac0),0x1;}let _0x273e52;try{_0x273e52=parseDef(_0x5b044e);}catch(_0x5bdc7c){const _0x5867ac=_0x5bdc7c instanceof Error?_0x5bdc7c[_0x8b51e1(0xb5)]:String(_0x5bdc7c);return console[_0x8b51e1(0xf9)](a35_0x2bfa77[_0x8b51e1(0x192)](_0x8b51e1(0x27d)+_0x5867ac)),0x1;}if(_0x59fb09[_0x8b51e1(0x29b)]===!![]||_0x59fb09[_0x8b51e1(0x29b)]===''){const _0x5372e6=_0x273e52[_0x8b51e1(0x11e)]?.[_0x8b51e1(0x110)](_0x3705f6=>_0x3705f6['name'])||[];if(_0x5372e6[_0x8b51e1(0x104)]===0x0)console[_0x8b51e1(0xf9)](a35_0x2bfa77[_0x8b51e1(0x192)]('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console[_0x8b51e1(0xf9)](a35_0x2bfa77[_0x8b51e1(0x192)](_0x8b51e1(0x195))),console[_0x8b51e1(0xf9)](_0x8b51e1(0x1dc));for(const _0x5c2302 of _0x5372e6){console[_0x8b51e1(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x8b51e1(0x29f)](_0x5c2302));}console[_0x8b51e1(0xf9)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x3fb04d+_0x8b51e1(0x2c3)+_0x5372e6[0x0]+'\x22');}return 0x1;}if(_0x59fb09[_0x8b51e1(0x18b)]===!![]||_0x59fb09[_0x8b51e1(0x18b)]===''){const _0x18ed0a=_0x273e52[_0x8b51e1(0x1b5)]?.[_0x8b51e1(0x110)](_0x2b5311=>_0x2b5311[_0x8b51e1(0xe8)])||[];if(_0x18ed0a[_0x8b51e1(0x104)]===0x0)console[_0x8b51e1(0xf9)](a35_0x2bfa77[_0x8b51e1(0x192)](_0x8b51e1(0x1e1)));else{console['error'](a35_0x2bfa77[_0x8b51e1(0x192)](_0x8b51e1(0x205))),console[_0x8b51e1(0xf9)](_0x8b51e1(0x11f));for(const _0x3fc889 of _0x18ed0a){console['error']('\x20\x20'+a35_0x2bfa77[_0x8b51e1(0x29f)](_0x3fc889));}console[_0x8b51e1(0xf9)](_0x8b51e1(0x166)+_0x3fb04d+_0x8b51e1(0x25e)+_0x18ed0a[0x0]+'\x22');}return 0x1;}const _0x4a90c6=createCommandSpinner(a35_0x2bfa77[_0x8b51e1(0x1c4)](_0x8b51e1(0x2b9)),{'verbose':_0x59fb09[_0x8b51e1(0xc0)]});_0x4a90c6[_0x8b51e1(0xf8)]();const _0xbbb0b7={'onProgress':_0x2d3a26=>{const _0x573b9d=_0x8b51e1;_0x4a90c6[_0x573b9d(0xd9)]=formatProgressMessage(_0x2d3a26);}};if(_0x59fb09[_0x8b51e1(0x1f1)])_0xbbb0b7['master']=!![];if(_0x59fb09['attribute']&&typeof _0x59fb09[_0x8b51e1(0x29b)]===_0x8b51e1(0x1d7))_0xbbb0b7['attribute']=_0x59fb09[_0x8b51e1(0x29b)];if(_0x59fb09[_0x8b51e1(0x18b)]&&typeof _0x59fb09[_0x8b51e1(0x18b)]===_0x8b51e1(0x1d7))_0xbbb0b7['behavior']=_0x59fb09[_0x8b51e1(0x18b)];if(_0x59fb09[_0x8b51e1(0x279)])_0xbbb0b7['enriched']=!![];if(_0x59fb09['interval'])_0xbbb0b7[_0x8b51e1(0x203)]=_0x59fb09[_0x8b51e1(0x203)];let _0x4d61d6;try{_0x4d61d6=await _0x479c05[_0x8b51e1(0x1af)][_0x8b51e1(0xdd)](_0x5b044e,_0xbbb0b7),_0x4a90c6[_0x8b51e1(0x105)]();}catch(_0x454cd3){_0x4a90c6[_0x8b51e1(0x105)]();throw _0x454cd3;}return await this['displayPreviewResults'](_0x4d61d6,{'master':_0x59fb09[_0x8b51e1(0x1f1)],'attribute':typeof _0x59fb09['attribute']===_0x8b51e1(0x1d7)?_0x59fb09['attribute']:undefined,'behavior':typeof _0x59fb09[_0x8b51e1(0x18b)]===_0x8b51e1(0x1d7)?_0x59fb09[_0x8b51e1(0x18b)]:undefined,'enriched':_0x59fb09[_0x8b51e1(0x279)]}),_0x4d61d6['allValid']?0x0:0x1;}async[a35_0x2f1715(0x25f)](_0x253c50,_0x150596){const _0x1d1a28=a35_0x2f1715;console[_0x1d1a28(0xf9)]('\x0a'+a35_0x2bfa77[_0x1d1a28(0x1d5)](_0x1d1a28(0x1e9))+'\x20'+_0x253c50['name']),console[_0x1d1a28(0xf9)]('═'[_0x1d1a28(0x20e)](0x3c));if(_0x150596[_0x1d1a28(0x1f1)]&&_0x253c50[_0x1d1a28(0x198)]){const _0x32ac2c=a35_0x2bfa77[_0x1d1a28(0x1c4)](_0x1d1a28(0x235))+'\x20'+a35_0x2bfa77[_0x1d1a28(0x1d5)](_0x253c50[_0x1d1a28(0x1f1)][_0x1d1a28(0x119)]+'.'+_0x253c50[_0x1d1a28(0x1f1)][_0x1d1a28(0xdb)]);await this['displaySampleData'](_0x32ac2c,_0x253c50[_0x1d1a28(0x198)]);}else{if(_0x150596[_0x1d1a28(0x29b)]&&_0x253c50[_0x1d1a28(0x198)]){const _0x59bc4f=a35_0x2bfa77[_0x1d1a28(0x1c4)](_0x1d1a28(0x265))+'\x20'+a35_0x2bfa77['bold'](_0x150596[_0x1d1a28(0x29b)]);await this['displaySampleData'](_0x59bc4f,_0x253c50[_0x1d1a28(0x198)]);}else{if(_0x150596[_0x1d1a28(0x18b)]&&_0x253c50['sampleData']){const _0x212ecf=a35_0x2bfa77['dim'](_0x1d1a28(0x240))+'\x20'+a35_0x2bfa77[_0x1d1a28(0x1d5)](_0x150596['behavior']);await this[_0x1d1a28(0x277)](_0x212ecf,_0x253c50['sampleData']);}else{if(_0x150596[_0x1d1a28(0x279)]&&_0x253c50[_0x1d1a28(0x198)]){const _0x155feb=a35_0x2bfa77[_0x1d1a28(0x1c4)](_0x1d1a28(0x229))+'\x20'+a35_0x2bfa77['bold']('Master\x20+\x20Attributes');await this['displaySampleData'](_0x155feb,_0x253c50[_0x1d1a28(0x198)]);}else!_0x253c50[_0x1d1a28(0x198)]&&console[_0x1d1a28(0xf9)](_0x1d1a28(0x258));}}}if(_0x253c50[_0x1d1a28(0x241)][_0x1d1a28(0x104)]>0x0){console[_0x1d1a28(0xf9)]('─'['repeat'](0x3c)),console[_0x1d1a28(0xf9)]('\x0a'+a35_0x2bfa77[_0x1d1a28(0x192)](_0x1d1a28(0x162)));for(const _0x88d72d of _0x253c50[_0x1d1a28(0x241)]){console[_0x1d1a28(0xf9)]('\x20\x20'+a35_0x2bfa77[_0x1d1a28(0x192)]('•')+'\x20'+_0x88d72d);}}}async['displaySampleData'](_0x241ba3,_0x5e79da){const _0x15e97a=a35_0x2f1715;if(_0x5e79da['length']===0x0){console[_0x15e97a(0xf9)]('\x0a'+_0x241ba3),console['error'](_0x15e97a(0x230));return;}console['error']('\x0a'+_0x241ba3);const _0x31956e=Object[_0x15e97a(0xe1)](_0x5e79da[0x0])[_0x15e97a(0x110)](_0x47b748=>({'name':_0x47b748,'type':typeof _0x5e79da[0x0][_0x47b748]===_0x15e97a(0x24f)?_0x15e97a(0xcc):'varchar'})),_0x5af4d4={'queryId':_0x15e97a(0x23a),'columns':_0x31956e,'data':_0x5e79da,'stats':{'state':_0x15e97a(0x194),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x5e79da[_0x15e97a(0x104)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x21c3cd=formatAsTable(_0x5af4d4,_0x5e79da['length'],!![]);await writeOutput(_0x21c3cd,undefined,_0x15e97a(0xdb));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]='segment:parent:run';[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x1ed);async[a35_0x2f1715(0xc9)](_0x27d86b){const _0xcbc480=a35_0x2f1715,{options:_0x28e678,args:_0xca75a6,tdx:_0x1f03cb}=_0x27d86b,_0x3cd5fe=_0x28e678,_0x39a684=_0xca75a6[0x0]||_0x28e678[_0xcbc480(0x1f3)];if(!_0x39a684)return showParentSegmentNotSetError(_0xcbc480(0x245)+_0xcbc480(0x14c)),0x1;const _0x1e3fa5=resolveYamlFile(_0x39a684);if(existsSync(_0x1e3fa5)){_0x3cd5fe[_0xcbc480(0xc0)]&&console['error'](_0xcbc480(0x158)+_0x1e3fa5);let _0x31e7f0;try{_0x31e7f0=readFileSync(_0x1e3fa5,_0xcbc480(0x1b4));}catch(_0x23792f){const _0x16f0e7=_0x23792f instanceof Error?_0x23792f['message']:String(_0x23792f);return console['error']('Error\x20reading\x20file:\x20'+_0x16f0e7),0x1;}const _0x5338cd=await withSpinner(_0xcbc480(0xe2),()=>_0x1f03cb[_0xcbc480(0x1af)]['pushParentYaml'](_0x31e7f0),{'verbose':_0x3cd5fe[_0xcbc480(0xc0)]}),_0x19f8bb=_0x5338cd[_0xcbc480(0x28d)],{isNew:_0x5c8adb,name:_0x1b8587,hasChanges:_0x25f44c,diffFormatted:_0x347672}=_0x19f8bb;if(_0x25f44c){_0x5c8adb?console[_0xcbc480(0xf9)](_0xcbc480(0xd2)+_0x1b8587+'\x27:'):console[_0xcbc480(0xf9)](_0xcbc480(0x22d)+_0x1b8587+'\x27:');console[_0xcbc480(0xf9)]('─'[_0xcbc480(0x20e)](0x3c)),console['error'](_0x347672),console[_0xcbc480(0xf9)]('─'[_0xcbc480(0x20e)](0x3c));const _0x575323=_0x5c8adb?_0xcbc480(0x26c)+_0x1b8587+_0xcbc480(0xdc):_0xcbc480(0x11b)+_0x1b8587+'\x27\x20and\x20run\x20workflow?';if(!_0x3cd5fe[_0xcbc480(0x23f)]){if(!isInteractive())return console[_0xcbc480(0xf9)](a35_0x2bfa77['red'](_0xcbc480(0x1e0)),_0xcbc480(0xf2)),console['error'](a35_0x2bfa77[_0xcbc480(0x1c4)](_0xcbc480(0x13d))),0x1;const _0x5deb39=await confirmKey(_0x575323);if(!_0x5deb39)return console[_0xcbc480(0xf9)](a35_0x2bfa77[_0xcbc480(0x1db)](_0xcbc480(0x246))),0x1;}const _0x779e5=_0x5c8adb?_0xcbc480(0x283):'Updating';await withSpinner(_0x779e5+_0xcbc480(0x176)+_0x1b8587+_0xcbc480(0x2b2),()=>_0x19f8bb[_0xcbc480(0x290)](),{'verbose':_0x3cd5fe[_0xcbc480(0xc0)]});const _0x2bde86=_0x5c8adb?_0xcbc480(0x10b):'Updated';console[_0xcbc480(0xf9)]('✔\x20'+_0x2bde86+_0xcbc480(0x176)+_0x1b8587+'\x27');}else console[_0xcbc480(0xf9)]('✔\x20No\x20changes\x20-\x20\x27'+_0x1b8587+_0xcbc480(0xc3));}const _0x25fcd6=await withSpinner(_0xcbc480(0x255)+_0x39a684+_0xcbc480(0x2b2),()=>_0x1f03cb[_0xcbc480(0x1af)]['runParent'](_0x39a684),{'verbose':_0x3cd5fe[_0xcbc480(0xc0)]}),_0x518cdf=_0x25fcd6['data'],_0x5b212e=getConsoleUrl(_0x3cd5fe[_0xcbc480(0x272)],_0xcbc480(0x2a8)+_0x518cdf[_0xcbc480(0x19e)]+_0xcbc480(0x1f7)+_0x518cdf['workflowSessionId']+_0xcbc480(0x298)+_0x518cdf[_0xcbc480(0x21f)]);return console[_0xcbc480(0xf9)]('\x0a✔\x20Workflow\x20started'),console['error']('\x20\x20'+a35_0x2bfa77[_0xcbc480(0x1c4)](_0xcbc480(0x24b))+'\x20'+_0x518cdf[_0xcbc480(0x1b1)]),console[_0xcbc480(0xf9)]('\x20\x20'+a35_0x2bfa77[_0xcbc480(0x1c4)](_0xcbc480(0x16d))+'\x20'+_0x518cdf['status']),console[_0xcbc480(0xf9)]('\x20\x20'+a35_0x2bfa77[_0xcbc480(0x1c4)](_0xcbc480(0x19a))+'\x20'+_0x518cdf[_0xcbc480(0x2ae)]),console[_0xcbc480(0xf9)]('\x20\x20'+a35_0x2bfa77[_0xcbc480(0x1c4)]('Attempt:')+'\x20'+_0x518cdf[_0xcbc480(0x21f)]),console['error']('\x20\x20'+_0x5b212e),console[_0xcbc480(0xf9)]('\x0a'+a35_0x2bfa77[_0xcbc480(0x1c4)]('To\x20cancel:')+_0xcbc480(0x1e4)+_0x518cdf[_0xcbc480(0x21f)]+_0xcbc480(0x22e)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x208);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x236);async[a35_0x2f1715(0xc9)](_0x5e7fb1){const _0x2aec95=a35_0x2f1715,{options:_0x211d5c,args:_0x1d3a43,tdx:_0x18de6a}=_0x5e7fb1,_0x5e2e81=_0x1d3a43[0x0]||_0x211d5c[_0x2aec95(0x1f3)];if(!_0x5e2e81)return showParentSegmentNotSetError(_0x2aec95(0x288)+_0x2aec95(0x213)),0x1;_0x211d5c[_0x2aec95(0xc0)]&&(console['error']('Site:\x20'+_0x211d5c[_0x2aec95(0x272)]),console[_0x2aec95(0xf9)]('Parent\x20segment:\x20'+_0x5e2e81));const _0x4a7ae7=await withSpinner(_0x2aec95(0xfe)+_0x5e2e81+'\x27...',()=>_0x18de6a[_0x2aec95(0x1af)]['listFields'](_0x5e2e81),{'verbose':_0x211d5c[_0x2aec95(0xc0)]}),_0x427a3f=_0x4a7ae7[_0x2aec95(0x28d)];console[_0x2aec95(0xf9)](_0x2aec95(0x17d)+_0x427a3f[_0x2aec95(0x104)]+'\x20field'+(_0x427a3f['length']!==0x1?'s':''));if(_0x211d5c['json']||_0x211d5c['jsonl'])return await handleSDKOutput(_0x427a3f,_0x211d5c),0x0;return displayFieldsHumanReadable(_0x427a3f,_0x5e2e81),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x1d3);[a35_0x2f1715(0x1ec)]='Show\x20parent\x20segment\x20details';async[a35_0x2f1715(0xc9)](_0x4dbe43){const _0x38cff9=a35_0x2f1715,{options:_0x234812,args:_0x4302b9,tdx:_0x34cd4c}=_0x4dbe43,_0x4618ca=_0x234812,_0xa829e6=_0x4302b9[0x0]||_0x234812[_0x38cff9(0x1f3)];if(!_0xa829e6)return showParentSegmentNotSetError(_0x38cff9(0x185)+_0x38cff9(0x253)+_0x38cff9(0x188)+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x234812[_0x38cff9(0xc0)]&&(console[_0x38cff9(0xf9)](_0x38cff9(0x109)+_0x234812['site']),console[_0x38cff9(0xf9)]('Parent\x20segment:\x20'+_0xa829e6));const _0x35fbaa=await withSpinner(_0x38cff9(0x164)+_0xa829e6+_0x38cff9(0x2b2),()=>_0x34cd4c[_0x38cff9(0x1af)]['getParentFull'](_0xa829e6),{'verbose':_0x234812['verbose']}),_0xd319bd=_0x35fbaa['data'];if(_0x4618ca['web']){const _0x39af6f=getConsoleNextUrl(_0x4618ca['site'],_0x38cff9(0x1f4)+_0xd319bd['id']);return console[_0x38cff9(0xf9)](a35_0x2bfa77[_0x38cff9(0x17b)]('✔')+_0x38cff9(0x124)+a35_0x2bfa77[_0x38cff9(0x29f)](_0x39af6f)),openBrowser(_0x39af6f),0x0;}return await handleSingleObjectOutput(_0xd319bd,_0x234812),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x171);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x136);async[a35_0x2f1715(0xc9)](_0x3b72e7){const _0x2b5954=a35_0x2f1715,{options:_0x22fe91,args:_0x2a0a5e,tdx:_0xf3a643}=_0x3b72e7,_0x3b1a94=_0x22fe91,_0x50a483=_0x2a0a5e[0x0]||_0x22fe91['parentSegment'];if(!_0x50a483)return showParentSegmentNotSetError(_0x2b5954(0x2ad)+_0x2b5954(0x19f)+'Options:\x0a'+_0x2b5954(0x1bc)),0x1;_0x22fe91[_0x2b5954(0xc0)]&&(console[_0x2b5954(0xf9)](_0x2b5954(0x109)+_0x22fe91[_0x2b5954(0x272)]),console[_0x2b5954(0xf9)](_0x2b5954(0x26a)+_0x50a483));const _0x2be0ab=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x50a483+_0x2b5954(0x2b2),()=>_0xf3a643[_0x2b5954(0x1af)][_0x2b5954(0xbc)](_0x50a483),{'verbose':_0x22fe91[_0x2b5954(0xc0)]}),_0x5e3090=_0x2be0ab[_0x2b5954(0x28d)],_0x43be6b=_0xf3a643[_0x2b5954(0x1af)][_0x2b5954(0xdf)](_0x5e3090);if(_0x3b1a94[_0x2b5954(0x172)]){const _0x8f4351=await this[_0x2b5954(0xb9)](_0x3b72e7,_0x50a483,_0x5e3090,_0x43be6b),_0x1b9c62=this[_0x2b5954(0x127)](_0x8f4351);writeFileSync(_0x3b1a94[_0x2b5954(0x172)],_0x1b9c62);const _0x17f14e=_0x8f4351['customers'][_0x2b5954(0x25a)][_0x2b5954(0x104)]+_0x8f4351[_0x2b5954(0x1b5)][_0x2b5954(0x27f)]((_0x2ec137,_0x57bca3)=>_0x2ec137+_0x57bca3[_0x2b5954(0x25a)][_0x2b5954(0x104)],0x0),_0x4bb271=_0x8f4351[_0x2b5954(0x1b5)][_0x2b5954(0x2ab)](_0x60b7ad=>_0x60b7ad[_0x2b5954(0x25a)][_0x2b5954(0x104)]===0x0)[_0x2b5954(0x104)];return console[_0x2b5954(0xd8)](_0x2b5954(0x2a3)+_0x3b1a94['output']),console[_0x2b5954(0xd8)](_0x2b5954(0x2a6)+_0x43be6b),console[_0x2b5954(0xd8)](_0x2b5954(0x16b)+_0x8f4351['behaviors'][_0x2b5954(0x104)]+'\x20behaviors'),console[_0x2b5954(0xd8)](_0x2b5954(0x187)+_0x17f14e+_0x2b5954(0x27e)),_0x4bb271>0x0&&console[_0x2b5954(0xd8)](_0x2b5954(0x254)+_0x4bb271+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x2b5954(0xf9)]('\x0a'+a35_0x2bfa77[_0x2b5954(0x1d5)](_0x2b5954(0x23b))+'\x20'+a35_0x2bfa77['cyan'](_0x43be6b));const _0x55b047=await withSpinner('Fetching\x20customers\x20schema...',()=>_0xf3a643[_0x2b5954(0x1af)]['getParentSQL'](_0x5e3090),{'verbose':_0x22fe91[_0x2b5954(0xc0)]});console[_0x2b5954(0xf9)]('\x0a'+a35_0x2bfa77['bold'](_0x2b5954(0x22a))+'\x20'+a35_0x2bfa77[_0x2b5954(0x1c4)]('('+_0x43be6b+_0x2b5954(0x26f)));const _0x1ee813=await executeSchemaQuery(_0x55b047[_0x2b5954(0x28d)],_0xf3a643,_0x22fe91);await handleQueryOutput(_0x1ee813,_0x22fe91);const _0x4e7f6c=await withSpinner(_0x2b5954(0x252),()=>_0xf3a643[_0x2b5954(0x1af)][_0x2b5954(0x129)](_0x5e3090),{'verbose':_0x22fe91[_0x2b5954(0xc0)]});for(const _0x581b66 of _0x4e7f6c[_0x2b5954(0x28d)]){const _0x5b0af4=_0x2b5954(0x2b4)+_0x581b66[_0x2b5954(0xe3)]()[_0x2b5954(0x2c5)](/\s+/g,'_'),_0x5ada6f=_0x2b5954(0x28c)+_0x43be6b+'.'+_0x5b0af4;console[_0x2b5954(0xf9)]('\x0a'+a35_0x2bfa77['bold'](_0x581b66)+'\x20'+a35_0x2bfa77[_0x2b5954(0x1c4)]('('+_0x43be6b+'.'+_0x5b0af4+')'));try{const _0xe949f0=await executeSchemaQuery(_0x5ada6f,_0xf3a643,_0x22fe91);await handleQueryOutput(_0xe949f0,_0x22fe91);}catch{console[_0x2b5954(0xf9)](a35_0x2bfa77[_0x2b5954(0x1db)](_0x2b5954(0x1e8)));}}return 0x0;}async[a35_0x2f1715(0xb9)](_0x2fab41,_0x4c1d15,_0x401866,_0x34e3e2){const _0x3b91b9=a35_0x2f1715,{options:_0x2c18a6,tdx:_0x4be237}=_0x2fab41,_0x2d4d5d=await withSpinner(_0x3b91b9(0x1e5),()=>_0x4be237[_0x3b91b9(0x1af)][_0x3b91b9(0x2bb)](_0x401866),{'verbose':_0x2c18a6[_0x3b91b9(0xc0)]}),_0x5e5157=await executeSchemaQuery(_0x2d4d5d['data'],_0x4be237,_0x2c18a6),_0x1184ee=_0x5e5157[_0x3b91b9(0x28d)][_0x3b91b9(0x110)](_0x2f8d89=>({'name':_0x2f8d89[_0x3b91b9(0x263)],'type':_0x2f8d89[_0x3b91b9(0x218)]})),_0xb3e1d3=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x4be237['segment'][_0x3b91b9(0x129)](_0x401866),{'verbose':_0x2c18a6[_0x3b91b9(0xc0)]}),_0x596226=[];for(const _0x93cb3c of _0xb3e1d3['data']){const _0x28dbfd=_0x3b91b9(0x2b4)+_0x93cb3c[_0x3b91b9(0xe3)]()[_0x3b91b9(0x2c5)](/\s+/g,'_'),_0x7b79d4=_0x3b91b9(0x28c)+_0x34e3e2+'.'+_0x28dbfd;let _0x9058d=[];try{const _0x328b60=await executeSchemaQuery(_0x7b79d4,_0x4be237,_0x2c18a6);_0x9058d=_0x328b60[_0x3b91b9(0x28d)][_0x3b91b9(0x110)](_0x3f4c40=>({'name':_0x3f4c40[_0x3b91b9(0x263)],'type':_0x3f4c40[_0x3b91b9(0x218)]}));}catch{}_0x596226['push']({'table':_0x28dbfd,'columns':_0x9058d});}return{'database':_0x34e3e2,'parent_segment':_0x4c1d15,'parent_id':_0x401866,'customers':{'table':_0x3b91b9(0x22a),'columns':_0x1184ee},'behaviors':_0x596226};}[a35_0x2f1715(0x127)](_0x48e2f2){const _0x3e7e8f=a35_0x2f1715,_0x540333=_0x35e057=>{const _0x26b22d=a35_0x2a6d;if(_0x35e057[_0x26b22d(0x104)]===0x0)return'[]';const _0x55447a=_0x35e057['map'](_0x4b8c6e=>_0x26b22d(0x274)+_0x4b8c6e[_0x26b22d(0xe8)]+_0x26b22d(0x222)+_0x4b8c6e[_0x26b22d(0x21a)]+'\x22\x20}');return'[\x0a'+_0x55447a[_0x26b22d(0x145)](',\x0a')+_0x26b22d(0x174);},_0x48b413=_0x48e2f2['behaviors']['map'](_0x116eb6=>{const _0x384af7=a35_0x2a6d;return _0x384af7(0xd4)+_0x116eb6[_0x384af7(0xdb)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x540333(_0x116eb6[_0x384af7(0x25a)])[_0x384af7(0x2c5)](/^/gm,'\x20\x20')[_0x384af7(0x1e2)]()+_0x384af7(0x2b1);})[_0x3e7e8f(0x145)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x48e2f2[_0x3e7e8f(0x119)]+_0x3e7e8f(0x262)+_0x48e2f2['parent_segment']+'\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22'+_0x48e2f2[_0x3e7e8f(0x1e6)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x48e2f2[_0x3e7e8f(0x22a)]['table']+_0x3e7e8f(0x223)+_0x540333(_0x48e2f2[_0x3e7e8f(0x22a)]['columns'])[_0x3e7e8f(0x2c5)](/^/gm,'\x20\x20')[_0x3e7e8f(0x1e2)]()+_0x3e7e8f(0x227)+_0x48b413+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a35_0x2f1715(0xe8)]='segment:parent:sql';[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x1ee);async[a35_0x2f1715(0xc9)](_0x11d3d8){const _0x3bec86=a35_0x2f1715,{options:_0x2e3e79,args:_0x3178bc,tdx:_0x5b28a8}=_0x11d3d8,_0x226167=_0x3178bc[0x0]||_0x2e3e79[_0x3bec86(0x1f3)];if(!_0x226167)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'+_0x3bec86(0x2bf)),0x1;_0x2e3e79[_0x3bec86(0xc0)]&&(console[_0x3bec86(0xf9)](_0x3bec86(0x109)+_0x2e3e79['site']),console[_0x3bec86(0xf9)](_0x3bec86(0x26a)+_0x226167));const _0x35395d=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x226167+_0x3bec86(0x2b2),()=>_0x5b28a8['segment'][_0x3bec86(0xbc)](_0x226167),{'verbose':_0x2e3e79['verbose']}),_0x15026e=_0x35395d[_0x3bec86(0x28d)],_0x90165b=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x226167+'\x27...',()=>_0x5b28a8[_0x3bec86(0x1af)]['getParentSQL'](_0x15026e),{'verbose':_0x2e3e79['verbose']}),_0x215a50=_0x90165b[_0x3bec86(0x28d)];return _0x2e3e79[_0x3bec86(0x132)]===_0x3bec86(0x297)||_0x2e3e79[_0x3bec86(0x132)]===_0x3bec86(0x100)?await handleSDKOutput([{'sql':_0x215a50}],_0x2e3e79):console[_0x3bec86(0xd8)](_0x215a50),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a35_0x2f1715(0xe8)]='segment:parent:show';[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x28e);async['execute'](_0x4e059f){const _0x364275=a35_0x2f1715,{options:_0x218acc,args:_0xa9c75b,tdx:_0x469dc3}=_0x4e059f,_0xd9bd4c=_0xa9c75b[0x0]||_0x218acc['parentSegment'];if(!_0xd9bd4c)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'+_0x364275(0x189)),0x1;_0x218acc[_0x364275(0xc0)]&&(console['error']('Site:\x20'+_0x218acc[_0x364275(0x272)]),console['error'](_0x364275(0x26a)+_0xd9bd4c));const _0x108061=await withSpinner(_0x364275(0x1fd)+_0xd9bd4c+_0x364275(0x2b2),()=>_0x469dc3[_0x364275(0x1af)][_0x364275(0xbc)](_0xd9bd4c),{'verbose':_0x218acc[_0x364275(0xc0)]}),_0x72c8cc=_0x108061[_0x364275(0x28d)],_0x548c17=await withSpinner(_0x364275(0x23e)+_0xd9bd4c+'\x27...',()=>_0x469dc3[_0x364275(0x1af)][_0x364275(0x2bb)](_0x72c8cc),{'verbose':_0x218acc[_0x364275(0xc0)]});let _0x3202d0=_0x548c17[_0x364275(0x28d)];const _0x677d3f=resolveLimit(_0x218acc[_0x364275(0x160)],DEFAULT_DISPLAY_LIMIT),_0x449c7f=/\bLIMIT\s+\d+/i[_0x364275(0x19c)](_0x3202d0);!_0x449c7f&&(_0x3202d0=_0x3202d0[_0x364275(0x1e2)]()[_0x364275(0x2c5)](/;+$/,''),_0x3202d0='SELECT\x20*\x20FROM\x20(\x0a'+_0x3202d0+_0x364275(0xb1)+_0x677d3f);_0x218acc[_0x364275(0xc0)]&&console[_0x364275(0xf9)](_0x364275(0xbf)+_0x3202d0);const _0x20eec0=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x239ef=>{const _0x49a641=_0x364275,_0x3eb80e=await _0x469dc3[_0x49a641(0x178)]['execute'](_0x3202d0,{'catalog':'td','schema':'information_schema','onJobId':_0x188c24=>{const _0x188b72=_0x49a641;_0x239ef[_0x188b72(0xc2)](_0x188c24);}});return _0x3eb80e;},{'verbose':_0x218acc['verbose']}),_0x29e2f6=_0x20eec0[_0x364275(0x28d)],_0x36b692=_0x29e2f6[_0x364275(0xb6)]?_0x364275(0x154)+_0x29e2f6['jobId']+']':'';return console[_0x364275(0xf9)](_0x364275(0xee)+_0x29e2f6[_0x364275(0x135)][_0x364275(0x214)]['toLocaleString']()+'\x20rows\x20'+(_0x364275(0x1a5)+formatElapsed(_0x29e2f6[_0x364275(0x135)]['elapsedTimeMillis'])+_0x36b692)),await handleQueryOutput(_0x29e2f6,_0x218acc),0x0;}}export class PSRtListCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x173);['description']=a35_0x2f1715(0x207);async[a35_0x2f1715(0xc9)](_0x4b436c){const _0x443ef3=a35_0x2f1715,{options:_0x1675e3,args:_0x2132ee,tdx:_0x58f77b}=_0x4b436c,_0x5e51d0=_0x2132ee[0x0],_0x41d474=await withSpinner(_0x5e51d0?_0x443ef3(0x1f8)+_0x5e51d0+_0x443ef3(0x2b2):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x58f77b['realtime'][_0x443ef3(0x206)](),{'verbose':_0x1675e3['verbose']});let _0x312da6=_0x41d474[_0x443ef3(0x28d)][_0x443ef3(0x2ab)](_0x2d6deb=>_0x2d6deb[_0x443ef3(0x20b)]);if(_0x5e51d0){const _0x1f0092=_0x5e51d0['replace'](/[.+^${}()|[\]\\]/g,_0x443ef3(0x10d))['replace'](/\*/g,'.*')[_0x443ef3(0x2c5)](/\?/g,'.'),_0x40d1d8=new RegExp('^'+_0x1f0092+'$','i');_0x312da6=_0x312da6[_0x443ef3(0x2ab)](_0x2c4201=>_0x40d1d8[_0x443ef3(0x19c)](_0x2c4201['name']));}_0x312da6[_0x443ef3(0x1fa)]((_0x8231c8,_0x2f95ec)=>_0x8231c8[_0x443ef3(0xe8)][_0x443ef3(0x112)](_0x2f95ec[_0x443ef3(0xe8)])),console[_0x443ef3(0xf9)](_0x443ef3(0x17d)+_0x312da6[_0x443ef3(0x104)]+_0x443ef3(0x10a)+(_0x312da6['length']!==0x1?'s':''));const _0x1a3f75=_0x20677f=>{const _0x3f3b3b=_0x443ef3;return getConsoleNextUrl(_0x1675e3[_0x3f3b3b(0x272)],_0x3f3b3b(0x1f4)+_0x20677f);};if(_0x1675e3[_0x443ef3(0x132)]===_0x443ef3(0x297)||_0x1675e3[_0x443ef3(0x132)]===_0x443ef3(0x100)){const _0x2aea49=_0x312da6[_0x443ef3(0x110)](_0x313273=>({..._0x313273,'url':_0x1a3f75(_0x313273['id'])}));await handleSDKOutput(_0x2aea49,_0x1675e3);}else{if(_0x312da6['length']===0x0)console[_0x443ef3(0xd8)](_0x443ef3(0x266));else for(const _0x1ff253 of _0x312da6){const _0x96b0ef=_0x1ff253[_0x443ef3(0x175)]?a35_0x2bfa77[_0x443ef3(0x1c4)]('\x20('+formatRows(_0x1ff253['population'])+')'):'',_0x25fab4=hyperlink(_0x1ff253[_0x443ef3(0xe8)],_0x1a3f75(_0x1ff253['id']));console[_0x443ef3(0xd8)]('⚡\x20'+_0x25fab4+_0x96b0ef);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x2ac);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x26b);async[a35_0x2f1715(0xc9)](_0x6ac742){const _0x3405e0=a35_0x2f1715,{options:_0x542d7c,args:_0x3c6f0d,tdx:_0x591b0f}=_0x6ac742,_0x381717=_0x3c6f0d[0x0]||_0x542d7c['parentSegment'];if(!_0x381717)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a'+_0x3405e0(0x16c)),0x1;const _0x10be46=resolveYamlFile(_0x381717);if(!existsSync(_0x10be46))return showFileNotFoundError(_0x10be46,_0x381717),0x1;let _0x30b593;try{_0x30b593=readFileSync(_0x10be46,_0x3405e0(0x1b4));}catch(_0xc0aa70){const _0x1ea3d5=_0xc0aa70 instanceof Error?_0xc0aa70[_0x3405e0(0xb5)]:String(_0xc0aa70);return console['error'](_0x3405e0(0xc8)+_0x1ea3d5),0x1;}const _0x4207a3=createCommandSpinner(a35_0x2bfa77['dim'](_0x3405e0(0x1ce)),{'verbose':_0x542d7c[_0x3405e0(0xc0)]});_0x4207a3[_0x3405e0(0xf8)]();const _0x959857={'realtime':!![],'onProgress':_0xd5cfbd=>{_0x4207a3['text']=formatProgressMessage(_0xd5cfbd);}};let _0x38fbc6;try{_0x38fbc6=await _0x591b0f[_0x3405e0(0x1af)]['validateParentYaml'](_0x30b593,_0x959857),_0x4207a3[_0x3405e0(0x105)]();}catch(_0x7d0cdc){_0x4207a3[_0x3405e0(0x105)]();throw _0x7d0cdc;}console[_0x3405e0(0xf9)]('\x0a'+a35_0x2bfa77[_0x3405e0(0x1d5)](_0x3405e0(0x287))+'\x20'+_0x38fbc6[_0x3405e0(0xe8)]),console[_0x3405e0(0xf9)]('═'['repeat'](0x3c)),displayRealtimeValidation(_0x38fbc6),console[_0x3405e0(0xf9)]('─'['repeat'](0x3c));if(_0x38fbc6[_0x3405e0(0x241)][_0x3405e0(0x104)]>0x0){console[_0x3405e0(0xf9)]('\x0a'+a35_0x2bfa77['red'](_0x3405e0(0x162)));for(const _0x5eca32 of _0x38fbc6[_0x3405e0(0x241)]){console[_0x3405e0(0xf9)]('\x20\x20'+a35_0x2bfa77['red']('•')+'\x20'+_0x5eca32);}}return _0x38fbc6['allValid']&&console[_0x3405e0(0xf9)]('\x0a'+a35_0x2bfa77['green']('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x38fbc6['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a35_0x2f1715(0xe8)]='ps:rt:jn:list';['description']=a35_0x2f1715(0x1e7);async['execute'](_0x5eb4b8){const _0x515c8a=a35_0x2f1715,{options:_0x3afa7d,args:_0x5d3474,tdx:_0x43d65f}=_0x5eb4b8,_0x1947ee=_0x5d3474[0x0]||_0x3afa7d['parentSegment'];if(!_0x1947ee)return showParentSegmentNotSetError(_0x515c8a(0x156)+_0x515c8a(0xef)),0x1;_0x3afa7d['verbose']&&(console[_0x515c8a(0xf9)](_0x515c8a(0x109)+_0x3afa7d[_0x515c8a(0x272)]),console[_0x515c8a(0xf9)]('Parent\x20segment:\x20'+_0x1947ee));const _0x568aea=await withSpinner(_0x515c8a(0x1fd)+_0x1947ee+_0x515c8a(0x2b2),()=>_0x43d65f['segment'][_0x515c8a(0xbc)](_0x1947ee),{'verbose':_0x3afa7d['verbose']}),_0x1c7d05=_0x568aea['data'],_0x4a0b7b=await withSpinner(_0x515c8a(0x226)+_0x1947ee+_0x515c8a(0x2b2),()=>_0x43d65f[_0x515c8a(0x21e)][_0x515c8a(0x1f5)](_0x1c7d05),{'verbose':_0x3afa7d[_0x515c8a(0xc0)]}),_0x5b1167=_0x4a0b7b[_0x515c8a(0x28d)];console[_0x515c8a(0xf9)]('✔\x20Found\x20'+_0x5b1167[_0x515c8a(0x104)]+'\x20RT\x20journey'+(_0x5b1167[_0x515c8a(0x104)]!==0x1?'s':''));if(_0x3afa7d[_0x515c8a(0x132)]===_0x515c8a(0x297)||_0x3afa7d[_0x515c8a(0x132)]===_0x515c8a(0x100))await handleSDKOutput(_0x5b1167,_0x3afa7d);else{if(_0x5b1167[_0x515c8a(0x104)]===0x0)console['log']('No\x20RT\x20journeys\x20found');else for(const _0x86634a of _0x5b1167){const _0x1351a5=_0x86634a['state']===_0x515c8a(0x27b)?'🚀':'📝',_0x154f00=_0x86634a[_0x515c8a(0x292)]?a35_0x2bfa77['yellow'](_0x515c8a(0xac)):'',_0x58b1f4=a35_0x2bfa77[_0x515c8a(0x1c4)]('\x20('+_0x86634a[_0x515c8a(0x1cd)]+_0x515c8a(0x25c)+(_0x86634a[_0x515c8a(0x1cd)]!==0x1?'s':'')+')');console[_0x515c8a(0xd8)](_0x1351a5+'\x20'+_0x86634a[_0x515c8a(0xe8)]+_0x154f00+_0x58b1f4);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']=a35_0x2f1715(0x2bd);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x13f);async['execute'](_0x9e15e9){const _0x19e675=a35_0x2f1715,{options:_0x301e4c,args:_0x5288bb,tdx:_0x360554}=_0x9e15e9,_0xc8d39e=_0x5288bb[0x0];if(!_0xc8d39e)return console[_0x19e675(0xf9)](a35_0x2bfa77[_0x19e675(0x192)](_0x19e675(0x1d1))),console[_0x19e675(0xf9)](_0x19e675(0xb8)),console['error'](a35_0x2bfa77['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x301e4c[_0x19e675(0xc0)]&&(console[_0x19e675(0xf9)](_0x19e675(0x109)+_0x301e4c['site']),console['error'](_0x19e675(0x2b5)+_0xc8d39e));const _0x3801a7=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0xc8d39e+'\x27...',()=>_0x360554['realtime'][_0x19e675(0x13a)](_0xc8d39e),{'verbose':_0x301e4c[_0x19e675(0xc0)]}),_0x574127=_0x3801a7[_0x19e675(0x28d)];console[_0x19e675(0xf9)](_0x19e675(0x1f2)+_0x574127[_0x19e675(0xe8)]+'\x27');if(_0x301e4c[_0x19e675(0x132)]==='json'||_0x301e4c[_0x19e675(0x132)]===_0x19e675(0x100))await handleSDKOutput([_0x574127],_0x301e4c);else{const _0xc6763c=_0x574127[_0x19e675(0x204)]===_0x19e675(0x27b)?'🚀':'📝',_0x3f1425=_0x574127['paused']?a35_0x2bfa77[_0x19e675(0x1db)](_0x19e675(0xac)):'';console[_0x19e675(0xd8)](_0xc6763c+'\x20'+_0x574127[_0x19e675(0xe8)]+_0x3f1425);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a35_0x2f1715(0x14f);[a35_0x2f1715(0x1ec)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a35_0x2f1715(0xc9)](_0x1e441f){const _0x2e3a81=a35_0x2f1715,{options:_0x136108,args:_0x537e7e,tdx:_0x4e5871}=_0x1e441f,_0x2ae53c=_0x537e7e[0x0];if(!_0x2ae53c)return console['error'](a35_0x2bfa77[_0x2e3a81(0x192)](_0x2e3a81(0x1d1))),console['error'](_0x2e3a81(0x17e)),console[_0x2e3a81(0xf9)](a35_0x2bfa77[_0x2e3a81(0x1c4)](_0x2e3a81(0x2c4))),0x1;_0x136108[_0x2e3a81(0xc0)]&&(console[_0x2e3a81(0xf9)](_0x2e3a81(0x109)+_0x136108[_0x2e3a81(0x272)]),console[_0x2e3a81(0xf9)](_0x2e3a81(0x2b5)+_0x2ae53c));const _0x470866=await withSpinner(_0x2e3a81(0x1ca)+_0x2ae53c+'\x27...',()=>_0x4e5871[_0x2e3a81(0x21e)][_0x2e3a81(0x13e)](_0x2ae53c),{'verbose':_0x136108[_0x2e3a81(0xc0)]}),_0x14f6dd=_0x470866[_0x2e3a81(0x28d)];console[_0x2e3a81(0xf9)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x14f6dd[_0x2e3a81(0xe8)]+'\x27');if(_0x136108[_0x2e3a81(0x132)]==='json'||_0x136108[_0x2e3a81(0x132)]==='jsonl')await handleSDKOutput([_0x14f6dd],_0x136108);else{const _0x17835a=_0x14f6dd[_0x2e3a81(0x204)]===_0x2e3a81(0x27b)?'🚀':'📝',_0x14ae5d=_0x14f6dd[_0x2e3a81(0x292)]?a35_0x2bfa77[_0x2e3a81(0x1db)](_0x2e3a81(0xac)):'';console[_0x2e3a81(0xd8)](_0x17835a+'\x20'+_0x14f6dd[_0x2e3a81(0xe8)]+_0x14ae5d);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a35_0x2f1715(0x121);[a35_0x2f1715(0x1ec)]='Get\x20current\x20RT\x20configuration\x20version\x20status';async['execute'](_0x518f47){const _0x98c9ea=a35_0x2f1715,{options:_0x41cdc9,args:_0x15f80a,tdx:_0x1d7773}=_0x518f47,_0x292320=_0x15f80a[0x0]||_0x41cdc9[_0x98c9ea(0x1f3)];if(!_0x292320)return showParentSegmentNotSetError(_0x98c9ea(0x1a8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment'),0x1;_0x41cdc9[_0x98c9ea(0xc0)]&&(console['error'](_0x98c9ea(0x109)+_0x41cdc9[_0x98c9ea(0x272)]),console[_0x98c9ea(0xf9)](_0x98c9ea(0x26a)+_0x292320));const _0x164f24=await withSpinner(_0x98c9ea(0x1fd)+_0x292320+'\x27...',()=>_0x1d7773['segment'][_0x98c9ea(0xbc)](_0x292320),{'verbose':_0x41cdc9[_0x98c9ea(0xc0)]}),_0x59797e=_0x164f24['data'],_0xfd84ca=await withSpinner(_0x98c9ea(0x168)+_0x292320+_0x98c9ea(0x2b2),()=>_0x1d7773[_0x98c9ea(0x21e)][_0x98c9ea(0x2b0)](_0x59797e),{'verbose':_0x41cdc9['verbose']}),_0x1a0235=_0xfd84ca[_0x98c9ea(0x28d)];return console[_0x98c9ea(0xf9)](_0x98c9ea(0x108)),_0x41cdc9[_0x98c9ea(0x132)]===_0x98c9ea(0x297)||_0x41cdc9['format']===_0x98c9ea(0x100)?await handleSDKOutput([_0x1a0235],_0x41cdc9):(console[_0x98c9ea(0xd8)](_0x98c9ea(0x1fc)+_0x1a0235['id']),console[_0x98c9ea(0xd8)](_0x98c9ea(0x1d6)+_0x1a0235['audienceId']),console[_0x98c9ea(0xd8)](_0x98c9ea(0x27a)+_0x1a0235[_0x98c9ea(0x23c)]),console[_0x98c9ea(0xd8)]('eventKind:\x20'+_0x1a0235[_0x98c9ea(0x200)]),console[_0x98c9ea(0xd8)](_0x98c9ea(0x1c6)+_0x1a0235['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x1a0);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x14d);async['execute'](_0x1c7ef2){const _0x3895dd=a35_0x2f1715,{options:_0x856029,args:_0x49d8f9,tdx:_0x33e55f}=_0x1c7ef2,_0x115eda=_0x49d8f9[0x0]||_0x856029[_0x3895dd(0x1f3)];if(!_0x115eda)return showParentSegmentNotSetError(_0x3895dd(0x102)+_0x3895dd(0x232)),0x1;const _0x3eb877=await withSpinner(_0x3895dd(0x1fd)+_0x115eda+_0x3895dd(0x2b2),()=>_0x33e55f['segment'][_0x3895dd(0xbc)](_0x115eda),{'verbose':_0x856029[_0x3895dd(0xc0)]}),_0x16b6da=_0x3eb877[_0x3895dd(0x28d)],_0x5c9cf6=await withSpinner(_0x3895dd(0xd3)+_0x115eda+_0x3895dd(0x2b2),()=>_0x33e55f[_0x3895dd(0x11a)]['list'](_0x16b6da),{'verbose':_0x856029['verbose']}),_0x2f3092=_0x5c9cf6[_0x3895dd(0x28d)];console[_0x3895dd(0xf9)]('✔\x20Found\x20'+_0x2f3092['length']+'\x20personalization\x20service'+(_0x2f3092['length']!==0x1?'s':''));if(_0x856029[_0x3895dd(0x132)]===_0x3895dd(0x297)||_0x856029[_0x3895dd(0x132)]===_0x3895dd(0x100))await handleSDKOutput(_0x2f3092,_0x856029);else{if(_0x2f3092[_0x3895dd(0x104)]===0x0)console[_0x3895dd(0xd8)](_0x3895dd(0x210)),console[_0x3895dd(0xf9)](a35_0x2bfa77[_0x3895dd(0x29f)](_0x3895dd(0x1a3)));else for(const _0x354686 of _0x2f3092){console['log'](a35_0x2bfa77[_0x3895dd(0x1d5)](_0x354686['name'])+'\x20'+a35_0x2bfa77[_0x3895dd(0x1c4)](_0x3895dd(0x115)+_0x354686['id']+')'));_0x354686[_0x3895dd(0x1ec)]&&console[_0x3895dd(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x3895dd(0x1c4)](_0x354686[_0x3895dd(0x1ec)]));if(_0x354686[_0x3895dd(0x275)]&&_0x354686['tokens']['length']>0x0)for(const _0x5aa172 of _0x354686[_0x3895dd(0x275)]){const _0x2087b8=_0x5aa172[_0x3895dd(0x22f)]?.['length']?_0x5aa172['allowedIps'][_0x3895dd(0x145)](',\x20'):'any';console[_0x3895dd(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x3895dd(0x29f)](_0x3895dd(0x1d4))+'\x20'+_0x5aa172['name']+'\x20'+a35_0x2bfa77['dim'](_0x3895dd(0x115)+_0x5aa172['id']+')')),console['log'](_0x3895dd(0xfc)+a35_0x2bfa77['dim'](_0x3895dd(0xd0))+'\x20'+_0x2087b8);}else console[_0x3895dd(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x3895dd(0x1c4)](_0x3895dd(0x10e)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x1bb);['description']=a35_0x2f1715(0x1bf);async[a35_0x2f1715(0xc9)](_0x20562e){const _0x5b8f2d=a35_0x2f1715,{options:_0x33efcf,args:_0xc7a50a,tdx:_0x2fe221}=_0x20562e,_0x42ec8d=_0x33efcf,_0x44e51e=_0xc7a50a[0x0],_0x504cac=_0xc7a50a[0x1]||_0x33efcf[_0x5b8f2d(0x1f3)];if(!_0x44e51e)return console[_0x5b8f2d(0xf9)](_0x5b8f2d(0x148)),console[_0x5b8f2d(0xf9)](_0x5b8f2d(0x242)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x504cac)return showParentSegmentNotSetError(_0x5b8f2d(0xca)+_0x5b8f2d(0x27c)),0x1;const _0x1abe28=await withSpinner(_0x5b8f2d(0x1fd)+_0x504cac+_0x5b8f2d(0x2b2),()=>_0x2fe221[_0x5b8f2d(0x1af)][_0x5b8f2d(0xbc)](_0x504cac),{'verbose':_0x33efcf['verbose']}),_0x5ea237=_0x1abe28['data'],_0x1ab854={'name':_0x44e51e,'description':_0x42ec8d[_0x5b8f2d(0x1ec)],'public':_0x42ec8d[_0x5b8f2d(0x270)]},_0x447bc9=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x44e51e+_0x5b8f2d(0x2b2),()=>_0x2fe221[_0x5b8f2d(0x11a)][_0x5b8f2d(0x10f)](_0x5ea237,_0x1ab854),{'verbose':_0x33efcf['verbose']}),_0x2ed922=_0x447bc9[_0x5b8f2d(0x28d)];return console[_0x5b8f2d(0xf9)](_0x5b8f2d(0x184)+_0x2ed922[_0x5b8f2d(0xe8)]+_0x5b8f2d(0x257)+_0x2ed922['id']),await handleSDKOutput([_0x2ed922],_0x33efcf),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']=a35_0x2f1715(0x299);[a35_0x2f1715(0x1ec)]='Show\x20personalization\x20service\x20details';async[a35_0x2f1715(0xc9)](_0x11a39e){const _0x4bae04=a35_0x2f1715,{options:_0x3fa469,args:_0x3355c3,tdx:_0x383cd7}=_0x11a39e,_0x4c40f4=_0x3355c3[0x0],_0xf6b3b6=_0x3355c3[0x1]||_0x3fa469[_0x4bae04(0x1f3)];if(!_0x4c40f4)return console[_0x4bae04(0xf9)](_0x4bae04(0x238)),console[_0x4bae04(0xf9)](_0x4bae04(0x19d)),console[_0x4bae04(0xf9)](_0x4bae04(0x202)),0x1;if(!_0xf6b3b6)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x23f9fd=await withSpinner(_0x4bae04(0x1fd)+_0xf6b3b6+'\x27...',()=>_0x383cd7[_0x4bae04(0x1af)][_0x4bae04(0xbc)](_0xf6b3b6),{'verbose':_0x3fa469[_0x4bae04(0xc0)]}),_0x2909e6=_0x23f9fd[_0x4bae04(0x28d)],_0x4d7b25=await withSpinner(_0x4bae04(0xff)+_0x4c40f4+_0x4bae04(0x2b2),()=>_0x383cd7['personalization'][_0x4bae04(0xed)](_0x2909e6,_0x4c40f4),{'verbose':_0x3fa469[_0x4bae04(0xc0)]}),_0x406c48=_0x4d7b25[_0x4bae04(0x28d)];if(_0x3fa469['json']||_0x3fa469['jsonl'])await handleSDKOutput([_0x406c48],_0x3fa469);else{console[_0x4bae04(0xd8)](a35_0x2bfa77['bold'](_0x406c48['name'])+'\x20'+a35_0x2bfa77[_0x4bae04(0x1c4)](_0x4bae04(0x115)+_0x406c48['id']+')'));_0x406c48[_0x4bae04(0x1ec)]&&console[_0x4bae04(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x4bae04(0x1c4)](_0x406c48['description']));console[_0x4bae04(0xd8)]('\x20\x20'+a35_0x2bfa77['cyan']('public:')+'\x20'+(_0x406c48[_0x4bae04(0x270)]?_0x4bae04(0x23f):'no'));if(_0x406c48[_0x4bae04(0x275)]&&_0x406c48[_0x4bae04(0x275)][_0x4bae04(0x104)]>0x0)for(const _0x452c8b of _0x406c48[_0x4bae04(0x275)]){const _0x4cfb1a=_0x452c8b[_0x4bae04(0x22f)]?.['length']?_0x452c8b[_0x4bae04(0x22f)][_0x4bae04(0x145)](',\x20'):_0x4bae04(0xb4);console[_0x4bae04(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x4bae04(0x29f)](_0x4bae04(0x1d4))+'\x20'+_0x452c8b[_0x4bae04(0xe8)]+'\x20'+a35_0x2bfa77[_0x4bae04(0x1c4)](_0x4bae04(0x115)+_0x452c8b['id']+')')),console[_0x4bae04(0xd8)](_0x4bae04(0xfc)+a35_0x2bfa77[_0x4bae04(0x1c4)](_0x4bae04(0xd0))+'\x20'+_0x4cfb1a);}else console[_0x4bae04(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x4bae04(0x1c4)](_0x4bae04(0x10e)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x234);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x134);async[a35_0x2f1715(0xc9)](_0x19bf20){const _0x26029c=a35_0x2f1715,{options:_0x3642b1,args:_0x5e9cf7,tdx:_0x4dc691}=_0x19bf20,_0x1285d8=_0x5e9cf7[0x0],_0x348587=_0x5e9cf7[0x1]||_0x3642b1[_0x26029c(0x1f3)];if(!_0x1285d8)return console['error'](_0x26029c(0x238)),console[_0x26029c(0xf9)](_0x26029c(0x24c)),console['error'](_0x26029c(0x2a0)),0x1;if(!_0x348587)return showParentSegmentNotSetError(_0x26029c(0x220)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0xbca9a9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x348587+_0x26029c(0x2b2),()=>_0x4dc691[_0x26029c(0x1af)]['resolveParentId'](_0x348587),{'verbose':_0x3642b1[_0x26029c(0xc0)]}),_0x2924c0=_0xbca9a9[_0x26029c(0x28d)];return await withSpinner(_0x26029c(0x13b)+_0x1285d8+_0x26029c(0x2b2),()=>_0x4dc691[_0x26029c(0x11a)]['delete'](_0x2924c0,_0x1285d8),{'verbose':_0x3642b1[_0x26029c(0xc0)]}),console['error'](_0x26029c(0x141)+_0x1285d8+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x267);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x256);async[a35_0x2f1715(0xc9)](_0x3fecde){const _0x5439a9=a35_0x2f1715,{options:_0x2a0ee7,args:_0x4be9af,tdx:_0x275fb1}=_0x3fecde,_0x732aba=_0x2a0ee7,_0x40e205=_0x4be9af[0x0],_0x333619=_0x4be9af[0x1]||_0x2a0ee7[_0x5439a9(0x1f3)];if(!_0x40e205)return console[_0x5439a9(0xf9)](_0x5439a9(0x238)),console[_0x5439a9(0xf9)](_0x5439a9(0x111)),console[_0x5439a9(0xf9)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x732aba['name'])return console[_0x5439a9(0xf9)]('Error:\x20--name\x20is\x20required'),console[_0x5439a9(0xf9)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x333619)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a'+_0x5439a9(0x24e)),0x1;const _0x5bf90f=await withSpinner(_0x5439a9(0x1fd)+_0x333619+_0x5439a9(0x2b2),()=>_0x275fb1[_0x5439a9(0x1af)]['resolveParentId'](_0x333619),{'verbose':_0x2a0ee7[_0x5439a9(0xc0)]}),_0xd24ba8=_0x5bf90f['data'],_0x22d0d6={'name':_0x732aba[_0x5439a9(0xe8)]};_0x732aba[_0x5439a9(0x1ec)]!==undefined&&(_0x22d0d6[_0x5439a9(0x1ec)]=_0x732aba['description']);const _0x4675d7=await withSpinner(_0x5439a9(0x280)+_0x40e205+'\x27...',()=>_0x275fb1['personalization'][_0x5439a9(0x250)](_0xd24ba8,_0x40e205,_0x22d0d6),{'verbose':_0x2a0ee7['verbose']}),_0x5e6283=_0x4675d7[_0x5439a9(0x28d)];return console[_0x5439a9(0xf9)](_0x5439a9(0x1c0)+_0x5e6283[_0x5439a9(0xe8)]+'\x27'),await handleSDKOutput([_0x5e6283],_0x2a0ee7),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x259);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x18c);async[a35_0x2f1715(0xc9)](_0x413077){const _0x16eb9d=a35_0x2f1715,{options:_0x20f881,args:_0x56277a,tdx:_0x29b628}=_0x413077,_0x5a8a0e=_0x20f881,_0x364950=_0x56277a[0x0],_0x438cfb=_0x56277a[0x1],_0xc43974=_0x56277a[0x2]||_0x20f881[_0x16eb9d(0x1f3)];if(!_0x364950)return console[_0x16eb9d(0xf9)](_0x16eb9d(0x182)),console['error'](_0x16eb9d(0xd5)),console['error'](_0x16eb9d(0x197)),0x1;if(!_0x438cfb)return console[_0x16eb9d(0xf9)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x16eb9d(0xf9)](_0x16eb9d(0xd5)),console[_0x16eb9d(0xf9)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0xc43974)return showParentSegmentNotSetError(_0x16eb9d(0x179)+_0x16eb9d(0x197)),0x1;const _0x1d8d22=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xc43974+_0x16eb9d(0x2b2),()=>_0x29b628['segment'][_0x16eb9d(0xbc)](_0xc43974),{'verbose':_0x20f881['verbose']}),_0x5a857d=_0x1d8d22[_0x16eb9d(0x28d)],_0x40770b={'name':_0x364950};_0x5a8a0e[_0x16eb9d(0x22f)]&&(_0x40770b[_0x16eb9d(0x22f)]=_0x5a8a0e['allowedIps']['split'](',')[_0x16eb9d(0x110)](_0x4abc20=>_0x4abc20[_0x16eb9d(0x1e2)]()));_0x5a8a0e[_0x16eb9d(0x1ec)]&&(_0x40770b[_0x16eb9d(0x1ec)]=_0x5a8a0e[_0x16eb9d(0x1ec)]);const _0x21e3ff=await withSpinner(_0x16eb9d(0x2a1)+_0x364950+_0x16eb9d(0x217)+_0x438cfb+_0x16eb9d(0x2b2),()=>_0x29b628[_0x16eb9d(0x11a)][_0x16eb9d(0x1d9)](_0x5a857d,_0x438cfb,_0x40770b),{'verbose':_0x20f881['verbose']}),_0x186e05=_0x21e3ff[_0x16eb9d(0x28d)];return console['error'](_0x16eb9d(0x13c)+_0x186e05['name']+_0x16eb9d(0x257)+_0x186e05['id']),_0x186e05[_0x16eb9d(0x14b)]&&(console['error'](a35_0x2bfa77['yellow']('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x16eb9d(0xf9)](a35_0x2bfa77['cyan'](_0x186e05['value'])),console[_0x16eb9d(0xf9)]('')),await handleSDKOutput([_0x186e05],_0x20f881),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0xc5);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x157);async[a35_0x2f1715(0xc9)](_0x106021){const _0x57de07=a35_0x2f1715,{options:_0x4e5233,args:_0x6b228d,tdx:_0x54fdf7}=_0x106021,_0x463d94=_0x6b228d[0x0],_0x550c85=_0x6b228d[0x1]||_0x4e5233['parentSegment'];if(!_0x463d94)return console[_0x57de07(0xf9)]('Error:\x20Token\x20ID\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console['error'](_0x57de07(0x2be)),0x1;if(!_0x550c85)return showParentSegmentNotSetError(_0x57de07(0x1ac)+_0x57de07(0x2be)),0x1;const _0x4ccc7d=await withSpinner(_0x57de07(0x1fd)+_0x550c85+_0x57de07(0x2b2),()=>_0x54fdf7[_0x57de07(0x1af)][_0x57de07(0xbc)](_0x550c85),{'verbose':_0x4e5233[_0x57de07(0xc0)]}),_0x56736a=_0x4ccc7d['data'],_0x1bbe3c=await withSpinner(_0x57de07(0x186),()=>_0x54fdf7['personalization'][_0x57de07(0x206)](_0x56736a),{'verbose':_0x4e5233[_0x57de07(0xc0)]}),_0x3ad20d=_0x1bbe3c['data'];let _0x2c62aa;for(const _0x25bebc of _0x3ad20d){if(_0x25bebc['tokens']?.[_0x57de07(0x23d)](_0x1c6623=>_0x1c6623['id']===_0x463d94)){_0x2c62aa=_0x25bebc['id'];break;}}if(!_0x2c62aa)return console['error'](_0x57de07(0x24d)+_0x463d94+_0x57de07(0x2bc)),0x1;const _0x6c2093=await withSpinner(_0x57de07(0x22b)+_0x463d94+_0x57de07(0x2b2),()=>_0x54fdf7[_0x57de07(0x11a)][_0x57de07(0x1c5)](_0x56736a,_0x2c62aa,_0x463d94),{'verbose':_0x4e5233['verbose']}),_0x47cd99=_0x6c2093[_0x57de07(0x28d)];return console[_0x57de07(0xf9)](_0x57de07(0x1ef)+(_0x47cd99['name']||_0x463d94)+'\x27'),await handleSDKOutput([_0x47cd99],_0x4e5233),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a35_0x2f1715(0x196);[a35_0x2f1715(0x1ec)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a35_0x2f1715(0xc9)](_0x4226d6){const _0x230a50=a35_0x2f1715,{options:_0x4110ce,args:_0x3daa28,tdx:_0x19ce93}=_0x4226d6,_0x28f5b0=_0x3daa28[0x0]||_0x4110ce[_0x230a50(0x1f3)];if(!_0x28f5b0)return showParentSegmentNotSetError(_0x230a50(0xd1)+'\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'),0x1;const _0x1f2e6b=await withSpinner(_0x230a50(0x1fd)+_0x28f5b0+_0x230a50(0x2b2),()=>_0x19ce93[_0x230a50(0x1af)][_0x230a50(0xbc)](_0x28f5b0),{'verbose':_0x4110ce[_0x230a50(0xc0)]}),_0x269f32=_0x1f2e6b[_0x230a50(0x28d)],_0x6c97ba=await withSpinner(_0x230a50(0x15a)+_0x28f5b0+'\x27...',()=>_0x19ce93[_0x230a50(0x11a)][_0x230a50(0x2b6)](_0x269f32),{'verbose':_0x4110ce['verbose']}),_0x88f440=_0x6c97ba[_0x230a50(0x28d)];console[_0x230a50(0xf9)]('✔\x20Found\x20'+_0x88f440['length']+_0x230a50(0x181)+(_0x88f440[_0x230a50(0x104)]!==0x1?'s':''));if(_0x4110ce['format']===_0x230a50(0x297)||_0x4110ce['format']===_0x230a50(0x100))await handleSDKOutput(_0x88f440,_0x4110ce);else{if(_0x88f440[_0x230a50(0x104)]===0x0)console[_0x230a50(0xd8)](_0x230a50(0xc4));else for(const _0x2b5fb8 of _0x88f440){console['log'](a35_0x2bfa77['bold'](_0x2b5fb8[_0x230a50(0xe8)])+'\x20'+a35_0x2bfa77['dim'](_0x230a50(0x115)+_0x2b5fb8['id']+')'));_0x2b5fb8[_0x230a50(0x1ec)]&&console[_0x230a50(0xd8)]('\x20\x20'+a35_0x2bfa77['dim'](_0x2b5fb8[_0x230a50(0x1ec)]));const _0x1bfa85=_0x2b5fb8['sections']?.['length']||0x0;console['log']('\x20\x20'+a35_0x2bfa77[_0x230a50(0x29f)](_0x230a50(0x131))+'\x20'+_0x1bfa85);if(_0x2b5fb8[_0x230a50(0x167)]&&_0x2b5fb8['sections'][_0x230a50(0x104)]>0x0)for(const _0x19e5a2 of _0x2b5fb8['sections']){console[_0x230a50(0xd8)](_0x230a50(0x28f)+_0x19e5a2['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0xe0);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x20a);async[a35_0x2f1715(0xc9)](_0xd90945){const _0x528527=a35_0x2f1715,{options:_0x2a7bfc,args:_0x47356c,tdx:_0x1ee72a}=_0xd90945,_0x40b949=_0x47356c[0x0];if(!_0x40b949)return console['error'](_0x528527(0x142)),console[_0x528527(0xf9)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x1bb49d=await withSpinner(_0x528527(0x1ae)+_0x40b949+_0x528527(0x2b2),()=>_0x1ee72a[_0x528527(0x11a)][_0x528527(0x243)](_0x40b949),{'verbose':_0x2a7bfc[_0x528527(0xc0)]}),_0x28b913=_0x1bb49d[_0x528527(0x28d)];console[_0x528527(0xf9)](_0x528527(0x260)+_0x28b913[_0x528527(0xe8)]+'\x27');if(_0x2a7bfc[_0x528527(0x132)]===_0x528527(0x297)||_0x2a7bfc[_0x528527(0x132)]==='jsonl')await handleSDKOutput([_0x28b913],_0x2a7bfc);else{console[_0x528527(0xd8)](a35_0x2bfa77[_0x528527(0x1d5)](_0x28b913['name'])+'\x20'+a35_0x2bfa77[_0x528527(0x1c4)](_0x528527(0x115)+_0x28b913['id']+')'));_0x28b913[_0x528527(0x1ec)]&&console['log']('\x20\x20'+a35_0x2bfa77[_0x528527(0x1c4)](_0x28b913[_0x528527(0x1ec)]));_0x28b913[_0x528527(0x1b1)]&&console['log']('\x20\x20'+a35_0x2bfa77[_0x528527(0x29f)](_0x528527(0x183))+'\x20'+_0x28b913[_0x528527(0x1b1)]);console[_0x528527(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x528527(0x29f)](_0x528527(0x1eb))+'\x20'+_0x28b913[_0x528527(0x231)]),console[_0x528527(0xd8)]('\x20\x20'+a35_0x2bfa77[_0x528527(0x29f)](_0x528527(0x248))+'\x20'+_0x28b913[_0x528527(0x169)]);const _0x50c1c8=_0x28b913[_0x528527(0x167)]?.[_0x528527(0x104)]||0x0;console['log']('\x20\x20'+a35_0x2bfa77[_0x528527(0x29f)](_0x528527(0x131))+'\x20'+_0x50c1c8);if(_0x28b913['sections']&&_0x28b913[_0x528527(0x167)]['length']>0x0)for(const _0x4e36b7 of _0x28b913[_0x528527(0x167)]){console['log']('\x20\x20\x20\x20'+a35_0x2bfa77['bold'](_0x4e36b7[_0x528527(0xe8)])+'\x20'+a35_0x2bfa77['dim']('(id:\x20'+_0x4e36b7['id']+')')),_0x4e36b7['entryCriteria']&&(console[_0x528527(0xd8)](_0x528527(0x18e)+a35_0x2bfa77[_0x528527(0x29f)]('entryCriteria:')+'\x20'+_0x4e36b7[_0x528527(0x21c)][_0x528527(0xe8)]),_0x4e36b7[_0x528527(0x21c)][_0x528527(0xae)]?.[_0x528527(0xc1)]&&console[_0x528527(0xd8)](_0x528527(0x2c2)+a35_0x2bfa77[_0x528527(0x29f)](_0x528527(0x2b8))+'\x20'+_0x4e36b7['entryCriteria'][_0x528527(0xae)][_0x528527(0xc1)])),_0x4e36b7[_0x528527(0xb2)]&&console['log'](_0x528527(0x18e)+a35_0x2bfa77[_0x528527(0x29f)]('payload:')+'\x20'+JSON['stringify'](_0x4e36b7[_0x528527(0xb2)])),_0x4e36b7[_0x528527(0xfa)]&&console[_0x528527(0xd8)](_0x528527(0x18e)+a35_0x2bfa77['cyan'](_0x528527(0xb0))+'\x20true');}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0xd6);[a35_0x2f1715(0x1ec)]='Delete\x20a\x20realtime\x20personalization';async[a35_0x2f1715(0xc9)](_0x3c7e62){const _0x3a3c73=a35_0x2f1715,{options:_0x4fb663,args:_0x26574f,tdx:_0x10537d}=_0x3c7e62,_0x51ce73=_0x26574f[0x0];if(!_0x51ce73)return console[_0x3a3c73(0xf9)](_0x3a3c73(0x142)),console['error'](_0x3a3c73(0x294)),0x1;return await withSpinner(_0x3a3c73(0x1b7)+_0x51ce73+'\x27...',()=>_0x10537d[_0x3a3c73(0x11a)]['deletePersonalization'](_0x51ce73),{'verbose':_0x4fb663[_0x3a3c73(0xc0)]}),console[_0x3a3c73(0xf9)](_0x3a3c73(0x17a)+_0x51ce73+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x12f);[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x285);async[a35_0x2f1715(0xc9)](_0x2c0d7a){const _0xec89ef=a35_0x2f1715,{options:_0x4cd572,tdx:_0x3b26c9}=_0x2c0d7a,_0x3e0148=_0x4cd572;let _0x2e1c86;if(_0x3e0148[_0xec89ef(0x22c)]){_0x2e1c86=await loadJSON(_0x3e0148[_0xec89ef(0x22c)],!![]);if(!_0x2e1c86[_0xec89ef(0x130)]?.['parentFolder'])return console[_0xec89ef(0xf9)](_0xec89ef(0x199)),console[_0xec89ef(0xf9)](_0xec89ef(0x122)),console[_0xec89ef(0xf9)]('\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(!_0x3e0148['name'])return console['error']('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0xec89ef(0xf9)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0xec89ef(0xf9)](_0xec89ef(0xc6)),0x1;if(_0x3e0148[_0xec89ef(0x1ec)]===undefined)return console[_0xec89ef(0xf9)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0xec89ef(0xf9)](_0xec89ef(0x128)),console['error'](_0xec89ef(0xc6)),0x1;if(_0x3e0148[_0xec89ef(0x123)]===undefined)return console[_0xec89ef(0xf9)](_0xec89ef(0x15e)),console[_0xec89ef(0xf9)]('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x5efc7e=_0x3e0148[_0xec89ef(0x1b1)];if(!_0x5efc7e&&_0x4cd572['parentSegment']){const _0x162851=await withSpinner(_0xec89ef(0x1fd)+_0x4cd572['parentSegment']+'\x27...',()=>_0x3b26c9['segment']['resolveParentId'](_0x4cd572[_0xec89ef(0x1f3)]),{'verbose':_0x4cd572[_0xec89ef(0xc0)]});_0x5efc7e=_0x162851[_0xec89ef(0x28d)];}let _0x5ce06f;_0x3e0148[_0xec89ef(0x167)]&&(_0x5ce06f=await loadJSON(_0x3e0148['sections'],![]));const _0x3640e3=_0x3e0148[_0xec89ef(0x123)]===_0xec89ef(0x1b0)?null:{'id':_0x3e0148[_0xec89ef(0x123)],'type':_0xec89ef(0x15d)};_0x2e1c86={'attributes':{'name':_0x3e0148['name'],'description':_0x3e0148[_0xec89ef(0x1ec)]||null,..._0x5efc7e!==undefined&&{'audienceId':_0x5efc7e},..._0x5ce06f!==undefined&&{'sections':_0x5ce06f}},'relationships':{'parentFolder':{'data':_0x3640e3}}};}const _0x3aba94=await withSpinner('Creating\x20personalization\x20\x27'+(_0x2e1c86['attributes']?.['name']??'')+_0xec89ef(0x2b2),()=>_0x3b26c9[_0xec89ef(0x11a)][_0xec89ef(0x29a)](_0x2e1c86),{'verbose':_0x4cd572['verbose']}),_0x1648aa=_0x3aba94[_0xec89ef(0x28d)];return console[_0xec89ef(0xf9)]('✔\x20Created\x20personalization\x20\x27'+_0x1648aa[_0xec89ef(0xe8)]+_0xec89ef(0x257)+_0x1648aa['id']),await handleSDKOutput([_0x1648aa],_0x4cd572),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']='ps:pz:patch';[a35_0x2f1715(0x1ec)]=a35_0x2f1715(0x143);async[a35_0x2f1715(0xc9)](_0x43d1fd){const _0x4f60b2=a35_0x2f1715,{options:_0x86708b,args:_0x2081d7}=_0x43d1fd,_0x16a9de=_0x86708b,_0x4fe2a5=_0x2081d7[0x0];if(!_0x4fe2a5)return console[_0x4f60b2(0xf9)](_0x4f60b2(0x142)),console[_0x4f60b2(0xf9)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>'),0x1;let _0x49c145;if(_0x16a9de[_0x4f60b2(0x22c)])_0x49c145=await loadJSON(_0x16a9de['file'],!![]);else{if(!_0x16a9de[_0x4f60b2(0xe8)])return console['error']('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x4f60b2(0xf9)](_0x4f60b2(0x10c)),0x1;if(_0x16a9de[_0x4f60b2(0x1ec)]===undefined)return console[_0x4f60b2(0xf9)](_0x4f60b2(0xe5)),console[_0x4f60b2(0xf9)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x4c5546;_0x16a9de[_0x4f60b2(0x167)]&&(_0x4c5546=await loadJSON(_0x16a9de['sections'],![])),_0x49c145={'attributes':{'name':_0x16a9de['name'],'description':_0x16a9de[_0x4f60b2(0x1ec)]||null,..._0x4c5546!==undefined&&{'sections':_0x4c5546}}};}const {tdx:_0x1ca232}=_0x43d1fd,_0x2b85a0=await withSpinner('Patching\x20personalization\x20\x27'+_0x4fe2a5+'\x27...',()=>_0x1ca232[_0x4f60b2(0x11a)][_0x4f60b2(0x1a6)](_0x4fe2a5,_0x49c145),{'verbose':_0x86708b[_0x4f60b2(0xc0)]}),_0x237234=_0x2b85a0[_0x4f60b2(0x28d)];return console[_0x4f60b2(0xf9)](_0x4f60b2(0x1c2)+_0x237234['name']+_0x4f60b2(0x1c1)+_0x237234['id']+')'),await handleSDKOutput([_0x237234],_0x86708b),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a35_0x2f1715(0xe8)]=a35_0x2f1715(0x261);[a35_0x2f1715(0x1ec)]='Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML';async['execute'](_0xea17e8){const _0x26d879=a35_0x2f1715,{options:_0x49ab02,args:_0x2780fa}=_0xea17e8,_0x54c015=_0x2780fa[0x0]||_0x49ab02[_0x26d879(0x1f3)];if(!_0x54c015)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a'+_0x26d879(0xad)),0x1;const _0x3977f6=resolveYamlFile(_0x54c015);if(!existsSync(_0x3977f6))return showFileNotFoundError(_0x3977f6,_0x54c015),0x1;let _0x58f1fe;try{_0x58f1fe=readFileSync(_0x3977f6,_0x26d879(0x1b4));}catch(_0x58f437){const _0x3efcd6=_0x58f437 instanceof Error?_0x58f437[_0x26d879(0xb5)]:String(_0x58f437);return console[_0x26d879(0xf9)](_0x26d879(0xc8)+_0x3efcd6),0x1;}let _0x488b0a;try{_0x488b0a=parseDef(_0x58f1fe);}catch(_0x211bf4){const _0x1e7598=_0x211bf4 instanceof Error?_0x211bf4[_0x26d879(0xb5)]:String(_0x211bf4);return console[_0x26d879(0xf9)](a35_0x2bfa77[_0x26d879(0x192)](_0x26d879(0x27d)+_0x1e7598)),0x1;}if(_0x488b0a['personalization_services']&&_0x488b0a['personalization_services'][_0x26d879(0x104)]>0x0)return console[_0x26d879(0xf9)](a35_0x2bfa77[_0x26d879(0x1db)](_0x26d879(0x16a)+_0x3977f6)),console[_0x26d879(0xf9)](a35_0x2bfa77[_0x26d879(0x1c4)]('\x20\x20\x20'+_0x488b0a[_0x26d879(0xfb)][_0x26d879(0x104)]+'\x20service(s)\x20configured')),0x1;!_0x488b0a[_0x26d879(0x21e)]&&(_0x488b0a[_0x26d879(0x21e)]={'events':[{'name':'page_view','source_table':'<database>.<table>'}],'attributes':[{'name':_0x26d879(0x215),'type':_0x26d879(0x126)}],'id_stitching':{'primary_key':_0x488b0a[_0x26d879(0x1f1)][_0x26d879(0xdb)]===_0x26d879(0x22a)?_0x26d879(0xeb):_0x26d879(0x1b3)}});_0x488b0a['personalization_services']=[{'name':'My\x20Service','description':_0x26d879(0x12b),'trigger_event':_0x26d879(0x140),'sections':[{'name':_0x26d879(0x155),'criteria':_0x26d879(0x1c8),'attributes':[_0x26d879(0x215)]}]}];const _0x224792=serializeDef(_0x488b0a);return writeFileSync(_0x3977f6,_0x224792,_0x26d879(0x1b4)),console['error'](a35_0x2bfa77['green']('✔')+_0x26d879(0x17f)+a35_0x2bfa77['cyan'](_0x3977f6)),(!_0x488b0a[_0x26d879(0x21e)]||_0x58f1fe[_0x26d879(0x1be)](_0x26d879(0x14e))===-0x1)&&console[_0x26d879(0xf9)](a35_0x2bfa77[_0x26d879(0x17b)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x26d879(0xf9)]('\x0a'+a35_0x2bfa77[_0x26d879(0x1c4)](_0x26d879(0x1aa))),console['error'](_0x26d879(0x1df)+_0x3977f6+_0x26d879(0x12c)),console[_0x26d879(0xf9)](_0x26d879(0x1a2)+a35_0x2bfa77[_0x26d879(0x1c4)](_0x26d879(0x2c7)+_0x54c015)+_0x26d879(0x239)),0x0;}}
|