@treasuredata/tdx 2026.3.47 → 2026.3.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-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-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-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/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/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/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.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/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/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/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/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/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.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/index.js.map +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/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/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 a32_0x50f93c=a32_0x3e39;(function(_0x538168,_0x47be5c){const _0x144968=a32_0x3e39,_0xcb03af=_0x538168();while(!![]){try{const _0x2b7db7=-parseInt(_0x144968(0x1ac))/0x1+parseInt(_0x144968(0xca))/0x2*(-parseInt(_0x144968(0xf3))/0x3)+-parseInt(_0x144968(0x16b))/0x4*(parseInt(_0x144968(0x2a1))/0x5)+parseInt(_0x144968(0x1da))/0x6*(-parseInt(_0x144968(0x228))/0x7)+parseInt(_0x144968(0xa9))/0x8*(parseInt(_0x144968(0xd7))/0x9)+parseInt(_0x144968(0x1e3))/0xa+-parseInt(_0x144968(0x17e))/0xb*(-parseInt(_0x144968(0x206))/0xc);if(_0x2b7db7===_0x47be5c)break;else _0xcb03af['push'](_0xcb03af['shift']());}catch(_0x52b2cf){_0xcb03af['push'](_0xcb03af['shift']());}}}(a32_0x571d,0xbb6ce));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x1c65cf 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 a32_0x3a28f3 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=a32_0x50f93c(0x107),LEGACY_PARENT_SEGMENT_DIR=a32_0x50f93c(0x225);function openBrowser(_0x4a7882){const _0x51174f=a32_0x50f93c,_0x86b231=process[_0x51174f(0x102)],_0xaaad5e=_0x86b231==='darwin'?'open':_0x86b231===_0x51174f(0xb4)?_0x51174f(0x24a):_0x51174f(0x1ce);spawn(_0xaaad5e,[_0x4a7882],{'detached':!![],'stdio':_0x51174f(0x191)})[_0x51174f(0xe9)]();}function migrateLegacyDirectory(){const _0x1821bd=a32_0x50f93c;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x4777f6=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x4777f6[_0x1821bd(0x29c)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x1821bd(0x185)](a32_0x3a28f3[_0x1821bd(0x1c6)](_0x1821bd(0x9e)+LEGACY_PARENT_SEGMENT_DIR+_0x1821bd(0x233)+PARENT_SEGMENT_DIR+_0x1821bd(0x227))),console['error'](a32_0x3a28f3[_0x1821bd(0x20b)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x1821bd(0x29d))),![];console[_0x1821bd(0x185)](a32_0x3a28f3[_0x1821bd(0x1c6)](_0x1821bd(0x11a)+LEGACY_PARENT_SEGMENT_DIR+_0x1821bd(0x146)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a32_0x3a28f3['green'](_0x1821bd(0x144)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1ddc13){const _0x36c920=_0x1ddc13 instanceof Error?_0x1ddc13[_0x1821bd(0x26c)]:String(_0x1ddc13);return console['error'](a32_0x3a28f3[_0x1821bd(0x1d7)](_0x1821bd(0x257)+_0x36c920+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x50f93c(0x22a)](_0x4004a8){const _0x31f7f=a32_0x50f93c;return migrateLegacyDirectory(),super[_0x31f7f(0x22a)](_0x4004a8);}}function resolveYamlFile(_0x17fc7d){const _0x1172b7=a32_0x50f93c;if(_0x17fc7d[_0x1172b7(0xd2)](_0x1172b7(0x28b))||_0x17fc7d[_0x1172b7(0xd2)](_0x1172b7(0x182)))return _0x17fc7d;return a32_0x1c65cf[_0x1172b7(0x25b)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x17fc7d)+_0x1172b7(0x28b));}function formatProgressMessage(_0x1c22a1){const _0x363c10=a32_0x50f93c,_0x3713b0=_0x1c22a1[_0x363c10(0x29b)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x3713b0){const [,_0xf4f99f,_0xd298b1,_0x28ed5c='']=_0x3713b0;return a32_0x3a28f3[_0x363c10(0x20b)](_0xf4f99f+':')+'\x20'+_0xd298b1+a32_0x3a28f3['dim'](_0x28ed5c);}return a32_0x3a28f3[_0x363c10(0x20b)](_0x1c22a1);}function showFileNotFoundError(_0x15f67f,_0x59facb){const _0x545c34=a32_0x50f93c;console[_0x545c34(0x185)](a32_0x3a28f3['red'](_0x545c34(0x104)+_0x15f67f+'\x0a')),console['error'](a32_0x3a28f3[_0x545c34(0x2a6)](_0x545c34(0x151)+_0x59facb+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x557368){const _0x98d5ab=a32_0x50f93c;if(!_0x557368[_0x98d5ab(0x1dc)])return;const _0xc3f2b0=_0x557368[_0x98d5ab(0x1dc)],_0x468567=_0xc3f2b0['enabled']?a32_0x3a28f3[_0x98d5ab(0x25e)](_0x98d5ab(0x249)):a32_0x3a28f3[_0x98d5ab(0x1c6)](_0x98d5ab(0x1e4));console[_0x98d5ab(0x185)]('\x0a'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0xd6))+'\x20'+_0x468567);if(_0xc3f2b0[_0x98d5ab(0x135)]&&_0xc3f2b0[_0x98d5ab(0x135)][_0x98d5ab(0x256)]>0x0){console['error']('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0x1f2))+'\x20'+_0xc3f2b0[_0x98d5ab(0x135)][_0x98d5ab(0x256)]+_0x98d5ab(0x1bd));for(const _0x5772d5 of _0xc3f2b0[_0x98d5ab(0x135)]){const _0x3f981e=_0x5772d5['sourceTableValid']===![]?a32_0x3a28f3[_0x98d5ab(0x1d7)]('✘'):a32_0x3a28f3[_0x98d5ab(0x25e)]('✔');console[_0x98d5ab(0x185)](_0x98d5ab(0xd3)+_0x3f981e+'\x20'+_0x5772d5[_0x98d5ab(0xbd)]),_0x5772d5[_0x98d5ab(0x230)]&&console[_0x98d5ab(0x185)](_0x98d5ab(0x10e)+a32_0x3a28f3[_0x98d5ab(0x1d7)](_0x5772d5[_0x98d5ab(0x230)]));}}if(_0xc3f2b0[_0x98d5ab(0x21f)]&&_0xc3f2b0[_0x98d5ab(0x21f)][_0x98d5ab(0x256)]>0x0){console['error']('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0x1a0))+'\x20'+_0xc3f2b0[_0x98d5ab(0x21f)][_0x98d5ab(0x256)]+_0x98d5ab(0x1bd));for(const _0x375410 of _0xc3f2b0[_0x98d5ab(0x21f)]){const _0x517626=_0x375410[_0x98d5ab(0xe5)]?a32_0x3a28f3['green']('✔'):a32_0x3a28f3[_0x98d5ab(0x1d7)]('✘');console[_0x98d5ab(0x185)](_0x98d5ab(0xd3)+_0x517626+'\x20'+_0x375410[_0x98d5ab(0xbd)]+'\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)]('('+_0x375410[_0x98d5ab(0x202)]+')'));}}if(_0xc3f2b0[_0x98d5ab(0x190)]){const _0x348225=_0xc3f2b0[_0x98d5ab(0x190)][_0x98d5ab(0x27b)]?.[_0x98d5ab(0x256)]?'\x20+\x20['+_0xc3f2b0[_0x98d5ab(0x190)]['stitchingKeys']['join'](',\x20')+']':'';console['error']('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)]('ID\x20Stitching:')+'\x20'+_0xc3f2b0[_0x98d5ab(0x190)][_0x98d5ab(0x1fd)]+_0x348225);}if(_0xc3f2b0['personalizationServices']&&_0xc3f2b0[_0x98d5ab(0x221)][_0x98d5ab(0x256)]>0x0){console[_0x98d5ab(0x185)]('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0x16e))+'\x20'+_0xc3f2b0[_0x98d5ab(0x221)][_0x98d5ab(0x256)]+_0x98d5ab(0x21e)+(_0xc3f2b0[_0x98d5ab(0x221)][_0x98d5ab(0x256)]!==0x1?'s':''));for(const _0x3d6fcc of _0xc3f2b0['personalizationServices']){console[_0x98d5ab(0x185)](_0x98d5ab(0x211)+_0x3d6fcc[_0x98d5ab(0xbd)]);}}}function showParentSegmentNotSetError(_0x283858){const _0x49740b=a32_0x50f93c;console['error'](a32_0x3a28f3[_0x49740b(0x1c6)](_0x49740b(0x155))),console[_0x49740b(0x185)](_0x283858);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x268);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x279);async[a32_0x50f93c(0x29f)](_0x46f37d){const _0x4fed78=a32_0x50f93c,{options:_0x38ac82,args:_0x310531,tdx:_0x42cf20}=_0x46f37d,_0x6929a4=_0x310531[0x0];_0x38ac82[_0x4fed78(0x1f3)]&&(console[_0x4fed78(0x185)]('Site:\x20'+_0x38ac82['site']),_0x6929a4&&console[_0x4fed78(0x185)](_0x4fed78(0xb1)+_0x6929a4));const _0x3ef790=await withSpinner(_0x6929a4?_0x4fed78(0x21c)+_0x6929a4+_0x4fed78(0x1c9):_0x4fed78(0x122),()=>_0x42cf20[_0x4fed78(0xb0)]['listParents'](),{'verbose':_0x38ac82[_0x4fed78(0x1f3)]});let _0x5bbe38=_0x3ef790['data'];if(_0x6929a4){const _0x388676=_0x6929a4[_0x4fed78(0x147)](/[.+^${}()|[\]\\]/g,_0x4fed78(0x17b))['replace'](/\*/g,'.*')[_0x4fed78(0x147)](/\?/g,'.'),_0xb1599f=new RegExp('^'+_0x388676+'$','i');_0x5bbe38=_0x5bbe38[_0x4fed78(0x12f)](_0x33cdaa=>_0xb1599f[_0x4fed78(0x157)](_0x33cdaa[_0x4fed78(0x21f)][_0x4fed78(0xbd)]));}_0x5bbe38[_0x4fed78(0xe2)]((_0x1c3a3a,_0x4f9a60)=>_0x1c3a3a[_0x4fed78(0x21f)][_0x4fed78(0xbd)][_0x4fed78(0x181)](_0x4f9a60['attributes'][_0x4fed78(0xbd)])),console['error']('✔\x20Found\x20'+_0x5bbe38[_0x4fed78(0x256)]+_0x4fed78(0x12d)+(_0x5bbe38[_0x4fed78(0x256)]!==0x1?'s':''));const _0x254fd1=_0x3a3ffd=>{const _0x49e420=_0x4fed78;return getConsoleNextUrl(_0x38ac82[_0x49e420(0x1ed)],'/app/dw/parentSegments/'+_0x3a3ffd);};if(_0x38ac82[_0x4fed78(0x159)]===_0x4fed78(0x245)||_0x38ac82['format']===_0x4fed78(0x288)){const _0x4354fa=_0x5bbe38[_0x4fed78(0x226)](_0x1fa7d2=>({..._0x1fa7d2,'url':_0x254fd1(_0x1fa7d2['id'])}));await handleSDKOutput(_0x4354fa,_0x38ac82);}else{if(_0x5bbe38[_0x4fed78(0x256)]===0x0)_0x6929a4?console[_0x4fed78(0x10a)](_0x4fed78(0x23d)+_0x6929a4):console[_0x4fed78(0x10a)](_0x4fed78(0x26f));else for(const _0xc9cf1e of _0x5bbe38){const _0x3deebd=_0xc9cf1e[_0x4fed78(0x21f)][_0x4fed78(0x195)]?a32_0x3a28f3[_0x4fed78(0x20b)]('\x20('+formatRows(_0xc9cf1e[_0x4fed78(0x21f)][_0x4fed78(0x195)])+')'):'',_0x2a618a=hyperlink(_0xc9cf1e[_0x4fed78(0x21f)][_0x4fed78(0xbd)],_0x254fd1(_0xc9cf1e['id']));console[_0x4fed78(0x10a)](_0x4fed78(0x282)+_0x2a618a+_0x3deebd);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0xcd);[a32_0x50f93c(0x121)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async['execute'](_0xfa39a8){const _0x22365c=a32_0x50f93c,{options:_0x4f0fb3,args:_0x37d2fe,tdx:_0x25d0be}=_0xfa39a8;console[_0x22365c(0x185)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+_0x22365c(0x1c5)+_0x22365c(0x188));const _0x507f00=_0x4f0fb3;if(_0x37d2fe['length']===0x0)return console[_0x22365c(0x185)](a32_0x3a28f3[_0x22365c(0x1d7)](_0x22365c(0x194))),console['error'](_0x22365c(0x24f)),0x1;const _0x3d2ef4=_0x37d2fe[0x0];if(!_0x507f00[_0x22365c(0x18b)]||!_0x507f00[_0x22365c(0x1f9)])return console[_0x22365c(0x185)](_0x22365c(0x251)),console['error'](_0x22365c(0x24f)),0x1;_0x507f00[_0x22365c(0x1f3)]&&(console[_0x22365c(0x185)](_0x22365c(0x22f)+_0x507f00['site']),console[_0x22365c(0x185)](_0x22365c(0xf2)+_0x3d2ef4),console[_0x22365c(0x185)](_0x22365c(0xd4)+_0x507f00[_0x22365c(0x18b)]),console[_0x22365c(0x185)](_0x22365c(0x11e)+_0x507f00[_0x22365c(0x1f9)]));const _0x3b4eca=await loadJSONFromOptions(_0x507f00['attributes'],_0x507f00['attributesFile']),_0x14cc66=await loadJSONFromOptions(_0x507f00['behaviors'],_0x507f00[_0x22365c(0x1ee)]),_0x501050=await loadJSONFromOptions(_0x507f00[_0x22365c(0x1ec)],_0x507f00['customerGroupFile']),_0x9a7930={'name':_0x3d2ef4,'description':_0x507f00[_0x22365c(0x121)],'scheduleType':_0x507f00[_0x22365c(0x263)],'scheduleOption':_0x507f00['scheduleOption'],'timezone':_0x507f00[_0x22365c(0xab)],'master':{'parentDatabaseName':_0x507f00[_0x22365c(0x18b)],'parentTableName':_0x507f00[_0x22365c(0x1f9)]},'attributes':_0x3b4eca,'behaviors':_0x14cc66,'customerGroup':_0x501050},_0x2171ef=await withSpinner(_0x22365c(0x2a0)+_0x3d2ef4+_0x22365c(0x1c9),()=>_0x25d0be[_0x22365c(0xb0)][_0x22365c(0x100)](_0x9a7930),{'verbose':_0x4f0fb3['verbose']}),_0xff5e98=_0x2171ef['data'];return console[_0x22365c(0x185)](_0x22365c(0x91)+_0xff5e98[_0x22365c(0xbd)]+_0x22365c(0x17d)+_0xff5e98['id']),await handleSDKOutput([_0xff5e98],_0x4f0fb3),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x11b);[a32_0x50f93c(0x121)]='Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async['execute'](_0x15f279){const _0x4a2ad1=a32_0x50f93c,{options:_0x530a80,args:_0x387c49,tdx:_0x39eb8a}=_0x15f279;console[_0x4a2ad1(0x185)](_0x4a2ad1(0x212)+_0x4a2ad1(0x1c5)+_0x4a2ad1(0x188));const _0x92ec20=_0x530a80;if(_0x387c49[_0x4a2ad1(0x256)]===0x0)return console[_0x4a2ad1(0x185)](a32_0x3a28f3['red'](_0x4a2ad1(0x194))),console[_0x4a2ad1(0x185)](_0x4a2ad1(0x139)),0x1;const _0x50a43c=_0x387c49[0x0];_0x92ec20[_0x4a2ad1(0x1f3)]&&(console[_0x4a2ad1(0x185)](_0x4a2ad1(0x22f)+_0x92ec20['site']),console['error'](_0x4a2ad1(0x145)+_0x50a43c));const _0x28ce76=await withSpinner(_0x4a2ad1(0x1b9)+_0x50a43c+_0x4a2ad1(0x1c9),()=>_0x39eb8a[_0x4a2ad1(0xb0)][_0x4a2ad1(0x26d)](_0x50a43c),{'verbose':_0x92ec20[_0x4a2ad1(0x1f3)]}),_0xf06dbc=_0x28ce76[_0x4a2ad1(0x189)],_0xe71895=await loadJSONFromOptions(_0x92ec20[_0x4a2ad1(0x128)],_0x92ec20[_0x4a2ad1(0x11d)]),_0x4ec3cc=await loadJSONFromOptions(_0x92ec20[_0x4a2ad1(0x93)],_0x92ec20[_0x4a2ad1(0xde)]),_0x17f722={'name':_0xf06dbc[_0x4a2ad1(0xbd)],'description':_0x92ec20['description']!==undefined?_0x92ec20[_0x4a2ad1(0x121)]:_0xf06dbc[_0x4a2ad1(0x121)],'scheduleType':_0x92ec20[_0x4a2ad1(0x263)]!==undefined?_0x92ec20[_0x4a2ad1(0x263)]:_0xf06dbc[_0x4a2ad1(0x263)],'scheduleOption':_0x92ec20['scheduleOption']!==undefined?_0x92ec20[_0x4a2ad1(0x1ba)]:_0xf06dbc[_0x4a2ad1(0x1ba)],'timezone':_0x92ec20[_0x4a2ad1(0xab)]!==undefined?_0x92ec20[_0x4a2ad1(0xab)]:_0xf06dbc[_0x4a2ad1(0xab)],'master':_0xf06dbc[_0x4a2ad1(0x27c)],'attributes':_0xe71895?[..._0xf06dbc[_0x4a2ad1(0x21f)]||[],..._0xe71895]:_0xf06dbc[_0x4a2ad1(0x21f)],'behaviors':_0x4ec3cc?[..._0xf06dbc[_0x4a2ad1(0x1bc)]||[],..._0x4ec3cc]:_0xf06dbc['behaviors'],'customerGroup':_0xf06dbc[_0x4a2ad1(0x1ec)]},_0x4ada7a=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x50a43c+_0x4a2ad1(0x1c9),()=>_0x39eb8a[_0x4a2ad1(0xb0)][_0x4a2ad1(0x2a2)](_0x50a43c,_0x17f722),{'verbose':_0x92ec20[_0x4a2ad1(0x1f3)]}),_0x237888=_0x4ada7a[_0x4a2ad1(0x189)];return console[_0x4a2ad1(0x185)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x237888[_0x4a2ad1(0xbd)]+'\x27'),await handleSDKOutput([_0x237888],_0x92ec20),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x106);async[a32_0x50f93c(0x29f)](_0x54a6b7){const _0x4cde7a=a32_0x50f93c,{options:_0x461215,args:_0x24edd9,tdx:_0xb5004a}=_0x54a6b7,_0x40cc73=_0x461215,_0x4f07aa=_0x24edd9[0x0]||_0x461215['parentSegment'];if(!_0x4f07aa)return showParentSegmentNotSetError(_0x4cde7a(0x165)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x40cc73[_0x4cde7a(0x13b)]&&_0x40cc73[_0x4cde7a(0x108)])return console[_0x4cde7a(0x185)](a32_0x3a28f3['red'](_0x4cde7a(0x1e2))),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x18c))),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x130)+PARENT_SEGMENT_DIR+_0x4cde7a(0x1c2))),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x2a6)]('Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u')),0x1;const _0x191dec=_0x40cc73[_0x4cde7a(0x108)]||a32_0x1c65cf[_0x4cde7a(0x25b)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x4f07aa)+_0x4cde7a(0x28b));_0x40cc73[_0x4cde7a(0x1f3)]&&(console[_0x4cde7a(0x185)](_0x4cde7a(0x22f)+_0x40cc73[_0x4cde7a(0x1ed)]),console['error'](_0x4cde7a(0x145)+_0x4f07aa),console[_0x4cde7a(0x185)](_0x4cde7a(0x163)+_0x191dec));const _0x5ae446=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x4f07aa+_0x4cde7a(0x1c9),()=>_0xb5004a[_0x4cde7a(0xb0)][_0x4cde7a(0x22d)](_0x4f07aa),{'verbose':_0x40cc73[_0x4cde7a(0x1f3)]}),_0x15534f=_0x5ae446['data'];if(existsSync(_0x191dec)){const _0x3cceb3=readFileSync(_0x191dec,_0x4cde7a(0x275)),_0x56d78a=generateDiff(_0x3cceb3,_0x15534f);if(!hasChanges(_0x56d78a))console['error'](a32_0x3a28f3[_0x4cde7a(0x25e)]('✔')+_0x4cde7a(0x219)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x191dec)+_0x4cde7a(0x10d));else{console['error'](_0x4cde7a(0x13a)+_0x191dec+'\x27:'),console[_0x4cde7a(0x185)]('─'[_0x4cde7a(0x129)](0x3c)),console['error'](formatDiffWithColors(_0x56d78a)),console[_0x4cde7a(0x185)]('─'[_0x4cde7a(0x129)](0x3c));if(!_0x40cc73[_0x4cde7a(0x265)]){if(!isInteractive())return console['error'](a32_0x3a28f3[_0x4cde7a(0x1d7)](_0x4cde7a(0x237)),_0x4cde7a(0x15c)),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x294))),0x1;const _0x21f32d=await confirmKey('Overwrite\x20\x27'+_0x191dec+'\x27?');if(!_0x21f32d)return console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x1c6)](_0x4cde7a(0x1e9))),0x1;}writeFileSync(_0x191dec,_0x15534f,_0x4cde7a(0x275)),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x25e)]('✔')+_0x4cde7a(0x164)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x191dec));}}else{const _0x4c020f=a32_0x1c65cf['dirname'](_0x191dec);!existsSync(_0x4c020f)&&mkdirSync(_0x4c020f,{'recursive':!![]}),writeFileSync(_0x191dec,_0x15534f,_0x4cde7a(0x275)),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x25e)]('✔')+_0x4cde7a(0x164)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x191dec));}return saveSessionContext({'parent_segment':_0x4f07aa},_0x40cc73[_0x4cde7a(0xa3)]),console[_0x4cde7a(0x185)](a32_0x3a28f3['green']('✔')+_0x4cde7a(0xa8)+a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x225))+_0x4cde7a(0x22b)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x4f07aa)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a32_0x50f93c(0x270);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x28d);async[a32_0x50f93c(0x29f)](_0x45de11){const _0x3e2f6d=a32_0x50f93c,{options:_0x2c409b,args:_0x9cbfca,tdx:_0x365d47}=_0x45de11,_0x59d98e=_0x2c409b,_0xff6d8e=_0x9cbfca[0x0]||_0x2c409b['parentSegment'];if(!_0xff6d8e)return showParentSegmentNotSetError(_0x3e2f6d(0x9f)+_0x3e2f6d(0x27a)),0x1;const _0x3149ce=resolveYamlFile(_0xff6d8e);if(!existsSync(_0x3149ce))return showFileNotFoundError(_0x3149ce,_0xff6d8e),0x1;_0x59d98e[_0x3e2f6d(0x1f3)]&&(console['error'](_0x3e2f6d(0x22f)+_0x59d98e[_0x3e2f6d(0x1ed)]),console[_0x3e2f6d(0x185)](_0x3e2f6d(0x1c8)+_0x3149ce));let _0x4798c4;try{_0x4798c4=readFileSync(_0x3149ce,_0x3e2f6d(0x275));}catch(_0x5a57dc){const _0x1b77fd=_0x5a57dc instanceof Error?_0x5a57dc[_0x3e2f6d(0x26c)]:String(_0x5a57dc);return console[_0x3e2f6d(0x185)]('Error\x20reading\x20file:\x20'+_0x1b77fd),0x1;}const _0x1a4c3b=await withSpinner('Analyzing\x20changes...',()=>_0x365d47[_0x3e2f6d(0xb0)]['pushParentYaml'](_0x4798c4),{'verbose':_0x59d98e[_0x3e2f6d(0x1f3)]}),_0x14f67e=_0x1a4c3b[_0x3e2f6d(0x189)],{isNew:_0x1016da,name:_0x327f14,hasChanges:_0x27d02c,diffFormatted:_0x27b93a}=_0x14f67e;if(!_0x27d02c)return console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x327f14+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x1016da?console['error'](_0x3e2f6d(0xc3)+_0x327f14+'\x27:'):console['error'](_0x3e2f6d(0x25f)+_0x327f14+'\x27:');console['error']('─'[_0x3e2f6d(0x129)](0x3c)),console[_0x3e2f6d(0x185)](_0x27b93a),console[_0x3e2f6d(0x185)]('─'[_0x3e2f6d(0x129)](0x3c));const _0x1c1e09=_0x1016da?_0x3e2f6d(0x142)+_0x327f14+'\x27?':_0x3e2f6d(0x9b)+_0x327f14+'\x27?';if(!_0x59d98e[_0x3e2f6d(0x265)]){if(!isInteractive())return console[_0x3e2f6d(0x185)](a32_0x3a28f3['red'](_0x3e2f6d(0x237)),_0x3e2f6d(0x15c)),console['error'](a32_0x3a28f3[_0x3e2f6d(0x20b)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x605554=await confirmKey(_0x1c1e09);if(!_0x605554)return console['error'](a32_0x3a28f3[_0x3e2f6d(0x1c6)](_0x3e2f6d(0x1e9))),0x1;}const _0x33bfb3=_0x1016da?'Creating':_0x3e2f6d(0xdb),_0x417231=await withSpinner(_0x33bfb3+_0x3e2f6d(0xf0)+_0x327f14+'\x27...',()=>_0x14f67e['apply'](),{'verbose':_0x59d98e[_0x3e2f6d(0x1f3)]}),_0x2eb8f1=_0x417231[_0x3e2f6d(0x189)],_0x38d27d=getConsoleNextUrl(_0x59d98e['site'],_0x3e2f6d(0x192)+_0x2eb8f1['id']),_0x5f507b=_0x1016da?'Created':_0x3e2f6d(0x14a);return console[_0x3e2f6d(0x185)]('✔\x20'+_0x5f507b+_0x3e2f6d(0xf0)+_0x2eb8f1[_0x3e2f6d(0xbd)]+'\x27'),console['error']('\x20\x20'+_0x38d27d),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x209);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x21b);async[a32_0x50f93c(0x29f)](_0xde4aa3){const _0x4a546c=a32_0x50f93c,{options:_0x54393d,args:_0x14e66f,tdx:_0x5dd1b3}=_0xde4aa3,_0x1f033b=_0x54393d,_0x363f10=_0x14e66f[0x0]||_0x54393d[_0x4a546c(0x15a)];if(!_0x363f10)return showParentSegmentNotSetError(_0x4a546c(0x20c)+_0x4a546c(0xc1)+_0x4a546c(0x1cc)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x4a546c(0xaf)+_0x4a546c(0x117)),0x1;const _0x5ba7f9=resolveYamlFile(_0x363f10);if(!existsSync(_0x5ba7f9))return showFileNotFoundError(_0x5ba7f9,_0x363f10),0x1;_0x1f033b[_0x4a546c(0x1f3)]&&(console[_0x4a546c(0x185)](_0x4a546c(0x22f)+_0x1f033b[_0x4a546c(0x1ed)]),console['error']('YAML\x20file:\x20'+_0x5ba7f9));let _0x1e602d;try{_0x1e602d=readFileSync(_0x5ba7f9,_0x4a546c(0x275));}catch(_0x5e0964){const _0x4fbf43=_0x5e0964 instanceof Error?_0x5e0964['message']:String(_0x5e0964);return console[_0x4a546c(0x185)](_0x4a546c(0x17f)+_0x4fbf43),0x1;}const _0x899049=createCommandSpinner(a32_0x3a28f3[_0x4a546c(0x20b)]('Validating\x20configuration...'),{'verbose':_0x1f033b[_0x4a546c(0x1f3)]});_0x899049[_0x4a546c(0x24a)]();const _0x20cafe={'onProgress':_0x554b34=>{const _0x4625bc=_0x4a546c;_0x899049[_0x4625bc(0xef)]=formatProgressMessage(_0x554b34);}};if(_0x1f033b[_0x4a546c(0x27c)])_0x20cafe['master']=!![];if(_0x1f033b[_0x4a546c(0x1f7)])_0x20cafe[_0x4a546c(0x1f7)]=!![];_0x1f033b[_0x4a546c(0x103)]&&(_0x20cafe['attribute']=_0x1f033b[_0x4a546c(0x103)]);_0x1f033b[_0x4a546c(0x234)]&&(_0x20cafe[_0x4a546c(0x234)]=_0x1f033b[_0x4a546c(0x234)]);if(_0x1f033b['interval'])_0x20cafe[_0x4a546c(0x156)]=_0x1f033b[_0x4a546c(0x156)];let _0x170cd0;try{_0x170cd0=await _0x5dd1b3[_0x4a546c(0xb0)][_0x4a546c(0xbb)](_0x1e602d,_0x20cafe),_0x899049[_0x4a546c(0x27d)]();}catch(_0x310e85){_0x899049[_0x4a546c(0x27d)]();throw _0x310e85;}const _0x32b0e1=_0x1f033b[_0x4a546c(0x156)]||_0x4a546c(0xff);return this[_0x4a546c(0xfb)](_0x170cd0,_0x20cafe,_0x5ba7f9,_0x32b0e1),_0x170cd0[_0x4a546c(0x161)]?0x0:0x1;}[a32_0x50f93c(0xfb)](_0x41369c,_0x11f2b5,_0x480212,_0x5a009e){const _0x3cad59=a32_0x50f93c;console[_0x3cad59(0x185)]('\x0a'+a32_0x3a28f3[_0x3cad59(0x15d)](_0x3cad59(0x132))+'\x20'+_0x41369c[_0x3cad59(0xbd)]),console['error']('═'[_0x3cad59(0x129)](0x3c)),this[_0x3cad59(0x8f)](_0x41369c);if(typeof _0x11f2b5[_0x3cad59(0x103)]===_0x3cad59(0x187)){this['displayAttributesStats'](_0x41369c),this['displaySummary'](_0x41369c),this[_0x3cad59(0x1db)](_0x480212,_0x5a009e,_0x3cad59(0x103),_0x11f2b5[_0x3cad59(0x103)]);return;}if(_0x11f2b5[_0x3cad59(0x103)]===!![]){this[_0x3cad59(0xb2)](_0x41369c),this[_0x3cad59(0x183)](_0x41369c),this['displayPreviewHints'](_0x480212,_0x5a009e,'attributes');return;}if(typeof _0x11f2b5[_0x3cad59(0x234)]===_0x3cad59(0x187)){this[_0x3cad59(0x272)](_0x41369c,_0x5a009e),this[_0x3cad59(0x183)](_0x41369c),this['displayPreviewHints'](_0x480212,_0x5a009e,_0x3cad59(0x234),_0x11f2b5[_0x3cad59(0x234)]);return;}if(_0x11f2b5['behavior']===!![]){this[_0x3cad59(0x272)](_0x41369c,_0x5a009e),this[_0x3cad59(0x183)](_0x41369c),this['displayPreviewHints'](_0x480212,_0x5a009e,_0x3cad59(0x1bc));return;}this[_0x3cad59(0xb2)](_0x41369c),this[_0x3cad59(0x272)](_0x41369c,_0x5a009e),this[_0x3cad59(0x217)](_0x41369c),this[_0x3cad59(0x183)](_0x41369c),this[_0x3cad59(0x1db)](_0x480212,_0x5a009e,_0x3cad59(0x176));}[a32_0x50f93c(0x217)](_0x559061){displayRealtimeValidation(_0x559061);}[a32_0x50f93c(0x1db)](_0x17a351,_0x4a25bb,_0x1652ee,_0x209024){const _0x2662c3=a32_0x50f93c;console[_0x2662c3(0x185)]('\x0a'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0xe6)));const _0x2dd866=_0x4a25bb!==_0x2662c3(0xff)?'\x20--interval\x20'+_0x4a25bb:'';if(_0x1652ee==='attribute'&&_0x209024)console[_0x2662c3(0x185)]('\x20\x20'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0x1f6)+_0x17a351+_0x2662c3(0xda)+_0x209024+'\x22'+_0x2dd866));else{if(_0x1652ee==='behavior'&&_0x209024)console['error']('\x20\x20'+a32_0x3a28f3['dim'](_0x2662c3(0x1f6)+_0x17a351+'\x20--behavior\x20\x22'+_0x209024+'\x22'+_0x2dd866));else(_0x1652ee===_0x2662c3(0x21f)||_0x1652ee==='all')&&console['error']('\x20\x20'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0x1f6)+_0x17a351+_0x2662c3(0xc2)+_0x2dd866));}(_0x1652ee===_0x2662c3(0x1bc)||_0x1652ee===_0x2662c3(0x176))&&console[_0x2662c3(0x185)]('\x20\x20'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0x1f6)+_0x17a351+'\x20--behavior\x20\x22<name>\x22'+_0x2dd866)),_0x1652ee===_0x2662c3(0x176)&&console[_0x2662c3(0x185)]('\x20\x20'+a32_0x3a28f3['dim'](_0x2662c3(0x1f6)+_0x17a351+'\x20--enriched'+_0x2dd866));}[a32_0x50f93c(0x8f)](_0x285c76){const _0x548096=a32_0x50f93c,{master:_0x37945b}=_0x285c76,_0xb58c8f=_0x37945b[_0x548096(0x13c)]?a32_0x3a28f3[_0x548096(0x25e)]('✔'):a32_0x3a28f3[_0x548096(0x1d7)]('✘');console[_0x548096(0x185)]('\x0a'+a32_0x3a28f3[_0x548096(0x20b)](_0x548096(0x239))),console[_0x548096(0x185)](_0xb58c8f+'\x20'+a32_0x3a28f3[_0x548096(0x15d)](_0x37945b['database']+'.'+_0x37945b[_0x548096(0x1f9)])),_0x37945b[_0x548096(0x13c)]?_0x37945b[_0x548096(0x1dd)]!==undefined&&console[_0x548096(0x185)]('\x20\x20'+a32_0x3a28f3[_0x548096(0x20b)]('Rows:')+'\x20'+a32_0x3a28f3[_0x548096(0x2a6)](formatRows(_0x37945b[_0x548096(0x1dd)]))):console[_0x548096(0x185)]('\x20\x20'+a32_0x3a28f3[_0x548096(0x1d7)](_0x548096(0x97))+'\x20'+_0x37945b[_0x548096(0x25a)]);}[a32_0x50f93c(0xb2)](_0x47af38){const _0x48bbd0=a32_0x50f93c;if(_0x47af38[_0x48bbd0(0x21f)][_0x48bbd0(0x256)]===0x0)return;console[_0x48bbd0(0x185)]('\x0a'+a32_0x3a28f3['dim'](_0x48bbd0(0x19f)));for(const _0x13297e of _0x47af38[_0x48bbd0(0x21f)]){const _0x402f62=_0x13297e['schemaValid']?a32_0x3a28f3[_0x48bbd0(0x25e)]('✔'):a32_0x3a28f3[_0x48bbd0(0x1d7)]('✘');let _0x4470d7='';if(_0x13297e[_0x48bbd0(0x13c)]&&_0x13297e['matchedCount']!==undefined&&_0x13297e[_0x48bbd0(0x248)]!==undefined){const _0x16f35a=_0x13297e['coveragePercent']['toFixed'](0x1),_0x4de1fa=_0x13297e['coveragePercent']>=0x50?a32_0x3a28f3[_0x48bbd0(0x25e)]:_0x13297e[_0x48bbd0(0x248)]>=0x32?a32_0x3a28f3['yellow']:a32_0x3a28f3[_0x48bbd0(0x1d7)];_0x4470d7='\x20'+a32_0x3a28f3[_0x48bbd0(0x20b)](_0x48bbd0(0x1ea))+'\x20'+_0x4de1fa(_0x16f35a+'%')+'\x20('+formatRows(_0x13297e['matchedCount'])+_0x48bbd0(0x1d3);}console[_0x48bbd0(0x185)](_0x402f62+'\x20'+a32_0x3a28f3[_0x48bbd0(0x15d)](_0x13297e[_0x48bbd0(0xbd)])+_0x4470d7),console[_0x48bbd0(0x185)]('\x20\x20'+a32_0x3a28f3['dim'](_0x48bbd0(0xc8))+'\x20'+a32_0x3a28f3[_0x48bbd0(0x15d)](_0x13297e[_0x48bbd0(0x18b)]+'.'+_0x13297e[_0x48bbd0(0x1f9)]));const _0x33d378=_0x13297e[_0x48bbd0(0x252)]===_0x13297e[_0x48bbd0(0xaa)]?a32_0x3a28f3[_0x48bbd0(0x20b)]('Join\x20on:')+'\x20'+_0x13297e[_0x48bbd0(0x252)]:a32_0x3a28f3['dim']('Join:')+'\x20'+_0x13297e[_0x48bbd0(0x252)]+_0x48bbd0(0x22b)+_0x13297e[_0x48bbd0(0xaa)];console[_0x48bbd0(0x185)]('\x20\x20'+_0x33d378),console[_0x48bbd0(0x185)]('\x20\x20'+a32_0x3a28f3[_0x48bbd0(0x20b)](_0x48bbd0(0x26e))),this[_0x48bbd0(0x19c)](_0x13297e[_0x48bbd0(0xa5)]),!_0x13297e[_0x48bbd0(0x13c)]&&console[_0x48bbd0(0x185)]('\x20\x20'+a32_0x3a28f3['red'](_0x48bbd0(0x97))+'\x20'+_0x13297e['schemaError']);}}[a32_0x50f93c(0x272)](_0x3c0130,_0x3cefce){const _0x3aaa72=a32_0x50f93c;if(_0x3c0130[_0x3aaa72(0x1bc)][_0x3aaa72(0x256)]===0x0)return;console[_0x3aaa72(0x185)]('\x0a'+a32_0x3a28f3['dim'](_0x3aaa72(0x1f1))+'\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)]('('+_0x3cefce+')'));for(const _0x5a5308 of _0x3c0130['behaviors']){const _0x1e0b0b=_0x5a5308[_0x3aaa72(0x13c)]?a32_0x3a28f3[_0x3aaa72(0x25e)]('✔'):a32_0x3a28f3[_0x3aaa72(0x1d7)]('✘');let _0x12f865='';if(_0x5a5308[_0x3aaa72(0x13c)]&&_0x5a5308[_0x3aaa72(0x16f)]!==undefined&&_0x5a5308['totalEvents']!==undefined){const _0x1c0b57=_0x5a5308['customerPercent']?.[_0x3aaa72(0x284)](0x1)||'?',_0x3d7fcb=(_0x5a5308[_0x3aaa72(0x1e5)]??0x0)>=0x32?a32_0x3a28f3[_0x3aaa72(0x25e)]:(_0x5a5308[_0x3aaa72(0x1e5)]??0x0)>=0x14?a32_0x3a28f3[_0x3aaa72(0x1c6)]:a32_0x3a28f3[_0x3aaa72(0x1d7)];_0x12f865='\x20'+a32_0x3a28f3['dim'](_0x3aaa72(0x1b8))+'\x20'+_0x3d7fcb(formatRows(_0x5a5308[_0x3aaa72(0x16f)]))+'\x20('+_0x1c0b57+'%)\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0x1f2))+'\x20'+a32_0x3a28f3[_0x3aaa72(0x2a6)](formatRows(_0x5a5308[_0x3aaa72(0x299)]));}console['error'](_0x1e0b0b+'\x20'+a32_0x3a28f3[_0x3aaa72(0x15d)](_0x5a5308['name'])+_0x12f865),console[_0x3aaa72(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)]('Source:')+'\x20'+a32_0x3a28f3['bold'](_0x5a5308[_0x3aaa72(0x18b)]+'.'+_0x5a5308[_0x3aaa72(0x1f9)]));const _0x34da21=_0x5a5308['joinKey']===_0x5a5308['foreignKey']?a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0x196))+'\x20'+_0x5a5308[_0x3aaa72(0x252)]:a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0xfd))+'\x20'+_0x5a5308[_0x3aaa72(0x252)]+_0x3aaa72(0x22b)+_0x5a5308['foreignKey'];console['error']('\x20\x20'+_0x34da21),console[_0x3aaa72(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0x26e))),this[_0x3aaa72(0x19c)](_0x5a5308['columns']),!_0x5a5308['schemaValid']&&console[_0x3aaa72(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3aaa72(0x1d7)](_0x3aaa72(0x97))+'\x20'+_0x5a5308[_0x3aaa72(0x25a)]);}}[a32_0x50f93c(0x19c)](_0x88f45b){const _0x1e7f09=a32_0x50f93c;for(const _0x2fb3e6 of _0x88f45b){_0x2fb3e6[_0x1e7f09(0x172)]===_0x2fb3e6[_0x1e7f09(0x96)]||_0x2fb3e6[_0x1e7f09(0x96)]==='*'?console[_0x1e7f09(0x185)](_0x1e7f09(0x211)+_0x2fb3e6[_0x1e7f09(0x172)]):console[_0x1e7f09(0x185)](_0x1e7f09(0x211)+_0x2fb3e6[_0x1e7f09(0x172)]+'\x20'+a32_0x3a28f3[_0x1e7f09(0x20b)]('('+_0x2fb3e6[_0x1e7f09(0x96)]+')'));}}[a32_0x50f93c(0x183)](_0x39e3ab){const _0x56f6f4=a32_0x50f93c;console[_0x56f6f4(0x185)]('─'['repeat'](0x3c));if(_0x39e3ab[_0x56f6f4(0x1c0)][_0x56f6f4(0x256)]>0x0){console[_0x56f6f4(0x185)]('\x0a'+a32_0x3a28f3[_0x56f6f4(0x1d7)](_0x56f6f4(0x19a)));for(const _0x35265f of _0x39e3ab[_0x56f6f4(0x1c0)]){console[_0x56f6f4(0x185)]('\x20\x20'+a32_0x3a28f3['red']('•')+'\x20'+_0x35265f);}}_0x39e3ab[_0x56f6f4(0x161)]&&console[_0x56f6f4(0x185)]('\x0a'+a32_0x3a28f3[_0x56f6f4(0x25e)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x180);[a32_0x50f93c(0x121)]=a32_0x50f93c(0xa0);async[a32_0x50f93c(0x29f)](_0x4fae19){const _0x57523e=a32_0x50f93c,{options:_0x9e1f42,args:_0x4f0f4a,tdx:_0x4e98f0}=_0x4fae19,_0x2252b2=_0x9e1f42,_0x2bda75=_0x4f0f4a[0x0]||_0x9e1f42[_0x57523e(0x15a)];if(!_0x2bda75)return showParentSegmentNotSetError(_0x57523e(0x177)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x57523e(0x1bb)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+_0x57523e(0x2a5)+_0x57523e(0xdc)+_0x57523e(0xdf)+_0x57523e(0x117)),0x1;if(!_0x2252b2[_0x57523e(0x27c)]&&!_0x2252b2[_0x57523e(0x103)]&&!_0x2252b2[_0x57523e(0x234)]&&!_0x2252b2[_0x57523e(0x1f7)])return console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console[_0x57523e(0x185)](_0x57523e(0x137)),console[_0x57523e(0x185)](_0x57523e(0x205)),console['error'](_0x57523e(0x266)),console[_0x57523e(0x185)](_0x57523e(0x186)),console['error']('\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior'),console[_0x57523e(0x185)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x124214=resolveYamlFile(_0x2bda75);if(!existsSync(_0x124214))return showFileNotFoundError(_0x124214,_0x2bda75),0x1;_0x2252b2[_0x57523e(0x1f3)]&&(console[_0x57523e(0x185)](_0x57523e(0x22f)+_0x2252b2[_0x57523e(0x1ed)]),console[_0x57523e(0x185)](_0x57523e(0x1c8)+_0x124214));let _0x1d069b;try{_0x1d069b=readFileSync(_0x124214,_0x57523e(0x275));}catch(_0x12fda9){const _0x2241f7=_0x12fda9 instanceof Error?_0x12fda9['message']:String(_0x12fda9);return console['error'](_0x57523e(0x17f)+_0x2241f7),0x1;}let _0x49e42f;try{_0x49e42f=parseDef(_0x1d069b);}catch(_0xf01e49){const _0x1e3299=_0xf01e49 instanceof Error?_0xf01e49[_0x57523e(0x26c)]:String(_0xf01e49);return console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)](_0x57523e(0x23e)+_0x1e3299)),0x1;}if(_0x2252b2['attribute']===!![]||_0x2252b2[_0x57523e(0x103)]===''){const _0x1ed546=_0x49e42f['attributes']?.['map'](_0x52ecec=>_0x52ecec[_0x57523e(0xbd)])||[];if(_0x1ed546[_0x57523e(0x256)]===0x0)console['error'](a32_0x3a28f3[_0x57523e(0x1d7)](_0x57523e(0x1e0)));else{console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)]('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x57523e(0x185)](_0x57523e(0x136));for(const _0x4dd812 of _0x1ed546){console[_0x57523e(0x185)]('\x20\x20'+a32_0x3a28f3['cyan'](_0x4dd812));}console[_0x57523e(0x185)](_0x57523e(0x120)+_0x2bda75+_0x57523e(0xda)+_0x1ed546[0x0]+'\x22');}return 0x1;}if(_0x2252b2['behavior']===!![]||_0x2252b2[_0x57523e(0x234)]===''){const _0x5ccf3b=_0x49e42f[_0x57523e(0x1bc)]?.[_0x57523e(0x226)](_0x119512=>_0x119512['name'])||[];if(_0x5ccf3b[_0x57523e(0x256)]===0x0)console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)](_0x57523e(0x168)));else{console[_0x57523e(0x185)](a32_0x3a28f3['red'](_0x57523e(0x254))),console[_0x57523e(0x185)]('Available\x20behaviors:');for(const _0x100e61 of _0x5ccf3b){console[_0x57523e(0x185)]('\x20\x20'+a32_0x3a28f3[_0x57523e(0x2a6)](_0x100e61));}console[_0x57523e(0x185)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2bda75+_0x57523e(0x1c1)+_0x5ccf3b[0x0]+'\x22');}return 0x1;}const _0x3d6abe=createCommandSpinner(a32_0x3a28f3['dim'](_0x57523e(0x13d)),{'verbose':_0x2252b2[_0x57523e(0x1f3)]});_0x3d6abe['start']();const _0x2074b8={'onProgress':_0x4bd68f=>{const _0x5bcaa8=_0x57523e;_0x3d6abe[_0x5bcaa8(0xef)]=formatProgressMessage(_0x4bd68f);}};if(_0x2252b2[_0x57523e(0x27c)])_0x2074b8[_0x57523e(0x27c)]=!![];if(_0x2252b2['attribute']&&typeof _0x2252b2[_0x57523e(0x103)]==='string')_0x2074b8['attribute']=_0x2252b2['attribute'];if(_0x2252b2[_0x57523e(0x234)]&&typeof _0x2252b2[_0x57523e(0x234)]===_0x57523e(0x187))_0x2074b8[_0x57523e(0x234)]=_0x2252b2[_0x57523e(0x234)];if(_0x2252b2[_0x57523e(0x1f7)])_0x2074b8[_0x57523e(0x1f7)]=!![];if(_0x2252b2[_0x57523e(0x156)])_0x2074b8[_0x57523e(0x156)]=_0x2252b2['interval'];let _0x20558b;try{_0x20558b=await _0x4e98f0[_0x57523e(0xb0)][_0x57523e(0x214)](_0x1d069b,_0x2074b8),_0x3d6abe['stop']();}catch(_0x4fdea6){_0x3d6abe[_0x57523e(0x27d)]();throw _0x4fdea6;}return await this['displayPreviewResults'](_0x20558b,{'master':_0x2252b2[_0x57523e(0x27c)],'attribute':typeof _0x2252b2[_0x57523e(0x103)]===_0x57523e(0x187)?_0x2252b2[_0x57523e(0x103)]:undefined,'behavior':typeof _0x2252b2[_0x57523e(0x234)]===_0x57523e(0x187)?_0x2252b2[_0x57523e(0x234)]:undefined,'enriched':_0x2252b2[_0x57523e(0x1f7)]}),_0x20558b[_0x57523e(0x161)]?0x0:0x1;}async[a32_0x50f93c(0xe8)](_0x2015a2,_0x4e76f1){const _0x368750=a32_0x50f93c;console[_0x368750(0x185)]('\x0a'+a32_0x3a28f3[_0x368750(0x15d)](_0x368750(0x197))+'\x20'+_0x2015a2[_0x368750(0xbd)]),console['error']('═'[_0x368750(0x129)](0x3c));if(_0x4e76f1[_0x368750(0x27c)]&&_0x2015a2['sampleData']){const _0x63cc0b=a32_0x3a28f3[_0x368750(0x20b)](_0x368750(0x200))+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x2015a2[_0x368750(0x27c)][_0x368750(0x18b)]+'.'+_0x2015a2['master'][_0x368750(0x1f9)]);await this[_0x368750(0x10c)](_0x63cc0b,_0x2015a2['sampleData']);}else{if(_0x4e76f1[_0x368750(0x103)]&&_0x2015a2['sampleData']){const _0x55c376=a32_0x3a28f3[_0x368750(0x20b)](_0x368750(0x1d4))+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x4e76f1[_0x368750(0x103)]);await this[_0x368750(0x10c)](_0x55c376,_0x2015a2[_0x368750(0x208)]);}else{if(_0x4e76f1[_0x368750(0x234)]&&_0x2015a2[_0x368750(0x208)]){const _0x55f5e6=a32_0x3a28f3[_0x368750(0x20b)](_0x368750(0x1fc))+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x4e76f1['behavior']);await this[_0x368750(0x10c)](_0x55f5e6,_0x2015a2[_0x368750(0x208)]);}else{if(_0x4e76f1[_0x368750(0x1f7)]&&_0x2015a2[_0x368750(0x208)]){const _0x3f87c0=a32_0x3a28f3[_0x368750(0x20b)]('Enriched:')+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x368750(0x223));await this[_0x368750(0x10c)](_0x3f87c0,_0x2015a2[_0x368750(0x208)]);}else!_0x2015a2['sampleData']&&console[_0x368750(0x185)](_0x368750(0x166));}}}if(_0x2015a2[_0x368750(0x1c0)]['length']>0x0){console[_0x368750(0x185)]('─'[_0x368750(0x129)](0x3c)),console['error']('\x0a'+a32_0x3a28f3[_0x368750(0x1d7)](_0x368750(0x19a)));for(const _0x13e53d of _0x2015a2[_0x368750(0x1c0)]){console['error']('\x20\x20'+a32_0x3a28f3[_0x368750(0x1d7)]('•')+'\x20'+_0x13e53d);}}}async[a32_0x50f93c(0x10c)](_0x349a1c,_0x2bde7f){const _0x394312=a32_0x50f93c;if(_0x2bde7f[_0x394312(0x256)]===0x0){console[_0x394312(0x185)]('\x0a'+_0x349a1c),console[_0x394312(0x185)](_0x394312(0x1ef));return;}console[_0x394312(0x185)]('\x0a'+_0x349a1c);const _0x9c095=Object[_0x394312(0xf7)](_0x2bde7f[0x0])[_0x394312(0x226)](_0x27b4e8=>({'name':_0x27b4e8,'type':typeof _0x2bde7f[0x0][_0x27b4e8]===_0x394312(0xea)?'double':'varchar'})),_0x386f4f={'queryId':_0x394312(0x112),'columns':_0x9c095,'data':_0x2bde7f,'stats':{'state':_0x394312(0xb7),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2bde7f[_0x394312(0x256)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xc5a927=formatAsTable(_0x386f4f,_0x2bde7f[_0x394312(0x256)],!![]);await writeOutput(_0xc5a927,undefined,_0x394312(0x1f9));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x123);['description']=a32_0x50f93c(0x9c);async['execute'](_0x13b8cc){const _0x31e53c=a32_0x50f93c,{options:_0x2a2dc2,args:_0x2775bc,tdx:_0x23028d}=_0x13b8cc,_0x384cd6=_0x2a2dc2,_0x2ce804=_0x2775bc[0x0]||_0x2a2dc2[_0x31e53c(0x15a)];if(!_0x2ce804)return showParentSegmentNotSetError(_0x31e53c(0x99)+_0x31e53c(0x17a)),0x1;const _0x2e908e=resolveYamlFile(_0x2ce804);if(existsSync(_0x2e908e)){_0x384cd6[_0x31e53c(0x1f3)]&&console[_0x31e53c(0x185)](_0x31e53c(0x1ff)+_0x2e908e);let _0x50fad0;try{_0x50fad0=readFileSync(_0x2e908e,_0x31e53c(0x275));}catch(_0x44f9f5){const _0x3093c1=_0x44f9f5 instanceof Error?_0x44f9f5[_0x31e53c(0x26c)]:String(_0x44f9f5);return console['error'](_0x31e53c(0x17f)+_0x3093c1),0x1;}const _0x4e54f2=await withSpinner(_0x31e53c(0x18d),()=>_0x23028d[_0x31e53c(0xb0)][_0x31e53c(0x229)](_0x50fad0),{'verbose':_0x384cd6['verbose']}),_0x3720b7=_0x4e54f2[_0x31e53c(0x189)],{isNew:_0x2e2e7c,name:_0x2ad9e5,hasChanges:_0x2b4c6e,diffFormatted:_0x136143}=_0x3720b7;if(_0x2b4c6e){_0x2e2e7c?console[_0x31e53c(0x185)](_0x31e53c(0xc3)+_0x2ad9e5+'\x27:'):console[_0x31e53c(0x185)](_0x31e53c(0x25f)+_0x2ad9e5+'\x27:');console[_0x31e53c(0x185)]('─'[_0x31e53c(0x129)](0x3c)),console[_0x31e53c(0x185)](_0x136143),console[_0x31e53c(0x185)]('─'[_0x31e53c(0x129)](0x3c));const _0x4a265b=_0x2e2e7c?_0x31e53c(0x142)+_0x2ad9e5+_0x31e53c(0x18a):_0x31e53c(0x9b)+_0x2ad9e5+_0x31e53c(0x18a);if(!_0x384cd6[_0x31e53c(0x265)]){if(!isInteractive())return console[_0x31e53c(0x185)](a32_0x3a28f3[_0x31e53c(0x1d7)](_0x31e53c(0x237)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x31e53c(0x185)](a32_0x3a28f3['dim'](_0x31e53c(0x294))),0x1;const _0x166d02=await confirmKey(_0x4a265b);if(!_0x166d02)return console[_0x31e53c(0x185)](a32_0x3a28f3['yellow'](_0x31e53c(0x1e9))),0x1;}const _0x2bd2eb=_0x2e2e7c?_0x31e53c(0x1c3):_0x31e53c(0xdb);await withSpinner(_0x2bd2eb+_0x31e53c(0xf0)+_0x2ad9e5+'\x27...',()=>_0x3720b7['apply'](),{'verbose':_0x384cd6[_0x31e53c(0x1f3)]});const _0x848650=_0x2e2e7c?'Created':'Updated';console['error']('✔\x20'+_0x848650+_0x31e53c(0xf0)+_0x2ad9e5+'\x27');}else console[_0x31e53c(0x185)](_0x31e53c(0x11f)+_0x2ad9e5+'\x27\x20is\x20up\x20to\x20date');}const _0x4d1b85=await withSpinner(_0x31e53c(0x94)+_0x2ce804+_0x31e53c(0x1c9),()=>_0x23028d[_0x31e53c(0xb0)]['runParent'](_0x2ce804),{'verbose':_0x384cd6['verbose']}),_0x33e5fe=_0x4d1b85['data'],_0x7331f2=getConsoleUrl(_0x384cd6['site'],_0x31e53c(0x116)+_0x33e5fe[_0x31e53c(0x215)]+_0x31e53c(0x178)+_0x33e5fe['workflowSessionId']+_0x31e53c(0x277)+_0x33e5fe[_0x31e53c(0x283)]);return console[_0x31e53c(0x185)]('\x0a✔\x20Workflow\x20started'),console['error']('\x20\x20'+a32_0x3a28f3['dim']('Audience\x20ID:')+'\x20'+_0x33e5fe[_0x31e53c(0x110)]),console[_0x31e53c(0x185)]('\x20\x20'+a32_0x3a28f3[_0x31e53c(0x20b)](_0x31e53c(0x247))+'\x20'+_0x33e5fe[_0x31e53c(0x1b5)]),console[_0x31e53c(0x185)]('\x20\x20'+a32_0x3a28f3[_0x31e53c(0x20b)]('Session:')+'\x20'+_0x33e5fe[_0x31e53c(0xae)]),console[_0x31e53c(0x185)]('\x20\x20'+a32_0x3a28f3[_0x31e53c(0x20b)]('Attempt:')+'\x20'+_0x33e5fe[_0x31e53c(0x283)]),console[_0x31e53c(0x185)]('\x20\x20'+_0x7331f2),console[_0x31e53c(0x185)]('\x0a'+a32_0x3a28f3[_0x31e53c(0x20b)](_0x31e53c(0x1e6))+_0x31e53c(0x250)+_0x33e5fe[_0x31e53c(0x283)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']=a32_0x50f93c(0x260);['description']=a32_0x50f93c(0xd0);async[a32_0x50f93c(0x29f)](_0x339fff){const _0x1dd636=a32_0x50f93c,{options:_0x5bc9e5,args:_0x40218a,tdx:_0x3dd68b}=_0x339fff,_0x3f561a=_0x40218a[0x0]||_0x5bc9e5['parentSegment'];if(!_0x3f561a)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a'+_0x1dd636(0x1a4)),0x1;_0x5bc9e5['verbose']&&(console['error'](_0x1dd636(0x22f)+_0x5bc9e5[_0x1dd636(0x1ed)]),console[_0x1dd636(0x185)](_0x1dd636(0x145)+_0x3f561a));const _0x53f5e5=await withSpinner(_0x1dd636(0x267)+_0x3f561a+'\x27...',()=>_0x3dd68b[_0x1dd636(0xb0)][_0x1dd636(0xd1)](_0x3f561a),{'verbose':_0x5bc9e5['verbose']}),_0x54923f=_0x53f5e5[_0x1dd636(0x189)];console[_0x1dd636(0x185)](_0x1dd636(0x278)+_0x54923f['length']+'\x20field'+(_0x54923f[_0x1dd636(0x256)]!==0x1?'s':''));if(_0x5bc9e5[_0x1dd636(0x245)]||_0x5bc9e5['jsonl'])return await handleSDKOutput(_0x54923f,_0x5bc9e5),0x0;return displayFieldsHumanReadable(_0x54923f,_0x3f561a),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x298);[a32_0x50f93c(0x121)]='Show\x20parent\x20segment\x20details';async['execute'](_0x32dc36){const _0x26bfdc=a32_0x50f93c,{options:_0x5abf2a,args:_0x4413dd,tdx:_0x4d7cd5}=_0x32dc36,_0x43b649=_0x5abf2a,_0xdc13c5=_0x4413dd[0x0]||_0x5abf2a['parentSegment'];if(!_0xdc13c5)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+_0x26bfdc(0x18e)+_0x26bfdc(0x1cc)+_0x26bfdc(0x92)),0x1;_0x5abf2a[_0x26bfdc(0x1f3)]&&(console[_0x26bfdc(0x185)](_0x26bfdc(0x22f)+_0x5abf2a[_0x26bfdc(0x1ed)]),console['error']('Parent\x20segment:\x20'+_0xdc13c5));const _0xd83407=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0xdc13c5+_0x26bfdc(0x1c9),()=>_0x4d7cd5[_0x26bfdc(0xb0)][_0x26bfdc(0x26d)](_0xdc13c5),{'verbose':_0x5abf2a['verbose']}),_0x3ae658=_0xd83407[_0x26bfdc(0x189)];if(_0x43b649[_0x26bfdc(0x236)]){const _0x391f89=getConsoleNextUrl(_0x43b649[_0x26bfdc(0x1ed)],'/app/dw/parentSegments/'+_0x3ae658['id']);return console[_0x26bfdc(0x185)](a32_0x3a28f3[_0x26bfdc(0x25e)]('✔')+_0x26bfdc(0x158)+a32_0x3a28f3[_0x26bfdc(0x2a6)](_0x391f89)),openBrowser(_0x391f89),0x0;}return await handleSingleObjectOutput(_0x3ae658,_0x5abf2a),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a32_0x50f93c(0x297);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x2a3);async[a32_0x50f93c(0x29f)](_0x264cb6){const _0x386478=a32_0x50f93c,{options:_0x5d1209,args:_0x31aa83,tdx:_0x3861a7}=_0x264cb6,_0x106337=_0x5d1209,_0x4aea99=_0x31aa83[0x0]||_0x5d1209[_0x386478(0x15a)];if(!_0x4aea99)return showParentSegmentNotSetError(_0x386478(0x25c)+_0x386478(0x259)+_0x386478(0x1cc)+_0x386478(0x238)),0x1;_0x5d1209[_0x386478(0x1f3)]&&(console[_0x386478(0x185)]('Site:\x20'+_0x5d1209[_0x386478(0x1ed)]),console[_0x386478(0x185)]('Parent\x20segment:\x20'+_0x4aea99));const _0x5dd952=await withSpinner(_0x386478(0xec)+_0x4aea99+_0x386478(0x1c9),()=>_0x3861a7[_0x386478(0xb0)][_0x386478(0x281)](_0x4aea99),{'verbose':_0x5d1209['verbose']}),_0x278738=_0x5dd952[_0x386478(0x189)],_0x202d85=_0x3861a7[_0x386478(0xb0)][_0x386478(0x273)](_0x278738);if(_0x106337[_0x386478(0x108)]){const _0x5f4c02=await this[_0x386478(0xb5)](_0x264cb6,_0x4aea99,_0x278738,_0x202d85),_0x1ed20e=this['formatSchemaJson'](_0x5f4c02);writeFileSync(_0x106337[_0x386478(0x108)],_0x1ed20e);const _0x155b59=_0x5f4c02[_0x386478(0x1c7)]['columns']['length']+_0x5f4c02[_0x386478(0x1bc)]['reduce']((_0x65178f,_0x44a22c)=>_0x65178f+_0x44a22c[_0x386478(0xa5)]['length'],0x0),_0x3c058b=_0x5f4c02[_0x386478(0x1bc)]['filter'](_0x5d1bb1=>_0x5d1bb1['columns'][_0x386478(0x256)]===0x0)[_0x386478(0x256)];return console[_0x386478(0x10a)](_0x386478(0x16a)+_0x106337['output']),console[_0x386478(0x10a)](_0x386478(0x111)+_0x202d85),console['log'](_0x386478(0xe1)+_0x5f4c02[_0x386478(0x1bc)]['length']+_0x386478(0xe0)),console['log'](_0x386478(0x26a)+_0x155b59+_0x386478(0x15f)),_0x3c058b>0x0&&console[_0x386478(0x10a)](_0x386478(0xa2)+_0x3c058b+_0x386478(0x1a8)),0x0;}console['error']('\x0a'+a32_0x3a28f3[_0x386478(0x15d)](_0x386478(0x9d))+'\x20'+a32_0x3a28f3[_0x386478(0x2a6)](_0x202d85));const _0x583cd3=await withSpinner(_0x386478(0x131),()=>_0x3861a7[_0x386478(0xb0)][_0x386478(0x1ae)](_0x278738),{'verbose':_0x5d1209[_0x386478(0x1f3)]});console[_0x386478(0x185)]('\x0a'+a32_0x3a28f3[_0x386478(0x15d)](_0x386478(0x1c7))+'\x20'+a32_0x3a28f3[_0x386478(0x20b)]('('+_0x202d85+_0x386478(0xfe)));const _0x188f85=await executeSchemaQuery(_0x583cd3[_0x386478(0x189)],_0x3861a7,_0x5d1209);await handleQueryOutput(_0x188f85,_0x5d1209);const _0x3e8306=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x3861a7[_0x386478(0xb0)][_0x386478(0xb3)](_0x278738),{'verbose':_0x5d1209[_0x386478(0x1f3)]});for(const _0x1174f6 of _0x3e8306[_0x386478(0x189)]){const _0x2b18af='behavior_'+_0x1174f6[_0x386478(0x175)]()[_0x386478(0x147)](/\s+/g,'_'),_0x45bd47=_0x386478(0x1ad)+_0x202d85+'.'+_0x2b18af;console[_0x386478(0x185)]('\x0a'+a32_0x3a28f3[_0x386478(0x15d)](_0x1174f6)+'\x20'+a32_0x3a28f3[_0x386478(0x20b)]('('+_0x202d85+'.'+_0x2b18af+')'));try{const _0x189eb1=await executeSchemaQuery(_0x45bd47,_0x3861a7,_0x5d1209);await handleQueryOutput(_0x189eb1,_0x5d1209);}catch{console['error'](a32_0x3a28f3['yellow']('\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)'));}}return 0x0;}async[a32_0x50f93c(0xb5)](_0x2a0d71,_0x7c6f74,_0x257679,_0x2d5643){const _0x507552=a32_0x50f93c,{options:_0x16baf5,tdx:_0x50dd5b}=_0x2a0d71,_0x5c79a7=await withSpinner(_0x507552(0x131),()=>_0x50dd5b[_0x507552(0xb0)][_0x507552(0x1ae)](_0x257679),{'verbose':_0x16baf5[_0x507552(0x1f3)]}),_0x24389f=await executeSchemaQuery(_0x5c79a7[_0x507552(0x189)],_0x50dd5b,_0x16baf5),_0x171ba5=_0x24389f[_0x507552(0x189)][_0x507552(0x226)](_0x41118b=>({'name':_0x41118b[_0x507552(0x1d2)],'type':_0x41118b[_0x507552(0x17c)]})),_0x28c90d=await withSpinner(_0x507552(0x1be),()=>_0x50dd5b[_0x507552(0xb0)][_0x507552(0xb3)](_0x257679),{'verbose':_0x16baf5[_0x507552(0x1f3)]}),_0x5d886c=[];for(const _0x365159 of _0x28c90d[_0x507552(0x189)]){const _0x4ff78d=_0x507552(0x261)+_0x365159[_0x507552(0x175)]()[_0x507552(0x147)](/\s+/g,'_'),_0x3d87d9=_0x507552(0x1ad)+_0x2d5643+'.'+_0x4ff78d;let _0x33f948=[];try{const _0x286306=await executeSchemaQuery(_0x3d87d9,_0x50dd5b,_0x16baf5);_0x33f948=_0x286306[_0x507552(0x189)][_0x507552(0x226)](_0x33a1d1=>({'name':_0x33a1d1[_0x507552(0x1d2)],'type':_0x33a1d1['column_type']}));}catch{}_0x5d886c[_0x507552(0x19b)]({'table':_0x4ff78d,'columns':_0x33f948});}return{'database':_0x2d5643,'parent_segment':_0x7c6f74,'parent_id':_0x257679,'customers':{'table':_0x507552(0x1c7),'columns':_0x171ba5},'behaviors':_0x5d886c};}[a32_0x50f93c(0x140)](_0x35bf32){const _0x23ca26=a32_0x50f93c,_0x5407ba=_0x376cdc=>{const _0xea32cf=a32_0x3e39;if(_0x376cdc[_0xea32cf(0x256)]===0x0)return'[]';const _0x324ae6=_0x376cdc[_0xea32cf(0x226)](_0x355e4b=>'\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22'+_0x355e4b[_0xea32cf(0xbd)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x355e4b[_0xea32cf(0x202)]+'\x22\x20}');return'[\x0a'+_0x324ae6['join'](',\x0a')+_0xea32cf(0x1f0);},_0x31dd11=_0x35bf32['behaviors'][_0x23ca26(0x226)](_0x36474c=>{const _0x5b5965=_0x23ca26;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x36474c['table']+_0x5b5965(0x114)+_0x5407ba(_0x36474c['columns'])[_0x5b5965(0x147)](/^/gm,'\x20\x20')[_0x5b5965(0x1eb)]()+'\x0a\x20\x20\x20\x20}';})[_0x23ca26(0x25b)](',\x0a');return _0x23ca26(0x21d)+_0x35bf32[_0x23ca26(0x18b)]+_0x23ca26(0x291)+_0x35bf32[_0x23ca26(0x225)]+_0x23ca26(0xb9)+_0x35bf32[_0x23ca26(0x118)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x35bf32[_0x23ca26(0x1c7)]['table']+_0x23ca26(0x292)+_0x5407ba(_0x35bf32[_0x23ca26(0x1c7)][_0x23ca26(0xa5)])[_0x23ca26(0x147)](/^/gm,'\x20\x20')['trim']()+_0x23ca26(0x1a6)+_0x31dd11+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x1a1);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x148);async[a32_0x50f93c(0x29f)](_0x57395d){const _0x3666e5=a32_0x50f93c,{options:_0x3cdf1e,args:_0x1a4746,tdx:_0x8fb834}=_0x57395d,_0x5b2394=_0x1a4746[0x0]||_0x3cdf1e[_0x3666e5(0x15a)];if(!_0x5b2394)return showParentSegmentNotSetError(_0x3666e5(0xcc)+'\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;_0x3cdf1e[_0x3666e5(0x1f3)]&&(console[_0x3666e5(0x185)]('Site:\x20'+_0x3cdf1e[_0x3666e5(0x1ed)]),console[_0x3666e5(0x185)](_0x3666e5(0x145)+_0x5b2394));const _0x5dfac2=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5b2394+_0x3666e5(0x1c9),()=>_0x8fb834[_0x3666e5(0xb0)][_0x3666e5(0x281)](_0x5b2394),{'verbose':_0x3cdf1e[_0x3666e5(0x1f3)]}),_0x1550ee=_0x5dfac2[_0x3666e5(0x189)],_0x3ae154=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x5b2394+_0x3666e5(0x1c9),()=>_0x8fb834[_0x3666e5(0xb0)][_0x3666e5(0x1ae)](_0x1550ee),{'verbose':_0x3cdf1e[_0x3666e5(0x1f3)]}),_0x299eac=_0x3ae154[_0x3666e5(0x189)];return _0x3cdf1e['format']===_0x3666e5(0x245)||_0x3cdf1e[_0x3666e5(0x159)]===_0x3666e5(0x288)?await handleSDKOutput([{'sql':_0x299eac}],_0x3cdf1e):console[_0x3666e5(0x10a)](_0x299eac),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x15b);[a32_0x50f93c(0x121)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a32_0x50f93c(0x29f)](_0x341815){const _0x51923e=a32_0x50f93c,{options:_0x584e1a,args:_0x253cee,tdx:_0x5b160e}=_0x341815,_0x3a0d15=_0x253cee[0x0]||_0x584e1a['parentSegment'];if(!_0x3a0d15)return showParentSegmentNotSetError(_0x51923e(0x13f)+_0x51923e(0xa6)),0x1;_0x584e1a['verbose']&&(console[_0x51923e(0x185)]('Site:\x20'+_0x584e1a[_0x51923e(0x1ed)]),console[_0x51923e(0x185)](_0x51923e(0x145)+_0x3a0d15));const _0x3df953=await withSpinner(_0x51923e(0xec)+_0x3a0d15+_0x51923e(0x1c9),()=>_0x5b160e[_0x51923e(0xb0)][_0x51923e(0x281)](_0x3a0d15),{'verbose':_0x584e1a[_0x51923e(0x1f3)]}),_0x41a1d8=_0x3df953['data'],_0x1ece82=await withSpinner(_0x51923e(0x264)+_0x3a0d15+_0x51923e(0x1c9),()=>_0x5b160e[_0x51923e(0xb0)][_0x51923e(0x1ae)](_0x41a1d8),{'verbose':_0x584e1a[_0x51923e(0x1f3)]});let _0x5ada48=_0x1ece82[_0x51923e(0x189)];const _0x3fef0e=resolveLimit(_0x584e1a[_0x51923e(0x23f)],DEFAULT_DISPLAY_LIMIT),_0x2eb032=/\bLIMIT\s+\d+/i[_0x51923e(0x157)](_0x5ada48);!_0x2eb032&&(_0x5ada48=_0x5ada48[_0x51923e(0x1eb)]()['replace'](/;+$/,''),_0x5ada48=_0x51923e(0x16d)+_0x5ada48+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x3fef0e);_0x584e1a['verbose']&&console[_0x51923e(0x185)](_0x51923e(0xbe)+_0x5ada48);const _0x2305d8=await withProgressSpinner(_0x51923e(0x23c),async _0x2d859c=>{const _0x22cb41=_0x51923e,_0xc78b46=await _0x5b160e[_0x22cb41(0x28a)][_0x22cb41(0x29f)](_0x5ada48,{'catalog':'td','schema':_0x22cb41(0x243),'onJobId':_0x10f019=>{const _0x515d69=_0x22cb41;_0x2d859c[_0x515d69(0x115)](_0x10f019);}});return _0xc78b46;},{'verbose':_0x584e1a[_0x51923e(0x1f3)]}),_0xf9d58b=_0x2305d8['data'],_0x2f08ff=_0xf9d58b[_0x51923e(0x235)]?_0x51923e(0x20e)+_0xf9d58b[_0x51923e(0x235)]+']':'';return console[_0x51923e(0x185)](_0x51923e(0x24c)+_0xf9d58b['stats'][_0x51923e(0x15e)][_0x51923e(0x126)]()+_0x51923e(0x141)+(_0x51923e(0x207)+formatElapsed(_0xf9d58b['stats'][_0x51923e(0x199)])+_0x2f08ff)),await handleQueryOutput(_0xf9d58b,_0x584e1a),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x1a3);['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a32_0x50f93c(0x29f)](_0x1574d9){const _0x5ba876=a32_0x50f93c,{options:_0x12cf59,args:_0xbf3009,tdx:_0x439182}=_0x1574d9,_0x1eebeb=_0xbf3009[0x0],_0x27ca24=await withSpinner(_0x1eebeb?'Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27'+_0x1eebeb+_0x5ba876(0x1c9):_0x5ba876(0x240),()=>_0x439182[_0x5ba876(0x1dc)][_0x5ba876(0x20d)](),{'verbose':_0x12cf59[_0x5ba876(0x1f3)]});let _0x32743d=_0x27ca24[_0x5ba876(0x189)]['filter'](_0x17d5ad=>_0x17d5ad[_0x5ba876(0x1d5)]);if(_0x1eebeb){const _0x1609b6=_0x1eebeb[_0x5ba876(0x147)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x5ba876(0x147)](/\?/g,'.'),_0xa2bf5a=new RegExp('^'+_0x1609b6+'$','i');_0x32743d=_0x32743d[_0x5ba876(0x12f)](_0x41fe43=>_0xa2bf5a['test'](_0x41fe43[_0x5ba876(0xbd)]));}_0x32743d[_0x5ba876(0xe2)]((_0x4cc1b3,_0x4bb822)=>_0x4cc1b3['name']['localeCompare'](_0x4bb822[_0x5ba876(0xbd)])),console[_0x5ba876(0x185)]('✔\x20Found\x20'+_0x32743d[_0x5ba876(0x256)]+_0x5ba876(0x232)+(_0x32743d[_0x5ba876(0x256)]!==0x1?'s':''));const _0xbbc949=_0x35db86=>{const _0x23c9b5=_0x5ba876;return getConsoleNextUrl(_0x12cf59[_0x23c9b5(0x1ed)],_0x23c9b5(0x192)+_0x35db86);};if(_0x12cf59['format']===_0x5ba876(0x245)||_0x12cf59[_0x5ba876(0x159)]==='jsonl'){const _0x204402=_0x32743d[_0x5ba876(0x226)](_0x26bdb3=>({..._0x26bdb3,'url':_0xbbc949(_0x26bdb3['id'])}));await handleSDKOutput(_0x204402,_0x12cf59);}else{if(_0x32743d[_0x5ba876(0x256)]===0x0)console[_0x5ba876(0x10a)](_0x5ba876(0x13e));else for(const _0x13c591 of _0x32743d){const _0x538af8=_0x13c591['population']?a32_0x3a28f3[_0x5ba876(0x20b)]('\x20('+formatRows(_0x13c591[_0x5ba876(0x195)])+')'):'',_0x17c5f1=hyperlink(_0x13c591[_0x5ba876(0xbd)],_0xbbc949(_0x13c591['id']));console['log']('⚡\x20'+_0x17c5f1+_0x538af8);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]='ps:rt:validate';['description']=a32_0x50f93c(0x20a);async[a32_0x50f93c(0x29f)](_0x491f83){const _0x3e7c8e=a32_0x50f93c,{options:_0x39b7f6,args:_0x276a87,tdx:_0x21ea40}=_0x491f83,_0x3c9c77=_0x276a87[0x0]||_0x39b7f6[_0x3e7c8e(0x15a)];if(!_0x3c9c77)return showParentSegmentNotSetError(_0x3e7c8e(0xe4)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment'),0x1;const _0x15a7bd=resolveYamlFile(_0x3c9c77);if(!existsSync(_0x15a7bd))return showFileNotFoundError(_0x15a7bd,_0x3c9c77),0x1;let _0x4618b9;try{_0x4618b9=readFileSync(_0x15a7bd,_0x3e7c8e(0x275));}catch(_0x30b73b){const _0x21be7b=_0x30b73b instanceof Error?_0x30b73b['message']:String(_0x30b73b);return console[_0x3e7c8e(0x185)](_0x3e7c8e(0x17f)+_0x21be7b),0x1;}const _0x2ab08c=createCommandSpinner(a32_0x3a28f3['dim'](_0x3e7c8e(0xfc)),{'verbose':_0x39b7f6[_0x3e7c8e(0x1f3)]});_0x2ab08c[_0x3e7c8e(0x24a)]();const _0xc1daf5={'realtime':!![],'onProgress':_0x34a85c=>{_0x2ab08c['text']=formatProgressMessage(_0x34a85c);}};let _0x3d256f;try{_0x3d256f=await _0x21ea40['segment']['validateParentYaml'](_0x4618b9,_0xc1daf5),_0x2ab08c[_0x3e7c8e(0x27d)]();}catch(_0x21606e){_0x2ab08c[_0x3e7c8e(0x27d)]();throw _0x21606e;}console[_0x3e7c8e(0x185)]('\x0a'+a32_0x3a28f3[_0x3e7c8e(0x15d)]('RT\x202.0\x20Validate:')+'\x20'+_0x3d256f[_0x3e7c8e(0xbd)]),console['error']('═'['repeat'](0x3c)),displayRealtimeValidation(_0x3d256f),console[_0x3e7c8e(0x185)]('─'[_0x3e7c8e(0x129)](0x3c));if(_0x3d256f[_0x3e7c8e(0x1c0)][_0x3e7c8e(0x256)]>0x0){console[_0x3e7c8e(0x185)]('\x0a'+a32_0x3a28f3[_0x3e7c8e(0x1d7)](_0x3e7c8e(0x19a)));for(const _0x8c6f52 of _0x3d256f[_0x3e7c8e(0x1c0)]){console[_0x3e7c8e(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3e7c8e(0x1d7)]('•')+'\x20'+_0x8c6f52);}}return _0x3d256f['allValid']&&console[_0x3e7c8e(0x185)]('\x0a'+a32_0x3a28f3[_0x3e7c8e(0x25e)]('✔')+_0x3e7c8e(0x1fb)),_0x3d256f[_0x3e7c8e(0x161)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a32_0x50f93c(0x90);['description']='List\x20RT\x20journeys';async[a32_0x50f93c(0x29f)](_0x4c0ed9){const _0x2445a8=a32_0x50f93c,{options:_0x2a7291,args:_0xf5176f,tdx:_0x10b981}=_0x4c0ed9,_0x4a2d85=_0xf5176f[0x0]||_0x2a7291[_0x2445a8(0x15a)];if(!_0x4a2d85)return showParentSegmentNotSetError(_0x2445a8(0x1f5)+'\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;_0x2a7291[_0x2445a8(0x1f3)]&&(console[_0x2445a8(0x185)](_0x2445a8(0x22f)+_0x2a7291[_0x2445a8(0x1ed)]),console['error']('Parent\x20segment:\x20'+_0x4a2d85));const _0x45fb52=await withSpinner(_0x2445a8(0xec)+_0x4a2d85+_0x2445a8(0x1c9),()=>_0x10b981[_0x2445a8(0xb0)][_0x2445a8(0x281)](_0x4a2d85),{'verbose':_0x2a7291[_0x2445a8(0x1f3)]}),_0x5bbd54=_0x45fb52[_0x2445a8(0x189)],_0x667b6f=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x4a2d85+_0x2445a8(0x1c9),()=>_0x10b981[_0x2445a8(0x1dc)]['listJourneys'](_0x5bbd54),{'verbose':_0x2a7291[_0x2445a8(0x1f3)]}),_0x144ae2=_0x667b6f[_0x2445a8(0x189)];console[_0x2445a8(0x185)](_0x2445a8(0x278)+_0x144ae2[_0x2445a8(0x256)]+_0x2445a8(0x271)+(_0x144ae2['length']!==0x1?'s':''));if(_0x2a7291[_0x2445a8(0x159)]===_0x2445a8(0x245)||_0x2a7291[_0x2445a8(0x159)]===_0x2445a8(0x288))await handleSDKOutput(_0x144ae2,_0x2a7291);else{if(_0x144ae2[_0x2445a8(0x256)]===0x0)console[_0x2445a8(0x10a)](_0x2445a8(0xad));else for(const _0x341a11 of _0x144ae2){const _0x49cc1c=_0x341a11['state']===_0x2445a8(0x169)?'🚀':'📝',_0x187e29=_0x341a11['paused']?a32_0x3a28f3[_0x2445a8(0x1c6)]('\x20(paused)'):'',_0x2dffac=a32_0x3a28f3['dim']('\x20('+_0x341a11[_0x2445a8(0x149)]+_0x2445a8(0x1e7)+(_0x341a11['stageCount']!==0x1?'s':'')+')');console[_0x2445a8(0x10a)](_0x49cc1c+'\x20'+_0x341a11[_0x2445a8(0xbd)]+_0x187e29+_0x2dffac);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x296);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x1b2);async['execute'](_0x469576){const _0x1c6e83=a32_0x50f93c,{options:_0x31b927,args:_0x405c3e,tdx:_0x1a2ee1}=_0x469576,_0x5bada4=_0x405c3e[0x0];if(!_0x5bada4)return console['error'](a32_0x3a28f3[_0x1c6e83(0x1d7)](_0x1c6e83(0x1d9))),console[_0x1c6e83(0x185)](_0x1c6e83(0x167)),console[_0x1c6e83(0x185)](a32_0x3a28f3[_0x1c6e83(0x20b)](_0x1c6e83(0x150))),0x1;_0x31b927[_0x1c6e83(0x1f3)]&&(console['error'](_0x1c6e83(0x22f)+_0x31b927[_0x1c6e83(0x1ed)]),console[_0x1c6e83(0x185)](_0x1c6e83(0xd5)+_0x5bada4));const _0x5a8057=await withSpinner(_0x1c6e83(0x1a9)+_0x5bada4+_0x1c6e83(0x1c9),()=>_0x1a2ee1['realtime'][_0x1c6e83(0x1cd)](_0x5bada4),{'verbose':_0x31b927[_0x1c6e83(0x1f3)]}),_0x2860bf=_0x5a8057['data'];console[_0x1c6e83(0x185)](_0x1c6e83(0x23a)+_0x2860bf[_0x1c6e83(0xbd)]+'\x27');if(_0x31b927[_0x1c6e83(0x159)]==='json'||_0x31b927[_0x1c6e83(0x159)]===_0x1c6e83(0x288))await handleSDKOutput([_0x2860bf],_0x31b927);else{const _0x39ca42=_0x2860bf['state']===_0x1c6e83(0x169)?'🚀':'📝',_0xb776b2=_0x2860bf['paused']?a32_0x3a28f3[_0x1c6e83(0x1c6)](_0x1c6e83(0x204)):'';console['log'](_0x39ca42+'\x20'+_0x2860bf['name']+_0xb776b2);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:rt:jn:resume';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x210);async[a32_0x50f93c(0x29f)](_0x39d53a){const _0x398dfe=a32_0x50f93c,{options:_0x169e1e,args:_0xfc9e77,tdx:_0x459c7e}=_0x39d53a,_0x246f8f=_0xfc9e77[0x0];if(!_0x246f8f)return console[_0x398dfe(0x185)](a32_0x3a28f3[_0x398dfe(0x1d7)](_0x398dfe(0x1d9))),console['error'](_0x398dfe(0x29e)),console[_0x398dfe(0x185)](a32_0x3a28f3[_0x398dfe(0x20b)](_0x398dfe(0x150))),0x1;_0x169e1e['verbose']&&(console[_0x398dfe(0x185)](_0x398dfe(0x22f)+_0x169e1e[_0x398dfe(0x1ed)]),console[_0x398dfe(0x185)](_0x398dfe(0xd5)+_0x246f8f));const _0x2b415=await withSpinner(_0x398dfe(0x198)+_0x246f8f+_0x398dfe(0x1c9),()=>_0x459c7e['realtime'][_0x398dfe(0x289)](_0x246f8f),{'verbose':_0x169e1e[_0x398dfe(0x1f3)]}),_0x3ccac9=_0x2b415['data'];console[_0x398dfe(0x185)](_0x398dfe(0x285)+_0x3ccac9[_0x398dfe(0xbd)]+'\x27');if(_0x169e1e['format']==='json'||_0x169e1e['format']===_0x398dfe(0x288))await handleSDKOutput([_0x3ccac9],_0x169e1e);else{const _0x507999=_0x3ccac9[_0x398dfe(0xd9)]===_0x398dfe(0x169)?'🚀':'📝',_0x1d069c=_0x3ccac9['paused']?a32_0x3a28f3['yellow'](_0x398dfe(0x204)):'';console[_0x398dfe(0x10a)](_0x507999+'\x20'+_0x3ccac9[_0x398dfe(0xbd)]+_0x1d069c);}return 0x0;}}function a32_0x571d(){const _0x38e3e0=['Error\x20reading\x20file:\x20','segment:parent:preview','localeCompare','.yaml','displaySummary','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','error','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','string','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','data','\x27\x20and\x20run\x20workflow?','database','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Analyzing\x20changes...','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','listPersonalizations','idStitching','ignore','/app/dw/parentSegments/','✔\x20Updated\x20personalization\x20service\x20\x27','Error:\x20Parent\x20segment\x20name\x20is\x20required','population','Join\x20on:','Preview:','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','elapsedTimeMillis','Errors:','push','displayColumns','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Next\x20steps:','Attributes','Attributes:','segment:parent:sql','deletePersonalization','ps:rt:list','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','✔\x20Created\x20personalization\x20service\x20\x27','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Error:\x20Token\x20ID\x20is\x20required','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','any','\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','1046117OysARf','SELECT\x20*\x20FROM\x20','getParentSQL','\x20\x201.\x20Edit\x20','Error:\x20Service\x20name\x20is\x20required','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','Pause\x20activations\x20in\x20an\x20RT\x20journey','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Error:\x20Token\x20\x27','status','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','\x20\x202.\x20Run\x20','Customers:','Fetching\x20current\x20configuration\x20for\x20\x27','scheduleOption','Options\x20(one\x20required):\x0a','behaviors','\x20configured','Fetching\x20behavior\x20list...','✔\x20Deleted\x20token\x20\x27','errors','\x20--behavior\x20\x22','/{name}.yml\x0a','Creating','\x20service(s)\x20configured','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','yellow','customers','YAML\x20file:\x20','\x27...','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','personalization_services','Options:\x0a','pauseJourney','xdg-open','\x20Added\x20personalization\x20template\x20to\x20','relationships','getPersonalization','column_name','\x20rows)','Attribute:','realtime_enabled','Create\x20a\x20realtime\x20personalization\x20entity','red','\x20true','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','8853636FsyFvT','displayPreviewHints','realtime','rowCount','file','Listing\x20personalizations\x20for\x20\x27','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','4318370CeUIGV','⚡\x20Not\x20enabled','customerPercent','To\x20cancel:','\x20stage','null','Aborted.','Coverage:','trim','customerGroup','site','behaviorsFile','\x20\x20No\x20sample\x20data\x20available','\x0a\x20\x20\x20\x20]','Behaviors','Events:','verbose','\x20to\x20push\x20the\x20configuration','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','tdx\x20ps\x20preview\x20','enriched','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','table','ps:pz:service:delete','\x20RT\x20configuration\x20is\x20valid','Behavior:','primaryKey','createToken','Found\x20YAML\x20file:\x20','Master:','Delete\x20a\x20realtime\x20personalization','type','Error:\x20Personalization\x20ID\x20is\x20required','\x20(paused)','Options:','38844336dbvewy','in\x20','sampleData','segment:parent:validate','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','dim','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','list','\x20[Job\x20ID:\x20','\x20personalization\x20service','Resume\x20activations\x20in\x20an\x20RT\x20journey','\x20\x20\x20\x20-\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','entryCriteria:','previewParentYaml','workflowId','Patching\x20personalization\x20\x27','displayRealtimeInfo','\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','\x20No\x20changes\x20-\x20','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','Listing\x20parent\x20segments\x20matching\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','\x20service','attributes','last_page_viewed','personalizationServices','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Master\x20+\x20Attributes','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','parent_segment','map','/\x20directories\x20exist.','7oRnXey','pushParentYaml','run','\x20=\x20','ps:pz:delete','pullParentYaml','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','Site:\x20','sourceTableError','Getting\x20personalization\x20\x27','\x20RT-enabled\x20parent\x20segment','/\x20and\x20','behavior','jobId','web','\x0aError:','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Master\x20Table','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','ps:pz:service:token:create','Executing\x20parent\x20segment\x20query...','No\x20parent\x20segments\x20match\x20pattern:\x20','Error\x20parsing\x20YAML:\x20','limit','Listing\x20RT-enabled\x20parent\x20segments...','\x27\x20(id:\x20','td_client_id','information_schema','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','json','value','Status:','coveragePercent','⚡\x20Enabled','start','Deleting\x20token\x20\x27','✔\x20Query\x20completed:\x20Processed\x20','\x20to\x20configure\x20your\x20personalization\x20service','folderId','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','\x20tdx\x20wf\x20attempt\x20','Error:\x20--database\x20and\x20--table\x20are\x20required','joinKey','public:','Error:\x20--behavior\x20requires\x20a\x20name\x0a','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','length','✘\x20Failed\x20to\x20rename\x20directory:\x20','keyEventId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a','schemaError','join','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','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','green','\x0aChanges\x20to\x20apply\x20to\x20\x27','segment:parent:fields','behavior_','indexOf','scheduleType','Fetching\x20SQL\x20for\x20\x27','yes','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Listing\x20fields\x20for\x20\x27','segment:parent:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20\x20Columns:\x20','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','message','getParentFull','Columns:','No\x20parent\x20segments\x20found','segment:parent:push','\x20RT\x20journey','displayBehaviorsStats','getOutputDatabaseName','\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}','utf-8','✔\x20Found\x20personalization\x20\x27','/attempt/','✔\x20Found\x20','List\x20parent\x20segments','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','stitchingKeys','master','stop','No\x20personalization\x20services\x20configured','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','personalization','resolveParentId','👥\x20','workflowAttemptId','toFixed','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','eventKind','ps:pz:init','jsonl','resumeJourney','query','.yml','Listing\x20personalization\x20services\x20for\x20\x27','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','createPersonalization','Finding\x20service\x20for\x20token...','Updating\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Personalization\x20service\x20description','ps:rt:jn:pause','segment:parent:desc','segment:parent:view','totalEvents','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','match','isDirectory','/\x20directory.\x0a','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','execute','Creating\x20parent\x20segment\x20\x27','1970615NOTefk','updateParent','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','cyan','displayMasterInfo','ps:rt:jn:list','✔\x20Created\x20parent\x20segment\x20\x27','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','addBehaviors','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','column','Error:','some','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','Apply\x20changes\x20to\x20\x27','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Output\x20Database:','\x0a⚠️\x20\x20Both\x20','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','ps:pz:show','\x20\x20Note:\x20','session','public','columns','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','\x20Context\x20set:\x20','71608FUahwc','foreignKey','timezone','entryCriteria','No\x20RT\x20journeys\x20found','workflowSessionId','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','segment','Pattern:\x20','displayAttributesStats','getBehaviorNames','win32','collectSchema','no\x20tokens\x20configured','FINISHED','patch','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','delete','validateParentYaml','tdx\x20ps\x20push\x20','name','SQL\x20query:\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','<database>.<table>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','\x20--attribute\x20\x22<name>\x22','\x0aNew\x20parent\x20segment\x20\x27','ps:pz:service:show','Error:\x20--name\x20is\x20required','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','updatedAt','Source:','folder-segment','207994azdAud','createdAt','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','segment:parent:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','List\x20available\x20fields\x20for\x20segmentation','listFields','endsWith','\x20\x20\x20\x20','Database:\x20','RT\x20Journey\x20ID:\x20','RT\x202.0:','1143hibNge','identifier:\x20','state','\x20--attribute\x20\x22','Updating','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','true','addBehaviorsFile','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x20behaviors','\x20\x20Tables:\x201\x20customers\x20+\x20','sort','sections','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','valid','To\x20view\x20sample\x20data:','✔\x20Updated\x20personalization\x20\x27','displayPreviewResults','unref','number','payload','Resolving\x20parent\x20segment\x20\x27','✔\x20Deleted\x20personalization\x20service\x20\x27','Deleting\x20personalization\x20\x27','text','\x20parent\x20segment\x20\x27','Creating\x20personalization\x20service\x20\x27','Name:\x20','21GFDmiW','tokens','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','(id:\x20','keys','Update\x20a\x20realtime\x20personalization\x20entity','✔\x20Created\x20personalization\x20\x27','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','displayValidateResults','Validating\x20RT\x20configuration...','Join:','.customers)','-1d','createParent','ps:pz:service:token:delete','platform','attribute','Error:\x20File\x20not\x20found:\x20','get','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','parent_segments','output','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','log','allowed\x20IPs:','displaySampleData','\x20is\x20already\x20up\x20to\x20date','\x20\x20\x20\x20\x20\x20','getCurrentConfigVersion','audienceId','\x20\x20Database:\x20','preview','identifier','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','setJobId','/app/workflows/','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','parent_id','audienceId:','\x0a⚠️\x20\x20Migrating:\x20','segment:parent:update','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','addAttributesFile','Table:\x20','✔\x20No\x20changes\x20-\x20\x27','\x0aUsage:\x20tdx\x20ps\x20preview\x20','description','Listing\x20parent\x20segments...','segment:parent:run','\x27\x20for\x20service\x20\x27','ps:pz:service:create','toLocaleString','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','addAttributes','repeat','Creating\x20personalization\x20\x27','token:','ps:rt:configuration_versions','\x20parent\x20segment','✔\x20Created\x20token\x20\x27','filter','using\x20the\x20default\x20path:\x20','Fetching\x20customers\x20schema...','Validate:','No\x20personalizations\x20configured','allowedIps','events','Available\x20attributes:','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','includeSensitive','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x0aChanges\x20to\x20\x27','use','schemaValid','Fetching\x20sample\x20data...','No\x20RT-enabled\x20parent\x20segments\x20found','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','formatSchemaJson','\x20rows\x20','Create\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','✔\x20Renamed\x20directory\x20to\x20','Parent\x20segment:\x20','/\x20→\x20','replace','Get\x20SQL\x20query\x20for\x20parent\x20segment','stageCount','Updated','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','includeSensitive:','Deleting\x20personalization\x20service\x20\x27','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','keyEventCriteria','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','sections:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','interval','test','\x20Opening\x20','format','parentSegment','segment:parent:show','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','bold','processedRows','\x20total','id:\x20','allValid','deleteToken','Output\x20file:\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x0aNo\x20sample\x20data\x20available','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','launched','Schema\x20saved\x20to\x20','8pLodrc','Error:\x20Service\x20ID\x20is\x20required','SELECT\x20*\x20FROM\x20(\x0a','Personalization:','customersWithEvents','page_view','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','label','audienceId:\x20','created:','toLowerCase','all','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','/sessions/','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','\x5c$&','column_type','\x27\x20with\x20ID:\x20','11sQtNAx'];a32_0x571d=function(){return _0x38e3e0;};return a32_0x571d();}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x12c);[a32_0x50f93c(0x121)]='Get\x20current\x20RT\x20configuration\x20version\x20status';async[a32_0x50f93c(0x29f)](_0xd953aa){const _0x232974=a32_0x50f93c,{options:_0x167b4b,args:_0x5957a6,tdx:_0x42ad94}=_0xd953aa,_0x50851d=_0x5957a6[0x0]||_0x167b4b[_0x232974(0x15a)];if(!_0x50851d)return showParentSegmentNotSetError(_0x232974(0xfa)+_0x232974(0x218)),0x1;_0x167b4b[_0x232974(0x1f3)]&&(console[_0x232974(0x185)](_0x232974(0x22f)+_0x167b4b[_0x232974(0x1ed)]),console['error'](_0x232974(0x145)+_0x50851d));const _0x3534ea=await withSpinner(_0x232974(0xec)+_0x50851d+_0x232974(0x1c9),()=>_0x42ad94[_0x232974(0xb0)][_0x232974(0x281)](_0x50851d),{'verbose':_0x167b4b[_0x232974(0x1f3)]}),_0x15cfc6=_0x3534ea['data'],_0xd01c1d=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x50851d+_0x232974(0x1c9),()=>_0x42ad94[_0x232974(0x1dc)][_0x232974(0x10f)](_0x15cfc6),{'verbose':_0x167b4b[_0x232974(0x1f3)]}),_0x35634d=_0xd01c1d[_0x232974(0x189)];return console[_0x232974(0x185)]('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x167b4b[_0x232974(0x159)]==='json'||_0x167b4b[_0x232974(0x159)]===_0x232974(0x288)?await handleSDKOutput([_0x35634d],_0x167b4b):(console['log'](_0x232974(0x160)+_0x35634d['id']),console['log'](_0x232974(0x173)+_0x35634d[_0x232974(0x110)]),console['log'](_0x232974(0xd8)+_0x35634d[_0x232974(0x113)]),console[_0x232974(0x10a)]('eventKind:\x20'+_0x35634d[_0x232974(0x286)]),console[_0x232974(0x10a)]('status:\x20'+_0x35634d[_0x232974(0x1b5)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:service:list';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x255);async[a32_0x50f93c(0x29f)](_0x1a5728){const _0x4d093e=a32_0x50f93c,{options:_0xeabcb6,args:_0xbd1b9a,tdx:_0x54d5fd}=_0x1a5728,_0x1b9dc0=_0xbd1b9a[0x0]||_0xeabcb6['parentSegment'];if(!_0x1b9dc0)return showParentSegmentNotSetError(_0x4d093e(0x244)+'\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'),0x1;const _0x28ceb6=await withSpinner(_0x4d093e(0xec)+_0x1b9dc0+_0x4d093e(0x1c9),()=>_0x54d5fd[_0x4d093e(0xb0)][_0x4d093e(0x281)](_0x1b9dc0),{'verbose':_0xeabcb6[_0x4d093e(0x1f3)]}),_0x2b19cd=_0x28ceb6[_0x4d093e(0x189)],_0x443bcc=await withSpinner(_0x4d093e(0x28c)+_0x1b9dc0+'\x27...',()=>_0x54d5fd[_0x4d093e(0x280)][_0x4d093e(0x20d)](_0x2b19cd),{'verbose':_0xeabcb6[_0x4d093e(0x1f3)]}),_0x30f8f0=_0x443bcc[_0x4d093e(0x189)];console['error'](_0x4d093e(0x278)+_0x30f8f0[_0x4d093e(0x256)]+_0x4d093e(0x20f)+(_0x30f8f0['length']!==0x1?'s':''));if(_0xeabcb6['format']===_0x4d093e(0x245)||_0xeabcb6['format']===_0x4d093e(0x288))await handleSDKOutput(_0x30f8f0,_0xeabcb6);else{if(_0x30f8f0[_0x4d093e(0x256)]===0x0)console[_0x4d093e(0x10a)](_0x4d093e(0x27e)),console['error'](a32_0x3a28f3[_0x4d093e(0x2a6)](_0x4d093e(0x1b6)));else for(const _0x4e453a of _0x30f8f0){console[_0x4d093e(0x10a)](a32_0x3a28f3[_0x4d093e(0x15d)](_0x4e453a['name'])+'\x20'+a32_0x3a28f3[_0x4d093e(0x20b)](_0x4d093e(0xf6)+_0x4e453a['id']+')'));_0x4e453a['description']&&console[_0x4d093e(0x10a)]('\x20\x20'+a32_0x3a28f3['dim'](_0x4e453a['description']));if(_0x4e453a['tokens']&&_0x4e453a['tokens']['length']>0x0)for(const _0x433f06 of _0x4e453a[_0x4d093e(0xf4)]){const _0x4b0e08=_0x433f06[_0x4d093e(0x134)]?.[_0x4d093e(0x256)]?_0x433f06[_0x4d093e(0x134)]['join'](',\x20'):_0x4d093e(0x1aa);console[_0x4d093e(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x4d093e(0x2a6)](_0x4d093e(0x12b))+'\x20'+_0x433f06[_0x4d093e(0xbd)]+'\x20'+a32_0x3a28f3[_0x4d093e(0x20b)](_0x4d093e(0xf6)+_0x433f06['id']+')')),console[_0x4d093e(0x10a)](_0x4d093e(0xd3)+a32_0x3a28f3['dim']('allowed\x20IPs:')+'\x20'+_0x4b0e08);}else console[_0x4d093e(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x4d093e(0x20b)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x125);['description']=a32_0x50f93c(0x26b);async[a32_0x50f93c(0x29f)](_0x348167){const _0x4ad122=a32_0x50f93c,{options:_0x58d9c1,args:_0x70f890,tdx:_0x1b6189}=_0x348167,_0x212937=_0x58d9c1,_0x185b1f=_0x70f890[0x0],_0x153b6f=_0x70f890[0x1]||_0x58d9c1[_0x4ad122(0x15a)];if(!_0x185b1f)return console[_0x4ad122(0x185)](_0x4ad122(0x1b0)),console[_0x4ad122(0x185)](_0x4ad122(0x179)),console[_0x4ad122(0x185)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x153b6f)return showParentSegmentNotSetError(_0x4ad122(0x27f)+_0x4ad122(0x19d)),0x1;const _0x296cef=await withSpinner(_0x4ad122(0xec)+_0x153b6f+_0x4ad122(0x1c9),()=>_0x1b6189['segment'][_0x4ad122(0x281)](_0x153b6f),{'verbose':_0x58d9c1['verbose']}),_0x3d66ff=_0x296cef[_0x4ad122(0x189)],_0x3499ae={'name':_0x185b1f,'description':_0x212937[_0x4ad122(0x121)],'public':_0x212937[_0x4ad122(0xa4)]},_0x241b18=await withSpinner(_0x4ad122(0xf1)+_0x185b1f+'\x27...',()=>_0x1b6189['personalization']['create'](_0x3d66ff,_0x3499ae),{'verbose':_0x58d9c1[_0x4ad122(0x1f3)]}),_0xf0e196=_0x241b18[_0x4ad122(0x189)];return console['error'](_0x4ad122(0x1a5)+_0xf0e196[_0x4ad122(0xbd)]+_0x4ad122(0x17d)+_0xf0e196['id']),await handleSDKOutput([_0xf0e196],_0x58d9c1),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0xc4);[a32_0x50f93c(0x121)]='Show\x20personalization\x20service\x20details';async['execute'](_0x5b387c){const _0x3a2d66=a32_0x50f93c,{options:_0x371c6e,args:_0xd40a07,tdx:_0x55547c}=_0x5b387c,_0x2552e1=_0xd40a07[0x0],_0x3dff34=_0xd40a07[0x1]||_0x371c6e['parentSegment'];if(!_0x2552e1)return console[_0x3a2d66(0x185)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x3a2d66(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x3a2d66(0x185)](_0x3a2d66(0x171)),0x1;if(!_0x3dff34)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x3a2d66(0x171)),0x1;const _0x3d6fb3=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3dff34+_0x3a2d66(0x1c9),()=>_0x55547c['segment']['resolveParentId'](_0x3dff34),{'verbose':_0x371c6e['verbose']}),_0x592b37=_0x3d6fb3[_0x3a2d66(0x189)],_0x258be9=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x2552e1+_0x3a2d66(0x1c9),()=>_0x55547c[_0x3a2d66(0x280)][_0x3a2d66(0x105)](_0x592b37,_0x2552e1),{'verbose':_0x371c6e[_0x3a2d66(0x1f3)]}),_0x12ee8e=_0x258be9['data'];if(_0x371c6e['json']||_0x371c6e[_0x3a2d66(0x288)])await handleSDKOutput([_0x12ee8e],_0x371c6e);else{console[_0x3a2d66(0x10a)](a32_0x3a28f3[_0x3a2d66(0x15d)](_0x12ee8e[_0x3a2d66(0xbd)])+'\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x3a2d66(0xf6)+_0x12ee8e['id']+')'));_0x12ee8e[_0x3a2d66(0x121)]&&console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x12ee8e[_0x3a2d66(0x121)]));console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3['cyan'](_0x3a2d66(0x253))+'\x20'+(_0x12ee8e['public']?_0x3a2d66(0x265):'no'));if(_0x12ee8e[_0x3a2d66(0xf4)]&&_0x12ee8e[_0x3a2d66(0xf4)][_0x3a2d66(0x256)]>0x0)for(const _0x4bd61b of _0x12ee8e[_0x3a2d66(0xf4)]){const _0x55086e=_0x4bd61b[_0x3a2d66(0x134)]?.[_0x3a2d66(0x256)]?_0x4bd61b[_0x3a2d66(0x134)][_0x3a2d66(0x25b)](',\x20'):'any';console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x3a2d66(0x2a6)](_0x3a2d66(0x12b))+'\x20'+_0x4bd61b[_0x3a2d66(0xbd)]+'\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)]('(id:\x20'+_0x4bd61b['id']+')')),console['log'](_0x3a2d66(0xd3)+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x3a2d66(0x10b))+'\x20'+_0x55086e);}else console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x3a2d66(0xb6)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x1fa);[a32_0x50f93c(0x121)]='Delete\x20a\x20personalization\x20service';async[a32_0x50f93c(0x29f)](_0x1765c1){const _0x138284=a32_0x50f93c,{options:_0x5d1fdc,args:_0x479fee,tdx:_0x46e144}=_0x1765c1,_0x1ccfc9=_0x479fee[0x0],_0x45d997=_0x479fee[0x1]||_0x5d1fdc[_0x138284(0x15a)];if(!_0x1ccfc9)return console[_0x138284(0x185)](_0x138284(0x16c)),console[_0x138284(0x185)](_0x138284(0x143)),console[_0x138284(0x185)](_0x138284(0x222)),0x1;if(!_0x45d997)return showParentSegmentNotSetError(_0x138284(0x224)+_0x138284(0x222)),0x1;const _0x576214=await withSpinner(_0x138284(0xec)+_0x45d997+'\x27...',()=>_0x46e144[_0x138284(0xb0)][_0x138284(0x281)](_0x45d997),{'verbose':_0x5d1fdc[_0x138284(0x1f3)]}),_0x1701df=_0x576214[_0x138284(0x189)];return await withSpinner(_0x138284(0x14d)+_0x1ccfc9+_0x138284(0x1c9),()=>_0x46e144[_0x138284(0x280)][_0x138284(0xba)](_0x1701df,_0x1ccfc9),{'verbose':_0x5d1fdc[_0x138284(0x1f3)]}),console[_0x138284(0x185)](_0x138284(0xed)+_0x1ccfc9+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:service:update';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x22e);async['execute'](_0x1bb67d){const _0x434fa2=a32_0x50f93c,{options:_0x168cb9,args:_0x31c577,tdx:_0x2bc96e}=_0x1bb67d,_0x2dc56f=_0x168cb9,_0xaf52dc=_0x31c577[0x0],_0xffe229=_0x31c577[0x1]||_0x168cb9[_0x434fa2(0x15a)];if(!_0xaf52dc)return console[_0x434fa2(0x185)](_0x434fa2(0x16c)),console[_0x434fa2(0x185)](_0x434fa2(0x1b3)),console['error'](_0x434fa2(0x29a)),0x1;if(!_0x2dc56f['name'])return console[_0x434fa2(0x185)](_0x434fa2(0xc5)),console[_0x434fa2(0x185)](_0x434fa2(0x1b3)),0x1;if(!_0xffe229)return showParentSegmentNotSetError(_0x434fa2(0x11c)+_0x434fa2(0x29a)),0x1;const _0x3aaa2=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xffe229+'\x27...',()=>_0x2bc96e['segment'][_0x434fa2(0x281)](_0xffe229),{'verbose':_0x168cb9['verbose']}),_0x4b08a7=_0x3aaa2[_0x434fa2(0x189)],_0x272f0e={'name':_0x2dc56f[_0x434fa2(0xbd)]};_0x2dc56f[_0x434fa2(0x121)]!==undefined&&(_0x272f0e[_0x434fa2(0x121)]=_0x2dc56f[_0x434fa2(0x121)]);const _0xd3097d=await withSpinner(_0x434fa2(0x290)+_0xaf52dc+_0x434fa2(0x1c9),()=>_0x2bc96e['personalization'][_0x434fa2(0xb8)](_0x4b08a7,_0xaf52dc,_0x272f0e),{'verbose':_0x168cb9['verbose']}),_0x40e0fb=_0xd3097d['data'];return console['error'](_0x434fa2(0x193)+_0x40e0fb[_0x434fa2(0xbd)]+'\x27'),await handleSDKOutput([_0x40e0fb],_0x168cb9),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x23b);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x127);async[a32_0x50f93c(0x29f)](_0x56f586){const _0x54764d=a32_0x50f93c,{options:_0x30628d,args:_0x5a6066,tdx:_0x34b4f1}=_0x56f586,_0x23c034=_0x30628d,_0x7b61e8=_0x5a6066[0x0],_0x5678db=_0x5a6066[0x1],_0xc8d6ad=_0x5a6066[0x2]||_0x30628d[_0x54764d(0x15a)];if(!_0x7b61e8)return console['error']('Error:\x20Token\x20name\x20is\x20required'),console[_0x54764d(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console['error'](_0x54764d(0xcf)),0x1;if(!_0x5678db)return console[_0x54764d(0x185)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x54764d(0x185)](_0x54764d(0x25d)),console[_0x54764d(0x185)](_0x54764d(0xcf)),0x1;if(!_0xc8d6ad)return showParentSegmentNotSetError(_0x54764d(0x1e1)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1ff5fc=await withSpinner(_0x54764d(0xec)+_0xc8d6ad+_0x54764d(0x1c9),()=>_0x34b4f1[_0x54764d(0xb0)][_0x54764d(0x281)](_0xc8d6ad),{'verbose':_0x30628d[_0x54764d(0x1f3)]}),_0x42823d=_0x1ff5fc[_0x54764d(0x189)],_0x447abb={'name':_0x7b61e8};_0x23c034[_0x54764d(0x134)]&&(_0x447abb[_0x54764d(0x134)]=_0x23c034['allowedIps']['split'](',')[_0x54764d(0x226)](_0x27121b=>_0x27121b[_0x54764d(0x1eb)]()));_0x23c034['description']&&(_0x447abb[_0x54764d(0x121)]=_0x23c034[_0x54764d(0x121)]);const _0x4c0e38=await withSpinner('Creating\x20token\x20\x27'+_0x7b61e8+_0x54764d(0x124)+_0x5678db+'\x27...',()=>_0x34b4f1['personalization'][_0x54764d(0x1fe)](_0x42823d,_0x5678db,_0x447abb),{'verbose':_0x30628d[_0x54764d(0x1f3)]}),_0x2d6ee7=_0x4c0e38[_0x54764d(0x189)];return console[_0x54764d(0x185)](_0x54764d(0x12e)+_0x2d6ee7[_0x54764d(0xbd)]+_0x54764d(0x17d)+_0x2d6ee7['id']),_0x2d6ee7['value']&&(console[_0x54764d(0x185)](a32_0x3a28f3['yellow'](_0x54764d(0xc6))),console[_0x54764d(0x185)](a32_0x3a28f3[_0x54764d(0x2a6)](_0x2d6ee7[_0x54764d(0x246)])),console[_0x54764d(0x185)]('')),await handleSDKOutput([_0x2d6ee7],_0x30628d),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x101);['description']=a32_0x50f93c(0x1f8);async[a32_0x50f93c(0x29f)](_0x553ece){const _0x4b63b5=a32_0x50f93c,{options:_0x3b933c,args:_0x1cccca,tdx:_0x524817}=_0x553ece,_0x409aff=_0x1cccca[0x0],_0xefd715=_0x1cccca[0x1]||_0x3b933c[_0x4b63b5(0x15a)];if(!_0x409aff)return console[_0x4b63b5(0x185)](_0x4b63b5(0x1a7)),console[_0x4b63b5(0x185)](_0x4b63b5(0x269)),console[_0x4b63b5(0x185)](_0x4b63b5(0xf5)),0x1;if(!_0xefd715)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x4b63b5(0xf5)),0x1;const _0xfa3bc5=await withSpinner(_0x4b63b5(0xec)+_0xefd715+_0x4b63b5(0x1c9),()=>_0x524817[_0x4b63b5(0xb0)][_0x4b63b5(0x281)](_0xefd715),{'verbose':_0x3b933c[_0x4b63b5(0x1f3)]}),_0x390d32=_0xfa3bc5[_0x4b63b5(0x189)],_0x8381f4=await withSpinner(_0x4b63b5(0x28f),()=>_0x524817['personalization'][_0x4b63b5(0x20d)](_0x390d32),{'verbose':_0x3b933c[_0x4b63b5(0x1f3)]}),_0x6b5d58=_0x8381f4[_0x4b63b5(0x189)];let _0xb78d66;for(const _0x2a8dff of _0x6b5d58){if(_0x2a8dff[_0x4b63b5(0xf4)]?.[_0x4b63b5(0x98)](_0xbac02=>_0xbac02['id']===_0x409aff)){_0xb78d66=_0x2a8dff['id'];break;}}if(!_0xb78d66)return console['error'](_0x4b63b5(0x1b4)+_0x409aff+_0x4b63b5(0x14e)),0x1;const _0x1e97fc=await withSpinner(_0x4b63b5(0x24b)+_0x409aff+_0x4b63b5(0x1c9),()=>_0x524817[_0x4b63b5(0x280)][_0x4b63b5(0x162)](_0x390d32,_0xb78d66,_0x409aff),{'verbose':_0x3b933c[_0x4b63b5(0x1f3)]}),_0x369665=_0x1e97fc['data'];return console[_0x4b63b5(0x185)](_0x4b63b5(0x1bf)+(_0x369665[_0x4b63b5(0xbd)]||_0x409aff)+'\x27'),await handleSDKOutput([_0x369665],_0x3b933c),0x0;}}export class PSPzListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:list';[a32_0x50f93c(0x121)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a32_0x50f93c(0x29f)](_0x5193b0){const _0x467c91=a32_0x50f93c,{options:_0x1a2fd8,args:_0x40d69c,tdx:_0x43ee3a}=_0x5193b0,_0x4a607b=_0x40d69c[0x0]||_0x1a2fd8['parentSegment'];if(!_0x4a607b)return showParentSegmentNotSetError(_0x467c91(0x153)+_0x467c91(0x95)),0x1;const _0x429403=await withSpinner(_0x467c91(0xec)+_0x4a607b+_0x467c91(0x1c9),()=>_0x43ee3a[_0x467c91(0xb0)][_0x467c91(0x281)](_0x4a607b),{'verbose':_0x1a2fd8['verbose']}),_0xb10930=_0x429403[_0x467c91(0x189)],_0x2a35f5=await withSpinner(_0x467c91(0x1df)+_0x4a607b+_0x467c91(0x1c9),()=>_0x43ee3a[_0x467c91(0x280)][_0x467c91(0x18f)](_0xb10930),{'verbose':_0x1a2fd8['verbose']}),_0x2e7baf=_0x2a35f5['data'];console['error'](_0x467c91(0x278)+_0x2e7baf[_0x467c91(0x256)]+'\x20personalization'+(_0x2e7baf[_0x467c91(0x256)]!==0x1?'s':''));if(_0x1a2fd8[_0x467c91(0x159)]===_0x467c91(0x245)||_0x1a2fd8[_0x467c91(0x159)]==='jsonl')await handleSDKOutput(_0x2e7baf,_0x1a2fd8);else{if(_0x2e7baf[_0x467c91(0x256)]===0x0)console[_0x467c91(0x10a)](_0x467c91(0x133));else for(const _0x6fbf71 of _0x2e7baf){console['log'](a32_0x3a28f3[_0x467c91(0x15d)](_0x6fbf71[_0x467c91(0xbd)])+'\x20'+a32_0x3a28f3['dim']('(id:\x20'+_0x6fbf71['id']+')'));_0x6fbf71['description']&&console[_0x467c91(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x467c91(0x20b)](_0x6fbf71['description']));const _0x596ab6=_0x6fbf71['sections']?.['length']||0x0;console[_0x467c91(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x467c91(0x2a6)](_0x467c91(0x154))+'\x20'+_0x596ab6);if(_0x6fbf71[_0x467c91(0xe3)]&&_0x6fbf71[_0x467c91(0xe3)]['length']>0x0)for(const _0x49c88a of _0x6fbf71['sections']){console[_0x467c91(0x10a)]('\x20\x20\x20\x20-\x20'+_0x49c88a[_0x467c91(0xbd)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0xa1);[a32_0x50f93c(0x121)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a32_0x50f93c(0x29f)](_0x8c76af){const _0x556785=a32_0x50f93c,{options:_0xb87a96,args:_0x5b98ba,tdx:_0x3db2e2}=_0x8c76af,_0x30ef87=_0x5b98ba[0x0];if(!_0x30ef87)return console[_0x556785(0x185)](_0x556785(0x203)),console[_0x556785(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x346f93=await withSpinner(_0x556785(0x231)+_0x30ef87+_0x556785(0x1c9),()=>_0x3db2e2[_0x556785(0x280)][_0x556785(0x1d1)](_0x30ef87),{'verbose':_0xb87a96[_0x556785(0x1f3)]}),_0xf1762b=_0x346f93[_0x556785(0x189)];console[_0x556785(0x185)](_0x556785(0x276)+_0xf1762b['name']+'\x27');if(_0xb87a96[_0x556785(0x159)]===_0x556785(0x245)||_0xb87a96[_0x556785(0x159)]===_0x556785(0x288))await handleSDKOutput([_0xf1762b],_0xb87a96);else{console['log'](a32_0x3a28f3[_0x556785(0x15d)](_0xf1762b[_0x556785(0xbd)])+'\x20'+a32_0x3a28f3['dim'](_0x556785(0xf6)+_0xf1762b['id']+')'));_0xf1762b[_0x556785(0x121)]&&console['log']('\x20\x20'+a32_0x3a28f3[_0x556785(0x20b)](_0xf1762b['description']));_0xf1762b[_0x556785(0x110)]&&console['log']('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x119))+'\x20'+_0xf1762b['audienceId']);console[_0x556785(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x174))+'\x20'+_0xf1762b[_0x556785(0xcb)]),console[_0x556785(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)]('updated:')+'\x20'+_0xf1762b[_0x556785(0xc7)]);const _0x23e3c7=_0xf1762b[_0x556785(0xe3)]?.[_0x556785(0x256)]||0x0;console['log']('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x154))+'\x20'+_0x23e3c7);if(_0xf1762b[_0x556785(0xe3)]&&_0xf1762b[_0x556785(0xe3)][_0x556785(0x256)]>0x0)for(const _0x1e2243 of _0xf1762b[_0x556785(0xe3)]){console[_0x556785(0x10a)]('\x20\x20\x20\x20'+a32_0x3a28f3[_0x556785(0x15d)](_0x1e2243[_0x556785(0xbd)])+'\x20'+a32_0x3a28f3[_0x556785(0x20b)](_0x556785(0xf6)+_0x1e2243['id']+')')),_0x1e2243['entryCriteria']&&(console[_0x556785(0x10a)]('\x20\x20\x20\x20\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x213))+'\x20'+_0x1e2243[_0x556785(0xac)][_0x556785(0xbd)]),_0x1e2243[_0x556785(0xac)]['keyEventCriteria']?.[_0x556785(0x258)]&&console[_0x556785(0x10a)](_0x556785(0x14f)+a32_0x3a28f3[_0x556785(0x2a6)]('keyEventId:')+'\x20'+_0x1e2243[_0x556785(0xac)][_0x556785(0x152)][_0x556785(0x258)])),_0x1e2243['payload']&&console[_0x556785(0x10a)]('\x20\x20\x20\x20\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)]('payload:')+'\x20'+JSON['stringify'](_0x1e2243[_0x556785(0xeb)])),_0x1e2243[_0x556785(0x138)]&&console[_0x556785(0x10a)](_0x556785(0x10e)+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x14c))+_0x556785(0x1d8));}}return 0x0;}}function a32_0x3e39(_0x268be1,_0x4c9480){_0x268be1=_0x268be1-0x8f;const _0x571d9f=a32_0x571d();let _0x3e39a5=_0x571d9f[_0x268be1];return _0x3e39a5;}export class PSPzDeleteCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x22c);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x201);async[a32_0x50f93c(0x29f)](_0x136c41){const _0x42cda1=a32_0x50f93c,{options:_0x260089,args:_0x7df6a8,tdx:_0x386b29}=_0x136c41,_0x1cf65e=_0x7df6a8[0x0];if(!_0x1cf65e)return console['error'](_0x42cda1(0x203)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x42cda1(0xee)+_0x1cf65e+_0x42cda1(0x1c9),()=>_0x386b29[_0x42cda1(0x280)][_0x42cda1(0x1a2)](_0x1cf65e),{'verbose':_0x260089[_0x42cda1(0x1f3)]}),console[_0x42cda1(0x185)]('✔\x20Deleted\x20personalization\x20\x27'+_0x1cf65e+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:create';['description']=a32_0x50f93c(0x1d6);async[a32_0x50f93c(0x29f)](_0x53eed5){const _0x4a8199=a32_0x50f93c,{options:_0x218f8d,tdx:_0x2052d8}=_0x53eed5,_0x373dd9=_0x218f8d;let _0x54c436;if(_0x373dd9['file']){_0x54c436=await loadJSON(_0x373dd9[_0x4a8199(0x1de)],!![]);if(!_0x54c436[_0x4a8199(0x1d0)]?.['parentFolder'])return console[_0x4a8199(0x185)](_0x4a8199(0x14b)),console[_0x4a8199(0x185)](_0x4a8199(0xa7)),console[_0x4a8199(0x185)](_0x4a8199(0x274)),0x1;}else{if(!_0x373dd9[_0x4a8199(0xbd)])return console['error'](_0x4a8199(0x293)),console[_0x4a8199(0x185)](_0x4a8199(0x21a)),console[_0x4a8199(0x185)](_0x4a8199(0xce)),0x1;if(_0x373dd9[_0x4a8199(0x121)]===undefined)return console[_0x4a8199(0x185)](_0x4a8199(0xbf)),console[_0x4a8199(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0x4a8199(0xce)),0x1;if(_0x373dd9[_0x4a8199(0x24e)]===undefined)return console['error']('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error'](_0x4a8199(0x1ca)),0x1;let _0x54c242=_0x373dd9[_0x4a8199(0x110)];if(!_0x54c242&&_0x218f8d[_0x4a8199(0x15a)]){const _0x4d9e20=await withSpinner(_0x4a8199(0xec)+_0x218f8d[_0x4a8199(0x15a)]+_0x4a8199(0x1c9),()=>_0x2052d8[_0x4a8199(0xb0)][_0x4a8199(0x281)](_0x218f8d['parentSegment']),{'verbose':_0x218f8d['verbose']});_0x54c242=_0x4d9e20['data'];}let _0x559f45;_0x373dd9[_0x4a8199(0xe3)]&&(_0x559f45=await loadJSON(_0x373dd9[_0x4a8199(0xe3)],![]));const _0x3f3748=_0x373dd9[_0x4a8199(0x24e)]===_0x4a8199(0x1e8)?null:{'id':_0x373dd9['folderId'],'type':_0x4a8199(0xc9)};_0x54c436={'attributes':{'name':_0x373dd9[_0x4a8199(0xbd)],'description':_0x373dd9[_0x4a8199(0x121)]||null,..._0x54c242!==undefined&&{'audienceId':_0x54c242},..._0x559f45!==undefined&&{'sections':_0x559f45}},'relationships':{'parentFolder':{'data':_0x3f3748}}};}const _0x3cca73=await withSpinner(_0x4a8199(0x12a)+(_0x54c436[_0x4a8199(0x21f)]?.['name']??'')+_0x4a8199(0x1c9),()=>_0x2052d8[_0x4a8199(0x280)][_0x4a8199(0x28e)](_0x54c436),{'verbose':_0x218f8d[_0x4a8199(0x1f3)]}),_0x31107e=_0x3cca73[_0x4a8199(0x189)];return console[_0x4a8199(0x185)](_0x4a8199(0xf9)+_0x31107e[_0x4a8199(0xbd)]+_0x4a8199(0x17d)+_0x31107e['id']),await handleSDKOutput([_0x31107e],_0x218f8d),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:patch';[a32_0x50f93c(0x121)]=a32_0x50f93c(0xf8);async[a32_0x50f93c(0x29f)](_0xff845b){const _0x650d6b=a32_0x50f93c,{options:_0x15efdf,args:_0x12d9c4}=_0xff845b,_0x155069=_0x15efdf,_0x33c370=_0x12d9c4[0x0];if(!_0x33c370)return console[_0x650d6b(0x185)](_0x650d6b(0x203)),console[_0x650d6b(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console['error'](_0x650d6b(0x184)),0x1;let _0x505d66;if(_0x155069[_0x650d6b(0x1de)])_0x505d66=await loadJSON(_0x155069['file'],!![]);else{if(!_0x155069['name'])return console['error'](_0x650d6b(0x293)),console[_0x650d6b(0x185)](_0x650d6b(0x1b1)),0x1;if(_0x155069[_0x650d6b(0x121)]===undefined)return console[_0x650d6b(0x185)](_0x650d6b(0xbf)),console[_0x650d6b(0x185)](_0x650d6b(0x1b1)),0x1;let _0x556f64;_0x155069[_0x650d6b(0xe3)]&&(_0x556f64=await loadJSON(_0x155069['sections'],![])),_0x505d66={'attributes':{'name':_0x155069[_0x650d6b(0xbd)],'description':_0x155069['description']||null,..._0x556f64!==undefined&&{'sections':_0x556f64}}};}const {tdx:_0x2b79b2}=_0xff845b,_0x4b7d3f=await withSpinner(_0x650d6b(0x216)+_0x33c370+_0x650d6b(0x1c9),()=>_0x2b79b2[_0x650d6b(0x280)]['patchPersonalization'](_0x33c370,_0x505d66),{'verbose':_0x15efdf[_0x650d6b(0x1f3)]}),_0x4c3ac4=_0x4b7d3f[_0x650d6b(0x189)];return console[_0x650d6b(0x185)](_0x650d6b(0xe7)+_0x4c3ac4['name']+_0x650d6b(0x241)+_0x4c3ac4['id']+')'),await handleSDKOutput([_0x4c3ac4],_0x15efdf),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']=a32_0x50f93c(0x287);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x9a);async[a32_0x50f93c(0x29f)](_0x5be80d){const _0x57faa4=a32_0x50f93c,{options:_0x516c91,args:_0x2e777a}=_0x5be80d,_0x5cc33b=_0x2e777a[0x0]||_0x516c91[_0x57faa4(0x15a)];if(!_0x5cc33b)return showParentSegmentNotSetError(_0x57faa4(0x2a4)+_0x57faa4(0x1ab)),0x1;const _0x80618c=resolveYamlFile(_0x5cc33b);if(!existsSync(_0x80618c))return showFileNotFoundError(_0x80618c,_0x5cc33b),0x1;let _0x2ce859;try{_0x2ce859=readFileSync(_0x80618c,_0x57faa4(0x275));}catch(_0xebf554){const _0x26c9dd=_0xebf554 instanceof Error?_0xebf554[_0x57faa4(0x26c)]:String(_0xebf554);return console['error'](_0x57faa4(0x17f)+_0x26c9dd),0x1;}let _0xb10570;try{_0xb10570=parseDef(_0x2ce859);}catch(_0x5de09a){const _0x471ed1=_0x5de09a instanceof Error?_0x5de09a[_0x57faa4(0x26c)]:String(_0x5de09a);return console[_0x57faa4(0x185)](a32_0x3a28f3[_0x57faa4(0x1d7)](_0x57faa4(0x23e)+_0x471ed1)),0x1;}if(_0xb10570[_0x57faa4(0x1cb)]&&_0xb10570[_0x57faa4(0x1cb)]['length']>0x0)return console[_0x57faa4(0x185)](a32_0x3a28f3[_0x57faa4(0x1c6)](_0x57faa4(0x109)+_0x80618c)),console[_0x57faa4(0x185)](a32_0x3a28f3[_0x57faa4(0x20b)]('\x20\x20\x20'+_0xb10570['personalization_services']['length']+_0x57faa4(0x1c4))),0x1;!_0xb10570[_0x57faa4(0x1dc)]&&(_0xb10570[_0x57faa4(0x1dc)]={'events':[{'name':'page_view','source_table':_0x57faa4(0xc0)}],'attributes':[{'name':_0x57faa4(0x220),'type':'single'}],'id_stitching':{'primary_key':_0xb10570[_0x57faa4(0x27c)][_0x57faa4(0x1f9)]===_0x57faa4(0x1c7)?_0x57faa4(0x242):'user_id'}});_0xb10570[_0x57faa4(0x1cb)]=[{'name':'My\x20Service','description':_0x57faa4(0x295),'trigger_event':_0x57faa4(0x170),'sections':[{'name':'Default','criteria':_0x57faa4(0xdd),'attributes':[_0x57faa4(0x220)]}]}];const _0x581a38=serializeDef(_0xb10570);return writeFileSync(_0x80618c,_0x581a38,_0x57faa4(0x275)),console['error'](a32_0x3a28f3[_0x57faa4(0x25e)]('✔')+_0x57faa4(0x1cf)+a32_0x3a28f3[_0x57faa4(0x2a6)](_0x80618c)),(!_0xb10570[_0x57faa4(0x1dc)]||_0x2ce859[_0x57faa4(0x262)]('realtime:')===-0x1)&&console['error'](a32_0x3a28f3[_0x57faa4(0x25e)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console['error']('\x0a'+a32_0x3a28f3['dim'](_0x57faa4(0x19e))),console[_0x57faa4(0x185)](_0x57faa4(0x1af)+_0x80618c+_0x57faa4(0x24d)),console[_0x57faa4(0x185)](_0x57faa4(0x1b7)+a32_0x3a28f3[_0x57faa4(0x20b)](_0x57faa4(0xbc)+_0x5cc33b)+_0x57faa4(0x1f4)),0x0;}}
|
|
1
|
+
const a32_0x462d84=a32_0x266e;(function(_0x49d475,_0x5f3aa1){const _0x2b1697=a32_0x266e,_0x587321=_0x49d475();while(!![]){try{const _0x458608=parseInt(_0x2b1697(0xc8))/0x1*(parseInt(_0x2b1697(0xcd))/0x2)+parseInt(_0x2b1697(0x1a2))/0x3*(-parseInt(_0x2b1697(0x266))/0x4)+parseInt(_0x2b1697(0x1e3))/0x5+parseInt(_0x2b1697(0x10e))/0x6*(parseInt(_0x2b1697(0x138))/0x7)+-parseInt(_0x2b1697(0x179))/0x8*(parseInt(_0x2b1697(0x1b7))/0x9)+parseInt(_0x2b1697(0x83))/0xa+-parseInt(_0x2b1697(0x208))/0xb;if(_0x458608===_0x5f3aa1)break;else _0x587321['push'](_0x587321['shift']());}catch(_0x32e323){_0x587321['push'](_0x587321['shift']());}}}(a32_0x43b6,0x3c13e));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x5922c1 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 a32_0x10437a 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=a32_0x462d84(0x258),LEGACY_PARENT_SEGMENT_DIR=a32_0x462d84(0x160);function openBrowser(_0x5805ff){const _0x3eb6ef=a32_0x462d84,_0x38430d=process[_0x3eb6ef(0xa3)],_0x36c690=_0x38430d===_0x3eb6ef(0x8a)?_0x3eb6ef(0x14e):_0x38430d===_0x3eb6ef(0x21c)?_0x3eb6ef(0x1c9):_0x3eb6ef(0xd2);spawn(_0x36c690,[_0x5805ff],{'detached':!![],'stdio':_0x3eb6ef(0x1c5)})[_0x3eb6ef(0x243)]();}function migrateLegacyDirectory(){const _0x3475fd=a32_0x462d84;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x2558f7=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x2558f7[_0x3475fd(0xa7)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a32_0x10437a[_0x3475fd(0x94)](_0x3475fd(0x110)+LEGACY_PARENT_SEGMENT_DIR+_0x3475fd(0x13c)+PARENT_SEGMENT_DIR+_0x3475fd(0x23f))),console[_0x3475fd(0x17d)](a32_0x10437a[_0x3475fd(0x247)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x3475fd(0x11a))),![];console[_0x3475fd(0x17d)](a32_0x10437a[_0x3475fd(0x94)](_0x3475fd(0x1d0)+LEGACY_PARENT_SEGMENT_DIR+_0x3475fd(0x1eb)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3475fd(0x17d)](a32_0x10437a[_0x3475fd(0x96)](_0x3475fd(0x147)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x30ad56){const _0x19d466=_0x30ad56 instanceof Error?_0x30ad56[_0x3475fd(0x184)]:String(_0x30ad56);return console[_0x3475fd(0x17d)](a32_0x10437a['red'](_0x3475fd(0x1c2)+_0x19d466+'\x0a')),![];}}function a32_0x266e(_0x2a6e7a,_0x1cbe5d){_0x2a6e7a=_0x2a6e7a-0x6f;const _0x43b6fb=a32_0x43b6();let _0x266e4c=_0x43b6fb[_0x2a6e7a];return _0x266e4c;}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x462d84(0x167)](_0x4ded45){const _0x43be2f=a32_0x462d84;return migrateLegacyDirectory(),super[_0x43be2f(0x167)](_0x4ded45);}}function resolveYamlFile(_0x2ded10){const _0x1a52b9=a32_0x462d84;if(_0x2ded10['endsWith'](_0x1a52b9(0x275))||_0x2ded10[_0x1a52b9(0x212)](_0x1a52b9(0x18d)))return _0x2ded10;return a32_0x5922c1[_0x1a52b9(0x1bb)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x2ded10)+'.yml');}function formatProgressMessage(_0x87a024){const _0x21d0a5=a32_0x462d84,_0x2b35f8=_0x87a024[_0x21d0a5(0x178)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2b35f8){const [,_0x545ce4,_0x43de92,_0x154f25='']=_0x2b35f8;return a32_0x10437a[_0x21d0a5(0x247)](_0x545ce4+':')+'\x20'+_0x43de92+a32_0x10437a[_0x21d0a5(0x247)](_0x154f25);}return a32_0x10437a['dim'](_0x87a024);}function showFileNotFoundError(_0x28e740,_0xd44777){const _0xaabb65=a32_0x462d84;console[_0xaabb65(0x17d)](a32_0x10437a[_0xaabb65(0xbd)](_0xaabb65(0x274)+_0x28e740+'\x0a')),console[_0xaabb65(0x17d)](a32_0x10437a[_0xaabb65(0x276)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0xd44777+_0xaabb65(0x95)));}function displayRealtimeValidation(_0x2d2f57){const _0x2e7aef=a32_0x462d84;if(!_0x2d2f57[_0x2e7aef(0x231)])return;const _0x5be11d=_0x2d2f57[_0x2e7aef(0x231)],_0x454ea6=_0x5be11d['enabled']?a32_0x10437a['green'](_0x2e7aef(0x251)):a32_0x10437a['yellow'](_0x2e7aef(0x23d));console[_0x2e7aef(0x17d)]('\x0a'+a32_0x10437a[_0x2e7aef(0x247)]('RT\x202.0:')+'\x20'+_0x454ea6);if(_0x5be11d[_0x2e7aef(0xb1)]&&_0x5be11d['events'][_0x2e7aef(0x7b)]>0x0){console['error']('\x20\x20'+a32_0x10437a['dim']('Events:')+'\x20'+_0x5be11d[_0x2e7aef(0xb1)][_0x2e7aef(0x7b)]+'\x20configured');for(const _0x13d7db of _0x5be11d[_0x2e7aef(0xb1)]){const _0x5bed46=_0x13d7db['sourceTableValid']===![]?a32_0x10437a[_0x2e7aef(0xbd)]('✘'):a32_0x10437a['green']('✔');console[_0x2e7aef(0x17d)](_0x2e7aef(0x12b)+_0x5bed46+'\x20'+_0x13d7db['name']),_0x13d7db[_0x2e7aef(0xf0)]&&console['error']('\x20\x20\x20\x20\x20\x20'+a32_0x10437a[_0x2e7aef(0xbd)](_0x13d7db['sourceTableError']));}}if(_0x5be11d[_0x2e7aef(0x150)]&&_0x5be11d[_0x2e7aef(0x150)][_0x2e7aef(0x7b)]>0x0){console[_0x2e7aef(0x17d)]('\x20\x20'+a32_0x10437a['dim'](_0x2e7aef(0x1be))+'\x20'+_0x5be11d[_0x2e7aef(0x150)][_0x2e7aef(0x7b)]+_0x2e7aef(0x16b));for(const _0x23f5ec of _0x5be11d['attributes']){const _0x24f76c=_0x23f5ec[_0x2e7aef(0x10d)]?a32_0x10437a[_0x2e7aef(0x96)]('✔'):a32_0x10437a['red']('✘');console[_0x2e7aef(0x17d)]('\x20\x20\x20\x20'+_0x24f76c+'\x20'+_0x23f5ec['name']+'\x20'+a32_0x10437a['dim']('('+_0x23f5ec[_0x2e7aef(0x25d)]+')'));}}if(_0x5be11d[_0x2e7aef(0xff)]){const _0x2378ed=_0x5be11d[_0x2e7aef(0xff)][_0x2e7aef(0xd9)]?.['length']?_0x2e7aef(0xda)+_0x5be11d[_0x2e7aef(0xff)][_0x2e7aef(0xd9)][_0x2e7aef(0x1bb)](',\x20')+']':'';console[_0x2e7aef(0x17d)]('\x20\x20'+a32_0x10437a[_0x2e7aef(0x247)]('ID\x20Stitching:')+'\x20'+_0x5be11d[_0x2e7aef(0xff)][_0x2e7aef(0x18e)]+_0x2378ed);}if(_0x5be11d['personalizationServices']&&_0x5be11d[_0x2e7aef(0x246)][_0x2e7aef(0x7b)]>0x0){console['error']('\x20\x20'+a32_0x10437a[_0x2e7aef(0x247)](_0x2e7aef(0xe8))+'\x20'+_0x5be11d['personalizationServices'][_0x2e7aef(0x7b)]+_0x2e7aef(0x280)+(_0x5be11d['personalizationServices'][_0x2e7aef(0x7b)]!==0x1?'s':''));for(const _0x4abc33 of _0x5be11d['personalizationServices']){console['error'](_0x2e7aef(0xe4)+_0x4abc33[_0x2e7aef(0xf9)]);}}}function showParentSegmentNotSetError(_0x134159){const _0x717b10=a32_0x462d84;console['error'](a32_0x10437a[_0x717b10(0x94)](_0x717b10(0x1dd))),console[_0x717b10(0x17d)](_0x134159);}export class ParentSegmentListCommand extends BaseCommand{['name']=a32_0x462d84(0x1f9);[a32_0x462d84(0x19c)]=a32_0x462d84(0x102);async[a32_0x462d84(0x17f)](_0x23ec34){const _0x2db975=a32_0x462d84,{options:_0x5a7501,args:_0x14c99c,tdx:_0x5916b4}=_0x23ec34,_0x58f6da=_0x14c99c[0x0];_0x5a7501[_0x2db975(0x19e)]&&(console[_0x2db975(0x17d)]('Site:\x20'+_0x5a7501[_0x2db975(0xe6)]),_0x58f6da&&console[_0x2db975(0x17d)](_0x2db975(0x170)+_0x58f6da));const _0x165f86=await withSpinner(_0x58f6da?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x58f6da+_0x2db975(0x183):_0x2db975(0x1fc),()=>_0x5916b4[_0x2db975(0x139)][_0x2db975(0x18a)](),{'verbose':_0x5a7501[_0x2db975(0x19e)]});let _0x241192=_0x165f86[_0x2db975(0x12d)];if(_0x58f6da){const _0x3c8675=_0x58f6da['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x2db975(0x228)](/\?/g,'.'),_0x203ed8=new RegExp('^'+_0x3c8675+'$','i');_0x241192=_0x241192['filter'](_0x177e98=>_0x203ed8[_0x2db975(0x198)](_0x177e98[_0x2db975(0x150)][_0x2db975(0xf9)]));}_0x241192[_0x2db975(0x19d)]((_0x3c4221,_0x2dbfd6)=>_0x3c4221[_0x2db975(0x150)][_0x2db975(0xf9)][_0x2db975(0x124)](_0x2dbfd6[_0x2db975(0x150)][_0x2db975(0xf9)])),console[_0x2db975(0x17d)](_0x2db975(0x105)+_0x241192[_0x2db975(0x7b)]+_0x2db975(0x227)+(_0x241192['length']!==0x1?'s':''));const _0x4b512f=_0x5dba9a=>{const _0x5cbbfb=_0x2db975;return getConsoleNextUrl(_0x5a7501['site'],_0x5cbbfb(0x1d1)+_0x5dba9a);};if(_0x5a7501['format']===_0x2db975(0x1ea)||_0x5a7501[_0x2db975(0x128)]===_0x2db975(0x262)){const _0x572200=_0x241192[_0x2db975(0xa5)](_0x50440d=>({..._0x50440d,'url':_0x4b512f(_0x50440d['id'])}));await handleSDKOutput(_0x572200,_0x5a7501);}else{if(_0x241192[_0x2db975(0x7b)]===0x0)_0x58f6da?console['log'](_0x2db975(0x173)+_0x58f6da):console[_0x2db975(0x195)](_0x2db975(0x1ed));else for(const _0x330b9e of _0x241192){const _0x555193=_0x330b9e[_0x2db975(0x150)][_0x2db975(0x1d7)]?a32_0x10437a[_0x2db975(0x247)]('\x20('+formatRows(_0x330b9e['attributes'][_0x2db975(0x1d7)])+')'):'',_0x458b7a=hyperlink(_0x330b9e[_0x2db975(0x150)][_0x2db975(0xf9)],_0x4b512f(_0x330b9e['id']));console[_0x2db975(0x195)]('👥\x20'+_0x458b7a+_0x555193);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']='segment:parent:create';[a32_0x462d84(0x19c)]=a32_0x462d84(0x16a);async[a32_0x462d84(0x17f)](_0x41b8f3){const _0x4fd69f=a32_0x462d84,{options:_0x4c9e88,args:_0x583dc6,tdx:_0x29cc04}=_0x41b8f3;console[_0x4fd69f(0x17d)](_0x4fd69f(0x177)+_0x4fd69f(0x260)+_0x4fd69f(0x131));const _0x2b85ad=_0x4c9e88;if(_0x583dc6[_0x4fd69f(0x7b)]===0x0)return console[_0x4fd69f(0x17d)](a32_0x10437a[_0x4fd69f(0xbd)](_0x4fd69f(0x16e))),console[_0x4fd69f(0x17d)](_0x4fd69f(0x127)),0x1;const _0x2f3dc0=_0x583dc6[0x0];if(!_0x2b85ad[_0x4fd69f(0x162)]||!_0x2b85ad['table'])return console[_0x4fd69f(0x17d)](_0x4fd69f(0xdc)),console['error'](_0x4fd69f(0x127)),0x1;_0x2b85ad[_0x4fd69f(0x19e)]&&(console['error']('Site:\x20'+_0x2b85ad['site']),console[_0x4fd69f(0x17d)](_0x4fd69f(0x1f6)+_0x2f3dc0),console[_0x4fd69f(0x17d)](_0x4fd69f(0x214)+_0x2b85ad[_0x4fd69f(0x162)]),console[_0x4fd69f(0x17d)]('Table:\x20'+_0x2b85ad[_0x4fd69f(0x217)]));const _0x5d4bdc=await loadJSONFromOptions(_0x2b85ad[_0x4fd69f(0x150)],_0x2b85ad[_0x4fd69f(0x180)]),_0x5dc118=await loadJSONFromOptions(_0x2b85ad[_0x4fd69f(0xde)],_0x2b85ad['behaviorsFile']),_0x3a093d=await loadJSONFromOptions(_0x2b85ad[_0x4fd69f(0x20b)],_0x2b85ad['customerGroupFile']),_0x3147bd={'name':_0x2f3dc0,'description':_0x2b85ad[_0x4fd69f(0x19c)],'scheduleType':_0x2b85ad[_0x4fd69f(0x76)],'scheduleOption':_0x2b85ad[_0x4fd69f(0x237)],'timezone':_0x2b85ad[_0x4fd69f(0x13f)],'master':{'parentDatabaseName':_0x2b85ad[_0x4fd69f(0x162)],'parentTableName':_0x2b85ad['table']},'attributes':_0x5d4bdc,'behaviors':_0x5dc118,'customerGroup':_0x3a093d},_0xf22134=await withSpinner(_0x4fd69f(0x172)+_0x2f3dc0+_0x4fd69f(0x183),()=>_0x29cc04[_0x4fd69f(0x139)][_0x4fd69f(0x1b5)](_0x3147bd),{'verbose':_0x4c9e88['verbose']}),_0x37e9de=_0xf22134[_0x4fd69f(0x12d)];return console[_0x4fd69f(0x17d)](_0x4fd69f(0x141)+_0x37e9de[_0x4fd69f(0xf9)]+_0x4fd69f(0x71)+_0x37e9de['id']),await handleSDKOutput([_0x37e9de],_0x4c9e88),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x1ba);[a32_0x462d84(0x19c)]=a32_0x462d84(0xfd);async[a32_0x462d84(0x17f)](_0x131cd5){const _0x2a9c8c=a32_0x462d84,{options:_0x5465a9,args:_0x432d32,tdx:_0x1d3697}=_0x131cd5;console[_0x2a9c8c(0x17d)](_0x2a9c8c(0x1f3)+_0x2a9c8c(0x260)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x25e66f=_0x5465a9;if(_0x432d32['length']===0x0)return console[_0x2a9c8c(0x17d)](a32_0x10437a[_0x2a9c8c(0xbd)](_0x2a9c8c(0x16e))),console[_0x2a9c8c(0x17d)](_0x2a9c8c(0x1b6)),0x1;const _0x4f18b7=_0x432d32[0x0];_0x25e66f['verbose']&&(console[_0x2a9c8c(0x17d)](_0x2a9c8c(0x112)+_0x25e66f[_0x2a9c8c(0xe6)]),console[_0x2a9c8c(0x17d)](_0x2a9c8c(0x261)+_0x4f18b7));const _0x34af2c=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x4f18b7+_0x2a9c8c(0x183),()=>_0x1d3697['segment'][_0x2a9c8c(0x123)](_0x4f18b7),{'verbose':_0x25e66f[_0x2a9c8c(0x19e)]}),_0x504632=_0x34af2c[_0x2a9c8c(0x12d)],_0x8eccc9=await loadJSONFromOptions(_0x25e66f[_0x2a9c8c(0x26b)],_0x25e66f[_0x2a9c8c(0x24f)]),_0x3e6fce=await loadJSONFromOptions(_0x25e66f['addBehaviors'],_0x25e66f[_0x2a9c8c(0xa4)]),_0x4cbcae={'name':_0x504632['name'],'description':_0x25e66f[_0x2a9c8c(0x19c)]!==undefined?_0x25e66f[_0x2a9c8c(0x19c)]:_0x504632[_0x2a9c8c(0x19c)],'scheduleType':_0x25e66f[_0x2a9c8c(0x76)]!==undefined?_0x25e66f[_0x2a9c8c(0x76)]:_0x504632[_0x2a9c8c(0x76)],'scheduleOption':_0x25e66f[_0x2a9c8c(0x237)]!==undefined?_0x25e66f[_0x2a9c8c(0x237)]:_0x504632[_0x2a9c8c(0x237)],'timezone':_0x25e66f['timezone']!==undefined?_0x25e66f[_0x2a9c8c(0x13f)]:_0x504632[_0x2a9c8c(0x13f)],'master':_0x504632[_0x2a9c8c(0x109)],'attributes':_0x8eccc9?[..._0x504632['attributes']||[],..._0x8eccc9]:_0x504632[_0x2a9c8c(0x150)],'behaviors':_0x3e6fce?[..._0x504632[_0x2a9c8c(0xde)]||[],..._0x3e6fce]:_0x504632[_0x2a9c8c(0xde)],'customerGroup':_0x504632['customerGroup']},_0x1c4ce0=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x4f18b7+'\x27...',()=>_0x1d3697[_0x2a9c8c(0x139)][_0x2a9c8c(0x26a)](_0x4f18b7,_0x4cbcae),{'verbose':_0x25e66f[_0x2a9c8c(0x19e)]}),_0x591553=_0x1c4ce0[_0x2a9c8c(0x12d)];return console['error'](_0x2a9c8c(0x7e)+_0x591553['name']+'\x27'),await handleSDKOutput([_0x591553],_0x25e66f),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x24d);[a32_0x462d84(0x19c)]=a32_0x462d84(0x1ef);async[a32_0x462d84(0x17f)](_0x5e7fa0){const _0x57b1fb=a32_0x462d84,{options:_0x48b855,args:_0x93149e,tdx:_0x46f79d}=_0x5e7fa0,_0x38c414=_0x48b855,_0x35f32c=_0x93149e[0x0]||_0x48b855[_0x57b1fb(0xa2)];if(!_0x35f32c)return showParentSegmentNotSetError(_0x57b1fb(0xcf)+_0x57b1fb(0x103)),0x1;if(_0x38c414[_0x57b1fb(0x196)]&&_0x38c414['output'])return console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0xbd)](_0x57b1fb(0x18c))),console[_0x57b1fb(0x17d)](a32_0x10437a['dim'](_0x57b1fb(0x27a))),console['error'](a32_0x10437a[_0x57b1fb(0x247)](_0x57b1fb(0x26d)+PARENT_SEGMENT_DIR+_0x57b1fb(0xfc))),console['error'](a32_0x10437a[_0x57b1fb(0x276)](_0x57b1fb(0xd3))),0x1;const _0x15e7a7=_0x38c414['output']||a32_0x5922c1[_0x57b1fb(0x1bb)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x35f32c)+'.yml');_0x38c414[_0x57b1fb(0x19e)]&&(console[_0x57b1fb(0x17d)](_0x57b1fb(0x112)+_0x38c414[_0x57b1fb(0xe6)]),console['error'](_0x57b1fb(0x261)+_0x35f32c),console[_0x57b1fb(0x17d)](_0x57b1fb(0x104)+_0x15e7a7));const _0x5c9870=await withSpinner(_0x57b1fb(0x125)+_0x35f32c+_0x57b1fb(0x183),()=>_0x46f79d['segment'][_0x57b1fb(0x24e)](_0x35f32c),{'verbose':_0x38c414[_0x57b1fb(0x19e)]}),_0x3ac227=_0x5c9870['data'];if(existsSync(_0x15e7a7)){const _0x169a46=readFileSync(_0x15e7a7,_0x57b1fb(0x15f)),_0x1ab659=generateDiff(_0x169a46,_0x3ac227);if(!hasChanges(_0x1ab659))console[_0x57b1fb(0x17d)](a32_0x10437a['green']('✔')+'\x20No\x20changes\x20-\x20'+a32_0x10437a[_0x57b1fb(0x276)](_0x15e7a7)+_0x57b1fb(0xcb));else{console[_0x57b1fb(0x17d)](_0x57b1fb(0x152)+_0x15e7a7+'\x27:'),console['error']('─'[_0x57b1fb(0x148)](0x3c)),console['error'](formatDiffWithColors(_0x1ab659)),console[_0x57b1fb(0x17d)]('─'[_0x57b1fb(0x148)](0x3c));if(!_0x38c414[_0x57b1fb(0x19f)]){if(!isInteractive())return console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0xbd)](_0x57b1fb(0x1dc)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0x247)](_0x57b1fb(0x14f))),0x1;const _0x396bf6=await confirmKey(_0x57b1fb(0x13d)+_0x15e7a7+'\x27?');if(!_0x396bf6)return console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0x94)](_0x57b1fb(0x1ce))),0x1;}writeFileSync(_0x15e7a7,_0x3ac227,_0x57b1fb(0x15f)),console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0x96)]('✔')+_0x57b1fb(0x8f)+a32_0x10437a[_0x57b1fb(0x276)](_0x15e7a7));}}else{const _0x542fc9=a32_0x5922c1[_0x57b1fb(0xc3)](_0x15e7a7);!existsSync(_0x542fc9)&&mkdirSync(_0x542fc9,{'recursive':!![]}),writeFileSync(_0x15e7a7,_0x3ac227,_0x57b1fb(0x15f)),console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0x96)]('✔')+_0x57b1fb(0x8f)+a32_0x10437a[_0x57b1fb(0x276)](_0x15e7a7));}return saveSessionContext({'parent_segment':_0x35f32c},_0x38c414[_0x57b1fb(0x1bd)]),console[_0x57b1fb(0x17d)](a32_0x10437a[_0x57b1fb(0x96)]('✔')+_0x57b1fb(0x13e)+a32_0x10437a[_0x57b1fb(0x247)](_0x57b1fb(0x160))+'\x20=\x20'+a32_0x10437a['cyan'](_0x35f32c)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x462d84(0xf9)]='segment:parent:push';[a32_0x462d84(0x19c)]=a32_0x462d84(0x1fd);async[a32_0x462d84(0x17f)](_0xb8165d){const _0x1cb010=a32_0x462d84,{options:_0x5d0e11,args:_0x510af6,tdx:_0x275c5d}=_0xb8165d,_0x3052c5=_0x5d0e11,_0x509241=_0x510af6[0x0]||_0x5d0e11[_0x1cb010(0xa2)];if(!_0x509241)return showParentSegmentNotSetError(_0x1cb010(0x225)+_0x1cb010(0xf4)),0x1;const _0x4f6221=resolveYamlFile(_0x509241);if(!existsSync(_0x4f6221))return showFileNotFoundError(_0x4f6221,_0x509241),0x1;_0x3052c5[_0x1cb010(0x19e)]&&(console['error'](_0x1cb010(0x112)+_0x3052c5[_0x1cb010(0xe6)]),console['error'](_0x1cb010(0x245)+_0x4f6221));let _0x104cb1;try{_0x104cb1=readFileSync(_0x4f6221,_0x1cb010(0x15f));}catch(_0x32bdc1){const _0x434be7=_0x32bdc1 instanceof Error?_0x32bdc1['message']:String(_0x32bdc1);return console['error'](_0x1cb010(0x88)+_0x434be7),0x1;}const _0x3ff349=await withSpinner(_0x1cb010(0x1bc),()=>_0x275c5d[_0x1cb010(0x139)][_0x1cb010(0x25a)](_0x104cb1),{'verbose':_0x3052c5[_0x1cb010(0x19e)]}),_0x22d914=_0x3ff349['data'],{isNew:_0x159a13,name:_0x1f5545,hasChanges:_0x3a3de7,diffFormatted:_0x197587}=_0x22d914;if(!_0x3a3de7)return console['error'](_0x1cb010(0x19b)+_0x1f5545+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x159a13?console[_0x1cb010(0x17d)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x1f5545+'\x27:'):console[_0x1cb010(0x17d)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x1f5545+'\x27:');console[_0x1cb010(0x17d)]('─'[_0x1cb010(0x148)](0x3c)),console[_0x1cb010(0x17d)](_0x197587),console[_0x1cb010(0x17d)]('─'['repeat'](0x3c));const _0x510ae6=_0x159a13?_0x1cb010(0xd6)+_0x1f5545+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x1f5545+'\x27?';if(!_0x3052c5[_0x1cb010(0x19f)]){if(!isInteractive())return console['error'](a32_0x10437a[_0x1cb010(0xbd)](_0x1cb010(0x1dc)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1cb010(0x17d)](a32_0x10437a[_0x1cb010(0x247)](_0x1cb010(0x14f))),0x1;const _0x5edbc7=await confirmKey(_0x510ae6);if(!_0x5edbc7)return console[_0x1cb010(0x17d)](a32_0x10437a[_0x1cb010(0x94)](_0x1cb010(0x1ce))),0x1;}const _0x486dfa=_0x159a13?_0x1cb010(0x1e5):_0x1cb010(0x27f),_0x3cd93a=await withSpinner(_0x486dfa+_0x1cb010(0xbc)+_0x1f5545+_0x1cb010(0x183),()=>_0x22d914[_0x1cb010(0x159)](),{'verbose':_0x3052c5[_0x1cb010(0x19e)]}),_0x520562=_0x3cd93a[_0x1cb010(0x12d)],_0x4027cc=getConsoleNextUrl(_0x3052c5[_0x1cb010(0xe6)],_0x1cb010(0x1d1)+_0x520562['id']),_0x176086=_0x159a13?'Created':_0x1cb010(0x169);return console['error']('✔\x20'+_0x176086+_0x1cb010(0xbc)+_0x520562['name']+'\x27'),console[_0x1cb010(0x17d)]('\x20\x20'+_0x4027cc),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x462d84(0xf9)]='segment:parent:validate';[a32_0x462d84(0x19c)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a32_0x462d84(0x17f)](_0x2b4d2c){const _0x50a894=a32_0x462d84,{options:_0x4b495e,args:_0xda2200,tdx:_0x943d5}=_0x2b4d2c,_0x39c1fb=_0x4b495e,_0x5d2aae=_0xda2200[0x0]||_0x4b495e[_0x50a894(0xa2)];if(!_0x5d2aae)return showParentSegmentNotSetError(_0x50a894(0x226)+_0x50a894(0x239)+_0x50a894(0x89)+_0x50a894(0xe3)+_0x50a894(0x13a)+_0x50a894(0x9d)),0x1;const _0x19f698=resolveYamlFile(_0x5d2aae);if(!existsSync(_0x19f698))return showFileNotFoundError(_0x19f698,_0x5d2aae),0x1;_0x39c1fb[_0x50a894(0x19e)]&&(console[_0x50a894(0x17d)](_0x50a894(0x112)+_0x39c1fb[_0x50a894(0xe6)]),console['error'](_0x50a894(0x245)+_0x19f698));let _0x5f3d9d;try{_0x5f3d9d=readFileSync(_0x19f698,_0x50a894(0x15f));}catch(_0x44fa82){const _0x586ed6=_0x44fa82 instanceof Error?_0x44fa82[_0x50a894(0x184)]:String(_0x44fa82);return console['error']('Error\x20reading\x20file:\x20'+_0x586ed6),0x1;}const _0x4d4aa1=createCommandSpinner(a32_0x10437a[_0x50a894(0x247)]('Validating\x20configuration...'),{'verbose':_0x39c1fb['verbose']});_0x4d4aa1['start']();const _0x44ef66={'onProgress':_0x31d04e=>{const _0x59a0a7=_0x50a894;_0x4d4aa1[_0x59a0a7(0xe7)]=formatProgressMessage(_0x31d04e);}};if(_0x39c1fb[_0x50a894(0x109)])_0x44ef66[_0x50a894(0x109)]=!![];if(_0x39c1fb[_0x50a894(0x7c)])_0x44ef66[_0x50a894(0x7c)]=!![];_0x39c1fb[_0x50a894(0xa0)]&&(_0x44ef66[_0x50a894(0xa0)]=_0x39c1fb[_0x50a894(0xa0)]);_0x39c1fb['behavior']&&(_0x44ef66[_0x50a894(0x129)]=_0x39c1fb['behavior']);if(_0x39c1fb[_0x50a894(0x9f)])_0x44ef66['interval']=_0x39c1fb[_0x50a894(0x9f)];let _0x552ee9;try{_0x552ee9=await _0x943d5['segment'][_0x50a894(0x10c)](_0x5f3d9d,_0x44ef66),_0x4d4aa1[_0x50a894(0x26c)]();}catch(_0x2684b9){_0x4d4aa1[_0x50a894(0x26c)]();throw _0x2684b9;}const _0x13a4ed=_0x39c1fb['interval']||_0x50a894(0x201);return this['displayValidateResults'](_0x552ee9,_0x44ef66,_0x19f698,_0x13a4ed),_0x552ee9['allValid']?0x0:0x1;}[a32_0x462d84(0x10f)](_0x3c867b,_0x5b345b,_0x3acb3c,_0x102f21){const _0x2335c1=a32_0x462d84;console['error']('\x0a'+a32_0x10437a[_0x2335c1(0xb5)](_0x2335c1(0x22e))+'\x20'+_0x3c867b['name']),console[_0x2335c1(0x17d)]('═'[_0x2335c1(0x148)](0x3c)),this[_0x2335c1(0xa9)](_0x3c867b);if(typeof _0x5b345b['attribute']===_0x2335c1(0x27d)){this[_0x2335c1(0x191)](_0x3c867b),this['displaySummary'](_0x3c867b),this[_0x2335c1(0xb8)](_0x3acb3c,_0x102f21,_0x2335c1(0xa0),_0x5b345b[_0x2335c1(0xa0)]);return;}if(_0x5b345b[_0x2335c1(0xa0)]===!![]){this['displayAttributesStats'](_0x3c867b),this['displaySummary'](_0x3c867b),this[_0x2335c1(0xb8)](_0x3acb3c,_0x102f21,'attributes');return;}if(typeof _0x5b345b[_0x2335c1(0x129)]==='string'){this[_0x2335c1(0x156)](_0x3c867b,_0x102f21),this['displaySummary'](_0x3c867b),this[_0x2335c1(0xb8)](_0x3acb3c,_0x102f21,_0x2335c1(0x129),_0x5b345b[_0x2335c1(0x129)]);return;}if(_0x5b345b[_0x2335c1(0x129)]===!![]){this[_0x2335c1(0x156)](_0x3c867b,_0x102f21),this[_0x2335c1(0x186)](_0x3c867b),this[_0x2335c1(0xb8)](_0x3acb3c,_0x102f21,_0x2335c1(0xde));return;}this[_0x2335c1(0x191)](_0x3c867b),this['displayBehaviorsStats'](_0x3c867b,_0x102f21),this['displayRealtimeInfo'](_0x3c867b),this['displaySummary'](_0x3c867b),this[_0x2335c1(0xb8)](_0x3acb3c,_0x102f21,_0x2335c1(0x114));}[a32_0x462d84(0x135)](_0x30e2cd){displayRealtimeValidation(_0x30e2cd);}[a32_0x462d84(0xb8)](_0x5d93a4,_0x58c69a,_0x2ba7a4,_0x43b825){const _0x296277=a32_0x462d84;console[_0x296277(0x17d)]('\x0a'+a32_0x10437a['dim'](_0x296277(0x250)));const _0x4c8901=_0x58c69a!==_0x296277(0x201)?_0x296277(0x185)+_0x58c69a:'';if(_0x2ba7a4==='attribute'&&_0x43b825)console[_0x296277(0x17d)]('\x20\x20'+a32_0x10437a['dim'](_0x296277(0x1e7)+_0x5d93a4+'\x20--attribute\x20\x22'+_0x43b825+'\x22'+_0x4c8901));else{if(_0x2ba7a4===_0x296277(0x129)&&_0x43b825)console[_0x296277(0x17d)]('\x20\x20'+a32_0x10437a[_0x296277(0x247)](_0x296277(0x1e7)+_0x5d93a4+_0x296277(0x1b8)+_0x43b825+'\x22'+_0x4c8901));else(_0x2ba7a4==='attributes'||_0x2ba7a4==='all')&&console['error']('\x20\x20'+a32_0x10437a['dim'](_0x296277(0x1e7)+_0x5d93a4+_0x296277(0x155)+_0x4c8901));}(_0x2ba7a4===_0x296277(0xde)||_0x2ba7a4===_0x296277(0x114))&&console[_0x296277(0x17d)]('\x20\x20'+a32_0x10437a[_0x296277(0x247)]('tdx\x20ps\x20preview\x20'+_0x5d93a4+_0x296277(0x1aa)+_0x4c8901)),_0x2ba7a4===_0x296277(0x114)&&console['error']('\x20\x20'+a32_0x10437a[_0x296277(0x247)](_0x296277(0x1e7)+_0x5d93a4+_0x296277(0x10b)+_0x4c8901));}[a32_0x462d84(0xa9)](_0x4d559d){const _0xfbf17e=a32_0x462d84,{master:_0x2f918c}=_0x4d559d,_0x2675c8=_0x2f918c[_0xfbf17e(0x1cf)]?a32_0x10437a[_0xfbf17e(0x96)]('✔'):a32_0x10437a[_0xfbf17e(0xbd)]('✘');console[_0xfbf17e(0x17d)]('\x0a'+a32_0x10437a[_0xfbf17e(0x247)](_0xfbf17e(0x1db))),console['error'](_0x2675c8+'\x20'+a32_0x10437a[_0xfbf17e(0xb5)](_0x2f918c[_0xfbf17e(0x162)]+'.'+_0x2f918c[_0xfbf17e(0x217)])),_0x2f918c[_0xfbf17e(0x1cf)]?_0x2f918c[_0xfbf17e(0x122)]!==undefined&&console[_0xfbf17e(0x17d)]('\x20\x20'+a32_0x10437a['dim']('Rows:')+'\x20'+a32_0x10437a[_0xfbf17e(0x276)](formatRows(_0x2f918c[_0xfbf17e(0x122)]))):console[_0xfbf17e(0x17d)]('\x20\x20'+a32_0x10437a[_0xfbf17e(0xbd)](_0xfbf17e(0x192))+'\x20'+_0x2f918c['schemaError']);}[a32_0x462d84(0x191)](_0x54ab47){const _0xcf16ba=a32_0x462d84;if(_0x54ab47[_0xcf16ba(0x150)][_0xcf16ba(0x7b)]===0x0)return;console['error']('\x0a'+a32_0x10437a[_0xcf16ba(0x247)](_0xcf16ba(0x1ee)));for(const _0x1acbbb of _0x54ab47[_0xcf16ba(0x150)]){const _0x3b0765=_0x1acbbb['schemaValid']?a32_0x10437a[_0xcf16ba(0x96)]('✔'):a32_0x10437a['red']('✘');let _0x4e7ba0='';if(_0x1acbbb[_0xcf16ba(0x1cf)]&&_0x1acbbb[_0xcf16ba(0xf1)]!==undefined&&_0x1acbbb['coveragePercent']!==undefined){const _0x113f53=_0x1acbbb['coveragePercent'][_0xcf16ba(0xa8)](0x1),_0x549f44=_0x1acbbb[_0xcf16ba(0x11e)]>=0x50?a32_0x10437a[_0xcf16ba(0x96)]:_0x1acbbb['coveragePercent']>=0x32?a32_0x10437a[_0xcf16ba(0x94)]:a32_0x10437a[_0xcf16ba(0xbd)];_0x4e7ba0='\x20'+a32_0x10437a[_0xcf16ba(0x247)](_0xcf16ba(0x190))+'\x20'+_0x549f44(_0x113f53+'%')+'\x20('+formatRows(_0x1acbbb[_0xcf16ba(0xf1)])+'\x20rows)';}console[_0xcf16ba(0x17d)](_0x3b0765+'\x20'+a32_0x10437a[_0xcf16ba(0xb5)](_0x1acbbb[_0xcf16ba(0xf9)])+_0x4e7ba0),console['error']('\x20\x20'+a32_0x10437a[_0xcf16ba(0x247)](_0xcf16ba(0x1d6))+'\x20'+a32_0x10437a[_0xcf16ba(0xb5)](_0x1acbbb[_0xcf16ba(0x162)]+'.'+_0x1acbbb['table']));const _0x366854=_0x1acbbb['joinKey']===_0x1acbbb[_0xcf16ba(0x210)]?a32_0x10437a['dim'](_0xcf16ba(0x1bf))+'\x20'+_0x1acbbb[_0xcf16ba(0x107)]:a32_0x10437a[_0xcf16ba(0x247)](_0xcf16ba(0x118))+'\x20'+_0x1acbbb[_0xcf16ba(0x107)]+_0xcf16ba(0x230)+_0x1acbbb['foreignKey'];console[_0xcf16ba(0x17d)]('\x20\x20'+_0x366854),console[_0xcf16ba(0x17d)]('\x20\x20'+a32_0x10437a[_0xcf16ba(0x247)](_0xcf16ba(0x25f))),this['displayColumns'](_0x1acbbb[_0xcf16ba(0x254)]),!_0x1acbbb[_0xcf16ba(0x1cf)]&&console[_0xcf16ba(0x17d)]('\x20\x20'+a32_0x10437a[_0xcf16ba(0xbd)]('Error:')+'\x20'+_0x1acbbb[_0xcf16ba(0xbf)]);}}[a32_0x462d84(0x156)](_0x598127,_0xd5cd7e){const _0x5110bb=a32_0x462d84;if(_0x598127[_0x5110bb(0xde)][_0x5110bb(0x7b)]===0x0)return;console[_0x5110bb(0x17d)]('\x0a'+a32_0x10437a['dim'](_0x5110bb(0xcc))+'\x20'+a32_0x10437a[_0x5110bb(0x247)]('('+_0xd5cd7e+')'));for(const _0x341e29 of _0x598127[_0x5110bb(0xde)]){const _0x2bb613=_0x341e29[_0x5110bb(0x1cf)]?a32_0x10437a[_0x5110bb(0x96)]('✔'):a32_0x10437a[_0x5110bb(0xbd)]('✘');let _0x459a78='';if(_0x341e29['schemaValid']&&_0x341e29['customersWithEvents']!==undefined&&_0x341e29[_0x5110bb(0x24b)]!==undefined){const _0x3819be=_0x341e29[_0x5110bb(0x1c7)]?.['toFixed'](0x1)||'?',_0x12cd48=(_0x341e29['customerPercent']??0x0)>=0x32?a32_0x10437a[_0x5110bb(0x96)]:(_0x341e29[_0x5110bb(0x1c7)]??0x0)>=0x14?a32_0x10437a[_0x5110bb(0x94)]:a32_0x10437a[_0x5110bb(0xbd)];_0x459a78='\x20'+a32_0x10437a['dim'](_0x5110bb(0x268))+'\x20'+_0x12cd48(formatRows(_0x341e29['customersWithEvents']))+'\x20('+_0x3819be+_0x5110bb(0x84)+a32_0x10437a[_0x5110bb(0x247)](_0x5110bb(0x81))+'\x20'+a32_0x10437a[_0x5110bb(0x276)](formatRows(_0x341e29[_0x5110bb(0x24b)]));}console[_0x5110bb(0x17d)](_0x2bb613+'\x20'+a32_0x10437a[_0x5110bb(0xb5)](_0x341e29['name'])+_0x459a78),console[_0x5110bb(0x17d)]('\x20\x20'+a32_0x10437a[_0x5110bb(0x247)](_0x5110bb(0x1d6))+'\x20'+a32_0x10437a[_0x5110bb(0xb5)](_0x341e29[_0x5110bb(0x162)]+'.'+_0x341e29['table']));const _0x226ca8=_0x341e29['joinKey']===_0x341e29['foreignKey']?a32_0x10437a['dim'](_0x5110bb(0x1bf))+'\x20'+_0x341e29[_0x5110bb(0x107)]:a32_0x10437a['dim'](_0x5110bb(0x118))+'\x20'+_0x341e29[_0x5110bb(0x107)]+_0x5110bb(0x230)+_0x341e29[_0x5110bb(0x210)];console[_0x5110bb(0x17d)]('\x20\x20'+_0x226ca8),console['error']('\x20\x20'+a32_0x10437a['dim'](_0x5110bb(0x25f))),this[_0x5110bb(0x175)](_0x341e29[_0x5110bb(0x254)]),!_0x341e29[_0x5110bb(0x1cf)]&&console[_0x5110bb(0x17d)]('\x20\x20'+a32_0x10437a['red'](_0x5110bb(0x192))+'\x20'+_0x341e29[_0x5110bb(0xbf)]);}}['displayColumns'](_0x270f1e){const _0x4a0938=a32_0x462d84;for(const _0x17b771 of _0x270f1e){_0x17b771[_0x4a0938(0x9b)]===_0x17b771[_0x4a0938(0x181)]||_0x17b771[_0x4a0938(0x181)]==='*'?console[_0x4a0938(0x17d)](_0x4a0938(0xe4)+_0x17b771['label']):console[_0x4a0938(0x17d)]('\x20\x20\x20\x20-\x20'+_0x17b771[_0x4a0938(0x9b)]+'\x20'+a32_0x10437a[_0x4a0938(0x247)]('('+_0x17b771[_0x4a0938(0x181)]+')'));}}[a32_0x462d84(0x186)](_0x506d9c){const _0x353ab2=a32_0x462d84;console['error']('─'['repeat'](0x3c));if(_0x506d9c[_0x353ab2(0x25e)][_0x353ab2(0x7b)]>0x0){console[_0x353ab2(0x17d)]('\x0a'+a32_0x10437a[_0x353ab2(0xbd)](_0x353ab2(0xba)));for(const _0x52f1ec of _0x506d9c['errors']){console[_0x353ab2(0x17d)]('\x20\x20'+a32_0x10437a[_0x353ab2(0xbd)]('•')+'\x20'+_0x52f1ec);}}_0x506d9c['allValid']&&console[_0x353ab2(0x17d)]('\x0a'+a32_0x10437a[_0x353ab2(0x96)]('✔')+_0x353ab2(0x20d));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x462d84(0xf9)]='segment:parent:preview';['description']=a32_0x462d84(0x252);async['execute'](_0x573e4b){const _0x43a9f9=a32_0x462d84,{options:_0x2e1031,args:_0x45e093,tdx:_0x34931c}=_0x573e4b,_0x59e2d1=_0x2e1031,_0x1c54c2=_0x45e093[0x0]||_0x2e1031[_0x43a9f9(0xa2)];if(!_0x1c54c2)return showParentSegmentNotSetError(_0x43a9f9(0x1f5)+_0x43a9f9(0x168)+'Options\x20(one\x20required):\x0a'+_0x43a9f9(0x1e8)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+_0x43a9f9(0x219)+_0x43a9f9(0x9d)),0x1;if(!_0x59e2d1[_0x43a9f9(0x109)]&&!_0x59e2d1[_0x43a9f9(0xa0)]&&!_0x59e2d1[_0x43a9f9(0x129)]&&!_0x59e2d1[_0x43a9f9(0x7c)])return console['error'](a32_0x10437a['red'](_0x43a9f9(0x151))),console[_0x43a9f9(0x17d)](_0x43a9f9(0x203)),console[_0x43a9f9(0x17d)]('Options:'),console[_0x43a9f9(0x17d)](_0x43a9f9(0x182)),console[_0x43a9f9(0x17d)]('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console['error'](_0x43a9f9(0x16c)),console[_0x43a9f9(0x17d)](_0x43a9f9(0x1a7)),0x1;const _0x17d01a=resolveYamlFile(_0x1c54c2);if(!existsSync(_0x17d01a))return showFileNotFoundError(_0x17d01a,_0x1c54c2),0x1;_0x59e2d1[_0x43a9f9(0x19e)]&&(console[_0x43a9f9(0x17d)]('Site:\x20'+_0x59e2d1[_0x43a9f9(0xe6)]),console[_0x43a9f9(0x17d)](_0x43a9f9(0x245)+_0x17d01a));let _0x13f38f;try{_0x13f38f=readFileSync(_0x17d01a,_0x43a9f9(0x15f));}catch(_0x3f8bb1){const _0xeb3c8f=_0x3f8bb1 instanceof Error?_0x3f8bb1[_0x43a9f9(0x184)]:String(_0x3f8bb1);return console['error']('Error\x20reading\x20file:\x20'+_0xeb3c8f),0x1;}let _0x3a7ac7;try{_0x3a7ac7=parseDef(_0x13f38f);}catch(_0x60261c){const _0xf11923=_0x60261c instanceof Error?_0x60261c[_0x43a9f9(0x184)]:String(_0x60261c);return console[_0x43a9f9(0x17d)](a32_0x10437a['red'](_0x43a9f9(0xb0)+_0xf11923)),0x1;}if(_0x59e2d1['attribute']===!![]||_0x59e2d1[_0x43a9f9(0xa0)]===''){const _0x5d9b57=_0x3a7ac7[_0x43a9f9(0x150)]?.['map'](_0x5b1903=>_0x5b1903[_0x43a9f9(0xf9)])||[];if(_0x5d9b57[_0x43a9f9(0x7b)]===0x0)console[_0x43a9f9(0x17d)](a32_0x10437a[_0x43a9f9(0xbd)](_0x43a9f9(0x224)));else{console[_0x43a9f9(0x17d)](a32_0x10437a[_0x43a9f9(0xbd)]('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x43a9f9(0x17d)]('Available\x20attributes:');for(const _0x41db51 of _0x5d9b57){console[_0x43a9f9(0x17d)]('\x20\x20'+a32_0x10437a[_0x43a9f9(0x276)](_0x41db51));}console[_0x43a9f9(0x17d)](_0x43a9f9(0x193)+_0x1c54c2+'\x20--attribute\x20\x22'+_0x5d9b57[0x0]+'\x22');}return 0x1;}if(_0x59e2d1[_0x43a9f9(0x129)]===!![]||_0x59e2d1[_0x43a9f9(0x129)]===''){const _0x73d40=_0x3a7ac7[_0x43a9f9(0xde)]?.[_0x43a9f9(0xa5)](_0x1b67d8=>_0x1b67d8[_0x43a9f9(0xf9)])||[];if(_0x73d40[_0x43a9f9(0x7b)]===0x0)console['error'](a32_0x10437a['red'](_0x43a9f9(0x145)));else{console[_0x43a9f9(0x17d)](a32_0x10437a['red']('Error:\x20--behavior\x20requires\x20a\x20name\x0a')),console[_0x43a9f9(0x17d)](_0x43a9f9(0xdb));for(const _0x323eca of _0x73d40){console[_0x43a9f9(0x17d)]('\x20\x20'+a32_0x10437a[_0x43a9f9(0x276)](_0x323eca));}console[_0x43a9f9(0x17d)](_0x43a9f9(0x193)+_0x1c54c2+_0x43a9f9(0x1b8)+_0x73d40[0x0]+'\x22');}return 0x1;}const _0x209d09=createCommandSpinner(a32_0x10437a[_0x43a9f9(0x247)](_0x43a9f9(0x256)),{'verbose':_0x59e2d1[_0x43a9f9(0x19e)]});_0x209d09[_0x43a9f9(0x1c9)]();const _0x56f334={'onProgress':_0x6210bb=>{_0x209d09['text']=formatProgressMessage(_0x6210bb);}};if(_0x59e2d1[_0x43a9f9(0x109)])_0x56f334['master']=!![];if(_0x59e2d1[_0x43a9f9(0xa0)]&&typeof _0x59e2d1[_0x43a9f9(0xa0)]===_0x43a9f9(0x27d))_0x56f334['attribute']=_0x59e2d1[_0x43a9f9(0xa0)];if(_0x59e2d1[_0x43a9f9(0x129)]&&typeof _0x59e2d1[_0x43a9f9(0x129)]===_0x43a9f9(0x27d))_0x56f334[_0x43a9f9(0x129)]=_0x59e2d1[_0x43a9f9(0x129)];if(_0x59e2d1[_0x43a9f9(0x7c)])_0x56f334[_0x43a9f9(0x7c)]=!![];if(_0x59e2d1[_0x43a9f9(0x9f)])_0x56f334[_0x43a9f9(0x9f)]=_0x59e2d1['interval'];let _0x200724;try{_0x200724=await _0x34931c[_0x43a9f9(0x139)][_0x43a9f9(0x9a)](_0x13f38f,_0x56f334),_0x209d09[_0x43a9f9(0x26c)]();}catch(_0x4aaf87){_0x209d09[_0x43a9f9(0x26c)]();throw _0x4aaf87;}return await this['displayPreviewResults'](_0x200724,{'master':_0x59e2d1[_0x43a9f9(0x109)],'attribute':typeof _0x59e2d1[_0x43a9f9(0xa0)]==='string'?_0x59e2d1[_0x43a9f9(0xa0)]:undefined,'behavior':typeof _0x59e2d1['behavior']===_0x43a9f9(0x27d)?_0x59e2d1[_0x43a9f9(0x129)]:undefined,'enriched':_0x59e2d1[_0x43a9f9(0x7c)]}),_0x200724[_0x43a9f9(0x241)]?0x0:0x1;}async['displayPreviewResults'](_0x496d56,_0x109fc0){const _0x13ee92=a32_0x462d84;console[_0x13ee92(0x17d)]('\x0a'+a32_0x10437a['bold'](_0x13ee92(0x279))+'\x20'+_0x496d56['name']),console[_0x13ee92(0x17d)]('═'[_0x13ee92(0x148)](0x3c));if(_0x109fc0[_0x13ee92(0x109)]&&_0x496d56[_0x13ee92(0x106)]){const _0x2ad5d1=a32_0x10437a[_0x13ee92(0x247)](_0x13ee92(0x1e4))+'\x20'+a32_0x10437a['bold'](_0x496d56[_0x13ee92(0x109)][_0x13ee92(0x162)]+'.'+_0x496d56[_0x13ee92(0x109)][_0x13ee92(0x217)]);await this[_0x13ee92(0x1ad)](_0x2ad5d1,_0x496d56[_0x13ee92(0x106)]);}else{if(_0x109fc0['attribute']&&_0x496d56[_0x13ee92(0x106)]){const _0x5f4669=a32_0x10437a[_0x13ee92(0x247)](_0x13ee92(0x187))+'\x20'+a32_0x10437a['bold'](_0x109fc0[_0x13ee92(0xa0)]);await this[_0x13ee92(0x1ad)](_0x5f4669,_0x496d56[_0x13ee92(0x106)]);}else{if(_0x109fc0['behavior']&&_0x496d56['sampleData']){const _0x3b897e=a32_0x10437a[_0x13ee92(0x247)](_0x13ee92(0x233))+'\x20'+a32_0x10437a['bold'](_0x109fc0['behavior']);await this[_0x13ee92(0x1ad)](_0x3b897e,_0x496d56[_0x13ee92(0x106)]);}else{if(_0x109fc0[_0x13ee92(0x7c)]&&_0x496d56[_0x13ee92(0x106)]){const _0x47764e=a32_0x10437a[_0x13ee92(0x247)](_0x13ee92(0x111))+'\x20'+a32_0x10437a['bold']('Master\x20+\x20Attributes');await this[_0x13ee92(0x1ad)](_0x47764e,_0x496d56[_0x13ee92(0x106)]);}else!_0x496d56[_0x13ee92(0x106)]&&console[_0x13ee92(0x17d)](_0x13ee92(0x278));}}}if(_0x496d56[_0x13ee92(0x25e)]['length']>0x0){console[_0x13ee92(0x17d)]('─'[_0x13ee92(0x148)](0x3c)),console[_0x13ee92(0x17d)]('\x0a'+a32_0x10437a[_0x13ee92(0xbd)](_0x13ee92(0xba)));for(const _0x3a120b of _0x496d56[_0x13ee92(0x25e)]){console[_0x13ee92(0x17d)]('\x20\x20'+a32_0x10437a['red']('•')+'\x20'+_0x3a120b);}}}async[a32_0x462d84(0x1ad)](_0x1da286,_0x114978){const _0x37ebd5=a32_0x462d84;if(_0x114978[_0x37ebd5(0x7b)]===0x0){console[_0x37ebd5(0x17d)]('\x0a'+_0x1da286),console[_0x37ebd5(0x17d)](_0x37ebd5(0x164));return;}console[_0x37ebd5(0x17d)]('\x0a'+_0x1da286);const _0x10af58=Object['keys'](_0x114978[0x0])[_0x37ebd5(0xa5)](_0xbdccd6=>({'name':_0xbdccd6,'type':typeof _0x114978[0x0][_0xbdccd6]===_0x37ebd5(0x21f)?_0x37ebd5(0x22d):_0x37ebd5(0x115)})),_0x481fc4={'queryId':'preview','columns':_0x10af58,'data':_0x114978,'stats':{'state':_0x37ebd5(0x23e),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x114978[_0x37ebd5(0x7b)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x7bc03e=formatAsTable(_0x481fc4,_0x114978[_0x37ebd5(0x7b)],!![]);await writeOutput(_0x7bc03e,undefined,_0x37ebd5(0x217));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']=a32_0x462d84(0x133);[a32_0x462d84(0x19c)]=a32_0x462d84(0x277);async[a32_0x462d84(0x17f)](_0x546f31){const _0x5cd1cf=a32_0x462d84,{options:_0x50b70a,args:_0x3b3d65,tdx:_0x38f517}=_0x546f31,_0x181978=_0x50b70a,_0x3b26e1=_0x3b3d65[0x0]||_0x50b70a['parentSegment'];if(!_0x3b26e1)return showParentSegmentNotSetError(_0x5cd1cf(0xc4)+_0x5cd1cf(0x1b9)),0x1;const _0x529f4a=resolveYamlFile(_0x3b26e1);if(existsSync(_0x529f4a)){_0x181978['verbose']&&console[_0x5cd1cf(0x17d)](_0x5cd1cf(0x6f)+_0x529f4a);let _0x445da8;try{_0x445da8=readFileSync(_0x529f4a,_0x5cd1cf(0x15f));}catch(_0x1cc8a4){const _0x3d1598=_0x1cc8a4 instanceof Error?_0x1cc8a4['message']:String(_0x1cc8a4);return console[_0x5cd1cf(0x17d)]('Error\x20reading\x20file:\x20'+_0x3d1598),0x1;}const _0x146369=await withSpinner(_0x5cd1cf(0x1bc),()=>_0x38f517['segment'][_0x5cd1cf(0x25a)](_0x445da8),{'verbose':_0x181978['verbose']}),_0x4d7561=_0x146369[_0x5cd1cf(0x12d)],{isNew:_0xef5381,name:_0x4246fd,hasChanges:_0x2b6b10,diffFormatted:_0x53a394}=_0x4d7561;if(_0x2b6b10){_0xef5381?console[_0x5cd1cf(0x17d)](_0x5cd1cf(0x1ec)+_0x4246fd+'\x27:'):console[_0x5cd1cf(0x17d)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x4246fd+'\x27:');console['error']('─'['repeat'](0x3c)),console[_0x5cd1cf(0x17d)](_0x53a394),console[_0x5cd1cf(0x17d)]('─'[_0x5cd1cf(0x148)](0x3c));const _0x3d3d45=_0xef5381?_0x5cd1cf(0xd6)+_0x4246fd+_0x5cd1cf(0x73):_0x5cd1cf(0x220)+_0x4246fd+_0x5cd1cf(0x73);if(!_0x181978['yes']){if(!isInteractive())return console['error'](a32_0x10437a[_0x5cd1cf(0xbd)](_0x5cd1cf(0x1dc)),_0x5cd1cf(0x1c6)),console[_0x5cd1cf(0x17d)](a32_0x10437a[_0x5cd1cf(0x247)](_0x5cd1cf(0x14f))),0x1;const _0x3eae80=await confirmKey(_0x3d3d45);if(!_0x3eae80)return console[_0x5cd1cf(0x17d)](a32_0x10437a['yellow'](_0x5cd1cf(0x1ce))),0x1;}const _0x4a3e61=_0xef5381?_0x5cd1cf(0x1e5):_0x5cd1cf(0x27f);await withSpinner(_0x4a3e61+_0x5cd1cf(0xbc)+_0x4246fd+_0x5cd1cf(0x183),()=>_0x4d7561['apply'](),{'verbose':_0x181978[_0x5cd1cf(0x19e)]});const _0x384173=_0xef5381?_0x5cd1cf(0xbb):_0x5cd1cf(0x169);console[_0x5cd1cf(0x17d)]('✔\x20'+_0x384173+'\x20parent\x20segment\x20\x27'+_0x4246fd+'\x27');}else console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x4246fd+_0x5cd1cf(0xd5));}const _0x42ebe2=await withSpinner('Running\x20parent\x20segment\x20workflow\x20for\x20\x27'+_0x3b26e1+'\x27...',()=>_0x38f517[_0x5cd1cf(0x139)][_0x5cd1cf(0xc1)](_0x3b26e1),{'verbose':_0x181978[_0x5cd1cf(0x19e)]}),_0x38bb5b=_0x42ebe2['data'],_0x242325=getConsoleUrl(_0x181978[_0x5cd1cf(0xe6)],_0x5cd1cf(0x272)+_0x38bb5b[_0x5cd1cf(0x78)]+'/sessions/'+_0x38bb5b[_0x5cd1cf(0xc2)]+_0x5cd1cf(0x1f8)+_0x38bb5b[_0x5cd1cf(0x1e1)]);return console[_0x5cd1cf(0x17d)](_0x5cd1cf(0x17e)),console['error']('\x20\x20'+a32_0x10437a[_0x5cd1cf(0x247)](_0x5cd1cf(0x27e))+'\x20'+_0x38bb5b['audienceId']),console['error']('\x20\x20'+a32_0x10437a[_0x5cd1cf(0x247)]('Status:')+'\x20'+_0x38bb5b['status']),console[_0x5cd1cf(0x17d)]('\x20\x20'+a32_0x10437a[_0x5cd1cf(0x247)](_0x5cd1cf(0x11c))+'\x20'+_0x38bb5b[_0x5cd1cf(0xc2)]),console[_0x5cd1cf(0x17d)]('\x20\x20'+a32_0x10437a['dim'](_0x5cd1cf(0xe0))+'\x20'+_0x38bb5b['workflowAttemptId']),console[_0x5cd1cf(0x17d)]('\x20\x20'+_0x242325),console[_0x5cd1cf(0x17d)]('\x0a'+a32_0x10437a[_0x5cd1cf(0x247)](_0x5cd1cf(0x90))+_0x5cd1cf(0xf3)+_0x38bb5b[_0x5cd1cf(0x1e1)]+_0x5cd1cf(0xd7)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0xe9);['description']='List\x20available\x20fields\x20for\x20segmentation';async[a32_0x462d84(0x17f)](_0x422882){const _0x3aae53=a32_0x462d84,{options:_0x202426,args:_0x1b6c52,tdx:_0x4c9012}=_0x422882,_0x1ba0b0=_0x1b6c52[0x0]||_0x202426[_0x3aae53(0xa2)];if(!_0x1ba0b0)return showParentSegmentNotSetError(_0x3aae53(0x158)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x202426[_0x3aae53(0x19e)]&&(console[_0x3aae53(0x17d)](_0x3aae53(0x112)+_0x202426[_0x3aae53(0xe6)]),console['error'](_0x3aae53(0x261)+_0x1ba0b0));const _0x234aca=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x1ba0b0+_0x3aae53(0x183),()=>_0x4c9012[_0x3aae53(0x139)][_0x3aae53(0x1cc)](_0x1ba0b0),{'verbose':_0x202426[_0x3aae53(0x19e)]}),_0x3b14a1=_0x234aca['data'];console[_0x3aae53(0x17d)](_0x3aae53(0x105)+_0x3b14a1[_0x3aae53(0x7b)]+_0x3aae53(0xdd)+(_0x3b14a1[_0x3aae53(0x7b)]!==0x1?'s':''));if(_0x202426['json']||_0x202426[_0x3aae53(0x262)])return await handleSDKOutput(_0x3b14a1,_0x202426),0x0;return displayFieldsHumanReadable(_0x3b14a1,_0x1ba0b0),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x1a3);['description']=a32_0x462d84(0xb4);async['execute'](_0x1ea0af){const _0xe186d8=a32_0x462d84,{options:_0x219232,args:_0x143c8c,tdx:_0x4bc193}=_0x1ea0af,_0x219d91=_0x219232,_0x5a4b02=_0x143c8c[0x0]||_0x219232['parentSegment'];if(!_0x5a4b02)return showParentSegmentNotSetError(_0xe186d8(0x171)+_0xe186d8(0x1b1)+_0xe186d8(0x89)+_0xe186d8(0x7f)),0x1;_0x219232[_0xe186d8(0x19e)]&&(console[_0xe186d8(0x17d)]('Site:\x20'+_0x219232[_0xe186d8(0xe6)]),console[_0xe186d8(0x17d)](_0xe186d8(0x261)+_0x5a4b02));const _0x2d6415=await withSpinner(_0xe186d8(0x125)+_0x5a4b02+_0xe186d8(0x183),()=>_0x4bc193[_0xe186d8(0x139)][_0xe186d8(0x123)](_0x5a4b02),{'verbose':_0x219232[_0xe186d8(0x19e)]}),_0x18b5fa=_0x2d6415[_0xe186d8(0x12d)];if(_0x219d91[_0xe186d8(0x197)]){const _0x2c262c=getConsoleNextUrl(_0x219d91['site'],_0xe186d8(0x1d1)+_0x18b5fa['id']);return console[_0xe186d8(0x17d)](a32_0x10437a['green']('✔')+_0xe186d8(0x1e9)+a32_0x10437a[_0xe186d8(0x276)](_0x2c262c)),openBrowser(_0x2c262c),0x0;}return await handleSingleObjectOutput(_0x18b5fa,_0x219232),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0xdf);[a32_0x462d84(0x19c)]=a32_0x462d84(0x11d);async['execute'](_0x3f4e71){const _0x477863=a32_0x462d84,{options:_0x4917d0,args:_0x15e5c0,tdx:_0x1a663e}=_0x3f4e71,_0x236254=_0x4917d0,_0x4a4fd2=_0x15e5c0[0x0]||_0x4917d0[_0x477863(0xa2)];if(!_0x4a4fd2)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a'+_0x477863(0x89)+_0x477863(0x79)),0x1;_0x4917d0['verbose']&&(console[_0x477863(0x17d)](_0x477863(0x112)+_0x4917d0['site']),console[_0x477863(0x17d)](_0x477863(0x261)+_0x4a4fd2));const _0x7ad158=await withSpinner(_0x477863(0x255)+_0x4a4fd2+_0x477863(0x183),()=>_0x1a663e['segment'][_0x477863(0xe2)](_0x4a4fd2),{'verbose':_0x4917d0[_0x477863(0x19e)]}),_0x4018e2=_0x7ad158[_0x477863(0x12d)],_0x536ffe=_0x1a663e[_0x477863(0x139)][_0x477863(0x21a)](_0x4018e2);if(_0x236254['output']){const _0x45a07f=await this['collectSchema'](_0x3f4e71,_0x4a4fd2,_0x4018e2,_0x536ffe),_0x252cb0=this[_0x477863(0x85)](_0x45a07f);writeFileSync(_0x236254[_0x477863(0x234)],_0x252cb0);const _0xf2aa8=_0x45a07f[_0x477863(0x1c4)][_0x477863(0x254)][_0x477863(0x7b)]+_0x45a07f[_0x477863(0xde)][_0x477863(0x134)]((_0x9734d9,_0x50b639)=>_0x9734d9+_0x50b639['columns'][_0x477863(0x7b)],0x0),_0x293f0b=_0x45a07f[_0x477863(0xde)]['filter'](_0x4ce3f2=>_0x4ce3f2[_0x477863(0x254)][_0x477863(0x7b)]===0x0)['length'];return console['log'](_0x477863(0x21d)+_0x236254[_0x477863(0x234)]),console[_0x477863(0x195)](_0x477863(0x97)+_0x536ffe),console[_0x477863(0x195)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x45a07f['behaviors'][_0x477863(0x7b)]+_0x477863(0x18f)),console[_0x477863(0x195)](_0x477863(0x1d4)+_0xf2aa8+_0x477863(0x1e6)),_0x293f0b>0x0&&console['log']('\x20\x20Note:\x20'+_0x293f0b+_0x477863(0xf6)),0x0;}console[_0x477863(0x17d)]('\x0a'+a32_0x10437a['bold']('Output\x20Database:')+'\x20'+a32_0x10437a[_0x477863(0x276)](_0x536ffe));const _0x38796e=await withSpinner(_0x477863(0xfe),()=>_0x1a663e[_0x477863(0x139)]['getParentSQL'](_0x4018e2),{'verbose':_0x4917d0[_0x477863(0x19e)]});console[_0x477863(0x17d)]('\x0a'+a32_0x10437a[_0x477863(0xb5)]('customers')+'\x20'+a32_0x10437a[_0x477863(0x247)]('('+_0x536ffe+_0x477863(0x1cb)));const _0x347156=await executeSchemaQuery(_0x38796e[_0x477863(0x12d)],_0x1a663e,_0x4917d0);await handleQueryOutput(_0x347156,_0x4917d0);const _0x5ae67b=await withSpinner(_0x477863(0x257),()=>_0x1a663e['segment'][_0x477863(0x236)](_0x4018e2),{'verbose':_0x4917d0[_0x477863(0x19e)]});for(const _0x4818db of _0x5ae67b['data']){const _0x59557c=_0x477863(0x70)+_0x4818db['toLowerCase']()[_0x477863(0x228)](/\s+/g,'_'),_0x18382a=_0x477863(0x77)+_0x536ffe+'.'+_0x59557c;console['error']('\x0a'+a32_0x10437a[_0x477863(0xb5)](_0x4818db)+'\x20'+a32_0x10437a[_0x477863(0x247)]('('+_0x536ffe+'.'+_0x59557c+')'));try{const _0x7f1160=await executeSchemaQuery(_0x18382a,_0x1a663e,_0x4917d0);await handleQueryOutput(_0x7f1160,_0x4917d0);}catch{console[_0x477863(0x17d)](a32_0x10437a[_0x477863(0x94)](_0x477863(0x99)));}}return 0x0;}async['collectSchema'](_0x5a9c12,_0x1b6270,_0x447faa,_0x342f76){const _0x1a6ce7=a32_0x462d84,{options:_0x280b2b,tdx:_0x406c3f}=_0x5a9c12,_0x223412=await withSpinner(_0x1a6ce7(0xfe),()=>_0x406c3f[_0x1a6ce7(0x139)][_0x1a6ce7(0x11b)](_0x447faa),{'verbose':_0x280b2b['verbose']}),_0x12ac84=await executeSchemaQuery(_0x223412[_0x1a6ce7(0x12d)],_0x406c3f,_0x280b2b),_0x22a90e=_0x12ac84[_0x1a6ce7(0x12d)][_0x1a6ce7(0xa5)](_0x2d5f7b=>({'name':_0x2d5f7b['column_name'],'type':_0x2d5f7b[_0x1a6ce7(0x23c)]})),_0x32a961=await withSpinner(_0x1a6ce7(0x257),()=>_0x406c3f[_0x1a6ce7(0x139)][_0x1a6ce7(0x236)](_0x447faa),{'verbose':_0x280b2b[_0x1a6ce7(0x19e)]}),_0x32e84e=[];for(const _0x26021a of _0x32a961[_0x1a6ce7(0x12d)]){const _0x519eb5=_0x1a6ce7(0x70)+_0x26021a[_0x1a6ce7(0x263)]()['replace'](/\s+/g,'_'),_0x27dc95=_0x1a6ce7(0x77)+_0x342f76+'.'+_0x519eb5;let _0x2c8ffe=[];try{const _0x2712fe=await executeSchemaQuery(_0x27dc95,_0x406c3f,_0x280b2b);_0x2c8ffe=_0x2712fe['data'][_0x1a6ce7(0xa5)](_0x3970b8=>({'name':_0x3970b8['column_name'],'type':_0x3970b8[_0x1a6ce7(0x23c)]}));}catch{}_0x32e84e['push']({'table':_0x519eb5,'columns':_0x2c8ffe});}return{'database':_0x342f76,'parent_segment':_0x1b6270,'parent_id':_0x447faa,'customers':{'table':_0x1a6ce7(0x1c4),'columns':_0x22a90e},'behaviors':_0x32e84e};}['formatSchemaJson'](_0x10ab0e){const _0x33d83d=a32_0x462d84,_0x3476a3=_0x973eaf=>{const _0xae3cb7=a32_0x266e;if(_0x973eaf['length']===0x0)return'[]';const _0x802a90=_0x973eaf[_0xae3cb7(0xa5)](_0x5bf094=>'\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22'+_0x5bf094['name']+_0xae3cb7(0x15c)+_0x5bf094['type']+_0xae3cb7(0x1af));return'[\x0a'+_0x802a90['join'](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x7cb210=_0x10ab0e[_0x33d83d(0xde)]['map'](_0x4a28af=>{const _0x285540=_0x33d83d;return _0x285540(0xb9)+_0x4a28af[_0x285540(0x217)]+_0x285540(0x1fb)+_0x3476a3(_0x4a28af[_0x285540(0x254)])[_0x285540(0x228)](/^/gm,'\x20\x20')[_0x285540(0xd1)]()+'\x0a\x20\x20\x20\x20}';})[_0x33d83d(0x1bb)](',\x0a');return _0x33d83d(0x7a)+_0x10ab0e[_0x33d83d(0x162)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x10ab0e[_0x33d83d(0x160)]+_0x33d83d(0xd0)+_0x10ab0e[_0x33d83d(0x1c1)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x10ab0e[_0x33d83d(0x1c4)][_0x33d83d(0x217)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x3476a3(_0x10ab0e[_0x33d83d(0x1c4)][_0x33d83d(0x254)])[_0x33d83d(0x228)](/^/gm,'\x20\x20')[_0x33d83d(0xd1)]()+_0x33d83d(0x80)+_0x7cb210+_0x33d83d(0x1f2);}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x26e);[a32_0x462d84(0x19c)]=a32_0x462d84(0x265);async[a32_0x462d84(0x17f)](_0x575414){const _0xadf2b9=a32_0x462d84,{options:_0x4aa086,args:_0x153e8c,tdx:_0x178ea0}=_0x575414,_0xe50ed1=_0x153e8c[0x0]||_0x4aa086[_0xadf2b9(0xa2)];if(!_0xe50ed1)return showParentSegmentNotSetError(_0xadf2b9(0x16d)+_0xadf2b9(0x1df)),0x1;_0x4aa086['verbose']&&(console['error']('Site:\x20'+_0x4aa086[_0xadf2b9(0xe6)]),console[_0xadf2b9(0x17d)](_0xadf2b9(0x261)+_0xe50ed1));const _0xc46e0c=await withSpinner(_0xadf2b9(0x255)+_0xe50ed1+_0xadf2b9(0x183),()=>_0x178ea0[_0xadf2b9(0x139)][_0xadf2b9(0xe2)](_0xe50ed1),{'verbose':_0x4aa086[_0xadf2b9(0x19e)]}),_0x45098a=_0xc46e0c[_0xadf2b9(0x12d)],_0xa05a71=await withSpinner(_0xadf2b9(0x1f1)+_0xe50ed1+'\x27...',()=>_0x178ea0[_0xadf2b9(0x139)][_0xadf2b9(0x11b)](_0x45098a),{'verbose':_0x4aa086[_0xadf2b9(0x19e)]}),_0x3ca842=_0xa05a71[_0xadf2b9(0x12d)];return _0x4aa086[_0xadf2b9(0x128)]==='json'||_0x4aa086['format']==='jsonl'?await handleSDKOutput([{'sql':_0x3ca842}],_0x4aa086):console[_0xadf2b9(0x195)](_0x3ca842),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a32_0x462d84(0x108);[a32_0x462d84(0x19c)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a32_0x462d84(0x17f)](_0x441a56){const _0x25334a=a32_0x462d84,{options:_0x157023,args:_0x402baf,tdx:_0x289cca}=_0x441a56,_0x3efb9f=_0x402baf[0x0]||_0x157023[_0x25334a(0xa2)];if(!_0x3efb9f)return showParentSegmentNotSetError(_0x25334a(0x161)+_0x25334a(0x82)),0x1;_0x157023['verbose']&&(console[_0x25334a(0x17d)](_0x25334a(0x112)+_0x157023[_0x25334a(0xe6)]),console[_0x25334a(0x17d)](_0x25334a(0x261)+_0x3efb9f));const _0xfb5dc2=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3efb9f+_0x25334a(0x183),()=>_0x289cca[_0x25334a(0x139)][_0x25334a(0xe2)](_0x3efb9f),{'verbose':_0x157023[_0x25334a(0x19e)]}),_0x377ab2=_0xfb5dc2['data'],_0x52c366=await withSpinner(_0x25334a(0x1f1)+_0x3efb9f+'\x27...',()=>_0x289cca[_0x25334a(0x139)]['getParentSQL'](_0x377ab2),{'verbose':_0x157023[_0x25334a(0x19e)]});let _0x32bb60=_0x52c366[_0x25334a(0x12d)];const _0x18e95e=resolveLimit(_0x157023['limit'],DEFAULT_DISPLAY_LIMIT),_0x4bd00c=/\bLIMIT\s+\d+/i['test'](_0x32bb60);!_0x4bd00c&&(_0x32bb60=_0x32bb60['trim']()['replace'](/;+$/,''),_0x32bb60='SELECT\x20*\x20FROM\x20(\x0a'+_0x32bb60+_0x25334a(0x267)+_0x18e95e);_0x157023[_0x25334a(0x19e)]&&console[_0x25334a(0x17d)]('SQL\x20query:\x0a'+_0x32bb60);const _0x550a6e=await withProgressSpinner(_0x25334a(0x157),async _0x450c94=>{const _0x459992=await _0x289cca['query']['execute'](_0x32bb60,{'catalog':'td','schema':'information_schema','onJobId':_0x194e27=>{const _0x3a99ce=a32_0x266e;_0x450c94[_0x3a99ce(0xae)](_0x194e27);}});return _0x459992;},{'verbose':_0x157023[_0x25334a(0x19e)]}),_0x3fc3f1=_0x550a6e[_0x25334a(0x12d)],_0x553c4f=_0x3fc3f1[_0x25334a(0xe1)]?_0x25334a(0xaa)+_0x3fc3f1['jobId']+']':'';return console[_0x25334a(0x17d)](_0x25334a(0x271)+_0x3fc3f1['stats']['processedRows'][_0x25334a(0x223)]()+'\x20rows\x20'+('in\x20'+formatElapsed(_0x3fc3f1[_0x25334a(0x142)][_0x25334a(0xaf)])+_0x553c4f)),await handleQueryOutput(_0x3fc3f1,_0x157023),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a32_0x462d84(0x1b2);[a32_0x462d84(0x19c)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a32_0x462d84(0x17f)](_0x47d5f3){const _0x443c12=a32_0x462d84,{options:_0x24762a,args:_0x5190f2,tdx:_0x13f5cd}=_0x47d5f3,_0x24bccf=_0x5190f2[0x0],_0x28230e=await withSpinner(_0x24bccf?_0x443c12(0x154)+_0x24bccf+_0x443c12(0x183):_0x443c12(0x218),()=>_0x13f5cd[_0x443c12(0x231)]['list'](),{'verbose':_0x24762a[_0x443c12(0x19e)]});let _0x431e80=_0x28230e[_0x443c12(0x12d)]['filter'](_0x1b5994=>_0x1b5994[_0x443c12(0x206)]);if(_0x24bccf){const _0x59cc36=_0x24bccf[_0x443c12(0x228)](/[.+^${}()|[\]\\]/g,_0x443c12(0x229))['replace'](/\*/g,'.*')[_0x443c12(0x228)](/\?/g,'.'),_0x121877=new RegExp('^'+_0x59cc36+'$','i');_0x431e80=_0x431e80['filter'](_0x321bda=>_0x121877[_0x443c12(0x198)](_0x321bda[_0x443c12(0xf9)]));}_0x431e80['sort']((_0x2b4abc,_0x900bd5)=>_0x2b4abc[_0x443c12(0xf9)][_0x443c12(0x124)](_0x900bd5['name'])),console[_0x443c12(0x17d)]('✔\x20Found\x20'+_0x431e80[_0x443c12(0x7b)]+_0x443c12(0x143)+(_0x431e80['length']!==0x1?'s':''));const _0x592642=_0x38c9cc=>{const _0x194758=_0x443c12;return getConsoleNextUrl(_0x24762a[_0x194758(0xe6)],_0x194758(0x1d1)+_0x38c9cc);};if(_0x24762a[_0x443c12(0x128)]===_0x443c12(0x1ea)||_0x24762a[_0x443c12(0x128)]===_0x443c12(0x262)){const _0x2f1c4f=_0x431e80[_0x443c12(0xa5)](_0x10626a=>({..._0x10626a,'url':_0x592642(_0x10626a['id'])}));await handleSDKOutput(_0x2f1c4f,_0x24762a);}else{if(_0x431e80['length']===0x0)console[_0x443c12(0x195)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x525faa of _0x431e80){const _0x27e2db=_0x525faa['population']?a32_0x10437a[_0x443c12(0x247)]('\x20('+formatRows(_0x525faa['population'])+')'):'',_0x4087fc=hyperlink(_0x525faa['name'],_0x592642(_0x525faa['id']));console[_0x443c12(0x195)]('⚡\x20'+_0x4087fc+_0x27e2db);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a32_0x462d84(0x21b);[a32_0x462d84(0x19c)]=a32_0x462d84(0x1f7);async[a32_0x462d84(0x17f)](_0x2dccd5){const _0x84a5bd=a32_0x462d84,{options:_0x4647ab,args:_0x5778f8,tdx:_0x2e497e}=_0x2dccd5,_0x45fe6f=_0x5778f8[0x0]||_0x4647ab[_0x84a5bd(0xa2)];if(!_0x45fe6f)return showParentSegmentNotSetError(_0x84a5bd(0x18b)+_0x84a5bd(0x23a)),0x1;const _0x441c8c=resolveYamlFile(_0x45fe6f);if(!existsSync(_0x441c8c))return showFileNotFoundError(_0x441c8c,_0x45fe6f),0x1;let _0x18e16c;try{_0x18e16c=readFileSync(_0x441c8c,_0x84a5bd(0x15f));}catch(_0x5d40c2){const _0x40033c=_0x5d40c2 instanceof Error?_0x5d40c2[_0x84a5bd(0x184)]:String(_0x5d40c2);return console[_0x84a5bd(0x17d)]('Error\x20reading\x20file:\x20'+_0x40033c),0x1;}const _0x426203=createCommandSpinner(a32_0x10437a[_0x84a5bd(0x247)](_0x84a5bd(0x1a6)),{'verbose':_0x4647ab[_0x84a5bd(0x19e)]});_0x426203['start']();const _0x9df13b={'realtime':!![],'onProgress':_0x25a4e3=>{const _0x301c61=_0x84a5bd;_0x426203[_0x301c61(0xe7)]=formatProgressMessage(_0x25a4e3);}};let _0x12c384;try{_0x12c384=await _0x2e497e['segment']['validateParentYaml'](_0x18e16c,_0x9df13b),_0x426203[_0x84a5bd(0x26c)]();}catch(_0x4773a6){_0x426203[_0x84a5bd(0x26c)]();throw _0x4773a6;}console['error']('\x0a'+a32_0x10437a[_0x84a5bd(0xb5)](_0x84a5bd(0x98))+'\x20'+_0x12c384['name']),console[_0x84a5bd(0x17d)]('═'[_0x84a5bd(0x148)](0x3c)),displayRealtimeValidation(_0x12c384),console['error']('─'['repeat'](0x3c));if(_0x12c384[_0x84a5bd(0x25e)]['length']>0x0){console[_0x84a5bd(0x17d)]('\x0a'+a32_0x10437a[_0x84a5bd(0xbd)](_0x84a5bd(0xba)));for(const _0xa69a6 of _0x12c384[_0x84a5bd(0x25e)]){console[_0x84a5bd(0x17d)]('\x20\x20'+a32_0x10437a[_0x84a5bd(0xbd)]('•')+'\x20'+_0xa69a6);}}return _0x12c384['allValid']&&console['error']('\x0a'+a32_0x10437a[_0x84a5bd(0x96)]('✔')+_0x84a5bd(0x1b0)),_0x12c384[_0x84a5bd(0x241)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x216);[a32_0x462d84(0x19c)]=a32_0x462d84(0x14a);async[a32_0x462d84(0x17f)](_0x46363c){const _0x2358e3=a32_0x462d84,{options:_0x15f239,args:_0x406297,tdx:_0x3c693c}=_0x46363c,_0x53f012=_0x406297[0x0]||_0x15f239[_0x2358e3(0xa2)];if(!_0x53f012)return showParentSegmentNotSetError(_0x2358e3(0x121)+_0x2358e3(0x1d3)),0x1;_0x15f239[_0x2358e3(0x19e)]&&(console[_0x2358e3(0x17d)](_0x2358e3(0x112)+_0x15f239[_0x2358e3(0xe6)]),console[_0x2358e3(0x17d)](_0x2358e3(0x261)+_0x53f012));const _0xeb12a9=await withSpinner(_0x2358e3(0x255)+_0x53f012+_0x2358e3(0x183),()=>_0x3c693c[_0x2358e3(0x139)]['resolveParentId'](_0x53f012),{'verbose':_0x15f239[_0x2358e3(0x19e)]}),_0x2bba74=_0xeb12a9[_0x2358e3(0x12d)],_0x4e3d55=await withSpinner(_0x2358e3(0x16f)+_0x53f012+_0x2358e3(0x183),()=>_0x3c693c[_0x2358e3(0x231)][_0x2358e3(0x1d5)](_0x2bba74),{'verbose':_0x15f239['verbose']}),_0x36e2aa=_0x4e3d55['data'];console[_0x2358e3(0x17d)](_0x2358e3(0x105)+_0x36e2aa['length']+'\x20RT\x20journey'+(_0x36e2aa[_0x2358e3(0x7b)]!==0x1?'s':''));if(_0x15f239[_0x2358e3(0x128)]===_0x2358e3(0x1ea)||_0x15f239[_0x2358e3(0x128)]===_0x2358e3(0x262))await handleSDKOutput(_0x36e2aa,_0x15f239);else{if(_0x36e2aa[_0x2358e3(0x7b)]===0x0)console[_0x2358e3(0x195)](_0x2358e3(0x25b));else for(const _0x5cddbf of _0x36e2aa){const _0x172a74=_0x5cddbf[_0x2358e3(0x249)]===_0x2358e3(0x93)?'🚀':'📝',_0x56cff8=_0x5cddbf[_0x2358e3(0x14c)]?a32_0x10437a[_0x2358e3(0x94)]('\x20(paused)'):'',_0x150574=a32_0x10437a[_0x2358e3(0x247)]('\x20('+_0x5cddbf['stageCount']+'\x20stage'+(_0x5cddbf[_0x2358e3(0xa6)]!==0x1?'s':'')+')');console['log'](_0x172a74+'\x20'+_0x5cddbf['name']+_0x56cff8+_0x150574);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x202);[a32_0x462d84(0x19c)]='Pause\x20activations\x20in\x20an\x20RT\x20journey';async['execute'](_0x1066c3){const _0xc1cc0=a32_0x462d84,{options:_0x4f55e3,args:_0x4a4adb,tdx:_0x3352c0}=_0x1066c3,_0x476c89=_0x4a4adb[0x0];if(!_0x476c89)return console[_0xc1cc0(0x17d)](a32_0x10437a[_0xc1cc0(0xbd)](_0xc1cc0(0x188))),console['error'](_0xc1cc0(0x8b)),console['error'](a32_0x10437a[_0xc1cc0(0x247)](_0xc1cc0(0x92))),0x1;_0x4f55e3[_0xc1cc0(0x19e)]&&(console['error'](_0xc1cc0(0x112)+_0x4f55e3[_0xc1cc0(0xe6)]),console[_0xc1cc0(0x17d)]('RT\x20Journey\x20ID:\x20'+_0x476c89));const _0x44667f=await withSpinner(_0xc1cc0(0xbe)+_0x476c89+'\x27...',()=>_0x3352c0[_0xc1cc0(0x231)][_0xc1cc0(0x8e)](_0x476c89),{'verbose':_0x4f55e3[_0xc1cc0(0x19e)]}),_0x3291aa=_0x44667f['data'];console['error']('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3291aa[_0xc1cc0(0xf9)]+'\x27');if(_0x4f55e3[_0xc1cc0(0x128)]===_0xc1cc0(0x1ea)||_0x4f55e3['format']===_0xc1cc0(0x262))await handleSDKOutput([_0x3291aa],_0x4f55e3);else{const _0x26ce1f=_0x3291aa['state']===_0xc1cc0(0x93)?'🚀':'📝',_0x39263b=_0x3291aa[_0xc1cc0(0x14c)]?a32_0x10437a[_0xc1cc0(0x94)](_0xc1cc0(0x17c)):'';console[_0xc1cc0(0x195)](_0x26ce1f+'\x20'+_0x3291aa['name']+_0x39263b);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a32_0x462d84(0xed);[a32_0x462d84(0x19c)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x462d84(0x17f)](_0x53f36e){const _0x1fee7f=a32_0x462d84,{options:_0x54c355,args:_0x4fcd52,tdx:_0x31aa4b}=_0x53f36e,_0x5e057e=_0x4fcd52[0x0];if(!_0x5e057e)return console[_0x1fee7f(0x17d)](a32_0x10437a[_0x1fee7f(0xbd)](_0x1fee7f(0x188))),console[_0x1fee7f(0x17d)](_0x1fee7f(0x149)),console['error'](a32_0x10437a[_0x1fee7f(0x247)](_0x1fee7f(0x92))),0x1;_0x54c355[_0x1fee7f(0x19e)]&&(console['error'](_0x1fee7f(0x112)+_0x54c355[_0x1fee7f(0xe6)]),console[_0x1fee7f(0x17d)](_0x1fee7f(0x7d)+_0x5e057e));const _0x244ae9=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x5e057e+_0x1fee7f(0x183),()=>_0x31aa4b[_0x1fee7f(0x231)][_0x1fee7f(0x10a)](_0x5e057e),{'verbose':_0x54c355[_0x1fee7f(0x19e)]}),_0x3eeeba=_0x244ae9[_0x1fee7f(0x12d)];console['error']('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3eeeba[_0x1fee7f(0xf9)]+'\x27');if(_0x54c355[_0x1fee7f(0x128)]==='json'||_0x54c355[_0x1fee7f(0x128)]==='jsonl')await handleSDKOutput([_0x3eeeba],_0x54c355);else{const _0x4bf9fd=_0x3eeeba[_0x1fee7f(0x249)]===_0x1fee7f(0x93)?'🚀':'📝',_0x42745b=_0x3eeeba[_0x1fee7f(0x14c)]?a32_0x10437a[_0x1fee7f(0x94)]('\x20(paused)'):'';console['log'](_0x4bf9fd+'\x20'+_0x3eeeba['name']+_0x42745b);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x462d84(0xf9)]='ps:rt:configuration_versions';[a32_0x462d84(0x19c)]=a32_0x462d84(0x119);async[a32_0x462d84(0x17f)](_0x212e3c){const _0x5b9f04=a32_0x462d84,{options:_0x2a6131,args:_0x494f25,tdx:_0x221c81}=_0x212e3c,_0x14c6ef=_0x494f25[0x0]||_0x2a6131[_0x5b9f04(0xa2)];if(!_0x14c6ef)return showParentSegmentNotSetError('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'+_0x5b9f04(0x126)),0x1;_0x2a6131[_0x5b9f04(0x19e)]&&(console[_0x5b9f04(0x17d)]('Site:\x20'+_0x2a6131[_0x5b9f04(0xe6)]),console[_0x5b9f04(0x17d)](_0x5b9f04(0x261)+_0x14c6ef));const _0xa5946a=await withSpinner(_0x5b9f04(0x255)+_0x14c6ef+_0x5b9f04(0x183),()=>_0x221c81['segment'][_0x5b9f04(0xe2)](_0x14c6ef),{'verbose':_0x2a6131[_0x5b9f04(0x19e)]}),_0x379852=_0xa5946a[_0x5b9f04(0x12d)],_0x460e35=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x14c6ef+_0x5b9f04(0x183),()=>_0x221c81[_0x5b9f04(0x231)][_0x5b9f04(0xec)](_0x379852),{'verbose':_0x2a6131[_0x5b9f04(0x19e)]}),_0x3ce96b=_0x460e35[_0x5b9f04(0x12d)];return console['error'](_0x5b9f04(0x209)),_0x2a6131[_0x5b9f04(0x128)]===_0x5b9f04(0x1ea)||_0x2a6131[_0x5b9f04(0x128)]===_0x5b9f04(0x262)?await handleSDKOutput([_0x3ce96b],_0x2a6131):(console[_0x5b9f04(0x195)](_0x5b9f04(0x240)+_0x3ce96b['id']),console[_0x5b9f04(0x195)](_0x5b9f04(0x17b)+_0x3ce96b['audienceId']),console[_0x5b9f04(0x195)]('identifier:\x20'+_0x3ce96b[_0x5b9f04(0x22f)]),console['log'](_0x5b9f04(0x253)+_0x3ce96b[_0x5b9f04(0xea)]),console[_0x5b9f04(0x195)](_0x5b9f04(0xa1)+_0x3ce96b[_0x5b9f04(0x1f4)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']=a32_0x462d84(0xfb);[a32_0x462d84(0x19c)]=a32_0x462d84(0x19a);async[a32_0x462d84(0x17f)](_0x188c96){const _0x2c0418=a32_0x462d84,{options:_0x25b89a,args:_0x191b97,tdx:_0x3de81b}=_0x188c96,_0x3e3a1f=_0x191b97[0x0]||_0x25b89a[_0x2c0418(0xa2)];if(!_0x3e3a1f)return showParentSegmentNotSetError(_0x2c0418(0x204)+'\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'),0x1;const _0x265993=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3e3a1f+_0x2c0418(0x183),()=>_0x3de81b[_0x2c0418(0x139)][_0x2c0418(0xe2)](_0x3e3a1f),{'verbose':_0x25b89a[_0x2c0418(0x19e)]}),_0x53c9fb=_0x265993[_0x2c0418(0x12d)],_0x1fbe31=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x3e3a1f+'\x27...',()=>_0x3de81b[_0x2c0418(0x1e0)][_0x2c0418(0xd4)](_0x53c9fb),{'verbose':_0x25b89a[_0x2c0418(0x19e)]}),_0x21d024=_0x1fbe31[_0x2c0418(0x12d)];console[_0x2c0418(0x17d)](_0x2c0418(0x105)+_0x21d024[_0x2c0418(0x7b)]+'\x20personalization\x20service'+(_0x21d024[_0x2c0418(0x7b)]!==0x1?'s':''));if(_0x25b89a[_0x2c0418(0x128)]===_0x2c0418(0x1ea)||_0x25b89a['format']===_0x2c0418(0x262))await handleSDKOutput(_0x21d024,_0x25b89a);else{if(_0x21d024[_0x2c0418(0x7b)]===0x0)console['log'](_0x2c0418(0x20c)),console[_0x2c0418(0x17d)](a32_0x10437a[_0x2c0418(0x276)](_0x2c0418(0xe5)));else for(const _0x26ade0 of _0x21d024){console['log'](a32_0x10437a[_0x2c0418(0xb5)](_0x26ade0[_0x2c0418(0xf9)])+'\x20'+a32_0x10437a[_0x2c0418(0x247)](_0x2c0418(0x213)+_0x26ade0['id']+')'));_0x26ade0[_0x2c0418(0x19c)]&&console[_0x2c0418(0x195)]('\x20\x20'+a32_0x10437a[_0x2c0418(0x247)](_0x26ade0['description']));if(_0x26ade0[_0x2c0418(0x13b)]&&_0x26ade0[_0x2c0418(0x13b)][_0x2c0418(0x7b)]>0x0)for(const _0x1d6659 of _0x26ade0['tokens']){const _0x35e378=_0x1d6659[_0x2c0418(0x74)]?.[_0x2c0418(0x7b)]?_0x1d6659['allowedIps'][_0x2c0418(0x1bb)](',\x20'):_0x2c0418(0x12c);console['log']('\x20\x20'+a32_0x10437a[_0x2c0418(0x276)](_0x2c0418(0x11f))+'\x20'+_0x1d6659[_0x2c0418(0xf9)]+'\x20'+a32_0x10437a[_0x2c0418(0x247)](_0x2c0418(0x213)+_0x1d6659['id']+')')),console[_0x2c0418(0x195)](_0x2c0418(0x12b)+a32_0x10437a[_0x2c0418(0x247)](_0x2c0418(0x20e))+'\x20'+_0x35e378);}else console['log']('\x20\x20'+a32_0x10437a[_0x2c0418(0x247)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x86);[a32_0x462d84(0x19c)]=a32_0x462d84(0x9c);async[a32_0x462d84(0x17f)](_0x1db373){const _0x52da1f=a32_0x462d84,{options:_0x5b8a61,args:_0x4c0823,tdx:_0x1fef3c}=_0x1db373,_0x15665e=_0x5b8a61,_0x3702dc=_0x4c0823[0x0],_0xcb4b59=_0x4c0823[0x1]||_0x5b8a61['parentSegment'];if(!_0x3702dc)return console['error'](_0x52da1f(0x1b3)),console['error'](_0x52da1f(0x1ac)),console[_0x52da1f(0x17d)](_0x52da1f(0x1de)),0x1;if(!_0xcb4b59)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0x52da1f(0x1de)),0x1;const _0x35bf10=await withSpinner(_0x52da1f(0x255)+_0xcb4b59+'\x27...',()=>_0x1fef3c[_0x52da1f(0x139)]['resolveParentId'](_0xcb4b59),{'verbose':_0x5b8a61[_0x52da1f(0x19e)]}),_0x23ad8e=_0x35bf10['data'],_0x2f4b3e={'name':_0x3702dc,'description':_0x15665e['description'],'public':_0x15665e['public']},_0x4bf9a9=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x3702dc+'\x27...',()=>_0x1fef3c[_0x52da1f(0x1e0)][_0x52da1f(0x1ab)](_0x23ad8e,_0x2f4b3e),{'verbose':_0x5b8a61[_0x52da1f(0x19e)]}),_0xe1441a=_0x4bf9a9[_0x52da1f(0x12d)];return console['error'](_0x52da1f(0x1a1)+_0xe1441a[_0x52da1f(0xf9)]+_0x52da1f(0x71)+_0xe1441a['id']),await handleSDKOutput([_0xe1441a],_0x5b8a61),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x12a);[a32_0x462d84(0x19c)]=a32_0x462d84(0x15b);async[a32_0x462d84(0x17f)](_0x2b56c6){const _0x2ce5e7=a32_0x462d84,{options:_0x3ecd4c,args:_0x465397,tdx:_0x3f65fa}=_0x2b56c6,_0xf7230e=_0x465397[0x0],_0x340a60=_0x465397[0x1]||_0x3ecd4c['parentSegment'];if(!_0xf7230e)return console[_0x2ce5e7(0x17d)](_0x2ce5e7(0x91)),console[_0x2ce5e7(0x17d)](_0x2ce5e7(0x137)),console[_0x2ce5e7(0x17d)](_0x2ce5e7(0x136)),0x1;if(!_0x340a60)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 _0x5c7dbe=await withSpinner(_0x2ce5e7(0x255)+_0x340a60+_0x2ce5e7(0x183),()=>_0x3f65fa[_0x2ce5e7(0x139)][_0x2ce5e7(0xe2)](_0x340a60),{'verbose':_0x3ecd4c[_0x2ce5e7(0x19e)]}),_0x30e31f=_0x5c7dbe[_0x2ce5e7(0x12d)],_0xb10a9f=await withSpinner(_0x2ce5e7(0x14b)+_0xf7230e+_0x2ce5e7(0x183),()=>_0x3f65fa[_0x2ce5e7(0x1e0)][_0x2ce5e7(0x24a)](_0x30e31f,_0xf7230e),{'verbose':_0x3ecd4c[_0x2ce5e7(0x19e)]}),_0x1c1db5=_0xb10a9f['data'];if(_0x3ecd4c['json']||_0x3ecd4c[_0x2ce5e7(0x262)])await handleSDKOutput([_0x1c1db5],_0x3ecd4c);else{console[_0x2ce5e7(0x195)](a32_0x10437a[_0x2ce5e7(0xb5)](_0x1c1db5[_0x2ce5e7(0xf9)])+'\x20'+a32_0x10437a[_0x2ce5e7(0x247)](_0x2ce5e7(0x213)+_0x1c1db5['id']+')'));_0x1c1db5[_0x2ce5e7(0x19c)]&&console[_0x2ce5e7(0x195)]('\x20\x20'+a32_0x10437a[_0x2ce5e7(0x247)](_0x1c1db5['description']));console[_0x2ce5e7(0x195)]('\x20\x20'+a32_0x10437a[_0x2ce5e7(0x276)](_0x2ce5e7(0x153))+'\x20'+(_0x1c1db5['public']?_0x2ce5e7(0x19f):'no'));if(_0x1c1db5['tokens']&&_0x1c1db5[_0x2ce5e7(0x13b)][_0x2ce5e7(0x7b)]>0x0)for(const _0x2f8de3 of _0x1c1db5[_0x2ce5e7(0x13b)]){const _0x273967=_0x2f8de3[_0x2ce5e7(0x74)]?.[_0x2ce5e7(0x7b)]?_0x2f8de3['allowedIps']['join'](',\x20'):_0x2ce5e7(0x12c);console[_0x2ce5e7(0x195)]('\x20\x20'+a32_0x10437a['cyan'](_0x2ce5e7(0x11f))+'\x20'+_0x2f8de3['name']+'\x20'+a32_0x10437a['dim'](_0x2ce5e7(0x213)+_0x2f8de3['id']+')')),console[_0x2ce5e7(0x195)](_0x2ce5e7(0x12b)+a32_0x10437a['dim'](_0x2ce5e7(0x20e))+'\x20'+_0x273967);}else console['log']('\x20\x20'+a32_0x10437a[_0x2ce5e7(0x247)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x72);[a32_0x462d84(0x19c)]=a32_0x462d84(0x20f);async['execute'](_0x35a29f){const _0x55d375=a32_0x462d84,{options:_0x46f00e,args:_0x4ab4ae,tdx:_0x38cfdf}=_0x35a29f,_0x2af5df=_0x4ab4ae[0x0],_0x5eafdf=_0x4ab4ae[0x1]||_0x46f00e[_0x55d375(0xa2)];if(!_0x2af5df)return console[_0x55d375(0x17d)](_0x55d375(0x91)),console[_0x55d375(0x17d)](_0x55d375(0x25c)),console['error'](_0x55d375(0x163)),0x1;if(!_0x5eafdf)return showParentSegmentNotSetError(_0x55d375(0x1cd)+_0x55d375(0x163)),0x1;const _0x19809c=await withSpinner(_0x55d375(0x255)+_0x5eafdf+_0x55d375(0x183),()=>_0x38cfdf[_0x55d375(0x139)][_0x55d375(0xe2)](_0x5eafdf),{'verbose':_0x46f00e[_0x55d375(0x19e)]}),_0x2d07a3=_0x19809c[_0x55d375(0x12d)];return await withSpinner(_0x55d375(0x238)+_0x2af5df+_0x55d375(0x183),()=>_0x38cfdf[_0x55d375(0x1e0)]['delete'](_0x2d07a3,_0x2af5df),{'verbose':_0x46f00e['verbose']}),console['error']('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x2af5df+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x462d84(0xf9)]='ps:pz:service:update';[a32_0x462d84(0x19c)]=a32_0x462d84(0x140);async[a32_0x462d84(0x17f)](_0x43a4f7){const _0x4004b8=a32_0x462d84,{options:_0x1b4663,args:_0x3b1840,tdx:_0x388e95}=_0x43a4f7,_0x28a9e5=_0x1b4663,_0x35f0ce=_0x3b1840[0x0],_0x7b226f=_0x3b1840[0x1]||_0x1b4663[_0x4004b8(0xa2)];if(!_0x35f0ce)return console['error'](_0x4004b8(0x91)),console[_0x4004b8(0x17d)](_0x4004b8(0x75)),console[_0x4004b8(0x17d)](_0x4004b8(0x24c)),0x1;if(!_0x28a9e5[_0x4004b8(0xf9)])return console[_0x4004b8(0x17d)](_0x4004b8(0xf2)),console['error'](_0x4004b8(0x75)),0x1;if(!_0x7b226f)return showParentSegmentNotSetError(_0x4004b8(0x1d2)+_0x4004b8(0x24c)),0x1;const _0xf73689=await withSpinner(_0x4004b8(0x255)+_0x7b226f+_0x4004b8(0x183),()=>_0x388e95['segment']['resolveParentId'](_0x7b226f),{'verbose':_0x1b4663[_0x4004b8(0x19e)]}),_0x534257=_0xf73689['data'],_0x1ebd09={'name':_0x28a9e5['name']};_0x28a9e5[_0x4004b8(0x19c)]!==undefined&&(_0x1ebd09[_0x4004b8(0x19c)]=_0x28a9e5['description']);const _0x4bd021=await withSpinner('Updating\x20personalization\x20service\x20\x27'+_0x35f0ce+_0x4004b8(0x183),()=>_0x388e95[_0x4004b8(0x1e0)][_0x4004b8(0x1a4)](_0x534257,_0x35f0ce,_0x1ebd09),{'verbose':_0x1b4663[_0x4004b8(0x19e)]}),_0x5cd820=_0x4bd021['data'];return console['error'](_0x4004b8(0xb2)+_0x5cd820[_0x4004b8(0xf9)]+'\x27'),await handleSDKOutput([_0x5cd820],_0x1b4663),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x462d84(0xf9)]='ps:pz:service:token:create';['description']=a32_0x462d84(0xd8);async['execute'](_0x1fbae9){const _0x54b23b=a32_0x462d84,{options:_0x4c30db,args:_0x2bbc51,tdx:_0x587c3b}=_0x1fbae9,_0x24176f=_0x4c30db,_0x584fa1=_0x2bbc51[0x0],_0x5494b5=_0x2bbc51[0x1],_0x4d0013=_0x2bbc51[0x2]||_0x4c30db['parentSegment'];if(!_0x584fa1)return console[_0x54b23b(0x17d)](_0x54b23b(0xad)),console[_0x54b23b(0x17d)](_0x54b23b(0xac)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5494b5)return console[_0x54b23b(0x17d)](_0x54b23b(0x91)),console[_0x54b23b(0x17d)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x54b23b(0x17d)](_0x54b23b(0x215)),0x1;if(!_0x4d0013)return showParentSegmentNotSetError(_0x54b23b(0x1d8)+_0x54b23b(0x215)),0x1;const _0x521e08=await withSpinner(_0x54b23b(0x255)+_0x4d0013+_0x54b23b(0x183),()=>_0x587c3b[_0x54b23b(0x139)][_0x54b23b(0xe2)](_0x4d0013),{'verbose':_0x4c30db[_0x54b23b(0x19e)]}),_0x299b49=_0x521e08[_0x54b23b(0x12d)],_0x168614={'name':_0x584fa1};_0x24176f[_0x54b23b(0x74)]&&(_0x168614[_0x54b23b(0x74)]=_0x24176f[_0x54b23b(0x74)][_0x54b23b(0x1c3)](',')[_0x54b23b(0xa5)](_0x12538b=>_0x12538b['trim']()));_0x24176f[_0x54b23b(0x19c)]&&(_0x168614[_0x54b23b(0x19c)]=_0x24176f[_0x54b23b(0x19c)]);const _0x154a2a=await withSpinner('Creating\x20token\x20\x27'+_0x584fa1+_0x54b23b(0x248)+_0x5494b5+_0x54b23b(0x183),()=>_0x587c3b[_0x54b23b(0x1e0)][_0x54b23b(0xc5)](_0x299b49,_0x5494b5,_0x168614),{'verbose':_0x4c30db['verbose']}),_0x1c6720=_0x154a2a[_0x54b23b(0x12d)];return console['error'](_0x54b23b(0x235)+_0x1c6720[_0x54b23b(0xf9)]+'\x27\x20with\x20ID:\x20'+_0x1c6720['id']),_0x1c6720[_0x54b23b(0x1a8)]&&(console[_0x54b23b(0x17d)](a32_0x10437a[_0x54b23b(0x94)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console['error'](a32_0x10437a[_0x54b23b(0x276)](_0x1c6720[_0x54b23b(0x1a8)])),console[_0x54b23b(0x17d)]('')),await handleSDKOutput([_0x1c6720],_0x4c30db),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x462d84(0xf9)]='ps:pz:service:token:delete';[a32_0x462d84(0x19c)]=a32_0x462d84(0x270);async[a32_0x462d84(0x17f)](_0x10d6c0){const _0x4167b2=a32_0x462d84,{options:_0x249421,args:_0x288176,tdx:_0x5744d7}=_0x10d6c0,_0x2beb80=_0x288176[0x0],_0x10a8d5=_0x288176[0x1]||_0x249421[_0x4167b2(0xa2)];if(!_0x2beb80)return console[_0x4167b2(0x17d)](_0x4167b2(0x12e)),console[_0x4167b2(0x17d)](_0x4167b2(0x232)),console['error'](_0x4167b2(0x1fe)),0x1;if(!_0x10a8d5)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x4167b2(0x1fe)),0x1;const _0x52a9a4=await withSpinner(_0x4167b2(0x255)+_0x10a8d5+_0x4167b2(0x183),()=>_0x5744d7['segment']['resolveParentId'](_0x10a8d5),{'verbose':_0x249421['verbose']}),_0x52b158=_0x52a9a4[_0x4167b2(0x12d)],_0x287df6=await withSpinner(_0x4167b2(0x1ff),()=>_0x5744d7[_0x4167b2(0x1e0)][_0x4167b2(0xd4)](_0x52b158),{'verbose':_0x249421[_0x4167b2(0x19e)]}),_0x14e7b3=_0x287df6['data'];let _0x3c8bcf;for(const _0x46923e of _0x14e7b3){if(_0x46923e[_0x4167b2(0x13b)]?.[_0x4167b2(0xc6)](_0x385ee2=>_0x385ee2['id']===_0x2beb80)){_0x3c8bcf=_0x46923e['id'];break;}}if(!_0x3c8bcf)return console['error']('Error:\x20Token\x20\x27'+_0x2beb80+_0x4167b2(0x8d)),0x1;const _0x34462f=await withSpinner(_0x4167b2(0xeb)+_0x2beb80+_0x4167b2(0x183),()=>_0x5744d7['personalization'][_0x4167b2(0x116)](_0x52b158,_0x3c8bcf,_0x2beb80),{'verbose':_0x249421[_0x4167b2(0x19e)]}),_0x4e1ab2=_0x34462f[_0x4167b2(0x12d)];return console[_0x4167b2(0x17d)](_0x4167b2(0x144)+(_0x4e1ab2[_0x4167b2(0xf9)]||_0x2beb80)+'\x27'),await handleSDKOutput([_0x4e1ab2],_0x249421),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a32_0x462d84(0x222);[a32_0x462d84(0x19c)]=a32_0x462d84(0x146);async[a32_0x462d84(0x17f)](_0x108cd3){const _0x1c4c43=a32_0x462d84,{options:_0x12cc76,args:_0x5550b2,tdx:_0x3405a9}=_0x108cd3,_0x3a1935=_0x5550b2[0x0]||_0x12cc76[_0x1c4c43(0xa2)];if(!_0x3a1935)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'+'\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 _0x2c94bc=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3a1935+'\x27...',()=>_0x3405a9[_0x1c4c43(0x139)][_0x1c4c43(0xe2)](_0x3a1935),{'verbose':_0x12cc76[_0x1c4c43(0x19e)]}),_0x1688ec=_0x2c94bc[_0x1c4c43(0x12d)],_0x38f526=await withSpinner('Listing\x20personalizations\x20for\x20\x27'+_0x3a1935+_0x1c4c43(0x183),()=>_0x3405a9[_0x1c4c43(0x1e0)][_0x1c4c43(0x100)](_0x1688ec),{'verbose':_0x12cc76[_0x1c4c43(0x19e)]}),_0x483a3e=_0x38f526[_0x1c4c43(0x12d)];console['error'](_0x1c4c43(0x105)+_0x483a3e[_0x1c4c43(0x7b)]+'\x20personalization'+(_0x483a3e['length']!==0x1?'s':''));if(_0x12cc76['format']===_0x1c4c43(0x1ea)||_0x12cc76['format']==='jsonl')await handleSDKOutput(_0x483a3e,_0x12cc76);else{if(_0x483a3e[_0x1c4c43(0x7b)]===0x0)console[_0x1c4c43(0x195)](_0x1c4c43(0xca));else for(const _0x466a7a of _0x483a3e){console[_0x1c4c43(0x195)](a32_0x10437a[_0x1c4c43(0xb5)](_0x466a7a['name'])+'\x20'+a32_0x10437a['dim']('(id:\x20'+_0x466a7a['id']+')'));_0x466a7a[_0x1c4c43(0x19c)]&&console['log']('\x20\x20'+a32_0x10437a['dim'](_0x466a7a[_0x1c4c43(0x19c)]));const _0x3f366b=_0x466a7a[_0x1c4c43(0x22a)]?.[_0x1c4c43(0x7b)]||0x0;console[_0x1c4c43(0x195)]('\x20\x20'+a32_0x10437a['cyan'](_0x1c4c43(0x1c0))+'\x20'+_0x3f366b);if(_0x466a7a[_0x1c4c43(0x22a)]&&_0x466a7a[_0x1c4c43(0x22a)][_0x1c4c43(0x7b)]>0x0)for(const _0x5a9f6b of _0x466a7a['sections']){console[_0x1c4c43(0x195)]('\x20\x20\x20\x20-\x20'+_0x5a9f6b[_0x1c4c43(0xf9)]);}}}return 0x0;}}function a32_0x43b6(){const _0x4bce2d=['status','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','Name:\x20','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','/attempt/','segment:parent:list','Error:\x20Personalization\x20ID\x20is\x20required','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','Listing\x20parent\x20segments...','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Finding\x20service\x20for\x20token...','✔\x20Created\x20personalization\x20\x27','-1d','ps:rt:jn:pause','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','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','indexOf','realtime_enabled','Deleting\x20personalization\x20\x27','1691294SrTGzz','✔\x20Retrieved\x20RT\x20configuration\x20version','entryCriteria:','customerGroup','No\x20personalization\x20services\x20configured','\x20Configuration\x20is\x20valid','allowed\x20IPs:','Delete\x20a\x20personalization\x20service','foreignKey','Show\x20a\x20specific\x20realtime\x20personalization','endsWith','(id:\x20','Database:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','ps:rt:jn:list','table','Listing\x20RT-enabled\x20parent\x20segments...','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','getOutputDatabaseName','ps:rt:validate','win32','Schema\x20saved\x20to\x20','createPersonalization','number','Apply\x20changes\x20to\x20\x27','tdx\x20ps\x20push\x20','ps:pz:list','toLocaleString','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','\x20parent\x20segment','replace','\x5c$&','sections','Create\x20a\x20realtime\x20personalization\x20entity','page_view','double','Validate:','identifier','\x20=\x20','realtime','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','Behavior:','output','✔\x20Created\x20token\x20\x27','getBehaviorNames','scheduleOption','Deleting\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','patchPersonalization','column_type','⚡\x20Not\x20enabled','FINISHED','/\x20directories\x20exist.','id:\x20','allValid','My\x20Service','unref','deletePersonalization','YAML\x20file:\x20','personalizationServices','dim','\x27\x20for\x20service\x20\x27','state','get','totalEvents','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','segment:parent:pull','pullParentYaml','addAttributesFile','To\x20view\x20sample\x20data:','⚡\x20Enabled','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','eventKind:\x20','columns','Resolving\x20parent\x20segment\x20\x27','Fetching\x20sample\x20data...','Fetching\x20behavior\x20list...','parent_segments','includeSensitive','pushParentYaml','No\x20RT\x20journeys\x20found','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','type','errors','Columns:','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Parent\x20segment:\x20','jsonl','toLowerCase','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Get\x20SQL\x20query\x20for\x20parent\x20segment','4sHjMaZ','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Customers:','\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','updateParent','addAttributes','stop','using\x20the\x20default\x20path:\x20','segment:parent:sql','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','✔\x20Query\x20completed:\x20Processed\x20','/app/workflows/','\x20true','Error:\x20File\x20not\x20found:\x20','.yml','cyan','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','\x0aNo\x20sample\x20data\x20available','Preview:','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','last_page_viewed','string','Audience\x20ID:','Updating','\x20service','Found\x20YAML\x20file:\x20','behavior_','\x27\x20with\x20ID:\x20','ps:pz:service:delete','\x27\x20and\x20run\x20workflow?','allowedIps','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','scheduleType','SELECT\x20*\x20FROM\x20','workflowId','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','{\x0a\x20\x20\x22database\x22:\x20\x22','length','enriched','RT\x20Journey\x20ID:\x20','✔\x20Updated\x20parent\x20segment\x20\x27','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Events:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','327460DCmQKe','%)\x20','formatSchemaJson','ps:pz:service:create','keyEventId','Error\x20reading\x20file:\x20','Options:\x0a','darwin','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','audienceId:','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','pauseJourney','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','To\x20cancel:','Error:\x20Service\x20ID\x20is\x20required','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','launched','yellow','`\x20to\x20download\x20the\x20configuration\x20first','green','\x20\x20Database:\x20','RT\x202.0\x20Validate:','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','previewParentYaml','label','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x20\x201.\x20Edit\x20','interval','attribute','status:\x20','parentSegment','platform','addBehaviorsFile','map','stageCount','isDirectory','toFixed','displayMasterInfo','\x20[Job\x20ID:\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Error:\x20Token\x20name\x20is\x20required','setJobId','elapsedTimeMillis','Error\x20parsing\x20YAML:\x20','events','✔\x20Updated\x20personalization\x20service\x20\x27','✔\x20Updated\x20personalization\x20\x27','Show\x20parent\x20segment\x20details','bold','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','ps:pz:delete','displayPreviewHints','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Errors:','Created','\x20parent\x20segment\x20\x27','red','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','schemaError','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','runParent','workflowSessionId','dirname','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','createToken','some','payload:','3185YAHATo','\x27\x20(id:\x20','No\x20personalizations\x20configured','\x20is\x20already\x20up\x20to\x20date','Behaviors','98elzzLH','createdAt','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','trim','xdg-open','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','list','\x27\x20is\x20up\x20to\x20date','Create\x20parent\x20segment\x20\x27','\x20kill','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','stitchingKeys','\x20+\x20[','Available\x20behaviors:','Error:\x20--database\x20and\x20--table\x20are\x20required','\x20field','behaviors','segment:parent:desc','Attempt:','jobId','resolveParentId','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20\x20\x20\x20-\x20','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','site','text','Personalization:','segment:parent:fields','eventKind','Deleting\x20token\x20\x27','getCurrentConfigVersion','ps:rt:jn:resume','created:','audienceId','sourceTableError','matchedCount','Error:\x20--name\x20is\x20required','\x20tdx\x20wf\x20attempt\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','\x20service(s)\x20configured','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','null','file','name','\x20\x20\x20\x20\x20\x20','ps:pz:service:list','/{name}.yml\x0a','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Fetching\x20customers\x20schema...','idStitching','listPersonalizations','folder-segment','List\x20parent\x20segments','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','Output\x20file:\x20','✔\x20Found\x20','sampleData','joinKey','segment:parent:show','master','resumeJourney','\x20--enriched','validateParentYaml','valid','78daQGYx','displayValidateResults','\x0a⚠️\x20\x20Both\x20','Enriched:','Site:\x20','\x20to\x20push\x20the\x20configuration','all','varchar','deleteToken','entryCriteria','Join:','Get\x20current\x20RT\x20configuration\x20version\x20status','/\x20directory.\x0a','getParentSQL','Session:','Show\x20parent\x20segment\x20schema\x20(column\x20types)','coveragePercent','token:','realtime:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','rowCount','getParentFull','localeCompare','Fetching\x20parent\x20segment\x20\x27','\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','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','format','behavior','ps:pz:service:show','\x20\x20\x20\x20','any','data','Error:\x20Token\x20ID\x20is\x20required','getPersonalization','Default','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20Added\x20RT\x202.0\x20template\x20section','segment:parent:run','reduce','displayRealtimeInfo','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','56119hhXmbb','segment','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','tokens','/\x20and\x20','Overwrite\x20\x27','\x20Context\x20set:\x20','timezone','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','✔\x20Created\x20parent\x20segment\x20\x27','stats','\x20RT-enabled\x20parent\x20segment','✔\x20Deleted\x20token\x20\x27','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','✔\x20Renamed\x20directory\x20to\x20','repeat','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','List\x20RT\x20journeys','Fetching\x20personalization\x20service\x20\x27','paused','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','open','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','attributes','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x0aChanges\x20to\x20\x27','public:','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x20--attribute\x20\x22<name>\x22','displayBehaviorsStats','Executing\x20parent\x20segment\x20query...','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','apply','Update\x20a\x20realtime\x20personalization\x20entity','Show\x20personalization\x20service\x20details','\x22,\x20\x22type\x22:\x20\x22','parentFolder','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','utf-8','parent_segment','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','database','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20No\x20sample\x20data\x20available','\x20\x202.\x20Run\x20','personalization_services','run','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','Updated','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20configured','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Error:\x20Parent\x20segment\x20name\x20is\x20required','Listing\x20RT\x20journeys\x20for\x20\x27','Pattern:\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','Creating\x20parent\x20segment\x20\x27','No\x20parent\x20segments\x20match\x20pattern:\x20','stringify','displayColumns','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','match','8MYHrNB','ps:pz:create','audienceId:\x20','\x20(paused)','error','\x0a✔\x20Workflow\x20started','execute','attributesFile','column','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','\x27...','message','\x20--interval\x20','displaySummary','Attribute:','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','listParents','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','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','.yaml','primaryKey','\x20behaviors','Coverage:','displayAttributesStats','Error:','\x0aUsage:\x20tdx\x20ps\x20preview\x20','relationships','log','use','web','test','Getting\x20personalization\x20\x27','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','✔\x20No\x20changes\x20-\x20\x27','description','sort','verbose','yes','includeSensitive:','✔\x20Created\x20personalization\x20service\x20\x27','305997HFHgbv','segment:parent:view','patch','ps:pz:show','Validating\x20RT\x20configuration...','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','value','updated:','\x20--behavior\x20\x22<name>\x22','create','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','displaySampleData','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\x22\x20}','\x20RT\x20configuration\x20is\x20valid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','ps:rt:list','Error:\x20Service\x20name\x20is\x20required','✔\x20Deleted\x20personalization\x20\x27','createParent','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','2437209edPGDY','\x20--behavior\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','segment:parent:update','join','Analyzing\x20changes...','session','Attributes:','Join\x20on:','sections:','parent_id','✘\x20Failed\x20to\x20rename\x20directory:\x20','split','customers','ignore','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','customerPercent','Personalization\x20service\x20description','start','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','.customers)','listFields','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Aborted.','schemaValid','\x0a⚠️\x20\x20Migrating:\x20','/app/dw/parentSegments/','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x20\x20Columns:\x20','listJourneys','Source:','population','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Next\x20steps:','keyEventId:','Master\x20Table','\x0aError:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\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','personalization','workflowAttemptId','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','2398000FhaNDD','Master:','Creating','\x20total','tdx\x20ps\x20preview\x20','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','\x20Opening\x20','json','/\x20→\x20','\x0aNew\x20parent\x20segment\x20\x27','No\x20parent\x20segments\x20found','Attributes','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','folderId','Fetching\x20SQL\x20for\x20\x27','\x0a\x20\x20]\x0a}\x0a','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'];a32_0x43b6=function(){return _0x4bce2d;};return a32_0x43b6();}export class PSPzShowCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x1a5);[a32_0x462d84(0x19c)]=a32_0x462d84(0x211);async['execute'](_0x3f10fa){const _0x591891=a32_0x462d84,{options:_0x198af3,args:_0x3d0296,tdx:_0x498e55}=_0x3f10fa,_0x4bd218=_0x3d0296[0x0];if(!_0x4bd218)return console[_0x591891(0x17d)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x591891(0x17d)](_0x591891(0xb6)),0x1;const _0xa66f8f=await withSpinner(_0x591891(0x199)+_0x4bd218+_0x591891(0x183),()=>_0x498e55['personalization'][_0x591891(0x12f)](_0x4bd218),{'verbose':_0x198af3[_0x591891(0x19e)]}),_0xda2bcf=_0xa66f8f[_0x591891(0x12d)];console[_0x591891(0x17d)]('✔\x20Found\x20personalization\x20\x27'+_0xda2bcf['name']+'\x27');if(_0x198af3[_0x591891(0x128)]===_0x591891(0x1ea)||_0x198af3[_0x591891(0x128)]===_0x591891(0x262))await handleSDKOutput([_0xda2bcf],_0x198af3);else{console[_0x591891(0x195)](a32_0x10437a[_0x591891(0xb5)](_0xda2bcf['name'])+'\x20'+a32_0x10437a['dim'](_0x591891(0x213)+_0xda2bcf['id']+')'));_0xda2bcf['description']&&console['log']('\x20\x20'+a32_0x10437a[_0x591891(0x247)](_0xda2bcf[_0x591891(0x19c)]));_0xda2bcf[_0x591891(0xef)]&&console[_0x591891(0x195)]('\x20\x20'+a32_0x10437a[_0x591891(0x276)](_0x591891(0x8c))+'\x20'+_0xda2bcf[_0x591891(0xef)]);console[_0x591891(0x195)]('\x20\x20'+a32_0x10437a['cyan'](_0x591891(0xee))+'\x20'+_0xda2bcf[_0x591891(0xce)]),console['log']('\x20\x20'+a32_0x10437a[_0x591891(0x276)](_0x591891(0x1a9))+'\x20'+_0xda2bcf['updatedAt']);const _0x1db8ac=_0xda2bcf[_0x591891(0x22a)]?.[_0x591891(0x7b)]||0x0;console[_0x591891(0x195)]('\x20\x20'+a32_0x10437a['cyan']('sections:')+'\x20'+_0x1db8ac);if(_0xda2bcf[_0x591891(0x22a)]&&_0xda2bcf[_0x591891(0x22a)][_0x591891(0x7b)]>0x0)for(const _0xa11e47 of _0xda2bcf[_0x591891(0x22a)]){console[_0x591891(0x195)](_0x591891(0x12b)+a32_0x10437a[_0x591891(0xb5)](_0xa11e47[_0x591891(0xf9)])+'\x20'+a32_0x10437a[_0x591891(0x247)](_0x591891(0x213)+_0xa11e47['id']+')')),_0xa11e47['entryCriteria']&&(console[_0x591891(0x195)](_0x591891(0xfa)+a32_0x10437a[_0x591891(0x276)](_0x591891(0x20a))+'\x20'+_0xa11e47[_0x591891(0x117)][_0x591891(0xf9)]),_0xa11e47['entryCriteria']['keyEventCriteria']?.[_0x591891(0x87)]&&console[_0x591891(0x195)]('\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x10437a[_0x591891(0x276)](_0x591891(0x1da))+'\x20'+_0xa11e47['entryCriteria']['keyEventCriteria']['keyEventId'])),_0xa11e47['payload']&&console[_0x591891(0x195)]('\x20\x20\x20\x20\x20\x20'+a32_0x10437a['cyan'](_0x591891(0xc7))+'\x20'+JSON[_0x591891(0x174)](_0xa11e47['payload'])),_0xa11e47[_0x591891(0x259)]&&console[_0x591891(0x195)](_0x591891(0xfa)+a32_0x10437a['cyan'](_0x591891(0x1a0))+_0x591891(0x273));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0xb7);[a32_0x462d84(0x19c)]='Delete\x20a\x20realtime\x20personalization';async[a32_0x462d84(0x17f)](_0xdece91){const _0x2091d8=a32_0x462d84,{options:_0x544bf5,args:_0xab8179,tdx:_0x1711e5}=_0xdece91,_0x15fe62=_0xab8179[0x0];if(!_0x15fe62)return console[_0x2091d8(0x17d)](_0x2091d8(0x1fa)),console[_0x2091d8(0x17d)](_0x2091d8(0x1ae)),0x1;return await withSpinner(_0x2091d8(0x207)+_0x15fe62+_0x2091d8(0x183),()=>_0x1711e5[_0x2091d8(0x1e0)][_0x2091d8(0x244)](_0x15fe62),{'verbose':_0x544bf5['verbose']}),console[_0x2091d8(0x17d)](_0x2091d8(0x1b4)+_0x15fe62+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x462d84(0xf9)]=a32_0x462d84(0x17a);[a32_0x462d84(0x19c)]=a32_0x462d84(0x22b);async['execute'](_0x55b456){const _0xbaf900=a32_0x462d84,{options:_0x3712e7,tdx:_0x38c808}=_0x55b456,_0x258bd7=_0x3712e7;let _0xd5d741;if(_0x258bd7['file']){_0xd5d741=await loadJSON(_0x258bd7['file'],!![]);if(!_0xd5d741[_0xbaf900(0x194)]?.[_0xbaf900(0x15d)])return console[_0xbaf900(0x17d)]('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console[_0xbaf900(0x17d)](_0xbaf900(0xc0)),console[_0xbaf900(0x17d)]('\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(!_0x258bd7[_0xbaf900(0xf9)])return console[_0xbaf900(0x17d)](_0xbaf900(0xab)),console[_0xbaf900(0x17d)](_0xbaf900(0x26f)),console[_0xbaf900(0x17d)](_0xbaf900(0x14d)),0x1;if(_0x258bd7[_0xbaf900(0x19c)]===undefined)return console['error'](_0xbaf900(0x15e)),console['error'](_0xbaf900(0x26f)),console['error'](_0xbaf900(0x14d)),0x1;if(_0x258bd7[_0xbaf900(0x1f0)]===undefined)return console[_0xbaf900(0x17d)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console[_0xbaf900(0x17d)](_0xbaf900(0x264)),0x1;let _0x731df6=_0x258bd7[_0xbaf900(0xef)];if(!_0x731df6&&_0x3712e7['parentSegment']){const _0x48c443=await withSpinner(_0xbaf900(0x255)+_0x3712e7[_0xbaf900(0xa2)]+_0xbaf900(0x183),()=>_0x38c808[_0xbaf900(0x139)]['resolveParentId'](_0x3712e7[_0xbaf900(0xa2)]),{'verbose':_0x3712e7[_0xbaf900(0x19e)]});_0x731df6=_0x48c443[_0xbaf900(0x12d)];}let _0x21caf6;_0x258bd7[_0xbaf900(0x22a)]&&(_0x21caf6=await loadJSON(_0x258bd7[_0xbaf900(0x22a)],![]));const _0x40161f=_0x258bd7[_0xbaf900(0x1f0)]===_0xbaf900(0xf7)?null:{'id':_0x258bd7[_0xbaf900(0x1f0)],'type':_0xbaf900(0x101)};_0xd5d741={'attributes':{'name':_0x258bd7[_0xbaf900(0xf9)],'description':_0x258bd7['description']||null,..._0x731df6!==undefined&&{'audienceId':_0x731df6},..._0x21caf6!==undefined&&{'sections':_0x21caf6}},'relationships':{'parentFolder':{'data':_0x40161f}}};}const _0x5b0eef=await withSpinner('Creating\x20personalization\x20\x27'+(_0xd5d741[_0xbaf900(0x150)]?.[_0xbaf900(0xf9)]??'')+_0xbaf900(0x183),()=>_0x38c808[_0xbaf900(0x1e0)][_0xbaf900(0x21e)](_0xd5d741),{'verbose':_0x3712e7['verbose']}),_0x17645f=_0x5b0eef[_0xbaf900(0x12d)];return console['error'](_0xbaf900(0x200)+_0x17645f[_0xbaf900(0xf9)]+_0xbaf900(0x71)+_0x17645f['id']),await handleSDKOutput([_0x17645f],_0x3712e7),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']='ps:pz:patch';[a32_0x462d84(0x19c)]=a32_0x462d84(0x15a);async[a32_0x462d84(0x17f)](_0x3d72ba){const _0x328b23=a32_0x462d84,{options:_0xef1105,args:_0x12a0da}=_0x3d72ba,_0x2cc53c=_0xef1105,_0x369daf=_0x12a0da[0x0];if(!_0x369daf)return console[_0x328b23(0x17d)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x328b23(0x17d)](_0x328b23(0x189)),console[_0x328b23(0x17d)](_0x328b23(0x1ca)),0x1;let _0x34223b;if(_0x2cc53c[_0x328b23(0xf8)])_0x34223b=await loadJSON(_0x2cc53c['file'],!![]);else{if(!_0x2cc53c[_0x328b23(0xf9)])return console[_0x328b23(0x17d)](_0x328b23(0xab)),console[_0x328b23(0x17d)](_0x328b23(0x189)),0x1;if(_0x2cc53c['description']===undefined)return console['error'](_0x328b23(0x15e)),console['error'](_0x328b23(0x189)),0x1;let _0x905579;_0x2cc53c['sections']&&(_0x905579=await loadJSON(_0x2cc53c['sections'],![])),_0x34223b={'attributes':{'name':_0x2cc53c[_0x328b23(0xf9)],'description':_0x2cc53c['description']||null,..._0x905579!==undefined&&{'sections':_0x905579}}};}const {tdx:_0x407209}=_0x3d72ba,_0x7e46a2=await withSpinner('Patching\x20personalization\x20\x27'+_0x369daf+_0x328b23(0x183),()=>_0x407209[_0x328b23(0x1e0)][_0x328b23(0x23b)](_0x369daf,_0x34223b),{'verbose':_0xef1105['verbose']}),_0x3df778=_0x7e46a2[_0x328b23(0x12d)];return console['error'](_0x328b23(0xb3)+_0x3df778[_0x328b23(0xf9)]+_0x328b23(0xc9)+_0x3df778['id']+')'),await handleSDKOutput([_0x3df778],_0xef1105),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a32_0x462d84(0xf9)]='ps:pz:init';[a32_0x462d84(0x19c)]=a32_0x462d84(0x176);async[a32_0x462d84(0x17f)](_0x4c0d93){const _0x10a4cb=a32_0x462d84,{options:_0x228818,args:_0x244265}=_0x4c0d93,_0x223e29=_0x244265[0x0]||_0x228818[_0x10a4cb(0xa2)];if(!_0x223e29)return showParentSegmentNotSetError(_0x10a4cb(0x1e2)+_0x10a4cb(0x269)),0x1;const _0x11d932=resolveYamlFile(_0x223e29);if(!existsSync(_0x11d932))return showFileNotFoundError(_0x11d932,_0x223e29),0x1;let _0x378783;try{_0x378783=readFileSync(_0x11d932,_0x10a4cb(0x15f));}catch(_0x960190){const _0xaa8be9=_0x960190 instanceof Error?_0x960190[_0x10a4cb(0x184)]:String(_0x960190);return console['error'](_0x10a4cb(0x88)+_0xaa8be9),0x1;}let _0x44074e;try{_0x44074e=parseDef(_0x378783);}catch(_0x10f446){const _0x1b5554=_0x10f446 instanceof Error?_0x10f446['message']:String(_0x10f446);return console['error'](a32_0x10437a[_0x10a4cb(0xbd)](_0x10a4cb(0xb0)+_0x1b5554)),0x1;}if(_0x44074e[_0x10a4cb(0x166)]&&_0x44074e[_0x10a4cb(0x166)][_0x10a4cb(0x7b)]>0x0)return console['error'](a32_0x10437a[_0x10a4cb(0x94)](_0x10a4cb(0x27b)+_0x11d932)),console[_0x10a4cb(0x17d)](a32_0x10437a[_0x10a4cb(0x247)]('\x20\x20\x20'+_0x44074e[_0x10a4cb(0x166)]['length']+_0x10a4cb(0xf5))),0x1;!_0x44074e[_0x10a4cb(0x231)]&&(_0x44074e[_0x10a4cb(0x231)]={'events':[{'name':_0x10a4cb(0x22c),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x10a4cb(0x27c),'type':'single'}],'id_stitching':{'primary_key':_0x44074e[_0x10a4cb(0x109)][_0x10a4cb(0x217)]==='customers'?'td_client_id':'user_id'}});_0x44074e[_0x10a4cb(0x166)]=[{'name':_0x10a4cb(0x242),'description':_0x10a4cb(0x1c8),'trigger_event':_0x10a4cb(0x22c),'sections':[{'name':_0x10a4cb(0x130),'criteria':'true','attributes':[_0x10a4cb(0x27c)]}]}];const _0x1184a2=serializeDef(_0x44074e);return writeFileSync(_0x11d932,_0x1184a2,_0x10a4cb(0x15f)),console[_0x10a4cb(0x17d)](a32_0x10437a[_0x10a4cb(0x96)]('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a32_0x10437a[_0x10a4cb(0x276)](_0x11d932)),(!_0x44074e['realtime']||_0x378783[_0x10a4cb(0x205)](_0x10a4cb(0x120))===-0x1)&&console['error'](a32_0x10437a[_0x10a4cb(0x96)]('✔')+_0x10a4cb(0x132)),console[_0x10a4cb(0x17d)]('\x0a'+a32_0x10437a['dim'](_0x10a4cb(0x1d9))),console[_0x10a4cb(0x17d)](_0x10a4cb(0x9e)+_0x11d932+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x10a4cb(0x17d)](_0x10a4cb(0x165)+a32_0x10437a[_0x10a4cb(0x247)](_0x10a4cb(0x221)+_0x223e29)+_0x10a4cb(0x113)),0x0;}}
|