@treasuredata/tdx 0.25.3 → 0.25.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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/mcp-command.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/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/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/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/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-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-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/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a110_0x46c66a=a110_0x68a9;(function(_0x46af93,_0x371de0){const _0x13e6af=a110_0x68a9,_0x537980=_0x46af93();while(!![]){try{const _0xb3f2b5=-parseInt(_0x13e6af(0x1b0))/0x1+-parseInt(_0x13e6af(0x1b6))/0x2+-parseInt(_0x13e6af(0x219))/0x3+-parseInt(_0x13e6af(0x259))/0x4*(-parseInt(_0x13e6af(0x194))/0x5)+-parseInt(_0x13e6af(0x24d))/0x6+parseInt(_0x13e6af(0x1e2))/0x7*(parseInt(_0x13e6af(0x1c2))/0x8)+parseInt(_0x13e6af(0x258))/0x9*(parseInt(_0x13e6af(0x250))/0xa);if(_0xb3f2b5===_0x371de0)break;else _0x537980['push'](_0x537980['shift']());}catch(_0x177f2c){_0x537980['push'](_0x537980['shift']());}}}(a110_0x5c50,0x555bb));import{createHash}from'crypto';export const PENDING_SEGMENT_PREFIX=a110_0x46c66a(0x206);export const PENDING_ACTIVATION_PREFIX=a110_0x46c66a(0x260);export function createPendingSegmentId(_0x5045e2){return''+PENDING_SEGMENT_PREFIX+_0x5045e2+'__';}export function isPendingSegmentId(_0x2a56f3){const _0x3e0195=a110_0x46c66a;return _0x2a56f3[_0x3e0195(0x246)](PENDING_SEGMENT_PREFIX);}export function extractPendingSegmentName(_0x580595){const _0x146d5a=a110_0x46c66a;return _0x580595[_0x146d5a(0x1d8)](/^__pending_(.+)__$/,'$1');}export function createPendingActivationId(_0x237dd6){return''+PENDING_ACTIVATION_PREFIX+_0x237dd6+'__';}export function isPendingActivationId(_0x18eb93){return _0x18eb93['startsWith'](PENDING_ACTIVATION_PREFIX);}export function extractPendingActivationName(_0x3a4af3){return _0x3a4af3['replace'](/^__pending_act_(.+)__$/,'$1');}function generateDeterministicJourneySegmentName(_0x32e46a,_0xc568f9){const _0x833efa=a110_0x46c66a,_0xb7897f=_0x32e46a+'::'+(_0xc568f9[_0x833efa(0x23e)]()||_0x833efa(0x18c)),_0x105feb=createHash(_0x833efa(0x1fd))[_0x833efa(0x1bb)](_0xb7897f)[_0x833efa(0x25e)](_0x833efa(0x1fc))['slice'](0x0,0xc);return _0x833efa(0x269)+_0x105feb;}export function ensureJourneyDefaults(_0x5ebb51){const _0x15c2b7=a110_0x46c66a;!_0x5ebb51[_0x15c2b7(0x211)]&&(_0x5ebb51[_0x15c2b7(0x211)]=''),!_0x5ebb51[_0x15c2b7(0x1b5)]&&(_0x5ebb51[_0x15c2b7(0x1b5)]='draft');}export function resolveTDFolderPath(_0x275818,_0x339689,_0x18a19c){const _0x504730=a110_0x46c66a;if(!_0x339689)return _0x275818;if(_0x275818===_0x18a19c||_0x275818[_0x504730(0x246)](_0x18a19c+'/'))return _0x275818;return _0x275818?_0x18a19c+'/'+_0x275818:_0x18a19c;}export function addFoldersToCreate(_0xa738b6,_0x282603,_0x7fb841){const _0x258015=a110_0x46c66a;if(!_0xa738b6)return;if(_0x282603[_0x258015(0x249)](_0xa738b6))return;const _0x19880e=_0xa738b6[_0x258015(0x1d9)]('/');let _0x247496='';for(const _0xf86555 of _0x19880e){_0x247496=_0x247496?_0x247496+'/'+_0xf86555:_0xf86555,!_0x282603[_0x258015(0x249)](_0x247496)&&_0x7fb841['add'](_0x247496);}}import*as a110_0x269a6a from'yaml';import{readFileSync}from'fs';import a110_0x4332fc from'path';import{isJourneyDef,parseYamlString as a110_0x4cd4ff,toYamlString as a110_0x42a4ed,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(_0x45e667){const _0x3d8c63=a110_0x46c66a;if(Array[_0x3d8c63(0x1fa)](_0x45e667))return'['+_0x45e667[_0x3d8c63(0x197)](_0x120e42=>stableStringify(_0x120e42))['join'](',')+']';if(_0x45e667&&typeof _0x45e667===_0x3d8c63(0x21f)){const _0x52d542=_0x45e667,_0x5f07fe=Object['keys'](_0x52d542)[_0x3d8c63(0x209)](),_0x13c5e6=_0x5f07fe[_0x3d8c63(0x197)](_0x18fdcf=>'\x22'+_0x18fdcf+'\x22:'+stableStringify(_0x52d542[_0x18fdcf]));return'{'+_0x13c5e6[_0x3d8c63(0x230)](',')+'}';}const _0x403169=JSON[_0x3d8c63(0x1ed)](_0x45e667);return _0x403169===undefined?_0x3d8c63(0x20f):_0x403169;}function activationSignature(_0x3a5407){const _0x5b369c=a110_0x46c66a,_0x26f8ea={'connection':_0x3a5407[_0x5b369c(0x1e5)],..._0x3a5407[_0x5b369c(0x1a3)]!==undefined&&{'all_columns':_0x3a5407[_0x5b369c(0x1a3)]},..._0x3a5407[_0x5b369c(0x228)]!==undefined&&{'columns':_0x3a5407[_0x5b369c(0x228)]},..._0x3a5407['behavior']!==undefined&&{'behavior':_0x3a5407[_0x5b369c(0x26a)]},..._0x3a5407[_0x5b369c(0x1c9)]!==undefined&&{'schedule':_0x3a5407[_0x5b369c(0x1c9)]},..._0x3a5407[_0x5b369c(0x185)]!==undefined&&{'notification':_0x3a5407[_0x5b369c(0x185)]},..._0x3a5407[_0x5b369c(0x21b)]!==undefined&&{'connector_config':_0x3a5407[_0x5b369c(0x21b)]},..._0x3a5407['activation_template_id']!==undefined&&{'activation_template_id':_0x3a5407['activation_template_id']}};return stableStringify(_0x26f8ea);}export async function prepareSegmentFiles(_0x2748c5,_0x33bdde,_0x4d4451,_0x379396,_0x4cdd9f){const _0x175a53=a110_0x46c66a,{activationDefToCreateRequest:_0x11a36c}=await import(_0x175a53(0x26b)),_0x1a1b2a=[],_0x5204e0=new Set();for(const {yamlConfig:_0x59dfcf,folderPath:_0x567993,sourcePath:_0x1a9475}of _0x2748c5){const _0x48726c=resolveTDFolderPath(_0x567993,_0x379396,_0x4cdd9f),_0x60aeb1=_0x48726c+':'+_0x59dfcf['name'],_0x4b9c1d=_0x33bdde[_0x175a53(0x22d)][_0x175a53(0x1c5)](_0x60aeb1),_0x37ffa6=_0x4b9c1d?_0x33bdde[_0x175a53(0x25a)][_0x175a53(0x1c5)](_0x4b9c1d['id'])||[]:[];addFoldersToCreate(_0x48726c,_0x33bdde[_0x175a53(0x25c)],_0x5204e0);const _0x5afb54=calculateActivationActions(_0x59dfcf[_0x175a53(0x222)]||[],_0x37ffa6,_0x33bdde[_0x175a53(0x245)],_0x33bdde[_0x175a53(0x18b)]);for(const _0x4d28a1 of _0x5afb54){(_0x4d28a1[_0x175a53(0x1d7)]==='create'||_0x4d28a1['type']==='update')&&_0x4d28a1[_0x175a53(0x267)]&&(_0x4d28a1[_0x175a53(0x183)]=await _0x11a36c(_0x4d28a1[_0x175a53(0x267)],_0x4d4451));}const _0x4d204d=calculateSegmentDiff(_0x59dfcf,_0x4b9c1d,_0x37ffa6,_0x33bdde[_0x175a53(0x245)],_0x33bdde[_0x175a53(0x18b)]);_0x1a1b2a['push']({'relativePath':_0x59dfcf[_0x175a53(0x184)],'absolutePath':_0x1a9475,'yamlConfig':_0x59dfcf,'folderPath':_0x48726c,'existingSegment':_0x4b9c1d,'existingActivations':_0x37ffa6,'isNew':_0x4d204d[_0x175a53(0x189)],'hasChanges':_0x4d204d[_0x175a53(0x268)],'diff':_0x4d204d[_0x175a53(0x235)],'activationActions':_0x5afb54});}return{'segmentFiles':_0x1a1b2a,'foldersToCreate':_0x5204e0};}export async function prepareJourneyFiles(_0x5c5e5a,_0x5993ee,_0x45afc4,_0x534335){const _0x4231b0=a110_0x46c66a,_0x53f18b=[],_0x401095=new Set();for(const {yamlConfig:_0x34f260,folderPath:_0x4e55a7,sourcePath:_0x5d823b}of _0x5c5e5a){const _0x12637a=resolveTDFolderPath(_0x4e55a7,_0x45afc4,_0x534335),_0x4402c4=_0x12637a+':'+_0x34f260[_0x4231b0(0x184)],_0x3ad95a=_0x5993ee[_0x4231b0(0x193)]['get'](_0x4402c4);let _0x1ca5c9,_0x41da2b;if(_0x3ad95a&&_0x3ad95a[_0x4231b0(0x242)]>0x0){const _0x2c5413=buildLocalExpandedRuleMappings(_0x34f260),{createYamlContext:_0x2967b2,prefetchJourneySegments:_0x1640d3}=createPushYamlContextForBundle(_0x5993ee[_0x4231b0(0x1ba)],_0x5993ee[_0x4231b0(0x187)],_0x5993ee[_0x4231b0(0x1e1)],_0x2c5413,_0x5993ee[_0x4231b0(0x245)],_0x5993ee[_0x4231b0(0x18b)],_0x5993ee['activationStepsById'],_0x5993ee[_0x4231b0(0x1b1)]);await _0x1640d3(_0x3ad95a['map'](_0x40feb1=>_0x40feb1['id']));const _0x59c7fa=hasMultipleVersions(_0x34f260),_0x6bc432=async _0x171fad=>{const _0x1774e8=_0x4231b0,_0x283d41=_0x5993ee[_0x1774e8(0x1b1)]?.[_0x1774e8(0x1c5)](_0x171fad);if(_0x283d41)return _0x283d41;return _0x5993ee[_0x1774e8(0x1f9)]({'journeyId':_0x171fad,'journeyName':_0x34f260['name'],'isMultiVersion':_0x3ad95a['length']>0x1});};if(_0x59c7fa&&_0x3ad95a[_0x4231b0(0x242)]>0x1){const _0x278bc2=[];for(const _0x36a594 of _0x3ad95a){const _0x357bdc=_0x36a594['versionNumber']||0x1;_0x5993ee['progress']?.[_0x4231b0(0x1bb)](_0x4231b0(0x20d)+_0x34f260[_0x4231b0(0x184)]+'\x20v'+_0x357bdc);const _0x238c07=await _0x6bc432(_0x36a594['id']),_0x52c874=_0x2967b2(_0x36a594['id']),_0x5f5983=await journeyResponseToDef(_0x238c07,_0x52c874);_0x278bc2[_0x4231b0(0x20b)]({'item':_0x36a594,'yaml':_0x5f5983});}const _0x491475=buildLocalRuleToNameMappingFromJourney(_0x34f260);_0x41da2b=buildMergedJourneyDef(_0x278bc2,_0x491475);const _0x59e045=Math['max'](..._0x278bc2['map'](_0x3fa9c8=>_0x3fa9c8[_0x4231b0(0x210)]['versionNumber']||0x0)),_0x1e8293=_0x3ad95a[_0x4231b0(0x25b)](_0x53a383=>(_0x53a383['versionNumber']||0x0)===_0x59e045);_0x1e8293&&(_0x5993ee[_0x4231b0(0x1a7)]?.[_0x4231b0(0x1bb)](_0x4231b0(0x20d)+_0x34f260['name']+'\x20v'+_0x59e045),_0x1ca5c9=await _0x6bc432(_0x1e8293['id']));}else{const _0xdabc6e=_0x3ad95a[_0x3ad95a[_0x4231b0(0x242)]-0x1];_0x5993ee[_0x4231b0(0x1a7)]?.['update'](_0x4231b0(0x20d)+_0x34f260[_0x4231b0(0x184)]),_0x1ca5c9=await _0x6bc432(_0xdabc6e['id']);const _0x1d4f94=_0x2967b2(_0xdabc6e['id']),_0x2f3809=await journeyResponseToDef(_0x1ca5c9,_0x1d4f94),_0xf8bf2a=buildLocalRuleToNameMappingFromJourney(_0x34f260);_0x41da2b=buildMergedJourneyDef([{'item':_0xdabc6e,'yaml':_0x2f3809}],_0xf8bf2a);}}addFoldersToCreate(_0x12637a,_0x5993ee[_0x4231b0(0x25c)],_0x401095);const _0x50f268=calculateJourneyDiff(_0x34f260,_0x41da2b);_0x53f18b['push']({'relativePath':_0x34f260[_0x4231b0(0x184)],'absolutePath':_0x5d823b,'yamlConfig':_0x34f260,'folderPath':_0x12637a,'existingJourney':_0x1ca5c9,'isNew':_0x50f268['isNew'],'hasChanges':_0x50f268[_0x4231b0(0x268)],'diff':_0x50f268[_0x4231b0(0x235)]});}return{'journeyFiles':_0x53f18b,'foldersToCreate':_0x401095};}export function calculateActivationActions(_0x185182,_0x763589,_0x380fd4,_0x599acf){const _0x8f20d6=a110_0x46c66a,_0x3394f8=[],_0x26496d=new Map();for(const _0x1fe158 of _0x763589){_0x26496d[_0x8f20d6(0x238)](_0x1fe158['name'],_0x1fe158);}const _0xe2c211=new Map();for(const _0x4067bb of _0x185182){_0xe2c211['set'](_0x4067bb[_0x8f20d6(0x184)],_0x4067bb);}for(const _0x2d5c4c of _0x185182){const _0x4425da=_0x26496d[_0x8f20d6(0x1c5)](_0x2d5c4c[_0x8f20d6(0x184)]);if(!_0x4425da)_0x3394f8[_0x8f20d6(0x20b)]({'type':_0x8f20d6(0x1fb),'name':_0x2d5c4c['name'],'yamlActivation':_0x2d5c4c});else{const _0x303595=activationResponseToDef(_0x4425da,_0x380fd4,_0x599acf),_0x5dca7a=a110_0x269a6a[_0x8f20d6(0x1ed)](_0x303595),_0x31a6a9=a110_0x269a6a[_0x8f20d6(0x1ed)](_0x2d5c4c);_0x5dca7a!==_0x31a6a9&&_0x3394f8[_0x8f20d6(0x20b)]({'type':_0x8f20d6(0x1bb),'name':_0x2d5c4c['name'],'yamlActivation':_0x2d5c4c,'existingActivation':_0x4425da});}}for(const _0x40cf5d of _0x763589){!_0xe2c211[_0x8f20d6(0x249)](_0x40cf5d['name'])&&_0x3394f8[_0x8f20d6(0x20b)]({'type':_0x8f20d6(0x1b7),'name':_0x40cf5d['name'],'existingActivation':_0x40cf5d});}return _0x3394f8;}function a110_0x5c50(){const _0x52caf1=['deleteSegment','journeyId','trim','values','Deleted\x20activation\x20\x27','activation_','length','\x27\x20from\x20file:\x20','Created\x20journey\x20\x27','idToEmailMap','startsWith','updated','action','has','parentSegmentFolder','segmentFolderId','createJourneySegment','3174486tOUhxf','Activation\x20not\x20found:\x20','activation_updated','617380BIEMjo','parseDocument','journey_updated','Name\x20has\x20already\x20been\x20taken','unchanged','journey','waitCondition','\x27\x20wait\x20condition','198BYpsHV','705868GsvkAf','activationsBySegmentId','find','folderPathToId','activation_updating','digest','filter','__pending_act_','created','activationParams','INTERNAL','journeys','all','index','yamlActivation','hasChanges','journey_entry_criteria_','behavior','./child-segment-yaml.js','reduce','absolutePath','getJourney','NOT_FOUND','list','validatedRequest','name','notification','\x27\x20decision\x20point\x20branch\x20\x27','parentId','goal','isNew','segments','connectionIdToNameMap','segment','\x27\x20milestone','slice','onProgress','localSegmentRules','effectiveFolderId','deleted','journeyBundlesByFolderAndName','15jbYYHx','flatMap','createdSegmentId','map','Segment\x20not\x20found:\x20','segmentNameToId','attributes','includes','Updated\x20segment\x20\x27','add','skipSegments','Updating\x20activation\x20\x27','Created\x20folder\x20\x27','rule','withProgress','all_columns','embeddedSegmentNameToId','journeyActivationNameToId','Stage\x20\x27','progress','getActivation','parse','exitCriterias','folder','relative','Deleted\x20segment\x20\x27','utf-8','journey_created','470227wObluL','journeyById','Deleting\x20activation\x20\x27','journeyBundleName','Journey\x20\x27','state','882368Zdczia','delete','SEGMENT_NOT_FOUND','\x27\x20not\x20found\x20in\x20journey\x20\x27','deps','update','entry','dirname','resolveJourneyId','from','../../utils/async.js','stage\x20\x27','776XfPHok','embedded_activation_created','existingJourney','get','createSegment','activation_creating','toLowerCase','schedule','updateSegmentById','keys','createActivation','\x20activation\x20\x27','\x27\x20for\x20','ACTIVATION_SYNTAX_ERROR','size','nameToId','journey_updating','Updated\x20activation\x20\x27','parentFolder','valid','max','type','replace','split','\x20(referenced\x20in\x20embedded\x20segment\x20\x27','SEGMENT_SYNTAX_ERROR','JOURNEY_UPDATE_ERROR','existingActivation','embedded_activation_creating','relationships','entry_criteria','existingSegments','22680hjQYCE','decision_point','stages','connection','entryCriteria','\x20(referenced\x20in\x20journey\x20','\x27\x20not\x20found\x20in\x20parent\x20segment\x20(referenced\x20in\x20jump\x20step\x20of\x20\x27','WaitStep','yamlConfig','logDeleted','activationActions','stringify','logInfo','Failed\x20to\x20','Creating\x20activation\x20\x27','Created\x20activation\x20\x27','\x20error(s)','entries','logSuccess','folder_creating','SEGMENT_UPDATE_ERROR','getSegment','\x27\x20exit\x20criteria','fetchJourney','isArray','create','hex','sha1','activation_deleted','folderPath','segment_creating','embedded_segment_created','segmentId','rootFolderId','listSegments','message','__pending_','folderId','DecisionPoint','sort','Updated\x20journey\x20\x27','push','journeyActivationStepId','Fetching\x20','steps','null','item','description','JOURNEY_SYNTAX_ERROR','\x0a\x20\x20','with','Entry\x20criteria:\x20','branches','resolveSegment','journeyStages','1235394HWyBuA','embedded_segment_creating','connector_config','Updating\x20segment\x20\x27','activation_deleting','segment_deleting','object','createdSegmentIds','\x27\x20entry\x20criteria','activations','ACTIVATION_UPDATE_ERROR','verbose','versionNumber','milestone','nameToType','columns',').\x20','Failed\x20to\x20sync\x20activations\x20for\x20segment\x20\x27','goal\x20criteria','existingSegment','segmentByFolderAndName','activation_created','segment_updated','join','Creating\x20segment\x20\x27','\x27...','buildUserMaps','Activation','diff','createFolder','segment_created','set','activationContext','data','toString'];a110_0x5c50=function(){return _0x52caf1;};return a110_0x5c50();}export function calculateSegmentDiff(_0x3a9c76,_0x46c46a,_0x3165f1,_0x1a8579,_0x22d2f2){const _0x5346ac=segmentToYamlString(_0x3a9c76);if(_0x46c46a){const _0x5504d1=segmentWithActivationsToYaml(_0x46c46a,_0x3165f1,undefined,_0x1a8579,_0x22d2f2),_0xdaf7b6=segmentToYamlString(_0x5504d1),_0x1ee5d2=generateDiff(_0xdaf7b6,_0x5346ac),_0x2254c0=hasChanges(_0x1ee5d2);return{'isNew':![],'hasChanges':_0x2254c0,'diff':_0x2254c0?formatDiffWithColors(_0x1ee5d2):undefined};}const _0x3a6ec4=generateDiff('',_0x5346ac);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x3a6ec4)};}export function calculateJourneyDiff(_0x54fc42,_0x5eca8f){const _0x3972e4=normalizeJourneyDef(_0x54fc42,_0x54fc42),_0x4e2204=a110_0x42a4ed(_0x3972e4);if(_0x5eca8f){const _0x3e0aa5=normalizeJourneyDef(_0x5eca8f,_0x54fc42),_0x10f475=a110_0x42a4ed(_0x3e0aa5),_0x27b0d7=generateDiff(_0x10f475,_0x4e2204),_0x429bb2=hasChanges(_0x27b0d7);return{'isNew':![],'hasChanges':_0x429bb2,'diff':_0x429bb2?formatDiffWithColors(_0x27b0d7):undefined};}const _0x47f732=generateDiff('',_0x4e2204);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x47f732)};}export function findSegmentsToDelete(_0x9fdbb4,_0x2573df,_0x575c00,_0x452de6,_0x1c7228){const _0x4e772c=a110_0x46c66a,_0x1be065=new Set();for(const {yamlConfig:_0x43558d,folderPath:_0x4ab6d7}of _0x2573df){_0x1be065['add'](_0x4ab6d7+':'+_0x43558d[_0x4e772c(0x184)]);}return _0x9fdbb4['filter'](_0x5db145=>{const _0x4d445c=_0x4e772c,_0x4c5c2b=_0x5db145[_0x4d445c(0x24b)]?_0x575c00[_0x4d445c(0x1c5)](_0x5db145[_0x4d445c(0x24b)]['toString']())||'':'',_0x104fc8=_0x4c5c2b+':'+_0x5db145[_0x4d445c(0x184)];if(_0x1be065[_0x4d445c(0x249)](_0x104fc8))return![];if(_0x1c7228)return _0x4c5c2b===_0x452de6||_0x4c5c2b[_0x4d445c(0x246)](_0x452de6+'/');return!![];});}export function findJourneysToDelete(_0x2b14bc,_0x5914e3,_0x2ce3ea,_0x2eb952,_0x4d0c34){const _0x3ce8a2=a110_0x46c66a,_0x2fc60c=new Set();for(const {yamlConfig:_0x2b56ec,folderPath:_0x1a99b7}of _0x5914e3){_0x2fc60c[_0x3ce8a2(0x19d)](_0x1a99b7+':'+_0x2b56ec[_0x3ce8a2(0x184)]);}return _0x2b14bc[_0x3ce8a2(0x25f)](_0x508fdd=>{const _0x47f3f1=_0x3ce8a2,_0x394682=_0x508fdd[_0x47f3f1(0x207)]?_0x2ce3ea[_0x47f3f1(0x1c5)](_0x508fdd[_0x47f3f1(0x207)])||'':'',_0x3781f7=_0x394682+':'+_0x508fdd[_0x47f3f1(0x1b3)];if(_0x2fc60c[_0x47f3f1(0x249)](_0x3781f7))return![];if(_0x4d0c34)return _0x394682===_0x2eb952||_0x394682[_0x47f3f1(0x246)](_0x2eb952+'/');return!![];});}export function buildSegmentLookupMap(_0x3730f4,_0x19b601){const _0x397d3f=a110_0x46c66a,_0x25e190=new Map();for(const _0x5e0179 of _0x3730f4){const _0x3cf093=_0x5e0179['segmentFolderId']?_0x19b601[_0x397d3f(0x1c5)](_0x5e0179[_0x397d3f(0x24b)][_0x397d3f(0x23b)]())||'':'',_0x8824d1=_0x3cf093+':'+_0x5e0179[_0x397d3f(0x184)];_0x25e190[_0x397d3f(0x238)](_0x8824d1,_0x5e0179);}return _0x25e190;}export function buildSegmentNameToIdMap(_0x13d1de){const _0x1ee915=a110_0x46c66a,_0x33e74b=new Map();for(const _0x129aab of _0x13d1de){_0x33e74b[_0x1ee915(0x238)](_0x129aab[_0x1ee915(0x184)],_0x129aab['id']);}return _0x33e74b;}export function buildJourneyBundleLookupMap(_0x40f0ee,_0x447d69){const _0x1c068f=a110_0x46c66a,_0x2a7ff1=new Map();for(const _0x5d92ce of _0x40f0ee){const _0x59b5b8=_0x5d92ce['folderId']?_0x447d69[_0x1c068f(0x1c5)](_0x5d92ce[_0x1c068f(0x207)])||'':'',_0x43ad43=_0x59b5b8+':'+_0x5d92ce[_0x1c068f(0x1b3)];!_0x2a7ff1['has'](_0x43ad43)&&_0x2a7ff1[_0x1c068f(0x238)](_0x43ad43,[]),_0x2a7ff1[_0x1c068f(0x1c5)](_0x43ad43)[_0x1c068f(0x20b)](_0x5d92ce);}for(const _0x1f8131 of _0x2a7ff1[_0x1c068f(0x23f)]()){_0x1f8131[_0x1c068f(0x209)]((_0x57875d,_0x59a18f)=>(_0x57875d[_0x1c068f(0x225)]||0x0)-(_0x59a18f[_0x1c068f(0x225)]||0x0));}return _0x2a7ff1;}export function collectFoldersToCreate(_0x4c49ab,_0xda0f0f){const _0x3bf074=a110_0x46c66a,_0x1a8149=new Set();for(const _0x252ee7 of _0x4c49ab){if(!_0x252ee7)continue;if(_0xda0f0f[_0x3bf074(0x249)](_0x252ee7))continue;const _0x49a45e=_0x252ee7[_0x3bf074(0x1d9)]('/');let _0x3c2208='';for(const _0x527f6a of _0x49a45e){_0x3c2208=_0x3c2208?_0x3c2208+'/'+_0x527f6a:_0x527f6a,!_0xda0f0f[_0x3bf074(0x249)](_0x3c2208)&&_0x1a8149[_0x3bf074(0x19d)](_0x3c2208);}}return _0x1a8149;}export function parseAndClassifyYamlFiles(_0x40be02,_0x439909,_0x3a5fda){const _0x393bc9=a110_0x46c66a,_0x3adc43=[],_0x50a59e=[];for(const _0x494131 of _0x40be02){const _0xe2ed0b=a110_0x4332fc[_0x393bc9(0x1ac)](_0x439909,a110_0x4332fc[_0x393bc9(0x1bd)](_0x494131)),_0xbef723=_0xe2ed0b==='.'?'':_0xe2ed0b,_0x46389d=readFileSync(_0x494131,_0x393bc9(0x1ae)),_0x42e142=a110_0x269a6a[_0x393bc9(0x1a9)](_0x46389d);if(isJourneyDef(_0x42e142)){const _0x23f18e=a110_0x4cd4ff(_0x46389d);_0x50a59e[_0x393bc9(0x20b)]({'yamlConfig':_0x23f18e,'folderPath':_0xbef723,'sourcePath':_0x494131});}else{if(!_0x3a5fda?.[_0x393bc9(0x19e)]){const _0x49dc4b=parseSegmentYamlFile(_0x46389d),_0x1fba26=normalizeChildSegmentYaml(_0x49dc4b);_0x3adc43['push']({'yamlConfig':_0x1fba26,'folderPath':_0xbef723,'sourcePath':_0x494131});}}}return{'segments':_0x3adc43,'journeys':_0x50a59e};}export function validateParsedFiles(_0x4b0d36,_0x3d7265){const _0x193981=a110_0x46c66a,_0x50054d=[];for(const {yamlConfig:_0x3b6534,sourcePath:_0xc708e1}of _0x4b0d36[_0x193981(0x18a)]){const _0x58a8b2=readFileSync(_0xc708e1,_0x193981(0x1ae)),_0x5b1067=a110_0x269a6a[_0x193981(0x251)](_0x58a8b2),_0x2fa93a=validateSegmentDef(_0x3b6534,{'source':_0x58a8b2,'document':_0x5b1067});if(!_0x2fa93a[_0x193981(0x1d5)]){const _0x1f10db=a110_0x4332fc[_0x193981(0x1ac)](_0x3d7265,_0xc708e1);_0x50054d[_0x193981(0x20b)]({'filePath':_0x1f10db,'source':_0x58a8b2,'result':_0x2fa93a,'isJourney':![]});}}for(const {yamlConfig:_0x28dec3,sourcePath:_0x5c5bb1}of _0x4b0d36[_0x193981(0x264)]){const _0x3293b9=readFileSync(_0x5c5bb1,_0x193981(0x1ae)),_0x481773=a110_0x269a6a[_0x193981(0x251)](_0x3293b9),_0x519468=validateJourneyDef(_0x28dec3,{'source':_0x3293b9,'document':_0x481773});if(!_0x519468[_0x193981(0x1d5)]){const _0x522f16=a110_0x4332fc['relative'](_0x3d7265,_0x5c5bb1);_0x50054d[_0x193981(0x20b)]({'filePath':_0x522f16,'source':_0x3293b9,'result':_0x519468,'isJourney':!![]});}}return _0x50054d;}export function formatValidationErrors(_0x4855e1){const _0x351051=a110_0x46c66a,_0x2a5eea=[];for(const {filePath:_0x2c4af7,source:_0x1f3c13,result:_0x228ce3,isJourney:_0x1dc70e}of _0x4855e1){const _0x11a976=_0x1dc70e?_0x351051(0x255):_0x351051(0x18c);_0x2a5eea[_0x351051(0x20b)]('\x0a'+_0x2c4af7+'\x20('+_0x11a976+'):\x20'+_0x228ce3['errors'][_0x351051(0x242)]+_0x351051(0x1f2)),_0x2a5eea[_0x351051(0x20b)](formatValidationResult(_0x228ce3,_0x1f3c13,_0x2c4af7));}return _0x2a5eea[_0x351051(0x230)]('\x0a');}function a110_0x68a9(_0x1bb26d,_0xa6fa0f){_0x1bb26d=_0x1bb26d-0x183;const _0x5c50e0=a110_0x5c50();let _0x68a98b=_0x5c50e0[_0x1bb26d];return _0x68a98b;}export function buildLocalExpandedRuleMappings(_0x304280){const _0x183384=a110_0x46c66a,_0x55594e=new Set(),_0x207f13=new Map(),_0x3e3646=collectSegmentUsageCounts(_0x304280);if(_0x304280[_0x183384(0x18a)])for(const [_0x3cff57,_0x46b5cc]of Object[_0x183384(0x1f3)](_0x304280[_0x183384(0x18a)])){_0x55594e['add'](_0x3cff57);if(_0x46b5cc[_0x183384(0x1a1)]){const _0x5b4524=yamlRuleToApi(_0x46b5cc[_0x183384(0x1a1)]),_0x3cee43=apiRuleToYaml(_0x5b4524);_0x207f13[_0x183384(0x238)](_0x3cff57,_0x3cee43);}}const _0x2cf50e=new Map();let _0x30e317=0x0;for(const [_0x1c7468,_0x57fc39]of _0x207f13){const _0x318d1f=serializeExpandedRule(_0x57fc39,_0x207f13),_0x9d167f=_0x2cf50e[_0x183384(0x1c5)](_0x318d1f)||[];_0x9d167f[_0x183384(0x20b)]({'name':_0x1c7468,'index':_0x30e317}),_0x2cf50e[_0x183384(0x238)](_0x318d1f,_0x9d167f),_0x30e317++;}const _0xc0e4b1=new Map();for(const [_0x203088,_0x4d9f8d]of _0x2cf50e){const _0x1c6991=_0x4d9f8d[_0x183384(0x18e)]()[_0x183384(0x209)]((_0x8c9146,_0x19580f)=>{const _0x26a505=_0x183384,_0x369d28=_0x3e3646[_0x26a505(0x1c5)](_0x8c9146[_0x26a505(0x184)])||0x0,_0x5e6071=_0x3e3646[_0x26a505(0x1c5)](_0x19580f['name'])||0x0;if(_0x369d28!==_0x5e6071)return _0x5e6071-_0x369d28;return _0x8c9146[_0x26a505(0x266)]-_0x19580f[_0x26a505(0x266)];})[_0x183384(0x197)](_0xef1e6c=>_0xef1e6c[_0x183384(0x184)]),_0x5e0d6e=[];for(const _0x44599b of _0x1c6991){const _0x1d4ac6=_0x3e3646[_0x183384(0x1c5)](_0x44599b)||0x0,_0x1384e4=Math[_0x183384(0x1d6)](_0x1d4ac6,0x1);for(let _0x491495=0x0;_0x491495<_0x1384e4;_0x491495++){_0x5e0d6e['push'](_0x44599b);}}_0xc0e4b1[_0x183384(0x238)](_0x203088,_0x5e0d6e);}return{'existingLocalSegmentNames':_0x55594e,'localSegmentRules':_0x207f13,'localExpandedRuleToNames':_0xc0e4b1};}async function buildServerSegmentRuleMap(_0x4bbec0,_0x400331,_0x5695f5,_0x3885c2){const _0x3067e7=new Map(),_0x30da80=new Set(),_0x31e8a6=async _0x144999=>{const _0x171512=a110_0x68a9;if(_0x30da80['has'](_0x144999))return;_0x30da80[_0x171512(0x19d)](_0x144999);let _0x38499b=_0x5695f5[_0x171512(0x25b)](_0x4deed7=>_0x4deed7['id']===_0x144999);if(!_0x38499b)try{_0x38499b=await _0x4bbec0[_0x171512(0x18c)][_0x171512(0x1f7)](_0x400331,_0x144999);}catch{return;}if(!_0x38499b?.[_0x171512(0x1a1)])return;const _0x40e6ba=apiRuleToYaml(_0x38499b[_0x171512(0x1a1)]);_0x3067e7[_0x171512(0x238)](_0x144999,_0x40e6ba);const _0x314f0d=collectSegmentRefsFromRule(_0x40e6ba);for(const _0x4eb8ab of _0x314f0d){await _0x31e8a6(_0x4eb8ab);}};for(const _0x3ac64c of _0x3885c2){await _0x31e8a6(_0x3ac64c);}return _0x3067e7;}export function createSegmentIdResolver(_0x54eea9,_0x57da02){return async _0x2b9ef3=>{const _0x4c6125=a110_0x68a9,_0x382502=_0x54eea9['get'](_0x2b9ef3);if(!_0x382502)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x4c6125(0x198)+_0x2b9ef3+_0x4c6125(0x1da)+_0x57da02+'\x27)');return _0x382502;};}export function extractRootFolderId(_0x29eceb){const _0x91e3cb=a110_0x46c66a;return _0x29eceb[_0x91e3cb(0x1df)]?.[_0x91e3cb(0x24a)]?.['data']?.['id']||_0x29eceb['relationships']?.[_0x91e3cb(0x1d4)]?.[_0x91e3cb(0x23a)]?.['id'];}export function buildConnectionMaps(_0xb965e8){const _0x41e33d=a110_0x46c66a,_0x590197=new Map(),_0x1245ae=new Map(),_0x472d91=new Map();for(const _0x5eaa99 of _0xb965e8){_0x590197[_0x41e33d(0x238)](_0x5eaa99[_0x41e33d(0x184)],parseInt(_0x5eaa99['id'],0xa)),_0x1245ae[_0x41e33d(0x238)](_0x5eaa99['id'],_0x5eaa99[_0x41e33d(0x184)]),_0x472d91['set'](_0x5eaa99[_0x41e33d(0x184)],_0x5eaa99[_0x41e33d(0x1d7)]);}return{'nameToId':_0x590197,'idToName':_0x1245ae,'nameToType':_0x472d91};}export function calculatePushStats(_0x2e3816,_0x135f71,_0x36b020,_0x3444b9,_0x517f52,_0x24b66d,_0x8e210a){const _0x4113c4=a110_0x46c66a,_0x1d2ea9=_0x2e3816[_0x4113c4(0x25f)](_0x3288eb=>_0x3288eb[_0x4113c4(0x189)]),_0xbdb501=_0x2e3816[_0x4113c4(0x25f)](_0x360fdf=>!_0x360fdf[_0x4113c4(0x189)]&&_0x360fdf[_0x4113c4(0x268)]),_0x4b085e=_0x2e3816[_0x4113c4(0x25f)](_0x5eb410=>!_0x5eb410[_0x4113c4(0x189)]&&!_0x5eb410[_0x4113c4(0x268)]),_0xc77862=_0x24b66d?_0x3444b9:[],_0x3d3af=_0x135f71[_0x4113c4(0x25f)](_0x39e2e5=>_0x39e2e5[_0x4113c4(0x189)]),_0x5c3632=_0x135f71[_0x4113c4(0x25f)](_0x376b08=>!_0x376b08['isNew']&&_0x376b08[_0x4113c4(0x268)]),_0x3e769d=_0x135f71[_0x4113c4(0x25f)](_0x2eb861=>!_0x2eb861[_0x4113c4(0x189)]&&!_0x2eb861[_0x4113c4(0x268)]),_0x455105=_0x24b66d?_0x517f52:[],_0x150dbc=_0x2e3816[_0x4113c4(0x195)](_0x276c4c=>_0x276c4c[_0x4113c4(0x1ec)]),_0x31fdf7=_0x150dbc[_0x4113c4(0x25f)](_0x4861de=>_0x4861de['type']===_0x4113c4(0x1fb)),_0x4f5d7e=_0x150dbc[_0x4113c4(0x25f)](_0x4e1989=>_0x4e1989['type']===_0x4113c4(0x1bb)),_0x1c7a3a=_0x150dbc[_0x4113c4(0x25f)](_0x3ec52f=>_0x3ec52f['type']===_0x4113c4(0x1b7)),_0x42a384=Array[_0x4113c4(0x1bf)](_0x36b020)[_0x4113c4(0x209)](),_0x12a9c1=_0x8e210a?![]:_0x1d2ea9['length']>0x0||_0xbdb501[_0x4113c4(0x242)]>0x0||_0xc77862[_0x4113c4(0x242)]>0x0,_0x1af92d=_0x3d3af['length']>0x0||_0x5c3632['length']>0x0||_0x455105[_0x4113c4(0x242)]>0x0,_0x736632=_0x8e210a?![]:_0x150dbc[_0x4113c4(0x242)]>0x0,_0x551b30=_0x42a384[_0x4113c4(0x242)]>0x0;return{'segments':{'new':_0x1d2ea9,'changed':_0xbdb501,'unchanged':_0x4b085e,'toDelete':_0xc77862},'journeys':{'new':_0x3d3af,'changed':_0x5c3632,'unchanged':_0x3e769d,'toDelete':_0x455105},'activations':{'all':_0x150dbc,'toCreate':_0x31fdf7,'toUpdate':_0x4f5d7e,'toDelete':_0x1c7a3a},'folders':{'toCreate':_0x42a384},'counts':{'segments':{'new':_0x1d2ea9[_0x4113c4(0x242)],'changed':_0xbdb501[_0x4113c4(0x242)],'unchanged':_0x4b085e['length'],'toDelete':_0xc77862[_0x4113c4(0x242)]},'journeys':{'new':_0x3d3af[_0x4113c4(0x242)],'changed':_0x5c3632[_0x4113c4(0x242)],'unchanged':_0x3e769d['length'],'toDelete':_0x455105['length']},'activations':{'create':_0x31fdf7[_0x4113c4(0x242)],'update':_0x4f5d7e['length'],'delete':_0x1c7a3a[_0x4113c4(0x242)]},'folders':_0x42a384[_0x4113c4(0x242)]},'hasChanges':_0x12a9c1||_0x1af92d||_0x736632||_0x551b30};}export async function buildPushExecutionContext(_0x3abfac,_0x134f3d,_0x285013,_0x25650e,_0x31ae67,_0x3f7809){const _0xbc3321=a110_0x46c66a,_0x4bbb5d=extractRootFolderId(_0x285013),{pathToId:_0x506d08,idToPath:_0x5abffa}=buildFolderMaps(_0x31ae67),_0x106467=buildSegmentNameToIdMap(_0x25650e),_0x407af9=new Map(),{batchAsync:_0x3e0113}=await import(_0xbc3321(0x1c0)),[_0x16cb88,_0x3448a0]=await Promise['all']([_0x3abfac['user'][_0xbc3321(0x233)](),_0x3abfac[_0xbc3321(0x1e5)][_0xbc3321(0x270)](),((async()=>{const _0x53cf3b=_0xbc3321;!_0x3f7809&&_0x25650e[_0x53cf3b(0x242)]>0x0&&await _0x3e0113(_0x25650e,async _0xb2b5bf=>{const _0x3f9a3b=_0x53cf3b,_0x267f36=await _0x3abfac['segment']['listActivations'](_0x134f3d,_0xb2b5bf['id']);_0x407af9[_0x3f9a3b(0x238)](_0xb2b5bf['id'],_0x267f36);});})())]),{emailToId:_0x38cdcf,idToEmail:_0x57f8d1}=_0x16cb88,_0x428d5f=buildConnectionMaps(_0x3448a0);return{'rootFolderId':_0x4bbb5d,'folderPathToId':_0x506d08,'folderIdToPath':_0x5abffa,'segmentNameToId':_0x106467,'activationsBySegmentId':_0x407af9,'emailToIdMap':_0x38cdcf,'idToEmailMap':_0x57f8d1,'connectionNameToIdMap':_0x428d5f[_0xbc3321(0x1d1)],'connectionIdToNameMap':_0x428d5f['idToName'],'connectionNameToTypeMap':_0x428d5f[_0xbc3321(0x227)]};}export function createPushYamlContextForBundle(_0x147273,_0xeee272,_0x2fa8c2,_0x50cec8,_0x1a971f,_0x3350df,_0x24a4e8,_0x370f7c){const {existingLocalSegmentNames:_0x1ce05a,localExpandedRuleToNames:_0x17a994}=_0x50cec8,_0x461da1=new Set(),_0x4a1d77=new Map(),_0x465534=new Map(),_0x353add=new Map(),_0x2364f9=createJumpTargetCache(),_0x58bd0d=new Map(),_0x54d88b=new Map(),_0x743635=new Set();let _0x2f4938;const _0x35dfd6=_0x327ab7=>{const _0x41afd9={'resolveSegment':async _0x81a93c=>{const _0x4644d6=a110_0x68a9,_0x5f19a6=_0x353add[_0x4644d6(0x1c5)](_0x81a93c);if(_0x5f19a6!==undefined)return{'name':_0x5f19a6,'isJourneyLocal':!![]};try{let _0x1e5c71=_0x2fa8c2[_0x4644d6(0x25b)](_0xa8acf=>_0xa8acf['id']===_0x81a93c);!_0x1e5c71&&(_0x1e5c71=await _0x147273['segment']['getSegment'](_0xeee272,_0x81a93c));const _0x1e9775=generateJourneyLocalName(_0x1e5c71[_0x4644d6(0x184)]),_0x24601e=_0x1e5c71['kind']===SEGMENT_KIND_JOURNEY&&_0x1e9775!==undefined;let _0x55fdff=_0x1e5c71[_0x4644d6(0x184)],_0xb9da19;if(_0x24601e&&_0x1e5c71[_0x4644d6(0x1a1)]){const _0x362415=apiRuleToYaml(_0x1e5c71['rule']);_0x54d88b[_0x4644d6(0x238)](_0x81a93c,_0x362415);const _0x40d2ec=async _0x91b137=>{const _0x390df4=_0x4644d6,_0x770794=collectSegmentRefsFromRule(_0x91b137);for(const _0xf1731f of _0x770794){if(!_0x54d88b['has'](_0xf1731f))try{const _0x47dd88=await _0x147273[_0x390df4(0x18c)]['getSegment'](_0xeee272,_0xf1731f);if(_0x47dd88?.[_0x390df4(0x1a1)]){const _0x39696f=apiRuleToYaml(_0x47dd88[_0x390df4(0x1a1)]);_0x54d88b[_0x390df4(0x238)](_0xf1731f,_0x39696f),await _0x40d2ec(_0x39696f);}}catch{}}};await _0x40d2ec(_0x362415);const _0x5340fb=serializeExpandedRule(_0x362415,_0x54d88b),_0x5ac3e0=_0x17a994[_0x4644d6(0x1c5)](_0x5340fb);if(_0x5ac3e0&&_0x5ac3e0[_0x4644d6(0x242)]>0x0){const _0x5bd499=_0x4a1d77[_0x4644d6(0x1c5)](_0x5340fb)||0x0,_0x1b6e8c=_0x5ac3e0[_0x5bd499]||_0x5ac3e0[_0x5ac3e0[_0x4644d6(0x242)]-0x1];_0x4a1d77[_0x4644d6(0x238)](_0x5340fb,_0x5bd499+0x1),_0x55fdff=_0x1b6e8c,_0x461da1['add'](_0x55fdff),_0x353add[_0x4644d6(0x238)](_0x81a93c,_0x55fdff);const _0x459b67=await resolveRuleSegmentRefs(_0x362415,async _0x459159=>{const _0x31e101=_0x4644d6,_0x234e50=_0x353add['get'](_0x459159);if(_0x234e50)return _0x234e50;const _0x1be7c4=await _0x2f4938[_0x31e101(0x217)](_0x459159);return _0x1be7c4[_0x31e101(0x184)];});_0xb9da19={'description':_0x1e5c71[_0x4644d6(0x211)],'rule':_0x459b67};}else{const _0x3c20ab=_0x58bd0d[_0x4644d6(0x1c5)](_0x5340fb);if(_0x3c20ab)_0x55fdff=_0x3c20ab,_0x353add[_0x4644d6(0x238)](_0x81a93c,_0x55fdff);else{if(_0x1e9775){let _0x30b666=_0x1e9775,_0x240743=0x2;while(_0x461da1['has'](_0x30b666)||_0x1ce05a[_0x4644d6(0x249)](_0x30b666)){_0x30b666=_0x1e9775+'_'+_0x240743,_0x240743++;}_0x461da1[_0x4644d6(0x19d)](_0x30b666),_0x55fdff=_0x30b666;}_0x353add['set'](_0x81a93c,_0x55fdff),_0x58bd0d[_0x4644d6(0x238)](_0x5340fb,_0x55fdff);const _0x230f62=await resolveRuleSegmentRefs(_0x362415,async _0x50250=>{const _0x29dfad=_0x4644d6,_0x2e4a9a=_0x353add[_0x29dfad(0x1c5)](_0x50250);if(_0x2e4a9a)return _0x2e4a9a;const _0x35c47c=await _0x2f4938[_0x29dfad(0x217)](_0x50250);return _0x35c47c[_0x29dfad(0x184)];});_0xb9da19={'description':_0x1e5c71[_0x4644d6(0x211)],'rule':_0x230f62};}}}return{'name':_0x55fdff,'isJourneyLocal':_0x24601e,'definition':_0xb9da19};}catch{return{'name':_0x81a93c,'isJourneyLocal':![]};}},'resolveActivation':async _0x2418c3=>{const _0x35266c=a110_0x68a9,_0xe93149=_0x465534['get'](_0x2418c3);if(_0xe93149!==undefined)return{'name':_0xe93149,'isJourneyLocal':!![]};try{let _0x473e97=_0x24a4e8?.[_0x35266c(0x1c5)](_0x2418c3);!_0x473e97&&(_0x473e97=await _0x147273['journey'][_0x35266c(0x1a8)](_0x327ab7,_0x2418c3));const _0x510d22=_0x473e97[_0x35266c(0x19a)][_0x35266c(0x262)][_0x35266c(0x184)]||_0x2418c3,_0xe5c5de=sanitizeYamlKey(_0x510d22)||_0x35266c(0x241)+_0x2418c3,_0x1bf8bc=_0xe5c5de;_0x465534['set'](_0x2418c3,_0x1bf8bc);const _0x5eb990=journeyActivationStepToYaml(_0x473e97,_0x1a971f,_0x3350df);return{'name':_0x1bf8bc,'isJourneyLocal':!![],'definition':_0x5eb990};}catch{return{'name':_0x2418c3,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x50e754,_0x167b1d)=>resolveJumpTarget(_0x50e754,_0x167b1d,_0x2364f9,async _0x5dd4d9=>{const _0xbc6751=a110_0x68a9,_0x18e48c=_0x370f7c?.[_0xbc6751(0x1c5)](_0x5dd4d9);if(_0x18e48c)return _0x18e48c;return _0x147273[_0xbc6751(0x255)]['getJourney'](_0x5dd4d9);})};return _0x2f4938=_0x41afd9,_0x41afd9;},_0x2cfdf0=async _0x569e99=>{const _0x271b1a=a110_0x68a9,{collectSegmentIdsFromJourneyApi:_0xea02dd}=await import('./journey-yaml.js'),{batchAsync:_0x31fb0f}=await import(_0x271b1a(0x1c0)),_0x488474=new Set();for(const _0x5c02f0 of _0x569e99){let _0x38cf13=_0x370f7c?.[_0x271b1a(0x1c5)](_0x5c02f0);!_0x38cf13&&(_0x38cf13=await _0x147273[_0x271b1a(0x255)][_0x271b1a(0x26e)](_0x5c02f0));const _0x13858c=_0xea02dd(_0x38cf13);for(const _0x53ec8c of _0x13858c){_0x488474[_0x271b1a(0x19d)](_0x53ec8c);}}let _0x3aeeda=Array[_0x271b1a(0x1bf)](_0x488474);while(_0x3aeeda[_0x271b1a(0x242)]>0x0){const _0x176d08=_0x3aeeda[_0x271b1a(0x25f)](_0x5a81e5=>!_0x743635[_0x271b1a(0x249)](_0x5a81e5));if(_0x176d08['length']===0x0)break;const _0x194c3a=await _0x31fb0f(_0x176d08,async _0x5080b8=>{const _0x1491f0=_0x271b1a;_0x743635[_0x1491f0(0x19d)](_0x5080b8);let _0x2a5571=_0x2fa8c2[_0x1491f0(0x25b)](_0x215b70=>_0x215b70['id']===_0x5080b8);if(!_0x2a5571)try{_0x2a5571=await _0x147273[_0x1491f0(0x18c)][_0x1491f0(0x1f7)](_0xeee272,_0x5080b8);}catch{return null;}return{'segmentId':_0x5080b8,'segment':_0x2a5571};},0xa),_0x2a5576=new Set();for(const _0x5c06c6 of _0x194c3a){if(!_0x5c06c6?.[_0x271b1a(0x18c)]?.[_0x271b1a(0x1a1)])continue;const _0x34110a=apiRuleToYaml(_0x5c06c6[_0x271b1a(0x18c)][_0x271b1a(0x1a1)]);_0x54d88b[_0x271b1a(0x238)](_0x5c06c6[_0x271b1a(0x202)],_0x34110a);const _0x1e7bb7=collectSegmentRefsFromRule(_0x34110a);for(const _0x1e349f of _0x1e7bb7){!_0x743635[_0x271b1a(0x249)](_0x1e349f)&&_0x2a5576[_0x271b1a(0x19d)](_0x1e349f);}}_0x3aeeda=Array[_0x271b1a(0x1bf)](_0x2a5576);}};return{'createYamlContext':_0x35dfd6,'prefetchJourneySegments':_0x2cfdf0};}export async function executePushSegments(_0x3daed7,_0x139842,_0x1f271f,_0x3b0fca,_0x5e5495){const _0x22c684=a110_0x46c66a,{segmentDefToCreateRequest:_0x38a129,segmentDefToUpdateRequest:_0x4f5df9}=await import('./child-segment-yaml.js'),_0x5bc39e=_0x1f271f[_0x22c684(0x25c)],_0x56b3f0=0x5,_0x265f5a=async _0x14e968=>{const _0x14b4c7=_0x22c684,_0x5172d2=_0x14e968['folderPath']?_0x5bc39e['get'](_0x14e968['folderPath']):undefined;let _0xcd2e16;const _0x4d6071={'created':0x0,'updated':0x0,'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};try{if(_0x14e968[_0x14b4c7(0x189)]){_0x5e5495[_0x14b4c7(0x18f)]?.({'type':_0x14b4c7(0x200),'name':_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)]});const _0x2ef8f8=_0x38a129(_0x14e968['yamlConfig'],_0x5172d2),_0x2c69ca=await _0x5e5495[_0x14b4c7(0x1a2)](_0x14b4c7(0x231)+_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)]+_0x14b4c7(0x232),()=>_0x3daed7[_0x14b4c7(0x18c)][_0x14b4c7(0x1c6)](_0x3b0fca[_0x14b4c7(0x187)],_0x2ef8f8));_0xcd2e16=_0x2c69ca[_0x14b4c7(0x23a)]['id'],_0x4d6071[_0x14b4c7(0x196)]={'name':_0x14e968[_0x14b4c7(0x1ea)]['name'],'id':_0xcd2e16},_0x5e5495[_0x14b4c7(0x18f)]?.({'type':_0x14b4c7(0x237),'name':_0x14e968['yamlConfig'][_0x14b4c7(0x184)],'segmentId':_0xcd2e16}),_0x5e5495[_0x14b4c7(0x1f4)]?.('Created\x20segment\x20\x27'+_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)]+'\x27'),_0x4d6071[_0x14b4c7(0x261)]=0x1;}else{if(_0x14e968[_0x14b4c7(0x268)]){_0x5e5495[_0x14b4c7(0x18f)]?.({'type':'segment_updating','name':_0x14e968[_0x14b4c7(0x1ea)]['name']});const _0xea349=_0x4f5df9(_0x14e968[_0x14b4c7(0x1ea)]);_0x5172d2!==_0x14e968[_0x14b4c7(0x22c)]?.['segmentFolderId']&&(_0xea349[_0x14b4c7(0x24b)]=_0x5172d2?parseInt(_0x5172d2,0xa):undefined),await _0x5e5495[_0x14b4c7(0x1a2)](_0x14b4c7(0x21c)+_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)]+_0x14b4c7(0x232),()=>_0x3daed7[_0x14b4c7(0x18c)][_0x14b4c7(0x1ca)](_0x3b0fca[_0x14b4c7(0x187)],_0x14e968['existingSegment']['id'],_0xea349)),_0xcd2e16=_0x14e968['existingSegment']['id'],_0x5e5495[_0x14b4c7(0x18f)]?.({'type':_0x14b4c7(0x22f),'name':_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)]}),_0x5e5495[_0x14b4c7(0x1f4)]?.(_0x14b4c7(0x19c)+_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)]+'\x27'),_0x4d6071['updated']=0x1;}else _0xcd2e16=_0x14e968['existingSegment']['id'];}}catch(_0x3a633e){const _0xa10f2a=isHttp400Error(_0x3a633e),_0x45d82f=_0xa10f2a?ErrorCode[_0x14b4c7(0x1db)]:ErrorCode[_0x14b4c7(0x1f6)],_0x2ebb52=getErrorMessage(_0x3a633e);throw new SDKError(_0x45d82f,_0x14b4c7(0x1ef)+(_0x14e968[_0x14b4c7(0x189)]?_0x14b4c7(0x1fb):'update')+'\x20segment\x20from\x20file:\x20'+_0x14e968[_0x14b4c7(0x26d)]+_0x14b4c7(0x213)+_0x2ebb52,_0x3a633e);}try{const _0x1a6668=await syncActivationsForSegment(_0x3daed7,_0x3b0fca[_0x14b4c7(0x187)],_0xcd2e16,_0x14e968[_0x14b4c7(0x1ea)][_0x14b4c7(0x184)],_0x14e968[_0x14b4c7(0x1ec)],_0x5e5495,_0x14e968[_0x14b4c7(0x26d)]);_0x4d6071[_0x14b4c7(0x222)]=_0x1a6668;}catch(_0x7c0e0a){if(_0x7c0e0a instanceof SDKError)throw _0x7c0e0a;throw new SDKError(ErrorCode[_0x14b4c7(0x223)],_0x14b4c7(0x22a)+_0x14e968['yamlConfig']['name']+_0x14b4c7(0x243)+_0x14e968['absolutePath']+'\x0a\x20\x20'+getErrorMessage(_0x7c0e0a),_0x7c0e0a);}return _0x4d6071;},_0x32f272=await batchAsync(_0x139842,_0x265f5a,_0x56b3f0),_0x41a089={'created':0x0,'updated':0x0,'deleted':0x0,'createdSegmentIds':new Map(),'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};for(const _0x361f54 of _0x32f272){_0x41a089['created']+=_0x361f54[_0x22c684(0x261)],_0x41a089['updated']+=_0x361f54['updated'],_0x361f54[_0x22c684(0x196)]&&_0x41a089[_0x22c684(0x220)][_0x22c684(0x238)](_0x361f54[_0x22c684(0x196)][_0x22c684(0x184)],_0x361f54[_0x22c684(0x196)]['id']),_0x41a089['activations']['created']+=_0x361f54[_0x22c684(0x222)]['created'],_0x41a089[_0x22c684(0x222)][_0x22c684(0x247)]+=_0x361f54[_0x22c684(0x222)][_0x22c684(0x247)],_0x41a089[_0x22c684(0x222)][_0x22c684(0x192)]+=_0x361f54[_0x22c684(0x222)]['deleted'];}return _0x41a089;}async function syncActivationsForSegment(_0x2c294d,_0x4462ef,_0xc4da0f,_0x2f0156,_0x4f942c,_0x40d8bf,_0x3d4572){const _0x4cb143=a110_0x46c66a,_0x209bb6={'created':0x0,'updated':0x0,'deleted':0x0};for(const _0x23ea2a of _0x4f942c){try{if(_0x23ea2a[_0x4cb143(0x1d7)]==='create'&&_0x23ea2a['validatedRequest'])_0x40d8bf[_0x4cb143(0x18f)]?.({'type':_0x4cb143(0x1c7),'segmentName':_0x2f0156,'activationName':_0x23ea2a[_0x4cb143(0x184)]}),await _0x40d8bf[_0x4cb143(0x1a2)](_0x4cb143(0x1f0)+_0x23ea2a[_0x4cb143(0x184)]+_0x4cb143(0x232),()=>_0x2c294d[_0x4cb143(0x18c)][_0x4cb143(0x1cc)](_0x4462ef,_0xc4da0f,_0x23ea2a[_0x4cb143(0x183)])),_0x40d8bf['onProgress']?.({'type':_0x4cb143(0x22e),'segmentName':_0x2f0156,'activationName':_0x23ea2a['name']}),_0x40d8bf[_0x4cb143(0x1f4)]?.(_0x4cb143(0x1f1)+_0x23ea2a[_0x4cb143(0x184)]+'\x27'),_0x209bb6[_0x4cb143(0x261)]++;else{if(_0x23ea2a[_0x4cb143(0x1d7)]===_0x4cb143(0x1bb)&&_0x23ea2a[_0x4cb143(0x183)]&&_0x23ea2a[_0x4cb143(0x1dd)])_0x40d8bf[_0x4cb143(0x18f)]?.({'type':_0x4cb143(0x25d),'segmentName':_0x2f0156,'activationName':_0x23ea2a[_0x4cb143(0x184)]}),await _0x40d8bf[_0x4cb143(0x1a2)](_0x4cb143(0x19f)+_0x23ea2a['name']+_0x4cb143(0x232),()=>_0x2c294d[_0x4cb143(0x18c)]['updateActivation'](_0x4462ef,_0xc4da0f,_0x23ea2a[_0x4cb143(0x1dd)]['id'],_0x23ea2a[_0x4cb143(0x183)])),_0x40d8bf['onProgress']?.({'type':_0x4cb143(0x24f),'segmentName':_0x2f0156,'activationName':_0x23ea2a[_0x4cb143(0x184)]}),_0x40d8bf[_0x4cb143(0x1f4)]?.(_0x4cb143(0x1d3)+_0x23ea2a[_0x4cb143(0x184)]+'\x27'),_0x209bb6[_0x4cb143(0x247)]++;else _0x23ea2a[_0x4cb143(0x1d7)]===_0x4cb143(0x1b7)&&_0x23ea2a['existingActivation']&&(_0x40d8bf[_0x4cb143(0x18f)]?.({'type':_0x4cb143(0x21d),'segmentName':_0x2f0156,'activationName':_0x23ea2a[_0x4cb143(0x184)]}),await _0x40d8bf[_0x4cb143(0x1a2)](_0x4cb143(0x1b2)+_0x23ea2a[_0x4cb143(0x184)]+_0x4cb143(0x232),()=>_0x2c294d[_0x4cb143(0x18c)]['deleteActivation'](_0x4462ef,_0xc4da0f,_0x23ea2a[_0x4cb143(0x1dd)]['id'])),_0x40d8bf['onProgress']?.({'type':_0x4cb143(0x1fe),'segmentName':_0x2f0156,'activationName':_0x23ea2a[_0x4cb143(0x184)]}),_0x40d8bf[_0x4cb143(0x1eb)]?.(_0x4cb143(0x240)+_0x23ea2a[_0x4cb143(0x184)]+'\x27'),_0x209bb6[_0x4cb143(0x192)]++);}}catch(_0x5296f6){const _0x5142b6=isHttp400Error(_0x5296f6),_0x5d22d1=_0x5142b6?ErrorCode[_0x4cb143(0x1cf)]:ErrorCode[_0x4cb143(0x223)],_0x3186b1=getErrorMessage(_0x5296f6);throw new SDKError(_0x5d22d1,_0x4cb143(0x1ef)+_0x23ea2a[_0x4cb143(0x1d7)]+_0x4cb143(0x1cd)+_0x23ea2a[_0x4cb143(0x184)]+_0x4cb143(0x243)+_0x3d4572+_0x4cb143(0x213)+_0x3186b1,_0x5296f6);}}return _0x209bb6;}export async function executePushFolders(_0x5b2961,_0x116437,_0x1fb0ff,_0x258900,_0x14dd53){const _0x490e7b=a110_0x46c66a,_0x18518b=new Map(_0x1fb0ff);for(const _0x13ed36 of _0x116437){const _0x5b7a38=_0x13ed36[_0x490e7b(0x1d9)]('/'),_0x49035b=_0x5b7a38[_0x5b7a38['length']-0x1],_0x2b7ab3=_0x5b7a38[_0x490e7b(0x18e)](0x0,-0x1)[_0x490e7b(0x230)]('/'),_0x7c5c44=_0x18518b['get'](_0x2b7ab3);_0x14dd53[_0x490e7b(0x18f)]?.({'type':_0x490e7b(0x1f5),'folder':_0x13ed36});const _0x616f8f={'name':_0x49035b,'parentFolderId':_0x7c5c44},_0x4eef05=await _0x14dd53[_0x490e7b(0x1a2)]('Creating\x20folder\x20\x27'+_0x13ed36+_0x490e7b(0x232),()=>_0x5b2961[_0x490e7b(0x18c)][_0x490e7b(0x236)](_0x258900[_0x490e7b(0x187)],_0x616f8f));_0x18518b['set'](_0x13ed36,_0x4eef05[_0x490e7b(0x23a)]['id']),_0x14dd53['onProgress']?.({'type':'folder_created','folder':_0x13ed36,'folderId':_0x4eef05['data']['id']}),_0x14dd53[_0x490e7b(0x1ee)]?.(_0x490e7b(0x1a0)+_0x13ed36+'\x27');}return _0x18518b;}export async function executePushSegmentDeletions(_0x5b95a7,_0x50e20d,_0x34b2a7){const _0x98f364=a110_0x46c66a;if(_0x50e20d['length']===0x0)return 0x0;const {batchAsync:_0x789d9e}=await import(_0x98f364(0x1c0)),_0x4333a7=0x5,_0x37b427=await _0x789d9e(_0x50e20d,async _0x37dc43=>{const _0x2e0d35=_0x98f364;return _0x34b2a7[_0x2e0d35(0x18f)]?.({'type':_0x2e0d35(0x21e),'name':_0x37dc43[_0x2e0d35(0x184)]}),await _0x5b95a7[_0x2e0d35(0x18c)][_0x2e0d35(0x23c)](_0x37dc43['id']),_0x34b2a7[_0x2e0d35(0x18f)]?.({'type':'segment_deleted','name':_0x37dc43[_0x2e0d35(0x184)]}),_0x34b2a7[_0x2e0d35(0x1eb)]?.(_0x2e0d35(0x1ad)+_0x37dc43['name']+'\x27'),0x1;},_0x4333a7);return _0x37b427[_0x98f364(0x26c)]((_0x23f6a3,_0x7c9e28)=>_0x23f6a3+_0x7c9e28,0x0);}export async function executePushJourneys(_0x1fd4de,_0x50fb86,_0x467177,_0x1034f0,_0x279105){const _0x3e8bac=a110_0x46c66a,{journeyDefToRequest:_0x510135}=await import('./journey-yaml.js'),{activationDefToCreateRequest:_0x235001,yamlRuleToApi:_0x558db5,validateSegmentRule:_0x42b676}=await import(_0x3e8bac(0x26b)),_0x38c0bb={'results':[],'created':0x0,'updated':0x0,'embeddedSegmentNameToId':new Map()},_0xcc1b7f=new Map(_0x467177[_0x3e8bac(0x199)]),_0x5d81f6=0x5;for(let _0x1faa80=0x0;_0x1faa80<_0x50fb86[_0x3e8bac(0x242)];_0x1faa80+=_0x5d81f6){const _0x5d5821=_0x50fb86['slice'](_0x1faa80,_0x1faa80+_0x5d81f6),_0x4581bd=await Promise[_0x3e8bac(0x265)](_0x5d5821[_0x3e8bac(0x197)](async _0x1f5b38=>{const _0x28c377=_0x3e8bac;if(!_0x1f5b38[_0x28c377(0x189)]&&!_0x1f5b38[_0x28c377(0x268)])return{'action':_0x28c377(0x254),'name':_0x1f5b38[_0x28c377(0x1ea)][_0x28c377(0x184)],'journeyId':_0x1f5b38[_0x28c377(0x1c4)]?.['id']};const _0x22fe59=_0x1f5b38[_0x28c377(0x1ff)]?_0x467177[_0x28c377(0x25c)][_0x28c377(0x1c5)](_0x1f5b38[_0x28c377(0x1ff)]):undefined;_0x279105['onProgress']?.({'type':_0x1f5b38[_0x28c377(0x189)]?'journey_creating':_0x28c377(0x1d2),'name':_0x1f5b38[_0x28c377(0x1ea)][_0x28c377(0x184)]});try{const _0x145695=await executeSingleJourneyPush(_0x1fd4de,_0x1f5b38,{..._0x467177,'segmentNameToId':_0xcc1b7f},{'parentId':_0x1034f0[_0x28c377(0x187)],'rootFolderId':_0x1034f0['rootFolderId'],'folderId':_0x22fe59,'verbose':_0x1034f0[_0x28c377(0x224)]},_0x279105,{'journeyDefToRequest':_0x510135,'activationDefToCreateRequest':_0x235001,'yamlRuleToApi':_0x558db5,'validateSegmentRule':_0x42b676});for(const [_0x33da40,_0x1021fc]of _0x145695[_0x28c377(0x1a4)]){_0xcc1b7f[_0x28c377(0x238)](_0x33da40,_0x1021fc),_0x38c0bb[_0x28c377(0x1a4)]['set'](_0x33da40,_0x1021fc);}if(_0x145695[_0x28c377(0x248)]===_0x28c377(0x261))_0x279105[_0x28c377(0x18f)]?.({'type':_0x28c377(0x1af),'name':_0x1f5b38['yamlConfig'][_0x28c377(0x184)],'journeyId':_0x145695[_0x28c377(0x23d)]}),_0x279105[_0x28c377(0x1f4)]?.(_0x28c377(0x244)+_0x1f5b38[_0x28c377(0x1ea)][_0x28c377(0x184)]+'\x27'),_0x38c0bb['created']++;else _0x145695[_0x28c377(0x248)]===_0x28c377(0x247)&&(_0x279105[_0x28c377(0x18f)]?.({'type':_0x28c377(0x252),'name':_0x1f5b38[_0x28c377(0x1ea)][_0x28c377(0x184)]}),_0x279105['logSuccess']?.(_0x28c377(0x20a)+_0x1f5b38[_0x28c377(0x1ea)]['name']+'\x27'),_0x38c0bb[_0x28c377(0x247)]++);return{'action':_0x145695['action'],'name':_0x1f5b38[_0x28c377(0x1ea)][_0x28c377(0x184)],'journeyId':_0x145695[_0x28c377(0x23d)]};}catch(_0x3d2b46){const _0x9fbd15=isHttp400Error(_0x3d2b46),_0x13a4b0=_0x9fbd15?ErrorCode[_0x28c377(0x212)]:ErrorCode[_0x28c377(0x1dc)],_0x36deac=getErrorMessage(_0x3d2b46);throw new SDKError(_0x13a4b0,_0x28c377(0x1ef)+(_0x1f5b38['isNew']?_0x28c377(0x1fb):_0x28c377(0x1bb))+'\x20journey\x20from\x20file:\x20'+_0x1f5b38[_0x28c377(0x26d)]+_0x28c377(0x213)+_0x36deac,_0x3d2b46);}}));_0x38c0bb['results'][_0x3e8bac(0x20b)](..._0x4581bd);}return _0x38c0bb;}async function executeSingleJourneyPush(_0xb971b7,_0x153359,_0x47c652,_0x533d2b,_0x5931f6,_0x34a518){const _0x9d1fd9=a110_0x46c66a,{journeyDefToRequest:_0x472d59,activationDefToCreateRequest:_0x3744ae,yamlRuleToApi:_0x4162f5,validateSegmentRule:_0x3886ce}=_0x34a518,_0x23afcc=new Map(),_0x4019c6=new Map(),_0x341199=new Map(),_0x19199c=new Map(),_0x249bad=new Map();let _0x504ae8;const _0xad841b=async()=>{const _0x388c8d=a110_0x68a9;if(_0x504ae8)return;_0x504ae8=new Map();if(!_0x153359[_0x388c8d(0x1c4)])return;const _0xcd83df=await _0xb971b7[_0x388c8d(0x255)]['listActivations'](_0x153359['existingJourney']['id']);for(const _0x409d0f of _0xcd83df){const _0x4921e5=journeyActivationStepToYaml(_0x409d0f,_0x47c652['idToEmailMap'],_0x47c652['connectionIdToNameMap']),_0x282551=activationSignature(_0x4921e5);!_0x504ae8[_0x388c8d(0x249)](_0x282551)&&_0x504ae8[_0x388c8d(0x238)](_0x282551,_0x409d0f['id']),_0x4921e5[_0x388c8d(0x184)]&&_0x4019c6['set'](_0x4921e5[_0x388c8d(0x184)],_0x409d0f['id']);}};if(_0x153359['existingJourney']&&_0x153359['yamlConfig'][_0x9d1fd9(0x18a)]){const _0x29a1c8=buildLocalExpandedRuleMappings(_0x153359[_0x9d1fd9(0x1ea)]),_0x548839=_0x29a1c8[_0x9d1fd9(0x190)];if(_0x548839['size']>0x0){const _0x2eca01=new Map();for(const [_0x34d708,_0x14293b]of _0x548839){const _0x368258=serializeExpandedRule(_0x14293b,_0x548839);_0x2eca01[_0x9d1fd9(0x238)](_0x34d708,_0x368258);}const _0x260d69=collectSegmentIdsFromJourneyApi(_0x153359[_0x9d1fd9(0x1c4)]);if(_0x260d69[_0x9d1fd9(0x1d0)]>0x0){const _0x4a452a=await buildServerSegmentRuleMap(_0xb971b7,_0x533d2b[_0x9d1fd9(0x187)],_0x47c652[_0x9d1fd9(0x1e1)],_0x260d69);if(_0x4a452a[_0x9d1fd9(0x1d0)]>0x0){const _0x36dd65=new Map();for(const [_0x48f9db,_0x3a06c4]of _0x4a452a){const _0x32a5d6=serializeExpandedRule(_0x3a06c4,_0x4a452a);!_0x36dd65['has'](_0x32a5d6)&&_0x36dd65[_0x9d1fd9(0x238)](_0x32a5d6,_0x48f9db);}for(const [_0x387ec0,_0x11458a]of _0x2eca01){const _0x17498e=_0x36dd65[_0x9d1fd9(0x1c5)](_0x11458a);_0x17498e&&(_0x249bad[_0x9d1fd9(0x238)](_0x387ec0,_0x17498e),_0x47c652[_0x9d1fd9(0x199)][_0x9d1fd9(0x238)](_0x387ec0,_0x17498e));}}}}}const _0x72e23={'resolveSegmentId':async _0x572117=>{const _0x279e9a=_0x9d1fd9,_0x3d704e=_0x47c652[_0x279e9a(0x199)][_0x279e9a(0x1c5)](_0x572117);if(!_0x3d704e)throw new SDKError(ErrorCode[_0x279e9a(0x1b8)],_0x279e9a(0x198)+_0x572117+'\x20(referenced\x20in\x20journey\x20'+_0x153359['yamlConfig']['name']+')');return _0x3d704e;},'resolveEmbeddedSegmentId':async(_0x5daed7,_0xae7ace)=>{const _0x433ddd=_0x9d1fd9,_0x5cfa80=_0x47c652[_0x433ddd(0x199)]['get'](_0x5daed7);if(_0x5cfa80)return _0x5cfa80;const _0xbe5fc0=_0x249bad[_0x433ddd(0x1c5)](_0x5daed7);if(_0xbe5fc0)return _0x47c652[_0x433ddd(0x199)]['set'](_0x5daed7,_0xbe5fc0),_0xbe5fc0;const _0x41f027=_0x47c652[_0x433ddd(0x1e1)]['find'](_0xba12f8=>_0xba12f8[_0x433ddd(0x184)]===_0x5daed7);if(_0x41f027)return _0x47c652[_0x433ddd(0x199)][_0x433ddd(0x238)](_0x5daed7,_0x41f027['id']),_0x41f027['id'];if(_0x153359[_0x433ddd(0x189)]){const {stageName:_0x4e147c,criteriaName:_0x246ea4}=findSegmentCriteriaLocation(_0x153359['yamlConfig'],_0x5daed7);return _0x3886ce(_0x5daed7,_0xae7ace['rule']),_0x341199[_0x433ddd(0x238)](_0x5daed7,{'definition':_0xae7ace,'stageName':_0x4e147c,'criteriaName':_0x246ea4}),createPendingSegmentId(_0x5daed7);}const _0x34aa84=_0x153359[_0x433ddd(0x1c4)]?.['id'];if(!_0x34aa84)throw new SDKError(ErrorCode['INTERNAL'],'Cannot\x20create\x20embedded\x20segment\x20for\x20existing\x20journey\x20without\x20journey\x20ID');_0x3886ce(_0x5daed7,_0xae7ace['rule']);const _0x1f5190=generateDeterministicJourneySegmentName(_0x153359[_0x433ddd(0x1ea)][_0x433ddd(0x184)],_0x5daed7),_0x437494=_0x47c652[_0x433ddd(0x1e1)][_0x433ddd(0x25b)](_0x37cf6c=>_0x37cf6c[_0x433ddd(0x184)]===_0x1f5190),_0x4f5ba2=createSegmentIdResolver(_0x47c652['segmentNameToId'],_0x5daed7),_0x442826=await resolveRuleSegmentIds(_0xae7ace[_0x433ddd(0x1a1)],_0x4f5ba2);let _0x21c9cb;if(_0x437494)await _0xb971b7['segment'][_0x433ddd(0x1ca)](_0x533d2b['parentId'],_0x437494['id'],{'description':_0xae7ace[_0x433ddd(0x211)]||_0x433ddd(0x215)+_0x5daed7,'rule':_0x4162f5(_0x442826,!![]),'countPopulation':!![]}),_0x21c9cb=_0x437494['id'];else try{_0x21c9cb=await _0xb971b7[_0x433ddd(0x18c)]['createJourneySegment']({'name':_0x1f5190,'description':_0xae7ace[_0x433ddd(0x211)]||'Entry\x20criteria:\x20'+_0x5daed7,'journeyId':_0x34aa84,'rule':_0x4162f5(_0x442826,!![]),'countPopulation':!![],'parentFolderId':_0x533d2b[_0x433ddd(0x203)]||'','audienceId':_0x533d2b[_0x433ddd(0x187)]});}catch(_0x12c5e4){const _0x503c4b=_0x12c5e4 instanceof Error&&_0x12c5e4[_0x433ddd(0x205)][_0x433ddd(0x19b)](_0x433ddd(0x253));if(_0x503c4b){const _0x36398f=await _0xb971b7[_0x433ddd(0x18c)][_0x433ddd(0x204)](_0x533d2b[_0x433ddd(0x187)]),_0x21f8ca=_0x36398f[_0x433ddd(0x25b)](_0x5095cd=>_0x5095cd[_0x433ddd(0x184)]===_0x1f5190);if(_0x21f8ca)await _0xb971b7[_0x433ddd(0x18c)][_0x433ddd(0x1ca)](_0x533d2b[_0x433ddd(0x187)],_0x21f8ca['id'],{'description':_0xae7ace[_0x433ddd(0x211)]||_0x433ddd(0x215)+_0x5daed7,'rule':_0x4162f5(_0x442826,!![]),'countPopulation':!![]}),_0x21c9cb=_0x21f8ca['id'];else throw _0x12c5e4;}else throw _0x12c5e4;}return _0x47c652[_0x433ddd(0x199)][_0x433ddd(0x238)](_0x5daed7,_0x21c9cb),_0x23afcc[_0x433ddd(0x238)](_0x5daed7,_0x21c9cb),_0x21c9cb;},'resolveActivationId':async _0x12c172=>{const _0xf82961=_0x9d1fd9,_0x22b9a3=_0x4019c6['get'](_0x12c172);if(_0x22b9a3)return _0x22b9a3;if(_0x153359[_0xf82961(0x1c4)]){await _0xad841b();const _0x1e15d5=_0x4019c6[_0xf82961(0x1c5)](_0x12c172);if(_0x1e15d5)return _0x1e15d5;}throw new SDKError(ErrorCode[_0xf82961(0x26f)],_0xf82961(0x24e)+_0x12c172+_0xf82961(0x1e7)+_0x153359[_0xf82961(0x1ea)]['name']+_0xf82961(0x229)+'Define\x20it\x20in\x20the\x20journey\x27s\x20\x27activations\x27\x20section\x20or\x20use\x20an\x20existing\x20activation\x20ID.');},'resolveEmbeddedActivationId':async(_0x1e9dab,_0x3b1cd2)=>{const _0x2fd70a=_0x9d1fd9,_0x2adfa1=_0x4019c6[_0x2fd70a(0x1c5)](_0x1e9dab);if(_0x2adfa1)return _0x2adfa1;if(_0x153359[_0x2fd70a(0x189)])return _0x19199c[_0x2fd70a(0x238)](_0x1e9dab,_0x3b1cd2),createPendingActivationId(_0x1e9dab);if(_0x153359[_0x2fd70a(0x1c4)]){await _0xad841b();const _0x4a422e=_0x4019c6['get'](_0x3b1cd2['name']);if(_0x4a422e)return _0x4019c6['set'](_0x1e9dab,_0x4a422e),_0x4a422e;const _0x12811d=activationSignature(_0x3b1cd2),_0xcdff7f=_0x504ae8?.[_0x2fd70a(0x1c5)](_0x12811d);if(_0xcdff7f)return _0x4019c6[_0x2fd70a(0x238)](_0x1e9dab,_0xcdff7f),_0xcdff7f;const _0x3f80f5=await _0x3744ae(_0x3b1cd2,_0x47c652[_0x2fd70a(0x239)]),_0x50f7b7=await _0xb971b7[_0x2fd70a(0x255)]['createActivation'](_0x153359[_0x2fd70a(0x1c4)]['id'],_0x3f80f5);return _0x4019c6[_0x2fd70a(0x238)](_0x1e9dab,_0x50f7b7['id']),_0x50f7b7['id'];}throw new SDKError(ErrorCode[_0x2fd70a(0x263)],'Cannot\x20create\x20embedded\x20activation\x20without\x20journey\x20context');},'resolveJourneyId':async _0x57f588=>{const _0x127687=_0x9d1fd9;try{return await _0xb971b7[_0x127687(0x255)][_0x127687(0x1be)](_0x533d2b[_0x127687(0x187)],_0x57f588);}catch(_0x2bd315){throw new SDKError(ErrorCode[_0x127687(0x26f)],_0x127687(0x1b4)+_0x57f588+_0x127687(0x1e8)+_0x153359[_0x127687(0x1ea)][_0x127687(0x184)]+'\x27)',_0x2bd315);}},'resolveStageId':async(_0xbc0299,_0x24e3c2)=>{const _0x1fa254=_0x9d1fd9,_0x224547=await _0xb971b7[_0x1fa254(0x255)]['getJourney'](_0xbc0299),_0x5d9303=_0x224547[_0x1fa254(0x19a)][_0x1fa254(0x218)]['find'](_0x55e3f2=>_0x55e3f2[_0x1fa254(0x184)]['toLowerCase']()===_0x24e3c2['toLowerCase']());if(!_0x5d9303?.['id'])throw new SDKError(ErrorCode[_0x1fa254(0x26f)],_0x1fa254(0x1a6)+_0x24e3c2+_0x1fa254(0x1b9)+(_0x224547[_0x1fa254(0x19a)][_0x1fa254(0x1b3)]||_0x224547['attributes'][_0x1fa254(0x184)])+'\x27');return _0x5d9303['id'];}},_0x3535ee=await _0x472d59(_0x153359[_0x9d1fd9(0x1ea)],_0x533d2b[_0x9d1fd9(0x187)],_0x72e23),_0x2f02bb=_0x533d2b[_0x9d1fd9(0x207)]||_0x533d2b[_0x9d1fd9(0x203)];_0x2f02bb&&(_0x3535ee[_0x9d1fd9(0x1df)]={'parentFolder':{'data':{'id':_0x2f02bb,'type':_0x9d1fd9(0x1ab)}}});if(_0x153359[_0x9d1fd9(0x189)]){if(_0x341199[_0x9d1fd9(0x1d0)]>0x0||_0x19199c[_0x9d1fd9(0x1d0)]>0x0)return await executeThreeStepJourneyCreate(_0xb971b7,_0x153359,_0x3535ee,{'pendingEmbeddedSegments':_0x341199,'pendingEmbeddedActivations':_0x19199c,'embeddedSegmentNameToId':_0x23afcc,'journeyActivationNameToId':_0x4019c6},{..._0x533d2b,'effectiveFolderId':_0x2f02bb},_0x47c652,_0x5931f6,_0x34a518);else{ensureJourneyDefaults(_0x3535ee['attributes']);const _0x42d414=await _0xb971b7['journey'][_0x9d1fd9(0x1fb)](_0x3535ee);return{'action':_0x9d1fd9(0x261),'journeyId':_0x42d414['id'],'embeddedSegmentNameToId':_0x23afcc};}}else{if(_0x153359['hasChanges']&&_0x153359[_0x9d1fd9(0x1c4)])return ensureJourneyDefaults(_0x3535ee['attributes']),await _0xb971b7[_0x9d1fd9(0x255)][_0x9d1fd9(0x1bb)](_0x153359[_0x9d1fd9(0x1c4)]['id'],_0x3535ee),{'action':_0x9d1fd9(0x247),'journeyId':_0x153359[_0x9d1fd9(0x1c4)]['id'],'embeddedSegmentNameToId':_0x23afcc};}return{'action':_0x9d1fd9(0x254),'journeyId':_0x153359[_0x9d1fd9(0x1c4)]?.['id'],'embeddedSegmentNameToId':_0x23afcc};}function findSegmentCriteriaLocation(_0x416110,_0x54cafa){const _0x47dd4b=a110_0x46c66a,_0x4cc7ba=_0x416110[_0x47dd4b(0x1e4)]||_0x416110[_0x47dd4b(0x264)]?.[0x0]?.[_0x47dd4b(0x1e4)]||[];let _0x58bb7d=_0x47dd4b(0x1bc),_0x3e3d56=_0x54cafa;const _0x4feb75=_0x416110[_0x47dd4b(0x188)]||_0x416110[_0x47dd4b(0x264)]?.[0x0]?.[_0x47dd4b(0x188)];if(_0x4feb75?.[_0x47dd4b(0x18c)]===_0x54cafa)return{'stageName':_0x47dd4b(0x188),'criteriaName':_0x4feb75[_0x47dd4b(0x184)]||_0x54cafa};_0x16de71:for(const _0x575b9d of _0x4cc7ba){if(_0x575b9d[_0x47dd4b(0x1e0)]?.[_0x47dd4b(0x18c)]===_0x54cafa){_0x58bb7d=_0x575b9d['name'],_0x3e3d56=_0x575b9d[_0x47dd4b(0x1e0)][_0x47dd4b(0x184)]||_0x54cafa;break;}if(_0x575b9d[_0x47dd4b(0x20e)])for(const _0x539535 of _0x575b9d[_0x47dd4b(0x20e)]){if(_0x539535[_0x47dd4b(0x1d7)]===_0x47dd4b(0x1e3)&&_0x539535[_0x47dd4b(0x214)]?.[_0x47dd4b(0x216)])for(const _0x403f27 of _0x539535['with'][_0x47dd4b(0x216)]){if(_0x403f27['segment']===_0x54cafa){_0x58bb7d=_0x575b9d['name'],_0x3e3d56=_0x403f27[_0x47dd4b(0x184)]||_0x54cafa;break _0x16de71;}}}}return{'stageName':_0x58bb7d,'criteriaName':_0x3e3d56};}async function executeThreeStepJourneyCreate(_0x3ddb30,_0x185d0f,_0x31123b,_0xa7570e,_0x5e2781,_0x2c5601,_0x1cdb3c,_0x48efcc){const _0x24d334=a110_0x46c66a,{activationDefToCreateRequest:_0x2c86d5,yamlRuleToApi:_0x59ad38}=_0x48efcc,{pendingEmbeddedSegments:_0x52304f,pendingEmbeddedActivations:_0x1bfd30,embeddedSegmentNameToId:_0xa0006f}=_0xa7570e,_0x3e692f=JSON['parse'](JSON['stringify'](_0x31123b));ensureJourneyDefaults(_0x3e692f[_0x24d334(0x19a)]),stripPendingIds(_0x3e692f);const _0x346900=await _0x3ddb30[_0x24d334(0x255)]['create'](_0x3e692f),_0x3844c1=_0x346900['id'],_0x3c20f6=new Map();for(const _0x57fc59 of _0x346900['attributes'][_0x24d334(0x218)]){_0x3c20f6['set'](_0x57fc59['name'][_0x24d334(0x1c8)](),_0x57fc59['id']);}for(const [_0x541163,{definition:_0x119f1b}]of _0x52304f){const _0x576b94=generateDeterministicJourneySegmentName(_0x185d0f[_0x24d334(0x1ea)][_0x24d334(0x184)],_0x541163);_0x1cdb3c['onProgress']?.({'type':_0x24d334(0x21a),'journeyName':_0x185d0f[_0x24d334(0x1ea)][_0x24d334(0x184)],'segmentName':_0x541163});const _0x70f7dc=createSegmentIdResolver(_0x2c5601[_0x24d334(0x199)],_0x541163),_0x194ba5=await resolveRuleSegmentIds(_0x119f1b['rule'],_0x70f7dc),_0x134f51=await _0x3ddb30[_0x24d334(0x18c)][_0x24d334(0x24c)]({'name':_0x576b94,'description':_0x119f1b[_0x24d334(0x211)]||_0x24d334(0x215)+_0x541163,'journeyId':_0x3844c1,'rule':_0x59ad38(_0x194ba5,!![]),'countPopulation':!![],'parentFolderId':_0x5e2781[_0x24d334(0x191)]||'','audienceId':_0x5e2781[_0x24d334(0x187)]});_0xa0006f[_0x24d334(0x238)](_0x541163,_0x134f51),_0x2c5601[_0x24d334(0x199)]['set'](_0x541163,_0x134f51),_0x1cdb3c[_0x24d334(0x18f)]?.({'type':_0x24d334(0x201),'journeyName':_0x185d0f[_0x24d334(0x1ea)][_0x24d334(0x184)],'segmentName':_0x541163});}const _0x5d7e06=new Map();for(const [_0x4f5b00,_0x400300]of _0x1bfd30){_0x1cdb3c['onProgress']?.({'type':_0x24d334(0x1de),'journeyName':_0x185d0f[_0x24d334(0x1ea)][_0x24d334(0x184)],'activationName':_0x4f5b00});const _0x204e60=await _0x2c86d5(_0x400300,_0x2c5601[_0x24d334(0x239)]),_0xba0d15=await _0x3ddb30[_0x24d334(0x255)][_0x24d334(0x1cc)](_0x3844c1,_0x204e60);_0x5d7e06[_0x24d334(0x238)](_0x4f5b00,_0xba0d15['id']),_0xa7570e[_0x24d334(0x1a5)][_0x24d334(0x238)](_0x4f5b00,_0xba0d15['id']),_0x1cdb3c[_0x24d334(0x18f)]?.({'type':_0x24d334(0x1c3),'journeyName':_0x185d0f[_0x24d334(0x1ea)][_0x24d334(0x184)],'activationName':_0x4f5b00});}const _0x4fbc1c=JSON[_0x24d334(0x1a9)](JSON[_0x24d334(0x1ed)](_0x31123b));return _0x4fbc1c['id']=_0x3844c1,ensureJourneyDefaults(_0x4fbc1c[_0x24d334(0x19a)]),resolvePendingIdsInRequest(_0x4fbc1c,_0x31123b,_0x3c20f6,_0xa0006f,_0x5d7e06,_0x1cdb3c),await _0x3ddb30[_0x24d334(0x255)][_0x24d334(0x1bb)](_0x3844c1,_0x4fbc1c),{'action':_0x24d334(0x261),'journeyId':_0x3844c1,'embeddedSegmentNameToId':_0xa0006f};}function stripPendingIds(_0x10a06b){const _0x318274=a110_0x46c66a;for(const _0x88a818 of _0x10a06b[_0x318274(0x19a)][_0x318274(0x218)]||[]){_0x88a818[_0x318274(0x1e6)]?.[_0x318274(0x202)]&&isPendingSegmentId(_0x88a818['entryCriteria'][_0x318274(0x202)])&&delete _0x88a818[_0x318274(0x1e6)];if(_0x88a818[_0x318274(0x20e)])for(const _0x397a84 of Object[_0x318274(0x1cb)](_0x88a818[_0x318274(0x20e)])){const _0xe92953=_0x88a818[_0x318274(0x20e)][_0x397a84];_0xe92953[_0x318274(0x1d7)]==='Activation'&&_0xe92953[_0x318274(0x20c)]&&isPendingActivationId(_0xe92953[_0x318274(0x20c)])&&(_0xe92953[_0x318274(0x20c)]='');if(_0xe92953['type']===_0x318274(0x208)&&_0xe92953[_0x318274(0x216)])for(const _0x5859bd of _0xe92953[_0x318274(0x216)]){_0x5859bd[_0x318274(0x202)]&&isPendingSegmentId(_0x5859bd[_0x318274(0x202)])&&(_0x5859bd[_0x318274(0x202)]='');}_0xe92953[_0x318274(0x1d7)]===_0x318274(0x1e9)&&_0xe92953[_0x318274(0x256)]?.[_0x318274(0x202)]&&isPendingSegmentId(_0xe92953[_0x318274(0x256)][_0x318274(0x202)])&&(_0xe92953[_0x318274(0x256)]['segmentId']='');}}}function resolvePendingIdsInRequest(_0x441cd9,_0x59256a,_0x2d748b,_0x25c64,_0xca5094,_0x46f72a){const _0xaacd66=a110_0x46c66a,_0x5d598b=(_0x2c6cd2,_0x3a9647)=>{const _0xe1211d=a110_0x68a9;if(!isPendingSegmentId(_0x2c6cd2))return _0x2c6cd2;const _0x2c4a6c=extractPendingSegmentName(_0x2c6cd2),_0x2e6679=_0x25c64[_0xe1211d(0x1c5)](_0x2c4a6c);return!_0x2e6679&&_0x46f72a['logWarning']?.('Warning:\x20Could\x20not\x20resolve\x20embedded\x20segment\x20\x27'+_0x2c4a6c+_0xe1211d(0x1ce)+_0x3a9647),_0x2e6679;};if(_0x441cd9[_0xaacd66(0x19a)]['goal']?.['segmentId']&&isPendingSegmentId(_0x441cd9[_0xaacd66(0x19a)][_0xaacd66(0x188)]['segmentId'])){const _0x220fe4=_0x5d598b(_0x441cd9['attributes']['goal']['segmentId'],_0xaacd66(0x22b));_0x220fe4&&(_0x441cd9[_0xaacd66(0x19a)][_0xaacd66(0x188)][_0xaacd66(0x202)]=_0x220fe4);}for(const _0x53a82e of _0x441cd9[_0xaacd66(0x19a)]['journeyStages']||[]){const _0x5c6b75=_0x2d748b[_0xaacd66(0x1c5)](_0x53a82e['name'][_0xaacd66(0x1c8)]());_0x5c6b75&&(_0x53a82e['id']=_0x5c6b75);if(_0x53a82e[_0xaacd66(0x1e6)]?.['segmentId']&&isPendingSegmentId(_0x53a82e[_0xaacd66(0x1e6)][_0xaacd66(0x202)])){const _0x4405ef=_0x5d598b(_0x53a82e['entryCriteria']['segmentId'],'stage\x20\x27'+_0x53a82e[_0xaacd66(0x184)]+_0xaacd66(0x221));_0x4405ef&&(_0x53a82e[_0xaacd66(0x1e6)][_0xaacd66(0x202)]=_0x4405ef);}if(_0x53a82e[_0xaacd66(0x1aa)])for(const _0x562ebc of _0x53a82e[_0xaacd66(0x1aa)]){if(_0x562ebc[_0xaacd66(0x202)]&&isPendingSegmentId(_0x562ebc[_0xaacd66(0x202)])){const _0x453c71=_0x5d598b(_0x562ebc[_0xaacd66(0x202)],_0xaacd66(0x1c1)+_0x53a82e[_0xaacd66(0x184)]+_0xaacd66(0x1f8));_0x453c71&&(_0x562ebc['segmentId']=_0x453c71);}}if(_0x53a82e['milestone']?.[_0xaacd66(0x202)]&&isPendingSegmentId(_0x53a82e[_0xaacd66(0x226)]['segmentId'])){const _0x3e8d84=_0x5d598b(_0x53a82e[_0xaacd66(0x226)]['segmentId'],'stage\x20\x27'+_0x53a82e['name']+_0xaacd66(0x18d));_0x3e8d84&&(_0x53a82e[_0xaacd66(0x226)][_0xaacd66(0x202)]=_0x3e8d84);}if(_0x53a82e[_0xaacd66(0x20e)]){const _0x36076c=_0x17405a=>_0x59256a[_0xaacd66(0x19a)][_0xaacd66(0x218)][_0xaacd66(0x25b)](_0x43ac9e=>_0x43ac9e[_0xaacd66(0x184)][_0xaacd66(0x1c8)]()===_0x53a82e['name'][_0xaacd66(0x1c8)]())?.[_0xaacd66(0x20e)]?.[_0x17405a];for(const _0x3b5e42 of Object[_0xaacd66(0x1cb)](_0x53a82e[_0xaacd66(0x20e)])){const _0x244f6e=_0x53a82e[_0xaacd66(0x20e)][_0x3b5e42],_0x464c87=_0x36076c(_0x3b5e42);if(_0x244f6e[_0xaacd66(0x1d7)]===_0xaacd66(0x234)&&_0x244f6e['journeyActivationStepId']&&(isPendingActivationId(_0x244f6e['journeyActivationStepId'])||_0x244f6e['journeyActivationStepId']==='')){if(_0x464c87?.[_0xaacd66(0x20c)]&&isPendingActivationId(_0x464c87[_0xaacd66(0x20c)])){const _0x3e9628=extractPendingActivationName(_0x464c87['journeyActivationStepId']),_0xceefab=_0xca5094[_0xaacd66(0x1c5)](_0x3e9628);_0xceefab&&(_0x244f6e[_0xaacd66(0x20c)]=_0xceefab);}}if(_0x244f6e[_0xaacd66(0x1d7)]===_0xaacd66(0x208)&&_0x244f6e[_0xaacd66(0x216)]&&_0x464c87?.[_0xaacd66(0x216)])for(let _0xd2547c=0x0;_0xd2547c<_0x244f6e[_0xaacd66(0x216)][_0xaacd66(0x242)];_0xd2547c++){const _0x57d1a0=_0x244f6e[_0xaacd66(0x216)][_0xd2547c],_0x7d6fac=_0x464c87[_0xaacd66(0x216)][_0xd2547c];if(_0x7d6fac?.[_0xaacd66(0x202)]&&isPendingSegmentId(_0x7d6fac[_0xaacd66(0x202)])){const _0xe4aec2=_0x5d598b(_0x7d6fac['segmentId'],_0xaacd66(0x1c1)+_0x53a82e[_0xaacd66(0x184)]+_0xaacd66(0x186)+(_0x57d1a0['name']||_0xd2547c)+'\x27');_0xe4aec2&&(_0x57d1a0[_0xaacd66(0x202)]=_0xe4aec2);}}if(_0x244f6e[_0xaacd66(0x1d7)]===_0xaacd66(0x1e9)&&_0x244f6e[_0xaacd66(0x256)]?.[_0xaacd66(0x202)]&&_0x464c87?.[_0xaacd66(0x256)]?.['segmentId']&&isPendingSegmentId(_0x464c87[_0xaacd66(0x256)][_0xaacd66(0x202)])){const _0x4cab48=_0x5d598b(_0x464c87[_0xaacd66(0x256)]['segmentId'],_0xaacd66(0x1c1)+_0x53a82e[_0xaacd66(0x184)]+_0xaacd66(0x257));_0x4cab48&&(_0x244f6e['waitCondition']['segmentId']=_0x4cab48);}}}}}
|
|
1
|
+
const a110_0x2c5cc6=a110_0x2c2f;(function(_0x372472,_0x40661f){const _0x51fe2f=a110_0x2c2f,_0x28579f=_0x372472();while(!![]){try{const _0x5eaf5c=-parseInt(_0x51fe2f(0x196))/0x1+-parseInt(_0x51fe2f(0x133))/0x2*(-parseInt(_0x51fe2f(0x16d))/0x3)+parseInt(_0x51fe2f(0x10c))/0x4*(-parseInt(_0x51fe2f(0x19c))/0x5)+-parseInt(_0x51fe2f(0x148))/0x6+parseInt(_0x51fe2f(0x173))/0x7*(-parseInt(_0x51fe2f(0xd7))/0x8)+parseInt(_0x51fe2f(0x1a0))/0x9+parseInt(_0x51fe2f(0x160))/0xa*(parseInt(_0x51fe2f(0x174))/0xb);if(_0x5eaf5c===_0x40661f)break;else _0x28579f['push'](_0x28579f['shift']());}catch(_0x298376){_0x28579f['push'](_0x28579f['shift']());}}}(a110_0x569a,0x99636));import{createHash}from'crypto';export const PENDING_SEGMENT_PREFIX=a110_0x2c5cc6(0x194);export const PENDING_ACTIVATION_PREFIX='__pending_act_';export function createPendingSegmentId(_0x14ad8c){return''+PENDING_SEGMENT_PREFIX+_0x14ad8c+'__';}export function isPendingSegmentId(_0x405838){return _0x405838['startsWith'](PENDING_SEGMENT_PREFIX);}export function extractPendingSegmentName(_0x7b7b27){const _0x3155b8=a110_0x2c5cc6;return _0x7b7b27[_0x3155b8(0x1aa)](/^__pending_(.+)__$/,'$1');}export function createPendingActivationId(_0x333ccd){return''+PENDING_ACTIVATION_PREFIX+_0x333ccd+'__';}export function isPendingActivationId(_0x1ba139){const _0xecc2c3=a110_0x2c5cc6;return _0x1ba139[_0xecc2c3(0xe4)](PENDING_ACTIVATION_PREFIX);}export function extractPendingActivationName(_0x16f035){const _0x61b06=a110_0x2c5cc6;return _0x16f035[_0x61b06(0x1aa)](/^__pending_act_(.+)__$/,'$1');}function generateDeterministicJourneySegmentName(_0x381890,_0x2a1176){const _0x8bf8b8=a110_0x2c5cc6,_0x2061c9=_0x381890+'::'+(_0x2a1176[_0x8bf8b8(0x152)]()||_0x8bf8b8(0x11f)),_0x53d570=createHash(_0x8bf8b8(0x10d))[_0x8bf8b8(0x104)](_0x2061c9)[_0x8bf8b8(0x180)]('hex')[_0x8bf8b8(0x135)](0x0,0xc);return _0x8bf8b8(0x16a)+_0x53d570;}export function ensureJourneyDefaults(_0x2e3a91){const _0x2ef3d6=a110_0x2c5cc6;!_0x2e3a91[_0x2ef3d6(0x187)]&&(_0x2e3a91[_0x2ef3d6(0x187)]=''),!_0x2e3a91['state']&&(_0x2e3a91['state']=_0x2ef3d6(0x127));}export function resolveTDFolderPath(_0x35635b,_0x17e893,_0x17df29){const _0x21669b=a110_0x2c5cc6;if(!_0x17e893)return _0x35635b;if(_0x35635b===_0x17df29||_0x35635b[_0x21669b(0xe4)](_0x17df29+'/'))return _0x35635b;return _0x35635b?_0x17df29+'/'+_0x35635b:_0x17df29;}export function addFoldersToCreate(_0x3ea594,_0x187fac,_0x4e2cbd){const _0x23d2c7=a110_0x2c5cc6;if(!_0x3ea594)return;if(_0x187fac['has'](_0x3ea594))return;const _0x46f9b1=_0x3ea594[_0x23d2c7(0x15e)]('/');let _0x27f73f='';for(const _0x3e0aae of _0x46f9b1){_0x27f73f=_0x27f73f?_0x27f73f+'/'+_0x3e0aae:_0x3e0aae,!_0x187fac['has'](_0x27f73f)&&_0x4e2cbd[_0x23d2c7(0x156)](_0x27f73f);}}import*as a110_0x5a09b7 from'yaml';import{readFileSync}from'fs';import a110_0x122b0b from'path';import{isJourneyDef,parseYamlString as a110_0x28971b,toYamlString as a110_0x8d07eb,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(_0x27f3b3){const _0x1d65e8=a110_0x2c5cc6;if(Array[_0x1d65e8(0x14b)](_0x27f3b3))return'['+_0x27f3b3[_0x1d65e8(0x10e)](_0x59d956=>stableStringify(_0x59d956))['join'](',')+']';if(_0x27f3b3&&typeof _0x27f3b3===_0x1d65e8(0x11e)){const _0xa70ce1=_0x27f3b3,_0x4385c4=Object[_0x1d65e8(0x176)](_0xa70ce1)[_0x1d65e8(0xfc)](),_0x10bf61=_0x4385c4[_0x1d65e8(0x10e)](_0x1bf2d9=>'\x22'+_0x1bf2d9+'\x22:'+stableStringify(_0xa70ce1[_0x1bf2d9]));return'{'+_0x10bf61['join'](',')+'}';}const _0x248cd0=JSON['stringify'](_0x27f3b3);return _0x248cd0===undefined?'null':_0x248cd0;}function activationSignature(_0x2e90b2){const _0x4e56e0=a110_0x2c5cc6,_0x989f76={'connection':_0x2e90b2[_0x4e56e0(0x169)],..._0x2e90b2[_0x4e56e0(0x110)]!==undefined&&{'all_columns':_0x2e90b2['all_columns']},..._0x2e90b2[_0x4e56e0(0x1a1)]!==undefined&&{'columns':_0x2e90b2[_0x4e56e0(0x1a1)]},..._0x2e90b2[_0x4e56e0(0x136)]!==undefined&&{'behavior':_0x2e90b2[_0x4e56e0(0x136)]},..._0x2e90b2[_0x4e56e0(0x125)]!==undefined&&{'schedule':_0x2e90b2['schedule']},..._0x2e90b2[_0x4e56e0(0x102)]!==undefined&&{'notification':_0x2e90b2[_0x4e56e0(0x102)]},..._0x2e90b2['connector_config']!==undefined&&{'connector_config':_0x2e90b2[_0x4e56e0(0xe5)]},..._0x2e90b2[_0x4e56e0(0xd3)]!==undefined&&{'activation_template_id':_0x2e90b2[_0x4e56e0(0xd3)]}};return stableStringify(_0x989f76);}export async function prepareSegmentFiles(_0x5b4653,_0x2aca28,_0x1f85fa,_0x1c55fd,_0x136f18){const _0x3aab9d=a110_0x2c5cc6,{activationDefToCreateRequest:_0xfef864}=await import(_0x3aab9d(0x147)),_0x2cdb3e=[],_0x290158=new Set();for(const {yamlConfig:_0x51b713,folderPath:_0x2ae5ee,sourcePath:_0x1666b4}of _0x5b4653){const _0x50d078=resolveTDFolderPath(_0x2ae5ee,_0x1c55fd,_0x136f18),_0x6232de=_0x50d078+':'+_0x51b713[_0x3aab9d(0x1a2)],_0x148fd1=_0x2aca28[_0x3aab9d(0x118)][_0x3aab9d(0x13d)](_0x6232de),_0xa81d56=_0x148fd1?_0x2aca28['activationsBySegmentId']['get'](_0x148fd1['id'])||[]:[];addFoldersToCreate(_0x50d078,_0x2aca28[_0x3aab9d(0x184)],_0x290158);const _0x3e2074=calculateActivationActions(_0x51b713[_0x3aab9d(0x198)]||[],_0xa81d56,_0x2aca28[_0x3aab9d(0x18e)],_0x2aca28['connectionIdToNameMap']);for(const _0x166fe6 of _0x3e2074){(_0x166fe6[_0x3aab9d(0x170)]===_0x3aab9d(0x188)||_0x166fe6[_0x3aab9d(0x170)]===_0x3aab9d(0x104))&&_0x166fe6['yamlActivation']&&(_0x166fe6[_0x3aab9d(0x126)]=await _0xfef864(_0x166fe6[_0x3aab9d(0x16e)],_0x1f85fa));}const _0x2004b9=calculateSegmentDiff(_0x51b713,_0x148fd1,_0xa81d56,_0x2aca28[_0x3aab9d(0x18e)],_0x2aca28['connectionIdToNameMap']);_0x2cdb3e['push']({'relativePath':_0x51b713[_0x3aab9d(0x1a2)],'absolutePath':_0x1666b4,'yamlConfig':_0x51b713,'folderPath':_0x50d078,'existingSegment':_0x148fd1,'existingActivations':_0xa81d56,'isNew':_0x2004b9['isNew'],'hasChanges':_0x2004b9[_0x3aab9d(0x15f)],'diff':_0x2004b9[_0x3aab9d(0xe8)],'activationActions':_0x3e2074});}return{'segmentFiles':_0x2cdb3e,'foldersToCreate':_0x290158};}export async function prepareJourneyFiles(_0x12a174,_0x315eda,_0x4305b0,_0x3566dc){const _0x600377=a110_0x2c5cc6,_0x5dc858=[],_0x5abfe5=new Set();for(const {yamlConfig:_0x262114,folderPath:_0x168431,sourcePath:_0x5d2f4c}of _0x12a174){const _0x4e51fa=resolveTDFolderPath(_0x168431,_0x4305b0,_0x3566dc),_0x11d25f=_0x4e51fa+':'+_0x262114['name'],_0x1bcabf=_0x315eda[_0x600377(0x132)][_0x600377(0x13d)](_0x11d25f);let _0x4a13af,_0x5558d6;if(_0x1bcabf&&_0x1bcabf[_0x600377(0x19b)]>0x0){const _0x53eaa2=buildLocalExpandedRuleMappings(_0x262114),{createYamlContext:_0x44490b,prefetchJourneySegments:_0x4a2f8f}=createPushYamlContextForBundle(_0x315eda[_0x600377(0xd1)],_0x315eda[_0x600377(0x14e)],_0x315eda[_0x600377(0x100)],_0x53eaa2,_0x315eda[_0x600377(0x18e)],_0x315eda[_0x600377(0xd9)],_0x315eda['activationStepsById'],_0x315eda['journeyById']);await _0x4a2f8f(_0x1bcabf['map'](_0x1fadec=>_0x1fadec['id']));const _0x3258e8=hasMultipleVersions(_0x262114),_0xaf5b8c=async _0x17ddc8=>{const _0x1d8ee8=_0x600377,_0x38782e=_0x315eda['journeyById']?.['get'](_0x17ddc8);if(_0x38782e)return _0x38782e;return _0x315eda[_0x1d8ee8(0x166)]({'journeyId':_0x17ddc8,'journeyName':_0x262114['name'],'isMultiVersion':_0x1bcabf[_0x1d8ee8(0x19b)]>0x1});};if(_0x3258e8&&_0x1bcabf[_0x600377(0x19b)]>0x1){const _0x31fa3c=[];for(const _0x56e017 of _0x1bcabf){const _0x2b7b01=_0x56e017[_0x600377(0x1ac)]||0x1;_0x315eda['progress']?.[_0x600377(0x104)](_0x600377(0x116)+_0x262114['name']+'\x20v'+_0x2b7b01);const _0x313359=await _0xaf5b8c(_0x56e017['id']),_0x29253f=_0x44490b(_0x56e017['id']),_0x4c265d=await journeyResponseToDef(_0x313359,_0x29253f);_0x31fa3c['push']({'item':_0x56e017,'yaml':_0x4c265d});}const _0x54cd5b=buildLocalRuleToNameMappingFromJourney(_0x262114);_0x5558d6=buildMergedJourneyDef(_0x31fa3c,_0x54cd5b);const _0x2fbc93=Math['max'](..._0x31fa3c[_0x600377(0x10e)](_0xfae9cb=>_0xfae9cb['item'][_0x600377(0x1ac)]||0x0)),_0x11de7b=_0x1bcabf[_0x600377(0x19e)](_0x43cd14=>(_0x43cd14['versionNumber']||0x0)===_0x2fbc93);_0x11de7b&&(_0x315eda[_0x600377(0xf3)]?.['update']('Fetching\x20'+_0x262114['name']+'\x20v'+_0x2fbc93),_0x4a13af=await _0xaf5b8c(_0x11de7b['id']));}else{const _0x4c619f=_0x1bcabf[_0x1bcabf[_0x600377(0x19b)]-0x1];_0x315eda[_0x600377(0xf3)]?.[_0x600377(0x104)](_0x600377(0x116)+_0x262114[_0x600377(0x1a2)]),_0x4a13af=await _0xaf5b8c(_0x4c619f['id']);const _0x305af8=_0x44490b(_0x4c619f['id']),_0x1e5118=await journeyResponseToDef(_0x4a13af,_0x305af8),_0x28b694=buildLocalRuleToNameMappingFromJourney(_0x262114);_0x5558d6=buildMergedJourneyDef([{'item':_0x4c619f,'yaml':_0x1e5118}],_0x28b694);}}addFoldersToCreate(_0x4e51fa,_0x315eda['folderPathToId'],_0x5abfe5);const _0x269bf5=calculateJourneyDiff(_0x262114,_0x5558d6);_0x5dc858['push']({'relativePath':_0x262114[_0x600377(0x1a2)],'absolutePath':_0x5d2f4c,'yamlConfig':_0x262114,'folderPath':_0x4e51fa,'existingJourney':_0x4a13af,'isNew':_0x269bf5[_0x600377(0xff)],'hasChanges':_0x269bf5[_0x600377(0x15f)],'diff':_0x269bf5['diff']});}return{'journeyFiles':_0x5dc858,'foldersToCreate':_0x5abfe5};}export function calculateActivationActions(_0x180f04,_0xa0f483,_0x1465a7,_0xd4cb8a){const _0x224eaf=a110_0x2c5cc6,_0x3c6349=[],_0xac6095=new Map();for(const _0x2b9661 of _0xa0f483){_0xac6095[_0x224eaf(0x191)](_0x2b9661['name'],_0x2b9661);}const _0x15bd49=new Map();for(const _0x3c2858 of _0x180f04){_0x15bd49[_0x224eaf(0x191)](_0x3c2858[_0x224eaf(0x1a2)],_0x3c2858);}for(const _0x2c1ed9 of _0x180f04){const _0x19e9ca=_0xac6095[_0x224eaf(0x13d)](_0x2c1ed9[_0x224eaf(0x1a2)]);if(!_0x19e9ca)_0x3c6349['push']({'type':_0x224eaf(0x188),'name':_0x2c1ed9[_0x224eaf(0x1a2)],'yamlActivation':_0x2c1ed9});else{const _0x34eff6=activationResponseToDef(_0x19e9ca,_0x1465a7,_0xd4cb8a),_0x290324=a110_0x5a09b7[_0x224eaf(0xfb)](_0x34eff6),_0x4b7312=a110_0x5a09b7[_0x224eaf(0xfb)](_0x2c1ed9);_0x290324!==_0x4b7312&&_0x3c6349['push']({'type':_0x224eaf(0x104),'name':_0x2c1ed9[_0x224eaf(0x1a2)],'yamlActivation':_0x2c1ed9,'existingActivation':_0x19e9ca});}}for(const _0x175760 of _0xa0f483){!_0x15bd49[_0x224eaf(0x183)](_0x175760[_0x224eaf(0x1a2)])&&_0x3c6349[_0x224eaf(0xf7)]({'type':_0x224eaf(0x17b),'name':_0x175760[_0x224eaf(0x1a2)],'existingActivation':_0x175760});}return _0x3c6349;}function a110_0x2c2f(_0x1acbd0,_0x1e2f7b){_0x1acbd0=_0x1acbd0-0xcd;const _0x569af5=a110_0x569a();let _0x2c2f66=_0x569af5[_0x1acbd0];return _0x2c2f66;}export function calculateSegmentDiff(_0x2810cb,_0x4de59c,_0x1165fa,_0x593d5c,_0x1e6fdd){const _0x4c6f06=segmentToYamlString(_0x2810cb);if(_0x4de59c){const _0x5af7f6=segmentWithActivationsToYaml(_0x4de59c,_0x1165fa,undefined,_0x593d5c,_0x1e6fdd),_0x8343fb=segmentToYamlString(_0x5af7f6),_0x3dbb48=generateDiff(_0x8343fb,_0x4c6f06),_0x3d8df2=hasChanges(_0x3dbb48);return{'isNew':![],'hasChanges':_0x3d8df2,'diff':_0x3d8df2?formatDiffWithColors(_0x3dbb48):undefined};}const _0x160d89=generateDiff('',_0x4c6f06);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x160d89)};}export function calculateJourneyDiff(_0x200cf4,_0x5cb71d){const _0x1a34fa=normalizeJourneyDef(_0x200cf4,_0x200cf4),_0x13d486=a110_0x8d07eb(_0x1a34fa);if(_0x5cb71d){const _0x1b6754=normalizeJourneyDef(_0x5cb71d,_0x200cf4),_0x7c3c23=a110_0x8d07eb(_0x1b6754),_0x454432=generateDiff(_0x7c3c23,_0x13d486),_0x12d88e=hasChanges(_0x454432);return{'isNew':![],'hasChanges':_0x12d88e,'diff':_0x12d88e?formatDiffWithColors(_0x454432):undefined};}const _0x130216=generateDiff('',_0x13d486);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x130216)};}export function findSegmentsToDelete(_0x4b1b44,_0x1b9369,_0x4e99e9,_0x1eee1f,_0x41cd9c){const _0x4ee677=a110_0x2c5cc6,_0x3f50ff=new Set();for(const {yamlConfig:_0x459db0,folderPath:_0x29d6d9}of _0x1b9369){_0x3f50ff[_0x4ee677(0x156)](_0x29d6d9+':'+_0x459db0[_0x4ee677(0x1a2)]);}return _0x4b1b44['filter'](_0x1cc910=>{const _0x25c31d=_0x4ee677,_0x19ec62=_0x1cc910['segmentFolderId']?_0x4e99e9[_0x25c31d(0x13d)](_0x1cc910['segmentFolderId'][_0x25c31d(0x195)]())||'':'',_0x4b420c=_0x19ec62+':'+_0x1cc910[_0x25c31d(0x1a2)];if(_0x3f50ff[_0x25c31d(0x183)](_0x4b420c))return![];if(_0x41cd9c)return _0x19ec62===_0x1eee1f||_0x19ec62['startsWith'](_0x1eee1f+'/');return!![];});}export function findJourneysToDelete(_0xac2f7a,_0x45465a,_0x3891b2,_0x268331,_0x4dee34){const _0x5699d1=a110_0x2c5cc6,_0x195ff6=new Set();for(const {yamlConfig:_0x4cc1a6,folderPath:_0x19b1d3}of _0x45465a){_0x195ff6[_0x5699d1(0x156)](_0x19b1d3+':'+_0x4cc1a6[_0x5699d1(0x1a2)]);}return _0xac2f7a[_0x5699d1(0x1b4)](_0x3f7314=>{const _0x39d8c5=_0x5699d1,_0x144a11=_0x3f7314['folderId']?_0x3891b2[_0x39d8c5(0x13d)](_0x3f7314[_0x39d8c5(0x128)])||'':'',_0xc83a90=_0x144a11+':'+_0x3f7314['journeyBundleName'];if(_0x195ff6[_0x39d8c5(0x183)](_0xc83a90))return![];if(_0x4dee34)return _0x144a11===_0x268331||_0x144a11['startsWith'](_0x268331+'/');return!![];});}export function buildSegmentLookupMap(_0x3f7643,_0x57f224){const _0x1ec958=a110_0x2c5cc6,_0x5e34e5=new Map();for(const _0x46d0ba of _0x3f7643){const _0x4f3f7d=_0x46d0ba[_0x1ec958(0x155)]?_0x57f224[_0x1ec958(0x13d)](_0x46d0ba[_0x1ec958(0x155)][_0x1ec958(0x195)]())||'':'',_0x28a195=_0x4f3f7d+':'+_0x46d0ba[_0x1ec958(0x1a2)];_0x5e34e5['set'](_0x28a195,_0x46d0ba);}return _0x5e34e5;}export function buildSegmentNameToIdMap(_0x803ab0){const _0x528a07=a110_0x2c5cc6,_0x2e6b81=new Map();for(const _0x34ec6b of _0x803ab0){_0x2e6b81[_0x528a07(0x191)](_0x34ec6b[_0x528a07(0x1a2)],_0x34ec6b['id']);}return _0x2e6b81;}export function buildJourneyBundleLookupMap(_0x15a9dd,_0x3d7db1){const _0x192e17=a110_0x2c5cc6,_0x4d54c5=new Map();for(const _0x556653 of _0x15a9dd){const _0x240aa9=_0x556653[_0x192e17(0x128)]?_0x3d7db1['get'](_0x556653[_0x192e17(0x128)])||'':'',_0x3975ef=_0x240aa9+':'+_0x556653[_0x192e17(0xd0)];!_0x4d54c5[_0x192e17(0x183)](_0x3975ef)&&_0x4d54c5['set'](_0x3975ef,[]),_0x4d54c5[_0x192e17(0x13d)](_0x3975ef)['push'](_0x556653);}for(const _0x5e1576 of _0x4d54c5['values']()){_0x5e1576['sort']((_0x13bde4,_0x4db1bc)=>(_0x13bde4[_0x192e17(0x1ac)]||0x0)-(_0x4db1bc[_0x192e17(0x1ac)]||0x0));}return _0x4d54c5;}export function collectFoldersToCreate(_0x3c2740,_0x5e0411){const _0xbf5b9=a110_0x2c5cc6,_0x19466d=new Set();for(const _0x2bd9ac of _0x3c2740){if(!_0x2bd9ac)continue;if(_0x5e0411[_0xbf5b9(0x183)](_0x2bd9ac))continue;const _0x9676b0=_0x2bd9ac[_0xbf5b9(0x15e)]('/');let _0x4e7c31='';for(const _0x59f4ec of _0x9676b0){_0x4e7c31=_0x4e7c31?_0x4e7c31+'/'+_0x59f4ec:_0x59f4ec,!_0x5e0411[_0xbf5b9(0x183)](_0x4e7c31)&&_0x19466d['add'](_0x4e7c31);}}return _0x19466d;}export function parseAndClassifyYamlFiles(_0x17ed7a,_0x4b0db8,_0x4abcb9){const _0x503d39=a110_0x2c5cc6,_0x4a2ffa=[],_0x5b2898=[];for(const _0x7dc63b of _0x17ed7a){const _0x34a13d=a110_0x122b0b[_0x503d39(0x1ad)](_0x4b0db8,a110_0x122b0b['dirname'](_0x7dc63b)),_0x369b8c=_0x34a13d==='.'?'':_0x34a13d,_0x385236=readFileSync(_0x7dc63b,'utf-8'),_0x571317=a110_0x5a09b7[_0x503d39(0x12d)](_0x385236);if(isJourneyDef(_0x571317)){const _0x455ed2=a110_0x28971b(_0x385236);_0x5b2898['push']({'yamlConfig':_0x455ed2,'folderPath':_0x369b8c,'sourcePath':_0x7dc63b});}else{if(!_0x4abcb9?.['skipSegments']){const _0x271ecf=parseSegmentYamlFile(_0x385236),_0x1b0d2a=normalizeChildSegmentYaml(_0x271ecf);_0x4a2ffa[_0x503d39(0xf7)]({'yamlConfig':_0x1b0d2a,'folderPath':_0x369b8c,'sourcePath':_0x7dc63b});}}}return{'segments':_0x4a2ffa,'journeys':_0x5b2898};}export function validateParsedFiles(_0x169ede,_0x5ab493){const _0x234278=a110_0x2c5cc6,_0x413bf5=[];for(const {yamlConfig:_0x45749d,sourcePath:_0x12dff8}of _0x169ede['segments']){const _0x6695=readFileSync(_0x12dff8,'utf-8'),_0x12a96c=a110_0x5a09b7[_0x234278(0x14f)](_0x6695),_0x4bf0d9=validateSegmentDef(_0x45749d,{'source':_0x6695,'document':_0x12a96c});if(!_0x4bf0d9[_0x234278(0x157)]){const _0x226f18=a110_0x122b0b[_0x234278(0x1ad)](_0x5ab493,_0x12dff8);_0x413bf5[_0x234278(0xf7)]({'filePath':_0x226f18,'source':_0x6695,'result':_0x4bf0d9,'isJourney':![]});}}for(const {yamlConfig:_0x448346,sourcePath:_0x45e03f}of _0x169ede[_0x234278(0x13b)]){const _0x11d953=readFileSync(_0x45e03f,_0x234278(0xee)),_0x5ce34f=a110_0x5a09b7['parseDocument'](_0x11d953),_0x5d1006=validateJourneyDef(_0x448346,{'source':_0x11d953,'document':_0x5ce34f});if(!_0x5d1006['valid']){const _0x295d97=a110_0x122b0b['relative'](_0x5ab493,_0x45e03f);_0x413bf5[_0x234278(0xf7)]({'filePath':_0x295d97,'source':_0x11d953,'result':_0x5d1006,'isJourney':!![]});}}return _0x413bf5;}export function formatValidationErrors(_0x104753){const _0x350a09=a110_0x2c5cc6,_0x565bf1=[];for(const {filePath:_0x2cba62,source:_0x59987c,result:_0x5d157d,isJourney:_0x3b0ff4}of _0x104753){const _0xf02497=_0x3b0ff4?_0x350a09(0x177):_0x350a09(0x11f);_0x565bf1[_0x350a09(0xf7)]('\x0a'+_0x2cba62+'\x20('+_0xf02497+_0x350a09(0x146)+_0x5d157d[_0x350a09(0x123)][_0x350a09(0x19b)]+_0x350a09(0x14a)),_0x565bf1['push'](formatValidationResult(_0x5d157d,_0x59987c,_0x2cba62));}return _0x565bf1['join']('\x0a');}export function buildLocalExpandedRuleMappings(_0x21f3ad){const _0x3eb23a=a110_0x2c5cc6,_0x46b89c=new Set(),_0x43d7f0=new Map(),_0x2175c9=collectSegmentUsageCounts(_0x21f3ad);if(_0x21f3ad[_0x3eb23a(0xf4)])for(const [_0xb8f380,_0x397081]of Object[_0x3eb23a(0x14c)](_0x21f3ad[_0x3eb23a(0xf4)])){_0x46b89c[_0x3eb23a(0x156)](_0xb8f380);if(_0x397081[_0x3eb23a(0xef)]){const _0x219f0f=yamlRuleToApi(_0x397081[_0x3eb23a(0xef)]),_0x56e54f=apiRuleToYaml(_0x219f0f);_0x43d7f0['set'](_0xb8f380,_0x56e54f);}}const _0x801fda=new Map();let _0x4d8653=0x0;for(const [_0x23a0dc,_0x161f14]of _0x43d7f0){const _0x58634d=serializeExpandedRule(_0x161f14,_0x43d7f0),_0x21f072=_0x801fda['get'](_0x58634d)||[];_0x21f072[_0x3eb23a(0xf7)]({'name':_0x23a0dc,'index':_0x4d8653}),_0x801fda[_0x3eb23a(0x191)](_0x58634d,_0x21f072),_0x4d8653++;}const _0x35c589=new Map();for(const [_0x419bc5,_0x3243cd]of _0x801fda){const _0x3a3b24=_0x3243cd[_0x3eb23a(0x135)]()[_0x3eb23a(0xfc)]((_0x943ef0,_0x181272)=>{const _0x24ce64=_0x3eb23a,_0x18c38c=_0x2175c9['get'](_0x943ef0[_0x24ce64(0x1a2)])||0x0,_0x355a05=_0x2175c9[_0x24ce64(0x13d)](_0x181272['name'])||0x0;if(_0x18c38c!==_0x355a05)return _0x355a05-_0x18c38c;return _0x943ef0[_0x24ce64(0xcd)]-_0x181272['index'];})[_0x3eb23a(0x10e)](_0x253992=>_0x253992['name']),_0x44f546=[];for(const _0x2857bc of _0x3a3b24){const _0x208bdf=_0x2175c9[_0x3eb23a(0x13d)](_0x2857bc)||0x0,_0x23f867=Math[_0x3eb23a(0x171)](_0x208bdf,0x1);for(let _0x1baf59=0x0;_0x1baf59<_0x23f867;_0x1baf59++){_0x44f546[_0x3eb23a(0xf7)](_0x2857bc);}}_0x35c589[_0x3eb23a(0x191)](_0x419bc5,_0x44f546);}return{'existingLocalSegmentNames':_0x46b89c,'localSegmentRules':_0x43d7f0,'localExpandedRuleToNames':_0x35c589};}async function buildServerSegmentRuleMap(_0x417883,_0x495f69,_0x2df3a6,_0x5c56a7){const _0x55d8f0=new Map(),_0x523e22=new Set(),_0x36ed49=async _0x18039a=>{const _0x2eb5a6=a110_0x2c2f;if(_0x523e22[_0x2eb5a6(0x183)](_0x18039a))return;_0x523e22['add'](_0x18039a);let _0x4e3d11=_0x2df3a6['find'](_0x4e2785=>_0x4e2785['id']===_0x18039a);if(!_0x4e3d11)try{_0x4e3d11=await _0x417883[_0x2eb5a6(0x11f)]['getSegment'](_0x495f69,_0x18039a);}catch{return;}if(!_0x4e3d11?.[_0x2eb5a6(0xef)])return;const _0x36f97a=apiRuleToYaml(_0x4e3d11['rule']);_0x55d8f0[_0x2eb5a6(0x191)](_0x18039a,_0x36f97a);const _0x572f3e=collectSegmentRefsFromRule(_0x36f97a);for(const _0x394066 of _0x572f3e){await _0x36ed49(_0x394066);}};for(const _0x49be01 of _0x5c56a7){await _0x36ed49(_0x49be01);}return _0x55d8f0;}export function createSegmentIdResolver(_0x3aa9c1,_0x454ed3){return async _0x2d85e2=>{const _0x361604=a110_0x2c2f,_0x1881f9=_0x3aa9c1[_0x361604(0x13d)](_0x2d85e2);if(!_0x1881f9)throw new SDKError(ErrorCode[_0x361604(0xf9)],_0x361604(0x151)+_0x2d85e2+_0x361604(0x18b)+_0x454ed3+'\x27)');return _0x1881f9;};}export function extractRootFolderId(_0x1409b1){const _0x2f43c7=a110_0x2c5cc6;return _0x1409b1['relationships']?.[_0x2f43c7(0xea)]?.['data']?.['id']||_0x1409b1[_0x2f43c7(0x114)]?.[_0x2f43c7(0x138)]?.[_0x2f43c7(0x15b)]?.['id'];}export function buildConnectionMaps(_0x53805a){const _0x3e6452=a110_0x2c5cc6,_0x1903bd=new Map(),_0x2a3bde=new Map(),_0x182bcd=new Map();for(const _0x4b5df2 of _0x53805a){_0x1903bd[_0x3e6452(0x191)](_0x4b5df2['name'],parseInt(_0x4b5df2['id'],0xa)),_0x2a3bde[_0x3e6452(0x191)](_0x4b5df2['id'],_0x4b5df2[_0x3e6452(0x1a2)]),_0x182bcd['set'](_0x4b5df2[_0x3e6452(0x1a2)],_0x4b5df2[_0x3e6452(0x170)]);}return{'nameToId':_0x1903bd,'idToName':_0x2a3bde,'nameToType':_0x182bcd};}function a110_0x569a(){const _0x507793=['deleted','reduce','effectiveFolderId','journey_created','):\x20','./child-segment-yaml.js','861780RbECau','segmentNameToId','\x20error(s)','isArray','entries','Created\x20segment\x20\x27','parentId','parseDocument','activation_','Segment\x20not\x20found:\x20','trim','createdSegmentIds','Updated\x20journey\x20\x27','segmentFolderId','add','valid','journeyStages','JOURNEY_UPDATE_ERROR','Created\x20journey\x20\x27','data','createSegment','SEGMENT_UPDATE_ERROR','split','hasChanges','15213370CYymKh','buildUserMaps','Created\x20activation\x20\x27','activation_deleting','verbose','yamlConfig','fetchJourney','resolveJourneyId','\x0a\x20\x20','connection','journey_entry_criteria_','ACTIVATION_UPDATE_ERROR','\x27\x20decision\x20point\x20branch\x20\x27','6KbetYy','yamlActivation','attributes','type','max','activationActions','329XjMTqW','11nGoEqo','Activation','keys','journey','\x20activation\x20\x27','createFolder','stages','delete','Updating\x20segment\x20\x27','created','logSuccess','Cannot\x20create\x20embedded\x20segment\x20for\x20existing\x20journey\x20without\x20journey\x20ID','digest','action','Creating\x20segment\x20\x27','has','folderPathToId','decision_point','\x20segment\x20from\x20file:\x20','description','create','logDeleted','Journey\x20\x27','\x20(referenced\x20in\x20embedded\x20segment\x20\x27','journey_updated','folder_created','idToEmailMap','Define\x20it\x20in\x20the\x20journey\x27s\x20\x27activations\x27\x20section\x20or\x20use\x20an\x20existing\x20activation\x20ID.','existingJourney','set','embeddedSegmentNameToId','updated','__pending_','toString','698922VecKmN','createJourneySegment','activations','existingSegment','size','length','32705PfzFKv','embedded_segment_created','find','listActivations','7612353aCQWXG','columns','name','folderPath','Updated\x20activation\x20\x27','nameToId','localSegmentRules','activationParams','unchanged','message','replace','rootFolderId','versionNumber','relative','flatMap','entryCriteria','entry','INTERNAL','./journey-yaml.js','Stage\x20\x27','filter','index','activation_updating','DecisionPoint','journeyBundleName','deps','\x27\x20from\x20file:\x20','activation_template_id','Creating\x20activation\x20\x27','\x27\x20exit\x20criteria','WaitStep','199768YMysKJ','../../utils/async.js','connectionIdToNameMap','Deleted\x20activation\x20\x27','waitCondition','Warning:\x20Could\x20not\x20resolve\x20embedded\x20segment\x20\x27','createActivation','segment_creating','Failed\x20to\x20sync\x20activations\x20for\x20segment\x20\x27','withProgress','list','toLowerCase','steps','startsWith','connector_config','segment_updating','journeyActivationStepId','diff','existingActivation','parentSegmentFolder','from','branches','activation_deleted','utf-8','rule','embedded_segment_creating','Deleted\x20segment\x20\x27','getSegment','progress','segments','milestone','with','push','deleteActivation','SEGMENT_NOT_FOUND','\x27\x20wait\x20condition','stringify','sort','stage\x20\x27','journeyActivationNameToId','isNew','existingSegments','Activation\x20not\x20found:\x20','notification','logWarning','update','embedded_activation_creating','listSegments','Updating\x20activation\x20\x27','\x27...','Created\x20folder\x20\x27','absolutePath','segment_deleting','572bOyseW','sha1','map','entry_criteria','all_columns','folder_creating','NOT_FOUND','join','relationships','journeyId','Fetching\x20','kind','segmentByFolderAndName','\x20(referenced\x20in\x20journey\x20','folder','user','activation_created','onProgress','object','segment','segment_deleted','Entry\x20criteria:\x20','includes','errors','segmentId','schedule','validatedRequest','draft','folderId','Creating\x20folder\x20\x27','nameToType','Failed\x20to\x20','Updated\x20segment\x20\x27','parse','activation_updated','ACTIVATION_SYNTAX_ERROR','exitCriterias','activationContext','journeyBundlesByFolderAndName','1212676Iarixo','journey_creating','slice','behavior','goal\x20criteria','parentFolder','JOURNEY_SYNTAX_ERROR','getJourney','journeys','updateSegmentById','get','getActivation','SEGMENT_SYNTAX_ERROR','createdSegmentId','goal'];a110_0x569a=function(){return _0x507793;};return a110_0x569a();}export function calculatePushStats(_0x468952,_0x2ec39d,_0x20de5b,_0x2bbe94,_0x28a6a8,_0x365e31,_0x341057){const _0x323efd=a110_0x2c5cc6,_0x3c561d=_0x468952[_0x323efd(0x1b4)](_0x1c1142=>_0x1c1142[_0x323efd(0xff)]),_0x548898=_0x468952[_0x323efd(0x1b4)](_0x3d6ebb=>!_0x3d6ebb[_0x323efd(0xff)]&&_0x3d6ebb[_0x323efd(0x15f)]),_0x50ad30=_0x468952[_0x323efd(0x1b4)](_0x5d399f=>!_0x5d399f[_0x323efd(0xff)]&&!_0x5d399f['hasChanges']),_0x156ad7=_0x365e31?_0x2bbe94:[],_0x2a91a6=_0x2ec39d[_0x323efd(0x1b4)](_0x5d9e22=>_0x5d9e22[_0x323efd(0xff)]),_0xb9d9cd=_0x2ec39d['filter'](_0x76da20=>!_0x76da20['isNew']&&_0x76da20[_0x323efd(0x15f)]),_0x2a2cae=_0x2ec39d[_0x323efd(0x1b4)](_0x1e7b99=>!_0x1e7b99[_0x323efd(0xff)]&&!_0x1e7b99[_0x323efd(0x15f)]),_0x3d1935=_0x365e31?_0x28a6a8:[],_0x702029=_0x468952[_0x323efd(0x1ae)](_0x1f1481=>_0x1f1481[_0x323efd(0x172)]),_0x388a7b=_0x702029['filter'](_0x2cfce4=>_0x2cfce4['type']===_0x323efd(0x188)),_0x1be02b=_0x702029[_0x323efd(0x1b4)](_0x507a2f=>_0x507a2f['type']===_0x323efd(0x104)),_0x537904=_0x702029[_0x323efd(0x1b4)](_0x28f112=>_0x28f112[_0x323efd(0x170)]===_0x323efd(0x17b)),_0x27ab4c=Array[_0x323efd(0xeb)](_0x20de5b)[_0x323efd(0xfc)](),_0x18690d=_0x341057?![]:_0x3c561d['length']>0x0||_0x548898[_0x323efd(0x19b)]>0x0||_0x156ad7[_0x323efd(0x19b)]>0x0,_0x22299b=_0x2a91a6[_0x323efd(0x19b)]>0x0||_0xb9d9cd['length']>0x0||_0x3d1935[_0x323efd(0x19b)]>0x0,_0x3fa446=_0x341057?![]:_0x702029[_0x323efd(0x19b)]>0x0,_0x2dd3fc=_0x27ab4c[_0x323efd(0x19b)]>0x0;return{'segments':{'new':_0x3c561d,'changed':_0x548898,'unchanged':_0x50ad30,'toDelete':_0x156ad7},'journeys':{'new':_0x2a91a6,'changed':_0xb9d9cd,'unchanged':_0x2a2cae,'toDelete':_0x3d1935},'activations':{'all':_0x702029,'toCreate':_0x388a7b,'toUpdate':_0x1be02b,'toDelete':_0x537904},'folders':{'toCreate':_0x27ab4c},'counts':{'segments':{'new':_0x3c561d[_0x323efd(0x19b)],'changed':_0x548898['length'],'unchanged':_0x50ad30[_0x323efd(0x19b)],'toDelete':_0x156ad7[_0x323efd(0x19b)]},'journeys':{'new':_0x2a91a6['length'],'changed':_0xb9d9cd[_0x323efd(0x19b)],'unchanged':_0x2a2cae['length'],'toDelete':_0x3d1935[_0x323efd(0x19b)]},'activations':{'create':_0x388a7b[_0x323efd(0x19b)],'update':_0x1be02b[_0x323efd(0x19b)],'delete':_0x537904[_0x323efd(0x19b)]},'folders':_0x27ab4c[_0x323efd(0x19b)]},'hasChanges':_0x18690d||_0x22299b||_0x3fa446||_0x2dd3fc};}export async function buildPushExecutionContext(_0xf52c70,_0x24db2b,_0x5f3b79,_0x32b109,_0x1efe97,_0x1fc8cb){const _0x105fa7=a110_0x2c5cc6,_0x29c581=extractRootFolderId(_0x5f3b79),{pathToId:_0x5e8aec,idToPath:_0x130e74}=buildFolderMaps(_0x1efe97),_0x1485ad=buildSegmentNameToIdMap(_0x32b109),_0x541770=new Map(),{batchAsync:_0x22c53e}=await import(_0x105fa7(0xd8)),[_0x361bef,_0x2cbfb6]=await Promise['all']([_0xf52c70[_0x105fa7(0x11b)][_0x105fa7(0x161)](),_0xf52c70['connection'][_0x105fa7(0xe1)](),((async()=>{!_0x1fc8cb&&_0x32b109['length']>0x0&&await _0x22c53e(_0x32b109,async _0x432287=>{const _0x224ca7=a110_0x2c2f,_0x8c5376=await _0xf52c70['segment'][_0x224ca7(0x19f)](_0x24db2b,_0x432287['id']);_0x541770[_0x224ca7(0x191)](_0x432287['id'],_0x8c5376);});})())]),{emailToId:_0x458910,idToEmail:_0x1ae44a}=_0x361bef,_0x1ea147=buildConnectionMaps(_0x2cbfb6);return{'rootFolderId':_0x29c581,'folderPathToId':_0x5e8aec,'folderIdToPath':_0x130e74,'segmentNameToId':_0x1485ad,'activationsBySegmentId':_0x541770,'emailToIdMap':_0x458910,'idToEmailMap':_0x1ae44a,'connectionNameToIdMap':_0x1ea147[_0x105fa7(0x1a5)],'connectionIdToNameMap':_0x1ea147['idToName'],'connectionNameToTypeMap':_0x1ea147[_0x105fa7(0x12a)]};}export function createPushYamlContextForBundle(_0x4642ef,_0x59ace3,_0x25d12d,_0x50cd31,_0x3767a7,_0x3ccd04,_0x25bc60,_0x44bf1c){const {existingLocalSegmentNames:_0x439bd0,localExpandedRuleToNames:_0x46b1d9}=_0x50cd31,_0x3dd3c6=new Set(),_0x2e69d6=new Map(),_0x1c789f=new Map(),_0x18e4fa=new Map(),_0x4da3b8=createJumpTargetCache(),_0x2f0ef0=new Map(),_0x2e254=new Map(),_0x454030=new Set();let _0x175892;const _0x6fe477=_0x58820b=>{const _0x567b73={'resolveSegment':async _0x3d8536=>{const _0x4d01b9=a110_0x2c2f,_0x596af7=_0x18e4fa[_0x4d01b9(0x13d)](_0x3d8536);if(_0x596af7!==undefined)return{'name':_0x596af7,'isJourneyLocal':!![]};try{let _0x4e24a9=_0x25d12d['find'](_0x501251=>_0x501251['id']===_0x3d8536);!_0x4e24a9&&(_0x4e24a9=await _0x4642ef[_0x4d01b9(0x11f)][_0x4d01b9(0xf2)](_0x59ace3,_0x3d8536));const _0x15f763=generateJourneyLocalName(_0x4e24a9[_0x4d01b9(0x1a2)]),_0x20d76b=_0x4e24a9[_0x4d01b9(0x117)]===SEGMENT_KIND_JOURNEY&&_0x15f763!==undefined;let _0x33835d=_0x4e24a9[_0x4d01b9(0x1a2)],_0x26b3fb;if(_0x20d76b&&_0x4e24a9[_0x4d01b9(0xef)]){const _0x271cc5=apiRuleToYaml(_0x4e24a9['rule']);_0x2e254[_0x4d01b9(0x191)](_0x3d8536,_0x271cc5);const _0x27bdc0=async _0x1dde44=>{const _0x38a86c=_0x4d01b9,_0x37d71c=collectSegmentRefsFromRule(_0x1dde44);for(const _0x2f9ab3 of _0x37d71c){if(!_0x2e254[_0x38a86c(0x183)](_0x2f9ab3))try{const _0x137ca0=await _0x4642ef['segment'][_0x38a86c(0xf2)](_0x59ace3,_0x2f9ab3);if(_0x137ca0?.[_0x38a86c(0xef)]){const _0x2e1921=apiRuleToYaml(_0x137ca0[_0x38a86c(0xef)]);_0x2e254[_0x38a86c(0x191)](_0x2f9ab3,_0x2e1921),await _0x27bdc0(_0x2e1921);}}catch{}}};await _0x27bdc0(_0x271cc5);const _0x5c1eb0=serializeExpandedRule(_0x271cc5,_0x2e254),_0x368d82=_0x46b1d9[_0x4d01b9(0x13d)](_0x5c1eb0);if(_0x368d82&&_0x368d82[_0x4d01b9(0x19b)]>0x0){const _0x35187f=_0x2e69d6[_0x4d01b9(0x13d)](_0x5c1eb0)||0x0,_0x358b17=_0x368d82[_0x35187f]||_0x368d82[_0x368d82[_0x4d01b9(0x19b)]-0x1];_0x2e69d6[_0x4d01b9(0x191)](_0x5c1eb0,_0x35187f+0x1),_0x33835d=_0x358b17,_0x3dd3c6[_0x4d01b9(0x156)](_0x33835d),_0x18e4fa[_0x4d01b9(0x191)](_0x3d8536,_0x33835d);const _0x1be8de=await resolveRuleSegmentRefs(_0x271cc5,async _0x3f3f6e=>{const _0x3a78ef=_0x4d01b9,_0x3fd3f8=_0x18e4fa['get'](_0x3f3f6e);if(_0x3fd3f8)return _0x3fd3f8;const _0x5aac73=await _0x175892['resolveSegment'](_0x3f3f6e);return _0x5aac73[_0x3a78ef(0x1a2)];});_0x26b3fb={'description':_0x4e24a9[_0x4d01b9(0x187)],'rule':_0x1be8de};}else{const _0x4355d9=_0x2f0ef0[_0x4d01b9(0x13d)](_0x5c1eb0);if(_0x4355d9)_0x33835d=_0x4355d9,_0x18e4fa[_0x4d01b9(0x191)](_0x3d8536,_0x33835d);else{if(_0x15f763){let _0x32cb6f=_0x15f763,_0x25df0d=0x2;while(_0x3dd3c6[_0x4d01b9(0x183)](_0x32cb6f)||_0x439bd0[_0x4d01b9(0x183)](_0x32cb6f)){_0x32cb6f=_0x15f763+'_'+_0x25df0d,_0x25df0d++;}_0x3dd3c6['add'](_0x32cb6f),_0x33835d=_0x32cb6f;}_0x18e4fa[_0x4d01b9(0x191)](_0x3d8536,_0x33835d),_0x2f0ef0[_0x4d01b9(0x191)](_0x5c1eb0,_0x33835d);const _0x60af75=await resolveRuleSegmentRefs(_0x271cc5,async _0x1e6f65=>{const _0x3f1136=_0x4d01b9,_0x3662cb=_0x18e4fa[_0x3f1136(0x13d)](_0x1e6f65);if(_0x3662cb)return _0x3662cb;const _0x5402cd=await _0x175892['resolveSegment'](_0x1e6f65);return _0x5402cd['name'];});_0x26b3fb={'description':_0x4e24a9['description'],'rule':_0x60af75};}}}return{'name':_0x33835d,'isJourneyLocal':_0x20d76b,'definition':_0x26b3fb};}catch{return{'name':_0x3d8536,'isJourneyLocal':![]};}},'resolveActivation':async _0x566885=>{const _0x23ae2a=a110_0x2c2f,_0xb0aa8=_0x1c789f[_0x23ae2a(0x13d)](_0x566885);if(_0xb0aa8!==undefined)return{'name':_0xb0aa8,'isJourneyLocal':!![]};try{let _0x2f2952=_0x25bc60?.['get'](_0x566885);!_0x2f2952&&(_0x2f2952=await _0x4642ef['journey'][_0x23ae2a(0x13e)](_0x58820b,_0x566885));const _0x52accc=_0x2f2952[_0x23ae2a(0x16f)][_0x23ae2a(0x1a7)][_0x23ae2a(0x1a2)]||_0x566885,_0x205439=sanitizeYamlKey(_0x52accc)||_0x23ae2a(0x150)+_0x566885,_0x14204d=_0x205439;_0x1c789f[_0x23ae2a(0x191)](_0x566885,_0x14204d);const _0x569076=journeyActivationStepToYaml(_0x2f2952,_0x3767a7,_0x3ccd04);return{'name':_0x14204d,'isJourneyLocal':!![],'definition':_0x569076};}catch{return{'name':_0x566885,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x176266,_0x5a9f81)=>resolveJumpTarget(_0x176266,_0x5a9f81,_0x4da3b8,async _0x5256f6=>{const _0x5cf36f=a110_0x2c2f,_0x192034=_0x44bf1c?.[_0x5cf36f(0x13d)](_0x5256f6);if(_0x192034)return _0x192034;return _0x4642ef[_0x5cf36f(0x177)][_0x5cf36f(0x13a)](_0x5256f6);})};return _0x175892=_0x567b73,_0x567b73;},_0x7a66d2=async _0x382cbc=>{const _0x22187e=a110_0x2c2f,{collectSegmentIdsFromJourneyApi:_0x3469ce}=await import(_0x22187e(0x1b2)),{batchAsync:_0x4c696e}=await import(_0x22187e(0xd8)),_0x1d955c=new Set();for(const _0x2495fb of _0x382cbc){let _0x43b607=_0x44bf1c?.[_0x22187e(0x13d)](_0x2495fb);!_0x43b607&&(_0x43b607=await _0x4642ef[_0x22187e(0x177)][_0x22187e(0x13a)](_0x2495fb));const _0x48def8=_0x3469ce(_0x43b607);for(const _0x301c37 of _0x48def8){_0x1d955c[_0x22187e(0x156)](_0x301c37);}}let _0x131ee1=Array[_0x22187e(0xeb)](_0x1d955c);while(_0x131ee1['length']>0x0){const _0x27182d=_0x131ee1['filter'](_0x5c2531=>!_0x454030[_0x22187e(0x183)](_0x5c2531));if(_0x27182d[_0x22187e(0x19b)]===0x0)break;const _0x14d0a5=await _0x4c696e(_0x27182d,async _0x40c297=>{const _0x407178=_0x22187e;_0x454030[_0x407178(0x156)](_0x40c297);let _0x510997=_0x25d12d[_0x407178(0x19e)](_0x5d7ab2=>_0x5d7ab2['id']===_0x40c297);if(!_0x510997)try{_0x510997=await _0x4642ef['segment'][_0x407178(0xf2)](_0x59ace3,_0x40c297);}catch{return null;}return{'segmentId':_0x40c297,'segment':_0x510997};},0xa),_0x2db545=new Set();for(const _0x4e6fb7 of _0x14d0a5){if(!_0x4e6fb7?.['segment']?.[_0x22187e(0xef)])continue;const _0x4ef50f=apiRuleToYaml(_0x4e6fb7[_0x22187e(0x11f)][_0x22187e(0xef)]);_0x2e254[_0x22187e(0x191)](_0x4e6fb7[_0x22187e(0x124)],_0x4ef50f);const _0x12d6de=collectSegmentRefsFromRule(_0x4ef50f);for(const _0x1c6def of _0x12d6de){!_0x454030[_0x22187e(0x183)](_0x1c6def)&&_0x2db545[_0x22187e(0x156)](_0x1c6def);}}_0x131ee1=Array[_0x22187e(0xeb)](_0x2db545);}};return{'createYamlContext':_0x6fe477,'prefetchJourneySegments':_0x7a66d2};}export async function executePushSegments(_0x286dd2,_0x11141c,_0x50234b,_0x576908,_0x41da59){const _0x472f1f=a110_0x2c5cc6,{segmentDefToCreateRequest:_0x534cd7,segmentDefToUpdateRequest:_0x5d55b2}=await import(_0x472f1f(0x147)),_0x2404be=_0x50234b[_0x472f1f(0x184)],_0x58d737=0x5,_0x292e92=async _0x5b5f92=>{const _0x8979c8=_0x472f1f,_0x44fe3c=_0x5b5f92['folderPath']?_0x2404be['get'](_0x5b5f92[_0x8979c8(0x1a3)]):undefined;let _0x41f598;const _0x59d0cc={'created':0x0,'updated':0x0,'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};try{if(_0x5b5f92[_0x8979c8(0xff)]){_0x41da59[_0x8979c8(0x11d)]?.({'type':_0x8979c8(0xde),'name':_0x5b5f92[_0x8979c8(0x165)]['name']});const _0x50f565=_0x534cd7(_0x5b5f92['yamlConfig'],_0x44fe3c),_0x45bf52=await _0x41da59[_0x8979c8(0xe0)](_0x8979c8(0x182)+_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)]+_0x8979c8(0x108),()=>_0x286dd2['segment'][_0x8979c8(0x15c)](_0x576908[_0x8979c8(0x14e)],_0x50f565));_0x41f598=_0x45bf52[_0x8979c8(0x15b)]['id'],_0x59d0cc['createdSegmentId']={'name':_0x5b5f92[_0x8979c8(0x165)]['name'],'id':_0x41f598},_0x41da59[_0x8979c8(0x11d)]?.({'type':'segment_created','name':_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)],'segmentId':_0x41f598}),_0x41da59[_0x8979c8(0x17e)]?.(_0x8979c8(0x14d)+_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)]+'\x27'),_0x59d0cc['created']=0x1;}else{if(_0x5b5f92['hasChanges']){_0x41da59['onProgress']?.({'type':_0x8979c8(0xe6),'name':_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)]});const _0x541f0d=_0x5d55b2(_0x5b5f92[_0x8979c8(0x165)]);_0x44fe3c!==_0x5b5f92['existingSegment']?.[_0x8979c8(0x155)]&&(_0x541f0d['segmentFolderId']=_0x44fe3c?parseInt(_0x44fe3c,0xa):undefined),await _0x41da59[_0x8979c8(0xe0)](_0x8979c8(0x17c)+_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)]+_0x8979c8(0x108),()=>_0x286dd2[_0x8979c8(0x11f)]['updateSegmentById'](_0x576908[_0x8979c8(0x14e)],_0x5b5f92[_0x8979c8(0x199)]['id'],_0x541f0d)),_0x41f598=_0x5b5f92['existingSegment']['id'],_0x41da59['onProgress']?.({'type':'segment_updated','name':_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)]}),_0x41da59[_0x8979c8(0x17e)]?.(_0x8979c8(0x12c)+_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)]+'\x27'),_0x59d0cc['updated']=0x1;}else _0x41f598=_0x5b5f92[_0x8979c8(0x199)]['id'];}}catch(_0x370a6d){const _0x97434e=isHttp400Error(_0x370a6d),_0xfc406f=_0x97434e?ErrorCode[_0x8979c8(0x13f)]:ErrorCode[_0x8979c8(0x15d)],_0x5f1be1=getErrorMessage(_0x370a6d);throw new SDKError(_0xfc406f,_0x8979c8(0x12b)+(_0x5b5f92[_0x8979c8(0xff)]?'create':_0x8979c8(0x104))+_0x8979c8(0x186)+_0x5b5f92['absolutePath']+_0x8979c8(0x168)+_0x5f1be1,_0x370a6d);}try{const _0x1d3084=await syncActivationsForSegment(_0x286dd2,_0x576908[_0x8979c8(0x14e)],_0x41f598,_0x5b5f92[_0x8979c8(0x165)][_0x8979c8(0x1a2)],_0x5b5f92[_0x8979c8(0x172)],_0x41da59,_0x5b5f92[_0x8979c8(0x10a)]);_0x59d0cc['activations']=_0x1d3084;}catch(_0x311250){if(_0x311250 instanceof SDKError)throw _0x311250;throw new SDKError(ErrorCode[_0x8979c8(0x16b)],_0x8979c8(0xdf)+_0x5b5f92[_0x8979c8(0x165)]['name']+_0x8979c8(0xd2)+_0x5b5f92['absolutePath']+_0x8979c8(0x168)+getErrorMessage(_0x311250),_0x311250);}return _0x59d0cc;},_0xf247f0=await batchAsync(_0x11141c,_0x292e92,_0x58d737),_0x3828a3={'created':0x0,'updated':0x0,'deleted':0x0,'createdSegmentIds':new Map(),'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};for(const _0xa6b320 of _0xf247f0){_0x3828a3['created']+=_0xa6b320[_0x472f1f(0x17d)],_0x3828a3[_0x472f1f(0x193)]+=_0xa6b320[_0x472f1f(0x193)],_0xa6b320[_0x472f1f(0x140)]&&_0x3828a3[_0x472f1f(0x153)][_0x472f1f(0x191)](_0xa6b320[_0x472f1f(0x140)]['name'],_0xa6b320[_0x472f1f(0x140)]['id']),_0x3828a3['activations'][_0x472f1f(0x17d)]+=_0xa6b320[_0x472f1f(0x198)][_0x472f1f(0x17d)],_0x3828a3[_0x472f1f(0x198)]['updated']+=_0xa6b320[_0x472f1f(0x198)]['updated'],_0x3828a3[_0x472f1f(0x198)]['deleted']+=_0xa6b320[_0x472f1f(0x198)][_0x472f1f(0x142)];}return _0x3828a3;}async function syncActivationsForSegment(_0xdcef40,_0x30d71f,_0x1cd97e,_0xbf5975,_0x1098a4,_0xc990d4,_0x2c6a48){const _0x455430=a110_0x2c5cc6,_0x36da9f={'created':0x0,'updated':0x0,'deleted':0x0};for(const _0x617847 of _0x1098a4){try{if(_0x617847[_0x455430(0x170)]===_0x455430(0x188)&&_0x617847[_0x455430(0x126)])_0xc990d4[_0x455430(0x11d)]?.({'type':'activation_creating','segmentName':_0xbf5975,'activationName':_0x617847[_0x455430(0x1a2)]}),await _0xc990d4[_0x455430(0xe0)](_0x455430(0xd4)+_0x617847[_0x455430(0x1a2)]+'\x27...',()=>_0xdcef40['segment'][_0x455430(0xdd)](_0x30d71f,_0x1cd97e,_0x617847['validatedRequest'])),_0xc990d4[_0x455430(0x11d)]?.({'type':_0x455430(0x11c),'segmentName':_0xbf5975,'activationName':_0x617847[_0x455430(0x1a2)]}),_0xc990d4[_0x455430(0x17e)]?.(_0x455430(0x162)+_0x617847[_0x455430(0x1a2)]+'\x27'),_0x36da9f[_0x455430(0x17d)]++;else{if(_0x617847[_0x455430(0x170)]===_0x455430(0x104)&&_0x617847['validatedRequest']&&_0x617847[_0x455430(0xe9)])_0xc990d4[_0x455430(0x11d)]?.({'type':_0x455430(0xce),'segmentName':_0xbf5975,'activationName':_0x617847[_0x455430(0x1a2)]}),await _0xc990d4[_0x455430(0xe0)](_0x455430(0x107)+_0x617847[_0x455430(0x1a2)]+_0x455430(0x108),()=>_0xdcef40[_0x455430(0x11f)]['updateActivation'](_0x30d71f,_0x1cd97e,_0x617847[_0x455430(0xe9)]['id'],_0x617847[_0x455430(0x126)])),_0xc990d4['onProgress']?.({'type':_0x455430(0x12e),'segmentName':_0xbf5975,'activationName':_0x617847[_0x455430(0x1a2)]}),_0xc990d4['logSuccess']?.(_0x455430(0x1a4)+_0x617847[_0x455430(0x1a2)]+'\x27'),_0x36da9f[_0x455430(0x193)]++;else _0x617847[_0x455430(0x170)]===_0x455430(0x17b)&&_0x617847['existingActivation']&&(_0xc990d4['onProgress']?.({'type':_0x455430(0x163),'segmentName':_0xbf5975,'activationName':_0x617847[_0x455430(0x1a2)]}),await _0xc990d4['withProgress']('Deleting\x20activation\x20\x27'+_0x617847['name']+_0x455430(0x108),()=>_0xdcef40[_0x455430(0x11f)][_0x455430(0xf8)](_0x30d71f,_0x1cd97e,_0x617847[_0x455430(0xe9)]['id'])),_0xc990d4['onProgress']?.({'type':_0x455430(0xed),'segmentName':_0xbf5975,'activationName':_0x617847[_0x455430(0x1a2)]}),_0xc990d4[_0x455430(0x189)]?.(_0x455430(0xda)+_0x617847['name']+'\x27'),_0x36da9f['deleted']++);}}catch(_0x421d62){const _0xe9ea27=isHttp400Error(_0x421d62),_0x2adda9=_0xe9ea27?ErrorCode[_0x455430(0x12f)]:ErrorCode[_0x455430(0x16b)],_0x475ba6=getErrorMessage(_0x421d62);throw new SDKError(_0x2adda9,_0x455430(0x12b)+_0x617847[_0x455430(0x170)]+_0x455430(0x178)+_0x617847[_0x455430(0x1a2)]+_0x455430(0xd2)+_0x2c6a48+'\x0a\x20\x20'+_0x475ba6,_0x421d62);}}return _0x36da9f;}export async function executePushFolders(_0x19c311,_0x4cb00d,_0x41e830,_0x4e6be,_0x35ba1b){const _0x58c3c6=a110_0x2c5cc6,_0x3212cd=new Map(_0x41e830);for(const _0x4f134c of _0x4cb00d){const _0x3b2e64=_0x4f134c[_0x58c3c6(0x15e)]('/'),_0x473e14=_0x3b2e64[_0x3b2e64['length']-0x1],_0xa1953a=_0x3b2e64['slice'](0x0,-0x1)[_0x58c3c6(0x113)]('/'),_0xcb72f6=_0x3212cd['get'](_0xa1953a);_0x35ba1b['onProgress']?.({'type':_0x58c3c6(0x111),'folder':_0x4f134c});const _0x2c2562={'name':_0x473e14,'parentFolderId':_0xcb72f6},_0x17e899=await _0x35ba1b[_0x58c3c6(0xe0)](_0x58c3c6(0x129)+_0x4f134c+_0x58c3c6(0x108),()=>_0x19c311[_0x58c3c6(0x11f)][_0x58c3c6(0x179)](_0x4e6be[_0x58c3c6(0x14e)],_0x2c2562));_0x3212cd[_0x58c3c6(0x191)](_0x4f134c,_0x17e899[_0x58c3c6(0x15b)]['id']),_0x35ba1b[_0x58c3c6(0x11d)]?.({'type':_0x58c3c6(0x18d),'folder':_0x4f134c,'folderId':_0x17e899['data']['id']}),_0x35ba1b['logInfo']?.(_0x58c3c6(0x109)+_0x4f134c+'\x27');}return _0x3212cd;}export async function executePushSegmentDeletions(_0x1dc6fa,_0x4d0ee6,_0x5735d7){const _0x58a77b=a110_0x2c5cc6;if(_0x4d0ee6['length']===0x0)return 0x0;const {batchAsync:_0x1a87d7}=await import(_0x58a77b(0xd8)),_0xb52321=0x5,_0x27a4f1=await _0x1a87d7(_0x4d0ee6,async _0x21960f=>{const _0x27b3be=_0x58a77b;return _0x5735d7[_0x27b3be(0x11d)]?.({'type':_0x27b3be(0x10b),'name':_0x21960f[_0x27b3be(0x1a2)]}),await _0x1dc6fa[_0x27b3be(0x11f)]['deleteSegment'](_0x21960f['id']),_0x5735d7[_0x27b3be(0x11d)]?.({'type':_0x27b3be(0x120),'name':_0x21960f['name']}),_0x5735d7[_0x27b3be(0x189)]?.(_0x27b3be(0xf1)+_0x21960f['name']+'\x27'),0x1;},_0xb52321);return _0x27a4f1[_0x58a77b(0x143)]((_0x17153c,_0x63c90c)=>_0x17153c+_0x63c90c,0x0);}export async function executePushJourneys(_0x49bc9c,_0x479727,_0x53140d,_0x24bf1c,_0x5c1666){const _0x83c978=a110_0x2c5cc6,{journeyDefToRequest:_0x4661ed}=await import(_0x83c978(0x1b2)),{activationDefToCreateRequest:_0xa2e94e,yamlRuleToApi:_0x5f5618,validateSegmentRule:_0xf9ad72}=await import(_0x83c978(0x147)),_0x29bdc1={'results':[],'created':0x0,'updated':0x0,'embeddedSegmentNameToId':new Map()},_0x1633ee=new Map(_0x53140d['segmentNameToId']),_0x5e6e25=0x5;for(let _0x3f0c14=0x0;_0x3f0c14<_0x479727[_0x83c978(0x19b)];_0x3f0c14+=_0x5e6e25){const _0x329d2e=_0x479727[_0x83c978(0x135)](_0x3f0c14,_0x3f0c14+_0x5e6e25),_0x81e013=await Promise['all'](_0x329d2e[_0x83c978(0x10e)](async _0x21c98a=>{const _0x3b1973=_0x83c978;if(!_0x21c98a[_0x3b1973(0xff)]&&!_0x21c98a[_0x3b1973(0x15f)])return{'action':_0x3b1973(0x1a8),'name':_0x21c98a[_0x3b1973(0x165)][_0x3b1973(0x1a2)],'journeyId':_0x21c98a[_0x3b1973(0x190)]?.['id']};const _0x337431=_0x21c98a[_0x3b1973(0x1a3)]?_0x53140d[_0x3b1973(0x184)][_0x3b1973(0x13d)](_0x21c98a[_0x3b1973(0x1a3)]):undefined;_0x5c1666[_0x3b1973(0x11d)]?.({'type':_0x21c98a['isNew']?_0x3b1973(0x134):'journey_updating','name':_0x21c98a['yamlConfig'][_0x3b1973(0x1a2)]});try{const _0x35ae64=await executeSingleJourneyPush(_0x49bc9c,_0x21c98a,{..._0x53140d,'segmentNameToId':_0x1633ee},{'parentId':_0x24bf1c[_0x3b1973(0x14e)],'rootFolderId':_0x24bf1c[_0x3b1973(0x1ab)],'folderId':_0x337431,'verbose':_0x24bf1c[_0x3b1973(0x164)]},_0x5c1666,{'journeyDefToRequest':_0x4661ed,'activationDefToCreateRequest':_0xa2e94e,'yamlRuleToApi':_0x5f5618,'validateSegmentRule':_0xf9ad72});for(const [_0x3eb8cc,_0x220a13]of _0x35ae64[_0x3b1973(0x192)]){_0x1633ee[_0x3b1973(0x191)](_0x3eb8cc,_0x220a13),_0x29bdc1['embeddedSegmentNameToId'][_0x3b1973(0x191)](_0x3eb8cc,_0x220a13);}if(_0x35ae64[_0x3b1973(0x181)]===_0x3b1973(0x17d))_0x5c1666[_0x3b1973(0x11d)]?.({'type':_0x3b1973(0x145),'name':_0x21c98a[_0x3b1973(0x165)][_0x3b1973(0x1a2)],'journeyId':_0x35ae64['journeyId']}),_0x5c1666[_0x3b1973(0x17e)]?.(_0x3b1973(0x15a)+_0x21c98a[_0x3b1973(0x165)]['name']+'\x27'),_0x29bdc1[_0x3b1973(0x17d)]++;else _0x35ae64[_0x3b1973(0x181)]===_0x3b1973(0x193)&&(_0x5c1666[_0x3b1973(0x11d)]?.({'type':_0x3b1973(0x18c),'name':_0x21c98a[_0x3b1973(0x165)][_0x3b1973(0x1a2)]}),_0x5c1666[_0x3b1973(0x17e)]?.(_0x3b1973(0x154)+_0x21c98a[_0x3b1973(0x165)]['name']+'\x27'),_0x29bdc1['updated']++);return{'action':_0x35ae64['action'],'name':_0x21c98a[_0x3b1973(0x165)][_0x3b1973(0x1a2)],'journeyId':_0x35ae64[_0x3b1973(0x115)]};}catch(_0x47e7e8){const _0x11eef3=isHttp400Error(_0x47e7e8),_0x27bb21=_0x11eef3?ErrorCode[_0x3b1973(0x139)]:ErrorCode[_0x3b1973(0x159)],_0xf2ec13=getErrorMessage(_0x47e7e8);throw new SDKError(_0x27bb21,'Failed\x20to\x20'+(_0x21c98a[_0x3b1973(0xff)]?'create':_0x3b1973(0x104))+'\x20journey\x20from\x20file:\x20'+_0x21c98a[_0x3b1973(0x10a)]+_0x3b1973(0x168)+_0xf2ec13,_0x47e7e8);}}));_0x29bdc1['results']['push'](..._0x81e013);}return _0x29bdc1;}async function executeSingleJourneyPush(_0x564706,_0xfcc502,_0x2537c9,_0x60f28f,_0x42bd53,_0x5ec2dd){const _0x131afd=a110_0x2c5cc6,{journeyDefToRequest:_0xa91177,activationDefToCreateRequest:_0x427bf2,yamlRuleToApi:_0xac2369,validateSegmentRule:_0x5efac0}=_0x5ec2dd,_0x3ad277=new Map(),_0x396603=new Map(),_0x244a1b=new Map(),_0x3b89d9=new Map(),_0x5a071d=new Map();let _0x3ae613;const _0x3c5aba=async()=>{const _0x10afbc=a110_0x2c2f;if(_0x3ae613)return;_0x3ae613=new Map();if(!_0xfcc502['existingJourney'])return;const _0x238cbb=await _0x564706['journey']['listActivations'](_0xfcc502[_0x10afbc(0x190)]['id']);for(const _0x39eb4f of _0x238cbb){const _0x3d2b5b=journeyActivationStepToYaml(_0x39eb4f,_0x2537c9[_0x10afbc(0x18e)],_0x2537c9[_0x10afbc(0xd9)]),_0x46e9d0=activationSignature(_0x3d2b5b);!_0x3ae613[_0x10afbc(0x183)](_0x46e9d0)&&_0x3ae613[_0x10afbc(0x191)](_0x46e9d0,_0x39eb4f['id']),_0x3d2b5b[_0x10afbc(0x1a2)]&&_0x396603[_0x10afbc(0x191)](_0x3d2b5b[_0x10afbc(0x1a2)],_0x39eb4f['id']);}};if(_0xfcc502['existingJourney']&&_0xfcc502[_0x131afd(0x165)][_0x131afd(0xf4)]){const _0x5bd7f4=buildLocalExpandedRuleMappings(_0xfcc502[_0x131afd(0x165)]),_0x45e2c1=_0x5bd7f4[_0x131afd(0x1a6)];if(_0x45e2c1[_0x131afd(0x19a)]>0x0){const _0x46f6ec=new Map();for(const [_0x5cbc02,_0x1fdc4b]of _0x45e2c1){const _0x305677=serializeExpandedRule(_0x1fdc4b,_0x45e2c1);_0x46f6ec[_0x131afd(0x191)](_0x5cbc02,_0x305677);}const _0x202e1b=collectSegmentIdsFromJourneyApi(_0xfcc502[_0x131afd(0x190)]);if(_0x202e1b['size']>0x0){const _0x511e9b=await buildServerSegmentRuleMap(_0x564706,_0x60f28f[_0x131afd(0x14e)],_0x2537c9[_0x131afd(0x100)],_0x202e1b);if(_0x511e9b[_0x131afd(0x19a)]>0x0){const _0x48f13a=new Map();for(const [_0x2adfe6,_0x371f1a]of _0x511e9b){const _0x5a23bf=serializeExpandedRule(_0x371f1a,_0x511e9b);!_0x48f13a[_0x131afd(0x183)](_0x5a23bf)&&_0x48f13a[_0x131afd(0x191)](_0x5a23bf,_0x2adfe6);}for(const [_0x4d9c2e,_0x1d8b22]of _0x46f6ec){const _0x26ede7=_0x48f13a[_0x131afd(0x13d)](_0x1d8b22);_0x26ede7&&(_0x5a071d[_0x131afd(0x191)](_0x4d9c2e,_0x26ede7),_0x2537c9[_0x131afd(0x149)]['set'](_0x4d9c2e,_0x26ede7));}}}}}const _0x2a2b0d={'resolveSegmentId':async _0x4156db=>{const _0x1de346=_0x131afd,_0x1ed436=_0x2537c9[_0x1de346(0x149)][_0x1de346(0x13d)](_0x4156db);if(!_0x1ed436)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x1de346(0x151)+_0x4156db+_0x1de346(0x119)+_0xfcc502[_0x1de346(0x165)][_0x1de346(0x1a2)]+')');return _0x1ed436;},'resolveEmbeddedSegmentId':async(_0x5035f1,_0x232b16)=>{const _0x538add=_0x131afd,_0x3231e4=_0x2537c9[_0x538add(0x149)][_0x538add(0x13d)](_0x5035f1);if(_0x3231e4)return _0x3231e4;const _0x17370d=_0x5a071d[_0x538add(0x13d)](_0x5035f1);if(_0x17370d)return _0x2537c9[_0x538add(0x149)][_0x538add(0x191)](_0x5035f1,_0x17370d),_0x17370d;const _0x51cbd9=_0x2537c9['existingSegments'][_0x538add(0x19e)](_0x3b9065=>_0x3b9065[_0x538add(0x1a2)]===_0x5035f1);if(_0x51cbd9)return _0x2537c9[_0x538add(0x149)][_0x538add(0x191)](_0x5035f1,_0x51cbd9['id']),_0x51cbd9['id'];if(_0xfcc502[_0x538add(0xff)]){const {stageName:_0x13b62e,criteriaName:_0xd6f0d4}=findSegmentCriteriaLocation(_0xfcc502[_0x538add(0x165)],_0x5035f1);return _0x5efac0(_0x5035f1,_0x232b16[_0x538add(0xef)]),_0x244a1b['set'](_0x5035f1,{'definition':_0x232b16,'stageName':_0x13b62e,'criteriaName':_0xd6f0d4}),createPendingSegmentId(_0x5035f1);}const _0x5109d2=_0xfcc502[_0x538add(0x190)]?.['id'];if(!_0x5109d2)throw new SDKError(ErrorCode[_0x538add(0x1b1)],_0x538add(0x17f));_0x5efac0(_0x5035f1,_0x232b16[_0x538add(0xef)]);const _0x439e67=generateDeterministicJourneySegmentName(_0xfcc502[_0x538add(0x165)][_0x538add(0x1a2)],_0x5035f1),_0x2f0b9d=_0x2537c9[_0x538add(0x100)][_0x538add(0x19e)](_0x4e3fc5=>_0x4e3fc5[_0x538add(0x1a2)]===_0x439e67),_0x1b75ca=createSegmentIdResolver(_0x2537c9[_0x538add(0x149)],_0x5035f1),_0x466d91=await resolveRuleSegmentIds(_0x232b16[_0x538add(0xef)],_0x1b75ca);let _0x354ad0;if(_0x2f0b9d)await _0x564706['segment'][_0x538add(0x13c)](_0x60f28f[_0x538add(0x14e)],_0x2f0b9d['id'],{'description':_0x232b16[_0x538add(0x187)]||_0x538add(0x121)+_0x5035f1,'rule':_0xac2369(_0x466d91,!![]),'countPopulation':!![]}),_0x354ad0=_0x2f0b9d['id'];else try{_0x354ad0=await _0x564706['segment'][_0x538add(0x197)]({'name':_0x439e67,'description':_0x232b16[_0x538add(0x187)]||'Entry\x20criteria:\x20'+_0x5035f1,'journeyId':_0x5109d2,'rule':_0xac2369(_0x466d91,!![]),'countPopulation':!![],'parentFolderId':_0x60f28f['rootFolderId']||'','audienceId':_0x60f28f[_0x538add(0x14e)]});}catch(_0x31629f){const _0x49c367=_0x31629f instanceof Error&&_0x31629f[_0x538add(0x1a9)][_0x538add(0x122)]('Name\x20has\x20already\x20been\x20taken');if(_0x49c367){const _0x7f2da9=await _0x564706['segment'][_0x538add(0x106)](_0x60f28f['parentId']),_0x16aadc=_0x7f2da9[_0x538add(0x19e)](_0x42e72b=>_0x42e72b['name']===_0x439e67);if(_0x16aadc)await _0x564706[_0x538add(0x11f)][_0x538add(0x13c)](_0x60f28f[_0x538add(0x14e)],_0x16aadc['id'],{'description':_0x232b16['description']||_0x538add(0x121)+_0x5035f1,'rule':_0xac2369(_0x466d91,!![]),'countPopulation':!![]}),_0x354ad0=_0x16aadc['id'];else throw _0x31629f;}else throw _0x31629f;}return _0x2537c9[_0x538add(0x149)]['set'](_0x5035f1,_0x354ad0),_0x3ad277[_0x538add(0x191)](_0x5035f1,_0x354ad0),_0x354ad0;},'resolveActivationId':async _0x4033de=>{const _0x1c7cb9=_0x131afd,_0x1d5e34=_0x396603['get'](_0x4033de);if(_0x1d5e34)return _0x1d5e34;if(_0xfcc502[_0x1c7cb9(0x190)]){await _0x3c5aba();const _0x578a8e=_0x396603['get'](_0x4033de);if(_0x578a8e)return _0x578a8e;}throw new SDKError(ErrorCode[_0x1c7cb9(0x112)],_0x1c7cb9(0x101)+_0x4033de+'\x20(referenced\x20in\x20journey\x20'+_0xfcc502[_0x1c7cb9(0x165)][_0x1c7cb9(0x1a2)]+').\x20'+_0x1c7cb9(0x18f));},'resolveEmbeddedActivationId':async(_0x3ef40a,_0x2c9d3e)=>{const _0x2a5a31=_0x131afd,_0x588d9f=_0x396603[_0x2a5a31(0x13d)](_0x3ef40a);if(_0x588d9f)return _0x588d9f;if(_0xfcc502['isNew'])return _0x3b89d9[_0x2a5a31(0x191)](_0x3ef40a,_0x2c9d3e),createPendingActivationId(_0x3ef40a);if(_0xfcc502[_0x2a5a31(0x190)]){await _0x3c5aba();const _0x58baa6=_0x396603[_0x2a5a31(0x13d)](_0x2c9d3e[_0x2a5a31(0x1a2)]);if(_0x58baa6)return _0x396603[_0x2a5a31(0x191)](_0x3ef40a,_0x58baa6),_0x58baa6;const _0x409825=activationSignature(_0x2c9d3e),_0x367801=_0x3ae613?.[_0x2a5a31(0x13d)](_0x409825);if(_0x367801)return _0x396603[_0x2a5a31(0x191)](_0x3ef40a,_0x367801),_0x367801;const _0x215cc0=await _0x427bf2(_0x2c9d3e,_0x2537c9[_0x2a5a31(0x131)]),_0x40effe=await _0x564706[_0x2a5a31(0x177)][_0x2a5a31(0xdd)](_0xfcc502[_0x2a5a31(0x190)]['id'],_0x215cc0);return _0x396603['set'](_0x3ef40a,_0x40effe['id']),_0x40effe['id'];}throw new SDKError(ErrorCode[_0x2a5a31(0x1b1)],'Cannot\x20create\x20embedded\x20activation\x20without\x20journey\x20context');},'resolveJourneyId':async _0x17c7e4=>{const _0x18c97c=_0x131afd;try{return await _0x564706[_0x18c97c(0x177)][_0x18c97c(0x167)](_0x60f28f['parentId'],_0x17c7e4);}catch(_0x4401e3){throw new SDKError(ErrorCode[_0x18c97c(0x112)],_0x18c97c(0x18a)+_0x17c7e4+'\x27\x20not\x20found\x20in\x20parent\x20segment\x20(referenced\x20in\x20jump\x20step\x20of\x20\x27'+_0xfcc502[_0x18c97c(0x165)][_0x18c97c(0x1a2)]+'\x27)',_0x4401e3);}},'resolveStageId':async(_0x9b8bf3,_0x252c89)=>{const _0x280bde=_0x131afd,_0x2f9c76=await _0x564706[_0x280bde(0x177)][_0x280bde(0x13a)](_0x9b8bf3),_0x452640=_0x2f9c76['attributes'][_0x280bde(0x158)][_0x280bde(0x19e)](_0x20b2f3=>_0x20b2f3[_0x280bde(0x1a2)][_0x280bde(0xe2)]()===_0x252c89[_0x280bde(0xe2)]());if(!_0x452640?.['id'])throw new SDKError(ErrorCode[_0x280bde(0x112)],_0x280bde(0x1b3)+_0x252c89+'\x27\x20not\x20found\x20in\x20journey\x20\x27'+(_0x2f9c76[_0x280bde(0x16f)][_0x280bde(0xd0)]||_0x2f9c76[_0x280bde(0x16f)]['name'])+'\x27');return _0x452640['id'];}},_0x10f91c=await _0xa91177(_0xfcc502['yamlConfig'],_0x60f28f[_0x131afd(0x14e)],_0x2a2b0d),_0x41e4bb=_0x60f28f[_0x131afd(0x128)]||_0x60f28f[_0x131afd(0x1ab)];_0x41e4bb&&(_0x10f91c['relationships']={'parentFolder':{'data':{'id':_0x41e4bb,'type':_0x131afd(0x11a)}}});if(_0xfcc502[_0x131afd(0xff)]){if(_0x244a1b['size']>0x0||_0x3b89d9[_0x131afd(0x19a)]>0x0)return await executeThreeStepJourneyCreate(_0x564706,_0xfcc502,_0x10f91c,{'pendingEmbeddedSegments':_0x244a1b,'pendingEmbeddedActivations':_0x3b89d9,'embeddedSegmentNameToId':_0x3ad277,'journeyActivationNameToId':_0x396603},{..._0x60f28f,'effectiveFolderId':_0x41e4bb},_0x2537c9,_0x42bd53,_0x5ec2dd);else{ensureJourneyDefaults(_0x10f91c[_0x131afd(0x16f)]);const _0x56da3d=await _0x564706[_0x131afd(0x177)]['create'](_0x10f91c);return{'action':_0x131afd(0x17d),'journeyId':_0x56da3d['id'],'embeddedSegmentNameToId':_0x3ad277};}}else{if(_0xfcc502['hasChanges']&&_0xfcc502[_0x131afd(0x190)])return ensureJourneyDefaults(_0x10f91c[_0x131afd(0x16f)]),await _0x564706[_0x131afd(0x177)][_0x131afd(0x104)](_0xfcc502['existingJourney']['id'],_0x10f91c),{'action':_0x131afd(0x193),'journeyId':_0xfcc502[_0x131afd(0x190)]['id'],'embeddedSegmentNameToId':_0x3ad277};}return{'action':_0x131afd(0x1a8),'journeyId':_0xfcc502[_0x131afd(0x190)]?.['id'],'embeddedSegmentNameToId':_0x3ad277};}function findSegmentCriteriaLocation(_0x165741,_0x336618){const _0x5e1894=a110_0x2c5cc6,_0xcac2e0=_0x165741[_0x5e1894(0x17a)]||_0x165741[_0x5e1894(0x13b)]?.[0x0]?.['stages']||[];let _0x4a6d88=_0x5e1894(0x1b0),_0x547c8c=_0x336618;const _0x1b3fa2=_0x165741[_0x5e1894(0x141)]||_0x165741[_0x5e1894(0x13b)]?.[0x0]?.[_0x5e1894(0x141)];if(_0x1b3fa2?.[_0x5e1894(0x11f)]===_0x336618)return{'stageName':_0x5e1894(0x141),'criteriaName':_0x1b3fa2[_0x5e1894(0x1a2)]||_0x336618};_0x5a7e3e:for(const _0x3cbbff of _0xcac2e0){if(_0x3cbbff['entry_criteria']?.[_0x5e1894(0x11f)]===_0x336618){_0x4a6d88=_0x3cbbff[_0x5e1894(0x1a2)],_0x547c8c=_0x3cbbff[_0x5e1894(0x10f)][_0x5e1894(0x1a2)]||_0x336618;break;}if(_0x3cbbff['steps'])for(const _0x1badb1 of _0x3cbbff['steps']){if(_0x1badb1[_0x5e1894(0x170)]===_0x5e1894(0x185)&&_0x1badb1[_0x5e1894(0xf6)]?.[_0x5e1894(0xec)])for(const _0x5aa59b of _0x1badb1['with'][_0x5e1894(0xec)]){if(_0x5aa59b[_0x5e1894(0x11f)]===_0x336618){_0x4a6d88=_0x3cbbff[_0x5e1894(0x1a2)],_0x547c8c=_0x5aa59b[_0x5e1894(0x1a2)]||_0x336618;break _0x5a7e3e;}}}}return{'stageName':_0x4a6d88,'criteriaName':_0x547c8c};}async function executeThreeStepJourneyCreate(_0x525818,_0x493717,_0xe4d106,_0xb24603,_0x2102b7,_0x32be42,_0x26e545,_0x1661ae){const _0x5c9089=a110_0x2c5cc6,{activationDefToCreateRequest:_0xe3734c,yamlRuleToApi:_0x5deab6}=_0x1661ae,{pendingEmbeddedSegments:_0x136c23,pendingEmbeddedActivations:_0x32299d,embeddedSegmentNameToId:_0x1e01c9}=_0xb24603,_0x37fdce=JSON[_0x5c9089(0x12d)](JSON[_0x5c9089(0xfb)](_0xe4d106));ensureJourneyDefaults(_0x37fdce['attributes']),stripPendingIds(_0x37fdce);const _0x21587b=await _0x525818['journey'][_0x5c9089(0x188)](_0x37fdce),_0x2e2900=_0x21587b['id'],_0x2757fa=new Map();for(const _0x37848f of _0x21587b['attributes'][_0x5c9089(0x158)]){_0x2757fa[_0x5c9089(0x191)](_0x37848f[_0x5c9089(0x1a2)][_0x5c9089(0xe2)](),_0x37848f['id']);}for(const [_0x24a43d,{definition:_0x1b39ed}]of _0x136c23){const _0x2ae069=generateDeterministicJourneySegmentName(_0x493717[_0x5c9089(0x165)][_0x5c9089(0x1a2)],_0x24a43d);_0x26e545[_0x5c9089(0x11d)]?.({'type':_0x5c9089(0xf0),'journeyName':_0x493717['yamlConfig']['name'],'segmentName':_0x24a43d});const _0x282532=createSegmentIdResolver(_0x32be42[_0x5c9089(0x149)],_0x24a43d),_0x242419=await resolveRuleSegmentIds(_0x1b39ed[_0x5c9089(0xef)],_0x282532),_0x247c41=await _0x525818[_0x5c9089(0x11f)]['createJourneySegment']({'name':_0x2ae069,'description':_0x1b39ed[_0x5c9089(0x187)]||_0x5c9089(0x121)+_0x24a43d,'journeyId':_0x2e2900,'rule':_0x5deab6(_0x242419,!![]),'countPopulation':!![],'parentFolderId':_0x2102b7[_0x5c9089(0x144)]||'','audienceId':_0x2102b7[_0x5c9089(0x14e)]});_0x1e01c9[_0x5c9089(0x191)](_0x24a43d,_0x247c41),_0x32be42[_0x5c9089(0x149)][_0x5c9089(0x191)](_0x24a43d,_0x247c41),_0x26e545[_0x5c9089(0x11d)]?.({'type':_0x5c9089(0x19d),'journeyName':_0x493717['yamlConfig'][_0x5c9089(0x1a2)],'segmentName':_0x24a43d});}const _0x2396fc=new Map();for(const [_0x35ddfc,_0x312706]of _0x32299d){_0x26e545[_0x5c9089(0x11d)]?.({'type':_0x5c9089(0x105),'journeyName':_0x493717[_0x5c9089(0x165)][_0x5c9089(0x1a2)],'activationName':_0x35ddfc});const _0x486a64=await _0xe3734c(_0x312706,_0x32be42['activationContext']),_0x4784a7=await _0x525818[_0x5c9089(0x177)][_0x5c9089(0xdd)](_0x2e2900,_0x486a64);_0x2396fc[_0x5c9089(0x191)](_0x35ddfc,_0x4784a7['id']),_0xb24603[_0x5c9089(0xfe)][_0x5c9089(0x191)](_0x35ddfc,_0x4784a7['id']),_0x26e545['onProgress']?.({'type':'embedded_activation_created','journeyName':_0x493717[_0x5c9089(0x165)][_0x5c9089(0x1a2)],'activationName':_0x35ddfc});}const _0x143d98=JSON[_0x5c9089(0x12d)](JSON['stringify'](_0xe4d106));return _0x143d98['id']=_0x2e2900,ensureJourneyDefaults(_0x143d98[_0x5c9089(0x16f)]),resolvePendingIdsInRequest(_0x143d98,_0xe4d106,_0x2757fa,_0x1e01c9,_0x2396fc,_0x26e545),await _0x525818[_0x5c9089(0x177)][_0x5c9089(0x104)](_0x2e2900,_0x143d98),{'action':_0x5c9089(0x17d),'journeyId':_0x2e2900,'embeddedSegmentNameToId':_0x1e01c9};}function stripPendingIds(_0x9a8cc8){const _0x4038fe=a110_0x2c5cc6;for(const _0x227f5b of _0x9a8cc8[_0x4038fe(0x16f)]['journeyStages']||[]){_0x227f5b[_0x4038fe(0x1af)]?.['segmentId']&&isPendingSegmentId(_0x227f5b[_0x4038fe(0x1af)][_0x4038fe(0x124)])&&delete _0x227f5b[_0x4038fe(0x1af)];if(_0x227f5b['steps'])for(const _0x3cc7d2 of Object[_0x4038fe(0x176)](_0x227f5b['steps'])){const _0x5341ef=_0x227f5b[_0x4038fe(0xe3)][_0x3cc7d2];_0x5341ef[_0x4038fe(0x170)]===_0x4038fe(0x175)&&_0x5341ef['journeyActivationStepId']&&isPendingActivationId(_0x5341ef[_0x4038fe(0xe7)])&&(_0x5341ef['journeyActivationStepId']='');if(_0x5341ef[_0x4038fe(0x170)]===_0x4038fe(0xcf)&&_0x5341ef[_0x4038fe(0xec)])for(const _0x237c89 of _0x5341ef[_0x4038fe(0xec)]){_0x237c89[_0x4038fe(0x124)]&&isPendingSegmentId(_0x237c89[_0x4038fe(0x124)])&&(_0x237c89[_0x4038fe(0x124)]='');}_0x5341ef[_0x4038fe(0x170)]===_0x4038fe(0xd6)&&_0x5341ef[_0x4038fe(0xdb)]?.['segmentId']&&isPendingSegmentId(_0x5341ef[_0x4038fe(0xdb)][_0x4038fe(0x124)])&&(_0x5341ef[_0x4038fe(0xdb)][_0x4038fe(0x124)]='');}}}function resolvePendingIdsInRequest(_0x304680,_0x4f1f4c,_0x590c7b,_0x46967b,_0x2dec6e,_0xe990b7){const _0x23b09b=a110_0x2c5cc6,_0x296341=(_0x14af6a,_0x27582a)=>{const _0x105a39=a110_0x2c2f;if(!isPendingSegmentId(_0x14af6a))return _0x14af6a;const _0x517bbc=extractPendingSegmentName(_0x14af6a),_0x11aa18=_0x46967b[_0x105a39(0x13d)](_0x517bbc);return!_0x11aa18&&_0xe990b7[_0x105a39(0x103)]?.(_0x105a39(0xdc)+_0x517bbc+'\x27\x20for\x20'+_0x27582a),_0x11aa18;};if(_0x304680[_0x23b09b(0x16f)]['goal']?.['segmentId']&&isPendingSegmentId(_0x304680[_0x23b09b(0x16f)][_0x23b09b(0x141)][_0x23b09b(0x124)])){const _0xa2f2bc=_0x296341(_0x304680['attributes'][_0x23b09b(0x141)][_0x23b09b(0x124)],_0x23b09b(0x137));_0xa2f2bc&&(_0x304680[_0x23b09b(0x16f)]['goal'][_0x23b09b(0x124)]=_0xa2f2bc);}for(const _0x439cd4 of _0x304680[_0x23b09b(0x16f)]['journeyStages']||[]){const _0x2dce6d=_0x590c7b['get'](_0x439cd4[_0x23b09b(0x1a2)][_0x23b09b(0xe2)]());_0x2dce6d&&(_0x439cd4['id']=_0x2dce6d);if(_0x439cd4[_0x23b09b(0x1af)]?.[_0x23b09b(0x124)]&&isPendingSegmentId(_0x439cd4[_0x23b09b(0x1af)][_0x23b09b(0x124)])){const _0x2a8de2=_0x296341(_0x439cd4[_0x23b09b(0x1af)][_0x23b09b(0x124)],'stage\x20\x27'+_0x439cd4[_0x23b09b(0x1a2)]+'\x27\x20entry\x20criteria');_0x2a8de2&&(_0x439cd4[_0x23b09b(0x1af)][_0x23b09b(0x124)]=_0x2a8de2);}if(_0x439cd4[_0x23b09b(0x130)])for(const _0x3a05f4 of _0x439cd4[_0x23b09b(0x130)]){if(_0x3a05f4[_0x23b09b(0x124)]&&isPendingSegmentId(_0x3a05f4[_0x23b09b(0x124)])){const _0x39dde8=_0x296341(_0x3a05f4['segmentId'],_0x23b09b(0xfd)+_0x439cd4[_0x23b09b(0x1a2)]+_0x23b09b(0xd5));_0x39dde8&&(_0x3a05f4[_0x23b09b(0x124)]=_0x39dde8);}}if(_0x439cd4[_0x23b09b(0xf5)]?.['segmentId']&&isPendingSegmentId(_0x439cd4[_0x23b09b(0xf5)][_0x23b09b(0x124)])){const _0x12ecdd=_0x296341(_0x439cd4[_0x23b09b(0xf5)]['segmentId'],_0x23b09b(0xfd)+_0x439cd4['name']+'\x27\x20milestone');_0x12ecdd&&(_0x439cd4[_0x23b09b(0xf5)][_0x23b09b(0x124)]=_0x12ecdd);}if(_0x439cd4['steps']){const _0x5a409c=_0x3f4fc0=>_0x4f1f4c[_0x23b09b(0x16f)][_0x23b09b(0x158)][_0x23b09b(0x19e)](_0x3c75c1=>_0x3c75c1[_0x23b09b(0x1a2)][_0x23b09b(0xe2)]()===_0x439cd4[_0x23b09b(0x1a2)]['toLowerCase']())?.[_0x23b09b(0xe3)]?.[_0x3f4fc0];for(const _0x461c81 of Object[_0x23b09b(0x176)](_0x439cd4[_0x23b09b(0xe3)])){const _0x50fc8f=_0x439cd4[_0x23b09b(0xe3)][_0x461c81],_0x5d93fa=_0x5a409c(_0x461c81);if(_0x50fc8f[_0x23b09b(0x170)]===_0x23b09b(0x175)&&_0x50fc8f['journeyActivationStepId']&&(isPendingActivationId(_0x50fc8f['journeyActivationStepId'])||_0x50fc8f[_0x23b09b(0xe7)]==='')){if(_0x5d93fa?.[_0x23b09b(0xe7)]&&isPendingActivationId(_0x5d93fa[_0x23b09b(0xe7)])){const _0x59afe1=extractPendingActivationName(_0x5d93fa[_0x23b09b(0xe7)]),_0x5d23f7=_0x2dec6e[_0x23b09b(0x13d)](_0x59afe1);_0x5d23f7&&(_0x50fc8f['journeyActivationStepId']=_0x5d23f7);}}if(_0x50fc8f[_0x23b09b(0x170)]==='DecisionPoint'&&_0x50fc8f[_0x23b09b(0xec)]&&_0x5d93fa?.[_0x23b09b(0xec)])for(let _0x18bfcf=0x0;_0x18bfcf<_0x50fc8f[_0x23b09b(0xec)]['length'];_0x18bfcf++){const _0x43c5f2=_0x50fc8f[_0x23b09b(0xec)][_0x18bfcf],_0x5f3e70=_0x5d93fa[_0x23b09b(0xec)][_0x18bfcf];if(_0x5f3e70?.['segmentId']&&isPendingSegmentId(_0x5f3e70[_0x23b09b(0x124)])){const _0x2c0c08=_0x296341(_0x5f3e70['segmentId'],'stage\x20\x27'+_0x439cd4[_0x23b09b(0x1a2)]+_0x23b09b(0x16c)+(_0x43c5f2[_0x23b09b(0x1a2)]||_0x18bfcf)+'\x27');_0x2c0c08&&(_0x43c5f2[_0x23b09b(0x124)]=_0x2c0c08);}}if(_0x50fc8f[_0x23b09b(0x170)]===_0x23b09b(0xd6)&&_0x50fc8f[_0x23b09b(0xdb)]?.[_0x23b09b(0x124)]&&_0x5d93fa?.[_0x23b09b(0xdb)]?.[_0x23b09b(0x124)]&&isPendingSegmentId(_0x5d93fa[_0x23b09b(0xdb)][_0x23b09b(0x124)])){const _0x416438=_0x296341(_0x5d93fa[_0x23b09b(0xdb)][_0x23b09b(0x124)],_0x23b09b(0xfd)+_0x439cd4[_0x23b09b(0x1a2)]+_0x23b09b(0xfa));_0x416438&&(_0x50fc8f['waitCondition']['segmentId']=_0x416438);}}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x865b21,_0x250d65){const _0x53c26a=a111_0x173d,_0x4fefb4=_0x865b21();while(!![]){try{const _0x243eb8=parseInt(_0x53c26a(0x135))/0x1*(-parseInt(_0x53c26a(0x13a))/0x2)+-parseInt(_0x53c26a(0x139))/0x3*(parseInt(_0x53c26a(0x13e))/0x4)+-parseInt(_0x53c26a(0x143))/0x5+parseInt(_0x53c26a(0x141))/0x6+-parseInt(_0x53c26a(0x145))/0x7*(parseInt(_0x53c26a(0x13d))/0x8)+-parseInt(_0x53c26a(0x13c))/0x9+parseInt(_0x53c26a(0x13f))/0xa*(parseInt(_0x53c26a(0x13b))/0xb);if(_0x243eb8===_0x250d65)break;else _0x4fefb4['push'](_0x4fefb4['shift']());}catch(_0xa89d20){_0x4fefb4['push'](_0x4fefb4['shift']());}}}(a111_0x17df,0x61edd));function a111_0x17df(){const _0x5c1b3f=['get','3013110EXVxjr','name','816325uHBczf','add','1617nXcXfm','36611hcHqPG','has','parentFolderId','set','2155653qPMCNt','2BZOWvn','187HvOnnx','1865799yNiqGK','25096ciHhuz','4qXMRTI','1029010iSdawk'];a111_0x17df=function(){return _0x5c1b3f;};return a111_0x17df();}export function buildFolderIdToPathMap(_0x2dc6f8){const _0x72d3f6=a111_0x173d,_0x39180b=new Map(),_0x5915bc=new Map();for(const _0x3ebc09 of _0x2dc6f8){_0x5915bc[_0x72d3f6(0x138)](_0x3ebc09['id'],_0x3ebc09);}const _0x36cdee=new Set();for(const _0x4dfaa0 of _0x2dc6f8){!_0x4dfaa0['parentFolderId']&&_0x36cdee[_0x72d3f6(0x144)](_0x4dfaa0['id']);}function _0x10c1fe(_0x45f6e0){const _0x31327f=_0x72d3f6;if(_0x39180b[_0x31327f(0x136)](_0x45f6e0['id']))return _0x39180b[_0x31327f(0x140)](_0x45f6e0['id']);if(_0x36cdee[_0x31327f(0x136)](_0x45f6e0['id']))return _0x39180b[_0x31327f(0x138)](_0x45f6e0['id'],''),'';if(_0x45f6e0[_0x31327f(0x137)]){const _0x1fb75f=_0x5915bc[_0x31327f(0x140)](_0x45f6e0[_0x31327f(0x137)]);if(_0x1fb75f){const _0x5ed075=_0x10c1fe(_0x1fb75f),_0x3c78b1=_0x5ed075?_0x5ed075+'/'+_0x45f6e0['name']:_0x45f6e0[_0x31327f(0x142)];return _0x39180b[_0x31327f(0x138)](_0x45f6e0['id'],_0x3c78b1),_0x3c78b1;}}const _0x520d03=_0x45f6e0[_0x31327f(0x142)];return _0x39180b[_0x31327f(0x138)](_0x45f6e0['id'],_0x520d03),_0x520d03;}for(const _0x361080 of _0x2dc6f8){_0x10c1fe(_0x361080);}return _0x39180b;}function a111_0x173d(_0x23ecff,_0x4f1698){_0x23ecff=_0x23ecff-0x135;const _0x17df66=a111_0x17df();let _0x173de4=_0x17df66[_0x23ecff];return _0x173de4;}export function buildFolderPathToIdMap(_0x36dcd8){const _0x23f1ab=a111_0x173d,_0x464fc3=new Map(),_0x55612a=new Map();for(const _0x227372 of _0x36dcd8){_0x55612a['set'](_0x227372['id'],_0x227372);}const _0x1b7043=new Set();for(const _0x5b83af of _0x36dcd8){!_0x5b83af[_0x23f1ab(0x137)]&&_0x1b7043[_0x23f1ab(0x144)](_0x5b83af['id']);}function _0x4081ba(_0x1b3803){const _0x103c4d=_0x23f1ab;if(_0x1b7043[_0x103c4d(0x136)](_0x1b3803['id']))return'';if(_0x1b3803[_0x103c4d(0x137)]){const _0x4d48ad=_0x55612a['get'](_0x1b3803[_0x103c4d(0x137)]);if(_0x4d48ad){const _0x1d69c8=_0x4081ba(_0x4d48ad);return _0x1d69c8?_0x1d69c8+'/'+_0x1b3803[_0x103c4d(0x142)]:_0x1b3803[_0x103c4d(0x142)];}}return _0x1b3803[_0x103c4d(0x142)];}for(const _0x29942c of _0x36dcd8){const _0x5bcea1=_0x4081ba(_0x29942c);_0x464fc3[_0x23f1ab(0x138)](_0x5bcea1,_0x29942c['id']);}return _0x464fc3;}export function buildFolderMaps(_0x4361fb){const _0x218d54=a111_0x173d,_0x430235=buildFolderIdToPathMap(_0x4361fb),_0x23b063=new Map();for(const [_0x2a390d,_0x2315dc]of _0x430235){_0x23b063[_0x218d54(0x138)](_0x2315dc,_0x2a390d);}return{'idToPath':_0x430235,'pathToId':_0x23b063};}export function getFolderPath(_0x467dda,_0x42dbac){const _0x214156=a111_0x173d;if(!_0x467dda)return'';return _0x42dbac[_0x214156(0x140)](_0x467dda)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d1686,_0x44cfb8){const _0x242022=a112_0x1ffd,_0x10a9f9=_0x1d1686();while(!![]){try{const _0x5a9b48=-parseInt(_0x242022(0x188))/0x1+-parseInt(_0x242022(0x1a2))/0x2*(-parseInt(_0x242022(0x192))/0x3)+-parseInt(_0x242022(0x191))/0x4+-parseInt(_0x242022(0x190))/0x5*(-parseInt(_0x242022(0x18c))/0x6)+-parseInt(_0x242022(0x184))/0x7*(parseInt(_0x242022(0x19c))/0x8)+parseInt(_0x242022(0x19d))/0x9+-parseInt(_0x242022(0x18f))/0xa*(-parseInt(_0x242022(0x1a8))/0xb);if(_0x5a9b48===_0x44cfb8)break;else _0x10a9f9['push'](_0x10a9f9['shift']());}catch(_0x3b9115){_0x10a9f9['push'](_0x10a9f9['shift']());}}}(a112_0x11f9,0x6a619));import a112_0xbcfae9 from'path';import{parse as a112_0x1e733e}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0xcffc64){const _0xf44986=a112_0x1ffd;if(!_0xcffc64||_0xcffc64[_0xf44986(0x1a6)]()==='')throw new Error(_0xf44986(0x18e));const _0xe04e21=_0xcffc64[_0xf44986(0x1a6)]();if(_0xe04e21==='/')return{'segments':[],'isAbsolute':!![],'raw':_0xcffc64};const _0x2b3840=_0xe04e21[_0xf44986(0x1ab)]('/')?_0xe04e21['substring'](0x1):_0xe04e21,_0xbed673=_0x2b3840['split']('/')[_0xf44986(0x196)](_0x47f298=>_0x47f298!=='');if(_0xbed673[_0xf44986(0x19a)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x40e973=_0xe04e21[_0xf44986(0x1ab)]('/')||!isRelativePathSegment(_0xbed673[0x0]);for(const _0x559622 of _0xbed673){validatePathSegment(_0x559622);}return{'segments':_0xbed673,'isAbsolute':_0x40e973,'raw':_0xcffc64};}function a112_0x1ffd(_0xb33d83,_0x1cd63f){_0xb33d83=_0xb33d83-0x184;const _0x11f949=a112_0x11f9();let _0x1ffde7=_0x11f949[_0xb33d83];return _0x1ffde7;}function isRelativePathSegment(_0x1b1739){return _0x1b1739==='.'||_0x1b1739==='..';}function validatePathSegment(_0x35963a){const _0x714912=a112_0x1ffd;if(_0x35963a==='')throw new Error(_0x714912(0x19e));if(_0x35963a==='.'||_0x35963a==='..')return;if(/[\x00-\x1F\x7F]/[_0x714912(0x18d)](_0x35963a))throw new Error(_0x714912(0x199)+_0x35963a);if(_0x35963a!==_0x35963a['trim']()){}}export function validatePath(_0x57cba3){const _0x6a9d20=a112_0x1ffd;if(_0x57cba3['segments']['length']===0x0&&!_0x57cba3[_0x6a9d20(0x189)])throw new Error(_0x6a9d20(0x1ae));if(_0x57cba3[_0x6a9d20(0x189)]){if(_0x57cba3[_0x6a9d20(0x1a1)][0x0]==='..')throw new Error(_0x6a9d20(0x1ad));let _0x51dd2e=0x0;for(const _0x3eb856 of _0x57cba3[_0x6a9d20(0x1a1)]){if(_0x3eb856==='..'){if(_0x51dd2e===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x51dd2e--;}else _0x3eb856!=='.'&&_0x51dd2e++;}}}export function joinPaths(_0x1f292a,_0x443948){const _0x3c44fa=a112_0x1ffd;if(!_0x1f292a||_0x1f292a==='/')return _0x443948;if(!_0x443948||_0x443948==='.')return _0x1f292a;if(_0x443948[_0x3c44fa(0x1ab)]('/'))return _0x443948;const _0x3ee0a3=parsePath(_0x1f292a),_0x550a9a=parsePath(_0x443948),_0x134379=[..._0x3ee0a3['segments']];for(const _0x8b4c70 of _0x550a9a[_0x3c44fa(0x1a1)]){if(_0x8b4c70==='.')continue;else{if(_0x8b4c70==='..'){if(_0x134379['length']===0x0)throw new Error(_0x3c44fa(0x195));_0x134379[_0x3c44fa(0x18a)]();}else _0x134379[_0x3c44fa(0x1aa)](_0x8b4c70);}}const _0x30b966=_0x134379[_0x3c44fa(0x197)]('/');return _0x3ee0a3['raw'][_0x3c44fa(0x1ab)]('/')?'/'+_0x30b966:_0x30b966;}export function normalizePath(_0x5d6279){const _0x107c6a=a112_0x1ffd,_0x17fec2=parsePath(_0x5d6279),_0x21f0f1=[];for(const _0x3288f6 of _0x17fec2['segments']){if(_0x3288f6==='.')continue;else{if(_0x3288f6==='..'){if(_0x21f0f1['length']===0x0){if(_0x17fec2['isAbsolute'])throw new Error('Cannot\x20navigate\x20above\x20root');_0x21f0f1[_0x107c6a(0x1aa)]('..');}else _0x21f0f1[_0x21f0f1[_0x107c6a(0x19a)]-0x1]==='..'?_0x21f0f1['push']('..'):_0x21f0f1[_0x107c6a(0x18a)]();}else _0x21f0f1[_0x107c6a(0x1aa)](_0x3288f6);}}if(_0x21f0f1[_0x107c6a(0x19a)]===0x0)return _0x17fec2[_0x107c6a(0x189)]?'/':'.';const _0x92075b=_0x21f0f1[_0x107c6a(0x197)]('/');return _0x17fec2[_0x107c6a(0x1b0)][_0x107c6a(0x1ab)]('/')?'/'+_0x92075b:_0x92075b;}function a112_0x11f9(){const _0x7bb252=['slice','journey','trim','readFile','2638471VsYsVF','root','push','startsWith','segment','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','Relative\x20path\x20cannot\x20be\x20empty','name','raw','.yaml','27188TPZfbb','relative','Cannot\x20split\x20empty\x20path','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','765351CDxhPx','isAbsolute','pop','File\x20not\x20found:\x20','20472gTevZk','test','Path\x20cannot\x20be\x20empty','20uwNvIg','565kceAwx','1071628xniDQm','20157kezdhi','tdx.json','.yml','Cannot\x20navigate\x20above\x20root','filter','join','parse','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','length','endsWith','1208wKjAOg','6297426NKnqng','Path\x20segment\x20cannot\x20be\x20empty','replace','dirname','segments','146gQqXyk','type'];a112_0x11f9=function(){return _0x7bb252;};return a112_0x11f9();}export function getParentPath(_0x26ac56){const _0x5b8bfa=a112_0x1ffd,_0x11b09d=parsePath(_0x26ac56);if(_0x11b09d[_0x5b8bfa(0x1a1)][_0x5b8bfa(0x19a)]<=0x1)return'/';const _0x212ff2=_0x11b09d[_0x5b8bfa(0x1a1)]['slice'](0x0,-0x1)[_0x5b8bfa(0x197)]('/');return _0x11b09d[_0x5b8bfa(0x1b0)][_0x5b8bfa(0x1ab)]('/')?'/'+_0x212ff2:_0x212ff2;}export function getBaseName(_0x5c9e4b){const _0x1cdb1d=a112_0x1ffd,_0x5ba1c6=parsePath(_0x5c9e4b);return _0x5ba1c6[_0x1cdb1d(0x1a1)][_0x5ba1c6['segments'][_0x1cdb1d(0x19a)]-0x1]||'';}export function isChildPath(_0x220d0c,_0x70b0ed){const _0x4603da=a112_0x1ffd,_0x457ead=parsePath(_0x220d0c),_0x52b32c=parsePath(_0x70b0ed);if(_0x457ead[_0x4603da(0x1a1)][_0x4603da(0x19a)]<=_0x52b32c[_0x4603da(0x1a1)][_0x4603da(0x19a)])return![];for(let _0x5cec58=0x0;_0x5cec58<_0x52b32c[_0x4603da(0x1a1)][_0x4603da(0x19a)];_0x5cec58++){if(_0x457ead[_0x4603da(0x1a1)][_0x5cec58]!==_0x52b32c[_0x4603da(0x1a1)][_0x5cec58])return![];}return!![];}export function splitPath(_0x1afb93){const _0x53ac2a=a112_0x1ffd,_0x1e2970=parsePath(_0x1afb93);if(_0x1e2970[_0x53ac2a(0x1a1)][_0x53ac2a(0x19a)]===0x0)throw new Error(_0x53ac2a(0x186));if(_0x1e2970[_0x53ac2a(0x1a1)][_0x53ac2a(0x19a)]===0x1)return{'parent':_0x1e2970[_0x53ac2a(0x1a1)][0x0]};return{'parent':_0x1e2970['segments'][0x0],'child':_0x1e2970[_0x53ac2a(0x1a1)][_0x53ac2a(0x1a4)](0x1)['join']('/')};}export function isYamlFilePath(_0x4f5f8f){const _0xbd1672=a112_0x1ffd;return _0x4f5f8f[_0xbd1672(0x19b)](_0xbd1672(0x194))||_0x4f5f8f[_0xbd1672(0x19b)](_0xbd1672(0x1b1));}export async function resolveYamlFilePath(_0x2fbf41,_0x1d6a4b=nodeFileSystem){const _0x4b8c50=a112_0x1ffd,_0x4a82d7=a112_0xbcfae9['resolve'](_0x2fbf41);if(!await _0x1d6a4b['exists'](_0x4a82d7))throw new Error(_0x4b8c50(0x18b)+_0x2fbf41);let _0xdd8054=a112_0xbcfae9['dirname'](_0x4a82d7),_0x1f862e=null,_0x56bee5=null;const _0x30495e=a112_0xbcfae9[_0x4b8c50(0x198)](_0xdd8054)[_0x4b8c50(0x1a9)];while(_0xdd8054!==_0x30495e){const _0x45beca=a112_0xbcfae9[_0x4b8c50(0x197)](_0xdd8054,_0x4b8c50(0x193));if(await _0x1d6a4b['exists'](_0x45beca)){_0x1f862e=_0x45beca,_0x56bee5=_0xdd8054;break;}_0xdd8054=a112_0xbcfae9[_0x4b8c50(0x1a0)](_0xdd8054);}if(!_0x1f862e||!_0x56bee5)throw new Error('No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x2fbf41);const _0x106c00=await _0x1d6a4b[_0x4b8c50(0x1a7)](_0x1f862e),_0x387b6b=JSON['parse'](_0x106c00),_0x3b78ab=_0x387b6b['parent_segment'];if(!_0x3b78ab)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x12bd2b=await _0x1d6a4b['readFile'](_0x4a82d7),_0x28646e=a112_0x1e733e(_0x12bd2b),_0x1d4867=_0x28646e[_0x4b8c50(0x1af)];if(!_0x1d4867)throw new Error(_0x4b8c50(0x187)+_0x2fbf41);const _0x8952e3=_0x28646e[_0x4b8c50(0x1a3)]===_0x4b8c50(0x1a5)?_0x4b8c50(0x1a5):_0x4b8c50(0x1ac),_0x25a0cf=a112_0xbcfae9[_0x4b8c50(0x185)](_0x56bee5,_0x4a82d7),_0x44eee9=a112_0xbcfae9[_0x4b8c50(0x1a0)](_0x25a0cf),_0x55d8f6=_0x44eee9==='.'?'':_0x44eee9[_0x4b8c50(0x19f)](/\\/g,'/'),_0x3e9d5d=_0x55d8f6?_0x3b78ab+'/'+_0x55d8f6+'/'+_0x1d4867:_0x3b78ab+'/'+_0x1d4867;return{'parentSegment':_0x3b78ab,'segmentName':_0x1d4867,'folderPath':_0x55d8f6,'fullPath':_0x3e9d5d,'resourceType':_0x8952e3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a113_0x580e(_0x9fdd6e,_0x971aef){_0x9fdd6e=_0x9fdd6e-0x129;const _0x46c344=a113_0x46c3();let _0x580e6f=_0x46c344[_0x9fdd6e];return _0x580e6f;}function a113_0x46c3(){const _0x160736=['1286336TdvHzq','.\x20Parent\x20name\x20cannot\x20be\x20empty','751129pKRCmp','2913903sARfFS','substring','indexOf','221526FgTNjJ','.\x20Child\x20name\x20cannot\x20be\x20empty','Invalid\x20segment\x20reference\x20format:\x20','2855958VqSwyJ','7527672pWmddL','105BAWeDb','644ERZVDY','9675XDXCnE'];a113_0x46c3=function(){return _0x160736;};return a113_0x46c3();}(function(_0x4412c5,_0x377000){const _0x18e3a3=a113_0x580e,_0x1ae9ae=_0x4412c5();while(!![]){try{const _0x437be9=parseInt(_0x18e3a3(0x12f))/0x1+-parseInt(_0x18e3a3(0x12d))/0x2+-parseInt(_0x18e3a3(0x136))/0x3+-parseInt(_0x18e3a3(0x12b))/0x4*(parseInt(_0x18e3a3(0x12c))/0x5)+-parseInt(_0x18e3a3(0x133))/0x6*(-parseInt(_0x18e3a3(0x12a))/0x7)+parseInt(_0x18e3a3(0x129))/0x8+parseInt(_0x18e3a3(0x130))/0x9;if(_0x437be9===_0x377000)break;else _0x1ae9ae['push'](_0x1ae9ae['shift']());}catch(_0xcf807e){_0x1ae9ae['push'](_0x1ae9ae['shift']());}}}(a113_0x46c3,0xa1dc5));export function parseSegmentRef(_0x13a225){const _0x5e0823=a113_0x580e,_0xb9039f=_0x13a225[_0x5e0823(0x132)]('/');if(_0xb9039f===-0x1)return{'parentId':_0x13a225};if(_0xb9039f===0x0)throw new Error(_0x5e0823(0x135)+_0x13a225+_0x5e0823(0x12e));const _0x5e547b=_0x13a225[_0x5e0823(0x131)](0x0,_0xb9039f),_0x16ce12=_0x13a225[_0x5e0823(0x131)](_0xb9039f+0x1);if(_0x16ce12==='')throw new Error(_0x5e0823(0x135)+_0x13a225+_0x5e0823(0x134));return{'parentId':_0x5e547b,'childId':_0x16ce12};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xdd738a,_0x387322){const _0x1f0347=a114_0xcdd9,_0x1eeca8=_0xdd738a();while(!![]){try{const _0x2e2ea1=parseInt(_0x1f0347(0x121))/0x1+parseInt(_0x1f0347(0x140))/0x2*(parseInt(_0x1f0347(0x12a))/0x3)+parseInt(_0x1f0347(0x126))/0x4*(-parseInt(_0x1f0347(0x120))/0x5)+-parseInt(_0x1f0347(0x11d))/0x6+-parseInt(_0x1f0347(0x147))/0x7+parseInt(_0x1f0347(0x138))/0x8+-parseInt(_0x1f0347(0x12b))/0x9*(-parseInt(_0x1f0347(0x123))/0xa);if(_0x2e2ea1===_0x387322)break;else _0x1eeca8['push'](_0x1eeca8['shift']());}catch(_0xf9227d){_0x1eeca8['push'](_0x1eeca8['shift']());}}}(a114_0x38f4,0xc6f6c));import a114_0x6f4d06 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x5b824b){const _0x33470b=a114_0xcdd9;return _0x5b824b[_0x33470b(0x149)]!==_0x33470b(0x133);}export function isScopedResolution(_0x373abf){const _0x37cc76=a114_0xcdd9;return _0x373abf[_0x37cc76(0x149)]===_0x37cc76(0x127)||_0x373abf[_0x37cc76(0x149)]===_0x37cc76(0x12d)||_0x373abf[_0x37cc76(0x149)]===_0x37cc76(0x131);}function a114_0x38f4(){const _0x507910=['no_config','journey','exists','parent_name','9535736tIsVmt','match','type','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','configDir','dirname','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','relative','Parent\x20segment\x20not\x20specified','join','6453090nxlmbN','File\x20not\x20found','invalid_yaml','15355wLszKx','1209219dbnHuv','stat','460210RSBgJE','isFile','parentSegment','12pMcmOW','directory','parent_segment','string','61221ftOLfo','207AlPhQN','folderPath','file','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','isScoped','tdx.json','context','isDirectory','error','resourceType','resolve','replace','parse','1913368dwDrTA','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','readFile','includes','segmentName','startsWith','No\x20tdx.json\x20found\x20for\x20file:\x20','cwd','74wDhFlI','no_parent','trim'];a114_0x38f4=function(){return _0x507910;};return a114_0x38f4();}export function getScopedDetails(_0x5922a9){const _0x1d76bd=a114_0xcdd9;if(isScopedResolution(_0x5922a9))return{'isScoped':_0x5922a9[_0x1d76bd(0x12f)],'scopedFolderPath':_0x5922a9['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x4df255,_0x5c77c4){const _0x2481d7=a114_0xcdd9;let _0x31cc4d=a114_0x6f4d06[_0x2481d7(0x135)](_0x4df255);const _0x2b9110=a114_0x6f4d06[_0x2481d7(0x137)](_0x31cc4d)['root'];while(_0x31cc4d!==_0x2b9110){const _0x1030e8=a114_0x6f4d06[_0x2481d7(0x11c)](_0x31cc4d,_0x2481d7(0x130));if(await _0x5c77c4[_0x2481d7(0x145)](_0x1030e8))try{const _0x294571=await _0x5c77c4[_0x2481d7(0x13a)](_0x1030e8),_0x4a5501=JSON['parse'](_0x294571);if(_0x4a5501['parent_segment']&&typeof _0x4a5501['parent_segment']===_0x2481d7(0x129))return{'configPath':_0x1030e8,'configDir':_0x31cc4d,'parentSegment':_0x4a5501[_0x2481d7(0x128)]};}catch{}_0x31cc4d=a114_0x6f4d06[_0x2481d7(0x118)](_0x31cc4d);}return null;}function a114_0xcdd9(_0x20d787,_0x257b4e){_0x20d787=_0x20d787-0x116;const _0x38f4a6=a114_0x38f4();let _0xcdd954=_0x38f4a6[_0x20d787];return _0xcdd954;}function calculateScopedPath(_0x30228c,_0x32bd0d){const _0x5b1004=a114_0xcdd9,_0x83b4af=a114_0x6f4d06[_0x5b1004(0x11a)](_0x32bd0d,_0x30228c),_0x1480ad=_0x83b4af!==''&&_0x83b4af!=='.'&&!_0x83b4af[_0x5b1004(0x13d)]('..');return{'isScoped':_0x1480ad,'scopedFolderPath':_0x1480ad?_0x83b4af[_0x5b1004(0x136)](/\\/g,'/'):''};}export async function resolveTarget(_0x390fcf){const _0xc81da7=a114_0xcdd9,{arg:_0x52f6e6,contextParent:_0x377698,cwd:cwd=process[_0xc81da7(0x13f)](),fs:fs=nodeFileSystem}=_0x390fcf;if(_0x52f6e6&&isYamlFilePath(_0x52f6e6))try{const _0x15ca23=await resolveYamlFilePath(_0x52f6e6,fs),_0x17f0df=a114_0x6f4d06[_0xc81da7(0x135)](_0x52f6e6),_0x1bae68=a114_0x6f4d06[_0xc81da7(0x118)](_0x17f0df),_0x1252a9=await findTdxConfigAsync(_0x1bae68,fs);if(!_0x1252a9){if(_0x377698){const _0x48e1df=a114_0x6f4d06[_0xc81da7(0x118)](_0x17f0df);return{'type':_0xc81da7(0x12d),'parentName':_0x377698,'targetDir':_0x48e1df,'configRoot':_0x48e1df,'filePath':_0x17f0df,'resourceName':_0x15ca23[_0xc81da7(0x13c)],'folderPath':_0x15ca23[_0xc81da7(0x12c)],'resourceType':_0x15ca23['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc81da7(0x133),'errorCode':_0xc81da7(0x143),'message':_0xc81da7(0x13e)+_0x52f6e6,'arg':_0x52f6e6,'helpText':_0xc81da7(0x116)};}const _0x40f6f5=calculateScopedPath(_0x1bae68,_0x1252a9[_0xc81da7(0x117)]);return{'type':_0xc81da7(0x12d),'parentName':_0x1252a9[_0xc81da7(0x125)],'targetDir':_0x1252a9[_0xc81da7(0x117)],'configRoot':_0x1252a9[_0xc81da7(0x117)],'filePath':_0x17f0df,'resourceName':_0x15ca23[_0xc81da7(0x13c)],'folderPath':_0x15ca23[_0xc81da7(0x12c)],'resourceType':_0x15ca23[_0xc81da7(0x134)],'isScoped':_0x40f6f5[_0xc81da7(0x12f)],'scopedFolderPath':_0x40f6f5['scopedFolderPath']};}catch(_0x299e30){const _0x56c50b=_0x299e30 instanceof Error?_0x299e30['message']:String(_0x299e30);if(_0x56c50b['includes'](_0xc81da7(0x11e)))return{'type':'error','errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x52f6e6,'arg':_0x52f6e6};if(_0x56c50b[_0xc81da7(0x13b)]('No\x20tdx.json\x20found')){if(_0x377698){const _0x3a5c13=a114_0x6f4d06[_0xc81da7(0x135)](_0x52f6e6);if(await fs[_0xc81da7(0x145)](_0x3a5c13)){const _0x3765bf=a114_0x6f4d06[_0xc81da7(0x118)](_0x3a5c13),_0x2baf52=await fs['readFile'](_0x3a5c13),_0x3f4898=_0x2baf52[_0xc81da7(0x148)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x12c1ab=_0x2baf52[_0xc81da7(0x148)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4bc445=_0x3f4898?_0x3f4898[0x1][_0xc81da7(0x142)]():a114_0x6f4d06['basename'](_0x52f6e6,a114_0x6f4d06['extname'](_0x52f6e6)),_0xca04bb=_0x12c1ab&&_0x12c1ab[0x1][_0xc81da7(0x142)]()===_0xc81da7(0x144)?_0xc81da7(0x144):'segment';return{'type':_0xc81da7(0x12d),'parentName':_0x377698,'targetDir':_0x3765bf,'configRoot':_0x3765bf,'filePath':_0x3a5c13,'resourceName':_0x4bc445,'folderPath':'','resourceType':_0xca04bb,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':'no_config','message':_0xc81da7(0x13e)+_0x52f6e6,'arg':_0x52f6e6,'helpText':_0xc81da7(0x116)};}return{'type':_0xc81da7(0x133),'errorCode':_0xc81da7(0x11f),'message':_0x56c50b,'arg':_0x52f6e6};}if(_0x52f6e6){const _0x72d45c=a114_0x6f4d06[_0xc81da7(0x135)](cwd,_0x52f6e6);let _0x266293=null;try{_0x266293=await fs[_0xc81da7(0x122)](_0x72d45c);}catch{}if(_0x266293?.[_0xc81da7(0x132)]()){const _0x599d60=await findTdxConfigAsync(_0x72d45c,fs);if(_0x599d60){const _0x2590a0=calculateScopedPath(_0x72d45c,_0x599d60[_0xc81da7(0x117)]);return{'type':_0xc81da7(0x127),'parentName':_0x599d60['parentSegment'],'targetDir':_0x72d45c,'configRoot':_0x599d60[_0xc81da7(0x117)],'isScoped':_0x2590a0['isScoped'],'scopedFolderPath':_0x2590a0['scopedFolderPath']};}if(_0x377698)return{'type':_0xc81da7(0x127),'parentName':_0x377698,'targetDir':_0x72d45c,'configRoot':_0x72d45c,'isScoped':![],'scopedFolderPath':''};return{'type':_0xc81da7(0x133),'errorCode':'no_config','message':_0xc81da7(0x119)+_0x52f6e6,'arg':_0x52f6e6,'helpText':_0xc81da7(0x116)};}if(_0x266293?.[_0xc81da7(0x124)]())return{'type':'error','errorCode':_0xc81da7(0x11f),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x52f6e6,'arg':_0x52f6e6,'helpText':_0xc81da7(0x139)};const _0x2b88e8=sanitizeFileName(_0x52f6e6),_0x3119f2=getSegmentRootDir(_0x2b88e8,cwd);return{'type':_0xc81da7(0x146),'parentName':_0x52f6e6,'targetDir':_0x3119f2,'configRoot':_0x3119f2};}const _0xa7a7c8=await findTdxConfigAsync(cwd,fs);if(_0xa7a7c8){const _0x5afc7d=calculateScopedPath(cwd,_0xa7a7c8[_0xc81da7(0x117)]);return{'type':_0xc81da7(0x131),'parentName':_0xa7a7c8['parentSegment'],'targetDir':cwd,'configRoot':_0xa7a7c8[_0xc81da7(0x117)],'isScoped':_0x5afc7d[_0xc81da7(0x12f)],'scopedFolderPath':_0x5afc7d['scopedFolderPath']};}if(_0x377698){const _0xe53781=sanitizeFileName(_0x377698),_0x1ac96e=getSegmentRootDir(_0xe53781,cwd);return{'type':_0xc81da7(0x131),'parentName':_0x377698,'targetDir':_0x1ac96e,'configRoot':_0x1ac96e,'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc81da7(0x133),'errorCode':_0xc81da7(0x141),'message':_0xc81da7(0x11b),'helpText':_0xc81da7(0x12e)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a115_0x3f3470=a115_0x36d6;(function(_0x422179,_0x11364d){const _0x4b91f9=a115_0x36d6,_0x444f92=_0x422179();while(!![]){try{const _0x4c6538=parseInt(_0x4b91f9(0x152))/0x1*(parseInt(_0x4b91f9(0x157))/0x2)+parseInt(_0x4b91f9(0x14c))/0x3+parseInt(_0x4b91f9(0x14d))/0x4+parseInt(_0x4b91f9(0x163))/0x5+-parseInt(_0x4b91f9(0x158))/0x6+-parseInt(_0x4b91f9(0x15d))/0x7*(-parseInt(_0x4b91f9(0x162))/0x8)+-parseInt(_0x4b91f9(0x164))/0x9*(parseInt(_0x4b91f9(0x161))/0xa);if(_0x4c6538===_0x11364d)break;else _0x444f92['push'](_0x444f92['shift']());}catch(_0x4a4256){_0x444f92['push'](_0x444f92['shift']());}}}(a115_0x59bf,0x194f6));import{existsSync,readFileSync}from'fs';import a115_0x389020 from'path';const TDX_CONFIG_FILE=a115_0x3f3470(0x15b),SEGMENTS_DIR=a115_0x3f3470(0x159);export function findTdxConfigPath(_0x45e7d5=process[a115_0x3f3470(0x160)]()){const _0x13f44d=a115_0x3f3470;let _0x307430=a115_0x389020[_0x13f44d(0x14e)](_0x45e7d5);const _0x2162f8=a115_0x389020['parse'](_0x307430)[_0x13f44d(0x166)];while(_0x307430!==_0x2162f8){const _0x157ff3=a115_0x389020['join'](_0x307430,TDX_CONFIG_FILE);if(existsSync(_0x157ff3))return _0x157ff3;_0x307430=a115_0x389020['dirname'](_0x307430);}return null;}export function loadTdxConfig(_0x20fb96){const _0x57fa4f=a115_0x3f3470,_0x21145b=readFileSync(_0x20fb96,_0x57fa4f(0x14b));let _0x575499;try{_0x575499=JSON[_0x57fa4f(0x15c)](_0x21145b);}catch{throw new Error(_0x57fa4f(0x151)+_0x20fb96);}if(!_0x575499||typeof _0x575499!=='object')throw new Error(_0x57fa4f(0x15f));const _0x161267=_0x575499;if(!_0x161267[_0x57fa4f(0x14f)]||typeof _0x161267[_0x57fa4f(0x14f)]!==_0x57fa4f(0x155))throw new Error(_0x57fa4f(0x154));return{'parent_segment':_0x161267['parent_segment']};}export function findTdxConfig(_0x56539a=process[a115_0x3f3470(0x160)]()){const _0x550e32=a115_0x3f3470,_0x10cd70=findTdxConfigPath(_0x56539a);if(!_0x10cd70)throw new Error(_0x550e32(0x14a));const _0x5982e1=loadTdxConfig(_0x10cd70),_0x115d00=a115_0x389020[_0x550e32(0x165)](_0x10cd70);return{'config':_0x5982e1,'configPath':_0x10cd70,'configDir':_0x115d00};}export function tryFindTdxConfig(_0xa52363){try{return findTdxConfig(_0xa52363);}catch{return null;}}export function getSegmentRootDir(_0x588646,_0x544b72=process[a115_0x3f3470(0x160)]()){const _0x16a3c6=a115_0x3f3470;return a115_0x389020[_0x16a3c6(0x15e)](_0x544b72,SEGMENTS_DIR,_0x588646);}export function getTdxConfigPath(_0x107e26,_0x5ccf83=process[a115_0x3f3470(0x160)]()){return a115_0x389020['join'](getSegmentRootDir(_0x107e26,_0x5ccf83),TDX_CONFIG_FILE);}function a115_0x36d6(_0x537b37,_0x363e44){_0x537b37=_0x537b37-0x14a;const _0x59bf49=a115_0x59bf();let _0x36d666=_0x59bf49[_0x537b37];return _0x36d666;}export function getRelativePathFromConfig(_0x3cdb58,_0x593fda){const _0x5ecfa6=a115_0x3f3470,_0x2ada8c=a115_0x389020[_0x5ecfa6(0x14e)](_0x3cdb58),_0x2869cc=a115_0x389020[_0x5ecfa6(0x15a)](_0x593fda,_0x2ada8c);if(_0x2869cc[_0x5ecfa6(0x153)]('..'))return'';return _0x2869cc;}function a115_0x59bf(){const _0x4ab967=['No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','utf-8','389337LWwunH','31028RQHWiu','resolve','parent_segment','stringify','Invalid\x20JSON\x20in\x20','40SLxCNa','startsWith','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','string','replace','508AqQNou','317232tDabJQ','segments','relative','tdx.json','parse','8001QPSfib','join','Invalid\x20tdx.json:\x20expected\x20object','cwd','10hIKIsz','472SIXNqN','395490tEdSnd','1239201lbjYSU','dirname','root'];a115_0x59bf=function(){return _0x4ab967;};return a115_0x59bf();}export function localPathToTdFolderPath(_0x25ea5d){const _0x447ce8=a115_0x3f3470,_0x30b2bc=a115_0x389020[_0x447ce8(0x165)](_0x25ea5d);if(_0x30b2bc==='.'||_0x30b2bc==='')return'';return _0x30b2bc[_0x447ce8(0x156)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x233ab2,_0x279f32){const _0x3e4777=a115_0x3f3470;if(!_0x233ab2)return _0x279f32;return a115_0x389020[_0x3e4777(0x15e)](_0x279f32,_0x233ab2);}export function createTdxConfigContent(_0x2a74fe){const _0x4684be=a115_0x3f3470,_0x3c5580={'parent_segment':_0x2a74fe};return JSON[_0x4684be(0x150)](_0x3c5580,null,0x2)+'\x0a';}
|