@treasuredata/tdx 0.14.7 → 0.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-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/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/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/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.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/api.js +1 -1
- package/dist/sdk/client/cdp-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/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/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.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-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/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/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/tdx +10 -0
- 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/json-loader.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a101_0x109af2=a101_0x383a;(function(_0x2bfb5e,_0x145085){const _0x302078=a101_0x383a,_0x29f7d5=_0x2bfb5e();while(!![]){try{const _0x1ee9f9=parseInt(_0x302078(0x1bf))/0x1+-parseInt(_0x302078(0x1fd))/0x2+parseInt(_0x302078(0x1e7))/0x3+parseInt(_0x302078(0x1f7))/0x4*(-parseInt(_0x302078(0x199))/0x5)+parseInt(_0x302078(0x182))/0x6*(parseInt(_0x302078(0x20b))/0x7)+-parseInt(_0x302078(0x1d1))/0x8+-parseInt(_0x302078(0x1d3))/0x9*(-parseInt(_0x302078(0x231))/0xa);if(_0x1ee9f9===_0x145085)break;else _0x29f7d5['push'](_0x29f7d5['shift']());}catch(_0x31b599){_0x29f7d5['push'](_0x29f7d5['shift']());}}}(a101_0x41db,0xa1773));import{createHash}from'crypto';function a101_0x383a(_0x335569,_0x10a914){_0x335569=_0x335569-0x178;const _0x41dbbe=a101_0x41db();let _0x383afd=_0x41dbbe[_0x335569];return _0x383afd;}export const PENDING_SEGMENT_PREFIX=a101_0x109af2(0x1dd);export const PENDING_ACTIVATION_PREFIX=a101_0x109af2(0x1d6);export function createPendingSegmentId(_0x1ca4c8){return''+PENDING_SEGMENT_PREFIX+_0x1ca4c8+'__';}export function isPendingSegmentId(_0x4fecc6){const _0x1384fc=a101_0x109af2;return _0x4fecc6[_0x1384fc(0x21d)](PENDING_SEGMENT_PREFIX);}export function extractPendingSegmentName(_0x3d8364){const _0x2817bd=a101_0x109af2;return _0x3d8364[_0x2817bd(0x1c0)](/^__pending_(.+)__$/,'$1');}export function createPendingActivationId(_0x995da2){return''+PENDING_ACTIVATION_PREFIX+_0x995da2+'__';}export function isPendingActivationId(_0x1f2ca3){const _0x2a994d=a101_0x109af2;return _0x1f2ca3[_0x2a994d(0x21d)](PENDING_ACTIVATION_PREFIX);}export function extractPendingActivationName(_0x565bec){return _0x565bec['replace'](/^__pending_act_(.+)__$/,'$1');}function generateDeterministicJourneySegmentName(_0x2c6f2a,_0x189cd8){const _0x27a27c=a101_0x109af2,_0x2b174a=_0x2c6f2a+'::'+(_0x189cd8['trim']()||_0x27a27c(0x22b)),_0x3d150c=createHash(_0x27a27c(0x1cd))['update'](_0x2b174a)[_0x27a27c(0x1ea)](_0x27a27c(0x185))['slice'](0x0,0xc);return _0x27a27c(0x20f)+_0x3d150c;}export function ensureJourneyDefaults(_0x2f87f6){const _0x4cc7f0=a101_0x109af2;!_0x2f87f6[_0x4cc7f0(0x19c)]&&(_0x2f87f6[_0x4cc7f0(0x19c)]=''),!_0x2f87f6[_0x4cc7f0(0x215)]&&(_0x2f87f6[_0x4cc7f0(0x215)]=_0x4cc7f0(0x23a));}export function resolveTDFolderPath(_0x1de752,_0x29ccc2,_0x50fe3c){if(!_0x29ccc2)return _0x1de752;if(_0x1de752===_0x50fe3c||_0x1de752['startsWith'](_0x50fe3c+'/'))return _0x1de752;return _0x1de752?_0x50fe3c+'/'+_0x1de752:_0x50fe3c;}export function addFoldersToCreate(_0x906fcd,_0x4b91cd,_0x1accc0){const _0x47f57f=a101_0x109af2;if(!_0x906fcd)return;if(_0x4b91cd[_0x47f57f(0x21f)](_0x906fcd))return;const _0x4d05a4=_0x906fcd[_0x47f57f(0x240)]('/');let _0x394ca6='';for(const _0x4f21b8 of _0x4d05a4){_0x394ca6=_0x394ca6?_0x394ca6+'/'+_0x4f21b8:_0x4f21b8,!_0x4b91cd['has'](_0x394ca6)&&_0x1accc0[_0x47f57f(0x238)](_0x394ca6);}}import*as a101_0x373ffc from'yaml';import{readFileSync}from'fs';import a101_0x1034f4 from'path';import{isJourneyDef,parseYamlString as a101_0x402c83,toYamlString as a101_0x5ead0b,normalizeJourneyDef,hasMultipleVersions,journeyResponseToDef,collectSegmentIdsFromJourneyApi}from'./journey-yaml.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,createJumpTargetCache,resolveJumpTarget,buildMergedJourneyDef,buildLocalRuleToNameMappingFromJourney,collectSegmentUsageCounts}from'./journey-utils.js';import{activationResponseToDef,segmentToYamlString,segmentWithActivationsToYaml,parseSegmentYamlFile,normalizeChildSegmentYaml,apiRuleToYaml,yamlRuleToApi,serializeExpandedRule,collectSegmentRefsFromRule,resolveRuleSegmentRefs,resolveRuleSegmentIds,journeyActivationStepToYaml}from'./child-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{batchAsync}from'../../utils/async.js';import{buildFolderMaps}from'./resolution-context.js';import{SDKError,ErrorCode,isHttp400Error,getErrorMessage}from'../errors.js';import{validateSegmentDef,validateJourneyDef,formatValidationResult}from'./yaml-validator.js';function stableStringify(_0x379ea9){const _0x16bf67=a101_0x109af2;if(Array[_0x16bf67(0x1ad)](_0x379ea9))return'['+_0x379ea9[_0x16bf67(0x1ee)](_0x5b118a=>stableStringify(_0x5b118a))[_0x16bf67(0x1fe)](',')+']';if(_0x379ea9&&typeof _0x379ea9===_0x16bf67(0x251)){const _0x5d2f83=_0x379ea9,_0x4826eb=Object['keys'](_0x5d2f83)[_0x16bf67(0x21e)](),_0x1beb04=_0x4826eb[_0x16bf67(0x1ee)](_0xd8abb3=>'\x22'+_0xd8abb3+'\x22:'+stableStringify(_0x5d2f83[_0xd8abb3]));return'{'+_0x1beb04[_0x16bf67(0x1fe)](',')+'}';}const _0x596419=JSON[_0x16bf67(0x226)](_0x379ea9);return _0x596419===undefined?'null':_0x596419;}function activationSignature(_0x31db59){const _0x5c75fe=a101_0x109af2,_0x5e787a={'connection':_0x31db59[_0x5c75fe(0x1bb)],..._0x31db59[_0x5c75fe(0x1c5)]!==undefined&&{'all_columns':_0x31db59[_0x5c75fe(0x1c5)]},..._0x31db59[_0x5c75fe(0x1b7)]!==undefined&&{'columns':_0x31db59[_0x5c75fe(0x1b7)]},..._0x31db59[_0x5c75fe(0x1c9)]!==undefined&&{'behavior':_0x31db59[_0x5c75fe(0x1c9)]},..._0x31db59['schedule']!==undefined&&{'schedule':_0x31db59['schedule']},..._0x31db59['notification']!==undefined&&{'notification':_0x31db59[_0x5c75fe(0x1ed)]},..._0x31db59[_0x5c75fe(0x22d)]!==undefined&&{'connector_config':_0x31db59[_0x5c75fe(0x22d)]},..._0x31db59[_0x5c75fe(0x217)]!==undefined&&{'activation_template_id':_0x31db59[_0x5c75fe(0x217)]}};return stableStringify(_0x5e787a);}export async function prepareSegmentFiles(_0x4ce8b6,_0x4465b7,_0x502c97,_0x991322,_0x4e12ab){const _0x1457d2=a101_0x109af2,{activationDefToCreateRequest:_0x2cd3bb}=await import(_0x1457d2(0x1d5)),_0x5bf307=[],_0x2c39cc=new Set();for(const {yamlConfig:_0x252fe9,folderPath:_0x35a1f9,sourcePath:_0x583cdc}of _0x4ce8b6){const _0x3800f7=resolveTDFolderPath(_0x35a1f9,_0x991322,_0x4e12ab),_0x5bbb90=_0x3800f7+':'+_0x252fe9[_0x1457d2(0x19e)],_0x50b6c2=_0x4465b7[_0x1457d2(0x244)][_0x1457d2(0x1bd)](_0x5bbb90),_0x4dc54f=_0x50b6c2?_0x4465b7['activationsBySegmentId'][_0x1457d2(0x1bd)](_0x50b6c2['id'])||[]:[];addFoldersToCreate(_0x3800f7,_0x4465b7['folderPathToId'],_0x2c39cc);const _0x51f8ca=calculateActivationActions(_0x252fe9[_0x1457d2(0x1ef)]||[],_0x4dc54f,_0x4465b7['idToEmailMap'],_0x4465b7[_0x1457d2(0x24b)]);for(const _0x4cf593 of _0x51f8ca){(_0x4cf593[_0x1457d2(0x1b0)]==='create'||_0x4cf593['type']===_0x1457d2(0x210))&&_0x4cf593[_0x1457d2(0x191)]&&(_0x4cf593[_0x1457d2(0x1a2)]=await _0x2cd3bb(_0x4cf593[_0x1457d2(0x191)],_0x502c97));}const _0x2d2c55=calculateSegmentDiff(_0x252fe9,_0x50b6c2,_0x4dc54f,_0x4465b7[_0x1457d2(0x193)],_0x4465b7[_0x1457d2(0x24b)]);_0x5bf307[_0x1457d2(0x228)]({'relativePath':_0x252fe9['name'],'absolutePath':_0x583cdc,'yamlConfig':_0x252fe9,'folderPath':_0x3800f7,'existingSegment':_0x50b6c2,'existingActivations':_0x4dc54f,'isNew':_0x2d2c55['isNew'],'hasChanges':_0x2d2c55[_0x1457d2(0x1fa)],'diff':_0x2d2c55['diff'],'activationActions':_0x51f8ca});}return{'segmentFiles':_0x5bf307,'foldersToCreate':_0x2c39cc};}export async function prepareJourneyFiles(_0x32e094,_0x250919,_0x283a78,_0x825f58){const _0x33fb27=a101_0x109af2,_0x1c281a=[],_0x2f9391=new Set();for(const {yamlConfig:_0x454fe2,folderPath:_0x2c0c1c,sourcePath:_0x29917b}of _0x32e094){const _0x49584c=resolveTDFolderPath(_0x2c0c1c,_0x283a78,_0x825f58),_0x181341=_0x49584c+':'+_0x454fe2[_0x33fb27(0x19e)],_0x52a9d0=_0x250919[_0x33fb27(0x209)][_0x33fb27(0x1bd)](_0x181341);let _0x4fa579,_0x38e78a;if(_0x52a9d0&&_0x52a9d0[_0x33fb27(0x242)]>0x0){const _0x23855d=buildLocalExpandedRuleMappings(_0x454fe2),{createYamlContext:_0x2fc2b5,prefetchJourneySegments:_0x14e750}=createPushYamlContextForBundle(_0x250919['deps'],_0x250919[_0x33fb27(0x1ab)],_0x250919[_0x33fb27(0x201)],_0x23855d,_0x250919['idToEmailMap'],_0x250919['connectionIdToNameMap'],_0x250919[_0x33fb27(0x1b8)],_0x250919[_0x33fb27(0x241)]);await _0x14e750(_0x52a9d0[_0x33fb27(0x1ee)](_0x305b65=>_0x305b65['id']));const _0x1f40cd=hasMultipleVersions(_0x454fe2),_0x3b6edb=async _0x429a61=>{const _0x2f8e1d=_0x33fb27,_0x3f571a=_0x250919[_0x2f8e1d(0x241)]?.['get'](_0x429a61);if(_0x3f571a)return _0x3f571a;return _0x250919['fetchJourney']({'journeyId':_0x429a61,'journeyName':_0x454fe2['name'],'isMultiVersion':_0x52a9d0[_0x2f8e1d(0x242)]>0x1});};if(_0x1f40cd&&_0x52a9d0['length']>0x1){const _0x2efa96=[];for(const _0x3c2f12 of _0x52a9d0){const _0x521002=_0x3c2f12[_0x33fb27(0x21a)]||0x1;_0x250919[_0x33fb27(0x183)]?.[_0x33fb27(0x210)](_0x33fb27(0x1f9)+_0x454fe2[_0x33fb27(0x19e)]+'\x20v'+_0x521002);const _0x59f938=await _0x3b6edb(_0x3c2f12['id']),_0x1e2b48=_0x2fc2b5(_0x3c2f12['id']),_0x3ac6d8=await journeyResponseToDef(_0x59f938,_0x1e2b48);_0x2efa96[_0x33fb27(0x228)]({'item':_0x3c2f12,'yaml':_0x3ac6d8});}const _0x18c81b=buildLocalRuleToNameMappingFromJourney(_0x454fe2);_0x38e78a=buildMergedJourneyDef(_0x2efa96,_0x18c81b);const _0x33dbfc=Math[_0x33fb27(0x1e1)](..._0x2efa96['map'](_0x1e3c3d=>_0x1e3c3d[_0x33fb27(0x1eb)][_0x33fb27(0x21a)]||0x0)),_0x4f2343=_0x52a9d0[_0x33fb27(0x17c)](_0x3d51f5=>(_0x3d51f5[_0x33fb27(0x21a)]||0x0)===_0x33dbfc);_0x4f2343&&(_0x250919[_0x33fb27(0x183)]?.[_0x33fb27(0x210)](_0x33fb27(0x1f9)+_0x454fe2[_0x33fb27(0x19e)]+'\x20v'+_0x33dbfc),_0x4fa579=await _0x3b6edb(_0x4f2343['id']));}else{const _0x20dcd8=_0x52a9d0[_0x52a9d0[_0x33fb27(0x242)]-0x1];_0x250919[_0x33fb27(0x183)]?.['update']('Fetching\x20'+_0x454fe2[_0x33fb27(0x19e)]),_0x4fa579=await _0x3b6edb(_0x20dcd8['id']);const _0x2bb43d=_0x2fc2b5(_0x20dcd8['id']),_0x5d5713=await journeyResponseToDef(_0x4fa579,_0x2bb43d),_0x364ab3=buildLocalRuleToNameMappingFromJourney(_0x454fe2);_0x38e78a=buildMergedJourneyDef([{'item':_0x20dcd8,'yaml':_0x5d5713}],_0x364ab3);}}addFoldersToCreate(_0x49584c,_0x250919[_0x33fb27(0x24f)],_0x2f9391);const _0x4a25e5=calculateJourneyDiff(_0x454fe2,_0x38e78a);_0x1c281a[_0x33fb27(0x228)]({'relativePath':_0x454fe2['name'],'absolutePath':_0x29917b,'yamlConfig':_0x454fe2,'folderPath':_0x49584c,'existingJourney':_0x4fa579,'isNew':_0x4a25e5[_0x33fb27(0x225)],'hasChanges':_0x4a25e5[_0x33fb27(0x1fa)],'diff':_0x4a25e5[_0x33fb27(0x23d)]});}return{'journeyFiles':_0x1c281a,'foldersToCreate':_0x2f9391};}export function calculateActivationActions(_0x175470,_0x4b64bf,_0x2e7a52,_0x1065db){const _0x38c0fe=a101_0x109af2,_0x19dfe7=[],_0x263beb=new Map();for(const _0x5da660 of _0x4b64bf){_0x263beb['set'](_0x5da660[_0x38c0fe(0x19e)],_0x5da660);}const _0x369aa6=new Map();for(const _0x53b474 of _0x175470){_0x369aa6[_0x38c0fe(0x1de)](_0x53b474[_0x38c0fe(0x19e)],_0x53b474);}for(const _0x57923f of _0x175470){const _0x2a56aa=_0x263beb['get'](_0x57923f[_0x38c0fe(0x19e)]);if(!_0x2a56aa)_0x19dfe7['push']({'type':_0x38c0fe(0x207),'name':_0x57923f[_0x38c0fe(0x19e)],'yamlActivation':_0x57923f});else{const _0xdc652f=activationResponseToDef(_0x2a56aa,_0x2e7a52,_0x1065db),_0x458900=a101_0x373ffc['stringify'](_0xdc652f),_0x4949a0=a101_0x373ffc[_0x38c0fe(0x226)](_0x57923f);_0x458900!==_0x4949a0&&_0x19dfe7[_0x38c0fe(0x228)]({'type':'update','name':_0x57923f[_0x38c0fe(0x19e)],'yamlActivation':_0x57923f,'existingActivation':_0x2a56aa});}}for(const _0x5abcbb of _0x4b64bf){!_0x369aa6[_0x38c0fe(0x21f)](_0x5abcbb[_0x38c0fe(0x19e)])&&_0x19dfe7[_0x38c0fe(0x228)]({'type':'delete','name':_0x5abcbb[_0x38c0fe(0x19e)],'existingActivation':_0x5abcbb});}return _0x19dfe7;}function a101_0x41db(){const _0x218101=['map','activations','keys','\x27\x20for\x20','WaitStep','Created\x20segment\x20\x27','stages','\x20(referenced\x20in\x20embedded\x20segment\x20\x27','filter','104VgjdnY','\x27...','Fetching\x20','hasChanges','Deleted\x20activation\x20\x27','journeyBundleName','1138928smHUhX','join','errors','journey_created','existingSegments','segment_updated','skipSegments','Failed\x20to\x20sync\x20activations\x20for\x20segment\x20\x27','Stage\x20\x27','Name\x20has\x20already\x20been\x20taken','create','Activation','journeyBundlesByFolderAndName','embeddedSegmentNameToId','105952YGPZvW','Segment\x20not\x20found:\x20','goal\x20criteria','embedded_segment_creating','journey_entry_criteria_','update','activation_updated','Journey\x20\x27','valid','\x27\x20exit\x20criteria','state','steps','activation_template_id','journey','\x27\x20not\x20found\x20in\x20parent\x20segment\x20(referenced\x20in\x20jump\x20step\x20of\x20\x27','versionNumber','listSegments','stage\x20\x27','startsWith','sort','has','listActivations','updateSegmentById','Created\x20folder\x20\x27','journeyActivationNameToId','journey_creating','isNew','stringify','index','push','folderId','logSuccess','segment','./journey-yaml.js','connector_config','journeyStages','segmentNameToId','attributes','2388530DeGLUs','NOT_FOUND','utf-8','createActivation','ACTIVATION_SYNTAX_ERROR','activation_updating','dirname','add','entryCriteria','draft','Cannot\x20create\x20embedded\x20activation\x20without\x20journey\x20context','INTERNAL','diff','journeyActivationStepId','with','split','journeyById','length','segment_created','segmentByFolderAndName','withProgress','branches','results','effectiveFolderId','existingActivation','action','connectionIdToNameMap','journeyId','activation_deleting','segmentId','folderPathToId','parse','object','entry','entry_criteria','onProgress','SEGMENT_SYNTAX_ERROR','activation_','folder_created','find','existingJourney','activationContext','getSegment','goal','yamlConfig','174StrDYF','progress','verbose','hex','journeys','parentFolder','folder','nameToType','buildUserMaps','resolveSegment','logWarning','milestone','JOURNEY_UPDATE_ERROR','Creating\x20activation\x20\x27','\x27\x20wait\x20condition','yamlActivation','resolveJourneyId','idToEmailMap','\x27\x20milestone','ACTIVATION_UPDATE_ERROR','createSegment','all','folder_creating','78035seKhqv','absolutePath','rule','description','toString','name','SEGMENT_NOT_FOUND','user','Creating\x20folder\x20\x27','validatedRequest','updated','createFolder','Updating\x20segment\x20\x27','logInfo','data','deleted','getJourney','segment_creating','parentId','created','isArray','message','):\x20','type','nameToId','../../utils/async.js','DecisionPoint','toLowerCase','slice','Failed\x20to\x20','columns','activationStepsById','delete','from','connection','embedded_segment_created','get','Cannot\x20create\x20embedded\x20segment\x20for\x20existing\x20journey\x20without\x20journey\x20ID','1053529cwowCT','replace','size','waitCondition','Define\x20it\x20in\x20the\x20journey\x27s\x20\x27activations\x27\x20section\x20or\x20use\x20an\x20existing\x20activation\x20ID.','Warning:\x20Could\x20not\x20resolve\x20embedded\x20segment\x20\x27','all_columns','exitCriterias','Updated\x20segment\x20\x27','segmentFolderId','behavior','activation_created','\x27\x20decision\x20point\x20branch\x20\x27','includes','sha1','\x20(referenced\x20in\x20journey\x20','\x0a\x20\x20','relationships','10258336erjOof','Deleted\x20segment\x20\x27','9oYmfLy','relative','./child-segment-yaml.js','__pending_act_','segments','folderPath','JOURNEY_SYNTAX_ERROR','createdSegmentId','Entry\x20criteria:\x20','\x27\x20not\x20found\x20in\x20journey\x20\x27','__pending_','set','activationParams','existingSegment','max','getActivation','logDeleted','Activation\x20not\x20found:\x20','Creating\x20segment\x20\x27','kind','3562725BAGfqG','activationActions','segment_deleted','digest','item','reduce','notification'];a101_0x41db=function(){return _0x218101;};return a101_0x41db();}export function calculateSegmentDiff(_0x908254,_0x57ffa1,_0xa449c2,_0x13e63f,_0xfebe63){const _0xb737f5=segmentToYamlString(_0x908254);if(_0x57ffa1){const _0x3049f5=segmentWithActivationsToYaml(_0x57ffa1,_0xa449c2,undefined,_0x13e63f,_0xfebe63),_0x536194=segmentToYamlString(_0x3049f5),_0x3ad323=generateDiff(_0x536194,_0xb737f5),_0x2ce6e7=hasChanges(_0x3ad323);return{'isNew':![],'hasChanges':_0x2ce6e7,'diff':_0x2ce6e7?formatDiffWithColors(_0x3ad323):undefined};}const _0xb42ed2=generateDiff('',_0xb737f5);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0xb42ed2)};}export function calculateJourneyDiff(_0x1703fd,_0x5db44e){const _0xa24688=normalizeJourneyDef(_0x1703fd,_0x1703fd),_0x40ba24=a101_0x5ead0b(_0xa24688);if(_0x5db44e){const _0x5b9d68=normalizeJourneyDef(_0x5db44e,_0x1703fd),_0x5cc81b=a101_0x5ead0b(_0x5b9d68),_0x5e5a31=generateDiff(_0x5cc81b,_0x40ba24),_0x20b20d=hasChanges(_0x5e5a31);return{'isNew':![],'hasChanges':_0x20b20d,'diff':_0x20b20d?formatDiffWithColors(_0x5e5a31):undefined};}const _0x249d53=generateDiff('',_0x40ba24);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x249d53)};}export function findSegmentsToDelete(_0x1e222a,_0x19836e,_0x3cae45,_0x4b6463,_0xdde2f9){const _0x5649b0=a101_0x109af2,_0x4c3af1=new Set();for(const {yamlConfig:_0x32c18b,folderPath:_0x13db5e}of _0x19836e){_0x4c3af1[_0x5649b0(0x238)](_0x13db5e+':'+_0x32c18b[_0x5649b0(0x19e)]);}return _0x1e222a[_0x5649b0(0x1f6)](_0x37e47a=>{const _0x47fb71=_0x5649b0,_0x448bae=_0x37e47a[_0x47fb71(0x1c8)]?_0x3cae45['get'](_0x37e47a[_0x47fb71(0x1c8)][_0x47fb71(0x19d)]())||'':'',_0x1aa918=_0x448bae+':'+_0x37e47a[_0x47fb71(0x19e)];if(_0x4c3af1[_0x47fb71(0x21f)](_0x1aa918))return![];if(_0xdde2f9)return _0x448bae===_0x4b6463||_0x448bae[_0x47fb71(0x21d)](_0x4b6463+'/');return!![];});}export function findJourneysToDelete(_0x4ec16d,_0x1e8f9b,_0x42538b,_0x4eb48f,_0x471449){const _0x1c2697=a101_0x109af2,_0x18e988=new Set();for(const {yamlConfig:_0x2e2b51,folderPath:_0x460afa}of _0x1e8f9b){_0x18e988['add'](_0x460afa+':'+_0x2e2b51['name']);}return _0x4ec16d[_0x1c2697(0x1f6)](_0x2d0e23=>{const _0xa75e0b=_0x1c2697,_0x36d7c3=_0x2d0e23[_0xa75e0b(0x229)]?_0x42538b['get'](_0x2d0e23[_0xa75e0b(0x229)])||'':'',_0x438d37=_0x36d7c3+':'+_0x2d0e23[_0xa75e0b(0x1fc)];if(_0x18e988[_0xa75e0b(0x21f)](_0x438d37))return![];if(_0x471449)return _0x36d7c3===_0x4eb48f||_0x36d7c3['startsWith'](_0x4eb48f+'/');return!![];});}export function buildSegmentLookupMap(_0x3b231c,_0x26efdd){const _0x5960b4=a101_0x109af2,_0x5b8d61=new Map();for(const _0x41f252 of _0x3b231c){const _0x53aa60=_0x41f252[_0x5960b4(0x1c8)]?_0x26efdd[_0x5960b4(0x1bd)](_0x41f252[_0x5960b4(0x1c8)][_0x5960b4(0x19d)]())||'':'',_0x42c99d=_0x53aa60+':'+_0x41f252[_0x5960b4(0x19e)];_0x5b8d61[_0x5960b4(0x1de)](_0x42c99d,_0x41f252);}return _0x5b8d61;}export function buildSegmentNameToIdMap(_0x5d267e){const _0x2ddc5b=a101_0x109af2,_0x561e67=new Map();for(const _0x2db53 of _0x5d267e){_0x561e67[_0x2ddc5b(0x1de)](_0x2db53[_0x2ddc5b(0x19e)],_0x2db53['id']);}return _0x561e67;}export function buildJourneyBundleLookupMap(_0x1644d5,_0x4422b7){const _0x66cccf=a101_0x109af2,_0x4b0b80=new Map();for(const _0x179ac1 of _0x1644d5){const _0x3c3f8d=_0x179ac1[_0x66cccf(0x229)]?_0x4422b7[_0x66cccf(0x1bd)](_0x179ac1[_0x66cccf(0x229)])||'':'',_0x57eda3=_0x3c3f8d+':'+_0x179ac1['journeyBundleName'];!_0x4b0b80['has'](_0x57eda3)&&_0x4b0b80['set'](_0x57eda3,[]),_0x4b0b80[_0x66cccf(0x1bd)](_0x57eda3)[_0x66cccf(0x228)](_0x179ac1);}for(const _0x1caa0a of _0x4b0b80['values']()){_0x1caa0a[_0x66cccf(0x21e)]((_0x207a5a,_0x3a05d9)=>(_0x207a5a['versionNumber']||0x0)-(_0x3a05d9[_0x66cccf(0x21a)]||0x0));}return _0x4b0b80;}export function collectFoldersToCreate(_0x4398c1,_0x3828d2){const _0xc9106=a101_0x109af2,_0x9a25df=new Set();for(const _0x4e8936 of _0x4398c1){if(!_0x4e8936)continue;if(_0x3828d2['has'](_0x4e8936))continue;const _0x59c1d3=_0x4e8936['split']('/');let _0x294709='';for(const _0x23e61e of _0x59c1d3){_0x294709=_0x294709?_0x294709+'/'+_0x23e61e:_0x23e61e,!_0x3828d2[_0xc9106(0x21f)](_0x294709)&&_0x9a25df[_0xc9106(0x238)](_0x294709);}}return _0x9a25df;}export function parseAndClassifyYamlFiles(_0x16139b,_0x429605,_0x21c43e){const _0x595c23=a101_0x109af2,_0x795df=[],_0x35e31e=[];for(const _0x748a02 of _0x16139b){const _0x498d2a=a101_0x1034f4[_0x595c23(0x1d4)](_0x429605,a101_0x1034f4[_0x595c23(0x237)](_0x748a02)),_0x20ed48=_0x498d2a==='.'?'':_0x498d2a,_0x5e61e1=readFileSync(_0x748a02,_0x595c23(0x233)),_0x25af2b=a101_0x373ffc[_0x595c23(0x250)](_0x5e61e1);if(isJourneyDef(_0x25af2b)){const _0x1f43b2=a101_0x402c83(_0x5e61e1);_0x35e31e['push']({'yamlConfig':_0x1f43b2,'folderPath':_0x20ed48,'sourcePath':_0x748a02});}else{if(!_0x21c43e?.[_0x595c23(0x203)]){const _0x256e16=parseSegmentYamlFile(_0x5e61e1),_0x1f7fe3=normalizeChildSegmentYaml(_0x256e16);_0x795df['push']({'yamlConfig':_0x1f7fe3,'folderPath':_0x20ed48,'sourcePath':_0x748a02});}}}return{'segments':_0x795df,'journeys':_0x35e31e};}export function validateParsedFiles(_0x4eb39b,_0x170d18){const _0x3c7609=a101_0x109af2,_0x1fdd1e=[];for(const {yamlConfig:_0x43e0f6,sourcePath:_0x4e6032}of _0x4eb39b['segments']){const _0x576b25=readFileSync(_0x4e6032,_0x3c7609(0x233)),_0xde47dc=a101_0x373ffc['parseDocument'](_0x576b25),_0x23bab1=validateSegmentDef(_0x43e0f6,{'source':_0x576b25,'document':_0xde47dc});if(!_0x23bab1[_0x3c7609(0x213)]){const _0x52b7ce=a101_0x1034f4['relative'](_0x170d18,_0x4e6032);_0x1fdd1e[_0x3c7609(0x228)]({'filePath':_0x52b7ce,'source':_0x576b25,'result':_0x23bab1,'isJourney':![]});}}for(const {yamlConfig:_0x58d53c,sourcePath:_0x509915}of _0x4eb39b['journeys']){const _0x9fbeb6=readFileSync(_0x509915,_0x3c7609(0x233)),_0x5b8bf1=a101_0x373ffc['parseDocument'](_0x9fbeb6),_0x377429=validateJourneyDef(_0x58d53c,{'source':_0x9fbeb6,'document':_0x5b8bf1});if(!_0x377429['valid']){const _0xb38d36=a101_0x1034f4[_0x3c7609(0x1d4)](_0x170d18,_0x509915);_0x1fdd1e['push']({'filePath':_0xb38d36,'source':_0x9fbeb6,'result':_0x377429,'isJourney':!![]});}}return _0x1fdd1e;}export function formatValidationErrors(_0xfd3c7e){const _0x37f6b3=a101_0x109af2,_0x4778d4=[];for(const {filePath:_0xdca4f,source:_0x5e9f71,result:_0x1c0127,isJourney:_0x62f6ca}of _0xfd3c7e){const _0x2a5192=_0x62f6ca?_0x37f6b3(0x218):_0x37f6b3(0x22b);_0x4778d4[_0x37f6b3(0x228)]('\x0a'+_0xdca4f+'\x20('+_0x2a5192+_0x37f6b3(0x1af)+_0x1c0127[_0x37f6b3(0x1ff)]['length']+'\x20error(s)'),_0x4778d4[_0x37f6b3(0x228)](formatValidationResult(_0x1c0127,_0x5e9f71,_0xdca4f));}return _0x4778d4[_0x37f6b3(0x1fe)]('\x0a');}export function buildLocalExpandedRuleMappings(_0x2e04b4){const _0xeb604f=a101_0x109af2,_0x321415=new Set(),_0x41a654=new Map(),_0x322893=collectSegmentUsageCounts(_0x2e04b4);if(_0x2e04b4[_0xeb604f(0x1d7)])for(const [_0x3b6bd4,_0x4dfff5]of Object['entries'](_0x2e04b4[_0xeb604f(0x1d7)])){_0x321415[_0xeb604f(0x238)](_0x3b6bd4);if(_0x4dfff5[_0xeb604f(0x19b)]){const _0x127d2f=yamlRuleToApi(_0x4dfff5['rule']),_0x3bbb14=apiRuleToYaml(_0x127d2f);_0x41a654[_0xeb604f(0x1de)](_0x3b6bd4,_0x3bbb14);}}const _0x42d18c=new Map();let _0x54b6a7=0x0;for(const [_0x543908,_0x2cd142]of _0x41a654){const _0x45800e=serializeExpandedRule(_0x2cd142,_0x41a654),_0x35f04f=_0x42d18c[_0xeb604f(0x1bd)](_0x45800e)||[];_0x35f04f[_0xeb604f(0x228)]({'name':_0x543908,'index':_0x54b6a7}),_0x42d18c[_0xeb604f(0x1de)](_0x45800e,_0x35f04f),_0x54b6a7++;}const _0x273511=new Map();for(const [_0xcdb6a4,_0x206531]of _0x42d18c){const _0x339380=_0x206531[_0xeb604f(0x1b5)]()['sort']((_0xdbb9a7,_0x107d4a)=>{const _0x8613d8=_0xeb604f,_0x2508ca=_0x322893[_0x8613d8(0x1bd)](_0xdbb9a7[_0x8613d8(0x19e)])||0x0,_0x211efa=_0x322893[_0x8613d8(0x1bd)](_0x107d4a[_0x8613d8(0x19e)])||0x0;if(_0x2508ca!==_0x211efa)return _0x211efa-_0x2508ca;return _0xdbb9a7[_0x8613d8(0x227)]-_0x107d4a[_0x8613d8(0x227)];})[_0xeb604f(0x1ee)](_0x5dc60f=>_0x5dc60f[_0xeb604f(0x19e)]),_0x33c2db=[];for(const _0x33f6ee of _0x339380){const _0x22026f=_0x322893[_0xeb604f(0x1bd)](_0x33f6ee)||0x0,_0x57389a=Math[_0xeb604f(0x1e1)](_0x22026f,0x1);for(let _0x3e16da=0x0;_0x3e16da<_0x57389a;_0x3e16da++){_0x33c2db[_0xeb604f(0x228)](_0x33f6ee);}}_0x273511['set'](_0xcdb6a4,_0x33c2db);}return{'existingLocalSegmentNames':_0x321415,'localSegmentRules':_0x41a654,'localExpandedRuleToNames':_0x273511};}async function buildServerSegmentRuleMap(_0x56c05b,_0x2845b2,_0x15685e,_0x5a2114){const _0x39e9e6=new Map(),_0x1aaf90=new Set(),_0x3f5f08=async _0x532e49=>{const _0x57ca39=a101_0x383a;if(_0x1aaf90[_0x57ca39(0x21f)](_0x532e49))return;_0x1aaf90[_0x57ca39(0x238)](_0x532e49);let _0x1fe6d3=_0x15685e['find'](_0x37bf03=>_0x37bf03['id']===_0x532e49);if(!_0x1fe6d3)try{_0x1fe6d3=await _0x56c05b['segment']['getSegment'](_0x2845b2,_0x532e49);}catch{return;}if(!_0x1fe6d3?.[_0x57ca39(0x19b)])return;const _0x13071c=apiRuleToYaml(_0x1fe6d3['rule']);_0x39e9e6['set'](_0x532e49,_0x13071c);const _0x4c4053=collectSegmentRefsFromRule(_0x13071c);for(const _0x31a0b2 of _0x4c4053){await _0x3f5f08(_0x31a0b2);}};for(const _0x434fe4 of _0x5a2114){await _0x3f5f08(_0x434fe4);}return _0x39e9e6;}export function createSegmentIdResolver(_0x182dae,_0x16b699){return async _0x10ae37=>{const _0x38a718=a101_0x383a,_0x417eef=_0x182dae[_0x38a718(0x1bd)](_0x10ae37);if(!_0x417eef)throw new SDKError(ErrorCode[_0x38a718(0x19f)],_0x38a718(0x20c)+_0x10ae37+_0x38a718(0x1f5)+_0x16b699+'\x27)');return _0x417eef;};}export function extractRootFolderId(_0x2164d9){const _0x4a0be1=a101_0x109af2;return _0x2164d9[_0x4a0be1(0x1d0)]?.['parentSegmentFolder']?.[_0x4a0be1(0x1a7)]?.['id']||_0x2164d9[_0x4a0be1(0x1d0)]?.[_0x4a0be1(0x187)]?.[_0x4a0be1(0x1a7)]?.['id'];}export function buildConnectionMaps(_0x493144){const _0x175c82=a101_0x109af2,_0x534508=new Map(),_0x2b12b7=new Map(),_0x55bccc=new Map();for(const _0x326d9b of _0x493144){_0x534508[_0x175c82(0x1de)](_0x326d9b[_0x175c82(0x19e)],parseInt(_0x326d9b['id'],0xa)),_0x2b12b7[_0x175c82(0x1de)](_0x326d9b['id'],_0x326d9b[_0x175c82(0x19e)]),_0x55bccc[_0x175c82(0x1de)](_0x326d9b['name'],_0x326d9b['type']);}return{'nameToId':_0x534508,'idToName':_0x2b12b7,'nameToType':_0x55bccc};}export function calculatePushStats(_0x22cdfd,_0x5f5b0b,_0x431af8,_0xca4b70,_0x278ebc,_0x404b76,_0x26ee04){const _0x4cba94=a101_0x109af2,_0x21e87=_0x22cdfd[_0x4cba94(0x1f6)](_0x541629=>_0x541629[_0x4cba94(0x225)]),_0xc86e64=_0x22cdfd[_0x4cba94(0x1f6)](_0x33a485=>!_0x33a485[_0x4cba94(0x225)]&&_0x33a485['hasChanges']),_0x17900e=_0x22cdfd['filter'](_0x26d95a=>!_0x26d95a[_0x4cba94(0x225)]&&!_0x26d95a[_0x4cba94(0x1fa)]),_0x31c16f=_0x404b76?_0xca4b70:[],_0x3fdf88=_0x5f5b0b['filter'](_0x56cee1=>_0x56cee1['isNew']),_0xf6ca6=_0x5f5b0b['filter'](_0x868133=>!_0x868133['isNew']&&_0x868133[_0x4cba94(0x1fa)]),_0xc4dfc4=_0x5f5b0b[_0x4cba94(0x1f6)](_0x45d99e=>!_0x45d99e[_0x4cba94(0x225)]&&!_0x45d99e[_0x4cba94(0x1fa)]),_0x12a2c4=_0x404b76?_0x278ebc:[],_0x46053a=_0x22cdfd['flatMap'](_0xe19004=>_0xe19004[_0x4cba94(0x1e8)]),_0x29e2c3=_0x46053a[_0x4cba94(0x1f6)](_0x490a3f=>_0x490a3f['type']===_0x4cba94(0x207)),_0x50eecd=_0x46053a[_0x4cba94(0x1f6)](_0x48b0e3=>_0x48b0e3['type']===_0x4cba94(0x210)),_0x38cbd6=_0x46053a[_0x4cba94(0x1f6)](_0x2f9f6f=>_0x2f9f6f[_0x4cba94(0x1b0)]===_0x4cba94(0x1b9)),_0x2c549a=Array[_0x4cba94(0x1ba)](_0x431af8)[_0x4cba94(0x21e)](),_0x57ad6d=_0x26ee04?![]:_0x21e87[_0x4cba94(0x242)]>0x0||_0xc86e64[_0x4cba94(0x242)]>0x0||_0x31c16f[_0x4cba94(0x242)]>0x0,_0x61368b=_0x3fdf88[_0x4cba94(0x242)]>0x0||_0xf6ca6['length']>0x0||_0x12a2c4['length']>0x0,_0x5d077c=_0x26ee04?![]:_0x46053a[_0x4cba94(0x242)]>0x0,_0xe6bde1=_0x2c549a[_0x4cba94(0x242)]>0x0;return{'segments':{'new':_0x21e87,'changed':_0xc86e64,'unchanged':_0x17900e,'toDelete':_0x31c16f},'journeys':{'new':_0x3fdf88,'changed':_0xf6ca6,'unchanged':_0xc4dfc4,'toDelete':_0x12a2c4},'activations':{'all':_0x46053a,'toCreate':_0x29e2c3,'toUpdate':_0x50eecd,'toDelete':_0x38cbd6},'folders':{'toCreate':_0x2c549a},'counts':{'segments':{'new':_0x21e87[_0x4cba94(0x242)],'changed':_0xc86e64[_0x4cba94(0x242)],'unchanged':_0x17900e[_0x4cba94(0x242)],'toDelete':_0x31c16f[_0x4cba94(0x242)]},'journeys':{'new':_0x3fdf88['length'],'changed':_0xf6ca6[_0x4cba94(0x242)],'unchanged':_0xc4dfc4['length'],'toDelete':_0x12a2c4[_0x4cba94(0x242)]},'activations':{'create':_0x29e2c3[_0x4cba94(0x242)],'update':_0x50eecd[_0x4cba94(0x242)],'delete':_0x38cbd6['length']},'folders':_0x2c549a[_0x4cba94(0x242)]},'hasChanges':_0x57ad6d||_0x61368b||_0x5d077c||_0xe6bde1};}export async function buildPushExecutionContext(_0x30aff7,_0x342414,_0x16ed84,_0x1882e8,_0x4d1d0b,_0x25b868){const _0x52eef5=a101_0x109af2,_0x521df8=extractRootFolderId(_0x16ed84),{pathToId:_0x5d7327,idToPath:_0x5cfc7e}=buildFolderMaps(_0x4d1d0b),_0x1dd2da=buildSegmentNameToIdMap(_0x1882e8),_0x59a437=new Map(),{batchAsync:_0x5af6f6}=await import(_0x52eef5(0x1b2)),[_0x28b80a,_0x219f4b]=await Promise[_0x52eef5(0x197)]([_0x30aff7[_0x52eef5(0x1a0)][_0x52eef5(0x18a)](),_0x30aff7[_0x52eef5(0x1bb)]['list'](),((async()=>{!_0x25b868&&_0x1882e8['length']>0x0&&await _0x5af6f6(_0x1882e8,async _0x239acf=>{const _0xe762f0=a101_0x383a,_0x477123=await _0x30aff7[_0xe762f0(0x22b)]['listActivations'](_0x342414,_0x239acf['id']);_0x59a437['set'](_0x239acf['id'],_0x477123);});})())]),{emailToId:_0x312b20,idToEmail:_0x2d20b9}=_0x28b80a,_0x23a815=buildConnectionMaps(_0x219f4b);return{'rootFolderId':_0x521df8,'folderPathToId':_0x5d7327,'folderIdToPath':_0x5cfc7e,'segmentNameToId':_0x1dd2da,'activationsBySegmentId':_0x59a437,'emailToIdMap':_0x312b20,'idToEmailMap':_0x2d20b9,'connectionNameToIdMap':_0x23a815[_0x52eef5(0x1b1)],'connectionIdToNameMap':_0x23a815['idToName'],'connectionNameToTypeMap':_0x23a815[_0x52eef5(0x189)]};}export function createPushYamlContextForBundle(_0x9f338f,_0x38c989,_0x1aea91,_0xc993cb,_0x187be7,_0x517299,_0x4390e0,_0x1604cb){const {existingLocalSegmentNames:_0x1ece68,localExpandedRuleToNames:_0x161d6d}=_0xc993cb,_0x84002a=new Set(),_0x232012=new Map(),_0x5ba897=new Map(),_0xd8a7ee=new Map(),_0x2908a4=createJumpTargetCache(),_0x12df9b=new Map(),_0x31521e=new Map(),_0xcb1a01=new Set();let _0x10b374;const _0x2cd521=_0xd584c1=>{const _0xb362c={'resolveSegment':async _0xc19d0b=>{const _0x48dec7=a101_0x383a,_0x4c4499=_0xd8a7ee[_0x48dec7(0x1bd)](_0xc19d0b);if(_0x4c4499!==undefined)return{'name':_0x4c4499,'isJourneyLocal':!![]};try{let _0x4ad80b=_0x1aea91[_0x48dec7(0x17c)](_0x38e27c=>_0x38e27c['id']===_0xc19d0b);!_0x4ad80b&&(_0x4ad80b=await _0x9f338f[_0x48dec7(0x22b)][_0x48dec7(0x17f)](_0x38c989,_0xc19d0b));const _0x26b427=generateJourneyLocalName(_0x4ad80b[_0x48dec7(0x19e)]),_0x3911e9=_0x4ad80b[_0x48dec7(0x1e6)]===SEGMENT_KIND_JOURNEY&&_0x26b427!==undefined;let _0x465006=_0x4ad80b['name'],_0x543cd8;if(_0x3911e9&&_0x4ad80b[_0x48dec7(0x19b)]){const _0x52a1e2=apiRuleToYaml(_0x4ad80b[_0x48dec7(0x19b)]);_0x31521e['set'](_0xc19d0b,_0x52a1e2);const _0x58d8fd=async _0x132ea9=>{const _0xfacf33=_0x48dec7,_0x35cded=collectSegmentRefsFromRule(_0x132ea9);for(const _0x1427ad of _0x35cded){if(!_0x31521e[_0xfacf33(0x21f)](_0x1427ad))try{const _0x2e7433=await _0x9f338f[_0xfacf33(0x22b)][_0xfacf33(0x17f)](_0x38c989,_0x1427ad);if(_0x2e7433?.['rule']){const _0x3a0bb4=apiRuleToYaml(_0x2e7433[_0xfacf33(0x19b)]);_0x31521e[_0xfacf33(0x1de)](_0x1427ad,_0x3a0bb4),await _0x58d8fd(_0x3a0bb4);}}catch{}}};await _0x58d8fd(_0x52a1e2);const _0x488bf1=serializeExpandedRule(_0x52a1e2,_0x31521e),_0x45186c=_0x161d6d[_0x48dec7(0x1bd)](_0x488bf1);if(_0x45186c&&_0x45186c[_0x48dec7(0x242)]>0x0){const _0x5d746e=_0x232012[_0x48dec7(0x1bd)](_0x488bf1)||0x0,_0x20e8b1=_0x45186c[_0x5d746e]||_0x45186c[_0x45186c[_0x48dec7(0x242)]-0x1];_0x232012[_0x48dec7(0x1de)](_0x488bf1,_0x5d746e+0x1),_0x465006=_0x20e8b1,_0x84002a[_0x48dec7(0x238)](_0x465006),_0xd8a7ee[_0x48dec7(0x1de)](_0xc19d0b,_0x465006);const _0x235b62=await resolveRuleSegmentRefs(_0x52a1e2,async _0x5cc22e=>{const _0x34215a=_0x48dec7,_0x1a76a5=_0xd8a7ee[_0x34215a(0x1bd)](_0x5cc22e);if(_0x1a76a5)return _0x1a76a5;const _0x228cdb=await _0x10b374['resolveSegment'](_0x5cc22e);return _0x228cdb['name'];});_0x543cd8={'description':_0x4ad80b['description'],'rule':_0x235b62};}else{const _0x38a05d=_0x12df9b['get'](_0x488bf1);if(_0x38a05d)_0x465006=_0x38a05d,_0xd8a7ee[_0x48dec7(0x1de)](_0xc19d0b,_0x465006);else{if(_0x26b427){let _0x3ab711=_0x26b427,_0x4b167d=0x2;while(_0x84002a[_0x48dec7(0x21f)](_0x3ab711)||_0x1ece68[_0x48dec7(0x21f)](_0x3ab711)){_0x3ab711=_0x26b427+'_'+_0x4b167d,_0x4b167d++;}_0x84002a[_0x48dec7(0x238)](_0x3ab711),_0x465006=_0x3ab711;}_0xd8a7ee[_0x48dec7(0x1de)](_0xc19d0b,_0x465006),_0x12df9b[_0x48dec7(0x1de)](_0x488bf1,_0x465006);const _0x440cf8=await resolveRuleSegmentRefs(_0x52a1e2,async _0x338371=>{const _0x24f586=_0x48dec7,_0x2bf4bc=_0xd8a7ee[_0x24f586(0x1bd)](_0x338371);if(_0x2bf4bc)return _0x2bf4bc;const _0x3f2ad8=await _0x10b374[_0x24f586(0x18b)](_0x338371);return _0x3f2ad8[_0x24f586(0x19e)];});_0x543cd8={'description':_0x4ad80b['description'],'rule':_0x440cf8};}}}return{'name':_0x465006,'isJourneyLocal':_0x3911e9,'definition':_0x543cd8};}catch{return{'name':_0xc19d0b,'isJourneyLocal':![]};}},'resolveActivation':async _0xec0706=>{const _0x1a1626=a101_0x383a,_0x8f67e4=_0x5ba897['get'](_0xec0706);if(_0x8f67e4!==undefined)return{'name':_0x8f67e4,'isJourneyLocal':!![]};try{let _0x5e7a2e=_0x4390e0?.[_0x1a1626(0x1bd)](_0xec0706);!_0x5e7a2e&&(_0x5e7a2e=await _0x9f338f[_0x1a1626(0x218)][_0x1a1626(0x1e2)](_0xd584c1,_0xec0706));const _0x57d696=_0x5e7a2e[_0x1a1626(0x230)][_0x1a1626(0x1df)][_0x1a1626(0x19e)]||_0xec0706,_0x1b469e=sanitizeYamlKey(_0x57d696)||_0x1a1626(0x17a)+_0xec0706,_0x1e265b=_0x1b469e;_0x5ba897[_0x1a1626(0x1de)](_0xec0706,_0x1e265b);const _0x13a404=journeyActivationStepToYaml(_0x5e7a2e,_0x187be7,_0x517299);return{'name':_0x1e265b,'isJourneyLocal':!![],'definition':_0x13a404};}catch{return{'name':_0xec0706,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x2f5c75,_0x3b2913)=>resolveJumpTarget(_0x2f5c75,_0x3b2913,_0x2908a4,async _0x4212b2=>{const _0x2508c3=a101_0x383a,_0x212187=_0x1604cb?.['get'](_0x4212b2);if(_0x212187)return _0x212187;return _0x9f338f[_0x2508c3(0x218)][_0x2508c3(0x1a9)](_0x4212b2);})};return _0x10b374=_0xb362c,_0xb362c;},_0x545e8c=async _0x2b076f=>{const _0xa7fb4a=a101_0x383a,{collectSegmentIdsFromJourneyApi:_0x31b1a8}=await import(_0xa7fb4a(0x22c)),{batchAsync:_0x2fd5c1}=await import(_0xa7fb4a(0x1b2)),_0x4191cb=new Set();for(const _0x442826 of _0x2b076f){let _0x2b4f68=_0x1604cb?.['get'](_0x442826);!_0x2b4f68&&(_0x2b4f68=await _0x9f338f[_0xa7fb4a(0x218)][_0xa7fb4a(0x1a9)](_0x442826));const _0x5c9329=_0x31b1a8(_0x2b4f68);for(const _0x4e7f1d of _0x5c9329){_0x4191cb[_0xa7fb4a(0x238)](_0x4e7f1d);}}let _0x4041b1=Array[_0xa7fb4a(0x1ba)](_0x4191cb);while(_0x4041b1['length']>0x0){const _0x4b0f60=_0x4041b1[_0xa7fb4a(0x1f6)](_0x5eb025=>!_0xcb1a01[_0xa7fb4a(0x21f)](_0x5eb025));if(_0x4b0f60[_0xa7fb4a(0x242)]===0x0)break;const _0x1030d8=await _0x2fd5c1(_0x4b0f60,async _0x2a3ead=>{const _0x9c3bce=_0xa7fb4a;_0xcb1a01[_0x9c3bce(0x238)](_0x2a3ead);let _0x20cb0b=_0x1aea91[_0x9c3bce(0x17c)](_0x1cca38=>_0x1cca38['id']===_0x2a3ead);if(!_0x20cb0b)try{_0x20cb0b=await _0x9f338f[_0x9c3bce(0x22b)][_0x9c3bce(0x17f)](_0x38c989,_0x2a3ead);}catch{return null;}return{'segmentId':_0x2a3ead,'segment':_0x20cb0b};},0xa),_0x27e91f=new Set();for(const _0x444d51 of _0x1030d8){if(!_0x444d51?.[_0xa7fb4a(0x22b)]?.['rule'])continue;const _0x50ce3b=apiRuleToYaml(_0x444d51[_0xa7fb4a(0x22b)][_0xa7fb4a(0x19b)]);_0x31521e[_0xa7fb4a(0x1de)](_0x444d51['segmentId'],_0x50ce3b);const _0x147366=collectSegmentRefsFromRule(_0x50ce3b);for(const _0x14b7b2 of _0x147366){!_0xcb1a01['has'](_0x14b7b2)&&_0x27e91f[_0xa7fb4a(0x238)](_0x14b7b2);}}_0x4041b1=Array[_0xa7fb4a(0x1ba)](_0x27e91f);}};return{'createYamlContext':_0x2cd521,'prefetchJourneySegments':_0x545e8c};}export async function executePushSegments(_0x1e7cc8,_0x2dfb7c,_0x297d1a,_0x4e673b,_0x19f17e){const _0x3c12cf=a101_0x109af2,{segmentDefToCreateRequest:_0x173f0c,segmentDefToUpdateRequest:_0x28df62}=await import('./child-segment-yaml.js'),_0x1ec420=_0x297d1a['folderPathToId'],_0x144844=0x5,_0x478426=async _0x60457f=>{const _0xdd4530=a101_0x383a,_0x13f7c2=_0x60457f[_0xdd4530(0x1d8)]?_0x1ec420[_0xdd4530(0x1bd)](_0x60457f[_0xdd4530(0x1d8)]):undefined;let _0x436278;const _0x54f9ad={'created':0x0,'updated':0x0,'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};try{if(_0x60457f[_0xdd4530(0x225)]){_0x19f17e[_0xdd4530(0x178)]?.({'type':_0xdd4530(0x1aa),'name':_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]});const _0x523d95=_0x173f0c(_0x60457f[_0xdd4530(0x181)],_0x13f7c2),_0x248ab4=await _0x19f17e[_0xdd4530(0x245)](_0xdd4530(0x1e5)+_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]+_0xdd4530(0x1f8),()=>_0x1e7cc8[_0xdd4530(0x22b)][_0xdd4530(0x196)](_0x4e673b[_0xdd4530(0x1ab)],_0x523d95));_0x436278=_0x248ab4['data']['id'],_0x54f9ad[_0xdd4530(0x1da)]={'name':_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)],'id':_0x436278},_0x19f17e[_0xdd4530(0x178)]?.({'type':_0xdd4530(0x243),'name':_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)],'segmentId':_0x436278}),_0x19f17e[_0xdd4530(0x22a)]?.(_0xdd4530(0x1f3)+_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]+'\x27'),_0x54f9ad['created']=0x1;}else{if(_0x60457f[_0xdd4530(0x1fa)]){_0x19f17e[_0xdd4530(0x178)]?.({'type':'segment_updating','name':_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]});const _0x36eaf5=_0x28df62(_0x60457f[_0xdd4530(0x181)]);_0x13f7c2!==_0x60457f[_0xdd4530(0x1e0)]?.['segmentFolderId']&&(_0x36eaf5[_0xdd4530(0x1c8)]=_0x13f7c2?parseInt(_0x13f7c2,0xa):undefined),await _0x19f17e[_0xdd4530(0x245)](_0xdd4530(0x1a5)+_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]+'\x27...',()=>_0x1e7cc8['segment']['updateSegmentById'](_0x4e673b[_0xdd4530(0x1ab)],_0x60457f['existingSegment']['id'],_0x36eaf5)),_0x436278=_0x60457f[_0xdd4530(0x1e0)]['id'],_0x19f17e[_0xdd4530(0x178)]?.({'type':_0xdd4530(0x202),'name':_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]}),_0x19f17e[_0xdd4530(0x22a)]?.(_0xdd4530(0x1c7)+_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]+'\x27'),_0x54f9ad[_0xdd4530(0x1a3)]=0x1;}else _0x436278=_0x60457f[_0xdd4530(0x1e0)]['id'];}}catch(_0x295459){const _0x3516c9=isHttp400Error(_0x295459),_0x2d4afc=_0x3516c9?ErrorCode[_0xdd4530(0x179)]:ErrorCode['SEGMENT_UPDATE_ERROR'],_0x406ffb=getErrorMessage(_0x295459);throw new SDKError(_0x2d4afc,_0xdd4530(0x1b6)+(_0x60457f[_0xdd4530(0x225)]?'create':'update')+'\x20segment\x20from\x20file:\x20'+_0x60457f['absolutePath']+_0xdd4530(0x1cf)+_0x406ffb,_0x295459);}try{const _0x2ad202=await syncActivationsForSegment(_0x1e7cc8,_0x4e673b[_0xdd4530(0x1ab)],_0x436278,_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)],_0x60457f[_0xdd4530(0x1e8)],_0x19f17e,_0x60457f[_0xdd4530(0x19a)]);_0x54f9ad[_0xdd4530(0x1ef)]=_0x2ad202;}catch(_0x44aa37){if(_0x44aa37 instanceof SDKError)throw _0x44aa37;throw new SDKError(ErrorCode['ACTIVATION_UPDATE_ERROR'],_0xdd4530(0x204)+_0x60457f[_0xdd4530(0x181)][_0xdd4530(0x19e)]+'\x27\x20from\x20file:\x20'+_0x60457f[_0xdd4530(0x19a)]+_0xdd4530(0x1cf)+getErrorMessage(_0x44aa37),_0x44aa37);}return _0x54f9ad;},_0x397a79=await batchAsync(_0x2dfb7c,_0x478426,_0x144844),_0xc10ec9={'created':0x0,'updated':0x0,'deleted':0x0,'createdSegmentIds':new Map(),'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};for(const _0x3da26b of _0x397a79){_0xc10ec9[_0x3c12cf(0x1ac)]+=_0x3da26b[_0x3c12cf(0x1ac)],_0xc10ec9[_0x3c12cf(0x1a3)]+=_0x3da26b[_0x3c12cf(0x1a3)],_0x3da26b[_0x3c12cf(0x1da)]&&_0xc10ec9['createdSegmentIds'][_0x3c12cf(0x1de)](_0x3da26b[_0x3c12cf(0x1da)][_0x3c12cf(0x19e)],_0x3da26b[_0x3c12cf(0x1da)]['id']),_0xc10ec9[_0x3c12cf(0x1ef)][_0x3c12cf(0x1ac)]+=_0x3da26b[_0x3c12cf(0x1ef)]['created'],_0xc10ec9[_0x3c12cf(0x1ef)]['updated']+=_0x3da26b[_0x3c12cf(0x1ef)][_0x3c12cf(0x1a3)],_0xc10ec9[_0x3c12cf(0x1ef)][_0x3c12cf(0x1a8)]+=_0x3da26b['activations'][_0x3c12cf(0x1a8)];}return _0xc10ec9;}async function syncActivationsForSegment(_0x4d6159,_0x4aa800,_0x153f48,_0x38b844,_0x14ef03,_0x5e639b,_0x3ad70d){const _0x472aa1=a101_0x109af2,_0x2e145b={'created':0x0,'updated':0x0,'deleted':0x0};for(const _0x3a8ef2 of _0x14ef03){try{if(_0x3a8ef2[_0x472aa1(0x1b0)]===_0x472aa1(0x207)&&_0x3a8ef2[_0x472aa1(0x1a2)])_0x5e639b['onProgress']?.({'type':'activation_creating','segmentName':_0x38b844,'activationName':_0x3a8ef2[_0x472aa1(0x19e)]}),await _0x5e639b[_0x472aa1(0x245)](_0x472aa1(0x18f)+_0x3a8ef2['name']+_0x472aa1(0x1f8),()=>_0x4d6159[_0x472aa1(0x22b)][_0x472aa1(0x234)](_0x4aa800,_0x153f48,_0x3a8ef2[_0x472aa1(0x1a2)])),_0x5e639b['onProgress']?.({'type':_0x472aa1(0x1ca),'segmentName':_0x38b844,'activationName':_0x3a8ef2['name']}),_0x5e639b[_0x472aa1(0x22a)]?.('Created\x20activation\x20\x27'+_0x3a8ef2[_0x472aa1(0x19e)]+'\x27'),_0x2e145b['created']++;else{if(_0x3a8ef2[_0x472aa1(0x1b0)]==='update'&&_0x3a8ef2[_0x472aa1(0x1a2)]&&_0x3a8ef2[_0x472aa1(0x249)])_0x5e639b[_0x472aa1(0x178)]?.({'type':_0x472aa1(0x236),'segmentName':_0x38b844,'activationName':_0x3a8ef2['name']}),await _0x5e639b[_0x472aa1(0x245)]('Updating\x20activation\x20\x27'+_0x3a8ef2[_0x472aa1(0x19e)]+'\x27...',()=>_0x4d6159[_0x472aa1(0x22b)]['updateActivation'](_0x4aa800,_0x153f48,_0x3a8ef2[_0x472aa1(0x249)]['id'],_0x3a8ef2[_0x472aa1(0x1a2)])),_0x5e639b[_0x472aa1(0x178)]?.({'type':_0x472aa1(0x211),'segmentName':_0x38b844,'activationName':_0x3a8ef2[_0x472aa1(0x19e)]}),_0x5e639b['logSuccess']?.('Updated\x20activation\x20\x27'+_0x3a8ef2['name']+'\x27'),_0x2e145b[_0x472aa1(0x1a3)]++;else _0x3a8ef2[_0x472aa1(0x1b0)]===_0x472aa1(0x1b9)&&_0x3a8ef2[_0x472aa1(0x249)]&&(_0x5e639b[_0x472aa1(0x178)]?.({'type':_0x472aa1(0x24d),'segmentName':_0x38b844,'activationName':_0x3a8ef2[_0x472aa1(0x19e)]}),await _0x5e639b[_0x472aa1(0x245)]('Deleting\x20activation\x20\x27'+_0x3a8ef2[_0x472aa1(0x19e)]+_0x472aa1(0x1f8),()=>_0x4d6159['segment']['deleteActivation'](_0x4aa800,_0x153f48,_0x3a8ef2['existingActivation']['id'])),_0x5e639b['onProgress']?.({'type':'activation_deleted','segmentName':_0x38b844,'activationName':_0x3a8ef2[_0x472aa1(0x19e)]}),_0x5e639b[_0x472aa1(0x1e3)]?.(_0x472aa1(0x1fb)+_0x3a8ef2[_0x472aa1(0x19e)]+'\x27'),_0x2e145b['deleted']++);}}catch(_0xe41c9e){const _0x44fd90=isHttp400Error(_0xe41c9e),_0x2125d6=_0x44fd90?ErrorCode[_0x472aa1(0x235)]:ErrorCode[_0x472aa1(0x195)],_0x49a0f3=getErrorMessage(_0xe41c9e);throw new SDKError(_0x2125d6,_0x472aa1(0x1b6)+_0x3a8ef2[_0x472aa1(0x1b0)]+'\x20activation\x20\x27'+_0x3a8ef2[_0x472aa1(0x19e)]+'\x27\x20from\x20file:\x20'+_0x3ad70d+_0x472aa1(0x1cf)+_0x49a0f3,_0xe41c9e);}}return _0x2e145b;}export async function executePushFolders(_0x37aa19,_0x5f1007,_0x44f719,_0x504508,_0x2ea1d5){const _0x56749a=a101_0x109af2,_0x163d4b=new Map(_0x44f719);for(const _0x3d6c1e of _0x5f1007){const _0x273c3c=_0x3d6c1e[_0x56749a(0x240)]('/'),_0x26f81c=_0x273c3c[_0x273c3c['length']-0x1],_0x25f1aa=_0x273c3c[_0x56749a(0x1b5)](0x0,-0x1)['join']('/'),_0x30a1d8=_0x163d4b[_0x56749a(0x1bd)](_0x25f1aa);_0x2ea1d5[_0x56749a(0x178)]?.({'type':_0x56749a(0x198),'folder':_0x3d6c1e});const _0x8dde94={'name':_0x26f81c,'parentFolderId':_0x30a1d8},_0x15baa5=await _0x2ea1d5['withProgress'](_0x56749a(0x1a1)+_0x3d6c1e+_0x56749a(0x1f8),()=>_0x37aa19[_0x56749a(0x22b)][_0x56749a(0x1a4)](_0x504508[_0x56749a(0x1ab)],_0x8dde94));_0x163d4b['set'](_0x3d6c1e,_0x15baa5['data']['id']),_0x2ea1d5[_0x56749a(0x178)]?.({'type':_0x56749a(0x17b),'folder':_0x3d6c1e,'folderId':_0x15baa5[_0x56749a(0x1a7)]['id']}),_0x2ea1d5[_0x56749a(0x1a6)]?.(_0x56749a(0x222)+_0x3d6c1e+'\x27');}return _0x163d4b;}export async function executePushSegmentDeletions(_0x2c9a06,_0x130545,_0x49dd99){const _0x444bbe=a101_0x109af2;if(_0x130545[_0x444bbe(0x242)]===0x0)return 0x0;const {batchAsync:_0x7ecd}=await import(_0x444bbe(0x1b2)),_0x12e3cd=0x5,_0x1dc36b=await _0x7ecd(_0x130545,async _0x425b0f=>{const _0x31ece7=_0x444bbe;return _0x49dd99[_0x31ece7(0x178)]?.({'type':'segment_deleting','name':_0x425b0f[_0x31ece7(0x19e)]}),await _0x2c9a06[_0x31ece7(0x22b)]['deleteSegment'](_0x425b0f['id']),_0x49dd99['onProgress']?.({'type':_0x31ece7(0x1e9),'name':_0x425b0f[_0x31ece7(0x19e)]}),_0x49dd99[_0x31ece7(0x1e3)]?.(_0x31ece7(0x1d2)+_0x425b0f[_0x31ece7(0x19e)]+'\x27'),0x1;},_0x12e3cd);return _0x1dc36b[_0x444bbe(0x1ec)]((_0xe26f2c,_0x52d98d)=>_0xe26f2c+_0x52d98d,0x0);}export async function executePushJourneys(_0x599253,_0x414c84,_0x4335c5,_0x5e22ce,_0x635f29){const _0x41e1d3=a101_0x109af2,{journeyDefToRequest:_0x122b12}=await import('./journey-yaml.js'),{activationDefToCreateRequest:_0x14f1b4,yamlRuleToApi:_0x2b3c49,validateSegmentRule:_0x543ce3}=await import(_0x41e1d3(0x1d5)),_0x175526={'results':[],'created':0x0,'updated':0x0,'embeddedSegmentNameToId':new Map()},_0x53846f=new Map(_0x4335c5[_0x41e1d3(0x22f)]),_0x65e1bb=0x5;for(let _0x127928=0x0;_0x127928<_0x414c84[_0x41e1d3(0x242)];_0x127928+=_0x65e1bb){const _0x41e1e2=_0x414c84[_0x41e1d3(0x1b5)](_0x127928,_0x127928+_0x65e1bb),_0x4fcc0c=await Promise['all'](_0x41e1e2[_0x41e1d3(0x1ee)](async _0x52aaf4=>{const _0x57c0de=_0x41e1d3;if(!_0x52aaf4[_0x57c0de(0x225)]&&!_0x52aaf4[_0x57c0de(0x1fa)])return{'action':'unchanged','name':_0x52aaf4[_0x57c0de(0x181)][_0x57c0de(0x19e)],'journeyId':_0x52aaf4[_0x57c0de(0x17d)]?.['id']};const _0x5c56c3=_0x52aaf4[_0x57c0de(0x1d8)]?_0x4335c5['folderPathToId'][_0x57c0de(0x1bd)](_0x52aaf4['folderPath']):undefined;_0x635f29[_0x57c0de(0x178)]?.({'type':_0x52aaf4[_0x57c0de(0x225)]?_0x57c0de(0x224):'journey_updating','name':_0x52aaf4[_0x57c0de(0x181)][_0x57c0de(0x19e)]});try{const _0x120e00=await executeSingleJourneyPush(_0x599253,_0x52aaf4,{..._0x4335c5,'segmentNameToId':_0x53846f},{'parentId':_0x5e22ce[_0x57c0de(0x1ab)],'rootFolderId':_0x5e22ce['rootFolderId'],'folderId':_0x5c56c3,'verbose':_0x5e22ce[_0x57c0de(0x184)]},_0x635f29,{'journeyDefToRequest':_0x122b12,'activationDefToCreateRequest':_0x14f1b4,'yamlRuleToApi':_0x2b3c49,'validateSegmentRule':_0x543ce3});for(const [_0x4bf876,_0xdbb2f7]of _0x120e00[_0x57c0de(0x20a)]){_0x53846f[_0x57c0de(0x1de)](_0x4bf876,_0xdbb2f7),_0x175526[_0x57c0de(0x20a)][_0x57c0de(0x1de)](_0x4bf876,_0xdbb2f7);}if(_0x120e00[_0x57c0de(0x24a)]===_0x57c0de(0x1ac))_0x635f29[_0x57c0de(0x178)]?.({'type':_0x57c0de(0x200),'name':_0x52aaf4[_0x57c0de(0x181)][_0x57c0de(0x19e)],'journeyId':_0x120e00[_0x57c0de(0x24c)]}),_0x635f29[_0x57c0de(0x22a)]?.('Created\x20journey\x20\x27'+_0x52aaf4[_0x57c0de(0x181)]['name']+'\x27'),_0x175526[_0x57c0de(0x1ac)]++;else _0x120e00[_0x57c0de(0x24a)]===_0x57c0de(0x1a3)&&(_0x635f29['onProgress']?.({'type':'journey_updated','name':_0x52aaf4[_0x57c0de(0x181)][_0x57c0de(0x19e)]}),_0x635f29[_0x57c0de(0x22a)]?.('Updated\x20journey\x20\x27'+_0x52aaf4[_0x57c0de(0x181)][_0x57c0de(0x19e)]+'\x27'),_0x175526[_0x57c0de(0x1a3)]++);return{'action':_0x120e00[_0x57c0de(0x24a)],'name':_0x52aaf4[_0x57c0de(0x181)][_0x57c0de(0x19e)],'journeyId':_0x120e00['journeyId']};}catch(_0x3dfb85){const _0x23ff06=isHttp400Error(_0x3dfb85),_0x3dcfa0=_0x23ff06?ErrorCode[_0x57c0de(0x1d9)]:ErrorCode[_0x57c0de(0x18e)],_0x4b4a76=getErrorMessage(_0x3dfb85);throw new SDKError(_0x3dcfa0,_0x57c0de(0x1b6)+(_0x52aaf4[_0x57c0de(0x225)]?_0x57c0de(0x207):_0x57c0de(0x210))+'\x20journey\x20from\x20file:\x20'+_0x52aaf4[_0x57c0de(0x19a)]+_0x57c0de(0x1cf)+_0x4b4a76,_0x3dfb85);}}));_0x175526[_0x41e1d3(0x247)][_0x41e1d3(0x228)](..._0x4fcc0c);}return _0x175526;}async function executeSingleJourneyPush(_0x4bf59d,_0x2fa15a,_0xa73651,_0x40b266,_0x5cf2f3,_0x54b520){const _0x62cfa5=a101_0x109af2,{journeyDefToRequest:_0x2aa6e5,activationDefToCreateRequest:_0x3dba68,yamlRuleToApi:_0xedda1a,validateSegmentRule:_0x5904ce}=_0x54b520,_0x252342=new Map(),_0x231256=new Map(),_0x5b0044=new Map(),_0x28bbc1=new Map(),_0x30c476=new Map();let _0x355293;const _0x37daec=async()=>{const _0x5741f1=a101_0x383a;if(_0x355293)return;_0x355293=new Map();if(!_0x2fa15a['existingJourney'])return;const _0x3fae6f=await _0x4bf59d[_0x5741f1(0x218)][_0x5741f1(0x220)](_0x2fa15a[_0x5741f1(0x17d)]['id']);for(const _0x999eec of _0x3fae6f){const _0x55e5d5=journeyActivationStepToYaml(_0x999eec,_0xa73651['idToEmailMap'],_0xa73651[_0x5741f1(0x24b)]),_0x25a88b=activationSignature(_0x55e5d5);!_0x355293[_0x5741f1(0x21f)](_0x25a88b)&&_0x355293[_0x5741f1(0x1de)](_0x25a88b,_0x999eec['id']),_0x55e5d5[_0x5741f1(0x19e)]&&_0x231256['set'](_0x55e5d5[_0x5741f1(0x19e)],_0x999eec['id']);}};if(_0x2fa15a[_0x62cfa5(0x17d)]&&_0x2fa15a[_0x62cfa5(0x181)]['segments']){const _0x4a8e64=buildLocalExpandedRuleMappings(_0x2fa15a[_0x62cfa5(0x181)]),_0xfe573f=_0x4a8e64['localSegmentRules'];if(_0xfe573f[_0x62cfa5(0x1c1)]>0x0){const _0x381309=new Map();for(const [_0x47857a,_0x17187b]of _0xfe573f){const _0x43f5c7=serializeExpandedRule(_0x17187b,_0xfe573f);_0x381309[_0x62cfa5(0x1de)](_0x47857a,_0x43f5c7);}const _0x494c05=collectSegmentIdsFromJourneyApi(_0x2fa15a[_0x62cfa5(0x17d)]);if(_0x494c05[_0x62cfa5(0x1c1)]>0x0){const _0xcc9bde=await buildServerSegmentRuleMap(_0x4bf59d,_0x40b266['parentId'],_0xa73651[_0x62cfa5(0x201)],_0x494c05);if(_0xcc9bde[_0x62cfa5(0x1c1)]>0x0){const _0x397f39=new Map();for(const [_0x13cfa9,_0xd15338]of _0xcc9bde){const _0x313b05=serializeExpandedRule(_0xd15338,_0xcc9bde);!_0x397f39[_0x62cfa5(0x21f)](_0x313b05)&&_0x397f39[_0x62cfa5(0x1de)](_0x313b05,_0x13cfa9);}for(const [_0x4e6781,_0x5f0c28]of _0x381309){const _0x5375bd=_0x397f39[_0x62cfa5(0x1bd)](_0x5f0c28);_0x5375bd&&(_0x30c476['set'](_0x4e6781,_0x5375bd),_0xa73651[_0x62cfa5(0x22f)][_0x62cfa5(0x1de)](_0x4e6781,_0x5375bd));}}}}}const _0x569414={'resolveSegmentId':async _0x5e192b=>{const _0x489588=_0x62cfa5,_0x5c7b03=_0xa73651['segmentNameToId']['get'](_0x5e192b);if(!_0x5c7b03)throw new SDKError(ErrorCode[_0x489588(0x19f)],_0x489588(0x20c)+_0x5e192b+_0x489588(0x1ce)+_0x2fa15a[_0x489588(0x181)][_0x489588(0x19e)]+')');return _0x5c7b03;},'resolveEmbeddedSegmentId':async(_0x1713f5,_0x1281d8)=>{const _0x3f3d92=_0x62cfa5,_0x1e65f6=_0xa73651[_0x3f3d92(0x22f)][_0x3f3d92(0x1bd)](_0x1713f5);if(_0x1e65f6)return _0x1e65f6;const _0x4b1f89=_0x30c476['get'](_0x1713f5);if(_0x4b1f89)return _0xa73651['segmentNameToId'][_0x3f3d92(0x1de)](_0x1713f5,_0x4b1f89),_0x4b1f89;const _0x3521ed=_0xa73651[_0x3f3d92(0x201)]['find'](_0x351523=>_0x351523[_0x3f3d92(0x19e)]===_0x1713f5);if(_0x3521ed)return _0xa73651[_0x3f3d92(0x22f)]['set'](_0x1713f5,_0x3521ed['id']),_0x3521ed['id'];if(_0x2fa15a[_0x3f3d92(0x225)]){const {stageName:_0x59c5a3,criteriaName:_0x50b527}=findSegmentCriteriaLocation(_0x2fa15a[_0x3f3d92(0x181)],_0x1713f5);return _0x5904ce(_0x1713f5,_0x1281d8[_0x3f3d92(0x19b)]),_0x5b0044[_0x3f3d92(0x1de)](_0x1713f5,{'definition':_0x1281d8,'stageName':_0x59c5a3,'criteriaName':_0x50b527}),createPendingSegmentId(_0x1713f5);}const _0x53ef87=_0x2fa15a['existingJourney']?.['id'];if(!_0x53ef87)throw new SDKError(ErrorCode[_0x3f3d92(0x23c)],_0x3f3d92(0x1be));_0x5904ce(_0x1713f5,_0x1281d8[_0x3f3d92(0x19b)]);const _0x3b908f=generateDeterministicJourneySegmentName(_0x2fa15a[_0x3f3d92(0x181)][_0x3f3d92(0x19e)],_0x1713f5),_0x287b7b=_0xa73651[_0x3f3d92(0x201)][_0x3f3d92(0x17c)](_0x6a458f=>_0x6a458f[_0x3f3d92(0x19e)]===_0x3b908f),_0x288b08=createSegmentIdResolver(_0xa73651[_0x3f3d92(0x22f)],_0x1713f5),_0x178229=await resolveRuleSegmentIds(_0x1281d8[_0x3f3d92(0x19b)],_0x288b08);let _0x55421f;if(_0x287b7b)await _0x4bf59d[_0x3f3d92(0x22b)]['updateSegmentById'](_0x40b266[_0x3f3d92(0x1ab)],_0x287b7b['id'],{'description':_0x1281d8['description']||_0x3f3d92(0x1db)+_0x1713f5,'rule':_0xedda1a(_0x178229,!![]),'countPopulation':!![]}),_0x55421f=_0x287b7b['id'];else try{_0x55421f=await _0x4bf59d['segment']['createJourneySegment']({'name':_0x3b908f,'description':_0x1281d8[_0x3f3d92(0x19c)]||_0x3f3d92(0x1db)+_0x1713f5,'journeyId':_0x53ef87,'rule':_0xedda1a(_0x178229,!![]),'countPopulation':!![],'parentFolderId':_0x40b266['rootFolderId']||'','audienceId':_0x40b266[_0x3f3d92(0x1ab)]});}catch(_0x21a160){const _0x5b4431=_0x21a160 instanceof Error&&_0x21a160[_0x3f3d92(0x1ae)][_0x3f3d92(0x1cc)](_0x3f3d92(0x206));if(_0x5b4431){const _0x242f4c=await _0x4bf59d[_0x3f3d92(0x22b)][_0x3f3d92(0x21b)](_0x40b266[_0x3f3d92(0x1ab)]),_0x2c9bdf=_0x242f4c[_0x3f3d92(0x17c)](_0x543443=>_0x543443[_0x3f3d92(0x19e)]===_0x3b908f);if(_0x2c9bdf)await _0x4bf59d[_0x3f3d92(0x22b)][_0x3f3d92(0x221)](_0x40b266['parentId'],_0x2c9bdf['id'],{'description':_0x1281d8[_0x3f3d92(0x19c)]||_0x3f3d92(0x1db)+_0x1713f5,'rule':_0xedda1a(_0x178229,!![]),'countPopulation':!![]}),_0x55421f=_0x2c9bdf['id'];else throw _0x21a160;}else throw _0x21a160;}return _0xa73651[_0x3f3d92(0x22f)][_0x3f3d92(0x1de)](_0x1713f5,_0x55421f),_0x252342[_0x3f3d92(0x1de)](_0x1713f5,_0x55421f),_0x55421f;},'resolveActivationId':async _0x5469db=>{const _0x5d5e84=_0x62cfa5,_0x2133b8=_0x231256['get'](_0x5469db);if(_0x2133b8)return _0x2133b8;if(_0x2fa15a[_0x5d5e84(0x17d)]){await _0x37daec();const _0x5d2b08=_0x231256[_0x5d5e84(0x1bd)](_0x5469db);if(_0x5d2b08)return _0x5d2b08;}throw new SDKError(ErrorCode[_0x5d5e84(0x232)],_0x5d5e84(0x1e4)+_0x5469db+_0x5d5e84(0x1ce)+_0x2fa15a[_0x5d5e84(0x181)][_0x5d5e84(0x19e)]+').\x20'+_0x5d5e84(0x1c3));},'resolveEmbeddedActivationId':async(_0x4a244d,_0x2bd862)=>{const _0x48df42=_0x62cfa5,_0xbe0339=_0x231256[_0x48df42(0x1bd)](_0x4a244d);if(_0xbe0339)return _0xbe0339;if(_0x2fa15a[_0x48df42(0x225)])return _0x28bbc1[_0x48df42(0x1de)](_0x4a244d,_0x2bd862),createPendingActivationId(_0x4a244d);if(_0x2fa15a['existingJourney']){await _0x37daec();const _0x1405a2=_0x231256[_0x48df42(0x1bd)](_0x2bd862['name']);if(_0x1405a2)return _0x231256[_0x48df42(0x1de)](_0x4a244d,_0x1405a2),_0x1405a2;const _0x316bc1=activationSignature(_0x2bd862),_0x3789c4=_0x355293?.[_0x48df42(0x1bd)](_0x316bc1);if(_0x3789c4)return _0x231256[_0x48df42(0x1de)](_0x4a244d,_0x3789c4),_0x3789c4;const _0x395cbc=await _0x3dba68(_0x2bd862,_0xa73651[_0x48df42(0x17e)]),_0x281bc8=await _0x4bf59d[_0x48df42(0x218)]['createActivation'](_0x2fa15a[_0x48df42(0x17d)]['id'],_0x395cbc);return _0x231256[_0x48df42(0x1de)](_0x4a244d,_0x281bc8['id']),_0x281bc8['id'];}throw new SDKError(ErrorCode[_0x48df42(0x23c)],_0x48df42(0x23b));},'resolveJourneyId':async _0x12ebd0=>{const _0x4d536d=_0x62cfa5;try{return await _0x4bf59d[_0x4d536d(0x218)][_0x4d536d(0x192)](_0x40b266[_0x4d536d(0x1ab)],_0x12ebd0);}catch(_0x4f7310){throw new SDKError(ErrorCode['NOT_FOUND'],_0x4d536d(0x212)+_0x12ebd0+_0x4d536d(0x219)+_0x2fa15a[_0x4d536d(0x181)]['name']+'\x27)',_0x4f7310);}},'resolveStageId':async(_0x17b2f1,_0x33d2ea)=>{const _0x13025b=_0x62cfa5,_0x318745=await _0x4bf59d[_0x13025b(0x218)][_0x13025b(0x1a9)](_0x17b2f1),_0x11e66a=_0x318745[_0x13025b(0x230)][_0x13025b(0x22e)]['find'](_0x4315c4=>_0x4315c4[_0x13025b(0x19e)]['toLowerCase']()===_0x33d2ea[_0x13025b(0x1b4)]());if(!_0x11e66a?.['id'])throw new SDKError(ErrorCode['NOT_FOUND'],_0x13025b(0x205)+_0x33d2ea+_0x13025b(0x1dc)+(_0x318745[_0x13025b(0x230)]['journeyBundleName']||_0x318745[_0x13025b(0x230)][_0x13025b(0x19e)])+'\x27');return _0x11e66a['id'];}},_0x103755=await _0x2aa6e5(_0x2fa15a[_0x62cfa5(0x181)],_0x40b266['parentId'],_0x569414),_0x94c81=_0x40b266[_0x62cfa5(0x229)]||_0x40b266['rootFolderId'];_0x94c81&&(_0x103755[_0x62cfa5(0x1d0)]={'parentFolder':{'data':{'id':_0x94c81,'type':_0x62cfa5(0x188)}}});if(_0x2fa15a['isNew']){if(_0x5b0044[_0x62cfa5(0x1c1)]>0x0||_0x28bbc1[_0x62cfa5(0x1c1)]>0x0)return await executeThreeStepJourneyCreate(_0x4bf59d,_0x2fa15a,_0x103755,{'pendingEmbeddedSegments':_0x5b0044,'pendingEmbeddedActivations':_0x28bbc1,'embeddedSegmentNameToId':_0x252342,'journeyActivationNameToId':_0x231256},{..._0x40b266,'effectiveFolderId':_0x94c81},_0xa73651,_0x5cf2f3,_0x54b520);else{ensureJourneyDefaults(_0x103755['attributes']);const _0x13aa00=await _0x4bf59d[_0x62cfa5(0x218)][_0x62cfa5(0x207)](_0x103755);return{'action':_0x62cfa5(0x1ac),'journeyId':_0x13aa00['id'],'embeddedSegmentNameToId':_0x252342};}}else{if(_0x2fa15a[_0x62cfa5(0x1fa)]&&_0x2fa15a['existingJourney'])return ensureJourneyDefaults(_0x103755[_0x62cfa5(0x230)]),await _0x4bf59d[_0x62cfa5(0x218)][_0x62cfa5(0x210)](_0x2fa15a[_0x62cfa5(0x17d)]['id'],_0x103755),{'action':'updated','journeyId':_0x2fa15a[_0x62cfa5(0x17d)]['id'],'embeddedSegmentNameToId':_0x252342};}return{'action':'unchanged','journeyId':_0x2fa15a[_0x62cfa5(0x17d)]?.['id'],'embeddedSegmentNameToId':_0x252342};}function findSegmentCriteriaLocation(_0x23b4cc,_0xf89e6a){const _0x3b6a82=a101_0x109af2,_0x40aee5=_0x23b4cc[_0x3b6a82(0x1f4)]||_0x23b4cc['journeys']?.[0x0]?.[_0x3b6a82(0x1f4)]||[];let _0x1a48cc=_0x3b6a82(0x252),_0x2879cc=_0xf89e6a;const _0x139dfb=_0x23b4cc[_0x3b6a82(0x180)]||_0x23b4cc[_0x3b6a82(0x186)]?.[0x0]?.[_0x3b6a82(0x180)];if(_0x139dfb?.[_0x3b6a82(0x22b)]===_0xf89e6a)return{'stageName':_0x3b6a82(0x180),'criteriaName':_0x139dfb[_0x3b6a82(0x19e)]||_0xf89e6a};_0x4bce79:for(const _0x25dccd of _0x40aee5){if(_0x25dccd[_0x3b6a82(0x253)]?.[_0x3b6a82(0x22b)]===_0xf89e6a){_0x1a48cc=_0x25dccd[_0x3b6a82(0x19e)],_0x2879cc=_0x25dccd[_0x3b6a82(0x253)][_0x3b6a82(0x19e)]||_0xf89e6a;break;}if(_0x25dccd[_0x3b6a82(0x216)])for(const _0x1002f0 of _0x25dccd[_0x3b6a82(0x216)]){if(_0x1002f0[_0x3b6a82(0x1b0)]==='decision_point'&&_0x1002f0[_0x3b6a82(0x23f)]?.['branches'])for(const _0x4ee642 of _0x1002f0[_0x3b6a82(0x23f)][_0x3b6a82(0x246)]){if(_0x4ee642[_0x3b6a82(0x22b)]===_0xf89e6a){_0x1a48cc=_0x25dccd[_0x3b6a82(0x19e)],_0x2879cc=_0x4ee642[_0x3b6a82(0x19e)]||_0xf89e6a;break _0x4bce79;}}}}return{'stageName':_0x1a48cc,'criteriaName':_0x2879cc};}async function executeThreeStepJourneyCreate(_0x4df074,_0x1b3041,_0x175e2a,_0x40d035,_0x5ad487,_0xa29d31,_0x5b4809,_0x11cdfb){const _0x308762=a101_0x109af2,{activationDefToCreateRequest:_0x8cef71,yamlRuleToApi:_0x98d49b}=_0x11cdfb,{pendingEmbeddedSegments:_0x39c123,pendingEmbeddedActivations:_0x56d35a,embeddedSegmentNameToId:_0x394abb}=_0x40d035,_0x4828d9=JSON['parse'](JSON[_0x308762(0x226)](_0x175e2a));ensureJourneyDefaults(_0x4828d9[_0x308762(0x230)]),stripPendingIds(_0x4828d9);const _0x3b807b=await _0x4df074[_0x308762(0x218)][_0x308762(0x207)](_0x4828d9),_0x58917b=_0x3b807b['id'],_0x3cf4ba=new Map();for(const _0x1c494b of _0x3b807b[_0x308762(0x230)][_0x308762(0x22e)]){_0x3cf4ba['set'](_0x1c494b['name'][_0x308762(0x1b4)](),_0x1c494b['id']);}for(const [_0x5b915f,{definition:_0x4161cc}]of _0x39c123){const _0x4a4179=generateDeterministicJourneySegmentName(_0x1b3041[_0x308762(0x181)][_0x308762(0x19e)],_0x5b915f);_0x5b4809[_0x308762(0x178)]?.({'type':_0x308762(0x20e),'journeyName':_0x1b3041['yamlConfig']['name'],'segmentName':_0x5b915f});const _0x7cefc=createSegmentIdResolver(_0xa29d31[_0x308762(0x22f)],_0x5b915f),_0x167499=await resolveRuleSegmentIds(_0x4161cc['rule'],_0x7cefc),_0x5eee43=await _0x4df074[_0x308762(0x22b)]['createJourneySegment']({'name':_0x4a4179,'description':_0x4161cc[_0x308762(0x19c)]||_0x308762(0x1db)+_0x5b915f,'journeyId':_0x58917b,'rule':_0x98d49b(_0x167499,!![]),'countPopulation':!![],'parentFolderId':_0x5ad487[_0x308762(0x248)]||'','audienceId':_0x5ad487[_0x308762(0x1ab)]});_0x394abb[_0x308762(0x1de)](_0x5b915f,_0x5eee43),_0xa29d31['segmentNameToId']['set'](_0x5b915f,_0x5eee43),_0x5b4809[_0x308762(0x178)]?.({'type':_0x308762(0x1bc),'journeyName':_0x1b3041[_0x308762(0x181)][_0x308762(0x19e)],'segmentName':_0x5b915f});}const _0x2f0ad2=new Map();for(const [_0x344c6a,_0xdae58b]of _0x56d35a){_0x5b4809['onProgress']?.({'type':'embedded_activation_creating','journeyName':_0x1b3041[_0x308762(0x181)][_0x308762(0x19e)],'activationName':_0x344c6a});const _0x10072d=await _0x8cef71(_0xdae58b,_0xa29d31[_0x308762(0x17e)]),_0xd75cbc=await _0x4df074['journey'][_0x308762(0x234)](_0x58917b,_0x10072d);_0x2f0ad2[_0x308762(0x1de)](_0x344c6a,_0xd75cbc['id']),_0x40d035[_0x308762(0x223)]['set'](_0x344c6a,_0xd75cbc['id']),_0x5b4809[_0x308762(0x178)]?.({'type':'embedded_activation_created','journeyName':_0x1b3041[_0x308762(0x181)]['name'],'activationName':_0x344c6a});}const _0x4b4ebe=JSON[_0x308762(0x250)](JSON['stringify'](_0x175e2a));return _0x4b4ebe['id']=_0x58917b,ensureJourneyDefaults(_0x4b4ebe['attributes']),resolvePendingIdsInRequest(_0x4b4ebe,_0x175e2a,_0x3cf4ba,_0x394abb,_0x2f0ad2,_0x5b4809),await _0x4df074[_0x308762(0x218)][_0x308762(0x210)](_0x58917b,_0x4b4ebe),{'action':'created','journeyId':_0x58917b,'embeddedSegmentNameToId':_0x394abb};}function stripPendingIds(_0x433082){const _0x16687f=a101_0x109af2;for(const _0x5a7539 of _0x433082[_0x16687f(0x230)][_0x16687f(0x22e)]||[]){_0x5a7539['entryCriteria']?.[_0x16687f(0x24e)]&&isPendingSegmentId(_0x5a7539['entryCriteria'][_0x16687f(0x24e)])&&delete _0x5a7539[_0x16687f(0x239)];if(_0x5a7539['steps'])for(const _0x4c642d of Object['keys'](_0x5a7539['steps'])){const _0x455f8f=_0x5a7539[_0x16687f(0x216)][_0x4c642d];_0x455f8f[_0x16687f(0x1b0)]===_0x16687f(0x208)&&_0x455f8f[_0x16687f(0x23e)]&&isPendingActivationId(_0x455f8f[_0x16687f(0x23e)])&&(_0x455f8f[_0x16687f(0x23e)]='');if(_0x455f8f[_0x16687f(0x1b0)]===_0x16687f(0x1b3)&&_0x455f8f['branches'])for(const _0x4ec413 of _0x455f8f[_0x16687f(0x246)]){_0x4ec413[_0x16687f(0x24e)]&&isPendingSegmentId(_0x4ec413[_0x16687f(0x24e)])&&(_0x4ec413[_0x16687f(0x24e)]='');}_0x455f8f[_0x16687f(0x1b0)]===_0x16687f(0x1f2)&&_0x455f8f[_0x16687f(0x1c2)]?.[_0x16687f(0x24e)]&&isPendingSegmentId(_0x455f8f['waitCondition']['segmentId'])&&(_0x455f8f[_0x16687f(0x1c2)][_0x16687f(0x24e)]='');}}}function resolvePendingIdsInRequest(_0x4644f2,_0x425fe5,_0x29f19d,_0x322be1,_0xdaf25,_0x296a89){const _0x4e21b2=a101_0x109af2,_0x4d191a=(_0x24beba,_0x4382fc)=>{const _0x26e97f=a101_0x383a;if(!isPendingSegmentId(_0x24beba))return _0x24beba;const _0x88a564=extractPendingSegmentName(_0x24beba),_0xb30bc8=_0x322be1['get'](_0x88a564);return!_0xb30bc8&&_0x296a89[_0x26e97f(0x18c)]?.(_0x26e97f(0x1c4)+_0x88a564+_0x26e97f(0x1f1)+_0x4382fc),_0xb30bc8;};if(_0x4644f2[_0x4e21b2(0x230)][_0x4e21b2(0x180)]?.[_0x4e21b2(0x24e)]&&isPendingSegmentId(_0x4644f2[_0x4e21b2(0x230)][_0x4e21b2(0x180)][_0x4e21b2(0x24e)])){const _0x3af999=_0x4d191a(_0x4644f2[_0x4e21b2(0x230)][_0x4e21b2(0x180)][_0x4e21b2(0x24e)],_0x4e21b2(0x20d));_0x3af999&&(_0x4644f2['attributes'][_0x4e21b2(0x180)][_0x4e21b2(0x24e)]=_0x3af999);}for(const _0x32dcef of _0x4644f2[_0x4e21b2(0x230)][_0x4e21b2(0x22e)]||[]){const _0x449d99=_0x29f19d[_0x4e21b2(0x1bd)](_0x32dcef[_0x4e21b2(0x19e)][_0x4e21b2(0x1b4)]());_0x449d99&&(_0x32dcef['id']=_0x449d99);if(_0x32dcef[_0x4e21b2(0x239)]?.['segmentId']&&isPendingSegmentId(_0x32dcef['entryCriteria'][_0x4e21b2(0x24e)])){const _0x400fb9=_0x4d191a(_0x32dcef['entryCriteria']['segmentId'],_0x4e21b2(0x21c)+_0x32dcef[_0x4e21b2(0x19e)]+'\x27\x20entry\x20criteria');_0x400fb9&&(_0x32dcef[_0x4e21b2(0x239)]['segmentId']=_0x400fb9);}if(_0x32dcef[_0x4e21b2(0x1c6)])for(const _0x5d8b82 of _0x32dcef['exitCriterias']){if(_0x5d8b82['segmentId']&&isPendingSegmentId(_0x5d8b82['segmentId'])){const _0x55a0b2=_0x4d191a(_0x5d8b82['segmentId'],'stage\x20\x27'+_0x32dcef[_0x4e21b2(0x19e)]+_0x4e21b2(0x214));_0x55a0b2&&(_0x5d8b82[_0x4e21b2(0x24e)]=_0x55a0b2);}}if(_0x32dcef['milestone']?.['segmentId']&&isPendingSegmentId(_0x32dcef[_0x4e21b2(0x18d)][_0x4e21b2(0x24e)])){const _0x1cb915=_0x4d191a(_0x32dcef['milestone'][_0x4e21b2(0x24e)],_0x4e21b2(0x21c)+_0x32dcef[_0x4e21b2(0x19e)]+_0x4e21b2(0x194));_0x1cb915&&(_0x32dcef[_0x4e21b2(0x18d)][_0x4e21b2(0x24e)]=_0x1cb915);}if(_0x32dcef['steps']){const _0x532798=_0x4b3053=>_0x425fe5[_0x4e21b2(0x230)][_0x4e21b2(0x22e)][_0x4e21b2(0x17c)](_0x33959e=>_0x33959e['name']['toLowerCase']()===_0x32dcef[_0x4e21b2(0x19e)][_0x4e21b2(0x1b4)]())?.[_0x4e21b2(0x216)]?.[_0x4b3053];for(const _0x4b2c6e of Object[_0x4e21b2(0x1f0)](_0x32dcef[_0x4e21b2(0x216)])){const _0xa36b1c=_0x32dcef[_0x4e21b2(0x216)][_0x4b2c6e],_0x192130=_0x532798(_0x4b2c6e);if(_0xa36b1c['type']===_0x4e21b2(0x208)&&_0xa36b1c[_0x4e21b2(0x23e)]&&(isPendingActivationId(_0xa36b1c[_0x4e21b2(0x23e)])||_0xa36b1c[_0x4e21b2(0x23e)]==='')){if(_0x192130?.[_0x4e21b2(0x23e)]&&isPendingActivationId(_0x192130[_0x4e21b2(0x23e)])){const _0x5e0317=extractPendingActivationName(_0x192130['journeyActivationStepId']),_0x5c21bb=_0xdaf25[_0x4e21b2(0x1bd)](_0x5e0317);_0x5c21bb&&(_0xa36b1c[_0x4e21b2(0x23e)]=_0x5c21bb);}}if(_0xa36b1c[_0x4e21b2(0x1b0)]===_0x4e21b2(0x1b3)&&_0xa36b1c[_0x4e21b2(0x246)]&&_0x192130?.[_0x4e21b2(0x246)])for(let _0x579a46=0x0;_0x579a46<_0xa36b1c[_0x4e21b2(0x246)][_0x4e21b2(0x242)];_0x579a46++){const _0x3df8ae=_0xa36b1c[_0x4e21b2(0x246)][_0x579a46],_0x3e494e=_0x192130['branches'][_0x579a46];if(_0x3e494e?.[_0x4e21b2(0x24e)]&&isPendingSegmentId(_0x3e494e[_0x4e21b2(0x24e)])){const _0x4887d2=_0x4d191a(_0x3e494e[_0x4e21b2(0x24e)],_0x4e21b2(0x21c)+_0x32dcef[_0x4e21b2(0x19e)]+_0x4e21b2(0x1cb)+(_0x3df8ae[_0x4e21b2(0x19e)]||_0x579a46)+'\x27');_0x4887d2&&(_0x3df8ae[_0x4e21b2(0x24e)]=_0x4887d2);}}if(_0xa36b1c[_0x4e21b2(0x1b0)]==='WaitStep'&&_0xa36b1c[_0x4e21b2(0x1c2)]?.['segmentId']&&_0x192130?.['waitCondition']?.[_0x4e21b2(0x24e)]&&isPendingSegmentId(_0x192130[_0x4e21b2(0x1c2)][_0x4e21b2(0x24e)])){const _0x394f8d=_0x4d191a(_0x192130['waitCondition'][_0x4e21b2(0x24e)],_0x4e21b2(0x21c)+_0x32dcef[_0x4e21b2(0x19e)]+_0x4e21b2(0x190));_0x394f8d&&(_0xa36b1c[_0x4e21b2(0x1c2)][_0x4e21b2(0x24e)]=_0x394f8d);}}}}}
|
|
1
|
+
const a101_0x152b06=a101_0x1e36;(function(_0x58327e,_0x54ddfb){const _0x311a2d=a101_0x1e36,_0x578c8c=_0x58327e();while(!![]){try{const _0x1547ba=-parseInt(_0x311a2d(0x1a9))/0x1+parseInt(_0x311a2d(0xfc))/0x2*(parseInt(_0x311a2d(0x132))/0x3)+-parseInt(_0x311a2d(0x146))/0x4*(-parseInt(_0x311a2d(0x199))/0x5)+-parseInt(_0x311a2d(0x1a5))/0x6*(-parseInt(_0x311a2d(0x18c))/0x7)+parseInt(_0x311a2d(0x14c))/0x8*(-parseInt(_0x311a2d(0xe8))/0x9)+-parseInt(_0x311a2d(0x186))/0xa*(-parseInt(_0x311a2d(0x156))/0xb)+parseInt(_0x311a2d(0x163))/0xc;if(_0x1547ba===_0x54ddfb)break;else _0x578c8c['push'](_0x578c8c['shift']());}catch(_0x21be8f){_0x578c8c['push'](_0x578c8c['shift']());}}}(a101_0x4b5d,0xb3759));import{createHash}from'crypto';export const PENDING_SEGMENT_PREFIX=a101_0x152b06(0xf9);export const PENDING_ACTIVATION_PREFIX=a101_0x152b06(0x18d);export function createPendingSegmentId(_0x4bec63){return''+PENDING_SEGMENT_PREFIX+_0x4bec63+'__';}export function isPendingSegmentId(_0x452fe8){const _0x4fd772=a101_0x152b06;return _0x452fe8[_0x4fd772(0x1c7)](PENDING_SEGMENT_PREFIX);}export function extractPendingSegmentName(_0x5987be){return _0x5987be['replace'](/^__pending_(.+)__$/,'$1');}export function createPendingActivationId(_0xe05f2){return''+PENDING_ACTIVATION_PREFIX+_0xe05f2+'__';}export function isPendingActivationId(_0xe2796a){const _0x7a0bbe=a101_0x152b06;return _0xe2796a[_0x7a0bbe(0x1c7)](PENDING_ACTIVATION_PREFIX);}export function extractPendingActivationName(_0xedd61f){const _0x45d4bb=a101_0x152b06;return _0xedd61f[_0x45d4bb(0x187)](/^__pending_act_(.+)__$/,'$1');}function generateDeterministicJourneySegmentName(_0x462748,_0x3d4516){const _0x3b681e=a101_0x152b06,_0x2f41fc=_0x462748+'::'+(_0x3d4516['trim']()||'segment'),_0x489931=createHash(_0x3b681e(0x1c2))[_0x3b681e(0x188)](_0x2f41fc)[_0x3b681e(0x12f)](_0x3b681e(0x130))['slice'](0x0,0xc);return _0x3b681e(0x14e)+_0x489931;}export function ensureJourneyDefaults(_0x13cb40){const _0x256cc9=a101_0x152b06;!_0x13cb40[_0x256cc9(0xf2)]&&(_0x13cb40['description']=''),!_0x13cb40[_0x256cc9(0x148)]&&(_0x13cb40[_0x256cc9(0x148)]=_0x256cc9(0x15f));}export function resolveTDFolderPath(_0x45bb38,_0x180ada,_0x1b5df8){if(!_0x180ada)return _0x45bb38;if(_0x45bb38===_0x1b5df8||_0x45bb38['startsWith'](_0x1b5df8+'/'))return _0x45bb38;return _0x45bb38?_0x1b5df8+'/'+_0x45bb38:_0x1b5df8;}export function addFoldersToCreate(_0x481e25,_0x346799,_0x1a57a7){const _0xf01ebf=a101_0x152b06;if(!_0x481e25)return;if(_0x346799['has'](_0x481e25))return;const _0x54b1a4=_0x481e25[_0xf01ebf(0x13f)]('/');let _0x2938da='';for(const _0x1157cc of _0x54b1a4){_0x2938da=_0x2938da?_0x2938da+'/'+_0x1157cc:_0x1157cc,!_0x346799[_0xf01ebf(0x193)](_0x2938da)&&_0x1a57a7[_0xf01ebf(0x139)](_0x2938da);}}import*as a101_0x2a924c from'yaml';import{readFileSync}from'fs';import a101_0x5b2ffe from'path';import{isJourneyDef,parseYamlString as a101_0x490132,toYamlString as a101_0x2315d0,normalizeJourneyDef,hasMultipleVersions,journeyResponseToDef,collectSegmentIdsFromJourneyApi}from'./journey-yaml.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,createJumpTargetCache,resolveJumpTarget,buildMergedJourneyDef,buildLocalRuleToNameMappingFromJourney,collectSegmentUsageCounts}from'./journey-utils.js';import{activationResponseToDef,segmentToYamlString,segmentWithActivationsToYaml,parseSegmentYamlFile,normalizeChildSegmentYaml,apiRuleToYaml,yamlRuleToApi,serializeExpandedRule,collectSegmentRefsFromRule,resolveRuleSegmentRefs,resolveRuleSegmentIds,journeyActivationStepToYaml}from'./child-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{batchAsync}from'../../utils/async.js';import{buildFolderMaps}from'./resolution-context.js';import{SDKError,ErrorCode,isHttp400Error,getErrorMessage}from'../errors.js';import{validateSegmentDef,validateJourneyDef,formatValidationResult}from'./yaml-validator.js';function stableStringify(_0x27e317){const _0x45e778=a101_0x152b06;if(Array[_0x45e778(0x12b)](_0x27e317))return'['+_0x27e317[_0x45e778(0x179)](_0x17ec55=>stableStringify(_0x17ec55))[_0x45e778(0x12d)](',')+']';if(_0x27e317&&typeof _0x27e317==='object'){const _0x20a74d=_0x27e317,_0xdfc49f=Object[_0x45e778(0x11b)](_0x20a74d)[_0x45e778(0x142)](),_0x4e539e=_0xdfc49f[_0x45e778(0x179)](_0x3c301e=>'\x22'+_0x3c301e+'\x22:'+stableStringify(_0x20a74d[_0x3c301e]));return'{'+_0x4e539e[_0x45e778(0x12d)](',')+'}';}const _0x21303d=JSON['stringify'](_0x27e317);return _0x21303d===undefined?_0x45e778(0x154):_0x21303d;}function activationSignature(_0x2cd52e){const _0x5a9872=a101_0x152b06,_0x52c777={'connection':_0x2cd52e[_0x5a9872(0x164)],..._0x2cd52e['all_columns']!==undefined&&{'all_columns':_0x2cd52e[_0x5a9872(0x14f)]},..._0x2cd52e[_0x5a9872(0x160)]!==undefined&&{'columns':_0x2cd52e[_0x5a9872(0x160)]},..._0x2cd52e['behavior']!==undefined&&{'behavior':_0x2cd52e['behavior']},..._0x2cd52e[_0x5a9872(0x134)]!==undefined&&{'schedule':_0x2cd52e[_0x5a9872(0x134)]},..._0x2cd52e['notification']!==undefined&&{'notification':_0x2cd52e[_0x5a9872(0x14a)]},..._0x2cd52e[_0x5a9872(0x1b0)]!==undefined&&{'connector_config':_0x2cd52e[_0x5a9872(0x1b0)]},..._0x2cd52e['activation_template_id']!==undefined&&{'activation_template_id':_0x2cd52e[_0x5a9872(0x198)]}};return stableStringify(_0x52c777);}export async function prepareSegmentFiles(_0x2486fe,_0x11597d,_0x103cb,_0x467f00,_0x3ccf70){const _0x36ed45=a101_0x152b06,{activationDefToCreateRequest:_0x63fbe6}=await import('./child-segment-yaml.js'),_0xca6c9f=[],_0x20a86c=new Set();for(const {yamlConfig:_0xba6a2e,folderPath:_0x2d2239,sourcePath:_0x420e39}of _0x2486fe){const _0x5f4c73=resolveTDFolderPath(_0x2d2239,_0x467f00,_0x3ccf70),_0xb97dee=_0x5f4c73+':'+_0xba6a2e[_0x36ed45(0x143)],_0x374cb8=_0x11597d['segmentByFolderAndName']['get'](_0xb97dee),_0xb6c52b=_0x374cb8?_0x11597d[_0x36ed45(0xea)][_0x36ed45(0x174)](_0x374cb8['id'])||[]:[];addFoldersToCreate(_0x5f4c73,_0x11597d[_0x36ed45(0x14d)],_0x20a86c);const _0x212dde=calculateActivationActions(_0xba6a2e[_0x36ed45(0x147)]||[],_0xb6c52b,_0x11597d[_0x36ed45(0xff)],_0x11597d[_0x36ed45(0x19f)]);for(const _0x254211 of _0x212dde){(_0x254211[_0x36ed45(0xe7)]==='create'||_0x254211[_0x36ed45(0xe7)]===_0x36ed45(0x188))&&_0x254211['yamlActivation']&&(_0x254211['validatedRequest']=await _0x63fbe6(_0x254211[_0x36ed45(0xec)],_0x103cb));}const _0x438d52=calculateSegmentDiff(_0xba6a2e,_0x374cb8,_0xb6c52b,_0x11597d[_0x36ed45(0xff)],_0x11597d[_0x36ed45(0x19f)]);_0xca6c9f[_0x36ed45(0x116)]({'relativePath':_0xba6a2e[_0x36ed45(0x143)],'absolutePath':_0x420e39,'yamlConfig':_0xba6a2e,'folderPath':_0x5f4c73,'existingSegment':_0x374cb8,'existingActivations':_0xb6c52b,'isNew':_0x438d52['isNew'],'hasChanges':_0x438d52[_0x36ed45(0xde)],'diff':_0x438d52[_0x36ed45(0x189)],'activationActions':_0x212dde});}return{'segmentFiles':_0xca6c9f,'foldersToCreate':_0x20a86c};}export async function prepareJourneyFiles(_0x41907f,_0x2b9e1d,_0x454b9c,_0x5163b1){const _0x328f2b=a101_0x152b06,_0xd6a86c=[],_0x21de3d=new Set();for(const {yamlConfig:_0x588cba,folderPath:_0x504072,sourcePath:_0x1db779}of _0x41907f){const _0x57ff8f=resolveTDFolderPath(_0x504072,_0x454b9c,_0x5163b1),_0x4ac0f5=_0x57ff8f+':'+_0x588cba[_0x328f2b(0x143)],_0x43a436=_0x2b9e1d[_0x328f2b(0x185)]['get'](_0x4ac0f5);let _0xeda00f,_0x44b2f5;if(_0x43a436&&_0x43a436[_0x328f2b(0x127)]>0x0){const _0x3ac226=buildLocalExpandedRuleMappings(_0x588cba),{createYamlContext:_0x43ff0c,prefetchJourneySegments:_0x10160f}=createPushYamlContextForBundle(_0x2b9e1d['deps'],_0x2b9e1d[_0x328f2b(0x1c5)],_0x2b9e1d[_0x328f2b(0x192)],_0x3ac226,_0x2b9e1d[_0x328f2b(0xff)],_0x2b9e1d[_0x328f2b(0x19f)],_0x2b9e1d['activationStepsById'],_0x2b9e1d[_0x328f2b(0x13c)]);await _0x10160f(_0x43a436[_0x328f2b(0x179)](_0x1f34ca=>_0x1f34ca['id']));const _0x398463=hasMultipleVersions(_0x588cba),_0x4b385a=async _0x4a1f9a=>{const _0x23bbc9=_0x328f2b,_0x15a55d=_0x2b9e1d[_0x23bbc9(0x13c)]?.[_0x23bbc9(0x174)](_0x4a1f9a);if(_0x15a55d)return _0x15a55d;return _0x2b9e1d[_0x23bbc9(0x1a1)]({'journeyId':_0x4a1f9a,'journeyName':_0x588cba[_0x23bbc9(0x143)],'isMultiVersion':_0x43a436['length']>0x1});};if(_0x398463&&_0x43a436['length']>0x1){const _0x2d02b9=[];for(const _0x370340 of _0x43a436){const _0x14dec2=_0x370340[_0x328f2b(0x1b4)]||0x1;_0x2b9e1d[_0x328f2b(0x12e)]?.[_0x328f2b(0x188)]('Fetching\x20'+_0x588cba[_0x328f2b(0x143)]+'\x20v'+_0x14dec2);const _0x31ed32=await _0x4b385a(_0x370340['id']),_0x14638b=_0x43ff0c(_0x370340['id']),_0x12e6d0=await journeyResponseToDef(_0x31ed32,_0x14638b);_0x2d02b9[_0x328f2b(0x116)]({'item':_0x370340,'yaml':_0x12e6d0});}const _0x254e18=buildLocalRuleToNameMappingFromJourney(_0x588cba);_0x44b2f5=buildMergedJourneyDef(_0x2d02b9,_0x254e18);const _0x37d535=Math[_0x328f2b(0xf6)](..._0x2d02b9[_0x328f2b(0x179)](_0x3a866c=>_0x3a866c[_0x328f2b(0xeb)][_0x328f2b(0x1b4)]||0x0)),_0x3c37ba=_0x43a436[_0x328f2b(0x151)](_0x1a3ee4=>(_0x1a3ee4[_0x328f2b(0x1b4)]||0x0)===_0x37d535);_0x3c37ba&&(_0x2b9e1d['progress']?.[_0x328f2b(0x188)](_0x328f2b(0x120)+_0x588cba[_0x328f2b(0x143)]+'\x20v'+_0x37d535),_0xeda00f=await _0x4b385a(_0x3c37ba['id']));}else{const _0x224e9a=_0x43a436[_0x43a436['length']-0x1];_0x2b9e1d['progress']?.[_0x328f2b(0x188)](_0x328f2b(0x120)+_0x588cba[_0x328f2b(0x143)]),_0xeda00f=await _0x4b385a(_0x224e9a['id']);const _0x307096=_0x43ff0c(_0x224e9a['id']),_0x57e0dd=await journeyResponseToDef(_0xeda00f,_0x307096),_0x22cdfd=buildLocalRuleToNameMappingFromJourney(_0x588cba);_0x44b2f5=buildMergedJourneyDef([{'item':_0x224e9a,'yaml':_0x57e0dd}],_0x22cdfd);}}addFoldersToCreate(_0x57ff8f,_0x2b9e1d['folderPathToId'],_0x21de3d);const _0x6f62f4=calculateJourneyDiff(_0x588cba,_0x44b2f5);_0xd6a86c['push']({'relativePath':_0x588cba['name'],'absolutePath':_0x1db779,'yamlConfig':_0x588cba,'folderPath':_0x57ff8f,'existingJourney':_0xeda00f,'isNew':_0x6f62f4[_0x328f2b(0x19b)],'hasChanges':_0x6f62f4[_0x328f2b(0xde)],'diff':_0x6f62f4[_0x328f2b(0x189)]});}return{'journeyFiles':_0xd6a86c,'foldersToCreate':_0x21de3d};}export function calculateActivationActions(_0x3f8fc3,_0x5c9b3a,_0x5de8ce,_0x2d9292){const _0x3eadeb=a101_0x152b06,_0x126281=[],_0x47b2c8=new Map();for(const _0x516d89 of _0x5c9b3a){_0x47b2c8[_0x3eadeb(0x1c4)](_0x516d89[_0x3eadeb(0x143)],_0x516d89);}const _0x1605a5=new Map();for(const _0x25559f of _0x3f8fc3){_0x1605a5['set'](_0x25559f[_0x3eadeb(0x143)],_0x25559f);}for(const _0x429ed4 of _0x3f8fc3){const _0x2f4513=_0x47b2c8['get'](_0x429ed4['name']);if(!_0x2f4513)_0x126281[_0x3eadeb(0x116)]({'type':_0x3eadeb(0x1c1),'name':_0x429ed4[_0x3eadeb(0x143)],'yamlActivation':_0x429ed4});else{const _0x8a8acb=activationResponseToDef(_0x2f4513,_0x5de8ce,_0x2d9292),_0x51927d=a101_0x2a924c[_0x3eadeb(0x129)](_0x8a8acb),_0x45b406=a101_0x2a924c['stringify'](_0x429ed4);_0x51927d!==_0x45b406&&_0x126281[_0x3eadeb(0x116)]({'type':_0x3eadeb(0x188),'name':_0x429ed4[_0x3eadeb(0x143)],'yamlActivation':_0x429ed4,'existingActivation':_0x2f4513});}}for(const _0x58a11e of _0x5c9b3a){!_0x1605a5['has'](_0x58a11e['name'])&&_0x126281[_0x3eadeb(0x116)]({'type':_0x3eadeb(0x15c),'name':_0x58a11e['name'],'existingActivation':_0x58a11e});}return _0x126281;}export function calculateSegmentDiff(_0x2f890d,_0x167eeb,_0xcfde07,_0x1b0088,_0x522d94){const _0x1e68f5=segmentToYamlString(_0x2f890d);if(_0x167eeb){const _0x56d894=segmentWithActivationsToYaml(_0x167eeb,_0xcfde07,undefined,_0x1b0088,_0x522d94),_0x23393d=segmentToYamlString(_0x56d894),_0x4effe7=generateDiff(_0x23393d,_0x1e68f5),_0x2b98e6=hasChanges(_0x4effe7);return{'isNew':![],'hasChanges':_0x2b98e6,'diff':_0x2b98e6?formatDiffWithColors(_0x4effe7):undefined};}const _0x140620=generateDiff('',_0x1e68f5);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x140620)};}export function calculateJourneyDiff(_0x391dc9,_0x513c13){const _0x45fc99=normalizeJourneyDef(_0x391dc9,_0x391dc9),_0x5cae89=a101_0x2315d0(_0x45fc99);if(_0x513c13){const _0x550ffc=normalizeJourneyDef(_0x513c13,_0x391dc9),_0x430714=a101_0x2315d0(_0x550ffc),_0xa381a7=generateDiff(_0x430714,_0x5cae89),_0x8ea8fd=hasChanges(_0xa381a7);return{'isNew':![],'hasChanges':_0x8ea8fd,'diff':_0x8ea8fd?formatDiffWithColors(_0xa381a7):undefined};}const _0x1ba76d=generateDiff('',_0x5cae89);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x1ba76d)};}export function findSegmentsToDelete(_0x55dce1,_0x5e61d5,_0x49c5c0,_0x47fa2d,_0x3a295b){const _0x2ac365=a101_0x152b06,_0x355e4e=new Set();for(const {yamlConfig:_0x362cd2,folderPath:_0xdba951}of _0x5e61d5){_0x355e4e[_0x2ac365(0x139)](_0xdba951+':'+_0x362cd2[_0x2ac365(0x143)]);}return _0x55dce1['filter'](_0x27769c=>{const _0x5051f1=_0x2ac365,_0x25a83e=_0x27769c[_0x5051f1(0x190)]?_0x49c5c0[_0x5051f1(0x174)](_0x27769c['segmentFolderId']['toString']())||'':'',_0x2c5a04=_0x25a83e+':'+_0x27769c[_0x5051f1(0x143)];if(_0x355e4e[_0x5051f1(0x193)](_0x2c5a04))return![];if(_0x3a295b)return _0x25a83e===_0x47fa2d||_0x25a83e[_0x5051f1(0x1c7)](_0x47fa2d+'/');return!![];});}export function findJourneysToDelete(_0x360893,_0xdef735,_0x229c28,_0x4542be,_0x5c030){const _0x269f29=a101_0x152b06,_0x3e529b=new Set();for(const {yamlConfig:_0x355369,folderPath:_0x319b95}of _0xdef735){_0x3e529b[_0x269f29(0x139)](_0x319b95+':'+_0x355369['name']);}return _0x360893[_0x269f29(0x150)](_0x3999ac=>{const _0x43fcd5=_0x269f29,_0xdff9c=_0x3999ac['folderId']?_0x229c28[_0x43fcd5(0x174)](_0x3999ac[_0x43fcd5(0xf7)])||'':'',_0x1b54c4=_0xdff9c+':'+_0x3999ac['journeyBundleName'];if(_0x3e529b[_0x43fcd5(0x193)](_0x1b54c4))return![];if(_0x5c030)return _0xdff9c===_0x4542be||_0xdff9c[_0x43fcd5(0x1c7)](_0x4542be+'/');return!![];});}export function buildSegmentLookupMap(_0x96f0ed,_0x572cba){const _0x294faf=a101_0x152b06,_0x412a75=new Map();for(const _0x51fde2 of _0x96f0ed){const _0x4b53ef=_0x51fde2['segmentFolderId']?_0x572cba[_0x294faf(0x174)](_0x51fde2[_0x294faf(0x190)][_0x294faf(0x167)]())||'':'',_0x8535a0=_0x4b53ef+':'+_0x51fde2[_0x294faf(0x143)];_0x412a75[_0x294faf(0x1c4)](_0x8535a0,_0x51fde2);}return _0x412a75;}export function buildSegmentNameToIdMap(_0x2567b2){const _0x3852ea=a101_0x152b06,_0x5c62da=new Map();for(const _0x53a3a3 of _0x2567b2){_0x5c62da[_0x3852ea(0x1c4)](_0x53a3a3[_0x3852ea(0x143)],_0x53a3a3['id']);}return _0x5c62da;}export function buildJourneyBundleLookupMap(_0x45713b,_0x497190){const _0x3b0ca5=a101_0x152b06,_0x91c8b4=new Map();for(const _0x229019 of _0x45713b){const _0x101004=_0x229019[_0x3b0ca5(0xf7)]?_0x497190['get'](_0x229019['folderId'])||'':'',_0x4c8045=_0x101004+':'+_0x229019[_0x3b0ca5(0x1b3)];!_0x91c8b4[_0x3b0ca5(0x193)](_0x4c8045)&&_0x91c8b4[_0x3b0ca5(0x1c4)](_0x4c8045,[]),_0x91c8b4[_0x3b0ca5(0x174)](_0x4c8045)['push'](_0x229019);}for(const _0xf69a08 of _0x91c8b4['values']()){_0xf69a08[_0x3b0ca5(0x142)]((_0x52e597,_0x5111ce)=>(_0x52e597[_0x3b0ca5(0x1b4)]||0x0)-(_0x5111ce[_0x3b0ca5(0x1b4)]||0x0));}return _0x91c8b4;}export function collectFoldersToCreate(_0x3ad54c,_0x8839c4){const _0x122c5c=a101_0x152b06,_0x4b3ce5=new Set();for(const _0x2f8ffa of _0x3ad54c){if(!_0x2f8ffa)continue;if(_0x8839c4[_0x122c5c(0x193)](_0x2f8ffa))continue;const _0x1369de=_0x2f8ffa[_0x122c5c(0x13f)]('/');let _0x3cb590='';for(const _0xe10700 of _0x1369de){_0x3cb590=_0x3cb590?_0x3cb590+'/'+_0xe10700:_0xe10700,!_0x8839c4[_0x122c5c(0x193)](_0x3cb590)&&_0x4b3ce5[_0x122c5c(0x139)](_0x3cb590);}}return _0x4b3ce5;}export function parseAndClassifyYamlFiles(_0x241a22,_0x589091,_0x228a19){const _0xe9a433=a101_0x152b06,_0x5bf58e=[],_0x5d1c9c=[];for(const _0x13eb33 of _0x241a22){const _0x28cfe2=a101_0x5b2ffe[_0xe9a433(0x15a)](_0x589091,a101_0x5b2ffe[_0xe9a433(0xf8)](_0x13eb33)),_0x4cbc3c=_0x28cfe2==='.'?'':_0x28cfe2,_0x46a611=readFileSync(_0x13eb33,_0xe9a433(0xe1)),_0xd72f52=a101_0x2a924c['parse'](_0x46a611);if(isJourneyDef(_0xd72f52)){const _0x3f2e75=a101_0x490132(_0x46a611);_0x5d1c9c['push']({'yamlConfig':_0x3f2e75,'folderPath':_0x4cbc3c,'sourcePath':_0x13eb33});}else{if(!_0x228a19?.[_0xe9a433(0x131)]){const _0x496b10=parseSegmentYamlFile(_0x46a611),_0x4b722f=normalizeChildSegmentYaml(_0x496b10);_0x5bf58e[_0xe9a433(0x116)]({'yamlConfig':_0x4b722f,'folderPath':_0x4cbc3c,'sourcePath':_0x13eb33});}}}return{'segments':_0x5bf58e,'journeys':_0x5d1c9c};}export function validateParsedFiles(_0x281f4f,_0x19096e){const _0x16b139=a101_0x152b06,_0x4c46ff=[];for(const {yamlConfig:_0x2a5473,sourcePath:_0x1232cf}of _0x281f4f['segments']){const _0x4e4e6e=readFileSync(_0x1232cf,_0x16b139(0xe1)),_0x11552f=a101_0x2a924c[_0x16b139(0x162)](_0x4e4e6e),_0x1eaf13=validateSegmentDef(_0x2a5473,{'source':_0x4e4e6e,'document':_0x11552f});if(!_0x1eaf13[_0x16b139(0x112)]){const _0x45062e=a101_0x5b2ffe[_0x16b139(0x15a)](_0x19096e,_0x1232cf);_0x4c46ff[_0x16b139(0x116)]({'filePath':_0x45062e,'source':_0x4e4e6e,'result':_0x1eaf13,'isJourney':![]});}}for(const {yamlConfig:_0x5929f5,sourcePath:_0x462d46}of _0x281f4f[_0x16b139(0x18f)]){const _0x39b666=readFileSync(_0x462d46,'utf-8'),_0x399d39=a101_0x2a924c[_0x16b139(0x162)](_0x39b666),_0x2f26f3=validateJourneyDef(_0x5929f5,{'source':_0x39b666,'document':_0x399d39});if(!_0x2f26f3['valid']){const _0x2d8d09=a101_0x5b2ffe[_0x16b139(0x15a)](_0x19096e,_0x462d46);_0x4c46ff[_0x16b139(0x116)]({'filePath':_0x2d8d09,'source':_0x39b666,'result':_0x2f26f3,'isJourney':!![]});}}return _0x4c46ff;}function a101_0x1e36(_0x6acb05,_0x3ecde1){_0x6acb05=_0x6acb05-0xde;const _0x4b5d73=a101_0x4b5d();let _0x1e3680=_0x4b5d73[_0x6acb05];return _0x1e3680;}export function formatValidationErrors(_0x554db0){const _0x4e70fc=a101_0x152b06,_0x8720bf=[];for(const {filePath:_0x3eff3b,source:_0x280845,result:_0x155302,isJourney:_0x10d701}of _0x554db0){const _0x150ba9=_0x10d701?'journey':'segment';_0x8720bf['push']('\x0a'+_0x3eff3b+'\x20('+_0x150ba9+_0x4e70fc(0x149)+_0x155302[_0x4e70fc(0x166)][_0x4e70fc(0x127)]+_0x4e70fc(0x177)),_0x8720bf[_0x4e70fc(0x116)](formatValidationResult(_0x155302,_0x280845,_0x3eff3b));}return _0x8720bf['join']('\x0a');}export function buildLocalExpandedRuleMappings(_0x42a367){const _0x24699b=a101_0x152b06,_0x4b3673=new Set(),_0x2a6c3a=new Map(),_0x23642f=collectSegmentUsageCounts(_0x42a367);if(_0x42a367['segments'])for(const [_0x56dd3c,_0x3a5bc2]of Object['entries'](_0x42a367[_0x24699b(0x191)])){_0x4b3673['add'](_0x56dd3c);if(_0x3a5bc2[_0x24699b(0x1a4)]){const _0x4fff65=yamlRuleToApi(_0x3a5bc2[_0x24699b(0x1a4)]),_0x30db09=apiRuleToYaml(_0x4fff65);_0x2a6c3a[_0x24699b(0x1c4)](_0x56dd3c,_0x30db09);}}const _0x4784b0=new Map();let _0x3f66f4=0x0;for(const [_0x2145f1,_0x43ea20]of _0x2a6c3a){const _0x96ff20=serializeExpandedRule(_0x43ea20,_0x2a6c3a),_0x1142be=_0x4784b0[_0x24699b(0x174)](_0x96ff20)||[];_0x1142be['push']({'name':_0x2145f1,'index':_0x3f66f4}),_0x4784b0[_0x24699b(0x1c4)](_0x96ff20,_0x1142be),_0x3f66f4++;}const _0x57b283=new Map();for(const [_0x2a1f80,_0x4b30de]of _0x4784b0){const _0x102c1a=_0x4b30de[_0x24699b(0xee)]()[_0x24699b(0x142)]((_0x2f7228,_0x4af3c8)=>{const _0x46b011=_0x24699b,_0x40431c=_0x23642f[_0x46b011(0x174)](_0x2f7228[_0x46b011(0x143)])||0x0,_0x213a70=_0x23642f[_0x46b011(0x174)](_0x4af3c8[_0x46b011(0x143)])||0x0;if(_0x40431c!==_0x213a70)return _0x213a70-_0x40431c;return _0x2f7228[_0x46b011(0x1b2)]-_0x4af3c8[_0x46b011(0x1b2)];})[_0x24699b(0x179)](_0x4d2f1e=>_0x4d2f1e['name']),_0x9dfc8f=[];for(const _0x8f987a of _0x102c1a){const _0x3b69b8=_0x23642f[_0x24699b(0x174)](_0x8f987a)||0x0,_0x5cc5ae=Math[_0x24699b(0xf6)](_0x3b69b8,0x1);for(let _0x25ae03=0x0;_0x25ae03<_0x5cc5ae;_0x25ae03++){_0x9dfc8f[_0x24699b(0x116)](_0x8f987a);}}_0x57b283[_0x24699b(0x1c4)](_0x2a1f80,_0x9dfc8f);}return{'existingLocalSegmentNames':_0x4b3673,'localSegmentRules':_0x2a6c3a,'localExpandedRuleToNames':_0x57b283};}function a101_0x4b5d(){const _0x5f2d22=['resolveSegment','activationsBySegmentId','item','yamlActivation','folderPath','slice',').\x20','segment_updated','Creating\x20activation\x20\x27','description','milestone','Segment\x20not\x20found:\x20','SEGMENT_NOT_FOUND','max','folderId','dirname','__pending_','activation_deleted','\x0a\x20\x20','98XdeOHi','./child-segment-yaml.js','message','idToEmailMap','attributes','activation_deleting','Created\x20journey\x20\x27','from','getSegment','with','Created\x20folder\x20\x27','Activation\x20not\x20found:\x20','existingJourney','createdSegmentIds','../../utils/async.js','journey_updating','createFolder','\x27\x20exit\x20criteria','waitCondition','Updating\x20activation\x20\x27','Entry\x20criteria:\x20','Activation','valid','WaitStep','existingActivation','action','push','verbose','createActivation','embedded_activation_created','logSuccess','keys','embedded_activation_creating','rootFolderId','yamlConfig','Failed\x20to\x20','Fetching\x20','Updated\x20activation\x20\x27','getActivation','created','embedded_segment_created','Updating\x20segment\x20\x27','entry_criteria','length','activation_updating','stringify','deleteSegment','isArray','folder_creating','join','progress','digest','hex','skipSegments','21777cPFJGy','entryCriteria','schedule','DecisionPoint','Created\x20segment\x20\x27','logWarning','journey_updated','add','\x27\x20decision\x20point\x20branch\x20\x27','Name\x20has\x20already\x20been\x20taken','journeyById','JOURNEY_SYNTAX_ERROR','\x20activation\x20\x27','split','\x27...','\x20journey\x20from\x20file:\x20','sort','name','Failed\x20to\x20sync\x20activations\x20for\x20segment\x20\x27','activationActions','7916kxdmcN','activations','state','):\x20','notification','includes','266920hIXXMx','folderPathToId','journey_entry_criteria_','all_columns','filter','find','folder_created','\x27\x20milestone','null','\x27\x20from\x20file:\x20','99tiQNJb','onProgress','toLowerCase','journeyId','relative','\x27\x20entry\x20criteria','delete','Define\x20it\x20in\x20the\x20journey\x27s\x20\x27activations\x27\x20section\x20or\x20use\x20an\x20existing\x20activation\x20ID.','absolutePath','draft','columns','parse','parseDocument','17559528OHrNUa','connection','goal','errors','toString','Created\x20activation\x20\x27','segment_creating','nameToType','listSegments','Journey\x20\x27','JOURNEY_UPDATE_ERROR','\x20(referenced\x20in\x20embedded\x20segment\x20\x27','activation_creating','Creating\x20segment\x20\x27','exitCriterias','createdSegmentId','\x20(referenced\x20in\x20journey\x20','get','flatMap','Stage\x20\x27','\x20error(s)','parentFolder','map','journeyActivationStepId','activation_updated','embeddedSegmentNameToId','segment_deleting','idToName','resolveJourneyId','activation_created','Deleted\x20segment\x20\x27','Cannot\x20create\x20embedded\x20activation\x20without\x20journey\x20context','branches','SEGMENT_UPDATE_ERROR','journeyBundlesByFolderAndName','333750uGfuND','replace','update','diff','./journey-yaml.js','journey','502817NngiOb','__pending_act_','segmentNameToId','journeys','segmentFolderId','segments','existingSegments','has','reduce','createJourneySegment','segmentId','stages','activation_template_id','2335FulAEo','Updated\x20segment\x20\x27','isNew','localSegmentRules','listActivations','unchanged','connectionIdToNameMap','activationContext','fetchJourney','validatedRequest','Warning:\x20Could\x20not\x20resolve\x20embedded\x20segment\x20\x27','rule','6VfCsmY','ACTIVATION_UPDATE_ERROR','steps','INTERNAL','1145814IRgSxx','getJourney','NOT_FOUND','stage\x20\x27','updated','\x27\x20for\x20','deleteActivation','connector_config','goal\x20criteria','index','journeyBundleName','versionNumber','list','updateSegmentById','deleted','all','size','embedded_segment_creating','\x27\x20wait\x20condition','activation_','withProgress','existingSegment','relationships','updateActivation','create','sha1','logInfo','set','parentId','segment','startsWith','hasChanges','Creating\x20folder\x20\x27','data','utf-8','journeyStages','user','parentSegmentFolder','buildUserMaps','SEGMENT_SYNTAX_ERROR','type','333tlbBFk'];a101_0x4b5d=function(){return _0x5f2d22;};return a101_0x4b5d();}async function buildServerSegmentRuleMap(_0x3d02d9,_0x1dc603,_0x56746d,_0xa77636){const _0x34ce25=new Map(),_0x1e5f5e=new Set(),_0x1c5a2a=async _0x505e9=>{const _0x3c1377=a101_0x1e36;if(_0x1e5f5e[_0x3c1377(0x193)](_0x505e9))return;_0x1e5f5e[_0x3c1377(0x139)](_0x505e9);let _0x417b97=_0x56746d[_0x3c1377(0x151)](_0x448e02=>_0x448e02['id']===_0x505e9);if(!_0x417b97)try{_0x417b97=await _0x3d02d9[_0x3c1377(0x1c6)]['getSegment'](_0x1dc603,_0x505e9);}catch{return;}if(!_0x417b97?.['rule'])return;const _0x346110=apiRuleToYaml(_0x417b97[_0x3c1377(0x1a4)]);_0x34ce25[_0x3c1377(0x1c4)](_0x505e9,_0x346110);const _0x2294eb=collectSegmentRefsFromRule(_0x346110);for(const _0x134c44 of _0x2294eb){await _0x1c5a2a(_0x134c44);}};for(const _0x3a82c9 of _0xa77636){await _0x1c5a2a(_0x3a82c9);}return _0x34ce25;}export function createSegmentIdResolver(_0x30da33,_0x53cea8){return async _0x415334=>{const _0x2e419d=a101_0x1e36,_0x3698b6=_0x30da33[_0x2e419d(0x174)](_0x415334);if(!_0x3698b6)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x2e419d(0xf4)+_0x415334+_0x2e419d(0x16e)+_0x53cea8+'\x27)');return _0x3698b6;};}export function extractRootFolderId(_0x165aa5){const _0x59cde7=a101_0x152b06;return _0x165aa5['relationships']?.[_0x59cde7(0xe4)]?.[_0x59cde7(0xe0)]?.['id']||_0x165aa5[_0x59cde7(0x1bf)]?.[_0x59cde7(0x178)]?.['data']?.['id'];}export function buildConnectionMaps(_0x42ec4e){const _0x4b6e42=a101_0x152b06,_0x4f86b0=new Map(),_0x4b8273=new Map(),_0x907952=new Map();for(const _0x4e8654 of _0x42ec4e){_0x4f86b0[_0x4b6e42(0x1c4)](_0x4e8654[_0x4b6e42(0x143)],parseInt(_0x4e8654['id'],0xa)),_0x4b8273[_0x4b6e42(0x1c4)](_0x4e8654['id'],_0x4e8654['name']),_0x907952['set'](_0x4e8654[_0x4b6e42(0x143)],_0x4e8654[_0x4b6e42(0xe7)]);}return{'nameToId':_0x4f86b0,'idToName':_0x4b8273,'nameToType':_0x907952};}export function calculatePushStats(_0x960215,_0x3a1ff8,_0x3429d9,_0x3bad6f,_0x49e8d4,_0x19d1d7,_0x13cd42){const _0x2a0030=a101_0x152b06,_0x413eec=_0x960215[_0x2a0030(0x150)](_0x9e8854=>_0x9e8854[_0x2a0030(0x19b)]),_0xc2bcf7=_0x960215[_0x2a0030(0x150)](_0x24fa69=>!_0x24fa69[_0x2a0030(0x19b)]&&_0x24fa69[_0x2a0030(0xde)]),_0x2fe5a6=_0x960215[_0x2a0030(0x150)](_0x31f320=>!_0x31f320[_0x2a0030(0x19b)]&&!_0x31f320[_0x2a0030(0xde)]),_0x3cc09e=_0x19d1d7?_0x3bad6f:[],_0x382569=_0x3a1ff8['filter'](_0x4b85b6=>_0x4b85b6[_0x2a0030(0x19b)]),_0x4d28d8=_0x3a1ff8[_0x2a0030(0x150)](_0x303f40=>!_0x303f40[_0x2a0030(0x19b)]&&_0x303f40[_0x2a0030(0xde)]),_0x2c413f=_0x3a1ff8['filter'](_0x4df595=>!_0x4df595['isNew']&&!_0x4df595[_0x2a0030(0xde)]),_0x2040d7=_0x19d1d7?_0x49e8d4:[],_0x1855e4=_0x960215[_0x2a0030(0x175)](_0x37e16e=>_0x37e16e[_0x2a0030(0x145)]),_0x1a7f43=_0x1855e4[_0x2a0030(0x150)](_0x1d8714=>_0x1d8714[_0x2a0030(0xe7)]===_0x2a0030(0x1c1)),_0x21385b=_0x1855e4['filter'](_0xe91503=>_0xe91503[_0x2a0030(0xe7)]===_0x2a0030(0x188)),_0x46900a=_0x1855e4['filter'](_0x3e4281=>_0x3e4281[_0x2a0030(0xe7)]===_0x2a0030(0x15c)),_0x147d03=Array[_0x2a0030(0x103)](_0x3429d9)[_0x2a0030(0x142)](),_0x5ffdd1=_0x13cd42?![]:_0x413eec['length']>0x0||_0xc2bcf7[_0x2a0030(0x127)]>0x0||_0x3cc09e[_0x2a0030(0x127)]>0x0,_0xe0fb7b=_0x382569[_0x2a0030(0x127)]>0x0||_0x4d28d8[_0x2a0030(0x127)]>0x0||_0x2040d7[_0x2a0030(0x127)]>0x0,_0x447710=_0x13cd42?![]:_0x1855e4[_0x2a0030(0x127)]>0x0,_0x163b7e=_0x147d03[_0x2a0030(0x127)]>0x0;return{'segments':{'new':_0x413eec,'changed':_0xc2bcf7,'unchanged':_0x2fe5a6,'toDelete':_0x3cc09e},'journeys':{'new':_0x382569,'changed':_0x4d28d8,'unchanged':_0x2c413f,'toDelete':_0x2040d7},'activations':{'all':_0x1855e4,'toCreate':_0x1a7f43,'toUpdate':_0x21385b,'toDelete':_0x46900a},'folders':{'toCreate':_0x147d03},'counts':{'segments':{'new':_0x413eec[_0x2a0030(0x127)],'changed':_0xc2bcf7[_0x2a0030(0x127)],'unchanged':_0x2fe5a6[_0x2a0030(0x127)],'toDelete':_0x3cc09e[_0x2a0030(0x127)]},'journeys':{'new':_0x382569[_0x2a0030(0x127)],'changed':_0x4d28d8[_0x2a0030(0x127)],'unchanged':_0x2c413f['length'],'toDelete':_0x2040d7[_0x2a0030(0x127)]},'activations':{'create':_0x1a7f43[_0x2a0030(0x127)],'update':_0x21385b['length'],'delete':_0x46900a[_0x2a0030(0x127)]},'folders':_0x147d03['length']},'hasChanges':_0x5ffdd1||_0xe0fb7b||_0x447710||_0x163b7e};}export async function buildPushExecutionContext(_0x39a059,_0x3c7884,_0x118be2,_0x236238,_0x37675e,_0xccd355){const _0x50af83=a101_0x152b06,_0x1644fe=extractRootFolderId(_0x118be2),{pathToId:_0x3e07c7,idToPath:_0x876f8d}=buildFolderMaps(_0x37675e),_0x1d8b9a=buildSegmentNameToIdMap(_0x236238),_0x4d51bc=new Map(),{batchAsync:_0x56d79e}=await import(_0x50af83(0x10a)),[_0x20f726,_0x3814c9]=await Promise[_0x50af83(0x1b8)]([_0x39a059[_0x50af83(0xe3)][_0x50af83(0xe5)](),_0x39a059['connection'][_0x50af83(0x1b5)](),((async()=>{const _0x2b925e=_0x50af83;!_0xccd355&&_0x236238[_0x2b925e(0x127)]>0x0&&await _0x56d79e(_0x236238,async _0x570dfa=>{const _0x4d38a5=_0x2b925e,_0x42c91a=await _0x39a059[_0x4d38a5(0x1c6)][_0x4d38a5(0x19d)](_0x3c7884,_0x570dfa['id']);_0x4d51bc[_0x4d38a5(0x1c4)](_0x570dfa['id'],_0x42c91a);});})())]),{emailToId:_0x2b1cfb,idToEmail:_0x38d8e1}=_0x20f726,_0x13715b=buildConnectionMaps(_0x3814c9);return{'rootFolderId':_0x1644fe,'folderPathToId':_0x3e07c7,'folderIdToPath':_0x876f8d,'segmentNameToId':_0x1d8b9a,'activationsBySegmentId':_0x4d51bc,'emailToIdMap':_0x2b1cfb,'idToEmailMap':_0x38d8e1,'connectionNameToIdMap':_0x13715b['nameToId'],'connectionIdToNameMap':_0x13715b[_0x50af83(0x17e)],'connectionNameToTypeMap':_0x13715b[_0x50af83(0x16a)]};}export function createPushYamlContextForBundle(_0xbcbcff,_0xbff683,_0x5bb4e6,_0x55deb7,_0x1ec924,_0x123e57,_0x3b847e,_0x1ef24d){const {existingLocalSegmentNames:_0x47fea7,localExpandedRuleToNames:_0x303ac8}=_0x55deb7,_0x47edab=new Set(),_0x68fb88=new Map(),_0x142418=new Map(),_0x8713e3=new Map(),_0x2f1eae=createJumpTargetCache(),_0x154f8a=new Map(),_0x4a0f52=new Map(),_0xba34f2=new Set();let _0x1d7db9;const _0xe90eaf=_0x5d2450=>{const _0x4bbae8={'resolveSegment':async _0x27656c=>{const _0x263f21=a101_0x1e36,_0x1c6618=_0x8713e3[_0x263f21(0x174)](_0x27656c);if(_0x1c6618!==undefined)return{'name':_0x1c6618,'isJourneyLocal':!![]};try{let _0x3a0d73=_0x5bb4e6[_0x263f21(0x151)](_0x263830=>_0x263830['id']===_0x27656c);!_0x3a0d73&&(_0x3a0d73=await _0xbcbcff[_0x263f21(0x1c6)][_0x263f21(0x104)](_0xbff683,_0x27656c));const _0x2033f2=generateJourneyLocalName(_0x3a0d73[_0x263f21(0x143)]),_0x42c696=_0x3a0d73['kind']===SEGMENT_KIND_JOURNEY&&_0x2033f2!==undefined;let _0x48eb33=_0x3a0d73[_0x263f21(0x143)],_0x3e6770;if(_0x42c696&&_0x3a0d73[_0x263f21(0x1a4)]){const _0xf1cb8=apiRuleToYaml(_0x3a0d73[_0x263f21(0x1a4)]);_0x4a0f52['set'](_0x27656c,_0xf1cb8);const _0x321ef2=async _0x3666e4=>{const _0x4c60e4=_0x263f21,_0x57626f=collectSegmentRefsFromRule(_0x3666e4);for(const _0x5589a0 of _0x57626f){if(!_0x4a0f52[_0x4c60e4(0x193)](_0x5589a0))try{const _0x3a3bf5=await _0xbcbcff['segment'][_0x4c60e4(0x104)](_0xbff683,_0x5589a0);if(_0x3a3bf5?.[_0x4c60e4(0x1a4)]){const _0x18d10c=apiRuleToYaml(_0x3a3bf5[_0x4c60e4(0x1a4)]);_0x4a0f52[_0x4c60e4(0x1c4)](_0x5589a0,_0x18d10c),await _0x321ef2(_0x18d10c);}}catch{}}};await _0x321ef2(_0xf1cb8);const _0x5717df=serializeExpandedRule(_0xf1cb8,_0x4a0f52),_0x5a64c5=_0x303ac8[_0x263f21(0x174)](_0x5717df);if(_0x5a64c5&&_0x5a64c5[_0x263f21(0x127)]>0x0){const _0x408112=_0x68fb88[_0x263f21(0x174)](_0x5717df)||0x0,_0x11d874=_0x5a64c5[_0x408112]||_0x5a64c5[_0x5a64c5[_0x263f21(0x127)]-0x1];_0x68fb88[_0x263f21(0x1c4)](_0x5717df,_0x408112+0x1),_0x48eb33=_0x11d874,_0x47edab[_0x263f21(0x139)](_0x48eb33),_0x8713e3[_0x263f21(0x1c4)](_0x27656c,_0x48eb33);const _0x20020d=await resolveRuleSegmentRefs(_0xf1cb8,async _0x44939c=>{const _0x598ab5=_0x263f21,_0x11cf41=_0x8713e3[_0x598ab5(0x174)](_0x44939c);if(_0x11cf41)return _0x11cf41;const _0x3d2f92=await _0x1d7db9['resolveSegment'](_0x44939c);return _0x3d2f92[_0x598ab5(0x143)];});_0x3e6770={'description':_0x3a0d73['description'],'rule':_0x20020d};}else{const _0x40cf4c=_0x154f8a['get'](_0x5717df);if(_0x40cf4c)_0x48eb33=_0x40cf4c,_0x8713e3['set'](_0x27656c,_0x48eb33);else{if(_0x2033f2){let _0x2e647e=_0x2033f2,_0x3c51aa=0x2;while(_0x47edab[_0x263f21(0x193)](_0x2e647e)||_0x47fea7[_0x263f21(0x193)](_0x2e647e)){_0x2e647e=_0x2033f2+'_'+_0x3c51aa,_0x3c51aa++;}_0x47edab[_0x263f21(0x139)](_0x2e647e),_0x48eb33=_0x2e647e;}_0x8713e3[_0x263f21(0x1c4)](_0x27656c,_0x48eb33),_0x154f8a['set'](_0x5717df,_0x48eb33);const _0x237b68=await resolveRuleSegmentRefs(_0xf1cb8,async _0x37ef13=>{const _0x42f90f=_0x263f21,_0x4b64b7=_0x8713e3[_0x42f90f(0x174)](_0x37ef13);if(_0x4b64b7)return _0x4b64b7;const _0x42a997=await _0x1d7db9[_0x42f90f(0xe9)](_0x37ef13);return _0x42a997['name'];});_0x3e6770={'description':_0x3a0d73[_0x263f21(0xf2)],'rule':_0x237b68};}}}return{'name':_0x48eb33,'isJourneyLocal':_0x42c696,'definition':_0x3e6770};}catch{return{'name':_0x27656c,'isJourneyLocal':![]};}},'resolveActivation':async _0x510afd=>{const _0x5d17e3=a101_0x1e36,_0x11ad75=_0x142418['get'](_0x510afd);if(_0x11ad75!==undefined)return{'name':_0x11ad75,'isJourneyLocal':!![]};try{let _0x36ca27=_0x3b847e?.[_0x5d17e3(0x174)](_0x510afd);!_0x36ca27&&(_0x36ca27=await _0xbcbcff[_0x5d17e3(0x18b)][_0x5d17e3(0x122)](_0x5d2450,_0x510afd));const _0x27a349=_0x36ca27[_0x5d17e3(0x100)]['activationParams'][_0x5d17e3(0x143)]||_0x510afd,_0x10fe3b=sanitizeYamlKey(_0x27a349)||_0x5d17e3(0x1bc)+_0x510afd,_0x409169=_0x10fe3b;_0x142418[_0x5d17e3(0x1c4)](_0x510afd,_0x409169);const _0x4537df=journeyActivationStepToYaml(_0x36ca27,_0x1ec924,_0x123e57);return{'name':_0x409169,'isJourneyLocal':!![],'definition':_0x4537df};}catch{return{'name':_0x510afd,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x4b745a,_0x2332f1)=>resolveJumpTarget(_0x4b745a,_0x2332f1,_0x2f1eae,async _0x18dca4=>{const _0x312b5d=a101_0x1e36,_0x273a4c=_0x1ef24d?.[_0x312b5d(0x174)](_0x18dca4);if(_0x273a4c)return _0x273a4c;return _0xbcbcff[_0x312b5d(0x18b)]['getJourney'](_0x18dca4);})};return _0x1d7db9=_0x4bbae8,_0x4bbae8;},_0x3b0eaf=async _0x317ecb=>{const _0x37d398=a101_0x1e36,{collectSegmentIdsFromJourneyApi:_0x4114e3}=await import(_0x37d398(0x18a)),{batchAsync:_0x31ed9c}=await import('../../utils/async.js'),_0x392916=new Set();for(const _0x4ff463 of _0x317ecb){let _0x3c3feb=_0x1ef24d?.[_0x37d398(0x174)](_0x4ff463);!_0x3c3feb&&(_0x3c3feb=await _0xbcbcff[_0x37d398(0x18b)]['getJourney'](_0x4ff463));const _0x41b151=_0x4114e3(_0x3c3feb);for(const _0x44e88f of _0x41b151){_0x392916[_0x37d398(0x139)](_0x44e88f);}}let _0x5e4e45=Array['from'](_0x392916);while(_0x5e4e45[_0x37d398(0x127)]>0x0){const _0x306eb6=_0x5e4e45[_0x37d398(0x150)](_0x1ece79=>!_0xba34f2[_0x37d398(0x193)](_0x1ece79));if(_0x306eb6['length']===0x0)break;const _0x16e12c=await _0x31ed9c(_0x306eb6,async _0xc4c30e=>{const _0x440c6d=_0x37d398;_0xba34f2[_0x440c6d(0x139)](_0xc4c30e);let _0x1f3ec8=_0x5bb4e6[_0x440c6d(0x151)](_0x51dae9=>_0x51dae9['id']===_0xc4c30e);if(!_0x1f3ec8)try{_0x1f3ec8=await _0xbcbcff['segment'][_0x440c6d(0x104)](_0xbff683,_0xc4c30e);}catch{return null;}return{'segmentId':_0xc4c30e,'segment':_0x1f3ec8};},0xa),_0xf6818=new Set();for(const _0x4a93cd of _0x16e12c){if(!_0x4a93cd?.[_0x37d398(0x1c6)]?.[_0x37d398(0x1a4)])continue;const _0x161acf=apiRuleToYaml(_0x4a93cd['segment'][_0x37d398(0x1a4)]);_0x4a0f52[_0x37d398(0x1c4)](_0x4a93cd[_0x37d398(0x196)],_0x161acf);const _0x551b9c=collectSegmentRefsFromRule(_0x161acf);for(const _0xacf868 of _0x551b9c){!_0xba34f2[_0x37d398(0x193)](_0xacf868)&&_0xf6818[_0x37d398(0x139)](_0xacf868);}}_0x5e4e45=Array[_0x37d398(0x103)](_0xf6818);}};return{'createYamlContext':_0xe90eaf,'prefetchJourneySegments':_0x3b0eaf};}export async function executePushSegments(_0x238e2c,_0x814f22,_0x34da3d,_0x46dc9a,_0x23dae4){const _0xee8b44=a101_0x152b06,{segmentDefToCreateRequest:_0x1ee6b2,segmentDefToUpdateRequest:_0x442a34}=await import(_0xee8b44(0xfd)),_0x598af8=_0x34da3d[_0xee8b44(0x14d)],_0xf21bcb=0x5,_0x4ff36e=async _0x4d3089=>{const _0x38d881=_0xee8b44,_0x1facfd=_0x4d3089['folderPath']?_0x598af8[_0x38d881(0x174)](_0x4d3089[_0x38d881(0xed)]):undefined;let _0x540a2d;const _0x2d4b4d={'created':0x0,'updated':0x0,'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};try{if(_0x4d3089[_0x38d881(0x19b)]){_0x23dae4['onProgress']?.({'type':_0x38d881(0x169),'name':_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]});const _0x1a3bbf=_0x1ee6b2(_0x4d3089['yamlConfig'],_0x1facfd),_0x4cbba6=await _0x23dae4['withProgress'](_0x38d881(0x170)+_0x4d3089['yamlConfig'][_0x38d881(0x143)]+_0x38d881(0x140),()=>_0x238e2c['segment']['createSegment'](_0x46dc9a[_0x38d881(0x1c5)],_0x1a3bbf));_0x540a2d=_0x4cbba6[_0x38d881(0xe0)]['id'],_0x2d4b4d[_0x38d881(0x172)]={'name':_0x4d3089[_0x38d881(0x11e)]['name'],'id':_0x540a2d},_0x23dae4[_0x38d881(0x157)]?.({'type':'segment_created','name':_0x4d3089[_0x38d881(0x11e)]['name'],'segmentId':_0x540a2d}),_0x23dae4[_0x38d881(0x11a)]?.(_0x38d881(0x136)+_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]+'\x27'),_0x2d4b4d['created']=0x1;}else{if(_0x4d3089[_0x38d881(0xde)]){_0x23dae4[_0x38d881(0x157)]?.({'type':'segment_updating','name':_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]});const _0x4cd256=_0x442a34(_0x4d3089['yamlConfig']);_0x1facfd!==_0x4d3089[_0x38d881(0x1be)]?.[_0x38d881(0x190)]&&(_0x4cd256['segmentFolderId']=_0x1facfd?parseInt(_0x1facfd,0xa):undefined),await _0x23dae4['withProgress'](_0x38d881(0x125)+_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]+'\x27...',()=>_0x238e2c[_0x38d881(0x1c6)][_0x38d881(0x1b6)](_0x46dc9a[_0x38d881(0x1c5)],_0x4d3089['existingSegment']['id'],_0x4cd256)),_0x540a2d=_0x4d3089[_0x38d881(0x1be)]['id'],_0x23dae4[_0x38d881(0x157)]?.({'type':_0x38d881(0xf0),'name':_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]}),_0x23dae4['logSuccess']?.(_0x38d881(0x19a)+_0x4d3089['yamlConfig'][_0x38d881(0x143)]+'\x27'),_0x2d4b4d[_0x38d881(0x1ad)]=0x1;}else _0x540a2d=_0x4d3089['existingSegment']['id'];}}catch(_0x28fe92){const _0x49fc24=isHttp400Error(_0x28fe92),_0x42579c=_0x49fc24?ErrorCode[_0x38d881(0xe6)]:ErrorCode[_0x38d881(0x184)],_0xc17d63=getErrorMessage(_0x28fe92);throw new SDKError(_0x42579c,_0x38d881(0x11f)+(_0x4d3089[_0x38d881(0x19b)]?_0x38d881(0x1c1):'update')+'\x20segment\x20from\x20file:\x20'+_0x4d3089[_0x38d881(0x15e)]+_0x38d881(0xfb)+_0xc17d63,_0x28fe92);}try{const _0x166909=await syncActivationsForSegment(_0x238e2c,_0x46dc9a['parentId'],_0x540a2d,_0x4d3089[_0x38d881(0x11e)]['name'],_0x4d3089[_0x38d881(0x145)],_0x23dae4,_0x4d3089[_0x38d881(0x15e)]);_0x2d4b4d[_0x38d881(0x147)]=_0x166909;}catch(_0x303453){if(_0x303453 instanceof SDKError)throw _0x303453;throw new SDKError(ErrorCode[_0x38d881(0x1a6)],_0x38d881(0x144)+_0x4d3089['yamlConfig'][_0x38d881(0x143)]+_0x38d881(0x155)+_0x4d3089[_0x38d881(0x15e)]+_0x38d881(0xfb)+getErrorMessage(_0x303453),_0x303453);}return _0x2d4b4d;},_0x363108=await batchAsync(_0x814f22,_0x4ff36e,_0xf21bcb),_0x1d6ebc={'created':0x0,'updated':0x0,'deleted':0x0,'createdSegmentIds':new Map(),'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};for(const _0x1cffad of _0x363108){_0x1d6ebc[_0xee8b44(0x123)]+=_0x1cffad['created'],_0x1d6ebc[_0xee8b44(0x1ad)]+=_0x1cffad[_0xee8b44(0x1ad)],_0x1cffad[_0xee8b44(0x172)]&&_0x1d6ebc[_0xee8b44(0x109)]['set'](_0x1cffad[_0xee8b44(0x172)][_0xee8b44(0x143)],_0x1cffad[_0xee8b44(0x172)]['id']),_0x1d6ebc[_0xee8b44(0x147)][_0xee8b44(0x123)]+=_0x1cffad[_0xee8b44(0x147)][_0xee8b44(0x123)],_0x1d6ebc[_0xee8b44(0x147)][_0xee8b44(0x1ad)]+=_0x1cffad[_0xee8b44(0x147)][_0xee8b44(0x1ad)],_0x1d6ebc['activations'][_0xee8b44(0x1b7)]+=_0x1cffad[_0xee8b44(0x147)][_0xee8b44(0x1b7)];}return _0x1d6ebc;}async function syncActivationsForSegment(_0x1a9ffe,_0x270c83,_0x11aa6e,_0x1f1ad7,_0x458efe,_0xae09a7,_0xaa5901){const _0x18a919=a101_0x152b06,_0x2ba7df={'created':0x0,'updated':0x0,'deleted':0x0};for(const _0x1b7519 of _0x458efe){try{if(_0x1b7519['type']===_0x18a919(0x1c1)&&_0x1b7519['validatedRequest'])_0xae09a7['onProgress']?.({'type':_0x18a919(0x16f),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),await _0xae09a7[_0x18a919(0x1bd)](_0x18a919(0xf1)+_0x1b7519[_0x18a919(0x143)]+_0x18a919(0x140),()=>_0x1a9ffe[_0x18a919(0x1c6)][_0x18a919(0x118)](_0x270c83,_0x11aa6e,_0x1b7519[_0x18a919(0x1a2)])),_0xae09a7[_0x18a919(0x157)]?.({'type':_0x18a919(0x180),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),_0xae09a7[_0x18a919(0x11a)]?.(_0x18a919(0x168)+_0x1b7519[_0x18a919(0x143)]+'\x27'),_0x2ba7df[_0x18a919(0x123)]++;else{if(_0x1b7519[_0x18a919(0xe7)]===_0x18a919(0x188)&&_0x1b7519[_0x18a919(0x1a2)]&&_0x1b7519['existingActivation'])_0xae09a7['onProgress']?.({'type':_0x18a919(0x128),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),await _0xae09a7['withProgress'](_0x18a919(0x10f)+_0x1b7519['name']+'\x27...',()=>_0x1a9ffe[_0x18a919(0x1c6)][_0x18a919(0x1c0)](_0x270c83,_0x11aa6e,_0x1b7519[_0x18a919(0x114)]['id'],_0x1b7519['validatedRequest'])),_0xae09a7['onProgress']?.({'type':_0x18a919(0x17b),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),_0xae09a7[_0x18a919(0x11a)]?.(_0x18a919(0x121)+_0x1b7519[_0x18a919(0x143)]+'\x27'),_0x2ba7df['updated']++;else _0x1b7519[_0x18a919(0xe7)]==='delete'&&_0x1b7519['existingActivation']&&(_0xae09a7[_0x18a919(0x157)]?.({'type':_0x18a919(0x101),'segmentName':_0x1f1ad7,'activationName':_0x1b7519['name']}),await _0xae09a7[_0x18a919(0x1bd)]('Deleting\x20activation\x20\x27'+_0x1b7519['name']+_0x18a919(0x140),()=>_0x1a9ffe[_0x18a919(0x1c6)][_0x18a919(0x1af)](_0x270c83,_0x11aa6e,_0x1b7519[_0x18a919(0x114)]['id'])),_0xae09a7[_0x18a919(0x157)]?.({'type':_0x18a919(0xfa),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),_0xae09a7['logDeleted']?.('Deleted\x20activation\x20\x27'+_0x1b7519[_0x18a919(0x143)]+'\x27'),_0x2ba7df[_0x18a919(0x1b7)]++);}}catch(_0x3ec43a){const _0x33d869=isHttp400Error(_0x3ec43a),_0x45386e=_0x33d869?ErrorCode['ACTIVATION_SYNTAX_ERROR']:ErrorCode['ACTIVATION_UPDATE_ERROR'],_0x395e23=getErrorMessage(_0x3ec43a);throw new SDKError(_0x45386e,_0x18a919(0x11f)+_0x1b7519[_0x18a919(0xe7)]+_0x18a919(0x13e)+_0x1b7519[_0x18a919(0x143)]+'\x27\x20from\x20file:\x20'+_0xaa5901+_0x18a919(0xfb)+_0x395e23,_0x3ec43a);}}return _0x2ba7df;}export async function executePushFolders(_0x58f4ee,_0x1897df,_0x485358,_0x5bcfe2,_0x43ff3e){const _0x21dbf2=a101_0x152b06,_0x475710=new Map(_0x485358);for(const _0x41073a of _0x1897df){const _0x104d34=_0x41073a[_0x21dbf2(0x13f)]('/'),_0x37425b=_0x104d34[_0x104d34[_0x21dbf2(0x127)]-0x1],_0x42de6d=_0x104d34[_0x21dbf2(0xee)](0x0,-0x1)[_0x21dbf2(0x12d)]('/'),_0x276a8d=_0x475710[_0x21dbf2(0x174)](_0x42de6d);_0x43ff3e[_0x21dbf2(0x157)]?.({'type':_0x21dbf2(0x12c),'folder':_0x41073a});const _0x4109fc={'name':_0x37425b,'parentFolderId':_0x276a8d},_0x5b23bf=await _0x43ff3e[_0x21dbf2(0x1bd)](_0x21dbf2(0xdf)+_0x41073a+'\x27...',()=>_0x58f4ee[_0x21dbf2(0x1c6)][_0x21dbf2(0x10c)](_0x5bcfe2[_0x21dbf2(0x1c5)],_0x4109fc));_0x475710['set'](_0x41073a,_0x5b23bf[_0x21dbf2(0xe0)]['id']),_0x43ff3e[_0x21dbf2(0x157)]?.({'type':_0x21dbf2(0x152),'folder':_0x41073a,'folderId':_0x5b23bf[_0x21dbf2(0xe0)]['id']}),_0x43ff3e[_0x21dbf2(0x1c3)]?.(_0x21dbf2(0x106)+_0x41073a+'\x27');}return _0x475710;}export async function executePushSegmentDeletions(_0xcd366f,_0x421634,_0x3c2885){const _0xddb515=a101_0x152b06;if(_0x421634[_0xddb515(0x127)]===0x0)return 0x0;const {batchAsync:_0x3d58a3}=await import(_0xddb515(0x10a)),_0x593103=0x5,_0x3f07fb=await _0x3d58a3(_0x421634,async _0x4eae6f=>{const _0x59a2ed=_0xddb515;return _0x3c2885[_0x59a2ed(0x157)]?.({'type':_0x59a2ed(0x17d),'name':_0x4eae6f['name']}),await _0xcd366f[_0x59a2ed(0x1c6)][_0x59a2ed(0x12a)](_0x4eae6f['id']),_0x3c2885[_0x59a2ed(0x157)]?.({'type':'segment_deleted','name':_0x4eae6f[_0x59a2ed(0x143)]}),_0x3c2885['logDeleted']?.(_0x59a2ed(0x181)+_0x4eae6f['name']+'\x27'),0x1;},_0x593103);return _0x3f07fb[_0xddb515(0x194)]((_0x55f4b0,_0x23a1b9)=>_0x55f4b0+_0x23a1b9,0x0);}export async function executePushJourneys(_0x43452e,_0x289133,_0x1529b4,_0x1f6ce1,_0x109c78){const _0x23d6d1=a101_0x152b06,{journeyDefToRequest:_0x4bce03}=await import('./journey-yaml.js'),{activationDefToCreateRequest:_0x34831e,yamlRuleToApi:_0xd18a07,validateSegmentRule:_0x6fc3a9}=await import(_0x23d6d1(0xfd)),_0x2f659b={'results':[],'created':0x0,'updated':0x0,'embeddedSegmentNameToId':new Map()},_0x1f9012=new Map(_0x1529b4[_0x23d6d1(0x18e)]),_0x5e211d=0x5;for(let _0x228d3b=0x0;_0x228d3b<_0x289133['length'];_0x228d3b+=_0x5e211d){const _0x5957fd=_0x289133['slice'](_0x228d3b,_0x228d3b+_0x5e211d),_0x46d84d=await Promise[_0x23d6d1(0x1b8)](_0x5957fd['map'](async _0x5b334f=>{const _0x3c719b=_0x23d6d1;if(!_0x5b334f['isNew']&&!_0x5b334f[_0x3c719b(0xde)])return{'action':_0x3c719b(0x19e),'name':_0x5b334f[_0x3c719b(0x11e)]['name'],'journeyId':_0x5b334f[_0x3c719b(0x108)]?.['id']};const _0x296d77=_0x5b334f[_0x3c719b(0xed)]?_0x1529b4[_0x3c719b(0x14d)][_0x3c719b(0x174)](_0x5b334f[_0x3c719b(0xed)]):undefined;_0x109c78[_0x3c719b(0x157)]?.({'type':_0x5b334f['isNew']?'journey_creating':_0x3c719b(0x10b),'name':_0x5b334f['yamlConfig'][_0x3c719b(0x143)]});try{const _0x43a495=await executeSingleJourneyPush(_0x43452e,_0x5b334f,{..._0x1529b4,'segmentNameToId':_0x1f9012},{'parentId':_0x1f6ce1[_0x3c719b(0x1c5)],'rootFolderId':_0x1f6ce1[_0x3c719b(0x11d)],'folderId':_0x296d77,'verbose':_0x1f6ce1[_0x3c719b(0x117)]},_0x109c78,{'journeyDefToRequest':_0x4bce03,'activationDefToCreateRequest':_0x34831e,'yamlRuleToApi':_0xd18a07,'validateSegmentRule':_0x6fc3a9});for(const [_0x279fec,_0x1ef9af]of _0x43a495[_0x3c719b(0x17c)]){_0x1f9012[_0x3c719b(0x1c4)](_0x279fec,_0x1ef9af),_0x2f659b['embeddedSegmentNameToId'][_0x3c719b(0x1c4)](_0x279fec,_0x1ef9af);}if(_0x43a495[_0x3c719b(0x115)]===_0x3c719b(0x123))_0x109c78[_0x3c719b(0x157)]?.({'type':'journey_created','name':_0x5b334f[_0x3c719b(0x11e)][_0x3c719b(0x143)],'journeyId':_0x43a495['journeyId']}),_0x109c78[_0x3c719b(0x11a)]?.(_0x3c719b(0x102)+_0x5b334f[_0x3c719b(0x11e)][_0x3c719b(0x143)]+'\x27'),_0x2f659b[_0x3c719b(0x123)]++;else _0x43a495[_0x3c719b(0x115)]===_0x3c719b(0x1ad)&&(_0x109c78[_0x3c719b(0x157)]?.({'type':_0x3c719b(0x138),'name':_0x5b334f['yamlConfig'][_0x3c719b(0x143)]}),_0x109c78['logSuccess']?.('Updated\x20journey\x20\x27'+_0x5b334f['yamlConfig']['name']+'\x27'),_0x2f659b[_0x3c719b(0x1ad)]++);return{'action':_0x43a495[_0x3c719b(0x115)],'name':_0x5b334f[_0x3c719b(0x11e)][_0x3c719b(0x143)],'journeyId':_0x43a495[_0x3c719b(0x159)]};}catch(_0x41328b){const _0x14aad0=isHttp400Error(_0x41328b),_0x8918bd=_0x14aad0?ErrorCode[_0x3c719b(0x13d)]:ErrorCode[_0x3c719b(0x16d)],_0x242e21=getErrorMessage(_0x41328b);throw new SDKError(_0x8918bd,'Failed\x20to\x20'+(_0x5b334f[_0x3c719b(0x19b)]?_0x3c719b(0x1c1):_0x3c719b(0x188))+_0x3c719b(0x141)+_0x5b334f['absolutePath']+_0x3c719b(0xfb)+_0x242e21,_0x41328b);}}));_0x2f659b['results'][_0x23d6d1(0x116)](..._0x46d84d);}return _0x2f659b;}async function executeSingleJourneyPush(_0x4835d7,_0x231838,_0x168f50,_0x38ad06,_0x546557,_0x19cc2e){const _0x537e2c=a101_0x152b06,{journeyDefToRequest:_0x5c36d8,activationDefToCreateRequest:_0x4f90b9,yamlRuleToApi:_0x2ea263,validateSegmentRule:_0xdb1fe0}=_0x19cc2e,_0x1fb3a8=new Map(),_0xa8afbe=new Map(),_0x250ab1=new Map(),_0x4548a=new Map(),_0x311c31=new Map();let _0x42096d;const _0x4aa9b3=async()=>{const _0x44e83b=a101_0x1e36;if(_0x42096d)return;_0x42096d=new Map();if(!_0x231838[_0x44e83b(0x108)])return;const _0x3a0b13=await _0x4835d7[_0x44e83b(0x18b)][_0x44e83b(0x19d)](_0x231838['existingJourney']['id']);for(const _0x4b34d2 of _0x3a0b13){const _0x1b7931=journeyActivationStepToYaml(_0x4b34d2,_0x168f50[_0x44e83b(0xff)],_0x168f50[_0x44e83b(0x19f)]),_0x57113a=activationSignature(_0x1b7931);!_0x42096d['has'](_0x57113a)&&_0x42096d['set'](_0x57113a,_0x4b34d2['id']),_0x1b7931['name']&&_0xa8afbe[_0x44e83b(0x1c4)](_0x1b7931[_0x44e83b(0x143)],_0x4b34d2['id']);}};if(_0x231838[_0x537e2c(0x108)]&&_0x231838[_0x537e2c(0x11e)]['segments']){const _0x5e191f=buildLocalExpandedRuleMappings(_0x231838[_0x537e2c(0x11e)]),_0x596326=_0x5e191f[_0x537e2c(0x19c)];if(_0x596326['size']>0x0){const _0x2c386f=new Map();for(const [_0x26d5e7,_0x5bb226]of _0x596326){const _0x8ad7fd=serializeExpandedRule(_0x5bb226,_0x596326);_0x2c386f['set'](_0x26d5e7,_0x8ad7fd);}const _0x322531=collectSegmentIdsFromJourneyApi(_0x231838[_0x537e2c(0x108)]);if(_0x322531[_0x537e2c(0x1b9)]>0x0){const _0x49d462=await buildServerSegmentRuleMap(_0x4835d7,_0x38ad06[_0x537e2c(0x1c5)],_0x168f50[_0x537e2c(0x192)],_0x322531);if(_0x49d462[_0x537e2c(0x1b9)]>0x0){const _0x5aee9f=new Map();for(const [_0x20eee0,_0x5c731c]of _0x49d462){const _0x549268=serializeExpandedRule(_0x5c731c,_0x49d462);!_0x5aee9f[_0x537e2c(0x193)](_0x549268)&&_0x5aee9f[_0x537e2c(0x1c4)](_0x549268,_0x20eee0);}for(const [_0xc95e3d,_0x3dff07]of _0x2c386f){const _0x2ffd17=_0x5aee9f[_0x537e2c(0x174)](_0x3dff07);_0x2ffd17&&(_0x311c31[_0x537e2c(0x1c4)](_0xc95e3d,_0x2ffd17),_0x168f50[_0x537e2c(0x18e)]['set'](_0xc95e3d,_0x2ffd17));}}}}}const _0xa7921f={'resolveSegmentId':async _0x1b61d0=>{const _0x490d27=_0x537e2c,_0x7c67a1=_0x168f50[_0x490d27(0x18e)]['get'](_0x1b61d0);if(!_0x7c67a1)throw new SDKError(ErrorCode[_0x490d27(0xf5)],_0x490d27(0xf4)+_0x1b61d0+_0x490d27(0x173)+_0x231838[_0x490d27(0x11e)][_0x490d27(0x143)]+')');return _0x7c67a1;},'resolveEmbeddedSegmentId':async(_0xb9874,_0x16467e)=>{const _0x26f927=_0x537e2c,_0x175558=_0x168f50['segmentNameToId'][_0x26f927(0x174)](_0xb9874);if(_0x175558)return _0x175558;const _0xb17f5f=_0x311c31['get'](_0xb9874);if(_0xb17f5f)return _0x168f50[_0x26f927(0x18e)][_0x26f927(0x1c4)](_0xb9874,_0xb17f5f),_0xb17f5f;const _0x180e3d=_0x168f50['existingSegments'][_0x26f927(0x151)](_0x3cbb7c=>_0x3cbb7c[_0x26f927(0x143)]===_0xb9874);if(_0x180e3d)return _0x168f50[_0x26f927(0x18e)][_0x26f927(0x1c4)](_0xb9874,_0x180e3d['id']),_0x180e3d['id'];if(_0x231838[_0x26f927(0x19b)]){const {stageName:_0x5b9676,criteriaName:_0x14a165}=findSegmentCriteriaLocation(_0x231838[_0x26f927(0x11e)],_0xb9874);return _0xdb1fe0(_0xb9874,_0x16467e['rule']),_0x250ab1['set'](_0xb9874,{'definition':_0x16467e,'stageName':_0x5b9676,'criteriaName':_0x14a165}),createPendingSegmentId(_0xb9874);}const _0x26f9d3=_0x231838[_0x26f927(0x108)]?.['id'];if(!_0x26f9d3)throw new SDKError(ErrorCode[_0x26f927(0x1a8)],'Cannot\x20create\x20embedded\x20segment\x20for\x20existing\x20journey\x20without\x20journey\x20ID');_0xdb1fe0(_0xb9874,_0x16467e[_0x26f927(0x1a4)]);const _0xcbea2f=generateDeterministicJourneySegmentName(_0x231838[_0x26f927(0x11e)][_0x26f927(0x143)],_0xb9874),_0x5bd7da=_0x168f50[_0x26f927(0x192)][_0x26f927(0x151)](_0x4bf126=>_0x4bf126[_0x26f927(0x143)]===_0xcbea2f),_0x5061da=createSegmentIdResolver(_0x168f50[_0x26f927(0x18e)],_0xb9874),_0x50ed57=await resolveRuleSegmentIds(_0x16467e[_0x26f927(0x1a4)],_0x5061da);let _0xf69460;if(_0x5bd7da)await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x1b6)](_0x38ad06['parentId'],_0x5bd7da['id'],{'description':_0x16467e[_0x26f927(0xf2)]||_0x26f927(0x110)+_0xb9874,'rule':_0x2ea263(_0x50ed57,!![]),'countPopulation':!![]}),_0xf69460=_0x5bd7da['id'];else try{_0xf69460=await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x195)]({'name':_0xcbea2f,'description':_0x16467e[_0x26f927(0xf2)]||'Entry\x20criteria:\x20'+_0xb9874,'journeyId':_0x26f9d3,'rule':_0x2ea263(_0x50ed57,!![]),'countPopulation':!![],'parentFolderId':_0x38ad06[_0x26f927(0x11d)]||'','audienceId':_0x38ad06[_0x26f927(0x1c5)]});}catch(_0x18e107){const _0x254da6=_0x18e107 instanceof Error&&_0x18e107[_0x26f927(0xfe)][_0x26f927(0x14b)](_0x26f927(0x13b));if(_0x254da6){const _0x347960=await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x16b)](_0x38ad06['parentId']),_0x915d0e=_0x347960[_0x26f927(0x151)](_0x81bea1=>_0x81bea1[_0x26f927(0x143)]===_0xcbea2f);if(_0x915d0e)await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x1b6)](_0x38ad06[_0x26f927(0x1c5)],_0x915d0e['id'],{'description':_0x16467e['description']||_0x26f927(0x110)+_0xb9874,'rule':_0x2ea263(_0x50ed57,!![]),'countPopulation':!![]}),_0xf69460=_0x915d0e['id'];else throw _0x18e107;}else throw _0x18e107;}return _0x168f50[_0x26f927(0x18e)][_0x26f927(0x1c4)](_0xb9874,_0xf69460),_0x1fb3a8['set'](_0xb9874,_0xf69460),_0xf69460;},'resolveActivationId':async _0x4bb1a9=>{const _0x4db2ac=_0x537e2c,_0x5551f5=_0xa8afbe[_0x4db2ac(0x174)](_0x4bb1a9);if(_0x5551f5)return _0x5551f5;if(_0x231838[_0x4db2ac(0x108)]){await _0x4aa9b3();const _0x47f19=_0xa8afbe[_0x4db2ac(0x174)](_0x4bb1a9);if(_0x47f19)return _0x47f19;}throw new SDKError(ErrorCode[_0x4db2ac(0x1ab)],_0x4db2ac(0x107)+_0x4bb1a9+_0x4db2ac(0x173)+_0x231838[_0x4db2ac(0x11e)][_0x4db2ac(0x143)]+_0x4db2ac(0xef)+_0x4db2ac(0x15d));},'resolveEmbeddedActivationId':async(_0x3f9708,_0x502e2b)=>{const _0x9f9ec5=_0x537e2c,_0x2a57af=_0xa8afbe[_0x9f9ec5(0x174)](_0x3f9708);if(_0x2a57af)return _0x2a57af;if(_0x231838['isNew'])return _0x4548a[_0x9f9ec5(0x1c4)](_0x3f9708,_0x502e2b),createPendingActivationId(_0x3f9708);if(_0x231838[_0x9f9ec5(0x108)]){await _0x4aa9b3();const _0x4049ca=_0xa8afbe[_0x9f9ec5(0x174)](_0x502e2b[_0x9f9ec5(0x143)]);if(_0x4049ca)return _0xa8afbe[_0x9f9ec5(0x1c4)](_0x3f9708,_0x4049ca),_0x4049ca;const _0x27f5a8=activationSignature(_0x502e2b),_0x78883d=_0x42096d?.[_0x9f9ec5(0x174)](_0x27f5a8);if(_0x78883d)return _0xa8afbe[_0x9f9ec5(0x1c4)](_0x3f9708,_0x78883d),_0x78883d;const _0xe39be6=await _0x4f90b9(_0x502e2b,_0x168f50[_0x9f9ec5(0x1a0)]),_0x1a15ac=await _0x4835d7[_0x9f9ec5(0x18b)][_0x9f9ec5(0x118)](_0x231838[_0x9f9ec5(0x108)]['id'],_0xe39be6);return _0xa8afbe['set'](_0x3f9708,_0x1a15ac['id']),_0x1a15ac['id'];}throw new SDKError(ErrorCode[_0x9f9ec5(0x1a8)],_0x9f9ec5(0x182));},'resolveJourneyId':async _0x140f1a=>{const _0x1ca298=_0x537e2c;try{return await _0x4835d7[_0x1ca298(0x18b)][_0x1ca298(0x17f)](_0x38ad06[_0x1ca298(0x1c5)],_0x140f1a);}catch(_0xe7a05e){throw new SDKError(ErrorCode[_0x1ca298(0x1ab)],_0x1ca298(0x16c)+_0x140f1a+'\x27\x20not\x20found\x20in\x20parent\x20segment\x20(referenced\x20in\x20jump\x20step\x20of\x20\x27'+_0x231838[_0x1ca298(0x11e)]['name']+'\x27)',_0xe7a05e);}},'resolveStageId':async(_0x295236,_0x4ee2a2)=>{const _0x1535f8=_0x537e2c,_0x14530a=await _0x4835d7[_0x1535f8(0x18b)][_0x1535f8(0x1aa)](_0x295236),_0x294a24=_0x14530a['attributes'][_0x1535f8(0xe2)][_0x1535f8(0x151)](_0x1406ea=>_0x1406ea['name'][_0x1535f8(0x158)]()===_0x4ee2a2[_0x1535f8(0x158)]());if(!_0x294a24?.['id'])throw new SDKError(ErrorCode['NOT_FOUND'],_0x1535f8(0x176)+_0x4ee2a2+'\x27\x20not\x20found\x20in\x20journey\x20\x27'+(_0x14530a[_0x1535f8(0x100)][_0x1535f8(0x1b3)]||_0x14530a[_0x1535f8(0x100)][_0x1535f8(0x143)])+'\x27');return _0x294a24['id'];}},_0x193cae=await _0x5c36d8(_0x231838[_0x537e2c(0x11e)],_0x38ad06[_0x537e2c(0x1c5)],_0xa7921f),_0x145192=_0x38ad06[_0x537e2c(0xf7)]||_0x38ad06[_0x537e2c(0x11d)];_0x145192&&(_0x193cae['relationships']={'parentFolder':{'data':{'id':_0x145192,'type':'folder'}}});if(_0x231838['isNew']){if(_0x250ab1[_0x537e2c(0x1b9)]>0x0||_0x4548a[_0x537e2c(0x1b9)]>0x0)return await executeThreeStepJourneyCreate(_0x4835d7,_0x231838,_0x193cae,{'pendingEmbeddedSegments':_0x250ab1,'pendingEmbeddedActivations':_0x4548a,'embeddedSegmentNameToId':_0x1fb3a8,'journeyActivationNameToId':_0xa8afbe},{..._0x38ad06,'effectiveFolderId':_0x145192},_0x168f50,_0x546557,_0x19cc2e);else{ensureJourneyDefaults(_0x193cae['attributes']);const _0x56358a=await _0x4835d7[_0x537e2c(0x18b)][_0x537e2c(0x1c1)](_0x193cae);return{'action':_0x537e2c(0x123),'journeyId':_0x56358a['id'],'embeddedSegmentNameToId':_0x1fb3a8};}}else{if(_0x231838[_0x537e2c(0xde)]&&_0x231838[_0x537e2c(0x108)])return ensureJourneyDefaults(_0x193cae['attributes']),await _0x4835d7[_0x537e2c(0x18b)]['update'](_0x231838['existingJourney']['id'],_0x193cae),{'action':_0x537e2c(0x1ad),'journeyId':_0x231838['existingJourney']['id'],'embeddedSegmentNameToId':_0x1fb3a8};}return{'action':_0x537e2c(0x19e),'journeyId':_0x231838[_0x537e2c(0x108)]?.['id'],'embeddedSegmentNameToId':_0x1fb3a8};}function findSegmentCriteriaLocation(_0x331ba3,_0x401cc4){const _0x4b05a5=a101_0x152b06,_0x2d57f3=_0x331ba3[_0x4b05a5(0x197)]||_0x331ba3[_0x4b05a5(0x18f)]?.[0x0]?.['stages']||[];let _0x49c747='entry',_0x2ba714=_0x401cc4;const _0x300852=_0x331ba3[_0x4b05a5(0x165)]||_0x331ba3[_0x4b05a5(0x18f)]?.[0x0]?.[_0x4b05a5(0x165)];if(_0x300852?.[_0x4b05a5(0x1c6)]===_0x401cc4)return{'stageName':_0x4b05a5(0x165),'criteriaName':_0x300852[_0x4b05a5(0x143)]||_0x401cc4};_0x1e55f7:for(const _0x557c04 of _0x2d57f3){if(_0x557c04[_0x4b05a5(0x126)]?.[_0x4b05a5(0x1c6)]===_0x401cc4){_0x49c747=_0x557c04[_0x4b05a5(0x143)],_0x2ba714=_0x557c04['entry_criteria'][_0x4b05a5(0x143)]||_0x401cc4;break;}if(_0x557c04[_0x4b05a5(0x1a7)])for(const _0x451aa9 of _0x557c04['steps']){if(_0x451aa9['type']==='decision_point'&&_0x451aa9[_0x4b05a5(0x105)]?.[_0x4b05a5(0x183)])for(const _0x3fd219 of _0x451aa9[_0x4b05a5(0x105)][_0x4b05a5(0x183)]){if(_0x3fd219[_0x4b05a5(0x1c6)]===_0x401cc4){_0x49c747=_0x557c04[_0x4b05a5(0x143)],_0x2ba714=_0x3fd219[_0x4b05a5(0x143)]||_0x401cc4;break _0x1e55f7;}}}}return{'stageName':_0x49c747,'criteriaName':_0x2ba714};}async function executeThreeStepJourneyCreate(_0x5b4052,_0x50c7ce,_0x143b5e,_0x3c4065,_0x28b267,_0x515eb6,_0x59d721,_0x42b9f9){const _0xd750a4=a101_0x152b06,{activationDefToCreateRequest:_0x4be99d,yamlRuleToApi:_0x321235}=_0x42b9f9,{pendingEmbeddedSegments:_0x1c544b,pendingEmbeddedActivations:_0x977ef1,embeddedSegmentNameToId:_0x1c0b8c}=_0x3c4065,_0x1e619e=JSON[_0xd750a4(0x161)](JSON[_0xd750a4(0x129)](_0x143b5e));ensureJourneyDefaults(_0x1e619e[_0xd750a4(0x100)]),stripPendingIds(_0x1e619e);const _0x269fdf=await _0x5b4052[_0xd750a4(0x18b)][_0xd750a4(0x1c1)](_0x1e619e),_0x3aa30d=_0x269fdf['id'],_0x5383d3=new Map();for(const _0x25d58b of _0x269fdf[_0xd750a4(0x100)]['journeyStages']){_0x5383d3[_0xd750a4(0x1c4)](_0x25d58b[_0xd750a4(0x143)][_0xd750a4(0x158)](),_0x25d58b['id']);}for(const [_0x1ab11a,{definition:_0x3a3884}]of _0x1c544b){const _0x4b5aba=generateDeterministicJourneySegmentName(_0x50c7ce[_0xd750a4(0x11e)]['name'],_0x1ab11a);_0x59d721[_0xd750a4(0x157)]?.({'type':_0xd750a4(0x1ba),'journeyName':_0x50c7ce[_0xd750a4(0x11e)][_0xd750a4(0x143)],'segmentName':_0x1ab11a});const _0x11a21a=createSegmentIdResolver(_0x515eb6[_0xd750a4(0x18e)],_0x1ab11a),_0x3fdbc7=await resolveRuleSegmentIds(_0x3a3884[_0xd750a4(0x1a4)],_0x11a21a),_0x5f18ed=await _0x5b4052[_0xd750a4(0x1c6)]['createJourneySegment']({'name':_0x4b5aba,'description':_0x3a3884[_0xd750a4(0xf2)]||'Entry\x20criteria:\x20'+_0x1ab11a,'journeyId':_0x3aa30d,'rule':_0x321235(_0x3fdbc7,!![]),'countPopulation':!![],'parentFolderId':_0x28b267['effectiveFolderId']||'','audienceId':_0x28b267[_0xd750a4(0x1c5)]});_0x1c0b8c['set'](_0x1ab11a,_0x5f18ed),_0x515eb6[_0xd750a4(0x18e)][_0xd750a4(0x1c4)](_0x1ab11a,_0x5f18ed),_0x59d721[_0xd750a4(0x157)]?.({'type':_0xd750a4(0x124),'journeyName':_0x50c7ce[_0xd750a4(0x11e)][_0xd750a4(0x143)],'segmentName':_0x1ab11a});}const _0x473a2c=new Map();for(const [_0x4a21eb,_0x45757c]of _0x977ef1){_0x59d721['onProgress']?.({'type':_0xd750a4(0x11c),'journeyName':_0x50c7ce[_0xd750a4(0x11e)][_0xd750a4(0x143)],'activationName':_0x4a21eb});const _0x4df868=await _0x4be99d(_0x45757c,_0x515eb6[_0xd750a4(0x1a0)]),_0x45a610=await _0x5b4052[_0xd750a4(0x18b)][_0xd750a4(0x118)](_0x3aa30d,_0x4df868);_0x473a2c[_0xd750a4(0x1c4)](_0x4a21eb,_0x45a610['id']),_0x3c4065['journeyActivationNameToId']['set'](_0x4a21eb,_0x45a610['id']),_0x59d721[_0xd750a4(0x157)]?.({'type':_0xd750a4(0x119),'journeyName':_0x50c7ce[_0xd750a4(0x11e)]['name'],'activationName':_0x4a21eb});}const _0xca1e19=JSON[_0xd750a4(0x161)](JSON[_0xd750a4(0x129)](_0x143b5e));return _0xca1e19['id']=_0x3aa30d,ensureJourneyDefaults(_0xca1e19['attributes']),resolvePendingIdsInRequest(_0xca1e19,_0x143b5e,_0x5383d3,_0x1c0b8c,_0x473a2c,_0x59d721),await _0x5b4052[_0xd750a4(0x18b)][_0xd750a4(0x188)](_0x3aa30d,_0xca1e19),{'action':_0xd750a4(0x123),'journeyId':_0x3aa30d,'embeddedSegmentNameToId':_0x1c0b8c};}function stripPendingIds(_0x40df0e){const _0x261279=a101_0x152b06;for(const _0xc82a22 of _0x40df0e[_0x261279(0x100)][_0x261279(0xe2)]||[]){_0xc82a22['entryCriteria']?.[_0x261279(0x196)]&&isPendingSegmentId(_0xc82a22[_0x261279(0x133)][_0x261279(0x196)])&&delete _0xc82a22[_0x261279(0x133)];if(_0xc82a22['steps'])for(const _0x56cd72 of Object[_0x261279(0x11b)](_0xc82a22[_0x261279(0x1a7)])){const _0x56f74a=_0xc82a22[_0x261279(0x1a7)][_0x56cd72];_0x56f74a[_0x261279(0xe7)]===_0x261279(0x111)&&_0x56f74a[_0x261279(0x17a)]&&isPendingActivationId(_0x56f74a[_0x261279(0x17a)])&&(_0x56f74a[_0x261279(0x17a)]='');if(_0x56f74a[_0x261279(0xe7)]==='DecisionPoint'&&_0x56f74a[_0x261279(0x183)])for(const _0x3011c7 of _0x56f74a[_0x261279(0x183)]){_0x3011c7['segmentId']&&isPendingSegmentId(_0x3011c7[_0x261279(0x196)])&&(_0x3011c7[_0x261279(0x196)]='');}_0x56f74a[_0x261279(0xe7)]===_0x261279(0x113)&&_0x56f74a[_0x261279(0x10e)]?.[_0x261279(0x196)]&&isPendingSegmentId(_0x56f74a[_0x261279(0x10e)][_0x261279(0x196)])&&(_0x56f74a[_0x261279(0x10e)]['segmentId']='');}}}function resolvePendingIdsInRequest(_0x1b5e1a,_0x370499,_0x2097d9,_0x4afb33,_0x11cad2,_0x25307b){const _0x315fe1=a101_0x152b06,_0x2b7b59=(_0x3e0303,_0x246590)=>{const _0x4f1aad=a101_0x1e36;if(!isPendingSegmentId(_0x3e0303))return _0x3e0303;const _0x88a55b=extractPendingSegmentName(_0x3e0303),_0x15e2c8=_0x4afb33[_0x4f1aad(0x174)](_0x88a55b);return!_0x15e2c8&&_0x25307b[_0x4f1aad(0x137)]?.(_0x4f1aad(0x1a3)+_0x88a55b+_0x4f1aad(0x1ae)+_0x246590),_0x15e2c8;};if(_0x1b5e1a['attributes'][_0x315fe1(0x165)]?.[_0x315fe1(0x196)]&&isPendingSegmentId(_0x1b5e1a[_0x315fe1(0x100)]['goal']['segmentId'])){const _0x456ee3=_0x2b7b59(_0x1b5e1a[_0x315fe1(0x100)][_0x315fe1(0x165)][_0x315fe1(0x196)],_0x315fe1(0x1b1));_0x456ee3&&(_0x1b5e1a[_0x315fe1(0x100)][_0x315fe1(0x165)][_0x315fe1(0x196)]=_0x456ee3);}for(const _0x1a0b86 of _0x1b5e1a[_0x315fe1(0x100)][_0x315fe1(0xe2)]||[]){const _0x5828f5=_0x2097d9[_0x315fe1(0x174)](_0x1a0b86[_0x315fe1(0x143)]['toLowerCase']());_0x5828f5&&(_0x1a0b86['id']=_0x5828f5);if(_0x1a0b86[_0x315fe1(0x133)]?.[_0x315fe1(0x196)]&&isPendingSegmentId(_0x1a0b86[_0x315fe1(0x133)][_0x315fe1(0x196)])){const _0x4ecebb=_0x2b7b59(_0x1a0b86[_0x315fe1(0x133)][_0x315fe1(0x196)],'stage\x20\x27'+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x15b));_0x4ecebb&&(_0x1a0b86[_0x315fe1(0x133)][_0x315fe1(0x196)]=_0x4ecebb);}if(_0x1a0b86[_0x315fe1(0x171)])for(const _0x51d6db of _0x1a0b86[_0x315fe1(0x171)]){if(_0x51d6db[_0x315fe1(0x196)]&&isPendingSegmentId(_0x51d6db[_0x315fe1(0x196)])){const _0x40f201=_0x2b7b59(_0x51d6db[_0x315fe1(0x196)],_0x315fe1(0x1ac)+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x10d));_0x40f201&&(_0x51d6db['segmentId']=_0x40f201);}}if(_0x1a0b86[_0x315fe1(0xf3)]?.[_0x315fe1(0x196)]&&isPendingSegmentId(_0x1a0b86[_0x315fe1(0xf3)][_0x315fe1(0x196)])){const _0x219e75=_0x2b7b59(_0x1a0b86[_0x315fe1(0xf3)][_0x315fe1(0x196)],_0x315fe1(0x1ac)+_0x1a0b86['name']+_0x315fe1(0x153));_0x219e75&&(_0x1a0b86[_0x315fe1(0xf3)][_0x315fe1(0x196)]=_0x219e75);}if(_0x1a0b86[_0x315fe1(0x1a7)]){const _0x8014a7=_0x13731a=>_0x370499[_0x315fe1(0x100)][_0x315fe1(0xe2)]['find'](_0x1efae0=>_0x1efae0['name'][_0x315fe1(0x158)]()===_0x1a0b86[_0x315fe1(0x143)][_0x315fe1(0x158)]())?.[_0x315fe1(0x1a7)]?.[_0x13731a];for(const _0x549fd0 of Object[_0x315fe1(0x11b)](_0x1a0b86['steps'])){const _0x455de8=_0x1a0b86[_0x315fe1(0x1a7)][_0x549fd0],_0x399643=_0x8014a7(_0x549fd0);if(_0x455de8['type']===_0x315fe1(0x111)&&_0x455de8['journeyActivationStepId']&&(isPendingActivationId(_0x455de8[_0x315fe1(0x17a)])||_0x455de8[_0x315fe1(0x17a)]==='')){if(_0x399643?.['journeyActivationStepId']&&isPendingActivationId(_0x399643[_0x315fe1(0x17a)])){const _0x239395=extractPendingActivationName(_0x399643[_0x315fe1(0x17a)]),_0x4e1c17=_0x11cad2['get'](_0x239395);_0x4e1c17&&(_0x455de8[_0x315fe1(0x17a)]=_0x4e1c17);}}if(_0x455de8['type']===_0x315fe1(0x135)&&_0x455de8[_0x315fe1(0x183)]&&_0x399643?.[_0x315fe1(0x183)])for(let _0x414f96=0x0;_0x414f96<_0x455de8['branches'][_0x315fe1(0x127)];_0x414f96++){const _0x1e8349=_0x455de8[_0x315fe1(0x183)][_0x414f96],_0x1f0f90=_0x399643[_0x315fe1(0x183)][_0x414f96];if(_0x1f0f90?.['segmentId']&&isPendingSegmentId(_0x1f0f90[_0x315fe1(0x196)])){const _0x4f629c=_0x2b7b59(_0x1f0f90[_0x315fe1(0x196)],'stage\x20\x27'+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x13a)+(_0x1e8349[_0x315fe1(0x143)]||_0x414f96)+'\x27');_0x4f629c&&(_0x1e8349[_0x315fe1(0x196)]=_0x4f629c);}}if(_0x455de8['type']===_0x315fe1(0x113)&&_0x455de8[_0x315fe1(0x10e)]?.['segmentId']&&_0x399643?.[_0x315fe1(0x10e)]?.['segmentId']&&isPendingSegmentId(_0x399643[_0x315fe1(0x10e)][_0x315fe1(0x196)])){const _0x46b625=_0x2b7b59(_0x399643[_0x315fe1(0x10e)][_0x315fe1(0x196)],_0x315fe1(0x1ac)+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x1bb));_0x46b625&&(_0x455de8[_0x315fe1(0x10e)][_0x315fe1(0x196)]=_0x46b625);}}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x30ed(){const _0x33bd74=['set','2493528ApxzPX','add','297891fZIfvD','name','1955840CHGScf','35323OZcoiB','parentFolderId','has','392rWWjsO','get','46GwZWhN','8040TznjtD','8704206IAAriV','1046305cfnMBw'];a102_0x30ed=function(){return _0x33bd74;};return a102_0x30ed();}function a102_0x4b18(_0x4aaff1,_0x475802){_0x4aaff1=_0x4aaff1-0x69;const _0x30ed27=a102_0x30ed();let _0x4b1861=_0x30ed27[_0x4aaff1];return _0x4b1861;}(function(_0xcfd786,_0x35b750){const _0x198c30=a102_0x4b18,_0x406e00=_0xcfd786();while(!![]){try{const _0x1f2db2=-parseInt(_0x198c30(0x71))/0x1*(parseInt(_0x198c30(0x76))/0x2)+parseInt(_0x198c30(0x6e))/0x3+-parseInt(_0x198c30(0x70))/0x4+parseInt(_0x198c30(0x6a))/0x5+parseInt(_0x198c30(0x6c))/0x6+parseInt(_0x198c30(0x74))/0x7*(parseInt(_0x198c30(0x77))/0x8)+parseInt(_0x198c30(0x69))/0x9;if(_0x1f2db2===_0x35b750)break;else _0x406e00['push'](_0x406e00['shift']());}catch(_0x48d474){_0x406e00['push'](_0x406e00['shift']());}}}(a102_0x30ed,0x6cedb));export function buildFolderIdToPathMap(_0x274656){const _0x4e96cd=a102_0x4b18,_0x59564d=new Map(),_0x2c0cdb=new Map();for(const _0x169bea of _0x274656){_0x2c0cdb[_0x4e96cd(0x6b)](_0x169bea['id'],_0x169bea);}const _0x425c8c=new Set();for(const _0x13c343 of _0x274656){!_0x13c343[_0x4e96cd(0x72)]&&_0x425c8c[_0x4e96cd(0x6d)](_0x13c343['id']);}function _0x13631d(_0x3019cf){const _0x2e7217=_0x4e96cd;if(_0x59564d['has'](_0x3019cf['id']))return _0x59564d[_0x2e7217(0x75)](_0x3019cf['id']);if(_0x425c8c[_0x2e7217(0x73)](_0x3019cf['id']))return _0x59564d[_0x2e7217(0x6b)](_0x3019cf['id'],''),'';if(_0x3019cf[_0x2e7217(0x72)]){const _0x4b8958=_0x2c0cdb[_0x2e7217(0x75)](_0x3019cf[_0x2e7217(0x72)]);if(_0x4b8958){const _0x46cffc=_0x13631d(_0x4b8958),_0x50fbd9=_0x46cffc?_0x46cffc+'/'+_0x3019cf[_0x2e7217(0x6f)]:_0x3019cf[_0x2e7217(0x6f)];return _0x59564d['set'](_0x3019cf['id'],_0x50fbd9),_0x50fbd9;}}const _0x67ef42=_0x3019cf['name'];return _0x59564d[_0x2e7217(0x6b)](_0x3019cf['id'],_0x67ef42),_0x67ef42;}for(const _0x13a6b3 of _0x274656){_0x13631d(_0x13a6b3);}return _0x59564d;}export function buildFolderPathToIdMap(_0x21a8c2){const _0x4ab3f1=a102_0x4b18,_0x3d1d41=new Map(),_0x268017=new Map();for(const _0x1d56e9 of _0x21a8c2){_0x268017['set'](_0x1d56e9['id'],_0x1d56e9);}const _0x3b6b77=new Set();for(const _0x299140 of _0x21a8c2){!_0x299140['parentFolderId']&&_0x3b6b77[_0x4ab3f1(0x6d)](_0x299140['id']);}function _0x5c09ca(_0x4e59d5){const _0x30ca47=_0x4ab3f1;if(_0x3b6b77[_0x30ca47(0x73)](_0x4e59d5['id']))return'';if(_0x4e59d5[_0x30ca47(0x72)]){const _0x3b9ee8=_0x268017[_0x30ca47(0x75)](_0x4e59d5[_0x30ca47(0x72)]);if(_0x3b9ee8){const _0x5d5c49=_0x5c09ca(_0x3b9ee8);return _0x5d5c49?_0x5d5c49+'/'+_0x4e59d5[_0x30ca47(0x6f)]:_0x4e59d5[_0x30ca47(0x6f)];}}return _0x4e59d5[_0x30ca47(0x6f)];}for(const _0x4b159d of _0x21a8c2){const _0x9f3cc4=_0x5c09ca(_0x4b159d);_0x3d1d41[_0x4ab3f1(0x6b)](_0x9f3cc4,_0x4b159d['id']);}return _0x3d1d41;}export function buildFolderMaps(_0x3adef9){const _0x2c00ac=a102_0x4b18,_0x4b799f=buildFolderIdToPathMap(_0x3adef9),_0x43fa95=new Map();for(const [_0x1703df,_0x2d5a6c]of _0x4b799f){_0x43fa95[_0x2c00ac(0x6b)](_0x2d5a6c,_0x1703df);}return{'idToPath':_0x4b799f,'pathToId':_0x43fa95};}export function getFolderPath(_0x4ed811,_0x156e7c){if(!_0x4ed811)return'';return _0x156e7c['get'](_0x4ed811)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ba574,_0x39cf39){const _0x3f094d=a103_0x39c2,_0x881a01=_0x3ba574();while(!![]){try{const _0x37607=parseInt(_0x3f094d(0x113))/0x1+parseInt(_0x3f094d(0x12c))/0x2+-parseInt(_0x3f094d(0x11e))/0x3*(-parseInt(_0x3f094d(0x10f))/0x4)+parseInt(_0x3f094d(0x11a))/0x5+parseInt(_0x3f094d(0x125))/0x6+parseInt(_0x3f094d(0x11d))/0x7+-parseInt(_0x3f094d(0x115))/0x8*(parseInt(_0x3f094d(0x10b))/0x9);if(_0x37607===_0x39cf39)break;else _0x881a01['push'](_0x881a01['shift']());}catch(_0x2759fd){_0x881a01['push'](_0x881a01['shift']());}}}(a103_0xc43c,0xc858d));import a103_0x3b342b from'path';import{parse as a103_0x27c729}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x194131){const _0x8d2583=a103_0x39c2;if(!_0x194131||_0x194131[_0x8d2583(0x128)]()==='')throw new Error(_0x8d2583(0x11b));const _0x2465d3=_0x194131[_0x8d2583(0x128)]();if(_0x2465d3==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x194131};const _0x2c5b2a=_0x2465d3[_0x8d2583(0x11f)]('/')?_0x2465d3[_0x8d2583(0x11c)](0x1):_0x2465d3,_0x1e2d5f=_0x2c5b2a[_0x8d2583(0x119)]('/')[_0x8d2583(0x111)](_0x557261=>_0x557261!=='');if(_0x1e2d5f[_0x8d2583(0x126)]===0x0)throw new Error(_0x8d2583(0x121));const _0x12ece4=_0x2465d3[_0x8d2583(0x11f)]('/')||!isRelativePathSegment(_0x1e2d5f[0x0]);for(const _0x2a0f8d of _0x1e2d5f){validatePathSegment(_0x2a0f8d);}return{'segments':_0x1e2d5f,'isAbsolute':_0x12ece4,'raw':_0x194131};}function isRelativePathSegment(_0x40d50a){return _0x40d50a==='.'||_0x40d50a==='..';}function validatePathSegment(_0x1d3e38){const _0x6d845f=a103_0x39c2;if(_0x1d3e38==='')throw new Error(_0x6d845f(0x106));if(_0x1d3e38==='.'||_0x1d3e38==='..')return;if(/[\x00-\x1F\x7F]/[_0x6d845f(0x10d)](_0x1d3e38))throw new Error(_0x6d845f(0x105)+_0x1d3e38);if(_0x1d3e38!==_0x1d3e38[_0x6d845f(0x128)]()){}}function a103_0x39c2(_0x2bab78,_0x202b83){_0x2bab78=_0x2bab78-0xfd;const _0xc43c8a=a103_0xc43c();let _0x39c236=_0xc43c8a[_0x2bab78];return _0x39c236;}export function validatePath(_0x37b4a9){const _0xdbd5f3=a103_0x39c2;if(_0x37b4a9[_0xdbd5f3(0x102)][_0xdbd5f3(0x126)]===0x0&&!_0x37b4a9[_0xdbd5f3(0x120)])throw new Error(_0xdbd5f3(0x108));if(_0x37b4a9[_0xdbd5f3(0x120)]){if(_0x37b4a9[_0xdbd5f3(0x102)][0x0]==='..')throw new Error(_0xdbd5f3(0x112));let _0x3fda95=0x0;for(const _0x1096ac of _0x37b4a9[_0xdbd5f3(0x102)]){if(_0x1096ac==='..'){if(_0x3fda95===0x0)throw new Error(_0xdbd5f3(0x107));_0x3fda95--;}else _0x1096ac!=='.'&&_0x3fda95++;}}}export function joinPaths(_0x40b4aa,_0x4d5b53){const _0x4f0285=a103_0x39c2;if(!_0x40b4aa||_0x40b4aa==='/')return _0x4d5b53;if(!_0x4d5b53||_0x4d5b53==='.')return _0x40b4aa;if(_0x4d5b53[_0x4f0285(0x11f)]('/'))return _0x4d5b53;const _0x201ed2=parsePath(_0x40b4aa),_0x67a16=parsePath(_0x4d5b53),_0xc50619=[..._0x201ed2[_0x4f0285(0x102)]];for(const _0x3a6fdd of _0x67a16['segments']){if(_0x3a6fdd==='.')continue;else{if(_0x3a6fdd==='..'){if(_0xc50619[_0x4f0285(0x126)]===0x0)throw new Error(_0x4f0285(0x10a));_0xc50619['pop']();}else _0xc50619[_0x4f0285(0x122)](_0x3a6fdd);}}const _0x3cffff=_0xc50619[_0x4f0285(0x110)]('/');return _0x201ed2[_0x4f0285(0x129)]['startsWith']('/')?'/'+_0x3cffff:_0x3cffff;}export function normalizePath(_0x2cdcb2){const _0x588f1e=a103_0x39c2,_0x5f0480=parsePath(_0x2cdcb2),_0x2bcbf0=[];for(const _0x315064 of _0x5f0480['segments']){if(_0x315064==='.')continue;else{if(_0x315064==='..'){if(_0x2bcbf0['length']===0x0){if(_0x5f0480['isAbsolute'])throw new Error(_0x588f1e(0x10a));_0x2bcbf0[_0x588f1e(0x122)]('..');}else _0x2bcbf0[_0x2bcbf0[_0x588f1e(0x126)]-0x1]==='..'?_0x2bcbf0[_0x588f1e(0x122)]('..'):_0x2bcbf0[_0x588f1e(0xfd)]();}else _0x2bcbf0[_0x588f1e(0x122)](_0x315064);}}if(_0x2bcbf0[_0x588f1e(0x126)]===0x0)return _0x5f0480[_0x588f1e(0x120)]?'/':'.';const _0x1c1868=_0x2bcbf0['join']('/');return _0x5f0480[_0x588f1e(0x129)][_0x588f1e(0x11f)]('/')?'/'+_0x1c1868:_0x1c1868;}export function getParentPath(_0x41ee03){const _0x5cd409=a103_0x39c2,_0x41c3fc=parsePath(_0x41ee03);if(_0x41c3fc[_0x5cd409(0x102)][_0x5cd409(0x126)]<=0x1)return'/';const _0x55874d=_0x41c3fc[_0x5cd409(0x102)]['slice'](0x0,-0x1)['join']('/');return _0x41c3fc[_0x5cd409(0x129)][_0x5cd409(0x11f)]('/')?'/'+_0x55874d:_0x55874d;}export function getBaseName(_0x2664db){const _0x2c5cc9=a103_0x39c2,_0x2d491e=parsePath(_0x2664db);return _0x2d491e[_0x2c5cc9(0x102)][_0x2d491e[_0x2c5cc9(0x102)][_0x2c5cc9(0x126)]-0x1]||'';}export function isChildPath(_0x81bc1a,_0x2ea903){const _0x52b61d=a103_0x39c2,_0x44c254=parsePath(_0x81bc1a),_0x3fb297=parsePath(_0x2ea903);if(_0x44c254[_0x52b61d(0x102)][_0x52b61d(0x126)]<=_0x3fb297[_0x52b61d(0x102)][_0x52b61d(0x126)])return![];for(let _0xbf38bc=0x0;_0xbf38bc<_0x3fb297['segments'][_0x52b61d(0x126)];_0xbf38bc++){if(_0x44c254['segments'][_0xbf38bc]!==_0x3fb297['segments'][_0xbf38bc])return![];}return!![];}export function splitPath(_0x1286f2){const _0x3e394c=a103_0x39c2,_0x131040=parsePath(_0x1286f2);if(_0x131040[_0x3e394c(0x102)][_0x3e394c(0x126)]===0x0)throw new Error(_0x3e394c(0x100));if(_0x131040['segments']['length']===0x1)return{'parent':_0x131040[_0x3e394c(0x102)][0x0]};return{'parent':_0x131040[_0x3e394c(0x102)][0x0],'child':_0x131040['segments'][_0x3e394c(0x116)](0x1)[_0x3e394c(0x110)]('/')};}function a103_0xc43c(){const _0x2f0a9a=['readFile','journey','5117172PXsEUj','length','tdx.json','trim','raw','dirname','resolve','1060892hNVtnx','pop','name','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','Cannot\x20split\x20empty\x20path','parent_segment','segments','type','No\x20tdx.json\x20found\x20for\x20file:\x20','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','Path\x20segment\x20cannot\x20be\x20empty','Path\x20attempts\x20to\x20navigate\x20above\x20root','Relative\x20path\x20cannot\x20be\x20empty','endsWith','Cannot\x20navigate\x20above\x20root','29299356JDEflC','.yml','test','parse','60XysJPq','join','filter','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','1095098eSONZx','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','8AjqFmu','slice','exists','relative','split','2021370eZVPnw','Path\x20cannot\x20be\x20empty','substring','7901845SbpUbP','12918qoWmxK','startsWith','isAbsolute','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','push'];a103_0xc43c=function(){return _0x2f0a9a;};return a103_0xc43c();}export function isYamlFilePath(_0x225514){const _0x2f7697=a103_0x39c2;return _0x225514[_0x2f7697(0x109)](_0x2f7697(0x10c))||_0x225514[_0x2f7697(0x109)]('.yaml');}export async function resolveYamlFilePath(_0x49ce0f,_0x69f6c0=nodeFileSystem){const _0x34c238=a103_0x39c2,_0x5b9ebd=a103_0x3b342b[_0x34c238(0x12b)](_0x49ce0f);if(!await _0x69f6c0[_0x34c238(0x117)](_0x5b9ebd))throw new Error('File\x20not\x20found:\x20'+_0x49ce0f);let _0x8f613c=a103_0x3b342b[_0x34c238(0x12a)](_0x5b9ebd),_0x4784a3=null,_0x4046e3=null;const _0x1cdc09=a103_0x3b342b[_0x34c238(0x10e)](_0x8f613c)['root'];while(_0x8f613c!==_0x1cdc09){const _0x2be62b=a103_0x3b342b[_0x34c238(0x110)](_0x8f613c,_0x34c238(0x127));if(await _0x69f6c0[_0x34c238(0x117)](_0x2be62b)){_0x4784a3=_0x2be62b,_0x4046e3=_0x8f613c;break;}_0x8f613c=a103_0x3b342b[_0x34c238(0x12a)](_0x8f613c);}if(!_0x4784a3||!_0x4046e3)throw new Error(_0x34c238(0x104)+_0x49ce0f);const _0x152a30=await _0x69f6c0[_0x34c238(0x123)](_0x4784a3),_0x3254a3=JSON[_0x34c238(0x10e)](_0x152a30),_0x10877f=_0x3254a3[_0x34c238(0x101)];if(!_0x10877f)throw new Error(_0x34c238(0x114));const _0x4fa5be=await _0x69f6c0[_0x34c238(0x123)](_0x5b9ebd),_0x4681bb=a103_0x27c729(_0x4fa5be),_0x2c39d2=_0x4681bb[_0x34c238(0xfe)];if(!_0x2c39d2)throw new Error(_0x34c238(0xff)+_0x49ce0f);const _0x3ba1fe=_0x4681bb[_0x34c238(0x103)]===_0x34c238(0x124)?_0x34c238(0x124):'segment',_0x15037a=a103_0x3b342b[_0x34c238(0x118)](_0x4046e3,_0x5b9ebd),_0x5bc054=a103_0x3b342b['dirname'](_0x15037a),_0xef6738=_0x5bc054==='.'?'':_0x5bc054['replace'](/\\/g,'/'),_0x41a6df=_0xef6738?_0x10877f+'/'+_0xef6738+'/'+_0x2c39d2:_0x10877f+'/'+_0x2c39d2;return{'parentSegment':_0x10877f,'segmentName':_0x2c39d2,'folderPath':_0xef6738,'fullPath':_0x41a6df,'resourceType':_0x3ba1fe};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2811f2,_0x4367ec){const _0x35af60=a104_0x2628,_0x34f4f9=_0x2811f2();while(!![]){try{const _0x3fb8c1=parseInt(_0x35af60(0xc1))/0x1*(parseInt(_0x35af60(0xc0))/0x2)+-parseInt(_0x35af60(0xbb))/0x3*(-parseInt(_0x35af60(0xba))/0x4)+parseInt(_0x35af60(0xc5))/0x5*(-parseInt(_0x35af60(0xbf))/0x6)+parseInt(_0x35af60(0xc3))/0x7*(-parseInt(_0x35af60(0xc7))/0x8)+parseInt(_0x35af60(0xc8))/0x9*(-parseInt(_0x35af60(0xbe))/0xa)+parseInt(_0x35af60(0xc2))/0xb+parseInt(_0x35af60(0xc4))/0xc;if(_0x3fb8c1===_0x4367ec)break;else _0x34f4f9['push'](_0x34f4f9['shift']());}catch(_0x14b64f){_0x34f4f9['push'](_0x34f4f9['shift']());}}}(a104_0x3ba9,0x9c00f));export function parseSegmentRef(_0x505b29){const _0x4d06fd=a104_0x2628,_0xaf87bc=_0x505b29[_0x4d06fd(0xbc)]('/');if(_0xaf87bc===-0x1)return{'parentId':_0x505b29};if(_0xaf87bc===0x0)throw new Error(_0x4d06fd(0xc6)+_0x505b29+_0x4d06fd(0xbd));const _0x37ec7a=_0x505b29[_0x4d06fd(0xc9)](0x0,_0xaf87bc),_0x53711e=_0x505b29['substring'](_0xaf87bc+0x1);if(_0x53711e==='')throw new Error(_0x4d06fd(0xc6)+_0x505b29+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x37ec7a,'childId':_0x53711e};}function a104_0x2628(_0x4fad5e,_0x21d943){_0x4fad5e=_0x4fad5e-0xba;const _0x3ba992=a104_0x3ba9();let _0x262804=_0x3ba992[_0x4fad5e];return _0x262804;}function a104_0x3ba9(){const _0x3a7875=['Invalid\x20segment\x20reference\x20format:\x20','1047016ODitXo','354519weLXic','substring','32EWKiHC','125340AKHJcN','indexOf','.\x20Parent\x20name\x20cannot\x20be\x20empty','110KgNcSF','258eaQzpI','10vfdWKw','140583zYsvnm','5194871TPhqqU','21lMHDgs','11727276zonHdT','118810owqBWa'];a104_0x3ba9=function(){return _0x3a7875;};return a104_0x3ba9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe71436,_0x1cc007){const _0x3787b8=a105_0x4c89,_0xaeaf04=_0xe71436();while(!![]){try{const _0x344fac=parseInt(_0x3787b8(0x1a4))/0x1+parseInt(_0x3787b8(0x1b5))/0x2*(-parseInt(_0x3787b8(0x1ac))/0x3)+-parseInt(_0x3787b8(0x194))/0x4+-parseInt(_0x3787b8(0x1a3))/0x5*(-parseInt(_0x3787b8(0x199))/0x6)+parseInt(_0x3787b8(0x182))/0x7+-parseInt(_0x3787b8(0x188))/0x8+parseInt(_0x3787b8(0x195))/0x9;if(_0x344fac===_0x1cc007)break;else _0xaeaf04['push'](_0xaeaf04['shift']());}catch(_0x194cf0){_0xaeaf04['push'](_0xaeaf04['shift']());}}}(a105_0x51af,0x8ed79));import a105_0x568c19 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a105_0x4c89(_0x12cb89,_0x4bac1a){_0x12cb89=_0x12cb89-0x181;const _0x51af70=a105_0x51af();let _0x4c8950=_0x51af70[_0x12cb89];return _0x4c8950;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x2751b6){const _0x5e01bb=a105_0x4c89;return _0x2751b6['type']!==_0x5e01bb(0x19c);}export function isScopedResolution(_0xcbc6c5){const _0x470053=a105_0x4c89;return _0xcbc6c5[_0x470053(0x18a)]===_0x470053(0x186)||_0xcbc6c5[_0x470053(0x18a)]===_0x470053(0x19d)||_0xcbc6c5['type']==='context';}export function getScopedDetails(_0x418953){const _0x6f4a8b=a105_0x4c89;if(isScopedResolution(_0x418953))return{'isScoped':_0x418953['isScoped'],'scopedFolderPath':_0x418953[_0x6f4a8b(0x1a0)]};return undefined;}function a105_0x51af(){const _0x38091d=['parse','join','readFile','journey','9738gJBsig','No\x20tdx.json\x20found\x20for\x20file:\x20','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','dirname','invalid_yaml','isFile','parent_name','string','parent_segment','388FgDPbZ','folderPath','6874777stuVXx','isDirectory','resourceType','replace','directory','segmentName','5657624ZfVfjQ','File\x20not\x20found','type','startsWith','segment','trim','configDir','no_parent','stat','no_config','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','1088972aljmLY','1799388qpfYIh','context','Not\x20a\x20YAML\x20file:\x20','basename','6VvgEmc','root','parentSegment','error','file','cwd','Parent\x20segment\x20not\x20specified','scopedFolderPath','message','resolve','1066705sMVzSF','798867iVQPKz','includes','No\x20tdx.json\x20found','isScoped'];a105_0x51af=function(){return _0x38091d;};return a105_0x51af();}async function findTdxConfigAsync(_0x5d8366,_0x3d7bf5){const _0x3ad864=a105_0x4c89;let _0x547f48=a105_0x568c19[_0x3ad864(0x1a2)](_0x5d8366);const _0x329706=a105_0x568c19['parse'](_0x547f48)[_0x3ad864(0x19a)];while(_0x547f48!==_0x329706){const _0x23caf9=a105_0x568c19[_0x3ad864(0x1a9)](_0x547f48,'tdx.json');if(await _0x3d7bf5['exists'](_0x23caf9))try{const _0x3c37fc=await _0x3d7bf5[_0x3ad864(0x1aa)](_0x23caf9),_0x88b9d9=JSON[_0x3ad864(0x1a8)](_0x3c37fc);if(_0x88b9d9[_0x3ad864(0x1b4)]&&typeof _0x88b9d9[_0x3ad864(0x1b4)]===_0x3ad864(0x1b3))return{'configPath':_0x23caf9,'configDir':_0x547f48,'parentSegment':_0x88b9d9['parent_segment']};}catch{}_0x547f48=a105_0x568c19['dirname'](_0x547f48);}return null;}function calculateScopedPath(_0x302d37,_0x4fdbbc){const _0x440c01=a105_0x4c89,_0x19cb88=a105_0x568c19['relative'](_0x4fdbbc,_0x302d37),_0x467bc9=_0x19cb88!==''&&_0x19cb88!=='.'&&!_0x19cb88[_0x440c01(0x18b)]('..');return{'isScoped':_0x467bc9,'scopedFolderPath':_0x467bc9?_0x19cb88[_0x440c01(0x185)](/\\/g,'/'):''};}export async function resolveTarget(_0x2866ac){const _0x27933f=a105_0x4c89,{arg:_0x18c120,contextParent:_0x4a6ee2,cwd:cwd=process[_0x27933f(0x19e)](),fs:fs=nodeFileSystem}=_0x2866ac;if(_0x18c120&&isYamlFilePath(_0x18c120))try{const _0x28f688=await resolveYamlFilePath(_0x18c120,fs),_0x3575a5=a105_0x568c19[_0x27933f(0x1a2)](_0x18c120),_0x26c182=a105_0x568c19[_0x27933f(0x1af)](_0x3575a5),_0x14994a=await findTdxConfigAsync(_0x26c182,fs);if(!_0x14994a){if(_0x4a6ee2){const _0x548df6=a105_0x568c19[_0x27933f(0x1af)](_0x3575a5);return{'type':_0x27933f(0x19d),'parentName':_0x4a6ee2,'targetDir':_0x548df6,'configRoot':_0x548df6,'filePath':_0x3575a5,'resourceName':_0x28f688[_0x27933f(0x187)],'folderPath':_0x28f688[_0x27933f(0x181)],'resourceType':_0x28f688[_0x27933f(0x184)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x27933f(0x19c),'errorCode':'no_config','message':_0x27933f(0x1ad)+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x1ae)};}const _0x273224=calculateScopedPath(_0x26c182,_0x14994a[_0x27933f(0x18e)]);return{'type':_0x27933f(0x19d),'parentName':_0x14994a[_0x27933f(0x19b)],'targetDir':_0x14994a[_0x27933f(0x18e)],'configRoot':_0x14994a['configDir'],'filePath':_0x3575a5,'resourceName':_0x28f688['segmentName'],'folderPath':_0x28f688[_0x27933f(0x181)],'resourceType':_0x28f688[_0x27933f(0x184)],'isScoped':_0x273224['isScoped'],'scopedFolderPath':_0x273224[_0x27933f(0x1a0)]};}catch(_0x20d6bf){const _0xf9937e=_0x20d6bf instanceof Error?_0x20d6bf[_0x27933f(0x1a1)]:String(_0x20d6bf);if(_0xf9937e[_0x27933f(0x1a5)](_0x27933f(0x189)))return{'type':_0x27933f(0x19c),'errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x18c120,'arg':_0x18c120};if(_0xf9937e[_0x27933f(0x1a5)](_0x27933f(0x1a6))){if(_0x4a6ee2){const _0xfb6672=a105_0x568c19[_0x27933f(0x1a2)](_0x18c120);if(await fs['exists'](_0xfb6672)){const _0x305f90=a105_0x568c19[_0x27933f(0x1af)](_0xfb6672),_0x34b9ac=await fs['readFile'](_0xfb6672),_0x1777ab=_0x34b9ac['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x70a304=_0x34b9ac['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x24c4ff=_0x1777ab?_0x1777ab[0x1][_0x27933f(0x18d)]():a105_0x568c19[_0x27933f(0x198)](_0x18c120,a105_0x568c19['extname'](_0x18c120)),_0x590529=_0x70a304&&_0x70a304[0x1][_0x27933f(0x18d)]()===_0x27933f(0x1ab)?'journey':_0x27933f(0x18c);return{'type':_0x27933f(0x19d),'parentName':_0x4a6ee2,'targetDir':_0x305f90,'configRoot':_0x305f90,'filePath':_0xfb6672,'resourceName':_0x24c4ff,'folderPath':'','resourceType':_0x590529,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x27933f(0x19c),'errorCode':'no_config','message':_0x27933f(0x1ad)+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x1ae)};}return{'type':_0x27933f(0x19c),'errorCode':_0x27933f(0x1b0),'message':_0xf9937e,'arg':_0x18c120};}if(_0x18c120){const _0x5355a3=a105_0x568c19['resolve'](cwd,_0x18c120);let _0x8d58c8=null;try{_0x8d58c8=await fs[_0x27933f(0x190)](_0x5355a3);}catch{}if(_0x8d58c8?.[_0x27933f(0x183)]()){const _0x10033c=await findTdxConfigAsync(_0x5355a3,fs);if(_0x10033c){const _0x3c4371=calculateScopedPath(_0x5355a3,_0x10033c[_0x27933f(0x18e)]);return{'type':_0x27933f(0x186),'parentName':_0x10033c[_0x27933f(0x19b)],'targetDir':_0x5355a3,'configRoot':_0x10033c[_0x27933f(0x18e)],'isScoped':_0x3c4371[_0x27933f(0x1a7)],'scopedFolderPath':_0x3c4371['scopedFolderPath']};}if(_0x4a6ee2)return{'type':'directory','parentName':_0x4a6ee2,'targetDir':_0x5355a3,'configRoot':_0x5355a3,'isScoped':![],'scopedFolderPath':''};return{'type':_0x27933f(0x19c),'errorCode':_0x27933f(0x191),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x1ae)};}if(_0x8d58c8?.[_0x27933f(0x1b1)]())return{'type':_0x27933f(0x19c),'errorCode':'invalid_yaml','message':_0x27933f(0x197)+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x192)};const _0x4e7bb0=sanitizeFileName(_0x18c120),_0x3072c9=getSegmentRootDir(_0x4e7bb0,cwd);return{'type':_0x27933f(0x1b2),'parentName':_0x18c120,'targetDir':_0x3072c9,'configRoot':_0x3072c9};}const _0x2f49ad=await findTdxConfigAsync(cwd,fs);if(_0x2f49ad){const _0x44ceee=calculateScopedPath(cwd,_0x2f49ad[_0x27933f(0x18e)]);return{'type':_0x27933f(0x196),'parentName':_0x2f49ad[_0x27933f(0x19b)],'targetDir':cwd,'configRoot':_0x2f49ad[_0x27933f(0x18e)],'isScoped':_0x44ceee[_0x27933f(0x1a7)],'scopedFolderPath':_0x44ceee[_0x27933f(0x1a0)]};}if(_0x4a6ee2){const _0xbad9bc=sanitizeFileName(_0x4a6ee2),_0x570561=getSegmentRootDir(_0xbad9bc,cwd);return{'type':_0x27933f(0x196),'parentName':_0x4a6ee2,'targetDir':_0x570561,'configRoot':_0x570561,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x27933f(0x19c),'errorCode':_0x27933f(0x18f),'message':_0x27933f(0x19f),'helpText':_0x27933f(0x193)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a106_0x5c2305=a106_0x4f50;function a106_0x4f50(_0x41e292,_0x2c9625){_0x41e292=_0x41e292-0x6e;const _0xb27506=a106_0xb275();let _0x4f5073=_0xb27506[_0x41e292];return _0x4f5073;}(function(_0x33d400,_0x4960f2){const _0x5b7859=a106_0x4f50,_0x126719=_0x33d400();while(!![]){try{const _0x4323c5=-parseInt(_0x5b7859(0x7f))/0x1*(parseInt(_0x5b7859(0x89))/0x2)+parseInt(_0x5b7859(0x7a))/0x3+-parseInt(_0x5b7859(0x87))/0x4+parseInt(_0x5b7859(0x71))/0x5*(parseInt(_0x5b7859(0x82))/0x6)+parseInt(_0x5b7859(0x84))/0x7+-parseInt(_0x5b7859(0x7e))/0x8*(-parseInt(_0x5b7859(0x72))/0x9)+-parseInt(_0x5b7859(0x76))/0xa*(parseInt(_0x5b7859(0x7c))/0xb);if(_0x4323c5===_0x4960f2)break;else _0x126719['push'](_0x126719['shift']());}catch(_0x31f7de){_0x126719['push'](_0x126719['shift']());}}}(a106_0xb275,0x8c643));import{existsSync,readFileSync}from'fs';function a106_0xb275(){const _0x4904df=['tdx.json','resolve','cwd','7745530wHSQeu','stringify','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','utf-8','1576467OakOlE','join','11hgoNyD','object','5750224FfBGTF','1IxulSi','dirname','Invalid\x20JSON\x20in\x20','12IyZShS','replace','6272581TAdTUO','segments','relative','4063368VsAwjG','parent_segment','1803948DNJmIx','string','root','Invalid\x20tdx.json:\x20expected\x20object','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','parse','2817655tSgWNr','9uFFKgU'];a106_0xb275=function(){return _0x4904df;};return a106_0xb275();}import a106_0x4bc916 from'path';const TDX_CONFIG_FILE=a106_0x5c2305(0x73),SEGMENTS_DIR=a106_0x5c2305(0x85);export function findTdxConfigPath(_0x2348b9=process[a106_0x5c2305(0x75)]()){const _0x42ec4e=a106_0x5c2305;let _0x42bac9=a106_0x4bc916[_0x42ec4e(0x74)](_0x2348b9);const _0x2b434e=a106_0x4bc916[_0x42ec4e(0x70)](_0x42bac9)[_0x42ec4e(0x8b)];while(_0x42bac9!==_0x2b434e){const _0x50f96e=a106_0x4bc916[_0x42ec4e(0x7b)](_0x42bac9,TDX_CONFIG_FILE);if(existsSync(_0x50f96e))return _0x50f96e;_0x42bac9=a106_0x4bc916['dirname'](_0x42bac9);}return null;}export function loadTdxConfig(_0x1e8adb){const _0x37b6de=a106_0x5c2305,_0x256f6f=readFileSync(_0x1e8adb,_0x37b6de(0x79));let _0x2f0768;try{_0x2f0768=JSON['parse'](_0x256f6f);}catch{throw new Error(_0x37b6de(0x81)+_0x1e8adb);}if(!_0x2f0768||typeof _0x2f0768!==_0x37b6de(0x7d))throw new Error(_0x37b6de(0x6e));const _0x4556a7=_0x2f0768;if(!_0x4556a7[_0x37b6de(0x88)]||typeof _0x4556a7['parent_segment']!==_0x37b6de(0x8a))throw new Error(_0x37b6de(0x6f));return{'parent_segment':_0x4556a7[_0x37b6de(0x88)]};}export function findTdxConfig(_0x5971a8=process[a106_0x5c2305(0x75)]()){const _0x23bd66=a106_0x5c2305,_0x3a52b9=findTdxConfigPath(_0x5971a8);if(!_0x3a52b9)throw new Error(_0x23bd66(0x78));const _0x1f0c3b=loadTdxConfig(_0x3a52b9),_0x507981=a106_0x4bc916[_0x23bd66(0x80)](_0x3a52b9);return{'config':_0x1f0c3b,'configPath':_0x3a52b9,'configDir':_0x507981};}export function tryFindTdxConfig(_0x44a647){try{return findTdxConfig(_0x44a647);}catch{return null;}}export function getSegmentRootDir(_0x34b1e5,_0x11a13a=process[a106_0x5c2305(0x75)]()){const _0x2432c7=a106_0x5c2305;return a106_0x4bc916[_0x2432c7(0x7b)](_0x11a13a,SEGMENTS_DIR,_0x34b1e5);}export function getTdxConfigPath(_0x31786a,_0x194e04=process[a106_0x5c2305(0x75)]()){const _0x4fdeb8=a106_0x5c2305;return a106_0x4bc916[_0x4fdeb8(0x7b)](getSegmentRootDir(_0x31786a,_0x194e04),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x33f95b,_0x4ff544){const _0x51c6b8=a106_0x5c2305,_0x104f1c=a106_0x4bc916[_0x51c6b8(0x74)](_0x33f95b),_0x584a2b=a106_0x4bc916[_0x51c6b8(0x86)](_0x4ff544,_0x104f1c);if(_0x584a2b['startsWith']('..'))return'';return _0x584a2b;}export function localPathToTdFolderPath(_0x4b22cd){const _0x35188c=a106_0x5c2305,_0x1c4a18=a106_0x4bc916[_0x35188c(0x80)](_0x4b22cd);if(_0x1c4a18==='.'||_0x1c4a18==='')return'';return _0x1c4a18[_0x35188c(0x83)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x24c0f8,_0x33859d){const _0x466108=a106_0x5c2305;if(!_0x24c0f8)return _0x33859d;return a106_0x4bc916[_0x466108(0x7b)](_0x33859d,_0x24c0f8);}export function createTdxConfigContent(_0x55aa9b){const _0xd8d23d=a106_0x5c2305,_0x72ac26={'parent_segment':_0x55aa9b};return JSON[_0xd8d23d(0x77)](_0x72ac26,null,0x2)+'\x0a';}
|