@treasuredata/tdx 2026.6.4 → 2026.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.d.ts.map +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/command.js.map +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.d.ts.map +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/databases.js.map +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-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.d.ts +26 -0
- package/dist/commands/segment-move-command.d.ts.map +1 -0
- package/dist/commands/segment-move-command.js +1 -0
- package/dist/commands/segment-move-command.js.map +1 -0
- 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.d.ts +9 -0
- package/dist/commands/segments.d.ts.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.d.ts.map +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/command-output.js.map +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.d.ts +18 -0
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +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.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts +6 -2
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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/push-workflow.js.map +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.d.ts.map +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js.map +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.d.ts +2 -5
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.d.ts +83 -2
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/cdp.d.ts +36 -0
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.d.ts +35 -0
- package/dist/sdk/util/tree-search.d.ts.map +1 -0
- package/dist/sdk/util/tree-search.js +1 -0
- package/dist/sdk/util/tree-search.js.map +1 -0
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/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.d.ts +6 -0
- package/dist/utils/process.d.ts.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/process.js.map +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_0x1cf65c=a31_0x31f0;(function(_0x4fa8ec,_0x4ccc01){const _0x2237d2=a31_0x31f0,_0x20a204=_0x4fa8ec();while(!![]){try{const _0x3881d3=parseInt(_0x2237d2(0x12f))/0x1*(parseInt(_0x2237d2(0x16b))/0x2)+parseInt(_0x2237d2(0x2a0))/0x3+parseInt(_0x2237d2(0x2da))/0x4*(-parseInt(_0x2237d2(0x2b1))/0x5)+parseInt(_0x2237d2(0x274))/0x6+parseInt(_0x2237d2(0x118))/0x7*(-parseInt(_0x2237d2(0x185))/0x8)+-parseInt(_0x2237d2(0x1c3))/0x9+parseInt(_0x2237d2(0x1a7))/0xa;if(_0x3881d3===_0x4ccc01)break;else _0x20a204['push'](_0x20a204['shift']());}catch(_0x579caa){_0x20a204['push'](_0x20a204['shift']());}}}(a31_0x321a,0xbe52f));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x51cf72 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_0x2d8ea2 from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';function a31_0x321a(){const _0x5e5925=['Error:\x20Parent\x20segment\x20name\x20is\x20required','Validate:','type','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','getParentSQL','verbose','scheduleOption','sourceTableValid','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Source:','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Create\x20parent\x20segment\x20\x27','\x22,\x20\x22type\x22:\x20\x22','Aborted.','enriched','\x0aNew\x20parent\x20segment\x20\x27','cyan','FINISHED','platform','Error:\x20Personalization\x20ID\x20is\x20required','👥\x20','\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','getBehaviorNames','ps:pz:service:list','bold','{\x0a\x20\x20\x22database\x22:\x20\x22','ps:rt:list','stageCount','Validating\x20RT\x20configuration...','keyEventId','SQL\x20query:\x0a','displayMasterInfo','\x0aChanges\x20to\x20\x27','Pause\x20activations\x20in\x20an\x20RT\x20journey','displaySampleData','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','\x20--behavior\x20\x22<name>\x22','yellow','Error:\x20--name\x20is\x20required','\x0aError:','285892dksRlH','RT\x20Journey\x20ID:\x20','create','processedRows','RT\x202.0\x20Validate:','keyEventId:','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','Updating\x20parent\x20segment\x20\x27','listParents','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Output\x20file:\x20','public','displayPreviewResults','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','createdAt','✔\x20Created\x20token\x20\x27','Executing\x20parent\x20segment\x20query...','Creating\x20parent\x20segment\x20\x27','attribute','Error:\x20File\x20not\x20found:\x20','behaviors','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Attribute:','Error\x20reading\x20file:\x20','displayValidateResults','72hjrXYE','Error:\x20--database\x20and\x20--table\x20are\x20required','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','validateParentYaml','No\x20personalization\x20services\x20configured','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','\x20No\x20changes\x20-\x20','\x20\x20Tables:\x201\x20customers\x20+\x20','\x20--behavior\x20\x22','workflowAttemptId','pushParentYaml','RT\x202.0:','\x20\x20\x20\x20','toLocaleString','Status:','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','displayPreviewHints','\x20configured','token:','\x20parent\x20segment','pullParentYaml','\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\x20show\x20<service_id>\x20[parent_segment]','match','displayColumns','Listing\x20RT\x20journeys\x20for\x20\x27','realtime:','\x0a\x20\x20]\x0a}\x0a','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Updating','Site:\x20','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','\x27\x20is\x20up\x20to\x20date','column','11526200luuijd','length','segment:parent:desc','file','/\x20directories\x20exist.','Behavior:','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','displayRealtimeInfo','customerGroup','filter','Session:','\x20RT\x20journey','dim','segment:parent:view','No\x20RT-enabled\x20parent\x20segments\x20found','customersWithEvents','valid','payload','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','join','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x20rows)','\x20Context\x20set:\x20','toFixed','patch','timezone','audienceId:\x20','10861245PIELKD','\x20parent\x20segment\x20\x27','patchPersonalization','paused','\x5c$&','stop','double','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','sort','✔\x20Query\x20completed:\x20Processed\x20','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','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','Schema\x20saved\x20to\x20','replace','localeCompare','getParentFull','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','description','deleteToken','\x20tdx\x20wf\x20attempt\x20','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x20Configuration\x20is\x20valid','\x20personalization\x20service','ps:rt:validate','\x0a⚠️\x20\x20Migrating:\x20','idStitching','displaySummary','Available\x20behaviors:','Columns:','label','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Parent\x20segment:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Error:','No\x20personalizations\x20configured','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x20\x20No\x20sample\x20data\x20available','ps:pz:service:token:delete','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','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','use','red','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','sourceTableError','SELECT\x20*\x20FROM\x20(\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','stitchingKeys','Error:\x20Service\x20ID\x20is\x20required','\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','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','displayBehaviorsStats','My\x20Service','name','Creating\x20personalization\x20\x27','Validating\x20configuration...','parent_id','Fetching\x20customers\x20schema...','status','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Next\x20steps:','Deleting\x20token\x20\x27','\x20personalization','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','\x20--attribute\x20\x22','Created','setJobId','any','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','entryCriteria:','✔\x20No\x20changes\x20-\x20\x27','\x20rows\x20','\x20\x20\x20\x20\x20\x20\x20\x20','data','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x0a\x20\x20\x20\x20]','\x20--interval\x20','Listing\x20personalizations\x20for\x20\x27','Options:\x0a','behaviorsFile','all','ignore','Analyzing\x20changes...','personalization_services','keys','✔\x20Updated\x20personalization\x20\x27','✔\x20Deleted\x20personalization\x20service\x20\x27','start','List\x20available\x20fields\x20for\x20segmentation','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','ps:pz:patch','addAttributes','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Customers:','ps:pz:service:token:create','launched','.yaml','Options:','master','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','To\x20cancel:','customerGroupFile','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','population','identifier','site','value','tokens','coveragePercent','get','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','SELECT\x20*\x20FROM\x20','jsonl','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','\x20=\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','\x27\x20(id:\x20','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','⚡\x20Not\x20enabled','List\x20RT\x20journeys','entryCriteria','execute','\x20true','Creating\x20personalization\x20service\x20\x27','✔\x20Created\x20parent\x20segment\x20\x27','Listing\x20RT-enabled\x20parent\x20segments...','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','\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','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','columns','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','pauseJourney','Master:','message','audienceId:','\x20[Job\x20ID:\x20','ps:rt:jn:resume','column_type','Rows:','Found\x20YAML\x20file:\x20','Options\x20(one\x20required):\x0a','\x20\x202.\x20Run\x20','\x20+\x20[','parent_segments','\x27\x20and\x20run\x20workflow?','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','query','log','Errors:','allowedIps','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x20--attribute\x20\x22<name>\x22','Fetching\x20current\x20configuration\x20for\x20\x27','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','yes','Events:','Fetching\x20behavior\x20list...','\x20(paused)','dirname','/\x20→\x20','\x20behaviors','\x20service(s)\x20configured','no\x20tokens\x20configured','personalization','\x20\x20\x20','\x27\x20with\x20ID:\x20','498252dYYPch','created:','/sessions/','user_id','\x0aNo\x20sample\x20data\x20available','schemaError','Fetching\x20SQL\x20for\x20\x27','Listing\x20personalization\x20services\x20for\x20\x27','workflowSessionId','Output\x20Database:','map','repeat','ps:rt:jn:list','Master\x20+\x20Attributes','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','eventKind:\x20','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','limit','segment:parent:push','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\x20RT-enabled\x20parent\x20segment','\x27...','\x20\x20Database:\x20','Error:\x20Token\x20name\x20is\x20required','✔\x20Deleted\x20personalization\x20\x27','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Behaviors','ps:pz:service:create','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','some','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','text','endsWith','/app/workflows/','Preview:','realtime','string','open','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','✔\x20Found\x20','displayAttributesStats','\x0aChanges\x20to\x20apply\x20to\x20\x27','(id:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','3932328tGzuSa','payload:','table','Error:\x20Token\x20ID\x20is\x20required','YAML\x20file:\x20','behavior_','No\x20parent\x20segments\x20found','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','✔\x20Renamed\x20directory\x20to\x20','\x20kill','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','rowCount','personalizationServices','segment:parent:preview','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','245515yhTWId','customers','segment:parent:update','formatSchemaJson','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','\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}','\x0a\x20\x20\x20\x20}','delete','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','\x20service','✔\x20Updated\x20personalization\x20service\x20\x27','preview','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','realtime_enabled','updated:','-1d','foreignKey','Getting\x20personalization\x20\x27','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','listFields','format','page_view','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','runParent','sampleData','tdx\x20ps\x20preview\x20','state','%)\x20','\x27\x20is\x20already\x20up\x20to\x20date','Patching\x20personalization\x20\x27','\x20total','\x0a✔\x20Workflow\x20started','stringify','toLowerCase','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','json','folderId','Fetching\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','resolveParentId','totalEvents','20faYkFu','information_schema','deletePersonalization','parent_segment','apply','scheduleType','matchedCount','\x20\x20Columns:\x20','ps:rt:configuration_versions','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','utf-8','stats','schemaValid','createParent','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','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','addBehaviors','behavior','last_page_viewed','joinKey','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','null','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','ps:pz:init','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','relationships','ps:pz:service:delete','folder-segment','Show\x20parent\x20segment\x20details','.customers)','\x20\x20\x20\x20\x20\x20','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','green','allowed\x20IPs:','Error:\x20--attribute\x20requires\x20a\x20name\x0a','ps:pz:service:update','Fetching\x20personalization\x20service\x20\x27','customerPercent','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','✔\x20Retrieved\x20RT\x20configuration\x20version','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','test','sections:','Updated','Finding\x20service\x20for\x20token...','interval','Show\x20a\x20specific\x20realtime\x20personalization','darwin','error','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Get\x20current\x20RT\x20configuration\x20version\x20status','\x20to\x20configure\x20your\x20personalization\x20service','list','Creating','includeSensitive','segment','previewParentYaml','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','attributes','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Database:\x20','✔\x20Updated\x20parent\x20segment\x20\x27','⚡\x20Enabled','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','xdg-open','Resume\x20activations\x20in\x20an\x20RT\x20journey','Personalization:','Name:\x20','/app/dw/parentSegments/','column_name','trim','jobId','.yml','355831TjEcAs','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','createToken','✔\x20Deleted\x20token\x20\x27','public:','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','listPersonalizations','database','List\x20parent\x20segments','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','ps:pz:create','output','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','\x20\x20\x20\x20-\x20','Resolving\x20parent\x20segment\x20\x27','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','parentSegment','in\x20','\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','tdx\x20ps\x20push\x20','Join\x20on:','\x20\x20Note:\x20','\x22\x20}','1mFzMUJ','parentFolder','Default','errors','segment:parent:run','updateParent','allValid','keyEventCriteria','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','enabled','sections','\x0a⚠️\x20\x20Both\x20','Overwrite\x20\x27','\x0aUsage:\x20tdx\x20ps\x20preview\x20','run','audienceId','Updating\x20personalization\x20service\x20\x27','events','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','/attempt/'];a31_0x321a=function(){return _0x5e5925;};return a31_0x321a();}import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x1cf65c(0x259),LEGACY_PARENT_SEGMENT_DIR=a31_0x1cf65c(0x2dd);function openBrowser(_0x4e0fbf){const _0x4de9b4=a31_0x1cf65c,_0x2baa0f=process[_0x4de9b4(0x155)],_0x40c342=_0x2baa0f===_0x4de9b4(0xfe)?_0x4de9b4(0x299):_0x2baa0f==='win32'?_0x4de9b4(0x21d):_0x4de9b4(0x10f);spawn(_0x40c342,[_0x4e0fbf],{'detached':!![],'stdio':_0x4de9b4(0x217)})['unref']();}function migrateLegacyDirectory(){const _0x48cd87=a31_0x1cf65c;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x18e2e4=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x18e2e4['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x48cd87(0xff)](a31_0x2d8ea2[_0x48cd87(0x168)](_0x48cd87(0x13a)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+_0x48cd87(0x1ab))),console[_0x48cd87(0xff)](a31_0x2d8ea2[_0x48cd87(0x1b3)](_0x48cd87(0x2a7)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x48cd87(0xff)](a31_0x2d8ea2[_0x48cd87(0x168)](_0x48cd87(0x1dd)+LEGACY_PARENT_SEGMENT_DIR+_0x48cd87(0x26d)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x48cd87(0xff)](a31_0x2d8ea2[_0x48cd87(0xee)](_0x48cd87(0x2a8)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x138d0b){const _0x40f274=_0x138d0b instanceof Error?_0x138d0b['message']:String(_0x138d0b);return console[_0x48cd87(0xff)](a31_0x2d8ea2['red']('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x40f274+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0xb2e275){const _0x5d502d=a31_0x1cf65c;return migrateLegacyDirectory(),super[_0x5d502d(0x13d)](_0xb2e275);}}function resolveYamlFile(_0x503543){const _0x384aa9=a31_0x1cf65c;if(_0x503543[_0x384aa9(0x294)](_0x384aa9(0x117))||_0x503543[_0x384aa9(0x294)](_0x384aa9(0x226)))return _0x503543;return a31_0x51cf72[_0x384aa9(0x1ba)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x503543)+_0x384aa9(0x117));}function formatProgressMessage(_0x291630){const _0x422073=a31_0x1cf65c,_0x2471a9=_0x291630[_0x422073(0x19c)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2471a9){const [,_0x999c88,_0x33e88a,_0x13f917='']=_0x2471a9;return a31_0x2d8ea2['dim'](_0x999c88+':')+'\x20'+_0x33e88a+a31_0x2d8ea2[_0x422073(0x1b3)](_0x13f917);}return a31_0x2d8ea2[_0x422073(0x1b3)](_0x291630);}function showFileNotFoundError(_0x41c5ea,_0x1f0d41){const _0x26f9ce=a31_0x1cf65c;console[_0x26f9ce(0xff)](a31_0x2d8ea2[_0x26f9ce(0x1f0)](_0x26f9ce(0x17f)+_0x41c5ea+'\x0a')),console[_0x26f9ce(0xff)](a31_0x2d8ea2[_0x26f9ce(0x153)](_0x26f9ce(0x1a1)+_0x1f0d41+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x5be94e){const _0x57c864=a31_0x1cf65c;if(!_0x5be94e[_0x57c864(0x297)])return;const _0x5eaaee=_0x5be94e['realtime'],_0x2afd0c=_0x5eaaee[_0x57c864(0x138)]?a31_0x2d8ea2['green'](_0x57c864(0x10d)):a31_0x2d8ea2[_0x57c864(0x168)](_0x57c864(0x23f));console['error']('\x0a'+a31_0x2d8ea2['dim'](_0x57c864(0x190))+'\x20'+_0x2afd0c);if(_0x5eaaee[_0x57c864(0x140)]&&_0x5eaaee[_0x57c864(0x140)][_0x57c864(0x1a8)]>0x0){console['error']('\x20\x20'+a31_0x2d8ea2[_0x57c864(0x1b3)]('Events:')+'\x20'+_0x5eaaee[_0x57c864(0x140)]['length']+_0x57c864(0x196));for(const _0x1261b6 of _0x5eaaee[_0x57c864(0x140)]){const _0x1bfe45=_0x1261b6[_0x57c864(0x14a)]===![]?a31_0x2d8ea2[_0x57c864(0x1f0)]('✘'):a31_0x2d8ea2[_0x57c864(0xee)]('✔');console[_0x57c864(0xff)](_0x57c864(0x191)+_0x1bfe45+'\x20'+_0x1261b6['name']),_0x1261b6['sourceTableError']&&console[_0x57c864(0xff)](_0x57c864(0xec)+a31_0x2d8ea2[_0x57c864(0x1f0)](_0x1261b6[_0x57c864(0x1f2)]));}}if(_0x5eaaee[_0x57c864(0x109)]&&_0x5eaaee[_0x57c864(0x109)][_0x57c864(0x1a8)]>0x0){console[_0x57c864(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x57c864(0x1b3)]('Attributes:')+'\x20'+_0x5eaaee[_0x57c864(0x109)][_0x57c864(0x1a8)]+'\x20configured');for(const _0x38b022 of _0x5eaaee[_0x57c864(0x109)]){const _0x2f7373=_0x38b022[_0x57c864(0x1b7)]?a31_0x2d8ea2[_0x57c864(0xee)]('✔'):a31_0x2d8ea2[_0x57c864(0x1f0)]('✘');console[_0x57c864(0xff)]('\x20\x20\x20\x20'+_0x2f7373+'\x20'+_0x38b022['name']+'\x20'+a31_0x2d8ea2[_0x57c864(0x1b3)]('('+_0x38b022[_0x57c864(0x145)]+')'));}}if(_0x5eaaee[_0x57c864(0x1de)]){const _0x5b4760=_0x5eaaee['idStitching'][_0x57c864(0x1f5)]?.[_0x57c864(0x1a8)]?_0x57c864(0x258)+_0x5eaaee['idStitching']['stitchingKeys']['join'](',\x20')+']':'';console[_0x57c864(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x57c864(0x1b3)]('ID\x20Stitching:')+'\x20'+_0x5eaaee[_0x57c864(0x1de)]['primaryKey']+_0x5b4760);}if(_0x5eaaee[_0x57c864(0x2ad)]&&_0x5eaaee['personalizationServices'][_0x57c864(0x1a8)]>0x0){console[_0x57c864(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x57c864(0x1b3)](_0x57c864(0x111))+'\x20'+_0x5eaaee[_0x57c864(0x2ad)][_0x57c864(0x1a8)]+_0x57c864(0x2ba)+(_0x5eaaee[_0x57c864(0x2ad)]['length']!==0x1?'s':''));for(const _0x1028f3 of _0x5eaaee[_0x57c864(0x2ad)]){console[_0x57c864(0xff)](_0x57c864(0x125)+_0x1028f3[_0x57c864(0x1fb)]);}}}function showParentSegmentNotSetError(_0x533df6){const _0x22120f=a31_0x1cf65c;console[_0x22120f(0xff)](a31_0x2d8ea2[_0x22120f(0x168)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x22120f(0xff)](_0x533df6);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='segment:parent:list';['description']=a31_0x1cf65c(0x120);async[a31_0x1cf65c(0x242)](_0x4eeb43){const _0x51f26a=a31_0x1cf65c,{options:_0x2dbe40,args:_0x543b2f,tdx:_0x5e1599}=_0x4eeb43,_0x3d8c9a=_0x543b2f[0x0];_0x2dbe40[_0x51f26a(0x148)]&&(console['error'](_0x51f26a(0x1a3)+_0x2dbe40[_0x51f26a(0x22f)]),_0x3d8c9a&&console[_0x51f26a(0xff)]('Pattern:\x20'+_0x3d8c9a));const _0x43cb2f=await withSpinner(_0x3d8c9a?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x3d8c9a+'\x27...':'Listing\x20parent\x20segments...',()=>_0x5e1599[_0x51f26a(0x106)][_0x51f26a(0x174)](),{'verbose':_0x2dbe40[_0x51f26a(0x148)]});let _0x42f021=_0x43cb2f[_0x51f26a(0x20f)];if(_0x3d8c9a){const _0x14dcf9=_0x3d8c9a[_0x51f26a(0x1d1)](/[.+^${}()|[\]\\]/g,_0x51f26a(0x1c7))[_0x51f26a(0x1d1)](/\*/g,'.*')[_0x51f26a(0x1d1)](/\?/g,'.'),_0x587fcf=new RegExp('^'+_0x14dcf9+'$','i');_0x42f021=_0x42f021[_0x51f26a(0x1b0)](_0x12401a=>_0x587fcf[_0x51f26a(0xf8)](_0x12401a[_0x51f26a(0x109)][_0x51f26a(0x1fb)]));}_0x42f021[_0x51f26a(0x1cc)]((_0x269d9f,_0xd748c1)=>_0x269d9f['attributes'][_0x51f26a(0x1fb)][_0x51f26a(0x1d2)](_0xd748c1[_0x51f26a(0x109)][_0x51f26a(0x1fb)])),console[_0x51f26a(0xff)](_0x51f26a(0x29b)+_0x42f021['length']+_0x51f26a(0x198)+(_0x42f021['length']!==0x1?'s':''));const _0x260c6f=_0x3f0c0b=>{const _0x275d38=_0x51f26a;return getConsoleNextUrl(_0x2dbe40[_0x275d38(0x22f)],_0x275d38(0x113)+_0x3f0c0b);};if(_0x2dbe40[_0x51f26a(0x2c5)]===_0x51f26a(0x2d4)||_0x2dbe40[_0x51f26a(0x2c5)]==='jsonl'){const _0x455a95=_0x42f021['map'](_0x219bf7=>({..._0x219bf7,'url':_0x260c6f(_0x219bf7['id'])}));await handleSDKOutput(_0x455a95,_0x2dbe40);}else{if(_0x42f021['length']===0x0)_0x3d8c9a?console[_0x51f26a(0x25e)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x3d8c9a):console['log'](_0x51f26a(0x2a6));else for(const _0x495fa1 of _0x42f021){const _0x559221=_0x495fa1[_0x51f26a(0x109)][_0x51f26a(0x22d)]?a31_0x2d8ea2[_0x51f26a(0x1b3)]('\x20('+formatRows(_0x495fa1[_0x51f26a(0x109)][_0x51f26a(0x22d)])+')'):'',_0x51c11a=hyperlink(_0x495fa1['attributes'][_0x51f26a(0x1fb)],_0x260c6f(_0x495fa1['id']));console[_0x51f26a(0x25e)](_0x51f26a(0x157)+_0x51c11a+_0x559221);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='segment:parent:create';[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x1d5);async[a31_0x1cf65c(0x242)](_0x2e4aff){const _0x494dea=a31_0x1cf65c,{options:_0x5a81f2,args:_0x5c40f1,tdx:_0x486f63}=_0x2e4aff;console[_0x494dea(0xff)](_0x494dea(0x18a)+_0x494dea(0x171)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x2e955a=_0x5a81f2;if(_0x5c40f1[_0x494dea(0x1a8)]===0x0)return console[_0x494dea(0xff)](a31_0x2d8ea2['red'](_0x494dea(0x143))),console['error'](_0x494dea(0x121)),0x1;const _0x3f0059=_0x5c40f1[0x0];if(!_0x2e955a['database']||!_0x2e955a['table'])return console['error'](_0x494dea(0x186)),console[_0x494dea(0xff)](_0x494dea(0x121)),0x1;_0x2e955a['verbose']&&(console[_0x494dea(0xff)]('Site:\x20'+_0x2e955a['site']),console['error'](_0x494dea(0x112)+_0x3f0059),console[_0x494dea(0xff)](_0x494dea(0x10b)+_0x2e955a['database']),console[_0x494dea(0xff)]('Table:\x20'+_0x2e955a[_0x494dea(0x2a2)]));const _0x18a26f=await loadJSONFromOptions(_0x2e955a[_0x494dea(0x109)],_0x2e955a['attributesFile']),_0x76ec83=await loadJSONFromOptions(_0x2e955a[_0x494dea(0x180)],_0x2e955a[_0x494dea(0x215)]),_0xd0dd60=await loadJSONFromOptions(_0x2e955a[_0x494dea(0x1af)],_0x2e955a[_0x494dea(0x22b)]),_0x523e12={'name':_0x3f0059,'description':_0x2e955a['description'],'scheduleType':_0x2e955a[_0x494dea(0x2df)],'scheduleOption':_0x2e955a[_0x494dea(0x149)],'timezone':_0x2e955a[_0x494dea(0x1c1)],'master':{'parentDatabaseName':_0x2e955a['database'],'parentTableName':_0x2e955a[_0x494dea(0x2a2)]},'attributes':_0x18a26f,'behaviors':_0x76ec83,'customerGroup':_0xd0dd60},_0x712b73=await withSpinner(_0x494dea(0x17d)+_0x3f0059+'\x27...',()=>_0x486f63['segment'][_0x494dea(0xda)](_0x523e12),{'verbose':_0x5a81f2['verbose']}),_0x33e219=_0x712b73[_0x494dea(0x20f)];return console[_0x494dea(0xff)](_0x494dea(0x245)+_0x33e219[_0x494dea(0x1fb)]+'\x27\x20with\x20ID:\x20'+_0x33e219['id']),await handleSDKOutput([_0x33e219],_0x5a81f2),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x2b3);['description']=a31_0x1cf65c(0x1ce);async[a31_0x1cf65c(0x242)](_0x483675){const _0x543f1d=a31_0x1cf65c,{options:_0x442f9d,args:_0x2fd50f,tdx:_0x5b8519}=_0x483675;console['error'](_0x543f1d(0xf4)+_0x543f1d(0x171)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x2989f3=_0x442f9d;if(_0x2fd50f[_0x543f1d(0x1a8)]===0x0)return console[_0x543f1d(0xff)](a31_0x2d8ea2[_0x543f1d(0x1f0)](_0x543f1d(0x143))),console[_0x543f1d(0xff)]('Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'),0x1;const _0x174ecc=_0x2fd50f[0x0];_0x2989f3[_0x543f1d(0x148)]&&(console[_0x543f1d(0xff)](_0x543f1d(0x1a3)+_0x2989f3['site']),console[_0x543f1d(0xff)](_0x543f1d(0x1e5)+_0x174ecc));const _0x397476=await withSpinner(_0x543f1d(0x265)+_0x174ecc+_0x543f1d(0x289),()=>_0x5b8519['segment'][_0x543f1d(0x1d3)](_0x174ecc),{'verbose':_0x2989f3[_0x543f1d(0x148)]}),_0xcf0b55=_0x397476[_0x543f1d(0x20f)],_0x25c161=await loadJSONFromOptions(_0x2989f3[_0x543f1d(0x221)],_0x2989f3['addAttributesFile']),_0x38184a=await loadJSONFromOptions(_0x2989f3[_0x543f1d(0xdd)],_0x2989f3['addBehaviorsFile']),_0x4f0f11={'name':_0xcf0b55[_0x543f1d(0x1fb)],'description':_0x2989f3[_0x543f1d(0x1d6)]!==undefined?_0x2989f3[_0x543f1d(0x1d6)]:_0xcf0b55['description'],'scheduleType':_0x2989f3['scheduleType']!==undefined?_0x2989f3[_0x543f1d(0x2df)]:_0xcf0b55['scheduleType'],'scheduleOption':_0x2989f3[_0x543f1d(0x149)]!==undefined?_0x2989f3[_0x543f1d(0x149)]:_0xcf0b55[_0x543f1d(0x149)],'timezone':_0x2989f3[_0x543f1d(0x1c1)]!==undefined?_0x2989f3['timezone']:_0xcf0b55[_0x543f1d(0x1c1)],'master':_0xcf0b55[_0x543f1d(0x228)],'attributes':_0x25c161?[..._0xcf0b55['attributes']||[],..._0x25c161]:_0xcf0b55[_0x543f1d(0x109)],'behaviors':_0x38184a?[..._0xcf0b55[_0x543f1d(0x180)]||[],..._0x38184a]:_0xcf0b55[_0x543f1d(0x180)],'customerGroup':_0xcf0b55['customerGroup']},_0x4f2d76=await withSpinner(_0x543f1d(0x173)+_0x174ecc+'\x27...',()=>_0x5b8519[_0x543f1d(0x106)][_0x543f1d(0x134)](_0x174ecc,_0x4f0f11),{'verbose':_0x2989f3['verbose']}),_0x17dc70=_0x4f2d76[_0x543f1d(0x20f)];return console[_0x543f1d(0xff)](_0x543f1d(0x10c)+_0x17dc70[_0x543f1d(0x1fb)]+'\x27'),await handleSDKOutput([_0x17dc70],_0x2989f3),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0xe5);async[a31_0x1cf65c(0x242)](_0xc7ffa2){const _0x34ac3f=a31_0x1cf65c,{options:_0x14ac14,args:_0x55ff0e,tdx:_0x240598}=_0xc7ffa2,_0xce9349=_0x14ac14,_0x16463d=_0x55ff0e[0x0]||_0x14ac14[_0x34ac3f(0x128)];if(!_0x16463d)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(_0xce9349[_0x34ac3f(0x1ef)]&&_0xce9349[_0x34ac3f(0x123)])return console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0x1f0)](_0x34ac3f(0x262))),console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0x1b3)](_0x34ac3f(0xdb))),console['error'](a31_0x2d8ea2[_0x34ac3f(0x1b3)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0x153)](_0x34ac3f(0x21f))),0x1;const _0x2278e3=_0xce9349['output']||a31_0x51cf72[_0x34ac3f(0x1ba)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x16463d)+'.yml');_0xce9349[_0x34ac3f(0x148)]&&(console[_0x34ac3f(0xff)](_0x34ac3f(0x1a3)+_0xce9349['site']),console[_0x34ac3f(0xff)](_0x34ac3f(0x1e5)+_0x16463d),console[_0x34ac3f(0xff)](_0x34ac3f(0x176)+_0x2278e3));const _0x455346=await withSpinner(_0x34ac3f(0x2d6)+_0x16463d+'\x27...',()=>_0x240598[_0x34ac3f(0x106)][_0x34ac3f(0x199)](_0x16463d),{'verbose':_0xce9349['verbose']}),_0x43cf23=_0x455346[_0x34ac3f(0x20f)];if(existsSync(_0x2278e3)){const _0x4f9795=readFileSync(_0x2278e3,'utf-8'),_0x41b785=generateDiff(_0x4f9795,_0x43cf23);if(!hasChanges(_0x41b785))console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0xee)]('✔')+_0x34ac3f(0x18b)+a31_0x2d8ea2[_0x34ac3f(0x153)](_0x2278e3)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x34ac3f(0xff)](_0x34ac3f(0x163)+_0x2278e3+'\x27:'),console[_0x34ac3f(0xff)]('─'[_0x34ac3f(0x27f)](0x3c)),console[_0x34ac3f(0xff)](formatDiffWithColors(_0x41b785)),console[_0x34ac3f(0xff)]('─'[_0x34ac3f(0x27f)](0x3c));if(!_0xce9349[_0x34ac3f(0x268)]){if(!isInteractive())return console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0x1f0)](_0x34ac3f(0x16a)),_0x34ac3f(0x108)),console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0x1b3)](_0x34ac3f(0x1e6))),0x1;const _0x37cc35=await confirmKey(_0x34ac3f(0x13b)+_0x2278e3+'\x27?');if(!_0x37cc35)return console['error'](a31_0x2d8ea2['yellow']('Aborted.')),0x1;}writeFileSync(_0x2278e3,_0x43cf23,_0x34ac3f(0xd7)),console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0xee)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x2d8ea2[_0x34ac3f(0x153)](_0x2278e3));}}else{const _0x1b2c3e=a31_0x51cf72[_0x34ac3f(0x26c)](_0x2278e3);!existsSync(_0x1b2c3e)&&mkdirSync(_0x1b2c3e,{'recursive':!![]}),writeFileSync(_0x2278e3,_0x43cf23,_0x34ac3f(0xd7)),console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0xee)]('✔')+_0x34ac3f(0x1ee)+a31_0x2d8ea2['cyan'](_0x2278e3));}return saveSessionContext({'parent_segment':_0x16463d},_0xce9349['session']),console[_0x34ac3f(0xff)](a31_0x2d8ea2[_0x34ac3f(0xee)]('✔')+_0x34ac3f(0x1be)+a31_0x2d8ea2[_0x34ac3f(0x1b3)](_0x34ac3f(0x2dd))+'\x20=\x20'+a31_0x2d8ea2[_0x34ac3f(0x153)](_0x16463d)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x286);[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x1ca);async[a31_0x1cf65c(0x242)](_0x5932e6){const _0x52c6a2=a31_0x1cf65c,{options:_0x30fc86,args:_0x4763ab,tdx:_0x1d789c}=_0x5932e6,_0x4c4fea=_0x30fc86,_0x6d1cee=_0x4763ab[0x0]||_0x30fc86['parentSegment'];if(!_0x6d1cee)return showParentSegmentNotSetError(_0x52c6a2(0x141)+_0x52c6a2(0x1bb)),0x1;const _0x5b7233=resolveYamlFile(_0x6d1cee);if(!existsSync(_0x5b7233))return showFileNotFoundError(_0x5b7233,_0x6d1cee),0x1;_0x4c4fea[_0x52c6a2(0x148)]&&(console['error'](_0x52c6a2(0x1a3)+_0x4c4fea['site']),console[_0x52c6a2(0xff)](_0x52c6a2(0x2a4)+_0x5b7233));let _0x3884d3;try{_0x3884d3=readFileSync(_0x5b7233,_0x52c6a2(0xd7));}catch(_0x3dee15){const _0x143a07=_0x3dee15 instanceof Error?_0x3dee15['message']:String(_0x3dee15);return console[_0x52c6a2(0xff)]('Error\x20reading\x20file:\x20'+_0x143a07),0x1;}const _0x42fb7e=await withSpinner('Analyzing\x20changes...',()=>_0x1d789c[_0x52c6a2(0x106)]['pushParentYaml'](_0x3884d3),{'verbose':_0x4c4fea[_0x52c6a2(0x148)]}),_0x445812=_0x42fb7e[_0x52c6a2(0x20f)],{isNew:_0x2e5f13,name:_0x2231e2,hasChanges:_0x161e31,diffFormatted:_0xd603c5}=_0x445812;if(!_0x161e31)return console[_0x52c6a2(0xff)](_0x52c6a2(0x20c)+_0x2231e2+_0x52c6a2(0x2cd)),0x0;_0x2e5f13?console[_0x52c6a2(0xff)](_0x52c6a2(0x152)+_0x2231e2+'\x27:'):console[_0x52c6a2(0xff)](_0x52c6a2(0x29d)+_0x2231e2+'\x27:');console[_0x52c6a2(0xff)]('─'[_0x52c6a2(0x27f)](0x3c)),console[_0x52c6a2(0xff)](_0xd603c5),console[_0x52c6a2(0xff)]('─'[_0x52c6a2(0x27f)](0x3c));const _0x346d77=_0x2e5f13?_0x52c6a2(0x14e)+_0x2231e2+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x2231e2+'\x27?';if(!_0x4c4fea[_0x52c6a2(0x268)]){if(!isInteractive())return console['error'](a31_0x2d8ea2[_0x52c6a2(0x1f0)](_0x52c6a2(0x16a)),_0x52c6a2(0x108)),console[_0x52c6a2(0xff)](a31_0x2d8ea2[_0x52c6a2(0x1b3)](_0x52c6a2(0x1e6))),0x1;const _0x153961=await confirmKey(_0x346d77);if(!_0x153961)return console[_0x52c6a2(0xff)](a31_0x2d8ea2['yellow']('Aborted.')),0x1;}const _0x5ec5fa=_0x2e5f13?_0x52c6a2(0x104):_0x52c6a2(0x1a2),_0x5bcb0b=await withSpinner(_0x5ec5fa+'\x20parent\x20segment\x20\x27'+_0x2231e2+'\x27...',()=>_0x445812[_0x52c6a2(0x2de)](),{'verbose':_0x4c4fea['verbose']}),_0x39511f=_0x5bcb0b[_0x52c6a2(0x20f)],_0x285744=getConsoleNextUrl(_0x4c4fea[_0x52c6a2(0x22f)],_0x52c6a2(0x113)+_0x39511f['id']),_0x56caf5=_0x2e5f13?_0x52c6a2(0x207):_0x52c6a2(0xfa);return console['error']('✔\x20'+_0x56caf5+_0x52c6a2(0x1c4)+_0x39511f[_0x52c6a2(0x1fb)]+'\x27'),console[_0x52c6a2(0xff)]('\x20\x20'+_0x285744),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']='segment:parent:validate';[a31_0x1cf65c(0x1d6)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a31_0x1cf65c(0x242)](_0x140883){const _0x5d6f85=a31_0x1cf65c,{options:_0x114df9,args:_0x2b9e9,tdx:_0x2d1219}=_0x140883,_0x35c593=_0x114df9,_0x3a4095=_0x2b9e9[0x0]||_0x114df9[_0x5d6f85(0x128)];if(!_0x3a4095)return showParentSegmentNotSetError(_0x5d6f85(0x166)+_0x5d6f85(0x1b9)+_0x5d6f85(0x214)+_0x5d6f85(0x137)+_0x5d6f85(0x234)+_0x5d6f85(0x1e4)),0x1;const _0x1865e4=resolveYamlFile(_0x3a4095);if(!existsSync(_0x1865e4))return showFileNotFoundError(_0x1865e4,_0x3a4095),0x1;_0x35c593[_0x5d6f85(0x148)]&&(console[_0x5d6f85(0xff)](_0x5d6f85(0x1a3)+_0x35c593[_0x5d6f85(0x22f)]),console[_0x5d6f85(0xff)](_0x5d6f85(0x2a4)+_0x1865e4));let _0x20b6ec;try{_0x20b6ec=readFileSync(_0x1865e4,_0x5d6f85(0xd7));}catch(_0x6421df){const _0x43e717=_0x6421df instanceof Error?_0x6421df['message']:String(_0x6421df);return console['error'](_0x5d6f85(0x183)+_0x43e717),0x1;}const _0xff7cf1=createCommandSpinner(a31_0x2d8ea2[_0x5d6f85(0x1b3)](_0x5d6f85(0x1fd)),{'verbose':_0x35c593[_0x5d6f85(0x148)]});_0xff7cf1[_0x5d6f85(0x21d)]();const _0x182ed4={'onProgress':_0x21ad6=>{_0xff7cf1['text']=formatProgressMessage(_0x21ad6);}};if(_0x35c593['master'])_0x182ed4['master']=!![];if(_0x35c593['enriched'])_0x182ed4['enriched']=!![];_0x35c593[_0x5d6f85(0x17e)]&&(_0x182ed4[_0x5d6f85(0x17e)]=_0x35c593[_0x5d6f85(0x17e)]);_0x35c593['behavior']&&(_0x182ed4[_0x5d6f85(0xde)]=_0x35c593[_0x5d6f85(0xde)]);if(_0x35c593['interval'])_0x182ed4[_0x5d6f85(0xfc)]=_0x35c593[_0x5d6f85(0xfc)];let _0x5482e1;try{_0x5482e1=await _0x2d1219[_0x5d6f85(0x106)][_0x5d6f85(0x188)](_0x20b6ec,_0x182ed4),_0xff7cf1[_0x5d6f85(0x1c8)]();}catch(_0x1ac1d4){_0xff7cf1[_0x5d6f85(0x1c8)]();throw _0x1ac1d4;}const _0x353e7f=_0x35c593[_0x5d6f85(0xfc)]||_0x5d6f85(0x2c0);return this[_0x5d6f85(0x184)](_0x5482e1,_0x182ed4,_0x1865e4,_0x353e7f),_0x5482e1['allValid']?0x0:0x1;}[a31_0x1cf65c(0x184)](_0x108b4d,_0xb03f15,_0x2e4962,_0x13564c){const _0x9be4d6=a31_0x1cf65c;console[_0x9be4d6(0xff)]('\x0a'+a31_0x2d8ea2['bold'](_0x9be4d6(0x144))+'\x20'+_0x108b4d[_0x9be4d6(0x1fb)]),console[_0x9be4d6(0xff)]('═'[_0x9be4d6(0x27f)](0x3c)),this['displayMasterInfo'](_0x108b4d);if(typeof _0xb03f15[_0x9be4d6(0x17e)]==='string'){this['displayAttributesStats'](_0x108b4d),this[_0x9be4d6(0x1df)](_0x108b4d),this[_0x9be4d6(0x195)](_0x2e4962,_0x13564c,'attribute',_0xb03f15[_0x9be4d6(0x17e)]);return;}if(_0xb03f15[_0x9be4d6(0x17e)]===!![]){this[_0x9be4d6(0x29c)](_0x108b4d),this[_0x9be4d6(0x1df)](_0x108b4d),this[_0x9be4d6(0x195)](_0x2e4962,_0x13564c,_0x9be4d6(0x109));return;}if(typeof _0xb03f15['behavior']===_0x9be4d6(0x298)){this[_0x9be4d6(0x1f9)](_0x108b4d,_0x13564c),this[_0x9be4d6(0x1df)](_0x108b4d),this['displayPreviewHints'](_0x2e4962,_0x13564c,_0x9be4d6(0xde),_0xb03f15[_0x9be4d6(0xde)]);return;}if(_0xb03f15[_0x9be4d6(0xde)]===!![]){this['displayBehaviorsStats'](_0x108b4d,_0x13564c),this[_0x9be4d6(0x1df)](_0x108b4d),this[_0x9be4d6(0x195)](_0x2e4962,_0x13564c,_0x9be4d6(0x180));return;}this[_0x9be4d6(0x29c)](_0x108b4d),this[_0x9be4d6(0x1f9)](_0x108b4d,_0x13564c),this[_0x9be4d6(0x1ae)](_0x108b4d),this['displaySummary'](_0x108b4d),this[_0x9be4d6(0x195)](_0x2e4962,_0x13564c,_0x9be4d6(0x216));}[a31_0x1cf65c(0x1ae)](_0x493de0){displayRealtimeValidation(_0x493de0);}['displayPreviewHints'](_0x3d973f,_0x574682,_0x228849,_0x53e8ef){const _0x59fdeb=a31_0x1cf65c;console[_0x59fdeb(0xff)]('\x0a'+a31_0x2d8ea2['dim']('To\x20view\x20sample\x20data:'));const _0x34fd2e=_0x574682!==_0x59fdeb(0x2c0)?_0x59fdeb(0x212)+_0x574682:'';if(_0x228849===_0x59fdeb(0x17e)&&_0x53e8ef)console[_0x59fdeb(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x59fdeb(0x1b3)](_0x59fdeb(0x2ca)+_0x3d973f+_0x59fdeb(0x206)+_0x53e8ef+'\x22'+_0x34fd2e));else{if(_0x228849===_0x59fdeb(0xde)&&_0x53e8ef)console[_0x59fdeb(0xff)]('\x20\x20'+a31_0x2d8ea2['dim']('tdx\x20ps\x20preview\x20'+_0x3d973f+_0x59fdeb(0x18d)+_0x53e8ef+'\x22'+_0x34fd2e));else(_0x228849==='attributes'||_0x228849===_0x59fdeb(0x216))&&console[_0x59fdeb(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x59fdeb(0x1b3)](_0x59fdeb(0x2ca)+_0x3d973f+_0x59fdeb(0x264)+_0x34fd2e));}(_0x228849===_0x59fdeb(0x180)||_0x228849===_0x59fdeb(0x216))&&console[_0x59fdeb(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x59fdeb(0x1b3)](_0x59fdeb(0x2ca)+_0x3d973f+_0x59fdeb(0x167)+_0x34fd2e)),_0x228849===_0x59fdeb(0x216)&&console[_0x59fdeb(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x59fdeb(0x1b3)](_0x59fdeb(0x2ca)+_0x3d973f+'\x20--enriched'+_0x34fd2e));}[a31_0x1cf65c(0x162)](_0x5dc00c){const _0x233772=a31_0x1cf65c,{master:_0x4f01a6}=_0x5dc00c,_0x515fa9=_0x4f01a6[_0x233772(0xd9)]?a31_0x2d8ea2[_0x233772(0xee)]('✔'):a31_0x2d8ea2[_0x233772(0x1f0)]('✘');console[_0x233772(0xff)]('\x0a'+a31_0x2d8ea2[_0x233772(0x1b3)]('Master\x20Table')),console[_0x233772(0xff)](_0x515fa9+'\x20'+a31_0x2d8ea2[_0x233772(0x15b)](_0x4f01a6[_0x233772(0x11f)]+'.'+_0x4f01a6[_0x233772(0x2a2)])),_0x4f01a6[_0x233772(0xd9)]?_0x4f01a6['rowCount']!==undefined&&console[_0x233772(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x233772(0x1b3)](_0x233772(0x254))+'\x20'+a31_0x2d8ea2[_0x233772(0x153)](formatRows(_0x4f01a6[_0x233772(0x2ac)]))):console[_0x233772(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x233772(0x1f0)](_0x233772(0x1e7))+'\x20'+_0x4f01a6[_0x233772(0x279)]);}['displayAttributesStats'](_0x48abd1){const _0x2a1a0a=a31_0x1cf65c;if(_0x48abd1[_0x2a1a0a(0x109)][_0x2a1a0a(0x1a8)]===0x0)return;console['error']('\x0a'+a31_0x2d8ea2[_0x2a1a0a(0x1b3)]('Attributes'));for(const _0x31f9e2 of _0x48abd1[_0x2a1a0a(0x109)]){const _0x2e805c=_0x31f9e2['schemaValid']?a31_0x2d8ea2[_0x2a1a0a(0xee)]('✔'):a31_0x2d8ea2[_0x2a1a0a(0x1f0)]('✘');let _0x7746d6='';if(_0x31f9e2[_0x2a1a0a(0xd9)]&&_0x31f9e2[_0x2a1a0a(0x2e0)]!==undefined&&_0x31f9e2[_0x2a1a0a(0x232)]!==undefined){const _0x52a74f=_0x31f9e2[_0x2a1a0a(0x232)]['toFixed'](0x1),_0x453eb7=_0x31f9e2['coveragePercent']>=0x50?a31_0x2d8ea2['green']:_0x31f9e2[_0x2a1a0a(0x232)]>=0x32?a31_0x2d8ea2[_0x2a1a0a(0x168)]:a31_0x2d8ea2['red'];_0x7746d6='\x20'+a31_0x2d8ea2['dim']('Coverage:')+'\x20'+_0x453eb7(_0x52a74f+'%')+'\x20('+formatRows(_0x31f9e2[_0x2a1a0a(0x2e0)])+_0x2a1a0a(0x1bd);}console[_0x2a1a0a(0xff)](_0x2e805c+'\x20'+a31_0x2d8ea2[_0x2a1a0a(0x15b)](_0x31f9e2[_0x2a1a0a(0x1fb)])+_0x7746d6),console[_0x2a1a0a(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x2a1a0a(0x1b3)](_0x2a1a0a(0x14c))+'\x20'+a31_0x2d8ea2[_0x2a1a0a(0x15b)](_0x31f9e2[_0x2a1a0a(0x11f)]+'.'+_0x31f9e2[_0x2a1a0a(0x2a2)]));const _0x4d0dd9=_0x31f9e2[_0x2a1a0a(0xe0)]===_0x31f9e2['foreignKey']?a31_0x2d8ea2[_0x2a1a0a(0x1b3)](_0x2a1a0a(0x12c))+'\x20'+_0x31f9e2['joinKey']:a31_0x2d8ea2[_0x2a1a0a(0x1b3)]('Join:')+'\x20'+_0x31f9e2['joinKey']+'\x20=\x20'+_0x31f9e2['foreignKey'];console[_0x2a1a0a(0xff)]('\x20\x20'+_0x4d0dd9),console[_0x2a1a0a(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x2a1a0a(0x1b3)](_0x2a1a0a(0x1e1))),this[_0x2a1a0a(0x19d)](_0x31f9e2['columns']),!_0x31f9e2[_0x2a1a0a(0xd9)]&&console[_0x2a1a0a(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x2a1a0a(0x1f0)](_0x2a1a0a(0x1e7))+'\x20'+_0x31f9e2[_0x2a1a0a(0x279)]);}}[a31_0x1cf65c(0x1f9)](_0x179d30,_0x242a3d){const _0x1883b9=a31_0x1cf65c;if(_0x179d30[_0x1883b9(0x180)]['length']===0x0)return;console['error']('\x0a'+a31_0x2d8ea2[_0x1883b9(0x1b3)](_0x1883b9(0x28e))+'\x20'+a31_0x2d8ea2[_0x1883b9(0x1b3)]('('+_0x242a3d+')'));for(const _0x124efa of _0x179d30[_0x1883b9(0x180)]){const _0x12302f=_0x124efa[_0x1883b9(0xd9)]?a31_0x2d8ea2[_0x1883b9(0xee)]('✔'):a31_0x2d8ea2['red']('✘');let _0xa35416='';if(_0x124efa['schemaValid']&&_0x124efa[_0x1883b9(0x1b6)]!==undefined&&_0x124efa[_0x1883b9(0x2d9)]!==undefined){const _0x26b4ef=_0x124efa[_0x1883b9(0xf3)]?.[_0x1883b9(0x1bf)](0x1)||'?',_0x3089e4=(_0x124efa['customerPercent']??0x0)>=0x32?a31_0x2d8ea2[_0x1883b9(0xee)]:(_0x124efa[_0x1883b9(0xf3)]??0x0)>=0x14?a31_0x2d8ea2[_0x1883b9(0x168)]:a31_0x2d8ea2['red'];_0xa35416='\x20'+a31_0x2d8ea2[_0x1883b9(0x1b3)](_0x1883b9(0x223))+'\x20'+_0x3089e4(formatRows(_0x124efa[_0x1883b9(0x1b6)]))+'\x20('+_0x26b4ef+_0x1883b9(0x2cc)+a31_0x2d8ea2[_0x1883b9(0x1b3)](_0x1883b9(0x269))+'\x20'+a31_0x2d8ea2[_0x1883b9(0x153)](formatRows(_0x124efa[_0x1883b9(0x2d9)]));}console[_0x1883b9(0xff)](_0x12302f+'\x20'+a31_0x2d8ea2[_0x1883b9(0x15b)](_0x124efa['name'])+_0xa35416),console['error']('\x20\x20'+a31_0x2d8ea2[_0x1883b9(0x1b3)](_0x1883b9(0x14c))+'\x20'+a31_0x2d8ea2[_0x1883b9(0x15b)](_0x124efa['database']+'.'+_0x124efa['table']));const _0x2efced=_0x124efa['joinKey']===_0x124efa[_0x1883b9(0x2c1)]?a31_0x2d8ea2['dim'](_0x1883b9(0x12c))+'\x20'+_0x124efa[_0x1883b9(0xe0)]:a31_0x2d8ea2['dim']('Join:')+'\x20'+_0x124efa[_0x1883b9(0xe0)]+_0x1883b9(0x239)+_0x124efa[_0x1883b9(0x2c1)];console[_0x1883b9(0xff)]('\x20\x20'+_0x2efced),console[_0x1883b9(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x1883b9(0x1b3)](_0x1883b9(0x1e1))),this['displayColumns'](_0x124efa[_0x1883b9(0x24b)]),!_0x124efa['schemaValid']&&console[_0x1883b9(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x1883b9(0x1f0)](_0x1883b9(0x1e7))+'\x20'+_0x124efa[_0x1883b9(0x279)]);}}[a31_0x1cf65c(0x19d)](_0x4add18){const _0x2d06fd=a31_0x1cf65c;for(const _0x4c9345 of _0x4add18){_0x4c9345[_0x2d06fd(0x1e2)]===_0x4c9345['column']||_0x4c9345[_0x2d06fd(0x1a6)]==='*'?console[_0x2d06fd(0xff)](_0x2d06fd(0x125)+_0x4c9345[_0x2d06fd(0x1e2)]):console[_0x2d06fd(0xff)](_0x2d06fd(0x125)+_0x4c9345[_0x2d06fd(0x1e2)]+'\x20'+a31_0x2d8ea2[_0x2d06fd(0x1b3)]('('+_0x4c9345[_0x2d06fd(0x1a6)]+')'));}}[a31_0x1cf65c(0x1df)](_0x2d5db9){const _0x664e68=a31_0x1cf65c;console[_0x664e68(0xff)]('─'[_0x664e68(0x27f)](0x3c));if(_0x2d5db9['errors'][_0x664e68(0x1a8)]>0x0){console['error']('\x0a'+a31_0x2d8ea2[_0x664e68(0x1f0)](_0x664e68(0x25f)));for(const _0x137478 of _0x2d5db9[_0x664e68(0x132)]){console[_0x664e68(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x664e68(0x1f0)]('•')+'\x20'+_0x137478);}}_0x2d5db9[_0x664e68(0x135)]&&console['error']('\x0a'+a31_0x2d8ea2['green']('✔')+_0x664e68(0x1da));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x2ae);['description']=a31_0x1cf65c(0x284);async[a31_0x1cf65c(0x242)](_0x346ac1){const _0x56044b=a31_0x1cf65c,{options:_0x9c84f9,args:_0x32009f,tdx:_0x25d61c}=_0x346ac1,_0x5ac7a6=_0x9c84f9,_0x5d73b5=_0x32009f[0x0]||_0x9c84f9[_0x56044b(0x128)];if(!_0x5d73b5)return showParentSegmentNotSetError(_0x56044b(0x124)+_0x56044b(0x20a)+_0x56044b(0x256)+_0x56044b(0x2c7)+_0x56044b(0x179)+_0x56044b(0x2b5)+_0x56044b(0x249)+_0x56044b(0x1e4)),0x1;if(!_0x5ac7a6[_0x56044b(0x228)]&&!_0x5ac7a6[_0x56044b(0x17e)]&&!_0x5ac7a6['behavior']&&!_0x5ac7a6['enriched'])return console[_0x56044b(0xff)](a31_0x2d8ea2[_0x56044b(0x1f0)](_0x56044b(0x194))),console[_0x56044b(0xff)](_0x56044b(0x1bc)),console['error'](_0x56044b(0x227)),console[_0x56044b(0xff)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x56044b(0xff)]('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x56044b(0xff)](_0x56044b(0x14d)),console[_0x56044b(0xff)](_0x56044b(0x290)),0x1;const _0x3146b9=resolveYamlFile(_0x5d73b5);if(!existsSync(_0x3146b9))return showFileNotFoundError(_0x3146b9,_0x5d73b5),0x1;_0x5ac7a6['verbose']&&(console['error'](_0x56044b(0x1a3)+_0x5ac7a6['site']),console[_0x56044b(0xff)](_0x56044b(0x2a4)+_0x3146b9));let _0x2f2217;try{_0x2f2217=readFileSync(_0x3146b9,_0x56044b(0xd7));}catch(_0x1dcea0){const _0x11fb1f=_0x1dcea0 instanceof Error?_0x1dcea0[_0x56044b(0x24f)]:String(_0x1dcea0);return console[_0x56044b(0xff)](_0x56044b(0x183)+_0x11fb1f),0x1;}let _0x1e3ba2;try{_0x1e3ba2=parseDef(_0x2f2217);}catch(_0x4c4a00){const _0x3544c2=_0x4c4a00 instanceof Error?_0x4c4a00[_0x56044b(0x24f)]:String(_0x4c4a00);return console[_0x56044b(0xff)](a31_0x2d8ea2[_0x56044b(0x1f0)]('Error\x20parsing\x20YAML:\x20'+_0x3544c2)),0x1;}if(_0x5ac7a6[_0x56044b(0x17e)]===!![]||_0x5ac7a6[_0x56044b(0x17e)]===''){const _0x4c7f77=_0x1e3ba2[_0x56044b(0x109)]?.[_0x56044b(0x27e)](_0x5e68b8=>_0x5e68b8[_0x56044b(0x1fb)])||[];if(_0x4c7f77[_0x56044b(0x1a8)]===0x0)console['error'](a31_0x2d8ea2[_0x56044b(0x1f0)](_0x56044b(0x2aa)));else{console['error'](a31_0x2d8ea2['red'](_0x56044b(0xf0))),console[_0x56044b(0xff)]('Available\x20attributes:');for(const _0xb62f7b of _0x4c7f77){console[_0x56044b(0xff)]('\x20\x20'+a31_0x2d8ea2['cyan'](_0xb62f7b));}console[_0x56044b(0xff)](_0x56044b(0x13c)+_0x5d73b5+_0x56044b(0x206)+_0x4c7f77[0x0]+'\x22');}return 0x1;}if(_0x5ac7a6['behavior']===!![]||_0x5ac7a6['behavior']===''){const _0x3d5cf4=_0x1e3ba2['behaviors']?.[_0x56044b(0x27e)](_0x539cdd=>_0x539cdd['name'])||[];if(_0x3d5cf4['length']===0x0)console[_0x56044b(0xff)](a31_0x2d8ea2[_0x56044b(0x1f0)](_0x56044b(0x23b)));else{console[_0x56044b(0xff)](a31_0x2d8ea2[_0x56044b(0x1f0)](_0x56044b(0x1d9))),console[_0x56044b(0xff)](_0x56044b(0x1e0));for(const _0x4f75c9 of _0x3d5cf4){console[_0x56044b(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x56044b(0x153)](_0x4f75c9));}console['error']('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x5d73b5+_0x56044b(0x18d)+_0x3d5cf4[0x0]+'\x22');}return 0x1;}const _0x5340f1=createCommandSpinner(a31_0x2d8ea2[_0x56044b(0x1b3)]('Fetching\x20sample\x20data...'),{'verbose':_0x5ac7a6[_0x56044b(0x148)]});_0x5340f1['start']();const _0x39b4b2={'onProgress':_0x55d47b=>{const _0x5e0076=_0x56044b;_0x5340f1[_0x5e0076(0x293)]=formatProgressMessage(_0x55d47b);}};if(_0x5ac7a6[_0x56044b(0x228)])_0x39b4b2[_0x56044b(0x228)]=!![];if(_0x5ac7a6[_0x56044b(0x17e)]&&typeof _0x5ac7a6[_0x56044b(0x17e)]==='string')_0x39b4b2['attribute']=_0x5ac7a6['attribute'];if(_0x5ac7a6['behavior']&&typeof _0x5ac7a6['behavior']===_0x56044b(0x298))_0x39b4b2[_0x56044b(0xde)]=_0x5ac7a6[_0x56044b(0xde)];if(_0x5ac7a6[_0x56044b(0x151)])_0x39b4b2[_0x56044b(0x151)]=!![];if(_0x5ac7a6[_0x56044b(0xfc)])_0x39b4b2[_0x56044b(0xfc)]=_0x5ac7a6[_0x56044b(0xfc)];let _0x3dcced;try{_0x3dcced=await _0x25d61c[_0x56044b(0x106)][_0x56044b(0x107)](_0x2f2217,_0x39b4b2),_0x5340f1[_0x56044b(0x1c8)]();}catch(_0x5064d8){_0x5340f1[_0x56044b(0x1c8)]();throw _0x5064d8;}return await this[_0x56044b(0x178)](_0x3dcced,{'master':_0x5ac7a6['master'],'attribute':typeof _0x5ac7a6[_0x56044b(0x17e)]==='string'?_0x5ac7a6[_0x56044b(0x17e)]:undefined,'behavior':typeof _0x5ac7a6['behavior']===_0x56044b(0x298)?_0x5ac7a6[_0x56044b(0xde)]:undefined,'enriched':_0x5ac7a6[_0x56044b(0x151)]}),_0x3dcced[_0x56044b(0x135)]?0x0:0x1;}async['displayPreviewResults'](_0x568c5e,_0x457d50){const _0x2587d5=a31_0x1cf65c;console['error']('\x0a'+a31_0x2d8ea2[_0x2587d5(0x15b)](_0x2587d5(0x296))+'\x20'+_0x568c5e[_0x2587d5(0x1fb)]),console[_0x2587d5(0xff)]('═'[_0x2587d5(0x27f)](0x3c));if(_0x457d50[_0x2587d5(0x228)]&&_0x568c5e[_0x2587d5(0x2c9)]){const _0x2e64b9=a31_0x2d8ea2[_0x2587d5(0x1b3)](_0x2587d5(0x24e))+'\x20'+a31_0x2d8ea2[_0x2587d5(0x15b)](_0x568c5e[_0x2587d5(0x228)][_0x2587d5(0x11f)]+'.'+_0x568c5e[_0x2587d5(0x228)][_0x2587d5(0x2a2)]);await this[_0x2587d5(0x165)](_0x2e64b9,_0x568c5e[_0x2587d5(0x2c9)]);}else{if(_0x457d50[_0x2587d5(0x17e)]&&_0x568c5e['sampleData']){const _0x307fa1=a31_0x2d8ea2[_0x2587d5(0x1b3)](_0x2587d5(0x182))+'\x20'+a31_0x2d8ea2['bold'](_0x457d50['attribute']);await this[_0x2587d5(0x165)](_0x307fa1,_0x568c5e['sampleData']);}else{if(_0x457d50['behavior']&&_0x568c5e[_0x2587d5(0x2c9)]){const _0x18538b=a31_0x2d8ea2[_0x2587d5(0x1b3)](_0x2587d5(0x1ac))+'\x20'+a31_0x2d8ea2[_0x2587d5(0x15b)](_0x457d50[_0x2587d5(0xde)]);await this['displaySampleData'](_0x18538b,_0x568c5e[_0x2587d5(0x2c9)]);}else{if(_0x457d50[_0x2587d5(0x151)]&&_0x568c5e[_0x2587d5(0x2c9)]){const _0x2a9545=a31_0x2d8ea2[_0x2587d5(0x1b3)]('Enriched:')+'\x20'+a31_0x2d8ea2[_0x2587d5(0x15b)](_0x2587d5(0x281));await this['displaySampleData'](_0x2a9545,_0x568c5e[_0x2587d5(0x2c9)]);}else!_0x568c5e[_0x2587d5(0x2c9)]&&console[_0x2587d5(0xff)](_0x2587d5(0x278));}}}if(_0x568c5e[_0x2587d5(0x132)][_0x2587d5(0x1a8)]>0x0){console[_0x2587d5(0xff)]('─'[_0x2587d5(0x27f)](0x3c)),console[_0x2587d5(0xff)]('\x0a'+a31_0x2d8ea2['red'](_0x2587d5(0x25f)));for(const _0x4842e5 of _0x568c5e[_0x2587d5(0x132)]){console[_0x2587d5(0xff)]('\x20\x20'+a31_0x2d8ea2['red']('•')+'\x20'+_0x4842e5);}}}async['displaySampleData'](_0x41fd3c,_0x3d9be6){const _0x4bdb47=a31_0x1cf65c;if(_0x3d9be6[_0x4bdb47(0x1a8)]===0x0){console[_0x4bdb47(0xff)]('\x0a'+_0x41fd3c),console[_0x4bdb47(0xff)](_0x4bdb47(0x1eb));return;}console[_0x4bdb47(0xff)]('\x0a'+_0x41fd3c);const _0x218d21=Object[_0x4bdb47(0x21a)](_0x3d9be6[0x0])['map'](_0x2742f0=>({'name':_0x2742f0,'type':typeof _0x3d9be6[0x0][_0x2742f0]==='number'?_0x4bdb47(0x1c9):'varchar'})),_0x1ae41b={'queryId':_0x4bdb47(0x2bc),'columns':_0x218d21,'data':_0x3d9be6,'stats':{'state':_0x4bdb47(0x154),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3d9be6['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x4a31d8=formatAsTable(_0x1ae41b,_0x3d9be6['length'],!![]);await writeOutput(_0x4a31d8,undefined,_0x4bdb47(0x2a2));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x133);[a31_0x1cf65c(0x1d6)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async['execute'](_0x3a2aa3){const _0x2cc3f5=a31_0x1cf65c,{options:_0x5385af,args:_0x337e3e,tdx:_0x185cef}=_0x3a2aa3,_0x4b10f4=_0x5385af,_0x20f447=_0x337e3e[0x0]||_0x5385af[_0x2cc3f5(0x128)];if(!_0x20f447)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a'+_0x2cc3f5(0x119)),0x1;const _0x1b42f5=resolveYamlFile(_0x20f447);if(existsSync(_0x1b42f5)){_0x4b10f4[_0x2cc3f5(0x148)]&&console[_0x2cc3f5(0xff)](_0x2cc3f5(0x255)+_0x1b42f5);let _0x551639;try{_0x551639=readFileSync(_0x1b42f5,'utf-8');}catch(_0x3e1958){const _0x5eb8e3=_0x3e1958 instanceof Error?_0x3e1958[_0x2cc3f5(0x24f)]:String(_0x3e1958);return console[_0x2cc3f5(0xff)]('Error\x20reading\x20file:\x20'+_0x5eb8e3),0x1;}const _0x43e9f0=await withSpinner(_0x2cc3f5(0x218),()=>_0x185cef[_0x2cc3f5(0x106)][_0x2cc3f5(0x18f)](_0x551639),{'verbose':_0x4b10f4[_0x2cc3f5(0x148)]}),_0x5abaed=_0x43e9f0['data'],{isNew:_0x58e34e,name:_0x365287,hasChanges:_0x4a605e,diffFormatted:_0x3497f8}=_0x5abaed;if(_0x4a605e){_0x58e34e?console[_0x2cc3f5(0xff)](_0x2cc3f5(0x152)+_0x365287+'\x27:'):console[_0x2cc3f5(0xff)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x365287+'\x27:');console[_0x2cc3f5(0xff)]('─'[_0x2cc3f5(0x27f)](0x3c)),console['error'](_0x3497f8),console[_0x2cc3f5(0xff)]('─'[_0x2cc3f5(0x27f)](0x3c));const _0x23e3ed=_0x58e34e?'Create\x20parent\x20segment\x20\x27'+_0x365287+'\x27\x20and\x20run\x20workflow?':'Apply\x20changes\x20to\x20\x27'+_0x365287+_0x2cc3f5(0x25a);if(!_0x4b10f4['yes']){if(!isInteractive())return console[_0x2cc3f5(0xff)](a31_0x2d8ea2[_0x2cc3f5(0x1f0)](_0x2cc3f5(0x16a)),_0x2cc3f5(0x108)),console[_0x2cc3f5(0xff)](a31_0x2d8ea2[_0x2cc3f5(0x1b3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3d141c=await confirmKey(_0x23e3ed);if(!_0x3d141c)return console[_0x2cc3f5(0xff)](a31_0x2d8ea2[_0x2cc3f5(0x168)](_0x2cc3f5(0x150))),0x1;}const _0x2488e3=_0x58e34e?'Creating':_0x2cc3f5(0x1a2);await withSpinner(_0x2488e3+_0x2cc3f5(0x1c4)+_0x365287+_0x2cc3f5(0x289),()=>_0x5abaed[_0x2cc3f5(0x2de)](),{'verbose':_0x4b10f4[_0x2cc3f5(0x148)]});const _0x51e59c=_0x58e34e?_0x2cc3f5(0x207):'Updated';console['error']('✔\x20'+_0x51e59c+_0x2cc3f5(0x1c4)+_0x365287+'\x27');}else console['error'](_0x2cc3f5(0x20c)+_0x365287+_0x2cc3f5(0x1a5));}const _0x367f64=await withSpinner(_0x2cc3f5(0x28d)+_0x20f447+_0x2cc3f5(0x289),()=>_0x185cef[_0x2cc3f5(0x106)][_0x2cc3f5(0x2c8)](_0x20f447),{'verbose':_0x4b10f4[_0x2cc3f5(0x148)]}),_0x13676d=_0x367f64[_0x2cc3f5(0x20f)],_0x2980f5=getConsoleUrl(_0x4b10f4[_0x2cc3f5(0x22f)],_0x2cc3f5(0x295)+_0x13676d['workflowId']+_0x2cc3f5(0x276)+_0x13676d[_0x2cc3f5(0x27c)]+_0x2cc3f5(0x142)+_0x13676d['workflowAttemptId']);return console[_0x2cc3f5(0xff)](_0x2cc3f5(0x2d0)),console[_0x2cc3f5(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x2cc3f5(0x1b3)]('Audience\x20ID:')+'\x20'+_0x13676d['audienceId']),console[_0x2cc3f5(0xff)]('\x20\x20'+a31_0x2d8ea2[_0x2cc3f5(0x1b3)](_0x2cc3f5(0x193))+'\x20'+_0x13676d[_0x2cc3f5(0x200)]),console['error']('\x20\x20'+a31_0x2d8ea2[_0x2cc3f5(0x1b3)](_0x2cc3f5(0x1b1))+'\x20'+_0x13676d[_0x2cc3f5(0x27c)]),console[_0x2cc3f5(0xff)]('\x20\x20'+a31_0x2d8ea2['dim']('Attempt:')+'\x20'+_0x13676d[_0x2cc3f5(0x18e)]),console[_0x2cc3f5(0xff)]('\x20\x20'+_0x2980f5),console[_0x2cc3f5(0xff)]('\x0a'+a31_0x2d8ea2['dim'](_0x2cc3f5(0x22a))+_0x2cc3f5(0x1d8)+_0x13676d[_0x2cc3f5(0x18e)]+_0x2cc3f5(0x2a9)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='segment:parent:fields';['description']=a31_0x1cf65c(0x21e);async['execute'](_0x14b096){const _0x1911ec=a31_0x1cf65c,{options:_0x4dd5a7,args:_0x323a33,tdx:_0x186526}=_0x14b096,_0x2035c4=_0x323a33[0x0]||_0x4dd5a7[_0x1911ec(0x128)];if(!_0x2035c4)return showParentSegmentNotSetError(_0x1911ec(0x25b)+_0x1911ec(0x222)),0x1;_0x4dd5a7[_0x1911ec(0x148)]&&(console[_0x1911ec(0xff)](_0x1911ec(0x1a3)+_0x4dd5a7['site']),console[_0x1911ec(0xff)](_0x1911ec(0x1e5)+_0x2035c4));const _0x11e217=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x2035c4+_0x1911ec(0x289),()=>_0x186526[_0x1911ec(0x106)][_0x1911ec(0x2c4)](_0x2035c4),{'verbose':_0x4dd5a7[_0x1911ec(0x148)]}),_0x217e1e=_0x11e217['data'];console[_0x1911ec(0xff)](_0x1911ec(0x29b)+_0x217e1e[_0x1911ec(0x1a8)]+'\x20field'+(_0x217e1e[_0x1911ec(0x1a8)]!==0x1?'s':''));if(_0x4dd5a7[_0x1911ec(0x2d4)]||_0x4dd5a7[_0x1911ec(0x237)])return await handleSDKOutput(_0x217e1e,_0x4dd5a7),0x0;return displayFieldsHumanReadable(_0x217e1e,_0x2035c4),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x1b4);['description']=a31_0x1cf65c(0xea);async['execute'](_0x30995f){const _0x218281=a31_0x1cf65c,{options:_0x11fff0,args:_0x94d3dd,tdx:_0x9857ce}=_0x30995f,_0x121561=_0x11fff0,_0x7af18=_0x94d3dd[0x0]||_0x11fff0[_0x218281(0x128)];if(!_0x7af18)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'+_0x218281(0x229)+_0x218281(0x214)+_0x218281(0x292)),0x1;_0x11fff0[_0x218281(0x148)]&&(console[_0x218281(0xff)]('Site:\x20'+_0x11fff0['site']),console[_0x218281(0xff)](_0x218281(0x1e5)+_0x7af18));const _0x6b7f96=await withSpinner(_0x218281(0x2d6)+_0x7af18+_0x218281(0x289),()=>_0x9857ce[_0x218281(0x106)]['getParentFull'](_0x7af18),{'verbose':_0x11fff0[_0x218281(0x148)]}),_0x797b94=_0x6b7f96[_0x218281(0x20f)];if(_0x121561['web']){const _0x4fc909=getConsoleNextUrl(_0x121561['site'],_0x218281(0x113)+_0x797b94['id']);return console[_0x218281(0xff)](a31_0x2d8ea2[_0x218281(0xee)]('✔')+'\x20Opening\x20'+a31_0x2d8ea2['cyan'](_0x4fc909)),openBrowser(_0x4fc909),0x0;}return await handleSingleObjectOutput(_0x797b94,_0x11fff0),0x0;}}function a31_0x31f0(_0x27df21,_0x432b95){_0x27df21=_0x27df21-0xd6;const _0x321a97=a31_0x321a();let _0x31f0cf=_0x321a97[_0x27df21];return _0x31f0cf;}export class ParentSegmentDescCommand extends BaseCommand{['name']=a31_0x1cf65c(0x1a9);[a31_0x1cf65c(0x1d6)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a31_0x1cf65c(0x242)](_0x157817){const _0x1289db=a31_0x1cf65c,{options:_0x35b63f,args:_0x2707a1,tdx:_0x644420}=_0x157817,_0x4926d7=_0x35b63f,_0x51312a=_0x2707a1[0x0]||_0x35b63f[_0x1289db(0x128)];if(!_0x51312a)return showParentSegmentNotSetError(_0x1289db(0x1cf)+_0x1289db(0x158)+_0x1289db(0x214)+_0x1289db(0x247)),0x1;_0x35b63f[_0x1289db(0x148)]&&(console[_0x1289db(0xff)](_0x1289db(0x1a3)+_0x35b63f[_0x1289db(0x22f)]),console['error']('Parent\x20segment:\x20'+_0x51312a));const _0x5be2d1=await withSpinner(_0x1289db(0x126)+_0x51312a+_0x1289db(0x289),()=>_0x644420[_0x1289db(0x106)][_0x1289db(0x2d8)](_0x51312a),{'verbose':_0x35b63f[_0x1289db(0x148)]}),_0x7942c7=_0x5be2d1['data'],_0x204ffa=_0x644420[_0x1289db(0x106)]['getOutputDatabaseName'](_0x7942c7);if(_0x4926d7[_0x1289db(0x123)]){const _0x3cbda7=await this['collectSchema'](_0x157817,_0x51312a,_0x7942c7,_0x204ffa),_0x1d7ecb=this[_0x1289db(0x2b4)](_0x3cbda7);writeFileSync(_0x4926d7[_0x1289db(0x123)],_0x1d7ecb);const _0x144840=_0x3cbda7[_0x1289db(0x2b2)][_0x1289db(0x24b)][_0x1289db(0x1a8)]+_0x3cbda7[_0x1289db(0x180)]['reduce']((_0x400dbc,_0x1bdb7a)=>_0x400dbc+_0x1bdb7a[_0x1289db(0x24b)][_0x1289db(0x1a8)],0x0),_0x2635f0=_0x3cbda7['behaviors']['filter'](_0x5cd108=>_0x5cd108[_0x1289db(0x24b)][_0x1289db(0x1a8)]===0x0)[_0x1289db(0x1a8)];return console[_0x1289db(0x25e)](_0x1289db(0x1d0)+_0x4926d7['output']),console['log'](_0x1289db(0x28a)+_0x204ffa),console[_0x1289db(0x25e)](_0x1289db(0x18c)+_0x3cbda7[_0x1289db(0x180)][_0x1289db(0x1a8)]+_0x1289db(0x26e)),console['log'](_0x1289db(0x2e1)+_0x144840+_0x1289db(0x2cf)),_0x2635f0>0x0&&console[_0x1289db(0x25e)](_0x1289db(0x12d)+_0x2635f0+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x1289db(0xff)]('\x0a'+a31_0x2d8ea2[_0x1289db(0x15b)](_0x1289db(0x27d))+'\x20'+a31_0x2d8ea2['cyan'](_0x204ffa));const _0x1976cd=await withSpinner(_0x1289db(0x1ff),()=>_0x644420['segment'][_0x1289db(0x147)](_0x7942c7),{'verbose':_0x35b63f['verbose']});console[_0x1289db(0xff)]('\x0a'+a31_0x2d8ea2[_0x1289db(0x15b)](_0x1289db(0x2b2))+'\x20'+a31_0x2d8ea2[_0x1289db(0x1b3)]('('+_0x204ffa+_0x1289db(0xeb)));const _0x107dc5=await executeSchemaQuery(_0x1976cd[_0x1289db(0x20f)],_0x644420,_0x35b63f);await handleQueryOutput(_0x107dc5,_0x35b63f);const _0x3148fa=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x644420[_0x1289db(0x106)][_0x1289db(0x159)](_0x7942c7),{'verbose':_0x35b63f[_0x1289db(0x148)]});for(const _0x4944e8 of _0x3148fa[_0x1289db(0x20f)]){const _0x188325=_0x1289db(0x2a5)+_0x4944e8[_0x1289db(0x2d2)]()[_0x1289db(0x1d1)](/\s+/g,'_'),_0xfe7b4=_0x1289db(0x236)+_0x204ffa+'.'+_0x188325;console[_0x1289db(0xff)]('\x0a'+a31_0x2d8ea2[_0x1289db(0x15b)](_0x4944e8)+'\x20'+a31_0x2d8ea2[_0x1289db(0x1b3)]('('+_0x204ffa+'.'+_0x188325+')'));try{const _0x4d15a8=await executeSchemaQuery(_0xfe7b4,_0x644420,_0x35b63f);await handleQueryOutput(_0x4d15a8,_0x35b63f);}catch{console[_0x1289db(0xff)](a31_0x2d8ea2[_0x1289db(0x168)](_0x1289db(0x1ad)));}}return 0x0;}async['collectSchema'](_0x1cfefd,_0x5bfdf0,_0x116e77,_0x587d89){const _0xdc4044=a31_0x1cf65c,{options:_0x5c396f,tdx:_0x169a04}=_0x1cfefd,_0x56d47d=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x169a04[_0xdc4044(0x106)]['getParentSQL'](_0x116e77),{'verbose':_0x5c396f[_0xdc4044(0x148)]}),_0x2aca3b=await executeSchemaQuery(_0x56d47d[_0xdc4044(0x20f)],_0x169a04,_0x5c396f),_0xf7ad4a=_0x2aca3b[_0xdc4044(0x20f)]['map'](_0x14d71d=>({'name':_0x14d71d[_0xdc4044(0x114)],'type':_0x14d71d[_0xdc4044(0x253)]})),_0xa414aa=await withSpinner(_0xdc4044(0x26a),()=>_0x169a04[_0xdc4044(0x106)][_0xdc4044(0x159)](_0x116e77),{'verbose':_0x5c396f[_0xdc4044(0x148)]}),_0x3ec40c=[];for(const _0x3c753e of _0xa414aa[_0xdc4044(0x20f)]){const _0x1b46ca=_0xdc4044(0x2a5)+_0x3c753e['toLowerCase']()[_0xdc4044(0x1d1)](/\s+/g,'_'),_0x190951=_0xdc4044(0x236)+_0x587d89+'.'+_0x1b46ca;let _0x265d7b=[];try{const _0xb95934=await executeSchemaQuery(_0x190951,_0x169a04,_0x5c396f);_0x265d7b=_0xb95934[_0xdc4044(0x20f)][_0xdc4044(0x27e)](_0x58ce2b=>({'name':_0x58ce2b['column_name'],'type':_0x58ce2b['column_type']}));}catch{}_0x3ec40c['push']({'table':_0x1b46ca,'columns':_0x265d7b});}return{'database':_0x587d89,'parent_segment':_0x5bfdf0,'parent_id':_0x116e77,'customers':{'table':_0xdc4044(0x2b2),'columns':_0xf7ad4a},'behaviors':_0x3ec40c};}['formatSchemaJson'](_0xf61d3f){const _0x29a1c2=a31_0x1cf65c,_0x1c11ea=_0x48b993=>{const _0x17c0cf=a31_0x31f0;if(_0x48b993[_0x17c0cf(0x1a8)]===0x0)return'[]';const _0x1e6a6a=_0x48b993['map'](_0x323ef4=>_0x17c0cf(0x266)+_0x323ef4[_0x17c0cf(0x1fb)]+_0x17c0cf(0x14f)+_0x323ef4['type']+_0x17c0cf(0x12e));return'[\x0a'+_0x1e6a6a[_0x17c0cf(0x1ba)](',\x0a')+_0x17c0cf(0x211);},_0x8c1715=_0xf61d3f[_0x29a1c2(0x180)][_0x29a1c2(0x27e)](_0x11d4e2=>{const _0x229853=_0x29a1c2;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x11d4e2['table']+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x1c11ea(_0x11d4e2[_0x229853(0x24b)])[_0x229853(0x1d1)](/^/gm,'\x20\x20')[_0x229853(0x115)]()+_0x229853(0x2b7);})['join'](',\x0a');return _0x29a1c2(0x15c)+_0xf61d3f[_0x29a1c2(0x11f)]+_0x29a1c2(0x23e)+_0xf61d3f[_0x29a1c2(0x2dd)]+_0x29a1c2(0x1e9)+_0xf61d3f[_0x29a1c2(0x1fe)]+_0x29a1c2(0x22c)+_0xf61d3f['customers'][_0x29a1c2(0x2a2)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x1c11ea(_0xf61d3f[_0x29a1c2(0x2b2)][_0x29a1c2(0x24b)])[_0x29a1c2(0x1d1)](/^/gm,'\x20\x20')[_0x29a1c2(0x115)]()+_0x29a1c2(0x1f8)+_0x8c1715+_0x29a1c2(0x1a0);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='segment:parent:sql';['description']='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a31_0x1cf65c(0x242)](_0x9989b2){const _0xe11551=a31_0x1cf65c,{options:_0x2da14a,args:_0xd08f43,tdx:_0xe56265}=_0x9989b2,_0x2839d6=_0xd08f43[0x0]||_0x2da14a['parentSegment'];if(!_0x2839d6)return showParentSegmentNotSetError(_0xe11551(0xe3)+_0xe11551(0x19a)),0x1;_0x2da14a[_0xe11551(0x148)]&&(console[_0xe11551(0xff)]('Site:\x20'+_0x2da14a[_0xe11551(0x22f)]),console[_0xe11551(0xff)](_0xe11551(0x1e5)+_0x2839d6));const _0x5a0059=await withSpinner(_0xe11551(0x126)+_0x2839d6+_0xe11551(0x289),()=>_0xe56265[_0xe11551(0x106)][_0xe11551(0x2d8)](_0x2839d6),{'verbose':_0x2da14a[_0xe11551(0x148)]}),_0x4c43db=_0x5a0059['data'],_0x444719=await withSpinner(_0xe11551(0x27a)+_0x2839d6+'\x27...',()=>_0xe56265[_0xe11551(0x106)][_0xe11551(0x147)](_0x4c43db),{'verbose':_0x2da14a[_0xe11551(0x148)]}),_0x2b462d=_0x444719[_0xe11551(0x20f)];return _0x2da14a[_0xe11551(0x2c5)]===_0xe11551(0x2d4)||_0x2da14a[_0xe11551(0x2c5)]===_0xe11551(0x237)?await handleSDKOutput([{'sql':_0x2b462d}],_0x2da14a):console[_0xe11551(0x25e)](_0x2b462d),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='segment:parent:show';['description']=a31_0x1cf65c(0x127);async[a31_0x1cf65c(0x242)](_0x20826e){const _0x585cb2=a31_0x1cf65c,{options:_0x4f4da7,args:_0x191f06,tdx:_0x28b796}=_0x20826e,_0x1cd02e=_0x191f06[0x0]||_0x4f4da7['parentSegment'];if(!_0x1cd02e)return showParentSegmentNotSetError(_0x585cb2(0x146)+_0x585cb2(0x2b0)),0x1;_0x4f4da7[_0x585cb2(0x148)]&&(console['error'](_0x585cb2(0x1a3)+_0x4f4da7[_0x585cb2(0x22f)]),console[_0x585cb2(0xff)](_0x585cb2(0x1e5)+_0x1cd02e));const _0x44c57f=await withSpinner(_0x585cb2(0x126)+_0x1cd02e+'\x27...',()=>_0x28b796[_0x585cb2(0x106)][_0x585cb2(0x2d8)](_0x1cd02e),{'verbose':_0x4f4da7[_0x585cb2(0x148)]}),_0x917451=_0x44c57f[_0x585cb2(0x20f)],_0x470732=await withSpinner(_0x585cb2(0x27a)+_0x1cd02e+_0x585cb2(0x289),()=>_0x28b796[_0x585cb2(0x106)]['getParentSQL'](_0x917451),{'verbose':_0x4f4da7[_0x585cb2(0x148)]});let _0x43d9e0=_0x470732[_0x585cb2(0x20f)];const _0x396273=resolveLimit(_0x4f4da7[_0x585cb2(0x285)],DEFAULT_DISPLAY_LIMIT),_0x1d62c9=/\bLIMIT\s+\d+/i[_0x585cb2(0xf8)](_0x43d9e0);!_0x1d62c9&&(_0x43d9e0=_0x43d9e0['trim']()[_0x585cb2(0x1d1)](/;+$/,''),_0x43d9e0=_0x585cb2(0x1f3)+_0x43d9e0+_0x585cb2(0x175)+_0x396273);_0x4f4da7[_0x585cb2(0x148)]&&console[_0x585cb2(0xff)](_0x585cb2(0x161)+_0x43d9e0);const _0x47f8ad=await withProgressSpinner(_0x585cb2(0x17c),async _0x1f66cf=>{const _0x4ed19f=_0x585cb2,_0x38793c=await _0x28b796[_0x4ed19f(0x25d)]['execute'](_0x43d9e0,{'catalog':'td','schema':_0x4ed19f(0x2db),'onJobId':_0x24f72b=>{const _0x3ef29b=_0x4ed19f;_0x1f66cf[_0x3ef29b(0x208)](_0x24f72b);}});return _0x38793c;},{'verbose':_0x4f4da7['verbose']}),_0x27b345=_0x47f8ad[_0x585cb2(0x20f)],_0x1b924c=_0x27b345[_0x585cb2(0x116)]?_0x585cb2(0x251)+_0x27b345['jobId']+']':'';return console['error'](_0x585cb2(0x1cd)+_0x27b345['stats'][_0x585cb2(0x16e)][_0x585cb2(0x192)]()+_0x585cb2(0x20d)+(_0x585cb2(0x129)+formatElapsed(_0x27b345[_0x585cb2(0xd8)]['elapsedTimeMillis'])+_0x1b924c)),await handleQueryOutput(_0x27b345,_0x4f4da7),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x15d);[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x2bd);async['execute'](_0x58046b){const _0xe3b67f=a31_0x1cf65c,{options:_0xa6c7ba,args:_0x5a4216,tdx:_0x2e5a66}=_0x58046b,_0x268cd6=_0x5a4216[0x0],_0x23e1f4=await withSpinner(_0x268cd6?_0xe3b67f(0x1ea)+_0x268cd6+_0xe3b67f(0x289):_0xe3b67f(0x246),()=>_0x2e5a66[_0xe3b67f(0x297)][_0xe3b67f(0x103)](),{'verbose':_0xa6c7ba[_0xe3b67f(0x148)]});let _0x57d666=_0x23e1f4['data'][_0xe3b67f(0x1b0)](_0x1a14ed=>_0x1a14ed[_0xe3b67f(0x2be)]);if(_0x268cd6){const _0x228a3b=_0x268cd6[_0xe3b67f(0x1d1)](/[.+^${}()|[\]\\]/g,_0xe3b67f(0x1c7))[_0xe3b67f(0x1d1)](/\*/g,'.*')[_0xe3b67f(0x1d1)](/\?/g,'.'),_0x4674b8=new RegExp('^'+_0x228a3b+'$','i');_0x57d666=_0x57d666[_0xe3b67f(0x1b0)](_0x343f46=>_0x4674b8[_0xe3b67f(0xf8)](_0x343f46[_0xe3b67f(0x1fb)]));}_0x57d666[_0xe3b67f(0x1cc)]((_0x1651e4,_0x3f1247)=>_0x1651e4['name'][_0xe3b67f(0x1d2)](_0x3f1247['name'])),console[_0xe3b67f(0xff)](_0xe3b67f(0x29b)+_0x57d666[_0xe3b67f(0x1a8)]+_0xe3b67f(0x288)+(_0x57d666['length']!==0x1?'s':''));const _0x164b9b=_0x1b9d6b=>{const _0x2c1c10=_0xe3b67f;return getConsoleNextUrl(_0xa6c7ba['site'],_0x2c1c10(0x113)+_0x1b9d6b);};if(_0xa6c7ba[_0xe3b67f(0x2c5)]===_0xe3b67f(0x2d4)||_0xa6c7ba[_0xe3b67f(0x2c5)]==='jsonl'){const _0x2df0fc=_0x57d666['map'](_0x361886=>({..._0x361886,'url':_0x164b9b(_0x361886['id'])}));await handleSDKOutput(_0x2df0fc,_0xa6c7ba);}else{if(_0x57d666[_0xe3b67f(0x1a8)]===0x0)console[_0xe3b67f(0x25e)](_0xe3b67f(0x1b5));else for(const _0x2cc231 of _0x57d666){const _0x319793=_0x2cc231[_0xe3b67f(0x22d)]?a31_0x2d8ea2[_0xe3b67f(0x1b3)]('\x20('+formatRows(_0x2cc231[_0xe3b67f(0x22d)])+')'):'',_0xe7c734=hyperlink(_0x2cc231['name'],_0x164b9b(_0x2cc231['id']));console['log']('⚡\x20'+_0xe7c734+_0x319793);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a31_0x1cf65c(0x1dc);[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x201);async['execute'](_0x342f7f){const _0x43ac5c=a31_0x1cf65c,{options:_0x4b274b,args:_0x3e5c09,tdx:_0x4872b9}=_0x342f7f,_0x4b21ea=_0x3e5c09[0x0]||_0x4b274b[_0x43ac5c(0x128)];if(!_0x4b21ea)return showParentSegmentNotSetError(_0x43ac5c(0xed)+_0x43ac5c(0x1f4)),0x1;const _0x3ef2e3=resolveYamlFile(_0x4b21ea);if(!existsSync(_0x3ef2e3))return showFileNotFoundError(_0x3ef2e3,_0x4b21ea),0x1;let _0x3902f5;try{_0x3902f5=readFileSync(_0x3ef2e3,_0x43ac5c(0xd7));}catch(_0xe8a07c){const _0xb2d31f=_0xe8a07c instanceof Error?_0xe8a07c[_0x43ac5c(0x24f)]:String(_0xe8a07c);return console[_0x43ac5c(0xff)]('Error\x20reading\x20file:\x20'+_0xb2d31f),0x1;}const _0x4027e8=createCommandSpinner(a31_0x2d8ea2[_0x43ac5c(0x1b3)](_0x43ac5c(0x15f)),{'verbose':_0x4b274b[_0x43ac5c(0x148)]});_0x4027e8[_0x43ac5c(0x21d)]();const _0x292b87={'realtime':!![],'onProgress':_0x2aa05d=>{_0x4027e8['text']=formatProgressMessage(_0x2aa05d);}};let _0x1a5d32;try{_0x1a5d32=await _0x4872b9[_0x43ac5c(0x106)][_0x43ac5c(0x188)](_0x3902f5,_0x292b87),_0x4027e8[_0x43ac5c(0x1c8)]();}catch(_0x22e8c7){_0x4027e8[_0x43ac5c(0x1c8)]();throw _0x22e8c7;}console['error']('\x0a'+a31_0x2d8ea2[_0x43ac5c(0x15b)](_0x43ac5c(0x16f))+'\x20'+_0x1a5d32[_0x43ac5c(0x1fb)]),console['error']('═'[_0x43ac5c(0x27f)](0x3c)),displayRealtimeValidation(_0x1a5d32),console[_0x43ac5c(0xff)]('─'['repeat'](0x3c));if(_0x1a5d32['errors'][_0x43ac5c(0x1a8)]>0x0){console[_0x43ac5c(0xff)]('\x0a'+a31_0x2d8ea2[_0x43ac5c(0x1f0)]('Errors:'));for(const _0x43a5e8 of _0x1a5d32[_0x43ac5c(0x132)]){console[_0x43ac5c(0xff)]('\x20\x20'+a31_0x2d8ea2['red']('•')+'\x20'+_0x43a5e8);}}return _0x1a5d32[_0x43ac5c(0x135)]&&console[_0x43ac5c(0xff)]('\x0a'+a31_0x2d8ea2[_0x43ac5c(0xee)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x1a5d32['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x280);[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x240);async['execute'](_0x2cf6eb){const _0x104843=a31_0x1cf65c,{options:_0x5a82b0,args:_0x5f21fe,tdx:_0x17639c}=_0x2cf6eb,_0x3f3264=_0x5f21fe[0x0]||_0x5a82b0[_0x104843(0x128)];if(!_0x3f3264)return showParentSegmentNotSetError(_0x104843(0x1ed)+_0x104843(0x263)),0x1;_0x5a82b0[_0x104843(0x148)]&&(console['error'](_0x104843(0x1a3)+_0x5a82b0[_0x104843(0x22f)]),console['error'](_0x104843(0x1e5)+_0x3f3264));const _0x4cf6ad=await withSpinner(_0x104843(0x126)+_0x3f3264+_0x104843(0x289),()=>_0x17639c[_0x104843(0x106)][_0x104843(0x2d8)](_0x3f3264),{'verbose':_0x5a82b0[_0x104843(0x148)]}),_0x1fff64=_0x4cf6ad[_0x104843(0x20f)],_0x314918=await withSpinner(_0x104843(0x19e)+_0x3f3264+_0x104843(0x289),()=>_0x17639c['realtime']['listJourneys'](_0x1fff64),{'verbose':_0x5a82b0[_0x104843(0x148)]}),_0x3239c1=_0x314918[_0x104843(0x20f)];console['error']('✔\x20Found\x20'+_0x3239c1[_0x104843(0x1a8)]+_0x104843(0x1b2)+(_0x3239c1[_0x104843(0x1a8)]!==0x1?'s':''));if(_0x5a82b0['format']===_0x104843(0x2d4)||_0x5a82b0[_0x104843(0x2c5)]===_0x104843(0x237))await handleSDKOutput(_0x3239c1,_0x5a82b0);else{if(_0x3239c1[_0x104843(0x1a8)]===0x0)console[_0x104843(0x25e)]('No\x20RT\x20journeys\x20found');else for(const _0xfd7b47 of _0x3239c1){const _0x10a686=_0xfd7b47[_0x104843(0x2cb)]===_0x104843(0x225)?'🚀':'📝',_0x36d9ab=_0xfd7b47[_0x104843(0x1c6)]?a31_0x2d8ea2[_0x104843(0x168)]('\x20(paused)'):'',_0x7e0617=a31_0x2d8ea2[_0x104843(0x1b3)]('\x20('+_0xfd7b47['stageCount']+'\x20stage'+(_0xfd7b47[_0x104843(0x15e)]!==0x1?'s':'')+')');console['log'](_0x10a686+'\x20'+_0xfd7b47['name']+_0x36d9ab+_0x7e0617);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']='ps:rt:jn:pause';[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x164);async[a31_0x1cf65c(0x242)](_0x20dc31){const _0x5b054b=a31_0x1cf65c,{options:_0x1607fc,args:_0x240dff,tdx:_0x2d1572}=_0x20dc31,_0x3ade0e=_0x240dff[0x0];if(!_0x3ade0e)return console[_0x5b054b(0xff)](a31_0x2d8ea2[_0x5b054b(0x1f0)](_0x5b054b(0x2d3))),console[_0x5b054b(0xff)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console['error'](a31_0x2d8ea2[_0x5b054b(0x1b3)](_0x5b054b(0x23c))),0x1;_0x1607fc[_0x5b054b(0x148)]&&(console[_0x5b054b(0xff)](_0x5b054b(0x1a3)+_0x1607fc[_0x5b054b(0x22f)]),console[_0x5b054b(0xff)](_0x5b054b(0x16c)+_0x3ade0e));const _0x48154c=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3ade0e+_0x5b054b(0x289),()=>_0x2d1572[_0x5b054b(0x297)][_0x5b054b(0x24d)](_0x3ade0e),{'verbose':_0x1607fc[_0x5b054b(0x148)]}),_0x5f4075=_0x48154c['data'];console[_0x5b054b(0xff)](_0x5b054b(0x172)+_0x5f4075['name']+'\x27');if(_0x1607fc[_0x5b054b(0x2c5)]===_0x5b054b(0x2d4)||_0x1607fc[_0x5b054b(0x2c5)]==='jsonl')await handleSDKOutput([_0x5f4075],_0x1607fc);else{const _0x599a77=_0x5f4075[_0x5b054b(0x2cb)]===_0x5b054b(0x225)?'🚀':'📝',_0x37610c=_0x5f4075[_0x5b054b(0x1c6)]?a31_0x2d8ea2[_0x5b054b(0x168)](_0x5b054b(0x26b)):'';console[_0x5b054b(0x25e)](_0x599a77+'\x20'+_0x5f4075[_0x5b054b(0x1fb)]+_0x37610c);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x252);[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x110);async[a31_0x1cf65c(0x242)](_0x1dde23){const _0x681e93=a31_0x1cf65c,{options:_0x4a913c,args:_0x5d45af,tdx:_0x10ed03}=_0x1dde23,_0x59917d=_0x5d45af[0x0];if(!_0x59917d)return console['error'](a31_0x2d8ea2['red'](_0x681e93(0x2d3))),console[_0x681e93(0xff)](_0x681e93(0x1cb)),console[_0x681e93(0xff)](a31_0x2d8ea2[_0x681e93(0x1b3)](_0x681e93(0x23c))),0x1;_0x4a913c[_0x681e93(0x148)]&&(console['error'](_0x681e93(0x1a3)+_0x4a913c[_0x681e93(0x22f)]),console['error']('RT\x20Journey\x20ID:\x20'+_0x59917d));const _0x4789b7=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x59917d+_0x681e93(0x289),()=>_0x10ed03[_0x681e93(0x297)]['resumeJourney'](_0x59917d),{'verbose':_0x4a913c[_0x681e93(0x148)]}),_0x5831ad=_0x4789b7[_0x681e93(0x20f)];console[_0x681e93(0xff)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x5831ad[_0x681e93(0x1fb)]+'\x27');if(_0x4a913c[_0x681e93(0x2c5)]==='json'||_0x4a913c[_0x681e93(0x2c5)]===_0x681e93(0x237))await handleSDKOutput([_0x5831ad],_0x4a913c);else{const _0x49747d=_0x5831ad['state']===_0x681e93(0x225)?'🚀':'📝',_0x3fd8e5=_0x5831ad[_0x681e93(0x1c6)]?a31_0x2d8ea2[_0x681e93(0x168)]('\x20(paused)'):'';console['log'](_0x49747d+'\x20'+_0x5831ad[_0x681e93(0x1fb)]+_0x3fd8e5);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x2e2);['description']=a31_0x1cf65c(0x101);async[a31_0x1cf65c(0x242)](_0x52a646){const _0x446345=a31_0x1cf65c,{options:_0x3aec3d,args:_0x5e0435,tdx:_0x54d78a}=_0x52a646,_0xd6aeb1=_0x5e0435[0x0]||_0x3aec3d[_0x446345(0x128)];if(!_0xd6aeb1)return showParentSegmentNotSetError(_0x446345(0x29a)+_0x446345(0x12a)),0x1;_0x3aec3d[_0x446345(0x148)]&&(console[_0x446345(0xff)](_0x446345(0x1a3)+_0x3aec3d[_0x446345(0x22f)]),console[_0x446345(0xff)](_0x446345(0x1e5)+_0xd6aeb1));const _0x3ebf2d=await withSpinner(_0x446345(0x126)+_0xd6aeb1+_0x446345(0x289),()=>_0x54d78a['segment']['resolveParentId'](_0xd6aeb1),{'verbose':_0x3aec3d[_0x446345(0x148)]}),_0x3d0d41=_0x3ebf2d['data'],_0x37e92a=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0xd6aeb1+'\x27...',()=>_0x54d78a[_0x446345(0x297)]['getCurrentConfigVersion'](_0x3d0d41),{'verbose':_0x3aec3d[_0x446345(0x148)]}),_0x134e6a=_0x37e92a[_0x446345(0x20f)];return console[_0x446345(0xff)](_0x446345(0xf5)),_0x3aec3d['format']===_0x446345(0x2d4)||_0x3aec3d[_0x446345(0x2c5)]===_0x446345(0x237)?await handleSDKOutput([_0x134e6a],_0x3aec3d):(console['log']('id:\x20'+_0x134e6a['id']),console[_0x446345(0x25e)](_0x446345(0x1c2)+_0x134e6a[_0x446345(0x13e)]),console[_0x446345(0x25e)]('identifier:\x20'+_0x134e6a[_0x446345(0x22e)]),console['log'](_0x446345(0x283)+_0x134e6a['eventKind']),console[_0x446345(0x25e)]('status:\x20'+_0x134e6a[_0x446345(0x200)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x15a);['description']=a31_0x1cf65c(0x205);async['execute'](_0x5e7f4c){const _0x55640d=a31_0x1cf65c,{options:_0x4b4a9c,args:_0x2a7d05,tdx:_0x33ce9c}=_0x5e7f4c,_0x302706=_0x2a7d05[0x0]||_0x4b4a9c['parentSegment'];if(!_0x302706)return showParentSegmentNotSetError(_0x55640d(0xd6)+_0x55640d(0x248)),0x1;const _0x506b03=await withSpinner(_0x55640d(0x126)+_0x302706+_0x55640d(0x289),()=>_0x33ce9c['segment']['resolveParentId'](_0x302706),{'verbose':_0x4b4a9c[_0x55640d(0x148)]}),_0x521965=_0x506b03[_0x55640d(0x20f)],_0x3d9c17=await withSpinner(_0x55640d(0x27b)+_0x302706+_0x55640d(0x289),()=>_0x33ce9c[_0x55640d(0x271)][_0x55640d(0x103)](_0x521965),{'verbose':_0x4b4a9c[_0x55640d(0x148)]}),_0x36b4e1=_0x3d9c17['data'];console['error'](_0x55640d(0x29b)+_0x36b4e1[_0x55640d(0x1a8)]+_0x55640d(0x1db)+(_0x36b4e1[_0x55640d(0x1a8)]!==0x1?'s':''));if(_0x4b4a9c[_0x55640d(0x2c5)]===_0x55640d(0x2d4)||_0x4b4a9c['format']===_0x55640d(0x237))await handleSDKOutput(_0x36b4e1,_0x4b4a9c);else{if(_0x36b4e1[_0x55640d(0x1a8)]===0x0)console[_0x55640d(0x25e)](_0x55640d(0x189)),console[_0x55640d(0xff)](a31_0x2d8ea2[_0x55640d(0x153)](_0x55640d(0x2b9)));else for(const _0x7432bb of _0x36b4e1){console[_0x55640d(0x25e)](a31_0x2d8ea2['bold'](_0x7432bb[_0x55640d(0x1fb)])+'\x20'+a31_0x2d8ea2[_0x55640d(0x1b3)]('(id:\x20'+_0x7432bb['id']+')'));_0x7432bb[_0x55640d(0x1d6)]&&console[_0x55640d(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x55640d(0x1b3)](_0x7432bb[_0x55640d(0x1d6)]));if(_0x7432bb['tokens']&&_0x7432bb['tokens'][_0x55640d(0x1a8)]>0x0)for(const _0x2238b7 of _0x7432bb['tokens']){const _0x47e64d=_0x2238b7[_0x55640d(0x260)]?.['length']?_0x2238b7['allowedIps']['join'](',\x20'):_0x55640d(0x209);console[_0x55640d(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x55640d(0x153)](_0x55640d(0x197))+'\x20'+_0x2238b7[_0x55640d(0x1fb)]+'\x20'+a31_0x2d8ea2[_0x55640d(0x1b3)](_0x55640d(0x29e)+_0x2238b7['id']+')')),console[_0x55640d(0x25e)]('\x20\x20\x20\x20'+a31_0x2d8ea2[_0x55640d(0x1b3)](_0x55640d(0xef))+'\x20'+_0x47e64d);}else console['log']('\x20\x20'+a31_0x2d8ea2[_0x55640d(0x1b3)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x28f);['description']=a31_0x1cf65c(0x10e);async[a31_0x1cf65c(0x242)](_0x2bdaec){const _0x2f8a09=a31_0x1cf65c,{options:_0x5d47ab,args:_0x4e31b4,tdx:_0x4db1af}=_0x2bdaec,_0x5f57e8=_0x5d47ab,_0x750af0=_0x4e31b4[0x0],_0x15c0b6=_0x4e31b4[0x1]||_0x5d47ab[_0x2f8a09(0x128)];if(!_0x750af0)return console[_0x2f8a09(0xff)]('Error:\x20Service\x20name\x20is\x20required'),console[_0x2f8a09(0xff)](_0x2f8a09(0x282)),console[_0x2f8a09(0xff)](_0x2f8a09(0x23a)),0x1;if(!_0x15c0b6)return showParentSegmentNotSetError(_0x2f8a09(0x29f)+_0x2f8a09(0x23a)),0x1;const _0x3267ac=await withSpinner(_0x2f8a09(0x126)+_0x15c0b6+_0x2f8a09(0x289),()=>_0x4db1af[_0x2f8a09(0x106)][_0x2f8a09(0x2d8)](_0x15c0b6),{'verbose':_0x5d47ab[_0x2f8a09(0x148)]}),_0x60233a=_0x3267ac['data'],_0x9576e6={'name':_0x750af0,'description':_0x5f57e8['description'],'public':_0x5f57e8[_0x2f8a09(0x177)]},_0x4c6a6f=await withSpinner(_0x2f8a09(0x244)+_0x750af0+_0x2f8a09(0x289),()=>_0x4db1af[_0x2f8a09(0x271)][_0x2f8a09(0x16d)](_0x60233a,_0x9576e6),{'verbose':_0x5d47ab[_0x2f8a09(0x148)]}),_0x44f86e=_0x4c6a6f[_0x2f8a09(0x20f)];return console[_0x2f8a09(0xff)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x44f86e[_0x2f8a09(0x1fb)]+_0x2f8a09(0x273)+_0x44f86e['id']),await handleSDKOutput([_0x44f86e],_0x5d47ab),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']='ps:pz:service:show';[a31_0x1cf65c(0x1d6)]='Show\x20personalization\x20service\x20details';async[a31_0x1cf65c(0x242)](_0x38c9c3){const _0x5e8f71=a31_0x1cf65c,{options:_0x48e22c,args:_0x432e11,tdx:_0x5268c8}=_0x38c9c3,_0x1be177=_0x432e11[0x0],_0x36303b=_0x432e11[0x1]||_0x48e22c[_0x5e8f71(0x128)];if(!_0x1be177)return console[_0x5e8f71(0xff)](_0x5e8f71(0x1f6)),console[_0x5e8f71(0xff)](_0x5e8f71(0x19b)),console[_0x5e8f71(0xff)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x36303b)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 _0x34ae40=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x36303b+_0x5e8f71(0x289),()=>_0x5268c8['segment'][_0x5e8f71(0x2d8)](_0x36303b),{'verbose':_0x48e22c[_0x5e8f71(0x148)]}),_0x210270=_0x34ae40[_0x5e8f71(0x20f)],_0x4fea5b=await withSpinner(_0x5e8f71(0xf2)+_0x1be177+'\x27...',()=>_0x5268c8[_0x5e8f71(0x271)][_0x5e8f71(0x233)](_0x210270,_0x1be177),{'verbose':_0x48e22c[_0x5e8f71(0x148)]}),_0x4bf1c7=_0x4fea5b[_0x5e8f71(0x20f)];if(_0x48e22c[_0x5e8f71(0x2d4)]||_0x48e22c['jsonl'])await handleSDKOutput([_0x4bf1c7],_0x48e22c);else{console[_0x5e8f71(0x25e)](a31_0x2d8ea2['bold'](_0x4bf1c7[_0x5e8f71(0x1fb)])+'\x20'+a31_0x2d8ea2[_0x5e8f71(0x1b3)](_0x5e8f71(0x29e)+_0x4bf1c7['id']+')'));_0x4bf1c7['description']&&console['log']('\x20\x20'+a31_0x2d8ea2[_0x5e8f71(0x1b3)](_0x4bf1c7['description']));console[_0x5e8f71(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x5e8f71(0x153)](_0x5e8f71(0x11c))+'\x20'+(_0x4bf1c7[_0x5e8f71(0x177)]?_0x5e8f71(0x268):'no'));if(_0x4bf1c7[_0x5e8f71(0x231)]&&_0x4bf1c7['tokens'][_0x5e8f71(0x1a8)]>0x0)for(const _0x3312cc of _0x4bf1c7[_0x5e8f71(0x231)]){const _0x554e2c=_0x3312cc[_0x5e8f71(0x260)]?.[_0x5e8f71(0x1a8)]?_0x3312cc[_0x5e8f71(0x260)][_0x5e8f71(0x1ba)](',\x20'):_0x5e8f71(0x209);console['log']('\x20\x20'+a31_0x2d8ea2['cyan'](_0x5e8f71(0x197))+'\x20'+_0x3312cc[_0x5e8f71(0x1fb)]+'\x20'+a31_0x2d8ea2[_0x5e8f71(0x1b3)](_0x5e8f71(0x29e)+_0x3312cc['id']+')')),console[_0x5e8f71(0x25e)](_0x5e8f71(0x191)+a31_0x2d8ea2['dim'](_0x5e8f71(0xef))+'\x20'+_0x554e2c);}else console[_0x5e8f71(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x5e8f71(0x1b3)](_0x5e8f71(0x270)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0xe8);[a31_0x1cf65c(0x1d6)]='Delete\x20a\x20personalization\x20service';async[a31_0x1cf65c(0x242)](_0x4ac5f8){const _0x4a0566=a31_0x1cf65c,{options:_0x5a4702,args:_0x248c3d,tdx:_0x42f933}=_0x4ac5f8,_0x3ccc92=_0x248c3d[0x0],_0x428812=_0x248c3d[0x1]||_0x5a4702['parentSegment'];if(!_0x3ccc92)return console[_0x4a0566(0xff)](_0x4a0566(0x1f6)),console[_0x4a0566(0xff)](_0x4a0566(0xf6)),console['error'](_0x4a0566(0x1d4)),0x1;if(!_0x428812)return showParentSegmentNotSetError(_0x4a0566(0x187)+_0x4a0566(0x1d4)),0x1;const _0xb2e17c=await withSpinner(_0x4a0566(0x126)+_0x428812+_0x4a0566(0x289),()=>_0x42f933['segment'][_0x4a0566(0x2d8)](_0x428812),{'verbose':_0x5a4702['verbose']}),_0x189228=_0xb2e17c[_0x4a0566(0x20f)];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x3ccc92+_0x4a0566(0x289),()=>_0x42f933[_0x4a0566(0x271)][_0x4a0566(0x2b8)](_0x189228,_0x3ccc92),{'verbose':_0x5a4702[_0x4a0566(0x148)]}),console['error'](_0x4a0566(0x21c)+_0x3ccc92+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0xf1);['description']=a31_0x1cf65c(0x11d);async[a31_0x1cf65c(0x242)](_0x455fc8){const _0x47f073=a31_0x1cf65c,{options:_0x55f10c,args:_0x37224d,tdx:_0x4f3d43}=_0x455fc8,_0x572e2a=_0x55f10c,_0x55e302=_0x37224d[0x0],_0x1f54da=_0x37224d[0x1]||_0x55f10c[_0x47f073(0x128)];if(!_0x55e302)return console['error'](_0x47f073(0x1f6)),console[_0x47f073(0xff)](_0x47f073(0xf7)),console['error'](_0x47f073(0x267)),0x1;if(!_0x572e2a[_0x47f073(0x1fb)])return console[_0x47f073(0xff)](_0x47f073(0x169)),console[_0x47f073(0xff)](_0x47f073(0xf7)),0x1;if(!_0x1f54da)return showParentSegmentNotSetError(_0x47f073(0x10a)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x9ff28e=await withSpinner(_0x47f073(0x126)+_0x1f54da+_0x47f073(0x289),()=>_0x4f3d43[_0x47f073(0x106)][_0x47f073(0x2d8)](_0x1f54da),{'verbose':_0x55f10c[_0x47f073(0x148)]}),_0x3c14b5=_0x9ff28e[_0x47f073(0x20f)],_0x2de75b={'name':_0x572e2a[_0x47f073(0x1fb)]};_0x572e2a[_0x47f073(0x1d6)]!==undefined&&(_0x2de75b[_0x47f073(0x1d6)]=_0x572e2a[_0x47f073(0x1d6)]);const _0xa9d30f=await withSpinner(_0x47f073(0x13f)+_0x55e302+_0x47f073(0x289),()=>_0x4f3d43[_0x47f073(0x271)][_0x47f073(0x1c0)](_0x3c14b5,_0x55e302,_0x2de75b),{'verbose':_0x55f10c[_0x47f073(0x148)]}),_0x34f951=_0xa9d30f[_0x47f073(0x20f)];return console[_0x47f073(0xff)](_0x47f073(0x2bb)+_0x34f951[_0x47f073(0x1fb)]+'\x27'),await handleSDKOutput([_0x34f951],_0x55f10c),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a31_0x1cf65c(0x224);[a31_0x1cf65c(0x1d6)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a31_0x1cf65c(0x242)](_0x580d45){const _0x2afeb3=a31_0x1cf65c,{options:_0x351caf,args:_0x5043bb,tdx:_0x4543d7}=_0x580d45,_0x522129=_0x351caf,_0x24c44b=_0x5043bb[0x0],_0xdd85ff=_0x5043bb[0x1],_0x25b549=_0x5043bb[0x2]||_0x351caf[_0x2afeb3(0x128)];if(!_0x24c44b)return console[_0x2afeb3(0xff)](_0x2afeb3(0x28b)),console[_0x2afeb3(0xff)](_0x2afeb3(0x287)),console[_0x2afeb3(0xff)](_0x2afeb3(0x2d7)),0x1;if(!_0xdd85ff)return console[_0x2afeb3(0xff)](_0x2afeb3(0x1f6)),console[_0x2afeb3(0xff)](_0x2afeb3(0x287)),console[_0x2afeb3(0xff)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x25b549)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 _0x24ba3e=await withSpinner(_0x2afeb3(0x126)+_0x25b549+_0x2afeb3(0x289),()=>_0x4543d7['segment'][_0x2afeb3(0x2d8)](_0x25b549),{'verbose':_0x351caf['verbose']}),_0x14cbb3=_0x24ba3e['data'],_0xc38937={'name':_0x24c44b};_0x522129[_0x2afeb3(0x260)]&&(_0xc38937['allowedIps']=_0x522129[_0x2afeb3(0x260)]['split'](',')['map'](_0x41a5ff=>_0x41a5ff[_0x2afeb3(0x115)]()));_0x522129[_0x2afeb3(0x1d6)]&&(_0xc38937[_0x2afeb3(0x1d6)]=_0x522129[_0x2afeb3(0x1d6)]);const _0x87477c=await withSpinner('Creating\x20token\x20\x27'+_0x24c44b+'\x27\x20for\x20service\x20\x27'+_0xdd85ff+_0x2afeb3(0x289),()=>_0x4543d7['personalization'][_0x2afeb3(0x11a)](_0x14cbb3,_0xdd85ff,_0xc38937),{'verbose':_0x351caf[_0x2afeb3(0x148)]}),_0x28d954=_0x87477c[_0x2afeb3(0x20f)];return console[_0x2afeb3(0xff)](_0x2afeb3(0x17b)+_0x28d954['name']+'\x27\x20with\x20ID:\x20'+_0x28d954['id']),_0x28d954[_0x2afeb3(0x230)]&&(console[_0x2afeb3(0xff)](a31_0x2d8ea2['yellow'](_0x2afeb3(0x24a))),console[_0x2afeb3(0xff)](a31_0x2d8ea2[_0x2afeb3(0x153)](_0x28d954[_0x2afeb3(0x230)])),console[_0x2afeb3(0xff)]('')),await handleSDKOutput([_0x28d954],_0x351caf),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x1ec);[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x2c3);async[a31_0x1cf65c(0x242)](_0x2637fd){const _0x3380ca=a31_0x1cf65c,{options:_0x8a1fce,args:_0x2b50ed,tdx:_0x1b5436}=_0x2637fd,_0xb720cc=_0x2b50ed[0x0],_0xdcd7ea=_0x2b50ed[0x1]||_0x8a1fce[_0x3380ca(0x128)];if(!_0xb720cc)return console[_0x3380ca(0xff)](_0x3380ca(0x2a3)),console[_0x3380ca(0xff)](_0x3380ca(0x1e3)),console[_0x3380ca(0xff)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0xdcd7ea)return showParentSegmentNotSetError(_0x3380ca(0x181)+_0x3380ca(0xe1)),0x1;const _0x410663=await withSpinner(_0x3380ca(0x126)+_0xdcd7ea+'\x27...',()=>_0x1b5436[_0x3380ca(0x106)][_0x3380ca(0x2d8)](_0xdcd7ea),{'verbose':_0x8a1fce[_0x3380ca(0x148)]}),_0x2737bb=_0x410663[_0x3380ca(0x20f)],_0x5e516b=await withSpinner(_0x3380ca(0xfb),()=>_0x1b5436[_0x3380ca(0x271)][_0x3380ca(0x103)](_0x2737bb),{'verbose':_0x8a1fce['verbose']}),_0x471aa9=_0x5e516b[_0x3380ca(0x20f)];let _0xc95506;for(const _0xacf39 of _0x471aa9){if(_0xacf39['tokens']?.[_0x3380ca(0x291)](_0x3bd737=>_0x3bd737['id']===_0xb720cc)){_0xc95506=_0xacf39['id'];break;}}if(!_0xc95506)return console[_0x3380ca(0xff)]('Error:\x20Token\x20\x27'+_0xb720cc+_0x3380ca(0x2ab)),0x1;const _0x3238b6=await withSpinner(_0x3380ca(0x203)+_0xb720cc+_0x3380ca(0x289),()=>_0x1b5436['personalization'][_0x3380ca(0x1d7)](_0x2737bb,_0xc95506,_0xb720cc),{'verbose':_0x8a1fce[_0x3380ca(0x148)]}),_0x2ed0d5=_0x3238b6[_0x3380ca(0x20f)];return console[_0x3380ca(0xff)](_0x3380ca(0x11b)+(_0x2ed0d5['name']||_0xb720cc)+'\x27'),await handleSDKOutput([_0x2ed0d5],_0x8a1fce),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='ps:pz:list';[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0x2af);async[a31_0x1cf65c(0x242)](_0x3cc6a8){const _0xecdb37=a31_0x1cf65c,{options:_0x28c1f4,args:_0x5064c1,tdx:_0xc73bc7}=_0x3cc6a8,_0x5c96ba=_0x5064c1[0x0]||_0x28c1f4['parentSegment'];if(!_0x5c96ba)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 _0x409246=await withSpinner(_0xecdb37(0x126)+_0x5c96ba+_0xecdb37(0x289),()=>_0xc73bc7['segment'][_0xecdb37(0x2d8)](_0x5c96ba),{'verbose':_0x28c1f4['verbose']}),_0x4725ef=_0x409246[_0xecdb37(0x20f)],_0xd9b9c0=await withSpinner(_0xecdb37(0x213)+_0x5c96ba+_0xecdb37(0x289),()=>_0xc73bc7[_0xecdb37(0x271)][_0xecdb37(0x11e)](_0x4725ef),{'verbose':_0x28c1f4[_0xecdb37(0x148)]}),_0x473a04=_0xd9b9c0[_0xecdb37(0x20f)];console[_0xecdb37(0xff)](_0xecdb37(0x29b)+_0x473a04[_0xecdb37(0x1a8)]+_0xecdb37(0x204)+(_0x473a04[_0xecdb37(0x1a8)]!==0x1?'s':''));if(_0x28c1f4['format']==='json'||_0x28c1f4[_0xecdb37(0x2c5)]==='jsonl')await handleSDKOutput(_0x473a04,_0x28c1f4);else{if(_0x473a04[_0xecdb37(0x1a8)]===0x0)console[_0xecdb37(0x25e)](_0xecdb37(0x1e8));else for(const _0x551035 of _0x473a04){console[_0xecdb37(0x25e)](a31_0x2d8ea2[_0xecdb37(0x15b)](_0x551035[_0xecdb37(0x1fb)])+'\x20'+a31_0x2d8ea2['dim'](_0xecdb37(0x29e)+_0x551035['id']+')'));_0x551035[_0xecdb37(0x1d6)]&&console[_0xecdb37(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0xecdb37(0x1b3)](_0x551035[_0xecdb37(0x1d6)]));const _0x1a873d=_0x551035['sections']?.[_0xecdb37(0x1a8)]||0x0;console[_0xecdb37(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0xecdb37(0x153)](_0xecdb37(0xf9))+'\x20'+_0x1a873d);if(_0x551035[_0xecdb37(0x139)]&&_0x551035[_0xecdb37(0x139)][_0xecdb37(0x1a8)]>0x0)for(const _0x40df36 of _0x551035[_0xecdb37(0x139)]){console[_0xecdb37(0x25e)](_0xecdb37(0x125)+_0x40df36['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='ps:pz:show';[a31_0x1cf65c(0x1d6)]=a31_0x1cf65c(0xfd);async[a31_0x1cf65c(0x242)](_0x5988a3){const _0x1f254b=a31_0x1cf65c,{options:_0x529dff,args:_0x10cfab,tdx:_0x29f9a3}=_0x5988a3,_0x11bd68=_0x10cfab[0x0];if(!_0x11bd68)return console[_0x1f254b(0xff)](_0x1f254b(0x156)),console[_0x1f254b(0xff)](_0x1f254b(0x1f1)),0x1;const _0x5bce67=await withSpinner(_0x1f254b(0x2c2)+_0x11bd68+_0x1f254b(0x289),()=>_0x29f9a3['personalization']['getPersonalization'](_0x11bd68),{'verbose':_0x529dff[_0x1f254b(0x148)]}),_0x1b21d7=_0x5bce67[_0x1f254b(0x20f)];console['error']('✔\x20Found\x20personalization\x20\x27'+_0x1b21d7[_0x1f254b(0x1fb)]+'\x27');if(_0x529dff[_0x1f254b(0x2c5)]===_0x1f254b(0x2d4)||_0x529dff['format']===_0x1f254b(0x237))await handleSDKOutput([_0x1b21d7],_0x529dff);else{console[_0x1f254b(0x25e)](a31_0x2d8ea2['bold'](_0x1b21d7[_0x1f254b(0x1fb)])+'\x20'+a31_0x2d8ea2['dim']('(id:\x20'+_0x1b21d7['id']+')'));_0x1b21d7[_0x1f254b(0x1d6)]&&console[_0x1f254b(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x1f254b(0x1b3)](_0x1b21d7[_0x1f254b(0x1d6)]));_0x1b21d7[_0x1f254b(0x13e)]&&console[_0x1f254b(0x25e)]('\x20\x20'+a31_0x2d8ea2['cyan'](_0x1f254b(0x250))+'\x20'+_0x1b21d7[_0x1f254b(0x13e)]);console[_0x1f254b(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x1f254b(0x153)](_0x1f254b(0x275))+'\x20'+_0x1b21d7[_0x1f254b(0x17a)]),console[_0x1f254b(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x1f254b(0x153)](_0x1f254b(0x2bf))+'\x20'+_0x1b21d7['updatedAt']);const _0x3411ab=_0x1b21d7['sections']?.[_0x1f254b(0x1a8)]||0x0;console[_0x1f254b(0x25e)]('\x20\x20'+a31_0x2d8ea2[_0x1f254b(0x153)](_0x1f254b(0xf9))+'\x20'+_0x3411ab);if(_0x1b21d7[_0x1f254b(0x139)]&&_0x1b21d7[_0x1f254b(0x139)][_0x1f254b(0x1a8)]>0x0)for(const _0x2aab9c of _0x1b21d7['sections']){console[_0x1f254b(0x25e)](_0x1f254b(0x191)+a31_0x2d8ea2[_0x1f254b(0x15b)](_0x2aab9c[_0x1f254b(0x1fb)])+'\x20'+a31_0x2d8ea2['dim'](_0x1f254b(0x29e)+_0x2aab9c['id']+')')),_0x2aab9c[_0x1f254b(0x241)]&&(console['log'](_0x1f254b(0xec)+a31_0x2d8ea2['cyan'](_0x1f254b(0x20b))+'\x20'+_0x2aab9c[_0x1f254b(0x241)]['name']),_0x2aab9c[_0x1f254b(0x241)][_0x1f254b(0x136)]?.[_0x1f254b(0x160)]&&console[_0x1f254b(0x25e)](_0x1f254b(0x20e)+a31_0x2d8ea2['cyan'](_0x1f254b(0x170))+'\x20'+_0x2aab9c[_0x1f254b(0x241)][_0x1f254b(0x136)][_0x1f254b(0x160)])),_0x2aab9c[_0x1f254b(0x1b8)]&&console[_0x1f254b(0x25e)](_0x1f254b(0xec)+a31_0x2d8ea2['cyan'](_0x1f254b(0x2a1))+'\x20'+JSON[_0x1f254b(0x2d1)](_0x2aab9c[_0x1f254b(0x1b8)])),_0x2aab9c[_0x1f254b(0x105)]&&console[_0x1f254b(0x25e)]('\x20\x20\x20\x20\x20\x20'+a31_0x2d8ea2[_0x1f254b(0x153)]('includeSensitive:')+_0x1f254b(0x243));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]='ps:pz:delete';[a31_0x1cf65c(0x1d6)]='Delete\x20a\x20realtime\x20personalization';async[a31_0x1cf65c(0x242)](_0x2e9753){const _0x5a5681=a31_0x1cf65c,{options:_0xf9df27,args:_0x3907b0,tdx:_0x85bb98}=_0x2e9753,_0x313bc1=_0x3907b0[0x0];if(!_0x313bc1)return console[_0x5a5681(0xff)](_0x5a5681(0x156)),console[_0x5a5681(0xff)](_0x5a5681(0xe6)),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0x313bc1+_0x5a5681(0x289),()=>_0x85bb98['personalization'][_0x5a5681(0x2dc)](_0x313bc1),{'verbose':_0xf9df27[_0x5a5681(0x148)]}),console[_0x5a5681(0xff)](_0x5a5681(0x28c)+_0x313bc1+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x1cf65c(0x1fb)]=a31_0x1cf65c(0x122);['description']='Create\x20a\x20realtime\x20personalization\x20entity';async[a31_0x1cf65c(0x242)](_0x964176){const _0x153eda=a31_0x1cf65c,{options:_0x590938,tdx:_0x161a6a}=_0x964176,_0x2f684c=_0x590938;let _0x560036;if(_0x2f684c[_0x153eda(0x1aa)]){_0x560036=await loadJSON(_0x2f684c[_0x153eda(0x1aa)],!![]);if(!_0x560036[_0x153eda(0xe7)]?.[_0x153eda(0x130)])return console['error']('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console[_0x153eda(0xff)](_0x153eda(0x14b)),console[_0x153eda(0xff)](_0x153eda(0x2b6)),0x1;}else{if(!_0x2f684c[_0x153eda(0x1fb)])return console[_0x153eda(0xff)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x153eda(0xff)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x153eda(0xff)](_0x153eda(0x210)),0x1;if(_0x2f684c[_0x153eda(0x1d6)]===undefined)return console[_0x153eda(0xff)](_0x153eda(0x25c)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0x153eda(0x210)),0x1;if(_0x2f684c[_0x153eda(0x2d5)]===undefined)return console[_0x153eda(0xff)](_0x153eda(0x1a4)),console[_0x153eda(0xff)](_0x153eda(0x261)),0x1;let _0x44eae7=_0x2f684c[_0x153eda(0x13e)];if(!_0x44eae7&&_0x590938[_0x153eda(0x128)]){const _0x582fbb=await withSpinner(_0x153eda(0x126)+_0x590938[_0x153eda(0x128)]+_0x153eda(0x289),()=>_0x161a6a[_0x153eda(0x106)][_0x153eda(0x2d8)](_0x590938[_0x153eda(0x128)]),{'verbose':_0x590938[_0x153eda(0x148)]});_0x44eae7=_0x582fbb[_0x153eda(0x20f)];}let _0x19d754;_0x2f684c[_0x153eda(0x139)]&&(_0x19d754=await loadJSON(_0x2f684c[_0x153eda(0x139)],![]));const _0x593f96=_0x2f684c[_0x153eda(0x2d5)]===_0x153eda(0xe2)?null:{'id':_0x2f684c[_0x153eda(0x2d5)],'type':_0x153eda(0xe9)};_0x560036={'attributes':{'name':_0x2f684c['name'],'description':_0x2f684c['description']||null,..._0x44eae7!==undefined&&{'audienceId':_0x44eae7},..._0x19d754!==undefined&&{'sections':_0x19d754}},'relationships':{'parentFolder':{'data':_0x593f96}}};}const _0x2d5d83=await withSpinner(_0x153eda(0x1fc)+(_0x560036['attributes']?.[_0x153eda(0x1fb)]??'')+_0x153eda(0x289),()=>_0x161a6a[_0x153eda(0x271)]['createPersonalization'](_0x560036),{'verbose':_0x590938[_0x153eda(0x148)]}),_0x580b83=_0x2d5d83[_0x153eda(0x20f)];return console[_0x153eda(0xff)]('✔\x20Created\x20personalization\x20\x27'+_0x580b83[_0x153eda(0x1fb)]+_0x153eda(0x273)+_0x580b83['id']),await handleSDKOutput([_0x580b83],_0x590938),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x1cf65c(0x220);[a31_0x1cf65c(0x1d6)]='Update\x20a\x20realtime\x20personalization\x20entity';async[a31_0x1cf65c(0x242)](_0x3f2017){const _0x6003b4=a31_0x1cf65c,{options:_0xbd881a,args:_0x53397b}=_0x3f2017,_0x4ca157=_0xbd881a,_0xe6ef3e=_0x53397b[0x0];if(!_0xe6ef3e)return console['error'](_0x6003b4(0x156)),console[_0x6003b4(0xff)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x6003b4(0xff)](_0x6003b4(0x100)),0x1;let _0x43888b;if(_0x4ca157[_0x6003b4(0x1aa)])_0x43888b=await loadJSON(_0x4ca157['file'],!![]);else{if(!_0x4ca157['name'])return console[_0x6003b4(0xff)](_0x6003b4(0x24c)),console[_0x6003b4(0xff)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x4ca157['description']===undefined)return console[_0x6003b4(0xff)](_0x6003b4(0x25c)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x381a19;_0x4ca157[_0x6003b4(0x139)]&&(_0x381a19=await loadJSON(_0x4ca157[_0x6003b4(0x139)],![])),_0x43888b={'attributes':{'name':_0x4ca157['name'],'description':_0x4ca157[_0x6003b4(0x1d6)]||null,..._0x381a19!==undefined&&{'sections':_0x381a19}}};}const {tdx:_0x5bf54e}=_0x3f2017,_0x485601=await withSpinner(_0x6003b4(0x2ce)+_0xe6ef3e+_0x6003b4(0x289),()=>_0x5bf54e[_0x6003b4(0x271)][_0x6003b4(0x1c5)](_0xe6ef3e,_0x43888b),{'verbose':_0xbd881a['verbose']}),_0x453f11=_0x485601[_0x6003b4(0x20f)];return console[_0x6003b4(0xff)](_0x6003b4(0x21b)+_0x453f11[_0x6003b4(0x1fb)]+_0x6003b4(0x23d)+_0x453f11['id']+')'),await handleSDKOutput([_0x453f11],_0xbd881a),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']=a31_0x1cf65c(0xe4);['description']=a31_0x1cf65c(0x235);async['execute'](_0x47f25b){const _0x2082a1=a31_0x1cf65c,{options:_0x4eae0b,args:_0x4aa955}=_0x47f25b,_0x3a17f1=_0x4aa955[0x0]||_0x4eae0b[_0x2082a1(0x128)];if(!_0x3a17f1)return showParentSegmentNotSetError(_0x2082a1(0xdc)+_0x2082a1(0x1f7)),0x1;const _0x592c7e=resolveYamlFile(_0x3a17f1);if(!existsSync(_0x592c7e))return showFileNotFoundError(_0x592c7e,_0x3a17f1),0x1;let _0x63dc6d;try{_0x63dc6d=readFileSync(_0x592c7e,'utf-8');}catch(_0x118e75){const _0x3b68f4=_0x118e75 instanceof Error?_0x118e75[_0x2082a1(0x24f)]:String(_0x118e75);return console[_0x2082a1(0xff)]('Error\x20reading\x20file:\x20'+_0x3b68f4),0x1;}let _0x452466;try{_0x452466=parseDef(_0x63dc6d);}catch(_0x112be3){const _0x8440e8=_0x112be3 instanceof Error?_0x112be3['message']:String(_0x112be3);return console[_0x2082a1(0xff)](a31_0x2d8ea2['red']('Error\x20parsing\x20YAML:\x20'+_0x8440e8)),0x1;}if(_0x452466['personalization_services']&&_0x452466[_0x2082a1(0x219)][_0x2082a1(0x1a8)]>0x0)return console[_0x2082a1(0xff)](a31_0x2d8ea2[_0x2082a1(0x168)](_0x2082a1(0x238)+_0x592c7e)),console[_0x2082a1(0xff)](a31_0x2d8ea2[_0x2082a1(0x1b3)](_0x2082a1(0x272)+_0x452466[_0x2082a1(0x219)]['length']+_0x2082a1(0x26f))),0x1;!_0x452466[_0x2082a1(0x297)]&&(_0x452466['realtime']={'events':[{'name':_0x2082a1(0x2c6),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x2082a1(0xdf),'type':'single'}],'id_stitching':{'primary_key':_0x452466['master']['table']===_0x2082a1(0x2b2)?'td_client_id':_0x2082a1(0x277)}});_0x452466[_0x2082a1(0x219)]=[{'name':_0x2082a1(0x1fa),'description':'Personalization\x20service\x20description','trigger_event':_0x2082a1(0x2c6),'sections':[{'name':_0x2082a1(0x131),'criteria':'true','attributes':[_0x2082a1(0xdf)]}]}];const _0x3e7b8a=serializeDef(_0x452466);return writeFileSync(_0x592c7e,_0x3e7b8a,_0x2082a1(0xd7)),console[_0x2082a1(0xff)](a31_0x2d8ea2['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x2d8ea2[_0x2082a1(0x153)](_0x592c7e)),(!_0x452466[_0x2082a1(0x297)]||_0x63dc6d['indexOf'](_0x2082a1(0x19f))===-0x1)&&console[_0x2082a1(0xff)](a31_0x2d8ea2['green']('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console['error']('\x0a'+a31_0x2d8ea2[_0x2082a1(0x1b3)](_0x2082a1(0x202))),console[_0x2082a1(0xff)]('\x20\x201.\x20Edit\x20'+_0x592c7e+_0x2082a1(0x102)),console['error'](_0x2082a1(0x257)+a31_0x2d8ea2[_0x2082a1(0x1b3)](_0x2082a1(0x12b)+_0x3a17f1)+'\x20to\x20push\x20the\x20configuration'),0x0;}}
|
|
1
|
+
const a31_0x4d721b=a31_0x5b22;(function(_0x3556ff,_0x2d3e07){const _0x5a1c3e=a31_0x5b22,_0x8874a6=_0x3556ff();while(!![]){try{const _0x4eead7=parseInt(_0x5a1c3e(0x128))/0x1+parseInt(_0x5a1c3e(0x154))/0x2*(parseInt(_0x5a1c3e(0xc9))/0x3)+-parseInt(_0x5a1c3e(0x1b3))/0x4+parseInt(_0x5a1c3e(0x100))/0x5+-parseInt(_0x5a1c3e(0x1a4))/0x6*(parseInt(_0x5a1c3e(0x1f1))/0x7)+parseInt(_0x5a1c3e(0x2a7))/0x8*(-parseInt(_0x5a1c3e(0x160))/0x9)+parseInt(_0x5a1c3e(0x264))/0xa*(parseInt(_0x5a1c3e(0x1cc))/0xb);if(_0x4eead7===_0x2d3e07)break;else _0x8874a6['push'](_0x8874a6['shift']());}catch(_0x570b95){_0x8874a6['push'](_0x8874a6['shift']());}}}(a31_0x15f1,0x22657));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x151113 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_0x58debf 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_0x4d721b(0x2b3),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x50688d){const _0x296f6e=a31_0x4d721b,_0x1c53af=process[_0x296f6e(0x25b)],_0x2deabe=_0x1c53af===_0x296f6e(0xe9)?_0x296f6e(0x237):_0x1c53af===_0x296f6e(0x153)?_0x296f6e(0x13f):_0x296f6e(0x27c);spawn(_0x2deabe,[_0x50688d],{'detached':!![],'stdio':_0x296f6e(0x185)})[_0x296f6e(0xeb)]();}function migrateLegacyDirectory(){const _0x355d98=a31_0x4d721b;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x8fb86f=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x8fb86f[_0x355d98(0x120)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x58debf[_0x355d98(0xd8)](_0x355d98(0x20a)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console[_0x355d98(0xbb)](a31_0x58debf['dim'](_0x355d98(0x21f)+LEGACY_PARENT_SEGMENT_DIR+_0x355d98(0x243))),![];console[_0x355d98(0xbb)](a31_0x58debf[_0x355d98(0xd8)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x355d98(0x187)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x355d98(0xbb)](a31_0x58debf['green'](_0x355d98(0x196)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x451cf8){const _0x175dac=_0x451cf8 instanceof Error?_0x451cf8[_0x355d98(0x1cb)]:String(_0x451cf8);return console['error'](a31_0x58debf['red'](_0x355d98(0x116)+_0x175dac+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x3b7e04){const _0x192291=a31_0x4d721b;return migrateLegacyDirectory(),super[_0x192291(0x1c3)](_0x3b7e04);}}function resolveYamlFile(_0x5239a4){const _0x513561=a31_0x4d721b;if(_0x5239a4[_0x513561(0x1df)](_0x513561(0x109))||_0x5239a4[_0x513561(0x1df)]('.yaml'))return _0x5239a4;return a31_0x151113['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x5239a4)+_0x513561(0x109));}function formatProgressMessage(_0x16ccfe){const _0xefd5c3=a31_0x4d721b,_0x9b0ccf=_0x16ccfe[_0xefd5c3(0x270)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x9b0ccf){const [,_0x4ef760,_0x2c4eda,_0x6e86b5='']=_0x9b0ccf;return a31_0x58debf[_0xefd5c3(0x161)](_0x4ef760+':')+'\x20'+_0x2c4eda+a31_0x58debf['dim'](_0x6e86b5);}return a31_0x58debf[_0xefd5c3(0x161)](_0x16ccfe);}function showFileNotFoundError(_0x4c1587,_0x471d2c){const _0x4cccd5=a31_0x4d721b;console[_0x4cccd5(0xbb)](a31_0x58debf[_0x4cccd5(0xfb)]('Error:\x20File\x20not\x20found:\x20'+_0x4c1587+'\x0a')),console[_0x4cccd5(0xbb)](a31_0x58debf[_0x4cccd5(0x1bf)](_0x4cccd5(0x240)+_0x471d2c+_0x4cccd5(0x27f)));}function displayRealtimeValidation(_0x482f29){const _0x494a62=a31_0x4d721b;if(!_0x482f29[_0x494a62(0x1f3)])return;const _0x460b52=_0x482f29[_0x494a62(0x1f3)],_0x5694d2=_0x460b52[_0x494a62(0x1ce)]?a31_0x58debf['green']('⚡\x20Enabled'):a31_0x58debf[_0x494a62(0xd8)](_0x494a62(0xdb));console[_0x494a62(0xbb)]('\x0a'+a31_0x58debf[_0x494a62(0x161)](_0x494a62(0x11c))+'\x20'+_0x5694d2);if(_0x460b52[_0x494a62(0x28c)]&&_0x460b52['events'][_0x494a62(0x1db)]>0x0){console[_0x494a62(0xbb)]('\x20\x20'+a31_0x58debf['dim'](_0x494a62(0x293))+'\x20'+_0x460b52[_0x494a62(0x28c)][_0x494a62(0x1db)]+_0x494a62(0x217));for(const _0x1ba132 of _0x460b52[_0x494a62(0x28c)]){const _0x50192e=_0x1ba132[_0x494a62(0x28a)]===![]?a31_0x58debf[_0x494a62(0xfb)]('✘'):a31_0x58debf[_0x494a62(0x219)]('✔');console[_0x494a62(0xbb)](_0x494a62(0x1e8)+_0x50192e+'\x20'+_0x1ba132[_0x494a62(0x1ab)]),_0x1ba132[_0x494a62(0x165)]&&console[_0x494a62(0xbb)](_0x494a62(0x129)+a31_0x58debf['red'](_0x1ba132['sourceTableError']));}}if(_0x460b52['attributes']&&_0x460b52[_0x494a62(0xd9)][_0x494a62(0x1db)]>0x0){console[_0x494a62(0xbb)]('\x20\x20'+a31_0x58debf[_0x494a62(0x161)](_0x494a62(0x26d))+'\x20'+_0x460b52[_0x494a62(0xd9)]['length']+_0x494a62(0x217));for(const _0xea09c9 of _0x460b52[_0x494a62(0xd9)]){const _0x3a63ca=_0xea09c9[_0x494a62(0x25f)]?a31_0x58debf[_0x494a62(0x219)]('✔'):a31_0x58debf[_0x494a62(0xfb)]('✘');console['error'](_0x494a62(0x1e8)+_0x3a63ca+'\x20'+_0xea09c9[_0x494a62(0x1ab)]+'\x20'+a31_0x58debf[_0x494a62(0x161)]('('+_0xea09c9[_0x494a62(0x1ac)]+')'));}}if(_0x460b52[_0x494a62(0xa8)]){const _0x5ecb6c=_0x460b52['idStitching'][_0x494a62(0x290)]?.[_0x494a62(0x1db)]?_0x494a62(0xba)+_0x460b52[_0x494a62(0xa8)][_0x494a62(0x290)]['join'](',\x20')+']':'';console['error']('\x20\x20'+a31_0x58debf[_0x494a62(0x161)](_0x494a62(0x13e))+'\x20'+_0x460b52[_0x494a62(0xa8)][_0x494a62(0xb1)]+_0x5ecb6c);}if(_0x460b52[_0x494a62(0x2b0)]&&_0x460b52[_0x494a62(0x2b0)][_0x494a62(0x1db)]>0x0){console[_0x494a62(0xbb)]('\x20\x20'+a31_0x58debf['dim'](_0x494a62(0xf2))+'\x20'+_0x460b52[_0x494a62(0x2b0)][_0x494a62(0x1db)]+_0x494a62(0x29c)+(_0x460b52[_0x494a62(0x2b0)]['length']!==0x1?'s':''));for(const _0xbd4790 of _0x460b52[_0x494a62(0x2b0)]){console[_0x494a62(0xbb)](_0x494a62(0x1ef)+_0xbd4790['name']);}}}function showParentSegmentNotSetError(_0x5799f2){const _0x508c92=a31_0x4d721b;console[_0x508c92(0xbb)](a31_0x58debf['yellow'](_0x508c92(0x249))),console[_0x508c92(0xbb)](_0x5799f2);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x1b0);[a31_0x4d721b(0x170)]='List\x20parent\x20segments';async[a31_0x4d721b(0x26f)](_0x385617){const _0x23d0ff=a31_0x4d721b,{options:_0x347fd4,args:_0x36f056,tdx:_0x2c8cc8}=_0x385617,_0x4cd412=_0x36f056[0x0];_0x347fd4['verbose']&&(console[_0x23d0ff(0xbb)](_0x23d0ff(0xe8)+_0x347fd4[_0x23d0ff(0x15a)]),_0x4cd412&&console[_0x23d0ff(0xbb)](_0x23d0ff(0x227)+_0x4cd412));const _0x53ca1f=await withSpinner(_0x4cd412?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x4cd412+_0x23d0ff(0x287):'Listing\x20parent\x20segments...',()=>_0x2c8cc8[_0x23d0ff(0x285)][_0x23d0ff(0x169)](),{'verbose':_0x347fd4[_0x23d0ff(0x117)]});let _0x16472f=_0x53ca1f[_0x23d0ff(0x12c)];if(_0x4cd412){const _0x209a05=_0x4cd412[_0x23d0ff(0x1ca)](/[.+^${}()|[\]\\]/g,_0x23d0ff(0x158))[_0x23d0ff(0x1ca)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x5b24d4=new RegExp('^'+_0x209a05+'$','i');_0x16472f=_0x16472f[_0x23d0ff(0x1fc)](_0x597dd8=>_0x5b24d4[_0x23d0ff(0x183)](_0x597dd8[_0x23d0ff(0xd9)][_0x23d0ff(0x1ab)]));}_0x16472f[_0x23d0ff(0x1b6)]((_0x166080,_0x40fa95)=>_0x166080['attributes'][_0x23d0ff(0x1ab)][_0x23d0ff(0x14a)](_0x40fa95['attributes']['name'])),console[_0x23d0ff(0xbb)](_0x23d0ff(0x192)+_0x16472f[_0x23d0ff(0x1db)]+_0x23d0ff(0xb6)+(_0x16472f['length']!==0x1?'s':''));const _0x4c671a=_0x18708a=>{const _0x1aee3a=_0x23d0ff;return getConsoleNextUrl(_0x347fd4[_0x1aee3a(0x15a)],_0x1aee3a(0x20e)+_0x18708a);};if(_0x347fd4[_0x23d0ff(0x15c)]==='json'||_0x347fd4[_0x23d0ff(0x15c)]===_0x23d0ff(0x19d)){const _0x3e275d=_0x16472f['map'](_0x4cdf23=>({..._0x4cdf23,'url':_0x4c671a(_0x4cdf23['id'])}));await handleSDKOutput(_0x3e275d,_0x347fd4);}else{if(_0x16472f[_0x23d0ff(0x1db)]===0x0)_0x4cd412?console['log'](_0x23d0ff(0x143)+_0x4cd412):console['log'](_0x23d0ff(0x1f6));else for(const _0x1e1e22 of _0x16472f){const _0x295654=_0x1e1e22[_0x23d0ff(0xd9)][_0x23d0ff(0x22f)]?a31_0x58debf['dim']('\x20('+formatRows(_0x1e1e22[_0x23d0ff(0xd9)]['population'])+')'):'',_0x5b714f=hyperlink(_0x1e1e22[_0x23d0ff(0xd9)][_0x23d0ff(0x1ab)],_0x4c671a(_0x1e1e22['id']));console[_0x23d0ff(0x175)](_0x23d0ff(0x1e3)+_0x5b714f+_0x295654);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x278);[a31_0x4d721b(0x170)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a31_0x4d721b(0x26f)](_0x1197af){const _0x467cbf=a31_0x4d721b,{options:_0x35e692,args:_0x3a40db,tdx:_0x45ff26}=_0x1197af;console[_0x467cbf(0xbb)](_0x467cbf(0x245)+_0x467cbf(0x2b2)+_0x467cbf(0x1ad));const _0x4eb89c=_0x35e692;if(_0x3a40db[_0x467cbf(0x1db)]===0x0)return console[_0x467cbf(0xbb)](a31_0x58debf['red'](_0x467cbf(0x1a5))),console[_0x467cbf(0xbb)](_0x467cbf(0x123)),0x1;const _0x438340=_0x3a40db[0x0];if(!_0x4eb89c['database']||!_0x4eb89c[_0x467cbf(0xa5)])return console[_0x467cbf(0xbb)](_0x467cbf(0x1cf)),console[_0x467cbf(0xbb)](_0x467cbf(0x123)),0x1;_0x4eb89c['verbose']&&(console[_0x467cbf(0xbb)](_0x467cbf(0xe8)+_0x4eb89c[_0x467cbf(0x15a)]),console[_0x467cbf(0xbb)](_0x467cbf(0x15b)+_0x438340),console[_0x467cbf(0xbb)](_0x467cbf(0x17f)+_0x4eb89c['database']),console['error']('Table:\x20'+_0x4eb89c[_0x467cbf(0xa5)]));const _0x5c1c2b=await loadJSONFromOptions(_0x4eb89c[_0x467cbf(0xd9)],_0x4eb89c[_0x467cbf(0x1fb)]),_0x549e37=await loadJSONFromOptions(_0x4eb89c[_0x467cbf(0x16d)],_0x4eb89c[_0x467cbf(0x1de)]),_0x4bf586=await loadJSONFromOptions(_0x4eb89c[_0x467cbf(0xd4)],_0x4eb89c['customerGroupFile']),_0xee641e={'name':_0x438340,'description':_0x4eb89c[_0x467cbf(0x170)],'scheduleType':_0x4eb89c['scheduleType'],'scheduleOption':_0x4eb89c[_0x467cbf(0x1d1)],'timezone':_0x4eb89c[_0x467cbf(0x12b)],'master':{'parentDatabaseName':_0x4eb89c[_0x467cbf(0x15f)],'parentTableName':_0x4eb89c[_0x467cbf(0xa5)]},'attributes':_0x5c1c2b,'behaviors':_0x549e37,'customerGroup':_0x4bf586},_0x6e8746=await withSpinner(_0x467cbf(0x288)+_0x438340+_0x467cbf(0x287),()=>_0x45ff26[_0x467cbf(0x285)][_0x467cbf(0x157)](_0xee641e),{'verbose':_0x35e692['verbose']}),_0x10b923=_0x6e8746[_0x467cbf(0x12c)];return console[_0x467cbf(0xbb)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x10b923[_0x467cbf(0x1ab)]+_0x467cbf(0x20f)+_0x10b923['id']),await handleSDKOutput([_0x10b923],_0x35e692),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x12f);[a31_0x4d721b(0x170)]='Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a31_0x4d721b(0x26f)](_0x33acb9){const _0x4e8da5=a31_0x4d721b,{options:_0x3e2741,args:_0x124705,tdx:_0x3667ba}=_0x33acb9;console[_0x4e8da5(0xbb)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x4e8da5(0x2b2)+_0x4e8da5(0x1ad));const _0x434489=_0x3e2741;if(_0x124705[_0x4e8da5(0x1db)]===0x0)return console['error'](a31_0x58debf[_0x4e8da5(0xfb)](_0x4e8da5(0x1a5))),console[_0x4e8da5(0xbb)]('Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'),0x1;const _0x522eaf=_0x124705[0x0];_0x434489['verbose']&&(console[_0x4e8da5(0xbb)](_0x4e8da5(0xe8)+_0x434489['site']),console[_0x4e8da5(0xbb)](_0x4e8da5(0x10a)+_0x522eaf));const _0x4193eb=await withSpinner(_0x4e8da5(0x1eb)+_0x522eaf+_0x4e8da5(0x287),()=>_0x3667ba['segment'][_0x4e8da5(0x118)](_0x522eaf),{'verbose':_0x434489[_0x4e8da5(0x117)]}),_0x305de7=_0x4193eb['data'],_0x1756d9=await loadJSONFromOptions(_0x434489['addAttributes'],_0x434489[_0x4e8da5(0xb8)]),_0x3899ec=await loadJSONFromOptions(_0x434489[_0x4e8da5(0x1d7)],_0x434489[_0x4e8da5(0x137)]),_0xc7bcb6={'name':_0x305de7['name'],'description':_0x434489[_0x4e8da5(0x170)]!==undefined?_0x434489[_0x4e8da5(0x170)]:_0x305de7[_0x4e8da5(0x170)],'scheduleType':_0x434489[_0x4e8da5(0x19c)]!==undefined?_0x434489[_0x4e8da5(0x19c)]:_0x305de7['scheduleType'],'scheduleOption':_0x434489[_0x4e8da5(0x1d1)]!==undefined?_0x434489[_0x4e8da5(0x1d1)]:_0x305de7['scheduleOption'],'timezone':_0x434489[_0x4e8da5(0x12b)]!==undefined?_0x434489['timezone']:_0x305de7[_0x4e8da5(0x12b)],'master':_0x305de7[_0x4e8da5(0x21e)],'attributes':_0x1756d9?[..._0x305de7[_0x4e8da5(0xd9)]||[],..._0x1756d9]:_0x305de7[_0x4e8da5(0xd9)],'behaviors':_0x3899ec?[..._0x305de7[_0x4e8da5(0x16d)]||[],..._0x3899ec]:_0x305de7[_0x4e8da5(0x16d)],'customerGroup':_0x305de7[_0x4e8da5(0xd4)]},_0x1f3a51=await withSpinner(_0x4e8da5(0x1f5)+_0x522eaf+_0x4e8da5(0x287),()=>_0x3667ba[_0x4e8da5(0x285)]['updateParent'](_0x522eaf,_0xc7bcb6),{'verbose':_0x434489[_0x4e8da5(0x117)]}),_0x3e0ab3=_0x1f3a51[_0x4e8da5(0x12c)];return console[_0x4e8da5(0xbb)](_0x4e8da5(0x1a8)+_0x3e0ab3[_0x4e8da5(0x1ab)]+'\x27'),await handleSDKOutput([_0x3e0ab3],_0x434489),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x4d721b(0x11a);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x168);async[a31_0x4d721b(0x26f)](_0x93717e){const _0x33e9ea=a31_0x4d721b,{options:_0x5f5656,args:_0x298c9e,tdx:_0x2d6d2e}=_0x93717e,_0x2ecfd7=_0x5f5656,_0x2a7ca8=_0x298c9e[0x0]||_0x5f5656[_0x33e9ea(0xfd)];if(!_0x2a7ca8)return showParentSegmentNotSetError(_0x33e9ea(0x124)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x2ecfd7[_0x33e9ea(0x235)]&&_0x2ecfd7[_0x33e9ea(0x244)])return console[_0x33e9ea(0xbb)](a31_0x58debf[_0x33e9ea(0xfb)](_0x33e9ea(0xda))),console[_0x33e9ea(0xbb)](a31_0x58debf['dim'](_0x33e9ea(0x21d))),console[_0x33e9ea(0xbb)](a31_0x58debf[_0x33e9ea(0x161)](_0x33e9ea(0x1c8)+PARENT_SEGMENT_DIR+_0x33e9ea(0x188))),console[_0x33e9ea(0xbb)](a31_0x58debf[_0x33e9ea(0x1bf)](_0x33e9ea(0xe2))),0x1;const _0x9d33dd=_0x2ecfd7[_0x33e9ea(0x244)]||a31_0x151113['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x2a7ca8)+_0x33e9ea(0x109));_0x2ecfd7[_0x33e9ea(0x117)]&&(console[_0x33e9ea(0xbb)]('Site:\x20'+_0x2ecfd7[_0x33e9ea(0x15a)]),console[_0x33e9ea(0xbb)](_0x33e9ea(0x10a)+_0x2a7ca8),console[_0x33e9ea(0xbb)](_0x33e9ea(0x10f)+_0x9d33dd));const _0x1621a3=await withSpinner(_0x33e9ea(0x1fd)+_0x2a7ca8+_0x33e9ea(0x287),()=>_0x2d6d2e[_0x33e9ea(0x285)]['pullParentYaml'](_0x2a7ca8),{'verbose':_0x2ecfd7[_0x33e9ea(0x117)]}),_0x188aa2=_0x1621a3[_0x33e9ea(0x12c)];if(existsSync(_0x9d33dd)){const _0x34fb76=readFileSync(_0x9d33dd,'utf-8'),_0x545a57=generateDiff(_0x34fb76,_0x188aa2);if(!hasChanges(_0x545a57))console['error'](a31_0x58debf[_0x33e9ea(0x219)]('✔')+_0x33e9ea(0x1a2)+a31_0x58debf[_0x33e9ea(0x1bf)](_0x9d33dd)+'\x20is\x20already\x20up\x20to\x20date');else{console['error'](_0x33e9ea(0x1d9)+_0x9d33dd+'\x27:'),console[_0x33e9ea(0xbb)]('─'[_0x33e9ea(0x1d8)](0x3c)),console[_0x33e9ea(0xbb)](formatDiffWithColors(_0x545a57)),console[_0x33e9ea(0xbb)]('─'['repeat'](0x3c));if(!_0x2ecfd7[_0x33e9ea(0x1bc)]){if(!isInteractive())return console[_0x33e9ea(0xbb)](a31_0x58debf[_0x33e9ea(0xfb)](_0x33e9ea(0x241)),_0x33e9ea(0x1a1)),console['error'](a31_0x58debf['dim'](_0x33e9ea(0x26a))),0x1;const _0x3ff614=await confirmKey(_0x33e9ea(0x216)+_0x9d33dd+'\x27?');if(!_0x3ff614)return console['error'](a31_0x58debf[_0x33e9ea(0xd8)]('Aborted.')),0x1;}writeFileSync(_0x9d33dd,_0x188aa2,'utf-8'),console[_0x33e9ea(0xbb)](a31_0x58debf[_0x33e9ea(0x219)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x58debf[_0x33e9ea(0x1bf)](_0x9d33dd));}}else{const _0x3d243f=a31_0x151113[_0x33e9ea(0x206)](_0x9d33dd);!existsSync(_0x3d243f)&&mkdirSync(_0x3d243f,{'recursive':!![]}),writeFileSync(_0x9d33dd,_0x188aa2,_0x33e9ea(0x20c)),console[_0x33e9ea(0xbb)](a31_0x58debf[_0x33e9ea(0x219)]('✔')+_0x33e9ea(0x260)+a31_0x58debf[_0x33e9ea(0x1bf)](_0x9d33dd));}return saveSessionContext({'parent_segment':_0x2a7ca8},_0x2ecfd7[_0x33e9ea(0x233)]),console['error'](a31_0x58debf[_0x33e9ea(0x219)]('✔')+_0x33e9ea(0x167)+a31_0x58debf[_0x33e9ea(0x161)](_0x33e9ea(0x150))+_0x33e9ea(0xbf)+a31_0x58debf['cyan'](_0x2a7ca8)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x4d721b(0x1ab)]='segment:parent:push';[a31_0x4d721b(0x170)]='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async[a31_0x4d721b(0x26f)](_0x14e4fc){const _0x66e3d3=a31_0x4d721b,{options:_0x278fae,args:_0x3a6b37,tdx:_0x24068f}=_0x14e4fc,_0xbd63aa=_0x278fae,_0x293906=_0x3a6b37[0x0]||_0x278fae[_0x66e3d3(0xfd)];if(!_0x293906)return showParentSegmentNotSetError(_0x66e3d3(0x197)+_0x66e3d3(0xee)),0x1;const _0x38ae07=resolveYamlFile(_0x293906);if(!existsSync(_0x38ae07))return showFileNotFoundError(_0x38ae07,_0x293906),0x1;_0xbd63aa['verbose']&&(console[_0x66e3d3(0xbb)](_0x66e3d3(0xe8)+_0xbd63aa[_0x66e3d3(0x15a)]),console[_0x66e3d3(0xbb)](_0x66e3d3(0x263)+_0x38ae07));let _0x3c85dd;try{_0x3c85dd=readFileSync(_0x38ae07,_0x66e3d3(0x20c));}catch(_0x5dc235){const _0x2aff8d=_0x5dc235 instanceof Error?_0x5dc235[_0x66e3d3(0x1cb)]:String(_0x5dc235);return console[_0x66e3d3(0xbb)](_0x66e3d3(0x275)+_0x2aff8d),0x1;}const _0x4124c0=await withSpinner(_0x66e3d3(0x1d0),()=>_0x24068f[_0x66e3d3(0x285)][_0x66e3d3(0x1c7)](_0x3c85dd),{'verbose':_0xbd63aa[_0x66e3d3(0x117)]}),_0x430da2=_0x4124c0[_0x66e3d3(0x12c)],{isNew:_0x12059b,name:_0x34f864,hasChanges:_0x50c4b8,diffFormatted:_0x3732c0}=_0x430da2;if(!_0x50c4b8)return console[_0x66e3d3(0xbb)](_0x66e3d3(0x16b)+_0x34f864+_0x66e3d3(0x126)),0x0;_0x12059b?console[_0x66e3d3(0xbb)](_0x66e3d3(0x199)+_0x34f864+'\x27:'):console[_0x66e3d3(0xbb)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x34f864+'\x27:');console[_0x66e3d3(0xbb)]('─'[_0x66e3d3(0x1d8)](0x3c)),console[_0x66e3d3(0xbb)](_0x3732c0),console[_0x66e3d3(0xbb)]('─'[_0x66e3d3(0x1d8)](0x3c));const _0xd52dad=_0x12059b?'Create\x20parent\x20segment\x20\x27'+_0x34f864+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x34f864+'\x27?';if(!_0xbd63aa['yes']){if(!isInteractive())return console['error'](a31_0x58debf[_0x66e3d3(0xfb)](_0x66e3d3(0x241)),_0x66e3d3(0x1a1)),console[_0x66e3d3(0xbb)](a31_0x58debf[_0x66e3d3(0x161)](_0x66e3d3(0x26a))),0x1;const _0x4e9761=await confirmKey(_0xd52dad);if(!_0x4e9761)return console[_0x66e3d3(0xbb)](a31_0x58debf['yellow'](_0x66e3d3(0xe1))),0x1;}const _0x85e36b=_0x12059b?_0x66e3d3(0x24e):'Updating',_0x5ccc1d=await withSpinner(_0x85e36b+_0x66e3d3(0x2a0)+_0x34f864+_0x66e3d3(0x287),()=>_0x430da2[_0x66e3d3(0x139)](),{'verbose':_0xbd63aa[_0x66e3d3(0x117)]}),_0x7ce6ca=_0x5ccc1d['data'],_0x1857a0=getConsoleNextUrl(_0xbd63aa['site'],'/app/dw/parentSegments/'+_0x7ce6ca['id']),_0x3e37e9=_0x12059b?_0x66e3d3(0x16c):_0x66e3d3(0x2ac);return console[_0x66e3d3(0xbb)]('✔\x20'+_0x3e37e9+'\x20parent\x20segment\x20\x27'+_0x7ce6ca['name']+'\x27'),console[_0x66e3d3(0xbb)]('\x20\x20'+_0x1857a0),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x13b);['description']=a31_0x4d721b(0xb0);async[a31_0x4d721b(0x26f)](_0x2bd8fb){const _0xaf89ee=a31_0x4d721b,{options:_0xab432,args:_0x4a0d3e,tdx:_0x788d78}=_0x2bd8fb,_0x5f0c23=_0xab432,_0x3230d9=_0x4a0d3e[0x0]||_0xab432[_0xaf89ee(0xfd)];if(!_0x3230d9)return showParentSegmentNotSetError(_0xaf89ee(0x186)+_0xaf89ee(0xf4)+'Options:\x0a'+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0xaf89ee(0x282)+_0xaf89ee(0x274)),0x1;const _0x1e6694=resolveYamlFile(_0x3230d9);if(!existsSync(_0x1e6694))return showFileNotFoundError(_0x1e6694,_0x3230d9),0x1;_0x5f0c23[_0xaf89ee(0x117)]&&(console[_0xaf89ee(0xbb)](_0xaf89ee(0xe8)+_0x5f0c23[_0xaf89ee(0x15a)]),console[_0xaf89ee(0xbb)](_0xaf89ee(0x263)+_0x1e6694));let _0x174bde;try{_0x174bde=readFileSync(_0x1e6694,_0xaf89ee(0x20c));}catch(_0xc13b74){const _0x26231f=_0xc13b74 instanceof Error?_0xc13b74[_0xaf89ee(0x1cb)]:String(_0xc13b74);return console[_0xaf89ee(0xbb)]('Error\x20reading\x20file:\x20'+_0x26231f),0x1;}const _0x26286b=createCommandSpinner(a31_0x58debf[_0xaf89ee(0x161)](_0xaf89ee(0x10e)),{'verbose':_0x5f0c23[_0xaf89ee(0x117)]});_0x26286b['start']();const _0x1101af={'onProgress':_0xccfb65=>{const _0x1312b8=_0xaf89ee;_0x26286b[_0x1312b8(0xb5)]=formatProgressMessage(_0xccfb65);}};if(_0x5f0c23[_0xaf89ee(0x21e)])_0x1101af[_0xaf89ee(0x21e)]=!![];if(_0x5f0c23[_0xaf89ee(0x156)])_0x1101af[_0xaf89ee(0x156)]=!![];_0x5f0c23[_0xaf89ee(0xac)]&&(_0x1101af['attribute']=_0x5f0c23[_0xaf89ee(0xac)]);_0x5f0c23[_0xaf89ee(0xae)]&&(_0x1101af[_0xaf89ee(0xae)]=_0x5f0c23[_0xaf89ee(0xae)]);if(_0x5f0c23[_0xaf89ee(0x204)])_0x1101af[_0xaf89ee(0x204)]=_0x5f0c23[_0xaf89ee(0x204)];let _0x4ed0cc;try{_0x4ed0cc=await _0x788d78[_0xaf89ee(0x285)][_0xaf89ee(0x14d)](_0x174bde,_0x1101af),_0x26286b[_0xaf89ee(0x14c)]();}catch(_0x10f24b){_0x26286b[_0xaf89ee(0x14c)]();throw _0x10f24b;}const _0x4d5041=_0x5f0c23[_0xaf89ee(0x204)]||_0xaf89ee(0x155);return this['displayValidateResults'](_0x4ed0cc,_0x1101af,_0x1e6694,_0x4d5041),_0x4ed0cc[_0xaf89ee(0x291)]?0x0:0x1;}[a31_0x4d721b(0x202)](_0x280ae4,_0x21b5fd,_0x4efc76,_0x4793ff){const _0x33405a=a31_0x4d721b;console[_0x33405a(0xbb)]('\x0a'+a31_0x58debf[_0x33405a(0x1ed)](_0x33405a(0x230))+'\x20'+_0x280ae4[_0x33405a(0x1ab)]),console[_0x33405a(0xbb)]('═'[_0x33405a(0x1d8)](0x3c)),this['displayMasterInfo'](_0x280ae4);if(typeof _0x21b5fd[_0x33405a(0xac)]==='string'){this[_0x33405a(0x103)](_0x280ae4),this['displaySummary'](_0x280ae4),this[_0x33405a(0x11d)](_0x4efc76,_0x4793ff,_0x33405a(0xac),_0x21b5fd[_0x33405a(0xac)]);return;}if(_0x21b5fd[_0x33405a(0xac)]===!![]){this['displayAttributesStats'](_0x280ae4),this[_0x33405a(0x299)](_0x280ae4),this[_0x33405a(0x11d)](_0x4efc76,_0x4793ff,_0x33405a(0xd9));return;}if(typeof _0x21b5fd[_0x33405a(0xae)]===_0x33405a(0x105)){this['displayBehaviorsStats'](_0x280ae4,_0x4793ff),this[_0x33405a(0x299)](_0x280ae4),this[_0x33405a(0x11d)](_0x4efc76,_0x4793ff,_0x33405a(0xae),_0x21b5fd['behavior']);return;}if(_0x21b5fd[_0x33405a(0xae)]===!![]){this[_0x33405a(0xd0)](_0x280ae4,_0x4793ff),this[_0x33405a(0x299)](_0x280ae4),this[_0x33405a(0x11d)](_0x4efc76,_0x4793ff,_0x33405a(0x16d));return;}this['displayAttributesStats'](_0x280ae4),this[_0x33405a(0xd0)](_0x280ae4,_0x4793ff),this['displayRealtimeInfo'](_0x280ae4),this['displaySummary'](_0x280ae4),this['displayPreviewHints'](_0x4efc76,_0x4793ff,'all');}['displayRealtimeInfo'](_0x324450){displayRealtimeValidation(_0x324450);}[a31_0x4d721b(0x11d)](_0x131bdf,_0x1949da,_0x170ae8,_0x4e6869){const _0x51b6d6=a31_0x4d721b;console['error']('\x0a'+a31_0x58debf['dim']('To\x20view\x20sample\x20data:'));const _0xb7c78e=_0x1949da!==_0x51b6d6(0x155)?_0x51b6d6(0x110)+_0x1949da:'';if(_0x170ae8==='attribute'&&_0x4e6869)console[_0x51b6d6(0xbb)]('\x20\x20'+a31_0x58debf[_0x51b6d6(0x161)](_0x51b6d6(0xc6)+_0x131bdf+_0x51b6d6(0x1fe)+_0x4e6869+'\x22'+_0xb7c78e));else{if(_0x170ae8===_0x51b6d6(0xae)&&_0x4e6869)console['error']('\x20\x20'+a31_0x58debf[_0x51b6d6(0x161)](_0x51b6d6(0xc6)+_0x131bdf+_0x51b6d6(0x1a6)+_0x4e6869+'\x22'+_0xb7c78e));else(_0x170ae8===_0x51b6d6(0xd9)||_0x170ae8===_0x51b6d6(0x131))&&console[_0x51b6d6(0xbb)]('\x20\x20'+a31_0x58debf[_0x51b6d6(0x161)](_0x51b6d6(0xc6)+_0x131bdf+'\x20--attribute\x20\x22<name>\x22'+_0xb7c78e));}(_0x170ae8===_0x51b6d6(0x16d)||_0x170ae8===_0x51b6d6(0x131))&&console[_0x51b6d6(0xbb)]('\x20\x20'+a31_0x58debf[_0x51b6d6(0x161)](_0x51b6d6(0xc6)+_0x131bdf+_0x51b6d6(0x18e)+_0xb7c78e)),_0x170ae8===_0x51b6d6(0x131)&&console['error']('\x20\x20'+a31_0x58debf[_0x51b6d6(0x161)]('tdx\x20ps\x20preview\x20'+_0x131bdf+_0x51b6d6(0x2ae)+_0xb7c78e));}[a31_0x4d721b(0x1d2)](_0x12941a){const _0x122f06=a31_0x4d721b,{master:_0x5b5194}=_0x12941a,_0x8a64f4=_0x5b5194['schemaValid']?a31_0x58debf[_0x122f06(0x219)]('✔'):a31_0x58debf[_0x122f06(0xfb)]('✘');console[_0x122f06(0xbb)]('\x0a'+a31_0x58debf['dim'](_0x122f06(0x257))),console['error'](_0x8a64f4+'\x20'+a31_0x58debf[_0x122f06(0x1ed)](_0x5b5194[_0x122f06(0x15f)]+'.'+_0x5b5194[_0x122f06(0xa5)])),_0x5b5194[_0x122f06(0x2ab)]?_0x5b5194[_0x122f06(0x2b1)]!==undefined&&console[_0x122f06(0xbb)]('\x20\x20'+a31_0x58debf[_0x122f06(0x161)](_0x122f06(0x172))+'\x20'+a31_0x58debf[_0x122f06(0x1bf)](formatRows(_0x5b5194[_0x122f06(0x2b1)]))):console['error']('\x20\x20'+a31_0x58debf[_0x122f06(0xfb)](_0x122f06(0x29b))+'\x20'+_0x5b5194[_0x122f06(0x104)]);}['displayAttributesStats'](_0x2747fd){const _0x22fa4d=a31_0x4d721b;if(_0x2747fd[_0x22fa4d(0xd9)][_0x22fa4d(0x1db)]===0x0)return;console['error']('\x0a'+a31_0x58debf[_0x22fa4d(0x161)]('Attributes'));for(const _0x409f09 of _0x2747fd[_0x22fa4d(0xd9)]){const _0x31e083=_0x409f09[_0x22fa4d(0x2ab)]?a31_0x58debf[_0x22fa4d(0x219)]('✔'):a31_0x58debf[_0x22fa4d(0xfb)]('✘');let _0x45a8cf='';if(_0x409f09['schemaValid']&&_0x409f09[_0x22fa4d(0x152)]!==undefined&&_0x409f09[_0x22fa4d(0x1c4)]!==undefined){const _0x36d94d=_0x409f09[_0x22fa4d(0x1c4)][_0x22fa4d(0x14f)](0x1),_0x26d057=_0x409f09[_0x22fa4d(0x1c4)]>=0x50?a31_0x58debf['green']:_0x409f09[_0x22fa4d(0x1c4)]>=0x32?a31_0x58debf[_0x22fa4d(0xd8)]:a31_0x58debf[_0x22fa4d(0xfb)];_0x45a8cf='\x20'+a31_0x58debf['dim'](_0x22fa4d(0x135))+'\x20'+_0x26d057(_0x36d94d+'%')+'\x20('+formatRows(_0x409f09[_0x22fa4d(0x152)])+_0x22fa4d(0xf7);}console[_0x22fa4d(0xbb)](_0x31e083+'\x20'+a31_0x58debf['bold'](_0x409f09[_0x22fa4d(0x1ab)])+_0x45a8cf),console[_0x22fa4d(0xbb)]('\x20\x20'+a31_0x58debf['dim'](_0x22fa4d(0x11f))+'\x20'+a31_0x58debf['bold'](_0x409f09[_0x22fa4d(0x15f)]+'.'+_0x409f09[_0x22fa4d(0xa5)]));const _0x31a535=_0x409f09[_0x22fa4d(0x190)]===_0x409f09[_0x22fa4d(0x15e)]?a31_0x58debf[_0x22fa4d(0x161)](_0x22fa4d(0x174))+'\x20'+_0x409f09['joinKey']:a31_0x58debf['dim'](_0x22fa4d(0x15d))+'\x20'+_0x409f09[_0x22fa4d(0x190)]+_0x22fa4d(0xbf)+_0x409f09['foreignKey'];console[_0x22fa4d(0xbb)]('\x20\x20'+_0x31a535),console[_0x22fa4d(0xbb)]('\x20\x20'+a31_0x58debf['dim'](_0x22fa4d(0xdc))),this['displayColumns'](_0x409f09['columns']),!_0x409f09[_0x22fa4d(0x2ab)]&&console[_0x22fa4d(0xbb)]('\x20\x20'+a31_0x58debf[_0x22fa4d(0xfb)](_0x22fa4d(0x29b))+'\x20'+_0x409f09['schemaError']);}}[a31_0x4d721b(0xd0)](_0x590fc1,_0x12efb1){const _0x20996f=a31_0x4d721b;if(_0x590fc1[_0x20996f(0x16d)][_0x20996f(0x1db)]===0x0)return;console[_0x20996f(0xbb)]('\x0a'+a31_0x58debf[_0x20996f(0x161)]('Behaviors')+'\x20'+a31_0x58debf['dim']('('+_0x12efb1+')'));for(const _0x496f55 of _0x590fc1['behaviors']){const _0x5c6398=_0x496f55[_0x20996f(0x2ab)]?a31_0x58debf[_0x20996f(0x219)]('✔'):a31_0x58debf[_0x20996f(0xfb)]('✘');let _0x4dc166='';if(_0x496f55[_0x20996f(0x2ab)]&&_0x496f55[_0x20996f(0x191)]!==undefined&&_0x496f55[_0x20996f(0x101)]!==undefined){const _0x303c76=_0x496f55[_0x20996f(0x281)]?.[_0x20996f(0x14f)](0x1)||'?',_0x725100=(_0x496f55[_0x20996f(0x281)]??0x0)>=0x32?a31_0x58debf[_0x20996f(0x219)]:(_0x496f55[_0x20996f(0x281)]??0x0)>=0x14?a31_0x58debf[_0x20996f(0xd8)]:a31_0x58debf[_0x20996f(0xfb)];_0x4dc166='\x20'+a31_0x58debf[_0x20996f(0x161)]('Customers:')+'\x20'+_0x725100(formatRows(_0x496f55[_0x20996f(0x191)]))+'\x20('+_0x303c76+_0x20996f(0x12e)+a31_0x58debf[_0x20996f(0x161)](_0x20996f(0x293))+'\x20'+a31_0x58debf[_0x20996f(0x1bf)](formatRows(_0x496f55[_0x20996f(0x101)]));}console['error'](_0x5c6398+'\x20'+a31_0x58debf[_0x20996f(0x1ed)](_0x496f55[_0x20996f(0x1ab)])+_0x4dc166),console['error']('\x20\x20'+a31_0x58debf[_0x20996f(0x161)](_0x20996f(0x11f))+'\x20'+a31_0x58debf[_0x20996f(0x1ed)](_0x496f55[_0x20996f(0x15f)]+'.'+_0x496f55[_0x20996f(0xa5)]));const _0x4d733b=_0x496f55[_0x20996f(0x190)]===_0x496f55[_0x20996f(0x15e)]?a31_0x58debf['dim'](_0x20996f(0x174))+'\x20'+_0x496f55['joinKey']:a31_0x58debf[_0x20996f(0x161)](_0x20996f(0x15d))+'\x20'+_0x496f55[_0x20996f(0x190)]+_0x20996f(0xbf)+_0x496f55['foreignKey'];console['error']('\x20\x20'+_0x4d733b),console['error']('\x20\x20'+a31_0x58debf['dim'](_0x20996f(0xdc))),this[_0x20996f(0x212)](_0x496f55[_0x20996f(0x280)]),!_0x496f55[_0x20996f(0x2ab)]&&console[_0x20996f(0xbb)]('\x20\x20'+a31_0x58debf[_0x20996f(0xfb)]('Error:')+'\x20'+_0x496f55['schemaError']);}}[a31_0x4d721b(0x212)](_0x1960d9){const _0xf98faa=a31_0x4d721b;for(const _0x508fa2 of _0x1960d9){_0x508fa2[_0xf98faa(0x25c)]===_0x508fa2[_0xf98faa(0x1bb)]||_0x508fa2[_0xf98faa(0x1bb)]==='*'?console[_0xf98faa(0xbb)](_0xf98faa(0x1ef)+_0x508fa2['label']):console[_0xf98faa(0xbb)](_0xf98faa(0x1ef)+_0x508fa2['label']+'\x20'+a31_0x58debf[_0xf98faa(0x161)]('('+_0x508fa2['column']+')'));}}[a31_0x4d721b(0x299)](_0x3ae74d){const _0xc728d5=a31_0x4d721b;console[_0xc728d5(0xbb)]('─'['repeat'](0x3c));if(_0x3ae74d[_0xc728d5(0x2aa)][_0xc728d5(0x1db)]>0x0){console[_0xc728d5(0xbb)]('\x0a'+a31_0x58debf[_0xc728d5(0xfb)]('Errors:'));for(const _0x44f9ec of _0x3ae74d['errors']){console[_0xc728d5(0xbb)]('\x20\x20'+a31_0x58debf[_0xc728d5(0xfb)]('•')+'\x20'+_0x44f9ec);}}_0x3ae74d['allValid']&&console[_0xc728d5(0xbb)]('\x0a'+a31_0x58debf['green']('✔')+_0xc728d5(0x1aa));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x1a3);['description']='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0x4d721b(0x26f)](_0x240e10){const _0x3a1a0b=a31_0x4d721b,{options:_0x55c818,args:_0x30bda3,tdx:_0x460687}=_0x240e10,_0xef54ba=_0x55c818,_0x4f9d94=_0x30bda3[0x0]||_0x55c818[_0x3a1a0b(0xfd)];if(!_0x4f9d94)return showParentSegmentNotSetError(_0x3a1a0b(0x1c5)+_0x3a1a0b(0x228)+_0x3a1a0b(0x16f)+_0x3a1a0b(0x248)+_0x3a1a0b(0x180)+_0x3a1a0b(0x121)+_0x3a1a0b(0x283)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0xef54ba['master']&&!_0xef54ba['attribute']&&!_0xef54ba[_0x3a1a0b(0xae)]&&!_0xef54ba[_0x3a1a0b(0x156)])return console['error'](a31_0x58debf[_0x3a1a0b(0xfb)](_0x3a1a0b(0xa4))),console[_0x3a1a0b(0xbb)](_0x3a1a0b(0x224)),console['error']('Options:'),console[_0x3a1a0b(0xbb)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console['error'](_0x3a1a0b(0xdd)),console[_0x3a1a0b(0xbb)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x253053=resolveYamlFile(_0x4f9d94);if(!existsSync(_0x253053))return showFileNotFoundError(_0x253053,_0x4f9d94),0x1;_0xef54ba['verbose']&&(console[_0x3a1a0b(0xbb)](_0x3a1a0b(0xe8)+_0xef54ba[_0x3a1a0b(0x15a)]),console[_0x3a1a0b(0xbb)](_0x3a1a0b(0x263)+_0x253053));let _0x2820e4;try{_0x2820e4=readFileSync(_0x253053,_0x3a1a0b(0x20c));}catch(_0x327c31){const _0x54bbdd=_0x327c31 instanceof Error?_0x327c31[_0x3a1a0b(0x1cb)]:String(_0x327c31);return console[_0x3a1a0b(0xbb)](_0x3a1a0b(0x275)+_0x54bbdd),0x1;}let _0x1245b3;try{_0x1245b3=parseDef(_0x2820e4);}catch(_0x27dfa8){const _0x1ecae2=_0x27dfa8 instanceof Error?_0x27dfa8[_0x3a1a0b(0x1cb)]:String(_0x27dfa8);return console[_0x3a1a0b(0xbb)](a31_0x58debf[_0x3a1a0b(0xfb)]('Error\x20parsing\x20YAML:\x20'+_0x1ecae2)),0x1;}if(_0xef54ba['attribute']===!![]||_0xef54ba[_0x3a1a0b(0xac)]===''){const _0x2911ae=_0x1245b3[_0x3a1a0b(0xd9)]?.['map'](_0x4b874b=>_0x4b874b['name'])||[];if(_0x2911ae[_0x3a1a0b(0x1db)]===0x0)console[_0x3a1a0b(0xbb)](a31_0x58debf['red'](_0x3a1a0b(0x1b1)));else{console[_0x3a1a0b(0xbb)](a31_0x58debf[_0x3a1a0b(0xfb)](_0x3a1a0b(0xf9))),console[_0x3a1a0b(0xbb)]('Available\x20attributes:');for(const _0x3d25c5 of _0x2911ae){console[_0x3a1a0b(0xbb)]('\x20\x20'+a31_0x58debf[_0x3a1a0b(0x1bf)](_0x3d25c5));}console['error'](_0x3a1a0b(0x296)+_0x4f9d94+_0x3a1a0b(0x1fe)+_0x2911ae[0x0]+'\x22');}return 0x1;}if(_0xef54ba[_0x3a1a0b(0xae)]===!![]||_0xef54ba['behavior']===''){const _0x4aa26e=_0x1245b3[_0x3a1a0b(0x16d)]?.[_0x3a1a0b(0x23e)](_0xf2adb7=>_0xf2adb7['name'])||[];if(_0x4aa26e[_0x3a1a0b(0x1db)]===0x0)console[_0x3a1a0b(0xbb)](a31_0x58debf['red'](_0x3a1a0b(0xbd)));else{console[_0x3a1a0b(0xbb)](a31_0x58debf[_0x3a1a0b(0xfb)](_0x3a1a0b(0xe5))),console['error'](_0x3a1a0b(0x19f));for(const _0x1c5d7a of _0x4aa26e){console[_0x3a1a0b(0xbb)]('\x20\x20'+a31_0x58debf[_0x3a1a0b(0x1bf)](_0x1c5d7a));}console[_0x3a1a0b(0xbb)](_0x3a1a0b(0x296)+_0x4f9d94+_0x3a1a0b(0x1a6)+_0x4aa26e[0x0]+'\x22');}return 0x1;}const _0x484a3a=createCommandSpinner(a31_0x58debf[_0x3a1a0b(0x161)](_0x3a1a0b(0xc7)),{'verbose':_0xef54ba[_0x3a1a0b(0x117)]});_0x484a3a['start']();const _0x7de007={'onProgress':_0x36f399=>{_0x484a3a['text']=formatProgressMessage(_0x36f399);}};if(_0xef54ba[_0x3a1a0b(0x21e)])_0x7de007[_0x3a1a0b(0x21e)]=!![];if(_0xef54ba['attribute']&&typeof _0xef54ba[_0x3a1a0b(0xac)]==='string')_0x7de007[_0x3a1a0b(0xac)]=_0xef54ba['attribute'];if(_0xef54ba[_0x3a1a0b(0xae)]&&typeof _0xef54ba[_0x3a1a0b(0xae)]===_0x3a1a0b(0x105))_0x7de007[_0x3a1a0b(0xae)]=_0xef54ba[_0x3a1a0b(0xae)];if(_0xef54ba[_0x3a1a0b(0x156)])_0x7de007[_0x3a1a0b(0x156)]=!![];if(_0xef54ba[_0x3a1a0b(0x204)])_0x7de007[_0x3a1a0b(0x204)]=_0xef54ba[_0x3a1a0b(0x204)];let _0x22d199;try{_0x22d199=await _0x460687[_0x3a1a0b(0x285)][_0x3a1a0b(0x1ea)](_0x2820e4,_0x7de007),_0x484a3a['stop']();}catch(_0x574d68){_0x484a3a[_0x3a1a0b(0x14c)]();throw _0x574d68;}return await this['displayPreviewResults'](_0x22d199,{'master':_0xef54ba[_0x3a1a0b(0x21e)],'attribute':typeof _0xef54ba[_0x3a1a0b(0xac)]===_0x3a1a0b(0x105)?_0xef54ba[_0x3a1a0b(0xac)]:undefined,'behavior':typeof _0xef54ba[_0x3a1a0b(0xae)]===_0x3a1a0b(0x105)?_0xef54ba[_0x3a1a0b(0xae)]:undefined,'enriched':_0xef54ba[_0x3a1a0b(0x156)]}),_0x22d199['allValid']?0x0:0x1;}async[a31_0x4d721b(0xcc)](_0xe91f12,_0x464947){const _0x4fc9f1=a31_0x4d721b;console[_0x4fc9f1(0xbb)]('\x0a'+a31_0x58debf[_0x4fc9f1(0x1ed)](_0x4fc9f1(0x119))+'\x20'+_0xe91f12['name']),console[_0x4fc9f1(0xbb)]('═'[_0x4fc9f1(0x1d8)](0x3c));if(_0x464947['master']&&_0xe91f12[_0x4fc9f1(0x1f9)]){const _0x39d2db=a31_0x58debf[_0x4fc9f1(0x161)](_0x4fc9f1(0xaf))+'\x20'+a31_0x58debf[_0x4fc9f1(0x1ed)](_0xe91f12['master']['database']+'.'+_0xe91f12[_0x4fc9f1(0x21e)]['table']);await this[_0x4fc9f1(0x255)](_0x39d2db,_0xe91f12[_0x4fc9f1(0x1f9)]);}else{if(_0x464947['attribute']&&_0xe91f12[_0x4fc9f1(0x1f9)]){const _0x3dd569=a31_0x58debf[_0x4fc9f1(0x161)]('Attribute:')+'\x20'+a31_0x58debf[_0x4fc9f1(0x1ed)](_0x464947[_0x4fc9f1(0xac)]);await this['displaySampleData'](_0x3dd569,_0xe91f12['sampleData']);}else{if(_0x464947[_0x4fc9f1(0xae)]&&_0xe91f12[_0x4fc9f1(0x1f9)]){const _0x17850c=a31_0x58debf[_0x4fc9f1(0x161)]('Behavior:')+'\x20'+a31_0x58debf[_0x4fc9f1(0x1ed)](_0x464947[_0x4fc9f1(0xae)]);await this[_0x4fc9f1(0x255)](_0x17850c,_0xe91f12[_0x4fc9f1(0x1f9)]);}else{if(_0x464947[_0x4fc9f1(0x156)]&&_0xe91f12[_0x4fc9f1(0x1f9)]){const _0x2dd065=a31_0x58debf[_0x4fc9f1(0x161)](_0x4fc9f1(0x1f2))+'\x20'+a31_0x58debf[_0x4fc9f1(0x1ed)](_0x4fc9f1(0xf6));await this[_0x4fc9f1(0x255)](_0x2dd065,_0xe91f12[_0x4fc9f1(0x1f9)]);}else!_0xe91f12['sampleData']&&console[_0x4fc9f1(0xbb)](_0x4fc9f1(0x142));}}}if(_0xe91f12['errors']['length']>0x0){console[_0x4fc9f1(0xbb)]('─'[_0x4fc9f1(0x1d8)](0x3c)),console[_0x4fc9f1(0xbb)]('\x0a'+a31_0x58debf[_0x4fc9f1(0xfb)](_0x4fc9f1(0x256)));for(const _0x3dd3fc of _0xe91f12[_0x4fc9f1(0x2aa)]){console[_0x4fc9f1(0xbb)]('\x20\x20'+a31_0x58debf['red']('•')+'\x20'+_0x3dd3fc);}}}async[a31_0x4d721b(0x255)](_0x46d60b,_0x5aac68){const _0x30365c=a31_0x4d721b;if(_0x5aac68[_0x30365c(0x1db)]===0x0){console[_0x30365c(0xbb)]('\x0a'+_0x46d60b),console[_0x30365c(0xbb)](_0x30365c(0x10b));return;}console[_0x30365c(0xbb)]('\x0a'+_0x46d60b);const _0x180481=Object['keys'](_0x5aac68[0x0])[_0x30365c(0x23e)](_0x202c1f=>({'name':_0x202c1f,'type':typeof _0x5aac68[0x0][_0x202c1f]===_0x30365c(0x125)?_0x30365c(0x279):_0x30365c(0x234)})),_0x3a18a2={'queryId':_0x30365c(0xc5),'columns':_0x180481,'data':_0x5aac68,'stats':{'state':_0x30365c(0x115),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x5aac68['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xaac34f=formatAsTable(_0x3a18a2,_0x5aac68['length'],!![]);await writeOutput(_0xaac34f,undefined,_0x30365c(0xa5));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x4d721b(0x1ab)]='segment:parent:run';[a31_0x4d721b(0x170)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async['execute'](_0x396f45){const _0x500b21=a31_0x4d721b,{options:_0xc20f8c,args:_0x5b85e8,tdx:_0x2c2440}=_0x396f45,_0x333bc3=_0xc20f8c,_0x38a799=_0x5b85e8[0x0]||_0xc20f8c[_0x500b21(0xfd)];if(!_0x38a799)return showParentSegmentNotSetError(_0x500b21(0x211)+_0x500b21(0x229)),0x1;const _0x538e13=resolveYamlFile(_0x38a799);if(existsSync(_0x538e13)){_0x333bc3[_0x500b21(0x117)]&&console[_0x500b21(0xbb)](_0x500b21(0x1dc)+_0x538e13);let _0x536b75;try{_0x536b75=readFileSync(_0x538e13,_0x500b21(0x20c));}catch(_0x1767e0){const _0x267b3e=_0x1767e0 instanceof Error?_0x1767e0[_0x500b21(0x1cb)]:String(_0x1767e0);return console[_0x500b21(0xbb)](_0x500b21(0x275)+_0x267b3e),0x1;}const _0xf11eb5=await withSpinner(_0x500b21(0x1d0),()=>_0x2c2440[_0x500b21(0x285)]['pushParentYaml'](_0x536b75),{'verbose':_0x333bc3[_0x500b21(0x117)]}),_0xfef390=_0xf11eb5[_0x500b21(0x12c)],{isNew:_0x2383eb,name:_0x4fd9bb,hasChanges:_0x1d1be5,diffFormatted:_0x232e41}=_0xfef390;if(_0x1d1be5){_0x2383eb?console[_0x500b21(0xbb)](_0x500b21(0x199)+_0x4fd9bb+'\x27:'):console[_0x500b21(0xbb)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x4fd9bb+'\x27:');console[_0x500b21(0xbb)]('─'['repeat'](0x3c)),console['error'](_0x232e41),console[_0x500b21(0xbb)]('─'[_0x500b21(0x1d8)](0x3c));const _0x16fb9d=_0x2383eb?'Create\x20parent\x20segment\x20\x27'+_0x4fd9bb+_0x500b21(0x1b8):_0x500b21(0x207)+_0x4fd9bb+_0x500b21(0x1b8);if(!_0x333bc3[_0x500b21(0x1bc)]){if(!isInteractive())return console[_0x500b21(0xbb)](a31_0x58debf['red'](_0x500b21(0x241)),_0x500b21(0x1a1)),console['error'](a31_0x58debf[_0x500b21(0x161)](_0x500b21(0x26a))),0x1;const _0x2217ad=await confirmKey(_0x16fb9d);if(!_0x2217ad)return console['error'](a31_0x58debf[_0x500b21(0xd8)](_0x500b21(0xe1))),0x1;}const _0x1bcd1c=_0x2383eb?_0x500b21(0x24e):'Updating';await withSpinner(_0x1bcd1c+'\x20parent\x20segment\x20\x27'+_0x4fd9bb+'\x27...',()=>_0xfef390[_0x500b21(0x139)](),{'verbose':_0x333bc3['verbose']});const _0xcde002=_0x2383eb?_0x500b21(0x16c):_0x500b21(0x2ac);console['error']('✔\x20'+_0xcde002+_0x500b21(0x2a0)+_0x4fd9bb+'\x27');}else console['error'](_0x500b21(0x16b)+_0x4fd9bb+_0x500b21(0xb3));}const _0x11ecd1=await withSpinner(_0x500b21(0xe0)+_0x38a799+_0x500b21(0x287),()=>_0x2c2440[_0x500b21(0x285)][_0x500b21(0x136)](_0x38a799),{'verbose':_0x333bc3[_0x500b21(0x117)]}),_0x193374=_0x11ecd1['data'],_0x59f6ac=getConsoleUrl(_0x333bc3[_0x500b21(0x15a)],_0x500b21(0x198)+_0x193374[_0x500b21(0x1e6)]+_0x500b21(0x1b5)+_0x193374['workflowSessionId']+'/attempt/'+_0x193374[_0x500b21(0x292)]);return console[_0x500b21(0xbb)](_0x500b21(0x1dd)),console[_0x500b21(0xbb)]('\x20\x20'+a31_0x58debf[_0x500b21(0x161)](_0x500b21(0x24a))+'\x20'+_0x193374[_0x500b21(0x221)]),console[_0x500b21(0xbb)]('\x20\x20'+a31_0x58debf[_0x500b21(0x161)](_0x500b21(0xe3))+'\x20'+_0x193374[_0x500b21(0x1c6)]),console[_0x500b21(0xbb)]('\x20\x20'+a31_0x58debf[_0x500b21(0x161)](_0x500b21(0x1b4))+'\x20'+_0x193374[_0x500b21(0x22e)]),console[_0x500b21(0xbb)]('\x20\x20'+a31_0x58debf[_0x500b21(0x161)](_0x500b21(0x1a0))+'\x20'+_0x193374['workflowAttemptId']),console[_0x500b21(0xbb)]('\x20\x20'+_0x59f6ac),console[_0x500b21(0xbb)]('\x0a'+a31_0x58debf[_0x500b21(0x161)](_0x500b21(0x102))+_0x500b21(0x1e5)+_0x193374['workflowAttemptId']+_0x500b21(0x251)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']=a31_0x4d721b(0xcb);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x177);async['execute'](_0x283fbb){const _0x3cd6ef=a31_0x4d721b,{options:_0x5f3508,args:_0x11fca4,tdx:_0x23c6f2}=_0x283fbb,_0x48bec6=_0x11fca4[0x0]||_0x5f3508[_0x3cd6ef(0xfd)];if(!_0x48bec6)return showParentSegmentNotSetError(_0x3cd6ef(0x144)+_0x3cd6ef(0x242)),0x1;_0x5f3508[_0x3cd6ef(0x117)]&&(console[_0x3cd6ef(0xbb)](_0x3cd6ef(0xe8)+_0x5f3508[_0x3cd6ef(0x15a)]),console['error'](_0x3cd6ef(0x10a)+_0x48bec6));const _0x28daa9=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x48bec6+_0x3cd6ef(0x287),()=>_0x23c6f2['segment'][_0x3cd6ef(0xad)](_0x48bec6),{'verbose':_0x5f3508['verbose']}),_0x19b4c3=_0x28daa9['data'];console[_0x3cd6ef(0xbb)](_0x3cd6ef(0x192)+_0x19b4c3[_0x3cd6ef(0x1db)]+'\x20field'+(_0x19b4c3[_0x3cd6ef(0x1db)]!==0x1?'s':''));if(_0x5f3508[_0x3cd6ef(0x141)]||_0x5f3508[_0x3cd6ef(0x19d)])return await handleSDKOutput(_0x19b4c3,_0x5f3508),0x0;return displayFieldsHumanReadable(_0x19b4c3,_0x48bec6),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x184);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x194);async['execute'](_0x16fe6a){const _0x40a175=a31_0x4d721b,{options:_0x5d5b13,args:_0x219312,tdx:_0x597827}=_0x16fe6a,_0x10bf27=_0x5d5b13,_0x2c5231=_0x219312[0x0]||_0x5d5b13['parentSegment'];if(!_0x2c5231)return showParentSegmentNotSetError(_0x40a175(0x1c9)+_0x40a175(0x130)+_0x40a175(0x13c)+_0x40a175(0xbc)),0x1;_0x5d5b13['verbose']&&(console[_0x40a175(0xbb)]('Site:\x20'+_0x5d5b13[_0x40a175(0x15a)]),console[_0x40a175(0xbb)](_0x40a175(0x10a)+_0x2c5231));const _0x22b0a7=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x2c5231+'\x27...',()=>_0x597827[_0x40a175(0x285)][_0x40a175(0x118)](_0x2c5231),{'verbose':_0x5d5b13['verbose']}),_0x1fea75=_0x22b0a7[_0x40a175(0x12c)];if(_0x10bf27['web']){const _0xf3869c=getConsoleNextUrl(_0x10bf27[_0x40a175(0x15a)],_0x40a175(0x20e)+_0x1fea75['id']);return console[_0x40a175(0xbb)](a31_0x58debf[_0x40a175(0x219)]('✔')+'\x20Opening\x20'+a31_0x58debf[_0x40a175(0x1bf)](_0xf3869c)),openBrowser(_0xf3869c),0x0;}return await handleSingleObjectOutput(_0x1fea75,_0x5d5b13),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0xd7);[a31_0x4d721b(0x170)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a31_0x4d721b(0x26f)](_0x339477){const _0x1a6d11=a31_0x4d721b,{options:_0x1718fa,args:_0x1b47ea,tdx:_0x665238}=_0x339477,_0x6a163e=_0x1718fa,_0x9d2d03=_0x1b47ea[0x0]||_0x1718fa['parentSegment'];if(!_0x9d2d03)return showParentSegmentNotSetError(_0x1a6d11(0x28e)+_0x1a6d11(0x2a4)+_0x1a6d11(0x13c)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x1718fa['verbose']&&(console[_0x1a6d11(0xbb)](_0x1a6d11(0xe8)+_0x1718fa[_0x1a6d11(0x15a)]),console[_0x1a6d11(0xbb)](_0x1a6d11(0x10a)+_0x9d2d03));const _0x2112fd=await withSpinner(_0x1a6d11(0x162)+_0x9d2d03+_0x1a6d11(0x287),()=>_0x665238[_0x1a6d11(0x285)][_0x1a6d11(0x1c0)](_0x9d2d03),{'verbose':_0x1718fa['verbose']}),_0x2d3934=_0x2112fd['data'],_0x4df9c6=_0x665238['segment'][_0x1a6d11(0x182)](_0x2d3934);if(_0x6a163e[_0x1a6d11(0x244)]){const _0xf2b744=await this[_0x1a6d11(0x2a8)](_0x339477,_0x9d2d03,_0x2d3934,_0x4df9c6),_0x360d53=this[_0x1a6d11(0x1e7)](_0xf2b744);writeFileSync(_0x6a163e['output'],_0x360d53);const _0x476d23=_0xf2b744[_0x1a6d11(0xe7)][_0x1a6d11(0x280)][_0x1a6d11(0x1db)]+_0xf2b744['behaviors']['reduce']((_0x141f2c,_0x42ceb5)=>_0x141f2c+_0x42ceb5[_0x1a6d11(0x280)][_0x1a6d11(0x1db)],0x0),_0x27b25e=_0xf2b744['behaviors'][_0x1a6d11(0x1fc)](_0x45c02a=>_0x45c02a[_0x1a6d11(0x280)][_0x1a6d11(0x1db)]===0x0)[_0x1a6d11(0x1db)];return console['log'](_0x1a6d11(0x113)+_0x6a163e['output']),console['log'](_0x1a6d11(0xbe)+_0x4df9c6),console['log']('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0xf2b744[_0x1a6d11(0x16d)][_0x1a6d11(0x1db)]+'\x20behaviors'),console[_0x1a6d11(0x175)](_0x1a6d11(0xb4)+_0x476d23+_0x1a6d11(0x1e2)),_0x27b25e>0x0&&console[_0x1a6d11(0x175)](_0x1a6d11(0x1d3)+_0x27b25e+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x1a6d11(0xbb)]('\x0a'+a31_0x58debf[_0x1a6d11(0x1ed)]('Output\x20Database:')+'\x20'+a31_0x58debf['cyan'](_0x4df9c6));const _0x1eed2e=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x665238['segment']['getParentSQL'](_0x2d3934),{'verbose':_0x1718fa[_0x1a6d11(0x117)]});console['error']('\x0a'+a31_0x58debf[_0x1a6d11(0x1ed)]('customers')+'\x20'+a31_0x58debf[_0x1a6d11(0x161)]('('+_0x4df9c6+_0x1a6d11(0x1f8)));const _0x54143e=await executeSchemaQuery(_0x1eed2e['data'],_0x665238,_0x1718fa);await handleQueryOutput(_0x54143e,_0x1718fa);const _0x19b8e5=await withSpinner(_0x1a6d11(0x203),()=>_0x665238[_0x1a6d11(0x285)]['getBehaviorNames'](_0x2d3934),{'verbose':_0x1718fa[_0x1a6d11(0x117)]});for(const _0x17465a of _0x19b8e5[_0x1a6d11(0x12c)]){const _0x39f40a=_0x1a6d11(0x294)+_0x17465a[_0x1a6d11(0x22c)]()[_0x1a6d11(0x1ca)](/\s+/g,'_'),_0x28ae61='SELECT\x20*\x20FROM\x20'+_0x4df9c6+'.'+_0x39f40a;console[_0x1a6d11(0xbb)]('\x0a'+a31_0x58debf['bold'](_0x17465a)+'\x20'+a31_0x58debf['dim']('('+_0x4df9c6+'.'+_0x39f40a+')'));try{const _0x277736=await executeSchemaQuery(_0x28ae61,_0x665238,_0x1718fa);await handleQueryOutput(_0x277736,_0x1718fa);}catch{console['error'](a31_0x58debf['yellow'](_0x1a6d11(0x1b9)));}}return 0x0;}async[a31_0x4d721b(0x2a8)](_0x819d2d,_0x575596,_0x1109c3,_0x2a0514){const _0x3df0ad=a31_0x4d721b,{options:_0x528325,tdx:_0x57c9c3}=_0x819d2d,_0x363e8f=await withSpinner(_0x3df0ad(0x252),()=>_0x57c9c3[_0x3df0ad(0x285)][_0x3df0ad(0x14b)](_0x1109c3),{'verbose':_0x528325[_0x3df0ad(0x117)]}),_0x192eab=await executeSchemaQuery(_0x363e8f[_0x3df0ad(0x12c)],_0x57c9c3,_0x528325),_0x112e0d=_0x192eab[_0x3df0ad(0x12c)][_0x3df0ad(0x23e)](_0x35f5ab=>({'name':_0x35f5ab[_0x3df0ad(0x193)],'type':_0x35f5ab[_0x3df0ad(0x1b2)]})),_0x5d3943=await withSpinner(_0x3df0ad(0x203),()=>_0x57c9c3[_0x3df0ad(0x285)][_0x3df0ad(0xfa)](_0x1109c3),{'verbose':_0x528325[_0x3df0ad(0x117)]}),_0x2a0bf0=[];for(const _0x22d20f of _0x5d3943[_0x3df0ad(0x12c)]){const _0x4dcc00=_0x3df0ad(0x294)+_0x22d20f[_0x3df0ad(0x22c)]()[_0x3df0ad(0x1ca)](/\s+/g,'_'),_0x3643b7='SELECT\x20*\x20FROM\x20'+_0x2a0514+'.'+_0x4dcc00;let _0xc14bca=[];try{const _0x4cd5c1=await executeSchemaQuery(_0x3643b7,_0x57c9c3,_0x528325);_0xc14bca=_0x4cd5c1[_0x3df0ad(0x12c)]['map'](_0x3d066c=>({'name':_0x3d066c[_0x3df0ad(0x193)],'type':_0x3d066c[_0x3df0ad(0x1b2)]}));}catch{}_0x2a0bf0[_0x3df0ad(0x1ff)]({'table':_0x4dcc00,'columns':_0xc14bca});}return{'database':_0x2a0514,'parent_segment':_0x575596,'parent_id':_0x1109c3,'customers':{'table':'customers','columns':_0x112e0d},'behaviors':_0x2a0bf0};}[a31_0x4d721b(0x1e7)](_0x219758){const _0x276458=a31_0x4d721b,_0x2b9e1a=_0x505176=>{const _0x1c06f2=a31_0x5b22;if(_0x505176[_0x1c06f2(0x1db)]===0x0)return'[]';const _0x52d51d=_0x505176[_0x1c06f2(0x23e)](_0x485c77=>_0x1c06f2(0x239)+_0x485c77[_0x1c06f2(0x1ab)]+_0x1c06f2(0x145)+_0x485c77[_0x1c06f2(0x1ac)]+'\x22\x20}');return'[\x0a'+_0x52d51d[_0x1c06f2(0xf8)](',\x0a')+_0x1c06f2(0x164);},_0x2aa596=_0x219758[_0x276458(0x16d)]['map'](_0x525fa4=>{const _0x5928ae=_0x276458;return _0x5928ae(0x265)+_0x525fa4[_0x5928ae(0xa5)]+_0x5928ae(0x215)+_0x2b9e1a(_0x525fa4[_0x5928ae(0x280)])[_0x5928ae(0x1ca)](/^/gm,'\x20\x20')[_0x5928ae(0x2a6)]()+_0x5928ae(0xe6);})[_0x276458(0xf8)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x219758[_0x276458(0x15f)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x219758['parent_segment']+_0x276458(0xec)+_0x219758[_0x276458(0xfc)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x219758[_0x276458(0xe7)][_0x276458(0xa5)]+_0x276458(0x112)+_0x2b9e1a(_0x219758['customers']['columns'])[_0x276458(0x1ca)](/^/gm,'\x20\x20')[_0x276458(0x2a6)]()+_0x276458(0x231)+_0x2aa596+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{['name']='segment:parent:sql';[a31_0x4d721b(0x170)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a31_0x4d721b(0x26f)](_0x2e2653){const _0x2245c3=a31_0x4d721b,{options:_0x5ed46a,args:_0x52dea1,tdx:_0x44257c}=_0x2e2653,_0x3bfde7=_0x52dea1[0x0]||_0x5ed46a[_0x2245c3(0xfd)];if(!_0x3bfde7)return showParentSegmentNotSetError(_0x2245c3(0x24d)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment'),0x1;_0x5ed46a[_0x2245c3(0x117)]&&(console['error'](_0x2245c3(0xe8)+_0x5ed46a[_0x2245c3(0x15a)]),console[_0x2245c3(0xbb)](_0x2245c3(0x10a)+_0x3bfde7));const _0x283e10=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3bfde7+_0x2245c3(0x287),()=>_0x44257c['segment']['resolveParentId'](_0x3bfde7),{'verbose':_0x5ed46a[_0x2245c3(0x117)]}),_0x15b171=_0x283e10[_0x2245c3(0x12c)],_0x3053e1=await withSpinner(_0x2245c3(0x262)+_0x3bfde7+_0x2245c3(0x287),()=>_0x44257c[_0x2245c3(0x285)][_0x2245c3(0x14b)](_0x15b171),{'verbose':_0x5ed46a[_0x2245c3(0x117)]}),_0x43aaaf=_0x3053e1[_0x2245c3(0x12c)];return _0x5ed46a[_0x2245c3(0x15c)]===_0x2245c3(0x141)||_0x5ed46a[_0x2245c3(0x15c)]===_0x2245c3(0x19d)?await handleSDKOutput([{'sql':_0x43aaaf}],_0x5ed46a):console[_0x2245c3(0x175)](_0x43aaaf),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x261);[a31_0x4d721b(0x170)]=a31_0x4d721b(0xb2);async[a31_0x4d721b(0x26f)](_0x4cfb16){const _0x5f23df=a31_0x4d721b,{options:_0x1bac2d,args:_0x4193ad,tdx:_0x520fc3}=_0x4cfb16,_0x5d3e05=_0x4193ad[0x0]||_0x1bac2d[_0x5f23df(0xfd)];if(!_0x5d3e05)return showParentSegmentNotSetError(_0x5f23df(0x2a5)+_0x5f23df(0x28d)),0x1;_0x1bac2d[_0x5f23df(0x117)]&&(console[_0x5f23df(0xbb)](_0x5f23df(0xe8)+_0x1bac2d[_0x5f23df(0x15a)]),console[_0x5f23df(0xbb)](_0x5f23df(0x10a)+_0x5d3e05));const _0xf5fd48=await withSpinner(_0x5f23df(0x162)+_0x5d3e05+'\x27...',()=>_0x520fc3[_0x5f23df(0x285)][_0x5f23df(0x1c0)](_0x5d3e05),{'verbose':_0x1bac2d[_0x5f23df(0x117)]}),_0x283765=_0xf5fd48[_0x5f23df(0x12c)],_0x4f729e=await withSpinner(_0x5f23df(0x262)+_0x5d3e05+_0x5f23df(0x287),()=>_0x520fc3['segment'][_0x5f23df(0x14b)](_0x283765),{'verbose':_0x1bac2d[_0x5f23df(0x117)]});let _0x4c5340=_0x4f729e[_0x5f23df(0x12c)];const _0xdac5c4=resolveLimit(_0x1bac2d['limit'],DEFAULT_DISPLAY_LIMIT),_0x5442b6=/\bLIMIT\s+\d+/i[_0x5f23df(0x183)](_0x4c5340);!_0x5442b6&&(_0x4c5340=_0x4c5340[_0x5f23df(0x2a6)]()['replace'](/;+$/,''),_0x4c5340=_0x5f23df(0x18d)+_0x4c5340+_0x5f23df(0x201)+_0xdac5c4);_0x1bac2d[_0x5f23df(0x117)]&&console[_0x5f23df(0xbb)](_0x5f23df(0x246)+_0x4c5340);const _0x35f70a=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x21e730=>{const _0x3a8e2d=_0x5f23df,_0x174379=await _0x520fc3[_0x3a8e2d(0xf5)][_0x3a8e2d(0x26f)](_0x4c5340,{'catalog':'td','schema':_0x3a8e2d(0x1ec),'onJobId':_0x3cae1b=>{const _0x2fc95f=_0x3a8e2d;_0x21e730[_0x2fc95f(0x13d)](_0x3cae1b);}});return _0x174379;},{'verbose':_0x1bac2d[_0x5f23df(0x117)]}),_0x2a9957=_0x35f70a['data'],_0x2f7203=_0x2a9957[_0x5f23df(0x166)]?_0x5f23df(0x1e4)+_0x2a9957[_0x5f23df(0x166)]+']':'';return console[_0x5f23df(0xbb)](_0x5f23df(0x232)+_0x2a9957[_0x5f23df(0x18f)][_0x5f23df(0x1e0)]['toLocaleString']()+_0x5f23df(0xf1)+(_0x5f23df(0x1d5)+formatElapsed(_0x2a9957[_0x5f23df(0x18f)][_0x5f23df(0x250)])+_0x2f7203)),await handleQueryOutput(_0x2a9957,_0x1bac2d),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x286);[a31_0x4d721b(0x170)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a31_0x4d721b(0x26f)](_0x4f38b2){const _0x433996=a31_0x4d721b,{options:_0x6beee5,args:_0xf5440,tdx:_0x778f5f}=_0x4f38b2,_0x3e3057=_0xf5440[0x0],_0x2d6831=await withSpinner(_0x3e3057?_0x433996(0xce)+_0x3e3057+_0x433996(0x287):_0x433996(0xc0),()=>_0x778f5f[_0x433996(0x1f3)][_0x433996(0x24f)](),{'verbose':_0x6beee5['verbose']});let _0x4691c0=_0x2d6831[_0x433996(0x12c)]['filter'](_0x4d15b9=>_0x4d15b9[_0x433996(0x269)]);if(_0x3e3057){const _0x3908ee=_0x3e3057[_0x433996(0x1ca)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x433996(0x1ca)](/\*/g,'.*')[_0x433996(0x1ca)](/\?/g,'.'),_0x2be410=new RegExp('^'+_0x3908ee+'$','i');_0x4691c0=_0x4691c0[_0x433996(0x1fc)](_0x4bdb9c=>_0x2be410[_0x433996(0x183)](_0x4bdb9c[_0x433996(0x1ab)]));}_0x4691c0[_0x433996(0x1b6)]((_0x97eb3b,_0x53aa44)=>_0x97eb3b[_0x433996(0x1ab)][_0x433996(0x14a)](_0x53aa44['name'])),console[_0x433996(0xbb)](_0x433996(0x192)+_0x4691c0['length']+_0x433996(0x19e)+(_0x4691c0['length']!==0x1?'s':''));const _0x30cfc4=_0x45972b=>{const _0x53bf39=_0x433996;return getConsoleNextUrl(_0x6beee5[_0x53bf39(0x15a)],_0x53bf39(0x20e)+_0x45972b);};if(_0x6beee5[_0x433996(0x15c)]===_0x433996(0x141)||_0x6beee5[_0x433996(0x15c)]===_0x433996(0x19d)){const _0xac680f=_0x4691c0[_0x433996(0x23e)](_0x41f652=>({..._0x41f652,'url':_0x30cfc4(_0x41f652['id'])}));await handleSDKOutput(_0xac680f,_0x6beee5);}else{if(_0x4691c0[_0x433996(0x1db)]===0x0)console[_0x433996(0x175)](_0x433996(0x276));else for(const _0x5109c8 of _0x4691c0){const _0x54fb79=_0x5109c8[_0x433996(0x22f)]?a31_0x58debf[_0x433996(0x161)]('\x20('+formatRows(_0x5109c8['population'])+')'):'',_0x587103=hyperlink(_0x5109c8['name'],_0x30cfc4(_0x5109c8['id']));console[_0x433996(0x175)]('⚡\x20'+_0x587103+_0x54fb79);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x4d721b(0x1ab)]='ps:rt:validate';[a31_0x4d721b(0x170)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a31_0x4d721b(0x26f)](_0x5bd6b9){const _0x4a0ea3=a31_0x4d721b,{options:_0x420cff,args:_0xb8245b,tdx:_0x51d781}=_0x5bd6b9,_0x652910=_0xb8245b[0x0]||_0x420cff[_0x4a0ea3(0xfd)];if(!_0x652910)return showParentSegmentNotSetError(_0x4a0ea3(0x28f)+_0x4a0ea3(0x1c1)),0x1;const _0x2b9085=resolveYamlFile(_0x652910);if(!existsSync(_0x2b9085))return showFileNotFoundError(_0x2b9085,_0x652910),0x1;let _0x2a0c72;try{_0x2a0c72=readFileSync(_0x2b9085,_0x4a0ea3(0x20c));}catch(_0xfcc6f9){const _0x3cf6df=_0xfcc6f9 instanceof Error?_0xfcc6f9[_0x4a0ea3(0x1cb)]:String(_0xfcc6f9);return console[_0x4a0ea3(0xbb)]('Error\x20reading\x20file:\x20'+_0x3cf6df),0x1;}const _0x857802=createCommandSpinner(a31_0x58debf['dim'](_0x4a0ea3(0x298)),{'verbose':_0x420cff[_0x4a0ea3(0x117)]});_0x857802['start']();const _0xefe04={'realtime':!![],'onProgress':_0x594f58=>{const _0x213c8b=_0x4a0ea3;_0x857802[_0x213c8b(0xb5)]=formatProgressMessage(_0x594f58);}};let _0x2c79ea;try{_0x2c79ea=await _0x51d781[_0x4a0ea3(0x285)][_0x4a0ea3(0x14d)](_0x2a0c72,_0xefe04),_0x857802['stop']();}catch(_0x29991e){_0x857802[_0x4a0ea3(0x14c)]();throw _0x29991e;}console['error']('\x0a'+a31_0x58debf[_0x4a0ea3(0x1ed)](_0x4a0ea3(0x189))+'\x20'+_0x2c79ea[_0x4a0ea3(0x1ab)]),console[_0x4a0ea3(0xbb)]('═'['repeat'](0x3c)),displayRealtimeValidation(_0x2c79ea),console['error']('─'['repeat'](0x3c));if(_0x2c79ea[_0x4a0ea3(0x2aa)][_0x4a0ea3(0x1db)]>0x0){console[_0x4a0ea3(0xbb)]('\x0a'+a31_0x58debf[_0x4a0ea3(0xfb)](_0x4a0ea3(0x256)));for(const _0x2cdc1a of _0x2c79ea[_0x4a0ea3(0x2aa)]){console[_0x4a0ea3(0xbb)]('\x20\x20'+a31_0x58debf['red']('•')+'\x20'+_0x2cdc1a);}}return _0x2c79ea['allValid']&&console[_0x4a0ea3(0xbb)]('\x0a'+a31_0x58debf[_0x4a0ea3(0x219)]('✔')+_0x4a0ea3(0x226)),_0x2c79ea[_0x4a0ea3(0x291)]?0x0:0x1;}}function a31_0x15f1(){const _0x4815a0=['Fetching\x20parent\x20segment\x20\x27','\x20--attribute\x20\x22','push','✔\x20Updated\x20personalization\x20\x27','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','displayValidateResults','Fetching\x20behavior\x20list...','interval','Listing\x20personalizations\x20for\x20\x27','dirname','Apply\x20changes\x20to\x20\x27','payload:','Deleting\x20token\x20\x27','\x0a⚠️\x20\x20Both\x20','audienceId:\x20','utf-8','patch','/app/dw/parentSegments/','\x27\x20with\x20ID:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','displayColumns','token:','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','Overwrite\x20\x27','\x20configured','✔\x20Deleted\x20personalization\x20\x27','green','Next\x20steps:','public:','allowedIps','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','master','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','realtime:','audienceId','delete','\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','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','\x20RT\x20configuration\x20is\x20valid','Pattern:\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','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','stringify','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','toLowerCase','Pause\x20activations\x20in\x20an\x20RT\x20journey','workflowSessionId','population','Validate:','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','✔\x20Query\x20completed:\x20Processed\x20','session','varchar','use','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','open','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','id:\x20','\x20to\x20configure\x20your\x20personalization\x20service','td_client_id','keyEventCriteria','map','identifier:\x20','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x0aError:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','/\x20directory.\x0a','output','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','SQL\x20query:\x0a','✔\x20Deleted\x20personalization\x20service\x20\x27','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','Audience\x20ID:','entryCriteria','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Creating','list','elapsedTimeMillis','\x20kill','Fetching\x20customers\x20schema...','some','last_page_viewed','displaySampleData','Errors:','Master\x20Table','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','pauseJourney','platform','label','ps:rt:jn:resume','sections','valid','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','segment:parent:show','Fetching\x20SQL\x20for\x20\x27','YAML\x20file:\x20','30KlCsXF','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','deleteToken','eventKind','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','realtime_enabled','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','ps:pz:service:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Attributes:','Create\x20a\x20realtime\x20personalization\x20entity','execute','match','tdx\x20ps\x20push\x20','paused','\x20personalization\x20service','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Error\x20reading\x20file:\x20','No\x20RT-enabled\x20parent\x20segments\x20found','ps:pz:show','segment:parent:create','double','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','\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','xdg-open','create','Resume\x20activations\x20in\x20an\x20RT\x20journey','`\x20to\x20download\x20the\x20configuration\x20first','columns','customerPercent','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','getCurrentConfigVersion','segment','ps:rt:list','\x27...','Creating\x20parent\x20segment\x20\x27','file','sourceTableValid','\x20to\x20push\x20the\x20configuration','events','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','stitchingKeys','allValid','workflowAttemptId','Events:','behavior_','updated:','\x0aUsage:\x20tdx\x20ps\x20preview\x20','stageCount','Validating\x20RT\x20configuration...','displaySummary','ps:pz:service:delete','Error:','\x20service','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','launched','Error\x20parsing\x20YAML:\x20','\x20parent\x20segment\x20\x27','single','Error:\x20Personalization\x20ID\x20is\x20required','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\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','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','trim','2148552wCPuyF','collectSchema','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','errors','schemaValid','Updated','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20--enriched','\x20Added\x20personalization\x20template\x20to\x20','personalizationServices','rowCount','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','parent_segments','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','table','\x20true','\x27\x20for\x20service\x20\x27','idStitching','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','updatedAt','payload','attribute','listFields','behavior','Master:','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','primaryKey','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','\x27\x20is\x20up\x20to\x20date','\x20\x20Columns:\x20','text','\x20parent\x20segment','\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','addAttributesFile','keyEventId','\x20+\x20[','error','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20\x20Database:\x20','\x20=\x20','Listing\x20RT-enabled\x20parent\x20segments...','Finding\x20service\x20for\x20token...','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Error:\x20Service\x20ID\x20is\x20required','preview','tdx\x20ps\x20preview\x20','Fetching\x20sample\x20data...','public','153PkJIoM','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','segment:parent:fields','displayPreviewResults','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','tokens','displayBehaviorsStats','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','Creating\x20personalization\x20service\x20\x27','createPersonalization','customerGroup','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Update\x20a\x20realtime\x20personalization\x20entity','segment:parent:desc','yellow','attributes','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','⚡\x20Not\x20enabled','Columns:','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Error:\x20Token\x20name\x20is\x20required','\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','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Aborted.','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Status:','indexOf','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x0a\x20\x20\x20\x20}','customers','Site:\x20','darwin','null','unref','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x20\x202.\x20Run\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Error:\x20Token\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\x20rows\x20','Personalization:','status:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','query','Master\x20+\x20Attributes','\x20rows)','join','Error:\x20--attribute\x20requires\x20a\x20name\x0a','getBehaviorNames','red','parent_id','parentSegment','RT\x20Journey\x20ID:\x20','state','50445pRBFis','totalEvents','To\x20cancel:','displayAttributesStats','schemaError','string','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','listJourneys','.yml','Parent\x20segment:\x20','\x20\x20No\x20sample\x20data\x20available','Error:\x20Token\x20ID\x20is\x20required','allowed\x20IPs:','Validating\x20configuration...','Output\x20file:\x20','\x20--interval\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Schema\x20saved\x20to\x20','No\x20personalization\x20services\x20configured','FINISHED','✘\x20Failed\x20to\x20rename\x20directory:\x20','verbose','getParentFull','Preview:','segment:parent:pull','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','RT\x202.0:','displayPreviewHints','entryCriteria:','Source:','isDirectory','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','deletePersonalization','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','number','\x27\x20is\x20already\x20up\x20to\x20date','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','238328xkwtix','\x20\x20\x20\x20\x20\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','timezone','data','no\x20tokens\x20configured','%)\x20','segment:parent:update','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','all','folderId','ps:pz:service:show','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Coverage:','runParent','addBehaviorsFile','get','apply','Show\x20personalization\x20service\x20details','segment:parent:validate','Options:\x0a','setJobId','ID\x20Stitching:','start','page_view','json','\x0aNo\x20sample\x20data\x20available','No\x20parent\x20segments\x20match\x20pattern:\x20','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x22,\x20\x22type\x22:\x20\x22','\x20\x201.\x20Edit\x20','personalization','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20\x20','localeCompare','getParentSQL','stop','validateParentYaml','ps:pz:init','toFixed','parent_segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','matchedCount','win32','468QLSttp','-1d','enriched','createParent','\x5c$&','✔\x20Found\x20personalization\x20\x27','site','Name:\x20','format','Join:','foreignKey','database','9cDVrNX','dim','Resolving\x20parent\x20segment\x20\x27','\x20(paused)','\x0a\x20\x20\x20\x20]','sourceTableError','jobId','\x20Context\x20set:\x20','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','listParents','No\x20RT\x20journeys\x20found','✔\x20No\x20changes\x20-\x20\x27','Created','behaviors','value','Options\x20(one\x20required):\x0a','description','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Rows:','✔\x20Created\x20personalization\x20\x27','Join\x20on:','log','any','List\x20available\x20fields\x20for\x20segmentation','createToken','\x20\x20\x20','Updating\x20personalization\x20service\x20\x27','ps:pz:service:create','eventKind:\x20','✔\x20Created\x20token\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Database:\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','getOutputDatabaseName','test','segment:parent:view','ignore','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','/\x20→\x20','/{name}.yml\x0a','RT\x202.0\x20Validate:','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x27\x20(id:\x20','✔\x20Retrieved\x20RT\x20configuration\x20version','SELECT\x20*\x20FROM\x20(\x0a','\x20--behavior\x20\x22<name>\x22','stats','joinKey','customersWithEvents','✔\x20Found\x20','column_name','Show\x20parent\x20segment\x20details','✔\x20Created\x20personalization\x20service\x20\x27','✔\x20Renamed\x20directory\x20to\x20','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','/app/workflows/','\x0aNew\x20parent\x20segment\x20\x27','Show\x20a\x20specific\x20realtime\x20personalization','Patching\x20personalization\x20\x27','scheduleType','jsonl','\x20RT-enabled\x20parent\x20segment','Available\x20behaviors:','Attempt:','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20No\x20changes\x20-\x20','segment:parent:preview','6dHAsEh','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x20--behavior\x20\x22','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','✔\x20Updated\x20parent\x20segment\x20\x27','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','\x20Configuration\x20is\x20valid','name','type','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','ps:rt:configuration_versions','segment:parent:list','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','column_type','886704JJZXWc','Session:','/sessions/','sort','Get\x20current\x20RT\x20configuration\x20version\x20status','\x27\x20and\x20run\x20workflow?','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Listing\x20personalization\x20services\x20for\x20\x27','column','yes','true','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','cyan','resolveParentId','\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','(id:\x20','run','coveragePercent','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','status','pushParentYaml','using\x20the\x20default\x20path:\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','replace','message','1466058VLTAvZ','Deleting\x20personalization\x20service\x20\x27','enabled','Error:\x20--database\x20and\x20--table\x20are\x20required','Analyzing\x20changes...','scheduleOption','displayMasterInfo','\x20\x20Note:\x20','\x20service(s)\x20configured','in\x20','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','addBehaviors','repeat','\x0aChanges\x20to\x20\x27','personalization_services','length','Found\x20YAML\x20file:\x20','\x0a✔\x20Workflow\x20started','behaviorsFile','endsWith','processedRows','split','\x20total','👥\x20','\x20[Job\x20ID:\x20','\x20tdx\x20wf\x20attempt\x20','workflowId','formatSchemaJson','\x20\x20\x20\x20','ps:rt:jn:pause','previewParentYaml','Fetching\x20current\x20configuration\x20for\x20\x27','information_schema','bold','Delete\x20a\x20realtime\x20personalization','\x20\x20\x20\x20-\x20','\x20personalization','203371pAVCVv','Enriched:','realtime','Getting\x20personalization\x20\x27','Updating\x20parent\x20segment\x20\x27','No\x20parent\x20segments\x20found','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','.customers)','sampleData','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','attributesFile','filter'];a31_0x15f1=function(){return _0x4815a0;};return a31_0x15f1();}export class PSRtJnListCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:rt:jn:list';[a31_0x4d721b(0x170)]='List\x20RT\x20journeys';async[a31_0x4d721b(0x26f)](_0x26bbdb){const _0x5683fb=a31_0x4d721b,{options:_0x31671b,args:_0x339609,tdx:_0x215421}=_0x26bbdb,_0x40eeb8=_0x339609[0x0]||_0x31671b[_0x5683fb(0xfd)];if(!_0x40eeb8)return showParentSegmentNotSetError(_0x5683fb(0x1a9)+_0x5683fb(0x111)),0x1;_0x31671b[_0x5683fb(0x117)]&&(console[_0x5683fb(0xbb)](_0x5683fb(0xe8)+_0x31671b['site']),console[_0x5683fb(0xbb)](_0x5683fb(0x10a)+_0x40eeb8));const _0x235de1=await withSpinner(_0x5683fb(0x162)+_0x40eeb8+'\x27...',()=>_0x215421[_0x5683fb(0x285)][_0x5683fb(0x1c0)](_0x40eeb8),{'verbose':_0x31671b[_0x5683fb(0x117)]}),_0x17bd05=_0x235de1[_0x5683fb(0x12c)],_0x43f507=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x40eeb8+_0x5683fb(0x287),()=>_0x215421[_0x5683fb(0x1f3)][_0x5683fb(0x108)](_0x17bd05),{'verbose':_0x31671b[_0x5683fb(0x117)]}),_0x21555f=_0x43f507[_0x5683fb(0x12c)];console['error'](_0x5683fb(0x192)+_0x21555f['length']+'\x20RT\x20journey'+(_0x21555f[_0x5683fb(0x1db)]!==0x1?'s':''));if(_0x31671b[_0x5683fb(0x15c)]===_0x5683fb(0x141)||_0x31671b[_0x5683fb(0x15c)]==='jsonl')await handleSDKOutput(_0x21555f,_0x31671b);else{if(_0x21555f[_0x5683fb(0x1db)]===0x0)console['log'](_0x5683fb(0x16a));else for(const _0x903e60 of _0x21555f){const _0x4fb959=_0x903e60[_0x5683fb(0xff)]===_0x5683fb(0x29e)?'🚀':'📝',_0x54dc44=_0x903e60[_0x5683fb(0x272)]?a31_0x58debf[_0x5683fb(0xd8)](_0x5683fb(0x163)):'',_0x541692=a31_0x58debf[_0x5683fb(0x161)]('\x20('+_0x903e60[_0x5683fb(0x297)]+'\x20stage'+(_0x903e60['stageCount']!==0x1?'s':'')+')');console[_0x5683fb(0x175)](_0x4fb959+'\x20'+_0x903e60[_0x5683fb(0x1ab)]+_0x54dc44+_0x541692);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x1e9);['description']=a31_0x4d721b(0x22d);async['execute'](_0x44d8f9){const _0x103802=a31_0x4d721b,{options:_0x31cbe5,args:_0x4b4cc4,tdx:_0x2a350a}=_0x44d8f9,_0x301752=_0x4b4cc4[0x0];if(!_0x301752)return console['error'](a31_0x58debf['red'](_0x103802(0x1d6))),console[_0x103802(0xbb)](_0x103802(0x107)),console[_0x103802(0xbb)](a31_0x58debf[_0x103802(0x161)](_0x103802(0xca))),0x1;_0x31cbe5[_0x103802(0x117)]&&(console[_0x103802(0xbb)](_0x103802(0xe8)+_0x31cbe5['site']),console[_0x103802(0xbb)]('RT\x20Journey\x20ID:\x20'+_0x301752));const _0x48bd51=await withSpinner(_0x103802(0x181)+_0x301752+_0x103802(0x287),()=>_0x2a350a['realtime'][_0x103802(0x25a)](_0x301752),{'verbose':_0x31cbe5['verbose']}),_0x17fd71=_0x48bd51['data'];console[_0x103802(0xbb)](_0x103802(0x1fa)+_0x17fd71[_0x103802(0x1ab)]+'\x27');if(_0x31cbe5['format']===_0x103802(0x141)||_0x31cbe5[_0x103802(0x15c)]===_0x103802(0x19d))await handleSDKOutput([_0x17fd71],_0x31cbe5);else{const _0x4d3e1f=_0x17fd71[_0x103802(0xff)]===_0x103802(0x29e)?'🚀':'📝',_0x17f30e=_0x17fd71[_0x103802(0x272)]?a31_0x58debf['yellow'](_0x103802(0x163)):'';console[_0x103802(0x175)](_0x4d3e1f+'\x20'+_0x17fd71['name']+_0x17f30e);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x25d);['description']=a31_0x4d721b(0x27e);async[a31_0x4d721b(0x26f)](_0x4f0611){const _0x5d8744=a31_0x4d721b,{options:_0x2e97df,args:_0x2b4653,tdx:_0x35afae}=_0x4f0611,_0x122131=_0x2b4653[0x0];if(!_0x122131)return console[_0x5d8744(0xbb)](a31_0x58debf['red'](_0x5d8744(0x1d6))),console[_0x5d8744(0xbb)](_0x5d8744(0x27a)),console[_0x5d8744(0xbb)](a31_0x58debf[_0x5d8744(0x161)](_0x5d8744(0xca))),0x1;_0x2e97df['verbose']&&(console[_0x5d8744(0xbb)](_0x5d8744(0xe8)+_0x2e97df[_0x5d8744(0x15a)]),console[_0x5d8744(0xbb)](_0x5d8744(0xfe)+_0x122131));const _0x3670b2=await withSpinner(_0x5d8744(0x225)+_0x122131+_0x5d8744(0x287),()=>_0x35afae[_0x5d8744(0x1f3)]['resumeJourney'](_0x122131),{'verbose':_0x2e97df['verbose']}),_0x53ccd5=_0x3670b2[_0x5d8744(0x12c)];console[_0x5d8744(0xbb)](_0x5d8744(0xc2)+_0x53ccd5[_0x5d8744(0x1ab)]+'\x27');if(_0x2e97df['format']===_0x5d8744(0x141)||_0x2e97df['format']===_0x5d8744(0x19d))await handleSDKOutput([_0x53ccd5],_0x2e97df);else{const _0x5eca41=_0x53ccd5[_0x5d8744(0xff)]===_0x5d8744(0x29e)?'🚀':'📝',_0x5c3380=_0x53ccd5[_0x5d8744(0x272)]?a31_0x58debf['yellow'](_0x5d8744(0x163)):'';console[_0x5d8744(0x175)](_0x5eca41+'\x20'+_0x53ccd5[_0x5d8744(0x1ab)]+_0x5c3380);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x1af);['description']=a31_0x4d721b(0x1b7);async[a31_0x4d721b(0x26f)](_0xef4885){const _0xdfab77=a31_0x4d721b,{options:_0x55086a,args:_0x175ce1,tdx:_0x4bc12e}=_0xef4885,_0x29f274=_0x175ce1[0x0]||_0x55086a[_0xdfab77(0xfd)];if(!_0x29f274)return showParentSegmentNotSetError(_0xdfab77(0x268)+_0xdfab77(0xdf)),0x1;_0x55086a[_0xdfab77(0x117)]&&(console[_0xdfab77(0xbb)](_0xdfab77(0xe8)+_0x55086a['site']),console[_0xdfab77(0xbb)](_0xdfab77(0x10a)+_0x29f274));const _0x4ba31d=await withSpinner(_0xdfab77(0x162)+_0x29f274+'\x27...',()=>_0x4bc12e[_0xdfab77(0x285)][_0xdfab77(0x1c0)](_0x29f274),{'verbose':_0x55086a[_0xdfab77(0x117)]}),_0x245101=_0x4ba31d['data'],_0x4a40a1=await withSpinner(_0xdfab77(0x106)+_0x29f274+_0xdfab77(0x287),()=>_0x4bc12e[_0xdfab77(0x1f3)][_0xdfab77(0x284)](_0x245101),{'verbose':_0x55086a[_0xdfab77(0x117)]}),_0x3fe346=_0x4a40a1[_0xdfab77(0x12c)];return console[_0xdfab77(0xbb)](_0xdfab77(0x18c)),_0x55086a['format']===_0xdfab77(0x141)||_0x55086a[_0xdfab77(0x15c)]===_0xdfab77(0x19d)?await handleSDKOutput([_0x3fe346],_0x55086a):(console[_0xdfab77(0x175)](_0xdfab77(0x23a)+_0x3fe346['id']),console[_0xdfab77(0x175)](_0xdfab77(0x20b)+_0x3fe346['audienceId']),console[_0xdfab77(0x175)](_0xdfab77(0x23f)+_0x3fe346['identifier']),console[_0xdfab77(0x175)](_0xdfab77(0x17c)+_0x3fe346[_0xdfab77(0x267)]),console[_0xdfab77(0x175)](_0xdfab77(0xf3)+_0x3fe346['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x26b);['description']='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async['execute'](_0x527dc2){const _0x40d652=a31_0x4d721b,{options:_0x97436a,args:_0x592463,tdx:_0x50e153}=_0x527dc2,_0x5e8ae4=_0x592463[0x0]||_0x97436a[_0x40d652(0xfd)];if(!_0x5e8ae4)return showParentSegmentNotSetError(_0x40d652(0x151)+_0x40d652(0x27b)),0x1;const _0x43ff46=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5e8ae4+_0x40d652(0x287),()=>_0x50e153[_0x40d652(0x285)][_0x40d652(0x1c0)](_0x5e8ae4),{'verbose':_0x97436a[_0x40d652(0x117)]}),_0x58a205=_0x43ff46[_0x40d652(0x12c)],_0x1de8a9=await withSpinner(_0x40d652(0x1ba)+_0x5e8ae4+_0x40d652(0x287),()=>_0x50e153['personalization'][_0x40d652(0x24f)](_0x58a205),{'verbose':_0x97436a[_0x40d652(0x117)]}),_0x2a2988=_0x1de8a9[_0x40d652(0x12c)];console[_0x40d652(0xbb)](_0x40d652(0x192)+_0x2a2988[_0x40d652(0x1db)]+_0x40d652(0x273)+(_0x2a2988[_0x40d652(0x1db)]!==0x1?'s':''));if(_0x97436a[_0x40d652(0x15c)]===_0x40d652(0x141)||_0x97436a[_0x40d652(0x15c)]===_0x40d652(0x19d))await handleSDKOutput(_0x2a2988,_0x97436a);else{if(_0x2a2988[_0x40d652(0x1db)]===0x0)console['log'](_0x40d652(0x114)),console['error'](a31_0x58debf['cyan'](_0x40d652(0xc3)));else for(const _0x2fb08a of _0x2a2988){console['log'](a31_0x58debf[_0x40d652(0x1ed)](_0x2fb08a[_0x40d652(0x1ab)])+'\x20'+a31_0x58debf['dim'](_0x40d652(0x1c2)+_0x2fb08a['id']+')'));_0x2fb08a['description']&&console[_0x40d652(0x175)]('\x20\x20'+a31_0x58debf['dim'](_0x2fb08a[_0x40d652(0x170)]));if(_0x2fb08a['tokens']&&_0x2fb08a[_0x40d652(0xcf)][_0x40d652(0x1db)]>0x0)for(const _0x143849 of _0x2fb08a[_0x40d652(0xcf)]){const _0x568b68=_0x143849[_0x40d652(0x21c)]?.['length']?_0x143849[_0x40d652(0x21c)][_0x40d652(0xf8)](',\x20'):_0x40d652(0x176);console['log']('\x20\x20'+a31_0x58debf['cyan'](_0x40d652(0x213))+'\x20'+_0x143849[_0x40d652(0x1ab)]+'\x20'+a31_0x58debf[_0x40d652(0x161)]('(id:\x20'+_0x143849['id']+')')),console['log'](_0x40d652(0x1e8)+a31_0x58debf['dim'](_0x40d652(0x10d))+'\x20'+_0x568b68);}else console['log']('\x20\x20'+a31_0x58debf[_0x40d652(0x161)](_0x40d652(0x12d)));}}return 0x0;}}function a31_0x5b22(_0x83fa20,_0x35adf3){_0x83fa20=_0x83fa20-0xa4;const _0x15f1ac=a31_0x15f1();let _0x5b22ec=_0x15f1ac[_0x83fa20];return _0x5b22ec;}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a31_0x4d721b(0x17b);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x148);async['execute'](_0x44f1eb){const _0x22e1dc=a31_0x4d721b,{options:_0x306c3f,args:_0x5946d0,tdx:_0x53a079}=_0x44f1eb,_0x12ccaf=_0x306c3f,_0x59d2cf=_0x5946d0[0x0],_0x4153f5=_0x5946d0[0x1]||_0x306c3f[_0x22e1dc(0xfd)];if(!_0x59d2cf)return console[_0x22e1dc(0xbb)]('Error:\x20Service\x20name\x20is\x20required'),console[_0x22e1dc(0xbb)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4153f5)return showParentSegmentNotSetError(_0x22e1dc(0x236)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x2e17ab=await withSpinner(_0x22e1dc(0x162)+_0x4153f5+_0x22e1dc(0x287),()=>_0x53a079[_0x22e1dc(0x285)]['resolveParentId'](_0x4153f5),{'verbose':_0x306c3f[_0x22e1dc(0x117)]}),_0x3ae8a2=_0x2e17ab[_0x22e1dc(0x12c)],_0x45e86c={'name':_0x59d2cf,'description':_0x12ccaf['description'],'public':_0x12ccaf[_0x22e1dc(0xc8)]},_0x201d22=await withSpinner(_0x22e1dc(0xd2)+_0x59d2cf+_0x22e1dc(0x287),()=>_0x53a079['personalization'][_0x22e1dc(0x27d)](_0x3ae8a2,_0x45e86c),{'verbose':_0x306c3f[_0x22e1dc(0x117)]}),_0x3a3f9e=_0x201d22['data'];return console[_0x22e1dc(0xbb)](_0x22e1dc(0x195)+_0x3a3f9e[_0x22e1dc(0x1ab)]+'\x27\x20with\x20ID:\x20'+_0x3a3f9e['id']),await handleSDKOutput([_0x3a3f9e],_0x306c3f),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x133);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x13a);async[a31_0x4d721b(0x26f)](_0x5b2b42){const _0x1dfdc5=a31_0x4d721b,{options:_0x4003c6,args:_0x2fbfd7,tdx:_0x516c86}=_0x5b2b42,_0x12c779=_0x2fbfd7[0x0],_0x129c8f=_0x2fbfd7[0x1]||_0x4003c6[_0x1dfdc5(0xfd)];if(!_0x12c779)return console[_0x1dfdc5(0xbb)](_0x1dfdc5(0xc4)),console['error'](_0x1dfdc5(0x2a9)),console[_0x1dfdc5(0xbb)](_0x1dfdc5(0xd5)),0x1;if(!_0x129c8f)return showParentSegmentNotSetError(_0x1dfdc5(0x258)+_0x1dfdc5(0xd5)),0x1;const _0x4ea6c1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x129c8f+_0x1dfdc5(0x287),()=>_0x516c86[_0x1dfdc5(0x285)][_0x1dfdc5(0x1c0)](_0x129c8f),{'verbose':_0x4003c6[_0x1dfdc5(0x117)]}),_0x45b8c0=_0x4ea6c1[_0x1dfdc5(0x12c)],_0xc3fba5=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x12c779+_0x1dfdc5(0x287),()=>_0x516c86[_0x1dfdc5(0x147)][_0x1dfdc5(0x138)](_0x45b8c0,_0x12c779),{'verbose':_0x4003c6[_0x1dfdc5(0x117)]}),_0x1f05f9=_0xc3fba5['data'];if(_0x4003c6[_0x1dfdc5(0x141)]||_0x4003c6['jsonl'])await handleSDKOutput([_0x1f05f9],_0x4003c6);else{console[_0x1dfdc5(0x175)](a31_0x58debf['bold'](_0x1f05f9[_0x1dfdc5(0x1ab)])+'\x20'+a31_0x58debf['dim'](_0x1dfdc5(0x1c2)+_0x1f05f9['id']+')'));_0x1f05f9[_0x1dfdc5(0x170)]&&console[_0x1dfdc5(0x175)]('\x20\x20'+a31_0x58debf[_0x1dfdc5(0x161)](_0x1f05f9[_0x1dfdc5(0x170)]));console[_0x1dfdc5(0x175)]('\x20\x20'+a31_0x58debf[_0x1dfdc5(0x1bf)](_0x1dfdc5(0x21b))+'\x20'+(_0x1f05f9['public']?_0x1dfdc5(0x1bc):'no'));if(_0x1f05f9[_0x1dfdc5(0xcf)]&&_0x1f05f9[_0x1dfdc5(0xcf)][_0x1dfdc5(0x1db)]>0x0)for(const _0x331085 of _0x1f05f9['tokens']){const _0x469d32=_0x331085['allowedIps']?.['length']?_0x331085[_0x1dfdc5(0x21c)]['join'](',\x20'):'any';console[_0x1dfdc5(0x175)]('\x20\x20'+a31_0x58debf[_0x1dfdc5(0x1bf)](_0x1dfdc5(0x213))+'\x20'+_0x331085[_0x1dfdc5(0x1ab)]+'\x20'+a31_0x58debf[_0x1dfdc5(0x161)](_0x1dfdc5(0x1c2)+_0x331085['id']+')')),console[_0x1dfdc5(0x175)]('\x20\x20\x20\x20'+a31_0x58debf['dim'](_0x1dfdc5(0x10d))+'\x20'+_0x469d32);}else console[_0x1dfdc5(0x175)]('\x20\x20'+a31_0x58debf['dim'](_0x1dfdc5(0x12d)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x29a);[a31_0x4d721b(0x170)]='Delete\x20a\x20personalization\x20service';async[a31_0x4d721b(0x26f)](_0x4e082f){const _0x572aaa=a31_0x4d721b,{options:_0x34037a,args:_0x38b24e,tdx:_0x4c404e}=_0x4e082f,_0x2aee53=_0x38b24e[0x0],_0x9d667b=_0x38b24e[0x1]||_0x34037a[_0x572aaa(0xfd)];if(!_0x2aee53)return console[_0x572aaa(0xbb)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x572aaa(0xbb)](_0x572aaa(0x18a)),console[_0x572aaa(0xbb)](_0x572aaa(0x2ad)),0x1;if(!_0x9d667b)return showParentSegmentNotSetError(_0x572aaa(0x17e)+_0x572aaa(0x2ad)),0x1;const _0x2f1252=await withSpinner(_0x572aaa(0x162)+_0x9d667b+'\x27...',()=>_0x4c404e[_0x572aaa(0x285)][_0x572aaa(0x1c0)](_0x9d667b),{'verbose':_0x34037a['verbose']}),_0x585fc4=_0x2f1252[_0x572aaa(0x12c)];return await withSpinner(_0x572aaa(0x1cd)+_0x2aee53+'\x27...',()=>_0x4c404e[_0x572aaa(0x147)][_0x572aaa(0x222)](_0x585fc4,_0x2aee53),{'verbose':_0x34037a[_0x572aaa(0x117)]}),console['error'](_0x572aaa(0x247)+_0x2aee53+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']='ps:pz:service:update';[a31_0x4d721b(0x170)]=a31_0x4d721b(0x259);async[a31_0x4d721b(0x26f)](_0xc2d133){const _0x3a632c=a31_0x4d721b,{options:_0x23703d,args:_0x5e9d8a,tdx:_0x165a4c}=_0xc2d133,_0x4abf4c=_0x23703d,_0x1ec602=_0x5e9d8a[0x0],_0x1e3b9a=_0x5e9d8a[0x1]||_0x23703d[_0x3a632c(0xfd)];if(!_0x1ec602)return console[_0x3a632c(0xbb)](_0x3a632c(0xc4)),console[_0x3a632c(0xbb)](_0x3a632c(0x26c)),console[_0x3a632c(0xbb)](_0x3a632c(0xcd)),0x1;if(!_0x4abf4c[_0x3a632c(0x1ab)])return console['error']('Error:\x20--name\x20is\x20required'),console[_0x3a632c(0xbb)](_0x3a632c(0x26c)),0x1;if(!_0x1e3b9a)return showParentSegmentNotSetError(_0x3a632c(0x210)+_0x3a632c(0xcd)),0x1;const _0x5d5681=await withSpinner(_0x3a632c(0x162)+_0x1e3b9a+_0x3a632c(0x287),()=>_0x165a4c['segment']['resolveParentId'](_0x1e3b9a),{'verbose':_0x23703d[_0x3a632c(0x117)]}),_0x46ade2=_0x5d5681[_0x3a632c(0x12c)],_0x4fd724={'name':_0x4abf4c[_0x3a632c(0x1ab)]};_0x4abf4c[_0x3a632c(0x170)]!==undefined&&(_0x4fd724[_0x3a632c(0x170)]=_0x4abf4c[_0x3a632c(0x170)]);const _0x5d1e7b=await withSpinner(_0x3a632c(0x17a)+_0x1ec602+_0x3a632c(0x287),()=>_0x165a4c[_0x3a632c(0x147)][_0x3a632c(0x20d)](_0x46ade2,_0x1ec602,_0x4fd724),{'verbose':_0x23703d['verbose']}),_0x4989bf=_0x5d1e7b['data'];return console[_0x3a632c(0xbb)]('✔\x20Updated\x20personalization\x20service\x20\x27'+_0x4989bf[_0x3a632c(0x1ab)]+'\x27'),await handleSDKOutput([_0x4989bf],_0x23703d),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:pz:service:token:create';[a31_0x4d721b(0x170)]=a31_0x4d721b(0xa9);async[a31_0x4d721b(0x26f)](_0x5d9a53){const _0x5c397f=a31_0x4d721b,{options:_0x28c0ce,args:_0x3096d3,tdx:_0x596b66}=_0x5d9a53,_0x527c19=_0x28c0ce,_0x5be8e6=_0x3096d3[0x0],_0x136b8e=_0x3096d3[0x1],_0x54d2ea=_0x3096d3[0x2]||_0x28c0ce[_0x5c397f(0xfd)];if(!_0x5be8e6)return console[_0x5c397f(0xbb)](_0x5c397f(0xde)),console[_0x5c397f(0xbb)](_0x5c397f(0xf0)),console[_0x5c397f(0xbb)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x136b8e)return console['error'](_0x5c397f(0xc4)),console[_0x5c397f(0xbb)](_0x5c397f(0xf0)),console[_0x5c397f(0xbb)](_0x5c397f(0x1ae)),0x1;if(!_0x54d2ea)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 _0x2822ef=await withSpinner(_0x5c397f(0x162)+_0x54d2ea+_0x5c397f(0x287),()=>_0x596b66[_0x5c397f(0x285)]['resolveParentId'](_0x54d2ea),{'verbose':_0x28c0ce['verbose']}),_0x3d77db=_0x2822ef[_0x5c397f(0x12c)],_0x121a98={'name':_0x5be8e6};_0x527c19[_0x5c397f(0x21c)]&&(_0x121a98[_0x5c397f(0x21c)]=_0x527c19[_0x5c397f(0x21c)][_0x5c397f(0x1e1)](',')[_0x5c397f(0x23e)](_0x29177d=>_0x29177d[_0x5c397f(0x2a6)]()));_0x527c19[_0x5c397f(0x170)]&&(_0x121a98[_0x5c397f(0x170)]=_0x527c19[_0x5c397f(0x170)]);const _0x4150d5=await withSpinner('Creating\x20token\x20\x27'+_0x5be8e6+_0x5c397f(0xa7)+_0x136b8e+_0x5c397f(0x287),()=>_0x596b66[_0x5c397f(0x147)][_0x5c397f(0x178)](_0x3d77db,_0x136b8e,_0x121a98),{'verbose':_0x28c0ce[_0x5c397f(0x117)]}),_0x34df7a=_0x4150d5[_0x5c397f(0x12c)];return console[_0x5c397f(0xbb)](_0x5c397f(0x17d)+_0x34df7a[_0x5c397f(0x1ab)]+_0x5c397f(0x20f)+_0x34df7a['id']),_0x34df7a[_0x5c397f(0x16e)]&&(console[_0x5c397f(0xbb)](a31_0x58debf[_0x5c397f(0xd8)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x5c397f(0xbb)](a31_0x58debf[_0x5c397f(0x1bf)](_0x34df7a[_0x5c397f(0x16e)])),console[_0x5c397f(0xbb)]('')),await handleSDKOutput([_0x34df7a],_0x28c0ce),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:pz:service:token:delete';[a31_0x4d721b(0x170)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a31_0x4d721b(0x26f)](_0x3df913){const _0x240896=a31_0x4d721b,{options:_0x4b90e,args:_0x5248ad,tdx:_0x395b2a}=_0x3df913,_0x4e2e47=_0x5248ad[0x0],_0x255d66=_0x5248ad[0x1]||_0x4b90e[_0x240896(0xfd)];if(!_0x4e2e47)return console[_0x240896(0xbb)](_0x240896(0x10c)),console[_0x240896(0xbb)](_0x240896(0x11b)),console[_0x240896(0xbb)](_0x240896(0x22b)),0x1;if(!_0x255d66)return showParentSegmentNotSetError(_0x240896(0x171)+_0x240896(0x22b)),0x1;const _0x57967a=await withSpinner(_0x240896(0x162)+_0x255d66+'\x27...',()=>_0x395b2a[_0x240896(0x285)][_0x240896(0x1c0)](_0x255d66),{'verbose':_0x4b90e['verbose']}),_0x4b3261=_0x57967a[_0x240896(0x12c)],_0xc00219=await withSpinner(_0x240896(0xc1),()=>_0x395b2a['personalization'][_0x240896(0x24f)](_0x4b3261),{'verbose':_0x4b90e['verbose']}),_0x511f0a=_0xc00219[_0x240896(0x12c)];let _0x3bbab7;for(const _0x53a239 of _0x511f0a){if(_0x53a239[_0x240896(0xcf)]?.[_0x240896(0x253)](_0x6ba07f=>_0x6ba07f['id']===_0x4e2e47)){_0x3bbab7=_0x53a239['id'];break;}}if(!_0x3bbab7)return console[_0x240896(0xbb)](_0x240896(0xef)+_0x4e2e47+_0x240896(0x1f7)),0x1;const _0x22dc12=await withSpinner(_0x240896(0x209)+_0x4e2e47+_0x240896(0x287),()=>_0x395b2a[_0x240896(0x147)][_0x240896(0x266)](_0x4b3261,_0x3bbab7,_0x4e2e47),{'verbose':_0x4b90e[_0x240896(0x117)]}),_0x51522d=_0x22dc12[_0x240896(0x12c)];return console[_0x240896(0xbb)]('✔\x20Deleted\x20token\x20\x27'+(_0x51522d[_0x240896(0x1ab)]||_0x4e2e47)+'\x27'),await handleSDKOutput([_0x51522d],_0x4b90e),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:pz:list';[a31_0x4d721b(0x170)]=a31_0x4d721b(0x12a);async[a31_0x4d721b(0x26f)](_0x2ed85d){const _0xaeef6b=a31_0x4d721b,{options:_0x35c398,args:_0x104aa7,tdx:_0xb94592}=_0x2ed85d,_0x54b958=_0x104aa7[0x0]||_0x35c398[_0xaeef6b(0xfd)];if(!_0x54b958)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'+_0xaeef6b(0xb7)),0x1;const _0x1d1c39=await withSpinner(_0xaeef6b(0x162)+_0x54b958+_0xaeef6b(0x287),()=>_0xb94592[_0xaeef6b(0x285)][_0xaeef6b(0x1c0)](_0x54b958),{'verbose':_0x35c398[_0xaeef6b(0x117)]}),_0x164cf9=_0x1d1c39[_0xaeef6b(0x12c)],_0xa2e9e2=await withSpinner(_0xaeef6b(0x205)+_0x54b958+_0xaeef6b(0x287),()=>_0xb94592['personalization']['listPersonalizations'](_0x164cf9),{'verbose':_0x35c398[_0xaeef6b(0x117)]}),_0x272ad7=_0xa2e9e2[_0xaeef6b(0x12c)];console[_0xaeef6b(0xbb)](_0xaeef6b(0x192)+_0x272ad7[_0xaeef6b(0x1db)]+_0xaeef6b(0x1f0)+(_0x272ad7[_0xaeef6b(0x1db)]!==0x1?'s':''));if(_0x35c398[_0xaeef6b(0x15c)]===_0xaeef6b(0x141)||_0x35c398[_0xaeef6b(0x15c)]===_0xaeef6b(0x19d))await handleSDKOutput(_0x272ad7,_0x35c398);else{if(_0x272ad7[_0xaeef6b(0x1db)]===0x0)console[_0xaeef6b(0x175)]('No\x20personalizations\x20configured');else for(const _0x57028f of _0x272ad7){console[_0xaeef6b(0x175)](a31_0x58debf[_0xaeef6b(0x1ed)](_0x57028f[_0xaeef6b(0x1ab)])+'\x20'+a31_0x58debf['dim'](_0xaeef6b(0x1c2)+_0x57028f['id']+')'));_0x57028f[_0xaeef6b(0x170)]&&console['log']('\x20\x20'+a31_0x58debf[_0xaeef6b(0x161)](_0x57028f[_0xaeef6b(0x170)]));const _0x1e7b10=_0x57028f['sections']?.[_0xaeef6b(0x1db)]||0x0;console[_0xaeef6b(0x175)]('\x20\x20'+a31_0x58debf[_0xaeef6b(0x1bf)]('sections:')+'\x20'+_0x1e7b10);if(_0x57028f[_0xaeef6b(0x25e)]&&_0x57028f[_0xaeef6b(0x25e)][_0xaeef6b(0x1db)]>0x0)for(const _0x430d7c of _0x57028f[_0xaeef6b(0x25e)]){console[_0xaeef6b(0x175)](_0xaeef6b(0x1ef)+_0x430d7c['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x277);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x19a);async[a31_0x4d721b(0x26f)](_0xc2c2b1){const _0x36b554=a31_0x4d721b,{options:_0x20f5b1,args:_0x5d0581,tdx:_0x115ab2}=_0xc2c2b1,_0x292c7c=_0x5d0581[0x0];if(!_0x292c7c)return console[_0x36b554(0xbb)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x36b554(0xbb)](_0x36b554(0x238)),0x1;const _0x27c0b7=await withSpinner(_0x36b554(0x1f4)+_0x292c7c+'\x27...',()=>_0x115ab2[_0x36b554(0x147)]['getPersonalization'](_0x292c7c),{'verbose':_0x20f5b1[_0x36b554(0x117)]}),_0x2918b4=_0x27c0b7[_0x36b554(0x12c)];console['error'](_0x36b554(0x159)+_0x2918b4[_0x36b554(0x1ab)]+'\x27');if(_0x20f5b1[_0x36b554(0x15c)]==='json'||_0x20f5b1[_0x36b554(0x15c)]==='jsonl')await handleSDKOutput([_0x2918b4],_0x20f5b1);else{console[_0x36b554(0x175)](a31_0x58debf[_0x36b554(0x1ed)](_0x2918b4[_0x36b554(0x1ab)])+'\x20'+a31_0x58debf[_0x36b554(0x161)](_0x36b554(0x1c2)+_0x2918b4['id']+')'));_0x2918b4[_0x36b554(0x170)]&&console[_0x36b554(0x175)]('\x20\x20'+a31_0x58debf[_0x36b554(0x161)](_0x2918b4[_0x36b554(0x170)]));_0x2918b4[_0x36b554(0x221)]&&console[_0x36b554(0x175)]('\x20\x20'+a31_0x58debf[_0x36b554(0x1bf)]('audienceId:')+'\x20'+_0x2918b4[_0x36b554(0x221)]);console['log']('\x20\x20'+a31_0x58debf[_0x36b554(0x1bf)]('created:')+'\x20'+_0x2918b4['createdAt']),console[_0x36b554(0x175)]('\x20\x20'+a31_0x58debf['cyan'](_0x36b554(0x295))+'\x20'+_0x2918b4[_0x36b554(0xaa)]);const _0x133564=_0x2918b4[_0x36b554(0x25e)]?.[_0x36b554(0x1db)]||0x0;console[_0x36b554(0x175)]('\x20\x20'+a31_0x58debf[_0x36b554(0x1bf)]('sections:')+'\x20'+_0x133564);if(_0x2918b4[_0x36b554(0x25e)]&&_0x2918b4['sections'][_0x36b554(0x1db)]>0x0)for(const _0x153d07 of _0x2918b4[_0x36b554(0x25e)]){console[_0x36b554(0x175)](_0x36b554(0x1e8)+a31_0x58debf[_0x36b554(0x1ed)](_0x153d07['name'])+'\x20'+a31_0x58debf['dim']('(id:\x20'+_0x153d07['id']+')')),_0x153d07[_0x36b554(0x24b)]&&(console[_0x36b554(0x175)](_0x36b554(0x129)+a31_0x58debf['cyan'](_0x36b554(0x11e))+'\x20'+_0x153d07['entryCriteria']['name']),_0x153d07[_0x36b554(0x24b)][_0x36b554(0x23d)]?.[_0x36b554(0xb9)]&&console[_0x36b554(0x175)](_0x36b554(0x149)+a31_0x58debf['cyan']('keyEventId:')+'\x20'+_0x153d07[_0x36b554(0x24b)]['keyEventCriteria'][_0x36b554(0xb9)])),_0x153d07[_0x36b554(0xab)]&&console[_0x36b554(0x175)](_0x36b554(0x129)+a31_0x58debf[_0x36b554(0x1bf)](_0x36b554(0x208))+'\x20'+JSON[_0x36b554(0x22a)](_0x153d07[_0x36b554(0xab)])),_0x153d07['includeSensitive']&&console[_0x36b554(0x175)](_0x36b554(0x129)+a31_0x58debf[_0x36b554(0x1bf)]('includeSensitive:')+_0x36b554(0xa6));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:pz:delete';[a31_0x4d721b(0x170)]=a31_0x4d721b(0x1ee);async['execute'](_0x4975a9){const _0x23cf0f=a31_0x4d721b,{options:_0x1f3358,args:_0x454aed,tdx:_0x205b2a}=_0x4975a9,_0xfad032=_0x454aed[0x0];if(!_0xfad032)return console[_0x23cf0f(0xbb)](_0x23cf0f(0x2a2)),console[_0x23cf0f(0xbb)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0xfad032+_0x23cf0f(0x287),()=>_0x205b2a['personalization'][_0x23cf0f(0x122)](_0xfad032),{'verbose':_0x1f3358[_0x23cf0f(0x117)]}),console[_0x23cf0f(0xbb)](_0x23cf0f(0x218)+_0xfad032+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:pz:create';[a31_0x4d721b(0x170)]=a31_0x4d721b(0x26e);async[a31_0x4d721b(0x26f)](_0x55d443){const _0xfd708=a31_0x4d721b,{options:_0x3cfb2c,tdx:_0x423fa5}=_0x55d443,_0x114f8b=_0x3cfb2c;let _0x272f61;if(_0x114f8b[_0xfd708(0x289)]){_0x272f61=await loadJSON(_0x114f8b['file'],!![]);if(!_0x272f61['relationships']?.['parentFolder'])return console[_0xfd708(0xbb)]('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console['error'](_0xfd708(0x24c)),console[_0xfd708(0xbb)]('\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(!_0x114f8b[_0xfd708(0x1ab)])return console[_0xfd708(0xbb)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0xfd708(0xbb)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x114f8b[_0xfd708(0x170)]===undefined)return console['error'](_0xfd708(0x29d)),console[_0xfd708(0xbb)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0xfd708(0x2a3)),0x1;if(_0x114f8b['folderId']===undefined)return console['error'](_0xfd708(0x214)),console[_0xfd708(0xbb)](_0xfd708(0x1a7)),0x1;let _0x10d332=_0x114f8b[_0xfd708(0x221)];if(!_0x10d332&&_0x3cfb2c[_0xfd708(0xfd)]){const _0x2a11e7=await withSpinner(_0xfd708(0x162)+_0x3cfb2c[_0xfd708(0xfd)]+_0xfd708(0x287),()=>_0x423fa5['segment']['resolveParentId'](_0x3cfb2c[_0xfd708(0xfd)]),{'verbose':_0x3cfb2c[_0xfd708(0x117)]});_0x10d332=_0x2a11e7[_0xfd708(0x12c)];}let _0x205bae;_0x114f8b[_0xfd708(0x25e)]&&(_0x205bae=await loadJSON(_0x114f8b['sections'],![]));const _0x2a55f8=_0x114f8b[_0xfd708(0x132)]===_0xfd708(0xea)?null:{'id':_0x114f8b['folderId'],'type':'folder-segment'};_0x272f61={'attributes':{'name':_0x114f8b['name'],'description':_0x114f8b[_0xfd708(0x170)]||null,..._0x10d332!==undefined&&{'audienceId':_0x10d332},..._0x205bae!==undefined&&{'sections':_0x205bae}},'relationships':{'parentFolder':{'data':_0x2a55f8}}};}const _0x245118=await withSpinner('Creating\x20personalization\x20\x27'+(_0x272f61[_0xfd708(0xd9)]?.['name']??'')+_0xfd708(0x287),()=>_0x423fa5['personalization'][_0xfd708(0xd3)](_0x272f61),{'verbose':_0x3cfb2c[_0xfd708(0x117)]}),_0x3ba3a7=_0x245118[_0xfd708(0x12c)];return console[_0xfd708(0xbb)](_0xfd708(0x173)+_0x3ba3a7[_0xfd708(0x1ab)]+_0xfd708(0x20f)+_0x3ba3a7['id']),await handleSDKOutput([_0x3ba3a7],_0x3cfb2c),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x4d721b(0x1ab)]='ps:pz:patch';['description']=a31_0x4d721b(0xd6);async[a31_0x4d721b(0x26f)](_0x20eb38){const _0x255391=a31_0x4d721b,{options:_0x538c6f,args:_0x332cf1}=_0x20eb38,_0x55b197=_0x538c6f,_0x21e235=_0x332cf1[0x0];if(!_0x21e235)return console['error'](_0x255391(0x2a2)),console[_0x255391(0xbb)](_0x255391(0xd1)),console[_0x255391(0xbb)](_0x255391(0x134)),0x1;let _0x3edb7a;if(_0x55b197[_0x255391(0x289)])_0x3edb7a=await loadJSON(_0x55b197[_0x255391(0x289)],!![]);else{if(!_0x55b197[_0x255391(0x1ab)])return console[_0x255391(0xbb)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x255391(0xbb)](_0x255391(0xd1)),0x1;if(_0x55b197[_0x255391(0x170)]===undefined)return console[_0x255391(0xbb)](_0x255391(0x29d)),console[_0x255391(0xbb)](_0x255391(0xd1)),0x1;let _0x12ef40;_0x55b197[_0x255391(0x25e)]&&(_0x12ef40=await loadJSON(_0x55b197['sections'],![])),_0x3edb7a={'attributes':{'name':_0x55b197['name'],'description':_0x55b197[_0x255391(0x170)]||null,..._0x12ef40!==undefined&&{'sections':_0x12ef40}}};}const {tdx:_0x40e4ef}=_0x20eb38,_0x31a98d=await withSpinner(_0x255391(0x19b)+_0x21e235+_0x255391(0x287),()=>_0x40e4ef[_0x255391(0x147)]['patchPersonalization'](_0x21e235,_0x3edb7a),{'verbose':_0x538c6f[_0x255391(0x117)]}),_0x780475=_0x31a98d[_0x255391(0x12c)];return console[_0x255391(0xbb)](_0x255391(0x200)+_0x780475[_0x255391(0x1ab)]+_0x255391(0x18b)+_0x780475['id']+')'),await handleSDKOutput([_0x780475],_0x538c6f),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x4d721b(0x1ab)]=a31_0x4d721b(0x14e);[a31_0x4d721b(0x170)]=a31_0x4d721b(0x1be);async[a31_0x4d721b(0x26f)](_0x573798){const _0x59deed=a31_0x4d721b,{options:_0x4eb02f,args:_0x515e73}=_0x573798,_0x51c429=_0x515e73[0x0]||_0x4eb02f['parentSegment'];if(!_0x51c429)return showParentSegmentNotSetError(_0x59deed(0x127)+_0x59deed(0x223)),0x1;const _0x2273c1=resolveYamlFile(_0x51c429);if(!existsSync(_0x2273c1))return showFileNotFoundError(_0x2273c1,_0x51c429),0x1;let _0x289c73;try{_0x289c73=readFileSync(_0x2273c1,'utf-8');}catch(_0x1a99f7){const _0x436506=_0x1a99f7 instanceof Error?_0x1a99f7['message']:String(_0x1a99f7);return console['error'](_0x59deed(0x275)+_0x436506),0x1;}let _0x1a8516;try{_0x1a8516=parseDef(_0x289c73);}catch(_0x2aa7cd){const _0x2af352=_0x2aa7cd instanceof Error?_0x2aa7cd['message']:String(_0x2aa7cd);return console[_0x59deed(0xbb)](a31_0x58debf['red'](_0x59deed(0x29f)+_0x2af352)),0x1;}if(_0x1a8516['personalization_services']&&_0x1a8516[_0x59deed(0x1da)][_0x59deed(0x1db)]>0x0)return console['error'](a31_0x58debf[_0x59deed(0xd8)]('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x2273c1)),console[_0x59deed(0xbb)](a31_0x58debf[_0x59deed(0x161)](_0x59deed(0x179)+_0x1a8516[_0x59deed(0x1da)][_0x59deed(0x1db)]+_0x59deed(0x1d4))),0x1;!_0x1a8516[_0x59deed(0x1f3)]&&(_0x1a8516[_0x59deed(0x1f3)]={'events':[{'name':_0x59deed(0x140),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x59deed(0x254),'type':_0x59deed(0x2a1)}],'id_stitching':{'primary_key':_0x1a8516[_0x59deed(0x21e)][_0x59deed(0xa5)]===_0x59deed(0xe7)?_0x59deed(0x23c):'user_id'}});_0x1a8516['personalization_services']=[{'name':'My\x20Service','description':'Personalization\x20service\x20description','trigger_event':'page_view','sections':[{'name':'Default','criteria':_0x59deed(0x1bd),'attributes':[_0x59deed(0x254)]}]}];const _0x3f8d6f=serializeDef(_0x1a8516);return writeFileSync(_0x2273c1,_0x3f8d6f,_0x59deed(0x20c)),console[_0x59deed(0xbb)](a31_0x58debf[_0x59deed(0x219)]('✔')+_0x59deed(0x2af)+a31_0x58debf[_0x59deed(0x1bf)](_0x2273c1)),(!_0x1a8516[_0x59deed(0x1f3)]||_0x289c73[_0x59deed(0xe4)](_0x59deed(0x220))===-0x1)&&console['error'](a31_0x58debf['green']('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x59deed(0xbb)]('\x0a'+a31_0x58debf[_0x59deed(0x161)](_0x59deed(0x21a))),console[_0x59deed(0xbb)](_0x59deed(0x146)+_0x2273c1+_0x59deed(0x23b)),console[_0x59deed(0xbb)](_0x59deed(0xed)+a31_0x58debf[_0x59deed(0x161)](_0x59deed(0x271)+_0x51c429)+_0x59deed(0x28b)),0x0;}}
|