@treasuredata/tdx 2026.4.1 → 2026.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-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/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/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/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 a31_0x1949a9=a31_0x51b0;(function(_0x576b86,_0x5d5d57){const _0x1efc12=a31_0x51b0,_0x55994a=_0x576b86();while(!![]){try{const _0x5366d8=-parseInt(_0x1efc12(0x391))/0x1*(-parseInt(_0x1efc12(0x22d))/0x2)+parseInt(_0x1efc12(0x2db))/0x3+-parseInt(_0x1efc12(0x3d0))/0x4+parseInt(_0x1efc12(0x374))/0x5*(-parseInt(_0x1efc12(0x25e))/0x6)+-parseInt(_0x1efc12(0x3d1))/0x7+parseInt(_0x1efc12(0x3aa))/0x8*(parseInt(_0x1efc12(0x39e))/0x9)+-parseInt(_0x1efc12(0x2ae))/0xa;if(_0x5366d8===_0x5d5d57)break;else _0x55994a['push'](_0x55994a['shift']());}catch(_0x4db4a6){_0x55994a['push'](_0x55994a['shift']());}}}(a31_0x5aa2,0x98224));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x4b81ea from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x5cfd3b from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x1949a9(0x34d),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x29a4dc){const _0x5708d9=a31_0x1949a9,_0x54193f=process[_0x5708d9(0x3cc)],_0x1ddbb6=_0x54193f===_0x5708d9(0x327)?_0x5708d9(0x1e9):_0x54193f==='win32'?_0x5708d9(0x285):_0x5708d9(0x38a);spawn(_0x1ddbb6,[_0x29a4dc],{'detached':!![],'stdio':_0x5708d9(0x3c5)})[_0x5708d9(0x32a)]();}function migrateLegacyDirectory(){const _0x5b469a=a31_0x1949a9;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x67bc66=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x67bc66[_0x5b469a(0x3d4)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x5b469a(0x1ce)](a31_0x5cfd3b[_0x5b469a(0x245)](_0x5b469a(0x345)+LEGACY_PARENT_SEGMENT_DIR+_0x5b469a(0x2d6)+PARENT_SEGMENT_DIR+_0x5b469a(0x244))),console[_0x5b469a(0x1ce)](a31_0x5cfd3b['dim'](_0x5b469a(0x37f)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x5b469a(0x1ce)](a31_0x5cfd3b['yellow']('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x5b469a(0x1ce)](a31_0x5cfd3b['green'](_0x5b469a(0x21c)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x43abb3){const _0x538f74=_0x43abb3 instanceof Error?_0x43abb3[_0x5b469a(0x364)]:String(_0x43abb3);return console[_0x5b469a(0x1ce)](a31_0x5cfd3b[_0x5b469a(0x3cb)](_0x5b469a(0x277)+_0x538f74+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x1949a9(0x3b7)](_0x5cd4fe){const _0x53de0f=a31_0x1949a9;return migrateLegacyDirectory(),super[_0x53de0f(0x3b7)](_0x5cd4fe);}}function resolveYamlFile(_0x10334e){const _0x43070c=a31_0x1949a9;if(_0x10334e[_0x43070c(0x226)](_0x43070c(0x2dc))||_0x10334e[_0x43070c(0x226)](_0x43070c(0x3b2)))return _0x10334e;return a31_0x4b81ea['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x10334e)+_0x43070c(0x2dc));}function formatProgressMessage(_0x52d423){const _0x212e06=a31_0x1949a9,_0x2e6031=_0x52d423[_0x212e06(0x257)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2e6031){const [,_0x2449be,_0x5d390e,_0x1a131f='']=_0x2e6031;return a31_0x5cfd3b['dim'](_0x2449be+':')+'\x20'+_0x5d390e+a31_0x5cfd3b[_0x212e06(0x333)](_0x1a131f);}return a31_0x5cfd3b[_0x212e06(0x333)](_0x52d423);}function showFileNotFoundError(_0x49b9c0,_0x2c2b32){const _0x6805e9=a31_0x1949a9;console[_0x6805e9(0x1ce)](a31_0x5cfd3b[_0x6805e9(0x3cb)]('Error:\x20File\x20not\x20found:\x20'+_0x49b9c0+'\x0a')),console['error'](a31_0x5cfd3b['cyan'](_0x6805e9(0x384)+_0x2c2b32+_0x6805e9(0x26d)));}function displayRealtimeValidation(_0xaf4255){const _0x9f6696=a31_0x1949a9;if(!_0xaf4255[_0x9f6696(0x26f)])return;const _0x4c9bc7=_0xaf4255[_0x9f6696(0x26f)],_0x1e25a5=_0x4c9bc7[_0x9f6696(0x1df)]?a31_0x5cfd3b[_0x9f6696(0x208)](_0x9f6696(0x296)):a31_0x5cfd3b[_0x9f6696(0x245)](_0x9f6696(0x25f));console[_0x9f6696(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x9f6696(0x333)](_0x9f6696(0x3d7))+'\x20'+_0x1e25a5);if(_0x4c9bc7['events']&&_0x4c9bc7['events']['length']>0x0){console[_0x9f6696(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x9f6696(0x333)]('Events:')+'\x20'+_0x4c9bc7['events']['length']+'\x20configured');for(const _0x146a49 of _0x4c9bc7[_0x9f6696(0x3b5)]){const _0x5ab1d9=_0x146a49[_0x9f6696(0x224)]===![]?a31_0x5cfd3b[_0x9f6696(0x3cb)]('✘'):a31_0x5cfd3b[_0x9f6696(0x208)]('✔');console[_0x9f6696(0x1ce)](_0x9f6696(0x22c)+_0x5ab1d9+'\x20'+_0x146a49[_0x9f6696(0x21d)]),_0x146a49[_0x9f6696(0x253)]&&console['error'](_0x9f6696(0x306)+a31_0x5cfd3b['red'](_0x146a49[_0x9f6696(0x253)]));}}if(_0x4c9bc7[_0x9f6696(0x398)]&&_0x4c9bc7['attributes'][_0x9f6696(0x2d4)]>0x0){console[_0x9f6696(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x9f6696(0x333)](_0x9f6696(0x395))+'\x20'+_0x4c9bc7[_0x9f6696(0x398)]['length']+_0x9f6696(0x3c6));for(const _0x31b031 of _0x4c9bc7[_0x9f6696(0x398)]){const _0x4933f6=_0x31b031['valid']?a31_0x5cfd3b[_0x9f6696(0x208)]('✔'):a31_0x5cfd3b[_0x9f6696(0x3cb)]('✘');console['error']('\x20\x20\x20\x20'+_0x4933f6+'\x20'+_0x31b031[_0x9f6696(0x21d)]+'\x20'+a31_0x5cfd3b['dim']('('+_0x31b031[_0x9f6696(0x357)]+')'));}}if(_0x4c9bc7[_0x9f6696(0x231)]){const _0x3e33f0=_0x4c9bc7[_0x9f6696(0x231)][_0x9f6696(0x1f8)]?.[_0x9f6696(0x2d4)]?'\x20+\x20['+_0x4c9bc7[_0x9f6696(0x231)][_0x9f6696(0x1f8)][_0x9f6696(0x2fb)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x5cfd3b['dim'](_0x9f6696(0x366))+'\x20'+_0x4c9bc7[_0x9f6696(0x231)][_0x9f6696(0x2c1)]+_0x3e33f0);}if(_0x4c9bc7[_0x9f6696(0x262)]&&_0x4c9bc7[_0x9f6696(0x262)][_0x9f6696(0x2d4)]>0x0){console[_0x9f6696(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x9f6696(0x333)](_0x9f6696(0x3a4))+'\x20'+_0x4c9bc7['personalizationServices'][_0x9f6696(0x2d4)]+'\x20service'+(_0x4c9bc7[_0x9f6696(0x262)][_0x9f6696(0x2d4)]!==0x1?'s':''));for(const _0x59ac80 of _0x4c9bc7[_0x9f6696(0x262)]){console[_0x9f6696(0x1ce)]('\x20\x20\x20\x20-\x20'+_0x59ac80[_0x9f6696(0x21d)]);}}}function showParentSegmentNotSetError(_0x736771){const _0x1a4b44=a31_0x1949a9;console[_0x1a4b44(0x1ce)](a31_0x5cfd3b[_0x1a4b44(0x245)](_0x1a4b44(0x38f))),console[_0x1a4b44(0x1ce)](_0x736771);}export class ParentSegmentListCommand extends BaseCommand{['name']='segment:parent:list';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x324);async[a31_0x1949a9(0x2fa)](_0x3393a9){const _0xfdf8ec=a31_0x1949a9,{options:_0x341ecc,args:_0x57a194,tdx:_0x13f243}=_0x3393a9,_0x467f6d=_0x57a194[0x0];_0x341ecc['verbose']&&(console[_0xfdf8ec(0x1ce)](_0xfdf8ec(0x239)+_0x341ecc[_0xfdf8ec(0x1ed)]),_0x467f6d&&console[_0xfdf8ec(0x1ce)](_0xfdf8ec(0x3c7)+_0x467f6d));const _0x2d31ac=await withSpinner(_0x467f6d?_0xfdf8ec(0x351)+_0x467f6d+_0xfdf8ec(0x385):'Listing\x20parent\x20segments...',()=>_0x13f243[_0xfdf8ec(0x2f0)][_0xfdf8ec(0x234)](),{'verbose':_0x341ecc['verbose']});let _0x1eed4d=_0x2d31ac[_0xfdf8ec(0x218)];if(_0x467f6d){const _0x361a49=_0x467f6d[_0xfdf8ec(0x275)](/[.+^${}()|[\]\\]/g,_0xfdf8ec(0x37a))[_0xfdf8ec(0x275)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4551ea=new RegExp('^'+_0x361a49+'$','i');_0x1eed4d=_0x1eed4d['filter'](_0x5d2185=>_0x4551ea[_0xfdf8ec(0x23c)](_0x5d2185[_0xfdf8ec(0x398)][_0xfdf8ec(0x21d)]));}_0x1eed4d['sort']((_0x1e529e,_0x5004e1)=>_0x1e529e['attributes'][_0xfdf8ec(0x21d)][_0xfdf8ec(0x25c)](_0x5004e1[_0xfdf8ec(0x398)][_0xfdf8ec(0x21d)])),console['error'](_0xfdf8ec(0x387)+_0x1eed4d[_0xfdf8ec(0x2d4)]+_0xfdf8ec(0x2f2)+(_0x1eed4d['length']!==0x1?'s':''));const _0x3a65f3=_0xcbec7b=>{const _0x4ce926=_0xfdf8ec;return getConsoleNextUrl(_0x341ecc['site'],_0x4ce926(0x375)+_0xcbec7b);};if(_0x341ecc[_0xfdf8ec(0x2ba)]==='json'||_0x341ecc[_0xfdf8ec(0x2ba)]==='jsonl'){const _0xf77a2d=_0x1eed4d[_0xfdf8ec(0x22e)](_0x2691e3=>({..._0x2691e3,'url':_0x3a65f3(_0x2691e3['id'])}));await handleSDKOutput(_0xf77a2d,_0x341ecc);}else{if(_0x1eed4d[_0xfdf8ec(0x2d4)]===0x0)_0x467f6d?console[_0xfdf8ec(0x36f)](_0xfdf8ec(0x1e6)+_0x467f6d):console['log']('No\x20parent\x20segments\x20found');else for(const _0x48452a of _0x1eed4d){const _0x2e8589=_0x48452a[_0xfdf8ec(0x398)][_0xfdf8ec(0x3da)]?a31_0x5cfd3b[_0xfdf8ec(0x333)]('\x20('+formatRows(_0x48452a['attributes']['population'])+')'):'',_0x3bc26c=hyperlink(_0x48452a['attributes'][_0xfdf8ec(0x21d)],_0x3a65f3(_0x48452a['id']));console[_0xfdf8ec(0x36f)](_0xfdf8ec(0x305)+_0x3bc26c+_0x2e8589);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2fd);['description']=a31_0x1949a9(0x24d);async[a31_0x1949a9(0x2fa)](_0x4e5eef){const _0x323bcc=a31_0x1949a9,{options:_0xf1f9c4,args:_0x365fca,tdx:_0x55696d}=_0x4e5eef;console['error'](_0x323bcc(0x29a)+_0x323bcc(0x204)+_0x323bcc(0x24b));const _0x41ff04=_0xf1f9c4;if(_0x365fca['length']===0x0)return console[_0x323bcc(0x1ce)](a31_0x5cfd3b['red'](_0x323bcc(0x200))),console[_0x323bcc(0x1ce)](_0x323bcc(0x238)),0x1;const _0x1271d8=_0x365fca[0x0];if(!_0x41ff04[_0x323bcc(0x381)]||!_0x41ff04[_0x323bcc(0x1dc)])return console[_0x323bcc(0x1ce)](_0x323bcc(0x1ec)),console[_0x323bcc(0x1ce)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x41ff04[_0x323bcc(0x265)]&&(console[_0x323bcc(0x1ce)](_0x323bcc(0x239)+_0x41ff04['site']),console[_0x323bcc(0x1ce)]('Name:\x20'+_0x1271d8),console['error']('Database:\x20'+_0x41ff04['database']),console[_0x323bcc(0x1ce)](_0x323bcc(0x25a)+_0x41ff04[_0x323bcc(0x1dc)]));const _0x50e1ad=await loadJSONFromOptions(_0x41ff04['attributes'],_0x41ff04['attributesFile']),_0x17c013=await loadJSONFromOptions(_0x41ff04[_0x323bcc(0x334)],_0x41ff04['behaviorsFile']),_0x42a045=await loadJSONFromOptions(_0x41ff04[_0x323bcc(0x256)],_0x41ff04[_0x323bcc(0x35b)]),_0x5a45a7={'name':_0x1271d8,'description':_0x41ff04['description'],'scheduleType':_0x41ff04[_0x323bcc(0x1d6)],'scheduleOption':_0x41ff04[_0x323bcc(0x20d)],'timezone':_0x41ff04[_0x323bcc(0x376)],'master':{'parentDatabaseName':_0x41ff04['database'],'parentTableName':_0x41ff04[_0x323bcc(0x1dc)]},'attributes':_0x50e1ad,'behaviors':_0x17c013,'customerGroup':_0x42a045},_0x2eaab3=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x1271d8+'\x27...',()=>_0x55696d[_0x323bcc(0x2f0)][_0x323bcc(0x38c)](_0x5a45a7),{'verbose':_0xf1f9c4[_0x323bcc(0x265)]}),_0x3e43ac=_0x2eaab3[_0x323bcc(0x218)];return console['error'](_0x323bcc(0x2e4)+_0x3e43ac[_0x323bcc(0x21d)]+_0x323bcc(0x302)+_0x3e43ac['id']),await handleSDKOutput([_0x3e43ac],_0xf1f9c4),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x24c);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x352);async[a31_0x1949a9(0x2fa)](_0x377abc){const _0x1cc7e5=a31_0x1949a9,{options:_0x1c5f7c,args:_0x10bd9d,tdx:_0x371739}=_0x377abc;console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x3ba)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x1cc7e5(0x24b));const _0x324a71=_0x1c5f7c;if(_0x10bd9d[_0x1cc7e5(0x2d4)]===0x0)return console[_0x1cc7e5(0x1ce)](a31_0x5cfd3b[_0x1cc7e5(0x3cb)](_0x1cc7e5(0x200))),console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x310)),0x1;const _0x376fcf=_0x10bd9d[0x0];_0x324a71[_0x1cc7e5(0x265)]&&(console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x239)+_0x324a71[_0x1cc7e5(0x1ed)]),console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x235)+_0x376fcf));const _0x176aee=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x376fcf+_0x1cc7e5(0x385),()=>_0x371739['segment'][_0x1cc7e5(0x360)](_0x376fcf),{'verbose':_0x324a71[_0x1cc7e5(0x265)]}),_0xe4a0b5=_0x176aee['data'],_0x196d17=await loadJSONFromOptions(_0x324a71[_0x1cc7e5(0x29e)],_0x324a71[_0x1cc7e5(0x33e)]),_0x2a0781=await loadJSONFromOptions(_0x324a71[_0x1cc7e5(0x266)],_0x324a71['addBehaviorsFile']),_0x5c886a={'name':_0xe4a0b5[_0x1cc7e5(0x21d)],'description':_0x324a71[_0x1cc7e5(0x237)]!==undefined?_0x324a71[_0x1cc7e5(0x237)]:_0xe4a0b5['description'],'scheduleType':_0x324a71[_0x1cc7e5(0x1d6)]!==undefined?_0x324a71[_0x1cc7e5(0x1d6)]:_0xe4a0b5['scheduleType'],'scheduleOption':_0x324a71[_0x1cc7e5(0x20d)]!==undefined?_0x324a71[_0x1cc7e5(0x20d)]:_0xe4a0b5[_0x1cc7e5(0x20d)],'timezone':_0x324a71[_0x1cc7e5(0x376)]!==undefined?_0x324a71[_0x1cc7e5(0x376)]:_0xe4a0b5['timezone'],'master':_0xe4a0b5[_0x1cc7e5(0x222)],'attributes':_0x196d17?[..._0xe4a0b5[_0x1cc7e5(0x398)]||[],..._0x196d17]:_0xe4a0b5[_0x1cc7e5(0x398)],'behaviors':_0x2a0781?[..._0xe4a0b5[_0x1cc7e5(0x334)]||[],..._0x2a0781]:_0xe4a0b5[_0x1cc7e5(0x334)],'customerGroup':_0xe4a0b5[_0x1cc7e5(0x256)]},_0x5af791=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x376fcf+_0x1cc7e5(0x385),()=>_0x371739[_0x1cc7e5(0x2f0)][_0x1cc7e5(0x2f9)](_0x376fcf,_0x5c886a),{'verbose':_0x324a71[_0x1cc7e5(0x265)]}),_0x557e2e=_0x5af791[_0x1cc7e5(0x218)];return console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x3a3)+_0x557e2e[_0x1cc7e5(0x21d)]+'\x27'),await handleSDKOutput([_0x557e2e],_0x324a71),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x3b8);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x291);async[a31_0x1949a9(0x2fa)](_0x149513){const _0x5bd02d=a31_0x1949a9,{options:_0x21f663,args:_0x4ad43f,tdx:_0x3bc0ec}=_0x149513,_0x4b8d06=_0x21f663,_0x507089=_0x4ad43f[0x0]||_0x21f663[_0x5bd02d(0x246)];if(!_0x507089)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x4b8d06[_0x5bd02d(0x240)]&&_0x4b8d06[_0x5bd02d(0x2fc)])return console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x3cb)](_0x5bd02d(0x250))),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b['dim'](_0x5bd02d(0x2ed))),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x333)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x282)](_0x5bd02d(0x2a5))),0x1;const _0x5e22d6=_0x4b8d06[_0x5bd02d(0x2fc)]||a31_0x4b81ea[_0x5bd02d(0x2fb)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x507089)+'.yml');_0x4b8d06[_0x5bd02d(0x265)]&&(console[_0x5bd02d(0x1ce)](_0x5bd02d(0x239)+_0x4b8d06[_0x5bd02d(0x1ed)]),console[_0x5bd02d(0x1ce)](_0x5bd02d(0x235)+_0x507089),console[_0x5bd02d(0x1ce)]('Output\x20file:\x20'+_0x5e22d6));const _0x1e650e=await withSpinner(_0x5bd02d(0x212)+_0x507089+_0x5bd02d(0x385),()=>_0x3bc0ec[_0x5bd02d(0x2f0)][_0x5bd02d(0x37b)](_0x507089),{'verbose':_0x4b8d06['verbose']}),_0x1b5026=_0x1e650e[_0x5bd02d(0x218)];if(existsSync(_0x5e22d6)){const _0x414262=readFileSync(_0x5e22d6,'utf-8'),_0x413d3e=generateDiff(_0x414262,_0x1b5026);if(!hasChanges(_0x413d3e))console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x208)]('✔')+_0x5bd02d(0x311)+a31_0x5cfd3b[_0x5bd02d(0x282)](_0x5e22d6)+_0x5bd02d(0x2b1));else{console[_0x5bd02d(0x1ce)](_0x5bd02d(0x3c9)+_0x5e22d6+'\x27:'),console[_0x5bd02d(0x1ce)]('─'[_0x5bd02d(0x32c)](0x3c)),console['error'](formatDiffWithColors(_0x413d3e)),console[_0x5bd02d(0x1ce)]('─'['repeat'](0x3c));if(!_0x4b8d06[_0x5bd02d(0x38e)]){if(!isInteractive())return console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x3cb)]('\x0aError:'),_0x5bd02d(0x1d2)),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x333)](_0x5bd02d(0x339))),0x1;const _0x5c952c=await confirmKey('Overwrite\x20\x27'+_0x5e22d6+'\x27?');if(!_0x5c952c)return console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x245)](_0x5bd02d(0x372))),0x1;}writeFileSync(_0x5e22d6,_0x1b5026,_0x5bd02d(0x1ff)),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b['green']('✔')+_0x5bd02d(0x2a1)+a31_0x5cfd3b[_0x5bd02d(0x282)](_0x5e22d6));}}else{const _0x36bb66=a31_0x4b81ea[_0x5bd02d(0x2b9)](_0x5e22d6);!existsSync(_0x36bb66)&&mkdirSync(_0x36bb66,{'recursive':!![]}),writeFileSync(_0x5e22d6,_0x1b5026,_0x5bd02d(0x1ff)),console['error'](a31_0x5cfd3b[_0x5bd02d(0x208)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x5cfd3b['cyan'](_0x5e22d6));}return saveSessionContext({'parent_segment':_0x507089},_0x4b8d06['session']),console['error'](a31_0x5cfd3b['green']('✔')+_0x5bd02d(0x297)+a31_0x5cfd3b[_0x5bd02d(0x333)](_0x5bd02d(0x304))+_0x5bd02d(0x350)+a31_0x5cfd3b[_0x5bd02d(0x282)](_0x507089)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]='segment:parent:push';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2d3);async[a31_0x1949a9(0x2fa)](_0x1b940d){const _0x56d2a3=a31_0x1949a9,{options:_0x17b53d,args:_0x5d169e,tdx:_0x155c6e}=_0x1b940d,_0x48a735=_0x17b53d,_0x26715a=_0x5d169e[0x0]||_0x17b53d[_0x56d2a3(0x246)];if(!_0x26715a)return showParentSegmentNotSetError(_0x56d2a3(0x30a)+_0x56d2a3(0x255)),0x1;const _0xca1987=resolveYamlFile(_0x26715a);if(!existsSync(_0xca1987))return showFileNotFoundError(_0xca1987,_0x26715a),0x1;_0x48a735['verbose']&&(console[_0x56d2a3(0x1ce)]('Site:\x20'+_0x48a735[_0x56d2a3(0x1ed)]),console[_0x56d2a3(0x1ce)](_0x56d2a3(0x330)+_0xca1987));let _0xb404de;try{_0xb404de=readFileSync(_0xca1987,'utf-8');}catch(_0x1bc835){const _0x51d831=_0x1bc835 instanceof Error?_0x1bc835[_0x56d2a3(0x364)]:String(_0x1bc835);return console['error'](_0x56d2a3(0x332)+_0x51d831),0x1;}const _0x342d6e=await withSpinner(_0x56d2a3(0x33a),()=>_0x155c6e[_0x56d2a3(0x2f0)][_0x56d2a3(0x223)](_0xb404de),{'verbose':_0x48a735[_0x56d2a3(0x265)]}),_0x32f683=_0x342d6e[_0x56d2a3(0x218)],{isNew:_0x4bc3ac,name:_0x1fa55d,hasChanges:_0x4366ad,diffFormatted:_0x183b4d}=_0x32f683;if(!_0x4366ad)return console[_0x56d2a3(0x1ce)](_0x56d2a3(0x313)+_0x1fa55d+_0x56d2a3(0x39c)),0x0;_0x4bc3ac?console[_0x56d2a3(0x1ce)](_0x56d2a3(0x39d)+_0x1fa55d+'\x27:'):console[_0x56d2a3(0x1ce)](_0x56d2a3(0x39b)+_0x1fa55d+'\x27:');console[_0x56d2a3(0x1ce)]('─'[_0x56d2a3(0x32c)](0x3c)),console['error'](_0x183b4d),console[_0x56d2a3(0x1ce)]('─'[_0x56d2a3(0x32c)](0x3c));const _0x1663e6=_0x4bc3ac?_0x56d2a3(0x236)+_0x1fa55d+'\x27?':_0x56d2a3(0x3b1)+_0x1fa55d+'\x27?';if(!_0x48a735['yes']){if(!isInteractive())return console['error'](a31_0x5cfd3b[_0x56d2a3(0x3cb)](_0x56d2a3(0x318)),_0x56d2a3(0x1d2)),console['error'](a31_0x5cfd3b['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3cce42=await confirmKey(_0x1663e6);if(!_0x3cce42)return console[_0x56d2a3(0x1ce)](a31_0x5cfd3b[_0x56d2a3(0x245)](_0x56d2a3(0x372))),0x1;}const _0x2f7e40=_0x4bc3ac?'Creating':_0x56d2a3(0x1f0),_0x29e060=await withSpinner(_0x2f7e40+_0x56d2a3(0x3a9)+_0x1fa55d+'\x27...',()=>_0x32f683[_0x56d2a3(0x3a7)](),{'verbose':_0x48a735['verbose']}),_0x54847d=_0x29e060[_0x56d2a3(0x218)],_0x2701b4=getConsoleNextUrl(_0x48a735[_0x56d2a3(0x1ed)],'/app/dw/parentSegments/'+_0x54847d['id']),_0x581ddd=_0x4bc3ac?'Created':_0x56d2a3(0x283);return console[_0x56d2a3(0x1ce)]('✔\x20'+_0x581ddd+_0x56d2a3(0x3a9)+_0x54847d[_0x56d2a3(0x21d)]+'\x27'),console[_0x56d2a3(0x1ce)]('\x20\x20'+_0x2701b4),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x326);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x20c);async[a31_0x1949a9(0x2fa)](_0x3b6d9d){const _0x52bf60=a31_0x1949a9,{options:_0x1a8239,args:_0x4e46f3,tdx:_0x4534b8}=_0x3b6d9d,_0x4e8b2c=_0x1a8239,_0x1ed957=_0x4e46f3[0x0]||_0x1a8239[_0x52bf60(0x246)];if(!_0x1ed957)return showParentSegmentNotSetError(_0x52bf60(0x243)+_0x52bf60(0x2a0)+_0x52bf60(0x2b5)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x52bf60(0x32d)+_0x52bf60(0x2af)),0x1;const _0x30a53d=resolveYamlFile(_0x1ed957);if(!existsSync(_0x30a53d))return showFileNotFoundError(_0x30a53d,_0x1ed957),0x1;_0x4e8b2c[_0x52bf60(0x265)]&&(console['error'](_0x52bf60(0x239)+_0x4e8b2c['site']),console[_0x52bf60(0x1ce)](_0x52bf60(0x330)+_0x30a53d));let _0xa3e778;try{_0xa3e778=readFileSync(_0x30a53d,'utf-8');}catch(_0x545dae){const _0x2dc1f6=_0x545dae instanceof Error?_0x545dae[_0x52bf60(0x364)]:String(_0x545dae);return console[_0x52bf60(0x1ce)]('Error\x20reading\x20file:\x20'+_0x2dc1f6),0x1;}const _0x793f22=createCommandSpinner(a31_0x5cfd3b[_0x52bf60(0x333)](_0x52bf60(0x3b3)),{'verbose':_0x4e8b2c[_0x52bf60(0x265)]});_0x793f22[_0x52bf60(0x285)]();const _0x145bea={'onProgress':_0x572e94=>{const _0x2ce75f=_0x52bf60;_0x793f22[_0x2ce75f(0x2ff)]=formatProgressMessage(_0x572e94);}};if(_0x4e8b2c[_0x52bf60(0x222)])_0x145bea[_0x52bf60(0x222)]=!![];if(_0x4e8b2c['enriched'])_0x145bea[_0x52bf60(0x2d9)]=!![];_0x4e8b2c[_0x52bf60(0x3d3)]&&(_0x145bea[_0x52bf60(0x3d3)]=_0x4e8b2c[_0x52bf60(0x3d3)]);_0x4e8b2c['behavior']&&(_0x145bea[_0x52bf60(0x2c2)]=_0x4e8b2c[_0x52bf60(0x2c2)]);if(_0x4e8b2c[_0x52bf60(0x2bf)])_0x145bea[_0x52bf60(0x2bf)]=_0x4e8b2c[_0x52bf60(0x2bf)];let _0x10da60;try{_0x10da60=await _0x4534b8[_0x52bf60(0x2f0)][_0x52bf60(0x258)](_0xa3e778,_0x145bea),_0x793f22[_0x52bf60(0x3a0)]();}catch(_0x272685){_0x793f22[_0x52bf60(0x3a0)]();throw _0x272685;}const _0x5af827=_0x4e8b2c[_0x52bf60(0x2bf)]||_0x52bf60(0x1cf);return this['displayValidateResults'](_0x10da60,_0x145bea,_0x30a53d,_0x5af827),_0x10da60[_0x52bf60(0x1f4)]?0x0:0x1;}[a31_0x1949a9(0x3db)](_0x28c7ee,_0x50da4a,_0x15648e,_0x2d69e5){const _0x33349d=a31_0x1949a9;console[_0x33349d(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x33349d(0x393)](_0x33349d(0x272))+'\x20'+_0x28c7ee[_0x33349d(0x21d)]),console[_0x33349d(0x1ce)]('═'['repeat'](0x3c)),this['displayMasterInfo'](_0x28c7ee);if(typeof _0x50da4a['attribute']===_0x33349d(0x2cb)){this['displayAttributesStats'](_0x28c7ee),this[_0x33349d(0x26e)](_0x28c7ee),this[_0x33349d(0x242)](_0x15648e,_0x2d69e5,_0x33349d(0x3d3),_0x50da4a[_0x33349d(0x3d3)]);return;}if(_0x50da4a[_0x33349d(0x3d3)]===!![]){this[_0x33349d(0x309)](_0x28c7ee),this[_0x33349d(0x26e)](_0x28c7ee),this[_0x33349d(0x242)](_0x15648e,_0x2d69e5,_0x33349d(0x398));return;}if(typeof _0x50da4a[_0x33349d(0x2c2)]===_0x33349d(0x2cb)){this[_0x33349d(0x202)](_0x28c7ee,_0x2d69e5),this[_0x33349d(0x26e)](_0x28c7ee),this['displayPreviewHints'](_0x15648e,_0x2d69e5,_0x33349d(0x2c2),_0x50da4a[_0x33349d(0x2c2)]);return;}if(_0x50da4a[_0x33349d(0x2c2)]===!![]){this[_0x33349d(0x202)](_0x28c7ee,_0x2d69e5),this[_0x33349d(0x26e)](_0x28c7ee),this[_0x33349d(0x242)](_0x15648e,_0x2d69e5,_0x33349d(0x334));return;}this[_0x33349d(0x309)](_0x28c7ee),this[_0x33349d(0x202)](_0x28c7ee,_0x2d69e5),this[_0x33349d(0x2ef)](_0x28c7ee),this[_0x33349d(0x26e)](_0x28c7ee),this['displayPreviewHints'](_0x15648e,_0x2d69e5,_0x33349d(0x3a1));}[a31_0x1949a9(0x2ef)](_0x4fd8f7){displayRealtimeValidation(_0x4fd8f7);}[a31_0x1949a9(0x242)](_0x5bd135,_0x18551a,_0x3c9a17,_0x3f06cd){const _0x886ea1=a31_0x1949a9;console['error']('\x0a'+a31_0x5cfd3b['dim'](_0x886ea1(0x249)));const _0x9e0fd3=_0x18551a!==_0x886ea1(0x1cf)?_0x886ea1(0x2bd)+_0x18551a:'';if(_0x3c9a17===_0x886ea1(0x3d3)&&_0x3f06cd)console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x886ea1(0x3bc)+_0x5bd135+'\x20--attribute\x20\x22'+_0x3f06cd+'\x22'+_0x9e0fd3));else{if(_0x3c9a17===_0x886ea1(0x2c2)&&_0x3f06cd)console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x886ea1(0x333)]('tdx\x20ps\x20preview\x20'+_0x5bd135+'\x20--behavior\x20\x22'+_0x3f06cd+'\x22'+_0x9e0fd3));else(_0x3c9a17==='attributes'||_0x3c9a17===_0x886ea1(0x3a1))&&console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim']('tdx\x20ps\x20preview\x20'+_0x5bd135+'\x20--attribute\x20\x22<name>\x22'+_0x9e0fd3));}(_0x3c9a17===_0x886ea1(0x334)||_0x3c9a17===_0x886ea1(0x3a1))&&console['error']('\x20\x20'+a31_0x5cfd3b[_0x886ea1(0x333)]('tdx\x20ps\x20preview\x20'+_0x5bd135+_0x886ea1(0x331)+_0x9e0fd3)),_0x3c9a17===_0x886ea1(0x3a1)&&console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x886ea1(0x3bc)+_0x5bd135+_0x886ea1(0x26a)+_0x9e0fd3));}[a31_0x1949a9(0x30c)](_0xf9b1e2){const _0x17861f=a31_0x1949a9,{master:_0x39693e}=_0xf9b1e2,_0x422f59=_0x39693e[_0x17861f(0x329)]?a31_0x5cfd3b['green']('✔'):a31_0x5cfd3b['red']('✘');console[_0x17861f(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x17861f(0x333)](_0x17861f(0x368))),console[_0x17861f(0x1ce)](_0x422f59+'\x20'+a31_0x5cfd3b['bold'](_0x39693e['database']+'.'+_0x39693e['table'])),_0x39693e['schemaValid']?_0x39693e[_0x17861f(0x365)]!==undefined&&console[_0x17861f(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim']('Rows:')+'\x20'+a31_0x5cfd3b[_0x17861f(0x282)](formatRows(_0x39693e[_0x17861f(0x365)]))):console[_0x17861f(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x17861f(0x3cb)]('Error:')+'\x20'+_0x39693e[_0x17861f(0x2e8)]);}['displayAttributesStats'](_0x2b843b){const _0x8c0c0=a31_0x1949a9;if(_0x2b843b['attributes'][_0x8c0c0(0x2d4)]===0x0)return;console[_0x8c0c0(0x1ce)]('\x0a'+a31_0x5cfd3b['dim'](_0x8c0c0(0x251)));for(const _0x4cfd85 of _0x2b843b[_0x8c0c0(0x398)]){const _0x248b78=_0x4cfd85[_0x8c0c0(0x329)]?a31_0x5cfd3b[_0x8c0c0(0x208)]('✔'):a31_0x5cfd3b[_0x8c0c0(0x3cb)]('✘');let _0x10dc54='';if(_0x4cfd85[_0x8c0c0(0x329)]&&_0x4cfd85[_0x8c0c0(0x254)]!==undefined&&_0x4cfd85[_0x8c0c0(0x2c3)]!==undefined){const _0x2e1c27=_0x4cfd85['coveragePercent'][_0x8c0c0(0x2a2)](0x1),_0x1305c6=_0x4cfd85['coveragePercent']>=0x50?a31_0x5cfd3b[_0x8c0c0(0x208)]:_0x4cfd85[_0x8c0c0(0x2c3)]>=0x32?a31_0x5cfd3b[_0x8c0c0(0x245)]:a31_0x5cfd3b[_0x8c0c0(0x3cb)];_0x10dc54='\x20'+a31_0x5cfd3b['dim'](_0x8c0c0(0x389))+'\x20'+_0x1305c6(_0x2e1c27+'%')+'\x20('+formatRows(_0x4cfd85[_0x8c0c0(0x254)])+_0x8c0c0(0x298);}console[_0x8c0c0(0x1ce)](_0x248b78+'\x20'+a31_0x5cfd3b[_0x8c0c0(0x393)](_0x4cfd85[_0x8c0c0(0x21d)])+_0x10dc54),console[_0x8c0c0(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x8c0c0(0x333)](_0x8c0c0(0x3de))+'\x20'+a31_0x5cfd3b[_0x8c0c0(0x393)](_0x4cfd85[_0x8c0c0(0x381)]+'.'+_0x4cfd85[_0x8c0c0(0x1dc)]));const _0x2b601a=_0x4cfd85['joinKey']===_0x4cfd85[_0x8c0c0(0x3b6)]?a31_0x5cfd3b[_0x8c0c0(0x333)](_0x8c0c0(0x1f3))+'\x20'+_0x4cfd85['joinKey']:a31_0x5cfd3b[_0x8c0c0(0x333)]('Join:')+'\x20'+_0x4cfd85[_0x8c0c0(0x342)]+_0x8c0c0(0x350)+_0x4cfd85['foreignKey'];console[_0x8c0c0(0x1ce)]('\x20\x20'+_0x2b601a),console[_0x8c0c0(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x8c0c0(0x333)]('Columns:')),this[_0x8c0c0(0x2cc)](_0x4cfd85[_0x8c0c0(0x335)]),!_0x4cfd85[_0x8c0c0(0x329)]&&console[_0x8c0c0(0x1ce)]('\x20\x20'+a31_0x5cfd3b['red'](_0x8c0c0(0x3ce))+'\x20'+_0x4cfd85[_0x8c0c0(0x2e8)]);}}[a31_0x1949a9(0x202)](_0x569b11,_0x5b5321){const _0x1453d9=a31_0x1949a9;if(_0x569b11[_0x1453d9(0x334)][_0x1453d9(0x2d4)]===0x0)return;console[_0x1453d9(0x1ce)]('\x0a'+a31_0x5cfd3b['dim'](_0x1453d9(0x2cf))+'\x20'+a31_0x5cfd3b[_0x1453d9(0x333)]('('+_0x5b5321+')'));for(const _0x34b34c of _0x569b11[_0x1453d9(0x334)]){const _0x50e3a3=_0x34b34c[_0x1453d9(0x329)]?a31_0x5cfd3b[_0x1453d9(0x208)]('✔'):a31_0x5cfd3b[_0x1453d9(0x3cb)]('✘');let _0x5f553b='';if(_0x34b34c[_0x1453d9(0x329)]&&_0x34b34c[_0x1453d9(0x3bd)]!==undefined&&_0x34b34c[_0x1453d9(0x2b6)]!==undefined){const _0x3ef6ee=_0x34b34c[_0x1453d9(0x2ec)]?.['toFixed'](0x1)||'?',_0xcebefd=(_0x34b34c[_0x1453d9(0x2ec)]??0x0)>=0x32?a31_0x5cfd3b[_0x1453d9(0x208)]:(_0x34b34c[_0x1453d9(0x2ec)]??0x0)>=0x14?a31_0x5cfd3b['yellow']:a31_0x5cfd3b[_0x1453d9(0x3cb)];_0x5f553b='\x20'+a31_0x5cfd3b[_0x1453d9(0x333)](_0x1453d9(0x1ea))+'\x20'+_0xcebefd(formatRows(_0x34b34c[_0x1453d9(0x3bd)]))+'\x20('+_0x3ef6ee+_0x1453d9(0x3dc)+a31_0x5cfd3b[_0x1453d9(0x333)](_0x1453d9(0x247))+'\x20'+a31_0x5cfd3b[_0x1453d9(0x282)](formatRows(_0x34b34c[_0x1453d9(0x2b6)]));}console[_0x1453d9(0x1ce)](_0x50e3a3+'\x20'+a31_0x5cfd3b['bold'](_0x34b34c[_0x1453d9(0x21d)])+_0x5f553b),console[_0x1453d9(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x1453d9(0x3de))+'\x20'+a31_0x5cfd3b[_0x1453d9(0x393)](_0x34b34c['database']+'.'+_0x34b34c[_0x1453d9(0x1dc)]));const _0x5d354a=_0x34b34c['joinKey']===_0x34b34c[_0x1453d9(0x3b6)]?a31_0x5cfd3b[_0x1453d9(0x333)](_0x1453d9(0x1f3))+'\x20'+_0x34b34c[_0x1453d9(0x342)]:a31_0x5cfd3b['dim'](_0x1453d9(0x2eb))+'\x20'+_0x34b34c[_0x1453d9(0x342)]+_0x1453d9(0x350)+_0x34b34c[_0x1453d9(0x3b6)];console[_0x1453d9(0x1ce)]('\x20\x20'+_0x5d354a),console[_0x1453d9(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x1453d9(0x333)]('Columns:')),this[_0x1453d9(0x2cc)](_0x34b34c[_0x1453d9(0x335)]),!_0x34b34c[_0x1453d9(0x329)]&&console[_0x1453d9(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x1453d9(0x3cb)](_0x1453d9(0x3ce))+'\x20'+_0x34b34c[_0x1453d9(0x2e8)]);}}[a31_0x1949a9(0x2cc)](_0x5016ab){const _0x11ad3f=a31_0x1949a9;for(const _0x8524d8 of _0x5016ab){_0x8524d8[_0x11ad3f(0x354)]===_0x8524d8[_0x11ad3f(0x274)]||_0x8524d8[_0x11ad3f(0x274)]==='*'?console[_0x11ad3f(0x1ce)]('\x20\x20\x20\x20-\x20'+_0x8524d8[_0x11ad3f(0x354)]):console['error']('\x20\x20\x20\x20-\x20'+_0x8524d8[_0x11ad3f(0x354)]+'\x20'+a31_0x5cfd3b[_0x11ad3f(0x333)]('('+_0x8524d8[_0x11ad3f(0x274)]+')'));}}[a31_0x1949a9(0x26e)](_0x59e6f8){const _0x591389=a31_0x1949a9;console[_0x591389(0x1ce)]('─'[_0x591389(0x32c)](0x3c));if(_0x59e6f8[_0x591389(0x1fc)]['length']>0x0){console['error']('\x0a'+a31_0x5cfd3b['red'](_0x591389(0x2ac)));for(const _0x5b1980 of _0x59e6f8[_0x591389(0x1fc)]){console[_0x591389(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x591389(0x3cb)]('•')+'\x20'+_0x5b1980);}}_0x59e6f8[_0x591389(0x1f4)]&&console[_0x591389(0x1ce)]('\x0a'+a31_0x5cfd3b['green']('✔')+_0x591389(0x2ee));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x33c);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x373);async[a31_0x1949a9(0x2fa)](_0x549e41){const _0x2e0406=a31_0x1949a9,{options:_0x370b8a,args:_0x4bfdbb,tdx:_0x17a476}=_0x549e41,_0x3946af=_0x370b8a,_0x4435f9=_0x4bfdbb[0x0]||_0x370b8a[_0x2e0406(0x246)];if(!_0x4435f9)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+_0x2e0406(0x2a7)+_0x2e0406(0x39f)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+'\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'+_0x2e0406(0x3a5)+_0x2e0406(0x2af)),0x1;if(!_0x3946af[_0x2e0406(0x222)]&&!_0x3946af['attribute']&&!_0x3946af['behavior']&&!_0x3946af[_0x2e0406(0x2d9)])return console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x219))),console[_0x2e0406(0x1ce)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console[_0x2e0406(0x1ce)](_0x2e0406(0x2b7)),console[_0x2e0406(0x1ce)](_0x2e0406(0x22b)),console['error'](_0x2e0406(0x392)),console[_0x2e0406(0x1ce)](_0x2e0406(0x38d)),console['error']('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x33f425=resolveYamlFile(_0x4435f9);if(!existsSync(_0x33f425))return showFileNotFoundError(_0x33f425,_0x4435f9),0x1;_0x3946af['verbose']&&(console[_0x2e0406(0x1ce)](_0x2e0406(0x239)+_0x3946af[_0x2e0406(0x1ed)]),console[_0x2e0406(0x1ce)]('YAML\x20file:\x20'+_0x33f425));let _0x22d1de;try{_0x22d1de=readFileSync(_0x33f425,'utf-8');}catch(_0x5bf426){const _0x153011=_0x5bf426 instanceof Error?_0x5bf426[_0x2e0406(0x364)]:String(_0x5bf426);return console[_0x2e0406(0x1ce)](_0x2e0406(0x332)+_0x153011),0x1;}let _0x374cf2;try{_0x374cf2=parseDef(_0x22d1de);}catch(_0x3144f1){const _0x186b6f=_0x3144f1 instanceof Error?_0x3144f1[_0x2e0406(0x364)]:String(_0x3144f1);return console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x26b)+_0x186b6f)),0x1;}if(_0x3946af[_0x2e0406(0x3d3)]===!![]||_0x3946af[_0x2e0406(0x3d3)]===''){const _0x4cbc4c=_0x374cf2[_0x2e0406(0x398)]?.[_0x2e0406(0x22e)](_0x3ca097=>_0x3ca097['name'])||[];if(_0x4cbc4c[_0x2e0406(0x2d4)]===0x0)console[_0x2e0406(0x1ce)](a31_0x5cfd3b['red']('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x390))),console[_0x2e0406(0x1ce)](_0x2e0406(0x2f8));for(const _0x34892c of _0x4cbc4c){console[_0x2e0406(0x1ce)]('\x20\x20'+a31_0x5cfd3b['cyan'](_0x34892c));}console[_0x2e0406(0x1ce)](_0x2e0406(0x260)+_0x4435f9+_0x2e0406(0x377)+_0x4cbc4c[0x0]+'\x22');}return 0x1;}if(_0x3946af[_0x2e0406(0x2c2)]===!![]||_0x3946af[_0x2e0406(0x2c2)]===''){const _0x2a78ae=_0x374cf2['behaviors']?.['map'](_0xb2f39d=>_0xb2f39d[_0x2e0406(0x21d)])||[];if(_0x2a78ae[_0x2e0406(0x2d4)]===0x0)console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x30d)));else{console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x3ae))),console[_0x2e0406(0x1ce)](_0x2e0406(0x1fb));for(const _0x2d147b of _0x2a78ae){console[_0x2e0406(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x2e0406(0x282)](_0x2d147b));}console[_0x2e0406(0x1ce)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x4435f9+_0x2e0406(0x2ca)+_0x2a78ae[0x0]+'\x22');}return 0x1;}const _0x34c047=createCommandSpinner(a31_0x5cfd3b[_0x2e0406(0x333)](_0x2e0406(0x241)),{'verbose':_0x3946af[_0x2e0406(0x265)]});_0x34c047[_0x2e0406(0x285)]();const _0x1c6622={'onProgress':_0x3bc1d2=>{const _0xa0926=_0x2e0406;_0x34c047[_0xa0926(0x2ff)]=formatProgressMessage(_0x3bc1d2);}};if(_0x3946af[_0x2e0406(0x222)])_0x1c6622[_0x2e0406(0x222)]=!![];if(_0x3946af[_0x2e0406(0x3d3)]&&typeof _0x3946af[_0x2e0406(0x3d3)]===_0x2e0406(0x2cb))_0x1c6622['attribute']=_0x3946af[_0x2e0406(0x3d3)];if(_0x3946af[_0x2e0406(0x2c2)]&&typeof _0x3946af[_0x2e0406(0x2c2)]===_0x2e0406(0x2cb))_0x1c6622[_0x2e0406(0x2c2)]=_0x3946af[_0x2e0406(0x2c2)];if(_0x3946af[_0x2e0406(0x2d9)])_0x1c6622[_0x2e0406(0x2d9)]=!![];if(_0x3946af['interval'])_0x1c6622[_0x2e0406(0x2bf)]=_0x3946af[_0x2e0406(0x2bf)];let _0x178a58;try{_0x178a58=await _0x17a476['segment'][_0x2e0406(0x1f2)](_0x22d1de,_0x1c6622),_0x34c047['stop']();}catch(_0x241676){_0x34c047[_0x2e0406(0x3a0)]();throw _0x241676;}return await this[_0x2e0406(0x31a)](_0x178a58,{'master':_0x3946af[_0x2e0406(0x222)],'attribute':typeof _0x3946af['attribute']===_0x2e0406(0x2cb)?_0x3946af[_0x2e0406(0x3d3)]:undefined,'behavior':typeof _0x3946af['behavior']===_0x2e0406(0x2cb)?_0x3946af[_0x2e0406(0x2c2)]:undefined,'enriched':_0x3946af['enriched']}),_0x178a58[_0x2e0406(0x1f4)]?0x0:0x1;}async[a31_0x1949a9(0x31a)](_0x5a0e4c,_0x57796c){const _0x168ad1=a31_0x1949a9;console[_0x168ad1(0x1ce)]('\x0a'+a31_0x5cfd3b['bold'](_0x168ad1(0x210))+'\x20'+_0x5a0e4c[_0x168ad1(0x21d)]),console['error']('═'[_0x168ad1(0x32c)](0x3c));if(_0x57796c[_0x168ad1(0x222)]&&_0x5a0e4c['sampleData']){const _0x2d80d3=a31_0x5cfd3b[_0x168ad1(0x333)](_0x168ad1(0x289))+'\x20'+a31_0x5cfd3b[_0x168ad1(0x393)](_0x5a0e4c['master'][_0x168ad1(0x381)]+'.'+_0x5a0e4c[_0x168ad1(0x222)]['table']);await this[_0x168ad1(0x1e2)](_0x2d80d3,_0x5a0e4c[_0x168ad1(0x314)]);}else{if(_0x57796c['attribute']&&_0x5a0e4c[_0x168ad1(0x314)]){const _0x258305=a31_0x5cfd3b[_0x168ad1(0x333)](_0x168ad1(0x32e))+'\x20'+a31_0x5cfd3b['bold'](_0x57796c[_0x168ad1(0x3d3)]);await this[_0x168ad1(0x1e2)](_0x258305,_0x5a0e4c[_0x168ad1(0x314)]);}else{if(_0x57796c[_0x168ad1(0x2c2)]&&_0x5a0e4c[_0x168ad1(0x314)]){const _0x46c92e=a31_0x5cfd3b[_0x168ad1(0x333)]('Behavior:')+'\x20'+a31_0x5cfd3b[_0x168ad1(0x393)](_0x57796c[_0x168ad1(0x2c2)]);await this[_0x168ad1(0x1e2)](_0x46c92e,_0x5a0e4c[_0x168ad1(0x314)]);}else{if(_0x57796c[_0x168ad1(0x2d9)]&&_0x5a0e4c['sampleData']){const _0x3b841=a31_0x5cfd3b[_0x168ad1(0x333)](_0x168ad1(0x2b4))+'\x20'+a31_0x5cfd3b['bold'](_0x168ad1(0x33d));await this['displaySampleData'](_0x3b841,_0x5a0e4c[_0x168ad1(0x314)]);}else!_0x5a0e4c[_0x168ad1(0x314)]&&console[_0x168ad1(0x1ce)](_0x168ad1(0x3d8));}}}if(_0x5a0e4c[_0x168ad1(0x1fc)][_0x168ad1(0x2d4)]>0x0){console[_0x168ad1(0x1ce)]('─'[_0x168ad1(0x32c)](0x3c)),console[_0x168ad1(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x168ad1(0x3cb)](_0x168ad1(0x2ac)));for(const _0x4fcddd of _0x5a0e4c[_0x168ad1(0x1fc)]){console['error']('\x20\x20'+a31_0x5cfd3b[_0x168ad1(0x3cb)]('•')+'\x20'+_0x4fcddd);}}}async[a31_0x1949a9(0x1e2)](_0x40d75f,_0x43476f){const _0x46f7d5=a31_0x1949a9;if(_0x43476f[_0x46f7d5(0x2d4)]===0x0){console[_0x46f7d5(0x1ce)]('\x0a'+_0x40d75f),console['error'](_0x46f7d5(0x34f));return;}console['error']('\x0a'+_0x40d75f);const _0x2a9997=Object[_0x46f7d5(0x28a)](_0x43476f[0x0])[_0x46f7d5(0x22e)](_0x290d95=>({'name':_0x290d95,'type':typeof _0x43476f[0x0][_0x290d95]===_0x46f7d5(0x31f)?'double':_0x46f7d5(0x233)})),_0x19edc7={'queryId':_0x46f7d5(0x3bb),'columns':_0x2a9997,'data':_0x43476f,'stats':{'state':_0x46f7d5(0x1e4),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x43476f[_0x46f7d5(0x2d4)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xdf07d1=formatAsTable(_0x19edc7,_0x43476f[_0x46f7d5(0x2d4)],!![]);await writeOutput(_0xdf07d1,undefined,_0x46f7d5(0x1dc));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2d0);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2f5);async[a31_0x1949a9(0x2fa)](_0x106699){const _0x301749=a31_0x1949a9,{options:_0x3829c8,args:_0x286286,tdx:_0x1a0f3b}=_0x106699,_0x359def=_0x3829c8,_0x11b02a=_0x286286[0x0]||_0x3829c8[_0x301749(0x246)];if(!_0x11b02a)return showParentSegmentNotSetError(_0x301749(0x292)+_0x301749(0x30e)),0x1;const _0x2739ff=resolveYamlFile(_0x11b02a);if(existsSync(_0x2739ff)){_0x359def[_0x301749(0x265)]&&console['error'](_0x301749(0x287)+_0x2739ff);let _0x275649;try{_0x275649=readFileSync(_0x2739ff,'utf-8');}catch(_0x101080){const _0xe194a=_0x101080 instanceof Error?_0x101080[_0x301749(0x364)]:String(_0x101080);return console[_0x301749(0x1ce)](_0x301749(0x332)+_0xe194a),0x1;}const _0x547a0e=await withSpinner(_0x301749(0x33a),()=>_0x1a0f3b[_0x301749(0x2f0)][_0x301749(0x223)](_0x275649),{'verbose':_0x359def[_0x301749(0x265)]}),_0x4b1110=_0x547a0e['data'],{isNew:_0x52c9c5,name:_0x4b6c0f,hasChanges:_0x2eceba,diffFormatted:_0x5cbc94}=_0x4b1110;if(_0x2eceba){_0x52c9c5?console['error'](_0x301749(0x39d)+_0x4b6c0f+'\x27:'):console[_0x301749(0x1ce)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x4b6c0f+'\x27:');console[_0x301749(0x1ce)]('─'[_0x301749(0x32c)](0x3c)),console['error'](_0x5cbc94),console[_0x301749(0x1ce)]('─'[_0x301749(0x32c)](0x3c));const _0x146927=_0x52c9c5?_0x301749(0x236)+_0x4b6c0f+_0x301749(0x217):_0x301749(0x3b1)+_0x4b6c0f+_0x301749(0x217);if(!_0x359def[_0x301749(0x38e)]){if(!isInteractive())return console['error'](a31_0x5cfd3b[_0x301749(0x3cb)](_0x301749(0x318)),_0x301749(0x1d2)),console[_0x301749(0x1ce)](a31_0x5cfd3b[_0x301749(0x333)](_0x301749(0x339))),0x1;const _0x204b21=await confirmKey(_0x146927);if(!_0x204b21)return console[_0x301749(0x1ce)](a31_0x5cfd3b['yellow'](_0x301749(0x372))),0x1;}const _0x525c17=_0x52c9c5?_0x301749(0x307):_0x301749(0x1f0);await withSpinner(_0x525c17+_0x301749(0x3a9)+_0x4b6c0f+_0x301749(0x385),()=>_0x4b1110[_0x301749(0x3a7)](),{'verbose':_0x359def[_0x301749(0x265)]});const _0xc2564c=_0x52c9c5?_0x301749(0x356):_0x301749(0x283);console[_0x301749(0x1ce)]('✔\x20'+_0xc2564c+_0x301749(0x3a9)+_0x4b6c0f+'\x27');}else console[_0x301749(0x1ce)](_0x301749(0x313)+_0x4b6c0f+_0x301749(0x396));}const _0x5186e1=await withSpinner(_0x301749(0x2be)+_0x11b02a+_0x301749(0x385),()=>_0x1a0f3b[_0x301749(0x2f0)][_0x301749(0x3dd)](_0x11b02a),{'verbose':_0x359def[_0x301749(0x265)]}),_0x223334=_0x5186e1['data'],_0x28148b=getConsoleUrl(_0x359def[_0x301749(0x1ed)],_0x301749(0x31b)+_0x223334[_0x301749(0x27c)]+_0x301749(0x37c)+_0x223334['workflowSessionId']+_0x301749(0x2a6)+_0x223334[_0x301749(0x399)]);return console['error'](_0x301749(0x2ab)),console[_0x301749(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x301749(0x333)](_0x301749(0x362))+'\x20'+_0x223334[_0x301749(0x21b)]),console['error']('\x20\x20'+a31_0x5cfd3b['dim'](_0x301749(0x1d0))+'\x20'+_0x223334[_0x301749(0x1ee)]),console[_0x301749(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x301749(0x34b))+'\x20'+_0x223334[_0x301749(0x2c5)]),console['error']('\x20\x20'+a31_0x5cfd3b['dim'](_0x301749(0x1f9))+'\x20'+_0x223334[_0x301749(0x399)]),console[_0x301749(0x1ce)]('\x20\x20'+_0x28148b),console[_0x301749(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x301749(0x333)]('To\x20cancel:')+_0x301749(0x2f7)+_0x223334[_0x301749(0x399)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='segment:parent:fields';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x28b);async[a31_0x1949a9(0x2fa)](_0x485bfe){const _0x42fac1=a31_0x1949a9,{options:_0x1382d2,args:_0x4f733f,tdx:_0x2f4c8b}=_0x485bfe,_0x4f7dec=_0x4f733f[0x0]||_0x1382d2[_0x42fac1(0x246)];if(!_0x4f7dec)return showParentSegmentNotSetError(_0x42fac1(0x24a)+'\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;_0x1382d2[_0x42fac1(0x265)]&&(console[_0x42fac1(0x1ce)]('Site:\x20'+_0x1382d2[_0x42fac1(0x1ed)]),console[_0x42fac1(0x1ce)]('Parent\x20segment:\x20'+_0x4f7dec));const _0x1e963d=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x4f7dec+_0x42fac1(0x385),()=>_0x2f4c8b[_0x42fac1(0x2f0)]['listFields'](_0x4f7dec),{'verbose':_0x1382d2[_0x42fac1(0x265)]}),_0x5c6c2d=_0x1e963d[_0x42fac1(0x218)];console[_0x42fac1(0x1ce)](_0x42fac1(0x387)+_0x5c6c2d['length']+_0x42fac1(0x2f4)+(_0x5c6c2d['length']!==0x1?'s':''));if(_0x1382d2[_0x42fac1(0x290)]||_0x1382d2[_0x42fac1(0x315)])return await handleSDKOutput(_0x5c6c2d,_0x1382d2),0x0;return displayFieldsHumanReadable(_0x5c6c2d,_0x4f7dec),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='segment:parent:view';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2da);async[a31_0x1949a9(0x2fa)](_0x1d7062){const _0x28b353=a31_0x1949a9,{options:_0x216e63,args:_0x53dfd6,tdx:_0xbfe0d5}=_0x1d7062,_0x254d95=_0x216e63,_0x5de1de=_0x53dfd6[0x0]||_0x216e63[_0x28b353(0x246)];if(!_0x5de1de)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'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a'+_0x28b353(0x2b5)+_0x28b353(0x316)),0x1;_0x216e63['verbose']&&(console['error'](_0x28b353(0x239)+_0x216e63[_0x28b353(0x1ed)]),console['error'](_0x28b353(0x235)+_0x5de1de));const _0x1529e0=await withSpinner(_0x28b353(0x212)+_0x5de1de+'\x27...',()=>_0xbfe0d5[_0x28b353(0x2f0)][_0x28b353(0x360)](_0x5de1de),{'verbose':_0x216e63[_0x28b353(0x265)]}),_0xf20c32=_0x1529e0[_0x28b353(0x218)];if(_0x254d95[_0x28b353(0x1fd)]){const _0x30986a=getConsoleNextUrl(_0x254d95[_0x28b353(0x1ed)],_0x28b353(0x375)+_0xf20c32['id']);return console['error'](a31_0x5cfd3b[_0x28b353(0x208)]('✔')+'\x20Opening\x20'+a31_0x5cfd3b[_0x28b353(0x282)](_0x30986a)),openBrowser(_0x30986a),0x0;}return await handleSingleObjectOutput(_0xf20c32,_0x216e63),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a31_0x1949a9(0x3d5);['description']='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0xce9b18){const _0x6238a7=a31_0x1949a9,{options:_0x20a455,args:_0x5e2982,tdx:_0x110032}=_0xce9b18,_0x267857=_0x20a455,_0x3e3557=_0x5e2982[0x0]||_0x20a455[_0x6238a7(0x246)];if(!_0x3e3557)return showParentSegmentNotSetError(_0x6238a7(0x3b4)+_0x6238a7(0x2d5)+_0x6238a7(0x2b5)+_0x6238a7(0x3b0)),0x1;_0x20a455[_0x6238a7(0x265)]&&(console['error'](_0x6238a7(0x239)+_0x20a455[_0x6238a7(0x1ed)]),console[_0x6238a7(0x1ce)](_0x6238a7(0x235)+_0x3e3557));const _0x468d8a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3e3557+_0x6238a7(0x385),()=>_0x110032[_0x6238a7(0x2f0)]['resolveParentId'](_0x3e3557),{'verbose':_0x20a455[_0x6238a7(0x265)]}),_0x48c073=_0x468d8a['data'],_0x6ea3c0=_0x110032[_0x6238a7(0x2f0)]['getOutputDatabaseName'](_0x48c073);if(_0x267857[_0x6238a7(0x2fc)]){const _0x5d4ff7=await this[_0x6238a7(0x276)](_0xce9b18,_0x3e3557,_0x48c073,_0x6ea3c0),_0x4ce093=this[_0x6238a7(0x28f)](_0x5d4ff7);writeFileSync(_0x267857[_0x6238a7(0x2fc)],_0x4ce093);const _0x50583d=_0x5d4ff7[_0x6238a7(0x344)][_0x6238a7(0x335)]['length']+_0x5d4ff7[_0x6238a7(0x334)][_0x6238a7(0x207)]((_0x43c9ff,_0x2fee39)=>_0x43c9ff+_0x2fee39[_0x6238a7(0x335)]['length'],0x0),_0x3d9360=_0x5d4ff7[_0x6238a7(0x334)]['filter'](_0x573cd3=>_0x573cd3['columns']['length']===0x0)['length'];return console[_0x6238a7(0x36f)](_0x6238a7(0x29b)+_0x267857[_0x6238a7(0x2fc)]),console[_0x6238a7(0x36f)]('\x20\x20Database:\x20'+_0x6ea3c0),console[_0x6238a7(0x36f)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x5d4ff7[_0x6238a7(0x334)]['length']+_0x6238a7(0x295)),console['log'](_0x6238a7(0x1cb)+_0x50583d+_0x6238a7(0x3be)),_0x3d9360>0x0&&console[_0x6238a7(0x36f)](_0x6238a7(0x1e3)+_0x3d9360+_0x6238a7(0x394)),0x0;}console['error']('\x0a'+a31_0x5cfd3b[_0x6238a7(0x393)]('Output\x20Database:')+'\x20'+a31_0x5cfd3b[_0x6238a7(0x282)](_0x6ea3c0));const _0x17c749=await withSpinner(_0x6238a7(0x3c8),()=>_0x110032[_0x6238a7(0x2f0)][_0x6238a7(0x323)](_0x48c073),{'verbose':_0x20a455['verbose']});console[_0x6238a7(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x6238a7(0x393)](_0x6238a7(0x344))+'\x20'+a31_0x5cfd3b['dim']('('+_0x6ea3c0+_0x6238a7(0x300)));const _0x57c17c=await executeSchemaQuery(_0x17c749[_0x6238a7(0x218)],_0x110032,_0x20a455);await handleQueryOutput(_0x57c17c,_0x20a455);const _0x2a9a83=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x110032[_0x6238a7(0x2f0)][_0x6238a7(0x34c)](_0x48c073),{'verbose':_0x20a455[_0x6238a7(0x265)]});for(const _0x658158 of _0x2a9a83['data']){const _0xee4607=_0x6238a7(0x3cd)+_0x658158[_0x6238a7(0x2a4)]()[_0x6238a7(0x275)](/\s+/g,'_'),_0x5d8b9e=_0x6238a7(0x36d)+_0x6ea3c0+'.'+_0xee4607;console[_0x6238a7(0x1ce)]('\x0a'+a31_0x5cfd3b['bold'](_0x658158)+'\x20'+a31_0x5cfd3b[_0x6238a7(0x333)]('('+_0x6ea3c0+'.'+_0xee4607+')'));try{const _0xd98c77=await executeSchemaQuery(_0x5d8b9e,_0x110032,_0x20a455);await handleQueryOutput(_0xd98c77,_0x20a455);}catch{console[_0x6238a7(0x1ce)](a31_0x5cfd3b[_0x6238a7(0x245)](_0x6238a7(0x1d9)));}}return 0x0;}async[a31_0x1949a9(0x276)](_0x332910,_0x5690d0,_0x176f75,_0x1f55d2){const _0x153e08=a31_0x1949a9,{options:_0x50b44e,tdx:_0x3cb6de}=_0x332910,_0x3294cb=await withSpinner(_0x153e08(0x3c8),()=>_0x3cb6de['segment'][_0x153e08(0x323)](_0x176f75),{'verbose':_0x50b44e[_0x153e08(0x265)]}),_0x427dc0=await executeSchemaQuery(_0x3294cb[_0x153e08(0x218)],_0x3cb6de,_0x50b44e),_0x15d051=_0x427dc0['data'][_0x153e08(0x22e)](_0x530381=>({'name':_0x530381[_0x153e08(0x269)],'type':_0x530381['column_type']})),_0x4ea177=await withSpinner(_0x153e08(0x321),()=>_0x3cb6de[_0x153e08(0x2f0)][_0x153e08(0x34c)](_0x176f75),{'verbose':_0x50b44e[_0x153e08(0x265)]}),_0x2bf115=[];for(const _0x50bd78 of _0x4ea177[_0x153e08(0x218)]){const _0x417cc3=_0x153e08(0x3cd)+_0x50bd78[_0x153e08(0x2a4)]()['replace'](/\s+/g,'_'),_0x47bcf6=_0x153e08(0x36d)+_0x1f55d2+'.'+_0x417cc3;let _0x47528b=[];try{const _0x16b4e6=await executeSchemaQuery(_0x47bcf6,_0x3cb6de,_0x50b44e);_0x47528b=_0x16b4e6[_0x153e08(0x218)]['map'](_0x26bee1=>({'name':_0x26bee1[_0x153e08(0x269)],'type':_0x26bee1[_0x153e08(0x1ef)]}));}catch{}_0x2bf115[_0x153e08(0x273)]({'table':_0x417cc3,'columns':_0x47528b});}return{'database':_0x1f55d2,'parent_segment':_0x5690d0,'parent_id':_0x176f75,'customers':{'table':_0x153e08(0x344),'columns':_0x15d051},'behaviors':_0x2bf115};}[a31_0x1949a9(0x28f)](_0x411d55){const _0x155c77=a31_0x1949a9,_0x48b53b=_0x57870f=>{const _0x6b554=a31_0x51b0;if(_0x57870f[_0x6b554(0x2d4)]===0x0)return'[]';const _0xb57200=_0x57870f['map'](_0x4a853c=>_0x6b554(0x2a8)+_0x4a853c[_0x6b554(0x21d)]+_0x6b554(0x3c4)+_0x4a853c['type']+'\x22\x20}');return'[\x0a'+_0xb57200['join'](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x530028=_0x411d55[_0x155c77(0x334)]['map'](_0x31e10d=>{const _0x281cdb=_0x155c77;return _0x281cdb(0x328)+_0x31e10d['table']+_0x281cdb(0x347)+_0x48b53b(_0x31e10d[_0x281cdb(0x335)])[_0x281cdb(0x275)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20\x20\x20}';})[_0x155c77(0x2fb)](',\x0a');return _0x155c77(0x388)+_0x411d55[_0x155c77(0x381)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x411d55[_0x155c77(0x304)]+_0x155c77(0x27b)+_0x411d55[_0x155c77(0x2b2)]+_0x155c77(0x370)+_0x411d55[_0x155c77(0x344)][_0x155c77(0x1dc)]+_0x155c77(0x2e2)+_0x48b53b(_0x411d55[_0x155c77(0x344)]['columns'])[_0x155c77(0x275)](/^/gm,'\x20\x20')[_0x155c77(0x30b)]()+_0x155c77(0x33b)+_0x530028+_0x155c77(0x2aa);}}export class ParentSegmentSQLCommand extends BaseCommand{['name']='segment:parent:sql';['description']=a31_0x1949a9(0x259);async[a31_0x1949a9(0x2fa)](_0x2fde9f){const _0x3659b8=a31_0x1949a9,{options:_0x36af69,args:_0x42ab51,tdx:_0x49bb32}=_0x2fde9f,_0x46dc05=_0x42ab51[0x0]||_0x36af69[_0x3659b8(0x246)];if(!_0x46dc05)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x3659b8(0x3c2)),0x1;_0x36af69['verbose']&&(console[_0x3659b8(0x1ce)]('Site:\x20'+_0x36af69[_0x3659b8(0x1ed)]),console[_0x3659b8(0x1ce)](_0x3659b8(0x235)+_0x46dc05));const _0x2f9b48=await withSpinner(_0x3659b8(0x35c)+_0x46dc05+'\x27...',()=>_0x49bb32[_0x3659b8(0x2f0)]['resolveParentId'](_0x46dc05),{'verbose':_0x36af69['verbose']}),_0x2a8e6a=_0x2f9b48['data'],_0x5f3126=await withSpinner(_0x3659b8(0x3d2)+_0x46dc05+'\x27...',()=>_0x49bb32['segment'][_0x3659b8(0x323)](_0x2a8e6a),{'verbose':_0x36af69['verbose']}),_0x557dc8=_0x5f3126[_0x3659b8(0x218)];return _0x36af69[_0x3659b8(0x2ba)]==='json'||_0x36af69[_0x3659b8(0x2ba)]===_0x3659b8(0x315)?await handleSDKOutput([{'sql':_0x557dc8}],_0x36af69):console[_0x3659b8(0x36f)](_0x557dc8),0x0;}}function a31_0x5aa2(){const _0x5e5513=['ps:pz:delete','cyan','Updated','stageCount','start','Default','Found\x20YAML\x20file:\x20','single','Master:','keys','List\x20available\x20fields\x20for\x20segmentation','Show\x20personalization\x20service\x20details','token:','createToken','formatSchemaJson','json','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','elapsedTimeMillis','allowed\x20IPs:','\x20behaviors','⚡\x20Enabled','\x20Context\x20set:\x20','\x20rows)','\x20rows\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Schema\x20saved\x20to\x20','page_view','deleteToken','addAttributes','createPersonalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','toFixed','keyEventId','toLowerCase','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','/attempt/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20personalization','\x0a\x20\x20]\x0a}\x0a','\x0a✔\x20Workflow\x20started','Errors:','stats','2932900OGYNMU','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Error:\x20Service\x20name\x20is\x20required','\x20is\x20already\x20up\x20to\x20date','parent_id','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Enriched:','Options:\x0a','totalEvents','Options:','✔\x20Query\x20completed:\x20Processed\x20','dirname','format','id:\x20','RT\x202.0\x20Validate:','\x20--interval\x20','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','interval','✔\x20Updated\x20personalization\x20service\x20\x27','primaryKey','behavior','coveragePercent','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','workflowSessionId','ps:pz:show','ps:pz:service:token:create','\x20\x20\x20\x20\x20\x20\x20\x20','✔\x20Retrieved\x20RT\x20configuration\x20version','\x20--behavior\x20\x22','string','displayColumns','launched','ps:pz:service:update','Behaviors','segment:parent:run','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','information_schema','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','length','\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','/\x20and\x20','ps:pz:service:delete','allowedIps','enriched','Show\x20parent\x20segment\x20details','2257899koaRkg','.yml','split','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Listing\x20RT\x20journeys\x20for\x20\x27','✔\x20Updated\x20personalization\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','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Resume\x20activations\x20in\x20an\x20RT\x20journey','✔\x20Created\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Delete\x20a\x20realtime\x20personalization','\x27\x20for\x20service\x20\x27','schemaError','pauseJourney','tokens','Join:','customerPercent','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','\x20Configuration\x20is\x20valid','displayRealtimeInfo','segment','resumeJourney','\x20parent\x20segment','Deleting\x20personalization\x20\x27','\x20field','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x20tdx\x20wf\x20attempt\x20','Available\x20attributes:','updateParent','execute','join','output','segment:parent:create','filter','text','.customers)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x27\x20with\x20ID:\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','parent_segment','👥\x20','\x20\x20\x20\x20\x20\x20','Creating','deletePersonalization','displayAttributesStats','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','trim','displayMasterInfo','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x20No\x20changes\x20-\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','✔\x20No\x20changes\x20-\x20\x27','sampleData','jsonl','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','SELECT\x20*\x20FROM\x20(\x0a','\x0aError:','\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','displayPreviewResults','/app/workflows/','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','keyEventId:','state','number','some','Fetching\x20behavior\x20list...','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','getParentSQL','List\x20parent\x20segments','Delete\x20a\x20personalization\x20service','segment:parent:validate','darwin','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','schemaValid','unref','getCurrentConfigVersion','repeat','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Attribute:','file','YAML\x20file:\x20','\x20--behavior\x20\x22<name>\x22','Error\x20reading\x20file:\x20','dim','behaviors','columns','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','limit','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Analyzing\x20changes...','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','segment:parent:preview','Master\x20+\x20Attributes','addAttributesFile','\x20Added\x20RT\x202.0\x20template\x20section','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','ps:pz:service:show','joinKey','✔\x20Found\x20personalization\x20\x27','customers','\x0a⚠️\x20\x20Both\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','public:','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','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','Session:','getBehaviorNames','parent_segments','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x20\x20No\x20sample\x20data\x20available','\x20=\x20','Listing\x20parent\x20segments\x20matching\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Deleting\x20token\x20\x27','label','includeSensitive:','Created','type','\x20\x20\x20\x20-\x20','updatedAt','personalization','customerGroupFile','Resolving\x20parent\x20segment\x20\x27','segment:parent:show','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x202.\x20Run\x20','getParentFull','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Audience\x20ID:','No\x20RT-enabled\x20parent\x20segments\x20found','message','rowCount','ID\x20Stitching:','eventKind:\x20','Master\x20Table','indexOf','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','No\x20RT\x20journeys\x20found','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','SELECT\x20*\x20FROM\x20','identifier','log','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20\x20\x20','Aborted.','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','5CmzmSo','/app/dw/parentSegments/','timezone','\x20--attribute\x20\x22','getPersonalization','payload:','\x5c$&','pullParentYaml','/sessions/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','paused','database','\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','\x20RT\x20journey','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x27...','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','✔\x20Found\x20','{\x0a\x20\x20\x22database\x22:\x20\x22','Coverage:','xdg-open','Get\x20current\x20RT\x20configuration\x20version\x20status','createParent','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','yes','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','Error:\x20--attribute\x20requires\x20a\x20name\x0a','486023IsfmGW','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','bold','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Attributes:','\x27\x20is\x20up\x20to\x20date','relationships','attributes','workflowAttemptId','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x27\x20is\x20already\x20up\x20to\x20date','\x0aNew\x20parent\x20segment\x20\x27','7739217xDjmcB','Options\x20(one\x20required):\x0a','stop','all','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','✔\x20Updated\x20parent\x20segment\x20\x27','Personalization:','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','folderId','apply','toLocaleString','\x20parent\x20segment\x20\x27','8vJahCc','\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}','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','ps:pz:service:list','Error:\x20--behavior\x20requires\x20a\x20name\x0a','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Apply\x20changes\x20to\x20\x27','.yaml','Validating\x20configuration...','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','events','foreignKey','run','segment:parent:pull','sections:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','preview','tdx\x20ps\x20preview\x20','customersWithEvents','\x20total','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','ps:pz:list','status:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x22,\x20\x22type\x22:\x20\x22','ignore','\x20configured','Pattern:\x20','Fetching\x20customers\x20schema...','\x0aChanges\x20to\x20\x27','last_page_viewed','red','platform','behavior_','Error:','user_id','911408pXXCYs','3266067MWBvZd','Fetching\x20SQL\x20for\x20\x27','attribute','isDirectory','segment:parent:desc','ps:pz:patch','RT\x202.0:','\x0aNo\x20sample\x20data\x20available','audienceId:\x20','population','displayValidateResults','%)\x20','runParent','Source:','\x20\x20Columns:\x20','ps:pz:service:token:delete','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','error','-1d','Status:','✔\x20Created\x20personalization\x20\x27','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20(paused)','includeSensitive','Show\x20a\x20specific\x20realtime\x20personalization','scheduleType','entryCriteria','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','\x20service(s)\x20configured','public','table','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','enabled','resolveParentId','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','displaySampleData','\x20\x20Note:\x20','FINISHED','Validating\x20RT\x20configuration...','No\x20parent\x20segments\x20match\x20pattern:\x20','stringify','query','open','Customers:','value','Error:\x20--database\x20and\x20--table\x20are\x20required','site','status','column_type','Updating','\x20to\x20configure\x20your\x20personalization\x20service','previewParentYaml','Join\x20on:','allValid','folder-segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','keyEventCriteria','stitchingKeys','Attempt:','Listing\x20personalizations\x20for\x20\x27','Available\x20behaviors:','errors','web','payload','utf-8','Error:\x20Parent\x20segment\x20name\x20is\x20required','td_client_id','displayBehaviorsStats','any','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Executing\x20parent\x20segment\x20query...','ps:rt:configuration_versions','reduce','green','✔\x20Deleted\x20personalization\x20service\x20\x27','\x20to\x20push\x20the\x20configuration','ps:rt:jn:resume','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','scheduleOption','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','My\x20Service','Preview:','sections','Fetching\x20parent\x20segment\x20\x27','Getting\x20personalization\x20\x27','✔\x20Created\x20token\x20\x27','\x20Added\x20personalization\x20template\x20to\x20','Update\x20a\x20realtime\x20personalization\x20entity','\x27\x20and\x20run\x20workflow?','data','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Error:\x20Token\x20\x27','audienceId','✔\x20Renamed\x20directory\x20to\x20','name','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','\x20stage','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Fetching\x20personalization\x20service\x20\x27','master','pushParentYaml','sourceTableValid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','endsWith','parentFolder','\x20true','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','\x20RT\x20configuration\x20is\x20valid','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','\x20\x20\x20\x20','4TSZrgX','map','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','createdAt','idStitching','personalization_services','varchar','listParents','Parent\x20segment:\x20','Create\x20parent\x20segment\x20\x27','description','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Site:\x20','entryCriteria:','list','test','Listing\x20personalization\x20services\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20\x201.\x20Edit\x20','use','Fetching\x20sample\x20data...','displayPreviewHints','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','/\x20directories\x20exist.','yellow','parentSegment','Events:','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','To\x20view\x20sample\x20data:','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','segment:parent:update','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','null','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Attributes','no\x20tokens\x20configured','sourceTableError','matchedCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','customerGroup','match','validateParentYaml','Get\x20SQL\x20query\x20for\x20parent\x20segment','Table:\x20','sort','localeCompare','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','5842374yXJiKd','⚡\x20Not\x20enabled','\x0aUsage:\x20tdx\x20ps\x20preview\x20','ps:rt:list','personalizationServices','Error:\x20Service\x20ID\x20is\x20required','updated:','verbose','addBehaviors','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Error:\x20--name\x20is\x20required','column_name','\x20--enriched','Error\x20parsing\x20YAML:\x20','Patching\x20personalization\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','displaySummary','realtime','create','Creating\x20token\x20\x27','Validate:','push','column','replace','collectSchema','✘\x20Failed\x20to\x20rename\x20directory:\x20','List\x20RT\x20journeys','jobId','Updating\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','workflowId','\x20[Job\x20ID:\x20','\x27\x20(id:\x20','ps:pz:create','(id:\x20'];a31_0x5aa2=function(){return _0x5e5513;};return a31_0x5aa2();}function a31_0x51b0(_0x22024e,_0x2b8881){_0x22024e=_0x22024e-0x1cb;const _0x5aa232=a31_0x5aa2();let _0x51b089=_0x5aa232[_0x22024e];return _0x51b089;}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x1949a9(0x35d);[a31_0x1949a9(0x237)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x1949a9(0x2fa)](_0x598b95){const _0x1ecb7e=a31_0x1949a9,{options:_0x44d8d2,args:_0x33b0d5,tdx:_0x3f82ae}=_0x598b95,_0x26bec4=_0x33b0d5[0x0]||_0x44d8d2['parentSegment'];if(!_0x26bec4)return showParentSegmentNotSetError(_0x1ecb7e(0x30f)+_0x1ecb7e(0x229)),0x1;_0x44d8d2[_0x1ecb7e(0x265)]&&(console[_0x1ecb7e(0x1ce)](_0x1ecb7e(0x239)+_0x44d8d2[_0x1ecb7e(0x1ed)]),console[_0x1ecb7e(0x1ce)](_0x1ecb7e(0x235)+_0x26bec4));const _0x5ded67=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x26bec4+_0x1ecb7e(0x385),()=>_0x3f82ae['segment'][_0x1ecb7e(0x1e0)](_0x26bec4),{'verbose':_0x44d8d2[_0x1ecb7e(0x265)]}),_0xecb3ba=_0x5ded67[_0x1ecb7e(0x218)],_0xbf939b=await withSpinner(_0x1ecb7e(0x3d2)+_0x26bec4+'\x27...',()=>_0x3f82ae[_0x1ecb7e(0x2f0)][_0x1ecb7e(0x323)](_0xecb3ba),{'verbose':_0x44d8d2[_0x1ecb7e(0x265)]});let _0x2febe2=_0xbf939b[_0x1ecb7e(0x218)];const _0x390718=resolveLimit(_0x44d8d2[_0x1ecb7e(0x337)],DEFAULT_DISPLAY_LIMIT),_0xe81114=/\bLIMIT\s+\d+/i['test'](_0x2febe2);!_0xe81114&&(_0x2febe2=_0x2febe2[_0x1ecb7e(0x30b)]()[_0x1ecb7e(0x275)](/;+$/,''),_0x2febe2=_0x1ecb7e(0x317)+_0x2febe2+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x390718);_0x44d8d2[_0x1ecb7e(0x265)]&&console[_0x1ecb7e(0x1ce)]('SQL\x20query:\x0a'+_0x2febe2);const _0x296b0f=await withProgressSpinner(_0x1ecb7e(0x205),async _0x25d06f=>{const _0x30aee5=_0x1ecb7e,_0x472d3e=await _0x3f82ae[_0x30aee5(0x1e8)][_0x30aee5(0x2fa)](_0x2febe2,{'catalog':'td','schema':_0x30aee5(0x2d2),'onJobId':_0x486bca=>{_0x25d06f['setJobId'](_0x486bca);}});return _0x472d3e;},{'verbose':_0x44d8d2[_0x1ecb7e(0x265)]}),_0x38206c=_0x296b0f[_0x1ecb7e(0x218)],_0x3a5eb5=_0x38206c['jobId']?_0x1ecb7e(0x27d)+_0x38206c[_0x1ecb7e(0x279)]+']':'';return console[_0x1ecb7e(0x1ce)](_0x1ecb7e(0x2b8)+_0x38206c[_0x1ecb7e(0x2ad)]['processedRows'][_0x1ecb7e(0x3a8)]()+_0x1ecb7e(0x299)+('in\x20'+formatElapsed(_0x38206c[_0x1ecb7e(0x2ad)][_0x1ecb7e(0x293)])+_0x3a5eb5)),await handleQueryOutput(_0x38206c,_0x44d8d2),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a31_0x1949a9(0x261);[a31_0x1949a9(0x237)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a31_0x1949a9(0x2fa)](_0x3c4ffa){const _0x1c95fb=a31_0x1949a9,{options:_0x29f2f4,args:_0x1340da,tdx:_0x4bcb21}=_0x3c4ffa,_0x12fe55=_0x1340da[0x0],_0x4e73c0=await withSpinner(_0x12fe55?_0x1c95fb(0x2f6)+_0x12fe55+_0x1c95fb(0x385):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x4bcb21[_0x1c95fb(0x26f)][_0x1c95fb(0x23b)](),{'verbose':_0x29f2f4[_0x1c95fb(0x265)]});let _0x2f7b59=_0x4e73c0['data'][_0x1c95fb(0x2fe)](_0x5e646f=>_0x5e646f['realtime_enabled']);if(_0x12fe55){const _0x2d8f6c=_0x12fe55[_0x1c95fb(0x275)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x1c95fb(0x275)](/\?/g,'.'),_0x3b12a6=new RegExp('^'+_0x2d8f6c+'$','i');_0x2f7b59=_0x2f7b59[_0x1c95fb(0x2fe)](_0x1ea34e=>_0x3b12a6['test'](_0x1ea34e[_0x1c95fb(0x21d)]));}_0x2f7b59[_0x1c95fb(0x25b)]((_0x5eb078,_0x19e162)=>_0x5eb078[_0x1c95fb(0x21d)][_0x1c95fb(0x25c)](_0x19e162[_0x1c95fb(0x21d)])),console[_0x1c95fb(0x1ce)](_0x1c95fb(0x387)+_0x2f7b59[_0x1c95fb(0x2d4)]+'\x20RT-enabled\x20parent\x20segment'+(_0x2f7b59[_0x1c95fb(0x2d4)]!==0x1?'s':''));const _0x341b09=_0x4a79ac=>{const _0x4cdbb5=_0x1c95fb;return getConsoleNextUrl(_0x29f2f4[_0x4cdbb5(0x1ed)],_0x4cdbb5(0x375)+_0x4a79ac);};if(_0x29f2f4['format']===_0x1c95fb(0x290)||_0x29f2f4[_0x1c95fb(0x2ba)]===_0x1c95fb(0x315)){const _0x43bc4d=_0x2f7b59[_0x1c95fb(0x22e)](_0x206890=>({..._0x206890,'url':_0x341b09(_0x206890['id'])}));await handleSDKOutput(_0x43bc4d,_0x29f2f4);}else{if(_0x2f7b59['length']===0x0)console[_0x1c95fb(0x36f)](_0x1c95fb(0x363));else for(const _0x47d117 of _0x2f7b59){const _0x208300=_0x47d117[_0x1c95fb(0x3da)]?a31_0x5cfd3b[_0x1c95fb(0x333)]('\x20('+formatRows(_0x47d117[_0x1c95fb(0x3da)])+')'):'',_0x482799=hyperlink(_0x47d117[_0x1c95fb(0x21d)],_0x341b09(_0x47d117['id']));console[_0x1c95fb(0x36f)]('⚡\x20'+_0x482799+_0x208300);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]='ps:rt:validate';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x361);async[a31_0x1949a9(0x2fa)](_0x2a3297){const _0x51d72f=a31_0x1949a9,{options:_0x11cb5a,args:_0x31c56a,tdx:_0x50874b}=_0x2a3297,_0x5499f7=_0x31c56a[0x0]||_0x11cb5a[_0x51d72f(0x246)];if(!_0x5499f7)return showParentSegmentNotSetError(_0x51d72f(0x36a)+_0x51d72f(0x312)),0x1;const _0x2d5765=resolveYamlFile(_0x5499f7);if(!existsSync(_0x2d5765))return showFileNotFoundError(_0x2d5765,_0x5499f7),0x1;let _0x320c88;try{_0x320c88=readFileSync(_0x2d5765,_0x51d72f(0x1ff));}catch(_0x2f76d4){const _0x3ccdaa=_0x2f76d4 instanceof Error?_0x2f76d4[_0x51d72f(0x364)]:String(_0x2f76d4);return console['error'](_0x51d72f(0x332)+_0x3ccdaa),0x1;}const _0x16b2c4=createCommandSpinner(a31_0x5cfd3b[_0x51d72f(0x333)](_0x51d72f(0x1e5)),{'verbose':_0x11cb5a[_0x51d72f(0x265)]});_0x16b2c4[_0x51d72f(0x285)]();const _0x3b2989={'realtime':!![],'onProgress':_0xf02140=>{const _0xafc70a=_0x51d72f;_0x16b2c4[_0xafc70a(0x2ff)]=formatProgressMessage(_0xf02140);}};let _0x404e7e;try{_0x404e7e=await _0x50874b[_0x51d72f(0x2f0)][_0x51d72f(0x258)](_0x320c88,_0x3b2989),_0x16b2c4[_0x51d72f(0x3a0)]();}catch(_0x48938e){_0x16b2c4[_0x51d72f(0x3a0)]();throw _0x48938e;}console[_0x51d72f(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x51d72f(0x393)](_0x51d72f(0x2bc))+'\x20'+_0x404e7e['name']),console['error']('═'[_0x51d72f(0x32c)](0x3c)),displayRealtimeValidation(_0x404e7e),console[_0x51d72f(0x1ce)]('─'['repeat'](0x3c));if(_0x404e7e[_0x51d72f(0x1fc)][_0x51d72f(0x2d4)]>0x0){console[_0x51d72f(0x1ce)]('\x0a'+a31_0x5cfd3b['red'](_0x51d72f(0x2ac)));for(const _0x1f8c15 of _0x404e7e[_0x51d72f(0x1fc)]){console['error']('\x20\x20'+a31_0x5cfd3b['red']('•')+'\x20'+_0x1f8c15);}}return _0x404e7e[_0x51d72f(0x1f4)]&&console[_0x51d72f(0x1ce)]('\x0a'+a31_0x5cfd3b['green']('✔')+_0x51d72f(0x22a)),_0x404e7e[_0x51d72f(0x1f4)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='ps:rt:jn:list';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x278);async[a31_0x1949a9(0x2fa)](_0x5d1b4a){const _0x13a7a3=a31_0x1949a9,{options:_0x874a88,args:_0x3ddd49,tdx:_0x11ea0a}=_0x5d1b4a,_0x2432a5=_0x3ddd49[0x0]||_0x874a88[_0x13a7a3(0x246)];if(!_0x2432a5)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a'+_0x13a7a3(0x319)),0x1;_0x874a88['verbose']&&(console[_0x13a7a3(0x1ce)](_0x13a7a3(0x239)+_0x874a88['site']),console['error'](_0x13a7a3(0x235)+_0x2432a5));const _0x9dd1e8=await withSpinner(_0x13a7a3(0x35c)+_0x2432a5+_0x13a7a3(0x385),()=>_0x11ea0a['segment'][_0x13a7a3(0x1e0)](_0x2432a5),{'verbose':_0x874a88['verbose']}),_0x47a0e6=_0x9dd1e8['data'],_0x15e3b9=await withSpinner(_0x13a7a3(0x2df)+_0x2432a5+_0x13a7a3(0x385),()=>_0x11ea0a[_0x13a7a3(0x26f)]['listJourneys'](_0x47a0e6),{'verbose':_0x874a88[_0x13a7a3(0x265)]}),_0x260679=_0x15e3b9[_0x13a7a3(0x218)];console[_0x13a7a3(0x1ce)]('✔\x20Found\x20'+_0x260679[_0x13a7a3(0x2d4)]+_0x13a7a3(0x383)+(_0x260679['length']!==0x1?'s':''));if(_0x874a88[_0x13a7a3(0x2ba)]===_0x13a7a3(0x290)||_0x874a88[_0x13a7a3(0x2ba)]===_0x13a7a3(0x315))await handleSDKOutput(_0x260679,_0x874a88);else{if(_0x260679['length']===0x0)console['log'](_0x13a7a3(0x36b));else for(const _0x3e297a of _0x260679){const _0x22851e=_0x3e297a['state']===_0x13a7a3(0x2cd)?'🚀':'📝',_0x126828=_0x3e297a['paused']?a31_0x5cfd3b[_0x13a7a3(0x245)](_0x13a7a3(0x1d3)):'',_0x19d603=a31_0x5cfd3b[_0x13a7a3(0x333)]('\x20('+_0x3e297a['stageCount']+_0x13a7a3(0x21f)+(_0x3e297a[_0x13a7a3(0x284)]!==0x1?'s':'')+')');console['log'](_0x22851e+'\x20'+_0x3e297a[_0x13a7a3(0x21d)]+_0x126828+_0x19d603);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='ps:rt:jn:pause';[a31_0x1949a9(0x237)]='Pause\x20activations\x20in\x20an\x20RT\x20journey';async['execute'](_0x119859){const _0x33604b=a31_0x1949a9,{options:_0x409cf0,args:_0x1234b7,tdx:_0x50e932}=_0x119859,_0x4581b9=_0x1234b7[0x0];if(!_0x4581b9)return console[_0x33604b(0x1ce)](a31_0x5cfd3b['red'](_0x33604b(0x1e1))),console[_0x33604b(0x1ce)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console[_0x33604b(0x1ce)](a31_0x5cfd3b[_0x33604b(0x333)](_0x33604b(0x303))),0x1;_0x409cf0['verbose']&&(console['error']('Site:\x20'+_0x409cf0[_0x33604b(0x1ed)]),console['error']('RT\x20Journey\x20ID:\x20'+_0x4581b9));const _0x161d2f=await withSpinner(_0x33604b(0x1dd)+_0x4581b9+_0x33604b(0x385),()=>_0x50e932['realtime'][_0x33604b(0x2e9)](_0x4581b9),{'verbose':_0x409cf0[_0x33604b(0x265)]}),_0x1f4cc1=_0x161d2f[_0x33604b(0x218)];console[_0x33604b(0x1ce)](_0x33604b(0x39a)+_0x1f4cc1[_0x33604b(0x21d)]+'\x27');if(_0x409cf0[_0x33604b(0x2ba)]===_0x33604b(0x290)||_0x409cf0[_0x33604b(0x2ba)]===_0x33604b(0x315))await handleSDKOutput([_0x1f4cc1],_0x409cf0);else{const _0x194e40=_0x1f4cc1[_0x33604b(0x31e)]===_0x33604b(0x2cd)?'🚀':'📝',_0x50a781=_0x1f4cc1['paused']?a31_0x5cfd3b[_0x33604b(0x245)](_0x33604b(0x1d3)):'';console[_0x33604b(0x36f)](_0x194e40+'\x20'+_0x1f4cc1[_0x33604b(0x21d)]+_0x50a781);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x20b);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2e3);async[a31_0x1949a9(0x2fa)](_0x3850a1){const _0x44d756=a31_0x1949a9,{options:_0x163422,args:_0x350af7,tdx:_0x43d54d}=_0x3850a1,_0x46047d=_0x350af7[0x0];if(!_0x46047d)return console[_0x44d756(0x1ce)](a31_0x5cfd3b[_0x44d756(0x3cb)](_0x44d756(0x1e1))),console[_0x44d756(0x1ce)](_0x44d756(0x322)),console[_0x44d756(0x1ce)](a31_0x5cfd3b['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x163422[_0x44d756(0x265)]&&(console[_0x44d756(0x1ce)]('Site:\x20'+_0x163422['site']),console[_0x44d756(0x1ce)]('RT\x20Journey\x20ID:\x20'+_0x46047d));const _0x1435df=await withSpinner(_0x44d756(0x2d1)+_0x46047d+'\x27...',()=>_0x43d54d[_0x44d756(0x26f)][_0x44d756(0x2f1)](_0x46047d),{'verbose':_0x163422[_0x44d756(0x265)]}),_0x4a942a=_0x1435df[_0x44d756(0x218)];console[_0x44d756(0x1ce)](_0x44d756(0x3af)+_0x4a942a['name']+'\x27');if(_0x163422[_0x44d756(0x2ba)]===_0x44d756(0x290)||_0x163422[_0x44d756(0x2ba)]===_0x44d756(0x315))await handleSDKOutput([_0x4a942a],_0x163422);else{const _0x3fbe4f=_0x4a942a[_0x44d756(0x31e)]===_0x44d756(0x2cd)?'🚀':'📝',_0x3a5068=_0x4a942a[_0x44d756(0x380)]?a31_0x5cfd3b[_0x44d756(0x245)]('\x20(paused)'):'';console['log'](_0x3fbe4f+'\x20'+_0x4a942a['name']+_0x3a5068);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x206);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x38b);async[a31_0x1949a9(0x2fa)](_0x9f16ce){const _0x4943b9=a31_0x1949a9,{options:_0x1509f1,args:_0x114c36,tdx:_0x2bba07}=_0x9f16ce,_0x39b9f5=_0x114c36[0x0]||_0x1509f1[_0x4943b9(0x246)];if(!_0x39b9f5)return showParentSegmentNotSetError(_0x4943b9(0x34a)+_0x4943b9(0x2e1)),0x1;_0x1509f1[_0x4943b9(0x265)]&&(console[_0x4943b9(0x1ce)]('Site:\x20'+_0x1509f1[_0x4943b9(0x1ed)]),console[_0x4943b9(0x1ce)](_0x4943b9(0x235)+_0x39b9f5));const _0x363b96=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x39b9f5+_0x4943b9(0x385),()=>_0x2bba07[_0x4943b9(0x2f0)]['resolveParentId'](_0x39b9f5),{'verbose':_0x1509f1['verbose']}),_0x4ed04f=_0x363b96[_0x4943b9(0x218)],_0x1f3a4a=await withSpinner(_0x4943b9(0x37e)+_0x39b9f5+_0x4943b9(0x385),()=>_0x2bba07[_0x4943b9(0x26f)][_0x4943b9(0x32b)](_0x4ed04f),{'verbose':_0x1509f1[_0x4943b9(0x265)]}),_0x247f89=_0x1f3a4a[_0x4943b9(0x218)];return console[_0x4943b9(0x1ce)](_0x4943b9(0x2c9)),_0x1509f1[_0x4943b9(0x2ba)]===_0x4943b9(0x290)||_0x1509f1[_0x4943b9(0x2ba)]===_0x4943b9(0x315)?await handleSDKOutput([_0x247f89],_0x1509f1):(console['log'](_0x4943b9(0x2bb)+_0x247f89['id']),console[_0x4943b9(0x36f)](_0x4943b9(0x3d9)+_0x247f89[_0x4943b9(0x21b)]),console['log']('identifier:\x20'+_0x247f89[_0x4943b9(0x36e)]),console[_0x4943b9(0x36f)](_0x4943b9(0x367)+_0x247f89['eventKind']),console['log'](_0x4943b9(0x3c1)+_0x247f89[_0x4943b9(0x1ee)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x3ad);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x349);async['execute'](_0x783b42){const _0x3a41cc=a31_0x1949a9,{options:_0x329a99,args:_0x294bbe,tdx:_0x30cf2c}=_0x783b42,_0x51987e=_0x294bbe[0x0]||_0x329a99[_0x3a41cc(0x246)];if(!_0x51987e)return showParentSegmentNotSetError(_0x3a41cc(0x1f6)+_0x3a41cc(0x338)),0x1;const _0x41b685=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x51987e+_0x3a41cc(0x385),()=>_0x30cf2c[_0x3a41cc(0x2f0)][_0x3a41cc(0x1e0)](_0x51987e),{'verbose':_0x329a99[_0x3a41cc(0x265)]}),_0x2139c8=_0x41b685[_0x3a41cc(0x218)],_0x436cd1=await withSpinner(_0x3a41cc(0x23d)+_0x51987e+'\x27...',()=>_0x30cf2c[_0x3a41cc(0x35a)][_0x3a41cc(0x23b)](_0x2139c8),{'verbose':_0x329a99[_0x3a41cc(0x265)]}),_0x9aa2a1=_0x436cd1[_0x3a41cc(0x218)];console[_0x3a41cc(0x1ce)]('✔\x20Found\x20'+_0x9aa2a1['length']+'\x20personalization\x20service'+(_0x9aa2a1[_0x3a41cc(0x2d4)]!==0x1?'s':''));if(_0x329a99[_0x3a41cc(0x2ba)]===_0x3a41cc(0x290)||_0x329a99[_0x3a41cc(0x2ba)]===_0x3a41cc(0x315))await handleSDKOutput(_0x9aa2a1,_0x329a99);else{if(_0x9aa2a1[_0x3a41cc(0x2d4)]===0x0)console[_0x3a41cc(0x36f)]('No\x20personalization\x20services\x20configured'),console[_0x3a41cc(0x1ce)](a31_0x5cfd3b[_0x3a41cc(0x282)]('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0x80b67 of _0x9aa2a1){console['log'](a31_0x5cfd3b[_0x3a41cc(0x393)](_0x80b67[_0x3a41cc(0x21d)])+'\x20'+a31_0x5cfd3b['dim']('(id:\x20'+_0x80b67['id']+')'));_0x80b67[_0x3a41cc(0x237)]&&console[_0x3a41cc(0x36f)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x80b67[_0x3a41cc(0x237)]));if(_0x80b67['tokens']&&_0x80b67[_0x3a41cc(0x2ea)][_0x3a41cc(0x2d4)]>0x0)for(const _0x209f53 of _0x80b67[_0x3a41cc(0x2ea)]){const _0x2a186a=_0x209f53[_0x3a41cc(0x2d8)]?.['length']?_0x209f53[_0x3a41cc(0x2d8)][_0x3a41cc(0x2fb)](',\x20'):_0x3a41cc(0x203);console['log']('\x20\x20'+a31_0x5cfd3b[_0x3a41cc(0x282)](_0x3a41cc(0x28d))+'\x20'+_0x209f53[_0x3a41cc(0x21d)]+'\x20'+a31_0x5cfd3b[_0x3a41cc(0x333)](_0x3a41cc(0x280)+_0x209f53['id']+')')),console[_0x3a41cc(0x36f)](_0x3a41cc(0x22c)+a31_0x5cfd3b[_0x3a41cc(0x333)](_0x3a41cc(0x294))+'\x20'+_0x2a186a);}else console['log']('\x20\x20'+a31_0x5cfd3b[_0x3a41cc(0x333)](_0x3a41cc(0x252)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']='ps:pz:service:create';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x3c3);async[a31_0x1949a9(0x2fa)](_0x2ddfae){const _0x3fe513=a31_0x1949a9,{options:_0x587caa,args:_0x135757,tdx:_0x3a2b6c}=_0x2ddfae,_0x51b485=_0x587caa,_0x3b57b0=_0x135757[0x0],_0x57c1dc=_0x135757[0x1]||_0x587caa[_0x3fe513(0x246)];if(!_0x3b57b0)return console[_0x3fe513(0x1ce)](_0x3fe513(0x2b0)),console[_0x3fe513(0x1ce)](_0x3fe513(0x336)),console[_0x3fe513(0x1ce)](_0x3fe513(0x34e)),0x1;if(!_0x57c1dc)return showParentSegmentNotSetError(_0x3fe513(0x3a2)+_0x3fe513(0x34e)),0x1;const _0x58a757=await withSpinner(_0x3fe513(0x35c)+_0x57c1dc+_0x3fe513(0x385),()=>_0x3a2b6c[_0x3fe513(0x2f0)][_0x3fe513(0x1e0)](_0x57c1dc),{'verbose':_0x587caa[_0x3fe513(0x265)]}),_0x2a7f51=_0x58a757[_0x3fe513(0x218)],_0x1a44b8={'name':_0x3b57b0,'description':_0x51b485[_0x3fe513(0x237)],'public':_0x51b485[_0x3fe513(0x1db)]},_0x6819a8=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x3b57b0+_0x3fe513(0x385),()=>_0x3a2b6c[_0x3fe513(0x35a)][_0x3fe513(0x270)](_0x2a7f51,_0x1a44b8),{'verbose':_0x587caa[_0x3fe513(0x265)]}),_0x152de2=_0x6819a8[_0x3fe513(0x218)];return console[_0x3fe513(0x1ce)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x152de2[_0x3fe513(0x21d)]+_0x3fe513(0x302)+_0x152de2['id']),await handleSDKOutput([_0x152de2],_0x587caa),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x341);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x28c);async[a31_0x1949a9(0x2fa)](_0x457b18){const _0x4d7a53=a31_0x1949a9,{options:_0x3d406d,args:_0x3c2112,tdx:_0x58af15}=_0x457b18,_0x9b89e9=_0x3c2112[0x0],_0x36d168=_0x3c2112[0x1]||_0x3d406d['parentSegment'];if(!_0x9b89e9)return console['error'](_0x4d7a53(0x263)),console[_0x4d7a53(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console['error'](_0x4d7a53(0x225)),0x1;if(!_0x36d168)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 _0x28f635=await withSpinner(_0x4d7a53(0x35c)+_0x36d168+_0x4d7a53(0x385),()=>_0x58af15[_0x4d7a53(0x2f0)][_0x4d7a53(0x1e0)](_0x36d168),{'verbose':_0x3d406d['verbose']}),_0x410c3b=_0x28f635[_0x4d7a53(0x218)],_0x4c5713=await withSpinner(_0x4d7a53(0x221)+_0x9b89e9+_0x4d7a53(0x385),()=>_0x58af15[_0x4d7a53(0x35a)]['get'](_0x410c3b,_0x9b89e9),{'verbose':_0x3d406d['verbose']}),_0x2f1429=_0x4c5713[_0x4d7a53(0x218)];if(_0x3d406d[_0x4d7a53(0x290)]||_0x3d406d[_0x4d7a53(0x315)])await handleSDKOutput([_0x2f1429],_0x3d406d);else{console[_0x4d7a53(0x36f)](a31_0x5cfd3b[_0x4d7a53(0x393)](_0x2f1429[_0x4d7a53(0x21d)])+'\x20'+a31_0x5cfd3b[_0x4d7a53(0x333)](_0x4d7a53(0x280)+_0x2f1429['id']+')'));_0x2f1429[_0x4d7a53(0x237)]&&console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x2f1429[_0x4d7a53(0x237)]));console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x4d7a53(0x282)](_0x4d7a53(0x348))+'\x20'+(_0x2f1429[_0x4d7a53(0x1db)]?_0x4d7a53(0x38e):'no'));if(_0x2f1429[_0x4d7a53(0x2ea)]&&_0x2f1429['tokens']['length']>0x0)for(const _0x197237 of _0x2f1429[_0x4d7a53(0x2ea)]){const _0x4548bf=_0x197237[_0x4d7a53(0x2d8)]?.[_0x4d7a53(0x2d4)]?_0x197237[_0x4d7a53(0x2d8)][_0x4d7a53(0x2fb)](',\x20'):_0x4d7a53(0x203);console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x4d7a53(0x282)](_0x4d7a53(0x28d))+'\x20'+_0x197237['name']+'\x20'+a31_0x5cfd3b[_0x4d7a53(0x333)]('(id:\x20'+_0x197237['id']+')')),console[_0x4d7a53(0x36f)](_0x4d7a53(0x22c)+a31_0x5cfd3b[_0x4d7a53(0x333)](_0x4d7a53(0x294))+'\x20'+_0x4548bf);}else console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x4d7a53(0x333)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2d7);['description']=a31_0x1949a9(0x325);async[a31_0x1949a9(0x2fa)](_0x43fcf8){const _0x4ec101=a31_0x1949a9,{options:_0x1fcf0f,args:_0x134dfc,tdx:_0x59ee76}=_0x43fcf8,_0x346d33=_0x134dfc[0x0],_0x3fadd2=_0x134dfc[0x1]||_0x1fcf0f[_0x4ec101(0x246)];if(!_0x346d33)return console[_0x4ec101(0x1ce)](_0x4ec101(0x263)),console[_0x4ec101(0x1ce)](_0x4ec101(0x23e)),console[_0x4ec101(0x1ce)](_0x4ec101(0x36c)),0x1;if(!_0x3fadd2)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x4ec101(0x36c)),0x1;const _0x4e5efc=await withSpinner(_0x4ec101(0x35c)+_0x3fadd2+_0x4ec101(0x385),()=>_0x59ee76['segment'][_0x4ec101(0x1e0)](_0x3fadd2),{'verbose':_0x1fcf0f[_0x4ec101(0x265)]}),_0x316f9f=_0x4e5efc['data'];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x346d33+_0x4ec101(0x385),()=>_0x59ee76[_0x4ec101(0x35a)]['delete'](_0x316f9f,_0x346d33),{'verbose':_0x1fcf0f[_0x4ec101(0x265)]}),console['error'](_0x4ec101(0x209)+_0x346d33+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2ce);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0x1949a9(0x2fa)](_0x42159c){const _0x27d78c=a31_0x1949a9,{options:_0x1c8fd9,args:_0x3072ee,tdx:_0x59bea4}=_0x42159c,_0x136361=_0x1c8fd9,_0x14be20=_0x3072ee[0x0],_0x53c54d=_0x3072ee[0x1]||_0x1c8fd9[_0x27d78c(0x246)];if(!_0x14be20)return console['error'](_0x27d78c(0x263)),console['error'](_0x27d78c(0x386)),console['error'](_0x27d78c(0x25d)),0x1;if(!_0x136361[_0x27d78c(0x21d)])return console[_0x27d78c(0x1ce)](_0x27d78c(0x268)),console[_0x27d78c(0x1ce)](_0x27d78c(0x386)),0x1;if(!_0x53c54d)return showParentSegmentNotSetError(_0x27d78c(0x2de)+_0x27d78c(0x25d)),0x1;const _0x21907b=await withSpinner(_0x27d78c(0x35c)+_0x53c54d+'\x27...',()=>_0x59bea4[_0x27d78c(0x2f0)][_0x27d78c(0x1e0)](_0x53c54d),{'verbose':_0x1c8fd9[_0x27d78c(0x265)]}),_0x1da0d8=_0x21907b[_0x27d78c(0x218)],_0x53d62e={'name':_0x136361[_0x27d78c(0x21d)]};_0x136361['description']!==undefined&&(_0x53d62e[_0x27d78c(0x237)]=_0x136361[_0x27d78c(0x237)]);const _0x179989=await withSpinner(_0x27d78c(0x27a)+_0x14be20+_0x27d78c(0x385),()=>_0x59bea4[_0x27d78c(0x35a)]['patch'](_0x1da0d8,_0x14be20,_0x53d62e),{'verbose':_0x1c8fd9['verbose']}),_0x197703=_0x179989['data'];return console[_0x27d78c(0x1ce)](_0x27d78c(0x2c0)+_0x197703[_0x27d78c(0x21d)]+'\x27'),await handleSDKOutput([_0x197703],_0x1c8fd9),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2c7);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x220);async[a31_0x1949a9(0x2fa)](_0x5d1856){const _0x4cd844=a31_0x1949a9,{options:_0x5d4620,args:_0x52fb8d,tdx:_0x3d9b90}=_0x5d1856,_0x591917=_0x5d4620,_0x172b10=_0x52fb8d[0x0],_0x45913b=_0x52fb8d[0x1],_0x37268d=_0x52fb8d[0x2]||_0x5d4620[_0x4cd844(0x246)];if(!_0x172b10)return console[_0x4cd844(0x1ce)]('Error:\x20Token\x20name\x20is\x20required'),console[_0x4cd844(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x4cd844(0x1ce)](_0x4cd844(0x301)),0x1;if(!_0x45913b)return console[_0x4cd844(0x1ce)](_0x4cd844(0x263)),console[_0x4cd844(0x1ce)](_0x4cd844(0x1d8)),console[_0x4cd844(0x1ce)](_0x4cd844(0x301)),0x1;if(!_0x37268d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1d0bc=await withSpinner(_0x4cd844(0x35c)+_0x37268d+_0x4cd844(0x385),()=>_0x3d9b90[_0x4cd844(0x2f0)][_0x4cd844(0x1e0)](_0x37268d),{'verbose':_0x5d4620[_0x4cd844(0x265)]}),_0x43b538=_0x1d0bc[_0x4cd844(0x218)],_0x5dc8bc={'name':_0x172b10};_0x591917[_0x4cd844(0x2d8)]&&(_0x5dc8bc[_0x4cd844(0x2d8)]=_0x591917[_0x4cd844(0x2d8)][_0x4cd844(0x2dd)](',')[_0x4cd844(0x22e)](_0x321815=>_0x321815[_0x4cd844(0x30b)]()));_0x591917[_0x4cd844(0x237)]&&(_0x5dc8bc[_0x4cd844(0x237)]=_0x591917[_0x4cd844(0x237)]);const _0x53ca0b=await withSpinner(_0x4cd844(0x271)+_0x172b10+_0x4cd844(0x2e7)+_0x45913b+_0x4cd844(0x385),()=>_0x3d9b90[_0x4cd844(0x35a)][_0x4cd844(0x28e)](_0x43b538,_0x45913b,_0x5dc8bc),{'verbose':_0x5d4620[_0x4cd844(0x265)]}),_0x192e50=_0x53ca0b['data'];return console[_0x4cd844(0x1ce)](_0x4cd844(0x214)+_0x192e50['name']+_0x4cd844(0x302)+_0x192e50['id']),_0x192e50[_0x4cd844(0x1eb)]&&(console['error'](a31_0x5cfd3b[_0x4cd844(0x245)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x4cd844(0x1ce)](a31_0x5cfd3b['cyan'](_0x192e50[_0x4cd844(0x1eb)])),console['error']('')),await handleSDKOutput([_0x192e50],_0x5d4620),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x1cc);[a31_0x1949a9(0x237)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x49b409){const _0x2fe742=a31_0x1949a9,{options:_0x5cbb37,args:_0x52d4e9,tdx:_0x271795}=_0x49b409,_0x29aacc=_0x52d4e9[0x0],_0x322c77=_0x52d4e9[0x1]||_0x5cbb37[_0x2fe742(0x246)];if(!_0x29aacc)return console[_0x2fe742(0x1ce)]('Error:\x20Token\x20ID\x20is\x20required'),console[_0x2fe742(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x2fe742(0x1ce)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x322c77)return showParentSegmentNotSetError(_0x2fe742(0x1de)+_0x2fe742(0x267)),0x1;const _0x3ab01a=await withSpinner(_0x2fe742(0x35c)+_0x322c77+_0x2fe742(0x385),()=>_0x271795[_0x2fe742(0x2f0)][_0x2fe742(0x1e0)](_0x322c77),{'verbose':_0x5cbb37[_0x2fe742(0x265)]}),_0x32d77f=_0x3ab01a[_0x2fe742(0x218)],_0x2bf21b=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x271795[_0x2fe742(0x35a)][_0x2fe742(0x23b)](_0x32d77f),{'verbose':_0x5cbb37[_0x2fe742(0x265)]}),_0x452962=_0x2bf21b[_0x2fe742(0x218)];let _0xa5fc3b;for(const _0x4783b2 of _0x452962){if(_0x4783b2[_0x2fe742(0x2ea)]?.[_0x2fe742(0x320)](_0x40a04b=>_0x40a04b['id']===_0x29aacc)){_0xa5fc3b=_0x4783b2['id'];break;}}if(!_0xa5fc3b)return console[_0x2fe742(0x1ce)](_0x2fe742(0x21a)+_0x29aacc+_0x2fe742(0x3bf)),0x1;const _0x43ddf1=await withSpinner(_0x2fe742(0x353)+_0x29aacc+'\x27...',()=>_0x271795[_0x2fe742(0x35a)][_0x2fe742(0x29d)](_0x32d77f,_0xa5fc3b,_0x29aacc),{'verbose':_0x5cbb37[_0x2fe742(0x265)]}),_0x1c6435=_0x43ddf1[_0x2fe742(0x218)];return console[_0x2fe742(0x1ce)]('✔\x20Deleted\x20token\x20\x27'+(_0x1c6435['name']||_0x29aacc)+'\x27'),await handleSDKOutput([_0x1c6435],_0x5cbb37),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x3c0);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x35e);async[a31_0x1949a9(0x2fa)](_0x1e5e13){const _0x365942=a31_0x1949a9,{options:_0x1682f4,args:_0x3b86b1,tdx:_0x581e67}=_0x1e5e13,_0x4ca5dc=_0x3b86b1[0x0]||_0x1682f4[_0x365942(0x246)];if(!_0x4ca5dc)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 _0x2e50a5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4ca5dc+_0x365942(0x385),()=>_0x581e67['segment'][_0x365942(0x1e0)](_0x4ca5dc),{'verbose':_0x1682f4['verbose']}),_0x4d06b3=_0x2e50a5['data'],_0x5b2fb9=await withSpinner(_0x365942(0x1fa)+_0x4ca5dc+_0x365942(0x385),()=>_0x581e67[_0x365942(0x35a)]['listPersonalizations'](_0x4d06b3),{'verbose':_0x1682f4['verbose']}),_0x5ea664=_0x5b2fb9[_0x365942(0x218)];console[_0x365942(0x1ce)](_0x365942(0x387)+_0x5ea664[_0x365942(0x2d4)]+_0x365942(0x2a9)+(_0x5ea664[_0x365942(0x2d4)]!==0x1?'s':''));if(_0x1682f4[_0x365942(0x2ba)]===_0x365942(0x290)||_0x1682f4[_0x365942(0x2ba)]===_0x365942(0x315))await handleSDKOutput(_0x5ea664,_0x1682f4);else{if(_0x5ea664['length']===0x0)console[_0x365942(0x36f)]('No\x20personalizations\x20configured');else for(const _0xe20610 of _0x5ea664){console[_0x365942(0x36f)](a31_0x5cfd3b[_0x365942(0x393)](_0xe20610[_0x365942(0x21d)])+'\x20'+a31_0x5cfd3b[_0x365942(0x333)](_0x365942(0x280)+_0xe20610['id']+')'));_0xe20610[_0x365942(0x237)]&&console[_0x365942(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x365942(0x333)](_0xe20610[_0x365942(0x237)]));const _0x2a9466=_0xe20610['sections']?.[_0x365942(0x2d4)]||0x0;console[_0x365942(0x36f)]('\x20\x20'+a31_0x5cfd3b['cyan'](_0x365942(0x3b9))+'\x20'+_0x2a9466);if(_0xe20610[_0x365942(0x211)]&&_0xe20610['sections'][_0x365942(0x2d4)]>0x0)for(const _0x4c155c of _0xe20610['sections']){console[_0x365942(0x36f)](_0x365942(0x358)+_0x4c155c[_0x365942(0x21d)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a31_0x1949a9(0x2c6);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x1d5);async['execute'](_0x3b3455){const _0x38048e=a31_0x1949a9,{options:_0x145935,args:_0x536e83,tdx:_0x5b5720}=_0x3b3455,_0xd5f47=_0x536e83[0x0];if(!_0xd5f47)return console[_0x38048e(0x1ce)]('Error:\x20Personalization\x20ID\x20is\x20required'),console['error'](_0x38048e(0x22f)),0x1;const _0x5849d7=await withSpinner(_0x38048e(0x213)+_0xd5f47+_0x38048e(0x385),()=>_0x5b5720[_0x38048e(0x35a)][_0x38048e(0x378)](_0xd5f47),{'verbose':_0x145935[_0x38048e(0x265)]}),_0x451c9f=_0x5849d7[_0x38048e(0x218)];console['error'](_0x38048e(0x343)+_0x451c9f['name']+'\x27');if(_0x145935['format']===_0x38048e(0x290)||_0x145935[_0x38048e(0x2ba)]===_0x38048e(0x315))await handleSDKOutput([_0x451c9f],_0x145935);else{console[_0x38048e(0x36f)](a31_0x5cfd3b[_0x38048e(0x393)](_0x451c9f[_0x38048e(0x21d)])+'\x20'+a31_0x5cfd3b[_0x38048e(0x333)](_0x38048e(0x280)+_0x451c9f['id']+')'));_0x451c9f[_0x38048e(0x237)]&&console[_0x38048e(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x38048e(0x333)](_0x451c9f[_0x38048e(0x237)]));_0x451c9f[_0x38048e(0x21b)]&&console[_0x38048e(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x38048e(0x282)]('audienceId:')+'\x20'+_0x451c9f[_0x38048e(0x21b)]);console[_0x38048e(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x38048e(0x282)]('created:')+'\x20'+_0x451c9f[_0x38048e(0x230)]),console['log']('\x20\x20'+a31_0x5cfd3b['cyan'](_0x38048e(0x264))+'\x20'+_0x451c9f[_0x38048e(0x359)]);const _0x94c833=_0x451c9f[_0x38048e(0x211)]?.[_0x38048e(0x2d4)]||0x0;console['log']('\x20\x20'+a31_0x5cfd3b['cyan']('sections:')+'\x20'+_0x94c833);if(_0x451c9f[_0x38048e(0x211)]&&_0x451c9f[_0x38048e(0x211)][_0x38048e(0x2d4)]>0x0)for(const _0x21702f of _0x451c9f['sections']){console[_0x38048e(0x36f)](_0x38048e(0x22c)+a31_0x5cfd3b[_0x38048e(0x393)](_0x21702f[_0x38048e(0x21d)])+'\x20'+a31_0x5cfd3b[_0x38048e(0x333)](_0x38048e(0x280)+_0x21702f['id']+')')),_0x21702f[_0x38048e(0x1d7)]&&(console['log'](_0x38048e(0x306)+a31_0x5cfd3b[_0x38048e(0x282)](_0x38048e(0x23a))+'\x20'+_0x21702f[_0x38048e(0x1d7)][_0x38048e(0x21d)]),_0x21702f[_0x38048e(0x1d7)][_0x38048e(0x1f7)]?.[_0x38048e(0x2a3)]&&console[_0x38048e(0x36f)](_0x38048e(0x2c8)+a31_0x5cfd3b['cyan'](_0x38048e(0x31d))+'\x20'+_0x21702f[_0x38048e(0x1d7)]['keyEventCriteria'][_0x38048e(0x2a3)])),_0x21702f[_0x38048e(0x1fe)]&&console['log'](_0x38048e(0x306)+a31_0x5cfd3b[_0x38048e(0x282)](_0x38048e(0x379))+'\x20'+JSON[_0x38048e(0x1e7)](_0x21702f[_0x38048e(0x1fe)])),_0x21702f[_0x38048e(0x1d4)]&&console[_0x38048e(0x36f)](_0x38048e(0x306)+a31_0x5cfd3b[_0x38048e(0x282)](_0x38048e(0x355))+_0x38048e(0x228));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x281);['description']=a31_0x1949a9(0x2e6);async['execute'](_0x3683ce){const _0x39fd51=a31_0x1949a9,{options:_0x132405,args:_0x455d73,tdx:_0x168df2}=_0x3683ce,_0x2b2f3c=_0x455d73[0x0];if(!_0x2b2f3c)return console[_0x39fd51(0x1ce)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x39fd51(0x1ce)](_0x39fd51(0x2e5)),0x1;return await withSpinner(_0x39fd51(0x2f3)+_0x2b2f3c+_0x39fd51(0x385),()=>_0x168df2[_0x39fd51(0x35a)][_0x39fd51(0x308)](_0x2b2f3c),{'verbose':_0x132405['verbose']}),console[_0x39fd51(0x1ce)]('✔\x20Deleted\x20personalization\x20\x27'+_0x2b2f3c+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x27f);[a31_0x1949a9(0x237)]='Create\x20a\x20realtime\x20personalization\x20entity';async[a31_0x1949a9(0x2fa)](_0x4cf7b6){const _0x3e4960=a31_0x1949a9,{options:_0x56645c,tdx:_0x520fba}=_0x4cf7b6,_0x4dcabb=_0x56645c;let _0x4255c6;if(_0x4dcabb[_0x3e4960(0x32f)]){_0x4255c6=await loadJSON(_0x4dcabb[_0x3e4960(0x32f)],!![]);if(!_0x4255c6[_0x3e4960(0x397)]?.[_0x3e4960(0x227)])return console[_0x3e4960(0x1ce)](_0x3e4960(0x2b3)),console[_0x3e4960(0x1ce)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x3e4960(0x1ce)](_0x3e4960(0x3ab)),0x1;}else{if(!_0x4dcabb[_0x3e4960(0x21d)])return console[_0x3e4960(0x1ce)](_0x3e4960(0x346)),console['error'](_0x3e4960(0x20e)),console[_0x3e4960(0x1ce)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x4dcabb[_0x3e4960(0x237)]===undefined)return console[_0x3e4960(0x1ce)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x3e4960(0x1ce)](_0x3e4960(0x20e)),console[_0x3e4960(0x1ce)](_0x3e4960(0x37d)),0x1;if(_0x4dcabb[_0x3e4960(0x3a6)]===undefined)return console[_0x3e4960(0x1ce)](_0x3e4960(0x248)),console[_0x3e4960(0x1ce)](_0x3e4960(0x2c4)),0x1;let _0x23e7de=_0x4dcabb[_0x3e4960(0x21b)];if(!_0x23e7de&&_0x56645c['parentSegment']){const _0x167874=await withSpinner(_0x3e4960(0x35c)+_0x56645c[_0x3e4960(0x246)]+'\x27...',()=>_0x520fba['segment'][_0x3e4960(0x1e0)](_0x56645c[_0x3e4960(0x246)]),{'verbose':_0x56645c[_0x3e4960(0x265)]});_0x23e7de=_0x167874['data'];}let _0x368e69;_0x4dcabb[_0x3e4960(0x211)]&&(_0x368e69=await loadJSON(_0x4dcabb[_0x3e4960(0x211)],![]));const _0x20f886=_0x4dcabb['folderId']===_0x3e4960(0x24f)?null:{'id':_0x4dcabb[_0x3e4960(0x3a6)],'type':_0x3e4960(0x1f5)};_0x4255c6={'attributes':{'name':_0x4dcabb[_0x3e4960(0x21d)],'description':_0x4dcabb[_0x3e4960(0x237)]||null,..._0x23e7de!==undefined&&{'audienceId':_0x23e7de},..._0x368e69!==undefined&&{'sections':_0x368e69}},'relationships':{'parentFolder':{'data':_0x20f886}}};}const _0x2b07e9=await withSpinner('Creating\x20personalization\x20\x27'+(_0x4255c6[_0x3e4960(0x398)]?.['name']??'')+_0x3e4960(0x385),()=>_0x520fba[_0x3e4960(0x35a)][_0x3e4960(0x29f)](_0x4255c6),{'verbose':_0x56645c[_0x3e4960(0x265)]}),_0x5c7087=_0x2b07e9[_0x3e4960(0x218)];return console[_0x3e4960(0x1ce)](_0x3e4960(0x1d1)+_0x5c7087[_0x3e4960(0x21d)]+_0x3e4960(0x302)+_0x5c7087['id']),await handleSDKOutput([_0x5c7087],_0x56645c),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x1949a9(0x3d6);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x216);async[a31_0x1949a9(0x2fa)](_0xa2b5a3){const _0x4b6e25=a31_0x1949a9,{options:_0x40554c,args:_0x214fec}=_0xa2b5a3,_0x2e276e=_0x40554c,_0x4d524c=_0x214fec[0x0];if(!_0x4d524c)return console['error']('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x4b6e25(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x4b6e25(0x1ce)](_0x4b6e25(0x21e)),0x1;let _0x47af1a;if(_0x2e276e['file'])_0x47af1a=await loadJSON(_0x2e276e[_0x4b6e25(0x32f)],!![]);else{if(!_0x2e276e[_0x4b6e25(0x21d)])return console[_0x4b6e25(0x1ce)](_0x4b6e25(0x346)),console[_0x4b6e25(0x1ce)](_0x4b6e25(0x31c)),0x1;if(_0x2e276e[_0x4b6e25(0x237)]===undefined)return console[_0x4b6e25(0x1ce)](_0x4b6e25(0x340)),console[_0x4b6e25(0x1ce)](_0x4b6e25(0x31c)),0x1;let _0x51f7cd;_0x2e276e[_0x4b6e25(0x211)]&&(_0x51f7cd=await loadJSON(_0x2e276e[_0x4b6e25(0x211)],![])),_0x47af1a={'attributes':{'name':_0x2e276e[_0x4b6e25(0x21d)],'description':_0x2e276e[_0x4b6e25(0x237)]||null,..._0x51f7cd!==undefined&&{'sections':_0x51f7cd}}};}const {tdx:_0x28053a}=_0xa2b5a3,_0x269142=await withSpinner(_0x4b6e25(0x26c)+_0x4d524c+'\x27...',()=>_0x28053a[_0x4b6e25(0x35a)]['patchPersonalization'](_0x4d524c,_0x47af1a),{'verbose':_0x40554c[_0x4b6e25(0x265)]}),_0x46819d=_0x269142[_0x4b6e25(0x218)];return console[_0x4b6e25(0x1ce)](_0x4b6e25(0x2e0)+_0x46819d[_0x4b6e25(0x21d)]+_0x4b6e25(0x27e)+_0x46819d['id']+')'),await handleSDKOutput([_0x46819d],_0x40554c),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']='ps:pz:init';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x3ac);async['execute'](_0x482d70){const _0x7ebe4e=a31_0x1949a9,{options:_0x4bb532,args:_0x4c5512}=_0x482d70,_0x58ddc5=_0x4c5512[0x0]||_0x4bb532[_0x7ebe4e(0x246)];if(!_0x58ddc5)return showParentSegmentNotSetError(_0x7ebe4e(0x1cd)+_0x7ebe4e(0x382)),0x1;const _0x1b7f18=resolveYamlFile(_0x58ddc5);if(!existsSync(_0x1b7f18))return showFileNotFoundError(_0x1b7f18,_0x58ddc5),0x1;let _0x187c67;try{_0x187c67=readFileSync(_0x1b7f18,_0x7ebe4e(0x1ff));}catch(_0x25b80a){const _0x546b68=_0x25b80a instanceof Error?_0x25b80a[_0x7ebe4e(0x364)]:String(_0x25b80a);return console[_0x7ebe4e(0x1ce)](_0x7ebe4e(0x332)+_0x546b68),0x1;}let _0x85e986;try{_0x85e986=parseDef(_0x187c67);}catch(_0x119703){const _0x19adcb=_0x119703 instanceof Error?_0x119703[_0x7ebe4e(0x364)]:String(_0x119703);return console['error'](a31_0x5cfd3b[_0x7ebe4e(0x3cb)](_0x7ebe4e(0x26b)+_0x19adcb)),0x1;}if(_0x85e986['personalization_services']&&_0x85e986[_0x7ebe4e(0x232)][_0x7ebe4e(0x2d4)]>0x0)return console[_0x7ebe4e(0x1ce)](a31_0x5cfd3b[_0x7ebe4e(0x245)](_0x7ebe4e(0x24e)+_0x1b7f18)),console[_0x7ebe4e(0x1ce)](a31_0x5cfd3b[_0x7ebe4e(0x333)](_0x7ebe4e(0x371)+_0x85e986['personalization_services'][_0x7ebe4e(0x2d4)]+_0x7ebe4e(0x1da))),0x1;!_0x85e986[_0x7ebe4e(0x26f)]&&(_0x85e986[_0x7ebe4e(0x26f)]={'events':[{'name':_0x7ebe4e(0x29c),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x7ebe4e(0x3ca),'type':_0x7ebe4e(0x288)}],'id_stitching':{'primary_key':_0x85e986[_0x7ebe4e(0x222)][_0x7ebe4e(0x1dc)]===_0x7ebe4e(0x344)?_0x7ebe4e(0x201):_0x7ebe4e(0x3cf)}});_0x85e986[_0x7ebe4e(0x232)]=[{'name':_0x7ebe4e(0x20f),'description':'Personalization\x20service\x20description','trigger_event':_0x7ebe4e(0x29c),'sections':[{'name':_0x7ebe4e(0x286),'criteria':'true','attributes':['last_page_viewed']}]}];const _0x234ab9=serializeDef(_0x85e986);return writeFileSync(_0x1b7f18,_0x234ab9,_0x7ebe4e(0x1ff)),console['error'](a31_0x5cfd3b[_0x7ebe4e(0x208)]('✔')+_0x7ebe4e(0x215)+a31_0x5cfd3b['cyan'](_0x1b7f18)),(!_0x85e986[_0x7ebe4e(0x26f)]||_0x187c67[_0x7ebe4e(0x369)]('realtime:')===-0x1)&&console[_0x7ebe4e(0x1ce)](a31_0x5cfd3b[_0x7ebe4e(0x208)]('✔')+_0x7ebe4e(0x33f)),console['error']('\x0a'+a31_0x5cfd3b[_0x7ebe4e(0x333)]('Next\x20steps:')),console[_0x7ebe4e(0x1ce)](_0x7ebe4e(0x23f)+_0x1b7f18+_0x7ebe4e(0x1f1)),console[_0x7ebe4e(0x1ce)](_0x7ebe4e(0x35f)+a31_0x5cfd3b[_0x7ebe4e(0x333)]('tdx\x20ps\x20push\x20'+_0x58ddc5)+_0x7ebe4e(0x20a)),0x0;}}
|
|
1
|
+
const a31_0xfeae4b=a31_0x5927;(function(_0x46c1f0,_0x5daf62){const _0x8e7c4=a31_0x5927,_0x1e628f=_0x46c1f0();while(!![]){try{const _0x3278c4=parseInt(_0x8e7c4(0x270))/0x1*(parseInt(_0x8e7c4(0x329))/0x2)+-parseInt(_0x8e7c4(0x1d8))/0x3+parseInt(_0x8e7c4(0x228))/0x4*(-parseInt(_0x8e7c4(0x28e))/0x5)+parseInt(_0x8e7c4(0x1fa))/0x6*(-parseInt(_0x8e7c4(0x293))/0x7)+parseInt(_0x8e7c4(0x281))/0x8*(-parseInt(_0x8e7c4(0x308))/0x9)+parseInt(_0x8e7c4(0x1c1))/0xa*(parseInt(_0x8e7c4(0x24d))/0xb)+-parseInt(_0x8e7c4(0x1ec))/0xc*(parseInt(_0x8e7c4(0x353))/0xd);if(_0x3278c4===_0x5daf62)break;else _0x1e628f['push'](_0x1e628f['shift']());}catch(_0x2e5cec){_0x1e628f['push'](_0x1e628f['shift']());}}}(a31_0x498e,0xb5a1f));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x31223a from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x2e332c from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0xfeae4b(0x257),LEGACY_PARENT_SEGMENT_DIR=a31_0xfeae4b(0x2bf);function openBrowser(_0xab0ff5){const _0x91a028=a31_0xfeae4b,_0x5b552e=process[_0x91a028(0x19b)],_0x261828=_0x5b552e===_0x91a028(0x303)?_0x91a028(0x24c):_0x5b552e===_0x91a028(0x1af)?_0x91a028(0x32d):_0x91a028(0x181);spawn(_0x261828,[_0xab0ff5],{'detached':!![],'stdio':'ignore'})['unref']();}function a31_0x498e(){const _0x4277a0=['Rows:','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','sourceTableValid','eventKind','Deleting\x20personalization\x20\x27','Updated','status','true','Coverage:','Validating\x20RT\x20configuration...','\x20total','resolveParentId','segment:parent:run','Schema\x20saved\x20to\x20','stop','\x0a\x20\x20]\x0a}\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','replace','228QSrjGX','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20behaviors','description','behaviors','dim','No\x20personalizations\x20configured','createParent','\x20kill','RT\x20Journey\x20ID:\x20','Creating','Error:\x20File\x20not\x20found:\x20','SQL\x20query:\x0a','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Preview:','Error:\x20Token\x20\x27','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','⚡\x20Enabled','tdx\x20ps\x20preview\x20','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Name:\x20','localeCompare','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','listJourneys','Parent\x20segment:\x20','execute','segment:parent:list','Update\x20a\x20realtime\x20personalization\x20entity','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','file','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','open','1169465idSytW','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','number','Options:\x0a','join','Listing\x20parent\x20segments...','coveragePercent','👥\x20','\x0aUsage:\x20tdx\x20ps\x20preview\x20','customersWithEvents','parent_segments','.yml','\x20No\x20changes\x20-\x20','red','\x22,\x20\x22type\x22:\x20\x22','name','\x27\x20is\x20up\x20to\x20date','sampleData','all','✔\x20No\x20changes\x20-\x20\x27','audienceId','\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','bold','ps:pz:service:update','Delete\x20a\x20personalization\x20service','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','events','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','includeSensitive:','Errors:','trim','behavior','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','stats','idStitching','4021XVOMxF','\x20\x20Note:\x20','\x0a✔\x20Workflow\x20started','rowCount','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','updateParent','scheduleType','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Source:','deletePersonalization','\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','No\x20RT\x20journeys\x20found','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','folder-segment','run','Get\x20current\x20RT\x20configuration\x20version\x20status','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','4191424BReiYJ','entryCriteria','state','✔\x20Updated\x20personalization\x20service\x20\x27','Error\x20parsing\x20YAML:\x20','\x20--attribute\x20\x22','Updating\x20parent\x20segment\x20\x27','Behavior:','Join\x20on:','Create\x20parent\x20segment\x20\x27','\x20--enriched','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','displayColumns','10250vyjLoK','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','To\x20view\x20sample\x20data:','\x27...','\x20\x202.\x20Run\x20','14aJNXKu','joinKey','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','Creating\x20parent\x20segment\x20\x27','limit','Apply\x20changes\x20to\x20\x27','YAML\x20file:\x20','behavior_','\x0aNew\x20parent\x20segment\x20\x27','green','ps:rt:jn:resume','schemaValid','Show\x20parent\x20segment\x20details','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\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','\x20\x20Database:\x20','workflowAttemptId','\x20service','sort','interval','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','getBehaviorNames','utf-8','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','ps:rt:validate','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','timezone','\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','Executing\x20parent\x20segment\x20query...','(id:\x20','getOutputDatabaseName','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','page_view','\x0a\x20\x20\x20\x20]','sections','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x20=\x20','identifier:\x20','Deleting\x20personalization\x20service\x20\x27','createdAt','Error:\x20Personalization\x20ID\x20is\x20required','No\x20parent\x20segments\x20match\x20pattern:\x20','personalization_services','parent_segment','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','format','\x20--attribute\x20\x22<name>\x22','value','primaryKey','\x20--interval\x20','updated:','no\x20tokens\x20configured','displaySampleData','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Output\x20Database:','setJobId','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','type','json','tokens','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','getParentSQL','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Personalization:','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','segment:parent:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20parent\x20segment\x20\x27','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','/sessions/','Creating\x20personalization\x20\x27','apply','stageCount','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','sections:','\x0a\x20\x20\x20\x20}','listPersonalizations','✔\x20Found\x20','column','ps:pz:delete','/\x20directory.\x0a','Fetching\x20customers\x20schema...','parent_id','Found\x20YAML\x20file:\x20','length','population','\x20rows\x20','createToken','enriched','\x20to\x20push\x20the\x20configuration','displayAttributesStats','filter','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','allowed\x20IPs:','Validate:','\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','Error:\x20--attribute\x20requires\x20a\x20name\x0a','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','\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','customerGroup','parentSegment','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','payload','\x20is\x20already\x20up\x20to\x20date','ps:pz:list','ps:rt:configuration_versions','database','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','darwin','jobId','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x27\x20with\x20ID:\x20','18WiKALN','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Behaviors','Attempt:','\x20RT\x20configuration\x20is\x20valid','text','query','Events:','SELECT\x20*\x20FROM\x20(\x0a','pauseJourney','customers','workflowId','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','\x27\x20(id:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','delete','getParentFull','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20RT\x20journey','✔\x20Updated\x20personalization\x20\x27','✔\x20Found\x20personalization\x20\x27','\x0aError:','Fetching\x20SQL\x20for\x20\x27','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','\x20\x20Tables:\x201\x20customers\x20+\x20','customerPercent','Error:\x20Token\x20name\x20is\x20required','Enriched:','table','590XZGfoc','ps:pz:init','toFixed','\x20(paused)','start','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','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','segment','Aborted.','/\x20directories\x20exist.','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','last_page_viewed','push','displayBehaviorsStats','yes','segment:parent:push','\x20Context\x20set:\x20','/{name}.yml\x0a','data','List\x20parent\x20segments','preview','ps:pz:service:token:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Fetching\x20parent\x20segment\x20\x27','List\x20RT\x20journeys','%)\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','behaviorsFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','public:','\x20tdx\x20wf\x20attempt\x20','addAttributesFile','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Updating','segment:parent:desc','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Finding\x20service\x20for\x20token...','Error:\x20--database\x20and\x20--table\x20are\x20required','Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a','verbose','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','-1d','39dazBuY','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','previewParentYaml','getPersonalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','schemaError','dirname','Site:\x20','✔\x20Deleted\x20personalization\x20service\x20\x27','label','repeat','Creating\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','\x22\x20}','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','use','relationships','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Updating\x20personalization\x20service\x20\x27','stitchingKeys','\x20true','Getting\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','ps:rt:jn:pause','ps:pz:patch','resumeJourney','No\x20parent\x20segments\x20found','realtime:','launched','RT\x202.0:','Error:\x20--name\x20is\x20required','\x20to\x20configure\x20your\x20personalization\x20service','\x20configured','Error\x20reading\x20file:\x20','toLocaleString','allowedIps','workflowSessionId','folderId','attribute','\x27\x20for\x20service\x20\x27','realtime_enabled','displayPreviewHints','Available\x20behaviors:','Personalization\x20service\x20description','Analyzing\x20changes...','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','string','columns','<database>.<table>','column_name','session','Master:','Deleting\x20token\x20\x27','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','foreignKey','\x20personalization\x20service','/\x20→\x20','Join:','\x20\x201.\x20Edit\x20','matchedCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','collectSchema','single','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Created','column_type','Validating\x20configuration...','personalization','test','\x0a⚠️\x20\x20Migrating:\x20','indexOf','personalizationServices','ps:pz:service:show','✘\x20Failed\x20to\x20rename\x20directory:\x20','audienceId:','ps:rt:list','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','ps:pz:service:delete','Available\x20attributes:','Resume\x20activations\x20in\x20an\x20RT\x20journey','some','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','No\x20personalization\x20services\x20configured','\x20Added\x20RT\x202.0\x20template\x20section','using\x20the\x20default\x20path:\x20','\x0aChanges\x20to\x20\x27','\x0aNo\x20sample\x20data\x20available','displaySummary','\x20\x20Columns:\x20','varchar','\x20[Job\x20ID:\x20','xdg-open','\x20\x20\x20\x20','web','enabled','Create\x20a\x20realtime\x20personalization\x20entity','`\x20to\x20download\x20the\x20configuration\x20first','segment:parent:view','.yaml','td_client_id','displayValidateResults','parentFolder','sourceTableError','\x27\x20and\x20run\x20workflow?','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','scheduleOption','Error:\x20Parent\x20segment\x20name\x20is\x20required','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Get\x20SQL\x20query\x20for\x20parent\x20segment','site','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','displayPreviewResults','yellow','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','totalEvents','\x20\x20\x20','segment:parent:validate','platform','Resolving\x20parent\x20segment\x20\x27','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20rows)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','ps:rt:jn:list','log','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Error:\x20Service\x20name\x20is\x20required','Listing\x20parent\x20segments\x20matching\x20\x27','\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','toLowerCase','deleteToken','identifier','id:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20Configuration\x20is\x20valid','keyEventId:','updatedAt','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','win32','Listing\x20fields\x20for\x20\x27','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','endsWith','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','list','Options:','Columns:','ps:pz:service:token:delete','listParents','cyan','✔\x20Query\x20completed:\x20Processed\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','\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','patch','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','130lHLmha','Pause\x20activations\x20in\x20an\x20RT\x20journey','patchPersonalization','No\x20RT-enabled\x20parent\x20segments\x20found','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','ps:pz:create','Fetching\x20behavior\x20list...','Customers:','Delete\x20a\x20realtime\x20personalization','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\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','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Overwrite\x20\x27','runParent','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Options\x20(one\x20required):\x0a','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Error:\x20Token\x20ID\x20is\x20required','null','✔\x20Updated\x20parent\x20segment\x20\x27','⚡\x20Not\x20enabled','925884iBGQhn','information_schema','Patching\x20personalization\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','output','SELECT\x20*\x20FROM\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','any','/app/dw/parentSegments/','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','includeSensitive','validateParentYaml','formatSchemaJson','\x20--behavior\x20\x22','pullParentYaml','Attributes:','\x20field','message','displayMasterInfo','isDirectory','466836xujQWh','\x5c$&','Error:\x20Service\x20ID\x20is\x20required','addAttributes','paused','\x20Added\x20personalization\x20template\x20to\x20','errors','master','keyEventId','eventKind:\x20','realtime','.customers)','public','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','702840uDOyCh','\x20\x20\x20\x20-\x20','error','Master\x20Table','token:','Listing\x20RT\x20journeys\x20for\x20\x27','attributes','stringify','Error:','To\x20cancel:','Listing\x20personalizations\x20for\x20\x27','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','allValid','\x20personalization','✔\x20Retrieved\x20RT\x20configuration\x20version','\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x0a⚠️\x20\x20Both\x20','Audience\x20ID:','map','Show\x20a\x20specific\x20realtime\x20personalization','match','segment:parent:preview','keyEventCriteria','Attribute:','jsonl','in\x20','getCurrentConfigVersion'];a31_0x498e=function(){return _0x4277a0;};return a31_0x498e();}function migrateLegacyDirectory(){const _0x3459ad=a31_0xfeae4b;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x2fcbe1=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x2fcbe1[_0x3459ad(0x1eb)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x196)](_0x3459ad(0x20b)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+_0x3459ad(0x332))),console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x231)](_0x3459ad(0x1a2)+LEGACY_PARENT_SEGMENT_DIR+_0x3459ad(0x2e6))),![];console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x196)](_0x3459ad(0x16b)+LEGACY_PARENT_SEGMENT_DIR+_0x3459ad(0x15e)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3459ad(0x1fc)](a31_0x2e332c['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x52f16a){const _0x29c00e=_0x52f16a instanceof Error?_0x52f16a[_0x3459ad(0x1e9)]:String(_0x52f16a);return console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x25a)](_0x3459ad(0x16f)+_0x29c00e+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0xfeae4b(0x27e)](_0x2117d3){const _0x233a15=a31_0xfeae4b;return migrateLegacyDirectory(),super[_0x233a15(0x27e)](_0x2117d3);}}function resolveYamlFile(_0x881696){const _0x1dba64=a31_0xfeae4b;if(_0x881696[_0x1dba64(0x1b2)](_0x1dba64(0x258))||_0x881696[_0x1dba64(0x1b2)](_0x1dba64(0x188)))return _0x881696;return a31_0x31223a['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x881696)+_0x1dba64(0x258));}function formatProgressMessage(_0x3fc4de){const _0x8f6ebe=a31_0xfeae4b,_0x44a919=_0x3fc4de[_0x8f6ebe(0x20f)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x44a919){const [,_0x265cd0,_0x43da10,_0x2385b1='']=_0x44a919;return a31_0x2e332c[_0x8f6ebe(0x231)](_0x265cd0+':')+'\x20'+_0x43da10+a31_0x2e332c[_0x8f6ebe(0x231)](_0x2385b1);}return a31_0x2e332c[_0x8f6ebe(0x231)](_0x3fc4de);}function showFileNotFoundError(_0x480f78,_0x563f47){const _0x2789dd=a31_0xfeae4b;console[_0x2789dd(0x1fc)](a31_0x2e332c[_0x2789dd(0x25a)](_0x2789dd(0x237)+_0x480f78+'\x0a')),console[_0x2789dd(0x1fc)](a31_0x2e332c[_0x2789dd(0x1b9)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x563f47+_0x2789dd(0x186)));}function displayRealtimeValidation(_0x4871d3){const _0x4e1d20=a31_0xfeae4b;if(!_0x4871d3[_0x4e1d20(0x1f6)])return;const _0x2b9ad2=_0x4871d3[_0x4e1d20(0x1f6)],_0x350ad1=_0x2b9ad2[_0x4e1d20(0x184)]?a31_0x2e332c['green'](_0x4e1d20(0x23d)):a31_0x2e332c[_0x4e1d20(0x196)](_0x4e1d20(0x1d7));console[_0x4e1d20(0x1fc)]('\x0a'+a31_0x2e332c[_0x4e1d20(0x231)](_0x4e1d20(0x371))+'\x20'+_0x350ad1);if(_0x2b9ad2[_0x4e1d20(0x267)]&&_0x2b9ad2[_0x4e1d20(0x267)][_0x4e1d20(0x2ea)]>0x0){console[_0x4e1d20(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x4e1d20(0x311))+'\x20'+_0x2b9ad2[_0x4e1d20(0x267)][_0x4e1d20(0x2ea)]+_0x4e1d20(0x374));for(const _0x42fe12 of _0x2b9ad2[_0x4e1d20(0x267)]){const _0x57289e=_0x42fe12[_0x4e1d20(0x218)]===![]?a31_0x2e332c[_0x4e1d20(0x25a)]('✘'):a31_0x2e332c['green']('✔');console[_0x4e1d20(0x1fc)](_0x4e1d20(0x182)+_0x57289e+'\x20'+_0x42fe12[_0x4e1d20(0x25c)]),_0x42fe12['sourceTableError']&&console['error'](_0x4e1d20(0x209)+a31_0x2e332c['red'](_0x42fe12[_0x4e1d20(0x18c)]));}}if(_0x2b9ad2[_0x4e1d20(0x200)]&&_0x2b9ad2[_0x4e1d20(0x200)][_0x4e1d20(0x2ea)]>0x0){console[_0x4e1d20(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x4e1d20(0x1e7))+'\x20'+_0x2b9ad2[_0x4e1d20(0x200)]['length']+_0x4e1d20(0x374));for(const _0x211f74 of _0x2b9ad2[_0x4e1d20(0x200)]){const _0x42ada9=_0x211f74['valid']?a31_0x2e332c[_0x4e1d20(0x29c)]('✔'):a31_0x2e332c[_0x4e1d20(0x25a)]('✘');console['error']('\x20\x20\x20\x20'+_0x42ada9+'\x20'+_0x211f74['name']+'\x20'+a31_0x2e332c[_0x4e1d20(0x231)]('('+_0x211f74[_0x4e1d20(0x2cd)]+')'));}}if(_0x2b9ad2[_0x4e1d20(0x26f)]){const _0xf52337=_0x2b9ad2[_0x4e1d20(0x26f)][_0x4e1d20(0x367)]?.[_0x4e1d20(0x2ea)]?'\x20+\x20['+_0x2b9ad2['idStitching'][_0x4e1d20(0x367)][_0x4e1d20(0x251)](',\x20')+']':'';console[_0x4e1d20(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x4e1d20(0x231)]('ID\x20Stitching:')+'\x20'+_0x2b9ad2['idStitching'][_0x4e1d20(0x2c4)]+_0xf52337);}if(_0x2b9ad2[_0x4e1d20(0x16d)]&&_0x2b9ad2[_0x4e1d20(0x16d)][_0x4e1d20(0x2ea)]>0x0){console['error']('\x20\x20'+a31_0x2e332c[_0x4e1d20(0x231)](_0x4e1d20(0x2d3))+'\x20'+_0x2b9ad2['personalizationServices']['length']+_0x4e1d20(0x2a4)+(_0x2b9ad2['personalizationServices'][_0x4e1d20(0x2ea)]!==0x1?'s':''));for(const _0x4989a8 of _0x2b9ad2[_0x4e1d20(0x16d)]){console[_0x4e1d20(0x1fc)](_0x4e1d20(0x1fb)+_0x4989a8[_0x4e1d20(0x25c)]);}}}function showParentSegmentNotSetError(_0xcbe2e){const _0x17b9de=a31_0xfeae4b;console[_0x17b9de(0x1fc)](a31_0x2e332c[_0x17b9de(0x196)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console['error'](_0xcbe2e);}export class ParentSegmentListCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x246);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x33c);async['execute'](_0x9108ea){const _0x278b77=a31_0xfeae4b,{options:_0x28d38b,args:_0x2bed11,tdx:_0x2a8476}=_0x9108ea,_0x136135=_0x2bed11[0x0];_0x28d38b['verbose']&&(console['error']('Site:\x20'+_0x28d38b[_0x278b77(0x193)]),_0x136135&&console[_0x278b77(0x1fc)]('Pattern:\x20'+_0x136135));const _0x23a131=await withSpinner(_0x136135?_0x278b77(0x1a4)+_0x136135+_0x278b77(0x291):_0x278b77(0x252),()=>_0x2a8476[_0x278b77(0x330)][_0x278b77(0x1b8)](),{'verbose':_0x28d38b[_0x278b77(0x350)]});let _0x289750=_0x23a131[_0x278b77(0x33b)];if(_0x136135){const _0x1b6101=_0x136135[_0x278b77(0x227)](/[.+^${}()|[\]\\]/g,_0x278b77(0x1ed))[_0x278b77(0x227)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4796ad=new RegExp('^'+_0x1b6101+'$','i');_0x289750=_0x289750[_0x278b77(0x2f1)](_0xe95690=>_0x4796ad['test'](_0xe95690['attributes'][_0x278b77(0x25c)]));}_0x289750[_0x278b77(0x2a5)]((_0xc3c480,_0x3b1756)=>_0xc3c480[_0x278b77(0x200)][_0x278b77(0x25c)][_0x278b77(0x241)](_0x3b1756['attributes']['name'])),console[_0x278b77(0x1fc)](_0x278b77(0x2e3)+_0x289750['length']+'\x20parent\x20segment'+(_0x289750[_0x278b77(0x2ea)]!==0x1?'s':''));const _0x36e76f=_0x563a27=>{const _0x44f71d=_0x278b77;return getConsoleNextUrl(_0x28d38b[_0x44f71d(0x193)],'/app/dw/parentSegments/'+_0x563a27);};if(_0x28d38b[_0x278b77(0x2c1)]===_0x278b77(0x2ce)||_0x28d38b['format']===_0x278b77(0x213)){const _0x9bec79=_0x289750['map'](_0x517638=>({..._0x517638,'url':_0x36e76f(_0x517638['id'])}));await handleSDKOutput(_0x9bec79,_0x28d38b);}else{if(_0x289750[_0x278b77(0x2ea)]===0x0)_0x136135?console['log'](_0x278b77(0x2bd)+_0x136135):console[_0x278b77(0x1a1)](_0x278b77(0x36e));else for(const _0x46c06d of _0x289750){const _0x5897ac=_0x46c06d[_0x278b77(0x200)][_0x278b77(0x2eb)]?a31_0x2e332c[_0x278b77(0x231)]('\x20('+formatRows(_0x46c06d['attributes'][_0x278b77(0x2eb)])+')'):'',_0x53f0bf=hyperlink(_0x46c06d[_0x278b77(0x200)][_0x278b77(0x25c)],_0x36e76f(_0x46c06d['id']));console['log'](_0x278b77(0x254)+_0x53f0bf+_0x5897ac);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x2d7);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x266);async[a31_0xfeae4b(0x245)](_0x422c03){const _0x3b1234=a31_0xfeae4b,{options:_0x237ef1,args:_0x403dac,tdx:_0x1f09ac}=_0x422c03;console[_0x3b1234(0x1fc)](_0x3b1234(0x1cc)+_0x3b1234(0x2d0)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x4343ba=_0x237ef1;if(_0x403dac[_0x3b1234(0x2ea)]===0x0)return console[_0x3b1234(0x1fc)](a31_0x2e332c[_0x3b1234(0x25a)](_0x3b1234(0x190))),console[_0x3b1234(0x1fc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x257099=_0x403dac[0x0];if(!_0x4343ba[_0x3b1234(0x301)]||!_0x4343ba[_0x3b1234(0x328)])return console['error'](_0x3b1234(0x34e)),console[_0x3b1234(0x1fc)](_0x3b1234(0x172)),0x1;_0x4343ba['verbose']&&(console[_0x3b1234(0x1fc)](_0x3b1234(0x35a)+_0x4343ba[_0x3b1234(0x193)]),console[_0x3b1234(0x1fc)](_0x3b1234(0x240)+_0x257099),console[_0x3b1234(0x1fc)]('Database:\x20'+_0x4343ba[_0x3b1234(0x301)]),console[_0x3b1234(0x1fc)]('Table:\x20'+_0x4343ba[_0x3b1234(0x328)]));const _0x3d8000=await loadJSONFromOptions(_0x4343ba['attributes'],_0x4343ba['attributesFile']),_0x5e5a3c=await loadJSONFromOptions(_0x4343ba[_0x3b1234(0x230)],_0x4343ba[_0x3b1234(0x344)]),_0x270fd0=await loadJSONFromOptions(_0x4343ba['customerGroup'],_0x4343ba['customerGroupFile']),_0x46dfa5={'name':_0x257099,'description':_0x4343ba[_0x3b1234(0x22f)],'scheduleType':_0x4343ba[_0x3b1234(0x276)],'scheduleOption':_0x4343ba[_0x3b1234(0x18f)],'timezone':_0x4343ba[_0x3b1234(0x2ae)],'master':{'parentDatabaseName':_0x4343ba[_0x3b1234(0x301)],'parentTableName':_0x4343ba['table']},'attributes':_0x3d8000,'behaviors':_0x5e5a3c,'customerGroup':_0x270fd0},_0x4d6993=await withSpinner(_0x3b1234(0x296)+_0x257099+_0x3b1234(0x291),()=>_0x1f09ac['segment'][_0x3b1234(0x233)](_0x46dfa5),{'verbose':_0x237ef1['verbose']}),_0x5769be=_0x4d6993[_0x3b1234(0x33b)];return console[_0x3b1234(0x1fc)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x5769be[_0x3b1234(0x25c)]+_0x3b1234(0x307)+_0x5769be['id']),await handleSDKOutput([_0x5769be],_0x237ef1),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']='segment:parent:update';['description']=a31_0xfeae4b(0x30b);async[a31_0xfeae4b(0x245)](_0x56dee0){const _0x570444=a31_0xfeae4b,{options:_0x5c5539,args:_0x2468a0,tdx:_0x429316}=_0x56dee0;console[_0x570444(0x1fc)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x570444(0x2d0)+_0x570444(0x2ad));const _0x46cca1=_0x5c5539;if(_0x2468a0[_0x570444(0x2ea)]===0x0)return console['error'](a31_0x2e332c[_0x570444(0x25a)](_0x570444(0x190))),console[_0x570444(0x1fc)](_0x570444(0x1c5)),0x1;const _0x83b1a5=_0x2468a0[0x0];_0x46cca1[_0x570444(0x350)]&&(console[_0x570444(0x1fc)](_0x570444(0x35a)+_0x46cca1[_0x570444(0x193)]),console['error'](_0x570444(0x244)+_0x83b1a5));const _0x283037=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x83b1a5+_0x570444(0x291),()=>_0x429316['segment'][_0x570444(0x31c)](_0x83b1a5),{'verbose':_0x46cca1[_0x570444(0x350)]}),_0x3f3eb4=_0x283037[_0x570444(0x33b)],_0x2c2552=await loadJSONFromOptions(_0x46cca1[_0x570444(0x1ef)],_0x46cca1[_0x570444(0x348)]),_0x582e31=await loadJSONFromOptions(_0x46cca1['addBehaviors'],_0x46cca1['addBehaviorsFile']),_0x43656f={'name':_0x3f3eb4[_0x570444(0x25c)],'description':_0x46cca1['description']!==undefined?_0x46cca1[_0x570444(0x22f)]:_0x3f3eb4[_0x570444(0x22f)],'scheduleType':_0x46cca1[_0x570444(0x276)]!==undefined?_0x46cca1['scheduleType']:_0x3f3eb4[_0x570444(0x276)],'scheduleOption':_0x46cca1['scheduleOption']!==undefined?_0x46cca1[_0x570444(0x18f)]:_0x3f3eb4[_0x570444(0x18f)],'timezone':_0x46cca1['timezone']!==undefined?_0x46cca1[_0x570444(0x2ae)]:_0x3f3eb4['timezone'],'master':_0x3f3eb4[_0x570444(0x1f3)],'attributes':_0x2c2552?[..._0x3f3eb4[_0x570444(0x200)]||[],..._0x2c2552]:_0x3f3eb4[_0x570444(0x200)],'behaviors':_0x582e31?[..._0x3f3eb4['behaviors']||[],..._0x582e31]:_0x3f3eb4[_0x570444(0x230)],'customerGroup':_0x3f3eb4[_0x570444(0x2f9)]},_0x1db379=await withSpinner(_0x570444(0x287)+_0x83b1a5+_0x570444(0x291),()=>_0x429316[_0x570444(0x330)][_0x570444(0x275)](_0x83b1a5,_0x43656f),{'verbose':_0x46cca1[_0x570444(0x350)]}),_0xc5caab=_0x1db379[_0x570444(0x33b)];return console[_0x570444(0x1fc)](_0x570444(0x1d6)+_0xc5caab['name']+'\x27'),await handleSDKOutput([_0xc5caab],_0x46cca1),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x28f);async['execute'](_0xfed413){const _0x13847f=a31_0xfeae4b,{options:_0x3dacce,args:_0x5d6bea,tdx:_0x4f28f2}=_0xfed413,_0x5635c1=_0x3dacce,_0x4e221c=_0x5d6bea[0x0]||_0x3dacce[_0x13847f(0x2fa)];if(!_0x4e221c)return showParentSegmentNotSetError(_0x13847f(0x349)+_0x13847f(0x345)),0x1;if(_0x5635c1[_0x13847f(0x363)]&&_0x5635c1[_0x13847f(0x1dc)])return console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x25a)](_0x13847f(0x1d2))),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x239))),console['error'](a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x17a)+PARENT_SEGMENT_DIR+_0x13847f(0x33a))),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x1b9)](_0x13847f(0x317))),0x1;const _0x2ee65e=_0x5635c1[_0x13847f(0x1dc)]||a31_0x31223a[_0x13847f(0x251)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x4e221c)+_0x13847f(0x258));_0x5635c1[_0x13847f(0x350)]&&(console[_0x13847f(0x1fc)](_0x13847f(0x35a)+_0x5635c1['site']),console[_0x13847f(0x1fc)]('Parent\x20segment:\x20'+_0x4e221c),console[_0x13847f(0x1fc)]('Output\x20file:\x20'+_0x2ee65e));const _0x5a3474=await withSpinner(_0x13847f(0x340)+_0x4e221c+'\x27...',()=>_0x4f28f2[_0x13847f(0x330)][_0x13847f(0x1e6)](_0x4e221c),{'verbose':_0x5635c1[_0x13847f(0x350)]}),_0x26e7d0=_0x5a3474[_0x13847f(0x33b)];if(existsSync(_0x2ee65e)){const _0x58164e=readFileSync(_0x2ee65e,_0x13847f(0x2aa)),_0x4790a8=generateDiff(_0x58164e,_0x26e7d0);if(!hasChanges(_0x4790a8))console[_0x13847f(0x1fc)](a31_0x2e332c['green']('✔')+_0x13847f(0x259)+a31_0x2e332c[_0x13847f(0x1b9)](_0x2ee65e)+_0x13847f(0x2fe));else{console[_0x13847f(0x1fc)](_0x13847f(0x17b)+_0x2ee65e+'\x27:'),console['error']('─'[_0x13847f(0x35d)](0x3c)),console[_0x13847f(0x1fc)](formatDiffWithColors(_0x4790a8)),console[_0x13847f(0x1fc)]('─'[_0x13847f(0x35d)](0x3c));if(!_0x5635c1[_0x13847f(0x337)]){if(!isInteractive())return console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x25a)](_0x13847f(0x321)),_0x13847f(0x1f9)),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x1cf))),0x1;const _0x245acf=await confirmKey(_0x13847f(0x1cd)+_0x2ee65e+'\x27?');if(!_0x245acf)return console[_0x13847f(0x1fc)](a31_0x2e332c['yellow']('Aborted.')),0x1;}writeFileSync(_0x2ee65e,_0x26e7d0,_0x13847f(0x2aa)),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x29c)]('✔')+_0x13847f(0x24e)+a31_0x2e332c['cyan'](_0x2ee65e));}}else{const _0x363960=a31_0x31223a[_0x13847f(0x359)](_0x2ee65e);!existsSync(_0x363960)&&mkdirSync(_0x363960,{'recursive':!![]}),writeFileSync(_0x2ee65e,_0x26e7d0,_0x13847f(0x2aa)),console[_0x13847f(0x1fc)](a31_0x2e332c['green']('✔')+_0x13847f(0x24e)+a31_0x2e332c[_0x13847f(0x1b9)](_0x2ee65e));}return saveSessionContext({'parent_segment':_0x4e221c},_0x5635c1[_0x13847f(0x386)]),console['error'](a31_0x2e332c['green']('✔')+_0x13847f(0x339)+a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x2bf))+_0x13847f(0x2b8)+a31_0x2e332c[_0x13847f(0x1b9)](_0x4e221c)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a31_0xfeae4b(0x338);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x177);async['execute'](_0x5af55f){const _0xc2b6cd=a31_0xfeae4b,{options:_0x15069d,args:_0x5179cc,tdx:_0x3e2434}=_0x5af55f,_0x1f08d8=_0x15069d,_0x4b2f3e=_0x5179cc[0x0]||_0x15069d[_0xc2b6cd(0x2fa)];if(!_0x4b2f3e)return showParentSegmentNotSetError(_0xc2b6cd(0x323)+_0xc2b6cd(0x19f)),0x1;const _0x730bf6=resolveYamlFile(_0x4b2f3e);if(!existsSync(_0x730bf6))return showFileNotFoundError(_0x730bf6,_0x4b2f3e),0x1;_0x1f08d8[_0xc2b6cd(0x350)]&&(console['error'](_0xc2b6cd(0x35a)+_0x1f08d8[_0xc2b6cd(0x193)]),console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x299)+_0x730bf6));let _0x793c2;try{_0x793c2=readFileSync(_0x730bf6,_0xc2b6cd(0x2aa));}catch(_0x49862c){const _0x3f9b3d=_0x49862c instanceof Error?_0x49862c['message']:String(_0x49862c);return console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x375)+_0x3f9b3d),0x1;}const _0x7e8363=await withSpinner(_0xc2b6cd(0x380),()=>_0x3e2434[_0xc2b6cd(0x330)]['pushParentYaml'](_0x793c2),{'verbose':_0x1f08d8['verbose']}),_0x2fc62b=_0x7e8363[_0xc2b6cd(0x33b)],{isNew:_0x239044,name:_0x59348b,hasChanges:_0x12edc5,diffFormatted:_0x51cb83}=_0x2fc62b;if(!_0x12edc5)return console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x260)+_0x59348b+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x239044?console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x29b)+_0x59348b+'\x27:'):console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x19d)+_0x59348b+'\x27:');console['error']('─'['repeat'](0x3c)),console[_0xc2b6cd(0x1fc)](_0x51cb83),console['error']('─'[_0xc2b6cd(0x35d)](0x3c));const _0x34f2dc=_0x239044?_0xc2b6cd(0x28a)+_0x59348b+'\x27?':_0xc2b6cd(0x298)+_0x59348b+'\x27?';if(!_0x1f08d8[_0xc2b6cd(0x337)]){if(!isInteractive())return console[_0xc2b6cd(0x1fc)](a31_0x2e332c[_0xc2b6cd(0x25a)](_0xc2b6cd(0x321)),_0xc2b6cd(0x1f9)),console[_0xc2b6cd(0x1fc)](a31_0x2e332c[_0xc2b6cd(0x231)](_0xc2b6cd(0x1cf))),0x1;const _0x23e0fc=await confirmKey(_0x34f2dc);if(!_0x23e0fc)return console[_0xc2b6cd(0x1fc)](a31_0x2e332c['yellow'](_0xc2b6cd(0x331))),0x1;}const _0x1d99c2=_0x239044?_0xc2b6cd(0x236):'Updating',_0xa3bf4d=await withSpinner(_0x1d99c2+_0xc2b6cd(0x2d9)+_0x59348b+_0xc2b6cd(0x291),()=>_0x2fc62b[_0xc2b6cd(0x2dd)](),{'verbose':_0x1f08d8[_0xc2b6cd(0x350)]}),_0x391c2c=_0xa3bf4d[_0xc2b6cd(0x33b)],_0x298a16=getConsoleNextUrl(_0x1f08d8[_0xc2b6cd(0x193)],_0xc2b6cd(0x1e0)+_0x391c2c['id']),_0x5db4f9=_0x239044?_0xc2b6cd(0x166):_0xc2b6cd(0x21b);return console['error']('✔\x20'+_0x5db4f9+_0xc2b6cd(0x2d9)+_0x391c2c[_0xc2b6cd(0x25c)]+'\x27'),console[_0xc2b6cd(0x1fc)]('\x20\x20'+_0x298a16),0x0;}}function a31_0x5927(_0x52ef1b,_0x15f996){_0x52ef1b=_0x52ef1b-0x15c;const _0x498efd=a31_0x498e();let _0x592781=_0x498efd[_0x52ef1b];return _0x592781;}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']=a31_0xfeae4b(0x19a);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x197);async['execute'](_0x5a4b9c){const _0x5ca568=a31_0xfeae4b,{options:_0x5ea12b,args:_0x157302,tdx:_0x2859c8}=_0x5a4b9c,_0x33f3d2=_0x5ea12b,_0x3f6f7b=_0x157302[0x0]||_0x5ea12b[_0x5ca568(0x2fa)];if(!_0x3f6f7b)return showParentSegmentNotSetError(_0x5ca568(0x2d6)+_0x5ca568(0x33f)+'Options:\x0a'+_0x5ca568(0x333)+_0x5ca568(0x2a0)+_0x5ca568(0x277)),0x1;const _0x347a81=resolveYamlFile(_0x3f6f7b);if(!existsSync(_0x347a81))return showFileNotFoundError(_0x347a81,_0x3f6f7b),0x1;_0x33f3d2[_0x5ca568(0x350)]&&(console[_0x5ca568(0x1fc)](_0x5ca568(0x35a)+_0x33f3d2[_0x5ca568(0x193)]),console['error'](_0x5ca568(0x299)+_0x347a81));let _0x45457c;try{_0x45457c=readFileSync(_0x347a81,_0x5ca568(0x2aa));}catch(_0x266fc7){const _0xa96c91=_0x266fc7 instanceof Error?_0x266fc7['message']:String(_0x266fc7);return console[_0x5ca568(0x1fc)]('Error\x20reading\x20file:\x20'+_0xa96c91),0x1;}const _0x152f1d=createCommandSpinner(a31_0x2e332c[_0x5ca568(0x231)](_0x5ca568(0x168)),{'verbose':_0x33f3d2[_0x5ca568(0x350)]});_0x152f1d[_0x5ca568(0x32d)]();const _0x676eea={'onProgress':_0x100f70=>{_0x152f1d['text']=formatProgressMessage(_0x100f70);}};if(_0x33f3d2[_0x5ca568(0x1f3)])_0x676eea['master']=!![];if(_0x33f3d2['enriched'])_0x676eea['enriched']=!![];_0x33f3d2[_0x5ca568(0x37a)]&&(_0x676eea[_0x5ca568(0x37a)]=_0x33f3d2[_0x5ca568(0x37a)]);_0x33f3d2[_0x5ca568(0x26c)]&&(_0x676eea['behavior']=_0x33f3d2[_0x5ca568(0x26c)]);if(_0x33f3d2['interval'])_0x676eea[_0x5ca568(0x2a6)]=_0x33f3d2['interval'];let _0xf3ccb0;try{_0xf3ccb0=await _0x2859c8[_0x5ca568(0x330)][_0x5ca568(0x1e3)](_0x45457c,_0x676eea),_0x152f1d['stop']();}catch(_0x899d42){_0x152f1d[_0x5ca568(0x224)]();throw _0x899d42;}const _0x3010a2=_0x33f3d2['interval']||_0x5ca568(0x352);return this['displayValidateResults'](_0xf3ccb0,_0x676eea,_0x347a81,_0x3010a2),_0xf3ccb0[_0x5ca568(0x206)]?0x0:0x1;}[a31_0xfeae4b(0x18a)](_0x47a4c5,_0x40ee29,_0x2ea91f,_0x16914b){const _0x3eea76=a31_0xfeae4b;console[_0x3eea76(0x1fc)]('\x0a'+a31_0x2e332c[_0x3eea76(0x263)](_0x3eea76(0x2f4))+'\x20'+_0x47a4c5['name']),console[_0x3eea76(0x1fc)]('═'[_0x3eea76(0x35d)](0x3c)),this[_0x3eea76(0x1ea)](_0x47a4c5);if(typeof _0x40ee29[_0x3eea76(0x37a)]===_0x3eea76(0x382)){this[_0x3eea76(0x2f0)](_0x47a4c5),this[_0x3eea76(0x17d)](_0x47a4c5),this[_0x3eea76(0x37d)](_0x2ea91f,_0x16914b,_0x3eea76(0x37a),_0x40ee29[_0x3eea76(0x37a)]);return;}if(_0x40ee29[_0x3eea76(0x37a)]===!![]){this[_0x3eea76(0x2f0)](_0x47a4c5),this['displaySummary'](_0x47a4c5),this['displayPreviewHints'](_0x2ea91f,_0x16914b,_0x3eea76(0x200));return;}if(typeof _0x40ee29[_0x3eea76(0x26c)]==='string'){this[_0x3eea76(0x336)](_0x47a4c5,_0x16914b),this[_0x3eea76(0x17d)](_0x47a4c5),this[_0x3eea76(0x37d)](_0x2ea91f,_0x16914b,'behavior',_0x40ee29[_0x3eea76(0x26c)]);return;}if(_0x40ee29['behavior']===!![]){this['displayBehaviorsStats'](_0x47a4c5,_0x16914b),this['displaySummary'](_0x47a4c5),this['displayPreviewHints'](_0x2ea91f,_0x16914b,_0x3eea76(0x230));return;}this['displayAttributesStats'](_0x47a4c5),this['displayBehaviorsStats'](_0x47a4c5,_0x16914b),this['displayRealtimeInfo'](_0x47a4c5),this[_0x3eea76(0x17d)](_0x47a4c5),this[_0x3eea76(0x37d)](_0x2ea91f,_0x16914b,_0x3eea76(0x25f));}['displayRealtimeInfo'](_0x1fe81f){displayRealtimeValidation(_0x1fe81f);}[a31_0xfeae4b(0x37d)](_0x32fcd0,_0x4bda56,_0x4d6136,_0x1aacff){const _0x234b21=a31_0xfeae4b;console['error']('\x0a'+a31_0x2e332c['dim'](_0x234b21(0x290)));const _0x553755=_0x4bda56!==_0x234b21(0x352)?_0x234b21(0x2c5)+_0x4bda56:'';if(_0x4d6136==='attribute'&&_0x1aacff)console['error']('\x20\x20'+a31_0x2e332c[_0x234b21(0x231)](_0x234b21(0x23e)+_0x32fcd0+_0x234b21(0x286)+_0x1aacff+'\x22'+_0x553755));else{if(_0x4d6136===_0x234b21(0x26c)&&_0x1aacff)console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x234b21(0x23e)+_0x32fcd0+'\x20--behavior\x20\x22'+_0x1aacff+'\x22'+_0x553755));else(_0x4d6136===_0x234b21(0x200)||_0x4d6136===_0x234b21(0x25f))&&console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x234b21(0x231)](_0x234b21(0x23e)+_0x32fcd0+_0x234b21(0x2c2)+_0x553755));}(_0x4d6136===_0x234b21(0x230)||_0x4d6136===_0x234b21(0x25f))&&console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x234b21(0x23e)+_0x32fcd0+'\x20--behavior\x20\x22<name>\x22'+_0x553755)),_0x4d6136===_0x234b21(0x25f)&&console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x234b21(0x231)]('tdx\x20ps\x20preview\x20'+_0x32fcd0+_0x234b21(0x28b)+_0x553755));}[a31_0xfeae4b(0x1ea)](_0x148b10){const _0x628d21=a31_0xfeae4b,{master:_0x464c25}=_0x148b10,_0x374a4d=_0x464c25['schemaValid']?a31_0x2e332c[_0x628d21(0x29c)]('✔'):a31_0x2e332c[_0x628d21(0x25a)]('✘');console[_0x628d21(0x1fc)]('\x0a'+a31_0x2e332c[_0x628d21(0x231)](_0x628d21(0x1fd))),console[_0x628d21(0x1fc)](_0x374a4d+'\x20'+a31_0x2e332c[_0x628d21(0x263)](_0x464c25[_0x628d21(0x301)]+'.'+_0x464c25[_0x628d21(0x328)])),_0x464c25[_0x628d21(0x29e)]?_0x464c25[_0x628d21(0x273)]!==undefined&&console[_0x628d21(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x628d21(0x216))+'\x20'+a31_0x2e332c[_0x628d21(0x1b9)](formatRows(_0x464c25[_0x628d21(0x273)]))):console[_0x628d21(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x628d21(0x25a)](_0x628d21(0x202))+'\x20'+_0x464c25['schemaError']);}['displayAttributesStats'](_0x4552e0){const _0x10e734=a31_0xfeae4b;if(_0x4552e0[_0x10e734(0x200)][_0x10e734(0x2ea)]===0x0)return;console['error']('\x0a'+a31_0x2e332c[_0x10e734(0x231)]('Attributes'));for(const _0x1b5f48 of _0x4552e0[_0x10e734(0x200)]){const _0x4382a4=_0x1b5f48[_0x10e734(0x29e)]?a31_0x2e332c['green']('✔'):a31_0x2e332c[_0x10e734(0x25a)]('✘');let _0x46b21f='';if(_0x1b5f48[_0x10e734(0x29e)]&&_0x1b5f48[_0x10e734(0x161)]!==undefined&&_0x1b5f48[_0x10e734(0x253)]!==undefined){const _0x52ad0a=_0x1b5f48[_0x10e734(0x253)][_0x10e734(0x32b)](0x1),_0x20f202=_0x1b5f48[_0x10e734(0x253)]>=0x50?a31_0x2e332c[_0x10e734(0x29c)]:_0x1b5f48[_0x10e734(0x253)]>=0x32?a31_0x2e332c[_0x10e734(0x196)]:a31_0x2e332c['red'];_0x46b21f='\x20'+a31_0x2e332c['dim'](_0x10e734(0x21e))+'\x20'+_0x20f202(_0x52ad0a+'%')+'\x20('+formatRows(_0x1b5f48[_0x10e734(0x161)])+_0x10e734(0x19e);}console[_0x10e734(0x1fc)](_0x4382a4+'\x20'+a31_0x2e332c[_0x10e734(0x263)](_0x1b5f48[_0x10e734(0x25c)])+_0x46b21f),console[_0x10e734(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x10e734(0x231)](_0x10e734(0x278))+'\x20'+a31_0x2e332c[_0x10e734(0x263)](_0x1b5f48[_0x10e734(0x301)]+'.'+_0x1b5f48[_0x10e734(0x328)]));const _0x227f37=_0x1b5f48[_0x10e734(0x294)]===_0x1b5f48[_0x10e734(0x15c)]?a31_0x2e332c[_0x10e734(0x231)](_0x10e734(0x289))+'\x20'+_0x1b5f48[_0x10e734(0x294)]:a31_0x2e332c['dim'](_0x10e734(0x15f))+'\x20'+_0x1b5f48[_0x10e734(0x294)]+_0x10e734(0x2b8)+_0x1b5f48[_0x10e734(0x15c)];console['error']('\x20\x20'+_0x227f37),console[_0x10e734(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x10e734(0x1b6))),this[_0x10e734(0x28d)](_0x1b5f48[_0x10e734(0x383)]),!_0x1b5f48[_0x10e734(0x29e)]&&console[_0x10e734(0x1fc)]('\x20\x20'+a31_0x2e332c['red'](_0x10e734(0x202))+'\x20'+_0x1b5f48[_0x10e734(0x358)]);}}[a31_0xfeae4b(0x336)](_0xa85995,_0x2b1830){const _0x5dda30=a31_0xfeae4b;if(_0xa85995[_0x5dda30(0x230)][_0x5dda30(0x2ea)]===0x0)return;console[_0x5dda30(0x1fc)]('\x0a'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x30c))+'\x20'+a31_0x2e332c[_0x5dda30(0x231)]('('+_0x2b1830+')'));for(const _0x60a0f2 of _0xa85995[_0x5dda30(0x230)]){const _0x49eacd=_0x60a0f2[_0x5dda30(0x29e)]?a31_0x2e332c[_0x5dda30(0x29c)]('✔'):a31_0x2e332c[_0x5dda30(0x25a)]('✘');let _0x5100b3='';if(_0x60a0f2[_0x5dda30(0x29e)]&&_0x60a0f2[_0x5dda30(0x256)]!==undefined&&_0x60a0f2['totalEvents']!==undefined){const _0xa83f7d=_0x60a0f2[_0x5dda30(0x325)]?.[_0x5dda30(0x32b)](0x1)||'?',_0x5939c0=(_0x60a0f2[_0x5dda30(0x325)]??0x0)>=0x32?a31_0x2e332c[_0x5dda30(0x29c)]:(_0x60a0f2[_0x5dda30(0x325)]??0x0)>=0x14?a31_0x2e332c[_0x5dda30(0x196)]:a31_0x2e332c['red'];_0x5100b3='\x20'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x1c8))+'\x20'+_0x5939c0(formatRows(_0x60a0f2['customersWithEvents']))+'\x20('+_0xa83f7d+_0x5dda30(0x342)+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x311))+'\x20'+a31_0x2e332c[_0x5dda30(0x1b9)](formatRows(_0x60a0f2[_0x5dda30(0x198)]));}console['error'](_0x49eacd+'\x20'+a31_0x2e332c[_0x5dda30(0x263)](_0x60a0f2[_0x5dda30(0x25c)])+_0x5100b3),console[_0x5dda30(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x278))+'\x20'+a31_0x2e332c[_0x5dda30(0x263)](_0x60a0f2[_0x5dda30(0x301)]+'.'+_0x60a0f2[_0x5dda30(0x328)]));const _0x271c73=_0x60a0f2[_0x5dda30(0x294)]===_0x60a0f2[_0x5dda30(0x15c)]?a31_0x2e332c['dim'](_0x5dda30(0x289))+'\x20'+_0x60a0f2[_0x5dda30(0x294)]:a31_0x2e332c[_0x5dda30(0x231)]('Join:')+'\x20'+_0x60a0f2[_0x5dda30(0x294)]+_0x5dda30(0x2b8)+_0x60a0f2[_0x5dda30(0x15c)];console[_0x5dda30(0x1fc)]('\x20\x20'+_0x271c73),console[_0x5dda30(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x1b6))),this[_0x5dda30(0x28d)](_0x60a0f2[_0x5dda30(0x383)]),!_0x60a0f2[_0x5dda30(0x29e)]&&console[_0x5dda30(0x1fc)]('\x20\x20'+a31_0x2e332c['red'](_0x5dda30(0x202))+'\x20'+_0x60a0f2[_0x5dda30(0x358)]);}}[a31_0xfeae4b(0x28d)](_0x5a0117){const _0x4c5186=a31_0xfeae4b;for(const _0x4ddf of _0x5a0117){_0x4ddf['label']===_0x4ddf[_0x4c5186(0x2e4)]||_0x4ddf[_0x4c5186(0x2e4)]==='*'?console['error']('\x20\x20\x20\x20-\x20'+_0x4ddf['label']):console[_0x4c5186(0x1fc)]('\x20\x20\x20\x20-\x20'+_0x4ddf[_0x4c5186(0x35c)]+'\x20'+a31_0x2e332c[_0x4c5186(0x231)]('('+_0x4ddf[_0x4c5186(0x2e4)]+')'));}}[a31_0xfeae4b(0x17d)](_0x4a8891){const _0x36bb92=a31_0xfeae4b;console[_0x36bb92(0x1fc)]('─'[_0x36bb92(0x35d)](0x3c));if(_0x4a8891[_0x36bb92(0x1f2)][_0x36bb92(0x2ea)]>0x0){console[_0x36bb92(0x1fc)]('\x0a'+a31_0x2e332c[_0x36bb92(0x25a)](_0x36bb92(0x26a)));for(const _0x4f2f24 of _0x4a8891[_0x36bb92(0x1f2)]){console['error']('\x20\x20'+a31_0x2e332c[_0x36bb92(0x25a)]('•')+'\x20'+_0x4f2f24);}}_0x4a8891[_0x36bb92(0x206)]&&console[_0x36bb92(0x1fc)]('\x0a'+a31_0x2e332c[_0x36bb92(0x29c)]('✔')+_0x36bb92(0x1ab));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x210);['description']=a31_0xfeae4b(0x1d3);async[a31_0xfeae4b(0x245)](_0x5308ca){const _0xca3d09=a31_0xfeae4b,{options:_0x596ecb,args:_0x37d03e,tdx:_0x128843}=_0x5308ca,_0x5a44aa=_0x596ecb,_0x2d6c96=_0x37d03e[0x0]||_0x596ecb['parentSegment'];if(!_0x2d6c96)return showParentSegmentNotSetError(_0xca3d09(0x205)+_0xca3d09(0x1aa)+_0xca3d09(0x1d0)+_0xca3d09(0x18e)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0xca3d09(0x194)+_0xca3d09(0x23c)+_0xca3d09(0x277)),0x1;if(!_0x5a44aa[_0xca3d09(0x1f3)]&&!_0x5a44aa[_0xca3d09(0x37a)]&&!_0x5a44aa[_0xca3d09(0x26c)]&&!_0x5a44aa['enriched'])return console[_0xca3d09(0x1fc)](a31_0x2e332c['red'](_0xca3d09(0x1b3))),console[_0xca3d09(0x1fc)](_0xca3d09(0x2b7)),console['error'](_0xca3d09(0x1b5)),console[_0xca3d09(0x1fc)](_0xca3d09(0x22c)),console[_0xca3d09(0x1fc)](_0xca3d09(0x354)),console[_0xca3d09(0x1fc)](_0xca3d09(0x2d2)),console[_0xca3d09(0x1fc)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0xe45143=resolveYamlFile(_0x2d6c96);if(!existsSync(_0xe45143))return showFileNotFoundError(_0xe45143,_0x2d6c96),0x1;_0x5a44aa[_0xca3d09(0x350)]&&(console['error'](_0xca3d09(0x35a)+_0x5a44aa['site']),console[_0xca3d09(0x1fc)]('YAML\x20file:\x20'+_0xe45143));let _0x5d10ff;try{_0x5d10ff=readFileSync(_0xe45143,'utf-8');}catch(_0x5c0b42){const _0x1c508a=_0x5c0b42 instanceof Error?_0x5c0b42[_0xca3d09(0x1e9)]:String(_0x5c0b42);return console['error']('Error\x20reading\x20file:\x20'+_0x1c508a),0x1;}let _0xafcbfc;try{_0xafcbfc=parseDef(_0x5d10ff);}catch(_0x158048){const _0x5f2377=_0x158048 instanceof Error?_0x158048['message']:String(_0x158048);return console['error'](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x285)+_0x5f2377)),0x1;}if(_0x5a44aa['attribute']===!![]||_0x5a44aa[_0xca3d09(0x37a)]===''){const _0x1a0e16=_0xafcbfc[_0xca3d09(0x200)]?.[_0xca3d09(0x20d)](_0x2c37ed=>_0x2c37ed[_0xca3d09(0x25c)])||[];if(_0x1a0e16['length']===0x0)console['error'](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x34c)));else{console[_0xca3d09(0x1fc)](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x2f6))),console['error'](_0xca3d09(0x174));for(const _0x115826 of _0x1a0e16){console[_0xca3d09(0x1fc)]('\x20\x20'+a31_0x2e332c[_0xca3d09(0x1b9)](_0x115826));}console[_0xca3d09(0x1fc)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2d6c96+'\x20--attribute\x20\x22'+_0x1a0e16[0x0]+'\x22');}return 0x1;}if(_0x5a44aa[_0xca3d09(0x26c)]===!![]||_0x5a44aa[_0xca3d09(0x26c)]===''){const _0x36d955=_0xafcbfc['behaviors']?.[_0xca3d09(0x20d)](_0x2a3f9c=>_0x2a3f9c[_0xca3d09(0x25c)])||[];if(_0x36d955[_0xca3d09(0x2ea)]===0x0)console['error'](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x2fb)));else{console[_0xca3d09(0x1fc)](a31_0x2e332c['red']('Error:\x20--behavior\x20requires\x20a\x20name\x0a')),console[_0xca3d09(0x1fc)](_0xca3d09(0x37e));for(const _0x38e30f of _0x36d955){console[_0xca3d09(0x1fc)]('\x20\x20'+a31_0x2e332c['cyan'](_0x38e30f));}console['error'](_0xca3d09(0x255)+_0x2d6c96+_0xca3d09(0x1e5)+_0x36d955[0x0]+'\x22');}return 0x1;}const _0x4efcef=createCommandSpinner(a31_0x2e332c[_0xca3d09(0x231)]('Fetching\x20sample\x20data...'),{'verbose':_0x5a44aa[_0xca3d09(0x350)]});_0x4efcef[_0xca3d09(0x32d)]();const _0x345e6a={'onProgress':_0x1fc7c8=>{const _0x145c41=_0xca3d09;_0x4efcef[_0x145c41(0x30f)]=formatProgressMessage(_0x1fc7c8);}};if(_0x5a44aa[_0xca3d09(0x1f3)])_0x345e6a[_0xca3d09(0x1f3)]=!![];if(_0x5a44aa['attribute']&&typeof _0x5a44aa[_0xca3d09(0x37a)]===_0xca3d09(0x382))_0x345e6a[_0xca3d09(0x37a)]=_0x5a44aa['attribute'];if(_0x5a44aa[_0xca3d09(0x26c)]&&typeof _0x5a44aa[_0xca3d09(0x26c)]==='string')_0x345e6a['behavior']=_0x5a44aa['behavior'];if(_0x5a44aa[_0xca3d09(0x2ee)])_0x345e6a[_0xca3d09(0x2ee)]=!![];if(_0x5a44aa[_0xca3d09(0x2a6)])_0x345e6a['interval']=_0x5a44aa[_0xca3d09(0x2a6)];let _0x3491a7;try{_0x3491a7=await _0x128843[_0xca3d09(0x330)][_0xca3d09(0x355)](_0x5d10ff,_0x345e6a),_0x4efcef[_0xca3d09(0x224)]();}catch(_0x375cb2){_0x4efcef[_0xca3d09(0x224)]();throw _0x375cb2;}return await this['displayPreviewResults'](_0x3491a7,{'master':_0x5a44aa['master'],'attribute':typeof _0x5a44aa[_0xca3d09(0x37a)]===_0xca3d09(0x382)?_0x5a44aa[_0xca3d09(0x37a)]:undefined,'behavior':typeof _0x5a44aa[_0xca3d09(0x26c)]===_0xca3d09(0x382)?_0x5a44aa[_0xca3d09(0x26c)]:undefined,'enriched':_0x5a44aa[_0xca3d09(0x2ee)]}),_0x3491a7[_0xca3d09(0x206)]?0x0:0x1;}async[a31_0xfeae4b(0x195)](_0x12719f,_0xcec58a){const _0xa1b181=a31_0xfeae4b;console[_0xa1b181(0x1fc)]('\x0a'+a31_0x2e332c['bold'](_0xa1b181(0x23a))+'\x20'+_0x12719f[_0xa1b181(0x25c)]),console[_0xa1b181(0x1fc)]('═'[_0xa1b181(0x35d)](0x3c));if(_0xcec58a[_0xa1b181(0x1f3)]&&_0x12719f[_0xa1b181(0x25e)]){const _0x374d15=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x387))+'\x20'+a31_0x2e332c[_0xa1b181(0x263)](_0x12719f[_0xa1b181(0x1f3)]['database']+'.'+_0x12719f[_0xa1b181(0x1f3)][_0xa1b181(0x328)]);await this[_0xa1b181(0x2c8)](_0x374d15,_0x12719f[_0xa1b181(0x25e)]);}else{if(_0xcec58a[_0xa1b181(0x37a)]&&_0x12719f['sampleData']){const _0x14f289=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x212))+'\x20'+a31_0x2e332c[_0xa1b181(0x263)](_0xcec58a[_0xa1b181(0x37a)]);await this[_0xa1b181(0x2c8)](_0x14f289,_0x12719f[_0xa1b181(0x25e)]);}else{if(_0xcec58a[_0xa1b181(0x26c)]&&_0x12719f[_0xa1b181(0x25e)]){const _0x34b651=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x288))+'\x20'+a31_0x2e332c['bold'](_0xcec58a[_0xa1b181(0x26c)]);await this[_0xa1b181(0x2c8)](_0x34b651,_0x12719f['sampleData']);}else{if(_0xcec58a[_0xa1b181(0x2ee)]&&_0x12719f[_0xa1b181(0x25e)]){const _0xe719a7=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x327))+'\x20'+a31_0x2e332c[_0xa1b181(0x263)]('Master\x20+\x20Attributes');await this[_0xa1b181(0x2c8)](_0xe719a7,_0x12719f[_0xa1b181(0x25e)]);}else!_0x12719f['sampleData']&&console[_0xa1b181(0x1fc)](_0xa1b181(0x17c));}}}if(_0x12719f['errors']['length']>0x0){console['error']('─'['repeat'](0x3c)),console[_0xa1b181(0x1fc)]('\x0a'+a31_0x2e332c[_0xa1b181(0x25a)]('Errors:'));for(const _0x39caf9 of _0x12719f[_0xa1b181(0x1f2)]){console[_0xa1b181(0x1fc)]('\x20\x20'+a31_0x2e332c[_0xa1b181(0x25a)]('•')+'\x20'+_0x39caf9);}}}async[a31_0xfeae4b(0x2c8)](_0x39c50c,_0x257cd2){const _0x27d39e=a31_0xfeae4b;if(_0x257cd2[_0x27d39e(0x2ea)]===0x0){console[_0x27d39e(0x1fc)]('\x0a'+_0x39c50c),console[_0x27d39e(0x1fc)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x27d39e(0x1fc)]('\x0a'+_0x39c50c);const _0x1b8499=Object['keys'](_0x257cd2[0x0])[_0x27d39e(0x20d)](_0x23520a=>({'name':_0x23520a,'type':typeof _0x257cd2[0x0][_0x23520a]===_0x27d39e(0x24f)?'double':_0x27d39e(0x17f)})),_0x1a5ce8={'queryId':_0x27d39e(0x33d),'columns':_0x1b8499,'data':_0x257cd2,'stats':{'state':'FINISHED','queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x257cd2['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x5fde19=formatAsTable(_0x1a5ce8,_0x257cd2[_0x27d39e(0x2ea)],!![]);await writeOutput(_0x5fde19,undefined,'table');}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x222);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x2c9);async[a31_0xfeae4b(0x245)](_0x5670f8){const _0x2699d6=a31_0xfeae4b,{options:_0x418048,args:_0x2e5d80,tdx:_0x22d398}=_0x5670f8,_0x2f4e4c=_0x418048,_0x1e3c3d=_0x2e5d80[0x0]||_0x418048[_0x2699d6(0x2fa)];if(!_0x1e3c3d)return showParentSegmentNotSetError(_0x2699d6(0x249)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x59f4e3=resolveYamlFile(_0x1e3c3d);if(existsSync(_0x59f4e3)){_0x2f4e4c['verbose']&&console[_0x2699d6(0x1fc)](_0x2699d6(0x2e9)+_0x59f4e3);let _0x4d88d5;try{_0x4d88d5=readFileSync(_0x59f4e3,_0x2699d6(0x2aa));}catch(_0xf3fa0c){const _0xf16dd=_0xf3fa0c instanceof Error?_0xf3fa0c['message']:String(_0xf3fa0c);return console[_0x2699d6(0x1fc)](_0x2699d6(0x375)+_0xf16dd),0x1;}const _0x3425df=await withSpinner(_0x2699d6(0x380),()=>_0x22d398[_0x2699d6(0x330)]['pushParentYaml'](_0x4d88d5),{'verbose':_0x2f4e4c[_0x2699d6(0x350)]}),_0x521ed8=_0x3425df[_0x2699d6(0x33b)],{isNew:_0xdfefb,name:_0x9f33cb,hasChanges:_0x2acdca,diffFormatted:_0x5eb08f}=_0x521ed8;if(_0x2acdca){_0xdfefb?console['error'](_0x2699d6(0x29b)+_0x9f33cb+'\x27:'):console[_0x2699d6(0x1fc)](_0x2699d6(0x19d)+_0x9f33cb+'\x27:');console[_0x2699d6(0x1fc)]('─'[_0x2699d6(0x35d)](0x3c)),console['error'](_0x5eb08f),console['error']('─'['repeat'](0x3c));const _0x2a273a=_0xdfefb?_0x2699d6(0x28a)+_0x9f33cb+_0x2699d6(0x18d):_0x2699d6(0x298)+_0x9f33cb+'\x27\x20and\x20run\x20workflow?';if(!_0x2f4e4c[_0x2699d6(0x337)]){if(!isInteractive())return console[_0x2699d6(0x1fc)](a31_0x2e332c[_0x2699d6(0x25a)](_0x2699d6(0x321)),_0x2699d6(0x1f9)),console['error'](a31_0x2e332c['dim'](_0x2699d6(0x1cf))),0x1;const _0x3f3cba=await confirmKey(_0x2a273a);if(!_0x3f3cba)return console[_0x2699d6(0x1fc)](a31_0x2e332c[_0x2699d6(0x196)](_0x2699d6(0x331))),0x1;}const _0x3fb81f=_0xdfefb?_0x2699d6(0x236):_0x2699d6(0x34a);await withSpinner(_0x3fb81f+_0x2699d6(0x2d9)+_0x9f33cb+_0x2699d6(0x291),()=>_0x521ed8[_0x2699d6(0x2dd)](),{'verbose':_0x2f4e4c[_0x2699d6(0x350)]});const _0x5e7cdc=_0xdfefb?'Created':_0x2699d6(0x21b);console['error']('✔\x20'+_0x5e7cdc+_0x2699d6(0x2d9)+_0x9f33cb+'\x27');}else console[_0x2699d6(0x1fc)]('✔\x20No\x20changes\x20-\x20\x27'+_0x9f33cb+_0x2699d6(0x25d));}const _0x22b1da=await withSpinner(_0x2699d6(0x1b1)+_0x1e3c3d+'\x27...',()=>_0x22d398[_0x2699d6(0x330)][_0x2699d6(0x1ce)](_0x1e3c3d),{'verbose':_0x2f4e4c[_0x2699d6(0x350)]}),_0x2749b1=_0x22b1da[_0x2699d6(0x33b)],_0x18dc4c=getConsoleUrl(_0x2f4e4c[_0x2699d6(0x193)],'/app/workflows/'+_0x2749b1[_0x2699d6(0x315)]+_0x2699d6(0x2db)+_0x2749b1[_0x2699d6(0x378)]+'/attempt/'+_0x2749b1['workflowAttemptId']);return console[_0x2699d6(0x1fc)](_0x2699d6(0x272)),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)](_0x2699d6(0x20c))+'\x20'+_0x2749b1[_0x2699d6(0x261)]),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)]('Status:')+'\x20'+_0x2749b1[_0x2699d6(0x21c)]),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)]('Session:')+'\x20'+_0x2749b1[_0x2699d6(0x378)]),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)](_0x2699d6(0x30d))+'\x20'+_0x2749b1[_0x2699d6(0x2a3)]),console['error']('\x20\x20'+_0x18dc4c),console[_0x2699d6(0x1fc)]('\x0a'+a31_0x2e332c[_0x2699d6(0x231)](_0x2699d6(0x203))+_0x2699d6(0x347)+_0x2749b1[_0x2699d6(0x2a3)]+_0x2699d6(0x234)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']='segment:parent:fields';['description']=a31_0xfeae4b(0x1bd);async[a31_0xfeae4b(0x245)](_0x46d866){const _0x1675f5=a31_0xfeae4b,{options:_0xa12a97,args:_0x16f6d6,tdx:_0x3a096d}=_0x46d866,_0x592f13=_0x16f6d6[0x0]||_0xa12a97[_0x1675f5(0x2fa)];if(!_0x592f13)return showParentSegmentNotSetError(_0x1675f5(0x295)+_0x1675f5(0x357)),0x1;_0xa12a97[_0x1675f5(0x350)]&&(console[_0x1675f5(0x1fc)](_0x1675f5(0x35a)+_0xa12a97['site']),console[_0x1675f5(0x1fc)](_0x1675f5(0x244)+_0x592f13));const _0x1569ba=await withSpinner(_0x1675f5(0x1b0)+_0x592f13+'\x27...',()=>_0x3a096d[_0x1675f5(0x330)]['listFields'](_0x592f13),{'verbose':_0xa12a97['verbose']}),_0xc77f17=_0x1569ba[_0x1675f5(0x33b)];console[_0x1675f5(0x1fc)](_0x1675f5(0x2e3)+_0xc77f17[_0x1675f5(0x2ea)]+_0x1675f5(0x1e8)+(_0xc77f17[_0x1675f5(0x2ea)]!==0x1?'s':''));if(_0xa12a97[_0x1675f5(0x2ce)]||_0xa12a97[_0x1675f5(0x213)])return await handleSDKOutput(_0xc77f17,_0xa12a97),0x0;return displayFieldsHumanReadable(_0xc77f17,_0x592f13),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x187);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x29f);async[a31_0xfeae4b(0x245)](_0x1f893c){const _0x343b69=a31_0xfeae4b,{options:_0x31b73a,args:_0x302aa7,tdx:_0x9e2bfd}=_0x1f893c,_0x218823=_0x31b73a,_0x4c0232=_0x302aa7[0x0]||_0x31b73a[_0x343b69(0x2fa)];if(!_0x4c0232)return showParentSegmentNotSetError(_0x343b69(0x389)+_0x343b69(0x2d8)+_0x343b69(0x250)+_0x343b69(0x305)),0x1;_0x31b73a[_0x343b69(0x350)]&&(console[_0x343b69(0x1fc)](_0x343b69(0x35a)+_0x31b73a['site']),console[_0x343b69(0x1fc)]('Parent\x20segment:\x20'+_0x4c0232));const _0x3701ed=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x4c0232+_0x343b69(0x291),()=>_0x9e2bfd[_0x343b69(0x330)][_0x343b69(0x31c)](_0x4c0232),{'verbose':_0x31b73a[_0x343b69(0x350)]}),_0x528655=_0x3701ed['data'];if(_0x218823[_0x343b69(0x183)]){const _0x976103=getConsoleNextUrl(_0x218823[_0x343b69(0x193)],_0x343b69(0x1e0)+_0x528655['id']);return console[_0x343b69(0x1fc)](a31_0x2e332c[_0x343b69(0x29c)]('✔')+'\x20Opening\x20'+a31_0x2e332c[_0x343b69(0x1b9)](_0x976103)),openBrowser(_0x976103),0x0;}return await handleSingleObjectOutput(_0x528655,_0x31b73a),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x34b);[a31_0xfeae4b(0x22f)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x62ef8c){const _0x1470f4=a31_0xfeae4b,{options:_0x3bb006,args:_0x20cb6,tdx:_0x1be10c}=_0x62ef8c,_0x2f9216=_0x3bb006,_0xde3f42=_0x20cb6[0x0]||_0x3bb006[_0x1470f4(0x2fa)];if(!_0xde3f42)return showParentSegmentNotSetError(_0x1470f4(0x2b3)+_0x1470f4(0x2f8)+_0x1470f4(0x250)+_0x1470f4(0x2f7)),0x1;_0x3bb006[_0x1470f4(0x350)]&&(console[_0x1470f4(0x1fc)](_0x1470f4(0x35a)+_0x3bb006[_0x1470f4(0x193)]),console['error'](_0x1470f4(0x244)+_0xde3f42));const _0x5c91e0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xde3f42+_0x1470f4(0x291),()=>_0x1be10c[_0x1470f4(0x330)][_0x1470f4(0x221)](_0xde3f42),{'verbose':_0x3bb006[_0x1470f4(0x350)]}),_0x4fb378=_0x5c91e0['data'],_0x3266e6=_0x1be10c['segment'][_0x1470f4(0x2b2)](_0x4fb378);if(_0x2f9216['output']){const _0x1b9879=await this[_0x1470f4(0x163)](_0x62ef8c,_0xde3f42,_0x4fb378,_0x3266e6),_0x22ac64=this[_0x1470f4(0x1e4)](_0x1b9879);writeFileSync(_0x2f9216[_0x1470f4(0x1dc)],_0x22ac64);const _0x51a0b8=_0x1b9879['customers'][_0x1470f4(0x383)][_0x1470f4(0x2ea)]+_0x1b9879[_0x1470f4(0x230)]['reduce']((_0xb4ae7b,_0x1693f2)=>_0xb4ae7b+_0x1693f2[_0x1470f4(0x383)][_0x1470f4(0x2ea)],0x0),_0x4638d7=_0x1b9879[_0x1470f4(0x230)][_0x1470f4(0x2f1)](_0x4c9a7a=>_0x4c9a7a[_0x1470f4(0x383)][_0x1470f4(0x2ea)]===0x0)[_0x1470f4(0x2ea)];return console[_0x1470f4(0x1a1)](_0x1470f4(0x223)+_0x2f9216['output']),console[_0x1470f4(0x1a1)](_0x1470f4(0x2a2)+_0x3266e6),console[_0x1470f4(0x1a1)](_0x1470f4(0x324)+_0x1b9879[_0x1470f4(0x230)][_0x1470f4(0x2ea)]+_0x1470f4(0x22e)),console[_0x1470f4(0x1a1)](_0x1470f4(0x17e)+_0x51a0b8+_0x1470f4(0x220)),_0x4638d7>0x0&&console[_0x1470f4(0x1a1)](_0x1470f4(0x271)+_0x4638d7+_0x1470f4(0x1bf)),0x0;}console['error']('\x0a'+a31_0x2e332c[_0x1470f4(0x263)](_0x1470f4(0x2ca))+'\x20'+a31_0x2e332c['cyan'](_0x3266e6));const _0x44b14e=await withSpinner(_0x1470f4(0x2e7),()=>_0x1be10c[_0x1470f4(0x330)][_0x1470f4(0x2d1)](_0x4fb378),{'verbose':_0x3bb006[_0x1470f4(0x350)]});console['error']('\x0a'+a31_0x2e332c[_0x1470f4(0x263)](_0x1470f4(0x314))+'\x20'+a31_0x2e332c[_0x1470f4(0x231)]('('+_0x3266e6+_0x1470f4(0x1f7)));const _0x45c7d0=await executeSchemaQuery(_0x44b14e[_0x1470f4(0x33b)],_0x1be10c,_0x3bb006);await handleQueryOutput(_0x45c7d0,_0x3bb006);const _0x22fab4=await withSpinner(_0x1470f4(0x1c7),()=>_0x1be10c[_0x1470f4(0x330)]['getBehaviorNames'](_0x4fb378),{'verbose':_0x3bb006['verbose']});for(const _0x596e7d of _0x22fab4[_0x1470f4(0x33b)]){const _0x3e7a3e=_0x1470f4(0x29a)+_0x596e7d['toLowerCase']()[_0x1470f4(0x227)](/\s+/g,'_'),_0x555248=_0x1470f4(0x1dd)+_0x3266e6+'.'+_0x3e7a3e;console[_0x1470f4(0x1fc)]('\x0a'+a31_0x2e332c[_0x1470f4(0x263)](_0x596e7d)+'\x20'+a31_0x2e332c[_0x1470f4(0x231)]('('+_0x3266e6+'.'+_0x3e7a3e+')'));try{const _0x42df93=await executeSchemaQuery(_0x555248,_0x1be10c,_0x3bb006);await handleQueryOutput(_0x42df93,_0x3bb006);}catch{console['error'](a31_0x2e332c['yellow'](_0x1470f4(0x2ab)));}}return 0x0;}async[a31_0xfeae4b(0x163)](_0x5da11e,_0x3d21db,_0x1862db,_0x2da7b8){const _0x41c031=a31_0xfeae4b,{options:_0x236bee,tdx:_0x1a9659}=_0x5da11e,_0x5da05f=await withSpinner(_0x41c031(0x2e7),()=>_0x1a9659[_0x41c031(0x330)]['getParentSQL'](_0x1862db),{'verbose':_0x236bee['verbose']}),_0x59ed16=await executeSchemaQuery(_0x5da05f[_0x41c031(0x33b)],_0x1a9659,_0x236bee),_0x1aeecb=_0x59ed16['data'][_0x41c031(0x20d)](_0x2f840f=>({'name':_0x2f840f[_0x41c031(0x385)],'type':_0x2f840f[_0x41c031(0x167)]})),_0x2a1dc5=await withSpinner(_0x41c031(0x1c7),()=>_0x1a9659['segment'][_0x41c031(0x2a9)](_0x1862db),{'verbose':_0x236bee[_0x41c031(0x350)]}),_0x487685=[];for(const _0x1014ce of _0x2a1dc5['data']){const _0x90b00e=_0x41c031(0x29a)+_0x1014ce[_0x41c031(0x1a6)]()['replace'](/\s+/g,'_'),_0x5ba498='SELECT\x20*\x20FROM\x20'+_0x2da7b8+'.'+_0x90b00e;let _0x316381=[];try{const _0x5b8add=await executeSchemaQuery(_0x5ba498,_0x1a9659,_0x236bee);_0x316381=_0x5b8add['data'][_0x41c031(0x20d)](_0xca9aee=>({'name':_0xca9aee[_0x41c031(0x385)],'type':_0xca9aee['column_type']}));}catch{}_0x487685[_0x41c031(0x335)]({'table':_0x90b00e,'columns':_0x316381});}return{'database':_0x2da7b8,'parent_segment':_0x3d21db,'parent_id':_0x1862db,'customers':{'table':_0x41c031(0x314),'columns':_0x1aeecb},'behaviors':_0x487685};}['formatSchemaJson'](_0x43aba9){const _0xb76142=a31_0xfeae4b,_0x1843a1=_0x269c2e=>{const _0x111518=a31_0x5927;if(_0x269c2e[_0x111518(0x2ea)]===0x0)return'[]';const _0x324740=_0x269c2e[_0x111518(0x20d)](_0x4fcd6e=>_0x111518(0x31d)+_0x4fcd6e[_0x111518(0x25c)]+_0x111518(0x25b)+_0x4fcd6e[_0x111518(0x2cd)]+_0x111518(0x361));return'[\x0a'+_0x324740[_0x111518(0x251)](',\x0a')+_0x111518(0x2b5);},_0x94fb55=_0x43aba9[_0xb76142(0x230)]['map'](_0x36ebde=>{const _0x3eb89b=_0xb76142;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x36ebde['table']+_0x3eb89b(0x2fc)+_0x1843a1(_0x36ebde[_0x3eb89b(0x383)])['replace'](/^/gm,'\x20\x20')[_0x3eb89b(0x26b)]()+_0x3eb89b(0x2e1);})['join'](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x43aba9['database']+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x43aba9[_0xb76142(0x2bf)]+_0xb76142(0x2a8)+_0x43aba9[_0xb76142(0x2e8)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x43aba9[_0xb76142(0x314)][_0xb76142(0x328)]+_0xb76142(0x2a7)+_0x1843a1(_0x43aba9[_0xb76142(0x314)]['columns'])[_0xb76142(0x227)](/^/gm,'\x20\x20')['trim']()+_0xb76142(0x274)+_0x94fb55+_0xb76142(0x225);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]='segment:parent:sql';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x192);async[a31_0xfeae4b(0x245)](_0x4ca832){const _0x2025e9=a31_0xfeae4b,{options:_0x16548d,args:_0x24a655,tdx:_0x509e8d}=_0x4ca832,_0x392da1=_0x24a655[0x0]||_0x16548d[_0x2025e9(0x2fa)];if(!_0x392da1)return showParentSegmentNotSetError(_0x2025e9(0x280)+_0x2025e9(0x22a)),0x1;_0x16548d[_0x2025e9(0x350)]&&(console['error'](_0x2025e9(0x35a)+_0x16548d[_0x2025e9(0x193)]),console[_0x2025e9(0x1fc)]('Parent\x20segment:\x20'+_0x392da1));const _0x16b309=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x392da1+_0x2025e9(0x291),()=>_0x509e8d[_0x2025e9(0x330)]['resolveParentId'](_0x392da1),{'verbose':_0x16548d['verbose']}),_0x334745=_0x16b309[_0x2025e9(0x33b)],_0x18584d=await withSpinner(_0x2025e9(0x322)+_0x392da1+_0x2025e9(0x291),()=>_0x509e8d[_0x2025e9(0x330)]['getParentSQL'](_0x334745),{'verbose':_0x16548d[_0x2025e9(0x350)]}),_0x3df4ff=_0x18584d['data'];return _0x16548d[_0x2025e9(0x2c1)]===_0x2025e9(0x2ce)||_0x16548d['format']===_0x2025e9(0x213)?await handleSDKOutput([{'sql':_0x3df4ff}],_0x16548d):console[_0x2025e9(0x1a1)](_0x3df4ff),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']='segment:parent:show';['description']='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0xfeae4b(0x245)](_0x4bf7c3){const _0x4ab9ba=a31_0xfeae4b,{options:_0x575803,args:_0x324739,tdx:_0x40e2f4}=_0x4bf7c3,_0x2afc1e=_0x324739[0x0]||_0x575803['parentSegment'];if(!_0x2afc1e)return showParentSegmentNotSetError(_0x4ab9ba(0x36a)+_0x4ab9ba(0x318)),0x1;_0x575803[_0x4ab9ba(0x350)]&&(console[_0x4ab9ba(0x1fc)](_0x4ab9ba(0x35a)+_0x575803[_0x4ab9ba(0x193)]),console[_0x4ab9ba(0x1fc)]('Parent\x20segment:\x20'+_0x2afc1e));const _0x458ce8=await withSpinner(_0x4ab9ba(0x19c)+_0x2afc1e+_0x4ab9ba(0x291),()=>_0x40e2f4[_0x4ab9ba(0x330)][_0x4ab9ba(0x221)](_0x2afc1e),{'verbose':_0x575803[_0x4ab9ba(0x350)]}),_0x1873d1=_0x458ce8[_0x4ab9ba(0x33b)],_0x5884bf=await withSpinner(_0x4ab9ba(0x322)+_0x2afc1e+_0x4ab9ba(0x291),()=>_0x40e2f4['segment']['getParentSQL'](_0x1873d1),{'verbose':_0x575803[_0x4ab9ba(0x350)]});let _0x443950=_0x5884bf[_0x4ab9ba(0x33b)];const _0x10b1a1=resolveLimit(_0x575803[_0x4ab9ba(0x297)],DEFAULT_DISPLAY_LIMIT),_0x2a4f17=/\bLIMIT\s+\d+/i['test'](_0x443950);!_0x2a4f17&&(_0x443950=_0x443950['trim']()[_0x4ab9ba(0x227)](/;+$/,''),_0x443950=_0x4ab9ba(0x312)+_0x443950+_0x4ab9ba(0x1e1)+_0x10b1a1);_0x575803[_0x4ab9ba(0x350)]&&console['error'](_0x4ab9ba(0x238)+_0x443950);const _0x3084d2=await withProgressSpinner(_0x4ab9ba(0x2b0),async _0xd7fcd2=>{const _0x27680b=_0x4ab9ba,_0x1342fe=await _0x40e2f4[_0x27680b(0x310)]['execute'](_0x443950,{'catalog':'td','schema':_0x27680b(0x1d9),'onJobId':_0x346722=>{const _0x4d4632=_0x27680b;_0xd7fcd2[_0x4d4632(0x2cb)](_0x346722);}});return _0x1342fe;},{'verbose':_0x575803[_0x4ab9ba(0x350)]}),_0xcae4f8=_0x3084d2[_0x4ab9ba(0x33b)],_0x12e89c=_0xcae4f8['jobId']?_0x4ab9ba(0x180)+_0xcae4f8[_0x4ab9ba(0x304)]+']':'';return console[_0x4ab9ba(0x1fc)](_0x4ab9ba(0x1ba)+_0xcae4f8[_0x4ab9ba(0x26e)]['processedRows'][_0x4ab9ba(0x376)]()+_0x4ab9ba(0x2ec)+(_0x4ab9ba(0x214)+formatElapsed(_0xcae4f8['stats']['elapsedTimeMillis'])+_0x12e89c)),await handleQueryOutput(_0xcae4f8,_0x575803),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a31_0xfeae4b(0x171);[a31_0xfeae4b(0x22f)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async['execute'](_0x1728a9){const _0x344f68=a31_0xfeae4b,{options:_0x49dbcc,args:_0x30a1dd,tdx:_0x155ce6}=_0x1728a9,_0x3d46a4=_0x30a1dd[0x0],_0x153d3e=await withSpinner(_0x3d46a4?_0x344f68(0x306)+_0x3d46a4+_0x344f68(0x291):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x155ce6[_0x344f68(0x1f6)]['list'](),{'verbose':_0x49dbcc['verbose']});let _0x353dda=_0x153d3e[_0x344f68(0x33b)][_0x344f68(0x2f1)](_0x133da6=>_0x133da6[_0x344f68(0x37c)]);if(_0x3d46a4){const _0x20f7cd=_0x3d46a4['replace'](/[.+^${}()|[\]\\]/g,_0x344f68(0x1ed))[_0x344f68(0x227)](/\*/g,'.*')[_0x344f68(0x227)](/\?/g,'.'),_0xe92f81=new RegExp('^'+_0x20f7cd+'$','i');_0x353dda=_0x353dda[_0x344f68(0x2f1)](_0x3a6427=>_0xe92f81[_0x344f68(0x16a)](_0x3a6427[_0x344f68(0x25c)]));}_0x353dda['sort']((_0x5d2451,_0xf4af5b)=>_0x5d2451['name']['localeCompare'](_0xf4af5b[_0x344f68(0x25c)])),console[_0x344f68(0x1fc)](_0x344f68(0x2e3)+_0x353dda[_0x344f68(0x2ea)]+'\x20RT-enabled\x20parent\x20segment'+(_0x353dda['length']!==0x1?'s':''));const _0x4eedc3=_0x2d082f=>{const _0x207d8d=_0x344f68;return getConsoleNextUrl(_0x49dbcc[_0x207d8d(0x193)],_0x207d8d(0x1e0)+_0x2d082f);};if(_0x49dbcc[_0x344f68(0x2c1)]===_0x344f68(0x2ce)||_0x49dbcc[_0x344f68(0x2c1)]===_0x344f68(0x213)){const _0x32015c=_0x353dda[_0x344f68(0x20d)](_0xec26df=>({..._0xec26df,'url':_0x4eedc3(_0xec26df['id'])}));await handleSDKOutput(_0x32015c,_0x49dbcc);}else{if(_0x353dda[_0x344f68(0x2ea)]===0x0)console['log'](_0x344f68(0x1c4));else for(const _0x320538 of _0x353dda){const _0x71d92a=_0x320538[_0x344f68(0x2eb)]?a31_0x2e332c['dim']('\x20('+formatRows(_0x320538[_0x344f68(0x2eb)])+')'):'',_0x785839=hyperlink(_0x320538[_0x344f68(0x25c)],_0x4eedc3(_0x320538['id']));console[_0x344f68(0x1a1)]('⚡\x20'+_0x785839+_0x71d92a);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x2ac);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x191);async[a31_0xfeae4b(0x245)](_0x500d46){const _0x378c6f=a31_0xfeae4b,{options:_0x5d9dfc,args:_0x4ec104,tdx:_0x1ff857}=_0x500d46,_0x3e62bc=_0x4ec104[0x0]||_0x5d9dfc[_0x378c6f(0x2fa)];if(!_0x3e62bc)return showParentSegmentNotSetError(_0x378c6f(0x32e)+_0x378c6f(0x27a)),0x1;const _0x4683ce=resolveYamlFile(_0x3e62bc);if(!existsSync(_0x4683ce))return showFileNotFoundError(_0x4683ce,_0x3e62bc),0x1;let _0x457e75;try{_0x457e75=readFileSync(_0x4683ce,_0x378c6f(0x2aa));}catch(_0x39fde6){const _0x3e6048=_0x39fde6 instanceof Error?_0x39fde6[_0x378c6f(0x1e9)]:String(_0x39fde6);return console[_0x378c6f(0x1fc)](_0x378c6f(0x375)+_0x3e6048),0x1;}const _0xbfcf88=createCommandSpinner(a31_0x2e332c[_0x378c6f(0x231)](_0x378c6f(0x21f)),{'verbose':_0x5d9dfc[_0x378c6f(0x350)]});_0xbfcf88[_0x378c6f(0x32d)]();const _0x229d22={'realtime':!![],'onProgress':_0x55f8fa=>{_0xbfcf88['text']=formatProgressMessage(_0x55f8fa);}};let _0x383e12;try{_0x383e12=await _0x1ff857[_0x378c6f(0x330)][_0x378c6f(0x1e3)](_0x457e75,_0x229d22),_0xbfcf88[_0x378c6f(0x224)]();}catch(_0x343fdd){_0xbfcf88['stop']();throw _0x343fdd;}console[_0x378c6f(0x1fc)]('\x0a'+a31_0x2e332c[_0x378c6f(0x263)]('RT\x202.0\x20Validate:')+'\x20'+_0x383e12[_0x378c6f(0x25c)]),console[_0x378c6f(0x1fc)]('═'[_0x378c6f(0x35d)](0x3c)),displayRealtimeValidation(_0x383e12),console[_0x378c6f(0x1fc)]('─'[_0x378c6f(0x35d)](0x3c));if(_0x383e12[_0x378c6f(0x1f2)][_0x378c6f(0x2ea)]>0x0){console['error']('\x0a'+a31_0x2e332c['red'](_0x378c6f(0x26a)));for(const _0x46ce39 of _0x383e12[_0x378c6f(0x1f2)]){console[_0x378c6f(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x378c6f(0x25a)]('•')+'\x20'+_0x46ce39);}}return _0x383e12['allValid']&&console['error']('\x0a'+a31_0x2e332c['green']('✔')+_0x378c6f(0x30e)),_0x383e12[_0x378c6f(0x206)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0xfeae4b(0x1a0);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x341);async[a31_0xfeae4b(0x245)](_0xcea9cc){const _0x583f13=a31_0xfeae4b,{options:_0x24bb74,args:_0x5c63e3,tdx:_0x3444d0}=_0xcea9cc,_0x9ea9c4=_0x5c63e3[0x0]||_0x24bb74[_0x583f13(0x2fa)];if(!_0x9ea9c4)return showParentSegmentNotSetError(_0x583f13(0x268)+_0x583f13(0x2f5)),0x1;_0x24bb74[_0x583f13(0x350)]&&(console['error'](_0x583f13(0x35a)+_0x24bb74[_0x583f13(0x193)]),console[_0x583f13(0x1fc)]('Parent\x20segment:\x20'+_0x9ea9c4));const _0x5a1155=await withSpinner(_0x583f13(0x19c)+_0x9ea9c4+_0x583f13(0x291),()=>_0x3444d0[_0x583f13(0x330)]['resolveParentId'](_0x9ea9c4),{'verbose':_0x24bb74[_0x583f13(0x350)]}),_0x105668=_0x5a1155[_0x583f13(0x33b)],_0x30e45a=await withSpinner(_0x583f13(0x1ff)+_0x9ea9c4+_0x583f13(0x291),()=>_0x3444d0[_0x583f13(0x1f6)][_0x583f13(0x243)](_0x105668),{'verbose':_0x24bb74['verbose']}),_0x230875=_0x30e45a[_0x583f13(0x33b)];console[_0x583f13(0x1fc)](_0x583f13(0x2e3)+_0x230875[_0x583f13(0x2ea)]+_0x583f13(0x31e)+(_0x230875['length']!==0x1?'s':''));if(_0x24bb74['format']===_0x583f13(0x2ce)||_0x24bb74['format']===_0x583f13(0x213))await handleSDKOutput(_0x230875,_0x24bb74);else{if(_0x230875['length']===0x0)console[_0x583f13(0x1a1)](_0x583f13(0x27b));else for(const _0x4ec743 of _0x230875){const _0x49f0e3=_0x4ec743[_0x583f13(0x283)]===_0x583f13(0x370)?'🚀':'📝',_0x5cb7d0=_0x4ec743[_0x583f13(0x1f0)]?a31_0x2e332c[_0x583f13(0x196)](_0x583f13(0x32c)):'',_0x38ef1e=a31_0x2e332c[_0x583f13(0x231)]('\x20('+_0x4ec743[_0x583f13(0x2de)]+'\x20stage'+(_0x4ec743[_0x583f13(0x2de)]!==0x1?'s':'')+')');console[_0x583f13(0x1a1)](_0x49f0e3+'\x20'+_0x4ec743[_0x583f13(0x25c)]+_0x5cb7d0+_0x38ef1e);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']=a31_0xfeae4b(0x36b);['description']=a31_0xfeae4b(0x1c2);async[a31_0xfeae4b(0x245)](_0x4ec08e){const _0x19d95c=a31_0xfeae4b,{options:_0x2172ce,args:_0x3646ba,tdx:_0x4b9e73}=_0x4ec08e,_0x3e3725=_0x3646ba[0x0];if(!_0x3e3725)return console[_0x19d95c(0x1fc)](a31_0x2e332c[_0x19d95c(0x25a)](_0x19d95c(0x26d))),console[_0x19d95c(0x1fc)](_0x19d95c(0x1bb)),console[_0x19d95c(0x1fc)](a31_0x2e332c['dim'](_0x19d95c(0x343))),0x1;_0x2172ce[_0x19d95c(0x350)]&&(console[_0x19d95c(0x1fc)]('Site:\x20'+_0x2172ce[_0x19d95c(0x193)]),console['error'](_0x19d95c(0x235)+_0x3e3725));const _0x494568=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3e3725+_0x19d95c(0x291),()=>_0x4b9e73['realtime'][_0x19d95c(0x313)](_0x3e3725),{'verbose':_0x2172ce['verbose']}),_0x142125=_0x494568[_0x19d95c(0x33b)];console[_0x19d95c(0x1fc)]('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x142125[_0x19d95c(0x25c)]+'\x27');if(_0x2172ce[_0x19d95c(0x2c1)]==='json'||_0x2172ce['format']===_0x19d95c(0x213))await handleSDKOutput([_0x142125],_0x2172ce);else{const _0x1f4b3b=_0x142125[_0x19d95c(0x283)]==='launched'?'🚀':'📝',_0x264625=_0x142125[_0x19d95c(0x1f0)]?a31_0x2e332c[_0x19d95c(0x196)](_0x19d95c(0x32c)):'';console[_0x19d95c(0x1a1)](_0x1f4b3b+'\x20'+_0x142125[_0x19d95c(0x25c)]+_0x264625);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x29d);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x175);async[a31_0xfeae4b(0x245)](_0x4d7981){const _0x5a4c4c=a31_0xfeae4b,{options:_0x40fcd9,args:_0x249112,tdx:_0x436bac}=_0x4d7981,_0x4fce5b=_0x249112[0x0];if(!_0x4fce5b)return console[_0x5a4c4c(0x1fc)](a31_0x2e332c[_0x5a4c4c(0x25a)](_0x5a4c4c(0x26d))),console['error'](_0x5a4c4c(0x1d1)),console[_0x5a4c4c(0x1fc)](a31_0x2e332c[_0x5a4c4c(0x231)](_0x5a4c4c(0x343))),0x1;_0x40fcd9[_0x5a4c4c(0x350)]&&(console[_0x5a4c4c(0x1fc)](_0x5a4c4c(0x35a)+_0x40fcd9[_0x5a4c4c(0x193)]),console['error'](_0x5a4c4c(0x235)+_0x4fce5b));const _0x2d4c03=await withSpinner(_0x5a4c4c(0x2df)+_0x4fce5b+'\x27...',()=>_0x436bac['realtime'][_0x5a4c4c(0x36d)](_0x4fce5b),{'verbose':_0x40fcd9[_0x5a4c4c(0x350)]}),_0x1d61e2=_0x2d4c03[_0x5a4c4c(0x33b)];console[_0x5a4c4c(0x1fc)](_0x5a4c4c(0x2d4)+_0x1d61e2['name']+'\x27');if(_0x40fcd9[_0x5a4c4c(0x2c1)]===_0x5a4c4c(0x2ce)||_0x40fcd9[_0x5a4c4c(0x2c1)]===_0x5a4c4c(0x213))await handleSDKOutput([_0x1d61e2],_0x40fcd9);else{const _0x43f5f3=_0x1d61e2[_0x5a4c4c(0x283)]===_0x5a4c4c(0x370)?'🚀':'📝',_0x568fb4=_0x1d61e2['paused']?a31_0x2e332c[_0x5a4c4c(0x196)](_0x5a4c4c(0x32c)):'';console[_0x5a4c4c(0x1a1)](_0x43f5f3+'\x20'+_0x1d61e2[_0x5a4c4c(0x25c)]+_0x568fb4);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a31_0xfeae4b(0x300);['description']=a31_0xfeae4b(0x27f);async[a31_0xfeae4b(0x245)](_0x4e8100){const _0x16a49f=a31_0xfeae4b,{options:_0x11b93a,args:_0xdbfd3c,tdx:_0x322fbd}=_0x4e8100,_0x1e8bed=_0xdbfd3c[0x0]||_0x11b93a[_0x16a49f(0x2fa)];if(!_0x1e8bed)return showParentSegmentNotSetError(_0x16a49f(0x248)+_0x16a49f(0x1cb)),0x1;_0x11b93a[_0x16a49f(0x350)]&&(console['error'](_0x16a49f(0x35a)+_0x11b93a[_0x16a49f(0x193)]),console['error'](_0x16a49f(0x244)+_0x1e8bed));const _0x10cffb=await withSpinner(_0x16a49f(0x19c)+_0x1e8bed+_0x16a49f(0x291),()=>_0x322fbd[_0x16a49f(0x330)][_0x16a49f(0x221)](_0x1e8bed),{'verbose':_0x11b93a['verbose']}),_0x25bad4=_0x10cffb[_0x16a49f(0x33b)],_0x38bfdd=await withSpinner(_0x16a49f(0x30a)+_0x1e8bed+'\x27...',()=>_0x322fbd['realtime'][_0x16a49f(0x215)](_0x25bad4),{'verbose':_0x11b93a[_0x16a49f(0x350)]}),_0x15921d=_0x38bfdd[_0x16a49f(0x33b)];return console[_0x16a49f(0x1fc)](_0x16a49f(0x208)),_0x11b93a[_0x16a49f(0x2c1)]===_0x16a49f(0x2ce)||_0x11b93a[_0x16a49f(0x2c1)]===_0x16a49f(0x213)?await handleSDKOutput([_0x15921d],_0x11b93a):(console['log'](_0x16a49f(0x1a9)+_0x15921d['id']),console[_0x16a49f(0x1a1)]('audienceId:\x20'+_0x15921d[_0x16a49f(0x261)]),console[_0x16a49f(0x1a1)](_0x16a49f(0x2b9)+_0x15921d[_0x16a49f(0x1a8)]),console['log'](_0x16a49f(0x1f5)+_0x15921d[_0x16a49f(0x219)]),console['log']('status:\x20'+_0x15921d[_0x16a49f(0x21c)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']='ps:pz:service:list';['description']=a31_0xfeae4b(0x2da);async['execute'](_0x19b17a){const _0x33f450=a31_0xfeae4b,{options:_0x2bda90,args:_0x13ef8a,tdx:_0x11eed3}=_0x19b17a,_0x225e30=_0x13ef8a[0x0]||_0x2bda90[_0x33f450(0x2fa)];if(!_0x225e30)return showParentSegmentNotSetError(_0x33f450(0x2a1)+_0x33f450(0x262)),0x1;const _0x5711c4=await withSpinner(_0x33f450(0x19c)+_0x225e30+_0x33f450(0x291),()=>_0x11eed3[_0x33f450(0x330)][_0x33f450(0x221)](_0x225e30),{'verbose':_0x2bda90['verbose']}),_0x38c0c7=_0x5711c4[_0x33f450(0x33b)],_0x2b2d01=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x225e30+_0x33f450(0x291),()=>_0x11eed3[_0x33f450(0x169)][_0x33f450(0x1b4)](_0x38c0c7),{'verbose':_0x2bda90[_0x33f450(0x350)]}),_0x1fb425=_0x2b2d01['data'];console[_0x33f450(0x1fc)](_0x33f450(0x2e3)+_0x1fb425[_0x33f450(0x2ea)]+_0x33f450(0x15d)+(_0x1fb425[_0x33f450(0x2ea)]!==0x1?'s':''));if(_0x2bda90[_0x33f450(0x2c1)]==='json'||_0x2bda90['format']==='jsonl')await handleSDKOutput(_0x1fb425,_0x2bda90);else{if(_0x1fb425[_0x33f450(0x2ea)]===0x0)console['log'](_0x33f450(0x178)),console[_0x33f450(0x1fc)](a31_0x2e332c[_0x33f450(0x1b9)](_0x33f450(0x2c0)));else for(const _0xaabc60 of _0x1fb425){console[_0x33f450(0x1a1)](a31_0x2e332c[_0x33f450(0x263)](_0xaabc60['name'])+'\x20'+a31_0x2e332c[_0x33f450(0x231)](_0x33f450(0x2b1)+_0xaabc60['id']+')'));_0xaabc60['description']&&console[_0x33f450(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x33f450(0x231)](_0xaabc60[_0x33f450(0x22f)]));if(_0xaabc60[_0x33f450(0x2cf)]&&_0xaabc60[_0x33f450(0x2cf)]['length']>0x0)for(const _0x179aa6 of _0xaabc60[_0x33f450(0x2cf)]){const _0x3b00bd=_0x179aa6[_0x33f450(0x377)]?.[_0x33f450(0x2ea)]?_0x179aa6['allowedIps'][_0x33f450(0x251)](',\x20'):'any';console['log']('\x20\x20'+a31_0x2e332c[_0x33f450(0x1b9)](_0x33f450(0x1fe))+'\x20'+_0x179aa6[_0x33f450(0x25c)]+'\x20'+a31_0x2e332c[_0x33f450(0x231)]('(id:\x20'+_0x179aa6['id']+')')),console['log'](_0x33f450(0x182)+a31_0x2e332c[_0x33f450(0x231)]('allowed\x20IPs:')+'\x20'+_0x3b00bd);}else console[_0x33f450(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x33f450(0x231)](_0x33f450(0x2c7)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]='ps:pz:service:create';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x1ca);async[a31_0xfeae4b(0x245)](_0x52148a){const _0xe40540=a31_0xfeae4b,{options:_0x5073af,args:_0x1fde3b,tdx:_0x20b2bb}=_0x52148a,_0x30888b=_0x5073af,_0x411f45=_0x1fde3b[0x0],_0x824446=_0x1fde3b[0x1]||_0x5073af[_0xe40540(0x2fa)];if(!_0x411f45)return console[_0xe40540(0x1fc)](_0xe40540(0x1a3)),console[_0xe40540(0x1fc)](_0xe40540(0x381)),console['error'](_0xe40540(0x242)),0x1;if(!_0x824446)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0xe40540(0x242)),0x1;const _0x328111=await withSpinner(_0xe40540(0x19c)+_0x824446+_0xe40540(0x291),()=>_0x20b2bb[_0xe40540(0x330)][_0xe40540(0x221)](_0x824446),{'verbose':_0x5073af[_0xe40540(0x350)]}),_0x1fa4ad=_0x328111[_0xe40540(0x33b)],_0x4cf377={'name':_0x411f45,'description':_0x30888b['description'],'public':_0x30888b[_0xe40540(0x1f8)]},_0x2fb49d=await withSpinner(_0xe40540(0x35e)+_0x411f45+_0xe40540(0x291),()=>_0x20b2bb[_0xe40540(0x169)]['create'](_0x1fa4ad,_0x4cf377),{'verbose':_0x5073af['verbose']}),_0x11582b=_0x2fb49d[_0xe40540(0x33b)];return console[_0xe40540(0x1fc)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x11582b['name']+'\x27\x20with\x20ID:\x20'+_0x11582b['id']),await handleSDKOutput([_0x11582b],_0x5073af),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x16e);['description']='Show\x20personalization\x20service\x20details';async[a31_0xfeae4b(0x245)](_0x380444){const _0x1fc0f7=a31_0xfeae4b,{options:_0x3c320c,args:_0x515b2d,tdx:_0x7be29a}=_0x380444,_0x146820=_0x515b2d[0x0],_0x48ca94=_0x515b2d[0x1]||_0x3c320c[_0x1fc0f7(0x2fa)];if(!_0x146820)return console['error'](_0x1fc0f7(0x1ee)),console['error'](_0x1fc0f7(0x229)),console[_0x1fc0f7(0x1fc)](_0x1fc0f7(0x1de)),0x1;if(!_0x48ca94)return showParentSegmentNotSetError(_0x1fc0f7(0x31a)+_0x1fc0f7(0x1de)),0x1;const _0x56d5df=await withSpinner(_0x1fc0f7(0x19c)+_0x48ca94+_0x1fc0f7(0x291),()=>_0x7be29a['segment'][_0x1fc0f7(0x221)](_0x48ca94),{'verbose':_0x3c320c[_0x1fc0f7(0x350)]}),_0x3657bb=_0x56d5df[_0x1fc0f7(0x33b)],_0x44aebd=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x146820+_0x1fc0f7(0x291),()=>_0x7be29a['personalization']['get'](_0x3657bb,_0x146820),{'verbose':_0x3c320c['verbose']}),_0x1955cd=_0x44aebd[_0x1fc0f7(0x33b)];if(_0x3c320c['json']||_0x3c320c[_0x1fc0f7(0x213)])await handleSDKOutput([_0x1955cd],_0x3c320c);else{console[_0x1fc0f7(0x1a1)](a31_0x2e332c[_0x1fc0f7(0x263)](_0x1955cd[_0x1fc0f7(0x25c)])+'\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1fc0f7(0x2b1)+_0x1955cd['id']+')'));_0x1955cd[_0x1fc0f7(0x22f)]&&console['log']('\x20\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1955cd['description']));console[_0x1fc0f7(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x1fc0f7(0x1b9)](_0x1fc0f7(0x346))+'\x20'+(_0x1955cd['public']?'yes':'no'));if(_0x1955cd['tokens']&&_0x1955cd[_0x1fc0f7(0x2cf)][_0x1fc0f7(0x2ea)]>0x0)for(const _0x56fa86 of _0x1955cd[_0x1fc0f7(0x2cf)]){const _0x8b7d25=_0x56fa86['allowedIps']?.[_0x1fc0f7(0x2ea)]?_0x56fa86[_0x1fc0f7(0x377)][_0x1fc0f7(0x251)](',\x20'):_0x1fc0f7(0x1df);console[_0x1fc0f7(0x1a1)]('\x20\x20'+a31_0x2e332c['cyan'](_0x1fc0f7(0x1fe))+'\x20'+_0x56fa86[_0x1fc0f7(0x25c)]+'\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1fc0f7(0x2b1)+_0x56fa86['id']+')')),console[_0x1fc0f7(0x1a1)](_0x1fc0f7(0x182)+a31_0x2e332c['dim'](_0x1fc0f7(0x2f3))+'\x20'+_0x8b7d25);}else console[_0x1fc0f7(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1fc0f7(0x2c7)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x173);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x265);async[a31_0xfeae4b(0x245)](_0x4f502b){const _0x549fe4=a31_0xfeae4b,{options:_0x2b32aa,args:_0x786f40,tdx:_0x34ab5c}=_0x4f502b,_0x315fdc=_0x786f40[0x0],_0x2bd4ea=_0x786f40[0x1]||_0x2b32aa['parentSegment'];if(!_0x315fdc)return console[_0x549fe4(0x1fc)](_0x549fe4(0x1ee)),console[_0x549fe4(0x1fc)](_0x549fe4(0x165)),console[_0x549fe4(0x1fc)](_0x549fe4(0x1db)),0x1;if(!_0x2bd4ea)return showParentSegmentNotSetError(_0x549fe4(0x362)+_0x549fe4(0x1db)),0x1;const _0x30a70e=await withSpinner(_0x549fe4(0x19c)+_0x2bd4ea+_0x549fe4(0x291),()=>_0x34ab5c[_0x549fe4(0x330)]['resolveParentId'](_0x2bd4ea),{'verbose':_0x2b32aa[_0x549fe4(0x350)]}),_0x322c23=_0x30a70e['data'];return await withSpinner(_0x549fe4(0x2ba)+_0x315fdc+_0x549fe4(0x291),()=>_0x34ab5c[_0x549fe4(0x169)][_0x549fe4(0x31b)](_0x322c23,_0x315fdc),{'verbose':_0x2b32aa['verbose']}),console['error'](_0x549fe4(0x35b)+_0x315fdc+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a31_0xfeae4b(0x264);[a31_0xfeae4b(0x22f)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async['execute'](_0xf0a49f){const _0x14ed32=a31_0xfeae4b,{options:_0x422c47,args:_0x1962cd,tdx:_0x539b6d}=_0xf0a49f,_0x5a66d8=_0x422c47,_0x181a69=_0x1962cd[0x0],_0x4da632=_0x1962cd[0x1]||_0x422c47[_0x14ed32(0x2fa)];if(!_0x181a69)return console[_0x14ed32(0x1fc)](_0x14ed32(0x1ee)),console[_0x14ed32(0x1fc)](_0x14ed32(0x2cc)),console[_0x14ed32(0x1fc)](_0x14ed32(0x360)),0x1;if(!_0x5a66d8[_0x14ed32(0x25c)])return console[_0x14ed32(0x1fc)](_0x14ed32(0x372)),console[_0x14ed32(0x1fc)](_0x14ed32(0x2cc)),0x1;if(!_0x4da632)return showParentSegmentNotSetError(_0x14ed32(0x24b)+_0x14ed32(0x360)),0x1;const _0x1b1d71=await withSpinner(_0x14ed32(0x19c)+_0x4da632+_0x14ed32(0x291),()=>_0x539b6d[_0x14ed32(0x330)]['resolveParentId'](_0x4da632),{'verbose':_0x422c47[_0x14ed32(0x350)]}),_0x1ccb2e=_0x1b1d71['data'],_0x295fdd={'name':_0x5a66d8[_0x14ed32(0x25c)]};_0x5a66d8[_0x14ed32(0x22f)]!==undefined&&(_0x295fdd['description']=_0x5a66d8[_0x14ed32(0x22f)]);const _0x3dc7b4=await withSpinner(_0x14ed32(0x366)+_0x181a69+_0x14ed32(0x291),()=>_0x539b6d['personalization'][_0x14ed32(0x1be)](_0x1ccb2e,_0x181a69,_0x295fdd),{'verbose':_0x422c47[_0x14ed32(0x350)]}),_0x3b6342=_0x3dc7b4[_0x14ed32(0x33b)];return console[_0x14ed32(0x1fc)](_0x14ed32(0x284)+_0x3b6342[_0x14ed32(0x25c)]+'\x27'),await handleSDKOutput([_0x3b6342],_0x422c47),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a31_0xfeae4b(0x33e);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x23f);async['execute'](_0x19a20a){const _0xbd2ea=a31_0xfeae4b,{options:_0x4d380b,args:_0x1b52ce,tdx:_0x54b750}=_0x19a20a,_0x33a874=_0x4d380b,_0xb84c53=_0x1b52ce[0x0],_0x222c40=_0x1b52ce[0x1],_0x36cc66=_0x1b52ce[0x2]||_0x4d380b[_0xbd2ea(0x2fa)];if(!_0xb84c53)return console[_0xbd2ea(0x1fc)](_0xbd2ea(0x326)),console[_0xbd2ea(0x1fc)](_0xbd2ea(0x27c)),console[_0xbd2ea(0x1fc)](_0xbd2ea(0x1bc)),0x1;if(!_0x222c40)return console['error'](_0xbd2ea(0x1ee)),console[_0xbd2ea(0x1fc)](_0xbd2ea(0x27c)),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(!_0x36cc66)return showParentSegmentNotSetError(_0xbd2ea(0x22b)+_0xbd2ea(0x1bc)),0x1;const _0x22a680=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x36cc66+'\x27...',()=>_0x54b750['segment'][_0xbd2ea(0x221)](_0x36cc66),{'verbose':_0x4d380b[_0xbd2ea(0x350)]}),_0x2e59d9=_0x22a680[_0xbd2ea(0x33b)],_0x13f98e={'name':_0xb84c53};_0x33a874[_0xbd2ea(0x377)]&&(_0x13f98e[_0xbd2ea(0x377)]=_0x33a874['allowedIps']['split'](',')[_0xbd2ea(0x20d)](_0x253fc0=>_0x253fc0[_0xbd2ea(0x26b)]()));_0x33a874[_0xbd2ea(0x22f)]&&(_0x13f98e[_0xbd2ea(0x22f)]=_0x33a874['description']);const _0x2ad8e5=await withSpinner('Creating\x20token\x20\x27'+_0xb84c53+_0xbd2ea(0x37b)+_0x222c40+_0xbd2ea(0x291),()=>_0x54b750[_0xbd2ea(0x169)][_0xbd2ea(0x2ed)](_0x2e59d9,_0x222c40,_0x13f98e),{'verbose':_0x4d380b[_0xbd2ea(0x350)]}),_0x31d38e=_0x2ad8e5[_0xbd2ea(0x33b)];return console[_0xbd2ea(0x1fc)]('✔\x20Created\x20token\x20\x27'+_0x31d38e[_0xbd2ea(0x25c)]+'\x27\x20with\x20ID:\x20'+_0x31d38e['id']),_0x31d38e[_0xbd2ea(0x2c3)]&&(console['error'](a31_0x2e332c[_0xbd2ea(0x196)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0xbd2ea(0x1fc)](a31_0x2e332c[_0xbd2ea(0x1b9)](_0x31d38e[_0xbd2ea(0x2c3)])),console['error']('')),await handleSDKOutput([_0x31d38e],_0x4d380b),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x1b7);[a31_0xfeae4b(0x22f)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a31_0xfeae4b(0x245)](_0x5719e6){const _0x2aa356=a31_0xfeae4b,{options:_0x33f8c5,args:_0x3e7f21,tdx:_0x5d9b6f}=_0x5719e6,_0x2395c3=_0x3e7f21[0x0],_0x4ef3ef=_0x3e7f21[0x1]||_0x33f8c5[_0x2aa356(0x2fa)];if(!_0x2395c3)return console[_0x2aa356(0x1fc)](_0x2aa356(0x1d4)),console[_0x2aa356(0x1fc)](_0x2aa356(0x22d)),console[_0x2aa356(0x1fc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4ef3ef)return showParentSegmentNotSetError(_0x2aa356(0x351)+_0x2aa356(0x20a)),0x1;const _0x3a00ab=await withSpinner(_0x2aa356(0x19c)+_0x4ef3ef+_0x2aa356(0x291),()=>_0x5d9b6f[_0x2aa356(0x330)]['resolveParentId'](_0x4ef3ef),{'verbose':_0x33f8c5[_0x2aa356(0x350)]}),_0x32dccd=_0x3a00ab[_0x2aa356(0x33b)],_0x9f4072=await withSpinner(_0x2aa356(0x34d),()=>_0x5d9b6f[_0x2aa356(0x169)][_0x2aa356(0x1b4)](_0x32dccd),{'verbose':_0x33f8c5[_0x2aa356(0x350)]}),_0xbb0484=_0x9f4072['data'];let _0x52ff08;for(const _0x367304 of _0xbb0484){if(_0x367304[_0x2aa356(0x2cf)]?.[_0x2aa356(0x176)](_0x1d5041=>_0x1d5041['id']===_0x2395c3)){_0x52ff08=_0x367304['id'];break;}}if(!_0x52ff08)return console['error'](_0x2aa356(0x23b)+_0x2395c3+_0x2aa356(0x316)),0x1;const _0x5b8e6e=await withSpinner(_0x2aa356(0x388)+_0x2395c3+'\x27...',()=>_0x5d9b6f[_0x2aa356(0x169)][_0x2aa356(0x1a7)](_0x32dccd,_0x52ff08,_0x2395c3),{'verbose':_0x33f8c5[_0x2aa356(0x350)]}),_0x5c05c9=_0x5b8e6e['data'];return console['error']('✔\x20Deleted\x20token\x20\x27'+(_0x5c05c9[_0x2aa356(0x25c)]||_0x2395c3)+'\x27'),await handleSDKOutput([_0x5c05c9],_0x33f8c5),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a31_0xfeae4b(0x2ff);[a31_0xfeae4b(0x22f)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a31_0xfeae4b(0x245)](_0x35446b){const _0x2c93bb=a31_0xfeae4b,{options:_0xaca5b0,args:_0x1286b7,tdx:_0x49af61}=_0x35446b,_0x1e4eb0=_0x1286b7[0x0]||_0xaca5b0['parentSegment'];if(!_0x1e4eb0)return showParentSegmentNotSetError(_0x2c93bb(0x2d5)+_0x2c93bb(0x2af)),0x1;const _0x3f214b=await withSpinner(_0x2c93bb(0x19c)+_0x1e4eb0+'\x27...',()=>_0x49af61['segment'][_0x2c93bb(0x221)](_0x1e4eb0),{'verbose':_0xaca5b0['verbose']}),_0x7ccecf=_0x3f214b[_0x2c93bb(0x33b)],_0x5505b8=await withSpinner(_0x2c93bb(0x204)+_0x1e4eb0+'\x27...',()=>_0x49af61['personalization'][_0x2c93bb(0x2e2)](_0x7ccecf),{'verbose':_0xaca5b0[_0x2c93bb(0x350)]}),_0x1bdf72=_0x5505b8[_0x2c93bb(0x33b)];console[_0x2c93bb(0x1fc)](_0x2c93bb(0x2e3)+_0x1bdf72['length']+_0x2c93bb(0x207)+(_0x1bdf72['length']!==0x1?'s':''));if(_0xaca5b0[_0x2c93bb(0x2c1)]===_0x2c93bb(0x2ce)||_0xaca5b0[_0x2c93bb(0x2c1)]===_0x2c93bb(0x213))await handleSDKOutput(_0x1bdf72,_0xaca5b0);else{if(_0x1bdf72['length']===0x0)console[_0x2c93bb(0x1a1)](_0x2c93bb(0x232));else for(const _0x1e0d6d of _0x1bdf72){console[_0x2c93bb(0x1a1)](a31_0x2e332c['bold'](_0x1e0d6d['name'])+'\x20'+a31_0x2e332c[_0x2c93bb(0x231)](_0x2c93bb(0x2b1)+_0x1e0d6d['id']+')'));_0x1e0d6d[_0x2c93bb(0x22f)]&&console[_0x2c93bb(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x2c93bb(0x231)](_0x1e0d6d[_0x2c93bb(0x22f)]));const _0x58cf74=_0x1e0d6d[_0x2c93bb(0x2b6)]?.[_0x2c93bb(0x2ea)]||0x0;console[_0x2c93bb(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x2c93bb(0x1b9)](_0x2c93bb(0x2e0))+'\x20'+_0x58cf74);if(_0x1e0d6d[_0x2c93bb(0x2b6)]&&_0x1e0d6d[_0x2c93bb(0x2b6)][_0x2c93bb(0x2ea)]>0x0)for(const _0x3e562c of _0x1e0d6d[_0x2c93bb(0x2b6)]){console[_0x2c93bb(0x1a1)](_0x2c93bb(0x1fb)+_0x3e562c['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]='ps:pz:show';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x20e);async[a31_0xfeae4b(0x245)](_0x1a2534){const _0x372792=a31_0xfeae4b,{options:_0x3142e6,args:_0x4d19aa,tdx:_0xa96082}=_0x1a2534,_0x1dbec6=_0x4d19aa[0x0];if(!_0x1dbec6)return console[_0x372792(0x1fc)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x372792(0x1fc)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x400e9d=await withSpinner(_0x372792(0x369)+_0x1dbec6+_0x372792(0x291),()=>_0xa96082['personalization'][_0x372792(0x356)](_0x1dbec6),{'verbose':_0x3142e6['verbose']}),_0x59d6b7=_0x400e9d[_0x372792(0x33b)];console['error'](_0x372792(0x320)+_0x59d6b7[_0x372792(0x25c)]+'\x27');if(_0x3142e6[_0x372792(0x2c1)]==='json'||_0x3142e6[_0x372792(0x2c1)]===_0x372792(0x213))await handleSDKOutput([_0x59d6b7],_0x3142e6);else{console[_0x372792(0x1a1)](a31_0x2e332c[_0x372792(0x263)](_0x59d6b7[_0x372792(0x25c)])+'\x20'+a31_0x2e332c[_0x372792(0x231)]('(id:\x20'+_0x59d6b7['id']+')'));_0x59d6b7['description']&&console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x231)](_0x59d6b7['description']));_0x59d6b7[_0x372792(0x261)]&&console['log']('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x170))+'\x20'+_0x59d6b7['audienceId']);console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)]('created:')+'\x20'+_0x59d6b7[_0x372792(0x2bb)]),console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x2c6))+'\x20'+_0x59d6b7[_0x372792(0x1ad)]);const _0x2e96c8=_0x59d6b7['sections']?.[_0x372792(0x2ea)]||0x0;console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x2e0))+'\x20'+_0x2e96c8);if(_0x59d6b7[_0x372792(0x2b6)]&&_0x59d6b7[_0x372792(0x2b6)][_0x372792(0x2ea)]>0x0)for(const _0x13a983 of _0x59d6b7['sections']){console[_0x372792(0x1a1)](_0x372792(0x182)+a31_0x2e332c[_0x372792(0x263)](_0x13a983[_0x372792(0x25c)])+'\x20'+a31_0x2e332c[_0x372792(0x231)](_0x372792(0x2b1)+_0x13a983['id']+')')),_0x13a983[_0x372792(0x282)]&&(console['log'](_0x372792(0x209)+a31_0x2e332c[_0x372792(0x1b9)]('entryCriteria:')+'\x20'+_0x13a983[_0x372792(0x282)][_0x372792(0x25c)]),_0x13a983[_0x372792(0x282)][_0x372792(0x211)]?.[_0x372792(0x1f4)]&&console[_0x372792(0x1a1)]('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x1ac))+'\x20'+_0x13a983[_0x372792(0x282)][_0x372792(0x211)][_0x372792(0x1f4)])),_0x13a983[_0x372792(0x2fd)]&&console[_0x372792(0x1a1)](_0x372792(0x209)+a31_0x2e332c[_0x372792(0x1b9)]('payload:')+'\x20'+JSON[_0x372792(0x201)](_0x13a983[_0x372792(0x2fd)])),_0x13a983[_0x372792(0x1e2)]&&console[_0x372792(0x1a1)](_0x372792(0x209)+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x269))+_0x372792(0x368));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']=a31_0xfeae4b(0x2e5);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x1c9);async[a31_0xfeae4b(0x245)](_0x2fbc93){const _0x1d5f14=a31_0xfeae4b,{options:_0x53d030,args:_0x136a46,tdx:_0x36a4b6}=_0x2fbc93,_0x5db3b4=_0x136a46[0x0];if(!_0x5db3b4)return console[_0x1d5f14(0x1fc)](_0x1d5f14(0x2bc)),console[_0x1d5f14(0x1fc)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x1d5f14(0x21a)+_0x5db3b4+'\x27...',()=>_0x36a4b6[_0x1d5f14(0x169)][_0x1d5f14(0x279)](_0x5db3b4),{'verbose':_0x53d030[_0x1d5f14(0x350)]}),console[_0x1d5f14(0x1fc)]('✔\x20Deleted\x20personalization\x20\x27'+_0x5db3b4+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x1c6);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x185);async[a31_0xfeae4b(0x245)](_0x4026ec){const _0x6f4893=a31_0xfeae4b,{options:_0x572d7c,tdx:_0x578c1f}=_0x4026ec,_0x20d5ef=_0x572d7c;let _0x2475e7;if(_0x20d5ef[_0x6f4893(0x24a)]){_0x2475e7=await loadJSON(_0x20d5ef[_0x6f4893(0x24a)],!![]);if(!_0x2475e7[_0x6f4893(0x364)]?.[_0x6f4893(0x18b)])return console[_0x6f4893(0x1fc)](_0x6f4893(0x2f2)),console[_0x6f4893(0x1fc)](_0x6f4893(0x1ae)),console[_0x6f4893(0x1fc)]('\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(!_0x20d5ef['name'])return console[_0x6f4893(0x1fc)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x6f4893(0x1fc)](_0x6f4893(0x35f)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x20d5ef[_0x6f4893(0x22f)]===undefined)return console['error'](_0x6f4893(0x226)),console[_0x6f4893(0x1fc)](_0x6f4893(0x35f)),console[_0x6f4893(0x1fc)](_0x6f4893(0x365)),0x1;if(_0x20d5ef[_0x6f4893(0x379)]===undefined)return console[_0x6f4893(0x1fc)](_0x6f4893(0x217)),console['error'](_0x6f4893(0x309)),0x1;let _0x437235=_0x20d5ef[_0x6f4893(0x261)];if(!_0x437235&&_0x572d7c[_0x6f4893(0x2fa)]){const _0x215841=await withSpinner(_0x6f4893(0x19c)+_0x572d7c[_0x6f4893(0x2fa)]+_0x6f4893(0x291),()=>_0x578c1f[_0x6f4893(0x330)][_0x6f4893(0x221)](_0x572d7c[_0x6f4893(0x2fa)]),{'verbose':_0x572d7c[_0x6f4893(0x350)]});_0x437235=_0x215841[_0x6f4893(0x33b)];}let _0x2cb0e3;_0x20d5ef[_0x6f4893(0x2b6)]&&(_0x2cb0e3=await loadJSON(_0x20d5ef['sections'],![]));const _0xf000fa=_0x20d5ef[_0x6f4893(0x379)]===_0x6f4893(0x1d5)?null:{'id':_0x20d5ef[_0x6f4893(0x379)],'type':_0x6f4893(0x27d)};_0x2475e7={'attributes':{'name':_0x20d5ef[_0x6f4893(0x25c)],'description':_0x20d5ef['description']||null,..._0x437235!==undefined&&{'audienceId':_0x437235},..._0x2cb0e3!==undefined&&{'sections':_0x2cb0e3}},'relationships':{'parentFolder':{'data':_0xf000fa}}};}const _0x13f107=await withSpinner(_0x6f4893(0x2dc)+(_0x2475e7[_0x6f4893(0x200)]?.[_0x6f4893(0x25c)]??'')+_0x6f4893(0x291),()=>_0x578c1f['personalization']['createPersonalization'](_0x2475e7),{'verbose':_0x572d7c['verbose']}),_0x4c5eb4=_0x13f107['data'];return console[_0x6f4893(0x1fc)]('✔\x20Created\x20personalization\x20\x27'+_0x4c5eb4['name']+_0x6f4893(0x307)+_0x4c5eb4['id']),await handleSDKOutput([_0x4c5eb4],_0x572d7c),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x36c);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x247);async['execute'](_0x5a0e0){const _0x24f241=a31_0xfeae4b,{options:_0x48a918,args:_0x4d038f}=_0x5a0e0,_0x226165=_0x48a918,_0x1ac502=_0x4d038f[0x0];if(!_0x1ac502)return console[_0x24f241(0x1fc)](_0x24f241(0x2bc)),console[_0x24f241(0x1fc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x24f241(0x1fc)](_0x24f241(0x162)),0x1;let _0x1c9235;if(_0x226165[_0x24f241(0x24a)])_0x1c9235=await loadJSON(_0x226165['file'],!![]);else{if(!_0x226165[_0x24f241(0x25c)])return console['error'](_0x24f241(0x302)),console[_0x24f241(0x1fc)](_0x24f241(0x28c)),0x1;if(_0x226165[_0x24f241(0x22f)]===undefined)return console[_0x24f241(0x1fc)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x24f241(0x1fc)](_0x24f241(0x28c)),0x1;let _0x20ed41;_0x226165[_0x24f241(0x2b6)]&&(_0x20ed41=await loadJSON(_0x226165['sections'],![])),_0x1c9235={'attributes':{'name':_0x226165[_0x24f241(0x25c)],'description':_0x226165[_0x24f241(0x22f)]||null,..._0x20ed41!==undefined&&{'sections':_0x20ed41}}};}const {tdx:_0x57d335}=_0x5a0e0,_0x31c5b3=await withSpinner(_0x24f241(0x1da)+_0x1ac502+_0x24f241(0x291),()=>_0x57d335[_0x24f241(0x169)][_0x24f241(0x1c3)](_0x1ac502,_0x1c9235),{'verbose':_0x48a918['verbose']}),_0x87394=_0x31c5b3[_0x24f241(0x33b)];return console[_0x24f241(0x1fc)](_0x24f241(0x31f)+_0x87394[_0x24f241(0x25c)]+_0x24f241(0x319)+_0x87394['id']+')'),await handleSDKOutput([_0x87394],_0x48a918),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x32a);['description']=a31_0xfeae4b(0x32f);async[a31_0xfeae4b(0x245)](_0x101847){const _0x4cc576=a31_0xfeae4b,{options:_0x8a0136,args:_0x3020e1}=_0x101847,_0x1774f6=_0x3020e1[0x0]||_0x8a0136[_0x4cc576(0x2fa)];if(!_0x1774f6)return showParentSegmentNotSetError(_0x4cc576(0x34f)+_0x4cc576(0x1a5)),0x1;const _0x58b8c3=resolveYamlFile(_0x1774f6);if(!existsSync(_0x58b8c3))return showFileNotFoundError(_0x58b8c3,_0x1774f6),0x1;let _0x389ff5;try{_0x389ff5=readFileSync(_0x58b8c3,'utf-8');}catch(_0x3ce68e){const _0x492f33=_0x3ce68e instanceof Error?_0x3ce68e[_0x4cc576(0x1e9)]:String(_0x3ce68e);return console[_0x4cc576(0x1fc)](_0x4cc576(0x375)+_0x492f33),0x1;}let _0x32bd4c;try{_0x32bd4c=parseDef(_0x389ff5);}catch(_0x1568f9){const _0x4cd57b=_0x1568f9 instanceof Error?_0x1568f9['message']:String(_0x1568f9);return console[_0x4cc576(0x1fc)](a31_0x2e332c[_0x4cc576(0x25a)]('Error\x20parsing\x20YAML:\x20'+_0x4cd57b)),0x1;}if(_0x32bd4c['personalization_services']&&_0x32bd4c[_0x4cc576(0x2be)][_0x4cc576(0x2ea)]>0x0)return console['error'](a31_0x2e332c['yellow'](_0x4cc576(0x1c0)+_0x58b8c3)),console[_0x4cc576(0x1fc)](a31_0x2e332c[_0x4cc576(0x231)](_0x4cc576(0x199)+_0x32bd4c[_0x4cc576(0x2be)]['length']+'\x20service(s)\x20configured')),0x1;!_0x32bd4c['realtime']&&(_0x32bd4c[_0x4cc576(0x1f6)]={'events':[{'name':_0x4cc576(0x2b4),'source_table':_0x4cc576(0x384)}],'attributes':[{'name':_0x4cc576(0x334),'type':_0x4cc576(0x164)}],'id_stitching':{'primary_key':_0x32bd4c[_0x4cc576(0x1f3)][_0x4cc576(0x328)]===_0x4cc576(0x314)?_0x4cc576(0x189):'user_id'}});_0x32bd4c[_0x4cc576(0x2be)]=[{'name':'My\x20Service','description':_0x4cc576(0x37f),'trigger_event':_0x4cc576(0x2b4),'sections':[{'name':'Default','criteria':_0x4cc576(0x21d),'attributes':[_0x4cc576(0x334)]}]}];const _0x1b7a51=serializeDef(_0x32bd4c);return writeFileSync(_0x58b8c3,_0x1b7a51,_0x4cc576(0x2aa)),console[_0x4cc576(0x1fc)](a31_0x2e332c[_0x4cc576(0x29c)]('✔')+_0x4cc576(0x1f1)+a31_0x2e332c['cyan'](_0x58b8c3)),(!_0x32bd4c[_0x4cc576(0x1f6)]||_0x389ff5[_0x4cc576(0x16c)](_0x4cc576(0x36f))===-0x1)&&console[_0x4cc576(0x1fc)](a31_0x2e332c['green']('✔')+_0x4cc576(0x179)),console[_0x4cc576(0x1fc)]('\x0a'+a31_0x2e332c[_0x4cc576(0x231)]('Next\x20steps:')),console[_0x4cc576(0x1fc)](_0x4cc576(0x160)+_0x58b8c3+_0x4cc576(0x373)),console[_0x4cc576(0x1fc)](_0x4cc576(0x292)+a31_0x2e332c[_0x4cc576(0x231)]('tdx\x20ps\x20push\x20'+_0x1774f6)+_0x4cc576(0x2ef)),0x0;}}
|