@treasuredata/tdx 0.14.2 → 0.14.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/api-command.js +1 -1
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/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.d.ts +15 -0
- package/dist/core/profile.d.ts.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.d.ts +13 -2
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a92_0x58af3c=a92_0x2625;(function(_0x2561a6,_0x1b8ca3){const _0xaf997e=a92_0x2625,_0x445392=_0x2561a6();while(!![]){try{const _0x312781=parseInt(_0xaf997e(0x1df))/0x1*(parseInt(_0xaf997e(0x1da))/0x2)+-parseInt(_0xaf997e(0x1e1))/0x3*(parseInt(_0xaf997e(0x1af))/0x4)+-parseInt(_0xaf997e(0x1aa))/0x5+-parseInt(_0xaf997e(0x1e2))/0x6*(parseInt(_0xaf997e(0x1f7))/0x7)+-parseInt(_0xaf997e(0x19f))/0x8*(-parseInt(_0xaf997e(0x1b7))/0x9)+parseInt(_0xaf997e(0x1b5))/0xa*(parseInt(_0xaf997e(0x1e3))/0xb)+-parseInt(_0xaf997e(0x1bf))/0xc*(-parseInt(_0xaf997e(0x1ff))/0xd);if(_0x312781===_0x1b8ca3)break;else _0x445392['push'](_0x445392['shift']());}catch(_0x391d15){_0x445392['push'](_0x445392['shift']());}}}(a92_0x3f3e,0xa20ec));import*as a92_0x5ef8d4 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x103c47,_0x38ef2f){const _0x5f36f0=a92_0x2625,_0x1e4161=_0x103c47[_0x5f36f0(0x1c9)]&&_0x5f36f0(0x1ec)in _0x103c47[_0x5f36f0(0x1c9)]&&_0x103c47['rule']['type'];return{'type':'segment','name':_0x103c47[_0x5f36f0(0x1b8)],..._0x103c47[_0x5f36f0(0x219)]&&{'description':_0x103c47['description']},..._0x38ef2f&&{'folder':_0x38ef2f},..._0x1e4161&&{'rule':apiRuleToYaml(_0x103c47[_0x5f36f0(0x1c9)])},..._0x103c47['kind']!==undefined&&{'kind':_0x103c47[_0x5f36f0(0x22f)]===0x0?_0x5f36f0(0x1a1):_0x103c47[_0x5f36f0(0x22f)]===0x1?'realtime':_0x5f36f0(0x1e4)},..._0x103c47[_0x5f36f0(0x225)]!==undefined&&{'visible':_0x103c47[_0x5f36f0(0x225)]}};}export async function segmentResponseToDef(_0x1cb4ad,_0x36734e,_0x3d39d5){const _0x107de9=a92_0x2625,_0x33056e=segmentResponseToDefSync(_0x1cb4ad,_0x3d39d5);if(!_0x36734e||!_0x36734e['resolveSegmentName'])return _0x33056e;return _0x33056e[_0x107de9(0x1c9)]&&(_0x33056e[_0x107de9(0x1c9)]=await resolveRuleSegmentRefs(_0x33056e['rule'],_0x36734e['resolveSegmentName'])),_0x33056e;}export function apiRuleToYaml(_0x19a662){const _0x236150=a92_0x2625,_0x28e62a=(_0x19a662[_0x236150(0x21f)]||[])[_0x236150(0x1ea)](apiConditionToYaml);if(_0x28e62a['length']===0x1&&!_0x19a662[_0x236150(0x219)]&&_0x236150(0x1ec)in _0x28e62a[0x0]&&(_0x28e62a[0x0]['type']===_0x236150(0x222)||_0x28e62a[0x0][_0x236150(0x1ec)]==='Or')){const _0x296525=_0x28e62a[0x0];if(_0x296525[_0x236150(0x1ec)]===_0x19a662[_0x236150(0x1ec)]&&_0x296525[_0x236150(0x21f)])return{'type':_0x19a662[_0x236150(0x1ec)],'conditions':_0x296525[_0x236150(0x21f)],..._0x296525[_0x236150(0x219)]&&{'description':_0x296525[_0x236150(0x219)]}};}return{'type':_0x19a662[_0x236150(0x1ec)],'conditions':_0x28e62a,..._0x19a662['description']&&{'description':_0x19a662[_0x236150(0x219)]}};}export async function resolveRuleSegmentRefs(_0x11c25c,_0x4f411c){const _0x28eac7=a92_0x2625,_0x459501=await Promise[_0x28eac7(0x1b0)](_0x11c25c[_0x28eac7(0x21f)][_0x28eac7(0x1ea)](_0x19909a=>resolveConditionSegmentRefs(_0x19909a,_0x4f411c)));return{..._0x11c25c,'conditions':_0x459501};}async function resolveConditionSegmentRefs(_0x3e4a55,_0x230c04){const _0x123174=a92_0x2625;if(_0x123174(0x1bd)in _0x3e4a55&&(_0x3e4a55[_0x123174(0x1ec)]===_0x123174(0x1e9)||_0x3e4a55[_0x123174(0x1ec)]===_0x123174(0x1d6))){const _0xa002aa=_0x3e4a55;if(/^\d+$/['test'](_0xa002aa['segment'])){const _0x5995aa=await _0x230c04(_0xa002aa['segment']);return{..._0xa002aa,'segment':_0x5995aa};}return _0x3e4a55;}if(_0x123174(0x21f)in _0x3e4a55&&_0x3e4a55[_0x123174(0x21f)]){const _0x127bba=_0x3e4a55,_0x2405b3=await Promise[_0x123174(0x1b0)](_0x127bba['conditions'][_0x123174(0x1ea)](_0x5bd9c0=>resolveConditionSegmentRefs(_0x5bd9c0,_0x230c04)));return{..._0x127bba,'conditions':_0x2405b3};}if(_0x123174(0x1ee)in _0x3e4a55&&_0x3e4a55['filter']){const _0x1c2b8f=_0x3e4a55,_0x2fc751=await resolveRuleSegmentRefs(_0x1c2b8f[_0x123174(0x1ee)],_0x230c04);return{..._0x1c2b8f,'filter':_0x2fc751};}return _0x3e4a55;}export async function resolveRuleSegmentIds(_0x4e8e6d,_0x119d81){const _0x55bbcb=a92_0x2625,_0x528e90=await Promise[_0x55bbcb(0x1b0)](_0x4e8e6d['conditions'][_0x55bbcb(0x1ea)](_0x5863d8=>resolveConditionSegmentIds(_0x5863d8,_0x119d81)));return{..._0x4e8e6d,'conditions':_0x528e90};}async function resolveConditionSegmentIds(_0x58493e,_0x2a23ff){const _0x7c9b9b=a92_0x2625;if('segment'in _0x58493e&&(_0x58493e['type']==='include'||_0x58493e['type']===_0x7c9b9b(0x1d6))){const _0x105f34=_0x58493e;if(!/^\d+$/[_0x7c9b9b(0x214)](_0x105f34[_0x7c9b9b(0x1bd)])){const _0x537ca1=await _0x2a23ff(_0x105f34['segment']);return{..._0x105f34,'segment':_0x537ca1};}return _0x58493e;}if(_0x7c9b9b(0x21f)in _0x58493e&&_0x58493e['conditions']){const _0x30559b=_0x58493e,_0x5bcb0a=await Promise['all'](_0x30559b[_0x7c9b9b(0x21f)][_0x7c9b9b(0x1ea)](_0x3bf37d=>resolveConditionSegmentIds(_0x3bf37d,_0x2a23ff)));return{..._0x30559b,'conditions':_0x5bcb0a};}if(_0x7c9b9b(0x1ee)in _0x58493e&&_0x58493e[_0x7c9b9b(0x1ee)]){const _0xe90987=_0x58493e,_0x3a67fe=await resolveRuleSegmentIds(_0xe90987[_0x7c9b9b(0x1ee)],_0x2a23ff);return{..._0xe90987,'filter':_0x3a67fe};}return _0x58493e;}function apiConditionToYaml(_0x138ffe){const _0x28d371=a92_0x2625;if(_0x138ffe[_0x28d371(0x1ec)]==='And'||_0x138ffe['type']==='Or'){if(_0x138ffe[_0x28d371(0x21f)]){const _0x1ac157=_0x138ffe[_0x28d371(0x21f)][_0x28d371(0x1ea)](apiConditionToYaml);if(_0x1ac157[_0x28d371(0x1b3)]===0x1&&!_0x138ffe['description'])return _0x1ac157[0x0];return{'type':_0x138ffe['type'],'conditions':_0x1ac157,..._0x138ffe[_0x28d371(0x219)]&&{'description':_0x138ffe['description']}};}}if(_0x138ffe[_0x28d371(0x1ec)]==='Value'&&_0x138ffe[_0x28d371(0x227)]&&_0x138ffe[_0x28d371(0x1e8)]){const _0x5baa4a=_0x138ffe[_0x28d371(0x227)][_0x28d371(0x1ca)]?{'type':_0x138ffe['leftValue'][_0x28d371(0x1ca)]['type'],..._0x138ffe['leftValue']['aggregation'][_0x28d371(0x205)]&&{'groupingColumns':_0x138ffe['leftValue'][_0x28d371(0x1ca)][_0x28d371(0x205)]}}:undefined;return{'type':_0x28d371(0x1dd),'attribute':_0x138ffe[_0x28d371(0x227)]['name']||'','operator':apiOperatorToYaml(_0x138ffe[_0x28d371(0x1e8)]),..._0x138ffe['arrayMatching']&&_0x138ffe[_0x28d371(0x216)]!==_0x28d371(0x230)?{'arrayMatching':_0x138ffe[_0x28d371(0x216)]}:{},..._0x138ffe[_0x28d371(0x1d6)]?{'exclude':_0x138ffe[_0x28d371(0x1d6)]}:{},..._0x5baa4a?{'aggregation':_0x5baa4a}:{},..._0x138ffe[_0x28d371(0x227)]['source']?{'source':_0x138ffe[_0x28d371(0x227)][_0x28d371(0x1f2)]['name']}:{},..._0x138ffe[_0x28d371(0x227)][_0x28d371(0x1ee)]?{'filter':apiRuleToYaml(_0x138ffe['leftValue'][_0x28d371(0x1ee)])}:{},..._0x138ffe['limit']!==undefined&&_0x138ffe[_0x28d371(0x21a)]!==null?{'limit':_0x138ffe[_0x28d371(0x21a)]}:{}};}if(_0x138ffe[_0x28d371(0x1ec)]===_0x28d371(0x1d8)&&_0x138ffe['id'])return{'type':_0x138ffe[_0x28d371(0x1d6)]?_0x28d371(0x1d6):'include','segment':_0x138ffe['id']};return{'type':_0x28d371(0x222),'conditions':[]};}function isTemporalOperator(_0x4beb9c){const _0x1d4582=a92_0x2625;return _0x4beb9c===_0x1d4582(0x1cf)||_0x4beb9c===_0x1d4582(0x223);}function getEffectiveValue(_0x473f2f){const _0x197150=a92_0x2625,_0x33fc49=_0x473f2f[_0x197150(0x201)];return _0x473f2f['value']??_0x33fc49;}function apiOperatorToYaml(_0x22069c){const _0x12ee9d=a92_0x2625;let _0x1781c2;if(_0x22069c['rightValues']&&_0x22069c[_0x12ee9d(0x215)][_0x12ee9d(0x1b3)]>0x0)_0x1781c2=_0x22069c[_0x12ee9d(0x215)];else{if(_0x22069c[_0x12ee9d(0x1f8)]!==undefined)_0x1781c2=_0x22069c[_0x12ee9d(0x1f8)];else isTemporalOperator(_0x22069c[_0x12ee9d(0x1ec)])&&_0x22069c['value']!==undefined&&(_0x1781c2=_0x22069c[_0x12ee9d(0x21c)]);}return{'type':mapApiOperatorType(_0x22069c[_0x12ee9d(0x1ec)]),..._0x22069c['not']&&{'not':_0x22069c[_0x12ee9d(0x22b)]},..._0x1781c2!==undefined&&{'value':_0x1781c2},..._0x22069c[_0x12ee9d(0x1fc)]&&{'unit':_0x22069c[_0x12ee9d(0x1fc)]}};}function mapApiOperatorType(_0x5c05bd){return _0x5c05bd;}export function segmentDefToCreateRequest(_0x4b63f2,_0x4dd6ca){const _0x4c90ef=a92_0x2625,_0x2b7180={'name':_0x4b63f2['name']};return _0x4b63f2[_0x4c90ef(0x219)]&&(_0x2b7180[_0x4c90ef(0x219)]=_0x4b63f2[_0x4c90ef(0x219)]),_0x4b63f2['rule']&&(_0x2b7180[_0x4c90ef(0x1c9)]=yamlRuleToApi(_0x4b63f2[_0x4c90ef(0x1c9)])),_0x4b63f2['kind']&&(_0x2b7180[_0x4c90ef(0x22f)]=_0x4b63f2[_0x4c90ef(0x22f)]===_0x4c90ef(0x1a1)?0x0:_0x4b63f2[_0x4c90ef(0x22f)]==='realtime'?0x1:0x2),_0x4b63f2['visible']!==undefined&&(_0x2b7180[_0x4c90ef(0x225)]=_0x4b63f2[_0x4c90ef(0x1d2)]),_0x4dd6ca&&(_0x2b7180[_0x4c90ef(0x1b9)]=_0x4dd6ca),_0x2b7180;}export function segmentDefToUpdateRequest(_0xd8903){const _0x320d6a=a92_0x2625,_0x55e4a9={'name':_0xd8903[_0x320d6a(0x1b8)]};return _0xd8903['description']!==undefined&&(_0x55e4a9[_0x320d6a(0x219)]=_0xd8903['description']),_0xd8903[_0x320d6a(0x1c9)]&&(_0x55e4a9[_0x320d6a(0x1c9)]=yamlRuleToApi(_0xd8903[_0x320d6a(0x1c9)])),_0xd8903[_0x320d6a(0x22f)]&&(_0x55e4a9[_0x320d6a(0x22f)]=_0xd8903['kind']===_0x320d6a(0x1a1)?0x0:_0xd8903[_0x320d6a(0x22f)]===_0x320d6a(0x1ba)?0x1:0x2),_0x55e4a9;}export function yamlRuleToApi(_0x2a1114,_0x3131d0=![]){const _0xe5c745=a92_0x2625,_0x510d34=_0x2a1114[_0xe5c745(0x21f)][_0xe5c745(0x1ea)](yamlConditionToApi);if(_0x3131d0){const _0x2728b8=_0x510d34[_0xe5c745(0x1c1)](_0x553f2f=>_0x553f2f['type']===_0xe5c745(0x222)||_0x553f2f[_0xe5c745(0x1ec)]==='Or');if(!_0x2728b8&&_0x510d34[_0xe5c745(0x1b3)]>0x0)return{'type':_0x2a1114[_0xe5c745(0x1ec)],'conditions':[{'type':_0xe5c745(0x222),'description':_0x2a1114['description']||'','conditions':_0x510d34}]};}return{'type':_0x2a1114[_0xe5c745(0x1ec)],'conditions':_0x510d34,..._0x2a1114[_0xe5c745(0x219)]&&{'description':_0x2a1114['description']}};}function yamlConditionToApi(_0x3c7dea){const _0x38898f=a92_0x2625;if(_0x38898f(0x1bd)in _0x3c7dea&&(_0x3c7dea[_0x38898f(0x1ec)]===_0x38898f(0x1e9)||_0x3c7dea['type']===_0x38898f(0x1d6))){const _0x3ae9f6=_0x3c7dea;return{'type':'Reference','id':_0x3ae9f6[_0x38898f(0x1bd)],'exclude':_0x3ae9f6[_0x38898f(0x1ec)]===_0x38898f(0x1d6)};}if('type'in _0x3c7dea&&(_0x3c7dea[_0x38898f(0x1ec)]===_0x38898f(0x222)||_0x3c7dea[_0x38898f(0x1ec)]==='Or')){const _0xcacf8f=_0x3c7dea;return{'type':_0xcacf8f[_0x38898f(0x1ec)],'conditions':_0xcacf8f['conditions'][_0x38898f(0x1ea)](yamlConditionToApi),..._0xcacf8f['description']&&{'description':_0xcacf8f[_0x38898f(0x219)]}};}const _0x5d89b1=_0x3c7dea,_0x38fc92={'type':_0x38898f(0x1dd),'leftValue':buildLeftValue(_0x5d89b1),'operator':yamlOperatorToApi(_0x5d89b1[_0x38898f(0x1e8)]),'exclude':_0x5d89b1[_0x38898f(0x1d6)]??![],'arrayMatching':_0x5d89b1[_0x38898f(0x216)]??_0x38898f(0x230)};return _0x5d89b1[_0x38898f(0x21a)]!==undefined&&(_0x38fc92[_0x38898f(0x21a)]=_0x5d89b1[_0x38898f(0x21a)]),_0x38fc92;}function buildLeftValue(_0x1f918b){const _0x2ab598=a92_0x2625,_0x1d73d3={'name':_0x1f918b[_0x2ab598(0x1a9)]};return _0x1f918b[_0x2ab598(0x1ca)]&&(_0x1d73d3['aggregation']={'type':_0x1f918b[_0x2ab598(0x1ca)][_0x2ab598(0x1ec)],..._0x1f918b[_0x2ab598(0x1ca)]['groupingColumns']&&{'groupingColumns':_0x1f918b[_0x2ab598(0x1ca)][_0x2ab598(0x205)]}}),_0x1f918b[_0x2ab598(0x1f2)]&&(_0x1d73d3[_0x2ab598(0x1f2)]={'name':_0x1f918b[_0x2ab598(0x1f2)]}),_0x1f918b[_0x2ab598(0x1ee)]&&(_0x1d73d3['filter']=yamlRuleToApi(_0x1f918b[_0x2ab598(0x1ee)])),_0x1d73d3;}function yamlOperatorToApi(_0x5e7ab1){const _0x120746=a92_0x2625,_0x5cdb32={'type':mapYamlOperatorType(_0x5e7ab1[_0x120746(0x1ec)]),'not':_0x5e7ab1[_0x120746(0x22b)]??![]},_0xadf5a2=getEffectiveValue(_0x5e7ab1);if(_0xadf5a2!==undefined){if(Array['isArray'](_0xadf5a2))_0x5cdb32['rightValues']=_0xadf5a2;else isTemporalOperator(_0x5e7ab1['type'])?_0x5cdb32[_0x120746(0x21c)]=_0xadf5a2:_0x5cdb32[_0x120746(0x1f8)]=_0xadf5a2;}return _0x5e7ab1[_0x120746(0x1fc)]&&(_0x5cdb32[_0x120746(0x1fc)]=_0x5e7ab1[_0x120746(0x1fc)]),_0x5cdb32;}function mapYamlOperatorType(_0x4d847e){return _0x4d847e;}export function toYamlString(_0x137365){const _0x5769d8=a92_0x2625,_0x4736af=JSON['parse'](JSON[_0x5769d8(0x1fd)](_0x137365)),_0x226cc9=a92_0x5ef8d4[_0x5769d8(0x1fd)](_0x4736af,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x5769d8(0x1dc)}),_0x58b1f2=[_0x5769d8(0x1f0)];let _0xb35046=_0x226cc9;for(const _0x4a5c69 of _0x58b1f2){_0xb35046=_0xb35046[_0x5769d8(0x1f5)](new RegExp('^('+_0x4a5c69+')','m'),(_0x5de90f,_0x2a17db,_0x2c6f74)=>{if(_0x2c6f74===0x0||_0xb35046[_0x2c6f74-0x1]==='\x0a'&&_0xb35046[_0x2c6f74-0x2]==='\x0a')return _0x2a17db;return'\x0a'+_0x2a17db;});}return _0xb35046;}export function parseYamlString(_0xf51636){const _0x3f7f6b=a92_0x2625,_0x31e098=a92_0x5ef8d4[_0x3f7f6b(0x231)](_0xf51636);if(!_0x31e098[_0x3f7f6b(0x1b8)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');if(_0x31e098[_0x3f7f6b(0x1ec)]&&_0x31e098[_0x3f7f6b(0x1ec)]!==_0x3f7f6b(0x1bd))throw new Error(_0x3f7f6b(0x1d5)+_0x31e098[_0x3f7f6b(0x1ec)]);return _0x31e098;}export function isSegmentYaml(_0x367d5a){const _0x1df234=a92_0x2625;if(typeof _0x367d5a!==_0x1df234(0x20a)||_0x367d5a===null)return![];const _0x23aabf=_0x367d5a;return _0x23aabf[_0x1df234(0x1ec)]===_0x1df234(0x1bd)||_0x23aabf[_0x1df234(0x1ec)]===undefined;}export function generateTemplate(_0x4afc72=a92_0x58af3c(0x1c6)){const _0x1102ed=a92_0x58af3c,_0x37813d={'type':_0x1102ed(0x1bd),'name':_0x4afc72,'description':_0x1102ed(0x1eb),'rule':{'type':_0x1102ed(0x222),'conditions':[{'type':_0x1102ed(0x1dd),'attribute':_0x1102ed(0x1bc),'operator':{'type':'Equal','value':'value'}}]}};return toYamlString(_0x37813d);}export function segmentToYamlString(_0x2bae2b){const _0x473607=a92_0x58af3c,_0x371dce=JSON['parse'](JSON['stringify'](_0x2bae2b)),_0xecd0ec=a92_0x5ef8d4[_0x473607(0x1fd)](_0x371dce,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x473607(0x1dc)}),_0x4b544a=[_0x473607(0x1f0),_0x473607(0x1b1)];let _0x2104bf=_0xecd0ec;for(const _0x117b1f of _0x4b544a){_0x2104bf=_0x2104bf[_0x473607(0x1f5)](new RegExp('^('+_0x117b1f+')','m'),(_0x496663,_0x3e61fc,_0x2acd8c)=>{if(_0x2acd8c===0x0||_0x2104bf[_0x2acd8c-0x1]==='\x0a'&&_0x2104bf[_0x2acd8c-0x2]==='\x0a')return _0x3e61fc;return'\x0a'+_0x3e61fc;});}return _0x2104bf;}export function parseSegmentYamlFile(_0x558ee6){const _0x6fdf2f=a92_0x58af3c,_0xd762d2=a92_0x5ef8d4['parse'](_0x558ee6);if(!_0xd762d2[_0x6fdf2f(0x1b8)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');return _0xd762d2;}export function normalizeChildSegmentYaml(_0x384851){const _0x28ec87=a92_0x58af3c;return{'type':_0x28ec87(0x1bd),'name':_0x384851['name'],..._0x384851['description']!==undefined&&{'description':_0x384851['description']},..._0x384851['folder']!==undefined&&{'folder':_0x384851['folder']},..._0x384851[_0x28ec87(0x1c9)]&&{'rule':normalizeRule(_0x384851[_0x28ec87(0x1c9)])},..._0x384851[_0x28ec87(0x22f)]!==undefined&&{'kind':_0x384851['kind']},..._0x384851['visible']!==undefined&&{'visible':_0x384851[_0x28ec87(0x1d2)]},..._0x384851[_0x28ec87(0x211)]&&{'activations':_0x384851[_0x28ec87(0x211)]['map'](normalizeActivation)}};}export function normalizeRule(_0x4b8cd2){const _0x20df7c=a92_0x58af3c;return{'type':_0x4b8cd2[_0x20df7c(0x1ec)],'conditions':_0x4b8cd2[_0x20df7c(0x21f)][_0x20df7c(0x1ea)](normalizeCondition),..._0x4b8cd2['description']!==undefined&&{'description':_0x4b8cd2[_0x20df7c(0x219)]}};}function normalizeCondition(_0x344184){const _0x577872=a92_0x58af3c;if(_0x577872(0x1bd)in _0x344184&&(_0x344184['type']===_0x577872(0x1e9)||_0x344184['type']===_0x577872(0x1d6))){const _0x1cc4ac=_0x344184;return{'type':_0x1cc4ac[_0x577872(0x1ec)],'segment':_0x1cc4ac[_0x577872(0x1bd)]};}if(_0x577872(0x1ec)in _0x344184&&(_0x344184[_0x577872(0x1ec)]===_0x577872(0x222)||_0x344184[_0x577872(0x1ec)]==='Or')){const _0x41c264=_0x344184;return{'type':_0x41c264[_0x577872(0x1ec)],'conditions':_0x41c264[_0x577872(0x21f)][_0x577872(0x1ea)](normalizeCondition),..._0x41c264[_0x577872(0x219)]!==undefined&&{'description':_0x41c264[_0x577872(0x219)]}};}const _0x473de3=_0x344184;return{'type':_0x577872(0x1dd),'attribute':_0x473de3['attribute'],'operator':normalizeOperator(_0x473de3[_0x577872(0x1e8)]),..._0x473de3[_0x577872(0x216)]!==undefined&&{'arrayMatching':_0x473de3['arrayMatching']},..._0x473de3[_0x577872(0x1d6)]!==undefined&&{'exclude':_0x473de3['exclude']},..._0x473de3[_0x577872(0x1ca)]!==undefined&&{'aggregation':_0x473de3[_0x577872(0x1ca)]},..._0x473de3[_0x577872(0x1f2)]!==undefined&&{'source':_0x473de3[_0x577872(0x1f2)]},..._0x473de3[_0x577872(0x1ee)]!==undefined&&{'filter':normalizeRule(_0x473de3['filter'])},..._0x473de3[_0x577872(0x21a)]!==undefined&&{'limit':_0x473de3['limit']}};}function normalizeOperator(_0x4f7e24){const _0x4df7fa=a92_0x58af3c,_0x5ad547=getEffectiveValue(_0x4f7e24);return{'type':_0x4f7e24[_0x4df7fa(0x1ec)],..._0x4f7e24[_0x4df7fa(0x22b)]!==undefined&&{'not':_0x4f7e24[_0x4df7fa(0x22b)]},..._0x5ad547!==undefined&&{'value':_0x5ad547},..._0x4f7e24['min']!==undefined&&{'min':_0x4f7e24[_0x4df7fa(0x217)]},..._0x4f7e24[_0x4df7fa(0x20f)]!==undefined&&{'max':_0x4f7e24['max']},..._0x4f7e24['unit']!==undefined&&{'unit':_0x4f7e24['unit']},..._0x4f7e24[_0x4df7fa(0x1cc)]!==undefined&&{'duration':_0x4f7e24['duration']},..._0x4f7e24['from']!==undefined&&{'from':_0x4f7e24[_0x4df7fa(0x209)]}};}function normalizeActivation(_0x205e1a){const _0x20f0b7=a92_0x58af3c;return{'name':_0x205e1a[_0x20f0b7(0x1b8)],'connection':_0x205e1a[_0x20f0b7(0x20e)],..._0x205e1a['description']!==undefined&&{'description':_0x205e1a[_0x20f0b7(0x219)]},..._0x205e1a[_0x20f0b7(0x22a)]!==undefined&&{'all_columns':_0x205e1a[_0x20f0b7(0x22a)]},..._0x205e1a[_0x20f0b7(0x203)]!==undefined&&{'columns':_0x205e1a[_0x20f0b7(0x203)]},..._0x205e1a['behavior']!==undefined&&{'behavior':_0x205e1a[_0x20f0b7(0x212)]},..._0x205e1a[_0x20f0b7(0x1b2)]!==undefined&&{'schedule':_0x205e1a[_0x20f0b7(0x1b2)]},..._0x205e1a[_0x20f0b7(0x1a3)]!==undefined&&{'notification':_0x205e1a[_0x20f0b7(0x1a3)]},..._0x205e1a[_0x20f0b7(0x1a7)]!==undefined&&{'connector_config':_0x205e1a['connector_config']},..._0x205e1a[_0x20f0b7(0x1d9)]!==undefined&&{'activation_template_id':_0x205e1a['activation_template_id']}};}export function activationResponseToDef(_0x1750f6,_0x3b289a,_0x2f46d7){const _0x283ff1=a92_0x58af3c,_0x422a59=_0x1750f6[_0x283ff1(0x220)]||'',_0xee5a54=_0x2f46d7?.['get'](_0x422a59)??_0x422a59,_0x1f3501={'name':_0x1750f6[_0x283ff1(0x1b8)],'connection':_0xee5a54};_0x1750f6[_0x283ff1(0x219)]&&(_0x1f3501[_0x283ff1(0x219)]=_0x1750f6['description']);let _0x4f97e0=[];_0x1750f6['columns']&&_0x1750f6[_0x283ff1(0x203)][_0x283ff1(0x1b3)]>0x0&&(_0x4f97e0=_0x1750f6[_0x283ff1(0x203)][_0x283ff1(0x1ee)](_0x4c8c5c=>_0x4c8c5c&&_0x4c8c5c['name'])[_0x283ff1(0x1ea)](_0x4318d9=>{const _0x59c583=_0x283ff1;if(_0x4318d9[_0x59c583(0x1ec)]||_0x4318d9['visibility'])return{'name':_0x4318d9['name'],..._0x4318d9[_0x59c583(0x1ec)]&&{'type':_0x4318d9[_0x59c583(0x1ec)]},..._0x4318d9[_0x59c583(0x1ab)]&&{'visibility':_0x4318d9[_0x59c583(0x1ab)]}};return _0x4318d9[_0x59c583(0x1b8)];}));_0x4f97e0['length']>0x0&&(_0x1f3501[_0x283ff1(0x203)]=_0x4f97e0);_0x1750f6[_0x283ff1(0x20c)]!==undefined&&(_0x1750f6[_0x283ff1(0x20c)]===![]&&_0x4f97e0['length']===0x0?_0x1f3501['all_columns']=!![]:_0x1f3501[_0x283ff1(0x22a)]=_0x1750f6[_0x283ff1(0x20c)]);const _0x15cceb={};let _0x5c9331=![];_0x1750f6[_0x283ff1(0x221)]&&(_0x15cceb['type']=_0x1750f6[_0x283ff1(0x221)],_0x5c9331=!![]);_0x1750f6[_0x283ff1(0x229)]&&(_0x15cceb[_0x283ff1(0x1fb)]=_0x1750f6[_0x283ff1(0x229)],_0x5c9331=!![]);_0x1750f6[_0x283ff1(0x22c)]!==undefined&&_0x1750f6[_0x283ff1(0x22c)]!==null&&(_0x15cceb['repeat_frequency']=_0x1750f6[_0x283ff1(0x22c)],_0x5c9331=!![]);_0x1750f6[_0x283ff1(0x1d1)]&&_0x1750f6[_0x283ff1(0x1d1)][_0x283ff1(0x1b3)]>0x0&&(_0x15cceb[_0x283ff1(0x1b6)]=_0x1750f6[_0x283ff1(0x1d1)],_0x5c9331=!![]);_0x1750f6[_0x283ff1(0x1c5)]!==undefined&&(_0x15cceb[_0x283ff1(0x210)]=_0x1750f6['startAt'],_0x5c9331=!![]);_0x1750f6[_0x283ff1(0x200)]!==undefined&&(_0x15cceb[_0x283ff1(0x1a2)]=_0x1750f6[_0x283ff1(0x200)],_0x5c9331=!![]);_0x1750f6[_0x283ff1(0x1e7)]&&(_0x15cceb[_0x283ff1(0x1e7)]=_0x1750f6['timezone'],_0x5c9331=!![]);_0x5c9331&&(_0x1f3501[_0x283ff1(0x1b2)]=_0x15cceb);(_0x1750f6[_0x283ff1(0x22d)]&&_0x1750f6[_0x283ff1(0x22d)][_0x283ff1(0x1b3)]>0x0||_0x1750f6['emailRecipients']&&_0x1750f6[_0x283ff1(0x206)][_0x283ff1(0x1b3)]>0x0)&&(_0x1f3501[_0x283ff1(0x1a3)]={},_0x1750f6[_0x283ff1(0x22d)]&&_0x1750f6[_0x283ff1(0x22d)][_0x283ff1(0x1b3)]>0x0&&(_0x1f3501[_0x283ff1(0x1a3)][_0x283ff1(0x1bb)]=_0x1750f6['notifyOn']),_0x1750f6[_0x283ff1(0x206)]&&_0x1750f6[_0x283ff1(0x206)][_0x283ff1(0x1b3)]>0x0&&(_0x1f3501[_0x283ff1(0x1a3)][_0x283ff1(0x1cb)]=_0x1750f6[_0x283ff1(0x206)][_0x283ff1(0x1ea)](_0x5211c8=>{const _0x50efa6=_0x283ff1,_0x54db8f=_0x3b289a?.[_0x50efa6(0x1e6)](_0x5211c8);return _0x54db8f??String(_0x5211c8);})));_0x1750f6[_0x283ff1(0x1d0)]&&Object[_0x283ff1(0x1ad)](_0x1750f6[_0x283ff1(0x1d0)])[_0x283ff1(0x1b3)]>0x0&&(_0x1f3501[_0x283ff1(0x1a7)]=normalizeConnectorConfigForYaml(_0x1750f6[_0x283ff1(0x1d0)]));_0x1750f6[_0x283ff1(0x1ac)]&&(_0x1f3501[_0x283ff1(0x1d9)]=_0x1750f6[_0x283ff1(0x1ac)]);if(_0x1750f6[_0x283ff1(0x20d)]){const _0xc7096e={},_0xd1a7e7=_0x1750f6['syndicationBehavior'];_0xd1a7e7[_0x283ff1(0x203)]&&_0xd1a7e7[_0x283ff1(0x203)][_0x283ff1(0x1b3)]>0x0&&(_0xc7096e[_0x283ff1(0x203)]=_0xd1a7e7[_0x283ff1(0x203)][_0x283ff1(0x1ee)](_0x20b0a5=>_0x20b0a5&&_0x20b0a5[_0x283ff1(0x1b8)])[_0x283ff1(0x1ea)](_0x49d0b4=>({'name':_0x49d0b4[_0x283ff1(0x1b8)],..._0x49d0b4[_0x283ff1(0x1ec)]&&{'type':_0x49d0b4[_0x283ff1(0x1ec)]},..._0x49d0b4['visibility']&&{'visibility':_0x49d0b4['visibility']}}))),_0xd1a7e7[_0x283ff1(0x1e5)]&&(_0xc7096e[_0x283ff1(0x1fe)]=_0xd1a7e7[_0x283ff1(0x1e5)]),_0xd1a7e7[_0x283ff1(0x213)]!==undefined&&(_0xc7096e['join_row']=_0xd1a7e7['joinRow']),_0xd1a7e7[_0x283ff1(0x1a6)]&&(_0xc7096e[_0x283ff1(0x1e0)]=_0xd1a7e7[_0x283ff1(0x1a6)]),_0xd1a7e7[_0x283ff1(0x21b)]&&(_0xc7096e[_0x283ff1(0x21b)]=_0xd1a7e7['formatting']),_0xd1a7e7[_0x283ff1(0x208)]&&_0xd1a7e7[_0x283ff1(0x208)][_0x283ff1(0x1b3)]>0x0&&(_0xc7096e['order_by']=_0xd1a7e7[_0x283ff1(0x208)]),Object['keys'](_0xc7096e)['length']>0x0&&(_0x1f3501['behavior']=_0xc7096e);}return _0x1f3501;}export function journeyActivationStepToYaml(_0x482144,_0x104bde,_0x26183a){const _0x50ae60=a92_0x58af3c,_0x4cc165=_0x482144['attributes']['activationParams'],_0x4de7a0=_0x4cc165[_0x50ae60(0x220)]||'',_0x2c4fde=_0x26183a?.[_0x50ae60(0x1e6)](_0x4de7a0)??_0x4de7a0,_0x1f3790={'name':_0x4cc165[_0x50ae60(0x1b8)]||'','connection':_0x2c4fde};_0x4cc165[_0x50ae60(0x219)]&&(_0x1f3790[_0x50ae60(0x219)]=_0x4cc165[_0x50ae60(0x219)]);let _0x360aae=[];_0x4cc165[_0x50ae60(0x203)]&&_0x4cc165[_0x50ae60(0x203)][_0x50ae60(0x1b3)]>0x0&&(_0x360aae=_0x4cc165['columns'][_0x50ae60(0x1ee)](_0x37a0e9=>_0x37a0e9&&_0x37a0e9['name'])['map'](_0x18c5bf=>{const _0xa84472=_0x50ae60;if(_0x18c5bf['type']||_0x18c5bf[_0xa84472(0x1ab)])return{'name':_0x18c5bf['name'],..._0x18c5bf[_0xa84472(0x1ec)]&&{'type':_0x18c5bf[_0xa84472(0x1ec)]},..._0x18c5bf[_0xa84472(0x1ab)]&&{'visibility':_0x18c5bf[_0xa84472(0x1ab)]}};return _0x18c5bf['name'];}));_0x360aae['length']>0x0&&(_0x1f3790[_0x50ae60(0x203)]=_0x360aae);_0x4cc165['allColumns']!==undefined&&(_0x4cc165[_0x50ae60(0x20c)]===![]&&_0x360aae[_0x50ae60(0x1b3)]===0x0?_0x1f3790['all_columns']=!![]:_0x1f3790[_0x50ae60(0x22a)]=_0x4cc165['allColumns']);const _0x1c0cfa={};let _0x22bb60=![];_0x4cc165[_0x50ae60(0x221)]&&(_0x1c0cfa[_0x50ae60(0x1ec)]=_0x4cc165[_0x50ae60(0x221)],_0x22bb60=!![]);_0x4cc165[_0x50ae60(0x229)]&&(_0x1c0cfa[_0x50ae60(0x1fb)]=_0x4cc165['repeatUnit'],_0x22bb60=!![]);_0x4cc165[_0x50ae60(0x22c)]!==undefined&&_0x4cc165[_0x50ae60(0x22c)]!==null&&(_0x1c0cfa['repeat_frequency']=_0x4cc165['repeatFrequency'],_0x22bb60=!![]);_0x4cc165[_0x50ae60(0x1c5)]!==undefined&&(_0x1c0cfa[_0x50ae60(0x210)]=_0x4cc165[_0x50ae60(0x1c5)],_0x22bb60=!![]);_0x4cc165['endOn']!==undefined&&(_0x1c0cfa[_0x50ae60(0x1a2)]=_0x4cc165[_0x50ae60(0x200)],_0x22bb60=!![]);_0x4cc165[_0x50ae60(0x1e7)]&&(_0x1c0cfa[_0x50ae60(0x1e7)]=_0x4cc165[_0x50ae60(0x1e7)],_0x22bb60=!![]);_0x22bb60&&(_0x1f3790[_0x50ae60(0x1b2)]=_0x1c0cfa);(_0x4cc165[_0x50ae60(0x22d)]&&_0x4cc165['notifyOn'][_0x50ae60(0x1b3)]>0x0||_0x4cc165[_0x50ae60(0x206)]&&_0x4cc165[_0x50ae60(0x206)]['length']>0x0)&&(_0x1f3790[_0x50ae60(0x1a3)]={},_0x4cc165[_0x50ae60(0x22d)]&&_0x4cc165[_0x50ae60(0x22d)][_0x50ae60(0x1b3)]>0x0&&(_0x1f3790[_0x50ae60(0x1a3)]['notify_on']=_0x4cc165['notifyOn']),_0x4cc165[_0x50ae60(0x206)]&&_0x4cc165[_0x50ae60(0x206)][_0x50ae60(0x1b3)]>0x0&&(_0x1f3790[_0x50ae60(0x1a3)][_0x50ae60(0x1cb)]=_0x4cc165['emailRecipients'][_0x50ae60(0x1ea)](_0x1e0081=>{const _0x2fe121=_0x50ae60,_0x50a516=_0x104bde?.[_0x2fe121(0x1e6)](_0x1e0081);return _0x50a516??String(_0x1e0081);})));_0x4cc165[_0x50ae60(0x1d0)]&&Object['keys'](_0x4cc165[_0x50ae60(0x1d0)])['length']>0x0&&(_0x1f3790['connector_config']=normalizeConnectorConfigForYaml(_0x4cc165[_0x50ae60(0x1d0)]));_0x4cc165[_0x50ae60(0x1ac)]&&(_0x1f3790[_0x50ae60(0x1d9)]=_0x4cc165['activationTemplateId']);if(_0x4cc165[_0x50ae60(0x20d)]){const _0x95e757={},_0x147b71=_0x4cc165['syndicationBehavior'];_0x147b71[_0x50ae60(0x203)]&&_0x147b71[_0x50ae60(0x203)][_0x50ae60(0x1b3)]>0x0&&(_0x95e757[_0x50ae60(0x203)]=_0x147b71[_0x50ae60(0x203)][_0x50ae60(0x1ee)](_0x2d3f37=>_0x2d3f37&&_0x2d3f37['name'])[_0x50ae60(0x1ea)](_0x58c7d5=>({'name':_0x58c7d5[_0x50ae60(0x1b8)],..._0x58c7d5[_0x50ae60(0x1ec)]&&{'type':_0x58c7d5['type']},..._0x58c7d5[_0x50ae60(0x1ab)]&&{'visibility':_0x58c7d5['visibility']}}))),_0x147b71[_0x50ae60(0x1e5)]&&(_0x95e757[_0x50ae60(0x1fe)]=_0x147b71[_0x50ae60(0x1e5)]),_0x147b71[_0x50ae60(0x213)]!==undefined&&(_0x95e757['join_row']=_0x147b71[_0x50ae60(0x213)]),_0x147b71[_0x50ae60(0x1a6)]&&(_0x95e757[_0x50ae60(0x1e0)]=_0x147b71[_0x50ae60(0x1a6)]),_0x147b71[_0x50ae60(0x21b)]&&(_0x95e757[_0x50ae60(0x21b)]=_0x147b71[_0x50ae60(0x21b)]),_0x147b71[_0x50ae60(0x208)]&&_0x147b71[_0x50ae60(0x208)][_0x50ae60(0x1b3)]>0x0&&(_0x95e757[_0x50ae60(0x1f3)]=_0x147b71['orderBy']),Object['keys'](_0x95e757)[_0x50ae60(0x1b3)]>0x0&&(_0x1f3790[_0x50ae60(0x212)]=_0x95e757);}return _0x1f3790;}export function segmentWithActivationsToYaml(_0x37010b,_0x1b0084,_0x1630e5,_0x11a87f,_0x4e4f8b){const _0xe36fb4=a92_0x58af3c,_0x281b07=segmentResponseToDefSync(_0x37010b,_0x1630e5);return _0x1b0084[_0xe36fb4(0x1b3)]>0x0&&(_0x281b07[_0xe36fb4(0x211)]=_0x1b0084[_0xe36fb4(0x1ea)](_0x2a2fd4=>activationResponseToDef(_0x2a2fd4,_0x11a87f,_0x4e4f8b))),_0x281b07;}function a92_0x2625(_0x3a7ab5,_0x243ccb){_0x3a7ab5=_0x3a7ab5-0x19f;const _0x3f3eb9=a92_0x3f3e();let _0x26254e=_0x3f3eb9[_0x3a7ab5];return _0x26254e;}function normalizeColumn(_0x400826){const _0x3fd6a3=a92_0x58af3c;if(typeof _0x400826===_0x3fd6a3(0x204))return{'name':_0x400826};return{'name':_0x400826[_0x3fd6a3(0x1b8)],..._0x400826[_0x3fd6a3(0x1ec)]&&{'type':_0x400826['type']},..._0x400826[_0x3fd6a3(0x1ab)]&&{'visibility':_0x400826['visibility']}};}export async function activationDefToCreateRequest(_0x321bc2,_0x54da5c){const _0xb31af5=a92_0x58af3c,_0x38a53a=_0x54da5c?.[_0xb31af5(0x20b)],_0x137499=_0x54da5c?.['connectionNameToIdMap'],_0x1be10f=_0x321bc2[_0xb31af5(0x20e)];let _0x3e47ee;const _0x4f982c=parseInt(_0x1be10f,0xa);if(!isNaN(_0x4f982c)&&String(_0x4f982c)===_0x1be10f)_0x3e47ee=_0x4f982c;else{const _0x1e0748=_0x137499?.[_0xb31af5(0x1e6)](_0x1be10f);if(_0x1e0748===undefined)throw new SDKError(ErrorCode['CONNECTION_NOT_FOUND'],_0xb31af5(0x1f1)+_0x1be10f,undefined,{'helpText':_0xb31af5(0x226)});_0x3e47ee=_0x1e0748;}const _0x158554={'name':_0x321bc2[_0xb31af5(0x1b8)],'connectionId':_0x3e47ee};_0x321bc2[_0xb31af5(0x219)]&&(_0x158554[_0xb31af5(0x219)]=_0x321bc2[_0xb31af5(0x219)]);let _0x455e6c=[];_0x321bc2[_0xb31af5(0x203)]&&_0x321bc2[_0xb31af5(0x203)][_0xb31af5(0x1b3)]>0x0&&(_0x455e6c=_0x321bc2[_0xb31af5(0x203)][_0xb31af5(0x1ee)](_0x36e655=>_0x36e655!=null)[_0xb31af5(0x1ea)](normalizeColumn));_0x455e6c[_0xb31af5(0x1b3)]>0x0&&(_0x158554[_0xb31af5(0x203)]=_0x455e6c);_0x321bc2['all_columns']!==undefined&&(_0x321bc2[_0xb31af5(0x22a)]===![]&&_0x455e6c[_0xb31af5(0x1b3)]===0x0?_0x158554['allColumns']=!![]:_0x158554['allColumns']=_0x321bc2[_0xb31af5(0x22a)]);if(_0x321bc2['schedule']){const _0x338a14=_0x321bc2['schedule'];_0x338a14['type']&&(_0x158554[_0xb31af5(0x221)]=_0x338a14['type']),_0x338a14[_0xb31af5(0x1fb)]&&(_0x158554['repeatUnit']=_0x338a14['repeat_unit']),_0x338a14[_0xb31af5(0x1ed)]!==undefined&&(_0x158554[_0xb31af5(0x22c)]=_0x338a14[_0xb31af5(0x1ed)]),_0x338a14[_0xb31af5(0x1b6)]&&(_0x158554[_0xb31af5(0x1d1)]=_0x338a14[_0xb31af5(0x1b6)]),_0x338a14['start_at']!==undefined&&(_0x158554[_0xb31af5(0x1c5)]=_0x338a14[_0xb31af5(0x210)]),_0x338a14[_0xb31af5(0x1a2)]!==undefined&&(_0x158554[_0xb31af5(0x200)]=_0x338a14['end_on']),_0x338a14[_0xb31af5(0x1e7)]&&(_0x158554[_0xb31af5(0x1e7)]=_0x338a14[_0xb31af5(0x1e7)]);}_0x321bc2[_0xb31af5(0x1a3)]&&(_0x321bc2[_0xb31af5(0x1a3)][_0xb31af5(0x1bb)]&&(_0x158554[_0xb31af5(0x22d)]=_0x321bc2['notification'][_0xb31af5(0x1bb)]),_0x321bc2['notification'][_0xb31af5(0x1cb)]&&(_0x158554[_0xb31af5(0x206)]=_0x321bc2[_0xb31af5(0x1a3)][_0xb31af5(0x1cb)][_0xb31af5(0x1ea)](_0x1a04c6=>{const _0x13994d=_0xb31af5,_0x1829ca=Number(_0x1a04c6);if(!isNaN(_0x1829ca)&&String(_0x1829ca)===_0x1a04c6)return _0x1829ca;const _0x113199=_0x38a53a?.['get'](_0x1a04c6[_0x13994d(0x1c3)]());if(_0x113199===undefined)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x13994d(0x207)+_0x1a04c6+_0x13994d(0x1a4));return _0x113199;})));if(_0x321bc2[_0xb31af5(0x1a7)]){const _0x1e950d=_0x54da5c?.[_0xb31af5(0x1db)]?.[_0xb31af5(0x1e6)](_0x1be10f);if(_0x1e950d&&_0x54da5c?.[_0xb31af5(0x1c7)])try{const _0xe72ba5=await _0x54da5c['getSchema'](_0x1e950d),_0xdca639=validateConnectorConfig(_0x321bc2[_0xb31af5(0x1a7)],_0xe72ba5);if(!_0xdca639[_0xb31af5(0x1ef)])throw new SDKError(ErrorCode[_0xb31af5(0x21e)],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x321bc2[_0xb31af5(0x1b8)]+_0xb31af5(0x1c4)+formatValidationErrors(_0xdca639[_0xb31af5(0x1d3)]),undefined,{'helpText':_0xb31af5(0x1be)+_0x1e950d+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0xe72ba5)});if(_0xdca639['warnings']['length']>0x0){const _0x34394a=formatValidationWarnings(_0xdca639[_0xb31af5(0x1cd)]);console[_0xb31af5(0x1c2)]('connector_config\x20for\x20activation\x20\x22'+_0x321bc2[_0xb31af5(0x1b8)]+_0xb31af5(0x1c4)+_0x34394a);}_0x158554[_0xb31af5(0x1d0)]=transformConfigToLegacy(_0x321bc2[_0xb31af5(0x1a7)],_0xe72ba5);}catch(_0x2f7804){if(_0x2f7804 instanceof SDKError&&_0x2f7804[_0xb31af5(0x1a8)]===ErrorCode[_0xb31af5(0x1f4)])_0x158554[_0xb31af5(0x1d0)]=_0x321bc2[_0xb31af5(0x1a7)];else throw _0x2f7804;}else _0x158554[_0xb31af5(0x1d0)]=_0x321bc2['connector_config'];}_0x321bc2[_0xb31af5(0x1d9)]!==undefined&&(_0x158554[_0xb31af5(0x1ac)]=_0x321bc2['activation_template_id']);if(_0x321bc2[_0xb31af5(0x212)]){const _0x39083e=_0x321bc2[_0xb31af5(0x212)],_0x2f226d={};if(_0x39083e[_0xb31af5(0x203)]&&_0x39083e['columns'][_0xb31af5(0x1b3)]>0x0){const _0x43bc38=_0x39083e[_0xb31af5(0x203)][_0xb31af5(0x1ee)](_0x4dc492=>_0x4dc492&&_0x4dc492[_0xb31af5(0x1b8)]);_0x43bc38['length']>0x0&&(_0x2f226d[_0xb31af5(0x203)]=_0x43bc38);}_0x39083e[_0xb31af5(0x1fe)]&&(_0x2f226d[_0xb31af5(0x1e5)]=_0x39083e[_0xb31af5(0x1fe)]),_0x39083e[_0xb31af5(0x228)]!==undefined&&(_0x2f226d[_0xb31af5(0x213)]=_0x39083e['join_row']),_0x39083e['join_strategy']&&(_0x2f226d[_0xb31af5(0x1a6)]=_0x39083e['join_strategy']),_0x39083e[_0xb31af5(0x21b)]&&(_0x2f226d[_0xb31af5(0x21b)]=_0x39083e[_0xb31af5(0x21b)]),_0x39083e[_0xb31af5(0x1f3)]&&(_0x2f226d[_0xb31af5(0x208)]=_0x39083e[_0xb31af5(0x1f3)]),_0x158554[_0xb31af5(0x20d)]=_0x2f226d;}return _0x158554;}export async function activationDefToUpdateRequest(_0x4b58f7,_0x3d32ee){return activationDefToCreateRequest(_0x4b58f7,_0x3d32ee);}function a92_0x3f3e(){const _0x142825=['7KkBLuD','rightValue','set','].attribute\x20cannot\x20be\x20empty.\x0a','repeat_unit','unit','stringify','behavior_table','3445XQvvFB','endOn','values','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','columns','string','groupingColumns','emailRecipients','Unknown\x20email\x20recipient:\x20','orderBy','from','object','emailToIdMap','allColumns','syndicationBehavior','connection','max','start_at','activations','behavior','joinRow','test','rightValues','arrayMatching','min','usedNames','description','limit','formatting','value','conditions[','CONNECTOR_INVALID_CONFIG','conditions','connectionId','scheduleType','And','TimeWithinNext','__UNRESOLVED__','isVisible','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','leftValue','join_row','repeatUnit','all_columns','not','repeatFrequency','notifyOn','__SEGMENT_REF__','kind','any','parse','8yFfdQl','Please\x20specify\x20a\x20valid\x20attribute\x20name.','batch','end_on','notification','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','localeCompare','joinStrategy','connector_config','code','attribute','6421400pAfZwr','visibility','activationTemplateId','keys','sort','621944WSUTjw','all','activations:','schedule','length','ruleHashToName','824350WIuxKE','repeat_sub_frequency','4476213JASPwD','name','segmentFolderId','realtime','notify_on','attribute_name','segment','Connector:\x20','32280hOvUoq','localRuleToName','every','warn','toLowerCase','\x22:\x0a','startAt','New\x20Segment','getSchema','add','rule','aggregation','email_recipients','duration','warnings','\x27:\x20','TimeWithinPast','connectorConfig','repeatSubFrequency','visible','errors','entries','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','exclude','has','Reference','activation_template_id','8OYKYRW','connectionNameToTypeMap','null','Value','push','270007QgMSqu','join_strategy','3DfcJbb','7550016JvlCTs','143LZufoh','funnel_stage','behaviorTableName','get','timezone','operator','include','map','Segment\x20description','type','repeat_frequency','filter','valid','rule:','Unknown\x20connection:\x20','source','order_by','CONNECTOR_SCHEMA_NOT_FOUND','replace','isArray'];a92_0x3f3e=function(){return _0x142825;};return a92_0x3f3e();}export function deepSortObject(_0x5571cc){const _0x2e17c9=a92_0x58af3c;if(_0x5571cc===null||typeof _0x5571cc!==_0x2e17c9(0x20a))return _0x5571cc;if(Array[_0x2e17c9(0x1f6)](_0x5571cc))return _0x5571cc[_0x2e17c9(0x1ea)](deepSortObject)[_0x2e17c9(0x1ae)]((_0x349230,_0x2472e5)=>JSON[_0x2e17c9(0x1fd)](_0x349230)[_0x2e17c9(0x1a5)](JSON[_0x2e17c9(0x1fd)](_0x2472e5)));const _0x304b70={};for(const _0x32498e of Object['keys'](_0x5571cc)['sort']()){_0x304b70[_0x32498e]=deepSortObject(_0x5571cc[_0x32498e]);}return _0x304b70;}export function serializeRule(_0x4c0065){return JSON['stringify'](deepSortObject(_0x4c0065));}export function normalizeRuleForMatching(_0x49014a){return normalizeConditionsForMatching(_0x49014a);}function normalizeConditionsForMatching(_0x1194c4){const _0x458a18=a92_0x58af3c;if(_0x1194c4===null||typeof _0x1194c4!==_0x458a18(0x20a))return _0x1194c4;if(Array['isArray'](_0x1194c4))return _0x1194c4[_0x458a18(0x1ea)](normalizeConditionsForMatching);const _0x1c9144=_0x1194c4;if((_0x1c9144[_0x458a18(0x1ec)]===_0x458a18(0x1e9)||_0x1c9144[_0x458a18(0x1ec)]===_0x458a18(0x1d6))&&typeof _0x1c9144[_0x458a18(0x1bd)]==='string')return{..._0x1c9144,'segment':_0x458a18(0x22e)};const _0x54cdcb={};for(const _0x514f1a of Object['keys'](_0x1c9144)){_0x54cdcb[_0x514f1a]=normalizeConditionsForMatching(_0x1c9144[_0x514f1a]);}return _0x54cdcb;}export function serializeRuleForMatching(_0x1581f4){return JSON['stringify'](deepSortObject(normalizeRuleForMatching(_0x1581f4)));}export function expandSegmentReferences(_0x7bed6f,_0x31b378,_0x41c61b=new Set()){return expandConditions(_0x7bed6f,_0x31b378,_0x41c61b);}function expandConditions(_0x52a4ed,_0x26b729,_0x34a7d1){const _0x557da8=a92_0x58af3c;if(_0x52a4ed===null||typeof _0x52a4ed!=='object')return _0x52a4ed;if(Array[_0x557da8(0x1f6)](_0x52a4ed))return _0x52a4ed['map'](_0x435a91=>expandConditions(_0x435a91,_0x26b729,_0x34a7d1));const _0x433e08=_0x52a4ed;if((_0x433e08[_0x557da8(0x1ec)]===_0x557da8(0x1e9)||_0x433e08[_0x557da8(0x1ec)]===_0x557da8(0x1d6))&&typeof _0x433e08['segment']===_0x557da8(0x204)){const _0x830d3f=_0x433e08['segment'],_0xe61461=_0x26b729[_0x557da8(0x1e6)](_0x830d3f);if(_0xe61461&&!_0x34a7d1[_0x557da8(0x1d7)](_0x830d3f)){const _0x31f215=new Set(_0x34a7d1);_0x31f215[_0x557da8(0x1c8)](_0x830d3f);const _0x5abbf7=expandConditions(_0xe61461,_0x26b729,_0x31f215);return{'type':_0x433e08[_0x557da8(0x1ec)],'expanded_rule':_0x5abbf7};}return{'type':_0x433e08[_0x557da8(0x1ec)],'expanded_rule':_0x557da8(0x224)};}const _0x2e2b96={};for(const _0x320e1e of Object[_0x557da8(0x1ad)](_0x433e08)){_0x2e2b96[_0x320e1e]=expandConditions(_0x433e08[_0x320e1e],_0x26b729,_0x34a7d1);}return _0x2e2b96;}export function serializeExpandedRule(_0x1ad444,_0x209f41){const _0x59ce69=a92_0x58af3c,_0x41f499=expandSegmentReferences(_0x1ad444,_0x209f41);return JSON[_0x59ce69(0x1fd)](deepSortObject(_0x41f499));}export function createSegmentNameContext(_0xf4cdbe){const _0x13a3c2=a92_0x58af3c,_0x43230b=new Set(),_0xa7a106=new Map(),_0x53d799=new Map();if(_0xf4cdbe)for(const [_0x211603,_0x2f962e]of Object[_0x13a3c2(0x1d4)](_0xf4cdbe)){if(_0x2f962e[_0x13a3c2(0x1c9)]){const _0x440106=serializeRule(_0x2f962e['rule']);_0x53d799[_0x13a3c2(0x1f9)](_0x440106,_0x211603),_0x43230b[_0x13a3c2(0x1c8)](_0x211603);}}return{'usedNames':_0x43230b,'ruleHashToName':_0xa7a106,'localRuleToName':_0xf4cdbe?_0x53d799:undefined};}export function resolveSegmentName(_0x22ccfd,_0x203931,_0x34f703,_0xb540cf){const _0x548be7=a92_0x58af3c,_0x35b8bd=serializeRule(_0x203931);if(_0x34f703['localRuleToName']){const _0x575db9=_0x34f703[_0x548be7(0x1c0)][_0x548be7(0x1e6)](_0x35b8bd);if(_0x575db9)return{'name':_0x575db9,'isDuplicate':![],'isLocalMatch':!![]};}const _0x1213dc=_0x34f703['ruleHashToName'][_0x548be7(0x1e6)](_0x35b8bd);if(_0x1213dc)return{'name':_0x1213dc,'isDuplicate':!![],'isLocalMatch':![]};const _0x1916d4=_0xb540cf(_0x22ccfd);let _0x446627=_0x1916d4||_0x22ccfd,_0x380768=_0x446627,_0x4b2548=0x2;while(_0x34f703[_0x548be7(0x218)]['has'](_0x380768)){_0x380768=_0x446627+'_'+_0x4b2548,_0x4b2548++;}return _0x34f703[_0x548be7(0x218)]['add'](_0x380768),_0x34f703[_0x548be7(0x1b4)]['set'](_0x35b8bd,_0x380768),{'name':_0x380768,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x31f333){const _0x263e69=[],_0x43c095=_0x494f01=>{const _0x3e91e1=a92_0x2625;if(!_0x494f01||typeof _0x494f01!==_0x3e91e1(0x20a))return;if(Array[_0x3e91e1(0x1f6)](_0x494f01)){_0x494f01['forEach'](_0x43c095);return;}const _0x1e6df9=_0x494f01;(_0x1e6df9[_0x3e91e1(0x1ec)]===_0x3e91e1(0x1e9)||_0x1e6df9[_0x3e91e1(0x1ec)]===_0x3e91e1(0x1d6))&&typeof _0x1e6df9[_0x3e91e1(0x1bd)]==='string'&&_0x263e69[_0x3e91e1(0x1de)](_0x1e6df9['segment']);for(const _0x75f9d2 of Object['values'](_0x1e6df9)){_0x43c095(_0x75f9d2);}};return _0x43c095(_0x31f333),_0x263e69;}export function validateSegmentRule(_0x4d1ce9,_0x5e4d02){const _0x48bab8=a92_0x58af3c;if(!_0x5e4d02||!_0x5e4d02['conditions'])return;for(let _0x518722=0x0;_0x518722<_0x5e4d02[_0x48bab8(0x21f)][_0x48bab8(0x1b3)];_0x518722++){const _0xdd9ee9=_0x5e4d02[_0x48bab8(0x21f)][_0x518722];if(_0x48bab8(0x1ec)in _0xdd9ee9&&_0xdd9ee9[_0x48bab8(0x1ec)]===_0x48bab8(0x1dd)){const _0x110a4f=_0xdd9ee9;if(!_0x110a4f[_0x48bab8(0x1a9)]||_0x110a4f['attribute']==='')throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x48bab8(0x202)+_0x4d1ce9+_0x48bab8(0x1ce)+(_0x48bab8(0x21d)+_0x518722+_0x48bab8(0x1fa))+_0x48bab8(0x1a0));}}}
|
|
1
|
+
(function(_0x254cd4,_0x3b118f){const _0x2af413=a92_0x1e89,_0x3e57e0=_0x254cd4();while(!![]){try{const _0x140a0d=parseInt(_0x2af413(0x116))/0x1+-parseInt(_0x2af413(0x154))/0x2+-parseInt(_0x2af413(0x102))/0x3*(-parseInt(_0x2af413(0x185))/0x4)+-parseInt(_0x2af413(0x17e))/0x5*(-parseInt(_0x2af413(0x141))/0x6)+parseInt(_0x2af413(0x16a))/0x7*(parseInt(_0x2af413(0x183))/0x8)+parseInt(_0x2af413(0x138))/0x9*(parseInt(_0x2af413(0x123))/0xa)+-parseInt(_0x2af413(0x155))/0xb;if(_0x140a0d===_0x3b118f)break;else _0x3e57e0['push'](_0x3e57e0['shift']());}catch(_0x3759ed){_0x3e57e0['push'](_0x3e57e0['shift']());}}}(a92_0x1513,0xc5a80));import*as a92_0x1faf5d from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x1958c9,_0x500768){const _0x199541=a92_0x1e89,_0x2f0dab=_0x1958c9[_0x199541(0x17c)]&&_0x199541(0x152)in _0x1958c9[_0x199541(0x17c)]&&_0x1958c9[_0x199541(0x17c)][_0x199541(0x152)];return{'type':_0x199541(0x167),'name':_0x1958c9['name'],..._0x1958c9[_0x199541(0x110)]&&{'description':_0x1958c9['description']},..._0x500768&&{'folder':_0x500768},..._0x2f0dab&&{'rule':apiRuleToYaml(_0x1958c9[_0x199541(0x17c)])},..._0x1958c9[_0x199541(0x11b)]!==undefined&&{'kind':_0x1958c9['kind']===0x0?_0x199541(0x148):_0x1958c9[_0x199541(0x11b)]===0x1?_0x199541(0x113):'funnel_stage'},..._0x1958c9[_0x199541(0x151)]!==undefined&&{'visible':_0x1958c9[_0x199541(0x151)]}};}export async function segmentResponseToDef(_0x4db747,_0x16a2df,_0x1a5a63){const _0x4ca79d=a92_0x1e89,_0x1212cf=segmentResponseToDefSync(_0x4db747,_0x1a5a63);if(!_0x16a2df||!_0x16a2df[_0x4ca79d(0x16d)])return _0x1212cf;return _0x1212cf['rule']&&(_0x1212cf[_0x4ca79d(0x17c)]=await resolveRuleSegmentRefs(_0x1212cf[_0x4ca79d(0x17c)],_0x16a2df[_0x4ca79d(0x16d)])),_0x1212cf;}export function apiRuleToYaml(_0x46a384){const _0x2734b0=a92_0x1e89,_0x5023e2=(_0x46a384[_0x2734b0(0x120)]||[])[_0x2734b0(0x10d)](apiConditionToYaml);if(_0x5023e2[_0x2734b0(0x101)]===0x1&&!_0x46a384[_0x2734b0(0x110)]&&_0x2734b0(0x152)in _0x5023e2[0x0]&&(_0x5023e2[0x0][_0x2734b0(0x152)]===_0x2734b0(0x172)||_0x5023e2[0x0][_0x2734b0(0x152)]==='Or')){const _0x168c51=_0x5023e2[0x0];if(_0x168c51[_0x2734b0(0x152)]===_0x46a384[_0x2734b0(0x152)]&&_0x168c51[_0x2734b0(0x120)])return{'type':_0x46a384['type'],'conditions':_0x168c51[_0x2734b0(0x120)],..._0x168c51[_0x2734b0(0x110)]&&{'description':_0x168c51['description']}};}return{'type':_0x46a384[_0x2734b0(0x152)],'conditions':_0x5023e2,..._0x46a384[_0x2734b0(0x110)]&&{'description':_0x46a384[_0x2734b0(0x110)]}};}export async function resolveRuleSegmentRefs(_0x49d9cf,_0xcb7684){const _0x210ec0=a92_0x1e89,_0x5a5b8b=await Promise['all'](_0x49d9cf[_0x210ec0(0x120)][_0x210ec0(0x10d)](_0x4a1f4e=>resolveConditionSegmentRefs(_0x4a1f4e,_0xcb7684)));return{..._0x49d9cf,'conditions':_0x5a5b8b};}async function resolveConditionSegmentRefs(_0x4c6674,_0x3cc804){const _0x21df95=a92_0x1e89;if('segment'in _0x4c6674&&(_0x4c6674[_0x21df95(0x152)]===_0x21df95(0x186)||_0x4c6674[_0x21df95(0x152)]===_0x21df95(0x17d))){const _0x24a451=_0x4c6674;if(/^\d+$/[_0x21df95(0x15f)](_0x24a451[_0x21df95(0x167)])){const _0x41db28=await _0x3cc804(_0x24a451[_0x21df95(0x167)]);return{..._0x24a451,'segment':_0x41db28};}return _0x4c6674;}if(_0x21df95(0x120)in _0x4c6674&&_0x4c6674[_0x21df95(0x120)]){const _0x57547e=_0x4c6674,_0x175fc9=await Promise['all'](_0x57547e['conditions'][_0x21df95(0x10d)](_0x2c526b=>resolveConditionSegmentRefs(_0x2c526b,_0x3cc804)));return{..._0x57547e,'conditions':_0x175fc9};}if(_0x21df95(0x181)in _0x4c6674&&_0x4c6674['filter']){const _0x3ace1c=_0x4c6674,_0x2b3534=await resolveRuleSegmentRefs(_0x3ace1c['filter'],_0x3cc804);return{..._0x3ace1c,'filter':_0x2b3534};}return _0x4c6674;}export async function resolveRuleSegmentIds(_0x4ae7ff,_0x1c0f16){const _0x382523=a92_0x1e89,_0x258914=await Promise[_0x382523(0x143)](_0x4ae7ff[_0x382523(0x120)][_0x382523(0x10d)](_0x5c3c3d=>resolveConditionSegmentIds(_0x5c3c3d,_0x1c0f16)));return{..._0x4ae7ff,'conditions':_0x258914};}async function resolveConditionSegmentIds(_0x251f8e,_0x4985b3){const _0x14d079=a92_0x1e89;if(_0x14d079(0x167)in _0x251f8e&&(_0x251f8e[_0x14d079(0x152)]===_0x14d079(0x186)||_0x251f8e[_0x14d079(0x152)]==='exclude')){const _0x2863bb=_0x251f8e;if(!/^\d+$/['test'](_0x2863bb['segment'])){const _0x3b2f22=await _0x4985b3(_0x2863bb[_0x14d079(0x167)]);return{..._0x2863bb,'segment':_0x3b2f22};}return _0x251f8e;}if(_0x14d079(0x120)in _0x251f8e&&_0x251f8e[_0x14d079(0x120)]){const _0x4efebb=_0x251f8e,_0x488b2b=await Promise[_0x14d079(0x143)](_0x4efebb[_0x14d079(0x120)][_0x14d079(0x10d)](_0x52c073=>resolveConditionSegmentIds(_0x52c073,_0x4985b3)));return{..._0x4efebb,'conditions':_0x488b2b};}if(_0x14d079(0x181)in _0x251f8e&&_0x251f8e[_0x14d079(0x181)]){const _0x580ec0=_0x251f8e,_0x500f58=await resolveRuleSegmentIds(_0x580ec0[_0x14d079(0x181)],_0x4985b3);return{..._0x580ec0,'filter':_0x500f58};}return _0x251f8e;}function apiConditionToYaml(_0x390a94){const _0x5be13c=a92_0x1e89;if(_0x390a94[_0x5be13c(0x152)]===_0x5be13c(0x172)||_0x390a94[_0x5be13c(0x152)]==='Or'){if(_0x390a94[_0x5be13c(0x120)]){const _0x10bfab=_0x390a94['conditions'][_0x5be13c(0x10d)](apiConditionToYaml);if(_0x10bfab[_0x5be13c(0x101)]===0x1&&!_0x390a94[_0x5be13c(0x110)])return _0x10bfab[0x0];return{'type':_0x390a94[_0x5be13c(0x152)],'conditions':_0x10bfab,..._0x390a94[_0x5be13c(0x110)]&&{'description':_0x390a94[_0x5be13c(0x110)]}};}}if(_0x390a94[_0x5be13c(0x152)]===_0x5be13c(0x12f)&&_0x390a94['leftValue']&&_0x390a94[_0x5be13c(0x11e)]){const _0x38bd3b=_0x390a94['leftValue'][_0x5be13c(0x140)]?{'type':_0x390a94['leftValue'][_0x5be13c(0x140)][_0x5be13c(0x152)],..._0x390a94['leftValue'][_0x5be13c(0x140)][_0x5be13c(0x13b)]&&{'groupingColumns':_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x140)][_0x5be13c(0x13b)]}}:undefined;return{'type':_0x5be13c(0x12f),'attribute':_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x170)]||'','operator':apiOperatorToYaml(_0x390a94[_0x5be13c(0x11e)]),..._0x390a94[_0x5be13c(0x104)]&&_0x390a94[_0x5be13c(0x104)]!==_0x5be13c(0x106)?{'arrayMatching':_0x390a94[_0x5be13c(0x104)]}:{},..._0x390a94['exclude']?{'exclude':_0x390a94[_0x5be13c(0x17d)]}:{},..._0x38bd3b?{'aggregation':_0x38bd3b}:{},..._0x390a94[_0x5be13c(0x176)]['source']?{'source':_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x108)][_0x5be13c(0x170)]}:{},..._0x390a94['leftValue']['filter']?{'filter':apiRuleToYaml(_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x181)])}:{},..._0x390a94[_0x5be13c(0x14b)]!==undefined&&_0x390a94[_0x5be13c(0x14b)]!==null?{'limit':_0x390a94[_0x5be13c(0x14b)]}:{}};}if(_0x390a94[_0x5be13c(0x152)]===_0x5be13c(0x134)&&_0x390a94['id'])return{'type':_0x390a94[_0x5be13c(0x17d)]?_0x5be13c(0x17d):_0x5be13c(0x186),'segment':_0x390a94['id']};return{'type':_0x5be13c(0x172),'conditions':[]};}function isTemporalOperator(_0x1b335d){const _0x4d6297=a92_0x1e89;return _0x1b335d===_0x4d6297(0x157)||_0x1b335d===_0x4d6297(0x145);}function getEffectiveValue(_0x4c9991){const _0xa84253=a92_0x1e89,_0x121116=_0x4c9991[_0xa84253(0x142)];return _0x4c9991['value']??_0x121116;}function apiOperatorToYaml(_0xce6e74){const _0x438584=a92_0x1e89;let _0x4d0413;if(_0xce6e74[_0x438584(0x18a)]&&_0xce6e74[_0x438584(0x18a)][_0x438584(0x101)]>0x0)_0x4d0413=_0xce6e74['rightValues'];else{if(_0xce6e74[_0x438584(0x122)]!==undefined)_0x4d0413=_0xce6e74[_0x438584(0x122)];else isTemporalOperator(_0xce6e74[_0x438584(0x152)])&&_0xce6e74[_0x438584(0x17f)]!==undefined&&(_0x4d0413=_0xce6e74[_0x438584(0x17f)]);}return{'type':mapApiOperatorType(_0xce6e74[_0x438584(0x152)]),..._0xce6e74['not']&&{'not':_0xce6e74[_0x438584(0x136)]},..._0x4d0413!==undefined&&{'value':_0x4d0413},..._0xce6e74['unit']&&{'unit':_0xce6e74[_0x438584(0x18e)]}};}function mapApiOperatorType(_0x5af135){return _0x5af135;}export function segmentDefToCreateRequest(_0x3a7350,_0x4bbc6c){const _0x1999d2=a92_0x1e89,_0x134fb6={'name':_0x3a7350[_0x1999d2(0x170)]};return _0x3a7350[_0x1999d2(0x110)]&&(_0x134fb6[_0x1999d2(0x110)]=_0x3a7350[_0x1999d2(0x110)]),_0x3a7350[_0x1999d2(0x17c)]&&(_0x134fb6[_0x1999d2(0x17c)]=yamlRuleToApi(_0x3a7350[_0x1999d2(0x17c)])),_0x3a7350[_0x1999d2(0x11b)]&&(_0x134fb6['kind']=_0x3a7350[_0x1999d2(0x11b)]===_0x1999d2(0x148)?0x0:_0x3a7350['kind']===_0x1999d2(0x113)?0x1:0x2),_0x3a7350[_0x1999d2(0x112)]!==undefined&&(_0x134fb6[_0x1999d2(0x151)]=_0x3a7350[_0x1999d2(0x112)]),_0x4bbc6c&&(_0x134fb6['segmentFolderId']=_0x4bbc6c),_0x134fb6;}export function segmentDefToUpdateRequest(_0x2aa1d4){const _0x2d4e08=a92_0x1e89,_0x287550={'name':_0x2aa1d4[_0x2d4e08(0x170)]};return _0x2aa1d4['description']!==undefined&&(_0x287550['description']=_0x2aa1d4['description']),_0x2aa1d4[_0x2d4e08(0x17c)]&&(_0x287550[_0x2d4e08(0x17c)]=yamlRuleToApi(_0x2aa1d4[_0x2d4e08(0x17c)])),_0x2aa1d4['kind']&&(_0x287550['kind']=_0x2aa1d4[_0x2d4e08(0x11b)]==='batch'?0x0:_0x2aa1d4['kind']===_0x2d4e08(0x113)?0x1:0x2),_0x287550;}export function yamlRuleToApi(_0x483ac9,_0xb1bf10=![]){const _0x5f28a2=a92_0x1e89,_0x4fbead=_0x483ac9[_0x5f28a2(0x120)][_0x5f28a2(0x10d)](yamlConditionToApi);if(_0xb1bf10){const _0x1d8c76=_0x4fbead[_0x5f28a2(0x18b)](_0x2aaf8c=>_0x2aaf8c[_0x5f28a2(0x152)]===_0x5f28a2(0x172)||_0x2aaf8c[_0x5f28a2(0x152)]==='Or');if(!_0x1d8c76&&_0x4fbead[_0x5f28a2(0x101)]>0x0)return{'type':_0x483ac9[_0x5f28a2(0x152)],'conditions':[{'type':_0x5f28a2(0x172),'description':_0x483ac9['description']||'','conditions':_0x4fbead}]};}return{'type':_0x483ac9[_0x5f28a2(0x152)],'conditions':_0x4fbead,..._0x483ac9[_0x5f28a2(0x110)]&&{'description':_0x483ac9[_0x5f28a2(0x110)]}};}function yamlConditionToApi(_0x343882){const _0x2373cb=a92_0x1e89;if(_0x2373cb(0x167)in _0x343882&&(_0x343882['type']===_0x2373cb(0x186)||_0x343882['type']===_0x2373cb(0x17d))){const _0x23b317=_0x343882;return{'type':_0x2373cb(0x134),'id':_0x23b317[_0x2373cb(0x167)],'exclude':_0x23b317[_0x2373cb(0x152)]===_0x2373cb(0x17d)};}if(_0x2373cb(0x152)in _0x343882&&(_0x343882[_0x2373cb(0x152)]===_0x2373cb(0x172)||_0x343882['type']==='Or')){const _0x4d4137=_0x343882;return{'type':_0x4d4137[_0x2373cb(0x152)],'conditions':_0x4d4137[_0x2373cb(0x120)][_0x2373cb(0x10d)](yamlConditionToApi),..._0x4d4137[_0x2373cb(0x110)]&&{'description':_0x4d4137[_0x2373cb(0x110)]}};}const _0x2a6d89=_0x343882,_0x534449={'type':'Value','leftValue':buildLeftValue(_0x2a6d89),'operator':yamlOperatorToApi(_0x2a6d89[_0x2373cb(0x11e)]),'exclude':_0x2a6d89[_0x2373cb(0x17d)]??![],'arrayMatching':_0x2a6d89[_0x2373cb(0x104)]??'any'};return _0x2a6d89[_0x2373cb(0x14b)]!==undefined&&(_0x534449[_0x2373cb(0x14b)]=_0x2a6d89['limit']),_0x534449;}function buildLeftValue(_0x111319){const _0x568f74=a92_0x1e89,_0x49c3bb={'name':_0x111319['attribute']};return _0x111319[_0x568f74(0x140)]&&(_0x49c3bb[_0x568f74(0x140)]={'type':_0x111319['aggregation'][_0x568f74(0x152)],..._0x111319[_0x568f74(0x140)][_0x568f74(0x13b)]&&{'groupingColumns':_0x111319[_0x568f74(0x140)]['groupingColumns']}}),_0x111319[_0x568f74(0x108)]&&(_0x49c3bb[_0x568f74(0x108)]={'name':_0x111319[_0x568f74(0x108)]}),_0x111319[_0x568f74(0x181)]&&(_0x49c3bb['filter']=yamlRuleToApi(_0x111319[_0x568f74(0x181)])),_0x49c3bb;}function yamlOperatorToApi(_0x1d1dc6){const _0x3dbea4=a92_0x1e89,_0x5a9d26={'type':mapYamlOperatorType(_0x1d1dc6[_0x3dbea4(0x152)]),'not':_0x1d1dc6[_0x3dbea4(0x136)]??![]},_0x509ceb=getEffectiveValue(_0x1d1dc6);if(_0x509ceb!==undefined){if(Array[_0x3dbea4(0x189)](_0x509ceb))_0x5a9d26['rightValues']=_0x509ceb;else isTemporalOperator(_0x1d1dc6['type'])?_0x5a9d26[_0x3dbea4(0x17f)]=_0x509ceb:_0x5a9d26[_0x3dbea4(0x122)]=_0x509ceb;}return _0x1d1dc6[_0x3dbea4(0x18e)]&&(_0x5a9d26[_0x3dbea4(0x18e)]=_0x1d1dc6[_0x3dbea4(0x18e)]),_0x5a9d26;}function mapYamlOperatorType(_0x12b207){return _0x12b207;}export function toYamlString(_0x5670d4){const _0x32d3bd=a92_0x1e89,_0x5a851c=JSON[_0x32d3bd(0x17b)](JSON[_0x32d3bd(0x131)](_0x5670d4)),_0x1e7211=a92_0x1faf5d[_0x32d3bd(0x131)](_0x5a851c,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x32d3bd(0x10b)}),_0x456157=[_0x32d3bd(0x107)];let _0x274ab9=_0x1e7211;for(const _0x144dba of _0x456157){_0x274ab9=_0x274ab9[_0x32d3bd(0x132)](new RegExp('^('+_0x144dba+')','m'),(_0x4b3336,_0x265aaf,_0x5b8a42)=>{if(_0x5b8a42===0x0||_0x274ab9[_0x5b8a42-0x1]==='\x0a'&&_0x274ab9[_0x5b8a42-0x2]==='\x0a')return _0x265aaf;return'\x0a'+_0x265aaf;});}return _0x274ab9;}export function parseYamlString(_0x2c8179){const _0x3f65bf=a92_0x1e89,_0x594d53=a92_0x1faf5d['parse'](_0x2c8179);if(!_0x594d53['name'])throw new Error(_0x3f65bf(0x179));if(_0x594d53[_0x3f65bf(0x152)]&&_0x594d53[_0x3f65bf(0x152)]!=='segment')throw new Error(_0x3f65bf(0x10f)+_0x594d53[_0x3f65bf(0x152)]);return _0x594d53;}export function isSegmentYaml(_0x162411){const _0x1c78b4=a92_0x1e89;if(typeof _0x162411!==_0x1c78b4(0x144)||_0x162411===null)return![];const _0x46e12c=_0x162411;return _0x46e12c[_0x1c78b4(0x152)]===_0x1c78b4(0x167)||_0x46e12c[_0x1c78b4(0x152)]===undefined;}export function generateTemplate(_0x280c20='New\x20Segment'){const _0x547191=a92_0x1e89,_0x2b2ce7={'type':'segment','name':_0x280c20,'description':_0x547191(0x11a),'rule':{'type':_0x547191(0x172),'conditions':[{'type':_0x547191(0x12f),'attribute':_0x547191(0x153),'operator':{'type':_0x547191(0x162),'value':_0x547191(0x17f)}}]}};return toYamlString(_0x2b2ce7);}export function segmentToYamlString(_0x4471e2){const _0x289f06=a92_0x1e89,_0x148faf=JSON['parse'](JSON[_0x289f06(0x131)](_0x4471e2)),_0x3e616c=a92_0x1faf5d[_0x289f06(0x131)](_0x148faf,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x8dcaef=['rule:',_0x289f06(0x114)];let _0x4c74b9=_0x3e616c;for(const _0x447535 of _0x8dcaef){_0x4c74b9=_0x4c74b9[_0x289f06(0x132)](new RegExp('^('+_0x447535+')','m'),(_0x1ebabf,_0x3c2940,_0x323004)=>{if(_0x323004===0x0||_0x4c74b9[_0x323004-0x1]==='\x0a'&&_0x4c74b9[_0x323004-0x2]==='\x0a')return _0x3c2940;return'\x0a'+_0x3c2940;});}return _0x4c74b9;}export function parseSegmentYamlFile(_0x140df3){const _0x2b392d=a92_0x1e89,_0x30f6eb=a92_0x1faf5d[_0x2b392d(0x17b)](_0x140df3);if(!_0x30f6eb[_0x2b392d(0x170)])throw new Error(_0x2b392d(0x179));return _0x30f6eb;}export function normalizeChildSegmentYaml(_0x54a35e){const _0x2c7f3a=a92_0x1e89;return{'type':_0x2c7f3a(0x167),'name':_0x54a35e[_0x2c7f3a(0x170)],..._0x54a35e[_0x2c7f3a(0x110)]!==undefined&&{'description':_0x54a35e[_0x2c7f3a(0x110)]},..._0x54a35e[_0x2c7f3a(0x12a)]!==undefined&&{'folder':_0x54a35e[_0x2c7f3a(0x12a)]},..._0x54a35e['rule']&&{'rule':normalizeRule(_0x54a35e[_0x2c7f3a(0x17c)])},..._0x54a35e['kind']!==undefined&&{'kind':_0x54a35e['kind']},..._0x54a35e[_0x2c7f3a(0x112)]!==undefined&&{'visible':_0x54a35e[_0x2c7f3a(0x112)]},..._0x54a35e['activations']&&{'activations':_0x54a35e[_0x2c7f3a(0x126)]['map'](normalizeActivation)}};}function a92_0x1e89(_0x4dad1f,_0x1d7dac){_0x4dad1f=_0x4dad1f-0x101;const _0x15137d=a92_0x1513();let _0x1e8906=_0x15137d[_0x4dad1f];return _0x1e8906;}export function normalizeRule(_0x5cb551){const _0x3a8626=a92_0x1e89;return{'type':_0x5cb551[_0x3a8626(0x152)],'conditions':_0x5cb551[_0x3a8626(0x120)][_0x3a8626(0x10d)](normalizeCondition),..._0x5cb551['description']!==undefined&&{'description':_0x5cb551[_0x3a8626(0x110)]}};}function normalizeCondition(_0xd69981){const _0x1987a2=a92_0x1e89;if('segment'in _0xd69981&&(_0xd69981[_0x1987a2(0x152)]===_0x1987a2(0x186)||_0xd69981[_0x1987a2(0x152)]===_0x1987a2(0x17d))){const _0x1b3f0e=_0xd69981;return{'type':_0x1b3f0e[_0x1987a2(0x152)],'segment':_0x1b3f0e['segment']};}if('type'in _0xd69981&&(_0xd69981[_0x1987a2(0x152)]===_0x1987a2(0x172)||_0xd69981['type']==='Or')){const _0x482760=_0xd69981;return{'type':_0x482760['type'],'conditions':_0x482760['conditions'][_0x1987a2(0x10d)](normalizeCondition),..._0x482760[_0x1987a2(0x110)]!==undefined&&{'description':_0x482760[_0x1987a2(0x110)]}};}const _0x6f28ae=_0xd69981;return{'type':'Value','attribute':_0x6f28ae[_0x1987a2(0x137)],'operator':normalizeOperator(_0x6f28ae['operator']),..._0x6f28ae[_0x1987a2(0x104)]!==undefined&&{'arrayMatching':_0x6f28ae[_0x1987a2(0x104)]},..._0x6f28ae[_0x1987a2(0x17d)]!==undefined&&{'exclude':_0x6f28ae[_0x1987a2(0x17d)]},..._0x6f28ae[_0x1987a2(0x140)]!==undefined&&{'aggregation':_0x6f28ae[_0x1987a2(0x140)]},..._0x6f28ae[_0x1987a2(0x108)]!==undefined&&{'source':_0x6f28ae[_0x1987a2(0x108)]},..._0x6f28ae[_0x1987a2(0x181)]!==undefined&&{'filter':normalizeRule(_0x6f28ae['filter'])},..._0x6f28ae[_0x1987a2(0x14b)]!==undefined&&{'limit':_0x6f28ae[_0x1987a2(0x14b)]}};}function normalizeOperator(_0x5d54c8){const _0x49dcc8=a92_0x1e89,_0x3b0bd0=getEffectiveValue(_0x5d54c8);return{'type':_0x5d54c8[_0x49dcc8(0x152)],..._0x5d54c8[_0x49dcc8(0x136)]!==undefined&&{'not':_0x5d54c8['not']},..._0x3b0bd0!==undefined&&{'value':_0x3b0bd0},..._0x5d54c8[_0x49dcc8(0x187)]!==undefined&&{'min':_0x5d54c8[_0x49dcc8(0x187)]},..._0x5d54c8[_0x49dcc8(0x128)]!==undefined&&{'max':_0x5d54c8[_0x49dcc8(0x128)]},..._0x5d54c8['unit']!==undefined&&{'unit':_0x5d54c8[_0x49dcc8(0x18e)]},..._0x5d54c8['duration']!==undefined&&{'duration':_0x5d54c8[_0x49dcc8(0x156)]},..._0x5d54c8[_0x49dcc8(0x18c)]!==undefined&&{'from':_0x5d54c8[_0x49dcc8(0x18c)]}};}function normalizeActivation(_0x480d68){const _0x52ea56=a92_0x1e89;return{'name':_0x480d68[_0x52ea56(0x170)],'connection':_0x480d68[_0x52ea56(0x158)],..._0x480d68['description']!==undefined&&{'description':_0x480d68['description']},..._0x480d68[_0x52ea56(0x171)]!==undefined&&{'all_columns':_0x480d68[_0x52ea56(0x171)]},..._0x480d68[_0x52ea56(0x119)]!==undefined&&{'columns':_0x480d68[_0x52ea56(0x119)]},..._0x480d68[_0x52ea56(0x16b)]!==undefined&&{'behavior':_0x480d68[_0x52ea56(0x16b)]},..._0x480d68[_0x52ea56(0x105)]!==undefined&&{'schedule':_0x480d68[_0x52ea56(0x105)]},..._0x480d68[_0x52ea56(0x168)]!==undefined&&{'notification':_0x480d68['notification']},..._0x480d68[_0x52ea56(0x10a)]!==undefined&&{'connector_config':_0x480d68['connector_config']},..._0x480d68[_0x52ea56(0x14d)]!==undefined&&{'activation_template_id':_0x480d68[_0x52ea56(0x14d)]}};}export function activationResponseToDef(_0x241c63,_0x35f232,_0x4be20d){const _0x1ffabe=a92_0x1e89,_0x4a9757=_0x241c63[_0x1ffabe(0x15c)]||'',_0x144840=_0x4be20d?.[_0x1ffabe(0x166)](_0x4a9757)??_0x4a9757,_0x56b267={'name':_0x241c63['name'],'connection':_0x144840};_0x241c63[_0x1ffabe(0x110)]&&(_0x56b267[_0x1ffabe(0x110)]=_0x241c63[_0x1ffabe(0x110)]);let _0x5d6de1=[];_0x241c63[_0x1ffabe(0x119)]&&_0x241c63[_0x1ffabe(0x119)][_0x1ffabe(0x101)]>0x0&&(_0x5d6de1=_0x241c63[_0x1ffabe(0x119)][_0x1ffabe(0x181)](_0x5b9caa=>_0x5b9caa&&_0x5b9caa['name'])['map'](_0x509369=>{const _0xfb0480=_0x1ffabe;if(_0x509369[_0xfb0480(0x152)]||_0x509369[_0xfb0480(0x177)])return{'name':_0x509369['name'],..._0x509369[_0xfb0480(0x152)]&&{'type':_0x509369[_0xfb0480(0x152)]},..._0x509369[_0xfb0480(0x177)]&&{'visibility':_0x509369[_0xfb0480(0x177)]}};return _0x509369[_0xfb0480(0x170)];}));_0x5d6de1[_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x119)]=_0x5d6de1);_0x241c63[_0x1ffabe(0x109)]!==undefined&&(_0x241c63[_0x1ffabe(0x109)]===![]&&_0x5d6de1[_0x1ffabe(0x101)]===0x0?_0x56b267[_0x1ffabe(0x171)]=!![]:_0x56b267[_0x1ffabe(0x171)]=_0x241c63['allColumns']);const _0x5a179e={};let _0x461a23=![];_0x241c63[_0x1ffabe(0x15a)]&&(_0x5a179e['type']=_0x241c63['scheduleType'],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x161)]&&(_0x5a179e[_0x1ffabe(0x103)]=_0x241c63[_0x1ffabe(0x161)],_0x461a23=!![]);_0x241c63['repeatFrequency']!==undefined&&_0x241c63[_0x1ffabe(0x175)]!==null&&(_0x5a179e[_0x1ffabe(0x12d)]=_0x241c63['repeatFrequency'],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x14c)]&&_0x241c63[_0x1ffabe(0x14c)]['length']>0x0&&(_0x5a179e[_0x1ffabe(0x13a)]=_0x241c63[_0x1ffabe(0x14c)],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x16e)]!==undefined&&(_0x5a179e[_0x1ffabe(0x178)]=_0x241c63[_0x1ffabe(0x16e)],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x165)]!==undefined&&(_0x5a179e['end_on']=_0x241c63[_0x1ffabe(0x165)],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x150)]&&(_0x5a179e[_0x1ffabe(0x150)]=_0x241c63[_0x1ffabe(0x150)],_0x461a23=!![]);_0x461a23&&(_0x56b267[_0x1ffabe(0x105)]=_0x5a179e);(_0x241c63[_0x1ffabe(0x11c)]&&_0x241c63['notifyOn'][_0x1ffabe(0x101)]>0x0||_0x241c63[_0x1ffabe(0x160)]&&_0x241c63[_0x1ffabe(0x160)][_0x1ffabe(0x101)]>0x0)&&(_0x56b267[_0x1ffabe(0x168)]={},_0x241c63[_0x1ffabe(0x11c)]&&_0x241c63['notifyOn'][_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x168)]['notify_on']=_0x241c63['notifyOn']),_0x241c63[_0x1ffabe(0x160)]&&_0x241c63[_0x1ffabe(0x160)][_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x168)]['email_recipients']=_0x241c63[_0x1ffabe(0x160)]['map'](_0x3990b2=>{const _0x371514=_0x1ffabe,_0x7e8bef=_0x35f232?.[_0x371514(0x166)](_0x3990b2);return _0x7e8bef??String(_0x3990b2);})));_0x241c63[_0x1ffabe(0x12b)]&&Object[_0x1ffabe(0x111)](_0x241c63[_0x1ffabe(0x12b)])['length']>0x0&&(_0x56b267[_0x1ffabe(0x10a)]=normalizeConnectorConfigForYaml(_0x241c63[_0x1ffabe(0x12b)]));_0x241c63['activationTemplateId']&&(_0x56b267[_0x1ffabe(0x14d)]=_0x241c63[_0x1ffabe(0x173)]);if(_0x241c63[_0x1ffabe(0x139)]){const _0x3975f4={},_0x237f7f=_0x241c63['syndicationBehavior'];_0x237f7f['columns']&&_0x237f7f['columns'][_0x1ffabe(0x101)]>0x0&&(_0x3975f4[_0x1ffabe(0x119)]=_0x237f7f[_0x1ffabe(0x119)][_0x1ffabe(0x181)](_0x493dd0=>_0x493dd0&&_0x493dd0[_0x1ffabe(0x170)])[_0x1ffabe(0x10d)](_0x4c6903=>({'name':_0x4c6903[_0x1ffabe(0x170)],..._0x4c6903['type']&&{'type':_0x4c6903['type']},..._0x4c6903['visibility']&&{'visibility':_0x4c6903[_0x1ffabe(0x177)]}}))),_0x237f7f[_0x1ffabe(0x133)]&&(_0x3975f4['behavior_table']=_0x237f7f[_0x1ffabe(0x133)]),_0x237f7f[_0x1ffabe(0x13e)]!==undefined&&(_0x3975f4[_0x1ffabe(0x13d)]=_0x237f7f['joinRow']),_0x237f7f[_0x1ffabe(0x169)]&&(_0x3975f4[_0x1ffabe(0x135)]=_0x237f7f[_0x1ffabe(0x169)]),_0x237f7f[_0x1ffabe(0x12c)]&&(_0x3975f4[_0x1ffabe(0x12c)]=_0x237f7f[_0x1ffabe(0x12c)]),_0x237f7f[_0x1ffabe(0x146)]&&_0x237f7f[_0x1ffabe(0x146)][_0x1ffabe(0x101)]>0x0&&(_0x3975f4[_0x1ffabe(0x147)]=_0x237f7f[_0x1ffabe(0x146)]),Object[_0x1ffabe(0x111)](_0x3975f4)[_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x16b)]=_0x3975f4);}return _0x56b267;}export function journeyActivationStepToYaml(_0x14c1f2,_0x2e1142,_0x3c65f8){const _0x16eb7a=a92_0x1e89,_0x14a598=_0x14c1f2[_0x16eb7a(0x149)][_0x16eb7a(0x15e)],_0x2e6850=_0x14a598['connectionId']||'',_0x2303f7=_0x3c65f8?.[_0x16eb7a(0x166)](_0x2e6850)??_0x2e6850,_0x5acbc4={'name':_0x14a598[_0x16eb7a(0x170)]||'','connection':_0x2303f7};_0x14a598['description']&&(_0x5acbc4['description']=_0x14a598[_0x16eb7a(0x110)]);let _0x78b7ab=[];_0x14a598[_0x16eb7a(0x119)]&&_0x14a598[_0x16eb7a(0x119)][_0x16eb7a(0x101)]>0x0&&(_0x78b7ab=_0x14a598['columns'][_0x16eb7a(0x181)](_0x5e3b99=>_0x5e3b99&&_0x5e3b99[_0x16eb7a(0x170)])[_0x16eb7a(0x10d)](_0x19bf4c=>{const _0x31c95b=_0x16eb7a;if(_0x19bf4c[_0x31c95b(0x152)]||_0x19bf4c[_0x31c95b(0x177)])return{'name':_0x19bf4c[_0x31c95b(0x170)],..._0x19bf4c[_0x31c95b(0x152)]&&{'type':_0x19bf4c[_0x31c95b(0x152)]},..._0x19bf4c[_0x31c95b(0x177)]&&{'visibility':_0x19bf4c[_0x31c95b(0x177)]}};return _0x19bf4c['name'];}));_0x78b7ab[_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x119)]=_0x78b7ab);_0x14a598[_0x16eb7a(0x109)]!==undefined&&(_0x14a598[_0x16eb7a(0x109)]===![]&&_0x78b7ab[_0x16eb7a(0x101)]===0x0?_0x5acbc4[_0x16eb7a(0x171)]=!![]:_0x5acbc4['all_columns']=_0x14a598[_0x16eb7a(0x109)]);const _0x52d886={};let _0x28ecd1=![];_0x14a598[_0x16eb7a(0x15a)]&&(_0x52d886[_0x16eb7a(0x152)]=_0x14a598['scheduleType'],_0x28ecd1=!![]);_0x14a598['repeatUnit']&&(_0x52d886['repeat_unit']=_0x14a598[_0x16eb7a(0x161)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x175)]!==undefined&&_0x14a598[_0x16eb7a(0x175)]!==null&&(_0x52d886[_0x16eb7a(0x12d)]=_0x14a598[_0x16eb7a(0x175)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x16e)]!==undefined&&(_0x52d886['start_at']=_0x14a598[_0x16eb7a(0x16e)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x165)]!==undefined&&(_0x52d886[_0x16eb7a(0x127)]=_0x14a598[_0x16eb7a(0x165)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x150)]&&(_0x52d886[_0x16eb7a(0x150)]=_0x14a598[_0x16eb7a(0x150)],_0x28ecd1=!![]);_0x28ecd1&&(_0x5acbc4[_0x16eb7a(0x105)]=_0x52d886);(_0x14a598['notifyOn']&&_0x14a598[_0x16eb7a(0x11c)][_0x16eb7a(0x101)]>0x0||_0x14a598['emailRecipients']&&_0x14a598[_0x16eb7a(0x160)][_0x16eb7a(0x101)]>0x0)&&(_0x5acbc4[_0x16eb7a(0x168)]={},_0x14a598[_0x16eb7a(0x11c)]&&_0x14a598[_0x16eb7a(0x11c)][_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x168)][_0x16eb7a(0x11f)]=_0x14a598['notifyOn']),_0x14a598[_0x16eb7a(0x160)]&&_0x14a598[_0x16eb7a(0x160)][_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x168)][_0x16eb7a(0x17a)]=_0x14a598[_0x16eb7a(0x160)][_0x16eb7a(0x10d)](_0x44fdc2=>{const _0xcb0c60=_0x16eb7a,_0xfea8a6=_0x2e1142?.[_0xcb0c60(0x166)](_0x44fdc2);return _0xfea8a6??String(_0x44fdc2);})));_0x14a598[_0x16eb7a(0x12b)]&&Object['keys'](_0x14a598[_0x16eb7a(0x12b)])['length']>0x0&&(_0x5acbc4[_0x16eb7a(0x10a)]=normalizeConnectorConfigForYaml(_0x14a598[_0x16eb7a(0x12b)]));_0x14a598[_0x16eb7a(0x173)]&&(_0x5acbc4['activation_template_id']=_0x14a598['activationTemplateId']);if(_0x14a598[_0x16eb7a(0x139)]){const _0x28bddf={},_0x1433ac=_0x14a598[_0x16eb7a(0x139)];_0x1433ac[_0x16eb7a(0x119)]&&_0x1433ac[_0x16eb7a(0x119)][_0x16eb7a(0x101)]>0x0&&(_0x28bddf[_0x16eb7a(0x119)]=_0x1433ac[_0x16eb7a(0x119)][_0x16eb7a(0x181)](_0xd36bfb=>_0xd36bfb&&_0xd36bfb['name'])[_0x16eb7a(0x10d)](_0x33a914=>({'name':_0x33a914[_0x16eb7a(0x170)],..._0x33a914[_0x16eb7a(0x152)]&&{'type':_0x33a914[_0x16eb7a(0x152)]},..._0x33a914['visibility']&&{'visibility':_0x33a914[_0x16eb7a(0x177)]}}))),_0x1433ac['behaviorTableName']&&(_0x28bddf['behavior_table']=_0x1433ac[_0x16eb7a(0x133)]),_0x1433ac[_0x16eb7a(0x13e)]!==undefined&&(_0x28bddf['join_row']=_0x1433ac[_0x16eb7a(0x13e)]),_0x1433ac[_0x16eb7a(0x169)]&&(_0x28bddf[_0x16eb7a(0x135)]=_0x1433ac['joinStrategy']),_0x1433ac[_0x16eb7a(0x12c)]&&(_0x28bddf[_0x16eb7a(0x12c)]=_0x1433ac['formatting']),_0x1433ac[_0x16eb7a(0x146)]&&_0x1433ac[_0x16eb7a(0x146)]['length']>0x0&&(_0x28bddf[_0x16eb7a(0x147)]=_0x1433ac[_0x16eb7a(0x146)]),Object[_0x16eb7a(0x111)](_0x28bddf)[_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x16b)]=_0x28bddf);}return _0x5acbc4;}export function segmentWithActivationsToYaml(_0x134a78,_0xf1ef1,_0x4025fa,_0x475ee5,_0x5e54be){const _0x4034fb=a92_0x1e89,_0x4a2709=segmentResponseToDefSync(_0x134a78,_0x4025fa);return _0xf1ef1[_0x4034fb(0x101)]>0x0&&(_0x4a2709[_0x4034fb(0x126)]=_0xf1ef1['map'](_0x41901b=>activationResponseToDef(_0x41901b,_0x475ee5,_0x5e54be))),_0x4a2709;}function normalizeColumn(_0x1c545b){const _0x59dc04=a92_0x1e89;if(typeof _0x1c545b===_0x59dc04(0x121))return{'name':_0x1c545b};return{'name':_0x1c545b[_0x59dc04(0x170)],..._0x1c545b[_0x59dc04(0x152)]&&{'type':_0x1c545b['type']},..._0x1c545b['visibility']&&{'visibility':_0x1c545b['visibility']}};}export async function activationDefToCreateRequest(_0x19f336,_0x580a5f){const _0xf48460=a92_0x1e89,_0x41d43c=_0x580a5f?.[_0xf48460(0x159)],_0x5acb20=_0x580a5f?.[_0xf48460(0x11d)],_0x12e2c3=_0x19f336[_0xf48460(0x158)];let _0x17d932;const _0x47b1a6=parseInt(_0x12e2c3,0xa);if(!isNaN(_0x47b1a6)&&String(_0x47b1a6)===_0x12e2c3)_0x17d932=_0x47b1a6;else{const _0x2a54ed=_0x5acb20?.[_0xf48460(0x166)](_0x12e2c3);if(_0x2a54ed===undefined)throw new SDKError(ErrorCode[_0xf48460(0x118)],_0xf48460(0x117)+_0x12e2c3,undefined,{'helpText':_0xf48460(0x14a)});_0x17d932=_0x2a54ed;}const _0x548df7={'name':_0x19f336[_0xf48460(0x170)],'connectionId':_0x17d932};_0x19f336[_0xf48460(0x110)]&&(_0x548df7[_0xf48460(0x110)]=_0x19f336[_0xf48460(0x110)]);let _0x1e3808=[];_0x19f336[_0xf48460(0x119)]&&_0x19f336[_0xf48460(0x119)][_0xf48460(0x101)]>0x0&&(_0x1e3808=_0x19f336[_0xf48460(0x119)][_0xf48460(0x181)](_0x5b83a8=>_0x5b83a8!=null)[_0xf48460(0x10d)](normalizeColumn));_0x1e3808[_0xf48460(0x101)]>0x0&&(_0x548df7[_0xf48460(0x119)]=_0x1e3808);_0x19f336[_0xf48460(0x171)]!==undefined&&(_0x19f336[_0xf48460(0x171)]===![]&&_0x1e3808[_0xf48460(0x101)]===0x0?_0x548df7[_0xf48460(0x109)]=!![]:_0x548df7[_0xf48460(0x109)]=_0x19f336[_0xf48460(0x171)]);if(_0x19f336[_0xf48460(0x105)]){const _0x45fd87=_0x19f336[_0xf48460(0x105)];_0x45fd87['type']&&(_0x548df7[_0xf48460(0x15a)]=_0x45fd87[_0xf48460(0x152)]),_0x45fd87[_0xf48460(0x103)]&&(_0x548df7['repeatUnit']=_0x45fd87['repeat_unit']),_0x45fd87[_0xf48460(0x12d)]!==undefined&&(_0x548df7['repeatFrequency']=_0x45fd87[_0xf48460(0x12d)]),_0x45fd87[_0xf48460(0x13a)]&&(_0x548df7[_0xf48460(0x14c)]=_0x45fd87[_0xf48460(0x13a)]),_0x45fd87['start_at']!==undefined&&(_0x548df7['startAt']=_0x45fd87['start_at']),_0x45fd87[_0xf48460(0x127)]!==undefined&&(_0x548df7[_0xf48460(0x165)]=_0x45fd87[_0xf48460(0x127)]),_0x45fd87[_0xf48460(0x150)]&&(_0x548df7[_0xf48460(0x150)]=_0x45fd87[_0xf48460(0x150)]);}_0x19f336['notification']&&(_0x19f336[_0xf48460(0x168)][_0xf48460(0x11f)]&&(_0x548df7[_0xf48460(0x11c)]=_0x19f336[_0xf48460(0x168)]['notify_on']),_0x19f336[_0xf48460(0x168)]['email_recipients']&&(_0x548df7[_0xf48460(0x160)]=_0x19f336[_0xf48460(0x168)][_0xf48460(0x17a)][_0xf48460(0x10d)](_0x391432=>{const _0x52b45d=_0xf48460,_0x4eb513=Number(_0x391432);if(!isNaN(_0x4eb513)&&String(_0x4eb513)===_0x391432)return _0x4eb513;const _0x4d20e3=_0x41d43c?.[_0x52b45d(0x166)](_0x391432['toLowerCase']());if(_0x4d20e3===undefined)throw new SDKError(ErrorCode[_0x52b45d(0x174)],'Unknown\x20email\x20recipient:\x20'+_0x391432+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x4d20e3;})));if(_0x19f336[_0xf48460(0x10a)]){const _0x3cb063=_0x580a5f?.[_0xf48460(0x129)]?.[_0xf48460(0x166)](_0x12e2c3);if(_0x3cb063&&_0x580a5f?.[_0xf48460(0x13f)])try{const _0x17028d=await _0x580a5f[_0xf48460(0x13f)](_0x3cb063),_0x3a4fc5=validateConnectorConfig(_0x19f336[_0xf48460(0x10a)],_0x17028d);if(!_0x3a4fc5[_0xf48460(0x115)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x19f336[_0xf48460(0x170)]+'\x22:\x0a'+formatValidationErrors(_0x3a4fc5['errors']),undefined,{'helpText':_0xf48460(0x184)+_0x3cb063+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x17028d)});if(_0x3a4fc5['warnings'][_0xf48460(0x101)]>0x0){const _0x2769a6=formatValidationWarnings(_0x3a4fc5[_0xf48460(0x130)]);console[_0xf48460(0x10c)]('connector_config\x20for\x20activation\x20\x22'+_0x19f336[_0xf48460(0x170)]+_0xf48460(0x14f)+_0x2769a6);}_0x548df7[_0xf48460(0x12b)]=transformConfigToLegacy(_0x19f336[_0xf48460(0x10a)],_0x17028d);}catch(_0x4abf68){if(_0x4abf68 instanceof SDKError&&_0x4abf68[_0xf48460(0x182)]===ErrorCode[_0xf48460(0x18d)])_0x548df7[_0xf48460(0x12b)]=_0x19f336['connector_config'];else throw _0x4abf68;}else _0x548df7[_0xf48460(0x12b)]=_0x19f336[_0xf48460(0x10a)];}_0x19f336[_0xf48460(0x14d)]!==undefined&&(_0x548df7[_0xf48460(0x173)]=_0x19f336[_0xf48460(0x14d)]);if(_0x19f336[_0xf48460(0x16b)]){const _0x9fdbd0=_0x19f336[_0xf48460(0x16b)],_0x35f06b={};if(_0x9fdbd0['columns']&&_0x9fdbd0[_0xf48460(0x119)]['length']>0x0){const _0x11817b=_0x9fdbd0[_0xf48460(0x119)][_0xf48460(0x181)](_0x219a8c=>_0x219a8c&&_0x219a8c['name']);_0x11817b['length']>0x0&&(_0x35f06b['columns']=_0x11817b);}_0x9fdbd0['behavior_table']&&(_0x35f06b[_0xf48460(0x133)]=_0x9fdbd0['behavior_table']),_0x9fdbd0[_0xf48460(0x13d)]!==undefined&&(_0x35f06b['joinRow']=_0x9fdbd0[_0xf48460(0x13d)]),_0x9fdbd0[_0xf48460(0x135)]&&(_0x35f06b[_0xf48460(0x169)]=_0x9fdbd0['join_strategy']),_0x9fdbd0['formatting']&&(_0x35f06b[_0xf48460(0x12c)]=_0x9fdbd0[_0xf48460(0x12c)]),_0x9fdbd0[_0xf48460(0x147)]&&(_0x35f06b[_0xf48460(0x146)]=_0x9fdbd0[_0xf48460(0x147)]),_0x548df7[_0xf48460(0x139)]=_0x35f06b;}return _0x548df7;}export async function activationDefToUpdateRequest(_0x34e1cf,_0xf75a6){return activationDefToCreateRequest(_0x34e1cf,_0xf75a6);}export function deepSortObject(_0x323d3b){const _0x2e913c=a92_0x1e89;if(_0x323d3b===null||typeof _0x323d3b!==_0x2e913c(0x144))return _0x323d3b;if(Array[_0x2e913c(0x189)](_0x323d3b))return _0x323d3b[_0x2e913c(0x10d)](deepSortObject)['sort']((_0x5d0e6c,_0x4bd20c)=>JSON[_0x2e913c(0x131)](_0x5d0e6c)[_0x2e913c(0x12e)](JSON['stringify'](_0x4bd20c)));const _0x120075={};for(const _0x2ff60e of Object[_0x2e913c(0x111)](_0x323d3b)[_0x2e913c(0x15b)]()){_0x120075[_0x2ff60e]=deepSortObject(_0x323d3b[_0x2ff60e]);}return _0x120075;}export function serializeRule(_0x1cf6f6){const _0x53fee7=a92_0x1e89;return JSON[_0x53fee7(0x131)](deepSortObject(_0x1cf6f6));}export function normalizeRuleForMatching(_0x5481bb){return normalizeConditionsForMatching(_0x5481bb);}function normalizeConditionsForMatching(_0x37cc6e){const _0x442b84=a92_0x1e89;if(_0x37cc6e===null||typeof _0x37cc6e!==_0x442b84(0x144))return _0x37cc6e;if(Array['isArray'](_0x37cc6e))return _0x37cc6e[_0x442b84(0x10d)](normalizeConditionsForMatching);const _0x157c94=_0x37cc6e;if((_0x157c94[_0x442b84(0x152)]==='include'||_0x157c94[_0x442b84(0x152)]==='exclude')&&typeof _0x157c94['segment']==='string')return{..._0x157c94,'segment':_0x442b84(0x125)};const _0x4d04df={};for(const _0x2a77e0 of Object[_0x442b84(0x111)](_0x157c94)){_0x4d04df[_0x2a77e0]=normalizeConditionsForMatching(_0x157c94[_0x2a77e0]);}return _0x4d04df;}export function serializeRuleForMatching(_0x589b9b){const _0x338fc2=a92_0x1e89;return JSON[_0x338fc2(0x131)](deepSortObject(normalizeRuleForMatching(_0x589b9b)));}function a92_0x1513(){const _0x167761=['repeat_sub_frequency','groupingColumns','ruleHashToName','join_row','joinRow','getSchema','aggregation','132228WOiEgX','values','all','object','TimeWithinNext','orderBy','order_by','batch','attributes','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','limit','repeatSubFrequency','activation_template_id','add','\x22:\x0a','timezone','isVisible','type','attribute_name','1653348egPBlN','19509578QBCwKa','duration','TimeWithinPast','connection','emailToIdMap','scheduleType','sort','connectionId','JOURNEY_SYNTAX_ERROR','activationParams','test','emailRecipients','repeatUnit','Equal','conditions[','has','endOn','get','segment','notification','joinStrategy','19782BDEdHU','behavior','__UNRESOLVED__','resolveSegmentName','startAt','Please\x20specify\x20a\x20valid\x20attribute\x20name.','name','all_columns','And','activationTemplateId','INVALID_ARGUMENT','repeatFrequency','leftValue','visibility','start_at','YAML\x20config\x20missing\x20required\x20field:\x20name','email_recipients','parse','rule','exclude','155wdDNGf','value','localRuleToName','filter','code','576etFpeh','Connector:\x20','3890116PsHOwZ','include','min','forEach','isArray','rightValues','every','from','CONNECTOR_SCHEMA_NOT_FOUND','unit','length','3BKKHhd','repeat_unit','arrayMatching','schedule','any','rule:','source','allColumns','connector_config','null','warn','map','entries','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','description','keys','visible','realtime','activations:','valid','1447043nTUZun','Unknown\x20connection:\x20','CONNECTION_NOT_FOUND','columns','Segment\x20description','kind','notifyOn','connectionNameToIdMap','operator','notify_on','conditions','string','rightValue','20FlOuIu','set','__SEGMENT_REF__','activations','end_on','max','connectionNameToTypeMap','folder','connectorConfig','formatting','repeat_frequency','localeCompare','Value','warnings','stringify','replace','behaviorTableName','Reference','join_strategy','not','attribute','466425ExEDEi','syndicationBehavior'];a92_0x1513=function(){return _0x167761;};return a92_0x1513();}export function expandSegmentReferences(_0xa43833,_0x21bba6,_0x5108df=new Set()){return expandConditions(_0xa43833,_0x21bba6,_0x5108df);}function expandConditions(_0x58ec49,_0x3bcbaf,_0x126a39){const _0x1178c4=a92_0x1e89;if(_0x58ec49===null||typeof _0x58ec49!==_0x1178c4(0x144))return _0x58ec49;if(Array[_0x1178c4(0x189)](_0x58ec49))return _0x58ec49[_0x1178c4(0x10d)](_0x348ee3=>expandConditions(_0x348ee3,_0x3bcbaf,_0x126a39));const _0x22351c=_0x58ec49;if((_0x22351c[_0x1178c4(0x152)]===_0x1178c4(0x186)||_0x22351c[_0x1178c4(0x152)]===_0x1178c4(0x17d))&&typeof _0x22351c[_0x1178c4(0x167)]===_0x1178c4(0x121)){const _0x514aaa=_0x22351c[_0x1178c4(0x167)],_0x1d5d8c=_0x3bcbaf[_0x1178c4(0x166)](_0x514aaa);if(_0x1d5d8c&&!_0x126a39[_0x1178c4(0x164)](_0x514aaa)){const _0x50a825=new Set(_0x126a39);_0x50a825['add'](_0x514aaa);const _0x5df788=expandConditions(_0x1d5d8c,_0x3bcbaf,_0x50a825);return{'type':_0x22351c[_0x1178c4(0x152)],'expanded_rule':_0x5df788};}return{'type':_0x22351c[_0x1178c4(0x152)],'expanded_rule':_0x1178c4(0x16c)};}const _0xc3600d={};for(const _0x4dbfcd of Object['keys'](_0x22351c)){_0xc3600d[_0x4dbfcd]=expandConditions(_0x22351c[_0x4dbfcd],_0x3bcbaf,_0x126a39);}return _0xc3600d;}export function serializeExpandedRule(_0x56a46f,_0x275fbf){const _0x3a13b9=a92_0x1e89,_0x334773=expandSegmentReferences(_0x56a46f,_0x275fbf);return JSON[_0x3a13b9(0x131)](deepSortObject(_0x334773));}export function createSegmentNameContext(_0x326186){const _0xee9824=a92_0x1e89,_0x447d82=new Set(),_0x98be33=new Map(),_0x1c67f0=new Map();if(_0x326186)for(const [_0x4b21de,_0x4305fa]of Object[_0xee9824(0x10e)](_0x326186)){if(_0x4305fa[_0xee9824(0x17c)]){const _0x3e3de5=serializeRule(_0x4305fa[_0xee9824(0x17c)]);_0x1c67f0[_0xee9824(0x124)](_0x3e3de5,_0x4b21de),_0x447d82[_0xee9824(0x14e)](_0x4b21de);}}return{'usedNames':_0x447d82,'ruleHashToName':_0x98be33,'localRuleToName':_0x326186?_0x1c67f0:undefined};}export function resolveSegmentName(_0x100d37,_0x37dc9d,_0x4edc12,_0x1e478d){const _0x379432=a92_0x1e89,_0x1c96a8=serializeRule(_0x37dc9d);if(_0x4edc12[_0x379432(0x180)]){const _0x53c07d=_0x4edc12[_0x379432(0x180)][_0x379432(0x166)](_0x1c96a8);if(_0x53c07d)return{'name':_0x53c07d,'isDuplicate':![],'isLocalMatch':!![]};}const _0x203ed6=_0x4edc12[_0x379432(0x13c)]['get'](_0x1c96a8);if(_0x203ed6)return{'name':_0x203ed6,'isDuplicate':!![],'isLocalMatch':![]};const _0x4247d7=_0x1e478d(_0x100d37);let _0x187950=_0x4247d7||_0x100d37,_0x58f5ea=_0x187950,_0x18d09b=0x2;while(_0x4edc12['usedNames'][_0x379432(0x164)](_0x58f5ea)){_0x58f5ea=_0x187950+'_'+_0x18d09b,_0x18d09b++;}return _0x4edc12['usedNames'][_0x379432(0x14e)](_0x58f5ea),_0x4edc12[_0x379432(0x13c)]['set'](_0x1c96a8,_0x58f5ea),{'name':_0x58f5ea,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x2e3c0f){const _0x1f4f87=[],_0x2a7658=_0x3573bd=>{const _0x3acc77=a92_0x1e89;if(!_0x3573bd||typeof _0x3573bd!==_0x3acc77(0x144))return;if(Array[_0x3acc77(0x189)](_0x3573bd)){_0x3573bd[_0x3acc77(0x188)](_0x2a7658);return;}const _0x282608=_0x3573bd;(_0x282608[_0x3acc77(0x152)]==='include'||_0x282608[_0x3acc77(0x152)]==='exclude')&&typeof _0x282608[_0x3acc77(0x167)]===_0x3acc77(0x121)&&_0x1f4f87['push'](_0x282608[_0x3acc77(0x167)]);for(const _0x51246d of Object[_0x3acc77(0x142)](_0x282608)){_0x2a7658(_0x51246d);}};return _0x2a7658(_0x2e3c0f),_0x1f4f87;}export function validateSegmentRule(_0x5b3e80,_0x233055){const _0x1694a7=a92_0x1e89;if(!_0x233055||!_0x233055['conditions'])return;for(let _0x271f66=0x0;_0x271f66<_0x233055[_0x1694a7(0x120)][_0x1694a7(0x101)];_0x271f66++){const _0x6e0898=_0x233055['conditions'][_0x271f66];if(_0x1694a7(0x152)in _0x6e0898&&_0x6e0898[_0x1694a7(0x152)]===_0x1694a7(0x12f)){const _0x1c65c2=_0x6e0898;if(!_0x1c65c2[_0x1694a7(0x137)]||_0x1c65c2['attribute']==='')throw new SDKError(ErrorCode[_0x1694a7(0x15d)],'Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'+_0x5b3e80+'\x27:\x20'+(_0x1694a7(0x163)+_0x271f66+'].attribute\x20cannot\x20be\x20empty.\x0a')+_0x1694a7(0x16f));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5082e0,_0x3575d9){const _0xbe2f17=a93_0x278b,_0x2ddd7b=_0x5082e0();while(!![]){try{const _0x3b07cf=parseInt(_0xbe2f17(0x19d))/0x1+-parseInt(_0xbe2f17(0x1bf))/0x2*(parseInt(_0xbe2f17(0x1a2))/0x3)+-parseInt(_0xbe2f17(0x1ae))/0x4+parseInt(_0xbe2f17(0x18d))/0x5*(-parseInt(_0xbe2f17(0x19b))/0x6)+parseInt(_0xbe2f17(0x191))/0x7+parseInt(_0xbe2f17(0x1a5))/0x8+-parseInt(_0xbe2f17(0x189))/0x9*(-parseInt(_0xbe2f17(0x1b7))/0xa);if(_0x3b07cf===_0x3575d9)break;else _0x2ddd7b['push'](_0x2ddd7b['shift']());}catch(_0x1cf63d){_0x2ddd7b['push'](_0x2ddd7b['shift']());}}}(a93_0x10a7,0x25e5e));import a93_0x422614 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x5c6a84){const _0x2ed178=a93_0x278b,_0x377828=_0x5c6a84[_0x2ed178(0x1b4)][_0x2ed178(0x18f)](_0x3daca1=>({'column_name':_0x3daca1[_0x2ed178(0x194)],'column_type':_0x3daca1[_0x2ed178(0x1b8)],'null':_0x2ed178(0x1b2),'key':null,'default':null,'extra':null}));return{..._0x5c6a84,'columns':[{'name':_0x2ed178(0x1b0),'type':_0x2ed178(0x1af)},{'name':_0x2ed178(0x1bc),'type':_0x2ed178(0x1af)},{'name':_0x2ed178(0x18e),'type':_0x2ed178(0x1af)},{'name':_0x2ed178(0x1be),'type':_0x2ed178(0x1af)},{'name':'default','type':_0x2ed178(0x1af)},{'name':'extra','type':_0x2ed178(0x1af)}],'data':_0x377828};}function a93_0x278b(_0x22f0f0,_0x1154b5){_0x22f0f0=_0x22f0f0-0x189;const _0x10a73a=a93_0x10a7();let _0x278b3b=_0x10a73a[_0x22f0f0];return _0x278b3b;}export async function executeSchemaQuery(_0x241ea4,_0x38b7e1,_0x39eb2e){const _0x5eb779=a93_0x278b,_0x583fb0=_0x241ea4[_0x5eb779(0x1ad)]()[_0x5eb779(0x1ab)](/;+$/,''),_0x294aac=_0x5eb779(0x18a)+_0x583fb0+_0x5eb779(0x1aa);_0x39eb2e['verbose']&&console[_0x5eb779(0x190)](_0x5eb779(0x1bb)+_0x294aac);const _0x4bac2c=await withProgressSpinner(_0x5eb779(0x1b6),async _0x3dde29=>{const _0x48e73f=_0x5eb779,_0x249670=await _0x38b7e1['query'][_0x48e73f(0x18c)](_0x294aac,{'catalog':'td','schema':_0x48e73f(0x1b3),'onJobId':_0x2d3c07=>{const _0x2835d5=_0x48e73f;_0x3dde29[_0x2835d5(0x1a7)](_0x2d3c07);}});return _0x249670;},{'verbose':_0x39eb2e[_0x5eb779(0x197)]});return buildSchemaResult(_0x4bac2c['data']);}export function displayFieldsHumanReadable(_0x56d9b1,_0xf441b6){const _0x19fc44=a93_0x278b,_0x156f6e=_0x56d9b1[_0x19fc44(0x19f)](_0xa30ddf=>_0xa30ddf[_0x19fc44(0x19e)]===_0x19fc44(0x1b5)),_0x3bd3bc=_0x56d9b1['filter'](_0x4c05c4=>_0x4c05c4[_0x19fc44(0x19e)]===_0x19fc44(0x1a0)),_0x3f2f88=new Map();for(const _0x3d529f of _0x156f6e){const _0x4195cb=_0x3d529f[_0x19fc44(0x1ba)]||_0x3d529f[_0x19fc44(0x1a3)]||_0x19fc44(0x18b),_0x2fc38c=_0x3f2f88['get'](_0x4195cb);_0x2fc38c?_0x2fc38c['fields'][_0x19fc44(0x1a4)](_0x3d529f):_0x3f2f88['set'](_0x4195cb,{'displayName':_0x4195cb,'tableName':_0x3d529f[_0x19fc44(0x1a3)],'fields':[_0x3d529f]});}const _0x1b32d0=new Map();for(const _0x27011d of _0x3bd3bc){const _0x1e9e66=_0x27011d[_0x19fc44(0x193)]||_0x19fc44(0x18b),_0x3fa60e=_0x1b32d0['get'](_0x1e9e66)||[];_0x3fa60e[_0x19fc44(0x1a4)](_0x27011d),_0x1b32d0[_0x19fc44(0x19c)](_0x1e9e66,_0x3fa60e);}console[_0x19fc44(0x190)]('\x0a'+a93_0x422614[_0x19fc44(0x195)](_0xf441b6));if(_0x3f2f88[_0x19fc44(0x1a1)]>0x0){console[_0x19fc44(0x190)]('\x0a'+a93_0x422614['dim']('Attributes'));const _0x2ab393=[..._0x3f2f88[_0x19fc44(0x198)]()][_0x19fc44(0x19a)]((_0x1a805b,_0x26f870)=>_0x1a805b[0x0][_0x19fc44(0x192)](_0x26f870[0x0]));for(const [,_0x235792]of _0x2ab393){const _0x1d005e=_0x235792[_0x19fc44(0x1a6)]&&_0x235792['tableName']!==_0x235792[_0x19fc44(0x1a8)]?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x235792[_0x19fc44(0x1a6)]+')'):'';console['error']('\x20\x20'+a93_0x422614[_0x19fc44(0x195)](_0x235792[_0x19fc44(0x1a8)])+_0x1d005e);const _0x49ebe1=[..._0x235792[_0x19fc44(0x196)]]['sort']((_0x17c330,_0x34c82c)=>_0x17c330[_0x19fc44(0x194)]['localeCompare'](_0x34c82c[_0x19fc44(0x194)]));for(const _0x5e44bb of _0x49ebe1){const _0x1bed5b=_0x5e44bb[_0x19fc44(0x1b9)]&&_0x5e44bb['parentColumn']!==_0x5e44bb[_0x19fc44(0x194)]?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x5e44bb[_0x19fc44(0x1b9)]+')'):'';console['error']('\x20\x20\x20\x20'+_0x5e44bb['name']+_0x1bed5b+':\x20'+a93_0x422614[_0x19fc44(0x1a9)](_0x5e44bb[_0x19fc44(0x1b8)]));}}}if(_0x1b32d0[_0x19fc44(0x1a1)]>0x0){console['error']('\x0a'+a93_0x422614[_0x19fc44(0x1ac)](_0x19fc44(0x1b1)));const _0x536b52=[..._0x1b32d0['entries']()][_0x19fc44(0x19a)]((_0x3c3282,_0x373638)=>_0x3c3282[0x0]['localeCompare'](_0x373638[0x0]));for(const [_0x1885a7,_0x5967fc]of _0x536b52){const _0x39eace=_0x5967fc[0x0],_0x35452f=_0x39eace?.['parentTableName']||'';console[_0x19fc44(0x190)]('\x20\x20'+a93_0x422614[_0x19fc44(0x195)](_0x1885a7)+(_0x35452f?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x35452f+')'):''));const _0x2e4325=[..._0x5967fc][_0x19fc44(0x19a)]((_0x45c1e4,_0x50953c)=>_0x45c1e4[_0x19fc44(0x194)][_0x19fc44(0x192)](_0x50953c[_0x19fc44(0x194)]));for(const _0x197012 of _0x2e4325){const _0x5a80f1=_0x197012[_0x19fc44(0x194)][_0x19fc44(0x1bd)](_0x1885a7+'.')?_0x197012[_0x19fc44(0x194)]['slice'](_0x1885a7['length']+0x1):_0x197012[_0x19fc44(0x194)],_0x27abbd=_0x197012[_0x19fc44(0x1b9)]&&_0x197012['parentColumn']!==_0x5a80f1?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x197012[_0x19fc44(0x1b9)]+')'):'';console[_0x19fc44(0x190)](_0x19fc44(0x199)+_0x5a80f1+_0x27abbd+':\x20'+a93_0x422614[_0x19fc44(0x1a9)](_0x197012[_0x19fc44(0x1b8)]));}}}console[_0x19fc44(0x190)]('');}function a93_0x10a7(){const _0x2d2677=['SELECT\x20*\x20FROM\x20(\x0a','Unknown','execute','1205smQjDQ','null','map','error','1046143teCpya','localeCompare','behaviorName','name','bold','fields','verbose','entries','\x20\x20\x20\x20','sort','930ErFoWf','set','106801GoJXwO','source','filter','behavior','size','4335DSeaqO','parentTableName','push','676264lCBvuP','tableName','setJobId','displayName','cyan','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','replace','dim','trim','619056SpVHje','varchar','column_name','Behaviors','YES','information_schema','columns','attribute','Fetching\x20schema...','20770paPnGQ','type','parentColumn','groupingName','Schema\x20query:\x0a','column_type','startsWith','key','402idrxtm','1287Mnbldt'];a93_0x10a7=function(){return _0x2d2677;};return a93_0x10a7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ffd23,_0x290630){const _0xf2d3b0=a94_0x5767,_0x5ccde4=_0x3ffd23();while(!![]){try{const _0x4ba668=parseInt(_0xf2d3b0(0x1f7))/0x1*(-parseInt(_0xf2d3b0(0x1f8))/0x2)+parseInt(_0xf2d3b0(0x1fa))/0x3*(parseInt(_0xf2d3b0(0x1f9))/0x4)+parseInt(_0xf2d3b0(0x204))/0x5*(parseInt(_0xf2d3b0(0x1ff))/0x6)+-parseInt(_0xf2d3b0(0x206))/0x7+-parseInt(_0xf2d3b0(0x202))/0x8*(-parseInt(_0xf2d3b0(0x1fc))/0x9)+parseInt(_0xf2d3b0(0x1f5))/0xa*(parseInt(_0xf2d3b0(0x203))/0xb)+parseInt(_0xf2d3b0(0x1f6))/0xc*(-parseInt(_0xf2d3b0(0x1fb))/0xd);if(_0x4ba668===_0x290630)break;else _0x5ccde4['push'](_0x5ccde4['shift']());}catch(_0x203bd4){_0x5ccde4['push'](_0x5ccde4['shift']());}}}(a94_0x1b78,0xac6dc));import{readdirSync,statSync}from'fs';import a94_0x1053d7 from'path';export function findYamlFiles(_0x402d8d){const _0x3b2bf6=[];function _0x36b7dc(_0x257095){const _0x3366dc=a94_0x5767,_0x10d399=readdirSync(_0x257095,{'withFileTypes':!![]});for(const _0x66d751 of _0x10d399){const _0x48d062=a94_0x1053d7[_0x3366dc(0x207)](_0x257095,_0x66d751[_0x3366dc(0x1f4)]);if(_0x66d751[_0x3366dc(0x201)]())_0x36b7dc(_0x48d062);else(_0x66d751['name'][_0x3366dc(0x1ef)](_0x3366dc(0x1f1))||_0x66d751[_0x3366dc(0x1f4)]['endsWith'](_0x3366dc(0x205)))&&_0x3b2bf6[_0x3366dc(0x1fe)](_0x48d062);}}return _0x36b7dc(_0x402d8d),_0x3b2bf6;}function a94_0x5767(_0x26d097,_0x4851c0){_0x26d097=_0x26d097-0x1ee;const _0x1b7859=a94_0x1b78();let _0x576729=_0x1b7859[_0x26d097];return _0x576729;}export function discoverYamlFiles(_0x1fae26){const _0x4ff0da=a94_0x5767,_0xd3bc6=findYamlFiles(_0x1fae26);return _0xd3bc6[_0x4ff0da(0x1fd)](_0x81105e=>{const _0x490860=_0x4ff0da,_0x58bbf7=a94_0x1053d7[_0x490860(0x1ee)](_0x1fae26,_0x81105e),_0x404333=a94_0x1053d7[_0x490860(0x1f3)](_0x58bbf7);return{'absolutePath':_0x81105e,'relativePath':_0x58bbf7,'folderPath':_0x404333==='.'?'':_0x404333};});}export function isYamlFile(_0x8056d9){const _0x12f8c4=a94_0x5767;try{const _0x2af013=statSync(_0x8056d9);if(!_0x2af013[_0x12f8c4(0x200)]())return![];const _0x263c1d=a94_0x1053d7[_0x12f8c4(0x1f0)](_0x8056d9)[_0x12f8c4(0x1f2)]();return _0x263c1d==='.yml'||_0x263c1d===_0x12f8c4(0x205);}catch{return![];}}function a94_0x1b78(){const _0x5a0446=['toLowerCase','dirname','name','5733800GRdgVw','4189944SBMskF','15455yQWJMD','94bZjBPi','12764YeQKGA','21oupAXs','52pzROeK','6003tDFsAW','map','push','6iAsFSO','isFile','isDirectory','11528hvbtbw','22NDdcQR','5559285zJCAcP','.yaml','2889600sGEjkm','join','relative','endsWith','extname','.yml'];a94_0x1b78=function(){return _0x5a0446;};return a94_0x1b78();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4902dc,_0x55a27b){const _0x4c9353=a95_0x5e89,_0x2a5ab2=_0x4902dc();while(!![]){try{const _0x33adc0=parseInt(_0x4c9353(0x1a1))/0x1*(-parseInt(_0x4c9353(0x188))/0x2)+parseInt(_0x4c9353(0x1d2))/0x3+-parseInt(_0x4c9353(0x186))/0x4*(parseInt(_0x4c9353(0x1c2))/0x5)+parseInt(_0x4c9353(0x1af))/0x6*(parseInt(_0x4c9353(0x19f))/0x7)+parseInt(_0x4c9353(0x18d))/0x8*(-parseInt(_0x4c9353(0x19b))/0x9)+parseInt(_0x4c9353(0x1c6))/0xa*(-parseInt(_0x4c9353(0x1aa))/0xb)+parseInt(_0x4c9353(0x1c1))/0xc*(parseInt(_0x4c9353(0x1a6))/0xd);if(_0x33adc0===_0x55a27b)break;else _0x2a5ab2['push'](_0x2a5ab2['shift']());}catch(_0x53e668){_0x2a5ab2['push'](_0x2a5ab2['shift']());}}}(a95_0x326e,0x4ef8b));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a95_0x5e89(_0x5e1b28,_0x78e59a){_0x5e1b28=_0x5e1b28-0x185;const _0x326eb3=a95_0x326e();let _0x5e8991=_0x326eb3[_0x5e1b28];return _0x5e8991;}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x5e7955){const _0xed9350=a95_0x5e89;return _0x5e7955[_0xed9350(0x1cf)]()[_0xed9350(0x1be)](/\s+/g,'_')[_0xed9350(0x1be)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x32595d){const _0x4bdde4=a95_0x5e89,_0x3a3ffd=_0x32595d[_0x4bdde4(0x1ac)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x3a3ffd){const _0x4ba017=_0x3a3ffd[0x1][_0x4bdde4(0x1cf)](),_0x5c7941=_0x3a3ffd[0x2],_0xb07cfd=_0x5c7941[_0x4bdde4(0x1be)](/-/g,'')[_0x4bdde4(0x1cc)](0x0,0x4)['toLowerCase']();return _0x4ba017+'_'+_0xb07cfd;}const _0x4a2cc2=_0x32595d['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x4a2cc2){const _0xee4002=_0x4a2cc2[0x1],_0x20baba=_0x4a2cc2[0x2][_0x4bdde4(0x1cf)](),_0x3e6cf0=_0xee4002[_0x4bdde4(0x1be)](/-/g,'')[_0x4bdde4(0x1cc)](0x0,0x4)[_0x4bdde4(0x1cf)]();return _0x20baba+'_'+_0x3e6cf0;}return undefined;}function stableStringify(_0xd9a48e){const _0x519915=a95_0x5e89;if(Array[_0x519915(0x1b8)](_0xd9a48e))return'['+_0xd9a48e[_0x519915(0x18e)](_0x5a902a=>stableStringify(_0x5a902a))[_0x519915(0x1a9)](',')+']';if(_0xd9a48e&&typeof _0xd9a48e===_0x519915(0x1d4)){const _0x28ea78=_0xd9a48e,_0x31ff57=Object['keys'](_0x28ea78)['sort'](),_0x16b441=_0x31ff57['map'](_0x25267a=>'\x22'+_0x25267a+'\x22:'+stableStringify(_0x28ea78[_0x25267a]));return'{'+_0x16b441['join'](',')+'}';}const _0xf3457b=JSON[_0x519915(0x1bb)](_0xd9a48e);return _0xf3457b===undefined?_0x519915(0x1b6):_0xf3457b;}export function consolidateActivationsByContent(_0x5594c9){const _0x27c974=a95_0x5e89,_0xcda55e={},_0x3949e2=new Map(),_0x5233e0=new Map();for(const _0x4e6f93 of _0x5594c9){if(!_0x4e6f93)continue;for(const [_0x2a431c,_0xea8bd0]of Object[_0x27c974(0x1ae)](_0x4e6f93)){const _0x104f4c={'connection':_0xea8bd0[_0x27c974(0x1cb)],..._0xea8bd0[_0x27c974(0x1d0)]!==undefined&&{'all_columns':_0xea8bd0['all_columns']},..._0xea8bd0[_0x27c974(0x1a0)]!==undefined&&{'columns':_0xea8bd0[_0x27c974(0x1a0)]},..._0xea8bd0['behavior']!==undefined&&{'behavior':_0xea8bd0['behavior']},..._0xea8bd0[_0x27c974(0x1a3)]!==undefined&&{'schedule':_0xea8bd0[_0x27c974(0x1a3)]},..._0xea8bd0[_0x27c974(0x1b7)]!==undefined&&{'notification':_0xea8bd0[_0x27c974(0x1b7)]},..._0xea8bd0[_0x27c974(0x1ba)]!==undefined&&{'connector_config':_0xea8bd0[_0x27c974(0x1ba)]},..._0xea8bd0[_0x27c974(0x1d7)]!==undefined&&{'activation_template_id':_0xea8bd0[_0x27c974(0x1d7)]}},_0x579f7=stableStringify(_0x104f4c),_0x42999a=_0x5233e0[_0x27c974(0x190)](_0x579f7);_0x42999a?_0x3949e2[_0x27c974(0x1bd)](_0x2a431c,_0x42999a):(_0xcda55e[_0x2a431c]=_0xea8bd0,_0x3949e2[_0x27c974(0x1bd)](_0x2a431c,_0x2a431c),_0x5233e0[_0x27c974(0x1bd)](_0x579f7,_0x2a431c));}}return{'merged':_0xcda55e,'nameMapping':_0x3949e2};}export function updateActivationReferences(_0x2f4e5e,_0x75e6c3){const _0x20f21b=a95_0x5e89;if(!_0x2f4e5e)return;for(const _0x3eb5e8 of _0x2f4e5e){if(!_0x3eb5e8[_0x20f21b(0x1b1)])continue;for(const _0x479c3b of _0x3eb5e8[_0x20f21b(0x1b1)]){if(_0x479c3b['type']===_0x20f21b(0x1b2)&&_0x479c3b[_0x20f21b(0x1c3)]?.['activation']){const _0xec0264=_0x75e6c3[_0x20f21b(0x190)](_0x479c3b[_0x20f21b(0x1c3)][_0x20f21b(0x1b2)]);_0xec0264&&_0xec0264!==_0x479c3b[_0x20f21b(0x1c3)][_0x20f21b(0x1b2)]&&(_0x479c3b[_0x20f21b(0x1c3)][_0x20f21b(0x1b2)]=_0xec0264);}}}}export function consolidateSegmentsByContent(_0x321839,_0x3247d6){const _0x4e69a6=a95_0x5e89,_0x133544={},_0x1690f0=new Map(),_0x5eb88a=new Map();for(const _0x364764 of _0x321839){if(!_0x364764)continue;for(const [_0x7d33aa,_0x9b3cb2]of Object[_0x4e69a6(0x1ae)](_0x364764)){if(!_0x9b3cb2[_0x4e69a6(0x1d3)]){_0x133544[_0x7d33aa]=_0x9b3cb2,_0x1690f0['set'](_0x7d33aa,_0x7d33aa);continue;}const _0x145289=_0x9b3cb2[_0x4e69a6(0x1b0)]&&_0x9b3cb2['description']['trim']()?_0x9b3cb2[_0x4e69a6(0x1b0)]:undefined,_0xbf6a64=JSON['stringify']({'description':_0x145289,'rule':deepSortObject(_0x9b3cb2[_0x4e69a6(0x1d3)])}),_0xba17eb=_0x5eb88a[_0x4e69a6(0x190)](_0xbf6a64);if(_0xba17eb){const _0x35f7ec={..._0x9b3cb2['description']!==undefined&&{'description':_0x9b3cb2[_0x4e69a6(0x1b0)]},'rule':_0x9b3cb2[_0x4e69a6(0x1d3)]?deepSortObject(_0x9b3cb2[_0x4e69a6(0x1d3)]):_0x9b3cb2[_0x4e69a6(0x1d3)]};if(_0x7d33aa<_0xba17eb){_0x133544[_0x7d33aa]=_0x35f7ec,delete _0x133544[_0xba17eb];for(const [_0x2d2597,_0x1aa76d]of _0x1690f0[_0x4e69a6(0x1ae)]()){_0x1aa76d===_0xba17eb&&_0x1690f0[_0x4e69a6(0x1bd)](_0x2d2597,_0x7d33aa);}_0x1690f0['set'](_0x7d33aa,_0x7d33aa),_0x5eb88a[_0x4e69a6(0x1bd)](_0xbf6a64,_0x7d33aa);}else _0x133544[_0xba17eb]=_0x35f7ec,_0x1690f0['set'](_0x7d33aa,_0xba17eb);}else{let _0x3e7590=_0x7d33aa;if(_0x3247d6){const _0x59f28a=_0x3247d6[_0x4e69a6(0x190)](_0xbf6a64);_0x59f28a&&_0x59f28a[_0x4e69a6(0x18b)]>0x0&&(_0x3e7590=_0x59f28a['slice']()[_0x4e69a6(0x1a8)]()[0x0]);}const _0x498b59={..._0x9b3cb2[_0x4e69a6(0x1b0)]!==undefined&&{'description':_0x9b3cb2['description']},'rule':_0x9b3cb2[_0x4e69a6(0x1d3)]?deepSortObject(_0x9b3cb2[_0x4e69a6(0x1d3)]):_0x9b3cb2[_0x4e69a6(0x1d3)]};_0x133544[_0x3e7590]=_0x498b59,_0x1690f0[_0x4e69a6(0x1bd)](_0x7d33aa,_0x3e7590),_0x5eb88a['set'](_0xbf6a64,_0x3e7590);}}}return{'merged':_0x133544,'nameMapping':_0x1690f0};}export function updateSegmentReferences(_0x3fefb6,_0x36dcb5){const _0x3274ee=a95_0x5e89;if(!_0x3fefb6)return;for(const _0x4e9833 of _0x3fefb6){if(_0x4e9833['entry_criteria']?.[_0x3274ee(0x1ab)]){const _0x5dea16=_0x36dcb5[_0x3274ee(0x190)](_0x4e9833['entry_criteria'][_0x3274ee(0x1ab)]);_0x5dea16&&(_0x4e9833[_0x3274ee(0x18c)][_0x3274ee(0x1ab)]=_0x5dea16);}if(_0x4e9833['steps'])for(const _0x4d9a70 of _0x4e9833[_0x3274ee(0x1b1)]){if(_0x4d9a70[_0x3274ee(0x1b4)]===_0x3274ee(0x195)&&_0x4d9a70[_0x3274ee(0x1c3)]?.[_0x3274ee(0x1a4)])for(const _0x4a3d3d of _0x4d9a70[_0x3274ee(0x1c3)][_0x3274ee(0x1a4)]){if(_0x4a3d3d[_0x3274ee(0x1ab)]){const _0x1d2e91=_0x36dcb5[_0x3274ee(0x190)](_0x4a3d3d[_0x3274ee(0x1ab)]);_0x1d2e91&&(_0x4a3d3d[_0x3274ee(0x1ab)]=_0x1d2e91);}}}}}export function updateSegmentRefsInSegments(_0x300f64,_0x281f35){const _0x53b796=a95_0x5e89;for(const _0x2a3cb4 of Object[_0x53b796(0x1c5)](_0x300f64)){_0x2a3cb4[_0x53b796(0x1d3)]&&updateSegmentRefsInRule(_0x2a3cb4[_0x53b796(0x1d3)],_0x281f35);}}function updateSegmentRefsInRule(_0x52974a,_0x8f3b73){const _0x286e8a=a95_0x5e89;if(_0x52974a===null||typeof _0x52974a!==_0x286e8a(0x1d4))return;if(Array[_0x286e8a(0x1b8)](_0x52974a)){for(const _0x4ea914 of _0x52974a){updateSegmentRefsInRule(_0x4ea914,_0x8f3b73);}return;}const _0x48cd4b=_0x52974a;if((_0x48cd4b[_0x286e8a(0x1b4)]===_0x286e8a(0x1d6)||_0x48cd4b['type']===_0x286e8a(0x1d8))&&typeof _0x48cd4b[_0x286e8a(0x1ab)]===_0x286e8a(0x1b9)){const _0x2cceae=_0x8f3b73[_0x286e8a(0x190)](_0x48cd4b[_0x286e8a(0x1ab)]);_0x2cceae&&(_0x48cd4b[_0x286e8a(0x1ab)]=_0x2cceae);}if(_0x48cd4b[_0x286e8a(0x19d)]&&Array[_0x286e8a(0x1b8)](_0x48cd4b[_0x286e8a(0x19d)]))for(const _0x21afb6 of _0x48cd4b[_0x286e8a(0x19d)]){updateSegmentRefsInRule(_0x21afb6,_0x8f3b73);}}export function buildJourneysArray(_0x2c93e4){const _0x481765=a95_0x5e89,_0x50a818=Math['max'](..._0x2c93e4[_0x481765(0x18e)](_0x372c4e=>_0x372c4e[_0x481765(0x193)][_0x481765(0x1cd)]||0x0));return _0x2c93e4[_0x481765(0x18e)](_0x31356b=>{const _0x2ea1db=_0x481765,_0xc5683e=(_0x31356b[_0x2ea1db(0x193)][_0x2ea1db(0x1cd)]||0x0)===_0x50a818,_0x478a2c=_0x31356b[_0x2ea1db(0x1bf)][_0x2ea1db(0x198)]?.[0x0],_0x54978c={'version':_0x478a2c?.[_0x2ea1db(0x1ca)]||_0x31356b[_0x2ea1db(0x1bf)]['version']||_0x31356b[_0x2ea1db(0x193)][_0x2ea1db(0x189)],'state':_0x31356b[_0x2ea1db(0x193)]['state']===_0x2ea1db(0x1c7)?'launched':_0x2ea1db(0x199),'stages':_0x478a2c?.['stages']||_0x31356b['yaml'][_0x2ea1db(0x18f)]||[],'id':_0x478a2c?.['id']||_0x31356b[_0x2ea1db(0x1bf)]['id'],'version_number':_0x478a2c?.[_0x2ea1db(0x1c4)]||_0x31356b[_0x2ea1db(0x1bf)][_0x2ea1db(0x1c4)]};return _0xc5683e&&(_0x54978c[_0x2ea1db(0x1c8)]=!![]),_0x54978c;});}export function buildMergedJourneyDef(_0x4c43cd,_0x4c8705){const _0x2f814f=a95_0x5e89,_0xc2e236=_0x4c43cd[0x0][_0x2f814f(0x1bf)],_0x58987e=buildJourneysArray(_0x4c43cd),{merged:_0x539add,nameMapping:_0x493b1b}=consolidateSegmentsByContent(_0x4c43cd['map'](_0x830e14=>_0x830e14[_0x2f814f(0x1bf)][_0x2f814f(0x196)]),_0x4c8705);updateSegmentRefsInSegments(_0x539add,_0x493b1b);const _0x2c3144=Array[_0x2f814f(0x1a7)](_0x493b1b[_0x2f814f(0x1ae)]())[_0x2f814f(0x1b5)](([_0x9bff85,_0x454412])=>_0x9bff85!==_0x454412&&_0x9bff85[_0x2f814f(0x19c)]('entry_criteria'));let _0x4960bf=_0x539add,_0xb5401e=new Map();if(_0x2c3144){const _0x39390d=consolidateSegmentsByContent([_0x539add],_0x4c8705);_0x4960bf=_0x39390d['merged'],_0xb5401e=_0x39390d['nameMapping'];}const _0x1565c6=new Map(_0x493b1b);for(const [_0x71127a,_0x50ae67]of _0xb5401e[_0x2f814f(0x1ae)]()){_0x1565c6['set'](_0x71127a,_0x50ae67);}for(const [_0x3801c7,_0x17bf6d]of _0x1565c6['entries']()){let _0x549a86=_0x17bf6d,_0x4e1274=0x0;while(_0x1565c6['has'](_0x549a86)&&_0x1565c6[_0x2f814f(0x190)](_0x549a86)!==_0x549a86&&_0x4e1274<MAX_MAPPING_CHAIN_DEPTH){_0x549a86=_0x1565c6[_0x2f814f(0x190)](_0x549a86),_0x4e1274++;}_0x549a86!==_0x17bf6d&&_0x1565c6[_0x2f814f(0x1bd)](_0x3801c7,_0x549a86);}for(const _0xd2c4c8 of _0x58987e){updateSegmentReferences(_0xd2c4c8['stages'],_0x1565c6);}const {merged:_0x2c6a8e,nameMapping:_0x1edbde}=consolidateActivationsByContent(_0x4c43cd[_0x2f814f(0x18e)](_0x59d5a9=>_0x59d5a9[_0x2f814f(0x1bf)][_0x2f814f(0x1c0)]));for(const _0x4ba23a of _0x58987e){updateActivationReferences(_0x4ba23a[_0x2f814f(0x18f)],_0x1edbde);}let _0x45f17f=_0xc2e236['goal'];if(_0x45f17f?.[_0x2f814f(0x1ab)]){const _0x48fa46=_0x1565c6['get'](_0x45f17f[_0x2f814f(0x1ab)]);_0x48fa46&&(_0x45f17f={..._0x45f17f,'segment':_0x48fa46});}for(const _0x17ce20 of _0x58987e){if(_0x17ce20[_0x2f814f(0x1c9)]?.['segment']){const _0x2cd19d=_0x1565c6[_0x2f814f(0x190)](_0x17ce20['goal']['segment']);_0x2cd19d&&(_0x17ce20[_0x2f814f(0x1c9)]={..._0x17ce20[_0x2f814f(0x1c9)],'segment':_0x2cd19d});}}return{'type':_0x2f814f(0x18a),'name':_0xc2e236[_0x2f814f(0x189)],'description':_0xc2e236['description'],'goal':_0x45f17f,'reentry':_0xc2e236[_0x2f814f(0x1ad)],'segments':Object[_0x2f814f(0x194)](_0x4960bf)['length']>0x0?_0x4960bf:undefined,'activations':Object[_0x2f814f(0x194)](_0x2c6a8e)[_0x2f814f(0x18b)]>0x0?_0x2c6a8e:undefined,'journeys':_0x58987e,'bundle_id':_0xc2e236[_0x2f814f(0x197)],'bundle_name':_0xc2e236[_0x2f814f(0x1a5)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x151741,_0x267f1a,_0x47fc48,_0x57a766){const _0x57d910=a95_0x5e89,_0x32be25=_0x151741+':'+_0x267f1a,_0x31275b=_0x47fc48[_0x57d910(0x190)](_0x32be25);if(_0x31275b)return _0x31275b;const _0x2f1987=await _0x57a766(_0x151741),_0x265c89=_0x2f1987['attributes']['journeyBundleName']||_0x2f1987[_0x57d910(0x1ce)][_0x57d910(0x189)],_0x61bd69=_0x2f1987[_0x57d910(0x1ce)][_0x57d910(0x1d1)]['find'](_0x100b0e=>String(_0x100b0e['id'])===String(_0x267f1a)),_0x11d84b=_0x61bd69?.['name']||_0x267f1a,_0x129347={'journeyName':_0x265c89,'stageName':_0x11d84b};return _0x47fc48[_0x57d910(0x1bd)](_0x32be25,_0x129347),_0x129347;}export function formatApiJourneyName(_0x51a1c4,_0x463041){return _0x463041+'\x20('+_0x51a1c4+')';}export function isLocalJourneyRef(_0x5652e8){const _0x20e86b=a95_0x5e89;return _0x5652e8[_0x20e86b(0x1a2)](_0x20e86b(0x1b3))||_0x5652e8[_0x20e86b(0x1a2)](_0x20e86b(0x1bc));}export function buildLocalRuleToNameMapping(_0x41ebf4){const _0x27cafb=a95_0x5e89,_0x218b8a=new Map();if(!_0x41ebf4)return _0x218b8a;for(const [_0xfd94b9,_0x472446]of Object[_0x27cafb(0x1ae)](_0x41ebf4)){if(_0x472446[_0x27cafb(0x1d3)]){const _0x4d9d1=serializeRule(_0x472446['rule']),_0x382ade=_0x218b8a[_0x27cafb(0x190)](_0x4d9d1)||[];_0x382ade[_0x27cafb(0x1d5)](_0xfd94b9),_0x218b8a[_0x27cafb(0x1bd)](_0x4d9d1,_0x382ade);}}return _0x218b8a;}export function buildLocalRuleToNameMappingFromJourney(_0x2efdd3){const _0x144e8f=a95_0x5e89,_0x34acc3=_0x2efdd3[_0x144e8f(0x196)];if(!_0x34acc3)return new Map();const _0x29cc46=collectSegmentUsageCounts(_0x2efdd3),_0x36e786=new Map();let _0x12a891=0x0;for(const [_0x41d57,_0x4b1945]of Object['entries'](_0x34acc3)){if(!_0x4b1945[_0x144e8f(0x1d3)]){_0x12a891++;continue;}const _0x549c6e=serializeRule(_0x4b1945[_0x144e8f(0x1d3)]),_0x488d27=_0x36e786['get'](_0x549c6e)||[];_0x488d27[_0x144e8f(0x1d5)]({'name':_0x41d57,'index':_0x12a891}),_0x36e786[_0x144e8f(0x1bd)](_0x549c6e,_0x488d27),_0x12a891++;}const _0x5d187f=new Map();for(const [_0x4ddd42,_0x582af8]of _0x36e786){const _0x1628b7=_0x582af8[_0x144e8f(0x1cc)]()[_0x144e8f(0x1a8)]((_0x307d6d,_0x2706e2)=>{const _0x219391=_0x144e8f,_0x3b680b=_0x29cc46[_0x219391(0x190)](_0x307d6d[_0x219391(0x189)])||0x0,_0x51e1e3=_0x29cc46[_0x219391(0x190)](_0x2706e2[_0x219391(0x189)])||0x0;if(_0x3b680b!==_0x51e1e3)return _0x51e1e3-_0x3b680b;return _0x307d6d['index']-_0x2706e2[_0x219391(0x192)];})['map'](_0x112817=>_0x112817['name']);_0x5d187f[_0x144e8f(0x1bd)](_0x4ddd42,_0x1628b7);}return _0x5d187f;}export function collectSegmentUsageCounts(_0x53c288){const _0x25845d=a95_0x5e89,_0x90938b=new Map(),_0x3d9c08=_0x250511=>{const _0x11f55b=a95_0x5e89;if(!_0x250511)return;_0x90938b['set'](_0x250511,(_0x90938b[_0x11f55b(0x190)](_0x250511)||0x0)+0x1);},_0x2a06d0=_0x2b89a0=>{const _0x27f76c=a95_0x5e89;for(const _0x19fe0b of _0x2b89a0){_0x3d9c08(_0x19fe0b[_0x27f76c(0x18c)]?.[_0x27f76c(0x1ab)]);if(_0x19fe0b[_0x27f76c(0x185)])for(const _0x494015 of _0x19fe0b[_0x27f76c(0x185)]){_0x3d9c08(_0x494015[_0x27f76c(0x1ab)]);}_0x3d9c08(_0x19fe0b[_0x27f76c(0x191)]?.[_0x27f76c(0x1ab)]);if(_0x19fe0b['steps'])for(const _0x261ce4 of _0x19fe0b[_0x27f76c(0x1b1)]){if(_0x261ce4['type']===_0x27f76c(0x195))for(const _0x40ad90 of _0x261ce4[_0x27f76c(0x1c3)][_0x27f76c(0x1a4)]){_0x3d9c08(_0x40ad90['segment']);}else _0x261ce4['type']===_0x27f76c(0x19e)&&_0x3d9c08(_0x261ce4['with'][_0x27f76c(0x19a)]?.[_0x27f76c(0x1ab)]);}}};_0x3d9c08(_0x53c288[_0x25845d(0x1c9)]?.[_0x25845d(0x1ab)]);if(_0x53c288[_0x25845d(0x198)])for(const _0x17b43b of _0x53c288[_0x25845d(0x198)]){_0x3d9c08(_0x17b43b[_0x25845d(0x1c9)]?.[_0x25845d(0x1ab)]),_0x2a06d0(_0x17b43b[_0x25845d(0x18f)]);}_0x53c288[_0x25845d(0x18f)]&&_0x2a06d0(_0x53c288['stages']);if(_0x53c288['versions'])for(const _0x4d8c06 of _0x53c288[_0x25845d(0x187)]){_0x2a06d0(_0x4d8c06['stages']);}return _0x90938b;}function a95_0x326e(){const _0x73abbb=['47145XjEujf','with','version_number','values','30SWUZAh','launched','latest','goal','version','connection','slice','versionNumber','attributes','toLowerCase','all_columns','journeyStages','152112XDAoKH','rule','object','push','include','activation_template_id','exclude','exit_criteria','212AwefZu','versions','4ypiUpP','name','journey','length','entry_criteria','3576bLjpHk','map','stages','get','milestone','index','item','keys','decision_point','segments','bundle_id','journeys','draft','condition','10233KWNgdp','startsWith','conditions','wait','108962IVaTuG','columns','173987JXTmyP','endsWith','schedule','branches','bundle_name','22121333APaiKg','from','sort','join','666930jgPlzE','segment','match','reentry','entries','42DZVohk','description','steps','activation','.yml','type','some','null','notification','isArray','string','connector_config','stringify','.yaml','set','replace','yaml','activations','12USwGQV'];a95_0x326e=function(){return _0x73abbb;};return a95_0x326e();}
|
|
1
|
+
function a95_0x4e7a(){const _0xacb63a=['reentry','8SvcnXg','versions','map','version','launched','notification','conditions','set','connection','steps','isArray','branches','replace','endsWith','startsWith','342372sSNxsZ','versionNumber','nameMapping','bundle_id','connector_config','name','schedule','push','condition','from','30PRXDZh','activation','journeys','columns','with','state','goal','slice','yaml','344824EIJHQv','.yaml','120445ZppPbr','all_columns','journey','entry_criteria','.yml','attributes','get','83919vzyyGD','42xLLVoG','merged','decision_point','match','keys','rule','description','behavior','entries','has','journeyBundleName','find','version_number','join','toLowerCase','1694STRpbI','bundle_name','activation_template_id','length','index','sort','23ndtJIG','segment','681264ClPHpp','type','segments','latest','include','item','object','stages','stringify','exit_criteria','643555UaRIug','string'];a95_0x4e7a=function(){return _0xacb63a;};return a95_0x4e7a();}(function(_0x187e40,_0x1cf7a3){const _0x5eb0f7=a95_0x3fa3,_0x30464f=_0x187e40();while(!![]){try{const _0x4fddd4=parseInt(_0x5eb0f7(0x10f))/0x1*(parseInt(_0x5eb0f7(0x109))/0x2)+-parseInt(_0x5eb0f7(0xf9))/0x3*(-parseInt(_0x5eb0f7(0x11e))/0x4)+parseInt(_0x5eb0f7(0xf2))/0x5+parseInt(_0x5eb0f7(0xdd))/0x6+parseInt(_0x5eb0f7(0xfa))/0x7*(-parseInt(_0x5eb0f7(0xf0))/0x8)+parseInt(_0x5eb0f7(0x111))/0x9+parseInt(_0x5eb0f7(0xe7))/0xa*(parseInt(_0x5eb0f7(0x11b))/0xb);if(_0x4fddd4===_0x1cf7a3)break;else _0x30464f['push'](_0x30464f['shift']());}catch(_0x58046b){_0x30464f['push'](_0x30464f['shift']());}}}(a95_0x4e7a,0x246b3));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;function a95_0x3fa3(_0x36fb80,_0x1cf871){_0x36fb80=_0x36fb80-0xd0;const _0x4e7af9=a95_0x4e7a();let _0x3fa3fd=_0x4e7af9[_0x36fb80];return _0x3fa3fd;}const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x12cf1e){const _0x457ccd=a95_0x3fa3;return _0x12cf1e[_0x457ccd(0x108)]()[_0x457ccd(0xda)](/\s+/g,'_')[_0x457ccd(0xda)](/[^a-z0-9_]/g,'')[_0x457ccd(0xda)](/_+/g,'_')[_0x457ccd(0xda)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x41447a){const _0x35ea55=a95_0x3fa3,_0x5adcb6=_0x41447a[_0x35ea55(0xfd)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5adcb6){const _0x2d3fc7=_0x5adcb6[0x1][_0x35ea55(0x108)](),_0xbfa73a=_0x5adcb6[0x2],_0xb37cbd=_0xbfa73a[_0x35ea55(0xda)](/-/g,'')[_0x35ea55(0xee)](0x0,0x4)[_0x35ea55(0x108)]();return _0x2d3fc7+'_'+_0xb37cbd;}const _0xb05242=_0x41447a[_0x35ea55(0xfd)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xb05242){const _0x4a787e=_0xb05242[0x1],_0x46a83d=_0xb05242[0x2][_0x35ea55(0x108)](),_0x31e40c=_0x4a787e[_0x35ea55(0xda)](/-/g,'')[_0x35ea55(0xee)](0x0,0x4)[_0x35ea55(0x108)]();return _0x46a83d+'_'+_0x31e40c;}return undefined;}function stableStringify(_0x26f3a3){const _0x17c6cc=a95_0x3fa3;if(Array[_0x17c6cc(0xd8)](_0x26f3a3))return'['+_0x26f3a3['map'](_0x5adad6=>stableStringify(_0x5adad6))[_0x17c6cc(0x107)](',')+']';if(_0x26f3a3&&typeof _0x26f3a3===_0x17c6cc(0x117)){const _0x5c46ce=_0x26f3a3,_0x53feca=Object['keys'](_0x5c46ce)[_0x17c6cc(0x10e)](),_0x1f9fb3=_0x53feca[_0x17c6cc(0xd0)](_0x48fec6=>'\x22'+_0x48fec6+'\x22:'+stableStringify(_0x5c46ce[_0x48fec6]));return'{'+_0x1f9fb3[_0x17c6cc(0x107)](',')+'}';}const _0x19a8e5=JSON[_0x17c6cc(0x119)](_0x26f3a3);return _0x19a8e5===undefined?'null':_0x19a8e5;}export function consolidateActivationsByContent(_0x211a55){const _0x3ff3ba=a95_0x3fa3,_0x529589={},_0x32b89a=new Map(),_0xcfa83d=new Map();for(const _0x46ac32 of _0x211a55){if(!_0x46ac32)continue;for(const [_0x4c872b,_0x2640cc]of Object['entries'](_0x46ac32)){const _0x26fefa={'connection':_0x2640cc[_0x3ff3ba(0xd6)],..._0x2640cc['all_columns']!==undefined&&{'all_columns':_0x2640cc[_0x3ff3ba(0xf3)]},..._0x2640cc[_0x3ff3ba(0xea)]!==undefined&&{'columns':_0x2640cc[_0x3ff3ba(0xea)]},..._0x2640cc[_0x3ff3ba(0x101)]!==undefined&&{'behavior':_0x2640cc['behavior']},..._0x2640cc[_0x3ff3ba(0xe3)]!==undefined&&{'schedule':_0x2640cc[_0x3ff3ba(0xe3)]},..._0x2640cc[_0x3ff3ba(0xd3)]!==undefined&&{'notification':_0x2640cc['notification']},..._0x2640cc['connector_config']!==undefined&&{'connector_config':_0x2640cc[_0x3ff3ba(0xe1)]},..._0x2640cc[_0x3ff3ba(0x10b)]!==undefined&&{'activation_template_id':_0x2640cc[_0x3ff3ba(0x10b)]}},_0x29db6=stableStringify(_0x26fefa),_0x5f4217=_0xcfa83d[_0x3ff3ba(0xf8)](_0x29db6);_0x5f4217?_0x32b89a[_0x3ff3ba(0xd5)](_0x4c872b,_0x5f4217):(_0x529589[_0x4c872b]=_0x2640cc,_0x32b89a[_0x3ff3ba(0xd5)](_0x4c872b,_0x4c872b),_0xcfa83d['set'](_0x29db6,_0x4c872b));}}return{'merged':_0x529589,'nameMapping':_0x32b89a};}export function updateActivationReferences(_0x413342,_0x2fe506){const _0x5ecac2=a95_0x3fa3;if(!_0x413342)return;for(const _0xb1501a of _0x413342){if(!_0xb1501a[_0x5ecac2(0xd7)])continue;for(const _0x2dd450 of _0xb1501a['steps']){if(_0x2dd450[_0x5ecac2(0x112)]===_0x5ecac2(0xe8)&&_0x2dd450[_0x5ecac2(0xeb)]?.['activation']){const _0xdda336=_0x2fe506[_0x5ecac2(0xf8)](_0x2dd450[_0x5ecac2(0xeb)][_0x5ecac2(0xe8)]);_0xdda336&&_0xdda336!==_0x2dd450['with']['activation']&&(_0x2dd450['with'][_0x5ecac2(0xe8)]=_0xdda336);}}}}export function consolidateSegmentsByContent(_0x403ad8,_0x23df3c){const _0x433c13=a95_0x3fa3,_0x403514={},_0x5a23e0=new Map(),_0x8175ec=new Map();for(const _0x18347d of _0x403ad8){if(!_0x18347d)continue;for(const [_0x77e430,_0x507542]of Object['entries'](_0x18347d)){if(!_0x507542[_0x433c13(0xff)]){_0x403514[_0x77e430]=_0x507542,_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x77e430);continue;}const _0x2737b5=_0x507542[_0x433c13(0x100)]&&_0x507542[_0x433c13(0x100)]['trim']()?_0x507542[_0x433c13(0x100)]:undefined,_0x502c8a=JSON['stringify']({'description':_0x2737b5,'rule':deepSortObject(_0x507542['rule'])}),_0x236d22=_0x8175ec[_0x433c13(0xf8)](_0x502c8a);if(_0x236d22){const _0x164f4d={..._0x507542[_0x433c13(0x100)]!==undefined&&{'description':_0x507542[_0x433c13(0x100)]},'rule':_0x507542[_0x433c13(0xff)]?deepSortObject(_0x507542[_0x433c13(0xff)]):_0x507542[_0x433c13(0xff)]};if(_0x77e430<_0x236d22){_0x403514[_0x77e430]=_0x164f4d,delete _0x403514[_0x236d22];for(const [_0x4d7d94,_0x34bed7]of _0x5a23e0[_0x433c13(0x102)]()){_0x34bed7===_0x236d22&&_0x5a23e0['set'](_0x4d7d94,_0x77e430);}_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x77e430),_0x8175ec[_0x433c13(0xd5)](_0x502c8a,_0x77e430);}else _0x403514[_0x236d22]=_0x164f4d,_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x236d22);}else{let _0x50801d=_0x77e430;if(_0x23df3c){const _0x3cf0a2=_0x23df3c[_0x433c13(0xf8)](_0x502c8a);_0x3cf0a2&&_0x3cf0a2[_0x433c13(0x10c)]>0x0&&(_0x50801d=_0x3cf0a2['slice']()[_0x433c13(0x10e)]()[0x0]);}const _0x35d0b0={..._0x507542[_0x433c13(0x100)]!==undefined&&{'description':_0x507542[_0x433c13(0x100)]},'rule':_0x507542['rule']?deepSortObject(_0x507542[_0x433c13(0xff)]):_0x507542[_0x433c13(0xff)]};_0x403514[_0x50801d]=_0x35d0b0,_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x50801d),_0x8175ec[_0x433c13(0xd5)](_0x502c8a,_0x50801d);}}}return{'merged':_0x403514,'nameMapping':_0x5a23e0};}export function updateSegmentReferences(_0x3fefb6,_0x5e9b65){const _0x180c88=a95_0x3fa3;if(!_0x3fefb6)return;for(const _0x415200 of _0x3fefb6){if(_0x415200[_0x180c88(0xf5)]?.[_0x180c88(0x110)]){const _0x236f6e=_0x5e9b65[_0x180c88(0xf8)](_0x415200['entry_criteria'][_0x180c88(0x110)]);_0x236f6e&&(_0x415200[_0x180c88(0xf5)][_0x180c88(0x110)]=_0x236f6e);}if(_0x415200[_0x180c88(0xd7)])for(const _0x409618 of _0x415200[_0x180c88(0xd7)]){if(_0x409618[_0x180c88(0x112)]===_0x180c88(0xfc)&&_0x409618[_0x180c88(0xeb)]?.[_0x180c88(0xd9)])for(const _0xcd6a0c of _0x409618[_0x180c88(0xeb)]['branches']){if(_0xcd6a0c[_0x180c88(0x110)]){const _0x258e89=_0x5e9b65['get'](_0xcd6a0c[_0x180c88(0x110)]);_0x258e89&&(_0xcd6a0c[_0x180c88(0x110)]=_0x258e89);}}}}}export function updateSegmentRefsInSegments(_0x2300e0,_0x4c1ba5){const _0x1e71bc=a95_0x3fa3;for(const _0x4b3d04 of Object['values'](_0x2300e0)){_0x4b3d04[_0x1e71bc(0xff)]&&updateSegmentRefsInRule(_0x4b3d04[_0x1e71bc(0xff)],_0x4c1ba5);}}function updateSegmentRefsInRule(_0x250b60,_0x529d0a){const _0x62979a=a95_0x3fa3;if(_0x250b60===null||typeof _0x250b60!==_0x62979a(0x117))return;if(Array[_0x62979a(0xd8)](_0x250b60)){for(const _0x5433dc of _0x250b60){updateSegmentRefsInRule(_0x5433dc,_0x529d0a);}return;}const _0x5c661e=_0x250b60;if((_0x5c661e[_0x62979a(0x112)]===_0x62979a(0x115)||_0x5c661e[_0x62979a(0x112)]==='exclude')&&typeof _0x5c661e[_0x62979a(0x110)]===_0x62979a(0x11c)){const _0x3051cf=_0x529d0a['get'](_0x5c661e['segment']);_0x3051cf&&(_0x5c661e[_0x62979a(0x110)]=_0x3051cf);}if(_0x5c661e[_0x62979a(0xd4)]&&Array['isArray'](_0x5c661e['conditions']))for(const _0x5f4861 of _0x5c661e['conditions']){updateSegmentRefsInRule(_0x5f4861,_0x529d0a);}}export function buildJourneysArray(_0x4a9018){const _0x296c76=a95_0x3fa3,_0x7ea0f9=Math['max'](..._0x4a9018[_0x296c76(0xd0)](_0x2a1cdb=>_0x2a1cdb['item'][_0x296c76(0xde)]||0x0));return _0x4a9018[_0x296c76(0xd0)](_0x533cd6=>{const _0x516149=_0x296c76,_0x22ef2f=(_0x533cd6['item']['versionNumber']||0x0)===_0x7ea0f9,_0x1efce5=_0x533cd6[_0x516149(0xef)][_0x516149(0xe9)]?.[0x0],_0x5de9f6={'version':_0x1efce5?.[_0x516149(0xd1)]||_0x533cd6[_0x516149(0xef)][_0x516149(0xd1)]||_0x533cd6[_0x516149(0x116)]['name'],'state':_0x533cd6[_0x516149(0x116)][_0x516149(0xec)]==='launched'?_0x516149(0xd2):'draft','stages':_0x1efce5?.[_0x516149(0x118)]||_0x533cd6[_0x516149(0xef)][_0x516149(0x118)]||[],'id':_0x1efce5?.['id']||_0x533cd6[_0x516149(0xef)]['id'],'version_number':_0x1efce5?.[_0x516149(0x106)]||_0x533cd6[_0x516149(0xef)][_0x516149(0x106)]};return _0x22ef2f&&(_0x5de9f6[_0x516149(0x114)]=!![]),_0x5de9f6;});}export function buildMergedJourneyDef(_0x259ba8,_0xd8dcbf){const _0x125f8a=a95_0x3fa3,_0x540e50=_0x259ba8[0x0][_0x125f8a(0xef)],_0x567928=buildJourneysArray(_0x259ba8),{merged:_0x457543,nameMapping:_0x3987d1}=consolidateSegmentsByContent(_0x259ba8['map'](_0x6202aa=>_0x6202aa[_0x125f8a(0xef)][_0x125f8a(0x113)]),_0xd8dcbf);updateSegmentRefsInSegments(_0x457543,_0x3987d1);const _0x58313e=Array[_0x125f8a(0xe6)](_0x3987d1[_0x125f8a(0x102)]())['some'](([_0x362b15,_0x405d97])=>_0x362b15!==_0x405d97&&_0x362b15[_0x125f8a(0xdc)]('entry_criteria'));let _0x15ae5a=_0x457543,_0x574634=new Map();if(_0x58313e){const _0x45323b=consolidateSegmentsByContent([_0x457543],_0xd8dcbf);_0x15ae5a=_0x45323b[_0x125f8a(0xfb)],_0x574634=_0x45323b[_0x125f8a(0xdf)];}const _0x28c41e=new Map(_0x3987d1);for(const [_0x228aa1,_0x3f5e66]of _0x574634[_0x125f8a(0x102)]()){_0x28c41e[_0x125f8a(0xd5)](_0x228aa1,_0x3f5e66);}for(const [_0x18888b,_0x58a296]of _0x28c41e[_0x125f8a(0x102)]()){let _0x1d477c=_0x58a296,_0x211b22=0x0;while(_0x28c41e[_0x125f8a(0x103)](_0x1d477c)&&_0x28c41e[_0x125f8a(0xf8)](_0x1d477c)!==_0x1d477c&&_0x211b22<MAX_MAPPING_CHAIN_DEPTH){_0x1d477c=_0x28c41e[_0x125f8a(0xf8)](_0x1d477c),_0x211b22++;}_0x1d477c!==_0x58a296&&_0x28c41e[_0x125f8a(0xd5)](_0x18888b,_0x1d477c);}for(const _0x3d4ed9 of _0x567928){updateSegmentReferences(_0x3d4ed9[_0x125f8a(0x118)],_0x28c41e);}const {merged:_0x45763b,nameMapping:_0x6fc408}=consolidateActivationsByContent(_0x259ba8[_0x125f8a(0xd0)](_0xe909b1=>_0xe909b1[_0x125f8a(0xef)]['activations']));for(const _0x58c96f of _0x567928){updateActivationReferences(_0x58c96f[_0x125f8a(0x118)],_0x6fc408);}let _0xcaeb20=_0x540e50['goal'];if(_0xcaeb20?.[_0x125f8a(0x110)]){const _0x41ccff=_0x28c41e[_0x125f8a(0xf8)](_0xcaeb20['segment']);_0x41ccff&&(_0xcaeb20={..._0xcaeb20,'segment':_0x41ccff});}for(const _0x439be4 of _0x567928){if(_0x439be4[_0x125f8a(0xed)]?.[_0x125f8a(0x110)]){const _0x1cc838=_0x28c41e[_0x125f8a(0xf8)](_0x439be4[_0x125f8a(0xed)][_0x125f8a(0x110)]);_0x1cc838&&(_0x439be4[_0x125f8a(0xed)]={..._0x439be4['goal'],'segment':_0x1cc838});}}return{'type':_0x125f8a(0xf4),'name':_0x540e50[_0x125f8a(0xe2)],'description':_0x540e50['description'],'goal':_0xcaeb20,'reentry':_0x540e50[_0x125f8a(0x11d)],'segments':Object[_0x125f8a(0xfe)](_0x15ae5a)[_0x125f8a(0x10c)]>0x0?_0x15ae5a:undefined,'activations':Object[_0x125f8a(0xfe)](_0x45763b)[_0x125f8a(0x10c)]>0x0?_0x45763b:undefined,'journeys':_0x567928,'bundle_id':_0x540e50[_0x125f8a(0xe0)],'bundle_name':_0x540e50[_0x125f8a(0x10a)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x42345f,_0xc741a0,_0x4df587,_0x19cddd){const _0x184548=a95_0x3fa3,_0x4e00fb=_0x42345f+':'+_0xc741a0,_0xd0459b=_0x4df587[_0x184548(0xf8)](_0x4e00fb);if(_0xd0459b)return _0xd0459b;const _0x1edcf8=await _0x19cddd(_0x42345f),_0x143cee=_0x1edcf8[_0x184548(0xf7)][_0x184548(0x104)]||_0x1edcf8[_0x184548(0xf7)][_0x184548(0xe2)],_0x1be797=_0x1edcf8[_0x184548(0xf7)]['journeyStages'][_0x184548(0x105)](_0x2c8c4f=>String(_0x2c8c4f['id'])===String(_0xc741a0)),_0x2517c0=_0x1be797?.[_0x184548(0xe2)]||_0xc741a0,_0x4360ad={'journeyName':_0x143cee,'stageName':_0x2517c0};return _0x4df587[_0x184548(0xd5)](_0x4e00fb,_0x4360ad),_0x4360ad;}export function formatApiJourneyName(_0x3dd1d1,_0x29db81){return _0x29db81+'\x20('+_0x3dd1d1+')';}export function isLocalJourneyRef(_0x6483bd){const _0x431043=a95_0x3fa3;return _0x6483bd[_0x431043(0xdb)](_0x431043(0xf6))||_0x6483bd[_0x431043(0xdb)](_0x431043(0xf1));}export function buildLocalRuleToNameMapping(_0x3a1842){const _0x9aec88=a95_0x3fa3,_0x72682e=new Map();if(!_0x3a1842)return _0x72682e;for(const [_0x497568,_0x274a95]of Object[_0x9aec88(0x102)](_0x3a1842)){if(_0x274a95['rule']){const _0x544074=serializeRule(_0x274a95['rule']),_0x4a9c20=_0x72682e[_0x9aec88(0xf8)](_0x544074)||[];_0x4a9c20[_0x9aec88(0xe4)](_0x497568),_0x72682e['set'](_0x544074,_0x4a9c20);}}return _0x72682e;}export function buildLocalRuleToNameMappingFromJourney(_0x866aec){const _0x2d5e96=a95_0x3fa3,_0xe8c2d4=_0x866aec['segments'];if(!_0xe8c2d4)return new Map();const _0x554b5e=collectSegmentUsageCounts(_0x866aec),_0x23ad9c=new Map();let _0x28b30f=0x0;for(const [_0x29929c,_0xf74fe0]of Object[_0x2d5e96(0x102)](_0xe8c2d4)){if(!_0xf74fe0[_0x2d5e96(0xff)]){_0x28b30f++;continue;}const _0x53797c=serializeRule(_0xf74fe0[_0x2d5e96(0xff)]),_0x5bf16f=_0x23ad9c[_0x2d5e96(0xf8)](_0x53797c)||[];_0x5bf16f[_0x2d5e96(0xe4)]({'name':_0x29929c,'index':_0x28b30f}),_0x23ad9c['set'](_0x53797c,_0x5bf16f),_0x28b30f++;}const _0x3e0da9=new Map();for(const [_0x945757,_0x1e96a1]of _0x23ad9c){const _0x1631da=_0x1e96a1['slice']()['sort']((_0x749f29,_0x4bf904)=>{const _0x375ae7=_0x2d5e96,_0x2a410a=_0x554b5e[_0x375ae7(0xf8)](_0x749f29['name'])||0x0,_0x907c87=_0x554b5e[_0x375ae7(0xf8)](_0x4bf904[_0x375ae7(0xe2)])||0x0;if(_0x2a410a!==_0x907c87)return _0x907c87-_0x2a410a;return _0x749f29['index']-_0x4bf904[_0x375ae7(0x10d)];})[_0x2d5e96(0xd0)](_0x4fabc4=>_0x4fabc4['name']);_0x3e0da9[_0x2d5e96(0xd5)](_0x945757,_0x1631da);}return _0x3e0da9;}export function collectSegmentUsageCounts(_0x3ed012){const _0x50a39c=a95_0x3fa3,_0x4cc0e9=new Map(),_0x357352=_0x162602=>{const _0x3751a8=a95_0x3fa3;if(!_0x162602)return;_0x4cc0e9[_0x3751a8(0xd5)](_0x162602,(_0x4cc0e9[_0x3751a8(0xf8)](_0x162602)||0x0)+0x1);},_0xa0ecc6=_0x2e3bd6=>{const _0x363423=a95_0x3fa3;for(const _0x1a28bc of _0x2e3bd6){_0x357352(_0x1a28bc[_0x363423(0xf5)]?.['segment']);if(_0x1a28bc[_0x363423(0x11a)])for(const _0x1765ba of _0x1a28bc[_0x363423(0x11a)]){_0x357352(_0x1765ba[_0x363423(0x110)]);}_0x357352(_0x1a28bc['milestone']?.[_0x363423(0x110)]);if(_0x1a28bc[_0x363423(0xd7)])for(const _0xa9bf1a of _0x1a28bc[_0x363423(0xd7)]){if(_0xa9bf1a[_0x363423(0x112)]===_0x363423(0xfc))for(const _0x47a26e of _0xa9bf1a[_0x363423(0xeb)][_0x363423(0xd9)]){_0x357352(_0x47a26e[_0x363423(0x110)]);}else _0xa9bf1a[_0x363423(0x112)]==='wait'&&_0x357352(_0xa9bf1a[_0x363423(0xeb)][_0x363423(0xe5)]?.['segment']);}}};_0x357352(_0x3ed012[_0x50a39c(0xed)]?.[_0x50a39c(0x110)]);if(_0x3ed012[_0x50a39c(0xe9)])for(const _0x4bc075 of _0x3ed012[_0x50a39c(0xe9)]){_0x357352(_0x4bc075[_0x50a39c(0xed)]?.[_0x50a39c(0x110)]),_0xa0ecc6(_0x4bc075[_0x50a39c(0x118)]);}_0x3ed012[_0x50a39c(0x118)]&&_0xa0ecc6(_0x3ed012[_0x50a39c(0x118)]);if(_0x3ed012['versions'])for(const _0x37e8da of _0x3ed012[_0x50a39c(0x11f)]){_0xa0ecc6(_0x37e8da[_0x50a39c(0x118)]);}return _0x4cc0e9;}
|